@digigov/ui 2.0.0-6e3977bc → 2.0.0-834daea4

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 (322) hide show
  1. package/app/Header/__stories__/WithServiceNameAndLogo/index.js +2 -2
  2. package/app/Header/__stories__/WithServiceNameAndLogo.js.map +2 -2
  3. package/app/Loader/index.d.ts +1 -1
  4. package/app/Loader/index.js +1 -1
  5. package/app/Loader/index.js.map +1 -1
  6. package/app/Loader/index.native/index.js +102 -0
  7. package/{api/APIErrors → app/Loader/index.native}/package.json +1 -1
  8. package/app/Loader/index.native.d.ts +3 -0
  9. package/app/Loader/index.native.js.map +7 -0
  10. package/app/Loader/index.web/index.js +2 -0
  11. package/{api/fetchAPI → app/Loader/index.web}/package.json +1 -1
  12. package/app/Loader/index.web.d.ts +1 -0
  13. package/app/Loader/index.web.js.map +7 -0
  14. package/app/Masthead/Masthead.stories/index.js +2 -0
  15. package/app/Masthead/Masthead.stories.d.ts +1 -0
  16. package/app/Masthead/Masthead.stories.js.map +2 -2
  17. package/app/Masthead/__stories__/Secondary/index.js +13 -0
  18. package/app/Masthead/__stories__/Secondary/package.json +6 -0
  19. package/app/Masthead/__stories__/Secondary.d.ts +3 -0
  20. package/app/Masthead/__stories__/Secondary.js.map +7 -0
  21. package/app/Modal/auto/index.js +1 -1
  22. package/app/Modal/auto.js.map +2 -2
  23. package/app/Modal/index.d.ts +2 -2
  24. package/app/Modal/index.js +2 -2
  25. package/app/Modal/index.js.map +1 -1
  26. package/app/Modal/index.native/index.js +20 -0
  27. package/{api → app/Modal/index.native}/package.json +1 -1
  28. package/app/Modal/index.native.d.ts +7 -0
  29. package/app/Modal/index.native.js.map +7 -0
  30. package/app/Modal/{Modal → index.web}/index.js +3 -3
  31. package/{api/APIProvider → app/Modal/index.web}/package.json +1 -1
  32. package/app/Modal/{Modal.js.map → index.web.js.map} +2 -2
  33. package/app/QrCodeScanner/index.js.map +2 -2
  34. package/cjs/app/Header/__stories__/WithServiceNameAndLogo.js.map +3 -3
  35. package/cjs/app/Loader/index.js +3 -3
  36. package/cjs/app/Loader/index.js.map +2 -2
  37. package/cjs/app/Loader/index.native/index.js +135 -0
  38. package/cjs/app/Loader/index.native.js.map +7 -0
  39. package/cjs/app/Loader/index.web/index.js +22 -0
  40. package/cjs/app/Loader/index.web.js.map +7 -0
  41. package/cjs/app/Masthead/Masthead.stories/index.js +3 -0
  42. package/cjs/app/Masthead/Masthead.stories.js.map +2 -2
  43. package/cjs/app/Masthead/__stories__/Secondary/index.js +46 -0
  44. package/cjs/app/Masthead/__stories__/Secondary.js.map +7 -0
  45. package/cjs/app/Modal/auto/index.js +1 -1
  46. package/cjs/app/Modal/auto.js.map +2 -2
  47. package/cjs/app/Modal/index.js +3 -3
  48. package/cjs/app/Modal/index.js.map +2 -2
  49. package/cjs/{api/APIProvider → app/Modal/index.native}/index.js +20 -26
  50. package/cjs/app/Modal/index.native.js.map +7 -0
  51. package/cjs/app/Modal/{Modal → index.web}/index.js +6 -6
  52. package/cjs/app/Modal/{Modal.js.map → index.web.js.map} +2 -2
  53. package/cjs/app/QrCodeScanner/index.js.map +2 -2
  54. package/cjs/content/Table/Table.stories/index.js +3 -3
  55. package/cjs/content/Table/Table.stories.js.map +2 -2
  56. package/cjs/content/Table/__stories__/{Densed → Dense}/index.js +9 -9
  57. package/cjs/content/Table/__stories__/{Densed.js.map → Dense.js.map} +3 -3
  58. package/cjs/feedback/CopyToClipboard/__stories__/Default/index.js +1 -1
  59. package/cjs/feedback/CopyToClipboard/__stories__/Default.js.map +2 -2
  60. package/cjs/form/DateInputContainer/__stories__/MultipleQuestions/index.js +1 -1
  61. package/cjs/form/DateInputContainer/__stories__/MultipleQuestions.js.map +1 -1
  62. package/cjs/form/SearchContainer/SearchContainer.stories/index.js +46 -0
  63. package/cjs/form/SearchContainer/SearchContainer.stories.js.map +7 -0
  64. package/cjs/{api/APIErrors → form/SearchContainer/__stories__/Default}/index.js +12 -42
  65. package/cjs/form/SearchContainer/__stories__/Default.js.map +7 -0
  66. package/cjs/i18n/locales/el/index.js +7 -1
  67. package/cjs/i18n/locales/el.js.map +2 -2
  68. package/cjs/layouts/Basic/Bottom/__stories__/Default/index.js +7 -5
  69. package/cjs/layouts/Basic/Bottom/__stories__/Default.js.map +3 -3
  70. package/cjs/layouts/Basic/Container/__stories__/Default/index.js +6 -4
  71. package/cjs/layouts/Basic/Container/__stories__/Default.js.map +3 -3
  72. package/cjs/layouts/Basic/Main/__stories__/Default/index.js +6 -4
  73. package/cjs/layouts/Basic/Main/__stories__/Default.js.map +3 -3
  74. package/cjs/layouts/Basic/Top/__stories__/Default/index.js +6 -4
  75. package/cjs/layouts/Basic/Top/__stories__/Default.js.map +3 -3
  76. package/cjs/lazy/index.js +3 -7
  77. package/cjs/lazy.js.map +2 -2
  78. package/cjs/navigation/Breadcrumbs/Breadcrumbs.stories.js.map +1 -1
  79. package/cjs/navigation/Drawer/__stories__/Auto/index.js +3 -1
  80. package/cjs/navigation/Drawer/__stories__/Auto.js.map +2 -2
  81. package/cjs/navigation/Drawer/__stories__/Default/index.js +2 -2
  82. package/cjs/navigation/Drawer/__stories__/Default.js.map +3 -3
  83. package/cjs/navigation/NavList/__stories__/UsingNavListAuto/index.js +22 -22
  84. package/cjs/navigation/NavList/__stories__/UsingNavListAuto.js.map +2 -2
  85. package/cjs/navigation/NavList/__stories__/Vertical/index.js +25 -17
  86. package/cjs/navigation/NavList/__stories__/Vertical.js.map +2 -2
  87. package/cjs/navigation/Pagination/__stories__/Auto/index.js +7 -9
  88. package/cjs/navigation/Pagination/__stories__/Auto.js.map +3 -3
  89. package/cjs/registry/index.js +6 -18
  90. package/cjs/registry.js.map +2 -2
  91. package/content/Table/Table.stories/index.js +2 -2
  92. package/content/Table/Table.stories.d.ts +1 -1
  93. package/content/Table/Table.stories.js.map +2 -2
  94. package/content/Table/__stories__/{Densed → Dense}/index.js +5 -5
  95. package/content/Table/__stories__/Dense/package.json +6 -0
  96. package/content/Table/__stories__/Dense.d.ts +3 -0
  97. package/content/Table/__stories__/{Densed.js.map → Dense.js.map} +3 -3
  98. package/feedback/CopyToClipboard/__stories__/Default/index.js +1 -1
  99. package/feedback/CopyToClipboard/__stories__/Default.js.map +2 -2
  100. package/form/DateInputContainer/__stories__/MultipleQuestions/index.js +1 -1
  101. package/form/DateInputContainer/__stories__/MultipleQuestions.js.map +1 -1
  102. package/form/SearchContainer/SearchContainer.stories/index.js +13 -0
  103. package/form/SearchContainer/SearchContainer.stories/package.json +6 -0
  104. package/form/SearchContainer/SearchContainer.stories.d.ts +9 -0
  105. package/form/SearchContainer/SearchContainer.stories.js.map +7 -0
  106. package/form/SearchContainer/__stories__/Default/index.js +11 -0
  107. package/form/SearchContainer/__stories__/Default/package.json +6 -0
  108. package/form/SearchContainer/__stories__/Default.d.ts +3 -0
  109. package/form/SearchContainer/__stories__/Default.js.map +7 -0
  110. package/form/SearchContainer/index.test.d.ts +1 -0
  111. package/i18n/locales/el/index.js +7 -1
  112. package/i18n/locales/el.d.ts +6 -0
  113. package/i18n/locales/el.js.map +2 -2
  114. package/index.js +1 -1
  115. package/layouts/Basic/Bottom/__stories__/Default/index.js +7 -5
  116. package/layouts/Basic/Bottom/__stories__/Default.js.map +2 -2
  117. package/layouts/Basic/Container/__stories__/Default/index.js +6 -4
  118. package/layouts/Basic/Container/__stories__/Default.js.map +2 -2
  119. package/layouts/Basic/Main/__stories__/Default/index.js +6 -4
  120. package/layouts/Basic/Main/__stories__/Default.js.map +2 -2
  121. package/layouts/Basic/Top/__stories__/Default/index.js +6 -4
  122. package/layouts/Basic/Top/__stories__/Default.js.map +2 -2
  123. package/lazy/index.js +3 -7
  124. package/lazy.d.ts +1 -5
  125. package/lazy.js.map +2 -2
  126. package/navigation/Breadcrumbs/Breadcrumbs.stories.js.map +1 -1
  127. package/navigation/Drawer/__stories__/Auto/index.js +3 -1
  128. package/navigation/Drawer/__stories__/Auto.d.ts +1 -0
  129. package/navigation/Drawer/__stories__/Auto.js.map +2 -2
  130. package/navigation/Drawer/__stories__/Default/index.js +1 -1
  131. package/navigation/Drawer/__stories__/Default.js.map +2 -2
  132. package/navigation/NavList/__stories__/UsingNavListAuto/index.js +23 -23
  133. package/navigation/NavList/__stories__/UsingNavListAuto.js.map +2 -2
  134. package/navigation/NavList/__stories__/Vertical/index.js +25 -17
  135. package/navigation/NavList/__stories__/Vertical.js.map +2 -2
  136. package/navigation/Pagination/__stories__/Auto/index.js +8 -12
  137. package/navigation/Pagination/__stories__/Auto.js.map +2 -2
  138. package/package.json +10 -8
  139. package/registry/index.js +6 -18
  140. package/registry.d.ts +4 -9
  141. package/registry.js.map +2 -2
  142. package/src/app/Footer/{index.mdx → doc.mdx} +7 -23
  143. package/src/app/Header/__snapshots__/index.spec.tsx.snap +42 -36
  144. package/src/app/Header/__stories__/WithServiceNameAndLogo.tsx +2 -2
  145. package/src/app/Header/doc.mdx +32 -0
  146. package/src/app/Loader/index.native.tsx +98 -0
  147. package/src/app/Loader/index.tsx +1 -1
  148. package/src/app/Loader/index.web.tsx +1 -0
  149. package/src/app/Masthead/Masthead.stories.js +1 -0
  150. package/src/app/Masthead/__stories__/Secondary.tsx +26 -0
  151. package/src/app/Masthead/{index.mdx → doc.mdx} +13 -1
  152. package/src/app/Masthead/index.test.tsx +4 -0
  153. package/src/app/Modal/auto.tsx +1 -1
  154. package/src/app/Modal/{index.mdx → doc.mdx} +9 -6
  155. package/src/app/Modal/index.native.tsx +17 -0
  156. package/src/app/Modal/index.tsx +2 -2
  157. package/src/app/NotFound/{index.mdx → doc.mdx} +2 -4
  158. package/src/app/Panel/{index.mdx → doc.mdx} +3 -1
  159. package/src/app/PhaseBannerHeader/{index.mdx → doc.mdx} +3 -5
  160. package/src/app/QrCodeScanner/__snapshots__/index.spec.tsx.snap +6 -10
  161. package/src/app/QrCodeScanner/index.tsx +1 -0
  162. package/src/app/QrCodeViewer/{index.mdx → doc.mdx} +4 -12
  163. package/src/app/Skeleton/doc.mdx +42 -0
  164. package/src/content/Accordion/__snapshots__/index.spec.tsx.snap +48 -147
  165. package/src/content/Accordion/{index.mdx → doc.mdx} +2 -13
  166. package/src/content/Blockquote/__snapshots__/index.spec.tsx.snap +6 -9
  167. package/src/content/Blockquote/{index.mdx → doc.mdx} +5 -5
  168. package/src/content/Card/doc.mdx +71 -0
  169. package/src/content/Chip/doc.mdx +34 -0
  170. package/src/content/Details/__snapshots__/index.spec.tsx.snap +32 -69
  171. package/src/content/Details/{index.mdx → doc.mdx} +1 -5
  172. package/src/content/List/__snapshots__/index.spec.tsx.snap +3 -3
  173. package/src/content/List/doc.mdx +28 -0
  174. package/src/content/StepNav/{index.mdx → doc.mdx} +5 -19
  175. package/src/content/SummaryList/__snapshots__/index.spec.tsx.snap +37 -89
  176. package/src/content/SummaryList/{index.mdx → doc.mdx} +6 -18
  177. package/src/content/Table/Table.stories.js +1 -1
  178. package/src/content/Table/__stories__/{Densed.tsx → Dense.tsx} +2 -2
  179. package/src/content/Table/doc.mdx +81 -0
  180. package/src/content/Table/index.test.tsx +3 -3
  181. package/src/content/TaskList/{index.mdx → doc.mdx} +4 -6
  182. package/src/content/Timeline/{index.mdx → doc.mdx} +4 -6
  183. package/src/feedback/CopyToClipboard/__stories__/Default.tsx +1 -1
  184. package/src/feedback/CopyToClipboard/doc.mdx +22 -0
  185. package/src/feedback/ErrorSummary/__snapshots__/index.spec.tsx.snap +3 -3
  186. package/src/feedback/ErrorSummary/{index.mdx → doc.mdx} +6 -22
  187. package/src/feedback/NotificationBanner/__snapshots__/index.spec.tsx.snap +1 -1
  188. package/src/feedback/NotificationBanner/{index.mdx → doc.mdx} +8 -19
  189. package/src/feedback/PhaseBanner/{index.mdx → doc.mdx} +2 -12
  190. package/src/feedback/WarningText/__snapshots__/index.spec.tsx.snap +3 -3
  191. package/src/feedback/WarningText/{index.mdx → doc.mdx} +8 -6
  192. package/src/form/AutoComplete/doc.mdx +50 -0
  193. package/src/form/Button/__snapshots__/index.spec.tsx.snap +6 -10
  194. package/src/form/Button/{index.mdx → doc.mdx} +12 -27
  195. package/src/form/Checkbox/{index.mdx → doc.mdx} +10 -36
  196. package/src/form/DateInputContainer/__stories__/MultipleQuestions.tsx +1 -1
  197. package/src/form/DateInputContainer/{index.mdx → doc.mdx} +7 -21
  198. package/src/form/ErrorMessage/{index.mdx → doc.mdx} +1 -5
  199. package/src/form/FileUpload/{index.mdx → doc.mdx} +2 -10
  200. package/src/form/RadioContainer/{index.mdx → doc.mdx} +10 -36
  201. package/src/form/SearchContainer/SearchContainer.stories.js +9 -0
  202. package/src/form/SearchContainer/__stories__/Default.tsx +13 -0
  203. package/src/form/SearchContainer/doc.mdx +16 -0
  204. package/src/form/SearchContainer/index.test.tsx +20 -0
  205. package/src/form/SelectContainer/{index.mdx → doc.mdx} +3 -19
  206. package/src/form/SingleCharacterInputs/{index.mdx → doc.mdx} +3 -11
  207. package/src/form/TextArea/doc.mdx +48 -0
  208. package/src/form/TextInput/{index.mdx → doc.mdx} +12 -44
  209. package/src/i18n/locales/el.ts +15 -8
  210. package/src/layouts/Basic/Bottom/__stories__/Default.tsx +13 -9
  211. package/src/layouts/Basic/Bottom/{index.mdx → doc.mdx} +1 -5
  212. package/src/layouts/Basic/Container/__stories__/Default.tsx +15 -8
  213. package/src/layouts/Basic/Container/{index.mdx → doc.mdx} +1 -6
  214. package/src/layouts/Basic/Main/__stories__/Default.tsx +15 -8
  215. package/src/layouts/Basic/Main/{index.mdx → doc.mdx} +3 -5
  216. package/src/layouts/Basic/Top/__stories__/Default.tsx +13 -6
  217. package/src/layouts/Basic/Top/doc.mdx +19 -0
  218. package/src/layouts/Basic/__snapshots__/index.spec.tsx.snap +30 -102
  219. package/src/layouts/Basic/{index.mdx → doc.mdx} +7 -18
  220. package/src/layouts/Grid/doc.mdx +26 -0
  221. package/src/layouts/Stack/doc.mdx +38 -0
  222. package/src/lazy.js +4 -8
  223. package/src/navigation/BackLink/{index.mdx → doc.mdx} +1 -5
  224. package/src/navigation/Breadcrumbs/Breadcrumbs.stories.js +0 -1
  225. package/src/navigation/Breadcrumbs/{index.mdx → doc.mdx} +5 -5
  226. package/src/navigation/Drawer/__stories__/Auto.tsx +3 -1
  227. package/src/navigation/Drawer/__stories__/Default.tsx +2 -2
  228. package/src/navigation/Drawer/{index.mdx → doc.mdx} +5 -1
  229. package/src/navigation/Dropdown/{index.mdx → doc.mdx} +3 -15
  230. package/src/navigation/Link/__snapshots__/index.spec.tsx.snap +16 -30
  231. package/src/navigation/Link/{index.mdx → doc.mdx} +7 -19
  232. package/src/navigation/NavList/__snapshots__/index.spec.tsx.snap +3 -3
  233. package/src/navigation/NavList/__stories__/UsingNavListAuto.tsx +26 -27
  234. package/src/navigation/NavList/__stories__/Vertical.tsx +16 -12
  235. package/src/navigation/NavList/{index.mdx → doc.mdx} +19 -22
  236. package/src/navigation/Pagination/__stories__/Auto.tsx +29 -31
  237. package/src/navigation/Pagination/doc.mdx +32 -0
  238. package/src/navigation/Tabs/doc.mdx +47 -0
  239. package/src/registry.js +6 -18
  240. package/src/typography/CodeBlock/doc.mdx +30 -0
  241. package/src/typography/Heading/{index.mdx → doc.mdx} +3 -5
  242. package/src/typography/HeadingCaption/{index.mdx → doc.mdx} +5 -5
  243. package/src/typography/Hint/{index.mdx → doc.mdx} +4 -10
  244. package/src/typography/NormalText/doc.mdx +30 -0
  245. package/src/typography/Paragraph/doc.mdx +34 -0
  246. package/src/typography/Typography/doc.mdx +14 -0
  247. package/src/utils/VisuallyHidden/{index.mdx → doc.mdx} +3 -6
  248. package/api/APIErrors/index.js +0 -40
  249. package/api/APIErrors.d.ts +0 -23
  250. package/api/APIErrors.js.map +0 -7
  251. package/api/APIProvider/index.js +0 -24
  252. package/api/APIProvider.d.ts +0 -16
  253. package/api/APIProvider.js.map +0 -7
  254. package/api/fetchAPI/index.js +0 -29
  255. package/api/fetchAPI.d.ts +0 -14
  256. package/api/fetchAPI.js.map +0 -7
  257. package/api/index.d.ts +0 -8
  258. package/api/index.js +0 -12
  259. package/api/index.js.map +0 -7
  260. package/api/index.spec.d.ts +0 -1
  261. package/api/useResource/index.js +0 -79
  262. package/api/useResource/package.json +0 -6
  263. package/api/useResource.d.ts +0 -11
  264. package/api/useResource.js.map +0 -7
  265. package/api/useResourceAction/index.js +0 -74
  266. package/api/useResourceAction/package.json +0 -6
  267. package/api/useResourceAction.d.ts +0 -2
  268. package/api/useResourceAction.js.map +0 -7
  269. package/api/useResourceQuery/index.js +0 -149
  270. package/api/useResourceQuery/package.json +0 -6
  271. package/api/useResourceQuery.d.ts +0 -18
  272. package/api/useResourceQuery.js.map +0 -7
  273. package/api/utils/index.js +0 -131
  274. package/api/utils/package.json +0 -6
  275. package/api/utils.d.ts +0 -10
  276. package/api/utils.js.map +0 -7
  277. package/app/Modal/Modal/package.json +0 -6
  278. package/cjs/api/APIErrors.js.map +0 -7
  279. package/cjs/api/APIProvider.js.map +0 -7
  280. package/cjs/api/fetchAPI/index.js +0 -49
  281. package/cjs/api/fetchAPI.js.map +0 -7
  282. package/cjs/api/index.js +0 -41
  283. package/cjs/api/index.js.map +0 -7
  284. package/cjs/api/useResource/index.js +0 -102
  285. package/cjs/api/useResource.js.map +0 -7
  286. package/cjs/api/useResourceAction/index.js +0 -97
  287. package/cjs/api/useResourceAction.js.map +0 -7
  288. package/cjs/api/useResourceQuery/index.js +0 -173
  289. package/cjs/api/useResourceQuery.js.map +0 -7
  290. package/cjs/api/utils/index.js +0 -157
  291. package/cjs/api/utils.js.map +0 -7
  292. package/content/Table/__stories__/Densed/package.json +0 -6
  293. package/content/Table/__stories__/Densed.d.ts +0 -3
  294. package/src/api/APIErrors.tsx +0 -46
  295. package/src/api/APIProvider.tsx +0 -31
  296. package/src/api/fetchAPI.ts +0 -43
  297. package/src/api/index.spec.tsx +0 -417
  298. package/src/api/index.tsx +0 -9
  299. package/src/api/introduction.md +0 -6
  300. package/src/api/useResource.tsx +0 -96
  301. package/src/api/useResourceAction.tsx +0 -80
  302. package/src/api/useResourceQuery.tsx +0 -178
  303. package/src/api/utils.tsx +0 -162
  304. package/src/app/Header/index.mdx +0 -49
  305. package/src/content/Card/index.mdx +0 -103
  306. package/src/content/Chip/index.mdx +0 -53
  307. package/src/content/List/index.mdx +0 -40
  308. package/src/content/Table/index.mdx +0 -111
  309. package/src/feedback/CopyToClipboard/index.mdx +0 -28
  310. package/src/form/AutoComplete/index.mdx +0 -70
  311. package/src/form/TextArea/index.mdx +0 -74
  312. package/src/govgr/Footer/index.mdx +0 -101
  313. package/src/layouts/Basic/Top/index.mdx +0 -23
  314. package/src/layouts/Grid/index.mdx +0 -39
  315. package/src/navigation/Pagination/index.mdx +0 -48
  316. package/src/navigation/Tabs/index.mdx +0 -31
  317. package/src/typography/NormalText/index.mdx +0 -44
  318. package/src/typography/Paragraph/index.mdx +0 -32
  319. package/src/typography/Typography/index.mdx +0 -12
  320. /package/app/Modal/{Modal.d.ts → index.web.d.ts} +0 -0
  321. /package/src/app/Modal/{Modal.tsx → index.web.tsx} +0 -0
  322. /package/src/utils/Base/{index.mdx → doc.mdx} +0 -0
