@commercetools-uikit/selectable-search-input 16.10.0 → 16.12.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.
package/README.md CHANGED
@@ -20,11 +20,11 @@ npm --save install @commercetools-uikit/selectable-search-input
20
20
  Additionally install the peer dependencies (if not present)
21
21
 
22
22
  ```
23
- yarn add react react-intl
23
+ yarn add react react-dom react-intl
24
24
  ```
25
25
 
26
26
  ```
27
- npm --save install react react-intl
27
+ npm --save install react react-dom react-intl
28
28
  ```
29
29
 
30
30
  ## Usage
@@ -527,7 +527,7 @@ SelectableSearchInput.getDropdownId = getDropdownName;
527
527
  var SelectableSearchInput$1 = SelectableSearchInput;
528
528
 
529
529
  // NOTE: This string will be replaced on build time with the package version.
530
- var version = "16.10.0";
530
+ var version = "16.12.0";
531
531
 
532
532
  exports["default"] = SelectableSearchInput$1;
533
533
  exports.version = version;
@@ -471,7 +471,7 @@ SelectableSearchInput.getDropdownId = getDropdownName;
471
471
  var SelectableSearchInput$1 = SelectableSearchInput;
472
472
 
473
473
  // NOTE: This string will be replaced on build time with the package version.
474
- var version = "16.10.0";
474
+ var version = "16.12.0";
475
475
 
476
476
  exports["default"] = SelectableSearchInput$1;
477
477
  exports.version = version;
@@ -504,6 +504,6 @@ SelectableSearchInput.getDropdownId = getDropdownName;
504
504
  var SelectableSearchInput$1 = SelectableSearchInput;
505
505
 
506
506
  // NOTE: This string will be replaced on build time with the package version.
507
- var version = "16.10.0";
507
+ var version = "16.12.0";
508
508
 
509
509
  export { SelectableSearchInput$1 as default, version };
@@ -1 +1 @@
1
- export type { TSelectableSearchInputProps, TCustomEvent, TValue, TOption, TOptionObject, } from './selectable-search-input';
1
+ export type { TSelectableSearchInputProps, TCustomEvent, TValue, TOption, TOptionObject, } from "./selectable-search-input.js";
@@ -1,3 +1,3 @@
1
- export { default } from './selectable-search-input';
2
- export { default as version } from './version';
3
- export * from './export-types';
1
+ export { default } from "./selectable-search-input.js";
2
+ export { default as version } from "./version.js";
3
+ export * from "./export-types.js";
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": "16.10.0",
4
+ "version": "16.12.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,19 +21,19 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.20.13",
23
23
  "@babel/runtime-corejs3": "^7.20.13",
24
- "@commercetools-uikit/constraints": "16.10.0",
25
- "@commercetools-uikit/design-system": "16.10.0",
26
- "@commercetools-uikit/hooks": "16.10.0",
27
- "@commercetools-uikit/icons": "16.10.0",
28
- "@commercetools-uikit/input-utils": "16.10.0",
29
- "@commercetools-uikit/secondary-icon-button": "16.10.0",
30
- "@commercetools-uikit/select-utils": "16.10.0",
31
- "@commercetools-uikit/utils": "16.10.0",
24
+ "@commercetools-uikit/constraints": "16.12.0",
25
+ "@commercetools-uikit/design-system": "16.12.0",
26
+ "@commercetools-uikit/hooks": "16.12.0",
27
+ "@commercetools-uikit/icons": "16.12.0",
28
+ "@commercetools-uikit/input-utils": "16.12.0",
29
+ "@commercetools-uikit/secondary-icon-button": "16.12.0",
30
+ "@commercetools-uikit/select-utils": "16.12.0",
31
+ "@commercetools-uikit/utils": "16.12.0",
32
32
  "@emotion/react": "^11.10.5",
33
33
  "@emotion/styled": "^11.10.5",
34
34
  "lodash": "4.17.21",
