@digigov/ui 0.32.0 → 0.32.1

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 (171) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/admin/AutoComplete/index.mdx +8 -30
  3. package/admin/CopyToClipboard/index.mdx +1 -5
  4. package/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
  5. package/admin/Dropdown/__stories__/AlignRight.js +1 -2
  6. package/admin/Dropdown/__stories__/Default.js +1 -3
  7. package/admin/Dropdown/__stories__/PlacementTop.js +1 -2
  8. package/admin/Dropdown/index.mdx +3 -15
  9. package/admin/Modal/Modal.stories.playwright.json +37 -0
  10. package/admin/Modal/__stories__/AlertDialog.js +36 -12
  11. package/admin/Modal/__stories__/Default.js +34 -10
  12. package/admin/Modal/index.mdx +1 -5
  13. package/app/Footer/Footer.mdx +3 -14
  14. package/app/Header/index.mdx +3 -16
  15. package/app/QrCodeViewer/index.mdx +1 -5
  16. package/core/Accordion/index.mdx +2 -10
  17. package/core/Button/__stories__/GroupingButtons.d.ts +1 -0
  18. package/core/Button/__stories__/GroupingButtons.js +4 -2
  19. package/core/Button/__stories__/GroupingButtonsAndLinks.d.ts +1 -0
  20. package/core/Button/__stories__/GroupingButtonsAndLinks.js +4 -2
  21. package/core/Button/__stories__/Warning.d.ts +1 -0
  22. package/core/Button/__stories__/Warning.js +4 -2
  23. package/core/Button/index.mdx +4 -20
  24. package/core/Card/card.mdx +7 -35
  25. package/core/Checkbox/checkbox.mdx +6 -30
  26. package/core/DateInputContainer/index.mdx +4 -20
  27. package/core/ErrorSummary/index.mdx +3 -15
  28. package/core/FileUpload/index.mdx +1 -5
  29. package/core/Link/link.mdx +4 -20
  30. package/core/List/index.mdx +1 -5
  31. package/core/NavList/index.mdx +1 -5
  32. package/core/NotificationBanner/index.mdx +1 -5
  33. package/core/PhaseBanner/index.mdx +1 -4
  34. package/core/RadioContainer/index.mdx +6 -30
  35. package/core/SelectContainer/index.mdx +3 -15
  36. package/core/SingleCharacterInputContainer/index.mdx +7 -10
  37. package/core/SummaryList/index.mdx +2 -10
  38. package/core/Table/index.mdx +6 -30
  39. package/core/TextArea/index.mdx +6 -30
  40. package/core/TextInput/index.mdx +6 -30
  41. package/core/index.d.ts +1 -0
  42. package/core/index.js +13 -0
  43. package/es/admin/AutoComplete/index.mdx +8 -30
  44. package/es/admin/CopyToClipboard/index.mdx +1 -5
  45. package/es/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
  46. package/es/admin/Dropdown/__stories__/AlignRight.js +1 -2
  47. package/es/admin/Dropdown/__stories__/Default.js +1 -3
  48. package/es/admin/Dropdown/__stories__/PlacementTop.js +1 -2
  49. package/es/admin/Dropdown/index.mdx +3 -15
  50. package/es/admin/Modal/Modal.stories.playwright.json +37 -0
  51. package/es/admin/Modal/__stories__/AlertDialog.js +29 -12
  52. package/es/admin/Modal/__stories__/Default.js +27 -10
  53. package/es/admin/Modal/index.mdx +1 -5
  54. package/es/app/Footer/Footer.mdx +3 -14
  55. package/es/app/Header/index.mdx +3 -16
  56. package/es/app/QrCodeViewer/index.mdx +1 -5
  57. package/es/core/Accordion/index.mdx +2 -10
  58. package/es/core/Button/__stories__/GroupingButtons.js +2 -1
  59. package/es/core/Button/__stories__/GroupingButtonsAndLinks.js +2 -1
  60. package/es/core/Button/__stories__/Warning.js +2 -1
  61. package/es/core/Button/index.mdx +4 -20
  62. package/es/core/Card/card.mdx +7 -35
  63. package/es/core/Checkbox/checkbox.mdx +6 -30
  64. package/es/core/DateInputContainer/index.mdx +4 -20
  65. package/es/core/ErrorSummary/index.mdx +3 -15
  66. package/es/core/FileUpload/index.mdx +1 -5
  67. package/es/core/Link/link.mdx +4 -20
  68. package/es/core/List/index.mdx +1 -5
  69. package/es/core/NavList/index.mdx +1 -5
  70. package/es/core/NotificationBanner/index.mdx +1 -5
  71. package/es/core/PhaseBanner/index.mdx +1 -4
  72. package/es/core/RadioContainer/index.mdx +6 -30
  73. package/es/core/SelectContainer/index.mdx +3 -15
  74. package/es/core/SingleCharacterInputContainer/index.mdx +7 -10
  75. package/es/core/SummaryList/index.mdx +2 -10
  76. package/es/core/Table/index.mdx +6 -30
  77. package/es/core/TextArea/index.mdx +6 -30
  78. package/es/core/TextInput/index.mdx +6 -30
  79. package/es/core/index.js +1 -0
  80. package/es/typography/HeadingCaption/index.mdx +1 -5
  81. package/es/typography/Hint/index.mdx +1 -5
  82. package/es/typography/NormalText/index.mdx +3 -15
  83. package/es/typography/Paragraph/index.mdx +3 -15
  84. package/esm/admin/AutoComplete/index.mdx +8 -30
  85. package/esm/admin/CopyToClipboard/index.mdx +1 -5
  86. package/esm/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
  87. package/esm/admin/Dropdown/__stories__/AlignRight.js +1 -2
  88. package/esm/admin/Dropdown/__stories__/Default.js +1 -3
  89. package/esm/admin/Dropdown/__stories__/PlacementTop.js +1 -2
  90. package/esm/admin/Dropdown/index.mdx +3 -15
  91. package/esm/admin/Modal/Modal.stories.playwright.json +37 -0
  92. package/esm/admin/Modal/__stories__/AlertDialog.js +29 -12
  93. package/esm/admin/Modal/__stories__/Default.js +27 -10
  94. package/esm/admin/Modal/index.mdx +1 -5
  95. package/esm/app/Footer/Footer.mdx +3 -14
  96. package/esm/app/Header/index.mdx +3 -16
  97. package/esm/app/QrCodeViewer/index.mdx +1 -5
  98. package/esm/core/Accordion/index.mdx +2 -10
  99. package/esm/core/Button/__stories__/GroupingButtons.js +2 -1
  100. package/esm/core/Button/__stories__/GroupingButtonsAndLinks.js +2 -1
  101. package/esm/core/Button/__stories__/Warning.js +2 -1
  102. package/esm/core/Button/index.mdx +4 -20
  103. package/esm/core/Card/card.mdx +7 -35
  104. package/esm/core/Checkbox/checkbox.mdx +6 -30
  105. package/esm/core/DateInputContainer/index.mdx +4 -20
  106. package/esm/core/ErrorSummary/index.mdx +3 -15
  107. package/esm/core/FileUpload/index.mdx +1 -5
  108. package/esm/core/Link/link.mdx +4 -20
  109. package/esm/core/List/index.mdx +1 -5
  110. package/esm/core/NavList/index.mdx +1 -5
  111. package/esm/core/NotificationBanner/index.mdx +1 -5
  112. package/esm/core/PhaseBanner/index.mdx +1 -4
  113. package/esm/core/RadioContainer/index.mdx +6 -30
  114. package/esm/core/SelectContainer/index.mdx +3 -15
  115. package/esm/core/SingleCharacterInputContainer/index.mdx +7 -10
  116. package/esm/core/SummaryList/index.mdx +2 -10
  117. package/esm/core/Table/index.mdx +6 -30
  118. package/esm/core/TextArea/index.mdx +6 -30
  119. package/esm/core/TextInput/index.mdx +6 -30
  120. package/esm/core/index.js +1 -0
  121. package/esm/index.js +1 -1
  122. package/esm/typography/HeadingCaption/index.mdx +1 -5
  123. package/esm/typography/Hint/index.mdx +1 -5
  124. package/esm/typography/NormalText/index.mdx +3 -15
  125. package/esm/typography/Paragraph/index.mdx +3 -15
  126. package/package.json +1 -1
  127. package/src/admin/AutoComplete/index.mdx +8 -30
  128. package/src/admin/CopyToClipboard/index.mdx +1 -5
  129. package/src/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
  130. package/src/admin/Dropdown/__stories__/AlignRight.tsx +1 -1
  131. package/src/admin/Dropdown/__stories__/Default.tsx +1 -1
  132. package/src/admin/Dropdown/__stories__/PlacementTop.tsx +1 -1
  133. package/src/admin/Dropdown/index.mdx +3 -15
  134. package/src/admin/Modal/Modal.stories.playwright.json +37 -0
  135. package/src/admin/Modal/__stories__/AlertDialog.tsx +18 -3
  136. package/src/admin/Modal/__stories__/Default.tsx +18 -3
  137. package/src/admin/Modal/index.mdx +1 -5
  138. package/src/app/Footer/Footer.mdx +3 -14
  139. package/src/app/Header/index.mdx +3 -16
  140. package/src/app/QrCodeViewer/index.mdx +1 -5
  141. package/src/core/Accordion/index.mdx +2 -10
  142. package/src/core/Button/__stories__/GroupingButtons.tsx +1 -0
  143. package/src/core/Button/__stories__/GroupingButtonsAndLinks.tsx +1 -0
  144. package/src/core/Button/__stories__/Warning.tsx +1 -0
  145. package/src/core/Button/index.mdx +4 -20
  146. package/src/core/Card/card.mdx +7 -35
  147. package/src/core/Checkbox/checkbox.mdx +6 -30
  148. package/src/core/DateInputContainer/index.mdx +4 -20
  149. package/src/core/ErrorSummary/index.mdx +3 -15
  150. package/src/core/FileUpload/index.mdx +1 -5
  151. package/src/core/Link/link.mdx +4 -20
  152. package/src/core/List/index.mdx +1 -5
  153. package/src/core/NavList/index.mdx +1 -5
  154. package/src/core/NotificationBanner/index.mdx +1 -5
  155. package/src/core/PhaseBanner/index.mdx +1 -4
  156. package/src/core/RadioContainer/index.mdx +6 -30
  157. package/src/core/SelectContainer/index.mdx +3 -15
  158. package/src/core/SingleCharacterInputContainer/index.mdx +7 -10
  159. package/src/core/SummaryList/index.mdx +2 -10
  160. package/src/core/Table/index.mdx +6 -30
  161. package/src/core/TextArea/index.mdx +6 -30
  162. package/src/core/TextInput/index.mdx +6 -30
  163. package/src/core/index.ts +1 -0
  164. package/src/typography/HeadingCaption/index.mdx +1 -5
  165. package/src/typography/Hint/index.mdx +1 -5
  166. package/src/typography/NormalText/index.mdx +3 -15
  167. package/src/typography/Paragraph/index.mdx +3 -15
  168. package/typography/HeadingCaption/index.mdx +1 -5
  169. package/typography/Hint/index.mdx +1 -5
  170. package/typography/NormalText/index.mdx +3 -15
  171. package/typography/Paragraph/index.mdx +3 -15
