@dxc-technology/halstack-react 0.0.0-0af2013 → 0.0.0-0bb6041

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 (267) hide show
  1. package/BackgroundColorContext.d.ts +2 -2
  2. package/BackgroundColorContext.js +1 -1
  3. package/HalstackContext.d.ts +1331 -5
  4. package/HalstackContext.js +179 -87
  5. package/accordion/Accordion.js +118 -110
  6. package/accordion/Accordion.stories.tsx +104 -16
  7. package/accordion/Accordion.test.js +10 -11
  8. package/accordion/types.d.ts +2 -1
  9. package/accordion-group/AccordionGroup.d.ts +4 -3
  10. package/accordion-group/AccordionGroup.js +25 -65
  11. package/accordion-group/AccordionGroup.stories.tsx +27 -1
  12. package/accordion-group/AccordionGroup.test.js +21 -46
  13. package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
  14. package/accordion-group/AccordionGroupAccordion.js +43 -0
  15. package/accordion-group/types.d.ts +8 -1
  16. package/alert/Alert.js +9 -10
  17. package/alert/Alert.stories.tsx +28 -0
  18. package/alert/Alert.test.js +1 -1
  19. package/badge/Badge.d.ts +1 -1
  20. package/badge/Badge.js +5 -3
  21. package/badge/types.d.ts +1 -0
  22. package/bleed/Bleed.js +1 -34
  23. package/bleed/Bleed.stories.tsx +95 -95
  24. package/bleed/types.d.ts +1 -1
  25. package/box/Box.js +25 -37
  26. package/box/Box.stories.tsx +15 -0
  27. package/box/Box.test.js +1 -1
  28. package/box/types.d.ts +1 -0
  29. package/bulleted-list/BulletedList.d.ts +7 -0
  30. package/bulleted-list/BulletedList.js +125 -0
  31. package/bulleted-list/BulletedList.stories.tsx +206 -0
  32. package/bulleted-list/types.d.ts +38 -0
  33. package/button/Button.js +52 -73
  34. package/button/Button.stories.tsx +159 -8
  35. package/button/Button.test.js +1 -1
  36. package/button/types.d.ts +5 -5
  37. package/card/Card.js +41 -44
  38. package/card/Card.stories.tsx +12 -13
  39. package/card/Card.test.js +1 -1
  40. package/card/types.d.ts +1 -0
  41. package/checkbox/Checkbox.d.ts +2 -2
  42. package/checkbox/Checkbox.js +97 -101
  43. package/checkbox/Checkbox.stories.tsx +131 -59
  44. package/checkbox/Checkbox.test.js +94 -17
  45. package/checkbox/types.d.ts +4 -0
  46. package/chip/Chip.js +28 -49
  47. package/chip/Chip.stories.tsx +121 -26
  48. package/chip/Chip.test.js +3 -5
  49. package/chip/types.d.ts +1 -1
  50. package/common/OpenSans.css +68 -80
  51. package/common/coreTokens.d.ts +146 -0
  52. package/common/coreTokens.js +167 -0
  53. package/common/utils.d.ts +1 -0
  54. package/common/utils.js +4 -4
  55. package/common/variables.d.ts +1482 -0
  56. package/common/variables.js +1095 -1106
  57. package/date-input/Calendar.d.ts +4 -0
  58. package/date-input/Calendar.js +258 -0
  59. package/date-input/DateInput.js +136 -236
  60. package/date-input/DateInput.stories.tsx +199 -33
  61. package/date-input/DateInput.test.js +494 -138
  62. package/date-input/DatePicker.d.ts +4 -0
  63. package/date-input/DatePicker.js +146 -0
  64. package/date-input/Icons.d.ts +6 -0
  65. package/date-input/Icons.js +75 -0
  66. package/date-input/YearPicker.d.ts +4 -0
  67. package/date-input/YearPicker.js +126 -0
  68. package/date-input/types.d.ts +51 -0
  69. package/dialog/Dialog.js +80 -69
  70. package/dialog/Dialog.stories.tsx +230 -123
  71. package/dialog/Dialog.test.js +334 -5
  72. package/dialog/types.d.ts +1 -0
  73. package/dropdown/Dropdown.d.ts +1 -1
  74. package/dropdown/Dropdown.js +246 -249
  75. package/dropdown/Dropdown.stories.tsx +245 -56
  76. package/dropdown/Dropdown.test.js +507 -110
  77. package/dropdown/DropdownMenu.d.ts +4 -0
  78. package/dropdown/DropdownMenu.js +74 -0
  79. package/dropdown/DropdownMenuItem.d.ts +4 -0
  80. package/dropdown/DropdownMenuItem.js +79 -0
  81. package/dropdown/types.d.ts +23 -3
  82. package/file-input/FileInput.d.ts +2 -2
  83. package/file-input/FileInput.js +180 -223
  84. package/file-input/FileInput.stories.tsx +122 -11
  85. package/file-input/FileInput.test.js +14 -14
  86. package/file-input/FileItem.d.ts +4 -14
  87. package/file-input/FileItem.js +44 -66
  88. package/file-input/types.d.ts +17 -0
  89. package/flex/Flex.d.ts +4 -0
  90. package/flex/Flex.js +71 -0
  91. package/flex/Flex.stories.tsx +112 -0
  92. package/flex/types.d.ts +97 -0
  93. package/footer/Footer.js +12 -12
  94. package/footer/Footer.stories.tsx +99 -1
  95. package/footer/Footer.test.js +14 -26
  96. package/footer/Icons.js +1 -1
  97. package/footer/types.d.ts +2 -1
  98. package/grid/Grid.d.ts +7 -0
  99. package/grid/Grid.js +91 -0
  100. package/grid/Grid.stories.tsx +219 -0
  101. package/grid/types.d.ts +115 -0
  102. package/header/Header.d.ts +3 -2
  103. package/header/Header.js +95 -92
  104. package/header/Header.stories.tsx +152 -9
  105. package/header/Header.test.js +2 -2
  106. package/header/Icons.js +2 -2
  107. package/header/types.d.ts +1 -0
  108. package/heading/Heading.js +1 -1
  109. package/heading/Heading.test.js +1 -1
  110. package/inset/Inset.js +1 -34
  111. package/inset/Inset.stories.tsx +37 -36
  112. package/inset/types.d.ts +1 -1
  113. package/layout/ApplicationLayout.d.ts +16 -6
  114. package/layout/ApplicationLayout.js +71 -118
  115. package/layout/ApplicationLayout.stories.tsx +84 -93
  116. package/layout/Icons.d.ts +5 -0
  117. package/layout/Icons.js +13 -2
  118. package/layout/SidenavContext.d.ts +5 -0
  119. package/layout/SidenavContext.js +19 -0
  120. package/layout/types.d.ts +19 -35
  121. package/link/Link.d.ts +2 -2
  122. package/link/Link.js +26 -52
  123. package/link/Link.stories.tsx +73 -6
  124. package/link/Link.test.js +2 -4
  125. package/link/types.d.ts +5 -6
  126. package/main.d.ts +8 -10
  127. package/main.js +42 -52
  128. package/nav-tabs/NavTabs.d.ts +8 -0
  129. package/nav-tabs/NavTabs.js +122 -0
  130. package/nav-tabs/NavTabs.stories.tsx +274 -0
  131. package/nav-tabs/NavTabs.test.js +82 -0
  132. package/nav-tabs/Tab.d.ts +4 -0
  133. package/nav-tabs/Tab.js +146 -0
  134. package/nav-tabs/types.d.ts +52 -0
  135. package/number-input/NumberInput.test.js +44 -8
  136. package/number-input/types.d.ts +1 -1
  137. package/package.json +17 -21
  138. package/paginator/Icons.d.ts +5 -0
  139. package/paginator/Icons.js +16 -28
  140. package/paginator/Paginator.js +20 -49
  141. package/paginator/Paginator.stories.tsx +24 -0
  142. package/paginator/Paginator.test.js +91 -39
  143. package/paragraph/Paragraph.d.ts +5 -0
  144. package/paragraph/Paragraph.js +38 -0
  145. package/paragraph/Paragraph.stories.tsx +44 -0
  146. package/password-input/PasswordInput.js +7 -4
  147. package/password-input/PasswordInput.test.js +15 -15
  148. package/password-input/types.d.ts +1 -1
  149. package/progress-bar/ProgressBar.js +61 -55
  150. package/progress-bar/ProgressBar.stories.jsx +47 -12
  151. package/progress-bar/ProgressBar.test.js +68 -23
  152. package/quick-nav/QuickNav.js +75 -22
  153. package/quick-nav/QuickNav.stories.tsx +145 -26
  154. package/quick-nav/types.d.ts +1 -1
  155. package/radio-group/Radio.d.ts +1 -1
  156. package/radio-group/Radio.js +46 -31
  157. package/radio-group/RadioGroup.js +37 -36
  158. package/radio-group/RadioGroup.stories.tsx +132 -18
  159. package/radio-group/RadioGroup.test.js +124 -97
  160. package/radio-group/types.d.ts +2 -2
  161. package/resultsetTable/Icons.d.ts +7 -0
  162. package/resultsetTable/Icons.js +51 -0
  163. package/resultsetTable/ResultsetTable.js +49 -108
  164. package/resultsetTable/ResultsetTable.stories.tsx +50 -25
  165. package/resultsetTable/ResultsetTable.test.js +61 -42
  166. package/resultsetTable/types.d.ts +1 -1
  167. package/select/Listbox.d.ts +1 -1
  168. package/select/Listbox.js +37 -16
  169. package/select/Option.js +11 -24
  170. package/select/Select.js +127 -116
  171. package/select/Select.stories.tsx +522 -133
  172. package/select/Select.test.js +474 -303
  173. package/select/types.d.ts +3 -6
  174. package/sidenav/Icons.d.ts +7 -0
  175. package/sidenav/Icons.js +51 -0
  176. package/sidenav/Sidenav.d.ts +6 -5
  177. package/sidenav/Sidenav.js +146 -44
  178. package/sidenav/Sidenav.stories.tsx +251 -151
  179. package/sidenav/Sidenav.test.js +25 -37
  180. package/sidenav/types.d.ts +52 -26
  181. package/slider/Slider.d.ts +2 -2
  182. package/slider/Slider.js +121 -97
  183. package/slider/Slider.stories.tsx +64 -1
  184. package/slider/Slider.test.js +122 -22
  185. package/slider/types.d.ts +4 -0
  186. package/spinner/Spinner.js +18 -24
  187. package/spinner/Spinner.stories.jsx +53 -27
  188. package/spinner/Spinner.test.js +1 -1
  189. package/switch/Switch.d.ts +2 -2
  190. package/switch/Switch.js +140 -70
  191. package/switch/Switch.stories.tsx +41 -30
  192. package/switch/Switch.test.js +145 -18
  193. package/switch/types.d.ts +4 -0
  194. package/table/Table.js +3 -3
  195. package/table/Table.stories.jsx +80 -1
  196. package/table/Table.test.js +2 -2
  197. package/tabs/Tab.d.ts +4 -0
  198. package/tabs/Tab.js +132 -0
  199. package/tabs/Tabs.js +358 -108
  200. package/tabs/Tabs.stories.tsx +119 -5
  201. package/tabs/Tabs.test.js +220 -10
  202. package/tabs/types.d.ts +13 -3
  203. package/tag/Tag.js +8 -10
  204. package/tag/Tag.stories.tsx +14 -1
  205. package/tag/Tag.test.js +1 -1
  206. package/tag/types.d.ts +1 -1
  207. package/text-input/Icons.d.ts +8 -0
  208. package/text-input/Icons.js +60 -0
  209. package/text-input/Suggestion.d.ts +4 -0
  210. package/text-input/Suggestion.js +84 -0
  211. package/text-input/Suggestions.d.ts +4 -0
  212. package/text-input/Suggestions.js +134 -0
  213. package/text-input/TextInput.js +219 -342
  214. package/text-input/TextInput.stories.tsx +280 -185
  215. package/text-input/TextInput.test.js +737 -726
  216. package/text-input/types.d.ts +33 -2
  217. package/textarea/Textarea.js +13 -23
  218. package/textarea/Textarea.stories.jsx +60 -1
  219. package/textarea/Textarea.test.js +2 -4
  220. package/textarea/types.d.ts +1 -1
  221. package/toggle-group/ToggleGroup.d.ts +2 -2
  222. package/toggle-group/ToggleGroup.js +7 -4
  223. package/toggle-group/ToggleGroup.stories.tsx +42 -0
  224. package/toggle-group/ToggleGroup.test.js +1 -1
  225. package/toggle-group/types.d.ts +2 -2
  226. package/typography/Typography.d.ts +4 -0
  227. package/typography/Typography.js +32 -0
  228. package/typography/Typography.stories.tsx +198 -0
  229. package/typography/types.d.ts +18 -0
  230. package/typography/types.js +5 -0
  231. package/useTheme.d.ts +1234 -1
  232. package/useTheme.js +1 -1
  233. package/useTranslatedLabels.d.ts +85 -0
  234. package/useTranslatedLabels.js +20 -0
  235. package/utils/BaseTypography.d.ts +21 -0
  236. package/utils/BaseTypography.js +108 -0
  237. package/utils/FocusLock.d.ts +13 -0
  238. package/utils/FocusLock.js +138 -0
  239. package/wizard/Wizard.js +37 -42
  240. package/wizard/Wizard.stories.tsx +40 -1
  241. package/wizard/Wizard.test.js +1 -1
  242. package/wizard/types.d.ts +3 -3
  243. package/common/RequiredComponent.js +0 -32
  244. package/list/List.d.ts +0 -4
  245. package/list/List.js +0 -47
  246. package/list/List.stories.tsx +0 -95
  247. package/list/types.d.ts +0 -7
  248. package/radio/Radio.d.ts +0 -4
  249. package/radio/Radio.js +0 -173
  250. package/radio/Radio.stories.tsx +0 -192
  251. package/radio/Radio.test.js +0 -71
  252. package/radio/types.d.ts +0 -54
  253. package/row/Row.d.ts +0 -3
  254. package/row/Row.js +0 -127
  255. package/row/Row.stories.tsx +0 -237
  256. package/row/types.d.ts +0 -28
  257. package/stack/Stack.d.ts +0 -3
  258. package/stack/Stack.js +0 -97
  259. package/stack/Stack.stories.tsx +0 -164
  260. package/stack/types.d.ts +0 -24
  261. package/text/Text.d.ts +0 -7
  262. package/text/Text.js +0 -30
  263. package/text/Text.stories.tsx +0 -19
  264. /package/{list → bulleted-list}/types.js +0 -0
  265. /package/{radio → flex}/types.js +0 -0
  266. /package/{row → grid}/types.js +0 -0
  267. /package/{stack → nav-tabs}/types.js +0 -0
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- declare type BackgroundColorContext = "dark" | "light";
3
- declare const BackgroundColorContext: React.Context<BackgroundColorContext>;
2
+ export declare type BackgroundColors = "dark" | "light";
3
+ declare const BackgroundColorContext: React.Context<BackgroundColors>;
4
4
  declare type BackgroundColorProviderPropsType = {
5
5
  color: string;
6
6
  children: React.ReactNode;
@@ -23,7 +23,7 @@ var getColorType = function getColorType(hexColor) {
23
23
  try {
24
24
  if (hexColor) {
25
25
  var hslColor = (0, _color["default"])(hexColor).hsl();
26
- var lightnessColor = hslColor.color[2];
26
+ var lightnessColor = hslColor.lightness();
27
27
  return lightnessColor <= 30 ? "dark" : "light";
28
28
  }
29
29
  } catch (e) {