@digigov/ui 0.26.2 → 0.26.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -1
- package/admin/AutoComplete/index.d.ts +3 -3
- package/admin/AutoComplete/index.js +16 -6
- package/admin/CopyToClipboard/__stories__/Default.js +3 -3
- package/admin/CopyToClipboard/__stories__/MultipleCopies.js +3 -3
- package/admin/CopyToClipboard/index.d.ts +3 -2
- package/admin/CopyToClipboard/index.js +6 -4
- package/app/Footer/Footer.stories.d.ts +1 -0
- package/app/Footer/Footer.stories.js +14 -0
- package/app/Footer/__stories__/FooterWithLogo.js +1 -1
- package/app/Footer/__stories__/FooterWithSecondaryNavigation.js +1 -1
- package/app/Footer/__stories__/YearCopyright.d.ts +2 -0
- package/app/Footer/__stories__/YearCopyright.js +44 -0
- package/app/QrCodeViewer/QRCode.stories.d.ts +8 -0
- package/app/QrCodeViewer/QRCode.stories.js +46 -0
- package/app/QrCodeViewer/__stories__/Custom.d.ts +2 -0
- package/app/QrCodeViewer/__stories__/Custom.js +37 -0
- package/app/QrCodeViewer/__stories__/Default.d.ts +2 -0
- package/app/QrCodeViewer/__stories__/Default.js +24 -0
- package/app/QrCodeViewer/index.d.ts +8 -0
- package/app/QrCodeViewer/index.js +248 -0
- package/app/QrCodeViewer/index.mdx +21 -0
- package/app/QrCodeViewer/qrcodegen.d.ts +100 -0
- package/app/QrCodeViewer/qrcodegen.js +1086 -0
- package/app/QrCodeViewer/types.d.ts +29 -0
- package/app/QrCodeViewer/types.js +5 -0
- package/app/QrCodeViewer/utils.d.ts +11 -0
- package/app/QrCodeViewer/utils.js +108 -0
- package/app/index.d.ts +1 -0
- package/app/index.js +13 -0
- package/core/FileUpload/index.d.ts +1 -0
- package/core/FileUpload/index.js +14 -0
- package/es/admin/AutoComplete/index.js +16 -6
- package/es/admin/CopyToClipboard/__stories__/Default.js +2 -2
- package/es/admin/CopyToClipboard/__stories__/MultipleCopies.js +3 -3
- package/es/admin/CopyToClipboard/index.js +6 -4
- package/es/app/Footer/Footer.stories.js +2 -1
- package/es/app/Footer/__stories__/FooterWithLogo.js +1 -1
- package/es/app/Footer/__stories__/FooterWithSecondaryNavigation.js +1 -1
- package/es/app/Footer/__stories__/YearCopyright.js +22 -0
- package/es/app/QrCodeViewer/QRCode.stories.js +8 -0
- package/es/app/QrCodeViewer/__stories__/Custom.js +22 -0
- package/es/app/QrCodeViewer/__stories__/Default.js +11 -0
- package/es/app/QrCodeViewer/index.js +224 -0
- package/es/app/QrCodeViewer/index.mdx +21 -0
- package/es/app/QrCodeViewer/qrcodegen.js +1085 -0
- package/es/app/QrCodeViewer/types.js +1 -0
- package/es/app/QrCodeViewer/utils.js +95 -0
- package/es/app/index.js +1 -0
- package/es/core/FileUpload/index.js +1 -0
- package/es/govgr/Footer/Copyright.js +7 -10
- package/es/layouts/Grid/__stories__/Default.js +19 -18
- package/es/layouts/Grid/__stories__/Inline.js +19 -18
- package/es/registry.js +8 -0
- package/esm/admin/AutoComplete/index.js +16 -6
- package/esm/admin/CopyToClipboard/__stories__/Default.js +2 -2
- package/esm/admin/CopyToClipboard/__stories__/MultipleCopies.js +3 -3
- package/esm/admin/CopyToClipboard/index.js +6 -4
- package/esm/app/Footer/Footer.stories.js +2 -1
- package/esm/app/Footer/__stories__/FooterWithLogo.js +1 -1
- package/esm/app/Footer/__stories__/FooterWithSecondaryNavigation.js +1 -1
- package/esm/app/Footer/__stories__/YearCopyright.js +22 -0
- package/esm/app/QrCodeViewer/QRCode.stories.js +8 -0
- package/esm/app/QrCodeViewer/__stories__/Custom.js +22 -0
- package/esm/app/QrCodeViewer/__stories__/Default.js +11 -0
- package/esm/app/QrCodeViewer/index.js +224 -0
- package/esm/app/QrCodeViewer/index.mdx +21 -0
- package/esm/app/QrCodeViewer/qrcodegen.js +1085 -0
- package/esm/app/QrCodeViewer/types.js +1 -0
- package/esm/app/QrCodeViewer/utils.js +95 -0
- package/esm/app/index.js +1 -0
- package/esm/core/FileUpload/index.js +1 -0
- package/esm/govgr/Footer/Copyright.js +7 -10
- package/esm/index.js +1 -1
- package/esm/layouts/Grid/__stories__/Default.js +19 -18
- package/esm/layouts/Grid/__stories__/Inline.js +19 -18
- package/esm/registry.js +8 -0
- package/govgr/Footer/Copyright.d.ts +1 -0
- package/govgr/Footer/Copyright.js +9 -8
- package/layouts/Grid/__stories__/Default.js +20 -18
- package/layouts/Grid/__stories__/Inline.js +20 -18
- package/package.json +3 -3
- package/registry.d.ts +4 -0
- package/registry.js +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
var DEFAULT_IMG_SCALE = 0.1;
|
|
2
|
+
export var MARGIN_SIZE = 4;
|
|
3
|
+
export function generatePath(modules) {
|
|
4
|
+
var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
5
|
+
var ops = [];
|
|
6
|
+
modules.forEach(function (row, y) {
|
|
7
|
+
var start = null;
|
|
8
|
+
row.forEach(function (cell, x) {
|
|
9
|
+
if (!cell && start !== null) {
|
|
10
|
+
// M0 0h7v1H0z injects the space with the move and drops the comma,
|
|
11
|
+
// saving a char per operation
|
|
12
|
+
ops.push("M".concat(start + margin, " ").concat(y + margin, "h").concat(x - start, "v1H").concat(start + margin, "z"));
|
|
13
|
+
start = null;
|
|
14
|
+
return;
|
|
15
|
+
} // end of row, clean up or skip
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
if (x === row.length - 1) {
|
|
19
|
+
if (!cell) {
|
|
20
|
+
// We would have closed the op above already so this can only mean
|
|
21
|
+
// 2+ light modules in a row.
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (start === null) {
|
|
26
|
+
// Just a single dark module.
|
|
27
|
+
ops.push("M".concat(x + margin, ",").concat(y + margin, " h1v1H").concat(x + margin, "z"));
|
|
28
|
+
} else {
|
|
29
|
+
// Otherwise finish the current line.
|
|
30
|
+
ops.push("M".concat(start + margin, ",").concat(y + margin, " h").concat(x + 1 - start, "v1H").concat(start + margin, "z"));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (cell && start === null) {
|
|
37
|
+
start = x;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
return ops.join('');
|
|
42
|
+
} // We could just do this in generatePath, except that we want to support
|
|
43
|
+
// non-Path2D canvas, so we need to keep it an explicit step.
|
|
44
|
+
|
|
45
|
+
export function excavateModules(modules, excavation) {
|
|
46
|
+
return modules.slice().map(function (row, y) {
|
|
47
|
+
if (y < excavation.y || y >= excavation.y + excavation.h) {
|
|
48
|
+
return row;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return row.map(function (cell, x) {
|
|
52
|
+
if (x < excavation.x || x >= excavation.x + excavation.w) {
|
|
53
|
+
return cell;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return false;
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
export function getImageSettings(cells, size, includeMargin, imageSettings) {
|
|
61
|
+
if (imageSettings == null) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
var margin = includeMargin ? MARGIN_SIZE : 0;
|
|
66
|
+
var numCells = cells.length + margin * 2;
|
|
67
|
+
var defaultSize = Math.floor(size * DEFAULT_IMG_SCALE);
|
|
68
|
+
var scale = numCells / size;
|
|
69
|
+
var w = (imageSettings.width || defaultSize) * scale;
|
|
70
|
+
var h = (imageSettings.height || defaultSize) * scale;
|
|
71
|
+
var x = imageSettings.x == null ? cells.length / 2 - w / 2 : imageSettings.x * scale;
|
|
72
|
+
var y = imageSettings.y == null ? cells.length / 2 - h / 2 : imageSettings.y * scale;
|
|
73
|
+
var excavation;
|
|
74
|
+
|
|
75
|
+
if (imageSettings.excavate) {
|
|
76
|
+
var floorX = Math.floor(x);
|
|
77
|
+
var floorY = Math.floor(y);
|
|
78
|
+
var ceilW = Math.ceil(w + x - floorX);
|
|
79
|
+
var ceilH = Math.ceil(h + y - floorY);
|
|
80
|
+
excavation = {
|
|
81
|
+
x: floorX,
|
|
82
|
+
y: floorY,
|
|
83
|
+
w: ceilW,
|
|
84
|
+
h: ceilH
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
x: x,
|
|
90
|
+
y: y,
|
|
91
|
+
h: h,
|
|
92
|
+
w: w,
|
|
93
|
+
excavation: excavation
|
|
94
|
+
};
|
|
95
|
+
}
|
package/es/app/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from '@digigov/ui/app/App';
|
|
2
2
|
export * from '@digigov/ui/app/PageTitle';
|
|
3
3
|
export * from '@digigov/ui/app/QrCodeScanner';
|
|
4
|
+
export * from '@digigov/ui/app/QrCodeViewer';
|
|
4
5
|
export * from '@digigov/ui/app/Header';
|
|
5
6
|
export * from '@digigov/ui/app/i18n';
|
|
6
7
|
export * from '@digigov/ui/app/I18nText';
|
|
@@ -2,15 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import CoreCopyright from '@digigov/react-core/Copyright';
|
|
3
3
|
import { useTranslation } from '@digigov/ui/app';
|
|
4
4
|
import Link from '@digigov/ui/core/Link';
|
|
5
|
-
|
|
6
|
-
var getCopyright = function getCopyright() {
|
|
5
|
+
export var getCopyright = function getCopyright() {
|
|
7
6
|
var year = new Date().getFullYear();
|
|
8
|
-
return "\xA9 Copyright ".concat(year);
|
|
7
|
+
return "\xA9 Copyright ".concat(year, " - ");
|
|
9
8
|
};
|
|
10
|
-
|
|
11
9
|
export var Copyright = function Copyright(_ref) {
|
|
12
|
-
var
|
|
13
|
-
copyright = _ref$copyright === void 0 ? getCopyright() : _ref$copyright,
|
|
10
|
+
var copyright = _ref.copyright,
|
|
14
11
|
createdBy = _ref.createdBy,
|
|
15
12
|
minDigitalCopyright = _ref.minDigitalCopyright,
|
|
16
13
|
children = _ref.children;
|
|
@@ -25,14 +22,14 @@ export var Copyright = function Copyright(_ref) {
|
|
|
25
22
|
url: 'https://grnet.gr',
|
|
26
23
|
label: t('footer.grnet')
|
|
27
24
|
};
|
|
28
|
-
return /*#__PURE__*/React.createElement(CoreCopyright, null, children ? children : /*#__PURE__*/React.createElement(React.Fragment, null, copyright,
|
|
25
|
+
return /*#__PURE__*/React.createElement(CoreCopyright, null, children ? children : /*#__PURE__*/React.createElement(React.Fragment, null, copyright, createdBy || /*#__PURE__*/React.createElement(React.Fragment, null, t('footer.created_by'), ' ', /*#__PURE__*/React.createElement(Link, {
|
|
29
26
|
href: copyrightInfo.url,
|
|
30
27
|
target: "_blank",
|
|
31
28
|
rel: "noopener noreferrer"
|
|
32
|
-
}, copyrightInfo.label), ' ', !minDigitalCopyright && /*#__PURE__*/React.createElement(React.Fragment, null, t('footer.
|
|
33
|
-
href: "https://
|
|
29
|
+
}, copyrightInfo.label), ' ', !minDigitalCopyright && /*#__PURE__*/React.createElement(React.Fragment, null, t('footer.created_for'), ' ', /*#__PURE__*/React.createElement(Link, {
|
|
30
|
+
href: "https://mindigital.gr",
|
|
34
31
|
target: "_blank",
|
|
35
32
|
rel: "noopener noreferrer"
|
|
36
|
-
}, t('footer.
|
|
33
|
+
}, t('footer.mindigital'))))));
|
|
37
34
|
};
|
|
38
35
|
export default Copyright;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Grid from '@digigov/react-core/Grid';
|
|
3
|
+
import { Card } from '@digigov/ui/core';
|
|
3
4
|
|
|
4
5
|
var _ref = /*#__PURE__*/React.createElement("div", {
|
|
5
6
|
className: "govgr-btn govgr-btn-primary"
|
|
@@ -16,9 +17,9 @@ var _ref2 = /*#__PURE__*/React.createElement(Grid, {
|
|
|
16
17
|
sm: 8,
|
|
17
18
|
md: 6,
|
|
18
19
|
lg: 4,
|
|
19
|
-
xl: 2
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
xl: 2
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
22
|
+
variant: "border",
|
|
22
23
|
role: "gridcell"
|
|
23
24
|
}, "1")), /*#__PURE__*/React.createElement(Grid, {
|
|
24
25
|
role: "row",
|
|
@@ -26,9 +27,9 @@ var _ref2 = /*#__PURE__*/React.createElement(Grid, {
|
|
|
26
27
|
sm: 4,
|
|
27
28
|
md: 6,
|
|
28
29
|
lg: 4,
|
|
29
|
-
xl: 2
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
xl: 2
|
|
31
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
32
|
+
variant: "border",
|
|
32
33
|
role: "gridcell"
|
|
33
34
|
}, "1")), /*#__PURE__*/React.createElement(Grid, {
|
|
34
35
|
role: "row",
|
|
@@ -36,9 +37,9 @@ var _ref2 = /*#__PURE__*/React.createElement(Grid, {
|
|
|
36
37
|
sm: 8,
|
|
37
38
|
md: 6,
|
|
38
39
|
lg: 4,
|
|
39
|
-
xl: 2
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
xl: 2
|
|
41
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
42
|
+
variant: "border",
|
|
42
43
|
role: "gridcell"
|
|
43
44
|
}, "1")), /*#__PURE__*/React.createElement(Grid, {
|
|
44
45
|
role: "row",
|
|
@@ -46,9 +47,9 @@ var _ref2 = /*#__PURE__*/React.createElement(Grid, {
|
|
|
46
47
|
sm: 4,
|
|
47
48
|
md: 6,
|
|
48
49
|
lg: 4,
|
|
49
|
-
xl: 2
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
xl: 2
|
|
51
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
52
|
+
variant: "border",
|
|
52
53
|
role: "gridcell"
|
|
53
54
|
}, "1")), /*#__PURE__*/React.createElement(Grid, {
|
|
54
55
|
role: "row",
|
|
@@ -56,9 +57,9 @@ var _ref2 = /*#__PURE__*/React.createElement(Grid, {
|
|
|
56
57
|
sm: 8,
|
|
57
58
|
md: 6,
|
|
58
59
|
lg: 4,
|
|
59
|
-
xl: 2
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
xl: 2
|
|
61
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
62
|
+
variant: "border",
|
|
62
63
|
role: "gridcell"
|
|
63
64
|
}, "1")), /*#__PURE__*/React.createElement(Grid, {
|
|
64
65
|
role: "row",
|
|
@@ -66,9 +67,9 @@ var _ref2 = /*#__PURE__*/React.createElement(Grid, {
|
|
|
66
67
|
sm: 4,
|
|
67
68
|
md: 6,
|
|
68
69
|
lg: 4,
|
|
69
|
-
xl: 2
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
xl: 2
|
|
71
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
72
|
+
variant: "border",
|
|
72
73
|
role: "gridcell"
|
|
73
74
|
}, "1")));
|
|
74
75
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Grid from '@digigov/react-core/Grid';
|
|
3
|
+
import { Card } from '@digigov/ui/core';
|
|
3
4
|
|
|
4
5
|
var _ref = /*#__PURE__*/React.createElement(Grid, {
|
|
5
6
|
role: "grid",
|
|
@@ -13,9 +14,9 @@ var _ref = /*#__PURE__*/React.createElement(Grid, {
|
|
|
13
14
|
sm: 8,
|
|
14
15
|
md: 6,
|
|
15
16
|
lg: 4,
|
|
16
|
-
xl: 2
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
xl: 2
|
|
18
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
19
|
+
variant: "border",
|
|
19
20
|
role: "gridcell"
|
|
20
21
|
}, "1")), /*#__PURE__*/React.createElement(Grid, {
|
|
21
22
|
role: "row",
|
|
@@ -23,9 +24,9 @@ var _ref = /*#__PURE__*/React.createElement(Grid, {
|
|
|
23
24
|
sm: 4,
|
|
24
25
|
md: 6,
|
|
25
26
|
lg: 4,
|
|
26
|
-
xl: 2
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
xl: 2
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
29
|
+
variant: "border",
|
|
29
30
|
role: "gridcell"
|
|
30
31
|
}, "1")), /*#__PURE__*/React.createElement(Grid, {
|
|
31
32
|
role: "row",
|
|
@@ -33,9 +34,9 @@ var _ref = /*#__PURE__*/React.createElement(Grid, {
|
|
|
33
34
|
sm: 8,
|
|
34
35
|
md: 6,
|
|
35
36
|
lg: 4,
|
|
36
|
-
xl: 2
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
xl: 2
|
|
38
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
39
|
+
variant: "border",
|
|
39
40
|
role: "gridcell"
|
|
40
41
|
}, "1")), /*#__PURE__*/React.createElement(Grid, {
|
|
41
42
|
role: "row",
|
|
@@ -43,9 +44,9 @@ var _ref = /*#__PURE__*/React.createElement(Grid, {
|
|
|
43
44
|
sm: 4,
|
|
44
45
|
md: 6,
|
|
45
46
|
lg: 4,
|
|
46
|
-
xl: 2
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
xl: 2
|
|
48
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
49
|
+
variant: "border",
|
|
49
50
|
role: "gridcell"
|
|
50
51
|
}, "1")), /*#__PURE__*/React.createElement(Grid, {
|
|
51
52
|
role: "row",
|
|
@@ -53,9 +54,9 @@ var _ref = /*#__PURE__*/React.createElement(Grid, {
|
|
|
53
54
|
sm: 8,
|
|
54
55
|
md: 6,
|
|
55
56
|
lg: 4,
|
|
56
|
-
xl: 2
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
xl: 2
|
|
58
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
59
|
+
variant: "border",
|
|
59
60
|
role: "gridcell"
|
|
60
61
|
}, "1")), /*#__PURE__*/React.createElement(Grid, {
|
|
61
62
|
role: "row",
|
|
@@ -63,9 +64,9 @@ var _ref = /*#__PURE__*/React.createElement(Grid, {
|
|
|
63
64
|
sm: 4,
|
|
64
65
|
md: 6,
|
|
65
66
|
lg: 4,
|
|
66
|
-
xl: 2
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
xl: 2
|
|
68
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
69
|
+
variant: "border",
|
|
69
70
|
role: "gridcell"
|
|
70
71
|
}, "1")));
|
|
71
72
|
|
package/es/registry.js
CHANGED
|
@@ -48,6 +48,10 @@ import * as _digigov_ui_app_OutdatedBrowserBanner from '@digigov/ui/app/Outdated
|
|
|
48
48
|
import * as _digigov_ui_app_PageTitle from '@digigov/ui/app/PageTitle';
|
|
49
49
|
import * as _digigov_ui_app_PhaseBannerHeader from '@digigov/ui/app/PhaseBannerHeader';
|
|
50
50
|
import * as _digigov_ui_app_QrCodeScanner from '@digigov/ui/app/QrCodeScanner';
|
|
51
|
+
import * as _digigov_ui_app_QrCodeViewer from '@digigov/ui/app/QrCodeViewer';
|
|
52
|
+
import * as _digigov_ui_app_QrCodeViewer_qrcodegen from '@digigov/ui/app/QrCodeViewer/qrcodegen';
|
|
53
|
+
import * as _digigov_ui_app_QrCodeViewer_types from '@digigov/ui/app/QrCodeViewer/types';
|
|
54
|
+
import * as _digigov_ui_app_QrCodeViewer_utils from '@digigov/ui/app/QrCodeViewer/utils';
|
|
51
55
|
import * as _digigov_ui_core_Accordion from '@digigov/ui/core/Accordion';
|
|
52
56
|
import * as _digigov_ui_core_BackLink from '@digigov/ui/core/BackLink';
|
|
53
57
|
import * as _digigov_ui_core_Base from '@digigov/ui/core/Base';
|
|
@@ -216,6 +220,10 @@ export default {
|
|
|
216
220
|
'@digigov/ui/app/PageTitle': lazyImport(_digigov_ui_app_PageTitle),
|
|
217
221
|
'@digigov/ui/app/PhaseBannerHeader': lazyImport(_digigov_ui_app_PhaseBannerHeader),
|
|
218
222
|
'@digigov/ui/app/QrCodeScanner': lazyImport(_digigov_ui_app_QrCodeScanner),
|
|
223
|
+
'@digigov/ui/app/QrCodeViewer': lazyImport(_digigov_ui_app_QrCodeViewer),
|
|
224
|
+
'@digigov/ui/app/QrCodeViewer/qrcodegen': lazyImport(_digigov_ui_app_QrCodeViewer_qrcodegen),
|
|
225
|
+
'@digigov/ui/app/QrCodeViewer/types': lazyImport(_digigov_ui_app_QrCodeViewer_types),
|
|
226
|
+
'@digigov/ui/app/QrCodeViewer/utils': lazyImport(_digigov_ui_app_QrCodeViewer_utils),
|
|
219
227
|
'@digigov/ui/core/Accordion': lazyImport(_digigov_ui_core_Accordion),
|
|
220
228
|
'@digigov/ui/core/BackLink': lazyImport(_digigov_ui_core_BackLink),
|
|
221
229
|
'@digigov/ui/core/Base': lazyImport(_digigov_ui_core_Base),
|
|
@@ -572,16 +572,26 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
572
572
|
role: "listbox"
|
|
573
573
|
}, options.map(function (option, index) {
|
|
574
574
|
var showFocused = focused === -1 ? selected === index : focused === index;
|
|
575
|
-
var iosPosinsetHtml = isIosDevice() ?
|
|
575
|
+
var iosPosinsetHtml = isIosDevice() ? /*#__PURE__*/React.createElement("span", {
|
|
576
|
+
id: "".concat(id, "__option-suffix--").concat(index),
|
|
577
|
+
style: {
|
|
578
|
+
border: '0',
|
|
579
|
+
clip: 'rect(0 0 0 0)',
|
|
580
|
+
height: '1px',
|
|
581
|
+
marginBottom: '-1px',
|
|
582
|
+
marginRight: '-1px',
|
|
583
|
+
overflow: 'hidden',
|
|
584
|
+
padding: '0',
|
|
585
|
+
position: 'absolute',
|
|
586
|
+
whiteSpace: 'nowrap',
|
|
587
|
+
width: '1px'
|
|
588
|
+
}
|
|
589
|
+
}, index + 1, " \u03B1\u03C0\u03CC ", options.length) : '';
|
|
576
590
|
return /*#__PURE__*/React.createElement(AutoCompleteResultListItem, {
|
|
577
591
|
isFocused: showFocused,
|
|
578
592
|
isHovered: hovered,
|
|
579
593
|
index: index,
|
|
580
594
|
"aria-selected": focused === index ? 'true' : 'false',
|
|
581
|
-
dangerouslySetInnerHTML: {
|
|
582
|
-
__html: _this7.templateSuggestion(option) + iosPosinsetHtml
|
|
583
|
-
},
|
|
584
|
-
id: "".concat(id, "__option--").concat(index),
|
|
585
595
|
key: index,
|
|
586
596
|
onBlur: function onBlur(event) {
|
|
587
597
|
return _this7.handleOptionBlur(event, index);
|
|
@@ -600,7 +610,7 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
600
610
|
tabIndex: -1,
|
|
601
611
|
"aria-posinset": index + 1,
|
|
602
612
|
"aria-setsize": options.length
|
|
603
|
-
});
|
|
613
|
+
}, _this7.templateSuggestion(option), " ", iosPosinsetHtml);
|
|
604
614
|
}), showNoOptionsFound && /*#__PURE__*/React.createElement(AutoCompleteNoResult, null, tNoResults === null || tNoResults === void 0 ? void 0 : tNoResults())), /*#__PURE__*/React.createElement(AutoCompleteAssistiveHint, {
|
|
605
615
|
id: assistiveHintID
|
|
606
616
|
}, tAssistiveHint === null || tAssistiveHint === void 0 ? void 0 : tAssistiveHint()));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { CopyToClipboard } from '@digigov/ui/admin';
|
|
2
|
+
import { CopyToClipboard } from '@digigov/ui/admin/CopyToClipboard';
|
|
3
3
|
import { Button } from '@digigov/ui';
|
|
4
4
|
|
|
5
5
|
var _ref = /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
6
6
|
text: "copied-text",
|
|
7
|
-
variant: "
|
|
7
|
+
variant: "tooltip-left",
|
|
8
8
|
message: "text successfuly copied!",
|
|
9
9
|
id: "copy-to-clipboard"
|
|
10
10
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -59,7 +59,7 @@ var _ref3 = /*#__PURE__*/React.createElement(Title, {
|
|
|
59
59
|
|
|
60
60
|
var _ref4 = /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
61
61
|
text: "AAABBBFFFLLL",
|
|
62
|
-
variant: "
|
|
62
|
+
variant: "tooltip-left",
|
|
63
63
|
message: "text successfuly copied!"
|
|
64
64
|
}, /*#__PURE__*/React.createElement(Button, null, "\u0391\u03C0\u03AC\u03BD\u03C4\u03B7\u03C3\u03B7")), /*#__PURE__*/React.createElement(Button, {
|
|
65
65
|
color: "secondary"
|
|
@@ -83,7 +83,7 @@ var _ref6 = /*#__PURE__*/React.createElement(Grid, {
|
|
|
83
83
|
xs: 12
|
|
84
84
|
}, /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
85
85
|
text: "AAABBBFFFLLL",
|
|
86
|
-
variant: "
|
|
86
|
+
variant: "tooltip-left",
|
|
87
87
|
message: "text successfuly copied!"
|
|
88
88
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
89
89
|
color: "secondary"
|
|
@@ -108,7 +108,7 @@ export var MultipleCopies = function MultipleCopies() {
|
|
|
108
108
|
}, /*#__PURE__*/React.createElement(SummaryListItemKey, null, field.name), /*#__PURE__*/React.createElement(SummaryListItemValue, null, field.value), /*#__PURE__*/React.createElement(SummaryListItemAction, null, /*#__PURE__*/React.createElement(ButtonGroup, null, field.actions && field.actions.map(function (action, subIndex) {
|
|
109
109
|
return /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
110
110
|
text: "MMMNNNKKKO",
|
|
111
|
-
variant: "
|
|
111
|
+
variant: "tooltip-right",
|
|
112
112
|
key: subIndex
|
|
113
113
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
114
114
|
key: subIndex,
|
|
@@ -7,8 +7,10 @@ import { useTranslation } from '@digigov/ui/app';
|
|
|
7
7
|
export var CopyToClipboard = /*#__PURE__*/React.forwardRef(function CopyToClipboard(_ref, ref) {
|
|
8
8
|
var text = _ref.text,
|
|
9
9
|
_ref$variant = _ref.variant,
|
|
10
|
-
variant = _ref$variant === void 0 ? '
|
|
10
|
+
variant = _ref$variant === void 0 ? 'tooltip-right' : _ref$variant,
|
|
11
11
|
message = _ref.message,
|
|
12
|
+
_ref$timeout = _ref.timeout,
|
|
13
|
+
timeout = _ref$timeout === void 0 ? 3000 : _ref$timeout,
|
|
12
14
|
children = _ref.children;
|
|
13
15
|
|
|
14
16
|
var _useState = useState(false),
|
|
@@ -20,11 +22,11 @@ export var CopyToClipboard = /*#__PURE__*/React.forwardRef(function CopyToClipbo
|
|
|
20
22
|
t = _useTranslation.t;
|
|
21
23
|
|
|
22
24
|
useEffect(function () {
|
|
23
|
-
var
|
|
25
|
+
var timeoutInstance = setTimeout(function () {
|
|
24
26
|
if (enabled) setEnabled(false);
|
|
25
|
-
},
|
|
27
|
+
}, timeout);
|
|
26
28
|
return function () {
|
|
27
|
-
return clearTimeout(
|
|
29
|
+
return clearTimeout(timeoutInstance);
|
|
28
30
|
};
|
|
29
31
|
}, [enabled]);
|
|
30
32
|
|
|
@@ -9,4 +9,5 @@ export * from './__stories__/FooterWithLogo';
|
|
|
9
9
|
export * from './__stories__/FooterWithLink';
|
|
10
10
|
export * from './__stories__/DefaultCopyright';
|
|
11
11
|
export * from './__stories__/FooterWithSecondaryNavigation';
|
|
12
|
-
export * from './__stories__/FooterAllInclusive';
|
|
12
|
+
export * from './__stories__/FooterAllInclusive';
|
|
13
|
+
export * from './__stories__/YearCopyright';
|
|
@@ -11,7 +11,7 @@ var _ref = /*#__PURE__*/React.createElement(Footer, null, /*#__PURE__*/React.cre
|
|
|
11
11
|
src: logo1
|
|
12
12
|
}), /*#__PURE__*/React.createElement(FooterImage, {
|
|
13
13
|
src: logo2
|
|
14
|
-
})), /*#__PURE__*/React.createElement(Copyright, null, "\
|
|
14
|
+
})), /*#__PURE__*/React.createElement(Copyright, null, "\u03A5\u03BB\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7 \u03B1\u03C0\u03CC \u03C4\u03BF", ' ', /*#__PURE__*/React.createElement(Link, {
|
|
15
15
|
href: "https://grnet.gr/",
|
|
16
16
|
target: "_blank"
|
|
17
17
|
}, ' ', "\u0395\u0394\u03A5\u03A4\u0395", ' ', /*#__PURE__*/React.createElement(VisuallyHidden, null, "(\u03B1\u03BD\u03BF\u03AF\u03B3\u03B5\u03B9 \u03C3\u03B5 \u03BA\u03B1\u03B9\u03BD\u03BF\u03CD\u03C1\u03B9\u03B1 \u03BA\u03B1\u03C1\u03C4\u03AD\u03BB\u03B1)")), ' ', "\u03B3\u03B9\u03B1 \u03C4\u03BF", ' ', /*#__PURE__*/React.createElement(Link, {
|
|
@@ -18,7 +18,7 @@ var _ref = /*#__PURE__*/React.createElement(Footer, null, /*#__PURE__*/React.cre
|
|
|
18
18
|
size: "m"
|
|
19
19
|
}), /*#__PURE__*/React.createElement(FooterMeta, null, /*#__PURE__*/React.createElement(FooterMetaItem, {
|
|
20
20
|
grow: true
|
|
21
|
-
}, /*#__PURE__*/React.createElement(FooterContent, null, /*#__PURE__*/React.createElement(Copyright, null, "\
|
|
21
|
+
}, /*#__PURE__*/React.createElement(FooterContent, null, /*#__PURE__*/React.createElement(Copyright, null, "\u03A5\u03BB\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7 \u03B1\u03C0\u03CC \u03C4\u03BF", ' ', /*#__PURE__*/React.createElement(Link, {
|
|
22
22
|
href: "https://grnet.gr/",
|
|
23
23
|
target: "_blank"
|
|
24
24
|
}, ' ', "\u0395\u0394\u03A5\u03A4\u0395", ' ', /*#__PURE__*/React.createElement(VisuallyHidden, null, "(\u03B1\u03BD\u03BF\u03AF\u03B3\u03B5\u03B9 \u03C3\u03B5 \u03BA\u03B1\u03B9\u03BD\u03BF\u03CD\u03C1\u03B9\u03B1 \u03BA\u03B1\u03C1\u03C4\u03AD\u03BB\u03B1)")), ' ', "\u03B3\u03B9\u03B1 \u03C4\u03BF", ' ', /*#__PURE__*/React.createElement(Link, {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Copyright, { getCopyright } from '@digigov/ui/govgr/Footer/Copyright';
|
|
3
|
+
import HellenicRepublicLogo from '@digigov/ui/govgr/Footer/HellenicRepublicLogo';
|
|
4
|
+
import Footer from '@digigov/ui/govgr/Footer';
|
|
5
|
+
import { FooterMeta, FooterMetaItem, FooterContent, FooterInlineList, FooterInlineListItem, FooterLink, VisuallyHidden } from '@digigov/react-core';
|
|
6
|
+
|
|
7
|
+
var _ref = /*#__PURE__*/React.createElement(VisuallyHidden, null, "\u03A0\u03B5\u03C1\u03B9\u03C3\u03C3\u03CC\u03C4\u03B5\u03C1\u03B5\u03C2 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03C2");
|
|
8
|
+
|
|
9
|
+
var _ref2 = /*#__PURE__*/React.createElement(FooterInlineList, null, /*#__PURE__*/React.createElement(FooterInlineListItem, null, /*#__PURE__*/React.createElement(FooterLink, {
|
|
10
|
+
href: "#"
|
|
11
|
+
}, " \u0391\u03BA\u03CC\u03BC\u03B1 \u03BC\u03B9\u03B1 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE")), /*#__PURE__*/React.createElement(FooterInlineListItem, null, /*#__PURE__*/React.createElement(FooterLink, null, " \u0391\u03BA\u03CC\u03BC\u03B1 \u03BC\u03B9\u03B1")));
|
|
12
|
+
|
|
13
|
+
var _ref3 = /*#__PURE__*/React.createElement(FooterMetaItem, null, /*#__PURE__*/React.createElement(HellenicRepublicLogo, null));
|
|
14
|
+
|
|
15
|
+
export var YearCopyright = function YearCopyright() {
|
|
16
|
+
return /*#__PURE__*/React.createElement(Footer, null, /*#__PURE__*/React.createElement(FooterMeta, null, /*#__PURE__*/React.createElement(FooterMetaItem, {
|
|
17
|
+
grow: true
|
|
18
|
+
}, /*#__PURE__*/React.createElement(FooterContent, null, _ref, _ref2, /*#__PURE__*/React.createElement(Copyright, {
|
|
19
|
+
copyright: getCopyright()
|
|
20
|
+
}))), _ref3));
|
|
21
|
+
};
|
|
22
|
+
export default YearCopyright;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/* eslint-disable digigov/no-relative-imports */
|
|
2
|
+
import QrCodeViewer from '@digigov/ui/app/QrCodeViewer';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Digigov UI/app/QrCodeViewer',
|
|
5
|
+
component: QrCodeViewer
|
|
6
|
+
};
|
|
7
|
+
export * from './__stories__/Default';
|
|
8
|
+
export * from './__stories__/Custom';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import QrCodeViewer from '@digigov/ui/app/QrCodeViewer';
|
|
3
|
+
import logo from '@digigov/ui/govgr/images/greek-government-base64';
|
|
4
|
+
export var Custom = function Custom() {
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(QrCodeViewer, {
|
|
6
|
+
value: "https://www.gov.gr/",
|
|
7
|
+
size: 126,
|
|
8
|
+
bgColor: '#ededed',
|
|
9
|
+
fgColor: '#003375',
|
|
10
|
+
level: 'H',
|
|
11
|
+
includeMargin: false,
|
|
12
|
+
imageSettings: {
|
|
13
|
+
src: "".concat(logo),
|
|
14
|
+
x: undefined,
|
|
15
|
+
y: undefined,
|
|
16
|
+
height: 35,
|
|
17
|
+
width: 50,
|
|
18
|
+
excavate: true
|
|
19
|
+
}
|
|
20
|
+
}));
|
|
21
|
+
};
|
|
22
|
+
export default Custom;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import QrCodeViewer from '@digigov/ui/app/QrCodeViewer';
|
|
3
|
+
|
|
4
|
+
var _ref = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(QrCodeViewer, {
|
|
5
|
+
value: "https://www.gov.gr/"
|
|
6
|
+
}));
|
|
7
|
+
|
|
8
|
+
export var Default = function Default() {
|
|
9
|
+
return _ref;
|
|
10
|
+
};
|
|
11
|
+
export default Default;
|