@digigov/ui 1.0.0-480e3d97 → 1.0.0-60addd4a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/Footer/Footer.stories.playwright.json +2 -2
- package/app/Header/Header.stories.playwright.json +1 -1
- package/app/Header/__stories__/WithHeaderNavigation.js +13 -21
- package/app/Header/__stories__/WithNavigation.js +8 -40
- package/app/Masthead/Masthead.stories.playwright.json +1 -1
- package/app/ThemeOptions/index.js +2 -2
- package/content/Details/index.mdx +5 -0
- package/content/Table/__stories__/WithFloatingScroll.js +10 -4
- package/content/Table/index.js +7 -5
- package/content/Table/index.mdx +1 -1
- package/es/app/Footer/Footer.stories.playwright.json +2 -2
- package/es/app/Header/Header.stories.playwright.json +1 -1
- package/es/app/Header/__stories__/WithHeaderNavigation.js +13 -13
- package/es/app/Header/__stories__/WithNavigation.js +9 -36
- package/es/app/Masthead/Masthead.stories.playwright.json +1 -1
- package/es/app/ThemeOptions/index.js +2 -2
- package/es/content/Details/index.mdx +5 -0
- package/es/content/Table/__stories__/WithFloatingScroll.js +5 -4
- package/es/content/Table/index.js +7 -4
- package/es/content/Table/index.mdx +1 -1
- package/es/feedback/ServiceBadge/index.mdx +9 -5
- package/es/form/Button/index.mdx +4 -4
- package/es/form/Checkbox/index.mdx +5 -0
- package/es/form/DateInputContainer/index.mdx +5 -0
- package/es/form/FileUpload/index.mdx +2 -0
- package/es/form/RadioContainer/index.mdx +5 -0
- package/es/form/SelectContainer/index.mdx +6 -0
- package/es/layouts/Grid/Grid.stories.js +1 -0
- package/es/layouts/Grid/__stories__/ResponsiveSpacing.js +79 -0
- package/es/navigation/Breadcrumbs/index.mdx +5 -0
- package/es/navigation/Drawer/__stories__/Default.js +25 -66
- package/es/navigation/Dropdown/__stories__/AlignRight.js +9 -8
- package/es/navigation/Dropdown/__stories__/Default.js +9 -8
- package/es/navigation/Dropdown/__stories__/PlacementTop.js +9 -8
- package/es/navigation/Dropdown/index.mdx +0 -2
- package/es/navigation/Link/index.mdx +2 -0
- package/es/navigation/NavList/NavList.stories.playwright.json +2 -2
- package/es/navigation/NavList/NavListAuto/index.js +54 -0
- package/es/navigation/NavList/{NavMenuContainerContentList.js → NavMenuContentList.js} +5 -5
- package/es/navigation/NavList/__stories__/Default.js +12 -28
- package/es/navigation/NavList/__stories__/NavVerticalLayout.js +12 -26
- package/es/navigation/NavList/hooks/useNavList.js +2 -2
- package/es/navigation/NavList/hooks/useTogglableNav.js +33 -18
- package/es/navigation/NavList/index.js +16 -17
- package/es/navigation/NavList/types.js +1 -6
- package/es/navigation/Pagination/__stories__/Default.js +7 -65
- package/es/navigation/Pagination/index.mdx +1 -2
- package/es/navigation/Tabs/index.mdx +6 -0
- package/es/registry.js +4 -40
- package/es/typography/Hint/index.mdx +2 -0
- package/es/typography/NormalText/index.mdx +2 -0
- package/es/typography/Paragraph/index.mdx +1 -0
- package/esm/app/Footer/Footer.stories.playwright.json +2 -2
- package/esm/app/Header/Header.stories.playwright.json +1 -1
- package/esm/app/Header/__stories__/WithHeaderNavigation.js +13 -13
- package/esm/app/Header/__stories__/WithNavigation.js +9 -36
- package/esm/app/Masthead/Masthead.stories.playwright.json +1 -1
- package/esm/app/ThemeOptions/index.js +2 -2
- package/esm/content/Details/index.mdx +5 -0
- package/esm/content/Table/__stories__/WithFloatingScroll.js +5 -4
- package/esm/content/Table/index.js +7 -4
- package/esm/content/Table/index.mdx +1 -1
- package/esm/feedback/ServiceBadge/index.mdx +9 -5
- package/esm/form/Button/index.mdx +4 -4
- package/esm/form/Checkbox/index.mdx +5 -0
- package/esm/form/DateInputContainer/index.mdx +5 -0
- package/esm/form/FileUpload/index.mdx +2 -0
- package/esm/form/RadioContainer/index.mdx +5 -0
- package/esm/form/SelectContainer/index.mdx +6 -0
- package/esm/index.js +1 -1
- package/esm/layouts/Grid/Grid.stories.js +1 -0
- package/esm/layouts/Grid/__stories__/ResponsiveSpacing.js +79 -0
- package/esm/navigation/Breadcrumbs/index.mdx +5 -0
- package/esm/navigation/Drawer/__stories__/Default.js +25 -66
- package/esm/navigation/Dropdown/__stories__/AlignRight.js +9 -8
- package/esm/navigation/Dropdown/__stories__/Default.js +9 -8
- package/esm/navigation/Dropdown/__stories__/PlacementTop.js +9 -8
- package/esm/navigation/Dropdown/index.mdx +0 -2
- package/esm/navigation/Link/index.mdx +2 -0
- package/esm/navigation/NavList/NavList.stories.playwright.json +2 -2
- package/esm/navigation/NavList/NavListAuto/index.js +54 -0
- package/esm/navigation/NavList/{NavMenuContainerContentList.js → NavMenuContentList.js} +5 -5
- package/esm/navigation/NavList/__stories__/Default.js +12 -28
- package/esm/navigation/NavList/__stories__/NavVerticalLayout.js +12 -26
- package/esm/navigation/NavList/hooks/useNavList.js +2 -2
- package/esm/navigation/NavList/hooks/useTogglableNav.js +33 -18
- package/esm/navigation/NavList/index.js +16 -17
- package/esm/navigation/NavList/types.js +1 -6
- package/esm/navigation/Pagination/__stories__/Default.js +7 -65
- package/esm/navigation/Pagination/index.mdx +1 -2
- package/esm/navigation/Tabs/index.mdx +6 -0
- package/esm/registry.js +4 -40
- package/esm/typography/Hint/index.mdx +2 -0
- package/esm/typography/NormalText/index.mdx +2 -0
- package/esm/typography/Paragraph/index.mdx +1 -0
- package/feedback/ServiceBadge/index.mdx +9 -5
- package/form/Button/index.mdx +4 -4
- package/form/Checkbox/index.mdx +5 -0
- package/form/DateInputContainer/index.mdx +5 -0
- package/form/FileUpload/index.mdx +2 -0
- package/form/RadioContainer/index.mdx +5 -0
- package/form/SelectContainer/index.mdx +6 -0
- package/layouts/Basic/Content/index.d.ts +1 -1
- package/layouts/Basic/Side/index.d.ts +1 -1
- package/layouts/Grid/Grid.stories.d.ts +1 -0
- package/layouts/Grid/Grid.stories.js +14 -0
- package/layouts/Grid/__stories__/ResponsiveSpacing.d.ts +2 -0
- package/layouts/Grid/__stories__/ResponsiveSpacing.js +93 -0
- package/navigation/Breadcrumbs/index.mdx +5 -0
- package/navigation/Drawer/__stories__/Default.js +24 -68
- package/navigation/Dropdown/__stories__/AlignRight.js +9 -9
- package/navigation/Dropdown/__stories__/Default.js +9 -9
- package/navigation/Dropdown/__stories__/PlacementTop.js +9 -9
- package/navigation/Dropdown/index.mdx +0 -2
- package/navigation/Link/index.mdx +2 -0
- package/navigation/NavList/NavList.stories.playwright.json +2 -2
- package/navigation/NavList/NavListAuto/index.js +80 -0
- package/navigation/NavList/NavMenuContentList.d.ts +5 -0
- package/navigation/NavList/{NavMenuContainerContentList.js → NavMenuContentList.js} +10 -10
- package/navigation/NavList/__stories__/Default.js +12 -28
- package/navigation/NavList/__stories__/NavVerticalLayout.js +12 -32
- package/navigation/NavList/hooks/useNavList.d.ts +1 -1
- package/navigation/NavList/hooks/useNavList.js +2 -2
- package/navigation/NavList/hooks/useTogglableNav.d.ts +1 -0
- package/navigation/NavList/hooks/useTogglableNav.js +33 -18
- package/navigation/NavList/index.d.ts +16 -17
- package/navigation/NavList/index.js +54 -96
- package/navigation/NavList/types.d.ts +14 -17
- package/navigation/NavList/types.js +1 -14
- package/navigation/Pagination/__stories__/Default.js +7 -65
- package/navigation/Pagination/index.mdx +1 -2
- package/navigation/Tabs/index.mdx +6 -0
- package/package.json +3 -3
- package/registry.d.ts +2 -20
- package/registry.js +4 -58
- package/src/app/Footer/Footer.stories.playwright.json +2 -2
- package/src/app/Header/Header.stories.playwright.json +1 -1
- package/src/app/Header/__stories__/WithHeaderNavigation.tsx +23 -35
- package/src/app/Header/__stories__/WithNavigation.tsx +13 -34
- package/src/app/Masthead/Masthead.stories.playwright.json +1 -1
- package/src/app/ThemeOptions/index.tsx +3 -3
- package/src/content/Details/index.mdx +5 -0
- package/src/content/Table/__stories__/WithFloatingScroll.tsx +5 -7
- package/src/content/Table/index.mdx +1 -1
- package/src/content/Table/index.tsx +9 -8
- package/src/feedback/ServiceBadge/index.mdx +9 -5
- package/src/form/Button/index.mdx +4 -4
- package/src/form/Checkbox/index.mdx +5 -0
- package/src/form/DateInputContainer/index.mdx +5 -0
- package/src/form/FileUpload/index.mdx +2 -0
- package/src/form/RadioContainer/index.mdx +5 -0
- package/src/form/SelectContainer/index.mdx +6 -0
- package/src/layouts/Grid/Grid.stories.js +1 -0
- package/src/layouts/Grid/__stories__/ResponsiveSpacing.tsx +43 -0
- package/src/navigation/Breadcrumbs/index.mdx +5 -0
- package/src/navigation/Drawer/__stories__/Default.tsx +31 -84
- package/src/navigation/Dropdown/__stories__/AlignRight.tsx +13 -12
- package/src/navigation/Dropdown/__stories__/Default.tsx +10 -11
- package/src/navigation/Dropdown/__stories__/PlacementTop.tsx +11 -11
- package/src/navigation/Dropdown/index.mdx +0 -2
- package/src/navigation/Link/index.mdx +2 -0
- package/src/navigation/NavList/NavList.stories.playwright.json +2 -2
- package/src/navigation/NavList/NavListAuto/index.tsx +68 -0
- package/src/navigation/NavList/{NavMenuContainerContentList.tsx → NavMenuContentList.tsx} +8 -8
- package/src/navigation/NavList/__stories__/Default.tsx +28 -40
- package/src/navigation/NavList/__stories__/NavVerticalLayout.tsx +25 -33
- package/src/navigation/NavList/hooks/useNavList.ts +3 -3
- package/src/navigation/NavList/hooks/useTogglableNav.tsx +31 -19
- package/src/navigation/NavList/index.tsx +16 -17
- package/src/navigation/NavList/types.tsx +16 -28
- package/src/navigation/Pagination/__stories__/Default.tsx +2 -76
- package/src/navigation/Pagination/index.mdx +1 -2
- package/src/navigation/Tabs/index.mdx +6 -0
- package/src/registry.js +4 -40
- package/src/typography/Hint/index.mdx +2 -0
- package/src/typography/NormalText/index.mdx +2 -0
- package/src/typography/Paragraph/index.mdx +1 -0
- package/typography/Hint/index.mdx +2 -0
- package/typography/NormalText/index.mdx +2 -0
- package/typography/Paragraph/index.mdx +1 -0
- package/es/navigation/NavList/NavListAuto/NavListAuto.js +0 -31
- package/es/navigation/NavList/NavListAuto/NavListBaseAuto.js +0 -22
- package/es/navigation/NavList/NavListAuto/NavListContextAuto.js +0 -104
- package/es/navigation/NavList/NavListAuto/NavListItemAnchorAuto.js +0 -26
- package/es/navigation/NavList/NavListAuto/NavListItemAuto.js +0 -38
- package/es/navigation/NavList/NavListAuto/NavListItemButtonAuto.js +0 -30
- package/es/navigation/NavList/NavListAuto/NavListMenuAuto.js +0 -36
- package/es/navigation/NavList/NavListAuto/NavListSubMenuAuto.js +0 -26
- package/es/navigation/NavList/NavListItem.js +0 -23
- package/es/navigation/NavList/NavListItemBase.js +0 -44
- package/es/navigation/NavList/NavListItemButton.js +0 -3
- package/es/navigation/NavList/NavListItemLink.js +0 -3
- package/es/navigation/NavList/NavMenu.js +0 -3
- package/es/navigation/NavList/NavMenuContainer.js +0 -3
- package/es/navigation/NavList/NavMenuContainerContent.js +0 -3
- package/es/navigation/NavList/NavMenuContainerContentListItem.js +0 -3
- package/es/navigation/NavList/NavMenuContainerTitle.js +0 -3
- package/es/navigation/NavList/NavVertical.js +0 -3
- package/es/navigation/NavList/NavVerticalItem.js +0 -3
- package/esm/navigation/NavList/NavListAuto/NavListAuto.js +0 -31
- package/esm/navigation/NavList/NavListAuto/NavListBaseAuto.js +0 -22
- package/esm/navigation/NavList/NavListAuto/NavListContextAuto.js +0 -104
- package/esm/navigation/NavList/NavListAuto/NavListItemAnchorAuto.js +0 -26
- package/esm/navigation/NavList/NavListAuto/NavListItemAuto.js +0 -38
- package/esm/navigation/NavList/NavListAuto/NavListItemButtonAuto.js +0 -30
- package/esm/navigation/NavList/NavListAuto/NavListMenuAuto.js +0 -36
- package/esm/navigation/NavList/NavListAuto/NavListSubMenuAuto.js +0 -26
- package/esm/navigation/NavList/NavListItem.js +0 -23
- package/esm/navigation/NavList/NavListItemBase.js +0 -44
- package/esm/navigation/NavList/NavListItemButton.js +0 -3
- package/esm/navigation/NavList/NavListItemLink.js +0 -3
- package/esm/navigation/NavList/NavMenu.js +0 -3
- package/esm/navigation/NavList/NavMenuContainer.js +0 -3
- package/esm/navigation/NavList/NavMenuContainerContent.js +0 -3
- package/esm/navigation/NavList/NavMenuContainerContentListItem.js +0 -3
- package/esm/navigation/NavList/NavMenuContainerTitle.js +0 -3
- package/esm/navigation/NavList/NavVertical.js +0 -3
- package/esm/navigation/NavList/NavVerticalItem.js +0 -3
- package/navigation/NavList/NavListAuto/NavListAuto.js +0 -48
- package/navigation/NavList/NavListAuto/NavListBaseAuto.d.ts +0 -3
- package/navigation/NavList/NavListAuto/NavListBaseAuto.js +0 -38
- package/navigation/NavList/NavListAuto/NavListContextAuto.d.ts +0 -29
- package/navigation/NavList/NavListAuto/NavListContextAuto.js +0 -128
- package/navigation/NavList/NavListAuto/NavListItemAnchorAuto.d.ts +0 -9
- package/navigation/NavList/NavListAuto/NavListItemAnchorAuto.js +0 -51
- package/navigation/NavList/NavListAuto/NavListItemAuto.d.ts +0 -8
- package/navigation/NavList/NavListAuto/NavListItemAuto.js +0 -63
- package/navigation/NavList/NavListAuto/NavListItemButtonAuto.d.ts +0 -12
- package/navigation/NavList/NavListAuto/NavListItemButtonAuto.js +0 -48
- package/navigation/NavList/NavListAuto/NavListMenuAuto.d.ts +0 -11
- package/navigation/NavList/NavListAuto/NavListMenuAuto.js +0 -56
- package/navigation/NavList/NavListAuto/NavListSubMenuAuto.d.ts +0 -9
- package/navigation/NavList/NavListAuto/NavListSubMenuAuto.js +0 -44
- package/navigation/NavList/NavListItem.d.ts +0 -4
- package/navigation/NavList/NavListItem.js +0 -42
- package/navigation/NavList/NavListItemBase.d.ts +0 -15
- package/navigation/NavList/NavListItemBase.js +0 -68
- package/navigation/NavList/NavListItemButton.d.ts +0 -3
- package/navigation/NavList/NavListItemButton.js +0 -30
- package/navigation/NavList/NavListItemLink.d.ts +0 -3
- package/navigation/NavList/NavListItemLink.js +0 -30
- package/navigation/NavList/NavMenu.d.ts +0 -3
- package/navigation/NavList/NavMenu.js +0 -30
- package/navigation/NavList/NavMenuContainer.d.ts +0 -3
- package/navigation/NavList/NavMenuContainer.js +0 -30
- package/navigation/NavList/NavMenuContainerContent.d.ts +0 -3
- package/navigation/NavList/NavMenuContainerContent.js +0 -30
- package/navigation/NavList/NavMenuContainerContentList.d.ts +0 -5
- package/navigation/NavList/NavMenuContainerContentListItem.d.ts +0 -3
- package/navigation/NavList/NavMenuContainerContentListItem.js +0 -30
- package/navigation/NavList/NavMenuContainerTitle.d.ts +0 -3
- package/navigation/NavList/NavMenuContainerTitle.js +0 -30
- package/navigation/NavList/NavVertical.d.ts +0 -3
- package/navigation/NavList/NavVertical.js +0 -30
- package/navigation/NavList/NavVerticalItem.d.ts +0 -3
- package/navigation/NavList/NavVerticalItem.js +0 -30
- package/src/navigation/NavList/NavListAuto/NavListAuto.tsx +0 -34
- package/src/navigation/NavList/NavListAuto/NavListBaseAuto.tsx +0 -20
- package/src/navigation/NavList/NavListAuto/NavListContextAuto.tsx +0 -112
- package/src/navigation/NavList/NavListAuto/NavListItemAnchorAuto.tsx +0 -38
- package/src/navigation/NavList/NavListAuto/NavListItemAuto.tsx +0 -49
- package/src/navigation/NavList/NavListAuto/NavListItemButtonAuto.tsx +0 -53
- package/src/navigation/NavList/NavListAuto/NavListMenuAuto.tsx +0 -51
- package/src/navigation/NavList/NavListAuto/NavListSubMenuAuto.tsx +0 -32
- package/src/navigation/NavList/NavListItem.tsx +0 -46
- package/src/navigation/NavList/NavListItemBase.tsx +0 -63
- package/src/navigation/NavList/NavListItemButton.tsx +0 -3
- package/src/navigation/NavList/NavListItemLink.tsx +0 -3
- package/src/navigation/NavList/NavMenu.tsx +0 -3
- package/src/navigation/NavList/NavMenuContainer.tsx +0 -3
- package/src/navigation/NavList/NavMenuContainerContent.tsx +0 -3
- package/src/navigation/NavList/NavMenuContainerContentListItem.tsx +0 -3
- package/src/navigation/NavList/NavMenuContainerTitle.tsx +0 -3
- package/src/navigation/NavList/NavVertical.tsx +0 -3
- package/src/navigation/NavList/NavVerticalItem.tsx +0 -3
- /package/navigation/NavList/NavListAuto/{NavListAuto.d.ts → index.d.ts} +0 -0
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Link from '@digigov/ui/navigation/Link';
|
|
3
|
-
import
|
|
4
|
-
isNavListItemLinkInterface,
|
|
3
|
+
import {
|
|
5
4
|
Nav,
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
NavList,
|
|
6
|
+
NavListItemAction,
|
|
8
7
|
NavMenuContainer,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
NavMenuContent,
|
|
9
|
+
NavMenuContentList,
|
|
10
|
+
NavMenuContentListItem,
|
|
11
|
+
NavMenuTitle,
|
|
13
12
|
} from '@digigov/ui/navigation/NavList';
|
|
14
13
|
import { useNavList } from '@digigov/ui/navigation/NavList/hooks/useNavList';
|
|
15
14
|
|
|
@@ -53,41 +52,34 @@ const links = [
|
|
|
53
52
|
export const NavVerticalLayout = () => {
|
|
54
53
|
const layout = 'vertical';
|
|
55
54
|
const border = false;
|
|
56
|
-
const {
|
|
55
|
+
const { registerNavItemMenu, registerNavItem } = useNavList();
|
|
57
56
|
|
|
58
|
-
const setRegisterButton = (name: string) => {
|
|
59
|
-
return { ...registerButton(name) };
|
|
60
|
-
};
|
|
61
57
|
|
|
62
|
-
const setRegisterLink = (name: string) => {
|
|
63
|
-
return { ...registerLink(name) };
|
|
64
|
-
};
|
|
65
58
|
|
|
66
59
|
return (
|
|
67
|
-
<Nav open={true}
|
|
68
|
-
<NavList>
|
|
60
|
+
<Nav open={true} border={border}>
|
|
61
|
+
<NavList layout={layout}>
|
|
69
62
|
{links.map((item, key) => (
|
|
70
63
|
<React.Fragment key={key}>
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/>
|
|
76
|
-
<NavMenu layout={layout} {...container(item.name)}>
|
|
64
|
+
<NavListItemAction {...registerNavItem(item)} >
|
|
65
|
+
{item.label}
|
|
66
|
+
</NavListItemAction>
|
|
67
|
+
{item.subMenu &&
|
|
77
68
|
<NavMenuContainer
|
|
78
69
|
layout={layout}
|
|
79
70
|
paddingLeft={5}
|
|
80
71
|
paddingRight={5}
|
|
72
|
+
{...registerNavItemMenu(item.name)}
|
|
81
73
|
>
|
|
82
|
-
<
|
|
83
|
-
<
|
|
84
|
-
<
|
|
74
|
+
<NavMenuTitle>{item.label}</NavMenuTitle>
|
|
75
|
+
<NavMenuContent>
|
|
76
|
+
<NavMenuContentList role="menu">
|
|
85
77
|
{item.subMenu?.map((subMenu, menuIndex) => {
|
|
86
78
|
return (
|
|
87
|
-
|
|
88
|
-
<
|
|
89
|
-
role="presentation"
|
|
79
|
+
subMenu?.href && (
|
|
80
|
+
<NavMenuContentListItem
|
|
90
81
|
key={menuIndex}
|
|
82
|
+
role="presentation"
|
|
91
83
|
>
|
|
92
84
|
<Link
|
|
93
85
|
role="menuitem"
|
|
@@ -96,14 +88,14 @@ export const NavVerticalLayout = () => {
|
|
|
96
88
|
>
|
|
97
89
|
{subMenu.label}
|
|
98
90
|
</Link>
|
|
99
|
-
</
|
|
91
|
+
</NavMenuContentListItem>
|
|
100
92
|
)
|
|
101
93
|
);
|
|
102
94
|
})}
|
|
103
|
-
</
|
|
104
|
-
</
|
|
95
|
+
</NavMenuContentList>
|
|
96
|
+
</NavMenuContent>
|
|
105
97
|
</NavMenuContainer>
|
|
106
|
-
|
|
98
|
+
}
|
|
107
99
|
</React.Fragment>
|
|
108
100
|
))}
|
|
109
101
|
</NavList>
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from '@digigov/ui/navigation/NavList/hooks/useTogglableNav';
|
|
6
6
|
|
|
7
7
|
export interface UseNavListReturn extends UseTogglableNavReturn {
|
|
8
|
-
|
|
8
|
+
registerNavItemMenu: (key: string) => { active: boolean; id: string };
|
|
9
9
|
}
|
|
10
10
|
export const useNavList = (): UseNavListReturn => {
|
|
11
11
|
const registeredContainers = useRef({});
|
|
@@ -18,7 +18,7 @@ export const useNavList = (): UseNavListReturn => {
|
|
|
18
18
|
onToggleProperty: 'onClick',
|
|
19
19
|
ariaNavigation: true,
|
|
20
20
|
});
|
|
21
|
-
const
|
|
21
|
+
const registerNavItemMenu = useCallback(
|
|
22
22
|
(key: string) => {
|
|
23
23
|
return {
|
|
24
24
|
ref: (el) => {
|
|
@@ -32,5 +32,5 @@ export const useNavList = (): UseNavListReturn => {
|
|
|
32
32
|
},
|
|
33
33
|
[opened]
|
|
34
34
|
);
|
|
35
|
-
return { registerButton, registerLink, opened,
|
|
35
|
+
return { registerButton, registerLink, opened, registerNavItemMenu, ...rest };
|
|
36
36
|
};
|
|
@@ -15,6 +15,7 @@ export interface UseTogglableNavInterface {
|
|
|
15
15
|
export interface UseTogglableNavReturn {
|
|
16
16
|
registerButton: (el: string) => any;
|
|
17
17
|
registerLink: (el: string) => any;
|
|
18
|
+
registerNavItem: (item: any) => any;
|
|
18
19
|
registered: { current: Record<string, { el: HTMLElement; type: string }> };
|
|
19
20
|
opened: Record<string, boolean>;
|
|
20
21
|
toggle: (id: string) => void;
|
|
@@ -40,25 +41,7 @@ export function useTogglableNav({
|
|
|
40
41
|
);
|
|
41
42
|
const openedKeys = useRef<string[]>([]);
|
|
42
43
|
|
|
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
44
|
|
|
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
45
|
|
|
63
46
|
const toggle = useCallback((e) => {
|
|
64
47
|
const key = e.currentTarget.getAttribute('aria-controls') as string;
|
|
@@ -254,7 +237,25 @@ export function useTogglableNav({
|
|
|
254
237
|
break;
|
|
255
238
|
}
|
|
256
239
|
}, []);
|
|
240
|
+
const registerButtonRef = useCallback((el) => {
|
|
241
|
+
if (!el) return;
|
|
242
|
+
const key = el.getAttribute('aria-controls') as string;
|
|
243
|
+
if (registered.current[key]) return;
|
|
244
|
+
registered.current[key] = {
|
|
245
|
+
el,
|
|
246
|
+
type: 'button',
|
|
247
|
+
};
|
|
248
|
+
}, []);
|
|
257
249
|
|
|
250
|
+
const registerLinkRef = useCallback((el) => {
|
|
251
|
+
if (!el) return;
|
|
252
|
+
const key = el.getAttribute('aria-controls') as string;
|
|
253
|
+
if (registered.current[key]) return;
|
|
254
|
+
registered.current[key] = {
|
|
255
|
+
el,
|
|
256
|
+
type: 'link',
|
|
257
|
+
};
|
|
258
|
+
}, []);
|
|
258
259
|
const registerButton = useCallback(
|
|
259
260
|
(key) => {
|
|
260
261
|
const isOpen = !!opened[key];
|
|
@@ -279,9 +280,20 @@ export function useTogglableNav({
|
|
|
279
280
|
},
|
|
280
281
|
[opened]
|
|
281
282
|
);
|
|
282
|
-
|
|
283
|
+
const registerNavItem = useCallback(
|
|
284
|
+
(item) => {
|
|
285
|
+
if(item.subMenu || item.menu) {
|
|
286
|
+
return {...registerButton(item.name), role: 'button'};
|
|
287
|
+
}else if (item.href) {
|
|
288
|
+
return {...registerLink(item.name), href: item.href};
|
|
289
|
+
}else {
|
|
290
|
+
console.error(item)
|
|
291
|
+
throw new Error('Invalid nav item. Must be either button or link');
|
|
292
|
+
}
|
|
293
|
+
},[opened])
|
|
283
294
|
return useMemo(
|
|
284
295
|
() => ({
|
|
296
|
+
registerNavItem,
|
|
285
297
|
registerButton,
|
|
286
298
|
registerLink,
|
|
287
299
|
registered,
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
export * from '@digigov/ui/navigation/NavList/NavListAuto
|
|
3
|
-
export * from '@digigov/ui/navigation/NavList/
|
|
4
|
-
export * from '@digigov/ui/navigation/NavList/NavListAuto/NavListContextAuto';
|
|
5
|
-
export * from '@digigov/ui/navigation/NavList/Nav';
|
|
6
|
-
export * from '@digigov/ui/navigation/NavList/NavList';
|
|
7
|
-
export * from '@digigov/ui/navigation/NavList/NavListItemLink';
|
|
8
|
-
export * from '@digigov/ui/navigation/NavList/NavListItemButton';
|
|
9
|
-
export * from '@digigov/ui/navigation/NavList/NavMenu';
|
|
10
|
-
export * from '@digigov/ui/navigation/NavList/NavMenuContainer';
|
|
11
|
-
export * from '@digigov/ui/navigation/NavList/NavMenuContainerTitle';
|
|
12
|
-
export * from '@digigov/ui/navigation/NavList/NavMenuContainerContent';
|
|
13
|
-
export * from '@digigov/ui/navigation/NavList/NavMenuContainerContentList';
|
|
14
|
-
export * from '@digigov/ui/navigation/NavList/NavMenuContainerContentListItem';
|
|
15
|
-
export * from '@digigov/ui/navigation/NavList/NavVertical';
|
|
16
|
-
export * from '@digigov/ui/navigation/NavList/NavVerticalItem';
|
|
1
|
+
import NavList from '@digigov/react-core/NavList';
|
|
2
|
+
export * from '@digigov/ui/navigation/NavList/NavListAuto';
|
|
3
|
+
export * from '@digigov/ui/navigation/NavList/NavMenuContentList';
|
|
17
4
|
export * from '@digigov/ui/navigation/NavList/types';
|
|
18
5
|
export * from '@digigov/ui/navigation/NavList/hooks/useNavList';
|
|
19
6
|
|
|
20
|
-
|
|
7
|
+
export * from '@digigov/react-core/Nav';
|
|
8
|
+
export * from '@digigov/react-core/NavList';
|
|
9
|
+
export * from '@digigov/react-core/NavMenuContainer';
|
|
10
|
+
export * from '@digigov/react-core/NavMenuContent';
|
|
11
|
+
export * from '@digigov/react-core/NavMenuContentListBase';
|
|
12
|
+
export * from '@digigov/react-core/NavMenuContentListItem';
|
|
13
|
+
export * from '@digigov/react-core/NavMenuTitle';
|
|
14
|
+
export * from '@digigov/react-core/NavListItemAction';
|
|
15
|
+
export * from '@digigov/react-core/NavListItemAction';
|
|
16
|
+
export * from '@digigov/react-core/NavListItemActionContainer';
|
|
17
|
+
export * from '@digigov/react-core/NavListItemLink';
|
|
18
|
+
export * from '@digigov/react-core/NavListItemButton';
|
|
19
|
+
export * from '@digigov/react-core/NavListItemAction';
|
|
21
20
|
export default NavList;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseCSSProperties } from '@material-ui/core/styles/withStyles';
|
|
3
3
|
import { NavProps } from '@digigov/ui/navigation/NavList';
|
|
4
|
-
import { NavLinkInterface } from '@digigov/ui/navigation/NavList/NavListAuto/NavListContextAuto';
|
|
5
4
|
|
|
6
5
|
export type NavListLayout = 'horizontal' | 'vertical';
|
|
7
|
-
|
|
6
|
+
interface NavListItemMenuInterface {
|
|
7
|
+
links: NavListItemLinkInterface[];
|
|
8
|
+
title?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface NavLinkInterface {
|
|
11
|
+
label?: string;
|
|
12
|
+
name: string;
|
|
13
|
+
href?: string;
|
|
14
|
+
subMenu?: NavLinkInterface[]
|
|
15
|
+
menu?: NavListItemMenuInterface
|
|
16
|
+
}
|
|
8
17
|
export interface NavListAutoProps extends NavProps {
|
|
9
18
|
children?: React.ReactNode;
|
|
10
19
|
className?: string;
|
|
@@ -24,23 +33,22 @@ export interface NavListHeaderItemType {
|
|
|
24
33
|
label?: string;
|
|
25
34
|
title?: string;
|
|
26
35
|
children?: React.ReactNode;
|
|
27
|
-
|
|
36
|
+
menu: {
|
|
37
|
+
links: NavListItemLinkInterface[]
|
|
38
|
+
};
|
|
28
39
|
}
|
|
29
40
|
|
|
30
41
|
interface NavListItemInterface {
|
|
31
42
|
name: string;
|
|
32
43
|
label?: string;
|
|
33
|
-
|
|
34
|
-
children?: React.ReactNode;
|
|
44
|
+
|
|
35
45
|
}
|
|
36
46
|
|
|
37
47
|
interface NavListItemLinkInterface extends NavListItemInterface {
|
|
38
48
|
href: string;
|
|
39
49
|
}
|
|
40
50
|
|
|
41
|
-
|
|
42
|
-
links: NavListItemLinkInterface[];
|
|
43
|
-
}
|
|
51
|
+
|
|
44
52
|
|
|
45
53
|
export type NavListItemType =
|
|
46
54
|
| NavListItemLinkInterface
|
|
@@ -56,23 +64,3 @@ export interface NavListItemSubMenuInterface extends NavListItemInterface {
|
|
|
56
64
|
subMenu: NavListItemType[];
|
|
57
65
|
}
|
|
58
66
|
|
|
59
|
-
export const isNavListItemLinkInterface = (
|
|
60
|
-
item: any
|
|
61
|
-
): item is NavListItemLinkInterface => {
|
|
62
|
-
return item && 'href' in item;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const isNavListItemSubMenuInterface = (
|
|
66
|
-
item: any
|
|
67
|
-
): item is NavListItemSubMenuInterface => {
|
|
68
|
-
return item && 'subMenu' in item;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export interface NavListItemProps {
|
|
72
|
-
children?: React.ReactNode;
|
|
73
|
-
role?: string;
|
|
74
|
-
link?: NavListItemType;
|
|
75
|
-
active?: boolean;
|
|
76
|
-
setRegisterButton?: (name: string) => any;
|
|
77
|
-
setRegisterLink?: (name: string) => any;
|
|
78
|
-
}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
export const Default = () => (
|
|
15
15
|
<I18NProvider t={(str: string) => str}>
|
|
16
16
|
<Pagination>
|
|
17
|
-
<PaginationLabel start={
|
|
17
|
+
<PaginationLabel start={21} end={30} total={90}></PaginationLabel>
|
|
18
18
|
<PaginationList>
|
|
19
19
|
<PaginationListItem>
|
|
20
20
|
<Link>
|
|
@@ -51,81 +51,7 @@ export const Default = () => (
|
|
|
51
51
|
<SectionBreak size="lg" />
|
|
52
52
|
|
|
53
53
|
<Pagination>
|
|
54
|
-
<PaginationLabel start={
|
|
55
|
-
<PaginationList>
|
|
56
|
-
<PaginationListItem active={false}>
|
|
57
|
-
<Link>
|
|
58
|
-
<ArrowIcon direction="left" />
|
|
59
|
-
Προηγούμενο
|
|
60
|
-
</Link>
|
|
61
|
-
</PaginationListItem>
|
|
62
|
-
<PaginationListItem currentPage>1</PaginationListItem>
|
|
63
|
-
<PaginationListItem>
|
|
64
|
-
<Link href="#page2">2</Link>
|
|
65
|
-
</PaginationListItem>
|
|
66
|
-
<PaginationListItem>
|
|
67
|
-
<Link href="#page3">3</Link>
|
|
68
|
-
</PaginationListItem>
|
|
69
|
-
<PaginationListItem variant="dots"></PaginationListItem>
|
|
70
|
-
<PaginationListItem>
|
|
71
|
-
<Link href="#page7">7</Link>
|
|
72
|
-
</PaginationListItem>
|
|
73
|
-
<PaginationListItem>
|
|
74
|
-
<Link href="#page8">8</Link>
|
|
75
|
-
</PaginationListItem>
|
|
76
|
-
<PaginationListItem>
|
|
77
|
-
<Link href="#page9">9</Link>
|
|
78
|
-
</PaginationListItem>
|
|
79
|
-
<PaginationListItem>
|
|
80
|
-
<Link>
|
|
81
|
-
Επόμενο
|
|
82
|
-
<ArrowIcon direction="right" />
|
|
83
|
-
</Link>
|
|
84
|
-
</PaginationListItem>
|
|
85
|
-
</PaginationList>
|
|
86
|
-
</Pagination>
|
|
87
|
-
|
|
88
|
-
<SectionBreak size="lg" />
|
|
89
|
-
|
|
90
|
-
<Pagination>
|
|
91
|
-
<PaginationLabel start={10} end={20} total={10000}></PaginationLabel>
|
|
92
|
-
<PaginationList>
|
|
93
|
-
<PaginationListItem>
|
|
94
|
-
<Link>
|
|
95
|
-
<ArrowIcon direction="left" />
|
|
96
|
-
Προηγούμενο
|
|
97
|
-
</Link>
|
|
98
|
-
</PaginationListItem>
|
|
99
|
-
<PaginationListItem>
|
|
100
|
-
<Link href="#page1">1</Link>
|
|
101
|
-
</PaginationListItem>
|
|
102
|
-
<PaginationListItem>
|
|
103
|
-
<Link>2</Link>
|
|
104
|
-
</PaginationListItem>
|
|
105
|
-
<PaginationListItem>
|
|
106
|
-
<Link href="#page3">3</Link>
|
|
107
|
-
</PaginationListItem>
|
|
108
|
-
<PaginationListItem variant="dots"></PaginationListItem>
|
|
109
|
-
<PaginationListItem>
|
|
110
|
-
<Link href="#page7">7</Link>
|
|
111
|
-
</PaginationListItem>
|
|
112
|
-
<PaginationListItem>
|
|
113
|
-
<Link href="#page8">8</Link>
|
|
114
|
-
</PaginationListItem>
|
|
115
|
-
<PaginationListItem currentPage>9</PaginationListItem>
|
|
116
|
-
<PaginationListItem active={false}>
|
|
117
|
-
<Link>
|
|
118
|
-
Επόμενο
|
|
119
|
-
<ArrowIcon direction="right" />
|
|
120
|
-
</Link>
|
|
121
|
-
</PaginationListItem>
|
|
122
|
-
</PaginationList>
|
|
123
|
-
</Pagination>
|
|
124
|
-
|
|
125
|
-
<SectionBreak size="lg" />
|
|
126
|
-
|
|
127
|
-
<Pagination>
|
|
128
|
-
<PaginationLabel start={1} end={10} total={15}></PaginationLabel>
|
|
54
|
+
<PaginationLabel start={81} end={90} total={197}></PaginationLabel>
|
|
129
55
|
<PaginationList>
|
|
130
56
|
<PaginationListItem>
|
|
131
57
|
<Link>
|
|
@@ -9,8 +9,7 @@ import Pagination from '@digigov/ui/app/Pagination';
|
|
|
9
9
|
|
|
10
10
|
## How to use
|
|
11
11
|
|
|
12
|
-
<Story packageName="@digigov/ui" component="navigation/Pagination" story="Default.tsx"
|
|
13
|
-
/>
|
|
12
|
+
<Story packageName="@digigov/ui" component="navigation/Pagination" story="Default.tsx"/>
|
|
14
13
|
|
|
15
14
|
## With inactive values
|
|
16
15
|
|
|
@@ -13,6 +13,12 @@ import Tabs from '@digigov/ui/navigation/Tabs';
|
|
|
13
13
|
|
|
14
14
|
<Story packageName="@digigov/ui" component="navigation/Tabs" story="Default.tsx" />
|
|
15
15
|
|
|
16
|
+
## Accessibility
|
|
17
|
+
|
|
18
|
+
You can read more about the accessibility patterns used in our Tabs
|
|
19
|
+
implementation in the ARIA Authoring Practices Guide (APG) at [Tabs](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/) section.
|
|
20
|
+
|
|
21
|
+
|
|
16
22
|
## API
|
|
17
23
|
|
|
18
24
|
<PropTypes packageName="@digigov/ui" component="Tabs" />
|
package/src/registry.js
CHANGED
|
@@ -148,26 +148,8 @@ import * as _digigov_ui_navigation_NavList_hooks_useTogglableNav from '@digigov/
|
|
|
148
148
|
import * as _digigov_ui_navigation_NavList from '@digigov/ui/navigation/NavList';
|
|
149
149
|
import * as _digigov_ui_navigation_NavList_Nav from '@digigov/ui/navigation/NavList/Nav';
|
|
150
150
|
import * as _digigov_ui_navigation_NavList_NavList from '@digigov/ui/navigation/NavList/NavList';
|
|
151
|
-
import * as
|
|
152
|
-
import * as
|
|
153
|
-
import * as _digigov_ui_navigation_NavList_NavListAuto_NavListContextAuto from '@digigov/ui/navigation/NavList/NavListAuto/NavListContextAuto';
|
|
154
|
-
import * as _digigov_ui_navigation_NavList_NavListAuto_NavListItemAnchorAuto from '@digigov/ui/navigation/NavList/NavListAuto/NavListItemAnchorAuto';
|
|
155
|
-
import * as _digigov_ui_navigation_NavList_NavListAuto_NavListItemAuto from '@digigov/ui/navigation/NavList/NavListAuto/NavListItemAuto';
|
|
156
|
-
import * as _digigov_ui_navigation_NavList_NavListAuto_NavListItemButtonAuto from '@digigov/ui/navigation/NavList/NavListAuto/NavListItemButtonAuto';
|
|
157
|
-
import * as _digigov_ui_navigation_NavList_NavListAuto_NavListMenuAuto from '@digigov/ui/navigation/NavList/NavListAuto/NavListMenuAuto';
|
|
158
|
-
import * as _digigov_ui_navigation_NavList_NavListAuto_NavListSubMenuAuto from '@digigov/ui/navigation/NavList/NavListAuto/NavListSubMenuAuto';
|
|
159
|
-
import * as _digigov_ui_navigation_NavList_NavListItem from '@digigov/ui/navigation/NavList/NavListItem';
|
|
160
|
-
import * as _digigov_ui_navigation_NavList_NavListItemBase from '@digigov/ui/navigation/NavList/NavListItemBase';
|
|
161
|
-
import * as _digigov_ui_navigation_NavList_NavListItemButton from '@digigov/ui/navigation/NavList/NavListItemButton';
|
|
162
|
-
import * as _digigov_ui_navigation_NavList_NavListItemLink from '@digigov/ui/navigation/NavList/NavListItemLink';
|
|
163
|
-
import * as _digigov_ui_navigation_NavList_NavMenu from '@digigov/ui/navigation/NavList/NavMenu';
|
|
164
|
-
import * as _digigov_ui_navigation_NavList_NavMenuContainer from '@digigov/ui/navigation/NavList/NavMenuContainer';
|
|
165
|
-
import * as _digigov_ui_navigation_NavList_NavMenuContainerContent from '@digigov/ui/navigation/NavList/NavMenuContainerContent';
|
|
166
|
-
import * as _digigov_ui_navigation_NavList_NavMenuContainerContentList from '@digigov/ui/navigation/NavList/NavMenuContainerContentList';
|
|
167
|
-
import * as _digigov_ui_navigation_NavList_NavMenuContainerContentListItem from '@digigov/ui/navigation/NavList/NavMenuContainerContentListItem';
|
|
168
|
-
import * as _digigov_ui_navigation_NavList_NavMenuContainerTitle from '@digigov/ui/navigation/NavList/NavMenuContainerTitle';
|
|
169
|
-
import * as _digigov_ui_navigation_NavList_NavVertical from '@digigov/ui/navigation/NavList/NavVertical';
|
|
170
|
-
import * as _digigov_ui_navigation_NavList_NavVerticalItem from '@digigov/ui/navigation/NavList/NavVerticalItem';
|
|
151
|
+
import * as _digigov_ui_navigation_NavList_NavListAuto from '@digigov/ui/navigation/NavList/NavListAuto';
|
|
152
|
+
import * as _digigov_ui_navigation_NavList_NavMenuContentList from '@digigov/ui/navigation/NavList/NavMenuContentList';
|
|
171
153
|
import * as _digigov_ui_navigation_NavList_types from '@digigov/ui/navigation/NavList/types';
|
|
172
154
|
import * as _digigov_ui_navigation_Pagination from '@digigov/ui/navigation/Pagination';
|
|
173
155
|
import * as _digigov_ui_navigation_SkipLink from '@digigov/ui/navigation/SkipLink';
|
|
@@ -364,26 +346,8 @@ export default {
|
|
|
364
346
|
'@digigov/ui/navigation/NavList': lazyImport(_digigov_ui_navigation_NavList),
|
|
365
347
|
'@digigov/ui/navigation/NavList/Nav': lazyImport(_digigov_ui_navigation_NavList_Nav),
|
|
366
348
|
'@digigov/ui/navigation/NavList/NavList': lazyImport(_digigov_ui_navigation_NavList_NavList),
|
|
367
|
-
'@digigov/ui/navigation/NavList/NavListAuto
|
|
368
|
-
'@digigov/ui/navigation/NavList/
|
|
369
|
-
'@digigov/ui/navigation/NavList/NavListAuto/NavListContextAuto': lazyImport(_digigov_ui_navigation_NavList_NavListAuto_NavListContextAuto),
|
|
370
|
-
'@digigov/ui/navigation/NavList/NavListAuto/NavListItemAnchorAuto': lazyImport(_digigov_ui_navigation_NavList_NavListAuto_NavListItemAnchorAuto),
|
|
371
|
-
'@digigov/ui/navigation/NavList/NavListAuto/NavListItemAuto': lazyImport(_digigov_ui_navigation_NavList_NavListAuto_NavListItemAuto),
|
|
372
|
-
'@digigov/ui/navigation/NavList/NavListAuto/NavListItemButtonAuto': lazyImport(_digigov_ui_navigation_NavList_NavListAuto_NavListItemButtonAuto),
|
|
373
|
-
'@digigov/ui/navigation/NavList/NavListAuto/NavListMenuAuto': lazyImport(_digigov_ui_navigation_NavList_NavListAuto_NavListMenuAuto),
|
|
374
|
-
'@digigov/ui/navigation/NavList/NavListAuto/NavListSubMenuAuto': lazyImport(_digigov_ui_navigation_NavList_NavListAuto_NavListSubMenuAuto),
|
|
375
|
-
'@digigov/ui/navigation/NavList/NavListItem': lazyImport(_digigov_ui_navigation_NavList_NavListItem),
|
|
376
|
-
'@digigov/ui/navigation/NavList/NavListItemBase': lazyImport(_digigov_ui_navigation_NavList_NavListItemBase),
|
|
377
|
-
'@digigov/ui/navigation/NavList/NavListItemButton': lazyImport(_digigov_ui_navigation_NavList_NavListItemButton),
|
|
378
|
-
'@digigov/ui/navigation/NavList/NavListItemLink': lazyImport(_digigov_ui_navigation_NavList_NavListItemLink),
|
|
379
|
-
'@digigov/ui/navigation/NavList/NavMenu': lazyImport(_digigov_ui_navigation_NavList_NavMenu),
|
|
380
|
-
'@digigov/ui/navigation/NavList/NavMenuContainer': lazyImport(_digigov_ui_navigation_NavList_NavMenuContainer),
|
|
381
|
-
'@digigov/ui/navigation/NavList/NavMenuContainerContent': lazyImport(_digigov_ui_navigation_NavList_NavMenuContainerContent),
|
|
382
|
-
'@digigov/ui/navigation/NavList/NavMenuContainerContentList': lazyImport(_digigov_ui_navigation_NavList_NavMenuContainerContentList),
|
|
383
|
-
'@digigov/ui/navigation/NavList/NavMenuContainerContentListItem': lazyImport(_digigov_ui_navigation_NavList_NavMenuContainerContentListItem),
|
|
384
|
-
'@digigov/ui/navigation/NavList/NavMenuContainerTitle': lazyImport(_digigov_ui_navigation_NavList_NavMenuContainerTitle),
|
|
385
|
-
'@digigov/ui/navigation/NavList/NavVertical': lazyImport(_digigov_ui_navigation_NavList_NavVertical),
|
|
386
|
-
'@digigov/ui/navigation/NavList/NavVerticalItem': lazyImport(_digigov_ui_navigation_NavList_NavVerticalItem),
|
|
349
|
+
'@digigov/ui/navigation/NavList/NavListAuto': lazyImport(_digigov_ui_navigation_NavList_NavListAuto),
|
|
350
|
+
'@digigov/ui/navigation/NavList/NavMenuContentList': lazyImport(_digigov_ui_navigation_NavList_NavMenuContentList),
|
|
387
351
|
'@digigov/ui/navigation/NavList/types': lazyImport(_digigov_ui_navigation_NavList_types),
|
|
388
352
|
'@digigov/ui/navigation/Pagination': lazyImport(_digigov_ui_navigation_Pagination),
|
|
389
353
|
'@digigov/ui/navigation/SkipLink': lazyImport(_digigov_ui_navigation_SkipLink),
|
|
@@ -23,6 +23,8 @@ import NormalText from '@digigov/ui/typography/NormalText';
|
|
|
23
23
|
|
|
24
24
|
### Font weight
|
|
25
25
|
|
|
26
|
+
<Story packageName="@digigov/ui" component="typography/NormalText" story="FontWeight.tsx" />
|
|
27
|
+
|
|
26
28
|
## API
|
|
27
29
|
|
|
28
30
|
<PropTypes packageName="@digigov/ui" component="NormalText" />
|
|
@@ -23,6 +23,8 @@ import NormalText from '@digigov/ui/typography/NormalText';
|
|
|
23
23
|
|
|
24
24
|
### Font weight
|
|
25
25
|
|
|
26
|
+
<Story packageName="@digigov/ui" component="typography/NormalText" story="FontWeight.tsx" />
|
|
27
|
+
|
|
26
28
|
## API
|
|
27
29
|
|
|
28
30
|
<PropTypes packageName="@digigov/ui" component="NormalText" />
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["layout", "border", "fixed", "openSubMenus", "links", "role"];
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { NavListBaseAuto } from '@digigov/ui/navigation/NavList/NavListAuto/NavListBaseAuto';
|
|
6
|
-
import { NavListProviderAuto } from '@digigov/ui/navigation/NavList/NavListAuto/NavListContextAuto';
|
|
7
|
-
export var NavListAuto = function NavListAuto(_ref) {
|
|
8
|
-
var layout = _ref.layout,
|
|
9
|
-
border = _ref.border,
|
|
10
|
-
fixed = _ref.fixed,
|
|
11
|
-
_ref$openSubMenus = _ref.openSubMenus,
|
|
12
|
-
openSubMenus = _ref$openSubMenus === void 0 ? false : _ref$openSubMenus,
|
|
13
|
-
_ref$links = _ref.links,
|
|
14
|
-
links = _ref$links === void 0 ? [] : _ref$links,
|
|
15
|
-
role = _ref.role,
|
|
16
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
-
|
|
18
|
-
return /*#__PURE__*/React.createElement(NavListProviderAuto, {
|
|
19
|
-
openSubMenus: openSubMenus,
|
|
20
|
-
layout: layout,
|
|
21
|
-
border: border,
|
|
22
|
-
fixed: fixed,
|
|
23
|
-
links: links
|
|
24
|
-
}, /*#__PURE__*/React.createElement(NavListBaseAuto, _extends({
|
|
25
|
-
layout: layout,
|
|
26
|
-
border: border,
|
|
27
|
-
fixed: fixed,
|
|
28
|
-
role: role
|
|
29
|
-
}, props)));
|
|
30
|
-
};
|
|
31
|
-
export default NavListAuto;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "children", "floating", "layout", "subMenu", "role"];
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import Nav from '@digigov/ui/navigation/NavList/Nav';
|
|
6
|
-
import NavList from '@digigov/ui/navigation/NavList/NavList';
|
|
7
|
-
export var NavListBaseAuto = function NavListBaseAuto(_ref) {
|
|
8
|
-
var className = _ref.className,
|
|
9
|
-
children = _ref.children,
|
|
10
|
-
floating = _ref.floating,
|
|
11
|
-
layout = _ref.layout,
|
|
12
|
-
subMenu = _ref.subMenu,
|
|
13
|
-
role = _ref.role,
|
|
14
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
-
|
|
16
|
-
return /*#__PURE__*/React.createElement(Nav, _extends({
|
|
17
|
-
open: true,
|
|
18
|
-
layout: layout
|
|
19
|
-
}, props, {
|
|
20
|
-
"aria-orientation": layout
|
|
21
|
-
}), /*#__PURE__*/React.createElement(NavList, null, children));
|
|
22
|
-
};
|