@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.
- package/CHANGELOG.md +4 -0
- package/dist/cjs/components/DrawerCustom/DrawerCustom.js +1 -1
- package/dist/cjs/components/DrawerCustom/constants.js +2 -6
- package/dist/cjs/components/DrawerCustom/hooks/useDrawerResize.js +1 -5
- package/dist/cjs/components/DrawerCustom/styles.module.css +117 -123
- package/dist/cjs/style.css +117 -123
- package/dist/esm/components/DrawerCustom/DrawerCustom.js +1 -1
- package/dist/esm/components/DrawerCustom/constants.js +2 -3
- package/dist/esm/components/DrawerCustom/hooks/useDrawerResize.js +1 -2
- package/dist/esm/components/DrawerCustom/styles.module.css +117 -123
- package/dist/esm/style.css +117 -123
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/components/DrawerCustom/DrawerCustom.tsx +1 -1
- package/src/components/DrawerCustom/constants.ts +2 -4
- package/src/components/DrawerCustom/hooks/useDrawerResize.tsx +1 -2
- package/src/components/DrawerCustom/styles.module.scss +42 -60
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.0.6 (2026-08-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @ds/drawer
|
|
9
|
+
|
|
6
10
|
## 1.0.5 (2026-08-28)
|
|
7
11
|
|
|
8
12
|
### Bug Fixes
|
|
@@ -59,7 +59,7 @@ function DrawerFrame(props) {
|
|
|
59
59
|
const resolvedContainer = container ?? (portalContextRef.current ? () => portalContextRef.current : undefined);
|
|
60
60
|
return ((0, jsx_runtime_1.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: (0, classnames_1.default)(styles_module_scss_1.default.drawerRoot, rootClassName), style: drawerPanelStyle, classNames: {
|
|
61
61
|
section: (0, classnames_1.default)(styles_module_scss_1.default.drawer, className),
|
|
62
|
-
}, size: isPredefinedWidth ? 'null' : width, ...(0, utils_1.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:
|
|
62
|
+
}, size: isPredefinedWidth ? 'null' : width, ...(0, utils_1.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 ? {} : constants_2.motionProps), children: (0, jsx_runtime_1.jsxs)(react_remove_scroll_1.RemoveScroll, { enabled: showBlackout || outerScrollLock, removeScrollBar: false, ref: focusTrapRef, className: styles_module_scss_1.default.scrollLock, children: [showButtonClosed && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.showButtonClosedWrapper, children: (0, jsx_runtime_1.jsx)(popup_private_1.PopupCloseButton, { className: styles_module_scss_1.default.showButtonClosed, "aria-label": 'close drawer', "data-test-id": constants_1.TEST_IDS.closeButton, onClick: onClose }) })), (0, jsx_runtime_1.jsx)(bottom_sheet_1.OverlaySurfaceProvider, { surface: bottom_sheet_1.OVERLAY_SURFACE.Drawer, bodyHeightAuto: heightAutoVertical, children: children }), tooltip, nestedDrawer] }) }));
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
* Адаптивный low-level `DrawerCustom`: на `mobile` — `BottomSheetCustom`, иначе — `DrawerFrame`.
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.motionProps = exports.motion = exports.maskMotion = void 0;
|
|
7
|
-
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
8
4
|
exports.maskMotion = {
|
|
9
5
|
motionAppear: true,
|
|
10
|
-
motionName:
|
|
6
|
+
motionName: 'maskMotion',
|
|
11
7
|
};
|
|
12
8
|
const motion = placement => ({
|
|
13
9
|
motionAppear: true,
|
|
14
10
|
motionDeadline: 300,
|
|
15
|
-
motionName:
|
|
11
|
+
motionName: `panelMotion-${placement}`,
|
|
16
12
|
});
|
|
17
13
|
exports.motion = motion;
|
|
18
14
|
exports.motionProps = {
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.useDrawerResize = useDrawerResize;
|
|
7
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
5
|
const tooltip_1 = require("@cloud-ru/ds-tooltip");
|
|
9
6
|
const utils_1 = require("@cloud-ru/ds-utils");
|
|
10
7
|
const react_1 = require("react");
|
|
11
|
-
const
|
|
12
|
-
const DRAGGER_SELECTOR = `.${styles_module_scss_1.default.prefixCls}-resizable-dragger`;
|
|
8
|
+
const DRAGGER_SELECTOR = '.snack-rc-drawer-resizable-dragger';
|
|
13
9
|
function useDrawerResize({ position, resizable: resizableProp }) {
|
|
14
10
|
const targetRef = (0, react_1.useRef)(null);
|
|
15
11
|
const targetRefCallbackRef = (0, react_1.useRef)();
|