@digigov/react-core 2.0.0-d57821ba → 2.0.0-daaf7bdf

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 (394) hide show
  1. package/Base/compat/Input/CheckboxInput.native/index.js +33 -0
  2. package/Base/compat/Input/CheckboxInput.native/package.json +6 -0
  3. package/Base/compat/Input/CheckboxInput.native.d.ts +4 -0
  4. package/Base/compat/Input/CheckboxInput.native.js.map +7 -0
  5. package/Base/compat/Input/RadioInput.native/index.js +32 -0
  6. package/Base/compat/Input/RadioInput.native/package.json +6 -0
  7. package/Base/compat/Input/RadioInput.native.d.ts +4 -0
  8. package/Base/compat/Input/RadioInput.native.js.map +7 -0
  9. package/Base/compat/Input/StringInput.native/index.js +99 -0
  10. package/Base/compat/Input/StringInput.native/package.json +6 -0
  11. package/Base/compat/Input/StringInput.native.d.ts +7 -0
  12. package/Base/compat/Input/StringInput.native.js.map +7 -0
  13. package/Base/compat/Input/index.native/index.js +24 -0
  14. package/Base/compat/Input/index.native/package.json +6 -0
  15. package/Base/compat/Input/index.native.d.ts +7 -0
  16. package/Base/compat/Input/index.native.js.map +7 -0
  17. package/Base/compat/button.native/index.js +48 -0
  18. package/Base/compat/button.native/package.json +6 -0
  19. package/Base/compat/button.native.d.ts +5 -0
  20. package/Base/compat/button.native.js.map +7 -0
  21. package/Base/compat/details.native/index.js +40 -0
  22. package/Base/compat/details.native/package.json +6 -0
  23. package/Base/compat/details.native.d.ts +8 -0
  24. package/Base/compat/details.native.js.map +7 -0
  25. package/Base/compat/li.native/index.js +9 -0
  26. package/Base/compat/li.native/package.json +6 -0
  27. package/Base/compat/li.native.d.ts +6 -0
  28. package/Base/compat/li.native.js.map +7 -0
  29. package/Base/compat/ol.native/index.js +33 -0
  30. package/Base/compat/ol.native/package.json +6 -0
  31. package/Base/compat/ol.native.d.ts +6 -0
  32. package/Base/compat/ol.native.js.map +7 -0
  33. package/Base/index.d.ts +2 -95
  34. package/Base/index.js +3 -98
  35. package/Base/index.js.map +3 -3
  36. package/Base/index.native/index.js +160 -0
  37. package/Base/index.native/package.json +6 -0
  38. package/Base/index.native.d.ts +7 -0
  39. package/Base/index.native.js.map +7 -0
  40. package/Base/index.web/index.js +104 -0
  41. package/Base/index.web/package.json +6 -0
  42. package/Base/index.web.d.ts +97 -0
  43. package/Base/index.web.js.map +7 -0
  44. package/Base/mapping.native/index.js +34 -0
  45. package/Base/mapping.native/package.json +6 -0
  46. package/Base/mapping.native.d.ts +6 -0
  47. package/Base/mapping.native.js.map +7 -0
  48. package/Base/utils/index.js +86 -0
  49. package/Base/utils/package.json +6 -0
  50. package/Base/utils.d.ts +41 -0
  51. package/Base/utils.js.map +7 -0
  52. package/Base/wrap.native/index.js +64 -0
  53. package/Base/wrap.native/package.json +6 -0
  54. package/Base/wrap.native.d.ts +2 -0
  55. package/Base/wrap.native.js.map +7 -0
  56. package/CallToAction/index.js +1 -1
  57. package/CallToAction/index.js.map +2 -2
  58. package/Card/index.js +2 -1
  59. package/Card/index.js.map +2 -2
  60. package/CheckboxItem/index.js +4 -16
  61. package/CheckboxItem/index.js.map +2 -2
  62. package/CheckboxItemInput/index.d.ts +2 -0
  63. package/CheckboxItemInput/index.js +6 -0
  64. package/CheckboxItemInput/index.js.map +7 -0
  65. package/CheckboxItemInput/index.native/index.js +20 -0
  66. package/CheckboxItemInput/index.native/package.json +6 -0
  67. package/CheckboxItemInput/index.native.d.ts +4 -0
  68. package/CheckboxItemInput/index.native.js.map +7 -0
  69. package/CheckboxItemInput/index.web/index.js +26 -0
  70. package/CheckboxItemInput/index.web/package.json +6 -0
  71. package/CheckboxItemInput/index.web.d.ts +10 -0
  72. package/CheckboxItemInput/index.web.js.map +7 -0
  73. package/CheckboxItemInput/package.json +6 -0
  74. package/Chip/index.js +2 -1
  75. package/Chip/index.js.map +2 -2
  76. package/CodeBlockContainer/index.d.ts +1 -9
  77. package/CodeBlockContainer/index.js +2 -3
  78. package/CodeBlockContainer/index.js.map +2 -2
  79. package/CodeBlockContent/index.d.ts +1 -1
  80. package/CodeBlockContent/index.js +3 -2
  81. package/CodeBlockContent/index.js.map +2 -2
  82. package/CodeBlockHeader/index.d.ts +1 -1
  83. package/CodeBlockHeader/index.js +1 -3
  84. package/CodeBlockHeader/index.js.map +2 -2
  85. package/CopyToClipboardContainer/index.d.ts +2 -31
  86. package/CopyToClipboardContainer/index.js +3 -40
  87. package/CopyToClipboardContainer/index.js.map +3 -3
  88. package/CopyToClipboardContainer/index.web/index.js +44 -0
  89. package/CopyToClipboardContainer/index.web/package.json +6 -0
  90. package/CopyToClipboardContainer/index.web.d.ts +31 -0
  91. package/CopyToClipboardContainer/index.web.js.map +7 -0
  92. package/CopyToClipboardMessage/index.d.ts +2 -18
  93. package/CopyToClipboardMessage/index.js +3 -21
  94. package/CopyToClipboardMessage/index.js.map +3 -3
  95. package/CopyToClipboardMessage/index.native/index.js +18 -0
  96. package/CopyToClipboardMessage/index.native/package.json +6 -0
  97. package/CopyToClipboardMessage/index.native.d.ts +6 -0
  98. package/CopyToClipboardMessage/index.native.js.map +7 -0
  99. package/CopyToClipboardMessage/index.web/index.js +24 -0
  100. package/CopyToClipboardMessage/index.web/package.json +6 -0
  101. package/CopyToClipboardMessage/index.web.d.ts +18 -0
  102. package/CopyToClipboardMessage/index.web.js.map +7 -0
  103. package/DateInputItem/index.d.ts +2 -26
  104. package/DateInputItem/index.js +3 -41
  105. package/DateInputItem/index.js.map +3 -3
  106. package/DateInputItem/index.native/index.js +17 -0
  107. package/DateInputItem/index.native/package.json +6 -0
  108. package/DateInputItem/index.native.d.ts +4 -0
  109. package/DateInputItem/index.native.js.map +7 -0
  110. package/DateInputItem/index.web/index.js +32 -0
  111. package/DateInputItem/index.web/package.json +6 -0
  112. package/DateInputItem/index.web.d.ts +26 -0
  113. package/DateInputItem/index.web.js.map +7 -0
  114. package/Details/index.d.ts +2 -10
  115. package/Details/index.js +3 -22
  116. package/Details/index.js.map +3 -3
  117. package/Details/index.native/index.js +17 -0
  118. package/Details/index.native/package.json +6 -0
  119. package/Details/index.native.d.ts +4 -0
  120. package/Details/index.native.js.map +7 -0
  121. package/Details/index.web/index.js +25 -0
  122. package/Details/index.web/package.json +6 -0
  123. package/Details/index.web.d.ts +10 -0
  124. package/Details/index.web.js.map +7 -0
  125. package/FieldsetLegend/index.js +1 -4
  126. package/FieldsetLegend/index.js.map +2 -2
  127. package/LabelTitle/index.js +2 -4
  128. package/LabelTitle/index.js.map +2 -2
  129. package/NavListItemActionContainer/index.d.ts +2 -10
  130. package/NavListItemActionContainer/index.js +3 -20
  131. package/NavListItemActionContainer/index.js.map +3 -3
  132. package/NavListItemActionContainer/index.native/index.js +17 -0
  133. package/NavListItemActionContainer/index.native/package.json +6 -0
  134. package/NavListItemActionContainer/index.native.d.ts +7 -0
  135. package/NavListItemActionContainer/index.native.js.map +7 -0
  136. package/NavListItemActionContainer/index.web/index.js +23 -0
  137. package/NavListItemActionContainer/index.web/package.json +6 -0
  138. package/NavListItemActionContainer/index.web.d.ts +10 -0
  139. package/NavListItemActionContainer/index.web.js.map +7 -0
  140. package/NotificationBannerLink/index.d.ts +2 -11
  141. package/NotificationBannerLink/index.js +3 -19
  142. package/NotificationBannerLink/index.js.map +3 -3
  143. package/NotificationBannerLink/index.native/index.js +16 -0
  144. package/NotificationBannerLink/index.native/package.json +6 -0
  145. package/NotificationBannerLink/index.native.d.ts +8 -0
  146. package/NotificationBannerLink/index.native.js.map +7 -0
  147. package/NotificationBannerLink/index.web/index.js +22 -0
  148. package/NotificationBannerLink/index.web/package.json +6 -0
  149. package/NotificationBannerLink/index.web.d.ts +11 -0
  150. package/NotificationBannerLink/index.web.js.map +7 -0
  151. package/PhaseBanner/index.js +2 -1
  152. package/PhaseBanner/index.js.map +2 -2
  153. package/PhaseBannerTag/index.d.ts +2 -2
  154. package/PhaseBannerTag/index.js +1 -1
  155. package/PhaseBannerTag/index.js.map +1 -1
  156. package/PhaseBannerText/index.js +1 -1
  157. package/PhaseBannerText/index.js.map +2 -2
  158. package/RadioItem/index.js +2 -1
  159. package/RadioItem/index.js.map +2 -2
  160. package/SummaryList/index.d.ts +1 -1
  161. package/SummaryList/index.js.map +2 -2
  162. package/SummaryListItemKey/index.d.ts +14 -0
  163. package/SummaryListItemKey/index.js +5 -2
  164. package/SummaryListItemKey/index.js.map +2 -2
  165. package/TextArea/index.d.ts +2 -24
  166. package/TextArea/index.js +3 -27
  167. package/TextArea/index.js.map +3 -3
  168. package/TextArea/index.native/index.js +16 -0
  169. package/TextArea/index.native/package.json +6 -0
  170. package/TextArea/index.native.d.ts +4 -0
  171. package/TextArea/index.native.js.map +7 -0
  172. package/TextArea/index.web/index.js +30 -0
  173. package/TextArea/index.web/package.json +6 -0
  174. package/TextArea/index.web.d.ts +24 -0
  175. package/TextArea/index.web.js.map +7 -0
  176. package/TextInput/index.d.ts +2 -46
  177. package/TextInput/index.js +3 -40
  178. package/TextInput/index.js.map +3 -3
  179. package/TextInput/index.native/index.js +19 -0
  180. package/TextInput/index.native/package.json +6 -0
  181. package/TextInput/index.native.d.ts +4 -0
  182. package/TextInput/index.native.js.map +7 -0
  183. package/TextInput/index.web/index.js +43 -0
  184. package/TextInput/index.web/package.json +6 -0
  185. package/TextInput/index.web.d.ts +46 -0
  186. package/TextInput/index.web.js.map +7 -0
  187. package/Unpurge/index.js +78 -0
  188. package/Unpurge/index.js.map +2 -2
  189. package/WarningText/index.js +7 -12
  190. package/WarningText/index.js.map +2 -2
  191. package/WarningTextAssistive/index.d.ts +15 -0
  192. package/WarningTextAssistive/index.js +23 -0
  193. package/WarningTextAssistive/index.js.map +7 -0
  194. package/WarningTextAssistive/package.json +6 -0
  195. package/cjs/Base/compat/Input/CheckboxInput.native/index.js +66 -0
  196. package/cjs/Base/compat/Input/CheckboxInput.native.js.map +7 -0
  197. package/cjs/Base/compat/Input/RadioInput.native/index.js +65 -0
  198. package/cjs/Base/compat/Input/RadioInput.native.js.map +7 -0
  199. package/cjs/Base/compat/Input/StringInput.native/index.js +129 -0
  200. package/cjs/Base/compat/Input/StringInput.native.js.map +7 -0
  201. package/cjs/Base/compat/Input/index.native/index.js +55 -0
  202. package/cjs/Base/compat/Input/index.native.js.map +7 -0
  203. package/cjs/Base/compat/button.native/index.js +81 -0
  204. package/cjs/Base/compat/button.native.js.map +7 -0
  205. package/cjs/Base/compat/details.native/index.js +65 -0
  206. package/cjs/Base/compat/details.native.js.map +7 -0
  207. package/cjs/Base/compat/li.native/index.js +42 -0
  208. package/cjs/Base/compat/li.native.js.map +7 -0
  209. package/cjs/Base/compat/ol.native/index.js +66 -0
  210. package/cjs/Base/compat/ol.native.js.map +7 -0
  211. package/cjs/Base/index.js +5 -99
  212. package/cjs/Base/index.js.map +3 -3
  213. package/cjs/Base/index.native/index.js +193 -0
  214. package/cjs/Base/index.native.js.map +7 -0
  215. package/cjs/Base/index.web/index.js +137 -0
  216. package/cjs/Base/index.web.js.map +7 -0
  217. package/cjs/Base/mapping.native/index.js +67 -0
  218. package/cjs/Base/mapping.native.js.map +7 -0
  219. package/cjs/Base/utils/index.js +119 -0
  220. package/cjs/Base/utils.js.map +7 -0
  221. package/cjs/Base/wrap.native/index.js +97 -0
  222. package/cjs/Base/wrap.native.js.map +7 -0
  223. package/cjs/CallToAction/index.js +1 -1
  224. package/cjs/CallToAction/index.js.map +2 -2
  225. package/cjs/Card/index.js +2 -1
  226. package/cjs/Card/index.js.map +2 -2
  227. package/cjs/CheckboxItem/index.js +4 -16
  228. package/cjs/CheckboxItem/index.js.map +3 -3
  229. package/cjs/CheckboxItemInput/index.js +40 -0
  230. package/cjs/CheckboxItemInput/index.js.map +7 -0
  231. package/cjs/CheckboxItemInput/index.native/index.js +53 -0
  232. package/cjs/CheckboxItemInput/index.native.js.map +7 -0
  233. package/cjs/CheckboxItemInput/index.web/index.js +59 -0
  234. package/cjs/CheckboxItemInput/index.web.js.map +7 -0
  235. package/cjs/Chip/index.js +2 -1
  236. package/cjs/Chip/index.js.map +2 -2
  237. package/cjs/CodeBlockContainer/index.js +2 -3
  238. package/cjs/CodeBlockContainer/index.js.map +2 -2
  239. package/cjs/CodeBlockContent/index.js +3 -2
  240. package/cjs/CodeBlockContent/index.js.map +2 -2
  241. package/cjs/CodeBlockHeader/index.js +1 -3
  242. package/cjs/CodeBlockHeader/index.js.map +2 -2
  243. package/cjs/CopyToClipboardContainer/index.js +5 -41
  244. package/cjs/CopyToClipboardContainer/index.js.map +3 -3
  245. package/cjs/CopyToClipboardContainer/index.web/index.js +77 -0
  246. package/cjs/CopyToClipboardContainer/index.web.js.map +7 -0
  247. package/cjs/CopyToClipboardMessage/index.js +5 -22
  248. package/cjs/CopyToClipboardMessage/index.js.map +3 -3
  249. package/cjs/CopyToClipboardMessage/index.native/index.js +51 -0
  250. package/cjs/CopyToClipboardMessage/index.native.js.map +7 -0
  251. package/cjs/CopyToClipboardMessage/index.web/index.js +57 -0
  252. package/cjs/CopyToClipboardMessage/index.web.js.map +7 -0
  253. package/cjs/DateInputItem/index.js +5 -42
  254. package/cjs/DateInputItem/index.js.map +3 -3
  255. package/cjs/DateInputItem/index.native/index.js +50 -0
  256. package/cjs/DateInputItem/index.native.js.map +7 -0
  257. package/cjs/DateInputItem/index.web/index.js +65 -0
  258. package/cjs/DateInputItem/index.web.js.map +7 -0
  259. package/cjs/Details/index.js +5 -23
  260. package/cjs/Details/index.js.map +3 -3
  261. package/cjs/Details/index.native/index.js +50 -0
  262. package/cjs/Details/index.native.js.map +7 -0
  263. package/cjs/Details/index.web/index.js +58 -0
  264. package/cjs/Details/index.web.js.map +7 -0
  265. package/cjs/FieldsetLegend/index.js +1 -4
  266. package/cjs/FieldsetLegend/index.js.map +2 -2
  267. package/cjs/LabelTitle/index.js +2 -4
  268. package/cjs/LabelTitle/index.js.map +2 -2
  269. package/cjs/NavListItemActionContainer/index.js +5 -21
  270. package/cjs/NavListItemActionContainer/index.js.map +3 -3
  271. package/cjs/NavListItemActionContainer/index.native/index.js +50 -0
  272. package/cjs/NavListItemActionContainer/index.native.js.map +7 -0
  273. package/cjs/NavListItemActionContainer/index.web/index.js +56 -0
  274. package/cjs/NavListItemActionContainer/index.web.js.map +7 -0
  275. package/cjs/NotificationBannerLink/index.js +5 -20
  276. package/cjs/NotificationBannerLink/index.js.map +3 -3
  277. package/cjs/NotificationBannerLink/index.native/index.js +49 -0
  278. package/cjs/NotificationBannerLink/index.native.js.map +7 -0
  279. package/cjs/NotificationBannerLink/index.web/index.js +55 -0
  280. package/cjs/NotificationBannerLink/index.web.js.map +7 -0
  281. package/cjs/PhaseBanner/index.js +2 -1
  282. package/cjs/PhaseBanner/index.js.map +2 -2
  283. package/cjs/PhaseBannerTag/index.js +1 -1
  284. package/cjs/PhaseBannerTag/index.js.map +1 -1
  285. package/cjs/PhaseBannerText/index.js +1 -1
  286. package/cjs/PhaseBannerText/index.js.map +2 -2
  287. package/cjs/RadioItem/index.js +2 -1
  288. package/cjs/RadioItem/index.js.map +3 -3
  289. package/cjs/SummaryList/index.js.map +2 -2
  290. package/cjs/SummaryListItemKey/index.js +5 -2
  291. package/cjs/SummaryListItemKey/index.js.map +2 -2
  292. package/cjs/TextArea/index.js +5 -28
  293. package/cjs/TextArea/index.js.map +3 -3
  294. package/cjs/TextArea/index.native/index.js +49 -0
  295. package/cjs/TextArea/index.native.js.map +7 -0
  296. package/cjs/TextArea/index.web/index.js +63 -0
  297. package/cjs/TextArea/index.web.js.map +7 -0
  298. package/cjs/TextInput/index.js +5 -41
  299. package/cjs/TextInput/index.js.map +3 -3
  300. package/cjs/TextInput/index.native/index.js +52 -0
  301. package/cjs/TextInput/index.native.js.map +7 -0
  302. package/cjs/TextInput/index.web/index.js +76 -0
  303. package/cjs/TextInput/index.web.js.map +7 -0
  304. package/cjs/Unpurge/index.js +78 -0
  305. package/cjs/Unpurge/index.js.map +2 -2
  306. package/cjs/WarningText/index.js +7 -12
  307. package/cjs/WarningText/index.js.map +2 -2
  308. package/cjs/WarningTextAssistive/index.js +56 -0
  309. package/cjs/WarningTextAssistive/index.js.map +7 -0
  310. package/cjs/index.js +5 -1
  311. package/cjs/index.js.map +2 -2
  312. package/cjs/lazy/index.js +12 -10
  313. package/cjs/lazy.js.map +2 -2
  314. package/cjs/registry/index.js +27 -1
  315. package/cjs/registry.js.map +2 -2
  316. package/cjs/utils/extend.native/index.js +47 -0
  317. package/cjs/utils/extend.native.js.map +7 -0
  318. package/index.d.ts +2 -0
  319. package/index.js +3 -1
  320. package/index.js.map +2 -2
  321. package/lazy/index.js +12 -10
  322. package/lazy.d.ts +219 -217
  323. package/lazy.js.map +2 -2
  324. package/package.json +21 -4
  325. package/registry/index.js +27 -1
  326. package/registry.d.ts +13 -0
  327. package/registry.js.map +2 -2
  328. package/src/Base/compat/Input/CheckboxInput.native.tsx +40 -0
  329. package/src/Base/compat/Input/RadioInput.native.tsx +39 -0
  330. package/src/Base/compat/Input/StringInput.native.tsx +115 -0
  331. package/src/Base/compat/Input/index.native.tsx +28 -0
  332. package/src/Base/compat/button.native.tsx +53 -0
  333. package/src/Base/compat/details.native.tsx +68 -0
  334. package/src/Base/compat/li.native.tsx +11 -0
  335. package/src/Base/compat/ol.native.tsx +41 -0
  336. package/src/Base/index.native.tsx +185 -0
  337. package/src/Base/index.tsx +2 -257
  338. package/src/Base/index.web.tsx +259 -0
  339. package/src/Base/mapping.native.tsx +41 -0
  340. package/src/Base/utils.ts +84 -0
  341. package/src/Base/wrap.native.tsx +94 -0
  342. package/src/CallToAction/index.tsx +2 -2
  343. package/src/Card/index.tsx +3 -2
  344. package/src/CheckboxItem/index.tsx +4 -14
  345. package/src/CheckboxItemInput/index.native.tsx +17 -0
  346. package/src/CheckboxItemInput/index.tsx +2 -0
  347. package/src/CheckboxItemInput/index.web.tsx +34 -0
  348. package/src/Chip/index.tsx +2 -2
  349. package/src/CodeBlockContainer/index.tsx +3 -16
  350. package/src/CodeBlockContent/index.tsx +5 -4
  351. package/src/CodeBlockHeader/index.tsx +2 -4
  352. package/src/CopyToClipboardContainer/index.tsx +2 -74
  353. package/src/CopyToClipboardContainer/index.web.tsx +75 -0
  354. package/src/CopyToClipboardMessage/index.native.tsx +21 -0
  355. package/src/CopyToClipboardMessage/index.tsx +2 -41
  356. package/src/CopyToClipboardMessage/index.web.tsx +41 -0
  357. package/src/DateInputItem/index.native.tsx +12 -0
  358. package/src/DateInputItem/index.tsx +2 -64
  359. package/src/DateInputItem/index.web.tsx +53 -0
  360. package/src/Details/index.native.tsx +14 -0
  361. package/src/Details/index.tsx +2 -27
  362. package/src/Details/index.web.tsx +27 -0
  363. package/src/FieldsetLegend/index.tsx +1 -4
  364. package/src/LabelTitle/index.tsx +2 -4
  365. package/src/NavListItemActionContainer/index.native.tsx +18 -0
  366. package/src/NavListItemActionContainer/index.tsx +2 -28
  367. package/src/NavListItemActionContainer/index.web.tsx +28 -0
  368. package/src/NotificationBannerLink/index.native.tsx +22 -0
  369. package/src/NotificationBannerLink/index.tsx +2 -28
  370. package/src/NotificationBannerLink/index.web.tsx +28 -0
  371. package/src/PhaseBanner/index.tsx +2 -2
  372. package/src/PhaseBannerTag/index.tsx +3 -3
  373. package/src/PhaseBannerText/__snapshots__/index.test.tsx.snap +1 -1
  374. package/src/PhaseBannerText/index.tsx +1 -1
  375. package/src/RadioItem/index.tsx +2 -2
  376. package/src/SummaryList/index.tsx +7 -5
  377. package/src/SummaryListItemKey/index.tsx +24 -2
  378. package/src/TextArea/index.native.tsx +11 -0
  379. package/src/TextArea/index.tsx +2 -50
  380. package/src/TextArea/index.web.tsx +50 -0
  381. package/src/TextInput/index.native.tsx +15 -0
  382. package/src/TextInput/index.tsx +2 -87
  383. package/src/TextInput/index.web.tsx +87 -0
  384. package/src/Unpurge/index.tsx +78 -0
  385. package/src/WarningText/index.tsx +12 -15
  386. package/src/WarningTextAssistive/index.tsx +37 -0
  387. package/src/index.ts +2 -0
  388. package/src/lazy.js +12 -10
  389. package/src/registry.js +28 -2
  390. package/src/utils/extend.native.tsx +36 -0
  391. package/utils/extend.native/index.js +14 -0
  392. package/utils/extend.native/package.json +6 -0
  393. package/utils/extend.native.d.ts +23 -0
  394. package/utils/extend.native.js.map +7 -0
