@dxc-technology/halstack-react 0.0.0-b915415 → 0.0.0-b94d9fc

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 (510) hide show
  1. package/BackgroundColorContext.d.ts +1 -0
  2. package/BackgroundColorContext.js +30 -0
  3. package/HalstackContext.d.ts +1249 -0
  4. package/HalstackContext.js +310 -0
  5. package/README.md +28 -47
  6. package/accordion/Accordion.d.ts +4 -0
  7. package/accordion/Accordion.js +182 -0
  8. package/accordion/Accordion.stories.tsx +283 -0
  9. package/accordion/Accordion.test.js +56 -0
  10. package/accordion/types.d.ts +57 -0
  11. package/accordion/types.js +5 -0
  12. package/accordion-group/AccordionGroup.d.ts +8 -0
  13. package/accordion-group/AccordionGroup.js +101 -0
  14. package/accordion-group/AccordionGroup.stories.tsx +252 -0
  15. package/accordion-group/AccordionGroup.test.js +98 -0
  16. package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
  17. package/accordion-group/AccordionGroupAccordion.js +31 -0
  18. package/accordion-group/types.d.ts +67 -0
  19. package/accordion-group/types.js +5 -0
  20. package/action-icon/ActionIcon.d.ts +4 -0
  21. package/action-icon/ActionIcon.js +47 -0
  22. package/action-icon/ActionIcon.stories.tsx +41 -0
  23. package/action-icon/ActionIcon.test.js +64 -0
  24. package/action-icon/types.d.ts +26 -0
  25. package/action-icon/types.js +5 -0
  26. package/alert/Alert.d.ts +4 -0
  27. package/{dist/alert → alert}/Alert.js +55 -204
  28. package/alert/Alert.stories.tsx +198 -0
  29. package/alert/Alert.test.js +75 -0
  30. package/alert/types.d.ts +49 -0
  31. package/alert/types.js +5 -0
  32. package/badge/Badge.d.ts +4 -0
  33. package/badge/Badge.js +159 -0
  34. package/badge/Badge.stories.tsx +210 -0
  35. package/badge/Badge.test.js +30 -0
  36. package/badge/types.d.ts +54 -0
  37. package/badge/types.js +5 -0
  38. package/bleed/Bleed.d.ts +3 -0
  39. package/bleed/Bleed.js +43 -0
  40. package/bleed/Bleed.stories.tsx +342 -0
  41. package/bleed/types.d.ts +37 -0
  42. package/bleed/types.js +5 -0
  43. package/box/Box.d.ts +4 -0
  44. package/box/Box.js +75 -0
  45. package/box/Box.stories.tsx +119 -0
  46. package/box/Box.test.js +13 -0
  47. package/box/types.d.ts +32 -0
  48. package/box/types.js +5 -0
  49. package/bulleted-list/BulletedList.d.ts +7 -0
  50. package/bulleted-list/BulletedList.js +89 -0
  51. package/bulleted-list/BulletedList.stories.tsx +115 -0
  52. package/bulleted-list/types.d.ts +38 -0
  53. package/bulleted-list/types.js +5 -0
  54. package/button/Button.d.ts +4 -0
  55. package/button/Button.js +120 -0
  56. package/button/Button.stories.tsx +344 -0
  57. package/button/Button.test.js +38 -0
  58. package/button/types.d.ts +57 -0
  59. package/button/types.js +5 -0
  60. package/card/Card.d.ts +4 -0
  61. package/card/Card.js +120 -0
  62. package/card/Card.stories.tsx +171 -0
  63. package/card/Card.test.js +39 -0
  64. package/card/types.d.ts +62 -0
  65. package/card/types.js +5 -0
  66. package/checkbox/Checkbox.d.ts +4 -0
  67. package/checkbox/Checkbox.js +215 -0
  68. package/checkbox/Checkbox.stories.tsx +222 -0
  69. package/checkbox/Checkbox.test.js +199 -0
  70. package/checkbox/types.d.ts +72 -0
  71. package/checkbox/types.js +5 -0
  72. package/chip/Chip.d.ts +4 -0
  73. package/chip/Chip.js +121 -0
  74. package/chip/Chip.stories.tsx +214 -0
  75. package/chip/Chip.test.js +41 -0
  76. package/chip/types.d.ts +45 -0
  77. package/chip/types.js +5 -0
  78. package/common/OpenSans.css +69 -0
  79. package/common/coreTokens.d.ts +237 -0
  80. package/common/coreTokens.js +184 -0
  81. package/common/utils.d.ts +1 -0
  82. package/{dist/common → common}/utils.js +6 -12
  83. package/common/variables.d.ts +1395 -0
  84. package/common/variables.js +1267 -0
  85. package/container/Container.d.ts +4 -0
  86. package/container/Container.js +194 -0
  87. package/container/Container.stories.tsx +214 -0
  88. package/container/types.d.ts +74 -0
  89. package/container/types.js +5 -0
  90. package/date-input/Calendar.d.ts +4 -0
  91. package/date-input/Calendar.js +214 -0
  92. package/date-input/DateInput.d.ts +4 -0
  93. package/date-input/DateInput.js +223 -0
  94. package/date-input/DateInput.stories.tsx +285 -0
  95. package/date-input/DateInput.test.js +808 -0
  96. package/date-input/DatePicker.d.ts +4 -0
  97. package/date-input/DatePicker.js +115 -0
  98. package/date-input/Icons.d.ts +6 -0
  99. package/date-input/Icons.js +58 -0
  100. package/date-input/YearPicker.d.ts +4 -0
  101. package/date-input/YearPicker.js +100 -0
  102. package/date-input/types.d.ts +164 -0
  103. package/date-input/types.js +5 -0
  104. package/dialog/Dialog.d.ts +4 -0
  105. package/dialog/Dialog.js +104 -0
  106. package/dialog/Dialog.stories.tsx +365 -0
  107. package/dialog/Dialog.test.js +307 -0
  108. package/dialog/types.d.ts +36 -0
  109. package/dialog/types.js +5 -0
  110. package/dropdown/Dropdown.d.ts +4 -0
  111. package/dropdown/Dropdown.js +336 -0
  112. package/dropdown/Dropdown.stories.tsx +438 -0
  113. package/dropdown/Dropdown.test.js +599 -0
  114. package/dropdown/DropdownMenu.d.ts +4 -0
  115. package/dropdown/DropdownMenu.js +63 -0
  116. package/dropdown/DropdownMenuItem.d.ts +4 -0
  117. package/dropdown/DropdownMenuItem.js +67 -0
  118. package/dropdown/types.d.ts +98 -0
  119. package/dropdown/types.js +5 -0
  120. package/file-input/FileInput.d.ts +4 -0
  121. package/file-input/FileInput.js +479 -0
  122. package/file-input/FileInput.stories.tsx +618 -0
  123. package/file-input/FileInput.test.js +459 -0
  124. package/file-input/FileItem.d.ts +4 -0
  125. package/file-input/FileItem.js +135 -0
  126. package/file-input/types.d.ts +129 -0
  127. package/file-input/types.js +5 -0
  128. package/flex/Flex.d.ts +4 -0
  129. package/flex/Flex.js +57 -0
  130. package/flex/Flex.stories.tsx +112 -0
  131. package/flex/types.d.ts +97 -0
  132. package/flex/types.js +5 -0
  133. package/footer/Footer.d.ts +4 -0
  134. package/footer/Footer.js +138 -0
  135. package/footer/Footer.stories.tsx +171 -0
  136. package/footer/Footer.test.js +85 -0
  137. package/footer/Icons.d.ts +3 -0
  138. package/footer/Icons.js +136 -0
  139. package/footer/types.d.ts +64 -0
  140. package/footer/types.js +5 -0
  141. package/grid/Grid.d.ts +7 -0
  142. package/grid/Grid.js +76 -0
  143. package/grid/Grid.stories.tsx +219 -0
  144. package/grid/types.d.ts +115 -0
  145. package/grid/types.js +5 -0
  146. package/header/Header.d.ts +8 -0
  147. package/header/Header.js +220 -0
  148. package/header/Header.stories.tsx +251 -0
  149. package/header/Header.test.js +66 -0
  150. package/header/Icons.d.ts +2 -0
  151. package/{dist/header → header}/Icons.js +9 -39
  152. package/header/types.d.ts +33 -0
  153. package/header/types.js +5 -0
  154. package/heading/Heading.d.ts +4 -0
  155. package/{dist/heading → heading}/Heading.js +31 -124
  156. package/heading/Heading.stories.tsx +54 -0
  157. package/heading/Heading.test.js +169 -0
  158. package/heading/types.d.ts +33 -0
  159. package/heading/types.js +5 -0
  160. package/image/Image.d.ts +4 -0
  161. package/image/Image.js +70 -0
  162. package/image/Image.stories.tsx +129 -0
  163. package/image/types.d.ts +72 -0
  164. package/image/types.js +5 -0
  165. package/inset/Inset.d.ts +3 -0
  166. package/inset/Inset.js +43 -0
  167. package/inset/Inset.stories.tsx +230 -0
  168. package/inset/types.d.ts +37 -0
  169. package/inset/types.js +5 -0
  170. package/layout/ApplicationLayout.d.ts +20 -0
  171. package/layout/ApplicationLayout.js +134 -0
  172. package/layout/ApplicationLayout.stories.tsx +162 -0
  173. package/layout/Icons.d.ts +8 -0
  174. package/layout/Icons.js +58 -0
  175. package/layout/SidenavContext.d.ts +5 -0
  176. package/layout/SidenavContext.js +13 -0
  177. package/layout/types.d.ts +41 -0
  178. package/layout/types.js +5 -0
  179. package/link/Link.d.ts +4 -0
  180. package/link/Link.js +115 -0
  181. package/link/Link.stories.tsx +253 -0
  182. package/link/Link.test.js +63 -0
  183. package/link/types.d.ts +54 -0
  184. package/link/types.js +5 -0
  185. package/main.d.ts +47 -0
  186. package/{dist/main.js → main.js} +123 -139
  187. package/nav-tabs/NavTabs.d.ts +8 -0
  188. package/nav-tabs/NavTabs.js +93 -0
  189. package/nav-tabs/NavTabs.stories.tsx +276 -0
  190. package/nav-tabs/NavTabs.test.js +76 -0
  191. package/nav-tabs/Tab.d.ts +4 -0
  192. package/nav-tabs/Tab.js +118 -0
  193. package/nav-tabs/types.d.ts +52 -0
  194. package/nav-tabs/types.js +5 -0
  195. package/number-input/NumberInput.d.ts +11 -0
  196. package/number-input/NumberInput.js +86 -0
  197. package/number-input/NumberInput.stories.tsx +131 -0
  198. package/number-input/NumberInput.test.js +989 -0
  199. package/number-input/types.d.ts +130 -0
  200. package/number-input/types.js +5 -0
  201. package/package.json +56 -52
  202. package/paginator/Icons.d.ts +5 -0
  203. package/paginator/Icons.js +40 -0
  204. package/paginator/Paginator.d.ts +4 -0
  205. package/paginator/Paginator.js +135 -0
  206. package/paginator/Paginator.stories.tsx +87 -0
  207. package/paginator/Paginator.test.js +335 -0
  208. package/paginator/types.d.ts +38 -0
  209. package/paginator/types.js +5 -0
  210. package/paragraph/Paragraph.d.ts +5 -0
  211. package/paragraph/Paragraph.js +22 -0
  212. package/paragraph/Paragraph.stories.tsx +27 -0
  213. package/password-input/Icons.d.ts +6 -0
  214. package/password-input/Icons.js +35 -0
  215. package/password-input/PasswordInput.d.ts +4 -0
  216. package/password-input/PasswordInput.js +97 -0
  217. package/password-input/PasswordInput.stories.tsx +99 -0
  218. package/password-input/PasswordInput.test.js +198 -0
  219. package/password-input/types.d.ts +111 -0
  220. package/password-input/types.js +5 -0
  221. package/progress-bar/ProgressBar.d.ts +4 -0
  222. package/progress-bar/ProgressBar.js +144 -0
  223. package/progress-bar/ProgressBar.stories.tsx +93 -0
  224. package/progress-bar/ProgressBar.test.js +93 -0
  225. package/progress-bar/types.d.ts +37 -0
  226. package/progress-bar/types.js +5 -0
  227. package/quick-nav/QuickNav.d.ts +4 -0
  228. package/quick-nav/QuickNav.js +94 -0
  229. package/quick-nav/QuickNav.stories.tsx +356 -0
  230. package/quick-nav/types.d.ts +21 -0
  231. package/quick-nav/types.js +5 -0
  232. package/radio-group/Radio.d.ts +4 -0
  233. package/radio-group/Radio.js +124 -0
  234. package/radio-group/RadioGroup.d.ts +4 -0
  235. package/radio-group/RadioGroup.js +235 -0
  236. package/radio-group/RadioGroup.stories.tsx +214 -0
  237. package/radio-group/RadioGroup.test.js +756 -0
  238. package/radio-group/types.d.ts +114 -0
  239. package/radio-group/types.js +5 -0
  240. package/resultset-table/Icons.d.ts +7 -0
  241. package/resultset-table/Icons.js +47 -0
  242. package/resultset-table/ResultsetTable.d.ts +7 -0
  243. package/resultset-table/ResultsetTable.js +166 -0
  244. package/resultset-table/ResultsetTable.stories.tsx +397 -0
  245. package/resultset-table/ResultsetTable.test.js +371 -0
  246. package/resultset-table/types.d.ts +73 -0
  247. package/resultset-table/types.js +5 -0
  248. package/select/Icons.d.ts +10 -0
  249. package/select/Icons.js +89 -0
  250. package/select/Listbox.d.ts +4 -0
  251. package/select/Listbox.js +143 -0
  252. package/select/Option.d.ts +4 -0
  253. package/select/Option.js +87 -0
  254. package/select/Select.d.ts +4 -0
  255. package/select/Select.js +590 -0
  256. package/select/Select.stories.tsx +971 -0
  257. package/select/Select.test.js +2370 -0
  258. package/select/types.d.ts +209 -0
  259. package/select/types.js +5 -0
  260. package/sidenav/Icons.d.ts +7 -0
  261. package/sidenav/Icons.js +47 -0
  262. package/sidenav/Sidenav.d.ts +10 -0
  263. package/sidenav/Sidenav.js +196 -0
  264. package/sidenav/Sidenav.stories.tsx +282 -0
  265. package/sidenav/Sidenav.test.js +37 -0
  266. package/sidenav/types.d.ts +76 -0
  267. package/sidenav/types.js +5 -0
  268. package/slider/Slider.d.ts +4 -0
  269. package/slider/Slider.js +285 -0
  270. package/slider/Slider.test.js +254 -0
  271. package/slider/types.d.ts +86 -0
  272. package/slider/types.js +5 -0
  273. package/spinner/Spinner.d.ts +4 -0
  274. package/spinner/Spinner.js +206 -0
  275. package/spinner/Spinner.stories.tsx +129 -0
  276. package/spinner/Spinner.test.js +55 -0
  277. package/spinner/types.d.ts +32 -0
  278. package/spinner/types.js +5 -0
  279. package/status-light/StatusLight.d.ts +4 -0
  280. package/status-light/StatusLight.js +51 -0
  281. package/status-light/StatusLight.stories.tsx +74 -0
  282. package/status-light/StatusLight.test.js +25 -0
  283. package/status-light/types.d.ts +17 -0
  284. package/status-light/types.js +5 -0
  285. package/switch/Switch.d.ts +4 -0
  286. package/switch/Switch.js +214 -0
  287. package/switch/Switch.stories.tsx +137 -0
  288. package/switch/Switch.test.js +180 -0
  289. package/switch/types.d.ts +66 -0
  290. package/switch/types.js +5 -0
  291. package/table/DropdownTheme.js +62 -0
  292. package/table/Table.d.ts +8 -0
  293. package/table/Table.js +170 -0
  294. package/table/Table.stories.tsx +658 -0
  295. package/table/Table.test.js +113 -0
  296. package/table/types.d.ts +63 -0
  297. package/table/types.js +5 -0
  298. package/tabs/Tab.d.ts +4 -0
  299. package/tabs/Tab.js +116 -0
  300. package/tabs/Tabs.d.ts +4 -0
  301. package/tabs/Tabs.js +384 -0
  302. package/tabs/Tabs.stories.tsx +226 -0
  303. package/tabs/Tabs.test.js +294 -0
  304. package/tabs/types.d.ts +92 -0
  305. package/tabs/types.js +5 -0
  306. package/tag/Tag.d.ts +4 -0
  307. package/tag/Tag.js +151 -0
  308. package/tag/Tag.stories.tsx +155 -0
  309. package/tag/Tag.test.js +49 -0
  310. package/tag/types.d.ts +69 -0
  311. package/tag/types.js +5 -0
  312. package/text-input/Icons.d.ts +8 -0
  313. package/text-input/Icons.js +56 -0
  314. package/text-input/Suggestion.d.ts +4 -0
  315. package/text-input/Suggestion.js +67 -0
  316. package/text-input/Suggestions.d.ts +4 -0
  317. package/text-input/Suggestions.js +84 -0
  318. package/text-input/TextInput.d.ts +4 -0
  319. package/text-input/TextInput.js +565 -0
  320. package/text-input/TextInput.stories.tsx +465 -0
  321. package/text-input/TextInput.test.js +1756 -0
  322. package/text-input/types.d.ts +205 -0
  323. package/text-input/types.js +5 -0
  324. package/textarea/Textarea.d.ts +4 -0
  325. package/textarea/Textarea.js +234 -0
  326. package/textarea/Textarea.stories.tsx +174 -0
  327. package/textarea/Textarea.test.js +406 -0
  328. package/textarea/types.d.ts +141 -0
  329. package/textarea/types.js +5 -0
  330. package/toggle-group/ToggleGroup.d.ts +4 -0
  331. package/toggle-group/ToggleGroup.js +201 -0
  332. package/toggle-group/ToggleGroup.stories.tsx +218 -0
  333. package/toggle-group/ToggleGroup.test.js +137 -0
  334. package/toggle-group/types.d.ts +114 -0
  335. package/toggle-group/types.js +5 -0
  336. package/typography/Typography.d.ts +4 -0
  337. package/typography/Typography.js +23 -0
  338. package/typography/Typography.stories.tsx +198 -0
  339. package/typography/types.d.ts +18 -0
  340. package/typography/types.js +5 -0
  341. package/useTheme.d.ts +1148 -0
  342. package/{dist/useTheme.js → useTheme.js} +4 -11
  343. package/useTranslatedLabels.d.ts +85 -0
  344. package/useTranslatedLabels.js +14 -0
  345. package/utils/BaseTypography.d.ts +21 -0
  346. package/utils/BaseTypography.js +94 -0
  347. package/utils/FocusLock.d.ts +13 -0
  348. package/utils/FocusLock.js +124 -0
  349. package/wizard/Wizard.d.ts +4 -0
  350. package/wizard/Wizard.js +250 -0
  351. package/wizard/Wizard.stories.tsx +253 -0
  352. package/wizard/Wizard.test.js +114 -0
  353. package/wizard/types.d.ts +64 -0
  354. package/wizard/types.js +5 -0
  355. package/babel.config.js +0 -7
  356. package/dist/BackgroundColorContext.js +0 -46
  357. package/dist/ThemeContext.js +0 -250
  358. package/dist/V3Select/V3Select.js +0 -549
  359. package/dist/V3Select/index.d.ts +0 -27
  360. package/dist/V3Textarea/V3Textarea.js +0 -264
  361. package/dist/V3Textarea/index.d.ts +0 -27
  362. package/dist/accordion/Accordion.js +0 -353
  363. package/dist/accordion/index.d.ts +0 -28
  364. package/dist/accordion-group/AccordionGroup.js +0 -186
  365. package/dist/accordion-group/index.d.ts +0 -16
  366. package/dist/alert/index.d.ts +0 -51
  367. package/dist/badge/Badge.js +0 -63
  368. package/dist/box/Box.js +0 -156
  369. package/dist/box/index.d.ts +0 -25
  370. package/dist/button/Button.js +0 -238
  371. package/dist/button/Button.stories.js +0 -27
  372. package/dist/button/index.d.ts +0 -24
  373. package/dist/card/Card.js +0 -254
  374. package/dist/card/index.d.ts +0 -22
  375. package/dist/checkbox/Checkbox.js +0 -299
  376. package/dist/checkbox/index.d.ts +0 -24
  377. package/dist/chip/Chip.js +0 -265
  378. package/dist/chip/index.d.ts +0 -22
  379. package/dist/common/OpenSans.css +0 -81
  380. package/dist/common/RequiredComponent.js +0 -40
  381. package/dist/common/variables.js +0 -1574
  382. package/dist/date/Date.js +0 -379
  383. package/dist/date/index.d.ts +0 -27
  384. package/dist/date-input/DateInput.js +0 -400
  385. package/dist/date-input/index.d.ts +0 -95
  386. package/dist/dialog/Dialog.js +0 -218
  387. package/dist/dialog/index.d.ts +0 -18
  388. package/dist/dropdown/Dropdown.js +0 -544
  389. package/dist/dropdown/index.d.ts +0 -26
  390. package/dist/file-input/FileInput.js +0 -644
  391. package/dist/file-input/FileItem.js +0 -287
  392. package/dist/file-input/index.d.ts +0 -81
  393. package/dist/footer/Footer.js +0 -421
  394. package/dist/footer/Icons.js +0 -77
  395. package/dist/footer/index.d.ts +0 -25
  396. package/dist/header/Header.js +0 -470
  397. package/dist/header/index.d.ts +0 -25
  398. package/dist/heading/index.d.ts +0 -17
  399. package/dist/input-text/Icons.js +0 -22
  400. package/dist/input-text/InputText.js +0 -705
  401. package/dist/input-text/index.d.ts +0 -36
  402. package/dist/layout/ApplicationLayout.js +0 -327
  403. package/dist/layout/Icons.js +0 -55
  404. package/dist/link/Link.js +0 -237
  405. package/dist/link/index.d.ts +0 -23
  406. package/dist/main.d.ts +0 -40
  407. package/dist/number-input/NumberInput.js +0 -136
  408. package/dist/number-input/NumberInputContext.js +0 -16
  409. package/dist/number-input/index.d.ts +0 -113
  410. package/dist/paginator/Icons.js +0 -66
  411. package/dist/paginator/Paginator.js +0 -305
  412. package/dist/paginator/index.d.ts +0 -20
  413. package/dist/password-input/PasswordInput.js +0 -203
  414. package/dist/password-input/index.d.ts +0 -94
  415. package/dist/progress-bar/ProgressBar.js +0 -242
  416. package/dist/progress-bar/index.d.ts +0 -18
  417. package/dist/radio/Radio.js +0 -209
  418. package/dist/radio/index.d.ts +0 -23
  419. package/dist/resultsetTable/ResultsetTable.js +0 -358
  420. package/dist/resultsetTable/index.d.ts +0 -19
  421. package/dist/select/Select.js +0 -1096
  422. package/dist/select/index.d.ts +0 -53
  423. package/dist/sidenav/Sidenav.js +0 -179
  424. package/dist/sidenav/index.d.ts +0 -13
  425. package/dist/slider/Slider.js +0 -404
  426. package/dist/slider/index.d.ts +0 -29
  427. package/dist/spinner/Spinner.js +0 -381
  428. package/dist/spinner/index.d.ts +0 -17
  429. package/dist/switch/Switch.js +0 -222
  430. package/dist/switch/index.d.ts +0 -24
  431. package/dist/table/Table.js +0 -132
  432. package/dist/table/index.d.ts +0 -13
  433. package/dist/tabs/Tabs.js +0 -343
  434. package/dist/tabs/index.d.ts +0 -19
  435. package/dist/tag/Tag.js +0 -282
  436. package/dist/tag/index.d.ts +0 -24
  437. package/dist/text-input/TextInput.js +0 -974
  438. package/dist/text-input/index.d.ts +0 -135
  439. package/dist/textarea/Textarea.js +0 -369
  440. package/dist/textarea/index.d.ts +0 -117
  441. package/dist/toggle/Toggle.js +0 -220
  442. package/dist/toggle/index.d.ts +0 -21
  443. package/dist/toggle-group/ToggleGroup.js +0 -327
  444. package/dist/toggle-group/index.d.ts +0 -21
  445. package/dist/upload/Upload.js +0 -205
  446. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -135
  447. package/dist/upload/buttons-upload/Icons.js +0 -40
  448. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
  449. package/dist/upload/dragAndDropArea/Icons.js +0 -39
  450. package/dist/upload/file-upload/FileToUpload.js +0 -189
  451. package/dist/upload/file-upload/Icons.js +0 -66
  452. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  453. package/dist/upload/index.d.ts +0 -15
  454. package/dist/upload/transaction/Icons.js +0 -160
  455. package/dist/upload/transaction/Transaction.js +0 -148
  456. package/dist/upload/transactions/Transactions.js +0 -138
  457. package/dist/wizard/Icons.js +0 -65
  458. package/dist/wizard/Wizard.js +0 -405
  459. package/dist/wizard/index.d.ts +0 -18
  460. package/test/Accordion.test.js +0 -33
  461. package/test/AccordionGroup.test.js +0 -125
  462. package/test/Alert.test.js +0 -53
  463. package/test/Box.test.js +0 -10
  464. package/test/Button.test.js +0 -18
  465. package/test/Card.test.js +0 -30
  466. package/test/Checkbox.test.js +0 -45
  467. package/test/Chip.test.js +0 -25
  468. package/test/Date.test.js +0 -395
  469. package/test/DateInput.test.js +0 -242
  470. package/test/Dialog.test.js +0 -23
  471. package/test/Dropdown.test.js +0 -145
  472. package/test/FileInput.test.js +0 -201
  473. package/test/Footer.test.js +0 -94
  474. package/test/Header.test.js +0 -34
  475. package/test/Heading.test.js +0 -83
  476. package/test/InputText.test.js +0 -239
  477. package/test/Link.test.js +0 -43
  478. package/test/NumberInput.test.js +0 -259
  479. package/test/Paginator.test.js +0 -181
  480. package/test/PasswordInput.test.js +0 -83
  481. package/test/ProgressBar.test.js +0 -35
  482. package/test/Radio.test.js +0 -37
  483. package/test/ResultsetTable.test.js +0 -330
  484. package/test/Select.test.js +0 -415
  485. package/test/Sidenav.test.js +0 -45
  486. package/test/Slider.test.js +0 -74
  487. package/test/Spinner.test.js +0 -32
  488. package/test/Switch.test.js +0 -45
  489. package/test/Table.test.js +0 -36
  490. package/test/Tabs.test.js +0 -109
  491. package/test/Tag.test.js +0 -32
  492. package/test/TextInput.test.js +0 -732
  493. package/test/Textarea.test.js +0 -193
  494. package/test/ToggleGroup.test.js +0 -85
  495. package/test/Upload.test.js +0 -60
  496. package/test/V3Select.test.js +0 -212
  497. package/test/V3TextArea.test.js +0 -51
  498. package/test/Wizard.test.js +0 -130
  499. package/test/mocks/pngMock.js +0 -1
  500. package/test/mocks/svgMock.js +0 -1
  501. /package/{dist/common → common}/fonts/OpenSans-Bold.ttf +0 -0
  502. /package/{dist/common → common}/fonts/OpenSans-BoldItalic.ttf +0 -0
  503. /package/{dist/common → common}/fonts/OpenSans-ExtraBold.ttf +0 -0
  504. /package/{dist/common → common}/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  505. /package/{dist/common → common}/fonts/OpenSans-Italic.ttf +0 -0
  506. /package/{dist/common → common}/fonts/OpenSans-Light.ttf +0 -0
  507. /package/{dist/common → common}/fonts/OpenSans-LightItalic.ttf +0 -0
  508. /package/{dist/common → common}/fonts/OpenSans-Regular.ttf +0 -0
  509. /package/{dist/common → common}/fonts/OpenSans-SemiBold.ttf +0 -0
  510. /package/{dist/common → common}/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ import Title from "../../.storybook/components/Title";
