@razorpay/blade 10.13.2 → 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 +163 -145
  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 +16 -16
  6. package/build/components/index.native.js.map +1 -1
  7. package/build/components/index.production.web.js +163 -145
  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,
@@ -15712,7 +15715,7 @@ var getStringFromReactText = function getStringFromReactText(childReactText) {
15712
15715
  return String(childReactText);
15713
15716
  };
15714
15717
 
15715
- var _excluded$C = ["children", "contrast", "fontWeight", "icon", "size", "variant", "testID"];
15718
+ var _excluded$C = ["children", "contrast", "fontWeight", "icon", "size", "variant", "color", "testID"];
15716
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; }
15717
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; }
15718
15721
  var isFeedbackVariant$1 = function isFeedbackVariant(variant) {
@@ -15722,19 +15725,20 @@ var isFeedbackVariant$1 = function isFeedbackVariant(variant) {
15722
15725
  var getColorProps$1 = function getColorProps(_ref) {
15723
15726
  var variant = _ref.variant,
15724
15727
  contrast = _ref.contrast;
15728
+ var badgeVariant = variant === 'default' ? 'blue' : variant;
15725
15729
  var props = {
15726
15730
  iconColor: 'feedback.icon.neutral.lowContrast',
15727
15731
  textColor: 'feedback.text.neutral.lowContrast',
15728
15732
  backgroundColor: 'feedback.background.neutral.lowContrast'
15729
15733
  };
15730
- if (isFeedbackVariant$1(variant)) {
15731
- props.iconColor = "feedback.icon.".concat(variant, ".").concat(contrast, "Contrast");
15732
- props.textColor = "feedback.text.".concat(variant, ".").concat(contrast, "Contrast");
15733
- 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");
15734
15738
  } else {
15735
- props.iconColor = "badge.icon.".concat(variant, ".").concat(contrast, "Contrast");
15736
- props.textColor = "badge.text.".concat(variant, ".").concat(contrast, "Contrast");
15737
- 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");
15738
15742
  }
15739
15743
  return props;
15740
15744
  };
@@ -15749,6 +15753,7 @@ var _Badge = function _Badge(_ref2) {
15749
15753
  size = _ref2$size === void 0 ? 'medium' : _ref2$size,
15750
15754
  _ref2$variant = _ref2.variant,
15751
15755
  variant = _ref2$variant === void 0 ? 'neutral' : _ref2$variant,
15756
+ color = _ref2.color,
15752
15757
  testID = _ref2.testID,
15753
15758
  styledProps = _objectWithoutProperties$1(_ref2, _excluded$C);
15754
15759
  var childrenString = getStringFromReactText(children);
@@ -15760,8 +15765,9 @@ var _Badge = function _Badge(_ref2) {
15760
15765
  });
15761
15766
  }
15762
15767
  }
15768
+ var badgeVariant = color !== null && color !== void 0 ? color : variant;
15763
15769
  var _getColorProps = getColorProps$1({
15764
- variant: variant,
15770
+ variant: badgeVariant,
15765
15771
  contrast: contrast
15766
15772
  }),
15767
15773
  backgroundColor = _getColorProps.backgroundColor,