@@ -11,19 +11,11 @@ import TextInput from '@digigov/ui/core/TextInput';
11
11
 
12
12
  ## How to use
13
13
 
14
- <Story
15
- packageName="@digigov/ui"
16
- component="core/TextInput"
17
- story="Default.tsx"
18
- />
14
+ <Story packageName="@digigov/ui" component="core/TextInput" story="Default.tsx" />
19
15
 
20
16
  ### If you’re asking more than one question on the page
21
17
 
22
- <Story
23
- packageName="@digigov/ui"
24
- component="core/TextInput"
25
- story="MultipleQuestions.tsx"
26
- />
18
+ <Story packageName="@digigov/ui" component="core/TextInput" story="MultipleQuestions.tsx" />
27
19
 
28
20
  ### Fixed width inputs
29
21
 
@@ -33,31 +25,19 @@ The widths are designed for specific character lengths and to be consistent acro
33
25
 
34
26
  On fixed width inputs, the width will remain fixed on all screens unless it is wider than the viewport, in which case it will shrink to fit.
35
27
 
36
- <Story
37
- packageName="@digigov/ui"
38
- component="core/TextInput"
39
- story="FixedWidths.tsx"
40
- />
28
+ <Story packageName="@digigov/ui" component="core/TextInput" story="FixedWidths.tsx" />
41
29
 