@@ -0,0 +1,81 @@
1
+ ---
2
+ id: table
3
+ title: Table
4
+ ---
5
+
6
+ # Table
7
+
8
+ ## How to use
9
+
10
+ <code src="@digigov/ui/content/Table/__stories__/Default.tsx" />
11
+
12
+ ### With dark header
13
+
14
+ <code src="@digigov/ui/content/Table/__stories__/DarkVariant.tsx" />
15
+
16
+ ### With captions
17
+
18
+ Use the `<TableCaption>` element to describe a table in the same way you would use a heading. A caption helps users find, navigate and understand tables.
19
+
20
+ <code src="@digigov/ui/content/Table/__stories__/TableCaptions.tsx" />
21
+
22
+ ### With numeric values
23
+
24
+ <code src="@digigov/ui/content/Table/__stories__/NumericDataType.tsx" />
25
+
26
+ ### With zebra rows
27
+
28
+ <code src="@digigov/ui/content/Table/__stories__/ZebraProp.tsx" />
29
+
30
+ ### With primary or secondary colored rows
31
+
32
+ The prop `color='primary'` or `color='secondary'` is only functional when Table component has `variant='default'`.
33
+
34
+ <code src="@digigov/ui/content/Table/__stories__/RowColors.tsx" />
35
+
36
+ ### With vertical lines
37
+
38
+ <code src="@digigov/ui/content/Table/__stories__/VerticalBorders.tsx" />
39
+
40
+ ### With dense style
41
+
42
+ <code src="@digigov/ui/content/Table/__stories__/Dense.tsx" />
43
+
44
+ ### Custom column widths
45
+
46
+ <code src="@digigov/ui/content/Table/__stories__/DefinedWidth.tsx" />
47
+
48
+ ### Without data (empty table)
49
+
50
+ <code src="@digigov/ui/content/Table/__stories__/NoData.tsx" />
51
+
52
+ ### With loader
53
+
54
+ <code src="@digigov/ui/content/Table/__stories__/WithLoader.tsx" />
55
+
56
+ ### With stack style
57
+
58
+ Use this prop when you want to display a more user friendly table for small screens.
59
+
60
+ <code src="@digigov/ui/content/Table/__stories__/Stacked.tsx" />
61
+
62
+ ## Accessibility
63
+
64
+ You can read more about the accessibility patterns used in our Table
65
+ implementation in the ARIA Authoring Practices Guide (APG) at [Table](https://www.w3.org/WAI/ARIA/apg/patterns/table/) section.
66
+
67
+ ## API
68
+
69
+ See below for a complete reference to all of the props available to the components mentioned here.
70
+
71
+ <ComponentProps componentName={[
72
+ "TableContainer",
73
+ "Table",
74
+ "TableCaption",
75
+ "TableHead",
76
+ "TableRow",
77
+ "TableBody",
78
+ "TableHeadCell",
79
+ "TableDataCell"
80
+ ]
81
+ } />
@@ -5,7 +5,7 @@ import { DarkVariant } from '@digigov/ui/content/Table/__stories__/DarkVariant';
5
5
  import { DarkVariantWithVerticalHeaders } from '@digigov/ui/content/Table/__stories__/DarkVariantWithVerticalHeaders';
6
6
  import { Default } from '@digigov/ui/content/Table/__stories__/Default';
7
7
  import { DefinedWidth } from '@digigov/ui/content/Table/__stories__/DefinedWidth';
8
- import { Densed } from '@digigov/ui/content/Table/__stories__/Densed';
8
+ import { Dense } from '@digigov/ui/content/Table/__stories__/Dense';
9
9
  import { Full } from '@digigov/ui/content/Table/__stories__/Full';
10
10
  import { MultipleProps } from '@digigov/ui/content/Table/__stories__/MultipleProps';
11
11
  import { NoData } from '@digigov/ui/content/Table/__stories__/NoData';
@@ -38,8 +38,8 @@ test('renders the All Table variants', async ({ mount, page }) => {
38
38
  <TestVariant title="DefinedWidth">
39
39
  <DefinedWidth />
40
40
  </TestVariant>
41
- <TestVariant title="Densed">
42
- <Densed />
41
+ <TestVariant title="Dense">
42
+ <Dense />
43
43
  </TestVariant>
44
44
  <TestVariant title="Full">
45
45
  <Full />
@@ -9,13 +9,11 @@ TaskList is a component that displays number of steps required to complete a pro
9
9
 
10
10
  ## How to use
11
11
 
12
- ### Default
12
+ <code src="@digigov/ui/content/TaskList/__stories__/Default.tsx" />
13
13
 
14
- <Story
15
- packageName="@digigov/ui"
16
- component="content/TaskList"
17
- story="Default.tsx"
18
- />
14
+ ## With dense style
15
+
16
+ <code src="@digigov/ui/content/TaskList/__stories__/Dense.tsx" />
19
17
 
20
18
  ## API
21
19
 
@@ -11,13 +11,11 @@ User can better understand what has happened and also understand what the next s
11
11
 
12
12
  ## How to use
13
13
 
14
- ### Default
14
+ <code src="@digigov/ui/content/Timeline/__stories__/Default.tsx" />
15
15
 
16
- <Story
17
- packageName="@digigov/ui"
18
- component="content/Timeline"
19
- story="Default.tsx"
20
- />
16
+ ## With dense style
17
+
18
+ <code src="@digigov/ui/content/Timeline/__stories__/Dense.tsx" />
21
19
 
22
20
  ## API
23
21
 
@@ -11,7 +11,7 @@ export const Default = () => {
11
11
  message="Αντιγράφηκε στο πρόχειρο"
12
12
  id="copy-to-clipboard"
13
13
  onCopy={() => {
14
- console.log('yess copied');
14
+ console.log('content copied!');
15
15
  }}
16
16
  >
17
17
  <Button color="secondary" aria-describedby="copy-to-clipboard">
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: copy-to-clipboard
3
+ title: CopyToClipboard
4
+ ---
5
+
6
+ ## How to use
7
+
8
+ <code src="@digigov/ui/feedback/CopyToClipboard/__stories__/Default.tsx" />
9
+
10
+ ### As banner
11
+
12
+ <code src="@digigov/ui/feedback/CopyToClipboard/__stories__/Banner.tsx" />
13
+
14
+ ### With dense style
15
+
16
+ <code src="@digigov/ui/feedback/CopyToClipboard/__stories__/Dense.tsx" />
17
+
18
+ ## API
19
+
20
+ See below for a complete reference to all of the props available to the components mentioned here.
21
+
22
+ <ComponentProps componentName={["CopyToClipboardContainer"]} />
@@ -1,7 +1,7 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
3
  exports[`renders the ErrorSummary with sample data 1`] = `
4
- <ForwardRef(ErrorSummary)>
4
+ <ForwardRef(ErrorSummary2)>
5
5
  this is some random warning text
6
- </ForwardRef(ErrorSummary)>
6
+ </ForwardRef(ErrorSummary2)>
7
7
  `;
@@ -5,17 +5,13 @@ title: ErrorSummary
5
5
 
6
6
  # ErrorSummary
7
7
 
8
- Use this component at the top of a page to summarise any errors a user has made.
8
+ Use this component at the top of a page to summarize any errors a user has made.
9
9
 
10
10
  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.
11
11
 
12
12
  ## How to use
13
13
 
14
- <Story
15
- packageName="@digigov/ui"
16
- component="feedback/ErrorSummary"
17
- story="Default.tsx"
18
- />
14
+ <code src="@digigov/ui/feedback/ErrorSummary/__stories__/Default.tsx" />
19
15
 
20
16
  ### Linking from the error summary to each answer
21
17
 
@@ -23,32 +19,20 @@ You must link the errors in the error summary to the answer they relate to.
23
19
 
24
20
  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.
25
21
 
26
- <Story
27
- packageName="@digigov/ui"
28
- component="feedback/ErrorSummary"
29
- story="LinkedToInput.tsx"
30
- />
22
+ <code src="@digigov/ui/feedback/ErrorSummary/__stories__/LinkedToInput.tsx" />
31
23
 
32
24
  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.
33
25
 
34
26
  If you do not know which field contains an error, link to the first field.
35
27
 
36
- <Story
37
- packageName="@digigov/ui"
38
- component="feedback/ErrorSummary"
39
- story="LinkedToField.tsx"
40
- />
28
+ <code src="@digigov/ui/feedback/ErrorSummary/__stories__/LinkedToField.tsx" />
41
29
 
42
30
  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.
43
31
 
44
- <Story
45
- packageName="@digigov/ui"
46
- component="feedback/ErrorSummary"
47
- story="LinkedToCheckbox.tsx"
48
- />
32
+ <code src="@digigov/ui/feedback/ErrorSummary/__stories__/LinkedToCheckbox.tsx" />
49
33
 
50
34
  ## API
51
35
 
52
36
  See below for a complete reference to all of the props available to the components mentioned here.
53
37
 
54
- <ComponentProps componentName={["ErrorSummary"]} />
38
+ {/* <ComponentProps componentName={["ErrorSummary"]} /> */}
@@ -1,4 +1,4 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
3
  exports[`renders the notification banner 1`] = `
4
4
  <NotificationBanner
@@ -17,28 +17,17 @@ Use a ‘neutral’ notification banner if the user needs to know about somethin
17
17
 
18
18
  ## How to use
19
19
 
20
- ### Default NotificationBanner
21
- <Story
22
- packageName="@digigov/ui"
23
- component="feedback/NotificationBanner"
24
- story="Default.tsx"
25
- />
20
+ <code src="@digigov/ui/feedback/NotificationBanner/__stories__/Default.tsx" />
26
21
 
27
22
  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.
28
23
 
29
- ### Success NotificationBanner
30
- <Story
31
- packageName="@digigov/ui"
32
- component="feedback/NotificationBanner"
33
- story="Success.tsx"
34
- />
35
-
36
- ### Dense NotificationBanner
37
- <Story
38
- packageName="@digigov/ui"
39
- component="feedback/NotificationBanner"
40
- story="Dense.tsx"
41
- />
24
+ ### With success style
25
+
26
+ <code src="@digigov/ui/feedback/NotificationBanner/__stories__/Success.tsx" />
27
+
28
+ ### With dense style
29
+
30
+ <code src="@digigov/ui/feedback/NotificationBanner/__stories__/Dense.tsx" />
42
31
 
43
32
  ## API
44
33
 
@@ -11,21 +11,11 @@ Use the phase banner component to show users your service is still being worked
11
11
 
12
12
  Your banner must be directly under the blue GOV.GR header and colour bar.
13
13
 
14
- ### Default
15
-
16
- <Story
17
- packageName="@digigov/ui"
18
- component="feedback/PhaseBanner"
19
- story="Default.tsx"
20
- />
14
+ <code src="@digigov/ui/feedback/PhaseBanner/__stories__/Default.tsx" />
21
15
 
22
16
  ### Underlined
23
17
 
24
- <Story
25
- packageName="@digigov/ui"
26
- component="feedback/PhaseBanner"
27
- story="Underlined.tsx"
28
- />
18
+ <code src="@digigov/ui/feedback/PhaseBanner/__stories__/Underlined.tsx" />
29
19
 
30
20
  ## API
31
21
 
@@ -1,7 +1,7 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
3
  exports[`renders the WarningText with sample data 1`] = `
4
- <ForwardRef(WarningText)>
4
+ <ForwardRef(WarningText2)>
5
5
  this is some random warning text
6
- </ForwardRef(WarningText)>
6
+ </ForwardRef(WarningText2)>
7
7
  `;
@@ -10,13 +10,15 @@ title: WarningText
10
10
  You might need to rewrite the hidden text ("Προσοχή" in the example) to make it appropriate for your context.
11
11
  This will be used by screen-readers.
12
12
 
13
- ### Default
13
+ <code src="@digigov/ui/feedback/WarningText/__stories__/Default.tsx" />
14
14
 
15
- <Story
16
- packageName="@digigov/ui"
17
- component="feedback/WarningText"
18
- story="Default.tsx"
19
- />
15
+ ### With dense style
16
+
17
+ <code src="@digigov/ui/feedback/WarningText/__stories__/Dense.tsx" />
18
+
19
+ ### With assistive text
20
+
21
+ <code src="@digigov/ui/feedback/WarningText/__stories__/AssistiveText.tsx" />
20
22
 
21
23
  ## API
22
24
 
@@ -0,0 +1,50 @@
1
+ ---
2
+ id: auto-complete
3
+ title: AutoComplete
4
+ ---
5
+
6
+ # AutoComplete
7
+
8
+ Autocomplete is a feature in which an input field suggests a word based on user input. This allows users to quickly search
9
+ through, select from large collections of options and help services get more consistent data.
10
+
11
+ ## How to use
12
+
13
+ <code src="@digigov/ui/form/AutoComplete/__stories__/Default.tsx" />
14
+
15
+ ### With auto select
16
+
17
+ <code src="@digigov/ui/form/AutoComplete/__stories__/WithAutoSelect.tsx" />
18
+
19
+ ### With default value
20
+
21
+ <code src="@digigov/ui/form/AutoComplete/__stories__/WithDefaultValue.tsx" />
22
+
23
+ ### With placeholder
24
+
25
+ <code src="@digigov/ui/form/AutoComplete/__stories__/WithPlaceHolder.tsx" />
26
+
27
+ ### With all option's values
28
+
29
+ <code src="@digigov/ui/form/AutoComplete/__stories__/WithShowAllValues.tsx" />
30
+
31
+ ### With min length
32
+
33
+ This is the minimum number of characters that should be entered before the AutoComplete will attempt to suggest options(in above example is 2)
34
+
35
+ <code src="@digigov/ui/form/AutoComplete/__stories__/WithMinLength.tsx" />
36
+
37
+ ## API
38
+
39
+ See below for a complete reference to all of the props available to the components mentioned here.
40
+
41
+ <ComponentProps componentName={
42
+ ["AutoCompleteWrapper",
43
+ "AutoCompleteStatus",
44
+ "AutoCompleteStatusWrapper",
45
+ "AutoCompleteInputTypeahead",
46
+ "AutoCompleteInput",
47
+ "AutoCompleteResultList",
48
+ "AutoCompleteResultListItem",
49
+ "AutoCompleteAssistiveHint"
50
+ ]} />
@@ -1,17 +1,13 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
3
  exports[`renders the button 1`] = `
4
- <ForwardRef(Button)>
5
- <ForwardRef(Base)
6
- as="button"
7
- className="ds-btn-primary ds-btn"
8
- printHidden={true}
9
- >
4
+ <body>
5
+ <div>
10
6
  <button
11
- className="ds-btn-primary ds-btn ds-print-hidden"
7
+ class="ds-print-hidden ds-btn ds-btn-primary"
12
8
  >
13
9
  hello
14
10
  </button>
15
- </ForwardRef(Base)>
16
- </ForwardRef(Button)>
11
+ </div>
12
+ </body>
17
13
  `;
@@ -14,57 +14,41 @@ application or saving their information.
14
14
 
15
15
  Use a default button for the main call to action on a page.
16
16
 
17
- <Story packageName="@digigov/ui" component="form/Button" story="Primary.tsx" />
17
+ <code src="@digigov/ui/form/Button/__stories__/Primary.tsx" />
18
18
 
19
19
  ### Start buttons
20
20
 
21
21
  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.
22
22
 
23
- <Story
24
- packageName="@digigov/ui"
25
- component="form/Button"
26
- story="CallToActionButton.tsx"
27
- />
23
+ <code src="@digigov/ui/form/Button/__stories__/CallToActionButton.tsx" />
28
24
 
29
25
  ### Secondary buttons
30
26
 
31
27
  Use secondary buttons for secondary calls to action on a page.
32
28
 
33
- <Story
34
- packageName="@digigov/ui"
35
- component="form/Button"
36
- story="Secondary.tsx"
37
- />
29
+ <code src="@digigov/ui/form/Button/__stories__/Secondary.tsx" />
38
30
 
39
31
  ### Warning buttons
40
32
 
41
33
  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.
42
34
 
43
- <Story packageName="@digigov/ui" component="form/Button" story="Warning.tsx" />
35
+ <code src="@digigov/ui/form/Button/__stories__/Warning.tsx" />
44
36
 
45
37
  ### Disable buttons
46
38
 
47
39
  Disabled buttons have poor contrast and can confuse some users, so avoid them if possible.
48
40
 
49
- <Story packageName="@digigov/ui" component="form/Button" story="Disabled.tsx" />
41
+ <code src="@digigov/ui/form/Button/__stories__/Disabled.tsx" />
50
42
 
51
43
  ### Grouping buttons
52
44
 
53
45
  Use a button group when two or more buttons are placed together.
54
46
 
55
- <Story
56
- packageName="@digigov/ui"
57
- component="form/Button"
58
- story="GroupingButtons.tsx"
59
- />
47
+ <code src="@digigov/ui/form/Button/__stories__/GroupingButtons.tsx" />
60
48
 
61
49
  Any links within a button group will automatically align with the buttons.
62
50
 
63
- <Story
64
- packageName="@digigov/ui"
65
- component="form/Button"
66
- story="GroupingButtonsAndLinks.tsx"
67
- />
51
+ <code src="@digigov/ui/form/Button/__stories__/GroupingButtonsAndLinks.tsx" />
68
52
 
69
53
  Write button text in sentence case, describing the action it performs. For
70
54
  example:
@@ -91,14 +75,12 @@ Align the primary action button to the left edge of your form.
91
75
 
92
76
  Use a default button for the main call to action on a page.
93
77
 
78
+ <code src="@digigov/ui/form/Button/__stories__/Primary.tsx" />
79
+
94
80
  Avoid using multiple default buttons on a single page. Having more than on main
95
81
  call to action reduces their impact, and makes it harder for users to know what
96
82
  to do next.
97
83
 
98
- ## API Docs
99
-
100
- Read more about [how to use the React types](/docs/api/Button).
101
-
102
84
  ## Accessibility
103
85
 
104
86
  You can read more about the accessibility patterns used in our Button
@@ -106,6 +88,9 @@ implementation in the ARIA Authoring Practices Guide (APG) at [button](https://w
106
88
 
107
89
  ## API
108
90
 
91
+ Read more about [how to use the React types](/docs/api/Button).
92
+
109
93
  See below for a complete reference to all of the props available to the components mentioned here.
110
94
 
111
95
  <ComponentProps componentName={["Button","ButtonLink","CallToAction","ButtonGroup"]} />
96
+
@@ -7,57 +7,35 @@ title: Checkbox
7
7
 
8
8
  ## How to use
9
9
 
10
- <Story
11
- packageName="@digigov/ui"
12
- component="form/Checkbox"
13
- story="Default.tsx"
14
- />
10
+ <code src="@digigov/ui/form/Checkbox/__stories__/Default.tsx" />
15
11
 
16
- ### If you’re asking more than one question on the page
12
+ ### For multiple questions
17
13
 
18
- <Story
19
- packageName="@digigov/ui"
20
- component="form/Checkbox"
21
- story="MultipleQuestions.tsx"
22
- />
14
+ If you’re asking more than one question on the page, you can display the question's title using `<FieldsetLegend size="sm">`.
15
+
16
+ <code src="@digigov/ui/form/Checkbox/__stories__/MultipleQuestions.tsx" />
23
17
 
24
18
  ### Checkbox items with hints
25
19
 
26
20
  You can add hints to checkbox items to provide additional information about the options.
27
21
 
28
- <Story
29
- packageName="@digigov/ui"
30
- component="form/Checkbox"
31
- story="WithHint.tsx"
32
- />
22
+ <code src="@digigov/ui/form/Checkbox/__stories__/WithHint.tsx" />
33
23
 
34
24
  ### Add an option for ‘none’
35
25
 
36
26
  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.
37
27
 
38
- <Story
39
- packageName="@digigov/ui"
40
- component="form/Checkbox"
41
- story="NoneAnswer.tsx"
42
- />
28
+ <code src="@digigov/ui/form/Checkbox/__stories__/NoneAnswer.tsx" />
43
29
 
44
30
  If JavaScript is unavailable, and a user selects both the ‘none’ checkbox and another checkbox, display an error message.
45
31
 
46
- <Story
47
- packageName="@digigov/ui"
48
- component="form/Checkbox"
49
- story="NoneAnswerWithError.tsx"
50
- />
32
+ <code src="@digigov/ui/form/Checkbox/__stories__/NoneAnswerWithError.tsx" />
51
33
 
52
34
  ### Error messages
53
35
 
54
36
  Error messages should be styled like this:
55
37
 
56
- <Story
57
- packageName="@digigov/ui"
58
- component="form/Checkbox"
59
- story="WithErrorMessage.tsx"
60
- />
38
+ <code src="@digigov/ui/form/Checkbox/__stories__/WithErrorMessage.tsx" />
61
39
 
62
40
  ## Conditionally revealing a related question
63
41
 
@@ -65,11 +43,7 @@ You can ask the user a related question when they select a particular checkbox,
65
43
 
66
44
  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.
67
45
 
68
- <Story
69
- packageName="@digigov/ui"
70
- component="form/Checkbox"
71
- story="ConditionalReveal.tsx"
72
- />
46
+ <code src="@digigov/ui/form/Checkbox/__stories__/ConditionalReveal.tsx" />
73
47
 
74
48
  ## Accessibility
75
49
 
@@ -16,7 +16,7 @@ import { Hint } from '@digigov/ui/typography/Hint';
16
16
  export const MultipleQuestions = () => (
17
17
  <FieldContainer aria-describedby="passport-hint">
18
18
  <Fieldset>
19
- <FieldsetLegend size="md">
19
+ <FieldsetLegend size="sm">
20
20
  Πότε εκδόθηκε το διαβατήριό σας;
21
21
  </FieldsetLegend>
22
22
  <Hint id="passport-hint">Για παράδειγμα, 05 11 2020</Hint>
@@ -7,37 +7,23 @@ title: DateInputContainer
7
7
 
8
8
  ## How to use
9
9
 
10
- <Story
11
- packageName="@digigov/ui"
12
- component="form/DateInputContainer"
13
- story="Default.tsx"
14
- />
10
+ <code src="@digigov/ui/form/DateInputContainer/__stories__/Default.tsx" />
15
11
 
16
- ### If you’re asking more than one question on the page
12
+ ### For multiple questions
17
13
 
18
- <Story
19
- packageName="@digigov/ui"
20
- component="form/DateInputContainer"
21
- story="MultipleQuestions.tsx"
22
- />
14
+ If you’re asking more than one question on the page, you can display the question's title using `<FieldsetLegend size="sm">`.
15
+
16
+ <code src="@digigov/ui/form/DateInputContainer/__stories__/MultipleQuestions.tsx" />
23
17
 
24
18
  ### Error message
25
19
 
26
20
  If you’re highlighting the whole date, style all the fields like this:
27
21
 
28
- <Story
29
- packageName="@digigov/ui"
30
- component="form/DateInputContainer"
31
- story="WithErrorMessage.tsx"
32
- />
22
+ <code src="@digigov/ui/form/DateInputContainer/__stories__/WithErrorMessage.tsx" />
33
23
 
34
24
  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:
35
25
 
36
- <Story
37
- packageName="@digigov/ui"
38
- component="form/DateInputContainer"
39
- story="WithErrorMessageForSingleField.tsx"
40
- />
26
+ <code src="@digigov/ui/form/DateInputContainer/__stories__/WithErrorMessageForSingleField.tsx" />
41
27
 
42
28
  ## API
43
29
 
@@ -10,11 +10,7 @@ In the error message explain what went wrong and how to fix it.
10
10
 
11
11
  ## How to use
12
12
 
13
- <Story
14
- packageName="@digigov/ui"
15
- component="form/ErrorMessage"
16
- story="Default.tsx"
17
- />
13
+ <code src="@digigov/ui/form/ErrorMessage/__stories__/Default.tsx" />
18
14
 
19
15
  ## API
20
16