@dxc-technology/halstack-react 0.0.0-2480494 → 0.0.0-2499c33

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 (434) hide show
  1. package/BackgroundColorContext.d.ts +1 -0
  2. package/BackgroundColorContext.js +6 -26
  3. package/HalstackContext.d.ts +1249 -0
  4. package/HalstackContext.js +310 -0
  5. package/README.md +47 -0
  6. package/accordion/Accordion.accessibility.test.js +71 -0
  7. package/accordion/Accordion.d.ts +1 -1
  8. package/accordion/Accordion.js +105 -194
  9. package/accordion/Accordion.stories.tsx +251 -0
  10. package/accordion/Accordion.test.js +56 -0
  11. package/accordion/types.d.ts +12 -23
  12. package/accordion-group/AccordionGroup.accessibility.test.js +88 -0
  13. package/accordion-group/AccordionGroup.d.ts +3 -3
  14. package/accordion-group/AccordionGroup.js +39 -108
  15. package/accordion-group/AccordionGroup.stories.tsx +252 -0
  16. package/accordion-group/AccordionGroup.test.js +98 -0
  17. package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
  18. package/accordion-group/AccordionGroupAccordion.js +31 -0
  19. package/accordion-group/AccordionGroupContext.d.ts +3 -0
  20. package/accordion-group/AccordionGroupContext.js +8 -0
  21. package/accordion-group/types.d.ts +18 -23
  22. package/action-icon/ActionIcon.accessibility.test.js +63 -0
  23. package/action-icon/ActionIcon.d.ts +4 -0
  24. package/action-icon/ActionIcon.js +48 -0
  25. package/action-icon/ActionIcon.stories.tsx +41 -0
  26. package/action-icon/ActionIcon.test.js +64 -0
  27. package/action-icon/types.d.ts +26 -0
  28. package/alert/Alert.accessibility.test.js +95 -0
  29. package/alert/Alert.js +36 -126
  30. package/alert/Alert.stories.tsx +28 -0
  31. package/alert/Alert.test.js +75 -0
  32. package/alert/types.d.ts +5 -5
  33. package/badge/Badge.accessibility.test.js +129 -0
  34. package/badge/Badge.d.ts +4 -0
  35. package/badge/Badge.js +142 -40
  36. package/badge/Badge.stories.tsx +210 -0
  37. package/badge/Badge.test.js +30 -0
  38. package/badge/types.d.ts +54 -0
  39. package/bleed/Bleed.d.ts +3 -0
  40. package/bleed/Bleed.js +43 -0
  41. package/bleed/Bleed.stories.tsx +342 -0
  42. package/bleed/types.d.ts +37 -0
  43. package/box/Box.accessibility.test.js +33 -0
  44. package/box/Box.d.ts +1 -1
  45. package/box/Box.js +31 -82
  46. package/box/Box.stories.tsx +38 -51
  47. package/box/Box.test.js +13 -0
  48. package/box/types.d.ts +3 -14
  49. package/bulleted-list/BulletedList.accessibility.test.js +107 -0
  50. package/bulleted-list/BulletedList.d.ts +7 -0
  51. package/bulleted-list/BulletedList.js +92 -0
  52. package/bulleted-list/BulletedList.stories.tsx +115 -0
  53. package/bulleted-list/types.d.ts +38 -0
  54. package/bulleted-list/types.js +5 -0
  55. package/button/Button.accessibility.test.js +127 -0
  56. package/button/Button.d.ts +1 -1
  57. package/button/Button.js +65 -123
  58. package/button/Button.stories.tsx +155 -106
  59. package/button/Button.test.js +38 -0
  60. package/button/types.d.ts +12 -12
  61. package/card/Card.accessibility.test.js +36 -0
  62. package/card/Card.d.ts +1 -1
  63. package/card/Card.js +59 -103
  64. package/card/Card.stories.tsx +13 -43
  65. package/card/Card.test.js +39 -0
  66. package/card/types.d.ts +6 -11
  67. package/checkbox/Checkbox.accessibility.test.js +87 -0
  68. package/checkbox/Checkbox.d.ts +2 -2
  69. package/checkbox/Checkbox.js +145 -183
  70. package/checkbox/Checkbox.stories.tsx +166 -136
  71. package/checkbox/Checkbox.test.js +199 -0
  72. package/checkbox/types.d.ts +19 -7
  73. package/chip/Chip.accessibility.test.js +67 -0
  74. package/chip/Chip.d.ts +4 -0
  75. package/chip/Chip.js +49 -146
  76. package/chip/Chip.stories.tsx +104 -30
  77. package/chip/Chip.test.js +41 -0
  78. package/chip/types.d.ts +45 -0
  79. package/chip/types.js +5 -0
  80. package/common/coreTokens.d.ts +237 -0
  81. package/common/coreTokens.js +184 -0
  82. package/common/utils.d.ts +1 -0
  83. package/common/utils.js +6 -12
  84. package/common/variables.d.ts +1395 -0
  85. package/common/variables.js +1034 -1344
  86. package/container/Container.d.ts +4 -0
  87. package/container/Container.js +194 -0
  88. package/container/Container.stories.tsx +214 -0
  89. package/container/types.d.ts +74 -0
  90. package/container/types.js +5 -0
  91. package/contextual-menu/ContextualMenu.accessibility.test.js +86 -0
  92. package/contextual-menu/ContextualMenu.d.ts +7 -0
  93. package/contextual-menu/ContextualMenu.js +71 -0
  94. package/contextual-menu/ContextualMenu.stories.tsx +182 -0
  95. package/contextual-menu/ContextualMenu.test.js +71 -0
  96. package/contextual-menu/MenuItemAction.d.ts +4 -0
  97. package/contextual-menu/MenuItemAction.js +46 -0
  98. package/contextual-menu/types.d.ts +22 -0
  99. package/contextual-menu/types.js +5 -0
  100. package/date-input/Calendar.d.ts +4 -0
  101. package/date-input/Calendar.js +214 -0
  102. package/date-input/DateInput.accessibility.test.js +216 -0
  103. package/date-input/DateInput.js +175 -313
  104. package/date-input/DateInput.stories.tsx +203 -56
  105. package/date-input/DateInput.test.js +808 -0
  106. package/date-input/DatePicker.d.ts +4 -0
  107. package/date-input/DatePicker.js +115 -0
  108. package/date-input/Icons.d.ts +6 -0
  109. package/date-input/Icons.js +58 -0
  110. package/date-input/YearPicker.d.ts +4 -0
  111. package/date-input/YearPicker.js +100 -0
  112. package/date-input/types.d.ts +86 -22
  113. package/dialog/Dialog.accessibility.test.js +69 -0
  114. package/dialog/Dialog.d.ts +1 -1
  115. package/dialog/Dialog.js +69 -130
  116. package/dialog/Dialog.stories.tsx +320 -167
  117. package/dialog/Dialog.test.js +307 -0
  118. package/dialog/types.d.ts +18 -25
  119. package/divider/Divider.accessibility.test.js +33 -0
  120. package/divider/Divider.d.ts +4 -0
  121. package/divider/Divider.js +36 -0
  122. package/divider/Divider.stories.tsx +223 -0
  123. package/divider/Divider.test.js +38 -0
  124. package/divider/types.d.ts +21 -0
  125. package/divider/types.js +5 -0
  126. package/dropdown/Dropdown.accessibility.test.js +180 -0
  127. package/dropdown/Dropdown.d.ts +1 -1
  128. package/dropdown/Dropdown.js +232 -330
  129. package/dropdown/Dropdown.stories.tsx +427 -0
  130. package/dropdown/Dropdown.test.js +599 -0
  131. package/dropdown/DropdownMenu.d.ts +4 -0
  132. package/dropdown/DropdownMenu.js +63 -0
  133. package/dropdown/DropdownMenuItem.d.ts +4 -0
  134. package/dropdown/DropdownMenuItem.js +70 -0
  135. package/dropdown/types.d.ts +38 -31
  136. package/file-input/FileInput.accessibility.test.js +160 -0
  137. package/file-input/FileInput.d.ts +2 -2
  138. package/file-input/FileInput.js +272 -340
  139. package/file-input/FileInput.stories.tsx +618 -0
  140. package/file-input/FileInput.test.js +382 -0
  141. package/file-input/FileItem.d.ts +4 -14
  142. package/file-input/FileItem.js +60 -121
  143. package/file-input/types.d.ts +53 -11
  144. package/flex/Flex.d.ts +4 -0
  145. package/flex/Flex.js +57 -0
  146. package/flex/Flex.stories.tsx +112 -0
  147. package/flex/types.d.ts +97 -0
  148. package/flex/types.js +5 -0
  149. package/footer/Footer.accessibility.test.js +117 -0
  150. package/footer/Footer.d.ts +1 -1
  151. package/footer/Footer.js +74 -200
  152. package/footer/{Footer.stories.jsx → Footer.stories.tsx} +84 -39
  153. package/footer/Footer.test.js +85 -0
  154. package/footer/Icons.d.ts +3 -0
  155. package/footer/Icons.js +67 -8
  156. package/footer/types.d.ts +40 -37
  157. package/grid/Grid.d.ts +7 -0
  158. package/grid/Grid.js +76 -0
  159. package/grid/Grid.stories.tsx +219 -0
  160. package/grid/types.d.ts +115 -0
  161. package/grid/types.js +5 -0
  162. package/header/Header.accessibility.test.js +84 -0
  163. package/header/Header.d.ts +4 -3
  164. package/header/Header.js +103 -218
  165. package/header/Header.stories.tsx +152 -63
  166. package/header/Header.test.js +66 -0
  167. package/header/Icons.d.ts +2 -0
  168. package/header/Icons.js +4 -9
  169. package/header/types.d.ts +7 -21
  170. package/heading/Heading.accessibility.test.js +33 -0
  171. package/heading/Heading.js +11 -33
  172. package/heading/Heading.stories.tsx +3 -2
  173. package/heading/Heading.test.js +169 -0
  174. package/heading/types.d.ts +7 -7
  175. package/icon/Icon.accessibility.test.js +30 -0
  176. package/icon/Icon.d.ts +4 -0
  177. package/icon/Icon.js +33 -0
  178. package/icon/Icon.stories.tsx +28 -0
  179. package/icon/types.d.ts +4 -0
  180. package/icon/types.js +5 -0
  181. package/image/Image.accessibility.test.js +56 -0
  182. package/image/Image.d.ts +4 -0
  183. package/image/Image.js +70 -0
  184. package/image/Image.stories.tsx +129 -0
  185. package/image/types.d.ts +72 -0
  186. package/image/types.js +5 -0
  187. package/inset/Inset.d.ts +3 -0
  188. package/inset/Inset.js +43 -0
  189. package/inset/Inset.stories.tsx +230 -0
  190. package/inset/types.d.ts +37 -0
  191. package/inset/types.js +5 -0
  192. package/layout/ApplicationLayout.d.ts +20 -0
  193. package/layout/ApplicationLayout.js +83 -184
  194. package/layout/ApplicationLayout.stories.tsx +162 -0
  195. package/layout/Icons.d.ts +8 -0
  196. package/layout/Icons.js +49 -48
  197. package/layout/types.d.ts +41 -0
  198. package/layout/types.js +5 -0
  199. package/link/Link.accessibility.test.js +112 -0
  200. package/link/Link.d.ts +3 -2
  201. package/link/Link.js +65 -109
  202. package/link/Link.stories.tsx +159 -52
  203. package/link/Link.test.js +63 -0
  204. package/link/types.d.ts +15 -35
  205. package/main.d.ts +19 -14
  206. package/main.js +92 -98
  207. package/nav-tabs/NavTabs.accessibility.test.js +52 -0
  208. package/nav-tabs/NavTabs.d.ts +7 -0
  209. package/nav-tabs/NavTabs.js +93 -0
  210. package/nav-tabs/NavTabs.stories.tsx +276 -0
  211. package/nav-tabs/NavTabs.test.js +76 -0
  212. package/nav-tabs/NavTabsContext.d.ts +3 -0
  213. package/nav-tabs/NavTabsContext.js +8 -0
  214. package/nav-tabs/Tab.d.ts +4 -0
  215. package/nav-tabs/Tab.js +118 -0
  216. package/nav-tabs/types.d.ts +52 -0
  217. package/nav-tabs/types.js +5 -0
  218. package/number-input/NumberInput.accessibility.test.js +228 -0
  219. package/number-input/NumberInput.js +48 -48
  220. package/number-input/NumberInput.stories.tsx +44 -28
  221. package/number-input/NumberInput.test.js +989 -0
  222. package/number-input/NumberInputContext.d.ts +3 -4
  223. package/number-input/NumberInputContext.js +3 -14
  224. package/number-input/types.d.ts +34 -15
  225. package/package.json +52 -51
  226. package/paginator/Icons.d.ts +5 -0
  227. package/paginator/Icons.js +21 -47
  228. package/paginator/Paginator.accessibility.test.js +79 -0
  229. package/paginator/Paginator.js +35 -98
  230. package/paginator/Paginator.stories.tsx +24 -0
  231. package/paginator/Paginator.test.js +335 -0
  232. package/paginator/types.d.ts +3 -3
  233. package/paragraph/Paragraph.accessibility.test.js +28 -0
  234. package/paragraph/Paragraph.d.ts +5 -0
  235. package/paragraph/Paragraph.js +22 -0
  236. package/paragraph/Paragraph.stories.tsx +27 -0
  237. package/password-input/Icons.d.ts +6 -0
  238. package/password-input/Icons.js +35 -0
  239. package/password-input/PasswordInput.accessibility.test.js +153 -0
  240. package/password-input/PasswordInput.js +58 -125
  241. package/password-input/PasswordInput.stories.tsx +3 -35
  242. package/password-input/PasswordInput.test.js +198 -0
  243. package/password-input/types.d.ts +21 -17
  244. package/progress-bar/ProgressBar.accessibility.test.js +35 -0
  245. package/progress-bar/ProgressBar.js +66 -92
  246. package/progress-bar/ProgressBar.stories.tsx +93 -0
  247. package/progress-bar/ProgressBar.test.js +93 -0
  248. package/progress-bar/types.d.ts +3 -3
  249. package/quick-nav/QuickNav.accessibility.test.js +57 -0
  250. package/quick-nav/QuickNav.d.ts +4 -0
  251. package/quick-nav/QuickNav.js +94 -0
  252. package/quick-nav/QuickNav.stories.tsx +356 -0
  253. package/quick-nav/types.d.ts +21 -0
  254. package/quick-nav/types.js +5 -0
  255. package/radio-group/Radio.d.ts +4 -0
  256. package/radio-group/Radio.js +124 -0
  257. package/radio-group/RadioGroup.accessibility.test.js +97 -0
  258. package/radio-group/RadioGroup.d.ts +4 -0
  259. package/radio-group/RadioGroup.js +235 -0
  260. package/radio-group/RadioGroup.stories.tsx +214 -0
  261. package/radio-group/RadioGroup.test.js +756 -0
  262. package/radio-group/types.d.ts +114 -0
  263. package/radio-group/types.js +5 -0
  264. package/resultset-table/Icons.d.ts +7 -0
  265. package/resultset-table/Icons.js +47 -0
  266. package/resultset-table/ResultsetTable.accessibility.test.js +274 -0
  267. package/resultset-table/ResultsetTable.d.ts +7 -0
  268. package/resultset-table/ResultsetTable.js +170 -0
  269. package/resultset-table/ResultsetTable.stories.tsx +401 -0
  270. package/resultset-table/ResultsetTable.test.js +381 -0
  271. package/{resultsetTable → resultset-table}/types.d.ts +46 -13
  272. package/resultset-table/types.js +5 -0
  273. package/select/Icons.d.ts +10 -0
  274. package/select/Icons.js +89 -0
  275. package/select/Listbox.d.ts +4 -0
  276. package/select/Listbox.js +143 -0
  277. package/select/Option.d.ts +4 -0
  278. package/select/Option.js +87 -0
  279. package/select/Select.accessibility.test.js +217 -0
  280. package/select/Select.d.ts +4 -0
  281. package/select/Select.js +240 -515
  282. package/select/Select.stories.tsx +602 -204
  283. package/select/Select.test.js +2370 -0
  284. package/select/types.d.ts +209 -0
  285. package/select/types.js +5 -0
  286. package/sidenav/Sidenav.accessibility.test.js +59 -0
  287. package/sidenav/Sidenav.d.ts +6 -5
  288. package/sidenav/Sidenav.js +137 -72
  289. package/sidenav/Sidenav.stories.tsx +246 -134
  290. package/sidenav/Sidenav.test.js +37 -0
  291. package/sidenav/SidenavContext.d.ts +5 -0
  292. package/sidenav/SidenavContext.js +13 -0
  293. package/sidenav/types.d.ts +52 -26
  294. package/slider/Slider.accessibility.test.js +104 -0
  295. package/slider/Slider.d.ts +2 -2
  296. package/slider/Slider.js +149 -181
  297. package/slider/Slider.test.js +254 -0
  298. package/slider/types.d.ts +11 -3
  299. package/spinner/Spinner.accessibility.test.js +96 -0
  300. package/spinner/Spinner.js +32 -76
  301. package/spinner/{Spinner.stories.jsx → Spinner.stories.tsx} +53 -26
  302. package/spinner/Spinner.test.js +55 -0
  303. package/spinner/types.d.ts +3 -3
  304. package/status-light/StatusLight.accessibility.test.js +157 -0
  305. package/status-light/StatusLight.d.ts +4 -0
  306. package/status-light/StatusLight.js +51 -0
  307. package/status-light/StatusLight.stories.tsx +74 -0
  308. package/status-light/StatusLight.test.js +25 -0
  309. package/status-light/types.d.ts +17 -0
  310. package/status-light/types.js +5 -0
  311. package/switch/Switch.accessibility.test.js +89 -0
  312. package/switch/Switch.d.ts +2 -2
  313. package/switch/Switch.js +150 -115
  314. package/switch/Switch.stories.tsx +45 -68
  315. package/switch/Switch.test.js +180 -0
  316. package/switch/types.d.ts +13 -5
  317. package/table/DropdownTheme.js +62 -0
  318. package/table/Table.accessibility.test.js +82 -0
  319. package/table/Table.d.ts +6 -2
  320. package/table/Table.js +79 -36
  321. package/table/Table.stories.tsx +651 -0
  322. package/table/Table.test.js +113 -0
  323. package/table/types.d.ts +34 -6
  324. package/tabs/Tab.d.ts +4 -0
  325. package/tabs/Tab.js +116 -0
  326. package/tabs/Tabs.accessibility.test.js +56 -0
  327. package/tabs/Tabs.d.ts +1 -1
  328. package/tabs/Tabs.js +318 -147
  329. package/tabs/Tabs.stories.tsx +123 -18
  330. package/tabs/Tabs.test.js +294 -0
  331. package/tabs/types.d.ts +46 -24
  332. package/tag/Tag.accessibility.test.js +69 -0
  333. package/tag/Tag.d.ts +1 -1
  334. package/tag/Tag.js +44 -86
  335. package/tag/Tag.stories.tsx +37 -30
  336. package/tag/Tag.test.js +41 -0
  337. package/tag/types.d.ts +25 -16
  338. package/text-input/Suggestion.d.ts +4 -0
  339. package/text-input/Suggestion.js +67 -0
  340. package/text-input/Suggestions.d.ts +4 -0
  341. package/text-input/Suggestions.js +86 -0
  342. package/text-input/TextInput.accessibility.test.js +321 -0
  343. package/text-input/TextInput.js +334 -553
  344. package/text-input/TextInput.stories.tsx +465 -0
  345. package/text-input/TextInput.test.js +1756 -0
  346. package/text-input/types.d.ts +71 -25
  347. package/textarea/Textarea.accessibility.test.js +155 -0
  348. package/textarea/Textarea.d.ts +4 -0
  349. package/textarea/Textarea.js +98 -181
  350. package/textarea/Textarea.stories.tsx +174 -0
  351. package/textarea/Textarea.test.js +406 -0
  352. package/textarea/types.d.ts +141 -0
  353. package/textarea/types.js +5 -0
  354. package/toggle-group/ToggleGroup.accessibility.test.js +107 -0
  355. package/toggle-group/ToggleGroup.d.ts +2 -2
  356. package/toggle-group/ToggleGroup.js +98 -113
  357. package/toggle-group/ToggleGroup.stories.tsx +79 -39
  358. package/toggle-group/ToggleGroup.test.js +137 -0
  359. package/toggle-group/types.d.ts +68 -38
  360. package/typography/Typography.accessibility.test.js +339 -0
  361. package/typography/Typography.d.ts +4 -0
  362. package/typography/Typography.js +23 -0
  363. package/typography/Typography.stories.tsx +198 -0
  364. package/typography/types.d.ts +18 -0
  365. package/typography/types.js +5 -0
  366. package/useTheme.d.ts +1148 -0
  367. package/useTheme.js +4 -11
  368. package/useTranslatedLabels.d.ts +85 -0
  369. package/useTranslatedLabels.js +14 -0
  370. package/utils/BaseTypography.d.ts +21 -0
  371. package/utils/BaseTypography.js +94 -0
  372. package/utils/FocusLock.d.ts +13 -0
  373. package/utils/FocusLock.js +124 -0
  374. package/wizard/Wizard.accessibility.test.js +55 -0
  375. package/wizard/Wizard.d.ts +1 -1
  376. package/wizard/Wizard.js +123 -104
  377. package/wizard/{Wizard.stories.jsx → Wizard.stories.tsx} +48 -19
  378. package/wizard/Wizard.test.js +114 -0
  379. package/wizard/types.d.ts +15 -15
  380. package/ThemeContext.js +0 -246
  381. package/V3Select/V3Select.js +0 -455
  382. package/V3Select/index.d.ts +0 -27
  383. package/V3Textarea/V3Textarea.js +0 -260
  384. package/V3Textarea/index.d.ts +0 -27
  385. package/card/ice-cream.jpg +0 -0
  386. package/chip/index.d.ts +0 -22
  387. package/common/OpenSans.css +0 -81
  388. package/common/RequiredComponent.js +0 -32
  389. package/common/fonts/OpenSans-Bold.ttf +0 -0
  390. package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  391. package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  392. package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  393. package/common/fonts/OpenSans-Italic.ttf +0 -0
  394. package/common/fonts/OpenSans-Light.ttf +0 -0
  395. package/common/fonts/OpenSans-LightItalic.ttf +0 -0
  396. package/common/fonts/OpenSans-Regular.ttf +0 -0
  397. package/common/fonts/OpenSans-SemiBold.ttf +0 -0
  398. package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  399. package/date/Date.js +0 -373
  400. package/date/index.d.ts +0 -27
  401. package/input-text/Icons.js +0 -22
  402. package/input-text/InputText.js +0 -611
  403. package/input-text/index.d.ts +0 -36
  404. package/number-input/numberInputContextTypes.d.ts +0 -19
  405. package/progress-bar/ProgressBar.stories.jsx +0 -58
  406. package/radio/Radio.d.ts +0 -4
  407. package/radio/Radio.js +0 -174
  408. package/radio/Radio.stories.tsx +0 -192
  409. package/radio/types.d.ts +0 -54
  410. package/resultsetTable/ResultsetTable.d.ts +0 -4
  411. package/resultsetTable/ResultsetTable.js +0 -251
  412. package/select/index.d.ts +0 -131
  413. package/slider/Slider.stories.tsx +0 -177
  414. package/table/Table.stories.jsx +0 -276
  415. package/textarea/Textarea.stories.jsx +0 -135
  416. package/textarea/index.d.ts +0 -117
  417. package/toggle/Toggle.js +0 -186
  418. package/toggle/index.d.ts +0 -21
  419. package/upload/Upload.js +0 -201
  420. package/upload/buttons-upload/ButtonsUpload.js +0 -111
  421. package/upload/buttons-upload/Icons.js +0 -40
  422. package/upload/dragAndDropArea/DragAndDropArea.js +0 -225
  423. package/upload/dragAndDropArea/Icons.js +0 -39
  424. package/upload/file-upload/FileToUpload.js +0 -115
  425. package/upload/file-upload/Icons.js +0 -66
  426. package/upload/files-upload/FilesToUpload.js +0 -109
  427. package/upload/index.d.ts +0 -15
  428. package/upload/transaction/Icons.js +0 -160
  429. package/upload/transaction/Transaction.js +0 -104
  430. package/upload/transactions/Transactions.js +0 -94
  431. package/wizard/Icons.js +0 -65
  432. /package/{radio → action-icon}/types.js +0 -0
  433. /package/{resultsetTable → badge}/types.js +0 -0
  434. /package/{number-input/numberInputContextTypes.js → bleed/types.js} +0 -0
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { RadioProps } from "./types";
3
+ declare const _default: React.MemoExoticComponent<({ label, checked, onClick, error, disabled, focused, readOnly, tabIndex, }: RadioProps) => JSX.Element>;
4
+ export default _default;
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
13
+ var _uuid = require("uuid");
14
+ var _useTheme = _interopRequireDefault(require("../useTheme"));
15
+ var _Flex = _interopRequireDefault(require("../flex/Flex"));
16
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
17
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
19
+ var DxcRadio = function DxcRadio(_ref) {
20
+ var label = _ref.label,
21
+ checked = _ref.checked,
22
+ onClick = _ref.onClick,
23
+ error = _ref.error,
24
+ disabled = _ref.disabled,
25
+ focused = _ref.focused,
26
+ readOnly = _ref.readOnly,
27
+ tabIndex = _ref.tabIndex;
28
+ var _useState = (0, _react.useState)("radio-".concat((0, _uuid.v4)())),
29
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 1),
30
+ radioLabelId = _useState2[0];
31
+ var ref = (0, _react.useRef)(null);
32
+ var colorsTheme = (0, _useTheme["default"])();
33
+ var handleOnClick = function handleOnClick() {
34
+ var _ref$current;
35
+ onClick();
36
+ document.activeElement !== (ref === null || ref === void 0 ? void 0 : ref.current) && (ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.focus());
37
+ };
38
+ var _useState3 = (0, _react.useState)(true),
39
+ _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
40
+ firstUpdate = _useState4[0],
41
+ setFirstUpdate = _useState4[1];
42
+ (0, _react.useEffect)(function () {
43
+ var _ref$current2;
44
+ // Don't apply in the first render
45
+ if (firstUpdate) {
46
+ setFirstUpdate(false);
47
+ return;
48
+ }
49
+ focused && (ref === null || ref === void 0 ? void 0 : (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.focus());
50
+ }, [focused]);
51
+ return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
52
+ theme: colorsTheme.radioGroup
53
+ }, /*#__PURE__*/_react["default"].createElement(_Flex["default"], null, /*#__PURE__*/_react["default"].createElement(RadioContainer, {
54
+ error: error,
55
+ disabled: disabled,
56
+ readOnly: readOnly,
57
+ onClick: disabled ? undefined : handleOnClick
58
+ }, /*#__PURE__*/_react["default"].createElement(RadioInputContainer, null, /*#__PURE__*/_react["default"].createElement(RadioInput, {
59
+ error: error,
60
+ disabled: disabled,
61
+ readOnly: readOnly,
62
+ role: "radio",
63
+ "aria-checked": checked,
64
+ "aria-disabled": disabled,
65
+ "aria-labelledby": radioLabelId,
66
+ tabIndex: disabled ? -1 : focused ? tabIndex : -1,
67
+ ref: ref
68
+ }, checked && /*#__PURE__*/_react["default"].createElement(Dot, {
69
+ disabled: disabled,
70
+ readOnly: readOnly,
71
+ error: error
72
+ }))), /*#__PURE__*/_react["default"].createElement(Label, {
73
+ id: radioLabelId,
74
+ disabled: disabled
75
+ }, label))));
76
+ };
77
+ var getRadioInputStateColor = function getRadioInputStateColor(props, state) {
78
+ switch (state) {
79
+ case "enabled":
80
+ return props.disabled ? props.theme.disabledRadioInputColor : props.error ? props.theme.errorRadioInputColor : props.readOnly ? props.theme.readOnlyRadioInputColor : props.theme.radioInputColor;
81
+ case "hover":
82
+ return props.error ? props.theme.hoverErrorRadioInputColor : props.readOnly ? props.theme.hoverReadOnlyRadioInputColor : props.theme.hoverRadioInputColor;
83
+ case "active":
84
+ return props.error ? props.theme.activeErrorRadioInputColor : props.readOnly ? props.theme.activeReadOnlyRadioInputColor : props.theme.activeRadioInputColor;
85
+ }
86
+ };
87
+ var RadioInputContainer = _styledComponents["default"].span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 24px;\n width: 24px;\n"])));
88
+ var RadioInput = _styledComponents["default"].span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n border: 2px solid ", ";\n border-radius: 50%;\n\n &:focus {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n ", "\n"])), function (props) {
89
+ return getRadioInputStateColor(props, "enabled");
90
+ }, function (props) {
91
+ return props.theme.focusBorderColor;
92
+ }, function (props) {
93
+ return props.disabled && "pointer-events: none;";
94
+ });
95
+ var Dot = _styledComponents["default"].span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n height: 10px;\n width: 10px;\n border-radius: 50%;\n background-color: ", ";\n"])), function (props) {
96
+ return getRadioInputStateColor(props, "enabled");
97
+ });
98
+ var Label = _styledComponents["default"].span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n ", "\n"])), function (props) {
99
+ return props.theme.radioInputLabelMargin;
100
+ }, function (props) {
101
+ return props.theme.fontFamily;
102
+ }, function (props) {
103
+ return props.theme.radioInputLabelFontSize;
104
+ }, function (props) {
105
+ return props.theme.radioInputLabelFontStyle;
106
+ }, function (props) {
107
+ return props.theme.radioInputLabelFontWeight;
108
+ }, function (props) {
109
+ return props.theme.radioInputLabelLineHeight;
110
+ }, function (props) {
111
+ return props.disabled ? "color: ".concat(props.theme.disabledRadioInputLabelFontColor, ";") : "color: ".concat(props.theme.radioInputLabelFontColor);
112
+ });
113
+ var RadioContainer = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n align-items: center;\n cursor: ", ";\n\n &:hover {\n ", " {\n border-color: ", ";\n }\n ", " {\n background-color: ", ";\n }\n }\n &:active {\n ", " {\n border-color: ", ";\n }\n ", " {\n background-color: ", ";\n }\n }\n"])), function (props) {
114
+ return props.disabled ? "not-allowed" : props.readOnly ? "default" : "pointer";
115
+ }, RadioInput, function (props) {
116
+ return !props.disabled && getRadioInputStateColor(props, "hover");
117
+ }, Dot, function (props) {
118
+ return !props.disabled && getRadioInputStateColor(props, "hover");
119
+ }, RadioInput, function (props) {
120
+ return !props.disabled && getRadioInputStateColor(props, "active");
121
+ }, Dot, function (props) {
122
+ return !props.disabled && getRadioInputStateColor(props, "active");
123
+ });
124
+ var _default = exports["default"] = /*#__PURE__*/_react["default"].memo(DxcRadio);
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
5
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
6
+ var _react = _interopRequireDefault(require("react"));
7
+ var _react2 = require("@testing-library/react");
8
+ var _jestAxe = require("jest-axe");
9
+ var _RadioGroup = _interopRequireDefault(require("./RadioGroup.tsx"));
10
+ var options = [{
11
+ label: "Option 01",
12
+ value: "1"
13
+ }, {
14
+ label: "Option 02",
15
+ value: "2"
16
+ }, {
17
+ label: "Option 03",
18
+ value: "3"
19
+ }, {
20
+ label: "Option 04",
21
+ value: "4"
22
+ }, {
23
+ label: "Option 05",
24
+ value: "5",
25
+ disabled: true
26
+ }, {
27
+ label: "Option 06",
28
+ value: "6",
29
+ disabled: true
30
+ }, {
31
+ label: "Option 07",
32
+ value: "7",
33
+ disabled: true
34
+ }, {
35
+ label: "Option 08",
36
+ value: "8",
37
+ disabled: true
38
+ }, {
39
+ label: "Option 09",
40
+ value: "9"
41
+ }];
42
+ describe("Radio Group component accessibility tests", function () {
43
+ it("Should not have basic accessibility issues", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
44
+ var _render, container, results;
45
+ return _regenerator["default"].wrap(function _callee$(_context) {
46
+ while (1) switch (_context.prev = _context.next) {
47
+ case 0:
48
+ _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
49
+ label: "test-radioGroup-label",
50
+ options: options,
51
+ error: "Error",
52
+ defaultValue: "3",
53
+ helperText: "Helper Text",
54
+ name: "Name",
55
+ stacking: "row",
56
+ optionalItemLabel: "Optional",
57
+ optional: true
58
+ })), container = _render.container;
59
+ _context.next = 3;
60
+ return (0, _jestAxe.axe)(container);
61
+ case 3:
62
+ results = _context.sent;
63
+ expect(results).toHaveNoViolations();
64
+ case 5:
65
+ case "end":
66
+ return _context.stop();
67
+ }
68
+ }, _callee);
69
+ })));
70
+ it("Should not have basic accessibility issues for read-only mode", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
71
+ var _render2, container, results;
72
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
73
+ while (1) switch (_context2.prev = _context2.next) {
74
+ case 0:
75
+ _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
76
+ label: "test-radioGroup-label",
77
+ options: options,
78
+ error: "Error",
79
+ defaultValue: "3",
80
+ helperText: "Helper Text",
81
+ name: "Name",
82
+ stacking: "row",
83
+ optionalItemLabel: "Optional",
84
+ readOnly: true
85
+ })), container = _render2.container;
86
+ _context2.next = 3;
87
+ return (0, _jestAxe.axe)(container);
88
+ case 3:
89
+ results = _context2.sent;
90
+ expect(results).toHaveNoViolations();
91
+ case 5:
92
+ case "end":
93
+ return _context2.stop();
94
+ }
95
+ }, _callee2);
96
+ })));
97
+ });
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import RadioGroupPropsType from "./types";
3
+ declare const DxcRadioGroup: React.ForwardRefExoticComponent<RadioGroupPropsType & React.RefAttributes<HTMLDivElement>>;
4
+ export default DxcRadioGroup;
@@ -0,0 +1,235 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
10
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
+ var _react = _interopRequireWildcard(require("react"));
13
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
14
+ var _uuid = require("uuid");
15
+ var _useTheme = _interopRequireDefault(require("../useTheme"));
16
+ var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
17
+ var _Radio = _interopRequireDefault(require("./Radio"));
18
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
19
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
21
+ var getInitialFocusIndex = function getInitialFocusIndex(innerOptions, value) {
22
+ var initialSelectedOptionIndex = innerOptions.findIndex(function (option) {
23
+ return option.value === value;
24
+ });
25
+ return initialSelectedOptionIndex !== -1 ? initialSelectedOptionIndex : 0;
26
+ };
27
+ var DxcRadioGroup = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
28
+ var _ref2;
29
+ var label = _ref.label,
30
+ name = _ref.name,
31
+ helperText = _ref.helperText,
32
+ options = _ref.options,
33
+ _ref$disabled = _ref.disabled,
34
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
35
+ _ref$optional = _ref.optional,
36
+ optional = _ref$optional === void 0 ? false : _ref$optional,
37
+ optionalItemLabel = _ref.optionalItemLabel,
38
+ _ref$readOnly = _ref.readOnly,
39
+ readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
40
+ _ref$stacking = _ref.stacking,
41
+ stacking = _ref$stacking === void 0 ? "column" : _ref$stacking,
42
+ defaultValue = _ref.defaultValue,
43
+ value = _ref.value,
44
+ onChange = _ref.onChange,
45
+ onBlur = _ref.onBlur,
46
+ error = _ref.error,
47
+ _ref$tabIndex = _ref.tabIndex,
48
+ tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
49
+ var _useState = (0, _react.useState)("radio-group-".concat((0, _uuid.v4)())),
50
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 1),
51
+ radioGroupId = _useState2[0];
52
+ var radioGroupLabelId = "label-".concat(radioGroupId);
53
+ var errorId = "error-".concat(radioGroupId);
54
+ var _useState3 = (0, _react.useState)(defaultValue),
55
+ _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
56
+ innerValue = _useState4[0],
57
+ setInnerValue = _useState4[1];
58
+ var _useState5 = (0, _react.useState)(true),
59
+ _useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
60
+ firstTimeFocus = _useState6[0],
61
+ setFirstTimeFocus = _useState6[1];
62
+ var colorsTheme = (0, _useTheme["default"])();
63
+ var translatedLabels = (0, _useTranslatedLabels["default"])();
64
+ var innerOptions = (0, _react.useMemo)(function () {
65
+ return optional ? [].concat((0, _toConsumableArray2["default"])(options), [{
66
+ label: optionalItemLabel !== null && optionalItemLabel !== void 0 ? optionalItemLabel : translatedLabels.radioGroup.optionalItemLabelDefault,
67
+ value: "",
68
+ disabled: disabled
69
+ }]) : options;
70
+ }, [optional, options, optionalItemLabel, translatedLabels]);
71
+ var _useState7 = (0, _react.useState)(getInitialFocusIndex(innerOptions, value !== null && value !== void 0 ? value : innerValue)),
72
+ _useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
73
+ currentFocusIndex = _useState8[0],
74
+ setCurrentFocusIndex = _useState8[1];
75
+ var handleOnChange = (0, _react.useCallback)(function (newValue) {
76
+ var currentValue = value !== null && value !== void 0 ? value : innerValue;
77
+ if (newValue !== currentValue && !readOnly) {
78
+ value !== null && value !== void 0 ? value : setInnerValue(newValue);
79
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
80
+ }
81
+ }, [value, innerValue, onChange]);
82
+ var handleOnBlur = function handleOnBlur(event) {
83
+ // If the radio group loses the focus to an element not contained inside it...
84
+ if (!event.currentTarget.contains(event.relatedTarget)) {
85
+ setFirstTimeFocus(true);
86
+ var currentValue = value !== null && value !== void 0 ? value : innerValue;
87
+ !optional && !Boolean(currentValue) ? onBlur === null || onBlur === void 0 ? void 0 : onBlur({
88
+ value: currentValue,
89
+ error: translatedLabels.formFields.requiredSelectionErrorMessage
90
+ }) : onBlur === null || onBlur === void 0 ? void 0 : onBlur({
91
+ value: currentValue
92
+ });
93
+ }
94
+ };
95
+ var handleOnFocus = function handleOnFocus() {
96
+ firstTimeFocus && setFirstTimeFocus(false);
97
+ };
98
+ var setPreviousRadioChecked = function setPreviousRadioChecked() {
99
+ setCurrentFocusIndex(function (currentFocusIndex) {
100
+ var index = currentFocusIndex === 0 ? innerOptions.length - 1 : currentFocusIndex - 1;
101
+ while (innerOptions[index].disabled) {
102
+ index = index === 0 ? innerOptions.length - 1 : index - 1;
103
+ }
104
+ handleOnChange(innerOptions[index].value);
105
+ return index;
106
+ });
107
+ };
108
+ var setNextRadioChecked = function setNextRadioChecked() {
109
+ setCurrentFocusIndex(function (currentFocusIndex) {
110
+ var index = currentFocusIndex === innerOptions.length - 1 ? 0 : currentFocusIndex + 1;
111
+ while (innerOptions[index].disabled) {
112
+ index = index === innerOptions.length - 1 ? 0 : index + 1;
113
+ }
114
+ handleOnChange(innerOptions[index].value);
115
+ return index;
116
+ });
117
+ };
118
+ var handleOnKeyDown = function handleOnKeyDown(event) {
119
+ switch (event.key) {
120
+ case "Left":
121
+ case "ArrowLeft":
122
+ case "Up":
123
+ case "ArrowUp":
124
+ event.preventDefault();
125
+ setPreviousRadioChecked();
126
+ break;
127
+ case "Right":
128
+ case "ArrowRight":
129
+ case "Down":
130
+ case "ArrowDown":
131
+ event.preventDefault();
132
+ setNextRadioChecked();
133
+ break;
134
+ case " ":
135
+ event.preventDefault();
136
+ handleOnChange(innerOptions[currentFocusIndex].value);
137
+ break;
138
+ }
139
+ };
140
+ return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
141
+ theme: colorsTheme.radioGroup
142
+ }, /*#__PURE__*/_react["default"].createElement(RadioGroupContainer, {
143
+ ref: ref
144
+ }, label && /*#__PURE__*/_react["default"].createElement(Label, {
145
+ id: radioGroupLabelId,
146
+ helperText: helperText,
147
+ disabled: disabled
148
+ }, label, optional && /*#__PURE__*/_react["default"].createElement(OptionalLabel, null, " ".concat(translatedLabels.formFields.optionalLabel))), helperText && /*#__PURE__*/_react["default"].createElement(HelperText, {
149
+ disabled: disabled
150
+ }, helperText), /*#__PURE__*/_react["default"].createElement(RadioGroup, {
151
+ onBlur: handleOnBlur,
152
+ onFocus: handleOnFocus,
153
+ onKeyDown: handleOnKeyDown,
154
+ stacking: stacking,
155
+ role: "radiogroup",
156
+ "aria-disabled": disabled,
157
+ "aria-labelledby": radioGroupLabelId,
158
+ "aria-invalid": error ? true : false,
159
+ "aria-errormessage": error ? errorId : undefined,
160
+ "aria-required": !disabled && !readOnly && !optional,
161
+ "aria-readonly": readOnly,
162
+ "aria-orientation": stacking === "column" ? "vertical" : "horizontal"
163
+ }, /*#__PURE__*/_react["default"].createElement(ValueInput, {
164
+ name: name,
165
+ disabled: disabled,
166
+ value: (_ref2 = value !== null && value !== void 0 ? value : innerValue) !== null && _ref2 !== void 0 ? _ref2 : "",
167
+ readOnly: true
168
+ }), innerOptions.map(function (option, index) {
169
+ return /*#__PURE__*/_react["default"].createElement(_Radio["default"], {
170
+ key: "radio-".concat(index),
171
+ label: option.label,
172
+ checked: (value !== null && value !== void 0 ? value : innerValue) === option.value,
173
+ onClick: function onClick() {
174
+ handleOnChange(option.value);
175
+ setCurrentFocusIndex(index);
176
+ },
177
+ error: error,
178
+ disabled: option.disabled || disabled,
179
+ focused: currentFocusIndex === index,
180
+ readOnly: readOnly,
181
+ tabIndex: tabIndex
182
+ });
183
+ })), !disabled && typeof error === "string" && /*#__PURE__*/_react["default"].createElement(Error, {
184
+ id: errorId,
185
+ "aria-live": error ? "assertive" : "off"
186
+ }, error)));
187
+ });
188
+ var RadioGroupContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: inline-flex;\n flex-direction: column;\n"])));
189
+ var Label = _styledComponents["default"].span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n ", "\n"])), function (props) {
190
+ return props.disabled ? props.theme.disabledLabelFontColor : props.theme.labelFontColor;
191
+ }, function (props) {
192
+ return props.theme.fontFamily;
193
+ }, function (props) {
194
+ return props.theme.labelFontSize;
195
+ }, function (props) {
196
+ return props.theme.labelFontStyle;
197
+ }, function (props) {
198
+ return props.theme.labelFontWeight;
199
+ }, function (props) {
200
+ return props.theme.labelLineHeight;
201
+ }, function (props) {
202
+ return !props.helperText && "margin-bottom: ".concat(props.theme.groupLabelMargin);
203
+ });
204
+ var OptionalLabel = _styledComponents["default"].span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n font-weight: ", ";\n"])), function (props) {
205
+ return props.theme.optionalLabelFontWeight;
206
+ });
207
+ var HelperText = _styledComponents["default"].span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-bottom: ", ";\n"])), function (props) {
208
+ return props.disabled ? props.theme.disabledHelperTextFontColor : props.theme.helperTextFontColor;
209
+ }, function (props) {
210
+ return props.theme.fontFamily;
211
+ }, function (props) {
212
+ return props.theme.helperTextFontSize;
213
+ }, function (props) {
214
+ return props.theme.helperTextFontStyle;
215
+ }, function (props) {
216
+ return props.theme.helperTextFontWeight;
217
+ }, function (props) {
218
+ return props.theme.helperTextLineHeight;
219
+ }, function (props) {
220
+ return props.theme.groupLabelMargin;
221
+ });
222
+ var RadioGroup = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n flex-direction: ", ";\n row-gap: ", ";\n column-gap: ", ";\n"])), function (props) {
223
+ return props.stacking;
224
+ }, function (props) {
225
+ return props.theme.groupVerticalGutter;
226
+ }, function (props) {
227
+ return props.theme.groupHorizontalGutter;
228
+ });
229
+ var ValueInput = _styledComponents["default"].input(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n display: none;\n"])));
230
+ var Error = _styledComponents["default"].span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n min-height: 1.5em;\n color: ", ";\n font-family: ", ";\n font-size: 0.75rem;\n font-weight: 400;\n line-height: 1.5em;\n margin-top: 0.5rem;\n"])), function (props) {
231
+ return props.theme.errorMessageColor;
232
+ }, function (props) {
233
+ return props.theme.fontFamily;
234
+ });
235
+ var _default = exports["default"] = DxcRadioGroup;