42
30
  ### Fluid width inputs
43
31
 
44
32
  Fluid width inputs will resize with the viewport.
45
33
 
46
- <Story
47
- packageName="@digigov/ui"
48
- component="core/TextInput"
49
- story="FluidWidths.tsx"
50
- />
34
+ <Story packageName="@digigov/ui" component="core/TextInput" story="FluidWidths.tsx" />
51
35
 
52
36
  ### Hint text
53
37
 
54
38
  Use hint text for help that’s relevant to the majority of users, like how their information will be used, or where to find it.
55
39
 
56
- <Story
57
- packageName="@digigov/ui"
58
- component="core/TextInput"
59
- story="WithHint.tsx"
60
- />
40
+ <Story packageName="@digigov/ui" component="core/TextInput" story="WithHint.tsx" />
61
41
 
62
42
  ## Numbers
63
43
 
@@ -73,11 +53,7 @@ Use hint text for help that’s relevant to the majority of users, like how thei
73
53
 
74
54
  Error messages should be styled like this:
75
55
 
76
- <Story
77
- packageName="@digigov/ui"
78
- component="core/TextInput"
79
- story="WithErrorMessage.tsx"
80
- />
56
+ <Story packageName="@digigov/ui" component="core/TextInput" story="WithErrorMessage.tsx" />
81
57
 
82
58
  ### Disabled input
83
59
 
package/es/core/index.js CHANGED
@@ -26,6 +26,7 @@ export * from '@digigov/ui/core/PhaseBanner';
26
26
  export * from '@digigov/ui/core/RadioContainer';
27
27
  export * from '@digigov/ui/core/SectionBreak';
28
28
  export * from '@digigov/ui/core/SelectContainer';
29
+ export * from '@digigov/ui/core/SingleCharacterInputContainer';
29
30
  export * from '@digigov/ui/core/SummaryList';
30
31
  export * from '@digigov/ui/core/ServiceBadge';
31
32
  export * from '@digigov/ui/core/Table';
@@ -9,11 +9,7 @@ import HeadingCaption from '@digigov/ui/typography/HeadingCaption';
9
9
 
