@razorpay/blade 10.13.1 → 10.14.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.
Files changed (29) hide show
  1. package/build/components/index.d.ts +114 -46
  2. package/build/components/index.development.web.js +166 -147
  3. package/build/components/index.development.web.js.map +1 -1
  4. package/build/components/index.native.d.ts +114 -46
  5. package/build/components/index.native.js +18 -18
  6. package/build/components/index.native.js.map +1 -1
  7. package/build/components/index.production.web.js +166 -147
  8. package/build/components/index.production.web.js.map +1 -1
  9. package/build/css/bankingThemeDarkDesktop.css +333 -157
  10. package/build/css/bankingThemeDarkMobile.css +333 -157
  11. package/build/css/bankingThemeLightDesktop.css +332 -156
  12. package/build/css/bankingThemeLightMobile.css +332 -156
  13. package/build/css/paymentThemeDarkDesktop.css +333 -157
  14. package/build/css/paymentThemeDarkMobile.css +333 -157
  15. package/build/css/paymentThemeLightDesktop.css +332 -156
  16. package/build/css/paymentThemeLightMobile.css +332 -156
  17. package/build/tokens/index.d.ts +46 -25
  18. package/build/tokens/index.development.web.js +3344 -1488
  19. package/build/tokens/index.development.web.js.map +1 -1
  20. package/build/tokens/index.native.d.ts +46 -25
  21. package/build/tokens/index.native.js +2 -2
  22. package/build/tokens/index.native.js.map +1 -1
  23. package/build/tokens/index.production.web.js +3344 -1488
  24. package/build/tokens/index.production.web.js.map +1 -1
  25. package/build/utils/index.d.ts +46 -25
  26. package/build/utils/index.development.web.js.map +1 -1
  27. package/build/utils/index.native.d.ts +46 -25
  28. package/build/utils/index.native.js.map +1 -1
  29. package/package.json +1 -1
@@ -12958,13 +12958,16 @@ var getBaseTextStyles = function getBaseTextStyles(_ref) {
12958
12958
  };
12959
12959
  }
12960
12960
  }
