@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,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: autocomplete
|
|
3
|
+
title: AutoComplete
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Autocomplete is a feature in which an input field suggests a word based on user input. This allows users to quickly search
|
|
8
|
+
through, select from large collections of options and help services get more consistent data.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### How to import
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
import AutoComplete from '@digigov/ui/admin/AutoComplete';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### AutoComplete
|
|
20
|
+
|
|
21
|
+
<Story packageName="@digigov/ui" component="admin/AutoComplete" story="Default.tsx" />
|
|
22
|
+
|
|
23
|
+
### AutoComplete with auto select
|
|
24
|
+
|
|
25
|
+
<Story packageName="@digigov/ui" component="admin/AutoComplete" story="WithAutoSelect.tsx" />
|
|
26
|
+
|
|
27
|
+
### AutoComplete with inline style
|
|
28
|
+
|
|
29
|
+
<Story packageName="@digigov/ui" component="admin/AutoComplete" story="WithInLine.tsx" />
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### AutoComplete with default value
|
|
33
|
+
|
|
34
|
+
<Story packageName="@digigov/ui" component="admin/AutoComplete" story="WithDefaultValue.tsx" />
|
|
35
|
+
|
|
36
|
+
### AutoComplete with placeholder
|
|
37
|
+
<Story packageName="@digigov/ui" component="admin/AutoComplete" story="WithPlaceHolder.tsx" />
|
|
38
|
+
|
|
39
|
+
### AutoComplete with all option's values
|
|
40
|
+
<Story packageName="@digigov/ui" component="admin/AutoComplete" story="WithShowAllValues.tsx" />
|
|
41
|
+
|
|
42
|
+
### AutoComplete with min length
|
|
43
|
+
|
|
44
|
+
This is the minimum number of characters that should be entered before the autocomplete will attempt to suggest options(in above example is 2)
|
|
45
|
+
|
|
46
|
+
<Story packageName="@digigov/ui" component="admin/AutoComplete" story="WithMinLength.tsx" />
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function suggest(query: string, syncResults: (options: string[]) => void): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = suggest;
|
|
7
|
+
|
|
8
|
+
function suggest(query, syncResults) {
|
|
9
|
+
var results = ['Afghanistan', 'Akrotiri', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Ashmore and Cartier Islands', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas, The', 'Bahrain', 'Bangladesh', 'Barbados', 'Bassas da India', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Bouvet Island', 'Brazil', 'British Indian Ocean Territory', 'British Virgin Islands', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burma', 'Burundi', 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Cayman Islands', 'Central African Republic', 'Chad', 'Chile', 'China', 'Christmas Island', 'Clipperton Island', 'Cocos (Keeling) Islands', 'Colombia', 'Comoros', 'Congo', 'Cook Islands', 'Coral Sea Islands', 'Costa Rica', "Cote d'Ivoire", 'Croatia', 'Cuba', 'Cyprus', 'Czech Republic', 'Denmark', 'Dhekelia', 'Djibouti', 'Dominica', 'Dominican Republic', 'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', 'Europa Island', 'Falkland Islands', 'Faroe Islands', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern and Antarctic Lands', 'Gabon', 'Gambia,', 'Gaza Strip', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Glorioso Islands', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam', 'Guatemala', 'Guernsey', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Heard Island and McDonald Islands', 'Holy See (Vatican City)', 'Honduras', 'Hong Kong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Isle of Man', 'Israel', 'Italy', 'Jamaica', 'Jan Mayen', 'Japan', 'Jersey', 'Jordan', 'Juan de Nova Island', 'Kazakhstan', 'Kenya', 'Kiribati', 'Korea, North', 'Korea, South', 'Kuwait', 'Kyrgyzstan', 'Laos', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libya', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macau', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia, Federated States of', 'Moldova', 'Monaco', 'Mongolia', 'Montserrat', 'Morocco', 'Mozambique', 'Namibia', 'Nauru', 'Navassa Island', 'Nepal', 'Netherlands', 'Netherlands Antilles', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Norfolk Island', 'Northern Mariana Islands', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Panama', 'Papua New Guinea', 'Paracel Islands', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn Islands', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar', 'Reunion', 'Romania', 'Russia', 'Rwanda', 'Saint Helena', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Pierre and Miquelon', 'Saint Vincent and the Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Serbia and Montenegro', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'South Georgia and the South Sandwich Islands', 'Spain', 'Spratly Islands', 'Sri Lanka', 'Sudan', 'Suriname', 'Svalbard', 'Swaziland', 'Sweden', 'Switzerland', 'Syria', 'Taiwan', 'Tajikistan', 'Tanzania', 'Thailand', 'Timor-Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago', 'Tromelin Island', 'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kingdom', 'United States', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Venezuela', 'Vietnam', 'Virgin Islands', 'Wake Island', 'Wallis and Futuna', 'West Bank', 'Western Sahara', 'Yemen', 'Zambia', 'Zimbabwe'];
|
|
10
|
+
syncResults(query ? results.filter(function (result) {
|
|
11
|
+
return result.toLowerCase().indexOf(query.toLowerCase()) !== -1;
|
|
12
|
+
}) : []);
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { CopyToClipboard as component };
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
export * from "@digigov/ui/admin/CopyToClipboard/__stories__/Default";
|
|
7
|
+
export * from "@digigov/ui/admin/CopyToClipboard/__stories__/Banner";
|
|
8
|
+
export * from "@digigov/ui/admin/CopyToClipboard/__stories__/MultipleCopies";
|
|
9
|
+
import CopyToClipboard from "@digigov/ui/admin/CopyToClipboard";
|
|
@@ -0,0 +1,58 @@
|
|
|
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 _CopyToClipboard = _interopRequireDefault(require("@digigov/ui/admin/CopyToClipboard"));
|
|
12
|
+
|
|
13
|
+
var _Default = require("@digigov/ui/admin/CopyToClipboard/__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 _Banner = require("@digigov/ui/admin/CopyToClipboard/__stories__/Banner");
|
|
28
|
+
|
|
29
|
+
Object.keys(_Banner).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] === _Banner[key]) return;
|
|
33
|
+
Object.defineProperty(exports, key, {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function get() {
|
|
36
|
+
return _Banner[key];
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
var _MultipleCopies = require("@digigov/ui/admin/CopyToClipboard/__stories__/MultipleCopies");
|
|
42
|
+
|
|
43
|
+
Object.keys(_MultipleCopies).forEach(function (key) {
|
|
44
|
+
if (key === "default" || key === "__esModule") return;
|
|
45
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
46
|
+
if (key in exports && exports[key] === _MultipleCopies[key]) return;
|
|
47
|
+
Object.defineProperty(exports, key, {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function get() {
|
|
50
|
+
return _MultipleCopies[key];
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
var _default = {
|
|
55
|
+
title: 'Digigov UI/admin/CopyToClipboard',
|
|
56
|
+
component: _CopyToClipboard["default"]
|
|
57
|
+
};
|
|
58
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = exports.Banner = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _admin = require("@digigov/ui/admin");
|
|
13
|
+
|
|
14
|
+
var _ui = require("@digigov/ui");
|
|
15
|
+
|
|
16
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_admin.CopyToClipboard, {
|
|
17
|
+
text: "copied-text",
|
|
18
|
+
variant: "banner",
|
|
19
|
+
message: "text successfuly copied!"
|
|
20
|
+
}, /*#__PURE__*/_react["default"].createElement(_ui.Button, {
|
|
21
|
+
color: "secondary"
|
|
22
|
+
}, "Banner example"));
|
|
23
|
+
|
|
24
|
+
var Banner = function Banner() {
|
|
25
|
+
return _ref;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.Banner = Banner;
|
|
29
|
+
var _default = Banner;
|
|
30
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = exports.Default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _admin = require("@digigov/ui/admin");
|
|
13
|
+
|
|
14
|
+
var _ui = require("@digigov/ui");
|
|
15
|
+
|
|
16
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_admin.CopyToClipboard, {
|
|
17
|
+
text: "copied-text",
|
|
18
|
+
variant: "tooltipLeft",
|
|
19
|
+
message: "text successfuly copied!",
|
|
20
|
+
id: "copy-to-clipboard"
|
|
21
|
+
}, /*#__PURE__*/_react["default"].createElement(_ui.Button, {
|
|
22
|
+
color: "secondary",
|
|
23
|
+
"aria-describedby": "copy-to-clipboard"
|
|
24
|
+
}, "Copy"));
|
|
25
|
+
|
|
26
|
+
var Default = function Default() {
|
|
27
|
+
return _ref;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.Default = Default;
|
|
31
|
+
var _default = Default;
|
|
32
|
+
exports["default"] = _default;
|
|
@@ -5,13 +5,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] = exports.
|
|
8
|
+
exports["default"] = exports.MultipleCopies = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _admin = require("@digigov/ui/admin");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _admin2 = require("@digigov/react-extensions/admin");
|
|
15
15
|
|
|
16
16
|
var _reactCore = require("@digigov/react-core");
|
|
17
17
|
|
|
@@ -49,9 +49,11 @@ var fields = [{
|
|
|
49
49
|
actions: ['Ανάθεση']
|
|
50
50
|
}];
|
|
51
51
|
|
|
52
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(
|
|
52
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_admin2.AdminHeader, null, /*#__PURE__*/_react["default"].createElement(_admin2.AdminHeaderSection, null, /*#__PURE__*/_react["default"].createElement(_ui.HeaderContent, null, /*#__PURE__*/_react["default"].createElement(_Logo["default"], null), /*#__PURE__*/_react["default"].createElement(_ui.HeaderTitle, null, "\u0398\u03C5\u03C1\u03AF\u03B4\u03B5\u03C2")), /*#__PURE__*/_react["default"].createElement(_ui.HeaderSubtitle, null, /*#__PURE__*/_react["default"].createElement(_admin2.Dropdown, {
|
|
53
|
+
align: "right"
|
|
54
|
+
}, /*#__PURE__*/_react["default"].createElement(_admin2.DropdownButton, {
|
|
53
55
|
variant: "link"
|
|
54
|
-
}, "\u0388\u03C7\u03B5\u03C4\u03B5 \u03C3\u03C5\u03BD\u03B4\u03B5\u03B8\u03B5\u03AF \u03C9\u03C2 \u039A\u03B1\u03BB\u03BB\u03B9\u03CC\u03C0\u03B7 \u03A0\u03B1\u03C0\u03B1\u03B4\u03BF\u03C0\u03BF\u03CD\u03BB\u03BF\u03C5", /*#__PURE__*/_react["default"].createElement(_reactCore.MoreVertIcon, null)), /*#__PURE__*/_react["default"].createElement(
|
|
56
|
+
}, "\u0388\u03C7\u03B5\u03C4\u03B5 \u03C3\u03C5\u03BD\u03B4\u03B5\u03B8\u03B5\u03AF \u03C9\u03C2 \u039A\u03B1\u03BB\u03BB\u03B9\u03CC\u03C0\u03B7 \u03A0\u03B1\u03C0\u03B1\u03B4\u03BF\u03C0\u03BF\u03CD\u03BB\u03BF\u03C5", /*#__PURE__*/_react["default"].createElement(_reactCore.MoreVertIcon, null)), /*#__PURE__*/_react["default"].createElement(_admin2.DropdownContent, null, /*#__PURE__*/_react["default"].createElement(_reactCore.NavVertical, null, /*#__PURE__*/_react["default"].createElement(_reactCore.NavVerticalItem, {
|
|
55
57
|
href: "#"
|
|
56
58
|
}, "\u0395\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1"), /*#__PURE__*/_react["default"].createElement(_reactCore.NavVerticalItem, {
|
|
57
59
|
href: "#"
|
|
@@ -63,7 +65,7 @@ var _ref2 = /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
|
63
65
|
item: true,
|
|
64
66
|
md: 3,
|
|
65
67
|
lg: 2
|
|
66
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
68
|
+
}, /*#__PURE__*/_react["default"].createElement(_admin2.AdminAside, null, /*#__PURE__*/_react["default"].createElement(_admin2.AdminTopSection, null, /*#__PURE__*/_react["default"].createElement(_ui.BackButton, null, "\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u03B8\u03C5\u03C1\u03AF\u03B4\u03B1\u03C2"), /*#__PURE__*/_react["default"].createElement(_Title["default"], {
|
|
67
69
|
size: "sm"
|
|
68
70
|
}, "\u039A\u0395\u03A0/\u0396\u0391\u039A\u03A5\u039D\u0398\u039F\u03A5 [\u0396\u0391\u039A\u03A5\u039D\u0398\u0399\u03A9\u039D]"), /*#__PURE__*/_react["default"].createElement(_Paragraph["default"], null, "\u039A\u0395\u03A0/\u0396\u0391\u039A\u03A5\u039D\u0398\u039F\u03A5 [\u0396\u0391\u039A\u03A5\u039D\u0398\u0399\u03A9\u039D]")), /*#__PURE__*/_react["default"].createElement(_ui.SectionBreak, {
|
|
69
71
|
visible: true,
|
|
@@ -74,9 +76,9 @@ var _ref3 = /*#__PURE__*/_react["default"].createElement(_Title["default"], {
|
|
|
74
76
|
size: "xl"
|
|
75
77
|
}, "# \u03A5\u03C0\u03CC\u03B8\u03B5\u03C3\u03B7 4");
|
|
76
78
|
|
|
77
|
-
var _ref4 = /*#__PURE__*/_react["default"].createElement(_ui.ButtonGroup, null, /*#__PURE__*/_react["default"].createElement(
|
|
79
|
+
var _ref4 = /*#__PURE__*/_react["default"].createElement(_ui.ButtonGroup, null, /*#__PURE__*/_react["default"].createElement(_admin.CopyToClipboard, {
|
|
78
80
|
text: "AAABBBFFFLLL",
|
|
79
|
-
variant: "
|
|
81
|
+
variant: "tooltipLeft",
|
|
80
82
|
message: "text successfuly copied!"
|
|
81
83
|
}, /*#__PURE__*/_react["default"].createElement(_ui.Button, null, "\u0391\u03C0\u03AC\u03BD\u03C4\u03B7\u03C3\u03B7")), /*#__PURE__*/_react["default"].createElement(_ui.Button, {
|
|
82
84
|
color: "secondary"
|
|
@@ -87,7 +89,7 @@ var _ref4 = /*#__PURE__*/_react["default"].createElement(_ui.ButtonGroup, null,
|
|
|
87
89
|
var _ref5 = /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
88
90
|
item: true,
|
|
89
91
|
xs: 12
|
|
90
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
92
|
+
}, /*#__PURE__*/_react["default"].createElement(_admin.CopyToClipboard, {
|
|
91
93
|
text: "AAABBBFFFLLL",
|
|
92
94
|
variant: "banner",
|
|
93
95
|
message: "text successfuly copied!"
|
|
@@ -98,9 +100,9 @@ var _ref5 = /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
|
98
100
|
var _ref6 = /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
99
101
|
item: true,
|
|
100
102
|
xs: 12
|
|
101
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
103
|
+
}, /*#__PURE__*/_react["default"].createElement(_admin.CopyToClipboard, {
|
|
102
104
|
text: "AAABBBFFFLLL",
|
|
103
|
-
variant: "
|
|
105
|
+
variant: "tooltipLeft",
|
|
104
106
|
message: "text successfuly copied!"
|
|
105
107
|
}, /*#__PURE__*/_react["default"].createElement(_ui.Button, {
|
|
106
108
|
color: "secondary"
|
|
@@ -108,12 +110,12 @@ var _ref6 = /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
|
108
110
|
|
|
109
111
|
var _ref7 = /*#__PURE__*/_react["default"].createElement(_Footer["default"], null);
|
|
110
112
|
|
|
111
|
-
var
|
|
112
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(
|
|
113
|
+
var MultipleCopies = function MultipleCopies() {
|
|
114
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_admin2.AdminLayout, null, _ref, /*#__PURE__*/_react["default"].createElement(_admin2.AdminContainer, null, _ref2, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
113
115
|
item: true,
|
|
114
116
|
md: 9,
|
|
115
117
|
lg: 10
|
|
116
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
118
|
+
}, /*#__PURE__*/_react["default"].createElement(_admin2.AdminMain, null, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
117
119
|
container: true,
|
|
118
120
|
spacing: 4
|
|
119
121
|
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
@@ -123,9 +125,9 @@ var Default = function Default() {
|
|
|
123
125
|
return /*#__PURE__*/_react["default"].createElement(_ui.SummaryListItem, {
|
|
124
126
|
key: index
|
|
125
127
|
}, /*#__PURE__*/_react["default"].createElement(_ui.SummaryListItemKey, null, field.name), /*#__PURE__*/_react["default"].createElement(_ui.SummaryListItemValue, null, field.value), /*#__PURE__*/_react["default"].createElement(_ui.SummaryListItemAction, null, /*#__PURE__*/_react["default"].createElement(_ui.ButtonGroup, null, field.actions && field.actions.map(function (action, subIndex) {
|
|
126
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
128
|
+
return /*#__PURE__*/_react["default"].createElement(_admin.CopyToClipboard, {
|
|
127
129
|
text: "MMMNNNKKKO",
|
|
128
|
-
variant: "
|
|
130
|
+
variant: "tooltipRight",
|
|
129
131
|
key: subIndex
|
|
130
132
|
}, /*#__PURE__*/_react["default"].createElement(_ui.Button, {
|
|
131
133
|
key: subIndex,
|
|
@@ -135,6 +137,6 @@ var Default = function Default() {
|
|
|
135
137
|
}))), _ref5, _ref6)))), _ref7));
|
|
136
138
|
};
|
|
137
139
|
|
|
138
|
-
exports.
|
|
139
|
-
var _default =
|
|
140
|
+
exports.MultipleCopies = MultipleCopies;
|
|
141
|
+
var _default = MultipleCopies;
|
|
140
142
|
exports["default"] = _default;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare type DivElementAttributes = JSX.IntrinsicElements['div'];
|
|
3
3
|
export interface CopyToClipboardProps extends DivElementAttributes {
|
|
4
4
|
text: string;
|
|
5
|
-
variant?: '
|
|
5
|
+
variant?: 'tooltipRight' | 'tooltipLeft' | 'banner';
|
|
6
6
|
message?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare const CopyToClipboard: React.ForwardRefExoticComponent<Pick<CopyToClipboardProps, "color" | "variant" | "className" | "children" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "text" | "message"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -28,7 +28,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
28
28
|
var CopyToClipboard = /*#__PURE__*/_react["default"].forwardRef(function CopyToClipboard(_ref, ref) {
|
|
29
29
|
var text = _ref.text,
|
|
30
30
|
_ref$variant = _ref.variant,
|
|
31
|
-
variant = _ref$variant === void 0 ? '
|
|
31
|
+
variant = _ref$variant === void 0 ? 'tooltipRight' : _ref$variant,
|
|
32
32
|
message = _ref.message,
|
|
33
33
|
children = _ref.children;
|
|
34
34
|
|
|
@@ -60,7 +60,8 @@ var CopyToClipboard = /*#__PURE__*/_react["default"].forwardRef(function CopyToC
|
|
|
60
60
|
ref: ref
|
|
61
61
|
}, children, enabled && /*#__PURE__*/_react["default"].createElement(_CopyToClipboardMessage["default"], {
|
|
62
62
|
variant: variant,
|
|
63
|
-
enabled: enabled
|
|
63
|
+
enabled: enabled,
|
|
64
|
+
role: "tooltip"
|
|
64
65
|
}, /*#__PURE__*/_react["default"].createElement(_NormalText["default"], null, message || t('copy-to-clipboard.message'))));
|
|
65
66
|
});
|
|
66
67
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: copy-to-clipboard
|
|
3
|
+
title: CopyToClipboard
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
import CopyToClipboard from '@digigov/ui/admin/CopyToClipboard';
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## How to use
|
|
11
|
+
|
|
12
|
+
### Default
|
|
13
|
+
|
|
14
|
+
<Story packageName="@digigov/ui" component="admin/CopyToClipboard" story="Default.tsx" />
|
|
15
|
+
|
|
16
|
+
### Banner
|
|
17
|
+
|
|
18
|
+
<Story packageName="@digigov/ui" component="admin/CopyToClipboard" story="Banner.tsx" />
|
|
19
|
+
|
|
20
|
+
### Layout example
|
|
21
|
+
|
|
22
|
+
<Story packageName="@digigov/ui" component="admin/CopyToClipboard" story="MultipleCopies.tsx" />
|
|
@@ -19,7 +19,7 @@ var _reactCore = require("@digigov/react-core");
|
|
|
19
19
|
|
|
20
20
|
var _ui = require("@digigov/ui");
|
|
21
21
|
|
|
22
|
-
var _admin = require("@digigov/react-extensions/admin
|
|
22
|
+
var _admin = require("@digigov/react-extensions/admin");
|
|
23
23
|
|
|
24
24
|
var _Grid = _interopRequireDefault(require("@digigov/react-core/Grid"));
|
|
25
25
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { Dropdown as component };
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
export * from "./__stories__/Default";
|
|
7
|
+
export * from "./__stories__/AlignRight";
|
|
8
|
+
export * from "./__stories__/PlacementTop";
|
|
9
|
+
import Dropdown from "@digigov/ui/admin/Dropdown";
|
|
@@ -0,0 +1,60 @@
|
|
|
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 _Dropdown = _interopRequireDefault(require("@digigov/ui/admin/Dropdown"));
|
|
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 _AlignRight = require("./__stories__/AlignRight");
|
|
28
|
+
|
|
29
|
+
Object.keys(_AlignRight).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] === _AlignRight[key]) return;
|
|
33
|
+
Object.defineProperty(exports, key, {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function get() {
|
|
36
|
+
return _AlignRight[key];
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
var _PlacementTop = require("./__stories__/PlacementTop");
|
|
42
|
+
|
|
43
|
+
Object.keys(_PlacementTop).forEach(function (key) {
|
|
44
|
+
if (key === "default" || key === "__esModule") return;
|
|
45
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
46
|
+
if (key in exports && exports[key] === _PlacementTop[key]) return;
|
|
47
|
+
Object.defineProperty(exports, key, {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function get() {
|
|
50
|
+
return _PlacementTop[key];
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
/* eslint-disable digigov/no-relative-imports */
|
|
56
|
+
var _default = {
|
|
57
|
+
title: 'Digigov UI/admin/Dropdown',
|
|
58
|
+
component: _Dropdown["default"]
|
|
59
|
+
};
|
|
60
|
+
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.AlignRight = 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
|
+
align: "right"
|
|
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 AlignRight = function AlignRight() {
|
|
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.AlignRight = AlignRight;
|
|
82
|
+
var _default = AlignRight;
|
|
83
|
+
exports["default"] = _default;
|