@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
@@ -1,101 +1,28 @@
1
1
  ---
2
+ id: accordion
2
3
  title: Accordion
3
- parent: docs/ui/components
4
4
  ---
5
5
 
6
- import {
7
- Accordion,
8
- AccordionItem,
9
- AccordionItemDetails,
10
- AccordionItemSummary,
11
- } from '@digigov/ui/core/Accordion';
12
6
 
13
- ## Example
7
+ # Accordion
14
8
 
15
- <Accordion>
16
- <AccordionItem>
17
- <AccordionItemSummary>Βασικες Ρυθμισεις</AccordionItemSummary>
18
- <AccordionItemDetails>Περιεχομενο Βασικων Ρυθμισεων</AccordionItemDetails>
19
- </AccordionItem>
20
- <AccordionItem>
21
- <AccordionItemSummary>Υπολοιπες Ρυθμισεις</AccordionItemSummary>
22
- <AccordionItemDetails>Περιεχομενο Υπολοιπων Ρυθμισεων</AccordionItemDetails>
23
- </AccordionItem>
24
- </Accordion>
9
+ This component is currently experimental because adding a summary line with more than a few short words will likely make the button text too long, particularly for users of screen readers.
25
10
 
26
- ## How to use
27
-
28
- ```jsx live path=core/Accordion/index.tsx
29
- import {
30
- Accordion,
31
- AccordionItem,
32
- AccordionItemDetails,
33
- AccordionItemSummary,
34
- } from 'govgr/components/Accordion';
35
-
36
- function CustomAccordion() {
37
- return (
38
- <Accordion>
39
- <AccordionItem>
40
- <AccordionItemSummary>Βασικες Ρυθμισεις</AccordionItemSummary>
41
- <AccordionItemDetails>
42
- Περιεχομενο Βασικων Ρυθμισεων
43
- </AccordionItemDetails>
44
- </AccordionItem>
45
- <AccordionItem>
46
- <AccordionItemSummary>Υπολοιπες Ρυθμισεις</AccordionItemSummary>
47
- <AccordionItemDetails>
48
- Περιεχομενο Υπολοιπων Ρυθμισεων
49
- </AccordionItemDetails>
50
- </AccordionItem>
51
- </Accordion>
52
- );
53
- }
54
- ```
55
-
56
- ## When to use this component
57
-
58
- Only use an accordion if there’s evidence it’s helpful for users to:
59
-
60
- - see an overview of multiple, related sections of content
61
- - show and hide those sections as needed
11
+ The accordion component lets users show and hide sections of related content on a page.
62
12
 
63
- Accordions can work well for people who use a service regularly, for example users of caseworking systems who need to perform familiar tasks quickly.
13
+
64
14
 
65
- ## When not to use this component
66
15
 
67
- Accordions hide content from users and not everyone will notice them or understand how they work. For this reason do not use an accordion for content which is essential to all users.
16
+ ```bash
17
+ import Accordion from '@digigov/ui/core/Accordion';
18
+ ```
68
19
 
69
- Test your content without an accordion first. Consider if it’s better to:
70
-
71
- - simplify and reduce the amount of content
72
- - split the content across multiple pages
73
- - keep the content on a single page, separated by headings
74
- - use a list of links to let users navigate quickly to specific sections of content
75
-
76
- Do not use the accordion component if the amount of content it would need to contain will make the page slow to load.
77
-
78
- Accordions work best for simple content and links. Do not use accordions to split up a series of questions into sections. Use separate pages instead.
79
-
80
- ## API
20
+ ## How to use
81
21
 
82
- ### Properties
22
+ <Story packageName="@digigov/ui" component="core/Accordion" story="Default.tsx" />
83
23
 
84
- <PropsDoc data={Accordion.__doc__} />
85
- <br />
86
- <PropsDoc data={AccordionItem.__doc__} />
87
- <br />
88
- <PropsDoc data={AccordionItemSummary.__doc__} />
89
- <br />
90
- <PropsDoc data={AccordionItemDetails.__doc__} />
24
+ ### Accordion with Hints
91
25
 
92
- ### Styles
26
+ 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.
93
27
 
