@digigov/react-core 2.0.0-2445d5cb → 2.0.0-36b707c1

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 (403) 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 +104 -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 +94 -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 -1
  77. package/CodeBlockContainer/index.js.map +1 -1
  78. package/CodeBlockContent/index.d.ts +1 -1
  79. package/CodeBlockContent/index.js +3 -2
  80. package/CodeBlockContent/index.js.map +2 -2
  81. package/CodeBlockHeader/index.d.ts +1 -1
  82. package/CodeBlockHeader/index.js +1 -3
  83. package/CodeBlockHeader/index.js.map +2 -2
  84. package/CopyToClipboardContainer/index.d.ts +2 -31
  85. package/CopyToClipboardContainer/index.js +3 -40
  86. package/CopyToClipboardContainer/index.js.map +3 -3
  87. package/CopyToClipboardContainer/index.web/index.js +44 -0
  88. package/CopyToClipboardContainer/index.web/package.json +6 -0
  89. package/CopyToClipboardContainer/index.web.d.ts +31 -0
  90. package/CopyToClipboardContainer/index.web.js.map +7 -0
  91. package/CopyToClipboardMessage/index.d.ts +2 -18
  92. package/CopyToClipboardMessage/index.js +3 -21
  93. package/CopyToClipboardMessage/index.js.map +3 -3
  94. package/CopyToClipboardMessage/index.native/index.js +18 -0
  95. package/CopyToClipboardMessage/index.native/package.json +6 -0
  96. package/CopyToClipboardMessage/index.native.d.ts +6 -0
  97. package/CopyToClipboardMessage/index.native.js.map +7 -0
  98. package/CopyToClipboardMessage/index.web/index.js +24 -0
  99. package/CopyToClipboardMessage/index.web/package.json +6 -0
  100. package/CopyToClipboardMessage/index.web.d.ts +18 -0
  101. package/CopyToClipboardMessage/index.web.js.map +7 -0
  102. package/DateInputItem/index.d.ts +2 -26
  103. package/DateInputItem/index.js +3 -41
  104. package/DateInputItem/index.js.map +3 -3
  105. package/DateInputItem/index.native/index.js +17 -0
  106. package/DateInputItem/index.native/package.json +6 -0
  107. package/DateInputItem/index.native.d.ts +4 -0
  108. package/DateInputItem/index.native.js.map +7 -0
  109. package/DateInputItem/index.web/index.js +32 -0
  110. package/DateInputItem/index.web/package.json +6 -0
  111. package/DateInputItem/index.web.d.ts +26 -0
  112. package/DateInputItem/index.web.js.map +7 -0
  113. package/Details/index.d.ts +2 -10
  114. package/Details/index.js +3 -22
  115. package/Details/index.js.map +3 -3
  116. package/Details/index.native/index.js +17 -0
  117. package/Details/index.native/package.json +6 -0
  118. package/Details/index.native.d.ts +4 -0
  119. package/Details/index.native.js.map +7 -0
  120. package/Details/index.web/index.js +25 -0
  121. package/Details/index.web/package.json +6 -0
  122. package/Details/index.web.d.ts +10 -0
  123. package/Details/index.web.js.map +7 -0
  124. package/FieldsetLegend/index.js +1 -4
  125. package/FieldsetLegend/index.js.map +2 -2
  126. package/LabelTitle/index.js +2 -4
  127. package/LabelTitle/index.js.map +2 -2
  128. package/ModalContainer/index.js +1 -7
  129. package/ModalContainer/index.js.map +2 -2
  130. package/NavListItemActionContainer/index.d.ts +2 -10
  131. package/NavListItemActionContainer/index.js +3 -20
  132. package/NavListItemActionContainer/index.js.map +3 -3
  133. package/NavListItemActionContainer/index.native/index.js +17 -0
  134. package/NavListItemActionContainer/index.native/package.json +6 -0
  135. package/NavListItemActionContainer/index.native.d.ts +7 -0
  136. package/NavListItemActionContainer/index.native.js.map +7 -0
  137. package/NavListItemActionContainer/index.web/index.js +23 -0
  138. package/NavListItemActionContainer/index.web/package.json +6 -0
  139. package/NavListItemActionContainer/index.web.d.ts +10 -0
  140. package/NavListItemActionContainer/index.web.js.map +7 -0
  141. package/NotificationBannerLink/index.d.ts +2 -11
  142. package/NotificationBannerLink/index.js +3 -19
  143. package/NotificationBannerLink/index.js.map +3 -3
  144. package/NotificationBannerLink/index.native/index.js +16 -0
  145. package/NotificationBannerLink/index.native/package.json +6 -0
  146. package/NotificationBannerLink/index.native.d.ts +8 -0
  147. package/NotificationBannerLink/index.native.js.map +7 -0
  148. package/NotificationBannerLink/index.web/index.js +22 -0
  149. package/NotificationBannerLink/index.web/package.json +6 -0
  150. package/NotificationBannerLink/index.web.d.ts +11 -0
  151. package/NotificationBannerLink/index.web.js.map +7 -0
  152. package/PhaseBanner/index.js +2 -1
  153. package/PhaseBanner/index.js.map +2 -2
  154. package/PhaseBannerTag/index.d.ts +2 -2
  155. package/PhaseBannerTag/index.js +1 -1
  156. package/PhaseBannerTag/index.js.map +1 -1
  157. package/PhaseBannerText/index.js +1 -1
  158. package/PhaseBannerText/index.js.map +2 -2
  159. package/RadioItem/index.js +2 -1
  160. package/RadioItem/index.js.map +2 -2
  161. package/Stack/index.d.ts +9 -1
  162. package/Stack/index.js +6 -1
  163. package/Stack/index.js.map +2 -2
  164. package/SummaryList/index.d.ts +1 -1
  165. package/SummaryList/index.js.map +2 -2
  166. package/SummaryListItemKey/index.d.ts +14 -0
  167. package/SummaryListItemKey/index.js +5 -2
  168. package/SummaryListItemKey/index.js.map +2 -2
  169. package/TextArea/index.d.ts +2 -24
  170. package/TextArea/index.js +3 -27
  171. package/TextArea/index.js.map +3 -3
  172. package/TextArea/index.native/index.js +16 -0
  173. package/TextArea/index.native/package.json +6 -0
  174. package/TextArea/index.native.d.ts +4 -0
  175. package/TextArea/index.native.js.map +7 -0
  176. package/TextArea/index.web/index.js +30 -0
  177. package/TextArea/index.web/package.json +6 -0
  178. package/TextArea/index.web.d.ts +24 -0
  179. package/TextArea/index.web.js.map +7 -0
  180. package/TextInput/index.d.ts +2 -46
  181. package/TextInput/index.js +3 -40
  182. package/TextInput/index.js.map +3 -3
  183. package/TextInput/index.native/index.js +19 -0
  184. package/TextInput/index.native/package.json +6 -0
  185. package/TextInput/index.native.d.ts +4 -0
  186. package/TextInput/index.native.js.map +7 -0
  187. package/TextInput/index.web/index.js +43 -0
  188. package/TextInput/index.web/package.json +6 -0
  189. package/TextInput/index.web.d.ts +46 -0
  190. package/TextInput/index.web.js.map +7 -0
  191. package/Unpurge/index.js +2458 -1
  192. package/Unpurge/index.js.map +2 -2
  193. package/WarningText/index.js +7 -12
  194. package/WarningText/index.js.map +2 -2
  195. package/WarningTextAssistive/index.d.ts +15 -0
  196. package/WarningTextAssistive/index.js +23 -0
  197. package/WarningTextAssistive/index.js.map +7 -0
  198. package/WarningTextAssistive/package.json +6 -0
  199. package/cjs/Base/compat/Input/CheckboxInput.native/index.js +66 -0
  200. package/cjs/Base/compat/Input/CheckboxInput.native.js.map +7 -0
  201. package/cjs/Base/compat/Input/RadioInput.native/index.js +65 -0
  202. package/cjs/Base/compat/Input/RadioInput.native.js.map +7 -0
  203. package/cjs/Base/compat/Input/StringInput.native/index.js +129 -0
  204. package/cjs/Base/compat/Input/StringInput.native.js.map +7 -0
  205. package/cjs/Base/compat/Input/index.native/index.js +55 -0
  206. package/cjs/Base/compat/Input/index.native.js.map +7 -0
  207. package/cjs/Base/compat/button.native/index.js +81 -0
  208. package/cjs/Base/compat/button.native.js.map +7 -0
  209. package/cjs/Base/compat/details.native/index.js +65 -0
  210. package/cjs/Base/compat/details.native.js.map +7 -0
  211. package/cjs/Base/compat/li.native/index.js +42 -0
  212. package/cjs/Base/compat/li.native.js.map +7 -0
  213. package/cjs/Base/compat/ol.native/index.js +66 -0
  214. package/cjs/Base/compat/ol.native.js.map +7 -0
  215. package/cjs/Base/index.js +5 -99
  216. package/cjs/Base/index.js.map +3 -3
  217. package/cjs/Base/index.native/index.js +193 -0
  218. package/cjs/Base/index.native.js.map +7 -0
  219. package/cjs/Base/index.web/index.js +137 -0
  220. package/cjs/Base/index.web.js.map +7 -0
  221. package/cjs/Base/mapping.native/index.js +67 -0
  222. package/cjs/Base/mapping.native.js.map +7 -0
  223. package/cjs/Base/utils/index.js +127 -0
  224. package/cjs/Base/utils.js.map +7 -0
  225. package/cjs/Base/wrap.native/index.js +97 -0
  226. package/cjs/Base/wrap.native.js.map +7 -0
  227. package/cjs/CallToAction/index.js +1 -1
  228. package/cjs/CallToAction/index.js.map +2 -2
  229. package/cjs/Card/index.js +2 -1
  230. package/cjs/Card/index.js.map +2 -2
  231. package/cjs/CheckboxItem/index.js +4 -16
  232. package/cjs/CheckboxItem/index.js.map +3 -3
  233. package/cjs/CheckboxItemInput/index.js +40 -0
  234. package/cjs/CheckboxItemInput/index.js.map +7 -0
  235. package/cjs/CheckboxItemInput/index.native/index.js +53 -0
  236. package/cjs/CheckboxItemInput/index.native.js.map +7 -0
  237. package/cjs/CheckboxItemInput/index.web/index.js +59 -0
  238. package/cjs/CheckboxItemInput/index.web.js.map +7 -0
  239. package/cjs/Chip/index.js +2 -1
  240. package/cjs/Chip/index.js.map +2 -2
  241. package/cjs/CodeBlockContainer/index.js.map +1 -1
  242. package/cjs/CodeBlockContent/index.js +3 -2
  243. package/cjs/CodeBlockContent/index.js.map +2 -2
  244. package/cjs/CodeBlockHeader/index.js +1 -3
  245. package/cjs/CodeBlockHeader/index.js.map +2 -2
  246. package/cjs/CopyToClipboardContainer/index.js +5 -41
  247. package/cjs/CopyToClipboardContainer/index.js.map +3 -3
  248. package/cjs/CopyToClipboardContainer/index.web/index.js +77 -0
  249. package/cjs/CopyToClipboardContainer/index.web.js.map +7 -0
  250. package/cjs/CopyToClipboardMessage/index.js +5 -22
  251. package/cjs/CopyToClipboardMessage/index.js.map +3 -3
  252. package/cjs/CopyToClipboardMessage/index.native/index.js +51 -0
  253. package/cjs/CopyToClipboardMessage/index.native.js.map +7 -0
  254. package/cjs/CopyToClipboardMessage/index.web/index.js +57 -0
  255. package/cjs/CopyToClipboardMessage/index.web.js.map +7 -0
  256. package/cjs/DateInputItem/index.js +5 -42
  257. package/cjs/DateInputItem/index.js.map +3 -3
  258. package/cjs/DateInputItem/index.native/index.js +50 -0
  259. package/cjs/DateInputItem/index.native.js.map +7 -0
  260. package/cjs/DateInputItem/index.web/index.js +65 -0
  261. package/cjs/DateInputItem/index.web.js.map +7 -0
  262. package/cjs/Details/index.js +5 -23
  263. package/cjs/Details/index.js.map +3 -3
  264. package/cjs/Details/index.native/index.js +50 -0
  265. package/cjs/Details/index.native.js.map +7 -0
  266. package/cjs/Details/index.web/index.js +58 -0
  267. package/cjs/Details/index.web.js.map +7 -0
  268. package/cjs/FieldsetLegend/index.js +1 -4
  269. package/cjs/FieldsetLegend/index.js.map +2 -2
  270. package/cjs/LabelTitle/index.js +2 -4
  271. package/cjs/LabelTitle/index.js.map +2 -2
  272. package/cjs/ModalContainer/index.js +1 -7
  273. package/cjs/ModalContainer/index.js.map +2 -2
  274. package/cjs/NavListItemActionContainer/index.js +5 -21
  275. package/cjs/NavListItemActionContainer/index.js.map +3 -3
  276. package/cjs/NavListItemActionContainer/index.native/index.js +50 -0
  277. package/cjs/NavListItemActionContainer/index.native.js.map +7 -0
  278. package/cjs/NavListItemActionContainer/index.web/index.js +56 -0
  279. package/cjs/NavListItemActionContainer/index.web.js.map +7 -0
  280. package/cjs/NotificationBannerLink/index.js +5 -20
  281. package/cjs/NotificationBannerLink/index.js.map +3 -3
  282. package/cjs/NotificationBannerLink/index.native/index.js +49 -0
  283. package/cjs/NotificationBannerLink/index.native.js.map +7 -0
  284. package/cjs/NotificationBannerLink/index.web/index.js +55 -0
  285. package/cjs/NotificationBannerLink/index.web.js.map +7 -0
  286. package/cjs/PhaseBanner/index.js +2 -1
  287. package/cjs/PhaseBanner/index.js.map +2 -2
  288. package/cjs/PhaseBannerTag/index.js +1 -1
  289. package/cjs/PhaseBannerTag/index.js.map +1 -1
  290. package/cjs/PhaseBannerText/index.js +1 -1
  291. package/cjs/PhaseBannerText/index.js.map +2 -2
  292. package/cjs/RadioItem/index.js +2 -1
  293. package/cjs/RadioItem/index.js.map +3 -3
  294. package/cjs/Stack/index.js +6 -1
  295. package/cjs/Stack/index.js.map +2 -2
  296. package/cjs/SummaryList/index.js.map +2 -2
  297. package/cjs/SummaryListItemKey/index.js +5 -2
  298. package/cjs/SummaryListItemKey/index.js.map +2 -2
  299. package/cjs/TextArea/index.js +5 -28
  300. package/cjs/TextArea/index.js.map +3 -3
  301. package/cjs/TextArea/index.native/index.js +49 -0
  302. package/cjs/TextArea/index.native.js.map +7 -0
  303. package/cjs/TextArea/index.web/index.js +63 -0
  304. package/cjs/TextArea/index.web.js.map +7 -0
  305. package/cjs/TextInput/index.js +5 -41
  306. package/cjs/TextInput/index.js.map +3 -3
  307. package/cjs/TextInput/index.native/index.js +52 -0
  308. package/cjs/TextInput/index.native.js.map +7 -0
  309. package/cjs/TextInput/index.web/index.js +76 -0
  310. package/cjs/TextInput/index.web.js.map +7 -0
  311. package/cjs/Unpurge/index.js +2458 -1
  312. package/cjs/Unpurge/index.js.map +2 -2
  313. package/cjs/WarningText/index.js +7 -12
  314. package/cjs/WarningText/index.js.map +2 -2
  315. package/cjs/WarningTextAssistive/index.js +56 -0
  316. package/cjs/WarningTextAssistive/index.js.map +7 -0
  317. package/cjs/index.js +5 -1
  318. package/cjs/index.js.map +2 -2
  319. package/cjs/lazy/index.js +12 -10
  320. package/cjs/lazy.js.map +2 -2
  321. package/cjs/registry/index.js +27 -1
  322. package/cjs/registry.js.map +2 -2
  323. package/cjs/utils/extend.native/index.js +47 -0
  324. package/cjs/utils/extend.native.js.map +7 -0
  325. package/index.d.ts +2 -0
  326. package/index.js +3 -1
  327. package/index.js.map +2 -2
  328. package/lazy/index.js +12 -10
  329. package/lazy.d.ts +219 -217
  330. package/lazy.js.map +2 -2
  331. package/package.json +21 -4
  332. package/registry/index.js +27 -1
  333. package/registry.d.ts +13 -0
  334. package/registry.js.map +2 -2
  335. package/src/Base/compat/Input/CheckboxInput.native.tsx +40 -0
  336. package/src/Base/compat/Input/RadioInput.native.tsx +39 -0
  337. package/src/Base/compat/Input/StringInput.native.tsx +115 -0
  338. package/src/Base/compat/Input/index.native.tsx +28 -0
  339. package/src/Base/compat/button.native.tsx +53 -0
  340. package/src/Base/compat/details.native.tsx +68 -0
  341. package/src/Base/compat/li.native.tsx +11 -0
  342. package/src/Base/compat/ol.native.tsx +41 -0
  343. package/src/Base/index.native.tsx +185 -0
  344. package/src/Base/index.tsx +2 -257
  345. package/src/Base/index.web.tsx +267 -0
  346. package/src/Base/mapping.native.tsx +41 -0
  347. package/src/Base/utils.ts +95 -0
  348. package/src/Base/wrap.native.tsx +94 -0
  349. package/src/CallToAction/index.tsx +2 -2
  350. package/src/Card/index.tsx +3 -2
  351. package/src/CheckboxItem/index.tsx +4 -14
  352. package/src/CheckboxItemInput/index.native.tsx +17 -0
  353. package/src/CheckboxItemInput/index.tsx +2 -0
  354. package/src/CheckboxItemInput/index.web.tsx +34 -0
  355. package/src/Chip/index.tsx +2 -2
  356. package/src/CodeBlockContainer/index.tsx +1 -1
  357. package/src/CodeBlockContent/index.tsx +5 -4
  358. package/src/CodeBlockHeader/index.tsx +2 -4
  359. package/src/CopyToClipboardContainer/index.tsx +2 -74
  360. package/src/CopyToClipboardContainer/index.web.tsx +75 -0
  361. package/src/CopyToClipboardMessage/index.native.tsx +21 -0
  362. package/src/CopyToClipboardMessage/index.tsx +2 -41
  363. package/src/CopyToClipboardMessage/index.web.tsx +41 -0
  364. package/src/DateInputItem/index.native.tsx +12 -0
  365. package/src/DateInputItem/index.tsx +2 -64
  366. package/src/DateInputItem/index.web.tsx +53 -0
  367. package/src/Details/index.native.tsx +14 -0
  368. package/src/Details/index.tsx +2 -27
  369. package/src/Details/index.web.tsx +27 -0
  370. package/src/FieldsetLegend/index.tsx +1 -4
  371. package/src/LabelTitle/index.tsx +2 -4
  372. package/src/ModalContainer/index.tsx +12 -10
  373. package/src/NavListItemActionContainer/index.native.tsx +18 -0
  374. package/src/NavListItemActionContainer/index.tsx +2 -28
  375. package/src/NavListItemActionContainer/index.web.tsx +28 -0
  376. package/src/NotificationBannerLink/index.native.tsx +22 -0
  377. package/src/NotificationBannerLink/index.tsx +2 -28
  378. package/src/NotificationBannerLink/index.web.tsx +28 -0
  379. package/src/PhaseBanner/index.tsx +2 -2
  380. package/src/PhaseBannerTag/index.tsx +3 -3
  381. package/src/PhaseBannerText/__snapshots__/index.test.tsx.snap +1 -1
  382. package/src/PhaseBannerText/index.tsx +1 -1
  383. package/src/RadioItem/index.tsx +2 -2
  384. package/src/Stack/index.tsx +32 -13
  385. package/src/SummaryList/index.tsx +7 -5
  386. package/src/SummaryListItemKey/index.tsx +24 -2
  387. package/src/TextArea/index.native.tsx +11 -0
  388. package/src/TextArea/index.tsx +2 -50
  389. package/src/TextArea/index.web.tsx +50 -0
  390. package/src/TextInput/index.native.tsx +15 -0
  391. package/src/TextInput/index.tsx +2 -87
  392. package/src/TextInput/index.web.tsx +87 -0
  393. package/src/Unpurge/index.tsx +2460 -2
  394. package/src/WarningText/index.tsx +12 -15
  395. package/src/WarningTextAssistive/index.tsx +37 -0
  396. package/src/index.ts +2 -0
  397. package/src/lazy.js +12 -10
  398. package/src/registry.js +28 -2
  399. package/src/utils/extend.native.tsx +36 -0
  400. package/utils/extend.native/index.js +14 -0
  401. package/utils/extend.native/package.json +6 -0
  402. package/utils/extend.native.d.ts +23 -0
  403. package/utils/extend.native.js.map +7 -0
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ import { TouchableOpacity, View } from "react-native";
3
+ const CheckboxInput = React.forwardRef(function CheckboxInput2({ checked, value, onChange, ...props }, ref) {
4
+ const handlePress = () => {
5
+ if (onChange) {
6
+ const syntheticEvent = {
7
+ currentTarget: {
8
+ value,
9
+ checked: !checked
10
+ }
11
+ };
12
+ onChange(syntheticEvent);
13
+ }
14
+ };
15
+ return (
16
+ // @ts-ignore
17
+ /* @__PURE__ */ React.createElement(
18
+ TouchableOpacity,
19
+ {
20
+ ref,
21
+ onPress: handlePress,
22
+ ...props
23
+ },
24
+ checked && /* @__PURE__ */ React.createElement(View, { className: "ds-checkboxes__input--checked" })
25
+ )
26
+ );
27
+ });
28
+ var CheckboxInput_native_default = CheckboxInput;
29
+ export {
30
+ CheckboxInput,
31
+ CheckboxInput_native_default as default
32
+ };
33
+ //# sourceMappingURL=CheckboxInput.native.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "types": "./index.d.ts",
5
+ "main": "../../../../cjs/Base/compat/Input/CheckboxInput.native/index.js"
6
+ }
@@ -0,0 +1,4 @@
1
+ import React, { DetailedHTMLProps, InputHTMLAttributes } from 'react';
2
+ export type CheckboxInputProps = Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'ref'>;
3
+ export declare const CheckboxInput: React.ForwardRefExoticComponent<CheckboxInputProps & React.RefAttributes<HTMLInputElement>>;
4
+ export default CheckboxInput;
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/Base/compat/Input/CheckboxInput.native.tsx"],
4
+ "sourcesContent": ["import React, {\n DetailedHTMLProps,\n InputHTMLAttributes,\n LegacyRef,\n} from 'react';\nimport { TouchableOpacity, View } from 'react-native';\n\nexport type CheckboxInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'ref'\n>;\n\nexport const CheckboxInput = React.forwardRef<\n HTMLInputElement,\n CheckboxInputProps\n>(function CheckboxInput({ checked, value, onChange, ...props }, ref) {\n const handlePress = () => {\n if (onChange) {\n const syntheticEvent = {\n currentTarget: {\n value,\n checked: !checked,\n },\n } as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n return (\n // @ts-ignore\n <TouchableOpacity\n ref={ref as LegacyRef<TouchableOpacity>}\n onPress={handlePress}\n {...props}\n >\n {checked && <View className=\"ds-checkboxes__input--checked\" />}\n </TouchableOpacity>\n );\n});\n\nexport default CheckboxInput;\n"],
5
+ "mappings": "AAAA,OAAO,WAIA;AACP,SAAS,kBAAkB,YAAY;AAOhC,MAAM,gBAAgB,MAAM,WAGjC,SAASA,eAAc,EAAE,SAAS,OAAO,UAAU,GAAG,MAAM,GAAG,KAAK;AACpE,QAAM,cAAc,MAAM;AACxB,QAAI,UAAU;AACZ,YAAM,iBAAiB;AAAA,QACrB,eAAe;AAAA,UACb;AAAA,UACA,SAAS,CAAC;AAAA,QACZ;AAAA,MACF;AACA,eAAS,cAAc;AAAA,IACzB;AAAA,EACF;AACA;AAAA;AAAA,IAEE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACR,GAAG;AAAA;AAAA,MAEH,WAAW,oCAAC,QAAK,WAAU,iCAAgC;AAAA,IAC9D;AAAA;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
6
+ "names": ["CheckboxInput"]
7
+ }
@@ -0,0 +1,32 @@
1
+ import React from "react";
2
+ import { TouchableOpacity, View } from "react-native";
3
+ const RadioInput = React.forwardRef(
4
+ function RadioInput2({ value, checked, onChange, ...props }, ref) {
5
+ const handlePress = () => {
6
+ if (onChange) {
7
+ const syntheticEvent = {
8
+ target: {
9
+ value,
10
+ checked: true
11
+ }
12
+ };
13
+ onChange(syntheticEvent);
14
+ }
15
+ };
16
+ return /* @__PURE__ */ React.createElement(
17
+ TouchableOpacity,
18
+ {
19
+ ref,
20
+ onPress: handlePress,
21
+ ...props
22
+ },
23
+ checked && /* @__PURE__ */ React.createElement(View, { className: "ds-radios__input--checked" })
24
+ );
25
+ }
26
+ );
27
+ var RadioInput_native_default = RadioInput;
28
+ export {
29
+ RadioInput,
30
+ RadioInput_native_default as default
31
+ };
32
+ //# sourceMappingURL=RadioInput.native.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "types": "./index.d.ts",
5
+ "main": "../../../../cjs/Base/compat/Input/RadioInput.native/index.js"
6
+ }
@@ -0,0 +1,4 @@
1
+ import React, { DetailedHTMLProps, InputHTMLAttributes } from 'react';
2
+ export type RadioInputProps = Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'ref'>;
3
+ export declare const RadioInput: React.ForwardRefExoticComponent<RadioInputProps & React.RefAttributes<HTMLInputElement>>;
4
+ export default RadioInput;
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/Base/compat/Input/RadioInput.native.tsx"],
4
+ "sourcesContent": ["import React, {\n DetailedHTMLProps,\n InputHTMLAttributes,\n LegacyRef,\n} from 'react';\nimport { TouchableOpacity, View } from 'react-native';\n\nexport type RadioInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'ref'\n>;\n\nexport const RadioInput = React.forwardRef<HTMLInputElement, RadioInputProps>(\n function RadioInput({ value, checked, onChange, ...props }, ref) {\n const handlePress = () => {\n if (onChange) {\n const syntheticEvent = {\n target: {\n value: value,\n checked: true,\n },\n } as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n\n return (\n <TouchableOpacity\n ref={ref as LegacyRef<typeof TouchableOpacity>}\n onPress={handlePress}\n {...(props as any)}\n >\n {checked && <View className=\"ds-radios__input--checked\" />}\n </TouchableOpacity>\n );\n }\n);\n\nexport default RadioInput;\n"],
5
+ "mappings": "AAAA,OAAO,WAIA;AACP,SAAS,kBAAkB,YAAY;AAOhC,MAAM,aAAa,MAAM;AAAA,EAC9B,SAASA,YAAW,EAAE,OAAO,SAAS,UAAU,GAAG,MAAM,GAAG,KAAK;AAC/D,UAAM,cAAc,MAAM;AACxB,UAAI,UAAU;AACZ,cAAM,iBAAiB;AAAA,UACrB,QAAQ;AAAA,YACN;AAAA,YACA,SAAS;AAAA,UACX;AAAA,QACF;AACA,iBAAS,cAAc;AAAA,MACzB;AAAA,IACF;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACR,GAAI;AAAA;AAAA,MAEJ,WAAW,oCAAC,QAAK,WAAU,6BAA4B;AAAA,IAC1D;AAAA,EAEJ;AACF;AAEA,IAAO,4BAAQ;",
6
+ "names": ["RadioInput"]
7
+ }
@@ -0,0 +1,99 @@
1
+ import React, {
2
+ useEffect,
3
+ useMemo
4
+ } from "react";
5
+ import { TextInput } from "react-native";
6
+ const StringInput = React.forwardRef(
7
+ function StringInput2({
8
+ "data-type": dataType,
9
+ onChange,
10
+ onBlur,
11
+ onFocus,
12
+ value,
13
+ maxLength,
14
+ multiline,
15
+ rows,
16
+ disabled,
17
+ ...props
18
+ }, ref) {
19
+ const [currentValue, setValue] = React.useState(value);
20
+ const keyboardType = useMemo(() => {
21
+ switch (dataType) {
22
+ case "afm":
23
+ return "number-pad";
24
+ case "phone_number":
25
+ return "phone-pad";
26
+ case "mobile_phone":
27
+ return "phone-pad";
28
+ case "postal_code":
29
+ return "number-pad";
30
+ case "int":
31
+ return "numeric";
32
+ case "email":
33
+ return "email-address";
34
+ default:
35
+ return "default";
36
+ }
37
+ }, [dataType]);
38
+ useEffect(() => {
39
+ if (currentValue !== value) {
40
+ handleChange();
41
+ }
42
+ }, [currentValue]);
43
+ useEffect(() => {
44
+ if (currentValue !== value) {
45
+ setValue(value);
46
+ }
47
+ }, [value]);
48
+ const handleChange = () => {
49
+ if (onChange) {
50
+ const syntheticEvent = {
51
+ target: {
52
+ value: currentValue
53
+ }
54
+ };
55
+ onChange(syntheticEvent);
56
+ }
57
+ };
58
+ const handleBlur = () => {
59
+ if (onBlur) {
60
+ const syntheticEvent = {
61
+ target: {
62
+ value: currentValue
63
+ }
64
+ };
65
+ onBlur(syntheticEvent);
66
+ }
67
+ };
68
+ const handleFocus = () => {
69
+ if (onFocus) {
70
+ const syntheticEvent = {
71
+ target: {
72
+ value: currentValue
73
+ }
74
+ };
75
+ onFocus(syntheticEvent);
76
+ }
77
+ };
78
+ return /* @__PURE__ */ React.createElement(
79
+ TextInput,
80
+ {
81
+ ref,
82
+ onChangeText: setValue,
83
+ onBlur: handleBlur,
84
+ onFocus: handleFocus,
85
+ value: currentValue,
86
+ multiline,
87
+ rows,
88
+ editable: !disabled,
89
+ maxLength: Number(maxLength) || void 0,
90
+ keyboardType,
91
+ ...props
92
+ }
93
+ );
94
+ }
95
+ );
96
+ export {
97
+ StringInput
98
+ };
99
+ //# sourceMappingURL=StringInput.native.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "types": "./index.d.ts",
5
+ "main": "../../../../cjs/Base/compat/Input/StringInput.native/index.js"
6
+ }
@@ -0,0 +1,7 @@
1
+ import React, { DetailedHTMLProps, InputHTMLAttributes } from 'react';
2
+ export interface StringInputProps extends Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'ref'> {
3
+ 'data-type'?: string;
4
+ multiline?: boolean;
5
+ rows?: number;
6
+ }
7
+ export declare const StringInput: React.ForwardRefExoticComponent<StringInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/Base/compat/Input/StringInput.native.tsx"],
4
+ "sourcesContent": ["import React, {\n DetailedHTMLProps,\n InputHTMLAttributes,\n useEffect,\n useMemo,\n} from 'react';\nimport { TextInput } from 'react-native';\n\nexport interface StringInputProps\n extends Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'ref'\n > {\n 'data-type'?: string;\n multiline?: boolean;\n rows?: number;\n}\n\nexport const StringInput = React.forwardRef<HTMLInputElement, StringInputProps>(\n function StringInput(\n {\n 'data-type': dataType,\n onChange,\n onBlur,\n onFocus,\n value,\n maxLength,\n multiline,\n rows,\n disabled,\n ...props\n }: StringInputProps,\n ref\n ) {\n const [currentValue, setValue] = React.useState(value);\n\n const keyboardType = useMemo(() => {\n switch (dataType) {\n case 'afm':\n return 'number-pad';\n case 'phone_number':\n return 'phone-pad';\n case 'mobile_phone':\n return 'phone-pad';\n case 'postal_code':\n return 'number-pad';\n case 'int':\n return 'numeric';\n case 'email':\n return 'email-address';\n default:\n return 'default';\n }\n }, [dataType]);\n\n useEffect(() => {\n if (currentValue !== value) {\n handleChange();\n }\n }, [currentValue]);\n useEffect(() => {\n if (currentValue !== value) {\n setValue(value);\n }\n }, [value]);\n\n const handleChange = () => {\n if (onChange) {\n const syntheticEvent = {\n target: {\n value: currentValue,\n },\n } as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n\n const handleBlur = () => {\n if (onBlur) {\n const syntheticEvent = {\n target: {\n value: currentValue,\n },\n } as React.FocusEvent<HTMLInputElement>;\n onBlur(syntheticEvent);\n }\n };\n\n const handleFocus = () => {\n if (onFocus) {\n const syntheticEvent = {\n target: {\n value: currentValue,\n },\n } as React.FocusEvent<HTMLInputElement>;\n onFocus(syntheticEvent);\n }\n };\n return (\n <TextInput\n ref={ref}\n onChangeText={setValue}\n onBlur={handleBlur}\n onFocus={handleFocus}\n value={currentValue}\n multiline={multiline}\n rows={rows}\n editable={!disabled}\n maxLength={Number(maxLength) || undefined}\n keyboardType={keyboardType}\n {...(props as any)}\n />\n );\n }\n);\n"],
5
+ "mappings": "AAAA,OAAO;AAAA,EAGL;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB;AAYnB,MAAM,cAAc,MAAM;AAAA,EAC/B,SAASA,aACP;AAAA,IACE,aAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,UAAM,CAAC,cAAc,QAAQ,IAAI,MAAM,SAAS,KAAK;AAErD,UAAM,eAAe,QAAQ,MAAM;AACjC,cAAQ,UAAU;AAAA,QAChB,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT,KAAK;AACH,iBAAO;AAAA,QACT;AACE,iBAAO;AAAA,MACX;AAAA,IACF,GAAG,CAAC,QAAQ,CAAC;AAEb,cAAU,MAAM;AACd,UAAI,iBAAiB,OAAO;AAC1B,qBAAa;AAAA,MACf;AAAA,IACF,GAAG,CAAC,YAAY,CAAC;AACjB,cAAU,MAAM;AACd,UAAI,iBAAiB,OAAO;AAC1B,iBAAS,KAAK;AAAA,MAChB;AAAA,IACF,GAAG,CAAC,KAAK,CAAC;AAEV,UAAM,eAAe,MAAM;AACzB,UAAI,UAAU;AACZ,cAAM,iBAAiB;AAAA,UACrB,QAAQ;AAAA,YACN,OAAO;AAAA,UACT;AAAA,QACF;AACA,iBAAS,cAAc;AAAA,MACzB;AAAA,IACF;AAEA,UAAM,aAAa,MAAM;AACvB,UAAI,QAAQ;AACV,cAAM,iBAAiB;AAAA,UACrB,QAAQ;AAAA,YACN,OAAO;AAAA,UACT;AAAA,QACF;AACA,eAAO,cAAc;AAAA,MACvB;AAAA,IACF;AAEA,UAAM,cAAc,MAAM;AACxB,UAAI,SAAS;AACX,cAAM,iBAAiB;AAAA,UACrB,QAAQ;AAAA,YACN,OAAO;AAAA,UACT;AAAA,QACF;AACA,gBAAQ,cAAc;AAAA,MACxB;AAAA,IACF;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,cAAc;AAAA,QACd,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,OAAO;AAAA,QACP;AAAA,QACA;AAAA,QACA,UAAU,CAAC;AAAA,QACX,WAAW,OAAO,SAAS,KAAK;AAAA,QAChC;AAAA,QACC,GAAI;AAAA;AAAA,IACP;AAAA,EAEJ;AACF;",
6
+ "names": ["StringInput"]
7
+ }
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import CheckboxInput from "@digigov/react-core/Base/compat/Input/CheckboxInput.native";
3
+ import RadioInput from "@digigov/react-core/Base/compat/Input/RadioInput.native";
4
+ import {
5
+ StringInput
6
+ } from "@digigov/react-core/Base/compat/Input/StringInput.native";
7
+ const BaseInput = React.forwardRef(
8
+ function BaseInput2(props, ref) {
9
+ switch (props.type) {
10
+ case "radio":
11
+ return /* @__PURE__ */ React.createElement(RadioInput, { ref, ...props });
12
+ case "checkbox":
13
+ return /* @__PURE__ */ React.createElement(CheckboxInput, { ref, ...props });
14
+ default:
15
+ return /* @__PURE__ */ React.createElement(StringInput, { ref, ...props });
16
+ }
17
+ }
18
+ );
19
+ var index_native_default = BaseInput;
20
+ export {
21
+ BaseInput,
22
+ index_native_default as default
23
+ };
24
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "types": "./index.d.ts",
5
+ "main": "../../../../cjs/Base/compat/Input/index.native/index.js"
6
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { CheckboxInputProps } from '@digigov/react-core/Base/compat/Input/CheckboxInput.native';
3
+ import { RadioInputProps } from '@digigov/react-core/Base/compat/Input/RadioInput.native';
4
+ import { StringInputProps } from '@digigov/react-core/Base/compat/Input/StringInput.native';
5
+ type InputProps = RadioInputProps | CheckboxInputProps | StringInputProps;
6
+ export declare const BaseInput: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
7
+ export default BaseInput;
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/Base/compat/Input/index.native.tsx"],
4
+ "sourcesContent": ["import React from 'react';\nimport CheckboxInput, {\n CheckboxInputProps,\n} from '@digigov/react-core/Base/compat/Input/CheckboxInput.native';\nimport RadioInput, {\n RadioInputProps,\n} from '@digigov/react-core/Base/compat/Input/RadioInput.native';\nimport {\n StringInput,\n StringInputProps,\n} from '@digigov/react-core/Base/compat/Input/StringInput.native';\n\ntype InputProps = RadioInputProps | CheckboxInputProps | StringInputProps;\n\nexport const BaseInput = React.forwardRef<HTMLInputElement, InputProps>(\n function BaseInput(props, ref) {\n switch (props.type) {\n case 'radio':\n return <RadioInput ref={ref} {...props} />;\n case 'checkbox':\n return <CheckboxInput ref={ref} {...props} />;\n default:\n return <StringInput ref={ref} {...props} />;\n }\n }\n);\n\nexport default BaseInput;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,mBAEA;AACP,OAAO,gBAEA;AACP;AAAA,EACE;AAAA,OAEK;AAIA,MAAM,YAAY,MAAM;AAAA,EAC7B,SAASA,WAAU,OAAO,KAAK;AAC7B,YAAQ,MAAM,MAAM;AAAA,MAClB,KAAK;AACH,eAAO,oCAAC,cAAW,KAAW,GAAG,OAAO;AAAA,MAC1C,KAAK;AACH,eAAO,oCAAC,iBAAc,KAAW,GAAG,OAAO;AAAA,MAC7C;AACE,eAAO,oCAAC,eAAY,KAAW,GAAG,OAAO;AAAA,IAC7C;AAAA,EACF;AACF;AAEA,IAAO,uBAAQ;",
6
+ "names": ["BaseInput"]
7
+ }
@@ -0,0 +1,48 @@
1
+ import React, {
2
+ useContext
3
+ } from "react";
4
+ import { Pressable } from "react-native";
5
+ import { FormContext } from "@digigov/form/FormContext";
6
+ const FormButton = React.forwardRef(
7
+ function FormButton2({ onClick, ...props }, ref) {
8
+ const formContext = useContext(FormContext);
9
+ return /* @__PURE__ */ React.createElement(
10
+ CompatButton,
11
+ {
12
+ ref,
13
+ ...props,
14
+ onClick: () => {
15
+ onClick && onClick({});
16
+ if (props.type) formContext?.[props.type]();
17
+ }
18
+ }
19
+ );
20
+ }
21
+ );
22
+ const CompatButton = React.forwardRef(
23
+ function CompatButton2({ onClick, ...props }, ref) {
24
+ return /* @__PURE__ */ React.createElement(
25
+ Pressable,
26
+ {
27
+ onPress: onClick,
28
+ ref,
29
+ hitSlop: 10,
30
+ ...props
31
+ }
32
+ );
33
+ }
34
+ );
35
+ const Button = React.forwardRef(
36
+ function Button2(props, ref) {
37
+ if (props.type && ["submit", "reset"].includes(props.type)) {
38
+ return /* @__PURE__ */ React.createElement(FormButton, { ref, ...props });
39
+ }
40
+ return /* @__PURE__ */ React.createElement(CompatButton, { ref, ...props });
41
+ }
42
+ );
43
+ export {
44
+ Button,
45
+ CompatButton,
46
+ FormButton
47
+ };
48
+ //# sourceMappingURL=button.native.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "types": "./index.d.ts",
5
+ "main": "../../../cjs/Base/compat/button.native/index.js"
6
+ }
@@ -0,0 +1,5 @@
1
+ import React, { ButtonHTMLAttributes, DetailedHTMLProps } from 'react';
2
+ export type ButtonProps = Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, 'ref'>;
3
+ export declare const FormButton: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<unknown>>;
4
+ export declare const CompatButton: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<unknown>>;
5
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<unknown>>;
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/Base/compat/button.native.tsx"],
4
+ "sourcesContent": ["import React, {\n ButtonHTMLAttributes,\n DetailedHTMLProps,\n useContext,\n} from 'react';\nimport { Pressable } from 'react-native';\n// @ts-expect-error - `@digigov/form` is to be removed as a dependency\nimport { FormContext } from '@digigov/form/FormContext';\n\n// TODO: Fix `ButtonProps` type\nexport type ButtonProps = Omit<\n DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>,\n 'ref'\n>;\n\nexport const FormButton = React.forwardRef<unknown, ButtonProps>(\n function FormButton({ onClick, ...props }, ref) {\n const formContext = useContext(FormContext);\n return (\n <CompatButton\n ref={ref}\n {...props}\n onClick={() => {\n onClick && onClick({} as React.MouseEvent<HTMLButtonElement>);\n if (props.type) formContext?.[props.type]();\n }}\n />\n );\n }\n);\n\n// TODO: Fix `ref` type\nexport const CompatButton = React.forwardRef<unknown, ButtonProps>(\n function CompatButton({ onClick, ...props }, ref) {\n return (\n <Pressable\n onPress={onClick as any}\n ref={ref as any}\n hitSlop={10}\n {...(props as any)}\n />\n );\n }\n);\n\nexport const Button = React.forwardRef<unknown, ButtonProps>(\n function Button(props, ref) {\n if (props.type && ['submit', 'reset'].includes(props.type)) {\n return <FormButton ref={ref} {...props} />;\n }\n return <CompatButton ref={ref} {...props} />;\n }\n);\n"],
5
+ "mappings": "AAAA,OAAO;AAAA,EAGL;AAAA,OACK;AACP,SAAS,iBAAiB;AAE1B,SAAS,mBAAmB;AAQrB,MAAM,aAAa,MAAM;AAAA,EAC9B,SAASA,YAAW,EAAE,SAAS,GAAG,MAAM,GAAG,KAAK;AAC9C,UAAM,cAAc,WAAW,WAAW;AAC1C,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACC,GAAG;AAAA,QACJ,SAAS,MAAM;AACb,qBAAW,QAAQ,CAAC,CAAwC;AAC5D,cAAI,MAAM,KAAM,eAAc,MAAM,IAAI,EAAE;AAAA,QAC5C;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAGO,MAAM,eAAe,MAAM;AAAA,EAChC,SAASC,cAAa,EAAE,SAAS,GAAG,MAAM,GAAG,KAAK;AAChD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT;AAAA,QACA,SAAS;AAAA,QACR,GAAI;AAAA;AAAA,IACP;AAAA,EAEJ;AACF;AAEO,MAAM,SAAS,MAAM;AAAA,EAC1B,SAASC,QAAO,OAAO,KAAK;AAC1B,QAAI,MAAM,QAAQ,CAAC,UAAU,OAAO,EAAE,SAAS,MAAM,IAAI,GAAG;AAC1D,aAAO,oCAAC,cAAW,KAAW,GAAG,OAAO;AAAA,IAC1C;AACA,WAAO,oCAAC,gBAAa,KAAW,GAAG,OAAO;AAAA,EAC5C;AACF;",
6
+ "names": ["FormButton", "CompatButton", "Button"]
7
+ }
@@ -0,0 +1,40 @@
1
+ import React, {
2
+ useEffect,
3
+ useState,
4
+ Children
5
+ } from "react";
6
+ import { View, Text, TouchableOpacity, StyleSheet } from "react-native";
7
+ const CompatDetails = ({
8
+ children,
9
+ open = false,
10
+ placement,
11
+ closeIcon,
12
+ openIcon,
13
+ ...props
14
+ }) => {
15
+ const [isExpanded, setIsExpanded] = useState(open);
16
+ useEffect(() => {
17
+ setIsExpanded(open);
18
+ }, [open]);
19
+ const toggleExpand = () => {
20
+ setIsExpanded(!isExpanded);
21
+ };
22
+ const [summaryContent, ...detailsContent] = Children.toArray(children);
23
+ const toggleIcon = closeIcon && openIcon ? /* @__PURE__ */ React.createElement(Text, null, isExpanded ? openIcon : closeIcon) : null;
24
+ return (
25
+ // TODO: Fix `props` type
26
+ // @ts-expect-error - `props` type is not compatible with `View` props
27
+ /* @__PURE__ */ React.createElement(View, { ...props }, /* @__PURE__ */ React.createElement(TouchableOpacity, { onPress: toggleExpand, style: styles.summaryContainer }, placement === "before" && toggleIcon, summaryContent, placement === "after" && toggleIcon), isExpanded && /* @__PURE__ */ React.createElement(View, null, detailsContent))
28
+ );
29
+ };
30
+ const styles = StyleSheet.create({
31
+ summaryContainer: {
32
+ flexDirection: "row",
33
+ alignItems: "center"
34
+ }
35
+ });
36
+ var details_native_default = CompatDetails;
37
+ export {
38
+ details_native_default as default
39
+ };
40
+ //# sourceMappingURL=details.native.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "types": "./index.d.ts",
5
+ "main": "../../../cjs/Base/compat/details.native/index.js"
6
+ }
@@ -0,0 +1,8 @@
1
+ import React, { DetailedHTMLProps, DetailsHTMLAttributes } from 'react';
2
+ type HTMLElementProps = Omit<DetailedHTMLProps<DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>, 'ref'> & {
3
+ closeIcon?: string;
4
+ openIcon?: string;
5
+ placement?: 'before' | 'after';
6
+ };
7
+ declare const CompatDetails: ({ children, open, placement, closeIcon, openIcon, ...props }: HTMLElementProps) => React.JSX.Element;
8
+ export default CompatDetails;
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/Base/compat/details.native.tsx"],
4
+ "sourcesContent": ["import React, {\n useEffect,\n useState,\n Children,\n DetailedHTMLProps,\n DetailsHTMLAttributes,\n} from 'react';\nimport { View, Text, TouchableOpacity, StyleSheet } from 'react-native';\n\ntype HTMLElementProps = Omit<\n DetailedHTMLProps<\n DetailsHTMLAttributes<HTMLDetailsElement>,\n HTMLDetailsElement\n >,\n 'ref'\n> & {\n closeIcon?: string;\n openIcon?: string;\n placement?: 'before' | 'after';\n};\n\nconst CompatDetails = ({\n children,\n open = false,\n placement,\n closeIcon,\n openIcon,\n ...props\n}: HTMLElementProps) => {\n const [isExpanded, setIsExpanded] = useState(open);\n\n useEffect(() => {\n setIsExpanded(open);\n }, [open]);\n\n const toggleExpand = () => {\n setIsExpanded(!isExpanded);\n };\n\n const [summaryContent, ...detailsContent] = Children.toArray(children);\n\n const toggleIcon =\n closeIcon && openIcon ? (\n <Text>{isExpanded ? openIcon : closeIcon}</Text>\n ) : null;\n\n return (\n // TODO: Fix `props` type\n // @ts-expect-error - `props` type is not compatible with `View` props\n <View {...props}>\n <TouchableOpacity onPress={toggleExpand} style={styles.summaryContainer}>\n {placement === 'before' && toggleIcon}\n {summaryContent}\n {placement === 'after' && toggleIcon}\n </TouchableOpacity>\n {isExpanded && <View>{detailsContent}</View>}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n summaryContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n },\n});\n\nexport default CompatDetails;\n"],
5
+ "mappings": "AAAA,OAAO;AAAA,EACL;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,MAAM,MAAM,kBAAkB,kBAAkB;AAczD,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAwB;AACtB,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,IAAI;AAEjD,YAAU,MAAM;AACd,kBAAc,IAAI;AAAA,EACpB,GAAG,CAAC,IAAI,CAAC;AAET,QAAM,eAAe,MAAM;AACzB,kBAAc,CAAC,UAAU;AAAA,EAC3B;AAEA,QAAM,CAAC,gBAAgB,GAAG,cAAc,IAAI,SAAS,QAAQ,QAAQ;AAErE,QAAM,aACJ,aAAa,WACX,oCAAC,YAAM,aAAa,WAAW,SAAU,IACvC;AAEN;AAAA;AAAA;AAAA,IAGE,oCAAC,QAAM,GAAG,SACR,oCAAC,oBAAiB,SAAS,cAAc,OAAO,OAAO,oBACpD,cAAc,YAAY,YAC1B,gBACA,cAAc,WAAW,UAC5B,GACC,cAAc,oCAAC,YAAM,cAAe,CACvC;AAAA;AAEJ;AAEA,MAAM,SAAS,WAAW,OAAO;AAAA,EAC/B,kBAAkB;AAAA,IAChB,eAAe;AAAA,IACf,YAAY;AAAA,EACd;AACF,CAAC;AAED,IAAO,yBAAQ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { View } from "react-native";
3
+ const Li = (props) => {
4
+ return /* @__PURE__ */ React.createElement(View, { ...props });
5
+ };
6
+ export {
7
+ Li
8
+ };
9
+ //# sourceMappingURL=li.native.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "types": "./index.d.ts",
5
+ "main": "../../../cjs/Base/compat/li.native/index.js"
6
+ }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface LiProps {
3
+ [key: string]: any;
4
+ }
5
+ export declare const Li: (props: LiProps) => React.JSX.Element;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/Base/compat/li.native.tsx"],
4
+ "sourcesContent": ["import React from 'react';\nimport { View } from 'react-native';\n\n// TODO: Fix `props` type\ninterface LiProps {\n [key: string]: any;\n}\n\nexport const Li = (props: LiProps) => {\n return <View {...props} />;\n};\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,YAAY;AAOd,MAAM,KAAK,CAAC,UAAmB;AACpC,SAAO,oCAAC,QAAM,GAAG,OAAO;AAC1B;",
6
+ "names": []
7
+ }
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ import { View, Text } from "react-native";
3
+ const Ol = ({ children, className, ...props }) => {
4
+ let listStyle = "none";
5
+ if (className.includes("ds-list--bullet")) {
6
+ listStyle = "bullet";
7
+ }
8
+ if (className.includes("ds-list--number")) {
9
+ listStyle = "number";
10
+ }
11
+ return /* @__PURE__ */ React.createElement(View, { ...props, className }, Array.isArray(children) ? children.map((child, index) => {
12
+ const counter = listStyle === "number" ? index + 1 : listStyle === "bullet" ? "\u2022" : null;
13
+ return /* @__PURE__ */ React.createElement(
14
+ View,
15
+ {
16
+ key: index,
17
+ style: {
18
+ display: "flex",
19
+ flexDirection: "row",
20
+ flexWrap: "nowrap",
21
+ gap: 8,
22
+ width: "100%"
23
+ }
24
+ },
25
+ /* @__PURE__ */ React.createElement(Text, null, counter),
26
+ child
27
+ );
28
+ }) : children);
29
+ };
30
+ export {
31
+ Ol
32
+ };
33
+ //# sourceMappingURL=ol.native.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "types": "./index.d.ts",
5
+ "main": "../../../cjs/Base/compat/ol.native/index.js"
6
+ }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const Ol: ({ children, className, ...props }: {
3
+ [x: string]: any;
4
+ children: any;
5
+ className: any;
6
+ }) => React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/Base/compat/ol.native.tsx"],
4
+ "sourcesContent": ["import React from 'react';\nimport { View, Text } from 'react-native';\n\nexport const Ol = ({ children, className, ...props }) => {\n let listStyle = 'none';\n if (className.includes('ds-list--bullet')) {\n listStyle = 'bullet';\n }\n if (className.includes('ds-list--number')) {\n listStyle = 'number';\n }\n return (\n <View {...props} className={className}>\n {Array.isArray(children)\n ? children.map((child, index) => {\n const counter =\n listStyle === 'number'\n ? index + 1\n : listStyle === 'bullet'\n ? '\u2022'\n : null;\n return (\n <View\n key={index}\n style={{\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'nowrap',\n gap: 8,\n width: '100%',\n }}\n >\n <Text>{counter}</Text>\n {child}\n </View>\n );\n })\n : children}\n </View>\n );\n};\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,MAAM,YAAY;AAEpB,MAAM,KAAK,CAAC,EAAE,UAAU,WAAW,GAAG,MAAM,MAAM;AACvD,MAAI,YAAY;AAChB,MAAI,UAAU,SAAS,iBAAiB,GAAG;AACzC,gBAAY;AAAA,EACd;AACA,MAAI,UAAU,SAAS,iBAAiB,GAAG;AACzC,gBAAY;AAAA,EACd;AACA,SACE,oCAAC,QAAM,GAAG,OAAO,aACd,MAAM,QAAQ,QAAQ,IACnB,SAAS,IAAI,CAAC,OAAO,UAAU;AAC7B,UAAM,UACJ,cAAc,WACV,QAAQ,IACR,cAAc,WACZ,WACA;AACR,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,OAAO;AAAA,UACL,SAAS;AAAA,UACT,eAAe;AAAA,UACf,UAAU;AAAA,UACV,KAAK;AAAA,UACL,OAAO;AAAA,QACT;AAAA;AAAA,MAEA,oCAAC,YAAM,OAAQ;AAAA,MACd;AAAA,IACH;AAAA,EAEJ,CAAC,IACD,QACN;AAEJ;",
6
+ "names": []
7
+ }
package/Base/index.d.ts CHANGED
@@ -1,95 +1,2 @@
1
- import React from 'react';
2
- type AsProp<C extends React.ElementType> = {
3
- as?: C;
4
- };
5
- type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
6
- type PolymorphicComponentProp<C extends React.ElementType, Props = Record<string, unknown>> = React.PropsWithChildren<Props & AsProp<C>> & Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
7
- type PolymorphicComponentPropWithRef<C extends React.ElementType, Props = Record<string, unknown>> = PolymorphicComponentProp<C, Props> & {
8
- ref?: any;
9
- };
10
- /**
11
- * This is the updated component props using PolymorphicComponentPropWithRef
12
- */
13
- export type BaseProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<C, {
14
- /** margin is optional. It has not a default value. */
15
- margin?: spacingValues;
16
- /** marginTop is optional. It has not a default value. */
17
- marginTop?: spacingValues;
18
- /** marginBottom is optional. It has not a default value. */
19
- marginBottom?: spacingValues;
20
- /** marginLeft is optional. It has not a default value. */
21
- marginLeft?: spacingValues;
22
- /** marginRight is optional. It has not a default value. */
23
- marginRight?: spacingValues;
24
- /** Alternative for margin. Margin is optional. It has not a default value. */
25
- m?: spacingValues;
26
- /** Alternative for marginTop. MarginTop is optional. It has not a default value. */
27
- mt?: spacingValues;
28
- /** Alternative for marginBottom. MarginBottom is optional. It has not a default value. */
29
- mb?: spacingValues;
30
- /** Alternative for marginLeft. MarginLeft is optional. It has not a default value. */
31
- ml?: spacingValues;
32
- /** Alternative for marginRight. MarginRight is optional. It has not a default value. */
33
- mr?: spacingValues;
34
- /** Alternative for marginX. MarginX is optional. It has not a default value. */
35
- mx?: spacingValues;
36
- /** Alternative for marginY. MarginY is optional. It has not a default value. */
37
- my?: spacingValues;
38
- /** padding is optional. It has not a default value. */
39
- padding?: spacingValues;
40
- /** paddingTop is optional. It has not a default value. */
41
- paddingTop?: spacingValues;
42
- /** paddingBottom is optional. It has not a default value. */
43
- paddingBottom?: spacingValues;
44
- /** paddingLeft is optional. It has not a default value. */
45
- paddingLeft?: spacingValues;
46
- /** paddingRight is optional. It has not a default value. */
47
- paddingRight?: spacingValues;
48
- /** Alternative for padding. Padding is optional. It has not a default value. */
49
- p?: spacingValues;
50
- /** Alternative for paddingTop. PaddingTop is optional. It has not a default value. */
51
- pt?: spacingValues;
52
- /** Alternative for paddingBottom. PaddingBottom is optional. It has not a default value. */
53
- pb?: spacingValues;
54
- /** Alternative for paddingLeft. PaddingLeft is optional. It has not a default value. */
55
- pl?: spacingValues;
56
- /** Alternative for paddingRight. PaddingRight is optional. It has not a default value. */
57
- pr?: spacingValues;
58
- /** Alternative for paddingX. PaddingX is optional. It has not a default value. */
59
- px?: spacingValues;
60
- /** Alternative for paddingY. PaddingY is optional. It has not a default value. */
61
- py?: spacingValues;
62
- /** printHidden is optional. Default value is false. When true, the component is hidden at print. */
63
- printHidden?: boolean;
64
- /** printVisible is optional. When block, the component is displayed as block. When inline, the component is displayed as inline.*/
65
- printVisible?: 'block' | 'inline';
66
- /** Components will be hidden at all screen sizes. */
67
- hidden?: boolean;
68
- /** Components will be hidden from 'xs' screen size and up. */
69
- xsUpHidden?: boolean;
70
- /** Components will be hidden from 'sm' screen size and up. */
71
- smUpHidden?: boolean;
72
- /** Components will be hidden from 'md' screen size and up. */
73
- mdUpHidden?: boolean;
74
- /** Components will be hidden from 'lg' screen size and up. */
75
- lgUpHidden?: boolean;
76
- /** Components will be hidden from 'xl' screen size and up. */
77
- xlUpHidden?: boolean;
78
- /** Components will be hidden between xs and sm screen size. */
79
- xsHidden?: boolean;
80
- /** Components will be hidden between sm and md screen size. */
81
- smHidden?: boolean;
82
- /** Components will be hidden between md and lg screen size. */
83
- mdHidden?: boolean;
84
- /** Components will be hidden between lg and xl screen size. */
85
- lgHidden?: boolean;
86
- /** Components will be hidden between xl and 2xl screen size. */
87
- xlHidden?: boolean;
88
- }>;
89
- type spacingValues = 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96;
90
- /**
91
- * This is the type used in the type annotation for the component
92
- */
93
- type BaseComponent = <C extends React.ElementType = 'span'>(props: BaseProps<C>) => React.ReactNode | null;
94
- export declare const Base: BaseComponent;
95
- export default Base;
1
+ export * from '@digigov/react-core/Base/index.web';
2
+ export { default as default } from '@digigov/react-core/Base/index.web';