@dxc-technology/halstack-react 0.0.0-1d5e7bf → 0.0.0-1da0f40

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 (216) hide show
  1. package/HalstackContext.js +98 -50
  2. package/accordion/Accordion.js +117 -104
  3. package/accordion/Accordion.stories.tsx +103 -15
  4. package/accordion/Accordion.test.js +10 -11
  5. package/accordion/types.d.ts +5 -4
  6. package/accordion-group/AccordionGroup.js +1 -21
  7. package/accordion-group/AccordionGroup.stories.tsx +27 -1
  8. package/accordion-group/AccordionGroup.test.js +21 -46
  9. package/accordion-group/types.d.ts +10 -3
  10. package/alert/Alert.js +1 -1
  11. package/alert/Alert.stories.tsx +28 -0
  12. package/alert/Alert.test.js +1 -1
  13. package/bleed/Bleed.stories.tsx +63 -63
  14. package/box/Box.js +2 -4
  15. package/box/Box.stories.tsx +15 -0
  16. package/box/Box.test.js +1 -1
  17. package/box/types.d.ts +1 -0
  18. package/bulleted-list/BulletedList.d.ts +7 -0
  19. package/bulleted-list/BulletedList.js +123 -0
  20. package/bulleted-list/BulletedList.stories.tsx +200 -0
  21. package/bulleted-list/types.d.ts +11 -0
  22. package/button/Button.js +50 -70
  23. package/button/Button.stories.tsx +159 -8
  24. package/button/Button.test.js +1 -1
  25. package/button/types.d.ts +7 -7
  26. package/card/Card.test.js +1 -1
  27. package/card/types.d.ts +1 -0
  28. package/checkbox/Checkbox.d.ts +2 -2
  29. package/checkbox/Checkbox.js +92 -99
  30. package/checkbox/Checkbox.stories.tsx +131 -59
  31. package/checkbox/Checkbox.test.js +94 -17
  32. package/checkbox/types.d.ts +6 -2
  33. package/chip/Chip.js +16 -22
  34. package/chip/Chip.stories.tsx +96 -9
  35. package/chip/Chip.test.js +3 -5
  36. package/chip/types.d.ts +1 -1
  37. package/common/variables.js +333 -299
  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 +79 -68
  51. package/dialog/Dialog.stories.tsx +230 -123
  52. package/dialog/Dialog.test.js +334 -5
  53. package/dialog/types.d.ts +3 -2
  54. package/dropdown/Dropdown.d.ts +1 -1
  55. package/dropdown/Dropdown.js +246 -249
  56. package/dropdown/Dropdown.stories.tsx +245 -56
  57. package/dropdown/Dropdown.test.js +507 -110
  58. package/dropdown/DropdownMenu.d.ts +4 -0
  59. package/dropdown/DropdownMenu.js +70 -0
  60. package/dropdown/DropdownMenuItem.d.ts +4 -0
  61. package/dropdown/DropdownMenuItem.js +81 -0
  62. package/dropdown/types.d.ts +25 -5
  63. package/file-input/FileInput.d.ts +2 -2
  64. package/file-input/FileInput.js +174 -219
  65. package/file-input/FileInput.stories.tsx +122 -11
  66. package/file-input/FileInput.test.js +14 -14
  67. package/file-input/FileItem.d.ts +4 -14
  68. package/file-input/FileItem.js +39 -63
  69. package/file-input/types.d.ts +17 -0
  70. package/flex/Flex.d.ts +4 -0
  71. package/flex/Flex.js +69 -0
  72. package/flex/Flex.stories.tsx +103 -0
  73. package/flex/types.d.ts +32 -0
  74. package/footer/Footer.stories.tsx +99 -1
  75. package/footer/Footer.test.js +14 -26
  76. package/footer/types.d.ts +2 -1
  77. package/header/Header.js +87 -87
  78. package/header/Header.stories.tsx +152 -9
  79. package/header/Header.test.js +2 -2
  80. package/header/Icons.js +2 -2
  81. package/header/types.d.ts +3 -2
  82. package/heading/Heading.test.js +1 -1
  83. package/inset/Inset.stories.tsx +4 -4
  84. package/layout/ApplicationLayout.d.ts +15 -6
  85. package/layout/ApplicationLayout.js +36 -64
  86. package/layout/ApplicationLayout.stories.tsx +80 -44
  87. package/layout/types.d.ts +17 -27
  88. package/link/Link.js +2 -2
  89. package/link/Link.stories.tsx +72 -5
  90. package/link/Link.test.js +2 -4
  91. package/link/types.d.ts +1 -1
  92. package/main.d.ts +6 -10
  93. package/main.js +28 -60
  94. package/{tabs-nav → nav-tabs}/NavTabs.js +6 -6
  95. package/{tabs-nav → nav-tabs}/NavTabs.stories.tsx +96 -6
  96. package/{tabs-nav → nav-tabs}/NavTabs.test.js +1 -1
  97. package/{tabs-nav → nav-tabs}/Tab.js +38 -20
  98. package/{tabs-nav → nav-tabs}/types.d.ts +1 -1
  99. package/number-input/NumberInput.test.js +44 -8
  100. package/package.json +16 -21
  101. package/paginator/Icons.d.ts +5 -0
  102. package/paginator/Icons.js +16 -28
  103. package/paginator/Paginator.js +6 -12
  104. package/paginator/Paginator.stories.tsx +24 -0
  105. package/paginator/Paginator.test.js +45 -48
  106. package/paragraph/Paragraph.d.ts +6 -0
  107. package/paragraph/Paragraph.js +38 -0
  108. package/paragraph/Paragraph.stories.tsx +44 -0
  109. package/password-input/PasswordInput.test.js +14 -13
  110. package/progress-bar/ProgressBar.d.ts +2 -2
  111. package/progress-bar/ProgressBar.js +59 -53
  112. package/progress-bar/ProgressBar.stories.jsx +38 -3
  113. package/progress-bar/ProgressBar.test.js +68 -23
  114. package/progress-bar/types.d.ts +3 -4
  115. package/quick-nav/QuickNav.js +17 -16
  116. package/quick-nav/QuickNav.stories.tsx +124 -32
  117. package/radio-group/Radio.d.ts +1 -1
  118. package/radio-group/Radio.js +43 -28
  119. package/radio-group/RadioGroup.js +24 -24
  120. package/radio-group/RadioGroup.stories.tsx +132 -18
  121. package/radio-group/RadioGroup.test.js +124 -97
  122. package/radio-group/types.d.ts +2 -2
  123. package/resultsetTable/Icons.d.ts +7 -0
  124. package/resultsetTable/Icons.js +51 -0
  125. package/resultsetTable/ResultsetTable.js +48 -107
  126. package/resultsetTable/ResultsetTable.stories.tsx +50 -25
  127. package/resultsetTable/ResultsetTable.test.js +41 -64
  128. package/resultsetTable/types.d.ts +2 -2
  129. package/select/Listbox.js +4 -10
  130. package/select/Option.js +11 -24
  131. package/select/Select.js +54 -50
  132. package/select/Select.stories.tsx +494 -149
  133. package/select/Select.test.js +393 -327
  134. package/select/types.d.ts +3 -5
  135. package/sidenav/Sidenav.d.ts +6 -5
  136. package/sidenav/Sidenav.js +174 -55
  137. package/sidenav/Sidenav.stories.tsx +249 -149
  138. package/sidenav/Sidenav.test.js +25 -37
  139. package/sidenav/types.d.ts +50 -27
  140. package/slider/Slider.d.ts +2 -2
  141. package/slider/Slider.js +120 -95
  142. package/slider/Slider.stories.tsx +64 -1
  143. package/slider/Slider.test.js +122 -22
  144. package/slider/types.d.ts +6 -2
  145. package/spinner/Spinner.js +2 -2
  146. package/spinner/Spinner.stories.jsx +27 -1
  147. package/spinner/Spinner.test.js +1 -1
  148. package/switch/Switch.d.ts +2 -2
  149. package/switch/Switch.js +135 -68
  150. package/switch/Switch.stories.tsx +41 -30
  151. package/switch/Switch.test.js +145 -18
  152. package/switch/types.d.ts +6 -2
  153. package/table/Table.js +1 -1
  154. package/table/Table.stories.jsx +80 -1
  155. package/table/Table.test.js +2 -2
  156. package/tabs/Tab.d.ts +4 -0
  157. package/tabs/Tab.js +133 -0
  158. package/tabs/Tabs.js +360 -104
  159. package/tabs/Tabs.stories.tsx +119 -5
  160. package/tabs/Tabs.test.js +217 -7
  161. package/tabs/types.d.ts +15 -5
  162. package/tag/Tag.js +1 -1
  163. package/tag/Tag.stories.tsx +14 -1
  164. package/tag/Tag.test.js +1 -1
  165. package/tag/types.d.ts +1 -1
  166. package/text-input/Icons.d.ts +8 -0
  167. package/text-input/Icons.js +60 -0
  168. package/text-input/Suggestion.js +38 -9
  169. package/text-input/Suggestions.d.ts +4 -0
  170. package/text-input/Suggestions.js +134 -0
  171. package/text-input/TextInput.js +195 -292
  172. package/text-input/TextInput.stories.tsx +280 -185
  173. package/text-input/TextInput.test.js +736 -725
  174. package/text-input/types.d.ts +22 -3
  175. package/textarea/Textarea.stories.jsx +60 -1
  176. package/textarea/Textarea.test.js +1 -1
  177. package/toggle-group/ToggleGroup.stories.tsx +42 -0
  178. package/toggle-group/ToggleGroup.test.js +1 -1
  179. package/toggle-group/types.d.ts +1 -1
  180. package/typography/Typography.d.ts +4 -0
  181. package/typography/Typography.js +131 -0
  182. package/typography/Typography.stories.tsx +198 -0
  183. package/typography/types.d.ts +18 -0
  184. package/utils/FocusLock.d.ts +13 -0
  185. package/utils/FocusLock.js +139 -0
  186. package/wizard/Wizard.js +9 -16
  187. package/wizard/Wizard.stories.tsx +40 -1
  188. package/wizard/Wizard.test.js +1 -1
  189. package/wizard/types.d.ts +5 -4
  190. package/common/RequiredComponent.js +0 -32
  191. package/inline/Inline.d.ts +0 -4
  192. package/inline/Inline.js +0 -60
  193. package/inline/Inline.stories.tsx +0 -319
  194. package/inline/types.d.ts +0 -36
  195. package/list/List.d.ts +0 -4
  196. package/list/List.js +0 -47
  197. package/list/List.stories.tsx +0 -89
  198. package/list/types.d.ts +0 -7
  199. package/row/Row.d.ts +0 -3
  200. package/row/Row.js +0 -127
  201. package/row/Row.stories.tsx +0 -237
  202. package/row/types.d.ts +0 -28
  203. package/stack/Stack.d.ts +0 -4
  204. package/stack/Stack.js +0 -56
  205. package/stack/Stack.stories.tsx +0 -263
  206. package/stack/types.d.ts +0 -32
  207. package/tabs-nav/types.js +0 -5
  208. package/text/Text.d.ts +0 -7
  209. package/text/Text.js +0 -30
  210. package/text/Text.stories.tsx +0 -19
  211. /package/{inline → bulleted-list}/types.js +0 -0
  212. /package/{list → flex}/types.js +0 -0
  213. /package/{tabs-nav → nav-tabs}/NavTabs.d.ts +0 -0
  214. /package/{tabs-nav → nav-tabs}/Tab.d.ts +0 -0
  215. /package/{row → nav-tabs}/types.js +0 -0
  216. /package/{stack → typography}/types.js +0 -0
