@digigov/ui 1.0.0-8ae63a77 → 1.0.0-rc.1
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["variant", "title", "link", "children"];
|
|
3
|
+
var _excluded = ["variant", "title", "link", "dense", "children"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import NotificationBannerContainer from '@digigov/react-core/NotificationBannerContainer';
|
|
6
6
|
import NotificationBannerContent from '@digigov/react-core/NotificationBannerContent';
|
|
@@ -14,11 +14,13 @@ export var NotificationBanner = function NotificationBanner(_ref) {
|
|
|
14
14
|
var variant = _ref.variant,
|
|
15
15
|
title = _ref.title,
|
|
16
16
|
link = _ref.link,
|
|
17
|
+
dense = _ref.dense,
|
|
17
18
|
children = _ref.children,
|
|
18
19
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
20
|
|
|
20
21
|
return /*#__PURE__*/React.createElement(NotificationBannerContainer, _extends({
|
|
21
|
-
variant: variant
|
|
22
|
+
variant: variant,
|
|
23
|
+
dense: dense
|
|
22
24
|
}, props), title && /*#__PURE__*/React.createElement(NotificationBannerHeader, null, title), /*#__PURE__*/React.createElement(NotificationBannerContent, null, /*#__PURE__*/React.createElement(NotificationBannerHeading, null, children, _ref2, link && /*#__PURE__*/React.createElement(NotificationBannerLink, {
|
|
23
25
|
href: link.href
|
|
24
26
|
}, link.label))));
|
|
@@ -7,4 +7,5 @@ export default {
|
|
|
7
7
|
displayName: 'WarningText'
|
|
8
8
|
};
|
|
9
9
|
export * from '@digigov/ui/feedback/WarningText/__stories__/Default';
|
|
10
|
-
export * from '@digigov/ui/feedback/WarningText/__stories__/AssistiveText';
|
|
10
|
+
export * from '@digigov/ui/feedback/WarningText/__stories__/AssistiveText';
|
|
11
|
+
export * from '@digigov/ui/feedback/WarningText/__stories__/Dense';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WarningText } from '@digigov/ui/feedback/WarningText';
|
|
3
|
+
|
|
4
|
+
var _ref = /*#__PURE__*/React.createElement(WarningText, {
|
|
5
|
+
dense: true
|
|
6
|
+
}, "\u039C\u03C0\u03BF\u03C1\u03B5\u03AF \u03BD\u03B1 \u03C3\u03B1\u03C2 \u03B5\u03C0\u03B9\u03B2\u03BB\u03B7\u03B8\u03B5\u03AF \u03C0\u03C1\u03CC\u03C3\u03C4\u03B9\u03BC\u03BF \u03AD\u03C9\u03C2 \u03BA\u03B1\u03B9 5.000 \u03B5\u03C5\u03C1\u03CE \u03B5\u03AC\u03BD \u03B4\u03B5\u03BD \u03B5\u03B3\u03B3\u03C1\u03B1\u03C6\u03B5\u03AF\u03C4\u03B5.");
|
|
7
|
+
|
|
8
|
+
export var Dense = function Dense() {
|
|
9
|
+
return _ref;
|
|
10
|
+
};
|
|
11
|
+
export default Dense;
|
|
@@ -14,6 +14,7 @@ export * from './__stories__/GroupingButtons';
|
|
|
14
14
|
export * from './__stories__/GroupingButtonsAndLinks';
|
|
15
15
|
export * from './__stories__/CallToActionButton';
|
|
16
16
|
export * from './__stories__/Disabled';
|
|
17
|
+
export * from './__stories__/Dense';
|
|
17
18
|
export * from './__stories__/ButtonLinkButton';
|
|
18
19
|
export * from './__stories__/Back';
|
|
19
20
|
export * from './__stories__/WithVariantLink';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from '@digigov/ui/form/Button';
|
|
3
|
+
|
|
4
|
+
var _ref = /*#__PURE__*/React.createElement(Button, {
|
|
5
|
+
dense: true,
|
|
6
|
+
"aria-label": "\u03A0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AE \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5"
|
|
7
|
+
}, "\u03A0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AE \u03B1\u03C1\u03C7\u03B5\u03AF\u03BF\u03C5");
|
|
8
|
+
|
|
9
|
+
export var Dense = function Dense() {
|
|
10
|
+
return _ref;
|
|
11
|
+
};
|
|
12
|
+
export default Dense;
|
|
@@ -14,4 +14,5 @@ export * from '@digigov/ui/form/Checkbox/__stories__/WithHint';
|
|
|
14
14
|
export * from '@digigov/ui/form/Checkbox/__stories__/NoneAnswer';
|
|
15
15
|
export * from '@digigov/ui/form/Checkbox/__stories__/NoneAnswerWithError';
|
|
16
16
|
export * from '@digigov/ui/form/Checkbox/__stories__/WithErrorMessage';
|
|
17
|
-
export * from '@digigov/ui/form/Checkbox/__stories__/ConditionalReveal';
|
|
17
|
+
export * from '@digigov/ui/form/Checkbox/__stories__/ConditionalReveal';
|
|
18
|
+
export * from '@digigov/ui/form/Checkbox/__stories__/Dense';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Checkbox, CheckboxItem } from '@digigov/ui/form/Checkbox';
|
|
3
|
+
import { FieldContainer, Fieldset, FieldsetLegend } from '@digigov/ui/form/FieldContainer';
|
|
4
|
+
import { Hint } from '@digigov/ui/typography/Hint';
|
|
5
|
+
|
|
6
|
+
var _ref = /*#__PURE__*/React.createElement(FieldContainer, null, /*#__PURE__*/React.createElement(Fieldset, {
|
|
7
|
+
"aria-describedby": "feeling-hint"
|
|
8
|
+
}, /*#__PURE__*/React.createElement(FieldsetLegend, null, "\u03A0\u03CE\u03C2 \u03B1\u03B9\u03C3\u03B8\u03AC\u03BD\u03B5\u03C4\u03B1\u03B9 \u03B1\u03C5\u03C4\u03AE \u03C4\u03B7 \u03C3\u03C4\u03B9\u03B3\u03BC\u03AE;"), /*#__PURE__*/React.createElement(Hint, {
|
|
9
|
+
id: "feeling-hint"
|
|
10
|
+
}, "\u03A0\u03B5\u03AF\u03C4\u03B5 \u03BC\u03B1\u03C2 \u03C3\u03C7\u03B5\u03C4\u03B9\u03BA\u03AC \u03BC\u03B5 \u03C0\u03C1\u03CC\u03C3\u03C6\u03B1\u03C4\u03B5\u03C2 \u03B1\u03BB\u03BB\u03B1\u03B3\u03AD\u03C2. \u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03CC,\u03C4\u03B9 \u03B9\u03C3\u03C7\u03CD\u03B5\u03B9."), /*#__PURE__*/React.createElement(Checkbox, {
|
|
11
|
+
dense: true
|
|
12
|
+
}, /*#__PURE__*/React.createElement(CheckboxItem, {
|
|
13
|
+
name: "feeling",
|
|
14
|
+
value: "cold"
|
|
15
|
+
}, "\u0388\u03C7\u03C9 \u03C3\u03C5\u03BD\u03AC\u03C7\u03B9"), /*#__PURE__*/React.createElement(CheckboxItem, {
|
|
16
|
+
name: "feeling",
|
|
17
|
+
value: "fever"
|
|
18
|
+
}, "\u0388\u03C7\u03C9 \u03C0\u03C5\u03C1\u03B5\u03C4\u03CC"), /*#__PURE__*/React.createElement(CheckboxItem, {
|
|
19
|
+
name: "feeling",
|
|
20
|
+
value: "fatigue"
|
|
21
|
+
}, "\u0391\u03B9\u03C3\u03B8\u03AC\u03BD\u03BF\u03BC\u03B1\u03B9 \u03BA\u03BF\u03CD\u03C1\u03B1\u03C3\u03B7"))));
|
|
22
|
+
|
|
23
|
+
export var Dense = function Dense() {
|
|
24
|
+
return _ref;
|
|
25
|
+
};
|
|
26
|
+
export default Dense;
|
|
@@ -9,4 +9,5 @@ export default {
|
|
|
9
9
|
export * from '@digigov/ui/form/DateInputContainer/__stories__/Default';
|
|
10
10
|
export * from '@digigov/ui/form/DateInputContainer/__stories__/MultipleQuestions';
|
|
11
11
|
export * from '@digigov/ui/form/DateInputContainer/__stories__/WithErrorMessage';
|
|
12
|
-
export * from '@digigov/ui/form/DateInputContainer/__stories__/WithErrorMessageForSingleField';
|
|
12
|
+
export * from '@digigov/ui/form/DateInputContainer/__stories__/WithErrorMessageForSingleField';
|
|
13
|
+
export * from '@digigov/ui/form/DateInputContainer/__stories__/Dense';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DateInputContainer, DateInputItem } from '@digigov/ui/form/DateInputContainer';
|
|
3
|
+
import { FieldContainer, Fieldset, FieldsetLegend } from '@digigov/ui/form/FieldContainer';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(FieldContainer, {
|
|
6
|
+
"aria-describedby": "passport-hint"
|
|
7
|
+
}, /*#__PURE__*/React.createElement(Fieldset, null, /*#__PURE__*/React.createElement(FieldsetLegend, {
|
|
8
|
+
size: "md"
|
|
9
|
+
}, "\u03A0\u03CC\u03C4\u03B5 \u03B5\u03BA\u03B4\u03CC\u03B8\u03B7\u03BA\u03B5 \u03C4\u03BF \u03B4\u03B9\u03B1\u03B2\u03B1\u03C4\u03AE\u03C1\u03B9\u03CC \u03C3\u03B1\u03C2;"), /*#__PURE__*/React.createElement(DateInputContainer, {
|
|
10
|
+
dense: true
|
|
11
|
+
}, /*#__PURE__*/React.createElement(DateInputItem, {
|
|
12
|
+
name: "day"
|
|
13
|
+
}, "\u0397\u03BC\u03AD\u03C1\u03B1"), /*#__PURE__*/React.createElement(DateInputItem, {
|
|
14
|
+
name: "month"
|
|
15
|
+
}, "\u039C\u03AE\u03BD\u03B1\u03C2"), /*#__PURE__*/React.createElement(DateInputItem, {
|
|
16
|
+
width: 4,
|
|
17
|
+
name: "year"
|
|
18
|
+
}, "\u0388\u03C4\u03BF\u03C2"))));
|
|
19
|
+
|
|
20
|
+
export var Dense = function Dense() {
|
|
21
|
+
return _ref;
|
|
22
|
+
};
|
|
23
|
+
export default Dense;
|
|
@@ -14,4 +14,5 @@ export * from '@digigov/ui/form/RadioContainer/__stories__/WithHints';
|
|
|
14
14
|
export * from '@digigov/ui/form/RadioContainer/__stories__/NoneAnswer';
|
|
15
15
|
export * from '@digigov/ui/form/RadioContainer/__stories__/WithErrorMessage';
|
|
16
16
|
export * from '@digigov/ui/form/RadioContainer/__stories__/ConditionalReveal';
|
|
17
|
-
export * from '@digigov/ui/form/RadioContainer/__stories__/InlineWithDivider';
|
|
17
|
+
export * from '@digigov/ui/form/RadioContainer/__stories__/InlineWithDivider';
|
|
18
|
+
export * from '@digigov/ui/form/RadioContainer/__stories__/Dense';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FieldContainer, Fieldset, FieldsetLegend } from '@digigov/ui/form/FieldContainer';
|
|
3
|
+
import { RadioContainer, RadioItem } from '@digigov/ui/form/RadioContainer';
|
|
4
|
+
|
|
5
|
+
var _ref = /*#__PURE__*/React.createElement(FieldContainer, null, /*#__PURE__*/React.createElement(Fieldset, null, /*#__PURE__*/React.createElement(FieldsetLegend, null, "\u03A0\u03BF\u03B9\u03AC \u03B5\u03AF\u03BD\u03B1\u03B9 \u03B7 \u03C7\u03CE\u03C1\u03B1 \u03C4\u03B7\u03C2 \u03B4\u03B9\u03B1\u03BC\u03BF\u03BD\u03AE\u03C2 \u03C3\u03B1\u03C2;"), /*#__PURE__*/React.createElement(RadioContainer, {
|
|
6
|
+
dense: true
|
|
7
|
+
}, /*#__PURE__*/React.createElement(RadioItem, {
|
|
8
|
+
name: "country",
|
|
9
|
+
value: "greece"
|
|
10
|
+
}, "\u0395\u03BB\u03BB\u03AC\u03B4\u03B1"), /*#__PURE__*/React.createElement(RadioItem, {
|
|
11
|
+
name: "country",
|
|
12
|
+
value: "cyprus"
|
|
13
|
+
}, "\u039A\u03CD\u03C0\u03C1\u03BF\u03C2"), /*#__PURE__*/React.createElement(RadioItem, {
|
|
14
|
+
name: "country",
|
|
15
|
+
value: "eu"
|
|
16
|
+
}, "\u03A7\u03CE\u03C1\u03B1 \u03C4\u03B7\u03C2 \u0395\u03C5\u03C1\u03C9\u03C0\u03B1\u03CA\u03BA\u03AE\u03C2 \u0388\u03BD\u03C9\u03C3\u03B7\u03C2"), /*#__PURE__*/React.createElement(RadioItem, {
|
|
17
|
+
name: "country",
|
|
18
|
+
value: "us"
|
|
19
|
+
}, "H\u03BD\u03C9\u03BC\u03AD\u03BD\u03B5\u03C2 \u03A0\u03BF\u03BB\u03B9\u03C4\u03B5\u03AF\u03B5\u03C2 \u03C4\u03B7\u03C2 \u0391\u03BC\u03B5\u03C1\u03B9\u03BA\u03AE\u03C2"))));
|
|
20
|
+
|
|
21
|
+
export var Dense = function Dense() {
|
|
22
|
+
return _ref;
|
|
23
|
+
};
|
|
24
|
+
export default Dense;
|
|
@@ -8,4 +8,5 @@ export default {
|
|
|
8
8
|
};
|
|
9
9
|
export * from '@digigov/ui/form/SelectContainer/__stories__/Default';
|
|
10
10
|
export * from '@digigov/ui/form/SelectContainer/__stories__/DisabledInput';
|
|
11
|
-
export * from '@digigov/ui/form/SelectContainer/__stories__/WithHint';
|
|
11
|
+
export * from '@digigov/ui/form/SelectContainer/__stories__/WithHint';
|
|
12
|
+
export * from '@digigov/ui/form/SelectContainer/__stories__/Dense';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FieldContainer } from '@digigov/ui/form/FieldContainer';
|
|
3
|
+
import { LabelContainer } from '@digigov/ui/form/LabelContainer';
|
|
4
|
+
import { SelectContainer, SelectOption } from '@digigov/ui/form/SelectContainer';
|
|
5
|
+
|
|
6
|
+
var _ref = /*#__PURE__*/React.createElement(FieldContainer, null, /*#__PURE__*/React.createElement(LabelContainer, null, "\u03A4\u03B1\u03BE\u03B9\u03BD\u03CC\u03BC\u03B7\u03C3\u03B7", /*#__PURE__*/React.createElement(SelectContainer, {
|
|
7
|
+
dense: true,
|
|
8
|
+
name: "select-list",
|
|
9
|
+
"aria-label": "\u03C4\u03B1\u03BE\u03B9\u03BD\u03CC\u03BC\u03B7\u03C3\u03B7"
|
|
10
|
+
}, /*#__PURE__*/React.createElement(SelectOption, {
|
|
11
|
+
value: "popular"
|
|
12
|
+
}, "\u0394\u03B7\u03BC\u03BF\u03C6\u03B9\u03BB\u03AE"), /*#__PURE__*/React.createElement(SelectOption, {
|
|
13
|
+
value: "recent"
|
|
14
|
+
}, "\u03A0\u03C1\u03CC\u03C3\u03C6\u03B1\u03C4\u03B1"), /*#__PURE__*/React.createElement(SelectOption, {
|
|
15
|
+
value: "views"
|
|
16
|
+
}, "\u03A0\u03B5\u03C1\u03B9\u03C3\u03C3\u03CC\u03C4\u03B5\u03C1\u03B5\u03C2 \u03C0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AD\u03C2"), /*#__PURE__*/React.createElement(SelectOption, {
|
|
17
|
+
value: "comments"
|
|
18
|
+
}, "\u03A0\u03B5\u03C1\u03B9\u03C3\u03C3\u03CC\u03C4\u03B5\u03C1\u03B1 \u03C3\u03C7\u03CC\u03BB\u03B9\u03B1"))));
|
|
19
|
+
|
|
20
|
+
export var Dense = function Dense() {
|
|
21
|
+
return _ref;
|
|
22
|
+
};
|
|
23
|
+
export default Dense;
|
|
@@ -12,4 +12,5 @@ export * from '@digigov/ui/form/TextArea/__stories__/WithDeclaredRows';
|
|
|
12
12
|
export * from '@digigov/ui/form/TextArea/__stories__/MultipleQuestions';
|
|
13
13
|
export * from '@digigov/ui/form/TextArea/__stories__/LimitedCharacters';
|
|
14
14
|
export * from '@digigov/ui/form/TextArea/__stories__/WithErrorMessage';
|
|
15
|
-
export * from '@digigov/ui/form/TextArea/__stories__/DisabledInput';
|
|
15
|
+
export * from '@digigov/ui/form/TextArea/__stories__/DisabledInput';
|
|
16
|
+
export * from '@digigov/ui/form/TextArea/__stories__/Dense';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FieldContainer } from '@digigov/ui/form/FieldContainer';
|
|
3
|
+
import { LabelContainer } from '@digigov/ui/form/LabelContainer';
|
|
4
|
+
import { TextArea } from '@digigov/ui/form/TextArea';
|
|
5
|
+
|
|
6
|
+
var _ref = /*#__PURE__*/React.createElement(FieldContainer, null, /*#__PURE__*/React.createElement(LabelContainer, null, "\u039C\u03C0\u03BF\u03C1\u03B5\u03AF\u03C4\u03B5 \u03BD\u03B1 \u03B4\u03CE\u03C3\u03B5\u03C4\u03B5 \u03C0\u03B5\u03C1\u03B9\u03C3\u03C3\u03CC\u03C4\u03B5\u03C1\u03B5\u03C2 \u03C0\u03BB\u03B7\u03C1\u03BF\u03C6\u03BF\u03C1\u03AF\u03B5\u03C2;", /*#__PURE__*/React.createElement(TextArea, {
|
|
7
|
+
dense: true,
|
|
8
|
+
name: "textarea"
|
|
9
|
+
})));
|
|
10
|
+
|
|
11
|
+
export var Dense = function Dense() {
|
|
12
|
+
return _ref;
|
|
13
|
+
};
|
|
14
|
+
export default Dense;
|
|
@@ -13,4 +13,5 @@ export * from '@digigov/ui/form/TextInput/__stories__/FluidWidths';
|
|
|
13
13
|
export * from '@digigov/ui/form/TextInput/__stories__/WithHint';
|
|
14
14
|
export * from '@digigov/ui/form/TextInput/__stories__/AskingForNumbers';
|
|
15
15
|
export * from '@digigov/ui/form/TextInput/__stories__/WithErrorMessage';
|
|
16
|
-
export * from '@digigov/ui/form/TextInput/__stories__/DisabledInput';
|
|
16
|
+
export * from '@digigov/ui/form/TextInput/__stories__/DisabledInput';
|
|
17
|
+
export * from '@digigov/ui/form/TextInput/__stories__/Dense';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FieldContainer } from '@digigov/ui/form/FieldContainer';
|
|
3
|
+
import { LabelContainer } from '@digigov/ui/form/LabelContainer';
|
|
4
|
+
import { TextInput } from '@digigov/ui/form/TextInput';
|
|
5
|
+
|
|
6
|
+
var _ref = /*#__PURE__*/React.createElement(FieldContainer, null, /*#__PURE__*/React.createElement(LabelContainer, null, "\u038C\u03BD\u03BF\u03BC\u03B1 \u03B5\u03C0\u03B9\u03C7\u03B5\u03AF\u03C1\u03B7\u03C3\u03B7\u03C2", /*#__PURE__*/React.createElement(TextInput, {
|
|
7
|
+
dense: true,
|
|
8
|
+
name: "inputext"
|
|
9
|
+
})));
|
|
10
|
+
|
|
11
|
+
export var Dense = function Dense() {
|
|
12
|
+
return _ref;
|
|
13
|
+
};
|
|
14
|
+
export default Dense;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["children", "href"];
|
|
4
|
-
import
|
|
4
|
+
import React from 'react';
|
|
5
5
|
import LinkBase from '@digigov/react-core/LinkBase';
|
|
6
6
|
export var CommonLink = function CommonLink(props) {
|
|
7
7
|
return /*#__PURE__*/React.createElement(LinkBase, props, props.children);
|
|
@@ -7,8 +7,10 @@ export default {
|
|
|
7
7
|
displayName: 'NavList'
|
|
8
8
|
};
|
|
9
9
|
export * from '@digigov/ui/navigation/NavList/__stories__/Default';
|
|
10
|
-
export * from '@digigov/ui/navigation/NavList/__stories__/
|
|
11
|
-
export * from '@digigov/ui/navigation/NavList/__stories__/
|
|
12
|
-
export * from '@digigov/ui/navigation/NavList/__stories__/
|
|
13
|
-
export * from '@digigov/ui/navigation/NavList/__stories__/
|
|
14
|
-
export * from '@digigov/ui/navigation/NavList/__stories__/
|
|
10
|
+
export * from '@digigov/ui/navigation/NavList/__stories__/Vertical';
|
|
11
|
+
export * from '@digigov/ui/navigation/NavList/__stories__/NavListWithoutNav';
|
|
12
|
+
export * from '@digigov/ui/navigation/NavList/__stories__/HorizontalWithoutDrawer';
|
|
13
|
+
export * from '@digigov/ui/navigation/NavList/__stories__/VerticalWithoutDrawer';
|
|
14
|
+
export * from '@digigov/ui/navigation/NavList/__stories__/UsingNavListAuto';
|
|
15
|
+
export * from '@digigov/ui/navigation/NavList/__stories__/HorizontalWithDrawer';
|
|
16
|
+
export * from '@digigov/ui/navigation/NavList/__stories__/UsingHeaderButton';
|
|
@@ -7,14 +7,34 @@
|
|
|
7
7
|
"actions": [
|
|
8
8
|
{
|
|
9
9
|
"name": "hover",
|
|
10
|
+
"args": {
|
|
11
|
+
"selector": "html>body>div:nth-child(5)>nav>ul>li:nth-child(1)>a"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"id": "dHQxEQCIJ4bJ",
|
|
16
|
+
"title": "Hover item"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"digigov-ui-navigation-navlist--horizontal-with-submenu": {
|
|
21
|
+
"actionSets": [
|
|
22
|
+
{
|
|
23
|
+
"actions": [
|
|
24
|
+
{
|
|
25
|
+
"name": "click",
|
|
10
26
|
"args": {
|
|
11
27
|
"selector": "html>body>div:nth-child(5)>nav>ul>li:nth-child(2)>button"
|
|
12
28
|
}
|
|
13
29
|
}
|
|
14
30
|
],
|
|
15
|
-
"id": "
|
|
16
|
-
"title": "
|
|
17
|
-
}
|
|
31
|
+
"id": "2DykhuHWrXMe",
|
|
32
|
+
"title": "Open submenu"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"digigov-ui-navigation-navlist--vertical-with-submenu": {
|
|
37
|
+
"actionSets": [
|
|
18
38
|
{
|
|
19
39
|
"actions": [
|
|
20
40
|
{
|
|
@@ -24,7 +44,7 @@
|
|
|
24
44
|
}
|
|
25
45
|
}
|
|
26
46
|
],
|
|
27
|
-
"id": "
|
|
47
|
+
"id": "yTIrKHLeGZkx",
|
|
28
48
|
"title": "Open submenu"
|
|
29
49
|
}
|
|
30
50
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["layout", "
|
|
3
|
+
var _excluded = ["layout", "links"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useNavList } from '../hooks/useNavList';
|
|
6
6
|
import NavListItemAction from '@digigov/react-core/NavListItemAction';
|
|
@@ -14,8 +14,6 @@ import NavMenuContentListItem from '@digigov/react-core/NavMenuContentListItem';
|
|
|
14
14
|
import NavMenuTitle from '@digigov/react-core/NavMenuTitle';
|
|
15
15
|
export var NavListAuto = function NavListAuto(_ref) {
|
|
16
16
|
var layout = _ref.layout,
|
|
17
|
-
border = _ref.border,
|
|
18
|
-
fixed = _ref.fixed,
|
|
19
17
|
_ref$links = _ref.links,
|
|
20
18
|
links = _ref$links === void 0 ? [] : _ref$links,
|
|
21
19
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -24,22 +22,18 @@ export var NavListAuto = function NavListAuto(_ref) {
|
|
|
24
22
|
registerNavItemMenu = _useNavList.registerNavItemMenu,
|
|
25
23
|
registerNavItem = _useNavList.registerNavItem;
|
|
26
24
|
|
|
27
|
-
return /*#__PURE__*/React.createElement(Nav,
|
|
28
|
-
open: true,
|
|
29
|
-
border: border,
|
|
30
|
-
fixed: fixed
|
|
31
|
-
}, props), /*#__PURE__*/React.createElement(NavList, {
|
|
25
|
+
return /*#__PURE__*/React.createElement(Nav, props, /*#__PURE__*/React.createElement(NavList, {
|
|
32
26
|
layout: layout
|
|
33
27
|
}, links.map(function (item, key) {
|
|
34
|
-
var _item$
|
|
28
|
+
var _item$subMenu;
|
|
35
29
|
|
|
36
30
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
37
31
|
key: key
|
|
38
|
-
}, /*#__PURE__*/React.createElement(NavListItemAction, registerNavItem(item), item.label), item.
|
|
32
|
+
}, /*#__PURE__*/React.createElement(NavListItemAction, registerNavItem(item), item.label), item.subMenu && /*#__PURE__*/React.createElement(NavMenuContainer, _extends({
|
|
39
33
|
layout: layout
|
|
40
|
-
}, registerNavItemMenu(item.name)), (
|
|
34
|
+
}, registerNavItemMenu(item.name)), (item.subMenuHeading || item.label) && /*#__PURE__*/React.createElement(NavMenuTitle, null, item.subMenuHeading || item.label), /*#__PURE__*/React.createElement(NavMenuContent, null, /*#__PURE__*/React.createElement(NavMenuContentList, {
|
|
41
35
|
role: "menu"
|
|
42
|
-
}, (_item$
|
|
36
|
+
}, (_item$subMenu = item.subMenu) === null || _item$subMenu === void 0 ? void 0 : _item$subMenu.map(function (subMenu, menuIndex) {
|
|
43
37
|
return (subMenu === null || subMenu === void 0 ? void 0 : subMenu.href) && /*#__PURE__*/React.createElement(NavMenuContentListItem, {
|
|
44
38
|
key: menuIndex,
|
|
45
39
|
role: "presentation"
|
|
@@ -1,38 +1,28 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import React, { useState } from 'react';
|
|
3
4
|
import { Nav, NavList, NavListItemAction, useNavList } from '@digigov/ui/navigation/NavList';
|
|
4
|
-
|
|
5
|
-
name: 'home',
|
|
6
|
-
href: '#home',
|
|
7
|
-
label: 'Αρχική',
|
|
8
|
-
active: true
|
|
9
|
-
}, {
|
|
10
|
-
name: 'new_form',
|
|
11
|
-
href: '#new_form',
|
|
12
|
-
label: 'Καταχώριση φόρμας'
|
|
13
|
-
}, {
|
|
14
|
-
name: 'news',
|
|
15
|
-
href: '#news',
|
|
16
|
-
label: 'Νέα'
|
|
17
|
-
}, {
|
|
18
|
-
name: 'contact',
|
|
19
|
-
href: '#contact',
|
|
20
|
-
label: 'Επικοινωνία'
|
|
21
|
-
}];
|
|
5
|
+
import links from './NavLinksOneLevel.json';
|
|
22
6
|
export var Default = function Default() {
|
|
23
7
|
var _useNavList = useNavList(),
|
|
24
8
|
registerNavItem = _useNavList.registerNavItem;
|
|
25
9
|
|
|
10
|
+
var _useState = useState(""),
|
|
11
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12
|
+
useActive = _useState2[0],
|
|
13
|
+
setUseActive = _useState2[1];
|
|
14
|
+
|
|
26
15
|
return /*#__PURE__*/React.createElement(Nav, {
|
|
27
|
-
role: "menubar",
|
|
28
16
|
"aria-orientation": "horizontal",
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
role: "menubar",
|
|
18
|
+
"aria-label": "navigation list"
|
|
31
19
|
}, /*#__PURE__*/React.createElement(NavList, null, links.map(function (item, key) {
|
|
32
|
-
return /*#__PURE__*/React.createElement(NavListItemAction, _extends({
|
|
33
|
-
key: key
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
return /*#__PURE__*/React.createElement(NavListItemAction, _extends({}, registerNavItem(item), {
|
|
21
|
+
key: key,
|
|
22
|
+
active: item.name === useActive,
|
|
23
|
+
onClick: function onClick() {
|
|
24
|
+
return setUseActive(item.name);
|
|
25
|
+
}
|
|
36
26
|
}), item.label);
|
|
37
27
|
})));
|
|
38
28
|
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import React, { Fragment, useState } from 'react';
|
|
4
|
+
import { Nav, NavList, NavListItemAction, NavMenuContainer, NavMenuContent, NavMenuContentList, NavMenuContentListItem, NavMenuTitle, useNavList } from '@digigov/ui/navigation/NavList';
|
|
5
|
+
import { Link } from '@digigov/ui/navigation/Link';
|
|
6
|
+
import links from './NavLinksWithSubmenu.json';
|
|
7
|
+
import { Button } from '@digigov/ui/form/Button';
|
|
8
|
+
import BurgerIcon from '@digigov/react-icons/BurgerIcon';
|
|
9
|
+
import CloseButton from '@digigov/react-core/CloseButton';
|
|
10
|
+
|
|
11
|
+
var _ref = /*#__PURE__*/React.createElement(BurgerIcon, null);
|
|
12
|
+
|
|
13
|
+
export var HorizontalWithDrawer = function HorizontalWithDrawer() {
|
|
14
|
+
var layout = 'horizontal';
|
|
15
|
+
var drawer = 'mdDown';
|
|
16
|
+
var border = false;
|
|
17
|
+
|
|
18
|
+
var _useNavList = useNavList(),
|
|
19
|
+
registerNavItemMenu = _useNavList.registerNavItemMenu,
|
|
20
|
+
registerNavItem = _useNavList.registerNavItem;
|
|
21
|
+
|
|
22
|
+
var _useState = useState(false),
|
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
+
open = _useState2[0],
|
|
25
|
+
setOpen = _useState2[1];
|
|
26
|
+
|
|
27
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
28
|
+
color: "secondary",
|
|
29
|
+
onClick: function onClick() {
|
|
30
|
+
return setOpen(!open);
|
|
31
|
+
},
|
|
32
|
+
mdUpHidden: true
|
|
33
|
+
}, "\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2 ", _ref), /*#__PURE__*/React.createElement(Nav, {
|
|
34
|
+
border: border,
|
|
35
|
+
"aria-orientation": layout || 'horizontal',
|
|
36
|
+
"aria-label": "navigation list",
|
|
37
|
+
open: open,
|
|
38
|
+
drawer: drawer
|
|
39
|
+
}, /*#__PURE__*/React.createElement(CloseButton, {
|
|
40
|
+
mdUpHidden: true,
|
|
41
|
+
onClick: function onClick() {
|
|
42
|
+
return setOpen(false);
|
|
43
|
+
}
|
|
44
|
+
}, "\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF"), /*#__PURE__*/React.createElement(NavList, {
|
|
45
|
+
layout: layout
|
|
46
|
+
}, links.map(function (item, key) {
|
|
47
|
+
var _item$subMenu;
|
|
48
|
+
|
|
49
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
|
50
|
+
key: key
|
|
51
|
+
}, /*#__PURE__*/React.createElement(NavListItemAction, registerNavItem(item), item.label), item.subMenu && /*#__PURE__*/React.createElement(NavMenuContainer, _extends({
|
|
52
|
+
layout: layout
|
|
53
|
+
}, registerNavItemMenu(item.name)), /*#__PURE__*/React.createElement(NavMenuTitle, null, item.label), /*#__PURE__*/React.createElement(NavMenuContent, null, /*#__PURE__*/React.createElement(NavMenuContentList, {
|
|
54
|
+
role: "menu"
|
|
55
|
+
}, (_item$subMenu = item.subMenu) === null || _item$subMenu === void 0 ? void 0 : _item$subMenu.map(function (subMenu, menuIndex) {
|
|
56
|
+
return (subMenu === null || subMenu === void 0 ? void 0 : subMenu.href) && /*#__PURE__*/React.createElement(NavMenuContentListItem, {
|
|
57
|
+
key: menuIndex,
|
|
58
|
+
role: "presentation"
|
|
59
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
60
|
+
role: "menuitem",
|
|
61
|
+
id: subMenu.name,
|
|
62
|
+
href: subMenu.href
|
|
63
|
+
}, subMenu.label));
|
|
64
|
+
})))));
|
|
65
|
+
}))));
|
|
66
|
+
};
|
|
67
|
+
export default HorizontalWithDrawer;
|
|
@@ -2,40 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { Fragment } from 'react';
|
|
3
3
|
import { Nav, NavList, NavListItemAction, NavMenuContainer, NavMenuContent, NavMenuContentList, NavMenuContentListItem, NavMenuTitle, useNavList } from '@digigov/ui/navigation/NavList';
|
|
4
4
|
import { Link } from '@digigov/ui/navigation/Link';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
href: '#home',
|
|
8
|
-
label: 'Αρχική'
|
|
9
|
-
}, {
|
|
10
|
-
name: 'educational',
|
|
11
|
-
label: 'Εκπαιδευτικό υλικό',
|
|
12
|
-
subMenu: [{
|
|
13
|
-
name: 'elearning',
|
|
14
|
-
href: '#elearning',
|
|
15
|
-
label: 'Εκπαιδευτική πλατφόρμα'
|
|
16
|
-
}, {
|
|
17
|
-
name: 'videos',
|
|
18
|
-
href: '#videos',
|
|
19
|
-
label: 'Βίντεο'
|
|
20
|
-
}, {
|
|
21
|
-
name: 'presentations',
|
|
22
|
-
href: '#presentations',
|
|
23
|
-
label: 'Παρουσιάσεις'
|
|
24
|
-
}, {
|
|
25
|
-
name: 'promoting',
|
|
26
|
-
href: '#promoting',
|
|
27
|
-
label: 'Προωθώντας την αθλητική ακεραιότητα στην νέα γενιά'
|
|
28
|
-
}, {
|
|
29
|
-
name: 'other-texts',
|
|
30
|
-
href: '#other-texts',
|
|
31
|
-
label: 'Άλλα κείμενα'
|
|
32
|
-
}]
|
|
33
|
-
}, {
|
|
34
|
-
name: 'news',
|
|
35
|
-
href: '#news',
|
|
36
|
-
label: 'Νέα'
|
|
37
|
-
}];
|
|
38
|
-
export var WithSubMenu = function WithSubMenu() {
|
|
5
|
+
import links from './NavLinksWithSubmenu.json';
|
|
6
|
+
export var HorizontalWithoutDrawer = function HorizontalWithoutDrawer() {
|
|
39
7
|
var layout = 'horizontal';
|
|
40
8
|
var border = false;
|
|
41
9
|
|
|
@@ -44,9 +12,9 @@ export var WithSubMenu = function WithSubMenu() {
|
|
|
44
12
|
registerNavItem = _useNavList.registerNavItem;
|
|
45
13
|
|
|
46
14
|
return /*#__PURE__*/React.createElement(Nav, {
|
|
47
|
-
open: true,
|
|
48
15
|
border: border,
|
|
49
|
-
"aria-orientation": layout
|
|
16
|
+
"aria-orientation": layout || 'horizontal',
|
|
17
|
+
"aria-label": "navigation list"
|
|
50
18
|
}, /*#__PURE__*/React.createElement(NavList, {
|
|
51
19
|
layout: layout
|
|
52
20
|
}, links.map(function (item, key) {
|
|
@@ -70,4 +38,4 @@ export var WithSubMenu = function WithSubMenu() {
|
|
|
70
38
|
})))));
|
|
71
39
|
})));
|
|
72
40
|
};
|
|
73
|
-
export default
|
|
41
|
+
export default HorizontalWithoutDrawer;
|
|
@@ -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,19 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { NavList, NavListItemAction, useNavList } from '@digigov/ui/navigation/NavList';
|
|
4
|
+
import links from './NavLinksOneLevel.json';
|
|
5
|
+
export var NavListWithoutNav = function NavListWithoutNav() {
|
|
6
|
+
var layout = 'vertical';
|
|
7
|
+
|
|
8
|
+
var _useNavList = useNavList(),
|
|
9
|
+
registerNavItem = _useNavList.registerNavItem;
|
|
10
|
+
|
|
11
|
+
return /*#__PURE__*/React.createElement(NavList, {
|
|
12
|
+
layout: layout
|
|
13
|
+
}, links.map(function (item, key) {
|
|
14
|
+
return /*#__PURE__*/React.createElement(NavListItemAction, _extends({}, registerNavItem(item), {
|
|
15
|
+
key: key
|
|
16
|
+
}), item.label);
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
export default NavListWithoutNav;
|