diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/ArraySelection/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/ArraySelection/Examples.tsx index bf29b3dd6d9..8e715fcc226 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/ArraySelection/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/base-fields/ArraySelection/Examples.tsx @@ -303,6 +303,26 @@ export const CheckboxButtonEmpty = () => ( ) +export const CheckboxButtonHorizontalOptionsLayout = () => ( + + console.log('onChange', values)} + > + + + + + + + + + +) + export const ButtonLabel = () => ( + +#### Button with checkbox variant + + diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/ArraySelection.tsx b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/ArraySelection.tsx index 8fe4d53b67f..7847100352e 100644 --- a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/ArraySelection.tsx +++ b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/ArraySelection.tsx @@ -144,8 +144,6 @@ function ArraySelection(props: Props) { value={{ status: hasError ? 'error' : undefined, disabled, - variant: - variant === 'checkbox-button' ? 'checkbox' : 'default', }} > {options} @@ -235,6 +233,7 @@ export function useCheckboxOrToggleOptions({ { - setupPageScreenshot({ - url: '/uilib/extensions/forms/base-fields/ArraySelection/demos', - }) +describe.each(['ui', 'sbanken'])( + 'ArraySelection field for %s', + (themeName) => { + setupPageScreenshot({ + pageViewport: { + width: 600, + }, + themeName, + url: '/uilib/extensions/forms/base-fields/ArraySelection/demos', + }) - describe('checkbox', () => { - it('have to match checkbox-options-vertical', async () => { - const screenshot = await makeScreenshot({ - selector: - '[data-visual-test="array-selection-checkbox-options-vertical"]', + describe('checkbox', () => { + it('have to match checkbox-options-vertical', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="array-selection-checkbox-options-vertical"]', + }) + expect(screenshot).toMatchImageSnapshot() }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match checkbox-options-horizontal', async () => { - const screenshot = await makeScreenshot({ - selector: - '[data-visual-test="array-selection-checkbox-options-horizontal"]', + it('have to match checkbox-options-horizontal', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="array-selection-checkbox-options-horizontal"]', + }) + expect(screenshot).toMatchImageSnapshot() }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match checkbox-horizontal', async () => { - const screenshot = await makeScreenshot({ - selector: - '[data-visual-test="array-selection-checkbox-horizontal"]', + it('have to match checkbox-horizontal', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="array-selection-checkbox-horizontal"]', + }) + expect(screenshot).toMatchImageSnapshot() }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match checkbox-horizontal-layout', async () => { - const screenshot = await makeScreenshot({ - selector: - '[data-visual-test="array-selection-checkbox-horizontal-layout"]', + it('have to match checkbox-horizontal-layout', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="array-selection-checkbox-horizontal-layout"]', + }) + expect(screenshot).toMatchImageSnapshot() }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match checkbox-help', async () => { - const screenshot = await makeScreenshot({ - selector: '[data-visual-test="array-selection-checkbox-help"]', + it('have to match checkbox-help', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="array-selection-checkbox-help"]', + }) + expect(screenshot).toMatchImageSnapshot() }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match checkbox-nesting-logic', async () => { - const screenshot = await makeScreenshot({ - selector: - '[data-visual-test="array-selection-checkbox-nesting-logic"]', - simulate: 'click', - simulateSelector: - '[data-visual-test="array-selection-checkbox-nesting-logic"] .dnb-checkbox:nth-of-type(2) input', - recalculateHeightAfterSimulate: true, + it('have to match checkbox-nesting-logic', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="array-selection-checkbox-nesting-logic"]', + simulate: 'click', + simulateSelector: + '[data-visual-test="array-selection-checkbox-nesting-logic"] .dnb-checkbox:nth-of-type(2) input', + recalculateHeightAfterSimulate: true, + }) + expect(screenshot).toMatchImageSnapshot() }) - expect(screenshot).toMatchImageSnapshot() }) - }) - describe('button', () => { - it('have to match button-options-vertical', async () => { - const screenshot = await makeScreenshot({ - selector: - '[data-visual-test="array-selection-button-options-vertical"]', + describe('button', () => { + it('have to match button-options-vertical', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="array-selection-button-options-vertical"]', + }) + expect(screenshot).toMatchImageSnapshot() }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match button-options-horizontal', async () => { - const screenshot = await makeScreenshot({ - selector: - '[data-visual-test="array-selection-button-options-horizontal"]', + it('have to match button-options-horizontal', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="array-selection-button-options-horizontal"]', + }) + expect(screenshot).toMatchImageSnapshot() }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match button-horizontal', async () => { - const screenshot = await makeScreenshot({ - selector: '[data-visual-test="array-selection-button-horizontal"]', + it('have to match button-horizontal', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="array-selection-button-horizontal"]', + }) + expect(screenshot).toMatchImageSnapshot() }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match button-horizontal-layout', async () => { - const screenshot = await makeScreenshot({ - selector: - '[data-visual-test="array-selection-button-horizontal-layout"]', + it('have to match button-horizontal-layout', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="array-selection-button-horizontal-layout"]', + }) + expect(screenshot).toMatchImageSnapshot() }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match button-help', async () => { - const screenshot = await makeScreenshot({ - selector: '[data-visual-test="array-selection-button-help"]', + it('have to match button-help', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="array-selection-button-help"]', + }) + expect(screenshot).toMatchImageSnapshot() }) - expect(screenshot).toMatchImageSnapshot() - }) - it('have to match button-nesting-logic', async () => { - const screenshot = await makeScreenshot({ - selector: - '[data-visual-test="array-selection-button-nesting-logic"]', - simulate: 'click', - simulateSelector: - '[data-visual-test="array-selection-button-nesting-logic"] .dnb-toggle-button:nth-of-type(2) button', - recalculateHeightAfterSimulate: true, + it('have to match button-nesting-logic', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="array-selection-button-nesting-logic"]', + simulate: 'click', + simulateSelector: + '[data-visual-test="array-selection-button-nesting-logic"] .dnb-toggle-button:nth-of-type(2) button', + recalculateHeightAfterSimulate: true, + }) + expect(screenshot).toMatchImageSnapshot() }) - expect(screenshot).toMatchImageSnapshot() }) - }) - describe('checkbox-button', () => { - it('have to match simple checkbox-button', async () => { - const screenshot = await makeScreenshot({ - selector: '[data-visual-test="array-selection-checkbox-button"]', + describe('checkbox-button', () => { + it('have to match simple checkbox-button', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="array-selection-checkbox-button"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + + it('have to match checkbox-button-options-horizontal', async () => { + const screenshot = await makeScreenshot({ + selector: + '[data-visual-test="array-selection-checkbox-button-options-horizontal"]', + }) + expect(screenshot).toMatchImageSnapshot() }) - expect(screenshot).toMatchImageSnapshot() }) - }) -}) + } +) diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-nesting-logic.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-nesting-logic.snap.png deleted file mode 100644 index f8a852ee0a8..00000000000 Binary files a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-nesting-logic.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-options-horizontal.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-options-horizontal.snap.png deleted file mode 100644 index 604c775a1bf..00000000000 Binary files a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-options-horizontal.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-horizontal-layout.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-horizontal-layout.snap.png deleted file mode 100644 index 1e34223d1d7..00000000000 Binary files a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-horizontal-layout.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-horizontal.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-horizontal.snap.png deleted file mode 100644 index f3f4a87a414..00000000000 Binary files a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-horizontal.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-nesting-logic.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-nesting-logic.snap.png deleted file mode 100644 index 7e86881b2bb..00000000000 Binary files a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-nesting-logic.snap.png and /dev/null differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-help.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-help.snap.png new file mode 100644 index 00000000000..ea447d2aa48 Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-help.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-horizontal-layout.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-horizontal-layout.snap.png new file mode 100644 index 00000000000..ea7ba29a90f Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-horizontal-layout.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-horizontal.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-horizontal.snap.png new file mode 100644 index 00000000000..da999712d41 Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-horizontal.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-nesting-logic.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-nesting-logic.snap.png new file mode 100644 index 00000000000..66964d4f840 Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-nesting-logic.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-options-horizontal.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-options-horizontal.snap.png new file mode 100644 index 00000000000..a5bdd3e07bf Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-options-horizontal.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-options-vertical.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-options-vertical.snap.png new file mode 100644 index 00000000000..70376b2b3d9 Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-button-have-to-match-button-options-vertical.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-button-have-to-match-checkbox-button-options-horizontal.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-button-have-to-match-checkbox-button-options-horizontal.snap.png new file mode 100644 index 00000000000..7bcd4b68e86 Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-button-have-to-match-checkbox-button-options-horizontal.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-button-have-to-match-simple-checkbox-button.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-button-have-to-match-simple-checkbox-button.snap.png new file mode 100644 index 00000000000..d4361013c89 Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-button-have-to-match-simple-checkbox-button.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-help.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-help.snap.png new file mode 100644 index 00000000000..59b6fa105cc Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-help.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-horizontal-layout.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-horizontal-layout.snap.png new file mode 100644 index 00000000000..5949fd629cc Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-horizontal-layout.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-horizontal.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-horizontal.snap.png new file mode 100644 index 00000000000..508d0cdd1dd Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-horizontal.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-nesting-logic.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-nesting-logic.snap.png new file mode 100644 index 00000000000..2595c39bb4a Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-nesting-logic.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-options-horizontal.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-options-horizontal.snap.png new file mode 100644 index 00000000000..e04eb1804ce Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-options-horizontal.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-options-vertical.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-options-vertical.snap.png new file mode 100644 index 00000000000..71037f98c3c Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-sbanken-checkbox-have-to-match-checkbox-options-vertical.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-help.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-help.snap.png similarity index 100% rename from packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-help.snap.png rename to packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-help.snap.png diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-horizontal-layout.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-horizontal-layout.snap.png similarity index 100% rename from packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-horizontal-layout.snap.png rename to packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-horizontal-layout.snap.png diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-horizontal.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-horizontal.snap.png similarity index 100% rename from packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-horizontal.snap.png rename to packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-horizontal.snap.png diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-nesting-logic.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-nesting-logic.snap.png new file mode 100644 index 00000000000..1cfb751926c Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-nesting-logic.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-options-horizontal.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-options-horizontal.snap.png new file mode 100644 index 00000000000..0d485e9ccab Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-options-horizontal.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-options-vertical.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-options-vertical.snap.png similarity index 100% rename from packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-options-vertical.snap.png rename to packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-button-have-to-match-button-options-vertical.snap.png diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-button-have-to-match-checkbox-button-options-horizontal.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-button-have-to-match-checkbox-button-options-horizontal.snap.png new file mode 100644 index 00000000000..e9c5a8ed659 Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-button-have-to-match-checkbox-button-options-horizontal.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-button-have-to-match-simple-checkbox-button.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-button-have-to-match-simple-checkbox-button.snap.png similarity index 100% rename from packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-button-have-to-match-simple-checkbox-button.snap.png rename to packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-button-have-to-match-simple-checkbox-button.snap.png diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-help.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-help.snap.png similarity index 100% rename from packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-help.snap.png rename to packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-help.snap.png diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-horizontal-layout.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-horizontal-layout.snap.png new file mode 100644 index 00000000000..bec66c16821 Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-horizontal-layout.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-horizontal.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-horizontal.snap.png new file mode 100644 index 00000000000..eed4fedad10 Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-horizontal.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-nesting-logic.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-nesting-logic.snap.png new file mode 100644 index 00000000000..2bf7fdefab3 Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-nesting-logic.snap.png differ diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-options-horizontal.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-options-horizontal.snap.png similarity index 100% rename from packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-options-horizontal.snap.png rename to packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-options-horizontal.snap.png diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-options-vertical.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-options-vertical.snap.png similarity index 100% rename from packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-options-vertical.snap.png rename to packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-options-vertical.snap.png diff --git a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/style/dnb-array-selection.scss b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/style/dnb-array-selection.scss index 1d1b4116ea2..8840fdf1f09 100644 --- a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/style/dnb-array-selection.scss +++ b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/style/dnb-array-selection.scss @@ -2,6 +2,10 @@ .dnb-forms-field-array-selection { --row-gap: var(--spacing-x-small); + &--variant-button#{&}--options-layout-horizontal { + --row-gap: var(--spacing-small); + } + &--options-layout-vertical &__options { display: flex; flex-flow: column;