@dxc-technology/halstack-react 9.0.0 → 9.1.0

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 (126) 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 +59 -67
  5. package/accordion/Accordion.js +6 -11
  6. package/accordion/Accordion.stories.tsx +1 -1
  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.test.js +1 -1
  14. package/bleed/Bleed.stories.tsx +1 -0
  15. package/box/Box.js +2 -2
  16. package/box/Box.test.js +1 -1
  17. package/button/Button.js +2 -3
  18. package/button/Button.stories.tsx +1 -1
  19. package/button/Button.test.js +1 -1
  20. package/button/types.d.ts +3 -3
  21. package/card/Card.js +12 -13
  22. package/card/Card.stories.tsx +12 -13
  23. package/card/Card.test.js +1 -1
  24. package/checkbox/Checkbox.js +3 -3
  25. package/checkbox/Checkbox.test.js +1 -1
  26. package/checkbox/types.d.ts +2 -2
  27. package/chip/Chip.js +2 -4
  28. package/chip/Chip.test.js +3 -5
  29. package/common/utils.d.ts +1 -0
  30. package/common/utils.js +4 -4
  31. package/common/variables.d.ts +1625 -0
  32. package/common/variables.js +2 -2
  33. package/dialog/Dialog.js +1 -1
  34. package/dialog/Dialog.test.js +24 -24
  35. package/dialog/types.d.ts +2 -2
  36. package/dropdown/Dropdown.js +2 -2
  37. package/dropdown/Dropdown.test.js +3 -2
  38. package/dropdown/DropdownMenuItem.js +0 -2
  39. package/dropdown/types.d.ts +3 -3
  40. package/file-input/FileInput.js +1 -2
  41. package/file-input/FileInput.test.js +1 -1
  42. package/flex/Flex.stories.tsx +19 -24
  43. package/footer/Footer.js +6 -8
  44. package/footer/Footer.test.js +14 -26
  45. package/grid/Grid.d.ts +7 -0
  46. package/grid/Grid.js +91 -0
  47. package/grid/Grid.stories.tsx +219 -0
  48. package/grid/types.d.ts +115 -0
  49. package/grid/types.js +5 -0
  50. package/header/Header.d.ts +3 -2
  51. package/header/Header.js +3 -3
  52. package/header/Header.test.js +2 -2
  53. package/header/types.d.ts +2 -2
  54. package/heading/Heading.js +1 -1
  55. package/heading/Heading.test.js +1 -1
  56. package/inset/Inset.stories.tsx +1 -0
  57. package/layout/ApplicationLayout.d.ts +3 -3
  58. package/layout/ApplicationLayout.js +1 -1
  59. package/layout/types.d.ts +2 -3
  60. package/link/Link.js +2 -2
  61. package/link/Link.test.js +2 -4
  62. package/link/types.d.ts +2 -2
  63. package/main.d.ts +2 -1
  64. package/main.js +8 -0
  65. package/nav-tabs/NavTabs.test.js +1 -1
  66. package/nav-tabs/Tab.js +7 -7
  67. package/number-input/NumberInput.test.js +1 -1
  68. package/package.json +2 -2
  69. package/paginator/Paginator.js +1 -3
  70. package/paginator/Paginator.test.js +27 -37
  71. package/paragraph/Paragraph.d.ts +3 -4
  72. package/paragraph/Paragraph.js +5 -5
  73. package/password-input/PasswordInput.test.js +1 -1
  74. package/progress-bar/ProgressBar.d.ts +2 -2
  75. package/progress-bar/ProgressBar.js +1 -1
  76. package/progress-bar/ProgressBar.test.js +1 -1
  77. package/progress-bar/types.d.ts +4 -3
  78. package/radio-group/RadioGroup.test.js +1 -1
  79. package/resultsetTable/ResultsetTable.js +2 -2
  80. package/resultsetTable/ResultsetTable.test.js +1 -1
  81. package/resultsetTable/types.d.ts +3 -3
  82. package/select/Select.js +13 -11
  83. package/select/Select.test.js +59 -59
  84. package/sidenav/Icons.d.ts +7 -0
  85. package/sidenav/Icons.js +51 -0
  86. package/sidenav/Sidenav.d.ts +2 -2
  87. package/sidenav/Sidenav.js +50 -76
  88. package/sidenav/Sidenav.stories.tsx +60 -60
  89. package/sidenav/types.d.ts +21 -18
  90. package/slider/Slider.js +2 -3
  91. package/slider/Slider.test.js +1 -1
  92. package/slider/types.d.ts +2 -2
  93. package/spinner/Spinner.js +15 -21
  94. package/spinner/Spinner.stories.jsx +28 -28
  95. package/spinner/Spinner.test.js +1 -1
  96. package/switch/Switch.js +2 -2
  97. package/switch/Switch.test.js +1 -1
  98. package/switch/types.d.ts +2 -2
  99. package/table/Table.js +2 -2
  100. package/table/Table.test.js +1 -1
  101. package/tabs/Tab.js +9 -10
  102. package/tabs/Tabs.js +11 -17
  103. package/tabs/Tabs.test.js +4 -5
  104. package/tabs/types.d.ts +2 -2
  105. package/tag/Tag.js +7 -9
  106. package/tag/Tag.test.js +1 -1
  107. package/text-input/Suggestion.js +2 -2
  108. package/text-input/TextInput.js +3 -3
  109. package/text-input/TextInput.test.js +1 -2
  110. package/textarea/Textarea.js +3 -4
  111. package/textarea/Textarea.test.js +2 -4
  112. package/toggle-group/ToggleGroup.js +7 -4
  113. package/toggle-group/ToggleGroup.test.js +1 -1
  114. package/toggle-group/types.d.ts +1 -1
  115. package/typography/Typography.d.ts +2 -2
  116. package/typography/Typography.js +14 -113
  117. package/typography/Typography.stories.tsx +1 -1
  118. package/useTheme.d.ts +1234 -1
  119. package/useTheme.js +1 -1
  120. package/useTranslatedLabels.d.ts +84 -1
  121. package/utils/BaseTypography.d.ts +21 -0
  122. package/utils/BaseTypography.js +108 -0
  123. package/utils/FocusLock.js +1 -1
  124. package/wizard/Wizard.js +2 -2
  125. package/wizard/Wizard.test.js +1 -1
  126. package/wizard/types.d.ts +5 -6
@@ -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) {