@razorpay/blade 5.4.0 → 5.4.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.
@@ -5608,7 +5608,7 @@ var CodeContainer = /*#__PURE__*/styled(Box).withConfig({
5608
5608
  var padding = "".concat(makeSpace(props.theme.spacing[0]), " ").concat(makeSpace(props.theme.spacing[2]));
5609
5609
  return {
5610
5610
  padding: padding,
5611
- backgroundColor: props.theme.colors.brand.gray[400].lowContrast,
5611
+ backgroundColor: props.theme.colors.brand.gray.a50.lowContrast,
5612
5612
  borderRadius: props.theme.border.radius.medium,
5613
5613
  display: isPlatformWeb ? 'inline-block' : undefined,
5614
5614
  // Removing the line height of container to remove extra surrounding space in background
@@ -6877,39 +6877,12 @@ var Alert = function Alert(_ref) {
6877
6877
  }));
6878
6878
  };
6879
6879
 
6880
- var verticalPadding$1 = {
6881
- small: 'spacing.0',
6882
- medium: 'spacing.1',
6883
- large: 'spacing.2'
6884
- };
6885
- var horizontalPadding$1 = {
6886
- small: 'spacing.3',
6887
- medium: 'spacing.3',
6888
- large: 'spacing.4'
6889
- };
6890
- var iconPadding = {
6891
- small: 'spacing.1',
6892
- medium: 'spacing.2',
6893
- large: 'spacing.2'
6894
- };
6895
- var iconSize = {
6896
- small: 'xsmall',
6897
- medium: 'small',
6898
- large: 'small'
6899
- };
6900
- var maxWidth$1 = {
6901
- onMobile: 100,
6902
- onDesktop: 120
6903
- };
6904
-
6905
6880
  var getStyledBadgeStyles = function getStyledBadgeStyles(_ref) {
6906
6881
  var theme = _ref.theme,
6907
- platform = _ref.platform,
6908
6882
  backgroundColor = _ref.backgroundColor;
6909
6883
  return {
6910
6884
  backgroundColor: get_1(theme.colors, backgroundColor),
6911
6885
  borderRadius: makeBorderSize(theme.border.radius.max),
6912
- maxWidth: makeSize(maxWidth$1[platform]),
6913
6886
  display: 'flex',
6914
6887
  flexWrap: 'nowrap'
6915
6888
  };
@@ -6927,6 +6900,27 @@ var StyledBadge = /*#__PURE__*/styled.div.withConfig({
6927
6900
  });
6928
6901
  });
6929
6902
 
6903
+ var verticalPadding$1 = {
6904
+ small: 'spacing.0',
6905
+ medium: 'spacing.1',
6906
+ large: 'spacing.2'
6907
+ };
6908
+ var horizontalPadding$1 = {
6909
+ small: 'spacing.3',
6910
+ medium: 'spacing.3',
6911
+ large: 'spacing.4'
6912
+ };
6913
+ var iconPadding = {
6914
+ small: 'spacing.1',
6915
+ medium: 'spacing.2',
6916
+ large: 'spacing.2'
6917
+ };
6918
+ var iconSize = {
6919
+ small: 'xsmall',
6920
+ medium: 'small',
6921
+ large: 'small'
6922
+ };
6923
+
6930
6924
  function ownKeys$p(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; }
6931
6925
 
6932
6926
  function _objectSpread$p(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$p(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$p(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -6974,9 +6968,6 @@ var Badge = function Badge(_ref2) {
6974
6968
  throw new Error('[Blade: Badge]: Text as children is required for Badge.');
6975
6969
  }
6976
6970
 
6977
- var _useTheme = useTheme(),
6978
- platform = _useTheme.platform;
6979
-
6980
6971
  var _getColorProps = getColorProps$1({
6981
6972
  variant: variant,
6982
6973
  contrast: contrast
@@ -6987,8 +6978,7 @@ var Badge = function Badge(_ref2) {
6987
6978
 
6988
6979
  return /*#__PURE__*/jsx(StyledBadge, _objectSpread$p(_objectSpread$p({
6989
6980
  backgroundColor: backgroundColor,
6990
- size: size,
6991
- platform: platform
6981
+ size: size
6992
6982
  }, metaAttribute(MetaConstants.Component, MetaConstants.Badge)), {}, {
6993
6983
  children: /*#__PURE__*/jsxs(Box, {
6994
6984
  paddingRight: horizontalPadding$1[size],
@@ -10267,7 +10257,8 @@ var OTPInput = function OTPInput(_ref) {
10267
10257
  hidden: true,
10268
10258
  id: inputId,
10269
10259
  name: name,
10270
- value: (_ref6 = inputValue !== null && inputValue !== void 0 ? inputValue : otpValue.join('')) !== null && _ref6 !== void 0 ? _ref6 : ''
10260
+ value: (_ref6 = inputValue !== null && inputValue !== void 0 ? inputValue : otpValue.join('')) !== null && _ref6 !== void 0 ? _ref6 : '',
10261
+ readOnly: true
10271
10262
  });
10272
10263
  }
10273
10264
 
@@ -11525,7 +11516,7 @@ var RadioGroup = function RadioGroup(_ref) {
11525
11516
 
11526
11517
  var showError = validationState === 'error' && errorText;
11527
11518
  var showHelpText = !showError && helpText;
11528
- var accessibilityText = ",".concat(showError ? errorText : '', " ").concat(showHelpText ? helpText : '');
11519
+ var accessibilityText = "".concat(showError ? errorText : '', " ").concat(showHelpText ? helpText : '').trim();
11529
11520
  var isReactNative = getPlatformType() === 'react-native';
11530
11521
  var gap = radioSizes.group.gap[size][matchedDeviceType];
11531
11522
  var childCount = React__default.Children.count(children);
@@ -11541,7 +11532,7 @@ var RadioGroup = function RadioGroup(_ref) {
11541
11532
  necessityIndicator: necessityIndicator,
11542
11533
  position: labelPosition,
11543
11534
  id: ids.labelId,
11544
- accessibilityText: accessibilityText,
11535
+ accessibilityText: accessibilityText && ",".concat(accessibilityText),
11545
11536
  children: label
11546
11537
  }), /*#__PURE__*/jsxs(Box, {
11547
11538
  children: [/*#__PURE__*/jsx(Box, {