10
10
  ## How to use
11
11
 
12
- <Story
13
- packageName="@digigov/ui"
14
- component="typography/HeadingCaption"
15
- story="Default.tsx"
16
- />
12
+ <Story packageName="@digigov/ui" component="typography/HeadingCaption" story="Default.tsx" />
17
13
 
18
14
  ### Nested caption to title
19
15
 
@@ -9,11 +9,7 @@ import Hint from '@digigov/ui/typography/Hint';
9
9
 
10
10
  ## How to use
11
11
 
12
- <Story
13
- packageName="@digigov/ui"
14
- component="typography/Hint"
15
- story="Default.tsx"
16
- />
12
+ <Story packageName="@digigov/ui" component="typography/Hint" story="Default.tsx" />
17
13
 
18
14
  ### Font sizes
19
15
 
@@ -9,29 +9,17 @@ import NormalText from '@digigov/ui/typography/NormalText';
9
9
 
10
10
  ## How to use
11
11
 
12
- <Story
13
- packageName="@digigov/ui"
14
- component="typography/NormalText"
15
- story="Default.tsx"
16
- />
12
+ <Story packageName="@digigov/ui" component="typography/NormalText" story="Default.tsx" />
17
13
 
18
14
  ### Variants
19
15
 
20
- <Story
21
- packageName="@digigov/ui"
22
- component="typography/NormalText"
23
- story="Variants.tsx"
24
- />
16
+ <Story packageName="@digigov/ui" component="typography/NormalText" story="Variants.tsx" />
25
17
 
26
18
  ## Font override classes
27
19
 
28
20
  ### Font size
29
21
 
30
- <Story
31
- packageName="@digigov/ui"
32
- component="typography/NormalText"
33
- story="FontSizes.tsx"
34
- />
22
+ <Story packageName="@digigov/ui" component="typography/NormalText" story="FontSizes.tsx" />
35
23
 
36
24
  ### Font weight
37
25
 
@@ -17,29 +17,17 @@ import Paragraph from '@digigov/ui/typography/Paragraph';
17
17
 
18
18
  ### Lead paragraph
19
19
 
20
- <Story
21
- packageName="@digigov/ui"
22
- component="typography/Paragraph"
23
- story="LeadVariant.tsx"
24
- />
20
+ <Story packageName="@digigov/ui" component="typography/Paragraph" story="LeadVariant.tsx" />
25
21
 
26
22
  ### Small paragraph
27
23
 
28
- <Story
29
- packageName="@digigov/ui"
30
- component="typography/Paragraph"
31
- story="SmallVariant.tsx"
32
- />
24
+ <Story packageName="@digigov/ui" component="typography/Paragraph" story="SmallVariant.tsx" />
33
25
 
34
26
  ## Font override classes
35
27
 
36
28
  ### Font size
37
29
 
38
- <Story
39
- packageName="@digigov/ui"
40
- component="typography/Paragraph"
41
- story="FontSizes.tsx"
42
- />
30
+ <Story packageName="@digigov/ui" component="typography/Paragraph" story="FontSizes.tsx" />
43
31
 
44
32
  ### Font weight
45
33
 
@@ -16,51 +16,29 @@ import AutoComplete from '@digigov/ui/admin/AutoComplete';
16
16
 
17
17
  ### AutoComplete
18
18
 
19
- <Story
20
- packageName="@digigov/ui"
21
- component="admin/AutoComplete"
22
- story="Default.tsx"
23
- />
19
+ <Story packageName="@digigov/ui"
20
+ component="admin/AutoComplete"
21
+ story="Default.tsx" />
24
22
 
25
23
  ### AutoComplete with auto select
26
24
 
27
- <Story
28
- packageName="@digigov/ui"
29
- component="admin/AutoComplete"
30
- story="WithAutoSelect.tsx"
31
- />
25
+ <Story packageName="@digigov/ui" component="admin/AutoComplete" story="WithAutoSelect.tsx" />
32
26
 
33
27
  ### AutoComplete with inline style
34
28
 
35
- <Story
36
- packageName="@digigov/ui"
37
- component="admin/AutoComplete"
38
- story="WithInLine.tsx"
39
- />
29
+ <Story packageName="@digigov/ui" component="admin/AutoComplete" story="WithInLine.tsx" />
40
30
 
41
31
  ### AutoComplete with default value
42
32
 
43
- <Story
44
- packageName="@digigov/ui"
45
- component="admin/AutoComplete"
46
- story="WithDefaultValue.tsx"
47
- />
33
+ <Story packageName="@digigov/ui" component="admin/AutoComplete" story="WithDefaultValue.tsx" />
48
34
 
49
35
  ### AutoComplete with placeholder
50
36
 
51
- <Story
52
- packageName="@digigov/ui"
53
- component="admin/AutoComplete"
54
- story="WithPlaceHolder.tsx"
55
- />
37
+ <Story packageName="@digigov/ui" component="admin/AutoComplete" story="WithPlaceHolder.tsx" />
56
38
 