@@ -16369,20 +16375,24 @@ var StyledBaseButton = /*#__PURE__*/styled.button.withConfig({
16369
16375
  transitionTimingFunction: getIn(props.theme.motion, props.motionEasing),
16370
16376
  transitionDuration: castWebType(makeMotionTime(getIn(props.theme.motion, props.motionDuration))),
16371
16377
  position: 'relative',
16372
- '&:hover': {
16373
- backgroundColor: props.hoverBackgroundColor,
16378
+ '&:hover': _objectSpread$1o({
16379
+ backgroundColor: props.hoverBackgroundColor
16380
+ }, props.variant !== 'tertiary' && {
16374
16381
  borderColor: props.hoverBorderColor
16375
- },
16376
- '&:active': {
16377
- backgroundColor: props.activeBackgroundColor,
16382
+ }),
16383
+ '&:active': _objectSpread$1o({
16384
+ backgroundColor: props.activeBackgroundColor
16385
+ }, props.variant !== 'tertiary' && {
16378
16386
  borderColor: props.activeBorderColor
16379
- },
16380
- '&:focus': {
16381
- backgroundColor: props.focusBackgroundColor,
16382
- borderColor: props.focusBorderColor,
16383
- boxShadow: "0px 0px 0px 4px ".concat(props.focusRingColor),
16384
- outline: 'none'
16385
- },
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
+ }),
16386
16396
  '*': {
16387
16397
  transitionProperty: 'color, fill',
16388
16398
  transitionDuration: castWebType(makeMotionTime(getIn(props.theme.motion, props.motionDuration))),
@@ -16463,8 +16473,8 @@ var buttonIconOnlyPadding = {
16463
16473
  large: {
16464
16474
  top: 0,
16465
16475
  bottom: 0,
16466
- left: 4,
16467
- right: 4
16476
+ left: 2,
16477
+ right: 2
16468
16478
  }
16469
16479
  };
16470
16480
  var buttonSizeToIconSizeMap = {
@@ -16474,10 +16484,10 @@ var buttonSizeToIconSizeMap = {
16474
16484
  large: 'medium'
16475
16485
  };
16476
16486
  var buttonIconOnlySizeToIconSizeMap = {
16477
- xsmall: 'medium',
16478
- small: 'medium',
16479
- medium: 'large',
16480
- large: 'xlarge'
16487
+ xsmall: 'small',
16488
+ small: 'small',
16489
+ medium: 'medium',
16490
+ large: 'medium'
16481
16491
  };
16482
16492
  var buttonSizeToSpinnerSizeMap = {
16483
16493
  xsmall: 'medium',
@@ -16485,11 +16495,11 @@ var buttonSizeToSpinnerSizeMap = {
16485
16495
  medium: 'large',
16486
16496
  large: 'xlarge'
16487
16497
  };
16488
- var textPadding = {
16489
- xsmall: 2,
16490
- small: 2,
16491
- medium: 3,
16492
- large: 3
16498
+ var buttonIconPadding = {
16499
+ xsmall: 1,
16500
+ small: 1,
16501
+ medium: 2,
16502
+ large: 2
16493
16503
  };
16494
16504
 
16495
16505
  var LIVEREGION_TIMEOUT_DELAY = 1000;
@@ -16632,20 +16642,20 @@ var SpinningBox = /*#__PURE__*/styled(BaseBox).withConfig({
16632
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));
16633
16643
  });
16634
16644
 
16635
- var _excluded$B = ["label", "labelPosition", "accessibilityLabel", "contrast", "intent", "size", "testID"];
16645
+ var _excluded$B = ["label", "labelPosition", "accessibilityLabel", "contrast", "color", "size", "testID"];
16636
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; }
16637
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; }
16638
16648
  var getColor = function getColor(_ref) {
16639
16649
  var contrast = _ref.contrast,
16640
- intent = _ref.intent,
16650
+ color = _ref.color,
16641
16651
  theme = _ref.theme;
16642
- if (intent) {
16643
- return getIn(theme.colors, "feedback.".concat(intent, ".action.icon.primary.disabled.").concat(contrast, "Contrast"));
16644
- } else if (contrast == 'low') {
16645
- return getIn(theme.colors, 'brand.gray.700.lowContrast');
16646
- } else {
16647
- 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"));
16648
16657
  }
16658
+ return getIn(theme.colors, 'brand.gray.700.lowContrast');
16649
16659
  };
16650
16660
  var BaseSpinner = function BaseSpinner(_ref2) {
16651
16661
  var label = _ref2.label,
@@ -16654,7 +16664,8 @@ var BaseSpinner = function BaseSpinner(_ref2) {
16654
16664
  accessibilityLabel = _ref2.accessibilityLabel,
16655
16665
  _ref2$contrast = _ref2.contrast,
16656
16666
  contrast = _ref2$contrast === void 0 ? 'low' : _ref2$contrast,
16657
- intent = _ref2.intent,
16667
+ _ref2$color = _ref2.color,
16668
+ color = _ref2$color === void 0 ? 'default' : _ref2$color,
16658
16669
  _ref2$size = _ref2.size,
16659
16670
  size = _ref2$size === void 0 ? 'medium' : _ref2$size,
16660
16671
  testID = _ref2.testID,
@@ -16678,7 +16689,7 @@ var BaseSpinner = function BaseSpinner(_ref2) {
16678
16689
  dimensions: makeSize(dimensions[size]),
16679
16690
  color: getColor({
16680
16691
  contrast: contrast,
16681
- intent: intent,
16692
+ color: color,
16682
16693
  theme: theme
16683
16694
  })
16684
16695
  })
@@ -16698,7 +16709,7 @@ var BaseSpinner = function BaseSpinner(_ref2) {
16698
16709
  }));
16699
16710
  };
16700
16711
 
16701
- 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"];
16702
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; }
16703
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; }
16704
16715
  var getRenderElement = function getRenderElement(href) {
@@ -16715,13 +16726,14 @@ var getColorToken$1 = function getColorToken(_ref) {
16715
16726
  var property = _ref.property,
16716
16727
  variant = _ref.variant,
16717
16728
  state = _ref.state,
16718
- contrast = _ref.contrast,
16719
- intent = _ref.intent;
16720
- if (intent && contrast) {
16721
- // TODO: Add support for secondary & tertiary variants for feedback buttons here when a use-case is identified
16722
- 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);
16723
16735
  }
16724
- 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");
16725
16737
  };
