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: 800,
+ },
+ 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__/ArraySelection.test.tsx b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/ArraySelection.test.tsx
index be5edd80569..4e8309e78c1 100644
--- a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/ArraySelection.test.tsx
+++ b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/ArraySelection.test.tsx
@@ -776,6 +776,22 @@ describe('ArraySelection', () => {
})
})
+ it('should render button element', () => {
+ render(
+
+ Foo
+ Bar
+
+ )
+
+ const [first, second] = Array.from(
+ document.querySelectorAll('.dnb-toggle-button')
+ )
+
+ expect(first.querySelector('.dnb-button').tagName).toBe('BUTTON')
+ expect(second.querySelector('.dnb-button').tagName).toBe('BUTTON')
+ })
+
describe('ARIA', () => {
it('should validate with ARIA rules', async () => {
const result = render(
@@ -818,7 +834,7 @@ describe('ArraySelection', () => {
it('should have aria-invalid', () => {
render(
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-button-have-to-match-button-help.snap.png
deleted file mode 100644
index e1033f1ad48..00000000000
Binary files a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-help.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-horizontal-layout.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-horizontal-layout.snap.png
deleted file mode 100644
index 6279d4367a7..00000000000
Binary files a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-horizontal-layout.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-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-vertical.snap.png b/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-options-vertical.snap.png
deleted file mode 100644
index de3bbf7293c..00000000000
Binary files a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-options-vertical.snap.png and /dev/null 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-checkbox-button-have-to-match-simple-checkbox-button.snap.png
deleted file mode 100644
index 084fd63cc83..00000000000
Binary files a/packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-button-have-to-match-simple-checkbox-button.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-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..659f9a86992
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..a14775e7925
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..9864b6b6220
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..cf7615c65d4
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..10631612f7c
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..33772925a1c
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..11c2ae590e6
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..25b147b7376
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..31aedacece5
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..d581ead3e7e
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-field-for-ui-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
new file mode 100644
index 00000000000..ac116ac22b4
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-help.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-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
new file mode 100644
index 00000000000..49274f523cc
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-horizontal-layout.snap.png differ
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..7ef61454252
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-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
similarity index 100%
rename from packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-button-have-to-match-button-options-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-options-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-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
new file mode 100644
index 00000000000..b2cfee0dcf5
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-vertical.snap.png differ
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..ec254db3572
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-field-for-ui-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
new file mode 100644
index 00000000000..aabed7f2444
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-simple-checkbox-button.snap.png differ
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..c1a203749b2
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..d14400fa174
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-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
similarity index 100%
rename from packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-checkbox-have-to-match-checkbox-nesting-logic.snap.png
rename to packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/__tests__/__image_snapshots__/arrayselection-field-for-ui-checkbox-have-to-match-checkbox-nesting-logic.snap.png
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..ab9c3f749d2 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 {
+ --row-gap: var(--spacing-small);
+ }
+
&--options-layout-vertical &__options {
display: flex;
flex-flow: column;
@@ -12,9 +16,6 @@
align-items: flex-start;
}
}
- &--variant-checkbox#{&}--layout-horizontal &__options {
- row-gap: 0;
- }
&--variant-button#{&}--options-layout-vertical#{&}--layout-horizontal {
.dnb-forms-field-block__label {
line-height: 2.5rem;
@@ -30,7 +31,6 @@
@include allAbove(small) {
.dnb-forms-field-block--layout-horizontal .dnb-form-label {
- line-height: 2.5rem;
margin-bottom: 0;
}
}