@dxc-technology/halstack-react 0.0.0-a799608 → 0.0.0-a7fec42

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 (51) hide show
  1. package/accordion/types.d.ts +1 -0
  2. package/accordion-group/types.d.ts +1 -0
  3. package/alert/Alert.js +1 -1
  4. package/box/Box.js +1 -1
  5. package/box/types.d.ts +1 -0
  6. package/card/types.d.ts +1 -0
  7. package/checkbox/Checkbox.js +87 -95
  8. package/checkbox/Checkbox.test.js +93 -16
  9. package/checkbox/types.d.ts +2 -2
  10. package/common/variables.js +1 -1
  11. package/dialog/Dialog.js +4 -4
  12. package/dialog/Dialog.stories.tsx +56 -0
  13. package/dialog/types.d.ts +1 -0
  14. package/dropdown/Dropdown.js +6 -5
  15. package/dropdown/Dropdown.test.js +2 -3
  16. package/dropdown/DropdownMenuItem.js +1 -1
  17. package/flex/Flex.d.ts +1 -1
  18. package/flex/Flex.js +31 -19
  19. package/flex/types.d.ts +14 -3
  20. package/footer/types.d.ts +1 -0
  21. package/header/types.d.ts +1 -0
  22. package/number-input/NumberInput.test.js +1 -1
  23. package/package.json +6 -6
  24. package/password-input/PasswordInput.js +4 -2
  25. package/password-input/PasswordInput.test.js +13 -12
  26. package/quick-nav/QuickNav.js +11 -12
  27. package/quick-nav/QuickNav.stories.tsx +97 -19
  28. package/radio-group/Radio.d.ts +1 -1
  29. package/radio-group/Radio.js +43 -28
  30. package/radio-group/RadioGroup.js +15 -13
  31. package/radio-group/RadioGroup.stories.tsx +1 -0
  32. package/radio-group/RadioGroup.test.js +123 -96
  33. package/radio-group/types.d.ts +2 -2
  34. package/select/Listbox.js +0 -1
  35. package/select/Select.js +3 -1
  36. package/select/Select.test.js +267 -209
  37. package/slider/Slider.js +15 -6
  38. package/switch/Switch.js +91 -81
  39. package/switch/Switch.test.js +26 -13
  40. package/table/Table.js +1 -1
  41. package/tabs-nav/Tab.js +1 -1
  42. package/tag/Tag.js +1 -1
  43. package/text-input/Icons.d.ts +8 -0
  44. package/text-input/Icons.js +60 -0
  45. package/text-input/Suggestion.js +7 -5
  46. package/text-input/Suggestions.d.ts +4 -0
  47. package/text-input/Suggestions.js +134 -0
  48. package/text-input/TextInput.js +171 -259
  49. package/text-input/TextInput.stories.tsx +189 -181
  50. package/text-input/TextInput.test.js +165 -163
  51. package/text-input/types.d.ts +23 -4
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
3
3
  declare type Margin = {
4
4
  top?: Space;
@@ -11,7 +11,7 @@ declare type Action = {
11
11
  /**
12
12
  * This function will be called when the user clicks the action.
13
13
  */
14
- onClick: () => void;
14
+ onClick: (event?: React.MouseEvent<HTMLInputElement>) => void;
15
15
  /**
16
16
  * Icon to be shown in the action.
17
17
  */
@@ -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;