@dxc-technology/halstack-react 0.0.0-c6243ef → 0.0.0-c667373

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 (717) hide show
  1. package/BackgroundColorContext.d.ts +1 -0
  2. package/BackgroundColorContext.js +30 -0
  3. package/HalstackContext.d.ts +1280 -0
  4. package/HalstackContext.js +320 -0
  5. package/README.md +28 -47
  6. package/accordion/Accordion.accessibility.test.d.ts +1 -0
  7. package/accordion/Accordion.accessibility.test.js +71 -0
  8. package/accordion/Accordion.d.ts +4 -0
  9. package/accordion/Accordion.js +168 -0
  10. package/accordion/Accordion.stories.tsx +241 -0
  11. package/accordion/Accordion.test.d.ts +1 -0
  12. package/accordion/Accordion.test.js +56 -0
  13. package/accordion/types.d.ts +57 -0
  14. package/accordion/types.js +5 -0
  15. package/accordion-group/AccordionGroup.accessibility.test.d.ts +1 -0
  16. package/accordion-group/AccordionGroup.accessibility.test.js +82 -0
  17. package/accordion-group/AccordionGroup.d.ts +7 -0
  18. package/accordion-group/AccordionGroup.js +101 -0
  19. package/accordion-group/AccordionGroup.stories.tsx +252 -0
  20. package/accordion-group/AccordionGroup.test.d.ts +1 -0
  21. package/accordion-group/AccordionGroup.test.js +94 -0
  22. package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
  23. package/accordion-group/AccordionGroupAccordion.js +31 -0
  24. package/accordion-group/AccordionGroupContext.d.ts +3 -0
  25. package/accordion-group/AccordionGroupContext.js +8 -0
  26. package/accordion-group/types.d.ts +67 -0
  27. package/accordion-group/types.js +5 -0
  28. package/action-icon/ActionIcon.accessibility.test.d.ts +1 -0
  29. package/action-icon/ActionIcon.accessibility.test.js +63 -0
  30. package/action-icon/ActionIcon.d.ts +4 -0
  31. package/action-icon/ActionIcon.js +48 -0
  32. package/action-icon/ActionIcon.stories.tsx +41 -0
  33. package/action-icon/ActionIcon.test.d.ts +1 -0
  34. package/action-icon/ActionIcon.test.js +64 -0
  35. package/action-icon/types.d.ts +26 -0
  36. package/action-icon/types.js +5 -0
  37. package/alert/Alert.accessibility.test.d.ts +1 -0
  38. package/alert/Alert.accessibility.test.js +95 -0
  39. package/alert/Alert.d.ts +4 -0
  40. package/alert/Alert.js +203 -0
  41. package/alert/Alert.stories.tsx +198 -0
  42. package/alert/Alert.test.d.ts +1 -0
  43. package/alert/Alert.test.js +75 -0
  44. package/alert/types.d.ts +49 -0
  45. package/alert/types.js +5 -0
  46. package/badge/Badge.accessibility.test.d.ts +1 -0
  47. package/badge/Badge.accessibility.test.js +129 -0
  48. package/badge/Badge.d.ts +4 -0
  49. package/badge/Badge.js +161 -0
  50. package/badge/Badge.stories.tsx +210 -0
  51. package/badge/Badge.test.d.ts +1 -0
  52. package/badge/Badge.test.js +30 -0
  53. package/badge/types.d.ts +54 -0
  54. package/badge/types.js +5 -0
  55. package/bar-chart/BarChart.d.ts +4 -0
  56. package/bar-chart/BarChart.js +152 -0
  57. package/bar-chart/BarChart.stories.tsx +281 -0
  58. package/bar-chart/BarChart.test.d.ts +1 -0
  59. package/bar-chart/BarChart.test.js +194 -0
  60. package/bar-chart/theme.d.ts +3 -0
  61. package/bar-chart/theme.js +31 -0
  62. package/bar-chart/types.d.ts +118 -0
  63. package/bar-chart/types.js +5 -0
  64. package/bleed/Bleed.d.ts +3 -0
  65. package/bleed/Bleed.js +43 -0
  66. package/bleed/Bleed.stories.tsx +341 -0
  67. package/bleed/types.d.ts +37 -0
  68. package/bleed/types.js +5 -0
  69. package/box/Box.accessibility.test.d.ts +1 -0
  70. package/box/Box.accessibility.test.js +33 -0
  71. package/box/Box.d.ts +4 -0
  72. package/box/Box.js +75 -0
  73. package/box/Box.stories.tsx +119 -0
  74. package/box/Box.test.d.ts +1 -0
  75. package/box/Box.test.js +13 -0
  76. package/box/types.d.ts +32 -0
  77. package/box/types.js +5 -0
  78. package/breadcrumbs/Breadcrumbs.accessibility.test.d.ts +1 -0
  79. package/breadcrumbs/Breadcrumbs.accessibility.test.js +96 -0
  80. package/breadcrumbs/Breadcrumbs.d.ts +4 -0
  81. package/breadcrumbs/Breadcrumbs.js +79 -0
  82. package/breadcrumbs/Breadcrumbs.stories.tsx +194 -0
  83. package/breadcrumbs/Breadcrumbs.test.d.ts +1 -0
  84. package/breadcrumbs/Breadcrumbs.test.js +168 -0
  85. package/breadcrumbs/Item.d.ts +4 -0
  86. package/breadcrumbs/Item.js +52 -0
  87. package/breadcrumbs/dropdownTheme.d.ts +53 -0
  88. package/breadcrumbs/dropdownTheme.js +62 -0
  89. package/breadcrumbs/types.d.ts +40 -0
  90. package/breadcrumbs/types.js +5 -0
  91. package/bulleted-list/BulletedList.accessibility.test.d.ts +1 -0
  92. package/bulleted-list/BulletedList.accessibility.test.js +119 -0
  93. package/bulleted-list/BulletedList.d.ts +7 -0
  94. package/bulleted-list/BulletedList.js +92 -0
  95. package/bulleted-list/BulletedList.stories.tsx +115 -0
  96. package/bulleted-list/types.d.ts +38 -0
  97. package/bulleted-list/types.js +5 -0
  98. package/button/Button.accessibility.test.d.ts +1 -0
  99. package/button/Button.accessibility.test.js +127 -0
  100. package/button/Button.d.ts +4 -0
  101. package/button/Button.js +121 -0
  102. package/button/Button.stories.tsx +325 -0
  103. package/button/Button.test.d.ts +1 -0
  104. package/button/Button.test.js +38 -0
  105. package/button/types.d.ts +57 -0
  106. package/button/types.js +5 -0
  107. package/card/Card.accessibility.test.d.ts +1 -0
  108. package/card/Card.accessibility.test.js +36 -0
  109. package/card/Card.d.ts +4 -0
  110. package/card/Card.js +121 -0
  111. package/card/Card.stories.tsx +171 -0
  112. package/card/Card.test.d.ts +1 -0
  113. package/card/Card.test.js +39 -0
  114. package/card/types.d.ts +62 -0
  115. package/card/types.js +5 -0
  116. package/checkbox/Checkbox.accessibility.test.d.ts +1 -0
  117. package/checkbox/Checkbox.accessibility.test.js +87 -0
  118. package/checkbox/Checkbox.d.ts +4 -0
  119. package/checkbox/Checkbox.js +212 -0
  120. package/checkbox/Checkbox.stories.tsx +222 -0
  121. package/checkbox/Checkbox.test.d.ts +1 -0
  122. package/checkbox/Checkbox.test.js +199 -0
  123. package/checkbox/types.d.ts +72 -0
  124. package/checkbox/types.js +5 -0
  125. package/chip/Chip.accessibility.test.d.ts +1 -0
  126. package/chip/Chip.accessibility.test.js +67 -0
  127. package/chip/Chip.d.ts +4 -0
  128. package/chip/Chip.js +126 -0
  129. package/chip/Chip.stories.tsx +195 -0
  130. package/chip/Chip.test.d.ts +1 -0
  131. package/chip/Chip.test.js +41 -0
  132. package/chip/types.d.ts +45 -0
  133. package/chip/types.js +5 -0
  134. package/common/coreTokens.d.ts +236 -0
  135. package/common/coreTokens.js +183 -0
  136. package/common/utils.d.ts +1 -0
  137. package/{dist/common → common}/utils.js +6 -12
  138. package/common/variables.d.ts +1432 -0
  139. package/common/variables.js +1298 -0
  140. package/container/Container.d.ts +4 -0
  141. package/container/Container.js +194 -0
  142. package/container/Container.stories.tsx +214 -0
  143. package/container/types.d.ts +176 -0
  144. package/container/types.js +5 -0
  145. package/contextual-menu/ContextualMenu.accessibility.test.d.ts +1 -0
  146. package/contextual-menu/ContextualMenu.accessibility.test.js +98 -0
  147. package/contextual-menu/ContextualMenu.d.ts +5 -0
  148. package/contextual-menu/ContextualMenu.js +136 -0
  149. package/contextual-menu/ContextualMenu.stories.tsx +231 -0
  150. package/contextual-menu/ContextualMenu.test.d.ts +1 -0
  151. package/contextual-menu/ContextualMenu.test.js +247 -0
  152. package/contextual-menu/GroupItem.d.ts +4 -0
  153. package/contextual-menu/GroupItem.js +67 -0
  154. package/contextual-menu/ItemAction.d.ts +4 -0
  155. package/contextual-menu/ItemAction.js +88 -0
  156. package/contextual-menu/MenuItem.d.ts +4 -0
  157. package/contextual-menu/MenuItem.js +29 -0
  158. package/contextual-menu/SingleItem.d.ts +4 -0
  159. package/contextual-menu/SingleItem.js +38 -0
  160. package/contextual-menu/types.d.ts +65 -0
  161. package/contextual-menu/types.js +5 -0
  162. package/date-input/Calendar.d.ts +4 -0
  163. package/date-input/Calendar.js +230 -0
  164. package/date-input/DateInput.accessibility.test.d.ts +1 -0
  165. package/date-input/DateInput.accessibility.test.js +229 -0
  166. package/date-input/DateInput.d.ts +4 -0
  167. package/date-input/DateInput.js +228 -0
  168. package/date-input/DateInput.stories.tsx +291 -0
  169. package/date-input/DateInput.test.d.ts +1 -0
  170. package/date-input/DateInput.test.js +808 -0
  171. package/date-input/DatePicker.d.ts +4 -0
  172. package/date-input/DatePicker.js +121 -0
  173. package/date-input/YearPicker.d.ts +4 -0
  174. package/date-input/YearPicker.js +105 -0
  175. package/date-input/types.d.ts +164 -0
  176. package/date-input/types.js +5 -0
  177. package/dialog/Dialog.accessibility.test.d.ts +1 -0
  178. package/dialog/Dialog.accessibility.test.js +69 -0
  179. package/dialog/Dialog.d.ts +4 -0
  180. package/dialog/Dialog.js +93 -0
  181. package/dialog/Dialog.stories.tsx +369 -0
  182. package/dialog/Dialog.test.d.ts +1 -0
  183. package/dialog/Dialog.test.js +370 -0
  184. package/dialog/types.d.ts +36 -0
  185. package/dialog/types.js +5 -0
  186. package/divider/Divider.accessibility.test.d.ts +1 -0
  187. package/divider/Divider.accessibility.test.js +33 -0
  188. package/divider/Divider.d.ts +4 -0
  189. package/divider/Divider.js +36 -0
  190. package/divider/Divider.stories.tsx +224 -0
  191. package/divider/Divider.test.d.ts +1 -0
  192. package/divider/Divider.test.js +38 -0
  193. package/divider/types.d.ts +21 -0
  194. package/divider/types.js +5 -0
  195. package/dropdown/Dropdown.accessibility.test.d.ts +1 -0
  196. package/dropdown/Dropdown.accessibility.test.js +183 -0
  197. package/dropdown/Dropdown.d.ts +4 -0
  198. package/dropdown/Dropdown.js +320 -0
  199. package/dropdown/Dropdown.stories.tsx +427 -0
  200. package/dropdown/Dropdown.test.d.ts +1 -0
  201. package/dropdown/Dropdown.test.js +628 -0
  202. package/dropdown/DropdownMenu.d.ts +4 -0
  203. package/dropdown/DropdownMenu.js +63 -0
  204. package/dropdown/DropdownMenuItem.d.ts +4 -0
  205. package/dropdown/DropdownMenuItem.js +71 -0
  206. package/dropdown/types.d.ts +96 -0
  207. package/dropdown/types.js +5 -0
  208. package/file-input/FileInput.accessibility.test.d.ts +1 -0
  209. package/file-input/FileInput.accessibility.test.js +167 -0
  210. package/file-input/FileInput.d.ts +4 -0
  211. package/file-input/FileInput.js +438 -0
  212. package/file-input/FileInput.stories.tsx +618 -0
  213. package/file-input/FileInput.test.d.ts +1 -0
  214. package/file-input/FileInput.test.js +404 -0
  215. package/file-input/FileItem.d.ts +4 -0
  216. package/file-input/FileItem.js +125 -0
  217. package/file-input/types.d.ts +125 -0
  218. package/file-input/types.js +5 -0
  219. package/flex/Flex.d.ts +4 -0
  220. package/flex/Flex.js +57 -0
  221. package/flex/Flex.stories.tsx +112 -0
  222. package/flex/types.d.ts +97 -0
  223. package/flex/types.js +5 -0
  224. package/footer/Footer.accessibility.test.d.ts +1 -0
  225. package/footer/Footer.accessibility.test.js +125 -0
  226. package/footer/Footer.d.ts +4 -0
  227. package/footer/Footer.js +140 -0
  228. package/footer/Footer.stories.tsx +208 -0
  229. package/footer/Footer.test.d.ts +1 -0
  230. package/footer/Footer.test.js +85 -0
  231. package/footer/Icons.d.ts +3 -0
  232. package/footer/Icons.js +108 -0
  233. package/footer/types.d.ts +64 -0
  234. package/footer/types.js +5 -0
  235. package/grid/Grid.d.ts +7 -0
  236. package/grid/Grid.js +76 -0
  237. package/grid/Grid.stories.tsx +221 -0
  238. package/grid/types.d.ts +115 -0
  239. package/grid/types.js +5 -0
  240. package/header/Header.accessibility.test.d.ts +1 -0
  241. package/header/Header.accessibility.test.js +94 -0
  242. package/header/Header.d.ts +8 -0
  243. package/header/Header.js +210 -0
  244. package/header/Header.stories.tsx +267 -0
  245. package/header/Header.test.d.ts +1 -0
  246. package/header/Header.test.js +66 -0
  247. package/header/Icons.d.ts +2 -0
  248. package/header/Icons.js +24 -0
  249. package/header/types.d.ts +33 -0
  250. package/header/types.js +5 -0
  251. package/heading/Heading.accessibility.test.d.ts +1 -0
  252. package/heading/Heading.accessibility.test.js +33 -0
  253. package/heading/Heading.d.ts +4 -0
  254. package/{dist/heading → heading}/Heading.js +34 -115
  255. package/heading/Heading.stories.tsx +54 -0
  256. package/heading/Heading.test.d.ts +1 -0
  257. package/heading/Heading.test.js +156 -0
  258. package/heading/types.d.ts +33 -0
  259. package/heading/types.js +5 -0
  260. package/icon/Icon.accessibility.test.d.ts +1 -0
  261. package/icon/Icon.accessibility.test.js +30 -0
  262. package/icon/Icon.d.ts +4 -0
  263. package/icon/Icon.js +33 -0
  264. package/icon/Icon.stories.tsx +28 -0
  265. package/icon/types.d.ts +4 -0
  266. package/icon/types.js +5 -0
  267. package/image/Image.accessibility.test.d.ts +1 -0
  268. package/image/Image.accessibility.test.js +56 -0
  269. package/image/Image.d.ts +4 -0
  270. package/image/Image.js +70 -0
  271. package/image/Image.stories.tsx +129 -0
  272. package/image/types.d.ts +72 -0
  273. package/image/types.js +5 -0
  274. package/inset/Inset.d.ts +3 -0
  275. package/inset/Inset.js +43 -0
  276. package/inset/Inset.stories.tsx +230 -0
  277. package/inset/types.d.ts +37 -0
  278. package/inset/types.js +5 -0
  279. package/layout/ApplicationLayout.d.ts +20 -0
  280. package/layout/ApplicationLayout.js +137 -0
  281. package/layout/ApplicationLayout.stories.tsx +162 -0
  282. package/layout/Icons.d.ts +7 -0
  283. package/layout/Icons.js +48 -0
  284. package/layout/types.d.ts +41 -0
  285. package/layout/types.js +5 -0
  286. package/link/Link.accessibility.test.d.ts +1 -0
  287. package/link/Link.accessibility.test.js +108 -0
  288. package/link/Link.d.ts +4 -0
  289. package/link/Link.js +117 -0
  290. package/link/Link.stories.tsx +253 -0
  291. package/link/Link.test.d.ts +1 -0
  292. package/link/Link.test.js +63 -0
  293. package/link/types.d.ts +54 -0
  294. package/link/types.js +5 -0
  295. package/main.d.ts +50 -0
  296. package/{dist/main.js → main.js} +146 -149
  297. package/nav-tabs/NavTabs.accessibility.test.d.ts +1 -0
  298. package/nav-tabs/NavTabs.accessibility.test.js +44 -0
  299. package/nav-tabs/NavTabs.d.ts +7 -0
  300. package/nav-tabs/NavTabs.js +108 -0
  301. package/nav-tabs/NavTabs.stories.tsx +294 -0
  302. package/nav-tabs/NavTabs.test.d.ts +1 -0
  303. package/nav-tabs/NavTabs.test.js +77 -0
  304. package/nav-tabs/NavTabsContext.d.ts +3 -0
  305. package/nav-tabs/NavTabsContext.js +8 -0
  306. package/nav-tabs/Tab.d.ts +4 -0
  307. package/nav-tabs/Tab.js +117 -0
  308. package/nav-tabs/types.d.ts +52 -0
  309. package/nav-tabs/types.js +5 -0
  310. package/number-input/NumberInput.accessibility.test.d.ts +1 -0
  311. package/number-input/NumberInput.accessibility.test.js +227 -0
  312. package/number-input/NumberInput.d.ts +4 -0
  313. package/number-input/NumberInput.js +89 -0
  314. package/number-input/NumberInput.stories.tsx +126 -0
  315. package/number-input/NumberInput.test.d.ts +1 -0
  316. package/number-input/NumberInput.test.js +988 -0
  317. package/number-input/NumberInputContext.d.ts +3 -0
  318. package/number-input/NumberInputContext.js +8 -0
  319. package/number-input/types.d.ts +136 -0
  320. package/number-input/types.js +5 -0
  321. package/package.json +70 -56
  322. package/paginator/Paginator.accessibility.test.d.ts +1 -0
  323. package/paginator/Paginator.accessibility.test.js +78 -0
  324. package/paginator/Paginator.d.ts +4 -0
  325. package/paginator/Paginator.js +138 -0
  326. package/paginator/Paginator.stories.tsx +87 -0
  327. package/paginator/Paginator.test.d.ts +1 -0
  328. package/paginator/Paginator.test.js +334 -0
  329. package/paginator/types.d.ts +38 -0
  330. package/paginator/types.js +5 -0
  331. package/paragraph/Paragraph.accessibility.test.d.ts +1 -0
  332. package/paragraph/Paragraph.accessibility.test.js +28 -0
  333. package/paragraph/Paragraph.d.ts +5 -0
  334. package/paragraph/Paragraph.js +22 -0
  335. package/paragraph/Paragraph.stories.tsx +27 -0
  336. package/password-input/PasswordInput.accessibility.test.d.ts +1 -0
  337. package/password-input/PasswordInput.accessibility.test.js +152 -0
  338. package/password-input/PasswordInput.d.ts +4 -0
  339. package/password-input/PasswordInput.js +100 -0
  340. package/password-input/PasswordInput.stories.tsx +108 -0
  341. package/password-input/PasswordInput.test.d.ts +1 -0
  342. package/password-input/PasswordInput.test.js +197 -0
  343. package/password-input/types.d.ts +111 -0
  344. package/password-input/types.js +5 -0
  345. package/progress-bar/ProgressBar.accessibility.test.d.ts +1 -0
  346. package/progress-bar/ProgressBar.accessibility.test.js +35 -0
  347. package/progress-bar/ProgressBar.d.ts +4 -0
  348. package/progress-bar/ProgressBar.js +146 -0
  349. package/progress-bar/ProgressBar.stories.tsx +93 -0
  350. package/progress-bar/ProgressBar.test.d.ts +1 -0
  351. package/progress-bar/ProgressBar.test.js +93 -0
  352. package/progress-bar/types.d.ts +37 -0
  353. package/progress-bar/types.js +5 -0
  354. package/quick-nav/QuickNav.accessibility.test.d.ts +1 -0
  355. package/quick-nav/QuickNav.accessibility.test.js +57 -0
  356. package/quick-nav/QuickNav.d.ts +4 -0
  357. package/quick-nav/QuickNav.js +94 -0
  358. package/quick-nav/QuickNav.stories.tsx +356 -0
  359. package/quick-nav/types.d.ts +21 -0
  360. package/quick-nav/types.js +5 -0
  361. package/radio-group/Radio.d.ts +4 -0
  362. package/radio-group/Radio.js +121 -0
  363. package/radio-group/RadioGroup.accessibility.test.d.ts +1 -0
  364. package/radio-group/RadioGroup.accessibility.test.js +97 -0
  365. package/radio-group/RadioGroup.d.ts +4 -0
  366. package/radio-group/RadioGroup.js +233 -0
  367. package/radio-group/RadioGroup.stories.tsx +214 -0
  368. package/radio-group/RadioGroup.test.d.ts +1 -0
  369. package/radio-group/RadioGroup.test.js +754 -0
  370. package/radio-group/types.d.ts +114 -0
  371. package/radio-group/types.js +5 -0
  372. package/resultset-table/Icons.d.ts +7 -0
  373. package/resultset-table/Icons.js +47 -0
  374. package/resultset-table/ResultsetTable.accessibility.test.d.ts +1 -0
  375. package/resultset-table/ResultsetTable.accessibility.test.js +284 -0
  376. package/resultset-table/ResultsetTable.d.ts +7 -0
  377. package/resultset-table/ResultsetTable.js +195 -0
  378. package/resultset-table/ResultsetTable.stories.tsx +413 -0
  379. package/resultset-table/ResultsetTable.test.d.ts +1 -0
  380. package/resultset-table/ResultsetTable.test.js +450 -0
  381. package/resultset-table/types.d.ts +101 -0
  382. package/resultset-table/types.js +5 -0
  383. package/select/Listbox.d.ts +4 -0
  384. package/select/Listbox.js +151 -0
  385. package/select/Option.d.ts +4 -0
  386. package/select/Option.js +89 -0
  387. package/select/Select.accessibility.test.d.ts +1 -0
  388. package/select/Select.accessibility.test.js +227 -0
  389. package/select/Select.d.ts +4 -0
  390. package/select/Select.js +602 -0
  391. package/select/Select.stories.tsx +928 -0
  392. package/select/Select.test.d.ts +1 -0
  393. package/select/Select.test.js +2168 -0
  394. package/select/types.d.ts +209 -0
  395. package/select/types.js +5 -0
  396. package/sidenav/Sidenav.accessibility.test.d.ts +1 -0
  397. package/sidenav/Sidenav.accessibility.test.js +59 -0
  398. package/sidenav/Sidenav.d.ts +10 -0
  399. package/sidenav/Sidenav.js +201 -0
  400. package/sidenav/Sidenav.stories.tsx +277 -0
  401. package/sidenav/Sidenav.test.d.ts +1 -0
  402. package/sidenav/Sidenav.test.js +37 -0
  403. package/sidenav/SidenavContext.d.ts +5 -0
  404. package/sidenav/SidenavContext.js +13 -0
  405. package/sidenav/types.d.ts +76 -0
  406. package/sidenav/types.js +5 -0
  407. package/slider/Slider.accessibility.test.d.ts +1 -0
  408. package/slider/Slider.accessibility.test.js +103 -0
  409. package/slider/Slider.d.ts +4 -0
  410. package/slider/Slider.js +283 -0
  411. package/slider/Slider.stories.tsx +180 -0
  412. package/slider/Slider.test.d.ts +1 -0
  413. package/slider/Slider.test.js +256 -0
  414. package/slider/types.d.ts +86 -0
  415. package/slider/types.js +5 -0
  416. package/spinner/Spinner.accessibility.test.d.ts +1 -0
  417. package/spinner/Spinner.accessibility.test.js +96 -0
  418. package/spinner/Spinner.d.ts +4 -0
  419. package/spinner/Spinner.js +191 -0
  420. package/spinner/Spinner.stories.tsx +129 -0
  421. package/spinner/Spinner.test.d.ts +1 -0
  422. package/spinner/Spinner.test.js +55 -0
  423. package/spinner/types.d.ts +32 -0
  424. package/spinner/types.js +5 -0
  425. package/status-light/StatusLight.accessibility.test.d.ts +1 -0
  426. package/status-light/StatusLight.accessibility.test.js +157 -0
  427. package/status-light/StatusLight.d.ts +4 -0
  428. package/status-light/StatusLight.js +51 -0
  429. package/status-light/StatusLight.stories.tsx +74 -0
  430. package/status-light/StatusLight.test.d.ts +1 -0
  431. package/status-light/StatusLight.test.js +25 -0
  432. package/status-light/types.d.ts +17 -0
  433. package/status-light/types.js +5 -0
  434. package/switch/Switch.accessibility.test.d.ts +1 -0
  435. package/switch/Switch.accessibility.test.js +98 -0
  436. package/switch/Switch.d.ts +4 -0
  437. package/switch/Switch.js +211 -0
  438. package/switch/Switch.stories.tsx +149 -0
  439. package/switch/Switch.test.d.ts +1 -0
  440. package/switch/Switch.test.js +180 -0
  441. package/switch/types.d.ts +66 -0
  442. package/switch/types.js +5 -0
  443. package/table/DropdownTheme.js +62 -0
  444. package/table/Table.accessibility.test.d.ts +1 -0
  445. package/table/Table.accessibility.test.js +92 -0
  446. package/table/Table.d.ts +8 -0
  447. package/table/Table.js +161 -0
  448. package/table/Table.stories.tsx +663 -0
  449. package/table/Table.test.d.ts +1 -0
  450. package/table/Table.test.js +111 -0
  451. package/table/types.d.ts +49 -0
  452. package/table/types.js +5 -0
  453. package/tabs/Tab.d.ts +4 -0
  454. package/tabs/Tab.js +117 -0
  455. package/tabs/Tabs.accessibility.test.d.ts +1 -0
  456. package/tabs/Tabs.accessibility.test.js +56 -0
  457. package/tabs/Tabs.d.ts +4 -0
  458. package/tabs/Tabs.js +373 -0
  459. package/tabs/Tabs.stories.tsx +230 -0
  460. package/tabs/Tabs.test.d.ts +1 -0
  461. package/tabs/Tabs.test.js +276 -0
  462. package/tabs/types.d.ts +92 -0
  463. package/tabs/types.js +5 -0
  464. package/tag/Tag.accessibility.test.d.ts +1 -0
  465. package/tag/Tag.accessibility.test.js +69 -0
  466. package/tag/Tag.d.ts +4 -0
  467. package/tag/Tag.js +151 -0
  468. package/tag/Tag.stories.tsx +152 -0
  469. package/tag/Tag.test.d.ts +1 -0
  470. package/tag/Tag.test.js +41 -0
  471. package/tag/types.d.ts +69 -0
  472. package/tag/types.js +5 -0
  473. package/text-input/Suggestion.d.ts +4 -0
  474. package/text-input/Suggestion.js +67 -0
  475. package/text-input/Suggestions.d.ts +4 -0
  476. package/text-input/Suggestions.js +94 -0
  477. package/text-input/TextInput.accessibility.test.d.ts +1 -0
  478. package/text-input/TextInput.accessibility.test.js +320 -0
  479. package/text-input/TextInput.d.ts +4 -0
  480. package/text-input/TextInput.js +571 -0
  481. package/text-input/TextInput.stories.tsx +477 -0
  482. package/text-input/TextInput.test.d.ts +1 -0
  483. package/text-input/TextInput.test.js +1755 -0
  484. package/text-input/types.d.ts +205 -0
  485. package/text-input/types.js +5 -0
  486. package/textarea/Textarea.accessibility.test.d.ts +1 -0
  487. package/textarea/Textarea.accessibility.test.js +155 -0
  488. package/textarea/Textarea.d.ts +4 -0
  489. package/textarea/Textarea.js +235 -0
  490. package/textarea/Textarea.stories.tsx +174 -0
  491. package/textarea/Textarea.test.d.ts +1 -0
  492. package/textarea/Textarea.test.js +406 -0
  493. package/textarea/types.d.ts +141 -0
  494. package/textarea/types.js +5 -0
  495. package/toggle-group/ToggleGroup.accessibility.test.d.ts +1 -0
  496. package/toggle-group/ToggleGroup.accessibility.test.js +107 -0
  497. package/toggle-group/ToggleGroup.d.ts +4 -0
  498. package/toggle-group/ToggleGroup.js +199 -0
  499. package/toggle-group/ToggleGroup.stories.tsx +218 -0
  500. package/toggle-group/ToggleGroup.test.d.ts +1 -0
  501. package/toggle-group/ToggleGroup.test.js +137 -0
  502. package/toggle-group/types.d.ts +114 -0
  503. package/toggle-group/types.js +5 -0
  504. package/tooltip/Tooltip.accessibility.test.d.ts +1 -0
  505. package/tooltip/Tooltip.accessibility.test.js +144 -0
  506. package/tooltip/Tooltip.d.ts +4 -0
  507. package/tooltip/Tooltip.js +50 -0
  508. package/tooltip/Tooltip.stories.tsx +111 -0
  509. package/tooltip/Tooltip.test.d.ts +1 -0
  510. package/tooltip/Tooltip.test.js +112 -0
  511. package/tooltip/types.d.ts +16 -0
  512. package/tooltip/types.js +5 -0
  513. package/typography/Typography.accessibility.test.d.ts +1 -0
  514. package/typography/Typography.accessibility.test.js +339 -0
  515. package/typography/Typography.d.ts +4 -0
  516. package/typography/Typography.js +23 -0
  517. package/typography/Typography.stories.tsx +196 -0
  518. package/typography/Typography.test.js +23 -0
  519. package/typography/types.d.ts +18 -0
  520. package/typography/types.js +5 -0
  521. package/useTheme.d.ts +1168 -0
  522. package/{dist/useTheme.js → useTheme.js} +4 -11
  523. package/useTranslatedLabels.d.ts +96 -0
  524. package/useTranslatedLabels.js +14 -0
  525. package/utils/BaseTypography.d.ts +21 -0
  526. package/utils/BaseTypography.js +98 -0
  527. package/utils/FocusLock.d.ts +13 -0
  528. package/utils/FocusLock.js +125 -0
  529. package/wizard/Wizard.accessibility.test.d.ts +1 -0
  530. package/wizard/Wizard.accessibility.test.js +55 -0
  531. package/wizard/Wizard.d.ts +4 -0
  532. package/wizard/Wizard.js +239 -0
  533. package/wizard/Wizard.stories.tsx +272 -0
  534. package/wizard/Wizard.test.d.ts +1 -0
  535. package/wizard/Wizard.test.js +114 -0
  536. package/wizard/types.d.ts +64 -0
  537. package/wizard/types.js +5 -0
  538. package/babel.config.js +0 -8
  539. package/dist/BackgroundColorContext.js +0 -46
  540. package/dist/ThemeContext.js +0 -248
  541. package/dist/accordion/Accordion.js +0 -353
  542. package/dist/accordion-group/AccordionGroup.js +0 -186
  543. package/dist/alert/Alert.js +0 -403
  544. package/dist/alert/index.d.ts +0 -51
  545. package/dist/badge/Badge.js +0 -63
  546. package/dist/box/Box.js +0 -156
  547. package/dist/button/Button.js +0 -238
  548. package/dist/card/Card.js +0 -254
  549. package/dist/checkbox/Checkbox.js +0 -300
  550. package/dist/checkbox/Checkbox.stories.js +0 -144
  551. package/dist/checkbox/readme.md +0 -116
  552. package/dist/chip/Chip.js +0 -265
  553. package/dist/common/OpenSans.css +0 -81
  554. package/dist/common/RequiredComponent.js +0 -40
  555. package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
  556. package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  557. package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  558. package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  559. package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
  560. package/dist/common/fonts/OpenSans-Light.ttf +0 -0
  561. package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
  562. package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
  563. package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
  564. package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  565. package/dist/common/variables.js +0 -1569
  566. package/dist/date/Date.js +0 -379
  567. package/dist/date/Date.stories.js +0 -205
  568. package/dist/date/readme.md +0 -73
  569. package/dist/dialog/Dialog.js +0 -218
  570. package/dist/dropdown/Dropdown.js +0 -544
  571. package/dist/file-input/FileInput.js +0 -644
  572. package/dist/file-input/FileItem.js +0 -280
  573. package/dist/file-input/index.d.ts +0 -81
  574. package/dist/footer/Footer.js +0 -395
  575. package/dist/footer/dxc_logo.svg +0 -15
  576. package/dist/footer/readme.md +0 -41
  577. package/dist/header/Header.js +0 -403
  578. package/dist/header/Header.stories.js +0 -176
  579. package/dist/header/close_icon.svg +0 -1
  580. package/dist/header/dxc_logo_black.svg +0 -8
  581. package/dist/header/hamb_menu_black.svg +0 -1
  582. package/dist/header/hamb_menu_white.svg +0 -1
  583. package/dist/header/readme.md +0 -33
  584. package/dist/input-text/InputText.js +0 -707
  585. package/dist/input-text/error.svg +0 -1
  586. package/dist/input-text/readme.md +0 -91
  587. package/dist/layout/ApplicationLayout.js +0 -331
  588. package/dist/layout/facebook.svg +0 -45
  589. package/dist/layout/linkedin.svg +0 -50
  590. package/dist/layout/twitter.svg +0 -53
  591. package/dist/link/Link.js +0 -237
  592. package/dist/link/readme.md +0 -51
  593. package/dist/main.d.ts +0 -8
  594. package/dist/new-date/NewDate.js +0 -400
  595. package/dist/new-date/index.d.ts +0 -95
  596. package/dist/new-select/NewSelect.js +0 -836
  597. package/dist/new-select/index.d.ts +0 -53
  598. package/dist/new-textarea/NewTextarea.js +0 -369
  599. package/dist/new-textarea/index.d.ts +0 -117
  600. package/dist/number/Number.js +0 -136
  601. package/dist/number/NumberContext.js +0 -16
  602. package/dist/number/index.d.ts +0 -113
  603. package/dist/paginator/Paginator.js +0 -289
  604. package/dist/paginator/images/next.svg +0 -3
  605. package/dist/paginator/images/nextPage.svg +0 -3
  606. package/dist/paginator/images/previous.svg +0 -3
  607. package/dist/paginator/images/previousPage.svg +0 -3
  608. package/dist/paginator/readme.md +0 -50
  609. package/dist/password-input/PasswordInput.js +0 -198
  610. package/dist/password-input/index.d.ts +0 -94
  611. package/dist/progress-bar/ProgressBar.js +0 -242
  612. package/dist/progress-bar/ProgressBar.stories.js +0 -280
  613. package/dist/progress-bar/readme.md +0 -63
  614. package/dist/radio/Radio.js +0 -209
  615. package/dist/radio/Radio.stories.js +0 -166
  616. package/dist/radio/readme.md +0 -70
  617. package/dist/resultsetTable/ResultsetTable.js +0 -358
  618. package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
  619. package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
  620. package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
  621. package/dist/select/Select.js +0 -549
  622. package/dist/sidenav/Sidenav.js +0 -179
  623. package/dist/slider/Slider.js +0 -394
  624. package/dist/slider/Slider.stories.js +0 -241
  625. package/dist/slider/readme.md +0 -64
  626. package/dist/spinner/Spinner.js +0 -381
  627. package/dist/spinner/Spinner.stories.js +0 -183
  628. package/dist/spinner/readme.md +0 -65
  629. package/dist/switch/Switch.js +0 -222
  630. package/dist/switch/Switch.stories.js +0 -134
  631. package/dist/switch/readme.md +0 -133
  632. package/dist/table/Table.js +0 -132
  633. package/dist/tabs/Tabs.js +0 -343
  634. package/dist/tabs/Tabs.stories.js +0 -130
  635. package/dist/tabs/readme.md +0 -78
  636. package/dist/tabs-for-sections/TabsForSections.js +0 -92
  637. package/dist/tabs-for-sections/readme.md +0 -78
  638. package/dist/tag/Tag.js +0 -282
  639. package/dist/text-input/TextInput.js +0 -971
  640. package/dist/text-input/index.d.ts +0 -135
  641. package/dist/textarea/Textarea.js +0 -264
  642. package/dist/toggle/Toggle.js +0 -220
  643. package/dist/toggle/Toggle.stories.js +0 -297
  644. package/dist/toggle/readme.md +0 -80
  645. package/dist/toggle-group/ToggleGroup.js +0 -327
  646. package/dist/upload/Upload.js +0 -205
  647. package/dist/upload/Upload.stories.js +0 -72
  648. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -139
  649. package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
  650. package/dist/upload/buttons-upload/upload-button.svg +0 -1
  651. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
  652. package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
  653. package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
  654. package/dist/upload/file-upload/FileToUpload.js +0 -184
  655. package/dist/upload/file-upload/audio-icon.svg +0 -4
  656. package/dist/upload/file-upload/close.svg +0 -4
  657. package/dist/upload/file-upload/file-icon.svg +0 -4
  658. package/dist/upload/file-upload/video-icon.svg +0 -4
  659. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  660. package/dist/upload/readme.md +0 -37
  661. package/dist/upload/transaction/Transaction.js +0 -175
  662. package/dist/upload/transaction/audio-icon-err.svg +0 -4
  663. package/dist/upload/transaction/audio-icon.svg +0 -4
  664. package/dist/upload/transaction/error-icon.svg +0 -4
  665. package/dist/upload/transaction/file-icon-err.svg +0 -4
  666. package/dist/upload/transaction/file-icon.svg +0 -4
  667. package/dist/upload/transaction/image-icon-err.svg +0 -4
  668. package/dist/upload/transaction/image-icon.svg +0 -4
  669. package/dist/upload/transaction/success-icon.svg +0 -4
  670. package/dist/upload/transaction/video-icon-err.svg +0 -4
  671. package/dist/upload/transaction/video-icon.svg +0 -4
  672. package/dist/upload/transactions/Transactions.js +0 -138
  673. package/dist/wizard/Wizard.js +0 -411
  674. package/dist/wizard/invalid_icon.svg +0 -5
  675. package/dist/wizard/valid_icon.svg +0 -5
  676. package/dist/wizard/validation-wrong.svg +0 -6
  677. package/test/Accordion.test.js +0 -33
  678. package/test/AccordionGroup.test.js +0 -125
  679. package/test/Alert.test.js +0 -53
  680. package/test/Box.test.js +0 -10
  681. package/test/Button.test.js +0 -18
  682. package/test/Card.test.js +0 -30
  683. package/test/Checkbox.test.js +0 -45
  684. package/test/Chip.test.js +0 -25
  685. package/test/Date.test.js +0 -393
  686. package/test/Dialog.test.js +0 -23
  687. package/test/Dropdown.test.js +0 -145
  688. package/test/FileInput.test.js +0 -201
  689. package/test/Footer.test.js +0 -99
  690. package/test/Header.test.js +0 -39
  691. package/test/Heading.test.js +0 -35
  692. package/test/InputText.test.js +0 -240
  693. package/test/Link.test.js +0 -43
  694. package/test/NewDate.test.js +0 -232
  695. package/test/NewTextarea.test.js +0 -195
  696. package/test/Number.test.js +0 -257
  697. package/test/Paginator.test.js +0 -177
  698. package/test/PasswordInput.test.js +0 -83
  699. package/test/ProgressBar.test.js +0 -35
  700. package/test/Radio.test.js +0 -37
  701. package/test/ResultsetTable.test.js +0 -329
  702. package/test/Select.test.js +0 -212
  703. package/test/Sidenav.test.js +0 -45
  704. package/test/Slider.test.js +0 -82
  705. package/test/Spinner.test.js +0 -32
  706. package/test/Switch.test.js +0 -45
  707. package/test/Table.test.js +0 -36
  708. package/test/Tabs.test.js +0 -109
  709. package/test/TabsForSections.test.js +0 -34
  710. package/test/Tag.test.js +0 -32
  711. package/test/TextArea.test.js +0 -52
  712. package/test/TextInput.test.js +0 -732
  713. package/test/ToggleGroup.test.js +0 -85
  714. package/test/Upload.test.js +0 -60
  715. package/test/Wizard.test.js +0 -130
  716. package/test/mocks/pngMock.js +0 -1
  717. package/test/mocks/svgMock.js +0 -1
