@commercetools-uikit/creatable-select-input 13.0.0 → 13.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 +4 -4
- package/dist/commercetools-uikit-creatable-select-input.cjs.dev.js +2 -2
- package/dist/commercetools-uikit-creatable-select-input.cjs.prod.js +1 -1
- package/dist/commercetools-uikit-creatable-select-input.esm.js +2 -2
- package/dist/declarations/src/creatable-select-input.d.ts +4 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -59,8 +59,8 @@ export default Example;
|
|
|
59
59
|
| `hasWarning` | `boolean` | | | Indicates the input field has a warning |
|
|
60
60
|
| `isReadOnly` | `boolean` | | | Disables the select input as it is read-only |
|
|
61
61
|
| `iconLeft` | `ReactNode` | | | Icon to display on the left of the placeholder text and selected value. Has no effect when `isMulti` is enabled. |
|
|
62
|
-
| `aria-label` | `CreatableProps['aria-label']` |
|
|
63
|
-
| `aria-labelledby` | `CreatableProps['aria-labelledby']` |
|
|
62
|
+
| `aria-label` | `CreatableProps['aria-label']` | | | Aria label (for assistive tech)
<br>
[Props from React select was used](https://react-select.com/props#creatable-props) |
|
|
63
|
+
| `aria-labelledby` | `CreatableProps['aria-labelledby']` | | | HTML ID of an element that should be used as the label (for assistive tech)
<br>
[Props from React select was used](https://react-select.com/props#creatable-props) |
|
|
64
64
|
| `isAutofocussed` | `boolean` | | | Focus the control when it is mounted |
|
|
65
65
|
| `backspaceRemovesValue` | `CreatableProps['backspaceRemovesValue']` | | | Remove the currently focused option when the user presses backspace
<br>
[Props from React select was used](https://react-select.com/props#creatable-props) |
|
|
66
66
|
| `components` | `CreatableProps['components']` | | | Map of components to overwrite the default ones, see [what components you can override](https://react-select.com/components)
<br>
[Props from React select was used](https://react-select.com/props#creatable-props) |
|
|
@@ -81,10 +81,10 @@ export default Example;
|
|
|
81
81
|
| `name` | `CreatableProps['name']` | | | Name of the HTML Input (optional - without this, no input will be rendered)
<br>
[Props from React select was used](https://react-select.com/props#creatable-props) |
|
|
82
82
|
| `noOptionsMessage` | `CreatableProps['noOptionsMessage']` | | | 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 }`. `inputValue` will be an empty string when no search text is present.
<br>
[Props from React select was used](https://react-select.com/props#creatable-props) |
|
|
83
83
|
| `onBlur` | `Function`<br/>[See signature.](#signature-onBlur) | | | Handle blur events on the control |
|
|
84
|
-
| `onChange` | `Function`<br/>[See signature.](#signature-onChange) | ✅ | | Called with a fake event when value changes. The event's `target.name` will be the `name` supplied in props. The event's `target.value` will hold the value. The value will be the selected option, or an array of options in case `isMulti` is `true
|
|
84
|
+
| `onChange` | `Function`<br/>[See signature.](#signature-onChange) | ✅ | | Called with a fake event when value changes. The event's `target.name` will be the `name` supplied in props. The event's `target.value` will hold the value. The value will be the selected option, or an array of options in case `isMulti` is `true`. |
|
|
85
85
|
| `onFocus` | `CreatableProps['onFocus']` | | | Handle focus events on the control
<br>
[Props from React select was used](https://react-select.com/props#creatable-props) |
|
|
86
86
|
| `onInputChange` | `CreatableProps['onInputChange']` | | | Handle change events on the input
<br>
[Props from React select was used](https://react-select.com/props#creatable-props) |
|
|
87
|
-
| `options` | `union`<br/>Possible values:<br/>`TValue[] , { options: TValue[] }[]` |
|
|
87
|
+
| `options` | `union`<br/>Possible values:<br/>`TValue[] , { options: TValue[] }[]` | | | Array of options that populate the select menu |
|
|
88
88
|
| `showOptionGroupDivider` | `boolean` | | | Determines if option groups will be separated by a divider |
|
|
89
89
|
| `placeholder` | `CreatableProps['placeholder']` | | | Placeholder text for the select value
<br>
[Props from React select was used](https://react-select.com/props#creatable-props) |
|
|
90
90
|
| `tabIndex` | `CreatableProps['tabIndex']` | | | Sets the tabIndex attribute on the input
<br>
[Props from React select was used](https://react-select.com/props#creatable-props) |
|
|
@@ -188,7 +188,7 @@ CreatableSelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
188
188
|
options: _pt__default["default"].arrayOf(_pt__default["default"].shape({
|
|
189
189
|
value: _pt__default["default"].string.isRequired
|
|
190
190
|
})).isRequired
|
|
191
|
-
}))])
|
|
191
|
+
}))]),
|
|
192
192
|
showOptionGroupDivider: _pt__default["default"].bool
|
|
193
193
|
} : {};
|
|
194
194
|
CreatableSelectInput.displayName = 'CreatableSelectInput'; // Both "true" and an empty array [] represent a touched state. The Boolean
|
|
@@ -205,7 +205,7 @@ utils.addStaticFields(CreatableSelectInput, _objectSpread(_objectSpread(_objectS
|
|
|
205
205
|
var CreatableSelectInput$1 = CreatableSelectInput;
|
|
206
206
|
|
|
207
207
|
// NOTE: This string will be replaced on build time with the package version.
|
|
208
|
-
var version = "13.0.
|
|
208
|
+
var version = "13.0.1";
|
|
209
209
|
|
|
210
210
|
exports["default"] = CreatableSelectInput$1;
|
|
211
211
|
exports.version = version;
|
|
@@ -186,7 +186,7 @@ utils.addStaticFields(CreatableSelectInput, _objectSpread(_objectSpread(_objectS
|
|
|
186
186
|
var CreatableSelectInput$1 = CreatableSelectInput;
|
|
187
187
|
|
|
188
188
|
// NOTE: This string will be replaced on build time with the package version.
|
|
189
|
-
var version = "13.0.
|
|
189
|
+
var version = "13.0.1";
|
|
190
190
|
|
|
191
191
|
exports["default"] = CreatableSelectInput$1;
|
|
192
192
|
exports.version = version;
|
|
@@ -169,7 +169,7 @@ CreatableSelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
169
169
|
options: _pt.arrayOf(_pt.shape({
|
|
170
170
|
value: _pt.string.isRequired
|
|
171
171
|
})).isRequired
|
|
172
|
-
}))])
|
|
172
|
+
}))]),
|
|
173
173
|
showOptionGroupDivider: _pt.bool
|
|
174
174
|
} : {};
|
|
175
175
|
CreatableSelectInput.displayName = 'CreatableSelectInput'; // Both "true" and an empty array [] represent a touched state. The Boolean
|
|
@@ -186,6 +186,6 @@ addStaticFields(CreatableSelectInput, _objectSpread(_objectSpread(_objectSpread(
|
|
|
186
186
|
var CreatableSelectInput$1 = CreatableSelectInput;
|
|
187
187
|
|
|
188
188
|
// NOTE: This string will be replaced on build time with the package version.
|
|
189
|
-
var version = "13.0.
|
|
189
|
+
var version = "13.0.1";
|
|
190
190
|
|
|
191
191
|
export { CreatableSelectInput$1 as default, version };
|
|
@@ -21,8 +21,8 @@ declare type TCreatableSelectInputProps = {
|
|
|
21
21
|
hasWarning?: boolean;
|
|
22
22
|
isReadOnly?: boolean;
|
|
23
23
|
iconLeft?: ReactNode;
|
|
24
|
-
'aria-label'
|
|
25
|
-
'aria-labelledby'
|
|
24
|
+
'aria-label'?: ReactSelectCreatableProps['aria-label'];
|
|
25
|
+
'aria-labelledby'?: ReactSelectCreatableProps['aria-labelledby'];
|
|
26
26
|
isAutofocussed?: boolean;
|
|
27
27
|
backspaceRemovesValue?: ReactSelectCreatableProps['backspaceRemovesValue'];
|
|
28
28
|
components?: ReactSelectCreatableProps['components'];
|
|
@@ -46,12 +46,12 @@ declare type TCreatableSelectInputProps = {
|
|
|
46
46
|
onChange: (event: TEvent, info: ActionMeta<unknown>) => void;
|
|
47
47
|
onFocus?: ReactSelectCreatableProps['onFocus'];
|
|
48
48
|
onInputChange?: ReactSelectCreatableProps['onInputChange'];
|
|
49
|
-
options
|
|
49
|
+
options?: TOptions;
|
|
50
50
|
showOptionGroupDivider?: boolean;
|
|
51
51
|
placeholder?: ReactSelectCreatableProps['placeholder'];
|
|
52
52
|
tabIndex?: ReactSelectCreatableProps['tabIndex'];
|
|
53
53
|
tabSelectsValue?: ReactSelectCreatableProps['tabSelectsValue'];
|
|
54
|
-
value
|
|
54
|
+
value?: ReactSelectCreatableProps['value'];
|
|
55
55
|
allowCreateWhileLoading?: ReactSelectCreatableProps['allowCreateWhileLoading'];
|
|
56
56
|
formatCreateLabel?: ReactSelectCreatableProps['formatCreateLabel'];
|
|
57
57
|
isValidNewOption?: ReactSelectCreatableProps['isValidNewOption'];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/creatable-select-input",
|
|
3
3
|
"description": "An input component getting a selection from the user, and where options can also be created by the user.",
|
|
4
|
-
"version": "13.0.
|
|
4
|
+
"version": "13.0.1",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@commercetools-uikit/constraints": "13.0.0",
|
|
25
25
|
"@commercetools-uikit/design-system": "13.0.0",
|
|
26
26
|
"@commercetools-uikit/icons": "13.0.0",
|
|
27
|
-
"@commercetools-uikit/select-utils": "13.0.
|
|
28
|
-
"@commercetools-uikit/spacings": "13.0.
|
|
27
|
+
"@commercetools-uikit/select-utils": "13.0.1",
|
|
28
|
+
"@commercetools-uikit/spacings": "13.0.1",
|
|
29
29
|
"@commercetools-uikit/text": "13.0.0",
|
|
30
30
|
"@commercetools-uikit/utils": "12.2.9",
|
|
31
31
|
"@emotion/react": "^11.4.0",
|