@@ -0,0 +1,259 @@
1
+ import React from 'react';
2
+ import { basePropGenerator } from '@digigov/react-core/Base/utils';
3
+
4
+ type AsProp<C extends React.ElementType> = {
5
+ as?: C;
6
+ };
7
+
8
+ type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
9
+
10
+ // This is the first reusable type utility we built
11
+ type PolymorphicComponentProp<
12
+ C extends React.ElementType,
13
+ Props = Record<string, unknown>,
14
+ > = React.PropsWithChildren<Props & AsProp<C>> &
15
+ Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
16
+
17
+ // This is a new type utitlity with ref!
18
+ type PolymorphicComponentPropWithRef<
19
+ C extends React.ElementType,
20
+ Props = Record<string, unknown>,
21
+ > = PolymorphicComponentProp<C, Props> & { ref?: any };
22
+
23
+ // This is the type for the "ref" only
24
+ type PolymorphicRef<C extends React.ElementType> =
25
+ React.ComponentPropsWithRef<C>['ref'];
26
+
27
+ /**
28
+ * This is the updated component props using PolymorphicComponentPropWithRef
29
+ */
30
+ export type BaseProps<C extends React.ElementType> =
31
+ PolymorphicComponentPropWithRef<
32
+ C,
33
+ {
34
+ /** margin is optional. It has not a default value. */
35
+ margin?: spacingValues;
36
+ /** marginTop is optional. It has not a default value. */
37
+ marginTop?: spacingValues;
38
+ /** marginBottom is optional. It has not a default value. */
39
+ marginBottom?: spacingValues;
40
+ /** marginLeft is optional. It has not a default value. */
41
+ marginLeft?: spacingValues;
42
+ /** marginRight is optional. It has not a default value. */
43
+ marginRight?: spacingValues;
44
+ /** Alternative for margin. Margin is optional. It has not a default value. */
45
+ m?: spacingValues;
46
+ /** Alternative for marginTop. MarginTop is optional. It has not a default value. */
47
+ mt?: spacingValues;
48
+ /** Alternative for marginBottom. MarginBottom is optional. It has not a default value. */
49
+ mb?: spacingValues;
50
+ /** Alternative for marginLeft. MarginLeft is optional. It has not a default value. */
51
+ ml?: spacingValues;
52
+ /** Alternative for marginRight. MarginRight is optional. It has not a default value. */
53
+ mr?: spacingValues;
54
+ /** Alternative for marginX. MarginX is optional. It has not a default value. */
55
+ mx?: spacingValues;
56
+ /** Alternative for marginY. MarginY is optional. It has not a default value. */
57
+ my?: spacingValues;
58
+ /** padding is optional. It has not a default value. */
59
+ padding?: spacingValues;
60
+ /** paddingTop is optional. It has not a default value. */
61
+ paddingTop?: spacingValues;
62
+ /** paddingBottom is optional. It has not a default value. */
63
+ paddingBottom?: spacingValues;
64
+ /** paddingLeft is optional. It has not a default value. */
65
+ paddingLeft?: spacingValues;
66
+ /** paddingRight is optional. It has not a default value. */
67
+ paddingRight?: spacingValues;
68
+ /** Alternative for padding. Padding is optional. It has not a default value. */
69
+ p?: spacingValues;
70
+ /** Alternative for paddingTop. PaddingTop is optional. It has not a default value. */
71
+ pt?: spacingValues;
72
+ /** Alternative for paddingBottom. PaddingBottom is optional. It has not a default value. */
73
+ pb?: spacingValues;
74
+ /** Alternative for paddingLeft. PaddingLeft is optional. It has not a default value. */
75
+ pl?: spacingValues;
76
+ /** Alternative for paddingRight. PaddingRight is optional. It has not a default value. */
77
+ pr?: spacingValues;
78
+ /** Alternative for paddingX. PaddingX is optional. It has not a default value. */
79
+ px?: spacingValues;
80
+ /** Alternative for paddingY. PaddingY is optional. It has not a default value. */
81
+ py?: spacingValues;
82
+ /** printHidden is optional. Default value is false. When true, the component is hidden at print. */
83
+ printHidden?: boolean;
84
+ /** printVisible is optional. When block, the component is displayed as block. When inline, the component is displayed as inline.*/
85
+ printVisible?: 'block' | 'inline';
86
+ /** Components will be hidden at all screen sizes. */
87
+ hidden?: boolean;
88
+ /** Components will be hidden from 'xs' screen size and up. */
89
+ xsUpHidden?: boolean;
90
+ /** Components will be hidden from 'sm' screen size and up. */
91
+ smUpHidden?: boolean;
92
+ /** Components will be hidden from 'md' screen size and up. */
93
+ mdUpHidden?: boolean;
94
+ /** Components will be hidden from 'lg' screen size and up. */
95
+ lgUpHidden?: boolean;
96
+ /** Components will be hidden from 'xl' screen size and up. */
97
+ xlUpHidden?: boolean;
98
+ /** Components will be hidden between xs and sm screen size. */
99
+ xsHidden?: boolean;
100
+ /** Components will be hidden between sm and md screen size. */
101
+ smHidden?: boolean;
102
+ /** Components will be hidden between md and lg screen size. */
103
+ mdHidden?: boolean;
104
+ /** Components will be hidden between lg and xl screen size. */
105
+ lgHidden?: boolean;
106
+ /** Components will be hidden between xl and 2xl screen size. */
107
+ xlHidden?: boolean;
108
+ /** display is optional. It has not a default value. */
109
+ display?: 'flex' | 'block' | 'none'
110
+ }
111
+ >;
112
+
113
+ type spacingValues =
114
+ | 0
115
+ | 0.5
116
+ | 1
117
+ | 1.5
118
+ | 2
119
+ | 2.5
120
+ | 3
121
+ | 3.5
122
+ | 4
123
+ | 5
124
+ | 6
125
+ | 7
126
+ | 8
127
+ | 9
128
+ | 10
129
+ | 11
130
+ | 12
131
+ | 14
132
+ | 16
133
+ | 20
134
+ | 24
135
+ | 28
136
+ | 32
137
+ | 36
138
+ | 40
139
+ | 44
140
+ | 48
141
+ | 52
142
+ | 56
143
+ | 60
144
+ | 64
145
+ | 72
146
+ | 80
147
+ | 96;
148
+
149
+ /**
150
+ * This is the type used in the type annotation for the component
151
+ */
152
+ type BaseComponent = <C extends React.ElementType = 'span'>(
153
+ props: BaseProps<C>
154
+ ) => React.ReactNode | null;
155
+
156
+ export const Base: BaseComponent = React.forwardRef(function Base<
157
+ C extends React.ElementType = 'span',
158
+ >(
159
+ {
160
+ as,
161
+ display,
162
+ margin,
163
+ marginTop,
164
+ marginBottom,
165
+ marginLeft,
166
+ marginRight,
167
+ m,
168
+ mt,
169
+ mb,
170
+ ml,
171
+ mr,
172
+ mx,
173
+ my,
174
+ padding,
175
+ paddingTop,
176
+ paddingBottom,
177
+ paddingLeft,
178
+ paddingRight,
179
+ p,
180
+ pt,
181
+ pb,
182
+ pr,
183
+ pl,
184
+ px,
185
+ py,
186
+ printHidden,
187
+ printVisible,
188
+ hidden,
189
+ xsUpHidden,
190
+ smUpHidden,
191
+ mdUpHidden,
192
+ lgUpHidden,
193
+ xlUpHidden,
194
+ xsHidden,
195
+ smHidden,
196
+ mdHidden,
197
+ lgHidden,
198
+ xlHidden,
199
+ children,
200
+ className,
201
+ ...props
202
+ }: BaseProps<C>,
203
+ ref?: PolymorphicRef<C>
204
+ ) {
205
+ const Component = as || 'span';
206
+
207
+ return (
208
+ <Component
209
+ as={as}
210
+ className={basePropGenerator({
211
+ display,
212
+ margin,
213
+ marginTop,
214
+ marginBottom,
215
+ marginLeft,
216
+ marginRight,
217
+ m,
218
+ mt,
219
+ mb,
220
+ ml,
221
+ mr,
222
+ mx,
223
+ my,
224
+ padding,
225
+ paddingTop,
226
+ paddingBottom,
227
+ paddingLeft,
228
+ paddingRight,
229
+ p,
230
+ pt,
231
+ pb,
232
+ pr,
233
+ pl,
234
+ px,
235
+ py,
236
+ printHidden,
237
+ printVisible,
238
+ hidden,
239
+ xsUpHidden,
240
+ smUpHidden,
241
+ mdUpHidden,
242
+ lgUpHidden,
243
+ xlUpHidden,
244
+ xsHidden,
245
+ smHidden,
246
+ mdHidden,
247
+ lgHidden,
248
+ xlHidden,
249
+ className,
250
+ })}
251
+ ref={ref}
252
+ {...props}
253
+ >
254
+ {children}
255
+ </Component>
256
+ );
257
+ });
258
+
259
+ export default Base;
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { Link } from 'expo-router';
3
+ import { Image, View } from 'react-native';
4
+ import Svg, { Path, Circle, Rect, G, Polygon } from 'react-native-svg';
5
+ import { Button } from '@digigov/react-core/Base/compat/button.native';
6
+ import CompatDetails from '@digigov/react-core/Base/compat/details.native';
7
+ import BaseInput from '@digigov/react-core/Base/compat/Input/index.native';
8
+ import { Ol } from '@digigov/react-core/Base/compat/ol.native';
9
+ import { cssInterop } from 'nativewind'
10
+ export type MapProps<T extends keyof JSX.IntrinsicElements> =
11
+ React.ComponentPropsWithoutRef<T>;
12
+
13
+ // TODO: use MapProps<K> instead of any for props type
14
+ export type MappingType = {
15
+ [K in keyof JSX.IntrinsicElements]?: (
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
+ props: any
18
+ ) => JSX.Element | React.ReactNode;
19
+ };
20
+
21
+ export const mapping: MappingType = {
22
+ a: ({ children, ...props }) => <Link {...props} asChild ><View>{children}</View></Link>,
23
+ img: (props) => <Image {...props} />,
24
+ button: Button,
25
+ input: BaseInput,
26
+ textarea: BaseInput,
27
+ details: CompatDetails,
28
+ ol: Ol,
29
+ path: (props) => <Path {...props} />,
30
+ // @ts-ignore
31
+ svg: cssInterop(Svg, {
32
+ className: {
33
+ target: "style",
34
+ nativeStyleToProp: { width: true, height: true }
35
+ },
36
+ }),
37
+ rect: (props) => <Rect {...props} />,
38
+ circle: (props) => <Circle {...props} />,
39
+ g: (props) => <G {...props} />,
40
+ polygon: (props) => <Polygon {...props} />,
41
+ };
@@ -0,0 +1,84 @@
1
+ import clsx from 'clsx';
2
+
3
+ export const basePropGenerator = ({
4
+ display,
5
+ margin,
6
+ marginTop,
7
+ marginBottom,
8
+ marginLeft,
9
+ marginRight,
10
+ m,
11
+ mt,
12
+ mb,
13
+ ml,
14
+ mr,
15
+ mx,
16
+ my,
17
+ padding,
18
+ paddingTop,
19
+ paddingBottom,
20
+ paddingLeft,
21
+ paddingRight,
22
+ p,
23
+ pt,
24
+ pb,
25
+ pr,
26
+ pl,
27
+ px,
28
+ py,
29
+ printHidden,
30
+ printVisible,
31
+ hidden,
32
+ xsUpHidden,
33
+ smUpHidden,
34
+ mdUpHidden,
35
+ lgUpHidden,
36
+ xlUpHidden,
37
+ xsHidden,
38
+ smHidden,
39
+ mdHidden,
40
+ lgHidden,
41
+ xlHidden,
42
+ className,
43
+ }) =>
44
+ clsx(className, {
45
+ [`ds-display-${display}`]: display !== undefined ? true : undefined,
46
+ [`ds-m-${margin}`]: margin !== undefined ? true : undefined,
47
+ [`ds-mt-${marginTop}`]: marginTop !== undefined ? true : undefined,
48
+ [`ds-mb-${marginBottom}`]: marginBottom !== undefined ? true : undefined,
49
+ [`ds-mr-${marginRight}`]: marginRight !== undefined ? true : undefined,
50
+ [`ds-ml-${marginLeft}`]: marginLeft !== undefined ? true : undefined,
51
+ [`ds-m-${m}`]: m !== undefined ? true : undefined,
52
+ [`ds-mt-${mt}`]: mt !== undefined ? true : undefined,
53
+ [`ds-mb-${mb}`]: mb !== undefined ? true : undefined,
54
+ [`ds-mr-${mr}`]: mr !== undefined ? true : undefined,
55
+ [`ds-ml-${ml}`]: ml !== undefined ? true : undefined,
56
+ [`ds-mx-${mx}`]: mx !== undefined ? true : undefined,
57
+ [`ds-my-${my}`]: my !== undefined ? true : undefined,
58
+ [`ds-p-${padding}`]: padding !== undefined ? true : undefined,
59
+ [`ds-pt-${paddingTop}`]: paddingTop !== undefined ? true : undefined,
60
+ [`ds-pb-${paddingBottom}`]: paddingBottom !== undefined ? true : undefined,
61
+ [`ds-pr-${paddingRight}`]: paddingRight !== undefined ? true : undefined,
62
+ [`ds-pl-${paddingLeft}`]: paddingLeft !== undefined ? true : undefined,
63
+ [`ds-p-${p}`]: p !== undefined ? true : undefined,
64
+ [`ds-pt-${pt}`]: pt !== undefined ? true : undefined,
65
+ [`ds-pb-${pb}`]: pb !== undefined ? true : undefined,
66
+ [`ds-pr-${pr}`]: pr !== undefined ? true : undefined,
67
+ [`ds-pl-${pl}`]: pl !== undefined ? true : undefined,
68
+ [`ds-px-${px}`]: px !== undefined ? true : undefined,
69
+ [`ds-py-${py}`]: py !== undefined ? true : undefined,
70
+ 'ds-print-hidden': !!printHidden,
71
+ 'ds-print-visible-block': printVisible === 'block',
72
+ 'ds-print-visible-inline': printVisible === 'inline',
73
+ 'ds-hidden': !!hidden,
74
+ 'ds-hidden-xs-up': !!xsUpHidden,
75
+ 'ds-hidden-sm-up': !!smUpHidden,
76
+ 'ds-hidden-md-up': !!mdUpHidden,
77
+ 'ds-hidden-lg-up': !!lgUpHidden,
78
+ 'ds-hidden-xl-up': !!xlUpHidden,
79
+ 'ds-hidden-xs': !!xsHidden,
80
+ 'ds-hidden-sm': !!smHidden,
81
+ 'ds-hidden-md': !!mdHidden,
82
+ 'ds-hidden-lg': !!lgHidden,
83
+ 'ds-hidden-xl': !!xlHidden,
84
+ });
@@ -0,0 +1,94 @@
1
+ import React, { useContext, useMemo, useState } from 'react';
2
+ import { View } from 'react-native';
3
+
4
+ interface WrapperContextType {
5
+ (cls: string): void;
6
+ }
7
+
8
+ const WrapperContext = React.createContext<WrapperContextType>(
9
+ (cls: string) => {
10
+ return cls;
11
+ }
12
+ );
13
+
14
+ const Wrapper = React.memo(({ children }: { children?: React.ReactNode }) => {
15
+ const [className, setClassName] = useState('');
16
+ return (
17
+ <WrapperContext.Provider value={setClassName}>
18
+ <View className={className} focusable={false}>
19
+ {children}
20
+ </View>
21
+ </WrapperContext.Provider>
22
+ );
23
+ });
24
+
25
+ interface WrappedComponentProps {
26
+ className?: string;
27
+ onBlur?: (e: unknown) => void;
28
+ onFocus?: (e: unknown) => void;
29
+ }
30
+
31
+ export const wrap = (Component: React.ElementType) => {
32
+ const WrappedComponent = React.forwardRef(function InnerComponent(
33
+ { className, onBlur, onFocus, ...props }: WrappedComponentProps,
34
+ ref
35
+ ) {
36
+ const setClassName = useContext(WrapperContext);
37
+ const wrapperClassNames: string[] = [];
38
+ const beforeClassNames: string[] = [];
39
+ const afterClassNames: string[] = [];
40
+ const focusedWrapperClassNames: string[] = [];
41
+ const classNames = useMemo(
42
+ () =>
43
+ (className?.split(' ') || []).filter((cls) => {
44
+ if (cls.endsWith('__wrapper')) {
45
+ wrapperClassNames.push(cls);
46
+ focusedWrapperClassNames.push(`${cls}--focus`);
47
+ return false;
48
+ } else if (cls.endsWith('__before')) {
49
+ beforeClassNames.push(cls);
50
+ return false;
51
+ } else if (cls.endsWith('__after')) {
52
+ afterClassNames.push(cls);
53
+ return false;
54
+ }
55
+ return true;
56
+ }),
57
+ [className]
58
+ );
59
+ return (
60
+ <>
61
+ {beforeClassNames.length ? (
62
+ <View focusable={false} className={beforeClassNames.join(' ')} />
63
+ ) : (
64
+ ''
65
+ )}
66
+ <Component
67
+ ref={ref}
68
+ onFocus={(e: unknown) => {
69
+ setClassName(focusedWrapperClassNames.join(' '));
70
+ onFocus && onFocus(e);
71
+ }}
72
+ onBlur={(e: unknown) => {
73
+ setClassName(wrapperClassNames.join(' '));
74
+ onBlur && onBlur(e);
75
+ }}
76
+ className={classNames.join(' ')}
77
+ {...props}
78
+ />
79
+ {afterClassNames.length ? (
80
+ <View focusable={false} className={afterClassNames.join(' ')} />
81
+ ) : (
82
+ ''
83
+ )}
84
+ </>
85
+ );
86
+ });
87
+ return React.forwardRef(function Wrapped(props, ref) {
88
+ const children = useMemo(
89
+ () => <WrappedComponent {...props} ref={ref} />,
90
+ []
91
+ );
92
+ return <Wrapper>{children}</Wrapper>;
93
+ });
94
+ };
@@ -3,7 +3,7 @@ import clsx from 'clsx';
3
3
  import ButtonLink, { ButtonLinkProps } from '@digigov/react-core/ButtonLink';
