@digigov/ui 2.0.0-a402a664 → 2.0.0-aa380ec7

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.
Files changed (144) hide show
  1. package/app/Loader/Loader.stories.d.ts +45 -1
  2. package/app/Loader/__stories__/AccessibilityLoader.d.ts +3 -0
  3. package/app/Loader/__stories__/FullPageLoader.d.ts +1 -0
  4. package/app/Loader/__stories__/Secondary.d.ts +3 -0
  5. package/app/Loader/__stories__/Sizes.d.ts +3 -0
  6. package/app/Loader/index.native.d.ts +2 -2
  7. package/app/Loader/index.native.js.map +2 -2
  8. package/app/Loader/index.web/index.js +17 -1
  9. package/app/Loader/index.web.d.ts +19 -1
  10. package/app/Loader/index.web.js.map +3 -3
  11. package/app/Masthead/Masthead.stories.d.ts +28 -1
  12. package/app/Modal/Modal.stories.d.ts +20 -1
  13. package/app/hooks/useNotificationArea/index.js +76 -0
  14. package/app/hooks/useNotificationArea/package.json +6 -0
  15. package/app/hooks/useNotificationArea.d.ts +1 -0
  16. package/app/hooks/useNotificationArea.js.map +7 -0
  17. package/cjs/app/Loader/index.native.js.map +2 -2
  18. package/cjs/app/Loader/index.web/index.js +33 -2
  19. package/cjs/app/Loader/index.web.js.map +3 -3
  20. package/cjs/app/hooks/useNotificationArea/index.js +99 -0
  21. package/cjs/app/hooks/useNotificationArea.js.map +7 -0
  22. package/cjs/i18n/locales/el/index.js +44 -17
  23. package/cjs/i18n/locales/el.js.map +2 -2
  24. package/cjs/i18n/locales/en/index.js +33 -6
  25. package/cjs/i18n/locales/en.js.map +2 -2
  26. package/cjs/layouts/Hidden/index.js +19 -0
  27. package/cjs/layouts/Hidden/index.js.map +3 -3
  28. package/cjs/lazy.js +1 -0
  29. package/cjs/lazy.js.map +2 -2
  30. package/cjs/registry.js +14 -12
  31. package/cjs/registry.js.map +2 -2
  32. package/content/Accordion/Accordion.stories.d.ts +27 -16
  33. package/content/SummaryList/SummaryList.stories.d.ts +6 -1
  34. package/content/SummaryList/__stories__/SummaryListExample.d.ts +2 -1
  35. package/content/SummaryList/__stories__/WithError.d.ts +3 -0
  36. package/content/Table/Table.stories.d.ts +18 -6
  37. package/content/Table/__stories__/UsingHighlights.d.ts +3 -0
  38. package/feedback/NotificationBanner/NotificationBanner.stories.d.ts +14 -13
  39. package/feedback/NotificationBanner/__stories__/Expanded.d.ts +3 -0
  40. package/feedback/PhaseBanner/PhaseBanner.stories.d.ts +1 -1
  41. package/i18n/locales/el/index.js +44 -17
  42. package/i18n/locales/el.d.ts +31 -4
  43. package/i18n/locales/el.js.map +2 -2
  44. package/i18n/locales/en/index.js +33 -6
  45. package/i18n/locales/en.d.ts +31 -4
  46. package/i18n/locales/en.js.map +2 -2
  47. package/index.js +1 -1
  48. package/layouts/Grid/Grid.stories.d.ts +82 -0
  49. package/layouts/Hidden/Hidden.stories.d.ts +115 -0
  50. package/layouts/Hidden/index.d.ts +2 -0
  51. package/layouts/Hidden/index.js +5 -0
  52. package/layouts/Hidden/index.js.map +2 -2
  53. package/layouts/Stack/Stack.stories.d.ts +76 -0
  54. package/lazy/index.js +1 -0
  55. package/navigation/BackToTopLink/BackToTopLink.stories.d.ts +2 -0
  56. package/navigation/Dropdown/Dropdown.stories.d.ts +75 -1
  57. package/navigation/SkipLink/SkipLink.stories.d.ts +2 -0
  58. package/package.json +5 -5
  59. package/registry/index.js +14 -12
  60. package/src/app/BannerContainer/__stories__/CookiesBanner.tsx +1 -21
  61. package/src/app/Header/doc.mdx +3 -3
  62. package/src/app/Loader/Loader.stories.jsx +54 -0
  63. package/src/app/Loader/__stories__/AccessibilityLoader.tsx +27 -0
  64. package/src/app/Loader/__stories__/FullPageLoader.tsx +9 -5
  65. package/src/app/Loader/__stories__/Secondary.tsx +11 -0
  66. package/src/app/Loader/__stories__/Sizes.tsx +18 -0
  67. package/src/app/Loader/doc.mdx +39 -0
  68. package/src/app/Loader/index.native.tsx +2 -2
  69. package/src/app/Loader/index.test.tsx +12 -0
  70. package/src/app/Loader/index.web.tsx +39 -1
  71. package/src/app/Masthead/Masthead.stories.jsx +66 -0
  72. package/src/app/Masthead/doc.mdx +3 -3
  73. package/src/app/Modal/Modal.stories.jsx +64 -0
  74. package/src/app/Modal/__stories__/AlertDialog.tsx +1 -1
  75. package/src/app/Modal/__stories__/Auto.tsx +1 -1
  76. package/src/app/Modal/__stories__/Default.tsx +1 -1
  77. package/src/app/Modal/__stories__/Dense.tsx +1 -1
  78. package/src/app/Modal/__stories__/WithHooks.tsx +1 -1
  79. package/src/app/Modal/__stories__/WithoutModalGaps.tsx +1 -1
  80. package/src/app/hooks/useNotificationArea.tsx +105 -0
  81. package/src/content/Accordion/Accordion.stories.jsx +9 -1
  82. package/src/content/Accordion/doc.mdx +1 -2
  83. package/src/content/Card/doc.mdx +11 -11
  84. package/src/content/Chip/doc.mdx +4 -4
  85. package/src/content/List/doc.mdx +3 -3
  86. package/src/content/SummaryList/SummaryList.stories.js +7 -1
  87. package/src/content/SummaryList/__stories__/SummaryListExample.tsx +9 -2
  88. package/src/content/SummaryList/__stories__/WithError.tsx +48 -0
  89. package/src/content/SummaryList/index.test.tsx +4 -0
  90. package/src/content/Table/Table.stories.jsx +19 -2
  91. package/src/content/Table/__stories__/UsingHighlights.tsx +82 -0
  92. package/src/content/Table/index.test.tsx +4 -0
  93. package/src/content/TaskList/doc.mdx +1 -1
  94. package/src/content/Timeline/doc.mdx +1 -1
  95. package/src/feedback/CopyToClipboard/doc.mdx +1 -1
  96. package/src/feedback/ErrorSummary/doc.mdx +1 -1
  97. package/src/feedback/NotificationBanner/NotificationBanner.stories.js +10 -9
  98. package/src/feedback/NotificationBanner/__stories__/Expanded.tsx +27 -0
  99. package/src/feedback/NotificationBanner/doc.mdx +15 -6
  100. package/src/feedback/NotificationBanner/index.test.tsx +4 -0
  101. package/src/feedback/PhaseBanner/PhaseBanner.stories.jsx +1 -1
  102. package/src/form/AutoComplete/doc.mdx +2 -2
  103. package/src/form/Button/doc.mdx +25 -14
  104. package/src/form/Checkbox/doc.mdx +1 -1
  105. package/src/form/RadioContainer/doc.mdx +4 -4
  106. package/src/i18n/locales/el.ts +66 -16
  107. package/src/i18n/locales/en.ts +40 -5
  108. package/src/layouts/Basic/doc.mdx +0 -2
  109. package/src/layouts/Grid/Grid.stories.jsx +143 -0
  110. package/src/layouts/Hidden/Hidden.stories.jsx +62 -0
  111. package/src/layouts/Hidden/index.tsx +3 -0
  112. package/src/layouts/Stack/Stack.stories.jsx +104 -0
  113. package/src/lazy.js +1 -0
  114. package/src/navigation/BackToTopLink/BackToTopLink.stories.js +4 -0
  115. package/src/navigation/BackToTopLink/doc.mdx +22 -0
  116. package/src/navigation/Breadcrumbs/doc.mdx +4 -0
  117. package/src/navigation/Dropdown/Dropdown.stories.jsx +118 -0
  118. package/src/navigation/Dropdown/doc.mdx +24 -2
  119. package/src/navigation/NavList/doc.mdx +1 -1
  120. package/src/navigation/Pagination/doc.mdx +5 -1
  121. package/src/navigation/SkipLink/SkipLink.stories.js +4 -0
  122. package/src/navigation/SkipLink/doc.mdx +19 -0
  123. package/src/registry.js +14 -12
  124. package/src/typography/CodeBlock/CodeBlock.stories.js +24 -0
  125. package/src/typography/Heading/Heading.stories.js +12 -0
  126. package/src/typography/HeadingCaption/HeadingCaption.stories.js +9 -0
  127. package/src/typography/Hint/Hint.stories.js +11 -0
  128. package/src/typography/Hint/__stories__/Default.tsx +1 -1
  129. package/src/typography/Hint/__stories__/FontSizes.tsx +4 -4
  130. package/src/typography/NormalText/NormalText.stories.js +10 -0
  131. package/src/typography/Paragraph/Paragraph.stories.js +23 -0
  132. package/stories-registry/index.js +26 -12
  133. package/typography/CodeBlock/CodeBlock.stories.d.ts +11 -0
  134. package/typography/Heading/Heading.stories.d.ts +10 -0
  135. package/typography/HeadingCaption/HeadingCaption.stories.d.ts +8 -0
  136. package/typography/Hint/Hint.stories.d.ts +9 -0
  137. package/typography/NormalText/NormalText.stories.d.ts +8 -0
  138. package/typography/Paragraph/Paragraph.stories.d.ts +37 -0
  139. package/src/app/Loader/Loader.stories.js +0 -8
  140. package/src/app/Masthead/Masthead.stories.js +0 -17
  141. package/src/app/Modal/Modal.stories.js +0 -18
  142. package/src/layouts/Grid/Grid.stories.js +0 -12
  143. package/src/layouts/Stack/Stack.stories.js +0 -15
  144. package/src/navigation/Dropdown/Dropdown.stories.js +0 -23
