@dxc-technology/halstack-react 0.0.0-b41d935 → 0.0.0-b4fde6b

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