@razorpay/blade 10.14.7 → 10.15.1

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.
@@ -2852,7 +2852,7 @@ var getAllProps = function getAllProps(props, breakpoint) {
2852
2852
  var hasBorderLeft = props.borderLeft || props.borderLeftColor || props.borderLeftWidth;
2853
2853
  var hasBorderTop = props.borderTop || props.borderTopColor || props.borderTopWidth;
2854
2854
  var hasBorderBottom = props.borderBottom || props.borderBottomColor || props.borderBottomWidth;
2855
- return _objectSpread$6h(_objectSpread$6h({
2855
+ return _objectSpread$6h(_objectSpread$6h(_objectSpread$6h({
2856
2856
  display: getResponsiveValue(props.display, breakpoint),
2857
2857
  overflow: getResponsiveValue(props.overflow, breakpoint),
2858
2858
  overflowX: getResponsiveValue(props.overflowX, breakpoint),
@@ -2953,9 +2953,15 @@ var getAllProps = function getAllProps(props, breakpoint) {
2953
2953
  touchAction: getResponsiveValue(props.touchAction, breakpoint),
2954
2954
  userSelect: getResponsiveValue(props.userSelect, breakpoint),
2955
2955
  pointerEvents: getResponsiveValue(props.pointerEvents),
2956
- opacity: getResponsiveValue(props.opacity, breakpoint)
2956
+ opacity: getResponsiveValue(props.opacity, breakpoint),
2957
+ visibility: getResponsiveValue(props.visibility, breakpoint)
2957
2958
  }, !isReactNative$4() && {
2958
2959
  boxShadow: getElevationValue(props.elevation, props.theme, breakpoint)
2960
+ }), {}, {
2961
+ // Polygon support
2962
+ transform: getResponsiveValue(props.transform, breakpoint),
2963
+ transformOrigin: getResponsiveValue(props.transformOrigin, breakpoint),
2964
+ clipPath: getResponsiveValue(props.clipPath, breakpoint)
2959
2965
  });
2960
2966
  };
2961
2967
 
@@ -3558,6 +3564,8 @@ var makeBoxProps = function makeBoxProps(props) {
3558
3564
  backgroundOrigin: props.backgroundOrigin,
3559
3565
  backgroundRepeat: props.backgroundRepeat,
3560
3566
  elevation: props.elevation,
3567
+ opacity: props.opacity,
3568
+ visibility: props.visibility,
3561
3569
  // Border
3562
3570
  borderWidth: props.borderWidth,
3563
3571
  borderColor: props.borderColor,
@@ -3574,6 +3582,10 @@ var makeBoxProps = function makeBoxProps(props) {
3574
3582
  borderTopRightRadius: props.borderTopRightRadius,
3575
3583
  borderBottomRightRadius: props.borderBottomRightRadius,
3576
3584
  borderBottomLeftRadius: props.borderBottomLeftRadius,
3585
+ // Polygon Support
3586
+ transform: props.transform,
3587
+ transformOrigin: props.transformOrigin,
3588
+ clipPath: props.clipPath,
3577
3589
  // callbacks
3578
3590
  onMouseEnter: props.onMouseEnter,
3579
3591
  onMouseLeave: props.onMouseLeave,
@@ -15948,15 +15960,15 @@ var MAX_WIDTH$2 = size[584];
15948
15960
  var getCommonStyles = function getCommonStyles(props) {
15949
15961
  var theme = props.theme,
15950
15962
  contrastType = props.contrastType,
15951
- intent = props.intent,
15963
+ color = props.color,
15952
15964
  isFullWidth = props.isFullWidth,
15953
15965
  isDesktop = props.isDesktop;
15954
15966
  var feedbackColors = theme.colors.feedback;
15955
15967
  return {
15956
- background: feedbackColors.background[intent][contrastType],
15968
+ background: feedbackColors.background[color][contrastType],
15957
15969
  padding: isFullWidth ? "".concat(makeSpace(theme.spacing[4]), " ").concat(makeSpace(theme.spacing[5])) : "".concat(makeSpace(theme.spacing[3]), " ").concat(makeSpace(theme.spacing[3]), " ").concat(makeSpace(theme.spacing[4]), " ").concat(makeSpace(theme.spacing[3])),
15958
15970
  borderRadius: makeBorderSize(isFullWidth ? theme.border.radius.none : theme.border.radius.medium),
15959
- borderColor: feedbackColors.border[intent][contrastType],
15971
+ borderColor: feedbackColors.border[color][contrastType],
15960
15972
  borderWidth: makeBorderSize(isFullWidth ? theme.border.width.none : theme.border.width.thin),
15961
15973
  borderStyle: 'solid',
15962
15974
  display: 'flex',
@@ -17215,7 +17227,8 @@ var Alert = function Alert(_ref) {
17215
17227
  var contrastType = "".concat(contrast, "Contrast");
17216
17228
  var iconSize = isFullWidth ? 'large' : 'medium';
17217
17229
  var textSize = isFullWidth ? 'medium' : 'small';
17218
- var Icon = intentIconMap[intent];
17230
+ var alertColor = color !== null && color !== void 0 ? color : intent;
17231
+ var Icon = intentIconMap[alertColor];
17219
17232
  var iconOffset = 'spacing.1';
17220
17233
 
17221
17234
  // certain special cases below needs special care for near perfect alignment
@@ -17240,7 +17253,7 @@ var Alert = function Alert(_ref) {
17240
17253
  marginTop: iconOffset,
17241
17254
  display: "flex",
17242
17255
  children: /*#__PURE__*/jsx(Icon, {
17243
- color: "feedback.icon.".concat(intent, ".").concat(contrastType),
17256
+ color: "feedback.icon.".concat(alertColor, ".").concat(contrastType),
17244
17257
  size: iconSize
17245
17258
  })
17246
17259
  });
@@ -17273,7 +17286,7 @@ var Alert = function Alert(_ref) {
17273
17286
  children: /*#__PURE__*/jsx(BaseButton, {
17274
17287
  size: textSize,
17275
17288
  onClick: actions.primary.onClick,
17276
- color: color || intent,
17289
+ color: alertColor,
17277
17290
  variant: contrast === 'high' ? 'primary' : 'secondary',
17278
17291
  children: actions.primary.text
17279
17292
  })
@@ -17298,7 +17311,7 @@ var Alert = function Alert(_ref) {
17298
17311
  display: isReactNative$3 ? castNativeType('flex') : castWebType('inline-flex'),
17299
17312
  children: /*#__PURE__*/jsx(BaseLink, _objectSpread$1j(_objectSpread$1j({
17300
17313
  size: textSize,
17301
- color: contrast === 'high' ? 'white' : intent
17314
+ color: contrast === 'high' ? 'white' : alertColor
17302
17315
  }, secondaryActionParams), {}, {
17303
17316
  children: actions.secondary.text
17304
17317
  }))
@@ -17334,8 +17347,8 @@ var Alert = function Alert(_ref) {
17334
17347
  }) : null;
17335
17348
  var a11yProps = makeAccessible(_objectSpread$1j({
17336
17349
  // React Native doesn't has status as role
17337
- role: isReactNative$3 || intent === 'negative' || intent === 'notice' ? 'alert' : 'status'
17338
- }, intent === 'notice' && {
17350
+ role: isReactNative$3 || alertColor === 'negative' || alertColor === 'notice' ? 'alert' : 'status'
17351
+ }, alertColor === 'notice' && {
17339
17352
  liveRegion: 'polite'
17340
17353
  }));
17341
17354
  if (!isVisible) {
@@ -17346,7 +17359,7 @@ var Alert = function Alert(_ref) {
17346
17359
  testID: testID
17347
17360
  })), getStyledProps(styledProps)), {}, {
17348
17361
  children: /*#__PURE__*/jsxs(StyledAlert, {
17349
- intent: intent,
17362
+ color: alertColor,
17350
17363
  contrastType: contrastType,
17351
17364
  isFullWidth: isFullWidth,
17352
17365
  isDesktop: isDesktop,
@@ -22055,7 +22068,7 @@ var BaseInput = /*#__PURE__*/React__default.forwardRef(function (_ref11, ref) {
22055
22068
  id: labelId,
22056
22069
  htmlFor: inputId,
22057
22070
  children: label
22058
- }), trailingHeaderSlot === null || trailingHeaderSlot === void 0 ? void 0 : trailingHeaderSlot(inputValue)]
22071
+ }), trailingHeaderSlot === null || trailingHeaderSlot === void 0 ? void 0 : trailingHeaderSlot(value !== null && value !== void 0 ? value : inputValue)]
22059
22072
  }), /*#__PURE__*/jsxs(BaseInputWrapper, {
22060
22073
  isDropdownTrigger: isDropdownTrigger,
22061
22074
  isTextArea: isTextArea,
@@ -22167,7 +22180,7 @@ var BaseInput = /*#__PURE__*/React__default.forwardRef(function (_ref11, ref) {
22167
22180
  helpTextId: helpTextId,
22168
22181
  errorTextId: errorTextId,
22169
22182
  successTextId: successTextId
22170
- }), trailingFooterSlot === null || trailingFooterSlot === void 0 ? void 0 : trailingFooterSlot(inputValue)]
22183
+ }), trailingFooterSlot === null || trailingFooterSlot === void 0 ? void 0 : trailingFooterSlot(value !== null && value !== void 0 ? value : inputValue)]
22171
22184
  })
22172
22185
  })]
22173
22186
  }));