@razorpay/blade 8.15.0 → 8.15.2

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.
@@ -18958,7 +18958,7 @@ function ownKeys$12(object, enumerableOnly) { var keys = Object.keys(object); if
18958
18958
 
18959
18959
  function _objectSpread$11(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$12(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$12(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
18960
18960
 
18961
- var isFeedbackVariant = function isFeedbackVariant(variant) {
18961
+ var isFeedbackVariant$1 = function isFeedbackVariant(variant) {
18962
18962
  var feedbackVariants = ['information', 'negative', 'neutral', 'notice', 'positive'];
18963
18963
  return feedbackVariants.includes(variant);
18964
18964
  };
@@ -18972,7 +18972,7 @@ var getColorProps$1 = function getColorProps(_ref) {
18972
18972
  backgroundColor: 'feedback.background.neutral.lowContrast'
18973
18973
  };
18974
18974
 
18975
- if (isFeedbackVariant(variant)) {
18975
+ if (isFeedbackVariant$1(variant)) {
18976
18976
  props.iconColor = "feedback.icon.".concat(variant, ".").concat(contrast, "Contrast");
18977
18977
  props.textColor = "feedback.text.".concat(variant, ".").concat(contrast, "Contrast");
18978
18978
  props.backgroundColor = "feedback.background.".concat(variant, ".").concat(contrast, "Contrast");
@@ -19373,29 +19373,44 @@ var StyledCounter = /*#__PURE__*/styled(BaseBox).withConfig({
19373
19373
  });
19374
19374
  });
19375
19375
 
19376
- var _excluded$l = ["value", "max", "intent", "contrast", "size", "testID"];
19376
+ var _excluded$l = ["value", "max", "intent", "variant", "contrast", "size", "testID"];
19377
19377
 
19378
19378
  function ownKeys$Z(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; }
19379
19379
 
19380
19380
  function _objectSpread$Y(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$Z(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$Z(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
19381
19381
 
19382
+ var isFeedbackVariant = function isFeedbackVariant(variant) {
19383
+ var feedbackVariants = ['information', 'negative', 'neutral', 'notice', 'positive'];
19384
+ return feedbackVariants.includes(variant);
19385
+ };
19386
+
19382
19387
  var getColorProps = function getColorProps(_ref) {
19383
- var _ref$intent = _ref.intent,
19384
- intent = _ref$intent === void 0 ? 'neutral' : _ref$intent,
19388
+ var _ref$variant = _ref.variant,
19389
+ variant = _ref$variant === void 0 ? 'neutral' : _ref$variant,
19385
19390
  _ref$contrast = _ref.contrast,
19386
19391
  contrast = _ref$contrast === void 0 ? 'low' : _ref$contrast;
19387
19392
  var props = {
19388
- textColor: "feedback.text.".concat(intent, ".").concat(contrast, "Contrast"),
19389
- backgroundColor: "feedback.background.".concat(intent, ".").concat(contrast, "Contrast")
19393
+ textColor: 'feedback.text.neutral.lowContrast',
19394
+ backgroundColor: 'feedback.background.neutral.lowContrast'
19390
19395
  };
19396
+
19397
+ if (isFeedbackVariant(variant)) {
19398
+ props.textColor = "feedback.text.".concat(variant, ".").concat(contrast, "Contrast");
19399
+ props.backgroundColor = "feedback.background.".concat(variant, ".").concat(contrast, "Contrast");
19400
+ } else {
19401
+ props.textColor = "badge.text.".concat(variant, ".").concat(contrast, "Contrast");
19402
+ props.backgroundColor = "badge.background.".concat(variant, ".").concat(contrast, "Contrast");
19403
+ }
19404
+
19391
19405
  return props;
19392
19406
  };
19393
19407
 
19394
19408
  var Counter = function Counter(_ref2) {
19395
19409
  var value = _ref2.value,
19396
19410
  max = _ref2.max,
19397
- _ref2$intent = _ref2.intent,
19398
- intent = _ref2$intent === void 0 ? 'neutral' : _ref2$intent,
19411
+ intent = _ref2.intent,
19412
+ _ref2$variant = _ref2.variant,
19413
+ variant = _ref2$variant === void 0 ? 'neutral' : _ref2$variant,
19399
19414
  _ref2$contrast = _ref2.contrast,
19400
19415
  contrast = _ref2$contrast === void 0 ? 'low' : _ref2$contrast,
19401
19416
  _ref2$size = _ref2.size,
@@ -19413,12 +19428,16 @@ var Counter = function Counter(_ref2) {
19413
19428
  platform = _useTheme.platform;
19414
19429
 
19415
19430
  var _getColorProps = getColorProps({
19416
- intent: intent,
19431
+ variant: intent !== null && intent !== void 0 ? intent : variant,
19417
19432
  contrast: contrast
19418
19433
  }),
19419
19434
  backgroundColor = _getColorProps.backgroundColor,
19420
19435
  textColor = _getColorProps.textColor;
19421
19436
 
19437
+ if (intent) {
19438
+ console.warn('[Blade: Counter] The prop `intent` is deprecated and will be removed in a future release. Please use `variant` instead.');
19439
+ }
19440
+
19422
19441
  var counterTextSizes = {
19423
19442
  small: {
19424
19443
  variant: 'body',
@@ -29641,7 +29660,9 @@ var Tooltip = function Tooltip(_ref) {
29641
29660
  children: /*#__PURE__*/jsx(BaseBox, _objectSpread$1(_objectSpread$1(_objectSpread$1({
29642
29661
  ref: refs.setFloating,
29643
29662
  style: floatingStyles,
29644
- pointerEvents: "none"
29663
+ pointerEvents: "none" // TODO: Tokenize zIndex values
29664
+ ,
29665
+ zIndex: 1100
29645
29666
  }, getFloatingProps()), metaAttribute({
29646
29667
  name: MetaConstants.Tooltip
29647
29668
  })), {}, {