@digigov/ui 1.0.0-002c630d → 1.0.0-6b93ebf2

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 (184) hide show
  1. package/app/Header/__snapshots__/index.spec.tsx.snap +0 -3
  2. package/app/Header/index.d.ts +0 -1
  3. package/app/Header/index.js +0 -14
  4. package/app/Header/index.spec.js +1 -1
  5. package/app/Masthead/Masthead.stories.playwright.json +1 -1
  6. package/app/NotFound/index.js +9 -5
  7. package/app/PageTitle/index.d.ts +4 -5
  8. package/app/PageTitle/index.js +14 -34
  9. package/app/{Confirmation/Confirmation.stories.d.ts → Panel/Panel.stories.d.ts} +3 -3
  10. package/app/{Confirmation/Confirmation.stories.js → Panel/Panel.stories.js} +7 -7
  11. package/app/Panel/__stories__/Default.js +22 -0
  12. package/app/Panel/index.d.ts +5 -0
  13. package/app/{Confirmation → Panel}/index.js +13 -13
  14. package/app/Panel/index.mdx +20 -0
  15. package/app/ThemeOptions/index.js +4 -4
  16. package/app/index.d.ts +1 -1
  17. package/app/index.js +4 -4
  18. package/content/Table/Table.stories.d.ts +1 -0
  19. package/content/Table/Table.stories.js +14 -0
  20. package/content/Table/__stories__/DarkVariant.js +1 -1
  21. package/content/Table/__stories__/DarkVariantWithVerticalHeaders.js +1 -1
  22. package/content/Table/__stories__/Full.js +2 -2
  23. package/content/Table/__stories__/MultipleProps.js +2 -2
  24. package/content/Table/__stories__/RowColors.d.ts +2 -0
  25. package/content/Table/__stories__/RowColors.js +76 -0
  26. package/content/Table/__stories__/ZebraProp.js +1 -1
  27. package/content/Table/index.mdx +14 -40
  28. package/es/app/Header/__snapshots__/index.spec.tsx.snap +0 -3
  29. package/es/app/Header/index.js +0 -1
  30. package/es/app/Header/index.spec.js +2 -2
  31. package/es/app/Masthead/Masthead.stories.playwright.json +1 -1
  32. package/es/app/NotFound/index.js +3 -4
  33. package/es/app/PageTitle/index.js +4 -5
  34. package/es/app/Panel/Panel.stories.js +9 -0
  35. package/es/app/Panel/__stories__/Default.js +9 -0
  36. package/es/app/Panel/index.js +5 -0
  37. package/es/app/Panel/index.mdx +20 -0
  38. package/es/app/ThemeOptions/index.js +4 -4
  39. package/es/app/index.js +1 -1
  40. package/es/content/Table/Table.stories.js +1 -0
  41. package/es/content/Table/__stories__/DarkVariant.js +1 -1
  42. package/es/content/Table/__stories__/DarkVariantWithVerticalHeaders.js +1 -1
  43. package/es/content/Table/__stories__/Full.js +2 -2
  44. package/es/content/Table/__stories__/MultipleProps.js +2 -2
  45. package/es/content/Table/__stories__/RowColors.js +60 -0
  46. package/es/content/Table/__stories__/ZebraProp.js +1 -1
  47. package/es/content/Table/index.mdx +14 -40
  48. package/es/feedback/CopyToClipboard/__stories__/Default.js +2 -1
  49. package/es/feedback/CopyToClipboard/index.js +4 -2
  50. package/es/feedback/NotificationBanner/__stories__/Default.js +2 -2
  51. package/es/feedback/NotificationBanner/index.js +3 -6
  52. package/es/form/Checkbox/Checkbox.stories.js +2 -0
  53. package/es/form/Checkbox/__stories__/Inline.js +23 -0
  54. package/es/form/Checkbox/__stories__/InlineWithDivider.js +24 -0
  55. package/es/form/Checkbox/__stories__/NoneAnswer.js +1 -1
  56. package/es/form/Checkbox/__stories__/NoneAnswerWithError.js +1 -1
  57. package/es/form/RadioContainer/RadioContainer.stories.js +2 -1
  58. package/es/form/RadioContainer/__stories__/Inline.js +1 -1
  59. package/es/form/RadioContainer/__stories__/InlineWithDivider.js +24 -0
  60. package/es/layouts/Basic/__snapshots__/index.spec.tsx.snap +2 -2
  61. package/es/layouts/Divider/index.js +1 -1
  62. package/es/navigation/Link/Link.stories.playwright.json +2 -2
  63. package/es/registry.js +4 -6
  64. package/esm/app/Header/__snapshots__/index.spec.tsx.snap +0 -3
  65. package/esm/app/Header/index.js +0 -1
  66. package/esm/app/Header/index.spec.js +2 -2
  67. package/esm/app/Masthead/Masthead.stories.playwright.json +1 -1
  68. package/esm/app/NotFound/index.js +3 -4
  69. package/esm/app/PageTitle/index.js +4 -5
  70. package/esm/app/Panel/Panel.stories.js +9 -0
  71. package/esm/app/Panel/__stories__/Default.js +9 -0
  72. package/esm/app/Panel/index.js +5 -0
  73. package/esm/app/Panel/index.mdx +20 -0
  74. package/esm/app/ThemeOptions/index.js +4 -4
  75. package/esm/app/index.js +1 -1
  76. package/esm/content/Table/Table.stories.js +1 -0
  77. package/esm/content/Table/__stories__/DarkVariant.js +1 -1
  78. package/esm/content/Table/__stories__/DarkVariantWithVerticalHeaders.js +1 -1
  79. package/esm/content/Table/__stories__/Full.js +2 -2
  80. package/esm/content/Table/__stories__/MultipleProps.js +2 -2
  81. package/esm/content/Table/__stories__/RowColors.js +60 -0
  82. package/esm/content/Table/__stories__/ZebraProp.js +1 -1
  83. package/esm/content/Table/index.mdx +14 -40
  84. package/esm/feedback/CopyToClipboard/__stories__/Default.js +2 -1
  85. package/esm/feedback/CopyToClipboard/index.js +4 -2
  86. package/esm/feedback/NotificationBanner/__stories__/Default.js +2 -2
  87. package/esm/feedback/NotificationBanner/index.js +3 -6
  88. package/esm/form/Checkbox/Checkbox.stories.js +2 -0
  89. package/esm/form/Checkbox/__stories__/Inline.js +23 -0
  90. package/esm/form/Checkbox/__stories__/InlineWithDivider.js +24 -0
  91. package/esm/form/Checkbox/__stories__/NoneAnswer.js +1 -1
  92. package/esm/form/Checkbox/__stories__/NoneAnswerWithError.js +1 -1
  93. package/esm/form/RadioContainer/RadioContainer.stories.js +2 -1
  94. package/esm/form/RadioContainer/__stories__/Inline.js +1 -1
  95. package/esm/form/RadioContainer/__stories__/InlineWithDivider.js +24 -0
  96. package/esm/index.js +1 -1
  97. package/esm/layouts/Basic/__snapshots__/index.spec.tsx.snap +2 -2
  98. package/esm/layouts/Divider/index.js +1 -1
  99. package/esm/navigation/Link/Link.stories.playwright.json +2 -2
  100. package/esm/registry.js +4 -6
  101. package/feedback/CopyToClipboard/__stories__/Default.js +2 -1
  102. package/feedback/CopyToClipboard/index.d.ts +3 -5
  103. package/feedback/CopyToClipboard/index.js +4 -2
  104. package/feedback/NotificationBanner/__stories__/Default.js +2 -2
  105. package/feedback/NotificationBanner/index.d.ts +1 -1
  106. package/feedback/NotificationBanner/index.js +3 -6
  107. package/form/Checkbox/Checkbox.stories.d.ts +2 -0
  108. package/form/Checkbox/Checkbox.stories.js +28 -0
  109. package/form/Checkbox/__stories__/Inline.d.ts +2 -0
  110. package/form/Checkbox/__stories__/Inline.js +38 -0
  111. package/form/Checkbox/__stories__/InlineWithDivider.d.ts +2 -0
  112. package/form/Checkbox/__stories__/InlineWithDivider.js +39 -0
  113. package/form/Checkbox/__stories__/NoneAnswer.js +1 -1
  114. package/form/Checkbox/__stories__/NoneAnswerWithError.js +1 -1
  115. package/form/RadioContainer/RadioContainer.stories.d.ts +1 -0
  116. package/form/RadioContainer/RadioContainer.stories.js +14 -0
  117. package/form/RadioContainer/__stories__/Inline.js +1 -1
  118. package/form/RadioContainer/__stories__/InlineWithDivider.d.ts +2 -0
  119. package/form/RadioContainer/__stories__/InlineWithDivider.js +39 -0
  120. package/layouts/Basic/Content/index.d.ts +1 -1
  121. package/layouts/Basic/__snapshots__/index.spec.tsx.snap +2 -2
  122. package/layouts/Divider/index.d.ts +1 -1
  123. package/layouts/Divider/index.js +4 -4
  124. package/navigation/Link/Link.stories.playwright.json +2 -2
  125. package/package.json +3 -3
  126. package/registry.d.ts +3 -4
  127. package/registry.js +6 -9
  128. package/src/app/Header/__snapshots__/index.spec.tsx.snap +0 -3
  129. package/src/app/Header/index.spec.tsx +1 -6
  130. package/src/app/Header/index.tsx +0 -1
  131. package/src/app/Masthead/Masthead.stories.playwright.json +1 -1
  132. package/src/app/NotFound/index.tsx +4 -5
  133. package/src/app/PageTitle/index.tsx +4 -5
  134. package/src/app/Panel/Panel.stories.js +10 -0
  135. package/src/app/Panel/__stories__/Default.tsx +19 -0
  136. package/src/app/Panel/index.mdx +20 -0
  137. package/src/app/Panel/index.tsx +6 -0
  138. package/src/app/ThemeOptions/index.tsx +4 -4
  139. package/src/app/index.ts +1 -1
  140. package/src/content/Table/Table.stories.js +1 -0
  141. package/src/content/Table/__stories__/DarkVariant.tsx +1 -1
  142. package/src/content/Table/__stories__/DarkVariantWithVerticalHeaders.tsx +1 -1
  143. package/src/content/Table/__stories__/Full.tsx +1 -1
  144. package/src/content/Table/__stories__/MultipleProps.tsx +1 -1
  145. package/src/content/Table/__stories__/RowColors.tsx +96 -0
  146. package/src/content/Table/__stories__/ZebraProp.tsx +1 -1
  147. package/src/content/Table/index.mdx +14 -40
  148. package/src/feedback/CopyToClipboard/__stories__/Default.tsx +2 -1
  149. package/src/feedback/CopyToClipboard/index.tsx +4 -6
  150. package/src/feedback/NotificationBanner/__stories__/Default.tsx +2 -2
  151. package/src/feedback/NotificationBanner/index.tsx +6 -6
  152. package/src/form/Checkbox/Checkbox.stories.js +2 -0
  153. package/src/form/Checkbox/__stories__/Inline.tsx +32 -0
  154. package/src/form/Checkbox/__stories__/InlineWithDivider.tsx +32 -0
  155. package/src/form/Checkbox/__stories__/NoneAnswer.tsx +1 -1
  156. package/src/form/Checkbox/__stories__/NoneAnswerWithError.tsx +1 -1
  157. package/src/form/RadioContainer/RadioContainer.stories.js +1 -0
  158. package/src/form/RadioContainer/__stories__/Inline.tsx +1 -1
  159. package/src/form/RadioContainer/__stories__/InlineWithDivider.tsx +32 -0
  160. package/src/layouts/Basic/__snapshots__/index.spec.tsx.snap +2 -2
  161. package/src/layouts/Divider/index.tsx +1 -1
  162. package/src/navigation/Link/Link.stories.playwright.json +2 -2
  163. package/src/registry.js +6 -8
  164. package/app/Confirmation/__stories__/Default.js +0 -22
  165. package/app/Confirmation/index.d.ts +0 -5
  166. package/app/Confirmation/index.mdx +0 -20
  167. package/app/Header/HeaderSubtitle.d.ts +0 -3
  168. package/app/Header/HeaderSubtitle.js +0 -19
  169. package/es/app/Confirmation/Confirmation.stories.js +0 -9
  170. package/es/app/Confirmation/__stories__/Default.js +0 -9
  171. package/es/app/Confirmation/index.js +0 -5
  172. package/es/app/Confirmation/index.mdx +0 -20
  173. package/es/app/Header/HeaderSubtitle.js +0 -3
  174. package/esm/app/Confirmation/Confirmation.stories.js +0 -9
  175. package/esm/app/Confirmation/__stories__/Default.js +0 -9
  176. package/esm/app/Confirmation/index.js +0 -5
  177. package/esm/app/Confirmation/index.mdx +0 -20
  178. package/esm/app/Header/HeaderSubtitle.js +0 -3
  179. package/src/app/Confirmation/Confirmation.stories.js +0 -10
  180. package/src/app/Confirmation/__stories__/Default.tsx +0 -19
  181. package/src/app/Confirmation/index.mdx +0 -20
  182. package/src/app/Confirmation/index.tsx +0 -6
  183. package/src/app/Header/HeaderSubtitle.tsx +0 -4
  184. /package/app/{Confirmation → Panel}/__stories__/Default.d.ts +0 -0
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+
3
+ import {
4
+ Panel,
5
+ PanelTitle,
6
+ PanelBody,
7
+ } from '@digigov/ui/app/Panel';
8
+
9
+ export const Default = () => (
10
+ <Panel>
11
+ <PanelTitle>Η φόρμα υποβλήθηκε επιτυχώς</PanelTitle>
12
+ <PanelBody>
13
+ Ο κωδικός εγγράφου <br />
14
+ <strong>HDJ2123F</strong>
15
+ </PanelBody>
16
+ </Panel>
17
+ );
18
+
19
+ export default Default;
@@ -0,0 +1,20 @@
1
+ ---
2
+ id: panel
3
+ title: Panel
4
+ ---
5
+
6
+ ```bash
7
+ import Panel from '@digigov/ui/app/Panel';
8
+ ```
9
+
10
+ ## How to use
11
+
12
+ <Story
13
+ packageName="@digigov/ui"
14
+ component="app/Panel"
15
+ story="Default.tsx"
16
+ />
17
+
18
+ ## API
19
+
20
+ <PropTypes packageName="@digigov/ui" component="Panel" />
@@ -0,0 +1,6 @@
1
+ export * from '@digigov/react-core/Panel';
2
+ export * from '@digigov/react-core/PanelBody';
3
+ export * from '@digigov/react-core/PanelTitle';
4
+
5
+ import Panel from '@digigov/react-core/Panel';
6
+ export default Panel;
@@ -170,7 +170,7 @@ export const ThemeOptions = React.forwardRef<
170
170
  <FieldContainer marginBottom={4}>
