@sia.soul/sia-react-ui 0.1.46 → 0.1.47
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/dist/index.cjs +3 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5915,6 +5915,7 @@ var DrawerRoot = (0, import_react28.forwardRef)(function Drawer({
|
|
|
5915
5915
|
...props
|
|
5916
5916
|
}, forwardedRef) {
|
|
5917
5917
|
const localRef = (0, import_react28.useRef)(null);
|
|
5918
|
+
const bodyRef = (0, import_react28.useRef)(null);
|
|
5918
5919
|
const titleId = (0, import_react28.useId)();
|
|
5919
5920
|
const drawerId = (0, import_react28.useId)();
|
|
5920
5921
|
const parentStack = (0, import_react28.useContext)(DrawerStackContext);
|
|
@@ -6008,7 +6009,8 @@ var DrawerRoot = (0, import_react28.forwardRef)(function Drawer({
|
|
|
6008
6009
|
] }),
|
|
6009
6010
|
extra ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "sia-drawer__extra", children: extra }) : null
|
|
6010
6011
|
] }),
|
|
6011
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "sia-drawer__body", children }),
|
|
6012
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref: bodyRef, className: "sia-drawer__body", children }),
|
|
6013
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FloatingScrollbarProvider, { targetRef: bodyRef }),
|
|
6012
6014
|
footer ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "sia-drawer__footer", children: footer }) : null
|
|
6013
6015
|
]
|
|
6014
6016
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -585,7 +585,7 @@ interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
|
585
585
|
open: boolean;
|
|
586
586
|
/** 标题内容,可传入文本或 React 节点。 */
|
|
587
587
|
title?: ReactNode;
|
|
588
|
-
/**
|
|
588
|
+
/** 抽屉主体内容;溢出时默认使用不占布局空间的浮动滚动条,标题及底部操作区保持固定。 */
|
|
589
589
|
children?: ReactNode;
|
|
590
590
|
/** 主体之外的补充内容或操作区。 */
|
|
591
591
|
extra?: ReactNode;
|
|
@@ -640,7 +640,7 @@ interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
|
640
640
|
interface DrawerOpenConfig extends Omit<DrawerProps, "open"> {
|
|
641
641
|
}
|
|
642
642
|
declare function openDrawer(config: DrawerOpenConfig): OverlayApiHandle<DrawerOpenConfig>;
|
|
643
|
-
/**
|
|
643
|
+
/** 从屏幕边缘展开的抽屉;主体默认使用浮动滚动条,支持四个方向、嵌套推移及静态 API 调用。 */
|
|
644
644
|
declare const Drawer: react.ForwardRefExoticComponent<DrawerProps & react.RefAttributes<HTMLDivElement>> & {
|
|
645
645
|
/** 直接打开实例,返回可用于更新或关闭的操作句柄。 */
|
|
646
646
|
open: typeof openDrawer;
|
package/dist/index.d.ts
CHANGED
|
@@ -585,7 +585,7 @@ interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
|
585
585
|
open: boolean;
|
|
586
586
|
/** 标题内容,可传入文本或 React 节点。 */
|
|
587
587
|
title?: ReactNode;
|
|
588
|
-
/**
|
|
588
|
+
/** 抽屉主体内容;溢出时默认使用不占布局空间的浮动滚动条,标题及底部操作区保持固定。 */
|
|
589
589
|
children?: ReactNode;
|
|
590
590
|
/** 主体之外的补充内容或操作区。 */
|
|
591
591
|
extra?: ReactNode;
|
|
@@ -640,7 +640,7 @@ interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
|
640
640
|
interface DrawerOpenConfig extends Omit<DrawerProps, "open"> {
|
|
641
641
|
}
|
|
642
642
|
declare function openDrawer(config: DrawerOpenConfig): OverlayApiHandle<DrawerOpenConfig>;
|
|
643
|
-
/**
|
|
643
|
+
/** 从屏幕边缘展开的抽屉;主体默认使用浮动滚动条,支持四个方向、嵌套推移及静态 API 调用。 */
|
|
644
644
|
declare const Drawer: react.ForwardRefExoticComponent<DrawerProps & react.RefAttributes<HTMLDivElement>> & {
|
|
645
645
|
/** 直接打开实例,返回可用于更新或关闭的操作句柄。 */
|
|
646
646
|
open: typeof openDrawer;
|
package/dist/index.js
CHANGED
|
@@ -1245,6 +1245,7 @@ var DrawerRoot = forwardRef(function Drawer({
|
|
|
1245
1245
|
...props
|
|
1246
1246
|
}, forwardedRef) {
|
|
1247
1247
|
const localRef = useRef4(null);
|
|
1248
|
+
const bodyRef = useRef4(null);
|
|
1248
1249
|
const titleId = useId2();
|
|
1249
1250
|
const drawerId = useId2();
|
|
1250
1251
|
const parentStack = useContext(DrawerStackContext);
|
|
@@ -1338,7 +1339,8 @@ var DrawerRoot = forwardRef(function Drawer({
|
|
|
1338
1339
|
] }),
|
|
1339
1340
|
extra ? /* @__PURE__ */ jsx8("div", { className: "sia-drawer__extra", children: extra }) : null
|
|
1340
1341
|
] }),
|
|
1341
|
-
/* @__PURE__ */ jsx8("div", { className: "sia-drawer__body", children }),
|
|
1342
|
+
/* @__PURE__ */ jsx8("div", { ref: bodyRef, className: "sia-drawer__body", children }),
|
|
1343
|
+
/* @__PURE__ */ jsx8(FloatingScrollbarProvider, { targetRef: bodyRef }),
|
|
1342
1344
|
footer ? /* @__PURE__ */ jsx8("div", { className: "sia-drawer__footer", children: footer }) : null
|
|
1343
1345
|
]
|
|
1344
1346
|
}
|