@dxc-technology/halstack-react 6.0.0 → 6.2.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 (92) hide show
  1. package/accordion/Accordion.js +122 -103
  2. package/accordion/Accordion.stories.tsx +1 -2
  3. package/accordion/Accordion.test.js +9 -10
  4. package/accordion/types.d.ts +4 -4
  5. package/accordion-group/AccordionGroup.js +1 -21
  6. package/accordion-group/AccordionGroup.stories.tsx +27 -1
  7. package/accordion-group/AccordionGroup.test.js +20 -45
  8. package/accordion-group/types.d.ts +9 -3
  9. package/alert/Alert.js +1 -1
  10. package/box/Box.js +1 -1
  11. package/bulleted-list/types.d.ts +1 -1
  12. package/button/Button.js +43 -61
  13. package/button/Button.stories.tsx +9 -0
  14. package/button/types.d.ts +7 -7
  15. package/checkbox/Checkbox.js +88 -95
  16. package/checkbox/Checkbox.test.js +93 -16
  17. package/checkbox/types.d.ts +2 -2
  18. package/chip/types.d.ts +1 -1
  19. package/common/variables.js +23 -10
  20. package/date-input/DateInput.js +3 -3
  21. package/dialog/Dialog.js +52 -28
  22. package/dialog/Dialog.stories.tsx +1 -2
  23. package/dialog/Dialog.test.js +34 -4
  24. package/dialog/types.d.ts +2 -2
  25. package/dropdown/Dropdown.d.ts +1 -1
  26. package/dropdown/Dropdown.js +243 -247
  27. package/dropdown/Dropdown.stories.tsx +126 -63
  28. package/dropdown/Dropdown.test.js +510 -108
  29. package/dropdown/DropdownMenu.d.ts +4 -0
  30. package/dropdown/DropdownMenu.js +80 -0
  31. package/dropdown/DropdownMenuItem.d.ts +4 -0
  32. package/dropdown/DropdownMenuItem.js +92 -0
  33. package/dropdown/types.d.ts +25 -5
  34. package/flex/Flex.js +1 -1
  35. package/flex/types.d.ts +1 -1
  36. package/footer/Footer.stories.tsx +8 -1
  37. package/footer/types.d.ts +1 -1
  38. package/header/Header.js +74 -72
  39. package/header/Header.stories.tsx +4 -4
  40. package/header/Icons.js +2 -2
  41. package/header/types.d.ts +2 -2
  42. package/layout/ApplicationLayout.js +3 -3
  43. package/layout/ApplicationLayout.stories.tsx +1 -0
  44. package/link/Link.js +1 -1
  45. package/link/Link.stories.tsx +12 -5
  46. package/link/types.d.ts +1 -1
  47. package/package.json +10 -10
  48. package/progress-bar/ProgressBar.d.ts +2 -2
  49. package/progress-bar/ProgressBar.js +56 -50
  50. package/progress-bar/ProgressBar.stories.jsx +3 -1
  51. package/progress-bar/ProgressBar.test.js +67 -22
  52. package/progress-bar/types.d.ts +3 -4
  53. package/radio-group/RadioGroup.js +11 -13
  54. package/select/Listbox.d.ts +1 -1
  55. package/select/Listbox.js +25 -2
  56. package/select/Select.js +14 -31
  57. package/select/Select.stories.tsx +6 -5
  58. package/select/Select.test.js +63 -50
  59. package/select/types.d.ts +2 -4
  60. package/sidenav/Sidenav.js +15 -3
  61. package/sidenav/types.d.ts +1 -1
  62. package/slider/Slider.js +114 -93
  63. package/slider/Slider.stories.tsx +7 -1
  64. package/slider/Slider.test.js +121 -21
  65. package/slider/types.d.ts +2 -2
  66. package/switch/Switch.d.ts +1 -1
  67. package/switch/Switch.js +111 -55
  68. package/switch/Switch.stories.tsx +8 -30
  69. package/switch/Switch.test.js +122 -8
  70. package/switch/types.d.ts +3 -4
  71. package/tabs/Tab.d.ts +4 -0
  72. package/tabs/Tab.js +135 -0
  73. package/tabs/Tabs.js +360 -104
  74. package/tabs/Tabs.stories.tsx +74 -0
  75. package/tabs/Tabs.test.js +217 -6
  76. package/tabs/types.d.ts +15 -5
  77. package/tabs-nav/NavTabs.js +5 -5
  78. package/tabs-nav/Tab.js +3 -5
  79. package/tabs-nav/types.d.ts +1 -1
  80. package/tag/Tag.js +1 -1
  81. package/tag/types.d.ts +1 -1
  82. package/text-input/Icons.d.ts +8 -0
  83. package/text-input/Icons.js +60 -0
  84. package/text-input/Suggestion.js +7 -5
  85. package/text-input/Suggestions.d.ts +4 -0
  86. package/text-input/Suggestions.js +134 -0
  87. package/text-input/TextInput.js +115 -222
  88. package/text-input/TextInput.stories.tsx +189 -182
  89. package/text-input/TextInput.test.js +163 -162
  90. package/text-input/types.d.ts +17 -3
  91. package/toggle-group/types.d.ts +1 -1
  92. package/wizard/types.d.ts +1 -1
@@ -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 Action = {
11
11
  /**
12
12
  * This function will be called when the user clicks the action.
@@ -159,17 +159,31 @@ declare type Props = {
159
159
  */
160
160
  tabIndex?: number;
161
161
  };
162
+ /**
163
+ * List of suggestions of an Text Input component.
164
+ */
165
+ export declare type SuggestionsProps = {
166
+ id: string;
167
+ value: string;
168
+ suggestions: string[];
169
+ visualFocusIndex: number;
170
+ highlightedSuggestions: boolean;
171
+ searchHasErrors: boolean;
172
+ isSearching: boolean;
173
+ suggestionOnClick: (suggestion: string) => void;
174
+ getTextInputWidth: () => number;
175
+ };
162
176
  /**
163
177
  * Reference to the component.
164
178
  */
165
179
  export declare type RefType = HTMLDivElement;
166
180
  /**
167
- * Single suggestion of the Autosuggest Text Input component.
181
+ * Single suggestion of an Text Input component.
168
182
  */
169
183
  export declare type SuggestionProps = {
170
184
  id: string;
171
185
  value: string;
172
- onClick: () => void;
186
+ onClick: (suggestion: string) => void;
173
187
  suggestion: string;
174
188
  isLast: boolean;
175
189
  visuallyFocused: boolean;
@@ -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 OptionCommons = {
11
11
  /**
12
12
  * Number with the option inner value.
package/wizard/types.d.ts CHANGED
@@ -6,7 +6,7 @@ export 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 Step = {
11
11
  /**
12
12
  * Step label.