package/chip/Chip.test.js CHANGED
@@ -6,9 +6,7 @@ var _react = _interopRequireDefault(require("react"));
6
6
 
7
7
  var _react2 = require("@testing-library/react");
8
8
 
9
- var _Chip = _interopRequireDefault(require("./Chip"));
10
-
11
- var _invision = _interopRequireDefault(require("../../app/src/images/invision.svg"));
9
+ var _Chip = _interopRequireDefault(require("./Chip.tsx"));
12
10
 
13
11
  describe("Chip component tests", function () {
14
12
  test("Chip renders with correct text", function () {
@@ -24,7 +22,7 @@ describe("Chip component tests", function () {
24
22
 
25
23
  var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Chip["default"], {
26
24
  label: "Chip",
27
- prefixIcon: _invision["default"],
25
+ prefixIcon: "https://developer.apple.com/design/human-interface-guidelines/foundations/app-icons/images/icon-and-image-large-icon-settings_2x.png",
28
26
  onClickPrefix: onClick
29
27
  })),
30
28
  getByText = _render2.getByText,
@@ -41,7 +39,7 @@ describe("Chip component tests", function () {
41
39
 
42
40
  var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Chip["default"], {
43
41
  label: "Chip",
44
- suffixIcon: _invision["default"],
42
+ suffixIcon: "https://developer.apple.com/design/human-interface-guidelines/foundations/app-icons/images/icon-and-image-large-icon-settings_2x.png",
45
43
  onClickSuffix: onClick
46
44
  })),
47
45
  getByText = _render3.getByText,
package/chip/types.d.ts CHANGED
@@ -6,7 +6,7 @@ declare type Margin = {
6
6
  left?: Space;
7
7
  right?: Space;
8
8
  };
9
- declare type SVG = React.SVGProps<SVGSVGElement>;
9
+ declare type SVG = React.ReactNode & React.SVGProps<SVGSVGElement>;
10
10
  declare type Props = {
11
11
  /**
12
12
  * Text to be placed on the chip.