@digigov/ui 0.32.0 → 0.32.2

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 (181) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/admin/AccessibilityMenu/index.d.ts +6 -0
  3. package/admin/AccessibilityMenu/index.js +85 -30
  4. package/admin/AutoComplete/index.mdx +8 -30
  5. package/admin/CopyToClipboard/index.mdx +1 -5
  6. package/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
  7. package/admin/Dropdown/__stories__/AlignRight.js +1 -2
  8. package/admin/Dropdown/__stories__/Default.js +1 -3
  9. package/admin/Dropdown/__stories__/PlacementTop.js +1 -2
  10. package/admin/Dropdown/index.mdx +3 -15
  11. package/admin/Modal/Modal.stories.playwright.json +37 -0
  12. package/admin/Modal/__stories__/AlertDialog.js +36 -12
  13. package/admin/Modal/__stories__/Default.js +34 -10
  14. package/admin/Modal/index.mdx +1 -5
  15. package/app/Footer/Footer.mdx +3 -14
  16. package/app/Header/index.mdx +3 -16
  17. package/app/QrCodeViewer/index.mdx +1 -5
  18. package/core/Accordion/index.d.ts +5 -1
  19. package/core/Accordion/index.js +46 -13
  20. package/core/Accordion/index.mdx +2 -10
  21. package/core/Button/__stories__/GroupingButtons.d.ts +1 -0
  22. package/core/Button/__stories__/GroupingButtons.js +4 -2
  23. package/core/Button/__stories__/GroupingButtonsAndLinks.d.ts +1 -0
  24. package/core/Button/__stories__/GroupingButtonsAndLinks.js +4 -2
  25. package/core/Button/__stories__/Warning.d.ts +1 -0
  26. package/core/Button/__stories__/Warning.js +4 -2
  27. package/core/Button/index.mdx +4 -20
  28. package/core/Card/card.mdx +7 -35
  29. package/core/Checkbox/checkbox.mdx +6 -30
  30. package/core/DateInputContainer/index.mdx +4 -20
  31. package/core/ErrorSummary/index.mdx +3 -15
  32. package/core/FileUpload/index.mdx +1 -5
  33. package/core/Link/link.mdx +4 -20
  34. package/core/List/index.mdx +1 -5
  35. package/core/NavList/index.mdx +1 -5
  36. package/core/NotificationBanner/index.mdx +1 -5
  37. package/core/PhaseBanner/index.mdx +1 -4
  38. package/core/RadioContainer/index.mdx +6 -30
  39. package/core/SelectContainer/index.mdx +3 -15
  40. package/core/SingleCharacterInputContainer/index.mdx +7 -10
  41. package/core/SummaryList/index.mdx +2 -10
  42. package/core/Table/index.mdx +6 -30
  43. package/core/TextArea/index.mdx +6 -30
  44. package/core/TextInput/index.mdx +6 -30
  45. package/core/index.d.ts +1 -0
  46. package/core/index.js +13 -0
  47. package/es/admin/AccessibilityMenu/index.js +49 -0
  48. package/es/admin/AutoComplete/index.mdx +8 -30
  49. package/es/admin/CopyToClipboard/index.mdx +1 -5
  50. package/es/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
  51. package/es/admin/Dropdown/__stories__/AlignRight.js +1 -2
  52. package/es/admin/Dropdown/__stories__/Default.js +1 -3
  53. package/es/admin/Dropdown/__stories__/PlacementTop.js +1 -2
  54. package/es/admin/Dropdown/index.mdx +3 -15
  55. package/es/admin/Modal/Modal.stories.playwright.json +37 -0
  56. package/es/admin/Modal/__stories__/AlertDialog.js +29 -12
  57. package/es/admin/Modal/__stories__/Default.js +27 -10
  58. package/es/admin/Modal/index.mdx +1 -5
  59. package/es/app/Footer/Footer.mdx +3 -14
  60. package/es/app/Header/index.mdx +3 -16
  61. package/es/app/QrCodeViewer/index.mdx +1 -5
  62. package/es/core/Accordion/index.js +40 -6
  63. package/es/core/Accordion/index.mdx +2 -10
  64. package/es/core/Button/__stories__/GroupingButtons.js +2 -1
  65. package/es/core/Button/__stories__/GroupingButtonsAndLinks.js +2 -1
  66. package/es/core/Button/__stories__/Warning.js +2 -1
  67. package/es/core/Button/index.mdx +4 -20
  68. package/es/core/Card/card.mdx +7 -35
  69. package/es/core/Checkbox/checkbox.mdx +6 -30
  70. package/es/core/DateInputContainer/index.mdx +4 -20
  71. package/es/core/ErrorSummary/index.mdx +3 -15
  72. package/es/core/FileUpload/index.mdx +1 -5
  73. package/es/core/Link/link.mdx +4 -20
  74. package/es/core/List/index.mdx +1 -5
  75. package/es/core/NavList/index.mdx +1 -5
  76. package/es/core/NotificationBanner/index.mdx +1 -5
  77. package/es/core/PhaseBanner/index.mdx +1 -4
  78. package/es/core/RadioContainer/index.mdx +6 -30
  79. package/es/core/SelectContainer/index.mdx +3 -15
  80. package/es/core/SingleCharacterInputContainer/index.mdx +7 -10
  81. package/es/core/SummaryList/index.mdx +2 -10
  82. package/es/core/Table/index.mdx +6 -30
  83. package/es/core/TextArea/index.mdx +6 -30
  84. package/es/core/TextInput/index.mdx +6 -30
  85. package/es/core/index.js +1 -0
  86. package/es/typography/HeadingCaption/index.mdx +1 -5
  87. package/es/typography/Hint/index.mdx +1 -5
  88. package/es/typography/NormalText/index.mdx +3 -15
  89. package/es/typography/Paragraph/index.mdx +3 -15
  90. package/esm/admin/AccessibilityMenu/index.js +49 -0
  91. package/esm/admin/AutoComplete/index.mdx +8 -30
  92. package/esm/admin/CopyToClipboard/index.mdx +1 -5
  93. package/esm/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
  94. package/esm/admin/Dropdown/__stories__/AlignRight.js +1 -2
  95. package/esm/admin/Dropdown/__stories__/Default.js +1 -3
  96. package/esm/admin/Dropdown/__stories__/PlacementTop.js +1 -2
  97. package/esm/admin/Dropdown/index.mdx +3 -15
  98. package/esm/admin/Modal/Modal.stories.playwright.json +37 -0
  99. package/esm/admin/Modal/__stories__/AlertDialog.js +29 -12
  100. package/esm/admin/Modal/__stories__/Default.js +27 -10
  101. package/esm/admin/Modal/index.mdx +1 -5
  102. package/esm/app/Footer/Footer.mdx +3 -14
  103. package/esm/app/Header/index.mdx +3 -16
  104. package/esm/app/QrCodeViewer/index.mdx +1 -5
  105. package/esm/core/Accordion/index.js +40 -6
  106. package/esm/core/Accordion/index.mdx +2 -10
  107. package/esm/core/Button/__stories__/GroupingButtons.js +2 -1
  108. package/esm/core/Button/__stories__/GroupingButtonsAndLinks.js +2 -1
  109. package/esm/core/Button/__stories__/Warning.js +2 -1
  110. package/esm/core/Button/index.mdx +4 -20
  111. package/esm/core/Card/card.mdx +7 -35
  112. package/esm/core/Checkbox/checkbox.mdx +6 -30
  113. package/esm/core/DateInputContainer/index.mdx +4 -20
  114. package/esm/core/ErrorSummary/index.mdx +3 -15
  115. package/esm/core/FileUpload/index.mdx +1 -5
  116. package/esm/core/Link/link.mdx +4 -20
  117. package/esm/core/List/index.mdx +1 -5
  118. package/esm/core/NavList/index.mdx +1 -5
  119. package/esm/core/NotificationBanner/index.mdx +1 -5
  120. package/esm/core/PhaseBanner/index.mdx +1 -4
  121. package/esm/core/RadioContainer/index.mdx +6 -30
  122. package/esm/core/SelectContainer/index.mdx +3 -15
  123. package/esm/core/SingleCharacterInputContainer/index.mdx +7 -10
  124. package/esm/core/SummaryList/index.mdx +2 -10
  125. package/esm/core/Table/index.mdx +6 -30
  126. package/esm/core/TextArea/index.mdx +6 -30
  127. package/esm/core/TextInput/index.mdx +6 -30
  128. package/esm/core/index.js +1 -0
  129. package/esm/index.js +1 -1
  130. package/esm/typography/HeadingCaption/index.mdx +1 -5
  131. package/esm/typography/Hint/index.mdx +1 -5
  132. package/esm/typography/NormalText/index.mdx +3 -15
  133. package/esm/typography/Paragraph/index.mdx +3 -15
  134. package/package.json +3 -3
  135. package/src/admin/AccessibilityMenu/index.tsx +52 -0
  136. package/src/admin/AutoComplete/index.mdx +8 -30
  137. package/src/admin/CopyToClipboard/index.mdx +1 -5
  138. package/src/admin/Dropdown/Dropdown.stories.playwright.json +53 -0
  139. package/src/admin/Dropdown/__stories__/AlignRight.tsx +1 -1
  140. package/src/admin/Dropdown/__stories__/Default.tsx +1 -1
  141. package/src/admin/Dropdown/__stories__/PlacementTop.tsx +1 -1
  142. package/src/admin/Dropdown/index.mdx +3 -15
  143. package/src/admin/Modal/Modal.stories.playwright.json +37 -0
  144. package/src/admin/Modal/__stories__/AlertDialog.tsx +18 -3
  145. package/src/admin/Modal/__stories__/Default.tsx +18 -3
  146. package/src/admin/Modal/index.mdx +1 -5
  147. package/src/app/Footer/Footer.mdx +3 -14
  148. package/src/app/Header/index.mdx +3 -16
  149. package/src/app/QrCodeViewer/index.mdx +1 -5
  150. package/src/core/Accordion/index.mdx +2 -10
  151. package/src/core/Accordion/index.tsx +38 -4
  152. package/src/core/Button/__stories__/GroupingButtons.tsx +1 -0
  153. package/src/core/Button/__stories__/GroupingButtonsAndLinks.tsx +1 -0
  154. package/src/core/Button/__stories__/Warning.tsx +1 -0
  155. package/src/core/Button/index.mdx +4 -20
  156. package/src/core/Card/card.mdx +7 -35
  157. package/src/core/Checkbox/checkbox.mdx +6 -30
  158. package/src/core/DateInputContainer/index.mdx +4 -20
  159. package/src/core/ErrorSummary/index.mdx +3 -15
  160. package/src/core/FileUpload/index.mdx +1 -5
  161. package/src/core/Link/link.mdx +4 -20
  162. package/src/core/List/index.mdx +1 -5
  163. package/src/core/NavList/index.mdx +1 -5
  164. package/src/core/NotificationBanner/index.mdx +1 -5
  165. package/src/core/PhaseBanner/index.mdx +1 -4
  166. package/src/core/RadioContainer/index.mdx +6 -30
  167. package/src/core/SelectContainer/index.mdx +3 -15
  168. package/src/core/SingleCharacterInputContainer/index.mdx +7 -10
  169. package/src/core/SummaryList/index.mdx +2 -10
  170. package/src/core/Table/index.mdx +6 -30
  171. package/src/core/TextArea/index.mdx +6 -30
  172. package/src/core/TextInput/index.mdx +6 -30
  173. package/src/core/index.ts +1 -0
  174. package/src/typography/HeadingCaption/index.mdx +1 -5
  175. package/src/typography/Hint/index.mdx +1 -5
  176. package/src/typography/NormalText/index.mdx +3 -15
  177. package/src/typography/Paragraph/index.mdx +3 -15
  178. package/typography/HeadingCaption/index.mdx +1 -5
  179. package/typography/Hint/index.mdx +1 -5
  180. package/typography/NormalText/index.mdx +3 -15
  181. package/typography/Paragraph/index.mdx +3 -15
