@digigov/ui 0.21.2 → 0.23.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 +39 -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/{app/CopyToClipboard → admin/AutoComplete}/__stories__/Default.d.ts +0 -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/CopyToClipboard/CopyToClipboard.stories.d.ts +9 -0
- package/admin/CopyToClipboard/CopyToClipboard.stories.js +58 -0
- package/admin/CopyToClipboard/__stories__/Banner.d.ts +3 -0
- package/admin/CopyToClipboard/__stories__/Banner.js +30 -0
- package/admin/CopyToClipboard/__stories__/Default.d.ts +3 -0
- package/admin/CopyToClipboard/__stories__/Default.js +32 -0
- package/admin/CopyToClipboard/__stories__/MultipleCopies.d.ts +3 -0
- package/{app/CopyToClipboard/__stories__/Default.js → admin/CopyToClipboard/__stories__/MultipleCopies.js} +20 -18
- package/admin/CopyToClipboard/index.d.ts +1 -1
- package/admin/CopyToClipboard/index.js +3 -2
- package/admin/CopyToClipboard/index.mdx +22 -0
- package/admin/Drawer/__stories__/Default.js +1 -1
- package/admin/Drawer/index.mdx +12 -0
- package/admin/Dropdown/Dropdown.stories.d.ts +9 -0
- package/admin/Dropdown/Dropdown.stories.js +60 -0
- package/admin/Dropdown/__stories__/AlignRight.d.ts +3 -0
- package/admin/Dropdown/__stories__/AlignRight.js +83 -0
- package/admin/Dropdown/__stories__/Default.d.ts +3 -0
- package/admin/Dropdown/__stories__/Default.js +75 -0
- package/admin/Dropdown/__stories__/PlacementTop.d.ts +3 -0
- package/admin/Dropdown/__stories__/PlacementTop.js +83 -0
- package/admin/Dropdown/index.d.ts +7 -1
- package/admin/Dropdown/index.js +29 -1
- package/admin/Dropdown/index.mdx +29 -0
- package/admin/FilterSection/index.d.ts +1 -0
- package/admin/FilterSection/index.js +14 -0
- package/admin/Modal/Modal.stories.d.ts +8 -0
- package/admin/Modal/Modal.stories.js +44 -0
- package/admin/Modal/__stories__/AlertDialog.d.ts +3 -0
- package/admin/Modal/__stories__/AlertDialog.js +80 -0
- package/admin/Modal/__stories__/Default.d.ts +3 -0
- package/admin/Modal/__stories__/Default.js +79 -0
- package/admin/Modal/index.mdx +26 -0
- package/admin/Pagination/__stories__/Default.js +57 -16
- package/admin/Pagination/index.mdx +12 -0
- package/admin/index.d.ts +2 -1
- package/admin/index.js +17 -4
- package/api/fetchAPI.js +6 -4
- package/api/index.spec.js +18 -19
- package/api/useResource.js +6 -4
- package/api/useResourceAction.js +6 -4
- package/api/useResourceQuery.js +7 -4
- package/api/utils.js +8 -6
- package/app/Confirmation/Confirmation.mdx +9 -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/__stories__/Default.js +17 -1
- package/core/Accordion/__stories__/WithHints.js +17 -1
- package/core/Accordion/index.mdx +16 -84
- package/core/BackLink/index.mdx +16 -0
- package/core/Blockquote/index.mdx +17 -2
- package/core/Breadcrumbs/__stories__/Default.js +13 -1
- package/core/Breadcrumbs/breadcrumbs.mdx +22 -0
- package/core/Button/Button.stories.d.ts +5 -0
- package/core/Button/Button.stories.js +72 -0
- package/core/Button/__stories__/Back.d.ts +4 -0
- package/core/Button/__stories__/Back.js +26 -0
- package/core/Button/__stories__/ButtonLinkButton.d.ts +6 -0
- package/core/Button/__stories__/ButtonLinkButton.js +30 -0
- package/core/Button/__stories__/CallToActionButton.d.ts +6 -0
- package/core/Button/__stories__/CallToActionButton.js +30 -0
- package/core/Button/__stories__/Disabled.d.ts +6 -0
- package/core/Button/__stories__/Disabled.js +27 -0
- package/core/Button/__stories__/GroupingButtonsAndLinks.js +3 -1
- package/core/Button/__stories__/Primary.js +3 -1
- package/core/Button/__stories__/Secondary.js +3 -2
- package/core/Button/__stories__/Warning.js +2 -1
- package/core/Button/__stories__/WithVariantLink.d.ts +6 -0
- package/core/Button/__stories__/WithVariantLink.js +29 -0
- package/core/Button/index.mdx +97 -0
- 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__/ConditionalReveal.js +5 -1
- package/core/Checkboxes/__stories__/Default.js +5 -1
- package/core/Checkboxes/__stories__/MultipleQuestions.js +6 -2
- package/core/Checkboxes/__stories__/NoneAnswer.js +5 -1
- package/core/Checkboxes/__stories__/NoneAnswerWithError.d.ts +3 -0
- package/core/Checkboxes/__stories__/NoneAnswerWithError.js +57 -0
- package/core/Checkboxes/__stories__/WithErrorMessage.js +7 -1
- package/core/Checkboxes/__stories__/WithHint.js +5 -1
- 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 +4 -2
- package/core/Link/__stories__/DarkBackgroundNoUnderline.js +4 -2
- package/core/Link/__stories__/Default.js +3 -1
- package/core/Link/__stories__/NoUnderline.js +3 -1
- package/core/Link/link.mdx +34 -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 +14 -71
- package/core/NavList/NavList.stories.d.ts +8 -0
- package/core/NavList/NavList.stories.js +44 -0
- package/core/NavList/NavListBase.d.ts +4 -0
- package/core/NavList/NavListBase.js +76 -0
- package/core/NavList/NavListItem.d.ts +1 -0
- package/core/NavList/NavListItem.js +3 -1
- package/core/NavList/NavListItemBase.d.ts +1 -0
- package/core/NavList/NavListItemBase.js +7 -3
- package/core/NavList/NavListSubMenu.d.ts +1 -1
- package/core/NavList/NavListSubMenu.js +2 -2
- package/core/NavList/__stories__/Default.d.ts +3 -0
- package/core/NavList/__stories__/Default.js +69 -0
- package/core/NavList/__stories__/NavHorizontalLayout.d.ts +3 -0
- package/core/NavList/__stories__/NavHorizontalLayout.js +67 -0
- package/core/NavList/index.mdx +22 -1
- package/core/NavList/types.d.ts +14 -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/{admin/CopyToClipboardMessage/index.js → core/PhaseBanner/__stories__/Underlined.js} +21 -17
- package/core/PhaseBanner/index.mdx +24 -0
- package/core/Radios/__stories__/ConditionalReveal.js +5 -1
- package/core/Radios/__stories__/Default.js +1 -3
- package/core/Radios/__stories__/Inline.js +5 -1
- package/core/Radios/__stories__/MultipleQuestions.js +7 -3
- package/core/Radios/__stories__/WithErrorMessage.js +7 -1
- package/core/Radios/__stories__/WithHints.js +17 -7
- 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__/Default.js +2 -2
- package/core/Select/__stories__/DisabledInput.js +3 -1
- package/core/Select/__stories__/WithHint.d.ts +3 -0
- package/core/Select/__stories__/WithHint.js +45 -0
- package/core/Select/index.mdx +42 -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/TableFloatingScroll.d.ts +3 -0
- package/core/Table/TableFloatingScroll.js +105 -0
- package/core/Table/__stories__/DarkVariant.js +1 -1
- package/core/Table/__stories__/Default.js +1 -1
- package/core/Table/__stories__/NoData.js +3 -1
- package/core/Table/__stories__/TableCaptions.d.ts +3 -0
- package/core/Table/__stories__/TableCaptions.js +30 -0
- package/core/Table/__stories__/WithLoader.js +16 -12
- package/core/Table/index.d.ts +1 -0
- package/core/Table/index.js +13 -0
- package/core/Table/index.mdx +59 -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/CopyToClipboard/CopyToClipboard.stories.js +8 -0
- package/es/admin/CopyToClipboard/__stories__/Banner.js +16 -0
- package/es/admin/CopyToClipboard/__stories__/Default.js +18 -0
- package/{esm/app/CopyToClipboard/__stories__/Default.js → es/admin/CopyToClipboard/__stories__/MultipleCopies.js} +10 -8
- package/es/admin/CopyToClipboard/index.js +3 -2
- package/es/admin/CopyToClipboard/index.mdx +22 -0
- package/es/admin/Drawer/__stories__/Default.js +1 -1
- package/es/admin/Drawer/index.mdx +12 -0
- package/es/admin/Dropdown/Dropdown.stories.js +9 -0
- package/es/admin/Dropdown/__stories__/AlignRight.js +56 -0
- package/es/admin/Dropdown/__stories__/Default.js +48 -0
- package/es/admin/Dropdown/__stories__/PlacementTop.js +56 -0
- package/es/admin/Dropdown/index.js +28 -1
- package/es/admin/Dropdown/index.mdx +29 -0
- package/es/admin/FilterSection/index.js +1 -0
- package/es/admin/Modal/Modal.stories.js +7 -0
- package/es/admin/Modal/__stories__/AlertDialog.js +58 -0
- package/es/admin/Modal/__stories__/Default.js +56 -0
- package/es/admin/Modal/index.mdx +26 -0
- package/es/admin/Pagination/__stories__/Default.js +56 -16
- package/es/admin/Pagination/index.mdx +12 -0
- package/es/admin/index.js +3 -2
- package/es/api/fetchAPI.js +6 -3
- package/es/api/index.spec.js +19 -17
- package/es/api/useResource.js +6 -3
- package/es/api/useResourceAction.js +6 -3
- package/es/api/useResourceQuery.js +6 -3
- package/es/api/utils.js +8 -5
- package/es/app/Confirmation/Confirmation.mdx +9 -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/__stories__/Default.js +17 -1
- package/es/core/Accordion/__stories__/WithHints.js +17 -1
- package/es/core/Accordion/index.mdx +16 -84
- package/es/core/BackLink/index.mdx +16 -0
- package/es/core/Blockquote/index.mdx +17 -2
- package/es/core/Breadcrumbs/__stories__/Default.js +13 -1
- package/es/core/Breadcrumbs/breadcrumbs.mdx +22 -0
- package/es/core/Button/Button.stories.js +7 -1
- package/es/core/Button/__stories__/Back.js +13 -0
- package/es/core/Button/__stories__/ButtonLinkButton.js +17 -0
- package/es/core/Button/__stories__/CallToActionButton.js +17 -0
- package/es/core/Button/__stories__/Disabled.js +14 -0
- package/es/core/Button/__stories__/GroupingButtonsAndLinks.js +3 -1
- package/es/core/Button/__stories__/Primary.js +3 -1
- package/es/core/Button/__stories__/Secondary.js +3 -2
- package/es/core/Button/__stories__/Warning.js +2 -1
- package/es/core/Button/__stories__/WithVariantLink.js +16 -0
- package/es/core/Button/index.mdx +97 -0
- 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__/ConditionalReveal.js +5 -1
- package/es/core/Checkboxes/__stories__/Default.js +5 -1
- package/es/core/Checkboxes/__stories__/MultipleQuestions.js +6 -2
- package/es/core/Checkboxes/__stories__/NoneAnswer.js +5 -1
- package/es/core/Checkboxes/__stories__/NoneAnswerWithError.js +34 -0
- package/es/core/Checkboxes/__stories__/WithErrorMessage.js +7 -1
- package/es/core/Checkboxes/__stories__/WithHint.js +5 -1
- 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 +7 -5
- package/es/core/Link/__stories__/DarkBackgroundNoUnderline.js +7 -5
- package/es/core/Link/__stories__/Default.js +5 -3
- package/es/core/Link/__stories__/NoUnderline.js +5 -3
- package/es/core/Link/link.mdx +34 -0
- package/es/core/List/index.mdx +22 -3
- package/es/core/Masthead/masthead.mdx +14 -0
- package/es/core/NavList/NavList.js +11 -64
- package/es/core/NavList/NavList.stories.js +7 -0
- package/es/core/NavList/NavListBase.js +60 -0
- package/es/core/NavList/NavListItem.js +3 -1
- package/es/core/NavList/NavListItemBase.js +7 -3
- package/es/core/NavList/NavListSubMenu.js +1 -1
- package/es/core/NavList/__stories__/Default.js +48 -0
- package/es/core/NavList/__stories__/NavHorizontalLayout.js +46 -0
- package/es/core/NavList/index.mdx +22 -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__/ConditionalReveal.js +5 -1
- package/es/core/Radios/__stories__/Default.js +1 -2
- package/es/core/Radios/__stories__/Inline.js +5 -1
- package/es/core/Radios/__stories__/MultipleQuestions.js +7 -3
- package/es/core/Radios/__stories__/WithErrorMessage.js +7 -1
- package/es/core/Radios/__stories__/WithHints.js +17 -7
- package/es/core/Radios/index.mdx +56 -0
- package/es/core/Select/Select.stories.js +2 -1
- package/es/core/Select/__stories__/Default.js +5 -4
- package/es/core/Select/__stories__/DisabledInput.js +5 -3
- package/es/core/Select/__stories__/WithHint.js +23 -0
- package/es/core/Select/index.mdx +42 -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/TableFloatingScroll.js +85 -0
- package/es/core/Table/__stories__/DarkVariant.js +1 -1
- package/es/core/Table/__stories__/Default.js +1 -1
- package/es/core/Table/__stories__/NoData.js +3 -1
- package/es/core/Table/__stories__/TableCaptions.js +17 -0
- package/es/core/Table/__stories__/WithLoader.js +12 -10
- package/es/core/Table/index.js +2 -1
- package/es/core/Table/index.mdx +59 -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/Basic/Content/index.mdx +0 -12
- package/es/layouts/Basic/Main/index.mdx +0 -10
- package/es/layouts/Basic/Masthead/index.mdx +0 -12
- package/es/layouts/Basic/Side/index.mdx +0 -12
- package/es/layouts/Basic/Top/index.mdx +0 -12
- package/es/layouts/Basic/index.mdx +1 -15
- package/es/layouts/Grid/Grid.stories.js +2 -1
- package/es/layouts/Grid/__stories__/Default.js +26 -6
- package/es/layouts/Grid/__stories__/Inline.js +75 -0
- package/es/layouts/Grid/index.js +1 -0
- package/es/layouts/index.js +2 -0
- package/es/registry.js +66 -30
- package/es/test-utils/delay.js +6 -3
- 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/CopyToClipboard/CopyToClipboard.stories.js +8 -0
- package/esm/admin/CopyToClipboard/__stories__/Banner.js +16 -0
- package/esm/admin/CopyToClipboard/__stories__/Default.js +18 -0
- package/{es/app/CopyToClipboard/__stories__/Default.js → esm/admin/CopyToClipboard/__stories__/MultipleCopies.js} +10 -8
- package/esm/admin/CopyToClipboard/index.js +3 -2
- package/esm/admin/CopyToClipboard/index.mdx +22 -0
- package/esm/admin/Drawer/__stories__/Default.js +1 -1
- package/esm/admin/Drawer/index.mdx +12 -0
- package/esm/admin/Dropdown/Dropdown.stories.js +9 -0
- package/esm/admin/Dropdown/__stories__/AlignRight.js +56 -0
- package/esm/admin/Dropdown/__stories__/Default.js +48 -0
- package/esm/admin/Dropdown/__stories__/PlacementTop.js +56 -0
- package/esm/admin/Dropdown/index.js +28 -1
- package/esm/admin/Dropdown/index.mdx +29 -0
- package/esm/admin/FilterSection/index.js +1 -0
- package/esm/admin/Modal/Modal.stories.js +7 -0
- package/esm/admin/Modal/__stories__/AlertDialog.js +58 -0
- package/esm/admin/Modal/__stories__/Default.js +56 -0
- package/esm/admin/Modal/index.mdx +26 -0
- package/esm/admin/Pagination/__stories__/Default.js +56 -16
- package/esm/admin/Pagination/index.mdx +12 -0
- package/esm/admin/index.js +3 -2
- package/esm/api/fetchAPI.js +6 -3
- package/esm/api/index.spec.js +19 -17
- package/esm/api/useResource.js +6 -3
- package/esm/api/useResourceAction.js +6 -3
- package/esm/api/useResourceQuery.js +6 -3
- package/esm/api/utils.js +8 -5
- package/esm/app/Confirmation/Confirmation.mdx +9 -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/__stories__/Default.js +17 -1
- package/esm/core/Accordion/__stories__/WithHints.js +17 -1
- package/esm/core/Accordion/index.mdx +16 -84
- package/esm/core/BackLink/index.mdx +16 -0
- package/esm/core/Blockquote/index.mdx +17 -2
- package/esm/core/Breadcrumbs/__stories__/Default.js +13 -1
- package/esm/core/Breadcrumbs/breadcrumbs.mdx +22 -0
- package/esm/core/Button/Button.stories.js +7 -1
- package/esm/core/Button/__stories__/Back.js +13 -0
- package/esm/core/Button/__stories__/ButtonLinkButton.js +17 -0
- package/esm/core/Button/__stories__/CallToActionButton.js +17 -0
- package/esm/core/Button/__stories__/Disabled.js +14 -0
- package/esm/core/Button/__stories__/GroupingButtonsAndLinks.js +3 -1
- package/esm/core/Button/__stories__/Primary.js +3 -1
- package/esm/core/Button/__stories__/Secondary.js +3 -2
- package/esm/core/Button/__stories__/Warning.js +2 -1
- package/esm/core/Button/__stories__/WithVariantLink.js +16 -0
- package/esm/core/Button/index.mdx +97 -0
- 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__/ConditionalReveal.js +5 -1
- package/esm/core/Checkboxes/__stories__/Default.js +5 -1
- package/esm/core/Checkboxes/__stories__/MultipleQuestions.js +6 -2
- package/esm/core/Checkboxes/__stories__/NoneAnswer.js +5 -1
- package/esm/core/Checkboxes/__stories__/NoneAnswerWithError.js +34 -0
- package/esm/core/Checkboxes/__stories__/WithErrorMessage.js +7 -1
- package/esm/core/Checkboxes/__stories__/WithHint.js +5 -1
- 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 +7 -5
- package/esm/core/Link/__stories__/DarkBackgroundNoUnderline.js +7 -5
- package/esm/core/Link/__stories__/Default.js +5 -3
- package/esm/core/Link/__stories__/NoUnderline.js +5 -3
- package/esm/core/Link/link.mdx +34 -0
- package/esm/core/List/index.mdx +22 -3
- package/esm/core/Masthead/masthead.mdx +14 -0
- package/esm/core/NavList/NavList.js +11 -64
- package/esm/core/NavList/NavList.stories.js +7 -0
- package/esm/core/NavList/NavListBase.js +60 -0
- package/esm/core/NavList/NavListItem.js +3 -1
- package/esm/core/NavList/NavListItemBase.js +7 -3
- package/esm/core/NavList/NavListSubMenu.js +1 -1
- package/esm/core/NavList/__stories__/Default.js +48 -0
- package/esm/core/NavList/__stories__/NavHorizontalLayout.js +46 -0
- package/esm/core/NavList/index.mdx +22 -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__/ConditionalReveal.js +5 -1
- package/esm/core/Radios/__stories__/Default.js +1 -2
- package/esm/core/Radios/__stories__/Inline.js +5 -1
- package/esm/core/Radios/__stories__/MultipleQuestions.js +7 -3
- package/esm/core/Radios/__stories__/WithErrorMessage.js +7 -1
- package/esm/core/Radios/__stories__/WithHints.js +17 -7
- package/esm/core/Radios/index.mdx +56 -0
- package/esm/core/Select/Select.stories.js +2 -1
- package/esm/core/Select/__stories__/Default.js +5 -4
- package/esm/core/Select/__stories__/DisabledInput.js +5 -3
- package/esm/core/Select/__stories__/WithHint.js +23 -0
- package/esm/core/Select/index.mdx +42 -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/TableFloatingScroll.js +85 -0
- package/esm/core/Table/__stories__/DarkVariant.js +1 -1
- package/esm/core/Table/__stories__/Default.js +1 -1
- package/esm/core/Table/__stories__/NoData.js +3 -1
- package/esm/core/Table/__stories__/TableCaptions.js +17 -0
- package/esm/core/Table/__stories__/WithLoader.js +12 -10
- package/esm/core/Table/index.js +2 -1
- package/esm/core/Table/index.mdx +59 -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/Basic/Content/index.mdx +0 -12
- package/esm/layouts/Basic/Main/index.mdx +0 -10
- package/esm/layouts/Basic/Masthead/index.mdx +0 -12
- package/esm/layouts/Basic/Side/index.mdx +0 -12
- package/esm/layouts/Basic/Top/index.mdx +0 -12
- package/esm/layouts/Basic/index.mdx +1 -15
- package/esm/layouts/Grid/Grid.stories.js +2 -1
- package/esm/layouts/Grid/__stories__/Default.js +26 -6
- package/esm/layouts/Grid/__stories__/Inline.js +75 -0
- package/esm/layouts/Grid/index.js +1 -0
- package/esm/layouts/index.js +2 -0
- package/esm/registry.js +66 -30
- package/esm/test-utils/delay.js +6 -3
- 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/Basic/Content/index.mdx +0 -12
- package/layouts/Basic/Main/index.mdx +0 -10
- package/layouts/Basic/Masthead/index.mdx +0 -12
- package/layouts/Basic/Side/index.mdx +0 -12
- package/layouts/Basic/Top/index.mdx +0 -12
- package/layouts/Basic/index.mdx +1 -15
- package/layouts/Grid/Grid.stories.d.ts +1 -0
- package/layouts/Grid/Grid.stories.js +14 -0
- package/layouts/Grid/__stories__/Default.js +26 -6
- package/layouts/Grid/__stories__/Inline.d.ts +3 -0
- package/layouts/Grid/__stories__/Inline.js +88 -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 +33 -15
- package/registry.js +99 -45
- package/test-utils/delay.js +5 -3
- 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/admin/CopyToClipboardMessage/index.d.ts +0 -3
- package/app/CopyToClipboard/CopyToClipboard.stories.d.ts +0 -7
- package/app/CopyToClipboard/CopyToClipboard.stories.js +0 -30
- package/app/CopyToClipboard/index.d.ts +0 -9
- package/app/CopyToClipboard/index.js +0 -69
- package/app/NotFound/NotFound.mdx +0 -5
- package/app/QrCodeScanner/index.mdx +0 -7
- package/core/Button/Button.mdx +0 -55
- package/core/SummaryList/__stories__/SummaryListWithActions.d.ts +0 -3
- package/core/SummaryList/__stories__/SummaryListWithoutBorders.d.ts +0 -3
- package/es/admin/CopyToClipboardMessage/index.js +0 -3
- package/es/app/CopyToClipboard/CopyToClipboard.stories.js +0 -6
- package/es/app/CopyToClipboard/index.js +0 -45
- package/es/app/NotFound/NotFound.mdx +0 -5
- package/es/app/QrCodeScanner/index.mdx +0 -7
- package/es/core/Button/Button.mdx +0 -55
- package/es/core/SummaryList/__stories__/SummaryListWithActions.js +0 -21
- package/es/core/SummaryList/__stories__/SummaryListWithoutBorders.js +0 -11
- package/esm/admin/CopyToClipboardMessage/index.js +0 -3
- package/esm/app/CopyToClipboard/CopyToClipboard.stories.js +0 -6
- package/esm/app/CopyToClipboard/index.js +0 -45
- package/esm/app/NotFound/NotFound.mdx +0 -5
- package/esm/app/QrCodeScanner/index.mdx +0 -7
- package/esm/core/Button/Button.mdx +0 -55
- package/esm/core/SummaryList/__stories__/SummaryListWithActions.js +0 -21
- package/esm/core/SummaryList/__stories__/SummaryListWithoutBorders.js +0 -11
|
@@ -0,0 +1,75 @@
|
|
|
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.Default = void 0;
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _Dropdown = _interopRequireWildcard(require("@digigov/ui/admin/Dropdown"));
|
|
15
|
+
|
|
16
|
+
var _Field = _interopRequireDefault(require("@digigov/ui/core/Field"));
|
|
17
|
+
|
|
18
|
+
var _Label = _interopRequireDefault(require("@digigov/react-core/Label"));
|
|
19
|
+
|
|
20
|
+
var _Divider = require("@digigov/ui/core/Divider");
|
|
21
|
+
|
|
22
|
+
var _NavVertical = _interopRequireDefault(require("@digigov/react-core/NavVertical"));
|
|
23
|
+
|
|
24
|
+
var _LabelTitle = require("@digigov/react-core/LabelTitle");
|
|
25
|
+
|
|
26
|
+
var _TextInput = _interopRequireDefault(require("@digigov/ui/core/TextInput"));
|
|
27
|
+
|
|
28
|
+
var _NavVerticalItem = _interopRequireDefault(require("@digigov/react-core/NavVerticalItem"));
|
|
29
|
+
|
|
30
|
+
var _Button = _interopRequireDefault(require("@digigov/ui/core/Button"));
|
|
31
|
+
|
|
32
|
+
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); }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_Dropdown["default"], null, /*#__PURE__*/_react["default"].createElement(_Dropdown.DropdownButton, {
|
|
37
|
+
role: "button",
|
|
38
|
+
"aria-haspopup": "true",
|
|
39
|
+
"aria-controls": "menu2",
|
|
40
|
+
arrow: true
|
|
41
|
+
}, "\u0391\u03BD\u03B1\u03B6\u03B7\u03C4\u03B7\u03C3\u03B7"), /*#__PURE__*/_react["default"].createElement(_Dropdown.DropdownContent, {
|
|
42
|
+
role: "menu",
|
|
43
|
+
id: "menu2"
|
|
44
|
+
}, /*#__PURE__*/_react["default"].createElement(_Field["default"], {
|
|
45
|
+
role: "menuitem"
|
|
46
|
+
}, /*#__PURE__*/_react["default"].createElement(_Label["default"], null, /*#__PURE__*/_react["default"].createElement(_LabelTitle.LabelTitle, null, "\u038C\u03BD\u03BF\u03BC\u03B1 \u03C0\u03B5\u03B4\u03AF\u03BF\u03C5"), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
47
|
+
name: "input-name"
|
|
48
|
+
}))), /*#__PURE__*/_react["default"].createElement(_Divider.SectionBreak, {
|
|
49
|
+
visible: true,
|
|
50
|
+
role: "separator"
|
|
51
|
+
}), /*#__PURE__*/_react["default"].createElement(_NavVertical["default"], {
|
|
52
|
+
role: "menu"
|
|
53
|
+
}, /*#__PURE__*/_react["default"].createElement(_NavVerticalItem["default"], {
|
|
54
|
+
role: "menuitem",
|
|
55
|
+
href: "#"
|
|
56
|
+
}, "\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1"), /*#__PURE__*/_react["default"].createElement(_NavVerticalItem["default"], {
|
|
57
|
+
role: "menuitem",
|
|
58
|
+
href: "#"
|
|
59
|
+
}, "\u039C\u03B5\u03C4\u03B1\u03BA\u03AF\u03BD\u03B7\u03C3\u03B7"), /*#__PURE__*/_react["default"].createElement(_NavVerticalItem["default"], {
|
|
60
|
+
role: "menuitem",
|
|
61
|
+
href: "#"
|
|
62
|
+
}, "\u039F\u03C1\u03B9\u03C3\u03C4\u03B9\u03BA\u03AE \u03B4\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE")), /*#__PURE__*/_react["default"].createElement(_Divider.SectionBreak, {
|
|
63
|
+
visible: true,
|
|
64
|
+
role: "separator"
|
|
65
|
+
}), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
66
|
+
role: "menuitem"
|
|
67
|
+
}, "\u0395\u03BD\u03AD\u03C1\u03B3\u03B5\u03B9\u03B1")));
|
|
68
|
+
|
|
69
|
+
var Default = function Default() {
|
|
70
|
+
return _ref;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
exports.Default = Default;
|
|
74
|
+
var _default = Default;
|
|
75
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,83 @@
|
|
|
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.PlacementTop = void 0;
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _Dropdown = _interopRequireWildcard(require("@digigov/ui/admin/Dropdown"));
|
|
15
|
+
|
|
16
|
+
var _Field = _interopRequireDefault(require("@digigov/ui/core/Field"));
|
|
17
|
+
|
|
18
|
+
var _Label = _interopRequireDefault(require("@digigov/react-core/Label"));
|
|
19
|
+
|
|
20
|
+
var _Divider = require("@digigov/ui/core/Divider");
|
|
21
|
+
|
|
22
|
+
var _NavVertical = _interopRequireDefault(require("@digigov/react-core/NavVertical"));
|
|
23
|
+
|
|
24
|
+
var _LabelTitle = require("@digigov/react-core/LabelTitle");
|
|
25
|
+
|
|
26
|
+
var _TextInput = _interopRequireDefault(require("@digigov/ui/core/TextInput"));
|
|
27
|
+
|
|
28
|
+
var _NavVerticalItem = _interopRequireDefault(require("@digigov/react-core/NavVerticalItem"));
|
|
29
|
+
|
|
30
|
+
var _Button = _interopRequireDefault(require("@digigov/ui/core/Button"));
|
|
31
|
+
|
|
32
|
+
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); }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_Dropdown["default"], {
|
|
37
|
+
placement: "top"
|
|
38
|
+
}, /*#__PURE__*/_react["default"].createElement(_Dropdown.DropdownButton, {
|
|
39
|
+
role: "button",
|
|
40
|
+
"aria-haspopup": "true",
|
|
41
|
+
"aria-controls": "menu2",
|
|
42
|
+
arrow: true
|
|
43
|
+
}, "\u0391\u03BD\u03B1\u03B6\u03B7\u03C4\u03B7\u03C3\u03B7"), /*#__PURE__*/_react["default"].createElement(_Dropdown.DropdownContent, {
|
|
44
|
+
role: "menu",
|
|
45
|
+
id: "menu2"
|
|
46
|
+
}, /*#__PURE__*/_react["default"].createElement(_Field["default"], {
|
|
47
|
+
role: "menuitem"
|
|
48
|
+
}, /*#__PURE__*/_react["default"].createElement(_Label["default"], null, /*#__PURE__*/_react["default"].createElement(_LabelTitle.LabelTitle, null, "\u038C\u03BD\u03BF\u03BC\u03B1 \u03C0\u03B5\u03B4\u03AF\u03BF\u03C5"), /*#__PURE__*/_react["default"].createElement(_TextInput["default"], {
|
|
49
|
+
name: "input-name"
|
|
50
|
+
}))), /*#__PURE__*/_react["default"].createElement(_Divider.SectionBreak, {
|
|
51
|
+
visible: true,
|
|
52
|
+
role: "separator"
|
|
53
|
+
}), /*#__PURE__*/_react["default"].createElement(_NavVertical["default"], {
|
|
54
|
+
role: "menu"
|
|
55
|
+
}, /*#__PURE__*/_react["default"].createElement(_NavVerticalItem["default"], {
|
|
56
|
+
role: "menuitem",
|
|
57
|
+
href: "#"
|
|
58
|
+
}, "\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1"), /*#__PURE__*/_react["default"].createElement(_NavVerticalItem["default"], {
|
|
59
|
+
role: "menuitem",
|
|
60
|
+
href: "#"
|
|
61
|
+
}, "\u039C\u03B5\u03C4\u03B1\u03BA\u03AF\u03BD\u03B7\u03C3\u03B7"), /*#__PURE__*/_react["default"].createElement(_NavVerticalItem["default"], {
|
|
62
|
+
role: "menuitem",
|
|
63
|
+
href: "#"
|
|
64
|
+
}, "\u039F\u03C1\u03B9\u03C3\u03C4\u03B9\u03BA\u03AE \u03B4\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE")), /*#__PURE__*/_react["default"].createElement(_Divider.SectionBreak, {
|
|
65
|
+
visible: true,
|
|
66
|
+
role: "separator"
|
|
67
|
+
}), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
68
|
+
role: "menuitem"
|
|
69
|
+
}, "\u0395\u03BD\u03AD\u03C1\u03B3\u03B5\u03B9\u03B1")));
|
|
70
|
+
|
|
71
|
+
var PlacementTop = function PlacementTop() {
|
|
72
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
73
|
+
style: {
|
|
74
|
+
display: 'flex',
|
|
75
|
+
justifyContent: 'center',
|
|
76
|
+
alignItems: 'center'
|
|
77
|
+
}
|
|
78
|
+
}, _ref);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
exports.PlacementTop = PlacementTop;
|
|
82
|
+
var _default = PlacementTop;
|
|
83
|
+
exports["default"] = _default;
|
|
@@ -7,9 +7,15 @@ export interface DropdownProps extends CoreDropdownProps {
|
|
|
7
7
|
* Use closeBehaviour to set the way that the Dropdown will close.
|
|
8
8
|
*/
|
|
9
9
|
closeBehaviour?: 'clickButton' | 'clickOutside';
|
|
10
|
+
/**
|
|
11
|
+
* Use float dropdown to set the dropdown to float over
|
|
12
|
+
* scroll bars and stay on a static position.
|
|
13
|
+
* This is mainly used to show actions in a long table.
|
|
14
|
+
*/
|
|
15
|
+
float?: boolean;
|
|
10
16
|
}
|
|
11
17
|
/**
|
|
12
18
|
* Dropdown component is used for showing more options with a button.
|
|
13
19
|
*/
|
|
14
|
-
export declare const Dropdown: ({ closeBehaviour, ...props }: DropdownProps) => React.ReactElement;
|
|
20
|
+
export declare const Dropdown: ({ closeBehaviour, float, ...props }: DropdownProps) => React.ReactElement;
|
|
15
21
|
export default Dropdown;
|
package/admin/Dropdown/index.js
CHANGED
|
@@ -47,7 +47,7 @@ Object.keys(_DropdownContent).forEach(function (key) {
|
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
|
-
var _excluded = ["closeBehaviour"];
|
|
50
|
+
var _excluded = ["closeBehaviour", "float"];
|
|
51
51
|
|
|
52
52
|
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); }
|
|
53
53
|
|
|
@@ -59,7 +59,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
59
59
|
var Dropdown = function Dropdown(_ref) {
|
|
60
60
|
var _ref$closeBehaviour = _ref.closeBehaviour,
|
|
61
61
|
closeBehaviour = _ref$closeBehaviour === void 0 ? 'clickOutside' : _ref$closeBehaviour,
|
|
62
|
+
_ref$float = _ref["float"],
|
|
63
|
+
_float = _ref$float === void 0 ? false : _ref$float,
|
|
62
64
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
65
|
+
|
|
63
66
|
var innerRef = (0, _react.useRef)();
|
|
64
67
|
(0, _react.useEffect)(function () {
|
|
65
68
|
var handleClickOutside = function handleClickOutside(event) {
|
|
@@ -72,10 +75,35 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
72
75
|
document.addEventListener('click', handleClickOutside, true);
|
|
73
76
|
}
|
|
74
77
|
|
|
78
|
+
var toggleFloat = function toggleFloat() {
|
|
79
|
+
if (innerRef.current.open) {
|
|
80
|
+
var rect = innerRef.current.getBoundingClientRect();
|
|
81
|
+
innerRef.current.style.position = 'static';
|
|
82
|
+
var top = rect.top + window.pageYOffset;
|
|
83
|
+
var left = rect.left + window.pageXOffset;
|
|
84
|
+
innerRef.current.style.top = "".concat(top, "px");
|
|
85
|
+
innerRef.current.style.left = "".concat(left, "px");
|
|
86
|
+
innerRef.current.style.position = "absolute";
|
|
87
|
+
innerRef.current.style.display = "block";
|
|
88
|
+
} else {
|
|
89
|
+
innerRef.current.style.top = "0";
|
|
90
|
+
innerRef.current.style.left = "0";
|
|
91
|
+
innerRef.current.style.position = "relative";
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
if (_float) {
|
|
96
|
+
innerRef.current.addEventListener('toggle', toggleFloat);
|
|
97
|
+
}
|
|
98
|
+
|
|
75
99
|
return function () {
|
|
76
100
|
if (closeBehaviour === 'clickOutside') {
|
|
77
101
|
document.removeEventListener('click', handleClickOutside, true);
|
|
78
102
|
}
|
|
103
|
+
|
|
104
|
+
if (_float) {
|
|
105
|
+
innerRef.current.removeEventListener('toggle', toggleFloat);
|
|
106
|
+
}
|
|
79
107
|
};
|
|
80
108
|
}, []); // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
81
109
|
// @ts-ignore
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: dropdown
|
|
3
|
+
title: Dropdown
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Dropdown
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
import Dropdown from '@digigov/ui/admin/Dropdown';
|
|
10
|
+
```
|
|
11
|
+
## How to use
|
|
12
|
+
|
|
13
|
+
<Story packageName="@digigov/ui" component="admin/Dropdown" story="Default.tsx" />
|
|
14
|
+
|
|
15
|
+
### Dropdown with align right
|
|
16
|
+
|
|
17
|
+
You can display the dropdown menu to the right side of the `Dropdown` button.
|
|
18
|
+
|
|
19
|
+
<Story packageName="@digigov/ui" component="admin/Dropdown" story="AlignRight.tsx" />
|
|
20
|
+
|
|
21
|
+
### Dropdown with placement top
|
|
22
|
+
|
|
23
|
+
You can display the dropdown menu to the top of the `Dropdown` button.
|
|
24
|
+
|
|
25
|
+
<Story packageName="@digigov/ui" component="admin/Dropdown" story="PlacementTop.tsx" />
|
|
26
|
+
|
|
27
|
+
You can read more about the accessibility patterns used in our Dropdown
|
|
28
|
+
implementation in the ARIA Authoring Practices Guide (APG) at
|
|
29
|
+
[Menu Button](https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/) section.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from '@digigov/react-extensions/admin/FilterSection';
|
|
2
|
+
export * from '@digigov/react-extensions/admin/FilterSectionHorizontal';
|
|
2
3
|
export * from '@digigov/react-extensions/admin/FilterHeadingSection';
|
|
3
4
|
export * from '@digigov/react-extensions/admin/FilterContent';
|
|
4
5
|
export * from '@digigov/react-extensions/admin/FilterOptionsSection';
|
|
@@ -22,6 +22,20 @@ Object.keys(_FilterSection).forEach(function (key) {
|
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
+
var _FilterSectionHorizontal = require("@digigov/react-extensions/admin/FilterSectionHorizontal");
|
|
26
|
+
|
|
27
|
+
Object.keys(_FilterSectionHorizontal).forEach(function (key) {
|
|
28
|
+
if (key === "default" || key === "__esModule") return;
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
30
|
+
if (key in exports && exports[key] === _FilterSectionHorizontal[key]) return;
|
|
31
|
+
Object.defineProperty(exports, key, {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function get() {
|
|
34
|
+
return _FilterSectionHorizontal[key];
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
25
39
|
var _FilterHeadingSection = require("@digigov/react-extensions/admin/FilterHeadingSection");
|
|
26
40
|
|
|
27
41
|
Object.keys(_FilterHeadingSection).forEach(function (key) {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
var _exportNames = {};
|
|
9
|
+
exports["default"] = void 0;
|
|
10
|
+
|
|
11
|
+
var _Modal = _interopRequireDefault(require("@digigov/ui/admin/Modal"));
|
|
12
|
+
|
|
13
|
+
var _Default = require("./__stories__/Default");
|
|
14
|
+
|
|
15
|
+
Object.keys(_Default).forEach(function (key) {
|
|
16
|
+
if (key === "default" || key === "__esModule") return;
|
|
17
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
18
|
+
if (key in exports && exports[key] === _Default[key]) return;
|
|
19
|
+
Object.defineProperty(exports, key, {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function get() {
|
|
22
|
+
return _Default[key];
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
var _AlertDialog = require("./__stories__/AlertDialog");
|
|
28
|
+
|
|
29
|
+
Object.keys(_AlertDialog).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] === _AlertDialog[key]) return;
|
|
33
|
+
Object.defineProperty(exports, key, {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function get() {
|
|
36
|
+
return _AlertDialog[key];
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
var _default = {
|
|
41
|
+
title: 'Digigov UI/admin/Modal',
|
|
42
|
+
component: _Modal["default"]
|
|
43
|
+
};
|
|
44
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
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.AlertDialog = void 0;
|
|
11
|
+
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
|
|
16
|
+
var _Modal = _interopRequireWildcard(require("@digigov/ui/admin/Modal"));
|
|
17
|
+
|
|
18
|
+
var _core = require("@digigov/ui/core");
|
|
19
|
+
|
|
20
|
+
var _typography = require("@digigov/ui/typography");
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
function useModal() {
|
|
27
|
+
var _useState = (0, _react.useState)(false),
|
|
28
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
29
|
+
open = _useState2[0],
|
|
30
|
+
setOpen = _useState2[1];
|
|
31
|
+
|
|
32
|
+
function toggleModal() {
|
|
33
|
+
setOpen(!open);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
open: open,
|
|
38
|
+
toggleModal: toggleModal
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_Modal.ModalHeading, {
|
|
43
|
+
id: "modal-label"
|
|
44
|
+
}, "\u0395\u03C0\u03B9\u03B2\u03B5\u03B2\u03B1\u03AF\u03C9\u03C3\u03B7");
|
|
45
|
+
|
|
46
|
+
var _ref2 = /*#__PURE__*/_react["default"].createElement(_Modal.ModalContent, {
|
|
47
|
+
id: "modal-content"
|
|
48
|
+
}, /*#__PURE__*/_react["default"].createElement(_typography.Paragraph, null, "\u0395\u03AF\u03C3\u03C4\u03B5 \u03C3\u03AF\u03B3\u03BF\u03C5\u03C1\u03BF\u03B9 \u03CC\u03C4\u03B9 \u03B8\u03AD\u03BB\u03B5\u03C4\u03B5 \u03BD\u03B1 \u03B4\u03B9\u03B1\u03B3\u03C1\u03AC\u03C8\u03B5\u03C4\u03B5 \u03C4\u03B7\u03BD \u03B5\u03B3\u03B3\u03C1\u03B1\u03C6\u03AE;"));
|
|
49
|
+
|
|
50
|
+
var AlertDialog = function AlertDialog() {
|
|
51
|
+
var _useModal = useModal(),
|
|
52
|
+
open = _useModal.open,
|
|
53
|
+
toggleModal = _useModal.toggleModal;
|
|
54
|
+
|
|
55
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_core.Button, {
|
|
56
|
+
color: "warning",
|
|
57
|
+
onClick: function onClick() {
|
|
58
|
+
return toggleModal();
|
|
59
|
+
}
|
|
60
|
+
}, "\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE"), /*#__PURE__*/_react["default"].createElement(_Modal["default"], {
|
|
61
|
+
open: open,
|
|
62
|
+
role: "alertdialog",
|
|
63
|
+
"aria-modal": "true",
|
|
64
|
+
"aria-labelledby": "modal-label",
|
|
65
|
+
"aria-describedby": "modal-content"
|
|
66
|
+
}, _ref, _ref2, /*#__PURE__*/_react["default"].createElement(_Modal.ModalAction, null, /*#__PURE__*/_react["default"].createElement(_core.Button, {
|
|
67
|
+
onClick: function onClick() {
|
|
68
|
+
return toggleModal();
|
|
69
|
+
}
|
|
70
|
+
}, "\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE"), /*#__PURE__*/_react["default"].createElement(_core.Button, {
|
|
71
|
+
variant: "link",
|
|
72
|
+
onClick: function onClick() {
|
|
73
|
+
return toggleModal();
|
|
74
|
+
}
|
|
75
|
+
}, "\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7"))));
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
exports.AlertDialog = AlertDialog;
|
|
79
|
+
var _default = AlertDialog;
|
|
80
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,79 @@
|
|
|
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.Default = void 0;
|
|
11
|
+
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
|
|
16
|
+
var _Modal = _interopRequireWildcard(require("@digigov/ui/admin/Modal"));
|
|
17
|
+
|
|
18
|
+
var _core = require("@digigov/ui/core");
|
|
19
|
+
|
|
20
|
+
var _Field = _interopRequireDefault(require("@digigov/ui/core/Field"));
|
|
21
|
+
|
|
22
|
+
var _Label = _interopRequireDefault(require("@digigov/react-core/Label"));
|
|
23
|
+
|
|
24
|
+
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); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
function useModal() {
|
|
29
|
+
var _useState = (0, _react.useState)(false),
|
|
30
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
31
|
+
open = _useState2[0],
|
|
32
|
+
setOpen = _useState2[1];
|
|
33
|
+
|
|
34
|
+
function toggleModal() {
|
|
35
|
+
setOpen(!open);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
open: open,
|
|
40
|
+
toggleModal: toggleModal
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_Modal.ModalHeading, {
|
|
45
|
+
id: "modal-label"
|
|
46
|
+
}, "\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C4\u03B7\u03BB\u03B5\u03C6\u03CE\u03BD\u03BF\u03C5");
|
|
47
|
+
|
|
48
|
+
var _ref2 = /*#__PURE__*/_react["default"].createElement(_Modal.ModalContent, null, /*#__PURE__*/_react["default"].createElement(_Field["default"], null, /*#__PURE__*/_react["default"].createElement(_Label["default"], null, "\u03A3\u03C5\u03BC\u03C0\u03BB\u03B7\u03C1\u03CE\u03C3\u03C4\u03B5 \u03C4\u03BF \u03C4\u03B7\u03BB\u03AD\u03C6\u03C9\u03BD\u03BF \u03B5\u03C0\u03B9\u03BA\u03BF\u03B9\u03BD\u03C9\u03BD\u03AF\u03B1\u03C2", /*#__PURE__*/_react["default"].createElement(_core.TextInput, {
|
|
49
|
+
name: "inputext",
|
|
50
|
+
characterWidth: 10
|
|
51
|
+
}))));
|
|
52
|
+
|
|
53
|
+
var _ref3 = /*#__PURE__*/_react["default"].createElement(_core.Button, null, "\u03A5\u03C0\u03BF\u03B2\u03BF\u03BB\u03AE");
|
|
54
|
+
|
|
55
|
+
var Default = function Default() {
|
|
56
|
+
var _useModal = useModal(),
|
|
57
|
+
open = _useModal.open,
|
|
58
|
+
toggleModal = _useModal.toggleModal;
|
|
59
|
+
|
|
60
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_core.Button, {
|
|
61
|
+
onClick: function onClick() {
|
|
62
|
+
return toggleModal();
|
|
63
|
+
}
|
|
64
|
+
}, "\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C4\u03B7\u03BB\u03B5\u03C6\u03CE\u03BD\u03BF\u03C5"), /*#__PURE__*/_react["default"].createElement(_Modal["default"], {
|
|
65
|
+
open: open,
|
|
66
|
+
role: "dialog",
|
|
67
|
+
"aria-modal": "true",
|
|
68
|
+
"aria-labelledby": "modal-label"
|
|
69
|
+
}, _ref, _ref2, /*#__PURE__*/_react["default"].createElement(_Modal.ModalAction, null, _ref3, /*#__PURE__*/_react["default"].createElement(_core.Button, {
|
|
70
|
+
variant: "link",
|
|
71
|
+
onClick: function onClick() {
|
|
72
|
+
return toggleModal();
|
|
73
|
+
}
|
|
74
|
+
}, "\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7"))));
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
exports.Default = Default;
|
|
78
|
+
var _default = Default;
|
|
79
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: modal
|
|
3
|
+
title: Modal
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
import Modal, {ModalHeading, ModalContent, ModalAction} from "@digigov/ui/admin/Modal";
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## How to use
|
|
11
|
+
|
|
12
|
+
### As a Dialog
|
|
13
|
+
|
|
14
|
+
<Story packageName="@digigov/ui" component="admin/Modal" story="Default.tsx" />
|
|
15
|
+
|
|
16
|
+
### As an Alert Dialog
|
|
17
|
+
|
|
18
|
+
<Story packageName="@digigov/ui" component="admin/Modal" story="AlertDialog.tsx" />
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## Accessibility
|
|
22
|
+
|
|
23
|
+
You can read more about the accessibility patterns used in our Modal
|
|
24
|
+
implementation in the ARIA Authoring Practices Guide (APG) at
|
|
25
|
+
[Dialog](https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal/) and
|
|
26
|
+
[Alert Dialog](https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/) sections.
|