94
- <StylesDoc data={Accordion.__doc__} />
95
- <br />
96
- <StylesDoc data={AccordionItem.__doc__} />
97
- <br />
98
- <StylesDoc data={AccordionItemSummary.__doc__} />
99
- <br />
100
- <StylesDoc data={AccordionItemDetails.__doc__} />
101
- <br />
28
+ <Story packageName="@digigov/ui" component="core/Accordion" story="WithHints.tsx" />
@@ -0,0 +1,16 @@
1
+ ---
2
+ id: back-link
3
+ title: Back Link
4
+ ---
5
+
6
+ # Back Link
7
+
8
+ Use the back link component to help users go back to the previous page in a multi-page transaction.
9
+
10
+ ```bash
11
+ import BackLink from "@digigov/ui/core/BackLink";
12
+ ```
13
+
14
+ ## How to use
15
+
16
+ <Story packageName="@digigov/ui" component="core/BackLink" story="Default.tsx" />
@@ -1,8 +1,23 @@
1
1
  ---
2
- parent: docs/ui/components
2
+ id: blockquote
3
3
  title: Blockquote
4
4
  ---
5
5
 
6
+
7
+ # Blockquote
8
+
9
+ This component is currently experimental because adding a summary line with more than a few short words will likely make the button text too long, particularly for users of screen readers.
10
+
11
+ The Blockquote component lets users show and hide sections of related content on a page.
12
+
13
+
14
+
15
+
16
+ ```bash
6
17
  import Blockquote from '@digigov/ui/core/Blockquote';
18
+ ```
19
+
20
+ ## How to use
21
+
22
+ <Story packageName="@digigov/ui" component="core/Blockquote" story="Default.tsx" />
7
23
 
8
- ## Example
@@ -1,7 +1,15 @@
1
1
  import React from 'react';
2
2
  import Breadcrumbs, { BreadcrumbsList, BreadcrumbsListItem } from '@digigov/ui/core/Breadcrumbs';
3
3
 
4
- var _ref = /*#__PURE__*/React.createElement(Breadcrumbs, null, /*#__PURE__*/React.createElement(BreadcrumbsList, null, /*#__PURE__*/React.createElement(BreadcrumbsListItem, null, "\u0391\u03C1\u03C7\u03B9\u03BA\u03AE"), /*#__PURE__*/React.createElement(BreadcrumbsListItem, null, "\u03A5\u03B3\u03B5\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03C0\u03C1\u03CC\u03BD\u03BF\u03B9\u03B1"), /*#__PURE__*/React.createElement(BreadcrumbsListItem, null, "\u03A6\u03AC\u03BA\u03B5\u03BB\u03BF\u03C2 \u03C5\u03B3\u03B5\u03AF\u03B1\u03C2"), /*#__PURE__*/React.createElement(BreadcrumbsListItem, null, "\u0386\u03C5\u03BB\u03B7 \u03C3\u03C5\u03BD\u03C4\u03B1\u03B3\u03BF\u03B3\u03C1\u03AC\u03C6\u03B7\u03C3\u03B7")));
4
+ var _ref = /*#__PURE__*/React.createElement(Breadcrumbs, null, /*#__PURE__*/React.createElement(BreadcrumbsList, null, /*#__PURE__*/React.createElement(BreadcrumbsListItem, {
5
+ href: "#"
6
+ }, "\u0391\u03C1\u03C7\u03B9\u03BA\u03AE"), /*#__PURE__*/React.createElement(BreadcrumbsListItem, {
7
+ href: "#"
8
+ }, "\u03A5\u03B3\u03B5\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03C0\u03C1\u03CC\u03BD\u03BF\u03B9\u03B1"), /*#__PURE__*/React.createElement(BreadcrumbsListItem, {
9
+ href: "#"
10
+ }, "\u03A6\u03AC\u03BA\u03B5\u03BB\u03BF\u03C2 \u03C5\u03B3\u03B5\u03AF\u03B1\u03C2"), /*#__PURE__*/React.createElement(BreadcrumbsListItem, {
11
+ href: "#"
12
+ }, "\u0386\u03C5\u03BB\u03B7 \u03C3\u03C5\u03BD\u03C4\u03B1\u03B3\u03BF\u03B3\u03C1\u03AC\u03C6\u03B7\u03C3\u03B7")));
5
13
 