@@ -11,57 +11,33 @@ import Checkbox from '@digigov/ui/core/Checkbox';
11
11
 
12
12
  ## How to use
13
13
 
14
- <Story
15
- packageName="@digigov/ui"
16
- component="core/Checkbox"
17
- story="Default.tsx"
18
- />
14
+ <Story packageName="@digigov/ui" component="core/Checkbox" 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/Checkbox"
25
- story="MultipleQuestions.tsx"
26
- />
18
+ <Story packageName="@digigov/ui" component="core/Checkbox" story="MultipleQuestions.tsx" />
27
19
 
28
20
  ### Checkbox items with hints
29
21
 
30
22
  You can add hints to checkbox items to provide additional information about the options.
31
23
 
32
- <Story
33
- packageName="@digigov/ui"
34
- component="core/Checkbox"
35
- story="WithHint.tsx"
36
- />
24
+ <Story packageName="@digigov/ui" component="core/Checkbox" story="WithHint.tsx" />
37
25
 
38
26
  ### Add an option for ‘none’
39
27
 
40
28
  When ‘none’ would be a valid answer, give users the option to check a box to say none of the other options apply to them — without this option, users would have to leave all of the boxes unchecked. Giving users this option also makes sure they do not skip the question by accident.
41
29
 
42
- <Story
43
- packageName="@digigov/ui"
44
- component="core/Checkbox"
45
- story="NoneAnswer.tsx"
46
- />
30
+ <Story packageName="@digigov/ui" component="core/Checkbox" story="NoneAnswer.tsx" />
47
31
 
