@digigov/ui 0.12.2 → 0.13.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 (660) hide show
  1. package/CHANGELOG.md +8 -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/HeaderLogo.d.ts +3 -0
  29. package/app/Header/HeaderLogo.js +30 -0
  30. package/app/Header/HeaderSection.d.ts +5 -0
  31. package/app/Header/HeaderSection.js +20 -0
  32. package/app/Header/HeaderTitle.d.ts +5 -0
  33. package/app/Header/HeaderTitle.js +30 -0
  34. package/{src/app → app}/Header/__snapshots__/index.spec.tsx.snap +0 -0
  35. package/app/Header/index.d.ts +11 -0
  36. package/app/Header/index.js +106 -0
  37. package/{src/app → app}/Header/index.mdx +0 -0
  38. package/app/Header/index.spec.d.ts +1 -0
  39. package/app/Header/index.spec.js +45 -0
  40. package/app/NotFound/index.d.ts +3 -0
  41. package/app/NotFound/index.js +29 -0
  42. package/app/OutdatedBrowserBanner.d.ts +2 -0
  43. package/app/OutdatedBrowserBanner.js +41 -0
  44. package/app/PageTitle.d.ts +10 -0
  45. package/app/PageTitle.js +76 -0
  46. package/{src/app → app}/QrCodeScanner/__snapshots__/index.spec.tsx.snap +0 -0
  47. package/app/QrCodeScanner/index.d.ts +29 -0
  48. package/app/QrCodeScanner/index.js +85 -0
  49. package/{src/app → app}/QrCodeScanner/index.mdx +0 -0
  50. package/app/QrCodeScanner/index.spec.d.ts +1 -0
  51. package/app/QrCodeScanner/index.spec.js +26 -0
  52. package/app/i18n.d.ts +10 -0
  53. package/app/i18n.js +63 -0
  54. package/{src/app/index.ts → app/index.d.ts} +0 -0
  55. package/app/index.js +70 -0
  56. package/{src/core → core}/Accordion/__snapshots__/index.spec.tsx.snap +0 -0
  57. package/core/Accordion/index.d.ts +21 -0
  58. package/core/Accordion/index.js +127 -0
  59. package/{src/core → core}/Accordion/index.mdx +0 -0
  60. package/core/Accordion/index.spec.d.ts +1 -0
  61. package/core/Accordion/index.spec.js +19 -0
  62. package/{src/core → core}/Blockquote/__snapshots__/index.spec.tsx.snap +0 -0
  63. package/core/Blockquote/index.d.ts +3 -0
  64. package/core/Blockquote/index.js +29 -0
  65. package/{src/core → core}/Blockquote/index.mdx +0 -0
  66. package/core/Blockquote/index.spec.d.ts +1 -0
  67. package/core/Blockquote/index.spec.js +21 -0
  68. package/{src/core/Breadcrumbs/index.tsx → core/Breadcrumbs/index.d.ts} +0 -0
  69. package/core/Breadcrumbs/index.js +44 -0
  70. package/core/Button/BackButton.d.ts +3 -0
  71. package/core/Button/BackButton.js +34 -0
  72. package/core/Button/ButtonLink.d.ts +4 -0
  73. package/core/Button/ButtonLink.js +28 -0
  74. package/core/Button/CallToAction.d.ts +7 -0
  75. package/core/Button/CallToAction.js +41 -0
  76. package/core/Button/Icon.d.ts +2 -0
  77. package/core/Button/Icon.js +19 -0
  78. package/{src/core → core}/Button/__snapshots__/index.spec.tsx.snap +0 -0
  79. package/core/Button/index.d.ts +15 -0
  80. package/core/Button/index.js +122 -0
  81. package/{src/core → core}/Button/index.mdx +0 -0
  82. package/core/Button/index.spec.d.ts +1 -0
  83. package/core/Button/index.spec.js +21 -0
  84. package/{src/core/Card/index.tsx → core/Card/index.d.ts} +0 -0
  85. package/core/Card/index.js +57 -0
  86. package/{src/core → core}/Details/__snapshots__/index.spec.tsx.snap +0 -0
  87. package/{src/core/Details/index.tsx → core/Details/index.d.ts} +0 -2
  88. package/core/Details/index.js +35 -0
  89. package/{src/core → core}/Details/index.mdx +0 -0
  90. package/core/Details/index.spec.d.ts +1 -0
  91. package/core/Details/index.spec.js +27 -0
  92. package/core/Divider/index.d.ts +5 -0
  93. package/core/Divider/index.js +20 -0
  94. package/{src/core → core}/ErrorSummary/__snapshots__/index.spec.tsx.snap +0 -0
  95. package/{src/core/ErrorSummary/index.tsx → core/ErrorSummary/index.d.ts} +0 -1
  96. package/core/ErrorSummary/index.js +19 -0
  97. package/{src/core → core}/ErrorSummary/index.mdx +0 -0
  98. package/core/ErrorSummary/index.spec.d.ts +1 -0
  99. package/core/ErrorSummary/index.spec.js +21 -0
  100. package/{src/core/Hidden/index.tsx → core/Hidden/index.d.ts} +0 -0
  101. package/core/Hidden/index.js +18 -0
  102. package/{src/core → core}/Link/__snapshots__/index.spec.tsx.snap +0 -0
  103. package/core/Link/index.d.ts +12 -0
  104. package/core/Link/index.js +50 -0
  105. package/core/Link/index.spec.d.ts +1 -0
  106. package/core/Link/index.spec.js +31 -0
  107. package/{src/core/List/List.tsx → core/List/List.d.ts} +0 -2
  108. package/core/List/List.js +19 -0
  109. package/{src/core/List/ListItem.tsx → core/List/ListItem.d.ts} +0 -2
  110. package/core/List/ListItem.js +19 -0
  111. package/core/List/ListItemContent.d.ts +7 -0
  112. package/core/List/ListItemContent.js +45 -0
  113. package/core/List/ListItemIcon.d.ts +7 -0
  114. package/core/List/ListItemIcon.js +48 -0
  115. package/core/List/ListItemText.d.ts +8 -0
  116. package/core/List/ListItemText.js +36 -0
  117. package/core/List/ListItemTitle.d.ts +10 -0
  118. package/core/List/ListItemTitle.js +44 -0
  119. package/{src/core → core}/List/__snapshots__/index.spec.tsx.snap +0 -0
  120. package/{src/core/List/index.tsx → core/List/index.d.ts} +0 -0
  121. package/core/List/index.js +96 -0
  122. package/{src/core → core}/List/index.mdx +0 -0
  123. package/core/List/index.spec.d.ts +1 -0
  124. package/core/List/index.spec.js +21 -0
  125. package/core/NavList/NavList.d.ts +17 -0
  126. package/core/NavList/NavList.js +99 -0
  127. package/core/NavList/NavListContext.d.ts +20 -0
  128. package/core/NavList/NavListContext.js +102 -0
  129. package/core/NavList/NavListItem.d.ts +13 -0
  130. package/core/NavList/NavListItem.js +171 -0
  131. package/core/NavList/NavListItemBase.d.ts +16 -0
  132. package/core/NavList/NavListItemBase.js +161 -0
  133. package/core/NavList/NavListSubMenu.d.ts +8 -0
  134. package/core/NavList/NavListSubMenu.js +52 -0
  135. package/{src/core → core}/NavList/__snapshots__/index.spec.tsx.snap +0 -0
  136. package/{src/core/NavList/index.tsx → core/NavList/index.d.ts} +0 -0
  137. package/core/NavList/index.js +68 -0
  138. package/{src/core → core}/NavList/index.mdx +0 -0
  139. package/core/NavList/index.spec.d.ts +1 -0
  140. package/core/NavList/index.spec.js +21 -0
  141. package/{src/core → core}/NotificationBanner/__snapshots__/index.spec.tsx.snap +0 -0
  142. package/core/NotificationBanner/index.d.ts +18 -0
  143. package/core/NotificationBanner/index.js +78 -0
  144. package/{src/core → core}/NotificationBanner/index.mdx +0 -0
  145. package/core/NotificationBanner/index.spec.d.ts +1 -0
  146. package/core/NotificationBanner/index.spec.js +32 -0
  147. package/core/ServiceBadge/ServiceBadge.mdx +0 -0
  148. package/core/ServiceBadge/index.d.ts +9 -0
  149. package/core/ServiceBadge/index.js +36 -0
  150. package/{src/core → core}/ServiceBadge/index.mdx +0 -0
  151. package/{src/core → core}/SummaryList/__snapshots__/index.spec.tsx.snap +0 -0
  152. package/{src/core/SummaryList/index.tsx → core/SummaryList/index.d.ts} +0 -2
  153. package/core/SummaryList/index.js +79 -0
  154. package/{src/core → core}/SummaryList/index.mdx +0 -0
  155. package/core/SummaryList/index.spec.d.ts +1 -0
  156. package/core/SummaryList/index.spec.js +19 -0
  157. package/{src/core/Table/index.tsx → core/Table/index.d.ts} +0 -0
  158. package/core/Table/index.js +96 -0
  159. package/core/Tabs/index.d.ts +16 -0
  160. package/core/Tabs/index.js +88 -0
  161. package/{src/core → core}/Tabs/index.mdx +0 -0
  162. package/{src/core/VisuallyHidden/index.tsx → core/VisuallyHidden/index.d.ts} +0 -0
  163. package/core/VisuallyHidden/index.js +18 -0
  164. package/{src/core → core}/WarningText/__snapshots__/index.spec.tsx.snap +0 -0
  165. package/{src/core/WarningText/index.tsx → core/WarningText/index.d.ts} +0 -1
  166. package/core/WarningText/index.js +19 -0
  167. package/{src/core → core}/WarningText/index.mdx +0 -0
  168. package/core/WarningText/index.spec.d.ts +1 -0
  169. package/core/WarningText/index.spec.js +21 -0
  170. package/{src/core/index.ts → core/index.d.ts} +0 -0
  171. package/core/index.js +227 -0
  172. package/custom.d.js +1 -0
  173. package/es/api/APIErrors.js +96 -0
  174. package/es/api/APIProvider.js +25 -0
  175. package/es/api/fetchAPI.js +49 -0
  176. package/{src/api/index.tsx → es/api/index.js} +3 -6
  177. package/es/api/index.spec.js +546 -0
  178. package/es/api/introduction.md +6 -0
  179. package/es/api/useResource.js +128 -0
  180. package/es/api/useResourceAction.js +141 -0
  181. package/es/api/useResourceQuery.js +208 -0
  182. package/es/api/utils.js +233 -0
  183. package/es/app/App.js +27 -0
  184. package/es/app/Confirmation/index.js +3 -0
  185. package/es/app/Footer/index.js +15 -0
  186. package/{src/app/Header/HeaderLogo.tsx → es/app/Header/HeaderLogo.js} +7 -9
  187. package/es/app/Header/HeaderSection.js +7 -0
  188. package/es/app/Header/HeaderTitle.js +17 -0
  189. package/es/app/Header/__snapshots__/index.spec.tsx.snap +393 -0
  190. package/{src/app/Header/index.tsx → es/app/Header/index.js} +4 -10
  191. package/es/app/Header/index.mdx +50 -0
  192. package/es/app/Header/index.spec.js +32 -0
  193. package/es/app/NotFound/index.js +12 -0
  194. package/es/app/OutdatedBrowserBanner.js +24 -0
  195. package/es/app/PageTitle.js +57 -0
  196. package/es/app/QrCodeScanner/__snapshots__/index.spec.tsx.snap +22 -0
  197. package/es/app/QrCodeScanner/index.js +64 -0
  198. package/es/app/QrCodeScanner/index.mdx +22 -0
  199. package/es/app/QrCodeScanner/index.spec.js +13 -0
  200. package/es/app/i18n.js +42 -0
  201. package/es/app/index.js +5 -0
  202. package/es/core/Accordion/__snapshots__/index.spec.tsx.snap +78 -0
  203. package/es/core/Accordion/index.js +67 -0
  204. package/es/core/Accordion/index.mdx +104 -0
  205. package/es/core/Accordion/index.spec.js +9 -0
  206. package/es/core/Blockquote/__snapshots__/index.spec.tsx.snap +13 -0
  207. package/{src/core/Blockquote/index.tsx → es/core/Blockquote/index.js} +7 -9
  208. package/es/core/Blockquote/index.mdx +61 -0
  209. package/es/core/Blockquote/index.spec.js +9 -0
  210. package/es/core/Breadcrumbs/index.js +3 -0
  211. package/{src/core/Button/BackButton.tsx → es/core/Button/BackButton.js} +8 -10
  212. package/es/core/Button/ButtonLink.js +16 -0
  213. package/es/core/Button/CallToAction.js +27 -0
  214. package/es/core/Button/Icon.js +7 -0
  215. package/es/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
  216. package/es/core/Button/index.js +37 -0
  217. package/es/core/Button/index.mdx +65 -0
  218. package/es/core/Button/index.spec.js +9 -0
  219. package/es/core/Card/index.js +4 -0
  220. package/es/core/Details/__snapshots__/index.spec.tsx.snap +50 -0
  221. package/es/core/Details/index.js +5 -0
  222. package/es/core/Details/index.mdx +34 -0
  223. package/es/core/Details/index.spec.js +17 -0
  224. package/es/core/Divider/index.js +7 -0
  225. package/es/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +322 -0
  226. package/es/core/ErrorSummary/index.js +3 -0
  227. package/es/core/ErrorSummary/index.mdx +61 -0
  228. package/es/core/ErrorSummary/index.spec.js +9 -0
  229. package/es/core/Hidden/index.js +1 -0
  230. package/es/core/Link/__snapshots__/index.spec.tsx.snap +31 -0
  231. package/es/core/Link/index.js +26 -0
  232. package/es/core/Link/index.spec.js +21 -0
  233. package/es/core/List/List.js +3 -0
  234. package/es/core/List/ListItem.js +3 -0
  235. package/es/core/List/ListItemContent.js +27 -0
  236. package/es/core/List/ListItemIcon.js +29 -0
  237. package/es/core/List/ListItemText.js +19 -0
  238. package/es/core/List/ListItemTitle.js +25 -0
  239. package/es/core/List/__snapshots__/index.spec.tsx.snap +322 -0
  240. package/es/core/List/index.js +7 -0
  241. package/es/core/List/index.mdx +40 -0
  242. package/es/core/List/index.spec.js +9 -0
  243. package/es/core/NavList/NavList.js +78 -0
  244. package/es/core/NavList/NavListContext.js +80 -0
  245. package/es/core/NavList/NavListItem.js +141 -0
  246. package/es/core/NavList/NavListItemBase.js +133 -0
  247. package/es/core/NavList/NavListSubMenu.js +27 -0
  248. package/es/core/NavList/__snapshots__/index.spec.tsx.snap +334 -0
  249. package/es/core/NavList/index.js +5 -0
  250. package/es/core/NavList/index.mdx +185 -0
  251. package/es/core/NavList/index.spec.js +9 -0
  252. package/es/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +737 -0
  253. package/es/core/NotificationBanner/index.js +35 -0
  254. package/es/core/NotificationBanner/index.mdx +77 -0
  255. package/es/core/NotificationBanner/index.spec.js +20 -0
  256. package/es/core/ServiceBadge/ServiceBadge.mdx +0 -0
  257. package/es/core/ServiceBadge/index.js +20 -0
  258. package/es/core/ServiceBadge/index.mdx +42 -0
  259. package/es/core/SummaryList/__snapshots__/index.spec.tsx.snap +57 -0
  260. package/es/core/SummaryList/index.js +7 -0
  261. package/es/core/SummaryList/index.mdx +82 -0
  262. package/es/core/SummaryList/index.spec.js +9 -0
  263. package/es/core/Table/index.js +7 -0
  264. package/es/core/Tabs/index.js +37 -0
  265. package/es/core/Tabs/index.mdx +54 -0
  266. package/es/core/VisuallyHidden/index.js +1 -0
  267. package/es/core/WarningText/__snapshots__/index.spec.tsx.snap +336 -0
  268. package/es/core/WarningText/index.js +3 -0
  269. package/es/core/WarningText/index.mdx +46 -0
  270. package/es/core/WarningText/index.spec.js +9 -0
  271. package/es/core/index.js +17 -0
  272. package/es/custom.d.js +0 -0
  273. package/{src → es}/form/inputs/Input/index.mdx +0 -0
  274. package/es/govgr/Footer/Copyright.js +37 -0
  275. package/es/govgr/Footer/HellenicRepublicLogo.js +3 -0
  276. package/es/govgr/Footer/LicenseCCSA.js +18 -0
  277. package/es/govgr/Footer/index.js +21 -0
  278. package/{src → es}/govgr/Footer/index.mdx +0 -0
  279. package/{src/govgr/Footer/logo.ts → es/govgr/Footer/logo.js} +1 -1
  280. package/{src/govgr/Footer/logos/logo-el.ts → es/govgr/Footer/logos/logo-el.js} +1 -1
  281. package/{src/govgr/Footer/logos/logo-en.ts → es/govgr/Footer/logos/logo-en.js} +1 -1
  282. package/{src → es}/govgr/Logo/govgr-logo.svg +0 -0
  283. package/es/govgr/Logo/index.js +3 -0
  284. package/{src/govgr/Logo/logo.ts → es/govgr/Logo/logo.js} +1 -1
  285. package/es/govgr/index.js +4 -0
  286. package/es/hooks/useDebounce.js +41 -0
  287. package/es/hooks/useLatest.js +12 -0
  288. package/{src/hooks/useOutdatedBrowserCheck.ts → es/hooks/useOutdatedBrowserCheck.js} +15 -16
  289. package/es/hooks/useSearch.js +25 -0
  290. package/es/hooks/useTogglableSections.js +96 -0
  291. package/es/index.js +5 -0
  292. package/es/layouts/Basic/Bottom/index.js +3 -0
  293. package/{src → es}/layouts/Basic/Bottom/index.mdx +0 -0
  294. package/es/layouts/Basic/Content/index.js +18 -0
  295. package/{src → es}/layouts/Basic/Content/index.mdx +0 -0
  296. package/es/layouts/Basic/Main/index.js +3 -0
  297. package/{src → es}/layouts/Basic/Main/index.mdx +0 -0
  298. package/es/layouts/Basic/Masthead/index.js +4 -0
  299. package/{src → es}/layouts/Basic/Masthead/index.mdx +0 -0
  300. package/{src/layouts/Basic/Side/index.tsx → es/layouts/Basic/Side/index.js} +3 -5
  301. package/{src → es}/layouts/Basic/Side/index.mdx +0 -0
  302. package/{src/layouts/Basic/Top/index.tsx → es/layouts/Basic/Top/index.js} +5 -7
  303. package/{src → es}/layouts/Basic/Top/index.mdx +0 -0
  304. package/{src → es}/layouts/Basic/__snapshots__/index.spec.tsx.snap +0 -0
  305. package/es/layouts/Basic/index.js +8 -0
  306. package/{src → es}/layouts/Basic/index.mdx +0 -0
  307. package/es/layouts/Basic/index.spec.js +10 -0
  308. package/es/layouts/Grid/index.js +1 -0
  309. package/es/layouts/index.js +2 -0
  310. package/{src/locales/el.ts → es/locales/el.js} +14 -19
  311. package/{src/locales/en.ts → es/locales/en.js} +13 -17
  312. package/es/router/index.js +15 -0
  313. package/{src → es}/router/index.mdx +0 -0
  314. package/es/test-utils/delay.js +31 -0
  315. package/es/test-utils/mountWithTheme.js +30 -0
  316. package/{src → es}/themes/govgr.js +29 -33
  317. package/es/themes/grnet.js +110 -0
  318. package/es/themes/index.js +2 -0
  319. package/es/typography/Caption.js +7 -0
  320. package/es/typography/NormalText.js +3 -0
  321. package/es/typography/Paragraph.js +2 -0
  322. package/es/typography/Title.js +48 -0
  323. package/es/typography/index.js +8 -0
  324. package/{src → es}/typography/index.mdx +0 -0
  325. package/es/utils/evaluateBrowserVersion.js +201 -0
  326. package/es/utils/withDeprecation.js +103 -0
  327. package/esm/api/APIErrors.js +96 -0
  328. package/esm/api/APIProvider.js +25 -0
  329. package/esm/api/fetchAPI.js +49 -0
  330. package/esm/api/index.js +13 -0
  331. package/esm/api/index.spec.js +546 -0
  332. package/esm/api/introduction.md +6 -0
  333. package/esm/api/useResource.js +128 -0
  334. package/esm/api/useResourceAction.js +141 -0
  335. package/esm/api/useResourceQuery.js +208 -0
  336. package/esm/api/utils.js +233 -0
  337. package/esm/app/App.js +27 -0
  338. package/esm/app/Confirmation/index.js +3 -0
  339. package/esm/app/Footer/index.js +15 -0
  340. package/esm/app/Header/HeaderLogo.js +17 -0
  341. package/esm/app/Header/HeaderSection.js +7 -0
  342. package/esm/app/Header/HeaderTitle.js +17 -0
  343. package/esm/app/Header/__snapshots__/index.spec.tsx.snap +393 -0
  344. package/esm/app/Header/index.js +13 -0
  345. package/esm/app/Header/index.mdx +50 -0
  346. package/esm/app/Header/index.spec.js +32 -0
  347. package/esm/app/NotFound/index.js +12 -0
  348. package/esm/app/OutdatedBrowserBanner.js +24 -0
  349. package/esm/app/PageTitle.js +57 -0
  350. package/esm/app/QrCodeScanner/__snapshots__/index.spec.tsx.snap +22 -0
  351. package/esm/app/QrCodeScanner/index.js +64 -0
  352. package/esm/app/QrCodeScanner/index.mdx +22 -0
  353. package/esm/app/QrCodeScanner/index.spec.js +13 -0
  354. package/esm/app/i18n.js +42 -0
  355. package/esm/app/index.js +5 -0
  356. package/esm/core/Accordion/__snapshots__/index.spec.tsx.snap +78 -0
  357. package/esm/core/Accordion/index.js +67 -0
  358. package/esm/core/Accordion/index.mdx +104 -0
  359. package/esm/core/Accordion/index.spec.js +9 -0
  360. package/esm/core/Blockquote/__snapshots__/index.spec.tsx.snap +13 -0
  361. package/esm/core/Blockquote/index.js +16 -0
  362. package/esm/core/Blockquote/index.mdx +61 -0
  363. package/esm/core/Blockquote/index.spec.js +9 -0
  364. package/esm/core/Breadcrumbs/index.js +3 -0
  365. package/esm/core/Button/BackButton.js +21 -0
  366. package/esm/core/Button/ButtonLink.js +16 -0
  367. package/esm/core/Button/CallToAction.js +27 -0
  368. package/esm/core/Button/Icon.js +7 -0
  369. package/esm/core/Button/__snapshots__/index.spec.tsx.snap +13 -0
  370. package/esm/core/Button/index.js +37 -0
  371. package/esm/core/Button/index.mdx +65 -0
  372. package/esm/core/Button/index.spec.js +9 -0
  373. package/esm/core/Card/index.js +4 -0
  374. package/esm/core/Details/__snapshots__/index.spec.tsx.snap +50 -0
  375. package/esm/core/Details/index.js +5 -0
  376. package/esm/core/Details/index.mdx +34 -0
  377. package/esm/core/Details/index.spec.js +17 -0
  378. package/esm/core/Divider/index.js +7 -0
  379. package/esm/core/ErrorSummary/__snapshots__/index.spec.tsx.snap +322 -0
  380. package/esm/core/ErrorSummary/index.js +3 -0
  381. package/esm/core/ErrorSummary/index.mdx +61 -0
  382. package/esm/core/ErrorSummary/index.spec.js +9 -0
  383. package/esm/core/Hidden/index.js +1 -0
  384. package/esm/core/Link/__snapshots__/index.spec.tsx.snap +31 -0
  385. package/esm/core/Link/index.js +26 -0
  386. package/esm/core/Link/index.spec.js +21 -0
  387. package/esm/core/List/List.js +3 -0
  388. package/esm/core/List/ListItem.js +3 -0
  389. package/esm/core/List/ListItemContent.js +27 -0
  390. package/esm/core/List/ListItemIcon.js +29 -0
  391. package/esm/core/List/ListItemText.js +19 -0
  392. package/esm/core/List/ListItemTitle.js +25 -0
  393. package/esm/core/List/__snapshots__/index.spec.tsx.snap +322 -0
  394. package/esm/core/List/index.js +7 -0
  395. package/esm/core/List/index.mdx +40 -0
  396. package/esm/core/List/index.spec.js +9 -0
  397. package/esm/core/NavList/NavList.js +78 -0
  398. package/esm/core/NavList/NavListContext.js +80 -0
  399. package/esm/core/NavList/NavListItem.js +141 -0
  400. package/esm/core/NavList/NavListItemBase.js +133 -0
  401. package/esm/core/NavList/NavListSubMenu.js +27 -0
  402. package/esm/core/NavList/__snapshots__/index.spec.tsx.snap +334 -0
  403. package/esm/core/NavList/index.js +5 -0
  404. package/esm/core/NavList/index.mdx +185 -0
  405. package/esm/core/NavList/index.spec.js +9 -0
  406. package/esm/core/NotificationBanner/__snapshots__/index.spec.tsx.snap +737 -0
  407. package/esm/core/NotificationBanner/index.js +35 -0
  408. package/esm/core/NotificationBanner/index.mdx +77 -0
  409. package/esm/core/NotificationBanner/index.spec.js +20 -0
  410. package/esm/core/ServiceBadge/ServiceBadge.mdx +0 -0
  411. package/esm/core/ServiceBadge/index.js +20 -0
  412. package/esm/core/ServiceBadge/index.mdx +42 -0
  413. package/esm/core/SummaryList/__snapshots__/index.spec.tsx.snap +57 -0
  414. package/esm/core/SummaryList/index.js +7 -0
  415. package/esm/core/SummaryList/index.mdx +82 -0
  416. package/esm/core/SummaryList/index.spec.js +9 -0
  417. package/esm/core/Table/index.js +7 -0
  418. package/esm/core/Tabs/index.js +37 -0
  419. package/esm/core/Tabs/index.mdx +54 -0
  420. package/esm/core/VisuallyHidden/index.js +1 -0
  421. package/esm/core/WarningText/__snapshots__/index.spec.tsx.snap +336 -0
  422. package/esm/core/WarningText/index.js +3 -0
  423. package/esm/core/WarningText/index.mdx +46 -0
  424. package/esm/core/WarningText/index.spec.js +9 -0
  425. package/esm/core/index.js +17 -0
  426. package/esm/custom.d.js +0 -0
  427. package/esm/form/inputs/Input/index.mdx +10 -0
  428. package/esm/govgr/Footer/Copyright.js +37 -0
  429. package/esm/govgr/Footer/HellenicRepublicLogo.js +3 -0
  430. package/esm/govgr/Footer/LicenseCCSA.js +18 -0
  431. package/esm/govgr/Footer/index.js +21 -0
  432. package/esm/govgr/Footer/index.mdx +97 -0
  433. package/esm/govgr/Footer/logo.js +1 -0
  434. package/esm/govgr/Footer/logos/logo-el.js +1 -0
  435. package/esm/govgr/Footer/logos/logo-en.js +1 -0
  436. package/esm/govgr/Logo/govgr-logo.svg +1 -0
  437. package/esm/govgr/Logo/index.js +3 -0
  438. package/esm/govgr/Logo/logo.js +1 -0
  439. package/esm/govgr/index.js +4 -0
  440. package/esm/hooks/useDebounce.js +41 -0
  441. package/esm/hooks/useLatest.js +12 -0
  442. package/esm/hooks/useOutdatedBrowserCheck.js +46 -0
  443. package/esm/hooks/useSearch.js +25 -0
  444. package/esm/hooks/useTogglableSections.js +96 -0
  445. package/esm/index.js +10 -0
  446. package/esm/layouts/Basic/Bottom/index.js +3 -0
  447. package/esm/layouts/Basic/Bottom/index.mdx +37 -0
  448. package/esm/layouts/Basic/Content/index.js +18 -0
  449. package/esm/layouts/Basic/Content/index.mdx +64 -0
  450. package/esm/layouts/Basic/Main/index.js +3 -0
  451. package/esm/layouts/Basic/Main/index.mdx +64 -0
  452. package/esm/layouts/Basic/Masthead/index.js +4 -0
  453. package/esm/layouts/Basic/Masthead/index.mdx +74 -0
  454. package/esm/layouts/Basic/Side/index.js +7 -0
  455. package/esm/layouts/Basic/Side/index.mdx +71 -0
  456. package/esm/layouts/Basic/Top/index.js +11 -0
  457. package/esm/layouts/Basic/Top/index.mdx +74 -0
  458. package/esm/layouts/Basic/__snapshots__/index.spec.tsx.snap +54 -0
  459. package/esm/layouts/Basic/index.js +8 -0
  460. package/esm/layouts/Basic/index.mdx +62 -0
  461. package/esm/layouts/Basic/index.spec.js +10 -0
  462. package/esm/layouts/Grid/index.js +1 -0
  463. package/esm/layouts/index.js +2 -0
  464. package/esm/locales/el.js +55 -0
  465. package/esm/locales/en.js +55 -0
  466. package/esm/router/index.js +15 -0
  467. package/esm/router/index.mdx +40 -0
  468. package/esm/test-utils/delay.js +31 -0
  469. package/esm/test-utils/mountWithTheme.js +30 -0
  470. package/esm/themes/govgr.js +79 -0
  471. package/esm/themes/grnet.js +110 -0
  472. package/esm/themes/index.js +2 -0
  473. package/esm/typography/Caption.js +7 -0
  474. package/esm/typography/NormalText.js +3 -0
  475. package/esm/typography/Paragraph.js +2 -0
  476. package/esm/typography/Title.js +48 -0
  477. package/esm/typography/index.js +8 -0
  478. package/esm/typography/index.mdx +32 -0
  479. package/esm/utils/evaluateBrowserVersion.js +201 -0
  480. package/esm/utils/withDeprecation.js +103 -0
  481. package/form/inputs/Input/index.mdx +10 -0
  482. package/govgr/Footer/Copyright.d.ts +8 -0
  483. package/govgr/Footer/Copyright.js +52 -0
  484. package/{src/govgr/Footer/HellenicRepublicLogo.tsx → govgr/Footer/HellenicRepublicLogo.d.ts} +0 -1
  485. package/govgr/Footer/HellenicRepublicLogo.js +19 -0
  486. package/govgr/Footer/LicenseCCSA.d.ts +3 -0
  487. package/govgr/Footer/LicenseCCSA.js +33 -0
  488. package/govgr/Footer/index.d.ts +13 -0
  489. package/govgr/Footer/index.js +39 -0
  490. package/govgr/Footer/index.mdx +97 -0
  491. package/govgr/Footer/logo.d.ts +2 -0
  492. package/govgr/Footer/logo.js +8 -0
  493. package/govgr/Footer/logos/logo-el.d.ts +2 -0
  494. package/govgr/Footer/logos/logo-el.js +8 -0
  495. package/govgr/Footer/logos/logo-en.d.ts +2 -0
  496. package/govgr/Footer/logos/logo-en.js +8 -0
  497. package/govgr/Logo/govgr-logo.svg +1 -0
  498. package/{src/govgr/Logo/index.tsx → govgr/Logo/index.d.ts} +0 -2
  499. package/govgr/Logo/index.js +19 -0
  500. package/govgr/Logo/logo.d.ts +2 -0
  501. package/govgr/Logo/logo.js +8 -0
  502. package/{src/govgr/index.ts → govgr/index.d.ts} +0 -0
  503. package/govgr/index.js +57 -0
  504. package/hooks/useDebounce.d.ts +3 -0
  505. package/hooks/useDebounce.js +63 -0
  506. package/hooks/useLatest.d.ts +3 -0
  507. package/hooks/useLatest.js +26 -0
  508. package/hooks/useOutdatedBrowserCheck.d.ts +2 -0
  509. package/hooks/useOutdatedBrowserCheck.js +60 -0
  510. package/hooks/useSearch.d.ts +4 -0
  511. package/hooks/useSearch.js +40 -0
  512. package/hooks/useTogglableSections.d.ts +18 -0
  513. package/hooks/useTogglableSections.js +108 -0
  514. package/{src/index.ts → index.d.ts} +0 -0
  515. package/index.js +70 -0
  516. package/{src/layouts/Basic/Bottom/index.tsx → layouts/Basic/Bottom/index.d.ts} +0 -1
  517. package/layouts/Basic/Bottom/index.js +19 -0
  518. package/layouts/Basic/Bottom/index.mdx +37 -0
  519. package/layouts/Basic/Content/index.d.ts +5 -0
  520. package/layouts/Basic/Content/index.js +31 -0
  521. package/layouts/Basic/Content/index.mdx +64 -0
  522. package/{src/layouts/Basic/Main/index.tsx → layouts/Basic/Main/index.d.ts} +0 -1
  523. package/layouts/Basic/Main/index.js +19 -0
  524. package/layouts/Basic/Main/index.mdx +64 -0
  525. package/{src/layouts/Basic/Masthead/index.tsx → layouts/Basic/Masthead/index.d.ts} +0 -2
  526. package/layouts/Basic/Masthead/index.js +27 -0
  527. package/layouts/Basic/Masthead/index.mdx +74 -0
  528. package/layouts/Basic/Side/index.d.ts +3 -0
  529. package/layouts/Basic/Side/index.js +20 -0
  530. package/layouts/Basic/Side/index.mdx +71 -0
  531. package/layouts/Basic/Top/index.d.ts +3 -0
  532. package/layouts/Basic/Top/index.js +24 -0
  533. package/layouts/Basic/Top/index.mdx +74 -0
  534. package/layouts/Basic/__snapshots__/index.spec.tsx.snap +54 -0
  535. package/{src/layouts/Basic/index.tsx → layouts/Basic/index.d.ts} +0 -2
  536. package/layouts/Basic/index.js +97 -0
  537. package/layouts/Basic/index.mdx +62 -0
  538. package/layouts/Basic/index.spec.d.ts +1 -0
  539. package/layouts/Basic/index.spec.js +20 -0
  540. package/{src/layouts/Grid/index.tsx → layouts/Grid/index.d.ts} +0 -0
  541. package/layouts/Grid/index.js +18 -0
  542. package/{src/layouts/index.ts → layouts/index.d.ts} +0 -0
  543. package/layouts/index.js +34 -0
  544. package/locales/el.d.ts +56 -0
  545. package/locales/el.js +62 -0
  546. package/locales/en.d.ts +56 -0
  547. package/locales/en.js +62 -0
  548. package/package.json +8 -31
  549. package/router/index.d.ts +9 -0
  550. package/router/index.js +37 -0
  551. package/router/index.mdx +40 -0
  552. package/test-utils/delay.d.ts +2 -0
  553. package/test-utils/delay.js +45 -0
  554. package/test-utils/mountWithTheme.d.ts +3 -0
  555. package/test-utils/mountWithTheme.js +43 -0
  556. package/themes/govgr.d.ts +3 -0
  557. package/themes/govgr.js +89 -0
  558. package/themes/grnet.d.ts +2 -0
  559. package/themes/grnet.js +128 -0
  560. package/themes/index.d.ts +32 -0
  561. package/themes/index.js +19 -0
  562. package/typography/Caption.d.ts +7 -0
  563. package/typography/Caption.js +20 -0
  564. package/typography/NormalText.d.ts +5 -0
  565. package/typography/NormalText.js +19 -0
  566. package/typography/Paragraph.d.ts +6 -0
  567. package/typography/Paragraph.js +13 -0
  568. package/typography/Title.d.ts +9 -0
  569. package/typography/Title.js +63 -0
  570. package/{src/typography/index.ts → typography/index.d.ts} +0 -0
  571. package/typography/index.js +97 -0
  572. package/typography/index.mdx +32 -0
  573. package/utils/evaluateBrowserVersion.d.ts +15 -0
  574. package/utils/evaluateBrowserVersion.js +216 -0
  575. package/utils/withDeprecation.d.ts +16 -0
  576. package/utils/withDeprecation.js +116 -0
  577. package/.eslintrc.js +0 -4
  578. package/.prettierrc.js +0 -3
  579. package/.rush/temp/package-deps_build.json +0 -176
  580. package/.rush/temp/shrinkwrap-deps.json +0 -278
  581. package/CHANGELOG.json +0 -796
  582. package/docs/components.mdx +0 -1
  583. package/docs/create-a-new-service.mdx +0 -93
  584. package/docs/create-common-page-layout.mdx +0 -205
  585. package/docs/create-static-page.mdx +0 -179
  586. package/docs/edit-start-page.mdx +0 -143
  587. package/docs/index.mdx +0 -66
  588. package/docs/introduction.mdx +0 -34
  589. package/src/api/APIErrors.tsx +0 -44
  590. package/src/api/APIProvider.tsx +0 -27
  591. package/src/api/fetchAPI.ts +0 -45
  592. package/src/api/index.spec.tsx +0 -419
  593. package/src/api/useResource.tsx +0 -96
  594. package/src/api/useResourceAction.tsx +0 -80
  595. package/src/api/useResourceQuery.tsx +0 -177
  596. package/src/api/utils.tsx +0 -156
  597. package/src/app/App.tsx +0 -33
  598. package/src/app/Header/HeaderSection.tsx +0 -13
  599. package/src/app/Header/HeaderTitle.tsx +0 -24
  600. package/src/app/Header/index.spec.tsx +0 -32
  601. package/src/app/NotFound/index.tsx +0 -21
  602. package/src/app/OutdatedBrowserBanner.tsx +0 -37
  603. package/src/app/PageTitle.tsx +0 -70
  604. package/src/app/QrCodeScanner/index.spec.tsx +0 -19
  605. package/src/app/QrCodeScanner/index.tsx +0 -90
  606. package/src/app/i18n.tsx +0 -44
  607. package/src/core/Accordion/index.spec.tsx +0 -30
  608. package/src/core/Accordion/index.tsx +0 -86
  609. package/src/core/Blockquote/index.spec.tsx +0 -10
  610. package/src/core/Button/ButtonLink.tsx +0 -20
  611. package/src/core/Button/CallToAction.tsx +0 -31
  612. package/src/core/Button/Icon.tsx +0 -9
  613. package/src/core/Button/index.spec.tsx +0 -8
  614. package/src/core/Button/index.tsx +0 -46
  615. package/src/core/Details/index.spec.tsx +0 -38
  616. package/src/core/Divider/index.tsx +0 -13
  617. package/src/core/ErrorSummary/index.spec.tsx +0 -10
  618. package/src/core/Link/index.spec.tsx +0 -22
  619. package/src/core/Link/index.tsx +0 -41
  620. package/src/core/List/ListItemContent.tsx +0 -32
  621. package/src/core/List/ListItemIcon.tsx +0 -31
  622. package/src/core/List/ListItemText.tsx +0 -23
  623. package/src/core/List/ListItemTitle.tsx +0 -37
  624. package/src/core/List/index.spec.tsx +0 -10
  625. package/src/core/NavList/NavList.tsx +0 -103
  626. package/src/core/NavList/NavListContext.tsx +0 -85
  627. package/src/core/NavList/NavListItem.tsx +0 -143
  628. package/src/core/NavList/NavListItemBase.tsx +0 -146
  629. package/src/core/NavList/NavListSubMenu.tsx +0 -33
  630. package/src/core/NavList/index.spec.tsx +0 -10
  631. package/src/core/NotificationBanner/index.spec.tsx +0 -27
  632. package/src/core/NotificationBanner/index.tsx +0 -52
  633. package/src/core/ServiceBadge/index.tsx +0 -35
  634. package/src/core/SummaryList/index.spec.tsx +0 -28
  635. package/src/core/Tabs/index.tsx +0 -36
  636. package/src/core/WarningText/index.spec.tsx +0 -10
  637. package/src/custom.d.ts +0 -8
  638. package/src/govgr/Footer/Copyright.tsx +0 -64
  639. package/src/govgr/Footer/LicenseCCSA.tsx +0 -24
  640. package/src/govgr/Footer/index.tsx +0 -49
  641. package/src/hooks/useDebounce.ts +0 -50
  642. package/src/hooks/useLatest.ts +0 -12
  643. package/src/hooks/useSearch.ts +0 -47
  644. package/src/hooks/useTogglableSections.tsx +0 -102
  645. package/src/layouts/Basic/Content/index.tsx +0 -24
  646. package/src/layouts/Basic/index.spec.tsx +0 -24
  647. package/src/router/index.tsx +0 -28
  648. package/src/test-utils/delay.ts +0 -9
  649. package/src/test-utils/mountWithTheme.tsx +0 -33
  650. package/src/themes/grnet.js +0 -109
  651. package/src/themes/index.tsx +0 -38
  652. package/src/typography/Caption.tsx +0 -15
  653. package/src/typography/NormalText.tsx +0 -7
  654. package/src/typography/Paragraph.tsx +0 -9
  655. package/src/typography/Title.tsx +0 -51
  656. package/src/utils/evaluateBrowserVersion.ts +0 -346
  657. package/src/utils/withDeprecation.tsx +0 -97
  658. package/tsconfig.json +0 -18
  659. package/tsconfig.production.json +0 -27
  660. package/ui.build.log +0 -17