6
14
  export var Default = function Default() {
7
15
  return _ref;
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: breadcrumbs
3
+ title: Breadcrumbs
4
+ ---
5
+
6
+
7
+ # Breadcrumbs
8
+
9
+ This component is currently experimental because adding a summary line with more than a few short words will likely make the button text too long, particularly for users of screen readers.
10
+
11
+ The Breadcrumbs component lets users show and hide sections of related content on a page.
12
+
13
+
14
+
15
+
16
+ ```bash
17
+ import Breadcrumbs from '@digigov/ui/core/Breadcrumbs';
18
+ ```
19
+
20
+ ## How to use
21
+
22
+ <Story packageName="@digigov/ui" component="core/Breadcrumbs" story="Default.tsx" />
@@ -9,18 +9,53 @@ Use the button component to help users carry out an action like starting an
9
9
  application or saving their information.
10
10
 
11
11
 
12
- ## How to import
12
+
13
13
 
14
14
  ```bash
15
15
  import Button from '@digigov/ui/core/Button';
16
16
  ```
17
17
 
18
- ## Usage
18
+ ## How to use
19
+
20
+ ### Default buttons
21
+
22
+ Use a default button for the main call to action on a page.
19
23
 
20
24
  <Story packageName="@digigov/ui" component="core/Button" story="Primary.tsx" />
21
25
 
26
+
27
+ ### Start buttons
28
+ Use a start button for the main call to action on your service’s start page. Start buttons do not submit form data, so they use a link tag rather than a button tag.
29
+
30
+ <Story packageName="@digigov/ui" component="core/Button" story="CallToActionButton.tsx" />
31
+
32
+ ### Secondary buttons
33
+ Use secondary buttons for secondary calls to action on a page.
34
+
22
35
  <Story packageName="@digigov/ui" component="core/Button" story="Secondary.tsx" />
23
36
 
37
+ ### Warning buttons
38
+ Warning buttons are designed to make users think carefully before they use them. They only work if used very sparingly. Most services should not need one.
39
+
40
+ <Story packageName="@digigov/ui" component="core/Button" story="Warning.tsx" />
41
+
42
+ ### Disable buttons
43
+ Disabled buttons have poor contrast and can confuse some users, so avoid them if possible.
44
+
45
+ <Story packageName="@digigov/ui" component="core/Button" story="Disabled.tsx" />
46
+
47
+
48
+ ### Grouping buttons
49
+ Use a button group when two or more buttons are placed together.
50
+
51
+ <Story packageName="@digigov/ui" component="core/Button" story="GroupingButtons.tsx" />
52
+
53
+ Any links within a button group will automatically align with the buttons.
54
+
55
+ <Story packageName="@digigov/ui" component="core/Button" story="GroupingButtonsAndLinks.tsx" />
56
+
57
+
58
+
24
59
  Write button text in sentence case, describing the action it performs. For
25
60
  example:'
26
61
 
@@ -7,4 +7,6 @@ export * from './__stories__/Primary';
7
7
  export * from './__stories__/Secondary';
8
8
  export * from './__stories__/Warning';
9
9
  export * from './__stories__/GroupingButtons';
10
- export * from './__stories__/GroupingButtonsAndLinks';
10
+ export * from './__stories__/GroupingButtonsAndLinks';
11
+ export * from './__stories__/CallToActionButton';
12
+ export * from './__stories__/Disabled';
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { CallToAction } from '@digigov/ui/core/Button';
3
+
4
+ var _ref = /*#__PURE__*/React.createElement(CallToAction, null, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1");
5
+
6
+ export var CallToActionButton = function CallToActionButton() {
7
+ return _ref;
8
+ };
9
+ export default CallToActionButton;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import Button from '@digigov/ui/core/Button';
3
+ /**
4
+ * My primary descrition is the best description that was described
5
+ */
6
+
7
+ var _ref = /*#__PURE__*/React.createElement(Button, {
8
+ disabled: true
9
+ }, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1");
10
+
11
+ export var Disabled = function Disabled() {
12
+ return _ref;
13
+ };
14
+ export default Disabled;
@@ -7,4 +7,5 @@ var _ref = /*#__PURE__*/React.createElement(Button, {
7
7
 
8
8
  export var Warning = function Warning() {
9
9
  return _ref;
10
- };
10
+ };
11
+ export default Warning;
@@ -10,4 +10,5 @@ export * from '@digigov/ui/core/Card/__stories__/WithGrayTopBorder';
10
10
  export * from '@digigov/ui/core/Card/__stories__/WithDarkTopBorder';
11
11
  export * from '@digigov/ui/core/Card/__stories__/WithDivider';
12
12
  export * from '@digigov/ui/core/Card/__stories__/WithClickableContent';
13
- export * from '@digigov/ui/core/Card/__stories__/WithClickableLink';
13
+ export * from '@digigov/ui/core/Card/__stories__/WithClickableLink';
14
+ export * from '@digigov/ui/core/Card/__stories__/WithGroupButton';
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
- import Card, { CardAction, CardHeading, CardText } from '@digigov/ui/core/Card';
3
- import Button from '@digigov/ui/core/Button';
2
+ import Card, { CardHeading, CardText } from '@digigov/ui/core/Card';
4
3
  import Link from '@digigov/ui/core/Link';
5
4
 
6
5
  var _ref = /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardHeading, null, /*#__PURE__*/React.createElement(Link, {
7
6
  href: "#"
8
- }, "\u0393\u03B5\u03C9\u03C1\u03B3\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03BA\u03C4\u03B7\u03BD\u03BF\u03C4\u03C1\u03BF\u03C6\u03AF\u03B1")), /*#__PURE__*/React.createElement(CardText, null, "\u0394\u03B9\u03B1\u03B4\u03B9\u03BA\u03B1\u03C3\u03AF\u03B5\u03C2, \u03B5\u03C0\u03B9\u03B4\u03BF\u03C4\u03AE\u03C3\u03B5\u03B9\u03C2 \u03BA\u03B1\u03B9 \u03B1\u03C0\u03BF\u03B6\u03B7\u03BC\u03B9\u03CE\u03C3\u03B5\u03B9\u03C2 \u03B3\u03B9\u03B1 \u03C4\u03B7\u03BD \u03B3\u03B5\u03C9\u03C1\u03B3\u03B9\u03BA\u03AE, \u03BA\u03C4\u03B7\u03BD\u03BF\u03C4\u03C1\u03BF\u03C6\u03B9\u03BA\u03AE \u03AE \u03B1\u03BB\u03B9\u03B5\u03C5\u03C4\u03B9\u03BA\u03AE \u03C3\u03B1\u03C2 \u03B4\u03C1\u03B1\u03C3\u03C4\u03B7\u03C1\u03B9\u03CC\u03C4\u03B7\u03C4\u03B1."), /*#__PURE__*/React.createElement(CardAction, null, /*#__PURE__*/React.createElement(Button, null, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1")));
7
+ }, "\u0393\u03B5\u03C9\u03C1\u03B3\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03BA\u03C4\u03B7\u03BD\u03BF\u03C4\u03C1\u03BF\u03C6\u03AF\u03B1")), /*#__PURE__*/React.createElement(CardText, null, "\u0394\u03B9\u03B1\u03B4\u03B9\u03BA\u03B1\u03C3\u03AF\u03B5\u03C2, \u03B5\u03C0\u03B9\u03B4\u03BF\u03C4\u03AE\u03C3\u03B5\u03B9\u03C2 \u03BA\u03B1\u03B9 \u03B1\u03C0\u03BF\u03B6\u03B7\u03BC\u03B9\u03CE\u03C3\u03B5\u03B9\u03C2 \u03B3\u03B9\u03B1 \u03C4\u03B7\u03BD \u03B3\u03B5\u03C9\u03C1\u03B3\u03B9\u03BA\u03AE, \u03BA\u03C4\u03B7\u03BD\u03BF\u03C4\u03C1\u03BF\u03C6\u03B9\u03BA\u03AE \u03AE \u03B1\u03BB\u03B9\u03B5\u03C5\u03C4\u03B9\u03BA\u03AE \u03C3\u03B1\u03C2 \u03B4\u03C1\u03B1\u03C3\u03C4\u03B7\u03C1\u03B9\u03CC\u03C4\u03B7\u03C4\u03B1."));
9
8
 
10
9
  export var WithClickableLink = function WithClickableLink() {
11
10
  return _ref;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import Card, { CardHeading, CardText, CardAction } from '@digigov/ui/core/Card';
3
+ import Button, { ButtonGroup } from '@digigov/ui/core/Button';
4
+ import Link from '@digigov/ui/core/Link';
5
+
6
+ var _ref = /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardHeading, null, "\u0393\u03B5\u03C9\u03C1\u03B3\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03BA\u03C4\u03B7\u03BD\u03BF\u03C4\u03C1\u03BF\u03C6\u03AF\u03B1"), /*#__PURE__*/React.createElement(CardText, null, "\u0394\u03B9\u03B1\u03B4\u03B9\u03BA\u03B1\u03C3\u03AF\u03B5\u03C2, \u03B5\u03C0\u03B9\u03B4\u03BF\u03C4\u03AE\u03C3\u03B5\u03B9\u03C2 \u03BA\u03B1\u03B9 \u03B1\u03C0\u03BF\u03B6\u03B7\u03BC\u03B9\u03CE\u03C3\u03B5\u03B9\u03C2 \u03B3\u03B9\u03B1 \u03C4\u03B7\u03BD \u03B3\u03B5\u03C9\u03C1\u03B3\u03B9\u03BA\u03AE, \u03BA\u03C4\u03B7\u03BD\u03BF\u03C4\u03C1\u03BF\u03C6\u03B9\u03BA\u03AE \u03AE \u03B1\u03BB\u03B9\u03B5\u03C5\u03C4\u03B9\u03BA\u03AE \u03C3\u03B1\u03C2 \u03B4\u03C1\u03B1\u03C3\u03C4\u03B7\u03C1\u03B9\u03CC\u03C4\u03B7\u03C4\u03B1."), /*#__PURE__*/React.createElement(CardAction, null, /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(Button, null, "\u03A3\u03C5\u03BD\u03AD\u03C7\u03B5\u03B9\u03B1"), /*#__PURE__*/React.createElement(Link, null, "\u0391\u03BA\u03CD\u03C1\u03C9\u03C3\u03B7"))));
7
+
8
+ export var WithGroupButton = function WithGroupButton() {
9
+ return _ref;
10
+ };
11
+ export default WithGroupButton;
@@ -0,0 +1,78 @@
1
+ ---
2
+ id: card
3
+ title: Card
4
+ ---
5
+
6
+
7
+ # Card
8
+
9
+ Cards can be used to divide and organise interface content for better understandability and readability.
10
+ When used correctly, Cards can help users to scan through vast amounts of information quicker.
11
+
12
+
13
+
14
+
15
+ ```bash
16
+ import Card from '@digigov/ui/core/Card';
17
+ ```
18
+
19
+ ## How to use
20
+
21
+ <Story packageName="@digigov/ui" component="core/Card" story="Default.tsx" />
22
+
23
+
24
+ ### Card with border
25
+
26
+ You can set the color of the Card's border. You can choose between `dark` and `grey` color respectively.
27
+
28
+ #### Card with gray border color
29
+
30
+ <Story packageName="@digigov/ui" component="core/Card" story="WithGrayBorder.tsx" />
31
+
32
+ #### Card with dark border color
33
+
34
+ <Story packageName="@digigov/ui" component="core/Card" story="WithDarkBorder.tsx" />
35
+
36
+
37
+ ### Card with top border
38
+
39
+ You can set the color of the Card's top border. You can choose between dark and grey color respectively. By default the top border color is grey
40
+
41
+ #### Card with grey top border
42
+
43
+ <Story packageName="@digigov/ui" component="core/Card" story="WithGrayTopBorder.tsx" />
44
+
45
+ #### Card with dark top border
46
+
47
+ <Story packageName="@digigov/ui" component="core/Card" story="WithDarkTopBorder.tsx" />
48
+
49
+
50
+ ### Card with divider
51
+
52
+ <Story packageName="@digigov/ui" component="core/Card" story="WithDivider.tsx" />
53
+
54
+
55
+ ### Card with actions
56
+
57
+ #### Card with title link
58
+
59
+ Cards can be used without an action button, but with a clickable title.
60
+
61
+ <Story packageName="@digigov/ui" component="core/Card" story="WithClickableLink.tsx" />
62
+
63
+ #### Card with clickable content
64
+
65
+ You can expand the clickable area of the link to fill Card's content.
66
+
67
+ <Story packageName="@digigov/ui" component="core/Card" story="WithClickableContent.tsx" />
68
+
69
+
70
+ Cards also provides styles for actionable elements such as Buttons or Links.
71
+
72
+ #### Card with button or link
73
+
74
+ <Story packageName="@digigov/ui" component="core/Card" story="Default.tsx" />
75
+
76
+ #### Card with a group of actions
77
+
78
+ <Story packageName="@digigov/ui" component="core/Card" story="WithGroupButton.tsx" />
@@ -7,5 +7,6 @@ export * from '@digigov/ui/core/Checkboxes/__stories__/Default';
7
7
  export * from '@digigov/ui/core/Checkboxes/__stories__/MultipleQuestions';