48
32
  If JavaScript is unavailable, and a user selects both the ‘none’ checkbox and another checkbox, display an error message.
49
33
 
50
- <Story
51
- packageName="@digigov/ui"
52
- component="core/Checkbox"
53
- story="NoneAnswerWithError.tsx"
54
- />
34
+ <Story packageName="@digigov/ui" component="core/Checkbox" story="NoneAnswerWithError.tsx" />
55
35
 
56
36
  ### Error messages
57
37
 
58
38
  Error messages should be styled like this:
59
39
 
60
- <Story
61
- packageName="@digigov/ui"
62
- component="core/Checkbox"
63
- story="WithErrorMessage.tsx"
64
- />
40
+ <Story packageName="@digigov/ui" component="core/Checkbox" story="WithErrorMessage.tsx" />
65
41
 
66
42
  ## Conditionally revealing a related question
67
43
 
@@ -11,34 +11,18 @@ import DateInputContainer from '@digigov/ui/core/DateInputContainer';
11
11
 
12
12
  ## How to use
13
13
 
14
- <Story
15
- packageName="@digigov/ui"
16
- component="core/DateInputContainer"
17
- story="Default.tsx"
18
- />
14
+ <Story packageName="@digigov/ui" component="core/DateInputContainer" 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/DateInputContainer"
25
- story="MultipleQuestions.tsx"
26
- />
18
+ <Story packageName="@digigov/ui" component="core/DateInputContainer" story="MultipleQuestions.tsx" />
27
19
 
