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

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 (509) hide show
  1. package/Accordion/index.d.ts +2 -28
  2. package/Accordion/index.js +3 -34
  3. package/Accordion/index.js.map +3 -3
  4. package/Accordion/index.native/index.js +22 -0
  5. package/Accordion/index.native/package.json +6 -0
  6. package/Accordion/index.native.d.ts +2 -0
  7. package/Accordion/index.native.js.map +7 -0
  8. package/Accordion/index.web/index.js +37 -0
  9. package/Accordion/index.web/package.json +6 -0
  10. package/Accordion/index.web.d.ts +28 -0
  11. package/Accordion/index.web.js.map +7 -0
  12. package/AccordionSection/index.d.ts +2 -11
  13. package/AccordionSection/index.js +3 -20
  14. package/AccordionSection/index.js.map +3 -3
  15. package/AccordionSection/index.native/index.js +21 -0
  16. package/AccordionSection/index.native/package.json +6 -0
  17. package/AccordionSection/index.native.d.ts +2 -0
  18. package/AccordionSection/index.native.js.map +7 -0
  19. package/AccordionSection/index.web/index.js +23 -0
  20. package/AccordionSection/index.web/package.json +6 -0
  21. package/AccordionSection/index.web.d.ts +11 -0
  22. package/AccordionSection/index.web.js.map +7 -0
  23. package/AccordionSectionSummaryHeading/index.d.ts +1 -0
  24. package/AccordionSectionSummaryHeading/index.js +5 -3
  25. package/AccordionSectionSummaryHeading/index.js.map +2 -2
  26. package/BackLinkBase/index.d.ts +9 -0
  27. package/BackLinkBase/index.js +29 -0
  28. package/BackLinkBase/index.js.map +7 -0
  29. package/{ButtonLink → BackLinkBase}/package.json +1 -1
  30. package/BannerContainer/index.js +1 -1
  31. package/BannerContainer/index.js.map +2 -2
  32. package/Base/compat/Input/CheckboxInput.native.js.map +2 -2
  33. package/Base/compat/Input/RadioInput.native.js.map +2 -2
  34. package/Base/compat/details.native/index.js +2 -1
  35. package/Base/compat/details.native.d.ts +2 -1
  36. package/Base/compat/details.native.js.map +2 -2
  37. package/Base/index.native.js.map +2 -2
  38. package/Base/index.web.d.ts +1 -1
  39. package/Base/index.web.js.map +1 -1
  40. package/Base/mapping.native.d.ts +1 -1
  41. package/Base/mapping.native.js.map +2 -2
  42. package/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.d.ts +5 -5
  43. package/BreadcrumbsListItemLinkBase/index.js +23 -0
  44. package/BreadcrumbsListItemLinkBase/index.js.map +7 -0
  45. package/BreadcrumbsListItemLinkBase/package.json +6 -0
  46. package/BreadcrumbsListItemWrapper/index.d.ts +10 -0
  47. package/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.js +4 -4
  48. package/BreadcrumbsListItemWrapper/index.js.map +7 -0
  49. package/{AutoCompleteInputTypeahead → BreadcrumbsListItemWrapper}/package.json +1 -1
  50. package/Button/index.js +2 -0
  51. package/Button/index.js.map +2 -2
  52. package/{ButtonLink → ButtonLinkBase}/index.d.ts +4 -4
  53. package/ButtonLinkBase/index.js +27 -0
  54. package/ButtonLinkBase/index.js.map +7 -0
  55. package/{FooterLink → ButtonLinkBase}/package.json +1 -1
  56. package/CallToActionBase/index.d.ts +9 -0
  57. package/{CallToAction → CallToActionBase}/index.js +6 -6
  58. package/CallToActionBase/index.js.map +7 -0
  59. package/{CircularProgress → CallToActionBase}/package.json +1 -1
  60. package/{CircularProgress → CircularProgressBase}/index.d.ts +5 -5
  61. package/{CircularProgress → CircularProgressBase}/index.js +4 -4
  62. package/CircularProgressBase/index.js.map +7 -0
  63. package/CircularProgressBase/package.json +6 -0
  64. package/CopyToClipboardMessage/index.native/index.js +1 -1
  65. package/CopyToClipboardMessage/index.native.d.ts +1 -3
  66. package/CopyToClipboardMessage/index.native.js.map +1 -1
  67. package/DateInputItem/index.native/index.js +1 -1
  68. package/DateInputItem/index.native.d.ts +1 -3
  69. package/DateInputItem/index.native.js.map +1 -1
  70. package/Details/index.native/index.js +1 -1
  71. package/Details/index.native.d.ts +1 -3
  72. package/Details/index.native.js.map +1 -1
  73. package/DetailsContent/index.d.ts +1 -0
  74. package/DetailsContent/index.js +3 -2
  75. package/DetailsContent/index.js.map +2 -2
  76. package/ErrorSummary/index.d.ts +9 -0
  77. package/ErrorSummary/index.js +3 -3
  78. package/ErrorSummary/index.js.map +2 -2
  79. package/FileUpload/index.d.ts +7 -0
  80. package/FileUpload/index.js +12 -4
  81. package/FileUpload/index.js.map +2 -2
  82. package/FileUploadContainer/index.d.ts +7 -0
  83. package/FileUploadContainer/index.js +3 -2
  84. package/FileUploadContainer/index.js.map +2 -2
  85. package/FooterLinkBase/index.d.ts +9 -0
  86. package/FooterLinkBase/index.js +23 -0
  87. package/FooterLinkBase/index.js.map +7 -0
  88. package/{CallToAction → FooterLinkBase}/package.json +1 -1
  89. package/GovGRLogoBase/govgr-logo-base64/package.json +6 -0
  90. package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js.map +1 -1
  91. package/GovGRLogoBase/govgr-logo-blue-base64/package.json +6 -0
  92. package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.js.map +1 -1
  93. package/GovGRLogoBase/index.d.ts +9 -0
  94. package/GovGRLogoBase/index.js +43 -0
  95. package/GovGRLogoBase/index.js.map +7 -0
  96. package/{BackLink → GovGRLogoBase}/package.json +1 -1
  97. package/Grid/index.d.ts +1 -7
  98. package/Grid/index.js +1 -0
  99. package/Grid/index.js.map +2 -2
  100. package/HeaderLogoBase/index.d.ts +19 -0
  101. package/HeaderLogoBase/index.js +33 -0
  102. package/HeaderLogoBase/index.js.map +7 -0
  103. package/HeaderLogoBase/package.json +6 -0
  104. package/HeaderSecondaryLogoBase/index.d.ts +19 -0
  105. package/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.js +7 -7
  106. package/HeaderSecondaryLogoBase/index.js.map +7 -0
  107. package/{BreadcrumbsListItemLink → HeaderSecondaryLogoBase}/package.json +1 -1
  108. package/HeaderTitleBase/index.d.ts +9 -0
  109. package/HeaderTitleBase/index.js +24 -0
  110. package/HeaderTitleBase/index.js.map +7 -0
  111. package/HeaderTitleBase/package.json +6 -0
  112. package/LinkBase/index.js +1 -0
  113. package/LinkBase/index.js.map +2 -2
  114. package/{NavListItemAction → NavListItemActionBase}/index.d.ts +6 -6
  115. package/{NavListItemAction → NavListItemActionBase}/index.js +6 -6
  116. package/NavListItemActionBase/index.js.map +7 -0
  117. package/NavListItemActionBase/package.json +6 -0
  118. package/NavListItemActionContainer/index.native/index.js +1 -1
  119. package/NavListItemActionContainer/index.native.d.ts +0 -2
  120. package/NavListItemActionContainer/index.native.js.map +1 -1
  121. package/{NavListItemLink → NavListItemLinkBase}/index.d.ts +4 -4
  122. package/{NavListItemLink → NavListItemLinkBase}/index.js +6 -6
  123. package/NavListItemLinkBase/index.js.map +7 -0
  124. package/{BreadcrumbsListItem → NavListItemLinkBase}/package.json +1 -1
  125. package/NotificationBannerContainer/index.d.ts +2 -1
  126. package/NotificationBannerContainer/index.js.map +2 -2
  127. package/NotificationBannerContent/index.d.ts +22 -0
  128. package/NotificationBannerContent/index.js +14 -3
  129. package/NotificationBannerContent/index.js.map +2 -2
  130. package/NotificationBannerLink/index.native/index.js +1 -1
  131. package/NotificationBannerLink/index.native.d.ts +1 -3
  132. package/NotificationBannerLink/index.native.js.map +1 -1
  133. package/Skeleton/index.js +2 -1
  134. package/Skeleton/index.js.map +2 -2
  135. package/SummaryList/index.d.ts +10 -2
  136. package/SummaryList/index.js +10 -2
  137. package/SummaryList/index.js.map +2 -2
  138. package/SummaryListItem/index.js +1 -1
  139. package/SummaryListItem/index.js.map +2 -2
  140. package/SummaryListItemKey/index.d.ts +14 -0
  141. package/SummaryListItemKey/index.js +14 -2
  142. package/SummaryListItemKey/index.js.map +2 -2
  143. package/SummaryListItemValue/index.d.ts +14 -0
  144. package/SummaryListItemValue/index.js +11 -2
  145. package/SummaryListItemValue/index.js.map +2 -2
  146. package/Table/index.d.ts +9 -0
  147. package/Table/index.js +4 -1
  148. package/Table/index.js.map +2 -2
  149. package/TableDataCell/index.d.ts +22 -0
  150. package/TableDataCell/index.js +18 -2
  151. package/TableDataCell/index.js.map +2 -2
  152. package/TextArea/index.native/index.js +1 -1
  153. package/TextArea/index.native.d.ts +1 -3
  154. package/TextArea/index.native.js.map +1 -1
  155. package/TextInput/index.native/index.js +1 -1
  156. package/TextInput/index.native.d.ts +1 -3
  157. package/TextInput/index.native.js.map +1 -1
  158. package/Typography/index.d.ts +1 -1
  159. package/Typography/index.js +15 -17
  160. package/Typography/index.js.map +2 -2
  161. package/WarningText/index.d.ts +7 -0
  162. package/WarningText/index.js +10 -2
  163. package/WarningText/index.js.map +2 -2
  164. package/cjs/Accordion/index.js +5 -35
  165. package/cjs/Accordion/index.js.map +3 -3
  166. package/cjs/{utils/extend.native → Accordion/index.native}/index.js +22 -16
  167. package/cjs/Accordion/index.native.js.map +7 -0
  168. package/cjs/{ButtonLink → Accordion/index.web}/index.js +24 -16
  169. package/cjs/Accordion/index.web.js.map +7 -0
  170. package/cjs/AccordionSection/index.js +5 -21
  171. package/cjs/AccordionSection/index.js.map +3 -3
  172. package/cjs/{CheckboxItemInput → AccordionSection}/index.native/index.js +13 -12
  173. package/cjs/AccordionSection/index.native.js.map +7 -0
  174. package/cjs/{HeaderTitle → AccordionSection/index.web}/index.js +11 -12
  175. package/cjs/AccordionSection/index.web.js.map +7 -0
  176. package/cjs/AccordionSectionSummaryHeading/index.js +5 -3
  177. package/cjs/AccordionSectionSummaryHeading/index.js.map +2 -2
  178. package/cjs/BackLinkBase/index.js +62 -0
  179. package/cjs/BackLinkBase/index.js.map +7 -0
  180. package/cjs/BannerContainer/index.js +1 -1
  181. package/cjs/BannerContainer/index.js.map +2 -2
  182. package/cjs/Base/compat/Input/CheckboxInput.native.js.map +2 -2
  183. package/cjs/Base/compat/Input/RadioInput.native.js.map +2 -2
  184. package/cjs/Base/compat/details.native/index.js +2 -1
  185. package/cjs/Base/compat/details.native.js.map +2 -2
  186. package/cjs/Base/index.native.js.map +2 -2
  187. package/cjs/Base/index.web.js.map +1 -1
  188. package/cjs/Base/mapping.native.js.map +2 -2
  189. package/cjs/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.js +10 -11
  190. package/cjs/BreadcrumbsListItemLinkBase/index.js.map +7 -0
  191. package/cjs/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.js +8 -8
  192. package/cjs/BreadcrumbsListItemWrapper/index.js.map +7 -0
  193. package/cjs/Button/index.js +2 -0
  194. package/cjs/Button/index.js.map +2 -2
  195. package/cjs/ButtonLinkBase/index.js +60 -0
  196. package/cjs/ButtonLinkBase/index.js.map +7 -0
  197. package/cjs/{CallToAction → CallToActionBase}/index.js +10 -10
  198. package/cjs/CallToActionBase/index.js.map +7 -0
  199. package/cjs/{CircularProgress → CircularProgressBase}/index.js +8 -8
  200. package/cjs/CircularProgressBase/index.js.map +7 -0
  201. package/cjs/CopyToClipboardMessage/index.native/index.js +2 -2
  202. package/cjs/CopyToClipboardMessage/index.native.js.map +2 -2
  203. package/cjs/DateInputItem/index.native/index.js +2 -2
  204. package/cjs/DateInputItem/index.native.js.map +2 -2
  205. package/cjs/Details/index.native/index.js +2 -2
  206. package/cjs/Details/index.native.js.map +2 -2
  207. package/cjs/DetailsContent/index.js +3 -2
  208. package/cjs/DetailsContent/index.js.map +2 -2
  209. package/cjs/ErrorSummary/index.js +3 -3
  210. package/cjs/ErrorSummary/index.js.map +2 -2
  211. package/cjs/FileUpload/index.js +12 -4
  212. package/cjs/FileUpload/index.js.map +2 -2
  213. package/cjs/FileUploadContainer/index.js +3 -2
  214. package/cjs/FileUploadContainer/index.js.map +2 -2
  215. package/cjs/FooterLinkBase/index.js +56 -0
  216. package/cjs/FooterLinkBase/index.js.map +7 -0
  217. package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js.map +1 -1
  218. package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.js.map +1 -1
  219. package/cjs/{GovGRLogo → GovGRLogoBase}/index.js +41 -43
  220. package/cjs/GovGRLogoBase/index.js.map +7 -0
  221. package/cjs/Grid/index.js +1 -0
  222. package/cjs/Grid/index.js.map +2 -2
  223. package/cjs/{HeaderSecondaryLogo → HeaderLogoBase}/index.js +12 -12
  224. package/cjs/HeaderLogoBase/index.js.map +7 -0
  225. package/cjs/HeaderSecondaryLogoBase/index.js +66 -0
  226. package/cjs/HeaderSecondaryLogoBase/index.js.map +7 -0
  227. package/cjs/HeaderTitleBase/index.js +57 -0
  228. package/cjs/HeaderTitleBase/index.js.map +7 -0
  229. package/cjs/LinkBase/index.js +1 -0
  230. package/cjs/LinkBase/index.js.map +2 -2
  231. package/cjs/{NavListItemAction → NavListItemActionBase}/index.js +10 -10
  232. package/cjs/NavListItemActionBase/index.js.map +7 -0
  233. package/cjs/NavListItemActionContainer/index.native/index.js +2 -2
  234. package/cjs/NavListItemActionContainer/index.native.js.map +2 -2
  235. package/cjs/{NavListItemLink → NavListItemLinkBase}/index.js +10 -10
  236. package/cjs/NavListItemLinkBase/index.js.map +7 -0
  237. package/cjs/NotificationBannerContainer/index.js.map +2 -2
  238. package/cjs/NotificationBannerContent/index.js +14 -3
  239. package/cjs/NotificationBannerContent/index.js.map +2 -2
  240. package/cjs/NotificationBannerLink/index.native/index.js +2 -2
  241. package/cjs/NotificationBannerLink/index.native.js.map +2 -2
  242. package/cjs/Skeleton/index.js +2 -1
  243. package/cjs/Skeleton/index.js.map +2 -2
  244. package/cjs/SummaryList/index.js +10 -2
  245. package/cjs/SummaryList/index.js.map +2 -2
  246. package/cjs/SummaryListItem/index.js +1 -1
  247. package/cjs/SummaryListItem/index.js.map +2 -2
  248. package/cjs/SummaryListItemKey/index.js +14 -2
  249. package/cjs/SummaryListItemKey/index.js.map +3 -3
  250. package/cjs/SummaryListItemValue/index.js +11 -2
  251. package/cjs/SummaryListItemValue/index.js.map +3 -3
  252. package/cjs/Table/index.js +4 -1
  253. package/cjs/Table/index.js.map +2 -2
  254. package/cjs/TableDataCell/index.js +18 -2
  255. package/cjs/TableDataCell/index.js.map +3 -3
  256. package/cjs/TextArea/index.native/index.js +2 -2
  257. package/cjs/TextArea/index.native.js.map +2 -2
  258. package/cjs/TextInput/index.native/index.js +2 -2
  259. package/cjs/TextInput/index.native.js.map +2 -2
  260. package/cjs/Typography/index.js +15 -17
  261. package/cjs/Typography/index.js.map +2 -2
  262. package/cjs/WarningText/index.js +10 -2
  263. package/cjs/WarningText/index.js.map +2 -2
  264. package/cjs/index.js +24 -26
  265. package/cjs/index.js.map +2 -2
  266. package/cjs/lazy/index.js +15 -16
  267. package/cjs/lazy.js.map +2 -2
  268. package/cjs/registry/index.js +36 -34
  269. package/cjs/registry.js.map +2 -2
  270. package/cjs/utils/index.native/index.js +86 -0
  271. package/cjs/utils/index.native.js.map +7 -0
  272. package/index.d.ts +12 -13
  273. package/index.js +13 -14
  274. package/index.js.map +2 -2
  275. package/lazy/index.js +15 -16
  276. package/package.json +5 -5
  277. package/registry/index.js +36 -34
  278. package/src/Accordion/index.native.tsx +19 -0
  279. package/src/Accordion/index.tsx +2 -71
  280. package/src/Accordion/index.web.tsx +71 -0
  281. package/src/AccordionSection/index.native.tsx +18 -0
  282. package/src/AccordionSection/index.tsx +2 -28
  283. package/src/AccordionSection/index.web.tsx +28 -0
  284. package/src/AccordionSectionSummaryHeading/index.tsx +12 -4
  285. package/src/AdminAside/__snapshots__/index.test.tsx.snap +1 -1
  286. package/src/AdminContainer/__snapshots__/index.test.tsx.snap +2 -2
  287. package/src/AdminMain/__snapshots__/index.test.tsx.snap +1 -1
  288. package/src/AdminTopSection/__snapshots__/index.test.tsx.snap +1 -1
  289. package/src/Aside/__snapshots__/index.test.tsx.snap +1 -1
  290. package/src/{BackLink → BackLinkBase}/__snapshots__/index.test.tsx.snap +2 -2
  291. package/src/BackLinkBase/index.test.tsx +15 -0
  292. package/src/BackLinkBase/index.tsx +36 -0
  293. package/src/BannerContainer/__snapshots__/index.test.tsx.snap +1 -1
  294. package/src/BannerContainer/index.tsx +1 -1
  295. package/src/Base/compat/Input/CheckboxInput.native.tsx +2 -6
  296. package/src/Base/compat/Input/RadioInput.native.tsx +2 -6
  297. package/src/Base/compat/details.native.tsx +3 -1
  298. package/src/Base/index.native.tsx +2 -2
  299. package/src/Base/index.web.tsx +2 -2
  300. package/src/Base/mapping.native.tsx +1 -1
  301. package/src/BottomInfo/__snapshots__/index.test.tsx.snap +1 -1
  302. package/src/BottomInfoContainer/__snapshots__/index.test.tsx.snap +1 -1
  303. package/src/BottomInfoContent/__snapshots__/index.test.tsx.snap +1 -1
  304. package/src/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/__snapshots__/index.test.tsx.snap +4 -4
  305. package/src/BreadcrumbsListItemLinkBase/index.test.tsx +18 -0
  306. package/src/{BreadcrumbsListItemLink → BreadcrumbsListItemLinkBase}/index.tsx +10 -11
  307. package/src/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.test.tsx +1 -1
  308. package/src/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.tsx +5 -5
  309. package/src/Button/index.tsx +2 -0
  310. package/src/{ButtonLink → ButtonLinkBase}/__snapshots__/index.test.tsx.snap +22 -22
  311. package/src/ButtonLinkBase/index.test.tsx +75 -0
  312. package/src/ButtonLinkBase/index.tsx +55 -0
  313. package/src/{CallToAction → CallToActionBase}/__snapshots__/index.test.tsx.snap +1 -1
  314. package/src/CallToActionBase/index.test.tsx +10 -0
  315. package/src/{CallToAction → CallToActionBase}/index.tsx +10 -8
  316. package/src/Checkbox/__snapshots__/index.test.tsx.snap +0 -5
  317. package/src/CheckboxConditional/__snapshots__/index.test.tsx.snap +1 -1
  318. package/src/CheckboxItem/__snapshots__/index.test.tsx.snap +0 -4
  319. package/src/{CircularProgress → CircularProgressBase}/__snapshots__/index.test.tsx.snap +6 -6
  320. package/src/CircularProgressBase/index.test.tsx +38 -0
  321. package/src/{CircularProgress → CircularProgressBase}/index.tsx +7 -7
  322. package/src/Container/__snapshots__/index.test.tsx.snap +3 -3
  323. package/src/CopyToClipboardMessage/index.native.tsx +1 -1
  324. package/src/DateInputItem/index.native.tsx +1 -1
  325. package/src/Details/index.native.tsx +1 -1
  326. package/src/DetailsContent/index.tsx +11 -2
  327. package/src/ErrorSummary/index.tsx +17 -4
  328. package/src/FieldContainer/__snapshots__/index.test.tsx.snap +3 -3
  329. package/src/FileUpload/index.tsx +20 -4
  330. package/src/FileUploadContainer/index.tsx +10 -1
  331. package/src/FooterContainer/__snapshots__/index.test.tsx.snap +1 -1
  332. package/src/{FooterLink → FooterLinkBase}/__snapshots__/index.test.tsx.snap +2 -2
  333. package/src/FooterLinkBase/index.test.tsx +16 -0
  334. package/src/FooterLinkBase/index.tsx +27 -0
  335. package/src/{GovGRLogo → GovGRLogoBase}/__snapshots__/index.test.tsx.snap +1 -1
  336. package/src/GovGRLogoBase/index.test.tsx +8 -0
  337. package/src/GovGRLogoBase/index.tsx +43 -0
  338. package/src/Grid/__snapshots__/index.test.tsx.snap +8 -8
  339. package/src/Grid/index.tsx +2 -7
  340. package/src/{HeaderLogo → HeaderLogoBase}/__snapshots__/index.test.tsx.snap +1 -1
  341. package/src/HeaderLogoBase/index.test.tsx +8 -0
  342. package/src/HeaderLogoBase/index.tsx +44 -0
  343. package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/__snapshots__/index.test.tsx.snap +2 -2
  344. package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.test.tsx +7 -7
  345. package/src/{HeaderSecondaryLogo → HeaderSecondaryLogoBase}/index.tsx +9 -9
  346. package/src/{HeaderTitle → HeaderTitleBase}/__snapshots__/index.test.tsx.snap +2 -2
  347. package/src/HeaderTitleBase/index.test.tsx +17 -0
  348. package/src/HeaderTitleBase/index.tsx +28 -0
  349. package/src/LinkBase/index.tsx +1 -0
  350. package/src/Main/__snapshots__/index.test.tsx.snap +1 -1
  351. package/src/NavListItemActionBase/__snapshots__/index.test.tsx.snap +101 -0
  352. package/src/NavListItemActionBase/index.test.tsx +42 -0
  353. package/src/{NavListItemAction → NavListItemActionBase}/index.tsx +13 -12
  354. package/src/NavListItemActionContainer/index.native.tsx +1 -1
  355. package/src/{NavListItemLink → NavListItemLinkBase}/__snapshots__/index.test.tsx.snap +5 -5
  356. package/src/NavListItemLinkBase/index.test.tsx +41 -0
  357. package/src/{NavListItemLink → NavListItemLinkBase}/index.tsx +8 -9
  358. package/src/NavMenuContainer/__snapshots__/index.test.tsx.snap +4 -4
  359. package/src/NavMenuContent/__snapshots__/index.test.tsx.snap +1 -1
  360. package/src/NavMenuTitle/__snapshots__/index.test.tsx.snap +1 -1
  361. package/src/NotificationBannerContainer/index.tsx +2 -1
  362. package/src/NotificationBannerContent/index.tsx +50 -4
  363. package/src/NotificationBannerLink/index.native.tsx +1 -1
  364. package/src/RadioConditional/__snapshots__/index.test.tsx.snap +1 -1
  365. package/src/RadioItem/__snapshots__/index.test.tsx.snap +0 -4
  366. package/src/Skeleton/index.tsx +3 -2
  367. package/src/SummaryList/__snapshots__/index.test.tsx.snap +36 -0
  368. package/src/SummaryList/index.test.tsx +15 -0
  369. package/src/SummaryList/index.tsx +20 -3
  370. package/src/SummaryListItem/index.tsx +1 -1
  371. package/src/SummaryListItemKey/__snapshots__/index.test.tsx.snap +70 -0
  372. package/src/SummaryListItemKey/index.test.tsx +29 -0
  373. package/src/SummaryListItemKey/index.tsx +29 -1
  374. package/src/SummaryListItemValue/__snapshots__/index.test.tsx.snap +34 -0
  375. package/src/SummaryListItemValue/index.test.tsx +14 -0
  376. package/src/SummaryListItemValue/index.tsx +30 -2
  377. package/src/Table/index.tsx +12 -0
  378. package/src/TableDataCell/__snapshots__/index.test.tsx.snap +79 -2
  379. package/src/TableDataCell/index.test.tsx +42 -0
  380. package/src/TableDataCell/index.tsx +56 -1
  381. package/src/TableRow/__snapshots__/index.test.tsx.snap +1 -1
  382. package/src/TableRow/index.test.tsx +1 -1
  383. package/src/TextArea/index.native.tsx +1 -1
  384. package/src/TextInput/index.native.tsx +1 -1
  385. package/src/Typography/index.tsx +21 -20
  386. package/src/WarningText/__snapshots__/index.test.tsx.snap +26 -0
  387. package/src/WarningText/index.test.tsx +5 -0
  388. package/src/WarningText/index.tsx +17 -2
  389. package/src/index.ts +12 -13
  390. package/src/lazy.js +15 -16
  391. package/src/registry.js +36 -34
  392. package/src/utils/index.native.tsx +122 -0
  393. package/utils/index.native/index.js +52 -0
  394. package/utils/index.native/package.json +6 -0
  395. package/utils/index.native.d.ts +43 -0
  396. package/utils/index.native.js.map +7 -0
  397. package/AutoCompleteInputTypeahead/index.d.ts +0 -11
  398. package/AutoCompleteInputTypeahead/index.js +0 -25
  399. package/AutoCompleteInputTypeahead/index.js.map +0 -7
  400. package/BackLink/index.d.ts +0 -9
  401. package/BackLink/index.js +0 -31
  402. package/BackLink/index.js.map +0 -7
  403. package/BreadcrumbsListItem/index.d.ts +0 -10
  404. package/BreadcrumbsListItem/index.js.map +0 -7
  405. package/BreadcrumbsListItemLink/index.js +0 -24
  406. package/BreadcrumbsListItemLink/index.js.map +0 -7
  407. package/ButtonLink/index.js +0 -29
  408. package/ButtonLink/index.js.map +0 -7
  409. package/CallToAction/index.d.ts +0 -9
  410. package/CallToAction/index.js.map +0 -7
  411. package/CheckboxItemInput/index.native/index.js +0 -20
  412. package/CheckboxItemInput/index.native/package.json +0 -6
  413. package/CheckboxItemInput/index.native.d.ts +0 -4
  414. package/CheckboxItemInput/index.native.js.map +0 -7
  415. package/CircularProgress/index.js.map +0 -7
  416. package/FooterLink/index.d.ts +0 -9
  417. package/FooterLink/index.js +0 -25
  418. package/FooterLink/index.js.map +0 -7
  419. package/GovGRLogo/govgr-logo-base64/package.json +0 -6
  420. package/GovGRLogo/govgr-logo-blue-base64/package.json +0 -6
  421. package/GovGRLogo/index.d.ts +0 -9
  422. package/GovGRLogo/index.js +0 -45
  423. package/GovGRLogo/index.js.map +0 -7
  424. package/GovGRLogo/package.json +0 -6
  425. package/HeaderLogo/index.d.ts +0 -19
  426. package/HeaderLogo/index.js +0 -35
  427. package/HeaderLogo/index.js.map +0 -7
  428. package/HeaderLogo/package.json +0 -6
  429. package/HeaderSecondaryLogo/index.d.ts +0 -19
  430. package/HeaderSecondaryLogo/index.js.map +0 -7
  431. package/HeaderSecondaryLogo/package.json +0 -6
  432. package/HeaderTitle/index.d.ts +0 -9
  433. package/HeaderTitle/index.js +0 -24
  434. package/HeaderTitle/index.js.map +0 -7
  435. package/HeaderTitle/package.json +0 -6
  436. package/NavListItemAction/index.js.map +0 -7
  437. package/NavListItemAction/package.json +0 -6
  438. package/NavListItemLink/index.js.map +0 -7
  439. package/NavListItemLink/index.test.d.ts +0 -1
  440. package/NavListItemLink/package.json +0 -6
  441. package/cjs/AutoCompleteInputTypeahead/index.js +0 -58
  442. package/cjs/AutoCompleteInputTypeahead/index.js.map +0 -7
  443. package/cjs/BackLink/index.js +0 -64
  444. package/cjs/BackLink/index.js.map +0 -7
  445. package/cjs/BreadcrumbsListItem/index.js.map +0 -7
  446. package/cjs/BreadcrumbsListItemLink/index.js.map +0 -7
  447. package/cjs/ButtonLink/index.js.map +0 -7
  448. package/cjs/CallToAction/index.js.map +0 -7
  449. package/cjs/CheckboxItemInput/index.native.js.map +0 -7
  450. package/cjs/CircularProgress/index.js.map +0 -7
  451. package/cjs/FooterLink/index.js +0 -58
  452. package/cjs/FooterLink/index.js.map +0 -7
  453. package/cjs/GovGRLogo/index.js.map +0 -7
  454. package/cjs/HeaderLogo/index.js +0 -68
  455. package/cjs/HeaderLogo/index.js.map +0 -7
  456. package/cjs/HeaderSecondaryLogo/index.js.map +0 -7
  457. package/cjs/HeaderTitle/index.js.map +0 -7
  458. package/cjs/NavListItemAction/index.js.map +0 -7
  459. package/cjs/NavListItemLink/index.js.map +0 -7
  460. package/cjs/utils/extend.native.js.map +0 -7
  461. package/src/AutoCompleteInputTypeahead/__snapshots__/index.test.tsx.snap +0 -16
  462. package/src/AutoCompleteInputTypeahead/index.test.tsx +0 -8
  463. package/src/AutoCompleteInputTypeahead/index.tsx +0 -32
  464. package/src/BackLink/index.test.tsx +0 -13
  465. package/src/BackLink/index.tsx +0 -35
  466. package/src/BreadcrumbsListItemLink/index.test.tsx +0 -16
  467. package/src/ButtonLink/index.test.tsx +0 -69
  468. package/src/ButtonLink/index.tsx +0 -54
  469. package/src/CallToAction/index.test.tsx +0 -10
  470. package/src/CheckboxItemInput/index.native.tsx +0 -17
  471. package/src/CircularProgress/index.test.tsx +0 -34
  472. package/src/FooterLink/index.test.tsx +0 -14
  473. package/src/FooterLink/index.tsx +0 -26
  474. package/src/GovGRLogo/index.test.tsx +0 -8
  475. package/src/GovGRLogo/index.tsx +0 -42
  476. package/src/HeaderLogo/index.test.tsx +0 -8
  477. package/src/HeaderLogo/index.tsx +0 -43
  478. package/src/HeaderTitle/index.test.tsx +0 -16
  479. package/src/HeaderTitle/index.tsx +0 -28
  480. package/src/NavListItemAction/__snapshots__/index.test.tsx.snap +0 -13
  481. package/src/NavListItemAction/index.test.tsx +0 -11
  482. package/src/NavListItemLink/index.test.tsx +0 -39
  483. package/src/utils/extend.native.tsx +0 -36
  484. package/utils/extend.native/index.js +0 -14
  485. package/utils/extend.native/package.json +0 -6
  486. package/utils/extend.native.d.ts +0 -23
  487. package/utils/extend.native.js.map +0 -7
  488. /package/{AutoCompleteInputTypeahead → BackLinkBase}/index.test.d.ts +0 -0
  489. /package/{BackLink → BreadcrumbsListItemLinkBase}/index.test.d.ts +0 -0
  490. /package/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/index.test.d.ts +0 -0
  491. /package/{BreadcrumbsListItemLink → ButtonLinkBase}/index.test.d.ts +0 -0
  492. /package/{ButtonLink → CallToActionBase}/index.test.d.ts +0 -0
  493. /package/{CallToAction → CircularProgressBase}/index.test.d.ts +0 -0
  494. /package/{CircularProgress → FooterLinkBase}/index.test.d.ts +0 -0
  495. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64/index.js +0 -0
  496. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.d.ts +0 -0
  497. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64/index.js +0 -0
  498. /package/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.d.ts +0 -0
  499. /package/{FooterLink → GovGRLogoBase}/index.test.d.ts +0 -0
  500. /package/{GovGRLogo → HeaderLogoBase}/index.test.d.ts +0 -0
  501. /package/{HeaderLogo → HeaderSecondaryLogoBase}/index.test.d.ts +0 -0
  502. /package/{HeaderSecondaryLogo → HeaderTitleBase}/index.test.d.ts +0 -0
  503. /package/{HeaderTitle → NavListItemActionBase}/index.test.d.ts +0 -0
  504. /package/{NavListItemAction → NavListItemLinkBase}/index.test.d.ts +0 -0
  505. /package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64/index.js +0 -0
  506. /package/cjs/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64/index.js +0 -0
  507. /package/src/{BreadcrumbsListItem → BreadcrumbsListItemWrapper}/__snapshots__/index.test.tsx.snap +0 -0
  508. /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-base64.js +0 -0
  509. /package/src/{GovGRLogo → GovGRLogoBase}/govgr-logo-blue-base64.ts +0 -0
