@digigov/ui 0.30.3 → 0.32.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 +28 -1
- package/admin/AccessibilityMenu/index.d.ts +13 -0
- package/admin/AccessibilityMenu/index.js +170 -0
- package/admin/AutoComplete/index.d.ts +2 -2
- package/admin/Chip/index.d.ts +1 -0
- package/admin/Chip/index.js +14 -0
- package/admin/CopyToClipboard/CopyToClipboard.stories.playwright.json +2 -2
- package/admin/Drawer/__stories__/Default.js +19 -12
- package/admin/Dropdown/__stories__/AlignRight.js +0 -2
- package/admin/Dropdown/__stories__/Default.js +0 -2
- package/admin/Dropdown/__stories__/PlacementTop.js +0 -2
- package/admin/FilterSection/index.d.ts +1 -2
- package/admin/FilterSection/index.js +4 -18
- package/admin/Modal/index.d.ts +2 -2
- package/admin/Modal/index.js +17 -12
- package/admin/Pagination/__stories__/Default.js +4 -7
- package/admin/Pagination/__stories__/PaginationSmall.js +2 -3
- package/app/Footer/__stories__/FooterAllInclusive.js +1 -0
- package/app/Footer/__stories__/FooterWithSecondaryNavigation.js +1 -0
- package/app/Header/__stories__/WithNavigation.js +10 -8
- package/app/QrCodeScanner/__stories__/Default.js +3 -3
- package/app/QrCodeViewer/QRCode.stories.d.ts +0 -1
- package/app/QrCodeViewer/index.d.ts +1 -2
- package/app/QrCodeViewer/index.js +10 -10
- package/app/ThemeOptionsForm/index.d.ts +2 -0
- package/app/ThemeOptionsForm/index.js +243 -0
- package/app/ThemePaletteForm/index.d.ts +2 -0
- package/app/{ThemeSelectorOptions → ThemePaletteForm}/index.js +9 -8
- package/app/index.d.ts +2 -1
- package/app/index.js +17 -4
- package/core/Accordion/Accordion.stories.playwright.json +2 -2
- package/core/Accordion/index.d.ts +2 -2
- package/core/Accordion/index.js +7 -7
- package/core/Divider/__stories__/Default.js +5 -10
- package/core/ErrorSummary/ErrorSummary.stories.playwright.json +1 -1
- package/core/ErrorSummary/__stories__/Default.js +3 -3
- package/core/ErrorSummary/__stories__/LinkedToCheckbox.js +3 -3
- package/core/ErrorSummary/__stories__/LinkedToField.js +3 -3
- package/core/ErrorSummary/__stories__/LinkedToInput.js +3 -3
- package/core/Link/__stories__/DarkBackground.js +6 -2
- package/core/Link/__stories__/DarkBackgroundNoUnderline.js +6 -2
- package/core/NavList/NavList.stories.d.ts +1 -3
- package/core/NavList/NavList.stories.js +4 -32
- package/core/NavList/NavList.stories.playwright.json +6 -6
- package/core/NavList/{NavListAuto.js → NavListAuto/NavListAuto.js} +11 -5
- package/core/NavList/{NavListBase.d.ts → NavListAuto/NavListBaseAuto.d.ts} +1 -1
- package/core/NavList/{NavListBase.js → NavListAuto/NavListBaseAuto.js} +6 -6
- package/core/NavList/{NavListContext.d.ts → NavListAuto/NavListContextAuto.d.ts} +7 -4
- package/core/NavList/{NavListContext.js → NavListAuto/NavListContextAuto.js} +23 -11
- package/core/NavList/NavListAuto/NavListItemAnchorAuto.d.ts +9 -0
- package/core/NavList/{NavListSubMenu.js → NavListAuto/NavListItemAnchorAuto.js} +22 -21
- package/core/NavList/{NavListItemAuto.js → NavListAuto/NavListItemAuto.js} +20 -22
- package/core/NavList/NavListAuto/NavListItemButtonAuto.d.ts +12 -0
- package/core/NavList/NavListAuto/NavListItemButtonAuto.js +48 -0
- package/core/NavList/NavListAuto/NavListMenuAuto.d.ts +11 -0
- package/core/NavList/NavListAuto/NavListMenuAuto.js +56 -0
- package/core/NavList/NavListAuto/NavListSubMenuAuto.d.ts +9 -0
- package/core/NavList/NavListAuto/NavListSubMenuAuto.js +44 -0
- package/core/NavList/NavListItem.js +6 -8
- package/core/NavList/NavListItemBase.d.ts +1 -1
- package/core/NavList/NavListItemBase.js +4 -9
- package/core/NavList/NavMenuContainerContentList.d.ts +3 -1
- package/core/NavList/NavMenuContainerContentList.js +73 -3
- package/core/NavList/__stories__/Default.js +22 -15
- package/core/NavList/__stories__/NavVerticalLayout.d.ts +2 -0
- package/core/NavList/__stories__/{NavHorizontalLayout.js → NavVerticalLayout.js} +24 -18
- package/core/NavList/index.d.ts +3 -5
- package/core/NavList/index.js +9 -23
- package/core/NavList/types.d.ts +20 -11
- package/core/SingleCharacterInputContainer/SingleCharacterInputContainer.stories.d.ts +13 -0
- package/core/SingleCharacterInputContainer/SingleCharacterInputContainer.stories.js +75 -0
- package/core/SingleCharacterInputContainer/__stories__/Default.d.ts +2 -0
- package/core/SingleCharacterInputContainer/__stories__/Default.js +46 -0
- package/core/SingleCharacterInputContainer/__stories__/WithDefaultError.d.ts +2 -0
- package/core/SingleCharacterInputContainer/__stories__/WithDefaultError.js +52 -0
- package/core/SingleCharacterInputContainer/__stories__/WithErrorMessageInvalidCode.d.ts +2 -0
- package/core/SingleCharacterInputContainer/__stories__/WithErrorMessageInvalidCode.js +58 -0
- package/core/SingleCharacterInputContainer/__stories__/WithErrorMessageLessDigit.d.ts +2 -0
- package/core/SingleCharacterInputContainer/__stories__/WithErrorMessageLessDigit.js +52 -0
- package/core/SingleCharacterInputContainer/index.d.ts +4 -0
- package/core/SingleCharacterInputContainer/index.js +44 -0
- package/core/SingleCharacterInputContainer/index.mdx +29 -0
- package/core/Tabs/__stories__/Default.js +5 -5
- package/core/Tabs/index.d.ts +2 -2
- package/core/Tabs/index.js +5 -7
- package/es/admin/AccessibilityMenu/index.js +13 -0
- package/es/admin/Chip/index.js +1 -0
- package/es/admin/CopyToClipboard/CopyToClipboard.stories.playwright.json +2 -2
- package/es/admin/Drawer/__stories__/Default.js +20 -13
- package/es/admin/Dropdown/__stories__/AlignRight.js +0 -2
- package/es/admin/Dropdown/__stories__/Default.js +0 -2
- package/es/admin/Dropdown/__stories__/PlacementTop.js +0 -2
- package/es/admin/FilterSection/index.js +1 -2
- package/es/admin/Modal/index.js +16 -11
- package/es/admin/Pagination/__stories__/Default.js +4 -7
- package/es/admin/Pagination/__stories__/PaginationSmall.js +2 -3
- package/es/app/Footer/__stories__/FooterAllInclusive.js +1 -0
- package/es/app/Footer/__stories__/FooterWithSecondaryNavigation.js +1 -0
- package/es/app/Header/__stories__/WithNavigation.js +10 -8
- package/es/app/QrCodeScanner/__stories__/Default.js +3 -3
- package/es/app/QrCodeViewer/index.js +8 -9
- package/es/app/ThemeOptionsForm/index.js +215 -0
- package/es/app/{ThemeSelectorOptions → ThemePaletteForm}/index.js +5 -4
- package/es/app/index.js +2 -1
- package/es/core/Accordion/Accordion.stories.playwright.json +2 -2
- package/es/core/Accordion/index.js +7 -7
- package/es/core/Divider/__stories__/Default.js +5 -10
- package/es/core/ErrorSummary/ErrorSummary.stories.playwright.json +1 -1
- package/es/core/ErrorSummary/__stories__/Default.js +3 -3
- package/es/core/ErrorSummary/__stories__/LinkedToCheckbox.js +3 -3
- package/es/core/ErrorSummary/__stories__/LinkedToField.js +3 -3
- package/es/core/ErrorSummary/__stories__/LinkedToInput.js +3 -3
- package/es/core/Link/__stories__/DarkBackground.js +6 -2
- package/es/core/Link/__stories__/DarkBackgroundNoUnderline.js +6 -2
- package/es/core/NavList/NavList.stories.js +1 -3
- package/es/core/NavList/NavList.stories.playwright.json +6 -6
- package/{esm/core/NavList → es/core/NavList/NavListAuto}/NavListAuto.js +11 -5
- package/{esm/core/NavList/NavListBase.js → es/core/NavList/NavListAuto/NavListBaseAuto.js} +4 -4
- package/es/core/NavList/{NavListContext.js → NavListAuto/NavListContextAuto.js} +20 -8
- package/es/core/NavList/NavListAuto/NavListItemAnchorAuto.js +26 -0
- package/es/core/NavList/NavListAuto/NavListItemAuto.js +38 -0
- package/es/core/NavList/NavListAuto/NavListItemButtonAuto.js +30 -0
- package/es/core/NavList/NavListAuto/NavListMenuAuto.js +36 -0
- package/es/core/NavList/NavListAuto/NavListSubMenuAuto.js +26 -0
- package/es/core/NavList/NavListItem.js +7 -9
- package/es/core/NavList/NavListItemBase.js +4 -9
- package/es/core/NavList/NavMenuContainerContentList.js +64 -1
- package/es/core/NavList/__stories__/Default.js +22 -15
- package/{esm/core/NavList/__stories__/NavHorizontalLayout.js → es/core/NavList/__stories__/NavVerticalLayout.js} +22 -16
- package/es/core/NavList/index.js +3 -5
- package/es/core/SingleCharacterInputContainer/SingleCharacterInputContainer.stories.js +12 -0
- package/es/core/SingleCharacterInputContainer/__stories__/Default.js +31 -0
- package/es/core/SingleCharacterInputContainer/__stories__/WithDefaultError.js +35 -0
- package/es/core/SingleCharacterInputContainer/__stories__/WithErrorMessageInvalidCode.js +41 -0
- package/es/core/SingleCharacterInputContainer/__stories__/WithErrorMessageLessDigit.js +35 -0
- package/es/core/SingleCharacterInputContainer/index.js +4 -0
- package/es/core/SingleCharacterInputContainer/index.mdx +29 -0
- package/es/core/Tabs/__stories__/Default.js +5 -5
- package/es/core/Tabs/index.js +5 -7
- package/es/hooks/useFontSize.js +10 -0
- package/es/hooks/useHighlightLinks.js +38 -0
- package/es/hooks/useLetterSpacing.js +10 -0
- package/es/hooks/useLineHeight.js +10 -0
- package/es/hooks/useNavList.js +10 -7
- package/es/hooks/useTheme.js +19 -11
- package/es/hooks/useTogglableNav.js +292 -0
- package/es/hooks/{useTogglableSections.js → useTogglableTab.js} +2 -8
- package/es/hooks/useVariantVars.js +30 -0
- package/es/layouts/Basic/__stories__/Default.js +2 -2
- package/es/layouts/Basic/__stories__/MultipleRowsLayout.js +3 -3
- package/es/layouts/Basic/__stories__/TwoThirdsOneThirdColumns.js +3 -3
- package/es/locales/el.js +4 -0
- package/es/registry.js +40 -14
- package/es/typography/NormalText/__stories__/FontSizes.js +18 -6
- package/es/typography/NormalText/__stories__/FontWeight.js +3 -1
- package/es/typography/NormalText/__stories__/Variants.js +3 -1
- package/esm/admin/AccessibilityMenu/index.js +13 -0
- package/esm/admin/Chip/index.js +1 -0
- package/esm/admin/CopyToClipboard/CopyToClipboard.stories.playwright.json +2 -2
- package/esm/admin/Drawer/__stories__/Default.js +20 -13
- package/esm/admin/Dropdown/__stories__/AlignRight.js +0 -2
- package/esm/admin/Dropdown/__stories__/Default.js +0 -2
- package/esm/admin/Dropdown/__stories__/PlacementTop.js +0 -2
- package/esm/admin/FilterSection/index.js +1 -2
- package/esm/admin/Modal/index.js +16 -11
- package/esm/admin/Pagination/__stories__/Default.js +4 -7
- package/esm/admin/Pagination/__stories__/PaginationSmall.js +2 -3
- package/esm/app/Footer/__stories__/FooterAllInclusive.js +1 -0
- package/esm/app/Footer/__stories__/FooterWithSecondaryNavigation.js +1 -0
- package/esm/app/Header/__stories__/WithNavigation.js +10 -8
- package/esm/app/QrCodeScanner/__stories__/Default.js +3 -3
- package/esm/app/QrCodeViewer/index.js +8 -9
- package/esm/app/ThemeOptionsForm/index.js +215 -0
- package/esm/app/{ThemeSelectorOptions → ThemePaletteForm}/index.js +5 -4
- package/esm/app/index.js +2 -1
- package/esm/core/Accordion/Accordion.stories.playwright.json +2 -2
- package/esm/core/Accordion/index.js +7 -7
- package/esm/core/Divider/__stories__/Default.js +5 -10
- package/esm/core/ErrorSummary/ErrorSummary.stories.playwright.json +1 -1
- package/esm/core/ErrorSummary/__stories__/Default.js +3 -3
- package/esm/core/ErrorSummary/__stories__/LinkedToCheckbox.js +3 -3
- package/esm/core/ErrorSummary/__stories__/LinkedToField.js +3 -3
- package/esm/core/ErrorSummary/__stories__/LinkedToInput.js +3 -3
- package/esm/core/Link/__stories__/DarkBackground.js +6 -2
- package/esm/core/Link/__stories__/DarkBackgroundNoUnderline.js +6 -2
- package/esm/core/NavList/NavList.stories.js +1 -3
- package/esm/core/NavList/NavList.stories.playwright.json +6 -6
- package/{es/core/NavList → esm/core/NavList/NavListAuto}/NavListAuto.js +11 -5
- package/{es/core/NavList/NavListBase.js → esm/core/NavList/NavListAuto/NavListBaseAuto.js} +4 -4
- package/esm/core/NavList/{NavListContext.js → NavListAuto/NavListContextAuto.js} +20 -8
- package/esm/core/NavList/NavListAuto/NavListItemAnchorAuto.js +26 -0
- package/esm/core/NavList/NavListAuto/NavListItemAuto.js +38 -0
- package/esm/core/NavList/NavListAuto/NavListItemButtonAuto.js +30 -0
- package/esm/core/NavList/NavListAuto/NavListMenuAuto.js +36 -0
- package/esm/core/NavList/NavListAuto/NavListSubMenuAuto.js +26 -0
- package/esm/core/NavList/NavListItem.js +7 -9
- package/esm/core/NavList/NavListItemBase.js +4 -9
- package/esm/core/NavList/NavMenuContainerContentList.js +64 -1
- package/esm/core/NavList/__stories__/Default.js +22 -15
- package/{es/core/NavList/__stories__/NavHorizontalLayout.js → esm/core/NavList/__stories__/NavVerticalLayout.js} +22 -16
- package/esm/core/NavList/index.js +3 -5
- package/esm/core/SingleCharacterInputContainer/SingleCharacterInputContainer.stories.js +12 -0
- package/esm/core/SingleCharacterInputContainer/__stories__/Default.js +31 -0
- package/esm/core/SingleCharacterInputContainer/__stories__/WithDefaultError.js +35 -0
- package/esm/core/SingleCharacterInputContainer/__stories__/WithErrorMessageInvalidCode.js +41 -0
- package/esm/core/SingleCharacterInputContainer/__stories__/WithErrorMessageLessDigit.js +35 -0
- package/esm/core/SingleCharacterInputContainer/index.js +4 -0
- package/esm/core/SingleCharacterInputContainer/index.mdx +29 -0
- package/esm/core/Tabs/__stories__/Default.js +5 -5
- package/esm/core/Tabs/index.js +5 -7
- package/esm/hooks/useFontSize.js +10 -0
- package/esm/hooks/useHighlightLinks.js +38 -0
- package/esm/hooks/useLetterSpacing.js +10 -0
- package/esm/hooks/useLineHeight.js +10 -0
- package/esm/hooks/useNavList.js +10 -7
- package/esm/hooks/useTheme.js +19 -11
- package/esm/hooks/useTogglableNav.js +292 -0
- package/esm/hooks/{useTogglableSections.js → useTogglableTab.js} +2 -8
- package/esm/hooks/useVariantVars.js +30 -0
- package/esm/index.js +1 -1
- package/esm/layouts/Basic/__stories__/Default.js +2 -2
- package/esm/layouts/Basic/__stories__/MultipleRowsLayout.js +3 -3
- package/esm/layouts/Basic/__stories__/TwoThirdsOneThirdColumns.js +3 -3
- package/esm/locales/el.js +4 -0
- package/esm/registry.js +40 -14
- package/esm/typography/NormalText/__stories__/FontSizes.js +18 -6
- package/esm/typography/NormalText/__stories__/FontWeight.js +3 -1
- package/esm/typography/NormalText/__stories__/Variants.js +3 -1
- package/hooks/useFontSize.d.ts +6 -0
- package/hooks/useFontSize.js +23 -0
- package/hooks/useHighlightLinks.d.ts +8 -0
- package/hooks/useHighlightLinks.js +52 -0
- package/hooks/useLetterSpacing.d.ts +6 -0
- package/hooks/useLetterSpacing.js +23 -0
- package/hooks/useLineHeight.d.ts +6 -0
- package/hooks/useLineHeight.js +23 -0
- package/hooks/useNavList.d.ts +2 -2
- package/hooks/useNavList.js +11 -8
- package/hooks/useTheme.d.ts +4 -4
- package/hooks/useTheme.js +19 -12
- package/hooks/useTogglableNav.d.ts +25 -0
- package/hooks/useTogglableNav.js +305 -0
- package/hooks/{useTogglableSections.d.ts → useTogglableTab.d.ts} +4 -3
- package/hooks/{useTogglableSections.js → useTogglableTab.js} +3 -9
- package/hooks/useVariantVars.d.ts +11 -0
- package/hooks/useVariantVars.js +41 -0
- package/layouts/Basic/__stories__/Default.js +2 -2
- package/layouts/Basic/__stories__/MultipleRowsLayout.js +3 -3
- package/layouts/Basic/__stories__/TwoThirdsOneThirdColumns.js +3 -3
- package/locales/el.d.ts +4 -0
- package/locales/el.js +4 -0
- package/package.json +3 -3
- package/registry.d.ts +21 -7
- package/registry.js +55 -16
- package/src/admin/AccessibilityMenu/index.tsx +14 -0
- package/src/admin/AutoComplete/index.tsx +2 -2
- package/src/admin/Chip/index.tsx +1 -0
- package/src/admin/CopyToClipboard/CopyToClipboard.stories.playwright.json +2 -2
- package/src/admin/Drawer/__stories__/Default.tsx +24 -13
- package/src/admin/Dropdown/__stories__/AlignRight.tsx +2 -2
- package/src/admin/Dropdown/__stories__/Default.tsx +2 -2
- package/src/admin/Dropdown/__stories__/PlacementTop.tsx +2 -2
- package/src/admin/FilterSection/index.tsx +1 -2
- package/src/admin/Modal/index.tsx +43 -39
- package/src/admin/Pagination/__stories__/Default.tsx +4 -4
- package/src/admin/Pagination/__stories__/PaginationSmall.tsx +2 -2
- package/src/app/Footer/__stories__/FooterAllInclusive.tsx +1 -1
- package/src/app/Footer/__stories__/FooterWithSecondaryNavigation.tsx +1 -1
- package/src/app/Header/__stories__/WithNavigation.tsx +8 -8
- package/src/app/QrCodeScanner/__stories__/Default.tsx +2 -2
- package/src/app/QrCodeViewer/index.tsx +16 -14
- package/src/app/ThemeOptionsForm/index.tsx +220 -0
- package/src/app/{ThemeSelectorOptions → ThemePaletteForm}/index.tsx +3 -3
- package/src/app/index.ts +2 -1
- package/src/core/Accordion/Accordion.stories.playwright.json +2 -2
- package/src/core/Accordion/index.tsx +5 -11
- package/src/core/Divider/__stories__/Default.tsx +5 -5
- package/src/core/ErrorSummary/ErrorSummary.stories.playwright.json +1 -1
- package/src/core/ErrorSummary/__stories__/Default.tsx +2 -2
- package/src/core/ErrorSummary/__stories__/LinkedToCheckbox.tsx +2 -2
- package/src/core/ErrorSummary/__stories__/LinkedToField.tsx +2 -2
- package/src/core/ErrorSummary/__stories__/LinkedToInput.tsx +2 -2
- package/src/core/Link/__stories__/DarkBackground.tsx +2 -3
- package/src/core/Link/__stories__/DarkBackgroundNoUnderline.tsx +2 -3
- package/src/core/NavList/NavList.stories.js +1 -3
- package/src/core/NavList/NavList.stories.playwright.json +6 -6
- package/src/core/NavList/NavListAuto/NavListAuto.tsx +34 -0
- package/src/core/NavList/{NavListBase.tsx → NavListAuto/NavListBaseAuto.tsx} +3 -3
- package/src/core/NavList/{NavListContext.tsx → NavListAuto/NavListContextAuto.tsx} +26 -11
- package/src/core/NavList/NavListAuto/NavListItemAnchorAuto.tsx +38 -0
- package/src/core/NavList/NavListAuto/NavListItemAuto.tsx +49 -0
- package/src/core/NavList/NavListAuto/NavListItemButtonAuto.tsx +53 -0
- package/src/core/NavList/NavListAuto/NavListMenuAuto.tsx +51 -0
- package/src/core/NavList/NavListAuto/NavListSubMenuAuto.tsx +32 -0
- package/src/core/NavList/NavListItem.tsx +15 -10
- package/src/core/NavList/NavListItemBase.tsx +5 -8
- package/src/core/NavList/NavMenuContainerContentList.tsx +61 -1
- package/src/core/NavList/__stories__/Default.tsx +26 -14
- package/src/core/NavList/__stories__/{NavHorizontalLayout.tsx → NavVerticalLayout.tsx} +29 -16
- package/src/core/NavList/index.tsx +3 -5
- package/src/core/NavList/types.tsx +23 -10
- package/src/core/SingleCharacterInputContainer/SingleCharacterInputContainer.stories.js +13 -0
- package/src/core/SingleCharacterInputContainer/__stories__/Default.tsx +35 -0
- package/src/core/SingleCharacterInputContainer/__stories__/WithDefaultError.tsx +38 -0
- package/src/core/SingleCharacterInputContainer/__stories__/WithErrorMessageInvalidCode.tsx +38 -0
- package/src/core/SingleCharacterInputContainer/__stories__/WithErrorMessageLessDigit.tsx +38 -0
- package/src/core/SingleCharacterInputContainer/index.mdx +29 -0
- package/src/core/SingleCharacterInputContainer/index.tsx +4 -0
- package/src/core/Tabs/__stories__/Default.tsx +5 -5
- package/src/core/Tabs/index.tsx +5 -9
- package/src/hooks/useFontSize.ts +32 -0
- package/src/hooks/useHighlightLinks.ts +45 -0
- package/src/hooks/useLetterSpacing.ts +27 -0
- package/src/hooks/useLineHeight.ts +31 -0
- package/src/hooks/useNavList.ts +5 -7
- package/src/hooks/useTheme.ts +28 -20
- package/src/hooks/useTogglableNav.tsx +294 -0
- package/src/hooks/{useTogglableSections.tsx → useTogglableTab.tsx} +12 -13
- package/src/hooks/useVariantVars.ts +35 -0
- package/src/layouts/Basic/__stories__/Default.tsx +3 -3
- package/src/layouts/Basic/__stories__/MultipleRowsLayout.tsx +8 -8
- package/src/layouts/Basic/__stories__/TwoThirdsOneThirdColumns.tsx +6 -6
- package/src/locales/el.ts +4 -0
- package/src/registry.js +40 -14
- package/src/typography/NormalText/__stories__/FontSizes.tsx +6 -6
- package/src/typography/NormalText/__stories__/FontWeight.tsx +1 -1
- package/src/typography/NormalText/__stories__/Variants.tsx +1 -1
- package/typography/NormalText/__stories__/FontSizes.js +18 -6
- package/typography/NormalText/__stories__/FontWeight.js +3 -1
- package/typography/NormalText/__stories__/Variants.js +3 -1
- package/app/ThemeSelectorOptions/index.d.ts +0 -2
- package/core/NavList/NavListSubMenu.d.ts +0 -8
- package/core/NavList/__stories__/NavHorizontalLayout.d.ts +0 -2
- package/core/NavList/__stories__/NavListAutoExample.d.ts +0 -2
- package/core/NavList/__stories__/NavListAutoExample.js +0 -63
- package/core/NavList/__stories__/NavListEpathlaExample.d.ts +0 -2
- package/core/NavList/__stories__/NavListEpathlaExample.js +0 -141
- package/es/core/NavList/NavListItemAuto.js +0 -40
- package/es/core/NavList/NavListSubMenu.js +0 -25
- package/es/core/NavList/__stories__/NavListAutoExample.js +0 -48
- package/es/core/NavList/__stories__/NavListEpathlaExample.js +0 -123
- package/esm/core/NavList/NavListItemAuto.js +0 -40
- package/esm/core/NavList/NavListSubMenu.js +0 -25
- package/esm/core/NavList/__stories__/NavListAutoExample.js +0 -48
- package/esm/core/NavList/__stories__/NavListEpathlaExample.js +0 -123
- package/src/core/NavList/NavListAuto.tsx +0 -20
- package/src/core/NavList/NavListItemAuto.tsx +0 -41
- package/src/core/NavList/NavListSubMenu.tsx +0 -28
- package/src/core/NavList/__stories__/NavListAutoExample.tsx +0 -53
- package/src/core/NavList/__stories__/NavListEpathlaExample.tsx +0 -174
- /package/core/NavList/{NavListAuto.d.ts → NavListAuto/NavListAuto.d.ts} +0 -0
- /package/core/NavList/{NavListItemAuto.d.ts → NavListAuto/NavListItemAuto.d.ts} +0 -0
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.useTogglableNav = useTogglableNav;
|
|
9
|
+
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
12
|
+
var _extends3 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
+
|
|
16
|
+
var _react = require("react");
|
|
17
|
+
|
|
18
|
+
function useTogglableNav(_ref) {
|
|
19
|
+
var toggleProperty = _ref.toggleProperty,
|
|
20
|
+
toggleOpenClose = _ref.toggleOpenClose,
|
|
21
|
+
toggleParentOpen = _ref.toggleParentOpen,
|
|
22
|
+
onToggleProperty = _ref.onToggleProperty,
|
|
23
|
+
initial = _ref.initial,
|
|
24
|
+
ariaNavigation = _ref.ariaNavigation,
|
|
25
|
+
toggleHook = _ref.toggleHook;
|
|
26
|
+
|
|
27
|
+
var _useState = (0, _react.useState)(initial || {}),
|
|
28
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
29
|
+
opened = _useState2[0],
|
|
30
|
+
setOpened = _useState2[1];
|
|
31
|
+
|
|
32
|
+
var registered = (0, _react.useRef)({});
|
|
33
|
+
var openedKeys = (0, _react.useRef)([]);
|
|
34
|
+
var registerButtonRef = (0, _react.useCallback)(function (el) {
|
|
35
|
+
if (!el) return;
|
|
36
|
+
var key = el.getAttribute('aria-controls');
|
|
37
|
+
if (registered.current[key]) return;
|
|
38
|
+
registered.current[key] = {
|
|
39
|
+
el: el,
|
|
40
|
+
type: 'button'
|
|
41
|
+
};
|
|
42
|
+
}, []);
|
|
43
|
+
var registerLinkRef = (0, _react.useCallback)(function (el) {
|
|
44
|
+
if (!el) return;
|
|
45
|
+
var key = el.getAttribute('aria-controls');
|
|
46
|
+
if (registered.current[key]) return;
|
|
47
|
+
registered.current[key] = {
|
|
48
|
+
el: el,
|
|
49
|
+
type: 'link'
|
|
50
|
+
};
|
|
51
|
+
}, []);
|
|
52
|
+
var toggle = (0, _react.useCallback)(function (e) {
|
|
53
|
+
var key = e.currentTarget.getAttribute('aria-controls');
|
|
54
|
+
var selected = e.currentTarget.getAttribute('aria-selected') === 'true';
|
|
55
|
+
|
|
56
|
+
if (toggleHook) {
|
|
57
|
+
toggleHook(key);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
|
|
62
|
+
if (toggleOpenClose) {
|
|
63
|
+
if (toggleParentOpen) {
|
|
64
|
+
var items = key.split('__');
|
|
65
|
+
var currentKey = items.slice(0, items.length).join('__');
|
|
66
|
+
var totalKeys = items.map(function (_, index) {
|
|
67
|
+
return items.slice(0, index + 1).join('__');
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
if (!selected && !openedKeys.current.includes(currentKey)) {
|
|
71
|
+
openedKeys.current.push(currentKey);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (selected && openedKeys.current.includes(currentKey)) {
|
|
75
|
+
openedKeys.current = openedKeys.current.filter(function (k) {
|
|
76
|
+
return k !== currentKey;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
setOpened(function (_) {
|
|
81
|
+
return (0, _extends3["default"])({}, totalKeys.reduce(function (acc, cur) {
|
|
82
|
+
acc[cur] = cur === currentKey ? !selected : true;
|
|
83
|
+
return acc;
|
|
84
|
+
}, {}));
|
|
85
|
+
});
|
|
86
|
+
} else {
|
|
87
|
+
setOpened((0, _defineProperty2["default"])({}, key, !selected));
|
|
88
|
+
}
|
|
89
|
+
} else {
|
|
90
|
+
setOpened((0, _defineProperty2["default"])({}, key, true));
|
|
91
|
+
}
|
|
92
|
+
}, []);
|
|
93
|
+
|
|
94
|
+
var getMenuItems = function getMenuItems(element) {
|
|
95
|
+
if (element) {
|
|
96
|
+
if ((element === null || element === void 0 ? void 0 : element.role) === 'menuitem') {
|
|
97
|
+
return element;
|
|
98
|
+
} else {
|
|
99
|
+
var childrenArray = Array.from(element === null || element === void 0 ? void 0 : element.children);
|
|
100
|
+
var menuItemsArray = [];
|
|
101
|
+
childrenArray.forEach(function (child) {
|
|
102
|
+
var menuItem = getMenuItems(child);
|
|
103
|
+
|
|
104
|
+
if (menuItem && !menuItemsArray.includes(menuItem)) {
|
|
105
|
+
menuItemsArray.push(menuItem);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
return menuItemsArray.flatMap(function (x) {
|
|
109
|
+
return x;
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return null;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
var findChildren = function findChildren(parent, items) {
|
|
118
|
+
return items ? items.filter(function (child) {
|
|
119
|
+
return child.slice(0, child.lastIndexOf('__')) === parent;
|
|
120
|
+
}) : items;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
var findParent = function findParent(child, items) {
|
|
124
|
+
var parent = child.slice(0, child.lastIndexOf('__'));
|
|
125
|
+
return items.find(function (item) {
|
|
126
|
+
return item === parent;
|
|
127
|
+
}) ? parent : null;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
var findSiblings = function findSiblings(key, items) {
|
|
131
|
+
var parent = key.slice(0, key.lastIndexOf('__'));
|
|
132
|
+
|
|
133
|
+
if (key.lastIndexOf('__') > 0) {
|
|
134
|
+
return items.filter(function (child) {
|
|
135
|
+
return child.slice(0, child.lastIndexOf('__')) === parent;
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return items.filter(function (child) {
|
|
140
|
+
return !child.includes('__');
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
var findLeftSibling = function findLeftSibling(key, items) {
|
|
145
|
+
var siblings = findSiblings(key, items);
|
|
146
|
+
|
|
147
|
+
if (siblings.length > 0) {
|
|
148
|
+
var keyIndex = siblings.findIndex(function (item) {
|
|
149
|
+
return item === key;
|
|
150
|
+
});
|
|
151
|
+
return keyIndex > 0 ? siblings[keyIndex - 1] : null;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return null;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
var findRightSibling = function findRightSibling(key, items) {
|
|
158
|
+
var siblings = findSiblings(key, items);
|
|
159
|
+
|
|
160
|
+
if (siblings.length > 0) {
|
|
161
|
+
var keyIndex = siblings.findIndex(function (item) {
|
|
162
|
+
return item === key;
|
|
163
|
+
});
|
|
164
|
+
return keyIndex < siblings.length - 1 ? siblings[keyIndex + 1] : null;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return null;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
var getOpenItemChildren = function getOpenItemChildren(currentItem, items) {
|
|
171
|
+
var itemChildrenArray = [];
|
|
172
|
+
var itemChildren = findChildren(currentItem, items);
|
|
173
|
+
itemChildren.forEach(function (item) {
|
|
174
|
+
if (openedKeys.current.includes(item)) {
|
|
175
|
+
itemChildrenArray.push(item);
|
|
176
|
+
var internChildren = getOpenItemChildren(item, items);
|
|
177
|
+
|
|
178
|
+
if (internChildren.length > 0) {
|
|
179
|
+
itemChildrenArray.push(internChildren);
|
|
180
|
+
}
|
|
181
|
+
} else {
|
|
182
|
+
itemChildrenArray.push(item);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
return itemChildrenArray.flatMap(function (x) {
|
|
186
|
+
return x;
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
var onKeyDown = (0, _react.useCallback)(function (e) {
|
|
191
|
+
var _document$querySelect;
|
|
192
|
+
|
|
193
|
+
var orientation = (_document$querySelect = document.querySelector("[aria-orientation]")) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.getAttribute('aria-orientation');
|
|
194
|
+
var key = e.target.getAttribute('aria-controls');
|
|
195
|
+
var keys = Object.entries(registered.current).map(function (_ref2) {
|
|
196
|
+
var _ref3 = (0, _slicedToArray2["default"])(_ref2, 2),
|
|
197
|
+
entryKey = _ref3[0],
|
|
198
|
+
_ = _ref3[1];
|
|
199
|
+
|
|
200
|
+
return entryKey;
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
var handleArrowRight = function handleArrowRight() {
|
|
204
|
+
var arrowRightItem = findRightSibling(key, keys);
|
|
205
|
+
|
|
206
|
+
if (arrowRightItem) {
|
|
207
|
+
registered.current[arrowRightItem].el.focus();
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
var handleArrowLeft = function handleArrowLeft() {
|
|
212
|
+
var arrowLeftItem = findLeftSibling(key, keys);
|
|
213
|
+
|
|
214
|
+
if (arrowLeftItem) {
|
|
215
|
+
registered.current[arrowLeftItem].el.focus();
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
switch (e.key) {
|
|
220
|
+
case 'ArrowRight':
|
|
221
|
+
handleArrowRight();
|
|
222
|
+
break;
|
|
223
|
+
|
|
224
|
+
case 'ArrowDown':
|
|
225
|
+
var openItem = getOpenItemChildren(key, keys);
|
|
226
|
+
var arrowDownItems = findChildren(key, openItem);
|
|
227
|
+
var menuItems = getMenuItems(document.getElementById(key));
|
|
228
|
+
|
|
229
|
+
if (arrowDownItems.length > 0) {
|
|
230
|
+
registered.current[arrowDownItems[0]].el.focus();
|
|
231
|
+
} else {
|
|
232
|
+
if (orientation === 'vertical') {
|
|
233
|
+
var _document$activeEleme;
|
|
234
|
+
|
|
235
|
+
if (((_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.getAttribute('aria-selected')) === 'true' && menuItems && menuItems.length > 0) {
|
|
236
|
+
menuItems[0].focus();
|
|
237
|
+
} else {
|
|
238
|
+
handleArrowRight();
|
|
239
|
+
}
|
|
240
|
+
} else {
|
|
241
|
+
if (menuItems && menuItems.length > 0) {
|
|
242
|
+
menuItems[0].focus();
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
break;
|
|
248
|
+
|
|
249
|
+
case 'ArrowLeft':
|
|
250
|
+
handleArrowLeft();
|
|
251
|
+
break;
|
|
252
|
+
|
|
253
|
+
case 'ArrowUp':
|
|
254
|
+
if (orientation === 'vertical') {
|
|
255
|
+
handleArrowLeft();
|
|
256
|
+
} else {
|
|
257
|
+
var arrowUpItem = findParent(key, keys);
|
|
258
|
+
|
|
259
|
+
if (arrowUpItem) {
|
|
260
|
+
registered.current[arrowUpItem].el.focus();
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
break;
|
|
265
|
+
|
|
266
|
+
case ' ':
|
|
267
|
+
case 'Enter':
|
|
268
|
+
if (registered.current[key].type === 'link') {
|
|
269
|
+
registered.current[key].el.click();
|
|
270
|
+
} else {
|
|
271
|
+
toggle(e);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
}, []);
|
|
277
|
+
var registerButton = (0, _react.useCallback)(function (key) {
|
|
278
|
+
var _extends2;
|
|
279
|
+
|
|
280
|
+
var isOpen = !!opened[key];
|
|
281
|
+
return (0, _extends3["default"])((_extends2 = {
|
|
282
|
+
ref: registerButtonRef
|
|
283
|
+
}, (0, _defineProperty2["default"])(_extends2, toggleProperty, isOpen), (0, _defineProperty2["default"])(_extends2, onToggleProperty, toggle), (0, _defineProperty2["default"])(_extends2, 'aria-controls', "".concat(key)), _extends2), ariaNavigation && {
|
|
284
|
+
onKeyDown: onKeyDown
|
|
285
|
+
});
|
|
286
|
+
}, [opened]);
|
|
287
|
+
var registerLink = (0, _react.useCallback)(function (key) {
|
|
288
|
+
return (0, _extends3["default"])({
|
|
289
|
+
ref: registerLinkRef,
|
|
290
|
+
'aria-controls': "".concat(key)
|
|
291
|
+
}, ariaNavigation && {
|
|
292
|
+
onKeyDown: onKeyDown
|
|
293
|
+
});
|
|
294
|
+
}, [opened]);
|
|
295
|
+
return (0, _react.useMemo)(function () {
|
|
296
|
+
return {
|
|
297
|
+
registerButton: registerButton,
|
|
298
|
+
registerLink: registerLink,
|
|
299
|
+
registered: registered,
|
|
300
|
+
opened: opened,
|
|
301
|
+
toggle: toggle,
|
|
302
|
+
setOpened: setOpened
|
|
303
|
+
};
|
|
304
|
+
}, [opened]);
|
|
305
|
+
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface UseTogglableTabInterface {
|
|
2
2
|
toggleProperty: string;
|
|
3
3
|
singleOpen?: boolean;
|
|
4
4
|
toggleOpenClose?: boolean;
|
|
5
|
+
toggleParentOpen?: boolean;
|
|
5
6
|
onToggleProperty: string;
|
|
6
7
|
initial?: Record<string, boolean>;
|
|
7
8
|
firstOpen?: boolean;
|
|
8
9
|
ariaNavigation?: boolean;
|
|
9
10
|
toggleHook?: (id: string) => void;
|
|
10
11
|
}
|
|
11
|
-
export interface
|
|
12
|
+
export interface UseTogglableTabReturn {
|
|
12
13
|
register: (el: string) => any;
|
|
13
14
|
registered: {
|
|
14
15
|
current: Record<string, HTMLElement>;
|
|
@@ -17,4 +18,4 @@ export interface UseTogglableSectionsReturn {
|
|
|
17
18
|
toggle: (id: string) => void;
|
|
18
19
|
setOpened: (opened: ((curOpened: Record<string, boolean>) => Record<string, boolean>) | Record<string, boolean>) => void;
|
|
19
20
|
}
|
|
20
|
-
export declare function
|
|
21
|
+
export declare function useTogglableTab({ toggleProperty, singleOpen, onToggleProperty, initial, firstOpen, ariaNavigation, toggleHook, }: UseTogglableTabInterface): UseTogglableTabReturn;
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.useTogglableTab = useTogglableTab;
|
|
9
9
|
|
|
10
10
|
var _extends4 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
@@ -16,10 +16,9 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
16
16
|
var _react = require("react");
|
|
17
17
|
|
|
18
18
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
19
|
-
function
|
|
19
|
+
function useTogglableTab(_ref) {
|
|
20
20
|
var toggleProperty = _ref.toggleProperty,
|
|
21
21
|
singleOpen = _ref.singleOpen,
|
|
22
|
-
toggleOpenClose = _ref.toggleOpenClose,
|
|
23
22
|
onToggleProperty = _ref.onToggleProperty,
|
|
24
23
|
initial = _ref.initial,
|
|
25
24
|
firstOpen = _ref.firstOpen,
|
|
@@ -46,7 +45,6 @@ function useTogglableSections(_ref) {
|
|
|
46
45
|
}, []);
|
|
47
46
|
var toggle = (0, _react.useCallback)(function (e) {
|
|
48
47
|
var key = e.currentTarget.getAttribute('aria-controls');
|
|
49
|
-
var selected = e.currentTarget.getAttribute('aria-selected') === 'true';
|
|
50
48
|
|
|
51
49
|
if (toggleHook) {
|
|
52
50
|
toggleHook(key);
|
|
@@ -55,11 +53,7 @@ function useTogglableSections(_ref) {
|
|
|
55
53
|
e.preventDefault();
|
|
56
54
|
|
|
57
55
|
if (singleOpen) {
|
|
58
|
-
|
|
59
|
-
setOpened((0, _defineProperty2["default"])({}, key, !selected));
|
|
60
|
-
} else {
|
|
61
|
-
setOpened((0, _defineProperty2["default"])({}, key, true));
|
|
62
|
-
}
|
|
56
|
+
setOpened((0, _defineProperty2["default"])({}, key, true));
|
|
63
57
|
} else {
|
|
64
58
|
setOpened(function (prev) {
|
|
65
59
|
return (0, _extends4["default"])({}, prev, (0, _defineProperty2["default"])({}, key, !prev[key]));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface VariantVarsOptions {
|
|
2
|
+
name: string;
|
|
3
|
+
variables: string[];
|
|
4
|
+
variants: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare type UseVariantVarsResult<T> = [
|
|
7
|
+
value: T,
|
|
8
|
+
changeValue: (value: T) => void
|
|
9
|
+
];
|
|
10
|
+
declare function useVariantVars({ name, variables, variants, }: VariantVarsOptions): UseVariantVarsResult<any>;
|
|
11
|
+
export default useVariantVars;
|
|
@@ -0,0 +1,41 @@
|
|
|
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"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
|
|
12
|
+
var _react = require("react");
|
|
13
|
+
|
|
14
|
+
function useVariantVars(_ref) {
|
|
15
|
+
var name = _ref.name,
|
|
16
|
+
variables = _ref.variables,
|
|
17
|
+
variants = _ref.variants;
|
|
18
|
+
var root = document.documentElement;
|
|
19
|
+
var storedValue = localStorage.getItem("--theme-".concat(name));
|
|
20
|
+
|
|
21
|
+
var _useState = (0, _react.useState)(storedValue || variants[0]),
|
|
22
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
23
|
+
value = _useState2[0],
|
|
24
|
+
setValue = _useState2[1];
|
|
25
|
+
|
|
26
|
+
(0, _react.useEffect)(function () {
|
|
27
|
+
localStorage.setItem("--theme-".concat(name), value);
|
|
28
|
+
variables.forEach(function (varName) {
|
|
29
|
+
root.style.setProperty("--".concat(varName), "var(--".concat(varName, "-").concat(value, ")"));
|
|
30
|
+
});
|
|
31
|
+
}, [value]);
|
|
32
|
+
|
|
33
|
+
function changeValue(v) {
|
|
34
|
+
setValue(v);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return [value, changeValue];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
var _default = useVariantVars;
|
|
41
|
+
exports["default"] = _default;
|
|
@@ -11,13 +11,13 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _Basic = require("@digigov/ui/layouts/Basic");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _Container = require("@digigov/ui/layouts/Basic/Container");
|
|
15
15
|
|
|
16
16
|
var _Main = require("@digigov/ui/layouts/Basic/Main");
|
|
17
17
|
|
|
18
18
|
var _typography = require("@digigov/ui/typography");
|
|
19
19
|
|
|
20
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_Basic.Layout, null, /*#__PURE__*/_react["default"].createElement(
|
|
20
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_Basic.Layout, null, /*#__PURE__*/_react["default"].createElement(_Container.Container, null, /*#__PURE__*/_react["default"].createElement(_Main.Main, null, /*#__PURE__*/_react["default"].createElement(_typography.Heading, null, "Two-thirds column"), /*#__PURE__*/_react["default"].createElement(_typography.Paragraph, null, "This is a paragraph inside a two-thirds wide column"))));
|
|
21
21
|
|
|
22
22
|
var Default = function Default() {
|
|
23
23
|
return _ref;
|
|
@@ -11,15 +11,15 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _Basic = require("@digigov/ui/layouts/Basic");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _Container = require("@digigov/ui/layouts/Basic/Container");
|
|
15
15
|
|
|
16
16
|
var _Main = require("@digigov/ui/layouts/Basic/Main");
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _Aside = require("@digigov/ui/layouts/Basic/Aside");
|
|
19
19
|
|
|
20
20
|
var _typography = require("@digigov/ui/typography");
|
|
21
21
|
|
|
22
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_Basic.Layout, null, /*#__PURE__*/_react["default"].createElement(
|
|
22
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_Basic.Layout, null, /*#__PURE__*/_react["default"].createElement(_Container.Container, null, /*#__PURE__*/_react["default"].createElement(_Main.Main, null, /*#__PURE__*/_react["default"].createElement(_typography.Heading, null, "Two-thirds column"), /*#__PURE__*/_react["default"].createElement(_typography.Paragraph, null, "This is a paragraph inside a two-thirds wide column"))), /*#__PURE__*/_react["default"].createElement(_Container.Container, null, /*#__PURE__*/_react["default"].createElement(_Main.Main, null, /*#__PURE__*/_react["default"].createElement(_typography.Heading, null, "Two-thirds column"), /*#__PURE__*/_react["default"].createElement(_typography.Paragraph, null, "This is a paragraph inside a two-thirds wide column")), /*#__PURE__*/_react["default"].createElement(_Aside.Aside, null, /*#__PURE__*/_react["default"].createElement(_typography.Heading, {
|
|
23
23
|
size: "m"
|
|
24
24
|
}, "One-third-column"), /*#__PURE__*/_react["default"].createElement(_typography.Paragraph, null, "This is a paragraph inside a one-third wide column"))));
|
|
25
25
|
|
|
@@ -11,15 +11,15 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _Basic = require("@digigov/ui/layouts/Basic");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _Container = require("@digigov/ui/layouts/Basic/Container");
|
|
15
15
|
|
|
16
16
|
var _Main = require("@digigov/ui/layouts/Basic/Main");
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _Aside = require("@digigov/ui/layouts/Basic/Aside");
|
|
19
19
|
|
|
20
20
|
var _typography = require("@digigov/ui/typography");
|
|
21
21
|
|
|
22
|
-
var _ref = /*#__PURE__*/_react["default"].createElement(_Basic.Layout, null, /*#__PURE__*/_react["default"].createElement(
|
|
22
|
+
var _ref = /*#__PURE__*/_react["default"].createElement(_Basic.Layout, null, /*#__PURE__*/_react["default"].createElement(_Container.Container, null, /*#__PURE__*/_react["default"].createElement(_Main.Main, null, /*#__PURE__*/_react["default"].createElement(_typography.Heading, null, "Two-thirds column"), /*#__PURE__*/_react["default"].createElement(_typography.Paragraph, null, "This is a paragraph inside a two-thirds wide column")), /*#__PURE__*/_react["default"].createElement(_Aside.Aside, null, /*#__PURE__*/_react["default"].createElement(_typography.Heading, {
|
|
23
23
|
size: "m"
|
|
24
24
|
}, "One-third-column"), /*#__PURE__*/_react["default"].createElement(_typography.Paragraph, null, "This is a paragraph inside a one-third wide column"))));
|
|
25
25
|
|
package/locales/el.d.ts
CHANGED
package/locales/el.js
CHANGED
|
@@ -35,6 +35,10 @@ var _default = {
|
|
|
35
35
|
invalid: 'Η ημερομηνία πρέπει να είναι έγκυρη.',
|
|
36
36
|
earlier_than: 'Συμπληρώστε μια ημερομηνία προγενέστερη της {{maxDate}}',
|
|
37
37
|
later_than: 'Συμπληρώστε μια ημερομηνία μεταγενέστερη της {{minDate}}'
|
|
38
|
+
},
|
|
39
|
+
otp: {
|
|
40
|
+
invalid: 'Ο κωδικός που έχετε εισάγει είναι λάθος.',
|
|
41
|
+
less_than: 'Έχετε συμπληρώσει λιγότερα από {{maxLength}} ψηφία.'
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "@digigov reusable components toolkit",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"clsx": "1.1.1",
|
|
21
21
|
"react": "^16.8.0 || ^17.0.0",
|
|
22
22
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
23
|
-
"@digigov/react-core": "0.
|
|
24
|
-
"@digigov/react-extensions": "0.
|
|
23
|
+
"@digigov/react-core": "0.23.0",
|
|
24
|
+
"@digigov/react-extensions": "0.21.2"
|
|
25
25
|
},
|
|
26
26
|
"gitHead": "c903a46306f77f55ad7fc4d2e274006f39a6c871",
|
|
27
27
|
"private": false,
|
package/registry.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare var _default: {
|
|
2
|
+
'@digigov/ui/admin/AccessibilityMenu': {};
|
|
2
3
|
'@digigov/ui/admin/AdminLayout': {};
|
|
3
4
|
'@digigov/ui/admin/AutoComplete': {};
|
|
4
5
|
'@digigov/ui/admin/AutoComplete/Status': {};
|
|
@@ -56,7 +57,8 @@ declare var _default: {
|
|
|
56
57
|
'@digigov/ui/app/QrCodeViewer/qrcodegen': {};
|
|
57
58
|
'@digigov/ui/app/QrCodeViewer/types': {};
|
|
58
59
|
'@digigov/ui/app/QrCodeViewer/utils': {};
|
|
59
|
-
'@digigov/ui/app/
|
|
60
|
+
'@digigov/ui/app/ThemeOptionsForm': {};
|
|
61
|
+
'@digigov/ui/app/ThemePaletteForm': {};
|
|
60
62
|
'@digigov/ui/core/Accordion': {};
|
|
61
63
|
'@digigov/ui/core/BackLink': {};
|
|
62
64
|
'@digigov/ui/core/Base': {};
|
|
@@ -94,15 +96,18 @@ declare var _default: {
|
|
|
94
96
|
'@digigov/ui/core/NavList': {};
|
|
95
97
|
'@digigov/ui/core/NavList/Nav': {};
|
|
96
98
|
'@digigov/ui/core/NavList/NavList': {};
|
|
97
|
-
'@digigov/ui/core/NavList/NavListAuto': {};
|
|
98
|
-
'@digigov/ui/core/NavList/
|
|
99
|
-
'@digigov/ui/core/NavList/
|
|
99
|
+
'@digigov/ui/core/NavList/NavListAuto/NavListAuto': {};
|
|
100
|
+
'@digigov/ui/core/NavList/NavListAuto/NavListBaseAuto': {};
|
|
101
|
+
'@digigov/ui/core/NavList/NavListAuto/NavListContextAuto': {};
|
|
102
|
+
'@digigov/ui/core/NavList/NavListAuto/NavListItemAnchorAuto': {};
|
|
103
|
+
'@digigov/ui/core/NavList/NavListAuto/NavListItemAuto': {};
|
|
104
|
+
'@digigov/ui/core/NavList/NavListAuto/NavListItemButtonAuto': {};
|
|
105
|
+
'@digigov/ui/core/NavList/NavListAuto/NavListMenuAuto': {};
|
|
106
|
+
'@digigov/ui/core/NavList/NavListAuto/NavListSubMenuAuto': {};
|
|
100
107
|
'@digigov/ui/core/NavList/NavListItem': {};
|
|
101
|
-
'@digigov/ui/core/NavList/NavListItemAuto': {};
|
|
102
108
|
'@digigov/ui/core/NavList/NavListItemBase': {};
|
|
103
109
|
'@digigov/ui/core/NavList/NavListItemButton': {};
|
|
104
110
|
'@digigov/ui/core/NavList/NavListItemLink': {};
|
|
105
|
-
'@digigov/ui/core/NavList/NavListSubMenu': {};
|
|
106
111
|
'@digigov/ui/core/NavList/NavMenu': {};
|
|
107
112
|
'@digigov/ui/core/NavList/NavMenuContainer': {};
|
|
108
113
|
'@digigov/ui/core/NavList/NavMenuContainerContent': {};
|
|
@@ -118,6 +123,7 @@ declare var _default: {
|
|
|
118
123
|
'@digigov/ui/core/SectionBreak': {};
|
|
119
124
|
'@digigov/ui/core/SelectContainer': {};
|
|
120
125
|
'@digigov/ui/core/ServiceBadge': {};
|
|
126
|
+
'@digigov/ui/core/SingleCharacterInputContainer': {};
|
|
121
127
|
'@digigov/ui/core/SkipLink': {};
|
|
122
128
|
'@digigov/ui/core/SummaryList': {};
|
|
123
129
|
'@digigov/ui/core/SvgIcon': {};
|
|
@@ -146,13 +152,19 @@ declare var _default: {
|
|
|
146
152
|
'@digigov/ui/govgr/images/minedu-logo-black-base64': {};
|
|
147
153
|
'@digigov/ui/govgr': {};
|
|
148
154
|
'@digigov/ui/hooks/useDebounce': {};
|
|
155
|
+
'@digigov/ui/hooks/useFontSize': {};
|
|
156
|
+
'@digigov/ui/hooks/useHighlightLinks': {};
|
|
149
157
|
'@digigov/ui/hooks/useKeypress': {};
|
|
150
158
|
'@digigov/ui/hooks/useLatest': {};
|
|
159
|
+
'@digigov/ui/hooks/useLetterSpacing': {};
|
|
160
|
+
'@digigov/ui/hooks/useLineHeight': {};
|
|
151
161
|
'@digigov/ui/hooks/useNavList': {};
|
|
152
162
|
'@digigov/ui/hooks/useOutdatedBrowserCheck': {};
|
|
153
163
|
'@digigov/ui/hooks/useSearch': {};
|
|
154
164
|
'@digigov/ui/hooks/useTheme': {};
|
|
155
|
-
'@digigov/ui/hooks/
|
|
165
|
+
'@digigov/ui/hooks/useTogglableNav': {};
|
|
166
|
+
'@digigov/ui/hooks/useTogglableTab': {};
|
|
167
|
+
'@digigov/ui/hooks/useVariantVars': {};
|
|
156
168
|
'@digigov/ui': {};
|
|
157
169
|
'@digigov/ui/layouts/Basic/Aside': {};
|
|
158
170
|
'@digigov/ui/layouts/Basic/Bottom': {};
|
|
@@ -224,6 +236,7 @@ export const stories: {
|
|
|
224
236
|
'@digigov/ui/core/PhaseBanner/PhaseBanner.stories': typeof _digigov_ui_core_PhaseBanner_PhaseBanner_stories;
|
|
225
237
|
'@digigov/ui/core/RadioContainer/RadioContainer.stories': typeof _digigov_ui_core_RadioContainer_RadioContainer_stories;
|
|
226
238
|
'@digigov/ui/core/SelectContainer/Select.stories': typeof _digigov_ui_core_SelectContainer_Select_stories;
|
|
239
|
+
'@digigov/ui/core/SingleCharacterInputContainer/SingleCharacterInputContainer.stories': typeof _digigov_ui_core_SingleCharacterInputContainer_SingleCharacterInputContainer_stories;
|
|
227
240
|
'@digigov/ui/core/SummaryList/SummaryList.stories': typeof _digigov_ui_core_SummaryList_SummaryList_stories;
|
|
228
241
|
'@digigov/ui/core/Table/Table.stories': typeof _digigov_ui_core_Table_Table_stories;
|
|
229
242
|
'@digigov/ui/core/Tabs/Tabs.stories': typeof _digigov_ui_core_Tabs_Tabs_stories;
|
|
@@ -277,6 +290,7 @@ import * as _digigov_ui_core_NotificationBanner_NotificationBanner_stories from
|
|
|
277
290
|
import * as _digigov_ui_core_PhaseBanner_PhaseBanner_stories from "@digigov/ui/core/PhaseBanner/PhaseBanner.stories";
|
|
278
291
|
import * as _digigov_ui_core_RadioContainer_RadioContainer_stories from "@digigov/ui/core/RadioContainer/RadioContainer.stories";
|
|
279
292
|
import * as _digigov_ui_core_SelectContainer_Select_stories from "@digigov/ui/core/SelectContainer/Select.stories";
|
|
293
|
+
import * as _digigov_ui_core_SingleCharacterInputContainer_SingleCharacterInputContainer_stories from "@digigov/ui/core/SingleCharacterInputContainer/SingleCharacterInputContainer.stories";
|
|
280
294
|
import * as _digigov_ui_core_SummaryList_SummaryList_stories from "@digigov/ui/core/SummaryList/SummaryList.stories";
|
|
281
295
|
import * as _digigov_ui_core_Table_Table_stories from "@digigov/ui/core/Table/Table.stories";
|
|
282
296
|
import * as _digigov_ui_core_Tabs_Tabs_stories from "@digigov/ui/core/Tabs/Tabs.stories";
|