@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
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "4",
|
|
3
|
+
"stories": {
|
|
4
|
+
"digigov-ui-admin-modal--alert-dialog": {
|
|
5
|
+
"actionSets": [
|
|
6
|
+
{
|
|
7
|
+
"actions": [
|
|
8
|
+
{
|
|
9
|
+
"name": "click",
|
|
10
|
+
"args": {
|
|
11
|
+
"selector": "html>body>div:nth-child(5)>div>button"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"id": "Dk4oIFwRzm6e",
|
|
16
|
+
"title": "Alert dialog action"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"digigov-ui-admin-modal--default": {
|
|
21
|
+
"actionSets": [
|
|
22
|
+
{
|
|
23
|
+
"actions": [
|
|
24
|
+
{
|
|
25
|
+
"name": "click",
|
|
26
|
+
"args": {
|
|
27
|
+
"selector": "html>body>div:nth-child(5)>div>button"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"id": "YyIZkcmdBlRP",
|
|
32
|
+
"title": "Open modal action"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
Modal,
|
|
@@ -11,10 +11,18 @@ import { Button } from '@digigov/ui/core/Button';
|
|
|
11
11
|
import { Paragraph } from '@digigov/ui/typography/Paragraph';
|
|
12
12
|
|
|
13
13
|
export const AlertDialog = () => {
|
|
14
|
+
const [open, setOpen] = useState(false);
|
|
14
15
|
return (
|
|
15
16
|
<div>
|
|
17
|
+
<Button
|
|
18
|
+
onClick={() => {
|
|
19
|
+
setOpen(!open);
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
Άνοιξε Modal
|
|
23
|
+
</Button>
|
|
16
24
|
<Modal
|
|
17
|
-
open
|
|
25
|
+
open={open}
|
|
18
26
|
role="alertdialog"
|
|
19
27
|
aria-labelledby="modal-label"
|
|
20
28
|
aria-describedby="modal-content"
|
|
@@ -27,7 +35,14 @@ export const AlertDialog = () => {
|
|
|
27
35
|
</ModalContent>
|
|
28
36
|
<ModalAction>
|
|
29
37
|
<Button>Διαγραφή</Button>
|
|
30
|
-
<Button
|
|
38
|
+
<Button
|
|
39
|
+
variant="link"
|
|
40
|
+
onClick={() => {
|
|
41
|
+
setOpen(!open);
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
Ακύρωση
|
|
45
|
+
</Button>
|
|
31
46
|
</ModalAction>
|
|
32
47
|
</Modal>
|
|
33
48
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
Modal,
|
|
@@ -13,9 +13,17 @@ import { FieldContainer } from '@digigov/ui/core/FieldContainer';
|
|
|
13
13
|
import { LabelContainer } from '@digigov/ui/core/LabelContainer';
|
|
14
14
|
|
|
15
15
|
export const Default = () => {
|
|
16
|
+
const [open, setOpen] = useState(false);
|
|
16
17
|
return (
|
|
17
18
|
<div>
|
|
18
|
-
<
|
|
19
|
+
<Button
|
|
20
|
+
onClick={() => {
|
|
21
|
+
setOpen(!open);
|
|
22
|
+
}}
|
|
23
|
+
>
|
|
24
|
+
Άνοιξε Modal
|
|
25
|
+
</Button>
|
|
26
|
+
<Modal open={open} aria-labelledby="modal-label">
|
|
19
27
|
<ModalHeading id="modal-label">Προσθήκη τηλεφώνου</ModalHeading>
|
|
20
28
|
<ModalContent>
|
|
21
29
|
<FieldContainer>
|
|
@@ -27,7 +35,14 @@ export const Default = () => {
|
|
|
27
35
|
</ModalContent>
|
|
28
36
|
<ModalAction>
|
|
29
37
|
<Button>Υποβολή</Button>
|
|
30
|
-
<Button
|
|
38
|
+
<Button
|
|
39
|
+
variant="link"
|
|
40
|
+
onClick={() => {
|
|
41
|
+
setOpen(!open);
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
Ακύρωση
|
|
45
|
+
</Button>
|
|
31
46
|
</ModalAction>
|
|
32
47
|
</Modal>
|
|
33
48
|
</div>
|
|
@@ -15,11 +15,7 @@ import Modal, {ModalHeading, ModalContent, ModalAction} from "@digigov/ui/admin/
|
|
|
15
15
|
|
|
16
16
|
### As an Alert Dialog
|
|
17
17
|
|
|
18
|
-
<Story
|
|
19
|
-
packageName="@digigov/ui"
|
|
20
|
-
component="admin/Modal"
|
|
21
|
-
story="AlertDialog.tsx"
|
|
22
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="admin/Modal" story="AlertDialog.tsx" />
|
|
23
19
|
|
|
24
20
|
## Accessibility
|
|
25
21
|
|
|
@@ -15,26 +15,15 @@ import Footer from '@digigov/ui/app/Footer';
|
|
|
15
15
|
|
|
16
16
|
### Footer with logos
|
|
17
17
|
|
|
18
|
-
<Story
|
|
19
|
-
packageName="@digigov/ui"
|
|
20
|
-
component="app/Footer"
|
|
21
|
-
story="FooterWithLogo.tsx"
|
|
22
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="app/Footer" story="FooterWithLogo.tsx" />
|
|
23
19
|
|
|
24
20
|
### Footer with secondary navigation
|
|
25
21
|
|
|
26
|
-
<Story
|
|
27
|
-
packageName="@digigov/ui"
|
|
28
|
-
component="app/Footer"
|
|
29
|
-
story="FooterWithSecondaryNavigation.tsx"
|
|
30
|
-
/>
|
|
22
|
+
<Story packageName="@digigov/ui" component="app/Footer" story="FooterWithSecondaryNavigation.tsx" />
|
|
31
23
|
|
|
32
24
|
### Footer with links to meta information
|
|
33
25
|
|
|
34
|
-
<Story
|
|
35
|
-
packageName="@digigov/ui"
|
|
36
|
-
component="app/Footer"
|
|
37
|
-
story="FooterWithLink.tsx"
|
|
26
|
+
<Story packageName="@digigov/ui" component="app/Footer" story="FooterWithLink.tsx"
|
|
38
27
|
/>
|
|
39
28
|
|
|
40
29
|
### All inclusive footer
|
package/src/app/Header/index.mdx
CHANGED
|
@@ -11,28 +11,15 @@ import Header from '@digigov/ui/app/Header';
|
|
|
11
11
|
|
|
12
12
|
### Default header
|
|
13
13
|
|
|
14
|
-
<Story
|
|
15
|
-
title="### Default"
|
|
16
|
-
packageName="@digigov/ui"
|
|
17
|
-
component="app/Header"
|
|
18
|
-
story="Default.tsx"
|
|
19
|
-
/>
|
|
14
|
+
<Story title="### Default" packageName="@digigov/ui" component="app/Header" story="Default.tsx" />
|
|
20
15
|
|
|
21
16
|
### Header with service name
|
|
22
17
|
|
|
23
|
-
<Story
|
|
24
|
-
packageName="@digigov/ui"
|
|
25
|
-
component="app/Header"
|
|
26
|
-
story="WithServiceName.tsx"
|
|
27
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="app/Header" story="WithServiceName.tsx" />
|
|
28
19
|
|
|
29
20
|
### Header with service logo and service name
|
|
30
21
|
|
|
31
|
-
<Story
|
|
32
|
-
packageName="@digigov/ui"
|
|
33
|
-
component="app/Header"
|
|
34
|
-
story="WithServiceNameAndLogo.tsx"
|
|
35
|
-
/>
|
|
22
|
+
<Story packageName="@digigov/ui" component="app/Header" story="WithServiceNameAndLogo.tsx" />
|
|
36
23
|
|
|
37
24
|
### Default header with navigation
|
|
38
25
|
|
|
@@ -11,11 +11,7 @@ import QrCodeViewer from '@digigov/ui/app/QrCodeViewer';
|
|
|
11
11
|
|
|
12
12
|
### Default QrCodeViewer
|
|
13
13
|
|
|
14
|
-
<Story
|
|
15
|
-
packageName="@digigov/ui"
|
|
16
|
-
component="app/QrCodeViewer"
|
|
17
|
-
story="Default.tsx"
|
|
18
|
-
/>
|
|
14
|
+
<Story packageName="@digigov/ui" component="app/QrCodeViewer" story="Default.tsx" />
|
|
19
15
|
|
|
20
16
|
### Custom QrCodeViewer
|
|
21
17
|
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
{
|
|
9
9
|
"name": "click",
|
|
10
10
|
"args": {
|
|
11
|
-
"selector": "
|
|
11
|
+
"selector": "html>body>div:nth-child(5)>div>details:nth-child(2)>summary"
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
|
-
"id": "
|
|
15
|
+
"id": "ZB3bfJynL-CN",
|
|
16
16
|
"title": "Mouse navigation"
|
|
17
17
|
}
|
|
18
18
|
]
|
|
@@ -15,21 +15,13 @@ import Accordion from '@digigov/ui/core/Accordion';
|
|
|
15
15
|
|
|
16
16
|
## How to use
|
|
17
17
|
|
|
18
|
-
<Story
|
|
19
|
-
packageName="@digigov/ui"
|
|
20
|
-
component="core/Accordion"
|
|
21
|
-
story="Default.tsx"
|
|
22
|
-
/>
|
|
18
|
+
<Story packageName="@digigov/ui" component="core/Accordion" story="Default.tsx" />
|
|
23
19
|
|
|
24
20
|
### Accordion with Hints
|
|
25
21
|
|
|
26
22
|
Accordions hide content, so the labels need to be clear. If necessary, you can add a summary line to help users understand what is in the section.
|
|
27
23
|
|
|
28
|
-
<Story
|
|
29
|
-
packageName="@digigov/ui"
|
|
30
|
-
component="core/Accordion"
|
|
31
|
-
story="WithHints.tsx"
|
|
32
|
-
/>
|
|
24
|
+
<Story packageName="@digigov/ui" component="core/Accordion" story="WithHints.tsx" />
|
|
33
25
|
|
|
34
26
|
## Accessibility
|
|
35
27
|
|
|
@@ -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/src/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/src/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/src/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
|
|
|
@@ -8,8 +8,4 @@ export default {
|
|
|
8
8
|
displayName: 'NavList',
|
|
9
9
|
};
|
|
10
10
|
export * from '@digigov/ui/core/NavList/__stories__/Default';
|
|
11
|
-
export * from '@digigov/ui/core/NavList/__stories__/
|
|
12
|
-
export * from '@digigov/ui/core/NavList/__stories__/NavListVerticalAutoExample';
|
|
13
|
-
export * from '@digigov/ui/core/NavList/__stories__/NavListSecondaryAutoExample';
|
|
14
|
-
export * from '@digigov/ui/core/NavList/__stories__/NavListEpathlaExample';
|
|
15
|
-
export * from '@digigov/ui/core/NavList/__stories__/NavHorizontalLayout';
|
|
11
|
+
export * from '@digigov/ui/core/NavList/__stories__/NavVerticalLayout';
|
|
@@ -14,7 +14,7 @@ export const NavListBaseAuto: React.FC<NavListAutoProps> = ({
|
|
|
14
14
|
}) => {
|
|
15
15
|
return (
|
|
16
16
|
<Nav open={true} layout={layout} {...props} aria-orientation={layout}>
|
|
17
|
-
<NavList
|
|
17
|
+
<NavList>{children}</NavList>
|
|
18
18
|
</Nav>
|
|
19
19
|
);
|
|
20
20
|
};
|
|
@@ -2,13 +2,11 @@ import React, { useContext } from 'react';
|
|
|
2
2
|
import { NavListItemLink } from '@digigov/ui/core/NavList/NavListItemLink';
|
|
3
3
|
import NavListContextAuto from '@digigov/ui/core/NavList/NavListAuto/NavListContextAuto';
|
|
4
4
|
import NavListItem from '@digigov/react-core/NavListItem';
|
|
5
|
-
import { NavListLayout } from '@digigov/ui/core/NavList/types';
|
|
6
5
|
|
|
7
6
|
interface NavListItemAnchorAutoProps {
|
|
8
7
|
name: string;
|
|
9
8
|
href?: string;
|
|
10
9
|
active?: boolean;
|
|
11
|
-
layout?: NavListLayout;
|
|
12
10
|
children?: React.ReactNode;
|
|
13
11
|
}
|
|
14
12
|
|
|
@@ -16,14 +14,13 @@ export const NavListItemAnchorAuto: React.FC<NavListItemAnchorAutoProps> = ({
|
|
|
16
14
|
name,
|
|
17
15
|
href,
|
|
18
16
|
active,
|
|
19
|
-
layout,
|
|
20
17
|
children,
|
|
21
18
|
...props
|
|
22
19
|
}) => {
|
|
23
20
|
const { container, setRegisterLink } = useContext(NavListContextAuto);
|
|
24
21
|
|
|
25
22
|
return (
|
|
26
|
-
<NavListItem
|
|
23
|
+
<NavListItem>
|
|
27
24
|
{setRegisterLink && (
|
|
28
25
|
<NavListItemLink
|
|
29
26
|
href={href}
|