@dxc-technology/halstack-react 0.0.0-f4bae62 → 0.0.0-f53e801

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 (443) 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 +226 -0
  7. package/accordion/Accordion.stories.tsx +307 -0
  8. package/accordion/Accordion.test.js +72 -0
  9. package/accordion/types.d.ts +68 -0
  10. package/accordion/types.js +5 -0
  11. package/accordion-group/AccordionGroup.d.ts +7 -0
  12. package/accordion-group/AccordionGroup.js +169 -0
  13. package/accordion-group/AccordionGroup.stories.tsx +225 -0
  14. package/accordion-group/AccordionGroup.test.js +151 -0
  15. package/accordion-group/types.d.ts +72 -0
  16. package/accordion-group/types.js +5 -0
  17. package/alert/Alert.d.ts +4 -0
  18. package/{dist/alert → alert}/Alert.js +43 -153
  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 +43 -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 +67 -0
  55. package/card/types.js +5 -0
  56. package/checkbox/Checkbox.d.ts +4 -0
  57. package/{dist/checkbox → checkbox}/Checkbox.js +55 -98
  58. package/checkbox/Checkbox.stories.tsx +188 -0
  59. package/checkbox/Checkbox.test.js +78 -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 +370 -435
  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 +211 -0
  91. package/dialog/Dialog.test.js +70 -0
  92. package/dialog/types.d.ts +43 -0
  93. package/dialog/types.js +5 -0
  94. package/dropdown/Dropdown.d.ts +4 -0
  95. package/dropdown/Dropdown.js +387 -0
  96. package/dropdown/Dropdown.stories.tsx +312 -0
  97. package/dropdown/Dropdown.test.js +591 -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 +57 -0
  114. package/flex/Flex.stories.tsx +103 -0
  115. package/flex/types.d.ts +21 -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 +130 -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 +65 -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 +47 -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 +161 -0
  147. package/layout/Icons.d.ts +5 -0
  148. package/{dist/layout → layout}/Icons.js +19 -8
  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 +40 -29
  172. package/{dist/paginator → paginator}/Icons.js +9 -9
  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 +45 -77
  184. package/password-input/PasswordInput.stories.tsx +131 -0
  185. package/password-input/PasswordInput.test.js +180 -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 +118 -0
  196. package/quick-nav/QuickNav.stories.tsx +264 -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 +141 -0
  201. package/radio-group/RadioGroup.d.ts +4 -0
  202. package/radio-group/RadioGroup.js +281 -0
  203. package/radio-group/RadioGroup.stories.tsx +100 -0
  204. package/radio-group/RadioGroup.test.js +695 -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 -147
  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 +199 -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 +643 -0
  221. package/select/Select.stories.tsx +627 -0
  222. package/select/Select.test.js +2175 -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/{dist/slider → slider}/Slider.js +77 -163
  233. package/slider/Slider.stories.tsx +177 -0
  234. package/slider/Slider.test.js +187 -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 +251 -0
  245. package/switch/Switch.stories.tsx +138 -0
  246. package/switch/Switch.test.js +212 -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/Tabs.d.ts +4 -0
  256. package/tabs/Tabs.js +211 -0
  257. package/tabs/Tabs.stories.tsx +112 -0
  258. package/tabs/Tabs.test.js +140 -0
  259. package/tabs/types.d.ts +82 -0
  260. package/tabs/types.js +5 -0
  261. package/tabs-nav/NavTabs.d.ts +8 -0
  262. package/tabs-nav/NavTabs.js +125 -0
  263. package/tabs-nav/NavTabs.stories.tsx +170 -0
  264. package/tabs-nav/NavTabs.test.js +82 -0
  265. package/tabs-nav/Tab.d.ts +4 -0
  266. package/tabs-nav/Tab.js +130 -0
  267. package/tabs-nav/types.d.ts +53 -0
  268. package/tabs-nav/types.js +5 -0
  269. package/tag/Tag.d.ts +4 -0
  270. package/tag/Tag.js +183 -0
  271. package/tag/Tag.stories.tsx +142 -0
  272. package/tag/Tag.test.js +60 -0
  273. package/tag/types.d.ts +69 -0
  274. package/tag/types.js +5 -0
  275. package/text-input/Suggestion.d.ts +4 -0
  276. package/text-input/Suggestion.js +55 -0
  277. package/text-input/TextInput.d.ts +4 -0
  278. package/{dist/text-input → text-input}/TextInput.js +294 -504
  279. package/text-input/TextInput.stories.tsx +473 -0
  280. package/text-input/TextInput.test.js +1712 -0
  281. package/text-input/types.d.ts +178 -0
  282. package/text-input/types.js +5 -0
  283. package/textarea/Textarea.d.ts +4 -0
  284. package/{dist/textarea → textarea}/Textarea.js +50 -142
  285. package/textarea/Textarea.stories.jsx +157 -0
  286. package/textarea/Textarea.test.js +437 -0
  287. package/textarea/types.d.ts +137 -0
  288. package/textarea/types.js +5 -0
  289. package/toggle-group/ToggleGroup.d.ts +4 -0
  290. package/{dist/toggle-group → toggle-group}/ToggleGroup.js +36 -148
  291. package/toggle-group/ToggleGroup.stories.tsx +173 -0
  292. package/toggle-group/ToggleGroup.test.js +156 -0
  293. package/toggle-group/types.d.ts +105 -0
  294. package/toggle-group/types.js +5 -0
  295. package/typography/Typography.d.ts +4 -0
  296. package/typography/Typography.js +131 -0
  297. package/typography/Typography.stories.tsx +198 -0
  298. package/typography/types.d.ts +18 -0
  299. package/typography/types.js +5 -0
  300. package/useTheme.d.ts +2 -0
  301. package/{dist/useTheme.js → useTheme.js} +2 -2
  302. package/useTranslatedLabels.d.ts +2 -0
  303. package/useTranslatedLabels.js +20 -0
  304. package/wizard/Wizard.d.ts +4 -0
  305. package/wizard/Wizard.js +285 -0
  306. package/wizard/Wizard.stories.tsx +233 -0
  307. package/wizard/Wizard.test.js +141 -0
  308. package/wizard/types.d.ts +65 -0
  309. package/wizard/types.js +5 -0
  310. package/README.md +0 -66
  311. package/babel.config.js +0 -8
  312. package/dist/BackgroundColorContext.js +0 -46
  313. package/dist/ThemeContext.js +0 -248
  314. package/dist/V3Textarea/V3Textarea.js +0 -264
  315. package/dist/accordion/Accordion.js +0 -353
  316. package/dist/accordion-group/AccordionGroup.js +0 -186
  317. package/dist/alert/index.d.ts +0 -51
  318. package/dist/badge/Badge.js +0 -63
  319. package/dist/box/Box.js +0 -156
  320. package/dist/button/Button.js +0 -238
  321. package/dist/card/Card.js +0 -254
  322. package/dist/checkbox/Checkbox.stories.js +0 -144
  323. package/dist/checkbox/readme.md +0 -116
  324. package/dist/chip/Chip.js +0 -265
  325. package/dist/date/Date.js +0 -379
  326. package/dist/date/Date.stories.js +0 -205
  327. package/dist/date/readme.md +0 -73
  328. package/dist/date-input/index.d.ts +0 -95
  329. package/dist/dialog/Dialog.js +0 -218
  330. package/dist/dropdown/Dropdown.js +0 -544
  331. package/dist/file-input/FileInput.js +0 -644
  332. package/dist/file-input/FileItem.js +0 -280
  333. package/dist/file-input/index.d.ts +0 -81
  334. package/dist/footer/Footer.js +0 -421
  335. package/dist/header/Header.js +0 -434
  336. package/dist/input-text/Icons.js +0 -22
  337. package/dist/input-text/InputText.js +0 -705
  338. package/dist/layout/ApplicationLayout.js +0 -327
  339. package/dist/link/Link.js +0 -237
  340. package/dist/link/readme.md +0 -51
  341. package/dist/main.d.ts +0 -8
  342. package/dist/new-select/NewSelect.js +0 -836
  343. package/dist/new-select/index.d.ts +0 -53
  344. package/dist/number-input/NumberInput.js +0 -136
  345. package/dist/number-input/index.d.ts +0 -113
  346. package/dist/paginator/Paginator.js +0 -283
  347. package/dist/password-input/index.d.ts +0 -94
  348. package/dist/progress-bar/ProgressBar.js +0 -242
  349. package/dist/progress-bar/ProgressBar.stories.js +0 -280
  350. package/dist/progress-bar/readme.md +0 -63
  351. package/dist/radio/Radio.js +0 -209
  352. package/dist/radio/Radio.stories.js +0 -166
  353. package/dist/radio/readme.md +0 -70
  354. package/dist/select/Select.js +0 -549
  355. package/dist/sidenav/Sidenav.js +0 -179
  356. package/dist/slider/readme.md +0 -64
  357. package/dist/spinner/Spinner.js +0 -381
  358. package/dist/spinner/Spinner.stories.js +0 -183
  359. package/dist/spinner/readme.md +0 -65
  360. package/dist/switch/Switch.js +0 -222
  361. package/dist/switch/Switch.stories.js +0 -134
  362. package/dist/switch/readme.md +0 -133
  363. package/dist/tabs/Tabs.js +0 -343
  364. package/dist/tabs/Tabs.stories.js +0 -130
  365. package/dist/tabs/readme.md +0 -78
  366. package/dist/tabs-for-sections/TabsForSections.js +0 -92
  367. package/dist/tabs-for-sections/readme.md +0 -78
  368. package/dist/tag/Tag.js +0 -282
  369. package/dist/text-input/index.d.ts +0 -135
  370. package/dist/textarea/index.d.ts +0 -117
  371. package/dist/toggle/Toggle.js +0 -220
  372. package/dist/toggle/Toggle.stories.js +0 -297
  373. package/dist/toggle/readme.md +0 -80
  374. package/dist/upload/Upload.js +0 -205
  375. package/dist/upload/Upload.stories.js +0 -72
  376. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -139
  377. package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
  378. package/dist/upload/buttons-upload/upload-button.svg +0 -1
  379. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
  380. package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
  381. package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
  382. package/dist/upload/file-upload/FileToUpload.js +0 -184
  383. package/dist/upload/file-upload/audio-icon.svg +0 -4
  384. package/dist/upload/file-upload/close.svg +0 -4
  385. package/dist/upload/file-upload/file-icon.svg +0 -4
  386. package/dist/upload/file-upload/video-icon.svg +0 -4
  387. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  388. package/dist/upload/readme.md +0 -37
  389. package/dist/upload/transaction/Transaction.js +0 -175
  390. package/dist/upload/transaction/audio-icon-err.svg +0 -4
  391. package/dist/upload/transaction/audio-icon.svg +0 -4
  392. package/dist/upload/transaction/error-icon.svg +0 -4
  393. package/dist/upload/transaction/file-icon-err.svg +0 -4
  394. package/dist/upload/transaction/file-icon.svg +0 -4
  395. package/dist/upload/transaction/image-icon-err.svg +0 -4
  396. package/dist/upload/transaction/image-icon.svg +0 -4
  397. package/dist/upload/transaction/success-icon.svg +0 -4
  398. package/dist/upload/transaction/video-icon-err.svg +0 -4
  399. package/dist/upload/transaction/video-icon.svg +0 -4
  400. package/dist/upload/transactions/Transactions.js +0 -138
  401. package/dist/wizard/Icons.js +0 -65
  402. package/dist/wizard/Wizard.js +0 -405
  403. package/test/Accordion.test.js +0 -33
  404. package/test/AccordionGroup.test.js +0 -125
  405. package/test/Alert.test.js +0 -53
  406. package/test/Box.test.js +0 -10
  407. package/test/Button.test.js +0 -18
  408. package/test/Card.test.js +0 -30
  409. package/test/Checkbox.test.js +0 -45
  410. package/test/Chip.test.js +0 -25
  411. package/test/Date.test.js +0 -397
  412. package/test/DateInput.test.js +0 -242
  413. package/test/Dialog.test.js +0 -23
  414. package/test/Dropdown.test.js +0 -145
  415. package/test/FileInput.test.js +0 -201
  416. package/test/Footer.test.js +0 -94
  417. package/test/Header.test.js +0 -34
  418. package/test/Heading.test.js +0 -35
  419. package/test/InputText.test.js +0 -248
  420. package/test/Link.test.js +0 -43
  421. package/test/NumberInput.test.js +0 -259
  422. package/test/Paginator.test.js +0 -177
  423. package/test/PasswordInput.test.js +0 -83
  424. package/test/ProgressBar.test.js +0 -35
  425. package/test/Radio.test.js +0 -37
  426. package/test/ResultsetTable.test.js +0 -329
  427. package/test/Select.test.js +0 -212
  428. package/test/Sidenav.test.js +0 -45
  429. package/test/Slider.test.js +0 -74
  430. package/test/Spinner.test.js +0 -32
  431. package/test/Switch.test.js +0 -45
  432. package/test/Table.test.js +0 -36
  433. package/test/Tabs.test.js +0 -109
  434. package/test/TabsForSections.test.js +0 -34
  435. package/test/Tag.test.js +0 -32
  436. package/test/TextInput.test.js +0 -732
  437. package/test/Textarea.test.js +0 -193
  438. package/test/ToggleGroup.test.js +0 -85
  439. package/test/Upload.test.js +0 -60
  440. package/test/V3TextArea.test.js +0 -51
  441. package/test/Wizard.test.js +0 -130
  442. package/test/mocks/pngMock.js +0 -1
  443. package/test/mocks/svgMock.js +0 -1
