@commercetools-uikit/select-utils 19.4.0 → 19.6.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/dist/commercetools-uikit-select-utils.cjs.dev.js +10 -11
- package/dist/commercetools-uikit-select-utils.cjs.prod.js +10 -11
- package/dist/commercetools-uikit-select-utils.esm.js +10 -11
- package/dist/declarations/src/create-select-styles.d.ts +116 -117
- package/dist/declarations/src/wrapper-with-icon/wrapper-with-icon.d.ts +3 -4
- package/package.json +7 -7
|
@@ -433,9 +433,8 @@ const optionStyles = props => (base, state) => {
|
|
|
433
433
|
fontSize: props.isCondensed ? designSystem.designTokens.fontSize20 : designSystem.designTokens.fontSize30,
|
|
434
434
|
cursor: state.isDisabled ? 'not-allowed' : 'pointer',
|
|
435
435
|
color: (() => {
|
|
436
|
-
if (
|
|
437
|
-
|
|
438
|
-
return base.color;
|
|
436
|
+
if (state.isDisabled) return designSystem.designTokens.fontColorForInputWhenDisabled;
|
|
437
|
+
return designSystem.designTokens.fontColorForInput;
|
|
439
438
|
})(),
|
|
440
439
|
backgroundColor: (() => {
|
|
441
440
|
if (state.isSelected) return designSystem.designTokens.colorPrimary95;
|
|
@@ -443,11 +442,10 @@ const optionStyles = props => (base, state) => {
|
|
|
443
442
|
return base.backgroundColor;
|
|
444
443
|
})(),
|
|
445
444
|
'&:active': {
|
|
446
|
-
|
|
447
|
-
if (
|
|
448
|
-
return
|
|
449
|
-
})()
|
|
450
|
-
backgroundColor: designSystem.designTokens.colorPrimary95
|
|
445
|
+
backgroundColor: (() => {
|
|
446
|
+
if (state.isDisabled) return designSystem.designTokens.colorTransparent;
|
|
447
|
+
return designSystem.designTokens.colorPrimary95;
|
|
448
|
+
})()
|
|
451
449
|
}
|
|
452
450
|
});
|
|
453
451
|
};
|
|
@@ -473,8 +471,9 @@ const placeholderStyles = props => base => {
|
|
|
473
471
|
};
|
|
474
472
|
const valueContainerStyles = props => base => {
|
|
475
473
|
var _props$controlShouldR;
|
|
476
|
-
return _objectSpread(_objectSpread({}, base),
|
|
477
|
-
flexWrap: 'nowrap'
|
|
474
|
+
return _objectSpread(_objectSpread(_objectSpread({}, base), !props.isMulti && {
|
|
475
|
+
flexWrap: 'nowrap'
|
|
476
|
+
}), {}, {
|
|
478
477
|
padding: '0',
|
|
479
478
|
backgroundColor: 'none',
|
|
480
479
|
overflow: 'hidden',
|
|
@@ -625,7 +624,7 @@ const warnIfMenuPortalPropsAreMissing = props => {
|
|
|
625
624
|
};
|
|
626
625
|
|
|
627
626
|
// NOTE: This string will be replaced on build time with the package version.
|
|
628
|
-
var version = "19.
|
|
627
|
+
var version = "19.6.0";
|
|
629
628
|
|
|
630
629
|
exports.ClearIndicator = ClearIndicator$1;
|
|
631
630
|
exports.CustomSelectInputOption = CustomSelectInputOption;
|
|
@@ -433,9 +433,8 @@ const optionStyles = props => (base, state) => {
|
|
|
433
433
|
fontSize: props.isCondensed ? designSystem.designTokens.fontSize20 : designSystem.designTokens.fontSize30,
|
|
434
434
|
cursor: state.isDisabled ? 'not-allowed' : 'pointer',
|
|
435
435
|
color: (() => {
|
|
436
|
-
if (
|
|
437
|
-
|
|
438
|
-
return base.color;
|
|
436
|
+
if (state.isDisabled) return designSystem.designTokens.fontColorForInputWhenDisabled;
|
|
437
|
+
return designSystem.designTokens.fontColorForInput;
|
|
439
438
|
})(),
|
|
440
439
|
backgroundColor: (() => {
|
|
441
440
|
if (state.isSelected) return designSystem.designTokens.colorPrimary95;
|
|
@@ -443,11 +442,10 @@ const optionStyles = props => (base, state) => {
|
|
|
443
442
|
return base.backgroundColor;
|
|
444
443
|
})(),
|
|
445
444
|
'&:active': {
|
|
446
|
-
|
|
447
|
-
if (
|
|
448
|
-
return
|
|
449
|
-
})()
|
|
450
|
-
backgroundColor: designSystem.designTokens.colorPrimary95
|
|
445
|
+
backgroundColor: (() => {
|
|
446
|
+
if (state.isDisabled) return designSystem.designTokens.colorTransparent;
|
|
447
|
+
return designSystem.designTokens.colorPrimary95;
|
|
448
|
+
})()
|
|
451
449
|
}
|
|
452
450
|
});
|
|
453
451
|
};
|
|
@@ -473,8 +471,9 @@ const placeholderStyles = props => base => {
|
|
|
473
471
|
};
|
|
474
472
|
const valueContainerStyles = props => base => {
|
|
475
473
|
var _props$controlShouldR;
|
|
476
|
-
return _objectSpread(_objectSpread({}, base),
|
|
477
|
-
flexWrap: 'nowrap'
|
|
474
|
+
return _objectSpread(_objectSpread(_objectSpread({}, base), !props.isMulti && {
|
|
475
|
+
flexWrap: 'nowrap'
|
|
476
|
+
}), {}, {
|
|
478
477
|
padding: '0',
|
|
479
478
|
backgroundColor: 'none',
|
|
480
479
|
overflow: 'hidden',
|
|
@@ -622,7 +621,7 @@ const warnIfMenuPortalPropsAreMissing = props => {
|
|
|
622
621
|
};
|
|
623
622
|
|
|
624
623
|
// NOTE: This string will be replaced on build time with the package version.
|
|
625
|
-
var version = "19.
|
|
624
|
+
var version = "19.6.0";
|
|
626
625
|
|
|
627
626
|
exports.ClearIndicator = ClearIndicator$1;
|
|
628
627
|
exports.CustomSelectInputOption = CustomSelectInputOption;
|
|
@@ -413,9 +413,8 @@ const optionStyles = props => (base, state) => {
|
|
|
413
413
|
fontSize: props.isCondensed ? designTokens.fontSize20 : designTokens.fontSize30,
|
|
414
414
|
cursor: state.isDisabled ? 'not-allowed' : 'pointer',
|
|
415
415
|
color: (() => {
|
|
416
|
-
if (
|
|
417
|
-
|
|
418
|
-
return base.color;
|
|
416
|
+
if (state.isDisabled) return designTokens.fontColorForInputWhenDisabled;
|
|
417
|
+
return designTokens.fontColorForInput;
|
|
419
418
|
})(),
|
|
420
419
|
backgroundColor: (() => {
|
|
421
420
|
if (state.isSelected) return designTokens.colorPrimary95;
|
|
@@ -423,11 +422,10 @@ const optionStyles = props => (base, state) => {
|
|
|
423
422
|
return base.backgroundColor;
|
|
424
423
|
})(),
|
|
425
424
|
'&:active': {
|
|
426
|
-
|
|
427
|
-
if (
|
|
428
|
-
return
|
|
429
|
-
})()
|
|
430
|
-
backgroundColor: designTokens.colorPrimary95
|
|
425
|
+
backgroundColor: (() => {
|
|
426
|
+
if (state.isDisabled) return designTokens.colorTransparent;
|
|
427
|
+
return designTokens.colorPrimary95;
|
|
428
|
+
})()
|
|
431
429
|
}
|
|
432
430
|
});
|
|
433
431
|
};
|
|
@@ -453,8 +451,9 @@ const placeholderStyles = props => base => {
|
|
|
453
451
|
};
|
|
454
452
|
const valueContainerStyles = props => base => {
|
|
455
453
|
var _props$controlShouldR;
|
|
456
|
-
return _objectSpread(_objectSpread({}, base),
|
|
457
|
-
flexWrap: 'nowrap'
|
|
454
|
+
return _objectSpread(_objectSpread(_objectSpread({}, base), !props.isMulti && {
|
|
455
|
+
flexWrap: 'nowrap'
|
|
456
|
+
}), {}, {
|
|
458
457
|
padding: '0',
|
|
459
458
|
backgroundColor: 'none',
|
|
460
459
|
overflow: 'hidden',
|
|
@@ -605,6 +604,6 @@ const warnIfMenuPortalPropsAreMissing = props => {
|
|
|
605
604
|
};
|
|
606
605
|
|
|
607
606
|
// NOTE: This string will be replaced on build time with the package version.
|
|
608
|
-
var version = "19.
|
|
607
|
+
var version = "19.6.0";
|
|
609
608
|
|
|
610
609
|
export { ClearIndicator$1 as ClearIndicator, CustomSelectInputOption, DoublePropertySelectInputOption, DropdownIndicator$1 as DropdownIndicator, MultiplePropertiesSelectInputOption, SELECT_DROPDOWN_OPTION_TYPES, SearchIconDropdownIndicator$1 as SearchIconDropdownIndicator, TagRemove$1 as TagRemove, WrapperWithIcon$1 as ValueWrapperWithIcon, createSelectStyles, customComponents as customComponentsWithIcons, messages, version, warnIfMenuPortalPropsAreMissing };
|
|
@@ -54,9 +54,9 @@ export default function createSelectStyles(props: TProps): {
|
|
|
54
54
|
transition: string;
|
|
55
55
|
outline: number;
|
|
56
56
|
boxShadow: string;
|
|
57
|
-
fontColorForInput?: string
|
|
58
|
-
borderColorForInput?: string
|
|
59
|
-
borderTop?: string
|
|
57
|
+
fontColorForInput?: string;
|
|
58
|
+
borderColorForInput?: string;
|
|
59
|
+
borderTop?: string;
|
|
60
60
|
};
|
|
61
61
|
menu: (base: TBase) => {
|
|
62
62
|
border: string;
|
|
@@ -70,25 +70,25 @@ export default function createSelectStyles(props: TProps): {
|
|
|
70
70
|
width: string;
|
|
71
71
|
minWidth: string;
|
|
72
72
|
maxWidth: string;
|
|
73
|
-
fontColorForInput?: string
|
|
74
|
-
borderColorForInput?: string
|
|
75
|
-
color?: string
|
|
76
|
-
borderTop?: string
|
|
77
|
-
pointerEvents?: string
|
|
73
|
+
fontColorForInput?: string;
|
|
74
|
+
borderColorForInput?: string;
|
|
75
|
+
color?: string;
|
|
76
|
+
borderTop?: string;
|
|
77
|
+
pointerEvents?: string;
|
|
78
78
|
};
|
|
79
79
|
indicatorSeparator: (base: TBase) => {
|
|
80
80
|
display: string;
|
|
81
81
|
margin: string;
|
|
82
82
|
padding: string;
|
|
83
83
|
marginLeft: "var(--spacing-10, 4px)";
|
|
84
|
-
fontColorForInput?: string
|
|
85
|
-
borderColorForInput?: string
|
|
86
|
-
color?: string
|
|
87
|
-
backgroundColor?: string
|
|
88
|
-
borderTop?: string
|
|
89
|
-
borderColor?: string
|
|
90
|
-
boxShadow?: string
|
|
91
|
-
pointerEvents?: string
|
|
84
|
+
fontColorForInput?: string;
|
|
85
|
+
borderColorForInput?: string;
|
|
86
|
+
color?: string;
|
|
87
|
+
backgroundColor?: string;
|
|
88
|
+
borderTop?: string;
|
|
89
|
+
borderColor?: string;
|
|
90
|
+
boxShadow?: string;
|
|
91
|
+
pointerEvents?: string;
|
|
92
92
|
};
|
|
93
93
|
dropdownIndicator: (base: TBase) => {
|
|
94
94
|
color: "var(--font-color-for-input, #1a1a1a)";
|
|
@@ -96,49 +96,49 @@ export default function createSelectStyles(props: TProps): {
|
|
|
96
96
|
padding: string;
|
|
97
97
|
marginLeft: "var(--spacing-20, 8px)";
|
|
98
98
|
fill: "var(--color-neutral-60, hsl(232, 18%, 60%))" | "var(--color-warning, hsl(35, 90%, 45%))" | "var(--color-error, hsl(3, 65%, 58%))" | "var(--font-color-for-input-when-disabled, hsl(232, 18%, 60%))";
|
|
99
|
-
fontColorForInput?: string
|
|
100
|
-
borderColorForInput?: string
|
|
101
|
-
backgroundColor?: string
|
|
102
|
-
borderTop?: string
|
|
103
|
-
borderColor?: string
|
|
104
|
-
boxShadow?: string
|
|
105
|
-
pointerEvents?: string
|
|
99
|
+
fontColorForInput?: string;
|
|
100
|
+
borderColorForInput?: string;
|
|
101
|
+
backgroundColor?: string;
|
|
102
|
+
borderTop?: string;
|
|
103
|
+
borderColor?: string;
|
|
104
|
+
boxShadow?: string;
|
|
105
|
+
pointerEvents?: string;
|
|
106
106
|
};
|
|
107
107
|
clearIndicator: (base: TBase) => {
|
|
108
108
|
display: string;
|
|
109
109
|
padding: number;
|
|
110
110
|
marginLeft: "var(--spacing-20, 8px)";
|
|
111
|
-
fontColorForInput?: string
|
|
112
|
-
borderColorForInput?: string
|
|
113
|
-
color?: string
|
|
114
|
-
backgroundColor?: string
|
|
115
|
-
borderTop?: string
|
|
116
|
-
borderColor?: string
|
|
117
|
-
boxShadow?: string
|
|
118
|
-
pointerEvents?: string
|
|
111
|
+
fontColorForInput?: string;
|
|
112
|
+
borderColorForInput?: string;
|
|
113
|
+
color?: string;
|
|
114
|
+
backgroundColor?: string;
|
|
115
|
+
borderTop?: string;
|
|
116
|
+
borderColor?: string;
|
|
117
|
+
boxShadow?: string;
|
|
118
|
+
pointerEvents?: string;
|
|
119
119
|
};
|
|
120
120
|
menuList: (base: TBase) => {
|
|
121
121
|
padding: string;
|
|
122
122
|
borderRadius: "var(--border-radius-for-input, 4px)";
|
|
123
123
|
backgroundColor: "var(--background-color-for-input, #fff)";
|
|
124
|
-
fontColorForInput?: string
|
|
125
|
-
borderColorForInput?: string
|
|
126
|
-
color?: string
|
|
127
|
-
borderTop?: string
|
|
128
|
-
borderColor?: string
|
|
129
|
-
boxShadow?: string
|
|
130
|
-
pointerEvents?: string
|
|
124
|
+
fontColorForInput?: string;
|
|
125
|
+
borderColorForInput?: string;
|
|
126
|
+
color?: string;
|
|
127
|
+
borderTop?: string;
|
|
128
|
+
borderColor?: string;
|
|
129
|
+
boxShadow?: string;
|
|
130
|
+
pointerEvents?: string;
|
|
131
131
|
};
|
|
132
132
|
menuPortal: (base: TBase) => {
|
|
133
133
|
zIndex: number | undefined;
|
|
134
|
-
fontColorForInput?: string
|
|
135
|
-
borderColorForInput?: string
|
|
136
|
-
color?: string
|
|
137
|
-
backgroundColor?: string
|
|
138
|
-
borderTop?: string
|
|
139
|
-
borderColor?: string
|
|
140
|
-
boxShadow?: string
|
|
141
|
-
pointerEvents?: string
|
|
134
|
+
fontColorForInput?: string;
|
|
135
|
+
borderColorForInput?: string;
|
|
136
|
+
color?: string;
|
|
137
|
+
backgroundColor?: string;
|
|
138
|
+
borderTop?: string;
|
|
139
|
+
borderColor?: string;
|
|
140
|
+
boxShadow?: string;
|
|
141
|
+
pointerEvents?: string;
|
|
142
142
|
};
|
|
143
143
|
multiValue: (base: TBase) => {
|
|
144
144
|
display: string;
|
|
@@ -148,13 +148,13 @@ export default function createSelectStyles(props: TProps): {
|
|
|
148
148
|
padding: string;
|
|
149
149
|
border: string;
|
|
150
150
|
borderRadius: "var(--border-radius-20, 20px)";
|
|
151
|
-
fontColorForInput?: string
|
|
152
|
-
borderColorForInput?: string
|
|
153
|
-
color?: string
|
|
154
|
-
borderTop?: string
|
|
155
|
-
borderColor?: string
|
|
156
|
-
boxShadow?: string
|
|
157
|
-
pointerEvents?: string
|
|
151
|
+
fontColorForInput?: string;
|
|
152
|
+
borderColorForInput?: string;
|
|
153
|
+
color?: string;
|
|
154
|
+
borderTop?: string;
|
|
155
|
+
borderColor?: string;
|
|
156
|
+
boxShadow?: string;
|
|
157
|
+
pointerEvents?: string;
|
|
158
158
|
};
|
|
159
159
|
multiValueLabel: (base: TBase) => {
|
|
160
160
|
fontSize: "var(--font-size-20, 0.875rem)" | "var(--font-size-30, 1rem)";
|
|
@@ -168,13 +168,13 @@ export default function createSelectStyles(props: TProps): {
|
|
|
168
168
|
borderRadius: "var(--border-radius-2, 2px)";
|
|
169
169
|
borderWidth: "var(--border-width-1, 1px)";
|
|
170
170
|
};
|
|
171
|
-
fontColorForInput?: string
|
|
172
|
-
borderColorForInput?: string
|
|
173
|
-
backgroundColor?: string
|
|
174
|
-
borderTop?: string
|
|
175
|
-
borderColor?: string
|
|
176
|
-
boxShadow?: string
|
|
177
|
-
pointerEvents?: string
|
|
171
|
+
fontColorForInput?: string;
|
|
172
|
+
borderColorForInput?: string;
|
|
173
|
+
backgroundColor?: string;
|
|
174
|
+
borderTop?: string;
|
|
175
|
+
borderColor?: string;
|
|
176
|
+
boxShadow?: string;
|
|
177
|
+
pointerEvents?: string;
|
|
178
178
|
};
|
|
179
179
|
multiValueRemove: (base: TBase, state: TState) => {
|
|
180
180
|
borderColor: "var(--color-neutral, hsl(232, 18%, 80%))";
|
|
@@ -194,11 +194,11 @@ export default function createSelectStyles(props: TProps): {
|
|
|
194
194
|
fill: "var(--color-error, hsl(3, 65%, 58%))";
|
|
195
195
|
};
|
|
196
196
|
};
|
|
197
|
-
fontColorForInput?: string
|
|
198
|
-
borderColorForInput?: string
|
|
199
|
-
color?: string
|
|
200
|
-
borderTop?: string
|
|
201
|
-
boxShadow?: string
|
|
197
|
+
fontColorForInput?: string;
|
|
198
|
+
borderColorForInput?: string;
|
|
199
|
+
color?: string;
|
|
200
|
+
borderTop?: string;
|
|
201
|
+
boxShadow?: string;
|
|
202
202
|
};
|
|
203
203
|
indicatorsContainer: () => {
|
|
204
204
|
background: string;
|
|
@@ -211,18 +211,17 @@ export default function createSelectStyles(props: TProps): {
|
|
|
211
211
|
lineHeight: "var(--line-height-40, 1.625rem)";
|
|
212
212
|
fontSize: "var(--font-size-20, 0.875rem)" | "var(--font-size-30, 1rem)";
|
|
213
213
|
cursor: string;
|
|
214
|
-
color:
|
|
214
|
+
color: "var(--font-color-for-input, #1a1a1a)" | "var(--font-color-for-input-when-disabled, hsl(232, 18%, 60%))";
|
|
215
215
|
backgroundColor: string | undefined;
|
|
216
216
|
'&:active': {
|
|
217
|
-
|
|
218
|
-
backgroundColor: "var(--color-primary-95, hsl(244, 100%, 97%))";
|
|
217
|
+
backgroundColor: "var(--color-primary-95, hsl(244, 100%, 97%))" | "var(--color-transparent, transparent)";
|
|
219
218
|
};
|
|
220
|
-
fontColorForInput?: string
|
|
221
|
-
borderColorForInput?: string
|
|
222
|
-
borderTop?: string
|
|
223
|
-
borderColor?: string
|
|
224
|
-
boxShadow?: string
|
|
225
|
-
pointerEvents?: string
|
|
219
|
+
fontColorForInput?: string;
|
|
220
|
+
borderColorForInput?: string;
|
|
221
|
+
borderTop?: string;
|
|
222
|
+
borderColor?: string;
|
|
223
|
+
boxShadow?: string;
|
|
224
|
+
pointerEvents?: string;
|
|
226
225
|
};
|
|
227
226
|
placeholder: (base: TBase) => {
|
|
228
227
|
color: "var(--color-neutral-60, hsl(232, 18%, 60%))" | "var(--color-warning, hsl(35, 90%, 45%))" | "var(--color-error, hsl(3, 65%, 58%))";
|
|
@@ -231,52 +230,52 @@ export default function createSelectStyles(props: TProps): {
|
|
|
231
230
|
whiteSpace: string;
|
|
232
231
|
textOverflow: string;
|
|
233
232
|
fill: string | undefined;
|
|
234
|
-
fontColorForInput?: string
|
|
235
|
-
borderColorForInput?: string
|
|
236
|
-
backgroundColor?: string
|
|
237
|
-
borderTop?: string
|
|
238
|
-
borderColor?: string
|
|
239
|
-
boxShadow?: string
|
|
240
|
-
pointerEvents?: string
|
|
233
|
+
fontColorForInput?: string;
|
|
234
|
+
borderColorForInput?: string;
|
|
235
|
+
backgroundColor?: string;
|
|
236
|
+
borderTop?: string;
|
|
237
|
+
borderColor?: string;
|
|
238
|
+
boxShadow?: string;
|
|
239
|
+
pointerEvents?: string;
|
|
241
240
|
};
|
|
242
241
|
valueContainer: (base: TBase) => {
|
|
243
|
-
flexWrap: string;
|
|
244
242
|
padding: string;
|
|
245
243
|
backgroundColor: string;
|
|
246
244
|
overflow: string;
|
|
247
245
|
display: string;
|
|
248
246
|
fill: "var(--color-neutral-60, hsl(232, 18%, 60%))" | "var(--font-color-for-input-when-disabled, hsl(232, 18%, 60%))";
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
247
|
+
flexWrap?: string | undefined;
|
|
248
|
+
fontColorForInput?: string;
|
|
249
|
+
borderColorForInput?: string;
|
|
250
|
+
color?: string;
|
|
251
|
+
borderTop?: string;
|
|
252
|
+
borderColor?: string;
|
|
253
|
+
boxShadow?: string;
|
|
254
|
+
pointerEvents?: string;
|
|
256
255
|
};
|
|
257
256
|
singleValue: (base: TBase) => {
|
|
258
257
|
color: "var(--color-warning, hsl(35, 90%, 45%))" | "var(--color-error, hsl(3, 65%, 58%))" | "var(--font-color-for-input, #1a1a1a)" | "var(--font-color-for-input-when-disabled, hsl(232, 18%, 60%))" | "var(--font-color-for-input-when-readonly, hsl(232, 18%, 40%))";
|
|
259
|
-
fontColorForInput?: string
|
|
260
|
-
borderColorForInput?: string
|
|
261
|
-
backgroundColor?: string
|
|
262
|
-
borderTop?: string
|
|
263
|
-
borderColor?: string
|
|
264
|
-
boxShadow?: string
|
|
265
|
-
pointerEvents?: string
|
|
258
|
+
fontColorForInput?: string;
|
|
259
|
+
borderColorForInput?: string;
|
|
260
|
+
backgroundColor?: string;
|
|
261
|
+
borderTop?: string;
|
|
262
|
+
borderColor?: string;
|
|
263
|
+
boxShadow?: string;
|
|
264
|
+
pointerEvents?: string;
|
|
266
265
|
};
|
|
267
266
|
group: (base: TBase) => {
|
|
268
267
|
padding: number;
|
|
269
268
|
'&:not(:first-of-type)': {
|
|
270
269
|
borderTop: string | undefined;
|
|
271
270
|
};
|
|
272
|
-
fontColorForInput?: string
|
|
273
|
-
borderColorForInput?: string
|
|
274
|
-
color?: string
|
|
275
|
-
backgroundColor?: string
|
|
276
|
-
borderTop?: string
|
|
277
|
-
borderColor?: string
|
|
278
|
-
boxShadow?: string
|
|
279
|
-
pointerEvents?: string
|
|
271
|
+
fontColorForInput?: string;
|
|
272
|
+
borderColorForInput?: string;
|
|
273
|
+
color?: string;
|
|
274
|
+
backgroundColor?: string;
|
|
275
|
+
borderTop?: string;
|
|
276
|
+
borderColor?: string;
|
|
277
|
+
boxShadow?: string;
|
|
278
|
+
pointerEvents?: string;
|
|
280
279
|
};
|
|
281
280
|
groupHeading: (base: TBase) => {
|
|
282
281
|
color: "var(--font-color-for-input-when-readonly, hsl(232, 18%, 40%))";
|
|
@@ -288,13 +287,13 @@ export default function createSelectStyles(props: TProps): {
|
|
|
288
287
|
'&:empty': {
|
|
289
288
|
padding: number;
|
|
290
289
|
};
|
|
291
|
-
fontColorForInput?: string
|
|
292
|
-
borderColorForInput?: string
|
|
293
|
-
backgroundColor?: string
|
|
294
|
-
borderTop?: string
|
|
295
|
-
borderColor?: string
|
|
296
|
-
boxShadow?: string
|
|
297
|
-
pointerEvents?: string
|
|
290
|
+
fontColorForInput?: string;
|
|
291
|
+
borderColorForInput?: string;
|
|
292
|
+
backgroundColor?: string;
|
|
293
|
+
borderTop?: string;
|
|
294
|
+
borderColor?: string;
|
|
295
|
+
boxShadow?: string;
|
|
296
|
+
pointerEvents?: string;
|
|
298
297
|
};
|
|
299
298
|
container: (base: TBase, state: TState) => {
|
|
300
299
|
fontFamily: string;
|
|
@@ -302,12 +301,12 @@ export default function createSelectStyles(props: TProps): {
|
|
|
302
301
|
borderRadius: "var(--border-radius-for-input, 4px)";
|
|
303
302
|
borderColor: string | undefined;
|
|
304
303
|
boxShadow: string | undefined;
|
|
305
|
-
fontColorForInput?: string
|
|
306
|
-
borderColorForInput?: string
|
|
307
|
-
color?: string
|
|
308
|
-
backgroundColor?: string
|
|
309
|
-
borderTop?: string
|
|
310
|
-
pointerEvents?: string
|
|
304
|
+
fontColorForInput?: string;
|
|
305
|
+
borderColorForInput?: string;
|
|
306
|
+
color?: string;
|
|
307
|
+
backgroundColor?: string;
|
|
308
|
+
borderTop?: string;
|
|
309
|
+
pointerEvents?: string;
|
|
311
310
|
};
|
|
312
311
|
};
|
|
313
312
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type SingleValueProps, type PlaceholderProps } from 'react-select';
|
|
3
2
|
import { TSelectInputCustomComponentProps } from "../types.js";
|
|
4
3
|
export type TSingleValueWrapperWithIconProps = {
|
|
@@ -10,12 +9,12 @@ export type TPlaceholderWrapperWithIconProps = {
|
|
|
10
9
|
export type TWrapperWithIconProps<Type extends 'singleValue' | 'placeholder'> = Type extends 'singleValue' ? TSingleValueWrapperWithIconProps : Type extends 'placeholder' ? TPlaceholderWrapperWithIconProps : never;
|
|
11
10
|
export type TDefaultComponent<Type extends 'singleValue' | 'placeholder'> = (props: Type extends 'singleValue' ? SingleValueProps : Type extends 'placeholder' ? PlaceholderProps : never) => JSX.Element;
|
|
12
11
|
declare const WrapperWithIcon: {
|
|
13
|
-
<Type extends "
|
|
12
|
+
<Type extends "singleValue" | "placeholder">(props: TWrapperWithIconProps<Type>): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
14
13
|
displayName: string;
|
|
15
14
|
};
|
|
16
15
|
export default WrapperWithIcon;
|
|
17
16
|
declare const customComponents: {
|
|
18
|
-
SingleValue: (props: TWrapperWithIconProps<
|
|
19
|
-
Placeholder: (props: TWrapperWithIconProps<
|
|
17
|
+
SingleValue: (props: TWrapperWithIconProps<"singleValue">) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
|
+
Placeholder: (props: TWrapperWithIconProps<"placeholder">) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
19
|
};
|
|
21
20
|
export { customComponents };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/select-utils",
|
|
3
3
|
"description": "Utilities for working with select components.",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.6.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/accessible-button": "19.
|
|
25
|
-
"@commercetools-uikit/design-system": "19.
|
|
26
|
-
"@commercetools-uikit/icons": "19.
|
|
27
|
-
"@commercetools-uikit/spacings": "19.
|
|
28
|
-
"@commercetools-uikit/text": "19.
|
|
29
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/accessible-button": "19.6.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "19.6.0",
|
|
26
|
+
"@commercetools-uikit/icons": "19.6.0",
|
|
27
|
+
"@commercetools-uikit/spacings": "19.6.0",
|
|
28
|
+
"@commercetools-uikit/text": "19.6.0",
|
|
29
|
+
"@commercetools-uikit/utils": "19.6.0",
|
|
30
30
|
"@emotion/react": "^11.10.5",
|
|
31
31
|
"@emotion/styled": "^11.10.5",
|
|
32
32
|
"lodash": "4.17.21",
|