28
20
  ### Error message
29
21
 
30
22
  If you’re highlighting the whole date, style all the fields like this:
31
23
 
32
- <Story
33
- packageName="@digigov/ui"
34
- component="core/DateInputContainer"
35
- story="WithErrorMessage.tsx"
36
- />
24
+ <Story packageName="@digigov/ui" component="core/DateInputContainer" story="WithErrorMessage.tsx" />
37
25
 
38
26
  If you’re highlighting just one field - either the day, month or year - only style the field that has an error. The error message must say which field has an error, like this:
39
27
 
40
- <Story
41
- packageName="@digigov/ui"
42
- component="core/DateInputContainer"
43
- story="WithErrorMessageForSingleField.tsx"
44
- />
28
+ <Story packageName="@digigov/ui" component="core/DateInputContainer" story="WithErrorMessageForSingleField.tsx" />
@@ -15,11 +15,7 @@ import ErrorSummary from '@digigov/ui/core/ErrorSummary';
15
15
 
16
16
  ## How to use
17
17
 
18
- <Story
19
- packageName="@digigov/ui"
20
- component="core/ErrorSummary"
21
- story="Default.tsx"
22
- />
18
+ <Story packageName="@digigov/ui" component="core/ErrorSummary" story="Default.tsx" />
23
19
 
