@digigov/react-core 2.0.0-d0adc9fb → 2.0.0-d16ded05

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 (513) 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 +2 -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 +2 -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 +10 -0
  22. package/AccordionSection/index.web.js.map +7 -0
  23. package/AccordionSectionSummaryHeading/index.d.ts +1 -0
  24. package/AccordionSectionSummaryHeading/index.js +5 -3
  25. package/AccordionSectionSummaryHeading/index.js.map +2 -2
  26. package/BackLinkBase/index.d.ts +9 -0
  27. package/BackLinkBase/index.js +29 -0
  28. package/BackLinkBase/index.js.map +7 -0
  29. package/{ButtonLink → BackLinkBase}/package.json +1 -1
  30. package/BannerContainer/index.js +1 -1
  31. package/BannerContainer/index.js.map +2 -2
  32. package/Base/compat/Input/CheckboxInput.native.js.map +2 -2
  33. package/Base/compat/Input/RadioInput.native.js.map +2 -2
  34. package/Base/compat/details.native/index.js +2 -1
  35. package/Base/compat/details.native.d.ts +2 -1
  36. package/Base/compat/details.native.js.map +2 -2
  37. package/Base/index.native.js.map +2 -2
  38. package/Base/index.web.d.ts +1 -1
  39. package/Base/index.web.js.map +1 -1
  40. package/Base/mapping.native.d.ts +1 -1
  41. package/Base/mapping.native.js.map +2 -2
  42. package/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.d.ts +5 -5
  43. package/BreadcrumbsListItemLinkBase/index.js +23 -0
  44. package/BreadcrumbsListItemLinkBase/index.js.map +7 -0
  45. package/BreadcrumbsListItemLinkBase/package.json +6 -0
  46. package/BreadcrumbsListItemWrapper/index.d.ts +10 -0
  47. package/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.js +4 -4
  48. package/BreadcrumbsListItemWrapper/index.js.map +7 -0
  49. package/{AutoCompleteInputTypeahead → BreadcrumbsListItemWrapper}/package.json +1 -1
  50. package/Button/index.js +2 -0
  51. package/Button/index.js.map +2 -2
  52. package/{ButtonLink → ButtonLinkBase}/index.d.ts +4 -4
  53. package/ButtonLinkBase/index.js +27 -0
  54. package/ButtonLinkBase/index.js.map +7 -0
  55. package/{FooterLink → ButtonLinkBase}/package.json +1 -1
  56. package/CallToActionBase/index.d.ts +9 -0
  57. package/{CallToAction → CallToActionBase}/index.js +6 -6
  58. package/CallToActionBase/index.js.map +7 -0
  59. package/{CircularProgress → CallToActionBase}/package.json +1 -1
  60. package/{CircularProgress → CircularProgressBase}/index.d.ts +5 -5
  61. package/{CircularProgress → CircularProgressBase}/index.js +4 -4
  62. package/CircularProgressBase/index.js.map +7 -0
  63. package/CircularProgressBase/package.json +6 -0
  64. package/CopyToClipboardMessage/index.native/index.js +1 -1
  65. package/CopyToClipboardMessage/index.native.d.ts +1 -3
  66. package/CopyToClipboardMessage/index.native.js.map +1 -1
  67. package/DateInputItem/index.native/index.js +1 -1
  68. package/DateInputItem/index.native.d.ts +1 -3
  69. package/DateInputItem/index.native.js.map +1 -1
  70. package/Details/index.native/index.js +1 -1
  71. package/Details/index.native.d.ts +1 -3
  72. package/Details/index.native.js.map +1 -1
  73. package/DetailsContent/index.d.ts +1 -0
  74. package/DetailsContent/index.js +3 -2
  75. package/DetailsContent/index.js.map +2 -2
  76. package/ErrorSummary/index.d.ts +9 -0
  77. package/ErrorSummary/index.js +3 -3
  78. package/ErrorSummary/index.js.map +2 -2
  79. package/FileUpload/index.d.ts +7 -0
  80. package/FileUpload/index.js +12 -4
  81. package/FileUpload/index.js.map +2 -2
  82. package/FileUploadContainer/index.d.ts +7 -0
  83. package/FileUploadContainer/index.js +3 -2
  84. package/FileUploadContainer/index.js.map +2 -2
  85. package/FooterLinkBase/index.d.ts +9 -0
  86. package/FooterLinkBase/index.js +23 -0
  87. package/FooterLinkBase/index.js.map +7 -0
  88. package/{CallToAction → FooterLinkBase}/package.json +1 -1
  89. package/GovGRLogoBase/govgr-logo-base64/package.json +6 -0
  90. package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js.map +1 -1
  91. package/GovGRLogoBase/govgr-logo-blue-base64/package.json +6 -0
  92. package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.js.map +1 -1
  93. package/GovGRLogoBase/index.d.ts +9 -0
  94. package/GovGRLogoBase/index.js +43 -0
  95. package/GovGRLogoBase/index.js.map +7 -0
  96. package/{BackLink → GovGRLogoBase}/package.json +1 -1
  97. package/Grid/index.d.ts +1 -7
  98. package/Grid/index.js +1 -0
  99. package/Grid/index.js.map +2 -2
  100. package/HeaderLogoBase/index.d.ts +19 -0
  101. package/HeaderLogoBase/index.js +33 -0
  102. package/HeaderLogoBase/index.js.map +7 -0
  103. package/HeaderLogoBase/package.json +6 -0
  104. package/HeaderSecondaryLogoBase/index.d.ts +19 -0
  105. package/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.js +7 -7
  106. package/HeaderSecondaryLogoBase/index.js.map +7 -0
  107. package/{BreadcrumbsListItemLink → HeaderSecondaryLogoBase}/package.json +1 -1
  108. package/HeaderTitleBase/index.d.ts +9 -0
  109. package/HeaderTitleBase/index.js +24 -0
  110. package/HeaderTitleBase/index.js.map +7 -0
  111. package/HeaderTitleBase/package.json +6 -0
  112. package/LinkBase/index.js +1 -0
  113. package/LinkBase/index.js.map +2 -2
  114. package/{NavListItemAction → NavListItemActionBase}/index.d.ts +6 -6
  115. package/{NavListItemAction → NavListItemActionBase}/index.js +6 -6
  116. package/NavListItemActionBase/index.js.map +7 -0
  117. package/NavListItemActionBase/package.json +6 -0
  118. package/NavListItemActionContainer/index.native/index.js +1 -1
  119. package/NavListItemActionContainer/index.native.d.ts +0 -2
  120. package/NavListItemActionContainer/index.native.js.map +1 -1
  121. package/{NavListItemLink → NavListItemLinkBase}/index.d.ts +4 -4
  122. package/{NavListItemLink → NavListItemLinkBase}/index.js +6 -6
  123. package/NavListItemLinkBase/index.js.map +7 -0
  124. package/{BreadcrumbsListItem → NavListItemLinkBase}/package.json +1 -1
  125. package/NotificationBannerContainer/index.d.ts +2 -1
  126. package/NotificationBannerContainer/index.js.map +2 -2
  127. package/NotificationBannerContent/index.d.ts +22 -0
  128. package/NotificationBannerContent/index.js +14 -3
  129. package/NotificationBannerContent/index.js.map +2 -2
  130. package/NotificationBannerLink/index.native/index.js +1 -1
  131. package/NotificationBannerLink/index.native.d.ts +1 -3
  132. package/NotificationBannerLink/index.native.js.map +1 -1
  133. package/Skeleton/index.js +2 -1
  134. package/Skeleton/index.js.map +2 -2
  135. package/SummaryList/index.d.ts +10 -2
  136. package/SummaryList/index.js +10 -2
  137. package/SummaryList/index.js.map +2 -2
  138. package/SummaryListItem/index.js +1 -1
  139. package/SummaryListItem/index.js.map +2 -2
  140. package/SummaryListItemKey/index.d.ts +14 -0
  141. package/SummaryListItemKey/index.js +14 -2
  142. package/SummaryListItemKey/index.js.map +2 -2
  143. package/SummaryListItemValue/index.d.ts +14 -0
  144. package/SummaryListItemValue/index.js +11 -2
  145. package/SummaryListItemValue/index.js.map +2 -2
  146. package/Table/index.d.ts +9 -0
  147. package/Table/index.js +4 -1
  148. package/Table/index.js.map +2 -2
  149. package/TableDataCell/index.d.ts +22 -0
  150. package/TableDataCell/index.js +18 -2
  151. package/TableDataCell/index.js.map +2 -2
  152. package/TextArea/index.native/index.js +1 -1
  153. package/TextArea/index.native.d.ts +1 -3
  154. package/TextArea/index.native.js.map +1 -1
  155. package/TextInput/index.native/index.js +1 -1
  156. package/TextInput/index.native.d.ts +1 -3
  157. package/TextInput/index.native.js.map +1 -1
  158. package/Typography/index.d.ts +1 -1
  159. package/Typography/index.js +15 -17
  160. package/Typography/index.js.map +2 -2
  161. package/WarningText/index.d.ts +7 -0
  162. package/WarningText/index.js +10 -2
  163. package/WarningText/index.js.map +2 -2
  164. package/cjs/Accordion/index.js +5 -35
  165. package/cjs/Accordion/index.js.map +3 -3
  166. package/cjs/{utils/extend.native → Accordion/index.native}/index.js +22 -16
  167. package/cjs/Accordion/index.native.js.map +7 -0
  168. package/cjs/{ButtonLink → Accordion/index.web}/index.js +24 -16
  169. package/cjs/Accordion/index.web.js.map +7 -0
  170. package/cjs/AccordionSection/index.js +5 -21
  171. package/cjs/AccordionSection/index.js.map +3 -3
  172. package/cjs/{CheckboxItemInput → AccordionSection}/index.native/index.js +13 -12
  173. package/cjs/AccordionSection/index.native.js.map +7 -0
  174. package/cjs/{HeaderTitle → AccordionSection/index.web}/index.js +11 -12
  175. package/cjs/AccordionSection/index.web.js.map +7 -0
  176. package/cjs/AccordionSectionSummaryHeading/index.js +5 -3
  177. package/cjs/AccordionSectionSummaryHeading/index.js.map +2 -2
  178. package/cjs/BackLinkBase/index.js +62 -0
  179. package/cjs/BackLinkBase/index.js.map +7 -0
  180. package/cjs/BannerContainer/index.js +1 -1
  181. package/cjs/BannerContainer/index.js.map +2 -2
  182. package/cjs/Base/compat/Input/CheckboxInput.native.js.map +2 -2
  183. package/cjs/Base/compat/Input/RadioInput.native.js.map +2 -2
  184. package/cjs/Base/compat/details.native/index.js +2 -1
  185. package/cjs/Base/compat/details.native.js.map +2 -2
  186. package/cjs/Base/index.native.js.map +2 -2
  187. package/cjs/Base/index.web.js.map +1 -1
  188. package/cjs/Base/mapping.native.js.map +2 -2
  189. package/cjs/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.js +10 -11
  190. package/cjs/BreadcrumbsListItemLinkBase/index.js.map +7 -0
  191. package/cjs/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.js +8 -8
  192. package/cjs/BreadcrumbsListItemWrapper/index.js.map +7 -0
  193. package/cjs/Button/index.js +2 -0
  194. package/cjs/Button/index.js.map +2 -2
  195. package/cjs/ButtonLinkBase/index.js +60 -0
  196. package/cjs/ButtonLinkBase/index.js.map +7 -0
  197. package/cjs/{CallToAction → CallToActionBase}/index.js +10 -10
  198. package/cjs/CallToActionBase/index.js.map +7 -0
  199. package/cjs/{CircularProgress → CircularProgressBase}/index.js +8 -8
  200. package/cjs/CircularProgressBase/index.js.map +7 -0
  201. package/cjs/CopyToClipboardMessage/index.native/index.js +2 -2
  202. package/cjs/CopyToClipboardMessage/index.native.js.map +2 -2
  203. package/cjs/DateInputItem/index.native/index.js +2 -2
  204. package/cjs/DateInputItem/index.native.js.map +2 -2
  205. package/cjs/Details/index.native/index.js +2 -2
  206. package/cjs/Details/index.native.js.map +2 -2
  207. package/cjs/DetailsContent/index.js +3 -2
  208. package/cjs/DetailsContent/index.js.map +2 -2
  209. package/cjs/ErrorSummary/index.js +3 -3
  210. package/cjs/ErrorSummary/index.js.map +2 -2
  211. package/cjs/FileUpload/index.js +12 -4
  212. package/cjs/FileUpload/index.js.map +2 -2
  213. package/cjs/FileUploadContainer/index.js +3 -2
  214. package/cjs/FileUploadContainer/index.js.map +2 -2
  215. package/cjs/FooterLinkBase/index.js +56 -0
  216. package/cjs/FooterLinkBase/index.js.map +7 -0
  217. package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js.map +1 -1
  218. package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.js.map +1 -1
  219. package/cjs/{GovGRLogo → GovGRLogoBase}/index.js +41 -43
  220. package/cjs/GovGRLogoBase/index.js.map +7 -0
  221. package/cjs/Grid/index.js +1 -0
  222. package/cjs/Grid/index.js.map +2 -2
  223. package/cjs/{HeaderSecondaryLogo → HeaderLogoBase}/index.js +12 -12
  224. package/cjs/HeaderLogoBase/index.js.map +7 -0
  225. package/cjs/HeaderSecondaryLogoBase/index.js +66 -0
  226. package/cjs/HeaderSecondaryLogoBase/index.js.map +7 -0
  227. package/cjs/HeaderTitleBase/index.js +57 -0
  228. package/cjs/HeaderTitleBase/index.js.map +7 -0
  229. package/cjs/LinkBase/index.js +1 -0
  230. package/cjs/LinkBase/index.js.map +2 -2
  231. package/cjs/{NavListItemAction → NavListItemActionBase}/index.js +10 -10
  232. package/cjs/NavListItemActionBase/index.js.map +7 -0
  233. package/cjs/NavListItemActionContainer/index.native/index.js +2 -2
  234. package/cjs/NavListItemActionContainer/index.native.js.map +2 -2
  235. package/cjs/{NavListItemLink → NavListItemLinkBase}/index.js +10 -10
  236. package/cjs/NavListItemLinkBase/index.js.map +7 -0
  237. package/cjs/NotificationBannerContainer/index.js.map +2 -2
  238. package/cjs/NotificationBannerContent/index.js +14 -3
  239. package/cjs/NotificationBannerContent/index.js.map +2 -2
  240. package/cjs/NotificationBannerLink/index.native/index.js +2 -2
  241. package/cjs/NotificationBannerLink/index.native.js.map +2 -2
  242. package/cjs/Skeleton/index.js +2 -1
  243. package/cjs/Skeleton/index.js.map +2 -2
  244. package/cjs/SummaryList/index.js +10 -2
  245. package/cjs/SummaryList/index.js.map +2 -2
  246. package/cjs/SummaryListItem/index.js +1 -1
  247. package/cjs/SummaryListItem/index.js.map +2 -2
  248. package/cjs/SummaryListItemKey/index.js +14 -2
  249. package/cjs/SummaryListItemKey/index.js.map +3 -3
  250. package/cjs/SummaryListItemValue/index.js +11 -2
  251. package/cjs/SummaryListItemValue/index.js.map +3 -3
  252. package/cjs/Table/index.js +4 -1
  253. package/cjs/Table/index.js.map +2 -2
  254. package/cjs/TableDataCell/index.js +18 -2
  255. package/cjs/TableDataCell/index.js.map +3 -3
  256. package/cjs/TextArea/index.native/index.js +2 -2
  257. package/cjs/TextArea/index.native.js.map +2 -2
  258. package/cjs/TextInput/index.native/index.js +2 -2
  259. package/cjs/TextInput/index.native.js.map +2 -2
  260. package/cjs/Typography/index.js +15 -17
  261. package/cjs/Typography/index.js.map +2 -2
  262. package/cjs/WarningText/index.js +10 -2
  263. package/cjs/WarningText/index.js.map +2 -2
  264. package/cjs/index.js +24 -26
  265. package/cjs/index.js.map +2 -2
  266. package/cjs/lazy/index.js +15 -16
  267. package/cjs/lazy.js.map +2 -2
  268. package/cjs/registry/index.js +40 -38
  269. package/cjs/registry.js.map +2 -2
  270. package/cjs/utils/index.native/index.js +86 -0
  271. package/cjs/utils/index.native.js.map +7 -0
  272. package/index.d.ts +12 -13
  273. package/index.js +13 -14
  274. package/index.js.map +2 -2
  275. package/lazy/index.js +15 -16
  276. package/package.json +5 -5
  277. package/registry/index.js +40 -38
  278. package/src/Accordion/__snapshots__/index.test.tsx.snap +48 -0
  279. package/src/Accordion/index.native.tsx +19 -0
  280. package/src/Accordion/index.test.tsx +24 -0
  281. package/src/Accordion/index.tsx +2 -71
  282. package/src/Accordion/index.web.tsx +71 -0
  283. package/src/AccordionSection/index.native.tsx +18 -0
  284. package/src/AccordionSection/index.tsx +2 -28
  285. package/src/AccordionSection/index.web.tsx +27 -0
  286. package/src/AccordionSectionSummaryHeading/__snapshots__/index.test.tsx.snap +17 -0
  287. package/src/AccordionSectionSummaryHeading/index.test.tsx +9 -0
  288. package/src/AccordionSectionSummaryHeading/index.tsx +12 -4
  289. package/src/AdminAside/__snapshots__/index.test.tsx.snap +1 -1
  290. package/src/AdminContainer/__snapshots__/index.test.tsx.snap +2 -2
  291. package/src/AdminMain/__snapshots__/index.test.tsx.snap +1 -1
  292. package/src/AdminTopSection/__snapshots__/index.test.tsx.snap +1 -1
  293. package/src/Aside/__snapshots__/index.test.tsx.snap +1 -1
  294. package/src/{BackLink → BackLinkBase}/__snapshots__/index.test.tsx.snap +2 -2
  295. package/src/BackLinkBase/index.test.tsx +15 -0
  296. package/src/BackLinkBase/index.tsx +36 -0
  297. package/src/BannerContainer/__snapshots__/index.test.tsx.snap +1 -1
  298. package/src/BannerContainer/index.tsx +1 -1
  299. package/src/Base/compat/Input/CheckboxInput.native.tsx +2 -6
  300. package/src/Base/compat/Input/RadioInput.native.tsx +2 -6
  301. package/src/Base/compat/details.native.tsx +3 -1
  302. package/src/Base/index.native.tsx +2 -2
  303. package/src/Base/index.web.tsx +2 -2
  304. package/src/Base/mapping.native.tsx +1 -1
  305. package/src/BottomInfo/__snapshots__/index.test.tsx.snap +1 -1
  306. package/src/BottomInfoContainer/__snapshots__/index.test.tsx.snap +1 -1
  307. package/src/BottomInfoContent/__snapshots__/index.test.tsx.snap +1 -1
  308. package/src/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/__snapshots__/index.test.tsx.snap +4 -4
  309. package/src/BreadcrumbsListItemLinkBase/index.test.tsx +18 -0
  310. package/src/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.tsx +10 -11
  311. package/src/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.test.tsx +1 -1
  312. package/src/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.tsx +5 -5
  313. package/src/Button/index.tsx +2 -0
  314. package/src/{ButtonLink → ButtonLinkBase}/__snapshots__/index.test.tsx.snap +22 -22
  315. package/src/ButtonLinkBase/index.test.tsx +75 -0
  316. package/src/ButtonLinkBase/index.tsx +55 -0
  317. package/src/{CallToAction → CallToActionBase}/__snapshots__/index.test.tsx.snap +1 -1
  318. package/src/CallToActionBase/index.test.tsx +10 -0
  319. package/src/{CallToAction → CallToActionBase}/index.tsx +10 -8
  320. package/src/Checkbox/__snapshots__/index.test.tsx.snap +0 -5
  321. package/src/CheckboxConditional/__snapshots__/index.test.tsx.snap +1 -1
  322. package/src/CheckboxItem/__snapshots__/index.test.tsx.snap +0 -4
  323. package/src/{CircularProgress → CircularProgressBase}/__snapshots__/index.test.tsx.snap +6 -6
  324. package/src/CircularProgressBase/index.test.tsx +38 -0
  325. package/src/{CircularProgress → CircularProgressBase}/index.tsx +7 -7
  326. package/src/Container/__snapshots__/index.test.tsx.snap +3 -3
  327. package/src/CopyToClipboardMessage/index.native.tsx +1 -1
  328. package/src/DateInputItem/index.native.tsx +1 -1
  329. package/src/Details/index.native.tsx +1 -1
  330. package/src/DetailsContent/index.tsx +11 -2
  331. package/src/ErrorSummary/index.tsx +17 -4
  332. package/src/FieldContainer/__snapshots__/index.test.tsx.snap +3 -3
  333. package/src/FileUpload/index.tsx +20 -4
  334. package/src/FileUploadContainer/index.tsx +10 -1
  335. package/src/FooterContainer/__snapshots__/index.test.tsx.snap +1 -1
  336. package/src/{FooterLink → FooterLinkBase}/__snapshots__/index.test.tsx.snap +2 -2
  337. package/src/FooterLinkBase/index.test.tsx +16 -0
  338. package/src/FooterLinkBase/index.tsx +27 -0
  339. package/src/{GovGRLogo → GovGRLogoBase}/__snapshots__/index.test.tsx.snap +1 -1
  340. package/src/GovGRLogoBase/index.test.tsx +8 -0
  341. package/src/GovGRLogoBase/index.tsx +43 -0
  342. package/src/Grid/__snapshots__/index.test.tsx.snap +8 -8
  343. package/src/Grid/index.tsx +2 -7
  344. package/src/{HeaderLogo → HeaderLogoBase}/__snapshots__/index.test.tsx.snap +1 -1
  345. package/src/HeaderLogoBase/index.test.tsx +8 -0
  346. package/src/HeaderLogoBase/index.tsx +44 -0
  347. package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/__snapshots__/index.test.tsx.snap +2 -2
  348. package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.test.tsx +7 -7
  349. package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.tsx +9 -9
  350. package/src/{HeaderTitle → HeaderTitleBase}/__snapshots__/index.test.tsx.snap +2 -2
  351. package/src/HeaderTitleBase/index.test.tsx +17 -0
  352. package/src/HeaderTitleBase/index.tsx +28 -0
  353. package/src/LinkBase/index.tsx +1 -0
  354. package/src/Main/__snapshots__/index.test.tsx.snap +1 -1
  355. package/src/NavListItemActionBase/__snapshots__/index.test.tsx.snap +101 -0
  356. package/src/NavListItemActionBase/index.test.tsx +42 -0
  357. package/src/{NavListItemAction → NavListItemActionBase}/index.tsx +13 -12
  358. package/src/NavListItemActionContainer/index.native.tsx +1 -1
  359. package/src/{NavListItemLink → NavListItemLinkBase}/__snapshots__/index.test.tsx.snap +5 -5
  360. package/src/NavListItemLinkBase/index.test.tsx +41 -0
  361. package/src/{NavListItemLink → NavListItemLinkBase}/index.tsx +8 -9
  362. package/src/NavMenuContainer/__snapshots__/index.test.tsx.snap +4 -4
  363. package/src/NavMenuContent/__snapshots__/index.test.tsx.snap +1 -1
  364. package/src/NavMenuTitle/__snapshots__/index.test.tsx.snap +1 -1
  365. package/src/NotificationBannerContainer/index.tsx +2 -1
  366. package/src/NotificationBannerContent/index.tsx +50 -4
  367. package/src/NotificationBannerLink/index.native.tsx +1 -1
  368. package/src/RadioConditional/__snapshots__/index.test.tsx.snap +1 -1
  369. package/src/RadioItem/__snapshots__/index.test.tsx.snap +0 -4
  370. package/src/Skeleton/index.tsx +3 -2
  371. package/src/SummaryList/__snapshots__/index.test.tsx.snap +36 -0
  372. package/src/SummaryList/index.test.tsx +15 -0
  373. package/src/SummaryList/index.tsx +20 -3
  374. package/src/SummaryListItem/index.tsx +1 -1
  375. package/src/SummaryListItemKey/__snapshots__/index.test.tsx.snap +70 -0
  376. package/src/SummaryListItemKey/index.test.tsx +29 -0
  377. package/src/SummaryListItemKey/index.tsx +29 -1
  378. package/src/SummaryListItemValue/__snapshots__/index.test.tsx.snap +34 -0
  379. package/src/SummaryListItemValue/index.test.tsx +14 -0
  380. package/src/SummaryListItemValue/index.tsx +30 -2
  381. package/src/Table/index.tsx +12 -0
  382. package/src/TableDataCell/__snapshots__/index.test.tsx.snap +79 -2
  383. package/src/TableDataCell/index.test.tsx +42 -0
  384. package/src/TableDataCell/index.tsx +56 -1
  385. package/src/TableRow/__snapshots__/index.test.tsx.snap +1 -1
  386. package/src/TableRow/index.test.tsx +1 -1
  387. package/src/TextArea/index.native.tsx +1 -1
  388. package/src/TextInput/index.native.tsx +1 -1
  389. package/src/Typography/index.tsx +21 -20
  390. package/src/WarningText/__snapshots__/index.test.tsx.snap +26 -0
  391. package/src/WarningText/index.test.tsx +5 -0
  392. package/src/WarningText/index.tsx +17 -2
  393. package/src/index.ts +12 -13
  394. package/src/lazy.js +15 -16
  395. package/src/registry.js +40 -38
  396. package/src/utils/index.native.tsx +122 -0
  397. package/utils/index.native/index.js +52 -0
  398. package/utils/index.native/package.json +6 -0
  399. package/utils/index.native.d.ts +43 -0
  400. package/utils/index.native.js.map +7 -0
  401. package/AutoCompleteInputTypeahead/index.d.ts +0 -11
  402. package/AutoCompleteInputTypeahead/index.js +0 -25
  403. package/AutoCompleteInputTypeahead/index.js.map +0 -7
  404. package/BackLink/index.d.ts +0 -9
  405. package/BackLink/index.js +0 -31
  406. package/BackLink/index.js.map +0 -7
  407. package/BreadcrumbsListItem/index.d.ts +0 -10
  408. package/BreadcrumbsListItem/index.js.map +0 -7
  409. package/BreadcrumbsListItemLink/index.js +0 -24
  410. package/BreadcrumbsListItemLink/index.js.map +0 -7
  411. package/ButtonLink/index.js +0 -29
  412. package/ButtonLink/index.js.map +0 -7
  413. package/CallToAction/index.d.ts +0 -9
  414. package/CallToAction/index.js.map +0 -7
  415. package/CheckboxItemInput/index.native/index.js +0 -20
  416. package/CheckboxItemInput/index.native/package.json +0 -6
  417. package/CheckboxItemInput/index.native.d.ts +0 -4
  418. package/CheckboxItemInput/index.native.js.map +0 -7
  419. package/CircularProgress/index.js.map +0 -7
  420. package/FooterLink/index.d.ts +0 -9
  421. package/FooterLink/index.js +0 -25
  422. package/FooterLink/index.js.map +0 -7
  423. package/GovGRLogo/govgr-logo-base64/package.json +0 -6
  424. package/GovGRLogo/govgr-logo-blue-base64/package.json +0 -6
  425. package/GovGRLogo/index.d.ts +0 -9
  426. package/GovGRLogo/index.js +0 -45
  427. package/GovGRLogo/index.js.map +0 -7
  428. package/GovGRLogo/package.json +0 -6
  429. package/HeaderLogo/index.d.ts +0 -19
  430. package/HeaderLogo/index.js +0 -35
  431. package/HeaderLogo/index.js.map +0 -7
  432. package/HeaderLogo/package.json +0 -6
  433. package/HeaderSecondaryLogo/index.d.ts +0 -19
  434. package/HeaderSecondaryLogo/index.js.map +0 -7
  435. package/HeaderSecondaryLogo/package.json +0 -6
  436. package/HeaderTitle/index.d.ts +0 -9
  437. package/HeaderTitle/index.js +0 -24
  438. package/HeaderTitle/index.js.map +0 -7
  439. package/HeaderTitle/package.json +0 -6
  440. package/NavListItemAction/index.js.map +0 -7
  441. package/NavListItemAction/package.json +0 -6
  442. package/NavListItemLink/index.js.map +0 -7
  443. package/NavListItemLink/index.test.d.ts +0 -1
  444. package/NavListItemLink/package.json +0 -6
  445. package/cjs/AutoCompleteInputTypeahead/index.js +0 -58
  446. package/cjs/AutoCompleteInputTypeahead/index.js.map +0 -7
  447. package/cjs/BackLink/index.js +0 -64
  448. package/cjs/BackLink/index.js.map +0 -7
  449. package/cjs/BreadcrumbsListItem/index.js.map +0 -7
  450. package/cjs/BreadcrumbsListItemLink/index.js.map +0 -7
  451. package/cjs/ButtonLink/index.js.map +0 -7
  452. package/cjs/CallToAction/index.js.map +0 -7
  453. package/cjs/CheckboxItemInput/index.native.js.map +0 -7
  454. package/cjs/CircularProgress/index.js.map +0 -7
  455. package/cjs/FooterLink/index.js +0 -58
  456. package/cjs/FooterLink/index.js.map +0 -7
  457. package/cjs/GovGRLogo/index.js.map +0 -7
  458. package/cjs/HeaderLogo/index.js +0 -68
  459. package/cjs/HeaderLogo/index.js.map +0 -7
  460. package/cjs/HeaderSecondaryLogo/index.js.map +0 -7
  461. package/cjs/HeaderTitle/index.js.map +0 -7
  462. package/cjs/NavListItemAction/index.js.map +0 -7
  463. package/cjs/NavListItemLink/index.js.map +0 -7
  464. package/cjs/utils/extend.native.js.map +0 -7
  465. package/src/AutoCompleteInputTypeahead/__snapshots__/index.test.tsx.snap +0 -16
  466. package/src/AutoCompleteInputTypeahead/index.test.tsx +0 -8
  467. package/src/AutoCompleteInputTypeahead/index.tsx +0 -32
  468. package/src/BackLink/index.test.tsx +0 -13
  469. package/src/BackLink/index.tsx +0 -35
  470. package/src/BreadcrumbsListItemLink/index.test.tsx +0 -16
  471. package/src/ButtonLink/index.test.tsx +0 -69
  472. package/src/ButtonLink/index.tsx +0 -54
  473. package/src/CallToAction/index.test.tsx +0 -10
  474. package/src/CheckboxItemInput/index.native.tsx +0 -17
  475. package/src/CircularProgress/index.test.tsx +0 -34
  476. package/src/FooterLink/index.test.tsx +0 -14
  477. package/src/FooterLink/index.tsx +0 -26
  478. package/src/GovGRLogo/index.test.tsx +0 -8
  479. package/src/GovGRLogo/index.tsx +0 -42
  480. package/src/HeaderLogo/index.test.tsx +0 -8
  481. package/src/HeaderLogo/index.tsx +0 -43
  482. package/src/HeaderTitle/index.test.tsx +0 -16
  483. package/src/HeaderTitle/index.tsx +0 -28
  484. package/src/NavListItemAction/__snapshots__/index.test.tsx.snap +0 -13
  485. package/src/NavListItemAction/index.test.tsx +0 -11
  486. package/src/NavListItemLink/index.test.tsx +0 -39
  487. package/src/utils/extend.native.tsx +0 -36
  488. package/utils/extend.native/index.js +0 -14
  489. package/utils/extend.native/package.json +0 -6
  490. package/utils/extend.native.d.ts +0 -23
  491. package/utils/extend.native.js.map +0 -7
  492. /package/{AutoCompleteInputTypeahead → BackLinkBase}/index.test.d.ts +0 -0
  493. /package/{BackLink → BreadcrumbsListItemLinkBase}/index.test.d.ts +0 -0
  494. /package/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.test.d.ts +0 -0
  495. /package/{BreadcrumbsListItemLink → ButtonLinkBase}/index.test.d.ts +0 -0
  496. /package/{ButtonLink → CallToActionBase}/index.test.d.ts +0 -0
  497. /package/{CallToAction → CircularProgressBase}/index.test.d.ts +0 -0
  498. /package/{CircularProgress → FooterLinkBase}/index.test.d.ts +0 -0
  499. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64/index.js +0 -0
  500. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.d.ts +0 -0
  501. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64/index.js +0 -0
  502. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.d.ts +0 -0
  503. /package/{FooterLink → GovGRLogoBase}/index.test.d.ts +0 -0
  504. /package/{GovGRLogo → HeaderLogoBase}/index.test.d.ts +0 -0
  505. /package/{HeaderLogo → HeaderSecondaryLogoBase}/index.test.d.ts +0 -0
  506. /package/{HeaderSecondaryLogo → HeaderTitleBase}/index.test.d.ts +0 -0
  507. /package/{HeaderTitle → NavListItemActionBase}/index.test.d.ts +0 -0
  508. /package/{NavListItemAction → NavListItemLinkBase}/index.test.d.ts +0 -0
  509. /package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64/index.js +0 -0
  510. /package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64/index.js +0 -0
  511. /package/src/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/__snapshots__/index.test.tsx.snap +0 -0
  512. /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js +0 -0
  513. /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.ts +0 -0
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import clsx from 'clsx';
3
+ import logo from '@digigov/react-core/GovGRLogoBase/govgr-logo-base64';
4
+ import logoInverted from '@digigov/react-core/GovGRLogoBase/govgr-logo-blue-base64';
5
+ import { LinkBase, LinkBaseProps } from '@digigov/react-core/LinkBase';
6
+ export interface GovGRLogoBaseProps extends LinkBaseProps {}
7
+ /**
8
+ * Use this component anywhere you what to provide the gov.gr logo.
9
+ * */
10
+ export const GovGRLogoBase = React.forwardRef<
11
+ HTMLAnchorElement,
12
+ GovGRLogoBaseProps
13
+ >(function GovGRLogoBase(
14
+ { href = 'https://www.gov.gr/', className, ...props },
15
+ ref
16
+ ) {
17
+ return (
18
+ <LinkBase
19
+ href={href}
20
+ ref={ref}
21
+ defaultStyle={false}
22
+ className={clsx(className, { 'ds-header__link': true })}
23
+ {...props}
24
+ >
25
+ <img
26
+ src={logo}
27
+ className={clsx(className, {
28
+ 'ds-header__logo': true,
29
+ })}
30
+ alt="gov.gr logo"
31
+ />
32
+ <img
33
+ src={logoInverted}
34
+ className={clsx(className, {
35
+ 'ds-header__logo-inverted': true,
36
+ })}
37
+ alt="gov.gr logo"
38
+ />
39
+ </LinkBase>
40
+ );
41
+ });
42
+
43
+ export default GovGRLogoBase;
@@ -4,7 +4,7 @@ exports[`renders the Grid with \`container\` props 1`] = `
4
4
  <body>
5
5
  <div>
6
6
  <div
7
- class="ds-grid"
7
+ class="ds-grid ds-grid-item"
8
8
  >
9
9
  hello
10
10
  </div>
@@ -16,7 +16,7 @@ exports[`renders the Grid with \`inline\` props 1`] = `
16
16
  <body>
17
17
  <div>
18
18
  <div
19
- class=""
19
+ class="ds-grid-item"
20
20
  >
21
21
  hello
22
22
  </div>
@@ -28,7 +28,7 @@ exports[`renders the Grid with \`lg\` props 1`] = `
28
28
  <body>
29
29
  <div>
30
30
  <div
31
- class="lg:ds-grid__col-span-6"
31
+ class="ds-grid-item lg:ds-grid__col-span-6"
32
32
  >
33
33
  hello
34
34
  </div>
@@ -40,7 +40,7 @@ exports[`renders the Grid with \`md\` props 1`] = `
40
40
  <body>
41
41
  <div>
42
42
  <div
43
- class="md:ds-grid__col-span-6"
43
+ class="ds-grid-item md:ds-grid__col-span-6"
44
44
  >
45
45
  hello
46
46
  </div>
@@ -52,7 +52,7 @@ exports[`renders the Grid with \`sm\` props 1`] = `
52
52
  <body>
53
53
  <div>
54
54
  <div
55
- class="sm:ds-grid__col-span-6"
55
+ class="ds-grid-item sm:ds-grid__col-span-6"
56
56
  >
57
57
  hello
58
58
  </div>
@@ -64,7 +64,7 @@ exports[`renders the Grid with \`spacing\` props 1`] = `
64
64
  <body>
65
65
  <div>
66
66
  <div
67
- class=""
67
+ class="ds-grid-item"
68
68
  >
69
69
  hello
70
70
  </div>
@@ -76,7 +76,7 @@ exports[`renders the Grid with \`xl\` props 1`] = `
76
76
  <body>
77
77
  <div>
78
78
  <div
79
- class="xl:ds-grid__col-span-6"
79
+ class="ds-grid-item xl:ds-grid__col-span-6"
80
80
  >
81
81
  hello
82
82
  </div>
@@ -88,7 +88,7 @@ exports[`renders the Grid with no props 1`] = `
88
88
  <body>
