@digigov/ui 1.2.0-a7ffb5dc → 2.0.0-0edebf87
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/app/BannerContainer/index.test/index.js +43 -0
- package/app/BannerContainer/index.test/package.json +6 -0
- package/app/BannerContainer/index.test.d.ts +1 -0
- package/app/Footer/index.mdx +18 -5
- package/app/Footer/index.test/index.js +64 -0
- package/app/Footer/index.test/package.json +6 -0
- package/app/Footer/index.test.d.ts +1 -0
- package/app/Footer/interaction.test/index.js +46 -0
- package/app/Footer/interaction.test/package.json +6 -0
- package/app/Footer/interaction.test.d.ts +1 -0
- package/app/Header/index.mdx +7 -5
- package/app/Header/index.test/index.js +55 -0
- package/app/Header/index.test/package.json +6 -0
- package/app/Header/index.test.d.ts +1 -0
- package/app/Loader/index.test/index.js +43 -0
- package/app/Loader/index.test/package.json +6 -0
- package/app/Loader/index.test.d.ts +1 -0
- package/app/Masthead/index.mdx +9 -4
- package/app/Masthead/index.test/index.js +49 -0
- package/app/Masthead/index.test/package.json +6 -0
- package/app/Masthead/index.test.d.ts +1 -0
- package/app/Masthead/interaction.test/index.js +43 -0
- package/app/Masthead/interaction.test/package.json +6 -0
- package/app/Masthead/interaction.test.d.ts +1 -0
- package/app/Modal/Modal.stories/index.js +2 -1
- package/app/Modal/Modal.stories.d.ts +1 -0
- package/app/Modal/__stories__/WithoutModalGaps/index.js +36 -0
- package/app/Modal/__stories__/WithoutModalGaps/package.json +6 -0
- package/app/Modal/__stories__/WithoutModalGaps.d.ts +3 -0
- package/app/Modal/auto/index.js +4 -2
- package/app/Modal/auto.d.ts +2 -2
- package/app/Modal/index.d.ts +2 -2
- package/app/Modal/index.js +5 -3
- package/app/Modal/index.mdx +11 -4
- package/app/Modal/index.test/index.js +55 -0
- package/app/Modal/index.test/package.json +6 -0
- package/app/Modal/index.test.d.ts +1 -0
- package/app/Modal/interaction.test/index.js +119 -0
- package/app/Modal/interaction.test/package.json +6 -0
- package/app/Modal/interaction.test.d.ts +1 -0
- package/app/NotFound/index.mdx +2 -0
- package/app/NotFound/index.test/index.js +43 -0
- package/app/NotFound/index.test/package.json +6 -0
- package/app/NotFound/index.test.d.ts +1 -0
- package/app/Panel/index.mdx +9 -4
- package/app/Panel/index.test/index.js +43 -0
- package/app/Panel/index.test/package.json +6 -0
- package/app/Panel/index.test.d.ts +1 -0
- package/app/PhaseBannerHeader/index.mdx +4 -4
- package/app/PhaseBannerHeader/index.test/index.js +43 -0
- package/app/PhaseBannerHeader/index.test/package.json +6 -0
- package/app/PhaseBannerHeader/index.test.d.ts +1 -0
- package/app/QrCodeViewer/QRCode.stories.d.ts +1 -0
- package/app/QrCodeViewer/index.d.ts +1 -0
- package/app/QrCodeViewer/index.js +2 -1
- package/app/QrCodeViewer/index.mdx +4 -4
- package/app/QrCodeViewer/index.test/index.js +46 -0
- package/app/QrCodeViewer/index.test/package.json +6 -0
- package/app/QrCodeViewer/index.test.d.ts +1 -0
- package/app/Skeleton/Skeleton.stories/index.js +17 -0
- package/app/Skeleton/Skeleton.stories/package.json +6 -0
- package/app/Skeleton/Skeleton.stories.d.ts +18 -0
- package/app/Skeleton/__stories__/Button/index.js +9 -0
- package/app/Skeleton/__stories__/Button/package.json +6 -0
- package/app/Skeleton/__stories__/Button.d.ts +3 -0
- package/app/Skeleton/__stories__/Circular/index.js +11 -0
- package/app/Skeleton/__stories__/Circular/package.json +6 -0
- package/app/Skeleton/__stories__/Circular.d.ts +3 -0
- package/app/Skeleton/__stories__/Default/index.js +7 -0
- package/app/Skeleton/__stories__/Default/package.json +6 -0
- package/app/Skeleton/__stories__/Default.d.ts +3 -0
- package/app/Skeleton/__stories__/NoAnimation/index.js +9 -0
- package/{utils/Kitchensink/KitchensinkByCategory → app/Skeleton/__stories__/NoAnimation}/package.json +1 -1
- package/app/Skeleton/__stories__/NoAnimation.d.ts +3 -0
- package/app/Skeleton/__stories__/Rectangular/index.js +10 -0
- package/app/Skeleton/__stories__/Rectangular/package.json +6 -0
- package/app/Skeleton/__stories__/Rectangular.d.ts +3 -0
- package/app/Skeleton/__stories__/SpecificWidthAndHeight/index.js +10 -0
- package/app/Skeleton/__stories__/SpecificWidthAndHeight/package.json +6 -0
- package/app/Skeleton/__stories__/SpecificWidthAndHeight.d.ts +3 -0
- package/app/Skeleton/__stories__/TextSizes/index.js +26 -0
- package/{utils/Kitchensink/KitchensinkByLetter → app/Skeleton/__stories__/TextSizes}/package.json +1 -1
- package/app/Skeleton/__stories__/TextSizes.d.ts +3 -0
- package/app/Skeleton/__stories__/UnderTypography/index.js +10 -0
- package/{form/AutoComplete/__stories__/WithInLine → app/Skeleton/__stories__/UnderTypography}/package.json +1 -1
- package/app/Skeleton/__stories__/UnderTypography.d.ts +3 -0
- package/app/Skeleton/__stories__/WithChildren/index.js +8 -0
- package/app/Skeleton/__stories__/WithChildren/package.json +6 -0
- package/app/Skeleton/__stories__/WithChildren.d.ts +3 -0
- package/app/Skeleton/index.d.ts +3 -0
- package/app/Skeleton/index.js +3 -0
- package/{misc/KitchenSink → app/Skeleton}/package.json +1 -1
- package/app/ThemeOptions/index.d.ts +2 -2
- package/cjs/app/BannerContainer/index.test/index.js +46 -0
- package/cjs/app/Footer/index.mdx +18 -5
- package/cjs/app/Footer/index.test/index.js +67 -0
- package/cjs/app/Footer/interaction.test/index.js +49 -0
- package/cjs/app/Header/index.mdx +7 -5
- package/cjs/app/Header/index.test/index.js +58 -0
- package/cjs/app/Loader/index.test/index.js +46 -0
- package/cjs/app/Masthead/index.mdx +9 -4
- package/cjs/app/Masthead/index.test/index.js +52 -0
- package/cjs/app/Masthead/interaction.test/index.js +46 -0
- package/cjs/app/Modal/Modal.stories/index.js +12 -0
- package/cjs/app/Modal/__stories__/WithoutModalGaps/index.js +46 -0
- package/cjs/app/Modal/auto/index.js +4 -2
- package/cjs/app/Modal/index.js +5 -3
- package/cjs/app/Modal/index.mdx +11 -4
- package/cjs/app/Modal/index.test/index.js +58 -0
- package/cjs/app/Modal/interaction.test/index.js +122 -0
- package/cjs/app/NotFound/index.mdx +2 -0
- package/cjs/app/NotFound/index.test/index.js +46 -0
- package/cjs/app/Panel/index.mdx +9 -4
- package/cjs/app/Panel/index.test/index.js +46 -0
- package/cjs/app/PhaseBannerHeader/index.mdx +4 -4
- package/cjs/app/PhaseBannerHeader/index.test/index.js +46 -0
- package/cjs/app/QrCodeViewer/index.js +3 -2
- package/cjs/app/QrCodeViewer/index.mdx +4 -4
- package/cjs/app/QrCodeViewer/index.test/index.js +49 -0
- package/cjs/app/Skeleton/Skeleton.stories/index.js +123 -0
- package/cjs/app/Skeleton/__stories__/Button/index.js +16 -0
- package/cjs/app/Skeleton/__stories__/Circular/index.js +18 -0
- package/cjs/app/Skeleton/__stories__/Default/index.js +14 -0
- package/cjs/app/Skeleton/__stories__/NoAnimation/index.js +16 -0
- package/cjs/app/Skeleton/__stories__/Rectangular/index.js +17 -0
- package/cjs/app/Skeleton/__stories__/SpecificWidthAndHeight/index.js +17 -0
- package/cjs/app/Skeleton/__stories__/TextSizes/index.js +33 -0
- package/cjs/app/Skeleton/__stories__/UnderTypography/index.js +17 -0
- package/cjs/app/Skeleton/__stories__/WithChildren/index.js +15 -0
- package/cjs/app/Skeleton/index.js +23 -0
- package/cjs/content/Accordion/__stories__/Auto/index.js +2 -3
- package/cjs/content/Accordion/hooks/index.js +0 -1
- package/cjs/content/Accordion/index.mdx +9 -5
- package/cjs/content/Accordion/index.test/index.js +55 -0
- package/cjs/content/Accordion/interaction.test/index.js +46 -0
- package/cjs/content/Blockquote/index.mdx +3 -5
- package/cjs/content/Blockquote/index.test/index.js +49 -0
- package/cjs/content/Card/index.mdx +3 -5
- package/cjs/content/Card/index.test/index.js +76 -0
- package/cjs/content/Chip/index.mdx +4 -5
- package/cjs/content/Chip/index.test/index.js +58 -0
- package/cjs/content/Details/Details.stories.playwright.json +1 -7
- package/cjs/content/Details/index.mdx +3 -5
- package/cjs/content/Details/index.test/index.js +46 -0
- package/cjs/content/Details/interaction.test/index.js +46 -0
- package/cjs/content/List/__stories__/Default/index.js +1 -2
- package/cjs/content/List/index.mdx +3 -5
- package/cjs/content/List/index.test/index.js +61 -0
- package/cjs/content/SafeHTML/index.js +5 -8
- package/cjs/content/StepNav/index.mdx +28 -5
- package/cjs/content/StepNav/index.test/index.js +58 -0
- package/cjs/content/StepNav/interaction.test/index.js +52 -0
- package/cjs/content/SummaryList/index.mdx +10 -5
- package/cjs/content/SummaryList/index.test/index.js +61 -0
- package/cjs/content/SummaryList/interaction.test/index.js +49 -0
- package/cjs/content/Table/__stories__/WithLoader/index.js +2 -0
- package/cjs/content/Table/index.js +2 -2
- package/cjs/content/Table/index.mdx +13 -14
- package/cjs/content/Table/index.test/index.js +106 -0
- package/cjs/content/Table/interaction.test/index.js +46 -0
- package/cjs/content/TaskList/index.mdx +9 -5
- package/cjs/content/TaskList/index.test/index.js +49 -0
- package/cjs/content/Timeline/index.mdx +10 -5
- package/cjs/content/Timeline/index.test/index.js +49 -0
- package/cjs/feedback/CopyToClipboard/index.mdx +3 -5
- package/cjs/feedback/CopyToClipboard/index.test/index.js +52 -0
- package/cjs/feedback/CopyToClipboard/interaction.test/index.js +122 -0
- package/cjs/feedback/ErrorSummary/index.mdx +3 -5
- package/cjs/feedback/ErrorSummary/index.test/index.js +61 -0
- package/cjs/feedback/NotificationBanner/index.mdx +14 -5
- package/cjs/feedback/NotificationBanner/index.test/index.js +52 -0
- package/cjs/feedback/NotificationBanner/interaction.test/index.js +90 -0
- package/cjs/feedback/PhaseBanner/index.mdx +8 -5
- package/cjs/feedback/PhaseBanner/index.test/index.js +49 -0
- package/cjs/feedback/PhaseBanner/interaction.test/index.js +46 -0
- package/cjs/feedback/WarningText/index.mdx +5 -5
- package/cjs/feedback/WarningText/index.test/index.js +52 -0
- package/cjs/form/AutoComplete/AutoComplete.stories/index.js +44 -8
- package/cjs/form/AutoComplete/AutoComplete.stories.playwright.json +33 -0
- package/cjs/form/AutoComplete/Status/index.js +12 -5
- package/cjs/form/AutoComplete/__stories__/Multiple/index.js +24 -0
- package/cjs/form/AutoComplete/__stories__/{WithInLine → MultipleShowingTwoSelected}/index.js +7 -6
- package/cjs/form/AutoComplete/__stories__/MultipleWithDefaultValues/index.js +23 -0
- package/cjs/form/AutoComplete/__stories__/MultipleWithMinLength/index.js +26 -0
- package/cjs/form/AutoComplete/__stories__/WithShowAllValues/index.js +0 -1
- package/cjs/form/AutoComplete/index.js +334 -206
- package/cjs/form/AutoComplete/index.mdx +13 -20
- package/cjs/form/AutoComplete/index.test/index.js +73 -0
- package/cjs/form/AutoComplete/interaction.test/index.js +52 -0
- package/cjs/form/AutoComplete/utils/index.js +2 -1
- package/cjs/form/Button/Button.stories.playwright.json +1 -7
- package/cjs/form/Button/index.mdx +3 -5
- package/cjs/form/Button/index.test/index.js +79 -0
- package/cjs/form/Button/interaction.test/index.js +169 -0
- package/cjs/form/Checkbox/index.mdx +3 -5
- package/cjs/form/Checkbox/index.test/index.js +73 -0
- package/cjs/form/Checkbox/interaction.test/index.js +93 -0
- package/cjs/form/DateInputContainer/index.mdx +3 -5
- package/cjs/form/DateInputContainer/index.test/index.js +58 -0
- package/cjs/form/DateInputContainer/interaction.test/index.js +49 -0
- package/cjs/form/ErrorMessage/index.mdx +3 -5
- package/cjs/form/ErrorMessage/index.test/index.js +52 -0
- package/cjs/form/FileUpload/index.mdx +3 -5
- package/cjs/form/FileUpload/index.test/index.js +49 -0
- package/cjs/form/RadioContainer/index.mdx +2 -14
- package/cjs/form/RadioContainer/index.test/index.js +73 -0
- package/cjs/form/RadioContainer/interaction.test/index.js +90 -0
- package/cjs/form/SelectContainer/index.mdx +3 -1
- package/cjs/form/SelectContainer/index.test/index.js +55 -0
- package/cjs/form/SelectContainer/interaction.test/index.js +46 -0
- package/cjs/form/SingleCharacterInputs/index.mdx +3 -5
- package/cjs/form/SingleCharacterInputs/index.test/index.js +55 -0
- package/cjs/form/TextArea/index.mdx +3 -5
- package/cjs/form/TextArea/index.test/index.js +67 -0
- package/cjs/form/TextArea/interaction.test/index.js +87 -0
- package/cjs/form/TextInput/TextInput.stories/index.js +12 -0
- package/cjs/form/TextInput/__stories__/DisabledInputWithValue/index.js +31 -0
- package/cjs/form/TextInput/index.mdx +3 -5
- package/cjs/form/TextInput/index.test/index.js +73 -0
- package/cjs/form/TextInput/interaction.test/index.js +49 -0
- package/cjs/govgr/Footer/index.mdx +1 -1
- package/cjs/i18n/locales/el/index.js +2 -2
- package/cjs/i18n/locales/en/index.js +2 -2
- package/cjs/layouts/Basic/Basic.stories/index.js +12 -0
- package/cjs/layouts/Basic/Bottom/__stories__/Default/index.js +22 -0
- package/cjs/layouts/Basic/Bottom/index.mdx +9 -28
- package/cjs/layouts/Basic/Container/__stories__/Default/index.js +20 -0
- package/cjs/layouts/Basic/Container/index.mdx +23 -0
- package/cjs/layouts/Basic/Main/__stories__/Default/index.js +20 -0
- package/cjs/layouts/Basic/Main/index.mdx +10 -47
- package/cjs/layouts/Basic/Top/__stories__/Default/index.js +20 -0
- package/cjs/layouts/Basic/Top/index.mdx +10 -55
- package/cjs/layouts/Basic/__stories__/WithBasicLayout/index.js +19 -0
- package/cjs/layouts/Basic/index.mdx +27 -25
- package/cjs/layouts/Basic/index.test/index.js +55 -0
- package/cjs/layouts/Grid/index.mdx +39 -0
- package/cjs/layouts/Grid/index.test/index.js +52 -0
- package/cjs/layouts/Screen/index.test/index.js +55 -0
- package/cjs/layouts/Stack/index.test/index.js +61 -0
- package/cjs/lazy/index.js +155 -128
- package/cjs/navigation/BackLink/index.mdx +4 -5
- package/cjs/navigation/BackLink/index.test/index.js +46 -0
- package/cjs/navigation/BackLink/interaction.test/index.js +46 -0
- package/cjs/navigation/BackToTopLink/index.test/index.js +49 -0
- package/cjs/navigation/Breadcrumbs/index.mdx +6 -5
- package/cjs/navigation/Breadcrumbs/index.test/index.js +46 -0
- package/cjs/navigation/Breadcrumbs/interaction.test/index.js +52 -0
- package/cjs/navigation/Drawer/auto/index.js +4 -2
- package/cjs/navigation/Drawer/index.mdx +4 -10
- package/cjs/navigation/Drawer/index.test/index.js +52 -0
- package/cjs/navigation/Dropdown/Dropdown.stories/index.js +12 -0
- package/cjs/navigation/Dropdown/Dropdown.stories.playwright.json +16 -0
- package/cjs/navigation/Dropdown/__stories__/ScrollableContent/index.js +68 -0
- package/cjs/navigation/Dropdown/index.mdx +3 -5
- package/cjs/navigation/Dropdown/index.test/index.js +76 -0
- package/cjs/navigation/Dropdown/interaction.test/index.js +198 -0
- package/cjs/navigation/Link/Link.stories/index.js +12 -0
- package/cjs/navigation/Link/__stories__/WithProvider/index.js +23 -0
- package/cjs/navigation/Link/index.mdx +5 -15
- package/cjs/navigation/Link/index.test/index.js +64 -0
- package/cjs/navigation/Link/interaction.test/index.js +128 -0
- package/cjs/navigation/NavList/__stories__/Default/index.js +14 -2
- package/cjs/navigation/NavList/__stories__/HorizontalWithDrawer/index.js +35 -2
- package/cjs/navigation/NavList/__stories__/HorizontalWithoutDrawer/index.js +35 -2
- package/cjs/navigation/NavList/__stories__/NavListWithoutNav/index.js +14 -2
- package/cjs/navigation/NavList/__stories__/UsingNavListAuto/index.js +37 -4
- package/cjs/navigation/NavList/__stories__/Vertical/index.js +14 -2
- package/cjs/navigation/NavList/__stories__/VerticalWithoutDrawer/index.js +35 -2
- package/cjs/navigation/NavList/index.mdx +23 -7
- package/cjs/navigation/NavList/index.test/index.js +67 -0
- package/cjs/navigation/Pagination/__stories__/PaginationWithSmallFont/index.js +2 -2
- package/cjs/navigation/Pagination/__stories__/WithResultsPerPage/index.js +2 -2
- package/cjs/navigation/Pagination/index.mdx +9 -5
- package/cjs/navigation/Pagination/index.test/index.js +64 -0
- package/cjs/navigation/Pagination/interaction.test/index.js +49 -0
- package/cjs/navigation/SkipLink/index.test/index.js +46 -0
- package/cjs/navigation/Tabs/index.mdx +9 -5
- package/cjs/navigation/Tabs/index.test/index.js +52 -0
- package/cjs/navigation/Tabs/interaction.test/index.js +49 -0
- package/cjs/registry/index.js +8 -12
- package/cjs/typography/Heading/index.mdx +3 -5
- package/cjs/typography/Heading/index.test/index.js +46 -0
- package/cjs/typography/HeadingCaption/index.mdx +3 -5
- package/cjs/typography/HeadingCaption/index.test/index.js +49 -0
- package/cjs/typography/Hint/index.mdx +3 -5
- package/cjs/typography/Hint/index.test/index.js +49 -0
- package/cjs/typography/NormalText/index.mdx +3 -5
- package/cjs/typography/NormalText/index.test/index.js +55 -0
- package/cjs/typography/Paragraph/index.mdx +9 -30
- package/cjs/typography/Paragraph/index.test/index.js +58 -0
- package/cjs/typography/Typography/index.js +23 -0
- package/cjs/typography/Typography/index.mdx +12 -0
- package/cjs/typography/index.js +11 -0
- package/cjs/utils/Base/index.mdx +13 -0
- package/cjs/utils/TestVariant/index.js +25 -0
- package/cjs/utils/VisuallyHidden/index.mdx +10 -5
- package/cjs/utils/VisuallyHidden/index.test/index.js +46 -0
- package/content/Accordion/__stories__/Auto/index.js +2 -3
- package/content/Accordion/auto.d.ts +3 -3
- package/content/Accordion/hooks/index.js +0 -1
- package/content/Accordion/index.mdx +9 -5
- package/content/Accordion/index.test/index.js +52 -0
- package/content/Accordion/index.test/package.json +6 -0
- package/content/Accordion/index.test.d.ts +1 -0
- package/content/Accordion/interaction.test/index.js +43 -0
- package/content/Accordion/interaction.test/package.json +6 -0
- package/content/Accordion/interaction.test.d.ts +1 -0
- package/content/Blockquote/index.mdx +3 -5
- package/content/Blockquote/index.test/index.js +46 -0
- package/content/Blockquote/index.test/package.json +6 -0
- package/content/Blockquote/index.test.d.ts +1 -0
- package/content/Card/index.mdx +3 -5
- package/content/Card/index.test/index.js +73 -0
- package/content/Card/index.test/package.json +6 -0
- package/content/Card/index.test.d.ts +1 -0
- package/content/Chip/index.mdx +4 -5
- package/content/Chip/index.test/index.js +55 -0
- package/content/Chip/index.test/package.json +6 -0
- package/content/Chip/index.test.d.ts +1 -0
- package/content/Details/Details.stories.playwright.json +1 -7
- package/content/Details/index.mdx +3 -5
- package/content/Details/index.test/index.js +43 -0
- package/content/Details/index.test/package.json +6 -0
- package/content/Details/index.test.d.ts +1 -0
- package/content/Details/interaction.test/index.js +43 -0
- package/content/Details/interaction.test/package.json +6 -0
- package/content/Details/interaction.test.d.ts +1 -0
- package/content/List/__stories__/Default/index.js +1 -2
- package/content/List/index.mdx +3 -5
- package/content/List/index.test/index.js +58 -0
- package/content/List/index.test/package.json +6 -0
- package/content/List/index.test.d.ts +1 -0
- package/content/SafeHTML/index.d.ts +1 -1
- package/content/SafeHTML/index.js +5 -8
- package/content/StepNav/auto.d.ts +3 -3
- package/content/StepNav/index.mdx +28 -5
- package/content/StepNav/index.test/index.js +55 -0
- package/content/StepNav/index.test/package.json +6 -0
- package/content/StepNav/index.test.d.ts +1 -0
- package/content/StepNav/interaction.test/index.js +49 -0
- package/content/StepNav/interaction.test/package.json +6 -0
- package/content/StepNav/interaction.test.d.ts +1 -0
- package/content/SummaryList/index.mdx +10 -5
- package/content/SummaryList/index.test/index.js +58 -0
- package/content/SummaryList/index.test/package.json +6 -0
- package/content/SummaryList/index.test.d.ts +1 -0
- package/content/SummaryList/interaction.test/index.js +46 -0
- package/content/SummaryList/interaction.test/package.json +6 -0
- package/content/SummaryList/interaction.test.d.ts +1 -0
- package/content/Table/__stories__/WithLoader/index.js +1 -0
- package/content/Table/index.d.ts +1 -1
- package/content/Table/index.js +2 -2
- package/content/Table/index.mdx +13 -14
- package/content/Table/index.test/index.js +103 -0
- package/content/Table/index.test/package.json +6 -0
- package/content/Table/index.test.d.ts +1 -0
- package/content/Table/interaction.test/index.js +43 -0
- package/content/Table/interaction.test/package.json +6 -0
- package/content/Table/interaction.test.d.ts +1 -0
- package/content/TaskList/index.mdx +9 -5
- package/content/TaskList/index.test/index.js +46 -0
- package/content/TaskList/index.test/package.json +6 -0
- package/content/TaskList/index.test.d.ts +1 -0
- package/content/Timeline/index.mdx +10 -5
- package/content/Timeline/index.test/index.js +46 -0
- package/content/Timeline/index.test/package.json +6 -0
- package/content/Timeline/index.test.d.ts +1 -0
- package/feedback/CopyToClipboard/index.d.ts +1 -1
- package/feedback/CopyToClipboard/index.mdx +3 -5
- package/feedback/CopyToClipboard/index.test/index.js +49 -0
- package/feedback/CopyToClipboard/index.test/package.json +6 -0
- package/feedback/CopyToClipboard/index.test.d.ts +1 -0
- package/feedback/CopyToClipboard/interaction.test/index.js +119 -0
- package/feedback/CopyToClipboard/interaction.test/package.json +6 -0
- package/feedback/CopyToClipboard/interaction.test.d.ts +1 -0
- package/feedback/ErrorSummary/index.mdx +3 -5
- package/feedback/ErrorSummary/index.test/index.js +58 -0
- package/feedback/ErrorSummary/index.test/package.json +6 -0
- package/feedback/ErrorSummary/index.test.d.ts +1 -0
- package/feedback/NotificationBanner/index.mdx +14 -5
- package/feedback/NotificationBanner/index.test/index.js +49 -0
- package/{utils/Kitchensink/KitchensinkDashboard → feedback/NotificationBanner/index.test}/package.json +1 -1
- package/feedback/NotificationBanner/index.test.d.ts +1 -0
- package/feedback/NotificationBanner/interaction.test/index.js +87 -0
- package/feedback/NotificationBanner/interaction.test/package.json +6 -0
- package/feedback/NotificationBanner/interaction.test.d.ts +1 -0
- package/feedback/PhaseBanner/index.mdx +8 -5
- package/feedback/PhaseBanner/index.test/index.js +46 -0
- package/{utils/Kitchensink/AllComponents → feedback/PhaseBanner/index.test}/package.json +1 -1
- package/feedback/PhaseBanner/index.test.d.ts +1 -0
- package/feedback/PhaseBanner/interaction.test/index.js +43 -0
- package/feedback/PhaseBanner/interaction.test/package.json +6 -0
- package/feedback/PhaseBanner/interaction.test.d.ts +1 -0
- package/feedback/WarningText/index.mdx +5 -5
- package/feedback/WarningText/index.test/index.js +49 -0
- package/feedback/WarningText/index.test/package.json +6 -0
- package/feedback/WarningText/index.test.d.ts +1 -0
- package/form/AutoComplete/AutoComplete.stories/index.js +4 -1
- package/form/AutoComplete/AutoComplete.stories.d.ts +4 -1
- package/form/AutoComplete/AutoComplete.stories.playwright.json +33 -0
- package/form/AutoComplete/Status/index.d.ts +4 -2
- package/form/AutoComplete/Status/index.js +11 -4
- package/form/AutoComplete/__stories__/Multiple/index.js +17 -0
- package/form/AutoComplete/__stories__/Multiple/package.json +6 -0
- package/form/AutoComplete/__stories__/Multiple.d.ts +3 -0
- package/form/AutoComplete/__stories__/{WithInLine → MultipleShowingTwoSelected}/index.js +6 -5
- package/form/AutoComplete/__stories__/MultipleShowingTwoSelected/package.json +6 -0
- package/form/AutoComplete/__stories__/MultipleShowingTwoSelected.d.ts +3 -0
- package/form/AutoComplete/__stories__/MultipleWithDefaultValues/index.js +16 -0
- package/form/AutoComplete/__stories__/MultipleWithDefaultValues/package.json +6 -0
- package/form/AutoComplete/__stories__/MultipleWithDefaultValues.d.ts +3 -0
- package/form/AutoComplete/__stories__/MultipleWithMinLength/index.js +19 -0
- package/form/AutoComplete/__stories__/MultipleWithMinLength/package.json +6 -0
- package/form/AutoComplete/__stories__/MultipleWithMinLength.d.ts +3 -0
- package/form/AutoComplete/__stories__/WithShowAllValues/index.js +0 -1
- package/form/AutoComplete/index.d.ts +13 -20
- package/form/AutoComplete/index.js +317 -201
- package/form/AutoComplete/index.mdx +13 -20
- package/form/AutoComplete/index.test/index.js +70 -0
- package/form/AutoComplete/index.test/package.json +6 -0
- package/form/AutoComplete/index.test.d.ts +1 -0
- package/form/AutoComplete/interaction.test/index.js +49 -0
- package/form/AutoComplete/interaction.test/package.json +6 -0
- package/form/AutoComplete/interaction.test.d.ts +1 -0
- package/form/AutoComplete/utils/index.js +2 -1
- package/form/AutoComplete/utils.d.ts +1 -0
- package/form/Button/Button.stories.playwright.json +1 -7
- package/form/Button/index.mdx +3 -5
- package/form/Button/index.test/index.js +76 -0
- package/form/Button/index.test/package.json +6 -0
- package/form/Button/index.test.d.ts +1 -0
- package/form/Button/interaction.test/index.js +166 -0
- package/form/Button/interaction.test/package.json +6 -0
- package/form/Button/interaction.test.d.ts +1 -0
- package/form/Checkbox/index.mdx +3 -5
- package/form/Checkbox/index.test/index.js +70 -0
- package/form/Checkbox/index.test/package.json +6 -0
- package/form/Checkbox/index.test.d.ts +1 -0
- package/form/Checkbox/interaction.test/index.js +90 -0
- package/form/Checkbox/interaction.test/package.json +6 -0
- package/form/Checkbox/interaction.test.d.ts +1 -0
- package/form/DateInputContainer/index.mdx +3 -5
- package/form/DateInputContainer/index.test/index.js +55 -0
- package/form/DateInputContainer/index.test/package.json +6 -0
- package/form/DateInputContainer/index.test.d.ts +1 -0
- package/form/DateInputContainer/interaction.test/index.js +46 -0
- package/form/DateInputContainer/interaction.test/package.json +6 -0
- package/form/DateInputContainer/interaction.test.d.ts +1 -0
- package/form/ErrorMessage/index.mdx +3 -5
- package/form/ErrorMessage/index.test/index.js +49 -0
- package/form/ErrorMessage/index.test/package.json +6 -0
- package/form/ErrorMessage/index.test.d.ts +1 -0
- package/form/FileUpload/index.mdx +3 -5
- package/form/FileUpload/index.test/index.js +46 -0
- package/form/FileUpload/index.test/package.json +6 -0
- package/form/FileUpload/index.test.d.ts +1 -0
- package/form/RadioContainer/index.mdx +2 -14
- package/form/RadioContainer/index.test/index.js +70 -0
- package/form/RadioContainer/index.test/package.json +6 -0
- package/form/RadioContainer/index.test.d.ts +1 -0
- package/form/RadioContainer/interaction.test/index.js +87 -0
- package/form/RadioContainer/interaction.test/package.json +6 -0
- package/form/RadioContainer/interaction.test.d.ts +1 -0
- package/form/SelectContainer/index.mdx +3 -1
- package/form/SelectContainer/index.test/index.js +52 -0
- package/form/SelectContainer/index.test/package.json +6 -0
- package/form/SelectContainer/index.test.d.ts +1 -0
- package/form/SelectContainer/interaction.test/index.js +43 -0
- package/form/SelectContainer/interaction.test/package.json +6 -0
- package/form/SelectContainer/interaction.test.d.ts +1 -0
- package/form/SingleCharacterInputs/index.mdx +3 -5
- package/form/SingleCharacterInputs/index.test/index.js +52 -0
- package/form/SingleCharacterInputs/index.test/package.json +6 -0
- package/form/SingleCharacterInputs/index.test.d.ts +1 -0
- package/form/TextArea/index.mdx +3 -5
- package/form/TextArea/index.test/index.js +64 -0
- package/form/TextArea/index.test/package.json +6 -0
- package/form/TextArea/index.test.d.ts +1 -0
- package/form/TextArea/interaction.test/index.js +84 -0
- package/form/TextArea/interaction.test/package.json +6 -0
- package/form/TextArea/interaction.test.d.ts +1 -0
- package/form/TextInput/TextInput.stories/index.js +1 -0
- package/form/TextInput/TextInput.stories.d.ts +1 -0
- package/form/TextInput/__stories__/DisabledInputWithValue/index.js +25 -0
- package/form/TextInput/__stories__/DisabledInputWithValue/package.json +6 -0
- package/form/TextInput/__stories__/DisabledInputWithValue.d.ts +3 -0
- package/form/TextInput/index.mdx +3 -5
- package/form/TextInput/index.test/index.js +70 -0
- package/form/TextInput/index.test/package.json +6 -0
- package/form/TextInput/index.test.d.ts +1 -0
- package/form/TextInput/interaction.test/index.js +46 -0
- package/form/TextInput/interaction.test/package.json +6 -0
- package/form/TextInput/interaction.test.d.ts +1 -0
- package/govgr/Footer/index.mdx +1 -1
- package/i18n/locales/el/index.js +2 -2
- package/i18n/locales/en/index.js +2 -2
- package/index.js +1 -1
- package/layouts/Basic/Basic.stories/index.js +2 -1
- package/layouts/Basic/Basic.stories.d.ts +1 -0
- package/layouts/Basic/Bottom/__stories__/Default/index.js +15 -0
- package/layouts/Basic/Bottom/__stories__/Default/package.json +6 -0
- package/layouts/Basic/Bottom/__stories__/Default.d.ts +3 -0
- package/layouts/Basic/Bottom/index.mdx +9 -28
- package/layouts/Basic/Container/__stories__/Default/index.js +13 -0
- package/layouts/Basic/Container/__stories__/Default/package.json +6 -0
- package/layouts/Basic/Container/__stories__/Default.d.ts +3 -0
- package/layouts/Basic/Container/index.mdx +23 -0
- package/layouts/Basic/Main/__stories__/Default/index.js +13 -0
- package/layouts/Basic/Main/__stories__/Default/package.json +6 -0
- package/layouts/Basic/Main/__stories__/Default.d.ts +3 -0
- package/layouts/Basic/Main/index.mdx +10 -47
- package/layouts/Basic/Top/__stories__/Default/index.js +13 -0
- package/layouts/Basic/Top/__stories__/Default/package.json +6 -0
- package/layouts/Basic/Top/__stories__/Default.d.ts +3 -0
- package/layouts/Basic/Top/index.mdx +10 -55
- package/layouts/Basic/__stories__/WithBasicLayout/index.js +12 -0
- package/layouts/Basic/__stories__/WithBasicLayout/package.json +6 -0
- package/layouts/Basic/__stories__/WithBasicLayout.d.ts +3 -0
- package/layouts/Basic/index.mdx +27 -25
- package/layouts/Basic/index.test/index.js +52 -0
- package/layouts/Basic/index.test/package.json +6 -0
- package/layouts/Basic/index.test.d.ts +1 -0
- package/layouts/Grid/index.mdx +39 -0
- package/layouts/Grid/index.test/index.js +49 -0
- package/layouts/Grid/index.test/package.json +6 -0
- package/layouts/Grid/index.test.d.ts +1 -0
- package/layouts/Screen/index.test/index.js +52 -0
- package/layouts/Screen/index.test/package.json +6 -0
- package/layouts/Screen/index.test.d.ts +1 -0
- package/layouts/Stack/index.test/index.js +58 -0
- package/layouts/Stack/index.test/package.json +6 -0
- package/layouts/Stack/index.test.d.ts +1 -0
- package/lazy/index.js +123 -102
- package/lazy.d.ts +270 -267
- package/navigation/BackLink/index.mdx +4 -5
- package/navigation/BackLink/index.test/index.js +43 -0
- package/navigation/BackLink/index.test/package.json +6 -0
- package/navigation/BackLink/index.test.d.ts +1 -0
- package/navigation/BackLink/interaction.test/index.js +43 -0
- package/navigation/BackLink/interaction.test/package.json +6 -0
- package/navigation/BackLink/interaction.test.d.ts +1 -0
- package/navigation/BackToTopLink/index.test/index.js +46 -0
- package/navigation/BackToTopLink/index.test/package.json +6 -0
- package/navigation/BackToTopLink/index.test.d.ts +1 -0
- package/navigation/Breadcrumbs/index.mdx +6 -5
- package/navigation/Breadcrumbs/index.test/index.js +43 -0
- package/navigation/Breadcrumbs/index.test/package.json +6 -0
- package/navigation/Breadcrumbs/index.test.d.ts +1 -0
- package/navigation/Breadcrumbs/interaction.test/index.js +49 -0
- package/navigation/Breadcrumbs/interaction.test/package.json +6 -0
- package/navigation/Breadcrumbs/interaction.test.d.ts +1 -0
- package/navigation/Drawer/auto/index.js +4 -2
- package/navigation/Drawer/auto.d.ts +3 -3
- package/navigation/Drawer/index.mdx +4 -10
- package/navigation/Drawer/index.test/index.js +49 -0
- package/navigation/Drawer/index.test/package.json +6 -0
- package/navigation/Drawer/index.test.d.ts +1 -0
- package/navigation/Dropdown/Dropdown.stories/index.js +1 -0
- package/navigation/Dropdown/Dropdown.stories.d.ts +1 -0
- package/navigation/Dropdown/Dropdown.stories.playwright.json +16 -0
- package/navigation/Dropdown/__stories__/ScrollableContent/index.js +61 -0
- package/navigation/Dropdown/__stories__/ScrollableContent/package.json +6 -0
- package/navigation/Dropdown/__stories__/ScrollableContent.d.ts +3 -0
- package/navigation/Dropdown/index.d.ts +1 -1
- package/navigation/Dropdown/index.mdx +3 -5
- package/navigation/Dropdown/index.test/index.js +73 -0
- package/navigation/Dropdown/index.test/package.json +6 -0
- package/navigation/Dropdown/index.test.d.ts +1 -0
- package/navigation/Dropdown/interaction.test/index.js +195 -0
- package/navigation/Dropdown/interaction.test/package.json +6 -0
- package/navigation/Dropdown/interaction.test.d.ts +1 -0
- package/navigation/Link/Link.stories/index.js +2 -1
- package/navigation/Link/Link.stories.d.ts +1 -0
- package/navigation/Link/__stories__/WithProvider/index.js +16 -0
- package/navigation/Link/__stories__/WithProvider/package.json +6 -0
- package/navigation/Link/__stories__/WithProvider.d.ts +3 -0
- package/navigation/Link/index.mdx +5 -15
- package/navigation/Link/index.test/index.js +61 -0
- package/navigation/Link/index.test/package.json +6 -0
- package/navigation/Link/index.test.d.ts +1 -0
- package/navigation/Link/interaction.test/index.js +125 -0
- package/navigation/Link/interaction.test/package.json +6 -0
- package/navigation/Link/interaction.test.d.ts +1 -0
- package/navigation/NavList/__stories__/Default/index.js +13 -1
- package/navigation/NavList/__stories__/HorizontalWithDrawer/index.js +34 -1
- package/navigation/NavList/__stories__/HorizontalWithoutDrawer/index.js +34 -1
- package/navigation/NavList/__stories__/NavListWithoutNav/index.js +13 -1
- package/navigation/NavList/__stories__/UsingNavListAuto/index.js +35 -2
- package/navigation/NavList/__stories__/Vertical/index.js +13 -1
- package/navigation/NavList/__stories__/VerticalWithoutDrawer/index.js +34 -1
- package/navigation/NavList/index.mdx +23 -7
- package/navigation/NavList/index.test/index.js +64 -0
- package/navigation/NavList/index.test/package.json +6 -0
- package/navigation/NavList/index.test.d.ts +1 -0
- package/navigation/NavList/types.d.ts +1 -2
- package/navigation/Pagination/__stories__/PaginationWithSmallFont/index.js +1 -1
- package/navigation/Pagination/__stories__/WithResultsPerPage/index.js +1 -1
- package/navigation/Pagination/auto.d.ts +4 -4
- package/navigation/Pagination/index.d.ts +2 -2
- package/navigation/Pagination/index.mdx +9 -5
- package/navigation/Pagination/index.test/index.js +61 -0
- package/navigation/Pagination/index.test/package.json +6 -0
- package/navigation/Pagination/index.test.d.ts +1 -0
- package/navigation/Pagination/interaction.test/index.js +46 -0
- package/{utils/Kitchensink/KitchensinkComponent → navigation/Pagination/interaction.test}/package.json +1 -1
- package/navigation/Pagination/interaction.test.d.ts +1 -0
- package/navigation/SkipLink/index.test/index.js +43 -0
- package/navigation/SkipLink/index.test/package.json +6 -0
- package/navigation/SkipLink/index.test.d.ts +1 -0
- package/navigation/Tabs/auto.d.ts +2 -2
- package/navigation/Tabs/index.mdx +9 -5
- package/navigation/Tabs/index.test/index.js +49 -0
- package/navigation/Tabs/index.test/package.json +6 -0
- package/navigation/Tabs/index.test.d.ts +1 -0
- package/navigation/Tabs/interaction.test/index.js +46 -0
- package/navigation/Tabs/interaction.test/package.json +6 -0
- package/navigation/Tabs/interaction.test.d.ts +1 -0
- package/package.json +8 -10
- package/registry/index.js +8 -12
- package/registry.d.ts +5 -6
- package/src/app/BannerContainer/index.test.tsx +20 -0
- package/src/app/Footer/index.mdx +18 -5
- package/src/app/Footer/index.test.tsx +48 -0
- package/src/app/Footer/interaction.test.tsx +17 -0
- package/src/app/Header/index.mdx +7 -5
- package/src/app/Header/index.test.tsx +36 -0
- package/src/app/Loader/index.test.tsx +20 -0
- package/src/app/Masthead/index.mdx +9 -4
- package/src/app/Masthead/index.test.tsx +28 -0
- package/src/app/Masthead/interaction.test.tsx +15 -0
- package/src/app/Modal/Modal.stories.js +1 -0
- package/src/app/Modal/__stories__/WithoutModalGaps.tsx +52 -0
- package/src/app/Modal/auto.tsx +2 -2
- package/src/app/Modal/index.mdx +11 -4
- package/src/app/Modal/index.test.tsx +36 -0
- package/src/app/Modal/index.tsx +3 -3
- package/src/app/Modal/interaction.test.tsx +41 -0
- package/src/app/NotFound/index.mdx +2 -0
- package/src/app/NotFound/index.test.tsx +20 -0
- package/src/app/Panel/index.mdx +9 -4
- package/src/app/Panel/index.test.tsx +20 -0
- package/src/app/PhaseBannerHeader/index.mdx +4 -4
- package/src/app/PhaseBannerHeader/index.test.tsx +20 -0
- package/src/app/QrCodeViewer/index.mdx +4 -4
- package/src/app/QrCodeViewer/index.test.tsx +24 -0
- package/src/app/QrCodeViewer/index.tsx +2 -0
- package/src/app/Skeleton/Skeleton.stories.js +19 -0
- package/src/app/Skeleton/__stories__/Button.tsx +6 -0
- package/src/app/Skeleton/__stories__/Circular.tsx +8 -0
- package/src/app/Skeleton/__stories__/Default.tsx +6 -0
- package/src/app/Skeleton/__stories__/NoAnimation.tsx +6 -0
- package/src/app/Skeleton/__stories__/Rectangular.tsx +8 -0
- package/src/app/Skeleton/__stories__/SpecificWidthAndHeight.tsx +8 -0
- package/src/app/Skeleton/__stories__/TextSizes.tsx +14 -0
- package/src/app/Skeleton/__stories__/UnderTypography.tsx +17 -0
- package/src/app/Skeleton/__stories__/WithChildren.tsx +11 -0
- package/src/app/Skeleton/index.tsx +4 -0
- package/src/app/ThemeOptions/index.tsx +1 -1
- package/src/content/Accordion/__stories__/Auto.tsx +2 -2
- package/src/content/Accordion/auto.tsx +1 -1
- package/src/content/Accordion/hooks.ts +0 -1
- package/src/content/Accordion/index.mdx +9 -5
- package/src/content/Accordion/index.test.tsx +32 -0
- package/src/content/Accordion/interaction.test.tsx +15 -0
- package/src/content/Blockquote/index.mdx +3 -5
- package/src/content/Blockquote/index.test.tsx +24 -0
- package/src/content/Card/index.mdx +3 -5
- package/src/content/Card/index.test.tsx +60 -0
- package/src/content/Chip/index.mdx +4 -5
- package/src/content/Chip/index.test.tsx +36 -0
- package/src/content/Details/Details.stories.playwright.json +1 -7
- package/src/content/Details/index.mdx +3 -5
- package/src/content/Details/index.test.tsx +20 -0
- package/src/content/Details/interaction.test.tsx +15 -0
- package/src/content/List/__stories__/Default.tsx +3 -4
- package/src/content/List/index.mdx +3 -5
- package/src/content/List/index.test.tsx +40 -0
- package/src/content/SafeHTML/index.tsx +3 -4
- package/src/content/StepNav/index.mdx +28 -5
- package/src/content/StepNav/index.test.tsx +36 -0
- package/src/content/StepNav/interaction.test.tsx +18 -0
- package/src/content/SummaryList/index.mdx +10 -5
- package/src/content/SummaryList/index.test.tsx +40 -0
- package/src/content/SummaryList/interaction.test.tsx +17 -0
- package/src/content/Table/__stories__/WithLoader.tsx +1 -0
- package/src/content/Table/index.mdx +13 -14
- package/src/content/Table/index.test.tsx +92 -0
- package/src/content/Table/index.tsx +2 -2
- package/src/content/Table/interaction.test.tsx +15 -0
- package/src/content/TaskList/index.mdx +9 -5
- package/src/content/TaskList/index.test.tsx +24 -0
- package/src/content/Timeline/index.mdx +10 -5
- package/src/content/Timeline/index.test.tsx +24 -0
- package/src/feedback/CopyToClipboard/index.mdx +3 -5
- package/src/feedback/CopyToClipboard/index.test.tsx +28 -0
- package/src/feedback/CopyToClipboard/interaction.test.tsx +41 -0
- package/src/feedback/ErrorSummary/index.mdx +3 -5
- package/src/feedback/ErrorSummary/index.test.tsx +40 -0
- package/src/feedback/NotificationBanner/index.mdx +14 -5
- package/src/feedback/NotificationBanner/index.test.tsx +28 -0
- package/src/feedback/NotificationBanner/interaction.test.tsx +32 -0
- package/src/feedback/PhaseBanner/index.mdx +8 -5
- package/src/feedback/PhaseBanner/index.test.tsx +24 -0
- package/src/feedback/PhaseBanner/interaction.test.tsx +15 -0
- package/src/feedback/WarningText/index.mdx +5 -5
- package/src/feedback/WarningText/index.test.tsx +28 -0
- package/src/form/AutoComplete/AutoComplete.stories.js +4 -1
- package/src/form/AutoComplete/AutoComplete.stories.playwright.json +33 -0
- package/src/form/AutoComplete/Status/index.tsx +10 -6
- package/src/form/AutoComplete/__stories__/Multiple.tsx +18 -0
- package/src/form/AutoComplete/__stories__/{WithInLine.tsx → MultipleShowingTwoSelected.tsx} +3 -8
- package/src/form/AutoComplete/__stories__/MultipleWithDefaultValues.tsx +16 -0
- package/src/form/AutoComplete/__stories__/MultipleWithMinLength.tsx +29 -0
- package/src/form/AutoComplete/__stories__/WithShowAllValues.tsx +0 -1
- package/src/form/AutoComplete/index.mdx +13 -20
- package/src/form/AutoComplete/index.test.tsx +56 -0
- package/src/form/AutoComplete/index.tsx +367 -215
- package/src/form/AutoComplete/interaction.test.tsx +18 -0
- package/src/form/AutoComplete/utils.ts +3 -2
- package/src/form/Button/Button.stories.playwright.json +1 -7
- package/src/form/Button/index.mdx +3 -5
- package/src/form/Button/index.test.tsx +64 -0
- package/src/form/Button/interaction.test.tsx +60 -0
- package/src/form/Checkbox/index.mdx +3 -5
- package/src/form/Checkbox/index.test.tsx +56 -0
- package/src/form/Checkbox/interaction.test.tsx +32 -0
- package/src/form/DateInputContainer/index.mdx +3 -5
- package/src/form/DateInputContainer/index.test.tsx +36 -0
- package/src/form/DateInputContainer/interaction.test.tsx +17 -0
- package/src/form/ErrorMessage/index.mdx +3 -5
- package/src/form/ErrorMessage/index.test.tsx +28 -0
- package/src/form/FileUpload/index.mdx +3 -5
- package/src/form/FileUpload/index.test.tsx +24 -0
- package/src/form/RadioContainer/index.mdx +2 -14
- package/src/form/RadioContainer/index.test.tsx +56 -0
- package/src/form/RadioContainer/interaction.test.tsx +31 -0
- package/src/form/SelectContainer/index.mdx +3 -1
- package/src/form/SelectContainer/index.test.tsx +32 -0
- package/src/form/SelectContainer/interaction.test.tsx +15 -0
- package/src/form/SingleCharacterInputs/index.mdx +3 -5
- package/src/form/SingleCharacterInputs/index.test.tsx +32 -0
- package/src/form/TextArea/index.mdx +3 -5
- package/src/form/TextArea/index.test.tsx +48 -0
- package/src/form/TextArea/interaction.test.tsx +30 -0
- package/src/form/TextInput/TextInput.stories.js +1 -0
- package/src/form/TextInput/__stories__/DisabledInputWithValue.tsx +27 -0
- package/src/form/TextInput/index.mdx +3 -5
- package/src/form/TextInput/index.test.tsx +56 -0
- package/src/form/TextInput/interaction.test.tsx +17 -0
- package/src/govgr/Footer/index.mdx +1 -1
- package/src/i18n/locales/el.ts +2 -2
- package/src/i18n/locales/en.ts +2 -2
- package/src/layouts/Basic/Basic.stories.js +1 -0
- package/src/layouts/Basic/Bottom/__stories__/Default.tsx +35 -0
- package/src/layouts/Basic/Bottom/index.mdx +9 -28
- package/src/layouts/Basic/Container/__stories__/Default.tsx +30 -0
- package/src/layouts/Basic/Container/index.mdx +23 -0
- package/src/layouts/Basic/Main/__stories__/Default.tsx +30 -0
- package/src/layouts/Basic/Main/index.mdx +10 -47
- package/src/layouts/Basic/Top/__stories__/Default.tsx +28 -0
- package/src/layouts/Basic/Top/index.mdx +10 -55
- package/src/layouts/Basic/__stories__/MultipleRowsLayout.tsx +1 -0
- package/src/layouts/Basic/__stories__/WithBasicLayout.tsx +20 -0
- package/src/layouts/Basic/index.mdx +27 -25
- package/src/layouts/Basic/index.test.tsx +32 -0
- package/src/layouts/Grid/index.mdx +39 -0
- package/src/layouts/Grid/index.test.tsx +28 -0
- package/src/layouts/Screen/index.test.tsx +32 -0
- package/src/layouts/Stack/index.test.tsx +40 -0
- package/src/lazy.js +19 -16
- package/src/navigation/BackLink/index.mdx +4 -5
- package/src/navigation/BackLink/index.test.tsx +20 -0
- package/src/navigation/BackLink/interaction.test.tsx +15 -0
- package/src/navigation/BackToTopLink/index.test.tsx +24 -0
- package/src/navigation/Breadcrumbs/index.mdx +6 -5
- package/src/navigation/Breadcrumbs/index.test.tsx +20 -0
- package/src/navigation/Breadcrumbs/interaction.test.tsx +18 -0
- package/src/navigation/Drawer/auto.tsx +2 -2
- package/src/navigation/Drawer/index.mdx +4 -10
- package/src/navigation/Drawer/index.test.tsx +28 -0
- package/src/navigation/Dropdown/Dropdown.stories.js +1 -0
- package/src/navigation/Dropdown/Dropdown.stories.playwright.json +16 -0
- package/src/navigation/Dropdown/__stories__/ScrollableContent.tsx +82 -0
- package/src/navigation/Dropdown/index.mdx +3 -5
- package/src/navigation/Dropdown/index.test.tsx +60 -0
- package/src/navigation/Dropdown/interaction.test.tsx +67 -0
- package/src/navigation/Link/Link.stories.js +1 -0
- package/src/navigation/Link/__stories__/WithProvider.tsx +16 -0
- package/src/navigation/Link/index.mdx +5 -15
- package/src/navigation/Link/index.test.tsx +44 -0
- package/src/navigation/Link/interaction.test.tsx +45 -0
- package/src/navigation/NavList/__stories__/Default.tsx +18 -1
- package/src/navigation/NavList/__stories__/HorizontalWithDrawer.tsx +37 -1
- package/src/navigation/NavList/__stories__/HorizontalWithoutDrawer.tsx +37 -1
- package/src/navigation/NavList/__stories__/NavListWithoutNav.tsx +18 -1
- package/src/navigation/NavList/__stories__/UsingNavListAuto.tsx +39 -2
- package/src/navigation/NavList/__stories__/Vertical.tsx +18 -1
- package/src/navigation/NavList/__stories__/VerticalWithoutDrawer.tsx +37 -1
- package/src/navigation/NavList/index.mdx +23 -7
- package/src/navigation/NavList/index.test.tsx +48 -0
- package/src/navigation/NavList/types.tsx +1 -2
- package/src/navigation/Pagination/__stories__/PaginationWithSmallFont.tsx +1 -1
- package/src/navigation/Pagination/__stories__/WithResultsPerPage.tsx +1 -1
- package/src/navigation/Pagination/index.mdx +9 -5
- package/src/navigation/Pagination/index.test.tsx +44 -0
- package/src/navigation/Pagination/interaction.test.tsx +17 -0
- package/src/navigation/SkipLink/index.test.tsx +20 -0
- package/src/navigation/Tabs/index.mdx +9 -5
- package/src/navigation/Tabs/index.test.tsx +28 -0
- package/src/navigation/Tabs/interaction.test.tsx +17 -0
- package/src/registry.js +8 -12
- package/src/typography/Heading/index.mdx +3 -5
- package/src/typography/Heading/index.test.tsx +20 -0
- package/src/typography/HeadingCaption/index.mdx +3 -5
- package/src/typography/HeadingCaption/index.test.tsx +24 -0
- package/src/typography/Hint/index.mdx +3 -5
- package/src/typography/Hint/index.test.tsx +24 -0
- package/src/typography/NormalText/index.mdx +3 -5
- package/src/typography/NormalText/index.test.tsx +32 -0
- package/src/typography/Paragraph/index.mdx +9 -30
- package/src/typography/Paragraph/index.test.tsx +36 -0
- package/src/typography/Typography/index.mdx +12 -0
- package/src/typography/Typography/index.tsx +4 -0
- package/src/typography/index.ts +1 -0
- package/src/utils/Base/index.mdx +13 -0
- package/src/utils/TestVariant/index.tsx +25 -0
- package/src/utils/VisuallyHidden/index.mdx +10 -5
- package/src/utils/VisuallyHidden/index.test.tsx +20 -0
- package/typography/Heading/index.mdx +3 -5
- package/typography/Heading/index.test/index.js +43 -0
- package/typography/Heading/index.test/package.json +6 -0
- package/typography/Heading/index.test.d.ts +1 -0
- package/typography/HeadingCaption/index.mdx +3 -5
- package/typography/HeadingCaption/index.test/index.js +46 -0
- package/typography/HeadingCaption/index.test/package.json +6 -0
- package/typography/HeadingCaption/index.test.d.ts +1 -0
- package/typography/Hint/index.mdx +3 -5
- package/typography/Hint/index.test/index.js +46 -0
- package/typography/Hint/index.test/package.json +6 -0
- package/typography/Hint/index.test.d.ts +1 -0
- package/typography/NormalText/index.mdx +3 -5
- package/typography/NormalText/index.test/index.js +52 -0
- package/typography/NormalText/index.test/package.json +6 -0
- package/typography/NormalText/index.test.d.ts +1 -0
- package/typography/Paragraph/index.mdx +9 -30
- package/typography/Paragraph/index.test/index.js +55 -0
- package/typography/Paragraph/index.test/package.json +6 -0
- package/typography/Paragraph/index.test.d.ts +1 -0
- package/typography/Typography/index.d.ts +3 -0
- package/typography/Typography/index.js +3 -0
- package/typography/Typography/index.mdx +12 -0
- package/typography/Typography/package.json +6 -0
- package/typography/index.d.ts +1 -0
- package/typography/index.js +2 -1
- package/utils/Base/index.mdx +13 -0
- package/utils/TestVariant/index.d.ts +7 -0
- package/utils/TestVariant/index.js +18 -0
- package/utils/TestVariant/package.json +6 -0
- package/utils/VisuallyHidden/index.mdx +10 -5
- package/utils/VisuallyHidden/index.test/index.js +43 -0
- package/utils/VisuallyHidden/index.test/package.json +6 -0
- package/utils/VisuallyHidden/index.test.d.ts +1 -0
- package/cjs/content/List/List.stories.playwright.json +0 -27
- package/cjs/layouts/Basic/Masthead/index.mdx +0 -65
- package/cjs/misc/KitchenSink/index.js +0 -93
- package/cjs/utils/Kitchensink/AllComponents/index.js +0 -16
- package/cjs/utils/Kitchensink/KitchensinkByCategory/index.js +0 -39
- package/cjs/utils/Kitchensink/KitchensinkByLetter/index.js +0 -26
- package/cjs/utils/Kitchensink/KitchensinkComponent/index.js +0 -55
- package/cjs/utils/Kitchensink/KitchensinkDashboard/index.js +0 -47
- package/content/List/List.stories.playwright.json +0 -27
- package/form/AutoComplete/__stories__/WithInLine.d.ts +0 -3
- package/layouts/Basic/Masthead/index.mdx +0 -65
- package/misc/KitchenSink/index.d.ts +0 -8
- package/misc/KitchenSink/index.js +0 -8
- package/src/content/List/List.stories.playwright.json +0 -27
- package/src/layouts/Basic/Masthead/index.mdx +0 -65
- package/src/misc/KitchenSink/index.tsx +0 -8
- package/src/utils/Kitchensink/AllComponents.tsx +0 -6
- package/src/utils/Kitchensink/KitchensinkByCategory.tsx +0 -56
- package/src/utils/Kitchensink/KitchensinkByLetter.tsx +0 -35
- package/src/utils/Kitchensink/KitchensinkComponent.tsx +0 -70
- package/src/utils/Kitchensink/KitchensinkDashboard.tsx +0 -56
- package/utils/Kitchensink/AllComponents/index.js +0 -9
- package/utils/Kitchensink/AllComponents.d.ts +0 -2
- package/utils/Kitchensink/KitchensinkByCategory/index.js +0 -32
- package/utils/Kitchensink/KitchensinkByCategory.d.ts +0 -6
- package/utils/Kitchensink/KitchensinkByLetter/index.js +0 -19
- package/utils/Kitchensink/KitchensinkByLetter.d.ts +0 -6
- package/utils/Kitchensink/KitchensinkComponent/index.js +0 -45
- package/utils/Kitchensink/KitchensinkComponent.d.ts +0 -10
- package/utils/Kitchensink/KitchensinkDashboard/index.js +0 -40
- package/utils/Kitchensink/KitchensinkDashboard.d.ts +0 -5
|
@@ -12,6 +12,12 @@ Object.defineProperty(exports, "AutoCompleteAssistiveHint", {
|
|
|
12
12
|
return _AutoCompleteAssistiveHint["default"];
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
+
Object.defineProperty(exports, "AutoCompleteContainer", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function get() {
|
|
18
|
+
return _AutoCompleteContainer["default"];
|
|
19
|
+
}
|
|
20
|
+
});
|
|
15
21
|
Object.defineProperty(exports, "AutoCompleteInput", {
|
|
16
22
|
enumerable: true,
|
|
17
23
|
get: function get() {
|
|
@@ -24,22 +30,28 @@ Object.defineProperty(exports, "AutoCompleteInputTypeahead", {
|
|
|
24
30
|
return _AutoCompleteInputTypeahead["default"];
|
|
25
31
|
}
|
|
26
32
|
});
|
|
27
|
-
Object.defineProperty(exports, "
|
|
33
|
+
Object.defineProperty(exports, "AutoCompleteMultipleInput", {
|
|
28
34
|
enumerable: true,
|
|
29
35
|
get: function get() {
|
|
30
|
-
return
|
|
36
|
+
return _AutoCompleteMultipleInput["default"];
|
|
31
37
|
}
|
|
32
38
|
});
|
|
33
|
-
Object.defineProperty(exports, "
|
|
39
|
+
Object.defineProperty(exports, "AutoCompleteMultipleInputContainer", {
|
|
34
40
|
enumerable: true,
|
|
35
41
|
get: function get() {
|
|
36
|
-
return
|
|
42
|
+
return _AutoCompleteMultipleInputContainer["default"];
|
|
37
43
|
}
|
|
38
44
|
});
|
|
39
|
-
Object.defineProperty(exports, "
|
|
45
|
+
Object.defineProperty(exports, "AutoCompleteResultList", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function get() {
|
|
48
|
+
return _AutoCompleteResultList["default"];
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, "AutoCompleteResultListItem", {
|
|
40
52
|
enumerable: true,
|
|
41
53
|
get: function get() {
|
|
42
|
-
return
|
|
54
|
+
return _AutoCompleteResultListItem["default"];
|
|
43
55
|
}
|
|
44
56
|
});
|
|
45
57
|
exports["default"] = void 0;
|
|
@@ -56,14 +68,28 @@ var _AutoCompleteInput = _interopRequireDefault(require("@digigov/react-core/cjs
|
|
|
56
68
|
var _AutoCompleteInputTypeahead = _interopRequireDefault(require("@digigov/react-core/cjs/AutoCompleteInputTypeahead"));
|
|
57
69
|
var _AutoCompleteResultList = _interopRequireDefault(require("@digigov/react-core/cjs/AutoCompleteResultList"));
|
|
58
70
|
var _AutoCompleteResultListItem = _interopRequireDefault(require("@digigov/react-core/cjs/AutoCompleteResultListItem"));
|
|
59
|
-
var
|
|
71
|
+
var _AutoCompleteContainer = _interopRequireDefault(require("@digigov/react-core/cjs/AutoCompleteContainer"));
|
|
72
|
+
var _AutoCompleteMultipleInputContainer = _interopRequireDefault(require("@digigov/react-core/cjs/AutoCompleteMultipleInputContainer"));
|
|
73
|
+
var _AutoCompleteMultipleInput = _interopRequireDefault(require("@digigov/react-core/cjs/AutoCompleteMultipleInput"));
|
|
60
74
|
var _CaretIcon = require("@digigov/react-icons/cjs/CaretIcon");
|
|
61
75
|
var _Status = _interopRequireDefault(require("@digigov/ui/form/AutoComplete/Status"));
|
|
62
76
|
var _utils = require("@digigov/ui/form/AutoComplete/utils");
|
|
77
|
+
var _Checkbox = _interopRequireWildcard(require("../Checkbox"));
|
|
78
|
+
var _Chip = require("@digigov/ui/content/Chip");
|
|
79
|
+
var _Button = _interopRequireDefault(require("@digigov/ui/form/Button"));
|
|
80
|
+
var _NormalText = require("@digigov/ui/typography/NormalText");
|
|
63
81
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
64
82
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
65
83
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
66
84
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
85
|
+
var _ref2 = /*#__PURE__*/_react["default"].createElement(_CaretIcon.CaretIcon, {
|
|
86
|
+
direction: "down",
|
|
87
|
+
size: "md"
|
|
88
|
+
});
|
|
89
|
+
var _ref3 = /*#__PURE__*/_react["default"].createElement(_CaretIcon.CaretIcon, {
|
|
90
|
+
direction: "down",
|
|
91
|
+
size: "md"
|
|
92
|
+
});
|
|
67
93
|
var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
68
94
|
(0, _inherits2["default"])(AutoComplete, _Component);
|
|
69
95
|
function AutoComplete(props) {
|
|
@@ -71,33 +97,41 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
71
97
|
(0, _classCallCheck2["default"])(this, AutoComplete);
|
|
72
98
|
_this = _callSuper(this, AutoComplete, [props]);
|
|
73
99
|
_this.elementReferences = {};
|
|
74
|
-
|
|
75
|
-
|
|
100
|
+
var customState = {};
|
|
101
|
+
if (Array.isArray(props.defaultValue)) {
|
|
102
|
+
customState.selectedValues = props.defaultValue;
|
|
103
|
+
} else if (props.defaultValue) {
|
|
104
|
+
customState.selectedValues = [props.defaultValue];
|
|
105
|
+
}
|
|
106
|
+
_this.state = (0, _extends2["default"])({
|
|
76
107
|
focused: null,
|
|
77
108
|
hovered: null,
|
|
78
109
|
menuOpen: false,
|
|
79
|
-
options:
|
|
80
|
-
query: props.defaultValue,
|
|
110
|
+
options: [],
|
|
111
|
+
query: _this.props.multiple ? '' : props.defaultValue || '',
|
|
112
|
+
selectedValues: [],
|
|
81
113
|
validChoiceMade: false,
|
|
82
114
|
selected: null,
|
|
83
115
|
ariaHint: true
|
|
84
|
-
};
|
|
116
|
+
}, customState);
|
|
85
117
|
_this.handleComponentBlur = _this.handleComponentBlur.bind((0, _assertThisInitialized2["default"])(_this));
|
|
118
|
+
_this.handleAutoCompleteBlur = _this.handleAutoCompleteBlur.bind((0, _assertThisInitialized2["default"])(_this));
|
|
86
119
|
_this.handleKeyDown = _this.handleKeyDown.bind((0, _assertThisInitialized2["default"])(_this));
|
|
87
120
|
_this.handleUpArrow = _this.handleUpArrow.bind((0, _assertThisInitialized2["default"])(_this));
|
|
88
121
|
_this.handleDownArrow = _this.handleDownArrow.bind((0, _assertThisInitialized2["default"])(_this));
|
|
89
122
|
_this.handleEnter = _this.handleEnter.bind((0, _assertThisInitialized2["default"])(_this));
|
|
90
123
|
_this.handlePrintableKey = _this.handlePrintableKey.bind((0, _assertThisInitialized2["default"])(_this));
|
|
91
124
|
_this.handleListMouseLeave = _this.handleListMouseLeave.bind((0, _assertThisInitialized2["default"])(_this));
|
|
92
|
-
|
|
93
|
-
|
|
125
|
+
if (_this.props.multiple) {
|
|
126
|
+
_this.handleOptionClick = _this.handleOptionClickMultiple.bind((0, _assertThisInitialized2["default"])(_this));
|
|
127
|
+
} else {
|
|
128
|
+
_this.handleOptionClick = _this.handleOptionClick.bind((0, _assertThisInitialized2["default"])(_this));
|
|
129
|
+
}
|
|
94
130
|
_this.handleOptionFocus = _this.handleOptionFocus.bind((0, _assertThisInitialized2["default"])(_this));
|
|
95
131
|
_this.handleOptionMouseDown = _this.handleOptionMouseDown.bind((0, _assertThisInitialized2["default"])(_this));
|
|
96
132
|
_this.handleOptionMouseEnter = _this.handleOptionMouseEnter.bind((0, _assertThisInitialized2["default"])(_this));
|
|
97
|
-
_this.handleInputBlur = _this.handleInputBlur.bind((0, _assertThisInitialized2["default"])(_this));
|
|
98
133
|
_this.handleInputChange = _this.handleInputChange.bind((0, _assertThisInitialized2["default"])(_this));
|
|
99
134
|
_this.handleInputFocus = _this.handleInputFocus.bind((0, _assertThisInitialized2["default"])(_this));
|
|
100
|
-
_this.pollInputElement = _this.pollInputElement.bind((0, _assertThisInitialized2["default"])(_this));
|
|
101
135
|
_this.getDirectInputChanges = _this.getDirectInputChanges.bind((0, _assertThisInitialized2["default"])(_this));
|
|
102
136
|
return _this;
|
|
103
137
|
}
|
|
@@ -112,32 +146,14 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
112
146
|
}, {
|
|
113
147
|
key: "componentDidMount",
|
|
114
148
|
value: function componentDidMount() {
|
|
115
|
-
this.pollInputElement();
|
|
116
|
-
}
|
|
117
|
-
}, {
|
|
118
|
-
key: "componentWillUnmount",
|
|
119
|
-
value: function componentWillUnmount() {
|
|
120
|
-
clearTimeout(this.$pollInput);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// Applications like Dragon NaturallySpeaking will modify the
|
|
124
|
-
// `input` field by directly changing its `.value`. These events
|
|
125
|
-
// don't trigger our JavaScript event listeners, so we need to poll
|
|
126
|
-
// to handle when and if they occur.
|
|
127
|
-
}, {
|
|
128
|
-
key: "pollInputElement",
|
|
129
|
-
value: function pollInputElement() {
|
|
130
|
-
var _this3 = this;
|
|
131
149
|
this.getDirectInputChanges();
|
|
132
|
-
this.$pollInput = setTimeout(function () {
|
|
133
|
-
_this3.pollInputElement();
|
|
134
|
-
}, 100);
|
|
135
150
|
}
|
|
136
151
|
}, {
|
|
137
152
|
key: "getDirectInputChanges",
|
|
138
153
|
value: function getDirectInputChanges() {
|
|
154
|
+
var _this$state$query;
|
|
139
155
|
var inputReference = this.elementReferences[-1];
|
|
140
|
-
var queryHasChanged = inputReference && inputReference.value !== this.state.query;
|
|
156
|
+
var queryHasChanged = inputReference && inputReference.value !== ((_this$state$query = this.state.query) !== null && _this$state$query !== void 0 ? _this$state$query : '');
|
|
141
157
|
if (queryHasChanged) {
|
|
142
158
|
this.handleInputChange({
|
|
143
159
|
target: {
|
|
@@ -183,7 +199,7 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
183
199
|
key: "templateSuggestion",
|
|
184
200
|
value: function templateSuggestion(value) {
|
|
185
201
|
var suggestionTemplate = this.props.templates && this.props.templates.suggestion;
|
|
186
|
-
return suggestionTemplate ? suggestionTemplate(value) : value;
|
|
202
|
+
return suggestionTemplate ? suggestionTemplate(value, this.state.query) : value;
|
|
187
203
|
}
|
|
188
204
|
}, {
|
|
189
205
|
key: "handleComponentBlur",
|
|
@@ -195,14 +211,14 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
195
211
|
var newQuery;
|
|
196
212
|
if (this.props.confirmOnBlur) {
|
|
197
213
|
var _this$props$onConfirm, _this$props;
|
|
198
|
-
newQuery = newState.query || query;
|
|
214
|
+
newQuery = (newState === null || newState === void 0 ? void 0 : newState.query) || query;
|
|
199
215
|
(_this$props$onConfirm = (_this$props = this.props).onConfirm) === null || _this$props$onConfirm === void 0 ? void 0 : _this$props$onConfirm.call(_this$props, options[selected]);
|
|
200
216
|
} else {
|
|
201
217
|
newQuery = query;
|
|
202
218
|
}
|
|
203
219
|
this.setState({
|
|
204
220
|
focused: null,
|
|
205
|
-
menuOpen: newState.menuOpen || false,
|
|
221
|
+
menuOpen: (newState === null || newState === void 0 ? void 0 : newState.menuOpen) || false,
|
|
206
222
|
query: newQuery,
|
|
207
223
|
selected: null,
|
|
208
224
|
validChoiceMade: this.isQueryAnOption(newQuery, options)
|
|
@@ -216,40 +232,33 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
216
232
|
});
|
|
217
233
|
}
|
|
218
234
|
}, {
|
|
219
|
-
key: "
|
|
220
|
-
value: function
|
|
235
|
+
key: "handleAutoCompleteBlur",
|
|
236
|
+
value: function handleAutoCompleteBlur(event, index) {
|
|
221
237
|
var _this$state2 = this.state,
|
|
222
238
|
focused = _this$state2.focused,
|
|
223
|
-
menuOpen = _this$state2.menuOpen,
|
|
224
239
|
options = _this$state2.options,
|
|
240
|
+
query = _this$state2.query,
|
|
225
241
|
selected = _this$state2.selected;
|
|
226
|
-
var focusingOutsideComponent =
|
|
242
|
+
var focusingOutsideComponent = false;
|
|
243
|
+
if (event.relatedTarget === null) {
|
|
244
|
+
focusingOutsideComponent = true;
|
|
245
|
+
} else {
|
|
246
|
+
// This affects if we have multiple autocompletes in same page and we click the first button-arrow and then another button-arrow
|
|
247
|
+
focusingOutsideComponent = this.elementReferences['button-arrow'] !== event.relatedTarget;
|
|
248
|
+
}
|
|
227
249
|
var focusingInput = event.relatedTarget === this.elementReferences[-1];
|
|
228
|
-
var
|
|
229
|
-
var
|
|
230
|
-
if (
|
|
231
|
-
|
|
232
|
-
this.handleComponentBlur({
|
|
233
|
-
menuOpen: keepMenuOpen,
|
|
234
|
-
query: this.templateInputValue(options[selected])
|
|
235
|
-
});
|
|
250
|
+
var focusingButtonArrow = this.elementReferences['button-arrow'] === event.relatedTarget || false;
|
|
251
|
+
var focusingAnotherOption = focused !== null && focused !== -1;
|
|
252
|
+
if (index !== undefined) {
|
|
253
|
+
focusingAnotherOption = focused !== index && focused !== -1;
|
|
236
254
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
var _this$state3 = this.state,
|
|
242
|
-
focused = _this$state3.focused,
|
|
243
|
-
menuOpen = _this$state3.menuOpen,
|
|
244
|
-
options = _this$state3.options,
|
|
245
|
-
query = _this$state3.query,
|
|
246
|
-
selected = _this$state3.selected;
|
|
247
|
-
var focusingAnOption = focused !== -1;
|
|
248
|
-
if (!focusingAnOption) {
|
|
249
|
-
var keepMenuOpen = menuOpen && (0, _utils.isIosDevice)();
|
|
255
|
+
// Check if the user clicks outside and not either on option, either on input or on button arrow
|
|
256
|
+
var blurComponent = focusingOutsideComponent && !(focusingAnotherOption || focusingInput || focusingButtonArrow);
|
|
257
|
+
if (blurComponent) {
|
|
258
|
+
// In handleInputBlur:
|
|
250
259
|
var newQuery = (0, _utils.isIosDevice)() ? query : this.templateInputValue(options[selected]);
|
|
251
260
|
this.handleComponentBlur({
|
|
252
|
-
menuOpen:
|
|
261
|
+
menuOpen: false,
|
|
253
262
|
query: newQuery
|
|
254
263
|
});
|
|
255
264
|
}
|
|
@@ -257,37 +266,27 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
257
266
|
}, {
|
|
258
267
|
key: "handleInputChange",
|
|
259
268
|
value: function handleInputChange(event) {
|
|
260
|
-
var
|
|
269
|
+
var _this3 = this;
|
|
261
270
|
var _this$props2 = this.props,
|
|
262
|
-
minLength = _this$props2.minLength,
|
|
263
271
|
source = _this$props2.source,
|
|
264
|
-
|
|
272
|
+
minLength = _this$props2.minLength;
|
|
265
273
|
var autoselect = this.hasAutoselect();
|
|
266
274
|
var query = event.target.value;
|
|
267
275
|
var queryEmpty = query.length === 0;
|
|
268
|
-
var queryChanged = this.state.query.length !== query.length;
|
|
269
|
-
var queryLongEnough = query.length >= minLength;
|
|
270
276
|
this.setState({
|
|
271
277
|
query: query,
|
|
272
278
|
ariaHint: queryEmpty
|
|
273
279
|
});
|
|
274
|
-
var
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
validChoiceMade: false
|
|
283
|
-
});
|
|
284
|
-
});
|
|
285
|
-
} else if (queryEmpty || !queryLongEnough) {
|
|
286
|
-
this.setState({
|
|
287
|
-
menuOpen: false,
|
|
288
|
-
options: []
|
|
280
|
+
var minLengthQuery = minLength != undefined && minLength > query.length ? '' : query;
|
|
281
|
+
source(minLengthQuery, function (options) {
|
|
282
|
+
var optionsAvailable = options.length > 0;
|
|
283
|
+
_this3.setState({
|
|
284
|
+
menuOpen: optionsAvailable,
|
|
285
|
+
options: options,
|
|
286
|
+
selected: autoselect && optionsAvailable ? 0 : -1,
|
|
287
|
+
validChoiceMade: false
|
|
289
288
|
});
|
|
290
|
-
}
|
|
289
|
+
});
|
|
291
290
|
}
|
|
292
291
|
}, {
|
|
293
292
|
key: "handleInputClick",
|
|
@@ -297,10 +296,12 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
297
296
|
}, {
|
|
298
297
|
key: "handleInputFocus",
|
|
299
298
|
value: function handleInputFocus() {
|
|
300
|
-
var
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
299
|
+
var _this4 = this;
|
|
300
|
+
var source = this.props.source;
|
|
301
|
+
var _this$state3 = this.state,
|
|
302
|
+
query = _this$state3.query,
|
|
303
|
+
validChoiceMade = _this$state3.validChoiceMade,
|
|
304
|
+
options = _this$state3.options;
|
|
304
305
|
var minLength = this.props.minLength;
|
|
305
306
|
var shouldReopenMenu = !validChoiceMade && query.length >= minLength && options.length > 0;
|
|
306
307
|
if (shouldReopenMenu) {
|
|
@@ -313,8 +314,11 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
313
314
|
};
|
|
314
315
|
});
|
|
315
316
|
} else {
|
|
316
|
-
|
|
317
|
-
|
|
317
|
+
source(query, function (options) {
|
|
318
|
+
_this4.setState({
|
|
319
|
+
focused: -1,
|
|
320
|
+
options: options
|
|
321
|
+
});
|
|
318
322
|
});
|
|
319
323
|
}
|
|
320
324
|
}
|
|
@@ -338,18 +342,43 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
338
342
|
});
|
|
339
343
|
}
|
|
340
344
|
}
|
|
345
|
+
}, {
|
|
346
|
+
key: "handleOptionClickMultiple",
|
|
347
|
+
value: function handleOptionClickMultiple(index) {
|
|
348
|
+
var _this$props$onConfirm2, _this$props3;
|
|
349
|
+
var selectedOption = this.state.options[index];
|
|
350
|
+
var selectedValues = this.state.selectedValues;
|
|
351
|
+
if (this.state.selectedValues.indexOf(selectedOption) === -1) {
|
|
352
|
+
selectedValues = selectedValues.concat([selectedOption]);
|
|
353
|
+
} else {
|
|
354
|
+
selectedValues.splice(this.state.selectedValues.indexOf(selectedOption), 1);
|
|
355
|
+
}
|
|
356
|
+
(_this$props$onConfirm2 = (_this$props3 = this.props).onConfirm) === null || _this$props$onConfirm2 === void 0 ? void 0 : _this$props$onConfirm2.call(_this$props3, selectedValues);
|
|
357
|
+
this.setState({
|
|
358
|
+
focused: index,
|
|
359
|
+
hovered: null,
|
|
360
|
+
menuOpen: true,
|
|
361
|
+
query: '',
|
|
362
|
+
selectedValues: selectedValues,
|
|
363
|
+
selected: index,
|
|
364
|
+
validChoiceMade: true
|
|
365
|
+
});
|
|
366
|
+
this.forceUpdate();
|
|
367
|
+
}
|
|
341
368
|
}, {
|
|
342
369
|
key: "handleOptionClick",
|
|
343
370
|
value: function handleOptionClick(index) {
|
|
344
|
-
var _this$props$
|
|
371
|
+
var _this$props$onConfirm3, _this$props4;
|
|
345
372
|
var selectedOption = this.state.options[index];
|
|
346
373
|
var newQuery = this.templateInputValue(selectedOption);
|
|
347
|
-
(_this$props$
|
|
374
|
+
(_this$props$onConfirm3 = (_this$props4 = this.props).onConfirm) === null || _this$props$onConfirm3 === void 0 ? void 0 : _this$props$onConfirm3.call(_this$props4, selectedOption);
|
|
375
|
+
var selectedValues = this.props.multiple ? this.state.selectedValues.concat(selectedOption) : [selectedOption];
|
|
348
376
|
this.setState({
|
|
349
377
|
focused: -1,
|
|
350
378
|
hovered: null,
|
|
351
379
|
menuOpen: false,
|
|
352
380
|
query: newQuery,
|
|
381
|
+
selectedValues: selectedValues,
|
|
353
382
|
selected: -1,
|
|
354
383
|
validChoiceMade: true
|
|
355
384
|
});
|
|
@@ -370,9 +399,9 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
370
399
|
key: "handleUpArrow",
|
|
371
400
|
value: function handleUpArrow(event) {
|
|
372
401
|
event.preventDefault();
|
|
373
|
-
var _this$
|
|
374
|
-
menuOpen = _this$
|
|
375
|
-
selected = _this$
|
|
402
|
+
var _this$state4 = this.state,
|
|
403
|
+
menuOpen = _this$state4.menuOpen,
|
|
404
|
+
selected = _this$state4.selected;
|
|
376
405
|
var isNotAtTop = selected !== -1;
|
|
377
406
|
var allowMoveUp = isNotAtTop && menuOpen;
|
|
378
407
|
if (allowMoveUp) {
|
|
@@ -385,7 +414,7 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
385
414
|
var _this5 = this;
|
|
386
415
|
event.preventDefault();
|
|
387
416
|
// if not open, open
|
|
388
|
-
if (this.
|
|
417
|
+
if (this.state.menuOpen === false) {
|
|
389
418
|
event.preventDefault();
|
|
390
419
|
this.props.source('', function (options) {
|
|
391
420
|
_this5.setState({
|
|
@@ -397,10 +426,10 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
397
426
|
});
|
|
398
427
|
});
|
|
399
428
|
} else if (this.state.menuOpen === true) {
|
|
400
|
-
var _this$
|
|
401
|
-
menuOpen = _this$
|
|
402
|
-
_options = _this$
|
|
403
|
-
selected = _this$
|
|
429
|
+
var _this$state5 = this.state,
|
|
430
|
+
menuOpen = _this$state5.menuOpen,
|
|
431
|
+
_options = _this$state5.options,
|
|
432
|
+
selected = _this$state5.selected;
|
|
404
433
|
var isNotAtBottom = selected !== _options.length - 1;
|
|
405
434
|
var allowMoveDown = isNotAtBottom && menuOpen;
|
|
406
435
|
if (allowMoveDown) {
|
|
@@ -413,7 +442,7 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
413
442
|
value: function handleSpace(event) {
|
|
414
443
|
var _this6 = this;
|
|
415
444
|
// if not open, open
|
|
416
|
-
if (this.
|
|
445
|
+
if (this.state.menuOpen === false && this.state.query === '') {
|
|
417
446
|
event.preventDefault();
|
|
418
447
|
this.props.source('', function (options) {
|
|
419
448
|
_this6.setState({
|
|
@@ -436,6 +465,12 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
436
465
|
var hasSelectedOption = this.state.selected >= 0;
|
|
437
466
|
if (hasSelectedOption) {
|
|
438
467
|
this.handleOptionClick(this.state.selected);
|
|
468
|
+
if (this.props.multiple) {
|
|
469
|
+
this.setState({
|
|
470
|
+
menuOpen: false,
|
|
471
|
+
focused: -1
|
|
472
|
+
});
|
|
473
|
+
}
|
|
439
474
|
}
|
|
440
475
|
}
|
|
441
476
|
}
|
|
@@ -454,6 +489,7 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
454
489
|
}, {
|
|
455
490
|
key: "handleKeyDown",
|
|
456
491
|
value: function handleKeyDown(event) {
|
|
492
|
+
var _this7 = this;
|
|
457
493
|
switch (_utils.keyCodes[event.keyCode]) {
|
|
458
494
|
case 'up':
|
|
459
495
|
this.handleUpArrow(event);
|
|
@@ -472,6 +508,24 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
472
508
|
query: this.state.query
|
|
473
509
|
});
|
|
474
510
|
break;
|
|
511
|
+
case 'backspace':
|
|
512
|
+
if (this.props.multiple) {
|
|
513
|
+
if (this.state.query.length === 0 && this.state.selectedValues.length > 0) {
|
|
514
|
+
event.preventDefault();
|
|
515
|
+
var updatedSelectedValues = this.state.selectedValues.slice(0, -1);
|
|
516
|
+
this.setState({
|
|
517
|
+
selectedValues: updatedSelectedValues
|
|
518
|
+
}, function () {
|
|
519
|
+
var _this7$props$onConfir, _this7$props;
|
|
520
|
+
(_this7$props$onConfir = (_this7$props = _this7.props).onConfirm) === null || _this7$props$onConfir === void 0 ? void 0 : _this7$props$onConfir.call(_this7$props, updatedSelectedValues);
|
|
521
|
+
});
|
|
522
|
+
break;
|
|
523
|
+
}
|
|
524
|
+
} else {
|
|
525
|
+
var _this$props$onConfirm4, _this$props5;
|
|
526
|
+
(_this$props$onConfirm4 = (_this$props5 = this.props).onConfirm) === null || _this$props$onConfirm4 === void 0 ? void 0 : _this$props$onConfirm4.call(_this$props5, '');
|
|
527
|
+
break;
|
|
528
|
+
}
|
|
475
529
|
default:
|
|
476
530
|
if ((0, _utils.isPrintableKeyCode)(event.keyCode)) {
|
|
477
531
|
this.handlePrintableKey(event);
|
|
@@ -482,40 +536,39 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
482
536
|
}, {
|
|
483
537
|
key: "render",
|
|
484
538
|
value: function render() {
|
|
485
|
-
var
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
minLength = _this$
|
|
491
|
-
name = _this$
|
|
492
|
-
placeholder = _this$
|
|
493
|
-
required = _this$
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
var _this$
|
|
503
|
-
focused = _this$
|
|
504
|
-
hovered = _this$
|
|
505
|
-
menuOpen = _this$
|
|
506
|
-
options = _this$
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
validChoiceMade = _this$state7.validChoiceMade;
|
|
539
|
+
var _this$state$query2,
|
|
540
|
+
_this8 = this;
|
|
541
|
+
var _this$props6 = this.props,
|
|
542
|
+
id = _this$props6.id,
|
|
543
|
+
width = _this$props6.width,
|
|
544
|
+
minLength = _this$props6.minLength,
|
|
545
|
+
name = _this$props6.name,
|
|
546
|
+
placeholder = _this$props6.placeholder,
|
|
547
|
+
required = _this$props6.required,
|
|
548
|
+
tNoResults = _this$props6.tNoResults,
|
|
549
|
+
tStatusQueryTooShort = _this$props6.tStatusQueryTooShort,
|
|
550
|
+
tStatusNoResults = _this$props6.tStatusNoResults,
|
|
551
|
+
tStatusSelectedOption = _this$props6.tStatusSelectedOption,
|
|
552
|
+
tStatusResults = _this$props6.tStatusResults,
|
|
553
|
+
tAssistiveHint = _this$props6.tAssistiveHint,
|
|
554
|
+
multiple = _this$props6.multiple,
|
|
555
|
+
source = _this$props6.source;
|
|
556
|
+
var _this$state6 = this.state,
|
|
557
|
+
focused = _this$state6.focused,
|
|
558
|
+
hovered = _this$state6.hovered,
|
|
559
|
+
menuOpen = _this$state6.menuOpen,
|
|
560
|
+
options = _this$state6.options,
|
|
561
|
+
selected = _this$state6.selected,
|
|
562
|
+
ariaHint = _this$state6.ariaHint,
|
|
563
|
+
validChoiceMade = _this$state6.validChoiceMade;
|
|
511
564
|
var autoselect = this.hasAutoselect();
|
|
565
|
+
var query = (_this$state$query2 = this.state.query) !== null && _this$state$query2 !== void 0 ? _this$state$query2 : '';
|
|
512
566
|
var inputFocused = focused === -1;
|
|
513
567
|
var noOptionsAvailable = options.length === 0;
|
|
514
568
|
var queryNotEmpty = query.length !== 0;
|
|
515
569
|
var queryLongEnough = query.length >= minLength;
|
|
516
|
-
var showNoOptionsFound =
|
|
570
|
+
var showNoOptionsFound = inputFocused && noOptionsAvailable && queryNotEmpty && queryLongEnough;
|
|
517
571
|
var componentIsFocused = focused !== null;
|
|
518
|
-
var dropdownArrowClassName = "ds-autocomplete__dropdown-arrow-down";
|
|
519
572
|
var optionFocused = focused !== -1 && focused !== null;
|
|
520
573
|
var menuIsVisible = menuOpen || showNoOptionsFound;
|
|
521
574
|
var selectedOptionText = this.templateInputValue(options[selected]);
|
|
@@ -525,7 +578,57 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
525
578
|
var ariaDescribedProp = ariaHint ? {
|
|
526
579
|
'aria-describedby': assistiveHintID
|
|
527
580
|
} : null;
|
|
528
|
-
|
|
581
|
+
var showAutoCompleteResultListItems = function showAutoCompleteResultListItems(options, multiple) {
|
|
582
|
+
{
|
|
583
|
+
return options.map(function (option, index) {
|
|
584
|
+
var showFocused = focused === -1 ? selected === index : focused === index;
|
|
585
|
+
var iosPosinsetHtml = (0, _utils.isIosDevice)() ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
586
|
+
id: "".concat(id, "__option-suffix--").concat(index),
|
|
587
|
+
style: {
|
|
588
|
+
border: '0',
|
|
589
|
+
clip: 'rect(0 0 0 0)',
|
|
590
|
+
height: '1px',
|
|
591
|
+
marginBottom: '-1px',
|
|
592
|
+
marginRight: '-1px',
|
|
593
|
+
overflow: 'hidden',
|
|
594
|
+
padding: '0',
|
|
595
|
+
position: 'absolute',
|
|
596
|
+
whiteSpace: 'nowrap',
|
|
597
|
+
width: '1px'
|
|
598
|
+
}
|
|
599
|
+
}, index + 1, " \u03B1\u03C0\u03CC ", options.length) : '';
|
|
600
|
+
return /*#__PURE__*/_react["default"].createElement(_AutoCompleteResultListItem["default"], {
|
|
601
|
+
isFocused: showFocused,
|
|
602
|
+
isHovered: hovered,
|
|
603
|
+
index: index,
|
|
604
|
+
"aria-selected": focused === index ? 'true' : 'false',
|
|
605
|
+
key: index,
|
|
606
|
+
onBlur: function onBlur(event) {
|
|
607
|
+
return _this8.handleAutoCompleteBlur(event, index);
|
|
608
|
+
},
|
|
609
|
+
onClick: function onClick() {
|
|
610
|
+
return _this8.handleOptionClick(index);
|
|
611
|
+
},
|
|
612
|
+
onMouseDown: _this8.handleOptionMouseDown,
|
|
613
|
+
onMouseEnter: function onMouseEnter() {
|
|
614
|
+
return _this8.handleOptionMouseEnter(index);
|
|
615
|
+
},
|
|
616
|
+
ref: function ref(optionEl) {
|
|
617
|
+
_this8.elementReferences[index] = optionEl;
|
|
618
|
+
},
|
|
619
|
+
role: "option",
|
|
620
|
+
tabIndex: -1,
|
|
621
|
+
"aria-posinset": index + 1,
|
|
622
|
+
"aria-setsize": options.length
|
|
623
|
+
}, multiple ? /*#__PURE__*/_react["default"].createElement(_Checkbox.CheckboxItem, {
|
|
624
|
+
value: option,
|
|
625
|
+
checked: _this8.state.selectedValues.includes(option),
|
|
626
|
+
onChange: function onChange() {}
|
|
627
|
+
}, _this8.templateSuggestion(option)) : _this8.templateSuggestion(option), iosPosinsetHtml);
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
return /*#__PURE__*/_react["default"].createElement(_AutoCompleteContainer["default"], {
|
|
529
632
|
onKeyDown: this.handleKeyDown,
|
|
530
633
|
width: width
|
|
531
634
|
}, /*#__PURE__*/_react["default"].createElement(_Status["default"], {
|
|
@@ -541,106 +644,139 @@ var AutoComplete = exports.AutoComplete = exports["default"] = /*#__PURE__*/func
|
|
|
541
644
|
tNoResults: tStatusNoResults,
|
|
542
645
|
tSelectedOption: tStatusSelectedOption,
|
|
543
646
|
tResults: tStatusResults
|
|
544
|
-
}), hintValue && /*#__PURE__*/_react["default"].createElement(_AutoCompleteInputTypeahead["default"], {
|
|
647
|
+
}), hintValue && (placeholder === '' || !placeholder) && /*#__PURE__*/_react["default"].createElement(_AutoCompleteInputTypeahead["default"], {
|
|
545
648
|
value: hintValue
|
|
546
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
649
|
+
}), multiple ? /*#__PURE__*/_react["default"].createElement(_AutoCompleteMultipleInputContainer["default"], {
|
|
650
|
+
isFocused: componentIsFocused,
|
|
651
|
+
numberOfSelected: this.props.numberOfSelected
|
|
652
|
+
}, /*#__PURE__*/_react["default"].createElement(_Chip.ChipContainer, null, this.state.selectedValues.map(function (value, index) {
|
|
653
|
+
return /*#__PURE__*/_react["default"].createElement(_Chip.Chip, {
|
|
654
|
+
key: index,
|
|
655
|
+
onDelete: function onDelete() {
|
|
656
|
+
_this8.setState(function (prevState) {
|
|
657
|
+
return {
|
|
658
|
+
selectedValues: prevState.selectedValues.filter(function (v) {
|
|
659
|
+
if (typeof v === "string") {
|
|
660
|
+
return v !== value;
|
|
661
|
+
} else {
|
|
662
|
+
return v.value !== value.value;
|
|
663
|
+
}
|
|
664
|
+
})
|
|
665
|
+
};
|
|
666
|
+
}, function () {
|
|
667
|
+
var _this8$props$onConfir, _this8$props;
|
|
668
|
+
(_this8$props$onConfir = (_this8$props = _this8.props).onConfirm) === null || _this8$props$onConfir === void 0 ? void 0 : _this8$props$onConfir.call(_this8$props, _this8.state.selectedValues);
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
}, typeof value === "string" ? value : value.label.primary);
|
|
672
|
+
}), !componentIsFocused && typeof this.props.numberOfSelected === 'number' && this.state.selectedValues.length > this.props.numberOfSelected && /*#__PURE__*/_react["default"].createElement(_NormalText.NormalText, {
|
|
673
|
+
fontWeight: "bold",
|
|
674
|
+
margin: 0
|
|
675
|
+
}, "+", this.state.selectedValues.length - this.props.numberOfSelected)), /*#__PURE__*/_react["default"].createElement(_AutoCompleteMultipleInput["default"], (0, _extends2["default"])({
|
|
547
676
|
"aria-expanded": menuOpen ? 'true' : 'false',
|
|
548
677
|
"aria-activedescendant": optionFocused ? "".concat(id, "__option--").concat(focused) : '',
|
|
549
678
|
"aria-owns": "".concat(id, "__listbox"),
|
|
550
679
|
"aria-autocomplete": this.hasAutoselect() ? 'both' : 'list'
|
|
551
680
|
}, ariaDescribedProp, {
|
|
552
|
-
autoComplete: "off"
|
|
553
|
-
isFocused
|
|
554
|
-
|
|
681
|
+
autoComplete: "off"
|
|
682
|
+
// isFocused={componentIsFocused}
|
|
683
|
+
,
|
|
555
684
|
id: id,
|
|
556
685
|
onClick: function onClick(event) {
|
|
557
|
-
return
|
|
686
|
+
return _this8.handleInputClick(event);
|
|
687
|
+
},
|
|
688
|
+
onBlur: function onBlur(event) {
|
|
689
|
+
return _this8.handleAutoCompleteBlur(event);
|
|
558
690
|
},
|
|
559
|
-
onBlur: this.handleInputBlur,
|
|
560
691
|
onChange: this.handleInputChange,
|
|
561
692
|
onFocus: this.handleInputFocus,
|
|
562
693
|
name: name,
|
|
563
694
|
placeholder: placeholder,
|
|
564
695
|
ref: function ref(inputElement) {
|
|
565
|
-
|
|
696
|
+
_this8.elementReferences[-1] = inputElement;
|
|
566
697
|
},
|
|
567
698
|
role: "combobox",
|
|
568
699
|
required: required,
|
|
569
700
|
value: query
|
|
570
|
-
})),
|
|
571
|
-
|
|
701
|
+
})), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
702
|
+
ref: function ref(buttonElement) {
|
|
703
|
+
_this8.elementReferences['button-arrow'] = buttonElement;
|
|
704
|
+
},
|
|
705
|
+
variant: "link",
|
|
572
706
|
onClick: function onClick() {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
707
|
+
if (!_this8.state.menuOpen) {
|
|
708
|
+
source(query, function (options) {
|
|
709
|
+
var optionsAvailable = options.length > 0;
|
|
710
|
+
_this8.setState({
|
|
711
|
+
menuOpen: optionsAvailable,
|
|
712
|
+
options: options,
|
|
713
|
+
selected: autoselect && optionsAvailable ? 0 : -1,
|
|
714
|
+
validChoiceMade: false
|
|
715
|
+
});
|
|
716
|
+
});
|
|
717
|
+
} else {
|
|
718
|
+
_this8.setState({
|
|
719
|
+
menuOpen: false,
|
|
720
|
+
focused: null
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
onBlur: function onBlur(event) {
|
|
725
|
+
return _this8.handleAutoCompleteBlur(event);
|
|
726
|
+
}
|
|
727
|
+
}, _ref2), /*#__PURE__*/_react["default"].createElement(_AutoCompleteResultList["default"], {
|
|
728
|
+
isVisible: menuIsVisible,
|
|
729
|
+
onMouseLeave: function onMouseLeave() {
|
|
730
|
+
return _this8.handleListMouseLeave();
|
|
731
|
+
},
|
|
732
|
+
id: "".concat(id, "__listbox"),
|
|
733
|
+
role: "listbox"
|
|
734
|
+
}, /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], null, showAutoCompleteResultListItems(options, multiple)), showNoOptionsFound && /*#__PURE__*/_react["default"].createElement(_AutoCompleteResultListItem["default"], {
|
|
735
|
+
empty: true
|
|
736
|
+
}, tNoResults === null || tNoResults === void 0 ? void 0 : tNoResults())), /*#__PURE__*/_react["default"].createElement(_AutoCompleteAssistiveHint["default"], {
|
|
737
|
+
id: assistiveHintID
|
|
738
|
+
}, tAssistiveHint === null || tAssistiveHint === void 0 ? void 0 : tAssistiveHint())) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_AutoCompleteInput["default"], (0, _extends2["default"])({
|
|
739
|
+
"aria-expanded": menuOpen ? 'true' : 'false',
|
|
740
|
+
"aria-activedescendant": optionFocused ? "".concat(id, "__option--").concat(focused) : '',
|
|
741
|
+
"aria-owns": "".concat(id, "__listbox"),
|
|
742
|
+
"aria-autocomplete": this.hasAutoselect() ? 'both' : 'list'
|
|
743
|
+
}, ariaDescribedProp, {
|
|
744
|
+
autoComplete: "off",
|
|
745
|
+
isFocused: componentIsFocused,
|
|
746
|
+
id: id,
|
|
747
|
+
onClick: function onClick(event) {
|
|
748
|
+
return _this8.handleInputClick(event);
|
|
579
749
|
},
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
750
|
+
onBlur: this.handleAutoCompleteBlur,
|
|
751
|
+
onChange: this.handleInputChange,
|
|
752
|
+
onFocus: this.handleInputFocus,
|
|
753
|
+
name: name,
|
|
754
|
+
placeholder: placeholder,
|
|
755
|
+
ref: function ref(inputElement) {
|
|
756
|
+
_this8.elementReferences[-1] = inputElement;
|
|
757
|
+
},
|
|
758
|
+
role: "combobox",
|
|
759
|
+
required: required,
|
|
760
|
+
value: query
|
|
761
|
+
})), _ref3, /*#__PURE__*/_react["default"].createElement(_AutoCompleteResultList["default"], {
|
|
583
762
|
isVisible: menuIsVisible,
|
|
584
763
|
onMouseLeave: function onMouseLeave() {
|
|
585
|
-
return
|
|
764
|
+
return _this8.handleListMouseLeave();
|
|
586
765
|
},
|
|
587
766
|
id: "".concat(id, "__listbox"),
|
|
588
767
|
role: "listbox"
|
|
589
|
-
}, options.
|
|
590
|
-
var showFocused = focused === -1 ? selected === index : focused === index;
|
|
591
|
-
var iosPosinsetHtml = (0, _utils.isIosDevice)() ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
592
|
-
id: "".concat(id, "__option-suffix--").concat(index),
|
|
593
|
-
style: {
|
|
594
|
-
border: '0',
|
|
595
|
-
clip: 'rect(0 0 0 0)',
|
|
596
|
-
height: '1px',
|
|
597
|
-
marginBottom: '-1px',
|
|
598
|
-
marginRight: '-1px',
|
|
599
|
-
overflow: 'hidden',
|
|
600
|
-
padding: '0',
|
|
601
|
-
position: 'absolute',
|
|
602
|
-
whiteSpace: 'nowrap',
|
|
603
|
-
width: '1px'
|
|
604
|
-
}
|
|
605
|
-
}, index + 1, " \u03B1\u03C0\u03CC ", options.length) : '';
|
|
606
|
-
return /*#__PURE__*/_react["default"].createElement(_AutoCompleteResultListItem["default"], {
|
|
607
|
-
isFocused: showFocused,
|
|
608
|
-
isHovered: hovered,
|
|
609
|
-
index: index,
|
|
610
|
-
"aria-selected": focused === index ? 'true' : 'false',
|
|
611
|
-
key: index,
|
|
612
|
-
onBlur: function onBlur(event) {
|
|
613
|
-
return _this7.handleOptionBlur(event, index);
|
|
614
|
-
},
|
|
615
|
-
onClick: function onClick() {
|
|
616
|
-
return _this7.handleOptionClick(index);
|
|
617
|
-
},
|
|
618
|
-
onMouseDown: _this7.handleOptionMouseDown,
|
|
619
|
-
onMouseEnter: function onMouseEnter() {
|
|
620
|
-
return _this7.handleOptionMouseEnter(index);
|
|
621
|
-
},
|
|
622
|
-
ref: function ref(optionEl) {
|
|
623
|
-
_this7.elementReferences[index] = optionEl;
|
|
624
|
-
},
|
|
625
|
-
role: "option",
|
|
626
|
-
tabIndex: -1,
|
|
627
|
-
"aria-posinset": index + 1,
|
|
628
|
-
"aria-setsize": options.length
|
|
629
|
-
}, _this7.templateSuggestion(option), " ", iosPosinsetHtml);
|
|
630
|
-
}), showNoOptionsFound && /*#__PURE__*/_react["default"].createElement(_AutoCompleteResultListItem["default"], {
|
|
768
|
+
}, showAutoCompleteResultListItems(options, false), showNoOptionsFound && /*#__PURE__*/_react["default"].createElement(_AutoCompleteResultListItem["default"], {
|
|
631
769
|
empty: true
|
|
632
770
|
}, tNoResults === null || tNoResults === void 0 ? void 0 : tNoResults())), /*#__PURE__*/_react["default"].createElement(_AutoCompleteAssistiveHint["default"], {
|
|
633
771
|
id: assistiveHintID
|
|
634
|
-
}, tAssistiveHint === null || tAssistiveHint === void 0 ? void 0 : tAssistiveHint()));
|
|
772
|
+
}, tAssistiveHint === null || tAssistiveHint === void 0 ? void 0 : tAssistiveHint())));
|
|
635
773
|
}
|
|
636
774
|
}]);
|
|
637
775
|
return AutoComplete;
|
|
638
776
|
}(_react.Component);
|
|
639
777
|
AutoComplete.defaultProps = {
|
|
640
|
-
width: '
|
|
778
|
+
width: 'full',
|
|
641
779
|
autoselect: false,
|
|
642
|
-
defaultValue: '',
|
|
643
|
-
displayMenu: 'overlay',
|
|
644
780
|
minLength: 0,
|
|
645
781
|
name: 'ds-input-autocomplete',
|
|
646
782
|
placeholder: '',
|
|
@@ -648,19 +784,11 @@ AutoComplete.defaultProps = {
|
|
|
648
784
|
return;
|
|
649
785
|
},
|
|
650
786
|
confirmOnBlur: false,
|
|
651
|
-
showNoOptionsFound: true,
|
|
652
|
-
showAllValues: false,
|
|
653
787
|
required: false,
|
|
654
788
|
tNoResults: function tNoResults() {
|
|
655
789
|
return 'No results found';
|
|
656
790
|
},
|
|
657
791
|
tAssistiveHint: function tAssistiveHint() {
|
|
658
792
|
return 'When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.';
|
|
659
|
-
},
|
|
660
|
-
dropdownArrow: function dropdownArrow(props) {
|
|
661
|
-
return /*#__PURE__*/_react["default"].createElement(_CaretIcon.CaretIcon, (0, _extends2["default"])({
|
|
662
|
-
direction: "down",
|
|
663
|
-
size: "sm"
|
|
664
|
-
}, props));
|
|
665
793
|
}
|
|
666
794
|
};
|