12961
- return _objectSpread$1N({
12961
+ return _objectSpread$1N(_objectSpread$1N({
12962
12962
  color: textColor,
12963
12963
  fontFamily: themeFontFamily,
12964
12964
  fontSize: themeFontSize,
12965
12965
  fontWeight: themeFontWeight,
12966
12966
  fontStyle: fontStyle,
12967
- textDecorationLine: textDecorationLine,
12967
+ textDecorationLine: textDecorationLine
12968
+ }, textDecorationLine !== 'none' && {
12969
+ textDecorationColor: textColor
12970
+ }), {}, {
12968
12971
  lineHeight: themeLineHeight,
12969
12972
  textAlign: textAlign,
12970
12973
  margin: 0,
@@ -13853,7 +13856,8 @@ var makeInputDisplayValue = function makeInputDisplayValue(selectedIndices, opti
13853
13856
 
13854
13857
  // When one item is selected, we display that item's title in input
13855
13858
  if (selectedIndices.length === 1) {
13856
- return options[selectedIndices[0]].title;
13859
+ var _options$selectedIndi;
13860
+ return (_options$selectedIndi = options[selectedIndices[0]]) === null || _options$selectedIndi === void 0 ? void 0 : _options$selectedIndi.title;
13857
13861
  }
13858
13862
 
13859
13863
  // When more than one item is selected, we display the count of items
@@ -15711,7 +15715,7 @@ var getStringFromReactText = function getStringFromReactText(childReactText) {
15711
15715
  return String(childReactText);
15712
15716
  };
15713
15717
 
15714
- var _excluded$C = ["children", "contrast", "fontWeight", "icon", "size", "variant", "testID"];
15718
+ var _excluded$C = ["children", "contrast", "fontWeight", "icon", "size", "variant", "color", "testID"];
15715
15719
  function ownKeys$1s(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15716
15720
  function _objectSpread$1r(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1s(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1s(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
15717
15721
  var isFeedbackVariant$1 = function isFeedbackVariant(variant) {
@@ -15721,19 +15725,20 @@ var isFeedbackVariant$1 = function isFeedbackVariant(variant) {
15721
15725
  var getColorProps$1 = function getColorProps(_ref) {
15722
15726
  var variant = _ref.variant,
15723
15727
  contrast = _ref.contrast;
15728
+ var badgeVariant = variant === 'default' ? 'blue' : variant;
15724
15729
  var props = {
15725
15730
  iconColor: 'feedback.icon.neutral.lowContrast',
15726
15731
  textColor: 'feedback.text.neutral.lowContrast',
15727
15732
  backgroundColor: 'feedback.background.neutral.lowContrast'
15728
15733
  };
15729
- if (isFeedbackVariant$1(variant)) {
15730
- props.iconColor = "feedback.icon.".concat(variant, ".").concat(contrast, "Contrast");
15731
- props.textColor = "feedback.text.".concat(variant, ".").concat(contrast, "Contrast");
15732
- props.backgroundColor = "feedback.background.".concat(variant, ".").concat(contrast, "Contrast");
15734
+ if (isFeedbackVariant$1(badgeVariant)) {
15735
+ props.iconColor = "feedback.icon.".concat(badgeVariant, ".").concat(contrast, "Contrast");
15736
+ props.textColor = "feedback.text.".concat(badgeVariant, ".").concat(contrast, "Contrast");
15737
+ props.backgroundColor = "feedback.background.".concat(badgeVariant, ".").concat(contrast, "Contrast");
15733
15738
  } else {
15734
- props.iconColor = "badge.icon.".concat(variant, ".").concat(contrast, "Contrast");
15735
- props.textColor = "badge.text.".concat(variant, ".").concat(contrast, "Contrast");
15736
- props.backgroundColor = "badge.background.".concat(variant, ".").concat(contrast, "Contrast");
15739
+ props.iconColor = "badge.icon.".concat(badgeVariant, ".").concat(contrast, "Contrast");
15740
+ props.textColor = "badge.text.".concat(badgeVariant, ".").concat(contrast, "Contrast");
15741
+ props.backgroundColor = "badge.background.".concat(badgeVariant, ".").concat(contrast, "Contrast");
15737
15742
  }
15738
15743
  return props;
15739
15744
  };
@@ -15748,6 +15753,7 @@ var _Badge = function _Badge(_ref2) {
15748
15753
  size = _ref2$size === void 0 ? 'medium' : _ref2$size,
15749
15754
  _ref2$variant = _ref2.variant,
15750
15755
  variant = _ref2$variant === void 0 ? 'neutral' : _ref2$variant,
15756
+ color = _ref2.color,
15751
15757
  testID = _ref2.testID,
15752
15758
  styledProps = _objectWithoutProperties$1(_ref2, _excluded$C);
15753
15759
  var childrenString = getStringFromReactText(children);
@@ -15759,8 +15765,9 @@ var _Badge = function _Badge(_ref2) {
15759
15765
  });
15760
15766
  }
15761
15767
  }
15768
+ var badgeVariant = color !== null && color !== void 0 ? color : variant;
15762
15769
  var _getColorProps = getColorProps$1({
15763
- variant: variant,
15770
+ variant: badgeVariant,
15764
15771
  contrast: contrast
15765
15772
  }),
15766
15773
  backgroundColor = _getColorProps.backgroundColor,
@@ -16368,20 +16375,24 @@ var StyledBaseButton = /*#__PURE__*/styled.button.withConfig({
16368
16375
  transitionTimingFunction: getIn(props.theme.motion, props.motionEasing),
16369
16376
  transitionDuration: castWebType(makeMotionTime(getIn(props.theme.motion, props.motionDuration))),
16370
16377
  position: 'relative',
16371
- '&:hover': {
16372
- backgroundColor: props.hoverBackgroundColor,
16378
+ '&:hover': _objectSpread$1o({
16379
+ backgroundColor: props.hoverBackgroundColor
16380
+ }, props.variant !== 'tertiary' && {
16373
16381
  borderColor: props.hoverBorderColor
16374
- },
16375
- '&:active': {
16376
- backgroundColor: props.activeBackgroundColor,
16382
+ }),
16383
+ '&:active': _objectSpread$1o({
16384
+ backgroundColor: props.activeBackgroundColor
16385
+ }, props.variant !== 'tertiary' && {
16377
16386
  borderColor: props.activeBorderColor
16378
- },
16379
- '&:focus': {
16380
- backgroundColor: props.focusBackgroundColor,
16381
- borderColor: props.focusBorderColor,
16382
- boxShadow: "0px 0px 0px 4px ".concat(props.focusRingColor),
16383
- outline: 'none'
16384
- },
16387
+ }),
16388
+ '&:focus-visible': _objectSpread$1o(_objectSpread$1o({
16389
+ backgroundColor: props.focusBackgroundColor
16390
+ }, props.variant !== 'tertiary' && {
16391
+ borderColor: props.focusBorderColor
16392
+ }), {}, {
16393
+ outline: "1px solid ".concat(props.theme.colors.surface.background.level1.lowContrast),
16394
+ boxShadow: "0px 0px 0px 4px ".concat(props.focusRingColor)
16395
+ }),
16385
16396
  '*': {
16386
16397
  transitionProperty: 'color, fill',
16387
16398
  transitionDuration: castWebType(makeMotionTime(getIn(props.theme.motion, props.motionDuration))),
@@ -16462,8 +16473,8 @@ var buttonIconOnlyPadding = {
16462
16473
  large: {
16463
16474
  top: 0,
16464
16475
  bottom: 0,
16465
- left: 4,
16466
- right: 4
16476
+ left: 2,
16477
+ right: 2
16467
16478
  }
16468
16479
  };
16469
16480
  var buttonSizeToIconSizeMap = {
@@ -16473,10 +16484,10 @@ var buttonSizeToIconSizeMap = {
16473
16484
  large: 'medium'
16474
16485
  };
16475
16486
  var buttonIconOnlySizeToIconSizeMap = {
16476
- xsmall: 'medium',
16477
- small: 'medium',
16478
- medium: 'large',
16479
- large: 'xlarge'
16487
+ xsmall: 'small',
16488
+ small: 'small',
16489
+ medium: 'medium',
16490
+ large: 'medium'
16480
16491
  };
16481
16492
  var buttonSizeToSpinnerSizeMap = {
16482
16493
  xsmall: 'medium',
@@ -16484,11 +16495,11 @@ var buttonSizeToSpinnerSizeMap = {
16484
16495
  medium: 'large',
16485
16496
  large: 'xlarge'
16486
16497
  };
16487
- var textPadding = {
16488
- xsmall: 2,
16489
- small: 2,
16490
- medium: 3,
16491
- large: 3
16498
+ var buttonIconPadding = {
16499
+ xsmall: 1,
16500
+ small: 1,
16501
+ medium: 2,
16502
+ large: 2
16492
16503
  };
16493
16504
 
16494
16505
  var LIVEREGION_TIMEOUT_DELAY = 1000;
@@ -16631,20 +16642,20 @@ var SpinningBox = /*#__PURE__*/styled(BaseBox).withConfig({
16631
16642
  return css(["padding:1px;width:max-content;display:inline-flex;animation:", " ", " ", " infinite;"], rotate, makeMotionTime(getIn(theme.motion, motion.duration)), getIn(theme.motion, motion.easing));
16632
16643
  });
16633
16644
 
16634
- var _excluded$B = ["label", "labelPosition", "accessibilityLabel", "contrast", "intent", "size", "testID"];
16645
+ var _excluded$B = ["label", "labelPosition", "accessibilityLabel", "contrast", "color", "size", "testID"];
16635
16646
  function ownKeys$1o(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
16636
16647
  function _objectSpread$1n(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1o(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1o(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16637
16648
  var getColor = function getColor(_ref) {
16638
16649
  var contrast = _ref.contrast,
16639
- intent = _ref.intent,
16650
+ color = _ref.color,
16640
16651
  theme = _ref.theme;
16641
- if (intent) {
16642
- return getIn(theme.colors, "feedback.".concat(intent, ".action.icon.primary.disabled.").concat(contrast, "Contrast"));
16643
- } else if (contrast == 'low') {
16644
- return getIn(theme.colors, 'brand.gray.700.lowContrast');
16645
- } else {
16646
- return getIn(theme.colors, 'brand.gray.700.highContrast');
16652
+ if (contrast === 'high' || color && color === 'white') {
16653
+ return getIn(theme.colors, 'static.white');
16654
+ }
16655
+ if (color && color !== 'default') {
16656
+ return getIn(theme.colors, "feedback.".concat(color, ".action.icon.primary.disabled.lowContrast"));
16647
16657
  }
16658
+ return getIn(theme.colors, 'brand.gray.700.lowContrast');
16648
16659
  };
16649
16660
  var BaseSpinner = function BaseSpinner(_ref2) {
16650
16661
  var label = _ref2.label,
@@ -16653,7 +16664,8 @@ var BaseSpinner = function BaseSpinner(_ref2) {
16653
16664
  accessibilityLabel = _ref2.accessibilityLabel,
16654
16665
  _ref2$contrast = _ref2.contrast,
16655
16666
  contrast = _ref2$contrast === void 0 ? 'low' : _ref2$contrast,
16656
- intent = _ref2.intent,
16667
+ _ref2$color = _ref2.color,
16668
+ color = _ref2$color === void 0 ? 'default' : _ref2$color,
16657
16669
  _ref2$size = _ref2.size,
16658
16670
  size = _ref2$size === void 0 ? 'medium' : _ref2$size,
16659
16671
  testID = _ref2.testID,
@@ -16677,7 +16689,7 @@ var BaseSpinner = function BaseSpinner(_ref2) {
16677
16689
  dimensions: makeSize(dimensions[size]),
16678
16690
  color: getColor({
16679
16691
  contrast: contrast,
16680
- intent: intent,
16692
+ color: color,
16681
16693
  theme: theme
16682
16694
  })
16683
16695
  })
@@ -16697,7 +16709,7 @@ var BaseSpinner = function BaseSpinner(_ref2) {
16697
16709
  }));
16698
16710
  };
16699
16711
 
16700
- var _excluded$A = ["href", "target", "rel", "variant", "intent", "contrast", "size", "icon", "iconPosition", "isDisabled", "isFullWidth", "isLoading", "onClick", "onBlur", "onKeyDown", "type", "children", "testID", "onFocus", "onMouseLeave", "onMouseMove", "onPointerDown", "onPointerEnter", "accessibilityProps", "onTouchEnd", "onTouchStart"];
16712
+ var _excluded$A = ["href", "target", "rel", "variant", "color", "size", "icon", "iconPosition", "isDisabled", "isFullWidth", "isLoading", "onClick", "onBlur", "onKeyDown", "type", "children", "testID", "onFocus", "onMouseLeave", "onMouseMove", "onPointerDown", "onPointerEnter", "accessibilityProps", "onTouchEnd", "onTouchStart"];
16701
16713
  function ownKeys$1n(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
16702
16714
  function _objectSpread$1m(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1n(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1n(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16703
16715
  var getRenderElement = function getRenderElement(href) {
@@ -16714,13 +16726,14 @@ var getColorToken$1 = function getColorToken(_ref) {
16714
16726
  var property = _ref.property,
16715
16727
  variant = _ref.variant,
16716
16728
  state = _ref.state,
16717
- contrast = _ref.contrast,
16718
- intent = _ref.intent;
16719
- if (intent && contrast) {
16720
- // TODO: Add support for secondary & tertiary variants for feedback buttons here when a use-case is identified
16721
- return "feedback.".concat(intent, ".action.").concat(property, ".primary.").concat(state, ".").concat(contrast, "Contrast");
16729
+ color = _ref.color;
16730
+ if (!color || color === 'default') {
16731
+ return "action.".concat(property, ".").concat(variant, ".").concat(state);
16732
+ }
16733
+ if (color === 'white') {
16734
+ return "white.action.".concat(property, ".").concat(variant, ".").concat(state);
16722
16735
  }
16723
- return "action.".concat(property, ".").concat(variant, ".").concat(state);
16736
+ return "feedback.".concat(color, ".action.").concat(property, ".primary.").concat(state, ".").concat(variant === 'primary' ? 'high' : 'low', "Contrast");
16724
16737
  };
16725
16738
  var getProps$1 = function getProps(_ref2) {
16726
16739
  var buttonTypographyTokens = _ref2.buttonTypographyTokens,
@@ -16729,9 +16742,14 @@ var getProps$1 = function getProps(_ref2) {
16729
16742
  size = _ref2.size,
16730
16743
  theme = _ref2.theme,
16731
16744
  variant = _ref2.variant,
16732
- intent = _ref2.intent,
16733
- contrast = _ref2.contrast,
16745
+ color = _ref2.color,
16734
16746
  hasIcon = _ref2.hasIcon;
16747
+ if (variant === 'tertiary' && color !== 'default' && color !== 'white') {
16748
+ throwBladeError({
16749
+ moduleName: 'BaseButton',
16750
+ message: "Tertiary variant can only be used with color: \"default\" or \"white\" but received \"".concat(color, "\"")
16751
+ });
16752
+ }
16735
16753
  var isIconOnly = hasIcon && (!children || (children === null || children === void 0 ? void 0 : children.trim().length) === 0);
16736
16754
  var props = {
16737
16755
  iconSize: isIconOnly ? buttonIconOnlySizeToIconSizeMap[size] : buttonSizeToIconSizeMap[size],
@@ -16739,19 +16757,17 @@ var getProps$1 = function getProps(_ref2) {
16739
16757
  fontSize: buttonTypographyTokens.fonts.size[size],
16740
16758
  lineHeight: buttonTypographyTokens.lineHeights[size],
16741
16759
  minHeight: makeSize(minHeight[size]),
16742
- iconPadding: hasIcon && children !== null && children !== void 0 && children.trim() ? "spacing.".concat(textPadding[size]) : undefined,
16760
+ iconPadding: hasIcon && children !== null && children !== void 0 && children.trim() ? "spacing.".concat(buttonIconPadding[size]) : undefined,
16743
16761
  iconColor: getColorToken$1({
16744
16762
  property: 'icon',
16745
16763
  variant: variant,
16746
- contrast: contrast,
16747
- intent: intent,
16764
+ color: color,
16748
16765
  state: 'default'
16749
16766
  }),
16750
16767
  textColor: getColorToken$1({
16751
16768
  property: 'text',
16752
16769
  variant: variant,
16753
- contrast: contrast,
16754
- intent: intent,
16770
+ color: color,
16755
16771
  state: 'default'
16756
16772
  }),
16757
16773
  buttonPaddingTop: isIconOnly ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].top]) : makeSpace(theme.spacing[buttonPadding[size].top]),
@@ -16762,57 +16778,49 @@ var getProps$1 = function getProps(_ref2) {
16762
16778
  defaultBackgroundColor: getIn(theme.colors, getColorToken$1({
16763
16779
  property: 'background',
16764
16780
  variant: variant,
16765
- contrast: contrast,
16766
- intent: intent,
16781
+ color: color,
16767
16782
  state: 'default'
16768
16783
  })),
16769
16784
  defaultBorderColor: getIn(theme.colors, getColorToken$1({
16770
16785
  property: 'border',
16771
16786
  variant: variant,
16772
- contrast: contrast,
16773
- intent: intent,
16787
+ color: color,
16774
16788
  state: 'default'
16775
16789
  })),
16776
16790
  hoverBackgroundColor: getIn(theme.colors, getColorToken$1({
16777
16791
  property: 'background',
16778
16792
  variant: variant,
16779
- contrast: contrast,
16780
- intent: intent,
16793
+ color: color,
16781
16794
  state: 'hover'
16782
16795
  })),
16783
16796
  hoverBorderColor: getIn(theme.colors, getColorToken$1({
16784
16797
  property: 'border',
16785
16798
  variant: variant,
16786
- contrast: contrast,
16787
- intent: intent,
16799
+ color: color,
16788
16800
  state: 'hover'
16789
16801
  })),
16790
16802
  activeBackgroundColor: getIn(theme.colors, getColorToken$1({
16791
16803
  property: 'background',
16792
16804
  variant: variant,
16793
- contrast: contrast,
16794
- intent: intent,
16805
+ color: color,
16795
16806
  state: 'active'
16796
16807
  })),
16797
16808
  activeBorderColor: getIn(theme.colors, getColorToken$1({
16798
16809
  property: 'border',
16799
16810
  variant: variant,
16800
- contrast: contrast,
16801
- intent: intent,
16811
+ color: color,
16802
16812
  state: 'active'
16803
16813
  })),
16804
16814
  focusBackgroundColor: getIn(theme.colors, getColorToken$1({
16805
16815
  property: 'background',
16806
16816
  variant: variant,
16807
- contrast: contrast,
16808
- intent: intent,
16817
+ color: color,
16809
16818
  state: 'focus'
16810
16819
  })),
16811
16820
  focusBorderColor: getIn(theme.colors, getColorToken$1({
16812
16821
  property: 'border',
16813
16822
  variant: variant,
16814
- contrast: contrast,
16815
- intent: intent,
16823
+ color: color,
16816
16824
  state: 'focus'
16817
16825
  })),
16818
16826
  focusRingColor: getIn(theme.colors, 'brand.primary.400'),
@@ -16825,29 +16833,25 @@ var getProps$1 = function getProps(_ref2) {
16825
16833
  var disabledBackgroundColor = getIn(theme.colors, getColorToken$1({
16826
16834
  property: 'background',
16827
16835
  variant: variant,
16828
- contrast: contrast,
16829
- intent: intent,
16836
+ color: color,
16830
16837
  state: 'disabled'
16831
16838
  }));
16832
16839
  var disabledBorderColor = getIn(theme.colors, getColorToken$1({
16833
16840
  property: 'border',
16834
16841
  variant: variant,
16835
- contrast: contrast,
16836
- intent: intent,
16842
+ color: color,
16837
16843
  state: 'disabled'
16838
16844
  }));
16839
16845
  props.iconColor = getColorToken$1({
16840
16846
  property: 'icon',
16841
16847
  variant: variant,
16842
- contrast: contrast,
16843
- intent: intent,
16848
+ color: color,
16844
16849
  state: 'disabled'
16845
16850
  });
16846
16851
  props.textColor = getColorToken$1({
16847
16852
  property: 'text',
16848
16853
  variant: variant,
16849
- contrast: contrast,
16850
- intent: intent,
16854
+ color: color,
16851
16855
  state: 'disabled'
16852
16856
  });
16853
16857
  props.defaultBackgroundColor = disabledBackgroundColor;
@@ -16876,9 +16880,8 @@ var _BaseButton = function _BaseButton(_ref4, ref) {
16876
16880
  rel = _ref4.rel,
16877
16881
  _ref4$variant = _ref4.variant,
16878
16882
  variant = _ref4$variant === void 0 ? 'primary' : _ref4$variant,
16879
- intent = _ref4.intent,
16880
- _ref4$contrast = _ref4.contrast,
16881
- contrast = _ref4$contrast === void 0 ? 'low' : _ref4$contrast,
16883
+ _ref4$color = _ref4.color,
16884
+ color = _ref4$color === void 0 ? 'default' : _ref4$color,
16882
16885
  _ref4$size = _ref4.size,
16883
16886
  size = _ref4$size === void 0 ? 'medium' : _ref4$size,
16884
16887
  Icon = _ref4.icon,
@@ -16932,8 +16935,7 @@ var _BaseButton = function _BaseButton(_ref4, ref) {
16932
16935
  size: size,
16933
16936
  variant: variant,
16934
16937
  theme: theme,
16935
- intent: intent,
16936
- contrast: contrast,
16938
+ color: color,
16937
16939
  hasIcon: Boolean(Icon)
16938
16940
  }),
16939
16941
  activeBorderColor = _getProps.activeBorderColor,
@@ -16978,6 +16980,7 @@ var _BaseButton = function _BaseButton(_ref4, ref) {
16978
16980
  accessibilityProps: _objectSpread$1m({}, makeAccessible(_objectSpread$1m({
16979
16981
  role: isLink ? 'link' : 'button'
16980
16982
  }, accessibilityProps))),
16983
+ variant: variant,
16981
16984
  isLoading: isLoading,
16982
16985
  disabled: disabled,
16983
16986
  activeBorderColor: activeBorderColor,
@@ -17026,8 +17029,7 @@ var _BaseButton = function _BaseButton(_ref4, ref) {
17026
17029
  children: /*#__PURE__*/jsx(BaseSpinner, {
17027
17030
  accessibilityLabel: "Loading",
17028
17031
  size: spinnerSize,
17029
- intent: intent,
17030
- contrast: contrast
17032
+ color: color
17031
17033
  })
17032
17034
  }) : null, /*#__PURE__*/jsxs(ButtonContent, {
17033
17035
  display: "flex",
@@ -17143,14 +17145,13 @@ var useInteraction = function useInteraction() {
17143
17145
  };
17144
17146
  };
17145
17147
 
17146
- var _excluded$z = ["children", "icon", "iconPosition", "isDisabled", "onClick", "onKeyDown", "variant", "href", "target", "rel", "intent", "contrast", "accessibilityProps", "className", "style", "size", "testID", "hitSlop", "htmlTitle", "onBlur", "onFocus", "onMouseLeave", "onMouseMove", "onPointerDown", "onPointerEnter", "onTouchStart", "onTouchEnd"],
17148
+ var _excluded$z = ["children", "icon", "iconPosition", "isDisabled", "onClick", "onKeyDown", "variant", "href", "target", "rel", "color", "accessibilityProps", "className", "style", "size", "testID", "hitSlop", "htmlTitle", "onBlur", "onFocus", "onMouseLeave", "onMouseMove", "onPointerDown", "onPointerEnter", "onTouchStart", "onTouchEnd"],
17147
17149
  _excluded2 = ["currentInteraction", "setCurrentInteraction"];
17148
17150
  function ownKeys$1l(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17149
17151
  function _objectSpread$1k(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1l(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1l(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17150
17152
  var getColorToken = function getColorToken(_ref) {
17151
17153
  var variant = _ref.variant,
17152
- intent = _ref.intent,
17153
- contrast = _ref.contrast,
17154
+ color = _ref.color,
17154
17155
  element = _ref.element,
17155
17156
  currentInteraction = _ref.currentInteraction,
17156
17157
  isDisabled = _ref.isDisabled,
@@ -17159,12 +17160,15 @@ var getColorToken = function getColorToken(_ref) {
17159
17160
  if (isDisabled && variant == 'button') {
17160
17161
  state = 'disabled';
17161
17162
  }
17162
- if (isVisited && variant == 'anchor' && !intent) {
17163
- // visited state is only valid for anchor variant without any intent
17163
+ if (isVisited && variant == 'anchor') {
17164
+ // visited state is only valid for anchor variant
17164
17165
  state = 'visited';
17165
17166
  }
17166
- if (intent && state !== 'visited') {
17167
- return "feedback.".concat(intent, ".action.").concat(element, ".link.").concat(state, ".").concat(contrast, "Contrast");
17167
+ if (color && color !== 'default' && state !== 'visited') {
17168
+ if (color !== 'white') {
17169
+ return "feedback.".concat(color, ".action.").concat(element, ".link.").concat(state, ".lowContrast");
17170
+ }
17171
+ return "white.action.".concat(element, ".link.").concat(state);
17168
17172
  }
17169
17173
  return "action.".concat(element, ".link.").concat(state);
17170
17174
  };
@@ -17174,8 +17178,7 @@ var getProps = function getProps(_ref2) {
17174
17178
  currentInteraction = _ref2.currentInteraction,
17175
17179
  children = _ref2.children,
17176
17180
  isDisabled = _ref2.isDisabled,
17177
- intent = _ref2.intent,
17178
- contrast = _ref2.contrast,
17181
+ color = _ref2.color,
17179
17182
  isVisited = _ref2.isVisited,
17180
17183
  target = _ref2.target,
17181
17184
  size = _ref2.size;
@@ -17199,8 +17202,7 @@ var getProps = function getProps(_ref2) {
17199
17202
  textDecorationLine: !isButton && currentInteraction !== 'default' ? 'underline' : 'none',
17200
17203
  iconColor: getColorToken({
17201
17204
  variant: variant,
17202
- intent: intent,
17203
- contrast: contrast,
17205
+ color: color,
17204
17206
  element: 'icon',
17205
17207
  currentInteraction: currentInteraction,
17206
17208
  isDisabled: isDisabled,
@@ -17212,8 +17214,7 @@ var getProps = function getProps(_ref2) {
17212
17214
  iconPadding: children !== null && children !== void 0 && children.trim() ? 'spacing.2' : 'spacing.0',
17213
17215
  textColor: getColorToken({
17214
17216
  variant: variant,
17215
- intent: intent,
17216
- contrast: contrast,
17217
+ color: color,
17217
17218
  element: 'text',
17218
17219
  currentInteraction: currentInteraction,
17219
17220
  isDisabled: isDisabled,
@@ -17244,9 +17245,8 @@ var _BaseLink = function _BaseLink(_ref3, ref) {
17244
17245
  href = _ref3.href,
17245
17246
  target = _ref3.target,
17246
17247
  rel = _ref3.rel,
17247
- intent = _ref3.intent,
17248
- _ref3$contrast = _ref3.contrast,
17249
- contrast = _ref3$contrast === void 0 ? 'low' : _ref3$contrast,
17248
+ _ref3$color = _ref3.color,
17249
+ color = _ref3$color === void 0 ? 'default' : _ref3$color,
17250
17250
  accessibilityProps = _ref3.accessibilityProps,
17251
17251
  className = _ref3.className,
17252
17252
  style = _ref3.style,
@@ -17289,8 +17289,7 @@ var _BaseLink = function _BaseLink(_ref3, ref) {
17289
17289
  currentInteraction: currentInteraction,
17290
17290
  children: childrenString,
17291
17291
  isDisabled: isDisabled,
17292
- intent: intent,
17293
- contrast: contrast,
17292
+ color: color,
17294
17293
  isVisited: isVisited,
17295
17294
  target: target,
17296
17295
  size: size
@@ -17312,8 +17311,8 @@ var _BaseLink = function _BaseLink(_ref3, ref) {
17312
17311
  type = _getProps.type,
17313
17312
  lineHeight = _getProps.lineHeight;
17314
17313
  var handleOnClick = function handleOnClick(event) {
17315
- if (!isVisited && !intent && variant === 'anchor') {
17316
- // visited state is only valid for anchor variant without any intent
17314
+ if (!isVisited && variant === 'anchor') {
17315
+ // visited state is only valid for anchor variant
17317
17316
  setIsVisited(true);
17318
17317
  }
17319
17318
  if (onClick) {
@@ -17413,7 +17412,7 @@ var BaseLink = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__defaul
17413
17412
  componentId: 'BaseLink'
17414
17413
  });
17415
17414
 
17416
- var _excluded$y = ["description", "title", "isDismissible", "onDismiss", "contrast", "isFullWidth", "intent", "actions", "testID"];
17415
+ var _excluded$y = ["description", "title", "isDismissible", "onDismiss", "contrast", "isFullWidth", "intent", "color", "actions", "testID"];
17417
17416
  function ownKeys$1k(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17418
17417
  function _objectSpread$1j(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1k(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1k(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17419
17418
  var isReactNative$3 = getPlatformType() === 'react-native';
@@ -17439,6 +17438,7 @@ var Alert = function Alert(_ref) {
17439
17438
  isFullWidth = _ref$isFullWidth === void 0 ? false : _ref$isFullWidth,
17440
17439
  _ref$intent = _ref.intent,
17441
17440
  intent = _ref$intent === void 0 ? 'neutral' : _ref$intent,
17441
+ color = _ref.color,
17442
17442
  actions = _ref.actions,
17443
17443
  testID = _ref.testID,
17444
17444
  styledProps = _objectWithoutProperties$1(_ref, _excluded$y);
@@ -17523,8 +17523,8 @@ var Alert = function Alert(_ref) {
17523
17523
  children: /*#__PURE__*/jsx(BaseButton, {
17524
17524
  size: textSize,
17525
17525
  onClick: actions.primary.onClick,
17526
- intent: intent,
17527
- contrast: contrast,
17526
+ color: color || intent,
17527
+ variant: contrast === 'high' ? 'primary' : 'secondary',
17528
17528
  children: actions.primary.text
17529
17529
  })
17530
17530
  }) : null;
@@ -17548,8 +17548,7 @@ var Alert = function Alert(_ref) {
17548
17548
  display: isReactNative$3 ? castNativeType('flex') : castWebType('inline-flex'),
17549
17549
  children: /*#__PURE__*/jsx(BaseLink, _objectSpread$1j(_objectSpread$1j({
17550
17550
  size: textSize,
17551
- contrast: contrast,
17552
- intent: intent
17551
+ color: contrast === 'high' ? 'white' : intent
17553
17552
  }, secondaryActionParams), {}, {
17554
17553
  children: actions.secondary.text
17555
17554
  }))
@@ -17902,7 +17901,7 @@ var CardBody = /*#__PURE__*/assignWithoutSideEffects(_CardBody, {
17902
17901
  componentId: ComponentIds$1.CardBody
17903
17902
  });
17904
17903
 
17905
- var _excluded$v = ["children", "icon", "iconPosition", "isDisabled", "onClick", "variant", "href", "target", "rel", "accessibilityLabel", "size", "testID", "hitSlop", "htmlTitle", "onBlur", "onFocus", "onMouseLeave", "onMouseMove", "onPointerDown", "onPointerEnter", "onTouchStart", "onTouchEnd"];
17904
+ var _excluded$v = ["children", "icon", "iconPosition", "isDisabled", "onClick", "variant", "color", "href", "target", "rel", "accessibilityLabel", "size", "testID", "hitSlop", "htmlTitle", "onBlur", "onFocus", "onMouseLeave", "onMouseMove", "onPointerDown", "onPointerEnter", "onTouchStart", "onTouchEnd"];
17906
17905
  function ownKeys$1h(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17907
17906
  function _objectSpread$1g(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1h(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17908
17907
  var _Link = function _Link(_ref, ref) {
@@ -17915,6 +17914,8 @@ var _Link = function _Link(_ref, ref) {
17915
17914
  onClick = _ref.onClick,
17916
17915
  _ref$variant = _ref.variant,
17917
17916
  variant = _ref$variant === void 0 ? 'anchor' : _ref$variant,
17917
+ _ref$color = _ref.color,
17918
+ color = _ref$color === void 0 ? 'default' : _ref$color,
17918
17919
  href = _ref.href,
17919
17920
  target = _ref.target,
17920
17921
  rel = _ref.rel,
@@ -17955,6 +17956,7 @@ var _Link = function _Link(_ref, ref) {
17955
17956
  describedBy: rest['aria-describedby']
17956
17957
  },
17957
17958
  size: size,
17959
+ color: color,
17958
17960
  testID: testID,
17959
17961
  hitSlop: hitSlop,
17960
17962
  htmlTitle: htmlTitle,
@@ -17973,7 +17975,7 @@ var Link = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__default.fo
17973
17975
  componentId: 'Link'
17974
17976
  });
17975
17977
 
17976
- var _excluded$u = ["children", "icon", "iconPosition", "isDisabled", "isFullWidth", "isLoading", "href", "target", "rel", "onClick", "size", "type", "variant", "accessibilityLabel", "testID", "onBlur", "onFocus", "onMouseLeave", "onMouseMove", "onPointerDown", "onPointerEnter", "onTouchStart", "onTouchEnd"];
17978
+ var _excluded$u = ["children", "icon", "iconPosition", "isDisabled", "isFullWidth", "isLoading", "href", "target", "rel", "onClick", "size", "type", "variant", "color", "accessibilityLabel", "testID", "onBlur", "onFocus", "onMouseLeave", "onMouseMove", "onPointerDown", "onPointerEnter", "onTouchStart", "onTouchEnd"];
17977
17979
  function ownKeys$1g(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17978
17980
  function _objectSpread$1f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1g(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1g(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17979
17981
  var _Button = function _Button( // While adding any prop here, make sure to handle it in DropdownButton as well
@@ -17998,6 +18000,8 @@ _ref, ref) {
17998
18000
  type = _ref$type === void 0 ? 'button' : _ref$type,
17999
18001
  _ref$variant = _ref.variant,
18000
18002
  variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
18003
+ _ref$color = _ref.color,
18004
+ color = _ref$color === void 0 ? 'default' : _ref$color,
18001
18005
  accessibilityLabel = _ref.accessibilityLabel,
18002
18006
  testID = _ref.testID,
18003
18007
  onBlur = _ref.onBlur,
@@ -18024,6 +18028,7 @@ _ref, ref) {
18024
18028
  describedBy: rest['aria-describedby']
18025
18029
  },
18026
18030
  iconPosition: iconPosition,
18031
+ color: color,
18027
18032
  isDisabled: isDisabled,
18028
18033
  isFullWidth: isFullWidth,
18029
18034
  onClick: onClick,
@@ -18086,7 +18091,7 @@ var StyledCounter = /*#__PURE__*/styled(BaseBox).withConfig({
18086
18091
  });
18087
18092
  });
18088
18093
 
18089
- var _excluded$t = ["value", "max", "intent", "variant", "contrast", "size", "testID"];
18094
+ var _excluded$t = ["value", "max", "intent", "variant", "color", "contrast", "size", "testID"];
18090
18095
  function ownKeys$1e(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
18091
18096
  function _objectSpread$1d(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1e(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
18092
18097
  var isFeedbackVariant = function isFeedbackVariant(variant) {
@@ -18098,25 +18103,28 @@ var getColorProps = function getColorProps(_ref) {
18098
18103
  variant = _ref$variant === void 0 ? 'neutral' : _ref$variant,
18099
18104
  _ref$contrast = _ref.contrast,
18100
18105
  contrast = _ref$contrast === void 0 ? 'low' : _ref$contrast;
18106
+ var counterVariant = variant === 'default' ? 'blue' : variant;
18101
18107
  var props = {
18102
18108
  textColor: 'feedback.text.neutral.lowContrast',
18103
18109
  backgroundColor: 'feedback.background.neutral.lowContrast'
18104
18110
  };
18105
- if (isFeedbackVariant(variant)) {
18106
- props.textColor = "feedback.text.".concat(variant, ".").concat(contrast, "Contrast");
18107
- props.backgroundColor = "feedback.background.".concat(variant, ".").concat(contrast, "Contrast");
18111
+ if (isFeedbackVariant(counterVariant)) {
18112
+ props.textColor = "feedback.text.".concat(counterVariant, ".").concat(contrast, "Contrast");
18113
+ props.backgroundColor = "feedback.background.".concat(counterVariant, ".").concat(contrast, "Contrast");
18108
18114
  } else {
18109
- props.textColor = "badge.text.".concat(variant, ".").concat(contrast, "Contrast");
18110
- props.backgroundColor = "badge.background.".concat(variant, ".").concat(contrast, "Contrast");
18115
+ props.textColor = "badge.text.".concat(counterVariant, ".").concat(contrast, "Contrast");
18116
+ props.backgroundColor = "badge.background.".concat(counterVariant, ".").concat(contrast, "Contrast");
18111
18117
  }
18112
18118
  return props;
18113
18119
  };
18114
18120
  var Counter = function Counter(_ref2) {
18121
+ var _ref3;
18115
18122
  var value = _ref2.value,
18116
18123
  max = _ref2.max,
18117
18124
  intent = _ref2.intent,
18118
18125
  _ref2$variant = _ref2.variant,
18119
18126
  variant = _ref2$variant === void 0 ? 'neutral' : _ref2$variant,
18127
+ color = _ref2.color,
18120
18128
  _ref2$contrast = _ref2.contrast,
18121
18129
  contrast = _ref2$contrast === void 0 ? 'low' : _ref2$contrast,
18122
18130
  _ref2$size = _ref2.size,
@@ -18130,7 +18138,7 @@ var Counter = function Counter(_ref2) {
18130
18138
  var _useTheme = useTheme(),
18131
18139
  platform = _useTheme.platform;
18132
18140
  var _getColorProps = getColorProps({
18133
- variant: intent !== null && intent !== void 0 ? intent : variant,
18141
+ variant: (_ref3 = color !== null && color !== void 0 ? color : intent) !== null && _ref3 !== void 0 ? _ref3 : variant,
18134
18142
  contrast: contrast
18135
18143
  }),
18136
18144
  backgroundColor = _getColorProps.backgroundColor,
@@ -19733,14 +19741,14 @@ var chipColorTokens = {
19733
19741
  text: {
19734
19742
  unchecked: 'surface.text.subtle.lowContrast',
19735
19743
  disabled: 'surface.text.placeholder.lowContrast',
19736
- none: 'action.text.secondary.default',
19744
+ "default": 'action.text.secondary.default',
19737
19745
  positive: 'feedback.text.positive.lowContrast',
19738
19746
  negative: 'feedback.text.negative.lowContrast'
19739
19747
  },
19740
19748
  icon: {
19741
19749
  unchecked: 'surface.text.subtle.lowContrast',
19742
19750
  disabled: 'surface.text.placeholder.lowContrast',
19743
- none: 'action.icon.secondary.default',
19751
+ "default": 'action.icon.secondary.default',
19744
19752
  positive: 'feedback.icon.positive.lowContrast',
19745
19753
  negative: 'feedback.icon.negative.lowContrast'
19746
19754
  },
@@ -19750,7 +19758,7 @@ var chipColorTokens = {
19750
19758
  hover: 'brand.gray.a50.lowContrast',
19751
19759
  disabled: 'transparent'
19752
19760
  },
19753
- none: {
19761
+ "default": {
19754
19762
  "default": 'brand.primary.300',
19755
19763
  hover: 'brand.primary.400',
19756
19764
  disabled: 'brand.gray.a50.lowContrast'
@@ -19771,7 +19779,7 @@ var chipColorTokens = {
19771
19779
  "default": 'brand.gray.400.lowContrast',
19772
19780
  disabled: 'brand.gray.400.lowContrast'
19773
19781
  },
19774
- none: {
19782
+ "default": {
19775
19783
  "default": 'brand.primary.500',
19776
19784
  hover: 'brand.primary.500',
19777
19785
  disabled: 'brand.gray.a100.lowContrast'
@@ -19788,7 +19796,7 @@ var chipColorTokens = {
19788
19796
  }
19789
19797
  }
19790
19798
  };
19791
- var getChipInputHoverTokens = function getChipInputHoverTokens(intent) {
19799
+ var getChipInputHoverTokens = function getChipInputHoverTokens(color) {
19792
19800
  return {
19793
19801
  "default": {
19794
19802
  background: {
@@ -19796,7 +19804,7 @@ var getChipInputHoverTokens = function getChipInputHoverTokens(intent) {
19796
19804
  unchecked: 'transparent'
19797
19805
  },
19798
19806
  border: {
19799
- checked: "colors.".concat(chipColorTokens.border[intent || 'none'].hover),
19807
+ checked: "colors.".concat(chipColorTokens.border[color || 'default'].hover),
19800
19808
  unchecked: 'colors.brand.gray.500.lowContrast'
19801
19809
  }
19802
19810
  }
@@ -19878,7 +19886,7 @@ var StyledChipWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
19878
19886
  borderColor = _ref.borderColor,
19879
19887
  isChecked = _ref.isChecked,
19880
19888
  isDisabled = _ref.isDisabled,
19881
- intent = _ref.intent;
19889
+ color = _ref.color;
19882
19890
  var easing = getIn(theme, chipMotionTokens.easing);
19883
19891
  var duration = castWebType(makeMotionTime(getIn(theme, chipMotionTokens.duration)));
19884
19892
  return _objectSpread$12({
@@ -19886,7 +19894,7 @@ var StyledChipWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
19886
19894
  borderColor: isChecked ? getIn(theme.colors, borderColor) : 'transparent'
19887
19895
  }, !isDisabled && {
19888
19896
  '&:hover': {
19889
- backgroundColor: getIn(theme.colors, chipColorTokens.background[isChecked && intent ? intent : 'unchecked'].hover),
19897
+ backgroundColor: getIn(theme.colors, chipColorTokens.background[isChecked && color ? color : 'unchecked'].hover),
19890
19898
  transitionTimingFunction: easing,
19891
19899
  transitionDuration: duration
19892
19900
  }
@@ -19983,16 +19991,17 @@ var useRadio = function useRadio(_ref) {
19983
19991
  };
19984
19992
  };
19985
19993
 
19986
- var _excluded$r = ["isDisabled", "value", "children", "icon", "intent", "testID"];
19994
+ var _excluded$r = ["isDisabled", "value", "children", "icon", "intent", "color", "testID"];
19987
19995
  function ownKeys$11(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19988
19996
  function _objectSpread$10(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$11(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$11(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19989
19997
  var _Chip = function _Chip(_ref, ref) {
19990
- var _groupProps$state, _groupProps$defaultVa;
19998
+ var _groupProps$state, _groupProps$defaultVa, _ref2;
19991
19999
  var isDisabled = _ref.isDisabled,
19992
20000
  value = _ref.value,
19993
20001
  children = _ref.children,
19994
20002
  Icon = _ref.icon,
19995
20003
  intent = _ref.intent,
20004
+ color = _ref.color,
19996
20005
  testID = _ref.testID,
19997
20006
  styledProps = _objectWithoutProperties$1(_ref, _excluded$r);
19998
20007
  var _useTheme = useTheme(),
@@ -20025,9 +20034,12 @@ var _Chip = function _Chip(_ref, ref) {
20025
20034
  var useChip = (groupProps === null || groupProps === void 0 ? void 0 : groupProps.selectionType) === 'single' ? useRadio : useCheckbox;
20026
20035
  var _size = (groupProps === null || groupProps === void 0 ? void 0 : groupProps.size) || 'small';
20027
20036
  var _intent = intent !== null && intent !== void 0 ? intent : groupProps === null || groupProps === void 0 ? void 0 : groupProps.intent;
20028
- var handleChange = function handleChange(_ref2) {
20029
- var isChecked = _ref2.isChecked,
20030
- value = _ref2.value;
20037
+ // If intent is proovided and it's not none, use intent otherwise use color
20038
+ var _color = (_ref2 = color !== null && color !== void 0 ? color : groupProps === null || groupProps === void 0 ? void 0 : groupProps.color) !== null && _ref2 !== void 0 ? _ref2 : 'default';
20039
+ var chipColor = _intent && _intent !== 'none' ? _intent : _color;
20040
+ var handleChange = function handleChange(_ref3) {
20041
+ var isChecked = _ref3.isChecked,
20042
+ value = _ref3.value;
20031
20043
  if (isChecked) {
20032
20044
  var _groupProps$state2;
20033
20045
  groupProps === null || groupProps === void 0 ? void 0 : (_groupProps$state2 = groupProps.state) === null || _groupProps$state2 === void 0 ? void 0 : _groupProps$state2.addValue(value);
@@ -20067,8 +20079,8 @@ var _Chip = function _Chip(_ref, ref) {
20067
20079
  }
20068
20080
  }, [_isDisabled]);
20069
20081
  var textVariant = 'unchecked';
20070
- if (_isChecked && _intent) {
20071
- textVariant = _intent;
20082
+ if (_isChecked && chipColor) {
20083
+ textVariant = chipColor;
20072
20084
  }
20073
20085
  if (_isDisabled) {
20074
20086
  textVariant = 'disabled';
@@ -20077,8 +20089,8 @@ var _Chip = function _Chip(_ref, ref) {
20077
20089
  var chipIconColor = chipColorTokens.icon[textVariant];
20078
20090
  var intentVariant = 'unchecked';
20079
20091
  var stateVariant = _isDisabled ? 'disabled' : 'default';
20080
- if (_isChecked && _intent) {
20081
- intentVariant = _intent;
20092
+ if (_isChecked && chipColor) {
20093
+ intentVariant = chipColor;
20082
20094
  }
20083
20095
  var chipBackgroundColor = chipColorTokens.background[intentVariant][stateVariant];
20084
20096
  var chipBorderColor = chipColorTokens.border[intentVariant][stateVariant];
@@ -20108,7 +20120,7 @@ var _Chip = function _Chip(_ref, ref) {
20108
20120
  alignItems: "center",
20109
20121
  flexDirection: "row",
20110
20122
  children: [/*#__PURE__*/jsx(SelectorInput, {
20111
- hoverTokens: getChipInputHoverTokens(_intent),
20123
+ hoverTokens: getChipInputHoverTokens(chipColor),
20112
20124
  isChecked: state.isChecked,
20113
20125
  isDisabled: _isDisabled,
20114
20126
  inputProps: inputProps,
@@ -20122,7 +20134,7 @@ var _Chip = function _Chip(_ref, ref) {
20122
20134
  borderColor: chipBorderColor,
20123
20135
  isChecked: _isChecked,
20124
20136
  isDisabled: _isDisabled,
20125
- intent: _intent,
20137
+ color: chipColor,
20126
20138
  display: "flex",
20127
20139
  flexDirection: "row",
20128
20140
  justifyContent: "center",
@@ -20166,6 +20178,7 @@ var useChipGroup = function useChipGroup(_ref) {
20166
20178
  name = _ref.name,
20167
20179
  size = _ref.size,
20168
20180
  intent = _ref.intent,
20181
+ color = _ref.color,
20169
20182
  selectionType = _ref.selectionType;
20170
20183
  var idBase = useId('chip-group');
20171
20184
  var labelId = "".concat(idBase, "-label");
@@ -20233,9 +20246,10 @@ var useChipGroup = function useChipGroup(_ref) {
20233
20246
  state: state,
20234
20247
  size: size,
20235
20248
  intent: intent,
20249
+ color: color,
20236
20250
  selectionType: selectionType
20237
20251
  };
20238
- }, [isDisabled, name, state, size, intent, selectionType]);
20252
+ }, [isDisabled, name, state, size, intent, color, selectionType]);
20239
20253
  return {
20240
20254
  state: state,
20241
20255
  contextValue: contextValue,
@@ -20245,7 +20259,7 @@ var useChipGroup = function useChipGroup(_ref) {
20245
20259
  };
20246
20260
  };
20247
20261
 
20248
- var _excluded$q = ["accessibilityLabel", "children", "isDisabled", "name", "defaultValue", "onChange", "value", "size", "intent", "testID", "selectionType"];
20262
+ var _excluded$q = ["accessibilityLabel", "children", "isDisabled", "name", "defaultValue", "onChange", "value", "size", "intent", "color", "testID", "selectionType"];
20249
20263
  function ownKeys$10(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
20250
20264
  function _objectSpread$$(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$10(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$10(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
20251
20265
  var ChipGroup = function ChipGroup(_ref) {
@@ -20261,6 +20275,7 @@ var ChipGroup = function ChipGroup(_ref) {
20261
20275
  size = _ref$size === void 0 ? 'small' : _ref$size,
20262
20276
  _ref$intent = _ref.intent,
20263
20277
  intent = _ref$intent === void 0 ? 'none' : _ref$intent,
20278
+ color = _ref.color,
20264
20279
  testID = _ref.testID,
20265
20280
  _ref$selectionType = _ref.selectionType,
20266
20281
  selectionType = _ref$selectionType === void 0 ? 'single' : _ref$selectionType,
@@ -20273,6 +20288,7 @@ var ChipGroup = function ChipGroup(_ref) {
20273
20288
  name: name,
20274
20289
  size: size,
20275
20290
  intent: intent,
20291
+ color: color,
20276
20292
  selectionType: selectionType
20277
20293
  }),
20278
20294
  contextValue = _useChipGroup.contextValue,
@@ -22549,7 +22565,7 @@ var CharacterCounter = function CharacterCounter(_ref) {
22549
22565
  });
22550
22566
  };
22551
22567
 
22552
- var _excluded$i = ["label", "labelPosition", "accessibilityLabel", "contrast", "size", "testID"];
22568
+ var _excluded$i = ["label", "labelPosition", "accessibilityLabel", "color", "contrast", "size", "testID"];
22553
22569
  function ownKeys$N(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
22554
22570
  function _objectSpread$M(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$N(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$N(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
22555
22571
  var Spinner = function Spinner(_ref) {
@@ -22557,6 +22573,8 @@ var Spinner = function Spinner(_ref) {
22557
22573
  var label = _ref.label,
22558
22574
  labelPosition = _ref.labelPosition,
22559
22575
  accessibilityLabel = _ref.accessibilityLabel,
22576
+ _ref$color = _ref.color,
22577
+ color = _ref$color === void 0 ? 'default' : _ref$color,
22560
22578
  _ref$contrast = _ref.contrast,
22561
22579
  contrast = _ref$contrast === void 0 ? 'low' : _ref$contrast,
22562
22580
  _ref$size = _ref.size,
@@ -22568,6 +22586,7 @@ var Spinner = function Spinner(_ref) {
22568
22586
  labelPosition: labelPosition,
22569
22587
  accessibilityLabel: (_ref2 = accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : label) !== null && _ref2 !== void 0 ? _ref2 : 'Loading',
22570
22588
  contrast: contrast,
22589
+ color: color,
22571
22590
  size: size,
22572
22591
  testID: testID
22573
22592
  }, styledProps));
@@ -23995,7 +24014,7 @@ var useAutoComplete = function useAutoComplete(_ref) {
23995
24014
  setActiveIndex(firstItemOptionIndex);
23996
24015
  }
23997
24016
  // eslint-disable-next-line react-hooks/exhaustive-deps
23998
- }, [globalFilteredValues.length]);
24017
+ }, [globalFilteredValues.length, options.length]);
23999
24018
 
24000
24019
  // When input is empty or its single select, we want all items to be shown in filter on open of dropdown
24001
24020
  React__default.useEffect(function () {