@digigov/ui 0.21.3 → 0.22.0
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 +15 -1
- package/admin/AutoComplete/AccesibleAutoComplete/index.d.ts +5 -0
- package/admin/AutoComplete/AccesibleAutoComplete/index.js +106 -0
- package/admin/AutoComplete/AutoComplete.stories.d.ts +13 -0
- package/admin/AutoComplete/AutoComplete.stories.js +115 -0
- package/admin/AutoComplete/Status/index.d.ts +40 -0
- package/admin/AutoComplete/Status/index.js +184 -0
- package/admin/AutoComplete/__stories__/Default.d.ts +3 -0
- package/admin/AutoComplete/__stories__/Default.js +34 -0
- package/admin/AutoComplete/__stories__/WithAutoSelect.d.ts +3 -0
- package/admin/AutoComplete/__stories__/WithAutoSelect.js +35 -0
- package/admin/AutoComplete/__stories__/WithDefaultValue.d.ts +3 -0
- package/admin/AutoComplete/__stories__/WithDefaultValue.js +33 -0
- package/admin/AutoComplete/__stories__/WithInLine.d.ts +3 -0
- package/admin/AutoComplete/__stories__/WithInLine.js +33 -0
- package/admin/AutoComplete/__stories__/WithMinLength.d.ts +3 -0
- package/admin/AutoComplete/__stories__/WithMinLength.js +35 -0
- package/admin/AutoComplete/__stories__/WithPlaceHolder.d.ts +3 -0
- package/admin/AutoComplete/__stories__/WithPlaceHolder.js +33 -0
- package/admin/AutoComplete/__stories__/WithShowAllValues.d.ts +3 -0
- package/admin/AutoComplete/__stories__/WithShowAllValues.js +33 -0
- package/admin/AutoComplete/index.d.ts +101 -0
- package/admin/AutoComplete/index.js +744 -0
- package/admin/AutoComplete/index.mdx +46 -0
- package/admin/AutoComplete/utils.d.ts +1 -0
- package/admin/AutoComplete/utils.js +13 -0
- package/admin/Drawer/__stories__/Default.js +1 -1
- package/admin/Drawer/index.mdx +12 -0
- package/admin/FilterSection/index.d.ts +1 -0
- package/admin/FilterSection/index.js +14 -0
- package/admin/Pagination/__stories__/Default.js +38 -14
- package/admin/Pagination/index.mdx +12 -0
- package/admin/index.d.ts +1 -0
- package/admin/index.js +13 -0
- package/app/Confirmation/Confirmation.mdx +9 -0
- package/app/CopyToClipboard/CopyToClipboard.stories.d.ts +2 -0
- package/app/CopyToClipboard/CopyToClipboard.stories.js +28 -0
- package/app/CopyToClipboard/__stories__/Banner.d.ts +3 -0
- package/app/CopyToClipboard/__stories__/Banner.js +30 -0
- package/app/CopyToClipboard/__stories__/Default.js +4 -114
- package/app/CopyToClipboard/__stories__/MultipleCopies.d.ts +3 -0
- package/app/CopyToClipboard/__stories__/MultipleCopies.js +142 -0
- package/app/CopyToClipboard/index.mdx +22 -0
- package/app/Footer/Footer.mdx +27 -0
- package/app/Header/index.mdx +18 -0
- package/app/I18nText.js +7 -7
- package/app/NotFound/index.mdx +12 -0
- package/app/PhaseBannerHeader/index.mdx +12 -0
- package/core/Accordion/index.mdx +13 -86
- package/core/BackLink/index.mdx +16 -0
- package/core/Blockquote/index.mdx +17 -2
- package/core/Breadcrumbs/__stories__/Default.js +9 -1
- package/core/Breadcrumbs/breadcrumbs.mdx +22 -0
- package/core/Button/Button.mdx +37 -2
- package/core/Button/Button.stories.d.ts +2 -0
- package/core/Button/Button.stories.js +28 -0
- package/core/Button/__stories__/CallToActionButton.d.ts +3 -0
- package/core/Button/__stories__/CallToActionButton.js +22 -0
- package/core/Button/__stories__/Disabled.d.ts +6 -0
- package/core/Button/__stories__/Disabled.js +27 -0
- package/core/Button/__stories__/Warning.d.ts +1 -0
- package/core/Button/__stories__/Warning.js +4 -2
- package/core/Card/Card.stories.d.ts +1 -0
- package/core/Card/Card.stories.js +14 -0
- package/core/Card/__stories__/WithClickableLink.js +1 -3
- package/core/Card/__stories__/WithGroupButton.d.ts +3 -0
- package/core/Card/__stories__/WithGroupButton.js +32 -0
- package/core/Card/card.mdx +78 -0
- package/core/Checkboxes/Checkbox.stories.d.ts +1 -0
- package/core/Checkboxes/Checkbox.stories.js +14 -0
- package/core/Checkboxes/__stories__/NoneAnswerWithError.d.ts +3 -0
- package/core/Checkboxes/__stories__/NoneAnswerWithError.js +51 -0
- package/core/Checkboxes/checkboxes.mdx +54 -0
- package/core/Confirmation/confirmation.mdx +19 -0
- package/core/DateInput/DateInput.stories.d.ts +1 -0
- package/core/DateInput/DateInput.stories.js +14 -0
- package/core/DateInput/__stories__/Default.js +3 -1
- package/core/DateInput/__stories__/MultipleQuestions.d.ts +3 -0
- package/core/DateInput/__stories__/MultipleQuestions.js +41 -0
- package/core/DateInput/index.mdx +34 -0
- package/core/Details/index.mdx +9 -25
- package/core/ErrorMessage/__stories__/Default.js +1 -1
- package/core/ErrorMessage/index.mdx +21 -0
- package/core/ErrorSummary/__stories__/LinkedToCheckbox.js +1 -1
- package/core/ErrorSummary/index.mdx +21 -38
- package/core/FileUpload/__stories__/Default.d.ts +1 -0
- package/core/FileUpload/__stories__/Default.js +4 -2
- package/core/FileUpload/index.mdx +22 -0
- package/core/Link/__stories__/DarkBackground.js +1 -1
- package/core/Link/__stories__/DarkBackgroundNoUnderline.js +1 -1
- package/core/Link/link.mdx +30 -0
- package/core/List/index.mdx +22 -3
- package/core/Masthead/masthead.mdx +14 -0
- package/core/NavList/NavList.d.ts +1 -14
- package/core/NavList/NavList.js +11 -70
- package/core/NavList/NavListBase.d.ts +4 -0
- package/core/NavList/NavListBase.js +74 -0
- package/core/NavList/NavListSubMenu.d.ts +1 -1
- package/core/NavList/NavListSubMenu.js +2 -2
- package/core/NavList/types.d.ts +13 -0
- package/core/NavList/types.js +5 -0
- package/core/NotificationBanner/index.mdx +13 -60
- package/core/PhaseBanner/PhaseBanner.stories.d.ts +1 -0
- package/core/PhaseBanner/PhaseBanner.stories.js +14 -0
- package/core/PhaseBanner/__stories__/Underlined.d.ts +3 -0
- package/core/PhaseBanner/__stories__/Underlined.js +34 -0
- package/core/PhaseBanner/index.mdx +24 -0
- package/core/Radios/__stories__/Default.js +1 -3
- package/core/Radios/__stories__/MultipleQuestions.js +1 -1
- package/core/Radios/index.mdx +56 -0
- package/core/Select/Select.stories.d.ts +1 -0
- package/core/Select/Select.stories.js +14 -0
- package/core/Select/__stories__/WithHint.d.ts +3 -0
- package/core/Select/__stories__/WithHint.js +45 -0
- package/core/Select/index.mdx +36 -0
- package/core/SummaryList/SummaryList.stories.d.ts +2 -2
- package/core/SummaryList/SummaryList.stories.js +8 -8
- package/core/SummaryList/__stories__/Default.js +1 -1
- package/core/SummaryList/__stories__/WithActions.d.ts +3 -0
- package/core/SummaryList/__stories__/{SummaryListWithActions.js → WithActions.js} +10 -12
- package/core/SummaryList/__stories__/WithoutBorders.d.ts +3 -0
- package/core/SummaryList/__stories__/{SummaryListWithoutBorders.js → WithoutBorders.js} +5 -5
- package/core/SummaryList/index.mdx +17 -65
- package/core/Table/Table.stories.d.ts +1 -0
- package/core/Table/Table.stories.js +14 -0
- package/core/Table/__stories__/DarkVariant.js +1 -1
- package/core/Table/__stories__/Default.js +1 -1
- package/core/Table/__stories__/TableCaptions.d.ts +3 -0
- package/core/Table/__stories__/TableCaptions.js +30 -0
- package/core/Table/index.mdx +52 -0
- package/core/Tabs/__stories__/Default.d.ts +1 -0
- package/core/Tabs/__stories__/Default.js +6 -2
- package/core/Tabs/index.mdx +10 -2
- package/core/TextArea/index.mdx +50 -0
- package/core/TextInput/index.mdx +59 -0
- package/core/VisuallyHidden/__stories__/Default.js +14 -2
- package/core/VisuallyHidden/index.mdx +17 -0
- package/core/WarningText/index.mdx +10 -35
- package/es/admin/AutoComplete/AccesibleAutoComplete/index.js +87 -0
- package/es/admin/AutoComplete/AutoComplete.stories.js +13 -0
- package/es/admin/AutoComplete/Status/index.js +153 -0
- package/es/admin/AutoComplete/__stories__/Default.js +19 -0
- package/es/admin/AutoComplete/__stories__/WithAutoSelect.js +20 -0
- package/es/admin/AutoComplete/__stories__/WithDefaultValue.js +18 -0
- package/es/admin/AutoComplete/__stories__/WithInLine.js +18 -0
- package/es/admin/AutoComplete/__stories__/WithMinLength.js +19 -0
- package/es/admin/AutoComplete/__stories__/WithPlaceHolder.js +18 -0
- package/es/admin/AutoComplete/__stories__/WithShowAllValues.js +18 -0
- package/es/admin/AutoComplete/index.js +676 -0
- package/es/admin/AutoComplete/index.mdx +46 -0
- package/es/admin/AutoComplete/utils.js +6 -0
- package/es/admin/Drawer/__stories__/Default.js +1 -1
- package/es/admin/Drawer/index.mdx +12 -0
- package/es/admin/FilterSection/index.js +1 -0
- package/es/admin/Pagination/__stories__/Default.js +37 -14
- package/es/admin/Pagination/index.mdx +12 -0
- package/es/admin/index.js +2 -1
- package/es/app/Confirmation/Confirmation.mdx +9 -0
- package/es/app/CopyToClipboard/CopyToClipboard.stories.js +3 -1
- package/es/app/CopyToClipboard/__stories__/Banner.js +16 -0
- package/es/app/CopyToClipboard/__stories__/Default.js +5 -107
- package/es/app/CopyToClipboard/__stories__/MultipleCopies.js +120 -0
- package/es/app/CopyToClipboard/index.mdx +22 -0
- package/es/app/Footer/Footer.mdx +27 -0
- package/es/app/Header/index.mdx +18 -0
- package/es/app/I18nText.js +7 -6
- package/es/app/NotFound/index.mdx +12 -0
- package/es/app/PhaseBannerHeader/index.mdx +12 -0
- package/es/core/Accordion/index.mdx +13 -86
- package/es/core/BackLink/index.mdx +16 -0
- package/es/core/Blockquote/index.mdx +17 -2
- package/es/core/Breadcrumbs/__stories__/Default.js +9 -1
- package/es/core/Breadcrumbs/breadcrumbs.mdx +22 -0
- package/es/core/Button/Button.mdx +37 -2
- package/es/core/Button/Button.stories.js +3 -1
- package/es/core/Button/__stories__/CallToActionButton.js +9 -0
- package/es/core/Button/__stories__/Disabled.js +14 -0
- package/es/core/Button/__stories__/Warning.js +2 -1
- package/es/core/Card/Card.stories.js +2 -1
- package/es/core/Card/__stories__/WithClickableLink.js +2 -3
- package/es/core/Card/__stories__/WithGroupButton.js +11 -0
- package/es/core/Card/card.mdx +78 -0
- package/es/core/Checkboxes/Checkbox.stories.js +1 -0
- package/es/core/Checkboxes/__stories__/NoneAnswerWithError.js +28 -0
- package/es/core/Checkboxes/checkboxes.mdx +54 -0
- package/es/core/Confirmation/confirmation.mdx +19 -0
- package/es/core/DateInput/DateInput.stories.js +1 -0
- package/es/core/DateInput/__stories__/Default.js +3 -1
- package/es/core/DateInput/__stories__/MultipleQuestions.js +20 -0
- package/es/core/DateInput/index.mdx +34 -0
- package/es/core/Details/index.mdx +9 -25
- package/es/core/ErrorMessage/__stories__/Default.js +1 -1
- package/es/core/ErrorMessage/index.mdx +21 -0
- package/es/core/ErrorSummary/__stories__/LinkedToCheckbox.js +1 -1
- package/es/core/ErrorSummary/index.mdx +21 -38
- package/es/core/FileUpload/__stories__/Default.js +2 -1
- package/es/core/FileUpload/index.mdx +22 -0
- package/es/core/Link/__stories__/DarkBackground.js +1 -1
- package/es/core/Link/__stories__/DarkBackgroundNoUnderline.js +1 -1
- package/es/core/Link/link.mdx +30 -0
- package/es/core/List/index.mdx +22 -3
- package/es/core/Masthead/masthead.mdx +14 -0
- package/es/core/NavList/NavList.js +8 -63
- package/es/core/NavList/NavListBase.js +58 -0
- package/es/core/NavList/NavListSubMenu.js +1 -1
- package/es/core/NavList/types.js +1 -0
- package/es/core/NotificationBanner/index.mdx +13 -60
- package/es/core/PhaseBanner/PhaseBanner.stories.js +2 -1
- package/es/core/PhaseBanner/__stories__/Underlined.js +14 -0
- package/es/core/PhaseBanner/index.mdx +24 -0
- package/es/core/Radios/__stories__/Default.js +1 -2
- package/es/core/Radios/__stories__/MultipleQuestions.js +1 -1
- package/es/core/Radios/index.mdx +56 -0
- package/es/core/Select/Select.stories.js +2 -1
- package/es/core/Select/__stories__/WithHint.js +22 -0
- package/es/core/Select/index.mdx +36 -0
- package/es/core/SummaryList/SummaryList.stories.js +2 -2
- package/es/core/SummaryList/__stories__/Default.js +1 -1
- package/es/core/SummaryList/__stories__/WithActions.js +20 -0
- package/es/core/SummaryList/__stories__/WithoutBorders.js +11 -0
- package/es/core/SummaryList/index.mdx +17 -65
- package/es/core/Table/Table.stories.js +1 -0
- package/es/core/Table/__stories__/DarkVariant.js +1 -1
- package/es/core/Table/__stories__/Default.js +1 -1
- package/es/core/Table/__stories__/TableCaptions.js +17 -0
- package/es/core/Table/index.mdx +52 -0
- package/es/core/Tabs/__stories__/Default.js +3 -2
- package/es/core/Tabs/index.mdx +10 -2
- package/es/core/TextArea/index.mdx +50 -0
- package/es/core/TextInput/index.mdx +59 -0
- package/es/core/VisuallyHidden/__stories__/Default.js +9 -5
- package/es/core/VisuallyHidden/index.mdx +17 -0
- package/es/core/WarningText/index.mdx +10 -35
- package/es/govgr/Footer/index.mdx +4 -4
- package/es/introduction.md +4 -1
- package/es/layouts/Grid/Grid.stories.js +2 -1
- package/es/layouts/Grid/__stories__/Inline.js +55 -0
- package/es/layouts/Grid/index.js +1 -0
- package/es/layouts/index.js +2 -0
- package/es/registry.js +57 -17
- package/es/typography/Caption/index.mdx +16 -0
- package/es/typography/Hint/index.mdx +16 -0
- package/es/typography/NormalText/index.mdx +26 -0
- package/es/typography/Paragraph/index.mdx +30 -0
- package/es/typography/Title/index.mdx +12 -0
- package/esm/admin/AutoComplete/AccesibleAutoComplete/index.js +87 -0
- package/esm/admin/AutoComplete/AutoComplete.stories.js +13 -0
- package/esm/admin/AutoComplete/Status/index.js +153 -0
- package/esm/admin/AutoComplete/__stories__/Default.js +19 -0
- package/esm/admin/AutoComplete/__stories__/WithAutoSelect.js +20 -0
- package/esm/admin/AutoComplete/__stories__/WithDefaultValue.js +18 -0
- package/esm/admin/AutoComplete/__stories__/WithInLine.js +18 -0
- package/esm/admin/AutoComplete/__stories__/WithMinLength.js +19 -0
- package/esm/admin/AutoComplete/__stories__/WithPlaceHolder.js +18 -0
- package/esm/admin/AutoComplete/__stories__/WithShowAllValues.js +18 -0
- package/esm/admin/AutoComplete/index.js +676 -0
- package/esm/admin/AutoComplete/index.mdx +46 -0
- package/esm/admin/AutoComplete/utils.js +6 -0
- package/esm/admin/Drawer/__stories__/Default.js +1 -1
- package/esm/admin/Drawer/index.mdx +12 -0
- package/esm/admin/FilterSection/index.js +1 -0
- package/esm/admin/Pagination/__stories__/Default.js +37 -14
- package/esm/admin/Pagination/index.mdx +12 -0
- package/esm/admin/index.js +2 -1
- package/esm/app/Confirmation/Confirmation.mdx +9 -0
- package/esm/app/CopyToClipboard/CopyToClipboard.stories.js +3 -1
- package/esm/app/CopyToClipboard/__stories__/Banner.js +16 -0
- package/esm/app/CopyToClipboard/__stories__/Default.js +5 -107
- package/esm/app/CopyToClipboard/__stories__/MultipleCopies.js +120 -0
- package/esm/app/CopyToClipboard/index.mdx +22 -0
- package/esm/app/Footer/Footer.mdx +27 -0
- package/esm/app/Header/index.mdx +18 -0
- package/esm/app/I18nText.js +7 -6
- package/esm/app/NotFound/index.mdx +12 -0
- package/esm/app/PhaseBannerHeader/index.mdx +12 -0
- package/esm/core/Accordion/index.mdx +13 -86
- package/esm/core/BackLink/index.mdx +16 -0
- package/esm/core/Blockquote/index.mdx +17 -2
- package/esm/core/Breadcrumbs/__stories__/Default.js +9 -1
- package/esm/core/Breadcrumbs/breadcrumbs.mdx +22 -0
- package/esm/core/Button/Button.mdx +37 -2
- package/esm/core/Button/Button.stories.js +3 -1
- package/esm/core/Button/__stories__/CallToActionButton.js +9 -0
- package/esm/core/Button/__stories__/Disabled.js +14 -0
- package/esm/core/Button/__stories__/Warning.js +2 -1
- package/esm/core/Card/Card.stories.js +2 -1
- package/esm/core/Card/__stories__/WithClickableLink.js +2 -3
- package/esm/core/Card/__stories__/WithGroupButton.js +11 -0
- package/esm/core/Card/card.mdx +78 -0
- package/esm/core/Checkboxes/Checkbox.stories.js +1 -0
- package/esm/core/Checkboxes/__stories__/NoneAnswerWithError.js +28 -0
- package/esm/core/Checkboxes/checkboxes.mdx +54 -0
- package/esm/core/Confirmation/confirmation.mdx +19 -0
- package/esm/core/DateInput/DateInput.stories.js +1 -0
- package/esm/core/DateInput/__stories__/Default.js +3 -1
- package/esm/core/DateInput/__stories__/MultipleQuestions.js +20 -0
- package/esm/core/DateInput/index.mdx +34 -0
- package/esm/core/Details/index.mdx +9 -25
- package/esm/core/ErrorMessage/__stories__/Default.js +1 -1
- package/esm/core/ErrorMessage/index.mdx +21 -0
- package/esm/core/ErrorSummary/__stories__/LinkedToCheckbox.js +1 -1
- package/esm/core/ErrorSummary/index.mdx +21 -38
- package/esm/core/FileUpload/__stories__/Default.js +2 -1
- package/esm/core/FileUpload/index.mdx +22 -0
- package/esm/core/Link/__stories__/DarkBackground.js +1 -1
- package/esm/core/Link/__stories__/DarkBackgroundNoUnderline.js +1 -1
- package/esm/core/Link/link.mdx +30 -0
- package/esm/core/List/index.mdx +22 -3
- package/esm/core/Masthead/masthead.mdx +14 -0
- package/esm/core/NavList/NavList.js +8 -63
- package/esm/core/NavList/NavListBase.js +58 -0
- package/esm/core/NavList/NavListSubMenu.js +1 -1
- package/esm/core/NavList/types.js +1 -0
- package/esm/core/NotificationBanner/index.mdx +13 -60
- package/esm/core/PhaseBanner/PhaseBanner.stories.js +2 -1
- package/esm/core/PhaseBanner/__stories__/Underlined.js +14 -0
- package/esm/core/PhaseBanner/index.mdx +24 -0
- package/esm/core/Radios/__stories__/Default.js +1 -2
- package/esm/core/Radios/__stories__/MultipleQuestions.js +1 -1
- package/esm/core/Radios/index.mdx +56 -0
- package/esm/core/Select/Select.stories.js +2 -1
- package/esm/core/Select/__stories__/WithHint.js +22 -0
- package/esm/core/Select/index.mdx +36 -0
- package/esm/core/SummaryList/SummaryList.stories.js +2 -2
- package/esm/core/SummaryList/__stories__/Default.js +1 -1
- package/esm/core/SummaryList/__stories__/WithActions.js +20 -0
- package/esm/core/SummaryList/__stories__/WithoutBorders.js +11 -0
- package/esm/core/SummaryList/index.mdx +17 -65
- package/esm/core/Table/Table.stories.js +1 -0
- package/esm/core/Table/__stories__/DarkVariant.js +1 -1
- package/esm/core/Table/__stories__/Default.js +1 -1
- package/esm/core/Table/__stories__/TableCaptions.js +17 -0
- package/esm/core/Table/index.mdx +52 -0
- package/esm/core/Tabs/__stories__/Default.js +3 -2
- package/esm/core/Tabs/index.mdx +10 -2
- package/esm/core/TextArea/index.mdx +50 -0
- package/esm/core/TextInput/index.mdx +59 -0
- package/esm/core/VisuallyHidden/__stories__/Default.js +9 -5
- package/esm/core/VisuallyHidden/index.mdx +17 -0
- package/esm/core/WarningText/index.mdx +10 -35
- package/esm/govgr/Footer/index.mdx +4 -4
- package/esm/index.js +1 -1
- package/esm/introduction.md +4 -1
- package/esm/layouts/Grid/Grid.stories.js +2 -1
- package/esm/layouts/Grid/__stories__/Inline.js +55 -0
- package/esm/layouts/Grid/index.js +1 -0
- package/esm/layouts/index.js +2 -0
- package/esm/registry.js +57 -17
- package/esm/typography/Caption/index.mdx +16 -0
- package/esm/typography/Hint/index.mdx +16 -0
- package/esm/typography/NormalText/index.mdx +26 -0
- package/esm/typography/Paragraph/index.mdx +30 -0
- package/esm/typography/Title/index.mdx +12 -0
- package/govgr/Footer/index.mdx +4 -4
- package/introduction.md +4 -1
- package/layouts/Grid/Grid.stories.d.ts +1 -0
- package/layouts/Grid/Grid.stories.js +14 -0
- package/layouts/Grid/__stories__/Inline.d.ts +3 -0
- package/layouts/Grid/__stories__/Inline.js +68 -0
- package/layouts/Grid/index.d.ts +1 -0
- package/layouts/Grid/index.js +6 -0
- package/layouts/index.d.ts +2 -0
- package/layouts/index.js +22 -1
- package/package.json +3 -3
- package/registry.d.ts +28 -8
- package/registry.js +85 -25
- package/typography/Caption/index.mdx +16 -0
- package/typography/Hint/index.mdx +16 -0
- package/typography/NormalText/index.mdx +26 -0
- package/typography/Paragraph/index.mdx +30 -0
- package/typography/Title/index.mdx +12 -0
- package/app/NotFound/NotFound.mdx +0 -5
- package/app/QrCodeScanner/index.mdx +0 -7
- package/core/SummaryList/__stories__/SummaryListWithActions.d.ts +0 -3
- package/core/SummaryList/__stories__/SummaryListWithoutBorders.d.ts +0 -3
- package/es/app/NotFound/NotFound.mdx +0 -5
- package/es/app/QrCodeScanner/index.mdx +0 -7
- package/es/core/SummaryList/__stories__/SummaryListWithActions.js +0 -21
- package/es/core/SummaryList/__stories__/SummaryListWithoutBorders.js +0 -11
- package/esm/app/NotFound/NotFound.mdx +0 -5
- package/esm/app/QrCodeScanner/index.mdx +0 -7
- package/esm/core/SummaryList/__stories__/SummaryListWithActions.js +0 -21
- package/esm/core/SummaryList/__stories__/SummaryListWithoutBorders.js +0 -11
|
@@ -1,59 +1,42 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
id: error-summary
|
|
3
|
+
title: ErrorSummary
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Error Summary
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
# ErrorSummary
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
Use this component at the top of a page to summarise any errors a user has made.
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import Paragraph from '@digigov/ui/typography/Paragraph';
|
|
15
|
-
function CustomWarning (props){
|
|
16
|
-
return (
|
|
17
|
-
<ErrorSummary><Paragraph>Action Label</Paragraph></ErrorSummary>
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
export CustomErrorSummary
|
|
11
|
+
When a user makes an error, you must show both an error summary and an error message next to each answer that contains an error.
|
|
12
|
+
|
|
21
13
|
|
|
22
|
-
```
|
|
23
14
|
|
|
24
|
-
|
|
15
|
+
```bash
|
|
16
|
+
import ErrorSummary from '@digigov/ui/core/ErrorSummary';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## How to use
|
|
25
20
|
|
|
26
|
-
|
|
21
|
+
<Story packageName="@digigov/ui" component="core/ErrorSummary" story="Default.tsx" />
|
|
27
22
|
|
|
28
|
-
Use this component at the top of a page to summarise any errors a user has
|
|
29
|
-
made.
|
|
30
23
|
|
|
31
|
-
|
|
32
|
-
message next to each answer that contains an error.
|
|
24
|
+
### Linking from the error summary to each answer
|
|
33
25
|
|
|
34
|
-
|
|
26
|
+
You must link the errors in the error summary to the answer they relate to.
|
|
35
27
|
|
|
36
|
-
|
|
28
|
+
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.
|
|
37
29
|
|
|
38
|
-
|
|
39
|
-
- include the heading "There is a problem"
|
|
40
|
-
- link to each of the answers that have validation errors
|
|
41
|
-
- make sure the error messages in the error summary are worded the same as
|
|
42
|
-
those which appear next to the inputs with errors
|
|
30
|
+
<Story packageName="@digigov/ui" component="core/ErrorSummary" story="LinkedToInput.tsx" />
|
|
43
31
|
|
|
44
|
-
|
|
45
|
-
example, by adding "Error: " to the beginning of the page `<title>` so screen
|
|
46
|
-
readers read it out as soon as possible.
|
|
32
|
+
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.
|
|
47
33
|
|
|
48
|
-
|
|
34
|
+
If you do not know which field contains an error, link to the first field.
|
|
49
35
|
|
|
50
|
-
|
|
36
|
+
<Story packageName="@digigov/ui" component="core/ErrorSummary" story="LinkedToField.tsx" />
|
|
51
37
|
|
|
52
|
-
|
|
38
|
+
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.
|
|
53
39
|
|
|
54
|
-
<
|
|
55
|
-
<br />
|
|
40
|
+
<Story packageName="@digigov/ui" component="core/ErrorSummary" story="LinkedToCheckbox.tsx" />
|
|
56
41
|
|
|
57
|
-
### Styles
|
|
58
42
|
|
|
59
|
-
<StylesDoc data={ErrorSummary.__doc__} />
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.Default = void 0;
|
|
10
|
+
exports["default"] = exports.Default = void 0;
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
|
|
@@ -29,4 +29,6 @@ var Default = function Default() {
|
|
|
29
29
|
return _ref;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
exports.Default = Default;
|
|
32
|
+
exports.Default = Default;
|
|
33
|
+
var _default = Default;
|
|
34
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: file-upload
|
|
3
|
+
title: FileUpload
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# FileUpload
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
import FileUpload from '@digigov/ui/core/FileUpload';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## How to use
|
|
15
|
+
|
|
16
|
+
<Story packageName="@digigov/ui" component="core/FileUpload" story="Default.tsx" />
|
|
17
|
+
|
|
18
|
+
### Error message
|
|
19
|
+
|
|
20
|
+
Error messages should be styled like this:
|
|
21
|
+
|
|
22
|
+
<Story packageName="@digigov/ui" component="core/FileUpload" story="WithErrorMessage.tsx" />
|
|
@@ -13,7 +13,7 @@ var _Link = _interopRequireDefault(require("@digigov/ui/core/Link"));
|
|
|
13
13
|
|
|
14
14
|
var _layouts = require("@digigov/ui/layouts");
|
|
15
15
|
|
|
16
|
-
var _Divider = _interopRequireDefault(require("
|
|
16
|
+
var _Divider = _interopRequireDefault(require("@digigov/ui/core/Divider"));
|
|
17
17
|
|
|
18
18
|
var _ref = /*#__PURE__*/_react["default"].createElement(_layouts.Masthead, null, /*#__PURE__*/_react["default"].createElement(_Divider["default"], null), /*#__PURE__*/_react["default"].createElement(_Link["default"], {
|
|
19
19
|
href: "#"
|
|
@@ -13,7 +13,7 @@ var _Link = _interopRequireDefault(require("@digigov/ui/core/Link"));
|
|
|
13
13
|
|
|
14
14
|
var _layouts = require("@digigov/ui/layouts");
|
|
15
15
|
|
|
16
|
-
var _Divider = _interopRequireDefault(require("
|
|
16
|
+
var _Divider = _interopRequireDefault(require("@digigov/ui/core/Divider"));
|
|
17
17
|
|
|
18
18
|
var _ref = /*#__PURE__*/_react["default"].createElement(_layouts.Masthead, null, /*#__PURE__*/_react["default"].createElement(_Divider["default"], null), /*#__PURE__*/_react["default"].createElement(_Link["default"], {
|
|
19
19
|
href: "#",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: link
|
|
3
|
+
title: Link
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
import Link from '@digigov/ui/core/Link';
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## How to use
|
|
11
|
+
|
|
12
|
+
### Default
|
|
13
|
+
|
|
14
|
+
<Story packageName="@digigov/ui" component="core/Link" story="Default.tsx" />
|
|
15
|
+
|
|
16
|
+
### No Underline
|
|
17
|
+
|
|
18
|
+
<Story packageName="@digigov/ui" component="core/Link" story="NoUnderline.tsx" />
|
|
19
|
+
|
|
20
|
+
### Opens in a new tab
|
|
21
|
+
|
|
22
|
+
<Story packageName="@digigov/ui" component="core/Link" story="OpensInNewTab.tsx" />
|
|
23
|
+
|
|
24
|
+
### At dark background
|
|
25
|
+
|
|
26
|
+
<Story packageName="@digigov/ui" component="core/Link" story="DarkBackground.tsx" />
|
|
27
|
+
|
|
28
|
+
### At dark background and no underline
|
|
29
|
+
|
|
30
|
+
<Story packageName="@digigov/ui" component="core/Link" story="DarkBackgroundNoUnderline.tsx" />
|
package/core/List/index.mdx
CHANGED
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
---
|
|
2
|
+
id: list
|
|
2
3
|
title: List
|
|
3
|
-
parent: docs/ui/components
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import List, { ListItem } from '@digigov/ui/core/List';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
```bash
|
|
8
|
+
import List from '@digigov/ui/core/List';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## How to use
|
|
12
|
+
|
|
13
|
+
### Default
|
|
14
|
+
|
|
15
|
+
<Story packageName="@digigov/ui" component="core/List" story="Default.tsx" />
|
|
16
|
+
|
|
17
|
+
### List with bullets
|
|
18
|
+
|
|
19
|
+
<Story packageName="@digigov/ui" component="core/List" story="BulletList.tsx" />
|
|
20
|
+
|
|
21
|
+
### List with numbers
|
|
22
|
+
|
|
23
|
+
<Story packageName="@digigov/ui" component="core/List" story="NumberedList.tsx" />
|
|
24
|
+
|
|
25
|
+
### List with extra space
|
|
26
|
+
|
|
27
|
+
<Story packageName="@digigov/ui" component="core/List" story="WithExtraSpace.tsx" />
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { BaseCSSProperties } from '@material-ui/core/styles/withStyles';
|
|
4
|
-
export declare const useNavListStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"vertical" | "root" | "subMenu" | "floating" | "floatClear">;
|
|
5
|
-
export interface NavListProps {
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
className?: string;
|
|
8
|
-
horizontal?: boolean;
|
|
9
|
-
openSubMenus?: boolean;
|
|
10
|
-
floating?: boolean;
|
|
11
|
-
subMenu?: boolean;
|
|
12
|
-
links?: NavLinkInterface[];
|
|
13
|
-
style?: BaseCSSProperties;
|
|
14
|
-
}
|
|
15
|
-
export declare const NavListBase: React.FC<NavListProps>;
|
|
2
|
+
import { NavListProps } from '@digigov/ui/core/NavList/types';
|
|
16
3
|
export declare const NavList: React.FC<NavListProps>;
|
|
17
4
|
export default NavList;
|
package/core/NavList/NavList.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
exports["default"] = exports.NavList = void 0;
|
|
9
9
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
@@ -13,83 +13,24 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
13
13
|
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
|
|
16
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
|
-
|
|
18
|
-
var _styles = require("@material-ui/core/styles");
|
|
19
|
-
|
|
20
16
|
var _NavListContext = require("@digigov/ui/core/NavList/NavListContext");
|
|
21
17
|
|
|
22
|
-
var
|
|
23
|
-
_excluded2 = ["horizontal", "openSubMenus", "links"];
|
|
24
|
-
var useNavListStyles = (0, _styles.makeStyles)(function (theme) {
|
|
25
|
-
return {
|
|
26
|
-
root: {
|
|
27
|
-
padding: theme.spacing(0),
|
|
28
|
-
margin: theme.spacing(0),
|
|
29
|
-
display: 'flex',
|
|
30
|
-
'&$vertical': {
|
|
31
|
-
flexDirection: 'column'
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
subMenu: {
|
|
35
|
-
marginLeft: theme.spacing(3)
|
|
36
|
-
},
|
|
37
|
-
floating: {
|
|
38
|
-
left: 0,
|
|
39
|
-
zIndex: 99,
|
|
40
|
-
position: 'absolute',
|
|
41
|
-
background: theme.palette.grey['100'],
|
|
42
|
-
borderTop: "1px solid ".concat(theme.palette.grey['500']),
|
|
43
|
-
borderRight: "1px solid ".concat(theme.palette.grey['500']),
|
|
44
|
-
borderLeft: "1px solid ".concat(theme.palette.grey['500']),
|
|
45
|
-
margin: theme.spacing(1.5, 0, 0, 0),
|
|
46
|
-
boxShadow: theme.shadows[3],
|
|
47
|
-
'& > li': {
|
|
48
|
-
width: '100%',
|
|
49
|
-
borderBottom: "1px solid ".concat(theme.palette.grey['500']),
|
|
50
|
-
margin: 0
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
vertical: {},
|
|
54
|
-
floatClear: {
|
|
55
|
-
clear: 'both'
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}, {
|
|
59
|
-
name: 'MuiNavList'
|
|
60
|
-
});
|
|
61
|
-
exports.useNavListStyles = useNavListStyles;
|
|
18
|
+
var _NavListBase = require("@digigov/ui/core/NavList/NavListBase");
|
|
62
19
|
|
|
63
|
-
var
|
|
64
|
-
var className = _ref.className,
|
|
65
|
-
children = _ref.children,
|
|
66
|
-
floating = _ref.floating,
|
|
67
|
-
horizontal = _ref.horizontal,
|
|
68
|
-
subMenu = _ref.subMenu,
|
|
69
|
-
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
70
|
-
var classes = useNavListStyles();
|
|
71
|
-
return /*#__PURE__*/_react["default"].createElement("nav", null, /*#__PURE__*/_react["default"].createElement("ul", {
|
|
72
|
-
style: props.style,
|
|
73
|
-
className: (0, _clsx["default"])(className, classes.root, !horizontal && classes.vertical, floating && classes.floating, subMenu && classes.subMenu)
|
|
74
|
-
}, children), /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
|
-
className: classes.floatClear
|
|
76
|
-
}));
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
exports.NavListBase = NavListBase;
|
|
20
|
+
var _excluded = ["horizontal", "openSubMenus", "links"];
|
|
80
21
|
|
|
81
|
-
var NavList = function NavList(
|
|
82
|
-
var horizontal =
|
|
83
|
-
|
|
84
|
-
openSubMenus =
|
|
85
|
-
|
|
86
|
-
links =
|
|
87
|
-
props = (0, _objectWithoutProperties2["default"])(
|
|
22
|
+
var NavList = function NavList(_ref) {
|
|
23
|
+
var horizontal = _ref.horizontal,
|
|
24
|
+
_ref$openSubMenus = _ref.openSubMenus,
|
|
25
|
+
openSubMenus = _ref$openSubMenus === void 0 ? false : _ref$openSubMenus,
|
|
26
|
+
_ref$links = _ref.links,
|
|
27
|
+
links = _ref$links === void 0 ? [] : _ref$links,
|
|
28
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
88
29
|
return /*#__PURE__*/_react["default"].createElement(_NavListContext.NavListProvider, {
|
|
89
30
|
openSubMenus: openSubMenus,
|
|
90
31
|
horizontal: horizontal,
|
|
91
32
|
links: links
|
|
92
|
-
}, /*#__PURE__*/_react["default"].createElement(NavListBase, (0, _extends2["default"])({
|
|
33
|
+
}, /*#__PURE__*/_react["default"].createElement(_NavListBase.NavListBase, (0, _extends2["default"])({
|
|
93
34
|
horizontal: horizontal
|
|
94
35
|
}, props)));
|
|
95
36
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NavListProps } from '@digigov/ui/core/NavList/types';
|
|
3
|
+
export declare const useNavListStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"vertical" | "root" | "subMenu" | "floating" | "floatClear">;
|
|
4
|
+
export declare const NavListBase: React.FC<NavListProps>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.useNavListStyles = exports.NavListBase = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
15
|
+
|
|
16
|
+
var _styles = require("@material-ui/core/styles");
|
|
17
|
+
|
|
18
|
+
var _excluded = ["className", "children", "floating", "horizontal", "subMenu"];
|
|
19
|
+
var useNavListStyles = (0, _styles.makeStyles)(function (theme) {
|
|
20
|
+
return {
|
|
21
|
+
root: {
|
|
22
|
+
padding: theme.spacing(0),
|
|
23
|
+
margin: theme.spacing(0),
|
|
24
|
+
display: 'flex',
|
|
25
|
+
'&$vertical': {
|
|
26
|
+
flexDirection: 'column'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
subMenu: {
|
|
30
|
+
marginLeft: theme.spacing(3)
|
|
31
|
+
},
|
|
32
|
+
floating: {
|
|
33
|
+
left: 0,
|
|
34
|
+
zIndex: 99,
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
background: theme.palette.grey['100'],
|
|
37
|
+
borderTop: "1px solid ".concat(theme.palette.grey['500']),
|
|
38
|
+
borderRight: "1px solid ".concat(theme.palette.grey['500']),
|
|
39
|
+
borderLeft: "1px solid ".concat(theme.palette.grey['500']),
|
|
40
|
+
margin: theme.spacing(1.5, 0, 0, 0),
|
|
41
|
+
boxShadow: theme.shadows[3],
|
|
42
|
+
'& > li': {
|
|
43
|
+
width: '100%',
|
|
44
|
+
borderBottom: "1px solid ".concat(theme.palette.grey['500']),
|
|
45
|
+
margin: 0
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
vertical: {},
|
|
49
|
+
floatClear: {
|
|
50
|
+
clear: 'both'
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
54
|
+
name: 'MuiNavList'
|
|
55
|
+
});
|
|
56
|
+
exports.useNavListStyles = useNavListStyles;
|
|
57
|
+
|
|
58
|
+
var NavListBase = function NavListBase(_ref) {
|
|
59
|
+
var className = _ref.className,
|
|
60
|
+
children = _ref.children,
|
|
61
|
+
floating = _ref.floating,
|
|
62
|
+
horizontal = _ref.horizontal,
|
|
63
|
+
subMenu = _ref.subMenu,
|
|
64
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
65
|
+
var classes = useNavListStyles();
|
|
66
|
+
return /*#__PURE__*/_react["default"].createElement("nav", null, /*#__PURE__*/_react["default"].createElement("ul", {
|
|
67
|
+
style: props.style,
|
|
68
|
+
className: (0, _clsx["default"])(className, classes.root, !horizontal && classes.vertical, floating && classes.floating, subMenu && classes.subMenu)
|
|
69
|
+
}, children), /*#__PURE__*/_react["default"].createElement("div", {
|
|
70
|
+
className: classes.floatClear
|
|
71
|
+
}));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
exports.NavListBase = NavListBase;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { NavListProps } from '@digigov/ui/core/NavList';
|
|
2
|
+
import { NavListProps } from '@digigov/ui/core/NavList/types';
|
|
3
3
|
import { NavLinkInterface } from '@digigov/ui/core/NavList/NavListContext';
|
|
4
4
|
export interface NavListSubMenuProps extends NavListProps {
|
|
5
5
|
links: NavLinkInterface[];
|
|
@@ -15,7 +15,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _NavListBase = require("@digigov/ui/core/NavList/NavListBase");
|
|
19
19
|
|
|
20
20
|
var _NavListItemBase = _interopRequireDefault(require("@digigov/ui/core/NavList/NavListItemBase"));
|
|
21
21
|
|
|
@@ -34,7 +34,7 @@ var NavListSubMenu = function NavListSubMenu(_ref) {
|
|
|
34
34
|
var _useContext = (0, _react.useContext)(_NavListContext["default"]),
|
|
35
35
|
horizontal = _useContext.horizontal;
|
|
36
36
|
|
|
37
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
37
|
+
return /*#__PURE__*/_react["default"].createElement(_NavListBase.NavListBase, (0, _extends2["default"])({
|
|
38
38
|
subMenu: true,
|
|
39
39
|
floating: horizontal
|
|
40
40
|
}, props), links && links.map(function (subMenuLink, key) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NavLinkInterface } from '@digigov/ui/core/NavList/NavListContext';
|
|
3
|
+
import { BaseCSSProperties } from '@material-ui/core/styles/withStyles';
|
|
4
|
+
export interface NavListProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
horizontal?: boolean;
|
|
8
|
+
openSubMenus?: boolean;
|
|
9
|
+
floating?: boolean;
|
|
10
|
+
subMenu?: boolean;
|
|
11
|
+
links?: NavLinkInterface[];
|
|
12
|
+
style?: BaseCSSProperties;
|
|
13
|
+
}
|
|
@@ -1,75 +1,28 @@
|
|
|
1
1
|
---
|
|
2
|
+
id: notification-banner
|
|
2
3
|
title: NotificationBanner
|
|
3
|
-
parent: docs/ui/components
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# NotificationBanner
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
This component is currently experimental because more research is needed to validate it.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Use a notification banner to tell the user about something they need to know about, but that’s not directly related to the page content.
|
|
11
|
+
|
|
11
12
|
|
|
12
|
-
```jsx live path=layouts/Basic/index.tsx
|
|
13
|
-
import Header, { HeaderTitle } from '@digigov/ui/app/Header';
|
|
14
|
-
import Paragraph from '@digigov/ui/typography/Paragraph';
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
This is important !
|
|
20
|
-
</NotificationBanner>
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
|
-
export NotificationBanner
|
|
14
|
+
```bash
|
|
15
|
+
import NotificationBanner from '@digigov/ui/core/NotificationBanner';
|
|
16
|
+
```
|
|
24
17
|
|
|
25
|
-
|
|
18
|
+
## How to use
|
|
26
19
|
|
|
27
|
-
|
|
20
|
+
Use a ‘neutral’ blue notification banner if the user needs to know about a problem with the service as a whole.
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
Use a ‘neutral’ notification banner if the user needs to know about something that’s happening elsewhere in the service.
|
|
30
23
|
|
|
31
|
-
|
|
32
|
-
import Header, { HeaderTitle } from '@digigov/ui/app/Header';
|
|
33
|
-
import GovGRLogo from '@digigov/ui/govgr/Logo';
|
|
24
|
+
<Story packageName="@digigov/ui" component="core/NotificationBanner" story="Default.tsx" />
|
|
34
25
|
|
|
26
|
+
You can also use a notification banner to tell the user about the outcome of something they’ve just done - but they have not finished using the service, so it does not make sense to use a confirmation page.
|
|
35
27
|
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<NotificationBanner variant="success">
|
|
39
|
-
Training outcome recorded and trainee withdrawn
|
|
40
|
-
</NotificationBanner>
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
export NotificationBanner
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
<br />
|
|
48
|
-
|
|
49
|
-
## When to use this component
|
|
50
|
-
|
|
51
|
-
A notification banner lets you tell the user about something that’s not directly relevant to the thing they’re trying to do on that page of the service. For example:
|
|
52
|
-
|
|
53
|
-
- telling the user about a problem that’s affecting the service as a whole (for example, delays in processing applications because of an emergency)
|
|
54
|
-
- telling the user about something that affects them in particular (for example, an approaching deadline they need to meet)
|
|
55
|
-
- telling the user about the outcome of something they’ve just done on a previous page (for example, confirming that an email has been sent)
|
|
56
|
-
|
|
57
|
-
## When not to use this component
|
|
58
|
-
|
|
59
|
-
Use notification banners sparingly. There’s evidence that people often miss them, and using them too often is likely to make this problem worse.
|
|
60
|
-
|
|
61
|
-
If the information is directly relevant to the thing the user is doing on that page, put the information in the main page content instead. Use inset text or warning text if it needs to stand out.
|
|
62
|
-
|
|
63
|
-
Don’t use a notification banner to tell the user about validation errors (use an error message and error summary instead).
|
|
64
|
-
|
|
65
|
-
### API
|
|
66
|
-
|
|
67
|
-
### Properties
|
|
68
|
-
|
|
69
|
-
<PropsDoc data={NotificationBanner.__doc__} />
|
|
70
|
-
|
|
71
|
-
<br />
|
|
72
|
-
|
|
73
|
-
### Styles
|
|
74
|
-
|
|
75
|
-
<StylesDoc data={NotificationBanner.__doc__} />
|
|
28
|
+
<Story packageName="@digigov/ui" component="core/NotificationBanner" story="Success.tsx" />
|
|
@@ -23,6 +23,20 @@ Object.keys(_Default).forEach(function (key) {
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
|
+
|
|
27
|
+
var _Underlined = require("./__stories__/Underlined");
|
|
28
|
+
|
|
29
|
+
Object.keys(_Underlined).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
32
|
+
if (key in exports && exports[key] === _Underlined[key]) return;
|
|
33
|
+
Object.defineProperty(exports, key, {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function get() {
|
|
36
|
+
return _Underlined[key];
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
26
40
|
var _default = {
|
|
27
41
|
title: 'Digigov UI/core/PhaseBanner',
|
|
28
42
|
component: _PhaseBanner["default"]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = exports.Underlined = void 0;
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _PhaseBanner = _interopRequireWildcard(require("@digigov/ui/core/PhaseBanner"));
|
|
15
|
+
|
|
16
|
+
var _Link = _interopRequireDefault(require("@digigov/ui/core/Link"));
|
|
17
|
+
|
|
18
|
+
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); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_PhaseBanner["default"], {
|
|
23
|
+
underline: true
|
|
24
|
+
}, /*#__PURE__*/_react["default"].createElement(_PhaseBanner.PhaseBannerTag, null, "ALPHA"), /*#__PURE__*/_react["default"].createElement(_PhaseBanner.PhaseBannerText, null, "\u0391\u03C5\u03C4\u03AE \u03B5\u03AF\u03BD\u03B1\u03B9 \u03BC\u03AF\u03B1 \u03BD\u03AD\u03B1 \u03C5\u03C0\u03B7\u03C1\u03B5\u03C3\u03AF\u03B1 \u2013 \u03C4\u03B1 ", /*#__PURE__*/_react["default"].createElement(_Link["default"], {
|
|
25
|
+
href: "#feedback"
|
|
26
|
+
}, "\u03C3\u03C7\u03CC\u03BB\u03B9\u03AC"), " \u03C3\u03B1\u03C2 \u03B8\u03B1 \u03BC\u03B1\u03C2 \u03B2\u03BF\u03B7\u03B8\u03AE\u03C3\u03BF\u03C5\u03BD \u03BD\u03B1 \u03C4\u03B7 \u03B2\u03B5\u03BB\u03C4\u03B9\u03CE\u03C3\u03BF\u03C5\u03BC\u03B5."));
|
|
27
|
+
|
|
28
|
+
var Underlined = function Underlined() {
|
|
29
|
+
return _ref;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.Underlined = Underlined;
|
|
33
|
+
var _default = Underlined;
|
|
34
|
+
exports["default"] = _default;
|