@cloud-ru/ds-drawer 1.0.6-preview-fd6730e3.0 → 1.0.6

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.
@@ -53,7 +53,7 @@ function DrawerFrame(props) {
53
53
  const resolvedContainer = container ?? (portalContextRef.current ? () => portalContextRef.current : undefined);
54
54
  return (_jsx(RcDrawer, { resizable: drawerResizable, panelRef: checkElement, mask: showBlackout, maskClosable: showBlackout, keyboard: showBlackout, "data-showblackout": showBlackout, open: open, onClose: onClose, push: push, getContainer: resolvedContainer, placement: position, destroyOnHidden: true, rootClassName: cn(styles.drawerRoot, rootClassName), style: drawerPanelStyle, classNames: {
55
55
  section: cn(styles.drawer, className),
56
- }, size: isPredefinedWidth ? 'null' : width, ...extractSupportProps(rest), "data-content-wrapper": true, "data-position": position, "data-width": isPredefinedWidth ? width : undefined, "data-height-auto": heightAutoVertical ? true : undefined, "data-acrylic-appearance": 'neutral', "data-acrylic-level": '1Level', prefixCls: styles.prefixCls, ...(disableMotions ? {} : motionProps), children: _jsxs(RemoveScroll, { enabled: showBlackout || outerScrollLock, removeScrollBar: false, ref: focusTrapRef, className: styles.scrollLock, children: [showButtonClosed && (_jsx("div", { className: styles.showButtonClosedWrapper, children: _jsx(PopupCloseButton, { className: styles.showButtonClosed, "aria-label": 'close drawer', "data-test-id": TEST_IDS.closeButton, onClick: onClose }) })), _jsx(OverlaySurfaceProvider, { surface: OVERLAY_SURFACE.Drawer, bodyHeightAuto: heightAutoVertical, children: children }), tooltip, nestedDrawer] }) }));
56
+ }, size: isPredefinedWidth ? 'null' : width, ...extractSupportProps(rest), "data-content-wrapper": true, "data-position": position, "data-width": isPredefinedWidth ? width : undefined, "data-height-auto": heightAutoVertical ? true : undefined, "data-acrylic-appearance": 'neutral', "data-acrylic-level": '1Level', prefixCls: 'snack-rc-drawer', ...(disableMotions ? {} : motionProps), children: _jsxs(RemoveScroll, { enabled: showBlackout || outerScrollLock, removeScrollBar: false, ref: focusTrapRef, className: styles.scrollLock, children: [showButtonClosed && (_jsx("div", { className: styles.showButtonClosedWrapper, children: _jsx(PopupCloseButton, { className: styles.showButtonClosed, "aria-label": 'close drawer', "data-test-id": TEST_IDS.closeButton, onClick: onClose }) })), _jsx(OverlaySurfaceProvider, { surface: OVERLAY_SURFACE.Drawer, bodyHeightAuto: heightAutoVertical, children: children }), tooltip, nestedDrawer] }) }));
57
57
  }
58
58
  /**
59
59
  * Адаптивный low-level `DrawerCustom`: на `mobile` — `BottomSheetCustom`, иначе — `DrawerFrame`.
@@ -1,12 +1,11 @@
1
- import styles from './styles.module.css';
2
1
  export const maskMotion = {
3
2
  motionAppear: true,
4
- motionName: styles.maskMotionName,
3
+ motionName: 'maskMotion',
5
4
  };
6
5
  export const motion = placement => ({
7
6
  motionAppear: true,
8
7
  motionDeadline: 300,
9
- motionName: `${styles.panelMotionName}-${placement}`,
8
+ motionName: `panelMotion-${placement}`,
10
9
  });
11
10
  export const motionProps = {
12
11
  maskMotion,
@@ -2,8 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Tooltip } from '@cloud-ru/ds-tooltip';
3
3
  import { isBrowser } from '@cloud-ru/ds-utils';
4
4
  import { useCallback, useMemo, useRef, useState } from 'react';
5
- import styles from '../styles.module.css';
6
- const DRAGGER_SELECTOR = `.${styles.prefixCls}-resizable-dragger`;
5
+ const DRAGGER_SELECTOR = '.snack-rc-drawer-resizable-dragger';
7
6
  export function useDrawerResize({ position, resizable: resizableProp }) {
8
7
  const targetRef = useRef(null);
9
8
  const targetRefCallbackRef = useRef();