@bioturing/components 0.25.0 → 0.27.0
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/checkbox/component.js +12 -4
- package/dist/components/checkbox/component.js.map +1 -1
- package/dist/components/checkbox/style.css +1 -1
- package/dist/components/choice-list/component.js +24 -21
- package/dist/components/choice-list/component.js.map +1 -1
- package/dist/components/cmdk/index.js.map +1 -1
- package/dist/components/dropdown-menu/component.js +16 -15
- package/dist/components/dropdown-menu/component.js.map +1 -1
- package/dist/components/form/item.js +31 -28
- package/dist/components/form/item.js.map +1 -1
- package/dist/components/form/style.css +1 -1
- package/dist/components/popup-panel/component.js +142 -164
- package/dist/components/popup-panel/component.js.map +1 -1
- package/dist/components/popup-panel/style.css +1 -1
- package/dist/components/resizable/component.js +171 -0
- package/dist/components/resizable/component.js.map +1 -0
- package/dist/components/resizable/style.css +1 -0
- package/dist/components/segmented/component.js +3 -3
- package/dist/components/segmented/component.js.map +1 -1
- package/dist/components/spin/component.js +9 -8
- package/dist/components/spin/component.js.map +1 -1
- package/dist/components/splitter/component.js +7 -36
- package/dist/components/splitter/component.js.map +1 -1
- package/dist/components/splitter/context.js +6 -0
- package/dist/components/splitter/context.js.map +1 -0
- package/dist/components/splitter/splitter-panel.js +35 -0
- package/dist/components/splitter/splitter-panel.js.map +1 -0
- package/dist/components/splitter/splitter.js +158 -0
- package/dist/components/splitter/splitter.js.map +1 -0
- package/dist/components/splitter/style.css +1 -1
- package/dist/components/splitter/useSizes.js +86 -0
- package/dist/components/splitter/useSizes.js.map +1 -0
- package/dist/components/upload/dragger.js +19 -10
- package/dist/components/upload/dragger.js.map +1 -1
- package/dist/components/upload/item.js +21 -18
- package/dist/components/upload/item.js.map +1 -1
- package/dist/components/utils/antdUtils.js +18 -56
- package/dist/components/utils/antdUtils.js.map +1 -1
- package/dist/components/utils/placement.js +58 -0
- package/dist/components/utils/placement.js.map +1 -0
- package/dist/components/utils/reactElement.js +5 -0
- package/dist/components/utils/reactElement.js.map +1 -0
- package/dist/index.d.ts +196 -25
- package/dist/index.js +164 -158
- package/dist/index.js.map +1 -1
- package/dist/metadata.js +22 -2
- package/dist/metadata.js.map +1 -1
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.ds-popup-panel-root{z-index:1030}.ds-popup-panel{box-shadow:var(--ds-box-shadow-secondary);border-radius:var(--ds-border-radius);background:var(--ds-color-bg-elevated);list-style:none;color:var(--ds-color-text);font-size:var(--ds-font-size);font-family:var(--ds-font-family);transition-property:transform,scale,opacity;transition-duration:.2s;transition-timing-function:var(--ds-motion-ease-out);transform-origin:var(--transform-origin);width:min(var(--size-width),var(--available-width));max-width:var(--available-width);max-height:var(--available-height);height:max-content;display:flex;flex-direction:column}.ds-popup-panel[data-ending-style],.ds-popup-panel[data-starting-style]{transform:scale(.9);opacity:0}.ds-popup-panel:focus{outline:none}.ds-popup-panel-header{border-bottom:1px solid var(--ds-color-split);margin-bottom:0;padding:calc(var(--ds-popup-panel-padding) / 2) var(--ds-popup-panel-padding);flex:0}.ds-popup-panel-title-wrapper{font-weight:500;font-size:var(--ds-font-size);line-height:var(--ds-line-height);color:var(--ds-color-text)}.ds-popup-panel-footer{border-top:1px solid var(--ds-color-split);margin-top:0;padding:calc(var(--ds-popup-panel-padding) / 2) var(--ds-popup-panel-padding);flex:0}.ds-popup-panel-content{display:flex;flex-direction:column;flex:1;overflow:auto}.ds-popup-panel-content .ds-popup-panel-content-inner{flex:1;padding:var(--ds-popup-panel-padding)}
|
|
1
|
+
@layer components{.ds-popup-panel-root{z-index:1030}.ds-popup-panel{box-shadow:var(--ds-box-shadow-secondary);border-radius:var(--ds-border-radius);background:var(--ds-color-bg-elevated);list-style:none;color:var(--ds-color-text);font-size:var(--ds-font-size);font-family:var(--ds-font-family);transition-property:transform,scale,opacity;transition-duration:.2s;transition-timing-function:var(--ds-motion-ease-out);transform-origin:var(--transform-origin);width:min(var(--size-width),var(--available-width));max-width:var(--available-width);max-height:var(--available-height);height:max-content;display:flex;flex-direction:column}.ds-popup-panel[data-ending-style],.ds-popup-panel[data-starting-style]{transform:scale(.9);opacity:0}.ds-popup-panel:focus{outline:none}.ds-popup-panel-header{border-bottom:1px solid var(--ds-color-split);margin-bottom:0;padding:calc(var(--ds-popup-panel-padding) / 2) var(--ds-popup-panel-padding);flex:0}.ds-popup-panel-title-wrapper{font-weight:500;font-size:var(--ds-font-size);line-height:var(--ds-line-height);color:var(--ds-color-text)}.ds-popup-panel-footer{border-top:1px solid var(--ds-color-split);margin-top:0;padding:calc(var(--ds-popup-panel-padding) / 2) var(--ds-popup-panel-padding);flex:0}.ds-popup-panel-content{display:flex;flex-direction:column;flex:1;overflow:auto}.ds-popup-panel-content .ds-popup-panel-content-inner{flex:1;padding:var(--ds-popup-panel-padding)}}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import O, { useState as p, useCallback as Q, useEffect as C, isValidElement as T } from "react";
|
|
4
|
+
import { useResizable as U } from "react-use-resizable";
|
|
5
|
+
import X from "merge-refs";
|
|
6
|
+
import { mergeProps as Y } from "@base-ui-components/react";
|
|
7
|
+
import './style.css';/* empty css */
|
|
8
|
+
import { getReactElementProp as y } from "../utils/reactElement.js";
|
|
9
|
+
import { useCls as Z } from "../utils/antdUtils.js";
|
|
10
|
+
import { clsx as u, cn as _ } from "../utils/cn.js";
|
|
11
|
+
import { WithRenderProp as K } from "../utils/WithRenderProp.js";
|
|
12
|
+
const he = ({
|
|
13
|
+
children: f,
|
|
14
|
+
resizable: d = !1,
|
|
15
|
+
handles: h = { bottom: !0, right: !0, left: !0, top: !0 },
|
|
16
|
+
absolutePositioning: H = !1,
|
|
17
|
+
classNames: t,
|
|
18
|
+
className: E,
|
|
19
|
+
style: V,
|
|
20
|
+
resetKey: b,
|
|
21
|
+
maxWidth: D,
|
|
22
|
+
maxHeight: S,
|
|
23
|
+
minWidth: W,
|
|
24
|
+
minHeight: $,
|
|
25
|
+
onResize: B,
|
|
26
|
+
maintainAspectRatio: A = !1,
|
|
27
|
+
...N
|
|
28
|
+
}) => {
|
|
29
|
+
const l = Z(), [i, I] = p(null), [g, v] = p(), [a, P] = p(), [z, w] = p(!1), j = Q(
|
|
30
|
+
(e) => {
|
|
31
|
+
if (I(e), e && !g && !a) {
|
|
32
|
+
const r = e.getBoundingClientRect();
|
|
33
|
+
r.width > 0 && r.height > 0 && (v(r.width), P(r.height));
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
[g, a]
|
|
37
|
+
);
|
|
38
|
+
C(() => {
|
|
39
|
+
if (b !== void 0 && i) {
|
|
40
|
+
i.style.width = "", i.style.height = "";
|
|
41
|
+
const e = i.getBoundingClientRect();
|
|
42
|
+
e.width > 0 && e.height > 0 && (v(e.width), P(e.height), i.style.width = `${e.width}px`, i.style.height = `${e.height}px`);
|
|
43
|
+
}
|
|
44
|
+
}, [b, i]);
|
|
45
|
+
const m = U({
|
|
46
|
+
initialWidth: g,
|
|
47
|
+
initialHeight: a,
|
|
48
|
+
maxWidth: D,
|
|
49
|
+
maxHeight: S,
|
|
50
|
+
minWidth: W,
|
|
51
|
+
minHeight: $,
|
|
52
|
+
onResize: B,
|
|
53
|
+
maintainAspectRatio: A,
|
|
54
|
+
onDragStart: () => w(!0),
|
|
55
|
+
onDragEnd: () => w(!1)
|
|
56
|
+
}), k = T(f);
|
|
57
|
+
C(() => {
|
|
58
|
+
z ? document.body.style.userSelect = "none" : document.body.style.userSelect = "";
|
|
59
|
+
}, [z]);
|
|
60
|
+
const { ref: q, ...F } = m.getRootProps(), s = m.getHandleProps, x = m.rootRef, G = (e, r) => {
|
|
61
|
+
if (!e.current || !H) return;
|
|
62
|
+
const { widthDiff: R } = r;
|
|
63
|
+
e.current.style.left = `${parseInt(e.current.style.left || "0") - R}px`;
|
|
64
|
+
}, J = (e, r) => {
|
|
65
|
+
if (!e.current || !H) return;
|
|
66
|
+
const { heightDiff: R } = r;
|
|
67
|
+
e.current.style.top = `${parseInt(e.current.style.top || "0") - R}px`;
|
|
68
|
+
}, L = d ? [
|
|
69
|
+
h.top && /* @__PURE__ */ n(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
className: u(
|
|
73
|
+
l("resizable-resize-handle"),
|
|
74
|
+
t == null ? void 0 : t.resizeHandle
|
|
75
|
+
),
|
|
76
|
+
"data-placement": "top-center",
|
|
77
|
+
...s({
|
|
78
|
+
reverse: !0,
|
|
79
|
+
lockHorizontal: !0,
|
|
80
|
+
onResize: (e) => J(x, e)
|
|
81
|
+
})
|
|
82
|
+
},
|
|
83
|
+
"top"
|
|
84
|
+
),
|
|
85
|
+
h.bottom && /* @__PURE__ */ n(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
className: u(
|
|
89
|
+
l("resizable-resize-handle"),
|
|
90
|
+
t == null ? void 0 : t.resizeHandle
|
|
91
|
+
),
|
|
92
|
+
"data-placement": "bottom-left",
|
|
93
|
+
...s({
|
|
94
|
+
lockHorizontal: !0
|
|
95
|
+
})
|
|
96
|
+
},
|
|
97
|
+
"bottom"
|
|
98
|
+
),
|
|
99
|
+
h.left && /* @__PURE__ */ n(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
className: u(
|
|
103
|
+
l("resizable-resize-handle"),
|
|
104
|
+
t == null ? void 0 : t.resizeHandle
|
|
105
|
+
),
|
|
106
|
+
"data-placement": "top-left",
|
|
107
|
+
...s({
|
|
108
|
+
reverse: !0,
|
|
109
|
+
lockVertical: !0,
|
|
110
|
+
onResize: (e) => G(x, e)
|
|
111
|
+
})
|
|
112
|
+
},
|
|
113
|
+
"left"
|
|
114
|
+
),
|
|
115
|
+
h.right && /* @__PURE__ */ n(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
className: u(
|
|
119
|
+
l("resizable-resize-handle"),
|
|
120
|
+
t == null ? void 0 : t.resizeHandle
|
|
121
|
+
),
|
|
122
|
+
"data-placement": "top-right",
|
|
123
|
+
...s({
|
|
124
|
+
lockVertical: !0
|
|
125
|
+
})
|
|
126
|
+
},
|
|
127
|
+
"right"
|
|
128
|
+
)
|
|
129
|
+
] : [], o = f, c = {
|
|
130
|
+
className: y(o, "className"),
|
|
131
|
+
style: y(o, "style"),
|
|
132
|
+
children: y(o, "children"),
|
|
133
|
+
ref: o.ref
|
|
134
|
+
}, M = {
|
|
135
|
+
className: _(
|
|
136
|
+
d && l("resizable"),
|
|
137
|
+
t == null ? void 0 : t.root,
|
|
138
|
+
c.className,
|
|
139
|
+
E
|
|
140
|
+
),
|
|
141
|
+
ref: X(
|
|
142
|
+
d ? q : void 0,
|
|
143
|
+
j,
|
|
144
|
+
// Always need this for dimension measurement
|
|
145
|
+
o == null ? void 0 : o.ref
|
|
146
|
+
),
|
|
147
|
+
style: { ...c.style, ...V },
|
|
148
|
+
...z ? { "data-resizing": !0 } : {},
|
|
149
|
+
children: k ? [
|
|
150
|
+
...Array.isArray(c.children) ? c.children : [c.children],
|
|
151
|
+
...L.filter(Boolean)
|
|
152
|
+
] : f
|
|
153
|
+
};
|
|
154
|
+
return /* @__PURE__ */ n(
|
|
155
|
+
K,
|
|
156
|
+
{
|
|
157
|
+
render: (e) => {
|
|
158
|
+
const r = Y(
|
|
159
|
+
e,
|
|
160
|
+
M,
|
|
161
|
+
d ? F : {}
|
|
162
|
+
);
|
|
163
|
+
return k ? O.cloneElement(o, r) : /* @__PURE__ */ n("div", { ...r, children: f });
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
};
|
|
168
|
+
export {
|
|
169
|
+
he as Resizable
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/resizable/component.tsx"],"sourcesContent":["\"use client\";\nimport React, { useCallback, useEffect, useState, isValidElement } from \"react\";\nimport { useResizable, type MoveValues } from \"react-use-resizable\";\nimport mergeRefs from \"merge-refs\";\nimport {\n useCls,\n clsx,\n WithRenderProp,\n WithRenderPropProps,\n cn,\n getReactElementProp,\n} from \"../utils\";\nimport { mergeProps } from \"@base-ui-components/react\";\n\nimport \"./style.css\";\n\nexport interface ResizableProps extends WithRenderPropProps {\n /**\n * Single React element child that will be enhanced with resize handles\n */\n children: React.ReactNode;\n /**\n * Whether the component should be resizable\n * @default false\n */\n resizable?: boolean;\n /**\n * Configure which resize handles to show\n * @default { bottom: true, right: true, left: true, top: true }\n */\n handles?: {\n bottom?: boolean;\n right?: boolean;\n left?: boolean;\n top?: boolean;\n };\n /**\n * Whether to use absolute positioning for left handle resizing\n * Set to true when used in absolutely positioned containers like PopupPanel\n * @default false\n */\n absolutePositioning?: boolean;\n /**\n * Custom class names for different parts of the resizable component\n */\n classNames?: {\n root?: string;\n resizeHandle?: string;\n };\n /**\n * Key to reset dimensions to current element size\n * When this value changes, the component will recalculate its dimensions\n * Similar to React's key prop pattern for forcing component resets\n */\n resetKey?: React.Key;\n /**\n * Maximum width the component can be resized to\n */\n maxWidth?: number;\n /**\n * Maximum height the component can be resized to\n */\n maxHeight?: number;\n /**\n * Minimum width the component can be resized to\n */\n minWidth?: number;\n /**\n * Minimum height the component can be resized to\n */\n minHeight?: number;\n /**\n * Callback fired during resize operations\n */\n onResize?: (values: MoveValues) => void;\n /**\n * Whether to maintain aspect ratio during resize\n * @default false\n */\n maintainAspectRatio?: boolean;\n}\n\nexport const Resizable = ({\n children,\n resizable = false,\n handles = { bottom: true, right: true, left: true, top: true },\n absolutePositioning = false,\n classNames,\n className: containerClassName,\n style: containerStyle,\n resetKey,\n maxWidth,\n maxHeight,\n minWidth,\n minHeight,\n onResize,\n maintainAspectRatio = false,\n ...rest\n}: ResizableProps) => {\n // Validate that children is a single React element\n // if (!isValidElement(children)) {\n // throw new Error(\n // \"Resizable component expects a single React element as children\"\n // );\n // }\n\n const cls = useCls();\n const [panelRef, setPanelRef] = useState<HTMLDivElement | null>(null);\n const [width, setWidth] = useState<number>();\n const [height, setHeight] = useState<number>();\n const [resizing, setResizing] = useState(false);\n\n const callbackRef = useCallback(\n (node: HTMLDivElement) => {\n setPanelRef(node);\n\n // Get initial dimensions only once when ref is set\n if (node && !width && !height) {\n const rect = node.getBoundingClientRect();\n if (rect.width > 0 && rect.height > 0) {\n setWidth(rect.width);\n setHeight(rect.height);\n }\n }\n },\n [width, height]\n );\n\n // Reset dimensions when resetKey changes\n useEffect(() => {\n if (resetKey !== undefined && panelRef) {\n // Clear the hook's inline styles to reset to natural size\n panelRef.style.width = \"\";\n panelRef.style.height = \"\";\n\n // Force a reflow to get natural dimensions\n const rect = panelRef.getBoundingClientRect();\n\n if (rect.width > 0 && rect.height > 0) {\n // Update the component state to match the reset dimensions\n setWidth(rect.width);\n setHeight(rect.height);\n\n // Apply the reset dimensions directly to ensure they stick\n panelRef.style.width = `${rect.width}px`;\n panelRef.style.height = `${rect.height}px`;\n }\n }\n }, [resetKey, panelRef]);\n\n // Initialize useResizable with current dimensions (or undefined if not ready)\n const resizableHook = useResizable({\n initialWidth: width,\n initialHeight: height,\n maxWidth,\n maxHeight,\n minWidth,\n minHeight,\n onResize,\n maintainAspectRatio,\n onDragStart: () => setResizing(true),\n onDragEnd: () => setResizing(false),\n });\n\n const isChildrenValidElement = isValidElement(children);\n\n useEffect(() => {\n if (resizing) {\n document.body.style.userSelect = \"none\";\n } else {\n document.body.style.userSelect = \"\";\n }\n }, [resizing]);\n\n // Get resizable props - useResizable hook handles cases where dimensions aren't ready\n const { ref: rootRefProp, ...rootPropsWithoutRef } =\n resizableHook.getRootProps();\n const getHandleProps = resizableHook.getHandleProps;\n const rootRef = resizableHook.rootRef;\n\n // Handle reverse handle change for horizontal resizing (only for absolute positioning)\n const onReverseHandleChangeHorizontal = (\n parent: React.RefObject<HTMLDivElement>,\n values: MoveValues\n ) => {\n if (!parent.current || !absolutePositioning) return;\n const { widthDiff } = values;\n parent.current.style.left = `${\n parseInt(parent.current.style.left || \"0\") - widthDiff\n }px`;\n };\n\n // Handle reverse handle change for vertical resizing (only for absolute positioning)\n const onReverseHandleChangeVertical = (\n parent: React.RefObject<HTMLDivElement>,\n values: MoveValues\n ) => {\n if (!parent.current || !absolutePositioning) return;\n const { heightDiff } = values;\n parent.current.style.top = `${\n parseInt(parent.current.style.top || \"0\") - heightDiff\n }px`;\n };\n\n const resizeHandles = resizable\n ? [\n handles.top && (\n <div\n key=\"top\"\n className={clsx(\n cls(\"resizable-resize-handle\"),\n classNames?.resizeHandle\n )}\n data-placement=\"top-center\"\n {...getHandleProps({\n reverse: true,\n lockHorizontal: true,\n onResize: (values) =>\n onReverseHandleChangeVertical(rootRef, values),\n })}\n />\n ),\n handles.bottom && (\n <div\n key=\"bottom\"\n className={clsx(\n cls(\"resizable-resize-handle\"),\n classNames?.resizeHandle\n )}\n data-placement=\"bottom-left\"\n {...getHandleProps({\n lockHorizontal: true,\n })}\n />\n ),\n handles.left && (\n <div\n key=\"left\"\n className={clsx(\n cls(\"resizable-resize-handle\"),\n classNames?.resizeHandle\n )}\n data-placement=\"top-left\"\n {...getHandleProps({\n reverse: true,\n lockVertical: true,\n onResize: (values) =>\n onReverseHandleChangeHorizontal(rootRef, values),\n })}\n />\n ),\n handles.right && (\n <div\n key=\"right\"\n className={clsx(\n cls(\"resizable-resize-handle\"),\n classNames?.resizeHandle\n )}\n data-placement=\"top-right\"\n {...getHandleProps({\n lockVertical: true,\n })}\n />\n ),\n ]\n : [];\n\n const childElement = children as React.ReactElement & {\n ref?: React.Ref<HTMLDivElement>;\n };\n\n const childElementProps = {\n className: getReactElementProp<string>(childElement, \"className\"),\n style: getReactElementProp<React.CSSProperties>(childElement, \"style\"),\n children: getReactElementProp<React.ReactNode>(childElement, \"children\"),\n ref: childElement.ref,\n };\n\n const childProps = {\n className: cn(\n resizable && cls(\"resizable\"),\n classNames?.root,\n childElementProps.className,\n containerClassName\n ),\n ref: mergeRefs(\n resizable ? rootRefProp : undefined,\n callbackRef, // Always need this for dimension measurement\n childElement?.ref\n ),\n style: { ...childElementProps.style, ...containerStyle },\n ...(resizing ? { \"data-resizing\": true } : {}),\n children: isChildrenValidElement\n ? [\n ...(Array.isArray(childElementProps.children)\n ? childElementProps.children\n : [childElementProps.children]),\n ...resizeHandles.filter(Boolean),\n ]\n : children,\n };\n\n return (\n <WithRenderProp\n render={(props) => {\n // Merge the props from WithRenderProp with our childProps\n const mergedProps = mergeProps(\n props,\n childProps,\n resizable ? rootPropsWithoutRef : {}\n );\n if (isChildrenValidElement) {\n return React.cloneElement(childElement, mergedProps);\n } else {\n return <div {...mergedProps}>{children}</div>;\n }\n }}\n />\n );\n};\n"],"names":["Resizable","children","resizable","handles","absolutePositioning","classNames","containerClassName","containerStyle","resetKey","maxWidth","maxHeight","minWidth","minHeight","onResize","maintainAspectRatio","rest","cls","useCls","panelRef","setPanelRef","useState","width","setWidth","height","setHeight","resizing","setResizing","callbackRef","useCallback","node","rect","useEffect","resizableHook","useResizable","isChildrenValidElement","isValidElement","rootRefProp","rootPropsWithoutRef","getHandleProps","rootRef","onReverseHandleChangeHorizontal","parent","values","widthDiff","onReverseHandleChangeVertical","heightDiff","resizeHandles","jsx","clsx","childElement","childElementProps","getReactElementProp","childProps","cn","mergeRefs","WithRenderProp","props","mergedProps","mergeProps","React"],"mappings":";;;;;;;;;;;AAkFO,MAAMA,KAAY,CAAC;AAAA,EACxB,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,SAAAC,IAAU,EAAE,QAAQ,IAAM,OAAO,IAAM,MAAM,IAAM,KAAK,GAAK;AAAA,EAC7D,qBAAAC,IAAsB;AAAA,EACtB,YAAAC;AAAA,EACA,WAAWC;AAAA,EACX,OAAOC;AAAA,EACP,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,qBAAAC,IAAsB;AAAA,EACtB,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AAiB,OAAS,CAAC;AAAA,IAC5C,UAAUS,IACN;AAAA,MACE,GAAI,MAAM,QAAQgB,EAAkB,QAAQ,IACxCA,EAAkB,WAClB,CAACA,EAAkB,QAAQ;AAAA,MAC/B,GAAGJ,EAAc,OAAO,OAAO;AAAA,IAAA,IAEjC7C;AAAA,EACN;AAGE,SAAA,gBAAA8C;AAAA,IAACQ;AAAA,IAAA;AAAA,MACC,QAAQ,CAACC,MAAU;AAEjB,cAAMC,IAAcC;AAAA,UAClBF;AAAA,UACAJ;AAAA,UACAlD,IAAYmC,IAAsB,CAAA;AAAA,QACpC;AACA,eAAIH,IACKyB,EAAM,aAAaV,GAAcQ,CAAW,IAE3C,gBAAAV,EAAA,OAAA,EAAK,GAAGU,GAAc,UAAAxD,EAAS,CAAA;AAAA,MACzC;AAAA,IACF;AAAA,EACF;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{.ds-resizable{position:relative}.ds-resizable-resize-handle{position:absolute;padding:.5rem;color:#fff;display:block}.ds-resizable-resize-handle[data-placement=top-left]{left:0;top:0;width:4px;height:100%;border-top-left-radius:.5rem;border-bottom-left-radius:.5rem;align-items:center}.ds-resizable-resize-handle[data-placement=top-right]{right:0;top:0;width:4px;height:100%;border-top-right-radius:.5rem;border-bottom-right-radius:.5rem;align-items:center}.ds-resizable-resize-handle[data-placement=bottom-left]{bottom:0;width:100%;height:4px;border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem;justify-content:center}.ds-resizable-resize-handle[data-placement=top-center]{top:0;width:100%;height:4px;border-top-left-radius:.5rem;border-top-right-radius:.5rem;justify-content:center}}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import r from "antd/es/segmented";
|
|
4
|
-
import { forwardRef as
|
|
4
|
+
import { forwardRef as o } from "react";
|
|
5
5
|
import './style.css';/* empty css */
|
|
6
|
-
const
|
|
6
|
+
const m = (e, t) => /* @__PURE__ */ n(r, { ref: t, ...e }), i = o(m), c = i;
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
c as Segmented
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/segmented/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntSegmented,\n type SegmentedProps as AntSegmentedProps,\n} from \"antd/es/segmented\";\n\nimport { forwardRef } from \"react\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\nexport type RcSegmentedValue = string | number;\n\n// Define props interface with default type parameter\nexport interface SegmentedProps<T = RcSegmentedValue>\n extends AntSegmentedProps<T> {}\n\n// Create inner function with default type parameter\nconst MainSegmentedInner = <T,>(\n
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/segmented/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntSegmented,\n type SegmentedProps as AntSegmentedProps,\n} from \"antd/es/segmented\";\n\nimport { forwardRef } from \"react\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\nexport type RcSegmentedValue = string | number;\n\n// Define props interface with default type parameter\nexport interface SegmentedProps<T = RcSegmentedValue>\n extends AntSegmentedProps<T> {}\n\n// Create inner function with default type parameter\nconst MainSegmentedInner = <T,>(\n props: SegmentedProps<T>,\n ref: React.Ref<React.ComponentRef<typeof AntSegmented>>\n) => {\n return <AntSegmented ref={ref} {...props} />;\n};\n\n// Use forwardRef with type assertion\nconst MainSegmented = forwardRef(MainSegmentedInner) as <T = RcSegmentedValue>(\n props: SegmentedProps<T> & {\n ref?: React.Ref<React.ComponentRef<typeof AntSegmented>>;\n }\n) => ReturnType<typeof MainSegmentedInner>;\n\nexport const Segmented = MainSegmented;\n"],"names":["MainSegmentedInner","props","ref","jsx","AntSegmented","MainSegmented","forwardRef","Segmented"],"mappings":";;;;;AAkBA,MAAMA,IAAqB,CACzBC,GACAC,MAEQ,gBAAAC,EAAAC,GAAA,EAAa,KAAAF,GAAW,GAAGD,EAAO,CAAA,GAItCI,IAAgBC,EAAWN,CAAkB,GAMtCO,IAAYF;"}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
import e from "antd/es/spin";
|
|
4
4
|
import './style.css';/* empty css */
|
|
5
|
-
import { useCls as
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
import { useCls as m } from "../utils/antdUtils.js";
|
|
6
|
+
const f = ({ indicator: n, size: o, className: r, ...p }) => {
|
|
7
|
+
const s = m(), i = n || /* @__PURE__ */ t("span", { className: s("spin-loader") });
|
|
8
8
|
return /* @__PURE__ */ t(
|
|
9
|
-
|
|
9
|
+
e,
|
|
10
10
|
{
|
|
11
|
-
|
|
11
|
+
className: r,
|
|
12
|
+
indicator: i,
|
|
12
13
|
size: typeof o == "number" ? "default" : o,
|
|
13
14
|
style: {
|
|
14
15
|
"--spin-size": typeof o == "number" ? `${o}px` : void 0
|
|
15
16
|
},
|
|
16
|
-
...
|
|
17
|
+
...p
|
|
17
18
|
}
|
|
18
19
|
);
|
|
19
20
|
};
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
f as Spin
|
|
22
23
|
};
|
|
23
24
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/spin/component.tsx"],"sourcesContent":["\"use client\";\nimport { useCls } from \"../utils\";\nimport { default as AntdSpin, SpinProps as AntdSpinProps } from \"antd/es/spin\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\nexport type SpinProps = Omit<AntdSpinProps, \"size\"> & {\n size?: \"small\" | \"default\" | \"large\" | number;\n};\n\nexport const Spin = ({ indicator, size, ...rest }: SpinProps) => {\n const cls = useCls();\n const spinIndicator = indicator || <span className={cls(\"spin-loader\")} />;\n return (\n <AntdSpin\n indicator={spinIndicator}\n size={typeof size === \"number\" ? \"default\" : size}\n style={\n {\n \"--spin-size\": typeof size == \"number\" ? `${size}px` : undefined,\n } as React.CSSProperties\n }\n {...rest}\n />\n );\n};\n"],"names":["Spin","indicator","size","rest","cls","useCls","spinIndicator","jsx","AntdSpin"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/spin/component.tsx"],"sourcesContent":["\"use client\";\nimport { useCls } from \"../utils\";\nimport { default as AntdSpin, SpinProps as AntdSpinProps } from \"antd/es/spin\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\nexport type SpinProps = Omit<AntdSpinProps, \"size\"> & {\n size?: \"small\" | \"default\" | \"large\" | number;\n};\n\nexport const Spin = ({ indicator, size, className, ...rest }: SpinProps) => {\n const cls = useCls();\n const spinIndicator = indicator || <span className={cls(\"spin-loader\")} />;\n return (\n <AntdSpin\n className={className}\n indicator={spinIndicator}\n size={typeof size === \"number\" ? \"default\" : size}\n style={\n {\n \"--spin-size\": typeof size == \"number\" ? `${size}px` : undefined,\n } as React.CSSProperties\n }\n {...rest}\n />\n );\n};\n"],"names":["Spin","indicator","size","className","rest","cls","useCls","spinIndicator","jsx","AntdSpin"],"mappings":";;;;;AAWa,MAAAA,IAAO,CAAC,EAAE,WAAAC,GAAW,MAAAC,GAAM,WAAAC,GAAW,GAAGC,QAAsB;AAC1E,QAAMC,IAAMC,EAAO,GACbC,IAAgBN,KAAa,gBAAAO,EAAC,UAAK,WAAWH,EAAI,aAAa,GAAG;AAEtE,SAAA,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAAN;AAAA,MACA,WAAWI;AAAA,MACX,MAAM,OAAOL,KAAS,WAAW,YAAYA;AAAA,MAC7C,OACE;AAAA,QACE,eAAe,OAAOA,KAAQ,WAAW,GAAGA,CAAI,OAAO;AAAA,MACzD;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EACN;AAEJ;"}
|
|
@@ -1,41 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import p from "antd/es/splitter/Panel";
|
|
2
|
+
import { MainSplitter as t } from "./splitter.js";
|
|
3
|
+
import { SplitterPanel as i } from "./splitter-panel.js";
|
|
5
4
|
import './style.css';/* empty css */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
children: t,
|
|
10
|
-
className: r,
|
|
11
|
-
style: e,
|
|
12
|
-
...i
|
|
13
|
-
}) => /* @__PURE__ */ l(p, { className: r, style: e, ...i, children: t }), S = ({
|
|
14
|
-
children: t,
|
|
15
|
-
className: r = "",
|
|
16
|
-
style: e = {},
|
|
17
|
-
showSplitBar: i = !0,
|
|
18
|
-
...o
|
|
19
|
-
}) => {
|
|
20
|
-
const s = m();
|
|
21
|
-
return /* @__PURE__ */ l(
|
|
22
|
-
n,
|
|
23
|
-
{
|
|
24
|
-
className: c(
|
|
25
|
-
s("splitter"),
|
|
26
|
-
!i && s("splitter-hidden-split-bar"),
|
|
27
|
-
r
|
|
28
|
-
),
|
|
29
|
-
style: e,
|
|
30
|
-
...o,
|
|
31
|
-
children: t
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
}, f = Object.assign(S, {
|
|
35
|
-
Panel: a
|
|
36
|
-
}), A = f;
|
|
5
|
+
const e = Object.assign(t, {
|
|
6
|
+
Panel: i
|
|
7
|
+
}), l = e;
|
|
37
8
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
9
|
+
l as Split,
|
|
10
|
+
e as Splitter
|
|
40
11
|
};
|
|
41
12
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/splitter/component.tsx"],"sourcesContent":["\"use client\";\nimport
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/splitter/component.tsx"],"sourcesContent":["\"use client\";\nimport { MainSplitter, type SplitterProps } from \"./splitter\";\nimport { SplitterPanel, type SplitterPanelProps } from \"./splitter-panel\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Export types\nexport type { SplitterProps, SplitterPanelProps };\n\n// Create the compound component\nexport const Splitter = Object.assign(MainSplitter, {\n Panel: SplitterPanel,\n});\n\n// For backward compatibility\nexport const Split = Splitter;\n"],"names":["Splitter","MainSplitter","SplitterPanel","Split"],"mappings":";;;;AAWa,MAAAA,IAAW,OAAO,OAAOC,GAAc;AAAA,EAClD,OAAOC;AACT,CAAC,GAGYC,IAAQH;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../src/components/splitter/context.ts"],"sourcesContent":["import React from \"react\";\n\n// Context to provide layout direction to panels\nexport const SplitterContext = React.createContext<{ layout?: 'horizontal' | 'vertical' }>({});"],"names":["SplitterContext","React"],"mappings":";AAGO,MAAMA,IAAkBC,EAAM,cAAsD,CAAE,CAAA;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import o from "react";
|
|
4
|
+
import { InternalPanel as p } from "antd/es/splitter/Panel";
|
|
5
|
+
import { useCls as f } from "../utils/antdUtils.js";
|
|
6
|
+
import { clsx as x } from "../utils/cn.js";
|
|
7
|
+
const R = o.forwardRef(({
|
|
8
|
+
children: t,
|
|
9
|
+
className: s,
|
|
10
|
+
style: m,
|
|
11
|
+
defaultSize: n,
|
|
12
|
+
...e
|
|
13
|
+
}, c) => {
|
|
14
|
+
const i = f(), r = n === "max-content" || n === "min-content" || n === "fit-content", l = x(
|
|
15
|
+
s,
|
|
16
|
+
r && i(`splitter-panel-${n}`)
|
|
17
|
+
);
|
|
18
|
+
return /* @__PURE__ */ a(
|
|
19
|
+
p,
|
|
20
|
+
{
|
|
21
|
+
className: l,
|
|
22
|
+
style: m,
|
|
23
|
+
defaultSize: n,
|
|
24
|
+
...e,
|
|
25
|
+
children: r && o.isValidElement(t) ? o.cloneElement(
|
|
26
|
+
t,
|
|
27
|
+
{ ref: c }
|
|
28
|
+
) : t
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
R as SplitterPanel
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=splitter-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitter-panel.js","sources":["../../../src/components/splitter/splitter-panel.tsx"],"sourcesContent":["\"use client\";\nimport React from \"react\";\nimport { useCls, clsx } from \"../utils\";\nimport { InternalPanel } from \"antd/es/splitter/Panel\";\nimport type { InternalPanelProps } from \"antd/es/splitter/interface\";\n\nexport type SplitterPanelProps = InternalPanelProps & {\n children?: React.ReactNode;\n} & React.RefAttributes<HTMLElement> & {\n /**\n * Default size of the panel. Can be a percentage string, number, or CSS intrinsic sizing values\n */\n defaultSize?:\n | string\n | number\n | \"max-content\"\n | \"min-content\"\n | \"fit-content\";\n };\n\nexport const SplitterPanel = React.forwardRef<HTMLElement, SplitterPanelProps>(({\n children,\n className,\n style,\n defaultSize,\n ...rest\n}, ref) => {\n const cls = useCls();\n\n const isIntrinsicSizing =\n defaultSize === \"max-content\" ||\n defaultSize === \"min-content\" ||\n defaultSize === \"fit-content\";\n\n const finalClassName = clsx(\n className,\n isIntrinsicSizing && cls(`splitter-panel-${defaultSize}`)\n );\n\n return (\n <InternalPanel\n className={finalClassName}\n style={style}\n defaultSize={defaultSize}\n {...rest}\n >\n {isIntrinsicSizing && React.isValidElement(children)\n ? React.cloneElement(\n children as React.ReactElement<React.RefAttributes<HTMLElement>>,\n { ref }\n )\n : children}\n </InternalPanel>\n );\n});\n"],"names":["SplitterPanel","React","children","className","style","defaultSize","rest","ref","cls","useCls","isIntrinsicSizing","finalClassName","clsx","jsx","InternalPanel"],"mappings":";;;;;;AAoBa,MAAAA,IAAgBC,EAAM,WAA4C,CAAC;AAAA,EAC9E,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAGC;AACL,GAAGC,MAAQ;AACT,QAAMC,IAAMC,EAAO,GAEbC,IACJL,MAAgB,iBAChBA,MAAgB,iBAChBA,MAAgB,eAEZM,IAAiBC;AAAA,IACrBT;AAAA,IACAO,KAAqBF,EAAI,kBAAkBH,CAAW,EAAE;AAAA,EAC1D;AAGE,SAAA,gBAAAQ;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWH;AAAA,MACX,OAAAP;AAAA,MACA,aAAAC;AAAA,MACC,GAAGC;AAAA,MAEH,UAAqBI,KAAAT,EAAM,eAAeC,CAAQ,IAC/CD,EAAM;AAAA,QACJC;AAAA,QACA,EAAE,KAAAK,EAAI;AAAA,MAAA,IAERL;AAAA,IAAA;AAAA,EACN;AAEJ,CAAC;"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsx as f, jsxs as P } from "react/jsx-runtime";
|
|
2
|
+
import u, { useState as ue } from "react";
|
|
3
|
+
import ze from "rc-resize-observer";
|
|
4
|
+
import { useEvent as z } from "rc-util";
|
|
5
|
+
import { devUseWarning as Ce } from "antd/es/_util/warning";
|
|
6
|
+
import { useComponentConfig as he } from "antd/es/config-provider/context";
|
|
7
|
+
import de from "antd/es/config-provider/hooks/useCSSVarCls";
|
|
8
|
+
import ge from "antd/es/splitter/hooks/useItems";
|
|
9
|
+
import ve from "antd/es/splitter/hooks/useResizable";
|
|
10
|
+
import Me from "antd/es/splitter/hooks/useResize";
|
|
11
|
+
import Ne from "./useSizes.js";
|
|
12
|
+
import { SplitterPanel as be } from "./splitter-panel.js";
|
|
13
|
+
import ye from "antd/es/splitter/SplitBar";
|
|
14
|
+
import xe from "antd/es/splitter/style";
|
|
15
|
+
import { SplitterContext as Ie } from "./context.js";
|
|
16
|
+
import { clsx as $ } from "../utils/cn.js";
|
|
17
|
+
const Oe = (E) => {
|
|
18
|
+
const {
|
|
19
|
+
prefixCls: V,
|
|
20
|
+
className: U,
|
|
21
|
+
style: k,
|
|
22
|
+
layout: l = "horizontal",
|
|
23
|
+
children: w,
|
|
24
|
+
rootClassName: R,
|
|
25
|
+
onResizeStart: C,
|
|
26
|
+
onResize: a,
|
|
27
|
+
onResizeEnd: o,
|
|
28
|
+
lazy: B,
|
|
29
|
+
showSplitBar: W = !0
|
|
30
|
+
} = E, {
|
|
31
|
+
getPrefixCls: j,
|
|
32
|
+
direction: D,
|
|
33
|
+
className: _,
|
|
34
|
+
style: q
|
|
35
|
+
} = he("splitter"), n = j("splitter", V), M = de(n), [F, H, L] = xe(n, M), m = l === "vertical", p = D === "rtl", T = !m && p, i = ge(w), N = u.useMemo(() => i.map(() => u.createRef()), [i.length]);
|
|
36
|
+
if (process.env.NODE_ENV !== "production") {
|
|
37
|
+
const t = Ce("Splitter");
|
|
38
|
+
let e = !1, s = !1;
|
|
39
|
+
i.forEach((r) => {
|
|
40
|
+
r.size !== void 0 ? e = !0 : s = !0;
|
|
41
|
+
}), e && s && !a && t(
|
|
42
|
+
!1,
|
|
43
|
+
"usage",
|
|
44
|
+
"When part of `Splitter.Panel` has `size`, `onResize` is required or change `size` to `defaultSize`."
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
const [h, A] = ue(), G = (t) => {
|
|
48
|
+
const { offsetWidth: e, offsetHeight: s } = t, r = m ? s : e;
|
|
49
|
+
r !== 0 && A(r);
|
|
50
|
+
}, [
|
|
51
|
+
J,
|
|
52
|
+
d,
|
|
53
|
+
g,
|
|
54
|
+
b,
|
|
55
|
+
y,
|
|
56
|
+
K
|
|
57
|
+
] = Ne(i, h, l, N), x = ve(i, d, p), [Q, X, Y, Z, I] = Me(
|
|
58
|
+
i,
|
|
59
|
+
x,
|
|
60
|
+
g,
|
|
61
|
+
h,
|
|
62
|
+
K,
|
|
63
|
+
p
|
|
64
|
+
), ee = z((t) => {
|
|
65
|
+
Q(t), C == null || C(d);
|
|
66
|
+
}), te = z(
|
|
67
|
+
(t, e, s) => {
|
|
68
|
+
const r = X(t, e);
|
|
69
|
+
s ? o == null || o(r) : a == null || a(r);
|
|
70
|
+
}
|
|
71
|
+
), se = z((t) => {
|
|
72
|
+
Y(), t || o == null || o(d);
|
|
73
|
+
}), re = z(
|
|
74
|
+
(t, e) => {
|
|
75
|
+
const s = Z(t, e);
|
|
76
|
+
a == null || a(s), o == null || o(s);
|
|
77
|
+
}
|
|
78
|
+
), oe = $(
|
|
79
|
+
n,
|
|
80
|
+
U,
|
|
81
|
+
`${n}-${l}`,
|
|
82
|
+
{
|
|
83
|
+
[`${n}-rtl`]: p,
|
|
84
|
+
[`${n}-hide-bars`]: !W
|
|
85
|
+
},
|
|
86
|
+
R,
|
|
87
|
+
_,
|
|
88
|
+
L,
|
|
89
|
+
M,
|
|
90
|
+
H
|
|
91
|
+
), O = `${n}-mask`, c = u.useMemo(() => {
|
|
92
|
+
const t = [];
|
|
93
|
+
let e = 0;
|
|
94
|
+
for (let s = 0; s < i.length; s += 1)
|
|
95
|
+
e += g[s], t.push(e);
|
|
96
|
+
return t;
|
|
97
|
+
}, [g]), ne = { ...q, ...k };
|
|
98
|
+
return F(
|
|
99
|
+
/* @__PURE__ */ f(Ie.Provider, { value: { layout: l }, children: /* @__PURE__ */ f(ze, { onResize: G, children: /* @__PURE__ */ P("div", { style: ne, className: oe, children: [
|
|
100
|
+
i.map((t, e) => {
|
|
101
|
+
const s = /* @__PURE__ */ f(
|
|
102
|
+
be,
|
|
103
|
+
{
|
|
104
|
+
...t,
|
|
105
|
+
prefixCls: n,
|
|
106
|
+
size: J[e],
|
|
107
|
+
ref: N[e]
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
let r = null;
|
|
111
|
+
const S = x[e];
|
|
112
|
+
if (S) {
|
|
113
|
+
const ie = (c[e - 1] || 0) + b[e], ae = (c[e + 1] || 100) - y[e + 1], le = (c[e - 1] || 0) + y[e], ce = (c[e + 1] || 100) - b[e + 1];
|
|
114
|
+
r = /* @__PURE__ */ f(
|
|
115
|
+
ye,
|
|
116
|
+
{
|
|
117
|
+
lazy: B,
|
|
118
|
+
index: e,
|
|
119
|
+
active: I === e,
|
|
120
|
+
prefixCls: n,
|
|
121
|
+
vertical: m,
|
|
122
|
+
resizable: S.resizable,
|
|
123
|
+
ariaNow: c[e] * 100,
|
|
124
|
+
ariaMin: Math.max(ie, ae) * 100,
|
|
125
|
+
ariaMax: Math.min(le, ce) * 100,
|
|
126
|
+
startCollapsible: S.startCollapsible,
|
|
127
|
+
endCollapsible: S.endCollapsible,
|
|
128
|
+
onOffsetStart: ee,
|
|
129
|
+
onOffsetUpdate: (fe, me, pe, Se) => {
|
|
130
|
+
let v = m ? pe : me;
|
|
131
|
+
T && (v = -v), te(fe, v, Se);
|
|
132
|
+
},
|
|
133
|
+
onOffsetEnd: se,
|
|
134
|
+
onCollapse: re,
|
|
135
|
+
containerSize: h || 0
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
return /* @__PURE__ */ P(u.Fragment, { children: [
|
|
140
|
+
s,
|
|
141
|
+
r
|
|
142
|
+
] }, `split-panel-${e}`);
|
|
143
|
+
}),
|
|
144
|
+
typeof I == "number" && /* @__PURE__ */ f(
|
|
145
|
+
"div",
|
|
146
|
+
{
|
|
147
|
+
"aria-hidden": !0,
|
|
148
|
+
className: $(O, `${O}-${l}`)
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
] }) }) })
|
|
152
|
+
);
|
|
153
|
+
};
|
|
154
|
+
process.env.NODE_ENV !== "production" && (Oe.displayName = "Splitter");
|
|
155
|
+
export {
|
|
156
|
+
Oe as MainSplitter
|
|
157
|
+
};
|
|
158
|
+
//# sourceMappingURL=splitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitter.js","sources":["../../../src/components/splitter/splitter.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { clsx } from \"../utils\";\nimport ResizeObserver from \"rc-resize-observer\";\nimport { useEvent } from \"rc-util\";\n\nimport type { GetProp } from \"antd/es/_util/type\";\nimport { devUseWarning } from \"antd/es/_util/warning\";\nimport { useComponentConfig } from \"antd/es/config-provider/context\";\nimport useCSSVarCls from \"antd/es/config-provider/hooks/useCSSVarCls\";\nimport useItems from \"antd/es/splitter/hooks/useItems\";\nimport useResizable from \"antd/es/splitter/hooks/useResizable\";\nimport useResize from \"antd/es/splitter/hooks/useResize\";\nimport useSizes from \"./useSizes\";\nimport type { SplitterProps as AntdSplitterProps } from \"antd/es/splitter/interface\";\nimport { SplitterPanel } from \"./splitter-panel\";\nimport SplitBar from \"antd/es/splitter/SplitBar\";\nimport useStyle from \"antd/es/splitter/style\";\nimport { SplitterContext } from \"./context\";\n\nexport interface SplitterProps extends AntdSplitterProps {\n /**\n * Whether to show the split bars between panels\n * @default true\n */\n showSplitBar?: boolean;\n}\n\nexport const MainSplitter: React.FC<React.PropsWithChildren<SplitterProps>> = (\n props\n) => {\n const {\n prefixCls: customizePrefixCls,\n className,\n style,\n layout = \"horizontal\",\n children,\n rootClassName,\n onResizeStart,\n onResize,\n onResizeEnd,\n lazy,\n showSplitBar = true,\n } = props;\n\n const {\n getPrefixCls,\n direction,\n className: contextClassName,\n style: contextStyle,\n } = useComponentConfig(\"splitter\");\n const prefixCls = getPrefixCls(\"splitter\", customizePrefixCls);\n const rootCls = useCSSVarCls(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n\n // ======================== Direct ========================\n const isVertical = layout === \"vertical\";\n const isRTL = direction === \"rtl\";\n const reverse = !isVertical && isRTL;\n\n // ====================== Items Data ======================\n const items = useItems(children);\n \n // Create refs for intrinsic panels to pass to useSizes\n const elementRefs = React.useMemo(() => {\n return items.map(() => React.createRef<HTMLElement>());\n }, [items.length]);\n\n // >>> Warning for uncontrolled\n if (process.env.NODE_ENV !== \"production\") {\n const warning = devUseWarning(\"Splitter\");\n\n let existSize = false;\n let existUndefinedSize = false;\n\n items.forEach((item) => {\n if (item.size !== undefined) {\n existSize = true;\n } else {\n existUndefinedSize = true;\n }\n });\n\n if (existSize && existUndefinedSize && !onResize) {\n warning(\n false,\n \"usage\",\n \"When part of `Splitter.Panel` has `size`, `onResize` is required or change `size` to `defaultSize`.\"\n );\n }\n }\n\n // ====================== Container =======================\n const [containerSize, setContainerSize] = useState<number | undefined>();\n\n const onContainerResize: GetProp<typeof ResizeObserver, \"onResize\"> = (\n size\n ) => {\n const { offsetWidth, offsetHeight } = size;\n const containerSize = isVertical ? offsetHeight : offsetWidth;\n // Skip when container has no size, Such as nested in a hidden tab panel\n // to fix: https://github.com/ant-design/ant-design/issues/51106\n if (containerSize === 0) {\n return;\n }\n setContainerSize(containerSize);\n };\n\n // ========================= Size =========================\n const [\n panelSizes,\n itemPxSizes,\n itemPtgSizes,\n itemPtgMinSizes,\n itemPtgMaxSizes,\n updateSizes,\n ] = useSizes(items, containerSize, layout, elementRefs);\n\n // ====================== Resizable =======================\n const resizableInfos = useResizable(items, itemPxSizes, isRTL);\n\n const [onOffsetStart, onOffsetUpdate, onOffsetEnd, onCollapse, movingIndex] =\n useResize(\n items,\n resizableInfos,\n itemPtgSizes,\n containerSize,\n updateSizes,\n isRTL\n );\n\n // ======================== Events ========================\n const onInternalResizeStart = useEvent((index: number) => {\n onOffsetStart(index);\n onResizeStart?.(itemPxSizes);\n });\n\n const onInternalResizeUpdate = useEvent(\n (index: number, offset: number, lazyEnd?: boolean) => {\n const nextSizes = onOffsetUpdate(index, offset);\n\n if (lazyEnd) {\n onResizeEnd?.(nextSizes);\n } else {\n onResize?.(nextSizes);\n }\n }\n );\n\n const onInternalResizeEnd = useEvent((lazyEnd?: boolean) => {\n onOffsetEnd();\n\n if (!lazyEnd) {\n onResizeEnd?.(itemPxSizes);\n }\n });\n\n const onInternalCollapse = useEvent(\n (index: number, type: \"start\" | \"end\") => {\n const nextSizes = onCollapse(index, type);\n onResize?.(nextSizes);\n onResizeEnd?.(nextSizes);\n }\n );\n\n // ======================== Styles ========================\n const containerClassName = clsx(\n prefixCls,\n className,\n `${prefixCls}-${layout}`,\n {\n [`${prefixCls}-rtl`]: isRTL,\n [`${prefixCls}-hide-bars`]: !showSplitBar,\n },\n rootClassName,\n contextClassName,\n cssVarCls,\n rootCls,\n hashId\n );\n\n // ======================== Render ========================\n const maskCls = `${prefixCls}-mask`;\n\n const stackSizes = React.useMemo(() => {\n const mergedSizes: number[] = [];\n\n let stack = 0;\n for (let i = 0; i < items.length; i += 1) {\n stack += itemPtgSizes[i];\n mergedSizes.push(stack);\n }\n\n return mergedSizes;\n }, [itemPtgSizes]);\n\n const mergedStyle: React.CSSProperties = { ...contextStyle, ...style };\n\n return wrapCSSVar(\n <SplitterContext.Provider value={{ layout }}>\n <ResizeObserver onResize={onContainerResize}>\n <div style={mergedStyle} className={containerClassName}>\n {items.map((item, idx) => {\n // Panel\n const panel = (\n <SplitterPanel\n {...item}\n prefixCls={prefixCls}\n size={panelSizes[idx]}\n ref={elementRefs[idx]}\n />\n );\n\n // Split Bar\n let splitBar: React.ReactElement | null = null;\n\n const resizableInfo = resizableInfos[idx];\n if (resizableInfo) {\n const ariaMinStart =\n (stackSizes[idx - 1] || 0) + itemPtgMinSizes[idx];\n const ariaMinEnd =\n (stackSizes[idx + 1] || 100) - itemPtgMaxSizes[idx + 1];\n\n const ariaMaxStart =\n (stackSizes[idx - 1] || 0) + itemPtgMaxSizes[idx];\n const ariaMaxEnd =\n (stackSizes[idx + 1] || 100) - itemPtgMinSizes[idx + 1];\n\n splitBar = (\n <SplitBar\n lazy={lazy}\n index={idx}\n active={movingIndex === idx}\n prefixCls={prefixCls}\n vertical={isVertical}\n resizable={resizableInfo.resizable}\n ariaNow={stackSizes[idx] * 100}\n ariaMin={Math.max(ariaMinStart, ariaMinEnd) * 100}\n ariaMax={Math.min(ariaMaxStart, ariaMaxEnd) * 100}\n startCollapsible={resizableInfo.startCollapsible}\n endCollapsible={resizableInfo.endCollapsible}\n onOffsetStart={onInternalResizeStart}\n onOffsetUpdate={(index, offsetX, offsetY, lazyEnd) => {\n let offset = isVertical ? offsetY : offsetX;\n if (reverse) {\n offset = -offset;\n }\n onInternalResizeUpdate(index, offset, lazyEnd);\n }}\n onOffsetEnd={onInternalResizeEnd}\n onCollapse={onInternalCollapse}\n containerSize={containerSize || 0}\n />\n );\n }\n\n return (\n <React.Fragment key={`split-panel-${idx}`}>\n {panel}\n {splitBar}\n </React.Fragment>\n );\n })}\n\n {/* Fake mask for cursor */}\n {typeof movingIndex === \"number\" && (\n <div\n aria-hidden\n className={clsx(maskCls, `${maskCls}-${layout}`)}\n />\n )}\n </div>\n </ResizeObserver>\n </SplitterContext.Provider>\n );\n};\n\nif (process.env.NODE_ENV !== \"production\") {\n MainSplitter.displayName = \"Splitter\";\n}\n"],"names":["MainSplitter","props","customizePrefixCls","className","style","layout","children","rootClassName","onResizeStart","onResize","onResizeEnd","lazy","showSplitBar","getPrefixCls","direction","contextClassName","contextStyle","useComponentConfig","prefixCls","rootCls","useCSSVarCls","wrapCSSVar","hashId","cssVarCls","useStyle","isVertical","isRTL","reverse","items","useItems","elementRefs","React","warning","devUseWarning","existSize","existUndefinedSize","item","containerSize","setContainerSize","useState","onContainerResize","size","offsetWidth","offsetHeight","panelSizes","itemPxSizes","itemPtgSizes","itemPtgMinSizes","itemPtgMaxSizes","updateSizes","useSizes","resizableInfos","useResizable","onOffsetStart","onOffsetUpdate","onOffsetEnd","onCollapse","movingIndex","useResize","onInternalResizeStart","useEvent","index","onInternalResizeUpdate","offset","lazyEnd","nextSizes","onInternalResizeEnd","onInternalCollapse","type","containerClassName","clsx","maskCls","stackSizes","mergedSizes","stack","i","mergedStyle","SplitterContext","jsx","ResizeObserver","jsxs","idx","panel","SplitterPanel","splitBar","resizableInfo","ariaMinStart","ariaMinEnd","ariaMaxStart","ariaMaxEnd","SplitBar","offsetX","offsetY"],"mappings":";;;;;;;;;;;;;;;;AA2Ba,MAAAA,KAAiE,CAC5EC,MACG;AACG,QAAA;AAAA,IACJ,WAAWC;AAAA,IACX,WAAAC;AAAA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K,IAAIK,IAAcC,EAAU,IAAI;AAAA,cAC9C,SAAS,KAAK,IAAIC,IAAcC,EAAU,IAAI;AAAA,cAC9C,kBAAkBJ,EAAc;AAAA,cAChC,gBAAgBA,EAAc;AAAA,cAC9B,eAAe1B;AAAA,cACf,gBAAgB,CAACE,IAAO8B,IAASC,IAAS5B,OAAY;AAChD,oBAAAD,IAAStC,IAAamE,KAAUD;AACpC,gBAAIhE,MACFoC,IAAS,CAACA,IAEWD,GAAAD,IAAOE,GAAQC,EAAO;AAAA,cAC/C;AAAA,cACA,aAAaE;AAAA,cACb,YAAYC;AAAA,cACZ,eAAe9B,KAAiB;AAAA,YAAA;AAAA,UAClC;AAAA,QAAA;AAKF,eAAA,gBAAA2C,EAACjD,EAAM,UAAN,EACE,UAAA;AAAA,UAAAmD;AAAA,UACAE;AAAA,QAFkB,EAAA,GAAA,eAAeH,CAAG,EAGvC;AAAA,MAAA,CAEH;AAAA,MAGA,OAAOxB,KAAgB,YACtB,gBAAAqB;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,eAAW;AAAA,UACX,WAAWR,EAAKC,GAAS,GAAGA,CAAO,IAAIlE,CAAM,EAAE;AAAA,QAAA;AAAA,MAAA;AAAA,IACjD,EAEJ,CAAA,EACF,CAAA,EACF,CAAA;AAAA,EACF;AACF;AAEI,QAAQ,IAAI,aAAa,iBAC3BL,GAAa,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.ds-splitter>.ds-splitter-bar .ds-splitter-bar-collapse-bar.ds-splitter-bar-collapse-bar-start{opacity:1}}
|
|
1
|
+
@layer components{.ds-splitter>.ds-splitter-bar .ds-splitter-bar-collapse-bar.ds-splitter-bar-collapse-bar-start{opacity:1}.ds-splitter-hide-bars .ds-splitter-bar{opacity:0;pointer-events:none;transition:opacity .2s ease}.ds-splitter-hide-bars .ds-splitter-bar:hover{opacity:1;pointer-events:auto}.ds-splitter-panel-max-content,.ds-splitter-panel-min-content,.ds-splitter-panel-fit-content{flex-shrink:0}}
|