@commercetools-uikit/selectable-search-input 19.9.0 → 19.10.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.
@@ -582,7 +582,7 @@ SelectableSearchInput.getDropdownId = getDropdownName;
582
582
  var SelectableSearchInput$1 = SelectableSearchInput;
583
583
 
584
584
  // NOTE: This string will be replaced on build time with the package version.
585
- var version = "19.9.0";
585
+ var version = "19.10.0";
586
586
 
587
587
  exports["default"] = SelectableSearchInput$1;
588
588
  exports.version = version;
@@ -516,7 +516,7 @@ SelectableSearchInput.getDropdownId = getDropdownName;
516
516
  var SelectableSearchInput$1 = SelectableSearchInput;
517
517
 
518
518
  // NOTE: This string will be replaced on build time with the package version.
519
- var version = "19.9.0";
519
+ var version = "19.10.0";
520
520
 
521
521
  exports["default"] = SelectableSearchInput$1;
522
522
  exports.version = version;
@@ -555,6 +555,6 @@ SelectableSearchInput.getDropdownId = getDropdownName;
555
555
  var SelectableSearchInput$1 = SelectableSearchInput;
556
556
 
557
557
  // NOTE: This string will be replaced on build time with the package version.
558
- var version = "19.9.0";
558
+ var version = "19.10.0";
559
559
 
560
560
  export { SelectableSearchInput$1 as default, version };
@@ -22,42 +22,176 @@ export type TOptionObject = {
22
22
  };
23
23
  export type TOptions = TOption[] | TOptionObject[];
24
24
  export type TSelectableSearchInputProps = {
25
+ /**
26
+ * Used as HTML id property. An id is auto-generated when it is not specified.
27
+ */
25
28
  id?: string;
29
+ /**
30
+ * Used as HTML autocomplete property
31
+ */
26
32
  autoComplete?: string;
33
+ /**
34
+ * Indicate if the value entered in the input is invalid.
35
+ */
27
36
  'aria-invalid'?: boolean;
37
+ /**
38
+ * HTML ID of an element containing an error message related to the input.
39
+ */
28
40
  'aria-errormessage'?: string;
41
+ /**
42
+ * Used as HTML name of the input component property.
43
+ */
29
44
  name?: string;
45
+ /**
46
+ * Value of the input. Consists of text input and selected option.
47
+ */
30
48
  value: TValue;
31
49
  _experimentalValue?: TValue;
50
+ /**
51
+ * Called with the event of the input or dropdown when either the selectable dropdown or the text input have changed.
52
+ * The change event from the text input has a suffix of `.textInput` and the change event from the dropdown has a suffix of `.dropdown`.
53
+ */
32
54
  onChange?: (event: TCustomEvent) => void;
55
+ /**
56
+ * Called when input is blurred
57
+ */
33
58
  onBlur?: (event: TCustomEvent) => void;
59
+ /**
60
+ * Called when input is focused
61
+ */
34
62
  onFocus?: (event: TCustomEvent) => void;
63
+ /**
64
+ * Handler when the search button is clicked.
65
+ */
35
66
  onSubmit: (value: TValue) => void;
67
+ /**
68
+ * Handler when the clear button is clicked.
69
+ */
36
70
  onReset?: () => void;
71
+ /**
72
+ * Focus the input on initial render
73
+ */
37
74
  isAutofocussed?: boolean;
75
+ /**
76
+ * Indicates that the input cannot be modified (e.g not authorized, or changes currently saving).
77
+ */
38
78
  isDisabled?: boolean;
79
+ /**
80
+ * Indicates that the field is displaying read-only content
81
+ */
39
82
  isReadOnly?: boolean;
83
+ /**
84
+ * Indicates if the input has invalid values
85
+ */
40
86
  hasError?: boolean;
87
+ /**
88
+ * Indicates if the input has warning values
89
+ */
41
90
  hasWarning?: boolean;
91
+ /**
92
+ * Placeholder text for the input
93
+ */
42
94
  placeholder?: string;
95
+ /**
96
+ * Indicates if the input should be cleared when the clear button is clicked.
97
+ * Defaults to true.
98
+ *
99
+ */
43
100
  isClearable?: boolean;
101
+ /**
102
+ * Use this property to reduce the paddings of the component for a ui compact variant
103
+ */
44
104
  isCondensed?: boolean;
105
+ /**
106
+ * Horizontal size limit of the input fields.
107
+ */
45
108
  horizontalConstraint?: 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
109
+ /**
110
+ * Array of options that populate the select menu
111
+ */
46
112
  options: TOptions;
113
+ /**
114
+ * z-index value for the menu portal
115
+ * <br>
116
+ * Use in conjunction with `menuPortalTarget`
117
+ */
47
118
  menuPortalZIndex?: number;
119
+ /**
120
+ * Dom element to portal the select menu to
121
+ * <br>
122
+ * [Props from React select was used](https://react-select.com/props)
123
+ */
48
124
  menuPortalTarget?: ReactSelectProps['menuPortalTarget'];
125
+ /**
126
+ * whether the menu should block scroll while open
127
+ * <br>
128
+ * [Props from React select was used](https://react-select.com/props)
129
+ */
49
130
  menuShouldBlockScroll?: ReactSelectProps['menuShouldBlockScroll'];
131
+ /**
132
+ * Handle change events on the menu input
133
+ * <br>
134
+ * [Props from React select was used](https://react-select.com/props)
135
+ */
50
136
  onMenuInputChange?: ReactSelectProps['onInputChange'];
137
+ /**
138
+ * Can be used to render a custom value when there are no options (either because of no search results, or all options have been used, or there were none in the first place). Gets called with { inputValue: String }.
139
+ * <br />
140
+ * `inputValue` will be an empty string when no search text is present.
141
+ * <br>
142
+ * [Props from React select was used](https://react-select.com/props)
143
+ */
51
144
  noMenuOptionsMessage?: ReactSelectProps['noOptionsMessage'];
145
+ /**
146
+ * Whether to enable search functionality.
147
+ * <br>
148
+ * [Props from React select was used](https://react-select.com/props)
149
+ */
52
150
  isMenuSearchable?: ReactSelectProps['isSearchable'];
151
+ /**
152
+ * Maximum height of the menu before scrolling
153
+ * <br>
154
+ * [Props from React select was used](https://react-select.com/props)
155
+ */
53
156
  maxMenuHeight?: ReactSelectProps['maxMenuHeight'];
157
+ /**
158
+ * Whether the menu should close after a value is selected. Defaults to `true`.
159
+ * <br>
160
+ * [Props from React select was used](https://react-select.com/props)
161
+ */
54
162
  closeMenuOnSelect?: ReactSelectProps['closeMenuOnSelect'];
163
+ /**
164
+ * Horizontal size limit for the dropdown menu.
165
+ */
55
166
  menuHorizontalConstraint?: 3 | 4 | 5;
167
+ /**
168
+ * Show submit button in the input
169
+ */
56
170
  showSubmitButton?: boolean;
171
+ /**
172
+ * used to pass data-* props to the select component.
173
+ * eg: selectDataProps={[{ 'prop-1': 'value-1' }, { 'prop-2': 'value-2' }]}
174
+ */
57
175
  selectDataProps?: Record<string, string>;
176
+ /**
177
+ * used to pass data-* props to the input element.
178
+ * eg: inputDataProps={[{ 'prop-1': 'value-1' }, { 'prop-2': 'value-2' }]}
179
+ */
58
180
  inputDataProps?: Record<string, string>;
181
+ /**
182
+ * Map of components to overwrite the default ones, see what components you can override
183
+ * <br/>
184
+ * [Props from React select was used](https://react-select.com/props)
185
+ */
59
186
  selectCustomComponents?: ReactSelectProps['components'];
187
+ /**
188
+ * Custom action icon to be displayed on the right side of the input.
189
+ */
60
190
  rightActionIcon?: ReactElement;
191
+ /**
192
+ * Props for the right-action icon-button. Required when rightActionIcon is provided.
193
+ * At least a `label` and an `onClick` prop/function need to be provided.
194
+ */
61
195
  rightActionProps?: TIconButtonProps;
62
196
  };
