@razorpay/blade 7.2.0 → 7.2.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.
@@ -20627,12 +20627,9 @@ var CardFooterTrailing = /*#__PURE__*/assignWithoutSideEffects(_CardFooterTraili
20627
20627
  var ComponentIds$1 = {
20628
20628
  BottomSheet: 'BottomSheet',
20629
20629
  BottomSheetHeader: 'BottomSheetHeader',
20630
- BottomSheetHeaderTrailing: 'BottomSheetHeaderTrailing',
20631
- BottomSheetHeaderLeading: 'BottomSheetHeaderLeading',
20632
20630
  BottomSheetFooter: 'BottomSheetFooter',
20633
- BottomSheetFooterTrailing: 'BottomSheetFooterTrailing',
20634
- BottomSheetFooterLeading: 'BottomSheetFooterLeading',
20635
- BottomSheetBody: 'BottomSheetBody'
20631
+ BottomSheetBody: 'BottomSheetBody',
20632
+ BottomSheetGrabHandle: 'BottomSheetGrabHandle'
20636
20633
  };
20637
20634
 
20638
20635
  var _excluded$g = ["children", "selectionType"];
@@ -27363,10 +27360,13 @@ var _BottomSheetHeader = function _BottomSheetHeader(_ref) {
27363
27360
  setHeaderHeight(ref.current.getBoundingClientRect().height);
27364
27361
  }, [ref, isOpen]);
27365
27362
  var isHeaderEmpty = !(title || subtitle || leading || trailing || showBackButton);
27366
- return /*#__PURE__*/jsx(BaseBox, {
27363
+ return /*#__PURE__*/jsx(BaseBox, _objectSpread$5(_objectSpread$5({
27367
27364
  ref: ref,
27368
27365
  overflow: isHeaderEmpty ? 'visible' : 'auto',
27369
- flexShrink: 0,
27366
+ flexShrink: 0
27367
+ }, metaAttribute({
27368
+ name: ComponentIds$1.BottomSheetHeader
27369
+ })), {}, {
27370
27370
  children: isHeaderEmpty ? /*#__PURE__*/jsx(BottomSheetEmptyHeader, {
27371
27371
  ref: defaultInitialFocusRef
27372
27372
  }) : /*#__PURE__*/jsx(BaseHeader, _objectSpread$5({
@@ -27383,7 +27383,7 @@ var _BottomSheetHeader = function _BottomSheetHeader(_ref) {
27383
27383
  showCloseButton: true,
27384
27384
  onCloseButtonClick: close
27385
27385
  }, bind === null || bind === void 0 ? void 0 : bind()))
27386
- });
27386
+ }));
27387
27387
  };
27388
27388
 
27389
27389
  var BottomSheetHeader = /*#__PURE__*/assignWithoutSideEffects(_BottomSheetHeader, {
@@ -27434,7 +27434,7 @@ var BottomSheetFooter = function BottomSheetFooter(_ref) {
27434
27434
  setFooterHeight(ref.current.getBoundingClientRect().height);
27435
27435
  });
27436
27436
  }, [ref, isOpen]);
27437
- return /*#__PURE__*/jsx(BaseBox, _objectSpread$4(_objectSpread$4({
27437
+ return /*#__PURE__*/jsx(BaseBox, _objectSpread$4(_objectSpread$4(_objectSpread$4({
27438
27438
  ref: ref,
27439
27439
  width: "100%",
27440
27440
  flexShrink: 0,
@@ -27442,7 +27442,9 @@ var BottomSheetFooter = function BottomSheetFooter(_ref) {
27442
27442
  backgroundColor: theme.colors.surface.background.level2.lowContrast,
27443
27443
  touchAction: "none",
27444
27444
  zIndex: 2
27445
- }, bind === null || bind === void 0 ? void 0 : bind()), {}, {
27445
+ }, metaAttribute({
27446
+ name: ComponentIds$1.BottomSheetFooter
27447
+ })), bind === null || bind === void 0 ? void 0 : bind()), {}, {
27446
27448
  children: /*#__PURE__*/jsx(BaseFooter, {
27447
27449
  children: children
27448
27450
  })
@@ -27482,7 +27484,7 @@ var _BottomSheetBody = function _BottomSheetBody(_ref) {
27482
27484
  useIsomorphicLayoutEffect(function () {
27483
27485
  if (!contentRef.current) return;
27484
27486
  setContentHeight(contentRef.current.getBoundingClientRect().height);
27485
- }, [contentRef, isOpen]);
27487
+ }, [contentRef, isOpen, children]);
27486
27488
  React__default.useEffect(function () {
27487
27489
  setBottomSheetHasActionList(false);
27488
27490
  React__default.Children.forEach(children, function (child) {
@@ -27492,7 +27494,8 @@ var _BottomSheetBody = function _BottomSheetBody(_ref) {
27492
27494
  });
27493
27495
  }, [children]);
27494
27496
  return /*#__PURE__*/jsx(BaseBox, _objectSpread$3(_objectSpread$3(_objectSpread$3({}, metaAttribute({
27495
- testID: 'bottomsheet-body'
27497
+ testID: 'bottomsheet-body',
27498
+ name: ComponentIds$1.BottomSheetBody
27496
27499
  })), {}, {
27497
27500
  ref: scrollRef,
27498
27501
  flexGrow: 1,
@@ -28134,11 +28137,12 @@ var _BottomSheet = function _BottomSheet(_ref2) {
28134
28137
  value: contextValue,
28135
28138
  children: [/*#__PURE__*/jsx(BottomSheetBackdrop, {
28136
28139
  zIndex: zIndex
28137
- }), /*#__PURE__*/jsx(BottomSheetSurface, _objectSpread(_objectSpread({}, makeAccessible({
28140
+ }), /*#__PURE__*/jsx(BottomSheetSurface, _objectSpread(_objectSpread(_objectSpread({}, metaAttribute({
28141
+ name: ComponentIds$1.BottomSheet
28142
+ })), makeAccessible({
28138
28143
  modal: true,
28139
28144
  role: 'dialog'
28140
28145
  })), {}, {
28141
- "data-surface": true,
28142
28146
  windowHeight: dimensions.height,
28143
28147
  isDragging: isDragging,
28144
28148
  style: {
@@ -28153,9 +28157,11 @@ var _BottomSheet = function _BottomSheet(_ref2) {
28153
28157
  height: "100%",
28154
28158
  display: "flex",
28155
28159
  flexDirection: "column",
28156
- children: [/*#__PURE__*/jsx(BottomSheetGrabHandle, _objectSpread({
28160
+ children: [/*#__PURE__*/jsx(BottomSheetGrabHandle, _objectSpread(_objectSpread({
28157
28161
  ref: grabHandleRef
28158
- }, bind())), children]
28162
+ }, metaAttribute({
28163
+ name: ComponentIds$1.BottomSheetGrabHandle
28164
+ })), bind())), children]
28159
28165
  })
28160
28166
  }))]
28161
28167
  });