4
4
  import { ChevronIcon } from '@digigov/react-icons';
5
5
 
6
- export interface CallToActionProps extends ButtonLinkProps { }
6
+ export interface CallToActionProps extends ButtonLinkProps {}
7
7
  /**
8
8
  * Use this button for the main call to action on your service’s start page.
9
9
  */
@@ -24,7 +24,7 @@ export const CallToAction = React.forwardRef<
24
24
  {...props}
25
25
  >
26
26
  {children}
27
- <ChevronIcon />
27
+ <ChevronIcon className="ds-btn-cta__icon" />
28
28
  </ButtonLink>
29
29
  );
30
30
  });
@@ -71,13 +71,14 @@ export const Card = React.forwardRef<HTMLDivElement, CardProps>(function Card(
71
71
  })}
72
72
  {...props}
73
73
  >
74
- <div
74
+ <Base
75
+ as="div"
75
76
  className={clsx({
76
77
  'ds-card__body': true,
77
78
  })}
78
79
  >
79
80
  {children}
80
- </div>
81
+ </Base>
81
82
  </Base>
82
83
  );
83
84
  });
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import clsx from 'clsx';
3
3
  import Base, { BaseProps } from '@digigov/react-core/Base';
4
4
  import ChoiceDividerText from '@digigov/react-core/ChoiceDividerText';
