@digigov/react-core 2.0.0-2a26e869 → 2.0.0-44e7106a

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 (395) hide show
  1. package/Accordion/index.d.ts +2 -28
  2. package/Accordion/index.js +3 -34
  3. package/Accordion/index.js.map +3 -3
  4. package/Accordion/index.native/index.js +22 -0
  5. package/Accordion/index.native/package.json +6 -0
  6. package/Accordion/index.native.d.ts +6 -0
  7. package/Accordion/index.native.js.map +7 -0
  8. package/Accordion/index.web/index.js +37 -0
  9. package/Accordion/index.web/package.json +6 -0
  10. package/Accordion/index.web.d.ts +28 -0
  11. package/Accordion/index.web.js.map +7 -0
  12. package/AccordionSection/index.d.ts +2 -11
  13. package/AccordionSection/index.js +3 -20
  14. package/AccordionSection/index.js.map +3 -3
  15. package/AccordionSection/index.native/index.js +21 -0
  16. package/AccordionSection/index.native/package.json +6 -0
  17. package/AccordionSection/index.native.d.ts +4 -0
  18. package/AccordionSection/index.native.js.map +7 -0
  19. package/AccordionSection/index.web/index.js +23 -0
  20. package/AccordionSection/index.web/package.json +6 -0
  21. package/AccordionSection/index.web.d.ts +11 -0
  22. package/AccordionSection/index.web.js.map +7 -0
  23. package/AccordionSectionSummaryHeading/index.js +2 -1
  24. package/AccordionSectionSummaryHeading/index.js.map +2 -2
  25. package/BackLinkBase/index.d.ts +9 -0
  26. package/BackLinkBase/index.js +29 -0
  27. package/BackLinkBase/index.js.map +7 -0
  28. package/{BackLink → BackLinkBase}/package.json +1 -1
  29. package/Base/compat/details.native/index.js +2 -1
  30. package/Base/compat/details.native.d.ts +2 -1
  31. package/Base/compat/details.native.js.map +2 -2
  32. package/Base/index.web.d.ts +1 -1
  33. package/Base/index.web.js.map +1 -1
  34. package/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.d.ts +5 -5
  35. package/BreadcrumbsListItemLinkBase/index.js +23 -0
  36. package/BreadcrumbsListItemLinkBase/index.js.map +7 -0
  37. package/BreadcrumbsListItemLinkBase/package.json +6 -0
  38. package/BreadcrumbsListItemWrapper/index.d.ts +10 -0
  39. package/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.js +4 -4
  40. package/BreadcrumbsListItemWrapper/index.js.map +7 -0
  41. package/BreadcrumbsListItemWrapper/package.json +6 -0
  42. package/Button/index.js +2 -0
  43. package/Button/index.js.map +2 -2
  44. package/{ButtonLink → ButtonLinkBase}/index.d.ts +4 -4
  45. package/ButtonLinkBase/index.js +27 -0
  46. package/ButtonLinkBase/index.js.map +7 -0
  47. package/{CallToAction → ButtonLinkBase}/package.json +1 -1
  48. package/CallToActionBase/index.d.ts +9 -0
  49. package/{CallToAction → CallToActionBase}/index.js +6 -6
  50. package/CallToActionBase/index.js.map +7 -0
  51. package/CallToActionBase/package.json +6 -0
  52. package/CopyToClipboardMessage/index.native/index.js +1 -1
  53. package/CopyToClipboardMessage/index.native.js.map +1 -1
  54. package/DateInputItem/index.native/index.js +1 -1
  55. package/DateInputItem/index.native.js.map +1 -1
  56. package/Details/index.native/index.js +1 -1
  57. package/Details/index.native.js.map +1 -1
  58. package/FileUpload/index.d.ts +7 -0
  59. package/FileUpload/index.js +12 -4
  60. package/FileUpload/index.js.map +2 -2
  61. package/FileUploadContainer/index.d.ts +7 -0
  62. package/FileUploadContainer/index.js +3 -2
  63. package/FileUploadContainer/index.js.map +2 -2
  64. package/FooterLinkBase/index.d.ts +9 -0
  65. package/FooterLinkBase/index.js +23 -0
  66. package/FooterLinkBase/index.js.map +7 -0
  67. package/{ButtonLink → FooterLinkBase}/package.json +1 -1
  68. package/GovGRLogoBase/govgr-logo-base64/package.json +6 -0
  69. package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js.map +1 -1
  70. package/GovGRLogoBase/govgr-logo-blue-base64/package.json +6 -0
  71. package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.js.map +1 -1
  72. package/GovGRLogoBase/index.d.ts +9 -0
  73. package/GovGRLogoBase/index.js +43 -0
  74. package/GovGRLogoBase/index.js.map +7 -0
  75. package/{FooterLink → GovGRLogoBase}/package.json +1 -1
  76. package/Grid/index.js +1 -0
  77. package/Grid/index.js.map +2 -2
  78. package/HeaderLogoBase/index.d.ts +19 -0
  79. package/HeaderLogoBase/index.js +33 -0
  80. package/HeaderLogoBase/index.js.map +7 -0
  81. package/HeaderLogoBase/package.json +6 -0
  82. package/HeaderSecondaryLogoBase/index.d.ts +19 -0
  83. package/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.js +7 -7
  84. package/HeaderSecondaryLogoBase/index.js.map +7 -0
  85. package/{BreadcrumbsListItemLink → HeaderSecondaryLogoBase}/package.json +1 -1
  86. package/HeaderTitleBase/index.d.ts +9 -0
  87. package/HeaderTitleBase/index.js +24 -0
  88. package/HeaderTitleBase/index.js.map +7 -0
  89. package/HeaderTitleBase/package.json +6 -0
  90. package/LinkBase/index.js +1 -0
  91. package/LinkBase/index.js.map +2 -2
  92. package/{NavListItemAction → NavListItemActionBase}/index.d.ts +6 -6
  93. package/{NavListItemAction → NavListItemActionBase}/index.js +6 -6
  94. package/NavListItemActionBase/index.js.map +7 -0
  95. package/NavListItemActionBase/package.json +6 -0
  96. package/NavListItemActionContainer/index.native/index.js +1 -1
  97. package/NavListItemActionContainer/index.native.js.map +1 -1
  98. package/{NavListItemLink → NavListItemLinkBase}/index.d.ts +4 -4
  99. package/{NavListItemLink → NavListItemLinkBase}/index.js +6 -6
  100. package/NavListItemLinkBase/index.js.map +7 -0
  101. package/{BreadcrumbsListItem → NavListItemLinkBase}/package.json +1 -1
  102. package/NotificationBannerContent/index.js +1 -1
  103. package/NotificationBannerContent/index.js.map +2 -2
  104. package/NotificationBannerLink/index.native/index.js +1 -1
  105. package/NotificationBannerLink/index.native.js.map +1 -1
  106. package/Table/index.d.ts +9 -0
  107. package/Table/index.js +4 -1
  108. package/Table/index.js.map +2 -2
  109. package/TableDataCell/index.d.ts +13 -0
  110. package/TableDataCell/index.js +10 -1
  111. package/TableDataCell/index.js.map +2 -2
  112. package/TextArea/index.native/index.js +1 -1
  113. package/TextArea/index.native.js.map +1 -1
  114. package/TextInput/index.native/index.js +1 -1
  115. package/TextInput/index.native.js.map +1 -1
  116. package/WarningText/index.d.ts +7 -0
  117. package/WarningText/index.js +10 -2
  118. package/WarningText/index.js.map +2 -2
  119. package/cjs/Accordion/index.js +5 -35
  120. package/cjs/Accordion/index.js.map +3 -3
  121. package/cjs/{utils/extend.native → Accordion/index.native}/index.js +22 -16
  122. package/cjs/Accordion/index.native.js.map +7 -0
  123. package/cjs/{BackLink → Accordion/index.web}/index.js +24 -18
  124. package/cjs/Accordion/index.web.js.map +7 -0
  125. package/cjs/AccordionSection/index.js +5 -21
  126. package/cjs/AccordionSection/index.js.map +3 -3
  127. package/cjs/{CheckboxItemInput → AccordionSection}/index.native/index.js +13 -12
  128. package/cjs/AccordionSection/index.native.js.map +7 -0
  129. package/cjs/{HeaderTitle → AccordionSection/index.web}/index.js +11 -12
  130. package/cjs/AccordionSection/index.web.js.map +7 -0
  131. package/cjs/AccordionSectionSummaryHeading/index.js +2 -1
  132. package/cjs/AccordionSectionSummaryHeading/index.js.map +2 -2
  133. package/cjs/BackLinkBase/index.js +62 -0
  134. package/cjs/BackLinkBase/index.js.map +7 -0
  135. package/cjs/Base/compat/details.native/index.js +2 -1
  136. package/cjs/Base/compat/details.native.js.map +2 -2
  137. package/cjs/Base/index.web.js.map +1 -1
  138. package/cjs/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.js +10 -11
  139. package/cjs/BreadcrumbsListItemLinkBase/index.js.map +7 -0
  140. package/cjs/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.js +8 -8
  141. package/cjs/BreadcrumbsListItemWrapper/index.js.map +7 -0
  142. package/cjs/Button/index.js +2 -0
  143. package/cjs/Button/index.js.map +2 -2
  144. package/cjs/ButtonLinkBase/index.js +60 -0
  145. package/cjs/ButtonLinkBase/index.js.map +7 -0
  146. package/cjs/{CallToAction → CallToActionBase}/index.js +10 -10
  147. package/cjs/CallToActionBase/index.js.map +7 -0
  148. package/cjs/CopyToClipboardMessage/index.native/index.js +2 -2
  149. package/cjs/CopyToClipboardMessage/index.native.js.map +2 -2
  150. package/cjs/DateInputItem/index.native/index.js +2 -2
  151. package/cjs/DateInputItem/index.native.js.map +2 -2
  152. package/cjs/Details/index.native/index.js +2 -2
  153. package/cjs/Details/index.native.js.map +2 -2
  154. package/cjs/FileUpload/index.js +12 -4
  155. package/cjs/FileUpload/index.js.map +2 -2
  156. package/cjs/FileUploadContainer/index.js +3 -2
  157. package/cjs/FileUploadContainer/index.js.map +2 -2
  158. package/cjs/FooterLinkBase/index.js +56 -0
  159. package/cjs/FooterLinkBase/index.js.map +7 -0
  160. package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js.map +1 -1
  161. package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.js.map +1 -1
  162. package/cjs/{GovGRLogo → GovGRLogoBase}/index.js +41 -43
  163. package/cjs/GovGRLogoBase/index.js.map +7 -0
  164. package/cjs/Grid/index.js +1 -0
  165. package/cjs/Grid/index.js.map +2 -2
  166. package/cjs/{HeaderSecondaryLogo → HeaderLogoBase}/index.js +12 -12
  167. package/cjs/HeaderLogoBase/index.js.map +7 -0
  168. package/cjs/HeaderSecondaryLogoBase/index.js +66 -0
  169. package/cjs/HeaderSecondaryLogoBase/index.js.map +7 -0
  170. package/cjs/HeaderTitleBase/index.js +57 -0
  171. package/cjs/HeaderTitleBase/index.js.map +7 -0
  172. package/cjs/LinkBase/index.js +1 -0
  173. package/cjs/LinkBase/index.js.map +2 -2
  174. package/cjs/{NavListItemAction → NavListItemActionBase}/index.js +10 -10
  175. package/cjs/NavListItemActionBase/index.js.map +7 -0
  176. package/cjs/NavListItemActionContainer/index.native/index.js +2 -2
  177. package/cjs/NavListItemActionContainer/index.native.js.map +2 -2
  178. package/cjs/{NavListItemLink → NavListItemLinkBase}/index.js +10 -10
  179. package/cjs/NavListItemLinkBase/index.js.map +7 -0
  180. package/cjs/NotificationBannerContent/index.js +1 -1
  181. package/cjs/NotificationBannerContent/index.js.map +2 -2
  182. package/cjs/NotificationBannerLink/index.native/index.js +2 -2
  183. package/cjs/NotificationBannerLink/index.native.js.map +2 -2
  184. package/cjs/Table/index.js +4 -1
  185. package/cjs/Table/index.js.map +2 -2
  186. package/cjs/TableDataCell/index.js +10 -1
  187. package/cjs/TableDataCell/index.js.map +2 -2
  188. package/cjs/TextArea/index.native/index.js +2 -2
  189. package/cjs/TextArea/index.native.js.map +2 -2
  190. package/cjs/TextInput/index.native/index.js +2 -2
  191. package/cjs/TextInput/index.native.js.map +2 -2
  192. package/cjs/WarningText/index.js +10 -2
  193. package/cjs/WarningText/index.js.map +2 -2
  194. package/cjs/index.js +22 -22
  195. package/cjs/index.js.map +2 -2
  196. package/cjs/lazy/index.js +14 -14
  197. package/cjs/lazy.js.map +2 -2
  198. package/cjs/registry/index.js +36 -32
  199. package/cjs/registry.js.map +2 -2
  200. package/cjs/utils/index.native/index.js +88 -0
  201. package/cjs/utils/index.native.js.map +7 -0
  202. package/index.d.ts +11 -11
  203. package/index.js +12 -12
  204. package/index.js.map +1 -1
  205. package/lazy/index.js +14 -14
  206. package/package.json +3 -3
  207. package/registry/index.js +36 -32
  208. package/src/Accordion/index.native.tsx +19 -0
  209. package/src/Accordion/index.tsx +2 -71
  210. package/src/Accordion/index.web.tsx +71 -0
  211. package/src/AccordionSection/index.native.tsx +18 -0
  212. package/src/AccordionSection/index.tsx +2 -28
  213. package/src/AccordionSection/index.web.tsx +28 -0
  214. package/src/AccordionSectionSummaryHeading/index.tsx +3 -2
  215. package/src/AdminAside/__snapshots__/index.test.tsx.snap +1 -1
  216. package/src/AdminContainer/__snapshots__/index.test.tsx.snap +2 -2
  217. package/src/AdminMain/__snapshots__/index.test.tsx.snap +1 -1
  218. package/src/AdminTopSection/__snapshots__/index.test.tsx.snap +1 -1
  219. package/src/Aside/__snapshots__/index.test.tsx.snap +1 -1
  220. package/src/{BackLink → BackLinkBase}/__snapshots__/index.test.tsx.snap +2 -2
  221. package/src/BackLinkBase/index.test.tsx +15 -0
  222. package/src/BackLinkBase/index.tsx +36 -0
  223. package/src/Base/compat/details.native.tsx +3 -1
  224. package/src/Base/index.web.tsx +1 -1
  225. package/src/BottomInfo/__snapshots__/index.test.tsx.snap +1 -1
  226. package/src/BottomInfoContainer/__snapshots__/index.test.tsx.snap +1 -1
  227. package/src/BottomInfoContent/__snapshots__/index.test.tsx.snap +1 -1
  228. package/src/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/__snapshots__/index.test.tsx.snap +4 -4
  229. package/src/BreadcrumbsListItemLinkBase/index.test.tsx +18 -0
  230. package/src/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.tsx +10 -11
  231. package/src/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.test.tsx +1 -1
  232. package/src/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.tsx +5 -5
  233. package/src/Button/index.tsx +2 -0
  234. package/src/{ButtonLink → ButtonLinkBase}/__snapshots__/index.test.tsx.snap +22 -22
  235. package/src/ButtonLinkBase/index.test.tsx +75 -0
  236. package/src/ButtonLinkBase/index.tsx +55 -0
  237. package/src/{CallToAction → CallToActionBase}/__snapshots__/index.test.tsx.snap +1 -1
  238. package/src/CallToActionBase/index.test.tsx +10 -0
  239. package/src/{CallToAction → CallToActionBase}/index.tsx +10 -8
  240. package/src/CheckboxConditional/__snapshots__/index.test.tsx.snap +1 -1
  241. package/src/Container/__snapshots__/index.test.tsx.snap +3 -3
  242. package/src/CopyToClipboardMessage/index.native.tsx +1 -1
  243. package/src/DateInputItem/index.native.tsx +1 -1
  244. package/src/Details/index.native.tsx +1 -1
  245. package/src/FieldContainer/__snapshots__/index.test.tsx.snap +3 -3
  246. package/src/FileUpload/index.tsx +20 -4
  247. package/src/FileUploadContainer/index.tsx +10 -1
  248. package/src/FooterContainer/__snapshots__/index.test.tsx.snap +1 -1
  249. package/src/{FooterLink → FooterLinkBase}/__snapshots__/index.test.tsx.snap +2 -2
  250. package/src/FooterLinkBase/index.test.tsx +16 -0
  251. package/src/FooterLinkBase/index.tsx +27 -0
  252. package/src/{GovGRLogo → GovGRLogoBase}/__snapshots__/index.test.tsx.snap +1 -1
  253. package/src/GovGRLogoBase/index.test.tsx +8 -0
  254. package/src/GovGRLogoBase/index.tsx +43 -0
  255. package/src/Grid/__snapshots__/index.test.tsx.snap +8 -8
  256. package/src/Grid/index.tsx +1 -0
  257. package/src/{HeaderLogo → HeaderLogoBase}/__snapshots__/index.test.tsx.snap +1 -1
  258. package/src/HeaderLogoBase/index.test.tsx +8 -0
  259. package/src/HeaderLogoBase/index.tsx +44 -0
  260. package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/__snapshots__/index.test.tsx.snap +2 -2
  261. package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.test.tsx +7 -7
  262. package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.tsx +9 -9
  263. package/src/{HeaderTitle → HeaderTitleBase}/__snapshots__/index.test.tsx.snap +2 -2
  264. package/src/HeaderTitleBase/index.test.tsx +17 -0
  265. package/src/HeaderTitleBase/index.tsx +28 -0
  266. package/src/LinkBase/index.tsx +1 -0
  267. package/src/Main/__snapshots__/index.test.tsx.snap +1 -1
  268. package/src/NavListItemActionBase/__snapshots__/index.test.tsx.snap +101 -0
  269. package/src/NavListItemActionBase/index.test.tsx +42 -0
  270. package/src/{NavListItemAction → NavListItemActionBase}/index.tsx +13 -12
  271. package/src/NavListItemActionContainer/index.native.tsx +1 -1
  272. package/src/{NavListItemLink → NavListItemLinkBase}/__snapshots__/index.test.tsx.snap +5 -5
  273. package/src/NavListItemLinkBase/index.test.tsx +41 -0
  274. package/src/{NavListItemLink → NavListItemLinkBase}/index.tsx +8 -9
  275. package/src/NavMenuContainer/__snapshots__/index.test.tsx.snap +4 -4
  276. package/src/NavMenuContent/__snapshots__/index.test.tsx.snap +1 -1
  277. package/src/NavMenuTitle/__snapshots__/index.test.tsx.snap +1 -1
  278. package/src/NotificationBannerContent/index.tsx +1 -1
  279. package/src/NotificationBannerLink/index.native.tsx +1 -1
  280. package/src/RadioConditional/__snapshots__/index.test.tsx.snap +1 -1
  281. package/src/Table/index.tsx +12 -0
  282. package/src/TableDataCell/__snapshots__/index.test.tsx.snap +2 -2
  283. package/src/TableDataCell/index.tsx +23 -1
  284. package/src/TextArea/index.native.tsx +1 -1
  285. package/src/TextInput/index.native.tsx +1 -1
  286. package/src/WarningText/__snapshots__/index.test.tsx.snap +26 -0
  287. package/src/WarningText/index.test.tsx +5 -0
  288. package/src/WarningText/index.tsx +17 -2
  289. package/src/index.ts +11 -11
  290. package/src/lazy.js +14 -14
  291. package/src/registry.js +36 -32
  292. package/src/utils/index.native.tsx +120 -0
  293. package/utils/index.native/index.js +54 -0
  294. package/utils/index.native/package.json +6 -0
  295. package/utils/{extend.native.d.ts → index.native.d.ts} +23 -0
  296. package/utils/index.native.js.map +7 -0
  297. package/BackLink/index.d.ts +0 -9
  298. package/BackLink/index.js +0 -31
  299. package/BackLink/index.js.map +0 -7
  300. package/BreadcrumbsListItem/index.d.ts +0 -10
  301. package/BreadcrumbsListItem/index.js.map +0 -7
  302. package/BreadcrumbsListItemLink/index.js +0 -24
  303. package/BreadcrumbsListItemLink/index.js.map +0 -7
  304. package/ButtonLink/index.js +0 -29
  305. package/ButtonLink/index.js.map +0 -7
  306. package/CallToAction/index.d.ts +0 -9
  307. package/CallToAction/index.js.map +0 -7
  308. package/CheckboxItemInput/index.native/index.js +0 -20
  309. package/CheckboxItemInput/index.native/package.json +0 -6
  310. package/CheckboxItemInput/index.native.d.ts +0 -4
  311. package/CheckboxItemInput/index.native.js.map +0 -7
  312. package/FooterLink/index.d.ts +0 -9
  313. package/FooterLink/index.js +0 -25
  314. package/FooterLink/index.js.map +0 -7
  315. package/GovGRLogo/govgr-logo-base64/package.json +0 -6
  316. package/GovGRLogo/govgr-logo-blue-base64/package.json +0 -6
  317. package/GovGRLogo/index.d.ts +0 -9
  318. package/GovGRLogo/index.js +0 -45
  319. package/GovGRLogo/index.js.map +0 -7
  320. package/GovGRLogo/package.json +0 -6
  321. package/HeaderLogo/index.d.ts +0 -19
  322. package/HeaderLogo/index.js +0 -35
  323. package/HeaderLogo/index.js.map +0 -7
  324. package/HeaderLogo/package.json +0 -6
  325. package/HeaderSecondaryLogo/index.d.ts +0 -19
  326. package/HeaderSecondaryLogo/index.js.map +0 -7
  327. package/HeaderSecondaryLogo/package.json +0 -6
  328. package/HeaderTitle/index.d.ts +0 -9
  329. package/HeaderTitle/index.js +0 -24
  330. package/HeaderTitle/index.js.map +0 -7
  331. package/HeaderTitle/package.json +0 -6
  332. package/NavListItemAction/index.js.map +0 -7
  333. package/NavListItemAction/package.json +0 -6
  334. package/NavListItemLink/index.js.map +0 -7
  335. package/NavListItemLink/package.json +0 -6
  336. package/cjs/BackLink/index.js.map +0 -7
  337. package/cjs/BreadcrumbsListItem/index.js.map +0 -7
  338. package/cjs/BreadcrumbsListItemLink/index.js.map +0 -7
  339. package/cjs/ButtonLink/index.js +0 -62
  340. package/cjs/ButtonLink/index.js.map +0 -7
  341. package/cjs/CallToAction/index.js.map +0 -7
  342. package/cjs/CheckboxItemInput/index.native.js.map +0 -7
  343. package/cjs/FooterLink/index.js +0 -58
  344. package/cjs/FooterLink/index.js.map +0 -7
  345. package/cjs/GovGRLogo/index.js.map +0 -7
  346. package/cjs/HeaderLogo/index.js +0 -68
  347. package/cjs/HeaderLogo/index.js.map +0 -7
  348. package/cjs/HeaderSecondaryLogo/index.js.map +0 -7
  349. package/cjs/HeaderTitle/index.js.map +0 -7
  350. package/cjs/NavListItemAction/index.js.map +0 -7
  351. package/cjs/NavListItemLink/index.js.map +0 -7
  352. package/cjs/utils/extend.native.js.map +0 -7
  353. package/src/BackLink/index.test.tsx +0 -13
  354. package/src/BackLink/index.tsx +0 -35
  355. package/src/BreadcrumbsListItemLink/index.test.tsx +0 -16
  356. package/src/ButtonLink/index.test.tsx +0 -69
  357. package/src/ButtonLink/index.tsx +0 -54
  358. package/src/CallToAction/index.test.tsx +0 -10
  359. package/src/CheckboxItemInput/index.native.tsx +0 -17
  360. package/src/FooterLink/index.test.tsx +0 -14
  361. package/src/FooterLink/index.tsx +0 -26
  362. package/src/GovGRLogo/index.test.tsx +0 -8
  363. package/src/GovGRLogo/index.tsx +0 -42
  364. package/src/HeaderLogo/index.test.tsx +0 -8
  365. package/src/HeaderLogo/index.tsx +0 -43
  366. package/src/HeaderTitle/index.test.tsx +0 -16
  367. package/src/HeaderTitle/index.tsx +0 -28
  368. package/src/NavListItemAction/__snapshots__/index.test.tsx.snap +0 -13
  369. package/src/NavListItemAction/index.test.tsx +0 -11
  370. package/src/NavListItemLink/index.test.tsx +0 -39
  371. package/src/utils/extend.native.tsx +0 -36
  372. package/utils/extend.native/index.js +0 -14
  373. package/utils/extend.native/package.json +0 -6
  374. package/utils/extend.native.js.map +0 -7
  375. /package/{BackLink → BackLinkBase}/index.test.d.ts +0 -0
  376. /package/{BreadcrumbsListItem → BreadcrumbsListItemLinkBase}/index.test.d.ts +0 -0
  377. /package/{BreadcrumbsListItemLink → BreadcrumbsListItemWrapper}/index.test.d.ts +0 -0
  378. /package/{ButtonLink → ButtonLinkBase}/index.test.d.ts +0 -0
  379. /package/{CallToAction → CallToActionBase}/index.test.d.ts +0 -0
  380. /package/{FooterLink → FooterLinkBase}/index.test.d.ts +0 -0
  381. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64/index.js +0 -0
  382. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.d.ts +0 -0
  383. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64/index.js +0 -0
  384. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.d.ts +0 -0
  385. /package/{GovGRLogo → GovGRLogoBase}/index.test.d.ts +0 -0
  386. /package/{HeaderLogo → HeaderLogoBase}/index.test.d.ts +0 -0
  387. /package/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.test.d.ts +0 -0
  388. /package/{HeaderTitle → HeaderTitleBase}/index.test.d.ts +0 -0
  389. /package/{NavListItemAction → NavListItemActionBase}/index.test.d.ts +0 -0
  390. /package/{NavListItemLink → NavListItemLinkBase}/index.test.d.ts +0 -0
  391. /package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64/index.js +0 -0
  392. /package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64/index.js +0 -0
  393. /package/src/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/__snapshots__/index.test.tsx.snap +0 -0
  394. /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js +0 -0
  395. /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.ts +0 -0