89
89
  <div>
90
90
  <div
91
- class=""
91
+ class="ds-grid-item"
92
92
  >
93
93
  hello
94
94
  </div>
@@ -32,13 +32,7 @@ export interface GridProps extends BaseProps<'div' | 'aside' | 'main'> {
32
32
  inline?: boolean;
33
33
  /**
34
34
  * Defines the space between the type item components. It can only be used on a type container component.
35
- * @value 1
36
- * @value 2
37
- * @value 4
38
- * @value 6
39
- * @value 8
40
- * @value 10
41
- * @value 12
35
+ * @value 1 - 12
42
36
  * @value object
43
37
  * @default undefined
44
38
  */
@@ -112,6 +106,7 @@ export const Grid = React.forwardRef<HTMLElement, GridProps>(function Grid(
112
106
  ref={ref}
113
107
  className={clsx(className, {
114
108
  'ds-grid': container,
109
+ 'ds-grid-item': item,
115
110
  'ds-grid-inline': container && inline,
116
111
  [`ds-gap-${spacing}`]: container && typeof spacing === 'number',
117
112
  [`ds-gap-xs-${(spacing as SpacingMediaValues)?.xs}`]:
@@ -1,6 +1,6 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`renders the HeaderLogo with no props 1`] = `
3
+ exports[`renders the HeaderLogoBase with no props 1`] = `
4
4
  <body>
5
5
  <div>
6
6
  <a
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { render } from '@testing-library/react';
3
+
4
+ import HeaderLogoBase from '@digigov/react-core/HeaderLogoBase';
5
+
6
+ it('renders the HeaderLogoBase with no props', () => {
7
+ expect(render(<HeaderLogoBase />).baseElement).toMatchSnapshot();
8
+ });
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import clsx from 'clsx';
3
+ import { LinkBase, LinkBaseProps } from '@digigov/react-core/LinkBase';
4
+
5
+ export interface HeaderLogoBaseProps extends LinkBaseProps {
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 HeaderLogoBase = React.forwardRef<
21
+ HTMLAnchorElement,
22
+ HeaderLogoBaseProps
23
+ >(function HeaderLogoBase({ href, src, altText, className, ...props }, ref) {
24
+ return (
25
+ <LinkBase
26
+ href={href}
27
+ ref={ref}
28
+ defaultStyle={false}
29
+ className={clsx(className, {
30
+ 'ds-header__link': true,
31
+ })}
32
+ {...props}
33
+ >
34
+ <img
35
+ src={src}
36
+ className={clsx(className, {
37
+ 'ds-header__logo': true,
38
+ })}
39
+ alt={altText}
40
+ />
41
+ </LinkBase>
42
+ );
43
+ });
44
+ export default HeaderLogoBase;
@@ -1,6 +1,6 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`renders the HeaderSecondaryLogo with src and alt 1`] = `
3
+ exports[`renders the HeaderSecondaryLogoBase with src and alt 1`] = `
4
4
  <body>
5
5
  <div>
6
6
  <a
@@ -16,7 +16,7 @@ exports[`renders the HeaderSecondaryLogo with src and alt 1`] = `
16
16
  </body>
17
17
  `;
18
18
 
19
- exports[`renders the HeaderSecondaryLogo with src, href and alt 1`] = `
19
+ exports[`renders the HeaderSecondaryLogoBase with src, href and alt 1`] = `
20
20
  <body>
21
21
  <div>
22
22
  <a
@@ -1,26 +1,26 @@
1
1
  import React from 'react';
2
2
  import { render } from '@testing-library/react';
3
3
 
4
- import HeaderSecondaryLogo from '@digigov/react-core/HeaderSecondaryLogo';
4
+ import HeaderSecondaryLogoBase from '@digigov/react-core/HeaderSecondaryLogoBase';
5
5
 
6
- it('renders the HeaderSecondaryLogo with src and alt', () => {
6
+ it('renders the HeaderSecondaryLogoBase with src and alt', () => {
7
7
  expect(
8
8
  render(
9
- <HeaderSecondaryLogo
9
+ <HeaderSecondaryLogoBase
10
10
  src="https://dilosi.services.gov.gr/minedu-logo.svg"
11
11
  altText="minedu logo"
12
- ></HeaderSecondaryLogo>
12
+ ></HeaderSecondaryLogoBase>
13
13
  ).baseElement
14
14
  ).toMatchSnapshot();
15
15
  });
16
- it('renders the HeaderSecondaryLogo with src, href and alt', () => {
16
+ it('renders the HeaderSecondaryLogoBase with src, href and alt', () => {
17
17
  expect(
18
18
  render(
19
- <HeaderSecondaryLogo
19
+ <HeaderSecondaryLogoBase
20
20
  src="https://dilosi.services.gov.gr/minedu-logo.svg"
21
21
  href="https://www.minedu.gov.gr/"
22
22
  altText="minedu logo"
23
- ></HeaderSecondaryLogo>
23
+ ></HeaderSecondaryLogoBase>
24
24
  ).baseElement
25
25
  ).toMatchSnapshot();
26
26
  });
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
3
+ import { LinkBase, LinkBaseProps } from '@digigov/react-core/LinkBase';
4
4
 
5
- export interface HeaderSecondaryLogoProps extends BaseProps<'a'> {
5
+ export interface HeaderSecondaryLogoBaseProps extends LinkBaseProps {
6
6
  /**
7
7
  * src is needed to provide the url that we get the logo from.
8
8
 
@@ -17,18 +17,18 @@ export interface HeaderSecondaryLogoProps extends BaseProps<'a'> {
17
17
  /**
18
18
  * HeaderSecondaryLogo is used inside Header for providing additional logos.
19
19
  */
20
- export const HeaderSecondaryLogo = React.forwardRef<
20
+ export const HeaderSecondaryLogoBase = React.forwardRef<
21
21
  HTMLAnchorElement,
22
- HeaderSecondaryLogoProps
23
- >(function HeaderSecondaryLogo(
22
+ HeaderSecondaryLogoBaseProps
23
+ >(function HeaderSecondaryLogoBase(
24
24
  { href, src, altText, className, ...props },
25
25
  ref
26
26
  ) {
27
27
  return (
28
- <Base
29
- as="a"
28
+ <LinkBase
30
29
  href={href}
31
30
  ref={ref}
31
+ defaultStyle={false}
32
32
  className={clsx(className, {
33
33
  'ds-header__link': true,
34
34
  })}
@@ -41,8 +41,8 @@ export const HeaderSecondaryLogo = React.forwardRef<
41
41
  })}
42
42
  alt={altText}
43
43
  />
44
- </Base>
44
+ </LinkBase>
45
45
  );
46
46
  });
47
47
 
48
- export default HeaderSecondaryLogo;
48
+ export default HeaderSecondaryLogoBase;
@@ -1,6 +1,6 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`renders the HeaderTitle with href 1`] = `
3
+ exports[`renders the HeaderTitleBase with href 1`] = `
4
4
  <body>
5
5
  <div>
6
6
  <a
@@ -13,7 +13,7 @@ exports[`renders the HeaderTitle with href 1`] = `
13
13
  </body>
14
14
  `;
15
15
 
16
- exports[`renders the HeaderTitle with no props 1`] = `
16
+ exports[`renders the HeaderTitleBase with no props 1`] = `
17
17
  <body>
18
18
  <div>
19
19
  <a
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { render } from '@testing-library/react';
3
+
4
+ import HeaderTitleBase from '@digigov/react-core/HeaderTitleBase';
5
+
6
+ it('renders the HeaderTitleBase with no props', () => {
7
+ expect(
8
+ render(<HeaderTitleBase>hello</HeaderTitleBase>).baseElement
9
+ ).toMatchSnapshot();
10
+ });
11
+ it('renders the HeaderTitleBase with href', () => {
12
+ expect(
13
+ render(
14
+ <HeaderTitleBase href="https://government.gov.gr">hello</HeaderTitleBase>
15
+ ).baseElement
16
+ ).toMatchSnapshot();
17
+ });
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import clsx from 'clsx';
3
+ import { LinkBase, LinkBaseProps } from '@digigov/react-core/LinkBase';
4
+
5
+ export interface HeaderTitleBaseProps extends LinkBaseProps {}
6
+ /**
7
+ * Use this component inside HeaderContent to provide a title to the header.
8
+ */
9
+ export const HeaderTitleBase = React.forwardRef<
10
+ HTMLAnchorElement,
11
+ HeaderTitleBaseProps
12
+ >(function HeaderTitleBase({ href = '/', className, children, ...props }, ref) {
13
+ return (
14
+ <LinkBase
15
+ ref={ref}
16
+ href={href}
17
+ defaultStyle={false}
18
+ className={clsx(className, {
19
+ 'ds-header__title': true,
20
+ })}
21
+ {...props}
22
+ >
23
+ {children}
24
+ </LinkBase>
25
+ );
26
+ });
27
+
28
+ export default HeaderTitleBase;
@@ -35,6 +35,7 @@ export const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(
35
35
  'ds-link': defaultStyle,
36
36
  'ds-link--no-underline': !underline,
37
37
  })}
38
+ {...(props.as && { defaultStyle: defaultStyle, underline: underline })}
38
39
  {...props}
39
40
  >
40
41
  {children}
@@ -4,7 +4,7 @@ exports[`renders the Main with no props 1`] = `
4
4
  <body>
5
5
  <div>
6
6
  <main
7
- class="ds-main xs:ds-grid__col-span-12 md:ds-grid__col-span-8"
7
+ class="ds-main ds-grid-item xs:ds-grid__col-span-12 md:ds-grid__col-span-8"
8
8
  id="main-content"
9
9
  >
10
10
  hello
@@ -0,0 +1,101 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`renders the NavListItemActionBase with arrow and label props 1`] = `
4
+ <body>
5
+ <div>
6
+ <li
7
+ class="ds-nav__list-item"
8
+ >
9
+ <button
10
+ class="ds-print-hidden ds-nav__list-item-btn ds-link"
11
+ >
12
+ hello
13
+ <svg
14
+ aria-hidden="true"
15
+ as="svg"
16
+ class="ds-svg-icon--chevron ds-svg-icon"
17
+ focusable="false"
18
+ viewBox="0 0 24 24"
19
+ >
20
+ <path
21
+ as="path"
22
+ class=""
23
+ d="M22,8.2l-2.3-2.4L12,13.4L4.4,5.8L2,8.2l10,10L22,8.2z"
24
+ />
25
+ </svg>
26
+ </button>
27
+ </li>
28
+ </div>
29
+ </body>
30
+ `;
31
+
32
+ exports[`renders the NavListItemActionBase with arrow, badgeText and label props 1`] = `
33
+ <body>
34
+ <div>
35
+ <li
36
+ class="ds-nav__list-item"
37
+ >
38
+ <button
39
+ badgetext="hello"
40
+ class="ds-print-hidden ds-nav__list-item-btn ds-link"
41
+ >
42
+ hello
43
+ </button>
44
+ <span
45
+ class="ds-nav__list-item-badge"
46
+ >
47
+ hello
48
+ </span>
49
+ </li>
50
+ </div>
51
+ </body>
52
+ `;
53
+
54
+ exports[`renders the NavListItemActionBase with href prop 1`] = `
55
+ <body>
56
+ <div>
57
+ <li
58
+ class="ds-nav__list-item"
59
+ >
60
+ <a
61
+ class="ds-nav__list-item-link ds-link"
62
+ href="/#"
63
+ >
64
+ hello
65
+ </a>
66
+ </li>
67
+ </div>
68
+ </body>
69
+ `;
70
+
71
+ exports[`renders the NavListItemActionBase with label prop 1`] = `
72
+ <body>
73
+ <div>
74
+ <li
75
+ class="ds-nav__list-item"
76
+ >
77
+ <button
78
+ class="ds-print-hidden ds-nav__list-item-btn ds-link"
79
+ >
80
+ hello
81
+ </button>
82
+ </li>
83
+ </div>
84
+ </body>
85
+ `;
86
+
87
+ exports[`renders the NavListItemActionBase with no props 1`] = `
88
+ <body>
89
+ <div>
90
+ <li
91
+ class="ds-nav__list-item"
92
+ >
93
+ <button
94
+ class="ds-print-hidden ds-nav__list-item-btn ds-link"
95
+ >
96
+ hello
97
+ </button>
98
+ </li>
99
+ </div>
100
+ </body>
101
+ `;
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import { render } from '@testing-library/react';
3
+
4
+ import NavListItemActionBase from '@digigov/react-core/NavListItemActionBase';
5
+
6
+ it('renders the NavListItemActionBase with no props', () => {
7
+ expect(
8
+ render(<NavListItemActionBase>hello</NavListItemActionBase>).baseElement
9
+ ).toMatchSnapshot();
10
+ });
11
+
12
+ it('renders the NavListItemActionBase with href prop', () => {
13
+ expect(
14
+ render(<NavListItemActionBase href="/#">hello</NavListItemActionBase>)
15
+ .baseElement
16
+ ).toMatchSnapshot();
17
+ });
18
+
19
+ it('renders the NavListItemActionBase with label prop', () => {
20
+ expect(
21
+ render(<NavListItemActionBase label="hello"></NavListItemActionBase>)
22
+ .baseElement
23
+ ).toMatchSnapshot();
24
+ });
25
+
26
+ it('renders the NavListItemActionBase with arrow and label props', () => {
27
+ expect(
28
+ render(<NavListItemActionBase arrow label="hello"></NavListItemActionBase>)
29
+ .baseElement
30
+ ).toMatchSnapshot();
31
+ });
32
+
33
+ it('renders the NavListItemActionBase with arrow, badgeText and label props', () => {
34
+ expect(
35
+ render(
36
+ <NavListItemActionBase
37
+ badgeText="hello"
38
+ label="hello"
39
+ ></NavListItemActionBase>
40
+ ).baseElement
41
+ ).toMatchSnapshot();
42
+ });
@@ -4,15 +4,16 @@ import NavListItemBadge from '@digigov/react-core/NavListItemBadge';
4
4
  import NavListItemButton, {
5
5
  NavListItemButtonProps,
6
6
  } from '@digigov/react-core/NavListItemButton';
7
- import NavListItemLink, {
8
- NavListItemLinkProps,
9
- } from '@digigov/react-core/NavListItemLink';
7
+ import NavListItemLinkBase, {
8
+ NavListItemLinkBaseProps,
9
+ } from '@digigov/react-core/NavListItemLinkBase';
10
10
 
11
- export type LinkButtonJoinProps = NavListItemLinkProps & NavListItemButtonProps;
12
- export interface NavListItemActionProps extends LinkButtonJoinProps {
11
+ export type LinkButtonJoinProps = NavListItemLinkBaseProps &
12
+ NavListItemButtonProps;
13
+ export interface NavListItemActionBaseProps extends LinkButtonJoinProps {
13
14
  /**
14
15
  * label is optional.
15
- * The label for the NavListItemAction.
16
+ * The label for the NavListItemActionBase.
16
17
  */
17
18
  label?: string;
18
19
 
@@ -30,24 +31,24 @@ export interface NavListItemActionProps extends LinkButtonJoinProps {
30
31
  * NavListItemAction must be inside the NavList.
31
32
  * This component has a items of NavListItemLink component inside.
32
33
  */
33
- export const NavListItemAction = React.forwardRef<
34
+ export const NavListItemActionBase = React.forwardRef<
34
35
  HTMLButtonElement | HTMLAnchorElement,
35
- NavListItemActionProps
36
- >(function NavListItemAction(
36
+ NavListItemActionBaseProps
37
+ >(function NavListItemActionBase(
37
38
  { label, arrow = false, href, className, children, ...props },
38
39
  ref
39
40
  ) {
40
41
  return (
41
42
  <NavListItemActionContainer>
42
43
  {href ? (
43
- <NavListItemLink
44
+ <NavListItemLinkBase
44
45
  {...props}
45
46
  href={href}
46
47
  className={className}
47
48
  ref={ref as ForwardedRef<HTMLAnchorElement>}
48
49
  >
49
50
  {children || label}
50
- </NavListItemLink>
51
+ </NavListItemLinkBase>
51
52
  ) : (
52
53
  <NavListItemButton
53
54
  {...props}
@@ -63,4 +64,4 @@ export const NavListItemAction = React.forwardRef<
63
64
  );
64
65
  });
65
66
 
66
- export default NavListItemAction;
67
+ export default NavListItemActionBase;
@@ -2,7 +2,7 @@ import clsx from 'clsx';
2
2
  import CoreNavListItemActionContainer, {
3
3
  NavListItemActionContainerProps,
4
4
  } from '@digigov/react-core/NavListItemActionContainer/index.web';
5
- import extend from '@digigov/react-core/utils/extend.native';
5
+ import extend from '@digigov/react-core/utils/index.native';
6
6
 
7
7
  export const NavListItemActionContainer = extend<
8
8
  NavListItemActionContainerProps,
@@ -1,6 +1,6 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`renders the NavListItemLink with active=false 1`] = `
3
+ exports[`renders the NavListItemLinkBase with active=false 1`] = `
4
4
  <body>
5
5
  <div>
6
6
  <a
@@ -12,7 +12,7 @@ exports[`renders the NavListItemLink with active=false 1`] = `
12
12
  </body>
13
13
  `;
14
14
 
15
- exports[`renders the NavListItemLink with active=true 1`] = `
15
+ exports[`renders the NavListItemLinkBase with active=true 1`] = `
16
16
  <body>
17
17
  <div>
18
18
  <a
@@ -24,7 +24,7 @@ exports[`renders the NavListItemLink with active=true 1`] = `
24
24
  </body>
25
25
  `;
26
26
 
27
- exports[`renders the NavListItemLink with href and active=false 1`] = `
27
+ exports[`renders the NavListItemLinkBase with href and active=false 1`] = `
28
28
  <body>
29
29
  <div>
30
30
  <a
@@ -37,7 +37,7 @@ exports[`renders the NavListItemLink with href and active=false 1`] = `
37
37
  </body>
38
38
  `;
39
39
 
40
- exports[`renders the NavListItemLink with href and active=true 1`] = `
40
+ exports[`renders the NavListItemLinkBase with href and active=true 1`] = `
41
41
  <body>
42
42
  <div>
43
43
  <a
@@ -50,7 +50,7 @@ exports[`renders the NavListItemLink with href and active=true 1`] = `
50
50
  </body>
51
51
  `;
52
52
 
53
- exports[`renders the NavListItemLink with no props 1`] = `
53
+ exports[`renders the NavListItemLinkBase with no props 1`] = `
54
54
  <body>
55
55
  <div>
56
56
  <a
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { render } from '@testing-library/react';
3
+ import { NavListItemLinkBase } from '@digigov/react-core/NavListItemLinkBase';
4
+
5
+ it('renders the NavListItemLinkBase with no props', () => {
6
+ expect(
7
+ render(<NavListItemLinkBase>hello</NavListItemLinkBase>).baseElement
8
+ ).toMatchSnapshot();
9
+ });
10
+
11
+ it('renders the NavListItemLinkBase with active=true', () => {
12
+ expect(
13
+ render(<NavListItemLinkBase active={true}>hello</NavListItemLinkBase>)
14
+ .baseElement
15
+ ).toMatchSnapshot();
16
+ });
17
+
18
+ it('renders the NavListItemLinkBase with active=false', () => {
19
+ expect(
20
+ render(<NavListItemLinkBase active={false}>hello</NavListItemLinkBase>)
21
+ .baseElement
22
+ ).toMatchSnapshot();
23
+ });
24
+ it('renders the NavListItemLinkBase with href and active=false', () => {
25
+ expect(
26
+ render(
27
+ <NavListItemLinkBase href="/" active={false}>
28
+ hello
29
+ </NavListItemLinkBase>
30
+ ).baseElement
31
+ ).toMatchSnapshot();
32
+ });
33
+ it('renders the NavListItemLinkBase with href and active=true', () => {
34
+ expect(
35
+ render(
36
+ <NavListItemLinkBase href="/" active={false}>
37
+ hello
38
+ </NavListItemLinkBase>
39
+ ).baseElement
40
+ ).toMatchSnapshot();
41
+ });