16726
16738
  var getProps$1 = function getProps(_ref2) {
16727
16739
  var buttonTypographyTokens = _ref2.buttonTypographyTokens,
@@ -16730,9 +16742,14 @@ var getProps$1 = function getProps(_ref2) {
16730
16742
  size = _ref2.size,
16731
16743
  theme = _ref2.theme,
16732
16744
  variant = _ref2.variant,
16733
- intent = _ref2.intent,
16734
- contrast = _ref2.contrast,
16745
+ color = _ref2.color,
16735
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
+ }
16736
16753
  var isIconOnly = hasIcon && (!children || (children === null || children === void 0 ? void 0 : children.trim().length) === 0);
16737
16754
  var props = {
16738
16755
  iconSize: isIconOnly ? buttonIconOnlySizeToIconSizeMap[size] : buttonSizeToIconSizeMap[size],
@@ -16740,19 +16757,17 @@ var getProps$1 = function getProps(_ref2) {
16740
16757
  fontSize: buttonTypographyTokens.fonts.size[size],
16741
16758
  lineHeight: buttonTypographyTokens.lineHeights[size],
16742
16759
  minHeight: makeSize(minHeight[size]),
16743
- 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,
16744
16761
  iconColor: getColorToken$1({
16745
16762
  property: 'icon',
16746
16763
  variant: variant,
16747
- contrast: contrast,
16748
- intent: intent,
16764
+ color: color,
16749
16765
  state: 'default'
16750
16766
  }),
16751
16767
  textColor: getColorToken$1({
16752
16768
  property: 'text',
16753
16769
  variant: variant,
16754
- contrast: contrast,
16755
- intent: intent,
16770
+ color: color,
16756
16771
  state: 'default'
16757
16772
  }),
16758
16773
  buttonPaddingTop: isIconOnly ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].top]) : makeSpace(theme.spacing[buttonPadding[size].top]),