@@ -38,21 +38,56 @@ export default {
38
38
  invalid_day: 'Date must include day.',
39
39
  invalid_month: 'Date must include month.',
40
40
  invalid_year: 'Date must include year.',
41
+ invalid_day_range: 'Day must be between 1 and {{maxDay}}.',
42
+ invalid_month_range: 'Month must be between 1 and 12.',
41
43
  },
42
44
  datetime: {
43
45
  invalid: 'Date and time must be valid.',
46
+ invalid_month_year_hours_minutes:
47
+ 'Date must include month, year, hours, and minutes.',
48
+ invalid_day_year_hours_minutes:
49
+ 'Date must include day, year, hours, and minutes.',
50
+ invalid_day_month_hours_minutes:
51
+ 'Date must include day, month, hours, and minutes.',
52
+ invalid_year_hours_minutes:
53
+ 'Date must include year, hours, and minutes.',
54
+ invalid_month_hours_minutes:
55
+ 'Date must include month, hours, and minutes.',
56
+ invalid_day_hours_minutes: 'Date must include day, hours, and minutes.',
57
+ invalid__hours_minutes: 'Time must include hours and minutes.',
58
+ invalid_minutes: 'Please enter valid minutes.',
59
+ invalid_hours: 'Please enter valid hours.',
60
+ invalid_month_year_minutes:
61
+ 'Date must include month, year, and minutes.',
62
+ invalid_month_year_hours: 'Date must include month, year, and hours.',
44
63
  invalid_month_year: 'Date must include month and year.',
64
+ invalid_day_year_minutes: 'Date must include day, year, and minutes.',
65
+ invalid_day_year_hours: 'Date must include day, year, and hours.',
66
+ invalid_day_month_year: 'Date must include day, month, and year.',
67
+ invalid_day_month_year_hours:
68
+ 'Date must include day, month, year, and hours.',
45
69
  invalid_day_year: 'Date must include day and year.',
70
+ invalid_day_month_minutes: 'Date must include day, month, and minutes.',
71
+ invalid_day_month_hours: 'Date must include day, month, and hours.',
46
72
  invalid_day_month: 'Date must include day and month.',
47
- invalid_day: 'Date must include day.',
48
- invalid_month: 'Date must include month.',
73
+ invalid_year_minutes: 'Date must include year and minutes.',
74
+ invalid_year_hours: 'Date must include year and hours.',
49
75
  invalid_year: 'Date must include year.',
50
- invalid_hours: 'Please enter valid hours.',
51
- invalid_minutes: 'Please enter valid minutes.',
76
+ invalid_month_minutes: 'Date must include month and minutes.',
77
+ invalid_month_hours: 'Date must include month and hours.',
78
+ invalid_month: 'Date must include month.',
79
+ invalid_day_minutes: 'Date must include day and minutes.',
80
+ invalid_day_hours: 'Date must include day and hours.',
81
+ invalid_day: 'Date must include day.',
82
+ invalid_day_month_year_minutes:
83
+ 'Date must include day, month,year and minutes.',
84
+ invalid_hours_minutes: 'Date must include hours and minutes.',
52
85
  invalid_hours_range: 'Hours must be between 0 and 23.',
53
86
  invalid_minutes_range: 'Minutes must be between 0 and 59.',
87
+ invalid_day_range: 'Day must be between 1 and {{maxDay}}.',
88
+ invalid_month_range: 'Month must be between 1 and 12.',
54
89
  earlier_than: 'The date and time must be earlier than {{maxDateTime}}.',
55
- later_than: 'The date and time must be later than {{minDateTime}}',
90
+ later_than: 'The date and time must be later than {{minDateTime}}.',
56
91
  },
