@dxc-technology/halstack-react 0.0.0-5b2ad05 → 0.0.0-5b32837

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 (478) hide show
  1. package/BackgroundColorContext.d.ts +1 -0
  2. package/BackgroundColorContext.js +30 -0
  3. package/HalstackContext.d.ts +1237 -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 +1383 -0
  84. package/common/variables.js +1255 -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 +127 -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 +67 -0
  197. package/number-input/NumberInput.stories.tsx +131 -0
  198. package/number-input/NumberInput.test.js +830 -0
  199. package/number-input/types.d.ts +130 -0
  200. package/number-input/types.js +5 -0
  201. package/package.json +56 -44
  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 +167 -0
  244. package/resultset-table/ResultsetTable.stories.tsx +381 -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/ActionsCell.d.ts +4 -0
  292. package/table/ActionsCell.js +54 -0
  293. package/table/DropdownTheme.js +57 -0
  294. package/table/Table.d.ts +7 -0
  295. package/table/Table.js +113 -0
  296. package/table/Table.stories.tsx +615 -0
  297. package/table/Table.test.js +113 -0
  298. package/table/types.d.ts +60 -0
  299. package/table/types.js +5 -0
  300. package/tabs/Tab.d.ts +4 -0
  301. package/tabs/Tab.js +116 -0
  302. package/tabs/Tabs.d.ts +4 -0
  303. package/tabs/Tabs.js +384 -0
  304. package/tabs/Tabs.stories.tsx +226 -0
  305. package/tabs/Tabs.test.js +294 -0
  306. package/tabs/types.d.ts +92 -0
  307. package/tabs/types.js +5 -0
  308. package/tag/Tag.d.ts +4 -0
  309. package/tag/Tag.js +151 -0
  310. package/tag/Tag.stories.tsx +155 -0
  311. package/tag/Tag.test.js +49 -0
  312. package/tag/types.d.ts +69 -0
  313. package/tag/types.js +5 -0
  314. package/text-input/Icons.d.ts +8 -0
  315. package/text-input/Icons.js +56 -0
  316. package/text-input/Suggestion.d.ts +4 -0
  317. package/text-input/Suggestion.js +67 -0
  318. package/text-input/Suggestions.d.ts +4 -0
  319. package/text-input/Suggestions.js +84 -0
  320. package/text-input/TextInput.d.ts +4 -0
  321. package/text-input/TextInput.js +572 -0
  322. package/text-input/TextInput.stories.tsx +465 -0
  323. package/text-input/TextInput.test.js +1739 -0
  324. package/text-input/types.d.ts +205 -0
  325. package/text-input/types.js +5 -0
  326. package/textarea/Textarea.d.ts +4 -0
  327. package/textarea/Textarea.js +234 -0
  328. package/textarea/Textarea.stories.tsx +174 -0
  329. package/textarea/Textarea.test.js +406 -0
  330. package/textarea/types.d.ts +141 -0
  331. package/textarea/types.js +5 -0
  332. package/toggle-group/ToggleGroup.d.ts +4 -0
  333. package/toggle-group/ToggleGroup.js +201 -0
  334. package/toggle-group/ToggleGroup.stories.tsx +218 -0
  335. package/toggle-group/ToggleGroup.test.js +137 -0
  336. package/toggle-group/types.d.ts +114 -0
  337. package/toggle-group/types.js +5 -0
  338. package/typography/Typography.d.ts +4 -0
  339. package/typography/Typography.js +23 -0
  340. package/typography/Typography.stories.tsx +198 -0
  341. package/typography/types.d.ts +18 -0
  342. package/typography/types.js +5 -0
  343. package/useTheme.d.ts +1136 -0
  344. package/{dist/useTheme.js → useTheme.js} +4 -11
  345. package/useTranslatedLabels.d.ts +85 -0
  346. package/useTranslatedLabels.js +14 -0
  347. package/utils/BaseTypography.d.ts +21 -0
  348. package/utils/BaseTypography.js +94 -0
  349. package/utils/FocusLock.d.ts +13 -0
  350. package/utils/FocusLock.js +124 -0
  351. package/wizard/Wizard.d.ts +4 -0
  352. package/wizard/Wizard.js +250 -0
  353. package/wizard/Wizard.stories.tsx +253 -0
  354. package/wizard/Wizard.test.js +114 -0
  355. package/wizard/types.d.ts +64 -0
  356. package/wizard/types.js +5 -0
  357. package/babel.config.js +0 -8
  358. package/dist/BackgroundColorContext.js +0 -46
  359. package/dist/ThemeContext.js +0 -250
  360. package/dist/V3Select/V3Select.js +0 -549
  361. package/dist/V3Textarea/V3Textarea.js +0 -264
  362. package/dist/accordion/Accordion.js +0 -353
  363. package/dist/accordion-group/AccordionGroup.js +0 -186
  364. package/dist/alert/index.d.ts +0 -51
  365. package/dist/badge/Badge.js +0 -63
  366. package/dist/box/Box.js +0 -156
  367. package/dist/button/Button.js +0 -238
  368. package/dist/card/Card.js +0 -254
  369. package/dist/checkbox/Checkbox.js +0 -299
  370. package/dist/chip/Chip.js +0 -265
  371. package/dist/common/OpenSans.css +0 -81
  372. package/dist/common/RequiredComponent.js +0 -40
  373. package/dist/common/variables.js +0 -1578
  374. package/dist/date/Date.js +0 -379
  375. package/dist/date-input/DateInput.js +0 -400
  376. package/dist/date-input/index.d.ts +0 -95
  377. package/dist/dialog/Dialog.js +0 -218
  378. package/dist/dropdown/Dropdown.js +0 -544
  379. package/dist/file-input/FileInput.js +0 -644
  380. package/dist/file-input/FileItem.js +0 -280
  381. package/dist/file-input/index.d.ts +0 -81
  382. package/dist/footer/Footer.js +0 -421
  383. package/dist/footer/Icons.js +0 -77
  384. package/dist/header/Header.js +0 -470
  385. package/dist/input-text/Icons.js +0 -22
  386. package/dist/input-text/InputText.js +0 -705
  387. package/dist/layout/ApplicationLayout.js +0 -327
  388. package/dist/layout/Icons.js +0 -55
  389. package/dist/link/Link.js +0 -237
  390. package/dist/main.d.ts +0 -8
  391. package/dist/number-input/NumberInput.js +0 -136
  392. package/dist/number-input/NumberInputContext.js +0 -16
  393. package/dist/number-input/index.d.ts +0 -113
  394. package/dist/paginator/Icons.js +0 -66
  395. package/dist/paginator/Paginator.js +0 -283
  396. package/dist/password-input/PasswordInput.js +0 -198
  397. package/dist/password-input/index.d.ts +0 -94
  398. package/dist/progress-bar/ProgressBar.js +0 -242
  399. package/dist/radio/Radio.js +0 -209
  400. package/dist/resultsetTable/ResultsetTable.js +0 -358
  401. package/dist/select/Select.js +0 -1085
  402. package/dist/select/index.d.ts +0 -53
  403. package/dist/sidenav/Sidenav.js +0 -179
  404. package/dist/slider/Slider.js +0 -404
  405. package/dist/spinner/Spinner.js +0 -381
  406. package/dist/switch/Switch.js +0 -222
  407. package/dist/table/Table.js +0 -132
  408. package/dist/tabs/Tabs.js +0 -343
  409. package/dist/tag/Tag.js +0 -282
  410. package/dist/text-input/TextInput.js +0 -971
  411. package/dist/text-input/index.d.ts +0 -135
  412. package/dist/textarea/Textarea.js +0 -369
  413. package/dist/textarea/index.d.ts +0 -117
  414. package/dist/toggle/Toggle.js +0 -220
  415. package/dist/toggle-group/ToggleGroup.js +0 -327
  416. package/dist/upload/Upload.js +0 -205
  417. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -135
  418. package/dist/upload/buttons-upload/Icons.js +0 -40
  419. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
  420. package/dist/upload/dragAndDropArea/Icons.js +0 -39
  421. package/dist/upload/file-upload/FileToUpload.js +0 -189
  422. package/dist/upload/file-upload/Icons.js +0 -66
  423. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  424. package/dist/upload/transaction/Icons.js +0 -160
  425. package/dist/upload/transaction/Transaction.js +0 -148
  426. package/dist/upload/transactions/Transactions.js +0 -138
  427. package/dist/wizard/Icons.js +0 -65
  428. package/dist/wizard/Wizard.js +0 -405
  429. package/test/Accordion.test.js +0 -33
  430. package/test/AccordionGroup.test.js +0 -125
  431. package/test/Alert.test.js +0 -53
  432. package/test/Box.test.js +0 -10
  433. package/test/Button.test.js +0 -18
  434. package/test/Card.test.js +0 -30
  435. package/test/Checkbox.test.js +0 -45
  436. package/test/Chip.test.js +0 -25
  437. package/test/Date.test.js +0 -397
  438. package/test/DateInput.test.js +0 -242
  439. package/test/Dialog.test.js +0 -23
  440. package/test/Dropdown.test.js +0 -145
  441. package/test/FileInput.test.js +0 -201
  442. package/test/Footer.test.js +0 -94
  443. package/test/Header.test.js +0 -34
  444. package/test/Heading.test.js +0 -83
  445. package/test/InputText.test.js +0 -248
  446. package/test/Link.test.js +0 -43
  447. package/test/NumberInput.test.js +0 -259
  448. package/test/Paginator.test.js +0 -177
  449. package/test/PasswordInput.test.js +0 -83
  450. package/test/ProgressBar.test.js +0 -35
  451. package/test/Radio.test.js +0 -37
  452. package/test/ResultsetTable.test.js +0 -329
  453. package/test/Sidenav.test.js +0 -45
  454. package/test/Slider.test.js +0 -74
  455. package/test/Spinner.test.js +0 -32
  456. package/test/Switch.test.js +0 -45
  457. package/test/Table.test.js +0 -36
  458. package/test/Tabs.test.js +0 -109
  459. package/test/Tag.test.js +0 -32
  460. package/test/TextInput.test.js +0 -732
  461. package/test/Textarea.test.js +0 -193
  462. package/test/ToggleGroup.test.js +0 -85
  463. package/test/Upload.test.js +0 -60
  464. package/test/V3Select.test.js +0 -212
  465. package/test/V3TextArea.test.js +0 -51
  466. package/test/Wizard.test.js +0 -130
  467. package/test/mocks/pngMock.js +0 -1
  468. package/test/mocks/svgMock.js +0 -1
  469. /package/{dist/common → common}/fonts/OpenSans-Bold.ttf +0 -0
  470. /package/{dist/common → common}/fonts/OpenSans-BoldItalic.ttf +0 -0
  471. /package/{dist/common → common}/fonts/OpenSans-ExtraBold.ttf +0 -0
  472. /package/{dist/common → common}/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  473. /package/{dist/common → common}/fonts/OpenSans-Italic.ttf +0 -0
  474. /package/{dist/common → common}/fonts/OpenSans-Light.ttf +0 -0
  475. /package/{dist/common → common}/fonts/OpenSans-LightItalic.ttf +0 -0
  476. /package/{dist/common → common}/fonts/OpenSans-Regular.ttf +0 -0
  477. /package/{dist/common → common}/fonts/OpenSans-SemiBold.ttf +0 -0
  478. /package/{dist/common → common}/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
