@digigov/ui 2.0.0-a402a664 → 2.0.0-a594a958
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/Loader/Loader.stories.d.ts +45 -1
- package/app/Loader/__stories__/AccessibilityLoader.d.ts +3 -0
- package/app/Loader/__stories__/FullPageLoader.d.ts +1 -0
- package/app/Loader/__stories__/Secondary.d.ts +3 -0
- package/app/Loader/__stories__/Sizes.d.ts +3 -0
- package/app/Loader/index.native.d.ts +2 -2
- package/app/Loader/index.native.js.map +2 -2
- package/app/Loader/index.web/index.js +17 -1
- package/app/Loader/index.web.d.ts +19 -1
- package/app/Loader/index.web.js.map +3 -3
- package/app/Masthead/Masthead.stories.d.ts +28 -1
- package/app/Modal/Modal.stories.d.ts +20 -1
- package/app/Modal/index.web/index.js +2 -2
- package/app/Modal/index.web.js.map +2 -2
- package/app/hooks/useNotificationArea/index.js +76 -0
- package/app/hooks/useNotificationArea/package.json +6 -0
- package/app/hooks/useNotificationArea.d.ts +1 -0
- package/app/hooks/useNotificationArea.js.map +7 -0
- package/cjs/app/Loader/index.native.js.map +2 -2
- package/cjs/app/Loader/index.web/index.js +33 -2
- package/cjs/app/Loader/index.web.js.map +3 -3
- package/cjs/app/Modal/index.web/index.js +2 -2
- package/cjs/app/Modal/index.web.js.map +2 -2
- package/cjs/app/hooks/useNotificationArea/index.js +99 -0
- package/cjs/app/hooks/useNotificationArea.js.map +7 -0
- package/cjs/content/SafeHTML/index.js +22 -3
- package/cjs/content/SafeHTML/index.js.map +2 -2
- package/cjs/i18n/locales/el/index.js +47 -17
- package/cjs/i18n/locales/el.js.map +2 -2
- package/cjs/i18n/locales/en/index.js +36 -6
- package/cjs/i18n/locales/en.js.map +2 -2
- package/cjs/layouts/Hidden/index.js +19 -0
- package/cjs/layouts/Hidden/index.js.map +3 -3
- package/cjs/lazy.js +1 -0
- package/cjs/lazy.js.map +2 -2
- package/cjs/registry.js +10 -8
- package/cjs/registry.js.map +2 -2
- package/content/Accordion/Accordion.stories.d.ts +29 -16
- package/content/Accordion/__stories__/SummaryColorSecondary.d.ts +3 -0
- package/content/Accordion/__stories__/UsingArrowIcons.d.ts +3 -0
- package/content/Chip/Chip.stories.d.ts +2 -5
- package/content/SafeHTML/index.d.ts +3 -3
- package/content/SafeHTML/index.js +22 -3
- package/content/SafeHTML/index.js.map +2 -2
- package/content/SummaryList/SummaryList.stories.d.ts +6 -1
- package/content/SummaryList/__stories__/SummaryListExample.d.ts +2 -1
- package/content/SummaryList/__stories__/WithError.d.ts +3 -0
- package/content/Table/Table.stories.d.ts +18 -6
- package/content/Table/__stories__/UsingHighlights.d.ts +3 -0
- package/feedback/NotificationBanner/NotificationBanner.stories.d.ts +14 -13
- package/feedback/NotificationBanner/__stories__/Expanded.d.ts +3 -0
- package/feedback/PhaseBanner/PhaseBanner.stories.d.ts +1 -1
- package/i18n/locales/el/index.js +47 -17
- package/i18n/locales/el.d.ts +34 -4
- package/i18n/locales/el.js.map +2 -2
- package/i18n/locales/en/index.js +36 -6
- package/i18n/locales/en.d.ts +34 -4
- package/i18n/locales/en.js.map +2 -2
- package/index.js +1 -1
- package/layouts/Grid/Grid.stories.d.ts +82 -0
- package/layouts/Hidden/Hidden.stories.d.ts +115 -0
- package/layouts/Hidden/index.d.ts +2 -0
- package/layouts/Hidden/index.js +5 -0
- package/layouts/Hidden/index.js.map +2 -2
- package/layouts/Stack/Stack.stories.d.ts +76 -0
- package/lazy/index.js +1 -0
- package/navigation/BackToTopLink/BackToTopLink.stories.d.ts +2 -0
- package/navigation/Dropdown/Dropdown.stories.d.ts +75 -1
- package/navigation/SkipLink/SkipLink.stories.d.ts +2 -0
- package/package.json +5 -5
- package/registry/index.js +10 -8
- package/src/app/BannerContainer/__stories__/CookiesBanner.tsx +1 -21
- package/src/app/Header/doc.mdx +3 -3
- package/src/app/Loader/Loader.stories.jsx +54 -0
- package/src/app/Loader/__stories__/AccessibilityLoader.tsx +27 -0
- package/src/app/Loader/__stories__/FullPageLoader.tsx +9 -5
- package/src/app/Loader/__stories__/Secondary.tsx +11 -0
- package/src/app/Loader/__stories__/Sizes.tsx +18 -0
- package/src/app/Loader/doc.mdx +39 -0
- package/src/app/Loader/index.native.tsx +2 -2
- package/src/app/Loader/index.test.tsx +12 -0
- package/src/app/Loader/index.web.tsx +39 -1
- package/src/app/Masthead/Masthead.stories.jsx +66 -0
- package/src/app/Masthead/doc.mdx +3 -3
- package/src/app/Modal/Modal.stories.jsx +64 -0
- package/src/app/Modal/__stories__/AlertDialog.tsx +1 -1
- package/src/app/Modal/__stories__/Auto.tsx +1 -1
- package/src/app/Modal/__stories__/Default.tsx +1 -1
- package/src/app/Modal/__stories__/Dense.tsx +1 -1
- package/src/app/Modal/__stories__/WithHooks.tsx +1 -1
- package/src/app/Modal/__stories__/WithoutModalGaps.tsx +1 -1
- package/src/app/Modal/index.web.tsx +2 -2
- package/src/app/hooks/useNotificationArea.tsx +105 -0
- package/src/content/Accordion/Accordion.stories.jsx +13 -2
- package/src/content/Accordion/__stories__/Auto.tsx +0 -24
- package/src/content/Accordion/__stories__/Default.tsx +0 -21
- package/src/content/Accordion/__stories__/SummaryColorSecondary.tsx +89 -0
- package/src/content/Accordion/__stories__/UsingArrowIcons.tsx +98 -0
- package/src/content/Accordion/__stories__/WithHints.tsx +0 -24
- package/src/content/Accordion/__stories__/WithHook.tsx +0 -24
- package/src/content/Accordion/doc.mdx +1 -2
- package/src/content/Accordion/index.test.tsx +8 -0
- package/src/content/Card/doc.mdx +11 -11
- package/src/content/Chip/{Chip.stories.js → Chip.stories.jsx} +12 -3
- package/src/content/Chip/doc.mdx +4 -4
- package/src/content/List/doc.mdx +3 -3
- package/src/content/SafeHTML/index.tsx +36 -8
- package/src/content/SummaryList/SummaryList.stories.js +7 -1
- package/src/content/SummaryList/__stories__/SummaryListExample.tsx +9 -2
- package/src/content/SummaryList/__stories__/WithError.tsx +48 -0
- package/src/content/SummaryList/index.test.tsx +4 -0
- package/src/content/Table/Table.stories.jsx +19 -2
- package/src/content/Table/__stories__/UsingHighlights.tsx +82 -0
- package/src/content/Table/index.test.tsx +4 -0
- package/src/content/TaskList/doc.mdx +1 -1
- package/src/content/Timeline/doc.mdx +1 -1
- package/src/feedback/CopyToClipboard/doc.mdx +1 -1
- package/src/feedback/ErrorSummary/doc.mdx +1 -1
- package/src/feedback/NotificationBanner/NotificationBanner.stories.js +10 -9
- package/src/feedback/NotificationBanner/__stories__/Expanded.tsx +27 -0
- package/src/feedback/NotificationBanner/doc.mdx +15 -6
- package/src/feedback/NotificationBanner/index.test.tsx +4 -0
- package/src/feedback/PhaseBanner/PhaseBanner.stories.jsx +1 -1
- package/src/form/AutoComplete/doc.mdx +2 -2
- package/src/form/Button/doc.mdx +25 -14
- package/src/form/Checkbox/doc.mdx +1 -1
- package/src/form/RadioContainer/doc.mdx +4 -4
- package/src/i18n/locales/el.ts +70 -16
- package/src/i18n/locales/en.ts +44 -5
- package/src/layouts/Basic/doc.mdx +0 -2
- package/src/layouts/Grid/Grid.stories.jsx +143 -0
- package/src/layouts/Hidden/Hidden.stories.jsx +62 -0
- package/src/layouts/Hidden/index.tsx +3 -0
- package/src/layouts/Stack/Stack.stories.jsx +104 -0
- package/src/lazy.js +1 -0
- package/src/navigation/BackToTopLink/BackToTopLink.stories.js +4 -0
- package/src/navigation/BackToTopLink/doc.mdx +22 -0
- package/src/navigation/Breadcrumbs/doc.mdx +4 -0
- package/src/navigation/Dropdown/Dropdown.stories.jsx +118 -0
- package/src/navigation/Dropdown/doc.mdx +24 -2
- package/src/navigation/NavList/doc.mdx +1 -1
- package/src/navigation/Pagination/doc.mdx +5 -1
- package/src/navigation/SkipLink/SkipLink.stories.js +4 -0
- package/src/navigation/SkipLink/doc.mdx +19 -0
- package/src/registry.js +10 -8
- package/src/typography/CodeBlock/CodeBlock.stories.js +24 -0
- package/src/typography/Heading/Heading.stories.js +12 -0
- package/src/typography/HeadingCaption/HeadingCaption.stories.js +9 -0
- package/src/typography/Hint/Hint.stories.js +11 -0
- package/src/typography/Hint/__stories__/Default.tsx +1 -1
- package/src/typography/Hint/__stories__/FontSizes.tsx +4 -4
- package/src/typography/NormalText/NormalText.stories.js +10 -0
- package/src/typography/Paragraph/Paragraph.stories.js +23 -0
- package/stories-registry/index.js +48 -30
- package/typography/CodeBlock/CodeBlock.stories.d.ts +11 -0
- package/typography/Heading/Heading.stories.d.ts +10 -0
- package/typography/HeadingCaption/HeadingCaption.stories.d.ts +8 -0
- package/typography/Hint/Hint.stories.d.ts +9 -0
- package/typography/NormalText/NormalText.stories.d.ts +8 -0
- package/typography/Paragraph/Paragraph.stories.d.ts +37 -0
- package/src/app/Loader/Loader.stories.js +0 -8
- package/src/app/Masthead/Masthead.stories.js +0 -17
- package/src/app/Modal/Modal.stories.js +0 -18
- package/src/layouts/Grid/Grid.stories.js +0 -12
- package/src/layouts/Stack/Stack.stories.js +0 -15
- package/src/navigation/Dropdown/Dropdown.stories.js +0 -23
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Accordion,
|
|
5
|
+
AccordionSection,
|
|
6
|
+
AccordionSectionContent,
|
|
7
|
+
AccordionSectionSummary,
|
|
8
|
+
AccordionSectionSummaryHeading,
|
|
9
|
+
} from '@digigov/ui/content/Accordion';
|
|
10
|
+
|
|
11
|
+
import { List } from '@digigov/ui/content/List/List';
|
|
12
|
+
import { ListItem } from '@digigov/ui/content/List/ListItem';
|
|
13
|
+
import { Link } from '@digigov/ui/navigation/Link';
|
|
14
|
+
import { Paragraph } from '@digigov/ui/typography/Paragraph';
|
|
15
|
+
|
|
16
|
+
export const SummaryColorSecondary = (_: any) => (
|
|
17
|
+
<Accordion summaryColor="secondary">
|
|
18
|
+
<AccordionSection open>
|
|
19
|
+
<AccordionSectionSummary>
|
|
20
|
+
<AccordionSectionSummaryHeading aria-controls="content1">
|
|
21
|
+
Διαφορές με το δημόσιο
|
|
22
|
+
</AccordionSectionSummaryHeading>
|
|
23
|
+
</AccordionSectionSummary>
|
|
24
|
+
<AccordionSectionContent id="content1">
|
|
25
|
+
<Paragraph>
|
|
26
|
+
Παρακάτω μπορείτε να δείτε την διαθέσιμη και ενεργή υπηρεσία που αφορά
|
|
27
|
+
το επιλεγμένο γεγονός ζωής.
|
|
28
|
+
</Paragraph>
|
|
29
|
+
<List>
|
|
30
|
+
<ListItem>
|
|
31
|
+
<Link>
|
|
32
|
+
Αίτηση εξώδικης αναγνώρισης απαιτήσεων / συμβιβαστικής επίλυσης
|
|
33
|
+
διαφορών με το Δημόσιο
|
|
34
|
+
</Link>
|
|
35
|
+
</ListItem>
|
|
36
|
+
</List>
|
|
37
|
+
</AccordionSectionContent>
|
|
38
|
+
</AccordionSection>
|
|
39
|
+
<AccordionSection>
|
|
40
|
+
<AccordionSectionSummary>
|
|
41
|
+
<AccordionSectionSummaryHeading aria-controls="content2">
|
|
42
|
+
Δικαστήρια
|
|
43
|
+
</AccordionSectionSummaryHeading>
|
|
44
|
+
</AccordionSectionSummary>
|
|
45
|
+
<AccordionSectionContent id="content2">
|
|
46
|
+
<Paragraph>
|
|
47
|
+
Στη λίστα παρακάτω μπορείτε να δείτε τις υπηρεσίες που αφορούν το
|
|
48
|
+
επιλεγμένο γεγονός ζωής, κατηγοριοποιημένες σε ομάδες υπηρεσιών.
|
|
49
|
+
</Paragraph>
|
|
50
|
+
<List>
|
|
51
|
+
<ListItem>
|
|
52
|
+
<Link>Ενιαίο πιστοποιητικό δικαστικής φερεγγυότητας</Link>
|
|
53
|
+
</ListItem>
|
|
54
|
+
<ListItem>
|
|
55
|
+
<Link>Ηλεκτρονικές δικαστικές αποφάσεις</Link>
|
|
56
|
+
</ListItem>
|
|
57
|
+
<ListItem>
|
|
58
|
+
<Link>Πιστοποιητικά δικαστηρίων</Link>
|
|
59
|
+
</ListItem>
|
|
60
|
+
</List>
|
|
61
|
+
</AccordionSectionContent>
|
|
62
|
+
</AccordionSection>
|
|
63
|
+
<AccordionSection>
|
|
64
|
+
<AccordionSectionSummary>
|
|
65
|
+
<AccordionSectionSummaryHeading aria-controls="content3">
|
|
66
|
+
Δικόγραφα
|
|
67
|
+
</AccordionSectionSummaryHeading>
|
|
68
|
+
</AccordionSectionSummary>
|
|
69
|
+
<AccordionSectionContent id="content3">
|
|
70
|
+
<Paragraph>
|
|
71
|
+
Στη λίστα παρακάτω μπορείτε να δείτε τις υπηρεσίες που αφορούν το
|
|
72
|
+
επιλεγμένο γεγονός ζωής.
|
|
73
|
+
</Paragraph>
|
|
74
|
+
<List>
|
|
75
|
+
<ListItem>
|
|
76
|
+
<Link>Αντίγραφο πρακτικών υπόθεσης</Link>
|
|
77
|
+
</ListItem>
|
|
78
|
+
<ListItem>
|
|
79
|
+
<Link>
|
|
80
|
+
Ηλεκτρονική κατάθεση δικογράφων (Πολιτικά / Ποινικά Δικαστήρια)
|
|
81
|
+
</Link>
|
|
82
|
+
</ListItem>
|
|
83
|
+
</List>
|
|
84
|
+
</AccordionSectionContent>
|
|
85
|
+
</AccordionSection>
|
|
86
|
+
</Accordion>
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
export default SummaryColorSecondary;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Accordion,
|
|
5
|
+
AccordionSection,
|
|
6
|
+
AccordionSectionContent,
|
|
7
|
+
AccordionSectionSummary,
|
|
8
|
+
AccordionSectionSummaryHeading,
|
|
9
|
+
} from '@digigov/ui/content/Accordion';
|
|
10
|
+
|
|
11
|
+
import { List } from '@digigov/ui/content/List/List';
|
|
12
|
+
import { ListItem } from '@digigov/ui/content/List/ListItem';
|
|
13
|
+
import { Link } from '@digigov/ui/navigation/Link';
|
|
14
|
+
import { Paragraph } from '@digigov/ui/typography/Paragraph';
|
|
15
|
+
|
|
16
|
+
export const UsingArrowIcons = (_: any) => (
|
|
17
|
+
<Accordion>
|
|
18
|
+
<AccordionSection open>
|
|
19
|
+
<AccordionSectionSummary>
|
|
20
|
+
<AccordionSectionSummaryHeading
|
|
21
|
+
aria-controls="content1"
|
|
22
|
+
variant="arrows"
|
|
23
|
+
>
|
|
24
|
+
Διαφορές με το δημόσιο
|
|
25
|
+
</AccordionSectionSummaryHeading>
|
|
26
|
+
</AccordionSectionSummary>
|
|
27
|
+
<AccordionSectionContent id="content1">
|
|
28
|
+
<Paragraph>
|
|
29
|
+
Παρακάτω μπορείτε να δείτε την διαθέσιμη και ενεργή υπηρεσία που αφορά
|
|
30
|
+
το επιλεγμένο γεγονός ζωής.
|
|
31
|
+
</Paragraph>
|
|
32
|
+
<List>
|
|
33
|
+
<ListItem>
|
|
34
|
+
<Link>
|
|
35
|
+
Αίτηση εξώδικης αναγνώρισης απαιτήσεων / συμβιβαστικής επίλυσης
|
|
36
|
+
διαφορών με το Δημόσιο
|
|
37
|
+
</Link>
|
|
38
|
+
</ListItem>
|
|
39
|
+
</List>
|
|
40
|
+
</AccordionSectionContent>
|
|
41
|
+
</AccordionSection>
|
|
42
|
+
<AccordionSection>
|
|
43
|
+
<AccordionSectionSummary>
|
|
44
|
+
<AccordionSectionSummaryHeading
|
|
45
|
+
aria-controls="content2"
|
|
46
|
+
variant="arrows"
|
|
47
|
+
>
|
|
48
|
+
Δικαστήρια
|
|
49
|
+
</AccordionSectionSummaryHeading>
|
|
50
|
+
</AccordionSectionSummary>
|
|
51
|
+
<AccordionSectionContent id="content2">
|
|
52
|
+
<Paragraph>
|
|
53
|
+
Στη λίστα παρακάτω μπορείτε να δείτε τις υπηρεσίες που αφορούν το
|
|
54
|
+
επιλεγμένο γεγονός ζωής, κατηγοριοποιημένες σε ομάδες υπηρεσιών.
|
|
55
|
+
</Paragraph>
|
|
56
|
+
<List>
|
|
57
|
+
<ListItem>
|
|
58
|
+
<Link>Ενιαίο πιστοποιητικό δικαστικής φερεγγυότητας</Link>
|
|
59
|
+
</ListItem>
|
|
60
|
+
<ListItem>
|
|
61
|
+
<Link>Ηλεκτρονικές δικαστικές αποφάσεις</Link>
|
|
62
|
+
</ListItem>
|
|
63
|
+
<ListItem>
|
|
64
|
+
<Link>Πιστοποιητικά δικαστηρίων</Link>
|
|
65
|
+
</ListItem>
|
|
66
|
+
</List>
|
|
67
|
+
</AccordionSectionContent>
|
|
68
|
+
</AccordionSection>
|
|
69
|
+
<AccordionSection>
|
|
70
|
+
<AccordionSectionSummary>
|
|
71
|
+
<AccordionSectionSummaryHeading
|
|
72
|
+
aria-controls="content3"
|
|
73
|
+
variant="arrows"
|
|
74
|
+
>
|
|
75
|
+
Δικόγραφα
|
|
76
|
+
</AccordionSectionSummaryHeading>
|
|
77
|
+
</AccordionSectionSummary>
|
|
78
|
+
<AccordionSectionContent id="content3">
|
|
79
|
+
<Paragraph>
|
|
80
|
+
Στη λίστα παρακάτω μπορείτε να δείτε τις υπηρεσίες που αφορούν το
|
|
81
|
+
επιλεγμένο γεγονός ζωής.
|
|
82
|
+
</Paragraph>
|
|
83
|
+
<List>
|
|
84
|
+
<ListItem>
|
|
85
|
+
<Link>Αντίγραφο πρακτικών υπόθεσης</Link>
|
|
86
|
+
</ListItem>
|
|
87
|
+
<ListItem>
|
|
88
|
+
<Link>
|
|
89
|
+
Ηλεκτρονική κατάθεση δικογράφων (Πολιτικά / Ποινικά Δικαστήρια)
|
|
90
|
+
</Link>
|
|
91
|
+
</ListItem>
|
|
92
|
+
</List>
|
|
93
|
+
</AccordionSectionContent>
|
|
94
|
+
</AccordionSection>
|
|
95
|
+
</Accordion>
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
export default UsingArrowIcons;
|
|
@@ -90,30 +90,6 @@ export const WithHints = (_: any) => (
|
|
|
90
90
|
</List>
|
|
91
91
|
</AccordionSectionContent>
|
|
92
92
|
</AccordionSection>
|
|
93
|
-
<AccordionSection>
|
|
94
|
-
<AccordionSectionSummary>
|
|
95
|
-
<AccordionSectionSummaryHeading aria-controls="content4">
|
|
96
|
-
Καταστήματα κράτησης
|
|
97
|
-
</AccordionSectionSummaryHeading>
|
|
98
|
-
<Hint>
|
|
99
|
-
Επανένταξη αποφυλακισμένων, πιστοποιητικά, επισκεπτήρια κ.ά.
|
|
100
|
-
</Hint>
|
|
101
|
-
</AccordionSectionSummary>
|
|
102
|
-
<AccordionSectionContent id="content4">
|
|
103
|
-
<Paragraph>
|
|
104
|
-
Στη λίστα παρακάτω μπορείτε να δείτε τις υπηρεσίες που αφορούν το
|
|
105
|
-
επιλεγμένο γεγονός ζωής.
|
|
106
|
-
</Paragraph>
|
|
107
|
-
<List>
|
|
108
|
-
<ListItem>
|
|
109
|
-
<Link>Βεβαίωση ηθικού / πειθαρχικού ελέγχου αποφυλακισμένων</Link>
|
|
110
|
-
</ListItem>
|
|
111
|
-
<ListItem>
|
|
112
|
-
<Link>Εκπαίδευση αποφυλακισμένων</Link>
|
|
113
|
-
</ListItem>
|
|
114
|
-
</List>
|
|
115
|
-
</AccordionSectionContent>
|
|
116
|
-
</AccordionSection>
|
|
117
93
|
</Accordion>
|
|
118
94
|
);
|
|
119
95
|
|
|
@@ -109,30 +109,6 @@ export const WithHook = (_: any) => {
|
|
|
109
109
|
</List>
|
|
110
110
|
</AccordionSectionContent>
|
|
111
111
|
</AccordionSection>
|
|
112
|
-
<AccordionSection {...section(3)}>
|
|
113
|
-
<AccordionSectionSummary>
|
|
114
|
-
<AccordionSectionSummaryHeading aria-controls="content4">
|
|
115
|
-
Καταστήματα κράτησης
|
|
116
|
-
</AccordionSectionSummaryHeading>
|
|
117
|
-
<Hint>
|
|
118
|
-
Επανένταξη αποφυλακισμένων, πιστοποιητικά, επισκεπτήρια κ.ά.
|
|
119
|
-
</Hint>
|
|
120
|
-
</AccordionSectionSummary>
|
|
121
|
-
<AccordionSectionContent id="content4">
|
|
122
|
-
<Paragraph>
|
|
123
|
-
Στη λίστα παρακάτω μπορείτε να δείτε τις υπηρεσίες που αφορούν το
|
|
124
|
-
επιλεγμένο γεγονός ζωής.
|
|
125
|
-
</Paragraph>
|
|
126
|
-
<List>
|
|
127
|
-
<ListItem>
|
|
128
|
-
<Link>Βεβαίωση ηθικού / πειθαρχικού ελέγχου αποφυλακισμένων</Link>
|
|
129
|
-
</ListItem>
|
|
130
|
-
<ListItem>
|
|
131
|
-
<Link>Εκπαίδευση αποφυλακισμένων</Link>
|
|
132
|
-
</ListItem>
|
|
133
|
-
</List>
|
|
134
|
-
</AccordionSectionContent>
|
|
135
|
-
</AccordionSection>
|
|
136
112
|
</Accordion>
|
|
137
113
|
);
|
|
138
114
|
};
|
|
@@ -11,11 +11,10 @@ The accordion component lets users show and hide sections of related content on
|
|
|
11
11
|
|
|
12
12
|
## How to use
|
|
13
13
|
|
|
14
|
-
### Default Accordion
|
|
15
14
|
|
|
16
15
|
<code src="@digigov/ui/content/Accordion/__stories__/Default.tsx" />
|
|
17
16
|
|
|
18
|
-
###
|
|
17
|
+
### With Hints
|
|
19
18
|
|
|
20
19
|
Accordions hide content, so the labels need to be clear. If necessary, you can add a summary line to help users understand what is in the section.
|
|
21
20
|
|
|
@@ -3,6 +3,8 @@ import { test, expect } from '@playwright/experimental-ct-react';
|
|
|
3
3
|
import TestVariant from '@digigov/ui/utils/TestVariant'
|
|
4
4
|
import { Auto } from '@digigov/ui/content/Accordion/__stories__/Auto';
|
|
5
5
|
import { Default } from '@digigov/ui/content/Accordion/__stories__/Default';
|
|
6
|
+
import { SummaryColorSecondary } from '@digigov/ui/content/Accordion/__stories__/SummaryColorSecondary';
|
|
7
|
+
import { UsingArrowIcons } from '@digigov/ui/content/Accordion/__stories__/UsingArrowIcons';
|
|
6
8
|
import { WithHints } from '@digigov/ui/content/Accordion/__stories__/WithHints';
|
|
7
9
|
import { WithHook } from '@digigov/ui/content/Accordion/__stories__/WithHook';
|
|
8
10
|
|
|
@@ -16,6 +18,12 @@ test('renders the All Accordion variants', async ({ mount, page }) => {
|
|
|
16
18
|
<TestVariant title="Default">
|
|
17
19
|
<Default />
|
|
18
20
|
</TestVariant>
|
|
21
|
+
<TestVariant title="SummaryColorSecondary">
|
|
22
|
+
<SummaryColorSecondary />
|
|
23
|
+
</TestVariant>
|
|
24
|
+
<TestVariant title="UsingArrowIcons">
|
|
25
|
+
<UsingArrowIcons />
|
|
26
|
+
</TestVariant>
|
|
19
27
|
<TestVariant title="WithHints">
|
|
20
28
|
<WithHints />
|
|
21
29
|
</TestVariant>
|
package/src/content/Card/doc.mdx
CHANGED
|
@@ -12,55 +12,55 @@ When used correctly, Cards can help users to scan through vast amounts of inform
|
|
|
12
12
|
|
|
13
13
|
<code src="@digigov/ui/content/Card/__stories__/Default.tsx" />
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### With gray border color
|
|
16
16
|
|
|
17
17
|
<code src="@digigov/ui/content/Card/__stories__/WithGrayBorder.tsx" />
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
### With dark border color
|
|
20
20
|
|
|
21
21
|
<code src="@digigov/ui/content/Card/__stories__/WithDarkBorder.tsx" />
|
|
22
22
|
|
|
23
|
-
###
|
|
23
|
+
### With top border
|
|
24
24
|
|
|
25
25
|
You can set the color of the Card's top border. You can choose between dark and grey color respectively. By default the top border color is grey.
|
|
26
26
|
|
|
27
27
|
<code src="@digigov/ui/content/Card/__stories__/WithDarkBorder.tsx" />
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
### With grey top border
|
|
30
30
|
|
|
31
31
|
<code src="@digigov/ui/content/Card/__stories__/WithGrayTopBorder.tsx" />
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
### With dark top border
|
|
34
34
|
|
|
35
35
|
<code src="@digigov/ui/content/Card/__stories__/WithDarkTopBorder.tsx" />
|
|
36
36
|
|
|
37
|
-
###
|
|
37
|
+
### With divider
|
|
38
38
|
|
|
39
39
|
<code src="@digigov/ui/content/Card/__stories__/WithDivider.tsx" />
|
|
40
40
|
|
|
41
|
-
###
|
|
41
|
+
### With actions
|
|
42
42
|
|
|
43
43
|
<code src="@digigov/ui/content/Card/__stories__/WithGroupButton.tsx" />
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
### With title link
|
|
46
46
|
|
|
47
47
|
Cards can be used without an action button, but with a clickable title.
|
|
48
48
|
|
|
49
49
|
<code src="@digigov/ui/content/Card/__stories__/WithLink.tsx" />
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
### With clickable content
|
|
52
52
|
|
|
53
53
|
You can expand the clickable area of the link to fill Card's content.
|
|
54
54
|
|
|
55
55
|
<code src="@digigov/ui/content/Card/__stories__/WithClickableContent.tsx" />
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
### With button or link
|
|
58
58
|
|
|
59
59
|
Cards also provides styles for actionable elements such as Buttons or Links.
|
|
60
60
|
|
|
61
61
|
<code src="@digigov/ui/content/Card/__stories__/WithClickableLink.tsx" />
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
### With a group of actions
|
|
64
64
|
|
|
65
65
|
<code src="@digigov/ui/content/Card/__stories__/WithGroupButton.tsx" />
|
|
66
66
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import Chip from '@digigov/ui/content/Chip';
|
|
2
3
|
import doc from './doc.mdx?raw';
|
|
3
4
|
export default {
|
|
@@ -9,6 +10,16 @@ export default {
|
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
export const WithControls = {
|
|
13
|
+
render: (args) => {
|
|
14
|
+
return (
|
|
15
|
+
<Chip
|
|
16
|
+
onClick={args.onClick ? () => console.log('clicked') : undefined}
|
|
17
|
+
onDelete={args.onDelete ? () => console.log('remove chip') : undefined}
|
|
18
|
+
>
|
|
19
|
+
{args.children}
|
|
20
|
+
</Chip>
|
|
21
|
+
);
|
|
22
|
+
},
|
|
12
23
|
args: {
|
|
13
24
|
children: 'Ετικέτα',
|
|
14
25
|
onClick: true,
|
|
@@ -25,10 +36,8 @@ export const WithControls = {
|
|
|
25
36
|
control: { type: 'boolean' },
|
|
26
37
|
},
|
|
27
38
|
},
|
|
28
|
-
parameters: {
|
|
29
|
-
controls: { exclude: ['ref'] },
|
|
30
|
-
},
|
|
31
39
|
};
|
|
40
|
+
|
|
32
41
|
export { Default } from '@digigov/ui/content/Chip/__stories__/Default';
|
|
33
42
|
export { ClickableChip } from '@digigov/ui/content/Chip/__stories__/ClickableChip';
|
|
34
43
|
export { DeletableChip } from '@digigov/ui/content/Chip/__stories__/DeletableChip';
|
package/src/content/Chip/doc.mdx
CHANGED
|
@@ -11,19 +11,19 @@ The Chip component can be used to represent small blocks of information.
|
|
|
11
11
|
|
|
12
12
|
<code src="@digigov/ui/content/Chip/__stories__/Default.tsx" />
|
|
13
13
|
|
|
14
|
-
###
|
|
14
|
+
### Clickable Chip
|
|
15
15
|
|
|
16
16
|
<code src="@digigov/ui/content/Chip/__stories__/ClickableChip.tsx" />
|
|
17
17
|
|
|
18
|
-
###
|
|
18
|
+
### Clickable and Deletable
|
|
19
19
|
|
|
20
20
|
<code src="@digigov/ui/content/Chip/__stories__/ClickableDeletableChip.tsx" />
|
|
21
21
|
|
|
22
|
-
###
|
|
22
|
+
### Deletable Chip
|
|
23
23
|
|
|
24
24
|
<code src="@digigov/ui/content/Chip/__stories__/DeletableChip.tsx" />
|
|
25
25
|
|
|
26
|
-
###
|
|
26
|
+
### Group of Chips
|
|
27
27
|
|
|
28
28
|
<code src="@digigov/ui/content/Chip/__stories__/GroupOfChips.tsx" />
|
|
29
29
|
|
package/src/content/List/doc.mdx
CHANGED
|
@@ -9,15 +9,15 @@ title: List
|
|
|
9
9
|
|
|
10
10
|
<code src="@digigov/ui/content/List/__stories__/Default.tsx" />
|
|
11
11
|
|
|
12
|
-
###
|
|
12
|
+
### With bullets
|
|
13
13
|
|
|
14
14
|
<code src="@digigov/ui/content/List/__stories__/BulletList.tsx" />
|
|
15
15
|
|
|
16
|
-
###
|
|
16
|
+
### With numbers
|
|
17
17
|
|
|
18
18
|
<code src="@digigov/ui/content/List/__stories__/NumberedList.tsx" />
|
|
19
19
|
|
|
20
|
-
###
|
|
20
|
+
### With extra space
|
|
21
21
|
|
|
22
22
|
<code src="@digigov/ui/content/List/__stories__/WithExtraSpace.tsx" />
|
|
23
23
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
1
|
+
import React, { type JSX, useMemo } from 'react';
|
|
2
2
|
import DomPurify from 'dompurify';
|
|
3
3
|
|
|
4
4
|
const defaultTags = [
|
|
@@ -33,8 +33,32 @@ if (typeof window !== 'undefined') {
|
|
|
33
33
|
elementClassNameMapping[node.tagName.toLowerCase()]
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
//
|
|
37
|
-
if ('
|
|
36
|
+
// Anchor tag check for external links
|
|
37
|
+
if (node.tagName.toLowerCase() === 'a' && node.hasAttribute('href')) {
|
|
38
|
+
const href = node.getAttribute('href');
|
|
39
|
+
|
|
40
|
+
if (href && href.startsWith('#')) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (
|
|
45
|
+
href &&
|
|
46
|
+
(href.startsWith('http://') ||
|
|
47
|
+
href.startsWith('https://') ||
|
|
48
|
+
href.startsWith('//'))
|
|
49
|
+
) {
|
|
50
|
+
const url = new URL(href, window.location.href);
|
|
51
|
+
const isInternal = url.origin === window.location.origin;
|
|
52
|
+
|
|
53
|
+
if (!isInternal) {
|
|
54
|
+
node.setAttribute('target', '_blank');
|
|
55
|
+
node.setAttribute('rel', 'noopener noreferrer');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// Relative paths are internal, do nothing
|
|
59
|
+
}
|
|
60
|
+
// For other elements with target attribute, set to _blank
|
|
61
|
+
else if (node.hasAttribute('target')) {
|
|
38
62
|
node.setAttribute('target', '_blank');
|
|
39
63
|
node.setAttribute('rel', 'noopener');
|
|
40
64
|
}
|
|
@@ -50,8 +74,13 @@ export const getClosingTags = (htmlString) => {
|
|
|
50
74
|
for (const tag of tags) {
|
|
51
75
|
if (tag.startsWith('</') && tag.endsWith('>')) {
|
|
52
76
|
const tagName = tag.replace('</', '<');
|
|
53
|
-
|
|
54
|
-
|
|
77
|
+
let openingTag = -1;
|
|
78
|
+
for (let i = stack.length - 1; i >= 0; i--) {
|
|
79
|
+
if (stack[i] === tagName) {
|
|
80
|
+
openingTag = i;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
55
84
|
if (openingTag !== -1) {
|
|
56
85
|
stack.splice(openingTag, 1);
|
|
57
86
|
}
|
|
@@ -65,7 +94,7 @@ export const getClosingTags = (htmlString) => {
|
|
|
65
94
|
export interface SafeHTMLProps {
|
|
66
95
|
content: string;
|
|
67
96
|
tags?: string[];
|
|
68
|
-
Tag?:
|
|
97
|
+
Tag?: keyof JSX.IntrinsicElements;
|
|
69
98
|
style?: React.CSSProperties;
|
|
70
99
|
}
|
|
71
100
|
|
|
@@ -85,10 +114,9 @@ export const SafeHTML = ({
|
|
|
85
114
|
ALLOWED_TAGS: tags,
|
|
86
115
|
ADD_ATTR: ['target'],
|
|
87
116
|
});
|
|
88
|
-
}, [content]);
|
|
117
|
+
}, [content, tags]);
|
|
89
118
|
return (
|
|
90
119
|
<Tag
|
|
91
|
-
// @ts-ignore
|
|
92
120
|
dangerouslySetInnerHTML={{
|
|
93
121
|
__html: parsedHTML,
|
|
94
122
|
}}
|
|
@@ -10,12 +10,13 @@ export default {
|
|
|
10
10
|
import { SummaryListExample } from '@digigov/ui/content/SummaryList/__stories__/SummaryListExample';
|
|
11
11
|
import doc from './doc.mdx?raw';
|
|
12
12
|
|
|
13
|
-
export const
|
|
13
|
+
export const WithControls = {
|
|
14
14
|
args: {
|
|
15
15
|
sm: 5,
|
|
16
16
|
md: 4,
|
|
17
17
|
lg: 3,
|
|
18
18
|
border: true,
|
|
19
|
+
error: false,
|
|
19
20
|
noLastBorder: false,
|
|
20
21
|
itemBorder: true,
|
|
21
22
|
showKey: true,
|
|
@@ -23,3 +24,8 @@ export const Default = {
|
|
|
23
24
|
showActions: true,
|
|
24
25
|
},
|
|
25
26
|
};
|
|
27
|
+
|
|
28
|
+
export { Default } from '@digigov/ui/content/SummaryList/__stories__/Default';
|
|
29
|
+
export { WithActions } from '@digigov/ui/content/SummaryList/__stories__/WithActions';
|
|
30
|
+
export { WithoutBorders } from '@digigov/ui/content/SummaryList/__stories__/WithoutBorders';
|
|
31
|
+
export { WithError } from '@digigov/ui/content/SummaryList/__stories__/WithError';
|
|
@@ -34,6 +34,7 @@ export const SummaryListExample = ({
|
|
|
34
34
|
md,
|
|
35
35
|
lg,
|
|
36
36
|
border = true,
|
|
37
|
+
error = false,
|
|
37
38
|
noLastBorder = false,
|
|
38
39
|
itemBorder = true,
|
|
39
40
|
showKey = true,
|
|
@@ -44,18 +45,24 @@ export const SummaryListExample = ({
|
|
|
44
45
|
md?: WidthValues;
|
|
45
46
|
lg?: WidthValues;
|
|
46
47
|
border?: boolean;
|
|
48
|
+
error?: boolean;
|
|
47
49
|
noLastBorder?: boolean;
|
|
48
50
|
itemBorder?: boolean;
|
|
49
51
|
showKey?: boolean;
|
|
50
52
|
showValue?: boolean;
|
|
51
53
|
showActions?: boolean;
|
|
52
54
|
}) => (
|
|
53
|
-
<SummaryList border={border} noLastBorder={noLastBorder}>
|
|
55
|
+
<SummaryList border={border} noLastBorder={noLastBorder} error={error}>
|
|
54
56
|
{data &&
|
|
55
57
|
data.map((item, index) => (
|
|
56
58
|
<SummaryListItem key={index} border={itemBorder}>
|
|
57
59
|
{showKey && (
|
|
58
|
-
<SummaryListItemKey
|
|
60
|
+
<SummaryListItemKey
|
|
61
|
+
sm={sm}
|
|
62
|
+
md={md}
|
|
63
|
+
lg={lg}
|
|
64
|
+
error={error && index === 1}
|
|
65
|
+
>
|
|
59
66
|
{item.key}
|
|
60
67
|
</SummaryListItemKey>
|
|
61
68
|
)}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
SummaryList,
|
|
5
|
+
SummaryListItem,
|
|
6
|
+
SummaryListItemAction,
|
|
7
|
+
SummaryListItemKey,
|
|
8
|
+
SummaryListItemValue,
|
|
9
|
+
} from '@digigov/ui/content/SummaryList';
|
|
10
|
+
|
|
11
|
+
import { Link } from '@digigov/ui/navigation/Link';
|
|
12
|
+
import { VisuallyHidden } from '@digigov/ui/utils/VisuallyHidden';
|
|
13
|
+
|
|
14
|
+
export const WithError = (_: any) => (
|
|
15
|
+
<SummaryList error>
|
|
16
|
+
<SummaryListItem>
|
|
17
|
+
<SummaryListItemKey>Όνομα</SummaryListItemKey>
|
|
18
|
+
<SummaryListItemValue>Γιώργος Παπαδόπουλος</SummaryListItemValue>
|
|
19
|
+
<SummaryListItemAction>
|
|
20
|
+
<Link href="#">
|
|
21
|
+
Αλλαγή<VisuallyHidden>Διεύθυνσης</VisuallyHidden>
|
|
22
|
+
</Link>
|
|
23
|
+
</SummaryListItemAction>
|
|
24
|
+
</SummaryListItem>
|
|
25
|
+
<SummaryListItem>
|
|
26
|
+
<SummaryListItemKey error>Ημερομηνία Γέννησης</SummaryListItemKey>
|
|
27
|
+
<SummaryListItemValue>11 Μαϊου 1990</SummaryListItemValue>
|
|
28
|
+
<SummaryListItemAction>
|
|
29
|
+
<Link href="#">
|
|
30
|
+
Αλλαγή<VisuallyHidden>Διεύθυνσης</VisuallyHidden>
|
|
31
|
+
</Link>
|
|
32
|
+
</SummaryListItemAction>
|
|
33
|
+
</SummaryListItem>
|
|
34
|
+
<SummaryListItem>
|
|
35
|
+
<SummaryListItemKey>Τηλέφωνο επικοινωνίας</SummaryListItemKey>
|
|
36
|
+
<SummaryListItemValue error errorAssistiveText="το τηλέφωνο δεν βρέθηκε">
|
|
37
|
+
6941234567
|
|
38
|
+
</SummaryListItemValue>
|
|
39
|
+
<SummaryListItemAction>
|
|
40
|
+
<Link href="#">
|
|
41
|
+
Αλλαγή<VisuallyHidden>Διεύθυνσης</VisuallyHidden>
|
|
42
|
+
</Link>
|
|
43
|
+
</SummaryListItemAction>
|
|
44
|
+
</SummaryListItem>
|
|
45
|
+
</SummaryList>
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
export default WithError;
|
|
@@ -5,6 +5,7 @@ import { Default } from '@digigov/ui/content/SummaryList/__stories__/Default';
|
|
|
5
5
|
import { RowVariations } from '@digigov/ui/content/SummaryList/__stories__/RowVariations';
|
|
6
6
|
import { SummaryListExample } from '@digigov/ui/content/SummaryList/__stories__/SummaryListExample';
|
|
7
7
|
import { WithActions } from '@digigov/ui/content/SummaryList/__stories__/WithActions';
|
|
8
|
+
import { WithError } from '@digigov/ui/content/SummaryList/__stories__/WithError';
|
|
8
9
|
import { WithKeyAndAction } from '@digigov/ui/content/SummaryList/__stories__/WithKeyAndAction';
|
|
9
10
|
import { WithNoLastBorder } from '@digigov/ui/content/SummaryList/__stories__/WithNoLastBorder';
|
|
10
11
|
import { WithoutActions } from '@digigov/ui/content/SummaryList/__stories__/WithoutActions';
|
|
@@ -26,6 +27,9 @@ test('renders the All SummaryList variants', async ({ mount, page }) => {
|
|
|
26
27
|
<TestVariant title="WithActions">
|
|
27
28
|
<WithActions />
|
|
28
29
|
</TestVariant>
|
|
30
|
+
<TestVariant title="WithError">
|
|
31
|
+
<WithError />
|
|
32
|
+
</TestVariant>
|
|
29
33
|
<TestVariant title="WithKeyAndAction">
|
|
30
34
|
<WithKeyAndAction />
|
|
31
35
|
</TestVariant>
|