@commercetools-uikit/select-utils 19.3.1 → 19.5.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.
|
@@ -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,7 +471,9 @@ const placeholderStyles = props => base => {
|
|
|
473
471
|
};
|
|
474
472
|
const valueContainerStyles = props => base => {
|
|
475
473
|
var _props$controlShouldR;
|
|
476
|
-
return _objectSpread(_objectSpread({}, base),
|
|
474
|
+
return _objectSpread(_objectSpread(_objectSpread({}, base), !props.isMulti && {
|
|
475
|
+
flexWrap: 'nowrap'
|
|
476
|
+
}), {}, {
|
|
477
477
|
padding: '0',
|
|
478
478
|
backgroundColor: 'none',
|
|
479
479
|
overflow: 'hidden',
|
|
@@ -624,7 +624,7 @@ const warnIfMenuPortalPropsAreMissing = props => {
|
|
|
624
624
|
};
|
|
625
625
|
|
|
626
626
|
// NOTE: This string will be replaced on build time with the package version.
|
|
627
|
-
var version = "19.
|
|
627
|
+
var version = "19.5.0";
|
|
628
628
|
|
|
629
629
|
exports.ClearIndicator = ClearIndicator$1;
|
|
630
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,7 +471,9 @@ const placeholderStyles = props => base => {
|
|
|
473
471
|
};
|
|
474
472
|
const valueContainerStyles = props => base => {
|
|
475
473
|
var _props$controlShouldR;
|
|
476
|
-
return _objectSpread(_objectSpread({}, base),
|
|
474
|
+
return _objectSpread(_objectSpread(_objectSpread({}, base), !props.isMulti && {
|
|
475
|
+
flexWrap: 'nowrap'
|
|
476
|
+
}), {}, {
|
|
477
477
|
padding: '0',
|
|
478
478
|
backgroundColor: 'none',
|
|
479
479
|
overflow: 'hidden',
|
|
@@ -621,7 +621,7 @@ const warnIfMenuPortalPropsAreMissing = props => {
|
|
|
621
621
|
};
|
|
622
622
|
|
|
623
623
|
// NOTE: This string will be replaced on build time with the package version.
|
|
624
|
-
var version = "19.
|
|
624
|
+
var version = "19.5.0";
|
|
625
625
|
|
|
626
626
|
exports.ClearIndicator = ClearIndicator$1;
|
|
627
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,7 +451,9 @@ const placeholderStyles = props => base => {
|
|
|
453
451
|
};
|
|
454
452
|
const valueContainerStyles = props => base => {
|
|
455
453
|
var _props$controlShouldR;
|
|
456
|
-
return _objectSpread(_objectSpread({}, base),
|
|
454
|
+
return _objectSpread(_objectSpread(_objectSpread({}, base), !props.isMulti && {
|
|
455
|
+
flexWrap: 'nowrap'
|
|
456
|
+
}), {}, {
|
|
457
457
|
padding: '0',
|
|
458
458
|
backgroundColor: 'none',
|
|
459
459
|
overflow: 'hidden',
|
|
@@ -604,6 +604,6 @@ const warnIfMenuPortalPropsAreMissing = props => {
|
|
|
604
604
|
};
|
|
605
605
|
|
|
606
606
|
// NOTE: This string will be replaced on build time with the package version.
|
|
607
|
-
var version = "19.
|
|
607
|
+
var version = "19.5.0";
|
|
608
608
|
|
|
609
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 };
|
|
@@ -211,11 +211,10 @@ 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
219
|
fontColorForInput?: string | undefined;
|
|
221
220
|
borderColorForInput?: string | undefined;
|
|
@@ -245,6 +244,7 @@ export default function createSelectStyles(props: TProps): {
|
|
|
245
244
|
overflow: string;
|
|
246
245
|
display: string;
|
|
247
246
|
fill: "var(--color-neutral-60, hsl(232, 18%, 60%))" | "var(--font-color-for-input-when-disabled, hsl(232, 18%, 60%))";
|
|
247
|
+
flexWrap?: string | undefined;
|
|
248
248
|
fontColorForInput?: string | undefined;
|
|
249
249
|
borderColorForInput?: string | undefined;
|
|
250
250
|
color?: string | undefined;
|
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.5.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.5.0",
|
|
25
|
+
"@commercetools-uikit/design-system": "19.5.0",
|
|
26
|
+
"@commercetools-uikit/icons": "19.5.0",
|
|
27
|
+
"@commercetools-uikit/spacings": "19.5.0",
|
|
28
|
+
"@commercetools-uikit/text": "19.5.0",
|
|
29
|
+
"@commercetools-uikit/utils": "19.5.0",
|
|
30
30
|
"@emotion/react": "^11.10.5",
|
|
31
31
|
"@emotion/styled": "^11.10.5",
|
|
32
32
|
"lodash": "4.17.21",
|