24
20
  ### Linking from the error summary to each answer
25
21
 
@@ -27,21 +23,13 @@ You must link the errors in the error summary to the answer they relate to.
27
23
 
28
24
  For questions that require a user to answer using a single field, like a file upload, select, textarea, text input or character count, link to the field.
29
25
 
30
- <Story
31
- packageName="@digigov/ui"
32
- component="core/ErrorSummary"
33
- story="LinkedToInput.tsx"
34
- />
26
+ <Story packageName="@digigov/ui" component="core/ErrorSummary" story="LinkedToInput.tsx" />
35
27
 
36
28
  When a user has to enter their answer into multiple fields, such as the day, month and year fields in the date input component, link to the first field that contains an error.
37
29
 
38
30
  If you do not know which field contains an error, link to the first field.
39
31
 
40
- <Story
41
- packageName="@digigov/ui"
42
- component="core/ErrorSummary"
43
- story="LinkedToField.tsx"
44
- />
32
+ <Story packageName="@digigov/ui" component="core/ErrorSummary" story="LinkedToField.tsx" />
45
33
 
46
34
  For questions that require a user to select one or more options from a list using radios or checkboxes, link to the first radio or checkbox.
47
35
 
@@ -11,11 +11,7 @@ import FileUpload from '@digigov/ui/core/FileUpload';
11
11
 
12
12
  ## How to use
13
13
 
14
- <Story
15
- packageName="@digigov/ui"
16
- component="core/FileUpload"
17
- story="Default.tsx"
18
- />
14
+ <Story packageName="@digigov/ui" component="core/FileUpload" story="Default.tsx" />
19
15
 
20
16
  ### Error message
21
17
 
@@ -15,35 +15,19 @@ import Link from '@digigov/ui/core/Link';
15
15
 
16
16
  ### No Underline
17
17
 
18
- <Story
19
- packageName="@digigov/ui"
20
- component="core/Link"
21
- story="NoUnderline.tsx"
22
- />
18
+ <Story packageName="@digigov/ui" component="core/Link" story="NoUnderline.tsx" />
23
19
 
24
20
  ### Opens in a new tab
25
21
 
26
- <Story
27
- packageName="@digigov/ui"
28
- component="core/Link"
29
- story="OpensInNewTab.tsx"
30
- />
22
+ <Story packageName="@digigov/ui" component="core/Link" story="OpensInNewTab.tsx" />
31
23
 
32
24
  ### At dark background
33
25
 
34
- <Story
35
- packageName="@digigov/ui"
36
- component="core/Link"
37
- story="DarkBackground.tsx"
38
- />
26
+ <Story packageName="@digigov/ui" component="core/Link" story="DarkBackground.tsx" />
39
27
 
40
28
  ### At dark background and no underline
41
29
 
42
- <Story
43
- packageName="@digigov/ui"
44
- component="core/Link"
45
- story="DarkBackgroundNoUnderline.tsx"
46
- />
30
+ <Story packageName="@digigov/ui" component="core/Link" story="DarkBackgroundNoUnderline.tsx" />
47
31
 
48
32
  You can read more about the accessibility patterns used in our Link
49
33
  implementation in the ARIA Authoring Practices Guide (APG) at
@@ -19,11 +19,7 @@ import List from '@digigov/ui/core/List';
19
19
 
20
20
  ### List with numbers
21
21
 
22
- <Story
23
- packageName="@digigov/ui"
24
- component="core/List"
25
- story="NumberedList.tsx"
26
- />
22
+ <Story packageName="@digigov/ui" component="core/List" story="NumberedList.tsx" />
27
23
 
28
24
  ### List with extra space
29
25
 
@@ -15,11 +15,7 @@ import NavList, { NavListItem } from '@digigov/ui/core/NavList';
15
15
 
16
16
  ### Horizontal NavList
17
17
 
18
- <Story
19
- packageName="@digigov/ui"
20
- component="core/NavList"
21
- story="NavHorizontalLayout.tsx"
22
- />
18
+ <Story packageName="@digigov/ui" component="core/NavList" story="NavVerticalLayout.tsx" />
23
19
 
