@digigov/ui 1.0.0-8ae63a77 → 1.0.0-8bbf3ef2
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/Header/Header.stories.playwright.json +1 -1
- package/app/Header/__stories__/WithHeaderNavigation.js +8 -11
- package/app/Header/__stories__/WithNavigation.js +37 -6
- package/app/Modal/Modal.stories.d.ts +1 -0
- package/app/Modal/Modal.stories.js +14 -0
- package/app/Modal/Modal.stories.playwright.json +21 -0
- package/app/Modal/__stories__/Dense.d.ts +2 -0
- package/app/Modal/__stories__/Dense.js +67 -0
- package/app/Modal/index.d.ts +2 -2
- package/es/app/Header/Header.stories.playwright.json +1 -1
- package/es/app/Header/__stories__/WithHeaderNavigation.js +8 -11
- package/es/app/Header/__stories__/WithNavigation.js +28 -6
- package/es/app/Modal/Modal.stories.js +2 -1
- package/es/app/Modal/Modal.stories.playwright.json +21 -0
- package/es/app/Modal/__stories__/Dense.js +43 -0
- package/es/feedback/CopyToClipboard/CopyToClipboard.stories.js +2 -1
- package/es/feedback/CopyToClipboard/CopyToClipboard.stories.playwright.json +16 -0
- package/es/feedback/CopyToClipboard/__stories__/Dense.js +20 -0
- package/es/feedback/CopyToClipboard/index.js +3 -1
- package/es/feedback/ErrorSummary/ErrorSummary.stories.js +1 -0
- package/es/feedback/ErrorSummary/__stories__/Dense.js +15 -0
- package/es/feedback/NotificationBanner/NotificationBanner.stories.js +2 -1
- package/es/feedback/NotificationBanner/__stories__/Dense.js +13 -0
- package/es/feedback/NotificationBanner/index.js +4 -2
- package/es/feedback/WarningText/WarningText.stories.js +2 -1
- package/es/feedback/WarningText/__stories__/Dense.js +11 -0
- package/es/form/Button/Button.stories.js +1 -0
- package/es/form/Button/__stories__/Dense.js +12 -0
- package/es/form/Checkbox/Checkbox.stories.js +2 -1
- package/es/form/Checkbox/__stories__/Dense.js +26 -0
- package/es/form/DateInputContainer/DateInputContainer.stories.js +2 -1
- package/es/form/DateInputContainer/__stories__/Dense.js +23 -0
- package/es/form/RadioContainer/RadioContainer.stories.js +2 -1
- package/es/form/RadioContainer/__stories__/Dense.js +24 -0
- package/es/form/SelectContainer/SelectContainer.stories.js +2 -1
- package/es/form/SelectContainer/__stories__/Dense.js +23 -0
- package/es/form/TextArea/TextArea.stories.js +2 -1
- package/es/form/TextArea/__stories__/Dense.js +14 -0
- package/es/form/TextInput/TextInput.stories.js +2 -1
- package/es/form/TextInput/__stories__/Dense.js +14 -0
- package/es/navigation/Link/index.js +1 -1
- package/es/navigation/NavList/NavList.stories.js +7 -5
- package/es/navigation/NavList/NavList.stories.playwright.json +24 -4
- package/es/navigation/NavList/NavListAuto/index.js +6 -12
- package/es/navigation/NavList/__stories__/Default.js +16 -26
- package/es/navigation/NavList/__stories__/HorizontalWithDrawer.js +67 -0
- package/{esm/navigation/NavList/__stories__/WithSubMenu.js → es/navigation/NavList/__stories__/HorizontalWithoutDrawer.js} +5 -37
- package/es/navigation/NavList/__stories__/NavLinksOneLevel.json +17 -0
- package/es/navigation/NavList/__stories__/NavLinksWithSubmenu.json +36 -0
- package/es/navigation/NavList/__stories__/NavListWithoutNav.js +19 -0
- package/es/navigation/NavList/__stories__/UsingHeaderButton.js +70 -0
- package/es/navigation/NavList/__stories__/UsingNavListAuto.js +38 -0
- package/es/navigation/NavList/__stories__/Vertical.js +32 -0
- package/{esm/navigation/NavList/__stories__/NavVerticalLayout.js → es/navigation/NavList/__stories__/VerticalWithoutDrawer.js} +6 -38
- package/es/navigation/NavList/index.js +1 -3
- package/es/navigation/NavList/index.mdx +9 -3
- package/es/registry.js +2 -0
- package/es/utils/Typography/index.js +3 -0
- package/esm/app/Header/Header.stories.playwright.json +1 -1
- package/esm/app/Header/__stories__/WithHeaderNavigation.js +8 -11
- package/esm/app/Header/__stories__/WithNavigation.js +28 -6
- package/esm/app/Modal/Modal.stories.js +2 -1
- package/esm/app/Modal/Modal.stories.playwright.json +21 -0
- package/esm/app/Modal/__stories__/Dense.js +43 -0
- package/esm/feedback/CopyToClipboard/CopyToClipboard.stories.js +2 -1
- package/esm/feedback/CopyToClipboard/CopyToClipboard.stories.playwright.json +16 -0
- package/esm/feedback/CopyToClipboard/__stories__/Dense.js +20 -0
- package/esm/feedback/CopyToClipboard/index.js +3 -1
- package/esm/feedback/ErrorSummary/ErrorSummary.stories.js +1 -0
- package/esm/feedback/ErrorSummary/__stories__/Dense.js +15 -0
- package/esm/feedback/NotificationBanner/NotificationBanner.stories.js +2 -1
- package/esm/feedback/NotificationBanner/__stories__/Dense.js +13 -0
- package/esm/feedback/NotificationBanner/index.js +4 -2
- package/esm/feedback/WarningText/WarningText.stories.js +2 -1
- package/esm/feedback/WarningText/__stories__/Dense.js +11 -0
- package/esm/form/Button/Button.stories.js +1 -0
- package/esm/form/Button/__stories__/Dense.js +12 -0
- package/esm/form/Checkbox/Checkbox.stories.js +2 -1
- package/esm/form/Checkbox/__stories__/Dense.js +26 -0
- package/esm/form/DateInputContainer/DateInputContainer.stories.js +2 -1
- package/esm/form/DateInputContainer/__stories__/Dense.js +23 -0
- package/esm/form/RadioContainer/RadioContainer.stories.js +2 -1
- package/esm/form/RadioContainer/__stories__/Dense.js +24 -0
- package/esm/form/SelectContainer/SelectContainer.stories.js +2 -1
- package/esm/form/SelectContainer/__stories__/Dense.js +23 -0
- package/esm/form/TextArea/TextArea.stories.js +2 -1
- package/esm/form/TextArea/__stories__/Dense.js +14 -0
- package/esm/form/TextInput/TextInput.stories.js +2 -1
- package/esm/form/TextInput/__stories__/Dense.js +14 -0
- package/esm/index.js +1 -1
- package/esm/navigation/Link/index.js +1 -1
- package/esm/navigation/NavList/NavList.stories.js +7 -5
- package/esm/navigation/NavList/NavList.stories.playwright.json +24 -4
- package/esm/navigation/NavList/NavListAuto/index.js +6 -12
- package/esm/navigation/NavList/__stories__/Default.js +16 -26
- package/esm/navigation/NavList/__stories__/HorizontalWithDrawer.js +67 -0
- package/{es/navigation/NavList/__stories__/WithSubMenu.js → esm/navigation/NavList/__stories__/HorizontalWithoutDrawer.js} +5 -37
- package/esm/navigation/NavList/__stories__/NavLinksOneLevel.json +17 -0
- package/esm/navigation/NavList/__stories__/NavLinksWithSubmenu.json +36 -0
- package/esm/navigation/NavList/__stories__/NavListWithoutNav.js +19 -0
- package/esm/navigation/NavList/__stories__/UsingHeaderButton.js +70 -0
- package/esm/navigation/NavList/__stories__/UsingNavListAuto.js +38 -0
- package/esm/navigation/NavList/__stories__/Vertical.js +32 -0
- package/{es/navigation/NavList/__stories__/NavVerticalLayout.js → esm/navigation/NavList/__stories__/VerticalWithoutDrawer.js} +6 -38
- package/esm/navigation/NavList/index.js +1 -3
- package/esm/navigation/NavList/index.mdx +9 -3
- package/esm/registry.js +2 -0
- package/esm/utils/Typography/index.js +3 -0
- package/feedback/CopyToClipboard/CopyToClipboard.stories.d.ts +1 -0
- package/feedback/CopyToClipboard/CopyToClipboard.stories.js +14 -0
- package/feedback/CopyToClipboard/CopyToClipboard.stories.playwright.json +16 -0
- package/feedback/CopyToClipboard/__stories__/Dense.d.ts +2 -0
- package/feedback/CopyToClipboard/__stories__/Dense.js +34 -0
- package/feedback/CopyToClipboard/index.d.ts +1 -1
- package/feedback/CopyToClipboard/index.js +3 -1
- package/feedback/ErrorSummary/ErrorSummary.stories.d.ts +1 -0
- package/feedback/ErrorSummary/ErrorSummary.stories.js +14 -0
- package/feedback/ErrorSummary/__stories__/Dense.d.ts +2 -0
- package/feedback/ErrorSummary/__stories__/Dense.js +30 -0
- package/feedback/NotificationBanner/NotificationBanner.stories.d.ts +1 -0
- package/feedback/NotificationBanner/NotificationBanner.stories.js +14 -0
- package/feedback/NotificationBanner/__stories__/Dense.d.ts +2 -0
- package/feedback/NotificationBanner/__stories__/Dense.js +27 -0
- package/feedback/NotificationBanner/index.js +4 -2
- package/feedback/WarningText/WarningText.stories.d.ts +1 -0
- package/feedback/WarningText/WarningText.stories.js +14 -0
- package/feedback/WarningText/__stories__/Dense.d.ts +2 -0
- package/feedback/WarningText/__stories__/Dense.js +24 -0
- package/form/Button/Button.stories.d.ts +1 -0
- package/form/Button/Button.stories.js +14 -0
- package/form/Button/__stories__/Dense.d.ts +2 -0
- package/form/Button/__stories__/Dense.js +25 -0
- package/form/Checkbox/Checkbox.stories.d.ts +1 -0
- package/form/Checkbox/Checkbox.stories.js +14 -0
- package/form/Checkbox/__stories__/Dense.d.ts +2 -0
- package/form/Checkbox/__stories__/Dense.js +41 -0
- package/form/DateInputContainer/DateInputContainer.stories.d.ts +1 -0
- package/form/DateInputContainer/DateInputContainer.stories.js +14 -0
- package/form/DateInputContainer/__stories__/Dense.d.ts +2 -0
- package/form/DateInputContainer/__stories__/Dense.js +37 -0
- package/form/RadioContainer/RadioContainer.stories.d.ts +1 -0
- package/form/RadioContainer/RadioContainer.stories.js +14 -0
- package/form/RadioContainer/__stories__/Dense.d.ts +2 -0
- package/form/RadioContainer/__stories__/Dense.js +38 -0
- package/form/SelectContainer/SelectContainer.stories.d.ts +1 -0
- package/form/SelectContainer/SelectContainer.stories.js +14 -0
- package/form/SelectContainer/__stories__/Dense.d.ts +2 -0
- package/form/SelectContainer/__stories__/Dense.js +38 -0
- package/form/TextArea/TextArea.stories.d.ts +1 -0
- package/form/TextArea/TextArea.stories.js +14 -0
- package/form/TextArea/__stories__/Dense.d.ts +2 -0
- package/form/TextArea/__stories__/Dense.js +29 -0
- package/form/TextInput/TextInput.stories.d.ts +1 -0
- package/form/TextInput/TextInput.stories.js +14 -0
- package/form/TextInput/__stories__/Dense.d.ts +2 -0
- package/form/TextInput/__stories__/Dense.js +29 -0
- package/navigation/Link/index.d.ts +1 -1
- package/navigation/Link/index.js +12 -13
- package/navigation/NavList/NavList.stories.d.ts +7 -5
- package/navigation/NavList/NavList.stories.js +48 -20
- package/navigation/NavList/NavList.stories.playwright.json +24 -4
- package/navigation/NavList/NavListAuto/index.js +6 -12
- package/navigation/NavList/__stories__/Default.js +24 -27
- package/navigation/NavList/__stories__/HorizontalWithDrawer.d.ts +2 -0
- package/navigation/NavList/__stories__/HorizontalWithDrawer.js +93 -0
- package/navigation/NavList/__stories__/HorizontalWithoutDrawer.d.ts +2 -0
- package/navigation/NavList/__stories__/{WithSubMenu.js → HorizontalWithoutDrawer.js} +9 -41
- package/navigation/NavList/__stories__/NavLinksOneLevel.json +17 -0
- package/navigation/NavList/__stories__/NavLinksWithSubmenu.json +36 -0
- package/navigation/NavList/__stories__/NavListWithoutNav.d.ts +2 -0
- package/navigation/NavList/__stories__/NavListWithoutNav.js +35 -0
- package/navigation/NavList/__stories__/UsingHeaderButton.d.ts +2 -0
- package/navigation/NavList/__stories__/UsingHeaderButton.js +98 -0
- package/navigation/NavList/__stories__/UsingNavListAuto.d.ts +2 -0
- package/navigation/NavList/__stories__/UsingNavListAuto.js +55 -0
- package/navigation/NavList/__stories__/Vertical.d.ts +2 -0
- package/navigation/NavList/__stories__/{WithBurgerIcon.js → Vertical.js} +25 -52
- package/navigation/NavList/__stories__/VerticalWithoutDrawer.d.ts +2 -0
- package/navigation/NavList/__stories__/{NavVerticalLayout.js → VerticalWithoutDrawer.js} +9 -41
- package/navigation/NavList/index.d.ts +1 -3
- package/navigation/NavList/index.js +8 -8
- package/navigation/NavList/index.mdx +9 -3
- package/navigation/NavList/types.d.ts +1 -0
- package/package.json +4 -4
- package/registry.d.ts +1 -0
- package/registry.js +3 -0
- package/src/app/Header/Header.stories.playwright.json +1 -1
- package/src/app/Header/__stories__/WithHeaderNavigation.tsx +33 -36
- package/src/app/Header/__stories__/WithNavigation.tsx +21 -15
- package/src/app/Modal/Modal.stories.js +1 -0
- package/src/app/Modal/Modal.stories.playwright.json +21 -0
- package/src/app/Modal/__stories__/Dense.tsx +52 -0
- package/src/feedback/CopyToClipboard/CopyToClipboard.stories.js +1 -0
- package/src/feedback/CopyToClipboard/CopyToClipboard.stories.playwright.json +16 -0
- package/src/feedback/CopyToClipboard/__stories__/Dense.tsx +21 -0
- package/src/feedback/CopyToClipboard/index.tsx +2 -1
- package/src/feedback/ErrorSummary/ErrorSummary.stories.js +1 -0
- package/src/feedback/ErrorSummary/__stories__/Dense.tsx +13 -0
- package/src/feedback/NotificationBanner/NotificationBanner.stories.js +1 -0
- package/src/feedback/NotificationBanner/__stories__/Dense.tsx +17 -0
- package/src/feedback/NotificationBanner/index.tsx +2 -1
- package/src/feedback/WarningText/WarningText.stories.js +1 -0
- package/src/feedback/WarningText/__stories__/Dense.tsx +10 -0
- package/src/form/Button/Button.stories.js +1 -0
- package/src/form/Button/__stories__/Dense.tsx +8 -0
- package/src/form/Checkbox/Checkbox.stories.js +1 -0
- package/src/form/Checkbox/__stories__/Dense.tsx +35 -0
- package/src/form/DateInputContainer/DateInputContainer.stories.js +1 -0
- package/src/form/DateInputContainer/__stories__/Dense.tsx +31 -0
- package/src/form/RadioContainer/RadioContainer.stories.js +1 -0
- package/src/form/RadioContainer/__stories__/Dense.tsx +32 -0
- package/src/form/SelectContainer/SelectContainer.stories.js +1 -0
- package/src/form/SelectContainer/__stories__/Dense.tsx +24 -0
- package/src/form/TextArea/TextArea.stories.js +1 -0
- package/src/form/TextArea/__stories__/Dense.tsx +15 -0
- package/src/form/TextInput/TextInput.stories.js +1 -0
- package/src/form/TextInput/__stories__/Dense.tsx +15 -0
- package/src/navigation/Link/index.tsx +1 -1
- package/src/navigation/NavList/NavList.stories.js +7 -5
- package/src/navigation/NavList/NavList.stories.playwright.json +24 -4
- package/src/navigation/NavList/NavListAuto/index.tsx +30 -28
- package/src/navigation/NavList/__stories__/Default.tsx +11 -16
- package/src/navigation/NavList/__stories__/HorizontalWithDrawer.tsx +84 -0
- package/src/navigation/NavList/__stories__/{WithSubMenu.tsx → HorizontalWithoutDrawer.tsx} +12 -44
- package/src/navigation/NavList/__stories__/NavLinksOneLevel.json +17 -0
- package/src/navigation/NavList/__stories__/NavLinksWithSubmenu.json +36 -0
- package/src/navigation/NavList/__stories__/NavListWithoutNav.tsx +24 -0
- package/src/navigation/NavList/__stories__/UsingHeaderButton.tsx +89 -0
- package/src/navigation/NavList/__stories__/UsingNavListAuto.tsx +32 -0
- package/src/navigation/NavList/__stories__/Vertical.tsx +33 -0
- package/src/navigation/NavList/__stories__/{NavVerticalLayout.tsx → VerticalWithoutDrawer.tsx} +11 -44
- package/src/navigation/NavList/index.mdx +9 -3
- package/src/navigation/NavList/index.tsx +1 -3
- package/src/navigation/NavList/types.tsx +1 -0
- package/src/registry.js +2 -0
- package/src/utils/Typography/index.tsx +4 -0
- package/utils/Typography/index.d.ts +3 -0
- package/utils/Typography/index.js +19 -0
- package/es/navigation/NavList/__stories__/NavVertical.js +0 -37
- package/es/navigation/NavList/__stories__/NavVerticalWithTitle.js +0 -43
- package/es/navigation/NavList/__stories__/WithBurgerIcon.js +0 -56
- package/esm/navigation/NavList/__stories__/NavVertical.js +0 -37
- package/esm/navigation/NavList/__stories__/NavVerticalWithTitle.js +0 -43
- package/esm/navigation/NavList/__stories__/WithBurgerIcon.js +0 -56
- package/navigation/NavList/__stories__/NavVertical.d.ts +0 -2
- package/navigation/NavList/__stories__/NavVertical.js +0 -53
- package/navigation/NavList/__stories__/NavVerticalLayout.d.ts +0 -2
- package/navigation/NavList/__stories__/NavVerticalWithTitle.d.ts +0 -2
- package/navigation/NavList/__stories__/NavVerticalWithTitle.js +0 -59
- package/navigation/NavList/__stories__/WithBurgerIcon.d.ts +0 -2
- package/navigation/NavList/__stories__/WithSubMenu.d.ts +0 -2
- package/src/navigation/NavList/__stories__/NavVertical.tsx +0 -36
- package/src/navigation/NavList/__stories__/NavVerticalWithTitle.tsx +0 -40
- package/src/navigation/NavList/__stories__/WithBurgerIcon.tsx +0 -49
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
[
|
|
2
|
+
{ "name": "home", "href": "#home", "label": "Αρχική" },
|
|
3
|
+
{
|
|
4
|
+
"name": "educational",
|
|
5
|
+
"label": "Εκπαιδευτικό υλικό",
|
|
6
|
+
"subMenuHeading": "Εκπαιδευτικό υλικό",
|
|
7
|
+
"subMenu": [
|
|
8
|
+
{
|
|
9
|
+
"name": "elearning",
|
|
10
|
+
"href": "#elearning",
|
|
11
|
+
"label": "Εκπαιδευτική πλατφόρμα"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "videos",
|
|
15
|
+
"href": "#videos",
|
|
16
|
+
"label": "Βίντεο"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "presentations",
|
|
20
|
+
"href": "#presentations",
|
|
21
|
+
"label": "Παρουσιάσεις"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "promoting",
|
|
25
|
+
"href": "#promoting",
|
|
26
|
+
"label": "Προωθώντας την αθλητική ακεραιότητα στην νέα γενιά"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "other-texts",
|
|
30
|
+
"href": "#other-texts",
|
|
31
|
+
"label": "Άλλα κείμενα"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{ "name": "news", "href": "#news", "label": "Νέα" }
|
|
36
|
+
]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
NavList,
|
|
4
|
+
NavListItemAction,
|
|
5
|
+
useNavList,
|
|
6
|
+
} from '@digigov/ui/navigation/NavList';
|
|
7
|
+
import links from './NavLinksOneLevel.json';
|
|
8
|
+
|
|
9
|
+
export const NavListWithoutNav = () => {
|
|
10
|
+
const layout = 'vertical';
|
|
11
|
+
const { registerNavItem } = useNavList();
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<NavList layout={layout}>
|
|
15
|
+
{links.map((item, key) => (
|
|
16
|
+
<NavListItemAction {...registerNavItem(item)} key={key}>
|
|
17
|
+
{item.label}
|
|
18
|
+
</NavListItemAction>
|
|
19
|
+
))}
|
|
20
|
+
</NavList>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default NavListWithoutNav;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Top } from '@digigov/ui/layouts/Basic/Top';
|
|
3
|
+
import {
|
|
4
|
+
Header,
|
|
5
|
+
HeaderSection,
|
|
6
|
+
HeaderContent,
|
|
7
|
+
HeaderTitle,
|
|
8
|
+
} from '@digigov/ui/app/Header';
|
|
9
|
+
import { GovGRLogo } from '@digigov/ui/govgr/GovGRLogo';
|
|
10
|
+
import { Paragraph } from '@digigov/ui/typography/Paragraph';
|
|
11
|
+
import {
|
|
12
|
+
Nav,
|
|
13
|
+
NavMenuContainer,
|
|
14
|
+
NavMenuTitle,
|
|
15
|
+
NavMenuContent,
|
|
16
|
+
NavMenuContentList,
|
|
17
|
+
NavMenuContentListItem,
|
|
18
|
+
} from '@digigov/ui/navigation/NavList';
|
|
19
|
+
import { Link } from '@digigov/ui/navigation/Link';
|
|
20
|
+
import { Button } from '@digigov/ui/form/Button';
|
|
21
|
+
import ArrowIcon from '@digigov/react-icons/ArrowIcon';
|
|
22
|
+
|
|
23
|
+
const links: any = [];
|
|
24
|
+
for (let index = 0; index < 14; index++) {
|
|
25
|
+
links.push({
|
|
26
|
+
name: `Nav${index}`,
|
|
27
|
+
label: `σύνδεσμος ${index + 1}`,
|
|
28
|
+
href: `?q=item${index + 1}`,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const menuLabel = 'Επιλογές';
|
|
33
|
+
const menuTitle = 'Επιλογές της υπηρεσίας';
|
|
34
|
+
|
|
35
|
+
export const UsingHeaderButton = () => {
|
|
36
|
+
const [open, setOpen] = useState(false);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Top>
|
|
40
|
+
<Header>
|
|
41
|
+
<HeaderContent>
|
|
42
|
+
<HeaderSection>
|
|
43
|
+
<GovGRLogo href="#" />
|
|
44
|
+
<HeaderTitle>Τίτλος Υπηρεσίας</HeaderTitle>
|
|
45
|
+
</HeaderSection>
|
|
46
|
+
<HeaderSection>
|
|
47
|
+
<Button variant="link" onClick={() => setOpen(!open)}>
|
|
48
|
+
{menuLabel}<ArrowIcon direction={open? 'up' : "down"} />
|
|
49
|
+
</Button>
|
|
50
|
+
</HeaderSection>
|
|
51
|
+
</HeaderContent>
|
|
52
|
+
</Header>
|
|
53
|
+
<Nav
|
|
54
|
+
open={open}
|
|
55
|
+
drawer="smDown"
|
|
56
|
+
onClose={() => setOpen(false)}
|
|
57
|
+
closeButtonLabel="Κλείσιμο"
|
|
58
|
+
aria-label="navigation list"
|
|
59
|
+
>
|
|
60
|
+
<NavMenuContainer active={open}>
|
|
61
|
+
<NavMenuContent md={12}>
|
|
62
|
+
<Paragraph>
|
|
63
|
+
Εξερευνήστε τις δυνατότητες της Υπηρεσίας, επιλέγοντας από τους παρακάτω συνδέσμους:
|
|
64
|
+
</Paragraph>
|
|
65
|
+
</NavMenuContent>
|
|
66
|
+
<NavMenuTitle>{menuTitle || menuLabel}</NavMenuTitle>
|
|
67
|
+
<NavMenuContent>
|
|
68
|
+
<NavMenuContentList role="menu">
|
|
69
|
+
{links &&
|
|
70
|
+
links.map((item, menuIndex) => {
|
|
71
|
+
return (
|
|
72
|
+
<NavMenuContentListItem key={menuIndex} role="presentation">
|
|
73
|
+
{item?.href && (
|
|
74
|
+
<Link role="menuitem" id={item.name} href={item.href}>
|
|
75
|
+
{item.label}
|
|
76
|
+
</Link>
|
|
77
|
+
)}
|
|
78
|
+
</NavMenuContentListItem>
|
|
79
|
+
);
|
|
80
|
+
})}
|
|
81
|
+
</NavMenuContentList>
|
|
82
|
+
</NavMenuContent>
|
|
83
|
+
</NavMenuContainer>
|
|
84
|
+
</Nav>
|
|
85
|
+
</Top>
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export default UsingHeaderButton;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
NavListAuto,
|
|
4
|
+
} from '@digigov/ui/navigation/NavList';
|
|
5
|
+
import links from './NavLinksWithSubmenu.json';
|
|
6
|
+
import { Button } from '@digigov/ui/form/Button';
|
|
7
|
+
import BurgerIcon from '@digigov/react-icons/BurgerIcon';
|
|
8
|
+
|
|
9
|
+
export const UsingNavListAuto = () => {
|
|
10
|
+
const layout = 'horizontal';
|
|
11
|
+
const drawer = 'smDown';
|
|
12
|
+
const border = true;
|
|
13
|
+
const [open, setOpen] = React.useState(false);
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<Button color="secondary" onClick={() => setOpen(!open)} smUpHidden>
|
|
17
|
+
Επιλογές <BurgerIcon />
|
|
18
|
+
</Button>
|
|
19
|
+
<NavListAuto
|
|
20
|
+
layout={layout}
|
|
21
|
+
border={border}
|
|
22
|
+
drawer={drawer}
|
|
23
|
+
open={open}
|
|
24
|
+
links={links}
|
|
25
|
+
onClose={() => setOpen(false)}
|
|
26
|
+
aria-label="Nav list"
|
|
27
|
+
></NavListAuto>
|
|
28
|
+
</>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default UsingNavListAuto;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Nav,
|
|
4
|
+
NavList,
|
|
5
|
+
NavListItemAction,
|
|
6
|
+
useNavList,
|
|
7
|
+
} from '@digigov/ui/navigation/NavList';
|
|
8
|
+
import links from './NavLinksOneLevel.json';
|
|
9
|
+
|
|
10
|
+
export const Vertical = () => {
|
|
11
|
+
const layout = 'vertical';
|
|
12
|
+
const { registerNavItem } = useNavList();
|
|
13
|
+
const [useActive, setUseActive] = useState("");
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<Nav aria-orientation={layout || 'horizontal'} aria-label="navigation list">
|
|
17
|
+
<NavList layout={layout}>
|
|
18
|
+
{links.map((item, key) => (
|
|
19
|
+
<NavListItemAction
|
|
20
|
+
{...registerNavItem(item)}
|
|
21
|
+
key={key}
|
|
22
|
+
active={item.name === useActive}
|
|
23
|
+
onClick={() => setUseActive(item.name)}
|
|
24
|
+
>
|
|
25
|
+
{item.label}
|
|
26
|
+
</NavListItemAction>
|
|
27
|
+
))}
|
|
28
|
+
</NavList>
|
|
29
|
+
</Nav>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default Vertical;
|
package/src/navigation/NavList/__stories__/{NavVerticalLayout.tsx → VerticalWithoutDrawer.tsx}
RENAMED
|
@@ -12,59 +12,26 @@ import {
|
|
|
12
12
|
} from '@digigov/ui/navigation/NavList';
|
|
13
13
|
import { useNavList } from '@digigov/ui/navigation/NavList/hooks/useNavList';
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
{ name: 'home', href: '#home', label: 'Αρχική' },
|
|
17
|
-
{
|
|
18
|
-
name: 'educational',
|
|
19
|
-
// href: '#',
|
|
20
|
-
label: 'Εκπαιδευτικό υλικό',
|
|
21
|
-
subMenu: [
|
|
22
|
-
{
|
|
23
|
-
name: 'elearning',
|
|
24
|
-
href: '#elearning',
|
|
25
|
-
label: 'Εκπαιδευτική πλατφόρμα',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'videos',
|
|
29
|
-
href: '#videos',
|
|
30
|
-
label: 'Βίντεο',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: 'presentations',
|
|
34
|
-
href: '#presentations',
|
|
35
|
-
label: 'Παρουσιάσεις',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: 'promoting',
|
|
39
|
-
href: '#promoting',
|
|
40
|
-
label: 'Προωθώντας την αθλητική ακεραιότητα στην νέα γενιά',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: 'other-texts',
|
|
44
|
-
href: '#other-texts',
|
|
45
|
-
label: 'Άλλα κείμενα',
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
},
|
|
49
|
-
{ name: 'news', href: '#news', label: 'Νέα' },
|
|
50
|
-
];
|
|
15
|
+
import links from './NavLinksWithSubmenu.json';
|
|
51
16
|
|
|
52
|
-
export const
|
|
17
|
+
export const VerticalWithoutDrawer = () => {
|
|
53
18
|
const layout = 'vertical';
|
|
54
19
|
const border = false;
|
|
55
20
|
const { registerNavItemMenu, registerNavItem } = useNavList();
|
|
56
21
|
|
|
57
|
-
|
|
58
|
-
|
|
59
22
|
return (
|
|
60
|
-
<Nav
|
|
23
|
+
<Nav
|
|
24
|
+
border={border}
|
|
25
|
+
aria-orientation={layout || 'horizontal'}
|
|
26
|
+
aria-label="navigation list"
|
|
27
|
+
>
|
|
61
28
|
<NavList layout={layout}>
|
|
62
29
|
{links.map((item, key) => (
|
|
63
30
|
<React.Fragment key={key}>
|
|
64
|
-
<NavListItemAction {...registerNavItem(item)}
|
|
31
|
+
<NavListItemAction {...registerNavItem(item)}>
|
|
65
32
|
{item.label}
|
|
66
33
|
</NavListItemAction>
|
|
67
|
-
{item.subMenu &&
|
|
34
|
+
{item.subMenu && (
|
|
68
35
|
<NavMenuContainer
|
|
69
36
|
layout={layout}
|
|
70
37
|
paddingLeft={5}
|
|
@@ -95,7 +62,7 @@ export const NavVerticalLayout = () => {
|
|
|
95
62
|
</NavMenuContentList>
|
|
96
63
|
</NavMenuContent>
|
|
97
64
|
</NavMenuContainer>
|
|
98
|
-
}
|
|
65
|
+
)}
|
|
99
66
|
</React.Fragment>
|
|
100
67
|
))}
|
|
101
68
|
</NavList>
|
|
@@ -103,4 +70,4 @@ export const NavVerticalLayout = () => {
|
|
|
103
70
|
);
|
|
104
71
|
};
|
|
105
72
|
|
|
106
|
-
export default
|
|
73
|
+
export default VerticalWithoutDrawer;
|
|
@@ -9,13 +9,19 @@ import NavList, { NavListItem } from '@digigov/ui/navigation/NavList';
|
|
|
9
9
|
|
|
10
10
|
## How to use
|
|
11
11
|
|
|
12
|
-
###
|
|
12
|
+
### Horizontal NavList
|
|
13
13
|
|
|
14
14
|
<Story packageName="@digigov/ui" component="navigation/NavList" story="Default.tsx" />
|
|
15
15
|
|
|
16
|
-
###
|
|
16
|
+
### Vertical NavList
|
|
17
|
+
|
|
18
|
+
<Story packageName="@digigov/ui" component="navigation/NavList" story="Vertical.tsx" />
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### NavListAuto
|
|
22
|
+
|
|
23
|
+
<Story packageName="@digigov/ui" component="navigation/NavList" story="UsingNavListAuto.tsx" />
|
|
17
24
|
|
|
18
|
-
<Story packageName="@digigov/ui" component="navigation/NavList" story="NavVerticalLayout.tsx" />
|
|
19
25
|
|
|
20
26
|
## Accessibility
|
|
21
27
|
|
|
@@ -11,10 +11,8 @@ export * from '@digigov/react-core/NavMenuContent';
|
|
|
11
11
|
export * from '@digigov/react-core/NavMenuContentListBase';
|
|
12
12
|
export * from '@digigov/react-core/NavMenuContentListItem';
|
|
13
13
|
export * from '@digigov/react-core/NavMenuTitle';
|
|
14
|
-
export * from '@digigov/react-core/NavListItemAction';
|
|
15
|
-
export * from '@digigov/react-core/NavListItemAction';
|
|
16
14
|
export * from '@digigov/react-core/NavListItemActionContainer';
|
|
15
|
+
export * from '@digigov/react-core/NavListItemAction';
|
|
17
16
|
export * from '@digigov/react-core/NavListItemLink';
|
|
18
17
|
export * from '@digigov/react-core/NavListItemButton';
|
|
19
|
-
export * from '@digigov/react-core/NavListItemAction';
|
|
20
18
|
export default NavList;
|
package/src/registry.js
CHANGED
|
@@ -177,6 +177,7 @@ import * as _digigov_ui_utils_Kitchensink_KitchensinkByLetter from '@digigov/ui/
|
|
|
177
177
|
import * as _digigov_ui_utils_Kitchensink_KitchensinkComponent from '@digigov/ui/utils/Kitchensink/KitchensinkComponent';
|
|
178
178
|
import * as _digigov_ui_utils_Kitchensink_KitchensinkDashboard from '@digigov/ui/utils/Kitchensink/KitchensinkDashboard';
|
|
179
179
|
import * as _digigov_ui_utils_SvgIcon from '@digigov/ui/utils/SvgIcon';
|
|
180
|
+
import * as _digigov_ui_utils_Typography from '@digigov/ui/utils/Typography';
|
|
180
181
|
import * as _digigov_ui_utils_VisuallyHidden from '@digigov/ui/utils/VisuallyHidden';
|
|
181
182
|
import * as _digigov_ui_utils_withDeprecation from '@digigov/ui/utils/withDeprecation'
|
|
182
183
|
function lazyImport(pkgImport) {
|
|
@@ -377,6 +378,7 @@ export default {
|
|
|
377
378
|
'@digigov/ui/utils/Kitchensink/KitchensinkComponent': lazyImport(_digigov_ui_utils_Kitchensink_KitchensinkComponent),
|
|
378
379
|
'@digigov/ui/utils/Kitchensink/KitchensinkDashboard': lazyImport(_digigov_ui_utils_Kitchensink_KitchensinkDashboard),
|
|
379
380
|
'@digigov/ui/utils/SvgIcon': lazyImport(_digigov_ui_utils_SvgIcon),
|
|
381
|
+
'@digigov/ui/utils/Typography': lazyImport(_digigov_ui_utils_Typography),
|
|
380
382
|
'@digigov/ui/utils/VisuallyHidden': lazyImport(_digigov_ui_utils_VisuallyHidden),
|
|
381
383
|
'@digigov/ui/utils/withDeprecation': lazyImport(_digigov_ui_utils_withDeprecation)
|
|
382
384
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "Typography", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _Typography["default"];
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
exports["default"] = void 0;
|
|
15
|
+
|
|
16
|
+
var _Typography = _interopRequireDefault(require("@digigov/react-core/Typography"));
|
|
17
|
+
|
|
18
|
+
var _default = _Typography["default"];
|
|
19
|
+
exports["default"] = _default;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Nav, NavList, NavListItemAction, useNavList } from '@digigov/ui/navigation/NavList';
|
|
4
|
-
var links = [{
|
|
5
|
-
name: 'link_1',
|
|
6
|
-
href: '#link_1',
|
|
7
|
-
label: 'Σύνδεσμος 1',
|
|
8
|
-
active: true
|
|
9
|
-
}, {
|
|
10
|
-
name: 'link_2',
|
|
11
|
-
href: '#link_2',
|
|
12
|
-
label: 'Σύνδεσμος 2'
|
|
13
|
-
}, {
|
|
14
|
-
name: 'link_3',
|
|
15
|
-
href: '#link_3',
|
|
16
|
-
label: 'Σύνδεσμος 3'
|
|
17
|
-
}];
|
|
18
|
-
export var NavVertical = function NavVertical() {
|
|
19
|
-
var _useNavList = useNavList(),
|
|
20
|
-
registerNavItem = _useNavList.registerNavItem;
|
|
21
|
-
|
|
22
|
-
return /*#__PURE__*/React.createElement(Nav, {
|
|
23
|
-
"aria-orientation": "vertical",
|
|
24
|
-
"aria-label": "Nav list",
|
|
25
|
-
fixed: false,
|
|
26
|
-
border: false
|
|
27
|
-
}, /*#__PURE__*/React.createElement(NavList, {
|
|
28
|
-
layout: "vertical"
|
|
29
|
-
}, links.map(function (item, key) {
|
|
30
|
-
return /*#__PURE__*/React.createElement(NavListItemAction, _extends({
|
|
31
|
-
key: key
|
|
32
|
-
}, registerNavItem(item), {
|
|
33
|
-
active: item === null || item === void 0 ? void 0 : item.active
|
|
34
|
-
}), item.label);
|
|
35
|
-
})));
|
|
36
|
-
};
|
|
37
|
-
export default NavVertical;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Nav, NavList, NavListItemAction, useNavList } from '@digigov/ui/navigation/NavList';
|
|
4
|
-
import { Heading } from '@digigov/ui/typography/Heading';
|
|
5
|
-
var links = [{
|
|
6
|
-
name: 'link_1',
|
|
7
|
-
href: '#link_1',
|
|
8
|
-
label: 'Σύνδεσμος 1',
|
|
9
|
-
active: true
|
|
10
|
-
}, {
|
|
11
|
-
name: 'link_2',
|
|
12
|
-
href: '#link_2',
|
|
13
|
-
label: 'Σύνδεσμος 2'
|
|
14
|
-
}, {
|
|
15
|
-
name: 'link_3',
|
|
16
|
-
href: '#link_3',
|
|
17
|
-
label: 'Σύνδεσμος 3'
|
|
18
|
-
}];
|
|
19
|
-
|
|
20
|
-
var _ref = /*#__PURE__*/React.createElement(Heading, {
|
|
21
|
-
size: "sm"
|
|
22
|
-
}, "\u03A3\u03C7\u03B5\u03C4\u03B9\u03BA\u03BF\u03AF \u03A3\u03CD\u03BD\u03B4\u03B5\u03C3\u03BC\u03BF\u03B9");
|
|
23
|
-
|
|
24
|
-
export var NavVerticalWithTitle = function NavVerticalWithTitle() {
|
|
25
|
-
var _useNavList = useNavList(),
|
|
26
|
-
registerNavItem = _useNavList.registerNavItem;
|
|
27
|
-
|
|
28
|
-
return /*#__PURE__*/React.createElement("div", null, _ref, /*#__PURE__*/React.createElement(Nav, {
|
|
29
|
-
"aria-orientation": "vertical",
|
|
30
|
-
"aria-label": "Nav list",
|
|
31
|
-
fixed: false,
|
|
32
|
-
border: false
|
|
33
|
-
}, /*#__PURE__*/React.createElement(NavList, {
|
|
34
|
-
layout: "vertical"
|
|
35
|
-
}, links.map(function (item, key) {
|
|
36
|
-
return /*#__PURE__*/React.createElement(NavListItemAction, _extends({
|
|
37
|
-
key: key
|
|
38
|
-
}, registerNavItem(item), {
|
|
39
|
-
active: item === null || item === void 0 ? void 0 : item.active
|
|
40
|
-
}), item.label);
|
|
41
|
-
}))));
|
|
42
|
-
};
|
|
43
|
-
export default NavVerticalWithTitle;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import React, { useState } from 'react';
|
|
4
|
-
import NavList from '@digigov/ui/navigation/NavList/NavList';
|
|
5
|
-
import { BurgerIcon } from '@digigov/ui/icons';
|
|
6
|
-
import { Nav, NavListItemAction } from '@digigov/ui/navigation/NavList';
|
|
7
|
-
import { useNavList } from '@digigov/ui/navigation/NavList/hooks/useNavList';
|
|
8
|
-
var links = [{
|
|
9
|
-
name: 'home',
|
|
10
|
-
href: '#home',
|
|
11
|
-
label: 'Αρχική',
|
|
12
|
-
active: true
|
|
13
|
-
}, {
|
|
14
|
-
name: 'new_form',
|
|
15
|
-
href: '#new_form',
|
|
16
|
-
label: 'Καταχώριση φόρμας'
|
|
17
|
-
}, {
|
|
18
|
-
name: 'news',
|
|
19
|
-
href: '#news',
|
|
20
|
-
label: 'Νέα'
|
|
21
|
-
}, {
|
|
22
|
-
name: 'contact',
|
|
23
|
-
href: '#contact',
|
|
24
|
-
label: 'Επικοινωνία'
|
|
25
|
-
}];
|
|
26
|
-
export var WithBurgerIcon = function WithBurgerIcon() {
|
|
27
|
-
var _useNavList = useNavList(),
|
|
28
|
-
registerNavItem = _useNavList.registerNavItem;
|
|
29
|
-
|
|
30
|
-
var _useState = useState(true),
|
|
31
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
-
open = _useState2[0],
|
|
33
|
-
setOpen = _useState2[1];
|
|
34
|
-
|
|
35
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BurgerIcon, {
|
|
36
|
-
mdUpHidden: true,
|
|
37
|
-
size: "lg",
|
|
38
|
-
onClick: function onClick() {
|
|
39
|
-
setOpen(!open);
|
|
40
|
-
}
|
|
41
|
-
}), /*#__PURE__*/React.createElement(Nav, {
|
|
42
|
-
role: "menubar",
|
|
43
|
-
"aria-orientation": "horizontal",
|
|
44
|
-
"aria-label": "Nav list",
|
|
45
|
-
fixed: false,
|
|
46
|
-
border: false,
|
|
47
|
-
open: open
|
|
48
|
-
}, /*#__PURE__*/React.createElement(NavList, null, links.map(function (item, key) {
|
|
49
|
-
return /*#__PURE__*/React.createElement(NavListItemAction, _extends({
|
|
50
|
-
key: key
|
|
51
|
-
}, registerNavItem(item), {
|
|
52
|
-
active: item === null || item === void 0 ? void 0 : item.active
|
|
53
|
-
}), item.label);
|
|
54
|
-
}))));
|
|
55
|
-
};
|
|
56
|
-
export default WithBurgerIcon;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Nav, NavList, NavListItemAction, useNavList } from '@digigov/ui/navigation/NavList';
|
|
4
|
-
var links = [{
|
|
5
|
-
name: 'link_1',
|
|
6
|
-
href: '#link_1',
|
|
7
|
-
label: 'Σύνδεσμος 1',
|
|
8
|
-
active: true
|
|
9
|
-
}, {
|
|
10
|
-
name: 'link_2',
|
|
11
|
-
href: '#link_2',
|
|
12
|
-
label: 'Σύνδεσμος 2'
|
|
13
|
-
}, {
|
|
14
|
-
name: 'link_3',
|
|
15
|
-
href: '#link_3',
|
|
16
|
-
label: 'Σύνδεσμος 3'
|
|
17
|
-
}];
|
|
18
|
-
export var NavVertical = function NavVertical() {
|
|
19
|
-
var _useNavList = useNavList(),
|
|
20
|
-
registerNavItem = _useNavList.registerNavItem;
|
|
21
|
-
|
|
22
|
-
return /*#__PURE__*/React.createElement(Nav, {
|
|
23
|
-
"aria-orientation": "vertical",
|
|
24
|
-
"aria-label": "Nav list",
|
|
25
|
-
fixed: false,
|
|
26
|
-
border: false
|
|
27
|
-
}, /*#__PURE__*/React.createElement(NavList, {
|
|
28
|
-
layout: "vertical"
|
|
29
|
-
}, links.map(function (item, key) {
|
|
30
|
-
return /*#__PURE__*/React.createElement(NavListItemAction, _extends({
|
|
31
|
-
key: key
|
|
32
|
-
}, registerNavItem(item), {
|
|
33
|
-
active: item === null || item === void 0 ? void 0 : item.active
|
|
34
|
-
}), item.label);
|
|
35
|
-
})));
|
|
36
|
-
};
|
|
37
|
-
export default NavVertical;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Nav, NavList, NavListItemAction, useNavList } from '@digigov/ui/navigation/NavList';
|
|
4
|
-
import { Heading } from '@digigov/ui/typography/Heading';
|
|
5
|
-
var links = [{
|
|
6
|
-
name: 'link_1',
|
|
7
|
-
href: '#link_1',
|
|
8
|
-
label: 'Σύνδεσμος 1',
|
|
9
|
-
active: true
|
|
10
|
-
}, {
|
|
11
|
-
name: 'link_2',
|
|
12
|
-
href: '#link_2',
|
|
13
|
-
label: 'Σύνδεσμος 2'
|
|
14
|
-
}, {
|
|
15
|
-
name: 'link_3',
|
|
16
|
-
href: '#link_3',
|
|
17
|
-
label: 'Σύνδεσμος 3'
|
|
18
|
-
}];
|
|
19
|
-
|
|
20
|
-
var _ref = /*#__PURE__*/React.createElement(Heading, {
|
|
21
|
-
size: "sm"
|
|
22
|
-
}, "\u03A3\u03C7\u03B5\u03C4\u03B9\u03BA\u03BF\u03AF \u03A3\u03CD\u03BD\u03B4\u03B5\u03C3\u03BC\u03BF\u03B9");
|
|
23
|
-
|
|
24
|
-
export var NavVerticalWithTitle = function NavVerticalWithTitle() {
|
|
25
|
-
var _useNavList = useNavList(),
|
|
26
|
-
registerNavItem = _useNavList.registerNavItem;
|
|
27
|
-
|
|
28
|
-
return /*#__PURE__*/React.createElement("div", null, _ref, /*#__PURE__*/React.createElement(Nav, {
|
|
29
|
-
"aria-orientation": "vertical",
|
|
30
|
-
"aria-label": "Nav list",
|
|
31
|
-
fixed: false,
|
|
32
|
-
border: false
|
|
33
|
-
}, /*#__PURE__*/React.createElement(NavList, {
|
|
34
|
-
layout: "vertical"
|
|
35
|
-
}, links.map(function (item, key) {
|
|
36
|
-
return /*#__PURE__*/React.createElement(NavListItemAction, _extends({
|
|
37
|
-
key: key
|
|
38
|
-
}, registerNavItem(item), {
|
|
39
|
-
active: item === null || item === void 0 ? void 0 : item.active
|
|
40
|
-
}), item.label);
|
|
41
|
-
}))));
|
|
42
|
-
};
|
|
43
|
-
export default NavVerticalWithTitle;
|