@@ -1,68 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
- var HeaderLogo_exports = {};
29
- __export(HeaderLogo_exports, {
30
- HeaderLogo: () => HeaderLogo,
31
- default: () => HeaderLogo_default
32
- });
33
- module.exports = __toCommonJS(HeaderLogo_exports);
34
- var import_react = __toESM(require("react"));
35
- var import_clsx = __toESM(require("clsx"));
36
- var import_Base = __toESM(require("@digigov/react-core/Base"));
37
- const HeaderLogo = import_react.default.forwardRef(
38
- function HeaderLogo2({ href, src, altText, className, ...props }, ref) {
39
- return /* @__PURE__ */ import_react.default.createElement(
40
- import_Base.default,
41
- {
42
- as: "a",
43
- href,
44
- ref,
45
- className: (0, import_clsx.default)(className, {
46
- "ds-header__link": true
47
- }),
48
- ...props
49
- },
50
- /* @__PURE__ */ import_react.default.createElement(
51
- "img",
52
- {
53
- src,
54
- className: (0, import_clsx.default)(className, {
55
- "ds-header__logo": true
56
- }),
57
- alt: altText
58
- }
59
- )
60
- );
61
- }
62
- );
63
- var HeaderLogo_default = HeaderLogo;
64
- // Annotate the CommonJS export names for ESM import in node:
65
- 0 && (module.exports = {
66
- HeaderLogo
67
- });
68
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/HeaderLogo/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface HeaderLogoProps extends BaseProps<'a'> {\n /**\n * src is optional.\n\n */\n src?: string;\n /**\n * href is optional.\n\n */\n altText?: string;\n}\n/**\n * Use this component inside the Header to provide a logo.\n */\nexport const HeaderLogo = React.forwardRef<HTMLAnchorElement, HeaderLogoProps>(\n function HeaderLogo({ href, src, altText, className, ...props }, ref) {\n return (\n <Base\n as=\"a\"\n href={href}\n ref={ref}\n className={clsx(className, {\n 'ds-header__link': true,\n })}\n {...props}\n >\n <img\n src={src}\n className={clsx(className, {\n 'ds-header__logo': true,\n })}\n alt={altText}\n />\n </Base>\n );\n }\n);\nexport default HeaderLogo;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAiBzB,MAAM,aAAa,aAAAA,QAAM;AAAA,EAC9B,SAASC,YAAW,EAAE,MAAM,KAAK,SAAS,WAAW,GAAG,MAAM,GAAG,KAAK;AACpE,WACE,6BAAAD,QAAA;AAAA,MAAC,YAAAE;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA,eAAW,YAAAC,SAAK,WAAW;AAAA,UACzB,mBAAmB;AAAA,QACrB,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEJ,6BAAAH,QAAA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,eAAW,YAAAG,SAAK,WAAW;AAAA,YACzB,mBAAmB;AAAA,UACrB,CAAC;AAAA,UACD,KAAK;AAAA;AAAA,MACP;AAAA,IACF;AAAA,EAEJ;AACF;AACA,IAAO,qBAAQ;",
6
- "names": ["React", "HeaderLogo", "Base", "clsx"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/HeaderSecondaryLogo/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface HeaderSecondaryLogoProps extends BaseProps<'a'> {\n /**\n * src is needed to provide the url that we get the logo from.\n\n */\n src: string;\n /**\n * href provides the alternative text for the img tag.\n\n */\n altText?: string;\n}\n/**\n * HeaderSecondaryLogo is used inside Header for providing additional logos.\n */\nexport const HeaderSecondaryLogo = React.forwardRef<\n HTMLAnchorElement,\n HeaderSecondaryLogoProps\n>(function HeaderSecondaryLogo(\n { href, src, altText, className, ...props },\n ref\n) {\n return (\n <Base\n as=\"a\"\n href={href}\n ref={ref}\n className={clsx(className, {\n 'ds-header__link': true,\n })}\n {...props}\n >\n <img\n src={src}\n className={clsx(className, {\n 'ds-header__secondary-logo': true,\n })}\n alt={altText}\n />\n </Base>\n );\n});\n\nexport default HeaderSecondaryLogo;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAiBzB,MAAM,sBAAsB,aAAAA,QAAM,WAGvC,SAASC,qBACT,EAAE,MAAM,KAAK,SAAS,WAAW,GAAG,MAAM,GAC1C,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,mBAAmB;AAAA,MACrB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEJ,6BAAAH,QAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,YAAAG,SAAK,WAAW;AAAA,UACzB,6BAA6B;AAAA,QAC/B,CAAC;AAAA,QACD,KAAK;AAAA;AAAA,IACP;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,8BAAQ;",
6
- "names": ["React", "HeaderSecondaryLogo", "Base", "clsx"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/HeaderTitle/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface HeaderTitleProps extends BaseProps<'a'> {}\n/**\n * Use this component inside HeaderContent to provide a title to the header.\n */\nexport const HeaderTitle = React.forwardRef<\n HTMLAnchorElement,\n HeaderTitleProps\n>(function HeaderTitle({ href = '/', className, children, ...props }, ref) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n href={href}\n className={clsx(className, {\n 'ds-header__title': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default HeaderTitle;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAMzB,MAAM,cAAc,aAAAA,QAAM,WAG/B,SAASC,aAAY,EAAE,OAAO,KAAK,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACzE,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,oBAAoB;AAAA,MACtB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,sBAAQ;",
6
- "names": ["React", "HeaderTitle", "Base", "clsx"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/NavListItemAction/index.tsx"],
4
- "sourcesContent": ["import React, { ForwardedRef } from 'react';\nimport NavListItemActionContainer from '@digigov/react-core/NavListItemActionContainer';\nimport NavListItemBadge from '@digigov/react-core/NavListItemBadge';\nimport NavListItemButton, {\n NavListItemButtonProps,\n} from '@digigov/react-core/NavListItemButton';\nimport NavListItemLink, {\n NavListItemLinkProps,\n} from '@digigov/react-core/NavListItemLink';\n\nexport type LinkButtonJoinProps = NavListItemLinkProps & NavListItemButtonProps;\nexport interface NavListItemActionProps extends LinkButtonJoinProps {\n /**\n * label is optional.\n * The label for the NavListItemAction.\n */\n label?: string;\n\n /**\n * arrow is optional.\n * use arrow prop if you want to have arrow at the nav list item.\n * @value true\n * @value false\n * @default false\n */\n arrow?: boolean;\n badgeText?: string;\n}\n/**\n * NavListItemAction must be inside the NavList.\n * This component has a items of NavListItemLink component inside.\n */\nexport const NavListItemAction = React.forwardRef<\n HTMLButtonElement | HTMLAnchorElement,\n NavListItemActionProps\n>(function NavListItemAction(\n { label, arrow = false, href, className, children, ...props },\n ref\n) {\n return (\n <NavListItemActionContainer>\n {href ? (\n <NavListItemLink\n {...props}\n href={href}\n className={className}\n ref={ref as ForwardedRef<HTMLAnchorElement>}\n >\n {children || label}\n </NavListItemLink>\n ) : (\n <NavListItemButton\n {...props}\n arrow={arrow}\n className={className}\n ref={ref as ForwardedRef<HTMLButtonElement>}\n >\n {children || label}\n </NavListItemButton>\n )}\n {props.badgeText && <NavListItemBadge text={props.badgeText} />}\n </NavListItemActionContainer>\n );\n});\n\nexport default NavListItemAction;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAoC;AACpC,wCAAuC;AACvC,8BAA6B;AAC7B,+BAEO;AACP,6BAEO;AAwBA,MAAM,oBAAoB,aAAAA,QAAM,WAGrC,SAASC,mBACT,EAAE,OAAO,QAAQ,OAAO,MAAM,WAAW,UAAU,GAAG,MAAM,GAC5D,KACA;AACA,SACE,6BAAAD,QAAA,cAAC,kCAAAE,SAAA,MACE,OACC,6BAAAF,QAAA;AAAA,IAAC,uBAAAG;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,IAEA,6BAAAH,QAAA;AAAA,IAAC,yBAAAI;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC,YAAY;AAAA,EACf,GAED,MAAM,aAAa,6BAAAJ,QAAA,cAAC,wBAAAK,SAAA,EAAiB,MAAM,MAAM,WAAW,CAC/D;AAEJ,CAAC;AAED,IAAO,4BAAQ;",
6
- "names": ["React", "NavListItemAction", "NavListItemActionContainer", "NavListItemLink", "NavListItemButton", "NavListItemBadge"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/NavListItemLink/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport { BaseProps } from '@digigov/react-core/Base';\nimport Link from '@digigov/react-core/LinkBase';\n\nexport interface NavListItemLinkProps extends BaseProps<'a'> {\n /**\n * When the NavListItemLink is active, that means that we are in this option / page of the Nav.\n * active is optional.\n *\n * @value true\n * @value false\n */\n active?: boolean;\n}\n/**\n * NavListItemLink is an <a> element. It should be inside the NavListItem component.\n */\nexport const NavListItemLink = React.forwardRef<\n HTMLAnchorElement,\n NavListItemLinkProps\n>(function NavListItemLink(\n { active, href, className, children, ...props },\n ref\n) {\n return (\n <Link\n href={href}\n ref={ref}\n className={clsx(className, {\n 'ds-nav__list-item-link': true,\n 'ds-nav__list-item-link--active': active,\n })}\n {...props}\n >\n {children}\n </Link>\n );\n});\n\nexport default NavListItemLink;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AAEjB,sBAAiB;AAeV,MAAM,kBAAkB,aAAAA,QAAM,WAGnC,SAASC,iBACT,EAAE,QAAQ,MAAM,WAAW,UAAU,GAAG,MAAM,GAC9C,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,gBAAAE;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,0BAA0B;AAAA,QAC1B,kCAAkC;AAAA,MACpC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,0BAAQ;",
6
- "names": ["React", "NavListItemLink", "Link", "clsx"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/utils/extend.native.tsx"],
4
- "sourcesContent": ["import React from 'react';\n\ntype WithClassName<TProps> = TProps & { className?: string };\ntype PropFactory<TProps> = (props: WithClassName<TProps>) => any;\n\n/**\n * A HOC that transforms the props of the wrapped component before passing them through\n *\n * @param Component The component to wrap\n * @param [propFactory=(props) => props] The function that transforms the props\n * @returns The wrapped component that accepts the transformed props\n *\n * @example\n * type MyComponentProps = { name: string; };\n * const MyComponent = (props: MyComponentProps) => <p>Hi {props.name}</p>;\n *\n * const MyNativeComponent = extend(MyComponent, (props) => ({ name: props.name.toUpperCase(), ...props }));\n *\n * type AdditionalProps = { lastName: string; };\n * const MyExpandedNativeComponent = extend<MyComponentProps, AdditionalProps>(MyNativeComponent, (props) => ({ name: `${props.name} ${props.lastName}`, ...props }));\n */\nexport function extend<TProps, TAdditionalProps>(\n Component: React.ComponentType<TProps>,\n propFactory: PropFactory<TProps & TAdditionalProps> = (props) => props\n) {\n const ExtendedComponent = React.forwardRef(function ExtendedComponent(\n props: WithClassName<TProps & TAdditionalProps>,\n ref\n ) {\n const transformedProps = propFactory(props);\n\n return <Component ref={ref} {...transformedProps} />;\n });\n return ExtendedComponent;\n}\nexport default extend;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAqBX,SAAS,OACd,WACA,cAAsD,CAAC,UAAU,OACjE;AACA,QAAM,oBAAoB,aAAAA,QAAM,WAAW,SAASC,mBAClD,OACA,KACA;AACA,UAAM,mBAAmB,YAAY,KAAK;AAE1C,WAAO,6BAAAD,QAAA,cAAC,aAAU,KAAW,GAAG,kBAAkB;AAAA,EACpD,CAAC;AACD,SAAO;AACT;AACA,IAAO,wBAAQ;",
6
- "names": ["React", "ExtendedComponent"]
7
- }
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import BackLink from '@digigov/react-core/BackLink';
5
-
6
- it('renders the BackLink with no props', () => {
7
- expect(render(<BackLink>hello</BackLink>).baseElement).toMatchSnapshot();
8
- });
9
- it('renders the BackLink with href="#"', () => {
10
- expect(
11
- render(<BackLink href="#">hello</BackLink>).baseElement
12
- ).toMatchSnapshot();
13
- });
@@ -1,35 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
- import { CaretIcon } from '@digigov/react-icons';
5
-
6
- export interface BackLinkProps extends BaseProps<'a'> {}
7
- /**
8
- * Use BackLink component to help users go back to the previous page in a multi-page transaction.
9
- */
10
- export const BackLink = React.forwardRef<HTMLAnchorElement, BackLinkProps>(
11
- function BackLink(
12
- { href, printHidden = true, className, children, ...props },
13
- ref
14
- ) {
15
- return (
16
- <Base
17
- as="a"
18
- printHidden={printHidden}
19
- href={href}
20
- onClick={() => !href && window.history.back()}
21
- ref={ref}
22
- className={clsx(className, {
23
- 'ds-back-link': true,
24
- })}
25
- tabIndex={0}
26
- {...props}
27
- >
28
- <CaretIcon direction={'left'} />
29
- {children}
30
- </Base>
31
- );
32
- }
33
- );
34
-
35
- export default BackLink;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import BreadcrumbsListItemLink from '@digigov/react-core/BreadcrumbsListItemLink';
5
-
6
- it('renders the BreadcrumbsListItemLink with no props', () => {
7
- expect(
8
- render(<BreadcrumbsListItemLink>hello</BreadcrumbsListItemLink>).baseElement
9
- ).toMatchSnapshot();
10
- });
11
- it('renders the BreadcrumbsListItemLink with href', () => {
12
- expect(
13
- render(<BreadcrumbsListItemLink href="#">hello</BreadcrumbsListItemLink>)
14
- .baseElement
15
- ).toMatchSnapshot();
16
- });
@@ -1,69 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import ButtonLink from '@digigov/react-core/ButtonLink';
5
-
6
- it('renders the ButtonLink with no props', () => {
7
- expect(render(<ButtonLink>hello</ButtonLink>).baseElement).toMatchSnapshot();
8
- });
9
- it('renders the ButtonLink with color=primary', () => {
10
- expect(
11
- render(<ButtonLink color={'primary'}>hello</ButtonLink>).baseElement
12
- ).toMatchSnapshot();
13
- });
14
- it('renders the ButtonLink with color=secondary', () => {
15
- expect(
16
- render(<ButtonLink color={'secondary'}>hello</ButtonLink>).baseElement
17
- ).toMatchSnapshot();
18
- });
19
- it('renders the ButtonLink with color=warning', () => {
20
- expect(
21
- render(<ButtonLink color={'warning'}>hello</ButtonLink>).baseElement
22
- ).toMatchSnapshot();
23
- });
24
- it('renders the ButtonLink with href=#', () => {
25
- expect(
26
- render(<ButtonLink href={'#'}>hello</ButtonLink>).baseElement
27
- ).toMatchSnapshot();
28
- });
29
- it('renders the ButtonLink with disabled=false', () => {
30
- expect(render(<ButtonLink>hello</ButtonLink>).baseElement).toMatchSnapshot();
31
- });
32
- it('renders the ButtonLink with color=primary with href=#', () => {
33
- expect(
34
- render(
35
- <ButtonLink href={'#'} color={'primary'}>
36
- hello
37
- </ButtonLink>
38
- ).baseElement
39
- ).toMatchSnapshot();
40
- });
41
- it('renders the ButtonLink with color=secondary with href=#', () => {
42
- expect(
43
- render(
44
- <ButtonLink href={'#'} color={'secondary'}>
45
- hello
46
- </ButtonLink>
47
- ).baseElement
48
- ).toMatchSnapshot();
49
- });
50
- it('renders the ButtonLink with color=warning with href=#', () => {
51
- expect(
52
- render(
53
- <ButtonLink href={'#'} color={'warning'}>
54
- hello
55
- </ButtonLink>
56
- ).baseElement
57
- ).toMatchSnapshot();
58
- });
59
- it('renders the ButtonLink with ariaLabel prop', () => {
60
- expect(
61
- render(<ButtonLink aria-label="button for opening menu">Menu</ButtonLink>)
62
- .baseElement
63
- ).toMatchSnapshot();
64
- });
65
- it('renders the Button with tabIndex prop', () => {
66
- expect(
67
- render(<ButtonLink tabIndex={0}>Menu</ButtonLink>).baseElement
68
- ).toMatchSnapshot();
69
- });
@@ -1,54 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface ButtonLinkProps extends BaseProps<'a'> {
6
- /**
7
- * color is optional.
8
- * 'primary' color is used for the main call to action on a page.
9
- * 'secondary' color is used for secondary calls to action on a page.
10
- * 'warning' color is used to make users think carefully before they use them.
11
- * The default value is 'primary'.
12
- * @value 'primary'
13
- * @value 'secondary'
14
- * @value 'warning'
15
- * @default 'primary'
16
- */
17
- color?: 'primary' | 'secondary' | 'warning';
18
-
19
- /**
20
- * dense is optional.
21
- * @value true Button will be dense.
22
- * @value false
23
- * @default false
24
- */
25
- dense?: boolean;
26
- }
27
- /**
28
- * Use the Button component to help users carry out an action.
29
- */
30
- export const ButtonLink = React.forwardRef<HTMLAnchorElement, ButtonLinkProps>(
31
- function ButtonLink(
32
- { color = 'primary', dense, className, children, ...props },
33
- ref
34
- ) {
35
- return (
36
- <Base
37
- as="a"
38
- ref={ref}
39
- className={clsx(className, {
40
- 'ds-btn': true,
41
- 'ds-btn--dense': dense,
42
- 'ds-btn-primary': color === 'primary',
43
- 'ds-btn-secondary': color === 'secondary',
44
- 'ds-btn-warning': color === 'warning',
45
- })}
46
- {...props}
47
- >
48
- {children}
49
- </Base>
50
- );
51
- }
52
- );
53
-
54
- export default ButtonLink;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import CallToAction from '@digigov/react-core/CallToAction';
5
-
6
- it('renders the CallToAction with no props', () => {
7
- expect(
8
- render(<CallToAction>hello</CallToAction>).baseElement
9
- ).toMatchSnapshot();
10
- });
@@ -1,17 +0,0 @@
1
- import clsx from 'clsx';
2
- import CoreCheckboxItemInput from '@digigov/react-core/CheckboxItemInput/index.web';
3
- import extend from '@digigov/react-core/utils/extend.native';
4
-
5
- export const CheckboxItemInput = extend(
6
- CoreCheckboxItemInput,
7
- ({ className, ...props }) => {
8
- return {
9
- ...props,
10
- className: clsx(className, {
11
- 'ds-checkboxes__input__wrapper': true,
12
- }),
13
- };
14
- }
15
- );
16
-
17
- export default CheckboxItemInput;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import FooterLink from '@digigov/react-core/FooterLink';
5
-
6
- it('renders the FooterLink with no props', () => {
7
- expect(render(<FooterLink>hello</FooterLink>).baseElement).toMatchSnapshot();
8
- });
9
-
10
- it('renders the FooterLink with href prop', () => {
11
- expect(
12
- render(<FooterLink href={'#'}>hello</FooterLink>).baseElement
13
- ).toMatchSnapshot();
14
- });
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface FooterLinkProps extends BaseProps<'a'> {}
6
- /**
7
- * FooterLink in used inside the Footer component.
8
- */
9
- export const FooterLink = React.forwardRef<HTMLAnchorElement, FooterLinkProps>(
10
- function FooterLink({ className, children, ...props }, ref) {
11
- return (
12
- <Base
13
- as="a"
14
- ref={ref}
15
- className={clsx(className, {
16
- 'ds-footer__link': true,
17
- })}
18
- {...props}
19
- >
20
- {children}
21
- </Base>
22
- );
23
- }
24
- );
25
-
26
- export default FooterLink;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import GovGRLogo from '@digigov/react-core/GovGRLogo';
5
-
6
- it('renders the GovGRLogo with no props', () => {
7
- expect(render(<GovGRLogo />).baseElement).toMatchSnapshot();
8
- });
@@ -1,42 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
- import logo from '@digigov/react-core/GovGRLogo/govgr-logo-base64';
5
- import logoInverted from '@digigov/react-core/GovGRLogo/govgr-logo-blue-base64';
6
- export interface GovGRLogoProps extends BaseProps<'a'> {}
7
- /**
8
- * Use this component anywhere you what to provide the gov.gr logo.
9
- * */
10
- export const GovGRLogo = React.forwardRef<HTMLAnchorElement, GovGRLogoProps>(
11
- function GovGRLogo(
12
- { href = 'https://www.gov.gr/', className, ...props },
13
- ref
14
- ) {
15
- return (
16
- <Base
17
- as="a"
18
- href={href}
19
- ref={ref}
20
- className={clsx(className, { 'ds-header__link': true })}
21
- {...props}
22
- >
23
- <img
24
- src={logo}
25
- className={clsx(className, {
26
- 'ds-header__logo': true,
27
- })}
28
- alt="gov.gr logo"
29
- />
30
- <img
31
- src={logoInverted}
32
- className={clsx(className, {
33
- 'ds-header__logo-inverted': true,
34
- })}
35
- alt="gov.gr logo"
36
- />
37
- </Base>
38
- );
39
- }
40
- );
41
-
42
- export default GovGRLogo;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import HeaderLogo from '@digigov/react-core/HeaderLogo';
5
-
6
- it('renders the HeaderLogo with no props', () => {
7
- expect(render(<HeaderLogo />).baseElement).toMatchSnapshot();
8
- });
@@ -1,43 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface HeaderLogoProps extends BaseProps<'a'> {
6
- /**
7
- * src is optional.
8
-
9
- */
10
- src?: string;
11
- /**
12
- * href is optional.
13
-
14
- */
15
- altText?: string;
16
- }
17
- /**
18
- * Use this component inside the Header to provide a logo.
19
- */
20
- export const HeaderLogo = React.forwardRef<HTMLAnchorElement, HeaderLogoProps>(
21
- function HeaderLogo({ href, src, altText, className, ...props }, ref) {
22
- return (
23
- <Base
24
- as="a"
25
- href={href}
26
- ref={ref}
27
- className={clsx(className, {
28
- 'ds-header__link': true,
29
- })}
30
- {...props}
31
- >
32
- <img
33
- src={src}
34
- className={clsx(className, {
35
- 'ds-header__logo': true,
36
- })}
37
- alt={altText}
38
- />
39
- </Base>
40
- );
41
- }
42
- );
43
- export default HeaderLogo;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import HeaderTitle from '@digigov/react-core/HeaderTitle';
5
-
6
- it('renders the HeaderTitle with no props', () => {
7
- expect(
8
- render(<HeaderTitle>hello</HeaderTitle>).baseElement
9
- ).toMatchSnapshot();
10
- });
11
- it('renders the HeaderTitle with href', () => {
12
- expect(
13
- render(<HeaderTitle href="https://government.gov.gr">hello</HeaderTitle>)
14
- .baseElement
15
- ).toMatchSnapshot();
16
- });
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface HeaderTitleProps extends BaseProps<'a'> {}
6
- /**
7
- * Use this component inside HeaderContent to provide a title to the header.
8
- */
9
- export const HeaderTitle = React.forwardRef<
10
- HTMLAnchorElement,
11
- HeaderTitleProps
12
- >(function HeaderTitle({ href = '/', className, children, ...props }, ref) {
13
- return (
14
- <Base
15
- as="a"
16
- ref={ref}
17
- href={href}
18
- className={clsx(className, {
19
- 'ds-header__title': true,
20
- })}
21
- {...props}
22
- >
23
- {children}
24
- </Base>
25
- );
26
- });
27
-
28
- export default HeaderTitle;
@@ -1,13 +0,0 @@
1
- // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
-
3
- exports[`renders the NavListItemActionContainer with no props 1`] = `
4
- <body>
5
- <div>
6
- <li
7
- class="ds-nav__list-item"
8
- >
9
- hello
10
- </li>
11
- </div>
12
- </body>
13
- `;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
-
4
- import NavListItemActionContainer from '@digigov/react-core/NavListItemActionContainer';
5
-
6
- it('renders the NavListItemActionContainer with no props', () => {
7
- expect(
8
- render(<NavListItemActionContainer>hello</NavListItemActionContainer>)
9
- .baseElement
10
- ).toMatchSnapshot();
11
- });
@@ -1,39 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
- import NavListItemLink from '@digigov/react-core/NavListItemLink';
4
-
5
- it('renders the NavListItemLink with no props', () => {
6
- expect(
7
- render(<NavListItemLink>hello</NavListItemLink>).baseElement
8
- ).toMatchSnapshot();
9
- });
10
-
11
- it('renders the NavListItemLink with active=true', () => {
12
- expect(
13
- render(<NavListItemLink active={true}>hello</NavListItemLink>).baseElement
14
- ).toMatchSnapshot();
15
- });
16
-
17
- it('renders the NavListItemLink with active=false', () => {
18
- expect(
19
- render(<NavListItemLink active={false}>hello</NavListItemLink>).baseElement
20
- ).toMatchSnapshot();
21
- });
22
- it('renders the NavListItemLink with href and active=false', () => {
23
- expect(
24
- render(
25
- <NavListItemLink href="/" active={false}>
26
- hello
27
- </NavListItemLink>
28
- ).baseElement
29
- ).toMatchSnapshot();
30
- });
31
- it('renders the NavListItemLink with href and active=true', () => {
32
- expect(
33
- render(
34
- <NavListItemLink href="/" active={false}>
35
- hello
36
- </NavListItemLink>
37
- ).baseElement
38
- ).toMatchSnapshot();
39
- });
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
-
3
- type WithClassName<TProps> = TProps & { className?: string };
4
- type PropFactory<TProps> = (props: WithClassName<TProps>) => any;
5
-
6
- /**
7
- * A HOC that transforms the props of the wrapped component before passing them through
8
- *
9
- * @param Component The component to wrap
10
- * @param [propFactory=(props) => props] The function that transforms the props
11
- * @returns The wrapped component that accepts the transformed props
12
- *
13
- * @example
14
- * type MyComponentProps = { name: string; };
15
- * const MyComponent = (props: MyComponentProps) => <p>Hi {props.name}</p>;
16
- *
17
- * const MyNativeComponent = extend(MyComponent, (props) => ({ name: props.name.toUpperCase(), ...props }));
18
- *
19
- * type AdditionalProps = { lastName: string; };
20
- * const MyExpandedNativeComponent = extend<MyComponentProps, AdditionalProps>(MyNativeComponent, (props) => ({ name: `${props.name} ${props.lastName}`, ...props }));
21
- */
22
- export function extend<TProps, TAdditionalProps>(
23
- Component: React.ComponentType<TProps>,
24
- propFactory: PropFactory<TProps & TAdditionalProps> = (props) => props
25
- ) {
26
- const ExtendedComponent = React.forwardRef(function ExtendedComponent(
27
- props: WithClassName<TProps & TAdditionalProps>,
28
- ref
29
- ) {
30
- const transformedProps = propFactory(props);
31
-
32
- return <Component ref={ref} {...transformedProps} />;
33
- });
34
- return ExtendedComponent;
35
- }
36
- export default extend;