@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.
@@ -21735,16 +21735,7 @@ var StyledBaseNativeButton = /*#__PURE__*/styled.button.withConfig({
21735
21735
  displayName: "StyledBaseInputweb__StyledBaseNativeButton",
21736
21736
  componentId: "hsusrk-1"
21737
21737
  })(function (props) {
21738
- return _objectSpread$M(_objectSpread$M(_objectSpread$M({}, getWebInputStyles(props)), getTextStyles({
21739
- size: 'medium',
21740
- variant: 'body',
21741
- type: props.value ? 'subtle' : 'placeholder',
21742
- weight: 'regular',
21743
- contrast: 'low',
21744
- theme: props.theme
21745
- })), {}, {
21746
- textAlign: props.textAlign
21747
- });
21738
+ return _objectSpread$M({}, getWebInputStyles(props));
21748
21739
  });
21749
21740
  var autoCompleteSuggestionTypeMap = {
21750
21741
  none: 'off',
@@ -21833,7 +21824,12 @@ var _StyledBaseInput = function _StyledBaseInput(_ref, ref) {
21833
21824
  }
21834
21825
  }, commonProps), props), accessibilityProps), {}, {
21835
21826
  value: props.value,
21836
- children: props.value ? props.value : props.placeholder
21827
+ children: /*#__PURE__*/jsx(Text, {
21828
+ type: props.value ? 'subtle' : 'placeholder',
21829
+ truncateAfterLines: 1,
21830
+ textAlign: props.textAlign,
21831
+ children: props.value ? props.value : props.placeholder
21832
+ })
21837
21833
  })) : /*#__PURE__*/jsx(StyledBaseNativeInput // @ts-expect-error: TS doesnt understand that this will always be `input`
21838
21834
  , _objectSpread$M(_objectSpread$M(_objectSpread$M({
21839
21835
  ref: ref,
@@ -26410,33 +26406,406 @@ var amountLineHeights = {
26410
26406
  'heading-large-bold': 400,
26411
26407
  'title-small': 500,
26412
26408
  'title-medium': 600
26413
- };
26409
+ }; // All the supported currency codes are taken from Razorpay's Merchant Dashboard codebase
26410
+
26414
26411
  var currencyPrefixMapping = {
26412
+ AED: {
26413
+ 'currency-symbol': 'د.إ',
26414
+ 'currency-code': 'AED'
26415
+ },
26416
+ ALL: {
26417
+ 'currency-symbol': 'Lek',
26418
+ 'currency-code': 'ALL'
26419
+ },
26420
+ AMD: {
26421
+ 'currency-symbol': '֏',
26422
+ 'currency-code': 'AMD'
26423
+ },
26424
+ ARS: {
26425
+ 'currency-symbol': 'ARS',
26426
+ 'currency-code': 'ARS'
26427
+ },
26428
+ AUD: {
26429
+ 'currency-symbol': 'A$',
26430
+ 'currency-code': 'AUD'
26431
+ },
26432
+ AWG: {
26433
+ 'currency-symbol': 'Afl.',
26434
+ 'currency-code': 'AWG'
26435
+ },
26436
+ BBD: {
26437
+ 'currency-symbol': '$',
26438
+ 'currency-code': 'BBD'
26439
+ },
26440
+ BDT: {
26441
+ 'currency-symbol': '৳',
26442
+ 'currency-code': 'BDT'
26443
+ },
26444
+ BMD: {
26445
+ 'currency-symbol': '$',
26446
+ 'currency-code': 'BMD'
26447
+ },
26448
+ BND: {
26449
+ 'currency-symbol': 'BND',
26450
+ 'currency-code': 'BND'
26451
+ },
26452
+ BOB: {
26453
+ 'currency-symbol': 'Bs',
26454
+ 'currency-code': 'BOB'
26455
+ },
26456
+ BSD: {
26457
+ 'currency-symbol': 'B$',
26458
+ 'currency-code': 'BSD'
26459
+ },
26460
+ BWP: {
26461
+ 'currency-symbol': 'P',
26462
+ 'currency-code': 'BWP'
26463
+ },
26464
+ BZD: {
26465
+ 'currency-symbol': 'BZ$',
26466
+ 'currency-code': 'BZD'
26467
+ },
26468
+ CAD: {
26469
+ 'currency-symbol': 'C$',
26470
+ 'currency-code': 'CAD'
26471
+ },
26472
+ CHF: {
26473
+ 'currency-symbol': 'CHf',
26474
+ 'currency-code': 'CHF'
26475
+ },
26476
+ CNY: {
26477
+ 'currency-symbol': '¥',
26478
+ 'currency-code': 'CNY'
26479
+ },
26480
+ COP: {
26481
+ 'currency-symbol': 'COL$',
26482
+ 'currency-code': 'COP'
26483
+ },
26484
+ CRC: {
26485
+ 'currency-symbol': '₡',
26486
+ 'currency-code': 'CRC'
26487
+ },
26488
+ CUP: {
26489
+ 'currency-symbol': '$MN',
26490
+ 'currency-code': 'CUP'
26491
+ },
26492
+ CZK: {
26493
+ 'currency-symbol': 'Kč',
26494
+ 'currency-code': 'CZK'
26495
+ },
26496
+ DKK: {
26497
+ 'currency-symbol': 'DKK',
26498
+ 'currency-code': 'DKK'
26499
+ },
26500
+ DOP: {
26501
+ 'currency-symbol': 'RD$',
26502
+ 'currency-code': 'DOP'
26503
+ },
26504
+ DZD: {
26505
+ 'currency-symbol': 'د.ج',
26506
+ 'currency-code': 'DZD'
26507
+ },
26508
+ EGP: {
26509
+ 'currency-symbol': 'E£',
26510
+ 'currency-code': 'EGP'
26511
+ },
26512
+ ETB: {
26513
+ 'currency-symbol': 'ብር',
26514
+ 'currency-code': 'ETB'
26515
+ },
26516
+ EUR: {
26517
+ 'currency-symbol': '€',
26518
+ 'currency-code': 'EUR'
26519
+ },
26520
+ FJD: {
26521
+ 'currency-symbol': 'FJ$',
26522
+ 'currency-code': 'FJD'
26523
+ },
26524
+ GBP: {
26525
+ 'currency-symbol': '£',
26526
+ 'currency-code': 'GBP'
26527
+ },
26528
+ GHS: {
26529
+ 'currency-symbol': 'GH₵',
26530
+ 'currency-code': 'GHS'
26531
+ },
26532
+ GIP: {
26533
+ 'currency-symbol': 'GIP',
26534
+ 'currency-code': 'GIP'
26535
+ },
26536
+ GMD: {
26537
+ 'currency-symbol': 'D',
26538
+ 'currency-code': 'GMD'
26539
+ },
26540
+ GTQ: {
26541
+ 'currency-symbol': 'Q',
26542
+ 'currency-code': 'GTQ'
26543
+ },
26544
+ GYD: {
26545
+ 'currency-symbol': 'G$',
26546
+ 'currency-code': 'GYD'
26547
+ },
26548
+ HKD: {
26549
+ 'currency-symbol': 'HK$',
26550
+ 'currency-code': 'HKD'
26551
+ },
26552
+ HNL: {
26553
+ 'currency-symbol': 'HNL',
26554
+ 'currency-code': 'HNL'
26555
+ },
26556
+ HRK: {
26557
+ 'currency-symbol': 'kn',
26558
+ 'currency-code': 'HRK'
26559
+ },
26560
+ HTG: {
26561
+ 'currency-symbol': 'G',
26562
+ 'currency-code': 'HTG'
26563
+ },
26564
+ HUF: {
26565
+ 'currency-symbol': 'Ft',
26566
+ 'currency-code': 'HUF'
26567
+ },
26568
+ IDR: {
26569
+ 'currency-symbol': 'Rp',
26570
+ 'currency-code': 'IDR'
26571
+ },
26572
+ ILS: {
26573
+ 'currency-symbol': '₪',
26574
+ 'currency-code': 'ILS'
26575
+ },
26415
26576
  INR: {
26416
26577
  'currency-symbol': '₹',
26417
26578
  'currency-code': 'INR'
26418
26579
  },
26580
+ JMD: {
26581
+ 'currency-symbol': 'J$',
26582
+ 'currency-code': 'JMD'
26583
+ },
26584
+ KES: {
26585
+ 'currency-symbol': 'Ksh',
26586
+ 'currency-code': 'KES'
26587
+ },
26588
+ KGS: {
26589
+ 'currency-symbol': 'Лв',
26590
+ 'currency-code': 'KGS'
26591
+ },
26592
+ KHR: {
26593
+ 'currency-symbol': '៛',
26594
+ 'currency-code': 'KHR'
26595
+ },
26596
+ KYD: {
26597
+ 'currency-symbol': 'CI$',
26598
+ 'currency-code': 'KYD'
26599
+ },
26600
+ KZT: {
26601
+ 'currency-symbol': '₸',
26602
+ 'currency-code': 'KZT'
26603
+ },
26604
+ LAK: {
26605
+ 'currency-symbol': '₭',
26606
+ 'currency-code': 'LAK'
26607
+ },
26608
+ LKR: {
26609
+ 'currency-symbol': 'රු',
26610
+ 'currency-code': 'LKR'
26611
+ },
26612
+ LRD: {
26613
+ 'currency-symbol': 'L$',
26614
+ 'currency-code': 'LRD'
26615
+ },
26616
+ LSL: {
26617
+ 'currency-symbol': 'LSL',
26618
+ 'currency-code': 'LSL'
26619
+ },
26620
+ MAD: {
26621
+ 'currency-symbol': 'د.م.',
26622
+ 'currency-code': 'MAD'
26623
+ },
26624
+ MDL: {
26625
+ 'currency-symbol': 'MDL',
26626
+ 'currency-code': 'MDL'
26627
+ },
26628
+ MKD: {
26629
+ 'currency-symbol': 'ден',
26630
+ 'currency-code': 'MKD'
26631
+ },
26632
+ MMK: {
26633
+ 'currency-symbol': 'MMK',
26634
+ 'currency-code': 'MMK'
26635
+ },
26636
+ MNT: {
26637
+ 'currency-symbol': '₮',
26638
+ 'currency-code': 'MNT'
26639
+ },
26640
+ MOP: {
26641
+ 'currency-symbol': 'MOP$',
26642
+ 'currency-code': 'MOP'
26643
+ },
26644
+ MUR: {
26645
+ 'currency-symbol': '₨',
26646
+ 'currency-code': 'MUR'
26647
+ },
26648
+ MVR: {
26649
+ 'currency-symbol': 'Rf',
26650
+ 'currency-code': 'MVR'
26651
+ },
26652
+ MWK: {
26653
+ 'currency-symbol': 'MK',
26654
+ 'currency-code': 'MWK'
26655
+ },
26656
+ MXN: {
26657
+ 'currency-symbol': 'Mex$',
26658
+ 'currency-code': 'MXN'
26659
+ },
26419
26660
  MYR: {
26420
26661
  'currency-symbol': 'RM',
26421
26662
  'currency-code': 'MYR'
26663
+ },
26664
+ NAD: {
26665
+ 'currency-symbol': 'N$',
26666
+ 'currency-code': 'NAD'
26667
+ },
26668
+ NGN: {
26669
+ 'currency-symbol': '₦',
26670
+ 'currency-code': 'NGN'
26671
+ },
26672
+ NIO: {
26673
+ 'currency-symbol': 'NIO',
26674
+ 'currency-code': 'NIO'
26675
+ },
26676
+ NOK: {
26677
+ 'currency-symbol': 'NOK',
26678
+ 'currency-code': 'NOK'
26679
+ },
26680
+ NPR: {
26681
+ 'currency-symbol': 'रू',
26682
+ 'currency-code': 'NPR'
26683
+ },
26684
+ NZD: {
26685
+ 'currency-symbol': 'NZ$',
26686
+ 'currency-code': 'NZD'
26687
+ },
26688
+ PEN: {
26689
+ 'currency-symbol': 'S/',
26690
+ 'currency-code': 'PEN'
26691
+ },
26692
+ PGK: {
26693
+ 'currency-symbol': 'PGK',
26694
+ 'currency-code': 'PGK'
26695
+ },
26696
+ PHP: {
26697
+ 'currency-symbol': '₱',
26698
+ 'currency-code': 'PHP'
26699
+ },
26700
+ PKR: {
26701
+ 'currency-symbol': '₨',
26702
+ 'currency-code': 'PKR'
26703
+ },
26704
+ QAR: {
26705
+ 'currency-symbol': 'QR',
26706
+ 'currency-code': 'QAR'
26707
+ },
26708
+ RUB: {
26709
+ 'currency-symbol': '₽',
26710
+ 'currency-code': 'RUB'
26711
+ },
26712
+ SAR: {
26713
+ 'currency-symbol': 'SR',
26714
+ 'currency-code': 'SAR'
26715
+ },
26716
+ SCR: {
26717
+ 'currency-symbol': 'SRe',
26718
+ 'currency-code': 'SCR'
26719
+ },
26720
+ SEK: {
26721
+ 'currency-symbol': 'SEK',
26722
+ 'currency-code': 'SEK'
26723
+ },
26724
+ SGD: {
26725
+ 'currency-symbol': 'S$',
26726
+ 'currency-code': 'SGD'
26727
+ },
26728
+ SLL: {
26729
+ 'currency-symbol': 'Le',
26730
+ 'currency-code': 'SLL'
26731
+ },
26732
+ SOS: {
26733
+ 'currency-symbol': 'Sh.so.',
26734
+ 'currency-code': 'SOS'
26735
+ },
26736
+ SSP: {
26737
+ 'currency-symbol': 'SS£',
26738
+ 'currency-code': 'SSP'
26739
+ },
26740
+ SVC: {
26741
+ 'currency-symbol': '₡',
26742
+ 'currency-code': 'SVC'
26743
+ },
26744
+ SZL: {
26745
+ 'currency-symbol': 'E',
26746
+ 'currency-code': 'SZL'
26747
+ },
26748
+ THB: {
26749
+ 'currency-symbol': '฿',
26750
+ 'currency-code': 'THB'
26751
+ },
26752
+ TTD: {
26753
+ 'currency-symbol': 'TT$',
26754
+ 'currency-code': 'TTD'
26755
+ },
26756
+ TZS: {
26757
+ 'currency-symbol': 'Sh',
26758
+ 'currency-code': 'TZS'
26759
+ },
26760
+ USD: {
26761
+ 'currency-symbol': '$',
26762
+ 'currency-code': 'USD'
26763
+ },
26764
+ UYU: {
26765
+ 'currency-symbol': '$U',
26766
+ 'currency-code': 'UYU'
26767
+ },
26768
+ UZS: {
26769
+ 'currency-symbol': "so'm",
26770
+ 'currency-code': 'UZS'
26771
+ },
26772
+ YER: {
26773
+ 'currency-symbol': '﷼',
26774
+ 'currency-code': 'YER'
26775
+ },
26776
+ ZAR: {
26777
+ 'currency-symbol': 'R',
26778
+ 'currency-code': 'ZAR'
26779
+ },
26780
+ KWD: {
26781
+ 'currency-symbol': 'د.ك',
26782
+ 'currency-code': 'KWD'
26783
+ },
26784
+ BHD: {
26785
+ 'currency-symbol': 'د.ب.',
26786
+ 'currency-code': 'BHD'
26787
+ },
26788
+ OMR: {
26789
+ 'currency-symbol': 'ر.ع.',
26790
+ 'currency-code': 'OMR'
26422
26791
  }
26423
26792
  };
26424
- var currencyLocaleMapping = {
26425
- INR: 'en-IN',
26426
- MYR: 'en-MY'
26427
- };
26428
- var currencyAbbreviationsMapping = {
26429
- INR: [{
26430
- value: 1e7,
26431
- symbol: 'Cr'
26432
- }, {
26433
- value: 1e5,
26434
- symbol: 'L'
26435
- }, {
26436
- value: 1e3,
26437
- symbol: 'k'
26438
- }],
26439
- MYR: [{
26793
+
26794
+ var getCurrencyAbbreviations = function getCurrencyAbbreviations(currency) {
26795
+ if (currency === 'INR') {
26796
+ return [{
26797
+ value: 1e7,
26798
+ symbol: 'Cr'
26799
+ }, {
26800
+ value: 1e5,
26801
+ symbol: 'L'
26802
+ }, {
26803
+ value: 1e3,
26804
+ symbol: 'k'
26805
+ }];
26806
+ }
26807
+
26808
+ return [{
26440
26809
  value: 1e9,
26441
26810
  symbol: 'B'
26442
26811
  }, {
@@ -26445,7 +26814,7 @@ var currencyAbbreviationsMapping = {
26445
26814
  }, {
26446
26815
  value: 1e3,
26447
26816
  symbol: 'K'
26448
- }]
26817
+ }];
26449
26818
  };
26450
26819
 
26451
26820
  var _excluded$3 = ["value", "suffix", "size", "isAffixSubtle", "intent", "prefix", "testID", "currency"];
@@ -26520,7 +26889,9 @@ var getFlooredFixed = function getFlooredFixed(value, decimalPlaces) {
26520
26889
  };
26521
26890
  var addCommas = function addCommas(amountValue, currency) {
26522
26891
  var decimalPlaces = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
26523
- var locale = currencyLocaleMapping[currency];
26892
+ // If the currency is 'INR', set the locale to 'en-IN' (Indian English).
26893
+ // Otherwise, set the locale to 'en-US' (U.S. English).
26894
+ var locale = currency === 'INR' ? 'en-IN' : 'en-US';
26524
26895
  return amountValue.toLocaleString(locale, {
26525
26896
  minimumFractionDigits: decimalPlaces
26526
26897
  });
@@ -26532,7 +26903,7 @@ var addCommas = function addCommas(amountValue, currency) {
26532
26903
  */
26533
26904
 
26534
26905
  var getHumanizedAmount = function getHumanizedAmount(amountValue, currency) {
26535
- var abbreviations = currencyAbbreviationsMapping[currency];
26906
+ var abbreviations = getCurrencyAbbreviations(currency);
26536
26907
  var abbreviation = abbreviations.find(function (abbr) {
26537
26908
  return amountValue >= abbr.value;
26538
26909
  });
@@ -28835,7 +29206,9 @@ var _BottomSheet = function _BottomSheet(_ref2) {
28835
29206
  children = _ref2.children,
28836
29207
  initialFocusRef = _ref2.initialFocusRef,
28837
29208
  _ref2$snapPoints = _ref2.snapPoints,
28838
- snapPoints = _ref2$snapPoints === void 0 ? [0.35, 0.5, 0.85] : _ref2$snapPoints;
29209
+ snapPoints = _ref2$snapPoints === void 0 ? [0.35, 0.5, 0.85] : _ref2$snapPoints,
29210
+ _ref2$zIndex = _ref2.zIndex,
29211
+ zIndex = _ref2$zIndex === void 0 ? 100 : _ref2$zIndex;
28839
29212
 
28840
29213
  var _useTheme = useTheme(),
28841
29214
  theme = _useTheme.theme;
@@ -28889,7 +29262,6 @@ var _BottomSheet = function _BottomSheet(_ref2) {
28889
29262
  var preventScrollingRef = React__default.useRef(true);
28890
29263
  var scrollRef = React__default.useRef(null);
28891
29264
  var grabHandleRef = React__default.useRef(null);
28892
- var originalFocusElement = React__default.useRef(null);
28893
29265
  var defaultInitialFocusRef = React__default.useRef(null);
28894
29266
  var initialSnapPoint = React__default.useRef(snapPoints[1]);
28895
29267
  var totalHeight = React__default.useMemo(function () {
@@ -28906,7 +29278,7 @@ var _BottomSheet = function _BottomSheet(_ref2) {
28906
29278
 
28907
29279
  var currentStackIndex = getCurrentStackIndexById(id);
28908
29280
  var isOnTopOfStack = getTopOfTheStack() === id;
28909
- var zIndex = 100 - currentStackIndex;
29281
+ var bottomSheetZIndex = zIndex - currentStackIndex;
28910
29282
  var setPositionY = React__default.useCallback(function (value) {
28911
29283
  var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
28912
29284
  var maxValue = computeMaxContent({
@@ -28950,42 +29322,13 @@ var _BottomSheet = function _BottomSheet(_ref2) {
28950
29322
  initialSnapPoint.current = snapPoints[0];
28951
29323
  }
28952
29324
  }, [dimensions.height, snapPoints, totalHeight]);
28953
- var returnFocus = React__default.useCallback(function () {
28954
- if (!originalFocusElement.current) return;
28955
- originalFocusElement.current.focus(); // After returning focus we will clear the original focus
28956
- // Because if sheet can be opened up via multiple triggers
28957
- // We want to ensure the focus returns back to the most recent triggerer
28958
-
28959
- originalFocusElement.current = null;
28960
- }, [originalFocusElement]);
28961
- var focusOnInitialRef = React__default.useCallback(function () {
28962
- if (!initialFocusRef) {
28963
- var _defaultInitialFocusR;
28964
-
28965
- // focus on close button
28966
- (_defaultInitialFocusR = defaultInitialFocusRef.current) === null || _defaultInitialFocusR === void 0 ? void 0 : _defaultInitialFocusR.focus();
28967
- } else {
28968
- var _initialFocusRef$curr;
28969
-
28970
- // focus on the initialRef passed by the user
28971
- (_initialFocusRef$curr = initialFocusRef.current) === null || _initialFocusRef$curr === void 0 ? void 0 : _initialFocusRef$curr.focus();
28972
- }
28973
- }, [initialFocusRef]);
28974
29325
  var handleOnOpen = React__default.useCallback(function () {
28975
- var _originalFocusElement;
28976
-
28977
29326
  setPositionY(dimensions.height * initialSnapPoint.current);
28978
- scrollLockRef.current.activate(); // initialize the original focused element
28979
- // On first render it will be the activeElement, eg: the button trigger or select input
28980
- // On Subsequent open operations it won't further update the original focus
28981
-
28982
- originalFocusElement.current = (_originalFocusElement = originalFocusElement.current) !== null && _originalFocusElement !== void 0 ? _originalFocusElement : document.activeElement;
28983
- focusOnInitialRef();
28984
- }, [dimensions.height, focusOnInitialRef, scrollLockRef, setPositionY]);
29327
+ scrollLockRef.current.activate();
29328
+ }, [dimensions.height, scrollLockRef, setPositionY]);
28985
29329
  var handleOnClose = React__default.useCallback(function () {
28986
29330
  setPositionY(0);
28987
- returnFocus();
28988
- }, [returnFocus, setPositionY]);
29331
+ }, [setPositionY]);
28989
29332
  var close = React__default.useCallback(function () {
28990
29333
  onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
28991
29334
  bottomSheetAndDropdownGlue === null || bottomSheetAndDropdownGlue === void 0 ? void 0 : bottomSheetAndDropdownGlue.onBottomSheetDismiss();
@@ -29203,49 +29546,66 @@ var _BottomSheet = function _BottomSheet(_ref2) {
29203
29546
 
29204
29547
  _setPositionY(0);
29205
29548
  }
29206
- }, [isMounted, scrollLockRef]); // We don't want to destroy the react tree when we are rendering inside Dropdown
29549
+ }, [isMounted, scrollLockRef]); // required by floating ui to handle focus
29550
+
29551
+ var _useFloating = useFloating({
29552
+ open: isMounted
29553
+ }),
29554
+ refs = _useFloating.refs,
29555
+ context = _useFloating.context; // We don't want to destroy the react tree when we are rendering inside Dropdown
29207
29556
  // Because if we bail out early then ActionList won't render,
29208
29557
  // and Dropdown manages it's state based on the rendered JSX of ActionList
29209
29558
  // If we don't render ActionList Dropdown state will reset each time we open/close BottomSheet
29210
29559
 
29560
+
29211
29561
  var isInsideDropdown = Boolean(bottomSheetAndDropdownGlue);
29212
29562
 
29213
29563
  if (!isMounted && !isInsideDropdown) {
29214
29564
  return /*#__PURE__*/jsx(Fragment, {});
29215
29565
  }
29216
29566
 
29217
- return /*#__PURE__*/jsxs(BottomSheetContext.Provider, {
29567
+ return /*#__PURE__*/jsx(BottomSheetContext.Provider, {
29218
29568
  value: contextValue,
29219
- children: [/*#__PURE__*/jsx(BottomSheetBackdrop, {
29220
- zIndex: zIndex
29221
- }), /*#__PURE__*/jsx(BottomSheetSurface, _objectSpread$c(_objectSpread$c(_objectSpread$c({}, metaAttribute({
29222
- name: MetaConstants.BottomSheet
29223
- })), makeAccessible({
29569
+ children: (isMounted || isInsideDropdown) && /*#__PURE__*/jsx(FloatingFocusManager, {
29570
+ returnFocus: true,
29571
+ initialFocus: initialFocusRef !== null && initialFocusRef !== void 0 ? initialFocusRef : defaultInitialFocusRef,
29572
+ context: context,
29224
29573
  modal: true,
29225
- role: 'dialog'
29226
- })), {}, {
29227
- windowHeight: dimensions.height,
29228
- isDragging: isDragging,
29229
- style: {
29230
- opacity: isVisible ? 1 : 0,
29231
- pointerEvents: isVisible ? 'all' : 'none',
29232
- height: positionY,
29233
- bottom: 0,
29234
- top: 'auto',
29235
- zIndex: zIndex
29236
- },
29237
- children: /*#__PURE__*/jsxs(BaseBox, {
29238
- height: "100%",
29239
- display: "flex",
29240
- flexDirection: "column",
29241
- children: [/*#__PURE__*/jsx(BottomSheetGrabHandle, _objectSpread$c(_objectSpread$c({
29242
- ref: grabHandleRef,
29243
- isHeaderFloating: isHeaderFloating
29244
- }, metaAttribute({
29245
- name: ComponentIds.BottomSheetGrabHandle
29246
- })), bind())), children]
29574
+ children: /*#__PURE__*/jsxs(Fragment, {
29575
+ children: [/*#__PURE__*/jsx(BottomSheetBackdrop, {
29576
+ zIndex: bottomSheetZIndex
29577
+ }), /*#__PURE__*/jsx(BottomSheetSurface, _objectSpread$c(_objectSpread$c(_objectSpread$c({}, metaAttribute({
29578
+ name: MetaConstants.BottomSheet,
29579
+ testID: 'bottomsheet-surface'
29580
+ })), makeAccessible({
29581
+ modal: true,
29582
+ role: 'dialog'
29583
+ })), {}, {
29584
+ windowHeight: dimensions.height,
29585
+ isDragging: isDragging,
29586
+ style: {
29587
+ opacity: isVisible ? 1 : 0,
29588
+ pointerEvents: isVisible ? 'all' : 'none',
29589
+ height: positionY,
29590
+ bottom: 0,
29591
+ top: 'auto',
29592
+ zIndex: bottomSheetZIndex
29593
+ },
29594
+ ref: refs.setFloating,
29595
+ children: /*#__PURE__*/jsxs(BaseBox, {
29596
+ height: "100%",
29597
+ display: "flex",
29598
+ flexDirection: "column",
29599
+ children: [/*#__PURE__*/jsx(BottomSheetGrabHandle, _objectSpread$c(_objectSpread$c({
29600
+ ref: grabHandleRef,
29601
+ isHeaderFloating: isHeaderFloating
29602
+ }, metaAttribute({
29603
+ name: ComponentIds.BottomSheetGrabHandle
29604
+ })), bind())), children]
29605
+ })
29606
+ }))]
29247
29607
  })
29248
- }))]
29608
+ })
29249
29609
  });
29250
29610
  };
29251
29611