@bioturing/components 0.26.2 → 0.28.1

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.
Files changed (64) hide show
  1. package/dist/components/checkbox/component.js.map +1 -1
  2. package/dist/components/choice-list/component.js +24 -21
  3. package/dist/components/choice-list/component.js.map +1 -1
  4. package/dist/components/cmdk/index.js.map +1 -1
  5. package/dist/components/combobox/component.js +202 -0
  6. package/dist/components/combobox/component.js.map +1 -0
  7. package/dist/components/combobox/style.css +1 -0
  8. package/dist/components/combobox/trigger.js +89 -0
  9. package/dist/components/combobox/trigger.js.map +1 -0
  10. package/dist/components/dropdown-menu/component.js +176 -162
  11. package/dist/components/dropdown-menu/component.js.map +1 -1
  12. package/dist/components/dropdown-menu/divider.js +16 -0
  13. package/dist/components/dropdown-menu/divider.js.map +1 -0
  14. package/dist/components/dropdown-menu/item.css +1 -0
  15. package/dist/components/dropdown-menu/item.js +131 -0
  16. package/dist/components/dropdown-menu/item.js.map +1 -0
  17. package/dist/components/dropdown-menu/style.css +1 -1
  18. package/dist/components/hooks/useDraggable.js +77 -0
  19. package/dist/components/hooks/useDraggable.js.map +1 -0
  20. package/dist/components/hooks/useHover.js +26 -0
  21. package/dist/components/hooks/useHover.js.map +1 -0
  22. package/dist/components/hooks/useTransitionStatus.js +52 -0
  23. package/dist/components/hooks/useTransitionStatus.js.map +1 -0
  24. package/dist/components/nav/item.js +2 -2
  25. package/dist/components/popup-panel/component.js +136 -169
  26. package/dist/components/popup-panel/component.js.map +1 -1
  27. package/dist/components/popup-panel/style.css +1 -1
  28. package/dist/components/resizable/component.js +239 -0
  29. package/dist/components/resizable/component.js.map +1 -0
  30. package/dist/components/resizable/style.css +1 -0
  31. package/dist/components/segmented/component.js +3 -3
  32. package/dist/components/segmented/component.js.map +1 -1
  33. package/dist/components/select/component.js +160 -91
  34. package/dist/components/select/component.js.map +1 -1
  35. package/dist/components/select/item.js +54 -0
  36. package/dist/components/select/item.js.map +1 -0
  37. package/dist/components/select/style.css +1 -1
  38. package/dist/components/spin/component.js +9 -8
  39. package/dist/components/spin/component.js.map +1 -1
  40. package/dist/components/splitter/splitter-panel.js +26 -43
  41. package/dist/components/splitter/splitter-panel.js.map +1 -1
  42. package/dist/components/splitter/splitter.js +99 -98
  43. package/dist/components/splitter/splitter.js.map +1 -1
  44. package/dist/components/splitter/useSizes.js +86 -0
  45. package/dist/components/splitter/useSizes.js.map +1 -0
  46. package/dist/components/stack/StackChild.js +9 -9
  47. package/dist/components/transition/component.js +1 -1
  48. package/dist/components/transition/component.js.map +1 -1
  49. package/dist/components/upload/dragger.js +19 -10
  50. package/dist/components/upload/dragger.js.map +1 -1
  51. package/dist/components/upload/item.js +21 -18
  52. package/dist/components/upload/item.js.map +1 -1
  53. package/dist/components/utils/antdUtils.js +18 -56
  54. package/dist/components/utils/antdUtils.js.map +1 -1
  55. package/dist/components/utils/placement.js +58 -0
  56. package/dist/components/utils/placement.js.map +1 -0
  57. package/dist/components/utils/reactElement.js +5 -0
  58. package/dist/components/utils/reactElement.js.map +1 -0
  59. package/dist/index.d.ts +478 -20
  60. package/dist/index.js +205 -189
  61. package/dist/index.js.map +1 -1
  62. package/dist/metadata.js +39 -5
  63. package/dist/metadata.js.map +1 -1
  64. package/package.json +4 -3
