@dxc-technology/halstack-react 0.0.0-64fdce7 → 0.0.0-6501724

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