@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.
- package/accordion/types.d.ts +1 -0
- package/accordion-group/types.d.ts +1 -0
- package/alert/Alert.js +1 -1
- package/box/Box.js +1 -1
- package/box/types.d.ts +1 -0
- package/card/types.d.ts +1 -0
- package/checkbox/Checkbox.js +87 -95
- package/checkbox/Checkbox.test.js +93 -16
- package/checkbox/types.d.ts +2 -2
- package/common/variables.js +1 -1
- package/dialog/Dialog.js +4 -4
- package/dialog/Dialog.stories.tsx +56 -0
- package/dialog/types.d.ts +1 -0
- package/dropdown/Dropdown.js +6 -5
- package/dropdown/Dropdown.test.js +2 -3
- package/dropdown/DropdownMenuItem.js +1 -1
- package/flex/Flex.d.ts +1 -1
- package/flex/Flex.js +31 -19
- package/flex/types.d.ts +14 -3
- package/footer/types.d.ts +1 -0
- package/header/types.d.ts +1 -0
- package/number-input/NumberInput.test.js +1 -1
- package/package.json +6 -6
- package/password-input/PasswordInput.js +4 -2
- package/password-input/PasswordInput.test.js +13 -12
- package/quick-nav/QuickNav.js +11 -12
- package/quick-nav/QuickNav.stories.tsx +97 -19
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +43 -28
- package/radio-group/RadioGroup.js +15 -13
- package/radio-group/RadioGroup.stories.tsx +1 -0
- package/radio-group/RadioGroup.test.js +123 -96
- package/radio-group/types.d.ts +2 -2
- package/select/Listbox.js +0 -1
- package/select/Select.js +3 -1
- package/select/Select.test.js +267 -209
- package/slider/Slider.js +15 -6
- package/switch/Switch.js +91 -81
- package/switch/Switch.test.js +26 -13
- package/table/Table.js +1 -1
- package/tabs-nav/Tab.js +1 -1
- package/tag/Tag.js +1 -1
- package/text-input/Icons.d.ts +8 -0
- package/text-input/Icons.js +60 -0
- package/text-input/Suggestion.js +7 -5
- package/text-input/Suggestions.d.ts +4 -0
- package/text-input/Suggestions.js +134 -0
- package/text-input/TextInput.js +171 -259
- package/text-input/TextInput.stories.tsx +189 -181
- package/text-input/TextInput.test.js +165 -163
- package/text-input/types.d.ts +23 -4
package/text-input/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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
|
|
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;
|