diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 9ac40d894c..0047b60a68 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,19 +1,20 @@
# Changelog
-## [10.8.5] - 25.08.2023
+## \[10.8.6\] - 13.09.2023
## Bug Fixes
-- We reverted back the way CSS stylesheets were imported internally. It caused a regression bug, svg files would not load when imported from CSS properties (e.g. checkbox, ...). Paths resolution were failing. (not an issue for projects importing CSS via CDN, only for the ones importing styles via the local npm package)
-
## Component changes
### Non breaking UI changes
+- add possibility to disable rotation of the dropdown toggle icon on active state
+- add possibility to style bank-id button as secondary
+
## Testing
-- E2E tests for topbar
+- E2E tests for dropdown component
## Design System website
-- fix a homepage UI bug (section's height)
+- expand components preview containers to full screen (only in Topbar component for now)
diff --git a/package-lock.json b/package-lock.json
index c9bb6181c4..3380519da6 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@swedbankpay/design-guide",
- "version": "10.8.5",
+ "version": "10.8.6",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@swedbankpay/design-guide",
- "version": "10.8.5",
+ "version": "10.8.6",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@@ -32,7 +32,7 @@
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "7.20.2",
"@babel/preset-react": "^7.18.6",
- "@playwright/test": "^1.34.3",
+ "@playwright/test": "^1.39.0",
"@sentry/webpack-plugin": "^1.20.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
@@ -3355,22 +3355,18 @@
}
},
"node_modules/@playwright/test": {
- "version": "1.34.3",
- "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.34.3.tgz",
- "integrity": "sha512-zPLef6w9P6T/iT6XDYG3mvGOqOyb6eHaV9XtkunYs0+OzxBtrPAAaHotc0X+PJ00WPPnLfFBTl7mf45Mn8DBmw==",
+ "version": "1.39.0",
+ "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.39.0.tgz",
+ "integrity": "sha512-3u1iFqgzl7zr004bGPYiN/5EZpRUSFddQBra8Rqll5N0/vfpqlP9I9EXqAoGacuAbX6c9Ulg/Cjqglp5VkK6UQ==",
"dev": true,
"dependencies": {
- "@types/node": "*",
- "playwright-core": "1.34.3"
+ "playwright": "1.39.0"
},
"bin": {
"playwright": "cli.js"
},
"engines": {
- "node": ">=14"
- },
- "optionalDependencies": {
- "fsevents": "2.3.2"
+ "node": ">=16"
}
},
"node_modules/@polka/url": {
@@ -5738,9 +5734,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001523",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001523.tgz",
- "integrity": "sha512-I5q5cisATTPZ1mc588Z//pj/Ox80ERYDfR71YnvY7raS/NOk8xXlZcB0sF7JdqaV//kOaa6aus7lRfpdnt1eBA==",
+ "version": "1.0.30001547",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz",
+ "integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==",
"dev": true,
"funding": [
{
@@ -12746,22 +12742,40 @@
"node": ">=8"
}
},
+ "node_modules/playwright": {
+ "version": "1.39.0",
+ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.39.0.tgz",
+ "integrity": "sha512-naE5QT11uC/Oiq0BwZ50gDmy8c8WLPRTEWuSSFVG2egBka/1qMoSqYQcROMT9zLwJ86oPofcTH2jBY/5wWOgIw==",
+ "dev": true,
+ "dependencies": {
+ "playwright-core": "1.39.0"
+ },
+ "bin": {
+ "playwright": "cli.js"
+ },
+ "engines": {
+ "node": ">=16"
+ },
+ "optionalDependencies": {
+ "fsevents": "2.3.2"
+ }
+ },
"node_modules/playwright-core": {
- "version": "1.34.3",
- "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.34.3.tgz",
- "integrity": "sha512-2pWd6G7OHKemc5x1r1rp8aQcpvDh7goMBZlJv6Co5vCNLVcQJdhxRL09SGaY6HcyHH9aT4tiynZabMofVasBYw==",
+ "version": "1.39.0",
+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.39.0.tgz",
+ "integrity": "sha512-+k4pdZgs1qiM+OUkSjx96YiKsXsmb59evFoqv8SKO067qBA+Z2s/dCzJij/ZhdQcs2zlTAgRKfeiiLm8PQ2qvw==",
"dev": true,
"bin": {
"playwright-core": "cli.js"
},
"engines": {
- "node": ">=14"
+ "node": ">=16"
}
},
"node_modules/postcss": {
- "version": "8.4.25",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.25.tgz",
- "integrity": "sha512-7taJ/8t2av0Z+sQEvNzCkpDynl0tX3uJMCODi6nT3PfASC7dYCWV9aQ+uiCf+KBD4SEFcu+GvJdGdwzQ6OSjCw==",
+ "version": "8.4.31",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
"dev": true,
"funding": [
{
@@ -20503,14 +20517,12 @@
}
},
"@playwright/test": {
- "version": "1.34.3",
- "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.34.3.tgz",
- "integrity": "sha512-zPLef6w9P6T/iT6XDYG3mvGOqOyb6eHaV9XtkunYs0+OzxBtrPAAaHotc0X+PJ00WPPnLfFBTl7mf45Mn8DBmw==",
+ "version": "1.39.0",
+ "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.39.0.tgz",
+ "integrity": "sha512-3u1iFqgzl7zr004bGPYiN/5EZpRUSFddQBra8Rqll5N0/vfpqlP9I9EXqAoGacuAbX6c9Ulg/Cjqglp5VkK6UQ==",
"dev": true,
"requires": {
- "@types/node": "*",
- "fsevents": "2.3.2",
- "playwright-core": "1.34.3"
+ "playwright": "1.39.0"
}
},
"@polka/url": {
@@ -22399,9 +22411,9 @@
}
},
"caniuse-lite": {
- "version": "1.0.30001523",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001523.tgz",
- "integrity": "sha512-I5q5cisATTPZ1mc588Z//pj/Ox80ERYDfR71YnvY7raS/NOk8xXlZcB0sF7JdqaV//kOaa6aus7lRfpdnt1eBA==",
+ "version": "1.0.30001547",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz",
+ "integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==",
"dev": true
},
"chalk": {
@@ -27605,16 +27617,26 @@
"find-up": "^4.0.0"
}
},
+ "playwright": {
+ "version": "1.39.0",
+ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.39.0.tgz",
+ "integrity": "sha512-naE5QT11uC/Oiq0BwZ50gDmy8c8WLPRTEWuSSFVG2egBka/1qMoSqYQcROMT9zLwJ86oPofcTH2jBY/5wWOgIw==",
+ "dev": true,
+ "requires": {
+ "fsevents": "2.3.2",
+ "playwright-core": "1.39.0"
+ }
+ },
"playwright-core": {
- "version": "1.34.3",
- "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.34.3.tgz",
- "integrity": "sha512-2pWd6G7OHKemc5x1r1rp8aQcpvDh7goMBZlJv6Co5vCNLVcQJdhxRL09SGaY6HcyHH9aT4tiynZabMofVasBYw==",
+ "version": "1.39.0",
+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.39.0.tgz",
+ "integrity": "sha512-+k4pdZgs1qiM+OUkSjx96YiKsXsmb59evFoqv8SKO067qBA+Z2s/dCzJij/ZhdQcs2zlTAgRKfeiiLm8PQ2qvw==",
"dev": true
},
"postcss": {
- "version": "8.4.25",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.25.tgz",
- "integrity": "sha512-7taJ/8t2av0Z+sQEvNzCkpDynl0tX3uJMCODi6nT3PfASC7dYCWV9aQ+uiCf+KBD4SEFcu+GvJdGdwzQ6OSjCw==",
+ "version": "8.4.31",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
"dev": true,
"requires": {
"nanoid": "^3.3.6",
diff --git a/package.json b/package.json
index 94d10e3415..2eb9a0ecb1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@swedbankpay/design-guide",
- "version": "10.8.5",
+ "version": "10.8.6",
"description": "Swedbank Pay Design Guide",
"main": "src/scripts/main/index.js",
"scripts": {
@@ -61,7 +61,7 @@
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "7.20.2",
"@babel/preset-react": "^7.18.6",
- "@playwright/test": "^1.34.3",
+ "@playwright/test": "^1.39.0",
"@sentry/webpack-plugin": "^1.20.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
diff --git a/src/App/ComponentsDocumentation/__snapshots__/index.test.js.snap b/src/App/ComponentsDocumentation/__snapshots__/index.test.js.snap
index 2d4b6b35bb..68d389bdea 100644
--- a/src/App/ComponentsDocumentation/__snapshots__/index.test.js.snap
+++ b/src/App/ComponentsDocumentation/__snapshots__/index.test.js.snap
@@ -8,7 +8,7 @@ exports[`ComponentsDocumentation: index renders 1`] = `
className="dg-current-version text-uppercase"
>
Design Guide β v.
- 10.8.5
+ 10.8.6
`;
diff --git a/src/App/ComponentsDocumentation/components/Accordion/accordion.e2e.spec.js-snapshots/SwedbankPay-accordions-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Accordion/accordion.e2e.spec.js-snapshots/SwedbankPay-accordions-Mobile-Chrome-darwin.png
index e7622c52cb..ff38a1c34b 100644
Binary files a/src/App/ComponentsDocumentation/components/Accordion/accordion.e2e.spec.js-snapshots/SwedbankPay-accordions-Mobile-Chrome-darwin.png and b/src/App/ComponentsDocumentation/components/Accordion/accordion.e2e.spec.js-snapshots/SwedbankPay-accordions-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Accordion/accordion.e2e.spec.js-snapshots/SwedbankPay-accordions-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Accordion/accordion.e2e.spec.js-snapshots/SwedbankPay-accordions-chromium-darwin.png
index 8d10db36aa..d2c48dc42d 100644
Binary files a/src/App/ComponentsDocumentation/components/Accordion/accordion.e2e.spec.js-snapshots/SwedbankPay-accordions-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Accordion/accordion.e2e.spec.js-snapshots/SwedbankPay-accordions-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Buttons/constants.js b/src/App/ComponentsDocumentation/components/Buttons/constants.js
index d8f54782b7..50d35e1bb3 100644
--- a/src/App/ComponentsDocumentation/components/Buttons/constants.js
+++ b/src/App/ComponentsDocumentation/components/Buttons/constants.js
@@ -289,6 +289,24 @@ export const overviewButtons = {
},
],
},
+ {
+ id: "button-type",
+ title: "Button type",
+ values: [
+ {
+ name: "Primary",
+ value: {
+ type: "primary",
+ },
+ },
+ {
+ name: "Secondary",
+ value: {
+ type: "secondary",
+ },
+ },
+ ],
+ },
],
},
title: "BankID button",
diff --git a/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-button-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-button-Mobile-Chrome-darwin.png
index d3c0ba0922..635a9e264f 100644
Binary files a/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-button-Mobile-Chrome-darwin.png and b/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-button-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-button-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-button-chromium-darwin.png
index 9f218d2f20..06d0627b8c 100644
Binary files a/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-button-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-button-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-Mobile-Chrome-darwin.png
index 313106dc33..4f1e5b6835 100644
Binary files a/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-Mobile-Chrome-darwin.png and b/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-chromium-darwin.png
index 3a19fb4ab6..923cedc13f 100644
Binary files a/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-screen-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-screen-Mobile-Chrome-darwin.png
index cf2beaf8c7..429f153c41 100644
Binary files a/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-screen-Mobile-Chrome-darwin.png and b/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-screen-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-screen-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-screen-chromium-darwin.png
index 37e5a4fc21..cbdb9cafa5 100644
Binary files a/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-screen-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Dialog/dialog.e2e.spec.js-snapshots/SwedbankPay-dialog-modal-screen-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/__snapshots__/index.test.js.snap b/src/App/ComponentsDocumentation/components/Dropdown/__snapshots__/index.test.js.snap
index c2eb637aea..d11dd40a1e 100644
--- a/src/App/ComponentsDocumentation/components/Dropdown/__snapshots__/index.test.js.snap
+++ b/src/App/ComponentsDocumentation/components/Dropdown/__snapshots__/index.test.js.snap
@@ -292,6 +292,18 @@ exports[`Documentation: Dropdown DeveloperDocumentation renders 1`] = `
>
Developer Documentation
+
+ Style
+
+
+ Add
+
+ .no-rotation
+
+ CSS class on the dropdown toggle to disable the icon rotation.
+
JavaScript methods
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/constants.js b/src/App/ComponentsDocumentation/components/Dropdown/constants.js
index 6483b0415e..639a2c4a66 100644
--- a/src/App/ComponentsDocumentation/components/Dropdown/constants.js
+++ b/src/App/ComponentsDocumentation/components/Dropdown/constants.js
@@ -147,7 +147,7 @@ const dropdownSidebarOptions = () => ({
],
},
{
- id: "preffered_position",
+ id: "preferred_position",
title: "Position",
values: [
{
@@ -186,6 +186,19 @@ const dropdownSidebarOptions = () => ({
],
},
],
+ checkbox: [
+ {
+ inputs: [
+ {
+ id: "toggle-icon-rotation",
+ name: "Disable toggle icon rotation",
+ value: {
+ noRotation: true,
+ },
+ },
+ ],
+ },
+ ],
});
export const overviewDropdown = {
@@ -237,7 +250,7 @@ export const overviewDropdown = {
],
},
{
- id: "preffered_position",
+ id: "preferred_position",
title: "Position",
values: [
{
@@ -276,6 +289,19 @@ export const overviewDropdown = {
],
},
],
+ checkbox: [
+ {
+ inputs: [
+ {
+ id: "toggle-icon-rotation",
+ name: "Disable toggle icon rotation",
+ value: {
+ noRotation: true,
+ },
+ },
+ ],
+ },
+ ],
},
title: "Select",
description: (
@@ -485,6 +511,7 @@ export const howToUse = [
icon="filter_list"
iconAfter={false}
largePadding={true}
+ noRotation={true}
/>
+ await (
+ await page.locator(".showcase-panel-advanced").getAttribute("class")
+ ).includes("options-active");
+
+const openOptions = async (page) => {
+ const areOptionsDisplayed = await checkIfOptionsDisplayed(page);
+
+ if (!areOptionsDisplayed) {
+ await page.getByRole("button", { name: "Open options menu" }).click();
+ }
+};
+
+const closeOptions = async (page) => {
+ const areOptionsDisplayed = await checkIfOptionsDisplayed(page);
+
+ if (areOptionsDisplayed) {
+ await page.getByRole("button", { name: "Close options menu" }).click();
+ }
+};
+
+test("Dropdown page exist", async ({ page }) => {
+ await page.goto("http://localhost:3000/");
+ await page
+ .getByRole("link", {
+ name: "Components Find all currently available components here",
+ })
+ .click();
+ await expect(page.getByRole("link", { name: "Dropdown" })).toHaveCount(
+ page.viewportSize().width < 991 ? 1 : 2
+ );
+ await page.getByText("expand_moreDropdownarrow_forward").click();
+ await expect(page).toHaveTitle(/Dropdown/);
+ await expect(
+ page.getByRole("heading", { name: "Dropdown", exact: true, level: 1 })
+ ).toBeVisible();
+});
+test.describe(`dropdown visual regressions`, () => {
+ /**
+ * @type string
+ */
+ let brand;
+ /**
+ * @type {import("@playwright/test").Locator}
+ */
+ let previewContainer;
+
+ test.beforeEach(async ({ page }) => {
+ await page.goto("http://localhost:3000/components/dropdown");
+
+ brand = (await page.title()).includes("Swedbank") ? "SwedbankPay" : "PayEx";
+ previewContainer = await page.locator(".component-preview-content > div");
+ });
+
+ test(`visual regresion dropdown - toggle normal`, async ({ page }) => {
+ await expect(previewContainer).toHaveScreenshot(
+ `${brand}-dropdown-toggle-normal.png`
+ );
+ });
+ test(`visual regresion dropdown - toggle hovered`, async ({ page }) => {
+ await previewContainer.getByRole("button").hover();
+ await expect(previewContainer).toHaveScreenshot(
+ `${brand}-dropdown-toggle-hovered.png`
+ );
+ });
+ test(`visual regresion dropdown - toggle active`, async ({ page }) => {
+ await previewContainer.getByRole("button").click();
+ await expect(previewContainer).toHaveScreenshot(
+ `${brand}-dropdown-toggle-active.png`
+ );
+ });
+ test(`visual regresion dropdown - select dropdown opened`, async ({
+ page,
+ }) => {
+ await previewContainer.getByRole("button").click();
+ await expect(page.locator(".component-preview-content")).toHaveScreenshot(
+ `${brand}-dropdown-select-opened-previewContainer.png`
+ );
+ await expect(
+ previewContainer.getByText(
+ "VISA Mastercard AMEX Maestro card Stripe Vipps Swish"
+ )
+ ).toHaveScreenshot(`${brand}-dropdown-select-opened-dropdownContainer.png`);
+ });
+});
+
+test.describe(`dropdown options behave correctly`, () => {
+ /**
+ * @type string
+ */
+ let brand;
+ /**
+ * @type {import("@playwright/test").Locator}
+ */
+ let previewContainer;
+
+ test.beforeEach(async ({ page }) => {
+ await page.goto("http://localhost:3000/components/dropdown");
+
+ brand = (await page.title()).includes("Swedbank") ? "SwedbankPay" : "PayEx";
+ previewContainer = await page.locator(".component-preview-content > div");
+ });
+
+ test("dropdown options - disable rotation", async ({ page }) => {
+ await expect(previewContainer.getByRole("button")).not.toHaveClass(
+ "no-rotation"
+ );
+ await expect(previewContainer.getByRole("button").locator("i")).toHaveCSS(
+ "transform",
+ "none"
+ );
+ await previewContainer.getByRole("button").click();
+ await expect(previewContainer.getByRole("button").locator("i")).toHaveCSS(
+ "transform",
+ "matrix(-1, 0, 0, -1, 0, 0)"
+ );
+ await previewContainer.getByRole("button").first().click();
+ await expect(previewContainer.getByRole("button").locator("i")).toHaveCSS(
+ "transform",
+ "none"
+ );
+ await openOptions(page);
+ await page
+ .getByLabel("Disable toggle icon rotation")
+ .click({ force: true });
+ await closeOptions(page);
+ await expect(previewContainer.getByRole("button").first()).toHaveClass(
+ /no-rotation/
+ );
+ await previewContainer.getByRole("button").click();
+ await expect(
+ previewContainer.getByRole("button").first().locator("i")
+ ).toHaveCSS("transform", "none");
+ });
+ // TODO: test toggle type
+ test("dropdown options - menu width", async ({ page }) => {
+ const buttonWidth = (
+ await previewContainer.getByRole("button").first().boundingBox()
+ ).width;
+
+ await previewContainer.getByRole("button").first().click();
+ await expect(
+ (
+ await previewContainer.locator(".dropdown-menu").boundingBox()
+ ).width
+ ).not.toBe(buttonWidth);
+ await previewContainer.getByRole("button").first().click();
+ await openOptions(page);
+ await page.getByLabel("Full width").click({ force: true });
+ await closeOptions(page);
+ await previewContainer.getByRole("button").first().click();
+ await expect(
+ (
+ await previewContainer.locator(".dropdown-menu").boundingBox()
+ ).width
+ ).toBe(buttonWidth);
+ });
+ // TODO: test menu position
+ // TODO: test states (error, etc)
+ // TODO: test keyboard navigation
+ // TODO: test accessibility
+ // TODO: test custom content
+ // TODO: test navigation inside modal
+});
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-Mobile-Chrome-darwin.png
new file mode 100644
index 0000000000..1f1ba73d96
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-Mobile-Safari-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-Mobile-Safari-darwin.png
new file mode 100644
index 0000000000..9ae1b5353f
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-Mobile-Safari-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-chromium-darwin.png
new file mode 100644
index 0000000000..f783b9c3bc
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-firefox-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-firefox-darwin.png
new file mode 100644
index 0000000000..787b23fb4b
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-firefox-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-webkit-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-webkit-darwin.png
new file mode 100644
index 0000000000..abbf06a318
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-dropdownContainer-webkit-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-Mobile-Chrome-darwin.png
new file mode 100644
index 0000000000..5454e90d1a
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-Mobile-Safari-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-Mobile-Safari-darwin.png
new file mode 100644
index 0000000000..d1e4492424
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-Mobile-Safari-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-chromium-darwin.png
new file mode 100644
index 0000000000..43ff59b3c8
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-firefox-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-firefox-darwin.png
new file mode 100644
index 0000000000..48fad3f5e6
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-firefox-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-webkit-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-webkit-darwin.png
new file mode 100644
index 0000000000..c66aa36a68
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-select-opened-previewContainer-webkit-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-Mobile-Chrome-darwin.png
new file mode 100644
index 0000000000..365b4d709f
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-Mobile-Safari-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-Mobile-Safari-darwin.png
new file mode 100644
index 0000000000..64d21446e8
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-Mobile-Safari-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-chromium-darwin.png
new file mode 100644
index 0000000000..27800de0d3
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-firefox-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-firefox-darwin.png
new file mode 100644
index 0000000000..3bc547b689
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-firefox-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-webkit-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-webkit-darwin.png
new file mode 100644
index 0000000000..74142915dd
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-active-webkit-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-Mobile-Chrome-darwin.png
new file mode 100644
index 0000000000..af9847cac2
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-Mobile-Safari-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-Mobile-Safari-darwin.png
new file mode 100644
index 0000000000..377dd4941d
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-Mobile-Safari-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-chromium-darwin.png
new file mode 100644
index 0000000000..4a5d987ded
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-firefox-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-firefox-darwin.png
new file mode 100644
index 0000000000..9bf3f88a38
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-firefox-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-webkit-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-webkit-darwin.png
new file mode 100644
index 0000000000..67110fa5ec
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-hovered-webkit-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-Mobile-Chrome-darwin.png
new file mode 100644
index 0000000000..160571b8cf
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-Mobile-Safari-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-Mobile-Safari-darwin.png
new file mode 100644
index 0000000000..d35c8072e9
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-Mobile-Safari-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-chromium-darwin.png
new file mode 100644
index 0000000000..7f0c5e1445
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-firefox-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-firefox-darwin.png
new file mode 100644
index 0000000000..f979c625f4
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-firefox-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-webkit-darwin.png b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-webkit-darwin.png
new file mode 100644
index 0000000000..763693f351
Binary files /dev/null and b/src/App/ComponentsDocumentation/components/Dropdown/dropdown.e2e.spec.js-snapshots/SwedbankPay-dropdown-toggle-normal-webkit-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Dropdown/index.js b/src/App/ComponentsDocumentation/components/Dropdown/index.js
index 5d5fda3473..5f85a025c3 100644
--- a/src/App/ComponentsDocumentation/components/Dropdown/index.js
+++ b/src/App/ComponentsDocumentation/components/Dropdown/index.js
@@ -93,6 +93,11 @@ const ContentGuidelines = () => (
const DeveloperDocumentation = () => (
Developer Documentation
+ Style
+
+ Add CSS class on the
+ dropdown toggle to disable the icon rotation.
+
JavaScript methods
Use to initialize
diff --git a/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-Mobile-Chrome-darwin.png
index eedf459ae7..f526a8b9ac 100644
Binary files a/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-Mobile-Chrome-darwin.png and b/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-chromium-darwin.png
index f51edfcfd2..93f48d9bb9 100644
Binary files a/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-icons-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-icons-Mobile-Chrome-darwin.png
index 6b945a1382..e666679797 100644
Binary files a/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-icons-Mobile-Chrome-darwin.png and b/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-icons-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-icons-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-icons-chromium-darwin.png
index f75aee0f83..b8fbde2971 100644
Binary files a/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-icons-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Expandable/expandable.e2e.spec.js-snapshots/SwedbankPay-expandable-icons-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-danger-toast-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-danger-toast-Mobile-Chrome-darwin.png
index 2c4b6e490e..8d9678a2f3 100644
Binary files a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-danger-toast-Mobile-Chrome-darwin.png and b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-danger-toast-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-danger-toast-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-danger-toast-chromium-darwin.png
index a52a54e8aa..050846bf66 100644
Binary files a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-danger-toast-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-danger-toast-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-neutral-toast-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-neutral-toast-Mobile-Chrome-darwin.png
index a61ddfafda..e30fae1196 100644
Binary files a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-neutral-toast-Mobile-Chrome-darwin.png and b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-neutral-toast-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-neutral-toast-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-neutral-toast-chromium-darwin.png
index 150000374d..9c5ffaaa0f 100644
Binary files a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-neutral-toast-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-neutral-toast-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-success-toast-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-success-toast-Mobile-Chrome-darwin.png
index 4c602f2b7f..2e9e31591d 100644
Binary files a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-success-toast-Mobile-Chrome-darwin.png and b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-success-toast-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-success-toast-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-success-toast-chromium-darwin.png
index b83547ea82..7c80796134 100644
Binary files a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-success-toast-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-success-toast-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-warning-toast-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-warning-toast-Mobile-Chrome-darwin.png
index 5a1d5c0f9b..f4fe883a51 100644
Binary files a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-warning-toast-Mobile-Chrome-darwin.png and b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-warning-toast-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-warning-toast-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-warning-toast-chromium-darwin.png
index a7a960a676..61f4aaeca7 100644
Binary files a/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-warning-toast-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Toast/toast.e2e.spec.js-snapshots/SwedbankPay-warning-toast-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Topbar/index.js b/src/App/ComponentsDocumentation/components/Topbar/index.js
index 9c0311b703..93b17934c5 100644
--- a/src/App/ComponentsDocumentation/components/Topbar/index.js
+++ b/src/App/ComponentsDocumentation/components/Topbar/index.js
@@ -44,6 +44,7 @@ const Overview = () => (
showCasePanel
codeFigure
showCasePanelAdvanced={topbarShowcase}
+ showExpandPreview={true}
/>
When to consider something else
diff --git a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js
index 5955bd156a..9612da40a2 100644
--- a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js
+++ b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js
@@ -9,12 +9,12 @@ test("Topbar page exist", async ({ page }) => {
})
.click();
await expect(page.getByRole("link", { name: "Topbar" })).toHaveCount(
- page.viewportSize().width < 991 ? 1 : 2,
+ page.viewportSize().width < 991 ? 1 : 2
);
await page.getByText("call_to_actionTopbararrow_forward").click();
await expect(page).toHaveTitle(/Topbar/);
await expect(
- page.getByRole("heading", { name: "Topbar", exact: true, level: 1 }),
+ page.getByRole("heading", { name: "Topbar", exact: true, level: 1 })
).toBeVisible();
});
@@ -44,7 +44,9 @@ let brand;
* @param {string} tabBtnText text of the doc preview container tab
*/
const clickDocPreviewTab = async (page, tabBtnText) => {
- await page.getByRole("link", { name: tabBtnText, exact: true }).click();
+ await page
+ .getByRole("link", { name: tabBtnText, exact: true })
+ .click({ force: true });
};
test.describe("visual regressions topbar", () => {
@@ -56,14 +58,14 @@ test.describe("visual regressions topbar", () => {
test(`general UI closed`, async ({ page }) => {
await expect(
- page.getByRole("heading", { name: "Topbar", exact: true }),
+ page.getByRole("heading", { name: "Topbar", exact: true })
).toBeVisible();
for (const topbarTab of topbarTabs) {
clickDocPreviewTab(page, topbarTab.btnText);
await expect(
- page.locator(".component-preview-content > div"),
+ page.locator(".component-preview-content > div")
).toHaveScreenshot(`${brand}-topbar-${topbarTab.name}-closed.png`);
}
});
@@ -77,9 +79,9 @@ test.describe("visual regressions topbar", () => {
await page.locator("#demo-topbar").getByRole("link").nth(2).hover();
await expect(
- page.locator("#demo-topbar").getByRole("navigation"),
+ page.locator("#demo-topbar").getByRole("navigation")
).toHaveScreenshot(
- `${brand}-topbar-${topbarTab.name}-links-ui-feedbacks.png`,
+ `${brand}-topbar-${topbarTab.name}-links-ui-feedbacks.png`
);
}
});
@@ -96,7 +98,7 @@ test.describe("visual regressions topbar", () => {
: page.locator(".component-preview-content > div");
await expect(modalContainer).toHaveScreenshot(
- `${brand}-topbar-${topbarTab.name}-opened.png`,
+ `${brand}-topbar-${topbarTab.name}-opened.png`
);
}
});
@@ -105,7 +107,7 @@ test.describe("visual regressions topbar", () => {
page,
}) => {
for (const topbarTab of topbarTabs.filter(
- (tab) => tab.desktopTopbar && !tab.isLegacy,
+ (tab) => tab.desktopTopbar && !tab.isLegacy
)) {
clickDocPreviewTab(page, topbarTab.btnText);
diff --git a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-desktop-closed-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-desktop-closed-Mobile-Chrome-darwin.png
index d79833ccf7..8735cb3ea8 100644
Binary files a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-desktop-closed-Mobile-Chrome-darwin.png and b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-desktop-closed-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-desktop-closed-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-desktop-closed-chromium-darwin.png
index b300d6ec6e..e6bef28c1b 100644
Binary files a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-desktop-closed-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-desktop-closed-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-desktop-links-ui-feedbacks-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-desktop-links-ui-feedbacks-chromium-darwin.png
index 13acc46157..3292fec76d 100644
Binary files a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-desktop-links-ui-feedbacks-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-desktop-links-ui-feedbacks-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-closed-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-closed-Mobile-Chrome-darwin.png
index d79833ccf7..8735cb3ea8 100644
Binary files a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-closed-Mobile-Chrome-darwin.png and b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-closed-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-closed-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-closed-chromium-darwin.png
index 213b251316..06382dc119 100644
Binary files a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-closed-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-closed-chromium-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-opened-Mobile-Chrome-darwin.png b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-opened-Mobile-Chrome-darwin.png
index 82477f207f..997bdba739 100644
Binary files a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-opened-Mobile-Chrome-darwin.png and b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-opened-Mobile-Chrome-darwin.png differ
diff --git a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-opened-chromium-darwin.png b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-opened-chromium-darwin.png
index 1042a25aef..a51165c33b 100644
Binary files a/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-opened-chromium-darwin.png and b/src/App/ComponentsDocumentation/components/Topbar/topbar.e2e.spec.js-snapshots/SwedbankPay-topbar-legacy-mobile-opened-chromium-darwin.png differ
diff --git a/src/App/Home/constants.js b/src/App/Home/constants.js
index 5e1ec3476f..44c5af138a 100644
--- a/src/App/Home/constants.js
+++ b/src/App/Home/constants.js
@@ -4,6 +4,37 @@ import CodeTags from "@components/CodeTags";
const basename = process.env.basename;
export const changeLogs = [
+ {
+ version: "10.8.6",
+ title: "The one with little handy UI helpers",
+ text: (
+ <>
+ We're back in action, armed with nifty UI helpers π§°ππ.
+
+ Ever find yourself awake at night, sweating, pondering how life would
+ be better if there were a way to disable the icon rotation in the
+ dropdown toggle button when you open it? I know, right?
+
+
+ And what if I told you you could now style those bank-ID buttons as
+ secondary buttons? Isn't that something you've been
+ daydreaming about for years?
+
+
+ But wait, there's more! How about a magical button that
+ transforms your component's preview container into a full-screen
+ extravaganza, delivering the ultimate home-cinema experience for your
+ components? It's like fulfilling a lifelong dream you didn't
+ even know you had since you were a little kid! πΆπ
+
+
+ (for now only enabled for the Topbar component, but if YOU public
+ like it then we'll expand it to the rest π€)
+
+
+ >
+ ),
+ },
{
version: "10.8.5",
title: "The CSS url / Import Patch ππ¨",
diff --git a/src/App/Identity/__snapshots__/index.test.js.snap b/src/App/Identity/__snapshots__/index.test.js.snap
index 7ccb719682..ed14a41156 100644
--- a/src/App/Identity/__snapshots__/index.test.js.snap
+++ b/src/App/Identity/__snapshots__/index.test.js.snap
@@ -8,7 +8,7 @@ exports[`Core: index renders 1`] = `
className="dg-current-version text-uppercase"
>
Design Guide β v.
- 10.8.5
+ 10.8.6
`;
diff --git a/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Desktop-headers-Mobile-Chrome-darwin.png b/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Desktop-headers-Mobile-Chrome-darwin.png
index 3153056950..5f3e207900 100644
Binary files a/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Desktop-headers-Mobile-Chrome-darwin.png and b/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Desktop-headers-Mobile-Chrome-darwin.png differ
diff --git a/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Desktop-headers-chromium-darwin.png b/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Desktop-headers-chromium-darwin.png
index 3153056950..5f3e207900 100644
Binary files a/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Desktop-headers-chromium-darwin.png and b/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Desktop-headers-chromium-darwin.png differ
diff --git a/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Mobile-headers-Mobile-Chrome-darwin.png b/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Mobile-headers-Mobile-Chrome-darwin.png
index 6de20fcc4e..99bb877329 100644
Binary files a/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Mobile-headers-Mobile-Chrome-darwin.png and b/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Mobile-headers-Mobile-Chrome-darwin.png differ
diff --git a/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Mobile-headers-chromium-darwin.png b/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Mobile-headers-chromium-darwin.png
index 6de20fcc4e..99bb877329 100644
Binary files a/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Mobile-headers-chromium-darwin.png and b/src/App/Identity/identity/Typography/typography.e2e.spec.js-snapshots/SwedbankPay-typography-Mobile-headers-chromium-darwin.png differ
diff --git a/src/App/Patterns/__snapshots__/index.test.js.snap b/src/App/Patterns/__snapshots__/index.test.js.snap
index 38cc0cc51a..f5da3d4b72 100644
--- a/src/App/Patterns/__snapshots__/index.test.js.snap
+++ b/src/App/Patterns/__snapshots__/index.test.js.snap
@@ -8,7 +8,7 @@ exports[`Patterns: index renders 1`] = `
className="dg-current-version text-uppercase"
>
Design Guide β v.
- 10.8.5
+ 10.8.6
`;
diff --git a/src/App/Utilities/__snapshots__/index.test.js.snap b/src/App/Utilities/__snapshots__/index.test.js.snap
index bad2478b33..5b9fa49ca9 100644
--- a/src/App/Utilities/__snapshots__/index.test.js.snap
+++ b/src/App/Utilities/__snapshots__/index.test.js.snap
@@ -8,7 +8,7 @@ exports[`Utilities: index renders 1`] = `
className="dg-current-version text-uppercase"
>
Design Guide - v.
- 10.8.5
+ 10.8.6
{
+const DropdownSelect = ({
+ disabled,
+ errorMessage,
+ fullWidth,
+ position,
+ noRotation = false,
+}) => {
const [buttonLabel, setButtonLabel] = useState("Card type");
const cardTypes = [
"VISA",
@@ -28,7 +34,7 @@ const DropdownSelect = ({ disabled, errorMessage, fullWidth, position }) => {
{"\n"}
{
useEffect(() => {
dropdown.init();
@@ -85,7 +92,7 @@ const DropdownToggle = ({
(
<>
{dropdownSelect ? (
@@ -147,6 +155,7 @@ const Dropdown = ({
errorMessage={errorMessage}
fullWidth={fullWidth}
position={position}
+ noRotation={noRotation}
/>
) : (
{
const _removeOuterTag = (element) => {
const div = document.createElement("div");
@@ -214,6 +215,7 @@ const ComponentPreview = ({
.activeOptions
? [...this.props.showCasePanelAdvanced.elements[0].activeOptions]
: [],
+ previewExpanded: false,
};
}
@@ -351,6 +353,16 @@ const ComponentPreview = ({
}
}
+ setExpandedPreview(state) {
+ this.setState({ previewExpanded: state });
+
+ if (state) {
+ document.body.dataset.previewExpandedHasVscroll = "true";
+ } else {
+ delete document.body.dataset.previewExpandedHasVscroll;
+ }
+ }
+
render() {
return (
<>
@@ -358,13 +370,44 @@ const ComponentPreview = ({
id={this.props.showCasePanelAdvanced.id}
className={`showcase-panel showcase-panel-advanced${
this.state.optionsOpen ? " options-active" : ""
- }${this.state.hideOptions ? " hide-options" : ""}`}
+ }${this.state.hideOptions ? " hide-options" : ""}
+ ${this.state.previewExpanded ? " preview-expanded" : ""}`}
>
+ {this.props.showExpandPreview &&
+ (!this.state.previewExpanded ? (
+ this.setExpandedPreview(true)}
+ >
+
+ open_in_full
+
+
+ ) : (
+ this.setExpandedPreview(false)}
+ >
+
+ close_fullscreen
+
+
+ ))}
{this.props.showCasePanelAdvanced.elements.map((element, i) => (
) : (
@@ -608,6 +652,7 @@ ComponentPreview.propTypes = {
codeFigure: PropTypes.bool,
dangerousHTML: PropTypes.bool,
negative: PropTypes.bool,
+ showExpandPreview: PropTypes.bool,
};
export default ComponentPreview;
diff --git a/src/less/components/button.less b/src/less/components/button.less
index 0e2addef66..f5d384170e 100644
--- a/src/less/components/button.less
+++ b/src/less/components/button.less
@@ -85,28 +85,8 @@
background-color: var(--btn-primary-color);
}
- &.btn-bank-id {
- display: flex;
- justify-content: center;
-
- i.bank-id {
- height: 1.5rem;
- width: 1.5rem;
- display: inline-flex;
- background-image: none;
- margin-left: 0.5rem;
- background-color: var(--btn-primary-text-color);
-
- &-no,
- &.no {
- mask-image: url("../../icons/bank-id/bankid_no.svg");
- }
-
- &-se,
- &.se {
- mask-image: url("../../icons/bank-id/bankid_se.svg");
- }
- }
+ &.btn-bank-id i.bank-id {
+ background-color: var(--btn-primary-text-color);
}
}
@@ -125,6 +105,33 @@
box-shadow: inset 0 0 0 3px var(--btn-active-color);
border-color: var(--btn-active-color);
}
+
+ &.btn-bank-id i.bank-id {
+ background-color: var(--btn-secondary-text-color);
+ }
+ }
+
+ &:is(.btn-primary, .btn-secondary).btn-bank-id {
+ display: flex;
+ justify-content: center;
+
+ i.bank-id {
+ height: 1.5rem;
+ width: 1.5rem;
+ display: inline-flex;
+ background-image: none;
+ margin-left: 0.5rem;
+
+ &-no,
+ &.no {
+ mask-image: url("../../icons/bank-id/bankid_no.svg");
+ }
+
+ &-se,
+ &.se {
+ mask-image: url("../../icons/bank-id/bankid_se.svg");
+ }
+ }
}
&.btn-tertiary {
diff --git a/src/less/components/dropdown.less b/src/less/components/dropdown.less
index b83b13b1b6..3e0067a8d5 100644
--- a/src/less/components/dropdown.less
+++ b/src/less/components/dropdown.less
@@ -7,40 +7,40 @@
&.has-error {
.dropdown-toggle {
- border: 2px solid @brand-error;
+ border: 2px solid var(--brand-error);
&:hover,
&:focus,
&:active {
- background-color: @brand-error-light;
- color: @brand-secondary;
- border: 2px solid @brand-error;
+ background-color: var(--brand-error-light);
+ color: var(--brand-secondary);
+ border: 2px solid var(--brand-error);
}
&:focus {
- outline: 1px solid @brand-secondary;
+ outline: 1px solid var(--brand-secondary);
}
i {
- color: @brand-error;
+ color: var(--brand-error);
}
}
}
&.disabled {
.dropdown-toggle {
- background-color: @white;
- color: @secondary-disabled-bg;
- border-color: @secondary-disabled-bg;
+ background-color: var(--white);
+ color: var(--secondary-disabled-bg);
+ border-color: var(--secondary-disabled-bg);
border-width: 1px;
box-shadow: none;
&:hover,
&:active {
cursor: not-allowed;
- background-color: @white;
- color: @secondary-disabled-bg;
- border-color: @secondary-disabled-bg;
+ background-color: var(--white);
+ color: var(--secondary-disabled-bg);
+ border-color: var(--secondary-disabled-bg);
border-width: 1px;
box-shadow: none;
}
@@ -48,8 +48,8 @@
}
&:focus-within .dropdown-toggle {
- background-color: @brand-secondary;
- color: @white;
+ background-color: var(--brand-secondary);
+ color: var(--white);
}
.toggle-menu-container {
@@ -74,7 +74,7 @@
overflow: hidden;
box-shadow: 1px 2px 10px rgba(0, 0, 0, 15%);
border-radius: 4px;
- background-color: @white;
+ background-color: var(--white);
display: none;
width: max-content;
padding: 5px;
@@ -101,7 +101,7 @@
text-decoration: none;
white-space: nowrap;
align-items: center;
- color: @brand-secondary;
+ color: var(--brand-secondary);
border-radius: 4px;
cursor: pointer;
@@ -111,12 +111,12 @@
&:hover {
text-decoration: none;
- background-color: @light-gray;
+ background-color: var(--light-gray);
}
&:focus {
text-decoration: none;
- outline: 2px solid @brand-secondary;
+ outline: 2px solid var(--brand-secondary);
}
}
}
@@ -133,15 +133,15 @@
touch-action: manipulation;
cursor: pointer;
line-height: 1rem;
- border: 1px solid @brand-secondary;
+ border: 1px solid var(--brand-secondary);
white-space: nowrap;
height: 60px;
border-radius: var(--border-radius);
font-size: 1.125rem;
padding: 12px 16px;
user-select: none;
- background-color: @white;
- color: @brand-secondary;
+ background-color: var(--white);
+ color: var(--brand-secondary);
&:hover {
box-shadow: inset 0 0 0 3px var(--btn-secondary-hover);
@@ -159,11 +159,11 @@
user-select: none;
border-radius: 2px;
background-color: transparent;
- color: @brand-secondary;
+ color: var(--brand-secondary);
display: flex;
padding: 0;
border: 0;
- outline: 0 solid @brand-secondary;
+ outline: 0 solid var(--brand-secondary);
&:not(.material-icons) {
padding: 0.7rem;
@@ -178,10 +178,10 @@
&.active {
.dropdown-toggle {
- background: @brand-secondary;
- color: @white;
+ background: var(--brand-secondary);
+ color: var(--white);
- & i {
+ &:not(.no-rotation) i {
transform: rotate(180deg);
transition: transform 0.3s ease;
}
@@ -210,8 +210,8 @@
}
&.has-error .help-block {
- color: @brand-error;
- border-color: @brand-error;
+ color: var(--brand-error);
+ border-color: var(--brand-error);
}
}
diff --git a/src/less/documentation-swedbankpay.less b/src/less/documentation-swedbankpay.less
index 85a3b0240e..e8b0f30a1e 100644
--- a/src/less/documentation-swedbankpay.less
+++ b/src/less/documentation-swedbankpay.less
@@ -2,6 +2,8 @@
@import "global.less";
#designguide {
+ --fullscreen-z-index: 10000;
+
display: flex;
flex-direction: column;
min-height: 100%;
@@ -156,10 +158,79 @@
}
}
- // NOTE: This is not used for anything but including the image in the build [EH]
- // #mail_icon {
- // background: url("../img/swedbankpaymail.png");
- // }
+ .glow-on-hover {
+ cursor: pointer;
+ position: relative;
+ z-index: 0;
+
+ &:before {
+ content: "";
+ background: linear-gradient(
+ 45deg,
+ #ff0000,
+ #ff7300,
+ #fffb00,
+ #48ff00,
+ #00ffd5,
+ #002bff,
+ #7a00ff,
+ #ff00c8,
+ #ff0000
+ );
+ position: absolute;
+ top: -2px;
+ left: -2px;
+ background-size: 400%;
+ z-index: -1;
+ filter: blur(5px);
+ width: calc(100% + 4px);
+ height: calc(100% + 4px);
+ animation: glowing 20s linear infinite;
+ opacity: 0;
+ transition: opacity 0.3s ease-in-out;
+ }
+
+ &:hover:before {
+ opacity: 1;
+ }
+
+ &:after {
+ z-index: -1;
+ content: "";
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ left: 0;
+ top: 0;
+ background-color: inherit;
+ border-radius: inherit;
+ }
+
+ @keyframes glowing {
+ 0% {
+ background-position: 0 0;
+ }
+
+ 50% {
+ background-position: 400% 0;
+ }
+
+ 100% {
+ background-position: 0 0;
+ }
+ }
+ }
+}
+
+@supports selector(:has(a, b)) {
+ body[data-preview-expanded-has-vscroll]:has(#designguide) {
+ overflow: hidden;
+ }
+}
+@supports not selector(:has(a, b)) {
+ body[data-preview-expanded-has-vscroll] {
+ overflow: hidden;
+ }
}
.search-container {
@@ -947,6 +1018,13 @@
border-color: transparent;
}
}
+
+ > button[aria-label^="Expand"],
+ > button[aria-label^="Zoom"] {
+ width: 30px;
+ height: 30px;
+ margin: 4px;
+ }
}
.options-open {
@@ -1074,6 +1152,16 @@
}
}
}
+
+ &.preview-expanded {
+ position: fixed;
+ width: 100vw;
+ left: 0;
+ z-index: var(--fullscreen-z-index, 10000);
+ top: 0;
+ height: 100vh;
+ margin: 0;
+ }
}
.icon-preview {
diff --git a/src/less/variables-swedbankpay.less b/src/less/variables-swedbankpay.less
index 351449b7bb..1d0b68ef79 100644
--- a/src/less/variables-swedbankpay.less
+++ b/src/less/variables-swedbankpay.less
@@ -176,6 +176,9 @@
--brand-secondary-light-2: var(--brown-soft, #a38b80);
--brand-secondary-light-3: var(--brown-light, #d4c4bc);
+ // Grayscale
+ --light-gray: #f9f8f6;
+
// Brown scale colors
// Text colors
@@ -189,6 +192,10 @@
// System colors
--brand-error: #b5111a;
+ --brand-error-light: #fceee9;
+
+ // Button colors
+ --secondary-disabled-bg: #e3d1c3;
// Universal utilities
--border-radius: 8px;