@@ -1,644 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
4
-
5
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports["default"] = void 0;
11
-
12
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
13
-
14
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
15
-
16
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
17
-
18
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
19
-
20
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
21
-
22
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
23
-
24
- var _react = _interopRequireWildcard(require("react"));
25
-
26
- var _propTypes = _interopRequireDefault(require("prop-types"));
27
-
28
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
29
-
30
- var _uuid = require("uuid");
31
-
32
- var _variables = require("../common/variables.js");
33
-
34
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
35
-
36
- var _Button = _interopRequireDefault(require("../button/Button"));
37
-
38
- var _FileItem = _interopRequireDefault(require("./FileItem"));
39
-
40
- function _templateObject11() {
41
- var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
42
-
43
- _templateObject11 = function _templateObject11() {
44
- return data;
45
- };
46
-
47
- return data;
48
- }
49
-
50
- function _templateObject10() {
51
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-top: ", ";\n margin-left: ", ";\n"]);
52
-
53
- _templateObject10 = function _templateObject10() {
54
- return data;
55
- };
56
-
57
- return data;
58
- }
59
-
60
- function _templateObject9() {
61
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n margin-top: 0.25rem;\n"]);
62
-
63
- _templateObject9 = function _templateObject9() {
64
- return data;
65
- };
66
-
67
- return data;
68
- }
69
-
70
- function _templateObject8() {
71
- var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n"]);
72
-
73
- _templateObject8 = function _templateObject8() {
74
- return data;
75
- };
76
-
77
- return data;
78
- }
79
-
80
- function _templateObject7() {
81
- var data = (0, _taggedTemplateLiteral2["default"])(["\n padding: ", ";\n input[type=\"file\"] {\n visibility: hidden;\n position: absolute;\n width: 0px;\n height: 0px;\n }\n"]);
82
-
83
- _templateObject7 = function _templateObject7() {
84
- return data;
85
- };
86
-
87
- return data;
88
- }
89
-
90
- function _templateObject6() {
91
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n margin-top: 0.25rem;\n\n input[type=\"file\"] {\n visibility: hidden;\n position: absolute;\n width: 0px;\n height: 0px;\n }\n"]);
92
-
93
- _templateObject6 = function _templateObject6() {
94
- return data;
95
- };
96
-
97
- return data;
98
- }
99
-
100
- function _templateObject5() {
101
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: ", ";\n"]);
102
-
103
- _templateObject5 = function _templateObject5() {
104
- return data;
105
- };
106
-
107
- return data;
108
- }
109
-
110
- function _templateObject4() {
111
- var data = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: calc(320px - 2px);\n display: flex;\n flex-direction: ", ";\n align-items: center;\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n background-color: ", ";\n border-color: ", ";\n cursor: ", ";\n"]);
112
-
113
- _templateObject4 = function _templateObject4() {
114
- return data;
115
- };
116
-
117
- return data;
118
- }
119
-
120
- function _templateObject3() {
121
- var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
122
-
123
- _templateObject3 = function _templateObject3() {
124
- return data;
125
- };
126
-
127
- return data;
128
- }
129
-
130
- function _templateObject2() {
131
- var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
132
-
133
- _templateObject2 = function _templateObject2() {
134
- return data;
135
- };
136
-
137
- return data;
138
- }
139
-
140
- function _templateObject() {
141
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n width: fit-content;\n"]);
142
-
143
- _templateObject = function _templateObject() {
144
- return data;
145
- };
146
-
147
- return data;
148
- }
149
-
150
- var audioIcon = _react["default"].createElement("svg", {
151
- xmlns: "http://www.w3.org/2000/svg",
152
- width: "24",
153
- height: "24",
154
- viewBox: "0 0 24 24",
155
- fill: "currentColor"
156
- }, _react["default"].createElement("path", {
157
- fill: "none",
158
- d: "M0 0h24v24H0V0z"
159
- }), _react["default"].createElement("path", {
160
- d: "M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM8 15c0-1.66 1.34-3 3-3 .35 0 .69.07 1 .18V6h5v2h-3v7.03c-.02 1.64-1.35 2.97-3 2.97-1.66 0-3-1.34-3-3z"
161
- }));
162
-
163
- var videoIcon = _react["default"].createElement("svg", {
164
- xmlns: "http://www.w3.org/2000/svg",
165
- width: "24",
166
- height: "24",
167
- viewBox: "0 0 24 24",
168
- fill: "currentColor"
169
- }, _react["default"].createElement("path", {
170
- d: "M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"
171
- }), _react["default"].createElement("path", {
172
- d: "M0 0h24v24H0z",
173
- fill: "none"
174
- }));
175
-
176
- var fileIcon = _react["default"].createElement("svg", {
177
- xmlns: "http://www.w3.org/2000/svg",
178
- width: "24",
179
- height: "24",
180
- viewBox: "0 0 24 24",
181
- fill: "currentColor"
182
- }, _react["default"].createElement("path", {
183
- fill: "none",
184
- d: "M0 0h24v24H0V0z"
185
- }), _react["default"].createElement("path", {
186
- d: "M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"
187
- }));
188
-
189
- var DxcFileInput = function DxcFileInput(_ref) {
190
- var _ref$name = _ref.name,
191
- name = _ref$name === void 0 ? "" : _ref$name,
192
- _ref$mode = _ref.mode,
193
- mode = _ref$mode === void 0 ? "file" : _ref$mode,
194
- _ref$label = _ref.label,
195
- label = _ref$label === void 0 ? "" : _ref$label,
196
- _ref$helperText = _ref.helperText,
197
- helperText = _ref$helperText === void 0 ? "" : _ref$helperText,
198
- accept = _ref.accept,
199
- minSize = _ref.minSize,
200
- maxSize = _ref.maxSize,
201
- _ref$showPreview = _ref.showPreview,
202
- showPreview = _ref$showPreview === void 0 ? false : _ref$showPreview,
203
- _ref$multiple = _ref.multiple,
204
- multiple = _ref$multiple === void 0 ? true : _ref$multiple,
205
- _ref$disabled = _ref.disabled,
206
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
207
- callbackFile = _ref.callbackFile,
208
- value = _ref.value,
209
- margin = _ref.margin,
210
- tabIndex = _ref.tabIndex;
211
-
212
- var _useState = (0, _react.useState)(false),
213
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
214
- isDragging = _useState2[0],
215
- setIsDragging = _useState2[1];
216
-
217
- var _useState3 = (0, _react.useState)([]),
218
- _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
219
- files = _useState4[0],
220
- setFiles = _useState4[1];
221
-
222
- var _useState5 = (0, _react.useState)("file-input-".concat((0, _uuid.v4)())),
223
- _useState6 = (0, _slicedToArray2["default"])(_useState5, 1),
224
- fileInputId = _useState6[0];
225
-
226
- var colorsTheme = (0, _useTheme["default"])();
227
- (0, _react.useEffect)(function () {
228
- if (value) {
229
- setFiles(value);
230
- } else {
231
- setFiles([]);
232
- }
233
- }, [value]);
234
-
235
- var handleClick = function handleClick() {
236
- document.getElementById(fileInputId).click();
237
- };
238
-
239
- var checkFileSize = function checkFileSize(file) {
240
- if (file.size < minSize) {
241
- return "File size must be greater than min size.";
242
- }
243
-
244
- if (file.size > maxSize) {
245
- return "File size must be less than max size.";
246
- }
247
- };
248
-
249
- var getFilePreview = function getFilePreview(file) {
250
- if (file.type.includes("video")) {
251
- return videoIcon;
252
- }
253
-
254
- if (file.type.includes("audio")) {
255
- return audioIcon;
256
- }
257
-
258
- if (file.type.includes("image")) {
259
- return new Promise(function (resolve) {
260
- var reader = new FileReader();
261
- reader.readAsDataURL(file);
262
-
263
- reader.onload = function (e) {
264
- resolve(e.target.result);
265
- };
266
- });
267
- }
268
-
269
- return fileIcon;
270
- };
271
-
272
- var getFilesToAdd =
273
- /*#__PURE__*/
274
- function () {
275
- var _ref2 = (0, _asyncToGenerator2["default"])(
276
- /*#__PURE__*/
277
- _regenerator["default"].mark(function _callee(selectedFiles) {
278
- var filesToAdd;
279
- return _regenerator["default"].wrap(function _callee$(_context) {
280
- while (1) {
281
- switch (_context.prev = _context.next) {
282
- case 0:
283
- _context.next = 2;
284
- return Promise.all(selectedFiles.map(function (selectedFile) {
285
- return getFilePreview(selectedFile);
286
- })).then(function (previews) {
287
- return selectedFiles.map(function (selectedFile, index) {
288
- var fileInfo = {
289
- file: selectedFile,
290
- error: checkFileSize(selectedFile),
291
- preview: previews[index]
292
- };
293
- return fileInfo;
294
- });
295
- });
296
-
297
- case 2:
298
- filesToAdd = _context.sent;
299
- return _context.abrupt("return", filesToAdd);
300
-
301
- case 4:
302
- case "end":
303
- return _context.stop();
304
- }
305
- }
306
- }, _callee);
307
- }));
308
-
309
- return function getFilesToAdd(_x) {
310
- return _ref2.apply(this, arguments);
311
- };
312
- }();
313
-
314
- var addFile =
315
- /*#__PURE__*/
316
- function () {
317
- var _ref3 = (0, _asyncToGenerator2["default"])(
318
- /*#__PURE__*/
319
- _regenerator["default"].mark(function _callee2(selectedFiles) {
320
- var filesToAdd, finalFiles, fileToAdd;
321
- return _regenerator["default"].wrap(function _callee2$(_context2) {
322
- while (1) {
323
- switch (_context2.prev = _context2.next) {
324
- case 0:
325
- if (!multiple) {
326
- _context2.next = 8;
327
- break;
328
- }
329
-
330
- _context2.next = 3;
331
- return getFilesToAdd(selectedFiles);
332
-
333
- case 3:
334
- filesToAdd = _context2.sent;
335
- finalFiles = [].concat((0, _toConsumableArray2["default"])(files), (0, _toConsumableArray2["default"])(filesToAdd));
336
-
337
- if (typeof callbackFile === "function") {
338
- callbackFile(finalFiles);
339
- }
340
-
341
- _context2.next = 19;
342
- break;
343
-
344
- case 8:
345
- if (!(selectedFiles.length === 1)) {
346
- _context2.next = 14;
347
- break;
348
- }
349
-
350
- _context2.next = 11;
351
- return getFilesToAdd(selectedFiles);
352
-
353
- case 11:
354
- _context2.t0 = _context2.sent;
355
- _context2.next = 17;
356
- break;
357
-
358
- case 14:
359
- _context2.next = 16;
360
- return getFilesToAdd([selectedFiles[0]]);
361
-
362
- case 16:
363
- _context2.t0 = _context2.sent;
364
-
365
- case 17:
366
- fileToAdd = _context2.t0;
367
-
368
- if (typeof callbackFile === "function") {
369
- callbackFile(fileToAdd);
370
- }
371
-
372
- case 19:
373
- case "end":
374
- return _context2.stop();
375
- }
376
- }
377
- }, _callee2);
378
- }));
379
-
380
- return function addFile(_x2) {
381
- return _ref3.apply(this, arguments);
382
- };
383
- }();
384
-
385
- var selectFiles = function selectFiles(e) {
386
- var selectedFiles = e.target.files;
387
- var filesArray = Object.keys(selectedFiles).map(function (key) {
388
- return selectedFiles[key];
389
- });
390
- addFile(filesArray);
391
- };
392
-
393
- var onDelete = function onDelete(fileName) {
394
- var filesCopy = (0, _toConsumableArray2["default"])(files);
395
- var fileToRemove = filesCopy.find(function (file) {
396
- return file.file.name === fileName;
397
- });
398
- var fileIndex = filesCopy.indexOf(fileToRemove);
399
- filesCopy.splice(fileIndex, 1);
400
-
401
- if (typeof callbackFile === "function") {
402
- callbackFile(filesCopy);
403
- }
404
- };
405
-
406
- var handleDrag = function handleDrag(e) {
407
- e.preventDefault();
408
- e.stopPropagation();
409
- };
410
-
411
- var handleDragIn = function handleDragIn(e) {
412
- e.preventDefault();
413
- e.stopPropagation();
414
-
415
- if (e.dataTransfer.items && e.dataTransfer.items.length > 0) {
416
- setIsDragging(true);
417
- }
418
- };
419
-
420
- var handleDragOut = function handleDragOut(e) {
421
- e.preventDefault();
422
- e.stopPropagation();
423
- setIsDragging(false);
424
- };
425
-
426
- var handleDrop = function handleDrop(e) {
427
- e.preventDefault();
428
- e.stopPropagation();
429
- setIsDragging(false);
430
- var filesObject = e.dataTransfer.files;
431
-
432
- if (filesObject && filesObject.length > 0) {
433
- var filesArray = Object.keys(filesObject).map(function (key) {
434
- return filesObject[key];
435
- });
436
- addFile(filesArray);
437
- }
438
- };
439
-
440
- return _react["default"].createElement(_styledComponents.ThemeProvider, {
441
- theme: colorsTheme.fileInput
442
- }, _react["default"].createElement(FileInputContainer, {
443
- margin: margin,
444
- name: name,
445
- tabIndex: tabIndex
446
- }, _react["default"].createElement(Label, {
447
- htmlFor: fileInputId,
448
- disabled: disabled
449
- }, label), _react["default"].createElement(HelperText, {
450
- disabled: disabled
451
- }, helperText), mode === "file" ? _react["default"].createElement(FileContainer, {
452
- multiple: multiple,
453
- files: files
454
- }, _react["default"].createElement(ButtonErrorContainer, null, _react["default"].createElement(_Button["default"], {
455
- mode: "secondary",
456
- label: "Select files",
457
- onClick: handleClick,
458
- disabled: disabled,
459
- size: "medium",
460
- tabIndex: tabIndex
461
- }), _react["default"].createElement("input", {
462
- id: fileInputId,
463
- type: "file",
464
- accept: accept,
465
- multiple: multiple,
466
- onChange: selectFiles
467
- }), files.length === 1 && files.map(function (file) {
468
- return file.error && mode === "file" && !multiple && _react["default"].createElement(ErrorMessage, null, file.error);
469
- })), files.map(function (file) {
470
- return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(FileItemContainer, {
471
- mode: mode,
472
- multiple: multiple,
473
- files: files
474
- }, _react["default"].createElement(_FileItem["default"], {
475
- mode: mode,
476
- multiple: multiple,
477
- name: file.file.name,
478
- error: file.error,
479
- showPreview: mode === "file" && !multiple ? false : showPreview,
480
- numFiles: files.length,
481
- preview: file.preview,
482
- type: file.file.type,
483
- onDelete: onDelete
484
- })));
485
- })) : _react["default"].createElement(Container, null, _react["default"].createElement(DragDropArea, {
486
- isDragging: isDragging,
487
- disabled: disabled,
488
- mode: mode,
489
- onDrop: handleDrop,
490
- onDragEnter: handleDragIn,
491
- onDragOver: handleDrag,
492
- onDragLeave: handleDragOut
493
- }, _react["default"].createElement(ButtonContainer, {
494
- mode: mode
495
- }, _react["default"].createElement(_Button["default"], {
496
- mode: "secondary",
497
- label: "Select",
498
- onClick: handleClick,
499
- disabled: disabled,
500
- size: "fitContent"
501
- }), _react["default"].createElement("input", {
502
- id: fileInputId,
503
- type: "file",
504
- accept: accept,
505
- multiple: multiple,
506
- onChange: selectFiles
507
- })), _react["default"].createElement(DropLabel, {
508
- disabled: disabled
509
- }, "or drop files")), files.map(function (file) {
510
- return _react["default"].createElement(FileItemContainer, {
511
- mode: mode,
512
- multiple: multiple,
513
- files: files
514
- }, _react["default"].createElement(_FileItem["default"], {
515
- mode: mode,
516
- multiple: multiple,
517
- name: file.file.name,
518
- error: file.error,
519
- showPreview: showPreview,
520
- numFiles: files.length,
521
- preview: file.preview,
522
- type: file.file.type,
523
- onDelete: onDelete
524
- }));
525
- }))));
526
- };
527
-
528
- var FileInputContainer = _styledComponents["default"].div(_templateObject(), function (props) {
529
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
530
- }, function (props) {
531
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
532
- }, function (props) {
533
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
534
- }, function (props) {
535
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
536
- }, function (props) {
537
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
538
- });
539
-
540
- var Label = _styledComponents["default"].label(_templateObject2(), function (props) {
541
- return props.disabled ? props.theme.disabledLabelFontColor : props.theme.labelFontColor;
542
- }, function (props) {
543
- return props.theme.labelFontFamily;
544
- }, function (props) {
545
- return props.theme.labelFontSize;
546
- }, function (props) {
547
- return props.theme.labelFontWeight;
548
- }, function (props) {
549
- return props.theme.labelLineHeight;
550
- });
551
-
552
- var HelperText = _styledComponents["default"].span(_templateObject3(), function (props) {
553
- return props.disabled ? props.theme.disabledHelperTextFontcolor : props.theme.helperTextFontColor;
554
- }, function (props) {
555
- return props.theme.helperTextFontFamily;
556
- }, function (props) {
557
- return props.theme.helperTextFontSize;
558
- }, function (props) {
559
- return props.theme.helperTextFontWeight;
560
- }, function (props) {
561
- return props.theme.helperTextLineHeight;
562
- });
563
-
564
- var DragDropArea = _styledComponents["default"].div(_templateObject4(), function (props) {
565
- return props.mode === "filedrop" ? "calc(48px - 2px)" : "calc(160px - 2px)";
566
- }, function (props) {
567
- return props.mode === "filedrop" ? "row" : "column";
568
- }, function (props) {
569
- return props.theme.dropBorderRadius;
570
- }, function (props) {
571
- return !props.isDragging ? props.theme.dropBorderThickness : "2px";
572
- }, function (props) {
573
- return !props.isDragging ? props.theme.dropBorderStyle : "solid";
574
- }, function (props) {
575
- return props.isDragging && props.theme.focusDropBackgroundColor;
576
- }, function (props) {
577
- return props.disabled ? props.theme.disabledDropBorderColor : props.isDragging ? props.theme.focusDropBorderColor : props.theme.dropBorderColor;
578
- }, function (props) {
579
- return props.disabled && "not-allowed";
580
- });
581
-
582
- var FileContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
583
- return props.multiple || props.files.length > 1 ? "column" : "row";
584
- });
585
-
586
- var ButtonErrorContainer = _styledComponents["default"].div(_templateObject6());
587
-
588
- var ButtonContainer = _styledComponents["default"].div(_templateObject7(), function (props) {
589
- return props.mode === "filedrop" ? "2px 12px 2px 2px" : "47px 122px 8px 122px";
590
- });
591
-
592
- var DropLabel = _styledComponents["default"].span(_templateObject8(), function (props) {
593
- return props.disabled ? props.theme.disabledDropLabelFontColor : props.theme.dropLabelFontColor;
594
- }, function (props) {
595
- return props.theme.dropLabelFontFamily;
596
- }, function (props) {
597
- return props.theme.dropLabelFontSize;
598
- }, function (props) {
599
- return props.theme.dropLabelFontWeight;
600
- });
601
-
602
- var Container = _styledComponents["default"].div(_templateObject9());
603
-
604
- var FileItemContainer = _styledComponents["default"].div(_templateObject10(), function (props) {
605
- return (props.multiple || props.files.length > 1 || props.mode !== "file") && "4px";
606
- }, function (props) {
607
- return props.mode === "file" && props.files.length === 1 && !props.multiple && "4px";
608
- });
609
-
610
- var ErrorMessage = _styledComponents["default"].div(_templateObject11(), function (props) {
611
- return props.theme.errorMessageFontColor;
612
- }, function (props) {
613
- return props.theme.errorMessageFontFamily;
614
- }, function (props) {
615
- return props.theme.errorMessageFontSize;
616
- }, function (props) {
617
- return props.theme.errorMessageFontWeight;
618
- }, function (props) {
619
- return props.theme.errorMessageLineHeight;
620
- });
621
-
622
- DxcFileInput.propTypes = {
623
- name: _propTypes["default"].string,
624
- mode: _propTypes["default"].oneOf(["file", "filedrop", "dropzone"]),
625
- label: _propTypes["default"].string,
626
- helperText: _propTypes["default"].string,
627
- accept: _propTypes["default"].array,
628
- maxSize: _propTypes["default"].number,
629
- minSize: _propTypes["default"].number,
630
- multiple: _propTypes["default"].bool,
631
- showPreview: _propTypes["default"].bool,
632
- disabled: _propTypes["default"].bool,
633
- callbackFile: _propTypes["default"].func,
634
- value: _propTypes["default"].array,
635
- tabIndex: _propTypes["default"].number,
636
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
637
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
638
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
639
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
640
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
641
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
642
- };
643
- var _default = DxcFileInput;
644
- exports["default"] = _default;