@dxc-technology/halstack-react 0.0.0-3a65d35 → 0.0.0-3a698b0

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