57
39
  ### AutoComplete with all option's values
58
40
 
59
- <Story
60
- packageName="@digigov/ui"
61
- component="admin/AutoComplete"
62
- story="WithShowAllValues.tsx"
63
- />
41
+ <Story packageName="@digigov/ui" component="admin/AutoComplete" story="WithShowAllValues.tsx" />
64
42
 
65
43
  ### AutoComplete with min length
66
44
 
@@ -11,11 +11,7 @@ import CopyToClipboard from '@digigov/ui/admin/CopyToClipboard';
11
11
 
12
12
  ### Default
13
13
 
14
- <Story
15
- packageName="@digigov/ui"
16
- component="admin/CopyToClipboard"
17
- story="Default.tsx"
18
- />
14
+ <Story packageName="@digigov/ui" component="admin/CopyToClipboard" story="Default.tsx" />
19
15
 
20
16
  ### Banner
21
17
 
@@ -0,0 +1,53 @@
1
+ {
2
+ "version": "4",
3
+ "stories": {
4
+ "digigov-ui-admin-dropdown--align-right": {
5
+ "actionSets": [
6
+ {
7
+ "actions": [
8
+ {
9
+ "name": "click",
10
+ "args": {
11
+ "selector": "html>body>div:nth-child(5)>div>details>summary"
12
+ }
13
+ }
14
+ ],
15
+ "id": "lWuaZaRFFDje",
16
+ "title": "Align right action"
17
+ }
18
+ ]
19
+ },
20
+ "digigov-ui-admin-dropdown--default": {
21
+ "actionSets": [
22
+ {
23
+ "actions": [
24
+ {
25
+ "name": "click",
26
+ "args": {
27
+ "selector": "html>body>div:nth-child(5)>details>summary"
28
+ }
29
+ }
30
+ ],
31
+ "id": "jCwDDNP3O4e8",
32
+ "title": "Open dropdown action"
33
+ }
34
+ ]
35
+ },
36
+ "digigov-ui-admin-dropdown--placement-top": {
37
+ "actionSets": [
38
+ {
39
+ "actions": [
40
+ {
41
+ "name": "click",
42
+ "args": {
43
+ "selector": "html>body>div:nth-child(5)>div>details>summary"
44
+ }
45
+ }
46
+ ],
47
+ "id": "w6MaGKfzgKOG",
48
+ "title": "Placement top action"
49
+ }
50
+ ]
51
+ }
52
+ }
53
+ }
@@ -10,8 +10,7 @@ import { NavVerticalItem } from '@digigov/ui/core/NavList/NavVerticalItem';
10
10
  import { Button } from '@digigov/ui/core/Button';
11
11
 