8
8
  export * from '@digigov/ui/core/Checkboxes/__stories__/WithHint';
9
9
  export * from '@digigov/ui/core/Checkboxes/__stories__/NoneAnswer';
10
+ export * from '@digigov/ui/core/Checkboxes/__stories__/NoneAnswerWithError';
10
11
  export * from '@digigov/ui/core/Checkboxes/__stories__/WithErrorMessage';
11
12
  export * from '@digigov/ui/core/Checkboxes/__stories__/ConditionalReveal';
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import Checkboxes, { CheckboxItem } from '@digigov/ui/core/Checkboxes';
3
+ import Field, { Fieldset, FieldsetLegend } from '@digigov/ui/core/Field';
4
+ import Hint from '@digigov/ui/typography/Hint';
5
+ import VisuallyHidden from '@digigov/react-core/VisuallyHidden';
6
+ import ErrorMessage from '@digigov/react-core/ErrorMessage';
7
+
8
+ var _ref = /*#__PURE__*/React.createElement(Field, {
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 \u03C4\u03B9\u03C2 \u03C7\u03CE\u03C1\u03B5\u03C2 \u03C3\u03C4\u03B9\u03C2 \u03BF\u03C0\u03BF\u03AF\u03B5\u03C2 \u03B8\u03B1 \u03C4\u03B1\u03BE\u03B9\u03B4\u03AD\u03C8\u03B5\u03C4\u03B5, \u03AE \u03B5\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \xAB\u038C\u03C7\u03B9, \u03B4\u03B5\u03BD \u03B8\u03B1 \u03C4\u03B1\u03BE\u03B9\u03B4\u03AD\u03C8\u03C9 \u03C3\u03B5 \u03BA\u03B1\u03BC\u03AF\u03B1 \u03B1\u03C0\u03CC \u03B1\u03C5\u03C4\u03AD\u03C2 \u03C4\u03B9\u03C2 \u03C7\u03CE\u03C1\u03B5\u03C2\xBB."), /*#__PURE__*/React.createElement(Checkboxes, null, /*#__PURE__*/React.createElement(CheckboxItem, {
11
+ checked: true,
12
+ name: "en",
13
+ value: "en"
14
+ }, "\u0391\u03B3\u03B3\u03BB\u03AF\u03B1"), /*#__PURE__*/React.createElement(CheckboxItem, {
15
+ name: "fr",
16
+ value: "fever"
17
+ }, "\u0393\u03B1\u03BB\u03BB\u03AF\u03B1"), /*#__PURE__*/React.createElement("div", {
18
+ className: "govgr-checkboxes__divider"
19
+ }, "\u03AE"), /*#__PURE__*/React.createElement(CheckboxItem, {
20
+ checked: true,
21
+ name: "none",
22
+ value: "none"
23
+ }, "\u038C\u03C7\u03B9, \u03B4\u03B5\u03BD \u03B8\u03B1 \u03C4\u03B1\u03BE\u03B9\u03B4\u03AD\u03C8\u03C9 \u03C3\u03B5 \u03BA\u03B1\u03BC\u03AF\u03B1 \u03B1\u03C0\u03CC \u03B1\u03C5\u03C4\u03AD\u03C2 \u03C4\u03B9\u03C2 \u03C7\u03CE\u03C1\u03B5\u03C2"))));
24
+
25
+ export var NoneAnswer = function NoneAnswer() {
26
+ return _ref;
27
+ };
28
+ export default NoneAnswer;
@@ -0,0 +1,54 @@
1
+ ---
2
+ id: checkboxes
3
+ title: Checkboxes
4
+ ---
5
+
6
+
7
+ # Checkboxes
8
+
9
+
10
+
11
+
12
+ ```bash
13
+ import Checkboxes from '@digigov/ui/core/Checkboxes';
14
+ ```
15
+
16
+ ## How to use
17
+
18
+ <Story packageName="@digigov/ui" component="core/Checkboxes" story="Default.tsx" />
19
+
20
+ ### If you’re asking more than one question on the page
21
+
22
+ <Story packageName="@digigov/ui" component="core/Checkboxes" story="MultipleQuestions.tsx" />
23
+
24
+ ### Checkbox items with hints
25
+
26
+ You can add hints to checkbox items to provide additional information about the options.
27
+
28
+ <Story packageName="@digigov/ui" component="core/Checkboxes" story="WithHint.tsx" />
29
+
30
+ ### Add an option for ‘none’
31
+
32
+ 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.
33
+
34
+ <Story packageName="@digigov/ui" component="core/Checkboxes" story="NoneAnswer.tsx" />
35
+
36
+ If JavaScript is unavailable, and a user selects both the ‘none’ checkbox and another checkbox, display an error message.
37
+
38
+ <Story packageName="@digigov/ui" component="core/Checkboxes" story="NoneAnswerWithError.tsx" />
39
+
40
+ ### Error messages
41
+
42
+ Error messages should be styled like this:
43
+
44
+ <Story packageName="@digigov/ui" component="core/Checkboxes" story="WithErrorMessage.tsx" />
45
+
46
+ ## Conditionally revealing a related question
47
+
48
+ 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.
49
+
50
+ 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.
51
+
52
+ <Story packageName="@digigov/ui" component="core/Checkboxes" story="ConditionalReveal.tsx" />
53
+
54
+
@@ -0,0 +1,19 @@
1
+ ---
2
+ id: confirmation
3
+ title: Confirmation
4
+ ---
5
+
6
+
7
+ # Confirmation
8
+
9
+
10
+
11
+
12
+
13
+ ```bash
14
+ import Confirmation from '@digigov/ui/core/Confirmation';
15
+ ```
16
+
17
+ ## How to use
18
+
19
+ <Story packageName="@digigov/ui" component="core/Confirmation" story="Default.tsx" />
@@ -4,5 +4,6 @@ export default {
4
4
  component: DateInput
5
5
  };