24
20
  ## Accessibility
25
21
 
@@ -19,11 +19,7 @@ Use a ‘neutral’ blue notification banner if the user needs to know about a p
19
19
 
20
20
  Use a ‘neutral’ notification banner if the user needs to know about something that’s happening elsewhere in the service.
21
21
 
22
- <Story
23
- packageName="@digigov/ui"
24
- component="core/NotificationBanner"
25
- story="Default.tsx"
26
- />
22
+ <Story packageName="@digigov/ui" component="core/NotificationBanner" story="Default.tsx" />
27
23
 
28
24
  You can also use a notification banner to tell the user about the outcome of something they’ve just done - but they have not finished using the service, so it does not make sense to use a confirmation page.
29
25
 
@@ -15,10 +15,7 @@ import PhaseBanner from '@digigov/ui/core/PhaseBanner';
15
15
 
16
16
  Your banner must be directly under the blue GOV.GR header and colour bar.
17
17
 
18
- <Story
19
- packageName="@digigov/ui"
20
- component="core/PhaseBanner"
21
- story="Default.tsx"
18
+ <Story packageName="@digigov/ui" component="core/PhaseBanner" story="Default.tsx"
22
19
  />
23
20
 
24
21
  ### Underlined
@@ -11,48 +11,28 @@ import RadioContainer from '@digigov/ui/core/RadioContainer';
11
11
 
12
12
  ## How to use
13
13
 
14
- <Story
15
- packageName="@digigov/ui"
16
- component="core/RadioContainer"
17
- story="Default.tsx"
18
- />
14
+ <Story packageName="@digigov/ui" component="core/RadioContainer" 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/RadioContainer"
25
- story="MultipleQuestions.tsx"
26
- />
18
+ <Story packageName="@digigov/ui" component="core/RadioContainer" story="MultipleQuestions.tsx" />
27
19
 
28
20
  ### Inline radios
29
21
 
30
- <Story
31
- packageName="@digigov/ui"
32
- component="core/RadioContainer"
33
- story="Inline.tsx"
34
- />
22
+ <Story packageName="@digigov/ui" component="core/RadioContainer" story="Inline.tsx" />
35
23
 
36
24
  ### Checkbox items with hints
37
25
 
38
26
  You can add hints to checkbox items to provide additional information about the options.
39
27
 
40
- <Story
41
- packageName="@digigov/ui"
42
- component="core/RadioContainer"
43
- story="WithHints.tsx"
44
- />
28
+ <Story packageName="@digigov/ui" component="core/RadioContainer" story="WithHints.tsx" />
45
29
 
46
30
  ### RadioContainer items with a text divider
47
31
 
48
32
  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.
49
33
  The text is usually the word ‘or’.
50
34
 
51
- <Story
52
- packageName="@digigov/ui"
53
- component="core/RadioContainer"
54
- story="NoneAnswer.tsx"
55
- />
35
+ <Story packageName="@digigov/ui" component="core/RadioContainer" story="NoneAnswer.tsx" />
56
36
 
57
37
  ## Conditionally revealing a related question
58
38
 
@@ -60,11 +40,7 @@ You can ask the user a related question when they select a particular checkbox,
60
40
 
61
41
  This might make 2 related questions easier to answer by grouping them on the same page. For example, you could reveal a phone number input when the user selects the ‘Contact me by phone’ option.
62
42
 
63
- <Story
64
- packageName="@digigov/ui"
65
- component="core/RadioContainer"
66
- story="ConditionalReveal.tsx"
67
- />
43
+ <Story packageName="@digigov/ui" component="core/RadioContainer" story="ConditionalReveal.tsx" />
68
44
 
69
45
  ### Error messages
70
46
 
@@ -11,31 +11,19 @@ import SelectContainer from '@digigov/ui/core/SelectContainer';
11
11
 
12
12
  ## How to use
13
13
 
14
- <Story
15
- packageName="@digigov/ui"
16
- component="core/SelectContainer"
17
- story="Default.tsx"
18
- />
14
+ <Story packageName="@digigov/ui" component="core/SelectContainer" story="Default.tsx" />
19
15
 