12
12
  var _ref = /*#__PURE__*/React.createElement(Dropdown, {
13
- align: "right",
14
- open: true
13
+ align: "right"
15
14
  }, /*#__PURE__*/React.createElement(DropdownButton, {
16
15
  role: "button",
17
16
  "aria-haspopup": "true",
@@ -9,9 +9,7 @@ import { TextInput } from '@digigov/ui/core/TextInput';
9
9
  import { NavVerticalItem } from '@digigov/ui/core/NavList/NavVerticalItem';
10
10
  import { Button } from '@digigov/ui/core/Button';
11
11
 
12
- var _ref = /*#__PURE__*/React.createElement(Dropdown, {
13
- open: true
14
- }, /*#__PURE__*/React.createElement(DropdownButton, {
12
+ var _ref = /*#__PURE__*/React.createElement(Dropdown, null, /*#__PURE__*/React.createElement(DropdownButton, {
15
13
  role: "button",
16
14
  "aria-haspopup": "true",
17
15
  "aria-controls": "menu2",
@@ -10,8 +10,7 @@ import { NavVerticalItem } from '@digigov/ui/core/NavList/NavVerticalItem';
10
10
  import { Button } from '@digigov/ui/core/Button';
11
11
 
12
12
  var _ref = /*#__PURE__*/React.createElement(Dropdown, {
13
- placement: "top",
14
- open: true
13
+ placement: "top"
15
14
  }, /*#__PURE__*/React.createElement(DropdownButton, {
16
15
  role: "button",
17
16
  "aria-haspopup": "true",
@@ -11,31 +11,19 @@ import Dropdown from '@digigov/ui/admin/Dropdown';
11
11
 
12
12
  ## How to use
13
13
 
14
- <Story
15
- packageName="@digigov/ui"
16
- component="admin/Dropdown"
17
- story="Default.tsx"
18
- />
14
+ <Story packageName="@digigov/ui" component="admin/Dropdown" story="Default.tsx" />
19
15
 
20
16
  ### Dropdown with align right
21
17
 
22
18
  You can display the dropdown menu to the right side of the `Dropdown` button.
23
19
 
24
- <Story
25
- packageName="@digigov/ui"
26
- component="admin/Dropdown"
27
- story="AlignRight.tsx"
28
- />
20
+ <Story packageName="@digigov/ui" component="admin/Dropdown" story="AlignRight.tsx" />
29
21
 
30
22
  ### Dropdown with placement top
31
23
 
32
24
  You can display the dropdown menu to the top of the `Dropdown` button.
33
25
 
34
- <Story
35
- packageName="@digigov/ui"
36
- component="admin/Dropdown"
37
- story="PlacementTop.tsx"
38
- />
26
+ <Story packageName="@digigov/ui" component="admin/Dropdown" story="PlacementTop.tsx" />
39
27
 
40
28
  You can read more about the accessibility patterns used in our Dropdown
41
29
  implementation in the ARIA Authoring Practices Guide (APG) at
@@ -0,0 +1,37 @@
1
+ {
2
+ "version": "4",
3
+ "stories": {
4
+ "digigov-ui-admin-modal--alert-dialog": {
5
+ "actionSets": [
6
+ {
7
+ "actions": [
8
+ {
9
+ "name": "click",
10
+ "args": {
11
+ "selector": "html>body>div:nth-child(5)>div>button"
12
+ }
13
+ }
14
+ ],
15
+ "id": "Dk4oIFwRzm6e",
16
+ "title": "Alert dialog action"
17
+ }
18
+ ]
19
+ },
20
+ "digigov-ui-admin-modal--default": {
21
+ "actionSets": [
22
+ {
23
+ "actions": [
24
+ {
25
+ "name": "click",
26
+ "args": {
27
+ "selector": "html>body>div:nth-child(5)>div>button"
28
+ }
29
+ }
30
+ ],
31
+ "id": "YyIZkcmdBlRP",
32
+ "title": "Open modal action"
33
+ }
34
+ ]
35
+ }
36
+ }
37
+ }
@@ -1,22 +1,39 @@
1
- import React from 'react';
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import React, { useState } from 'react';
2
3
  import { Modal, ModalHeading, ModalContent, ModalAction } from '@digigov/ui/admin/Modal';
3
4
  import { Button } from '@digigov/ui/core/Button';
4
5
  import { Paragraph } from '@digigov/ui/typography/Paragraph';
5
6
 
6
- var _ref = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Modal, {
7
- open: true,
8
- role: "alertdialog",
9
- "aria-labelledby": "modal-label",
10
- "aria-describedby": "modal-content"
11
- }, /*#__PURE__*/React.createElement(ModalHeading, {
7
+ var _ref = /*#__PURE__*/React.createElement(ModalHeading, {
12
8
  id: "modal-label"
13
- }, "\u0395\u03C0\u03B9\u03B2\u03B5\u03B2\u03B1\u03AF\u03C9\u03C3\u03B7"), /*#__PURE__*/React.createElement(ModalContent, {
9
+ }, "\u0395\u03C0\u03B9\u03B2\u03B5\u03B2\u03B1\u03AF\u03C9\u03C3\u03B7");
10
+
11
+ var _ref2 = /*#__PURE__*/React.createElement(ModalContent, {
14
12
  id: "modal-content"
15
- }, /*#__PURE__*/React.createElement(Paragraph, null, "\u0395\u03AF\u03C3\u03C4\u03B5 \u03C3\u03AF\u03B3\u03BF\u03C5\u03C1\u03BF\u03B9 \u03CC\u03C4\u03B9 \u03B8\u03AD\u03BB\u03B5\u03C4\u03B5 \u03BD\u03B1 \u03B4\u03B9\u03B1\u03B3\u03C1\u03AC\u03C8\u03B5\u03C4\u03B5 \u03C4\u03B7\u03BD \u03B5\u03B3\u03B3\u03C1\u03B1\u03C6\u03AE;")), /*#__PURE__*/React.createElement(ModalAction, null, /*#__PURE__*/React.createElement(Button, null, "\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE"), /*#__PURE__*/React.createElement(Button, {
16
- variant: "link"
17
- }, "\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7"))));
13
+ }, /*#__PURE__*/React.createElement(Paragraph, null, "\u0395\u03AF\u03C3\u03C4\u03B5 \u03C3\u03AF\u03B3\u03BF\u03C5\u03C1\u03BF\u03B9 \u03CC\u03C4\u03B9 \u03B8\u03AD\u03BB\u03B5\u03C4\u03B5 \u03BD\u03B1 \u03B4\u03B9\u03B1\u03B3\u03C1\u03AC\u03C8\u03B5\u03C4\u03B5 \u03C4\u03B7\u03BD \u03B5\u03B3\u03B3\u03C1\u03B1\u03C6\u03AE;"));
14
+
15
+ var _ref3 = /*#__PURE__*/React.createElement(Button, null, "\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE");
18
16
 
19
17
  export var AlertDialog = function AlertDialog() {
20
- return _ref;
18
+ var _useState = useState(false),
19
+ _useState2 = _slicedToArray(_useState, 2),
20
+ open = _useState2[0],
21
+ setOpen = _useState2[1];
22
+
23
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
24
+ onClick: function onClick() {
25
+ setOpen(!open);
26
+ }
27
+ }, "\u0386\u03BD\u03BF\u03B9\u03BE\u03B5 Modal"), /*#__PURE__*/React.createElement(Modal, {
28
+ open: open,
29
+ role: "alertdialog",
30
+ "aria-labelledby": "modal-label",
31
+ "aria-describedby": "modal-content"
32
+ }, _ref, _ref2, /*#__PURE__*/React.createElement(ModalAction, null, _ref3, /*#__PURE__*/React.createElement(Button, {
33
+ variant: "link",
34
+ onClick: function onClick() {
35
+ setOpen(!open);
36
+ }
37
+ }, "\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7"))));
21
38
  };
22
39
  export default AlertDialog;
@@ -1,23 +1,40 @@
1
- import React from 'react';
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import React, { useState } from 'react';
2
3
  import { Modal, ModalHeading, ModalContent, ModalAction } from '@digigov/ui/admin/Modal';
3
4
  import { Button } from '@digigov/ui/core/Button';
4
5
  import { TextInput } from '@digigov/ui/core/TextInput';
5
6
  import { FieldContainer } from '@digigov/ui/core/FieldContainer';
6
7
  import { LabelContainer } from '@digigov/ui/core/LabelContainer';
7
8
 
8
- var _ref = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Modal, {
9
- open: true,
10
- "aria-labelledby": "modal-label"
11
- }, /*#__PURE__*/React.createElement(ModalHeading, {
9
+ var _ref = /*#__PURE__*/React.createElement(ModalHeading, {
12
10
  id: "modal-label"
13
- }, "\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C4\u03B7\u03BB\u03B5\u03C6\u03CE\u03BD\u03BF\u03C5"), /*#__PURE__*/React.createElement(ModalContent, null, /*#__PURE__*/React.createElement(FieldContainer, null, /*#__PURE__*/React.createElement(LabelContainer, null, "\u03A3\u03C5\u03BC\u03C0\u03BB\u03B7\u03C1\u03CE\u03C3\u03C4\u03B5 \u03C4\u03BF \u03C4\u03B7\u03BB\u03AD\u03C6\u03C9\u03BD\u03BF \u03B5\u03C0\u03B9\u03BA\u03BF\u03B9\u03BD\u03C9\u03BD\u03AF\u03B1\u03C2", /*#__PURE__*/React.createElement(TextInput, {
11
+ }, "\u03A0\u03C1\u03BF\u03C3\u03B8\u03AE\u03BA\u03B7 \u03C4\u03B7\u03BB\u03B5\u03C6\u03CE\u03BD\u03BF\u03C5");
12
+
13
+ var _ref2 = /*#__PURE__*/React.createElement(ModalContent, null, /*#__PURE__*/React.createElement(FieldContainer, null, /*#__PURE__*/React.createElement(LabelContainer, null, "\u03A3\u03C5\u03BC\u03C0\u03BB\u03B7\u03C1\u03CE\u03C3\u03C4\u03B5 \u03C4\u03BF \u03C4\u03B7\u03BB\u03AD\u03C6\u03C9\u03BD\u03BF \u03B5\u03C0\u03B9\u03BA\u03BF\u03B9\u03BD\u03C9\u03BD\u03AF\u03B1\u03C2", /*#__PURE__*/React.createElement(TextInput, {
14
14
  name: "inputext",
15
15
  characterWidth: 10
16
- })))), /*#__PURE__*/React.createElement(ModalAction, null, /*#__PURE__*/React.createElement(Button, null, "\u03A5\u03C0\u03BF\u03B2\u03BF\u03BB\u03AE"), /*#__PURE__*/React.createElement(Button, {
17
- variant: "link"
18
- }, "\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7"))));
16
+ }))));
17
+
18
+ var _ref3 = /*#__PURE__*/React.createElement(Button, null, "\u03A5\u03C0\u03BF\u03B2\u03BF\u03BB\u03AE");
19
19
 
20
20
  export var Default = function Default() {
21
- return _ref;
21
+ var _useState = useState(false),
22
+ _useState2 = _slicedToArray(_useState, 2),
23
+ open = _useState2[0],
24
+ setOpen = _useState2[1];
25
+
26
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
27
+ onClick: function onClick() {
28
+ setOpen(!open);
29
+ }
30
+ }, "\u0386\u03BD\u03BF\u03B9\u03BE\u03B5 Modal"), /*#__PURE__*/React.createElement(Modal, {
31
+ open: open,
32
+ "aria-labelledby": "modal-label"
33
+ }, _ref, _ref2, /*#__PURE__*/React.createElement(ModalAction, null, _ref3, /*#__PURE__*/React.createElement(Button, {
34
+ variant: "link",
35
+ onClick: function onClick() {
36
+ setOpen(!open);
37
+ }
38
+ }, "\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7"))));
22
39
  };
23
40
  export default Default;
@@ -15,11 +15,7 @@ import Modal, {ModalHeading, ModalContent, ModalAction} from "@digigov/ui/admin/
15
15
 
16
16
  ### As an Alert Dialog
17
17
 
18
- <Story
19
- packageName="@digigov/ui"
20
- component="admin/Modal"
21
- story="AlertDialog.tsx"
22
- />
18
+ <Story packageName="@digigov/ui" component="admin/Modal" story="AlertDialog.tsx" />
23
19
 
24
20
  ## Accessibility
25
21
 
@@ -15,26 +15,15 @@ import Footer from '@digigov/ui/app/Footer';
15
15
 
16
16
  ### Footer with logos
17
17
 
18
- <Story
19
- packageName="@digigov/ui"
20
- component="app/Footer"
21
- story="FooterWithLogo.tsx"
22
- />
18
+ <Story packageName="@digigov/ui" component="app/Footer" story="FooterWithLogo.tsx" />
23
19
 
24
20
  ### Footer with secondary navigation
25
21
 
26
- <Story
27
- packageName="@digigov/ui"
28
- component="app/Footer"
29
- story="FooterWithSecondaryNavigation.tsx"
30
- />
22
+ <Story packageName="@digigov/ui" component="app/Footer" story="FooterWithSecondaryNavigation.tsx" />
31
23
 
32
24
  ### Footer with links to meta information
33
25
 
34
- <Story
35
- packageName="@digigov/ui"
36
- component="app/Footer"
37
- story="FooterWithLink.tsx"
26
+ <Story packageName="@digigov/ui" component="app/Footer" story="FooterWithLink.tsx"
38
27
  />
39
28
 
40
29
  ### All inclusive footer
@@ -11,28 +11,15 @@ import Header from '@digigov/ui/app/Header';
11
11
 
12
12
  ### Default header
13
13
 
14
- <Story
15
- title="### Default"
16
- packageName="@digigov/ui"
17
- component="app/Header"
18
- story="Default.tsx"
19
- />
14
+ <Story title="### Default" packageName="@digigov/ui" component="app/Header" story="Default.tsx" />
20
15
 
21
16
  ### Header with service name
22
17
 
23
- <Story
24
- packageName="@digigov/ui"
25
- component="app/Header"
26
- story="WithServiceName.tsx"
27
- />
18
+ <Story packageName="@digigov/ui" component="app/Header" story="WithServiceName.tsx" />
28
19
 
29
20
  ### Header with service logo and service name
30
21
 
31
- <Story
32
- packageName="@digigov/ui"
33
- component="app/Header"
34
- story="WithServiceNameAndLogo.tsx"
35
- />
22
+ <Story packageName="@digigov/ui" component="app/Header" story="WithServiceNameAndLogo.tsx" />
36
23
 
37
24
  ### Default header with navigation
38
25
 
@@ -11,11 +11,7 @@ import QrCodeViewer from '@digigov/ui/app/QrCodeViewer';
11
11
 
12
12
  ### Default QrCodeViewer
13
13
 
14
- <Story
15
- packageName="@digigov/ui"
16
- component="app/QrCodeViewer"
17
- story="Default.tsx"
18
- />
14
+ <Story packageName="@digigov/ui" component="app/QrCodeViewer" story="Default.tsx" />
19
15
 
20
16
  ### Custom QrCodeViewer
21
17
 
@@ -15,21 +15,13 @@ import Accordion from '@digigov/ui/core/Accordion';
15
15
 
16
16
  ## How to use
17
17
 
18
- <Story
19
- packageName="@digigov/ui"
20
- component="core/Accordion"
21
- story="Default.tsx"
22
- />
18
+ <Story packageName="@digigov/ui" component="core/Accordion" story="Default.tsx" />
23
19
 
24
20
  ### Accordion with Hints
25
21
 
26
22
  Accordions hide content, so the labels need to be clear. If necessary, you can add a summary line to help users understand what is in the section.
27
23
 
28
- <Story
29
- packageName="@digigov/ui"
30
- component="core/Accordion"
31
- story="WithHints.tsx"
32
- />
24
+ <Story packageName="@digigov/ui" component="core/Accordion" story="WithHints.tsx" />
33
25
 
34
26
  ## Accessibility
35
27
 
@@ -10,4 +10,5 @@ var _ref = /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/Reac
10
10
 
11
11
  export var GroupingButtons = function GroupingButtons() {
12
12
  return _ref;
13
- };
13
+ };
14
+ export default GroupingButtons;
@@ -11,4 +11,5 @@ var _ref = /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/Reac
11
11
 
12
12
  export var GroupingButtonsAndLinks = function GroupingButtonsAndLinks() {
13
13
  return _ref;
14
- };
14
+ };
15
+ export default GroupingButtonsAndLinks;
@@ -8,4 +8,5 @@ var _ref = /*#__PURE__*/React.createElement(Button, {
8
8
 
9
9
  export var Warning = function Warning() {
10
10
  return _ref;
11
- };
11
+ };
12
+ export default Warning;