@dxc-technology/halstack-react 0.0.0-453c87a → 0.0.0-456a6f5

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