171
171
  <Fieldset>
172
172
  <FieldsetLegend size="sm">Μέγεθος γραμμάτων</FieldsetLegend>
173
- <RadioContainer inline>
173
+ <RadioContainer layout='horizontal'>
174
174
  <RadioItem
175
175
  name="font-size"
176
176
  value="no"
@@ -197,7 +197,7 @@ export const ThemeOptions = React.forwardRef<
197
197
  <FieldContainer marginBottom={4}>
198
198
  <Fieldset>
199
199
  <FieldsetLegend size="sm">Ύψος γραμμής κειμένων</FieldsetLegend>
200
- <RadioContainer inline>
200
+ <RadioContainer layout='horizontal'>
201
201
  <RadioItem
202
202
  name="line-height"
203
203
  value="no"
@@ -224,7 +224,7 @@ export const ThemeOptions = React.forwardRef<
224
224
  <FieldContainer marginBottom={4}>
225
225
  <Fieldset>
226
226
  <FieldsetLegend size="sm">Απόσταση γραμμάτων</FieldsetLegend>
227
- <RadioContainer inline>
227
+ <RadioContainer layout='horizontal'>
228
228
  <RadioItem
229
229
  name="letter-spacing"
230
230
  value="no"
@@ -251,7 +251,7 @@ export const ThemeOptions = React.forwardRef<
251
251
  <FieldContainer marginBottom={4}>