@@ -1,92 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
-
12
- var _react = _interopRequireDefault(require("react"));
13
-
14
- var _styledComponents = _interopRequireDefault(require("styled-components"));
15
-
16
- var _propTypes = _interopRequireDefault(require("prop-types"));
17
-
18
- var _reactUseScrollspy = _interopRequireDefault(require("react-use-scrollspy"));
19
-
20
- var _Tabs = _interopRequireDefault(require("../tabs/Tabs"));
21
-
22
- function _templateObject() {
23
- var data = (0, _taggedTemplateLiteral2["default"])(["\n z-index: 10;\n ", "\n"]);
24
-
25
- _templateObject = function _templateObject() {
26
- return data;
27
- };
28
-
29
- return data;
30
- }
31
-
32
- var TABS_HEIGHT = 54;
33
-
34
- var DxcTabsForSections = function DxcTabsForSections(_ref) {
35
- var _ref$sections = _ref.sections,
36
- sections = _ref$sections === void 0 ? [] : _ref$sections,
37
- _ref$stickAtPx = _ref.stickAtPx,
38
- stickAtPx = _ref$stickAtPx === void 0 ? 0 : _ref$stickAtPx;
39
- var tabs = sections.map(function (section) {
40
- return {
41
- label: section.tabLabel
42
- };
43
- });
44
- var refs = sections.map(function () {
45
- return _react["default"].createRef();
46
- });
47
- var activeTab = (0, _reactUseScrollspy["default"])({
48
- sectionElementRefs: refs,
49
- offsetPx: -stickAtPx - TABS_HEIGHT
50
- });
51
-
52
- var onTabClick = function onTabClick(tabId) {
53
- var topOfElement = refs[tabId].current.offsetTop - stickAtPx - TABS_HEIGHT + 5;
54
- window.scroll({
55
- top: topOfElement,
56
- behavior: "smooth"
57
- });
58
- };
59
-
60
- return _react["default"].createElement(_react["default"].Fragment, null, _react["default"].createElement(StyledTabs, {
61
- stickAtPx: stickAtPx
62
- }, _react["default"].createElement(_Tabs["default"], {
63
- tabs: tabs,
64
- activeTabIndex: activeTab,
65
- onTabClick: onTabClick
66
- })), sections.map(function (section, i) {
67
- return _react["default"].createElement("div", {
68
- key: "section".concat(i),
69
- ref: refs[i]
70
- }, _react["default"].createElement(section.section, null));
71
- }));
72
- };
73
-
74
- DxcTabsForSections.propTypes = {
75
- stickAtPx: _propTypes["default"].number,
76
- sections: _propTypes["default"].arrayOf(_propTypes["default"].shape({
77
- tabLabel: _propTypes["default"].string,
78
- section: _propTypes["default"].func
79
- }))
80
- };
81
- DxcTabsForSections.defaultProps = {
82
- stickAtPx: 0,
83
- sections: []
84
- };
85
-
86
- var StyledTabs = _styledComponents["default"].div(_templateObject(), function (_ref2) {
87
- var stickAtPx = _ref2.stickAtPx;
88
- return stickAtPx && "\n position: sticky;\n top: ".concat(stickAtPx, "px;\n ");
89
- });
90
-
91
- var _default = DxcTabsForSections;
92
- exports["default"] = _default;
@@ -1,78 +0,0 @@
1
- # DXC Tabs Component
2
-
3
- ## Tab Group Props
4
-
5
- <table>
6
- <tr style="background-color: grey">
7
- <td>Name</td>
8
- <td>Default</td>
9
- <td>Description</td>
10
- </tr>
11
- <tr>
12
- <td>mode: 'filled' | 'underlined'</td>
13
- <td><code>'filled'</code></td>
14
- <td>Uses one of the available component modes.</td>
15
- </tr>
16
- <tr>
17
- <td>theme: 'light' | 'dark'</td>
18
- <td><code>'light'</code></td>
19
- <td>Uses one of the available component themes.</td>
20
- </tr>
21
- <tr>
22
- <td>showDotIndicator: boolean</td>
23
- <td><code>false</code></td>
24
- <td>If true, a dot indicator will be shown in the active tab.</td>
25
- </tr>
26
- <tr>
27
- <td>disableRipple: boolean</td>
28
- <td><code>false</code></td>
29
- <td>If true, the ripple effect will be disabled.</td>
30
- </tr>
31
- <tr>
32
- <td>activeTabIndex: number</td>
33
- <td><code>0</code></td>
34
- <td>The index of the active tab.</td>
35
- </tr>
36
- <tr>
37
- <td>activeTabIndexChange: function</td>
38
- <td></td>
39
- <td>This function will be called when the user clicks on a tab. The index of the clicked tab will be passed as a parameter.</td>
40
- </tr>
41
- <tr>
42
- <td>stepper: boolean</td>
43
- <td><code>false</code></td>
44
- <td>If true, the component should be rendered as a Stepper component.</td>
45
- </tr>
46
- <tr>
47
- <td>orientation: 'horizontal' | 'vertical'</td>
48
- <td><code>'horizontal'</code></td>
49
- <td>Only if stepper, this parameter shows the stepper orientation.</td>
50
- </tr>
51
-
52
- </table>
53
-
54
- ## Tab Props
55
-
56
- <table>
57
- <tr style="background-color: grey">
58
- <td>Name</td>
59
- <td>Default</td>
60
- <td>Description</td>
61
- </tr>
62
- <tr>
63
- <td>label: string</td>
64
- <td></td>
65
- <td>Text to be placed within the tab.</td>
66
- </tr>
67
- <tr>
68
- <td>iconSrc: string</td>
69
- <td></td>
70
- <td>The path of an icon to be placed within the tab.</td>
71
- </tr>
72
- <tr>
73
- <td>disabled: boolean</td>
74
- <td><code>false</code></td>
75
- <td>Whether the tab is disabled.</td>
76
- </tr>
77
- </table>
78
-
package/dist/tag/Tag.js DELETED
@@ -1,282 +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 _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
13
-
14
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
15
-
16
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
17
-
18
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
19
-
20
- var _react = _interopRequireWildcard(require("react"));
21
-
22
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
23
-
24
- var _propTypes = _interopRequireDefault(require("prop-types"));
25
-
26
- var _variables = require("../common/variables.js");
27
-
28
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
29
-
30
- var _Box = _interopRequireDefault(require("../box/Box"));
31
-
32
- function _templateObject8() {
33
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n flex-grow: 1;\n text-align: center;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n"]);
34
-
35
- _templateObject8 = function _templateObject8() {
36
- return data;
37
- };
38
-
39
- return data;
40
- }
41
-
42
- function _templateObject7() {
43
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n background: ", ";\n width: ", ";\n height: 100%;\n justify-content: center;\n align-items: center;\n color: ", ";\n"]);
44
-
45
- _templateObject7 = function _templateObject7() {
46
- return data;
47
- };
48
-
49
- return data;
50
- }
51
-
52
- function _templateObject6() {
53
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n\n img,\n svg {\n width: ", ";\n height: ", ";\n }\n"]);
54
-
55
- _templateObject6 = function _templateObject6() {
56
- return data;
57
- };
58
-
59
- return data;
60
- }
61
-
62
- function _templateObject5() {
63
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n width: ", ";\n height: ", ";\n"]);
64
-
65
- _templateObject5 = function _templateObject5() {
66
- return data;
67
- };
68
-
69
- return data;
70
- }
71
-
72
- function _templateObject4() {
73
- var data = (0, _taggedTemplateLiteral2["default"])(["\n background: none;\n border-radius: 4px;\n border: none;\n padding: 0;\n cursor: pointer;\n font-family: inherit;\n\n :focus {\n outline: 2px solid ", ";\n }\n"]);
74
-
75
- _templateObject4 = function _templateObject4() {
76
- return data;
77
- };
78
-
79
- return data;
80
- }
81
-
82
- function _templateObject3() {
83
- var data = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: none;\n border-radius: 4px;\n\n :focus {\n outline: 2px solid ", ";\n outline-offset: 0px;\n }\n"]);
84
-
85
- _templateObject3 = function _templateObject3() {
86
- return data;
87
- };
88
-
89
- return data;
90
- }
91
-
92
- function _templateObject2() {
93
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n align-items: center;\n flex-direction: ", ";\n width: ", ";\n height: ", ";\n"]);
94
-
95
- _templateObject2 = function _templateObject2() {
96
- return data;
97
- };
98
-
99
- return data;
100
- }
101
-
102
- function _templateObject() {
103
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n cursor: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
104
-
105
- _templateObject = function _templateObject() {
106
- return data;
107
- };
108
-
109
- return data;
110
- }
111
-
112
- var DxcTag = function DxcTag(_ref) {
113
- var icon = _ref.icon,
114
- iconSrc = _ref.iconSrc,
115
- label = _ref.label,
116
- margin = _ref.margin,
117
- linkHref = _ref.linkHref,
118
- onClick = _ref.onClick,
119
- _ref$iconBgColor = _ref.iconBgColor,
120
- iconBgColor = _ref$iconBgColor === void 0 ? "#5f249f" : _ref$iconBgColor,
121
- _ref$labelPosition = _ref.labelPosition,
122
- labelPosition = _ref$labelPosition === void 0 ? "after" : _ref$labelPosition,
123
- _ref$newWindow = _ref.newWindow,
124
- newWindow = _ref$newWindow === void 0 ? false : _ref$newWindow,
125
- _ref$size = _ref.size,
126
- size = _ref$size === void 0 ? "fitContent" : _ref$size,
127
- _ref$tabIndex = _ref.tabIndex,
128
- tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
129
- var colorsTheme = (0, _useTheme["default"])();
130
-
131
- var _useState = (0, _react.useState)(false),
132
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
133
- isHovered = _useState2[0],
134
- changeIsHovered = _useState2[1];
135
-
136
- var clickHandler = function clickHandler() {
137
- onClick && onClick();
138
- };
139
-
140
- var tagContent = _react["default"].createElement(_Box["default"], {
141
- size: size,
142
- shadowDepth: isHovered && (onClick || linkHref) && 2 || 1
143
- }, _react["default"].createElement(TagContent, {
144
- labelPosition: labelPosition,
145
- size: size
146
- }, _react["default"].createElement(IconContainer, {
147
- iconBgColor: iconBgColor
148
- }, icon ? _react["default"].createElement(TagIconContainer, null, (0, _typeof2["default"])(icon) === "object" ? icon : _react["default"].createElement(icon)) : _react["default"].createElement(TagIcon, {
149
- src: iconSrc
150
- })), size !== "small" && _react["default"].createElement(TagLabel, null, label)));
151
-
152
- return _react["default"].createElement(_styledComponents.ThemeProvider, {
153
- theme: colorsTheme.tag
154
- }, _react["default"].createElement(StyledDxcTag, {
155
- margin: margin,
156
- onMouseEnter: function onMouseEnter() {
157
- return changeIsHovered(true);
158
- },
159
- onMouseLeave: function onMouseLeave() {
160
- return changeIsHovered(false);
161
- },
162
- onClick: clickHandler,
163
- hasAction: onClick || linkHref
164
- }, onClick ? _react["default"].createElement(StyledButton, {
165
- tabIndex: tabIndex
166
- }, tagContent) : linkHref ? _react["default"].createElement(StyledLink, {
167
- tabIndex: tabIndex,
168
- href: linkHref,
169
- target: newWindow ? "_blank" : "_self"
170
- }, tagContent) : tagContent));
171
- };
172
-
173
- var sizes = {
174
- small: "42px",
175
- medium: "240px",
176
- large: "480px",
177
- fillParent: "100%",
178
- fitContent: "unset"
179
- };
180
-
181
- var calculateWidth = function calculateWidth(size) {
182
- return sizes[size];
183
- };
184
-
185
- var StyledDxcTag = _styledComponents["default"].div(_templateObject(), function (_ref2) {
186
- var hasAction = _ref2.hasAction;
187
- return hasAction && "pointer" || "unset";
188
- }, function (_ref3) {
189
- var margin = _ref3.margin;
190
- return margin && (0, _typeof2["default"])(margin) !== "object" ? _variables.spaces[margin] : "0px";
191
- }, function (_ref4) {
192
- var margin = _ref4.margin;
193
- return margin && margin.top ? _variables.spaces[margin.top] : "";
194
- }, function (_ref5) {
195
- var margin = _ref5.margin;
196
- return margin && margin.right ? _variables.spaces[margin.right] : "";
197
- }, function (_ref6) {
198
- var margin = _ref6.margin;
199
- return margin && margin.bottom ? _variables.spaces[margin.bottom] : "";
200
- }, function (_ref7) {
201
- var margin = _ref7.margin;
202
- return margin && margin.left ? _variables.spaces[margin.left] : "";
203
- });
204
-
205
- var TagContent = _styledComponents["default"].div(_templateObject2(), function (_ref8) {
206
- var labelPosition = _ref8.labelPosition;
207
- return labelPosition === "before" && "row-reverse" || "row";
208
- }, function (props) {
209
- return calculateWidth(props.size);
210
- }, function (props) {
211
- return props.theme.height;
212
- });
213
-
214
- var StyledLink = _styledComponents["default"].a(_templateObject3(), function (props) {
215
- return props.theme.focusColor;
216
- });
217
-
218
- var StyledButton = _styledComponents["default"].button(_templateObject4(), function (props) {
219
- return props.theme.focusColor;
220
- });
221
-
222
- var TagIcon = _styledComponents["default"].img(_templateObject5(), function (props) {
223
- return props.theme.iconWidth;
224
- }, function (props) {
225
- return props.theme.iconHeight;
226
- });
227
-
228
- var TagIconContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
229
- return props.theme.iconWidth;
230
- }, function (props) {
231
- return props.theme.iconHeight;
232
- });
233
-
234
- var IconContainer = _styledComponents["default"].div(_templateObject7(), function (_ref9) {
235
- var iconBgColor = _ref9.iconBgColor;
236
- return iconBgColor;
237
- }, function (props) {
238
- return props.theme.iconSectionWidth;
239
- }, function (props) {
240
- return props.theme.iconColor;
241
- });
242
-
243
- var TagLabel = _styledComponents["default"].div(_templateObject8(), function (props) {
244
- return props.theme.fontFamily;
245
- }, function (props) {
246
- return props.theme.fontSize;
247
- }, function (props) {
248
- return props.theme.fontStyle;
249
- }, function (props) {
250
- return props.theme.fontWeight;
251
- }, function (props) {
252
- return props.theme.fontColor;
253
- }, function (props) {
254
- return props.theme.labelPaddingTop;
255
- }, function (props) {
256
- return props.theme.labelPaddingBottom;
257
- }, function (props) {
258
- return props.theme.labelPaddingLeft;
259
- }, function (props) {
260
- return props.theme.labelPaddingRight;
261
- });
262
-
263
- DxcTag.propTypes = {
264
- size: _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes))),
265
- icon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].func]),
266
- iconSrc: _propTypes["default"].string,
267
- iconBgColor: _propTypes["default"].string,
268
- label: _propTypes["default"].string,
269
- labelPosition: _propTypes["default"].oneOf(["before", "after"]),
270
- linkHref: _propTypes["default"].string,
271
- onClick: _propTypes["default"].func,
272
- newWindow: _propTypes["default"].bool,
273
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
274
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
275
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
276
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
277
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
278
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
279
- tabIndex: _propTypes["default"].number
280
- };
281
- var _default = DxcTag;
282
- exports["default"] = _default;
@@ -1,135 +0,0 @@
1
- type Size = "small" | "medium" | "large" | "fillParent";
2
- type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
3
- type Margin = {
4
- top?: Space;
5
- bottom?: Space;
6
- left?: Space;
7
- right?: Space;
8
- };
9
- type SVG = string | (HTMLElement & SVGElement);
10
- type Action = {
11
- onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
12
- icon: SVG;
13
- };
14
-
15
- type Props = {
16
- /**
17
- * Text to be placed above the input. This label will be used as the aria-label attribute of the list of suggestions.
18
- */
19
- label?: string;
20
- /**
21
- * Name attribute of the input element.
22
- */
23
- name?: string;
24
- /**
25
- * Value of the input. If undefined, the component will be uncontrolled and the value will be managed internally by the component.
26
- */
27
- value?: string;
28
- /**
29
- * Helper text to be placed above the input.
30
- */
31
- helperText?: string;
32
- /**
33
- * Text to be put as placeholder of the input.
34
- */
35
- placeholder?: string;
36
- /**
37
- * Action to be shown in the input. This is an object composed of an onClick function and an icon,
38
- * being the latter either an inline svg or a URL to the image.
39
- */
40
- action?: Action;
41
- /**
42
- * If true, the input will have an action to clear the entered value.
43
- */
44
- clearable?: boolean;
45
- /**
46
- * If true, the component will be disabled.
47
- */
48
- disabled?: boolean;
49
- /**
50
- * If true, the input will be optional, showing '(Optional)'
51
- * next to the label. Otherwise, the field will be considered required and an error will be
52
- * passed as a parameter to the OnBlur and onChange functions when it has
53
- * not been filled.
54
- */
55
- optional?: boolean;
56
- /**
57
- * Prefix to be placed before the input value.
58
- */
59
- prefix?: string;
60
- /**
61
- * Suffix to be placed after the input value.
62
- */
63
- suffix?: string;
64
- /**
65
- * This function will be called when the user types within the input
66
- * element of the component. An object including the current value and
67
- * the error (if the value entered is not valid) will be passed to this
68
- * function. If there is no error, error will be null.
69
- */
70
- onChange?: (val: { value: string; error: string }) => void;
71
- /**
72
- * This function will be called when the input element loses the focus.
73
- * An object including the input value and the error (if the value
74
- * entered is not valid) will be passed to this function. If there is no error,
75
- * error will be null.
76
- */
77
- onBlur?: (obj: { value: string; error: string }) => void;
78
- /**
79
- * If it is defined, the component will change its appearance, showing
80
- * the error below the input component. If it is not defined, the error
81
- * messages will be managed internally, but never displayed on its own.
82
- */
83
- error?: string;
84
- /**
85
- * These are the options to be displayed as suggestions. It can be either an array or a function:
86
- * - Array: Array of options that will be filtered by the component.
87
- * - Function: This function will be called when the user changes the value, we will send as a parameter the new value;
88
- * apart from that this function should return one promise on which we should make 'then' to get the suggestions filtered.
89
- */
90
- suggestions?: string[] | (() => void);
91
- /**
92
- * Regular expression that defines the valid format allowed by the input.
93
- * This will be checked both when the input element loses the focus and
94
- * while typing within it. If the string entered does not match the
95
- * pattern, the onBlur and onChange functions will be called with the
96
- * current value and an internal error informing that this value does not
97
- * match the pattern. If the pattern is met, the error parameter of both
98
- * events will be null.
99
- */
100
- pattern?: string;
101
- /**
102
- * Specifies the minimun and maximum length allowed by the input.
103
- * This will be checked both when the input element loses the
104
- * focus and while typing within it. If the string entered does not
105
- * comply the length, the onBlur and onChange functions will be called
106
- * with the current value and an internal error informing that the value
107
- * length does not comply the specified range. If a valid length is
108
- * reached, the error parameter of both events will be null.
109
- */
110
- length?: { min?: number; max?: number };
111
- /**
112
- * HTML autocomplete attribute. Lets the user specify if any permission the user agent has to provide automated assistance in filling out the input value.
113
- * Its value must be one of all the possible values of the HTML autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password', ...
114
- */
115
- autocomplete?: string;
116
- /**
117
- * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
118
- * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
119
- */
120
- margin?: Space | Margin;
121
- /**
122
- * Size of the component ('small' | 'medium' | 'large' | 'fillParent').
123
- */
124
- size?: Size;
125
- /**
126
- * Value of the tabindex attribute.
127
- */
128
- tabIndex?: number;
129
- /**
130
- * Reference to the component.
131
- */
132
- ref?: React.RefObject<HTMLDivElement>;
133
- };
134
-
135
- export default function DxcTextInput(props: Props): JSX.Element;