@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
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { NavListAuto, NavListItem, NavMenu, NavMenuContainer, NavMenuContainerContent, NavMenuContainerContentList, NavMenuContainerContentListItem, NavMenuContainerTitle, isNavListItemLinkInterface } from '@digigov/ui/core/NavList';
|
|
4
|
-
import { useNavList } from '@digigov/ui/hooks/useNavList';
|
|
5
|
-
import { Link } from '@digigov/ui/core';
|
|
6
|
-
var LANG = 'el';
|
|
7
|
-
var DEFAULT_HREF_FLAG = true;
|
|
8
|
-
var epathlaLinks = [{
|
|
9
|
-
name: 'index',
|
|
10
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG),
|
|
11
|
-
label: 'Αρχική'
|
|
12
|
-
}, {
|
|
13
|
-
name: 'epathla',
|
|
14
|
-
label: 'Ε.Π.ΑΘΛ.Α',
|
|
15
|
-
subMenu: [{
|
|
16
|
-
name: 'epathla/aim',
|
|
17
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/epathla/aim"),
|
|
18
|
-
label: 'Σκοπός'
|
|
19
|
-
}, {
|
|
20
|
-
name: 'epathla/structure',
|
|
21
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/epathla/structure"),
|
|
22
|
-
label: 'Δομή'
|
|
23
|
-
}, {
|
|
24
|
-
name: 'epathla/members',
|
|
25
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/epathla/members"),
|
|
26
|
-
label: 'Συγκρότηση'
|
|
27
|
-
}, {
|
|
28
|
-
name: 'epathla/wording-groups',
|
|
29
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/epathla/working-groups"),
|
|
30
|
-
label: 'Ομάδες εργασίας'
|
|
31
|
-
}]
|
|
32
|
-
}, {
|
|
33
|
-
name: 'sport-manipulation',
|
|
34
|
-
label: 'Χειραγώγηση Αγώνων',
|
|
35
|
-
subMenu: [{
|
|
36
|
-
name: 'sport-manipulation/macolin',
|
|
37
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/sport-manipulation/macolin"),
|
|
38
|
-
label: 'Σύμβαση Macolin'
|
|
39
|
-
}, {
|
|
40
|
-
name: 'sport-manipulation/terminology',
|
|
41
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/sport-manipulation/terminology"),
|
|
42
|
-
label: 'Ορολογία'
|
|
43
|
-
}, {
|
|
44
|
-
name: 'sport-manipulation/typology',
|
|
45
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/sport-manipulation/typology"),
|
|
46
|
-
label: 'Τυπολογία'
|
|
47
|
-
}, {
|
|
48
|
-
name: 'sport-manipulation/law',
|
|
49
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/sport-manipulation/law"),
|
|
50
|
-
label: 'Νομοθεσία'
|
|
51
|
-
}, {
|
|
52
|
-
name: 'sport-manipulation/documents',
|
|
53
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/sport-manipulation/documents"),
|
|
54
|
-
label: 'Κείμενα αναφοράς διεθνών οργανισμών'
|
|
55
|
-
}]
|
|
56
|
-
}, {
|
|
57
|
-
name: 'educational-material',
|
|
58
|
-
label: 'Εκπαιδευτικό υλικό',
|
|
59
|
-
subMenu: [{
|
|
60
|
-
name: 'educational-material/videos',
|
|
61
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/educational-material/videos"),
|
|
62
|
-
label: 'Βίντεο'
|
|
63
|
-
}, {
|
|
64
|
-
name: 'educational-material/presentations',
|
|
65
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/educational-material/presentations"),
|
|
66
|
-
label: 'Παρουσιάσεις'
|
|
67
|
-
}, {
|
|
68
|
-
name: 'educational-material/other-texts',
|
|
69
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/educational-material/other-texts"),
|
|
70
|
-
label: 'Άλλα κείμενα'
|
|
71
|
-
}]
|
|
72
|
-
}, {
|
|
73
|
-
name: 'news',
|
|
74
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/news"),
|
|
75
|
-
label: 'Νέα'
|
|
76
|
-
}, {
|
|
77
|
-
name: 'send-report',
|
|
78
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/send-report"),
|
|
79
|
-
label: 'Προστάτεψε το άθλημά σου'
|
|
80
|
-
}, {
|
|
81
|
-
name: 'links',
|
|
82
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/links"),
|
|
83
|
-
label: 'Σύνδεσμοι'
|
|
84
|
-
}, {
|
|
85
|
-
name: 'contact',
|
|
86
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/contact"),
|
|
87
|
-
label: 'Επικοινωνία'
|
|
88
|
-
}];
|
|
89
|
-
export var NavListEpathlaExample = function NavListEpathlaExample() {
|
|
90
|
-
var _useNavList = useNavList(),
|
|
91
|
-
container = _useNavList.container,
|
|
92
|
-
register = _useNavList.register;
|
|
93
|
-
|
|
94
|
-
var setRegister = function setRegister(name) {
|
|
95
|
-
return _extends({}, register(name));
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NavListAuto, {
|
|
99
|
-
layout: 'horizontal',
|
|
100
|
-
links: epathlaLinks,
|
|
101
|
-
"aria-label": "Nav list",
|
|
102
|
-
role: "menu"
|
|
103
|
-
}, epathlaLinks.map(function (item, key) {
|
|
104
|
-
var _item$subMenu;
|
|
105
|
-
|
|
106
|
-
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
107
|
-
key: key
|
|
108
|
-
}, /*#__PURE__*/React.createElement(NavListItem, {
|
|
109
|
-
link: item,
|
|
110
|
-
setRegister: setRegister
|
|
111
|
-
}), /*#__PURE__*/React.createElement(NavMenu, container(item.name), /*#__PURE__*/React.createElement(NavMenuContainer, {
|
|
112
|
-
paddingLeft: 5,
|
|
113
|
-
paddingRight: 5
|
|
114
|
-
}, /*#__PURE__*/React.createElement(NavMenuContainerTitle, null, item.label), /*#__PURE__*/React.createElement(NavMenuContainerContent, null, /*#__PURE__*/React.createElement(NavMenuContainerContentList, null, (_item$subMenu = item.subMenu) === null || _item$subMenu === void 0 ? void 0 : _item$subMenu.map(function (subMenu, menuIndex) {
|
|
115
|
-
return isNavListItemLinkInterface(subMenu) && /*#__PURE__*/React.createElement(NavMenuContainerContentListItem, {
|
|
116
|
-
key: menuIndex
|
|
117
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
118
|
-
href: subMenu.href
|
|
119
|
-
}, subMenu.label));
|
|
120
|
-
}))))));
|
|
121
|
-
})));
|
|
122
|
-
};
|
|
123
|
-
export default NavListEpathlaExample;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["item", "children", "role"];
|
|
4
|
-
import React, { useContext } from 'react';
|
|
5
|
-
import Divider from '@digigov/react-core/SectionBreak';
|
|
6
|
-
import NavListItemBase from '@digigov/ui/core/NavList/NavListItemBase';
|
|
7
|
-
import NavListSubMenu from '@digigov/ui/core/NavList/NavListSubMenu';
|
|
8
|
-
import NavListContext from '@digigov/ui/core/NavList/NavListContext';
|
|
9
|
-
|
|
10
|
-
var _ref3 = /*#__PURE__*/React.createElement(Divider, null);
|
|
11
|
-
|
|
12
|
-
export var NavListItemAuto = function NavListItemAuto(_ref) {
|
|
13
|
-
var item = _ref.item,
|
|
14
|
-
children = _ref.children,
|
|
15
|
-
role = _ref.role,
|
|
16
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
-
|
|
18
|
-
var _useContext = useContext(NavListContext),
|
|
19
|
-
layout = _useContext.layout,
|
|
20
|
-
showDividers = _useContext.showDividers,
|
|
21
|
-
links = _useContext.links,
|
|
22
|
-
container = _useContext.container,
|
|
23
|
-
setRegister = _useContext.setRegister;
|
|
24
|
-
|
|
25
|
-
var _ref2 = links.find(function (link) {
|
|
26
|
-
return link.name === item.name;
|
|
27
|
-
}) || {},
|
|
28
|
-
subMenu = _ref2.subMenu;
|
|
29
|
-
|
|
30
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NavListItemBase, _extends({
|
|
31
|
-
container: container,
|
|
32
|
-
setRegister: setRegister,
|
|
33
|
-
item: item,
|
|
34
|
-
layout: layout,
|
|
35
|
-
role: role
|
|
36
|
-
}, props), subMenu && (subMenu === null || subMenu === void 0 ? void 0 : subMenu.length) > 0 && /*#__PURE__*/React.createElement(NavListSubMenu, {
|
|
37
|
-
links: subMenu
|
|
38
|
-
})), showDividers && _ref3);
|
|
39
|
-
};
|
|
40
|
-
export default NavListItemAuto;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["links"];
|
|
4
|
-
import React, { useContext } from 'react';
|
|
5
|
-
import { NavListBase } from '@digigov/ui/core/NavList/NavListBase';
|
|
6
|
-
import NavListItemBase from '@digigov/ui/core/NavList/NavListItemBase';
|
|
7
|
-
import NavListContext from '@digigov/ui/core/NavList/NavListContext';
|
|
8
|
-
export var NavListSubMenu = function NavListSubMenu(_ref) {
|
|
9
|
-
var links = _ref.links,
|
|
10
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
|
-
|
|
12
|
-
var _useContext = useContext(NavListContext),
|
|
13
|
-
layout = _useContext.layout;
|
|
14
|
-
|
|
15
|
-
return /*#__PURE__*/React.createElement(NavListBase, _extends({
|
|
16
|
-
subMenu: true,
|
|
17
|
-
floating: layout === 'horizontal'
|
|
18
|
-
}, props), links && links.map(function (subMenuLink, key) {
|
|
19
|
-
return /*#__PURE__*/React.createElement(NavListItemBase, {
|
|
20
|
-
key: key,
|
|
21
|
-
item: subMenuLink
|
|
22
|
-
});
|
|
23
|
-
}));
|
|
24
|
-
};
|
|
25
|
-
export default NavListSubMenu;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { NavListAuto, NavListItemAuto } from '@digigov/ui/core/NavList';
|
|
3
|
-
var links = [{
|
|
4
|
-
name: 'Nav1',
|
|
5
|
-
href: '#',
|
|
6
|
-
label: 'Nav list item 1'
|
|
7
|
-
}, {
|
|
8
|
-
name: 'Nav2',
|
|
9
|
-
href: '#',
|
|
10
|
-
label: 'Nav list item 2',
|
|
11
|
-
subMenu: [{
|
|
12
|
-
name: 'Nav2.1',
|
|
13
|
-
href: '#',
|
|
14
|
-
label: 'Nav list item 2.1'
|
|
15
|
-
}, {
|
|
16
|
-
name: 'Nav2.2',
|
|
17
|
-
href: '#',
|
|
18
|
-
label: 'Nav list item 2.2'
|
|
19
|
-
}, {
|
|
20
|
-
name: 'Nav2.3',
|
|
21
|
-
href: '#',
|
|
22
|
-
label: 'Nav list item 2.3'
|
|
23
|
-
}, {
|
|
24
|
-
name: 'Nav2.4',
|
|
25
|
-
href: '#',
|
|
26
|
-
label: 'Nav list item 2.4'
|
|
27
|
-
}]
|
|
28
|
-
}, {
|
|
29
|
-
name: 'Nav3',
|
|
30
|
-
href: '#',
|
|
31
|
-
label: 'Nav list item 3'
|
|
32
|
-
}];
|
|
33
|
-
export var NavListAutoExample = function NavListAutoExample() {
|
|
34
|
-
var layout = 'horizontal';
|
|
35
|
-
return /*#__PURE__*/React.createElement(NavListAuto, {
|
|
36
|
-
layout: layout,
|
|
37
|
-
links: links,
|
|
38
|
-
"aria-label": "Nav list",
|
|
39
|
-
role: "menu"
|
|
40
|
-
}, links.map(function (item, key) {
|
|
41
|
-
return /*#__PURE__*/React.createElement(NavListItemAuto, {
|
|
42
|
-
key: key,
|
|
43
|
-
item: item,
|
|
44
|
-
role: "menuitem"
|
|
45
|
-
});
|
|
46
|
-
}));
|
|
47
|
-
};
|
|
48
|
-
export default NavListAutoExample;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { NavListAuto, NavListItem, NavMenu, NavMenuContainer, NavMenuContainerContent, NavMenuContainerContentList, NavMenuContainerContentListItem, NavMenuContainerTitle, isNavListItemLinkInterface } from '@digigov/ui/core/NavList';
|
|
4
|
-
import { useNavList } from '@digigov/ui/hooks/useNavList';
|
|
5
|
-
import { Link } from '@digigov/ui/core';
|
|
6
|
-
var LANG = 'el';
|
|
7
|
-
var DEFAULT_HREF_FLAG = true;
|
|
8
|
-
var epathlaLinks = [{
|
|
9
|
-
name: 'index',
|
|
10
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG),
|
|
11
|
-
label: 'Αρχική'
|
|
12
|
-
}, {
|
|
13
|
-
name: 'epathla',
|
|
14
|
-
label: 'Ε.Π.ΑΘΛ.Α',
|
|
15
|
-
subMenu: [{
|
|
16
|
-
name: 'epathla/aim',
|
|
17
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/epathla/aim"),
|
|
18
|
-
label: 'Σκοπός'
|
|
19
|
-
}, {
|
|
20
|
-
name: 'epathla/structure',
|
|
21
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/epathla/structure"),
|
|
22
|
-
label: 'Δομή'
|
|
23
|
-
}, {
|
|
24
|
-
name: 'epathla/members',
|
|
25
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/epathla/members"),
|
|
26
|
-
label: 'Συγκρότηση'
|
|
27
|
-
}, {
|
|
28
|
-
name: 'epathla/wording-groups',
|
|
29
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/epathla/working-groups"),
|
|
30
|
-
label: 'Ομάδες εργασίας'
|
|
31
|
-
}]
|
|
32
|
-
}, {
|
|
33
|
-
name: 'sport-manipulation',
|
|
34
|
-
label: 'Χειραγώγηση Αγώνων',
|
|
35
|
-
subMenu: [{
|
|
36
|
-
name: 'sport-manipulation/macolin',
|
|
37
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/sport-manipulation/macolin"),
|
|
38
|
-
label: 'Σύμβαση Macolin'
|
|
39
|
-
}, {
|
|
40
|
-
name: 'sport-manipulation/terminology',
|
|
41
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/sport-manipulation/terminology"),
|
|
42
|
-
label: 'Ορολογία'
|
|
43
|
-
}, {
|
|
44
|
-
name: 'sport-manipulation/typology',
|
|
45
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/sport-manipulation/typology"),
|
|
46
|
-
label: 'Τυπολογία'
|
|
47
|
-
}, {
|
|
48
|
-
name: 'sport-manipulation/law',
|
|
49
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/sport-manipulation/law"),
|
|
50
|
-
label: 'Νομοθεσία'
|
|
51
|
-
}, {
|
|
52
|
-
name: 'sport-manipulation/documents',
|
|
53
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/sport-manipulation/documents"),
|
|
54
|
-
label: 'Κείμενα αναφοράς διεθνών οργανισμών'
|
|
55
|
-
}]
|
|
56
|
-
}, {
|
|
57
|
-
name: 'educational-material',
|
|
58
|
-
label: 'Εκπαιδευτικό υλικό',
|
|
59
|
-
subMenu: [{
|
|
60
|
-
name: 'educational-material/videos',
|
|
61
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/educational-material/videos"),
|
|
62
|
-
label: 'Βίντεο'
|
|
63
|
-
}, {
|
|
64
|
-
name: 'educational-material/presentations',
|
|
65
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/educational-material/presentations"),
|
|
66
|
-
label: 'Παρουσιάσεις'
|
|
67
|
-
}, {
|
|
68
|
-
name: 'educational-material/other-texts',
|
|
69
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/educational-material/other-texts"),
|
|
70
|
-
label: 'Άλλα κείμενα'
|
|
71
|
-
}]
|
|
72
|
-
}, {
|
|
73
|
-
name: 'news',
|
|
74
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/news"),
|
|
75
|
-
label: 'Νέα'
|
|
76
|
-
}, {
|
|
77
|
-
name: 'send-report',
|
|
78
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/send-report"),
|
|
79
|
-
label: 'Προστάτεψε το άθλημά σου'
|
|
80
|
-
}, {
|
|
81
|
-
name: 'links',
|
|
82
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/links"),
|
|
83
|
-
label: 'Σύνδεσμοι'
|
|
84
|
-
}, {
|
|
85
|
-
name: 'contact',
|
|
86
|
-
href: DEFAULT_HREF_FLAG ? '#' : "/".concat(LANG, "/contact"),
|
|
87
|
-
label: 'Επικοινωνία'
|
|
88
|
-
}];
|
|
89
|
-
export var NavListEpathlaExample = function NavListEpathlaExample() {
|
|
90
|
-
var _useNavList = useNavList(),
|
|
91
|
-
container = _useNavList.container,
|
|
92
|
-
register = _useNavList.register;
|
|
93
|
-
|
|
94
|
-
var setRegister = function setRegister(name) {
|
|
95
|
-
return _extends({}, register(name));
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NavListAuto, {
|
|
99
|
-
layout: 'horizontal',
|
|
100
|
-
links: epathlaLinks,
|
|
101
|
-
"aria-label": "Nav list",
|
|
102
|
-
role: "menu"
|
|
103
|
-
}, epathlaLinks.map(function (item, key) {
|
|
104
|
-
var _item$subMenu;
|
|
105
|
-
|
|
106
|
-
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
107
|
-
key: key
|
|
108
|
-
}, /*#__PURE__*/React.createElement(NavListItem, {
|
|
109
|
-
link: item,
|
|
110
|
-
setRegister: setRegister
|
|
111
|
-
}), /*#__PURE__*/React.createElement(NavMenu, container(item.name), /*#__PURE__*/React.createElement(NavMenuContainer, {
|
|
112
|
-
paddingLeft: 5,
|
|
113
|
-
paddingRight: 5
|
|
114
|
-
}, /*#__PURE__*/React.createElement(NavMenuContainerTitle, null, item.label), /*#__PURE__*/React.createElement(NavMenuContainerContent, null, /*#__PURE__*/React.createElement(NavMenuContainerContentList, null, (_item$subMenu = item.subMenu) === null || _item$subMenu === void 0 ? void 0 : _item$subMenu.map(function (subMenu, menuIndex) {
|
|
115
|
-
return isNavListItemLinkInterface(subMenu) && /*#__PURE__*/React.createElement(NavMenuContainerContentListItem, {
|
|
116
|
-
key: menuIndex
|
|
117
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
118
|
-
href: subMenu.href
|
|
119
|
-
}, subMenu.label));
|
|
120
|
-
}))))));
|
|
121
|
-
})));
|
|
122
|
-
};
|
|
123
|
-
export default NavListEpathlaExample;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { NavListProvider } from '@digigov/ui/core/NavList/NavListContext';
|
|
3
|
-
import { NavListAutoProps } from '@digigov/ui/core/NavList/types';
|
|
4
|
-
import { NavListBase } from '@digigov/ui/core/NavList/NavListBase';
|
|
5
|
-
|
|
6
|
-
export const NavListAuto: React.FC<NavListAutoProps> = ({
|
|
7
|
-
layout,
|
|
8
|
-
openSubMenus = false,
|
|
9
|
-
links = [],
|
|
10
|
-
role,
|
|
11
|
-
...props
|
|
12
|
-
}) => {
|
|
13
|
-
return (
|
|
14
|
-
<NavListProvider openSubMenus={openSubMenus} layout={layout} links={links}>
|
|
15
|
-
<NavListBase layout={layout} role={role} {...props} />
|
|
16
|
-
</NavListProvider>
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export default NavListAuto;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react';
|
|
2
|
-
import Divider from '@digigov/react-core/SectionBreak';
|
|
3
|
-
import NavListItemBase from '@digigov/ui/core/NavList/NavListItemBase';
|
|
4
|
-
import NavListSubMenu from '@digigov/ui/core/NavList/NavListSubMenu';
|
|
5
|
-
import NavListContext from '@digigov/ui/core/NavList/NavListContext';
|
|
6
|
-
|
|
7
|
-
export interface NavListItemAutoProps {
|
|
8
|
-
item?: any;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
role?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const NavListItemAuto: React.FC<NavListItemAutoProps> = ({
|
|
14
|
-
item,
|
|
15
|
-
children,
|
|
16
|
-
role,
|
|
17
|
-
...props
|
|
18
|
-
}) => {
|
|
19
|
-
const { layout, showDividers, links, container, setRegister } = useContext(
|
|
20
|
-
NavListContext
|
|
21
|
-
);
|
|
22
|
-
const { subMenu } = links.find((link) => link.name === item.name) || {};
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<React.Fragment>
|
|
26
|
-
<NavListItemBase
|
|
27
|
-
container={container}
|
|
28
|
-
setRegister={setRegister}
|
|
29
|
-
item={item}
|
|
30
|
-
layout={layout}
|
|
31
|
-
role={role}
|
|
32
|
-
{...props}
|
|
33
|
-
>
|
|
34
|
-
{subMenu && subMenu?.length > 0 && <NavListSubMenu links={subMenu} />}
|
|
35
|
-
</NavListItemBase>
|
|
36
|
-
{showDividers && <Divider />}
|
|
37
|
-
</React.Fragment>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default NavListItemAuto;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react';
|
|
2
|
-
import { NavListAutoProps } from '@digigov/ui/core/NavList/types';
|
|
3
|
-
import { NavListBase } from '@digigov/ui/core/NavList/NavListBase';
|
|
4
|
-
import NavListItemBase from '@digigov/ui/core/NavList/NavListItemBase';
|
|
5
|
-
import NavListContext, {
|
|
6
|
-
NavLinkInterface,
|
|
7
|
-
} from '@digigov/ui/core/NavList/NavListContext';
|
|
8
|
-
|
|
9
|
-
export interface NavListSubMenuProps extends NavListAutoProps {
|
|
10
|
-
links: NavLinkInterface[];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const NavListSubMenu: React.FC<NavListSubMenuProps> = ({
|
|
14
|
-
links,
|
|
15
|
-
...props
|
|
16
|
-
}) => {
|
|
17
|
-
const { layout } = useContext(NavListContext);
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<NavListBase subMenu floating={layout === 'horizontal'} {...props}>
|
|
21
|
-
{links &&
|
|
22
|
-
links.map((subMenuLink, key) => {
|
|
23
|
-
return <NavListItemBase key={key} item={subMenuLink} />;
|
|
24
|
-
})}
|
|
25
|
-
</NavListBase>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
export default NavListSubMenu;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { NavListAuto, NavListItemAuto } from '@digigov/ui/core/NavList';
|
|
3
|
-
|
|
4
|
-
const links = [
|
|
5
|
-
{ name: 'Nav1', href: '#', label: 'Nav list item 1' },
|
|
6
|
-
{
|
|
7
|
-
name: 'Nav2',
|
|
8
|
-
href: '#',
|
|
9
|
-
label: 'Nav list item 2',
|
|
10
|
-
subMenu: [
|
|
11
|
-
{
|
|
12
|
-
name: 'Nav2.1',
|
|
13
|
-
href: '#',
|
|
14
|
-
label: 'Nav list item 2.1',
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
name: 'Nav2.2',
|
|
18
|
-
href: '#',
|
|
19
|
-
label: 'Nav list item 2.2',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
name: 'Nav2.3',
|
|
23
|
-
href: '#',
|
|
24
|
-
label: 'Nav list item 2.3',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'Nav2.4',
|
|
28
|
-
href: '#',
|
|
29
|
-
label: 'Nav list item 2.4',
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
{ name: 'Nav3', href: '#', label: 'Nav list item 3' },
|
|
34
|
-
];
|
|
35
|
-
|
|
36
|
-
export const NavListAutoExample = () => {
|
|
37
|
-
const layout = 'horizontal';
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<NavListAuto
|
|
41
|
-
layout={layout}
|
|
42
|
-
links={links}
|
|
43
|
-
aria-label="Nav list"
|
|
44
|
-
role="menu"
|
|
45
|
-
>
|
|
46
|
-
{links.map((item, key) => (
|
|
47
|
-
<NavListItemAuto key={key} item={item} role="menuitem" />
|
|
48
|
-
))}
|
|
49
|
-
</NavListAuto>
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export default NavListAutoExample;
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
NavListAuto,
|
|
4
|
-
NavListItem,
|
|
5
|
-
NavMenu,
|
|
6
|
-
NavMenuContainer,
|
|
7
|
-
NavMenuContainerContent,
|
|
8
|
-
NavMenuContainerContentList,
|
|
9
|
-
NavMenuContainerContentListItem,
|
|
10
|
-
NavMenuContainerTitle,
|
|
11
|
-
isNavListItemLinkInterface,
|
|
12
|
-
} from '@digigov/ui/core/NavList';
|
|
13
|
-
import { useNavList } from '@digigov/ui/hooks/useNavList';
|
|
14
|
-
import { Link } from '@digigov/ui/core';
|
|
15
|
-
|
|
16
|
-
const LANG = 'el';
|
|
17
|
-
const DEFAULT_HREF_FLAG = true;
|
|
18
|
-
|
|
19
|
-
const epathlaLinks = [
|
|
20
|
-
{
|
|
21
|
-
name: 'index',
|
|
22
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}`,
|
|
23
|
-
label: 'Αρχική',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: 'epathla',
|
|
27
|
-
label: 'Ε.Π.ΑΘΛ.Α',
|
|
28
|
-
subMenu: [
|
|
29
|
-
{
|
|
30
|
-
name: 'epathla/aim',
|
|
31
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}/epathla/aim`,
|
|
32
|
-
label: 'Σκοπός',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'epathla/structure',
|
|
36
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}/epathla/structure`,
|
|
37
|
-
label: 'Δομή',
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
name: 'epathla/members',
|
|
41
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}/epathla/members`,
|
|
42
|
-
label: 'Συγκρότηση',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: 'epathla/wording-groups',
|
|
46
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}/epathla/working-groups`,
|
|
47
|
-
label: 'Ομάδες εργασίας',
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
name: 'sport-manipulation',
|
|
53
|
-
label: 'Χειραγώγηση Αγώνων',
|
|
54
|
-
subMenu: [
|
|
55
|
-
{
|
|
56
|
-
name: 'sport-manipulation/macolin',
|
|
57
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}/sport-manipulation/macolin`,
|
|
58
|
-
label: 'Σύμβαση Macolin',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: 'sport-manipulation/terminology',
|
|
62
|
-
href: DEFAULT_HREF_FLAG
|
|
63
|
-
? '#'
|
|
64
|
-
: `/${LANG}/sport-manipulation/terminology`,
|
|
65
|
-
label: 'Ορολογία',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: 'sport-manipulation/typology',
|
|
69
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}/sport-manipulation/typology`,
|
|
70
|
-
label: 'Τυπολογία',
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: 'sport-manipulation/law',
|
|
74
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}/sport-manipulation/law`,
|
|
75
|
-
label: 'Νομοθεσία',
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
name: 'sport-manipulation/documents',
|
|
79
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}/sport-manipulation/documents`,
|
|
80
|
-
label: 'Κείμενα αναφοράς διεθνών οργανισμών',
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
name: 'educational-material',
|
|
86
|
-
label: 'Εκπαιδευτικό υλικό',
|
|
87
|
-
subMenu: [
|
|
88
|
-
{
|
|
89
|
-
name: 'educational-material/videos',
|
|
90
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}/educational-material/videos`,
|
|
91
|
-
label: 'Βίντεο',
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
name: 'educational-material/presentations',
|
|
95
|
-
href: DEFAULT_HREF_FLAG
|
|
96
|
-
? '#'
|
|
97
|
-
: `/${LANG}/educational-material/presentations`,
|
|
98
|
-
label: 'Παρουσιάσεις',
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: 'educational-material/other-texts',
|
|
102
|
-
href: DEFAULT_HREF_FLAG
|
|
103
|
-
? '#'
|
|
104
|
-
: `/${LANG}/educational-material/other-texts`,
|
|
105
|
-
label: 'Άλλα κείμενα',
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
name: 'news',
|
|
111
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}/news`,
|
|
112
|
-
label: 'Νέα',
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
name: 'send-report',
|
|
116
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}/send-report`,
|
|
117
|
-
label: 'Προστάτεψε το άθλημά σου',
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
name: 'links',
|
|
121
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}/links`,
|
|
122
|
-
label: 'Σύνδεσμοι',
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
name: 'contact',
|
|
126
|
-
href: DEFAULT_HREF_FLAG ? '#' : `/${LANG}/contact`,
|
|
127
|
-
label: 'Επικοινωνία',
|
|
128
|
-
},
|
|
129
|
-
];
|
|
130
|
-
|
|
131
|
-
export const NavListEpathlaExample = () => {
|
|
132
|
-
const { container, register } = useNavList();
|
|
133
|
-
|
|
134
|
-
const setRegister = (name: string) => {
|
|
135
|
-
return { ...register(name) };
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
return (
|
|
139
|
-
<>
|
|
140
|
-
<NavListAuto
|
|
141
|
-
layout={'horizontal'}
|
|
142
|
-
links={epathlaLinks}
|
|
143
|
-
aria-label="Nav list"
|
|
144
|
-
role="menu"
|
|
145
|
-
>
|
|
146
|
-
{epathlaLinks.map((item, key) => (
|
|
147
|
-
<React.Fragment key={key}>
|
|
148
|
-
<NavListItem link={item} setRegister={setRegister} />
|
|
149
|
-
<NavMenu {...container(item.name)}>
|
|
150
|
-
<NavMenuContainer paddingLeft={5} paddingRight={5}>
|
|
151
|
-
<NavMenuContainerTitle>{item.label}</NavMenuContainerTitle>
|
|
152
|
-
<NavMenuContainerContent>
|
|
153
|
-
<NavMenuContainerContentList>
|
|
154
|
-
{item.subMenu?.map((subMenu, menuIndex) => {
|
|
155
|
-
return (
|
|
156
|
-
isNavListItemLinkInterface(subMenu) && (
|
|
157
|
-
<NavMenuContainerContentListItem key={menuIndex}>
|
|
158
|
-
<Link href={subMenu.href}>{subMenu.label}</Link>
|
|
159
|
-
</NavMenuContainerContentListItem>
|
|
160
|
-
)
|
|
161
|
-
);
|
|
162
|
-
})}
|
|
163
|
-
</NavMenuContainerContentList>
|
|
164
|
-
</NavMenuContainerContent>
|
|
165
|
-
</NavMenuContainer>
|
|
166
|
-
</NavMenu>
|
|
167
|
-
</React.Fragment>
|
|
168
|
-
))}
|
|
169
|
-
</NavListAuto>
|
|
170
|
-
</>
|
|
171
|
-
);
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
export default NavListEpathlaExample;
|
|
File without changes
|
|
File without changes
|