@digigov/ui 0.12.2 → 0.14.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 (668) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/{src/core/ServiceBadge/ServiceBadge.mdx → LICENSE} +0 -0
  3. package/api/APIErrors.d.ts +22 -0
  4. package/api/APIErrors.js +117 -0
  5. package/api/APIProvider.d.ts +15 -0
  6. package/api/APIProvider.js +43 -0
  7. package/api/fetchAPI.d.ts +18 -0
  8. package/api/fetchAPI.js +64 -0
  9. package/api/index.d.ts +9 -0
  10. package/api/index.js +104 -0
  11. package/api/index.spec.d.ts +1 -0
  12. package/api/index.spec.js +584 -0
  13. package/{src/api → api}/introduction.md +0 -0
  14. package/api/useResource.d.ts +11 -0
  15. package/api/useResource.js +144 -0
  16. package/api/useResourceAction.d.ts +2 -0
  17. package/api/useResourceAction.js +157 -0
  18. package/api/useResourceQuery.d.ts +18 -0
  19. package/api/useResourceQuery.js +229 -0
  20. package/api/utils.d.ts +6 -0
  21. package/api/utils.js +250 -0
  22. package/app/App.d.ts +14 -0
  23. package/app/App.js +49 -0
  24. package/{src/app/Confirmation/index.tsx → app/Confirmation/index.d.ts} +0 -0
  25. package/app/Confirmation/index.js +44 -0
  26. package/{src/app/Footer/index.tsx → app/Footer/index.d.ts} +0 -0
  27. package/app/Footer/index.js +200 -0
  28. package/app/Header/HeaderContent.d.ts +3 -0
  29. package/app/Header/HeaderContent.js +19 -0
  30. package/app/Header/HeaderLogo.d.ts +3 -0
  31. package/app/Header/HeaderLogo.js +30 -0
  32. package/app/Header/HeaderSection.d.ts +5 -0
  33. package/app/Header/HeaderSection.js +20 -0
  34. package/app/Header/HeaderTitle.d.ts +5 -0
  35. package/app/Header/HeaderTitle.js +30 -0
  36. package/{src/app → app}/Header/__snapshots__/index.spec.tsx.snap +0 -0
  37. package/app/Header/index.d.ts +11 -0
  38. package/app/Header/index.js +106 -0
  39. package/{src/app → app}/Header/index.mdx +0 -0
  40. package/app/Header/index.spec.d.ts +1 -0
  41. package/app/Header/index.spec.js +45 -0
  42. package/app/NotFound/index.d.ts +3 -0
  43. package/app/NotFound/index.js +29 -0
  44. package/app/OutdatedBrowserBanner.d.ts +2 -0
  45. package/app/OutdatedBrowserBanner.js +41 -0
  46. package/app/PageTitle.d.ts +10 -0
  47. package/app/PageTitle.js +76 -0
  48. package/{src/app → app}/QrCodeScanner/__snapshots__/index.spec.tsx.snap +0 -0
  49. package/app/QrCodeScanner/index.d.ts +29 -0
  50. package/app/QrCodeScanner/index.js +85 -0
  51. package/{src/app → app}/QrCodeScanner/index.mdx +0 -0
  52. package/app/QrCodeScanner/index.spec.d.ts +1 -0
  53. package/app/QrCodeScanner/index.spec.js +26 -0
  54. package/app/i18n.d.ts +10 -0
  55. package/app/i18n.js +63 -0
  56. package/{src/app/index.ts → app/index.d.ts} +0 -0
  57. package/app/index.js +70 -0
  58. package/{src/core → core}/Accordion/__snapshots__/index.spec.tsx.snap +0 -0
  59. package/core/Accordion/index.d.ts +18 -0
  60. package/core/Accordion/index.js +102 -0
  61. package/{src/core → core}/Accordion/index.mdx +0 -0
  62. package/core/Accordion/index.spec.d.ts +1 -0
  63. package/core/Accordion/index.spec.js +19 -0
  64. package/{src/core → core}/Blockquote/__snapshots__/index.spec.tsx.snap +0 -0
  65. package/core/Blockquote/index.d.ts +3 -0
  66. package/core/Blockquote/index.js +29 -0
  67. package/{src/core → core}/Blockquote/index.mdx +0 -0
  68. package/core/Blockquote/index.spec.d.ts +1 -0
  69. package/core/Blockquote/index.spec.js +21 -0
  70. package/{src/core/Breadcrumbs/index.tsx → core/Breadcrumbs/index.d.ts} +0 -0
  71. package/core/Breadcrumbs/index.js +44 -0
  72. package/core/Button/BackButton.d.ts +3 -0
  73. package/core/Button/BackButton.js +34 -0
  74. package/core/Button/ButtonLink.d.ts +4 -0
  75. package/core/Button/ButtonLink.js +28 -0
  76. package/core/Button/CallToAction.d.ts +7 -0
  77. package/core/Button/CallToAction.js +41 -0
  78. package/core/Button/Icon.d.ts +2 -0
  79. package/core/Button/Icon.js +19 -0
  80. package/{src/core → core}/Button/__snapshots__/index.spec.tsx.snap +0 -0
  81. package/core/Button/index.d.ts +15 -0
  82. package/core/Button/index.js +122 -0
  83. package/{src/core → core}/Button/index.mdx +0 -0
  84. package/core/Button/index.spec.d.ts +1 -0
  85. package/core/Button/index.spec.js +21 -0
  86. package/{src/core/Card/index.tsx → core/Card/index.d.ts} +0 -0
  87. package/core/Card/index.js +57 -0
  88. package/{src/core → core}/Details/__snapshots__/index.spec.tsx.snap +0 -0
  89. package/{src/core/Details/index.tsx → core/Details/index.d.ts} +0 -2
  90. package/core/Details/index.js +35 -0
  91. package/{src/core → core}/Details/index.mdx +0 -0
  92. package/core/Details/index.spec.d.ts +1 -0
  93. package/core/Details/index.spec.js +27 -0
  94. package/core/Divider/index.d.ts +5 -0
  95. package/core/Divider/index.js +20 -0
  96. package/{src/core → core}/ErrorSummary/__snapshots__/index.spec.tsx.snap +0 -0
  97. package/{src/core/ErrorSummary/index.tsx → core/ErrorSummary/index.d.ts} +0 -1
  98. package/core/ErrorSummary/index.js +19 -0
  99. package/{src/core → core}/ErrorSummary/index.mdx +0 -0
  100. package/core/ErrorSummary/index.spec.d.ts +1 -0
  101. package/core/ErrorSummary/index.spec.js +21 -0
  102. package/{src/core/Hidden/index.tsx → core/Hidden/index.d.ts} +0 -0
  103. package/core/Hidden/index.js +18 -0
  104. package/{src/core → core}/Link/__snapshots__/index.spec.tsx.snap +0 -0
  105. package/core/Link/index.d.ts +12 -0
  106. package/core/Link/index.js +52 -0
  107. package/core/Link/index.spec.d.ts +1 -0
  108. package/core/Link/index.spec.js +31 -0
  109. package/{src/core/List/List.tsx → core/List/List.d.ts} +0 -2
  110. package/core/List/List.js +19 -0
  111. package/{src/core/List/ListItem.tsx → core/List/ListItem.d.ts} +0 -2
  112. package/core/List/ListItem.js +19 -0
  113. package/core/List/ListItemContent.d.ts +7 -0
  114. package/core/List/ListItemContent.js +45 -0
  115. package/core/List/ListItemIcon.d.ts +7 -0
  116. package/core/List/ListItemIcon.js +48 -0
  117. package/core/List/ListItemText.d.ts +8 -0
  118. package/core/List/ListItemText.js +36 -0
  119. package/core/List/ListItemTitle.d.ts +10 -0
  120. package/core/List/ListItemTitle.js +44 -0
  121. package/{src/core → core}/List/__snapshots__/index.spec.tsx.snap +0 -0
  122. package/{src/core/List/index.tsx → core/List/index.d.ts} +0 -0
  123. package/core/List/index.js +96 -0
  124. package/{src/core → core}/List/index.mdx +0 -0
  125. package/core/List/index.spec.d.ts +1 -0
  126. package/core/List/index.spec.js +21 -0
  127. package/core/NavList/NavList.d.ts +17 -0
  128. package/core/NavList/NavList.js +99 -0
  129. package/core/NavList/NavListContext.d.ts +20 -0
  130. package/core/NavList/NavListContext.js +102 -0
  131. package/core/NavList/NavListItem.d.ts +13 -0
  132. package/core/NavList/NavListItem.js +171 -0
  133. package/core/NavList/NavListItemBase.d.ts +16 -0
  134. package/core/NavList/NavListItemBase.js +161 -0
  135. package/core/NavList/NavListSubMenu.d.ts +8 -0
  136. package/core/NavList/NavListSubMenu.js +52 -0
  137. package/{src/core → core}/NavList/__snapshots__/index.spec.tsx.snap +0 -0
  138. package/{src/core/NavList/index.tsx → core/NavList/index.d.ts} +0 -0
  139. package/core/NavList/index.js +68 -0
  140. package/{src/core → core}/NavList/index.mdx +0 -0
  141. package/core/NavList/index.spec.d.ts +1 -0
  142. package/core/NavList/index.spec.js +21 -0
  143. package/{src/core → core}/NotificationBanner/__snapshots__/index.spec.tsx.snap +0 -0
  144. package/core/NotificationBanner/index.d.ts +18 -0
  145. package/core/NotificationBanner/index.js +78 -0
  146. package/{src/core → core}/NotificationBanner/index.mdx +0 -0
  147. package/core/NotificationBanner/index.spec.d.ts +1 -0
  148. package/core/NotificationBanner/index.spec.js +32 -0
  149. package/core/PaginationLabel/index.d.ts +21 -0
  150. package/core/PaginationLabel/index.js +34 -0
  151. package/core/ServiceBadge/ServiceBadge.mdx +0 -0
  152. package/core/ServiceBadge/index.d.ts +9 -0
  153. package/core/ServiceBadge/index.js +36 -0
  154. package/{src/core → core}/ServiceBadge/index.mdx +0 -0
  155. package/{src/core → core}/SummaryList/__snapshots__/index.spec.tsx.snap +0 -0
  156. package/{src/core/SummaryList/index.tsx → core/SummaryList/index.d.ts} +0 -2
  157. package/core/SummaryList/index.js +79 -0
  158. package/{src/core → core}/SummaryList/index.mdx +0 -0
  159. package/core/SummaryList/index.spec.d.ts +1 -0
  160. package/core/SummaryList/index.spec.js +19 -0
  161. package/{src/core/Table/index.tsx → core/Table/index.d.ts} +0 -0
  162. package/core/Table/index.js +96 -0
  163. package/core/Tabs/index.d.ts +16 -0
  164. package/core/Tabs/index.js +88 -0
  165. package/{src/core → core}/Tabs/index.mdx +0 -0
  166. package/{src/core/VisuallyHidden/index.tsx → core/VisuallyHidden/index.d.ts} +0 -0
  167. package/core/VisuallyHidden/index.js +18 -0
  168. package/{src/core → core}/WarningText/__snapshots__/index.spec.tsx.snap +0 -0
  169. package/{src/core/WarningText/index.tsx → core/WarningText/index.d.ts} +0 -1
  170. package/core/WarningText/index.js +19 -0
  171. package/{src/core → core}/WarningText/index.mdx +0 -0
  172. package/core/WarningText/index.spec.d.ts +1 -0
  173. package/core/WarningText/index.spec.js +21 -0
  174. package/core/index.d.ts +18 -0
  175. package/core/index.js +241 -0
  176. package/custom.d.js +1 -0
  177. package/es/api/APIErrors.js +96 -0
  178. package/es/api/APIProvider.js +25 -0
  179. package/es/api/fetchAPI.js +49 -0
  180. package/{src/api/index.tsx → es/api/index.js} +3 -6
  181. package/es/api/index.spec.js +546 -0
  182. package/es/api/introduction.md +6 -0
  183. package/es/api/useResource.js +128 -0
  184. package/es/api/useResourceAction.js +141 -0
  185. package/es/api/useResourceQuery.js +208 -0
  186. package/es/api/utils.js +233 -0
  187. package/es/app/App.js +27 -0
  188. package/es/app/Confirmation/index.js +3 -0
  189. package/es/app/Footer/index.js +15 -0
  190. package/es/app/Header/HeaderContent.js +3 -0
  191. package/{src/app/Header/HeaderLogo.tsx → es/app/Header/HeaderLogo.js} +7 -9
  192. package/es/app/Header/HeaderSection.js +7 -0
  193. package/es/app/Header/HeaderTitle.js +17 -0
  194. package/es/app/Header/__snapshots__/index.spec.tsx.snap +393 -0
  195. package/{src/app/Header/index.tsx → es/app/Header/index.js} +4 -10
  196. package/es/app/Header/index.mdx +50 -0
  197. package/es/app/Header/index.spec.js +32 -0
  198. package/es/app/NotFound/index.js +12 -0
  199. package/es/app/OutdatedBrowserBanner.js +24 -0
  200. package/es/app/PageTitle.js +57 -0
  201. package/es/app/QrCodeScanner/__snapshots__/index.spec.tsx.snap +22 -0
  202. package/es/app/QrCodeScanner/index.js +64 -0
  203. package/es/app/QrCodeScanner/index.mdx +22 -0
  204. package/es/app/QrCodeScanner/index.spec.js +13 -0
  205. package/es/app/i18n.js +42 -0
  206. package/es/app/index.js +5 -0
  207. package/es/core/Accordion/__snapshots__/index.spec.tsx.snap +78 -0
  208. package/es/core/Accordion/index.js +50 -0
  209. package/es/core/Accordion/index.mdx +104 -0
  210. package/es/core/Accordion/index.spec.js +9 -0
  211. package/es/core/Blockquote/__snapshots__/index.spec.tsx.snap +13 -0
  212. package/{src/core/Blockquote/index.tsx → es/core/Blockquote/index.js} +7 -9
  213. package/es/core/Blockquote/index.mdx +61 -0
  214. package/es/core/Blockquote/index.spec.js +9 -0
  215. package/es/core/Breadcrumbs/index.js +3 -0
  216. package/{src/core/Button/BackButton.tsx → es/core/Button/BackButton.js} +8 -10
  217. package/es/core/Button/ButtonLink.js +16 -0
  218. package/es/core/Button/CallToAction.js +27 -0
  219. package/es/core/Button/Icon.js +7 -0
  220. package/es/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
  221. package/es/core/Button/index.js +37 -0
  222. package/es/core/Button/index.mdx +65 -0
  223. package/es/core/Button/index.spec.js +9 -0
  224. package/es/core/Card/index.js +4 -0
  225. package/es/core/Details/__snapshots__/index.spec.tsx.snap +50 -0
  226. package/es/core/Details/index.js +5 -0
  227. package/es/core/Details/index.mdx +34 -0
  228. package/es/core/Details/index.spec.js +17 -0
  229. package/es/core/Divider/index.js +7 -0
  230. package/es/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +322 -0
  231. package/es/core/ErrorSummary/index.js +3 -0
  232. package/es/core/ErrorSummary/index.mdx +61 -0
  233. package/es/core/ErrorSummary/index.spec.js +9 -0
  234. package/es/core/Hidden/index.js +1 -0
  235. package/es/core/Link/__snapshots__/index.spec.tsx.snap +31 -0
  236. package/es/core/Link/index.js +27 -0
  237. package/es/core/Link/index.spec.js +21 -0
  238. package/es/core/List/List.js +3 -0
  239. package/es/core/List/ListItem.js +3 -0
  240. package/es/core/List/ListItemContent.js +27 -0
  241. package/es/core/List/ListItemIcon.js +29 -0
  242. package/es/core/List/ListItemText.js +19 -0
  243. package/es/core/List/ListItemTitle.js +25 -0
  244. package/es/core/List/__snapshots__/index.spec.tsx.snap +322 -0
  245. package/es/core/List/index.js +7 -0
  246. package/es/core/List/index.mdx +40 -0
  247. package/es/core/List/index.spec.js +9 -0
  248. package/es/core/NavList/NavList.js +78 -0
  249. package/es/core/NavList/NavListContext.js +80 -0
  250. package/es/core/NavList/NavListItem.js +141 -0
  251. package/es/core/NavList/NavListItemBase.js +133 -0
  252. package/es/core/NavList/NavListSubMenu.js +27 -0
  253. package/es/core/NavList/__snapshots__/index.spec.tsx.snap +334 -0
  254. package/es/core/NavList/index.js +5 -0
  255. package/es/core/NavList/index.mdx +185 -0
  256. package/es/core/NavList/index.spec.js +9 -0
  257. package/es/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +737 -0
  258. package/es/core/NotificationBanner/index.js +35 -0
  259. package/es/core/NotificationBanner/index.mdx +77 -0
  260. package/es/core/NotificationBanner/index.spec.js +20 -0
  261. package/es/core/PaginationLabel/index.js +20 -0
  262. package/es/core/ServiceBadge/ServiceBadge.mdx +0 -0
  263. package/es/core/ServiceBadge/index.js +20 -0
  264. package/es/core/ServiceBadge/index.mdx +42 -0
  265. package/es/core/SummaryList/__snapshots__/index.spec.tsx.snap +57 -0
  266. package/es/core/SummaryList/index.js +7 -0
  267. package/es/core/SummaryList/index.mdx +82 -0
  268. package/es/core/SummaryList/index.spec.js +9 -0
  269. package/es/core/Table/index.js +7 -0
  270. package/es/core/Tabs/index.js +37 -0
  271. package/es/core/Tabs/index.mdx +54 -0
  272. package/es/core/VisuallyHidden/index.js +1 -0
  273. package/es/core/WarningText/__snapshots__/index.spec.tsx.snap +336 -0
  274. package/es/core/WarningText/index.js +3 -0
  275. package/es/core/WarningText/index.mdx +46 -0
  276. package/es/core/WarningText/index.spec.js +9 -0
  277. package/{src/core/index.ts → es/core/index.js} +1 -0
  278. package/es/custom.d.js +0 -0
  279. package/{src → es}/form/inputs/Input/index.mdx +0 -0
  280. package/es/govgr/Footer/Copyright.js +37 -0
  281. package/es/govgr/Footer/HellenicRepublicLogo.js +3 -0
  282. package/es/govgr/Footer/LicenseCCSA.js +18 -0
  283. package/es/govgr/Footer/index.js +21 -0
  284. package/{src → es}/govgr/Footer/index.mdx +0 -0
  285. package/{src/govgr/Footer/logo.ts → es/govgr/Footer/logo.js} +1 -1
  286. package/{src/govgr/Footer/logos/logo-el.ts → es/govgr/Footer/logos/logo-el.js} +1 -1
  287. package/{src/govgr/Footer/logos/logo-en.ts → es/govgr/Footer/logos/logo-en.js} +1 -1
  288. package/{src → es}/govgr/Logo/govgr-logo.svg +0 -0
  289. package/es/govgr/Logo/index.js +3 -0
  290. package/{src/govgr/Logo/logo.ts → es/govgr/Logo/logo.js} +1 -1
  291. package/es/govgr/index.js +4 -0
  292. package/es/hooks/useDebounce.js +41 -0
  293. package/es/hooks/useLatest.js +12 -0
  294. package/{src/hooks/useOutdatedBrowserCheck.ts → es/hooks/useOutdatedBrowserCheck.js} +15 -16
  295. package/es/hooks/useSearch.js +25 -0
  296. package/es/hooks/useTogglableSections.js +96 -0
  297. package/es/index.js +5 -0
  298. package/es/layouts/Basic/Bottom/index.js +3 -0
  299. package/{src → es}/layouts/Basic/Bottom/index.mdx +0 -0
  300. package/es/layouts/Basic/Content/index.js +18 -0
  301. package/{src → es}/layouts/Basic/Content/index.mdx +0 -0
  302. package/es/layouts/Basic/Main/index.js +3 -0
  303. package/{src → es}/layouts/Basic/Main/index.mdx +0 -0
  304. package/es/layouts/Basic/Masthead/index.js +4 -0
  305. package/{src → es}/layouts/Basic/Masthead/index.mdx +0 -0
  306. package/{src/layouts/Basic/Side/index.tsx → es/layouts/Basic/Side/index.js} +3 -5
  307. package/{src → es}/layouts/Basic/Side/index.mdx +0 -0
  308. package/{src/layouts/Basic/Top/index.tsx → es/layouts/Basic/Top/index.js} +5 -7
  309. package/{src → es}/layouts/Basic/Top/index.mdx +0 -0
  310. package/{src → es}/layouts/Basic/__snapshots__/index.spec.tsx.snap +0 -0
  311. package/es/layouts/Basic/index.js +8 -0
  312. package/{src → es}/layouts/Basic/index.mdx +0 -0
  313. package/es/layouts/Basic/index.spec.js +10 -0
  314. package/es/layouts/Grid/index.js +1 -0
  315. package/es/layouts/index.js +2 -0
  316. package/{src/locales/el.ts → es/locales/el.js} +19 -18
  317. package/{src/locales/en.ts → es/locales/en.js} +18 -16
  318. package/es/router/index.js +15 -0
  319. package/{src → es}/router/index.mdx +0 -0
  320. package/es/test-utils/delay.js +31 -0
  321. package/es/test-utils/mountWithTheme.js +30 -0
  322. package/{src → es}/themes/govgr.js +29 -33
  323. package/es/themes/grnet.js +110 -0
  324. package/es/themes/index.js +2 -0
  325. package/es/typography/Caption.js +7 -0
  326. package/es/typography/NormalText.js +3 -0
  327. package/es/typography/Paragraph.js +2 -0
  328. package/es/typography/Title.js +48 -0
  329. package/es/typography/index.js +8 -0
  330. package/{src → es}/typography/index.mdx +0 -0
  331. package/es/utils/evaluateBrowserVersion.js +201 -0
  332. package/es/utils/withDeprecation.js +103 -0
  333. package/esm/api/APIErrors.js +96 -0
  334. package/esm/api/APIProvider.js +25 -0
  335. package/esm/api/fetchAPI.js +49 -0
  336. package/esm/api/index.js +13 -0
  337. package/esm/api/index.spec.js +546 -0
  338. package/esm/api/introduction.md +6 -0
  339. package/esm/api/useResource.js +128 -0
  340. package/esm/api/useResourceAction.js +141 -0
  341. package/esm/api/useResourceQuery.js +208 -0
  342. package/esm/api/utils.js +233 -0
  343. package/esm/app/App.js +27 -0
  344. package/esm/app/Confirmation/index.js +3 -0
  345. package/esm/app/Footer/index.js +15 -0
  346. package/esm/app/Header/HeaderContent.js +3 -0
  347. package/esm/app/Header/HeaderLogo.js +17 -0
  348. package/esm/app/Header/HeaderSection.js +7 -0
  349. package/esm/app/Header/HeaderTitle.js +17 -0
  350. package/esm/app/Header/__snapshots__/index.spec.tsx.snap +393 -0
  351. package/esm/app/Header/index.js +13 -0
  352. package/esm/app/Header/index.mdx +50 -0
  353. package/esm/app/Header/index.spec.js +32 -0
  354. package/esm/app/NotFound/index.js +12 -0
  355. package/esm/app/OutdatedBrowserBanner.js +24 -0
  356. package/esm/app/PageTitle.js +57 -0
  357. package/esm/app/QrCodeScanner/__snapshots__/index.spec.tsx.snap +22 -0
  358. package/esm/app/QrCodeScanner/index.js +64 -0
  359. package/esm/app/QrCodeScanner/index.mdx +22 -0
  360. package/esm/app/QrCodeScanner/index.spec.js +13 -0
  361. package/esm/app/i18n.js +42 -0
  362. package/esm/app/index.js +5 -0
  363. package/esm/core/Accordion/__snapshots__/index.spec.tsx.snap +78 -0
  364. package/esm/core/Accordion/index.js +50 -0
  365. package/esm/core/Accordion/index.mdx +104 -0
  366. package/esm/core/Accordion/index.spec.js +9 -0
  367. package/esm/core/Blockquote/__snapshots__/index.spec.tsx.snap +13 -0
  368. package/esm/core/Blockquote/index.js +16 -0
  369. package/esm/core/Blockquote/index.mdx +61 -0
  370. package/esm/core/Blockquote/index.spec.js +9 -0
  371. package/esm/core/Breadcrumbs/index.js +3 -0
  372. package/esm/core/Button/BackButton.js +21 -0
  373. package/esm/core/Button/ButtonLink.js +16 -0
  374. package/esm/core/Button/CallToAction.js +27 -0
  375. package/esm/core/Button/Icon.js +7 -0
  376. package/esm/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
  377. package/esm/core/Button/index.js +37 -0
  378. package/esm/core/Button/index.mdx +65 -0
  379. package/esm/core/Button/index.spec.js +9 -0
  380. package/esm/core/Card/index.js +4 -0
  381. package/esm/core/Details/__snapshots__/index.spec.tsx.snap +50 -0
  382. package/esm/core/Details/index.js +5 -0
  383. package/esm/core/Details/index.mdx +34 -0
  384. package/esm/core/Details/index.spec.js +17 -0
  385. package/esm/core/Divider/index.js +7 -0
  386. package/esm/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +322 -0
  387. package/esm/core/ErrorSummary/index.js +3 -0
  388. package/esm/core/ErrorSummary/index.mdx +61 -0
  389. package/esm/core/ErrorSummary/index.spec.js +9 -0
  390. package/esm/core/Hidden/index.js +1 -0
  391. package/esm/core/Link/__snapshots__/index.spec.tsx.snap +31 -0
  392. package/esm/core/Link/index.js +27 -0
  393. package/esm/core/Link/index.spec.js +21 -0
  394. package/esm/core/List/List.js +3 -0
  395. package/esm/core/List/ListItem.js +3 -0
  396. package/esm/core/List/ListItemContent.js +27 -0
  397. package/esm/core/List/ListItemIcon.js +29 -0
  398. package/esm/core/List/ListItemText.js +19 -0
  399. package/esm/core/List/ListItemTitle.js +25 -0
  400. package/esm/core/List/__snapshots__/index.spec.tsx.snap +322 -0
  401. package/esm/core/List/index.js +7 -0
  402. package/esm/core/List/index.mdx +40 -0
  403. package/esm/core/List/index.spec.js +9 -0
  404. package/esm/core/NavList/NavList.js +78 -0
  405. package/esm/core/NavList/NavListContext.js +80 -0
  406. package/esm/core/NavList/NavListItem.js +141 -0
  407. package/esm/core/NavList/NavListItemBase.js +133 -0
  408. package/esm/core/NavList/NavListSubMenu.js +27 -0
  409. package/esm/core/NavList/__snapshots__/index.spec.tsx.snap +334 -0
  410. package/esm/core/NavList/index.js +5 -0
  411. package/esm/core/NavList/index.mdx +185 -0
  412. package/esm/core/NavList/index.spec.js +9 -0
  413. package/esm/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +737 -0
  414. package/esm/core/NotificationBanner/index.js +35 -0
  415. package/esm/core/NotificationBanner/index.mdx +77 -0
  416. package/esm/core/NotificationBanner/index.spec.js +20 -0
  417. package/esm/core/PaginationLabel/index.js +20 -0
  418. package/esm/core/ServiceBadge/ServiceBadge.mdx +0 -0
  419. package/esm/core/ServiceBadge/index.js +20 -0
  420. package/esm/core/ServiceBadge/index.mdx +42 -0
  421. package/esm/core/SummaryList/__snapshots__/index.spec.tsx.snap +57 -0
  422. package/esm/core/SummaryList/index.js +7 -0
  423. package/esm/core/SummaryList/index.mdx +82 -0
  424. package/esm/core/SummaryList/index.spec.js +9 -0
  425. package/esm/core/Table/index.js +7 -0
  426. package/esm/core/Tabs/index.js +37 -0
  427. package/esm/core/Tabs/index.mdx +54 -0
  428. package/esm/core/VisuallyHidden/index.js +1 -0
  429. package/esm/core/WarningText/__snapshots__/index.spec.tsx.snap +336 -0
  430. package/esm/core/WarningText/index.js +3 -0
  431. package/esm/core/WarningText/index.mdx +46 -0
  432. package/esm/core/WarningText/index.spec.js +9 -0
  433. package/esm/core/index.js +18 -0
  434. package/esm/custom.d.js +0 -0
  435. package/esm/form/inputs/Input/index.mdx +10 -0
  436. package/esm/govgr/Footer/Copyright.js +37 -0
  437. package/esm/govgr/Footer/HellenicRepublicLogo.js +3 -0
  438. package/esm/govgr/Footer/LicenseCCSA.js +18 -0
  439. package/esm/govgr/Footer/index.js +21 -0
  440. package/esm/govgr/Footer/index.mdx +97 -0
  441. package/esm/govgr/Footer/logo.js +1 -0
  442. package/esm/govgr/Footer/logos/logo-el.js +1 -0
  443. package/esm/govgr/Footer/logos/logo-en.js +1 -0
  444. package/esm/govgr/Logo/govgr-logo.svg +1 -0
  445. package/esm/govgr/Logo/index.js +3 -0
  446. package/esm/govgr/Logo/logo.js +1 -0
  447. package/esm/govgr/index.js +4 -0
  448. package/esm/hooks/useDebounce.js +41 -0
  449. package/esm/hooks/useLatest.js +12 -0
  450. package/esm/hooks/useOutdatedBrowserCheck.js +46 -0
  451. package/esm/hooks/useSearch.js +25 -0
  452. package/esm/hooks/useTogglableSections.js +96 -0
  453. package/esm/index.js +10 -0
  454. package/esm/layouts/Basic/Bottom/index.js +3 -0
  455. package/esm/layouts/Basic/Bottom/index.mdx +37 -0
  456. package/esm/layouts/Basic/Content/index.js +18 -0
  457. package/esm/layouts/Basic/Content/index.mdx +64 -0
  458. package/esm/layouts/Basic/Main/index.js +3 -0
  459. package/esm/layouts/Basic/Main/index.mdx +64 -0
  460. package/esm/layouts/Basic/Masthead/index.js +4 -0
  461. package/esm/layouts/Basic/Masthead/index.mdx +74 -0
  462. package/esm/layouts/Basic/Side/index.js +7 -0
  463. package/esm/layouts/Basic/Side/index.mdx +71 -0
  464. package/esm/layouts/Basic/Top/index.js +11 -0
  465. package/esm/layouts/Basic/Top/index.mdx +74 -0
  466. package/esm/layouts/Basic/__snapshots__/index.spec.tsx.snap +54 -0
  467. package/esm/layouts/Basic/index.js +8 -0
  468. package/esm/layouts/Basic/index.mdx +62 -0
  469. package/esm/layouts/Basic/index.spec.js +10 -0
  470. package/esm/layouts/Grid/index.js +1 -0
  471. package/esm/layouts/index.js +2 -0
  472. package/esm/locales/el.js +61 -0
  473. package/esm/locales/en.js +61 -0
  474. package/esm/router/index.js +15 -0
  475. package/esm/router/index.mdx +40 -0
  476. package/esm/test-utils/delay.js +31 -0
  477. package/esm/test-utils/mountWithTheme.js +30 -0
  478. package/esm/themes/govgr.js +79 -0
  479. package/esm/themes/grnet.js +110 -0
  480. package/esm/themes/index.js +2 -0
  481. package/esm/typography/Caption.js +7 -0
  482. package/esm/typography/NormalText.js +3 -0
  483. package/esm/typography/Paragraph.js +2 -0
  484. package/esm/typography/Title.js +48 -0
  485. package/esm/typography/index.js +8 -0
  486. package/esm/typography/index.mdx +32 -0
  487. package/esm/utils/evaluateBrowserVersion.js +201 -0
  488. package/esm/utils/withDeprecation.js +103 -0
  489. package/form/inputs/Input/index.mdx +10 -0
  490. package/govgr/Footer/Copyright.d.ts +8 -0
  491. package/govgr/Footer/Copyright.js +52 -0
  492. package/{src/govgr/Footer/HellenicRepublicLogo.tsx → govgr/Footer/HellenicRepublicLogo.d.ts} +0 -1
  493. package/govgr/Footer/HellenicRepublicLogo.js +19 -0
  494. package/govgr/Footer/LicenseCCSA.d.ts +3 -0
  495. package/govgr/Footer/LicenseCCSA.js +33 -0
  496. package/govgr/Footer/index.d.ts +13 -0
  497. package/govgr/Footer/index.js +39 -0
  498. package/govgr/Footer/index.mdx +97 -0
  499. package/govgr/Footer/logo.d.ts +2 -0
  500. package/govgr/Footer/logo.js +8 -0
  501. package/govgr/Footer/logos/logo-el.d.ts +2 -0
  502. package/govgr/Footer/logos/logo-el.js +8 -0
  503. package/govgr/Footer/logos/logo-en.d.ts +2 -0
  504. package/govgr/Footer/logos/logo-en.js +8 -0
  505. package/govgr/Logo/govgr-logo.svg +1 -0
  506. package/{src/govgr/Logo/index.tsx → govgr/Logo/index.d.ts} +0 -2
  507. package/govgr/Logo/index.js +19 -0
  508. package/govgr/Logo/logo.d.ts +2 -0
  509. package/govgr/Logo/logo.js +8 -0
  510. package/{src/govgr/index.ts → govgr/index.d.ts} +0 -0
  511. package/govgr/index.js +57 -0
  512. package/hooks/useDebounce.d.ts +3 -0
  513. package/hooks/useDebounce.js +63 -0
  514. package/hooks/useLatest.d.ts +3 -0
  515. package/hooks/useLatest.js +26 -0
  516. package/hooks/useOutdatedBrowserCheck.d.ts +2 -0
  517. package/hooks/useOutdatedBrowserCheck.js +60 -0
  518. package/hooks/useSearch.d.ts +4 -0
  519. package/hooks/useSearch.js +40 -0
  520. package/hooks/useTogglableSections.d.ts +18 -0
  521. package/hooks/useTogglableSections.js +108 -0
  522. package/{src/index.ts → index.d.ts} +0 -0
  523. package/index.js +70 -0
  524. package/{src/layouts/Basic/Bottom/index.tsx → layouts/Basic/Bottom/index.d.ts} +0 -1
  525. package/layouts/Basic/Bottom/index.js +19 -0
  526. package/layouts/Basic/Bottom/index.mdx +37 -0
  527. package/layouts/Basic/Content/index.d.ts +5 -0
  528. package/layouts/Basic/Content/index.js +31 -0
  529. package/layouts/Basic/Content/index.mdx +64 -0
  530. package/{src/layouts/Basic/Main/index.tsx → layouts/Basic/Main/index.d.ts} +0 -1
  531. package/layouts/Basic/Main/index.js +19 -0
  532. package/layouts/Basic/Main/index.mdx +64 -0
  533. package/{src/layouts/Basic/Masthead/index.tsx → layouts/Basic/Masthead/index.d.ts} +0 -2
  534. package/layouts/Basic/Masthead/index.js +27 -0
  535. package/layouts/Basic/Masthead/index.mdx +74 -0
  536. package/layouts/Basic/Side/index.d.ts +3 -0
  537. package/layouts/Basic/Side/index.js +20 -0
  538. package/layouts/Basic/Side/index.mdx +71 -0
  539. package/layouts/Basic/Top/index.d.ts +3 -0
  540. package/layouts/Basic/Top/index.js +24 -0
  541. package/layouts/Basic/Top/index.mdx +74 -0
  542. package/layouts/Basic/__snapshots__/index.spec.tsx.snap +54 -0
  543. package/{src/layouts/Basic/index.tsx → layouts/Basic/index.d.ts} +0 -2
  544. package/layouts/Basic/index.js +97 -0
  545. package/layouts/Basic/index.mdx +62 -0
  546. package/layouts/Basic/index.spec.d.ts +1 -0
  547. package/layouts/Basic/index.spec.js +20 -0
  548. package/{src/layouts/Grid/index.tsx → layouts/Grid/index.d.ts} +0 -0
  549. package/layouts/Grid/index.js +18 -0
  550. package/{src/layouts/index.ts → layouts/index.d.ts} +0 -0
  551. package/layouts/index.js +34 -0
  552. package/locales/el.d.ts +62 -0
  553. package/locales/el.js +68 -0
  554. package/locales/en.d.ts +62 -0
  555. package/locales/en.js +68 -0
  556. package/package.json +9 -31
  557. package/router/index.d.ts +9 -0
  558. package/router/index.js +37 -0
  559. package/router/index.mdx +40 -0
  560. package/test-utils/delay.d.ts +2 -0
  561. package/test-utils/delay.js +45 -0
  562. package/test-utils/mountWithTheme.d.ts +3 -0
  563. package/test-utils/mountWithTheme.js +43 -0
  564. package/themes/govgr.d.ts +3 -0
  565. package/themes/govgr.js +89 -0
  566. package/themes/grnet.d.ts +2 -0
  567. package/themes/grnet.js +128 -0
  568. package/themes/index.d.ts +32 -0
  569. package/themes/index.js +19 -0
  570. package/typography/Caption.d.ts +7 -0
  571. package/typography/Caption.js +20 -0
  572. package/typography/NormalText.d.ts +5 -0
  573. package/typography/NormalText.js +19 -0
  574. package/typography/Paragraph.d.ts +6 -0
  575. package/typography/Paragraph.js +13 -0
  576. package/typography/Title.d.ts +9 -0
  577. package/typography/Title.js +63 -0
  578. package/{src/typography/index.ts → typography/index.d.ts} +0 -0
  579. package/typography/index.js +97 -0
  580. package/typography/index.mdx +32 -0
  581. package/utils/evaluateBrowserVersion.d.ts +15 -0
  582. package/utils/evaluateBrowserVersion.js +216 -0
  583. package/utils/withDeprecation.d.ts +16 -0
  584. package/utils/withDeprecation.js +116 -0
  585. package/.eslintrc.js +0 -4
  586. package/.prettierrc.js +0 -3
  587. package/.rush/temp/package-deps_build.json +0 -176
  588. package/.rush/temp/shrinkwrap-deps.json +0 -278
  589. package/CHANGELOG.json +0 -796
  590. package/docs/components.mdx +0 -1
  591. package/docs/create-a-new-service.mdx +0 -93
  592. package/docs/create-common-page-layout.mdx +0 -205
  593. package/docs/create-static-page.mdx +0 -179
  594. package/docs/edit-start-page.mdx +0 -143
  595. package/docs/index.mdx +0 -66
  596. package/docs/introduction.mdx +0 -34
  597. package/src/api/APIErrors.tsx +0 -44
  598. package/src/api/APIProvider.tsx +0 -27
  599. package/src/api/fetchAPI.ts +0 -45
  600. package/src/api/index.spec.tsx +0 -419
  601. package/src/api/useResource.tsx +0 -96
  602. package/src/api/useResourceAction.tsx +0 -80
  603. package/src/api/useResourceQuery.tsx +0 -177
  604. package/src/api/utils.tsx +0 -156
  605. package/src/app/App.tsx +0 -33
  606. package/src/app/Header/HeaderSection.tsx +0 -13
  607. package/src/app/Header/HeaderTitle.tsx +0 -24
  608. package/src/app/Header/index.spec.tsx +0 -32
  609. package/src/app/NotFound/index.tsx +0 -21
  610. package/src/app/OutdatedBrowserBanner.tsx +0 -37
  611. package/src/app/PageTitle.tsx +0 -70
  612. package/src/app/QrCodeScanner/index.spec.tsx +0 -19
  613. package/src/app/QrCodeScanner/index.tsx +0 -90
  614. package/src/app/i18n.tsx +0 -44
  615. package/src/core/Accordion/index.spec.tsx +0 -30
  616. package/src/core/Accordion/index.tsx +0 -86
  617. package/src/core/Blockquote/index.spec.tsx +0 -10
  618. package/src/core/Button/ButtonLink.tsx +0 -20
  619. package/src/core/Button/CallToAction.tsx +0 -31
  620. package/src/core/Button/Icon.tsx +0 -9
  621. package/src/core/Button/index.spec.tsx +0 -8
  622. package/src/core/Button/index.tsx +0 -46
  623. package/src/core/Details/index.spec.tsx +0 -38
  624. package/src/core/Divider/index.tsx +0 -13
  625. package/src/core/ErrorSummary/index.spec.tsx +0 -10
  626. package/src/core/Link/index.spec.tsx +0 -22
  627. package/src/core/Link/index.tsx +0 -41
  628. package/src/core/List/ListItemContent.tsx +0 -32
  629. package/src/core/List/ListItemIcon.tsx +0 -31
  630. package/src/core/List/ListItemText.tsx +0 -23
  631. package/src/core/List/ListItemTitle.tsx +0 -37
  632. package/src/core/List/index.spec.tsx +0 -10
  633. package/src/core/NavList/NavList.tsx +0 -103
  634. package/src/core/NavList/NavListContext.tsx +0 -85
  635. package/src/core/NavList/NavListItem.tsx +0 -143
  636. package/src/core/NavList/NavListItemBase.tsx +0 -146
  637. package/src/core/NavList/NavListSubMenu.tsx +0 -33
  638. package/src/core/NavList/index.spec.tsx +0 -10
  639. package/src/core/NotificationBanner/index.spec.tsx +0 -27
  640. package/src/core/NotificationBanner/index.tsx +0 -52
  641. package/src/core/ServiceBadge/index.tsx +0 -35
  642. package/src/core/SummaryList/index.spec.tsx +0 -28
  643. package/src/core/Tabs/index.tsx +0 -36
  644. package/src/core/WarningText/index.spec.tsx +0 -10
  645. package/src/custom.d.ts +0 -8
  646. package/src/govgr/Footer/Copyright.tsx +0 -64
  647. package/src/govgr/Footer/LicenseCCSA.tsx +0 -24
  648. package/src/govgr/Footer/index.tsx +0 -49
  649. package/src/hooks/useDebounce.ts +0 -50
  650. package/src/hooks/useLatest.ts +0 -12
  651. package/src/hooks/useSearch.ts +0 -47
  652. package/src/hooks/useTogglableSections.tsx +0 -102
  653. package/src/layouts/Basic/Content/index.tsx +0 -24
  654. package/src/layouts/Basic/index.spec.tsx +0 -24
  655. package/src/router/index.tsx +0 -28
  656. package/src/test-utils/delay.ts +0 -9
  657. package/src/test-utils/mountWithTheme.tsx +0 -33
  658. package/src/themes/grnet.js +0 -109
  659. package/src/themes/index.tsx +0 -38
  660. package/src/typography/Caption.tsx +0 -15
  661. package/src/typography/NormalText.tsx +0 -7
  662. package/src/typography/Paragraph.tsx +0 -9
  663. package/src/typography/Title.tsx +0 -51
  664. package/src/utils/evaluateBrowserVersion.ts +0 -346
  665. package/src/utils/withDeprecation.tsx +0 -97
  666. package/tsconfig.json +0 -18
  667. package/tsconfig.production.json +0 -27
  668. package/ui.build.log +0 -17
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ var _exportNames = {};
9
+ exports["default"] = void 0;
10
+
11
+ var _Layout = _interopRequireDefault(require("@digigov/react-core/Layout"));
12
+
13
+ var _Top = require("@digigov/ui/layouts/Basic/Top");
14
+
15
+ Object.keys(_Top).forEach(function (key) {
16
+ if (key === "default" || key === "__esModule") return;
17
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
18
+ if (key in exports && exports[key] === _Top[key]) return;
19
+ Object.defineProperty(exports, key, {
20
+ enumerable: true,
21
+ get: function get() {
22
+ return _Top[key];
23
+ }
24
+ });
25
+ });
26
+
27
+ var _Side = require("@digigov/ui/layouts/Basic/Side");
28
+
29
+ Object.keys(_Side).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
32
+ if (key in exports && exports[key] === _Side[key]) return;
33
+ Object.defineProperty(exports, key, {
34
+ enumerable: true,
35
+ get: function get() {
36
+ return _Side[key];
37
+ }
38
+ });
39
+ });
40
+
41
+ var _Main = require("@digigov/ui/layouts/Basic/Main");
42
+
43
+ Object.keys(_Main).forEach(function (key) {
44
+ if (key === "default" || key === "__esModule") return;
45
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
46
+ if (key in exports && exports[key] === _Main[key]) return;
47
+ Object.defineProperty(exports, key, {
48
+ enumerable: true,
49
+ get: function get() {
50
+ return _Main[key];
51
+ }
52
+ });
53
+ });
54
+
55
+ var _Content = require("@digigov/ui/layouts/Basic/Content");
56
+
57
+ Object.keys(_Content).forEach(function (key) {
58
+ if (key === "default" || key === "__esModule") return;
59
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
60
+ if (key in exports && exports[key] === _Content[key]) return;
61
+ Object.defineProperty(exports, key, {
62
+ enumerable: true,
63
+ get: function get() {
64
+ return _Content[key];
65
+ }
66
+ });
67
+ });
68
+
69
+ var _Bottom = require("@digigov/ui/layouts/Basic/Bottom");
70
+
71
+ Object.keys(_Bottom).forEach(function (key) {
72
+ if (key === "default" || key === "__esModule") return;
73
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
74
+ if (key in exports && exports[key] === _Bottom[key]) return;
75
+ Object.defineProperty(exports, key, {
76
+ enumerable: true,
77
+ get: function get() {
78
+ return _Bottom[key];
79
+ }
80
+ });
81
+ });
82
+
83
+ var _Masthead = require("@digigov/ui/layouts/Basic/Masthead");
84
+
85
+ Object.keys(_Masthead).forEach(function (key) {
86
+ if (key === "default" || key === "__esModule") return;
87
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
88
+ if (key in exports && exports[key] === _Masthead[key]) return;
89
+ Object.defineProperty(exports, key, {
90
+ enumerable: true,
91
+ get: function get() {
92
+ return _Masthead[key];
93
+ }
94
+ });
95
+ });
96
+ var _default = _Layout["default"];
97
+ exports["default"] = _default;
@@ -0,0 +1,62 @@
1
+ ---
2
+ title: Basic Layout
3
+ parent: docs/ui/components
4
+ ---
5
+
6
+ # BasicLayout
7
+
8
+ import BasicLayout, {
9
+ Top,
10
+ Side,
11
+ Main,
12
+ Content,
13
+ Bottom,
14
+ } from '@digigov/ui/layouts/Basic';
15
+ import StylesDoc from '@docs-components/stylesDoc';
16
+
17
+ Use the BasicLayout component to create a basic page layout.
18
+
19
+ ```jsx live path=layouts/Basic/index.tsx
20
+ import BasicLayout, { Top, Side, Main , Content, Bottom } from '@digigov/ui/layouts/Basic';
21
+ function CustomLayout (props){
22
+ return (
23
+ <BasicLayout>
24
+ <Top>Header content</Top>
25
+ <Content>
26
+ <Main>Main content</Main>
27
+ <Side>Side content</Side>
28
+ </Content>
29
+ <Bottom>Bottom content</Bottom>
30
+ </BasicLayout>
31
+ )
32
+ }
33
+ export CustomLayout
34
+
35
+ ```
36
+
37
+ <br />
38
+
39
+ ## How it works
40
+
41
+ The BasicLayout component is used in combination with the Top, Side, Main,
42
+ Content and Bottom components.
43
+
44
+ ## API
45
+
46
+ ### Properties
47
+
48
+ <br />
49
+
50
+ ### Styles
51
+
52
+ <StylesDoc data={BasicLayout.__doc__} />
53
+ <br />
54
+ <StylesDoc data={Top.__doc__} />
55
+ <br />
56
+ <StylesDoc data={Content.__doc__} />
57
+ <br />
58
+ <StylesDoc data={Main.__doc__} />
59
+ <br />
60
+ <StylesDoc data={Side.__doc__} />
61
+ <br />
62
+ <StylesDoc data={Bottom.__doc__} />
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
+
5
+ var React = _interopRequireWildcard(require("react"));
6
+
7
+ var _enzyme = require("enzyme");
8
+
9
+ var _Basic = _interopRequireWildcard(require("@digigov/ui/layouts/Basic"));
10
+
11
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
+
13
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
+
15
+ var _ref = /*#__PURE__*/React.createElement(_Basic["default"], null, /*#__PURE__*/React.createElement(_Basic.Top, null, "Header content"), /*#__PURE__*/React.createElement(_Basic.Content, null, /*#__PURE__*/React.createElement(_Basic.Main, null, "Main content"), /*#__PURE__*/React.createElement(_Basic.Side, null, "Side content")), /*#__PURE__*/React.createElement(_Basic.Bottom, null, "Bottom content"));
16
+
17
+ it('renders the BasicLayout with Top, Content, Bottom, Main and Side children ', function () {
18
+ var jsx = _ref;
19
+ expect((0, _enzyme.mount)(jsx)).toMatchSnapshot();
20
+ });
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _Grid = require("@digigov/react-core/Grid");
8
+
9
+ Object.keys(_Grid).forEach(function (key) {
10
+ if (key === "default" || key === "__esModule") return;
11
+ if (key in exports && exports[key] === _Grid[key]) return;
12
+ Object.defineProperty(exports, key, {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _Grid[key];
16
+ }
17
+ });
18
+ });
File without changes
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ var _exportNames = {
9
+ BasicLayout: true
10
+ };
11
+ Object.defineProperty(exports, "BasicLayout", {
12
+ enumerable: true,
13
+ get: function get() {
14
+ return _Basic["default"];
15
+ }
16
+ });
17
+
18
+ var _Basic = _interopRequireWildcard(require("@digigov/ui/layouts/Basic"));
19
+
20
+ Object.keys(_Basic).forEach(function (key) {
21
+ if (key === "default" || key === "__esModule") return;
22
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
23
+ if (key in exports && exports[key] === _Basic[key]) return;
24
+ Object.defineProperty(exports, key, {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _Basic[key];
28
+ }
29
+ });
30
+ });
31
+
32
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
+
34
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -0,0 +1,62 @@
1
+ declare const _default: {
2
+ form: {
3
+ label: {
4
+ day: string;
5
+ month: string;
6
+ year: string;
7
+ };
8
+ error: {
9
+ required: string;
10
+ number: string;
11
+ positive_number: string;
12
+ string: string;
13
+ email: string;
14
+ afm: string;
15
+ file_size: string;
16
+ mobile_phone: string;
17
+ uuid4: string;
18
+ date: {
19
+ invalid: string;
20
+ earlier_than: string;
21
+ later_than: string;
22
+ };
23
+ };
24
+ };
25
+ button: {
26
+ start: string;
27
+ login: string;
28
+ back: string;
29
+ continue: string;
30
+ search_ref: string;
31
+ scan: string;
32
+ save: string;
33
+ logout: string;
34
+ submit: string;
35
+ delete: string;
36
+ };
37
+ footer: {
38
+ created_by: string;
39
+ grnet: string;
40
+ mindigital: string;
41
+ using: string;
42
+ open_source: string;
43
+ creative_commons: string;
44
+ };
45
+ notfound: {
46
+ page_not_found: string;
47
+ wrong_key_address: string;
48
+ wrong_cp_address: string;
49
+ service_contact: string;
50
+ };
51
+ outdated: {
52
+ mobile: string;
53
+ web: string;
54
+ };
55
+ pagination: {
56
+ show: string;
57
+ to: string;
58
+ of: string;
59
+ results: string;
60
+ };
61
+ };
62
+ export default _default;
package/locales/el.js ADDED
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _default = {
8
+ form: {
9
+ label: {
10
+ day: 'Ημέρα',
11
+ month: 'Μήνας',
12
+ year: 'Έτος'
13
+ },
14
+ error: {
15
+ required: 'Το πεδίο είναι υποχρεωτικό.',
16
+ number: 'Συμπληρώστε έναν έγκυρο αριθμό',
17
+ positive_number: 'Συμπληρώστε έναν θετικό αριθμό',
18
+ string: 'Το πεδίο πρέπει να είναι string',
19
+ email: 'Συμπληρώστε μια έγκυρη ηλεκτρονική διεύθυνση (e-mail).',
20
+ afm: 'Ο Α.Φ.Μ που πληκτρολογήσατε είναι λανθασμένος.',
21
+ file_size: 'Το μέγεθος του αρχείου είναι μεγαλύτερο απο το επιτρεπόμενο.',
22
+ mobile_phone: 'Συμπληρώστε έναν έγκυρο αριθμό κινητού τηλεφώνου.',
23
+ uuid4: 'Ο κωδικός επιβεβαίωσης δεν είναι έγκυρος.',
24
+ date: {
25
+ invalid: 'Η ημερομηνία πρέπει να είναι έγκυρη.',
26
+ earlier_than: 'Συμπληρώστε μια ημερομηνία προγενέστερη της {{maxDate}}',
27
+ later_than: 'Συμπληρώστε μια ημερομηνία μεταγενέστερη της {{minDate}}'
28
+ }
29
+ }
30
+ },
31
+ button: {
32
+ start: 'Ξεκινήστε εδώ',
33
+ login: 'Σύνδεση',
34
+ back: 'Πίσω',
35
+ "continue": 'Συνέχεια',
36
+ search_ref: 'Αναζητήστε',
37
+ scan: 'Σαρώστε QR Code',
38
+ save: 'Αποθήκευση',
39
+ logout: 'Εξοδος',
40
+ submit: 'Υποβολή',
41
+ "delete": 'Διαγραφή'
42
+ },
43
+ footer: {
44
+ created_by: 'Υλοποίηση από το',
45
+ grnet: 'ΕΔΥΤΕ',
46
+ mindigital: 'Υπουργείο Ψηφιακής Διακυβέρνησης',
47
+ using: 'με χρήση',
48
+ open_source: 'Ανοιχτού Λογισμικού',
49
+ creative_commons: 'Άδεια χρήσης περιεχομένου'
50
+ },
51
+ notfound: {
52
+ page_not_found: 'Η σελίδα δεν βρέθηκε',
53
+ wrong_key_address: 'Εάν έχετε πληκτρολογήσει τη διεύθυνση της σελίδας, ελέγξτε ότι είναι σωστή.',
54
+ wrong_cp_address: 'Εάν έχετε επικολλήσει τη διεύθυνση της σελίδας, ελέγξτε ότι έχετε αντιγράψει ολόκληρη τη διεύθυνση.',
55
+ service_contact: 'Εάν η διεύθυνση της σελίδας είναι σωστή ή έχετε επιλέξει κάποιον σύνδεσμο ή κουμπί, επικοινωνήστε με τη γραμμή εξυπηρέτησης σε περίπτωση που χρειαστείτε βοήθεια.'
56
+ },
57
+ outdated: {
58
+ mobile: 'Η ιστοσελίδα ενδέχεται να μην λειτουργεί σωστά καθώς ο browser σας είτε δεν υποστηρίζεται είτε είναι μη επικαιροποιημένος. Παρακαλούμε επικαιροποιήστε τον browser σας.',
59
+ web: 'Η ιστοσελίδα ενδέχεται να μην λειτουργεί σωστά καθώς ο browser σας είναι μη επικαιροποιημένος. Για να επικαιροποιήσετε τον browser σας επισκεφθείτε την ιστοσελίδα: '
60
+ },
61
+ pagination: {
62
+ show: 'Εμφανίζονται',
63
+ to: 'έως',
64
+ of: 'από',
65
+ results: 'αποτελέσματα'
66
+ }
67
+ };
68
+ exports["default"] = _default;
@@ -0,0 +1,62 @@
1
+ declare const _default: {
2
+ form: {
3
+ label: {
4
+ day: string;
5
+ month: string;
6
+ year: string;
7
+ };
8
+ error: {
9
+ required: string;
10
+ number: string;
11
+ positive_number: string;
12
+ string: string;
13
+ email: string;
14
+ afm: string;
15
+ file_size: string;
16
+ mobile_phone: string;
17
+ uuid4: string;
18
+ date: {
19
+ invalid: string;
20
+ earlier_than: string;
21
+ later_than: string;
22
+ };
23
+ };
24
+ };
25
+ button: {
26
+ start: string;
27
+ login: string;
28
+ back: string;
29
+ continue: string;
30
+ search_ref: string;
31
+ scan: string;
32
+ save: string;
33
+ logout: string;
34
+ submit: string;
35
+ delete: string;
36
+ };
37
+ footer: {
38
+ created_by: string;
39
+ grnet: string;
40
+ mindigital: string;
41
+ using: string;
42
+ open_source: string;
43
+ creative_commons: string;
44
+ };
45
+ notfound: {
46
+ page_not_found: string;
47
+ wrong_key_address: string;
48
+ wrong_cp_address: string;
49
+ service_contact: string;
50
+ };
51
+ outdated: {
52
+ mobile: string;
53
+ web: string;
54
+ };
55
+ pagination: {
56
+ show: string;
57
+ to: string;
58
+ of: string;
59
+ results: string;
60
+ };
61
+ };
62
+ export default _default;
package/locales/en.js ADDED
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _default = {
8
+ form: {
9
+ label: {
10
+ day: 'Day',
11
+ month: 'Month',
12
+ year: 'Year'
13
+ },
14
+ error: {
15
+ required: 'This field is required.',
16
+ number: 'Please enter a valid number',
17
+ positive_number: 'Please enter a positive number',
18
+ string: 'This field must be a string',
19
+ email: 'Please enter a valid email address (e-mail).',
20
+ afm: 'The VAT number you entered is incorrect.',
21
+ file_size: 'File size is larger than allowed.',
22
+ mobile_phone: 'Fill in a valid mobile phone number.',
23
+ uuid4: 'Confirmation code is invalid.',
24
+ date: {
25
+ invalid: 'Date must be a real date.',
26
+ earlier_than: 'The date must be earlier than {{maxDate}}.',
27
+ later_than: 'The date must be later than {{minDate}}'
28
+ }
29
+ }
30
+ },
31
+ button: {
32
+ start: 'Start',
33
+ login: 'Login',
34
+ back: 'Back',
35
+ "continue": 'Continue',
36
+ search_ref: 'Search',
37
+ scan: 'Scan QR Code',
38
+ save: 'Save',
39
+ logout: 'Logout',
40
+ submit: 'Sumbit',
41
+ "delete": 'Delete'
42
+ },
43
+ footer: {
44
+ created_by: 'Created by',
45
+ grnet: 'GRNET',
46
+ mindigital: 'Ministry of Digital Governance',
47
+ using: 'using',
48
+ open_source: 'Open Source Software',
49
+ creative_commons: 'Creative Commons'
50
+ },
51
+ notfound: {
52
+ page_not_found: 'Page not found',
53
+ wrong_key_address: 'If you typed the web address, check it is correct.',
54
+ wrong_cp_address: 'If you pasted the web address, check you copied the entire address..',
55
+ service_contact: 'If the web address is correct or you selected a link or button, contact the Service Helpline if you need to speak to someone about your tax credits.'
56
+ },
57
+ outdated: {
58
+ mobile: 'This site may not work properly because your browser is either not supported or outdated. Please update your browser',
59
+ web: 'This site may not work properly because your browser outdated. To update your browser visit: '
60
+ },
61
+ pagination: {
62
+ show: 'Showing',
63
+ to: 'to',
64
+ of: 'of',
65
+ results: 'results'
66
+ }
67
+ };
68
+ exports["default"] = _default;
package/package.json CHANGED
@@ -1,17 +1,11 @@
1
1
  {
2
2
  "name": "@digigov/ui",
3
- "version": "0.12.2",
3
+ "version": "0.14.0",
4
4
  "description": "@digigov reusable components toolkit",
5
- "module": "index.js",
5
+ "module": "./esm/index.js",
6
6
  "publishConfig": {
7
7
  "directory": "dist"
8
8
  },
9
- "scripts": {
10
- "lint": "digigov lint",
11
- "test": "digigov test",
12
- "build": "digigov build --subpackages",
13
- "prepublish": "digigov build --subpackages"
14
- },
15
9
  "dependencies": {
16
10
  "google-libphonenumber": "3.2.8",
17
11
  "react-qr-reader": "2.2.1",
@@ -24,27 +18,11 @@
24
18
  "clsx": "1.1.1",
25
19
  "react": "16.14.0",
26
20
  "react-dom": "16.14.0",
27
- "@digigov/react-core": "0.6.1"
28
- },
29
- "devDependencies": {
30
- "@digigov/cli": "0.5.27",
31
- "@digigov/cli-lint": "0.5.28",
32
- "@digigov/cli-build": "0.7.1",
33
- "@digigov/cli-test": "0.6.0",
34
- "@testing-library/react": "11.2.1",
35
- "@testing-library/react-hooks": "3.4.2",
36
- "@types/react-qr-reader": "2.1.2",
37
- "typescript": "4.2.3",
38
- "@types/node": "14.14.9",
39
- "@types/react": "16.9.56",
40
- "@types/react-dom": "16.9.9",
41
- "@types/enzyme": "3.10.8",
42
- "@types/enzyme-adapter-react-16": "1.0.5",
43
- "@types/jest": "26.0.15",
44
- "enzyme": "3.11.0",
45
- "fetch-mock": "9.3.1",
46
- "eslint": "7.24.0",
47
- "prettier": "2.2.1"
21
+ "@digigov/react-core": "0.6.5",
22
+ "@digigov/react-extensions": "0.6.0"
48
23
  },
49
- "gitHead": "c903a46306f77f55ad7fc4d2e274006f39a6c871"
50
- }
24
+ "gitHead": "c903a46306f77f55ad7fc4d2e274006f39a6c871",
25
+ "private": false,
26
+ "main": "./index.js",
27
+ "typings": "./index.d.ts"
28
+ }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export declare type RouterInterface = {
3
+ children?: React.ReactNode;
4
+ router?: any;
5
+ };
6
+ export declare const RouterContext: React.Context<RouterInterface>;
7
+ export declare const useRouter: () => RouterInterface;
8
+ export declare const RouterProvider: React.FC<RouterInterface>;
9
+ export default RouterContext;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.useRouter = exports["default"] = exports.RouterProvider = exports.RouterContext = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
+
14
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+
16
+ var RouterContext = /*#__PURE__*/(0, _react.createContext)({});
17
+ exports.RouterContext = RouterContext;
18
+
19
+ var useRouter = function useRouter() {
20
+ return (0, _react.useContext)(RouterContext);
21
+ };
22
+
23
+ exports.useRouter = useRouter;
24
+
25
+ var RouterProvider = function RouterProvider(_ref) {
26
+ var router = _ref.router,
27
+ children = _ref.children;
28
+ return /*#__PURE__*/_react["default"].createElement(RouterContext.Provider, {
29
+ value: {
30
+ router: router
31
+ }
32
+ }, children);
33
+ };
34
+
35
+ exports.RouterProvider = RouterProvider;
36
+ var _default = RouterContext;
37
+ exports["default"] = _default;
@@ -0,0 +1,40 @@
1
+ ---
2
+ title: RouterProvider
3
+ parent: docs/ui/components
4
+ ---
5
+
6
+ The `@digigov/ui` SDK uses [Nextjs](https://nextjs.org) and its routing solution under the hood. RouterProvider allows app developers to inject the router instance of the app without having to resort to hacky solutions.
7
+
8
+ ## How to use
9
+
10
+ First you have to import the React component called `RouterProvider` and the Nextjs router hook.
11
+
12
+ ```jsx
13
+ import { RouterProvider } from '@digigov/ui/router';
14
+ import { useRouter } from 'next/router';
15
+ ```
16
+
17
+ Then you can wrap the whole layout of your app and you're good to go.
18
+
19
+ ```jsx
20
+ const Layout = (props) => {
21
+ const { t } = useTranslation();
22
+ const router = useRouter();
23
+ return (
24
+ <RouterProvider router={router}>
25
+ <BasicLayout>
26
+ <Head>
27
+ <title>{t('app.name')}</title>
28
+ </Head>
29
+ <EpathlaTop />
30
+ <Content direction="row">
31
+ <Main>{props.children}</Main>
32
+ </Content>
33
+ <Bottom>
34
+ <GovGRFooter />
35
+ </Bottom>
36
+ </BasicLayout>
37
+ </RouterProvider>
38
+ );
39
+ };
40
+ ```
@@ -0,0 +1,2 @@
1
+ export declare function delay(ms: any): Promise<void>;
2
+ export default delay;