@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
@@ -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>
@@ -94,13 +94,22 @@ export const WithControls = {
94
94
  data.content.map((item, index) => (
95
95
  <TableRow
96
96
  key={index}
97
- highlight={index === 1 && args.tableRowHighlight}
97
+ highlight={index === 1 && args.tableRowHighlight === true}
98
98
  color={index === 1 && args.tableRowColor}
99
99
  >
100
100
  <TableDataCell data-label={data.labels.name}>
101
101
  {item.name}
102
102
  </TableDataCell>
103
- <TableDataCell data-label={data.labels.role}>
103
+ <TableDataCell
104
+ data-label={data.labels.role}
105
+ highlight={
106
+ index === 2 && args.tableCellHighlight === 'warning'
107
+ ? 'warning'
108
+ : index === 2 && args.tableCellHighlight === 'error'
109
+ ? 'error'
110
+ : undefined
111
+ }
112
+ >
104
113
  {item.role}
105
114
  </TableDataCell>
106
115
  <TableDataCell data-label={data.labels.email}>
@@ -130,6 +139,7 @@ export const WithControls = {
130
139
  dense: false,
131
140
  tableCaptionSize: 'md',
132
141
  tableRowHighlight: false,
142
+ tableCellHighlight: undefined,
133
143
  tableRowColor: 'primary',
134
144
  firstTableHeadCellWidth: '25%',
135
145
  tableHeadCellDataType: 'text',
@@ -175,6 +185,12 @@ export const WithControls = {
175
185
  type: 'boolean',
176
186
  },
177
187
  },
188
+ tableCellHighlight: {
189
+ control: {
190
+ type: 'select',
191
+ },
192
+ options: [undefined, 'warning', 'error'],
193
+ },
178
194
  tableRowColor: {
179
195
  control: {
180
196
  type: 'inline-radio',
@@ -213,6 +229,7 @@ export { WithLoader } from '@digigov/ui/content/Table/__stories__/WithLoader';
213
229
  export { DefinedWidth } from '@digigov/ui/content/Table/__stories__/DefinedWidth';
214
230
  export { Dense } from '@digigov/ui/content/Table/__stories__/Dense';
215
231
  export { RowColors } from '@digigov/ui/content/Table/__stories__/RowColors';
232
+ export { UsingHighlights } from '@digigov/ui/content/Table/__stories__/UsingHighlights';
216
233
  export { MultipleProps } from '@digigov/ui/content/Table/__stories__/MultipleProps';
217
234
  export { WithSortFilters } from '@digigov/ui/content/Table/__stories__/WithSortFilters';
218
235
  export { WithFloatingScroll } from '@digigov/ui/content/Table/__stories__/WithFloatingScroll';
@@ -0,0 +1,82 @@
1
+ import React from 'react';
2
+ import {
3
+ TableContainer,
4
+ Table,
5
+ TableCaption,
6
+ TableHead,
7
+ TableRow,
8
+ TableBody,
9
+ TableHeadCell,
10
+ TableDataCell,
11
+ } from '@digigov/ui/content/Table';
12
+
13
+ const data = {
14
+ title: 'Χρήστες',
15
+ labels: {
16
+ name: 'Ονοματεπώνυμο',
17
+ role: 'Ρόλος',
18
+ email: 'Email',
19
+ },
20
+ content: [
21
+ {
22
+ name: 'Μάριος Μενεξές',
23
+ role: 'Χειριστής',
24
+ email: 'marios@mail.com',
25
+ },
26
+ {
27
+ name: 'Καλλιόπη Παπαδοπούλου',
28
+ role: 'Χειριστής',
29
+ email: 'kalliopi@mail.com',
30
+ },
31
+ {
32
+ name: 'Μαρία Φλούπη',
33
+ role: 'Διαχειριστής',
34
+ email: 'maria@mail.com',
35
+ },
36
+ ],
37
+ };
38
+
39
+ export const UsingHighlights = (_: any) => {
40
+ return (
41
+ <TableContainer>
42
+ <Table stacked="sm">
43
+ {data && (
44
+ <>
45
+ <TableCaption>{data.title}</TableCaption>
46
+ <TableHead>
47
+ <TableRow>
48
+ {data.labels &&
49
+ Object.keys(data.labels).map((key) => (
50
+ <TableHeadCell key={key}>{data.labels[key]}</TableHeadCell>
51
+ ))}
52
+ </TableRow>
53
+ </TableHead>
54
+ <TableBody>
55
+ {data.content &&
56
+ data.content.map((item, index) => (
57
+ <TableRow key={index}>
58
+ <TableDataCell
59
+ data-label={data.labels.name}
60
+ highlight={index === 2 ? 'error' : undefined}
61
+ >
62
+ {item.name}
63
+ </TableDataCell>
64
+ <TableDataCell
65
+ data-label={data.labels.role}
66
+ highlight={index === 1 ? 'warning' : undefined}
67
+ >
68
+ {item.role}
69
+ </TableDataCell>
70
+ <TableDataCell data-label={data.labels.email}>
71
+ {item.email}
72
+ </TableDataCell>
73
+ </TableRow>
74
+ ))}
75
+ </TableBody>
76
+ </>
77
+ )}
78
+ </Table>
79
+ </TableContainer>
80
+ );
81
+ };
82
+ export default UsingHighlights;
@@ -13,6 +13,7 @@ import { NumericDataType } from '@digigov/ui/content/Table/__stories__/NumericDa
13
13
  import { RowColors } from '@digigov/ui/content/Table/__stories__/RowColors';
14
14
  import { Stacked } from '@digigov/ui/content/Table/__stories__/Stacked';
15
15
  import { TableCaptions } from '@digigov/ui/content/Table/__stories__/TableCaptions';
16
+ import { UsingHighlights } from '@digigov/ui/content/Table/__stories__/UsingHighlights';
16
17
  import { VerticalBorders } from '@digigov/ui/content/Table/__stories__/VerticalBorders';
17
18
  import { VerticalHeaders } from '@digigov/ui/content/Table/__stories__/VerticalHeaders';
18
19
  import { WithFloatingScroll } from '@digigov/ui/content/Table/__stories__/WithFloatingScroll';
@@ -62,6 +63,9 @@ test('renders the All Table variants', async ({ mount, page }) => {
62
63
  <TestVariant title="TableCaptions">
63
64
  <TableCaptions />
64
65
  </TestVariant>
66
+ <TestVariant title="UsingHighlights">
67
+ <UsingHighlights />
68
+ </TestVariant>
65
69
  <TestVariant title="VerticalBorders">
66
70
  <VerticalBorders />
67
71
  </TestVariant>
@@ -11,7 +11,7 @@ TaskList is a component that displays number of steps required to complete a pro
11
11
 
12
12
  <code src="@digigov/ui/content/TaskList/__stories__/Default.tsx" />
13
13
 
14
- ## With dense style
14
+ ### With dense style
15
15
 
16
16
  <code src="@digigov/ui/content/TaskList/__stories__/Dense.tsx" />
17
17
 
@@ -13,7 +13,7 @@ User can better understand what has happened and also understand what the next s
13
13
 
14
14
  <code src="@digigov/ui/content/Timeline/__stories__/Default.tsx" />
15
15
 
16
- ## With dense style
16
+ ### With dense style
17
17
 
18
18
  <code src="@digigov/ui/content/Timeline/__stories__/Dense.tsx" />
19
19
 
@@ -21,4 +21,4 @@ title: CopyToClipboard
21
21
 
22
22
  See below for a complete reference to all of the props available to the components mentioned here.
23
23
 
24
- <ComponentProps componentName={['CopyToClipboardContainer']} />{' '}
24
+ <ComponentProps componentName={['CopyToClipboardContainer']} />
@@ -35,4 +35,4 @@ For questions that require a user to select one or more options from a list usin
35
35
 
36
36
  See below for a complete reference to all of the props available to the components mentioned here.
37
37
 
38
- {/* <ComponentProps componentName={["ErrorSummary"]} /> */}
38
+ <ComponentProps componentName={["ErrorSummary"]} />
@@ -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'] },
@@ -50,3 +50,4 @@ export const WithControls = {
50
50
  export { Default } from '@digigov/ui/feedback/NotificationBanner/__stories__/Default';
51
51
  export { Success } from '@digigov/ui/feedback/NotificationBanner/__stories__/Success';
52
52
  export { Dense } from '@digigov/ui/feedback/NotificationBanner/__stories__/Dense';
53
+ export { Expanded } from '@digigov/ui/feedback/NotificationBanner/__stories__/Expanded';
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import {
3
+ NotificationBannerContainer,
4
+ NotificationBannerHeader,
5
+ NotificationBannerContent,
6
+ NotificationBannerHeading,
7
+ NotificationBannerLink,
8
+ } from '@digigov/ui/feedback/NotificationBanner';
9
+ import { Paragraph } from '@digigov/ui/typography/Paragraph';
10
+
11
+ export const Expanded = (_: any) => (
12
+ <NotificationBannerContainer>
13
+ <NotificationBannerHeader>Ειδοποίηση</NotificationBannerHeader>
14
+ <NotificationBannerContent>
15
+ <NotificationBannerHeading>
16
+ Μπορείτε να συμβάλλετε στη βελτίωση των δημοσίων υπηρεσιών.
17
+ </NotificationBannerHeading>
18
+ <Paragraph>
19
+ Συμπληρώστε έως 24/5 το ερωτηματολόγιο στο{' '}
20
+ <NotificationBannerLink> axiologisi.ypes.gov.gr</NotificationBannerLink>
21
+ .
22
+ </Paragraph>
23
+ </NotificationBannerContent>
24
+ </NotificationBannerContainer>
25
+ );
26
+
27
+ export default Expanded;
@@ -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
 
@@ -29,8 +26,20 @@ You can also use a notification banner to tell the user about the outcome of som
29
26
 
30
27
  <code src="@digigov/ui/feedback/NotificationBanner/__stories__/Dense.tsx" />
31
28
 
32
- ## API
29
+ ### Expanded
33
30
 
34
- See below for a complete reference to all of the props available to the components mentioned here.
31
+ <code src="@digigov/ui/feedback/NotificationBanner/__stories__/Expanded.tsx" />
32
+
33
+ ## API
35
34
 
36
- <ComponentProps componentName={["NotificationBannerContainer","NotificationBannerContent","NotificationBannerHeader","NotificationBannerHeading","NotificationBannerLink"]} />
35
+ See below for a complete reference to all of the props available to the components mentioned here.
36
+
37
+ <ComponentProps
38
+ componentName={[
39
+ 'NotificationBannerContainer',
40
+ 'NotificationBannerContent',
41
+ 'NotificationBannerHeader',
42
+ 'NotificationBannerHeading',
43
+ 'NotificationBannerLink',
44
+ ]}
45
+ />
@@ -3,6 +3,7 @@ import { test, expect } from '@playwright/experimental-ct-react';
3
3
  import TestVariant from '@digigov/ui/utils/TestVariant'
4
4
  import { Default } from '@digigov/ui/feedback/NotificationBanner/__stories__/Default';
5
5
  import { Dense } from '@digigov/ui/feedback/NotificationBanner/__stories__/Dense';
6
+ import { Expanded } from '@digigov/ui/feedback/NotificationBanner/__stories__/Expanded';
6
7
  import { Success } from '@digigov/ui/feedback/NotificationBanner/__stories__/Success';
7
8
 
8
9
  test('renders the All NotificationBanner variants', async ({ mount, page }) => {
@@ -15,6 +16,9 @@ test('renders the All NotificationBanner variants', async ({ mount, page }) => {
15
16
  <TestVariant title="Dense">
16
17
  <Dense />
17
18
  </TestVariant>
19
+ <TestVariant title="Expanded">
20
+ <Expanded />
21
+ </TestVariant>
18
22
  <TestVariant title="Success">
19
23
  <Success />
20
24
  </TestVariant>
@@ -31,8 +31,8 @@ export const WithControls = {
31
31
  );
32
32
  },
33
33
  args: {
34
- tag: 'ALPHA',
35
34
  underline: true,
35
+ tag: 'ALPHA',
36
36
  },
37
37
  argTypes: {
38
38
  underline: {
@@ -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
+ />
@@ -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
- ### Start buttons
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 buttons
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 buttons
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
- ### Disable buttons
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
- ## Default buttons
85
+ ## More buttons
75
86
 
76
- Use a default button for the main call to action on a page.
87
+ ### Back link button
77
88
 
78
- <code src="@digigov/ui/form/Button/__stories__/Primary.tsx" />
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
- Read more about [how to use the React types](/docs/api/Button).
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
- ## Conditionally revealing a related question
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
- ### Checkbox items with hints
22
+ ### Radio items with hints
23
23
 
24
- You can add hints to checkbox items to provide additional information about the options.
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
- ### RadioContainer items with a text divider
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
- ## Conditionally revealing a related question
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
 
@@ -35,36 +35,86 @@ 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
+ invalid_day_range: 'Η ημέρα πρέπει να είναι μεταξύ 1 και {{maxDay}}.',
49
+ invalid_month_range: 'Ο μήνας πρέπει να είναι μεταξύ 1 και 12.',
48
50
  },
49
51
  datetime: {
50
52
  invalid: 'Η ημερομηνία και ώρα πρέπει να είναι έγκυρη.',
53
+ invalid_month_year_hours_minutes:
54
+ 'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα, το έτος, την ώρα και τα λεπτά.',
55
+ invalid_day_year_hours_minutes:
56
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, το έτος, την ώρα και τα λεπτά.',
57
+ invalid_day_month_hours_minutes:
58
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, τον μήνα, την ώρα και τα λεπτά.',
59
+ invalid_year_hours_minutes:
60
+ 'Η ημερομηνία πρέπει να περιλαμβάνει το έτος, την ώρα και τα λεπτά.',
61
+ invalid_month_hours_minutes:
62
+ 'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα, την ώρα και τα λεπτά.',
63
+ invalid_day_hours_minutes:
64
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, την ώρα και τα λεπτά.',
65
+ invalid__hours_minutes:
66
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ώρα και τα λεπτά.',
67
+ invalid_minutes: 'Η ημερομηνία πρέπει να περιλαμβάνει τα λεπτά.',
68
+ invalid_hours: 'Η ημερομηνία πρέπει να περιλαμβάνει την ώρα.',
69
+ invalid_month_year_minutes:
70
+ 'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα, το έτος και τα λεπτά.',
71
+ invalid_month_year_hours:
72
+ 'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα, το έτος και την ώρα.',
51
73
  invalid_month_year:
52
- 'Η ημερομηνία πρέπει να συμπεριλαμβάνει τον μήνα και το έτος.',
74
+ 'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα και το έτος.',
75
+ invalid_day_year_minutes:
76
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, το έτος και τα λεπτά.',
77
+ invalid_day_year_hours:
78
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, το έτος και την ώρα.',
79
+ invalid_day_month_year:
80
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, τον μήνα και το έτος.',
81
+ invalid_day_month_year_hours:
82
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, τον μήνα, το έτος και την ώρα.',
53
83
  invalid_day_year:
54
- 'Η ημερομηνία πρέπει να συμπεριλαμβάνει τη μέρα και το έτος.',
84
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα και το έτος.',
85
+ invalid_day_month_minutes:
86
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, τον μήνα και τα λεπτά.',
87
+ invalid_day_month_hours:
88
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα, τον μήνα και την ώρα.',
55
89
  invalid_day_month:
56
- 'Η ημερομηνία πρέπει να συμπεριλαμβάνει τη μέρα και τον μήνα.',
57
- invalid_day: 'Η ημερομηνία πρέπει να συμπεριλαμβάνει τη μέρα',
58
- invalid_month: 'Η ημερομηνία πρέπει να συμπεριλαμβάνει τον μήνα.',
59
- invalid_year: 'Η ημερομηνία πρέπει να συμπεριλαμβάνει το έτος.',
60
- invalid_hours: 'Συμπληρώστε έγκυρη ώρα.',
61
- invalid_minutes: 'Συμπληρώστε έγκυρα λεπτά.',
90
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα και τον μήνα.',
91
+ invalid_year_minutes:
92
+ 'Η ημερομηνία πρέπει να περιλαμβάνει το έτος και τα λεπτά.',
93
+ invalid_year_hours:
94
+ 'Η ημερομηνία πρέπει να περιλαμβάνει το έτος και την ώρα.',
95
+ invalid_year: 'Η ημερομηνία πρέπει να περιλαμβάνει το έτος.',
96
+ invalid_month_minutes:
97
+ 'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα και τα λεπτά.',
98
+ invalid_month_hours:
99
+ 'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα και την ώρα.',
100
+ invalid_month: 'Η ημερομηνία πρέπει να περιλαμβάνει τον μήνα.',
101
+ invalid_day_minutes:
102
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα και τα λεπτά.',
103
+ invalid_day_hours:
104
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα και την ώρα.',
105
+ invalid_day: 'Η ημερομηνία πρέπει να περιλαμβάνει την ημέρα.',
62
106
  invalid_hours_range: 'Η ώρα πρέπει να είναι μεταξύ 0 και 23.',
63
107
  invalid_minutes_range: 'Τα λεπτά πρέπει να είναι μεταξύ 0 και 59.',
108
+ invalid_day_range: 'Η ημέρα πρέπει να είναι μεταξύ 1 και {{maxDay}}.',
109
+ invalid_month_range: 'Ο μήνας πρέπει να είναι μεταξύ 1 και 12.',
110
+ invalid_day_month_year_minutes:
111
+ 'Η ημερομηννία πρέπει να περιλαμβάνει την ημέρα, τον μήνα και το έτος κ τα λεπτά.',
112
+ invalid_hours_minutes:
113
+ 'Η ημερομηνία πρέπει να περιλαμβάνει την ώρα και τα λεπτά.',
64
114
  earlier_than:
65
- 'Συμπληρώστε ημερομηνία και ώρα προγενέστερη της {{maxDateTime}}',
115
+ 'Συμπληρώστε ημερομηνία και ώρα προγενέστερη της {{maxDateTime}}.',
66
116
  later_than:
67
- 'Συμπληρώστε ημερομηνία και ώρα μεταγενέστερη της {{minDateTime}}',
117
+ 'Συμπληρώστε ημερομηνία και ώρα μεταγενέστερη της {{minDateTime}}.',
68
118
  },
69
119
  otp: {
70
120
  invalid: 'Ο κωδικός που έχετε εισάγει είναι λάθος.',