20
16
  ### SelectContainer with hints
21
17
 
22
18
  You can add hints to select items to provide additional information about the options.
23
19
 
24
- <Story
25
- packageName="@digigov/ui"
26
- component="core/SelectContainer"
27
- story="WithHint.tsx"
28
- />
20
+ <Story packageName="@digigov/ui" component="core/SelectContainer" story="WithHint.tsx" />
29
21
 
30
22
  ### Disabled input
31
23
 
32
24
  Error messages should be styled like this:
33
25
 
34
- <Story
35
- packageName="@digigov/ui"
36
- component="core/SelectContainer"
37
- story="DisabledInput.tsx"
38
- />
26
+ <Story packageName="@digigov/ui" component="core/SelectContainer" story="DisabledInput.tsx" />
39
27
 
40
28
  You can read more about the accessibility patterns used in our SelectContainer
41
29
  implementation in the ARIA Authoring Practices Guide (APG) at
@@ -11,19 +11,16 @@ import SingleCharacterInputContainer from '@digigov/ui/core/SingleCharacterInput
11
11
 
12
12
  ## How to use
13
13
 
14
- <Story
15
- packageName="@digigov/ui"
16
- component="core/SingleCharacterInputContainer"
17
- story="Default.tsx"
18
- />
14
+ <Story packageName="@digigov/ui" component="core/SingleCharacterInputContainer" story="Default.tsx" />
19
15
 
20
16
 
21
17
  ### Error message
22
18
 
23
19
  If you’re highlighting the whole date, style all the fields like this:
24
20
 
25
- <Story
26
- packageName="@digigov/ui"
27
- component="core/SingleCharacterInputContainer"
28
- story="WithDefaultError.tsx"
29
- />
21
+ <Story packageName="@digigov/ui" component="core/SingleCharacterInputContainer" story="WithDefaultError.tsx" />
22
+
23
+ ## API
24
+
25
+ <PropTypes packageName="@digigov/ui" component="SingleCharacterInputContainer" />
26
+ <PropTypes packageName="@digigov/ui" component="SingleCharacterInputItem" />
@@ -13,11 +13,7 @@ import SummaryList from '@digigov/ui/core/SummaryList';
13
13
 
14
14
  ## How to use
15
15
 
16
- <Story
17
- packageName="@digigov/ui"
18
- component="core/SummaryList"
19
- story="Default.tsx"
20
- />
16
+ <Story packageName="@digigov/ui" component="core/SummaryList" story="Default.tsx" />
21
17
 
22
18
  ### Summary list with actions
23
19
 
@@ -25,11 +21,7 @@ Assistive technology users, like those who use a screen reader, may hear the lin
25
21
  To give more context, add visually hidden text to the links.
26
22
  This means a screen reader user will hear a meaningful action, like ‘Αλλαγή ονόματος’ or ‘Αλλαγή ημερομηνίας γέννησης’.
27
23
 
28
- <Story
29
- packageName="@digigov/ui"
30
- component="core/SummaryList"
31
- story="WithActions.tsx"
32
- />
24
+ <Story packageName="@digigov/ui" component="core/SummaryList" story="WithActions.tsx" />
33
25
 
34
26
  ### Summary list without borders
35
27
 
