@digigov/react-core 2.0.0-6c42d5eb → 2.0.0-6e3977bc

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 (392) 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 -1
  77. package/CodeBlockContainer/index.js.map +1 -1
  78. package/CodeBlockContent/index.d.ts +1 -1
  79. package/CodeBlockContent/index.js +2 -1
  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/NavListItemActionContainer/index.d.ts +2 -10
  129. package/NavListItemActionContainer/index.js +3 -20
  130. package/NavListItemActionContainer/index.js.map +3 -3
  131. package/NavListItemActionContainer/index.native/index.js +17 -0
  132. package/NavListItemActionContainer/index.native/package.json +6 -0
  133. package/NavListItemActionContainer/index.native.d.ts +7 -0
  134. package/NavListItemActionContainer/index.native.js.map +7 -0
  135. package/NavListItemActionContainer/index.web/index.js +23 -0
  136. package/NavListItemActionContainer/index.web/package.json +6 -0
  137. package/NavListItemActionContainer/index.web.d.ts +10 -0
  138. package/NavListItemActionContainer/index.web.js.map +7 -0
  139. package/NotificationBannerLink/index.d.ts +2 -11
  140. package/NotificationBannerLink/index.js +3 -19
  141. package/NotificationBannerLink/index.js.map +3 -3
  142. package/NotificationBannerLink/index.native/index.js +16 -0
  143. package/NotificationBannerLink/index.native/package.json +6 -0
  144. package/NotificationBannerLink/index.native.d.ts +8 -0
  145. package/NotificationBannerLink/index.native.js.map +7 -0
  146. package/NotificationBannerLink/index.web/index.js +22 -0
  147. package/NotificationBannerLink/index.web/package.json +6 -0
  148. package/NotificationBannerLink/index.web.d.ts +11 -0
  149. package/NotificationBannerLink/index.web.js.map +7 -0
  150. package/PhaseBanner/index.js +2 -1
  151. package/PhaseBanner/index.js.map +2 -2
  152. package/PhaseBannerTag/index.d.ts +2 -2
  153. package/PhaseBannerTag/index.js +1 -1
  154. package/PhaseBannerTag/index.js.map +1 -1
  155. package/PhaseBannerText/index.js +1 -1
  156. package/PhaseBannerText/index.js.map +2 -2
  157. package/RadioItem/index.js +2 -1
  158. package/RadioItem/index.js.map +2 -2
  159. package/SummaryList/index.d.ts +1 -1
  160. package/SummaryList/index.js.map +2 -2
  161. package/SummaryListItemKey/index.d.ts +14 -0
  162. package/SummaryListItemKey/index.js +5 -2
  163. package/SummaryListItemKey/index.js.map +2 -2
  164. package/TextArea/index.d.ts +2 -24
  165. package/TextArea/index.js +3 -27
  166. package/TextArea/index.js.map +3 -3
  167. package/TextArea/index.native/index.js +16 -0
  168. package/TextArea/index.native/package.json +6 -0
  169. package/TextArea/index.native.d.ts +4 -0
  170. package/TextArea/index.native.js.map +7 -0
  171. package/TextArea/index.web/index.js +30 -0
  172. package/TextArea/index.web/package.json +6 -0
  173. package/TextArea/index.web.d.ts +24 -0
  174. package/TextArea/index.web.js.map +7 -0
  175. package/TextInput/index.d.ts +2 -46
  176. package/TextInput/index.js +3 -40
  177. package/TextInput/index.js.map +3 -3
  178. package/TextInput/index.native/index.js +19 -0
  179. package/TextInput/index.native/package.json +6 -0
  180. package/TextInput/index.native.d.ts +4 -0
  181. package/TextInput/index.native.js.map +7 -0
  182. package/TextInput/index.web/index.js +43 -0
  183. package/TextInput/index.web/package.json +6 -0
  184. package/TextInput/index.web.d.ts +46 -0
  185. package/TextInput/index.web.js.map +7 -0
  186. package/Unpurge/index.js +35 -0
  187. package/Unpurge/index.js.map +2 -2
  188. package/WarningText/index.js +7 -12
  189. package/WarningText/index.js.map +2 -2
  190. package/WarningTextAssistive/index.d.ts +15 -0
  191. package/WarningTextAssistive/index.js +23 -0
  192. package/WarningTextAssistive/index.js.map +7 -0
  193. package/WarningTextAssistive/package.json +6 -0
  194. package/cjs/Base/compat/Input/CheckboxInput.native/index.js +66 -0
  195. package/cjs/Base/compat/Input/CheckboxInput.native.js.map +7 -0
  196. package/cjs/Base/compat/Input/RadioInput.native/index.js +65 -0
  197. package/cjs/Base/compat/Input/RadioInput.native.js.map +7 -0
  198. package/cjs/Base/compat/Input/StringInput.native/index.js +129 -0
  199. package/cjs/Base/compat/Input/StringInput.native.js.map +7 -0
  200. package/cjs/Base/compat/Input/index.native/index.js +55 -0
  201. package/cjs/Base/compat/Input/index.native.js.map +7 -0
  202. package/cjs/Base/compat/button.native/index.js +81 -0
  203. package/cjs/Base/compat/button.native.js.map +7 -0
  204. package/cjs/Base/compat/details.native/index.js +65 -0
  205. package/cjs/Base/compat/details.native.js.map +7 -0
  206. package/cjs/Base/compat/li.native/index.js +42 -0
  207. package/cjs/Base/compat/li.native.js.map +7 -0
  208. package/cjs/Base/compat/ol.native/index.js +66 -0
  209. package/cjs/Base/compat/ol.native.js.map +7 -0
  210. package/cjs/Base/index.js +5 -99
  211. package/cjs/Base/index.js.map +3 -3
  212. package/cjs/Base/index.native/index.js +193 -0
  213. package/cjs/Base/index.native.js.map +7 -0
  214. package/cjs/Base/index.web/index.js +137 -0
  215. package/cjs/Base/index.web.js.map +7 -0
  216. package/cjs/Base/mapping.native/index.js +67 -0
  217. package/cjs/Base/mapping.native.js.map +7 -0
  218. package/cjs/Base/utils/index.js +119 -0
  219. package/cjs/Base/utils.js.map +7 -0
  220. package/cjs/Base/wrap.native/index.js +97 -0
  221. package/cjs/Base/wrap.native.js.map +7 -0
  222. package/cjs/CallToAction/index.js +1 -1
  223. package/cjs/CallToAction/index.js.map +2 -2
  224. package/cjs/Card/index.js +2 -1
  225. package/cjs/Card/index.js.map +2 -2
  226. package/cjs/CheckboxItem/index.js +4 -16
  227. package/cjs/CheckboxItem/index.js.map +3 -3
  228. package/cjs/CheckboxItemInput/index.js +40 -0
  229. package/cjs/CheckboxItemInput/index.js.map +7 -0
  230. package/cjs/CheckboxItemInput/index.native/index.js +53 -0
  231. package/cjs/CheckboxItemInput/index.native.js.map +7 -0
  232. package/cjs/CheckboxItemInput/index.web/index.js +59 -0
  233. package/cjs/CheckboxItemInput/index.web.js.map +7 -0
  234. package/cjs/Chip/index.js +2 -1
  235. package/cjs/Chip/index.js.map +2 -2
  236. package/cjs/CodeBlockContainer/index.js.map +1 -1
  237. package/cjs/CodeBlockContent/index.js +2 -1
  238. package/cjs/CodeBlockContent/index.js.map +2 -2
  239. package/cjs/CodeBlockHeader/index.js +1 -3
  240. package/cjs/CodeBlockHeader/index.js.map +2 -2
  241. package/cjs/CopyToClipboardContainer/index.js +5 -41
  242. package/cjs/CopyToClipboardContainer/index.js.map +3 -3
  243. package/cjs/CopyToClipboardContainer/index.web/index.js +77 -0
  244. package/cjs/CopyToClipboardContainer/index.web.js.map +7 -0
  245. package/cjs/CopyToClipboardMessage/index.js +5 -22
  246. package/cjs/CopyToClipboardMessage/index.js.map +3 -3
  247. package/cjs/CopyToClipboardMessage/index.native/index.js +51 -0
  248. package/cjs/CopyToClipboardMessage/index.native.js.map +7 -0
  249. package/cjs/CopyToClipboardMessage/index.web/index.js +57 -0
  250. package/cjs/CopyToClipboardMessage/index.web.js.map +7 -0
  251. package/cjs/DateInputItem/index.js +5 -42
  252. package/cjs/DateInputItem/index.js.map +3 -3
  253. package/cjs/DateInputItem/index.native/index.js +50 -0
  254. package/cjs/DateInputItem/index.native.js.map +7 -0
  255. package/cjs/DateInputItem/index.web/index.js +65 -0
  256. package/cjs/DateInputItem/index.web.js.map +7 -0
  257. package/cjs/Details/index.js +5 -23
  258. package/cjs/Details/index.js.map +3 -3
  259. package/cjs/Details/index.native/index.js +50 -0
  260. package/cjs/Details/index.native.js.map +7 -0
  261. package/cjs/Details/index.web/index.js +58 -0
  262. package/cjs/Details/index.web.js.map +7 -0
  263. package/cjs/FieldsetLegend/index.js +1 -4
  264. package/cjs/FieldsetLegend/index.js.map +2 -2
  265. package/cjs/LabelTitle/index.js +2 -4
  266. package/cjs/LabelTitle/index.js.map +2 -2
  267. package/cjs/NavListItemActionContainer/index.js +5 -21
  268. package/cjs/NavListItemActionContainer/index.js.map +3 -3
  269. package/cjs/NavListItemActionContainer/index.native/index.js +50 -0
  270. package/cjs/NavListItemActionContainer/index.native.js.map +7 -0
  271. package/cjs/NavListItemActionContainer/index.web/index.js +56 -0
  272. package/cjs/NavListItemActionContainer/index.web.js.map +7 -0
  273. package/cjs/NotificationBannerLink/index.js +5 -20
  274. package/cjs/NotificationBannerLink/index.js.map +3 -3
  275. package/cjs/NotificationBannerLink/index.native/index.js +49 -0
  276. package/cjs/NotificationBannerLink/index.native.js.map +7 -0
  277. package/cjs/NotificationBannerLink/index.web/index.js +55 -0
  278. package/cjs/NotificationBannerLink/index.web.js.map +7 -0
  279. package/cjs/PhaseBanner/index.js +2 -1
  280. package/cjs/PhaseBanner/index.js.map +2 -2
  281. package/cjs/PhaseBannerTag/index.js +1 -1
  282. package/cjs/PhaseBannerTag/index.js.map +1 -1
  283. package/cjs/PhaseBannerText/index.js +1 -1
  284. package/cjs/PhaseBannerText/index.js.map +2 -2
  285. package/cjs/RadioItem/index.js +2 -1
  286. package/cjs/RadioItem/index.js.map +3 -3
  287. package/cjs/SummaryList/index.js.map +2 -2
  288. package/cjs/SummaryListItemKey/index.js +5 -2
  289. package/cjs/SummaryListItemKey/index.js.map +2 -2
  290. package/cjs/TextArea/index.js +5 -28
  291. package/cjs/TextArea/index.js.map +3 -3
  292. package/cjs/TextArea/index.native/index.js +49 -0
  293. package/cjs/TextArea/index.native.js.map +7 -0
  294. package/cjs/TextArea/index.web/index.js +63 -0
  295. package/cjs/TextArea/index.web.js.map +7 -0
  296. package/cjs/TextInput/index.js +5 -41
  297. package/cjs/TextInput/index.js.map +3 -3
  298. package/cjs/TextInput/index.native/index.js +52 -0
  299. package/cjs/TextInput/index.native.js.map +7 -0
  300. package/cjs/TextInput/index.web/index.js +76 -0
  301. package/cjs/TextInput/index.web.js.map +7 -0
  302. package/cjs/Unpurge/index.js +35 -0
  303. package/cjs/Unpurge/index.js.map +2 -2
  304. package/cjs/WarningText/index.js +7 -12
  305. package/cjs/WarningText/index.js.map +2 -2
  306. package/cjs/WarningTextAssistive/index.js +56 -0
  307. package/cjs/WarningTextAssistive/index.js.map +7 -0
  308. package/cjs/index.js +5 -1
  309. package/cjs/index.js.map +2 -2
  310. package/cjs/lazy/index.js +12 -10
  311. package/cjs/lazy.js.map +2 -2
  312. package/cjs/registry/index.js +27 -1
  313. package/cjs/registry.js.map +2 -2
  314. package/cjs/utils/extend.native/index.js +47 -0
  315. package/cjs/utils/extend.native.js.map +7 -0
  316. package/index.d.ts +2 -0
  317. package/index.js +3 -1
  318. package/index.js.map +2 -2
  319. package/lazy/index.js +12 -10
  320. package/lazy.d.ts +219 -217
  321. package/lazy.js.map +2 -2
  322. package/package.json +21 -4
  323. package/registry/index.js +27 -1
  324. package/registry.d.ts +13 -0
  325. package/registry.js.map +2 -2
  326. package/src/Base/compat/Input/CheckboxInput.native.tsx +40 -0
  327. package/src/Base/compat/Input/RadioInput.native.tsx +39 -0
  328. package/src/Base/compat/Input/StringInput.native.tsx +115 -0
  329. package/src/Base/compat/Input/index.native.tsx +28 -0
  330. package/src/Base/compat/button.native.tsx +53 -0
  331. package/src/Base/compat/details.native.tsx +68 -0
  332. package/src/Base/compat/li.native.tsx +11 -0
  333. package/src/Base/compat/ol.native.tsx +41 -0
  334. package/src/Base/index.native.tsx +185 -0
  335. package/src/Base/index.tsx +2 -257
  336. package/src/Base/index.web.tsx +259 -0
  337. package/src/Base/mapping.native.tsx +41 -0
  338. package/src/Base/utils.ts +84 -0
  339. package/src/Base/wrap.native.tsx +94 -0
  340. package/src/CallToAction/index.tsx +2 -2
  341. package/src/Card/index.tsx +3 -2
  342. package/src/CheckboxItem/index.tsx +4 -14
  343. package/src/CheckboxItemInput/index.native.tsx +17 -0
  344. package/src/CheckboxItemInput/index.tsx +2 -0
  345. package/src/CheckboxItemInput/index.web.tsx +34 -0
  346. package/src/Chip/index.tsx +2 -2
  347. package/src/CodeBlockContainer/index.tsx +1 -1
  348. package/src/CodeBlockContent/index.tsx +4 -3
  349. package/src/CodeBlockHeader/index.tsx +2 -4
  350. package/src/CopyToClipboardContainer/index.tsx +2 -74
  351. package/src/CopyToClipboardContainer/index.web.tsx +75 -0
  352. package/src/CopyToClipboardMessage/index.native.tsx +21 -0
  353. package/src/CopyToClipboardMessage/index.tsx +2 -41
  354. package/src/CopyToClipboardMessage/index.web.tsx +41 -0
  355. package/src/DateInputItem/index.native.tsx +12 -0
  356. package/src/DateInputItem/index.tsx +2 -64
  357. package/src/DateInputItem/index.web.tsx +53 -0
  358. package/src/Details/index.native.tsx +14 -0
  359. package/src/Details/index.tsx +2 -27
  360. package/src/Details/index.web.tsx +27 -0
  361. package/src/FieldsetLegend/index.tsx +1 -4
  362. package/src/LabelTitle/index.tsx +2 -4
  363. package/src/NavListItemActionContainer/index.native.tsx +18 -0
  364. package/src/NavListItemActionContainer/index.tsx +2 -28
  365. package/src/NavListItemActionContainer/index.web.tsx +28 -0
  366. package/src/NotificationBannerLink/index.native.tsx +22 -0
  367. package/src/NotificationBannerLink/index.tsx +2 -28
  368. package/src/NotificationBannerLink/index.web.tsx +28 -0
  369. package/src/PhaseBanner/index.tsx +2 -2
  370. package/src/PhaseBannerTag/index.tsx +3 -3
  371. package/src/PhaseBannerText/__snapshots__/index.test.tsx.snap +1 -1
  372. package/src/PhaseBannerText/index.tsx +1 -1
  373. package/src/RadioItem/index.tsx +2 -2
  374. package/src/SummaryList/index.tsx +7 -5
  375. package/src/SummaryListItemKey/index.tsx +24 -2
  376. package/src/TextArea/index.native.tsx +11 -0
  377. package/src/TextArea/index.tsx +2 -50
  378. package/src/TextArea/index.web.tsx +50 -0
  379. package/src/TextInput/index.native.tsx +15 -0
  380. package/src/TextInput/index.tsx +2 -87
  381. package/src/TextInput/index.web.tsx +87 -0
  382. package/src/Unpurge/index.tsx +35 -0
  383. package/src/WarningText/index.tsx +12 -15
  384. package/src/WarningTextAssistive/index.tsx +37 -0
  385. package/src/index.ts +2 -0
  386. package/src/lazy.js +12 -10
  387. package/src/registry.js +28 -2
  388. package/src/utils/extend.native.tsx +36 -0
  389. package/utils/extend.native/index.js +14 -0
  390. package/utils/extend.native/package.json +6 -0
  391. package/utils/extend.native.d.ts +23 -0
  392. package/utils/extend.native.js.map +7 -0