63
197
  declare const SelectableSearchInput: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/selectable-search-input",
3
3
  "description": "A controlled selectable search input component for single-line strings with validation states.",
4
- "version": "19.9.0",
4
+ "version": "19.10.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,15 +21,15 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.20.13",
23
23
  "@babel/runtime-corejs3": "^7.20.13",
24
- "@commercetools-uikit/constraints": "19.9.0",
25
- "@commercetools-uikit/design-system": "19.9.0",
26
- "@commercetools-uikit/hooks": "19.9.0",
27
- "@commercetools-uikit/icon-button": "19.9.0",
28
- "@commercetools-uikit/icons": "19.9.0",
29
- "@commercetools-uikit/input-utils": "19.9.0",
30
- "@commercetools-uikit/secondary-icon-button": "19.9.0",
31
- "@commercetools-uikit/select-utils": "19.9.0",
32
- "@commercetools-uikit/utils": "19.9.0",
24
+ "@commercetools-uikit/constraints": "19.10.0",
25
+ "@commercetools-uikit/design-system": "19.10.0",
26
+ "@commercetools-uikit/hooks": "19.10.0",
27
+ "@commercetools-uikit/icon-button": "19.10.0",
28
+ "@commercetools-uikit/icons": "19.10.0",
29
+ "@commercetools-uikit/input-utils": "19.10.0",
30
+ "@commercetools-uikit/secondary-icon-button": "19.10.0",
31
+ "@commercetools-uikit/select-utils": "19.10.0",
32
+ "@commercetools-uikit/utils": "19.10.0",
33
33
  "@emotion/react": "^11.10.5",
34
34
  "@emotion/styled": "^11.10.5",
35
35
  "lodash": "4.17.21",