@razorpay/blade 9.3.0 → 9.4.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.
@@ -22148,7 +22148,7 @@ var BaseInput = /*#__PURE__*/React__default.forwardRef(function (_ref11, ref) {
22148
22148
  })]
22149
22149
  })]
22150
22150
  }), !hideFormHint && /*#__PURE__*/jsx(BaseBox, {
22151
- marginLeft: makeSize(isLabelLeftPositioned ? 136 : 0),
22151
+ marginLeft: makeSize(isLabelLeftPositioned && !hideLabelText ? 136 : 0),
22152
22152
  children: /*#__PURE__*/jsxs(BaseBox, {
22153
22153
  display: "flex",
22154
22154
  flexDirection: "row",
@@ -22210,7 +22210,7 @@ var Spinner = function Spinner(_ref) {
22210
22210
  }, styledProps));
22211
22211
  };
22212
22212
 
22213
- var _excluded$h = ["label", "labelPosition", "placeholder", "type", "defaultValue", "name", "value", "maxCharacters", "onChange", "onFocus", "onBlur", "onSubmit", "isDisabled", "necessityIndicator", "validationState", "errorText", "helpText", "successText", "isRequired", "icon", "prefix", "showClearButton", "onClearButtonClick", "isLoading", "suffix", "autoFocus", "keyboardReturnKeyType", "autoCompleteSuggestionType", "autoCapitalize", "testID"];
22213
+ var _excluded$h = ["label", "accessibilityLabel", "labelPosition", "placeholder", "type", "defaultValue", "name", "value", "maxCharacters", "onChange", "onFocus", "onBlur", "onSubmit", "isDisabled", "necessityIndicator", "validationState", "errorText", "helpText", "successText", "isRequired", "icon", "prefix", "showClearButton", "onClearButtonClick", "isLoading", "suffix", "autoFocus", "keyboardReturnKeyType", "autoCompleteSuggestionType", "autoCapitalize", "testID"];
22214
22214
 
22215
22215
  function ownKeys$L(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; }
22216
22216
 
@@ -22298,6 +22298,7 @@ var isReactNative$2 = function isReactNative(_textInputRef) {
22298
22298
 
22299
22299
  var _TextInput = function _TextInput(_ref2, ref) {
22300
22300
  var label = _ref2.label,
22301
+ accessibilityLabel = _ref2.accessibilityLabel,
22301
22302
  _ref2$labelPosition = _ref2.labelPosition,
22302
22303
  labelPosition = _ref2$labelPosition === void 0 ? 'top' : _ref2$labelPosition,
22303
22304
  placeholder = _ref2.placeholder,
@@ -22384,6 +22385,8 @@ var _TextInput = function _TextInput(_ref2, ref) {
22384
22385
  componentName: MetaConstants.TextInput,
22385
22386
  ref: textInputRef,
22386
22387
  label: label,
22388
+ accessibilityLabel: accessibilityLabel,
22389
+ hideLabelText: !Boolean(label),
22387
22390
  labelPosition: labelPosition,
22388
22391
  placeholder: placeholder,
22389
22392
  defaultValue: defaultValue,
@@ -22450,7 +22453,7 @@ var TextInput = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__defau
22450
22453
  displayName: 'TextInput'
22451
22454
  });
22452
22455
 
22453
- var _excluded$g = ["label", "labelPosition", "showRevealButton", "maxCharacters", "validationState", "errorText", "successText", "helpText", "isDisabled", "defaultValue", "placeholder", "isRequired", "necessityIndicator", "value", "onChange", "onFocus", "onBlur", "onSubmit", "name", "autoFocus", "keyboardReturnKeyType", "autoCompleteSuggestionType", "testID"];
22456
+ var _excluded$g = ["label", "accessibilityLabel", "labelPosition", "showRevealButton", "maxCharacters", "validationState", "errorText", "successText", "helpText", "isDisabled", "defaultValue", "placeholder", "isRequired", "necessityIndicator", "value", "onChange", "onFocus", "onBlur", "onSubmit", "name", "autoFocus", "keyboardReturnKeyType", "autoCompleteSuggestionType", "testID"];
22454
22457
 
22455
22458
  function ownKeys$K(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; }
22456
22459
 
@@ -22458,6 +22461,7 @@ function _objectSpread$J(target) { for (var i = 1; i < arguments.length; i++) {
22458
22461
 
22459
22462
  var _PasswordInput = function _PasswordInput(_ref, ref) {
22460
22463
  var label = _ref.label,
22464
+ accessibilityLabel = _ref.accessibilityLabel,
22461
22465
  _ref$labelPosition = _ref.labelPosition,
22462
22466
  labelPosition = _ref$labelPosition === void 0 ? 'top' : _ref$labelPosition,
22463
22467
  _ref$showRevealButton = _ref.showRevealButton,
@@ -22506,14 +22510,14 @@ var _PasswordInput = function _PasswordInput(_ref, ref) {
22506
22510
  });
22507
22511
  };
22508
22512
 
22509
- var accessibilityLabel = isRevealedAndEnabled ? 'Hide password' : 'Show password';
22513
+ var iconAccessibilityLabel = isRevealedAndEnabled ? 'Hide password' : 'Show password';
22510
22514
  var type = isRevealedAndEnabled ? 'text' : 'password';
22511
22515
  var revealButtonIcon = isRevealedAndEnabled ? EyeOffIcon : EyeIcon;
22512
22516
  var revealButton = showRevealButton && !isDisabled ? /*#__PURE__*/jsx(IconButton, {
22513
22517
  size: "medium",
22514
22518
  icon: revealButtonIcon,
22515
22519
  onClick: toggleIsRevealed,
22516
- accessibilityLabel: accessibilityLabel
22520
+ accessibilityLabel: iconAccessibilityLabel
22517
22521
  }) : null;
22518
22522
 
22519
22523
  var trailingFooterSlot = function trailingFooterSlot(value) {
@@ -22534,6 +22538,8 @@ var _PasswordInput = function _PasswordInput(_ref, ref) {
22534
22538
  componentName: MetaConstants.PasswordInput,
22535
22539
  id: "password-field",
22536
22540
  label: label,
22541
+ accessibilityLabel: accessibilityLabel,
22542
+ hideLabelText: !Boolean(label),
22537
22543
  labelPosition: labelPosition,
22538
22544
  type: type,
22539
22545
  interactionElement: revealButton,
@@ -22568,7 +22574,7 @@ var PasswordInput = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__d
22568
22574
  displayName: 'PasswordInput'
22569
22575
  });
22570
22576
 
22571
- var _excluded$f = ["label", "labelPosition", "necessityIndicator", "errorText", "helpText", "successText", "validationState", "defaultValue", "isDisabled", "isRequired", "name", "onChange", "onFocus", "onBlur", "onSubmit", "placeholder", "value", "maxCharacters", "showClearButton", "onClearButtonClick", "autoFocus", "numberOfLines", "testID"];
22577
+ var _excluded$f = ["label", "accessibilityLabel", "labelPosition", "necessityIndicator", "errorText", "helpText", "successText", "validationState", "defaultValue", "isDisabled", "isRequired", "name", "onChange", "onFocus", "onBlur", "onSubmit", "placeholder", "value", "maxCharacters", "showClearButton", "onClearButtonClick", "autoFocus", "numberOfLines", "testID"];
22572
22578
 
22573
22579
  function ownKeys$J(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; }
22574
22580
 
@@ -22582,6 +22588,7 @@ var isReactNative$1 = function isReactNative(_textInputRef) {
22582
22588
 
22583
22589
  var _TextArea = function _TextArea(_ref, ref) {
22584
22590
  var label = _ref.label,
22591
+ accessibilityLabel = _ref.accessibilityLabel,
22585
22592
  labelPosition = _ref.labelPosition,
22586
22593
  necessityIndicator = _ref.necessityIndicator,
22587
22594
  errorText = _ref.errorText,
@@ -22659,6 +22666,8 @@ var _TextArea = function _TextArea(_ref, ref) {
22659
22666
  autoFocus: autoFocus,
22660
22667
  ref: inputRef,
22661
22668
  label: label,
22669
+ accessibilityLabel: accessibilityLabel,
22670
+ hideLabelText: !Boolean(label),
22662
22671
  labelPosition: labelPosition,
22663
22672
  necessityIndicator: necessityIndicator,
22664
22673
  errorText: errorText,
@@ -22716,7 +22725,7 @@ var TextArea = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__defaul
22716
22725
  displayName: 'TextArea'
22717
22726
  });
22718
22727
 
22719
- var _excluded$e = ["autoFocus", "errorText", "helpText", "isDisabled", "keyboardReturnKeyType", "keyboardType", "label", "labelPosition", "name", "onChange", "onFocus", "onBlur", "onOTPFilled", "otpLength", "placeholder", "successText", "validationState", "value", "isMasked", "autoCompleteSuggestionType", "testID"];
22728
+ var _excluded$e = ["autoFocus", "errorText", "helpText", "isDisabled", "keyboardReturnKeyType", "keyboardType", "label", "accessibilityLabel", "labelPosition", "name", "onChange", "onFocus", "onBlur", "onOTPFilled", "otpLength", "placeholder", "successText", "validationState", "value", "isMasked", "autoCompleteSuggestionType", "testID"];
22720
22729
 
22721
22730
  function ownKeys$I(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; }
22722
22731
 
@@ -22756,6 +22765,7 @@ var OTPInput = function OTPInput(_ref) {
22756
22765
  _ref$keyboardType = _ref.keyboardType,
22757
22766
  keyboardType = _ref$keyboardType === void 0 ? 'decimal' : _ref$keyboardType,
22758
22767
  label = _ref.label,
22768
+ accessibilityLabel = _ref.accessibilityLabel,
22759
22769
  labelPosition = _ref.labelPosition,
22760
22770
  name = _ref.name,
22761
22771
  onChange = _ref.onChange,
@@ -22991,7 +23001,7 @@ var OTPInput = function OTPInput(_ref) {
22991
23001
  children: /*#__PURE__*/jsx(BaseInput // eslint-disable-next-line jsx-a11y/no-autofocus
22992
23002
  , {
22993
23003
  autoFocus: autoFocus && index === 0,
22994
- accessibilityLabel: "".concat(index === 0 ? label : '', " character ").concat(index + 1),
23004
+ accessibilityLabel: "".concat(index === 0 ? label || accessibilityLabel : '', " character ").concat(index + 1),
22995
23005
  label: label,
22996
23006
  hideLabelText: true,
22997
23007
  id: "".concat(inputId, "-").concat(index),
@@ -23057,7 +23067,7 @@ var OTPInput = function OTPInput(_ref) {
23057
23067
  flexDirection: isLabelLeftPositioned ? 'row' : 'column',
23058
23068
  alignItems: isLabelLeftPositioned ? 'center' : undefined,
23059
23069
  position: "relative",
23060
- children: [/*#__PURE__*/jsx(FormLabel, {
23070
+ children: [Boolean(label) && /*#__PURE__*/jsx(FormLabel, {
23061
23071
  as: "label",
23062
23072
  position: labelPosition,
23063
23073
  htmlFor: inputId,
@@ -23248,6 +23258,7 @@ var _SelectInput = function _SelectInput(props, ref) {
23248
23258
  })
23249
23259
  }) : null, /*#__PURE__*/jsx(BaseInput, _objectSpread$G(_objectSpread$G({}, baseInputProps), {}, {
23250
23260
  as: "button",
23261
+ label: props.label,
23251
23262
  hideLabelText: ((_props$label = props.label) === null || _props$label === void 0 ? void 0 : _props$label.length) === 0,
23252
23263
  componentName: MetaConstants.SelectInput,
23253
23264
  ref: !isReactNative$4() ? triggererRef : null,
@@ -24313,7 +24324,9 @@ var Modal = function Modal(_ref2) {
24313
24324
  initialFocusRef = _ref2.initialFocusRef,
24314
24325
  _ref2$size = _ref2.size,
24315
24326
  size = _ref2$size === void 0 ? 'small' : _ref2$size,
24316
- accessibilityLabel = _ref2.accessibilityLabel;
24327
+ accessibilityLabel = _ref2.accessibilityLabel,
24328
+ _ref2$zIndex = _ref2.zIndex,
24329
+ zIndex = _ref2$zIndex === void 0 ? modalHighestZIndex : _ref2$zIndex;
24317
24330
 
24318
24331
  var _useTheme = useTheme(),
24319
24332
  theme = _useTheme.theme,
@@ -24373,7 +24386,7 @@ var Modal = function Modal(_ref2) {
24373
24386
  context: context,
24374
24387
  modal: true,
24375
24388
  children: /*#__PURE__*/jsxs(Box, {
24376
- zIndex: modalHighestZIndex,
24389
+ zIndex: zIndex,
24377
24390
  position: "fixed",
24378
24391
  testID: "modal-wrapper",
24379
24392
  children: [/*#__PURE__*/jsx(ModalBackdrop, {}), /*#__PURE__*/jsx(ModalContent, _objectSpread$y(_objectSpread$y(_objectSpread$y({}, metaAttribute({