@@ -1,15 +0,0 @@
1
- import HeadingCaption, {
2
- HeadingCaptionProps,
3
- } from '@digigov/react-core/HeadingCaption';
4
- import withDeprecation from '@digigov/ui/utils/withDeprecation';
5
-
6
- export const Caption = withDeprecation(HeadingCaption, {
7
- name: 'Caption',
8
- rename: 'HeadingCaption',
9
- });
10
-
11
- export interface CaptionProps extends HeadingCaptionProps {
12
- ref?: React.Ref<HTMLSpanElement>;
13
- }
14
-
15
- export default Caption;
@@ -1,7 +0,0 @@
1
- import NormalText, {
2
- NormalTextProps as CoreNormalTextProps,
3
- } from '@digigov/react-core/NormalText';
4
-
5
- export { NormalText };
6
- export interface NormalTextProps extends CoreNormalTextProps {}
7
- export default NormalText;
@@ -1,9 +0,0 @@
1
- import Paragraph, {
2
- ParagraphProps as CoreParagraphProps,
3
- } from '@digigov/react-core/Paragraph';
4
-
5
- export interface ParagraphProps extends CoreParagraphProps {
6
- ref?: React.Ref<HTMLParagraphElement>;
7
- }
8
-
9
- export default Paragraph;
@@ -1,51 +0,0 @@
1
- import React from 'react';
2
- import Heading, { HeadingProps } from '@digigov/react-core/Heading';
3
- import withDeprecation from '@digigov/ui/utils/withDeprecation';
4
-
5
- export interface TitleProps extends Omit<HeadingProps, 'size'> {
6
- size?: 'xl' | 'lg' | 'md' | 'sm';
7
- component?: 'h1' | 'h2' | 'h3' | 'h4';
8
- ref?: React.Ref<HTMLHeadingElement>;
9
- }
10
- const sizeMappings: Record<string, HeadingProps['size']> = {
11
- xl: 'xl',
12
- lg: 'l',
13
- md: 'm',
14
- sm: 's',
15
- };
16
-
17
- export const Title: React.FC<TitleProps> = withDeprecation(
18
- ({ size = 'xl', component, children, ...props }) => {
19
- const newSize = sizeMappings[size];
20
- return (
21
- <Heading size={newSize} element={component} {...props}>
22
- {children}
23
- </Heading>
24
- );
25
- },
26
- {
27
- name: 'Title',
28
- rename: 'Heading',
29
- props: {
30
- dense: {
31
- error: true,
32
- },
33
- size: {
34
- values: {
35
- xs: {
36
- error: true,
37
- },
38
- },
39
- },
40
- component: {
41
- values: {
42
- h5: {
43
- error: true,
44
- },
45
- },
46
- },
47
- },
48
- }
49
- );
50
-
51
- export default Title;
@@ -1,346 +0,0 @@
1
- //copied from https://github.com/faisalman/ua-parser-js/blob/master/src/ua-parser.js
2
-
3
- const EMPTY = '',
4
- UNKNOWN = '?',
5
- FUNC_TYPE = 'function',
6
- UNDEF_TYPE = 'undefined',
7
- OBJ_TYPE = 'object',
8
- STR_TYPE = 'string',
9
- NAME = 'name',
10
- VERSION = 'version';
11
-
12
- const BROWSER = 'Browser',
13
- CHROME = 'Chrome',
14
- FIREFOX = 'Firefox',
15
- OPERA = 'Opera';
16
-
17
- const oldSafariMap = {
18
- '1.0': '/8',
19
- '1.2': '/1',
20
- '1.3': '/3',
21
- '2.0': '/412',
22
- '2.0.2': '/416',
23
- '2.0.3': '/417',
24
- '2.0.4': '/419',
25
- '?': '/',
26
- };
27
-
28
- function strMapper(str, map) {
29
- for (const i in map) {
30
- // check if current value is array
31
- if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {
32
- for (let j = 0; j < map[i].length; j++) {
33
- if (map[i][j].includes(str)) {
34
- return i === UNKNOWN ? undefined : i;
35
- }
36
- }
37
- } else if (map[i].includes(str)) {
38
- return i === UNKNOWN ? undefined : i;
39
- }
40
- }
41
- return str;
42
- }
43
- function majorize(version) {
44
- return typeof version === STR_TYPE
45
- ? version.replace(/[^\d.]/g, EMPTY).split('.')[0]
46
- : undefined;
47
- }
48
-
49
- function rgxMapper(browser, ua, arrays) {
50
- let i = 0,
51
- j,
52
- k,
53
- p,
54
- q,
55
- matches,
56
- match;
57
-
58
- // loop through all regexes maps
59
- while (i < arrays.length && !matches) {
60
- const regex = arrays[i], // even sequence (0,2,4,..)
61
- props = arrays[i + 1]; // odd sequence (1,3,5,..)
62
- j = k = 0;
63
-
64
- // try matching uastring with regexes
65
- while (j < regex.length && !matches) {
66
- matches = regex[j++].exec(ua);
67
-
68
- if (matches) {
69
- for (p = 0; p < props.length; p++) {
70
- match = matches[++k];
71
- q = props[p];
72
- // check if given property is actually array
73
- if (typeof q === OBJ_TYPE && q.length > 0) {
74
- if (q.length == 2) {
75
- if (typeof q[1] == FUNC_TYPE) {
76
- // assign modified match
77
- browser[q[0]] = q[1].call(browser, match);
78
- } else {
79
- // assign given value, ignore regex match
80
- browser[q[0]] = q[1];
81
- }
82
- } else if (q.length == 3) {
83
- // check whether function or regex
84
- if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {
85
- // call function (usually string mapper)
86
- browser[q[0]] = match
87
- ? q[1].call(browser, match, q[2])
88
- : undefined;
89
- } else {
90
- // sanitize match using given regex
91
- browser[q[0]] = match ? match.replace(q[1], q[2]) : undefined;
92
- }
93
- } else if (q.length == 4) {
94
- browser[q[0]] = match
95
- ? q[3].call(browser, match.replace(q[1], q[2]))
96
- : undefined;
97
- }
98
- } else {
99
- browser[q] = match ? match : undefined;
100
- }
101
- }
102
- }
103
- }
104
- i += 2;
105
- }
106
- }
107
-
108
- const browserRegexes = [
109
- [
110
- /\b(?:crmo|crios)\/([\w.]+)/i, // Chrome for Android/iOS
111
- ],
112
- [VERSION, [NAME, 'Chrome']],
113
- [
114
- /edg(?:e|ios|a)?\/([\w.]+)/i, // Microsoft Edge
115
- ],
116
- [VERSION, [NAME, 'Edge']],
117
- [
118
- // Presto based
119
- /(opera mini)\/([-\w.]+)/i, // Opera Mini
120
- /(opera [mobiletab]{3,6})\b.+version\/([-\w.]+)/i, // Opera Mobi/Tablet
121
- /(opera)(?:.+version\/|[/ ]+)([\w.]+)/i, // Opera
122
- ],
123
- [NAME, VERSION],
124
- [
125
- /opios[/ ]+([\w.]+)/i, // Opera mini on iphone >= 8.0
126
- ],
127
- [VERSION, [NAME, OPERA + ' Mini']],
128
- [
129
- /\bopr\/([\w.]+)/i, // Opera Webkit
130
- ],
131
- [VERSION, [NAME, OPERA]],
132
- [
133
- // Mixed
134
- /(kindle)\/([\w.]+)/i, // Kindle
135
- /(lunascape|maxthon|netfront|jasmine|blazer)[/ ]?([\w.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer
136
- // Trident based
137
- /(avant |iemobile|slim)(?:browser)?[/ ]?([\w.]*)/i, // Avant/IEMobile/SlimBrowser
138
- /(ba?idubrowser)[/ ]?([\w.]+)/i, // Baidu Browser
139
- /(?:ms|\()(ie) ([\w.]+)/i, // Internet Explorer
140
-
141
- // Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon
142
- /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w.]+)/i,
143
- // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ
144
- /(weibo)__([\d.]+)/i, // Weibo
145
- ],
146
- [NAME, VERSION],
147
- [
148
- /(?:\buc? ?browser|(?:juc.+)ucweb)[/ ]?([\w.]+)/i, // UCBrowser
149
- ],
150
- [VERSION, [NAME, 'UC' + BROWSER]],
151
- [
152
- /\bqbcore\/([\w.]+)/i, // WeChat Desktop for Windows Built-in Browser
153
- ],
154
- [VERSION, [NAME, 'WeChat(Win) Desktop']],
155
- [
156
- /micromessenger\/([\w.]+)/i, // WeChat
157
- ],
158
- [VERSION, [NAME, 'WeChat']],
159
- [
160
- /konqueror\/([\w.]+)/i, // Konqueror
161
- ],
162
- [VERSION, [NAME, 'Konqueror']],
163
- [
164
- /trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i, // IE11
165
- ],
166
- [VERSION, [NAME, 'IE']],
167
- [
168
- /yabrowser\/([\w.]+)/i, // Yandex
169
- ],
170
- [VERSION, [NAME, 'Yandex']],
171
- [
172
- /(avast|avg)\/([\w.]+)/i, // Avast/AVG Secure Browser
173
- ],
174
- [[NAME, /(.+)/, '$1 Secure ' + BROWSER], VERSION],
175
- [
176
- /\bfocus\/([\w.]+)/i, // Firefox Focus
177
- ],
178
- [VERSION, [NAME, FIREFOX + ' Focus']],
179
- [
180
- /\bopt\/([\w.]+)/i, // Opera Touch
181
- ],
182
- [VERSION, [NAME, OPERA + ' Touch']],
183
- [
184
- /coc_coc\w+\/([\w.]+)/i, // Coc Coc Browser
185
- ],
186
- [VERSION, [NAME, 'Coc Coc']],
187
- [
188
- /dolfin\/([\w.]+)/i, // Dolphin
189
- ],
190
- [VERSION, [NAME, 'Dolphin']],
191
- [
192
- /coast\/([\w.]+)/i, // Opera Coast
193
- ],
194
- [VERSION, [NAME, OPERA + ' Coast']],
195
- [
196
- /miuibrowser\/([\w.]+)/i, // MIUI Browser
197
- ],
198
- [VERSION, [NAME, 'MIUI ' + BROWSER]],
199
- [
200
- /fxios\/([-\w.]+)/i, // Firefox for iOS
201
- ],
202
- [VERSION, [NAME, FIREFOX]],
203
- [
204
- /\bqihu|(qi?ho?o?|360)browser/i, // 360
205
- ],
206
- [[NAME, '360 ' + BROWSER]],
207
- [/(oculus|samsung|sailfish)browser\/([\w.]+)/i],
208
- [[NAME, /(.+)/, '$1 ' + BROWSER], VERSION],
209
- [
210
- // Oculus/Samsung/Sailfish Browser
211
- /(comodo_dragon)\/([\w.]+)/i, // Comodo Dragon
212
- ],
213
- [[NAME, /_/g, ' '], VERSION],
214
- [
215
- /(electron)\/([\w.]+) safari/i, // Electron-based App
216
- /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w.]+))/i, // Tesla
217
- /m?(qqbrowser|baiduboxapp|2345Explorer)[/ ]?([\w.]+)/i, // QQBrowser/Baidu App/2345 Browser
218
- ],
219
- [NAME, VERSION],
220
- [
221
- /(metasr)[/ ]?([\w.]+)/i, // SouGouBrowser
222
- /(lbbrowser)/i, // LieBao Browser
223
- ],
224
- [NAME],
225
- [
226
- // WebView
227
- /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w.]+);)/i, // Facebook App for iOS & Android
228
- ],
229
- [[NAME, 'Facebook'], VERSION],
230
- [
231
- /safari (line)\/([\w.]+)/i, // Line App for iOS
232
- /\b(line)\/([\w.]+)\/iab/i, // Line App for Android
233
- /(chromium|instagram)[/ ]([-\w.]+)/i, // Chromium/Instagram
234
- ],
235
- [NAME, VERSION],
236
- [
237
- /\bgsa\/([\w.]+) .*safari\//i, // Google Search Appliance on iOS
238
- ],
239
- [VERSION, [NAME, 'GSA']],
240
- [
241
- /headlesschrome(?:\/([\w.]+)| )/i, // Chrome Headless
242
- ],
243
- [VERSION, [NAME, CHROME + ' Headless']],
244
- [
245
- / wv\).+(chrome)\/([\w.]+)/i, // Chrome WebView
246
- ],
247
- [[NAME, CHROME + ' WebView'], VERSION],
248
- [
249
- /droid.+ version\/([\w.]+)\b.+(?:mobile safari|safari)/i, // Android Browser
250
- ],
251
- [VERSION, [NAME, 'Android ' + BROWSER]],
252
- [
253
- /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w.]+)/i, // Chrome/OmniWeb/Arora/Tizen/Nokia
254
- ],
255
- [NAME, VERSION],
256
- [
257
- /version\/([\w.]+) .*mobile\/\w+ (safari)/i, // Mobile Safari
258
- ],
259
- [VERSION, [NAME, 'Mobile Safari']],
260
- [
261
- /version\/([\w.]+) .*(mobile ?safari|safari)/i, // Safari & Safari Mobile
262
- ],
263
- [VERSION, NAME],
264
- [
265
- /webkit.+?(mobile ?safari|safari)(\/[\w.]+)/i, // Safari < 3.0
266
- ],
267
- [NAME, [VERSION, strMapper, oldSafariMap]],
268
- [/(webkit|khtml)\/([\w.]+)/i],
269
- [NAME, VERSION],
270
- [
271
- // Gecko based
272
- /(navigator|netscape\d?)\/([-\w.]+)/i, // Netscape
273
- ],
274
- [[NAME, 'Netscape'], VERSION],
275
- [
276
- /mobile vr; rv:([\w.]+)\).+firefox/i, // Firefox Reality
277
- ],
278
- [VERSION, [NAME, FIREFOX + ' Reality']],
279
- [
280
- /ekiohf.+(flow)\/([\w.]+)/i, // Flow
281
- /(swiftfox)/i, // Swiftfox
282
- /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[/ ]?([\w.+]+)/i,
283
- // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror/Klar
284
- /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w.]+)$/i,
285
- // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix
286
- /(firefox)\/([\w.]+)/i, // Other Firefox-based
287
- /(mozilla)\/([\w.]+) .+rv:.+gecko\/\d+/i, // Mozilla
288
-
289
- // Other
290
- /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[. ]?browser)[-/ ]?v?([\w.]+)/i,
291
- // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser
292
- /(links) \(([\w.]+)/i, // Links
293
- ],
294
- [NAME, VERSION],
295
- ];
296
-
297
- const _ua =
298
- typeof window !== UNDEF_TYPE && window.navigator && window.navigator.userAgent
299
- ? window.navigator.userAgent
300
- : EMPTY;
301
-
302
- interface Browser {
303
- name?: string;
304
- version?: string;
305
- }
306
-
307
- export function evaluateBrowserVersion(): Browser {
308
- const browser: Browser = { name: '', version: '' };
309
- rgxMapper(browser, _ua, browserRegexes);
310
- browser.version = majorize(browser.version);
311
- return browser;
312
- }
313
-
314
- type Mobile = RegExpMatchArray | null;
315
-
316
- export const isMobile = {
317
- Android: function (): Mobile {
318
- return navigator.userAgent.match(/Android/i);
319
- },
320
- BlackBerry: function (): Mobile {
321
- return navigator.userAgent.match(/BlackBerry/i);
322
- },
323
- iOS: function (): Mobile {
324
- return navigator.userAgent.match(/iPhone|iPad|iPod/i);
325
- },
326
- Opera: function (): Mobile {
327
- return navigator.userAgent.match(/Opera Mini/i);
328
- },
329
- Windows: function (): Mobile {
330
- return (
331
- navigator.userAgent.match(/IEMobile/i) ||
332
- navigator.userAgent.match(/WPDesktop/i)
333
- );
334
- },
335
- any: function (): Mobile {
336
- return (
337
- isMobile.Android() ||
338
- isMobile.BlackBerry() ||
339
- isMobile.iOS() ||
340
- isMobile.Opera() ||
341
- isMobile.Windows()
342
- );
343
- },
344
- };
345
-
346
- export default evaluateBrowserVersion;
@@ -1,97 +0,0 @@
1
- import React from 'react';
2
-
3
- class DigigovError extends Error {
4
- constructor(message) {
5
- super(message); // (1)
6
- this.name = 'DigigovError'; // (2)
7
- }
8
- }
9
- const loggedDeprecations = new Set();
10
- export interface ErrorWarning {
11
- /**
12
- * Will log a warning if true.
13
- */
14
- warning?: string | true;
15
- error?: string | true;
16
- }
17
- export interface PropValueDeprecations {
18
- values?: Record<string, ErrorWarning>;
19
- }
20
- export type Deprecations = {
21
- name: string;
22
- rename?: string;
23
- props?: Record<string, PropValueDeprecations & ErrorWarning>;
24
- } & ErrorWarning;
25
- const handleErrorWarning = (
26
- componentName,
27
- name: string,
28
- { error, warning }: (PropValueDeprecations & ErrorWarning) | ErrorWarning,
29
- type
30
- ) => {
31
- if (warning === true) {
32
- console.warn(`⚠️ ${componentName}: ${name} ${type} will be deprecated.`);
33
- } else if (typeof warning === 'string') {
34
- console.warn(warning);
35
- }
36
- if (error === true) {
37
- throw new DigigovError(
38
- `${componentName}: !! ${name} ${type} is deprecated.`
39
- );
40
- } else if (typeof error === 'string') {
41
- throw new DigigovError(
42
- `Component \`${componentName}\` with \`${name}\` prop: ${error}`
43
- );
44
- }
45
- };
46
- export default function withDeprecation<Type>(
47
- Component: Type,
48
- deprecations: Deprecations
49
- ): Type {
50
- const componentName =
51
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
52
- // @ts-ignore
53
- deprecations.name || Component.name || Component?.render?.name;
54
- if(loggedDeprecations.has(componentName)){
55
- return Component
56
- }else{
57
- loggedDeprecations.add(componentName)
58
- }
59
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
60
- // @ts-ignore
61
- return function withDeprecationComponent(props) {
62
- if (deprecations.rename) {
63
- console.warn(
64
- `♻️ ${componentName} is renamed to ${deprecations.rename}\n`
65
- );
66
- }
67
- handleErrorWarning(componentName, componentName, deprecations, 'component');
68
- if (deprecations.props) {
69
- Object.keys(deprecations.props).forEach((propName) => {
70
- const value = props[propName];
71
- if (!value) {
72
- return;
73
- }
74
- const propDeprecation = deprecations?.props?.[propName];
75
- if (propDeprecation?.values?.[value]) {
76
- return handleErrorWarning(
77
- componentName,
78
- `${propName} ${value}`,
79
- propDeprecation?.values?.[value],
80
- 'property value'
81
- );
82
- }
83
- if (propDeprecation?.error || propDeprecation?.warning) {
84
- return handleErrorWarning(
85
- componentName,
86
- propName,
87
- propDeprecation,
88
- 'property'
89
- );
90
- }
91
- });
92
- }
93
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
94
- // @ts-ignore
95
- return <Component {...props} />;
96
- };
97
- }
package/tsconfig.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "extends": "@digigov/cli-build/tsconfig.base",
3
- "compilerOptions": {
4
- "outDir": "dist",
5
- "types": ["node", "jest", "react"]
6
- },
7
- "include": [
8
- "src",
9
- "src/custom.d.ts"
10
- ],
11
- "files": [
12
- "src/custom.d.ts"
13
- ],
14
- "exclude": [
15
- "node_modules",
16
- "dist"
17
- ]
18
- }
@@ -1,27 +0,0 @@
1
- {
2
- "extends": "@digigov/cli-build/tsconfig.common",
3
- "compilerOptions": {
4
- "skipLibCheck": true,
5
- "moduleResolution": "node",
6
- "outDir": "dist",
7
- "types": ["node", "jest", "react"],
8
- "baseUrl": "./",
9
- "paths": {
10
- "@digigov/ui/*": ["./src/*"],
11
- "@digigov/ui": ["./src/"],
12
- "@digigov/react-core/*": ["node_modules/@digigov/react-core/src/*"],
13
- "@digigov/react-core": ["node_modules/@digigov/react-core/src/"]
14
- }
15
- },
16
- "include": [
17
- "src",
18
- "src/custom.d.ts"
19
- ],
20
- "files": [
21
- "src/custom.d.ts"
22
- ],
23
- "exclude": [
24
- "node_modules",
25
- "dist"
26
- ]
27
- }
package/ui.build.log DELETED
@@ -1,17 +0,0 @@
1
- Invoking: digigov build --subpackages
2
-
3
- Running /Users/dimitristsironis/grnet/digigov-sdk/tooling/cli-build/node_modules/.bin/rimraf dist
4
- Running /Users/dimitristsironis/grnet/digigov-sdk/tooling/cli-build/node_modules/.bin/tsc --emitDeclarationOnly --outDir dist --project /Users/dimitristsironis/grnet/digigov-sdk/libs/ui/tsconfig.production.json
5
- Running /Users/dimitristsironis/grnet/digigov-sdk/tooling/cli-build/node_modules/.bin/babel --config-file /Users/dimitristsironis/grnet/digigov-sdk/tooling/cli-build/babel.config.js src --extensions .tsx,.ts,.js,.jsx --copy-files --out-dir dist/esm
6
- Successfully compiled 112 files with Babel (2766ms).
7
- Running /Users/dimitristsironis/grnet/digigov-sdk/tooling/cli-build/node_modules/.bin/babel --config-file /Users/dimitristsironis/grnet/digigov-sdk/tooling/cli-build/babel.config.js src --extensions .tsx,.ts,.js,.jsx --copy-files --out-dir dist/es
8
- Successfully compiled 112 files with Babel (2619ms).
9
- Created package.json in /Users/dimitristsironis/grnet/digigov-sdk/libs/ui/dist/package.json
10
- Copied /Users/dimitristsironis/grnet/digigov-sdk/libs/ui/CHANGELOG.md to /Users/dimitristsironis/grnet/digigov-sdk/libs/ui/dist/CHANGELOG.md
11
- Copied /Users/dimitristsironis/grnet/digigov-sdk/libs/ui/README.md to /Users/dimitristsironis/grnet/digigov-sdk/libs/ui/dist/README.md
12
- Copied /Users/dimitristsironis/grnet/digigov-sdk/LICENSE to /Users/dimitristsironis/grnet/digigov-sdk/libs/ui/dist/LICENSE
13
- Skipped license for ./index.js
14
- Skipped license for ./umd/digigov-ui.development.js
15
- Skipped license for ./umd/digigov-ui.production.min.js
16
- Running /Users/dimitristsironis/grnet/digigov-sdk/tooling/cli-build/node_modules/.bin/babel --config-file /Users/dimitristsironis/grnet/digigov-sdk/tooling/cli-build/babel.config.js src --extensions .tsx,.ts,.js,.jsx --copy-files --out-dir dist
17
- Successfully compiled 112 files with Babel (3083ms).