@commercetools-uikit/select-utils 19.4.0 → 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 (!state.isDisabled) return designSystem.designTokens.fontColorForInput;
437
- if (state.isSelected) return designSystem.designTokens.fontColorForInput;
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
- color: (() => {
447
- if (!state.isDisabled) return designSystem.designTokens.fontColorForInput;
448
- return base.color;
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.4.0";
627
+ var version = "19.5.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 (!state.isDisabled) return designSystem.designTokens.fontColorForInput;
437
- if (state.isSelected) return designSystem.designTokens.fontColorForInput;
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
- color: (() => {
447
- if (!state.isDisabled) return designSystem.designTokens.fontColorForInput;
448
- return base.color;
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.4.0";
624
+ var version = "19.5.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 (!state.isDisabled) return designTokens.fontColorForInput;
417
- if (state.isSelected) return designTokens.fontColorForInput;
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
- color: (() => {
427
- if (!state.isDisabled) return designTokens.fontColorForInput;
428
- return base.color;
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.4.0";
607
+ var version = "19.5.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 };
@@ -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: string | undefined;
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
- color: string | undefined;
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;
@@ -240,12 +239,12 @@ export default function createSelectStyles(props: TProps): {
240
239
  pointerEvents?: string | undefined;
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%))";
247
+ flexWrap?: string | undefined;
249
248
  fontColorForInput?: string | undefined;
250
249
  borderColorForInput?: string | undefined;
251
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.0",
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.4.0",
25
- "@commercetools-uikit/design-system": "19.4.0",
26
- "@commercetools-uikit/icons": "19.4.0",
27
- "@commercetools-uikit/spacings": "19.4.0",
28
- "@commercetools-uikit/text": "19.4.0",
29
- "@commercetools-uikit/utils": "19.4.0",
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",