@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,294 @@
|
|
|
1
|
+
import { useRef, useState, useCallback, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface UseTogglableNavInterface {
|
|
4
|
+
toggleProperty: string;
|
|
5
|
+
singleOpen?: boolean;
|
|
6
|
+
toggleOpenClose?: boolean;
|
|
7
|
+
toggleParentOpen?: boolean;
|
|
8
|
+
onToggleProperty: string;
|
|
9
|
+
initial?: Record<string, boolean>;
|
|
10
|
+
firstOpen?: boolean;
|
|
11
|
+
ariaNavigation?: boolean;
|
|
12
|
+
toggleHook?: (id: string) => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface UseTogglableNavReturn {
|
|
16
|
+
registerButton: (el: string) => any;
|
|
17
|
+
registerLink: (el: string) => any;
|
|
18
|
+
registered: { current: Record<string, { el: HTMLElement; type: string }> };
|
|
19
|
+
opened: Record<string, boolean>;
|
|
20
|
+
toggle: (id: string) => void;
|
|
21
|
+
setOpened: (
|
|
22
|
+
opened:
|
|
23
|
+
| ((curOpened: Record<string, boolean>) => Record<string, boolean>)
|
|
24
|
+
| Record<string, boolean>
|
|
25
|
+
) => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function useTogglableNav({
|
|
29
|
+
toggleProperty,
|
|
30
|
+
toggleOpenClose,
|
|
31
|
+
toggleParentOpen,
|
|
32
|
+
onToggleProperty,
|
|
33
|
+
initial,
|
|
34
|
+
ariaNavigation,
|
|
35
|
+
toggleHook,
|
|
36
|
+
}: UseTogglableNavInterface): UseTogglableNavReturn {
|
|
37
|
+
const [opened, setOpened] = useState(initial || {});
|
|
38
|
+
const registered = useRef<Record<string, { el: HTMLElement; type: string }>>(
|
|
39
|
+
{}
|
|
40
|
+
);
|
|
41
|
+
const openedKeys = useRef<string[]>([]);
|
|
42
|
+
|
|
43
|
+
const registerButtonRef = useCallback((el) => {
|
|
44
|
+
if (!el) return;
|
|
45
|
+
const key = el.getAttribute('aria-controls') as string;
|
|
46
|
+
if (registered.current[key]) return;
|
|
47
|
+
registered.current[key] = {
|
|
48
|
+
el,
|
|
49
|
+
type: 'button',
|
|
50
|
+
};
|
|
51
|
+
}, []);
|
|
52
|
+
|
|
53
|
+
const registerLinkRef = useCallback((el) => {
|
|
54
|
+
if (!el) return;
|
|
55
|
+
const key = el.getAttribute('aria-controls') as string;
|
|
56
|
+
if (registered.current[key]) return;
|
|
57
|
+
registered.current[key] = {
|
|
58
|
+
el,
|
|
59
|
+
type: 'link',
|
|
60
|
+
};
|
|
61
|
+
}, []);
|
|
62
|
+
|
|
63
|
+
const toggle = useCallback((e) => {
|
|
64
|
+
const key = e.currentTarget.getAttribute('aria-controls') as string;
|
|
65
|
+
const selected = ((e.currentTarget.getAttribute(
|
|
66
|
+
'aria-selected'
|
|
67
|
+
) as string) === 'true') as boolean;
|
|
68
|
+
if (toggleHook) {
|
|
69
|
+
toggleHook(key);
|
|
70
|
+
}
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
if (toggleOpenClose) {
|
|
73
|
+
if (toggleParentOpen) {
|
|
74
|
+
const items = key.split('__');
|
|
75
|
+
const currentKey = items.slice(0, items.length).join('__');
|
|
76
|
+
const totalKeys = items.map((_, index) => {
|
|
77
|
+
return items.slice(0, index + 1).join('__');
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
if (!selected && !openedKeys.current.includes(currentKey)) {
|
|
81
|
+
openedKeys.current.push(currentKey);
|
|
82
|
+
}
|
|
83
|
+
if (selected && openedKeys.current.includes(currentKey)) {
|
|
84
|
+
openedKeys.current = openedKeys.current.filter(
|
|
85
|
+
(k) => k !== currentKey
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
setOpened((_) => ({
|
|
90
|
+
...totalKeys.reduce((acc, cur) => {
|
|
91
|
+
acc[cur] = cur === currentKey ? !selected : true;
|
|
92
|
+
return acc;
|
|
93
|
+
}, {}),
|
|
94
|
+
}));
|
|
95
|
+
} else {
|
|
96
|
+
setOpened({ [key]: !selected });
|
|
97
|
+
}
|
|
98
|
+
} else {
|
|
99
|
+
setOpened({ [key]: true });
|
|
100
|
+
}
|
|
101
|
+
}, []);
|
|
102
|
+
|
|
103
|
+
const getMenuItems = (element) => {
|
|
104
|
+
if (element) {
|
|
105
|
+
if (element?.role === 'menuitem') {
|
|
106
|
+
return element;
|
|
107
|
+
} else {
|
|
108
|
+
const childrenArray = Array.from(element?.children);
|
|
109
|
+
let menuItemsArray: any[] = [];
|
|
110
|
+
childrenArray.forEach((child) => {
|
|
111
|
+
const menuItem = getMenuItems(child);
|
|
112
|
+
if (menuItem && !menuItemsArray.includes(menuItem)) {
|
|
113
|
+
menuItemsArray.push(menuItem);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
return menuItemsArray.flatMap((x) => x);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return null;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const findChildren = (parent, items) => {
|
|
123
|
+
return items
|
|
124
|
+
? items.filter(
|
|
125
|
+
(child) => child.slice(0, child.lastIndexOf('__')) === parent
|
|
126
|
+
)
|
|
127
|
+
: items;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const findParent = (child, items) => {
|
|
131
|
+
const parent = child.slice(0, child.lastIndexOf('__'));
|
|
132
|
+
return items.find((item) => item === parent) ? parent : null;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const findSiblings = (key, items) => {
|
|
136
|
+
const parent = key.slice(0, key.lastIndexOf('__'));
|
|
137
|
+
if (key.lastIndexOf('__') > 0) {
|
|
138
|
+
return items.filter(
|
|
139
|
+
(child) => child.slice(0, child.lastIndexOf('__')) === parent
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
return items.filter((child) => !child.includes('__'));
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const findLeftSibling = (key, items) => {
|
|
146
|
+
const siblings = findSiblings(key, items);
|
|
147
|
+
if (siblings.length > 0) {
|
|
148
|
+
const keyIndex = siblings.findIndex((item) => item === key);
|
|
149
|
+
return keyIndex > 0 ? siblings[keyIndex - 1] : null;
|
|
150
|
+
}
|
|
151
|
+
return null;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const findRightSibling = (key, items) => {
|
|
155
|
+
const siblings = findSiblings(key, items);
|
|
156
|
+
if (siblings.length > 0) {
|
|
157
|
+
const keyIndex = siblings.findIndex((item) => item === key);
|
|
158
|
+
return keyIndex < siblings.length - 1 ? siblings[keyIndex + 1] : null;
|
|
159
|
+
}
|
|
160
|
+
return null;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const getOpenItemChildren = (currentItem, items) => {
|
|
164
|
+
const itemChildrenArray: any[] = [];
|
|
165
|
+
const itemChildren = findChildren(currentItem, items);
|
|
166
|
+
itemChildren.forEach((item) => {
|
|
167
|
+
if (openedKeys.current.includes(item)) {
|
|
168
|
+
itemChildrenArray.push(item);
|
|
169
|
+
const internChildren = getOpenItemChildren(item, items);
|
|
170
|
+
if (internChildren.length > 0) {
|
|
171
|
+
itemChildrenArray.push(internChildren);
|
|
172
|
+
}
|
|
173
|
+
} else {
|
|
174
|
+
itemChildrenArray.push(item);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
return itemChildrenArray.flatMap((x) => x);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const onKeyDown = useCallback((e) => {
|
|
181
|
+
const orientation = document
|
|
182
|
+
.querySelector(`[aria-orientation]`)
|
|
183
|
+
?.getAttribute('aria-orientation');
|
|
184
|
+
const key = e.target.getAttribute('aria-controls');
|
|
185
|
+
const keys = Object.entries(registered.current).map(
|
|
186
|
+
([entryKey, _]) => entryKey
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
const handleArrowRight = () => {
|
|
190
|
+
const arrowRightItem = findRightSibling(key, keys);
|
|
191
|
+
if (arrowRightItem) {
|
|
192
|
+
registered.current[arrowRightItem].el.focus();
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
const handleArrowLeft = () => {
|
|
197
|
+
const arrowLeftItem = findLeftSibling(key, keys);
|
|
198
|
+
if (arrowLeftItem) {
|
|
199
|
+
registered.current[arrowLeftItem].el.focus();
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
switch (e.key) {
|
|
204
|
+
case 'ArrowRight':
|
|
205
|
+
handleArrowRight();
|
|
206
|
+
break;
|
|
207
|
+
case 'ArrowDown':
|
|
208
|
+
const openItem = getOpenItemChildren(key, keys);
|
|
209
|
+
const arrowDownItems = findChildren(key, openItem);
|
|
210
|
+
const menuItems = getMenuItems(document.getElementById(key));
|
|
211
|
+
|
|
212
|
+
if (arrowDownItems.length > 0) {
|
|
213
|
+
registered.current[arrowDownItems[0]].el.focus();
|
|
214
|
+
} else {
|
|
215
|
+
if (orientation === 'vertical') {
|
|
216
|
+
if (
|
|
217
|
+
document.activeElement?.getAttribute('aria-selected') ===
|
|
218
|
+
'true' &&
|
|
219
|
+
menuItems &&
|
|
220
|
+
menuItems.length > 0
|
|
221
|
+
) {
|
|
222
|
+
menuItems[0].focus();
|
|
223
|
+
} else {
|
|
224
|
+
handleArrowRight();
|
|
225
|
+
}
|
|
226
|
+
} else {
|
|
227
|
+
if (menuItems && menuItems.length > 0) {
|
|
228
|
+
menuItems[0].focus();
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
break;
|
|
234
|
+
case 'ArrowLeft':
|
|
235
|
+
handleArrowLeft();
|
|
236
|
+
break;
|
|
237
|
+
case 'ArrowUp':
|
|
238
|
+
if (orientation === 'vertical') {
|
|
239
|
+
handleArrowLeft();
|
|
240
|
+
} else {
|
|
241
|
+
const arrowUpItem = findParent(key, keys);
|
|
242
|
+
if (arrowUpItem) {
|
|
243
|
+
registered.current[arrowUpItem].el.focus();
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
break;
|
|
247
|
+
case ' ':
|
|
248
|
+
case 'Enter':
|
|
249
|
+
if (registered.current[key].type === 'link') {
|
|
250
|
+
registered.current[key].el.click();
|
|
251
|
+
} else {
|
|
252
|
+
toggle(e);
|
|
253
|
+
}
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
}, []);
|
|
257
|
+
|
|
258
|
+
const registerButton = useCallback(
|
|
259
|
+
(key) => {
|
|
260
|
+
const isOpen = !!opened[key];
|
|
261
|
+
return {
|
|
262
|
+
ref: registerButtonRef,
|
|
263
|
+
[toggleProperty]: isOpen,
|
|
264
|
+
[onToggleProperty]: toggle,
|
|
265
|
+
'aria-controls': `${key}`,
|
|
266
|
+
...(ariaNavigation && { onKeyDown }),
|
|
267
|
+
};
|
|
268
|
+
},
|
|
269
|
+
[opened]
|
|
270
|
+
);
|
|
271
|
+
|
|
272
|
+
const registerLink = useCallback(
|
|
273
|
+
(key) => {
|
|
274
|
+
return {
|
|
275
|
+
ref: registerLinkRef,
|
|
276
|
+
'aria-controls': `${key}`,
|
|
277
|
+
...(ariaNavigation && { onKeyDown }),
|
|
278
|
+
};
|
|
279
|
+
},
|
|
280
|
+
[opened]
|
|
281
|
+
);
|
|
282
|
+
|
|
283
|
+
return useMemo(
|
|
284
|
+
() => ({
|
|
285
|
+
registerButton,
|
|
286
|
+
registerLink,
|
|
287
|
+
registered,
|
|
288
|
+
opened,
|
|
289
|
+
toggle,
|
|
290
|
+
setOpened,
|
|
291
|
+
}),
|
|
292
|
+
[opened]
|
|
293
|
+
);
|
|
294
|
+
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2
2
|
import { useRef, useState, useCallback, useMemo } from 'react';
|
|
3
3
|
|
|
4
|
-
export interface
|
|
4
|
+
export interface UseTogglableTabInterface {
|
|
5
5
|
toggleProperty: string;
|
|
6
6
|
singleOpen?: boolean;
|
|
7
7
|
toggleOpenClose?: boolean;
|
|
8
|
+
toggleParentOpen?: boolean;
|
|
8
9
|
onToggleProperty: string;
|
|
9
10
|
initial?: Record<string, boolean>;
|
|
10
11
|
firstOpen?: boolean;
|
|
11
12
|
ariaNavigation?: boolean;
|
|
12
13
|
toggleHook?: (id: string) => void;
|
|
13
14
|
}
|
|
14
|
-
export interface
|
|
15
|
+
export interface UseTogglableTabReturn {
|
|
15
16
|
register: (el: string) => any;
|
|
16
17
|
registered: { current: Record<string, HTMLElement> };
|
|
17
18
|
opened: Record<string, boolean>;
|
|
@@ -22,19 +23,20 @@ export interface UseTogglableSectionsReturn {
|
|
|
22
23
|
| Record<string, boolean>
|
|
23
24
|
) => void;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
|
|
27
|
+
export function useTogglableTab({
|
|
26
28
|
toggleProperty,
|
|
27
29
|
singleOpen,
|
|
28
|
-
toggleOpenClose,
|
|
29
30
|
onToggleProperty,
|
|
30
31
|
initial,
|
|
31
32
|
firstOpen,
|
|
32
33
|
ariaNavigation,
|
|
33
34
|
toggleHook,
|
|
34
|
-
}:
|
|
35
|
+
}: UseTogglableTabInterface): UseTogglableTabReturn {
|
|
35
36
|
const [opened, setOpened] = useState(initial || {});
|
|
36
37
|
const registered = useRef<Record<string, HTMLElement>>({});
|
|
37
38
|
const sectionsOrder = useRef<string[]>([]);
|
|
39
|
+
|
|
38
40
|
const registerRef = useCallback((el) => {
|
|
39
41
|
if (!el) return;
|
|
40
42
|
const key = el.getAttribute('aria-controls') as string;
|
|
@@ -47,25 +49,20 @@ export function useTogglableSections({
|
|
|
47
49
|
});
|
|
48
50
|
}
|
|
49
51
|
}, []);
|
|
52
|
+
|
|
50
53
|
const toggle = useCallback((e) => {
|
|
51
54
|
const key = e.currentTarget.getAttribute('aria-controls') as string;
|
|
52
|
-
const selected = ((e.currentTarget.getAttribute(
|
|
53
|
-
'aria-selected'
|
|
54
|
-
) as string) === 'true') as boolean;
|
|
55
55
|
if (toggleHook) {
|
|
56
56
|
toggleHook(key);
|
|
57
57
|
}
|
|
58
58
|
e.preventDefault();
|
|
59
59
|
if (singleOpen) {
|
|
60
|
-
|
|
61
|
-
setOpened({ [key]: !selected });
|
|
62
|
-
} else {
|
|
63
|
-
setOpened({ [key]: true });
|
|
64
|
-
}
|
|
60
|
+
setOpened({ [key]: true });
|
|
65
61
|
} else {
|
|
66
62
|
setOpened((prev) => ({ ...prev, [key]: !prev[key] }));
|
|
67
63
|
}
|
|
68
64
|
}, []);
|
|
65
|
+
|
|
69
66
|
const onKeyDown = useCallback((e) => {
|
|
70
67
|
const key = e.target.getAttribute('aria-controls');
|
|
71
68
|
const currentIndex = sectionsOrder.current.findIndex((k) => k === key);
|
|
@@ -90,6 +87,7 @@ export function useTogglableSections({
|
|
|
90
87
|
break;
|
|
91
88
|
}
|
|
92
89
|
}, []);
|
|
90
|
+
|
|
93
91
|
const register = useCallback(
|
|
94
92
|
(key) => {
|
|
95
93
|
const isOpen = !!opened[key];
|
|
@@ -103,6 +101,7 @@ export function useTogglableSections({
|
|
|
103
101
|
},
|
|
104
102
|
[opened]
|
|
105
103
|
);
|
|
104
|
+
|
|
106
105
|
return useMemo(
|
|
107
106
|
() => ({
|
|
108
107
|
register,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface VariantVarsOptions {
|
|
4
|
+
name: string;
|
|
5
|
+
variables: string[];
|
|
6
|
+
variants: string[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type UseVariantVarsResult<T> = [
|
|
10
|
+
value: T,
|
|
11
|
+
changeValue: (value: T) => void
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
function useVariantVars({
|
|
15
|
+
name,
|
|
16
|
+
variables,
|
|
17
|
+
variants,
|
|
18
|
+
}: VariantVarsOptions): UseVariantVarsResult<any> {
|
|
19
|
+
const root = document.documentElement;
|
|
20
|
+
const storedValue = localStorage.getItem(`--theme-${name}`);
|
|
21
|
+
const [value, setValue] = useState(storedValue || variants[0]);
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
localStorage.setItem(`--theme-${name}`, value);
|
|
25
|
+
variables.forEach((varName) => {
|
|
26
|
+
root.style.setProperty(`--${varName}`, `var(--${varName}-${value})`);
|
|
27
|
+
});
|
|
28
|
+
}, [value]);
|
|
29
|
+
function changeValue(v: string) {
|
|
30
|
+
setValue(v);
|
|
31
|
+
}
|
|
32
|
+
return [value, changeValue];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default useVariantVars;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Layout } from '@digigov/ui/layouts/Basic';
|
|
3
|
-
import {
|
|
3
|
+
import { Container } from '@digigov/ui/layouts/Basic/Container';
|
|
4
4
|
import { Main } from '@digigov/ui/layouts/Basic/Main';
|
|
5
5
|
import { Heading, Paragraph } from '@digigov/ui/typography';
|
|
6
6
|
export const Default = () => (
|
|
7
7
|
<Layout>
|
|
8
|
-
<
|
|
8
|
+
<Container>
|
|
9
9
|
<Main>
|
|
10
10
|
<Heading>Two-thirds column</Heading>
|
|
11
11
|
<Paragraph>
|
|
12
12
|
This is a paragraph inside a two-thirds wide column
|
|
13
13
|
</Paragraph>
|
|
14
14
|
</Main>
|
|
15
|
-
</
|
|
15
|
+
</Container>
|
|
16
16
|
</Layout>
|
|
17
17
|
);
|
|
18
18
|
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Layout } from '@digigov/ui/layouts/Basic';
|
|
3
|
-
import {
|
|
3
|
+
import { Container } from '@digigov/ui/layouts/Basic/Container';
|
|
4
4
|
import { Main } from '@digigov/ui/layouts/Basic/Main';
|
|
5
|
-
import {
|
|
5
|
+
import { Aside } from '@digigov/ui/layouts/Basic/Aside';
|
|
6
6
|
import { Heading, Paragraph } from '@digigov/ui/typography';
|
|
7
7
|
export const MultipleRowsLayout = () => (
|
|
8
8
|
<Layout>
|
|
9
|
-
<
|
|
9
|
+
<Container>
|
|
10
10
|
<Main>
|
|
11
11
|
<Heading>Two-thirds column</Heading>
|
|
12
12
|
<Paragraph>
|
|
13
13
|
This is a paragraph inside a two-thirds wide column
|
|
14
14
|
</Paragraph>
|
|
15
15
|
</Main>
|
|
16
|
-
</
|
|
17
|
-
<
|
|
16
|
+
</Container>
|
|
17
|
+
<Container>
|
|
18
18
|
<Main>
|
|
19
19
|
<Heading>Two-thirds column</Heading>
|
|
20
20
|
<Paragraph>
|
|
21
21
|
This is a paragraph inside a two-thirds wide column
|
|
22
22
|
</Paragraph>
|
|
23
23
|
</Main>
|
|
24
|
-
<
|
|
24
|
+
<Aside>
|
|
25
25
|
<Heading size="m">One-third-column</Heading>
|
|
26
26
|
<Paragraph>
|
|
27
27
|
This is a paragraph inside a one-third wide column
|
|
28
28
|
</Paragraph>
|
|
29
|
-
</
|
|
30
|
-
</
|
|
29
|
+
</Aside>
|
|
30
|
+
</Container>
|
|
31
31
|
</Layout>
|
|
32
32
|
);
|
|
33
33
|
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Layout } from '@digigov/ui/layouts/Basic';
|
|
3
|
-
import {
|
|
3
|
+
import { Container } from '@digigov/ui/layouts/Basic/Container';
|
|
4
4
|
import { Main } from '@digigov/ui/layouts/Basic/Main';
|
|
5
|
-
import {
|
|
5
|
+
import { Aside } from '@digigov/ui/layouts/Basic/Aside';
|
|
6
6
|
import { Heading, Paragraph } from '@digigov/ui/typography';
|
|
7
7
|
export const TwoThirdsOneThirdColumns = () => (
|
|
8
8
|
<Layout>
|
|
9
|
-
<
|
|
9
|
+
<Container>
|
|
10
10
|
<Main>
|
|
11
11
|
<Heading>Two-thirds column</Heading>
|
|
12
12
|
<Paragraph>
|
|
13
13
|
This is a paragraph inside a two-thirds wide column
|
|
14
14
|
</Paragraph>
|
|
15
15
|
</Main>
|
|
16
|
-
<
|
|
16
|
+
<Aside>
|
|
17
17
|
<Heading size="m">One-third-column</Heading>
|
|
18
18
|
<Paragraph>
|
|
19
19
|
This is a paragraph inside a one-third wide column
|
|
20
20
|
</Paragraph>
|
|
21
|
-
</
|
|
22
|
-
</
|
|
21
|
+
</Aside>
|
|
22
|
+
</Container>
|
|
23
23
|
</Layout>
|
|
24
24
|
);
|
|
25
25
|
|
package/src/locales/el.ts
CHANGED
|
@@ -33,6 +33,10 @@ export default {
|
|
|
33
33
|
earlier_than: 'Συμπληρώστε μια ημερομηνία προγενέστερη της {{maxDate}}',
|
|
34
34
|
later_than: 'Συμπληρώστε μια ημερομηνία μεταγενέστερη της {{minDate}}',
|
|
35
35
|
},
|
|
36
|
+
otp: {
|
|
37
|
+
invalid: 'Ο κωδικός που έχετε εισάγει είναι λάθος.',
|
|
38
|
+
less_than: 'Έχετε συμπληρώσει λιγότερα από {{maxLength}} ψηφία.',
|
|
39
|
+
},
|
|
36
40
|
},
|
|
37
41
|
},
|
|
38
42
|
button: {
|