@arbor-education/design-system.components 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/button/Button.d.ts +5 -2
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +3 -1
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/card/Card.d.ts +1 -2
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/card/Card.js +3 -3
- package/dist/components/card/Card.js.map +1 -1
- package/dist/components/card/Card.test.js +0 -5
- package/dist/components/card/Card.test.js.map +1 -1
- package/dist/components/formField/FormField.d.ts +4 -0
- package/dist/components/formField/FormField.d.ts.map +1 -1
- package/dist/components/formField/FormField.js +2 -1
- package/dist/components/formField/FormField.js.map +1 -1
- package/dist/components/formField/FormField.stories.d.ts.map +1 -1
- package/dist/components/formField/FormField.stories.js +3 -1
- package/dist/components/formField/FormField.stories.js.map +1 -1
- package/dist/components/formField/FormField.test.js +5 -0
- package/dist/components/formField/FormField.test.js.map +1 -1
- package/dist/components/formField/inputs/checkbox/CheckboxInput.d.ts +7 -0
- package/dist/components/formField/inputs/checkbox/CheckboxInput.d.ts.map +1 -0
- package/dist/components/formField/inputs/checkbox/CheckboxInput.js +31 -0
- package/dist/components/formField/inputs/checkbox/CheckboxInput.js.map +1 -0
- package/dist/components/formField/inputs/checkbox/CheckboxInput.stories.d.ts +17 -0
- package/dist/components/formField/inputs/checkbox/CheckboxInput.stories.d.ts.map +1 -0
- package/dist/components/formField/inputs/checkbox/CheckboxInput.stories.js +19 -0
- package/dist/components/formField/inputs/checkbox/CheckboxInput.stories.js.map +1 -0
- package/dist/components/formField/inputs/checkbox/CheckboxInput.test.d.ts +2 -0
- package/dist/components/formField/inputs/checkbox/CheckboxInput.test.d.ts.map +1 -0
- package/dist/components/formField/inputs/checkbox/CheckboxInput.test.js +30 -0
- package/dist/components/formField/inputs/checkbox/CheckboxInput.test.js.map +1 -0
- package/dist/components/formField/inputs/dropdown/Dropdown.d.ts +11 -0
- package/dist/components/formField/inputs/dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/formField/inputs/dropdown/Dropdown.js +43 -0
- package/dist/components/formField/inputs/dropdown/Dropdown.js.map +1 -0
- package/dist/components/formField/inputs/dropdown/Dropdown.stories.d.ts +161 -0
- package/dist/components/formField/inputs/dropdown/Dropdown.stories.d.ts.map +1 -0
- package/dist/components/formField/inputs/dropdown/Dropdown.stories.js +172 -0
- package/dist/components/formField/inputs/dropdown/Dropdown.stories.js.map +1 -0
- package/dist/components/formField/inputs/dropdown/Dropdown.test.d.ts +2 -0
- package/dist/components/formField/inputs/dropdown/Dropdown.test.d.ts.map +1 -0
- package/dist/components/formField/inputs/dropdown/Dropdown.test.js +93 -0
- package/dist/components/formField/inputs/dropdown/Dropdown.test.js.map +1 -0
- package/dist/components/formField/inputs/dropdown/buttons/dropdownButton/DropdownButton.d.ts +11 -0
- package/dist/components/formField/inputs/dropdown/buttons/dropdownButton/DropdownButton.d.ts.map +1 -0
- package/dist/components/formField/inputs/dropdown/buttons/dropdownButton/DropdownButton.js +15 -0
- package/dist/components/formField/inputs/dropdown/buttons/dropdownButton/DropdownButton.js.map +1 -0
- package/dist/components/formField/inputs/dropdown/items/DropdownItemRenderer.d.ts +10 -0
- package/dist/components/formField/inputs/dropdown/items/DropdownItemRenderer.d.ts.map +1 -0
- package/dist/components/formField/inputs/dropdown/items/DropdownItemRenderer.js +12 -0
- package/dist/components/formField/inputs/dropdown/items/DropdownItemRenderer.js.map +1 -0
- package/dist/components/formField/inputs/dropdown/items/dropdownItem/DropdownItem.d.ts +9 -0
- package/dist/components/formField/inputs/dropdown/items/dropdownItem/DropdownItem.d.ts.map +1 -0
- package/dist/components/formField/inputs/dropdown/items/dropdownItem/DropdownItem.js +17 -0
- package/dist/components/formField/inputs/dropdown/items/dropdownItem/DropdownItem.js.map +1 -0
- package/dist/components/formField/inputs/dropdown/items/dropdownMultiLineItem/DropdownMultiLineItem.d.ts +7 -0
- package/dist/components/formField/inputs/dropdown/items/dropdownMultiLineItem/DropdownMultiLineItem.d.ts.map +1 -0
- package/dist/components/formField/inputs/dropdown/items/dropdownMultiLineItem/DropdownMultiLineItem.js +16 -0
- package/dist/components/formField/inputs/dropdown/items/dropdownMultiLineItem/DropdownMultiLineItem.js.map +1 -0
- package/dist/components/formField/inputs/dropdown/wrapper/DropdownWrapper.d.ts +16 -0
- package/dist/components/formField/inputs/dropdown/wrapper/DropdownWrapper.d.ts.map +1 -0
- package/dist/components/formField/inputs/dropdown/wrapper/DropdownWrapper.js +73 -0
- package/dist/components/formField/inputs/dropdown/wrapper/DropdownWrapper.js.map +1 -0
- package/dist/components/formField/inputs/number/NumberInput.d.ts +6 -0
- package/dist/components/formField/inputs/number/NumberInput.d.ts.map +1 -0
- package/dist/components/formField/inputs/number/NumberInput.js +39 -0
- package/dist/components/formField/inputs/number/NumberInput.js.map +1 -0
- package/dist/components/formField/inputs/number/NumberInput.stories.d.ts +20 -0
- package/dist/components/formField/inputs/number/NumberInput.stories.d.ts.map +1 -0
- package/dist/components/formField/inputs/number/NumberInput.stories.js +22 -0
- package/dist/components/formField/inputs/number/NumberInput.stories.js.map +1 -0
- package/dist/components/formField/inputs/number/NumberInput.test.d.ts +2 -0
- package/dist/components/formField/inputs/number/NumberInput.test.d.ts.map +1 -0
- package/dist/components/formField/inputs/number/NumberInput.test.js +30 -0
- package/dist/components/formField/inputs/number/NumberInput.test.js.map +1 -0
- package/dist/components/formField/inputs/radio/RadioButtonInput.d.ts +7 -0
- package/dist/components/formField/inputs/radio/RadioButtonInput.d.ts.map +1 -0
- package/dist/components/formField/inputs/radio/RadioButtonInput.js +9 -0
- package/dist/components/formField/inputs/radio/RadioButtonInput.js.map +1 -0
- package/dist/components/formField/inputs/radio/RadioButtonInput.stories.d.ts +46 -0
- package/dist/components/formField/inputs/radio/RadioButtonInput.stories.d.ts.map +1 -0
- package/dist/components/formField/inputs/radio/RadioButtonInput.stories.js +83 -0
- package/dist/components/formField/inputs/radio/RadioButtonInput.stories.js.map +1 -0
- package/dist/components/formField/inputs/radio/RadioButtonInput.test.d.ts +2 -0
- package/dist/components/formField/inputs/radio/RadioButtonInput.test.d.ts.map +1 -0
- package/dist/components/formField/inputs/radio/RadioButtonInput.test.js +34 -0
- package/dist/components/formField/inputs/radio/RadioButtonInput.test.js.map +1 -0
- package/dist/components/heading/Heading.d.ts +392 -388
- package/dist/components/heading/Heading.d.ts.map +1 -1
- package/dist/components/heading/Heading.js +8 -1
- package/dist/components/heading/Heading.js.map +1 -1
- package/dist/components/heading/Heading.stories.d.ts.map +1 -1
- package/dist/components/heading/Heading.stories.js +7 -8
- package/dist/components/heading/Heading.stories.js.map +1 -1
- package/dist/components/heading/HeadingInnerContainer.d.ts +2 -2
- package/dist/components/heading/HeadingInnerContainer.js +4 -4
- package/dist/components/icon/Icon.d.ts +2 -2
- package/dist/components/icon/Icon.d.ts.map +1 -1
- package/dist/components/icon/Icon.js.map +1 -1
- package/dist/components/icon/Icon.stories.d.ts +7 -0
- package/dist/components/icon/Icon.stories.d.ts.map +1 -1
- package/dist/components/icon/Icon.stories.js +8 -0
- package/dist/components/icon/Icon.stories.js.map +1 -1
- package/dist/components/icon/allowedIcons.d.ts +1 -0
- package/dist/components/icon/allowedIcons.d.ts.map +1 -1
- package/dist/components/section/Section.d.ts +18 -0
- package/dist/components/section/Section.d.ts.map +1 -0
- package/dist/components/section/Section.js +36 -0
- package/dist/components/section/Section.js.map +1 -0
- package/dist/components/section/Section.stories.d.ts +18 -0
- package/dist/components/section/Section.stories.d.ts.map +1 -0
- package/dist/components/section/Section.stories.js +27 -0
- package/dist/components/section/Section.stories.js.map +1 -0
- package/dist/components/section/Section.test.d.ts +2 -0
- package/dist/components/section/Section.test.d.ts.map +1 -0
- package/dist/components/section/Section.test.js +157 -0
- package/dist/components/section/Section.test.js.map +1 -0
- package/dist/components/slideover/Slideover.d.ts +11 -0
- package/dist/components/slideover/Slideover.d.ts.map +1 -0
- package/dist/components/slideover/Slideover.js +11 -0
- package/dist/components/slideover/Slideover.js.map +1 -0
- package/dist/components/slideover/Slideover.test.d.ts +2 -0
- package/dist/components/slideover/Slideover.test.d.ts.map +1 -0
- package/dist/components/slideover/Slideover.test.js +33 -0
- package/dist/components/slideover/Slideover.test.js.map +1 -0
- package/dist/components/slideoverManager/SlideoverManager.d.ts +7 -0
- package/dist/components/slideoverManager/SlideoverManager.d.ts.map +1 -0
- package/dist/components/slideoverManager/SlideoverManager.js +29 -0
- package/dist/components/slideoverManager/SlideoverManager.js.map +1 -0
- package/dist/components/slideoverManager/SlideoverManager.stories.d.ts +15 -0
- package/dist/components/slideoverManager/SlideoverManager.stories.d.ts.map +1 -0
- package/dist/components/slideoverManager/SlideoverManager.stories.js +102 -0
- package/dist/components/slideoverManager/SlideoverManager.stories.js.map +1 -0
- package/dist/components/slideoverManager/SlideoverManager.test.d.ts +2 -0
- package/dist/components/slideoverManager/SlideoverManager.test.d.ts.map +1 -0
- package/dist/components/slideoverManager/SlideoverManager.test.js +53 -0
- package/dist/components/slideoverManager/SlideoverManager.test.js.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +14 -18
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +6 -39
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/tabs/Tabs.stories.d.ts +35 -6
- package/dist/components/tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.stories.js +17 -45
- package/dist/components/tabs/Tabs.stories.js.map +1 -1
- package/dist/components/tabs/Tabs.test.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.test.js +90 -97
- package/dist/components/tabs/Tabs.test.js.map +1 -1
- package/dist/components/tabs/TabsItem.d.ts +15 -0
- package/dist/components/tabs/TabsItem.d.ts.map +1 -0
- package/dist/components/tabs/TabsItem.js +18 -0
- package/dist/components/tabs/TabsItem.js.map +1 -0
- package/dist/components/tabs/TabsItem.stories.d.ts +618 -0
- package/dist/components/tabs/TabsItem.stories.d.ts.map +1 -0
- package/dist/components/tabs/TabsItem.stories.js +48 -0
- package/dist/components/tabs/TabsItem.stories.js.map +1 -0
- package/dist/index.css +1996 -1326
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/Constants.d.ts +6 -0
- package/dist/utils/Constants.d.ts.map +1 -0
- package/dist/utils/Constants.js +6 -0
- package/dist/utils/Constants.js.map +1 -0
- package/dist/utils/PopupParentContext.d.ts +3 -0
- package/dist/utils/PopupParentContext.d.ts.map +1 -0
- package/dist/utils/PopupParentContext.js +6 -0
- package/dist/utils/PopupParentContext.js.map +1 -0
- package/dist/utils/PubSub.d.ts +11 -0
- package/dist/utils/PubSub.d.ts.map +1 -0
- package/dist/utils/PubSub.js +27 -0
- package/dist/utils/PubSub.js.map +1 -0
- package/dist/utils/PubSub.test.d.ts +2 -0
- package/dist/utils/PubSub.test.d.ts.map +1 -0
- package/dist/utils/PubSub.test.js +229 -0
- package/dist/utils/PubSub.test.js.map +1 -0
- package/dist/utils/SlideoverUtils.d.ts +7 -0
- package/dist/utils/SlideoverUtils.d.ts.map +1 -0
- package/dist/utils/SlideoverUtils.js +8 -0
- package/dist/utils/SlideoverUtils.js.map +1 -0
- package/dist/utils/getDefaultPopupParent.d.ts +2 -0
- package/dist/utils/getDefaultPopupParent.d.ts.map +1 -0
- package/dist/utils/getDefaultPopupParent.js +13 -0
- package/dist/utils/getDefaultPopupParent.js.map +1 -0
- package/dist/utils/hooks/useComponentDidMount.d.ts +3 -0
- package/dist/utils/hooks/useComponentDidMount.d.ts.map +1 -0
- package/dist/utils/hooks/useComponentDidMount.js +5 -0
- package/dist/utils/hooks/useComponentDidMount.js.map +1 -0
- package/dist/utils/hooks/usePubSub.d.ts +2 -0
- package/dist/utils/hooks/usePubSub.d.ts.map +1 -0
- package/dist/utils/hooks/usePubSub.js +12 -0
- package/dist/utils/hooks/usePubSub.js.map +1 -0
- package/package.json +3 -3
- package/src/components/button/Button.story.tsx +9 -0
- package/src/components/button/Button.tsx +10 -2
- package/src/components/button/button.scss +75 -33
- package/src/components/card/Card.test.tsx +0 -6
- package/src/components/card/Card.tsx +12 -7
- package/src/components/card/card.scss +32 -18
- package/src/components/formField/FormField.stories.tsx +9 -1
- package/src/components/formField/FormField.test.tsx +6 -0
- package/src/components/formField/FormField.tsx +5 -0
- package/src/components/formField/formField.scss +20 -8
- package/src/components/formField/inputs/checkbox/CheckboxInput.stories.tsx +22 -0
- package/src/components/formField/inputs/checkbox/CheckboxInput.test.tsx +35 -0
- package/src/components/formField/inputs/checkbox/CheckboxInput.tsx +79 -0
- package/src/components/formField/inputs/checkbox/checkboxInput.scss +96 -0
- package/src/components/formField/inputs/dropdown/Dropdown.stories.tsx +185 -0
- package/src/components/formField/inputs/dropdown/Dropdown.test.tsx +185 -0
- package/src/components/formField/inputs/dropdown/Dropdown.tsx +82 -0
- package/src/components/formField/inputs/dropdown/buttons/dropdownButton/DropdownButton.tsx +41 -0
- package/src/components/formField/inputs/dropdown/buttons/dropdownButton/dropdownButton.scss +12 -0
- package/src/components/formField/inputs/dropdown/dropdown.scss +24 -0
- package/src/components/formField/inputs/dropdown/items/DropdownItemRenderer.tsx +38 -0
- package/src/components/formField/inputs/dropdown/items/dropdownItem/DropdownItem.tsx +49 -0
- package/src/components/formField/inputs/dropdown/items/dropdownItem/dropdownItem.scss +62 -0
- package/src/components/formField/inputs/dropdown/items/dropdownMultiLineItem/DropdownMultiLineItem.tsx +48 -0
- package/src/components/formField/inputs/dropdown/items/dropdownMultiLineItem/dropdownMultiLineItem.scss +52 -0
- package/src/components/formField/inputs/dropdown/wrapper/DropdownWrapper.tsx +138 -0
- package/src/components/formField/inputs/dropdown/wrapper/dropdownWrapper.scss +32 -0
- package/src/components/formField/inputs/input.scss +25 -26
- package/src/components/formField/inputs/number/NumberInput.stories.tsx +25 -0
- package/src/components/formField/inputs/number/NumberInput.test.tsx +33 -0
- package/src/components/formField/inputs/number/NumberInput.tsx +107 -0
- package/src/components/formField/inputs/number/numberInput.scss +68 -0
- package/src/components/formField/inputs/radio/RadioButtonInput.stories.tsx +97 -0
- package/src/components/formField/inputs/radio/RadioButtonInput.test.tsx +37 -0
- package/src/components/formField/inputs/radio/RadioButtonInput.tsx +46 -0
- package/src/components/formField/inputs/radio/radioButtonInput.scss +100 -0
- package/src/components/formField/label/label.scss +5 -1
- package/src/components/heading/Heading.stories.tsx +11 -12
- package/src/components/heading/Heading.tsx +21 -2
- package/src/components/heading/heading.scss +4 -0
- package/src/components/icon/Icon.stories.tsx +8 -0
- package/src/components/icon/Icon.tsx +2 -2
- package/src/components/icon/allowedIcons.tsx +2 -0
- package/src/components/pill/pill.scss +7 -7
- package/src/components/section/Section.stories.tsx +34 -0
- package/src/components/section/Section.test.tsx +308 -0
- package/src/components/section/Section.tsx +131 -0
- package/src/components/section/section.scss +42 -0
- package/src/components/slideover/Slideover.test.tsx +36 -0
- package/src/components/slideover/Slideover.tsx +38 -0
- package/src/components/slideover/slideover.scss +50 -0
- package/src/components/slideoverManager/SlideoverManager.stories.tsx +374 -0
- package/src/components/slideoverManager/SlideoverManager.test.tsx +64 -0
- package/src/components/slideoverManager/SlideoverManager.tsx +51 -0
- package/src/components/slideoverManager/slideoverManager.scss +13 -0
- package/src/components/tabs/Tabs.stories.tsx +92 -0
- package/src/components/tabs/Tabs.test.tsx +220 -0
- package/src/components/tabs/Tabs.tsx +14 -0
- package/src/components/tabs/TabsItem.stories.tsx +55 -0
- package/src/components/tabs/TabsItem.tsx +42 -0
- package/src/components/tabs/tabs.scss +62 -0
- package/src/global.scss +10 -1
- package/src/index.scss +15 -3
- package/src/index.ts +10 -3
- package/src/tokens.scss +1321 -1238
- package/src/utils/Constants.ts +5 -0
- package/src/utils/PopupParentContext.ts +6 -0
- package/src/utils/PubSub.test.ts +303 -0
- package/src/utils/PubSub.ts +34 -0
- package/src/utils/SlideoverUtils.ts +9 -0
- package/src/utils/getDefaultPopupParent.ts +14 -0
- package/src/utils/hooks/useComponentDidMount.ts +5 -0
- package/src/utils/hooks/usePubSub.ts +12 -0
- package/tokens/export-config.json +32 -0
- package/tokens/json/$metadata.json +5 -0
- package/tokens/json/$themes.json +1333 -0
- package/tokens/json/Arbor.json +6329 -0
- package/src/components/heading/HeadingInnerContainer.tsx +0 -18
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
.ds-number-input__container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
padding: var(--form-field-spacing-vertical) var(--form-field-spacing-padding-x);
|
|
7
|
+
gap: var(--form-field-spacing-horizontal) var(--form-field-spacing-vertical-gap);
|
|
8
|
+
border-radius: var(--form-field-radius);
|
|
9
|
+
border: var(--border-weight) solid var(--form-field-text-placeholder-color-border);
|
|
10
|
+
background: var(--form-field-text-placeholder-color-background);
|
|
11
|
+
|
|
12
|
+
&:active {
|
|
13
|
+
border-color: var(--form-field-text-focus-color-border);
|
|
14
|
+
background: var(--form-field-text-focus-color-background);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&:hover:not(:focus-within) {
|
|
18
|
+
border-color: var(--form-field-text-hover-color-border);
|
|
19
|
+
background: var(--form-field-text-hover-color-background);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:focus-within:not(:active) {
|
|
23
|
+
border-color: var(--form-field-text-focus-color-border);
|
|
24
|
+
background: var(--form-field-text-focus-color-background);
|
|
25
|
+
outline: var(--focus-border) solid var(--form-field-text-focus-color-border);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&--disabled {
|
|
29
|
+
background: var(--form-field-text-disabled-color-background);
|
|
30
|
+
border-color: var(--form-field-text-disabled-color-border);
|
|
31
|
+
cursor: not-allowed;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&--error {
|
|
36
|
+
border-color: var(--form-field-text-error-color-border);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ds-number-input {
|
|
40
|
+
text-align: center;
|
|
41
|
+
border: none;
|
|
42
|
+
flex: 1;
|
|
43
|
+
padding: 0;
|
|
44
|
+
color: var(--form-field-text-default-color-text);
|
|
45
|
+
|
|
46
|
+
&:focus {
|
|
47
|
+
outline: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ds-number-input__spinner-button {
|
|
52
|
+
display: flex;
|
|
53
|
+
border: none;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
background: none;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
align-items: center;
|
|
58
|
+
width: var(--icon-size-medium);
|
|
59
|
+
height: var(--icon-size-medium);
|
|
60
|
+
color: var(--form-field-icon-default-color-icon);
|
|
61
|
+
padding: 0;
|
|
62
|
+
|
|
63
|
+
&:disabled {
|
|
64
|
+
color: var(--form-field-icon-disabled-color-icon);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { fn } from 'storybook/test';
|
|
3
|
+
|
|
4
|
+
import { RadioButtonInput } from './RadioButtonInput';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Components/FormField/Inputs/RadioButton',
|
|
8
|
+
component: RadioButtonInput,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'centered',
|
|
11
|
+
},
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
args: {
|
|
14
|
+
onChange: fn(),
|
|
15
|
+
},
|
|
16
|
+
argTypes: {
|
|
17
|
+
checked: {
|
|
18
|
+
control: 'boolean',
|
|
19
|
+
description: 'Whether the radio button is checked',
|
|
20
|
+
},
|
|
21
|
+
disabled: {
|
|
22
|
+
control: 'boolean',
|
|
23
|
+
description: 'Disable the radio button',
|
|
24
|
+
},
|
|
25
|
+
hasError: {
|
|
26
|
+
control: 'boolean',
|
|
27
|
+
description: 'Show error state',
|
|
28
|
+
},
|
|
29
|
+
label: {
|
|
30
|
+
control: 'text',
|
|
31
|
+
description: 'Label text for the radio button',
|
|
32
|
+
},
|
|
33
|
+
name: {
|
|
34
|
+
control: 'text',
|
|
35
|
+
description: 'Name attribute for the radio button group',
|
|
36
|
+
},
|
|
37
|
+
value: {
|
|
38
|
+
control: 'text',
|
|
39
|
+
description: 'Value attribute for the radio button',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
} satisfies Meta<typeof RadioButtonInput>;
|
|
43
|
+
|
|
44
|
+
export default meta;
|
|
45
|
+
type Story = StoryObj<typeof meta>;
|
|
46
|
+
|
|
47
|
+
// Default radio button
|
|
48
|
+
export const Default: Story = {
|
|
49
|
+
args: {
|
|
50
|
+
name: 'example',
|
|
51
|
+
value: 'option1',
|
|
52
|
+
label: 'Option 1',
|
|
53
|
+
checked: false,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// Checked radio button
|
|
58
|
+
export const Checked: Story = {
|
|
59
|
+
args: {
|
|
60
|
+
name: 'example',
|
|
61
|
+
value: 'option1',
|
|
62
|
+
label: 'Option 1',
|
|
63
|
+
checked: true,
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// Disabled radio button
|
|
68
|
+
export const Disabled: Story = {
|
|
69
|
+
args: {
|
|
70
|
+
name: 'example',
|
|
71
|
+
value: 'option1',
|
|
72
|
+
label: 'Option 1',
|
|
73
|
+
disabled: true,
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
// Disabled and checked
|
|
78
|
+
export const DisabledChecked: Story = {
|
|
79
|
+
args: {
|
|
80
|
+
name: 'example',
|
|
81
|
+
value: 'option1',
|
|
82
|
+
label: 'Option 1',
|
|
83
|
+
disabled: true,
|
|
84
|
+
checked: true,
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// Radio button group example
|
|
89
|
+
export const RadioGroup: Story = {
|
|
90
|
+
render: () => (
|
|
91
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.75rem' }}>
|
|
92
|
+
<RadioButtonInput name="group" value="option1" label="Option 1" />
|
|
93
|
+
<RadioButtonInput name="group" value="option2" label="Option 2" checked />
|
|
94
|
+
<RadioButtonInput name="group" value="option3" label="Option 3" />
|
|
95
|
+
</div>
|
|
96
|
+
),
|
|
97
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { expect, test, describe, vi } from 'vitest';
|
|
2
|
+
import { RadioButtonInput } from './RadioButtonInput';
|
|
3
|
+
import { render, screen, fireEvent } from '@testing-library/react';
|
|
4
|
+
import '@testing-library/jest-dom/vitest';
|
|
5
|
+
|
|
6
|
+
describe('RadioButtonInput component', () => {
|
|
7
|
+
test('renders radio button element', () => {
|
|
8
|
+
render(<RadioButtonInput name="test" value="option1" label="Option 1" />);
|
|
9
|
+
const radio = screen.getByRole('radio', { name: 'Option 1' });
|
|
10
|
+
expect(radio).toBeInTheDocument();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test('renders with label', () => {
|
|
14
|
+
render(<RadioButtonInput name="test" value="option1" label="Option 1" />);
|
|
15
|
+
expect(screen.getByText('Option 1')).toBeInTheDocument();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('calls onChange when radio is clicked', () => {
|
|
19
|
+
const onChange = vi.fn();
|
|
20
|
+
render(<RadioButtonInput name="test" value="option1" label="Option 1" onChange={onChange} />);
|
|
21
|
+
const radio = screen.getByRole('radio', { name: 'Option 1' });
|
|
22
|
+
fireEvent.click(radio);
|
|
23
|
+
expect(onChange).toHaveBeenCalled();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('applies checked state', () => {
|
|
27
|
+
render(<RadioButtonInput name="test" value="option1" label="Option 1" checked />);
|
|
28
|
+
const radio = screen.getByRole('radio', { name: 'Option 1' }) as HTMLInputElement;
|
|
29
|
+
expect(radio.checked).toBe(true);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
test('applies disabled state', () => {
|
|
33
|
+
render(<RadioButtonInput name="test" value="option1" label="Option 1" disabled />);
|
|
34
|
+
const radio = screen.getByRole('radio', { name: 'Option 1' }) as HTMLInputElement;
|
|
35
|
+
expect(radio.disabled).toBe(true);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { type InputHTMLAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export type RadioButtonInputProps = {
|
|
5
|
+
label?: string;
|
|
6
|
+
hasError?: boolean;
|
|
7
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'type'>;
|
|
8
|
+
|
|
9
|
+
export const RadioButtonInput = (props: RadioButtonInputProps) => {
|
|
10
|
+
const {
|
|
11
|
+
label,
|
|
12
|
+
hasError,
|
|
13
|
+
className = '',
|
|
14
|
+
disabled = false,
|
|
15
|
+
checked = false,
|
|
16
|
+
id,
|
|
17
|
+
name,
|
|
18
|
+
value,
|
|
19
|
+
onChange,
|
|
20
|
+
...rest
|
|
21
|
+
} = props;
|
|
22
|
+
|
|
23
|
+
const containerClasses = classNames(
|
|
24
|
+
'ds-radio-button-input__container',
|
|
25
|
+
className,
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<label className={containerClasses}>
|
|
30
|
+
<input
|
|
31
|
+
type="radio"
|
|
32
|
+
id={id}
|
|
33
|
+
name={name}
|
|
34
|
+
value={value}
|
|
35
|
+
checked={checked}
|
|
36
|
+
disabled={disabled}
|
|
37
|
+
onChange={onChange}
|
|
38
|
+
className="ds-radio-button-input__input"
|
|
39
|
+
aria-invalid={hasError}
|
|
40
|
+
{...rest}
|
|
41
|
+
/>
|
|
42
|
+
<span className="ds-radio-button-input__indicator" />
|
|
43
|
+
{label && <span className="ds-radio-button-input__text">{label}</span>}
|
|
44
|
+
</label>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
.ds-radio-button-input__container {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: var(--checkbox-or-radio-button-group-spacing-gap-horizontal);
|
|
6
|
+
position: relative;
|
|
7
|
+
|
|
8
|
+
&:focus-within {
|
|
9
|
+
outline: var(--focus-border) solid var(--color-brand-500);
|
|
10
|
+
border-radius: var(--checkbox-radius);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ds-radio-button-input__input {
|
|
14
|
+
position: absolute;
|
|
15
|
+
appearance: none;
|
|
16
|
+
background-color: #fff;
|
|
17
|
+
margin: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ds-radio-button-input__text {
|
|
21
|
+
flex: 1 0 0;
|
|
22
|
+
font-size: var(--type-body-p-size);
|
|
23
|
+
font-weight: var(--type-body-p-weight);
|
|
24
|
+
color: var(--checkbox-default-color-text);
|
|
25
|
+
line-height: var(--line-height-default);
|
|
26
|
+
user-select: none;
|
|
27
|
+
|
|
28
|
+
&--disabled {
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
color: var(--checkbox-or-radio-button-group-disabled-color-text);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ds-radio-button-input__indicator {
|
|
35
|
+
position: relative;
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
width: 1rem;
|
|
40
|
+
height: 1rem;
|
|
41
|
+
border: var(--border-weight) solid var(--checkbox-or-radio-button-group-default-color-border);
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
background-color: var(--checkbox-or-radio-button-group-default-color-background);
|
|
44
|
+
transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
|
|
47
|
+
&::after {
|
|
48
|
+
content: '';
|
|
49
|
+
position: absolute;
|
|
50
|
+
width: 0.625rem;
|
|
51
|
+
height: 0.625rem;
|
|
52
|
+
border-radius: 50%;
|
|
53
|
+
background-color: transparent;
|
|
54
|
+
transition: background-color 0.2s;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
.ds-radio-button-input__input:checked + .ds-radio-button-input__indicator {
|
|
60
|
+
border-color: var(--checkbox-or-radio-button-group-selected-color-border);
|
|
61
|
+
background-color: var(--checkbox-or-radio-button-group-selected-color-background);
|
|
62
|
+
|
|
63
|
+
&::after {
|
|
64
|
+
background-color: var(--checkbox-or-radio-button-group-selected-color-check);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ds-radio-button-input__input:disabled + .ds-radio-button-input__indicator {
|
|
69
|
+
border-color: var(--checkbox-or-radio-button-group-disabled-color-border);
|
|
70
|
+
background-color: var(--checkbox-or-radio-button-group-disabled-color-background);
|
|
71
|
+
cursor: not-allowed;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.ds-radio-button-input__input:checked:disabled + .ds-radio-button-input__indicator {
|
|
75
|
+
&::after {
|
|
76
|
+
background-color: var(--checkbox-or-radio-button-group-disabled-color-check);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:hover:not(:has(.ds-radio-button-input__input:disabled)) {
|
|
81
|
+
.ds-radio-button-input__indicator {
|
|
82
|
+
border-color: var(--checkbox-or-radio-button-group-hover-color-border);
|
|
83
|
+
background-color: var(--checkbox-or-radio-button-group-hover-color-background);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ds-radio-button-input__label {
|
|
87
|
+
color: var(--checkbox-or-radio-button-group-hover-color-text);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ds-radio-button-input__input:checked + .ds-radio-button-input__indicator {
|
|
91
|
+
border-color: var(--checkbox-or-radio-button-group-selected-hover-color-border);
|
|
92
|
+
background-color: var(--checkbox-or-radio-button-group-selected-hover-color-background);
|
|
93
|
+
|
|
94
|
+
&::after {
|
|
95
|
+
background-color: var(--checkbox-or-radio-button-group-selected-hover-color-check);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
font-weight: var(--font-weight-bold);
|
|
5
5
|
color: var(--form-field-label-color-text);
|
|
6
6
|
line-height: 150%;
|
|
7
|
-
margin-bottom: var(--form-field-spacing-
|
|
7
|
+
margin-bottom: var(--form-field-spacing-vertical);
|
|
8
8
|
display: block;
|
|
9
|
+
|
|
10
|
+
&:has(+ .ds-form-field__description) {
|
|
11
|
+
margin-bottom: var(--form-field-spacing-vertical-gap);
|
|
12
|
+
}
|
|
9
13
|
}
|
|
@@ -2,7 +2,6 @@ import type { Meta } from '@storybook/react-vite';
|
|
|
2
2
|
import { Heading } from './Heading';
|
|
3
3
|
import { Button } from '../button/Button';
|
|
4
4
|
import { Icon } from '../icon/Icon';
|
|
5
|
-
import { HeadingInnerContainer } from './HeadingInnerContainer';
|
|
6
5
|
|
|
7
6
|
const meta: Meta<typeof Heading> = {
|
|
8
7
|
title: 'Components/Heading',
|
|
@@ -18,7 +17,7 @@ export const Default = {
|
|
|
18
17
|
|
|
19
18
|
export const FloatingChildren = {
|
|
20
19
|
args: {
|
|
21
|
-
children: [<
|
|
20
|
+
children: [<Heading.InnerContainer key={1}>Text floating left</Heading.InnerContainer>, <span key={2}>Text floating right</span>],
|
|
22
21
|
level: 1,
|
|
23
22
|
},
|
|
24
23
|
};
|
|
@@ -27,13 +26,13 @@ export const HeadingWithSingleButton = {
|
|
|
27
26
|
args: {
|
|
28
27
|
level: 1,
|
|
29
28
|
children: [
|
|
30
|
-
<
|
|
31
|
-
<
|
|
29
|
+
<Heading.InnerContainer key={1}>Heading</Heading.InnerContainer>,
|
|
30
|
+
<Heading.InnerContainer key={2}>
|
|
32
31
|
<Button>
|
|
33
32
|
<Icon name="info" />
|
|
34
33
|
Button Text
|
|
35
34
|
</Button>
|
|
36
|
-
</
|
|
35
|
+
</Heading.InnerContainer>,
|
|
37
36
|
],
|
|
38
37
|
},
|
|
39
38
|
};
|
|
@@ -42,8 +41,8 @@ export const HeadingWithMultipleButtons = {
|
|
|
42
41
|
args: {
|
|
43
42
|
level: 1,
|
|
44
43
|
children: [
|
|
45
|
-
<
|
|
46
|
-
<
|
|
44
|
+
<Heading.InnerContainer key={1}>Heading</Heading.InnerContainer>,
|
|
45
|
+
<Heading.InnerContainer key={2} className="medium-spacing-gap">
|
|
47
46
|
<Button type="secondary">
|
|
48
47
|
<Icon name="info" />
|
|
49
48
|
Button Text
|
|
@@ -52,7 +51,7 @@ export const HeadingWithMultipleButtons = {
|
|
|
52
51
|
<Icon name="info" />
|
|
53
52
|
Button Text
|
|
54
53
|
</Button>
|
|
55
|
-
</
|
|
54
|
+
</Heading.InnerContainer>,
|
|
56
55
|
],
|
|
57
56
|
},
|
|
58
57
|
};
|
|
@@ -61,14 +60,14 @@ export const HeadingWithButtonsBothSides = {
|
|
|
61
60
|
args: {
|
|
62
61
|
level: 1,
|
|
63
62
|
children: [
|
|
64
|
-
<
|
|
63
|
+
<Heading.InnerContainer key={1} className="medium-spacing-gap">
|
|
65
64
|
<Button type="tertiary">
|
|
66
65
|
<Icon name="chevron-left" />
|
|
67
66
|
Button Text
|
|
68
67
|
</Button>
|
|
69
68
|
Heading
|
|
70
|
-
</
|
|
71
|
-
<
|
|
69
|
+
</Heading.InnerContainer>,
|
|
70
|
+
<Heading.InnerContainer key={2} className="medium-spacing-gap">
|
|
72
71
|
<Button type="secondary">
|
|
73
72
|
<Icon name="info" />
|
|
74
73
|
Button Text
|
|
@@ -77,7 +76,7 @@ export const HeadingWithButtonsBothSides = {
|
|
|
77
76
|
<Icon name="info" />
|
|
78
77
|
Button Text
|
|
79
78
|
</Button>
|
|
80
|
-
</
|
|
79
|
+
</Heading.InnerContainer>,
|
|
81
80
|
],
|
|
82
81
|
},
|
|
83
82
|
};
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { createElement, type HTMLAttributes, type HTMLProps } from 'react';
|
|
3
|
+
|
|
4
|
+
type HeadingSubContainerProps = HTMLAttributes<HTMLSpanElement>;
|
|
5
|
+
|
|
6
|
+
const HeadingInnerContainer = (props: HeadingSubContainerProps) => {
|
|
7
|
+
const { className, ...rest } = props;
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<span
|
|
11
|
+
className={classNames(
|
|
12
|
+
'ds-heading__inner-container',
|
|
13
|
+
className,
|
|
14
|
+
)}
|
|
15
|
+
{...rest}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
2
19
|
|
|
3
20
|
type HeadingProps = {
|
|
4
21
|
level?: 1 | 2 | 3 | 4;
|
|
@@ -13,5 +30,7 @@ export const Heading = (props: HeadingProps) => {
|
|
|
13
30
|
4: 'h4',
|
|
14
31
|
}[level];
|
|
15
32
|
|
|
16
|
-
return createElement(Component, { className: 'ds-heading',
|
|
33
|
+
return createElement(Component, { ...props, className: classNames('ds-heading', props.className) }, children);
|
|
17
34
|
};
|
|
35
|
+
|
|
36
|
+
Heading.InnerContainer = HeadingInnerContainer;
|
|
@@ -20,6 +20,7 @@ h1 {
|
|
|
20
20
|
font-family: var(--type-headings-h1-family);
|
|
21
21
|
font-size: var(--type-headings-h1-size);
|
|
22
22
|
font-weight: var(--type-headings-h1-weight);
|
|
23
|
+
line-height: var(--type-headings-h1-line-height);
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -28,6 +29,7 @@ h2 {
|
|
|
28
29
|
font-family: var(--type-headings-h2-family);
|
|
29
30
|
font-size: var(--type-headings-h2-size);
|
|
30
31
|
font-weight: var(--type-headings-h2-weight);
|
|
32
|
+
line-height: var(--type-headings-h2-line-height);
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
|
|
@@ -36,6 +38,7 @@ h3 {
|
|
|
36
38
|
font-family: var(--type-headings-h3-family);
|
|
37
39
|
font-size: var(--type-headings-h3-size);
|
|
38
40
|
font-weight: var(--type-headings-h3-weight);
|
|
41
|
+
line-height: var(--type-headings-h3-line-height);
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
|
|
@@ -44,5 +47,6 @@ h4 {
|
|
|
44
47
|
font-family: var(--type-headings-h4-family);
|
|
45
48
|
font-size: var(--type-headings-h4-size);
|
|
46
49
|
font-weight: var(--type-headings-h4-weight);
|
|
50
|
+
line-height: var(--type-headings-h4-line-height);
|
|
47
51
|
}
|
|
48
52
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Meta } from '@storybook/react-vite';
|
|
2
2
|
import { Icon } from './Icon';
|
|
3
|
+
import { allowedIcons } from './allowedIcons';
|
|
3
4
|
|
|
4
5
|
const meta: Meta<typeof Icon> = {
|
|
5
6
|
title: 'Components/Icon',
|
|
@@ -11,6 +12,13 @@ export const Default = {
|
|
|
11
12
|
name: '3-dot',
|
|
12
13
|
size: 16,
|
|
13
14
|
},
|
|
15
|
+
argTypes: {
|
|
16
|
+
name: {
|
|
17
|
+
control: 'select',
|
|
18
|
+
description: 'Icon name',
|
|
19
|
+
options: Object.keys(allowedIcons),
|
|
20
|
+
},
|
|
21
|
+
},
|
|
14
22
|
};
|
|
15
23
|
|
|
16
24
|
export default meta;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { IconSize } from './types';
|
|
2
|
-
import { allowedIcons } from './allowedIcons';
|
|
2
|
+
import { allowedIcons, type IconName } from './allowedIcons';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
|
|
5
5
|
type IconProps = {
|
|
6
6
|
size?: IconSize;
|
|
7
7
|
color?: string;
|
|
8
8
|
screenReaderText?: string;
|
|
9
|
-
name:
|
|
9
|
+
name: IconName;
|
|
10
10
|
className?: string;
|
|
11
11
|
ariaLabel?: string;
|
|
12
12
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
.ds-pill {
|
|
2
2
|
display: flex;
|
|
3
|
-
padding: var(--tag-spacing-
|
|
3
|
+
padding: var(--tag-spacing-vertical) var(--tag-spacing-horizontal);
|
|
4
4
|
align-items: center;
|
|
5
|
-
gap: var(--tag-spacing-gap-
|
|
6
|
-
border-radius: var(--tag-radius
|
|
5
|
+
gap: var(--tag-spacing-gap-horizontal);
|
|
6
|
+
border-radius: var(--tag-radius);
|
|
7
7
|
flex-grow: 0;
|
|
8
8
|
width: fit-content;
|
|
9
9
|
|
|
10
10
|
/* typography/body/p1-reg */
|
|
11
11
|
font-family: var(--type-body-p-family, Inter);
|
|
12
|
-
font-size: var(--type-body-p-size
|
|
12
|
+
font-size: var(--type-body-p-size);
|
|
13
13
|
font-style: normal;
|
|
14
|
-
font-weight: var(--type-body-p-weight
|
|
14
|
+
font-weight: var(--type-body-p-weight);
|
|
15
15
|
line-height: 150%; /* 19.5px */
|
|
16
16
|
|
|
17
17
|
&--orange {
|
|
18
|
-
color: var(--tag-category-orange-color-text
|
|
19
|
-
background: var(--tag-category-orange-color-background
|
|
18
|
+
color: var(--tag-category-orange-color-text);
|
|
19
|
+
background: var(--tag-category-orange-color-background);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
&--blue {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/react-vite';
|
|
2
|
+
import { Section } from './Section';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof Section> = {
|
|
5
|
+
title: 'Components/Section',
|
|
6
|
+
component: Section,
|
|
7
|
+
globals: {
|
|
8
|
+
backgrounds: { value: 'dark' },
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const Default = {
|
|
13
|
+
args: {
|
|
14
|
+
title: 'titleValue',
|
|
15
|
+
children: [<p key={1}>Sunt consectetur esse labore dolor consequat tempor dolor incididunt. Ullamco veniam ex enim consequat esse. Qui aute consequat dolore dolore ipsum commodo magna minim consectetur deserunt veniam in ipsum. Aute veniam do mollit cupidatat laboris. Laborum nisi est qui et eiusmod. Enim aliqua quis officia ut eiusmod quis dolore id commodo ipsum cillum sunt adipisicing laboris. Et non est sunt cillum ipsum.</p>],
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const NestedSections = {
|
|
20
|
+
args: {
|
|
21
|
+
title: 'Parent Section',
|
|
22
|
+
collapsible: true,
|
|
23
|
+
children: [
|
|
24
|
+
<Section key={1} title="Sub-section 1" collapsible>
|
|
25
|
+
<p>Eu nisi dolore qui irure irure nulla aliqua commodo non sint dolor consectetur. Ullamco dolore ut exercitation ad cupidatat ipsum. Nisi proident esse nisi ullamco irure incididunt eiusmod fugiat est culpa Lorem. Dolor esse ut minim magna. In qui fugiat non nulla eu mollit enim excepteur consequat qui consequat occaecat aliquip adipisicing. Eu est nisi irure laboris culpa amet consectetur irure quis duis.</p>
|
|
26
|
+
</Section>,
|
|
27
|
+
<Section key={2} title="Sub-section 2" collapsible>
|
|
28
|
+
<p>Eu nisi dolore qui irure irure nulla aliqua commodo non sint dolor consectetur. Ullamco dolore ut exercitation ad cupidatat ipsum. Nisi proident esse nisi ullamco irure incididunt eiusmod fugiat est culpa Lorem. Dolor esse ut minim magna. In qui fugiat non nulla eu mollit enim excepteur consequat qui consequat occaecat aliquip adipisicing. Eu est nisi irure laboris culpa amet consectetur irure quis duis.</p>
|
|
29
|
+
</Section>,
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default meta;
|