@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,97 @@
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 wrap_native_exports = {};
29
+ __export(wrap_native_exports, {
30
+ wrap: () => wrap
31
+ });
32
+ module.exports = __toCommonJS(wrap_native_exports);
33
+ var import_react = __toESM(require("react"));
34
+ var import_react_native = require("react-native");
35
+ const WrapperContext = import_react.default.createContext(
36
+ (cls) => {
37
+ return cls;
38
+ }
39
+ );
40
+ const Wrapper = import_react.default.memo(({ children }) => {
41
+ const [className, setClassName] = (0, import_react.useState)("");
42
+ return /* @__PURE__ */ import_react.default.createElement(WrapperContext.Provider, { value: setClassName }, /* @__PURE__ */ import_react.default.createElement(import_react_native.View, { className, focusable: false }, children));
43
+ });
44
+ const wrap = (Component) => {
45
+ const WrappedComponent = import_react.default.forwardRef(function InnerComponent({ className, onBlur, onFocus, ...props }, ref) {
46
+ const setClassName = (0, import_react.useContext)(WrapperContext);
47
+ const wrapperClassNames = [];
48
+ const beforeClassNames = [];
49
+ const afterClassNames = [];
50
+ const focusedWrapperClassNames = [];
51
+ const classNames = (0, import_react.useMemo)(
52
+ () => (className?.split(" ") || []).filter((cls) => {
53
+ if (cls.endsWith("__wrapper")) {
54
+ wrapperClassNames.push(cls);
55
+ focusedWrapperClassNames.push(`${cls}--focus`);
56
+ return false;
57
+ } else if (cls.endsWith("__before")) {
58
+ beforeClassNames.push(cls);
59
+ return false;
60
+ } else if (cls.endsWith("__after")) {
61
+ afterClassNames.push(cls);
62
+ return false;
63
+ }
64
+ return true;
65
+ }),
66
+ [className]
67
+ );
68
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, beforeClassNames.length ? /* @__PURE__ */ import_react.default.createElement(import_react_native.View, { focusable: false, className: beforeClassNames.join(" ") }) : "", /* @__PURE__ */ import_react.default.createElement(
69
+ Component,
70
+ {
71
+ ref,
72
+ onFocus: (e) => {
73
+ setClassName(focusedWrapperClassNames.join(" "));
74
+ onFocus && onFocus(e);
75
+ },
76
+ onBlur: (e) => {
77
+ setClassName(wrapperClassNames.join(" "));
78
+ onBlur && onBlur(e);
79
+ },
80
+ className: classNames.join(" "),
81
+ ...props
82
+ }
83
+ ), afterClassNames.length ? /* @__PURE__ */ import_react.default.createElement(import_react_native.View, { focusable: false, className: afterClassNames.join(" ") }) : "");
84
+ });
85
+ return import_react.default.forwardRef(function Wrapped(props, ref) {
86
+ const children = (0, import_react.useMemo)(
87
+ () => /* @__PURE__ */ import_react.default.createElement(WrappedComponent, { ...props, ref }),
88
+ []
89
+ );
90
+ return /* @__PURE__ */ import_react.default.createElement(Wrapper, null, children);
91
+ });
92
+ };
93
+ // Annotate the CommonJS export names for ESM import in node:
94
+ 0 && (module.exports = {
95
+ wrap
96
+ });
97
+ //# sourceMappingURL=wrap.native.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/Base/wrap.native.tsx"],
4
+ "sourcesContent": ["import React, { useContext, useMemo, useState } from 'react';\nimport { View } from 'react-native';\n\ninterface WrapperContextType {\n (cls: string): void;\n}\n\nconst WrapperContext = React.createContext<WrapperContextType>(\n (cls: string) => {\n return cls;\n }\n);\n\nconst Wrapper = React.memo(({ children }: { children?: React.ReactNode }) => {\n const [className, setClassName] = useState('');\n return (\n <WrapperContext.Provider value={setClassName}>\n <View className={className} focusable={false}>\n {children}\n </View>\n </WrapperContext.Provider>\n );\n});\n\ninterface WrappedComponentProps {\n className?: string;\n onBlur?: (e: unknown) => void;\n onFocus?: (e: unknown) => void;\n}\n\nexport const wrap = (Component: React.ElementType) => {\n const WrappedComponent = React.forwardRef(function InnerComponent(\n { className, onBlur, onFocus, ...props }: WrappedComponentProps,\n ref\n ) {\n const setClassName = useContext(WrapperContext);\n const wrapperClassNames: string[] = [];\n const beforeClassNames: string[] = [];\n const afterClassNames: string[] = [];\n const focusedWrapperClassNames: string[] = [];\n const classNames = useMemo(\n () =>\n (className?.split(' ') || []).filter((cls) => {\n if (cls.endsWith('__wrapper')) {\n wrapperClassNames.push(cls);\n focusedWrapperClassNames.push(`${cls}--focus`);\n return false;\n } else if (cls.endsWith('__before')) {\n beforeClassNames.push(cls);\n return false;\n } else if (cls.endsWith('__after')) {\n afterClassNames.push(cls);\n return false;\n }\n return true;\n }),\n [className]\n );\n return (\n <>\n {beforeClassNames.length ? (\n <View focusable={false} className={beforeClassNames.join(' ')} />\n ) : (\n ''\n )}\n <Component\n ref={ref}\n onFocus={(e: unknown) => {\n setClassName(focusedWrapperClassNames.join(' '));\n onFocus && onFocus(e);\n }}\n onBlur={(e: unknown) => {\n setClassName(wrapperClassNames.join(' '));\n onBlur && onBlur(e);\n }}\n className={classNames.join(' ')}\n {...props}\n />\n {afterClassNames.length ? (\n <View focusable={false} className={afterClassNames.join(' ')} />\n ) : (\n ''\n )}\n </>\n );\n });\n return React.forwardRef(function Wrapped(props, ref) {\n const children = useMemo(\n () => <WrappedComponent {...props} ref={ref} />,\n []\n );\n return <Wrapper>{children}</Wrapper>;\n });\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAqD;AACrD,0BAAqB;AAMrB,MAAM,iBAAiB,aAAAA,QAAM;AAAA,EAC3B,CAAC,QAAgB;AACf,WAAO;AAAA,EACT;AACF;AAEA,MAAM,UAAU,aAAAA,QAAM,KAAK,CAAC,EAAE,SAAS,MAAsC;AAC3E,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAS,EAAE;AAC7C,SACE,6BAAAA,QAAA,cAAC,eAAe,UAAf,EAAwB,OAAO,gBAC9B,6BAAAA,QAAA,cAAC,4BAAK,WAAsB,WAAW,SACpC,QACH,CACF;AAEJ,CAAC;AAQM,MAAM,OAAO,CAAC,cAAiC;AACpD,QAAM,mBAAmB,aAAAA,QAAM,WAAW,SAAS,eACjD,EAAE,WAAW,QAAQ,SAAS,GAAG,MAAM,GACvC,KACA;AACA,UAAM,mBAAe,yBAAW,cAAc;AAC9C,UAAM,oBAA8B,CAAC;AACrC,UAAM,mBAA6B,CAAC;AACpC,UAAM,kBAA4B,CAAC;AACnC,UAAM,2BAAqC,CAAC;AAC5C,UAAM,iBAAa;AAAA,MACjB,OACG,WAAW,MAAM,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC,QAAQ;AAC5C,YAAI,IAAI,SAAS,WAAW,GAAG;AAC7B,4BAAkB,KAAK,GAAG;AAC1B,mCAAyB,KAAK,GAAG,GAAG,SAAS;AAC7C,iBAAO;AAAA,QACT,WAAW,IAAI,SAAS,UAAU,GAAG;AACnC,2BAAiB,KAAK,GAAG;AACzB,iBAAO;AAAA,QACT,WAAW,IAAI,SAAS,SAAS,GAAG;AAClC,0BAAgB,KAAK,GAAG;AACxB,iBAAO;AAAA,QACT;AACA,eAAO;AAAA,MACT,CAAC;AAAA,MACH,CAAC,SAAS;AAAA,IACZ;AACA,WACE,6BAAAA,QAAA,2BAAAA,QAAA,gBACG,iBAAiB,SAChB,6BAAAA,QAAA,cAAC,4BAAK,WAAW,OAAO,WAAW,iBAAiB,KAAK,GAAG,GAAG,IAE/D,IAEF,6BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS,CAAC,MAAe;AACvB,uBAAa,yBAAyB,KAAK,GAAG,CAAC;AAC/C,qBAAW,QAAQ,CAAC;AAAA,QACtB;AAAA,QACA,QAAQ,CAAC,MAAe;AACtB,uBAAa,kBAAkB,KAAK,GAAG,CAAC;AACxC,oBAAU,OAAO,CAAC;AAAA,QACpB;AAAA,QACA,WAAW,WAAW,KAAK,GAAG;AAAA,QAC7B,GAAG;AAAA;AAAA,IACN,GACC,gBAAgB,SACf,6BAAAA,QAAA,cAAC,4BAAK,WAAW,OAAO,WAAW,gBAAgB,KAAK,GAAG,GAAG,IAE9D,EAEJ;AAAA,EAEJ,CAAC;AACD,SAAO,aAAAA,QAAM,WAAW,SAAS,QAAQ,OAAO,KAAK;AACnD,UAAM,eAAW;AAAA,MACf,MAAM,6BAAAA,QAAA,cAAC,oBAAkB,GAAG,OAAO,KAAU;AAAA,MAC7C,CAAC;AAAA,IACH;AACA,WAAO,6BAAAA,QAAA,cAAC,eAAS,QAAS;AAAA,EAC5B,CAAC;AACH;",
6
+ "names": ["React"]
7
+ }
@@ -47,7 +47,7 @@ const CallToAction = import_react.default.forwardRef(function CallToAction2({ pr
47
47
  ...props
48
48
  },
49
49
  children,
50
- /* @__PURE__ */ import_react.default.createElement(import_react_icons.ChevronIcon, null)
50
+ /* @__PURE__ */ import_react.default.createElement(import_react_icons.ChevronIcon, { className: "ds-btn-cta__icon" })
51
51
  );
52
52
  });