3
+ import ExampleContainer from "../../.storybook/components/ExampleContainer";
4
+ import DxcActionIcon from "./ActionIcon";
5
+
6
+ export default {
7
+ title: "Action Icon ",
8
+ component: DxcActionIcon,
9
+ };
10
+
11
+ const iconSVG = (
12
+ <svg width="24px" height="24px" viewBox="0 0 24 24" fill="currentColor">
13
+ <path d="M0 0h24v24H0z" fill="none" />
14
+ <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" />
15
+ </svg>
16
+ );
17
+
18
+ export const Chromatic = () => (
19
+ <>
20
+ <Title title="Default" theme="light" level={2} />
21
+ <ExampleContainer>
22
+ <DxcActionIcon icon={"https://www.freepnglogos.com/uploads/facebook-logo-design-1.png"} title="Favourite" />
23
+ </ExampleContainer>
24
+ <Title title="Disabled" theme="light" level={2} />
25
+ <ExampleContainer>
26
+ <DxcActionIcon icon={iconSVG} title="Favourite" disabled />
27
+ </ExampleContainer>
28
+ <Title title="Hover" theme="light" level={2} />
29
+ <ExampleContainer pseudoState="pseudo-hover">
30
+ <DxcActionIcon icon={iconSVG} title="Favourite" />
31
+ </ExampleContainer>
32
+ <Title title="Focus" theme="light" level={2} />
33
+ <ExampleContainer pseudoState="pseudo-focus">
34
+ <DxcActionIcon icon={iconSVG} title="Favourite" />
35
+ </ExampleContainer>
36
+ <Title title="Active" theme="light" level={2} />
37
+ <ExampleContainer pseudoState="pseudo-active">
38
+ <DxcActionIcon icon={iconSVG} title="Favourite" />
39
+ </ExampleContainer>
40
+ </>
41
+ );
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _react = _interopRequireDefault(require("react"));
5
+ var _react2 = require("@testing-library/react");
6
+ var _ActionIcon = _interopRequireDefault(require("./ActionIcon.tsx"));
7
+ var iconSVG = /*#__PURE__*/_react["default"].createElement("svg", {
8
+ width: "24px",
9
+ height: "24px",
10
+ viewBox: "0 0 24 24",
11
+ fill: "currentColor"
12
+ }, /*#__PURE__*/_react["default"].createElement("path", {
13
+ d: "M0 0h24v24H0z",
14
+ fill: "none"
15
+ }), /*#__PURE__*/_react["default"].createElement("path", {
16
+ d: "M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"
17
+ }));
18
+ describe("Action icon component tests", function () {
19
+ test("Action icon renders with correct text", function () {
20
+ var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ActionIcon["default"], {
21
+ icon: iconSVG,
22
+ title: "favourite"
23
+ })),
24
+ getByTitle = _render.getByTitle;
25
+ expect(getByTitle("favourite")).toBeTruthy();
26
+ });
27
+ test("Calls correct function on click", function () {
28
+ var onClick = jest.fn();
29
+ var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ActionIcon["default"], {
30
+ icon: iconSVG,
31
+ title: "favourite",
32
+ onClick: onClick
33
+ })),
34
+ getByTitle = _render2.getByTitle;
35
+ var action = getByTitle("favourite");
36
+ _react2.fireEvent.click(action);
37
+ expect(onClick).toHaveBeenCalled();
38
+ });
39
+ test("On click is not called when disabled", function () {
40
+ var onClick = jest.fn();
41
+ var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ActionIcon["default"], {
42
+ disabled: true,
43
+ icon: iconSVG,
44
+ title: "favourite",
45
+ onClick: onClick
46
+ })),
47
+ getByTitle = _render3.getByTitle;
48
+ var action = getByTitle("favourite");
49
+ _react2.fireEvent.click(action);
50
+ expect(onClick).toHaveBeenCalledTimes(0);
51
+ });
52
+ test("Renders with correct accessibility attributes", function () {
53
+ var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ActionIcon["default"], {
54
+ icon: iconSVG,
55
+ title: "favourite",
56
+ tabIndex: 1
57
+ })),
58
+ getByRole = _render4.getByRole;
59
+ var button = getByRole("button");
60
+ expect(button.getAttribute("aria-label")).toBe("favourite");
61
+ expect(button.getAttribute("title")).toBe("favourite");
62
+ expect(button.getAttribute("tabindex")).toBe("1");
63
+ });
64
+ });
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ type SVG = React.ReactNode & React.SVGProps<SVGSVGElement>;
3
+ type Props = {
4
+ /**
5
+ * If true, the component will be disabled.
6
+ */
7
+ disabled?: boolean;
8
+ /**
9
+ * Value for the HTML properties title and aria-label.
10
+ */
11
+ title: string;
12
+ /**
13
+ * Element or path used as the icon that will be placed next to the label.
14
+ */
15
+ icon: string | SVG;
16
+ /**
17
+ * This function will be called when the user clicks the button.
18
+ */
19
+ onClick?: () => void;
20
+ /**
21
+ * Value of the tabindex attribute.
22
+ */
23
+ tabIndex?: number;
24
+ };
25
+ export type RefType = HTMLButtonElement;
26
+ export default Props;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import AlertPropsType from "./types";
3
+ declare const DxcAlert: ({ type, mode, inlineText, onClose, children, margin, size, tabIndex, }: AlertPropsType) => JSX.Element;
4
+ export default DxcAlert;
@@ -1,254 +1,133 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
4
-
5
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
4
+ var _typeof3 = require("@babel/runtime/helpers/typeof");
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
10
8
  exports["default"] = void 0;