252
252
  <Fieldset>
253
253
  <FieldsetLegend size="sm">Έντονη εμφάνιση συνδέσμων</FieldsetLegend>
254
- <RadioContainer inline>
254
+ <RadioContainer layout='horizontal'>
255
255
  <RadioItem
256
256
  name="highlight-links"
257
257
  value="no"
package/src/app/index.ts CHANGED
@@ -2,7 +2,7 @@ export * from '@digigov/ui/app/App';
2
2
  export * from '@digigov/ui/app/AccessibilityMenu';
3
3
  export * from '@digigov/ui/app/BannerContainer';
4
4
  export * from '@digigov/ui/app/BottomInfo';
5
- export * from '@digigov/ui/app/Confirmation';
5
+ export * from '@digigov/ui/app/Panel';
6
6
  export * from '@digigov/ui/app/FilterSection';
7
7
  export * from '@digigov/ui/app/Footer';
8
8
  export * from '@digigov/ui/app/Header';
@@ -22,6 +22,7 @@ export * from './__stories__/DarkVariantWithVerticalHeaders';
22
22
  export * from './__stories__/WithLoader';
23
23
  export * from './__stories__/DefinedWidth';
24
24
  export * from './__stories__/Densed';
25
+ export * from './__stories__/RowColors';
25
26
  export * from './__stories__/MultipleProps';