@@ -0,0 +1,239 @@
1
+ "use client";
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ import T, { useState as R, useCallback as U, useEffect as W, isValidElement as X } from "react";
4
+ import { useResizable as Y } from "react-use-resizable";
5
+ import Z from "merge-refs";
6
+ import { mergeProps as K } from "@base-ui-components/react";
7
+ import './style.css';/* empty css */
8
+ import { getReactElementProp as x } from "../utils/reactElement.js";
9
+ import { useCls as A } from "../utils/antdUtils.js";
10
+ import { clsx as h, cn as s } from "../utils/cn.js";
11
+ import { WithRenderProp as a } from "../utils/WithRenderProp.js";
12
+ const ue = ({
13
+ children: p,
14
+ resizable: c = !1,
15
+ handles: o = { bottom: !0, right: !0, left: !0, top: !0 },
16
+ absolutePositioning: V = !1,
17
+ classNames: t,
18
+ className: m,
19
+ style: I,
20
+ resetKey: B,
21
+ maxWidth: _,
22
+ maxHeight: $,
23
+ minWidth: j,
24
+ minHeight: q,
25
+ onResize: F,
26
+ maintainAspectRatio: r = !1,
27
+ ...N
28
+ }) => {
29
+ const l = A(), [u, G] = R(null), [b, v] = R(), [H, y] = R(), [P, D] = R(!1), J = U(
30
+ (e) => {
31
+ if (G(e), e && !b && !H) {
32
+ const i = e.getBoundingClientRect();
33
+ i.width > 0 && i.height > 0 && r && (v(i.width), y(i.height));
34
+ }
35
+ },
36
+ [b, H, r]
37
+ );
38
+ W(() => {
39
+ if (B !== void 0 && u) {
40
+ u.style.width = "", u.style.height = "";
41
+ const e = u.getBoundingClientRect();
42
+ e.width > 0 && e.height > 0 && (r ? (v(e.width), y(e.height)) : (v(void 0), y(void 0)));
43
+ }
44
+ }, [B, u, r]);
45
+ const w = Y({
46
+ initialWidth: r ? b : void 0,
47
+ initialHeight: r ? H : void 0,
48
+ maxWidth: _,
49
+ maxHeight: $,
50
+ minWidth: j,
51
+ minHeight: q,
52
+ onResize: F,
53
+ maintainAspectRatio: r,
54
+ onDragStart: () => {
55
+ if (D(!0), u) {
56
+ const e = u.getBoundingClientRect();
57
+ e.width > 0 && !b && v(e.width), e.height > 0 && !H && y(e.height);
58
+ }
59
+ },
60
+ onDragEnd: () => D(!1)
61
+ }), S = X(p);
62
+ W(() => {
63
+ P ? document.body.style.userSelect = "none" : document.body.style.userSelect = "";
64
+ }, [P]);
65
+ const { ref: L, ...M } = w.getRootProps(), d = w.getHandleProps, g = w.rootRef, C = (e, i) => {
66
+ if (!e.current || !V) return;
67
+ const { widthDiff: E } = i;
68
+ e.current.style.left = `${parseInt(e.current.style.left || "0") - E}px`;
69
+ }, k = (e, i) => {
70
+ if (!e.current || !V) return;
71
+ const { heightDiff: E } = i;
72
+ e.current.style.top = `${parseInt(e.current.style.top || "0") - E}px`;
73
+ }, O = c ? [
74
+ o.top && !r && /* @__PURE__ */ n(
75
+ "div",
76
+ {
77
+ className: h(
78
+ l("resizable-resize-handle"),
79
+ t == null ? void 0 : t.resizeHandle
80
+ ),
81
+ "data-placement": "top-center",
82
+ ...d({
83
+ reverse: !0,
84
+ lockHorizontal: !0,
85
+ onResize: (e) => k(g, e)
86
+ })
87
+ },
88
+ "top"
89
+ ),
90
+ o.bottom && !r && /* @__PURE__ */ n(
91
+ "div",
92
+ {
93
+ className: h(
94
+ l("resizable-resize-handle"),
95
+ t == null ? void 0 : t.resizeHandle
96
+ ),
97
+ "data-placement": "bottom-left",
98
+ ...d({
99
+ lockHorizontal: !0
100
+ })
101
+ },
102
+ "bottom"
103
+ ),
104
+ o.left && !r && /* @__PURE__ */ n(
105
+ "div",
106
+ {
107
+ className: h(
108
+ l("resizable-resize-handle"),
109
+ t == null ? void 0 : t.resizeHandle
110
+ ),
111
+ "data-placement": "top-left",
112
+ ...d({
113
+ reverse: !0,
114
+ lockVertical: !0,
115
+ onResize: (e) => C(g, e)
116
+ })
117
+ },
118
+ "left"
119
+ ),
120
+ o.right && !r && /* @__PURE__ */ n(
121
+ "div",
122
+ {
123
+ className: h(
124
+ l("resizable-resize-handle"),
125
+ t == null ? void 0 : t.resizeHandle
126
+ ),
127
+ "data-placement": "top-right",
128
+ ...d({
129
+ lockVertical: !0
130
+ })
131
+ },
132
+ "right"
133
+ ),
134
+ // For aspect ratio maintenance, add corner handles that can resize both dimensions
135
+ o.right && o.bottom && /* @__PURE__ */ n(
136
+ "div",
137
+ {
138
+ className: h(
139
+ l("resizable-resize-handle"),
140
+ t == null ? void 0 : t.resizeHandle
141
+ ),
142
+ "data-placement": "bottom-right-corner",
143
+ ...d({
144
+ // No locks - allow both horizontal and vertical resizing
145
+ })
146
+ },
147
+ "bottom-right-corner"
148
+ ),
149
+ r && o.left && o.bottom && /* @__PURE__ */ n(
150
+ "div",
151
+ {
152
+ className: h(
153
+ l("resizable-resize-handle"),
154
+ t == null ? void 0 : t.resizeHandle
155
+ ),
156
+ "data-placement": "bottom-left-corner",
157
+ ...d({
158
+ reverse: !0,
159
+ onResize: (e) => C(g, e)
160
+ })
161
+ },
162
+ "bottom-left-corner"
163
+ ),
164
+ r && o.right && o.top && /* @__PURE__ */ n(
165
+ "div",
166
+ {
167
+ className: h(
168
+ l("resizable-resize-handle"),
169
+ t == null ? void 0 : t.resizeHandle
170
+ ),
171
+ "data-placement": "top-right-corner",
172
+ ...d({
173
+ reverse: !0,
174
+ onResize: (e) => k(g, e)
175
+ })
176
+ },
177
+ "top-right-corner"
178
+ ),
179
+ o.left && o.top && /* @__PURE__ */ n(
180
+ "div",
181
+ {
182
+ className: h(
183
+ l("resizable-resize-handle"),
184
+ t == null ? void 0 : t.resizeHandle
185
+ ),
186
+ "data-placement": "top-left-corner",
187
+ ...d({
188
+ reverse: !0,
189
+ onResize: (e) => {
190
+ C(g, e), k(g, e);
191
+ }
192
+ })
193
+ },
194
+ "top-left-corner"
195
+ )
196
+ ] : [], f = p, z = {
197
+ className: x(f, "className"),
198
+ style: x(f, "style"),
199
+ children: x(f, "children"),
200
+ ref: f.ref
201
+ }, Q = {
202
+ className: s(
203
+ c && l("resizable"),
204
+ t == null ? void 0 : t.root,
205
+ z.className,
206
+ m
207
+ ),
208
+ ref: Z(
209
+ c ? L : void 0,
210
+ J,
211
+ // Always need this for dimension measurement
212
+ f == null ? void 0 : f.ref
213
+ ),
214
+ style: { ...z.style, ...I },
215
+ ...P ? { "data-resizing": !0 } : {},
216
+ ...c ? { "data-resizable": !0 } : {},
217
+ children: S ? [
218
+ ...Array.isArray(z.children) ? z.children : [z.children],
219
+ ...O.filter(Boolean)
220
+ ] : p
221
+ };
222
+ return /* @__PURE__ */ n(
223
+ a,
224
+ {
225
+ render: (e) => {
226
+ const i = K(
227
+ e,
228
+ Q,
229
+ c ? M : {}
230
+ );
231
+ return S ? T.cloneElement(f, i) : /* @__PURE__ */ n("div", { ...i, children: p });
232
+ }
233
+ }
234
+ );
235
+ };
236
+ export {
237
+ ue as Resizable
238
+ };
239
+ //# 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 // For aspect ratio maintenance, we need initial dimensions immediately\n // Otherwise, preserve natural width/height behavior\n if (node && !width && !height) {\n const rect = node.getBoundingClientRect();\n if (rect.width > 0 && rect.height > 0) {\n if (maintainAspectRatio) {\n // Need dimensions for aspect ratio calculation\n setWidth(rect.width);\n setHeight(rect.height);\n }\n // For non-aspect-ratio cases, don't set dimensions to preserve natural behavior\n }\n }\n },\n [width, height, maintainAspectRatio]\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 if (maintainAspectRatio) {\n // For aspect ratio maintenance, re-measure and set dimensions\n setWidth(rect.width);\n setHeight(rect.height);\n } else {\n // Reset state to allow natural dimensions again\n setWidth(undefined);\n setHeight(undefined);\n }\n\n // Don't apply any explicit dimensions - let them remain natural\n // panelRef.style.width = `${rect.width}px`;\n // panelRef.style.height = `${rect.height}px`;\n }\n }\n }, [resetKey, panelRef, maintainAspectRatio]);\n\n // Initialize useResizable with current dimensions (or undefined if not ready)\n // For aspect ratio maintenance, we need initial dimensions\n // Otherwise, preserve natural width/height behavior until user starts resizing\n const resizableHook = useResizable({\n initialWidth: maintainAspectRatio ? width : undefined,\n initialHeight: maintainAspectRatio ? height : undefined,\n maxWidth,\n maxHeight,\n minWidth,\n minHeight,\n onResize,\n maintainAspectRatio,\n onDragStart: () => {\n setResizing(true);\n // Capture natural dimensions when user starts resizing\n if (panelRef) {\n const rect = panelRef.getBoundingClientRect();\n if (rect.width > 0 && !width) {\n setWidth(rect.width);\n }\n if (rect.height > 0 && !height) {\n setHeight(rect.height);\n }\n }\n },\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 && !maintainAspectRatio && (\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 && !maintainAspectRatio && (\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 && !maintainAspectRatio && (\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 && !maintainAspectRatio && (\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 // For aspect ratio maintenance, add corner handles that can resize both dimensions\n handles.right && handles.bottom && (\n <div\n key=\"bottom-right-corner\"\n className={clsx(\n cls(\"resizable-resize-handle\"),\n classNames?.resizeHandle\n )}\n data-placement=\"bottom-right-corner\"\n {...getHandleProps({\n // No locks - allow both horizontal and vertical resizing\n })}\n />\n ),\n maintainAspectRatio && handles.left && handles.bottom && (\n <div\n key=\"bottom-left-corner\"\n className={clsx(\n cls(\"resizable-resize-handle\"),\n classNames?.resizeHandle\n )}\n data-placement=\"bottom-left-corner\"\n {...getHandleProps({\n reverse: true,\n onResize: (values) =>\n onReverseHandleChangeHorizontal(rootRef, values),\n })}\n />\n ),\n maintainAspectRatio && handles.right && handles.top && (\n <div\n key=\"top-right-corner\"\n className={clsx(\n cls(\"resizable-resize-handle\"),\n classNames?.resizeHandle\n )}\n data-placement=\"top-right-corner\"\n {...getHandleProps({\n reverse: true,\n onResize: (values) =>\n onReverseHandleChangeVertical(rootRef, values),\n })}\n />\n ),\n handles.left && handles.top && (\n <div\n key=\"top-left-corner\"\n className={clsx(\n cls(\"resizable-resize-handle\"),\n classNames?.resizeHandle\n )}\n data-placement=\"top-left-corner\"\n {...getHandleProps({\n reverse: true,\n onResize: (values) => {\n onReverseHandleChangeHorizontal(rootRef, values);\n onReverseHandleChangeVertical(rootRef, values);\n },\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 ...(resizable ? { \"data-resizable\": 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,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W,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}.ds-resizable-resize-handle[data-placement=bottom-right-corner]{bottom:0;right:0;width:12px;height:12px;border-bottom-right-radius:.5rem;cursor:nw-resize}.ds-resizable-resize-handle[data-placement=bottom-left-corner]{bottom:0;left:0;width:12px;height:12px;border-bottom-left-radius:.5rem;cursor:ne-resize}.ds-resizable-resize-handle[data-placement=top-right-corner]{top:0;right:0;width:12px;height:12px;border-top-right-radius:.5rem;cursor:ne-resize}.ds-resizable-resize-handle[data-placement=top-left-corner]{top:0;left:0;width:12px;height:12px;border-top-left-radius:.5rem;cursor:nw-resize}}
@@ -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 m } from "react";
4
+ import { forwardRef as o } from "react";
5
5
  import './style.css';/* empty css */