11
-
12
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
13
-
14
9
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
15
-
16
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
17
-
18
11
  var _react = _interopRequireDefault(require("react"));
19
-
20
12
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
21
-
22
- var _propTypes = _interopRequireDefault(require("prop-types"));
23
-
24
- var _variables = require("../common/variables.js");
25
-
26
- var _utils = require("../common/utils.js");
27
-
28
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
29
-
30
- var _BackgroundColorContext = require("../BackgroundColorContext.js");
31
-
32
- function _templateObject10() {
33
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n border: 1px solid transparent;\n border-radius: 2px;\n box-shadow: 0 0 0 2px transparent;\n padding: 3px;\n margin-left: 12px;\n background-color: transparent;\n color: #000000;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n &:active {\n background-color: ", ";\n }\n"]);
34
-
35
- _templateObject10 = function _templateObject10() {
36
- return data;
37
- };
38
-
39
- return data;
40
- }
41
-
42
- function _templateObject9() {
43
- var data = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1 1 auto;\n padding: ", ";\n overflow-y: auto;\n"]);
44
-
45
- _templateObject9 = function _templateObject9() {
46
- return data;
47
- };
48
-
49
- return data;
50
- }
51
-
52
- function _templateObject8() {
53
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n flex-grow: 1;\n align-items: center;\n overflow: hidden;\n"]);
54
-
55
- _templateObject8 = function _templateObject8() {
56
- return data;
57
- };
58
-
59
- return data;
60
- }
61
-
62
- function _templateObject7() {
63
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n margin-right: 12px;\n padding-right: ", ";\n padding-left: ", ";\n\n color: ", ";\n\n svg {\n width: ", ";\n height: ", ";\n }\n"]);
64
-
65
- _templateObject7 = function _templateObject7() {
66
- return data;
67
- };
68
-
69
- return data;
70
- }
71
-
72
- function _templateObject6() {
73
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: 8px;\n padding-right: ", ";\n padding-left: ", ";\n flex-grow: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n"]);
74
-
75
- _templateObject6 = function _templateObject6() {
76
- return data;
77
- };
78
-
79
- return data;
80
- }
81
-
82
- function _templateObject5() {
83
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-right: 8px;\n padding-right: ", ";\n padding-left: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n"]);
84
-
85
- _templateObject5 = function _templateObject5() {
86
- return data;
87
- };
88
-
89
- return data;
90
- }
91
-
92
- function _templateObject4() {
93
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n height: calc(48px - calc(", " * 2));\n align-items: center;\n width: 100%;\n"]);
94
-
95
- _templateObject4 = function _templateObject4() {
96
- return data;
97
- };
98
-
99
- return data;
100
- }
101
-
102
- function _templateObject3() {
103
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n display: ", ";\n overflow: hidden;\n box-sizing: border-box;\n\n background-color: ", ";\n\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n\n padding-left: 12px;\n padding-right: 12px;\n justify-content: ", ";\n align-items: ", ";\n max-width: ", ";\n width: ", ";\n z-index: ", ";\n"]);
104
-
105
- _templateObject3 = function _templateObject3() {
106
- return data;
107
- };
108
-
109
- return data;
110
- }
111
-
112
- function _templateObject2() {
113
- var data = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n position: ", ";\n top: ", ";\n bottom: ", ";\n left: ", ";\n right: ", ";\n"]);
114
-
115
- _templateObject2 = function _templateObject2() {
116
- return data;
117
- };
118
-
119
- return data;
120
- }
121
-
122
- function _templateObject() {
123
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n width: ", ";\n height: ", ";\n justify-content: ", ";\n align-items: ", ";\n top: ", ";\n left: ", ";\n position: ", ";\n display: ", ";\n z-index: ", ";\n"]);
124
-
125
- _templateObject = function _templateObject() {
126
- return data;
127
- };
128
-
129
- return data;
130
- }
131
-
13
+ var _variables = require("../common/variables");
14
+ var _utils = require("../common/utils");
15
+ var _useTheme = _interopRequireDefault(require("../useTheme"));
16
+ var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
17
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
18
+ 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); }
19
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(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; }
132
20
  var alertIcons = {
133
- close: _react["default"].createElement("svg", {
21
+ close: /*#__PURE__*/_react["default"].createElement("svg", {
134
22
  xmlns: "http://www.w3.org/2000/svg",
135
23
  width: "20",
136
24
  height: "20",
137
25
  viewBox: "0 0 24 24",
138
26
  fill: "currentColor"
139
- }, _react["default"].createElement("path", {
27
+ }, /*#__PURE__*/_react["default"].createElement("path", {
140
28
  d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
141
- }), _react["default"].createElement("path", {
29
+ }), /*#__PURE__*/_react["default"].createElement("path", {
142
30
  d: "M0 0h24v24H0z",
143
31
  fill: "none"
144
32
  })),
145
- info: _react["default"].createElement("svg", {
33
+ info: /*#__PURE__*/_react["default"].createElement("svg", {
146
34
  xmlns: "http://www.w3.org/2000/svg",
147
35
  width: "23",
148
36
  height: "23",
149
37
  viewBox: "0 0 24 24",
150
38
  fill: "currentColor"
151
- }, _react["default"].createElement("path", {
39
+ }, /*#__PURE__*/_react["default"].createElement("path", {
152
40
  d: "M0 0h24v24H0z",
153
41
  fill: "none"
154
- }), _react["default"].createElement("path", {
42
+ }), /*#__PURE__*/_react["default"].createElement("path", {
155
43
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"
156
44
  })),
157
- success: _react["default"].createElement("svg", {
45
+ success: /*#__PURE__*/_react["default"].createElement("svg", {
158
46
  xmlns: "http://www.w3.org/2000/svg",
159
47
  width: "23",
160
48
  height: "23",
161
49
  viewBox: "0 0 24 24",
162
50
  fill: "currentColor"
163
- }, _react["default"].createElement("path", {
51
+ }, /*#__PURE__*/_react["default"].createElement("path", {
164
52
  d: "M0 0h24v24H0z",
165
53
  fill: "none"
166
- }), _react["default"].createElement("path", {
54
+ }), /*#__PURE__*/_react["default"].createElement("path", {
167
55
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
168
56
  })),
169
- warning: _react["default"].createElement("svg", {
57
+ warning: /*#__PURE__*/_react["default"].createElement("svg", {
170
58
  xmlns: "http://www.w3.org/2000/svg",
171
59
  width: "23",
172
60
  height: "23",
173
61
  viewBox: "0 0 24 24",
174
62
  fill: "currentColor"
175
- }, _react["default"].createElement("path", {
63
+ }, /*#__PURE__*/_react["default"].createElement("path", {
176
64
  d: "M0 0h24v24H0z",
177
65
  fill: "none"
178
- }), _react["default"].createElement("path", {
66
+ }), /*#__PURE__*/_react["default"].createElement("path", {
179
67
  d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
180
68
  })),
181
- error: _react["default"].createElement("svg", {
69
+ error: /*#__PURE__*/_react["default"].createElement("svg", {
182
70
  xmlns: "http://www.w3.org/2000/svg",
183
71
  width: "23",
184
72
  height: "23",
185
73
  viewBox: "0 0 24 24",
186
74
  fill: "currentColor"
187
- }, _react["default"].createElement("path", {
75
+ }, /*#__PURE__*/_react["default"].createElement("path", {
188
76
  d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z",
189
77
  fill: "currentColor"
190
- }), _react["default"].createElement("path", {
78
+ }), /*#__PURE__*/_react["default"].createElement("path", {
191
79
  d: "M0 0h24v24H0z",
192
80
  fill: "none"
193
81
  }))
194
82
  };
195
-
196
83
  var DxcAlert = function DxcAlert(_ref) {
197
84
  var _ref$type = _ref.type,
198
- type = _ref$type === void 0 ? "info" : _ref$type,
199
- _ref$mode = _ref.mode,
200
- mode = _ref$mode === void 0 ? "inline" : _ref$mode,
201
- _ref$inlineText = _ref.inlineText,
202
- inlineText = _ref$inlineText === void 0 ? "" : _ref$inlineText,
203
- onClose = _ref.onClose,
204
- children = _ref.children,
205
- margin = _ref.margin,
206
- _ref$size = _ref.size,
207
- size = _ref$size === void 0 ? "fitContent" : _ref$size,
208
- tabIndex = _ref.tabIndex;
85
+ type = _ref$type === void 0 ? "info" : _ref$type,
86
+ _ref$mode = _ref.mode,
87
+ mode = _ref$mode === void 0 ? "inline" : _ref$mode,
88
+ _ref$inlineText = _ref.inlineText,
89
+ inlineText = _ref$inlineText === void 0 ? "" : _ref$inlineText,
90
+ onClose = _ref.onClose,
91
+ children = _ref.children,
92
+ margin = _ref.margin,
93
+ _ref$size = _ref.size,
94
+ size = _ref$size === void 0 ? "fitContent" : _ref$size,
95
+ tabIndex = _ref.tabIndex;
209
96
  var colorsTheme = (0, _useTheme["default"])();
210
-
97
+ var translatedLabels = (0, _useTranslatedLabels["default"])();
211
98
  var getTypeText = function getTypeText() {
212
- return type === "info" ? "information" : type === "confirm" ? "success" : type === "warning" ? "warning" : "error";
99
+ return type === "info" ? translatedLabels.alert.infoTitleText : type === "confirm" ? translatedLabels.alert.successTitleText : type === "warning" ? translatedLabels.alert.warningTitleText : translatedLabels.alert.errorTitleText;
213
100
  };
214
-
215
- return _react["default"].createElement(_styledComponents.ThemeProvider, {
101
+ return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
216
102
  theme: colorsTheme.alert
217
- }, _react["default"].createElement(AlertModal, {
103
+ }, /*#__PURE__*/_react["default"].createElement(AlertModal, {
218
104
  mode: mode
219
- }, mode === "modal" && _react["default"].createElement(OverlayContainer, {
105
+ }, mode === "modal" && /*#__PURE__*/_react["default"].createElement(OverlayContainer, {
220
106
  mode: mode,
221
107
  onClick: onClose
222
- }), _react["default"].createElement(AlertContainer, {
108
+ }), /*#__PURE__*/_react["default"].createElement(AlertContainer, {
223
109
  mode: mode,
224
110
  type: type,
225
111
  margin: margin,
226
112
  size: size
227
- }, _react["default"].createElement(AlertInfo, null, _react["default"].createElement(AlertIcon, {
228
- type: type
229
- }, type === "info" && alertIcons.info || type === "confirm" && alertIcons.success || type === "warning" && alertIcons.warning || type === "error" && alertIcons.error), _react["default"].createElement(AlertText, null, _react["default"].createElement(AlertTitle, {
113
+ }, /*#__PURE__*/_react["default"].createElement(AlertInfo, null, /*#__PURE__*/_react["default"].createElement(AlertIcon, {
230
114
  type: type
231
- }, getTypeText(type)), inlineText && inlineText !== "" && "-", _react["default"].createElement(AlertInlineText, null, inlineText)), onClose && _react["default"].createElement(AlertCloseAction, {
115
+ }, type === "info" && alertIcons.info || type === "confirm" && alertIcons.success || type === "warning" && alertIcons.warning || type === "error" && alertIcons.error), /*#__PURE__*/_react["default"].createElement(AlertText, null, /*#__PURE__*/_react["default"].createElement(AlertTitle, null, getTypeText()), inlineText && inlineText !== "" && "-", /*#__PURE__*/_react["default"].createElement(AlertInlineText, null, inlineText)), onClose && /*#__PURE__*/_react["default"].createElement(AlertCloseAction, {
232
116
  onClick: onClose,
233
117
  tabIndex: tabIndex
234
- }, alertIcons.close)), children && _react["default"].createElement(AlertContent, null, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
235
- color: type === "info" && colorsTheme.alert.infoBackgroundColor || type === "confirm" && colorsTheme.alert.successBackgroundColor || type === "warning" && colorsTheme.alert.warningBackgroundColor || type === "error" && colorsTheme.alert.errorBackgroundColor
236
- }, children)))));
118
+ }, alertIcons.close)), children && /*#__PURE__*/_react["default"].createElement(AlertContent, null, children))));
237
119
  };
238
-
239
120
  var sizes = {
240
121
  small: "280px",
241
122
  medium: "480px",
242
123
  large: "820px",
243
124
  fillParent: "100%",
244
- fitContent: "auto"
125
+ fitContent: "fit-content"
245
126
  };
246
-
247
127
  var calculateWidth = function calculateWidth(margin, size) {
248
128
  return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
249
129
  };
250
-
251
- var AlertModal = _styledComponents["default"].div(_templateObject(), function (props) {
130
+ var AlertModal = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n width: ", ";\n height: ", ";\n justify-content: ", ";\n align-items: ", ";\n top: ", ";\n left: ", ";\n position: ", ";\n display: ", ";\n z-index: ", ";\n"])), function (props) {
252
131
  return props.theme.fontSizeBase;
253
132
  }, function (props) {
254
133
  return props.mode === "modal" ? "100%" : "";
@@ -269,8 +148,7 @@ var AlertModal = _styledComponents["default"].div(_templateObject(), function (p
269
148
  }, function (props) {
270
149
  return props.mode === "modal" ? "1200" : "";
271
150
  });
272
-
273
- var OverlayContainer = _styledComponents["default"].div(_templateObject2(), function (props) {
151
+ var OverlayContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n position: ", ";\n top: ", ";\n bottom: ", ";\n left: ", ";\n right: ", ";\n"])), function (props) {
274
152
  return props.mode === "modal" ? "".concat(props.theme.overlayColor) : "transparent";
275
153
  }, function (props) {
276
154
  return props.mode === "modal" ? "fixed" : "";
@@ -283,8 +161,7 @@ var OverlayContainer = _styledComponents["default"].div(_templateObject2(), func
283
161
  }, function (props) {
284
162
  return props.mode === "modal" ? "0" : "";
285
163
  });
286
-
287
- var AlertContainer = _styledComponents["default"].div(_templateObject3(), function (props) {
164
+ var AlertContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n display: ", ";\n overflow: hidden;\n box-sizing: border-box;\n\n background-color: ", ";\n\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n\n padding-left: 12px;\n padding-right: 12px;\n justify-content: ", ";\n align-items: ", ";\n max-width: ", ";\n width: ", ";\n z-index: ", ";\n"])), function (props) {
288
165
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
289
166
  }, function (props) {
290
167
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
@@ -317,12 +194,10 @@ var AlertContainer = _styledComponents["default"].div(_templateObject3(), functi
317
194
  }, function (props) {
318
195
  return props.mode === "modal" ? "1300" : "";
319
196
  });
320
-
321
- var AlertInfo = _styledComponents["default"].div(_templateObject4(), function (props) {
197
+ var AlertInfo = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n height: calc(48px - calc(", " * 2));\n align-items: center;\n width: 100%;\n"])), function (props) {
322
198
  return props.theme.borderThickness;
323
199
  });
324
-
325
- var AlertTitle = _styledComponents["default"].div(_templateObject5(), function (props) {
200
+ var AlertTitle = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n margin-right: 8px;\n padding-right: ", ";\n padding-left: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n"])), function (props) {
326
201
  return props.theme.titlePaddingRight;
327
202
  }, function (props) {
328
203
  return props.theme.titlePaddingLeft;
@@ -339,8 +214,7 @@ var AlertTitle = _styledComponents["default"].div(_templateObject5(), function (
339
214
  }, function (props) {
340
215
  return props.theme.titleTextTransform;
341
216
  });
342
-
343
- var AlertInlineText = _styledComponents["default"].div(_templateObject6(), function (props) {
217
+ var AlertInlineText = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: 8px;\n padding-right: ", ";\n padding-left: ", ";\n flex-grow: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n"])), function (props) {
344
218
  return props.theme.inlineTextPaddingRight;
345
219
  }, function (props) {
346
220
  return props.theme.inlineTextPaddingLeft;
@@ -355,8 +229,7 @@ var AlertInlineText = _styledComponents["default"].div(_templateObject6(), funct
355
229
  }, function (props) {
356
230
  return props.theme.inlineTextFontColor;
357
231
  });
358
-
359
- var AlertIcon = _styledComponents["default"].span(_templateObject7(), function (props) {
232
+ var AlertIcon = _styledComponents["default"].span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n margin-right: 12px;\n padding-right: ", ";\n padding-left: ", ";\n\n color: ", ";\n\n svg {\n width: ", ";\n height: ", ";\n }\n"])), function (props) {
360
233
  return props.theme.iconPaddingRight;
361
234
  }, function (props) {
362
235
  return props.theme.iconPaddingLeft;
@@ -367,37 +240,15 @@ var AlertIcon = _styledComponents["default"].span(_templateObject7(), function (
367
240
  }, function (props) {
368
241
  return props.theme.iconSize;
369
242
  });
370
-
371
- var AlertText = _styledComponents["default"].div(_templateObject8());
372
-
373
- var AlertContent = _styledComponents["default"].div(_templateObject9(), function (props) {
243
+ var AlertText = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n flex-grow: 1;\n align-items: center;\n overflow: hidden;\n"])));
244
+ var AlertContent = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1 1 auto;\n padding: ", ";\n overflow-y: auto;\n"])), function (props) {
374
245
  return "".concat(props.theme.contentPaddingTop, " ").concat(props.theme.contentPaddingRight, " ").concat(props.theme.contentPaddingBottom, " ").concat(props.theme.contentPaddingLeft);
375
246
  });
376
-
377
- var AlertCloseAction = _styledComponents["default"].button(_templateObject10(), function (props) {
247
+ var AlertCloseAction = _styledComponents["default"].button(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n border: 1px solid transparent;\n border-radius: 2px;\n box-shadow: 0 0 0 2px transparent;\n padding: 3px;\n margin-left: 12px;\n background-color: transparent;\n color: #000000;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n &:focus,\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n &:active {\n background-color: ", ";\n }\n"])), function (props) {
378
248
  return props.theme.hoverActionBackgroundColor;
379
249
  }, function (props) {
380
250
  return props.theme.focusActionBorderColor;
381
- }, function (props) {
382
- return props.theme.focusActionBorderColor;
383
251
  }, function (props) {
384
252
  return props.theme.activeActionBackgroundColor;
385
253
  });
386
-
387
- DxcAlert.propTypes = {
388
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
389
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
390
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
391
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
392
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
393
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
394
- type: _propTypes["default"].oneOf(["info", "confirm", "warning", "error"]),
395
- mode: _propTypes["default"].oneOf(["inline", "modal"]),
396
- inlineText: _propTypes["default"].string,
397
- onClose: _propTypes["default"].func,
398
- children: _propTypes["default"].element,
399
- size: _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes))),
400
- tabIndex: _propTypes["default"].number
401
- };
402
- var _default = DxcAlert;
403
- exports["default"] = _default;
254
+ var _default = exports["default"] = DxcAlert;