@dxc-technology/halstack-react 0.0.0-c18d61a → 0.0.0-c1a6e05

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 (201) 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 +13 -24
  6. package/accordion/Accordion.stories.tsx +102 -13
  7. package/accordion/Accordion.test.js +1 -1
  8. package/accordion/types.d.ts +3 -3
  9. package/accordion-group/AccordionGroup.d.ts +4 -3
  10. package/accordion-group/AccordionGroup.js +23 -44
  11. package/accordion-group/AccordionGroup.test.js +1 -1
  12. package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
  13. package/accordion-group/AccordionGroupAccordion.js +43 -0
  14. package/accordion-group/types.d.ts +2 -2
  15. package/alert/Alert.js +4 -8
  16. package/alert/Alert.stories.tsx +28 -0
  17. package/alert/Alert.test.js +1 -1
  18. package/bleed/Bleed.stories.tsx +1 -0
  19. package/box/Box.js +3 -5
  20. package/box/Box.stories.tsx +15 -0
  21. package/box/Box.test.js +1 -1
  22. package/bulleted-list/BulletedList.js +4 -2
  23. package/bulleted-list/BulletedList.stories.tsx +7 -1
  24. package/bulleted-list/types.d.ts +31 -4
  25. package/button/Button.js +13 -16
  26. package/button/Button.stories.tsx +151 -9
  27. package/button/Button.test.js +1 -1
  28. package/button/types.d.ts +3 -3
  29. package/card/Card.js +12 -13
  30. package/card/Card.stories.tsx +12 -13
  31. package/card/Card.test.js +1 -1
  32. package/checkbox/Checkbox.d.ts +2 -2
  33. package/checkbox/Checkbox.js +18 -17
  34. package/checkbox/Checkbox.stories.tsx +131 -59
  35. package/checkbox/Checkbox.test.js +1 -1
  36. package/checkbox/types.d.ts +6 -2
  37. package/chip/Chip.js +28 -49
  38. package/chip/Chip.stories.tsx +121 -26
  39. package/chip/Chip.test.js +3 -5
  40. package/common/OpenSans.css +68 -80
  41. package/common/coreTokens.d.ts +146 -0
  42. package/common/coreTokens.js +167 -0
  43. package/common/utils.d.ts +1 -0
  44. package/common/utils.js +4 -4
  45. package/common/variables.d.ts +1482 -0
  46. package/common/variables.js +981 -1129
  47. package/date-input/Calendar.d.ts +4 -0
  48. package/date-input/Calendar.js +258 -0
  49. package/date-input/DateInput.js +134 -237
  50. package/date-input/DateInput.stories.tsx +199 -33
  51. package/date-input/DateInput.test.js +494 -138
  52. package/date-input/DatePicker.d.ts +4 -0
  53. package/date-input/DatePicker.js +146 -0
  54. package/date-input/Icons.d.ts +6 -0
  55. package/date-input/Icons.js +75 -0
  56. package/date-input/YearPicker.d.ts +4 -0
  57. package/date-input/YearPicker.js +126 -0
  58. package/date-input/types.d.ts +51 -0
  59. package/dialog/Dialog.js +61 -74
  60. package/dialog/Dialog.stories.tsx +211 -159
  61. package/dialog/Dialog.test.js +302 -3
  62. package/dialog/types.d.ts +2 -2
  63. package/dropdown/Dropdown.js +37 -37
  64. package/dropdown/Dropdown.stories.tsx +210 -84
  65. package/dropdown/Dropdown.test.js +20 -24
  66. package/dropdown/DropdownMenu.js +12 -18
  67. package/dropdown/DropdownMenuItem.js +4 -17
  68. package/dropdown/types.d.ts +3 -3
  69. package/file-input/FileInput.d.ts +2 -2
  70. package/file-input/FileInput.js +28 -52
  71. package/file-input/FileInput.stories.tsx +96 -17
  72. package/file-input/FileInput.test.js +14 -55
  73. package/file-input/FileItem.d.ts +2 -12
  74. package/file-input/FileItem.js +29 -41
  75. package/file-input/types.d.ts +17 -0
  76. package/flex/Flex.js +4 -2
  77. package/flex/Flex.stories.tsx +35 -26
  78. package/flex/types.d.ts +70 -5
  79. package/footer/Footer.js +6 -8
  80. package/footer/Footer.stories.tsx +91 -0
  81. package/footer/Footer.test.js +14 -26
  82. package/grid/Grid.d.ts +7 -0
  83. package/grid/Grid.js +91 -0
  84. package/grid/Grid.stories.tsx +219 -0
  85. package/grid/types.d.ts +115 -0
  86. package/header/Header.d.ts +3 -2
  87. package/header/Header.js +21 -23
  88. package/header/Header.stories.tsx +149 -6
  89. package/header/Header.test.js +2 -2
  90. package/header/types.d.ts +2 -2
  91. package/heading/Heading.js +1 -1
  92. package/heading/Heading.test.js +1 -1
  93. package/inset/Inset.stories.tsx +2 -1
  94. package/layout/ApplicationLayout.d.ts +3 -3
  95. package/layout/ApplicationLayout.js +1 -1
  96. package/layout/types.d.ts +2 -3
  97. package/link/Link.js +4 -4
  98. package/link/Link.stories.tsx +60 -0
  99. package/link/Link.test.js +2 -4
  100. package/link/types.d.ts +2 -2
  101. package/main.d.ts +3 -2
  102. package/main.js +9 -1
  103. package/{tabs-nav → nav-tabs}/NavTabs.js +1 -1
  104. package/{tabs-nav → nav-tabs}/NavTabs.stories.tsx +96 -6
  105. package/{tabs-nav → nav-tabs}/NavTabs.test.js +1 -1
  106. package/{tabs-nav → nav-tabs}/Tab.js +37 -17
  107. package/nav-tabs/types.js +5 -0
  108. package/number-input/NumberInput.test.js +6 -7
  109. package/package.json +8 -13
  110. package/paginator/Icons.d.ts +5 -0
  111. package/paginator/Icons.js +16 -28
  112. package/paginator/Paginator.js +6 -14
  113. package/paginator/Paginator.stories.tsx +24 -0
  114. package/paginator/Paginator.test.js +44 -47
  115. package/paragraph/Paragraph.d.ts +3 -4
  116. package/paragraph/Paragraph.js +5 -5
  117. package/password-input/PasswordInput.test.js +1 -1
  118. package/progress-bar/ProgressBar.d.ts +2 -2
  119. package/progress-bar/ProgressBar.js +5 -5
  120. package/progress-bar/ProgressBar.stories.jsx +35 -2
  121. package/progress-bar/ProgressBar.test.js +1 -1
  122. package/progress-bar/types.d.ts +4 -3
  123. package/quick-nav/QuickNav.stories.tsx +14 -0
  124. package/radio-group/Radio.js +10 -10
  125. package/radio-group/RadioGroup.js +8 -10
  126. package/radio-group/RadioGroup.stories.tsx +131 -18
  127. package/radio-group/RadioGroup.test.js +1 -1
  128. package/resultsetTable/Icons.d.ts +7 -0
  129. package/resultsetTable/Icons.js +51 -0
  130. package/resultsetTable/ResultsetTable.js +49 -106
  131. package/resultsetTable/ResultsetTable.stories.tsx +50 -25
  132. package/resultsetTable/ResultsetTable.test.js +41 -64
  133. package/resultsetTable/types.d.ts +1 -1
  134. package/select/Listbox.d.ts +1 -1
  135. package/select/Listbox.js +5 -34
  136. package/select/Option.js +11 -24
  137. package/select/Select.js +56 -35
  138. package/select/Select.stories.tsx +494 -150
  139. package/select/Select.test.js +76 -81
  140. package/select/types.d.ts +2 -2
  141. package/sidenav/Icons.d.ts +7 -0
  142. package/sidenav/Icons.js +51 -0
  143. package/sidenav/Sidenav.d.ts +2 -2
  144. package/sidenav/Sidenav.js +66 -96
  145. package/sidenav/Sidenav.stories.tsx +165 -63
  146. package/sidenav/types.d.ts +21 -18
  147. package/slider/Slider.d.ts +2 -2
  148. package/slider/Slider.js +11 -11
  149. package/slider/Slider.stories.tsx +57 -0
  150. package/slider/Slider.test.js +1 -1
  151. package/slider/types.d.ts +6 -2
  152. package/spinner/Spinner.js +17 -23
  153. package/spinner/Spinner.stories.jsx +53 -27
  154. package/spinner/Spinner.test.js +1 -1
  155. package/switch/Switch.d.ts +3 -3
  156. package/switch/Switch.js +7 -6
  157. package/switch/Switch.stories.tsx +33 -0
  158. package/switch/Switch.test.js +1 -1
  159. package/switch/types.d.ts +8 -3
  160. package/table/Table.js +2 -2
  161. package/table/Table.stories.jsx +80 -1
  162. package/table/Table.test.js +2 -2
  163. package/tabs/Tab.js +12 -15
  164. package/tabs/Tabs.js +11 -17
  165. package/tabs/Tabs.stories.tsx +45 -5
  166. package/tabs/Tabs.test.js +4 -5
  167. package/tabs/types.d.ts +2 -2
  168. package/tag/Tag.js +7 -9
  169. package/tag/Tag.stories.tsx +14 -1
  170. package/tag/Tag.test.js +1 -1
  171. package/text-input/Suggestion.js +34 -7
  172. package/text-input/TextInput.js +11 -15
  173. package/text-input/TextInput.stories.tsx +93 -5
  174. package/text-input/TextInput.test.js +587 -635
  175. package/textarea/Textarea.js +3 -4
  176. package/textarea/Textarea.stories.jsx +60 -1
  177. package/textarea/Textarea.test.js +2 -4
  178. package/toggle-group/ToggleGroup.d.ts +2 -2
  179. package/toggle-group/ToggleGroup.js +7 -4
  180. package/toggle-group/ToggleGroup.stories.tsx +42 -0
  181. package/toggle-group/ToggleGroup.test.js +1 -1
  182. package/toggle-group/types.d.ts +1 -1
  183. package/typography/Typography.d.ts +2 -2
  184. package/typography/Typography.js +14 -113
  185. package/typography/Typography.stories.tsx +1 -1
  186. package/useTheme.d.ts +1234 -1
  187. package/useTheme.js +1 -1
  188. package/useTranslatedLabels.d.ts +84 -1
  189. package/utils/BaseTypography.d.ts +21 -0
  190. package/utils/BaseTypography.js +108 -0
  191. package/utils/FocusLock.d.ts +13 -0
  192. package/utils/FocusLock.js +138 -0
  193. package/wizard/Wizard.js +2 -2
  194. package/wizard/Wizard.stories.tsx +20 -0
  195. package/wizard/Wizard.test.js +1 -1
  196. package/wizard/types.d.ts +5 -6
  197. package/common/RequiredComponent.js +0 -32
  198. /package/{tabs-nav → grid}/types.js +0 -0
  199. /package/{tabs-nav → nav-tabs}/NavTabs.d.ts +0 -0
  200. /package/{tabs-nav → nav-tabs}/Tab.d.ts +0 -0
  201. /package/{tabs-nav → nav-tabs}/types.d.ts +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) {