dishui 0.0.82 → 0.0.83
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/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/ButtonMenu/index.d.ts +28 -0
- package/dist/components/ButtonMenu/index.js +197 -0
- package/dist/components/ButtonMenu/index.js.map +1 -0
- package/dist/components/Demo/index.d.ts +5 -0
- package/dist/components/Demo/index.js +131 -56
- package/dist/components/Demo/index.js.map +1 -1
- package/dist/components/Demo/source.d.ts +9 -0
- package/dist/components/Demo/source.js +32 -0
- package/dist/components/Demo/source.js.map +1 -0
- package/dist/components/Field/index.d.ts +8 -0
- package/dist/components/Field/index.js +43 -0
- package/dist/components/Field/index.js.map +1 -0
- package/dist/components/LayoutSuite/DashboardSuite.d.ts +35 -0
- package/dist/components/LayoutSuite/DashboardSuite.js +61 -0
- package/dist/components/LayoutSuite/DashboardSuite.js.map +1 -0
- package/dist/components/LayoutSuite/index.d.ts +56 -0
- package/dist/components/LayoutSuite/index.js +101 -0
- package/dist/components/LayoutSuite/index.js.map +1 -0
- package/dist/components/Modal/focusScope.d.ts +1 -0
- package/dist/components/Modal/focusScope.js +81 -0
- package/dist/components/Modal/focusScope.js.map +1 -0
- package/dist/components/Modal/index.d.ts +4 -1
- package/dist/components/Modal/index.js +48 -43
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Page/Float.d.ts +14 -0
- package/dist/components/Page/Float2.js +154 -0
- package/dist/components/Page/Float2.js.map +1 -0
- package/dist/components/Page/index.d.ts +18 -5
- package/dist/components/Page/index.js +103 -34
- package/dist/components/Page/index.js.map +1 -1
- package/dist/components/Page/resize.d.ts +28 -0
- package/dist/components/Page/resize2.js +95 -0
- package/dist/components/Page/resize2.js.map +1 -0
- package/dist/components/PageHeader/index.d.ts +10 -3
- package/dist/components/PageHeader/index.js +46 -25
- package/dist/components/PageHeader/index.js.map +1 -1
- package/dist/components/PagePanel/index.d.ts +29 -0
- package/dist/components/PagePanel/index.js +99 -0
- package/dist/components/PagePanel/index.js.map +1 -0
- package/dist/components/Resizable/ResizeGrip.d.ts +5 -0
- package/dist/components/Resizable/ResizeGrip.js +14 -0
- package/dist/components/Resizable/ResizeGrip.js.map +1 -0
- package/dist/components/Resizable/index.js +57 -59
- package/dist/components/Resizable/index.js.map +1 -1
- package/dist/components/Resizable/useResize.d.ts +6 -0
- package/dist/components/Resizable/useResize.js +29 -28
- package/dist/components/Resizable/useResize.js.map +1 -1
- package/dist/components/SidebarToggleButton/index.d.ts +5 -3
- package/dist/components/SidebarToggleButton/index.js +24 -21
- package/dist/components/SidebarToggleButton/index.js.map +1 -1
- package/dist/components/Table/index.d.ts +10 -12
- package/dist/components/Table/index.js +25 -20
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/components/Text/index.js +11 -10
- package/dist/components/Text/index.js.map +1 -1
- package/dist/components/Textarea/index.d.ts +14 -0
- package/dist/components/Textarea/index.js +44 -0
- package/dist/components/Textarea/index.js.map +1 -0
- package/dist/components/Tree/Tree.d.ts +2 -0
- package/dist/components/Tree/Tree.js +49 -40
- package/dist/components/Tree/Tree.js.map +1 -1
- package/dist/dishui.css +1 -1
- package/dist/index-nostyled.d.ts +9 -0
- package/dist/index.d.ts +11 -2
- package/dist/index.js +119 -113
- package/dist/layouts/Sidebar.d.ts +12 -1
- package/dist/layouts/Sidebar.js +121 -97
- package/dist/layouts/Sidebar.js.map +1 -1
- package/dist/lite.d.ts +10 -2
- package/dist/lite.js +17 -12
- package/dist/utils/menu.js +14 -16
- package/dist/utils/menu.js.map +1 -1
- package/package.json +3 -1
|
@@ -1,65 +1,70 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { mountFocusScope as e } from "./focusScope.js";
|
|
2
|
+
import { useId as t, useLayoutEffect as n, useRef as r } from "react";
|
|
3
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
+
import { createPortal as o } from "react-dom";
|
|
3
5
|
//#region src/components/Modal/index.tsx
|
|
4
|
-
var
|
|
6
|
+
var s = {
|
|
5
7
|
sm: "max-w-sm",
|
|
6
8
|
md: "max-w-lg",
|
|
7
9
|
lg: "max-w-2xl",
|
|
8
10
|
xl: "max-w-5xl",
|
|
9
11
|
full: "max-w-[95vw]"
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, [a, o]), !a) return null;
|
|
22
|
-
let _ = f !== void 0, v = {
|
|
23
|
-
width: _ ? i(f) : void 0,
|
|
24
|
-
maxWidth: _ ? "95vw" : void 0,
|
|
25
|
-
height: i(p),
|
|
12
|
+
}, c = (e) => typeof e == "number" ? `${e}px` : e, l = ({ open: l, onClose: u, title: d, description: f, children: p, footer: m, size: h = "md", width: g, height: _, closeOnOverlay: v = !0, showClose: y = !0, className: b = "", "aria-label": x, "aria-labelledby": S, "aria-describedby": C }) => {
|
|
13
|
+
let w = t(), T = t(), E = r(null), D = r(null), O = r(null), k = r(!1), A = r(u);
|
|
14
|
+
if (l && !k.current && typeof document < "u" && (O.current = document.activeElement), k.current = l, n(() => {
|
|
15
|
+
A.current = u;
|
|
16
|
+
}), n(() => {
|
|
17
|
+
if (l && E.current && D.current) return e(E.current, D.current, O.current, () => A.current());
|
|
18
|
+
}, [l]), !l || typeof document > "u") return null;
|
|
19
|
+
let j = g !== void 0, M = {
|
|
20
|
+
width: j ? c(g) : void 0,
|
|
21
|
+
maxWidth: j ? "95vw" : void 0,
|
|
22
|
+
height: c(_),
|
|
26
23
|
maxHeight: "92vh"
|
|
27
|
-
},
|
|
28
|
-
return /* @__PURE__ */
|
|
24
|
+
}, N = j ? "" : s[h], P = _ === void 0 ? "max-h-[70vh] overflow-y-auto px-5 py-4" : "min-h-0 flex-1 overflow-y-auto px-5 py-4";
|
|
25
|
+
return o(/* @__PURE__ */ a("div", {
|
|
26
|
+
ref: D,
|
|
29
27
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
30
|
-
children: [/* @__PURE__ */
|
|
28
|
+
children: [/* @__PURE__ */ i("div", {
|
|
31
29
|
className: "absolute inset-0",
|
|
32
|
-
onClick:
|
|
30
|
+
onClick: v ? u : void 0,
|
|
33
31
|
"aria-hidden": !0
|
|
34
|
-
}), /* @__PURE__ */
|
|
32
|
+
}), /* @__PURE__ */ a("div", {
|
|
33
|
+
ref: E,
|
|
35
34
|
role: "dialog",
|
|
35
|
+
tabIndex: -1,
|
|
36
36
|
"aria-modal": "true",
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
"aria-label": x,
|
|
38
|
+
"aria-labelledby": S ?? (d && !x ? w : void 0),
|
|
39
|
+
"aria-describedby": C ?? (f ? T : void 0),
|
|
40
|
+
className: `dishui-modal card relative flex w-full min-w-0 flex-col rounded-xl border border-base-300 bg-base-100 text-body leading-5 text-base-content shadow-md ${N} ${b}`.trim(),
|
|
41
|
+
style: M,
|
|
39
42
|
children: [
|
|
40
|
-
(
|
|
43
|
+
(d || f || y) && /* @__PURE__ */ a("div", {
|
|
41
44
|
className: "flex shrink-0 items-start justify-between gap-3 border-b border-base-300 px-5 py-3",
|
|
42
|
-
children: [/* @__PURE__ */
|
|
45
|
+
children: [/* @__PURE__ */ a("div", {
|
|
43
46
|
className: "min-w-0",
|
|
44
|
-
children: [
|
|
47
|
+
children: [d && /* @__PURE__ */ i("h3", {
|
|
48
|
+
id: w,
|
|
45
49
|
className: "break-words text-body font-semibold text-base-content",
|
|
46
|
-
children:
|
|
47
|
-
}),
|
|
50
|
+
children: d
|
|
51
|
+
}), f && /* @__PURE__ */ i("p", {
|
|
52
|
+
id: T,
|
|
48
53
|
className: "mt-1 text-body-sm leading-5 text-base-content/70",
|
|
49
|
-
children:
|
|
54
|
+
children: f
|
|
50
55
|
})]
|
|
51
|
-
}),
|
|
56
|
+
}), y && /* @__PURE__ */ i("button", {
|
|
52
57
|
type: "button",
|
|
53
|
-
onClick:
|
|
58
|
+
onClick: u,
|
|
54
59
|
"aria-label": "Close",
|
|
55
60
|
className: "shrink-0 rounded-md p-1 text-base-content/70 transition-colors duration-150 motion-reduce:transition-none hover:bg-base-200 hover:text-base-content focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-current",
|
|
56
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ i("svg", {
|
|
57
62
|
className: "h-4 w-4",
|
|
58
63
|
fill: "none",
|
|
59
64
|
viewBox: "0 0 24 24",
|
|
60
65
|
stroke: "currentColor",
|
|
61
66
|
strokeWidth: 2,
|
|
62
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ i("path", {
|
|
63
68
|
strokeLinecap: "round",
|
|
64
69
|
strokeLinejoin: "round",
|
|
65
70
|
d: "M6 18L18 6M6 6l12 12"
|
|
@@ -67,19 +72,19 @@ var r = {
|
|
|
67
72
|
})
|
|
68
73
|
})]
|
|
69
74
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
className:
|
|
72
|
-
children:
|
|
75
|
+
/* @__PURE__ */ i("div", {
|
|
76
|
+
className: P,
|
|
77
|
+
children: p
|
|
73
78
|
}),
|
|
74
|
-
|
|
79
|
+
m && /* @__PURE__ */ i("div", {
|
|
75
80
|
className: "flex shrink-0 flex-wrap justify-end gap-2 border-t border-base-300 px-5 py-3",
|
|
76
|
-
children:
|
|
81
|
+
children: m
|
|
77
82
|
})
|
|
78
83
|
]
|
|
79
84
|
})]
|
|
80
|
-
});
|
|
85
|
+
}), document.body);
|
|
81
86
|
};
|
|
82
87
|
//#endregion
|
|
83
|
-
export {
|
|
88
|
+
export { l as default };
|
|
84
89
|
|
|
85
90
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Modal/index.tsx"],"sourcesContent":["import React, {
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Modal/index.tsx"],"sourcesContent":["import React, { useId, useLayoutEffect, useRef } from 'react';\nimport { createPortal } from 'react-dom';\nimport { mountFocusScope } from './focusScope';\n\nexport type ModalProps = {\n /** 是否打开 */\n open: boolean;\n /** 关闭回调(遮罩点击 / Esc / 关闭按钮触发) */\n onClose: () => void;\n /** 标题 */\n title?: React.ReactNode;\n /** 标题下的说明文字 */\n description?: React.ReactNode;\n /** 正文内容 */\n children?: React.ReactNode;\n /** 底部操作区(默认右对齐) */\n footer?: React.ReactNode;\n /** 尺寸(预设):sm / md / lg / xl / full */\n size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';\n /** 自定义宽度:支持百分比/像素等 CSS 长度(如 \"80%\"、640)。优先于 size。 */\n width?: number | string;\n /** 自定义高度:支持百分比/像素等 CSS 长度(如 \"80%\"、480)。 */\n height?: number | string;\n /** 点击遮罩是否关闭(默认 true) */\n closeOnOverlay?: boolean;\n /** 是否显示右上角关闭按钮(默认 true) */\n showClose?: boolean;\n className?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n};\n\nconst SIZE_CLASS: Record<NonNullable<ModalProps['size']>, string> = {\n sm: 'max-w-sm',\n md: 'max-w-lg',\n lg: 'max-w-2xl',\n xl: 'max-w-5xl',\n full: 'max-w-[95vw]',\n};\n\nconst toCssSize = (value: number | string | undefined): string | undefined =>\n typeof value === 'number' ? `${value}px` : value;\n\n/**\n * 轻量模态框:遮罩 + 居中面板,支持 Esc 关闭、遮罩点击关闭与滚动锁定。\n */\nconst Modal = ({\n open,\n onClose,\n title,\n description,\n children,\n footer,\n size = 'md',\n width,\n height,\n closeOnOverlay = true,\n showClose = true,\n className = '',\n 'aria-label': ariaLabel,\n 'aria-labelledby': labelledBy,\n 'aria-describedby': describedBy,\n}: ModalProps) => {\n const titleId = useId();\n const descriptionId = useId();\n const panel = useRef<HTMLDivElement>(null);\n const overlay = useRef<HTMLDivElement>(null);\n const trigger = useRef<HTMLElement | null>(null);\n const wasOpen = useRef(false);\n const close = useRef(onClose);\n // Capture before React commits autoFocus inside the newly opened portal.\n if (open && !wasOpen.current && typeof document !== 'undefined') trigger.current = document.activeElement as HTMLElement | null;\n wasOpen.current = open;\n useLayoutEffect(() => { close.current = onClose; });\n useLayoutEffect(() => {\n if (!open || !panel.current || !overlay.current) return;\n return mountFocusScope(panel.current, overlay.current, trigger.current, () => close.current());\n }, [open]);\n\n if (!open || typeof document === 'undefined') return null;\n\n // 自定义宽高:传入时优先于 size 预设;支持百分比。\n const hasCustomWidth = width !== undefined;\n const panelStyle: React.CSSProperties = {\n width: hasCustomWidth ? toCssSize(width) : undefined,\n maxWidth: hasCustomWidth ? '95vw' : undefined,\n height: toCssSize(height),\n maxHeight: '92vh',\n };\n // 面板尺寸类:未自定义宽度时才应用 max-w-* 预设。\n const sizeClass = hasCustomWidth ? '' : SIZE_CLASS[size];\n // 正文区:固定高度时自适应充满并内部滚动;否则限制最大高度。\n const bodyClass = height !== undefined\n ? 'min-h-0 flex-1 overflow-y-auto px-5 py-4'\n : 'max-h-[70vh] overflow-y-auto px-5 py-4';\n\n return createPortal(\n <div ref={overlay} className=\"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4\">\n <div\n className=\"absolute inset-0\"\n onClick={closeOnOverlay ? onClose : undefined}\n aria-hidden\n />\n <div\n ref={panel}\n role=\"dialog\"\n tabIndex={-1}\n aria-modal=\"true\"\n aria-label={ariaLabel}\n aria-labelledby={labelledBy ?? (title && !ariaLabel ? titleId : undefined)}\n aria-describedby={describedBy ?? (description ? descriptionId : undefined)}\n className={`dishui-modal card relative flex w-full min-w-0 flex-col rounded-xl border border-base-300 bg-base-100 text-body leading-5 text-base-content shadow-md ${sizeClass} ${className}`.trim()}\n style={panelStyle}\n >\n {(title || description || showClose) && (\n <div className=\"flex shrink-0 items-start justify-between gap-3 border-b border-base-300 px-5 py-3\">\n <div className=\"min-w-0\">\n {title && (\n <h3 id={titleId} className=\"break-words text-body font-semibold text-base-content\">\n {title}\n </h3>\n )}\n {description && (\n <p id={descriptionId} className=\"mt-1 text-body-sm leading-5 text-base-content/70\">{description}</p>\n )}\n </div>\n {showClose && (\n <button\n type=\"button\"\n onClick={onClose}\n aria-label=\"Close\"\n className=\"shrink-0 rounded-md p-1 text-base-content/70 transition-colors duration-150 motion-reduce:transition-none hover:bg-base-200 hover:text-base-content focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-current\"\n >\n <svg\n className=\"h-4 w-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={2}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n )}\n </div>\n )}\n <div className={bodyClass}>{children}</div>\n {footer && (\n <div className=\"flex shrink-0 flex-wrap justify-end gap-2 border-t border-base-300 px-5 py-3\">\n {footer}\n </div>\n )}\n </div>\n </div>,\n document.body,\n );\n};\n\nexport default Modal;\n"],"mappings":";;;;;AAiCA,IAAM,IAA8D;CAChE,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,MAAM;AACV,GAEM,KAAa,MACf,OAAO,KAAU,WAAW,GAAG,EAAM,MAAM,GAKzC,KAAS,EACX,SACA,YACA,UACA,gBACA,aACA,WACA,UAAO,MACP,UACA,WACA,oBAAiB,IACjB,eAAY,IACZ,eAAY,IACZ,cAAc,GACd,mBAAmB,GACnB,oBAAoB,QACN;CACd,IAAM,IAAU,EAAM,GAChB,IAAgB,EAAM,GACtB,IAAQ,EAAuB,IAAI,GACnC,IAAU,EAAuB,IAAI,GACrC,IAAU,EAA2B,IAAI,GACzC,IAAU,EAAO,EAAK,GACtB,IAAQ,EAAO,CAAO;CAU5B,IARI,KAAQ,CAAC,EAAQ,WAAW,OAAO,WAAa,QAA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AU;MAEV,UAAA,kBAAC,OAAD;OACI,WAAU;OACV,MAAK;OACL,SAAQ;OACR,QAAO;OACP,aAAa;OAEb,UAAA,kBAAC,QAAD;QACI,eAAc;QACd,gBAAe;QACf,GAAE;OACL,CAAA;MACA,CAAA;KACD,CAAA,CAEX;;IAET,kBAAC,OAAD;KAAK,WAAW;KAAY;IAAc,CAAA;IACzC,KACG,kBAAC,OAAD;KAAK,WAAU;KACV,UAAA;IACA,CAAA;GAER;EACJ,CAAA,CAAA;CACL,CAAA,GAAA,SAAS,IACb;AACJ"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type PageFloatProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
title?: string;
|
|
4
|
+
collapsed?: boolean;
|
|
5
|
+
defaultCollapsed?: boolean;
|
|
6
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
7
|
+
defaultPosition?: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
draggable?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/** Coordinates are relative to the containing Page; dragging is confined to it. */
|
|
14
|
+
export default function PageFloat({ title, collapsed, defaultCollapsed, onCollapsedChange, defaultPosition, draggable, className, style, children, ...rest }: PageFloatProps): React.JSX.Element;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { cn as e } from "../../utils/cn.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
|
|
4
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/Page/Float.tsx
|
|
6
|
+
function c({ title: c = "Float", collapsed: l, defaultCollapsed: u = !1, onCollapsedChange: d, defaultPosition: f = {
|
|
7
|
+
x: 16,
|
|
8
|
+
y: 16
|
|
9
|
+
}, draggable: p = !0, className: m, style: h, children: g, ..._ }) {
|
|
10
|
+
let [v, y] = i(u), b = l ?? v, [x, S] = i(f), C = r(null), w = r(null), T = r(null), E = r(!1), D = t((e) => {
|
|
11
|
+
let t = C.current, n = t?.offsetParent;
|
|
12
|
+
return !t || !n ? e : {
|
|
13
|
+
x: Math.max(0, Math.min(e.x, n.clientWidth - t.offsetWidth)),
|
|
14
|
+
y: Math.max(0, Math.min(e.y, n.clientHeight - t.offsetHeight))
|
|
15
|
+
};
|
|
16
|
+
}, []);
|
|
17
|
+
n(() => {
|
|
18
|
+
let e = () => S((e) => {
|
|
19
|
+
let t = D(e);
|
|
20
|
+
return t.x === e.x && t.y === e.y ? e : t;
|
|
21
|
+
});
|
|
22
|
+
e();
|
|
23
|
+
let t = new ResizeObserver(e);
|
|
24
|
+
return C.current && t.observe(C.current), C.current?.offsetParent && t.observe(C.current.offsetParent), () => t.disconnect();
|
|
25
|
+
}, [D, b]);
|
|
26
|
+
let O = () => {
|
|
27
|
+
y(!b), d?.(!b), w.current?.focus();
|
|
28
|
+
}, k = {
|
|
29
|
+
onPointerDown: (e) => {
|
|
30
|
+
E.current = !1, p && e.button === 0 && (T.current = {
|
|
31
|
+
id: e.pointerId,
|
|
32
|
+
x: e.clientX,
|
|
33
|
+
y: e.clientY,
|
|
34
|
+
origin: x,
|
|
35
|
+
moved: !1
|
|
36
|
+
}, e.currentTarget.setPointerCapture(e.pointerId));
|
|
37
|
+
},
|
|
38
|
+
onPointerMove: (e) => {
|
|
39
|
+
let t = T.current;
|
|
40
|
+
if (!t || t.id !== e.pointerId) return;
|
|
41
|
+
let n = e.clientX - t.x, r = e.clientY - t.y;
|
|
42
|
+
Math.abs(n) + Math.abs(r) > 4 && (t.moved = !0), t.moved && S(D({
|
|
43
|
+
x: t.origin.x + n,
|
|
44
|
+
y: t.origin.y + r
|
|
45
|
+
}));
|
|
46
|
+
},
|
|
47
|
+
onPointerUp: (e) => {
|
|
48
|
+
E.current = T.current?.moved ?? !1, T.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId);
|
|
49
|
+
},
|
|
50
|
+
onPointerCancel: () => {
|
|
51
|
+
T.current = null;
|
|
52
|
+
},
|
|
53
|
+
onLostPointerCapture: () => {
|
|
54
|
+
T.current = null;
|
|
55
|
+
},
|
|
56
|
+
onKeyDown: (e) => {
|
|
57
|
+
if (!p) return;
|
|
58
|
+
let t = e.shiftKey ? 32 : 8, n = {
|
|
59
|
+
ArrowLeft: [-t, 0],
|
|
60
|
+
ArrowRight: [t, 0],
|
|
61
|
+
ArrowUp: [0, -t],
|
|
62
|
+
ArrowDown: [0, t]
|
|
63
|
+
}[e.key];
|
|
64
|
+
n && (e.preventDefault(), S((e) => D({
|
|
65
|
+
x: e.x + n[0],
|
|
66
|
+
y: e.y + n[1]
|
|
67
|
+
})));
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
return /* @__PURE__ */ s("div", {
|
|
71
|
+
..._,
|
|
72
|
+
ref: C,
|
|
73
|
+
className: e("dishui-page-float absolute z-30 overflow-hidden border border-base-300 bg-base-100 text-base-content shadow-sm", b ? "rounded-full" : "rounded-lg", m),
|
|
74
|
+
"data-collapsed": b,
|
|
75
|
+
style: {
|
|
76
|
+
width: 288,
|
|
77
|
+
maxWidth: "100%",
|
|
78
|
+
maxHeight: "100%",
|
|
79
|
+
...h,
|
|
80
|
+
...b ? {
|
|
81
|
+
boxSizing: "border-box",
|
|
82
|
+
width: 48,
|
|
83
|
+
height: 48,
|
|
84
|
+
minWidth: 48,
|
|
85
|
+
minHeight: 48,
|
|
86
|
+
maxWidth: 48,
|
|
87
|
+
maxHeight: 48,
|
|
88
|
+
padding: 0,
|
|
89
|
+
borderRadius: "50%"
|
|
90
|
+
} : {},
|
|
91
|
+
left: x.x,
|
|
92
|
+
top: x.y
|
|
93
|
+
},
|
|
94
|
+
children: [/* @__PURE__ */ s("div", {
|
|
95
|
+
className: e("flex items-center border-base-300", b && "h-full w-full"),
|
|
96
|
+
children: [!b && /* @__PURE__ */ o("button", {
|
|
97
|
+
type: "button",
|
|
98
|
+
...k,
|
|
99
|
+
onClick: () => {
|
|
100
|
+
E.current = !1;
|
|
101
|
+
},
|
|
102
|
+
"aria-label": `${c}: move with arrow keys`,
|
|
103
|
+
className: "min-w-0 flex-1 truncate px-3 py-2 text-left text-sm font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary",
|
|
104
|
+
style: {
|
|
105
|
+
touchAction: p ? "none" : void 0,
|
|
106
|
+
cursor: p ? "grab" : void 0
|
|
107
|
+
},
|
|
108
|
+
children: c
|
|
109
|
+
}), /* @__PURE__ */ o("button", {
|
|
110
|
+
ref: w,
|
|
111
|
+
type: "button",
|
|
112
|
+
...b ? k : {},
|
|
113
|
+
"aria-label": `${b ? "Expand" : "Collapse"} ${c}`,
|
|
114
|
+
"aria-expanded": !b,
|
|
115
|
+
title: `${b ? "Expand" : "Collapse"} ${c}`,
|
|
116
|
+
className: e("dishui-page-float-toggle flex shrink-0 items-center justify-center focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary", b ? "h-full w-full rounded-full" : "h-9 w-9 rounded-md"),
|
|
117
|
+
style: {
|
|
118
|
+
touchAction: b && p ? "none" : void 0,
|
|
119
|
+
cursor: b && p ? "grab" : "pointer"
|
|
120
|
+
},
|
|
121
|
+
onClick: () => {
|
|
122
|
+
E.current || O(), E.current = !1;
|
|
123
|
+
},
|
|
124
|
+
children: /* @__PURE__ */ o("svg", {
|
|
125
|
+
"aria-hidden": "true",
|
|
126
|
+
width: "20",
|
|
127
|
+
height: "20",
|
|
128
|
+
viewBox: "0 0 24 24",
|
|
129
|
+
fill: "none",
|
|
130
|
+
stroke: "currentColor",
|
|
131
|
+
strokeWidth: "1.75",
|
|
132
|
+
strokeLinecap: "round",
|
|
133
|
+
strokeLinejoin: "round",
|
|
134
|
+
children: b ? /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("rect", {
|
|
135
|
+
x: "4",
|
|
136
|
+
y: "4",
|
|
137
|
+
width: "16",
|
|
138
|
+
height: "16",
|
|
139
|
+
rx: "3"
|
|
140
|
+
}), /* @__PURE__ */ o("path", { d: "M4 10h16M9 4v6" })] }) : /* @__PURE__ */ o("path", { d: "M6 12h12" })
|
|
141
|
+
})
|
|
142
|
+
})]
|
|
143
|
+
}), /* @__PURE__ */ o("div", {
|
|
144
|
+
hidden: b,
|
|
145
|
+
className: "overflow-auto border-t border-base-300 p-3 text-sm",
|
|
146
|
+
style: { maxHeight: "min(60vh, 360px)" },
|
|
147
|
+
children: g
|
|
148
|
+
})]
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
//#endregion
|
|
152
|
+
export { c as default };
|
|
153
|
+
|
|
154
|
+
//# sourceMappingURL=Float2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Float2.js","names":[],"sources":["../../../src/components/Page/Float.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { cn } from '../../utils/cn';\nimport './Float.css';\n\nexport type PageFloatProps = React.HTMLAttributes<HTMLDivElement> & {\n title?: string;\n collapsed?: boolean;\n defaultCollapsed?: boolean;\n onCollapsedChange?: (collapsed: boolean) => void;\n defaultPosition?: { x: number; y: number };\n draggable?: boolean;\n};\n\n/** Coordinates are relative to the containing Page; dragging is confined to it. */\nexport default function PageFloat({\n title = 'Float', collapsed, defaultCollapsed = false, onCollapsedChange,\n defaultPosition = { x: 16, y: 16 }, draggable = true,\n className, style, children, ...rest\n}: PageFloatProps) {\n const [internalCollapsed, setInternalCollapsed] = useState(defaultCollapsed);\n const isCollapsed = collapsed ?? internalCollapsed;\n const [position, setPosition] = useState(defaultPosition);\n const root = useRef<HTMLDivElement>(null);\n const toggle = useRef<HTMLButtonElement>(null);\n const drag = useRef<{ id: number; x: number; y: number; origin: typeof position; moved: boolean } | null>(null);\n const suppressClick = useRef(false);\n const clamp = useCallback((next: typeof position) => {\n const element = root.current;\n const parent = element?.offsetParent as HTMLElement | null;\n if (!element || !parent) return next;\n return {\n x: Math.max(0, Math.min(next.x, parent.clientWidth - element.offsetWidth)),\n y: Math.max(0, Math.min(next.y, parent.clientHeight - element.offsetHeight)),\n };\n }, []);\n useEffect(() => {\n const update = () => setPosition(current => {\n const next = clamp(current);\n return next.x === current.x && next.y === current.y ? current : next;\n });\n update();\n const observer = new ResizeObserver(update);\n if (root.current) observer.observe(root.current);\n if (root.current?.offsetParent) observer.observe(root.current.offsetParent);\n return () => observer.disconnect();\n }, [clamp, isCollapsed]);\n const changeCollapsed = () => {\n setInternalCollapsed(!isCollapsed);\n onCollapsedChange?.(!isCollapsed);\n toggle.current?.focus();\n };\n const dragEvents = {\n onPointerDown: (event: React.PointerEvent<HTMLButtonElement>) => {\n suppressClick.current = false;\n if (!draggable || event.button !== 0) return;\n drag.current = { id: event.pointerId, x: event.clientX, y: event.clientY, origin: position, moved: false };\n event.currentTarget.setPointerCapture(event.pointerId);\n },\n onPointerMove: (event: React.PointerEvent<HTMLButtonElement>) => {\n const current = drag.current;\n if (!current || current.id !== event.pointerId) return;\n const dx = event.clientX - current.x;\n const dy = event.clientY - current.y;\n if (Math.abs(dx) + Math.abs(dy) > 4) current.moved = true;\n if (current.moved) setPosition(clamp({ x: current.origin.x + dx, y: current.origin.y + dy }));\n },\n onPointerUp: (event: React.PointerEvent<HTMLButtonElement>) => {\n suppressClick.current = drag.current?.moved ?? false;\n drag.current = null;\n if (event.currentTarget.hasPointerCapture(event.pointerId)) event.currentTarget.releasePointerCapture(event.pointerId);\n },\n onPointerCancel: () => { drag.current = null; },\n onLostPointerCapture: () => { drag.current = null; },\n onKeyDown: (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (!draggable) return;\n const delta = event.shiftKey ? 32 : 8;\n const offsets: Record<string, [number, number]> = { ArrowLeft: [-delta, 0], ArrowRight: [delta, 0], ArrowUp: [0, -delta], ArrowDown: [0, delta] };\n const offset = offsets[event.key];\n if (!offset) return;\n event.preventDefault();\n setPosition(current => clamp({ x: current.x + offset[0], y: current.y + offset[1] }));\n },\n };\n return (\n <div {...rest} ref={root} className={cn('dishui-page-float absolute z-30 overflow-hidden border border-base-300 bg-base-100 text-base-content shadow-sm', isCollapsed ? 'rounded-full' : 'rounded-lg', className)}\n data-collapsed={isCollapsed}\n style={{ width: 288, maxWidth: '100%', maxHeight: '100%', ...style,\n ...(isCollapsed ? { boxSizing: 'border-box', width: 48, height: 48, minWidth: 48, minHeight: 48, maxWidth: 48, maxHeight: 48, padding: 0, borderRadius: '50%' } as React.CSSProperties : {}),\n left: position.x, top: position.y }}>\n <div className={cn('flex items-center border-base-300', isCollapsed && 'h-full w-full')}>\n {!isCollapsed && <button type=\"button\" {...dragEvents} onClick={() => { suppressClick.current = false; }} aria-label={`${title}: move with arrow keys`} className=\"min-w-0 flex-1 truncate px-3 py-2 text-left text-sm font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary\" style={{ touchAction: draggable ? 'none' : undefined, cursor: draggable ? 'grab' : undefined }}>{title}</button>}\n <button ref={toggle} type=\"button\" {...(isCollapsed ? dragEvents : {})} aria-label={`${isCollapsed ? 'Expand' : 'Collapse'} ${title}`} aria-expanded={!isCollapsed}\n title={`${isCollapsed ? 'Expand' : 'Collapse'} ${title}`}\n className={cn('dishui-page-float-toggle flex shrink-0 items-center justify-center focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary', isCollapsed ? 'h-full w-full rounded-full' : 'h-9 w-9 rounded-md')}\n style={{ touchAction: isCollapsed && draggable ? 'none' : undefined, cursor: isCollapsed && draggable ? 'grab' : 'pointer' }}\n onClick={() => { if (!suppressClick.current) changeCollapsed(); suppressClick.current = false; }}>\n <svg aria-hidden=\"true\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n {isCollapsed ? <><rect x=\"4\" y=\"4\" width=\"16\" height=\"16\" rx=\"3\" /><path d=\"M4 10h16M9 4v6\" /></> : <path d=\"M6 12h12\" />}\n </svg>\n </button>\n </div>\n <div hidden={isCollapsed} className=\"overflow-auto border-t border-base-300 p-3 text-sm\" style={{ maxHeight: 'min(60vh, 360px)' }}>{children}</div>\n </div>\n );\n}\n"],"mappings":";;;;;AAcA,SAAwB,EAAU,EAC9B,WAAQ,SAAS,cAAW,sBAAmB,IAAO,sBACtD,qBAAkB;CAAE,GAAG;CAAI,GAAG;AAAG,GAAG,eAAY,IAChD,cAAW,UAAO,aAAU,GAAG,KAChB;CACf,IAAM,CAAC,GAAmB,KAAwB,EAAS,CAAgB,GACrE,IAAc,KAAa,GAC3B,CAAC,GAAU,KAAe,EAAS,CAAe,GAClD,IAAO,EAAuB,IAAI,GAClC,IAAS,EAA0B,IAAI,GACvC,IAAO,EAA6F,IAAI,GACxG,IAAgB,EAAO,EAAK,GAC5B,IAAQ,GAAa,MAA0B;EACjD,IAAM,IAAU,EAAK,SACf,IAAS,GAAS;EAExB,OADI,CAAC,KAAW,CAAC,IAAe,IACzB;GACH,GAAG,KAAK,IAAI,GAAG,KAAK,IAAI,EAAK,GAAG,EAAO,cAAc,EAAQ,WAAW,CAAC;GACzE,GAAG,KAAK,IAAI,GAAG,KAAK,IAAI,EAAK,GAAG,EAAO,eAAe,EAAQ,YAAY,CAAC;EAC/E;CACJ,GAAG,CAAC,CAAC;CACL,QAAgB;EACZ,IAAM,UAAe,GAAY,MAAW;GACxC,IAAM,IAAO,EAAM,CAAO;GAC1B,OAAO,EAAK,MAAM,EAAQ,KAAK,EAAK,MAAM,EAAQ,IAAI,IAAU;EACpE,CAAC;EACD,EAAO;EACP,IAAM,IAAW,IAAI,eAAe,CAAM;EAG1C,OAFI,EAAK,WAAS,EAAS,QAAQ,EAAK,OAAO,GAC3C,EAAK,SAAS,gBAAc,EAAS,QAAQ,EAAK,QAAQ,YAAY,SAC7D,EAAS,WAAW;CACrC,GAAG,CAAC,GAAO,CAAW,CAAC;CACvB,IAAM,UAAwB;EAG1B,AAFA,EAAqB,CAAC,CAAW,GACj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;KAAQ,gBAAe;KACpI,UAAA,IAAc,kBAAA,GAAA,EAAA,UAAA,CAAE,kBAAC,QAAD;MAAM,GAAE;MAAI,GAAE;MAAI,OAAM;MAAK,QAAO;MAAK,IAAG;KAAK,CAAA,GAAC,kBAAC,QAAD,EAAM,GAAE,iBAAkB,CAAA,CAAG,EAAA,CAAA,IAAI,kBAAC,QAAD,EAAM,GAAE,WAAY,CAAA;IACvH,CAAA;GACrB,CAAA,CACP;EACL,CAAA,GAAA,kBAAC,OAAD;GAAK,QAAQ;GAAa,WAAU;GAAqD,OAAO,EAAE,WAAW,mBAAmB;GAAI;EAAc,CAAA,CACjJ;;AAEb"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import PageFloat from './Float';
|
|
3
|
+
import { type PageResizeProps } from './resize';
|
|
4
|
+
export type { PageFloatProps } from './Float';
|
|
2
5
|
import { PageHeaderProps } from '../PageHeader';
|
|
6
|
+
import { type PagePanelProps, type PageAutoHideProps } from '../PagePanel';
|
|
7
|
+
export type { PagePanelProps } from '../PagePanel';
|
|
3
8
|
/**
|
|
4
9
|
* Page 布局脚手架
|
|
5
10
|
* ----------------------------------------------------------------------------
|
|
@@ -26,8 +31,8 @@ export type PageBodyProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
26
31
|
/** 是否让主体区在剩余空间内滚动(配合 Page fullHeight 使用) */
|
|
27
32
|
scroll?: boolean;
|
|
28
33
|
};
|
|
29
|
-
export type PageAsideProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
30
|
-
/** 侧栏宽度,数字按 px
|
|
34
|
+
export type PageAsideProps = React.HTMLAttributes<HTMLDivElement> & PagePanelProps & PageResizeProps & {
|
|
35
|
+
/** 侧栏宽度,数字按 px 处理;Left 默认 260,Right 默认 320。外部变化会同步到拖动宽度。 */
|
|
31
36
|
width?: number | string;
|
|
32
37
|
/** 是否显示分隔边框 */
|
|
33
38
|
bordered?: boolean;
|
|
@@ -43,16 +48,24 @@ export type PageMainProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
43
48
|
/** 页头:直接复用 PageHeader,作为 Page.Header 使用 */
|
|
44
49
|
declare const PageHeaderSlot: (props: PageHeaderProps) => React.JSX.Element;
|
|
45
50
|
declare const PageBody: ({ gap, scroll, className, style, children, ...rest }: PageBodyProps) => React.JSX.Element;
|
|
46
|
-
declare const PageLeft: ({ width, bordered, scroll, hideOnMobile, className, style, children, ...rest }: PageAsideProps) => React.JSX.Element;
|
|
47
|
-
declare const PageRight: ({ width, bordered, scroll, hideOnMobile, className, style, children, ...rest }: PageAsideProps) => React.JSX.Element;
|
|
51
|
+
declare const PageLeft: ({ resizeVariant, resizable, minWidth, maxWidth, onWidthChange, open, mode, animated, duration, width, bordered, scroll, hideOnMobile, className, style, children, ...rest }: PageAsideProps) => React.JSX.Element;
|
|
52
|
+
declare const PageRight: ({ resizeVariant, resizable, minWidth, maxWidth, onWidthChange, open, mode, animated, duration, width, bordered, scroll, hideOnMobile, className, style, children, ...rest }: PageAsideProps) => React.JSX.Element;
|
|
53
|
+
export type PageFooterProps = React.HTMLAttributes<HTMLElement> & PagePanelProps & PageAutoHideProps & {
|
|
54
|
+
left?: React.ReactNode;
|
|
55
|
+
center?: React.ReactNode;
|
|
56
|
+
right?: React.ReactNode;
|
|
57
|
+
};
|
|
58
|
+
declare const PageFooter: ({ open, mode, animated, duration, autoHide, className, children, left, center, right, ...rest }: PageFooterProps) => React.JSX.Element;
|
|
48
59
|
declare const PageMain: ({ scroll, className, children, ...rest }: PageMainProps) => React.JSX.Element;
|
|
49
60
|
interface PageCompound extends React.FC<PageProps> {
|
|
50
61
|
Header: typeof PageHeaderSlot;
|
|
62
|
+
Footer: typeof PageFooter;
|
|
63
|
+
Float: typeof PageFloat;
|
|
51
64
|
Body: typeof PageBody;
|
|
52
65
|
Left: typeof PageLeft;
|
|
53
66
|
Right: typeof PageRight;
|
|
54
67
|
Main: typeof PageMain;
|
|
55
68
|
}
|
|
56
69
|
declare const PageWithCompounds: PageCompound;
|
|
57
|
-
export { PageBody, PageLeft, PageRight, PageMain };
|
|
70
|
+
export { PageBody, PageLeft, PageRight, PageMain, PageFooter, PageFloat };
|
|
58
71
|
export default PageWithCompounds;
|
|
@@ -1,43 +1,112 @@
|
|
|
1
1
|
import { cn as e } from "../../utils/cn.js";
|
|
2
|
-
import t from "../
|
|
2
|
+
import t from "../PagePanel/index.js";
|
|
3
|
+
import n from "../PageHeader/index.js";
|
|
4
|
+
import r from "./Float2.js";
|
|
5
|
+
import i from "./resize2.js";
|
|
3
6
|
import "react";
|
|
4
|
-
import { jsx as
|
|
7
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
8
|
//#region src/components/Page/index.tsx
|
|
6
|
-
var
|
|
7
|
-
className: e("dishui-page flex w-full min-w-0 flex-col text-body leading-5 text-base-content", t && "h-full min-h-0",
|
|
8
|
-
...
|
|
9
|
-
children:
|
|
10
|
-
}),
|
|
11
|
-
className: e("dishui-page-body flex w-full flex-col md:flex-row",
|
|
9
|
+
var s = (e) => typeof e == "number" ? `${e}px` : e, c = ({ fullHeight: t = !1, className: n = "", children: r, ...i }) => /* @__PURE__ */ a("div", {
|
|
10
|
+
className: e("dishui-page flex w-full min-w-0 flex-col text-body leading-5 text-base-content", t && "h-full min-h-0", n),
|
|
11
|
+
...i,
|
|
12
|
+
children: r
|
|
13
|
+
}), l = (e) => /* @__PURE__ */ a(n, { ...e }), u = ({ gap: t = 16, scroll: n = !1, className: r = "", style: i, children: o, ...c }) => /* @__PURE__ */ a("div", {
|
|
14
|
+
className: e("dishui-page-body flex w-full flex-col md:flex-row", n && "min-h-0 flex-1", r),
|
|
12
15
|
style: {
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
...i,
|
|
17
|
+
gap: 0,
|
|
18
|
+
"--dishui-page-gap": s(i?.gap ?? t)
|
|
15
19
|
},
|
|
16
20
|
...c,
|
|
17
|
-
children:
|
|
18
|
-
}),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
children: o
|
|
22
|
+
}), d = ({ resizeVariant: n = "pill", resizable: r = !1, minWidth: o = 160, maxWidth: c = 600, onWidthChange: l, open: u, mode: d, animated: f, duration: p, width: m = 260, bordered: h = !0, scroll: g = !0, hideOnMobile: _ = !1, className: v = "", style: y, children: b, ...x }) => {
|
|
23
|
+
let S = /* @__PURE__ */ a(t, {
|
|
24
|
+
edge: "left",
|
|
25
|
+
width: y?.width ?? m,
|
|
26
|
+
hideOnMobile: _,
|
|
27
|
+
open: u,
|
|
28
|
+
mode: d,
|
|
29
|
+
animated: f,
|
|
30
|
+
duration: p,
|
|
31
|
+
children: /* @__PURE__ */ a("aside", {
|
|
32
|
+
className: e("dishui-page-left w-full shrink-0 md:w-(--dishui-aside-w)", h && "md:border-r md:border-base-300 md:pr-4", g && "md:min-h-0 md:overflow-y-auto", _ && "hidden md:block", v),
|
|
33
|
+
style: {
|
|
34
|
+
"--dishui-aside-w": s(m),
|
|
35
|
+
...y
|
|
36
|
+
},
|
|
37
|
+
...x,
|
|
38
|
+
children: b
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
return r ? /* @__PURE__ */ a(i, {
|
|
42
|
+
panel: S,
|
|
43
|
+
resizeVariant: n,
|
|
44
|
+
minWidth: o,
|
|
45
|
+
maxWidth: c,
|
|
46
|
+
onWidthChange: l
|
|
47
|
+
}) : S;
|
|
48
|
+
}, f = ({ resizeVariant: n = "pill", resizable: r = !1, minWidth: o = 160, maxWidth: c = 600, onWidthChange: l, open: u, mode: d, animated: f, duration: p, width: m = 320, bordered: h = !0, scroll: g = !0, hideOnMobile: _ = !1, className: v = "", style: y, children: b, ...x }) => {
|
|
49
|
+
let S = /* @__PURE__ */ a(t, {
|
|
50
|
+
edge: "right",
|
|
51
|
+
width: y?.width ?? m,
|
|
52
|
+
hideOnMobile: _,
|
|
53
|
+
open: u,
|
|
54
|
+
mode: d,
|
|
55
|
+
animated: f,
|
|
56
|
+
duration: p,
|
|
57
|
+
children: /* @__PURE__ */ a("aside", {
|
|
58
|
+
className: e("dishui-page-right w-full shrink-0 md:w-(--dishui-aside-w)", h && "md:border-l md:border-base-300 md:pl-4", g && "md:min-h-0 md:overflow-y-auto", _ && "hidden md:block", v),
|
|
59
|
+
style: {
|
|
60
|
+
"--dishui-aside-w": s(m),
|
|
61
|
+
...y
|
|
62
|
+
},
|
|
63
|
+
...x,
|
|
64
|
+
children: b
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
return r ? /* @__PURE__ */ a(i, {
|
|
68
|
+
panel: S,
|
|
69
|
+
resizeVariant: n,
|
|
70
|
+
minWidth: o,
|
|
71
|
+
maxWidth: c,
|
|
72
|
+
onWidthChange: l
|
|
73
|
+
}) : S;
|
|
74
|
+
}, p = ({ open: n, mode: r, animated: i, duration: s, autoHide: c, className: l, children: u, left: d, center: f, right: p, ...m }) => /* @__PURE__ */ a(t, {
|
|
75
|
+
edge: "footer",
|
|
76
|
+
autoHide: c,
|
|
77
|
+
open: n,
|
|
78
|
+
mode: r,
|
|
79
|
+
animated: i,
|
|
80
|
+
duration: s,
|
|
81
|
+
children: /* @__PURE__ */ a("footer", {
|
|
82
|
+
className: e("dishui-page-footer", l),
|
|
83
|
+
...m,
|
|
84
|
+
children: u === void 0 ? /* @__PURE__ */ o("div", {
|
|
85
|
+
className: "dishui-page-header-layout",
|
|
86
|
+
"data-centered": f != null && f !== !1 || void 0,
|
|
87
|
+
children: [
|
|
88
|
+
d != null && /* @__PURE__ */ a("div", {
|
|
89
|
+
className: "dishui-page-header-left",
|
|
90
|
+
children: d
|
|
91
|
+
}),
|
|
92
|
+
f != null && /* @__PURE__ */ a("div", {
|
|
93
|
+
className: "dishui-page-header-center",
|
|
94
|
+
children: f
|
|
95
|
+
}),
|
|
96
|
+
p != null && /* @__PURE__ */ a("div", {
|
|
97
|
+
className: "dishui-page-header-right",
|
|
98
|
+
children: p
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
}) : u
|
|
102
|
+
})
|
|
103
|
+
}), m = ({ scroll: t = !1, className: n = "", children: r, ...i }) => /* @__PURE__ */ a("main", {
|
|
104
|
+
className: e("dishui-page-main min-w-0 flex-1", t && "min-h-0 overflow-y-auto", n),
|
|
105
|
+
...i,
|
|
106
|
+
children: r
|
|
107
|
+
}), h = c;
|
|
108
|
+
h.Header = l, h.Footer = p, h.Float = r, h.Body = u, h.Left = d, h.Right = f, h.Main = m;
|
|
40
109
|
//#endregion
|
|
41
|
-
export {
|
|
110
|
+
export { u as PageBody, r as PageFloat, p as PageFooter, d as PageLeft, m as PageMain, f as PageRight, h as default };
|
|
42
111
|
|
|
43
112
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Page/index.tsx"],"sourcesContent":["import React from 'react';\nimport PageHeader, { PageHeaderProps } from '../PageHeader';\nimport { cn } from '../../utils/cn';\n\n/**\n * Page 布局脚手架\n * ----------------------------------------------------------------------------\n * 为管理后台等页面提供统一的「页头 + 主体 + 左右侧栏」骨架,配合 PageHeader、\n * Card.Info 等组件使用。所有区域都是可选的,可按需组合。\n *\n * 典型结构:\n * <Page fullHeight>\n * <Page.Header title=\"用户管理\" actions={<Button>新建</Button>} />\n * <Page.Body scroll>\n * <Page.Left width={240}>筛选器</Page.Left>\n * <Page.Main scroll>主内容</Page.Main>\n * <Page.Right width={320}>详情</Page.Right>\n * </Page.Body>\n * </Page>\n */\n\nexport type PageProps = React.HTMLAttributes<HTMLDivElement> & {\n /** 是否占满父容器高度并启用内部滚动(主体区滚动,页头固定) */\n fullHeight?: boolean;\n};\n\nexport type PageBodyProps = React.HTMLAttributes<HTMLDivElement> & {\n /** 主体内的间距(left/main/right 之间),数字按 px 处理,默认 16 */\n gap?: number | string;\n /** 是否让主体区在剩余空间内滚动(配合 Page fullHeight 使用) */\n scroll?: boolean;\n};\n\nexport type PageAsideProps = React.HTMLAttributes<HTMLDivElement> & {\n /** 侧栏宽度,数字按 px
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Page/index.tsx"],"sourcesContent":["import React from 'react';\nimport PageFloat from './Float';\nimport ResizableAside, { type PageResizeProps } from './resize';\nexport type { PageFloatProps } from './Float';\nimport PageHeader, { PageHeaderProps } from '../PageHeader';\nimport { cn } from '../../utils/cn';\nimport PagePanel, { type PagePanelProps, type PageAutoHideProps } from '../PagePanel';\n\nexport type { PagePanelProps } from '../PagePanel';\n\n/**\n * Page 布局脚手架\n * ----------------------------------------------------------------------------\n * 为管理后台等页面提供统一的「页头 + 主体 + 左右侧栏」骨架,配合 PageHeader、\n * Card.Info 等组件使用。所有区域都是可选的,可按需组合。\n *\n * 典型结构:\n * <Page fullHeight>\n * <Page.Header title=\"用户管理\" actions={<Button>新建</Button>} />\n * <Page.Body scroll>\n * <Page.Left width={240}>筛选器</Page.Left>\n * <Page.Main scroll>主内容</Page.Main>\n * <Page.Right width={320}>详情</Page.Right>\n * </Page.Body>\n * </Page>\n */\n\nexport type PageProps = React.HTMLAttributes<HTMLDivElement> & {\n /** 是否占满父容器高度并启用内部滚动(主体区滚动,页头固定) */\n fullHeight?: boolean;\n};\n\nexport type PageBodyProps = React.HTMLAttributes<HTMLDivElement> & {\n /** 主体内的间距(left/main/right 之间),数字按 px 处理,默认 16 */\n gap?: number | string;\n /** 是否让主体区在剩余空间内滚动(配合 Page fullHeight 使用) */\n scroll?: boolean;\n};\n\nexport type PageAsideProps = React.HTMLAttributes<HTMLDivElement> & PagePanelProps & PageResizeProps & {\n /** 侧栏宽度,数字按 px 处理;Left 默认 260,Right 默认 320。外部变化会同步到拖动宽度。 */\n width?: number | string;\n /** 是否显示分隔边框 */\n bordered?: boolean;\n /** 侧栏内部纵向滚动自适应 */\n scroll?: boolean;\n /** 小屏(<768px)下是否隐藏(侧栏通常在移动端折叠) */\n hideOnMobile?: boolean;\n};\n\nexport type PageMainProps = React.HTMLAttributes<HTMLDivElement> & {\n /** 主内容区是否在剩余空间内纵向滚动 */\n scroll?: boolean;\n};\n\nconst toCssSize = (value: number | string | undefined): string | undefined =>\n typeof value === 'number' ? `${value}px` : value;\n\nconst Page = ({ fullHeight = false, className = '', children, ...rest }: PageProps) => (\n <div\n className={cn(\n 'dishui-page flex w-full min-w-0 flex-col text-body leading-5 text-base-content',\n fullHeight && 'h-full min-h-0',\n className,\n )}\n {...rest}\n >\n {children}\n </div>\n);\n\n/** 页头:直接复用 PageHeader,作为 Page.Header 使用 */\nconst PageHeaderSlot = (props: PageHeaderProps) => <PageHeader {...props} />;\n\nconst PageBody = ({ gap = 16, scroll = false, className = '', style, children, ...rest }: PageBodyProps) => (\n <div\n className={cn(\n 'dishui-page-body flex w-full flex-col md:flex-row',\n scroll && 'min-h-0 flex-1',\n className,\n )}\n style={{ ...style, gap: 0, ['--dishui-page-gap' as string]: toCssSize(style?.gap ?? gap) }}\n {...rest}\n >\n {children}\n </div>\n);\n\nconst PageLeft = ({\n resizeVariant = 'pill', resizable = false, minWidth = 160, maxWidth = 600, onWidthChange,\n open, mode, animated, duration,\n width = 260,\n bordered = true,\n scroll = true,\n hideOnMobile = false,\n className = '',\n style,\n children,\n ...rest\n}: PageAsideProps) => {\n const panel = <PagePanel edge=\"left\" width={style?.width ?? width} hideOnMobile={hideOnMobile} open={open} mode={mode} animated={animated} duration={duration}>\n <aside\n className={cn(\n 'dishui-page-left w-full shrink-0 md:w-(--dishui-aside-w)',\n bordered && 'md:border-r md:border-base-300 md:pr-4',\n scroll && 'md:min-h-0 md:overflow-y-auto',\n hideOnMobile && 'hidden md:block',\n className,\n )}\n style={{ ['--dishui-aside-w' as string]: toCssSize(width), ...style }}\n {...rest}\n >\n {children}\n </aside>\n </PagePanel>;\n return resizable ? <ResizableAside panel={panel} resizeVariant={resizeVariant} minWidth={minWidth} maxWidth={maxWidth} onWidthChange={onWidthChange} /> : panel;\n};\n\nconst PageRight = ({\n resizeVariant = 'pill', resizable = false, minWidth = 160, maxWidth = 600, onWidthChange,\n open, mode, animated, duration,\n width = 320,\n bordered = true,\n scroll = true,\n hideOnMobile = false,\n className = '',\n style,\n children,\n ...rest\n}: PageAsideProps) => {\n const panel = <PagePanel edge=\"right\" width={style?.width ?? width} hideOnMobile={hideOnMobile} open={open} mode={mode} animated={animated} duration={duration}>\n <aside\n className={cn(\n 'dishui-page-right w-full shrink-0 md:w-(--dishui-aside-w)',\n bordered && 'md:border-l md:border-base-300 md:pl-4',\n scroll && 'md:min-h-0 md:overflow-y-auto',\n hideOnMobile && 'hidden md:block',\n className,\n )}\n style={{ ['--dishui-aside-w' as string]: toCssSize(width), ...style }}\n {...rest}\n >\n {children}\n </aside>\n </PagePanel>;\n return resizable ? <ResizableAside panel={panel} resizeVariant={resizeVariant} minWidth={minWidth} maxWidth={maxWidth} onWidthChange={onWidthChange} /> : panel;\n};\n\nexport type PageFooterProps = React.HTMLAttributes<HTMLElement> & PagePanelProps & PageAutoHideProps & {\n left?: React.ReactNode;\n center?: React.ReactNode;\n right?: React.ReactNode;\n};\n\nconst PageFooter = ({\n open, mode, animated, duration, autoHide, className, children, left, center, right, ...rest\n}: PageFooterProps) => (\n <PagePanel edge=\"footer\" autoHide={autoHide} open={open} mode={mode} animated={animated} duration={duration}>\n <footer className={cn('dishui-page-footer', className)} {...rest}>\n {children !== undefined ? children : (\n <div className=\"dishui-page-header-layout\" data-centered={center != null && center !== false || undefined}>\n {left != null && <div className=\"dishui-page-header-left\">{left}</div>}\n {center != null && <div className=\"dishui-page-header-center\">{center}</div>}\n {right != null && <div className=\"dishui-page-header-right\">{right}</div>}\n </div>\n )}\n </footer>\n </PagePanel>\n);\n\nconst PageMain = ({ scroll = false, className = '', children, ...rest }: PageMainProps) => (\n <main\n className={cn(\n 'dishui-page-main min-w-0 flex-1',\n scroll && 'min-h-0 overflow-y-auto',\n className,\n )}\n {...rest}\n >\n {children}\n </main>\n);\n\ninterface PageCompound extends React.FC<PageProps> {\n Header: typeof PageHeaderSlot;\n Footer: typeof PageFooter;\n Float: typeof PageFloat;\n Body: typeof PageBody;\n Left: typeof PageLeft;\n Right: typeof PageRight;\n Main: typeof PageMain;\n}\n\nconst PageWithCompounds = Page as PageCompound;\nPageWithCompounds.Header = PageHeaderSlot;\nPageWithCompounds.Footer = PageFooter;\nPageWithCompounds.Float = PageFloat;\nPageWithCompounds.Body = PageBody;\nPageWithCompounds.Left = PageLeft;\nPageWithCompounds.Right = PageRight;\nPageWithCompounds.Main = PageMain;\n\nexport { PageBody, PageLeft, PageRight, PageMain, PageFooter, PageFloat };\nexport default PageWithCompounds;\n"],"mappings":";;;;;;;;AAuDA,IAAM,KAAa,MACf,OAAO,KAAU,WAAW,GAAG,EAAM,MAAM,GAEzC,KAAQ,EAAE,gBAAa,IAAO,eAAY,IAAI,aAAU,GAAG,QAC7D,kBAAC,OAAD;CACI,WAAW,EACP,kFACA,KAAc,kBACd,CACJ;CACA,GAAI;CAEH;AACA,CAAA,GAIH,KAAkB,MAA2B,kBAAC,GAAD,EAAY,GAAI,EAAQ,CAAA,GAErE,KAAY,EAAE,SAAM,IAAI,YAAS,IAAO,eAAY,IAAI,UAAO,aAAU,GAAG,QAC9E,kBAAC,OAAD;CACI,WAAW,EACP,qDACA,KAAU,kBACV,CACJ;CACA,OAAO;EAAE,GAAG;EAAO,KAAK;EAAI,qBAAgC,EAAU,GAAO,OAAO,CAAG;CAAE;CACzF,GAAI;CAEH;AACA,CAAA,GAGH,KAAY,EACd,mBAAgB,QAAQ,eAAY,IAAO,cAAW,KAAK,cAAW,KAAK,kBAC3E,SAAM,SAAM,aAAU,aACtB,WAAQ,KACR,cAAW,IACX,YAAS,IACT,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