@digigov/ui 1.0.0-8ae63a77 → 1.0.0-eb2842b4
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
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports["default"] = exports.
|
|
10
|
+
exports["default"] = exports.Vertical = void 0;
|
|
11
11
|
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
|
|
@@ -15,68 +15,41 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
-
var _NavList =
|
|
18
|
+
var _NavList = require("@digigov/ui/navigation/NavList");
|
|
19
19
|
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
var _NavList2 = require("@digigov/ui/navigation/NavList");
|
|
23
|
-
|
|
24
|
-
var _useNavList2 = require("@digigov/ui/navigation/NavList/hooks/useNavList");
|
|
20
|
+
var _NavLinksOneLevel = _interopRequireDefault(require("./NavLinksOneLevel.json"));
|
|
25
21
|
|
|
26
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
23
|
|
|
28
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
25
|
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
href: '#home',
|
|
33
|
-
label: 'Αρχική',
|
|
34
|
-
active: true
|
|
35
|
-
}, {
|
|
36
|
-
name: 'new_form',
|
|
37
|
-
href: '#new_form',
|
|
38
|
-
label: 'Καταχώριση φόρμας'
|
|
39
|
-
}, {
|
|
40
|
-
name: 'news',
|
|
41
|
-
href: '#news',
|
|
42
|
-
label: 'Νέα'
|
|
43
|
-
}, {
|
|
44
|
-
name: 'contact',
|
|
45
|
-
href: '#contact',
|
|
46
|
-
label: 'Επικοινωνία'
|
|
47
|
-
}];
|
|
26
|
+
var Vertical = function Vertical() {
|
|
27
|
+
var layout = 'vertical';
|
|
48
28
|
|
|
49
|
-
var
|
|
50
|
-
var _useNavList = (0, _useNavList2.useNavList)(),
|
|
29
|
+
var _useNavList = (0, _NavList.useNavList)(),
|
|
51
30
|
registerNavItem = _useNavList.registerNavItem;
|
|
52
31
|
|
|
53
|
-
var _useState = (0, _react.useState)(
|
|
32
|
+
var _useState = (0, _react.useState)(""),
|
|
54
33
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
open: open
|
|
71
|
-
}, /*#__PURE__*/_react["default"].createElement(_NavList["default"], null, links.map(function (item, key) {
|
|
72
|
-
return /*#__PURE__*/_react["default"].createElement(_NavList2.NavListItemAction, (0, _extends2["default"])({
|
|
73
|
-
key: key
|
|
74
|
-
}, registerNavItem(item), {
|
|
75
|
-
active: item === null || item === void 0 ? void 0 : item.active
|
|
34
|
+
useActive = _useState2[0],
|
|
35
|
+
setUseActive = _useState2[1];
|
|
36
|
+
|
|
37
|
+
return /*#__PURE__*/_react["default"].createElement(_NavList.Nav, {
|
|
38
|
+
"aria-orientation": layout || 'horizontal',
|
|
39
|
+
"aria-label": "navigation list"
|
|
40
|
+
}, /*#__PURE__*/_react["default"].createElement(_NavList.NavList, {
|
|
41
|
+
layout: layout
|
|
42
|
+
}, _NavLinksOneLevel["default"].map(function (item, key) {
|
|
43
|
+
return /*#__PURE__*/_react["default"].createElement(_NavList.NavListItemAction, (0, _extends2["default"])({}, registerNavItem(item), {
|
|
44
|
+
key: key,
|
|
45
|
+
active: item.name === useActive,
|
|
46
|
+
onClick: function onClick() {
|
|
47
|
+
return setUseActive(item.name);
|
|
48
|
+
}
|
|
76
49
|
}), item.label);
|
|
77
|
-
})))
|
|
50
|
+
})));
|
|
78
51
|
};
|
|
79
52
|
|
|
80
|
-
exports.
|
|
81
|
-
var _default =
|
|
53
|
+
exports.Vertical = Vertical;
|
|
54
|
+
var _default = Vertical;
|
|
82
55
|
exports["default"] = _default;
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] = exports.
|
|
8
|
+
exports["default"] = exports.VerticalWithoutDrawer = void 0;
|
|
9
9
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
@@ -17,42 +17,9 @@ var _NavList = require("@digigov/ui/navigation/NavList");
|
|
|
17
17
|
|
|
18
18
|
var _useNavList2 = require("@digigov/ui/navigation/NavList/hooks/useNavList");
|
|
19
19
|
|
|
20
|
-
var
|
|
21
|
-
name: 'home',
|
|
22
|
-
href: '#home',
|
|
23
|
-
label: 'Αρχική'
|
|
24
|
-
}, {
|
|
25
|
-
name: 'educational',
|
|
26
|
-
// href: '#',
|
|
27
|
-
label: 'Εκπαιδευτικό υλικό',
|
|
28
|
-
subMenu: [{
|
|
29
|
-
name: 'elearning',
|
|
30
|
-
href: '#elearning',
|
|
31
|
-
label: 'Εκπαιδευτική πλατφόρμα'
|
|
32
|
-
}, {
|
|
33
|
-
name: 'videos',
|
|
34
|
-
href: '#videos',
|
|
35
|
-
label: 'Βίντεο'
|
|
36
|
-
}, {
|
|
37
|
-
name: 'presentations',
|
|
38
|
-
href: '#presentations',
|
|
39
|
-
label: 'Παρουσιάσεις'
|
|
40
|
-
}, {
|
|
41
|
-
name: 'promoting',
|
|
42
|
-
href: '#promoting',
|
|
43
|
-
label: 'Προωθώντας την αθλητική ακεραιότητα στην νέα γενιά'
|
|
44
|
-
}, {
|
|
45
|
-
name: 'other-texts',
|
|
46
|
-
href: '#other-texts',
|
|
47
|
-
label: 'Άλλα κείμενα'
|
|
48
|
-
}]
|
|
49
|
-
}, {
|
|
50
|
-
name: 'news',
|
|
51
|
-
href: '#news',
|
|
52
|
-
label: 'Νέα'
|
|
53
|
-
}];
|
|
20
|
+
var _NavLinksWithSubmenu = _interopRequireDefault(require("./NavLinksWithSubmenu.json"));
|
|
54
21
|
|
|
55
|
-
var
|
|
22
|
+
var VerticalWithoutDrawer = function VerticalWithoutDrawer() {
|
|
56
23
|
var layout = 'vertical';
|
|
57
24
|
var border = false;
|
|
58
25
|
|
|
@@ -61,11 +28,12 @@ var NavVerticalLayout = function NavVerticalLayout() {
|
|
|
61
28
|
registerNavItem = _useNavList.registerNavItem;
|
|
62
29
|
|
|
63
30
|
return /*#__PURE__*/_react["default"].createElement(_NavList.Nav, {
|
|
64
|
-
|
|
65
|
-
|
|
31
|
+
border: border,
|
|
32
|
+
"aria-orientation": layout || 'horizontal',
|
|
33
|
+
"aria-label": "navigation list"
|
|
66
34
|
}, /*#__PURE__*/_react["default"].createElement(_NavList.NavList, {
|
|
67
35
|
layout: layout
|
|
68
|
-
},
|
|
36
|
+
}, _NavLinksWithSubmenu["default"].map(function (item, key) {
|
|
69
37
|
var _item$subMenu;
|
|
70
38
|
|
|
71
39
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
|
|
@@ -89,6 +57,6 @@ var NavVerticalLayout = function NavVerticalLayout() {
|
|
|
89
57
|
})));
|
|
90
58
|
};
|
|
91
59
|
|
|
92
|
-
exports.
|
|
93
|
-
var _default =
|
|
60
|
+
exports.VerticalWithoutDrawer = VerticalWithoutDrawer;
|
|
61
|
+
var _default = VerticalWithoutDrawer;
|
|
94
62
|
exports["default"] = _default;
|
|
@@ -10,10 +10,8 @@ export * from '@digigov/react-core/NavMenuContent';
|
|
|
10
10
|
export * from '@digigov/react-core/NavMenuContentListBase';
|
|
11
11
|
export * from '@digigov/react-core/NavMenuContentListItem';
|
|
12
12
|
export * from '@digigov/react-core/NavMenuTitle';
|
|
13
|
-
export * from '@digigov/react-core/NavListItemAction';
|
|
14
|
-
export * from '@digigov/react-core/NavListItemAction';
|
|
15
13
|
export * from '@digigov/react-core/NavListItemActionContainer';
|
|
14
|
+
export * from '@digigov/react-core/NavListItemAction';
|
|
16
15
|
export * from '@digigov/react-core/NavListItemLink';
|
|
17
16
|
export * from '@digigov/react-core/NavListItemButton';
|
|
18
|
-
export * from '@digigov/react-core/NavListItemAction';
|
|
19
17
|
export default NavList;
|
|
@@ -162,30 +162,30 @@ Object.keys(_NavMenuTitle).forEach(function (key) {
|
|
|
162
162
|
});
|
|
163
163
|
});
|
|
164
164
|
|
|
165
|
-
var
|
|
165
|
+
var _NavListItemActionContainer = require("@digigov/react-core/NavListItemActionContainer");
|
|
166
166
|
|
|
167
|
-
Object.keys(
|
|
167
|
+
Object.keys(_NavListItemActionContainer).forEach(function (key) {
|
|
168
168
|
if (key === "default" || key === "__esModule") return;
|
|
169
169
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
170
|
-
if (key in exports && exports[key] ===
|
|
170
|
+
if (key in exports && exports[key] === _NavListItemActionContainer[key]) return;
|
|
171
171
|
Object.defineProperty(exports, key, {
|
|
172
172
|
enumerable: true,
|
|
173
173
|
get: function get() {
|
|
174
|
-
return
|
|
174
|
+
return _NavListItemActionContainer[key];
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
177
|
});
|
|
178
178
|
|
|
179
|
-
var
|
|
179
|
+
var _NavListItemAction = require("@digigov/react-core/NavListItemAction");
|
|
180
180
|
|
|
181
|
-
Object.keys(
|
|
181
|
+
Object.keys(_NavListItemAction).forEach(function (key) {
|
|
182
182
|
if (key === "default" || key === "__esModule") return;
|
|
183
183
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
184
|
-
if (key in exports && exports[key] ===
|
|
184
|
+
if (key in exports && exports[key] === _NavListItemAction[key]) return;
|
|
185
185
|
Object.defineProperty(exports, key, {
|
|
186
186
|
enumerable: true,
|
|
187
187
|
get: function get() {
|
|
188
|
-
return
|
|
188
|
+
return _NavListItemAction[key];
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
191
|
});
|
|
@@ -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
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digigov/ui",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-eb2842b4",
|
|
4
4
|
"description": "@digigov reusable components toolkit",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"google-libphonenumber": "3.2.8",
|
|
12
|
-
"@uides/react-qr-reader": "2.3.1-rc",
|
|
12
|
+
"@uides/react-qr-reader": "2.3.1-rc-rc.2-rc.3",
|
|
13
13
|
"react-query": "2.26.4",
|
|
14
14
|
"yup": "0.32.11",
|
|
15
15
|
"publint": "0.1.8",
|
|
16
|
-
"@digigov/react-icons": "1.0.0-
|
|
16
|
+
"@digigov/react-icons": "1.0.0-eb2842b4"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"@material-ui/core": "4.11.3",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"clsx": "1.1.1",
|
|
22
22
|
"react": "^16.8.0 || ^17.0.0",
|
|
23
23
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
24
|
-
"@digigov/react-core": "1.0.0-
|
|
24
|
+
"@digigov/react-core": "1.0.0-eb2842b4"
|
|
25
25
|
},
|
|
26
26
|
"gitHead": "c903a46306f77f55ad7fc4d2e274006f39a6c871",
|
|
27
27
|
"private": false,
|
package/registry.d.ts
CHANGED
|
@@ -177,6 +177,7 @@ declare var _default: {
|
|
|
177
177
|
'@digigov/ui/utils/Kitchensink/KitchensinkComponent': {};
|
|
178
178
|
'@digigov/ui/utils/Kitchensink/KitchensinkDashboard': {};
|
|
179
179
|
'@digigov/ui/utils/SvgIcon': {};
|
|
180
|
+
'@digigov/ui/utils/Typography': {};
|
|
180
181
|
'@digigov/ui/utils/VisuallyHidden': {};
|
|
181
182
|
'@digigov/ui/utils/withDeprecation': {};
|
|
182
183
|
};
|
package/registry.js
CHANGED
|
@@ -363,6 +363,8 @@ var _digigov_ui_utils_Kitchensink_KitchensinkDashboard = _interopRequireWildcard
|
|
|
363
363
|
|
|
364
364
|
var _digigov_ui_utils_SvgIcon = _interopRequireWildcard(require("@digigov/ui/utils/SvgIcon"));
|
|
365
365
|
|
|
366
|
+
var _digigov_ui_utils_Typography = _interopRequireWildcard(require("@digigov/ui/utils/Typography"));
|
|
367
|
+
|
|
366
368
|
var _digigov_ui_utils_VisuallyHidden = _interopRequireWildcard(require("@digigov/ui/utils/VisuallyHidden"));
|
|
367
369
|
|
|
368
370
|
var _digigov_ui_utils_withDeprecation = _interopRequireWildcard(require("@digigov/ui/utils/withDeprecation"));
|
|
@@ -679,6 +681,7 @@ var _default = {
|
|
|
679
681
|
'@digigov/ui/utils/Kitchensink/KitchensinkComponent': lazyImport(_digigov_ui_utils_Kitchensink_KitchensinkComponent),
|
|
680
682
|
'@digigov/ui/utils/Kitchensink/KitchensinkDashboard': lazyImport(_digigov_ui_utils_Kitchensink_KitchensinkDashboard),
|
|
681
683
|
'@digigov/ui/utils/SvgIcon': lazyImport(_digigov_ui_utils_SvgIcon),
|
|
684
|
+
'@digigov/ui/utils/Typography': lazyImport(_digigov_ui_utils_Typography),
|
|
682
685
|
'@digigov/ui/utils/VisuallyHidden': lazyImport(_digigov_ui_utils_VisuallyHidden),
|
|
683
686
|
'@digigov/ui/utils/withDeprecation': lazyImport(_digigov_ui_utils_withDeprecation)
|
|
684
687
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Header from '@digigov/ui/app/Header';
|
|
3
3
|
import HeaderContent from '@digigov/ui/app/Header/HeaderContent';
|
|
4
|
-
import HeaderNavMenuContent from '@digigov/ui/app/Header/HeaderNavMenuContent';
|
|
5
4
|
import HeaderSection from '@digigov/ui/app/Header/HeaderSection';
|
|
6
5
|
import HeaderTitle from '@digigov/ui/app/Header/HeaderTitle';
|
|
7
6
|
import GovGRLogo from '@digigov/ui/govgr/GovGRLogo';
|
|
8
|
-
import {
|
|
7
|
+
import { ArrowIcon, MoreVertIcon } from '@digigov/ui/icons';
|
|
9
8
|
import { Top } from '@digigov/ui/layouts/Basic';
|
|
10
9
|
import {
|
|
11
10
|
Dropdown,
|
|
@@ -14,40 +13,38 @@ import {
|
|
|
14
13
|
} from '@digigov/ui/navigation/Dropdown';
|
|
15
14
|
import NavList from '@digigov/ui/navigation/NavList/NavList';
|
|
16
15
|
import { NavListItemAction } from '@digigov/ui/navigation/NavList';
|
|
16
|
+
import Button from '@digigov/ui/form/Button';
|
|
17
17
|
|
|
18
|
-
export const WithHeaderNavigation = () =>
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</Header>
|
|
50
|
-
</Top>
|
|
51
|
-
);
|
|
18
|
+
export const WithHeaderNavigation = () => {
|
|
19
|
+
return (
|
|
20
|
+
<Top>
|
|
21
|
+
<Header>
|
|
22
|
+
<HeaderContent>
|
|
23
|
+
<HeaderSection>
|
|
24
|
+
<GovGRLogo />
|
|
25
|
+
<HeaderTitle href="#">Δηλώσεις</HeaderTitle>
|
|
26
|
+
</HeaderSection>
|
|
27
|
+
<HeaderSection>
|
|
28
|
+
<Button variant="link">
|
|
29
|
+
Μενού <ArrowIcon direction="down" />
|
|
30
|
+
</Button>
|
|
31
|
+
<Dropdown align="right">
|
|
32
|
+
<DropdownButton variant="link">
|
|
33
|
+
ΜΑΡΙΟΣ ΜΕΝΕΞΕΣ
|
|
34
|
+
<MoreVertIcon size="md" />
|
|
35
|
+
</DropdownButton>
|
|
36
|
+
<DropdownContent>
|
|
37
|
+
<NavList layout="vertical">
|
|
38
|
+
<NavListItemAction href="#">Ρυθμίσεις</NavListItemAction>
|
|
39
|
+
<NavListItemAction href="#">Έξοδος</NavListItemAction>
|
|
40
|
+
</NavList>
|
|
41
|
+
</DropdownContent>
|
|
42
|
+
</Dropdown>
|
|
43
|
+
</HeaderSection>
|
|
44
|
+
</HeaderContent>
|
|
45
|
+
</Header>
|
|
46
|
+
</Top>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
52
49
|
|
|
53
50
|
export default WithHeaderNavigation;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { NavListAuto } from '@digigov/ui';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { NavListAuto } from '@digigov/ui/navigation/NavList';
|
|
3
|
+
import { BurgerIcon } from '@digigov/ui/icons';
|
|
3
4
|
import { Header } from '@digigov/ui/app/Header';
|
|
4
5
|
import { HeaderContent } from '@digigov/ui/app/Header/HeaderContent';
|
|
5
6
|
import { HeaderSection } from '@digigov/ui/app/Header/HeaderSection';
|
|
6
7
|
import { GovGRLogo } from '@digigov/ui/govgr/GovGRLogo';
|
|
7
8
|
import { Top } from '@digigov/ui/layouts/Basic';
|
|
9
|
+
import { Button } from '@digigov/ui/form';
|
|
8
10
|
|
|
9
11
|
export const WithNavigation = () => {
|
|
10
|
-
|
|
12
|
+
const [open, setOpen] = useState(false);
|
|
11
13
|
|
|
12
14
|
return (
|
|
13
15
|
<Top>
|
|
@@ -16,20 +18,24 @@ export const WithNavigation = () => {
|
|
|
16
18
|
<HeaderSection>
|
|
17
19
|
<GovGRLogo href="#" />
|
|
18
20
|
</HeaderSection>
|
|
21
|
+
<HeaderSection>
|
|
22
|
+
<Button variant="link" smUpHidden onClick={() => setOpen(!open)}>
|
|
23
|
+
<BurgerIcon size='md' />
|
|
24
|
+
</Button>
|
|
25
|
+
</HeaderSection>
|
|
19
26
|
</HeaderContent>
|
|
20
27
|
</Header>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/>
|
|
28
|
+
<NavListAuto
|
|
29
|
+
links={[
|
|
30
|
+
{ name: 'home', label: 'Αρχική', href: '#home' },
|
|
31
|
+
{ name: 'news', label: 'Νέα', href: '#news' },
|
|
32
|
+
{ name: 'links', label: 'Σύνδεσμοι', href: '#links' },
|
|
33
|
+
{ name: 'contact', label: 'Επικοινωνία', href: '#contact' },
|
|
34
|
+
]}
|
|
35
|
+
open={open}
|
|
36
|
+
drawer="smDown"
|
|
37
|
+
onClose={() => setOpen(false)}
|
|
38
|
+
/>
|
|
33
39
|
</Top>
|
|
34
40
|
);
|
|
35
41
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "4",
|
|
3
|
+
"stories": {
|
|
4
|
+
"digigov-ui-app-modal--dense": {
|
|
5
|
+
"actionSets": [
|
|
6
|
+
{
|
|
7
|
+
"actions": [
|
|
8
|
+
{
|
|
9
|
+
"name": "click",
|
|
10
|
+
"args": {
|
|
11
|
+
"selector": "html>body>div:nth-child(5)>div>button"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"id": "kiFgErhdQ2jf",
|
|
16
|
+
"title": "Open modal"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Modal,
|
|
5
|
+
ModalHeading,
|
|
6
|
+
ModalContent,
|
|
7
|
+
ModalAction,
|
|
8
|
+
} from '@digigov/ui/app/Modal';
|
|
9
|
+
|
|
10
|
+
import { Button } from '@digigov/ui/form/Button';
|
|
11
|
+
import { FieldContainer } from '@digigov/ui/form/FieldContainer';
|
|
12
|
+
import { LabelContainer } from '@digigov/ui/form/LabelContainer';
|
|
13
|
+
import { TextInput } from '@digigov/ui/form/TextInput';
|
|
14
|
+
|
|
15
|
+
export const Dense = () => {
|
|
16
|
+
const [open, setOpen] = useState(false);
|
|
17
|
+
return (
|
|
18
|
+
<div>
|
|
19
|
+
<Button
|
|
20
|
+
onClick={() => {
|
|
21
|
+
setOpen(!open);
|
|
22
|
+
}}
|
|
23
|
+
>
|
|
24
|
+
Προσθήκη τηλεφώνου
|
|
25
|
+
</Button>
|
|
26
|
+
<Modal open={open} aria-labelledby="modal-label" dense>
|
|
27
|
+
<ModalHeading id="modal-label">Προσθήκη τηλεφώνου</ModalHeading>
|
|
28
|
+
<ModalContent>
|
|
29
|
+
<FieldContainer margin={0}>
|
|
30
|
+
<LabelContainer>
|
|
31
|
+
Συμπληρώστε το τηλέφωνο επικοινωνίας
|
|
32
|
+
<TextInput name="inputext" maxWidth={'10-char'}></TextInput>
|
|
33
|
+
</LabelContainer>
|
|
34
|
+
</FieldContainer>
|
|
35
|
+
</ModalContent>
|
|
36
|
+
<ModalAction>
|
|
37
|
+
<Button>Υποβολή</Button>
|
|
38
|
+
<Button
|
|
39
|
+
variant="link"
|
|
40
|
+
onClick={() => {
|
|
41
|
+
setOpen(!open);
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
Ακύρωση
|
|
45
|
+
</Button>
|
|
46
|
+
</ModalAction>
|
|
47
|
+
</Modal>
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default Dense;
|
|
@@ -32,6 +32,22 @@
|
|
|
32
32
|
"title": "Click button"
|
|
33
33
|
}
|
|
34
34
|
]
|
|
35
|
+
},
|
|
36
|
+
"digigov-ui-feedback-copytoclipboard--dense": {
|
|
37
|
+
"actionSets": [
|
|
38
|
+
{
|
|
39
|
+
"actions": [
|
|
40
|
+
{
|
|
41
|
+
"name": "click",
|
|
42
|
+
"args": {
|
|
43
|
+
"selector": "html>body>div:nth-child(5)>div>div>button"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"id": "ghUU4iC32gX-",
|
|
48
|
+
"title": "Click button"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
35
51
|
}
|
|
36
52
|
}
|
|
37
53
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CopyToClipboard } from '@digigov/ui/feedback/CopyToClipboard';
|
|
3
|
+
import { Button } from '@digigov/ui/form/Button';
|
|
4
|
+
|
|
5
|
+
export const Dense = () => {
|
|
6
|
+
return (
|
|
7
|
+
<CopyToClipboard
|
|
8
|
+
text="copied-text"
|
|
9
|
+
variant="tooltip"
|
|
10
|
+
tooltipAlign="left"
|
|
11
|
+
message="Αντιγράφηκε στο πρόχειρο"
|
|
12
|
+
id="copy-to-clipboard"
|
|
13
|
+
dense
|
|
14
|
+
>
|
|
15
|
+
<Button color="secondary" aria-describedby="copy-to-clipboard">
|
|
16
|
+
Αντιγραφή
|
|
17
|
+
</Button>
|
|
18
|
+
</CopyToClipboard>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
export default Dense;
|
|
@@ -14,7 +14,7 @@ export const CopyToClipboard = React.forwardRef<
|
|
|
14
14
|
HTMLDivElement,
|
|
15
15
|
CopyToClipboardProps
|
|
16
16
|
>(function CopyToClipboard(
|
|
17
|
-
{ text, variant = 'tooltip', tooltipAlign = 'right', message, timeout = 3000, children },
|
|
17
|
+
{ text, variant = 'tooltip', tooltipAlign = 'right', message, dense, timeout = 3000, children },
|
|
18
18
|
ref
|
|
19
19
|
) {
|
|
20
20
|
const [enabled, setEnabled] = useState(false);
|
|
@@ -39,6 +39,7 @@ export const CopyToClipboard = React.forwardRef<
|
|
|
39
39
|
variant={variant}
|
|
40
40
|
tooltipAlign={tooltipAlign}
|
|
41
41
|
ref={ref}
|
|
42
|
+
dense={dense}
|
|
42
43
|
>
|
|
43
44
|
{children}
|
|
44
45
|
{enabled && (
|
|
@@ -8,6 +8,7 @@ export default {
|
|
|
8
8
|
displayName: 'ErrorSummary',
|
|
9
9
|
};
|
|
10
10
|
export * from '@digigov/ui/feedback/ErrorSummary/__stories__/Default';
|
|
11
|
+
export * from '@digigov/ui/feedback/ErrorSummary/__stories__/Dense';
|
|
11
12
|
export * from '@digigov/ui/feedback/ErrorSummary/__stories__/LinkedToInput';
|
|
12
13
|
export * from '@digigov/ui/feedback/ErrorSummary/__stories__/LinkedToField';
|
|
13
14
|
export * from '@digigov/ui/feedback/ErrorSummary/__stories__/LinkedToCheckbox';
|