57
92
  text: {
58
93
  more_than: 'You have surpass the {{max}} characters limit.',
@@ -10,8 +10,6 @@ Content and Bottom components.
10
10
 
11
11
  ## How to use
12
12
 
13
- ### Default layout
14
-
15
13
  <code src="@digigov/ui/layouts/Basic/__stories__/Default.tsx" />
16
14
 
17
15
  ### Two thirds one third columns layout
@@ -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
+ };
@@ -1 +1,4 @@
1
1
  export * from '@digigov/react-core/Hidden';
2
+ import Hidden from '@digigov/react-core/Hidden';
3
+
4
+ export default Hidden;
@@ -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
@@ -44,6 +44,7 @@ export default {
44
44
  'LoaderContainer': lazy(() => import('@digigov/ui/app/Loader').then((module) => ({ default: module['LoaderContainer'] }))),
45
45
  'FullPageBackground': lazy(() => import('@digigov/ui/app/Loader').then((module) => ({ default: module['FullPageBackground'] }))),
46
46
  'CircularProgress': lazy(() => import('@digigov/ui/app/Loader/index.web').then((module) => ({ default: module['CircularProgress'] }))),
47
+ 'CircularProgressBase': lazy(() => import('@digigov/ui/app/Loader/index.web').then((module) => ({ default: module['CircularProgressBase'] }))),
47
48
  'Masthead': lazy(() => import('@digigov/ui/app/Masthead').then((module) => ({ default: module['Masthead'] }))),
48
49
  'MastheadBody': lazy(() => import('@digigov/ui/app/Masthead').then((module) => ({ default: module['MastheadBody'] }))),
49
50
  'MastheadLogo': lazy(() => import('@digigov/ui/app/Masthead').then((module) => ({ default: module['MastheadLogo'] }))),
@@ -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
@@ -0,0 +1,118 @@
1
+ import React from 'react';
2
+ import { SectionBreak } from '@digigov/ui/layouts/SectionBreak';
3
+ import {
4
+ Dropdown,
5
+ DropdownButton,
6
+ DropdownContent,
7
+ } from '@digigov/ui/navigation/Dropdown';
8
+ import { NavListItemAction, NavList } from '@digigov/ui/navigation/NavList';
9
+
10
+ import doc from './doc.mdx?raw';
11
+ export default {
12
+ title: 'Digigov UI/navigation/Dropdown',
13
+ description:
14
+ 'Use the dropdown component to provide more options to users in cases where there is not enough space such as tables, navbars, etc.',
15
+ link: 'https://guide.services.gov.gr/docs/patterns/admin-pages/components/dropdown',
16
+ component: Dropdown,
17
+ tags: ['autodocs'],
18
+ markdown: doc,
19
+ displayName: 'Dropdown',
20
+ };
21
+
22
+ export const WithControls = {
23
+ render: (args) => {
24
+ return (
25
+ <Dropdown
26
+ align={args.align}
27
+ disabled={args.disabled}
28
+ dense={args.dense}
29
+ placement={args.placement}
30
+ closeBehaviour={args.closeBehaviour}
31
+ float={args.float}
32
+ >
33
+ <DropdownButton
34
+ role="button"
35
+ aria-haspopup="true"
36
+ aria-controls="menu2"
37
+ arrow
38
+ >
39
+ Ενέργειες
40
+ </DropdownButton>
41
+ <DropdownContent role="menu" id="menu2" scrollable={args.scrollable}>
42
+ <NavList layout="vertical">
43
+ <NavListItemAction role="menuitem" href="#">
44
+ Επεξεργασία
45
+ </NavListItemAction>
46
+ <NavListItemAction role="menuitem" href="#">
47
+ Μετακίνηση
48
+ </NavListItemAction>
49
+ <NavListItemAction role="menuitem" href="#">
50
+ Οριστική διαγραφή
51
+ </NavListItemAction>
52
+ </NavList>
53
+ </DropdownContent>
54
+ </Dropdown>
55
+ );
56
+ },
57
+ args: {
58
+ align: 'right',
59
+ placement: 'bottom',
60
+ disabled: false,
61
+ dense: false,
62
+ closeBehaviour: 'clickButton',
63
+ float: false,
64
+ scrollable: false,
65
+ },
66
+ argsTypes: {
67
+ align: {
68
+ control: {
69
+ type: 'select',
70
+ },
71
+ options: ['left', 'right'],
72
+ },
73
+ placement: {
74
+ control: {
75
+ type: 'select',
76
+ },
77
+ options: ['top', 'bottom'],
78
+ },
79
+ disabled: {
80
+ control: {
81
+ type: 'boolean',
82
+ },
83
+ },
84
+ dense: {
85
+ control: {
86
+ type: 'boolean',
87
+ },
88
+ },
89
+ closeBehaviour: {
90
+ control: {
91
+ type: 'select',
92
+ },
93
+ options: ['clickButton', 'clickOutside'],
94
+ },
95
+ float: {
96
+ control: {
97
+ type: 'boolean',
98
+ },
99
+ },
100
+ scrollable: {
101
+ control: {
102
+ type: 'boolean',
103
+ },
104
+ },
105
+ },
106
+ };
107
+
108
+ export { Default } from '@digigov/ui/navigation/Dropdown/__stories__/Default';
109
+ export { Secondary } from '@digigov/ui/navigation/Dropdown/__stories__/Secondary';
110
+ export { Warning } from '@digigov/ui/navigation/Dropdown/__stories__/Warning';
111
+ export { Disabled } from '@digigov/ui/navigation/Dropdown/__stories__/Disabled';
112
+ export { VariantLink } from '@digigov/ui/navigation/Dropdown/__stories__/VariantLink';
113
+ export { AlignRight } from '@digigov/ui/navigation/Dropdown/__stories__/AlignRight';
114
+ export { PlacementTop } from '@digigov/ui/navigation/Dropdown/__stories__/PlacementTop';
115
+ export { WithIcons } from '@digigov/ui/navigation/Dropdown/__stories__/WithIcons';
116
+ export { ContentPosition } from '@digigov/ui/navigation/Dropdown/__stories__/ContentPosition';
117
+ export { ScrollableContent } from '@digigov/ui/navigation/Dropdown/__stories__/ScrollableContent';
118
+ export { Dense } from '@digigov/ui/navigation/Dropdown/__stories__/Dense';
@@ -10,14 +10,16 @@ title: Dropdown
10
10
  <div className="dropdown-docs">
11
11
  <code src="@digigov/ui/navigation/Dropdown/__stories__/Default.tsx" />
12
12
  </div>
13
- ### Dropdown with align right
13
+
14
+ ### With align right
14
15
 
15
16
  You can display the dropdown menu to the right side of the `Dropdown` button.
16
17
 
17
18
  <div className="dropdown-docs">
18
19
  <code src="@digigov/ui/navigation/Dropdown/__stories__/AlignRight.tsx" />
19
20
  </div>
20
- ### Dropdown with placement top
21
+
22
+ ### With placement top
21
23
 
22
24
  You can display the dropdown menu to the top of the `Dropdown` button.
23
25
 
@@ -25,6 +27,26 @@ You can display the dropdown menu to the top of the `Dropdown` button.
25
27
  <code src="@digigov/ui/navigation/Dropdown/__stories__/PlacementTop.tsx" />
26
28
  </div>
27
29
 
30
+ ### With icons
31
+
32
+ <div className="dropdown-docs">
33
+ <code src="@digigov/ui/navigation/Dropdown/__stories__/WithIcons.tsx" />
34
+ </div>
35
+
36
+ ### With scrollable content
37
+
38
+ Use this when the content of the dropdown menu is too long to fit on the screen.
39
+
40
+ <div className="dropdown-docs">
41
+ <code src="@digigov/ui/navigation/Dropdown/__stories__/ScrollableContent.tsx" />
42
+ </div>
43
+
44
+ ### Dense
45
+
46
+ <div className="dropdown-docs">
47
+ <code src="@digigov/ui/navigation/Dropdown/__stories__/Dense.tsx" />
48
+ </div>
49
+
28
50
  ## API
29
51
 
30
52
  See below for a complete reference to all of the props available to the components mentioned here.
@@ -56,4 +56,4 @@ See below for a complete reference to all of the props available to the componen
56
56
  'NavMenuContentListItem',
57
57
  'NavMenuTitle',
58
58
  ]}