6
6
  export * from '@digigov/ui/core/DateInput/__stories__/Default';
7
+ export * from '@digigov/ui/core/DateInput/__stories__/MultipleQuestions';
7
8
  export * from '@digigov/ui/core/DateInput/__stories__/WithErrorMessage';
8
9
  export * from '@digigov/ui/core/DateInput/__stories__/WithErrorMessageForSingleField';
@@ -3,7 +3,9 @@ import DateInput, { DateInputItem } from '@digigov/ui/core/DateInput';
3
3
  import Field, { Fieldset, FieldsetLegend } from '@digigov/ui/core/Field';
4
4
  import Hint from '@digigov/ui/typography/Hint';
5
5
 
6
- var _ref = /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Fieldset, null, /*#__PURE__*/React.createElement(FieldsetLegend, null, "\u03A0\u03CC\u03C4\u03B5 \u03B5\u03BA\u03B4\u03CC\u03B8\u03B7\u03BA\u03B5 \u03C4\u03BF \u03B4\u03B9\u03B1\u03B2\u03B1\u03C4\u03AE\u03C1\u03B9\u03BF \u03C3\u03B1\u03C2;"), /*#__PURE__*/React.createElement(Hint, null, "\u0393\u03B9\u03B1 \u03C0\u03B1\u03C1\u03AC\u03B4\u03B5\u03B9\u03B3\u03BC\u03B1, 05 11 2020"), /*#__PURE__*/React.createElement(DateInput, null, /*#__PURE__*/React.createElement(DateInputItem, {
6
+ var _ref = /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Fieldset, null, /*#__PURE__*/React.createElement(FieldsetLegend, {
7
+ heading: true
8
+ }, "\u03A0\u03CC\u03C4\u03B5 \u03B5\u03BA\u03B4\u03CC\u03B8\u03B7\u03BA\u03B5 \u03C4\u03BF \u03B4\u03B9\u03B1\u03B2\u03B1\u03C4\u03AE\u03C1\u03B9\u03BF \u03C3\u03B1\u03C2;"), /*#__PURE__*/React.createElement(Hint, null, "\u0393\u03B9\u03B1 \u03C0\u03B1\u03C1\u03AC\u03B4\u03B5\u03B9\u03B3\u03BC\u03B1, 05 11 2020"), /*#__PURE__*/React.createElement(DateInput, null, /*#__PURE__*/React.createElement(DateInputItem, {
7
9
  name: "day"
8
10
  }, "\u0397\u03BC\u03AD\u03C1\u03B1"), /*#__PURE__*/React.createElement(DateInputItem, {
9
11
  name: "month"
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import DateInput, { DateInputItem } from '@digigov/ui/core/DateInput';
3
+ import Field, { Fieldset, FieldsetLegend } from '@digigov/ui/core/Field';
4
+ import Hint from '@digigov/ui/typography/Hint';
5
+
6
+ var _ref = /*#__PURE__*/React.createElement(Field, null, /*#__PURE__*/React.createElement(Fieldset, null, /*#__PURE__*/React.createElement(FieldsetLegend, {
7
+ size: "m"
8
+ }, "\u03A0\u03CC\u03C4\u03B5 \u03B5\u03BA\u03B4\u03CC\u03B8\u03B7\u03BA\u03B5 \u03C4\u03BF \u03B4\u03B9\u03B1\u03B2\u03B1\u03C4\u03AE\u03C1\u03B9\u03BF \u03C3\u03B1\u03C2;"), /*#__PURE__*/React.createElement(Hint, null, "\u0393\u03B9\u03B1 \u03C0\u03B1\u03C1\u03AC\u03B4\u03B5\u03B9\u03B3\u03BC\u03B1, 05 11 2020"), /*#__PURE__*/React.createElement(DateInput, null, /*#__PURE__*/React.createElement(DateInputItem, {
9
+ name: "day"
10
+ }, "\u0397\u03BC\u03AD\u03C1\u03B1"), /*#__PURE__*/React.createElement(DateInputItem, {
11
+ name: "month"
12
+ }, "\u039C\u03AE\u03BD\u03B1\u03C2"), /*#__PURE__*/React.createElement(DateInputItem, {
13
+ width: 4,
14
+ name: "year"
15
+ }, "\u03A7\u03C1\u03CC\u03BD\u03BF\u03C2"))));
16
+
17
+ export var MultipleQuestions = function MultipleQuestions() {
18
+ return _ref;
19
+ };
20
+ export default MultipleQuestions;
@@ -0,0 +1,34 @@
1
+ ---
2
+ id: date-input
3
+ title: DateInput
4
+ ---
5
+
6
+
7
+ # DateInput
8
+
9
+
10
+
11
+
12
+
13
+ ```bash
14
+ import DateInput from '@digigov/ui/core/DateInput';
15
+ ```
16
+
17
+ ## How to use
18
+
19
+ <Story packageName="@digigov/ui" component="core/DateInput" story="Default.tsx" />
20
+
21
+ ### If you’re asking more than one question on the page
22
+
23
+ <Story packageName="@digigov/ui" component="core/DateInput" story="MultipleQuestions.tsx" />
24
+
25
+
26
+ ### Error message
27
+
28
+ If you’re highlighting the whole date, style all the fields like this:
29
+
30
+ <Story packageName="@digigov/ui" component="core/DateInput" story="WithErrorMessage.tsx" />
31
+
32
+ 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:
33
+
34
+ <Story packageName="@digigov/ui" component="core/DateInput" story="WithErrorMessageForSingleField.tsx" />
@@ -1,34 +1,18 @@
1
1
  ---
2
- parent: docs/ui/components
2
+ id: details
3
3
  title: Details
4
4
  ---
5
5
 
6
- ## Example
6
+ # Details
7
7
 
8
- ```jsx live
9
- <Details>
10
- <DetailsSummary>Help with nationality</DetailsSummary>
11
- <DetailsContent>
12
- We need to know your nationality so we can work out which elections you’re
13
- entitled to vote in. If you cannot provide your nationality, you’ll have to
14
- send copies of identity documents through the post.
15
- </DetailsContent>
16
- </Details>
17
- ```
8
+ The details component is a short link that shows more detailed help text when a user clicks on it.
9
+
18
10
 
19
- <br />
20
11
 
21
- ## When to use this component
12
+ ```bash
13
+ import Details from '@digigov/ui/core/Details';
14
+ ```
22
15
 
23
- Use the Details component to make a page easier to scan when it contains
24
- information that only some users will need.
16
+ ## How to use
25
17
 
26
- ## When not to use this component
27
-
28
- Do not use the Details component to hide information that the majority of
29
- your users should see.
30
-
31
- ## How it works
32
-
33
- The Details component is a short link that expands into a text including some
34
- extra information, when a user clicks on it.
18
+ <Story packageName="@digigov/ui" component="core/Details" story="Default.tsx" />