@@ -1,403 +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 _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
15
-
16
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
17
-
18
- var _react = _interopRequireDefault(require("react"));
19
-
20
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
21
-
22
- var _propTypes = _interopRequireDefault(require("prop-types"));
23
-
24
- var _variables = require("../common/variables.js");
25
-
26
- var _utils = require("../common/utils.js");
27
-
28
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
29
-
30
- var _BackgroundColorContext = require("../BackgroundColorContext.js");
31
-
32
- function _templateObject10() {
33
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n border: 1px solid transparent;\n border-radius: 4px;\n box-shadow: 0 0 0 2px transparent;\n padding: 3px;\n margin-left: 12px;\n background-color: transparent;\n color: #000000;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n &:active {\n background-color: ", ";\n }\n"]);
34
-
35
- _templateObject10 = function _templateObject10() {
36
- return data;
37
- };
38
-
39
- return data;
40
- }
41
-
42
- function _templateObject9() {
43
- var data = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1 1 auto;\n padding: ", ";\n overflow-y: auto;\n"]);
44
-
45
- _templateObject9 = function _templateObject9() {
46
- return data;
47
- };
48
-
49
- return data;
50
- }
51
-
52
- function _templateObject8() {
53
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n flex-grow: 1;\n align-items: center;\n overflow: hidden;\n"]);
54
-
55
- _templateObject8 = function _templateObject8() {
56
- return data;
57
- };
58
-
59
- return data;
60
- }
61
-
62
- function _templateObject7() {
63
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n margin-right: 12px;\n padding-right: ", ";\n padding-left: ", ";\n\n color: ", ";\n\n svg {\n width: ", ";\n height: ", ";\n }\n"]);
64
-
65
- _templateObject7 = function _templateObject7() {
66
- return data;
67
- };
68
-
69
- return data;
70
- }
71
-
72
- function _templateObject6() {
73
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: 8px;\n padding-right: ", ";\n padding-left: ", ";\n flex-grow: 1;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n"]);
74
-
75
- _templateObject6 = function _templateObject6() {
76
- return data;
77
- };
78
-
79
- return data;
80
- }
81
-
82
- function _templateObject5() {
83
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-right: 8px;\n padding-right: ", ";\n padding-left: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n"]);
84
-
85
- _templateObject5 = function _templateObject5() {
86
- return data;
87
- };
88
-
89
- return data;
90
- }
91
-
92
- function _templateObject4() {
93
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n height: calc(48px - calc(", " * 2));\n align-items: center;\n width: 100%;\n"]);
94
-
95
- _templateObject4 = function _templateObject4() {
96
- return data;
97
- };
98
-
99
- return data;
100
- }
101
-
102
- function _templateObject3() {
103
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n display: ", ";\n overflow: hidden;\n box-sizing: border-box;\n\n background-color: ", ";\n\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n\n padding-left: 12px;\n padding-right: 12px;\n justify-content: ", ";\n align-items: ", ";\n max-width: ", ";\n width: ", ";\n z-index: ", ";\n"]);
104
-
105
- _templateObject3 = function _templateObject3() {
106
- return data;
107
- };
108
-
109
- return data;
110
- }
111
-
112
- function _templateObject2() {
113
- var data = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n position: ", ";\n top: ", ";\n bottom: ", ";\n left: ", ";\n right: ", ";\n"]);
114
-
115
- _templateObject2 = function _templateObject2() {
116
- return data;
117
- };
118
-
119
- return data;
120
- }
121
-
122
- function _templateObject() {
123
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n width: ", ";\n height: ", ";\n justify-content: ", ";\n align-items: ", ";\n top: ", ";\n left: ", ";\n position: ", ";\n display: ", ";\n z-index: ", ";\n"]);
124
-
125
- _templateObject = function _templateObject() {
126
- return data;
127
- };
128
-
129
- return data;
130
- }
131
-
132
- var alertIcons = {
133
- close: _react["default"].createElement("svg", {
134
- xmlns: "http://www.w3.org/2000/svg",
135
- width: "20",
136
- height: "20",
137
- viewBox: "0 0 24 24",
138
- fill: "currentColor"
139
- }, _react["default"].createElement("path", {
140
- d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
141
- }), _react["default"].createElement("path", {
142
- d: "M0 0h24v24H0z",
143
- fill: "none"
144
- })),
145
- info: _react["default"].createElement("svg", {
146
- xmlns: "http://www.w3.org/2000/svg",
147
- width: "23",
148
- height: "23",
149
- viewBox: "0 0 24 24",
150
- fill: "currentColor"
151
- }, _react["default"].createElement("path", {
152
- d: "M0 0h24v24H0z",
153
- fill: "none"
154
- }), _react["default"].createElement("path", {
155
- d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"
156
- })),
157
- success: _react["default"].createElement("svg", {
158
- xmlns: "http://www.w3.org/2000/svg",
159
- width: "23",
160
- height: "23",
161
- viewBox: "0 0 24 24",
162
- fill: "currentColor"
163
- }, _react["default"].createElement("path", {
164
- d: "M0 0h24v24H0z",
165
- fill: "none"
166
- }), _react["default"].createElement("path", {
167
- d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
168
- })),
169
- warning: _react["default"].createElement("svg", {
170
- xmlns: "http://www.w3.org/2000/svg",
171
- width: "23",
172
- height: "23",
173
- viewBox: "0 0 24 24",
174
- fill: "currentColor"
175
- }, _react["default"].createElement("path", {
176
- d: "M0 0h24v24H0z",
177
- fill: "none"
178
- }), _react["default"].createElement("path", {
179
- d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
180
- })),
181
- error: _react["default"].createElement("svg", {
182
- xmlns: "http://www.w3.org/2000/svg",
183
- width: "23",
184
- height: "23",
185
- viewBox: "0 0 24 24",
186
- fill: "currentColor"
187
- }, _react["default"].createElement("path", {
188
- d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z",
189
- fill: "currentColor"
190
- }), _react["default"].createElement("path", {
191
- d: "M0 0h24v24H0z",
192
- fill: "none"
193
- }))
194
- };
195
-
196
- var DxcAlert = function DxcAlert(_ref) {
197
- var _ref$type = _ref.type,
198
- type = _ref$type === void 0 ? "info" : _ref$type,
199
- _ref$mode = _ref.mode,
200
- mode = _ref$mode === void 0 ? "inline" : _ref$mode,
201
- _ref$inlineText = _ref.inlineText,
202
- inlineText = _ref$inlineText === void 0 ? "" : _ref$inlineText,
203
- onClose = _ref.onClose,
204
- children = _ref.children,
205
- margin = _ref.margin,
206
- _ref$size = _ref.size,
207
- size = _ref$size === void 0 ? "fitContent" : _ref$size,
208
- tabIndex = _ref.tabIndex;
209
- var colorsTheme = (0, _useTheme["default"])();
210
-
211
- var getTypeText = function getTypeText() {
212
- return type === "info" ? "information" : type === "confirm" ? "success" : type === "warning" ? "warning" : "error";
213
- };
214
-
215
- return _react["default"].createElement(_styledComponents.ThemeProvider, {
216
- theme: colorsTheme.alert
217
- }, _react["default"].createElement(AlertModal, {
218
- mode: mode
219
- }, mode === "modal" && _react["default"].createElement(OverlayContainer, {
220
- mode: mode,
221
- onClick: onClose
222
- }), _react["default"].createElement(AlertContainer, {
223
- mode: mode,
224
- type: type,
225
- margin: margin,
226
- size: size
227
- }, _react["default"].createElement(AlertInfo, null, _react["default"].createElement(AlertIcon, {
228
- type: type
229
- }, type === "info" && alertIcons.info || type === "confirm" && alertIcons.success || type === "warning" && alertIcons.warning || type === "error" && alertIcons.error), _react["default"].createElement(AlertText, null, _react["default"].createElement(AlertTitle, {
230
- type: type
231
- }, getTypeText(type)), inlineText && inlineText !== "" && "-", _react["default"].createElement(AlertInlineText, null, inlineText)), onClose && _react["default"].createElement(AlertCloseAction, {
232
- onClick: onClose,
233
- tabIndex: tabIndex
234
- }, alertIcons.close)), children && _react["default"].createElement(AlertContent, null, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
235
- color: type === "info" && colorsTheme.alert.infoBackgroundColor || type === "confirm" && colorsTheme.alert.successBackgroundColor || type === "warning" && colorsTheme.alert.warningBackgroundColor || type === "error" && colorsTheme.alert.errorBackgroundColor
236
- }, children)))));
237
- };
238
-
239
- var sizes = {
240
- small: "280px",
241
- medium: "480px",
242
- large: "820px",
243
- fillParent: "100%",
244
- fitContent: "auto"
245
- };
246
-
247
- var calculateWidth = function calculateWidth(margin, size) {
248
- return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
249
- };
250
-
251
- var AlertModal = _styledComponents["default"].div(_templateObject(), function (props) {
252
- return props.theme.fontSizeBase;
253
- }, function (props) {
254
- return props.mode === "modal" ? "100%" : "";
255
- }, function (props) {
256
- return props.mode === "modal" ? "100%" : "";
257
- }, function (props) {
258
- return props.mode === "modal" ? "center" : "";
259
- }, function (props) {
260
- return props.mode === "modal" ? "center" : "";
261
- }, function (props) {
262
- return props.mode === "modal" ? "0" : "";
263
- }, function (props) {
264
- return props.mode === "modal" ? "0" : "";
265
- }, function (props) {
266
- return props.mode === "modal" ? "fixed" : "";
267
- }, function (props) {
268
- return props.mode === "modal" ? "flex" : "";
269
- }, function (props) {
270
- return props.mode === "modal" ? "1200" : "";
271
- });
272
-
273
- var OverlayContainer = _styledComponents["default"].div(_templateObject2(), function (props) {
274
- return props.mode === "modal" ? "".concat(props.theme.overlayColor) : "transparent";
275
- }, function (props) {
276
- return props.mode === "modal" ? "fixed" : "";
277
- }, function (props) {
278
- return props.mode === "modal" ? "0" : "";
279
- }, function (props) {
280
- return props.mode === "modal" ? "0" : "";
281
- }, function (props) {
282
- return props.mode === "modal" ? "0" : "";
283
- }, function (props) {
284
- return props.mode === "modal" ? "0" : "";
285
- });
286
-
287
- var AlertContainer = _styledComponents["default"].div(_templateObject3(), function (props) {
288
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
289
- }, function (props) {
290
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
291
- }, function (props) {
292
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
293
- }, function (props) {
294
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
295
- }, function (props) {
296
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
297
- }, function (props) {
298
- return props.size === "fitContent" ? "inline-block" : "block";
299
- }, function (props) {
300
- return props.type === "info" && props.theme.infoBackgroundColor || props.type === "confirm" && props.theme.successBackgroundColor || props.type === "warning" && props.theme.warningBackgroundColor || props.type === "error" && props.theme.errorBackgroundColor;
301
- }, function (props) {
302
- return props.theme.borderRadius;
303
- }, function (props) {
304
- return props.theme.borderThickness;
305
- }, function (props) {
306
- return props.theme.borderStyle;
307
- }, function (props) {
308
- return props.type === "info" && props.theme.infoBorderColor || props.type === "confirm" && props.theme.successBorderColor || props.type === "warning" && props.theme.warningBorderColor || props.type === "error" && props.theme.errorBorderColor;
309
- }, function (props) {
310
- return props.mode === "modal" ? "center" : "";
311
- }, function (props) {
312
- return props.mode === "modal" ? "center" : "";
313
- }, function (props) {
314
- return props.size !== "fillParent" && calculateWidth(props.margin, "fillParent");
315
- }, function (props) {
316
- return props.size !== "fillParent" && calculateWidth(props.margin, props.size);
317
- }, function (props) {
318
- return props.mode === "modal" ? "1300" : "";
319
- });
320
-
321
- var AlertInfo = _styledComponents["default"].div(_templateObject4(), function (props) {
322
- return props.theme.borderThickness;
323
- });
324
-
325
- var AlertTitle = _styledComponents["default"].div(_templateObject5(), function (props) {
326
- return props.theme.titlePaddingRight;
327
- }, function (props) {
328
- return props.theme.titlePaddingLeft;
329
- }, function (props) {
330
- return props.theme.titleFontFamily;
331
- }, function (props) {
332
- return props.theme.titleFontSize;
333
- }, function (props) {
334
- return props.theme.titleFontStyle;
335
- }, function (props) {
336
- return props.theme.titleFontWeight;
337
- }, function (props) {
338
- return props.theme.titleFontColor;
339
- }, function (props) {
340
- return props.theme.titleTextTransform;
341
- });
342
-
343
- var AlertInlineText = _styledComponents["default"].div(_templateObject6(), function (props) {
344
- return props.theme.inlineTextPaddingRight;
345
- }, function (props) {
346
- return props.theme.inlineTextPaddingLeft;
347
- }, function (props) {
348
- return props.theme.inlineTextFontFamily;
349
- }, function (props) {
350
- return props.theme.inlineTextFontSize;
351
- }, function (props) {
352
- return props.theme.inlineTextFontStyle;
353
- }, function (props) {
354
- return props.theme.inlineTextFontWeight;
355
- }, function (props) {
356
- return props.theme.inlineTextFontColor;
357
- });
358
-
359
- var AlertIcon = _styledComponents["default"].span(_templateObject7(), function (props) {
360
- return props.theme.iconPaddingRight;
361
- }, function (props) {
362
- return props.theme.iconPaddingLeft;
363
- }, function (props) {
364
- return props.type === "info" && props.theme.infoIconColor || props.type === "confirm" && props.theme.successIconColor || props.type === "warning" && props.theme.warningIconColor || props.type === "error" && props.theme.errorIconColor;
365
- }, function (props) {
366
- return props.theme.iconSize;
367
- }, function (props) {
368
- return props.theme.iconSize;
369
- });
370
-
371
- var AlertText = _styledComponents["default"].div(_templateObject8());
372
-
373
- var AlertContent = _styledComponents["default"].div(_templateObject9(), function (props) {
374
- return "".concat(props.theme.contentPaddingTop, " ").concat(props.theme.contentPaddingRight, " ").concat(props.theme.contentPaddingBottom, " ").concat(props.theme.contentPaddingLeft);
375
- });
376
-
377
- var AlertCloseAction = _styledComponents["default"].button(_templateObject10(), function (props) {
378
- return props.theme.hoverActionBackgroundColor;
379
- }, function (props) {
380
- return props.theme.focusActionBorderColor;
381
- }, function (props) {
382
- return props.theme.focusActionBorderColor;
383
- }, function (props) {
384
- return props.theme.activeActionBackgroundColor;
385
- });
386
-
387
- DxcAlert.propTypes = {
388
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
389
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
390
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
391
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
392
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
393
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
394
- type: _propTypes["default"].oneOf(["info", "confirm", "warning", "error"]),
395
- mode: _propTypes["default"].oneOf(["inline", "modal"]),
396
- inlineText: _propTypes["default"].string,
397
- onClose: _propTypes["default"].func,
398
- children: _propTypes["default"].element,
399
- size: _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes))),
400
- tabIndex: _propTypes["default"].number
401
- };
402
- var _default = DxcAlert;
403
- exports["default"] = _default;
@@ -1,51 +0,0 @@
1
- type Size = "small" | "medium" | "large" | "fillParent" | "fitContent";
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
-
10
- type Props = {
11
- /**
12
- * Uses on of the available alert types.
13
- */
14
- type?: "info" | "confirm" | "warning" | "error";
15
- /**
16
- * Uses on of the available alert modes:
17
- * 'inline': If onClose function is received, close button will be visible and the function will be executed when it's clicked.
18
- * There is no overlay layer. Position should be decided by the user.
19
- * 'modal': The alert will be displayed in the middle of the screen with an overlay layer behind.
20
- * The onClose function will be executed when the X button or the overlay is clicked. d
21
- * The user has the responsibility of hidding the modal in the onClose function, otherwise the modal will remain visible.
22
- */
23
- mode?: "inline" | "modal";
24
- /**
25
- * Text to display after icon and alert type and before content.
26
- */
27
- inlineText?: string;
28
- /**
29
- * This function will be called when the user clicks the close button. If there is no function we should close the alert by default.
30
- */
31
- onClose?: () => void;
32
- /**
33
- * The details section of the alert. Can be used to render custom content in this area.
34
- */
35
- children?: React.ReactNode;
36
- /**
37
- * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
38
- * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
39
- */
40
- margin?: Space | Margin;
41
- /**
42
- * Size of the component ('small' | 'medium' | 'large' | 'fillParent' | 'fitContent').
43
- */
44
- size?: Size;
45
- /**
46
- * Tabindex value given to the close button.
47
- */
48
- tabIndex?: number;
49
- };
50
-
51
- export default function Alert(props: Props): JSX.Element;
@@ -1,63 +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 _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
-
14
- var _react = _interopRequireDefault(require("react"));
15
-
16
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
17
-
18
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
19
-
20
- function _templateObject() {
21
- var data = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n width: ", ";\n height: ", ";\n border-radius: ", ";\n display: flex;\n padding-bottom: 1px;\n padding-right: 1px;\n flex-wrap: wrap;\n box-sizing: border-box;\n align-items: center;\n line-height: 1;\n align-content: center;\n flex-direction: row;\n justify-content: center;\n"]);
22
-
23
- _templateObject = function _templateObject() {
24
- return data;
25
- };
26
-
27
- return data;
28
- }
29
-
30
- var DxcBadge = function DxcBadge(_ref) {
31
- var notificationText = _ref.notificationText;
32
- var colorsTheme = (0, _useTheme["default"])();
33
- return _react["default"].createElement(_styledComponents.ThemeProvider, {
34
- theme: colorsTheme.tabs
35
- }, _react["default"].createElement(StyledDxcBadge, {
36
- notificationText: notificationText
37
- }, _react["default"].createElement("span", null, notificationText)));
38
- };
39
-
40
- var StyledDxcBadge = _styledComponents["default"].div(_templateObject(), function (props) {
41
- return props.theme.badgeBackgroundColor;
42
- }, function (props) {
43
- return props.theme.badgeFontFamily;
44
- }, function (props) {
45
- return props.theme.badgeFontSize;
46
- }, function (props) {
47
- return props.theme.badgeFontStyle;
48
- }, function (props) {
49
- return props.theme.badgeFontWeight;
50
- }, function (props) {
51
- return props.theme.badgeFontColor;
52
- }, function (props) {
53
- return props.theme.badgeLetterSpacing;
54
- }, function (props) {
55
- return props.notificationText === true ? props.theme.badgeWidth : props.theme.badgeWidthWithNotificationNumber;
56
- }, function (props) {
57
- return props.notificationText === true ? props.theme.badgeHeight : props.theme.badgeHeightWithNotificationNumber;
58
- }, function (props) {
59
- return props.notificationText === true ? props.theme.badgeRadius : props.theme.badgeRadiusWithNotificationNumber;
60
- });
61
-
62
- var _default = DxcBadge;
63
- exports["default"] = _default;
package/dist/box/Box.js DELETED
@@ -1,156 +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 _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
15
-
16
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
17
-
18
- var _react = _interopRequireDefault(require("react"));
19
-
20
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
21
-
22
- var _propTypes = _interopRequireDefault(require("prop-types"));
23
-
24
- var _variables = require("../common/variables.js");
25
-
26
- var _utils = require("../common/utils.js");
27
-
28
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
29
-
30
- var _BackgroundColorContext = require("../BackgroundColorContext.js");
31
-
32
- function _templateObject() {
33
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n letter-spacing: ", ";\n overflow: hidden;\n width: ", ";\n background-color: ", ";\n box-shadow: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n"]);
34
-
35
- _templateObject = function _templateObject() {
36
- return data;
37
- };
38
-
39
- return data;
40
- }
41
-
42
- var DxcBox = function DxcBox(_ref) {
43
- var shadowDepth = _ref.shadowDepth,
44
- margin = _ref.margin,
45
- padding = _ref.padding,
46
- _ref$display = _ref.display,
47
- display = _ref$display === void 0 ? "inline-flex" : _ref$display,
48
- children = _ref.children,
49
- _ref$size = _ref.size,
50
- size = _ref$size === void 0 ? "fitContent" : _ref$size;
51
- var colorsTheme = (0, _useTheme["default"])();
52
- return _react["default"].createElement(_styledComponents.ThemeProvider, {
53
- theme: colorsTheme.box
54
- }, _react["default"].createElement(StyledDxcBox, {
55
- shadowDepth: shadowDepth,
56
- display: display,
57
- margin: margin,
58
- padding: padding,
59
- size: size
60
- }, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
61
- color: colorsTheme.box.backgroundColor
62
- }, children)));
63
- };
64
-
65
- var sizes = {
66
- small: "48px",
67
- medium: "240px",
68
- large: "480px",
69
- fillParent: "100%",
70
- fitContent: "unset"
71
- };
72
-
73
- var calculateWidth = function calculateWidth(margin, size, padding) {
74
- if (size === "fillParent") {
75
- return "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), " -\n ").concat((0, _utils.getMargin)(padding, "left"), " - ").concat((0, _utils.getMargin)(padding, "right"), ")");
76
- }
77
-
78
- return sizes[size];
79
- };
80
-
81
- var StyledDxcBox = _styledComponents["default"].div(_templateObject(), function (_ref2) {
82
- var display = _ref2.display;
83
- return display;
84
- }, function (props) {
85
- return props.theme.borderRadius;
86
- }, function (props) {
87
- return props.theme.borderThickness;
88
- }, function (props) {
89
- return props.theme.borderStyle;
90
- }, function (props) {
91
- return props.theme.borderColor;
92
- }, function (props) {
93
- return props.theme.letterSpacing;
94
- }, function (props) {
95
- return calculateWidth(props.margin, props.size, props.padding);
96
- }, function (props) {
97
- return props.theme.backgroundColor;
98
- }, function (props) {
99
- return props.shadowDepth === 1 ? "".concat(props.theme.oneShadowDepthShadowOffsetX, " ").concat(props.theme.oneShadowDepthShadowOffsetY, " ").concat(props.theme.oneShadowDepthShadowBlur, " ").concat(props.theme.oneShadowDepthShadowSpread, " ").concat(props.theme.oneShadowDepthShadowColor) : props.shadowDepth === 2 ? "".concat(props.theme.twoShadowDepthShadowOffsetX, " ").concat(props.theme.twoShadowDepthShadowOffsetY, " ").concat(props.theme.twoShadowDepthShadowBlur, " ").concat(props.theme.twoShadowDepthShadowSpread, " ").concat(props.theme.twoShadowDepthShadowColor) : "".concat(props.theme.noneShadowDepthShadowOffsetX, " ").concat(props.theme.noneShadowDepthShadowOffsetY, " ").concat(props.theme.noneShadowDepthShadowBlur, " ").concat(props.theme.noneShadowDepthShadowSpread, " ").concat(props.theme.noneShadowDepthShadowColor);
100
- }, function (_ref3) {
101
- var margin = _ref3.margin;
102
- return margin && (0, _typeof2["default"])(margin) !== "object" ? _variables.spaces[margin] : "0px";
103
- }, function (_ref4) {
104
- var margin = _ref4.margin;
105
- return margin && margin.top ? _variables.spaces[margin.top] : "";
106
- }, function (_ref5) {
107
- var margin = _ref5.margin;
108
- return margin && margin.right ? _variables.spaces[margin.right] : "";
109
- }, function (_ref6) {
110
- var margin = _ref6.margin;
111
- return margin && margin.bottom ? _variables.spaces[margin.bottom] : "";
112
- }, function (_ref7) {
113
- var margin = _ref7.margin;
114
- return margin && margin.left ? _variables.spaces[margin.left] : "";
115
- }, function (_ref8) {
116
- var padding = _ref8.padding;
117
- return padding && (0, _typeof2["default"])(padding) !== "object" ? _variables.spaces[padding] : "0px";
118
- }, function (_ref9) {
119
- var padding = _ref9.padding;
120
- return padding && padding.top ? _variables.spaces[padding.top] : "";
121
- }, function (_ref10) {
122
- var padding = _ref10.padding;
123
- return padding && padding.right ? _variables.spaces[padding.right] : "";
124
- }, function (_ref11) {
125
- var padding = _ref11.padding;
126
- return padding && padding.bottom ? _variables.spaces[padding.bottom] : "";
127
- }, function (_ref12) {
128
- var padding = _ref12.padding;
129
- return padding && padding.left ? _variables.spaces[padding.left] : "";
130
- });
131
-
132
- DxcBox.propTypes = {
133
- size: _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes))),
134
- display: _propTypes["default"].string,
135
- shadowDepth: _propTypes["default"].oneOf([0, 1, 2]),
136
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
137
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
138
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
139
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
140
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
141
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
142
- padding: _propTypes["default"].oneOfType([_propTypes["default"].shape({
143
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
144
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
145
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
146
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
147
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
148
- };
149
- DxcBox.defaultProps = {
150
- shadowDepth: 2,
151
- display: "inline-flex",
152
- margin: null,
153
- padding: null
154
- };
155
- var _default = DxcBox;
156
- exports["default"] = _default;