35
35
  "prop-types": "15.8.1",
36
- "react-select": "5.7.3"
36
+ "react-select": "5.8.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "react": "17.0.2",
@@ -1,428 +0,0 @@
1
- import { type Props as ReactSelectProps } from 'react-select';
2
- type TInputProps = {
3
- isDisabled?: boolean;
4
- hasError?: boolean;
5
- hasWarning?: boolean;
6
- isReadOnly?: boolean;
7
- horizontalConstraint?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
8
- };
9
- declare const getSelectableSearchInputStyles: (props: TInputProps) => import("@emotion/utils").SerializedStyles[];
10
- declare const getClearIconButtonStyles: (props: TInputProps) => import("@emotion/utils").SerializedStyles[];
11
- declare const getSearchIconButtonStyles: (props: TInputProps) => import("@emotion/utils").SerializedStyles[];
12
- declare const getBackgroundColor: (props: TInputProps, defaultColor: string) => string;
13
- declare const getSelectableSearchInputContainerStyles: (props: TInputProps) => (false | import("@emotion/utils").SerializedStyles)[];
14
- type TBase = {
15
- backgroundColor?: string;
16
- color?: string;
17
- };
18
- type TCreateSelectableSelectStyles = {
19
- isDisabled?: boolean;
20
- hasError?: boolean;
21
- hasWarning?: boolean;
22
- isReadOnly?: boolean;
23
- menuPortalZIndex?: number;
24
- dropdownHasFocus?: boolean;
25
- horizontalConstraint?: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 'scale' | 'auto';
26
- };
27
- declare const createSelectableSelectStyles: ({ hasWarning, hasError, isDisabled, isReadOnly, menuPortalZIndex, dropdownHasFocus, horizontalConstraint, }: TCreateSelectableSelectStyles) => {
28
- control: (base: TBase, state: ReactSelectProps) => {
29
- padding: "var(--padding-for-selectable-search-input-dropdown, 0 12px)";
30
- borderTopRightRadius: string;
31
- borderBottomRightRadius: string;
32
- borderRight: string;
33
- height: string;
34
- borderColor: string;
35
- cursor: string;
36
- backgroundColor: string;
37
- '&:hover': {
38
- backgroundColor: string;
39
- };
40
- '&:focus-within': {
41
- boxShadow: string | null;
42
- borderColor: "var(--border-color-for-input-when-focused, hsl(175, 55%, 45%))" | null;
43
- };
44
- pointerEvents: string;
45
- color: string | undefined;
46
- display?: string | undefined;
47
- fontSize: "var(--font-size-for-input, 1rem)";
48
- borderWidth: "var(--border-width-1, 1px)" | "var(--border-width-for-select-input, 2px)";
49
- borderRadius: "var(--border-radius-for-input, 4px)";
50
- minHeight: "var(--height-for-input, 40px)";
51
- transition: string;
52
- outline: number;
53
- boxShadow: string;
54
- fontColorForInput?: string | undefined;
55
- borderColorForInput?: string | undefined;
56
- borderTop?: string | undefined;
57
- };
58
- singleValue: (base: TBase) => {
59
- marginLeft: number;
60
- maxWidth: string;
61
- color: "var(--font-color-for-input, #1a1a1a)" | "var(--font-color-for-input-when-disabled, hsl(232, 18%, 60%))" | "var(--font-color-for-input-when-error, #e60050)" | "var(--font-color-for-input-when-readonly, hsl(232, 18%, 40%))" | "var(--font-color-for-input-when-warning, #f16d0e)";
62
- backgroundColor?: string | undefined;
63
- };
64
- dropdownIndicator: () => {
65
- fill: "var(--font-color-for-input-when-disabled, hsl(232, 18%, 60%))" | "var(--font-color-for-select-input-icon, hsl(232, 18%, 60%))";
66
- };
67
- menu: (base: {
68
- fontColorForInput?: string | undefined;
69
- borderColorForInput?: string | undefined;
70
- color?: string | undefined;
71
- backgroundColor?: string | undefined;
72
- borderTop?: string | undefined;
73
- borderColor?: string | undefined;
74
- boxShadow?: string | undefined;
75
- pointerEvents?: string | undefined;
76
- }) => {
77
- border: string;
78
- borderRadius: "var(--border-radius-for-input, 4px)";
79
- backgroundColor: "var(--background-color-for-input, #fff)";
80
- boxShadow: "var(--shadow-for-select-input-menu, 0 2px 5px 0px rgba(0, 0, 0, 0.15))";
81
- fontSize: "var(--font-size-for-input, 1rem)";
82
- fontFamily: string;
83
- margin: string;
84
- borderColor: string | undefined;
85
- width: string;
86
- fontColorForInput?: string | undefined;
87
- borderColorForInput?: string | undefined;
88
- color?: string | undefined;
89
- borderTop?: string | undefined;
90
- pointerEvents?: string | undefined;
91
- };
92
- indicatorSeparator: (base: {
93
- fontColorForInput?: string | undefined;
94
- borderColorForInput?: string | undefined;
95
- color?: string | undefined;
96
- backgroundColor?: string | undefined;
97
- borderTop?: string | undefined;
98
- borderColor?: string | undefined;
99
- boxShadow?: string | undefined;
100
- pointerEvents?: string | undefined;
101
- }) => {
102
- display: string;
103
- margin: string;
104
- padding: string;
105
- marginLeft: "var(--spacing-10, 4px)";
106
- fontColorForInput?: string | undefined;
107
- borderColorForInput?: string | undefined;
108
- color?: string | undefined;
109
- backgroundColor?: string | undefined;
110
- borderTop?: string | undefined;
111
- borderColor?: string | undefined;
112
- boxShadow?: string | undefined;
113
- pointerEvents?: string | undefined;
114
- };
115
- clearIndicator: (base: {
116
- fontColorForInput?: string | undefined;
117
- borderColorForInput?: string | undefined;
118
- color?: string | undefined;
119
- backgroundColor?: string | undefined;
120
- borderTop?: string | undefined;
121
- borderColor?: string | undefined;
122
- boxShadow?: string | undefined;
123
- pointerEvents?: string | undefined;
124
- }) => {
125
- display: string;
126
- padding: number;
127
- marginLeft: "var(--margin-for-select-input-icon, 8px)";
128
- fontColorForInput?: string | undefined;
129
- borderColorForInput?: string | undefined;
130
- color?: string | undefined;
131
- backgroundColor?: string | undefined;
132
- borderTop?: string | undefined;
133
- borderColor?: string | undefined;
134
- boxShadow?: string | undefined;
135
- pointerEvents?: string | undefined;
136
- };
137
- menuList: (base: {
138
- fontColorForInput?: string | undefined;
139
- borderColorForInput?: string | undefined;
140
- color?: string | undefined;
141
- backgroundColor?: string | undefined;
142
- borderTop?: string | undefined;
143
- borderColor?: string | undefined;
144
- boxShadow?: string | undefined;
145
- pointerEvents?: string | undefined;
146
- }) => {
147
- padding: "var(--padding-for-select-input-menu, var(--spacing-10) 0)";
148
- borderRadius: "var(--border-radius-for-input, 4px)";
149
- backgroundColor: "var(--background-color-for-input, #fff)";
150
- fontColorForInput?: string | undefined;
151
- borderColorForInput?: string | undefined;
152
- color?: string | undefined;
153
- borderTop?: string | undefined;
154
- borderColor?: string | undefined;
155
- boxShadow?: string | undefined;
156
- pointerEvents?: string | undefined;
157
- };
158
- menuPortal: (base: {
159
- fontColorForInput?: string | undefined;
160
- borderColorForInput?: string | undefined;
161
- color?: string | undefined;
162
- backgroundColor?: string | undefined;
163
- borderTop?: string | undefined;
164
- borderColor?: string | undefined;
165
- boxShadow?: string | undefined;
166
- pointerEvents?: string | undefined;
167
- }) => {
168
- zIndex: number | undefined;
169
- fontColorForInput?: string | undefined;
170
- borderColorForInput?: string | undefined;
171
- color?: string | undefined;
172
- backgroundColor?: string | undefined;
173
- borderTop?: string | undefined;
174
- borderColor?: string | undefined;
175
- boxShadow?: string | undefined;
176
- pointerEvents?: string | undefined;
177
- };
178
- multiValue: (base: {
179
- fontColorForInput?: string | undefined;
180
- borderColorForInput?: string | undefined;
181
- color?: string | undefined;
182
- backgroundColor?: string | undefined;
183
- borderTop?: string | undefined;
184
- borderColor?: string | undefined;
185
- boxShadow?: string | undefined;
186
- pointerEvents?: string | undefined;
187
- }) => {
188
- display: string;
189
- alignItems: "var(--align-items-for-select-input-tag, center)";
190
- height: "var(--height-for-select-input-tag, 32px)";
191
- backgroundColor: "var(--background-color-for-tag, hsl(232, 18%, 95%))";
192
- padding: string;
193
- border: "var(--border-for-select-input-tag, 1px solid var(--color-neutral-85))";
194
- fontColorForInput?: string | undefined;
195
- borderColorForInput?: string | undefined;
196
- color?: string | undefined;
197
- borderTop?: string | undefined;
198
- borderColor?: string | undefined;
199
- boxShadow?: string | undefined;
200
- pointerEvents?: string | undefined;
201
- };
202
- multiValueLabel: (base: {
203
- fontColorForInput?: string | undefined;
204
- borderColorForInput?: string | undefined;
205
- color?: string | undefined;
206
- backgroundColor?: string | undefined;
207
- borderTop?: string | undefined;
208
- borderColor?: string | undefined;
209
- boxShadow?: string | undefined;
210
- pointerEvents?: string | undefined;
211
- }) => {
212
- fontSize: "var(--font-size-for-select-input-tag, 1rem)";
213
- color: string | undefined;
214
- padding: string;
215
- borderRadius: string;
216
- border: string;
217
- borderWidth: string;
218
- '&:last-child': {
219
- borderRadius: "var(--border-radius-for-tag, 2px)";
220
- borderWidth: "var(--border-width-1, 1px)";
221
- };
222
- fontColorForInput?: string | undefined;
223
- borderColorForInput?: string | undefined;
224
- backgroundColor?: string | undefined;
225
- borderTop?: string | undefined;
226
- borderColor?: string | undefined;
227
- boxShadow?: string | undefined;
228
- pointerEvents?: string | undefined;
229
- };
230
- multiValueRemove: (base: {
231
- fontColorForInput?: string | undefined;
232
- borderColorForInput?: string | undefined;
233
- color?: string | undefined;
234
- backgroundColor?: string | undefined;
235
- borderTop?: string | undefined;
236
- borderColor?: string | undefined;
237
- boxShadow?: string | undefined;
238
- pointerEvents?: string | undefined;
239
- }, state: {
240
- isFocused?: boolean | undefined;
241
- isDisabled?: boolean | undefined;
242
- isSelected?: boolean | undefined;
243
- }) => {
244
- borderColor: "var(--border-color-for-tag, hsl(232, 18%, 80%))";
245
- padding: string;
246
- borderRadius: string;
247
- borderStyle: string;
248
- borderWidth: string;
249
- pointerEvents: string | undefined;
250
- backgroundColor: "var(--background-color-for-tag, hsl(232, 18%, 95%))";
251
- 'svg *': {
252
- fill: string;
253
- };
254
- '&:hover, &:focus': {
255
- borderColor: "var(--border-color-for-tag-warning, #f16d0e)";
256
- backgroundColor: "var(--background-color-for-tag, hsl(232, 18%, 95%))";
257
- 'svg *': {
258
- fill: "var(--font-color-for-clear-input-icon-when-hovered, #e60050)";
259
- };
260
- };
261
- fontColorForInput?: string | undefined;
262
- borderColorForInput?: string | undefined;
263
- color?: string | undefined;
264
- borderTop?: string | undefined;
265
- boxShadow?: string | undefined;
266
- };
267
- indicatorsContainer: () => {
268
- background: string;
269
- display: string;
270
- alignItems: string;
271
- };
272
- option: (base: {
273
- fontColorForInput?: string | undefined;
274
- borderColorForInput?: string | undefined;
275
- color?: string | undefined;
276
- backgroundColor?: string | undefined;
277
- borderTop?: string | undefined;
278
- borderColor?: string | undefined;
279
- boxShadow?: string | undefined;
280
- pointerEvents?: string | undefined;
281
- }, state: {
282
- isFocused?: boolean | undefined;
283
- isDisabled?: boolean | undefined;
284
- isSelected?: boolean | undefined;
285
- }) => {
286
- transition: string;
287
- paddingLeft: "var(--padding-left-for-select-input-options, 16px)";
288
- paddingRight: "var(--padding-right-for-select-input-options, 16px)";
289
- paddingTop: "var(--padding-top-for-select-input-options, 8px)";
290
- paddingBottom: "var(--padding-bottom-for-select-input-options, 8px)";
291
- lineHeight: "var(--line-height-for-select-input-options, 1.625rem)";
292
- color: string | undefined;
293
- backgroundColor: string | undefined;
294
- '&:active': {
295
- color: string | undefined;
296
- backgroundColor: "var(--background-color-for-input-when-active, hsl(203.05555555555554, 93.9130434783%, 95%))";
297
- };
298
- fontColorForInput?: string | undefined;
299
- borderColorForInput?: string | undefined;
300
- borderTop?: string | undefined;
301
- borderColor?: string | undefined;
302
- boxShadow?: string | undefined;
303
- pointerEvents?: string | undefined;
304
- };
305
- placeholder: (base: {
306
- fontColorForInput?: string | undefined;
307
- borderColorForInput?: string | undefined;
308
- color?: string | undefined;
309
- backgroundColor?: string | undefined;
310
- borderTop?: string | undefined;
311
- borderColor?: string | undefined;
312
- boxShadow?: string | undefined;
313
- pointerEvents?: string | undefined;
314
- }) => {
315
- color: "var(--placeholder-font-color-for-input, hsl(232, 18%, 60%))";
316
- width: string;
317
- overflow: string;
318
- whiteSpace: string;
319
- textOverflow: string;
320
- fill: string | undefined;
321
- fontColorForInput?: string | undefined;
322
- borderColorForInput?: string | undefined;
323
- backgroundColor?: string | undefined;
324
- borderTop?: string | undefined;
325
- borderColor?: string | undefined;
326
- boxShadow?: string | undefined;
327
- pointerEvents?: string | undefined;
328
- };
329
- valueContainer: (base: {
330
- fontColorForInput?: string | undefined;
331
- borderColorForInput?: string | undefined;
332
- color?: string | undefined;
333
- backgroundColor?: string | undefined;
334
- borderTop?: string | undefined;
335
- borderColor?: string | undefined;
336
- boxShadow?: string | undefined;
337
- pointerEvents?: string | undefined;
338
- }) => {
339
- padding: string;
340
- backgroundColor: string;
341
- overflow: string;
342
- display: string;
343
- fill: "var(--font-color-for-input-when-disabled, hsl(232, 18%, 60%))" | "var(--font-color-for-select-input-icon, hsl(232, 18%, 60%))";
344
- fontColorForInput?: string | undefined;
345
- borderColorForInput?: string | undefined;
346
- color?: string | undefined;
347
- borderTop?: string | undefined;
348
- borderColor?: string | undefined;
349
- boxShadow?: string | undefined;
350
- pointerEvents?: string | undefined;
351
- };
352
- group: (base: {
353
- fontColorForInput?: string | undefined;
354
- borderColorForInput?: string | undefined;
355
- color?: string | undefined;
356
- backgroundColor?: string | undefined;
357
- borderTop?: string | undefined;
358
- borderColor?: string | undefined;
359
- boxShadow?: string | undefined;
360
- pointerEvents?: string | undefined;
361
- }) => {
362
- padding: number;
363
- '&:not(:first-of-type)': {
364
- borderTop: string | undefined;
365
- };
366
- fontColorForInput?: string | undefined;
367
- borderColorForInput?: string | undefined;
368
- color?: string | undefined;
369
- backgroundColor?: string | undefined;
370
- borderTop?: string | undefined;
371
- borderColor?: string | undefined;
372
- boxShadow?: string | undefined;
373
- pointerEvents?: string | undefined;
374
- };
375
- groupHeading: (base: {
376
- fontColorForInput?: string | undefined;
377
- borderColorForInput?: string | undefined;
378
- color?: string | undefined;
379
- backgroundColor?: string | undefined;
380
- borderTop?: string | undefined;
381
- borderColor?: string | undefined;
382
- boxShadow?: string | undefined;
383
- pointerEvents?: string | undefined;
384
- }) => {
385
- color: "var(--font-color-for-input-when-readonly, hsl(232, 18%, 40%))";
386
- fontSize: "var(--font-size-small, 0.9231rem)";
387
- textTransform: string;
388
- fontWeight: string;
389
- padding: string;
390
- '&:empty': {
391
- padding: number;
392
- };
393
- fontColorForInput?: string | undefined;
394
- borderColorForInput?: string | undefined;
395
- backgroundColor?: string | undefined;
396
- borderTop?: string | undefined;
397
- borderColor?: string | undefined;
398
- boxShadow?: string | undefined;
399
- pointerEvents?: string | undefined;
400
- };
401
- container: (base: {
402
- fontColorForInput?: string | undefined;
403
- borderColorForInput?: string | undefined;
404
- color?: string | undefined;
405
- backgroundColor?: string | undefined;
406
- borderTop?: string | undefined;
407
- borderColor?: string | undefined;
408
- boxShadow?: string | undefined;
409
- pointerEvents?: string | undefined;
410
- }, state: {
411
- isFocused?: boolean | undefined;
412
- isDisabled?: boolean | undefined;
413
- isSelected?: boolean | undefined;
414
- }) => {
415
- fontFamily: string;
416
- minHeight: "var(--size-height-input, 32px)";
417
- borderRadius: "var(--border-radius-for-input, 4px)";
418
- borderColor: string | undefined;
419
- boxShadow: string | undefined;
420
- fontColorForInput?: string | undefined;
421
- borderColorForInput?: string | undefined;
422
- color?: string | undefined;
423
- backgroundColor?: string | undefined;
424
- borderTop?: string | undefined;
425
- pointerEvents?: string | undefined;
426
- };
427
- };
428
- export { getSelectableSearchInputStyles, getSelectableSearchInputContainerStyles, getClearIconButtonStyles, getSearchIconButtonStyles, getBackgroundColor, createSelectableSelectStyles, };
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import type { TSelectableSearchInputProps, TOption } from './selectable-search-input';
3
- type TSelectableSelect = {
4
- dropdownHasFocus: boolean;
5
- handleDropdownFocus: () => void;
6
- handleDropdownBlur: () => void;
7
- textInputRef: React.RefObject<HTMLInputElement>;
8
- selectedOption?: TOption;
9
- } & TSelectableSearchInputProps;
10
- declare const SelectableSelect: (props: TSelectableSelect) => import("@emotion/react/jsx-runtime").JSX.Element;
11
- export default SelectableSelect;