@@ -1,74 +1,2 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface CopyToClipboardContainerProps extends BaseProps<'div'> {
6
- /**
7
- * @value 'tooltip' is used when you want to show the message inside a tooltip.
8
- * @value 'banner' is used when you want to show the message inside a banner.
9
- * @default 'tooltip'
10
- */
11
- variant?: 'tooltip' | 'banner';
12
- /**
13
- * tooltipAlign is optional.
14
- * tooltipAlign prop adds tooltip right or left and is used only if variant is tooltip.
15
- * @value 'right'
16
- * @value 'left'
17
- * @default 'right'
18
- */
19
- tooltipAlign?: 'right' | 'left';
20
- /**
21
- * dense is optional.
22
- * affects only the density of the tooltip.
23
- * @value true tooltip will be dense.
24
- * @value false
25
- * @default false
26
- * */
27
- dense?: boolean;
28
- }
29
- /**
30
- * CopyToClipboardContainer is a wrapper component for CopyToClipboardMessage
31
- */
32
- export const CopyToClipboardContainer = React.forwardRef<
33
- HTMLDivElement,
34
- CopyToClipboardContainerProps
35
- >(function CopyToClipboardContainer(
36
- {
37
- variant = 'tooltip',
38
- tooltipAlign = 'right',
39
- className,
40
- dense,
41
- children,
42
- ...props
43
- },
44
- ref
45
- ) {
46
- return (
47
- <Base
48
- as="div"
49
- ref={ref}
50
- {...props}
51
- className={clsx(className, {
52
- 'ds-copy-to-clipboard': true,
53
- })}
54
- {...props}
55
- >
56
- <div
57
- className={clsx(className, {
58
- 'ds-copy-to-clipboard__tooltip': variant === 'tooltip',
59
- 'ds-copy-to-clipboard__tooltip--dense':
60
- variant === 'tooltip' && dense,
61
- 'ds-copy-to-clipboard__tooltip--left':
62
- variant === 'tooltip' && tooltipAlign === 'left',
63
- 'ds-copy-to-clipboard__tooltip--right':
64
- variant === 'tooltip' && tooltipAlign === 'right',
65
- 'ds-copy-to-clipboard__banner': variant === 'banner',
66
- })}
67
- >
68
- {children}
69
- </div>
70
- </Base>
71
- );
72
- });
73
-
74
- export default CopyToClipboardContainer;
1
+ export * from '@digigov/react-core/CopyToClipboardContainer/index.web';
2
+ export { default as default } from '@digigov/react-core/CopyToClipboardContainer/index.web';
@@ -0,0 +1,75 @@
1
+ import React from 'react';
2
+ import clsx from 'clsx';
3
+ import Base, { BaseProps } from '@digigov/react-core/Base';
4
+
5
+ export interface CopyToClipboardContainerProps extends BaseProps<'div'> {
6
+ /**
7
+ * @value 'tooltip' is used when you want to show the message inside a tooltip.
8
+ * @value 'banner' is used when you want to show the message inside a banner.
9
+ * @default 'tooltip'
10
+ */
11
+ variant?: 'tooltip' | 'banner';
12
+ /**
13
+ * tooltipAlign is optional.
14
+ * tooltipAlign prop adds tooltip right or left and is used only if variant is tooltip.
15
+ * @value 'right'
16
+ * @value 'left'
17
+ * @default 'right'
18
+ */
19
+ tooltipAlign?: 'right' | 'left';
20
+ /**
21
+ * dense is optional.
22
+ * affects only the density of the tooltip.
23
+ * @value true tooltip will be dense.
24
+ * @value false
25
+ * @default false
26
+ * */
27
+ dense?: boolean;
28
+ }
29
+ /**
30
+ * CopyToClipboardContainer is a wrapper component for CopyToClipboardMessage
31
+ */
32
+ export const CopyToClipboardContainer = React.forwardRef<
33
+ HTMLDivElement,
34
+ CopyToClipboardContainerProps
35
+ >(function CopyToClipboardContainer(
36
+ {
37
+ variant = 'tooltip',
38
+ tooltipAlign = 'right',
39
+ className,
40
+ dense,
41
+ children,
42
+ ...props
43
+ },
44
+ ref
45
+ ) {
46
+ return (
47
+ <Base
48
+ as="div"
49
+ ref={ref}
50
+ {...props}
51
+ className={clsx(className, {
52
+ 'ds-copy-to-clipboard': true,
53
+ })}
54
+ {...props}
55
+ >
56
+ <Base
57
+ as="div"
58
+ className={clsx(className, {
59
+ 'ds-copy-to-clipboard__tooltip': variant === 'tooltip',
60
+ 'ds-copy-to-clipboard__tooltip--dense':
61
+ variant === 'tooltip' && dense,
62
+ 'ds-copy-to-clipboard__tooltip--left':
63
+ variant === 'tooltip' && tooltipAlign === 'left',
64
+ 'ds-copy-to-clipboard__tooltip--right':
65
+ variant === 'tooltip' && tooltipAlign === 'right',
66
+ 'ds-copy-to-clipboard__banner': variant === 'banner',
67
+ })}
68
+ >
69
+ {children}
70
+ </Base>
71
+ </Base>
72
+ );
73
+ });
74
+
75
+ export default CopyToClipboardContainer;
@@ -0,0 +1,21 @@
1
+ import CoreCopyToClipboardMessage, {
2
+ CopyToClipboardMessageProps,
3
+ } from '@digigov/react-core/CopyToClipboardMessage/index.web';
4
+ import { CopyToClipboardContainerProps } from '@digigov/react-core/CopyToClipboardContainer';
5
+ import { extend } from '@digigov/react-core/utils/extend.native';
6
+ import clsx from 'clsx';
7
+
8
+ export const CopyToClipboardMessage = extend<
9
+ CopyToClipboardMessageProps,
10
+ CopyToClipboardContainerProps
11
+ >(CoreCopyToClipboardMessage, ({ dense, className, ...props }) => {
12
+ return {
13
+ className: clsx(className, {
14
+ 'ds-copy-to-clipboard__before': true,
15
+ 'ds-copy-to-clipboard__message--dense': dense,
16
+ }),
17
+ ...props,
18
+ };
19
+ });
20
+
21
+ export default CopyToClipboardMessage;
@@ -1,41 +1,2 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface CopyToClipboardMessageProps extends BaseProps<'div'> {
6
- /**
7
- * enabled is a boolean prop passed from the CopyToClipboard component.
8
- * When it's true it shows the CopyToClipboardMessage component and it activates the animation that hides the component after 3s.
9
- * When it's false it resets the animations of the CopyToClipboardMessage.
10
- * @value true
11
- * @value false
12
- */
13
- enabled?: boolean;
14
- }
15
- /**
16
- * CopyToClipboardMessage is used to show a message that a text is being copied.
17
- * This component is used inside the CopyToClipboard component that lies inside the digigov/ui library
18
- */
19
- export const CopyToClipboardMessage = React.forwardRef<
20
- HTMLDivElement,
21
- CopyToClipboardMessageProps
22
- >(function CopyToClipboardMessage(
23
- { enabled, className, children, ...props },
24
- ref
25
- ) {
26
- return (
27
- <Base
28
- as="div"
29
- ref={ref}
30
- className={clsx(className, {
31
- 'ds-copy-to-clipboard__message': true,
32
- 'ds-copy-to-clipboard--hidden': !enabled,
33
- })}
34
- {...props}
35
- >
36
- {children}
37
- </Base>
38
- );
39
- });
40
-
41
- export default CopyToClipboardMessage;
1
+ export * from '@digigov/react-core/CopyToClipboardMessage/index.web';
2
+ export { default as default } from '@digigov/react-core/CopyToClipboardMessage/index.web';
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import clsx from 'clsx';
3
+ import Base, { BaseProps } from '@digigov/react-core/Base';
4
+
5
+ export interface CopyToClipboardMessageProps extends BaseProps<'div'> {
6
+ /**
7
+ * enabled is a boolean prop passed from the CopyToClipboard component.
8
+ * When it's true it shows the CopyToClipboardMessage component and it activates the animation that hides the component after 3s.
9
+ * When it's false it resets the animations of the CopyToClipboardMessage.
10
+ * @value true
11
+ * @value false
12
+ */
13
+ enabled?: boolean;
14
+ }
15
+ /**
16
+ * CopyToClipboardMessage is used to show a message that a text is being copied.
17
+ * This component is used inside the CopyToClipboard component that lies inside the digigov/ui library
18
+ */
19
+ export const CopyToClipboardMessage = React.forwardRef<
20
+ HTMLDivElement,
21
+ CopyToClipboardMessageProps
22
+ >(function CopyToClipboardMessage(
23
+ { enabled, className, children, ...props },
24
+ ref
25
+ ) {
26
+ return (
27
+ <Base
28
+ as="div"
29
+ ref={ref}
30
+ className={clsx(className, {
31
+ 'ds-copy-to-clipboard__message': true,
32
+ 'ds-copy-to-clipboard--hidden': !enabled,
33
+ })}
34
+ {...props}
35
+ >
36
+ {children}
37
+ </Base>
38
+ );
39
+ });
40
+
41
+ export default CopyToClipboardMessage;
@@ -0,0 +1,12 @@
1
+ import extend from '@digigov/react-core/utils/extend.native';
2
+ import CoreDateInputItem from '@digigov/react-core/DateInputItem/index.web';
3
+ export const DateInputItem = extend(
4
+ CoreDateInputItem,
5
+ ({ className, ...props }) => {
6
+ return {
7
+ ...props,
8
+ onChange: undefined,
9
+ };
10
+ }
11
+ );
12
+ export default DateInputItem;
@@ -1,64 +1,2 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface DateInputItemProps extends BaseProps<'input'> {
6
- /**
7
- * Width property is optional.
8
- * Use this property for year field to grow width.
9
- * @value 2
10
- * @value 4
11
- * @default 2
12
- */
13
- width?: 2 | 4;
14
- /**
15
- * error is optional. The default value is false.
16
- * Use this prop when there is an error at the input.
17
- * @value true
18
- * @value false
19
- */
20
- error?: boolean;
21
- }
22
- /**
23
- * Details for the DateInputItem.
24
- * DateInputItem component is used for displaying date.
25
- * DateInputItem component must be included inside DateInput component as children component
26
- */
27
- export const DateInputItem = React.forwardRef<
28
- HTMLInputElement,
29
- DateInputItemProps
30
- >(function DateInputItem(
31
- { name, width = 2, error, className, children, ...props },
32
- ref
33
- ) {
34
- return (
35
- <div
36
- className={clsx(className, {
37
- 'ds-date-input__item': true,
38
- })}
39
- >
40
- <label
41
- className={clsx({
42
- 'ds-label': true,
43
- })}
44
- >
45
- {children}
46
- <Base
47
- as="input"
48
- ref={ref}
49
- type="text"
50
- name={name}
51
- className={clsx({
52
- 'ds-input': true,
53
- 'ds-input--width-2-char': width === 2,
54
- 'ds-input--width-4-char': width === 4,
55
- 'ds-input--error': error,
56
- })}
57
- {...props}
58
- />
59
- </label>
60
- </div>
61
- );
62
- });
63
-
64
- export default DateInputItem;
1
+ export * from '@digigov/react-core/DateInputItem/index.web';
2
+ export { default as default } from '@digigov/react-core/DateInputItem/index.web';
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ import clsx from 'clsx';
3
+ import Base, { BaseProps } from '@digigov/react-core/Base';
4
+ import { TextInput } from '@digigov/react-core/TextInput';
5
+
6
+ export interface DateInputItemProps extends BaseProps<'input'> {
7
+ /**
8
+ * Width property is optional.
9
+ * Use this property for year field to grow width.
10
+ * @value 2
11
+ * @value 4
12
+ * @default 2
13
+ */
14
+ width?: 2 | 4;
15
+ /**
16
+ * error is optional. The default value is false.
17
+ * Use this prop when there is an error at the input.
18
+ * @value true
19
+ * @value false
20
+ */
21
+ error?: boolean;
22
+ }
23
+ /**
24
+ * Details for the DateInputItem.
25
+ * DateInputItem component is used for displaying date.
26
+ * DateInputItem component must be included inside DateInput component as children component
27
+ */
28
+ export const DateInputItem = React.forwardRef<
29
+ HTMLInputElement,
30
+ DateInputItemProps
31
+ >(function DateInputItem(
32
+ { name, width = 2, error, className, children, ...props },
33
+ ref
34
+ ) {
35
+ return (
36
+ <Base as='div'
37
+ className={clsx(className, {
38
+ 'ds-date-input__item': true,
39
+ })}
40
+ >
41
+ <Base as='label'
42
+ className={clsx({
43
+ 'ds-label': true,
44
+ })}
45
+ >
46
+ {children}
47
+ <TextInput ref={ref} type="text" name={name} maxWidth={`${width}-char`} error={error} {...props} />
48
+ </Base>
49
+ </Base>
50
+ );
51
+ });
52
+
53
+ export default DateInputItem;
@@ -0,0 +1,14 @@
1
+ import CoreDetails from '@digigov/react-core/Details/index.web';
2
+ import { extend } from '@digigov/react-core/utils/extend.native';
3
+
4
+ export const Details = extend(CoreDetails, ({ className, ...props }) => {
5
+ return {
6
+ className,
7
+ closeIcon: '▶',
8
+ openIcon: '▼',
9
+ placement: 'before',
10
+ ...props,
11
+ };
12
+ });
13
+
14
+ export default Details;
@@ -1,27 +1,2 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface DetailsProps extends BaseProps<'details'> { }
6
- /**
7
- * Details is used to make a page easier to scan when it contains information that only some users will need.
8
- * Details component wraps DetailsSummary and DetailsContent as children components
9
- */
10
- export const Details = React.forwardRef<HTMLDetailsElement, DetailsProps>(
11
- function Details({ className, children, ...props }, ref) {
12
- return (
13
- <Base
14
- as="details"
15
- ref={ref}
16
- className={clsx(className, {
17
- 'ds-details': true,
18
- })}
19
- {...props}
20
- >
21
- {children}
22
- </Base>
23
- );
24
- }
25
- );
26
-
27
- export default Details;
1
+ export * from "@digigov/react-core/Details/index.web";
2
+ export {default as default} from "@digigov/react-core/Details/index.web";
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import clsx from 'clsx';
3
+ import Base, { BaseProps } from '@digigov/react-core/Base';
4
+
5
+ export interface DetailsProps extends BaseProps<'details'> { }
6
+ /**
7
+ * Details is used to make a page easier to scan when it contains information that only some users will need.
8
+ * Details component wraps DetailsSummary and DetailsContent as children components
9
+ */
10
+ export const Details = React.forwardRef<HTMLDetailsElement, DetailsProps>(
11
+ function Details({ className, children, ...props }, ref) {
12
+ return (
13
+ <Base
14
+ as="details"
15
+ ref={ref}
16
+ className={clsx(className, {
17
+ 'ds-details': true,
18
+ })}
19
+ {...props}
20
+ >
21
+ {children}
22
+ </Base>
23
+ );
24
+ }
25
+ );
26
+
27
+ export default Details;
@@ -39,10 +39,7 @@ export const FieldsetLegend = React.forwardRef<
39
39
  ref={ref}