5
+ import CheckboxItemInput from '@digigov/react-core/CheckboxItemInput';
5
6
  import LabelContainer from '@digigov/react-core/LabelContainer';
6
7
 
7
8
  export interface CheckboxItemProps extends BaseProps<'input'> {
@@ -27,7 +28,7 @@ export const CheckboxItem = React.forwardRef<
27
28
  return (
28
29
  <>
29
30
  {dividerText && <ChoiceDividerText>{dividerText}</ChoiceDividerText>}
30
- <div
31
+ <Base as='div'
31
32
  className={clsx(className, {
32
33
  'ds-checkboxes__item': true,
33
34
  })}
@@ -39,20 +40,9 @@ export const CheckboxItem = React.forwardRef<
39
40
  })}
40
41
  >
41
42
  {children}
42
- <Base
43
- as="input"
44
- ref={ref}
45
- type="checkbox"
46
- name={name}
47
- value={value}
48
- className={clsx({
49
- 'ds-checkboxes__input': true,
50
- })}
51
- disabled={disabled}
52
- {...props}
53
- />
43
+ <CheckboxItemInput ref={ref} name={name} value={value} disabled={disabled} {...props} />
54
44
  </LabelContainer>
55
- </div>
45
+ </Base>
56
46
  </>
57
47
  );