@@ -16763,57 +16778,49 @@ var getProps$1 = function getProps(_ref2) {
16763
16778
  defaultBackgroundColor: getIn(theme.colors, getColorToken$1({
16764
16779
  property: 'background',
16765
16780
  variant: variant,
16766
- contrast: contrast,
16767
- intent: intent,
16781
+ color: color,
16768
16782
  state: 'default'
16769
16783
  })),
16770
16784
  defaultBorderColor: getIn(theme.colors, getColorToken$1({
16771
16785
  property: 'border',
16772
16786
  variant: variant,
16773
- contrast: contrast,
16774
- intent: intent,
16787
+ color: color,
16775
16788
  state: 'default'
16776
16789
  })),
16777
16790
  hoverBackgroundColor: getIn(theme.colors, getColorToken$1({
16778
16791
  property: 'background',
16779
16792
  variant: variant,
16780
- contrast: contrast,
16781
- intent: intent,
16793
+ color: color,
16782
16794
  state: 'hover'
16783
16795
  })),
16784
16796
  hoverBorderColor: getIn(theme.colors, getColorToken$1({
16785
16797
  property: 'border',
16786
16798
  variant: variant,
16787
- contrast: contrast,
16788
- intent: intent,
16799
+ color: color,
16789
16800
  state: 'hover'
16790
16801
  })),
16791
16802
  activeBackgroundColor: getIn(theme.colors, getColorToken$1({
16792
16803
  property: 'background',
16793
16804
  variant: variant,
16794
- contrast: contrast,
16795
- intent: intent,
16805
+ color: color,
16796
16806
  state: 'active'
16797
16807
  })),
16798
16808
  activeBorderColor: getIn(theme.colors, getColorToken$1({
16799
16809
  property: 'border',
16800
16810
  variant: variant,
16801
- contrast: contrast,
16802
- intent: intent,
16811
+ color: color,
16803
16812
  state: 'active'
16804
16813
  })),
16805
16814
  focusBackgroundColor: getIn(theme.colors, getColorToken$1({
16806
16815
  property: 'background',
16807
16816
  variant: variant,
16808
- contrast: contrast,
16809
- intent: intent,
16817
+ color: color,
16810
16818
  state: 'focus'
16811
16819
  })),
16812
16820
  focusBorderColor: getIn(theme.colors, getColorToken$1({
16813
16821
  property: 'border',
16814
16822
  variant: variant,
16815
- contrast: contrast,
16816
- intent: intent,
16823
+ color: color,
16817
16824
  state: 'focus'
16818
16825
  })),
16819
16826
  focusRingColor: getIn(theme.colors, 'brand.primary.400'),
@@ -16826,29 +16833,25 @@ var getProps$1 = function getProps(_ref2) {
16826
16833
  var disabledBackgroundColor = getIn(theme.colors, getColorToken$1({
16827
16834
  property: 'background',
16828
16835
  variant: variant,
16829
- contrast: contrast,
16830
- intent: intent,
16836
+ color: color,
16831
16837
  state: 'disabled'
16832
16838
  }));
16833
16839
  var disabledBorderColor = getIn(theme.colors, getColorToken$1({
16834
16840
  property: 'border',
16835
16841
  variant: variant,
16836
- contrast: contrast,
16837
- intent: intent,
16842
+ color: color,
16838
16843
  state: 'disabled'
16839
16844
  }));
16840
16845
  props.iconColor = getColorToken$1({
16841
16846
  property: 'icon',
16842
16847
  variant: variant,
16843
- contrast: contrast,
16844
- intent: intent,
16848
+ color: color,
16845
16849
  state: 'disabled'
16846
16850
  });
16847
16851
  props.textColor = getColorToken$1({
16848
16852
  property: 'text',
16849
16853
  variant: variant,
16850
- contrast: contrast,
16851
- intent: intent,
16854
+ color: color,
16852
16855
  state: 'disabled'
16853
16856
  });
16854
16857
  props.defaultBackgroundColor = disabledBackgroundColor;
@@ -16877,9 +16880,8 @@ var _BaseButton = function _BaseButton(_ref4, ref) {
16877
16880
  rel = _ref4.rel,
16878
16881
  _ref4$variant = _ref4.variant,
16879
16882
  variant = _ref4$variant === void 0 ? 'primary' : _ref4$variant,
16880
- intent = _ref4.intent,
16881
- _ref4$contrast = _ref4.contrast,
16882
- contrast = _ref4$contrast === void 0 ? 'low' : _ref4$contrast,
16883
+ _ref4$color = _ref4.color,
16884
+ color = _ref4$color === void 0 ? 'default' : _ref4$color,
16883
16885
  _ref4$size = _ref4.size,
16884
16886
  size = _ref4$size === void 0 ? 'medium' : _ref4$size,
16885
16887
  Icon = _ref4.icon,
@@ -16933,8 +16935,7 @@ var _BaseButton = function _BaseButton(_ref4, ref) {
16933
16935
  size: size,
16934
16936
  variant: variant,
16935
16937
  theme: theme,
16936
- intent: intent,
16937
- contrast: contrast,
16938
+ color: color,
16938
16939
  hasIcon: Boolean(Icon)
16939
16940
  }),
16940
16941
  activeBorderColor = _getProps.activeBorderColor,
@@ -16979,6 +16980,7 @@ var _BaseButton = function _BaseButton(_ref4, ref) {
16979
16980
  accessibilityProps: _objectSpread$1m({}, makeAccessible(_objectSpread$1m({
16980
16981
  role: isLink ? 'link' : 'button'
16981
16982
  }, accessibilityProps))),
16983
+ variant: variant,
16982
16984
  isLoading: isLoading,
16983
16985
  disabled: disabled,
16984
16986
  activeBorderColor: activeBorderColor,
@@ -17027,8 +17029,7 @@ var _BaseButton = function _BaseButton(_ref4, ref) {
17027
17029
  children: /*#__PURE__*/jsx(BaseSpinner, {
17028
17030
  accessibilityLabel: "Loading",
17029
17031
  size: spinnerSize,
17030
- intent: intent,
17031
- contrast: contrast
17032
+ color: color
17032
17033
  })
17033
17034
  }) : null, /*#__PURE__*/jsxs(ButtonContent, {
17034
17035
  display: "flex",
@@ -17144,14 +17145,13 @@ var useInteraction = function useInteraction() {
17144
17145
  };
17145
17146
  };
17146
17147
 
17147
- 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"],
17148
17149
  _excluded2 = ["currentInteraction", "setCurrentInteraction"];
17149
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; }
17150
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; }
17151
17152
  var getColorToken = function getColorToken(_ref) {
17152
17153
  var variant = _ref.variant,
17153
- intent = _ref.intent,
17154
- contrast = _ref.contrast,
17154
+ color = _ref.color,
17155
17155
  element = _ref.element,
17156
17156
  currentInteraction = _ref.currentInteraction,
17157
17157
  isDisabled = _ref.isDisabled,
@@ -17160,12 +17160,15 @@ var getColorToken = function getColorToken(_ref) {
17160
17160
  if (isDisabled && variant == 'button') {
17161
17161
  state = 'disabled';
17162
17162
  }
17163
- if (isVisited && variant == 'anchor' && !intent) {
17164
- // 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
17165
17165
  state = 'visited';
17166
17166
  }
17167
- if (intent && state !== 'visited') {
17168
- 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);
17169
17172
  }
17170
17173
  return "action.".concat(element, ".link.").concat(state);
17171
17174
  };
@@ -17175,8 +17178,7 @@ var getProps = function getProps(_ref2) {
17175
17178
  currentInteraction = _ref2.currentInteraction,
17176
17179
  children = _ref2.children,
17177
17180
  isDisabled = _ref2.isDisabled,
17178
- intent = _ref2.intent,
17179
- contrast = _ref2.contrast,
17181
+ color = _ref2.color,
17180
17182
  isVisited = _ref2.isVisited,
17181
17183
  target = _ref2.target,
17182
17184
  size = _ref2.size;
@@ -17200,8 +17202,7 @@ var getProps = function getProps(_ref2) {
17200
17202
  textDecorationLine: !isButton && currentInteraction !== 'default' ? 'underline' : 'none',
17201
17203
  iconColor: getColorToken({
17202
17204
  variant: variant,
17203
- intent: intent,
17204
- contrast: contrast,
17205
+ color: color,
17205
17206
  element: 'icon',
17206
17207
  currentInteraction: currentInteraction,
17207
17208
  isDisabled: isDisabled,
@@ -17213,8 +17214,7 @@ var getProps = function getProps(_ref2) {
17213
17214
  iconPadding: children !== null && children !== void 0 && children.trim() ? 'spacing.2' : 'spacing.0',
17214
17215
  textColor: getColorToken({
17215
17216
  variant: variant,
17216
- intent: intent,
17217
- contrast: contrast,
17217
+ color: color,
17218
17218
  element: 'text',
17219
17219
  currentInteraction: currentInteraction,
17220
17220
  isDisabled: isDisabled,
@@ -17245,9 +17245,8 @@ var _BaseLink = function _BaseLink(_ref3, ref) {
17245
17245
  href = _ref3.href,
17246
17246
  target = _ref3.target,
17247
17247
  rel = _ref3.rel,
17248
- intent = _ref3.intent,
17249
- _ref3$contrast = _ref3.contrast,
17250
- contrast = _ref3$contrast === void 0 ? 'low' : _ref3$contrast,
17248
+ _ref3$color = _ref3.color,
17249
+ color = _ref3$color === void 0 ? 'default' : _ref3$color,
17251
17250
  accessibilityProps = _ref3.accessibilityProps,
17252
17251
  className = _ref3.className,
17253
17252
  style = _ref3.style,
@@ -17290,8 +17289,7 @@ var _BaseLink = function _BaseLink(_ref3, ref) {
17290
17289
  currentInteraction: currentInteraction,
17291
17290
  children: childrenString,
17292
17291
  isDisabled: isDisabled,
17293
- intent: intent,
17294
- contrast: contrast,
17292
+ color: color,
17295
17293
  isVisited: isVisited,
17296
17294
  target: target,
17297
17295
  size: size
@@ -17313,8 +17311,8 @@ var _BaseLink = function _BaseLink(_ref3, ref) {
17313
17311
  type = _getProps.type,
17314
17312
  lineHeight = _getProps.lineHeight;
17315
17313
  var handleOnClick = function handleOnClick(event) {
17316
- if (!isVisited && !intent && variant === 'anchor') {
17317
- // 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
17318
17316
  setIsVisited(true);
17319
17317
  }
17320
17318
  if (onClick) {
@@ -17414,7 +17412,7 @@ var BaseLink = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__defaul
17414
17412
  componentId: 'BaseLink'
17415
17413
  });
17416
17414
 
17417
- 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"];
17418
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; }
17419
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; }
17420
17418
  var isReactNative$3 = getPlatformType() === 'react-native';
@@ -17440,6 +17438,7 @@ var Alert = function Alert(_ref) {
17440
17438
  isFullWidth = _ref$isFullWidth === void 0 ? false : _ref$isFullWidth,
17441
17439
  _ref$intent = _ref.intent,
17442
17440
  intent = _ref$intent === void 0 ? 'neutral' : _ref$intent,
17441
+ color = _ref.color,
17443
17442
  actions = _ref.actions,
17444
17443
  testID = _ref.testID,
17445
17444
  styledProps = _objectWithoutProperties$1(_ref, _excluded$y);
@@ -17524,8 +17523,8 @@ var Alert = function Alert(_ref) {
17524
17523
  children: /*#__PURE__*/jsx(BaseButton, {
17525
17524
  size: textSize,
17526
17525
  onClick: actions.primary.onClick,
17527
- intent: intent,
17528
- contrast: contrast,
17526
+ color: color || intent,
17527
+ variant: contrast === 'high' ? 'primary' : 'secondary',
17529
17528
  children: actions.primary.text
17530
17529
  })
17531
17530
  }) : null;
@@ -17549,8 +17548,7 @@ var Alert = function Alert(_ref) {
17549
17548
  display: isReactNative$3 ? castNativeType('flex') : castWebType('inline-flex'),
17550
17549
  children: /*#__PURE__*/jsx(BaseLink, _objectSpread$1j(_objectSpread$1j({
17551
17550
  size: textSize,
17552
- contrast: contrast,
17553
- intent: intent
17551
+ color: contrast === 'high' ? 'white' : intent
17554
17552
  }, secondaryActionParams), {}, {
17555
17553
  children: actions.secondary.text
17556
17554
  }))
@@ -17903,7 +17901,7 @@ var CardBody = /*#__PURE__*/assignWithoutSideEffects(_CardBody, {
17903
17901
  componentId: ComponentIds$1.CardBody
17904
17902
  });
17905
17903
 
17906
- 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"];
17907
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; }
17908
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; }
17909
17907
  var _Link = function _Link(_ref, ref) {
@@ -17916,6 +17914,8 @@ var _Link = function _Link(_ref, ref) {
17916
17914
  onClick = _ref.onClick,
17917
17915
  _ref$variant = _ref.variant,
17918
17916
  variant = _ref$variant === void 0 ? 'anchor' : _ref$variant,
17917
+ _ref$color = _ref.color,
17918
+ color = _ref$color === void 0 ? 'default' : _ref$color,
17919
17919
  href = _ref.href,
17920
17920
  target = _ref.target,
17921
17921
  rel = _ref.rel,
@@ -17956,6 +17956,7 @@ var _Link = function _Link(_ref, ref) {
17956
17956
  describedBy: rest['aria-describedby']
17957
17957
  },
17958
17958
  size: size,
17959
+ color: color,
17959
17960
  testID: testID,
17960
17961
  hitSlop: hitSlop,
17961
17962
  htmlTitle: htmlTitle,
@@ -17974,7 +17975,7 @@ var Link = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__default.fo
17974
17975
  componentId: 'Link'
17975
17976
  });
17976
17977
 
17977
- 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"];
17978
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; }
17979
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; }
17980
17981
  var _Button = function _Button( // While adding any prop here, make sure to handle it in DropdownButton as well
@@ -17999,6 +18000,8 @@ _ref, ref) {
17999
18000
  type = _ref$type === void 0 ? 'button' : _ref$type,
18000
18001
  _ref$variant = _ref.variant,
18001
18002
  variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
18003
+ _ref$color = _ref.color,
18004
+ color = _ref$color === void 0 ? 'default' : _ref$color,
18002
18005
  accessibilityLabel = _ref.accessibilityLabel,
18003
18006
  testID = _ref.testID,
18004
18007
  onBlur = _ref.onBlur,
@@ -18025,6 +18028,7 @@ _ref, ref) {
18025
18028
  describedBy: rest['aria-describedby']
18026
18029
  },
18027
18030
  iconPosition: iconPosition,
18031
+ color: color,
18028
18032
  isDisabled: isDisabled,
18029
18033
  isFullWidth: isFullWidth,
18030
18034
  onClick: onClick,
@@ -18087,7 +18091,7 @@ var StyledCounter = /*#__PURE__*/styled(BaseBox).withConfig({
18087
18091
  });
18088
18092
  });
18089
18093
 
18090
- var _excluded$t = ["value", "max", "intent", "variant", "contrast", "size", "testID"];
18094
+ var _excluded$t = ["value", "max", "intent", "variant", "color", "contrast", "size", "testID"];
18091
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; }
18092
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; }
18093
18097
  var isFeedbackVariant = function isFeedbackVariant(variant) {
@@ -18099,25 +18103,28 @@ var getColorProps = function getColorProps(_ref) {
18099
18103
  variant = _ref$variant === void 0 ? 'neutral' : _ref$variant,
18100
18104
  _ref$contrast = _ref.contrast,
18101
18105
  contrast = _ref$contrast === void 0 ? 'low' : _ref$contrast;
18106
+ var counterVariant = variant === 'default' ? 'blue' : variant;
18102
18107
  var props = {
18103
18108
  textColor: 'feedback.text.neutral.lowContrast',
18104
18109
  backgroundColor: 'feedback.background.neutral.lowContrast'
18105
18110
  };
18106
- if (isFeedbackVariant(variant)) {
18107
- props.textColor = "feedback.text.".concat(variant, ".").concat(contrast, "Contrast");
18108
- 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");
18109
18114
  } else {
18110
- props.textColor = "badge.text.".concat(variant, ".").concat(contrast, "Contrast");
18111
- 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");
18112
18117
  }
18113
18118
  return props;
18114
18119
  };
18115
18120
  var Counter = function Counter(_ref2) {
18121
+ var _ref3;
18116
18122
  var value = _ref2.value,
18117
18123
  max = _ref2.max,
18118
18124
  intent = _ref2.intent,
18119
18125
  _ref2$variant = _ref2.variant,
18120
18126
  variant = _ref2$variant === void 0 ? 'neutral' : _ref2$variant,
18127
+ color = _ref2.color,
18121
18128
  _ref2$contrast = _ref2.contrast,
18122
18129
  contrast = _ref2$contrast === void 0 ? 'low' : _ref2$contrast,
18123
18130
  _ref2$size = _ref2.size,
@@ -18131,7 +18138,7 @@ var Counter = function Counter(_ref2) {
18131
18138
  var _useTheme = useTheme(),
18132
18139
  platform = _useTheme.platform;
18133
18140
  var _getColorProps = getColorProps({
18134
- variant: intent !== null && intent !== void 0 ? intent : variant,
18141
+ variant: (_ref3 = color !== null && color !== void 0 ? color : intent) !== null && _ref3 !== void 0 ? _ref3 : variant,
18135
18142
  contrast: contrast
18136
18143
  }),
18137
18144
  backgroundColor = _getColorProps.backgroundColor,
@@ -19734,14 +19741,14 @@ var chipColorTokens = {
19734
19741
  text: {
19735
19742
  unchecked: 'surface.text.subtle.lowContrast',
19736
19743
  disabled: 'surface.text.placeholder.lowContrast',
19737
- none: 'action.text.secondary.default',
19744
+ "default": 'action.text.secondary.default',
19738
19745
  positive: 'feedback.text.positive.lowContrast',
19739
19746
  negative: 'feedback.text.negative.lowContrast'
19740
19747
  },
19741
19748
  icon: {
19742
19749
  unchecked: 'surface.text.subtle.lowContrast',
19743
19750
  disabled: 'surface.text.placeholder.lowContrast',
19744
- none: 'action.icon.secondary.default',
19751
+ "default": 'action.icon.secondary.default',
19745
19752
  positive: 'feedback.icon.positive.lowContrast',
19746
19753
  negative: 'feedback.icon.negative.lowContrast'
19747
19754
  },
@@ -19751,7 +19758,7 @@ var chipColorTokens = {
19751
19758
  hover: 'brand.gray.a50.lowContrast',
19752
19759
  disabled: 'transparent'
19753
19760
  },
19754
- none: {
19761
+ "default": {
19755
19762
  "default": 'brand.primary.300',
19756
19763
  hover: 'brand.primary.400',
19757
19764
  disabled: 'brand.gray.a50.lowContrast'
@@ -19772,7 +19779,7 @@ var chipColorTokens = {
19772
19779
  "default": 'brand.gray.400.lowContrast',
19773
19780
  disabled: 'brand.gray.400.lowContrast'
19774
19781
  },
19775
- none: {
19782
+ "default": {
19776
19783
  "default": 'brand.primary.500',
19777
19784
  hover: 'brand.primary.500',
19778
19785
  disabled: 'brand.gray.a100.lowContrast'
@@ -19789,7 +19796,7 @@ var chipColorTokens = {
19789
19796
  }
19790
19797
  }
19791
19798
  };
19792
- var getChipInputHoverTokens = function getChipInputHoverTokens(intent) {
19799
+ var getChipInputHoverTokens = function getChipInputHoverTokens(color) {
19793
19800
  return {
19794
19801
  "default": {
19795
19802
  background: {
@@ -19797,7 +19804,7 @@ var getChipInputHoverTokens = function getChipInputHoverTokens(intent) {
19797
19804
  unchecked: 'transparent'
19798
19805
  },
19799
19806
  border: {
19800
- checked: "colors.".concat(chipColorTokens.border[intent || 'none'].hover),
19807
+ checked: "colors.".concat(chipColorTokens.border[color || 'default'].hover),
19801
19808
  unchecked: 'colors.brand.gray.500.lowContrast'
19802
19809
  }
19803
19810
  }
@@ -19879,7 +19886,7 @@ var StyledChipWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
19879
19886
  borderColor = _ref.borderColor,
19880
19887
  isChecked = _ref.isChecked,
19881
19888
  isDisabled = _ref.isDisabled,
19882
- intent = _ref.intent;
19889
+ color = _ref.color;
19883
19890
  var easing = getIn(theme, chipMotionTokens.easing);
19884
19891
  var duration = castWebType(makeMotionTime(getIn(theme, chipMotionTokens.duration)));
19885
19892
  return _objectSpread$12({
@@ -19887,7 +19894,7 @@ var StyledChipWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
19887
19894
  borderColor: isChecked ? getIn(theme.colors, borderColor) : 'transparent'
19888
19895
  }, !isDisabled && {
19889
19896
  '&:hover': {
19890
- backgroundColor: getIn(theme.colors, chipColorTokens.background[isChecked && intent ? intent : 'unchecked'].hover),
19897
+ backgroundColor: getIn(theme.colors, chipColorTokens.background[isChecked && color ? color : 'unchecked'].hover),
19891
19898
  transitionTimingFunction: easing,
19892
19899
  transitionDuration: duration
19893
19900
  }
@@ -19984,16 +19991,17 @@ var useRadio = function useRadio(_ref) {
19984
19991
  };
19985
19992
  };
19986
19993
 
19987
- var _excluded$r = ["isDisabled", "value", "children", "icon", "intent", "testID"];
19994
+ var _excluded$r = ["isDisabled", "value", "children", "icon", "intent", "color", "testID"];
19988
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; }
19989
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; }
19990
19997
  var _Chip = function _Chip(_ref, ref) {
19991
- var _groupProps$state, _groupProps$defaultVa;
19998
+ var _groupProps$state, _groupProps$defaultVa, _ref2;
19992
19999
  var isDisabled = _ref.isDisabled,
19993
20000
  value = _ref.value,
19994
20001
  children = _ref.children,
19995
20002
  Icon = _ref.icon,
19996
20003
  intent = _ref.intent,
20004
+ color = _ref.color,
19997
20005
  testID = _ref.testID,
19998
20006
  styledProps = _objectWithoutProperties$1(_ref, _excluded$r);
19999
20007
  var _useTheme = useTheme(),
@@ -20026,9 +20034,12 @@ var _Chip = function _Chip(_ref, ref) {
20026
20034
  var useChip = (groupProps === null || groupProps === void 0 ? void 0 : groupProps.selectionType) === 'single' ? useRadio : useCheckbox;
20027
20035
  var _size = (groupProps === null || groupProps === void 0 ? void 0 : groupProps.size) || 'small';
20028
20036
  var _intent = intent !== null && intent !== void 0 ? intent : groupProps === null || groupProps === void 0 ? void 0 : groupProps.intent;
20029
- var handleChange = function handleChange(_ref2) {
20030
- var isChecked = _ref2.isChecked,
20031
- 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;
20032
20043
  if (isChecked) {
20033
20044
  var _groupProps$state2;
20034
20045
  groupProps === null || groupProps === void 0 ? void 0 : (_groupProps$state2 = groupProps.state) === null || _groupProps$state2 === void 0 ? void 0 : _groupProps$state2.addValue(value);
@@ -20068,8 +20079,8 @@ var _Chip = function _Chip(_ref, ref) {
20068
20079
  }
20069
20080
  }, [_isDisabled]);
20070
20081
  var textVariant = 'unchecked';
20071
- if (_isChecked && _intent) {
20072
- textVariant = _intent;
20082
+ if (_isChecked && chipColor) {
20083
+ textVariant = chipColor;
20073
20084
  }
20074
20085
  if (_isDisabled) {
20075
20086
  textVariant = 'disabled';
@@ -20078,8 +20089,8 @@ var _Chip = function _Chip(_ref, ref) {
20078
20089
  var chipIconColor = chipColorTokens.icon[textVariant];
20079
20090
  var intentVariant = 'unchecked';
20080
20091
  var stateVariant = _isDisabled ? 'disabled' : 'default';
20081
- if (_isChecked && _intent) {
20082
- intentVariant = _intent;
20092
+ if (_isChecked && chipColor) {
20093
+ intentVariant = chipColor;
20083
20094
  }
20084
20095
  var chipBackgroundColor = chipColorTokens.background[intentVariant][stateVariant];
20085
20096
  var chipBorderColor = chipColorTokens.border[intentVariant][stateVariant];
@@ -20109,7 +20120,7 @@ var _Chip = function _Chip(_ref, ref) {
20109
20120
  alignItems: "center",
20110
20121
  flexDirection: "row",
20111
20122
  children: [/*#__PURE__*/jsx(SelectorInput, {
20112
- hoverTokens: getChipInputHoverTokens(_intent),
20123
+ hoverTokens: getChipInputHoverTokens(chipColor),
20113
20124
  isChecked: state.isChecked,
20114
20125
  isDisabled: _isDisabled,
20115
20126
  inputProps: inputProps,
@@ -20123,7 +20134,7 @@ var _Chip = function _Chip(_ref, ref) {
20123
20134
  borderColor: chipBorderColor,
20124
20135
  isChecked: _isChecked,
20125
20136
  isDisabled: _isDisabled,
20126
- intent: _intent,
20137
+ color: chipColor,
20127
20138
  display: "flex",
20128
20139
  flexDirection: "row",
20129
20140
  justifyContent: "center",
@@ -20167,6 +20178,7 @@ var useChipGroup = function useChipGroup(_ref) {
20167
20178
  name = _ref.name,
20168
20179
  size = _ref.size,
20169
20180
  intent = _ref.intent,
20181
+ color = _ref.color,
20170
20182
  selectionType = _ref.selectionType;
20171
20183
  var idBase = useId('chip-group');
20172
20184
  var labelId = "".concat(idBase, "-label");
@@ -20234,9 +20246,10 @@ var useChipGroup = function useChipGroup(_ref) {
20234
20246
  state: state,
20235
20247
  size: size,
20236
20248
  intent: intent,
20249
+ color: color,
20237
20250
  selectionType: selectionType
20238
20251
  };
20239
- }, [isDisabled, name, state, size, intent, selectionType]);
20252
+ }, [isDisabled, name, state, size, intent, color, selectionType]);
20240
20253
  return {
20241
20254
  state: state,
20242
20255
  contextValue: contextValue,
@@ -20246,7 +20259,7 @@ var useChipGroup = function useChipGroup(_ref) {
20246
20259
  };
20247
20260
  };
20248
20261
 
20249
- 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"];
20250
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; }
20251
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; }
20252
20265
  var ChipGroup = function ChipGroup(_ref) {
@@ -20262,6 +20275,7 @@ var ChipGroup = function ChipGroup(_ref) {
20262
20275
  size = _ref$size === void 0 ? 'small' : _ref$size,
20263
20276
  _ref$intent = _ref.intent,
20264
20277
  intent = _ref$intent === void 0 ? 'none' : _ref$intent,
20278
+ color = _ref.color,
20265
20279
  testID = _ref.testID,
20266
20280
  _ref$selectionType = _ref.selectionType,
20267
20281
  selectionType = _ref$selectionType === void 0 ? 'single' : _ref$selectionType,
@@ -20274,6 +20288,7 @@ var ChipGroup = function ChipGroup(_ref) {
20274
20288
  name: name,
20275
20289
  size: size,
20276
20290
  intent: intent,
20291
+ color: color,
20277
20292
  selectionType: selectionType
20278
20293
  }),
20279
20294
  contextValue = _useChipGroup.contextValue,
@@ -22550,7 +22565,7 @@ var CharacterCounter = function CharacterCounter(_ref) {
22550
22565
  });
22551
22566
  };
22552
22567
 
22553
- var _excluded$i = ["label", "labelPosition", "accessibilityLabel", "contrast", "size", "testID"];
22568
+ var _excluded$i = ["label", "labelPosition", "accessibilityLabel", "color", "contrast", "size", "testID"];
22554
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; }
22555
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; }
22556
22571
  var Spinner = function Spinner(_ref) {
@@ -22558,6 +22573,8 @@ var Spinner = function Spinner(_ref) {
22558
22573
  var label = _ref.label,
22559
22574
  labelPosition = _ref.labelPosition,
22560
22575
  accessibilityLabel = _ref.accessibilityLabel,
22576
+ _ref$color = _ref.color,
22577
+ color = _ref$color === void 0 ? 'default' : _ref$color,
22561
22578
  _ref$contrast = _ref.contrast,
22562
22579
  contrast = _ref$contrast === void 0 ? 'low' : _ref$contrast,
22563
22580
  _ref$size = _ref.size,
@@ -22569,6 +22586,7 @@ var Spinner = function Spinner(_ref) {
22569
22586
  labelPosition: labelPosition,
22570
22587
  accessibilityLabel: (_ref2 = accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : label) !== null && _ref2 !== void 0 ? _ref2 : 'Loading',
22571
22588
  contrast: contrast,
22589
+ color: color,
22572
22590
  size: size,
22573
22591
  testID: testID
22574
22592
  }, styledProps));