@dxc-technology/halstack-react 0.0.0-c1253f5 → 0.0.0-c18d61a

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 (107) 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 +5 -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 +10 -3
  9. package/alert/Alert.js +1 -1
  10. package/box/Box.js +1 -1
  11. package/box/types.d.ts +1 -0
  12. package/bulleted-list/types.d.ts +1 -1
  13. package/button/types.d.ts +1 -1
  14. package/card/types.d.ts +1 -0
  15. package/checkbox/Checkbox.js +87 -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 +26 -14
  20. package/date-input/DateInput.js +3 -3
  21. package/dialog/Dialog.js +52 -28
  22. package/dialog/Dialog.stories.tsx +57 -2
  23. package/dialog/Dialog.test.js +34 -4
  24. package/dialog/types.d.ts +3 -2
  25. package/dropdown/Dropdown.d.ts +1 -1
  26. package/dropdown/Dropdown.js +244 -247
  27. package/dropdown/Dropdown.stories.tsx +126 -63
  28. package/dropdown/Dropdown.test.js +509 -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/file-input/FileInput.js +168 -190
  35. package/file-input/FileInput.stories.tsx +38 -6
  36. package/file-input/FileInput.test.js +41 -0
  37. package/file-input/FileItem.d.ts +4 -4
  38. package/file-input/FileItem.js +24 -36
  39. package/flex/Flex.d.ts +1 -1
  40. package/flex/Flex.js +31 -19
  41. package/flex/types.d.ts +14 -3
  42. package/footer/Footer.stories.tsx +8 -1
  43. package/footer/types.d.ts +2 -1
  44. package/header/Header.js +74 -72
  45. package/header/Header.stories.tsx +4 -4
  46. package/header/Icons.js +2 -2
  47. package/header/types.d.ts +3 -2
  48. package/layout/ApplicationLayout.stories.tsx +1 -0
  49. package/link/types.d.ts +1 -1
  50. package/number-input/NumberInput.test.js +38 -1
  51. package/package.json +10 -10
  52. package/paginator/Paginator.js +2 -2
  53. package/paginator/Paginator.test.js +1 -1
  54. package/password-input/PasswordInput.test.js +13 -12
  55. package/progress-bar/ProgressBar.d.ts +2 -2
  56. package/progress-bar/ProgressBar.js +56 -50
  57. package/progress-bar/ProgressBar.stories.jsx +3 -1
  58. package/progress-bar/ProgressBar.test.js +67 -22
  59. package/progress-bar/types.d.ts +3 -4
  60. package/quick-nav/QuickNav.js +11 -12
  61. package/quick-nav/QuickNav.stories.tsx +97 -19
  62. package/radio-group/Radio.d.ts +1 -1
  63. package/radio-group/Radio.js +43 -28
  64. package/radio-group/RadioGroup.js +24 -24
  65. package/radio-group/RadioGroup.stories.tsx +1 -0
  66. package/radio-group/RadioGroup.test.js +123 -96
  67. package/radio-group/types.d.ts +2 -2
  68. package/resultsetTable/ResultsetTable.js +1 -3
  69. package/select/Listbox.d.ts +1 -1
  70. package/select/Listbox.js +25 -2
  71. package/select/Select.js +17 -32
  72. package/select/Select.stories.tsx +6 -5
  73. package/select/Select.test.js +321 -250
  74. package/select/types.d.ts +2 -4
  75. package/sidenav/types.d.ts +1 -1
  76. package/slider/Slider.js +116 -92
  77. package/slider/Slider.stories.tsx +7 -1
  78. package/slider/Slider.test.js +121 -21
  79. package/slider/types.d.ts +2 -2
  80. package/switch/Switch.d.ts +1 -1
  81. package/switch/Switch.js +132 -66
  82. package/switch/Switch.stories.tsx +8 -30
  83. package/switch/Switch.test.js +144 -17
  84. package/switch/types.d.ts +3 -4
  85. package/table/Table.js +1 -1
  86. package/tabs/Tab.d.ts +4 -0
  87. package/tabs/Tab.js +135 -0
  88. package/tabs/Tabs.js +360 -104
  89. package/tabs/Tabs.stories.tsx +74 -0
  90. package/tabs/Tabs.test.js +217 -6
  91. package/tabs/types.d.ts +15 -5
  92. package/tabs-nav/NavTabs.js +5 -5
  93. package/tabs-nav/Tab.js +3 -5
  94. package/tabs-nav/types.d.ts +1 -1
  95. package/tag/Tag.js +1 -1
  96. package/tag/types.d.ts +1 -1
  97. package/text-input/Icons.d.ts +8 -0
  98. package/text-input/Icons.js +60 -0
  99. package/text-input/Suggestion.js +7 -5
  100. package/text-input/Suggestions.d.ts +4 -0
  101. package/text-input/Suggestions.js +134 -0
  102. package/text-input/TextInput.js +189 -282
  103. package/text-input/TextInput.stories.tsx +189 -182
  104. package/text-input/TextInput.test.js +222 -163
  105. package/text-input/types.d.ts +22 -3
  106. package/toggle-group/types.d.ts +1 -1
  107. 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,20 +159,39 @@ 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;
176
190
  highlighted: boolean;
177
191
  };
192
+ export declare type AutosuggestWrapperProps = {
193
+ condition: boolean;
194
+ wrapper: (children: React.ReactNode) => JSX.Element;
195
+ children: React.ReactNode;
196
+ };
178
197
  export default Props;
@@ -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.