6
- const o = ({ className: s, ...e }, t) => /* @__PURE__ */ n(r, { ref: t, ...e }), i = m(o), p = i;
6
+ const m = (e, t) => /* @__PURE__ */ n(r, { ref: t, ...e }), i = o(m), c = i;
7
7
  export {
8
- p as Segmented
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 { className, ...rest }: SegmentedProps<T>,\n ref: React.Ref<React.ComponentRef<typeof AntSegmented>>\n) => {\n return <AntSegmented ref={ref} {...rest} />;\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","className","rest","ref","jsx","AntSegmented","MainSegmented","forwardRef","Segmented"],"mappings":";;;;;AAkBA,MAAMA,IAAqB,CACzB,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAChBC,MAEQ,gBAAAC,EAAAC,GAAA,EAAa,KAAAF,GAAW,GAAGD,EAAM,CAAA,GAIrCI,IAAgBC,EAAWP,CAAkB,GAMtCQ,IAAYF;"}
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,46 +1,61 @@
1
1
  "use client";
2
- import { jsx as o, jsxs as N, Fragment as D } from "react/jsx-runtime";
3
- import { CaretDown as R } from "@bioturing/assets";
4
- import a from "antd/es/select";
5
- import y from "antd/es/checkbox";
6
- import { forwardRef as U } from "react";
7
- import { useFloatingPortalNode as W, useFloating as q, autoUpdate as B, offset as H, autoPlacement as J, shift as K, size as L, FloatingOverlay as Q } from "@floating-ui/react";
8
- import { PopupPanelSize as w } from "../popup-panel/constants.js";
9
- import { toMerged as T } from "es-toolkit";
2
+ import { jsx as r, Fragment as y, jsxs as S } from "react/jsx-runtime";
3
+ import { CaretDown as tt } from "@bioturing/assets";
4
+ import { useFloatingPortalNode as et, useFloating as ot, autoUpdate as rt, offset as lt, autoPlacement as nt, shift as st, size as at, FloatingOverlay as ct } from "@floating-ui/react";
5
+ import j from "antd/es/checkbox";
6
+ import b from "antd/es/select";
7
+ import { toMerged as it } from "es-toolkit";
8
+ import { forwardRef as pt, useCallback as D } from "react";
9
+ import { PopupPanelSize as E } from "../popup-panel/constants.js";
10
+ import { Divider as mt } from "antd";
11
+ import { SelectItem as ut } from "./item.js";
10
12
  import './style.css';/* empty css */
11
- import { useControlledState as V } from "../hooks/useControlledState.js";
12
- import { clsx as C } from "../utils/cn.js";
13
- const X = ({
14
- mode: i,
15
- className: O,
16
- open: k,
17
- defaultOpen: v,
18
- onOpenChange: M,
19
- popupClassName: F,
20
- onDropdownVisibleChange: P,
21
- enhancePositioner: r,
22
- getPopupContainer: I,
23
- popupSize: e,
24
- popupRender: c,
25
- dropdownRender: f,
26
- classNames: n,
27
- styles: m = {},
28
- ...j
29
- }, p) => {
30
- var x;
31
- const E = W({}), u = i === "multiple" || i === "tags", [d, g] = V(
32
- k,
33
- M || P,
34
- v
35
- ), { floatingStyles: S, refs: h } = q({
13
+ import { useControlledState as N } from "../hooks/useControlledState.js";
14
+ import { useCls as ft } from "../utils/antdUtils.js";
15
+ import { clsx as G } from "../utils/cn.js";
16
+ const dt = ({
17
+ mode: d,
18
+ className: T,
19
+ open: U,
20
+ defaultOpen: V,
21
+ onOpenChange: W,
22
+ popupClassName: $,
23
+ onDropdownVisibleChange: q,
24
+ enhancePositioner: s,
25
+ getPopupContainer: B,
26
+ popupSize: l,
27
+ popupRender: g,
28
+ dropdownRender: h,
29
+ classNames: c,
30
+ styles: C = {},
31
+ showSelectionSummary: x,
32
+ selectionSummaryRender: v,
33
+ value: H,
34
+ onChange: J,
35
+ defaultValue: K,
36
+ showSelectAll: A,
37
+ selectAllRender: O,
38
+ options: a,
39
+ ...L
40
+ }, i) => {
41
+ var P;
42
+ const Q = et({}), p = d === "multiple" || d === "tags", [k, M] = N(
43
+ U,
44
+ W || q,
45
+ V
46
+ ), m = ft(), [e, u] = N(
47
+ H,
48
+ J,
49
+ K
50
+ ), { floatingStyles: R, refs: w } = ot({
36
51
  placement: "bottom-start",
37
52
  transform: !1,
38
- open: r && d,
53
+ open: s && k,
39
54
  middleware: [
40
- H({
55
+ lt({
41
56
  mainAxis: 4
42
57
  }),
43
- J({
58
+ nt({
44
59
  allowedPlacements: [
45
60
  "bottom-start",
46
61
  "bottom-end",
@@ -50,87 +65,141 @@ const X = ({
50
65
  "top"
51
66
  ]
52
67
  }),
53
- K({
68
+ st({
54
69
  padding: 8
55
70
  }),
56
- L({
71
+ at({
57
72
  padding: 8,
58
- apply({ availableHeight: t, availableWidth: s, elements: l }) {
59
- l.floating.style.setProperty(
73
+ apply({ availableHeight: t, availableWidth: o, elements: n }) {
74
+ n.floating.style.setProperty(
60
75
  "--available-width",
61
- s + "px"
62
- ), l.floating.style.setProperty(
76
+ o + "px"
77
+ ), n.floating.style.setProperty(
63
78
  "--available-height",
64
79
  t + "px"
65
80
  );
66
81
  }
67
82
  })
68
83
  ],
69
- whileElementsMounted: B
70
- }), b = C(
71
- "ds-select-popup",
72
- u && "ds-select-multiple",
73
- ((x = n == null ? void 0 : n.popup) == null ? void 0 : x.root) || F,
74
- r && "ds-select-popup-enhanced"
75
- ), A = e && typeof e == "string" && e in w ? w[e] : typeof e == "number" ? e + "px" : e || "fit-content";
76
- return /* @__PURE__ */ o(
77
- a,
84
+ whileElementsMounted: rt
85
+ }), X = D(
86
+ (t) => {
87
+ const o = Array.isArray(t) ? t.length : 1;
88
+ return p ? o + ` ${o == 1 ? "item" : "items"} selected` : /* @__PURE__ */ r(y, { children: t });
89
+ },
90
+ [p]
91
+ ), Y = G(
92
+ m("select", x && "select-selection-summary"),
93
+ T
94
+ ), F = G(
95
+ m(
96
+ "select-popup",
97
+ p && "select-multiple",
98
+ s && "select-popup-enhanced"
99
+ ),
100
+ ((P = c == null ? void 0 : c.popup) == null ? void 0 : P.root) || $
101
+ ), Z = l && typeof l == "string" && l in E ? E[l] : typeof l == "number" ? l + "px" : l || "fit-content", I = D(
102
+ (t) => {
103
+ const o = g ? g(t) : h ? h(t) : t;
104
+ if (!A) return o;
105
+ const n = Array.isArray(e) && e.length > 0, _ = Array.isArray(a) ? a.map((f) => f.value) : e.map((f) => f.value), z = Array.isArray(e) && e.length && e.length < a.length;
106
+ return /* @__PURE__ */ S(y, { children: [
107
+ /* @__PURE__ */ r(
108
+ ut,
109
+ {
110
+ className: m(
111
+ "select-item",
112
+ "select-item-option",
113
+ n && "select-item-option-selected",
114
+ "select-item-option-active"
115
+ ),
116
+ onMouseOver: (f) => {
117
+ },
118
+ selectAllRender: O,
119
+ checked: n,
120
+ indeterminate: z,
121
+ onSelectAll: () => u(_),
122
+ onDeselectAll: () => u([])
123
+ }
124
+ ),
125
+ /* @__PURE__ */ r(mt, {}),
126
+ o
127
+ ] });
128
+ },
129
+ [
130
+ g,
131
+ h,
132
+ A,
133
+ e,
134
+ a,
135
+ m,
136
+ O,
137
+ u
138
+ ]
139
+ );
140
+ return /* @__PURE__ */ r(
141
+ b,
78
142
  {
79
143
  ref: (t) => {
80
- p && (typeof p == "function" ? p(t) : p.current = t), t && h.setReference(t == null ? void 0 : t.nativeElement);
144
+ i && (typeof i == "function" ? i(t) : i.current = t), t && w.setReference(t == null ? void 0 : t.nativeElement);
81
145
  },
82
- suffixIcon: /* @__PURE__ */ o(R, { weight: "bold" }),
83
- open: d,
84
- onOpenChange: g,
85
- popupClassName: b,
146
+ suffixIcon: /* @__PURE__ */ r(tt, { weight: "bold" }),
147
+ open: k,
148
+ onOpenChange: M,
149
+ value: e,
150
+ onChange: u,
151
+ popupClassName: F,
86
152
  classNames: {
87
153
  popup: {
88
- root: b
154
+ root: F
89
155
  },
90
- ...n
156
+ ...c
91
157
  },
92
- ...u ? {
93
- menuItemSelectedIcon: ({ isSelected: t }) => /* @__PURE__ */ o("span", { className: "ant-select-checkbox-indicator", children: t ? /* @__PURE__ */ o(y, { checked: !0 }) : /* @__PURE__ */ o(y, { checked: !1 }) })
158
+ ...p ? {
159
+ menuItemSelectedIcon: ({ isSelected: t }) => /* @__PURE__ */ r("span", { className: "ant-select-checkbox-indicator", children: t ? /* @__PURE__ */ r(j, { checked: !0 }) : /* @__PURE__ */ r(j, { checked: !1 }) })
94
160
  } : {},
95
- mode: i,
96
- className: C("ds-select", O),
97
- styles: r ? T(m, {
161
+ mode: d,
162
+ className: Y,
163
+ styles: s ? it(C, {
98
164
  popup: {
99
165
  root: {
100
166
  transition: "none",
101
- ...S,
102
- "--ds-select-popup-width": A
167
+ ...R,
168
+ "--ds-select-popup-width": Z
103
169
  }
104
170
  }
105
- }) : m,
106
- getPopupContainer: I || (r ? () => E || document.body : void 0),
107
- popupRender: (t) => {
108
- const s = () => c ? c(t) : f ? f(t) : t;
109
- return r ? /* @__PURE__ */ N(D, { children: [
110
- /* @__PURE__ */ o(Q, { lockScroll: !0, onClick: () => g(!1) }),
111
- /* @__PURE__ */ o(
112
- "div",
113
- {
114
- ref: (l) => {
115
- if (!l) return;
116
- const G = l.closest(
117
- ".ds-select-dropdown"
118
- );
119
- h.setFloating(G);
120
- },
121
- children: s()
122
- }
123
- )
124
- ] }) : s();
125
- },
126
- ...j
171
+ }) : C,
172
+ getPopupContainer: B || (s ? () => Q || document.body : void 0),
173
+ popupRender: (t) => s ? /* @__PURE__ */ S(y, { children: [
174
+ /* @__PURE__ */ r(ct, { lockScroll: !0, onClick: () => M(!1) }),
175
+ /* @__PURE__ */ r(
176
+ "div",
177
+ {
178
+ ref: (o) => {
179
+ if (!o) return;
180
+ const n = o.closest(
181
+ ".ds-select-dropdown"
182
+ );
183
+ w.setFloating(n);
184
+ },
185
+ children: I(t)
186
+ }
187
+ )
188
+ ] }) : I(t),
189
+ options: a,
190
+ ...x ? {
191
+ maxTagCount: 1,
192
+ showSearch: !1,
193
+ labelRender: () => v ? v(e) : X(e)
194
+ } : {},
195
+ ...L
127
196
  }
128
197
  );
129
- }, Y = U(X), st = Object.assign(Y, {
130
- Option: a.Option,
131
- OptGroup: a.OptGroup
198
+ }, gt = pt(dt), St = Object.assign(gt, {
199
+ Option: b.Option,
200
+ OptGroup: b.OptGroup
132
201
  });
133
202
  export {
134
- st as Select
203
+ St as Select
135
204
  };
136
205
  //# sourceMappingURL=component.js.map