@dxc-technology/halstack-react 0.0.0-971b360 → 0.0.0-97eade8

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 (252) hide show
  1. package/BackgroundColorContext.d.ts +2 -2
  2. package/BackgroundColorContext.js +1 -1
  3. package/HalstackContext.d.ts +1329 -5
  4. package/HalstackContext.js +117 -77
  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 +5 -9
  17. package/alert/Alert.stories.tsx +28 -0
  18. package/alert/Alert.test.js +1 -1
  19. package/bleed/Bleed.js +1 -34
  20. package/bleed/Bleed.stories.tsx +95 -95
  21. package/bleed/types.d.ts +1 -1
  22. package/box/Box.d.ts +1 -1
  23. package/box/Box.js +8 -27
  24. package/box/Box.stories.tsx +38 -51
  25. package/box/Box.test.js +1 -1
  26. package/box/types.d.ts +0 -11
  27. package/bulleted-list/BulletedList.d.ts +7 -0
  28. package/bulleted-list/BulletedList.js +125 -0
  29. package/bulleted-list/BulletedList.stories.tsx +206 -0
  30. package/bulleted-list/types.d.ts +38 -0
  31. package/button/Button.js +52 -73
  32. package/button/Button.stories.tsx +159 -8
  33. package/button/Button.test.js +1 -1
  34. package/button/types.d.ts +5 -5
  35. package/card/Card.d.ts +1 -1
  36. package/card/Card.js +43 -63
  37. package/card/Card.stories.tsx +12 -42
  38. package/card/Card.test.js +1 -1
  39. package/card/types.d.ts +1 -6
  40. package/checkbox/Checkbox.d.ts +2 -2
  41. package/checkbox/Checkbox.js +94 -101
  42. package/checkbox/Checkbox.stories.tsx +131 -59
  43. package/checkbox/Checkbox.test.js +94 -17
  44. package/checkbox/types.d.ts +4 -0
  45. package/chip/Chip.js +28 -49
  46. package/chip/Chip.stories.tsx +121 -26
  47. package/chip/Chip.test.js +3 -5
  48. package/chip/types.d.ts +1 -1
  49. package/common/OpenSans.css +68 -80
  50. package/common/coreTokens.d.ts +146 -0
  51. package/common/coreTokens.js +167 -0
  52. package/common/utils.d.ts +1 -0
  53. package/common/utils.js +4 -4
  54. package/common/variables.d.ts +1482 -0
  55. package/common/variables.js +1009 -1118
  56. package/date-input/Calendar.d.ts +4 -0
  57. package/date-input/Calendar.js +258 -0
  58. package/date-input/DateInput.js +134 -237
  59. package/date-input/DateInput.stories.tsx +199 -33
  60. package/date-input/DateInput.test.js +494 -138
  61. package/date-input/DatePicker.d.ts +4 -0
  62. package/date-input/DatePicker.js +146 -0
  63. package/date-input/Icons.d.ts +6 -0
  64. package/date-input/Icons.js +75 -0
  65. package/date-input/YearPicker.d.ts +4 -0
  66. package/date-input/YearPicker.js +126 -0
  67. package/date-input/types.d.ts +51 -0
  68. package/dialog/Dialog.d.ts +1 -1
  69. package/dialog/Dialog.js +72 -79
  70. package/dialog/Dialog.stories.tsx +154 -171
  71. package/dialog/Dialog.test.js +334 -5
  72. package/dialog/types.d.ts +0 -12
  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 +174 -220
  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 +39 -63
  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.d.ts +1 -1
  94. package/footer/Footer.js +8 -23
  95. package/footer/Footer.stories.tsx +26 -16
  96. package/footer/Footer.test.js +14 -26
  97. package/footer/Icons.js +1 -1
  98. package/footer/types.d.ts +1 -6
  99. package/grid/Grid.d.ts +7 -0
  100. package/grid/Grid.js +91 -0
  101. package/grid/Grid.stories.tsx +219 -0
  102. package/grid/types.d.ts +115 -0
  103. package/header/Header.d.ts +3 -2
  104. package/header/Header.js +89 -89
  105. package/header/Header.stories.tsx +152 -9
  106. package/header/Header.test.js +2 -2
  107. package/header/Icons.js +2 -2
  108. package/header/types.d.ts +1 -0
  109. package/heading/Heading.js +1 -1
  110. package/heading/Heading.test.js +1 -1
  111. package/inset/Inset.js +1 -34
  112. package/inset/Inset.stories.tsx +37 -36
  113. package/inset/types.d.ts +1 -1
  114. package/layout/ApplicationLayout.d.ts +15 -6
  115. package/layout/ApplicationLayout.js +38 -66
  116. package/layout/ApplicationLayout.stories.tsx +80 -44
  117. package/layout/types.d.ts +18 -29
  118. package/link/Link.js +4 -4
  119. package/link/Link.stories.tsx +73 -6
  120. package/link/Link.test.js +2 -4
  121. package/link/types.d.ts +3 -3
  122. package/main.d.ts +7 -9
  123. package/main.js +33 -49
  124. package/{tabs-nav → nav-tabs}/NavTabs.d.ts +2 -2
  125. package/{tabs-nav → nav-tabs}/NavTabs.js +13 -16
  126. package/{tabs-nav → nav-tabs}/NavTabs.stories.tsx +110 -6
  127. package/{tabs-nav → nav-tabs}/NavTabs.test.js +1 -1
  128. package/{tabs-nav → nav-tabs}/Tab.js +51 -37
  129. package/{tabs-nav → nav-tabs}/types.d.ts +9 -10
  130. package/number-input/NumberInput.test.js +44 -8
  131. package/package.json +17 -21
  132. package/paginator/Icons.d.ts +5 -0
  133. package/paginator/Icons.js +16 -28
  134. package/paginator/Paginator.js +8 -16
  135. package/paginator/Paginator.stories.tsx +24 -0
  136. package/paginator/Paginator.test.js +91 -39
  137. package/paragraph/Paragraph.d.ts +5 -0
  138. package/paragraph/Paragraph.js +38 -0
  139. package/paragraph/Paragraph.stories.tsx +44 -0
  140. package/password-input/PasswordInput.test.js +14 -13
  141. package/progress-bar/ProgressBar.js +60 -54
  142. package/progress-bar/ProgressBar.stories.jsx +38 -3
  143. package/progress-bar/ProgressBar.test.js +68 -23
  144. package/quick-nav/QuickNav.js +25 -20
  145. package/quick-nav/QuickNav.stories.tsx +145 -26
  146. package/radio-group/Radio.d.ts +1 -1
  147. package/radio-group/Radio.js +46 -31
  148. package/radio-group/RadioGroup.js +31 -32
  149. package/radio-group/RadioGroup.stories.tsx +132 -18
  150. package/radio-group/RadioGroup.test.js +124 -97
  151. package/radio-group/types.d.ts +2 -2
  152. package/resultsetTable/Icons.d.ts +7 -0
  153. package/resultsetTable/Icons.js +51 -0
  154. package/resultsetTable/ResultsetTable.js +49 -108
  155. package/resultsetTable/ResultsetTable.stories.tsx +50 -25
  156. package/resultsetTable/ResultsetTable.test.js +61 -42
  157. package/resultsetTable/types.d.ts +1 -1
  158. package/select/Listbox.d.ts +1 -1
  159. package/select/Listbox.js +33 -16
  160. package/select/Option.js +11 -24
  161. package/select/Select.js +92 -71
  162. package/select/Select.stories.tsx +513 -136
  163. package/select/Select.test.js +413 -305
  164. package/select/types.d.ts +3 -6
  165. package/sidenav/Icons.d.ts +7 -0
  166. package/sidenav/Icons.js +51 -0
  167. package/sidenav/Sidenav.d.ts +6 -5
  168. package/sidenav/Sidenav.js +139 -48
  169. package/sidenav/Sidenav.stories.tsx +251 -151
  170. package/sidenav/Sidenav.test.js +25 -37
  171. package/sidenav/types.d.ts +52 -26
  172. package/slider/Slider.d.ts +2 -2
  173. package/slider/Slider.js +121 -97
  174. package/slider/Slider.stories.tsx +64 -1
  175. package/slider/Slider.test.js +122 -22
  176. package/slider/types.d.ts +4 -0
  177. package/spinner/Spinner.js +17 -23
  178. package/spinner/Spinner.stories.jsx +53 -27
  179. package/spinner/Spinner.test.js +1 -1
  180. package/switch/Switch.d.ts +2 -2
  181. package/switch/Switch.js +137 -70
  182. package/switch/Switch.stories.tsx +41 -30
  183. package/switch/Switch.test.js +145 -18
  184. package/switch/types.d.ts +4 -0
  185. package/table/Table.js +3 -3
  186. package/table/Table.stories.jsx +80 -1
  187. package/table/Table.test.js +2 -2
  188. package/tabs/Tab.d.ts +4 -0
  189. package/tabs/Tab.js +132 -0
  190. package/tabs/Tabs.js +358 -108
  191. package/tabs/Tabs.stories.tsx +119 -5
  192. package/tabs/Tabs.test.js +220 -10
  193. package/tabs/types.d.ts +13 -3
  194. package/tag/Tag.js +8 -10
  195. package/tag/Tag.stories.tsx +14 -1
  196. package/tag/Tag.test.js +1 -1
  197. package/tag/types.d.ts +1 -1
  198. package/text-input/Icons.d.ts +8 -0
  199. package/text-input/Icons.js +60 -0
  200. package/text-input/Suggestion.js +40 -11
  201. package/text-input/Suggestions.d.ts +4 -0
  202. package/text-input/Suggestions.js +134 -0
  203. package/text-input/TextInput.js +199 -296
  204. package/text-input/TextInput.stories.tsx +280 -185
  205. package/text-input/TextInput.test.js +736 -725
  206. package/text-input/types.d.ts +22 -3
  207. package/textarea/Textarea.js +3 -4
  208. package/textarea/Textarea.stories.jsx +60 -1
  209. package/textarea/Textarea.test.js +2 -4
  210. package/toggle-group/ToggleGroup.d.ts +2 -2
  211. package/toggle-group/ToggleGroup.js +7 -4
  212. package/toggle-group/ToggleGroup.stories.tsx +42 -0
  213. package/toggle-group/ToggleGroup.test.js +1 -1
  214. package/toggle-group/types.d.ts +2 -2
  215. package/typography/Typography.d.ts +4 -0
  216. package/typography/Typography.js +32 -0
  217. package/typography/Typography.stories.tsx +198 -0
  218. package/typography/types.d.ts +18 -0
  219. package/typography/types.js +5 -0
  220. package/useTheme.d.ts +1234 -1
  221. package/useTheme.js +1 -1
  222. package/useTranslatedLabels.d.ts +84 -1
  223. package/utils/BaseTypography.d.ts +21 -0
  224. package/utils/BaseTypography.js +108 -0
  225. package/utils/FocusLock.d.ts +13 -0
  226. package/utils/FocusLock.js +138 -0
  227. package/wizard/Wizard.js +10 -17
  228. package/wizard/Wizard.stories.tsx +40 -1
  229. package/wizard/Wizard.test.js +1 -1
  230. package/wizard/types.d.ts +3 -3
  231. package/card/ice-cream.jpg +0 -0
  232. package/common/RequiredComponent.js +0 -32
  233. package/list/List.d.ts +0 -4
  234. package/list/List.js +0 -47
  235. package/list/List.stories.tsx +0 -95
  236. package/list/types.d.ts +0 -7
  237. package/row/Row.d.ts +0 -3
  238. package/row/Row.js +0 -127
  239. package/row/Row.stories.tsx +0 -237
  240. package/row/types.d.ts +0 -28
  241. package/stack/Stack.d.ts +0 -3
  242. package/stack/Stack.js +0 -97
  243. package/stack/Stack.stories.tsx +0 -164
  244. package/stack/types.d.ts +0 -24
  245. package/text/Text.d.ts +0 -7
  246. package/text/Text.js +0 -30
  247. package/text/Text.stories.tsx +0 -19
  248. /package/{list → bulleted-list}/types.js +0 -0
  249. /package/{row → flex}/types.js +0 -0
  250. /package/{stack → grid}/types.js +0 -0
  251. /package/{tabs-nav → nav-tabs}/Tab.d.ts +0 -0
  252. /package/{tabs-nav → 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) {