40
40
  className={clsx(className, {
41
41
  'ds-fieldset__legend': true,
42
- 'ds-heading-xl': size === 'xl',
43
- 'ds-heading-lg': size === 'lg',
44
- 'ds-heading-md': size === 'md',
45
- 'ds-heading-sm': size === 'sm',
42
+ [`ds-fieldset__legend--${size}`]: size !== undefined,
46
43
  })}
47
44
  {...(heading && { role: 'heading', 'aria-level': 1 })}
48
45
  {...props}
@@ -34,10 +34,8 @@ export const LabelTitle = React.forwardRef<HTMLSpanElement, LabelFieldProps>(
34
34
  as="span"
35
35
  ref={ref}
36
36
  className={clsx(className, {
37
- 'ds-heading-xl': size === 'xl',
38
- 'ds-heading-lg': size === 'lg',
39
- 'ds-heading-md': size === 'md',
40
- 'ds-heading-sm': size === 'sm',
37
+ 'ds-label__title': true,
38
+ [`ds-label__title--${size}`]: size !== undefined,
41
39
  })}
42
40
  {...(heading && { role: 'heading', 'aria-level': 1 })}
43
41
  {...props}
@@ -0,0 +1,18 @@
1
+ import clsx from 'clsx';
2
+ import CoreNavListItemActionContainer, {
3
+ NavListItemActionContainerProps,
4
+ } from '@digigov/react-core/NavListItemActionContainer/index.web';
5
+ import extend from '@digigov/react-core/utils/extend.native';
6
+
7
+ export const NavListItemActionContainer = extend<
8
+ NavListItemActionContainerProps,
9
+ { borderBottom?: boolean }
10
+ >(CoreNavListItemActionContainer, ({ className, borderBottom, ...props }) => {
11
+ return {
12
+ ...props,
13
+ className: clsx(className, {
14
+ 'ds-nav__list-item--border-bottom': borderBottom,
15
+ }),
16
+ };
17
+ });
18
+ export default NavListItemActionContainer;
@@ -1,28 +1,2 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import Base, { BaseProps } from '@digigov/react-core/Base';
4
-
5
- export interface NavListItemActionContainerProps extends BaseProps<'li'> { }
6
- /**
7
- * NavListItemActionContainer must be inside the NavList.
8
- * This component has a items of NavListItemLink component inside.
9
- */
10
- export const NavListItemActionContainer = React.forwardRef<
11
- HTMLLIElement,
12
- NavListItemActionContainerProps
13
- >(function NavListItemActionContainer({ className, children, ...props }, ref) {
14
- return (
15
- <Base
16
- as="li"
17
- ref={ref}
18
- className={clsx(className, {
19
- 'ds-nav__list-item': true,
20
- })}
21
- {...props}
22
- >
23
- {children}
24
- </Base>
25
- );
26
- });
27
-
28
- export default NavListItemActionContainer;
1
+ export * from '@digigov/react-core/NavListItemActionContainer/index.web';
2
+ export { default as default } from '@digigov/react-core/NavListItemActionContainer/index.web';
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import clsx from 'clsx';
3
+ import Base, { BaseProps } from '@digigov/react-core/Base';
4
+
5
+ export interface NavListItemActionContainerProps extends BaseProps<'li'> { }
6
+ /**
7
+ * NavListItemActionContainer must be inside the NavList.
8
+ * This component has a items of NavListItemLink component inside.
9
+ */
10
+ export const NavListItemActionContainer = React.forwardRef<
11
+ HTMLLIElement,
12
+ NavListItemActionContainerProps
13
+ >(function NavListItemActionContainer({ className, children, ...props }, ref) {
14
+ return (
15
+ <Base
16
+ as="li"
17
+ ref={ref}
18
+ className={clsx(className, {
19
+ 'ds-nav__list-item': true,
20
+ })}
21
+ {...props}
22
+ >
23
+ {children}
24
+ </Base>
25
+ );
26
+ });
27
+
28
+ export default NavListItemActionContainer;
@@ -0,0 +1,22 @@
1
+ import CoreNotificationBannerLink, {
2
+ NotificationBannerLinkProps,
3
+ } from '@digigov/react-core/NotificationBannerLink/index.web';
4
+ import { extend } from '@digigov/react-core/utils/extend.native';
5
+ import clsx from 'clsx';
6
+
7
+ interface AdditionalProps {
8
+ variant?: 'error' | 'success';
9
+ }
10
+
11
+ export const NotificationBannerLink = extend<
12
+ NotificationBannerLinkProps,
13
+ AdditionalProps
14
+ >(CoreNotificationBannerLink, ({ variant, className, ...props }) => ({
15
+ className: clsx(className, {
16
+ 'ds-notification-banner__link--error': variant === 'error',
17
+ 'ds-notification-banner__link--success': variant === 'success',
18
+ }),
19
+ ...props,
20
+ }));
21
+
22
+ export default NotificationBannerLink;
@@ -1,28 +1,2 @@
1
- import React from 'react';
2
- import clsx from 'clsx';
3
- import LinkBase, { LinkBaseProps } from '@digigov/react-core/LinkBase';
4
-
5
- export interface NotificationBannerLinkProps extends LinkBaseProps { }
6
- /**
7
- * Details for the NotificationBannerLink.
8
- * NotificationBannerLink allow users to click their way from page to page.
9
- * NotificationBannerLink must be wrapped inside NotificationContent component as children
10
- */
11
- export const NotificationBannerLink = React.forwardRef<
12
- HTMLAnchorElement,
13
- NotificationBannerLinkProps
14
- >(function NotificationBannerLink({ className, children, ...props }, ref) {
15
- return (
16
- <LinkBase
17
- ref={ref}
18
- className={clsx(className, {
19
- 'ds-notification-banner__link': true,
20
- })}
21
- {...props}
22
- >
23
- {children}
24
- </LinkBase>
25
- );
26
- });
27
-
28
- export default NotificationBannerLink;
1
+ export * from '@digigov/react-core/NotificationBannerLink/index.web';
2
+ export {default as default} from '@digigov/react-core/NotificationBannerLink/index.web';
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import clsx from 'clsx';
3
+ import LinkBase, { LinkBaseProps } from '@digigov/react-core/LinkBase';
4
+
5
+ export interface NotificationBannerLinkProps extends LinkBaseProps { }
6
+ /**
7
+ * Details for the NotificationBannerLink.
8
+ * NotificationBannerLink allow users to click their way from page to page.
9
+ * NotificationBannerLink must be wrapped inside NotificationContent component as children
10
+ */
11
+ export const NotificationBannerLink = React.forwardRef<
12
+ HTMLAnchorElement,
13
+ NotificationBannerLinkProps
14
+ >(function NotificationBannerLink({ className, children, ...props }, ref) {
15
+ return (
16
+ <LinkBase
17
+ ref={ref}
18
+ className={clsx(className, {
19
+ 'ds-notification-banner__link': true,
20
+ })}
21
+ {...props}
22
+ >
23
+ {children}
24
+ </LinkBase>
25
+ );
26
+ });
27
+
28
+ export default NotificationBannerLink;
@@ -31,13 +31,13 @@ export const PhaseBanner = React.forwardRef<HTMLDivElement, PhaseBannerProps>(
31
31
  })}
32
32
  {...props}
33
33
  >
34
- <p
34
+ <Base as="p"
35
35
  className={clsx({
36
36
  'ds-phase-banner__content': true,
37
37
  })}
38
38
  >
39
39
  {children}
40
- </p>
40
+ </Base>
41
41
  </Base>
42
42
  );
43
43
  }