@razorpay/blade 9.5.2 → 9.6.0

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.
@@ -21355,16 +21355,7 @@ var StyledBaseNativeButton = /*#__PURE__*/styled.button.withConfig({
21355
21355
  displayName: "StyledBaseInputweb__StyledBaseNativeButton",
21356
21356
  componentId: "hsusrk-1"
21357
21357
  })(function (props) {
21358
- return _objectSpread$M(_objectSpread$M(_objectSpread$M({}, getWebInputStyles(props)), getTextStyles({
21359
- size: 'medium',
21360
- variant: 'body',
21361
- type: props.value ? 'subtle' : 'placeholder',
21362
- weight: 'regular',
21363
- contrast: 'low',
21364
- theme: props.theme
21365
- })), {}, {
21366
- textAlign: props.textAlign
21367
- });
21358
+ return _objectSpread$M({}, getWebInputStyles(props));
21368
21359
  });
21369
21360
  var autoCompleteSuggestionTypeMap = {
21370
21361
  none: 'off',
@@ -21453,7 +21444,12 @@ var _StyledBaseInput = function _StyledBaseInput(_ref, ref) {
21453
21444
  }
21454
21445
  }, commonProps), props), accessibilityProps), {}, {
21455
21446
  value: props.value,
21456
- children: props.value ? props.value : props.placeholder
21447
+ children: /*#__PURE__*/jsx(Text, {
21448
+ type: props.value ? 'subtle' : 'placeholder',
21449
+ truncateAfterLines: 1,
21450
+ textAlign: props.textAlign,
21451
+ children: props.value ? props.value : props.placeholder
21452
+ })
21457
21453
  })) : /*#__PURE__*/jsx(StyledBaseNativeInput // @ts-expect-error: TS doesnt understand that this will always be `input`
21458
21454
  , _objectSpread$M(_objectSpread$M(_objectSpread$M({
21459
21455
  ref: ref,
@@ -25949,33 +25945,406 @@ var amountLineHeights = {
25949
25945
  'heading-large-bold': 400,
25950
25946
  'title-small': 500,
25951
25947
  'title-medium': 600
25952
- };
25948
+ }; // All the supported currency codes are taken from Razorpay's Merchant Dashboard codebase
25949
+
25953
25950
  var currencyPrefixMapping = {
25951
+ AED: {
25952
+ 'currency-symbol': 'د.إ',
25953
+ 'currency-code': 'AED'
25954
+ },
25955
+ ALL: {
25956
+ 'currency-symbol': 'Lek',
25957
+ 'currency-code': 'ALL'
25958
+ },
25959
+ AMD: {
25960
+ 'currency-symbol': '֏',
25961
+ 'currency-code': 'AMD'
25962
+ },
25963
+ ARS: {
25964
+ 'currency-symbol': 'ARS',
25965
+ 'currency-code': 'ARS'
25966
+ },
25967
+ AUD: {
25968
+ 'currency-symbol': 'A$',
25969
+ 'currency-code': 'AUD'
25970
+ },
25971
+ AWG: {
25972
+ 'currency-symbol': 'Afl.',
25973
+ 'currency-code': 'AWG'
25974
+ },
25975
+ BBD: {
25976
+ 'currency-symbol': '$',
25977
+ 'currency-code': 'BBD'
25978
+ },
25979
+ BDT: {
25980
+ 'currency-symbol': '৳',
25981
+ 'currency-code': 'BDT'
25982
+ },
25983
+ BMD: {
25984
+ 'currency-symbol': '$',
25985
+ 'currency-code': 'BMD'
25986
+ },
25987
+ BND: {
25988
+ 'currency-symbol': 'BND',
25989
+ 'currency-code': 'BND'
25990
+ },
25991
+ BOB: {
25992
+ 'currency-symbol': 'Bs',
25993
+ 'currency-code': 'BOB'
25994
+ },
25995
+ BSD: {
25996
+ 'currency-symbol': 'B$',
25997
+ 'currency-code': 'BSD'
25998
+ },
25999
+ BWP: {
26000
+ 'currency-symbol': 'P',
26001
+ 'currency-code': 'BWP'
26002
+ },
26003
+ BZD: {
26004
+ 'currency-symbol': 'BZ$',
26005
+ 'currency-code': 'BZD'
26006
+ },
26007
+ CAD: {
26008
+ 'currency-symbol': 'C$',
26009
+ 'currency-code': 'CAD'
26010
+ },
26011
+ CHF: {
26012
+ 'currency-symbol': 'CHf',
26013
+ 'currency-code': 'CHF'
26014
+ },
26015
+ CNY: {
26016
+ 'currency-symbol': '¥',
26017
+ 'currency-code': 'CNY'
26018
+ },
26019
+ COP: {
26020
+ 'currency-symbol': 'COL$',
26021
+ 'currency-code': 'COP'
26022
+ },
26023
+ CRC: {
26024
+ 'currency-symbol': '₡',
26025
+ 'currency-code': 'CRC'
26026
+ },
26027
+ CUP: {
26028
+ 'currency-symbol': '$MN',
26029
+ 'currency-code': 'CUP'
26030
+ },
26031
+ CZK: {
26032
+ 'currency-symbol': 'Kč',
26033
+ 'currency-code': 'CZK'
26034
+ },
26035
+ DKK: {
26036
+ 'currency-symbol': 'DKK',
26037
+ 'currency-code': 'DKK'
26038
+ },
26039
+ DOP: {
26040
+ 'currency-symbol': 'RD$',
26041
+ 'currency-code': 'DOP'
26042
+ },
26043
+ DZD: {
26044
+ 'currency-symbol': 'د.ج',
26045
+ 'currency-code': 'DZD'
26046
+ },
26047
+ EGP: {
26048
+ 'currency-symbol': 'E£',
26049
+ 'currency-code': 'EGP'
26050
+ },
26051
+ ETB: {
26052
+ 'currency-symbol': 'ብር',
26053
+ 'currency-code': 'ETB'
26054
+ },
26055
+ EUR: {
26056
+ 'currency-symbol': '€',
26057
+ 'currency-code': 'EUR'
26058
+ },
26059
+ FJD: {
26060
+ 'currency-symbol': 'FJ$',
26061
+ 'currency-code': 'FJD'
26062
+ },
26063
+ GBP: {
26064
+ 'currency-symbol': '£',
26065
+ 'currency-code': 'GBP'
26066
+ },
26067
+ GHS: {
26068
+ 'currency-symbol': 'GH₵',
26069
+ 'currency-code': 'GHS'
26070
+ },
26071
+ GIP: {
26072
+ 'currency-symbol': 'GIP',
26073
+ 'currency-code': 'GIP'
26074
+ },
26075
+ GMD: {
26076
+ 'currency-symbol': 'D',
26077
+ 'currency-code': 'GMD'
26078
+ },
26079
+ GTQ: {
26080
+ 'currency-symbol': 'Q',
26081
+ 'currency-code': 'GTQ'
26082
+ },
26083
+ GYD: {
26084
+ 'currency-symbol': 'G$',
26085
+ 'currency-code': 'GYD'
26086
+ },
26087
+ HKD: {
26088
+ 'currency-symbol': 'HK$',
26089
+ 'currency-code': 'HKD'
26090
+ },
26091
+ HNL: {
26092
+ 'currency-symbol': 'HNL',
26093
+ 'currency-code': 'HNL'
26094
+ },
26095
+ HRK: {
26096
+ 'currency-symbol': 'kn',
26097
+ 'currency-code': 'HRK'
26098
+ },
26099
+ HTG: {
26100
+ 'currency-symbol': 'G',
26101
+ 'currency-code': 'HTG'
26102
+ },
26103
+ HUF: {
26104
+ 'currency-symbol': 'Ft',
26105
+ 'currency-code': 'HUF'
26106
+ },
26107
+ IDR: {
26108
+ 'currency-symbol': 'Rp',
26109
+ 'currency-code': 'IDR'
26110
+ },
26111
+ ILS: {
26112
+ 'currency-symbol': '₪',
26113
+ 'currency-code': 'ILS'
26114
+ },
25954
26115
  INR: {
25955
26116
  'currency-symbol': '₹',
25956
26117
  'currency-code': 'INR'
25957
26118
  },
26119
+ JMD: {
26120
+ 'currency-symbol': 'J$',
26121
+ 'currency-code': 'JMD'
26122
+ },
26123
+ KES: {
26124
+ 'currency-symbol': 'Ksh',
26125
+ 'currency-code': 'KES'
26126
+ },
26127
+ KGS: {
26128
+ 'currency-symbol': 'Лв',
26129
+ 'currency-code': 'KGS'
26130
+ },
26131
+ KHR: {
26132
+ 'currency-symbol': '៛',
26133
+ 'currency-code': 'KHR'
26134
+ },
26135
+ KYD: {
26136
+ 'currency-symbol': 'CI$',
26137
+ 'currency-code': 'KYD'
26138
+ },
26139
+ KZT: {
26140
+ 'currency-symbol': '₸',
26141
+ 'currency-code': 'KZT'
26142
+ },
26143
+ LAK: {
26144
+ 'currency-symbol': '₭',
26145
+ 'currency-code': 'LAK'
26146
+ },
26147
+ LKR: {
26148
+ 'currency-symbol': 'රු',
26149
+ 'currency-code': 'LKR'
26150
+ },
26151
+ LRD: {
26152
+ 'currency-symbol': 'L$',
26153
+ 'currency-code': 'LRD'
26154
+ },
26155
+ LSL: {
26156
+ 'currency-symbol': 'LSL',
26157
+ 'currency-code': 'LSL'
26158
+ },
26159
+ MAD: {
26160
+ 'currency-symbol': 'د.م.',
26161
+ 'currency-code': 'MAD'
26162
+ },
26163
+ MDL: {
26164
+ 'currency-symbol': 'MDL',
26165
+ 'currency-code': 'MDL'
26166
+ },
26167
+ MKD: {
26168
+ 'currency-symbol': 'ден',
26169
+ 'currency-code': 'MKD'
26170
+ },
26171
+ MMK: {
26172
+ 'currency-symbol': 'MMK',
26173
+ 'currency-code': 'MMK'
26174
+ },
26175
+ MNT: {
26176
+ 'currency-symbol': '₮',
26177
+ 'currency-code': 'MNT'
26178
+ },
26179
+ MOP: {
26180
+ 'currency-symbol': 'MOP$',
26181
+ 'currency-code': 'MOP'
26182
+ },
26183
+ MUR: {
26184
+ 'currency-symbol': '₨',
26185
+ 'currency-code': 'MUR'
26186
+ },
26187
+ MVR: {
26188
+ 'currency-symbol': 'Rf',
26189
+ 'currency-code': 'MVR'
26190
+ },
26191
+ MWK: {
26192
+ 'currency-symbol': 'MK',
26193
+ 'currency-code': 'MWK'
26194
+ },
26195
+ MXN: {
26196
+ 'currency-symbol': 'Mex$',
26197
+ 'currency-code': 'MXN'
26198
+ },
25958
26199
  MYR: {
25959
26200
  'currency-symbol': 'RM',
25960
26201
  'currency-code': 'MYR'
26202
+ },
26203
+ NAD: {
26204
+ 'currency-symbol': 'N$',
26205
+ 'currency-code': 'NAD'
26206
+ },
26207
+ NGN: {
26208
+ 'currency-symbol': '₦',
26209
+ 'currency-code': 'NGN'
26210
+ },
26211
+ NIO: {
26212
+ 'currency-symbol': 'NIO',
26213
+ 'currency-code': 'NIO'
26214
+ },
26215
+ NOK: {
26216
+ 'currency-symbol': 'NOK',
26217
+ 'currency-code': 'NOK'
26218
+ },
26219
+ NPR: {
26220
+ 'currency-symbol': 'रू',
26221
+ 'currency-code': 'NPR'
26222
+ },
26223
+ NZD: {
26224
+ 'currency-symbol': 'NZ$',
26225
+ 'currency-code': 'NZD'
26226
+ },
26227
+ PEN: {
26228
+ 'currency-symbol': 'S/',
26229
+ 'currency-code': 'PEN'
26230
+ },
26231
+ PGK: {
26232
+ 'currency-symbol': 'PGK',
26233
+ 'currency-code': 'PGK'
26234
+ },
26235
+ PHP: {
26236
+ 'currency-symbol': '₱',
26237
+ 'currency-code': 'PHP'
26238
+ },
26239
+ PKR: {
26240
+ 'currency-symbol': '₨',
26241
+ 'currency-code': 'PKR'
26242
+ },
26243
+ QAR: {
26244
+ 'currency-symbol': 'QR',
26245
+ 'currency-code': 'QAR'
26246
+ },
26247
+ RUB: {
26248
+ 'currency-symbol': '₽',
26249
+ 'currency-code': 'RUB'
26250
+ },
26251
+ SAR: {
26252
+ 'currency-symbol': 'SR',
26253
+ 'currency-code': 'SAR'
26254
+ },
26255
+ SCR: {
26256
+ 'currency-symbol': 'SRe',
26257
+ 'currency-code': 'SCR'
26258
+ },
26259
+ SEK: {
26260
+ 'currency-symbol': 'SEK',
26261
+ 'currency-code': 'SEK'
26262
+ },
26263
+ SGD: {
26264
+ 'currency-symbol': 'S$',
26265
+ 'currency-code': 'SGD'
26266
+ },
26267
+ SLL: {
26268
+ 'currency-symbol': 'Le',
26269
+ 'currency-code': 'SLL'
26270
+ },
26271
+ SOS: {
26272
+ 'currency-symbol': 'Sh.so.',
26273
+ 'currency-code': 'SOS'
26274
+ },
26275
+ SSP: {
26276
+ 'currency-symbol': 'SS£',
26277
+ 'currency-code': 'SSP'
26278
+ },
26279
+ SVC: {
26280
+ 'currency-symbol': '₡',
26281
+ 'currency-code': 'SVC'
26282
+ },
26283
+ SZL: {
26284
+ 'currency-symbol': 'E',
26285
+ 'currency-code': 'SZL'
26286
+ },
26287
+ THB: {
26288
+ 'currency-symbol': '฿',
26289
+ 'currency-code': 'THB'
26290
+ },
26291
+ TTD: {
26292
+ 'currency-symbol': 'TT$',
26293
+ 'currency-code': 'TTD'
26294
+ },
26295
+ TZS: {
26296
+ 'currency-symbol': 'Sh',
26297
+ 'currency-code': 'TZS'
26298
+ },
26299
+ USD: {
26300
+ 'currency-symbol': '$',
26301
+ 'currency-code': 'USD'
26302
+ },
26303
+ UYU: {
26304
+ 'currency-symbol': '$U',
26305
+ 'currency-code': 'UYU'
26306
+ },
26307
+ UZS: {
26308
+ 'currency-symbol': "so'm",
26309
+ 'currency-code': 'UZS'
26310
+ },
26311
+ YER: {
26312
+ 'currency-symbol': '﷼',
26313
+ 'currency-code': 'YER'
26314
+ },
26315
+ ZAR: {
26316
+ 'currency-symbol': 'R',
26317
+ 'currency-code': 'ZAR'
26318
+ },
26319
+ KWD: {
26320
+ 'currency-symbol': 'د.ك',
26321
+ 'currency-code': 'KWD'
26322
+ },
26323
+ BHD: {
26324
+ 'currency-symbol': 'د.ب.',
26325
+ 'currency-code': 'BHD'
26326
+ },
26327
+ OMR: {
26328
+ 'currency-symbol': 'ر.ع.',
26329
+ 'currency-code': 'OMR'
25961
26330
  }
25962
26331
  };
25963
- var currencyLocaleMapping = {
25964
- INR: 'en-IN',
25965
- MYR: 'en-MY'
25966
- };
25967
- var currencyAbbreviationsMapping = {
25968
- INR: [{
25969
- value: 1e7,
25970
- symbol: 'Cr'
25971
- }, {
25972
- value: 1e5,
25973
- symbol: 'L'
25974
- }, {
25975
- value: 1e3,
25976
- symbol: 'k'
25977
- }],
25978
- MYR: [{
26332
+
26333
+ var getCurrencyAbbreviations = function getCurrencyAbbreviations(currency) {
26334
+ if (currency === 'INR') {
26335
+ return [{
26336
+ value: 1e7,
26337
+ symbol: 'Cr'
26338
+ }, {
26339
+ value: 1e5,
26340
+ symbol: 'L'
26341
+ }, {
26342
+ value: 1e3,
26343
+ symbol: 'k'
26344
+ }];
26345
+ }
26346
+
26347
+ return [{
25979
26348
  value: 1e9,
25980
26349
  symbol: 'B'
25981
26350
  }, {
@@ -25984,7 +26353,7 @@ var currencyAbbreviationsMapping = {
25984
26353
  }, {
25985
26354
  value: 1e3,
25986
26355
  symbol: 'K'
25987
- }]
26356
+ }];
25988
26357
  };
25989
26358
 
25990
26359
  var _excluded$3 = ["value", "suffix", "size", "isAffixSubtle", "intent", "prefix", "testID", "currency"];
@@ -26059,7 +26428,9 @@ var getFlooredFixed = function getFlooredFixed(value, decimalPlaces) {
26059
26428
  };
26060
26429
  var addCommas = function addCommas(amountValue, currency) {
26061
26430
  var decimalPlaces = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
26062
- var locale = currencyLocaleMapping[currency];
26431
+ // If the currency is 'INR', set the locale to 'en-IN' (Indian English).
26432
+ // Otherwise, set the locale to 'en-US' (U.S. English).
26433
+ var locale = currency === 'INR' ? 'en-IN' : 'en-US';
26063
26434
  return amountValue.toLocaleString(locale, {
26064
26435
  minimumFractionDigits: decimalPlaces
26065
26436
  });
@@ -26071,7 +26442,7 @@ var addCommas = function addCommas(amountValue, currency) {
26071
26442
  */
26072
26443
 
26073
26444
  var getHumanizedAmount = function getHumanizedAmount(amountValue, currency) {
26074
- var abbreviations = currencyAbbreviationsMapping[currency];
26445
+ var abbreviations = getCurrencyAbbreviations(currency);
26075
26446
  var abbreviation = abbreviations.find(function (abbr) {
26076
26447
  return amountValue >= abbr.value;
26077
26448
  });
@@ -28357,7 +28728,9 @@ var _BottomSheet = function _BottomSheet(_ref2) {
28357
28728
  children = _ref2.children,
28358
28729
  initialFocusRef = _ref2.initialFocusRef,
28359
28730
  _ref2$snapPoints = _ref2.snapPoints,
28360
- snapPoints = _ref2$snapPoints === void 0 ? [0.35, 0.5, 0.85] : _ref2$snapPoints;
28731
+ snapPoints = _ref2$snapPoints === void 0 ? [0.35, 0.5, 0.85] : _ref2$snapPoints,
28732
+ _ref2$zIndex = _ref2.zIndex,
28733
+ zIndex = _ref2$zIndex === void 0 ? 100 : _ref2$zIndex;
28361
28734
 
28362
28735
  var _useTheme = useTheme(),
28363
28736
  theme = _useTheme.theme;
@@ -28411,7 +28784,6 @@ var _BottomSheet = function _BottomSheet(_ref2) {
28411
28784
  var preventScrollingRef = React__default.useRef(true);
28412
28785
  var scrollRef = React__default.useRef(null);
28413
28786
  var grabHandleRef = React__default.useRef(null);
28414
- var originalFocusElement = React__default.useRef(null);
28415
28787
  var defaultInitialFocusRef = React__default.useRef(null);
28416
28788
  var initialSnapPoint = React__default.useRef(snapPoints[1]);
28417
28789
  var totalHeight = React__default.useMemo(function () {
@@ -28428,7 +28800,7 @@ var _BottomSheet = function _BottomSheet(_ref2) {
28428
28800
 
28429
28801
  var currentStackIndex = getCurrentStackIndexById(id);
28430
28802
  var isOnTopOfStack = getTopOfTheStack() === id;
28431
- var zIndex = 100 - currentStackIndex;
28803
+ var bottomSheetZIndex = zIndex - currentStackIndex;
28432
28804
  var setPositionY = React__default.useCallback(function (value) {
28433
28805
  var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
28434
28806
  var maxValue = computeMaxContent({
@@ -28472,42 +28844,13 @@ var _BottomSheet = function _BottomSheet(_ref2) {
28472
28844
  initialSnapPoint.current = snapPoints[0];
28473
28845
  }
28474
28846
  }, [dimensions.height, snapPoints, totalHeight]);
28475
- var returnFocus = React__default.useCallback(function () {
28476
- if (!originalFocusElement.current) return;
28477
- originalFocusElement.current.focus(); // After returning focus we will clear the original focus
28478
- // Because if sheet can be opened up via multiple triggers
28479
- // We want to ensure the focus returns back to the most recent triggerer
28480
-
28481
- originalFocusElement.current = null;
28482
- }, [originalFocusElement]);
28483
- var focusOnInitialRef = React__default.useCallback(function () {
28484
- if (!initialFocusRef) {
28485
- var _defaultInitialFocusR;
28486
-
28487
- // focus on close button
28488
- (_defaultInitialFocusR = defaultInitialFocusRef.current) === null || _defaultInitialFocusR === void 0 ? void 0 : _defaultInitialFocusR.focus();
28489
- } else {
28490
- var _initialFocusRef$curr;
28491
-
28492
- // focus on the initialRef passed by the user
28493
- (_initialFocusRef$curr = initialFocusRef.current) === null || _initialFocusRef$curr === void 0 ? void 0 : _initialFocusRef$curr.focus();
28494
- }
28495
- }, [initialFocusRef]);
28496
28847
  var handleOnOpen = React__default.useCallback(function () {
28497
- var _originalFocusElement;
28498
-
28499
28848
  setPositionY(dimensions.height * initialSnapPoint.current);
28500
- scrollLockRef.current.activate(); // initialize the original focused element
28501
- // On first render it will be the activeElement, eg: the button trigger or select input
28502
- // On Subsequent open operations it won't further update the original focus
28503
-
28504
- originalFocusElement.current = (_originalFocusElement = originalFocusElement.current) !== null && _originalFocusElement !== void 0 ? _originalFocusElement : document.activeElement;
28505
- focusOnInitialRef();
28506
- }, [dimensions.height, focusOnInitialRef, scrollLockRef, setPositionY]);
28849
+ scrollLockRef.current.activate();
28850
+ }, [dimensions.height, scrollLockRef, setPositionY]);
28507
28851
  var handleOnClose = React__default.useCallback(function () {
28508
28852
  setPositionY(0);
28509
- returnFocus();
28510
- }, [returnFocus, setPositionY]);
28853
+ }, [setPositionY]);
28511
28854
  var close = React__default.useCallback(function () {
28512
28855
  onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
28513
28856
  bottomSheetAndDropdownGlue === null || bottomSheetAndDropdownGlue === void 0 ? void 0 : bottomSheetAndDropdownGlue.onBottomSheetDismiss();
@@ -28725,49 +29068,66 @@ var _BottomSheet = function _BottomSheet(_ref2) {
28725
29068
 
28726
29069
  _setPositionY(0);
28727
29070
  }
28728
- }, [isMounted, scrollLockRef]); // We don't want to destroy the react tree when we are rendering inside Dropdown
29071
+ }, [isMounted, scrollLockRef]); // required by floating ui to handle focus
29072
+
29073
+ var _useFloating = useFloating({
29074
+ open: isMounted
29075
+ }),
29076
+ refs = _useFloating.refs,
29077
+ context = _useFloating.context; // We don't want to destroy the react tree when we are rendering inside Dropdown
28729
29078
  // Because if we bail out early then ActionList won't render,
28730
29079
  // and Dropdown manages it's state based on the rendered JSX of ActionList
28731
29080
  // If we don't render ActionList Dropdown state will reset each time we open/close BottomSheet
28732
29081
 
29082
+
28733
29083
  var isInsideDropdown = Boolean(bottomSheetAndDropdownGlue);
28734
29084
 
28735
29085
  if (!isMounted && !isInsideDropdown) {
28736
29086
  return /*#__PURE__*/jsx(Fragment, {});
28737
29087
  }
28738
29088
 
28739
- return /*#__PURE__*/jsxs(BottomSheetContext.Provider, {
29089
+ return /*#__PURE__*/jsx(BottomSheetContext.Provider, {
28740
29090
  value: contextValue,
28741
- children: [/*#__PURE__*/jsx(BottomSheetBackdrop, {
28742
- zIndex: zIndex
28743
- }), /*#__PURE__*/jsx(BottomSheetSurface, _objectSpread$c(_objectSpread$c(_objectSpread$c({}, metaAttribute({
28744
- name: MetaConstants.BottomSheet
28745
- })), makeAccessible({
29091
+ children: (isMounted || isInsideDropdown) && /*#__PURE__*/jsx(FloatingFocusManager, {
29092
+ returnFocus: true,
29093
+ initialFocus: initialFocusRef !== null && initialFocusRef !== void 0 ? initialFocusRef : defaultInitialFocusRef,
29094
+ context: context,
28746
29095
  modal: true,
28747
- role: 'dialog'
28748
- })), {}, {
28749
- windowHeight: dimensions.height,
28750
- isDragging: isDragging,
28751
- style: {
28752
- opacity: isVisible ? 1 : 0,
28753
- pointerEvents: isVisible ? 'all' : 'none',
28754
- height: positionY,
28755
- bottom: 0,
28756
- top: 'auto',
28757
- zIndex: zIndex
28758
- },
28759
- children: /*#__PURE__*/jsxs(BaseBox, {
28760
- height: "100%",
28761
- display: "flex",
28762
- flexDirection: "column",
28763
- children: [/*#__PURE__*/jsx(BottomSheetGrabHandle, _objectSpread$c(_objectSpread$c({
28764
- ref: grabHandleRef,
28765
- isHeaderFloating: isHeaderFloating
28766
- }, metaAttribute({
28767
- name: ComponentIds.BottomSheetGrabHandle
28768
- })), bind())), children]
29096
+ children: /*#__PURE__*/jsxs(Fragment, {
29097
+ children: [/*#__PURE__*/jsx(BottomSheetBackdrop, {
29098
+ zIndex: bottomSheetZIndex
29099
+ }), /*#__PURE__*/jsx(BottomSheetSurface, _objectSpread$c(_objectSpread$c(_objectSpread$c({}, metaAttribute({
29100
+ name: MetaConstants.BottomSheet,
29101
+ testID: 'bottomsheet-surface'
29102
+ })), makeAccessible({
29103
+ modal: true,
29104
+ role: 'dialog'
29105
+ })), {}, {
29106
+ windowHeight: dimensions.height,
29107
+ isDragging: isDragging,
29108
+ style: {
29109
+ opacity: isVisible ? 1 : 0,
29110
+ pointerEvents: isVisible ? 'all' : 'none',
29111
+ height: positionY,
29112
+ bottom: 0,
29113
+ top: 'auto',
29114
+ zIndex: bottomSheetZIndex
29115
+ },
29116
+ ref: refs.setFloating,
29117
+ children: /*#__PURE__*/jsxs(BaseBox, {
29118
+ height: "100%",
29119
+ display: "flex",
29120
+ flexDirection: "column",
29121
+ children: [/*#__PURE__*/jsx(BottomSheetGrabHandle, _objectSpread$c(_objectSpread$c({
29122
+ ref: grabHandleRef,
29123
+ isHeaderFloating: isHeaderFloating
29124
+ }, metaAttribute({
29125
+ name: ComponentIds.BottomSheetGrabHandle
29126
+ })), bind())), children]
29127
+ })
29128
+ }))]
28769
29129
  })
28770
- }))]
29130
+ })
28771
29131
  });
28772
29132
  };
28773
29133