26
27
  export * from './__stories__/WithSortFilters';
27
28
  export * from './__stories__/WithFloatingScroll';
@@ -44,7 +44,7 @@ const data = {
44
44
  export const DarkVariant = () => {
45
45
  return (
46
46
  <TableContainer>
47
- <Table variant="dark">
47
+ <Table headerVariant="dark">
48
48
  {data && (
49
49
  <>
50
50
  <TableCaption>{data.title}</TableCaption>
@@ -44,7 +44,7 @@ const data = {
44
44
  export const DarkVariantWithVerticalHeaders = () => {
45
45
  return (
46
46
  <TableContainer>
47
- <Table variant="dark">
47
+ <Table headerVariant="dark">
48
48
  {data && (
49
49
  <>
50
50
  <TableCaption>{data.title}</TableCaption>
@@ -75,7 +75,7 @@ const data = {
75
75
  export const Full = () => {
76
76
  return (
77
77
  <TableContainer>
78
- <Table zebra variant="dark" verticalBorders dense stacked='sm'>
78
+ <Table variant='zebra' headerVariant="dark" verticalBorders dense stacked='sm'>
79
79
  {data && (
80
80
  <>
81
81
  <TableCaption>{data.title}</TableCaption>
@@ -60,7 +60,7 @@ const data = {
60
60
  export const MultipleProps = () => {
61
61
  return (
62
62
  <TableContainer>
63
- <Table zebra variant="dark" verticalBorders>
63
+ <Table variant='zebra' headerVariant="dark" verticalBorders>
64
64
  {data && (
65
65
  <>
66
66
  <TableCaption>{data.title}</TableCaption>
@@ -0,0 +1,96 @@
1
+ import React from 'react';
2
+
3
+ import {
4
+ TableContainer,
5
+ Table,
6
+ TableCaption,
7
+ TableHead,
8
+ TableRow,
9
+ TableBody,
10
+ TableHeadCell,
11
+ TableDataCell,
12
+ } from '@digigov/ui/content/Table';
13
+ import Link from '@digigov/ui/navigation/Link';
14
+
15
+ const data = {
16
+ title: 'Ειδοποιήσεις',
17
+ labels: {
18
+ date: 'Ημερομηνία',
19
+ title: 'Τίτλος',
20
+ actions: 'Ενέργειες',
21
+ },
22
+ content: [
23
+ {
24
+ date: '24-07-23 16:34',
25
+ title: 'Ειδοποίηση',
26
+ actions: 'λεπτομέρειες',
27
+ new: true,
28
+ },
29
+ {
30
+ date: '24-07-23 12:41',
31
+ title: 'Μήνυμα υπηρεσίας',
32
+ actions: 'λεπτομέρειες',
33
+ new: true,
34
+ },
35
+ {
36
+ date: '24-07-23 12:40',
37
+ title: 'Μήνυμα από τον διαχειριστή',
38
+ actions: 'λεπτομέρειες',
39
+ new: false,
40
+ },
41
+ {
42
+ date: '23-07-23 15:14',
43
+ title: 'Έχετε συνδεθεί',
44
+ actions: 'λεπτομέρειες',
45
+ new: false,
46
+ },
47
+ {
48
+ date: '23-07-23 13:25',
49
+ title: 'Ο κωδικός άλλαξε',
50
+ actions: 'λεπτομέρειες',
51
+ new: false,
52
+ },
53
+ ],
54
+ };
55
+
56
+ export const RowColors = () => {
57
+ return (
58
+ <TableContainer>
59
+ <Table variant="default">
60
+ {data && (
61
+ <>
62
+ <TableCaption>{data.title}</TableCaption>
63
+ <TableHead>
64
+ <TableRow>
65
+ {data.labels &&
66
+ Object.keys(data.labels).map((key) => (
67
+ <TableHeadCell key={key}>{data.labels[key]}</TableHeadCell>
68
+ ))}
69
+ </TableRow>
70
+ </TableHead>
71
+ <TableBody>
72
+ {data.content &&
73
+ data.content.map((item, index) => (
74
+ <TableRow
75
+ key={index}
76
+ color={item.new ? 'primary' : 'secondary'}
77
+ >
78
+ <TableDataCell data-label={data.labels.date}>
79
+ {item.date}
80
+ </TableDataCell>
81
+ <TableDataCell data-label={data.labels.title}>
82
+ {item.title}
83
+ </TableDataCell>
84
+ <TableDataCell data-label={data.labels.actions}>
85
+ <Link href="#">{item.actions}</Link>
86
+ </TableDataCell>
87
+ </TableRow>
88
+ ))}
89
+ </TableBody>
90
+ </>
91
+ )}
92
+ </Table>
93
+ </TableContainer>
94
+ );
95
+ };
96
+ export default RowColors;
@@ -44,7 +44,7 @@ const data = {
44
44
  export const ZebraProp = () => {
45
45
  return (
46
46
  <TableContainer>
47
- <Table zebra>
47
+ <Table variant='zebra'>
48
48
  {data && (
49
49
  <>
50
50
  <TableCaption>{data.title}</TableCaption>
@@ -20,53 +20,35 @@ import {
20
20
 
21
21
  ## How to use
22
22
 
23
- <Story
24
- packageName="@digigov/ui"
25
- component="content/Table"
26
- story="Default.tsx"
27
- />
23
+ <Story packageName="@digigov/ui" component="content/Table" story="Default.tsx"/>
28
24
 
29
25
  ### Table with dark header
30
26
 
31
- <Story
32
- packageName="@digigov/ui"
33
- component="content/Table"
34
- story="DarkVariant.tsx"
35
- />
27
+ <Story packageName="@digigov/ui" component="content/Table" story="DarkVariant.tsx"/>
36
28
 
37
29
  ### Table captions
38
30
 
39
31
  Use the `<TableCaption>` element to describe a table in the same way you would use a heading. A caption helps users find, navigate and understand tables.
40
32
 
41
- <Story
42
- packageName="@digigov/ui"
43
- component="content/Table"
44
- story="TableCaptions.tsx"
45
- />
33
+ <Story packageName="@digigov/ui" component="content/Table" story="TableCaptions.tsx"/>
46
34
 
47
35
  ### Numbers in a table
48
36
 
49
- <Story
50
- packageName="@digigov/ui"
51
- component="content/Table"
52
- story="NumericDataType.tsx"
53
- />
37
+ <Story packageName="@digigov/ui" component="content/Table" story="NumericDataType.tsx"/>
54
38
 
55
39
  ### Zebra rows
56
40
 
57
- <Story
58
- packageName="@digigov/ui"
59
- component="content/Table"
60
- story="ZebraProp.tsx"
61
- />
41
+ <Story packageName="@digigov/ui" component="content/Table" story="ZebraProp.tsx"/>
42
+
43
+ ### Rows with primary or secondary color
44
+
45
+ The prop `color='primary'` or `color='secondary'` is only functional when Table component has `variant='default'`.
46
+
47
+ <Story packageName="@digigov/ui" component="content/Table" story="RowColors.tsx"/>
62
48
 
63
49
  ### Vertical lines
64
50
 
65
- <Story
66
- packageName="@digigov/ui"
67
- component="content/Table"
68
- story="VerticalBorders.tsx"
69
- />
51
+ <Story packageName="@digigov/ui" component="content/Table" story="VerticalBorders.tsx" />
70
52
 
71
53
  ### Dense tables
72
54
 
@@ -74,11 +56,7 @@ Use the `<TableCaption>` element to describe a table in the same way you would u
74
56
 
75
57
  ### Custom column widths
76
58
 
77
- <Story
78
- packageName="@digigov/ui"
79
- component="content/Table"
80
- story="DefinedWidth.tsx"
81
- />
59
+ <Story packageName="@digigov/ui" component="content/Table" story="DefinedWidth.tsx"/>
82
60
 
83
61
  ### No data
84
62
 
@@ -86,11 +64,7 @@ Use the `<TableCaption>` element to describe a table in the same way you would u
86
64
 
87
65
  ### Using loader
88
66
 
89
- <Story
90
- packageName="@digigov/ui"
91
- component="content/Table"
92
- story="WithLoader.tsx"
93
- />
67
+ <Story packageName="@digigov/ui" component="content/Table" story="WithLoader.tsx"/>
94
68
 
95
69
  ## Accessibility
96
70
 
@@ -6,7 +6,8 @@ export const Default = () => {
6
6
  return (
7
7
  <CopyToClipboard
8
8
  text="copied-text"
9
- variant="tooltip-left"
9
+ variant="tooltip"
10
+ tooltipAlign="left"
10
11
  message="Αντιγράφηκε στο πρόχειρο"
11
12
  id="copy-to-clipboard"
12
13
  >
@@ -1,13 +1,11 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import CopyToClipboardContainer from '@digigov/react-core/CopyToClipboardContainer';
2
+ import CopyToClipboardContainer, { CopyToClipboardContainerProps } from '@digigov/react-core/CopyToClipboardContainer';
3
3
  import CopyToClipboardMessage from '@digigov/react-core/CopyToClipboardMessage';
4
4
  import { useTranslation } from '@digigov/ui/i18n';
5
5
  import NormalText from '@digigov/ui/typography/NormalText';
6
6
 
7
- type DivElementAttributes = JSX.IntrinsicElements['div'];
8
- export interface CopyToClipboardProps extends DivElementAttributes {
7
+ export interface CopyToClipboardProps extends CopyToClipboardContainerProps {
9
8
  text: string;
10
- variant?: 'tooltip-right' | 'tooltip-left' | 'banner';
11
9
  message?: string;
12
10
  timeout?: number;
13
11
  }
@@ -16,7 +14,7 @@ export const CopyToClipboard = React.forwardRef<
16
14
  HTMLDivElement,
17
15
  CopyToClipboardProps
18
16
  >(function CopyToClipboard(
19
- { text, variant = 'tooltip-right', message, timeout = 3000, children },
17
+ { text, variant = 'tooltip', tooltipAlign = 'right', message, timeout = 3000, children },
20
18
  ref
21
19
  ) {
22
20
  const [enabled, setEnabled] = useState(false);
@@ -39,12 +37,12 @@ export const CopyToClipboard = React.forwardRef<
39
37
  <CopyToClipboardContainer
40
38
  onClick={copyToClipboard}
41
39
  variant={variant}
40
+ tooltipAlign={tooltipAlign}
42
41
  ref={ref}
43
42
  >
44
43
  {children}
45
44
  {enabled && (
46
45
  <CopyToClipboardMessage
47
- variant={variant}
48
46
  enabled={enabled}
49
47
  role="tooltip"
50
48
  >
@@ -3,13 +3,13 @@ import { NotificationBanner } from '@digigov/ui/feedback/NotificationBanner';
3
3
 
4
4
  export const Default = () => (
5
5
  <NotificationBanner
6
- title="Προειδοποίηση"
6
+ title="Ειδοποίηση"
7
7
  link={{
8
8
  label: 'Προβολή αίτησης',
9
9
  href: '#link?name=NotificationBannerDefault',
10
10
  }}
11
11
  >
12
- Έχετε 7 ημέρες για να υποβάλετε την αίτηση.
12
+ Σε 7 ημέρες θα μπορείτε να υποβάλετε την αίτηση.
13
13
  </NotificationBanner>
14
14
  );
15
15
 
@@ -9,24 +9,24 @@ import NotificationBannerLink from '@digigov/react-core/NotificationBannerLink';
9
9
 
10
10
  export interface NotificationBannerProps
11
11
  extends NotificationBannerContainerProps {
12
- variant?: 'important' | 'success';
12
+ variant?: 'info' | 'success' | 'error';
13
13
  title?: string;
14
14
  link?: { href: string; label: string };
15
15
  ref?: React.Ref<HTMLDivElement>;
16
16
  }
17
17
 
18
18
  export const NotificationBanner: React.FC<NotificationBannerProps> = ({
19
- variant = 'important',
19
+ variant,
20
20
  title,
21
21
  link,
22
22
  children,
23
23
  ...props
24
24
  }) => {
25
- const success = variant === 'success';
26
- title = title ? title : success ? 'Success' : 'Important';
27
25
  return (
28
- <NotificationBannerContainer success={success} {...props}>
29
- <NotificationBannerHeader>{title}</NotificationBannerHeader>
26
+ <NotificationBannerContainer variant={variant} {...props}>
27
+ {title && (
28
+ <NotificationBannerHeader>{title}</NotificationBannerHeader>
29
+ )}
30
30
  <NotificationBannerContent>
31
31
  <NotificationBannerHeading>
32
32
  {children}
@@ -8,6 +8,8 @@ export default {
8
8
  displayName: 'Checkbox',
9
9
  };
10
10
  export * from '@digigov/ui/form/Checkbox/__stories__/Default';
11
+ export * from '@digigov/ui/form/Checkbox/__stories__/Inline';
12
+ export * from '@digigov/ui/form/Checkbox/__stories__/InlineWithDivider';
11
13
  export * from '@digigov/ui/form/Checkbox/__stories__/MultipleQuestions';
12
14
  export * from '@digigov/ui/form/Checkbox/__stories__/WithHint';
13
15
  export * from '@digigov/ui/form/Checkbox/__stories__/NoneAnswer';
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+
3
+ import { Checkbox, CheckboxItem } from '@digigov/ui/form/Checkbox';
4
+
5
+ import {
6
+ FieldContainer,
7
+ Fieldset,
8
+ FieldsetLegend,
9
+ } from '@digigov/ui/form/FieldContainer';
10
+
11
+ import { Hint } from '@digigov/ui/typography/Hint';
12
+
13
+ export const Inline = () => (
14
+ <FieldContainer>
15
+ <Fieldset aria-describedby="feeling-hint">
16
+ <FieldsetLegend>Πώς αισθάνεται αυτή τη στιγμή;</FieldsetLegend>
17
+ <Hint id="feeling-hint">
18
+ Πείτε μας σχετικά με πρόσφατες αλλαγές. Επιλέξτε ό,τι ισχύει.
19
+ </Hint>
20
+ <Checkbox layout='horizontal'>
21
+ <CheckboxItem name="feeling" value="cold">
22
+ Έχω συνάχι
23
+ </CheckboxItem>
24
+ <CheckboxItem name="feeling" value="fever">
25
+ Έχω πυρετό
26
+ </CheckboxItem>
27
+ </Checkbox>
28
+ </Fieldset>
29
+ </FieldContainer>
30
+ );
31
+
32
+ export default Inline;
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+
3
+ import { Checkbox, CheckboxItem } from '@digigov/ui/form/Checkbox';
4
+
5
+ import {
6
+ FieldContainer,
7
+ Fieldset,
8
+ FieldsetLegend,
9
+ } from '@digigov/ui/form/FieldContainer';
10
+
11
+ import { Hint } from '@digigov/ui/typography/Hint';
12
+
13
+ export const InlineWithDivider = () => (
14
+ <FieldContainer>
15
+ <Fieldset aria-describedby="feeling-hint">
16
+ <FieldsetLegend>Πώς αισθάνεται αυτή τη στιγμή;</FieldsetLegend>
17
+ <Hint id="feeling-hint">
18
+ Πείτε μας σχετικά με πρόσφατες αλλαγές. Επιλέξτε ό,τι ισχύει.
19
+ </Hint>
20
+ <Checkbox layout='horizontal'>
21
+ <CheckboxItem name="feeling" value="cold">
22
+ Έχω συνάχι
23
+ </CheckboxItem>
24
+ <CheckboxItem name="feeling" value="fever" dividerText='ή'>
25
+ Έχω πυρετό
26
+ </CheckboxItem>
27
+ </Checkbox>
28
+ </Fieldset>
29
+ </FieldContainer>
30
+ );
31
+
32
+ export default InlineWithDivider;
@@ -19,7 +19,7 @@ export const NoneAnswer = () => (
19
19
  <CheckboxItem name="fever" value="fever">
20
20
  Γαλλία
21
21
  </CheckboxItem>
22
- <CheckboxItem name="fatigue" value="fatigue" divider="ή">
22
+ <CheckboxItem name="fatigue" value="fatigue" dividerText="ή">
23
23
  Όχι, δεν θα ταξιδέψω σε καμία από αυτές τις χώρες
24
24
  </CheckboxItem>
25
25
  </Checkbox>
@@ -26,7 +26,7 @@ export const NoneAnswerWithError = () => (
26
26
  <CheckboxItem name="country" value="fr">
27
27
  Γαλλία
28
28
  </CheckboxItem>
29
- <CheckboxItem divider="ή" name="country" value="none">
29
+ <CheckboxItem dividerText="ή" name="country" value="none">
30
30
  Όχι, δεν θα ταξιδέψω σε καμία από αυτές τις χώρες
31
31
  </CheckboxItem>
32
32
  </Checkbox>
@@ -14,3 +14,4 @@ export * from '@digigov/ui/form/RadioContainer/__stories__/WithHints';
14
14
  export * from '@digigov/ui/form/RadioContainer/__stories__/NoneAnswer';
15
15
  export * from '@digigov/ui/form/RadioContainer/__stories__/WithErrorMessage';
16
16
  export * from '@digigov/ui/form/RadioContainer/__stories__/ConditionalReveal';
17
+ export * from '@digigov/ui/form/RadioContainer/__stories__/InlineWithDivider';
@@ -17,7 +17,7 @@ export const Inline = () => (
17
17
  Συμπεριλαμβάνεται αλλαγή του επίθετου σας ή αλλαγή του τρόπου που
18
18
  γράφετε το όνομα σας.
19
19
  </Hint>
20
- <RadioContainer inline>
20
+ <RadioContainer layout='horizontal'>
21
21
  <RadioItem name="changed_name" value="yes">
22
22
  Ναι
23
23
  </RadioItem>
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+
3
+ import {
4
+ FieldContainer,
5
+ Fieldset,
6
+ FieldsetLegend,
7
+ } from '@digigov/ui/form/FieldContainer';
8
+ import { RadioContainer, RadioItem } from '@digigov/ui/form/RadioContainer';
9
+
10
+ import { Hint } from '@digigov/ui/typography/Hint';
11
+
12
+ export const InlineWithDivider = () => (
13
+ <FieldContainer>
14
+ <Fieldset aria-describedby="name-hint">
15
+ <FieldsetLegend>Έχετε αλλάξει το όνομα σας;</FieldsetLegend>
16
+ <Hint id="name-hint">
17
+ Συμπεριλαμβάνεται αλλαγή του επίθετου σας ή αλλαγή του τρόπου που
18
+ γράφετε το όνομα σας.
19
+ </Hint>
20
+ <RadioContainer layout='horizontal'>
21
+ <RadioItem name="changed_name" value="yes">
22
+ Ναι
23
+ </RadioItem>
24
+ <RadioItem name="changed_name" value="no" divider='ή'>
25
+ Όχι
26
+ </RadioItem>
27
+ </RadioContainer>
28
+ </Fieldset>
29
+ </FieldContainer>
30
+ );
31
+
32
+ export default InlineWithDivider;
@@ -25,10 +25,10 @@ exports[`renders the BasicLayout with Top, Content, Bottom, Main and Side childr
25
25
  <ForwardRef(Container)>
26
26
  <ForwardRef(Base)
27
27
  as="div"
28
- className="govgr-width-container"
28
+ className="govgr-container"
29
29
  >
30
30
  <div
31
- className="govgr-width-container"
31
+ className="govgr-container"
32
32
  >
33
33
  <ForwardRef(Base)
34
34
  as="div"
@@ -2,7 +2,7 @@ import CoreSectionBreak, {
2
2
  SectionBreakProps as CoreSectionBreakProps,
3
3
  } from '@digigov/react-core/SectionBreak';
4
4
  import withDeprecation from '@digigov/ui/utils/withDeprecation';
5
- export * from '@digigov/react-core/ChoiceDivider';
5
+ export * from '@digigov/react-core/ChoiceDividerText';
6
6
 
7
7
  export type DividerProps = CoreSectionBreakProps;
8
8
 
@@ -46,13 +46,13 @@
46
46
  {
47
47
  "name": "hover",
48
48
  "args": {
49
- "selector": "html>body>div:nth-child(5)>div>a"
49
+ "selector": "html>body>div:nth-child(5)>section>a"
50
50
  }
51
51
  },
52
52
  {
53
53
  "name": "click",
54
54
  "args": {
55
- "selector": "html>body>div:nth-child(5)>div>a"
55
+ "selector": "html>body>div:nth-child(5)>section>a"
56
56
  }
57
57
  }
58
58
  ],