@dxc-technology/halstack-react 0.0.0-4727df3 → 0.0.0-47ce41d

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 (465) hide show
  1. package/BackgroundColorContext.d.ts +10 -0
  2. package/BackgroundColorContext.js +47 -0
  3. package/HalstackContext.d.ts +12 -0
  4. package/HalstackContext.js +295 -0
  5. package/accordion/Accordion.d.ts +4 -0
  6. package/accordion/Accordion.js +245 -0
  7. package/accordion/Accordion.stories.tsx +306 -0
  8. package/accordion/Accordion.test.js +71 -0
  9. package/accordion/types.d.ts +69 -0
  10. package/accordion/types.js +5 -0
  11. package/accordion-group/AccordionGroup.d.ts +7 -0
  12. package/accordion-group/AccordionGroup.js +149 -0
  13. package/accordion-group/AccordionGroup.stories.tsx +251 -0
  14. package/accordion-group/AccordionGroup.test.js +126 -0
  15. package/accordion-group/types.d.ts +79 -0
  16. package/accordion-group/types.js +5 -0
  17. package/alert/Alert.d.ts +4 -0
  18. package/{dist/alert → alert}/Alert.js +44 -154
  19. package/alert/Alert.stories.tsx +170 -0
  20. package/alert/Alert.test.js +92 -0
  21. package/alert/types.d.ts +49 -0
  22. package/alert/types.js +5 -0
  23. package/badge/Badge.d.ts +4 -0
  24. package/badge/Badge.js +61 -0
  25. package/badge/types.d.ts +5 -0
  26. package/badge/types.js +5 -0
  27. package/bleed/Bleed.d.ts +3 -0
  28. package/bleed/Bleed.js +51 -0
  29. package/bleed/Bleed.stories.tsx +341 -0
  30. package/bleed/types.d.ts +37 -0
  31. package/bleed/types.js +5 -0
  32. package/box/Box.d.ts +4 -0
  33. package/box/Box.js +116 -0
  34. package/box/Box.stories.tsx +132 -0
  35. package/box/Box.test.js +18 -0
  36. package/box/types.d.ts +44 -0
  37. package/box/types.js +5 -0
  38. package/bulleted-list/BulletedList.d.ts +7 -0
  39. package/bulleted-list/BulletedList.js +123 -0
  40. package/bulleted-list/BulletedList.stories.tsx +200 -0
  41. package/bulleted-list/types.d.ts +11 -0
  42. package/bulleted-list/types.js +5 -0
  43. package/button/Button.d.ts +4 -0
  44. package/button/Button.js +156 -0
  45. package/button/Button.stories.tsx +283 -0
  46. package/button/Button.test.js +35 -0
  47. package/button/types.d.ts +53 -0
  48. package/button/types.js +5 -0
  49. package/card/Card.d.ts +4 -0
  50. package/card/Card.js +161 -0
  51. package/card/Card.stories.tsx +201 -0
  52. package/card/Card.test.js +50 -0
  53. package/card/ice-cream.jpg +0 -0
  54. package/card/types.d.ts +68 -0
  55. package/card/types.js +5 -0
  56. package/checkbox/Checkbox.d.ts +4 -0
  57. package/checkbox/Checkbox.js +249 -0
  58. package/checkbox/Checkbox.stories.tsx +188 -0
  59. package/checkbox/Checkbox.test.js +155 -0
  60. package/checkbox/types.d.ts +64 -0
  61. package/checkbox/types.js +5 -0
  62. package/chip/Chip.d.ts +4 -0
  63. package/chip/Chip.js +161 -0
  64. package/chip/Chip.stories.tsx +119 -0
  65. package/chip/Chip.test.js +56 -0
  66. package/chip/types.d.ts +45 -0
  67. package/chip/types.js +5 -0
  68. package/{dist/common → common}/OpenSans.css +0 -0
  69. package/{dist/common → common}/RequiredComponent.js +3 -11
  70. package/{dist/common → common}/fonts/OpenSans-Bold.ttf +0 -0
  71. package/{dist/common → common}/fonts/OpenSans-BoldItalic.ttf +0 -0
  72. package/{dist/common → common}/fonts/OpenSans-ExtraBold.ttf +0 -0
  73. package/{dist/common → common}/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  74. package/{dist/common → common}/fonts/OpenSans-Italic.ttf +0 -0
  75. package/{dist/common → common}/fonts/OpenSans-Light.ttf +0 -0
  76. package/{dist/common → common}/fonts/OpenSans-LightItalic.ttf +0 -0
  77. package/{dist/common → common}/fonts/OpenSans-Regular.ttf +0 -0
  78. package/{dist/common → common}/fonts/OpenSans-SemiBold.ttf +0 -0
  79. package/{dist/common → common}/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  80. package/{dist/common → common}/utils.js +0 -0
  81. package/{dist/common → common}/variables.js +378 -439
  82. package/date-input/DateInput.d.ts +4 -0
  83. package/{dist/date-input → date-input}/DateInput.js +83 -111
  84. package/date-input/DateInput.stories.tsx +138 -0
  85. package/date-input/DateInput.test.js +479 -0
  86. package/date-input/types.d.ts +107 -0
  87. package/date-input/types.js +5 -0
  88. package/dialog/Dialog.d.ts +4 -0
  89. package/dialog/Dialog.js +162 -0
  90. package/dialog/Dialog.stories.tsx +267 -0
  91. package/dialog/Dialog.test.js +70 -0
  92. package/dialog/types.d.ts +44 -0
  93. package/dialog/types.js +5 -0
  94. package/dropdown/Dropdown.d.ts +4 -0
  95. package/dropdown/Dropdown.js +388 -0
  96. package/dropdown/Dropdown.stories.tsx +312 -0
  97. package/dropdown/Dropdown.test.js +590 -0
  98. package/dropdown/DropdownMenu.d.ts +4 -0
  99. package/dropdown/DropdownMenu.js +80 -0
  100. package/dropdown/DropdownMenuItem.d.ts +4 -0
  101. package/dropdown/DropdownMenuItem.js +92 -0
  102. package/dropdown/types.d.ts +100 -0
  103. package/dropdown/types.js +5 -0
  104. package/file-input/FileInput.d.ts +4 -0
  105. package/file-input/FileInput.js +593 -0
  106. package/file-input/FileInput.stories.tsx +507 -0
  107. package/file-input/FileInput.test.js +457 -0
  108. package/file-input/FileItem.d.ts +14 -0
  109. package/file-input/FileItem.js +186 -0
  110. package/file-input/types.d.ts +112 -0
  111. package/file-input/types.js +5 -0
  112. package/flex/Flex.d.ts +4 -0
  113. package/flex/Flex.js +69 -0
  114. package/flex/Flex.stories.tsx +103 -0
  115. package/flex/types.d.ts +32 -0
  116. package/flex/types.js +5 -0
  117. package/footer/Footer.d.ts +4 -0
  118. package/footer/Footer.js +185 -0
  119. package/footer/Footer.stories.tsx +137 -0
  120. package/footer/Footer.test.js +109 -0
  121. package/footer/Icons.d.ts +2 -0
  122. package/{dist/footer → footer}/Icons.js +16 -16
  123. package/footer/types.d.ts +66 -0
  124. package/footer/types.js +5 -0
  125. package/header/Header.d.ts +7 -0
  126. package/header/Header.js +305 -0
  127. package/header/Header.stories.tsx +172 -0
  128. package/header/Header.test.js +79 -0
  129. package/header/Icons.d.ts +2 -0
  130. package/{dist/header → header}/Icons.js +9 -34
  131. package/header/types.d.ts +48 -0
  132. package/header/types.js +5 -0
  133. package/heading/Heading.d.ts +4 -0
  134. package/{dist/heading → heading}/Heading.js +31 -90
  135. package/heading/Heading.stories.tsx +54 -0
  136. package/heading/Heading.test.js +186 -0
  137. package/heading/types.d.ts +33 -0
  138. package/heading/types.js +5 -0
  139. package/inset/Inset.d.ts +3 -0
  140. package/inset/Inset.js +51 -0
  141. package/inset/Inset.stories.tsx +229 -0
  142. package/inset/types.d.ts +37 -0
  143. package/inset/types.js +5 -0
  144. package/layout/ApplicationLayout.d.ts +20 -0
  145. package/layout/ApplicationLayout.js +171 -0
  146. package/layout/ApplicationLayout.stories.tsx +162 -0
  147. package/layout/Icons.d.ts +5 -0
  148. package/layout/Icons.js +66 -0
  149. package/layout/SidenavContext.d.ts +5 -0
  150. package/layout/SidenavContext.js +19 -0
  151. package/layout/types.d.ts +42 -0
  152. package/layout/types.js +5 -0
  153. package/link/Link.d.ts +4 -0
  154. package/link/Link.js +136 -0
  155. package/link/Link.stories.tsx +193 -0
  156. package/link/Link.test.js +83 -0
  157. package/link/types.d.ts +54 -0
  158. package/link/types.js +5 -0
  159. package/main.d.ts +44 -0
  160. package/{dist/main.js → main.js} +111 -109
  161. package/number-input/NumberInput.d.ts +4 -0
  162. package/number-input/NumberInput.js +76 -0
  163. package/number-input/NumberInput.stories.tsx +115 -0
  164. package/number-input/NumberInput.test.js +506 -0
  165. package/number-input/NumberInputContext.d.ts +4 -0
  166. package/{dist/number-input → number-input}/NumberInputContext.js +5 -2
  167. package/number-input/numberInputContextTypes.d.ts +19 -0
  168. package/number-input/numberInputContextTypes.js +5 -0
  169. package/number-input/types.d.ts +124 -0
  170. package/number-input/types.js +5 -0
  171. package/package.json +42 -31
  172. package/paginator/Icons.js +66 -0
  173. package/paginator/Paginator.d.ts +4 -0
  174. package/paginator/Paginator.js +171 -0
  175. package/paginator/Paginator.stories.tsx +63 -0
  176. package/paginator/Paginator.test.js +308 -0
  177. package/paginator/types.d.ts +38 -0
  178. package/paginator/types.js +5 -0
  179. package/paragraph/Paragraph.d.ts +6 -0
  180. package/paragraph/Paragraph.js +38 -0
  181. package/paragraph/Paragraph.stories.tsx +44 -0
  182. package/password-input/PasswordInput.d.ts +4 -0
  183. package/{dist/password-input → password-input}/PasswordInput.js +49 -79
  184. package/password-input/PasswordInput.stories.tsx +131 -0
  185. package/password-input/PasswordInput.test.js +181 -0
  186. package/password-input/types.d.ts +110 -0
  187. package/password-input/types.js +5 -0
  188. package/progress-bar/ProgressBar.d.ts +4 -0
  189. package/progress-bar/ProgressBar.js +176 -0
  190. package/progress-bar/ProgressBar.stories.jsx +60 -0
  191. package/progress-bar/ProgressBar.test.js +110 -0
  192. package/progress-bar/types.d.ts +36 -0
  193. package/progress-bar/types.js +5 -0
  194. package/quick-nav/QuickNav.d.ts +4 -0
  195. package/quick-nav/QuickNav.js +117 -0
  196. package/quick-nav/QuickNav.stories.tsx +342 -0
  197. package/quick-nav/types.d.ts +21 -0
  198. package/quick-nav/types.js +5 -0
  199. package/radio-group/Radio.d.ts +4 -0
  200. package/radio-group/Radio.js +156 -0
  201. package/radio-group/RadioGroup.d.ts +4 -0
  202. package/radio-group/RadioGroup.js +283 -0
  203. package/radio-group/RadioGroup.stories.tsx +101 -0
  204. package/radio-group/RadioGroup.test.js +722 -0
  205. package/radio-group/types.d.ts +114 -0
  206. package/radio-group/types.js +5 -0
  207. package/resultsetTable/ResultsetTable.d.ts +4 -0
  208. package/{dist/resultsetTable → resultsetTable}/ResultsetTable.js +43 -149
  209. package/resultsetTable/ResultsetTable.stories.tsx +275 -0
  210. package/resultsetTable/ResultsetTable.test.js +348 -0
  211. package/resultsetTable/types.d.ts +67 -0
  212. package/resultsetTable/types.js +5 -0
  213. package/select/Icons.d.ts +10 -0
  214. package/select/Icons.js +93 -0
  215. package/select/Listbox.d.ts +4 -0
  216. package/select/Listbox.js +198 -0
  217. package/select/Option.d.ts +4 -0
  218. package/select/Option.js +110 -0
  219. package/select/Select.d.ts +4 -0
  220. package/select/Select.js +645 -0
  221. package/select/Select.stories.tsx +627 -0
  222. package/select/Select.test.js +2233 -0
  223. package/select/types.d.ts +210 -0
  224. package/select/types.js +5 -0
  225. package/sidenav/Sidenav.d.ts +10 -0
  226. package/sidenav/Sidenav.js +268 -0
  227. package/sidenav/Sidenav.stories.tsx +180 -0
  228. package/sidenav/Sidenav.test.js +44 -0
  229. package/sidenav/types.d.ts +73 -0
  230. package/sidenav/types.js +5 -0
  231. package/slider/Slider.d.ts +4 -0
  232. package/slider/Slider.js +342 -0
  233. package/slider/Slider.stories.tsx +183 -0
  234. package/slider/Slider.test.js +250 -0
  235. package/slider/types.d.ts +82 -0
  236. package/slider/types.js +5 -0
  237. package/spinner/Spinner.d.ts +4 -0
  238. package/spinner/Spinner.js +250 -0
  239. package/spinner/Spinner.stories.jsx +103 -0
  240. package/spinner/Spinner.test.js +64 -0
  241. package/spinner/types.d.ts +32 -0
  242. package/spinner/types.js +5 -0
  243. package/switch/Switch.d.ts +4 -0
  244. package/switch/Switch.js +261 -0
  245. package/switch/Switch.stories.tsx +138 -0
  246. package/switch/Switch.test.js +225 -0
  247. package/switch/types.d.ts +61 -0
  248. package/switch/types.js +5 -0
  249. package/table/Table.d.ts +4 -0
  250. package/{dist/table → table}/Table.js +12 -26
  251. package/table/Table.stories.jsx +277 -0
  252. package/table/Table.test.js +26 -0
  253. package/table/types.d.ts +21 -0
  254. package/table/types.js +5 -0
  255. package/tabs/Tab.d.ts +4 -0
  256. package/tabs/Tab.js +135 -0
  257. package/tabs/Tabs.d.ts +4 -0
  258. package/tabs/Tabs.js +467 -0
  259. package/tabs/Tabs.stories.tsx +186 -0
  260. package/tabs/Tabs.test.js +351 -0
  261. package/tabs/types.d.ts +92 -0
  262. package/tabs/types.js +5 -0
  263. package/tabs-nav/NavTabs.d.ts +8 -0
  264. package/tabs-nav/NavTabs.js +125 -0
  265. package/tabs-nav/NavTabs.stories.tsx +170 -0
  266. package/tabs-nav/NavTabs.test.js +82 -0
  267. package/tabs-nav/Tab.d.ts +4 -0
  268. package/tabs-nav/Tab.js +130 -0
  269. package/tabs-nav/types.d.ts +53 -0
  270. package/tabs-nav/types.js +5 -0
  271. package/tag/Tag.d.ts +4 -0
  272. package/tag/Tag.js +183 -0
  273. package/tag/Tag.stories.tsx +142 -0
  274. package/tag/Tag.test.js +60 -0
  275. package/tag/types.d.ts +69 -0
  276. package/tag/types.js +5 -0
  277. package/text-input/Icons.d.ts +8 -0
  278. package/text-input/Icons.js +60 -0
  279. package/text-input/Suggestion.d.ts +4 -0
  280. package/text-input/Suggestion.js +57 -0
  281. package/text-input/Suggestions.d.ts +4 -0
  282. package/text-input/Suggestions.js +134 -0
  283. package/text-input/TextInput.d.ts +4 -0
  284. package/text-input/TextInput.js +673 -0
  285. package/text-input/TextInput.stories.tsx +481 -0
  286. package/text-input/TextInput.test.js +1714 -0
  287. package/text-input/types.d.ts +197 -0
  288. package/text-input/types.js +5 -0
  289. package/textarea/Textarea.d.ts +4 -0
  290. package/{dist/textarea → textarea}/Textarea.js +50 -142
  291. package/textarea/Textarea.stories.jsx +157 -0
  292. package/textarea/Textarea.test.js +437 -0
  293. package/textarea/types.d.ts +137 -0
  294. package/textarea/types.js +5 -0
  295. package/toggle-group/ToggleGroup.d.ts +4 -0
  296. package/{dist/toggle-group → toggle-group}/ToggleGroup.js +36 -148
  297. package/toggle-group/ToggleGroup.stories.tsx +173 -0
  298. package/toggle-group/ToggleGroup.test.js +156 -0
  299. package/toggle-group/types.d.ts +105 -0
  300. package/toggle-group/types.js +5 -0
  301. package/typography/Typography.d.ts +4 -0
  302. package/typography/Typography.js +131 -0
  303. package/typography/Typography.stories.tsx +198 -0
  304. package/typography/types.d.ts +18 -0
  305. package/typography/types.js +5 -0
  306. package/useTheme.d.ts +2 -0
  307. package/{dist/useTheme.js → useTheme.js} +2 -2
  308. package/useTranslatedLabels.d.ts +2 -0
  309. package/useTranslatedLabels.js +20 -0
  310. package/wizard/Wizard.d.ts +4 -0
  311. package/wizard/Wizard.js +285 -0
  312. package/wizard/Wizard.stories.tsx +233 -0
  313. package/wizard/Wizard.test.js +141 -0
  314. package/wizard/types.d.ts +65 -0
  315. package/wizard/types.js +5 -0
  316. package/README.md +0 -66
  317. package/babel.config.js +0 -8
  318. package/dist/BackgroundColorContext.js +0 -46
  319. package/dist/ThemeContext.js +0 -248
  320. package/dist/V3Textarea/V3Textarea.js +0 -264
  321. package/dist/accordion/Accordion.js +0 -353
  322. package/dist/accordion-group/AccordionGroup.js +0 -186
  323. package/dist/alert/index.d.ts +0 -51
  324. package/dist/badge/Badge.js +0 -63
  325. package/dist/box/Box.js +0 -156
  326. package/dist/button/Button.js +0 -238
  327. package/dist/card/Card.js +0 -254
  328. package/dist/checkbox/Checkbox.js +0 -300
  329. package/dist/checkbox/Checkbox.stories.js +0 -144
  330. package/dist/checkbox/readme.md +0 -116
  331. package/dist/chip/Chip.js +0 -265
  332. package/dist/date/Date.js +0 -379
  333. package/dist/date/Date.stories.js +0 -205
  334. package/dist/date/readme.md +0 -73
  335. package/dist/date-input/index.d.ts +0 -95
  336. package/dist/dialog/Dialog.js +0 -218
  337. package/dist/dropdown/Dropdown.js +0 -544
  338. package/dist/file-input/FileInput.js +0 -644
  339. package/dist/file-input/FileItem.js +0 -280
  340. package/dist/file-input/index.d.ts +0 -81
  341. package/dist/footer/Footer.js +0 -421
  342. package/dist/header/Header.js +0 -434
  343. package/dist/input-text/Icons.js +0 -22
  344. package/dist/input-text/InputText.js +0 -705
  345. package/dist/layout/ApplicationLayout.js +0 -331
  346. package/dist/layout/facebook.svg +0 -45
  347. package/dist/layout/linkedin.svg +0 -50
  348. package/dist/layout/twitter.svg +0 -53
  349. package/dist/link/Link.js +0 -237
  350. package/dist/link/readme.md +0 -51
  351. package/dist/main.d.ts +0 -8
  352. package/dist/new-select/NewSelect.js +0 -836
  353. package/dist/new-select/index.d.ts +0 -53
  354. package/dist/number-input/NumberInput.js +0 -136
  355. package/dist/number-input/index.d.ts +0 -113
  356. package/dist/paginator/Paginator.js +0 -289
  357. package/dist/paginator/images/next.svg +0 -3
  358. package/dist/paginator/images/nextPage.svg +0 -3
  359. package/dist/paginator/images/previous.svg +0 -3
  360. package/dist/paginator/images/previousPage.svg +0 -3
  361. package/dist/paginator/readme.md +0 -50
  362. package/dist/password-input/index.d.ts +0 -94
  363. package/dist/progress-bar/ProgressBar.js +0 -242
  364. package/dist/progress-bar/ProgressBar.stories.js +0 -280
  365. package/dist/progress-bar/readme.md +0 -63
  366. package/dist/radio/Radio.js +0 -209
  367. package/dist/radio/Radio.stories.js +0 -166
  368. package/dist/radio/readme.md +0 -70
  369. package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
  370. package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
  371. package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
  372. package/dist/select/Select.js +0 -549
  373. package/dist/sidenav/Sidenav.js +0 -179
  374. package/dist/slider/Slider.js +0 -394
  375. package/dist/slider/readme.md +0 -64
  376. package/dist/spinner/Spinner.js +0 -381
  377. package/dist/spinner/Spinner.stories.js +0 -183
  378. package/dist/spinner/readme.md +0 -65
  379. package/dist/switch/Switch.js +0 -222
  380. package/dist/switch/Switch.stories.js +0 -134
  381. package/dist/switch/readme.md +0 -133
  382. package/dist/tabs/Tabs.js +0 -343
  383. package/dist/tabs/Tabs.stories.js +0 -130
  384. package/dist/tabs/readme.md +0 -78
  385. package/dist/tabs-for-sections/TabsForSections.js +0 -92
  386. package/dist/tabs-for-sections/readme.md +0 -78
  387. package/dist/tag/Tag.js +0 -282
  388. package/dist/text-input/TextInput.js +0 -971
  389. package/dist/text-input/index.d.ts +0 -135
  390. package/dist/textarea/index.d.ts +0 -117
  391. package/dist/toggle/Toggle.js +0 -220
  392. package/dist/toggle/Toggle.stories.js +0 -297
  393. package/dist/toggle/readme.md +0 -80
  394. package/dist/upload/Upload.js +0 -205
  395. package/dist/upload/Upload.stories.js +0 -72
  396. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -139
  397. package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
  398. package/dist/upload/buttons-upload/upload-button.svg +0 -1
  399. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
  400. package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
  401. package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
  402. package/dist/upload/file-upload/FileToUpload.js +0 -184
  403. package/dist/upload/file-upload/audio-icon.svg +0 -4
  404. package/dist/upload/file-upload/close.svg +0 -4
  405. package/dist/upload/file-upload/file-icon.svg +0 -4
  406. package/dist/upload/file-upload/video-icon.svg +0 -4
  407. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  408. package/dist/upload/readme.md +0 -37
  409. package/dist/upload/transaction/Transaction.js +0 -175
  410. package/dist/upload/transaction/audio-icon-err.svg +0 -4
  411. package/dist/upload/transaction/audio-icon.svg +0 -4
  412. package/dist/upload/transaction/error-icon.svg +0 -4
  413. package/dist/upload/transaction/file-icon-err.svg +0 -4
  414. package/dist/upload/transaction/file-icon.svg +0 -4
  415. package/dist/upload/transaction/image-icon-err.svg +0 -4
  416. package/dist/upload/transaction/image-icon.svg +0 -4
  417. package/dist/upload/transaction/success-icon.svg +0 -4
  418. package/dist/upload/transaction/video-icon-err.svg +0 -4
  419. package/dist/upload/transaction/video-icon.svg +0 -4
  420. package/dist/upload/transactions/Transactions.js +0 -138
  421. package/dist/wizard/Wizard.js +0 -411
  422. package/dist/wizard/invalid_icon.svg +0 -5
  423. package/dist/wizard/valid_icon.svg +0 -5
  424. package/dist/wizard/validation-wrong.svg +0 -6
  425. package/test/Accordion.test.js +0 -33
  426. package/test/AccordionGroup.test.js +0 -125
  427. package/test/Alert.test.js +0 -53
  428. package/test/Box.test.js +0 -10
  429. package/test/Button.test.js +0 -18
  430. package/test/Card.test.js +0 -30
  431. package/test/Checkbox.test.js +0 -45
  432. package/test/Chip.test.js +0 -25
  433. package/test/Date.test.js +0 -397
  434. package/test/DateInput.test.js +0 -242
  435. package/test/Dialog.test.js +0 -23
  436. package/test/Dropdown.test.js +0 -145
  437. package/test/FileInput.test.js +0 -201
  438. package/test/Footer.test.js +0 -94
  439. package/test/Header.test.js +0 -34
  440. package/test/Heading.test.js +0 -35
  441. package/test/InputText.test.js +0 -248
  442. package/test/Link.test.js +0 -43
  443. package/test/NumberInput.test.js +0 -259
  444. package/test/Paginator.test.js +0 -177
  445. package/test/PasswordInput.test.js +0 -83
  446. package/test/ProgressBar.test.js +0 -35
  447. package/test/Radio.test.js +0 -37
  448. package/test/ResultsetTable.test.js +0 -329
  449. package/test/Select.test.js +0 -212
  450. package/test/Sidenav.test.js +0 -45
  451. package/test/Slider.test.js +0 -82
  452. package/test/Spinner.test.js +0 -32
  453. package/test/Switch.test.js +0 -45
  454. package/test/Table.test.js +0 -36
  455. package/test/Tabs.test.js +0 -109
  456. package/test/TabsForSections.test.js +0 -34
  457. package/test/Tag.test.js +0 -32
  458. package/test/TextInput.test.js +0 -732
  459. package/test/Textarea.test.js +0 -193
  460. package/test/ToggleGroup.test.js +0 -85
  461. package/test/Upload.test.js +0 -60
  462. package/test/V3TextArea.test.js +0 -51
  463. package/test/Wizard.test.js +0 -130
  464. package/test/mocks/pngMock.js +0 -1
  465. package/test/mocks/svgMock.js +0 -1
@@ -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;