53
53
  var CallToAction_default = CallToAction;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/CallToAction/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport ButtonLink, { ButtonLinkProps } from '@digigov/react-core/ButtonLink';\nimport { ChevronIcon } from '@digigov/react-icons';\n\nexport interface CallToActionProps extends ButtonLinkProps { }\n/**\n * Use this button for the main call to action on your service\u2019s start page.\n */\nexport const CallToAction = React.forwardRef<\n HTMLAnchorElement,\n CallToActionProps\n>(function CallToAction(\n { printHidden = true, className, children, ...props },\n ref\n) {\n return (\n <ButtonLink\n ref={ref}\n printHidden={printHidden}\n className={clsx(className, {\n 'ds-btn-cta': true,\n })}\n {...props}\n >\n {children}\n <ChevronIcon />\n </ButtonLink>\n );\n});\n\nexport default CallToAction;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,wBAA4C;AAC5C,yBAA4B;AAMrB,MAAM,eAAe,aAAAA,QAAM,WAGhC,SAASC,cACT,EAAE,cAAc,MAAM,WAAW,UAAU,GAAG,MAAM,GACpD,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,kBAAAE;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,cAAc;AAAA,MAChB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,IACD,6BAAAH,QAAA,cAAC,oCAAY;AAAA,EACf;AAEJ,CAAC;AAED,IAAO,uBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport ButtonLink, { ButtonLinkProps } from '@digigov/react-core/ButtonLink';\nimport { ChevronIcon } from '@digigov/react-icons';\n\nexport interface CallToActionProps extends ButtonLinkProps {}\n/**\n * Use this button for the main call to action on your service\u2019s start page.\n */\nexport const CallToAction = React.forwardRef<\n HTMLAnchorElement,\n CallToActionProps\n>(function CallToAction(\n { printHidden = true, className, children, ...props },\n ref\n) {\n return (\n <ButtonLink\n ref={ref}\n printHidden={printHidden}\n className={clsx(className, {\n 'ds-btn-cta': true,\n })}\n {...props}\n >\n {children}\n <ChevronIcon className=\"ds-btn-cta__icon\" />\n </ButtonLink>\n );\n});\n\nexport default CallToAction;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,wBAA4C;AAC5C,yBAA4B;AAMrB,MAAM,eAAe,aAAAA,QAAM,WAGhC,SAASC,cACT,EAAE,cAAc,MAAM,WAAW,UAAU,GAAG,MAAM,GACpD,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,kBAAAE;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,cAAc;AAAA,MAChB,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,IACD,6BAAAH,QAAA,cAAC,kCAAY,WAAU,oBAAmB;AAAA,EAC5C;AAEJ,CAAC;AAED,IAAO,uBAAQ;",
6
6
  "names": ["React", "CallToAction", "ButtonLink", "clsx"]
7
7
  }
package/cjs/Card/index.js CHANGED
@@ -54,8 +54,9 @@ const Card = import_react.default.forwardRef(function Card2({ variant, borderCol
54
54
  ...props
55
55
  },
56
56
  /* @__PURE__ */ import_react.default.createElement(
57
- "div",
57
+ import_Base.default,
58
58
  {
59
+ as: "div",
59
60
  className: (0, import_clsx.default)({
60
61
  "ds-card__body": true
61
62
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/Card/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CardProps extends BaseProps<'div'> {\n /**\n * By default, we recommend using Cards without border style. Card border increases the contrast to its background.\n * divider\n * `variant` property is optional.\n * @value 'border'\n * @value 'divider'\n * @value 'border-top'\n */\n variant?: 'border' | 'divider' | 'border-top';\n\n /**\n *borderColor property is optional and it is used to set the color of the Card's border.\n *\n *\n * @value 'light'\n * @value 'dark'\n */\n borderColor?: 'light' | 'dark';\n\n /**\n *callToAction property is optional and it is used to set the content of the Card clickable.\n *\n *\n * @value true\n * @value false\n */\n callToAction?: boolean;\n /**\n * dense is optional.\n * @value true Card will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n /**\n * fullHeight is optional.\n * @value true Card will be have it's full height.\n * @value false\n * @default false\n * */\n fullHeight?: boolean;\n}\n/**\n * Cards can be used to divide and organise interface content for better understandability and readability.\n * Cards can help your users to scan through vast amounts of information quicker.\n * Use Card as parent component to wrap CardHeading, CardContent and CartAction components\n */\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(function Card(\n { variant, borderColor, callToAction, dense, fullHeight, className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-card': true,\n 'ds-card--dense': dense,\n 'ds-card--border': variant === 'border',\n 'ds-card--border-top': variant === 'border-top',\n 'ds-card--divider': variant === 'divider',\n 'ds-card--cta': callToAction,\n 'ds-card--border-light': borderColor === 'light',\n 'ds-card--border-dark': borderColor === 'dark',\n 'ds-card--full-height': fullHeight,\n })}\n {...props}\n >\n <div\n className={clsx({\n 'ds-card__body': true,\n })}\n >\n {children}\n </div>\n </Base>\n );\n});\n\nexport default Card;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAkDzB,MAAM,OAAO,aAAAA,QAAM,WAAsC,SAASC,MACvE,EAAE,SAAS,aAAa,cAAc,OAAO,YAAY,WAAW,UAAU,GAAG,MAAM,GACvF,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,WAAW;AAAA,QACX,kBAAkB;AAAA,QAClB,mBAAmB,YAAY;AAAA,QAC/B,uBAAuB,YAAY;AAAA,QACnC,oBAAoB,YAAY;AAAA,QAChC,gBAAgB;AAAA,QAChB,yBAAyB,gBAAgB;AAAA,QACzC,wBAAwB,gBAAgB;AAAA,QACxC,wBAAwB;AAAA,MAC1B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEJ,6BAAAH,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,YAAAG,SAAK;AAAA,UACd,iBAAiB;AAAA,QACnB,CAAC;AAAA;AAAA,MAEA;AAAA,IACH;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,eAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CardProps extends BaseProps<'div'> {\n /**\n * By default, we recommend using Cards without border style. Card border increases the contrast to its background.\n * divider\n * `variant` property is optional.\n * @value 'border'\n * @value 'divider'\n * @value 'border-top'\n */\n variant?: 'border' | 'divider' | 'border-top';\n\n /**\n *borderColor property is optional and it is used to set the color of the Card's border.\n *\n *\n * @value 'light'\n * @value 'dark'\n */\n borderColor?: 'light' | 'dark';\n\n /**\n *callToAction property is optional and it is used to set the content of the Card clickable.\n *\n *\n * @value true\n * @value false\n */\n callToAction?: boolean;\n /**\n * dense is optional.\n * @value true Card will be dense.\n * @value false\n * @default false\n * */\n dense?: boolean;\n /**\n * fullHeight is optional.\n * @value true Card will be have it's full height.\n * @value false\n * @default false\n * */\n fullHeight?: boolean;\n}\n/**\n * Cards can be used to divide and organise interface content for better understandability and readability.\n * Cards can help your users to scan through vast amounts of information quicker.\n * Use Card as parent component to wrap CardHeading, CardContent and CartAction components\n */\nexport const Card = React.forwardRef<HTMLDivElement, CardProps>(function Card(\n { variant, borderColor, callToAction, dense, fullHeight, className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-card': true,\n 'ds-card--dense': dense,\n 'ds-card--border': variant === 'border',\n 'ds-card--border-top': variant === 'border-top',\n 'ds-card--divider': variant === 'divider',\n 'ds-card--cta': callToAction,\n 'ds-card--border-light': borderColor === 'light',\n 'ds-card--border-dark': borderColor === 'dark',\n 'ds-card--full-height': fullHeight,\n })}\n {...props}\n >\n <Base\n as=\"div\"\n className={clsx({\n 'ds-card__body': true,\n })}\n >\n {children}\n </Base>\n </Base>\n );\n});\n\nexport default Card;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAkDzB,MAAM,OAAO,aAAAA,QAAM,WAAsC,SAASC,MACvE,EAAE,SAAS,aAAa,cAAc,OAAO,YAAY,WAAW,UAAU,GAAG,MAAM,GACvF,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,WAAW;AAAA,QACX,kBAAkB;AAAA,QAClB,mBAAmB,YAAY;AAAA,QAC/B,uBAAuB,YAAY;AAAA,QACnC,oBAAoB,YAAY;AAAA,QAChC,gBAAgB;AAAA,QAChB,yBAAyB,gBAAgB;AAAA,QACzC,wBAAwB,gBAAgB;AAAA,QACxC,wBAAwB;AAAA,MAC1B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEJ,6BAAAH,QAAA;AAAA,MAAC,YAAAE;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH,eAAW,YAAAC,SAAK;AAAA,UACd,iBAAiB;AAAA,QACnB,CAAC;AAAA;AAAA,MAEA;AAAA,IACH;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,eAAQ;",
6
6
  "names": ["React", "Card", "Base", "clsx"]
7
7
  }
@@ -35,11 +35,13 @@ var import_react = __toESM(require("react"));
35
35
  var import_clsx = __toESM(require("clsx"));
36
36
  var import_Base = __toESM(require("@digigov/react-core/Base"));
37
37
  var import_ChoiceDividerText = __toESM(require("@digigov/react-core/ChoiceDividerText"));
38
+ var import_CheckboxItemInput = __toESM(require("@digigov/react-core/CheckboxItemInput"));
38
39
  var import_LabelContainer = __toESM(require("@digigov/react-core/LabelContainer"));
39
40
  const CheckboxItem = import_react.default.forwardRef(function CheckboxItem2({ name, value, dividerText, className, disabled, children, ...props }, ref) {
40
41
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, dividerText && /* @__PURE__ */ import_react.default.createElement(import_ChoiceDividerText.default, null, dividerText), /* @__PURE__ */ import_react.default.createElement(
41
- "div",
42
+ import_Base.default,
42
43
  {
44
+ as: "div",
43
45
  className: (0, import_clsx.default)(className, {
44
46
  "ds-checkboxes__item": true
45
47
  })
@@ -53,21 +55,7 @@ const CheckboxItem = import_react.default.forwardRef(function CheckboxItem2({ na
53
55
  })
54
56
  },
55
57
  children,
56
- /* @__PURE__ */ import_react.default.createElement(
57
- import_Base.default,
58
- {
59
- as: "input",
60
- ref,
61
- type: "checkbox",
62
- name,
63
- value,
64
- className: (0, import_clsx.default)({
65
- "ds-checkboxes__input": true
66
- }),
67
- disabled,
68
- ...props
69
- }
70
- )
58
+ /* @__PURE__ */ import_react.default.createElement(import_CheckboxItemInput.default, { ref, name, value, disabled, ...props })
71
59
  )
72
60
  ));
73
61
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/CheckboxItem/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport ChoiceDividerText from '@digigov/react-core/ChoiceDividerText';\nimport LabelContainer from '@digigov/react-core/LabelContainer';\n\nexport interface CheckboxItemProps extends BaseProps<'input'> {\n /**\n * dividerText is optional.\n * Add this prop to add a choice divider on top of a checkbox item.\n * The string is the text that it will appear above this checkbox item.\n */\n dividerText?: string;\n}\n/**\n * Details for the CheckboxItem.\n * CheckboxItem component allows the user to select one or more checkboxes\n * CheckboxItem must be used inside Checkbox component\n */\nexport const CheckboxItem = React.forwardRef<\n HTMLInputElement,\n CheckboxItemProps\n>(function CheckboxItem(\n { name, value, dividerText, className, disabled, children, ...props },\n ref\n) {\n return (\n <>\n {dividerText && <ChoiceDividerText>{dividerText}</ChoiceDividerText>}\n <div\n className={clsx(className, {\n 'ds-checkboxes__item': true,\n })}\n >\n <LabelContainer\n className={clsx({\n 'ds-checkboxes__label': true,\n 'ds-checkboxes__label--disabled': disabled,\n })}\n >\n {children}\n <Base\n as=\"input\"\n ref={ref}\n type=\"checkbox\"\n name={name}\n value={value}\n className={clsx({\n 'ds-checkboxes__input': true,\n })}\n disabled={disabled}\n {...props}\n />\n </LabelContainer>\n </div>\n </>\n );\n});\n\nexport default CheckboxItem;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAChC,+BAA8B;AAC9B,4BAA2B;AAepB,MAAM,eAAe,aAAAA,QAAM,WAGhC,SAASC,cACT,EAAE,MAAM,OAAO,aAAa,WAAW,UAAU,UAAU,GAAG,MAAM,GACpE,KACA;AACA,SACE,6BAAAD,QAAA,2BAAAA,QAAA,gBACG,eAAe,6BAAAA,QAAA,cAAC,yBAAAE,SAAA,MAAmB,WAAY,GAChD,6BAAAF,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,YAAAG,SAAK,WAAW;AAAA,QACzB,uBAAuB;AAAA,MACzB,CAAC;AAAA;AAAA,IAED,6BAAAH,QAAA;AAAA,MAAC,sBAAAI;AAAA,MAAA;AAAA,QACC,eAAW,YAAAD,SAAK;AAAA,UACd,wBAAwB;AAAA,UACxB,kCAAkC;AAAA,QACpC,CAAC;AAAA;AAAA,MAEA;AAAA,MACD,6BAAAH,QAAA;AAAA,QAAC,YAAAK;AAAA,QAAA;AAAA,UACC,IAAG;AAAA,UACH;AAAA,UACA,MAAK;AAAA,UACL;AAAA,UACA;AAAA,UACA,eAAW,YAAAF,SAAK;AAAA,YACd,wBAAwB;AAAA,UAC1B,CAAC;AAAA,UACD;AAAA,UACC,GAAG;AAAA;AAAA,MACN;AAAA,IACF;AAAA,EACF,CACF;AAEJ,CAAC;AAED,IAAO,uBAAQ;",
6
- "names": ["React", "CheckboxItem", "ChoiceDividerText", "clsx", "LabelContainer", "Base"]
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport ChoiceDividerText from '@digigov/react-core/ChoiceDividerText';\nimport CheckboxItemInput from '@digigov/react-core/CheckboxItemInput';\nimport LabelContainer from '@digigov/react-core/LabelContainer';\n\nexport interface CheckboxItemProps extends BaseProps<'input'> {\n /**\n * dividerText is optional.\n * Add this prop to add a choice divider on top of a checkbox item.\n * The string is the text that it will appear above this checkbox item.\n */\n dividerText?: string;\n}\n/**\n * Details for the CheckboxItem.\n * CheckboxItem component allows the user to select one or more checkboxes\n * CheckboxItem must be used inside Checkbox component\n */\nexport const CheckboxItem = React.forwardRef<\n HTMLInputElement,\n CheckboxItemProps\n>(function CheckboxItem(\n { name, value, dividerText, className, disabled, children, ...props },\n ref\n) {\n return (\n <>\n {dividerText && <ChoiceDividerText>{dividerText}</ChoiceDividerText>}\n <Base as='div'\n className={clsx(className, {\n 'ds-checkboxes__item': true,\n })}\n >\n <LabelContainer\n className={clsx({\n 'ds-checkboxes__label': true,\n 'ds-checkboxes__label--disabled': disabled,\n })}\n >\n {children}\n <CheckboxItemInput ref={ref} name={name} value={value} disabled={disabled} {...props} />\n </LabelContainer>\n </Base>\n </>\n );\n});\n\nexport default CheckboxItem;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAChC,+BAA8B;AAC9B,+BAA8B;AAC9B,4BAA2B;AAepB,MAAM,eAAe,aAAAA,QAAM,WAGhC,SAASC,cACT,EAAE,MAAM,OAAO,aAAa,WAAW,UAAU,UAAU,GAAG,MAAM,GACpE,KACA;AACA,SACE,6BAAAD,QAAA,2BAAAA,QAAA,gBACG,eAAe,6BAAAA,QAAA,cAAC,yBAAAE,SAAA,MAAmB,WAAY,GAChD,6BAAAF,QAAA;AAAA,IAAC,YAAAG;AAAA,IAAA;AAAA,MAAK,IAAG;AAAA,MACP,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,uBAAuB;AAAA,MACzB,CAAC;AAAA;AAAA,IAED,6BAAAJ,QAAA;AAAA,MAAC,sBAAAK;AAAA,MAAA;AAAA,QACC,eAAW,YAAAD,SAAK;AAAA,UACd,wBAAwB;AAAA,UACxB,kCAAkC;AAAA,QACpC,CAAC;AAAA;AAAA,MAEA;AAAA,MACD,6BAAAJ,QAAA,cAAC,yBAAAM,SAAA,EAAkB,KAAU,MAAY,OAAc,UAAqB,GAAG,OAAO;AAAA,IACxF;AAAA,EACF,CACF;AAEJ,CAAC;AAED,IAAO,uBAAQ;",
6
+ "names": ["React", "CheckboxItem", "ChoiceDividerText", "Base", "clsx", "LabelContainer", "CheckboxItemInput"]
7
7
  }
@@ -0,0 +1,40 @@
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var CheckboxItemInput_exports = {};
30
+ __export(CheckboxItemInput_exports, {
31
+ default: () => import_CheckboxItemInput.default
32
+ });
33
+ module.exports = __toCommonJS(CheckboxItemInput_exports);
34
+ __reExport(CheckboxItemInput_exports, require("@digigov/react-core/CheckboxItemInput/index.web"), module.exports);
35
+ var import_CheckboxItemInput = __toESM(require("@digigov/react-core/CheckboxItemInput/index.web"));
36
+ // Annotate the CommonJS export names for ESM import in node:
37
+ 0 && (module.exports = {
38
+ ...require("@digigov/react-core/CheckboxItemInput/index.web")
39
+ });
40
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/CheckboxItemInput/index.tsx"],
4
+ "sourcesContent": ["export * from '@digigov/react-core/CheckboxItemInput/index.web';\nexport { default as default } from '@digigov/react-core/CheckboxItemInput/index.web';"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sCAAc,4DAAd;AACA,+BAAmC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,53 @@
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 index_native_exports = {};
29
+ __export(index_native_exports, {
30
+ CheckboxItemInput: () => CheckboxItemInput,
31
+ default: () => index_native_default
32
+ });
33
+ module.exports = __toCommonJS(index_native_exports);
34
+ var import_extend = __toESM(require("@digigov/react-core/utils/extend.native"));
35
+ var import_CheckboxItemInput = __toESM(require("@digigov/react-core/CheckboxItemInput/index.web"));
36
+ var import_clsx = __toESM(require("clsx"));
37
+ const CheckboxItemInput = (0, import_extend.default)(
38
+ import_CheckboxItemInput.default,
39
+ ({ className, ...props }) => {
40
+ return {
41
+ ...props,
42
+ className: (0, import_clsx.default)(className, {
43
+ "ds-checkboxes__input__wrapper": true
44
+ })
45
+ };
46
+ }
47
+ );
48
+ var index_native_default = CheckboxItemInput;
49
+ // Annotate the CommonJS export names for ESM import in node:
50
+ 0 && (module.exports = {
51
+ CheckboxItemInput
52
+ });
53
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/CheckboxItemInput/index.native.tsx"],
4
+ "sourcesContent": ["import extend from '@digigov/react-core/utils/extend.native';\nimport CoreCheckboxItemInput from '@digigov/react-core/CheckboxItemInput/index.web';\nimport clsx from 'clsx';\n\nexport const CheckboxItemInput = extend(\n CoreCheckboxItemInput,\n ({ className, ...props }) => {\n return {\n ...props,\n className: clsx(className, {\n 'ds-checkboxes__input__wrapper': true,\n }),\n };\n }\n);\n\nexport default CheckboxItemInput;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAmB;AACnB,+BAAkC;AAClC,kBAAiB;AAEV,MAAM,wBAAoB,cAAAA;AAAA,EAC/B,yBAAAC;AAAA,EACA,CAAC,EAAE,WAAW,GAAG,MAAM,MAAM;AAC3B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,iCAAiC;AAAA,MACnC,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAEA,IAAO,uBAAQ;",
6
+ "names": ["extend", "CoreCheckboxItemInput", "clsx"]
7
+ }
@@ -0,0 +1,59 @@
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 index_web_exports = {};
29
+ __export(index_web_exports, {
30
+ CheckboxItemInput: () => CheckboxItemInput,
31
+ default: () => index_web_default
32
+ });
33
+ module.exports = __toCommonJS(index_web_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 CheckboxItemInput = import_react.default.forwardRef(function CheckboxItemInput2({ name, value, className, disabled, children, ...props }, ref) {
38
+ return /* @__PURE__ */ import_react.default.createElement(
39
+ import_Base.default,
40
+ {
41
+ as: "input",
42
+ ref,
43
+ type: "checkbox",
44
+ name,
45
+ value,
46
+ className: (0, import_clsx.default)({
47
+ "ds-checkboxes__input": true
48
+ }),
49
+ disabled,
50
+ ...props
51
+ }
52
+ );
53
+ });
54
+ var index_web_default = CheckboxItemInput;
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ CheckboxItemInput
58
+ });
59
+ //# sourceMappingURL=index.web.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/CheckboxItemInput/index.web.tsx"],
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CheckboxItemInputProps extends BaseProps<'input'> { }\n/**\n * Details for the CheckboxItem.\n * CheckboxItemInput component is the input component for CheckboxItem.\n */\nexport const CheckboxItemInput = React.forwardRef<\n HTMLInputElement,\n CheckboxItemInputProps\n>(function CheckboxItemInput(\n { name, value, className, disabled, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"input\"\n ref={ref}\n type=\"checkbox\"\n name={name}\n value={value}\n className={clsx({\n 'ds-checkboxes__input': true,\n })}\n disabled={disabled}\n {...props}\n />\n\n );\n});\n\nexport default CheckboxItemInput;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAOzB,MAAM,oBAAoB,aAAAA,QAAM,WAGrC,SAASC,mBACT,EAAE,MAAM,OAAO,WAAW,UAAU,UAAU,GAAG,MAAM,GACvD,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,eAAW,YAAAC,SAAK;AAAA,QACd,wBAAwB;AAAA,MAC1B,CAAC;AAAA,MACD;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAGJ,CAAC;AAED,IAAO,oBAAQ;",
6
+ "names": ["React", "CheckboxItemInput", "Base", "clsx"]
7
+ }
package/cjs/Chip/index.js CHANGED
@@ -49,8 +49,9 @@ const Chip = import_react.default.forwardRef(function Chip2({ className, onDelet
49
49
  onClick
50
50
  },
51
51
  /* @__PURE__ */ import_react.default.createElement(
52
- "div",
52
+ import_Base.default,
53
53
  {
54
+ as: "div",
54
55
  role: onClick && "button",
55
56
  tabIndex: onClick && 0,
56
57
  className: "ds-chip__content"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/Chip/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport { CloseIcon } from '@digigov/react-icons';\n\nexport interface ChipProps extends BaseProps<'li'> {\n /**\n\n */\n onDelete?: (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;\n}\n/**\n * Chips can be used to represent small blocks of information.\n * Chip component must be inside ChipContainer component.\n */\nexport const Chip = React.forwardRef<HTMLLIElement, ChipProps>(function Chip(\n { className, onDelete, onClick, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"li\"\n ref={ref}\n className={clsx(className, {\n 'ds-chip': true,\n 'ds-chip--deletable': !!onDelete,\n })}\n {...props}\n onClick={onClick}\n >\n <div\n role={onClick && 'button'}\n tabIndex={onClick && 0}\n className=\"ds-chip__content\"\n >\n {children}\n {onDelete && (\n <CloseIcon\n onClick={(e) => {\n e.stopPropagation();\n onDelete(e);\n }}\n />\n )}\n </div>\n </Base>\n );\n});\n\nexport default Chip;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAChC,yBAA0B;AAYnB,MAAM,OAAO,aAAAA,QAAM,WAAqC,SAASC,MACtE,EAAE,WAAW,UAAU,SAAS,UAAU,GAAG,MAAM,GACnD,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,WAAW;AAAA,QACX,sBAAsB,CAAC,CAAC;AAAA,MAC1B,CAAC;AAAA,MACA,GAAG;AAAA,MACJ;AAAA;AAAA,IAEA,6BAAAH,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,WAAW;AAAA,QACjB,UAAU,WAAW;AAAA,QACrB,WAAU;AAAA;AAAA,MAET;AAAA,MACA,YACC,6BAAAA,QAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,CAAC,MAAM;AACd,cAAE,gBAAgB;AAClB,qBAAS,CAAC;AAAA,UACZ;AAAA;AAAA,MACF;AAAA,IAEJ;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,eAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport { CloseIcon } from '@digigov/react-icons';\n\nexport interface ChipProps extends BaseProps<'li'> {\n /**\n\n */\n onDelete?: (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;\n}\n/**\n * Chips can be used to represent small blocks of information.\n * Chip component must be inside ChipContainer component.\n */\nexport const Chip = React.forwardRef<HTMLLIElement, ChipProps>(function Chip(\n { className, onDelete, onClick, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"li\"\n ref={ref}\n className={clsx(className, {\n 'ds-chip': true,\n 'ds-chip--deletable': !!onDelete,\n })}\n {...props}\n onClick={onClick}\n >\n <Base as='div'\n role={onClick && 'button'}\n tabIndex={onClick && 0}\n className=\"ds-chip__content\"\n >\n {children}\n {onDelete && (\n <CloseIcon\n onClick={(e) => {\n e.stopPropagation();\n onDelete(e);\n }}\n />\n )}\n </Base>\n </Base>\n );\n});\n\nexport default Chip;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAChC,yBAA0B;AAYnB,MAAM,OAAO,aAAAA,QAAM,WAAqC,SAASC,MACtE,EAAE,WAAW,UAAU,SAAS,UAAU,GAAG,MAAM,GACnD,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,WAAW;AAAA,QACX,sBAAsB,CAAC,CAAC;AAAA,MAC1B,CAAC;AAAA,MACA,GAAG;AAAA,MACJ;AAAA;AAAA,IAEA,6BAAAH,QAAA;AAAA,MAAC,YAAAE;AAAA,MAAA;AAAA,QAAK,IAAG;AAAA,QACP,MAAM,WAAW;AAAA,QACjB,UAAU,WAAW;AAAA,QACrB,WAAU;AAAA;AAAA,MAET;AAAA,MACA,YACC,6BAAAF,QAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,CAAC,MAAM;AACd,cAAE,gBAAgB;AAClB,qBAAS,CAAC;AAAA,UACZ;AAAA;AAAA,MACF;AAAA,IAEJ;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,eAAQ;",
6
6
  "names": ["React", "Chip", "Base", "clsx"]
7
7
  }
@@ -34,15 +34,14 @@ module.exports = __toCommonJS(CodeBlockContainer_exports);
34
34
  var import_react = __toESM(require("react"));
35
35
  var import_clsx = __toESM(require("clsx"));
36
36
  var import_Base = __toESM(require("@digigov/react-core/Base"));
37
- const CodeBlockContainer = import_react.default.forwardRef(function CodeBlockContainer2({ className, wrapLines = false, children, ...props }, ref) {
37
+ const CodeBlockContainer = import_react.default.forwardRef(function CodeBlockContainer2({ className, children, ...props }, ref) {
38
38
  return /* @__PURE__ */ import_react.default.createElement(
39
39
  import_Base.default,
40
40
  {
41
41
  as: "div",
42
42
  ref,
43
43
  className: (0, import_clsx.default)(className, {
44
- "ds-code-block__container": true,
45
- "ds-code-block__container--wrap-lines": wrapLines
44
+ "ds-code-block__container": true
46
45
  }),
47
46
  ...props
48
47
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/CodeBlockContainer/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CodeBlockContainerProps extends BaseProps<'div'> {\n /**\n * wrapLines prop is optional.\n * wrapLines prop is used to wrap the lines horizontally over the container.\n * @value true is used to activate the wrapLines styles.\n * @value false is used to deactivate the wrapLines styles.\n * @default false\n */\n wrapLines?: true | false;\n}\n/**\n * CodeBlockContainer can be used as a colored container for text.\n *\n */\nexport const CodeBlockContainer = React.forwardRef<\n HTMLDivElement,\n CodeBlockContainerProps\n>(function CodeBlockContainer(\n { className, wrapLines = false, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-code-block__container': true,\n 'ds-code-block__container--wrap-lines': wrapLines,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default CodeBlockContainer;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAgBzB,MAAM,qBAAqB,aAAAA,QAAM,WAGtC,SAASC,oBACT,EAAE,WAAW,YAAY,OAAO,UAAU,GAAG,MAAM,GACnD,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,4BAA4B;AAAA,QAC5B,wCAAwC;AAAA,MAC1C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,6BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CodeBlockContainerProps extends BaseProps<'div'> { }\n/**\n * CodeBlockContainer is a component for displaying code.\n *\n */\nexport const CodeBlockContainer = React.forwardRef<\n HTMLDivElement,\n CodeBlockContainerProps\n>(function CodeBlockContainer({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-code-block__container': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default CodeBlockContainer;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAOzB,MAAM,qBAAqB,aAAAA,QAAM,WAGtC,SAASC,oBAAmB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACpE,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,4BAA4B;AAAA,MAC9B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,6BAAQ;",
6
6
  "names": ["React", "CodeBlockContainer", "Base", "clsx"]
7
7
  }
@@ -35,9 +35,10 @@ var import_react = __toESM(require("react"));
35
35
  var import_clsx = __toESM(require("clsx"));
36
36
  var import_Base = __toESM(require("@digigov/react-core/Base"));
37
37
  const CodeBlockContent = import_react.default.forwardRef(function CodeBlockContent2({ className, children, ...props }, ref) {
38
- return /* @__PURE__ */ import_react.default.createElement(import_Base.default, { as: "pre", ref, className: (0, import_clsx.default)(className), ...props }, /* @__PURE__ */ import_react.default.createElement(
39
- "code",
38
+ return /* @__PURE__ */ import_react.default.createElement(import_Base.default, { as: "pre", ref, className, ...props }, /* @__PURE__ */ import_react.default.createElement(
39
+ import_Base.default,
40
40
  {
41
+ as: "code",
41
42
  className: (0, import_clsx.default)({
42
43
  "ds-code-block__content": true
43
44
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/CodeBlockContent/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CodeBlockContentProps extends BaseProps<'pre'> { }\n/**\n * CodeBlockContent can be used as content inside the CodeBlockContainer\n *\n */\nexport const CodeBlockContent = React.forwardRef<\n HTMLPreElement,\n CodeBlockContentProps\n>(function CodeBlockContent({ className, children, ...props }, ref) {\n return (\n <Base as=\"pre\" ref={ref} className={clsx(className)} {...props}>\n <code\n className={clsx({\n 'ds-code-block__content': true,\n })}\n >\n {children}\n </code>\n </Base>\n );\n});\n\nexport default CodeBlockContent;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAOzB,MAAM,mBAAmB,aAAAA,QAAM,WAGpC,SAASC,kBAAiB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAClE,SACE,6BAAAD,QAAA,cAAC,YAAAE,SAAA,EAAK,IAAG,OAAM,KAAU,eAAW,YAAAC,SAAK,SAAS,GAAI,GAAG,SACvD,6BAAAH,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,YAAAG,SAAK;AAAA,QACd,0BAA0B;AAAA,MAC5B,CAAC;AAAA;AAAA,IAEA;AAAA,EACH,CACF;AAEJ,CAAC;AAED,IAAO,2BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CodeBlockContentProps extends BaseProps<'pre'> { }\n/**\n * CodeBlockContent can be used as content inside the CodeBlockContainer.\n *\n */\nexport const CodeBlockContent = React.forwardRef<\n HTMLPreElement,\n CodeBlockContentProps\n>(function CodeBlockContent({ className, children, ...props }, ref) {\n return (\n <Base as=\"pre\" ref={ref} className={className} {...props}>\n <Base\n as=\"code\"\n className={clsx({\n 'ds-code-block__content': true,\n })}\n >\n {children}\n </Base>\n </Base>\n );\n});\n\nexport default CodeBlockContent;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAOzB,MAAM,mBAAmB,aAAAA,QAAM,WAGpC,SAASC,kBAAiB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AAClE,SACE,6BAAAD,QAAA,cAAC,YAAAE,SAAA,EAAK,IAAG,OAAM,KAAU,WAAuB,GAAG,SACjD,6BAAAF,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH,eAAW,YAAAC,SAAK;AAAA,QACd,0BAA0B;AAAA,MAC5B,CAAC;AAAA;AAAA,IAEA;AAAA,EACH,CACF;AAEJ,CAAC;AAED,IAAO,2BAAQ;",
6
6
  "names": ["React", "CodeBlockContent", "Base", "clsx"]
7
7
  }
@@ -42,9 +42,7 @@ const CodeBlockHeader = import_react.default.forwardRef(function CodeBlockHeader
42
42
  ref,
43
43
  className: (0, import_clsx.default)(className, {
44
44
  "ds-code-block__header": true,
45
- "ds-code-block__header--start": justify === "start",
46
- "ds-code-block__header--space-between": justify === "spaceBetween",
47
- "ds-code-block__header--end": justify === "end"
45
+ [`ds-code-block__header--${justify}`]: justify !== void 0
48
46
  }),
49
47
  ...props
50
48
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/CodeBlockHeader/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CodeBlockHeaderProps extends BaseProps<'div'> {\n /**\n * justify prop is optional.\n * justify prop is used the justify-content style.\n * @value 'start' is used to place the header's content at the start.\n * @value 'end' is used to place the header's content at the end.\n * @value 'spaceBetween' is recommended for two items in header.\n * @default 'start'\n */\n justify?: 'start' | 'spaceBetween' | 'end';\n}\n/**\n * CodeBlockHeader can be used as header inside the CodeBlockContainer.\n *\n */\nexport const CodeBlockHeader = React.forwardRef<\n HTMLDivElement,\n CodeBlockHeaderProps\n>(function CodeBlockHeader(\n { className, justify = 'start', children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-code-block__header': true,\n 'ds-code-block__header--start': justify === 'start',\n 'ds-code-block__header--space-between': justify === 'spaceBetween',\n 'ds-code-block__header--end': justify === 'end',\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default CodeBlockHeader;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAiBzB,MAAM,kBAAkB,aAAAA,QAAM,WAGnC,SAASC,iBACT,EAAE,WAAW,UAAU,SAAS,UAAU,GAAG,MAAM,GACnD,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,yBAAyB;AAAA,QACzB,gCAAgC,YAAY;AAAA,QAC5C,wCAAwC,YAAY;AAAA,QACpD,8BAA8B,YAAY;AAAA,MAC5C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,0BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CodeBlockHeaderProps extends BaseProps<'div'> {\n /**\n * justify prop is optional.\n * justify prop is used the justify-content style.\n * @value 'start' is used to place the header's content at the start.\n * @value 'end' is used to place the header's content at the end.\n * @value 'spaceBetween' is recommended for two items in header.\n * @default 'start'\n */\n justify?: 'start' | 'space-between' | 'end';\n}\n/**\n * CodeBlockHeader can be used as header inside the CodeBlockContainer.\n *\n */\nexport const CodeBlockHeader = React.forwardRef<\n HTMLDivElement,\n CodeBlockHeaderProps\n>(function CodeBlockHeader(\n { className, justify = 'start', children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-code-block__header': true,\n [`ds-code-block__header--${justify}`]: justify !== undefined,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default CodeBlockHeader;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAAiB;AACjB,kBAAgC;AAiBzB,MAAM,kBAAkB,aAAAA,QAAM,WAGnC,SAASC,iBACT,EAAE,WAAW,UAAU,SAAS,UAAU,GAAG,MAAM,GACnD,KACA;AACA,SACE,6BAAAD,QAAA;AAAA,IAAC,YAAAE;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,eAAW,YAAAC,SAAK,WAAW;AAAA,QACzB,yBAAyB;AAAA,QACzB,CAAC,0BAA0B,OAAO,EAAE,GAAG,YAAY;AAAA,MACrD,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,0BAAQ;",
6
6
  "names": ["React", "CodeBlockHeader", "Base", "clsx"]
7
7
  }
@@ -16,6 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  }
17
17
  return to;
18
18
  };
19
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
19
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
21
  // If the importer is in node compatibility mode or this is not an ESM
21
22
  // file that has been converted to a CommonJS file using a Babel-
@@ -27,50 +28,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
29
  var CopyToClipboardContainer_exports = {};
29
30
  __export(CopyToClipboardContainer_exports, {
30
- CopyToClipboardContainer: () => CopyToClipboardContainer,
31
- default: () => CopyToClipboardContainer_default
31
+ default: () => import_CopyToClipboardContainer.default
32
32
  });
33
33
  module.exports = __toCommonJS(CopyToClipboardContainer_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 CopyToClipboardContainer = import_react.default.forwardRef(function CopyToClipboardContainer2({
38
- variant = "tooltip",
39
- tooltipAlign = "right",
40
- className,
41
- dense,
42
- children,
43
- ...props
44
- }, ref) {
45
- return /* @__PURE__ */ import_react.default.createElement(
46
- import_Base.default,
47
- {
48
- as: "div",
49
- ref,
50
- ...props,
51
- className: (0, import_clsx.default)(className, {
52
- "ds-copy-to-clipboard": true
53
- }),
54
- ...props
55
- },
56
- /* @__PURE__ */ import_react.default.createElement(
57
- "div",
58
- {
59
- className: (0, import_clsx.default)(className, {
60
- "ds-copy-to-clipboard__tooltip": variant === "tooltip",
61
- "ds-copy-to-clipboard__tooltip--dense": variant === "tooltip" && dense,
62
- "ds-copy-to-clipboard__tooltip--left": variant === "tooltip" && tooltipAlign === "left",
63
- "ds-copy-to-clipboard__tooltip--right": variant === "tooltip" && tooltipAlign === "right",
64
- "ds-copy-to-clipboard__banner": variant === "banner"
65
- })
66
- },
67
- children
68
- )
69
- );
70
- });
71
- var CopyToClipboardContainer_default = CopyToClipboardContainer;
34
+ __reExport(CopyToClipboardContainer_exports, require("@digigov/react-core/CopyToClipboardContainer/index.web"), module.exports);
35
+ var import_CopyToClipboardContainer = __toESM(require("@digigov/react-core/CopyToClipboardContainer/index.web"));
72
36
  // Annotate the CommonJS export names for ESM import in node:
73
37
  0 && (module.exports = {
74
- CopyToClipboardContainer
38
+ ...require("@digigov/react-core/CopyToClipboardContainer/index.web")
75
39
  });
76
40
  //# sourceMappingURL=index.js.map