Component
diff --git a/src/App/docutils/DocContainer/index.js b/src/App/docutils/DocContainer/index.js
index 488fd6129f..6ff15cda78 100644
--- a/src/App/docutils/DocContainer/index.js
+++ b/src/App/docutils/DocContainer/index.js
@@ -2,9 +2,9 @@ import React, { useEffect } from "react";
import { sidebar } from "@src/scripts/main";
-const DocContainer = ({ children }) => {
+const DocContainer = ({ classes = "", children }) => {
const DocContent = () => (
-
+
{children}
);
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-accent-1.avif b/src/img/swedbankpay/documentation/colors/identity-color-accent-1.avif
new file mode 100644
index 0000000000..489a85f2ea
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-accent-1.avif differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-accent-1.png b/src/img/swedbankpay/documentation/colors/identity-color-accent-1.png
new file mode 100644
index 0000000000..c7f02e1014
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-accent-1.png differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-accent-2.avif b/src/img/swedbankpay/documentation/colors/identity-color-accent-2.avif
new file mode 100644
index 0000000000..cb2846ce47
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-accent-2.avif differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-accent-2.png b/src/img/swedbankpay/documentation/colors/identity-color-accent-2.png
new file mode 100644
index 0000000000..7c5ed1a970
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-accent-2.png differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-accent-3.png b/src/img/swedbankpay/documentation/colors/identity-color-accent-3.png
new file mode 100644
index 0000000000..7c5016d2be
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-accent-3.png differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-accent-4.png b/src/img/swedbankpay/documentation/colors/identity-color-accent-4.png
new file mode 100644
index 0000000000..7296e0fa7a
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-accent-4.png differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-accent-5.avif b/src/img/swedbankpay/documentation/colors/identity-color-accent-5.avif
new file mode 100644
index 0000000000..db3af9c953
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-accent-5.avif differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-accent-5.png b/src/img/swedbankpay/documentation/colors/identity-color-accent-5.png
new file mode 100644
index 0000000000..c9c6ef1b5d
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-accent-5.png differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-accent-6.avif b/src/img/swedbankpay/documentation/colors/identity-color-accent-6.avif
new file mode 100644
index 0000000000..427954c437
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-accent-6.avif differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-accent-6.png b/src/img/swedbankpay/documentation/colors/identity-color-accent-6.png
new file mode 100644
index 0000000000..334b96a901
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-accent-6.png differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-primary-1.avif b/src/img/swedbankpay/documentation/colors/identity-color-primary-1.avif
new file mode 100644
index 0000000000..4cdb85e364
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-primary-1.avif differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-primary-1.png b/src/img/swedbankpay/documentation/colors/identity-color-primary-1.png
new file mode 100644
index 0000000000..65a030f48a
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-primary-1.png differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-primary-2.avif b/src/img/swedbankpay/documentation/colors/identity-color-primary-2.avif
new file mode 100644
index 0000000000..ff4360f4bf
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-primary-2.avif differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-primary-2.png b/src/img/swedbankpay/documentation/colors/identity-color-primary-2.png
new file mode 100644
index 0000000000..153434fac6
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-primary-2.png differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-primary-3.avif b/src/img/swedbankpay/documentation/colors/identity-color-primary-3.avif
new file mode 100644
index 0000000000..e55cff42e5
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-primary-3.avif differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-primary-3.png b/src/img/swedbankpay/documentation/colors/identity-color-primary-3.png
new file mode 100644
index 0000000000..ac82e41473
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-primary-3.png differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-text-dark.png b/src/img/swedbankpay/documentation/colors/identity-color-text-dark.png
new file mode 100644
index 0000000000..4f8fcdd7d1
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-text-dark.png differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-text-default.png b/src/img/swedbankpay/documentation/colors/identity-color-text-default.png
new file mode 100644
index 0000000000..ac8d5d8079
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-text-default.png differ
diff --git a/src/img/swedbankpay/documentation/colors/identity-color-text-disabled.png b/src/img/swedbankpay/documentation/colors/identity-color-text-disabled.png
new file mode 100644
index 0000000000..5f96f393a0
Binary files /dev/null and b/src/img/swedbankpay/documentation/colors/identity-color-text-disabled.png differ
diff --git a/src/less/components/checkbox.less b/src/less/components/checkbox.less
index 2e071288fe..3f88916f42 100644
--- a/src/less/components/checkbox.less
+++ b/src/less/components/checkbox.less
@@ -108,11 +108,11 @@
&.has-error {
.help-block[data-error] {
- color: @brand-error;
+ color: var(--brand-error);
input[type="checkbox"] {
+ label:after {
- border-color: @brand-error;
+ border-color: var(--brand-error);
}
}
}
@@ -139,7 +139,7 @@ fieldset {
&.has-error {
input[type="checkbox"] + label:after {
- border-color: @brand-error;
+ border-color: var(--brand-error);
}
}
}
@@ -152,12 +152,12 @@ fieldset {
&.has-error {
.help-block {
- color: @brand-error;
+ color: var(--brand-error);
}
input[type="checkbox"] {
+ label:before {
- border-color: @brand-error;
+ border-color: var(--brand-error);
}
}
}
diff --git a/src/less/components/form.less b/src/less/components/form.less
index 185ac7d65d..5e931b9b01 100644
--- a/src/less/components/form.less
+++ b/src/less/components/form.less
@@ -44,7 +44,7 @@ label {
line-height: 1.5;
.required-asterisk {
- color: @brand-error;
+ color: var(--brand-error);
margin-left: 0.25rem;
font-weight: normal;
font-size: 1rem;
diff --git a/src/less/components/radio.less b/src/less/components/radio.less
index 7b64ec0978..e56cb98628 100644
--- a/src/less/components/radio.less
+++ b/src/less/components/radio.less
@@ -201,17 +201,17 @@ fieldset {
&.has-error {
input[type="radio"] + label:before {
- border-color: @brand-error;
+ border-color: var(--brand-error);
}
.checkmark {
input[type="radio"]:not(:checked) + label {
- outline: 2px solid @brand-error;
+ outline: 2px solid var(--brand-error);
}
}
.help-block {
- color: @brand-error;
+ color: var(--brand-error);
}
}
diff --git a/src/less/components/slab.less b/src/less/components/slab.less
index 916d97c332..8ec8cdcb66 100644
--- a/src/less/components/slab.less
+++ b/src/less/components/slab.less
@@ -137,7 +137,7 @@
}
&.slab-border-error {
- border-top: 4px solid @brand-error;
+ border-top: 4px solid var(--brand-error);
}
&.slab-edges {
diff --git a/src/less/components/status.less b/src/less/components/status.less
index e7b56cb0f1..73590e1cf1 100644
--- a/src/less/components/status.less
+++ b/src/less/components/status.less
@@ -75,7 +75,7 @@
&.status-danger {
&:before,
&:after {
- background-color: @brand-error;
+ background-color: var(--brand-error);
}
}
diff --git a/src/less/components/toast.less b/src/less/components/toast.less
index de6e6467c5..0c7b6a493f 100644
--- a/src/less/components/toast.less
+++ b/src/less/components/toast.less
@@ -85,10 +85,10 @@
}
&.toast-danger {
- color: @brand-error;
+ color: var(--brand-error);
.material-icons {
- color: @brand-error;
+ color: var(--brand-error);
}
}
diff --git a/src/less/documentation-swedbankpay.less b/src/less/documentation-swedbankpay.less
index 988fecfe13..cc92af2717 100644
--- a/src/less/documentation-swedbankpay.less
+++ b/src/less/documentation-swedbankpay.less
@@ -1463,119 +1463,181 @@
}
}
- .color-contrast-section {
- i {
- font-size: 1rem;
- align-self: center;
+ .identity-colors {
+ .color-page-introduction .color-circle {
+ width: clamp(30px, 7vw, 55px);
+ height: clamp(30px, 7vw, 55px);
+ margin: clamp(0.2rem, 3vw, 1rem);
+ aspect-ratio: 1;
- &.check {
- color: @brand-success;
+ &.brown-solid {
+ background-color: var(--brown-solid);
}
- &.cancel {
- color: @brand-error;
+ &.brand-yellow {
+ background-color: var(--brand-yellow);
}
- &.warning {
- color: @brand-warning;
+ &.brand-orange {
+ background-color: var(--brand-orange);
}
- }
- }
- .color-group {
- display: flex;
- flex-wrap: wrap;
+ &.brand-pink {
+ background-color: var(--brand-pink);
+ }
- .color-box {
- height: 7.875rem;
- width: 7.875rem;
- margin-right: 0.5rem;
- overflow: hidden;
- border-radius: var(--border-radius, 8px);
+ &.brand-turquoise-light {
+ background-color: var(--brand-turquoise-light);
+ }
- &.has-border {
- border: 1px solid @brand-secondary;
+ &.brand-turquoise {
+ background-color: var(--brand-turquoise);
}
- svg {
- width: 100%;
- height: 100%;
+ &:nth-child(1) {
+ transform: translateY(10px);
+ }
- rect {
- rx: 5;
- width: 100%;
- height: 100%;
- }
+ &:nth-child(2) {
+ transform: translateY(-15px);
+ }
+
+ &:nth-child(3) {
+ transform: translateY(-25px);
+ }
+
+ &:nth-child(4) {
+ transform: translateY(-10px);
+ }
+
+ &:nth-child(5) {
+ transform: translateY(15px);
+ }
+
+ &:nth-child(6) {
+ transform: translateY(-10px);
}
}
- .text-box {
- margin-top: 4px;
+ .color-contrast-section {
+ border-radius: 10px;
+
+ i {
+ font-size: 1rem;
+ align-self: center;
+
+ &.check {
+ color: @brand-success;
+ }
+
+ &.cancel {
+ color: var(--brand-error);
+ }
- small {
- color: @medium-brown;
+ &.warning {
+ color: @brand-warning;
+ }
}
+ }
- .contrast-box {
- display: flex;
- flex-direction: column;
+ .color-group {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-around;
- .contrast-white-container {
- margin-bottom: 0.25rem;
+ &.color-group-table {
+ display: grid;
+ grid-template-columns: repeat(4, auto);
+ grid-gap: 1rem;
+ grid-template-rows: repeat(8, auto);
- .white-box {
- border: 1px solid @medium-brown;
- }
+ .table-header-row {
+ grid-column: 1 / span 4;
+ display: grid;
+ grid-template-columns: subgrid;
+ color: var(--text-muted-light);
}
- .contrast-white-container,
- .contrast-black-container {
- position: relative;
- display: flex;
+ .table-row {
+ display: grid;
+ grid-template-columns: subgrid;
+ grid-column: span 4;
+ grid-row: span 1;
+ }
+ }
- svg {
- height: 1rem;
- width: 1rem;
- border-radius: 2px;
- position: relative;
+ &.color-grid {
+ display: grid;
+ justify-content: space-evenly;
+ gap: 5px 30px;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ }
- &.white-box {
- border: 1px solid @medium-brown;
- }
+ &.grid-columns {
+ container-type: inline-size;
- rect {
- width: 100%;
- height: 100%;
- }
+ .containerized-grid {
+ display: grid;
+ grid-auto-flow: column;
+ gap: 5px 30px;
+ }
+ @container (min-width: 0) {
+ .containerized-grid {
+ grid-template-columns: repeat(1, 1fr);
+ grid-template-rows: repeat(27, 1fr);
}
-
- .second-svg {
- position: relative;
- left: -8px;
+ }
+ @container (min-width: calc(200px * 2 + 30px * 1)) {
+ .containerized-grid {
+ grid-template-columns: repeat(2, 200px);
+ grid-template-rows: repeat(15, 1fr);
}
-
- .first-svg {
- z-index: 100;
+ }
+ @container (min-width: calc(200px * 3 + 30px * 2)) {
+ .containerized-grid {
+ grid-template-rows: repeat(9, 1fr);
}
+ }
+ }
- i {
- font-size: 14px;
- align-self: center;
+ .color-box {
+ height: 7.1875rem;
+ width: 7.1875rem;
+ margin-right: 1rem;
+ border-radius: 2.1875rem;
+ aspect-ratio: 1;
+ overflow: hidden;
+ }
- &.check {
- color: @brand-success;
- }
+ .color-box-small {
+ height: 3.0625rem;
+ width: 3.0625rem;
+ margin-right: 1rem;
+ border-radius: 0.875rem;
+ background: var(--bg-color);
+ aspect-ratio: 1;
+ }
- &.cancel {
- color: @brand-error;
- }
+ div:is(.color-box, .color-box-small) {
+ svg {
+ width: 100%;
+ height: 100%;
- &.warning {
- color: @brand-warning;
- }
+ rect {
+ rx: 5;
+ width: 100%;
+ height: 100%;
}
}
}
+
+ .text-box {
+ margin-top: 4px;
+
+ small {
+ color: @medium-brown;
+ }
+ }
}
}
diff --git a/src/less/utilities/text.less b/src/less/utilities/text.less
index f1a98619d1..c2ae3f03d6 100644
--- a/src/less/utilities/text.less
+++ b/src/less/utilities/text.less
@@ -7,6 +7,7 @@
.text-justify {
text-align: justify !important;
}
+
.text-nowrap {
white-space: nowrap !important;
}
@@ -41,23 +42,32 @@ each(@grid-breakpoints, .(@size, @abbr) {
.text-lowercase {
text-transform: lowercase !important;
}
+
.text-uppercase {
text-transform: uppercase !important;
}
+
.text-capitalize {
text-transform: capitalize !important;
}
+.text-underline {
+ text-decoration: underline !important;
+}
+
// Weight and italics
.font-weight-light {
font-weight: var(--font-weight-light) !important;
}
+
.font-weight-normal {
font-weight: var(--font-weight-normal) !important;
}
+
.font-weight-bold {
font-weight: var(--font-weight-bold) !important;
}
+
.font-italic {
font-style: italic !important;
}
@@ -73,7 +83,6 @@ each(@grid-breakpoints, .(@size, @abbr) {
neutral: @brand-info;
warning: @brand-warning;
danger: @brand-error;
- muted: fade(@text-color, 75%);
banner: @brand-primary-light;
};
@@ -85,11 +94,6 @@ each(@grid-breakpoints, .(@size, @abbr) {
color: darken(@color, 10%) !important;
}
- &.text-muted,
- .text-muted {
- color: fade(@color, 75%) !important;
- }
-
&.text-white,
.text-white {
color: #ffffff !important;
@@ -103,12 +107,13 @@ each(@color-list, .(@color, @name) {
});
.text-muted {
- color: @text-muted !important;
+ color: var(--text-muted) !important;
}
.text-black-50 {
color: fade(@black, 50%) !important;
}
+
.text-white-50 {
color: fade(@white, 50%) !important;
}
diff --git a/src/less/variables-payex.less b/src/less/variables-payex.less
index 4c2e1833bf..293e75b28a 100644
--- a/src/less/variables-payex.less
+++ b/src/less/variables-payex.less
@@ -105,7 +105,6 @@
@green-syntax-highlight: #99cc66;
@blue-syntax-highlight: #43d0dd;
@yellow-syntax-highlight: #fff3d5;
-@pink-cards-details: #c5569a;
@dark-brown: @brand-secondary;
@light-brown: @brand-secondary-light-3;
@help-block-text: #707070;
@@ -194,6 +193,10 @@ body {
--brand-info: #3e6ab6;
--brand-info-light: #e8eff9;
+ // text colors
+ --text-color: var(--brand-secondary);
+ --text-muted: color-mix(in srgb, var(--text-color), var(--white) 75%);
+
/* Checkbox */
--checkbox-checked-color: var(--brand-secondary, #3c3c3c);
@@ -257,7 +260,6 @@ body {
--green-syntax-highlight: #99cc66;
--blue-syntax-highlight: #43d0dd;
--yellow-syntax-highlight: #fff3d5;
- --pink-cards-details: #c5569a;
--dark-brown: var(--brand-secondary, #3c3c3c);
--light-brown: var(--brand-secondary-light-3, #c8c8c8);
--help-block-text: #707070;
diff --git a/src/less/variables-swedbankpay.less b/src/less/variables-swedbankpay.less
index 3abaffb627..6af92b3743 100644
--- a/src/less/variables-swedbankpay.less
+++ b/src/less/variables-swedbankpay.less
@@ -84,8 +84,8 @@
@brand-warning-light: #fef2e2;
@brand-warning-2: @brand-tertiary;
@brand-error-border: #f1bbb9;
-@brand-error: #b5111a;
-@brand-error-light: #fceee9;
+@brand-error: #d82e2a;
+@brand-error-light: #ffe9e9;
@brand-error-dark: #8c0d14;
@brand-info: #3961a7;
@brand-info-light: #ebf1fa;
@@ -145,7 +145,6 @@
@green-syntax-highlight: #99cc66;
@blue-syntax-highlight: #43d0dd;
@yellow-syntax-highlight: @brand-primary-light-3;
-@pink-cards-details: #c5569a;
/* ==================================CSS VARIABLES========================================
*
@@ -153,8 +152,9 @@
*
*/
:root {
- // Communication colors
- --brand-primary: #fdc129;
+ --brand-primary: var(--brand-yellow, #fdc129);
+ --brand-primary-light: #fbdd91;
+ --brand-primary-lighter: var(--brand-yellow-lighter, #fff3d5);
--brand-secondary: var(--brown-solid, #2f2424);
// Functional colors
@@ -166,11 +166,6 @@
--gray: #ebe7e2;
--white: #ffffff;
- // Complementary colors
- --brand-orange: #ee7023;
- --brand-turquoise: #31a3ae;
- --brand-turquoise-light: #8acdc3;
-
/* Main Brand Color Variants */
--brand-primary-light-3: #fff3d5;
--brand-secondary-light-1: var(--brown-medium, #72605e);
@@ -185,16 +180,56 @@
// Text colors
--text-default: var(--brown-solid);
--text-muted: var(--brown-medium);
+ --text-muted-light: var(--brown-soft);
--text-link: #257886;
- --text-white: var(--white);
- --text-disabled: #c0bebe;
+ --text-white: var(--white, #ffffff);
+ --text-disabled: var(--brown-light, #d4c4bc);
+
+ // Communication colors
+ --brand-yellow: #fdc129;
+ --brand-yellow-lighter: #fff3d5;
+ --brand-orange: #ee7023;
+ --brand-turquoise: #31a3ae;
+ --brand-turquoise-light: #8acdc3;
+ --brand-pink: #efb7b6;
+
+ // Color pool
+ --brand-turquoise-lighter: #ebf8f2;
+ --brand-orange-lighter: #fbeadb;
+ --brand-green-lighter: #e7f8d2;
+ --brand-red-lighter: #ffe9e9;
+ --brand-blue: #335bb1;
+ --brand-blue-lighter: #e0eaf9;
+
+ // Functional colors
+ --base-1: var(--text-default);
+ --base-2: var(--text-muted);
+ --base-3: var(--text-muted-light);
+ --base-4: var(--text-disabled);
+ --base-5: var(--bg-brown);
+ --base-6: var(--bg-grey);
+ --base-7: var(--bg-white);
// Background colors
- --brand-bg-gray: var(--gray, #ebe7e2);
+ --bg-brown: var(--gray, #ebe7e2);
+ --bg-grey: var(--light-gray, #f9f8f6);
+ --bg-orange: #fff1e4;
+ --bg-white: var(--white, #ffffff);
+ --bg-turquoise: var(--brand-turquoise-lighter, #ebf8f2);
// System colors
- --brand-error: #b5111a;
- --brand-error-light: #fceee9;
+ --system-success: #4d9c0f;
+ --system-success-light: var(--brand-green-lighter, #e7f8d2);
+ --system-warning: var(--brand-orange, #ee7023);
+ --system-warning-light: var(--brand-orange-lighter, #fbeadb);
+ --system-info: var(--brand-blue, #335bb1);
+ --system-info-light: var(--brand-blue-lighter, #e0eaf9);
+ --system-error: #d82e2a;
+ --system-error-light: var(--brand-red-lighter, #ffe9e9);
+ // TODO: update system colors in LESS variables and in component
+
+ --brand-error: var(--system-error);
+ --brand-error-light: var(--system-error-light);
// Button colors
--secondary-disabled-bg: #e3d1c3;
diff --git a/webpack.config.js b/webpack.config.js
index 17a758b26b..26c8e31070 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -344,7 +344,7 @@ module.exports = (env, argv) => {
destination: `./dist${basename}img/documentation/grid`,
},
{
- source: `./src/img/${brand}/documentation/colors/*.png`,
+ source: `./src/img/${brand}/documentation/colors/*.{png,avif,jpg}`,
destination: `./dist${basename}img/documentation/colors`,
},
{