@razorpay/blade 10.15.0 → 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.
- package/build/components/index.development.web.js +11 -10
- package/build/components/index.development.web.js.map +1 -1
- package/build/components/index.native.js +2 -2
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.production.web.js +11 -10
- package/build/components/index.production.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +1 -1
- package/build/css/bankingThemeDarkMobile.css +1 -1
- package/build/css/bankingThemeLightDesktop.css +1 -1
- package/build/css/bankingThemeLightMobile.css +1 -1
- package/build/css/paymentThemeDarkDesktop.css +1 -1
- package/build/css/paymentThemeDarkMobile.css +1 -1
- package/build/css/paymentThemeLightDesktop.css +1 -1
- package/build/css/paymentThemeLightMobile.css +1 -1
- package/package.json +1 -1
|
@@ -15960,15 +15960,15 @@ var MAX_WIDTH$2 = size[584];
|
|
|
15960
15960
|
var getCommonStyles = function getCommonStyles(props) {
|
|
15961
15961
|
var theme = props.theme,
|
|
15962
15962
|
contrastType = props.contrastType,
|
|
15963
|
-
|
|
15963
|
+
color = props.color,
|
|
15964
15964
|
isFullWidth = props.isFullWidth,
|
|
15965
15965
|
isDesktop = props.isDesktop;
|
|
15966
15966
|
var feedbackColors = theme.colors.feedback;
|
|
15967
15967
|
return {
|
|
15968
|
-
background: feedbackColors.background[
|
|
15968
|
+
background: feedbackColors.background[color][contrastType],
|
|
15969
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])),
|
|
15970
15970
|
borderRadius: makeBorderSize(isFullWidth ? theme.border.radius.none : theme.border.radius.medium),
|
|
15971
|
-
borderColor: feedbackColors.border[
|
|
15971
|
+
borderColor: feedbackColors.border[color][contrastType],
|
|
15972
15972
|
borderWidth: makeBorderSize(isFullWidth ? theme.border.width.none : theme.border.width.thin),
|
|
15973
15973
|
borderStyle: 'solid',
|
|
15974
15974
|
display: 'flex',
|
|
@@ -17227,7 +17227,8 @@ var Alert = function Alert(_ref) {
|
|
|
17227
17227
|
var contrastType = "".concat(contrast, "Contrast");
|
|
17228
17228
|
var iconSize = isFullWidth ? 'large' : 'medium';
|
|
17229
17229
|
var textSize = isFullWidth ? 'medium' : 'small';
|
|
17230
|
-
var
|
|
17230
|
+
var alertColor = color !== null && color !== void 0 ? color : intent;
|
|
17231
|
+
var Icon = intentIconMap[alertColor];
|
|
17231
17232
|
var iconOffset = 'spacing.1';
|
|
17232
17233
|
|
|
17233
17234
|
// certain special cases below needs special care for near perfect alignment
|
|
@@ -17252,7 +17253,7 @@ var Alert = function Alert(_ref) {
|
|
|
17252
17253
|
marginTop: iconOffset,
|
|
17253
17254
|
display: "flex",
|
|
17254
17255
|
children: /*#__PURE__*/jsx(Icon, {
|
|
17255
|
-
color: "feedback.icon.".concat(
|
|
17256
|
+
color: "feedback.icon.".concat(alertColor, ".").concat(contrastType),
|
|
17256
17257
|
size: iconSize
|
|
17257
17258
|
})
|
|
17258
17259
|
});
|
|
@@ -17285,7 +17286,7 @@ var Alert = function Alert(_ref) {
|
|
|
17285
17286
|
children: /*#__PURE__*/jsx(BaseButton, {
|
|
17286
17287
|
size: textSize,
|
|
17287
17288
|
onClick: actions.primary.onClick,
|
|
17288
|
-
color:
|
|
17289
|
+
color: alertColor,
|
|
17289
17290
|
variant: contrast === 'high' ? 'primary' : 'secondary',
|
|
17290
17291
|
children: actions.primary.text
|
|
17291
17292
|
})
|
|
@@ -17310,7 +17311,7 @@ var Alert = function Alert(_ref) {
|
|
|
17310
17311
|
display: isReactNative$3 ? castNativeType('flex') : castWebType('inline-flex'),
|
|
17311
17312
|
children: /*#__PURE__*/jsx(BaseLink, _objectSpread$1j(_objectSpread$1j({
|
|
17312
17313
|
size: textSize,
|
|
17313
|
-
color: contrast === 'high' ? 'white' :
|
|
17314
|
+
color: contrast === 'high' ? 'white' : alertColor
|
|
17314
17315
|
}, secondaryActionParams), {}, {
|
|
17315
17316
|
children: actions.secondary.text
|
|
17316
17317
|
}))
|
|
@@ -17346,8 +17347,8 @@ var Alert = function Alert(_ref) {
|
|
|
17346
17347
|
}) : null;
|
|
17347
17348
|
var a11yProps = makeAccessible(_objectSpread$1j({
|
|
17348
17349
|
// React Native doesn't has status as role
|
|
17349
|
-
role: isReactNative$3 ||
|
|
17350
|
-
},
|
|
17350
|
+
role: isReactNative$3 || alertColor === 'negative' || alertColor === 'notice' ? 'alert' : 'status'
|
|
17351
|
+
}, alertColor === 'notice' && {
|
|
17351
17352
|
liveRegion: 'polite'
|
|
17352
17353
|
}));
|
|
17353
17354
|
if (!isVisible) {
|
|
@@ -17358,7 +17359,7 @@ var Alert = function Alert(_ref) {
|
|
|
17358
17359
|
testID: testID
|
|
17359
17360
|
})), getStyledProps(styledProps)), {}, {
|
|
17360
17361
|
children: /*#__PURE__*/jsxs(StyledAlert, {
|
|
17361
|
-
|
|
17362
|
+
color: alertColor,
|
|
17362
17363
|
contrastType: contrastType,
|
|
17363
17364
|
isFullWidth: isFullWidth,
|
|
17364
17365
|
isDesktop: isDesktop,
|