58
48
  });
@@ -0,0 +1,17 @@
1
+ import extend from '@digigov/react-core/utils/extend.native';
2
+ import CoreCheckboxItemInput from '@digigov/react-core/CheckboxItemInput/index.web';
3
+ import clsx from 'clsx';
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;
@@ -0,0 +1,2 @@
1
+ export * from '@digigov/react-core/CheckboxItemInput/index.web';
2
+ export { default as default } from '@digigov/react-core/CheckboxItemInput/index.web';
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import clsx from 'clsx';
3
+ import Base, { BaseProps } from '@digigov/react-core/Base';
4
+
5
+ export interface CheckboxItemInputProps extends BaseProps<'input'> { }
6
+ /**
7
+ * Details for the CheckboxItem.
8
+ * CheckboxItemInput component is the input component for CheckboxItem.
9
+ */
10
+ export const CheckboxItemInput = React.forwardRef<
11
+ HTMLInputElement,
12
+ CheckboxItemInputProps
13
+ >(function CheckboxItemInput(
14
+ { name, value, className, disabled, children, ...props },
15
+ ref
16
+ ) {
17
+ return (
18
+ <Base
19
+ as="input"
20
+ ref={ref}
21
+ type="checkbox"
22
+ name={name}
23
+ value={value}
24
+ className={clsx({
25
+ 'ds-checkboxes__input': true,
26
+ })}
27
+ disabled={disabled}
28
+ {...props}
29
+ />
30
+
31
+ );
32
+ });
33
+
34
+ export default CheckboxItemInput;
@@ -28,7 +28,7 @@ export const Chip = React.forwardRef<HTMLLIElement, ChipProps>(function Chip(
28
28
  {...props}
29
29
  onClick={onClick}
30
30
  >
31
- <div
31
+ <Base as='div'
32
32
  role={onClick && 'button'}
33
33
  tabIndex={onClick && 0}
34
34
  className="ds-chip__content"
@@ -42,7 +42,7 @@ export const Chip = React.forwardRef<HTMLLIElement, ChipProps>(function Chip(
42
42
  }}
43
43
  />
44
44
  )}
