@digigov/ui 0.21.3 → 0.22.0

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 (383) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/admin/AutoComplete/AccesibleAutoComplete/index.d.ts +5 -0
  3. package/admin/AutoComplete/AccesibleAutoComplete/index.js +106 -0
  4. package/admin/AutoComplete/AutoComplete.stories.d.ts +13 -0
  5. package/admin/AutoComplete/AutoComplete.stories.js +115 -0
  6. package/admin/AutoComplete/Status/index.d.ts +40 -0
  7. package/admin/AutoComplete/Status/index.js +184 -0
  8. package/admin/AutoComplete/__stories__/Default.d.ts +3 -0
  9. package/admin/AutoComplete/__stories__/Default.js +34 -0
  10. package/admin/AutoComplete/__stories__/WithAutoSelect.d.ts +3 -0
  11. package/admin/AutoComplete/__stories__/WithAutoSelect.js +35 -0
  12. package/admin/AutoComplete/__stories__/WithDefaultValue.d.ts +3 -0
  13. package/admin/AutoComplete/__stories__/WithDefaultValue.js +33 -0
  14. package/admin/AutoComplete/__stories__/WithInLine.d.ts +3 -0
  15. package/admin/AutoComplete/__stories__/WithInLine.js +33 -0
  16. package/admin/AutoComplete/__stories__/WithMinLength.d.ts +3 -0
  17. package/admin/AutoComplete/__stories__/WithMinLength.js +35 -0
  18. package/admin/AutoComplete/__stories__/WithPlaceHolder.d.ts +3 -0
  19. package/admin/AutoComplete/__stories__/WithPlaceHolder.js +33 -0
  20. package/admin/AutoComplete/__stories__/WithShowAllValues.d.ts +3 -0
  21. package/admin/AutoComplete/__stories__/WithShowAllValues.js +33 -0
  22. package/admin/AutoComplete/index.d.ts +101 -0
  23. package/admin/AutoComplete/index.js +744 -0
  24. package/admin/AutoComplete/index.mdx +46 -0
  25. package/admin/AutoComplete/utils.d.ts +1 -0
  26. package/admin/AutoComplete/utils.js +13 -0
  27. package/admin/Drawer/__stories__/Default.js +1 -1
  28. package/admin/Drawer/index.mdx +12 -0
  29. package/admin/FilterSection/index.d.ts +1 -0
  30. package/admin/FilterSection/index.js +14 -0
  31. package/admin/Pagination/__stories__/Default.js +38 -14
  32. package/admin/Pagination/index.mdx +12 -0
  33. package/admin/index.d.ts +1 -0
  34. package/admin/index.js +13 -0
  35. package/app/Confirmation/Confirmation.mdx +9 -0
  36. package/app/CopyToClipboard/CopyToClipboard.stories.d.ts +2 -0
  37. package/app/CopyToClipboard/CopyToClipboard.stories.js +28 -0
  38. package/app/CopyToClipboard/__stories__/Banner.d.ts +3 -0
  39. package/app/CopyToClipboard/__stories__/Banner.js +30 -0
  40. package/app/CopyToClipboard/__stories__/Default.js +4 -114
  41. package/app/CopyToClipboard/__stories__/MultipleCopies.d.ts +3 -0
  42. package/app/CopyToClipboard/__stories__/MultipleCopies.js +142 -0
  43. package/app/CopyToClipboard/index.mdx +22 -0
  44. package/app/Footer/Footer.mdx +27 -0
  45. package/app/Header/index.mdx +18 -0
  46. package/app/I18nText.js +7 -7
  47. package/app/NotFound/index.mdx +12 -0
  48. package/app/PhaseBannerHeader/index.mdx +12 -0
  49. package/core/Accordion/index.mdx +13 -86
  50. package/core/BackLink/index.mdx +16 -0
  51. package/core/Blockquote/index.mdx +17 -2
  52. package/core/Breadcrumbs/__stories__/Default.js +9 -1
  53. package/core/Breadcrumbs/breadcrumbs.mdx +22 -0
  54. package/core/Button/Button.mdx +37 -2
  55. package/core/Button/Button.stories.d.ts +2 -0
  56. package/core/Button/Button.stories.js +28 -0
  57. package/core/Button/__stories__/CallToActionButton.d.ts +3 -0
  58. package/core/Button/__stories__/CallToActionButton.js +22 -0
  59. package/core/Button/__stories__/Disabled.d.ts +6 -0
  60. package/core/Button/__stories__/Disabled.js +27 -0
  61. package/core/Button/__stories__/Warning.d.ts +1 -0
  62. package/core/Button/__stories__/Warning.js +4 -2
  63. package/core/Card/Card.stories.d.ts +1 -0
  64. package/core/Card/Card.stories.js +14 -0
  65. package/core/Card/__stories__/WithClickableLink.js +1 -3
  66. package/core/Card/__stories__/WithGroupButton.d.ts +3 -0
  67. package/core/Card/__stories__/WithGroupButton.js +32 -0
  68. package/core/Card/card.mdx +78 -0
  69. package/core/Checkboxes/Checkbox.stories.d.ts +1 -0
  70. package/core/Checkboxes/Checkbox.stories.js +14 -0
  71. package/core/Checkboxes/__stories__/NoneAnswerWithError.d.ts +3 -0
  72. package/core/Checkboxes/__stories__/NoneAnswerWithError.js +51 -0
  73. package/core/Checkboxes/checkboxes.mdx +54 -0
  74. package/core/Confirmation/confirmation.mdx +19 -0
  75. package/core/DateInput/DateInput.stories.d.ts +1 -0
  76. package/core/DateInput/DateInput.stories.js +14 -0
  77. package/core/DateInput/__stories__/Default.js +3 -1
  78. package/core/DateInput/__stories__/MultipleQuestions.d.ts +3 -0
  79. package/core/DateInput/__stories__/MultipleQuestions.js +41 -0
  80. package/core/DateInput/index.mdx +34 -0
  81. package/core/Details/index.mdx +9 -25
  82. package/core/ErrorMessage/__stories__/Default.js +1 -1
  83. package/core/ErrorMessage/index.mdx +21 -0
  84. package/core/ErrorSummary/__stories__/LinkedToCheckbox.js +1 -1
  85. package/core/ErrorSummary/index.mdx +21 -38
  86. package/core/FileUpload/__stories__/Default.d.ts +1 -0
  87. package/core/FileUpload/__stories__/Default.js +4 -2
  88. package/core/FileUpload/index.mdx +22 -0
  89. package/core/Link/__stories__/DarkBackground.js +1 -1
  90. package/core/Link/__stories__/DarkBackgroundNoUnderline.js +1 -1
  91. package/core/Link/link.mdx +30 -0
  92. package/core/List/index.mdx +22 -3
  93. package/core/Masthead/masthead.mdx +14 -0
  94. package/core/NavList/NavList.d.ts +1 -14
  95. package/core/NavList/NavList.js +11 -70
  96. package/core/NavList/NavListBase.d.ts +4 -0
  97. package/core/NavList/NavListBase.js +74 -0
  98. package/core/NavList/NavListSubMenu.d.ts +1 -1
  99. package/core/NavList/NavListSubMenu.js +2 -2
  100. package/core/NavList/types.d.ts +13 -0
  101. package/core/NavList/types.js +5 -0
  102. package/core/NotificationBanner/index.mdx +13 -60
  103. package/core/PhaseBanner/PhaseBanner.stories.d.ts +1 -0
  104. package/core/PhaseBanner/PhaseBanner.stories.js +14 -0
  105. package/core/PhaseBanner/__stories__/Underlined.d.ts +3 -0
  106. package/core/PhaseBanner/__stories__/Underlined.js +34 -0
  107. package/core/PhaseBanner/index.mdx +24 -0
  108. package/core/Radios/__stories__/Default.js +1 -3
  109. package/core/Radios/__stories__/MultipleQuestions.js +1 -1
  110. package/core/Radios/index.mdx +56 -0
  111. package/core/Select/Select.stories.d.ts +1 -0
  112. package/core/Select/Select.stories.js +14 -0
  113. package/core/Select/__stories__/WithHint.d.ts +3 -0
  114. package/core/Select/__stories__/WithHint.js +45 -0
  115. package/core/Select/index.mdx +36 -0
  116. package/core/SummaryList/SummaryList.stories.d.ts +2 -2
  117. package/core/SummaryList/SummaryList.stories.js +8 -8
  118. package/core/SummaryList/__stories__/Default.js +1 -1
  119. package/core/SummaryList/__stories__/WithActions.d.ts +3 -0
  120. package/core/SummaryList/__stories__/{SummaryListWithActions.js → WithActions.js} +10 -12
  121. package/core/SummaryList/__stories__/WithoutBorders.d.ts +3 -0
  122. package/core/SummaryList/__stories__/{SummaryListWithoutBorders.js → WithoutBorders.js} +5 -5
  123. package/core/SummaryList/index.mdx +17 -65
  124. package/core/Table/Table.stories.d.ts +1 -0
  125. package/core/Table/Table.stories.js +14 -0
  126. package/core/Table/__stories__/DarkVariant.js +1 -1
  127. package/core/Table/__stories__/Default.js +1 -1
  128. package/core/Table/__stories__/TableCaptions.d.ts +3 -0
  129. package/core/Table/__stories__/TableCaptions.js +30 -0
  130. package/core/Table/index.mdx +52 -0
  131. package/core/Tabs/__stories__/Default.d.ts +1 -0
  132. package/core/Tabs/__stories__/Default.js +6 -2
  133. package/core/Tabs/index.mdx +10 -2
  134. package/core/TextArea/index.mdx +50 -0
  135. package/core/TextInput/index.mdx +59 -0
  136. package/core/VisuallyHidden/__stories__/Default.js +14 -2
  137. package/core/VisuallyHidden/index.mdx +17 -0
  138. package/core/WarningText/index.mdx +10 -35
  139. package/es/admin/AutoComplete/AccesibleAutoComplete/index.js +87 -0
  140. package/es/admin/AutoComplete/AutoComplete.stories.js +13 -0
  141. package/es/admin/AutoComplete/Status/index.js +153 -0
  142. package/es/admin/AutoComplete/__stories__/Default.js +19 -0
  143. package/es/admin/AutoComplete/__stories__/WithAutoSelect.js +20 -0
  144. package/es/admin/AutoComplete/__stories__/WithDefaultValue.js +18 -0
  145. package/es/admin/AutoComplete/__stories__/WithInLine.js +18 -0
  146. package/es/admin/AutoComplete/__stories__/WithMinLength.js +19 -0
  147. package/es/admin/AutoComplete/__stories__/WithPlaceHolder.js +18 -0
  148. package/es/admin/AutoComplete/__stories__/WithShowAllValues.js +18 -0
  149. package/es/admin/AutoComplete/index.js +676 -0
  150. package/es/admin/AutoComplete/index.mdx +46 -0
  151. package/es/admin/AutoComplete/utils.js +6 -0
  152. package/es/admin/Drawer/__stories__/Default.js +1 -1
  153. package/es/admin/Drawer/index.mdx +12 -0
  154. package/es/admin/FilterSection/index.js +1 -0
  155. package/es/admin/Pagination/__stories__/Default.js +37 -14
  156. package/es/admin/Pagination/index.mdx +12 -0
  157. package/es/admin/index.js +2 -1
  158. package/es/app/Confirmation/Confirmation.mdx +9 -0
  159. package/es/app/CopyToClipboard/CopyToClipboard.stories.js +3 -1
  160. package/es/app/CopyToClipboard/__stories__/Banner.js +16 -0
  161. package/es/app/CopyToClipboard/__stories__/Default.js +5 -107
  162. package/es/app/CopyToClipboard/__stories__/MultipleCopies.js +120 -0
  163. package/es/app/CopyToClipboard/index.mdx +22 -0
  164. package/es/app/Footer/Footer.mdx +27 -0
  165. package/es/app/Header/index.mdx +18 -0
  166. package/es/app/I18nText.js +7 -6
  167. package/es/app/NotFound/index.mdx +12 -0
  168. package/es/app/PhaseBannerHeader/index.mdx +12 -0
  169. package/es/core/Accordion/index.mdx +13 -86
  170. package/es/core/BackLink/index.mdx +16 -0
  171. package/es/core/Blockquote/index.mdx +17 -2
  172. package/es/core/Breadcrumbs/__stories__/Default.js +9 -1
  173. package/es/core/Breadcrumbs/breadcrumbs.mdx +22 -0
  174. package/es/core/Button/Button.mdx +37 -2
  175. package/es/core/Button/Button.stories.js +3 -1
  176. package/es/core/Button/__stories__/CallToActionButton.js +9 -0
  177. package/es/core/Button/__stories__/Disabled.js +14 -0
  178. package/es/core/Button/__stories__/Warning.js +2 -1
  179. package/es/core/Card/Card.stories.js +2 -1
  180. package/es/core/Card/__stories__/WithClickableLink.js +2 -3
  181. package/es/core/Card/__stories__/WithGroupButton.js +11 -0
  182. package/es/core/Card/card.mdx +78 -0
  183. package/es/core/Checkboxes/Checkbox.stories.js +1 -0
  184. package/es/core/Checkboxes/__stories__/NoneAnswerWithError.js +28 -0
  185. package/es/core/Checkboxes/checkboxes.mdx +54 -0
  186. package/es/core/Confirmation/confirmation.mdx +19 -0
  187. package/es/core/DateInput/DateInput.stories.js +1 -0
  188. package/es/core/DateInput/__stories__/Default.js +3 -1
  189. package/es/core/DateInput/__stories__/MultipleQuestions.js +20 -0
  190. package/es/core/DateInput/index.mdx +34 -0
  191. package/es/core/Details/index.mdx +9 -25
  192. package/es/core/ErrorMessage/__stories__/Default.js +1 -1
  193. package/es/core/ErrorMessage/index.mdx +21 -0
  194. package/es/core/ErrorSummary/__stories__/LinkedToCheckbox.js +1 -1
  195. package/es/core/ErrorSummary/index.mdx +21 -38
  196. package/es/core/FileUpload/__stories__/Default.js +2 -1
  197. package/es/core/FileUpload/index.mdx +22 -0
  198. package/es/core/Link/__stories__/DarkBackground.js +1 -1
  199. package/es/core/Link/__stories__/DarkBackgroundNoUnderline.js +1 -1
  200. package/es/core/Link/link.mdx +30 -0
  201. package/es/core/List/index.mdx +22 -3
  202. package/es/core/Masthead/masthead.mdx +14 -0
  203. package/es/core/NavList/NavList.js +8 -63
  204. package/es/core/NavList/NavListBase.js +58 -0
  205. package/es/core/NavList/NavListSubMenu.js +1 -1
  206. package/es/core/NavList/types.js +1 -0
  207. package/es/core/NotificationBanner/index.mdx +13 -60
  208. package/es/core/PhaseBanner/PhaseBanner.stories.js +2 -1
  209. package/es/core/PhaseBanner/__stories__/Underlined.js +14 -0
  210. package/es/core/PhaseBanner/index.mdx +24 -0
  211. package/es/core/Radios/__stories__/Default.js +1 -2
  212. package/es/core/Radios/__stories__/MultipleQuestions.js +1 -1
  213. package/es/core/Radios/index.mdx +56 -0
  214. package/es/core/Select/Select.stories.js +2 -1
  215. package/es/core/Select/__stories__/WithHint.js +22 -0
  216. package/es/core/Select/index.mdx +36 -0
  217. package/es/core/SummaryList/SummaryList.stories.js +2 -2
  218. package/es/core/SummaryList/__stories__/Default.js +1 -1
  219. package/es/core/SummaryList/__stories__/WithActions.js +20 -0
  220. package/es/core/SummaryList/__stories__/WithoutBorders.js +11 -0
  221. package/es/core/SummaryList/index.mdx +17 -65
  222. package/es/core/Table/Table.stories.js +1 -0
  223. package/es/core/Table/__stories__/DarkVariant.js +1 -1
  224. package/es/core/Table/__stories__/Default.js +1 -1
  225. package/es/core/Table/__stories__/TableCaptions.js +17 -0
  226. package/es/core/Table/index.mdx +52 -0
  227. package/es/core/Tabs/__stories__/Default.js +3 -2
  228. package/es/core/Tabs/index.mdx +10 -2
  229. package/es/core/TextArea/index.mdx +50 -0
  230. package/es/core/TextInput/index.mdx +59 -0
  231. package/es/core/VisuallyHidden/__stories__/Default.js +9 -5
  232. package/es/core/VisuallyHidden/index.mdx +17 -0
  233. package/es/core/WarningText/index.mdx +10 -35
  234. package/es/govgr/Footer/index.mdx +4 -4
  235. package/es/introduction.md +4 -1
  236. package/es/layouts/Grid/Grid.stories.js +2 -1
  237. package/es/layouts/Grid/__stories__/Inline.js +55 -0
  238. package/es/layouts/Grid/index.js +1 -0
  239. package/es/layouts/index.js +2 -0
  240. package/es/registry.js +57 -17
  241. package/es/typography/Caption/index.mdx +16 -0
  242. package/es/typography/Hint/index.mdx +16 -0
  243. package/es/typography/NormalText/index.mdx +26 -0
  244. package/es/typography/Paragraph/index.mdx +30 -0
  245. package/es/typography/Title/index.mdx +12 -0
  246. package/esm/admin/AutoComplete/AccesibleAutoComplete/index.js +87 -0
  247. package/esm/admin/AutoComplete/AutoComplete.stories.js +13 -0
  248. package/esm/admin/AutoComplete/Status/index.js +153 -0
  249. package/esm/admin/AutoComplete/__stories__/Default.js +19 -0
  250. package/esm/admin/AutoComplete/__stories__/WithAutoSelect.js +20 -0
  251. package/esm/admin/AutoComplete/__stories__/WithDefaultValue.js +18 -0
  252. package/esm/admin/AutoComplete/__stories__/WithInLine.js +18 -0
  253. package/esm/admin/AutoComplete/__stories__/WithMinLength.js +19 -0
  254. package/esm/admin/AutoComplete/__stories__/WithPlaceHolder.js +18 -0
  255. package/esm/admin/AutoComplete/__stories__/WithShowAllValues.js +18 -0
  256. package/esm/admin/AutoComplete/index.js +676 -0
  257. package/esm/admin/AutoComplete/index.mdx +46 -0
  258. package/esm/admin/AutoComplete/utils.js +6 -0
  259. package/esm/admin/Drawer/__stories__/Default.js +1 -1
  260. package/esm/admin/Drawer/index.mdx +12 -0
  261. package/esm/admin/FilterSection/index.js +1 -0
  262. package/esm/admin/Pagination/__stories__/Default.js +37 -14
  263. package/esm/admin/Pagination/index.mdx +12 -0
  264. package/esm/admin/index.js +2 -1
  265. package/esm/app/Confirmation/Confirmation.mdx +9 -0
  266. package/esm/app/CopyToClipboard/CopyToClipboard.stories.js +3 -1
  267. package/esm/app/CopyToClipboard/__stories__/Banner.js +16 -0
  268. package/esm/app/CopyToClipboard/__stories__/Default.js +5 -107
  269. package/esm/app/CopyToClipboard/__stories__/MultipleCopies.js +120 -0
  270. package/esm/app/CopyToClipboard/index.mdx +22 -0
  271. package/esm/app/Footer/Footer.mdx +27 -0
  272. package/esm/app/Header/index.mdx +18 -0
  273. package/esm/app/I18nText.js +7 -6
  274. package/esm/app/NotFound/index.mdx +12 -0
  275. package/esm/app/PhaseBannerHeader/index.mdx +12 -0
  276. package/esm/core/Accordion/index.mdx +13 -86
  277. package/esm/core/BackLink/index.mdx +16 -0
  278. package/esm/core/Blockquote/index.mdx +17 -2
  279. package/esm/core/Breadcrumbs/__stories__/Default.js +9 -1
  280. package/esm/core/Breadcrumbs/breadcrumbs.mdx +22 -0
  281. package/esm/core/Button/Button.mdx +37 -2
  282. package/esm/core/Button/Button.stories.js +3 -1
  283. package/esm/core/Button/__stories__/CallToActionButton.js +9 -0
  284. package/esm/core/Button/__stories__/Disabled.js +14 -0
  285. package/esm/core/Button/__stories__/Warning.js +2 -1
  286. package/esm/core/Card/Card.stories.js +2 -1
  287. package/esm/core/Card/__stories__/WithClickableLink.js +2 -3
  288. package/esm/core/Card/__stories__/WithGroupButton.js +11 -0
  289. package/esm/core/Card/card.mdx +78 -0
  290. package/esm/core/Checkboxes/Checkbox.stories.js +1 -0
  291. package/esm/core/Checkboxes/__stories__/NoneAnswerWithError.js +28 -0
  292. package/esm/core/Checkboxes/checkboxes.mdx +54 -0
  293. package/esm/core/Confirmation/confirmation.mdx +19 -0
  294. package/esm/core/DateInput/DateInput.stories.js +1 -0
  295. package/esm/core/DateInput/__stories__/Default.js +3 -1
  296. package/esm/core/DateInput/__stories__/MultipleQuestions.js +20 -0
  297. package/esm/core/DateInput/index.mdx +34 -0
  298. package/esm/core/Details/index.mdx +9 -25
  299. package/esm/core/ErrorMessage/__stories__/Default.js +1 -1
  300. package/esm/core/ErrorMessage/index.mdx +21 -0
  301. package/esm/core/ErrorSummary/__stories__/LinkedToCheckbox.js +1 -1
  302. package/esm/core/ErrorSummary/index.mdx +21 -38
  303. package/esm/core/FileUpload/__stories__/Default.js +2 -1
  304. package/esm/core/FileUpload/index.mdx +22 -0
  305. package/esm/core/Link/__stories__/DarkBackground.js +1 -1
  306. package/esm/core/Link/__stories__/DarkBackgroundNoUnderline.js +1 -1
  307. package/esm/core/Link/link.mdx +30 -0
  308. package/esm/core/List/index.mdx +22 -3
  309. package/esm/core/Masthead/masthead.mdx +14 -0
  310. package/esm/core/NavList/NavList.js +8 -63
  311. package/esm/core/NavList/NavListBase.js +58 -0
  312. package/esm/core/NavList/NavListSubMenu.js +1 -1
  313. package/esm/core/NavList/types.js +1 -0
  314. package/esm/core/NotificationBanner/index.mdx +13 -60
  315. package/esm/core/PhaseBanner/PhaseBanner.stories.js +2 -1
  316. package/esm/core/PhaseBanner/__stories__/Underlined.js +14 -0
  317. package/esm/core/PhaseBanner/index.mdx +24 -0
  318. package/esm/core/Radios/__stories__/Default.js +1 -2
  319. package/esm/core/Radios/__stories__/MultipleQuestions.js +1 -1
  320. package/esm/core/Radios/index.mdx +56 -0
  321. package/esm/core/Select/Select.stories.js +2 -1
  322. package/esm/core/Select/__stories__/WithHint.js +22 -0
  323. package/esm/core/Select/index.mdx +36 -0
  324. package/esm/core/SummaryList/SummaryList.stories.js +2 -2
  325. package/esm/core/SummaryList/__stories__/Default.js +1 -1
  326. package/esm/core/SummaryList/__stories__/WithActions.js +20 -0
  327. package/esm/core/SummaryList/__stories__/WithoutBorders.js +11 -0
  328. package/esm/core/SummaryList/index.mdx +17 -65
  329. package/esm/core/Table/Table.stories.js +1 -0
  330. package/esm/core/Table/__stories__/DarkVariant.js +1 -1
  331. package/esm/core/Table/__stories__/Default.js +1 -1
  332. package/esm/core/Table/__stories__/TableCaptions.js +17 -0
  333. package/esm/core/Table/index.mdx +52 -0
  334. package/esm/core/Tabs/__stories__/Default.js +3 -2
  335. package/esm/core/Tabs/index.mdx +10 -2
  336. package/esm/core/TextArea/index.mdx +50 -0
  337. package/esm/core/TextInput/index.mdx +59 -0
  338. package/esm/core/VisuallyHidden/__stories__/Default.js +9 -5
  339. package/esm/core/VisuallyHidden/index.mdx +17 -0
  340. package/esm/core/WarningText/index.mdx +10 -35
  341. package/esm/govgr/Footer/index.mdx +4 -4
  342. package/esm/index.js +1 -1
  343. package/esm/introduction.md +4 -1
  344. package/esm/layouts/Grid/Grid.stories.js +2 -1
  345. package/esm/layouts/Grid/__stories__/Inline.js +55 -0
  346. package/esm/layouts/Grid/index.js +1 -0
  347. package/esm/layouts/index.js +2 -0
  348. package/esm/registry.js +57 -17
  349. package/esm/typography/Caption/index.mdx +16 -0
  350. package/esm/typography/Hint/index.mdx +16 -0
  351. package/esm/typography/NormalText/index.mdx +26 -0
  352. package/esm/typography/Paragraph/index.mdx +30 -0
  353. package/esm/typography/Title/index.mdx +12 -0
  354. package/govgr/Footer/index.mdx +4 -4
  355. package/introduction.md +4 -1
  356. package/layouts/Grid/Grid.stories.d.ts +1 -0
  357. package/layouts/Grid/Grid.stories.js +14 -0
  358. package/layouts/Grid/__stories__/Inline.d.ts +3 -0
  359. package/layouts/Grid/__stories__/Inline.js +68 -0
  360. package/layouts/Grid/index.d.ts +1 -0
  361. package/layouts/Grid/index.js +6 -0
  362. package/layouts/index.d.ts +2 -0
  363. package/layouts/index.js +22 -1
  364. package/package.json +3 -3
  365. package/registry.d.ts +28 -8
  366. package/registry.js +85 -25
  367. package/typography/Caption/index.mdx +16 -0
  368. package/typography/Hint/index.mdx +16 -0
  369. package/typography/NormalText/index.mdx +26 -0
  370. package/typography/Paragraph/index.mdx +30 -0
  371. package/typography/Title/index.mdx +12 -0
  372. package/app/NotFound/NotFound.mdx +0 -5
  373. package/app/QrCodeScanner/index.mdx +0 -7
  374. package/core/SummaryList/__stories__/SummaryListWithActions.d.ts +0 -3
  375. package/core/SummaryList/__stories__/SummaryListWithoutBorders.d.ts +0 -3
  376. package/es/app/NotFound/NotFound.mdx +0 -5
  377. package/es/app/QrCodeScanner/index.mdx +0 -7
  378. package/es/core/SummaryList/__stories__/SummaryListWithActions.js +0 -21
  379. package/es/core/SummaryList/__stories__/SummaryListWithoutBorders.js +0 -11
  380. package/esm/app/NotFound/NotFound.mdx +0 -5
  381. package/esm/app/QrCodeScanner/index.mdx +0 -7
  382. package/esm/core/SummaryList/__stories__/SummaryListWithActions.js +0 -21
  383. package/esm/core/SummaryList/__stories__/SummaryListWithoutBorders.js +0 -11