package/Skeleton/index.js CHANGED
@@ -34,8 +34,9 @@ const Skeleton = React.forwardRef(
34
34
  }
35
35
  },
36
36
  variant === "button" && /* @__PURE__ */ React.createElement(
37
- "span",
37
+ Base,
38
38
  {
39
+ as: "span",
39
40
  className: clsx({
40
41
  "ds-skeleton__line": true,
41
42
  "ds-skeleton__line--size-default": width === void 0 && height === void 0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Skeleton/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SkeletonProps extends BaseProps<'span'> {\n /**\n * variant prop determines the style of the skeleton element.\n * @value 'circular', it renders a circular skeleton.\n * @value 'rectangular', it renders a rectangular skeleton.\n * @value 'text', it renders a text skeleton.\n * @value 'button', it renders a button skeleton.\n * @default 'text'\n */\n variant?: 'circular' | 'rectangular' | 'text' | 'button';\n\n /**\n * width prop determines the width of the skeleton element.\n * It accepts number in px or string with valid CSS units (e.g. '24px', '1em', '100%').\n * For better responsive experience, avoid using px and use percentage instead.\n * @default undefined\n */\n width?: number | string;\n\n /**\n * height prop determines the height of the skeleton element.\n * It accepts number in px or string with valid CSS units (e.g. '24px', '1em', '100%').\n * @default undefined\n */\n height?: number | string;\n\n /**\n * fontSize is optional. 'sm' is the default value.\n * Use 'xl' when this Skeleton is for a main page title.\n * The fontSize works only for variant 'text'.\n * You don't need fontSize if you wrap Skeleton in a typography component.\n * @value 'xl'\n * @value 'lg'\n * @value 'md'\n * @value 'sm'\n * @value 'xs'\n * @default 'sm'\n */\n fontSize?: 'xl' | 'lg' | 'md' | 'sm' | 'xs';\n /**\n * animation prop determines if the skeleton should animate or not.\n * @default true\n */\n animation?: boolean;\n}\n/**\n * Use Skeleton component while a page is loading.\n */\nexport const Skeleton = React.forwardRef<HTMLSpanElement, SkeletonProps>(\n function Skeleton(\n {\n width,\n height,\n fontSize,\n variant = 'text',\n animation = true,\n className,\n children,\n style,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"span\"\n ref={ref}\n className={clsx(className, {\n 'ds-skeleton': true,\n [`ds-skeleton--font-${fontSize}`]:\n fontSize !== undefined && variant === 'text',\n [`ds-skeleton--${variant}`]:\n !!variant && (!children || typeof children === 'string'),\n 'ds-skeleton--animate': !!animation,\n 'ds-skeleton--width-fit-content': !!children && !width,\n })}\n {...props}\n style={{\n width:\n typeof children === 'string'\n ? Math.ceil(children.length * 0.5) + 'em'\n : width,\n maxWidth: width ? '100%' : undefined,\n height: height,\n ...style,\n }}\n >\n {variant === 'button' && (\n <span\n className={clsx({\n 'ds-skeleton__line': true,\n 'ds-skeleton__line--size-default':\n width === undefined && height === undefined,\n })}\n ></span>\n )}\n {typeof children != 'string' && children}\n </Base>\n );\n }\n);\n\nexport default Skeleton;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAkDzB,MAAM,WAAW,MAAM;AAAA,EAC5B,SAASA,UACP;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,eAAe;AAAA,UACf,CAAC,qBAAqB,QAAQ,EAAE,GAC9B,aAAa,UAAa,YAAY;AAAA,UACxC,CAAC,gBAAgB,OAAO,EAAE,GACxB,CAAC,CAAC,YAAY,CAAC,YAAY,OAAO,aAAa;AAAA,UACjD,wBAAwB,CAAC,CAAC;AAAA,UAC1B,kCAAkC,CAAC,CAAC,YAAY,CAAC;AAAA,QACnD,CAAC;AAAA,QACA,GAAG;AAAA,QACJ,OAAO;AAAA,UACL,OACE,OAAO,aAAa,WAChB,KAAK,KAAK,SAAS,SAAS,GAAG,IAAI,OACnC;AAAA,UACN,UAAU,QAAQ,SAAS;AAAA,UAC3B;AAAA,UACA,GAAG;AAAA,QACL;AAAA;AAAA,MAEC,YAAY,YACX;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,KAAK;AAAA,YACd,qBAAqB;AAAA,YACrB,mCACE,UAAU,UAAa,WAAW;AAAA,UACtC,CAAC;AAAA;AAAA,MACF;AAAA,MAEF,OAAO,YAAY,YAAY;AAAA,IAClC;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SkeletonProps extends BaseProps<'span'> {\n /**\n * variant prop determines the style of the skeleton element.\n * @value 'circular', it renders a circular skeleton.\n * @value 'rectangular', it renders a rectangular skeleton.\n * @value 'text', it renders a text skeleton.\n * @value 'button', it renders a button skeleton.\n * @default 'text'\n */\n variant?: 'circular' | 'rectangular' | 'text' | 'button';\n\n /**\n * width prop determines the width of the skeleton element.\n * It accepts number in px or string with valid CSS units (e.g. '24px', '1em', '100%').\n * For better responsive experience, avoid using px and use percentage instead.\n * @default undefined\n */\n width?: number | string;\n\n /**\n * height prop determines the height of the skeleton element.\n * It accepts number in px or string with valid CSS units (e.g. '24px', '1em', '100%').\n * @default undefined\n */\n height?: number | string;\n\n /**\n * fontSize is optional. 'sm' is the default value.\n * Use 'xl' when this Skeleton is for a main page title.\n * The fontSize works only for variant 'text'.\n * You don't need fontSize if you wrap Skeleton in a typography component.\n * @value 'xl'\n * @value 'lg'\n * @value 'md'\n * @value 'sm'\n * @value 'xs'\n * @default 'sm'\n */\n fontSize?: 'xl' | 'lg' | 'md' | 'sm' | 'xs';\n /**\n * animation prop determines if the skeleton should animate or not.\n * @default true\n */\n animation?: boolean;\n}\n/**\n * Use Skeleton component while a page is loading.\n */\nexport const Skeleton = React.forwardRef<HTMLSpanElement, SkeletonProps>(\n function Skeleton(\n {\n width,\n height,\n fontSize,\n variant = 'text',\n animation = true,\n className,\n children,\n style,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"span\"\n ref={ref}\n className={clsx(className, {\n 'ds-skeleton': true,\n [`ds-skeleton--font-${fontSize}`]:\n fontSize !== undefined && variant === 'text',\n [`ds-skeleton--${variant}`]:\n !!variant && (!children || typeof children === 'string'),\n 'ds-skeleton--animate': !!animation,\n 'ds-skeleton--width-fit-content': !!children && !width,\n })}\n {...props}\n style={{\n width:\n typeof children === 'string'\n ? Math.ceil(children.length * 0.5) + 'em'\n : width,\n maxWidth: width ? '100%' : undefined,\n height: height,\n ...style,\n }}\n >\n {variant === 'button' && (\n <Base\n as=\"span\"\n className={clsx({\n 'ds-skeleton__line': true,\n 'ds-skeleton__line--size-default':\n width === undefined && height === undefined,\n })}\n ></Base>\n )}\n {typeof children != 'string' && children}\n </Base>\n );\n }\n);\n\nexport default Skeleton;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAkDzB,MAAM,WAAW,MAAM;AAAA,EAC5B,SAASA,UACP;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,eAAe;AAAA,UACf,CAAC,qBAAqB,QAAQ,EAAE,GAC9B,aAAa,UAAa,YAAY;AAAA,UACxC,CAAC,gBAAgB,OAAO,EAAE,GACxB,CAAC,CAAC,YAAY,CAAC,YAAY,OAAO,aAAa;AAAA,UACjD,wBAAwB,CAAC,CAAC;AAAA,UAC1B,kCAAkC,CAAC,CAAC,YAAY,CAAC;AAAA,QACnD,CAAC;AAAA,QACA,GAAG;AAAA,QACJ,OAAO;AAAA,UACL,OACE,OAAO,aAAa,WAChB,KAAK,KAAK,SAAS,SAAS,GAAG,IAAI,OACnC;AAAA,UACN,UAAU,QAAQ,SAAS;AAAA,UAC3B;AAAA,UACA,GAAG;AAAA,QACL;AAAA;AAAA,MAEC,YAAY,YACX;AAAA,QAAC;AAAA;AAAA,UACC,IAAG;AAAA,UACH,WAAW,KAAK;AAAA,YACd,qBAAqB;AAAA,YACrB,mCACE,UAAU,UAAa,WAAW;AAAA,UACtC,CAAC;AAAA;AAAA,MACF;AAAA,MAEF,OAAO,YAAY,YAAY;AAAA,IAClC;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;",
6
6
  "names": ["Skeleton"]
7
7
  }
@@ -4,7 +4,7 @@ export interface SummaryListProps extends BaseProps<'dl'> {
4
4
  /**
5
5
  * border is optional.
6
6
  * By default, SummaryList has borders. You can remove borders by using border prop.
7
- * By default is true
7
+ * By default is true.
8
8
  * @value true
9
9
  * @value false
10
10
  * @default true
@@ -13,12 +13,20 @@ export interface SummaryListProps extends BaseProps<'dl'> {
13
13
  /**
14
14
  * noLastBorder is optional.
15
15
  * By default, SummaryList has borders. You can remove last border by using noLastBorder prop.
16
- * By default is true
16
+ * By default is false.
17
17
  * @value true
18
18
  * @value false
19
19
  * @default false
20
20
  */
21
21
  noLastBorder?: boolean;
22
+ /**
23
+ * error is optional.
24
+ * If true, the SummaryList will be styled to indicate an error state.
25
+ * @value true
26
+ * @value false
27
+ * @default false
28
+ */
29
+ error?: boolean;
22
30
  }
23
31
  /**
24
32
  * SummaryList used as a table with summary information.
@@ -2,7 +2,14 @@ import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
4
  const SummaryList = React.forwardRef(
5
- function SummaryList2({ className, noLastBorder = false, border = true, children, ...props }, ref) {
5
+ function SummaryList2({
6
+ border = true,
7
+ noLastBorder = false,
8
+ error = false,
9
+ className,
10
+ children,
11
+ ...props
12
+ }, ref) {
6
13
  return /* @__PURE__ */ React.createElement(
7
14
  Base,
8
15
  {
@@ -11,7 +18,8 @@ const SummaryList = React.forwardRef(
11
18
  className: clsx(className, {
12
19
  "ds-summary-list": true,
13
20
  "ds-summary-list--no-border": !border,
14
- "ds-summary-list--no-last-border": noLastBorder
21
+ "ds-summary-list--no-last-border": noLastBorder,
22
+ "ds-summary-list--error": error === true
15
23
  }),
16
24
  ...props
17
25
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SummaryList/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListProps extends BaseProps<'dl'> {\n /**\n * border is optional.\n * By default, SummaryList has borders. You can remove borders by using border prop.\n * By default is true\n * @value true\n * @value false\n * @default true\n */\n border?: boolean;\n /**\n * noLastBorder is optional.\n * By default, SummaryList has borders. You can remove last border by using noLastBorder prop.\n * By default is true\n * @value true\n * @value false\n * @default false\n */\n noLastBorder?: boolean;\n}\n/**\n * SummaryList used as a table with summary information.\n * It must contain a list of SummaryListItem components.\n */\nexport const SummaryList = React.forwardRef<HTMLDListElement, SummaryListProps>(\n function SummaryList(\n { className, noLastBorder = false, border = true, children, ...props },\n ref\n ) {\n return (\n <Base\n as=\"dl\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list': true,\n 'ds-summary-list--no-border': !border,\n 'ds-summary-list--no-last-border': noLastBorder,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default SummaryList;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA0BzB,MAAM,cAAc,MAAM;AAAA,EAC/B,SAASA,aACP,EAAE,WAAW,eAAe,OAAO,SAAS,MAAM,UAAU,GAAG,MAAM,GACrE,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,mBAAmB;AAAA,UACnB,8BAA8B,CAAC;AAAA,UAC/B,mCAAmC;AAAA,QACrC,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,sBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListProps extends BaseProps<'dl'> {\n /**\n * border is optional.\n * By default, SummaryList has borders. You can remove borders by using border prop.\n * By default is true.\n * @value true\n * @value false\n * @default true\n */\n border?: boolean;\n /**\n * noLastBorder is optional.\n * By default, SummaryList has borders. You can remove last border by using noLastBorder prop.\n * By default is false.\n * @value true\n * @value false\n * @default false\n */\n noLastBorder?: boolean;\n\n /**\n * error is optional.\n * If true, the SummaryList will be styled to indicate an error state.\n * @value true\n * @value false\n * @default false\n */\n error?: boolean;\n}\n/**\n * SummaryList used as a table with summary information.\n * It must contain a list of SummaryListItem components.\n */\nexport const SummaryList = React.forwardRef<HTMLDListElement, SummaryListProps>(\n function SummaryList(\n {\n border = true,\n noLastBorder = false,\n error = false,\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"dl\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list': true,\n 'ds-summary-list--no-border': !border,\n 'ds-summary-list--no-last-border': noLastBorder,\n 'ds-summary-list--error': error === true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default SummaryList;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAmCzB,MAAM,cAAc,MAAM;AAAA,EAC/B,SAASA,aACP;AAAA,IACE,SAAS;AAAA,IACT,eAAe;AAAA,IACf,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,mBAAmB;AAAA,UACnB,8BAA8B,CAAC;AAAA,UAC/B,mCAAmC;AAAA,UACnC,0BAA0B,UAAU;AAAA,QACtC,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,sBAAQ;",
6
6
  "names": ["SummaryList"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const SummaryListItem = React.forwardRef(function SummaryListItem2({ className, children, border = true, ...props }, ref) {
4
+ const SummaryListItem = React.forwardRef(function SummaryListItem2({ border = true, className, children, ...props }, ref) {
5
5
  return /* @__PURE__ */ React.createElement(
6
6
  Base,
7
7
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SummaryListItem/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListItemProps extends BaseProps<'div'> {\n /**\n * border is optional.\n * By default, SummaryListItem has borders. You can remove borders by using border prop.\n * By default is true\n ** @value true\n * @value false\n * @default true\n */\n border?: boolean;\n}\n/**\n * SummaryListItem must be inside SummaryList component. Each SummaryListItem is a row in the SummaryList table.\n * This component must contain SummaryListItemKey, SummaryListItemValue and SummaryListItemAction, in that order.\n */\nexport const SummaryListItem = React.forwardRef<\n HTMLDivElement,\n SummaryListItemProps\n>(function SummaryListItem(\n { className, children, border = true, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__row': true,\n 'ds-summary-list__row--no-border': !border,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItem;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiBzB,MAAM,kBAAkB,MAAM,WAGnC,SAASA,iBACT,EAAE,WAAW,UAAU,SAAS,MAAM,GAAG,MAAM,GAC/C,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,wBAAwB;AAAA,QACxB,mCAAmC,CAAC;AAAA,MACtC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,0BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListItemProps extends BaseProps<'div'> {\n /**\n * border is optional.\n * By default, SummaryListItem has borders. You can remove borders by using border prop.\n * By default is true\n ** @value true\n * @value false\n * @default true\n */\n border?: boolean;\n}\n/**\n * SummaryListItem must be inside SummaryList component. Each SummaryListItem is a row in the SummaryList table.\n * This component must contain SummaryListItemKey, SummaryListItemValue and SummaryListItemAction, in that order.\n */\nexport const SummaryListItem = React.forwardRef<\n HTMLDivElement,\n SummaryListItemProps\n>(function SummaryListItem(\n { border = true, className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"div\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__row': true,\n 'ds-summary-list__row--no-border': !border,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItem;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiBzB,MAAM,kBAAkB,MAAM,WAGnC,SAASA,iBACT,EAAE,SAAS,MAAM,WAAW,UAAU,GAAG,MAAM,GAC/C,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,wBAAwB;AAAA,QACxB,mCAAmC,CAAC;AAAA,MACtC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,0BAAQ;",
6
6
  "names": ["SummaryListItem"]
7
7
  }
@@ -14,6 +14,20 @@ export interface SummaryListItemKeyProps extends BaseProps<'dt'> {
14
14
  * lg shows the width of the key column for large screens.
15
15
  */
16
16
  lg?: WidthValues;
17
+ /**
18
+ * error is optional.
19
+ * Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.
20
+ * @value true
21
+ * @value false
22
+ * @default false
23
+ */
24
+ error?: boolean;
25
+ /**
26
+ * errorAssistiveText is optional.
27
+ * Default value is "Λανθασμένο πεδίο".
28
+ * errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.
29
+ */
30
+ errorAssistiveText?: string;
17
31
  }
18
32
  export type WidthValues = 3 | 4 | 5 | 6 | 7 | 8 | 9;
19
33
  /**
@@ -1,7 +1,17 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const SummaryListItemKey = React.forwardRef(function SummaryListItemKey2({ sm = 3, md, lg, className, children, ...props }, ref) {
4
+ import VisuallyHidden from "@digigov/react-core/VisuallyHidden";
5
+ const SummaryListItemKey = React.forwardRef(function SummaryListItemKey2({
6
+ sm = 3,
7
+ md,
8
+ lg,
9
+ error,
10
+ errorAssistiveText = "\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF",
11
+ className,
12
+ children,
13
+ ...props
14
+ }, ref) {
5
15
  return /* @__PURE__ */ React.createElement(
6
16
  Base,
7
17
  {
@@ -11,10 +21,12 @@ const SummaryListItemKey = React.forwardRef(function SummaryListItemKey2({ sm =
11
21
  "ds-summary-list__key": true,
12
22
  [`ds-summary-list__key--sm-${sm}`]: sm !== void 0,
13
23
  [`ds-summary-list__key--md-${md}`]: md !== void 0,
14
- [`ds-summary-list__key--lg-${lg}`]: lg !== void 0
24
+ [`ds-summary-list__key--lg-${lg}`]: lg !== void 0,
25
+ "ds-summary-list__key--error": error === true
15
26
  }),
16
27
  ...props
17
28
  },
29
+ error === true && /* @__PURE__ */ React.createElement(VisuallyHidden, null, errorAssistiveText),
18
30
  children
19
31
  );
20
32
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SummaryListItemKey/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListItemKeyProps extends BaseProps<'dt'> {\n /**\n * sm shows the width of the key column for small screens.\n * @default 3\n */\n sm?: WidthValues;\n /**\n * md shows the width of the key column for medium screens.\n */\n md?: WidthValues;\n /**\n * lg shows the width of the key column for large screens.\n */\n lg?: WidthValues;\n}\n\nexport type WidthValues = 3 | 4 | 5 | 6 | 7 | 8 | 9;\n/**\n * SummaryListItemKey is used within the SummaryListItem component.\n * In this column we place the key information for the row (ex. \"Name\", \"Address\", etc).\n */\nexport const SummaryListItemKey = React.forwardRef<\n HTMLElement,\n SummaryListItemKeyProps\n>(function SummaryListItemKey(\n { sm = 3, md, lg, className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"dt\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__key': true,\n [`ds-summary-list__key--sm-${sm}`]: sm !== undefined,\n [`ds-summary-list__key--md-${md}`]: md !== undefined,\n [`ds-summary-list__key--lg-${lg}`]: lg !== undefined,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItemKey;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAuBzB,MAAM,qBAAqB,MAAM,WAGtC,SAASA,oBACT,EAAE,KAAK,GAAG,IAAI,IAAI,WAAW,UAAU,GAAG,MAAM,GAChD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,wBAAwB;AAAA,QACxB,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,QAC3C,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,QAC3C,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,MAC7C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,6BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport VisuallyHidden from '@digigov/react-core/VisuallyHidden';\n\nexport interface SummaryListItemKeyProps extends BaseProps<'dt'> {\n /**\n * sm shows the width of the key column for small screens.\n * @default 3\n */\n sm?: WidthValues;\n /**\n * md shows the width of the key column for medium screens.\n */\n md?: WidthValues;\n /**\n * lg shows the width of the key column for large screens.\n */\n lg?: WidthValues;\n\n /**\n * error is optional.\n * Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.\n * @value true\n * @value false\n * @default false\n */\n\n error?: boolean;\n /**\n * errorAssistiveText is optional.\n * Default value is \"\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF\".\n * errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.\n */\n errorAssistiveText?: string;\n}\n\nexport type WidthValues = 3 | 4 | 5 | 6 | 7 | 8 | 9;\n/**\n * SummaryListItemKey is used within the SummaryListItem component.\n * In this column we place the key information for the row (ex. \"Name\", \"Address\", etc).\n */\nexport const SummaryListItemKey = React.forwardRef<\n HTMLElement,\n SummaryListItemKeyProps\n>(function SummaryListItemKey(\n {\n sm = 3,\n md,\n lg,\n error,\n errorAssistiveText = '\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF',\n className,\n children,\n ...props\n },\n ref\n) {\n return (\n <Base\n as=\"dt\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__key': true,\n [`ds-summary-list__key--sm-${sm}`]: sm !== undefined,\n [`ds-summary-list__key--md-${md}`]: md !== undefined,\n [`ds-summary-list__key--lg-${lg}`]: lg !== undefined,\n 'ds-summary-list__key--error': error === true,\n })}\n {...props}\n >\n {error === true && <VisuallyHidden>{errorAssistiveText}</VisuallyHidden>}\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItemKey;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,OAAO,oBAAoB;AAuCpB,MAAM,qBAAqB,MAAM,WAGtC,SAASA,oBACT;AAAA,EACE,KAAK;AAAA,EACL;AAAA,EACA;AAAA,EACA;AAAA,EACA,qBAAqB;AAAA,EACrB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,wBAAwB;AAAA,QACxB,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,QAC3C,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,QAC3C,CAAC,4BAA4B,EAAE,EAAE,GAAG,OAAO;AAAA,QAC3C,+BAA+B,UAAU;AAAA,MAC3C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH,UAAU,QAAQ,oCAAC,sBAAgB,kBAAmB;AAAA,IACtD;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,6BAAQ;",
6
6
  "names": ["SummaryListItemKey"]
7
7
  }
@@ -1,6 +1,20 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
3
  export interface SummaryListItemValueProps extends BaseProps<'dd'> {
4
+ /**
5
+ * error is optional.
6
+ * Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.
7
+ * @value true
8
+ * @value false
9
+ * @default false
10
+ */
11
+ error?: boolean;
12
+ /**
13
+ * errorAssistiveText is optional.
14
+ * Default value is "Λανθασμένο πεδίο".
15
+ * errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.
16
+ */
17
+ errorAssistiveText?: string;
4
18
  }
5
19
  /**
6
20
  * Details for the SummaryListItemValue.
@@ -1,17 +1,26 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const SummaryListItemValue = React.forwardRef(function SummaryListItemValue2({ className, children, ...props }, ref) {
4
+ import VisuallyHidden from "@digigov/react-core/VisuallyHidden";
5
+ const SummaryListItemValue = React.forwardRef(function SummaryListItemValue2({
6
+ error,
7
+ errorAssistiveText = "\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF",
8
+ className,
9
+ children,
10
+ ...props
11
+ }, ref) {
5
12
  return /* @__PURE__ */ React.createElement(
6
13
  Base,
7
14
  {
8
15
  as: "dd",
9
16
  ref,
10
17
  className: clsx(className, {
11
- "ds-summary-list__value": true
18
+ "ds-summary-list__value": true,
19
+ "ds-summary-list__value--error": error === true
12
20
  }),
13
21
  ...props
14
22
  },
23
+ error === true && /* @__PURE__ */ React.createElement(VisuallyHidden, null, errorAssistiveText),
15
24
  children
16
25
  );
17
26
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SummaryListItemValue/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface SummaryListItemValueProps extends BaseProps<'dd'> {}\n/**\n * Details for the SummaryListItemValue.\n */\nexport const SummaryListItemValue = React.forwardRef<\n HTMLElement,\n SummaryListItemValueProps\n>(function SummaryListItemValue({ className, children, ...props }, ref) {\n return (\n <Base\n as=\"dd\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__value': true,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItemValue;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAMzB,MAAM,uBAAuB,MAAM,WAGxC,SAASA,sBAAqB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAK;AACtE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,0BAA0B;AAAA,MAC5B,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport VisuallyHidden from '@digigov/react-core/VisuallyHidden';\n\nexport interface SummaryListItemValueProps extends BaseProps<'dd'> {\n /**\n * error is optional.\n * Use error prop to highlight the SummaryListItemKey when there is an error in the corresponding field.\n * @value true\n * @value false\n * @default false\n */\n\n error?: boolean;\n /**\n * errorAssistiveText is optional.\n * Default value is \"\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF\".\n * errorAssistiveText is used to provide a textual warning for assistive technologies like screen readers.\n */\n errorAssistiveText?: string;\n}\n/**\n * Details for the SummaryListItemValue.\n */\nexport const SummaryListItemValue = React.forwardRef<\n HTMLElement,\n SummaryListItemValueProps\n>(function SummaryListItemValue(\n {\n error,\n errorAssistiveText = '\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF',\n className,\n children,\n ...props\n },\n ref\n) {\n return (\n <Base\n as=\"dd\"\n ref={ref}\n className={clsx(className, {\n 'ds-summary-list__value': true,\n 'ds-summary-list__value--error': error === true,\n })}\n {...props}\n >\n {error === true && <VisuallyHidden>{errorAssistiveText}</VisuallyHidden>}\n {children}\n </Base>\n );\n});\n\nexport default SummaryListItemValue;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,OAAO,oBAAoB;AAsBpB,MAAM,uBAAuB,MAAM,WAGxC,SAASA,sBACT;AAAA,EACE;AAAA,EACA,qBAAqB;AAAA,EACrB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,0BAA0B;AAAA,QAC1B,iCAAiC,UAAU;AAAA,MAC7C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH,UAAU,QAAQ,oCAAC,sBAAgB,kBAAmB;AAAA,IACtD;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
6
6
  "names": ["SummaryListItemValue"]
7
7
  }
package/Table/index.d.ts CHANGED
@@ -45,6 +45,15 @@ export interface TableProps extends BaseProps<'table'> {
45
45
  * @default 'default'
46
46
  */
47
47
  variant?: 'zebra' | 'default';
48
+ /**
49
+ * verticalAlign is optional.
50
+ * The verticalAlign property sets vertical alignment of the table-cells.
51
+ * @value 'top'
52
+ * @value 'middle'
53
+ * @value 'bottom'
54
+ * @default 'middle'
55
+ */
56
+ verticalAlign?: 'top' | 'middle' | 'bottom';
48
57
  }
49
58
  /**
50
59
  * Table component is used to wrap the sub components of a table
package/Table/index.js CHANGED
@@ -8,6 +8,7 @@ const Table = React.forwardRef(
8
8
  dense = false,
9
9
  verticalBorders = false,
10
10
  stacked = "never",
11
+ verticalAlign = "middle",
11
12
  className,
12
13
  children,
13
14
  ...props
@@ -26,7 +27,9 @@ const Table = React.forwardRef(
26
27
  "ds-table--light": headerVariant === "light",
27
28
  "ds-table--dense": dense,
28
29
  "ds-table--zebra": variant === "zebra",
29
- "ds-table--vertical-lines": verticalBorders
30
+ "ds-table--vertical-lines": verticalBorders,
31
+ "ds-table--align-top": verticalAlign === "top",
32
+ "ds-table--align-bottom": verticalAlign === "bottom"
30
33
  }),
31
34
  ...props
32
35
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Table/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TableProps extends BaseProps<'table'> {\n /**\n * headerVariant is optional.\n * The `headerVariant` prop is used to either give blue background color to th tags\n * or a light grey background.\n * Default value is undefined which results to an opaque background color.\n * @value 'dark'\n * @value 'light'\n */\n headerVariant?: 'dark' | 'light';\n /**\n * dense is optional.\n * The dense prop is used to make font size smaller and give\n * extra padding.\n * @value true\n * @value false\n * @default false\n */\n dense?: boolean;\n /**\n * verticalBorders is optional.\n * The verticalBorders prop gives extra vertical lines to the table.\n * @value true\n * @value false\n * @default false\n */\n verticalBorders?: boolean;\n /**\n * stacked is optional.\n * The stacked prop gives responsiveness to the table. If used, make sure to add \"data-label\" to TableDataCell components.\n * Default value is never.\n * @value 'always'\n * @value 'sm'\n * @value 'md'\n * @value 'never'\n * @default 'never'\n */\n stacked?: 'always' | 'sm' | 'md' | 'never';\n /**\n * variant is optional.\n * @value 'default'\n * @value 'zebra' is used to make zebra table lines. If you have 'zebra' variant, color prop to TableRow component adds nothing.\n * @default 'default'\n */\n variant?: 'zebra' | 'default';\n}\n/**\n * Table component is used to wrap the sub components of a table\n */\nexport const Table = React.forwardRef<HTMLTableElement, TableProps>(\n function Table(\n {\n headerVariant,\n variant,\n dense = false,\n verticalBorders = false,\n stacked = 'never',\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"table\"\n ref={ref}\n className={clsx(className, {\n 'ds-table': true,\n 'ds-table--stacked-always': stacked === 'always',\n 'ds-table--stacked-sm': stacked === 'sm',\n 'ds-table--stacked-md': stacked == 'md',\n 'ds-table--dark': headerVariant === 'dark',\n 'ds-table--light': headerVariant === 'light',\n 'ds-table--dense': dense,\n 'ds-table--zebra': variant === 'zebra',\n 'ds-table--vertical-lines': verticalBorders,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Table;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAmDzB,MAAM,QAAQ,MAAM;AAAA,EACzB,SAASA,OACP;AAAA,IACE;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,YAAY;AAAA,UACZ,4BAA4B,YAAY;AAAA,UACxC,wBAAwB,YAAY;AAAA,UACpC,wBAAwB,WAAW;AAAA,UACnC,kBAAkB,kBAAkB;AAAA,UACpC,mBAAmB,kBAAkB;AAAA,UACrC,mBAAmB;AAAA,UACnB,mBAAmB,YAAY;AAAA,UAC/B,4BAA4B;AAAA,QAC9B,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,gBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TableProps extends BaseProps<'table'> {\n /**\n * headerVariant is optional.\n * The `headerVariant` prop is used to either give blue background color to th tags\n * or a light grey background.\n * Default value is undefined which results to an opaque background color.\n * @value 'dark'\n * @value 'light'\n */\n headerVariant?: 'dark' | 'light';\n /**\n * dense is optional.\n * The dense prop is used to make font size smaller and give\n * extra padding.\n * @value true\n * @value false\n * @default false\n */\n dense?: boolean;\n /**\n * verticalBorders is optional.\n * The verticalBorders prop gives extra vertical lines to the table.\n * @value true\n * @value false\n * @default false\n */\n verticalBorders?: boolean;\n /**\n * stacked is optional.\n * The stacked prop gives responsiveness to the table. If used, make sure to add \"data-label\" to TableDataCell components.\n * Default value is never.\n * @value 'always'\n * @value 'sm'\n * @value 'md'\n * @value 'never'\n * @default 'never'\n */\n stacked?: 'always' | 'sm' | 'md' | 'never';\n /**\n * variant is optional.\n * @value 'default'\n * @value 'zebra' is used to make zebra table lines. If you have 'zebra' variant, color prop to TableRow component adds nothing.\n * @default 'default'\n */\n variant?: 'zebra' | 'default';\n /**\n * verticalAlign is optional.\n * The verticalAlign property sets vertical alignment of the table-cells.\n * @value 'top'\n * @value 'middle'\n * @value 'bottom'\n * @default 'middle'\n */\n verticalAlign?: 'top' | 'middle' | 'bottom';\n}\n/**\n * Table component is used to wrap the sub components of a table\n */\nexport const Table = React.forwardRef<HTMLTableElement, TableProps>(\n function Table(\n {\n headerVariant,\n variant,\n dense = false,\n verticalBorders = false,\n stacked = 'never',\n verticalAlign = 'middle',\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"table\"\n ref={ref}\n className={clsx(className, {\n 'ds-table': true,\n 'ds-table--stacked-always': stacked === 'always',\n 'ds-table--stacked-sm': stacked === 'sm',\n 'ds-table--stacked-md': stacked == 'md',\n 'ds-table--dark': headerVariant === 'dark',\n 'ds-table--light': headerVariant === 'light',\n 'ds-table--dense': dense,\n 'ds-table--zebra': variant === 'zebra',\n 'ds-table--vertical-lines': verticalBorders,\n 'ds-table--align-top': verticalAlign === 'top',\n 'ds-table--align-bottom': verticalAlign === 'bottom',\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Table;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA4DzB,MAAM,QAAQ,MAAM;AAAA,EACzB,SAASA,OACP;AAAA,IACE;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,YAAY;AAAA,UACZ,4BAA4B,YAAY;AAAA,UACxC,wBAAwB,YAAY;AAAA,UACpC,wBAAwB,WAAW;AAAA,UACnC,kBAAkB,kBAAkB;AAAA,UACpC,mBAAmB,kBAAkB;AAAA,UACrC,mBAAmB;AAAA,UACnB,mBAAmB,YAAY;AAAA,UAC/B,4BAA4B;AAAA,UAC5B,uBAAuB,kBAAkB;AAAA,UACzC,0BAA0B,kBAAkB;AAAA,QAC9C,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,gBAAQ;",
6
6
  "names": ["Table"]
7
7
  }
@@ -10,6 +10,28 @@ export interface TableDataCellProps extends BaseProps<'td'> {
10
10
  * @default 'text'
11
11
  */
12
12
  dataType?: 'text' | 'numeric';
13
+ /**
14
+ * variant is optional.
15
+ * Use this prop to control the bottom border of the table-cell.
16
+ * @value 'border'
17
+ * @value 'none'
18
+ * @default 'border'
19
+ */
20
+ variant?: 'border' | 'none';
21
+ /**
22
+ * wordBreak is optional.
23
+ * Use this prop to control the word break of the table-cell contents.
24
+ */
25
+ wordBreak?: 'break-all' | 'none';
26
+ /**
27
+ * highlight is optional.
28
+ * Add the highlight prop to add a highlight line on the left of the row.
29
+ * @value 'warning' warning highlight line
30
+ * @value 'error' error highlight line
31
+ * @default undefined
32
+ */
33
+ highlight?: 'warning' | 'error';
34
+ highlightAssistiveText?: string;
13
35
  }
14
36
  /**
15
37
  * Use TableDataCell inside the Table component to fill the data of a cell in a table.
@@ -1,7 +1,18 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const TableDataCell = React.forwardRef(function TableDataCell2({ dataType = "text", className, children, ...props }, ref) {
4
+ import VisuallyHidden from "@digigov/react-core/VisuallyHidden";
5
+ const TableDataCell = React.forwardRef(function TableDataCell2({
6
+ dataType = "text",
7
+ variant = "border",
8
+ wordBreak = "none",
9
+ highlight,
10
+ highlightAssistiveText,
11
+ className,
12
+ children,
13
+ ...props
14
+ }, ref) {
15
+ const calculatedHighlightAssistiveText = highlightAssistiveText || (highlight === "warning" ? "\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE" : highlight === "error" ? "\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF" : void 0);
5
16
  return /* @__PURE__ */ React.createElement(
6
17
  Base,
7
18
  {
@@ -9,10 +20,15 @@ const TableDataCell = React.forwardRef(function TableDataCell2({ dataType = "tex
9
20
  ref,
10
21
  className: clsx(className, {
11
22
  "ds-table__cell": true,
12
- "ds-table__cell--numeric": dataType === "numeric"
23
+ "ds-table__cell--border": variant === "border",
24
+ "ds-table__cell--break-all": wordBreak === "break-all",
25
+ "ds-table__cell--numeric": dataType === "numeric",
26
+ "ds-table__cell--warning": highlight === "warning",
27
+ "ds-table__cell--error": highlight === "error"
13
28
  }),
14
29
  ...props
15
30
  },
31
+ calculatedHighlightAssistiveText && /* @__PURE__ */ React.createElement(VisuallyHidden, null, calculatedHighlightAssistiveText),
16
32
  children
17
33
  );
18
34
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/TableDataCell/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n// import PhaseBannerTag from '@digigov/react-core/PhaseBannerTag';\n\nexport interface TableDataCellProps extends BaseProps<'td'> {\n /**\n * dataType is optional.\n * Use numeric value when comparing columns of numbers, align the numbers to the right in table cells\n * Default value is text which aligns texts to the center\n * @value 'text'\n * @value 'numeric'\n * @default 'text'\n */\n dataType?: 'text' | 'numeric';\n}\n/**\n * Use TableDataCell inside the Table component to fill the data of a cell in a table.\n */\nexport const TableDataCell = React.forwardRef<\n HTMLTableCellElement,\n TableDataCellProps\n>(function TableDataCell(\n { dataType = 'text', className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"td\"\n ref={ref}\n className={clsx(className, {\n 'ds-table__cell': true,\n 'ds-table__cell--numeric': dataType === 'numeric',\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default TableDataCell;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiBzB,MAAM,gBAAgB,MAAM,WAGjC,SAASA,eACT,EAAE,WAAW,QAAQ,WAAW,UAAU,GAAG,MAAM,GACnD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,kBAAkB;AAAA,QAClB,2BAA2B,aAAa;AAAA,MAC1C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,wBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\nimport VisuallyHidden from '@digigov/react-core/VisuallyHidden';\n// import PhaseBannerTag from '@digigov/react-core/PhaseBannerTag';\n\nexport interface TableDataCellProps extends BaseProps<'td'> {\n /**\n * dataType is optional.\n * Use numeric value when comparing columns of numbers, align the numbers to the right in table cells\n * Default value is text which aligns texts to the center\n * @value 'text'\n * @value 'numeric'\n * @default 'text'\n */\n dataType?: 'text' | 'numeric';\n /**\n * variant is optional.\n * Use this prop to control the bottom border of the table-cell.\n * @value 'border'\n * @value 'none'\n * @default 'border'\n */\n variant?: 'border' | 'none';\n /**\n * wordBreak is optional.\n * Use this prop to control the word break of the table-cell contents.\n */\n wordBreak?: 'break-all' | 'none';\n\n /**\n * highlight is optional.\n * Add the highlight prop to add a highlight line on the left of the row.\n * @value 'warning' warning highlight line\n * @value 'error' error highlight line\n * @default undefined\n */\n highlight?: 'warning' | 'error';\n\n /*\n * highlightAssistiveText is optional.\n * Use this prop to add assistive text for screen readers when the highlight prop is used.\n * This text will be visually hidden.\n * @default undefined\n */\n highlightAssistiveText?: string;\n}\n/**\n * Use TableDataCell inside the Table component to fill the data of a cell in a table.\n */\nexport const TableDataCell = React.forwardRef<\n HTMLTableCellElement,\n TableDataCellProps\n>(function TableDataCell(\n {\n dataType = 'text',\n variant = 'border',\n wordBreak = 'none',\n highlight,\n highlightAssistiveText,\n className,\n children,\n ...props\n },\n ref\n) {\n const calculatedHighlightAssistiveText =\n highlightAssistiveText ||\n (highlight === 'warning'\n ? '\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE'\n : highlight === 'error'\n ? '\u039B\u03B1\u03BD\u03B8\u03B1\u03C3\u03BC\u03AD\u03BD\u03BF \u03C0\u03B5\u03B4\u03AF\u03BF'\n : undefined);\n\n return (\n <Base\n as=\"td\"\n ref={ref}\n className={clsx(className, {\n 'ds-table__cell': true,\n 'ds-table__cell--border': variant === 'border',\n 'ds-table__cell--break-all': wordBreak === 'break-all',\n 'ds-table__cell--numeric': dataType === 'numeric',\n 'ds-table__cell--warning': highlight === 'warning',\n 'ds-table__cell--error': highlight === 'error',\n })}\n {...props}\n >\n {calculatedHighlightAssistiveText && (\n <VisuallyHidden>{calculatedHighlightAssistiveText}</VisuallyHidden>\n )}\n {children}\n </Base>\n );\n});\n\nexport default TableDataCell;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAChC,OAAO,oBAAoB;AA+CpB,MAAM,gBAAgB,MAAM,WAGjC,SAASA,eACT;AAAA,EACE,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,mCACJ,2BACC,cAAc,YACX,+CACA,cAAc,UACZ,gGACA;AAER,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,kBAAkB;AAAA,QAClB,0BAA0B,YAAY;AAAA,QACtC,6BAA6B,cAAc;AAAA,QAC3C,2BAA2B,aAAa;AAAA,QACxC,2BAA2B,cAAc;AAAA,QACzC,yBAAyB,cAAc;AAAA,MACzC,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH,oCACC,oCAAC,sBAAgB,gCAAiC;AAAA,IAEnD;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,wBAAQ;",
6
6
  "names": ["TableDataCell"]
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import clsx from "clsx";
2
2
  import CoreTextArea from "@digigov/react-core/TextArea/index.web";
3
- import extend from "@digigov/react-core/utils/extend.native";
3
+ import extend from "@digigov/react-core/utils/index.native";
4
4
  const TextArea = extend(CoreTextArea, ({ className, ...props }) => ({
5
5
  ...props,
6
6
  multiline: true,
@@ -1,4 +1,2 @@
1
- export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextArea/index.web").TextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement> & {
2
- className?: string;
3
- }, "ref"> & import("react").RefAttributes<unknown>>;
1
+ export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextArea/index.web").TextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>, "ref"> & import("react").RefAttributes<unknown>>;
4
2
  export default TextArea;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/TextArea/index.native.tsx"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport CoreTextArea from '@digigov/react-core/TextArea/index.web';\nimport extend from '@digigov/react-core/utils/extend.native';\nexport const TextArea = extend(CoreTextArea, ({ className, ...props }) => ({\n ...props,\n multiline: true,\n className: clsx(className, {\n 'ds-textarea__wrapper': true,\n }),\n}));\nexport default TextArea;\n"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport CoreTextArea from '@digigov/react-core/TextArea/index.web';\nimport extend from '@digigov/react-core/utils/index.native';\nexport const TextArea = extend(CoreTextArea, ({ className, ...props }) => ({\n ...props,\n multiline: true,\n className: clsx(className, {\n 'ds-textarea__wrapper': true,\n }),\n}));\nexport default TextArea;\n"],
5
5
  "mappings": "AAAA,OAAO,UAAU;AACjB,OAAO,kBAAkB;AACzB,OAAO,YAAY;AACZ,MAAM,WAAW,OAAO,cAAc,CAAC,EAAE,WAAW,GAAG,MAAM,OAAO;AAAA,EACzE,GAAG;AAAA,EACH,WAAW;AAAA,EACX,WAAW,KAAK,WAAW;AAAA,IACzB,wBAAwB;AAAA,EAC1B,CAAC;AACH,EAAE;AACF,IAAO,uBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import clsx from "clsx";
2
2
  import CoreTextInput from "@digigov/react-core/TextInput/index.web";
3
- import extend from "@digigov/react-core/utils/extend.native";
3
+ import extend from "@digigov/react-core/utils/index.native";
4
4
  const TextInput = extend(CoreTextInput, ({ className, ...props }) => {
5
5
  return {
6
6
  ...props,
@@ -1,4 +1,2 @@
1
- export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextInput/index.web").TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement> & {
2
- className?: string;
3
- }, "ref"> & import("react").RefAttributes<unknown>>;
1
+ export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextInput/index.web").TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<unknown>>;
4
2
  export default TextInput;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/TextInput/index.native.tsx"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport CoreTextInput from '@digigov/react-core/TextInput/index.web';\nimport extend from '@digigov/react-core/utils/extend.native';\nexport const TextInput = extend(CoreTextInput, ({ className, ...props }) => {\n return {\n ...props,\n className: clsx(className, {\n 'ds-input__wrapper': true,\n 'ds-input--disabled': props.disabled,\n [`ds-input--width-${props.maxWidth}__wrapper`]:\n props.maxWidth !== undefined,\n }),\n };\n});\nexport default TextInput;\n"],
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport CoreTextInput from '@digigov/react-core/TextInput/index.web';\nimport extend from '@digigov/react-core/utils/index.native';\nexport const TextInput = extend(CoreTextInput, ({ className, ...props }) => {\n return {\n ...props,\n className: clsx(className, {\n 'ds-input__wrapper': true,\n 'ds-input--disabled': props.disabled,\n [`ds-input--width-${props.maxWidth}__wrapper`]:\n props.maxWidth !== undefined,\n }),\n };\n});\nexport default TextInput;\n"],
5
5
  "mappings": "AAAA,OAAO,UAAU;AACjB,OAAO,mBAAmB;AAC1B,OAAO,YAAY;AACZ,MAAM,YAAY,OAAO,eAAe,CAAC,EAAE,WAAW,GAAG,MAAM,MAAM;AAC1E,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW,KAAK,WAAW;AAAA,MACzB,qBAAqB;AAAA,MACrB,sBAAsB,MAAM;AAAA,MAC5B,CAAC,mBAAmB,MAAM,QAAQ,WAAW,GAC3C,MAAM,aAAa;AAAA,IACvB,CAAC;AAAA,EACH;AACF,CAAC;AACD,IAAO,uBAAQ;",
6
6
  "names": []
7
7
  }
@@ -26,5 +26,5 @@ export interface TypographyProps extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | '
26
26
  * Typography component is used as generic component for typography.
27
27
  * Use Typography component to extend components such as Heading, NormalText Paragraph etc.
28
28
  */
29
- export declare const Typography: React.ForwardRefExoticComponent<Omit<TypographyProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
29
+ export declare const Typography: React.ForwardRefExoticComponent<Omit<TypographyProps, "ref"> & React.RefAttributes<HTMLParagraphElement | HTMLHeadingElement | HTMLSpanElement>>;
30
30
  export default Typography;
@@ -1,23 +1,21 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const Typography = React.forwardRef(
5
- function Typography2({ as, fontSize, fontWeight, className, children, ...props }, ref) {
6
- return /* @__PURE__ */ React.createElement(
7
- Base,
8
- {
9
- as,
10
- ref,
11
- className: clsx(className, {
12
- [`ds-!-font-size-${fontSize}`]: fontSize !== void 0,
13
- [`ds-!-font-weight-${fontWeight}`]: fontWeight !== void 0
14
- }),
15
- ...props
16
- },
17
- children
18
- );
19
- }
20
- );
4
+ const Typography = React.forwardRef(function Typography2({ as, fontSize, fontWeight, className, children, ...props }, ref) {
5
+ return /* @__PURE__ */ React.createElement(
6
+ Base,
7
+ {
8
+ as,
9
+ ref,
10
+ className: clsx(className, {
11
+ [`ds-!-font-size-${fontSize}`]: fontSize !== void 0,
12
+ [`ds-!-font-weight-${fontWeight}`]: fontWeight !== void 0
13
+ }),
14
+ ...props
15
+ },
16
+ children
17
+ );
18
+ });
21
19
  var Typography_default = Typography;
22
20
  export {
23
21
  Typography,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Typography/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TypographyProps\n extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'p' | 'code'> {\n /**\n * fontSize is optional.\n * Add this fontSize override prop in order to change the font size.\n * @value 14\n * @value 16\n * @value 19\n * @value 24\n * @value 30\n * @value 36\n * @value 48\n * @value 72\n */\n fontSize?: 14 | 16 | 19 | 24 | 30 | 36 | 48 | 72;\n /**\n * fontWeight is optional.\n * You can add a fontWeight override prop to change the font weight to regular or bold.\n * @value 'regular'\n * @value 'bold'\n */\n fontWeight?: 'regular' | 'bold';\n}\n/**\n * Typography component is used as generic component for typography.\n * Use Typography component to extend components such as Heading, NormalText Paragraph etc.\n */\nexport const Typography = React.forwardRef<HTMLHeadingElement, TypographyProps>(\n function Typography(\n { as, fontSize, fontWeight, className, children, ...props },\n ref\n ) {\n return (\n <Base\n as={as}\n ref={ref}\n className={clsx(className, {\n [`ds-!-font-size-${fontSize}`]: fontSize !== undefined,\n [`ds-!-font-weight-${fontWeight}`]: fontWeight !== undefined,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Typography;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA6BzB,MAAM,aAAa,MAAM;AAAA,EAC9B,SAASA,YACP,EAAE,IAAI,UAAU,YAAY,WAAW,UAAU,GAAG,MAAM,GAC1D,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,CAAC,kBAAkB,QAAQ,EAAE,GAAG,aAAa;AAAA,UAC7C,CAAC,oBAAoB,UAAU,EAAE,GAAG,eAAe;AAAA,QACrD,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,qBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TypographyProps\n extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'p' | 'code'> {\n /**\n * fontSize is optional.\n * Add this fontSize override prop in order to change the font size.\n * @value 14\n * @value 16\n * @value 19\n * @value 24\n * @value 30\n * @value 36\n * @value 48\n * @value 72\n */\n fontSize?: 14 | 16 | 19 | 24 | 30 | 36 | 48 | 72;\n /**\n * fontWeight is optional.\n * You can add a fontWeight override prop to change the font weight to regular or bold.\n * @value 'regular'\n * @value 'bold'\n */\n fontWeight?: 'regular' | 'bold';\n}\n/**\n * Typography component is used as generic component for typography.\n * Use Typography component to extend components such as Heading, NormalText Paragraph etc.\n */\nexport const Typography = React.forwardRef<\n HTMLSpanElement | HTMLParagraphElement | HTMLHeadingElement,\n TypographyProps\n>(function Typography(\n { as, fontSize, fontWeight, className, children, ...props },\n ref\n) {\n return (\n <Base\n as={as}\n ref={ref}\n className={clsx(className, {\n [`ds-!-font-size-${fontSize}`]: fontSize !== undefined,\n [`ds-!-font-weight-${fontWeight}`]: fontWeight !== undefined,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default Typography;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA6BzB,MAAM,aAAa,MAAM,WAG9B,SAASA,YACT,EAAE,IAAI,UAAU,YAAY,WAAW,UAAU,GAAG,MAAM,GAC1D,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,CAAC,kBAAkB,QAAQ,EAAE,GAAG,aAAa;AAAA,QAC7C,CAAC,oBAAoB,UAAU,EAAE,GAAG,eAAe;AAAA,MACrD,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,qBAAQ;",
6
6
  "names": ["Typography"]
7
7
  }
@@ -14,6 +14,13 @@ export interface WarningTextProps extends BaseProps<'div'> {
14
14
  * @default false
15
15
  * */
16
16
  dense?: boolean;
17
+ /**
18
+ * strong is optional.
19
+ * @value true if you want to emphasize importance, conveying meaning to both sighted and screen readers.
20
+ * @value false WarningText will be a simple div element.
21
+ * @default true
22
+ * */
23
+ strong?: boolean;
17
24
  }
18
25
  /**
19
26
  * WarningText.
@@ -3,7 +3,15 @@ import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
4
  import { WarningTextAssistive } from "@digigov/react-core/WarningTextAssistive";
5
5
  const WarningText = React.forwardRef(
6
- function WarningText2({ className, assistiveText = "\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE", dense, children, ...props }, ref) {
6
+ function WarningText2({
7
+ className,
8
+ strong = true,
9
+ assistiveText = "\u03A0\u03C1\u03BF\u03C3\u03BF\u03C7\u03AE",
10
+ dense,
11
+ children,
12
+ ...props
13
+ }, ref) {
14
+ const Component = strong ? "strong" : "div";
7
15
  return /* @__PURE__ */ React.createElement(
8
16
  Base,
9
17
  {
@@ -28,7 +36,7 @@ const WarningText = React.forwardRef(
28
36
  /* @__PURE__ */ React.createElement(
29
37
  Base,
30
38
  {
31
- as: "strong",
39
+ as: Component,
32
40
  className: clsx({
33
41
  "ds-warning-text__content": true
34
42
  })