@digigov/ui 0.21.3 → 0.24.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 +41 -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.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 +38 -14
- package/admin/Pagination/index.mdx +12 -0
- package/admin/TaskList/TaskList.stories.d.ts +7 -0
- package/{app/CopyToClipboard/CopyToClipboard.stories.js → admin/TaskList/TaskList.stories.js} +4 -4
- package/admin/TaskList/__stories__/Default.d.ts +3 -0
- package/admin/TaskList/__stories__/Default.js +97 -0
- package/admin/TaskList/index.d.ts +7 -0
- package/admin/TaskList/index.js +86 -0
- package/admin/Timeline/Timeline.stories.d.ts +7 -0
- package/admin/Timeline/Timeline.stories.js +30 -0
- package/admin/Timeline/__stories__/Default.d.ts +3 -0
- package/admin/Timeline/__stories__/Default.js +87 -0
- package/admin/Timeline/index.d.ts +7 -0
- package/admin/Timeline/index.js +86 -0
- package/admin/index.d.ts +4 -1
- package/admin/index.js +43 -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/__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.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.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 +37 -14
- package/es/admin/Pagination/index.mdx +12 -0
- package/es/admin/TaskList/TaskList.stories.js +6 -0
- package/es/admin/TaskList/__stories__/Default.js +74 -0
- package/es/admin/TaskList/index.js +7 -0
- package/es/admin/Timeline/Timeline.stories.js +6 -0
- package/es/admin/Timeline/__stories__/Default.js +64 -0
- package/es/admin/Timeline/index.js +7 -0
- package/es/admin/index.js +5 -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/__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.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.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 +37 -14
- package/esm/admin/Pagination/index.mdx +12 -0
- package/esm/admin/TaskList/TaskList.stories.js +6 -0
- package/esm/admin/TaskList/__stories__/Default.js +74 -0
- package/esm/admin/TaskList/index.js +7 -0
- package/esm/admin/Timeline/Timeline.stories.js +6 -0
- package/esm/admin/Timeline/__stories__/Default.js +64 -0
- package/esm/admin/Timeline/index.js +7 -0
- package/esm/admin/index.js +5 -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/__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.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/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
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
# Change Log - @digigov/ui
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 03 Aug 2022 10:06:10 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.24.0
|
|
6
|
+
Wed, 03 Aug 2022 10:06:10 GMT
|
|
7
|
+
|
|
8
|
+
### Minor changes
|
|
9
|
+
|
|
10
|
+
- Implement Timeline component
|
|
11
|
+
- Add Storybook example
|
|
12
|
+
- export TaskList component
|
|
13
|
+
|
|
14
|
+
## 0.23.0
|
|
15
|
+
Tue, 26 Jul 2022 07:39:59 GMT
|
|
16
|
+
|
|
17
|
+
### Minor changes
|
|
18
|
+
|
|
19
|
+
- add a11y props
|
|
20
|
+
- Add missing a11y props to (*)Base components
|
|
21
|
+
|
|
22
|
+
### Patches
|
|
23
|
+
|
|
24
|
+
- create component's stories add accessibility attributes to each component, create sdk docs
|
|
25
|
+
- add aria-describedby at hints and errors, at checkbox and radio examples
|
|
26
|
+
- add aria-colspan to TableNoDataRow component
|
|
27
|
+
- add arias and role to CopyToClipboard and to Modal
|
|
28
|
+
- add accessibility attributes to Grid component
|
|
29
|
+
- Update registry file
|
|
30
|
+
|
|
31
|
+
## 0.22.0
|
|
32
|
+
Thu, 07 Jul 2022 13:01:18 GMT
|
|
33
|
+
|
|
34
|
+
### Minor changes
|
|
35
|
+
|
|
36
|
+
- add pages at sdk with storybook examples of all the components
|
|
37
|
+
|
|
38
|
+
### Patches
|
|
39
|
+
|
|
40
|
+
- create AutoComplete, AccessibleAutoComplete, Status components, create stories
|
|
41
|
+
- Add missing exports for Grid
|
|
42
|
+
- reexport FilterSectionHorizontal
|
|
43
|
+
- refactor code to resolve circular dependencies
|
|
4
44
|
|
|
5
45
|
## 0.21.3
|
|
6
46
|
Mon, 27 Jun 2022 10:08:07 GMT
|
|
@@ -0,0 +1,106 @@
|
|
|
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"] = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
|
|
16
|
+
var ReactDOM = _interopRequireWildcard(require("react-dom"));
|
|
17
|
+
|
|
18
|
+
var _AutoComplete = _interopRequireDefault(require("@digigov/ui/admin/AutoComplete"));
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
function AccesibleAutoComplete(options) {
|
|
25
|
+
console.log('options are', options);
|
|
26
|
+
|
|
27
|
+
if (!options.element) {
|
|
28
|
+
throw new Error('element is not defined');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (!options.id) {
|
|
32
|
+
throw new Error('id is not defined');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (!options.source) {
|
|
36
|
+
throw new Error('source is not defined');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (Array.isArray(options.source)) {
|
|
40
|
+
options.source = createSimpleEngine(options.source);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
ReactDOM.render( /*#__PURE__*/_react["default"].createElement(_AutoComplete["default"], options), options.element);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
var createSimpleEngine = function createSimpleEngine(values) {
|
|
47
|
+
return function (query, syncResults) {
|
|
48
|
+
var matches = values.filter(function (r) {
|
|
49
|
+
return r.toLowerCase().indexOf(query.toLowerCase()) !== -1;
|
|
50
|
+
});
|
|
51
|
+
syncResults(matches);
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
AccesibleAutoComplete.enhanceSelectElement = function (configurationOptions) {
|
|
56
|
+
if (!configurationOptions.selectElement) {
|
|
57
|
+
throw new Error('selectElement is not defined');
|
|
58
|
+
} // Set defaults.
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
if (!configurationOptions.source) {
|
|
62
|
+
var availableOptions = [].filter.call(configurationOptions.selectElement.options, function (option) {
|
|
63
|
+
return option.value || configurationOptions.preserveNullOptions;
|
|
64
|
+
});
|
|
65
|
+
configurationOptions.source = availableOptions.map(function (option) {
|
|
66
|
+
return option.textContent || option.innerText;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
configurationOptions.onConfirm = configurationOptions.onConfirm || function (query) {
|
|
71
|
+
var requestedOption = [].filter.call(configurationOptions.selectElement.options, function (option) {
|
|
72
|
+
return (option.textContent || option.innerText) === query;
|
|
73
|
+
})[0];
|
|
74
|
+
|
|
75
|
+
if (requestedOption) {
|
|
76
|
+
requestedOption.selected = true;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
if (configurationOptions.selectElement.value || configurationOptions.defaultValue === undefined) {
|
|
81
|
+
var option = configurationOptions.selectElement.options[configurationOptions.selectElement.options.selectedIndex];
|
|
82
|
+
configurationOptions.defaultValue = option.textContent || option.innerText;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (configurationOptions.name === undefined) configurationOptions.name = '';
|
|
86
|
+
|
|
87
|
+
if (configurationOptions.id === undefined) {
|
|
88
|
+
if (configurationOptions.selectElement.id === undefined) {
|
|
89
|
+
configurationOptions.id = '';
|
|
90
|
+
} else {
|
|
91
|
+
configurationOptions.id = configurationOptions.selectElement.id;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (configurationOptions.autoselect === undefined) configurationOptions.autoselect = true;
|
|
96
|
+
var element = document.createElement('div');
|
|
97
|
+
configurationOptions.selectElement.parentNode.insertBefore(element, configurationOptions.selectElement);
|
|
98
|
+
AccesibleAutoComplete((0, _extends2["default"])({}, configurationOptions, {
|
|
99
|
+
element: element
|
|
100
|
+
}));
|
|
101
|
+
configurationOptions.selectElement.style.display = 'none';
|
|
102
|
+
configurationOptions.selectElement.id = configurationOptions.selectElement.id + '-select';
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
var _default = AccesibleAutoComplete;
|
|
106
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export const title: string;
|
|
3
|
+
export { AutoComplete as component };
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
export * from "@digigov/ui/admin/AutoComplete/__stories__/Default";
|
|
7
|
+
export * from "@digigov/ui/admin/AutoComplete/__stories__/WithAutoSelect";
|
|
8
|
+
export * from "@digigov/ui/admin/AutoComplete/__stories__/WithInLine";
|
|
9
|
+
export * from "@digigov/ui/admin/AutoComplete/__stories__/WithDefaultValue";
|
|
10
|
+
export * from "@digigov/ui/admin/AutoComplete/__stories__/WithPlaceHolder";
|
|
11
|
+
export * from "@digigov/ui/admin/AutoComplete/__stories__/WithShowAllValues";
|
|
12
|
+
export * from "@digigov/ui/admin/AutoComplete/__stories__/WithMinLength";
|
|
13
|
+
import AutoComplete from "@digigov/ui/admin/AutoComplete";
|
|
@@ -0,0 +1,115 @@
|
|
|
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 _AutoComplete = _interopRequireDefault(require("@digigov/ui/admin/AutoComplete"));
|
|
12
|
+
|
|
13
|
+
var _Default = require("@digigov/ui/admin/AutoComplete/__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 _WithAutoSelect = require("@digigov/ui/admin/AutoComplete/__stories__/WithAutoSelect");
|
|
28
|
+
|
|
29
|
+
Object.keys(_WithAutoSelect).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] === _WithAutoSelect[key]) return;
|
|
33
|
+
Object.defineProperty(exports, key, {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function get() {
|
|
36
|
+
return _WithAutoSelect[key];
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
var _WithInLine = require("@digigov/ui/admin/AutoComplete/__stories__/WithInLine");
|
|
42
|
+
|
|
43
|
+
Object.keys(_WithInLine).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] === _WithInLine[key]) return;
|
|
47
|
+
Object.defineProperty(exports, key, {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function get() {
|
|
50
|
+
return _WithInLine[key];
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
var _WithDefaultValue = require("@digigov/ui/admin/AutoComplete/__stories__/WithDefaultValue");
|
|
56
|
+
|
|
57
|
+
Object.keys(_WithDefaultValue).forEach(function (key) {
|
|
58
|
+
if (key === "default" || key === "__esModule") return;
|
|
59
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
60
|
+
if (key in exports && exports[key] === _WithDefaultValue[key]) return;
|
|
61
|
+
Object.defineProperty(exports, key, {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function get() {
|
|
64
|
+
return _WithDefaultValue[key];
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
var _WithPlaceHolder = require("@digigov/ui/admin/AutoComplete/__stories__/WithPlaceHolder");
|
|
70
|
+
|
|
71
|
+
Object.keys(_WithPlaceHolder).forEach(function (key) {
|
|
72
|
+
if (key === "default" || key === "__esModule") return;
|
|
73
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
74
|
+
if (key in exports && exports[key] === _WithPlaceHolder[key]) return;
|
|
75
|
+
Object.defineProperty(exports, key, {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function get() {
|
|
78
|
+
return _WithPlaceHolder[key];
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
var _WithShowAllValues = require("@digigov/ui/admin/AutoComplete/__stories__/WithShowAllValues");
|
|
84
|
+
|
|
85
|
+
Object.keys(_WithShowAllValues).forEach(function (key) {
|
|
86
|
+
if (key === "default" || key === "__esModule") return;
|
|
87
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
88
|
+
if (key in exports && exports[key] === _WithShowAllValues[key]) return;
|
|
89
|
+
Object.defineProperty(exports, key, {
|
|
90
|
+
enumerable: true,
|
|
91
|
+
get: function get() {
|
|
92
|
+
return _WithShowAllValues[key];
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
var _WithMinLength = require("@digigov/ui/admin/AutoComplete/__stories__/WithMinLength");
|
|
98
|
+
|
|
99
|
+
Object.keys(_WithMinLength).forEach(function (key) {
|
|
100
|
+
if (key === "default" || key === "__esModule") return;
|
|
101
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
102
|
+
if (key in exports && exports[key] === _WithMinLength[key]) return;
|
|
103
|
+
Object.defineProperty(exports, key, {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function get() {
|
|
106
|
+
return _WithMinLength[key];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
var _default = {
|
|
111
|
+
title: 'Digigov UI/admin/AutoComplete',
|
|
112
|
+
component: _AutoComplete["default"]
|
|
113
|
+
}; // eslint-disable-next-line digigov/no-relative-import
|
|
114
|
+
|
|
115
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import AutoCompleteStatusWrapper from '@digigov/react-extensions/admin/AutoCompleteStatusWrapper';
|
|
3
|
+
import AutoCompleteStatus from '@digigov/react-extensions/admin/AutoCompleteStatus';
|
|
4
|
+
declare type StatusProps = {
|
|
5
|
+
id: string;
|
|
6
|
+
length: number;
|
|
7
|
+
queryLength: number;
|
|
8
|
+
minQueryLength?: number;
|
|
9
|
+
selectedOption: string;
|
|
10
|
+
selectedOptionIndex: number;
|
|
11
|
+
validChoiceMade: boolean;
|
|
12
|
+
isInFocus: boolean;
|
|
13
|
+
tQueryTooShort?: (x: number) => string;
|
|
14
|
+
tNoResults?: () => string;
|
|
15
|
+
tSelectedOption: (x: string, y: number, z: number) => string;
|
|
16
|
+
tResults?: (x: number, y: string) => string;
|
|
17
|
+
};
|
|
18
|
+
declare type StateProps = {
|
|
19
|
+
bump: boolean;
|
|
20
|
+
debounced: boolean;
|
|
21
|
+
silenced: boolean;
|
|
22
|
+
};
|
|
23
|
+
export default class Status extends Component<StatusProps, StateProps> {
|
|
24
|
+
static defaultProps: {
|
|
25
|
+
tQueryTooShort: (minQueryLength: number) => string;
|
|
26
|
+
tNoResults: () => string;
|
|
27
|
+
tSelectedOption: (selectedOption: string, length: number, index: number) => string;
|
|
28
|
+
tResults: (length: number, contentSelectedOption: string) => string;
|
|
29
|
+
};
|
|
30
|
+
state: {
|
|
31
|
+
bump: boolean;
|
|
32
|
+
debounced: boolean;
|
|
33
|
+
silenced: boolean;
|
|
34
|
+
};
|
|
35
|
+
debounceStatusUpdate: () => void;
|
|
36
|
+
componentWillMount(): void;
|
|
37
|
+
componentWillReceiveProps(): void;
|
|
38
|
+
render(): JSX.Element;
|
|
39
|
+
}
|
|
40
|
+
export { AutoCompleteStatusWrapper, AutoCompleteStatus };
|
|
@@ -0,0 +1,184 @@
|
|
|
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
|
+
Object.defineProperty(exports, "AutoCompleteStatus", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _AutoCompleteStatus["default"];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "AutoCompleteStatusWrapper", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function get() {
|
|
19
|
+
return _AutoCompleteStatusWrapper["default"];
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
exports["default"] = void 0;
|
|
23
|
+
|
|
24
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
25
|
+
|
|
26
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
27
|
+
|
|
28
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
29
|
+
|
|
30
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
31
|
+
|
|
32
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
33
|
+
|
|
34
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
35
|
+
|
|
36
|
+
var _AutoCompleteStatusWrapper = _interopRequireDefault(require("@digigov/react-extensions/admin/AutoCompleteStatusWrapper"));
|
|
37
|
+
|
|
38
|
+
var _AutoCompleteStatus = _interopRequireDefault(require("@digigov/react-extensions/admin/AutoCompleteStatus"));
|
|
39
|
+
|
|
40
|
+
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); }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
45
|
+
|
|
46
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
47
|
+
|
|
48
|
+
var debounce = function debounce(func, wait, immediate) {
|
|
49
|
+
var timeout;
|
|
50
|
+
return function () {
|
|
51
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
52
|
+
args[_key] = arguments[_key];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
58
|
+
var context = this;
|
|
59
|
+
|
|
60
|
+
var later = function later() {
|
|
61
|
+
timeout = null;
|
|
62
|
+
if (!immediate) func.apply(context, args);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var callNow = immediate && !timeout;
|
|
66
|
+
clearTimeout(timeout);
|
|
67
|
+
timeout = setTimeout(later, wait);
|
|
68
|
+
if (callNow) func.apply(context, args);
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
var statusDebounceMillis = 1400;
|
|
73
|
+
|
|
74
|
+
var Status = /*#__PURE__*/function (_Component) {
|
|
75
|
+
(0, _inherits2["default"])(Status, _Component);
|
|
76
|
+
|
|
77
|
+
var _super = _createSuper(Status);
|
|
78
|
+
|
|
79
|
+
function Status() {
|
|
80
|
+
var _this;
|
|
81
|
+
|
|
82
|
+
(0, _classCallCheck2["default"])(this, Status);
|
|
83
|
+
|
|
84
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
85
|
+
args[_key2] = arguments[_key2];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
89
|
+
_this.state = {
|
|
90
|
+
bump: false,
|
|
91
|
+
debounced: false,
|
|
92
|
+
silenced: false
|
|
93
|
+
};
|
|
94
|
+
_this.debounceStatusUpdate = void 0;
|
|
95
|
+
return _this;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
(0, _createClass2["default"])(Status, [{
|
|
99
|
+
key: "componentWillMount",
|
|
100
|
+
value: function componentWillMount() {
|
|
101
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
102
|
+
var that = this;
|
|
103
|
+
this.debounceStatusUpdate = debounce(function () {
|
|
104
|
+
if (!that.state.debounced) {
|
|
105
|
+
var shouldSilence = !that.props.isInFocus || that.props.validChoiceMade;
|
|
106
|
+
that.setState(function (_ref) {
|
|
107
|
+
var bump = _ref.bump;
|
|
108
|
+
return {
|
|
109
|
+
bump: !bump,
|
|
110
|
+
debounced: true,
|
|
111
|
+
silenced: shouldSilence
|
|
112
|
+
};
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}, statusDebounceMillis);
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
key: "componentWillReceiveProps",
|
|
119
|
+
value: function componentWillReceiveProps() {
|
|
120
|
+
this.setState({
|
|
121
|
+
debounced: false
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}, {
|
|
125
|
+
key: "render",
|
|
126
|
+
value: function render() {
|
|
127
|
+
var _this$props = this.props,
|
|
128
|
+
id = _this$props.id,
|
|
129
|
+
length = _this$props.length,
|
|
130
|
+
queryLength = _this$props.queryLength,
|
|
131
|
+
minQueryLength = _this$props.minQueryLength,
|
|
132
|
+
selectedOption = _this$props.selectedOption,
|
|
133
|
+
selectedOptionIndex = _this$props.selectedOptionIndex,
|
|
134
|
+
tQueryTooShort = _this$props.tQueryTooShort,
|
|
135
|
+
tNoResults = _this$props.tNoResults,
|
|
136
|
+
tSelectedOption = _this$props.tSelectedOption,
|
|
137
|
+
tResults = _this$props.tResults;
|
|
138
|
+
var _this$state = this.state,
|
|
139
|
+
bump = _this$state.bump,
|
|
140
|
+
debounced = _this$state.debounced,
|
|
141
|
+
silenced = _this$state.silenced;
|
|
142
|
+
var queryTooShort = queryLength < minQueryLength;
|
|
143
|
+
var noResults = length === 0;
|
|
144
|
+
var contentSelectedOption = selectedOption ? tSelectedOption(selectedOption, length, selectedOptionIndex) : '';
|
|
145
|
+
var content;
|
|
146
|
+
|
|
147
|
+
if (queryTooShort) {
|
|
148
|
+
content = tQueryTooShort === null || tQueryTooShort === void 0 ? void 0 : tQueryTooShort(minQueryLength);
|
|
149
|
+
} else if (noResults) {
|
|
150
|
+
content = tNoResults === null || tNoResults === void 0 ? void 0 : tNoResults();
|
|
151
|
+
} else {
|
|
152
|
+
content = tResults === null || tResults === void 0 ? void 0 : tResults(length, contentSelectedOption);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
this.debounceStatusUpdate();
|
|
156
|
+
return /*#__PURE__*/_react["default"].createElement(_AutoCompleteStatusWrapper["default"], null, /*#__PURE__*/_react["default"].createElement(_AutoCompleteStatus["default"], {
|
|
157
|
+
id: id + '__status--A'
|
|
158
|
+
}, !silenced && debounced && bump ? content : ' '), /*#__PURE__*/_react["default"].createElement(_AutoCompleteStatus["default"], {
|
|
159
|
+
id: id + '__status--B'
|
|
160
|
+
}, !silenced && debounced && !bump ? content : ' '));
|
|
161
|
+
}
|
|
162
|
+
}]);
|
|
163
|
+
return Status;
|
|
164
|
+
}(_react.Component);
|
|
165
|
+
|
|
166
|
+
exports["default"] = Status;
|
|
167
|
+
Status.defaultProps = {
|
|
168
|
+
tQueryTooShort: function tQueryTooShort(minQueryLength) {
|
|
169
|
+
return "Type in ".concat(minQueryLength, " or more characters for results");
|
|
170
|
+
},
|
|
171
|
+
tNoResults: function tNoResults() {
|
|
172
|
+
return 'No search results';
|
|
173
|
+
},
|
|
174
|
+
tSelectedOption: function tSelectedOption(selectedOption, length, index) {
|
|
175
|
+
return "".concat(selectedOption, " ").concat(index + 1, " of ").concat(length, " is highlighted");
|
|
176
|
+
},
|
|
177
|
+
tResults: function tResults(length, contentSelectedOption) {
|
|
178
|
+
var words = {
|
|
179
|
+
result: length === 1 ? 'result' : 'results',
|
|
180
|
+
is: length === 1 ? 'is' : 'are'
|
|
181
|
+
};
|
|
182
|
+
return "".concat(length, " ").concat(words.result, " ").concat(words.is, " available. ").concat(contentSelectedOption);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
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 _AutoComplete = _interopRequireDefault(require("@digigov/ui/admin/AutoComplete"));
|
|
13
|
+
|
|
14
|
+
var _Field = _interopRequireDefault(require("@digigov/ui/core/Field"));
|
|
15
|
+
|
|
16
|
+
var _utils = _interopRequireDefault(require("@digigov/ui/admin/AutoComplete/utils"));
|
|
17
|
+
|
|
18
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_Field["default"], null, /*#__PURE__*/_react["default"].createElement(_AutoComplete["default"], {
|
|
19
|
+
source: _utils["default"],
|
|
20
|
+
cellWidth: "one-third",
|
|
21
|
+
id: "govgr"
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
var _ref2 = /*#__PURE__*/_react["default"].createElement("div", {
|
|
25
|
+
className: "govgr-btn govgr-btn-primary"
|
|
26
|
+
}, "lalal");
|
|
27
|
+
|
|
28
|
+
var Default = function Default() {
|
|
29
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _ref, _ref2);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.Default = Default;
|
|
33
|
+
var _default = Default;
|
|
34
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
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.WithAutoSelect = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _AutoComplete = _interopRequireDefault(require("@digigov/ui/admin/AutoComplete"));
|
|
13
|
+
|
|
14
|
+
var _Field = _interopRequireDefault(require("@digigov/ui/core/Field"));
|
|
15
|
+
|
|
16
|
+
var _utils = _interopRequireDefault(require("@digigov/ui/admin/AutoComplete/utils"));
|
|
17
|
+
|
|
18
|
+
var _ref = /*#__PURE__*/_react["default"].createElement("div", {
|
|
19
|
+
className: "govgr-btn govgr-btn-primary"
|
|
20
|
+
}, "lalal");
|
|
21
|
+
|
|
22
|
+
var WithAutoSelect = function WithAutoSelect() {
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Field["default"], null, /*#__PURE__*/_react["default"].createElement(_AutoComplete["default"], {
|
|
24
|
+
source: _utils["default"],
|
|
25
|
+
autoselect: true,
|
|
26
|
+
id: "govgr",
|
|
27
|
+
tNoResults: function tNoResults() {
|
|
28
|
+
return 'Δεν υπάρχουν αποτελέσματα';
|
|
29
|
+
}
|
|
30
|
+
})), _ref);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.WithAutoSelect = WithAutoSelect;
|
|
34
|
+
var _default = WithAutoSelect;
|
|
35
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
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.WithDefaultValue = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _AutoComplete = _interopRequireDefault(require("@digigov/ui/admin/AutoComplete"));
|
|
13
|
+
|
|
14
|
+
var _Field = _interopRequireDefault(require("@digigov/ui/core/Field"));
|
|
15
|
+
|
|
16
|
+
var _utils = _interopRequireDefault(require("@digigov/ui/admin/AutoComplete/utils"));
|
|
17
|
+
|
|
18
|
+
var _ref = /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Field["default"], null, /*#__PURE__*/_react["default"].createElement(_AutoComplete["default"], {
|
|
19
|
+
source: _utils["default"],
|
|
20
|
+
autoselect: true,
|
|
21
|
+
defaultValue: "Germany",
|
|
22
|
+
id: "govgr"
|
|
23
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
|
+
className: "govgr-btn govgr-btn-primary"
|
|
25
|
+
}, "lalal"));
|
|
26
|
+
|
|
27
|
+
var WithDefaultValue = function WithDefaultValue() {
|
|
28
|
+
return _ref;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.WithDefaultValue = WithDefaultValue;
|
|
32
|
+
var _default = WithDefaultValue;
|
|
33
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
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.WithInLine = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _AutoComplete = _interopRequireDefault(require("@digigov/ui/admin/AutoComplete"));
|
|
13
|
+
|
|
14
|
+
var _Field = _interopRequireDefault(require("@digigov/ui/core/Field"));
|
|
15
|
+
|
|
16
|
+
var _utils = _interopRequireDefault(require("@digigov/ui/admin/AutoComplete/utils"));
|
|
17
|
+
|
|
18
|
+
var _ref = /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Field["default"], null, /*#__PURE__*/_react["default"].createElement(_AutoComplete["default"], {
|
|
19
|
+
source: _utils["default"],
|
|
20
|
+
autoselect: true,
|
|
21
|
+
displayMenu: "inline",
|
|
22
|
+
id: "govgr"
|
|
23
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
24
|
+
className: "govgr-btn govgr-btn-primary"
|
|
25
|
+
}, "lalal"));
|
|
26
|
+
|
|
27
|
+
var WithInLine = function WithInLine() {
|
|
28
|
+
return _ref;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.WithInLine = WithInLine;
|
|
32
|
+
var _default = WithInLine;
|
|
33
|
+
exports["default"] = _default;
|