@@ -7,7 +7,7 @@ import VisuallyHidden from '@digigov/ui/core/VisuallyHidden';
7
7
 
8
8
  var _ref = /*#__PURE__*/React.createElement(Field, {
9
9
  error: true
10
- }, /*#__PURE__*/React.createElement(Fieldset, null, /*#__PURE__*/React.createElement(FieldsetLegend, null, "\u0398\u03B1 \u03C4\u03B1\u03BE\u03B9\u03B4\u03AD\u03C8\u03B5\u03C4\u03B5 \u03C3\u03B5 \u03BA\u03AC\u03C0\u03BF\u03B9\u03B1 \u03B1\u03C0\u03CC \u03B1\u03C5\u03C4\u03AD\u03C2 \u03C4\u03B9\u03C2 \u03C7\u03CE\u03C1\u03B5\u03C2;"), /*#__PURE__*/React.createElement(Hint, null, "\u0391\u03BD \u03AD\u03C7\u03B5\u03C4\u03B5 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AE \u03C5\u03C0\u03B7\u03BA\u03BF\u03CC\u03C4\u03B7\u03C4\u03B1, \u03B5\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03CC,\u03C4\u03B9 \u03B9\u03C3\u03C7\u03CD\u03B5\u03B9."), /*#__PURE__*/React.createElement(ErrorMessage, null, /*#__PURE__*/React.createElement(VisuallyHidden, null, "\u039B\u03AC\u03B8\u03BF\u03C2:"), " \u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03BC\u03AF\u03B1 \u03AE \u03C0\u03B1\u03C1\u03B1\u03C0\u03AC\u03BD\u03C9 \u03C7\u03CE\u03C1\u03B5\u03C2."), /*#__PURE__*/React.createElement(Checkboxes, null, /*#__PURE__*/React.createElement(CheckboxItem, {
10
+ }, /*#__PURE__*/React.createElement(Fieldset, null, /*#__PURE__*/React.createElement(FieldsetLegend, null, "\u0398\u03B1 \u03C4\u03B1\u03BE\u03B9\u03B4\u03AD\u03C8\u03B5\u03C4\u03B5 \u03C3\u03B5 \u03BA\u03AC\u03C0\u03BF\u03B9\u03B1 \u03B1\u03C0\u03CC \u03B1\u03C5\u03C4\u03AD\u03C2 \u03C4\u03B9\u03C2 \u03C7\u03CE\u03C1\u03B5\u03C2;"), /*#__PURE__*/React.createElement(Hint, null, "\u0391\u03BD \u03AD\u03C7\u03B5\u03C4\u03B5 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AE \u03C5\u03C0\u03B7\u03BA\u03BF\u03CC\u03C4\u03B7\u03C4\u03B1, \u03B5\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03CC,\u03C4\u03B9 \u03B9\u03C3\u03C7\u03CD\u03B5\u03B9."), /*#__PURE__*/React.createElement(ErrorMessage, null, /*#__PURE__*/React.createElement(VisuallyHidden, null, "\u039B\u03AC\u03B8\u03BF\u03C2:"), "\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03BC\u03AF\u03B1 \u03AE \u03C0\u03B1\u03C1\u03B1\u03C0\u03AC\u03BD\u03C9 \u03C7\u03CE\u03C1\u03B5\u03C2."), /*#__PURE__*/React.createElement(Checkboxes, null, /*#__PURE__*/React.createElement(CheckboxItem, {
11
11
  name: "cold",
12
12
  value: "cold"
13
13
  }, "\u0391\u03B3\u03B3\u03BB\u03AF\u03B1"), /*#__PURE__*/React.createElement(CheckboxItem, {
@@ -0,0 +1,21 @@
1
+ ---
2
+ id: error-message
3
+ title: ErrorMessage
4
+ ---
5
+
6
+
7
+ # ErrorMessage
8
+
9
+ Follow the validation pattern and show an error message when there is a validation error.
10
+ In the error message explain what went wrong and how to fix it.
11
+
12
+
13
+
14
+ ```bash
15
+ import ErrorMessage from '@digigov/ui/core/ErrorMessage';
16
+ ```
17
+
18
+ ## How to use
19
+
20
+ <Story packageName="@digigov/ui" component="core/ErrorMessage" story="Default.tsx" />
21
+
@@ -13,7 +13,7 @@ var _ref = /*#__PURE__*/React.createElement("div", {
13
13
  }, /*#__PURE__*/React.createElement(ErrorSummary, null, /*#__PURE__*/React.createElement(Title, {
14
14
  size: "sm"
15
15
  }, "\u03A5\u03C0\u03AE\u03C1\u03BE\u03B5 \u03BA\u03AC\u03C0\u03BF\u03B9\u03BF \u03C0\u03C1\u03CC\u03B2\u03BB\u03B7\u03BC\u03B1"), /*#__PURE__*/React.createElement(Link, {
16
- href: "#thisone"
16
+ href: "#england"
17
17
  }, "\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03BC\u03AF\u03B1 \u03AE \u03C0\u03B1\u03C1\u03B1\u03C0\u03AC\u03BD\u03C9 \u03C7\u03CE\u03C1\u03B5\u03C2.")), /*#__PURE__*/React.createElement(Field, {
18
18
  error: true
19
19
  }, /*#__PURE__*/React.createElement(Fieldset, null, /*#__PURE__*/React.createElement(FieldsetLegend, null, "\u0398\u03B1 \u03C4\u03B1\u03BE\u03B9\u03B4\u03AD\u03C8\u03B5\u03C4\u03B5 \u03C3\u03B5 \u03BA\u03AC\u03C0\u03BF\u03B9\u03B1 \u03B1\u03C0\u03CC \u03B1\u03C5\u03C4\u03AD\u03C2 \u03C4\u03B9\u03C2 \u03C7\u03CE\u03C1\u03B5\u03C2;"), /*#__PURE__*/React.createElement(Hint, null, "\u0391\u03BD \u03AD\u03C7\u03B5\u03C4\u03B5 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AE \u03C5\u03C0\u03B7\u03BA\u03BF\u03CC\u03C4\u03B7\u03C4\u03B1, \u03B5\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03CC,\u03C4\u03B9 \u03B9\u03C3\u03C7\u03CD\u03B5\u03B9."), /*#__PURE__*/React.createElement(ErrorMessage, null, /*#__PURE__*/React.createElement(VisuallyHidden, null, "\u039B\u03AC\u03B8\u03BF\u03C2:"), " \u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03BC\u03AF\u03B1 \u03AE \u03C0\u03B1\u03C1\u03B1\u03C0\u03AC\u03BD\u03C9 \u03C7\u03CE\u03C1\u03B5\u03C2."), /*#__PURE__*/React.createElement(Checkboxes, null, /*#__PURE__*/React.createElement(CheckboxItem, {
@@ -1,59 +1,42 @@
1
1
  ---
2
- title: Error Summary
3
- parent: docs/ui/components
2
+ id: error-summary
3
+ title: ErrorSummary
4
4
  ---
5
5
 
6
- # Error Summary
7
6
 
8
- import ErrorSummary from '@digigov/ui/core/ErrorSummary';
7
+ # ErrorSummary
9
8
 
10
- ## Example
9
+ Use this component at the top of a page to summarise any errors a user has made.
11
10
 
12
- ```jsx live path=core/ErrorSummary/index.tsx
13
- import ErrorSummary from '@digigov/ui/core/ErrorSummary';
14
- import Paragraph from '@digigov/ui/typography/Paragraph';
15
- function CustomWarning (props){
16
- return (
17
- <ErrorSummary><Paragraph>Action Label</Paragraph></ErrorSummary>
18
- )
19
- }
20
- export CustomErrorSummary
11
+ When a user makes an error, you must show both an error summary and an error message next to each answer that contains an error.
12
+
21
13
 
22
- ```
23
14
 
24
- <br />
15
+ ```bash
16
+ import ErrorSummary from '@digigov/ui/core/ErrorSummary';
17
+ ```
18
+
19
+ ## How to use
25
20
 
26
- ## When to use this component
21
+ <Story packageName="@digigov/ui" component="core/ErrorSummary" story="Default.tsx" />
27
22
 
28
- Use this component at the top of a page to summarise any errors a user has
29
- made.
30
23
 
31
- When a user makes an error, you must show both an error summary and an error
32
- message next to each answer that contains an error.
24
+ ### Linking from the error summary to each answer
33
25
 
34
- ## How it works
26
+ You must link the errors in the error summary to the answer they relate to.
35
27
 
36
- You must:
28
+ 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.
37
29
 
38
- - move keyboard focus to the error summary
39
- - include the heading "There is a problem"
40
- - link to each of the answers that have validation errors
41
- - make sure the error messages in the error summary are worded the same as
42
- those which appear next to the inputs with errors
30
+ <Story packageName="@digigov/ui" component="core/ErrorSummary" story="LinkedToInput.tsx" />
43
31
 
44
- As well as showing an error summary, follow the validation pattern - for
45
- example, by adding "Error: " to the beginning of the page `<title>` so screen
46
- readers read it out as soon as possible.
32
+ 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.
47
33
 
48
- And make your error messages clear and concise.
34
+ If you do not know which field contains an error, link to the first field.
49
35
 
50
- ## API
36
+ <Story packageName="@digigov/ui" component="core/ErrorSummary" story="LinkedToField.tsx" />
51
37
 
52
- ### Properties
38
+ 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.
53
39
 
54
- <PropsDoc data={ErrorSummary.__doc__} />
55
- <br />
40
+ <Story packageName="@digigov/ui" component="core/ErrorSummary" story="LinkedToCheckbox.tsx" />
56
41
 
57
- ### Styles
58
42
 
59
- <StylesDoc data={ErrorSummary.__doc__} />
@@ -9,4 +9,5 @@ var _ref = /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.crea
9
9
 
10
10
  export var Default = function Default() {
11
11
  return _ref;
12
- };
12
+ };
13
+ export default Default;
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: file-upload
3
+ title: FileUpload
4
+ ---
5
+
6
+ # FileUpload
7
+
8
+
9
+
10
+ ```bash
11
+ import FileUpload from '@digigov/ui/core/FileUpload';
12
+ ```
13
+
14
+ ## How to use
15
+
16
+ <Story packageName="@digigov/ui" component="core/FileUpload" story="Default.tsx" />
17
+
18
+ ### Error message
19
+
20
+ Error messages should be styled like this:
21
+
22
+ <Story packageName="@digigov/ui" component="core/FileUpload" story="WithErrorMessage.tsx" />
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import Link from "@digigov/ui/core/Link";
3
3
  import { Masthead } from "@digigov/ui/layouts";
4
- import SectionBreak from "../../Divider";
4
+ import SectionBreak from "@digigov/ui/core/Divider";
5
5
 
6
6
  var _ref = /*#__PURE__*/React.createElement(Masthead, null, /*#__PURE__*/React.createElement(SectionBreak, null), /*#__PURE__*/React.createElement(Link, {
7
7
  href: "#"
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import Link from "@digigov/ui/core/Link";
3
3
  import { Masthead } from "@digigov/ui/layouts";
4
- import SectionBreak from "../../Divider";
4
+ import SectionBreak from "@digigov/ui/core/Divider";
5
5
 
6
6
  var _ref = /*#__PURE__*/React.createElement(Masthead, null, /*#__PURE__*/React.createElement(SectionBreak, null), /*#__PURE__*/React.createElement(Link, {
7
7
  href: "#",
@@ -0,0 +1,30 @@
1
+ ---
2
+ id: link
3
+ title: Link
4
+ ---
5
+
6
+ ```bash
7
+ import Link from '@digigov/ui/core/Link';
8
+ ```
9
+
10
+ ## How to use
11
+
12
+ ### Default
13
+
14
+ <Story packageName="@digigov/ui" component="core/Link" story="Default.tsx" />
15
+
16
+ ### No Underline
17
+
18
+ <Story packageName="@digigov/ui" component="core/Link" story="NoUnderline.tsx" />
19
+
20
+ ### Opens in a new tab
21
+
22
+ <Story packageName="@digigov/ui" component="core/Link" story="OpensInNewTab.tsx" />
23
+
24
+ ### At dark background
25
+
26
+ <Story packageName="@digigov/ui" component="core/Link" story="DarkBackground.tsx" />
27
+
28
+ ### At dark background and no underline
29
+
30
+ <Story packageName="@digigov/ui" component="core/Link" story="DarkBackgroundNoUnderline.tsx" />
@@ -1,8 +1,27 @@
1
1
  ---
2
+ id: list
2
3
  title: List
3
- parent: docs/ui/components
4
4
  ---
5
5
 
6
- import List, { ListItem } from '@digigov/ui/core/List';
7
6
 
8
- ## Examples
7
+ ```bash
8
+ import List from '@digigov/ui/core/List';
9
+ ```
10
+
11
+ ## How to use
12
+
13
+ ### Default
14
+
15
+ <Story packageName="@digigov/ui" component="core/List" story="Default.tsx" />
16
+
17
+ ### List with bullets
18
+
19
+ <Story packageName="@digigov/ui" component="core/List" story="BulletList.tsx" />
20
+
21
+ ### List with numbers
22
+
23
+ <Story packageName="@digigov/ui" component="core/List" story="NumberedList.tsx" />
24
+
25
+ ### List with extra space
26
+
27
+ <Story packageName="@digigov/ui" component="core/List" story="WithExtraSpace.tsx" />
@@ -0,0 +1,14 @@
1
+ ---
2
+ id: masthead
3
+ title: Masthead
4
+ ---
5
+
6
+ # Masthead
7
+
8
+ ```bash
9
+ import Masthead from '@digigov/ui/core/Masthead';
10
+ ```
11
+
12
+ ## How to use
13
+
14
+ <Story packageName="@digigov/ui" component="core/Masthead" story="Default.tsx" />
@@ -1,72 +1,17 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["className", "children", "floating", "horizontal", "subMenu"],
4
- _excluded2 = ["horizontal", "openSubMenus", "links"];
3
+ var _excluded = ["horizontal", "openSubMenus", "links"];
5
4
  import React from 'react';
6
- import clsx from 'clsx';
7
- import { makeStyles } from '@material-ui/core/styles';
8
5
  import { NavListProvider } from '@digigov/ui/core/NavList/NavListContext';
9
- export var useNavListStyles = makeStyles(function (theme) {
10
- return {
11
- root: {
12
- padding: theme.spacing(0),
13
- margin: theme.spacing(0),
14
- display: 'flex',
15
- '&$vertical': {
16
- flexDirection: 'column'
17
- }
18
- },
19
- subMenu: {
20
- marginLeft: theme.spacing(3)
21
- },
22
- floating: {
23
- left: 0,
24
- zIndex: 99,
25
- position: 'absolute',
26
- background: theme.palette.grey['100'],
27
- borderTop: "1px solid ".concat(theme.palette.grey['500']),
28
- borderRight: "1px solid ".concat(theme.palette.grey['500']),
29
- borderLeft: "1px solid ".concat(theme.palette.grey['500']),
30
- margin: theme.spacing(1.5, 0, 0, 0),
31
- boxShadow: theme.shadows[3],
32
- '& > li': {
33
- width: '100%',
34
- borderBottom: "1px solid ".concat(theme.palette.grey['500']),
35
- margin: 0
36
- }
37
- },
38
- vertical: {},
39
- floatClear: {
40
- clear: 'both'
41
- }
42
- };
43
- }, {
44
- name: 'MuiNavList'
45
- });
46
- export var NavListBase = function NavListBase(_ref) {
47
- var className = _ref.className,
48
- children = _ref.children,
49
- floating = _ref.floating,
50
- horizontal = _ref.horizontal,
51
- subMenu = _ref.subMenu,
6
+ import { NavListBase } from '@digigov/ui/core/NavList/NavListBase';
7
+ export var NavList = function NavList(_ref) {
8
+ var horizontal = _ref.horizontal,
9
+ _ref$openSubMenus = _ref.openSubMenus,
10
+ openSubMenus = _ref$openSubMenus === void 0 ? false : _ref$openSubMenus,
11
+ _ref$links = _ref.links,
12
+ links = _ref$links === void 0 ? [] : _ref$links,
52
13
  props = _objectWithoutProperties(_ref, _excluded);
53
14
 
54
- var classes = useNavListStyles();
55
- return /*#__PURE__*/React.createElement("nav", null, /*#__PURE__*/React.createElement("ul", {
56
- style: props.style,
57
- className: clsx(className, classes.root, !horizontal && classes.vertical, floating && classes.floating, subMenu && classes.subMenu)
58
- }, children), /*#__PURE__*/React.createElement("div", {
59
- className: classes.floatClear
60
- }));
61
- };
62
- export var NavList = function NavList(_ref2) {
63
- var horizontal = _ref2.horizontal,
64
- _ref2$openSubMenus = _ref2.openSubMenus,
65
- openSubMenus = _ref2$openSubMenus === void 0 ? false : _ref2$openSubMenus,
66
- _ref2$links = _ref2.links,
67
- links = _ref2$links === void 0 ? [] : _ref2$links,
68
- props = _objectWithoutProperties(_ref2, _excluded2);
69
-
70
15
  return /*#__PURE__*/React.createElement(NavListProvider, {
71
16
  openSubMenus: openSubMenus,
72
17
  horizontal: horizontal,
@@ -0,0 +1,58 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
+ var _excluded = ["className", "children", "floating", "horizontal", "subMenu"];
3
+ import React from 'react';
4
+ import clsx from 'clsx';
5
+ import { makeStyles } from '@material-ui/core/styles';
6
+ export var useNavListStyles = makeStyles(function (theme) {
7
+ return {
8
+ root: {
9
+ padding: theme.spacing(0),
10
+ margin: theme.spacing(0),
11
+ display: 'flex',
12
+ '&$vertical': {
13
+ flexDirection: 'column'
14
+ }
15
+ },
16
+ subMenu: {
17
+ marginLeft: theme.spacing(3)
18
+ },
19
+ floating: {
20
+ left: 0,
21
+ zIndex: 99,
22
+ position: 'absolute',
23
+ background: theme.palette.grey['100'],
24
+ borderTop: "1px solid ".concat(theme.palette.grey['500']),
25
+ borderRight: "1px solid ".concat(theme.palette.grey['500']),
26
+ borderLeft: "1px solid ".concat(theme.palette.grey['500']),
27
+ margin: theme.spacing(1.5, 0, 0, 0),
28
+ boxShadow: theme.shadows[3],
29
+ '& > li': {
30
+ width: '100%',
31
+ borderBottom: "1px solid ".concat(theme.palette.grey['500']),
32
+ margin: 0
33
+ }
34
+ },
35
+ vertical: {},
36
+ floatClear: {
37
+ clear: 'both'
38
+ }
39
+ };
40
+ }, {
41
+ name: 'MuiNavList'
42
+ });
43
+ export var NavListBase = function NavListBase(_ref) {
44
+ var className = _ref.className,
45
+ children = _ref.children,
46
+ floating = _ref.floating,
47
+ horizontal = _ref.horizontal,
48
+ subMenu = _ref.subMenu,
49
+ props = _objectWithoutProperties(_ref, _excluded);
50
+
51
+ var classes = useNavListStyles();
52
+ return /*#__PURE__*/React.createElement("nav", null, /*#__PURE__*/React.createElement("ul", {
53
+ style: props.style,
54
+ className: clsx(className, classes.root, !horizontal && classes.vertical, floating && classes.floating, subMenu && classes.subMenu)
55
+ }, children), /*#__PURE__*/React.createElement("div", {
56
+ className: classes.floatClear
57
+ }));
58
+ };
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["links"];
4
4
  import React, { useContext } from 'react';
5
- import { NavListBase } from '@digigov/ui/core/NavList';
5
+ import { NavListBase } from '@digigov/ui/core/NavList/NavListBase';
6
6
  import NavListItemBase from '@digigov/ui/core/NavList/NavListItemBase';
7
7
  import NavListContext from '@digigov/ui/core/NavList/NavListContext';
8
8
  export var NavListSubMenu = function NavListSubMenu(_ref) {
@@ -0,0 +1 @@
1
+ export {};
@@ -1,75 +1,28 @@
1
1
  ---
2
+ id: notification-banner
2
3
  title: NotificationBanner
3
- parent: docs/ui/components
4
4
  ---
5
5
 
6
6
  # NotificationBanner
7
7
 
8
- import { NotificationBanner } from '@digigov/ui/core';
8
+ This component is currently experimental because more research is needed to validate it.
9
9
 
10
- ### Example for "Important"
10
+ Use a notification banner to tell the user about something they need to know about, but that’s not directly related to the page content.
11
+
11
12
 
12
- ```jsx live path=layouts/Basic/index.tsx
13
- import Header, { HeaderTitle } from '@digigov/ui/app/Header';
14
- import Paragraph from '@digigov/ui/typography/Paragraph';
15
13
 
16
- function NotificationBanner{
17
- return (
18
- <NotificationBanner>
19
- This is important !
20
- </NotificationBanner>
21
- )
22
- }
23
- export NotificationBanner
14
+ ```bash
15
+ import NotificationBanner from '@digigov/ui/core/NotificationBanner';
16
+ ```
24
17
 
25
- ```
18
+ ## How to use
26
19
 
27
- <br />
20
+ Use a ‘neutral’ blue notification banner if the user needs to know about a problem with the service as a whole.
28
21
 
29
- ### Example for "NotificationBanner"
22
+ Use a ‘neutral’ notification banner if the user needs to know about something that’s happening elsewhere in the service.
30
23
 
31
- ```jsx live path=layouts/Basic/index.tsx
32
- import Header, { HeaderTitle } from '@digigov/ui/app/Header';
33
- import GovGRLogo from '@digigov/ui/govgr/Logo';
24
+ <Story packageName="@digigov/ui" component="core/NotificationBanner" story="Default.tsx" />
34
25
 
26
+ 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.
35
27
 
36
- function NotificationBanner{
37
- return (
38
- <NotificationBanner variant="success">
39
- Training outcome recorded and trainee withdrawn
40
- </NotificationBanner>
41
- )
42
- }
43
- export NotificationBanner
44
-
45
- ```
46
-
47
- <br />
48
-
49
- ## When to use this component
50
-
51
- A notification banner lets you tell the user about something that’s not directly relevant to the thing they’re trying to do on that page of the service. For example:
52
-
53
- - telling the user about a problem that’s affecting the service as a whole (for example, delays in processing applications because of an emergency)
54
- - telling the user about something that affects them in particular (for example, an approaching deadline they need to meet)
55
- - telling the user about the outcome of something they’ve just done on a previous page (for example, confirming that an email has been sent)
56
-
57
- ## When not to use this component
58
-
59
- Use notification banners sparingly. There’s evidence that people often miss them, and using them too often is likely to make this problem worse.
60
-
61
- If the information is directly relevant to the thing the user is doing on that page, put the information in the main page content instead. Use inset text or warning text if it needs to stand out.
62
-
63
- Don’t use a notification banner to tell the user about validation errors (use an error message and error summary instead).
64
-
65
- ### API
66
-
67
- ### Properties
68
-
69
- <PropsDoc data={NotificationBanner.__doc__} />
70
-
71
- <br />
72
-
73
- ### Styles
74
-
75
- <StylesDoc data={NotificationBanner.__doc__} />
28
+ <Story packageName="@digigov/ui" component="core/NotificationBanner" story="Success.tsx" />
@@ -3,4 +3,5 @@ export default {
3
3
  title: 'Digigov UI/core/PhaseBanner',
4
4
  component: PhaseBanner
5
5
  };
6
- export * from './__stories__/Default';
6
+ export * from './__stories__/Default';
7
+ export * from './__stories__/Underlined';
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import PhaseBanner, { PhaseBannerTag, PhaseBannerText } from '@digigov/ui/core/PhaseBanner';
3
+ import Link from '@digigov/ui/core/Link';
4
+
5
+ var _ref = /*#__PURE__*/React.createElement(PhaseBanner, {
6
+ underline: true
7
+ }, /*#__PURE__*/React.createElement(PhaseBannerTag, null, "ALPHA"), /*#__PURE__*/React.createElement(PhaseBannerText, null, "\u0391\u03C5\u03C4\u03AE \u03B5\u03AF\u03BD\u03B1\u03B9 \u03BC\u03AF\u03B1 \u03BD\u03AD\u03B1 \u03C5\u03C0\u03B7\u03C1\u03B5\u03C3\u03AF\u03B1 \u2013 \u03C4\u03B1 ", /*#__PURE__*/React.createElement(Link, {
8
+ href: "#feedback"
9
+ }, "\u03C3\u03C7\u03CC\u03BB\u03B9\u03AC"), " \u03C3\u03B1\u03C2 \u03B8\u03B1 \u03BC\u03B1\u03C2 \u03B2\u03BF\u03B7\u03B8\u03AE\u03C3\u03BF\u03C5\u03BD \u03BD\u03B1 \u03C4\u03B7 \u03B2\u03B5\u03BB\u03C4\u03B9\u03CE\u03C3\u03BF\u03C5\u03BC\u03B5."));
10
+
11
+ export var Underlined = function Underlined() {
12
+ return _ref;
13
+ };
14
+ export default Underlined;
@@ -0,0 +1,24 @@
1
+ ---
2
+ id: phase-banner
3
+ title: PhaseBanner
4
+ ---
5
+
6
+ # PhaseBanner
7
+
8
+ Use the phase banner component to show users your service is still being worked on.
9
+
10
+
11
+
12
+ ```bash
13
+ import PhaseBanner from '@digigov/ui/core/PhaseBanner';
14
+ ```
15
+
16
+ ## How to use
17
+
18
+ Your banner must be directly under the blue GOV.GR header and colour bar.
19
+
20
+ <Story packageName="@digigov/ui" component="core/PhaseBanner" story="Default.tsx" />
21
+
22
+ ### Underlined
23
+
24
+ <Story packageName="@digigov/ui" component="core/PhaseBanner" story="Underlined.tsx" />
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
2
  import Radios, { RadioItem } from '@digigov/ui/core/Radios';
3
3
  import Field, { Fieldset, FieldsetLegend } from '@digigov/ui/core/Field';
4
- import Hint from '@digigov/ui/typography/Hint';
5
4
 
6
- var _ref = /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Fieldset, null, /*#__PURE__*/React.createElement(FieldsetLegend, null, "\u03A0\u03BF\u03B9\u03B1 \u03B5\u03B9\u03BD\u03B1\u03B9 \u03B7 \u03C7\u03CE\u03C1\u03B1 \u03C4\u03B7\u03C2 \u03B4\u03B9\u03B1\u03BC\u03BF\u03BD\u03AE\u03C2 \u03C3\u03B1\u03C2;"), /*#__PURE__*/React.createElement(Hint, null, "\u03A0\u03B5\u03AF\u03C4\u03B5 \u03BC\u03B1\u03C2 \u03C3\u03C7\u03B5\u03C4\u03B9\u03BA\u03AC \u03BC\u03B5 \u03C0\u03C1\u03CC\u03C3\u03C6\u03B1\u03C4\u03B5\u03C2 \u03B1\u03BB\u03BB\u03B1\u03B3\u03AD\u03C2. \u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03CC,\u03C4\u03B9 \u03B9\u03C3\u03C7\u03CD\u03B5\u03B9."), /*#__PURE__*/React.createElement(Radios, null, /*#__PURE__*/React.createElement(RadioItem, {
5
+ var _ref = /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Fieldset, null, /*#__PURE__*/React.createElement(FieldsetLegend, null, "\u03A0\u03BF\u03B9\u03B1 \u03B5\u03B9\u03BD\u03B1\u03B9 \u03B7 \u03C7\u03CE\u03C1\u03B1 \u03C4\u03B7\u03C2 \u03B4\u03B9\u03B1\u03BC\u03BF\u03BD\u03AE\u03C2 \u03C3\u03B1\u03C2;"), /*#__PURE__*/React.createElement(Radios, null, /*#__PURE__*/React.createElement(RadioItem, {
7
6
  name: "country",
8
7
  value: "greece"
9
8
  }, "\u0395\u03BB\u03BB\u03AC\u03B4\u03B1"), /*#__PURE__*/React.createElement(RadioItem, {
@@ -4,7 +4,7 @@ import Field, { Fieldset, FieldsetLegend } from '@digigov/ui/core/Field';
4
4
  import Hint from '@digigov/ui/typography/Hint';
5
5
 
6
6
  var _ref = /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Fieldset, null, /*#__PURE__*/React.createElement(FieldsetLegend, {
7
- size: "m"
7
+ size: "s"
8
8
  }, "\u03A0\u03BF\u03B9\u03B1 \u03B5\u03B9\u03BD\u03B1\u03B9 \u03B7 \u03C7\u03CE\u03C1\u03B1 \u03C4\u03B7\u03C2 \u03B4\u03B9\u03B1\u03BC\u03BF\u03BD\u03AE\u03C2 \u03C3\u03B1\u03C2;"), /*#__PURE__*/React.createElement(Hint, null, "\u03A0\u03B5\u03AF\u03C4\u03B5 \u03BC\u03B1\u03C2 \u03C3\u03C7\u03B5\u03C4\u03B9\u03BA\u03AC \u03BC\u03B5 \u03C0\u03C1\u03CC\u03C3\u03C6\u03B1\u03C4\u03B5\u03C2 \u03B1\u03BB\u03BB\u03B1\u03B3\u03AD\u03C2. \u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03CC,\u03C4\u03B9 \u03B9\u03C3\u03C7\u03CD\u03B5\u03B9."), /*#__PURE__*/React.createElement(Radios, null, /*#__PURE__*/React.createElement(RadioItem, {
9
9
  name: "country",
10
10
  value: "greece"
@@ -0,0 +1,56 @@
1
+ ---
2
+ id: radios
3
+ title: Radios
4
+ ---
5
+
6
+
7
+ # Radios
8
+
9
+
10
+
11
+
12
+ ```bash
13
+ import Radios from '@digigov/ui/core/Radios';
14
+ ```
15
+
16
+ ## How to use
17
+
18
+ <Story packageName="@digigov/ui" component="core/Radios" story="Default.tsx" />
19
+
20
+ ### If you’re asking more than one question on the page
21
+
22
+ <Story packageName="@digigov/ui" component="core/Radios" story="MultipleQuestions.tsx" />
23
+
24
+ ### Inline radios
25
+
26
+ <Story packageName="@digigov/ui" component="core/Radios" story="Inline.tsx" />
27
+
28
+ ### Checkbox items with hints
29
+
30
+ You can add hints to checkbox items to provide additional information about the options.
31
+
32
+ <Story packageName="@digigov/ui" component="core/Radios" story="WithHints.tsx" />
33
+
34
+ ### Radio items with a text divider
35
+
36
+ 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.
37
+ The text is usually the word ‘or’.
38
+
39
+ <Story packageName="@digigov/ui" component="core/Radios" story="NoneAnswer.tsx" />
40
+
41
+ ## Conditionally revealing a related question
42
+
43
+ You can ask the user a related question when they select a particular checkbox, so they only see the question when it’s relevant to them.
44
+
45
+ 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.
46
+
47
+ <Story packageName="@digigov/ui" component="core/Radios" story="ConditionalReveal.tsx" />
48
+
49
+ ### Error messages
50
+
51
+ Error messages should be styled like this:
52
+
53
+ <Story packageName="@digigov/ui" component="core/Radios" story="WithErrorMessage.tsx" />
54
+
55
+
56
+
@@ -4,4 +4,5 @@ export default {
4
4
  component: Select
5
5
  };
6
6
  export * from './__stories__/Default';
7
- export * from './__stories__/DisabledInput';
7
+ export * from './__stories__/DisabledInput';
8
+ export * from './__stories__/WithHint';