@commercetools-uikit/select-input 14.0.0 → 14.0.1
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/README.md
CHANGED
|
@@ -128,8 +128,7 @@ The options support a `isDisabled` property which will render the option with a
|
|
|
128
128
|
|
|
129
129
|
### `isTouched(touched)`
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
Returns `true` when truthy.
|
|
131
|
+
Returns truthy value for the Formik `touched` value of this input field.
|
|
133
132
|
|
|
134
133
|
## Components
|
|
135
134
|
|
|
@@ -140,24 +139,24 @@ Components available as static exports are:
|
|
|
140
139
|
|
|
141
140
|
- `ClearIndicator`
|
|
142
141
|
- `Control`
|
|
143
|
-
- `DropdownIndicator`
|
|
144
|
-
- `DownChevron`
|
|
145
142
|
- `CrossIcon`
|
|
143
|
+
- `DownChevron`
|
|
144
|
+
- `DropdownIndicator`
|
|
146
145
|
- `Group`
|
|
147
146
|
- `GroupHeading`
|
|
148
147
|
- `IndicatorsContainer`
|
|
149
148
|
- `IndicatorSeparator`
|
|
150
149
|
- `Input`
|
|
151
150
|
- `LoadingIndicator`
|
|
151
|
+
- `LoadingMessage`
|
|
152
152
|
- `Menu`
|
|
153
153
|
- `MenuList`
|
|
154
154
|
- `MenuPortal`
|
|
155
|
-
- `LoadingMessage`
|
|
156
|
-
- `NoOptionsMessage`
|
|
157
155
|
- `MultiValue`
|
|
158
156
|
- `MultiValueContainer`
|
|
159
157
|
- `MultiValueLabel`
|
|
160
158
|
- `MultiValueRemove`
|
|
159
|
+
- `NoOptionsMessage`
|
|
161
160
|
- `Option`
|
|
162
161
|
- `Placeholder`
|
|
163
162
|
- `SelectContainer`
|
|
@@ -214,21 +214,50 @@ SelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
214
214
|
}))]),
|
|
215
215
|
showOptionGroupDivider: _pt__default["default"].bool
|
|
216
216
|
} : {};
|
|
217
|
-
SelectInput.displayName = 'SelectInput';
|
|
218
|
-
|
|
217
|
+
SelectInput.displayName = 'SelectInput';
|
|
218
|
+
SelectInput.defaultProps = defaultProps;
|
|
219
|
+
/**
|
|
220
|
+
* Expose static helper methods.
|
|
221
|
+
*/
|
|
222
|
+
// Both "true" and an empty array [] represent a touched state.
|
|
219
223
|
|
|
220
224
|
SelectInput.isTouched = function (touched) {
|
|
221
225
|
return Boolean(touched);
|
|
222
226
|
};
|
|
227
|
+
/**
|
|
228
|
+
* Expose react-select components for customization purposes.
|
|
229
|
+
*/
|
|
223
230
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
231
|
+
|
|
232
|
+
SelectInput.ClearIndicator = customizedComponents.ClearIndicator;
|
|
233
|
+
SelectInput.Control = Select.components.Control;
|
|
234
|
+
SelectInput.CrossIcon = Select.components.CrossIcon;
|
|
235
|
+
SelectInput.DownChevron = Select.components.DownChevron;
|
|
236
|
+
SelectInput.DropdownIndicator = customizedComponents.DropdownIndicator;
|
|
237
|
+
SelectInput.Group = Select.components.Group;
|
|
238
|
+
SelectInput.GroupHeading = Select.components.GroupHeading;
|
|
239
|
+
SelectInput.IndicatorSeparator = Select.components.IndicatorSeparator;
|
|
240
|
+
SelectInput.IndicatorsContainer = Select.components.IndicatorsContainer;
|
|
241
|
+
SelectInput.Input = Select.components.Input;
|
|
242
|
+
SelectInput.LoadingIndicator = Select.components.LoadingIndicator;
|
|
243
|
+
SelectInput.LoadingMessage = Select.components.LoadingMessage;
|
|
244
|
+
SelectInput.Menu = Select.components.Menu;
|
|
245
|
+
SelectInput.MenuList = Select.components.MenuList;
|
|
246
|
+
SelectInput.MenuPortal = Select.components.MenuPortal;
|
|
247
|
+
SelectInput.MultiValue = Select.components.MultiValue;
|
|
248
|
+
SelectInput.MultiValueContainer = Select.components.MultiValueContainer;
|
|
249
|
+
SelectInput.MultiValueLabel = Select.components.MultiValueLabel;
|
|
250
|
+
SelectInput.MultiValueRemove = customizedComponents.MultiValueRemove;
|
|
251
|
+
SelectInput.NoOptionsMessage = Select.components.NoOptionsMessage;
|
|
252
|
+
SelectInput.Option = Select.components.Option;
|
|
253
|
+
SelectInput.Placeholder = Select.components.Placeholder;
|
|
254
|
+
SelectInput.SelectContainer = Select.components.SelectContainer;
|
|
255
|
+
SelectInput.SingleValue = Select.components.SingleValue;
|
|
256
|
+
SelectInput.ValueContainer = Select.components.ValueContainer;
|
|
228
257
|
var SelectInput$1 = SelectInput;
|
|
229
258
|
|
|
230
259
|
// NOTE: This string will be replaced on build time with the package version.
|
|
231
|
-
var version = "14.0.
|
|
260
|
+
var version = "14.0.1";
|
|
232
261
|
|
|
233
262
|
exports["default"] = SelectInput$1;
|
|
234
263
|
exports.version = version;
|
|
@@ -195,21 +195,50 @@ var SelectInput = function SelectInput(props) {
|
|
|
195
195
|
};
|
|
196
196
|
|
|
197
197
|
SelectInput.propTypes = {};
|
|
198
|
-
SelectInput.displayName = 'SelectInput';
|
|
199
|
-
|
|
198
|
+
SelectInput.displayName = 'SelectInput';
|
|
199
|
+
SelectInput.defaultProps = defaultProps;
|
|
200
|
+
/**
|
|
201
|
+
* Expose static helper methods.
|
|
202
|
+
*/
|
|
203
|
+
// Both "true" and an empty array [] represent a touched state.
|
|
200
204
|
|
|
201
205
|
SelectInput.isTouched = function (touched) {
|
|
202
206
|
return Boolean(touched);
|
|
203
207
|
};
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
/**
|
|
209
|
+
* Expose react-select components for customization purposes.
|
|
210
|
+
*/
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
SelectInput.ClearIndicator = customizedComponents.ClearIndicator;
|
|
214
|
+
SelectInput.Control = Select.components.Control;
|
|
215
|
+
SelectInput.CrossIcon = Select.components.CrossIcon;
|
|
216
|
+
SelectInput.DownChevron = Select.components.DownChevron;
|
|
217
|
+
SelectInput.DropdownIndicator = customizedComponents.DropdownIndicator;
|
|
218
|
+
SelectInput.Group = Select.components.Group;
|
|
219
|
+
SelectInput.GroupHeading = Select.components.GroupHeading;
|
|
220
|
+
SelectInput.IndicatorSeparator = Select.components.IndicatorSeparator;
|
|
221
|
+
SelectInput.IndicatorsContainer = Select.components.IndicatorsContainer;
|
|
222
|
+
SelectInput.Input = Select.components.Input;
|
|
223
|
+
SelectInput.LoadingIndicator = Select.components.LoadingIndicator;
|
|
224
|
+
SelectInput.LoadingMessage = Select.components.LoadingMessage;
|
|
225
|
+
SelectInput.Menu = Select.components.Menu;
|
|
226
|
+
SelectInput.MenuList = Select.components.MenuList;
|
|
227
|
+
SelectInput.MenuPortal = Select.components.MenuPortal;
|
|
228
|
+
SelectInput.MultiValue = Select.components.MultiValue;
|
|
229
|
+
SelectInput.MultiValueContainer = Select.components.MultiValueContainer;
|
|
230
|
+
SelectInput.MultiValueLabel = Select.components.MultiValueLabel;
|
|
231
|
+
SelectInput.MultiValueRemove = customizedComponents.MultiValueRemove;
|
|
232
|
+
SelectInput.NoOptionsMessage = Select.components.NoOptionsMessage;
|
|
233
|
+
SelectInput.Option = Select.components.Option;
|
|
234
|
+
SelectInput.Placeholder = Select.components.Placeholder;
|
|
235
|
+
SelectInput.SelectContainer = Select.components.SelectContainer;
|
|
236
|
+
SelectInput.SingleValue = Select.components.SingleValue;
|
|
237
|
+
SelectInput.ValueContainer = Select.components.ValueContainer;
|
|
209
238
|
var SelectInput$1 = SelectInput;
|
|
210
239
|
|
|
211
240
|
// NOTE: This string will be replaced on build time with the package version.
|
|
212
|
-
var version = "14.0.
|
|
241
|
+
var version = "14.0.1";
|
|
213
242
|
|
|
214
243
|
exports["default"] = SelectInput$1;
|
|
215
244
|
exports.version = version;
|
|
@@ -18,7 +18,7 @@ import flatMap from 'lodash/flatMap';
|
|
|
18
18
|
import Select, { components } from 'react-select';
|
|
19
19
|
import Constraints from '@commercetools-uikit/constraints';
|
|
20
20
|
import { messages, customComponentsWithIcons, createSelectStyles, DropdownIndicator, ClearIndicator, TagRemove } from '@commercetools-uikit/select-utils';
|
|
21
|
-
import { filterDataAttributes
|
|
21
|
+
import { filterDataAttributes } from '@commercetools-uikit/utils';
|
|
22
22
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
23
23
|
|
|
24
24
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -191,20 +191,49 @@ SelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
191
191
|
}))]),
|
|
192
192
|
showOptionGroupDivider: _pt.bool
|
|
193
193
|
} : {};
|
|
194
|
-
SelectInput.displayName = 'SelectInput';
|
|
195
|
-
|
|
194
|
+
SelectInput.displayName = 'SelectInput';
|
|
195
|
+
SelectInput.defaultProps = defaultProps;
|
|
196
|
+
/**
|
|
197
|
+
* Expose static helper methods.
|
|
198
|
+
*/
|
|
199
|
+
// Both "true" and an empty array [] represent a touched state.
|
|
196
200
|
|
|
197
201
|
SelectInput.isTouched = function (touched) {
|
|
198
202
|
return Boolean(touched);
|
|
199
203
|
};
|
|
204
|
+
/**
|
|
205
|
+
* Expose react-select components for customization purposes.
|
|
206
|
+
*/
|
|
200
207
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
208
|
+
|
|
209
|
+
SelectInput.ClearIndicator = customizedComponents.ClearIndicator;
|
|
210
|
+
SelectInput.Control = components.Control;
|
|
211
|
+
SelectInput.CrossIcon = components.CrossIcon;
|
|
212
|
+
SelectInput.DownChevron = components.DownChevron;
|
|
213
|
+
SelectInput.DropdownIndicator = customizedComponents.DropdownIndicator;
|
|
214
|
+
SelectInput.Group = components.Group;
|
|
215
|
+
SelectInput.GroupHeading = components.GroupHeading;
|
|
216
|
+
SelectInput.IndicatorSeparator = components.IndicatorSeparator;
|
|
217
|
+
SelectInput.IndicatorsContainer = components.IndicatorsContainer;
|
|
218
|
+
SelectInput.Input = components.Input;
|
|
219
|
+
SelectInput.LoadingIndicator = components.LoadingIndicator;
|
|
220
|
+
SelectInput.LoadingMessage = components.LoadingMessage;
|
|
221
|
+
SelectInput.Menu = components.Menu;
|
|
222
|
+
SelectInput.MenuList = components.MenuList;
|
|
223
|
+
SelectInput.MenuPortal = components.MenuPortal;
|
|
224
|
+
SelectInput.MultiValue = components.MultiValue;
|
|
225
|
+
SelectInput.MultiValueContainer = components.MultiValueContainer;
|
|
226
|
+
SelectInput.MultiValueLabel = components.MultiValueLabel;
|
|
227
|
+
SelectInput.MultiValueRemove = customizedComponents.MultiValueRemove;
|
|
228
|
+
SelectInput.NoOptionsMessage = components.NoOptionsMessage;
|
|
229
|
+
SelectInput.Option = components.Option;
|
|
230
|
+
SelectInput.Placeholder = components.Placeholder;
|
|
231
|
+
SelectInput.SelectContainer = components.SelectContainer;
|
|
232
|
+
SelectInput.SingleValue = components.SingleValue;
|
|
233
|
+
SelectInput.ValueContainer = components.ValueContainer;
|
|
205
234
|
var SelectInput$1 = SelectInput;
|
|
206
235
|
|
|
207
236
|
// NOTE: This string will be replaced on build time with the package version.
|
|
208
|
-
var version = "14.0.
|
|
237
|
+
var version = "14.0.1";
|
|
209
238
|
|
|
210
239
|
export { SelectInput$1 as default, version };
|
|
@@ -57,7 +57,64 @@ declare type TSelectInputProps = {
|
|
|
57
57
|
declare const SelectInput: {
|
|
58
58
|
(props: TSelectInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
59
59
|
displayName: string;
|
|
60
|
-
isTouched(touched: boolean | unknown[]): boolean;
|
|
61
60
|
defaultProps: Pick<TSelectInputProps, "maxMenuHeight" | "menuPortalZIndex">;
|
|
61
|
+
isTouched(touched: boolean | unknown[]): boolean;
|
|
62
|
+
ClearIndicator: {
|
|
63
|
+
(props: {
|
|
64
|
+
innerProps: {
|
|
65
|
+
ref: import("react").LegacyRef<HTMLButtonElement>;
|
|
66
|
+
} & import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>;
|
|
67
|
+
} & import("react-select").ClearIndicatorProps<unknown, boolean, import("react-select").GroupBase<unknown>>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
68
|
+
displayName: string;
|
|
69
|
+
};
|
|
70
|
+
Control: <Option_1, IsMulti_1 extends boolean, Group_1 extends import("react-select").GroupBase<Option_1>>(props: import("react-select").ControlProps<Option_1, IsMulti_1, Group_1>) => import("@emotion/react").jsx.JSX.Element;
|
|
71
|
+
CrossIcon: (props: import("react-select/dist/declarations/src/components/indicators").CrossIconProps) => import("@emotion/react").jsx.JSX.Element;
|
|
72
|
+
DownChevron: (props: import("react-select/dist/declarations/src/components/indicators").DownChevronProps) => import("@emotion/react").jsx.JSX.Element;
|
|
73
|
+
DropdownIndicator: {
|
|
74
|
+
(props: import("react-select").DropdownIndicatorProps<unknown, boolean, import("react-select").GroupBase<unknown>>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
75
|
+
displayName: string;
|
|
76
|
+
};
|
|
77
|
+
Group: <Option_3, IsMulti_3 extends boolean, Group_3 extends import("react-select").GroupBase<Option_3>>(props: import("react-select").GroupProps<Option_3, IsMulti_3, Group_3>) => import("@emotion/react").jsx.JSX.Element;
|
|
78
|
+
GroupHeading: <Option_4, IsMulti_4 extends boolean, Group_4 extends import("react-select").GroupBase<Option_4>>(props: import("react-select").GroupHeadingProps<Option_4, IsMulti_4, Group_4>) => import("@emotion/react").jsx.JSX.Element;
|
|
79
|
+
IndicatorSeparator: <Option_6, IsMulti_6 extends boolean, Group_6 extends import("react-select").GroupBase<Option_6>>(props: import("react-select").IndicatorSeparatorProps<Option_6, IsMulti_6, Group_6>) => import("@emotion/react").jsx.JSX.Element;
|
|
80
|
+
IndicatorsContainer: <Option_5, IsMulti_5 extends boolean, Group_5 extends import("react-select").GroupBase<Option_5>>(props: import("react-select").IndicatorsContainerProps<Option_5, IsMulti_5, Group_5>) => import("@emotion/react").jsx.JSX.Element;
|
|
81
|
+
Input: <Option_7, IsMulti_7 extends boolean, Group_7 extends import("react-select").GroupBase<Option_7>>(props: import("react-select").InputProps<Option_7, IsMulti_7, Group_7>) => import("@emotion/react").jsx.JSX.Element;
|
|
82
|
+
LoadingIndicator: {
|
|
83
|
+
<Option_8, IsMulti_8 extends boolean, Group_8 extends import("react-select").GroupBase<Option_8>>(props: import("react-select").LoadingIndicatorProps<Option_8, IsMulti_8, Group_8>): import("@emotion/react").jsx.JSX.Element;
|
|
84
|
+
defaultProps: {
|
|
85
|
+
size: number;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
LoadingMessage: {
|
|
89
|
+
<Option_11, IsMulti_11 extends boolean, Group_11 extends import("react-select").GroupBase<Option_11>>(props: import("react-select").NoticeProps<Option_11, IsMulti_11, Group_11>): import("@emotion/react").jsx.JSX.Element;
|
|
90
|
+
defaultProps: {
|
|
91
|
+
children: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
Menu: <Option_9, IsMulti_9 extends boolean, Group_9 extends import("react-select").GroupBase<Option_9>>(props: import("react-select").MenuProps<Option_9, IsMulti_9, Group_9>) => import("@emotion/react").jsx.JSX.Element;
|
|
95
|
+
MenuList: <Option_10, IsMulti_10 extends boolean, Group_10 extends import("react-select").GroupBase<Option_10>>(props: import("react-select").MenuListProps<Option_10, IsMulti_10, Group_10>) => import("@emotion/react").jsx.JSX.Element;
|
|
96
|
+
MenuPortal: typeof import("react-select/dist/declarations/src/components/Menu").MenuPortal;
|
|
97
|
+
MultiValue: <Option_13, IsMulti_13 extends boolean, Group_13 extends import("react-select").GroupBase<Option_13>>(props: import("react-select").MultiValueProps<Option_13, IsMulti_13, Group_13>) => import("@emotion/react").jsx.JSX.Element;
|
|
98
|
+
MultiValueContainer: <Option_14, IsMulti_14 extends boolean, Group_14 extends import("react-select").GroupBase<Option_14>>({ children, innerProps, }: import("react-select").MultiValueGenericProps<Option_14, IsMulti_14, Group_14>) => import("@emotion/react").jsx.JSX.Element;
|
|
99
|
+
MultiValueLabel: <Option_14_1, IsMulti_14_1 extends boolean, Group_14_1 extends import("react-select").GroupBase<Option_14_1>>({ children, innerProps, }: import("react-select").MultiValueGenericProps<Option_14_1, IsMulti_14_1, Group_14_1>) => import("@emotion/react").jsx.JSX.Element;
|
|
100
|
+
MultiValueRemove: {
|
|
101
|
+
(props: {
|
|
102
|
+
selectProps: {
|
|
103
|
+
isReadOnly: boolean;
|
|
104
|
+
} & import("react-select/dist/declarations/src/Select").Props<unknown, boolean, import("react-select").GroupBase<unknown>>;
|
|
105
|
+
} & import("react-select").MultiValueGenericProps<unknown, boolean, import("react-select").GroupBase<unknown>>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
106
|
+
displayName: string;
|
|
107
|
+
};
|
|
108
|
+
NoOptionsMessage: {
|
|
109
|
+
<Option_12, IsMulti_12 extends boolean, Group_12 extends import("react-select").GroupBase<Option_12>>(props: import("react-select").NoticeProps<Option_12, IsMulti_12, Group_12>): import("@emotion/react").jsx.JSX.Element;
|
|
110
|
+
defaultProps: {
|
|
111
|
+
children: string;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
Option: <Option_15, IsMulti_15 extends boolean, Group_15 extends import("react-select").GroupBase<Option_15>>(props: import("react-select").OptionProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
|
|
115
|
+
Placeholder: <Option_16, IsMulti_16 extends boolean, Group_16 extends import("react-select").GroupBase<Option_16>>(props: import("react-select").PlaceholderProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
|
|
116
|
+
SelectContainer: <Option_17, IsMulti_17 extends boolean, Group_17 extends import("react-select").GroupBase<Option_17>>(props: import("react-select").ContainerProps<Option_17, IsMulti_17, Group_17>) => import("@emotion/react").jsx.JSX.Element;
|
|
117
|
+
SingleValue: <Option_18, IsMulti_18 extends boolean, Group_18 extends import("react-select").GroupBase<Option_18>>(props: import("react-select").SingleValueProps<Option_18, IsMulti_18, Group_18>) => import("@emotion/react").jsx.JSX.Element;
|
|
118
|
+
ValueContainer: <Option_19, IsMulti_19 extends boolean, Group_19 extends import("react-select").GroupBase<Option_19>>(props: import("react-select").ValueContainerProps<Option_19, IsMulti_19, Group_19>) => import("@emotion/react").jsx.JSX.Element;
|
|
62
119
|
};
|
|
63
120
|
export default SelectInput;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/select-input",
|
|
3
3
|
"description": "An input component getting a selection from the user.",
|
|
4
|
-
"version": "14.0.
|
|
4
|
+
"version": "14.0.1",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.17.2",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.17.2",
|
|
24
|
-
"@commercetools-uikit/constraints": "14.0.
|
|
24
|
+
"@commercetools-uikit/constraints": "14.0.1",
|
|
25
25
|
"@commercetools-uikit/design-system": "14.0.0",
|
|
26
|
-
"@commercetools-uikit/icons": "14.0.
|
|
27
|
-
"@commercetools-uikit/select-utils": "14.0.
|
|
28
|
-
"@commercetools-uikit/utils": "14.0.
|
|
26
|
+
"@commercetools-uikit/icons": "14.0.1",
|
|
27
|
+
"@commercetools-uikit/select-utils": "14.0.1",
|
|
28
|
+
"@commercetools-uikit/utils": "14.0.1",
|
|
29
29
|
"@emotion/is-prop-valid": "1.1.2",
|
|
30
30
|
"@emotion/react": "^11.4.0",
|
|
31
31
|
"@emotion/styled": "^11.3.0",
|