@digigov/ui 2.0.0-555d1027 → 2.0.0-5e7a6790
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 +44 -1
- 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/Masthead/Masthead.stories.d.ts +28 -1
- package/app/Modal/Modal.stories.d.ts +20 -1
- package/cjs/i18n/locales/el/index.js +7 -7
- package/cjs/i18n/locales/el.js.map +1 -1
- package/cjs/layouts/Hidden/index.js +19 -0
- package/cjs/layouts/Hidden/index.js.map +3 -3
- package/cjs/lazy.js +1 -1
- package/cjs/lazy.js.map +1 -1
- package/cjs/registry.js +2 -2
- package/cjs/registry.js.map +2 -2
- package/content/Accordion/Accordion.stories.d.ts +27 -16
- package/content/SummaryList/SummaryList.stories.d.ts +4 -1
- package/feedback/NotificationBanner/NotificationBanner.stories.d.ts +13 -13
- package/feedback/PhaseBanner/PhaseBanner.stories.d.ts +1 -1
- package/i18n/locales/el/index.js +7 -7
- package/i18n/locales/el.js.map +1 -1
- 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 -1
- 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 +2 -2
- 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__/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.test.tsx +8 -0
- 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/content/Accordion/Accordion.stories.jsx +9 -1
- package/src/content/Accordion/doc.mdx +1 -2
- package/src/content/Card/doc.mdx +11 -11
- package/src/content/Chip/doc.mdx +4 -4
- package/src/content/List/doc.mdx +3 -3
- package/src/content/SummaryList/SummaryList.stories.js +5 -1
- 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 +9 -9
- package/src/feedback/NotificationBanner/doc.mdx +1 -4
- 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 +7 -7
- 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 -1
- 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 +2 -2
- 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 +34 -28
- 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 -9
- 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
|
@@ -15,16 +15,23 @@ export default {
|
|
|
15
15
|
|
|
16
16
|
export const WithControls = {
|
|
17
17
|
args: {
|
|
18
|
+
variant: 'info',
|
|
19
|
+
dense: false,
|
|
18
20
|
title: 'Ειδοποίηση',
|
|
19
21
|
children: ' Σε 7 ημέρες θα μπορείτε να υποβάλετε την αίτηση.',
|
|
20
22
|
link: {
|
|
21
23
|
label: 'Προβολή αίτησης',
|
|
22
24
|
href: '#',
|
|
23
25
|
},
|
|
24
|
-
variant: 'info',
|
|
25
|
-
dense: false,
|
|
26
26
|
},
|
|
27
27
|
argTypes: {
|
|
28
|
+
variant: {
|
|
29
|
+
options: ['info', 'success', 'error'],
|
|
30
|
+
control: { type: 'select' },
|
|
31
|
+
},
|
|
32
|
+
dense: {
|
|
33
|
+
control: { type: 'boolean' },
|
|
34
|
+
},
|
|
28
35
|
title: {
|
|
29
36
|
control: { type: 'text' },
|
|
30
37
|
},
|
|
@@ -34,13 +41,6 @@ export const WithControls = {
|
|
|
34
41
|
link: {
|
|
35
42
|
control: { type: 'object' },
|
|
36
43
|
},
|
|
37
|
-
variant: {
|
|
38
|
-
options: ['info', 'success', 'error'],
|
|
39
|
-
control: { type: 'select' },
|
|
40
|
-
},
|
|
41
|
-
dense: {
|
|
42
|
-
control: { type: 'boolean' },
|
|
43
|
-
},
|
|
44
44
|
},
|
|
45
45
|
parameters: {
|
|
46
46
|
controls: { exclude: ['ref'] },
|
|
@@ -13,9 +13,6 @@ Use a notification banner to tell the user about something they need to know abo
|
|
|
13
13
|
|
|
14
14
|
Use a ‘neutral’ blue notification banner if the user needs to know about a problem with the service as a whole.
|
|
15
15
|
|
|
16
|
-
Use a ‘neutral’ notification banner if the user needs to know about something that’s happening elsewhere in the service.
|
|
17
|
-
|
|
18
|
-
## How to use
|
|
19
16
|
|
|
20
17
|
<code src="@digigov/ui/feedback/NotificationBanner/__stories__/Default.tsx" />
|
|
21
18
|
|
|
@@ -45,4 +42,4 @@ See below for a complete reference to all of the props available to the componen
|
|
|
45
42
|
'NotificationBannerHeading',
|
|
46
43
|
'NotificationBannerLink',
|
|
47
44
|
]}
|
|
48
|
-
/>
|
|
45
|
+
/>
|
|
@@ -30,7 +30,7 @@ through, select from large collections of options and help services get more con
|
|
|
30
30
|
|
|
31
31
|
### With min length
|
|
32
32
|
|
|
33
|
-
This is the minimum number of characters that should be entered before the AutoComplete will attempt to suggest options(in above example is 2)
|
|
33
|
+
This is the minimum number of characters that should be entered before the AutoComplete will attempt to suggest options(in above example is 2).
|
|
34
34
|
|
|
35
35
|
<code src="@digigov/ui/form/AutoComplete/__stories__/WithMinLength.tsx" />
|
|
36
36
|
|
|
@@ -48,4 +48,4 @@ See below for a complete reference to all of the props available to the componen
|
|
|
48
48
|
'AutoCompleteResultListItem',
|
|
49
49
|
'AutoCompleteAssistiveHint',
|
|
50
50
|
]}
|
|
51
|
-
/>
|
|
51
|
+
/>
|
package/src/form/Button/doc.mdx
CHANGED
|
@@ -10,36 +10,47 @@ application or saving their information.
|
|
|
10
10
|
|
|
11
11
|
## How to use
|
|
12
12
|
|
|
13
|
-
### Default buttons
|
|
14
13
|
|
|
15
14
|
Use a default button for the main call to action on a page.
|
|
16
15
|
|
|
17
16
|
<code src="@digigov/ui/form/Button/__stories__/Primary.tsx" />
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
Avoid using multiple default buttons on a single page. Having more than on main
|
|
19
|
+
call to action reduces their impact, and makes it harder for users to know what
|
|
20
|
+
to do next.
|
|
21
|
+
|
|
22
|
+
### Start button - Call To Action
|
|
20
23
|
|
|
21
24
|
Use a start button for the main call to action on your service’s start page. Start buttons do not submit form data, so they use a link tag rather than a button tag.
|
|
22
25
|
|
|
23
26
|
<code src="@digigov/ui/form/Button/__stories__/CallToActionButton.tsx" />
|
|
24
27
|
|
|
25
|
-
### Secondary
|
|
28
|
+
### Secondary color
|
|
26
29
|
|
|
27
30
|
Use secondary buttons for secondary calls to action on a page.
|
|
28
31
|
|
|
29
32
|
<code src="@digigov/ui/form/Button/__stories__/Secondary.tsx" />
|
|
30
33
|
|
|
31
|
-
### Warning
|
|
34
|
+
### Warning color
|
|
32
35
|
|
|
33
36
|
Warning buttons are designed to make users think carefully before they use them. They only work if used very sparingly. Most services should not need one.
|
|
34
37
|
|
|
35
38
|
<code src="@digigov/ui/form/Button/__stories__/Warning.tsx" />
|
|
36
39
|
|
|
37
|
-
###
|
|
40
|
+
### Link variant
|
|
41
|
+
|
|
42
|
+
<code src="@digigov/ui/form/Button/__stories__/WithVariantLink.tsx" />
|
|
43
|
+
|
|
44
|
+
### Disabled
|
|
38
45
|
|
|
39
46
|
Disabled buttons have poor contrast and can confuse some users, so avoid them if possible.
|
|
40
47
|
|
|
41
48
|
<code src="@digigov/ui/form/Button/__stories__/Disabled.tsx" />
|
|
42
49
|
|
|
50
|
+
### Dense
|
|
51
|
+
|
|
52
|
+
<code src="@digigov/ui/form/Button/__stories__/Dense.tsx" />
|
|
53
|
+
|
|
43
54
|
### Grouping buttons
|
|
44
55
|
|
|
45
56
|
Use a button group when two or more buttons are placed together.
|
|
@@ -71,15 +82,17 @@ For example, `Add another address` and `Accept and claim a tax refund`.
|
|
|
71
82
|
|
|
72
83
|
Align the primary action button to the left edge of your form.
|
|
73
84
|
|
|
74
|
-
##
|
|
85
|
+
## More buttons
|
|
75
86
|
|
|
76
|
-
|
|
87
|
+
### Back link button
|
|
77
88
|
|
|
78
|
-
<code src="@digigov/ui/form/Button/__stories__/
|
|
89
|
+
<code src="@digigov/ui/form/Button/__stories__/Back.tsx" />
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
### Theme toggle button
|
|
93
|
+
|
|
94
|
+
<code src="@digigov/ui/form/Button/__stories__/ThemeToggle.tsx" />
|
|
79
95
|
|
|
80
|
-
Avoid using multiple default buttons on a single page. Having more than on main
|
|
81
|
-
call to action reduces their impact, and makes it harder for users to know what
|
|
82
|
-
to do next.
|
|
83
96
|
|
|
84
97
|
## Accessibility
|
|
85
98
|
|
|
@@ -88,9 +101,7 @@ implementation in the ARIA Authoring Practices Guide (APG) at [button](https://w
|
|
|
88
101
|
|
|
89
102
|
## API
|
|
90
103
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
See below for a complete reference to all of the props available to the components mentioned here.
|
|
104
|
+
See below for a complete reference to all of the props available to the components mentioned here.
|
|
94
105
|
|
|
95
106
|
<ComponentProps componentName={["Button","ButtonLink","CallToAction","ButtonGroup"]} />
|
|
96
107
|
|
|
@@ -37,7 +37,7 @@ Error messages should be styled like this:
|
|
|
37
37
|
|
|
38
38
|
<code src="@digigov/ui/form/Checkbox/__stories__/WithErrorMessage.tsx" />
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
### Conditionally revealing a related question
|
|
41
41
|
|
|
42
42
|
You can ask the user a related question when they select a particular checkbox, so they only see the question when it’s relevant to them.
|
|
43
43
|
|
|
@@ -19,20 +19,20 @@ If you’re asking more than one question on the page, you can display the quest
|
|
|
19
19
|
|
|
20
20
|
<code src="@digigov/ui/form/RadioContainer/__stories__/Inline.tsx" />
|
|
21
21
|
|
|
22
|
-
###
|
|
22
|
+
### Radio items with hints
|
|
23
23
|
|
|
24
|
-
You can add hints to
|
|
24
|
+
You can add hints to radio items to provide additional information about the options.
|
|
25
25
|
|
|
26
26
|
<code src="@digigov/ui/form/RadioContainer/__stories__/WithHints.tsx" />
|
|
27
27
|
|
|
28
|
-
###
|
|
28
|
+
### Radio items with a text divider
|
|
29
29
|
|
|
30
30
|
If one or more of your radio options is different from the others, it can help users if you separate them using a text divider.
|
|
31
31
|
The text is usually the word ‘or’.
|
|
32
32
|
|
|
33
33
|
<code src="@digigov/ui/form/RadioContainer/__stories__/NoneAnswer.tsx" />
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
### Conditionally revealing a related question
|
|
36
36
|
|
|
37
37
|
You can ask the user a related question when they select a particular checkbox, so they only see the question when it’s relevant to them.
|
|
38
38
|
|
package/src/i18n/locales/el.ts
CHANGED
|
@@ -35,14 +35,14 @@ export default {
|
|
|
35
35
|
date: {
|
|
36
36
|
invalid: 'Η ημερομηνία πρέπει να είναι έγκυρη.',
|
|
37
37
|
invalid_month_year:
|
|
38
|
-
'Η ημερομηνία πρέπει να
|
|
38
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα και το έτος.',
|
|
39
39
|
invalid_day_year:
|
|
40
|
-
'Η ημερομηνία πρέπει να
|
|
40
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα και το έτος.',
|
|
41
41
|
invalid_day_month:
|
|
42
|
-
'Η ημερομηνία πρέπει να
|
|
43
|
-
invalid_day: 'Η ημερομηνία πρέπει να
|
|
44
|
-
invalid_month: 'Η ημερομηνία πρέπει να
|
|
45
|
-
invalid_year: 'Η ημερομηνία πρέπει να
|
|
42
|
+
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα και τον μήνα.',
|
|
43
|
+
invalid_day: 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα.',
|
|
44
|
+
invalid_month: 'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα.',
|
|
45
|
+
invalid_year: 'Η ημερομηνία πρέπει να περιλαμβάνει το ετος.',
|
|
46
46
|
earlier_than: 'Συμπληρώστε μια ημερομηνία προγενέστερη της {{maxDate}}',
|
|
47
47
|
later_than: 'Συμπληρώστε μια ημερομηνία μεταγενέστερη της {{minDate}}',
|
|
48
48
|
invalid_day_range: 'Η ημέρα πρέπει να είναι μεταξύ 1 και {{maxDay}}.',
|
|
@@ -64,7 +64,7 @@ export default {
|
|
|
64
64
|
'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, την ώρα και τα λεπτά.',
|
|
65
65
|
invalid__hours_minutes:
|
|
66
66
|
'Η ημερομηνία πρέπει να περιλαμβάνει την ώρα και τα λεπτά.',
|
|
67
|
-
invalid_minutes: 'Η ημερομηνία πρέπει να
|
|
67
|
+
invalid_minutes: 'Η ημερομηνία πρέπει να περιλαμβάνει τα λεπτά.',
|
|
68
68
|
invalid_hours: 'Η ημερομηνία πρέπει να περιλαμβάνει την ώρα.',
|
|
69
69
|
invalid_month_year_minutes:
|
|
70
70
|
'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα, το έτος και τα λεπτά.',
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Grid from '@digigov/ui/layouts/Grid';
|
|
3
|
+
import doc from './doc.mdx?raw';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Digigov UI/layouts/Grid',
|
|
7
|
+
component: Grid,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
markdown: doc,
|
|
10
|
+
displayName: 'Grid',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const WithControls = {
|
|
14
|
+
render: (args) => {
|
|
15
|
+
return (
|
|
16
|
+
<Grid
|
|
17
|
+
role="grid"
|
|
18
|
+
aria-label="grid-example"
|
|
19
|
+
container
|
|
20
|
+
spacing={args.spacing}
|
|
21
|
+
inline={args.inline}
|
|
22
|
+
>
|
|
23
|
+
<Grid
|
|
24
|
+
role="row"
|
|
25
|
+
xs={args.xs}
|
|
26
|
+
sm={args.sm}
|
|
27
|
+
md={args.md}
|
|
28
|
+
lg={args.lg}
|
|
29
|
+
xl={args.xl}
|
|
30
|
+
>
|
|
31
|
+
grid item no.1
|
|
32
|
+
</Grid>
|
|
33
|
+
<Grid
|
|
34
|
+
role="row"
|
|
35
|
+
xs={args.xs}
|
|
36
|
+
sm={args.sm}
|
|
37
|
+
md={args.md}
|
|
38
|
+
lg={args.lg}
|
|
39
|
+
xl={args.xl}
|
|
40
|
+
>
|
|
41
|
+
grid item no.2
|
|
42
|
+
</Grid>
|
|
43
|
+
<Grid
|
|
44
|
+
role="row"
|
|
45
|
+
xs={args.xs}
|
|
46
|
+
sm={args.sm}
|
|
47
|
+
md={args.md}
|
|
48
|
+
lg={args.lg}
|
|
49
|
+
xl={args.xl}
|
|
50
|
+
>
|
|
51
|
+
grid item no.3
|
|
52
|
+
</Grid>
|
|
53
|
+
<Grid
|
|
54
|
+
role="row"
|
|
55
|
+
xs={args.xs}
|
|
56
|
+
sm={args.sm}
|
|
57
|
+
md={args.md}
|
|
58
|
+
lg={args.lg}
|
|
59
|
+
xl={args.xl}
|
|
60
|
+
>
|
|
61
|
+
grid item no.4
|
|
62
|
+
</Grid>
|
|
63
|
+
<Grid
|
|
64
|
+
role="row"
|
|
65
|
+
xs={args.xs}
|
|
66
|
+
sm={args.sm}
|
|
67
|
+
md={args.md}
|
|
68
|
+
lg={args.lg}
|
|
69
|
+
xl={args.xl}
|
|
70
|
+
>
|
|
71
|
+
grid item no.5
|
|
72
|
+
</Grid>
|
|
73
|
+
<Grid
|
|
74
|
+
role="row"
|
|
75
|
+
xs={args.xs}
|
|
76
|
+
sm={args.sm}
|
|
77
|
+
md={args.md}
|
|
78
|
+
lg={args.lg}
|
|
79
|
+
xl={args.xl}
|
|
80
|
+
>
|
|
81
|
+
grid item no.6
|
|
82
|
+
</Grid>
|
|
83
|
+
</Grid>
|
|
84
|
+
);
|
|
85
|
+
},
|
|
86
|
+
args: {
|
|
87
|
+
inline: false,
|
|
88
|
+
spacing: 4,
|
|
89
|
+
xs: 12,
|
|
90
|
+
sm: 6,
|
|
91
|
+
md: 4,
|
|
92
|
+
lg: 3,
|
|
93
|
+
xl: 2,
|
|
94
|
+
},
|
|
95
|
+
argsTypes: {
|
|
96
|
+
inline: {
|
|
97
|
+
control: 'boolean',
|
|
98
|
+
},
|
|
99
|
+
spacing: {
|
|
100
|
+
control: {
|
|
101
|
+
type: 'select',
|
|
102
|
+
},
|
|
103
|
+
options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
104
|
+
},
|
|
105
|
+
xs: {
|
|
106
|
+
control: {
|
|
107
|
+
type: 'select',
|
|
108
|
+
},
|
|
109
|
+
options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
110
|
+
},
|
|
111
|
+
sm: {
|
|
112
|
+
control: {
|
|
113
|
+
type: 'select',
|
|
114
|
+
},
|
|
115
|
+
options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
116
|
+
},
|
|
117
|
+
md: {
|
|
118
|
+
control: {
|
|
119
|
+
type: 'select',
|
|
120
|
+
},
|
|
121
|
+
options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
122
|
+
},
|
|
123
|
+
lg: {
|
|
124
|
+
control: {
|
|
125
|
+
type: 'select',
|
|
126
|
+
},
|
|
127
|
+
options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
128
|
+
},
|
|
129
|
+
xl: {
|
|
130
|
+
control: {
|
|
131
|
+
type: 'select',
|
|
132
|
+
},
|
|
133
|
+
options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
parameters: {
|
|
137
|
+
controls: { exclude: ['ref'] },
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export { Default } from '@digigov/ui/layouts/Grid/__stories__/Default';
|
|
142
|
+
export { ResponsiveSpacing } from '@digigov/ui/layouts/Grid/__stories__/ResponsiveSpacing';
|
|
143
|
+
export { Inline } from '@digigov/ui/layouts/Grid/__stories__/Inline';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Hidden from '@digigov/ui/layouts/Hidden';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Digigov UI/layouts/Hidden',
|
|
6
|
+
component: Hidden,
|
|
7
|
+
displayName: 'Hidden',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const WithControls = {
|
|
11
|
+
args: {
|
|
12
|
+
children: 'Περιεχόμενο μέσα σε Hidden.',
|
|
13
|
+
xsUpHidden: false,
|
|
14
|
+
smUpHidden: false,
|
|
15
|
+
mdUpHidden: false,
|
|
16
|
+
lgUpHidden: false,
|
|
17
|
+
xlUpHidden: false,
|
|
18
|
+
xsHidden: false,
|
|
19
|
+
smHidden: false,
|
|
20
|
+
mdHidden: false,
|
|
21
|
+
lgHidden: false,
|
|
22
|
+
xlHidden: false,
|
|
23
|
+
},
|
|
24
|
+
argTypes: {
|
|
25
|
+
children: {
|
|
26
|
+
control: { type: 'text' },
|
|
27
|
+
},
|
|
28
|
+
xsUpHidden: {
|
|
29
|
+
control: { type: 'boolean' },
|
|
30
|
+
},
|
|
31
|
+
smUpHidden: {
|
|
32
|
+
control: { type: 'boolean' },
|
|
33
|
+
},
|
|
34
|
+
mdUpHidden: {
|
|
35
|
+
control: { type: 'boolean' },
|
|
36
|
+
},
|
|
37
|
+
lgUpHidden: {
|
|
38
|
+
control: { type: 'boolean' },
|
|
39
|
+
},
|
|
40
|
+
xlUpHidden: {
|
|
41
|
+
control: { type: 'boolean' },
|
|
42
|
+
},
|
|
43
|
+
xsHidden: {
|
|
44
|
+
control: { type: 'boolean' },
|
|
45
|
+
},
|
|
46
|
+
smHidden: {
|
|
47
|
+
control: { type: 'boolean' },
|
|
48
|
+
},
|
|
49
|
+
mdHidden: {
|
|
50
|
+
control: { type: 'boolean' },
|
|
51
|
+
},
|
|
52
|
+
lgHidden: {
|
|
53
|
+
control: { type: 'boolean' },
|
|
54
|
+
},
|
|
55
|
+
xlHidden: {
|
|
56
|
+
control: { type: 'boolean' },
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
parameters: {
|
|
60
|
+
controls: { exclude: ['ref'] },
|
|
61
|
+
},
|
|
62
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Stack from '@digigov/ui/layouts/Stack';
|
|
3
|
+
import Card from '@digigov/ui/content/Card';
|
|
4
|
+
import doc from './doc.mdx?raw';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Digigov UI/layouts/Stack',
|
|
8
|
+
component: Stack,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
markdown: doc,
|
|
11
|
+
displayName: 'Stack',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const WithControls = {
|
|
15
|
+
render: (args) => {
|
|
16
|
+
return (
|
|
17
|
+
<Stack
|
|
18
|
+
spacing={args.spacing}
|
|
19
|
+
alignItems={args.alignItems}
|
|
20
|
+
direction={args.direction}
|
|
21
|
+
justifyContent={args.justifyContent}
|
|
22
|
+
alignContent={args.alignContent}
|
|
23
|
+
flexWrap={args.flexWrap}
|
|
24
|
+
>
|
|
25
|
+
<Card variant="border"> Item 1 </Card>
|
|
26
|
+
<Card variant="border"> Item 2 </Card>
|
|
27
|
+
<Card variant="border"> Item 3 </Card>
|
|
28
|
+
<Card variant="border"> Item 4 </Card>
|
|
29
|
+
<Card variant="border"> Item 5 </Card>
|
|
30
|
+
<Card variant="border"> Item 6 </Card>
|
|
31
|
+
</Stack>
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
args: {
|
|
35
|
+
spacing: 4,
|
|
36
|
+
direction: 'row',
|
|
37
|
+
justifyContent: 'flex-start',
|
|
38
|
+
alignItems: 'flex-start',
|
|
39
|
+
alignContent: 'center',
|
|
40
|
+
flexWrap: 'nowrap',
|
|
41
|
+
},
|
|
42
|
+
argsTypes: {
|
|
43
|
+
spacing: {
|
|
44
|
+
control: {
|
|
45
|
+
type: 'select',
|
|
46
|
+
},
|
|
47
|
+
options: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
48
|
+
},
|
|
49
|
+
direction: {
|
|
50
|
+
control: {
|
|
51
|
+
type: 'select',
|
|
52
|
+
},
|
|
53
|
+
options: ['row', 'row-reverse', 'column', 'column-reverse'],
|
|
54
|
+
},
|
|
55
|
+
justifyContent: {
|
|
56
|
+
control: {
|
|
57
|
+
type: 'select',
|
|
58
|
+
},
|
|
59
|
+
options: [
|
|
60
|
+
'flex-start',
|
|
61
|
+
'flex-end',
|
|
62
|
+
'center',
|
|
63
|
+
'space-between',
|
|
64
|
+
'space-around',
|
|
65
|
+
'space-evenly',
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
alignItems: {
|
|
69
|
+
control: {
|
|
70
|
+
type: 'select',
|
|
71
|
+
},
|
|
72
|
+
options: ['stretch', 'flex-start', 'flex-end', 'center', 'baseline'],
|
|
73
|
+
},
|
|
74
|
+
alignContent: {
|
|
75
|
+
control: {
|
|
76
|
+
type: 'select',
|
|
77
|
+
},
|
|
78
|
+
options: [
|
|
79
|
+
'stretch',
|
|
80
|
+
'flex-start',
|
|
81
|
+
'flex-end',
|
|
82
|
+
'center',
|
|
83
|
+
'space-between',
|
|
84
|
+
'space-around',
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
flexWrap: {
|
|
88
|
+
control: {
|
|
89
|
+
type: 'select',
|
|
90
|
+
},
|
|
91
|
+
options: ['nowrap', 'wrap'],
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
parameters: {
|
|
95
|
+
controls: { exclude: ['ref'] },
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export { Default } from '@digigov/ui/layouts/Stack/__stories__/Default';
|
|
100
|
+
export { Spacing } from '@digigov/ui/layouts/Stack/__stories__/Spacing';
|
|
101
|
+
export { Row } from '@digigov/ui/layouts/Stack/__stories__/Row';
|
|
102
|
+
export { NoWrap } from '@digigov/ui/layouts/Stack/__stories__/NoWrap';
|
|
103
|
+
export { JustifyContent } from '@digigov/ui/layouts/Stack/__stories__/JustifyContent';
|
|
104
|
+
export { AlignItems } from '@digigov/ui/layouts/Stack/__stories__/AlignItems';
|
package/src/lazy.js
CHANGED
|
@@ -301,8 +301,8 @@ export default {
|
|
|
301
301
|
'AccordionSectionAuto': lazy(() => import('@digigov/ui/content/Accordion/auto').then((module) => ({ default: module['AccordionSectionAuto'] }))),
|
|
302
302
|
'AccordionOpenAllButtonAuto': lazy(() => import('@digigov/ui/content/Accordion/auto').then((module) => ({ default: module['AccordionOpenAllButtonAuto'] }))),
|
|
303
303
|
'AccordionCloseAllButtonAuto': lazy(() => import('@digigov/ui/content/Accordion/auto').then((module) => ({ default: module['AccordionCloseAllButtonAuto'] }))),
|
|
304
|
-
'Markdown': lazy(() => import('@digigov/ui/content/Markdown').then((module) => ({ default: module['Markdown'] }))),
|
|
305
304
|
'SafeHTML': lazy(() => import('@digigov/ui/content/SafeHTML').then((module) => ({ default: module['SafeHTML'] }))),
|
|
305
|
+
'Markdown': lazy(() => import('@digigov/ui/content/Markdown').then((module) => ({ default: module['Markdown'] }))),
|
|
306
306
|
'StepNavAuto': lazy(() => import('@digigov/ui/content/StepNav/auto').then((module) => ({ default: module['StepNavAuto'] }))),
|
|
307
307
|
'StepNavAccordionAuto': lazy(() => import('@digigov/ui/content/StepNav/auto').then((module) => ({ default: module['StepNavAccordionAuto'] }))),
|
|
308
308
|
'StepNavOpenAllButtonAuto': lazy(() => import('@digigov/ui/content/StepNav/auto').then((module) => ({ default: module['StepNavOpenAllButtonAuto'] }))),
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import BackToTopLink from '@digigov/ui/navigation/BackToTopLink';
|
|
2
|
+
import doc from './doc.mdx?raw';
|
|
3
|
+
|
|
2
4
|
export default {
|
|
3
5
|
title: 'Digigov UI/navigation/BackToTopLink',
|
|
4
6
|
component: BackToTopLink,
|
|
5
7
|
displayName: 'BackToTopLink',
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
markdown: doc,
|
|
6
10
|
};
|
|
7
11
|
export { Default } from '@digigov/ui/navigation/BackToTopLink/__stories__/Default';
|
|
8
12
|
export { InMain } from '@digigov/ui/navigation/BackToTopLink/__stories__/InMain';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: back-to-top
|
|
3
|
+
title: BackToTop
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# BackToTop
|
|
7
|
+
|
|
8
|
+
Use the BackToTopLink component to allow users to quickly navigate to the top of the page.
|
|
9
|
+
|
|
10
|
+
## How to use
|
|
11
|
+
|
|
12
|
+
<code src="@digigov/ui/navigation/BackToTopLink/__stories__/Default.tsx" />
|
|
13
|
+
|
|
14
|
+
### Display in main content
|
|
15
|
+
|
|
16
|
+
<code src="@digigov/ui/navigation/BackToTopLink/__stories__/InMain.tsx" />
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
See below for a complete reference to all of the props available to the components mentioned here.
|
|
21
|
+
|
|
22
|
+
<ComponentProps componentName={["BackToTopLink", "BackToTopContainer"]} />
|
|
@@ -17,6 +17,10 @@ The Breadcrumbs component lets users show and hide sections of related content o
|
|
|
17
17
|
|
|
18
18
|
<code src="@digigov/ui/navigation/Breadcrumbs/__stories__/WithoutCurrentPage.tsx" />
|
|
19
19
|
|
|
20
|
+
### With hook
|
|
21
|
+
|
|
22
|
+
<code src="@digigov/ui/navigation/Breadcrumbs/__stories__/WithHook.tsx" />
|
|
23
|
+
|
|
20
24
|
## Accessibility
|
|
21
25
|
|
|
22
26
|
You can read more about the accessibility patterns used in our Breadcrumbs
|