@digigov/ui 0.31.0 → 0.32.1
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/CHANGELOG.md +21 -1
- package/admin/AutoComplete/index.mdx +8 -30
- package/admin/CopyToClipboard/CopyToClipboard.stories.playwright.json +2 -2
- package/admin/CopyToClipboard/index.mdx +1 -5
- package/admin/Drawer/__stories__/Default.js +2 -6
- package/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
- package/admin/Dropdown/__stories__/AlignRight.js +1 -2
- package/admin/Dropdown/__stories__/Default.js +1 -3
- package/admin/Dropdown/__stories__/PlacementTop.js +1 -2
- package/admin/Dropdown/index.mdx +3 -15
- package/admin/Modal/Modal.stories.playwright.json +37 -0
- package/admin/Modal/__stories__/AlertDialog.js +36 -12
- package/admin/Modal/__stories__/Default.js +34 -10
- package/admin/Modal/index.mdx +1 -5
- package/app/Footer/Footer.mdx +3 -14
- package/app/Header/index.mdx +3 -16
- package/app/QrCodeViewer/index.mdx +1 -5
- package/core/Accordion/Accordion.stories.playwright.json +2 -2
- package/core/Accordion/index.mdx +2 -10
- package/core/Button/__stories__/GroupingButtons.d.ts +1 -0
- package/core/Button/__stories__/GroupingButtons.js +4 -2
- package/core/Button/__stories__/GroupingButtonsAndLinks.d.ts +1 -0
- package/core/Button/__stories__/GroupingButtonsAndLinks.js +4 -2
- package/core/Button/__stories__/Warning.d.ts +1 -0
- package/core/Button/__stories__/Warning.js +4 -2
- package/core/Button/index.mdx +4 -20
- package/core/Card/card.mdx +7 -35
- package/core/Checkbox/checkbox.mdx +6 -30
- package/core/DateInputContainer/index.mdx +4 -20
- package/core/ErrorSummary/ErrorSummary.stories.playwright.json +1 -1
- package/core/ErrorSummary/index.mdx +3 -15
- package/core/FileUpload/index.mdx +1 -5
- package/core/Link/link.mdx +4 -20
- package/core/List/index.mdx +1 -5
- package/core/NavList/NavList.stories.d.ts +1 -5
- package/core/NavList/NavList.stories.js +4 -60
- package/core/NavList/NavListAuto/NavListBaseAuto.js +1 -3
- package/core/NavList/NavListAuto/NavListItemAnchorAuto.d.ts +0 -2
- package/core/NavList/NavListAuto/NavListItemAnchorAuto.js +2 -5
- package/core/NavList/NavListAuto/NavListItemAuto.js +2 -7
- package/core/NavList/NavListAuto/NavListItemButtonAuto.js +1 -3
- package/core/NavList/NavListAuto/NavListMenuAuto.js +2 -5
- package/core/NavList/NavListAuto/NavListSubMenuAuto.js +1 -3
- package/core/NavList/NavListItem.js +2 -5
- package/core/NavList/NavListItemBase.js +1 -6
- package/core/NavList/NavMenuContainerContentList.js +3 -6
- package/core/NavList/__stories__/Default.js +4 -10
- package/core/NavList/__stories__/NavVerticalLayout.d.ts +2 -0
- package/core/NavList/__stories__/{NavHorizontalLayout.js → NavVerticalLayout.js} +9 -15
- package/core/NavList/index.d.ts +1 -0
- package/core/NavList/index.js +14 -0
- package/core/NavList/index.mdx +1 -5
- package/core/NavList/types.d.ts +0 -1
- package/core/NotificationBanner/index.mdx +1 -5
- package/core/PhaseBanner/index.mdx +1 -4
- package/core/RadioContainer/index.mdx +6 -30
- package/core/SelectContainer/index.mdx +3 -15
- package/core/SingleCharacterInputContainer/SingleCharacterInputContainer.stories.d.ts +13 -0
- package/core/SingleCharacterInputContainer/SingleCharacterInputContainer.stories.js +75 -0
- package/core/SingleCharacterInputContainer/__stories__/Default.d.ts +2 -0
- package/core/SingleCharacterInputContainer/__stories__/Default.js +46 -0
- package/core/SingleCharacterInputContainer/__stories__/WithDefaultError.d.ts +2 -0
- package/core/SingleCharacterInputContainer/__stories__/WithDefaultError.js +52 -0
- package/core/SingleCharacterInputContainer/__stories__/WithErrorMessageInvalidCode.d.ts +2 -0
- package/core/SingleCharacterInputContainer/__stories__/WithErrorMessageInvalidCode.js +58 -0
- package/core/SingleCharacterInputContainer/__stories__/WithErrorMessageLessDigit.d.ts +2 -0
- package/core/SingleCharacterInputContainer/__stories__/WithErrorMessageLessDigit.js +52 -0
- package/core/SingleCharacterInputContainer/index.d.ts +4 -0
- package/core/SingleCharacterInputContainer/index.js +44 -0
- package/core/SingleCharacterInputContainer/index.mdx +26 -0
- package/core/SummaryList/index.mdx +2 -10
- package/core/Table/index.mdx +6 -30
- package/core/TextArea/index.mdx +6 -30
- package/core/TextInput/index.mdx +6 -30
- package/core/index.d.ts +1 -0
- package/core/index.js +13 -0
- package/es/admin/AutoComplete/index.mdx +8 -30
- package/es/admin/CopyToClipboard/CopyToClipboard.stories.playwright.json +2 -2
- package/es/admin/CopyToClipboard/index.mdx +1 -5
- package/es/admin/Drawer/__stories__/Default.js +2 -6
- package/es/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
- package/es/admin/Dropdown/__stories__/AlignRight.js +1 -2
- package/es/admin/Dropdown/__stories__/Default.js +1 -3
- package/es/admin/Dropdown/__stories__/PlacementTop.js +1 -2
- package/es/admin/Dropdown/index.mdx +3 -15
- package/es/admin/Modal/Modal.stories.playwright.json +37 -0
- package/es/admin/Modal/__stories__/AlertDialog.js +29 -12
- package/es/admin/Modal/__stories__/Default.js +27 -10
- package/es/admin/Modal/index.mdx +1 -5
- package/es/app/Footer/Footer.mdx +3 -14
- package/es/app/Header/index.mdx +3 -16
- package/es/app/QrCodeViewer/index.mdx +1 -5
- package/es/core/Accordion/Accordion.stories.playwright.json +2 -2
- package/es/core/Accordion/index.mdx +2 -10
- package/es/core/Button/__stories__/GroupingButtons.js +2 -1
- package/es/core/Button/__stories__/GroupingButtonsAndLinks.js +2 -1
- package/es/core/Button/__stories__/Warning.js +2 -1
- package/es/core/Button/index.mdx +4 -20
- package/es/core/Card/card.mdx +7 -35
- package/es/core/Checkbox/checkbox.mdx +6 -30
- package/es/core/DateInputContainer/index.mdx +4 -20
- package/es/core/ErrorSummary/ErrorSummary.stories.playwright.json +1 -1
- package/es/core/ErrorSummary/index.mdx +3 -15
- package/es/core/FileUpload/index.mdx +1 -5
- package/es/core/Link/link.mdx +4 -20
- package/es/core/List/index.mdx +1 -5
- package/es/core/NavList/NavList.stories.js +1 -5
- package/es/core/NavList/NavListAuto/NavListBaseAuto.js +1 -3
- package/es/core/NavList/NavListAuto/NavListItemAnchorAuto.js +2 -5
- package/es/core/NavList/NavListAuto/NavListItemAuto.js +2 -6
- package/es/core/NavList/NavListAuto/NavListItemButtonAuto.js +1 -3
- package/es/core/NavList/NavListAuto/NavListMenuAuto.js +2 -5
- package/es/core/NavList/NavListAuto/NavListSubMenuAuto.js +1 -3
- package/es/core/NavList/NavListItem.js +2 -5
- package/es/core/NavList/NavListItemBase.js +1 -6
- package/es/core/NavList/NavMenuContainerContentList.js +3 -6
- package/es/core/NavList/__stories__/Default.js +4 -10
- package/{esm/core/NavList/__stories__/NavHorizontalLayout.js → es/core/NavList/__stories__/NavVerticalLayout.js} +7 -13
- package/es/core/NavList/index.js +1 -0
- package/es/core/NavList/index.mdx +1 -5
- package/es/core/NotificationBanner/index.mdx +1 -5
- package/es/core/PhaseBanner/index.mdx +1 -4
- package/es/core/RadioContainer/index.mdx +6 -30
- package/es/core/SelectContainer/index.mdx +3 -15
- package/es/core/SingleCharacterInputContainer/SingleCharacterInputContainer.stories.js +12 -0
- package/es/core/SingleCharacterInputContainer/__stories__/Default.js +31 -0
- package/es/core/SingleCharacterInputContainer/__stories__/WithDefaultError.js +35 -0
- package/es/core/SingleCharacterInputContainer/__stories__/WithErrorMessageInvalidCode.js +41 -0
- package/es/core/SingleCharacterInputContainer/__stories__/WithErrorMessageLessDigit.js +35 -0
- package/es/core/SingleCharacterInputContainer/index.js +4 -0
- package/es/core/SingleCharacterInputContainer/index.mdx +26 -0
- package/es/core/SummaryList/index.mdx +2 -10
- package/es/core/Table/index.mdx +6 -30
- package/es/core/TextArea/index.mdx +6 -30
- package/es/core/TextInput/index.mdx +6 -30
- package/es/core/index.js +1 -0
- package/es/locales/el.js +4 -0
- package/es/registry.js +4 -0
- package/es/typography/HeadingCaption/index.mdx +1 -5
- package/es/typography/Hint/index.mdx +1 -5
- package/es/typography/NormalText/index.mdx +3 -15
- package/es/typography/Paragraph/index.mdx +3 -15
- package/esm/admin/AutoComplete/index.mdx +8 -30
- package/esm/admin/CopyToClipboard/CopyToClipboard.stories.playwright.json +2 -2
- package/esm/admin/CopyToClipboard/index.mdx +1 -5
- package/esm/admin/Drawer/__stories__/Default.js +2 -6
- package/esm/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
- package/esm/admin/Dropdown/__stories__/AlignRight.js +1 -2
- package/esm/admin/Dropdown/__stories__/Default.js +1 -3
- package/esm/admin/Dropdown/__stories__/PlacementTop.js +1 -2
- package/esm/admin/Dropdown/index.mdx +3 -15
- package/esm/admin/Modal/Modal.stories.playwright.json +37 -0
- package/esm/admin/Modal/__stories__/AlertDialog.js +29 -12
- package/esm/admin/Modal/__stories__/Default.js +27 -10
- package/esm/admin/Modal/index.mdx +1 -5
- package/esm/app/Footer/Footer.mdx +3 -14
- package/esm/app/Header/index.mdx +3 -16
- package/esm/app/QrCodeViewer/index.mdx +1 -5
- package/esm/core/Accordion/Accordion.stories.playwright.json +2 -2
- package/esm/core/Accordion/index.mdx +2 -10
- package/esm/core/Button/__stories__/GroupingButtons.js +2 -1
- package/esm/core/Button/__stories__/GroupingButtonsAndLinks.js +2 -1
- package/esm/core/Button/__stories__/Warning.js +2 -1
- package/esm/core/Button/index.mdx +4 -20
- package/esm/core/Card/card.mdx +7 -35
- package/esm/core/Checkbox/checkbox.mdx +6 -30
- package/esm/core/DateInputContainer/index.mdx +4 -20
- package/esm/core/ErrorSummary/ErrorSummary.stories.playwright.json +1 -1
- package/esm/core/ErrorSummary/index.mdx +3 -15
- package/esm/core/FileUpload/index.mdx +1 -5
- package/esm/core/Link/link.mdx +4 -20
- package/esm/core/List/index.mdx +1 -5
- package/esm/core/NavList/NavList.stories.js +1 -5
- package/esm/core/NavList/NavListAuto/NavListBaseAuto.js +1 -3
- package/esm/core/NavList/NavListAuto/NavListItemAnchorAuto.js +2 -5
- package/esm/core/NavList/NavListAuto/NavListItemAuto.js +2 -6
- package/esm/core/NavList/NavListAuto/NavListItemButtonAuto.js +1 -3
- package/esm/core/NavList/NavListAuto/NavListMenuAuto.js +2 -5
- package/esm/core/NavList/NavListAuto/NavListSubMenuAuto.js +1 -3
- package/esm/core/NavList/NavListItem.js +2 -5
- package/esm/core/NavList/NavListItemBase.js +1 -6
- package/esm/core/NavList/NavMenuContainerContentList.js +3 -6
- package/esm/core/NavList/__stories__/Default.js +4 -10
- package/{es/core/NavList/__stories__/NavHorizontalLayout.js → esm/core/NavList/__stories__/NavVerticalLayout.js} +7 -13
- package/esm/core/NavList/index.js +1 -0
- package/esm/core/NavList/index.mdx +1 -5
- package/esm/core/NotificationBanner/index.mdx +1 -5
- package/esm/core/PhaseBanner/index.mdx +1 -4
- package/esm/core/RadioContainer/index.mdx +6 -30
- package/esm/core/SelectContainer/index.mdx +3 -15
- package/esm/core/SingleCharacterInputContainer/SingleCharacterInputContainer.stories.js +12 -0
- package/esm/core/SingleCharacterInputContainer/__stories__/Default.js +31 -0
- package/esm/core/SingleCharacterInputContainer/__stories__/WithDefaultError.js +35 -0
- package/esm/core/SingleCharacterInputContainer/__stories__/WithErrorMessageInvalidCode.js +41 -0
- package/esm/core/SingleCharacterInputContainer/__stories__/WithErrorMessageLessDigit.js +35 -0
- package/esm/core/SingleCharacterInputContainer/index.js +4 -0
- package/esm/core/SingleCharacterInputContainer/index.mdx +26 -0
- package/esm/core/SummaryList/index.mdx +2 -10
- package/esm/core/Table/index.mdx +6 -30
- package/esm/core/TextArea/index.mdx +6 -30
- package/esm/core/TextInput/index.mdx +6 -30
- package/esm/core/index.js +1 -0
- package/esm/index.js +1 -1
- package/esm/locales/el.js +4 -0
- package/esm/registry.js +4 -0
- package/esm/typography/HeadingCaption/index.mdx +1 -5
- package/esm/typography/Hint/index.mdx +1 -5
- package/esm/typography/NormalText/index.mdx +3 -15
- package/esm/typography/Paragraph/index.mdx +3 -15
- package/locales/el.d.ts +4 -0
- package/locales/el.js +4 -0
- package/package.json +3 -3
- package/registry.d.ts +3 -0
- package/registry.js +6 -0
- package/src/admin/AutoComplete/index.mdx +8 -30
- package/src/admin/CopyToClipboard/CopyToClipboard.stories.playwright.json +2 -2
- package/src/admin/CopyToClipboard/index.mdx +1 -5
- package/src/admin/Drawer/__stories__/Default.tsx +2 -5
- package/src/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
- package/src/admin/Dropdown/__stories__/AlignRight.tsx +1 -1
- package/src/admin/Dropdown/__stories__/Default.tsx +1 -1
- package/src/admin/Dropdown/__stories__/PlacementTop.tsx +1 -1
- package/src/admin/Dropdown/index.mdx +3 -15
- package/src/admin/Modal/Modal.stories.playwright.json +37 -0
- package/src/admin/Modal/__stories__/AlertDialog.tsx +18 -3
- package/src/admin/Modal/__stories__/Default.tsx +18 -3
- package/src/admin/Modal/index.mdx +1 -5
- package/src/app/Footer/Footer.mdx +3 -14
- package/src/app/Header/index.mdx +3 -16
- package/src/app/QrCodeViewer/index.mdx +1 -5
- package/src/core/Accordion/Accordion.stories.playwright.json +2 -2
- package/src/core/Accordion/index.mdx +2 -10
- package/src/core/Button/__stories__/GroupingButtons.tsx +1 -0
- package/src/core/Button/__stories__/GroupingButtonsAndLinks.tsx +1 -0
- package/src/core/Button/__stories__/Warning.tsx +1 -0
- package/src/core/Button/index.mdx +4 -20
- package/src/core/Card/card.mdx +7 -35
- package/src/core/Checkbox/checkbox.mdx +6 -30
- package/src/core/DateInputContainer/index.mdx +4 -20
- package/src/core/ErrorSummary/ErrorSummary.stories.playwright.json +1 -1
- package/src/core/ErrorSummary/index.mdx +3 -15
- package/src/core/FileUpload/index.mdx +1 -5
- package/src/core/Link/link.mdx +4 -20
- package/src/core/List/index.mdx +1 -5
- package/src/core/NavList/NavList.stories.js +1 -5
- package/src/core/NavList/NavListAuto/NavListBaseAuto.tsx +1 -1
- package/src/core/NavList/NavListAuto/NavListItemAnchorAuto.tsx +1 -4
- package/src/core/NavList/NavListAuto/NavListItemAuto.tsx +2 -4
- package/src/core/NavList/NavListAuto/NavListItemButtonAuto.tsx +1 -1
- package/src/core/NavList/NavListAuto/NavListMenuAuto.tsx +2 -2
- package/src/core/NavList/NavListAuto/NavListSubMenuAuto.tsx +1 -1
- package/src/core/NavList/NavListItem.tsx +1 -2
- package/src/core/NavList/NavListItemBase.tsx +2 -5
- package/src/core/NavList/NavMenuContainerContentList.tsx +0 -2
- package/src/core/NavList/__stories__/Default.tsx +4 -7
- package/src/core/NavList/__stories__/{NavHorizontalLayout.tsx → NavVerticalLayout.tsx} +7 -10
- package/src/core/NavList/index.mdx +1 -5
- package/src/core/NavList/index.tsx +1 -0
- package/src/core/NavList/types.tsx +0 -1
- package/src/core/NotificationBanner/index.mdx +1 -5
- package/src/core/PhaseBanner/index.mdx +1 -4
- package/src/core/RadioContainer/index.mdx +6 -30
- package/src/core/SelectContainer/index.mdx +3 -15
- package/src/core/SingleCharacterInputContainer/SingleCharacterInputContainer.stories.js +13 -0
- package/src/core/SingleCharacterInputContainer/__stories__/Default.tsx +35 -0
- package/src/core/SingleCharacterInputContainer/__stories__/WithDefaultError.tsx +38 -0
- package/src/core/SingleCharacterInputContainer/__stories__/WithErrorMessageInvalidCode.tsx +38 -0
- package/src/core/SingleCharacterInputContainer/__stories__/WithErrorMessageLessDigit.tsx +38 -0
- package/src/core/SingleCharacterInputContainer/index.mdx +26 -0
- package/src/core/SingleCharacterInputContainer/index.tsx +4 -0
- package/src/core/SummaryList/index.mdx +2 -10
- package/src/core/Table/index.mdx +6 -30
- package/src/core/TextArea/index.mdx +6 -30
- package/src/core/TextInput/index.mdx +6 -30
- package/src/core/index.ts +1 -0
- package/src/locales/el.ts +4 -0
- package/src/registry.js +4 -0
- package/src/typography/HeadingCaption/index.mdx +1 -5
- package/src/typography/Hint/index.mdx +1 -5
- package/src/typography/NormalText/index.mdx +3 -15
- package/src/typography/Paragraph/index.mdx +3 -15
- package/typography/HeadingCaption/index.mdx +1 -5
- package/typography/Hint/index.mdx +1 -5
- package/typography/NormalText/index.mdx +3 -15
- package/typography/Paragraph/index.mdx +3 -15
- package/core/NavList/__stories__/NavHorizontalLayout.d.ts +0 -2
- package/core/NavList/__stories__/NavListEpathlaExample.d.ts +0 -2
- package/core/NavList/__stories__/NavListEpathlaExample.js +0 -153
- package/core/NavList/__stories__/NavListHorizontalAutoExample.d.ts +0 -2
- package/core/NavList/__stories__/NavListHorizontalAutoExample.js +0 -67
- package/core/NavList/__stories__/NavListSecondaryAutoExample.d.ts +0 -2
- package/core/NavList/__stories__/NavListSecondaryAutoExample.js +0 -281
- package/core/NavList/__stories__/NavListVerticalAutoExample.d.ts +0 -2
- package/core/NavList/__stories__/NavListVerticalAutoExample.js +0 -67
- package/es/core/NavList/__stories__/NavListEpathlaExample.js +0 -135
- package/es/core/NavList/__stories__/NavListHorizontalAutoExample.js +0 -51
- package/es/core/NavList/__stories__/NavListSecondaryAutoExample.js +0 -255
- package/es/core/NavList/__stories__/NavListVerticalAutoExample.js +0 -51
- package/esm/core/NavList/__stories__/NavListEpathlaExample.js +0 -135
- package/esm/core/NavList/__stories__/NavListHorizontalAutoExample.js +0 -51
- package/esm/core/NavList/__stories__/NavListSecondaryAutoExample.js +0 -255
- package/esm/core/NavList/__stories__/NavListVerticalAutoExample.js +0 -51
- package/src/core/NavList/__stories__/NavListEpathlaExample.tsx +0 -195
- package/src/core/NavList/__stories__/NavListHorizontalAutoExample.tsx +0 -65
- package/src/core/NavList/__stories__/NavListSecondaryAutoExample.tsx +0 -284
- package/src/core/NavList/__stories__/NavListVerticalAutoExample.tsx +0 -65
package/core/Button/index.mdx
CHANGED
|
@@ -24,21 +24,13 @@ Use a default button for the main call to action on a page.
|
|
|
24
24
|
|
|
25
25
|
Use a start button for the main call to action on your service’s start page. Start buttons do not submit form data, so they use a link tag rather than a button tag.
|
|
26
26
|
|
|
27
|
-
<Story
|
|
28
|
-
packageName="@digigov/ui"
|
|
29
|
-
component="core/Button"
|
|
30
|
-
story="CallToActionButton.tsx"
|
|
31
|
-
/>
|
|
27
|
+
<Story packageName="@digigov/ui" component="core/Button" story="CallToActionButton.tsx" />
|
|
32
28
|
|
|
33
29
|
### Secondary buttons
|
|
34
30
|
|
|
35
31
|
Use secondary buttons for secondary calls to action on a page.
|
|
36
32
|
|
|
37
|
-
<Story
|
|
38
|
-
packageName="@digigov/ui"
|
|
39
|
-
component="core/Button"
|
|
40
|
-
story="Secondary.tsx"
|
|
41
|
-
/>
|
|
33
|
+
<Story packageName="@digigov/ui" component="core/Button" story="Secondary.tsx" />
|
|
42
34
|
|
|
43
35
|
### Warning buttons
|
|
44
36
|
|
|
@@ -56,19 +48,11 @@ Disabled buttons have poor contrast and can confuse some users, so avoid them if
|
|
|
56
48
|
|
|
57
49
|
Use a button group when two or more buttons are placed together.
|
|
58
50
|
|
|
59
|
-
<Story
|
|
60
|
-
packageName="@digigov/ui"
|
|
61
|
-
component="core/Button"
|
|
62
|
-
story="GroupingButtons.tsx"
|
|
63
|
-
/>
|
|
51
|
+
<Story packageName="@digigov/ui"component="core/Button" story="GroupingButtons.tsx" />
|
|
64
52
|
|
|
65
53
|
Any links within a button group will automatically align with the buttons.
|
|
66
54
|
|
|
67
|
-
<Story
|
|
68
|
-
packageName="@digigov/ui"
|
|
69
|
-
component="core/Button"
|
|
70
|
-
story="GroupingButtonsAndLinks.tsx"
|
|
71
|
-
/>
|
|
55
|
+
<Story packageName="@digigov/ui" component="core/Button" story="GroupingButtonsAndLinks.tsx" />
|
|
72
56
|
|
|
73
57
|
Write button text in sentence case, describing the action it performs. For
|
|
74
58
|
example:'
|
package/core/Card/card.mdx
CHANGED
|
@@ -22,19 +22,11 @@ You can set the color of the Card's border. You can choose between `dark` and `g
|
|
|
22
22
|
|
|
23
23
|
#### Card with gray border color
|
|
24
24
|
|
|
25
|
-
<Story
|
|
26
|
-
packageName="@digigov/ui"
|
|
27
|
-
component="core/Card"
|
|
28
|
-
story="WithGrayBorder.tsx"
|
|
29
|
-
/>
|
|
25
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithGrayBorder.tsx" />
|
|
30
26
|
|
|
31
27
|
#### Card with dark border color
|
|
32
28
|
|
|
33
|
-
<Story
|
|
34
|
-
packageName="@digigov/ui"
|
|
35
|
-
component="core/Card"
|
|
36
|
-
story="WithDarkBorder.tsx"
|
|
37
|
-
/>
|
|
29
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithDarkBorder.tsx" />
|
|
38
30
|
|
|
39
31
|
### Card with top border
|
|
40
32
|
|
|
@@ -42,27 +34,15 @@ You can set the color of the Card's top border. You can choose between dark and
|
|
|
42
34
|
|
|
43
35
|
#### Card with grey top border
|
|
44
36
|
|
|
45
|
-
<Story
|
|
46
|
-
packageName="@digigov/ui"
|
|
47
|
-
component="core/Card"
|
|
48
|
-
story="WithGrayTopBorder.tsx"
|
|
49
|
-
/>
|
|
37
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithGrayTopBorder.tsx" />
|
|
50
38
|
|
|
51
39
|
#### Card with dark top border
|
|
52
40
|
|
|
53
|
-
<Story
|
|
54
|
-
packageName="@digigov/ui"
|
|
55
|
-
component="core/Card"
|
|
56
|
-
story="WithDarkTopBorder.tsx"
|
|
57
|
-
/>
|
|
41
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithDarkTopBorder.tsx" />
|
|
58
42
|
|
|
59
43
|
### Card with divider
|
|
60
44
|
|
|
61
|
-
<Story
|
|
62
|
-
packageName="@digigov/ui"
|
|
63
|
-
component="core/Card"
|
|
64
|
-
story="WithDivider.tsx"
|
|
65
|
-
/>
|
|
45
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithDivider.tsx" />
|
|
66
46
|
|
|
67
47
|
### Card with actions
|
|
68
48
|
|
|
@@ -70,21 +50,13 @@ You can set the color of the Card's top border. You can choose between dark and
|
|
|
70
50
|
|
|
71
51
|
Cards can be used without an action button, but with a clickable title.
|
|
72
52
|
|
|
73
|
-
<Story
|
|
74
|
-
packageName="@digigov/ui"
|
|
75
|
-
component="core/Card"
|
|
76
|
-
story="WithClickableLink.tsx"
|
|
77
|
-
/>
|
|
53
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithClickableLink.tsx" />
|
|
78
54
|
|
|
79
55
|
#### Card with clickable content
|
|
80
56
|
|
|
81
57
|
You can expand the clickable area of the link to fill Card's content.
|
|
82
58
|
|
|
83
|
-
<Story
|
|
84
|
-
packageName="@digigov/ui"
|
|
85
|
-
component="core/Card"
|
|
86
|
-
story="WithClickableContent.tsx"
|
|
87
|
-
/>
|
|
59
|
+
<Story packageName="@digigov/ui" component="core/Card" story="WithClickableContent.tsx" />
|
|
88
60
|
|
|
89
61
|
Cards also provides styles for actionable elements such as Buttons or Links.
|
|
90
62
|
|
|
@@ -11,57 +11,33 @@ import Checkbox from '@digigov/ui/core/Checkbox';
|
|
|
11
11
|
|
|
12
12
|
## How to use
|
|
13
13
|
|
|
14
|
-
<Story
|
|
15
|
-
packageName="@digigov/ui"
|
|
16
|
-
component="core/Checkbox"
|
|
17
|
-
story="Default.tsx"
|
|
18
|
-
/>
|
|
14
|
+
<Story packageName="@digigov/ui" component="core/Checkbox" story="Default.tsx" />
|
|
19
15
|
|
|
20
16
|
### If you’re asking more than one question on the page
|
|
21
17
|
|
|
22
|
-
<Story
|
|
23
|
-
packageName="@digigov/ui"
|
|
24
|
-
component="core/Checkbox"
|
|
25
|
-
story="MultipleQuestions.tsx"
|
|
26
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="core/Checkbox" story="MultipleQuestions.tsx" />
|
|
27
19
|
|
|
28
20
|
### Checkbox items with hints
|
|
29
21
|
|
|
30
22
|
You can add hints to checkbox items to provide additional information about the options.
|
|
31
23
|
|
|
32
|
-
<Story
|
|
33
|
-
packageName="@digigov/ui"
|
|
34
|
-
component="core/Checkbox"
|
|
35
|
-
story="WithHint.tsx"
|
|
36
|
-
/>
|
|
24
|
+
<Story packageName="@digigov/ui" component="core/Checkbox" story="WithHint.tsx" />
|
|
37
25
|
|
|
38
26
|
### Add an option for ‘none’
|
|
39
27
|
|
|
40
28
|
When ‘none’ would be a valid answer, give users the option to check a box to say none of the other options apply to them — without this option, users would have to leave all of the boxes unchecked. Giving users this option also makes sure they do not skip the question by accident.
|
|
41
29
|
|
|
42
|
-
<Story
|
|
43
|
-
packageName="@digigov/ui"
|
|
44
|
-
component="core/Checkbox"
|
|
45
|
-
story="NoneAnswer.tsx"
|
|
46
|
-
/>
|
|
30
|
+
<Story packageName="@digigov/ui" component="core/Checkbox" story="NoneAnswer.tsx" />
|
|
47
31
|
|
|
48
32
|
If JavaScript is unavailable, and a user selects both the ‘none’ checkbox and another checkbox, display an error message.
|
|
49
33
|
|
|
50
|
-
<Story
|
|
51
|
-
packageName="@digigov/ui"
|
|
52
|
-
component="core/Checkbox"
|
|
53
|
-
story="NoneAnswerWithError.tsx"
|
|
54
|
-
/>
|
|
34
|
+
<Story packageName="@digigov/ui" component="core/Checkbox" story="NoneAnswerWithError.tsx" />
|
|
55
35
|
|
|
56
36
|
### Error messages
|
|
57
37
|
|
|
58
38
|
Error messages should be styled like this:
|
|
59
39
|
|
|
60
|
-
<Story
|
|
61
|
-
packageName="@digigov/ui"
|
|
62
|
-
component="core/Checkbox"
|
|
63
|
-
story="WithErrorMessage.tsx"
|
|
64
|
-
/>
|
|
40
|
+
<Story packageName="@digigov/ui" component="core/Checkbox" story="WithErrorMessage.tsx" />
|
|
65
41
|
|
|
66
42
|
## Conditionally revealing a related question
|
|
67
43
|
|
|
@@ -11,34 +11,18 @@ import DateInputContainer from '@digigov/ui/core/DateInputContainer';
|
|
|
11
11
|
|
|
12
12
|
## How to use
|
|
13
13
|
|
|
14
|
-
<Story
|
|
15
|
-
packageName="@digigov/ui"
|
|
16
|
-
component="core/DateInputContainer"
|
|
17
|
-
story="Default.tsx"
|
|
18
|
-
/>
|
|
14
|
+
<Story packageName="@digigov/ui" component="core/DateInputContainer" story="Default.tsx" />
|
|
19
15
|
|
|
20
16
|
### If you’re asking more than one question on the page
|
|
21
17
|
|
|
22
|
-
<Story
|
|
23
|
-
packageName="@digigov/ui"
|
|
24
|
-
component="core/DateInputContainer"
|
|
25
|
-
story="MultipleQuestions.tsx"
|
|
26
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="core/DateInputContainer" story="MultipleQuestions.tsx" />
|
|
27
19
|
|
|
28
20
|
### Error message
|
|
29
21
|
|
|
30
22
|
If you’re highlighting the whole date, style all the fields like this:
|
|
31
23
|
|
|
32
|
-
<Story
|
|
33
|
-
packageName="@digigov/ui"
|
|
34
|
-
component="core/DateInputContainer"
|
|
35
|
-
story="WithErrorMessage.tsx"
|
|
36
|
-
/>
|
|
24
|
+
<Story packageName="@digigov/ui" component="core/DateInputContainer" story="WithErrorMessage.tsx" />
|
|
37
25
|
|
|
38
26
|
If you’re highlighting just one field - either the day, month or year - only style the field that has an error. The error message must say which field has an error, like this:
|
|
39
27
|
|
|
40
|
-
<Story
|
|
41
|
-
packageName="@digigov/ui"
|
|
42
|
-
component="core/DateInputContainer"
|
|
43
|
-
story="WithErrorMessageForSingleField.tsx"
|
|
44
|
-
/>
|
|
28
|
+
<Story packageName="@digigov/ui" component="core/DateInputContainer" story="WithErrorMessageForSingleField.tsx" />
|
|
@@ -15,11 +15,7 @@ import ErrorSummary from '@digigov/ui/core/ErrorSummary';
|
|
|
15
15
|
|
|
16
16
|
## How to use
|
|
17
17
|
|
|
18
|
-
<Story
|
|
19
|
-
packageName="@digigov/ui"
|
|
20
|
-
component="core/ErrorSummary"
|
|
21
|
-
story="Default.tsx"
|
|
22
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="core/ErrorSummary" story="Default.tsx" />
|
|
23
19
|
|
|
24
20
|
### Linking from the error summary to each answer
|
|
25
21
|
|
|
@@ -27,21 +23,13 @@ You must link the errors in the error summary to the answer they relate to.
|
|
|
27
23
|
|
|
28
24
|
For questions that require a user to answer using a single field, like a file upload, select, textarea, text input or character count, link to the field.
|
|
29
25
|
|
|
30
|
-
<Story
|
|
31
|
-
packageName="@digigov/ui"
|
|
32
|
-
component="core/ErrorSummary"
|
|
33
|
-
story="LinkedToInput.tsx"
|
|
34
|
-
/>
|
|
26
|
+
<Story packageName="@digigov/ui" component="core/ErrorSummary" story="LinkedToInput.tsx" />
|
|
35
27
|
|
|
36
28
|
When a user has to enter their answer into multiple fields, such as the day, month and year fields in the date input component, link to the first field that contains an error.
|
|
37
29
|
|
|
38
30
|
If you do not know which field contains an error, link to the first field.
|
|
39
31
|
|
|
40
|
-
<Story
|
|
41
|
-
packageName="@digigov/ui"
|
|
42
|
-
component="core/ErrorSummary"
|
|
43
|
-
story="LinkedToField.tsx"
|
|
44
|
-
/>
|
|
32
|
+
<Story packageName="@digigov/ui" component="core/ErrorSummary" story="LinkedToField.tsx" />
|
|
45
33
|
|
|
46
34
|
For questions that require a user to select one or more options from a list using radios or checkboxes, link to the first radio or checkbox.
|
|
47
35
|
|
|
@@ -11,11 +11,7 @@ import FileUpload from '@digigov/ui/core/FileUpload';
|
|
|
11
11
|
|
|
12
12
|
## How to use
|
|
13
13
|
|
|
14
|
-
<Story
|
|
15
|
-
packageName="@digigov/ui"
|
|
16
|
-
component="core/FileUpload"
|
|
17
|
-
story="Default.tsx"
|
|
18
|
-
/>
|
|
14
|
+
<Story packageName="@digigov/ui" component="core/FileUpload" story="Default.tsx" />
|
|
19
15
|
|
|
20
16
|
### Error message
|
|
21
17
|
|
package/core/Link/link.mdx
CHANGED
|
@@ -15,35 +15,19 @@ import Link from '@digigov/ui/core/Link';
|
|
|
15
15
|
|
|
16
16
|
### No Underline
|
|
17
17
|
|
|
18
|
-
<Story
|
|
19
|
-
packageName="@digigov/ui"
|
|
20
|
-
component="core/Link"
|
|
21
|
-
story="NoUnderline.tsx"
|
|
22
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="core/Link" story="NoUnderline.tsx" />
|
|
23
19
|
|
|
24
20
|
### Opens in a new tab
|
|
25
21
|
|
|
26
|
-
<Story
|
|
27
|
-
packageName="@digigov/ui"
|
|
28
|
-
component="core/Link"
|
|
29
|
-
story="OpensInNewTab.tsx"
|
|
30
|
-
/>
|
|
22
|
+
<Story packageName="@digigov/ui" component="core/Link" story="OpensInNewTab.tsx" />
|
|
31
23
|
|
|
32
24
|
### At dark background
|
|
33
25
|
|
|
34
|
-
<Story
|
|
35
|
-
packageName="@digigov/ui"
|
|
36
|
-
component="core/Link"
|
|
37
|
-
story="DarkBackground.tsx"
|
|
38
|
-
/>
|
|
26
|
+
<Story packageName="@digigov/ui" component="core/Link" story="DarkBackground.tsx" />
|
|
39
27
|
|
|
40
28
|
### At dark background and no underline
|
|
41
29
|
|
|
42
|
-
<Story
|
|
43
|
-
packageName="@digigov/ui"
|
|
44
|
-
component="core/Link"
|
|
45
|
-
story="DarkBackgroundNoUnderline.tsx"
|
|
46
|
-
/>
|
|
30
|
+
<Story packageName="@digigov/ui" component="core/Link" story="DarkBackgroundNoUnderline.tsx" />
|
|
47
31
|
|
|
48
32
|
You can read more about the accessibility patterns used in our Link
|
|
49
33
|
implementation in the ARIA Authoring Practices Guide (APG) at
|
package/core/List/index.mdx
CHANGED
|
@@ -19,11 +19,7 @@ import List from '@digigov/ui/core/List';
|
|
|
19
19
|
|
|
20
20
|
### List with numbers
|
|
21
21
|
|
|
22
|
-
<Story
|
|
23
|
-
packageName="@digigov/ui"
|
|
24
|
-
component="core/List"
|
|
25
|
-
story="NumberedList.tsx"
|
|
26
|
-
/>
|
|
22
|
+
<Story packageName="@digigov/ui" component="core/List" story="NumberedList.tsx" />
|
|
27
23
|
|
|
28
24
|
### List with extra space
|
|
29
25
|
|
|
@@ -7,9 +7,5 @@ declare namespace _default {
|
|
|
7
7
|
}
|
|
8
8
|
export default _default;
|
|
9
9
|
export * from "@digigov/ui/core/NavList/__stories__/Default";
|
|
10
|
-
export * from "@digigov/ui/core/NavList/__stories__/
|
|
11
|
-
export * from "@digigov/ui/core/NavList/__stories__/NavListVerticalAutoExample";
|
|
12
|
-
export * from "@digigov/ui/core/NavList/__stories__/NavListSecondaryAutoExample";
|
|
13
|
-
export * from "@digigov/ui/core/NavList/__stories__/NavListEpathlaExample";
|
|
14
|
-
export * from "@digigov/ui/core/NavList/__stories__/NavHorizontalLayout";
|
|
10
|
+
export * from "@digigov/ui/core/NavList/__stories__/NavVerticalLayout";
|
|
15
11
|
import NavList from "@digigov/ui/core/NavList";
|
|
@@ -24,72 +24,16 @@ Object.keys(_Default).forEach(function (key) {
|
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _NavVerticalLayout = require("@digigov/ui/core/NavList/__stories__/NavVerticalLayout");
|
|
28
28
|
|
|
29
|
-
Object.keys(
|
|
29
|
+
Object.keys(_NavVerticalLayout).forEach(function (key) {
|
|
30
30
|
if (key === "default" || key === "__esModule") return;
|
|
31
31
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
32
|
-
if (key in exports && exports[key] ===
|
|
32
|
+
if (key in exports && exports[key] === _NavVerticalLayout[key]) return;
|
|
33
33
|
Object.defineProperty(exports, key, {
|
|
34
34
|
enumerable: true,
|
|
35
35
|
get: function get() {
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
var _NavListVerticalAutoExample = require("@digigov/ui/core/NavList/__stories__/NavListVerticalAutoExample");
|
|
42
|
-
|
|
43
|
-
Object.keys(_NavListVerticalAutoExample).forEach(function (key) {
|
|
44
|
-
if (key === "default" || key === "__esModule") return;
|
|
45
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
46
|
-
if (key in exports && exports[key] === _NavListVerticalAutoExample[key]) return;
|
|
47
|
-
Object.defineProperty(exports, key, {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
get: function get() {
|
|
50
|
-
return _NavListVerticalAutoExample[key];
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
var _NavListSecondaryAutoExample = require("@digigov/ui/core/NavList/__stories__/NavListSecondaryAutoExample");
|
|
56
|
-
|
|
57
|
-
Object.keys(_NavListSecondaryAutoExample).forEach(function (key) {
|
|
58
|
-
if (key === "default" || key === "__esModule") return;
|
|
59
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
60
|
-
if (key in exports && exports[key] === _NavListSecondaryAutoExample[key]) return;
|
|
61
|
-
Object.defineProperty(exports, key, {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function get() {
|
|
64
|
-
return _NavListSecondaryAutoExample[key];
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
var _NavListEpathlaExample = require("@digigov/ui/core/NavList/__stories__/NavListEpathlaExample");
|
|
70
|
-
|
|
71
|
-
Object.keys(_NavListEpathlaExample).forEach(function (key) {
|
|
72
|
-
if (key === "default" || key === "__esModule") return;
|
|
73
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
74
|
-
if (key in exports && exports[key] === _NavListEpathlaExample[key]) return;
|
|
75
|
-
Object.defineProperty(exports, key, {
|
|
76
|
-
enumerable: true,
|
|
77
|
-
get: function get() {
|
|
78
|
-
return _NavListEpathlaExample[key];
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
var _NavHorizontalLayout = require("@digigov/ui/core/NavList/__stories__/NavHorizontalLayout");
|
|
84
|
-
|
|
85
|
-
Object.keys(_NavHorizontalLayout).forEach(function (key) {
|
|
86
|
-
if (key === "default" || key === "__esModule") return;
|
|
87
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
88
|
-
if (key in exports && exports[key] === _NavHorizontalLayout[key]) return;
|
|
89
|
-
Object.defineProperty(exports, key, {
|
|
90
|
-
enumerable: true,
|
|
91
|
-
get: function get() {
|
|
92
|
-
return _NavHorizontalLayout[key];
|
|
36
|
+
return _NavVerticalLayout[key];
|
|
93
37
|
}
|
|
94
38
|
});
|
|
95
39
|
});
|
|
@@ -32,9 +32,7 @@ var NavListBaseAuto = function NavListBaseAuto(_ref) {
|
|
|
32
32
|
layout: layout
|
|
33
33
|
}, props, {
|
|
34
34
|
"aria-orientation": layout
|
|
35
|
-
}), /*#__PURE__*/_react["default"].createElement(_NavList["default"],
|
|
36
|
-
layout: layout
|
|
37
|
-
}, children));
|
|
35
|
+
}), /*#__PURE__*/_react["default"].createElement(_NavList["default"], null, children));
|
|
38
36
|
};
|
|
39
37
|
|
|
40
38
|
exports.NavListBaseAuto = NavListBaseAuto;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { NavListLayout } from '@digigov/ui/core/NavList/types';
|
|
3
2
|
interface NavListItemAnchorAutoProps {
|
|
4
3
|
name: string;
|
|
5
4
|
href?: string;
|
|
6
5
|
active?: boolean;
|
|
7
|
-
layout?: NavListLayout;
|
|
8
6
|
children?: React.ReactNode;
|
|
9
7
|
}
|
|
10
8
|
export declare const NavListItemAnchorAuto: React.FC<NavListItemAnchorAutoProps>;
|
|
@@ -21,7 +21,7 @@ var _NavListContextAuto = _interopRequireDefault(require("@digigov/ui/core/NavLi
|
|
|
21
21
|
|
|
22
22
|
var _NavListItem = _interopRequireDefault(require("@digigov/react-core/NavListItem"));
|
|
23
23
|
|
|
24
|
-
var _excluded = ["name", "href", "active", "
|
|
24
|
+
var _excluded = ["name", "href", "active", "children"];
|
|
25
25
|
|
|
26
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
27
|
|
|
@@ -33,7 +33,6 @@ var NavListItemAnchorAuto = function NavListItemAnchorAuto(_ref) {
|
|
|
33
33
|
var name = _ref.name,
|
|
34
34
|
href = _ref.href,
|
|
35
35
|
active = _ref.active,
|
|
36
|
-
layout = _ref.layout,
|
|
37
36
|
children = _ref.children,
|
|
38
37
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
39
38
|
|
|
@@ -41,9 +40,7 @@ var NavListItemAnchorAuto = function NavListItemAnchorAuto(_ref) {
|
|
|
41
40
|
container = _useContext.container,
|
|
42
41
|
setRegisterLink = _useContext.setRegisterLink;
|
|
43
42
|
|
|
44
|
-
return /*#__PURE__*/_react["default"].createElement(_NavListItem["default"], {
|
|
45
|
-
layout: layout
|
|
46
|
-
}, setRegisterLink && /*#__PURE__*/_react["default"].createElement(_NavListItemLink.NavListItemLink, (0, _extends2["default"])({
|
|
43
|
+
return /*#__PURE__*/_react["default"].createElement(_NavListItem["default"], null, setRegisterLink && /*#__PURE__*/_react["default"].createElement(_NavListItemLink.NavListItemLink, (0, _extends2["default"])({
|
|
47
44
|
href: href,
|
|
48
45
|
active: active || container && ((_container = container(name)) === null || _container === void 0 ? void 0 : _container.active)
|
|
49
46
|
}, props, setRegisterLink(name)), children));
|
|
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
});
|
|
10
10
|
exports["default"] = exports.NavListItemAuto = void 0;
|
|
11
11
|
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
13
|
|
|
16
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -48,9 +46,7 @@ var NavListItemAuto = function NavListItemAuto(_ref) {
|
|
|
48
46
|
setRegisterButton = _useContext.setRegisterButton;
|
|
49
47
|
|
|
50
48
|
var itemName = item !== null && item !== void 0 && item.name ? item.name : item === null || item === void 0 ? void 0 : item.label;
|
|
51
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children ? /*#__PURE__*/_react["default"].createElement(_NavListItem.NavListItem,
|
|
52
|
-
layout: layout
|
|
53
|
-
}, props), children) : item !== null && item !== void 0 && item.menu || item !== null && item !== void 0 && item.subMenu ? /*#__PURE__*/_react["default"].createElement(_NavListItemButtonAuto["default"], {
|
|
49
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children ? /*#__PURE__*/_react["default"].createElement(_NavListItem.NavListItem, props, children) : item !== null && item !== void 0 && item.menu || item !== null && item !== void 0 && item.subMenu ? /*#__PURE__*/_react["default"].createElement(_NavListItemButtonAuto["default"], {
|
|
54
50
|
item: item,
|
|
55
51
|
name: itemName,
|
|
56
52
|
active: container && ((_container = container(itemName)) === null || _container === void 0 ? void 0 : _container.active),
|
|
@@ -58,8 +54,7 @@ var NavListItemAuto = function NavListItemAuto(_ref) {
|
|
|
58
54
|
layout: layout
|
|
59
55
|
}, item === null || item === void 0 ? void 0 : item.label) : /*#__PURE__*/_react["default"].createElement(_NavListItemAnchorAuto["default"], {
|
|
60
56
|
href: item === null || item === void 0 ? void 0 : item.href,
|
|
61
|
-
name: itemName
|
|
62
|
-
layout: layout
|
|
57
|
+
name: itemName
|
|
63
58
|
}, item === null || item === void 0 ? void 0 : item.label), showDividers && _ref2);
|
|
64
59
|
};
|
|
65
60
|
|
|
@@ -28,9 +28,7 @@ var NavListItemButtonAuto = function NavListItemButtonAuto(_ref) {
|
|
|
28
28
|
onSelect = _ref.onSelect,
|
|
29
29
|
layout = _ref.layout,
|
|
30
30
|
children = _ref.children;
|
|
31
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, onSelect && /*#__PURE__*/_react["default"].createElement(_NavListItem["default"], {
|
|
32
|
-
layout: layout
|
|
33
|
-
}, /*#__PURE__*/_react["default"].createElement(_NavListItemButton["default"], (0, _extends2["default"])({
|
|
31
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, onSelect && /*#__PURE__*/_react["default"].createElement(_NavListItem["default"], null, /*#__PURE__*/_react["default"].createElement(_NavListItemButton["default"], (0, _extends2["default"])({
|
|
34
32
|
active: active
|
|
35
33
|
}, onSelect(name)), children)), item !== null && item !== void 0 && item.subMenu ? /*#__PURE__*/_react["default"].createElement(_NavListSubMenuAuto["default"], {
|
|
36
34
|
items: item === null || item === void 0 ? void 0 : item.subMenu,
|
|
@@ -37,11 +37,8 @@ var NavListMenuAuto = function NavListMenuAuto(_ref) {
|
|
|
37
37
|
layout: layout,
|
|
38
38
|
paddingLeft: 5,
|
|
39
39
|
paddingRight: 5
|
|
40
|
-
}, /*#__PURE__*/_react["default"].createElement(_NavMenuContainerTitle["default"], {
|
|
41
|
-
|
|
42
|
-
}, title), /*#__PURE__*/_react["default"].createElement(_NavMenuContainerContent["default"], null, /*#__PURE__*/_react["default"].createElement(_NavMenuContainerContentList["default"], {
|
|
43
|
-
role: "menu",
|
|
44
|
-
layout: layout
|
|
40
|
+
}, /*#__PURE__*/_react["default"].createElement(_NavMenuContainerTitle["default"], null, title), /*#__PURE__*/_react["default"].createElement(_NavMenuContainerContent["default"], null, /*#__PURE__*/_react["default"].createElement(_NavMenuContainerContentList["default"], {
|
|
41
|
+
role: "menu"
|
|
45
42
|
}, subMenu === null || subMenu === void 0 ? void 0 : subMenu.map(function (item, index) {
|
|
46
43
|
return /*#__PURE__*/_react["default"].createElement(_NavMenuContainerContentListItem["default"], {
|
|
47
44
|
role: "presentation",
|
|
@@ -31,9 +31,7 @@ var NavListSubMenuAuto = function NavListSubMenuAuto(_ref) {
|
|
|
31
31
|
layout: layout
|
|
32
32
|
}, props, {
|
|
33
33
|
"aria-orientation": layout
|
|
34
|
-
}), /*#__PURE__*/_react["default"].createElement(_NavList.NavList, {
|
|
35
|
-
layout: layout
|
|
36
|
-
}, items === null || items === void 0 ? void 0 : items.map(function (subMenuItem, index) {
|
|
34
|
+
}), /*#__PURE__*/_react["default"].createElement(_NavList.NavList, null, items === null || items === void 0 ? void 0 : items.map(function (subMenuItem, index) {
|
|
37
35
|
return /*#__PURE__*/_react["default"].createElement(_NavListItemAuto["default"], {
|
|
38
36
|
key: index,
|
|
39
37
|
item: subMenuItem
|
|
@@ -21,19 +21,16 @@ var _NavListItemLink = require("@digigov/ui/core/NavList/NavListItemLink");
|
|
|
21
21
|
|
|
22
22
|
var _types = require("@digigov/ui/core/NavList/types");
|
|
23
23
|
|
|
24
|
-
var _excluded = ["link", "
|
|
24
|
+
var _excluded = ["link", "setRegisterButton", "setRegisterLink", "active", "children"];
|
|
25
25
|
|
|
26
26
|
var NavListItem = function NavListItem(_ref) {
|
|
27
27
|
var link = _ref.link,
|
|
28
|
-
layout = _ref.layout,
|
|
29
28
|
setRegisterButton = _ref.setRegisterButton,
|
|
30
29
|
setRegisterLink = _ref.setRegisterLink,
|
|
31
30
|
active = _ref.active,
|
|
32
31
|
children = _ref.children,
|
|
33
32
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
34
|
-
return /*#__PURE__*/_react["default"].createElement(_NavListItem["default"], (0, _extends2["default"])({
|
|
35
|
-
layout: layout
|
|
36
|
-
}, props), children ? children : (0, _types.isNavListItemSubMenuInterface)(link) && link !== null && link !== void 0 && link.subMenu ? /*#__PURE__*/_react["default"].createElement(_NavListItemButton["default"], setRegisterButton && setRegisterButton(link.name), link === null || link === void 0 ? void 0 : link.label) : (0, _types.isNavListItemLinkInterface)(link) && /*#__PURE__*/_react["default"].createElement(_NavListItemLink.NavListItemLink, (0, _extends2["default"])({
|
|
33
|
+
return /*#__PURE__*/_react["default"].createElement(_NavListItem["default"], props, children ? children : (0, _types.isNavListItemSubMenuInterface)(link) && link !== null && link !== void 0 && link.subMenu ? /*#__PURE__*/_react["default"].createElement(_NavListItemButton["default"], setRegisterButton && setRegisterButton(link.name), link === null || link === void 0 ? void 0 : link.label) : (0, _types.isNavListItemLinkInterface)(link) && /*#__PURE__*/_react["default"].createElement(_NavListItemLink.NavListItemLink, (0, _extends2["default"])({
|
|
37
34
|
href: link === null || link === void 0 ? void 0 : link.href
|
|
38
35
|
}, setRegisterLink && setRegisterLink(link.name), {
|
|
39
36
|
active: active
|
|
@@ -45,7 +45,6 @@ var NavListItemBase = function NavListItemBase(_ref) {
|
|
|
45
45
|
role = _ref.role,
|
|
46
46
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
47
47
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_NavListItem["default"], (0, _extends2["default"])({
|
|
48
|
-
layout: layout,
|
|
49
48
|
link: item,
|
|
50
49
|
setRegisterButton: setRegisterButton,
|
|
51
50
|
role: "menuitem"
|
|
@@ -55,11 +54,7 @@ var NavListItemBase = function NavListItemBase(_ref) {
|
|
|
55
54
|
layout: layout,
|
|
56
55
|
paddingLeft: 5,
|
|
57
56
|
paddingRight: 5
|
|
58
|
-
}, /*#__PURE__*/_react["default"].createElement(_NavMenuContainerTitle["default"], {
|
|
59
|
-
layout: layout
|
|
60
|
-
}, item.label), /*#__PURE__*/_react["default"].createElement(_NavMenuContainerContent["default"], null, /*#__PURE__*/_react["default"].createElement(_NavMenuContainerContentList["default"], {
|
|
61
|
-
layout: layout
|
|
62
|
-
}, (_item$subMenu = item.subMenu) === null || _item$subMenu === void 0 ? void 0 : _item$subMenu.map(function (subMenu, menuIndex) {
|
|
57
|
+
}, /*#__PURE__*/_react["default"].createElement(_NavMenuContainerTitle["default"], null, item.label), /*#__PURE__*/_react["default"].createElement(_NavMenuContainerContent["default"], null, /*#__PURE__*/_react["default"].createElement(_NavMenuContainerContentList["default"], null, (_item$subMenu = item.subMenu) === null || _item$subMenu === void 0 ? void 0 : _item$subMenu.map(function (subMenu, menuIndex) {
|
|
63
58
|
return (0, _types.isNavListItemLinkInterface)(subMenu) && /*#__PURE__*/_react["default"].createElement(_NavMenuContainerContentListItem["default"], {
|
|
64
59
|
key: menuIndex
|
|
65
60
|
}, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
|
|
@@ -31,7 +31,7 @@ Object.keys(_NavMenuContainerContentList).forEach(function (key) {
|
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
|
-
var _excluded = ["
|
|
34
|
+
var _excluded = ["children"];
|
|
35
35
|
|
|
36
36
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
37
|
|
|
@@ -73,12 +73,9 @@ var focusNavListItem = function focusNavListItem(e, nextItemIndex) {
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
var NavMenuContainerContentList = function NavMenuContainerContentList(_ref) {
|
|
76
|
-
var
|
|
77
|
-
children = _ref.children,
|
|
76
|
+
var children = _ref.children,
|
|
78
77
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
79
|
-
return /*#__PURE__*/_react["default"].createElement(_NavMenuContainerContentList["default"], (0, _extends2["default"])({
|
|
80
|
-
layout: layout
|
|
81
|
-
}, props, {
|
|
78
|
+
return /*#__PURE__*/_react["default"].createElement(_NavMenuContainerContentList["default"], (0, _extends2["default"])({}, props, {
|
|
82
79
|
onKeyDown: function onKeyDown(event) {
|
|
83
80
|
switch (event.key) {
|
|
84
81
|
case 'ArrowDown':
|