45
- </div>
45
+ </Base>
46
46
  </Base>
47
47
  );
48
48
  });
@@ -2,34 +2,21 @@ import React from 'react';
2
2
  import clsx from 'clsx';
3
3
  import Base, { BaseProps } from '@digigov/react-core/Base';
4
4
 
5
- export interface CodeBlockContainerProps extends BaseProps<'div'> {
6
- /**
7
- * wrapLines prop is optional.
8
- * wrapLines prop is used to wrap the lines horizontally over the container.
9
- * @value true is used to activate the wrapLines styles.
10
- * @value false is used to deactivate the wrapLines styles.
11
- * @default false
12
- */
13
- wrapLines?: true | false;
14
- }
5
+ export interface CodeBlockContainerProps extends BaseProps<'div'> { }
15
6
  /**
16
- * CodeBlockContainer can be used as a colored container for text.
7
+ * CodeBlockContainer is a component for displaying code.
17
8
  *
18
9
  */
19
10
  export const CodeBlockContainer = React.forwardRef<
20
11
  HTMLDivElement,
21
12
  CodeBlockContainerProps
22
- >(function CodeBlockContainer(
23
- { className, wrapLines = false, children, ...props },
24
- ref
25
- ) {
13
+ >(function CodeBlockContainer({ className, children, ...props }, ref) {
26
14
  return (
27
15
  <Base
28
16
  as="div"
29
17
  ref={ref}
30
18
  className={clsx(className, {
31
19
  'ds-code-block__container': true,
32
- 'ds-code-block__container--wrap-lines': wrapLines,
33
20
  })}
34
21
  {...props}
35
22
  >
@@ -4,7 +4,7 @@ import Base, { BaseProps } from '@digigov/react-core/Base';
4
4
 
5
5
  export interface CodeBlockContentProps extends BaseProps<'pre'> { }
6
6
  /**
7
- * CodeBlockContent can be used as content inside the CodeBlockContainer
7
+ * CodeBlockContent can be used as content inside the CodeBlockContainer.
8
8
  *
9
9
  */
10
10
  export const CodeBlockContent = React.forwardRef<
@@ -12,14 +12,15 @@ export const CodeBlockContent = React.forwardRef<
12
12
  CodeBlockContentProps
13
13
  >(function CodeBlockContent({ className, children, ...props }, ref) {
14
14
  return (
15
- <Base as="pre" ref={ref} className={clsx(className)} {...props}>
16
- <code
15
+ <Base as="pre" ref={ref} className={className} {...props}>
16
+ <Base
17
+ as="code"
17
18
  className={clsx({
18
19
  'ds-code-block__content': true,
19
20
  })}
20
21
  >
21
22
  {children}
22
- </code>
23
+ </Base>
23
24
  </Base>
24
25
  );
25
26
  });