59
- />{' '}
59
+ />
@@ -19,6 +19,10 @@ pagination component displays a list of page numbers, and allows the user to nav
19
19
 
20
20
  <code src="@digigov/ui/navigation/Pagination/__stories__/PaginationWithSmallFont.tsx" />
21
21
 
22
+ ### Dense
23
+
24
+ <code src="@digigov/ui/navigation/Pagination/__stories__/PaginationSmall.tsx" />
25
+
22
26
  ### With results per page
23
27
 
24
28
  <code src="@digigov/ui/navigation/Pagination/__stories__/WithResultsPerPage.tsx" />
@@ -34,4 +38,4 @@ See below for a complete reference to all of the props available to the componen
34
38
  'PaginationList',
35
39
  'PaginationListItem',
36
40
  ]}
37
- />{' '}
41
+ />
@@ -1,9 +1,13 @@
1
1
  import SkipLink from '@digigov/ui/navigation/SkipLink';
2
+ import doc from './doc.mdx?raw';
3
+
2
4
  export default {
3
5
  title: 'Digigov UI/navigation/SkipLink',
4
6
  description:
5
7
  'Use the skip link component to help keyboard-only users skip to the main content on a page.',
6
8
  component: SkipLink,
9
+ tags: ['autodocs'],
10
+ markdown: doc,
7
11
  displayName: 'SkipLink',
8
12
  };
9
13
  export { Default } from '@digigov/ui/navigation/SkipLink/__stories__/Default';
@@ -0,0 +1,19 @@
1
+ ---
2
+ id: skip-link
3
+ title: SkipLink
4
+ ---
5
+
6
+ # SkipLink
7
+
8
+ SkipLink is a component that allows users to skip to the main content of the page.
9
+
10
+ ## How to use
11
+
12
+ <code src="@digigov/ui/navigation/SkipLink/__stories__/Default.tsx" />
13
+
14
+
15
+ ## API
16
+
17
+ See below for a complete reference to all of the props available to the components mentioned here.
18
+
19
+ <ComponentProps componentName={['SkipLink',]}/>