@@ -24,29 +24,17 @@ import {
24
24
 
25
25
  ### Table with dark header
26
26
 
27
- <Story
28
- packageName="@digigov/ui"
29
- component="core/Table"
30
- story="DarkVariant.tsx"
31
- />
27
+ <Story packageName="@digigov/ui" component="core/Table" story="DarkVariant.tsx" />
32
28
 
33
29
  ### Table captions
34
30
 
35
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.
36
32
 
37
- <Story
38
- packageName="@digigov/ui"
39
- component="core/Table"
40
- story="TableCaptions.tsx"
41
- />
33
+ <Story packageName="@digigov/ui" component="core/Table" story="TableCaptions.tsx" />
42
34
 
43
35
  ### Numbers in a table
44
36
 
45
- <Story
46
- packageName="@digigov/ui"
47
- component="core/Table"
48
- story="NumericDataType.tsx"
49
- />
37
+ <Story packageName="@digigov/ui" component="core/Table" story="NumericDataType.tsx" />
50
38
 
51
39
  ### Zebra rows
52
40
 
@@ -54,11 +42,7 @@ Use the `<TableCaption>` element to describe a table in the same way you would u
54
42
 
55
43
  ### Vertical lines
56
44
 
57
- <Story
58
- packageName="@digigov/ui"
59
- component="core/Table"
60
- story="VerticalBorders.tsx"
61
- />
45
+ <Story packageName="@digigov/ui" component="core/Table" story="VerticalBorders.tsx" />
62
46
 
63
47
  ### Dense tables
64
48
 
@@ -66,11 +50,7 @@ Use the `<TableCaption>` element to describe a table in the same way you would u
66
50
 
67
51
  ### Custom column widths
68
52
 
69
- <Story
70
- packageName="@digigov/ui"
71
- component="core/Table"
72
- story="DefinedWidth.tsx"
73
- />
53
+ <Story packageName="@digigov/ui" component="core/Table" story="DefinedWidth.tsx" />
74
54
 
75
55
  ### No data
76
56
 
@@ -78,11 +58,7 @@ Use the `<TableCaption>` element to describe a table in the same way you would u
78
58
 
79
59
  ### Using loader
80
60
 
81
- <Story
82
- packageName="@digigov/ui"
83
- component="core/Table"
84
- story="WithLoader.tsx"
85
- />
61
+ <Story packageName="@digigov/ui" component="core/Table" story="WithLoader.tsx" />
86
62
 
87
63
  ## Accessibility
88
64
 
@@ -11,57 +11,33 @@ import TextArea from '@digigov/ui/core/TextArea';
11
11
 
12
12
  ## How to use
13
13
 
14
- <Story
15
- packageName="@digigov/ui"
16
- component="core/TextArea"
17
- story="Default.tsx"
18
- />
14
+ <Story packageName="@digigov/ui" component="core/TextArea" story="Default.tsx" />
19
15
 
20
16
  ### Use appropriately-sized textareas
21
17
 
22
- <Story
23
- packageName="@digigov/ui"
24
- component="core/TextArea"
25
- story="WithDeclaredRows.tsx"
26
- />
18
+ <Story packageName="@digigov/ui" component="core/TextArea" story="WithDeclaredRows.tsx" />
27
19
 
28
20
  ### If you’re asking more than one question on the page
29
21
 
30
- <Story
31
- packageName="@digigov/ui"
32
- component="core/TextArea"
33
- story="MultipleQuestions.tsx"
34
- />
22
+ <Story packageName="@digigov/ui" component="core/TextArea" story="MultipleQuestions.tsx" />
35
23
 
36
24
  ### Limiting the number of characters
37
25
 
38
26
  If there’s a good reason to limit the number of characters users can enter, you can use the character count component.
39
27
 
40
- <Story
41
- packageName="@digigov/ui"
42
- component="core/TextArea"
43
- story="LimitedCharacters.tsx"
44
- />
28
+ <Story packageName="@digigov/ui" component="core/TextArea" story="LimitedCharacters.tsx" />
45
29
 
46
30
  ### Hint text
47
31
 
48
32
  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.
49
33
 
50
- <Story
51
- packageName="@digigov/ui"
52
- component="core/TextArea"
53
- story="WithHint.tsx"
54
- />
34
+ <Story packageName="@digigov/ui" component="core/TextArea" story="WithHint.tsx" />
55
35
 
56
36
  ### Error message
57
37
 
58
38
  Error messages should be styled like this:
59
39
 
60
- <Story
61
- packageName="@digigov/ui"
62
- component="core/TextArea"
63
- story="WithErrorMessage.tsx"
64
- />
40
+ <Story packageName="@digigov/ui" component="core/TextArea" story="WithErrorMessage.tsx" />
65
41
 
66
42
  ### Disabled input
67
43
 
@@ -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/esm/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';
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Digigov v0.32.0
1
+ /** @license Digigov v0.32.2
2
2
  *
3
3
  * This source code is licensed under the BSD-2-Clause license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -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