sa2kit 3.4.0 → 3.7.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/business/index.d.mts +2 -7
- package/dist/business/index.d.ts +2 -7
- package/dist/business/index.js +1761 -8045
- package/dist/business/index.js.map +1 -1
- package/dist/business/index.mjs +1169 -7452
- package/dist/business/index.mjs.map +1 -1
- package/dist/business/portfolio/index.d.mts +1 -2
- package/dist/business/portfolio/index.d.ts +1 -2
- package/dist/{chunk-KVYHCGRY.js → chunk-7Z3XR2Y4.js} +552 -263
- package/dist/chunk-7Z3XR2Y4.js.map +1 -0
- package/dist/chunk-XPY45Y75.js +1143 -0
- package/dist/chunk-XPY45Y75.js.map +1 -0
- package/dist/{chunk-YIRPPMCN.mjs → chunk-XSTMLLJV.mjs} +474 -198
- package/dist/chunk-XSTMLLJV.mjs.map +1 -0
- package/dist/chunk-ZJLS5JU5.mjs +1090 -0
- package/dist/chunk-ZJLS5JU5.mjs.map +1 -0
- package/dist/common/aiApi/client/index.d.mts +71 -0
- package/dist/common/aiApi/client/index.d.ts +71 -0
- package/dist/common/aiApi/client/index.js +165 -0
- package/dist/common/aiApi/client/index.js.map +1 -0
- package/dist/common/aiApi/client/index.mjs +151 -0
- package/dist/common/aiApi/client/index.mjs.map +1 -0
- package/dist/common/aiApi/index.d.mts +184 -0
- package/dist/common/aiApi/index.d.ts +184 -0
- package/dist/common/aiApi/index.js +217 -0
- package/dist/common/aiApi/index.mjs +4 -0
- package/dist/common/aiApi/server/index.d.mts +3 -0
- package/dist/common/aiApi/server/index.d.ts +3 -0
- package/dist/common/aiApi/server/index.js +217 -0
- package/dist/common/aiApi/server/index.mjs +4 -0
- package/dist/common/components/index.js +176 -177
- package/dist/common/components/index.mjs +1 -2
- package/dist/common/index.js +2 -3
- package/dist/common/index.mjs +1 -2
- package/dist/{index-BSmd4ikf.d.ts → index-B4wDXFL0.d.mts} +39 -2
- package/dist/{index-r2-zE3iC.d.mts → index-B4wDXFL0.d.ts} +39 -2
- package/dist/{index-DLLPTprx.d.mts → index-B9vXYzok.d.mts} +48 -13
- package/dist/{index-VFDbZxVM.d.ts → index-BZ0MhRau.d.ts} +48 -13
- package/dist/index.d.mts +703 -181
- package/dist/index.d.ts +703 -181
- package/dist/index.js +2921 -7257
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2161 -6538
- package/dist/index.mjs.map +1 -1
- package/dist/types-CiqMQ-uu.d.mts +166 -0
- package/dist/types-CiqMQ-uu.d.ts +166 -0
- package/package.json +15 -60
- package/dist/CollisionBalls-DgKtscU2.d.mts +0 -41
- package/dist/CollisionBalls-DgKtscU2.d.ts +0 -41
- package/dist/business/calendar/index.d.mts +0 -6
- package/dist/business/calendar/index.d.ts +0 -6
- package/dist/business/calendar/index.js +0 -7433
- package/dist/business/calendar/index.js.map +0 -1
- package/dist/business/calendar/index.mjs +0 -7257
- package/dist/business/calendar/index.mjs.map +0 -1
- package/dist/business/calendar/routes/index.d.mts +0 -191
- package/dist/business/calendar/routes/index.d.ts +0 -191
- package/dist/business/calendar/routes/index.js +0 -844
- package/dist/business/calendar/routes/index.js.map +0 -1
- package/dist/business/calendar/routes/index.mjs +0 -826
- package/dist/business/calendar/routes/index.mjs.map +0 -1
- package/dist/chunk-3R6JHA6D.js +0 -120
- package/dist/chunk-3R6JHA6D.js.map +0 -1
- package/dist/chunk-4PJM4752.js +0 -4
- package/dist/chunk-4PJM4752.js.map +0 -1
- package/dist/chunk-7PMT4L4I.js +0 -324
- package/dist/chunk-7PMT4L4I.js.map +0 -1
- package/dist/chunk-FY2X3LYR.mjs +0 -3
- package/dist/chunk-FY2X3LYR.mjs.map +0 -1
- package/dist/chunk-GS4SAW25.mjs +0 -116
- package/dist/chunk-GS4SAW25.mjs.map +0 -1
- package/dist/chunk-HL4H2HF6.js +0 -279
- package/dist/chunk-HL4H2HF6.js.map +0 -1
- package/dist/chunk-IJIQUMAK.mjs +0 -272
- package/dist/chunk-IJIQUMAK.mjs.map +0 -1
- package/dist/chunk-KVYHCGRY.js.map +0 -1
- package/dist/chunk-MMDSZIXD.mjs +0 -286
- package/dist/chunk-MMDSZIXD.mjs.map +0 -1
- package/dist/chunk-N2O3OX5Y.mjs +0 -243
- package/dist/chunk-N2O3OX5Y.mjs.map +0 -1
- package/dist/chunk-RRQ2X26Z.js +0 -106
- package/dist/chunk-RRQ2X26Z.js.map +0 -1
- package/dist/chunk-RVNQI6BI.js +0 -249
- package/dist/chunk-RVNQI6BI.js.map +0 -1
- package/dist/chunk-UJUWDF7M.mjs +0 -336
- package/dist/chunk-UJUWDF7M.mjs.map +0 -1
- package/dist/chunk-VCKXK6V5.js +0 -345
- package/dist/chunk-VCKXK6V5.js.map +0 -1
- package/dist/chunk-VIEXDTNF.mjs +0 -100
- package/dist/chunk-VIEXDTNF.mjs.map +0 -1
- package/dist/chunk-YIRPPMCN.mjs.map +0 -1
- package/dist/common/ai/llm/core/index.d.mts +0 -70
- package/dist/common/ai/llm/core/index.d.ts +0 -70
- package/dist/common/ai/llm/core/index.js +0 -54
- package/dist/common/ai/llm/core/index.mjs +0 -5
- package/dist/common/ai/llm/electron/index.d.mts +0 -6
- package/dist/common/ai/llm/electron/index.d.ts +0 -6
- package/dist/common/ai/llm/electron/index.js +0 -67
- package/dist/common/ai/llm/electron/index.mjs +0 -10
- package/dist/common/ai/llm/index.d.mts +0 -3
- package/dist/common/ai/llm/index.d.ts +0 -3
- package/dist/common/ai/llm/index.js +0 -54
- package/dist/common/ai/llm/index.js.map +0 -1
- package/dist/common/ai/llm/index.mjs +0 -5
- package/dist/common/ai/llm/index.mjs.map +0 -1
- package/dist/common/ai/llm/miniapp/index.d.mts +0 -6
- package/dist/common/ai/llm/miniapp/index.d.ts +0 -6
- package/dist/common/ai/llm/miniapp/index.js +0 -59
- package/dist/common/ai/llm/miniapp/index.js.map +0 -1
- package/dist/common/ai/llm/miniapp/index.mjs +0 -6
- package/dist/common/ai/llm/miniapp/index.mjs.map +0 -1
- package/dist/common/ai/llm/rn/index.d.mts +0 -6
- package/dist/common/ai/llm/rn/index.d.ts +0 -6
- package/dist/common/ai/llm/rn/index.js +0 -59
- package/dist/common/ai/llm/rn/index.js.map +0 -1
- package/dist/common/ai/llm/rn/index.mjs +0 -6
- package/dist/common/ai/llm/rn/index.mjs.map +0 -1
- package/dist/common/ai/llm/ui/electron/index.d.mts +0 -5
- package/dist/common/ai/llm/ui/electron/index.d.ts +0 -5
- package/dist/common/ai/llm/ui/electron/index.js +0 -22
- package/dist/common/ai/llm/ui/electron/index.js.map +0 -1
- package/dist/common/ai/llm/ui/electron/index.mjs +0 -9
- package/dist/common/ai/llm/ui/electron/index.mjs.map +0 -1
- package/dist/common/ai/llm/ui/miniapp/index.d.mts +0 -9
- package/dist/common/ai/llm/ui/miniapp/index.d.ts +0 -9
- package/dist/common/ai/llm/ui/miniapp/index.js +0 -14
- package/dist/common/ai/llm/ui/miniapp/index.js.map +0 -1
- package/dist/common/ai/llm/ui/miniapp/index.mjs +0 -5
- package/dist/common/ai/llm/ui/miniapp/index.mjs.map +0 -1
- package/dist/common/ai/llm/ui/rn/index.d.mts +0 -9
- package/dist/common/ai/llm/ui/rn/index.d.ts +0 -9
- package/dist/common/ai/llm/ui/rn/index.js +0 -14
- package/dist/common/ai/llm/ui/rn/index.js.map +0 -1
- package/dist/common/ai/llm/ui/rn/index.mjs +0 -5
- package/dist/common/ai/llm/ui/rn/index.mjs.map +0 -1
- package/dist/common/ai/llm/ui/web/index.d.mts +0 -15
- package/dist/common/ai/llm/ui/web/index.d.ts +0 -15
- package/dist/common/ai/llm/ui/web/index.js +0 -21
- package/dist/common/ai/llm/ui/web/index.js.map +0 -1
- package/dist/common/ai/llm/ui/web/index.mjs +0 -8
- package/dist/common/ai/llm/ui/web/index.mjs.map +0 -1
- package/dist/common/ai/llm/web/index.d.mts +0 -6
- package/dist/common/ai/llm/web/index.d.ts +0 -6
- package/dist/common/ai/llm/web/index.js +0 -66
- package/dist/common/ai/llm/web/index.js.map +0 -1
- package/dist/common/ai/llm/web/index.mjs +0 -9
- package/dist/common/ai/llm/web/index.mjs.map +0 -1
- package/dist/index-BMgdH5dL.d.mts +0 -1716
- package/dist/index-IXMAeTtN.d.ts +0 -1716
- package/dist/types-B2rs_jq1.d.mts +0 -38
- package/dist/types-DgACCUpT.d.ts +0 -122
- package/dist/types-DwS2Eg0q.d.ts +0 -38
- package/dist/types-LU_BGSzk.d.mts +0 -122
- /package/dist/common/{ai/llm/core → aiApi}/index.js.map +0 -0
- /package/dist/common/{ai/llm/core → aiApi}/index.mjs.map +0 -0
- /package/dist/common/{ai/llm/electron → aiApi/server}/index.js.map +0 -0
- /package/dist/common/{ai/llm/electron → aiApi/server}/index.mjs.map +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { buttonVariants, DialogTrigger, DialogPortal, DialogOverlay, DialogClose, Dialog, Input, DialogTitle, DialogHeader, DialogFooter, DialogDescription, DialogContent, Button, useControllableState, mergeRefs, Portal, useOnClickOutside } from './chunk-MMDSZIXD.mjs';
|
|
2
1
|
import { cn } from './chunk-FUA6ZGMI.mjs';
|
|
3
2
|
import { useLocalStorage } from './chunk-6V2MIQPF.mjs';
|
|
4
3
|
import { __export } from './chunk-MAI35PU6.mjs';
|
|
5
|
-
import * as
|
|
6
|
-
import
|
|
4
|
+
import * as React10 from 'react';
|
|
5
|
+
import React10__default, { useRef, useState, useEffect, useCallback } from 'react';
|
|
7
6
|
import { cva } from 'class-variance-authority';
|
|
8
|
-
import {
|
|
7
|
+
import { createPortal } from 'react-dom';
|
|
8
|
+
import { X, Check, Circle, ChevronRight, ChevronDown, ChevronUp, RotateCcw, Save, AlertCircle, GripVertical } from 'lucide-react';
|
|
9
9
|
import { clsx } from 'clsx';
|
|
10
10
|
import { useRouter } from 'next/navigation';
|
|
11
11
|
|
|
@@ -113,7 +113,53 @@ __export(components_exports, {
|
|
|
113
113
|
badgeVariants: () => badgeVariants,
|
|
114
114
|
buttonVariants: () => buttonVariants
|
|
115
115
|
});
|
|
116
|
-
var
|
|
116
|
+
var buttonVariants = cva(
|
|
117
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
118
|
+
{
|
|
119
|
+
variants: {
|
|
120
|
+
variant: {
|
|
121
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
122
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
123
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
124
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
125
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
126
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
127
|
+
},
|
|
128
|
+
size: {
|
|
129
|
+
default: "h-9 px-4 py-2",
|
|
130
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
131
|
+
lg: "h-10 rounded-md px-8",
|
|
132
|
+
icon: "h-9 w-9"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
defaultVariants: {
|
|
136
|
+
variant: "default",
|
|
137
|
+
size: "default"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
var Button = React10.forwardRef(
|
|
142
|
+
({ className, variant = "default", size = "default", asChild = false, children, ...props }, ref) => {
|
|
143
|
+
if (asChild && React10.isValidElement(children)) {
|
|
144
|
+
const childProps = children.props;
|
|
145
|
+
return React10.cloneElement(children, {
|
|
146
|
+
...props,
|
|
147
|
+
className: cn(buttonVariants({ variant, size, className }), childProps.className)
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
return /* @__PURE__ */ React10.createElement(
|
|
151
|
+
"button",
|
|
152
|
+
{
|
|
153
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
154
|
+
ref,
|
|
155
|
+
...props
|
|
156
|
+
},
|
|
157
|
+
children
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
Button.displayName = "Button";
|
|
162
|
+
var Card = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
117
163
|
"div",
|
|
118
164
|
{
|
|
119
165
|
ref,
|
|
@@ -125,7 +171,7 @@ var Card = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ R
|
|
|
125
171
|
}
|
|
126
172
|
));
|
|
127
173
|
Card.displayName = "Card";
|
|
128
|
-
var CardHeader =
|
|
174
|
+
var CardHeader = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
129
175
|
"div",
|
|
130
176
|
{
|
|
131
177
|
ref,
|
|
@@ -134,7 +180,7 @@ var CardHeader = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
134
180
|
}
|
|
135
181
|
));
|
|
136
182
|
CardHeader.displayName = "CardHeader";
|
|
137
|
-
var CardTitle =
|
|
183
|
+
var CardTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
138
184
|
"div",
|
|
139
185
|
{
|
|
140
186
|
ref,
|
|
@@ -143,7 +189,7 @@ var CardTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
143
189
|
}
|
|
144
190
|
));
|
|
145
191
|
CardTitle.displayName = "CardTitle";
|
|
146
|
-
var CardDescription =
|
|
192
|
+
var CardDescription = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
147
193
|
"div",
|
|
148
194
|
{
|
|
149
195
|
ref,
|
|
@@ -152,9 +198,9 @@ var CardDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
152
198
|
}
|
|
153
199
|
));
|
|
154
200
|
CardDescription.displayName = "CardDescription";
|
|
155
|
-
var CardContent =
|
|
201
|
+
var CardContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
156
202
|
CardContent.displayName = "CardContent";
|
|
157
|
-
var CardFooter =
|
|
203
|
+
var CardFooter = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
158
204
|
"div",
|
|
159
205
|
{
|
|
160
206
|
ref,
|
|
@@ -180,12 +226,29 @@ var badgeVariants = cva(
|
|
|
180
226
|
}
|
|
181
227
|
);
|
|
182
228
|
function Badge({ className, variant, ...props }) {
|
|
183
|
-
return /* @__PURE__ */
|
|
229
|
+
return /* @__PURE__ */ React10.createElement("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
184
230
|
}
|
|
231
|
+
var Input = React10.forwardRef(
|
|
232
|
+
({ className, type, ...props }, ref) => {
|
|
233
|
+
return /* @__PURE__ */ React10.createElement(
|
|
234
|
+
"input",
|
|
235
|
+
{
|
|
236
|
+
type,
|
|
237
|
+
className: cn(
|
|
238
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
239
|
+
className
|
|
240
|
+
),
|
|
241
|
+
ref,
|
|
242
|
+
...props
|
|
243
|
+
}
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
Input.displayName = "Input";
|
|
185
248
|
var labelVariants = cva(
|
|
186
249
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
187
250
|
);
|
|
188
|
-
var Label =
|
|
251
|
+
var Label = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
189
252
|
"label",
|
|
190
253
|
{
|
|
191
254
|
ref,
|
|
@@ -194,7 +257,70 @@ var Label = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
194
257
|
}
|
|
195
258
|
));
|
|
196
259
|
Label.displayName = "Label";
|
|
197
|
-
|
|
260
|
+
function useControllableState({
|
|
261
|
+
value,
|
|
262
|
+
defaultValue,
|
|
263
|
+
onChange
|
|
264
|
+
}) {
|
|
265
|
+
const [internal, setInternal] = React10.useState(defaultValue);
|
|
266
|
+
const isControlled = value !== void 0;
|
|
267
|
+
const state = isControlled ? value : internal;
|
|
268
|
+
const setState = React10.useCallback(
|
|
269
|
+
(next) => {
|
|
270
|
+
if (!isControlled) setInternal(next);
|
|
271
|
+
onChange?.(next);
|
|
272
|
+
},
|
|
273
|
+
[isControlled, onChange]
|
|
274
|
+
);
|
|
275
|
+
return [state, setState];
|
|
276
|
+
}
|
|
277
|
+
function Portal({
|
|
278
|
+
children,
|
|
279
|
+
container
|
|
280
|
+
}) {
|
|
281
|
+
const [mounted, setMounted] = React10.useState(false);
|
|
282
|
+
React10.useEffect(() => {
|
|
283
|
+
setMounted(true);
|
|
284
|
+
}, []);
|
|
285
|
+
if (!mounted) return null;
|
|
286
|
+
return createPortal(children, container ?? document.body);
|
|
287
|
+
}
|
|
288
|
+
function useOnClickOutside(refs, handler, enabled) {
|
|
289
|
+
React10.useEffect(() => {
|
|
290
|
+
if (!enabled) return;
|
|
291
|
+
const listener = (event) => {
|
|
292
|
+
const target = event.target;
|
|
293
|
+
const clickedInside = refs.some((ref) => {
|
|
294
|
+
const el = ref.current;
|
|
295
|
+
return el && el.contains(target);
|
|
296
|
+
});
|
|
297
|
+
if (!clickedInside) {
|
|
298
|
+
handler(event);
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
document.addEventListener("mousedown", listener);
|
|
302
|
+
document.addEventListener("touchstart", listener);
|
|
303
|
+
return () => {
|
|
304
|
+
document.removeEventListener("mousedown", listener);
|
|
305
|
+
document.removeEventListener("touchstart", listener);
|
|
306
|
+
};
|
|
307
|
+
}, [refs, handler, enabled]);
|
|
308
|
+
}
|
|
309
|
+
function mergeRefs(...refs) {
|
|
310
|
+
return (value) => {
|
|
311
|
+
refs.forEach((ref) => {
|
|
312
|
+
if (!ref) return;
|
|
313
|
+
if (typeof ref === "function") {
|
|
314
|
+
ref(value);
|
|
315
|
+
} else {
|
|
316
|
+
ref.current = value;
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// src/common/components/Tabs.tsx
|
|
323
|
+
var TabsContext = React10.createContext(null);
|
|
198
324
|
var Tabs = ({
|
|
199
325
|
value,
|
|
200
326
|
defaultValue = "",
|
|
@@ -207,9 +333,9 @@ var Tabs = ({
|
|
|
207
333
|
defaultValue,
|
|
208
334
|
onChange: onValueChange
|
|
209
335
|
});
|
|
210
|
-
return /* @__PURE__ */
|
|
336
|
+
return /* @__PURE__ */ React10.createElement(TabsContext.Provider, { value: { value: current, setValue: setCurrent } }, /* @__PURE__ */ React10.createElement("div", { className, ...props }));
|
|
211
337
|
};
|
|
212
|
-
var TabsList =
|
|
338
|
+
var TabsList = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
213
339
|
"div",
|
|
214
340
|
{
|
|
215
341
|
ref,
|
|
@@ -221,11 +347,11 @@ var TabsList = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
221
347
|
}
|
|
222
348
|
));
|
|
223
349
|
TabsList.displayName = "TabsList";
|
|
224
|
-
var TabsTrigger =
|
|
350
|
+
var TabsTrigger = React10.forwardRef(
|
|
225
351
|
({ className, value, onClick, ...props }, ref) => {
|
|
226
|
-
const ctx =
|
|
352
|
+
const ctx = React10.useContext(TabsContext);
|
|
227
353
|
const active = ctx?.value === value;
|
|
228
|
-
return /* @__PURE__ */
|
|
354
|
+
return /* @__PURE__ */ React10.createElement(
|
|
229
355
|
"button",
|
|
230
356
|
{
|
|
231
357
|
ref,
|
|
@@ -246,12 +372,12 @@ var TabsTrigger = React6.forwardRef(
|
|
|
246
372
|
}
|
|
247
373
|
);
|
|
248
374
|
TabsTrigger.displayName = "TabsTrigger";
|
|
249
|
-
var TabsContent =
|
|
375
|
+
var TabsContent = React10.forwardRef(
|
|
250
376
|
({ className, value, forceMount = false, ...props }, ref) => {
|
|
251
|
-
const ctx =
|
|
377
|
+
const ctx = React10.useContext(TabsContext);
|
|
252
378
|
const active = ctx?.value === value;
|
|
253
379
|
if (!active && !forceMount) return null;
|
|
254
|
-
return /* @__PURE__ */
|
|
380
|
+
return /* @__PURE__ */ React10.createElement(
|
|
255
381
|
"div",
|
|
256
382
|
{
|
|
257
383
|
ref,
|
|
@@ -267,7 +393,157 @@ var TabsContent = React6.forwardRef(
|
|
|
267
393
|
}
|
|
268
394
|
);
|
|
269
395
|
TabsContent.displayName = "TabsContent";
|
|
270
|
-
var
|
|
396
|
+
var DialogContext = React10.createContext(null);
|
|
397
|
+
var Dialog = ({ open, defaultOpen = false, onOpenChange, children }) => {
|
|
398
|
+
const [isOpen, setIsOpen] = useControllableState({
|
|
399
|
+
value: open,
|
|
400
|
+
defaultValue: defaultOpen,
|
|
401
|
+
onChange: onOpenChange
|
|
402
|
+
});
|
|
403
|
+
const triggerRef = React10.useRef(null);
|
|
404
|
+
const contentRef = React10.useRef(null);
|
|
405
|
+
return /* @__PURE__ */ React10.createElement(DialogContext.Provider, { value: { open: isOpen, setOpen: setIsOpen, triggerRef, contentRef } }, children);
|
|
406
|
+
};
|
|
407
|
+
var DialogTrigger = React10.forwardRef(
|
|
408
|
+
({ children, onClick, ...props }, ref) => {
|
|
409
|
+
const ctx = React10.useContext(DialogContext);
|
|
410
|
+
if (!ctx) return null;
|
|
411
|
+
const mergedRef = mergeRefs(ctx.triggerRef, ref);
|
|
412
|
+
const handleClick = (e) => {
|
|
413
|
+
ctx.setOpen(true);
|
|
414
|
+
onClick?.(e);
|
|
415
|
+
};
|
|
416
|
+
return /* @__PURE__ */ React10.createElement("button", { ref: mergedRef, type: "button", onClick: handleClick, ...props }, children);
|
|
417
|
+
}
|
|
418
|
+
);
|
|
419
|
+
DialogTrigger.displayName = "DialogTrigger";
|
|
420
|
+
var DialogPortal = ({ children }) => {
|
|
421
|
+
const ctx = React10.useContext(DialogContext);
|
|
422
|
+
if (!ctx?.open) return null;
|
|
423
|
+
return /* @__PURE__ */ React10.createElement(Portal, null, children);
|
|
424
|
+
};
|
|
425
|
+
var DialogClose = React10.forwardRef(({ onClick, ...props }, ref) => {
|
|
426
|
+
const ctx = React10.useContext(DialogContext);
|
|
427
|
+
return /* @__PURE__ */ React10.createElement(
|
|
428
|
+
"button",
|
|
429
|
+
{
|
|
430
|
+
ref,
|
|
431
|
+
type: "button",
|
|
432
|
+
onClick: (e) => {
|
|
433
|
+
ctx?.setOpen(false);
|
|
434
|
+
onClick?.(e);
|
|
435
|
+
},
|
|
436
|
+
...props
|
|
437
|
+
}
|
|
438
|
+
);
|
|
439
|
+
});
|
|
440
|
+
DialogClose.displayName = "DialogClose";
|
|
441
|
+
var DialogOverlay = React10.forwardRef(({ className, ...props }, ref) => {
|
|
442
|
+
const ctx = React10.useContext(DialogContext);
|
|
443
|
+
if (!ctx?.open) return null;
|
|
444
|
+
return /* @__PURE__ */ React10.createElement(
|
|
445
|
+
"div",
|
|
446
|
+
{
|
|
447
|
+
ref,
|
|
448
|
+
className: cn("fixed inset-0 z-[9999] bg-black/80", className),
|
|
449
|
+
...props
|
|
450
|
+
}
|
|
451
|
+
);
|
|
452
|
+
});
|
|
453
|
+
DialogOverlay.displayName = "DialogOverlay";
|
|
454
|
+
var DialogContent = React10.forwardRef(
|
|
455
|
+
({ className, children, onPointerDownOutside, onEscapeKeyDown, showCloseButton = true, overlayClassName, ...props }, ref) => {
|
|
456
|
+
const ctx = React10.useContext(DialogContext);
|
|
457
|
+
const open = !!ctx?.open;
|
|
458
|
+
useOnClickOutside(
|
|
459
|
+
[ctx?.contentRef ?? { current: null }, ctx?.triggerRef ?? { current: null }],
|
|
460
|
+
(evt) => {
|
|
461
|
+
onPointerDownOutside?.(evt);
|
|
462
|
+
if (!evt.defaultPrevented) {
|
|
463
|
+
ctx?.setOpen(false);
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
open
|
|
467
|
+
);
|
|
468
|
+
React10.useEffect(() => {
|
|
469
|
+
if (!open) return;
|
|
470
|
+
const onKey = (e) => {
|
|
471
|
+
if (e.key !== "Escape") return;
|
|
472
|
+
onEscapeKeyDown?.(e);
|
|
473
|
+
if (!e.defaultPrevented) {
|
|
474
|
+
ctx?.setOpen(false);
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
document.addEventListener("keydown", onKey);
|
|
478
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
479
|
+
}, [ctx, onEscapeKeyDown, open]);
|
|
480
|
+
if (!ctx || !open) return null;
|
|
481
|
+
return /* @__PURE__ */ React10.createElement(DialogPortal, null, /* @__PURE__ */ React10.createElement(DialogOverlay, { className: overlayClassName }), /* @__PURE__ */ React10.createElement(
|
|
482
|
+
"div",
|
|
483
|
+
{
|
|
484
|
+
ref: mergeRefs(ctx.contentRef, ref),
|
|
485
|
+
className: cn(
|
|
486
|
+
"fixed left-[50%] top-[50%] z-[10000] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg",
|
|
487
|
+
className
|
|
488
|
+
),
|
|
489
|
+
...props
|
|
490
|
+
},
|
|
491
|
+
children,
|
|
492
|
+
showCloseButton ? /* @__PURE__ */ React10.createElement(DialogClose, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100" }, /* @__PURE__ */ React10.createElement(X, { className: "h-4 w-4" }), /* @__PURE__ */ React10.createElement("span", { className: "sr-only" }, "Close")) : null
|
|
493
|
+
));
|
|
494
|
+
}
|
|
495
|
+
);
|
|
496
|
+
DialogContent.displayName = "DialogContent";
|
|
497
|
+
var DialogHeader = ({
|
|
498
|
+
className,
|
|
499
|
+
...props
|
|
500
|
+
}) => /* @__PURE__ */ React10.createElement(
|
|
501
|
+
"div",
|
|
502
|
+
{
|
|
503
|
+
className: cn(
|
|
504
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
505
|
+
className
|
|
506
|
+
),
|
|
507
|
+
...props
|
|
508
|
+
}
|
|
509
|
+
);
|
|
510
|
+
DialogHeader.displayName = "DialogHeader";
|
|
511
|
+
var DialogFooter = ({
|
|
512
|
+
className,
|
|
513
|
+
...props
|
|
514
|
+
}) => /* @__PURE__ */ React10.createElement(
|
|
515
|
+
"div",
|
|
516
|
+
{
|
|
517
|
+
className: cn(
|
|
518
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
519
|
+
className
|
|
520
|
+
),
|
|
521
|
+
...props
|
|
522
|
+
}
|
|
523
|
+
);
|
|
524
|
+
DialogFooter.displayName = "DialogFooter";
|
|
525
|
+
var DialogTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
526
|
+
"h2",
|
|
527
|
+
{
|
|
528
|
+
ref,
|
|
529
|
+
className: cn(
|
|
530
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
531
|
+
className
|
|
532
|
+
),
|
|
533
|
+
...props
|
|
534
|
+
}
|
|
535
|
+
));
|
|
536
|
+
DialogTitle.displayName = "DialogTitle";
|
|
537
|
+
var DialogDescription = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
538
|
+
"p",
|
|
539
|
+
{
|
|
540
|
+
ref,
|
|
541
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
542
|
+
...props
|
|
543
|
+
}
|
|
544
|
+
));
|
|
545
|
+
DialogDescription.displayName = "DialogDescription";
|
|
546
|
+
var AlertDialogContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
271
547
|
DialogContent,
|
|
272
548
|
{
|
|
273
549
|
ref,
|
|
@@ -276,7 +552,7 @@ var AlertDialogContent = React6.forwardRef(({ className, ...props }, ref) => /*
|
|
|
276
552
|
}
|
|
277
553
|
));
|
|
278
554
|
AlertDialogContent.displayName = "AlertDialogContent";
|
|
279
|
-
var AlertDialogAction =
|
|
555
|
+
var AlertDialogAction = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
280
556
|
DialogClose,
|
|
281
557
|
{
|
|
282
558
|
ref,
|
|
@@ -285,7 +561,7 @@ var AlertDialogAction = React6.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
285
561
|
}
|
|
286
562
|
));
|
|
287
563
|
AlertDialogAction.displayName = "AlertDialogAction";
|
|
288
|
-
var AlertDialogCancel =
|
|
564
|
+
var AlertDialogCancel = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
289
565
|
DialogClose,
|
|
290
566
|
{
|
|
291
567
|
ref,
|
|
@@ -298,38 +574,38 @@ var AlertDialogCancel = React6.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
298
574
|
}
|
|
299
575
|
));
|
|
300
576
|
AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
301
|
-
var DropdownMenuContext =
|
|
302
|
-
var DropdownMenuRadioGroupContext =
|
|
577
|
+
var DropdownMenuContext = React10.createContext(null);
|
|
578
|
+
var DropdownMenuRadioGroupContext = React10.createContext(null);
|
|
303
579
|
var DropdownMenu = ({ open, defaultOpen = false, onOpenChange, children }) => {
|
|
304
580
|
const [isOpen, setIsOpen] = useControllableState({
|
|
305
581
|
value: open,
|
|
306
582
|
defaultValue: defaultOpen,
|
|
307
583
|
onChange: onOpenChange
|
|
308
584
|
});
|
|
309
|
-
const triggerRef =
|
|
310
|
-
const contentRef =
|
|
311
|
-
return /* @__PURE__ */
|
|
585
|
+
const triggerRef = React10.useRef(null);
|
|
586
|
+
const contentRef = React10.useRef(null);
|
|
587
|
+
return /* @__PURE__ */ React10.createElement(DropdownMenuContext.Provider, { value: { open: isOpen, setOpen: setIsOpen, triggerRef, contentRef } }, children);
|
|
312
588
|
};
|
|
313
|
-
var DropdownMenuTrigger =
|
|
314
|
-
const ctx =
|
|
589
|
+
var DropdownMenuTrigger = React10.forwardRef(({ children, onClick, ...props }, ref) => {
|
|
590
|
+
const ctx = React10.useContext(DropdownMenuContext);
|
|
315
591
|
if (!ctx) return null;
|
|
316
592
|
const mergedRef = mergeRefs(ctx.triggerRef, ref);
|
|
317
593
|
const handleClick = (e) => {
|
|
318
594
|
ctx.setOpen(!ctx.open);
|
|
319
595
|
onClick?.(e);
|
|
320
596
|
};
|
|
321
|
-
return /* @__PURE__ */
|
|
597
|
+
return /* @__PURE__ */ React10.createElement("button", { ref: mergedRef, type: "button", onClick: handleClick, ...props }, children);
|
|
322
598
|
});
|
|
323
599
|
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
324
|
-
var DropdownMenuGroup = ({ children }) => /* @__PURE__ */
|
|
325
|
-
var DropdownMenuPortal = ({ children }) => /* @__PURE__ */
|
|
326
|
-
var DropdownMenuSub = ({ children }) => /* @__PURE__ */
|
|
327
|
-
var DropdownMenuContent =
|
|
328
|
-
const ctx =
|
|
329
|
-
const [pos, setPos] =
|
|
600
|
+
var DropdownMenuGroup = ({ children }) => /* @__PURE__ */ React10.createElement(React10.Fragment, null, children);
|
|
601
|
+
var DropdownMenuPortal = ({ children }) => /* @__PURE__ */ React10.createElement(Portal, null, children);
|
|
602
|
+
var DropdownMenuSub = ({ children }) => /* @__PURE__ */ React10.createElement(React10.Fragment, null, children);
|
|
603
|
+
var DropdownMenuContent = React10.forwardRef(({ className, sideOffset = 4, style, ...props }, ref) => {
|
|
604
|
+
const ctx = React10.useContext(DropdownMenuContext);
|
|
605
|
+
const [pos, setPos] = React10.useState({ top: 0, left: 0 });
|
|
330
606
|
const open = !!ctx?.open;
|
|
331
607
|
const trigger = ctx?.triggerRef.current ?? null;
|
|
332
|
-
|
|
608
|
+
React10.useLayoutEffect(() => {
|
|
333
609
|
if (!trigger) return;
|
|
334
610
|
const rect = trigger.getBoundingClientRect();
|
|
335
611
|
setPos({ top: rect.bottom + sideOffset, left: rect.left });
|
|
@@ -340,7 +616,7 @@ var DropdownMenuContent = React6.forwardRef(({ className, sideOffset = 4, style,
|
|
|
340
616
|
open
|
|
341
617
|
);
|
|
342
618
|
if (!ctx || !open || !trigger) return null;
|
|
343
|
-
return /* @__PURE__ */
|
|
619
|
+
return /* @__PURE__ */ React10.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React10.createElement(
|
|
344
620
|
"div",
|
|
345
621
|
{
|
|
346
622
|
ref: mergeRefs(ctx.contentRef, ref),
|
|
@@ -354,9 +630,9 @@ var DropdownMenuContent = React6.forwardRef(({ className, sideOffset = 4, style,
|
|
|
354
630
|
));
|
|
355
631
|
});
|
|
356
632
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
357
|
-
var DropdownMenuItem =
|
|
358
|
-
const ctx =
|
|
359
|
-
return /* @__PURE__ */
|
|
633
|
+
var DropdownMenuItem = React10.forwardRef(({ className, inset, onSelect, onClick, ...props }, ref) => {
|
|
634
|
+
const ctx = React10.useContext(DropdownMenuContext);
|
|
635
|
+
return /* @__PURE__ */ React10.createElement(
|
|
360
636
|
"button",
|
|
361
637
|
{
|
|
362
638
|
ref,
|
|
@@ -378,7 +654,7 @@ var DropdownMenuItem = React6.forwardRef(({ className, inset, onSelect, onClick,
|
|
|
378
654
|
);
|
|
379
655
|
});
|
|
380
656
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
381
|
-
var DropdownMenuCheckboxItem =
|
|
657
|
+
var DropdownMenuCheckboxItem = React10.forwardRef(({ className, children, checked = false, onCheckedChange, onClick, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
382
658
|
"button",
|
|
383
659
|
{
|
|
384
660
|
ref,
|
|
@@ -393,7 +669,7 @@ var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, checked
|
|
|
393
669
|
},
|
|
394
670
|
...props
|
|
395
671
|
},
|
|
396
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ React10.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, checked ? /* @__PURE__ */ React10.createElement(Check, { className: "h-4 w-4" }) : null),
|
|
397
673
|
children
|
|
398
674
|
));
|
|
399
675
|
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
@@ -401,12 +677,12 @@ var DropdownMenuRadioGroup = ({
|
|
|
401
677
|
value,
|
|
402
678
|
onValueChange,
|
|
403
679
|
children
|
|
404
|
-
}) => /* @__PURE__ */
|
|
405
|
-
var DropdownMenuRadioItem =
|
|
406
|
-
const radioCtx =
|
|
407
|
-
const menuCtx =
|
|
680
|
+
}) => /* @__PURE__ */ React10.createElement(DropdownMenuRadioGroupContext.Provider, { value: { value, onValueChange } }, children);
|
|
681
|
+
var DropdownMenuRadioItem = React10.forwardRef(({ className, children, value, onClick, ...props }, ref) => {
|
|
682
|
+
const radioCtx = React10.useContext(DropdownMenuRadioGroupContext);
|
|
683
|
+
const menuCtx = React10.useContext(DropdownMenuContext);
|
|
408
684
|
const checked = radioCtx?.value === value;
|
|
409
|
-
return /* @__PURE__ */
|
|
685
|
+
return /* @__PURE__ */ React10.createElement(
|
|
410
686
|
"button",
|
|
411
687
|
{
|
|
412
688
|
ref,
|
|
@@ -422,12 +698,12 @@ var DropdownMenuRadioItem = React6.forwardRef(({ className, children, value, onC
|
|
|
422
698
|
},
|
|
423
699
|
...props
|
|
424
700
|
},
|
|
425
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ React10.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, checked ? /* @__PURE__ */ React10.createElement(Circle, { className: "h-2 w-2 fill-current" }) : null),
|
|
426
702
|
children
|
|
427
703
|
);
|
|
428
704
|
});
|
|
429
705
|
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
430
|
-
var DropdownMenuLabel =
|
|
706
|
+
var DropdownMenuLabel = React10.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
431
707
|
"div",
|
|
432
708
|
{
|
|
433
709
|
ref,
|
|
@@ -436,7 +712,7 @@ var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref)
|
|
|
436
712
|
}
|
|
437
713
|
));
|
|
438
714
|
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
439
|
-
var DropdownMenuSeparator =
|
|
715
|
+
var DropdownMenuSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
440
716
|
"div",
|
|
441
717
|
{
|
|
442
718
|
ref,
|
|
@@ -448,7 +724,7 @@ DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
|
448
724
|
var DropdownMenuShortcut = ({
|
|
449
725
|
className,
|
|
450
726
|
...props
|
|
451
|
-
}) => /* @__PURE__ */
|
|
727
|
+
}) => /* @__PURE__ */ React10.createElement(
|
|
452
728
|
"span",
|
|
453
729
|
{
|
|
454
730
|
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
@@ -456,7 +732,7 @@ var DropdownMenuShortcut = ({
|
|
|
456
732
|
}
|
|
457
733
|
);
|
|
458
734
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
459
|
-
var DropdownMenuSubTrigger =
|
|
735
|
+
var DropdownMenuSubTrigger = React10.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
460
736
|
"button",
|
|
461
737
|
{
|
|
462
738
|
ref,
|
|
@@ -469,10 +745,10 @@ var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ..
|
|
|
469
745
|
...props
|
|
470
746
|
},
|
|
471
747
|
children,
|
|
472
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ React10.createElement(ChevronRight, { className: "ml-auto" })
|
|
473
749
|
));
|
|
474
750
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
475
|
-
var DropdownMenuSubContent =
|
|
751
|
+
var DropdownMenuSubContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
476
752
|
"div",
|
|
477
753
|
{
|
|
478
754
|
ref,
|
|
@@ -484,46 +760,46 @@ var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) =>
|
|
|
484
760
|
}
|
|
485
761
|
));
|
|
486
762
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
487
|
-
var PopoverContext =
|
|
763
|
+
var PopoverContext = React10.createContext(null);
|
|
488
764
|
var Popover = ({ open, defaultOpen = false, onOpenChange, children }) => {
|
|
489
765
|
const [isOpen, setIsOpen] = useControllableState({
|
|
490
766
|
value: open,
|
|
491
767
|
defaultValue: defaultOpen,
|
|
492
768
|
onChange: onOpenChange
|
|
493
769
|
});
|
|
494
|
-
const triggerRef =
|
|
495
|
-
const anchorRef =
|
|
496
|
-
const contentRef =
|
|
497
|
-
return /* @__PURE__ */
|
|
770
|
+
const triggerRef = React10.useRef(null);
|
|
771
|
+
const anchorRef = React10.useRef(null);
|
|
772
|
+
const contentRef = React10.useRef(null);
|
|
773
|
+
return /* @__PURE__ */ React10.createElement(PopoverContext.Provider, { value: { open: isOpen, setOpen: setIsOpen, triggerRef, anchorRef, contentRef } }, children);
|
|
498
774
|
};
|
|
499
|
-
var PopoverTrigger =
|
|
775
|
+
var PopoverTrigger = React10.forwardRef(
|
|
500
776
|
({ children, onClick, ...props }, ref) => {
|
|
501
|
-
const ctx =
|
|
777
|
+
const ctx = React10.useContext(PopoverContext);
|
|
502
778
|
if (!ctx) return null;
|
|
503
779
|
const mergedRef = mergeRefs(ctx.triggerRef, ref);
|
|
504
780
|
const handleClick = (e) => {
|
|
505
781
|
ctx.setOpen(!ctx.open);
|
|
506
782
|
onClick?.(e);
|
|
507
783
|
};
|
|
508
|
-
return /* @__PURE__ */
|
|
784
|
+
return /* @__PURE__ */ React10.createElement("button", { ref: mergedRef, type: "button", onClick: handleClick, ...props }, children);
|
|
509
785
|
}
|
|
510
786
|
);
|
|
511
787
|
PopoverTrigger.displayName = "PopoverTrigger";
|
|
512
|
-
var PopoverAnchor =
|
|
788
|
+
var PopoverAnchor = React10.forwardRef(
|
|
513
789
|
({ ...props }, ref) => {
|
|
514
|
-
const ctx =
|
|
790
|
+
const ctx = React10.useContext(PopoverContext);
|
|
515
791
|
if (!ctx) return null;
|
|
516
|
-
return /* @__PURE__ */
|
|
792
|
+
return /* @__PURE__ */ React10.createElement("span", { ref: mergeRefs(ctx.anchorRef, ref), ...props });
|
|
517
793
|
}
|
|
518
794
|
);
|
|
519
795
|
PopoverAnchor.displayName = "PopoverAnchor";
|
|
520
|
-
var PopoverContent =
|
|
796
|
+
var PopoverContent = React10.forwardRef(
|
|
521
797
|
({ className, align = "center", sideOffset = 4, style, ...props }, ref) => {
|
|
522
|
-
const ctx =
|
|
523
|
-
const [position, setPosition] =
|
|
798
|
+
const ctx = React10.useContext(PopoverContext);
|
|
799
|
+
const [position, setPosition] = React10.useState({ top: 0, left: 0 });
|
|
524
800
|
const open = !!ctx?.open;
|
|
525
801
|
const anchor = ctx?.anchorRef.current ?? ctx?.triggerRef.current ?? null;
|
|
526
|
-
|
|
802
|
+
React10.useLayoutEffect(() => {
|
|
527
803
|
if (!anchor) return;
|
|
528
804
|
const rect = anchor.getBoundingClientRect();
|
|
529
805
|
let left = rect.left + rect.width / 2;
|
|
@@ -537,7 +813,7 @@ var PopoverContent = React6.forwardRef(
|
|
|
537
813
|
open
|
|
538
814
|
);
|
|
539
815
|
if (!ctx || !open) return null;
|
|
540
|
-
return /* @__PURE__ */
|
|
816
|
+
return /* @__PURE__ */ React10.createElement(Portal, null, /* @__PURE__ */ React10.createElement(
|
|
541
817
|
"div",
|
|
542
818
|
{
|
|
543
819
|
ref: mergeRefs(ctx.contentRef, ref),
|
|
@@ -558,12 +834,12 @@ var PopoverContent = React6.forwardRef(
|
|
|
558
834
|
}
|
|
559
835
|
);
|
|
560
836
|
PopoverContent.displayName = "PopoverContent";
|
|
561
|
-
var Progress =
|
|
837
|
+
var Progress = React10.forwardRef(
|
|
562
838
|
({ className, value = 0, max = 100, ...props }, ref) => {
|
|
563
839
|
const safeMax = max <= 0 ? 100 : max;
|
|
564
840
|
const safeValue = Math.max(0, Math.min(value, safeMax));
|
|
565
841
|
const percent = safeValue / safeMax * 100;
|
|
566
|
-
return /* @__PURE__ */
|
|
842
|
+
return /* @__PURE__ */ React10.createElement(
|
|
567
843
|
"div",
|
|
568
844
|
{
|
|
569
845
|
ref,
|
|
@@ -577,7 +853,7 @@ var Progress = React6.forwardRef(
|
|
|
577
853
|
),
|
|
578
854
|
...props
|
|
579
855
|
},
|
|
580
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ React10.createElement(
|
|
581
857
|
"div",
|
|
582
858
|
{
|
|
583
859
|
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
@@ -588,7 +864,7 @@ var Progress = React6.forwardRef(
|
|
|
588
864
|
}
|
|
589
865
|
);
|
|
590
866
|
Progress.displayName = "Progress";
|
|
591
|
-
var ScrollArea =
|
|
867
|
+
var ScrollArea = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
592
868
|
"div",
|
|
593
869
|
{
|
|
594
870
|
ref,
|
|
@@ -598,8 +874,8 @@ var ScrollArea = React6.forwardRef(({ className, children, ...props }, ref) => /
|
|
|
598
874
|
children
|
|
599
875
|
));
|
|
600
876
|
ScrollArea.displayName = "ScrollArea";
|
|
601
|
-
var ScrollBar =
|
|
602
|
-
({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */
|
|
877
|
+
var ScrollBar = React10.forwardRef(
|
|
878
|
+
({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
603
879
|
"div",
|
|
604
880
|
{
|
|
605
881
|
ref,
|
|
@@ -613,8 +889,8 @@ var ScrollBar = React6.forwardRef(
|
|
|
613
889
|
)
|
|
614
890
|
);
|
|
615
891
|
ScrollBar.displayName = "ScrollBar";
|
|
616
|
-
var SelectContext =
|
|
617
|
-
var SelectGroupContext =
|
|
892
|
+
var SelectContext = React10.createContext(null);
|
|
893
|
+
var SelectGroupContext = React10.createContext(false);
|
|
618
894
|
var Select = ({
|
|
619
895
|
value,
|
|
620
896
|
defaultValue,
|
|
@@ -639,10 +915,10 @@ var Select = ({
|
|
|
639
915
|
}
|
|
640
916
|
}
|
|
641
917
|
});
|
|
642
|
-
const triggerRef =
|
|
643
|
-
const contentRef =
|
|
644
|
-
const itemsRef =
|
|
645
|
-
return /* @__PURE__ */
|
|
918
|
+
const triggerRef = React10.useRef(null);
|
|
919
|
+
const contentRef = React10.useRef(null);
|
|
920
|
+
const itemsRef = React10.useRef(/* @__PURE__ */ new Map());
|
|
921
|
+
return /* @__PURE__ */ React10.createElement(
|
|
646
922
|
SelectContext.Provider,
|
|
647
923
|
{
|
|
648
924
|
value: {
|
|
@@ -662,23 +938,23 @@ var Select = ({
|
|
|
662
938
|
children
|
|
663
939
|
);
|
|
664
940
|
};
|
|
665
|
-
var SelectGroup = ({ children }) => /* @__PURE__ */
|
|
941
|
+
var SelectGroup = ({ children }) => /* @__PURE__ */ React10.createElement(SelectGroupContext.Provider, { value: true }, children);
|
|
666
942
|
var SelectValue = ({
|
|
667
943
|
placeholder,
|
|
668
944
|
children
|
|
669
945
|
}) => {
|
|
670
|
-
const ctx =
|
|
946
|
+
const ctx = React10.useContext(SelectContext);
|
|
671
947
|
if (!ctx) return null;
|
|
672
|
-
if (children) return /* @__PURE__ */
|
|
948
|
+
if (children) return /* @__PURE__ */ React10.createElement(React10.Fragment, null, children);
|
|
673
949
|
if (ctx.value && ctx.itemsRef.current.has(ctx.value)) {
|
|
674
|
-
return /* @__PURE__ */
|
|
950
|
+
return /* @__PURE__ */ React10.createElement(React10.Fragment, null, ctx.itemsRef.current.get(ctx.value));
|
|
675
951
|
}
|
|
676
|
-
return /* @__PURE__ */
|
|
952
|
+
return /* @__PURE__ */ React10.createElement("span", { className: "text-muted-foreground" }, placeholder);
|
|
677
953
|
};
|
|
678
|
-
var SelectTrigger =
|
|
679
|
-
const ctx =
|
|
954
|
+
var SelectTrigger = React10.forwardRef(({ className, children, onClick, ...props }, ref) => {
|
|
955
|
+
const ctx = React10.useContext(SelectContext);
|
|
680
956
|
if (!ctx) return null;
|
|
681
|
-
return /* @__PURE__ */
|
|
957
|
+
return /* @__PURE__ */ React10.createElement(
|
|
682
958
|
"button",
|
|
683
959
|
{
|
|
684
960
|
ref: mergeRefs(ctx.triggerRef, ref),
|
|
@@ -693,37 +969,37 @@ var SelectTrigger = React6.forwardRef(({ className, children, onClick, ...props
|
|
|
693
969
|
},
|
|
694
970
|
...props
|
|
695
971
|
},
|
|
696
|
-
/* @__PURE__ */
|
|
697
|
-
/* @__PURE__ */
|
|
972
|
+
/* @__PURE__ */ React10.createElement("span", null, children),
|
|
973
|
+
/* @__PURE__ */ React10.createElement(ChevronDown, { className: "h-4 w-4 opacity-50" })
|
|
698
974
|
);
|
|
699
975
|
});
|
|
700
976
|
SelectTrigger.displayName = "SelectTrigger";
|
|
701
|
-
var SelectScrollUpButton =
|
|
977
|
+
var SelectScrollUpButton = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
702
978
|
"div",
|
|
703
979
|
{
|
|
704
980
|
ref,
|
|
705
981
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
706
982
|
...props
|
|
707
983
|
},
|
|
708
|
-
/* @__PURE__ */
|
|
984
|
+
/* @__PURE__ */ React10.createElement(ChevronUp, { className: "h-4 w-4" })
|
|
709
985
|
));
|
|
710
986
|
SelectScrollUpButton.displayName = "SelectScrollUpButton";
|
|
711
|
-
var SelectScrollDownButton =
|
|
987
|
+
var SelectScrollDownButton = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
712
988
|
"div",
|
|
713
989
|
{
|
|
714
990
|
ref,
|
|
715
991
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
716
992
|
...props
|
|
717
993
|
},
|
|
718
|
-
/* @__PURE__ */
|
|
994
|
+
/* @__PURE__ */ React10.createElement(ChevronDown, { className: "h-4 w-4" })
|
|
719
995
|
));
|
|
720
996
|
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
721
|
-
var SelectContent =
|
|
722
|
-
const ctx =
|
|
723
|
-
const [pos, setPos] =
|
|
997
|
+
var SelectContent = React10.forwardRef(({ className, children, style, ...props }, ref) => {
|
|
998
|
+
const ctx = React10.useContext(SelectContext);
|
|
999
|
+
const [pos, setPos] = React10.useState({ top: 0, left: 0, width: 0 });
|
|
724
1000
|
const open = !!ctx?.open;
|
|
725
1001
|
const trigger = ctx?.triggerRef.current ?? null;
|
|
726
|
-
|
|
1002
|
+
React10.useLayoutEffect(() => {
|
|
727
1003
|
if (!trigger) return;
|
|
728
1004
|
const rect = trigger.getBoundingClientRect();
|
|
729
1005
|
setPos({ top: rect.bottom + 4, left: rect.left, width: rect.width });
|
|
@@ -734,7 +1010,7 @@ var SelectContent = React6.forwardRef(({ className, children, style, ...props },
|
|
|
734
1010
|
open
|
|
735
1011
|
);
|
|
736
1012
|
if (!ctx || !open || !trigger) return null;
|
|
737
|
-
return /* @__PURE__ */
|
|
1013
|
+
return /* @__PURE__ */ React10.createElement(Portal, null, /* @__PURE__ */ React10.createElement(
|
|
738
1014
|
"div",
|
|
739
1015
|
{
|
|
740
1016
|
ref: mergeRefs(ctx.contentRef, ref),
|
|
@@ -751,11 +1027,11 @@ var SelectContent = React6.forwardRef(({ className, children, style, ...props },
|
|
|
751
1027
|
},
|
|
752
1028
|
...props
|
|
753
1029
|
},
|
|
754
|
-
/* @__PURE__ */
|
|
1030
|
+
/* @__PURE__ */ React10.createElement("div", { className: "p-1" }, children)
|
|
755
1031
|
));
|
|
756
1032
|
});
|
|
757
1033
|
SelectContent.displayName = "SelectContent";
|
|
758
|
-
var SelectLabel =
|
|
1034
|
+
var SelectLabel = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
759
1035
|
"div",
|
|
760
1036
|
{
|
|
761
1037
|
ref,
|
|
@@ -764,10 +1040,10 @@ var SelectLabel = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
764
1040
|
}
|
|
765
1041
|
));
|
|
766
1042
|
SelectLabel.displayName = "SelectLabel";
|
|
767
|
-
var SelectItem =
|
|
1043
|
+
var SelectItem = React10.forwardRef(
|
|
768
1044
|
({ className, children, value, onClick, ...props }, ref) => {
|
|
769
|
-
const ctx =
|
|
770
|
-
|
|
1045
|
+
const ctx = React10.useContext(SelectContext);
|
|
1046
|
+
React10.useEffect(() => {
|
|
771
1047
|
if (!ctx) return;
|
|
772
1048
|
ctx.itemsRef.current.set(value, children);
|
|
773
1049
|
return () => {
|
|
@@ -776,7 +1052,7 @@ var SelectItem = React6.forwardRef(
|
|
|
776
1052
|
}, [ctx, value, children]);
|
|
777
1053
|
if (!ctx) return null;
|
|
778
1054
|
const selected = ctx.value === value;
|
|
779
|
-
return /* @__PURE__ */
|
|
1055
|
+
return /* @__PURE__ */ React10.createElement(
|
|
780
1056
|
"button",
|
|
781
1057
|
{
|
|
782
1058
|
ref,
|
|
@@ -791,13 +1067,13 @@ var SelectItem = React6.forwardRef(
|
|
|
791
1067
|
},
|
|
792
1068
|
...props
|
|
793
1069
|
},
|
|
794
|
-
/* @__PURE__ */
|
|
795
|
-
/* @__PURE__ */
|
|
1070
|
+
/* @__PURE__ */ React10.createElement("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center" }, selected ? /* @__PURE__ */ React10.createElement(Check, { className: "h-4 w-4" }) : null),
|
|
1071
|
+
/* @__PURE__ */ React10.createElement("span", null, children)
|
|
796
1072
|
);
|
|
797
1073
|
}
|
|
798
1074
|
);
|
|
799
1075
|
SelectItem.displayName = "SelectItem";
|
|
800
|
-
var SelectSeparator =
|
|
1076
|
+
var SelectSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
801
1077
|
"div",
|
|
802
1078
|
{
|
|
803
1079
|
ref,
|
|
@@ -806,8 +1082,8 @@ var SelectSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
806
1082
|
}
|
|
807
1083
|
));
|
|
808
1084
|
SelectSeparator.displayName = "SelectSeparator";
|
|
809
|
-
var Separator =
|
|
810
|
-
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */
|
|
1085
|
+
var Separator = React10.forwardRef(
|
|
1086
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
811
1087
|
"div",
|
|
812
1088
|
{
|
|
813
1089
|
ref,
|
|
@@ -839,8 +1115,8 @@ var sheetVariants = cva(
|
|
|
839
1115
|
}
|
|
840
1116
|
}
|
|
841
1117
|
);
|
|
842
|
-
var SheetContent =
|
|
843
|
-
({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */
|
|
1118
|
+
var SheetContent = React10.forwardRef(
|
|
1119
|
+
({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
844
1120
|
DialogContent,
|
|
845
1121
|
{
|
|
846
1122
|
ref,
|
|
@@ -852,7 +1128,7 @@ var SheetContent = React6.forwardRef(
|
|
|
852
1128
|
showCloseButton: false,
|
|
853
1129
|
...props
|
|
854
1130
|
},
|
|
855
|
-
/* @__PURE__ */
|
|
1131
|
+
/* @__PURE__ */ React10.createElement(DialogClose, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100" }, /* @__PURE__ */ React10.createElement(X, { className: "h-4 w-4" }), /* @__PURE__ */ React10.createElement("span", { className: "sr-only" }, "Close")),
|
|
856
1132
|
children
|
|
857
1133
|
)
|
|
858
1134
|
);
|
|
@@ -860,7 +1136,7 @@ SheetContent.displayName = "SheetContent";
|
|
|
860
1136
|
var SheetHeader = ({
|
|
861
1137
|
className,
|
|
862
1138
|
...props
|
|
863
|
-
}) => /* @__PURE__ */
|
|
1139
|
+
}) => /* @__PURE__ */ React10.createElement(
|
|
864
1140
|
"div",
|
|
865
1141
|
{
|
|
866
1142
|
className: cn(
|
|
@@ -874,7 +1150,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
874
1150
|
var SheetFooter = ({
|
|
875
1151
|
className,
|
|
876
1152
|
...props
|
|
877
|
-
}) => /* @__PURE__ */
|
|
1153
|
+
}) => /* @__PURE__ */ React10.createElement(
|
|
878
1154
|
"div",
|
|
879
1155
|
{
|
|
880
1156
|
className: cn(
|
|
@@ -885,7 +1161,7 @@ var SheetFooter = ({
|
|
|
885
1161
|
}
|
|
886
1162
|
);
|
|
887
1163
|
SheetFooter.displayName = "SheetFooter";
|
|
888
|
-
var SheetTitle =
|
|
1164
|
+
var SheetTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
889
1165
|
"h2",
|
|
890
1166
|
{
|
|
891
1167
|
ref,
|
|
@@ -894,7 +1170,7 @@ var SheetTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
894
1170
|
}
|
|
895
1171
|
));
|
|
896
1172
|
SheetTitle.displayName = "SheetTitle";
|
|
897
|
-
var SheetDescription =
|
|
1173
|
+
var SheetDescription = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10.createElement(
|
|
898
1174
|
"p",
|
|
899
1175
|
{
|
|
900
1176
|
ref,
|
|
@@ -903,8 +1179,8 @@ var SheetDescription = React6.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
903
1179
|
}
|
|
904
1180
|
));
|
|
905
1181
|
SheetDescription.displayName = "SheetDescription";
|
|
906
|
-
var Textarea =
|
|
907
|
-
return /* @__PURE__ */
|
|
1182
|
+
var Textarea = React10.forwardRef(({ className, ...props }, ref) => {
|
|
1183
|
+
return /* @__PURE__ */ React10.createElement(
|
|
908
1184
|
"textarea",
|
|
909
1185
|
{
|
|
910
1186
|
className: cn(
|
|
@@ -917,25 +1193,25 @@ var Textarea = React6.forwardRef(({ className, ...props }, ref) => {
|
|
|
917
1193
|
);
|
|
918
1194
|
});
|
|
919
1195
|
Textarea.displayName = "Textarea";
|
|
920
|
-
var TooltipConfigContext =
|
|
1196
|
+
var TooltipConfigContext = React10.createContext({
|
|
921
1197
|
delayDuration: 200
|
|
922
1198
|
});
|
|
923
|
-
var TooltipContext =
|
|
1199
|
+
var TooltipContext = React10.createContext(null);
|
|
924
1200
|
var TooltipProvider = ({
|
|
925
1201
|
children,
|
|
926
1202
|
delayDuration = 200
|
|
927
1203
|
}) => {
|
|
928
|
-
return /* @__PURE__ */
|
|
1204
|
+
return /* @__PURE__ */ React10.createElement(TooltipConfigContext.Provider, { value: { delayDuration } }, children);
|
|
929
1205
|
};
|
|
930
1206
|
var Tooltip = ({ children }) => {
|
|
931
|
-
const [open, setOpen] =
|
|
932
|
-
const triggerRef =
|
|
933
|
-
return /* @__PURE__ */
|
|
1207
|
+
const [open, setOpen] = React10.useState(false);
|
|
1208
|
+
const triggerRef = React10.useRef(null);
|
|
1209
|
+
return /* @__PURE__ */ React10.createElement(TooltipContext.Provider, { value: { open, setOpen, triggerRef } }, children);
|
|
934
1210
|
};
|
|
935
|
-
var TooltipTrigger =
|
|
936
|
-
const ctx =
|
|
937
|
-
const cfg =
|
|
938
|
-
const timer =
|
|
1211
|
+
var TooltipTrigger = React10.forwardRef(({ children, ...props }, ref) => {
|
|
1212
|
+
const ctx = React10.useContext(TooltipContext);
|
|
1213
|
+
const cfg = React10.useContext(TooltipConfigContext);
|
|
1214
|
+
const timer = React10.useRef(null);
|
|
939
1215
|
if (!ctx) return null;
|
|
940
1216
|
const setRef = mergeRefs(ctx.triggerRef, ref);
|
|
941
1217
|
const openWithDelay = () => {
|
|
@@ -953,15 +1229,15 @@ var TooltipTrigger = React6.forwardRef(({ children, ...props }, ref) => {
|
|
|
953
1229
|
onBlur: closeNow,
|
|
954
1230
|
...props
|
|
955
1231
|
};
|
|
956
|
-
return /* @__PURE__ */
|
|
1232
|
+
return /* @__PURE__ */ React10.createElement("span", { ref: setRef, ...shared }, children);
|
|
957
1233
|
});
|
|
958
1234
|
TooltipTrigger.displayName = "TooltipTrigger";
|
|
959
|
-
var TooltipContent =
|
|
960
|
-
const ctx =
|
|
961
|
-
const [pos, setPos] =
|
|
1235
|
+
var TooltipContent = React10.forwardRef(({ className, sideOffset = 4, style, ...props }, ref) => {
|
|
1236
|
+
const ctx = React10.useContext(TooltipContext);
|
|
1237
|
+
const [pos, setPos] = React10.useState({ top: 0, left: 0 });
|
|
962
1238
|
const open = !!ctx?.open;
|
|
963
1239
|
const trigger = ctx?.triggerRef.current ?? null;
|
|
964
|
-
|
|
1240
|
+
React10.useLayoutEffect(() => {
|
|
965
1241
|
if (!trigger) return;
|
|
966
1242
|
const rect = trigger.getBoundingClientRect();
|
|
967
1243
|
setPos({
|
|
@@ -970,7 +1246,7 @@ var TooltipContent = React6.forwardRef(({ className, sideOffset = 4, style, ...p
|
|
|
970
1246
|
});
|
|
971
1247
|
}, [trigger, sideOffset]);
|
|
972
1248
|
if (!ctx || !open || !trigger) return null;
|
|
973
|
-
return /* @__PURE__ */
|
|
1249
|
+
return /* @__PURE__ */ React10.createElement(Portal, null, /* @__PURE__ */ React10.createElement(
|
|
974
1250
|
"div",
|
|
975
1251
|
{
|
|
976
1252
|
ref,
|
|
@@ -990,10 +1266,10 @@ var TooltipContent = React6.forwardRef(({ className, sideOffset = 4, style, ...p
|
|
|
990
1266
|
));
|
|
991
1267
|
});
|
|
992
1268
|
TooltipContent.displayName = "TooltipContent";
|
|
993
|
-
var AvatarContext =
|
|
994
|
-
var Avatar =
|
|
995
|
-
const [status, setStatus] =
|
|
996
|
-
return /* @__PURE__ */
|
|
1269
|
+
var AvatarContext = React10.createContext(null);
|
|
1270
|
+
var Avatar = React10.forwardRef(({ className, ...props }, ref) => {
|
|
1271
|
+
const [status, setStatus] = React10.useState("idle");
|
|
1272
|
+
return /* @__PURE__ */ React10.createElement(AvatarContext.Provider, { value: { status, setStatus } }, /* @__PURE__ */ React10.createElement(
|
|
997
1273
|
"span",
|
|
998
1274
|
{
|
|
999
1275
|
ref,
|
|
@@ -1006,9 +1282,9 @@ var Avatar = React6.forwardRef(({ className, ...props }, ref) => {
|
|
|
1006
1282
|
));
|
|
1007
1283
|
});
|
|
1008
1284
|
Avatar.displayName = "Avatar";
|
|
1009
|
-
var AvatarImage =
|
|
1010
|
-
const ctx =
|
|
1011
|
-
return /* @__PURE__ */
|
|
1285
|
+
var AvatarImage = React10.forwardRef(({ className, onLoad, onError, ...props }, ref) => {
|
|
1286
|
+
const ctx = React10.useContext(AvatarContext);
|
|
1287
|
+
return /* @__PURE__ */ React10.createElement(
|
|
1012
1288
|
"img",
|
|
1013
1289
|
{
|
|
1014
1290
|
ref,
|
|
@@ -1030,11 +1306,11 @@ var AvatarImage = React6.forwardRef(({ className, onLoad, onError, ...props }, r
|
|
|
1030
1306
|
);
|
|
1031
1307
|
});
|
|
1032
1308
|
AvatarImage.displayName = "AvatarImage";
|
|
1033
|
-
var AvatarFallback =
|
|
1034
|
-
const ctx =
|
|
1309
|
+
var AvatarFallback = React10.forwardRef(({ className, ...props }, ref) => {
|
|
1310
|
+
const ctx = React10.useContext(AvatarContext);
|
|
1035
1311
|
const show = ctx?.status !== "loaded";
|
|
1036
1312
|
if (!show) return null;
|
|
1037
|
-
return /* @__PURE__ */
|
|
1313
|
+
return /* @__PURE__ */ React10.createElement(
|
|
1038
1314
|
"span",
|
|
1039
1315
|
{
|
|
1040
1316
|
ref,
|
|
@@ -1076,13 +1352,13 @@ function Grid({
|
|
|
1076
1352
|
}) {
|
|
1077
1353
|
const gridColsClasses = buildGridColsClasses(columns);
|
|
1078
1354
|
const gapClass = getGapClassName(gap);
|
|
1079
|
-
return /* @__PURE__ */
|
|
1355
|
+
return /* @__PURE__ */ React10__default.createElement(
|
|
1080
1356
|
"div",
|
|
1081
1357
|
{
|
|
1082
1358
|
className: clsx("grid", gridColsClasses, gapClass, className),
|
|
1083
1359
|
style
|
|
1084
1360
|
},
|
|
1085
|
-
items.map((item, index) => /* @__PURE__ */
|
|
1361
|
+
items.map((item, index) => /* @__PURE__ */ React10__default.createElement("div", { key: item.id }, renderItem(item, index)))
|
|
1086
1362
|
);
|
|
1087
1363
|
}
|
|
1088
1364
|
var SearchBox = ({
|
|
@@ -1125,7 +1401,7 @@ var SearchBox = ({
|
|
|
1125
1401
|
};
|
|
1126
1402
|
const styles = getSizeStyles();
|
|
1127
1403
|
const isLarge = size === "large";
|
|
1128
|
-
return /* @__PURE__ */
|
|
1404
|
+
return /* @__PURE__ */ React10__default.createElement("div", { className: "relative group w-full" }, /* @__PURE__ */ React10__default.createElement(
|
|
1129
1405
|
"input",
|
|
1130
1406
|
{
|
|
1131
1407
|
type: "text",
|
|
@@ -1143,7 +1419,7 @@ var SearchBox = ({
|
|
|
1143
1419
|
isLarge ? "font-medium" : "font-normal"
|
|
1144
1420
|
)
|
|
1145
1421
|
}
|
|
1146
|
-
), searchQuery && /* @__PURE__ */
|
|
1422
|
+
), searchQuery && /* @__PURE__ */ React10__default.createElement(
|
|
1147
1423
|
"button",
|
|
1148
1424
|
{
|
|
1149
1425
|
onClick: () => onSearchChange(""),
|
|
@@ -1153,10 +1429,10 @@ var SearchBox = ({
|
|
|
1153
1429
|
"transform -translate-y-1/2 z-10 group/clear"
|
|
1154
1430
|
)
|
|
1155
1431
|
},
|
|
1156
|
-
/* @__PURE__ */
|
|
1432
|
+
/* @__PURE__ */ React10__default.createElement("div", { className: clsx(
|
|
1157
1433
|
styles.clearButton,
|
|
1158
1434
|
"flex items-center justify-center rounded-full bg-gray-100 hover:bg-gray-200 transition-all duration-200 group-hover/clear:scale-105"
|
|
1159
|
-
) }, /* @__PURE__ */
|
|
1435
|
+
) }, /* @__PURE__ */ React10__default.createElement(
|
|
1160
1436
|
"svg",
|
|
1161
1437
|
{
|
|
1162
1438
|
className: clsx(styles.clearIcon, "text-gray-500 group-hover/clear:text-gray-700"),
|
|
@@ -1164,7 +1440,7 @@ var SearchBox = ({
|
|
|
1164
1440
|
stroke: "currentColor",
|
|
1165
1441
|
viewBox: "0 0 24 24"
|
|
1166
1442
|
},
|
|
1167
|
-
/* @__PURE__ */
|
|
1443
|
+
/* @__PURE__ */ React10__default.createElement(
|
|
1168
1444
|
"path",
|
|
1169
1445
|
{
|
|
1170
1446
|
strokeLinecap: "round",
|
|
@@ -1180,7 +1456,7 @@ var Timeline = ({ items = [] }) => {
|
|
|
1180
1456
|
if (!items || items.length === 0) {
|
|
1181
1457
|
return null;
|
|
1182
1458
|
}
|
|
1183
|
-
return /* @__PURE__ */
|
|
1459
|
+
return /* @__PURE__ */ React10__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React10__default.createElement("div", { className: "absolute left-4 top-0 bottom-0 w-0.5 bg-gray-200" }), items.map((item, index) => /* @__PURE__ */ React10__default.createElement("div", { key: index, className: "relative pl-12 pb-8" }, /* @__PURE__ */ React10__default.createElement("div", { className: "absolute left-0 w-8 h-8 rounded-full bg-blue-500 border-4 border-white shadow-md flex items-center justify-center" }, /* @__PURE__ */ React10__default.createElement("div", { className: "w-2 h-2 rounded-full bg-white" })), /* @__PURE__ */ React10__default.createElement("div", { className: "bg-white rounded-lg p-4 shadow-md" }, /* @__PURE__ */ React10__default.createElement("div", { className: "text-sm text-gray-500 mb-2" }, item.date), /* @__PURE__ */ React10__default.createElement("h4", { className: "text-lg font-semibold mb-2" }, item.title), /* @__PURE__ */ React10__default.createElement("p", { className: "text-gray-600" }, item.description)))));
|
|
1184
1460
|
};
|
|
1185
1461
|
var CollisionBalls = ({
|
|
1186
1462
|
collisionBallsConfig: {
|
|
@@ -1443,7 +1719,7 @@ var CollisionBalls = ({
|
|
|
1443
1719
|
y: (event.clientY - rect.top) * scaleY
|
|
1444
1720
|
};
|
|
1445
1721
|
};
|
|
1446
|
-
return /* @__PURE__ */
|
|
1722
|
+
return /* @__PURE__ */ React10__default.createElement("div", { style: { width: "100%", height: "100%", position: "relative", backgroundColor: "#f9fafb", borderRadius: "0.5rem" } }, /* @__PURE__ */ React10__default.createElement("div", { ref: containerRef, style: { width: "100%", height: "100%", position: "absolute", top: 0, left: 0 } }, /* @__PURE__ */ React10__default.createElement(
|
|
1447
1723
|
"canvas",
|
|
1448
1724
|
{
|
|
1449
1725
|
ref: canvasRef,
|
|
@@ -1458,14 +1734,14 @@ var CollisionBalls = ({
|
|
|
1458
1734
|
onMouseUp: handleMouseUp,
|
|
1459
1735
|
onMouseLeave: handleMouseUp
|
|
1460
1736
|
}
|
|
1461
|
-
)), /* @__PURE__ */
|
|
1737
|
+
)), /* @__PURE__ */ React10__default.createElement("div", { className: "absolute bottom-4 right-4 flex gap-2" }, /* @__PURE__ */ React10__default.createElement(
|
|
1462
1738
|
"button",
|
|
1463
1739
|
{
|
|
1464
1740
|
onClick: shake,
|
|
1465
1741
|
className: clsx("px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors", isShaking ? "animate-pulse" : "")
|
|
1466
1742
|
},
|
|
1467
1743
|
"\u6447\u4E00\u6447"
|
|
1468
|
-
), /* @__PURE__ */
|
|
1744
|
+
), /* @__PURE__ */ React10__default.createElement(
|
|
1469
1745
|
"button",
|
|
1470
1746
|
{
|
|
1471
1747
|
onClick: slowdown,
|
|
@@ -1614,18 +1890,18 @@ function GenericOrderManager({
|
|
|
1614
1890
|
setItems([...originalOrder]);
|
|
1615
1891
|
};
|
|
1616
1892
|
if (loading) {
|
|
1617
|
-
return /* @__PURE__ */
|
|
1893
|
+
return /* @__PURE__ */ React10__default.createElement("div", { className: cn("flex flex-col items-center justify-center p-12 text-gray-500", className) }, /* @__PURE__ */ React10__default.createElement("div", { className: "w-6 h-6 border-2 border-gray-200 border-t-blue-500 rounded-full animate-spin mb-2" }), /* @__PURE__ */ React10__default.createElement("span", null, loadingMessage));
|
|
1618
1894
|
}
|
|
1619
|
-
return /* @__PURE__ */
|
|
1895
|
+
return /* @__PURE__ */ React10__default.createElement("div", { className: cn("bg-white rounded-xl p-6 shadow-md border-2 border-gray-100", className) }, /* @__PURE__ */ React10__default.createElement("div", { className: "flex items-center justify-between mb-4 pb-3 border-b border-gray-100 sm:flex-row flex-col sm:items-center items-start gap-4" }, /* @__PURE__ */ React10__default.createElement("h3", { className: "m-0 text-gray-900 text-lg font-semibold" }, title), /* @__PURE__ */ React10__default.createElement("div", { className: "flex gap-3 w-full sm:w-auto" }, hasChanges && /* @__PURE__ */ React10__default.createElement(React10__default.Fragment, null, /* @__PURE__ */ React10__default.createElement(
|
|
1620
1896
|
"button",
|
|
1621
1897
|
{
|
|
1622
1898
|
onClick: handleResetOrder,
|
|
1623
1899
|
className: "flex items-center gap-2 bg-amber-500 hover:bg-amber-600 text-white px-4 py-2 rounded-lg font-medium transition-colors",
|
|
1624
1900
|
title: "\u91CD\u7F6E\u4E3A\u539F\u59CB\u987A\u5E8F"
|
|
1625
1901
|
},
|
|
1626
|
-
/* @__PURE__ */
|
|
1902
|
+
/* @__PURE__ */ React10__default.createElement(RotateCcw, { size: 16 }),
|
|
1627
1903
|
"\u91CD\u7F6E"
|
|
1628
|
-
), /* @__PURE__ */
|
|
1904
|
+
), /* @__PURE__ */ React10__default.createElement(
|
|
1629
1905
|
"button",
|
|
1630
1906
|
{
|
|
1631
1907
|
onClick: handleSaveOrder,
|
|
@@ -1633,9 +1909,9 @@ function GenericOrderManager({
|
|
|
1633
1909
|
className: "flex items-center gap-2 bg-blue-500 hover:bg-blue-600 disabled:opacity-50 disabled:cursor-not-allowed text-white px-4 py-2 rounded-lg font-medium transition-colors",
|
|
1634
1910
|
title: "\u4FDD\u5B58\u65B0\u987A\u5E8F"
|
|
1635
1911
|
},
|
|
1636
|
-
/* @__PURE__ */
|
|
1912
|
+
/* @__PURE__ */ React10__default.createElement(Save, { size: 16 }),
|
|
1637
1913
|
saving ? "\u4FDD\u5B58\u4E2D..." : "\u4FDD\u5B58\u987A\u5E8F"
|
|
1638
|
-
)))), error && /* @__PURE__ */
|
|
1914
|
+
)))), error && /* @__PURE__ */ React10__default.createElement("div", { className: "flex items-center gap-2 bg-red-50 text-red-600 p-3 rounded-lg mb-4 border border-red-200" }, /* @__PURE__ */ React10__default.createElement(AlertCircle, { size: 16 }), /* @__PURE__ */ React10__default.createElement("span", null, error)), /* @__PURE__ */ React10__default.createElement("div", { className: "bg-slate-50 border border-slate-200 rounded-lg p-4 mb-6" }, /* @__PURE__ */ React10__default.createElement("p", { className: "m-0 mb-2 color-slate-500 text-sm" }, description), /* @__PURE__ */ React10__default.createElement("ul", { className: "m-0 pl-6 color-slate-500 text-sm list-disc" }, /* @__PURE__ */ React10__default.createElement("li", { className: "mb-1" }, "\u4F7F\u7528\u62D6\u62FD\uFF1A\u70B9\u51FB\u5E76\u62D6\u52A8 ", /* @__PURE__ */ React10__default.createElement(GripVertical, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u56FE\u6807"), /* @__PURE__ */ React10__default.createElement("li", { className: "mb-1" }, "\u4F7F\u7528\u6309\u94AE\uFF1A\u70B9\u51FB ", /* @__PURE__ */ React10__default.createElement(ChevronUp, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u6216 ", /* @__PURE__ */ React10__default.createElement(ChevronDown, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u6309\u94AE"), /* @__PURE__ */ React10__default.createElement("li", null, '\u5B8C\u6210\u8C03\u6574\u540E\uFF0C\u70B9\u51FB"\u4FDD\u5B58\u987A\u5E8F"\u6309\u94AE\u4FDD\u5B58\u66F4\u6539'))), /* @__PURE__ */ React10__default.createElement("div", { className: "flex flex-col gap-3" }, items.map((item, index) => /* @__PURE__ */ React10__default.createElement(
|
|
1639
1915
|
"div",
|
|
1640
1916
|
{
|
|
1641
1917
|
key: item.id,
|
|
@@ -1648,10 +1924,10 @@ function GenericOrderManager({
|
|
|
1648
1924
|
onDragOver: (e) => handleDragOver(e),
|
|
1649
1925
|
onDrop: (e) => handleDrop(e, index)
|
|
1650
1926
|
},
|
|
1651
|
-
/* @__PURE__ */
|
|
1652
|
-
/* @__PURE__ */
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
/* @__PURE__ */
|
|
1927
|
+
/* @__PURE__ */ React10__default.createElement("div", { className: "flex items-center cursor-grab active:cursor-grabbing text-gray-400 p-1 rounded hover:text-gray-500 hover:bg-gray-100 transition-colors" }, /* @__PURE__ */ React10__default.createElement(GripVertical, { size: 20 })),
|
|
1928
|
+
/* @__PURE__ */ React10__default.createElement("div", { className: "flex-1 min-w-0" }, renderItem(item, index, index === 0, index === items.length - 1)),
|
|
1929
|
+
/* @__PURE__ */ React10__default.createElement("div", { className: "flex items-center mx-3" }, /* @__PURE__ */ React10__default.createElement("span", { className: "flex items-center justify-center w-8 h-8 bg-blue-500 text-white text-sm font-semibold rounded-full sm:w-8 sm:h-8 w-7 h-7 sm:text-sm text-xs" }, "#", index + 1)),
|
|
1930
|
+
/* @__PURE__ */ React10__default.createElement("div", { className: "flex flex-col gap-1 sm:flex-col flex-row" }, /* @__PURE__ */ React10__default.createElement(
|
|
1655
1931
|
"button",
|
|
1656
1932
|
{
|
|
1657
1933
|
onClick: () => handleMoveUp(item.id),
|
|
@@ -1659,8 +1935,8 @@ function GenericOrderManager({
|
|
|
1659
1935
|
className: "flex items-center justify-center w-8 h-8 p-0 border border-gray-300 bg-white text-gray-500 rounded cursor-pointer transition-all hover:bg-gray-100 hover:border-gray-400 hover:text-gray-700 disabled:opacity-40 disabled:cursor-not-allowed disabled:bg-gray-50 sm:w-8 sm:h-8 w-7 h-7",
|
|
1660
1936
|
title: "\u4E0A\u79FB"
|
|
1661
1937
|
},
|
|
1662
|
-
/* @__PURE__ */
|
|
1663
|
-
), /* @__PURE__ */
|
|
1938
|
+
/* @__PURE__ */ React10__default.createElement(ChevronUp, { size: 18 })
|
|
1939
|
+
), /* @__PURE__ */ React10__default.createElement(
|
|
1664
1940
|
"button",
|
|
1665
1941
|
{
|
|
1666
1942
|
onClick: () => handleMoveDown(item.id),
|
|
@@ -1668,9 +1944,9 @@ function GenericOrderManager({
|
|
|
1668
1944
|
className: "flex items-center justify-center w-8 h-8 p-0 border border-gray-300 bg-white text-gray-500 rounded cursor-pointer transition-all hover:bg-gray-100 hover:border-gray-400 hover:text-gray-700 disabled:opacity-40 disabled:cursor-not-allowed disabled:bg-gray-50 sm:w-8 sm:h-8 w-7 h-7",
|
|
1669
1945
|
title: "\u4E0B\u79FB"
|
|
1670
1946
|
},
|
|
1671
|
-
/* @__PURE__ */
|
|
1947
|
+
/* @__PURE__ */ React10__default.createElement(ChevronDown, { size: 18 })
|
|
1672
1948
|
))
|
|
1673
|
-
))), items.length === 0 && /* @__PURE__ */
|
|
1949
|
+
))), items.length === 0 && /* @__PURE__ */ React10__default.createElement("div", { className: "text-center p-12 text-gray-400 italic" }, /* @__PURE__ */ React10__default.createElement("p", { className: "m-0" }, emptyMessage)));
|
|
1674
1950
|
}
|
|
1675
1951
|
var BackButton = ({ href, className = "" }) => {
|
|
1676
1952
|
const router = useRouter();
|
|
@@ -1681,7 +1957,7 @@ var BackButton = ({ href, className = "" }) => {
|
|
|
1681
1957
|
router.back();
|
|
1682
1958
|
}
|
|
1683
1959
|
};
|
|
1684
|
-
return /* @__PURE__ */
|
|
1960
|
+
return /* @__PURE__ */ React10__default.createElement(
|
|
1685
1961
|
"button",
|
|
1686
1962
|
{
|
|
1687
1963
|
onClick: handleClick,
|
|
@@ -1690,7 +1966,7 @@ var BackButton = ({ href, className = "" }) => {
|
|
|
1690
1966
|
className
|
|
1691
1967
|
)
|
|
1692
1968
|
},
|
|
1693
|
-
/* @__PURE__ */
|
|
1969
|
+
/* @__PURE__ */ React10__default.createElement(
|
|
1694
1970
|
"svg",
|
|
1695
1971
|
{
|
|
1696
1972
|
className: "w-5 h-5 mr-2",
|
|
@@ -1698,7 +1974,7 @@ var BackButton = ({ href, className = "" }) => {
|
|
|
1698
1974
|
stroke: "currentColor",
|
|
1699
1975
|
viewBox: "0 0 24 24"
|
|
1700
1976
|
},
|
|
1701
|
-
/* @__PURE__ */
|
|
1977
|
+
/* @__PURE__ */ React10__default.createElement(
|
|
1702
1978
|
"path",
|
|
1703
1979
|
{
|
|
1704
1980
|
strokeLinecap: "round",
|
|
@@ -1730,9 +2006,9 @@ function FilterButtonGroup({
|
|
|
1730
2006
|
onChange,
|
|
1731
2007
|
className
|
|
1732
2008
|
}) {
|
|
1733
|
-
return /* @__PURE__ */
|
|
2009
|
+
return /* @__PURE__ */ React10__default.createElement("div", { className: cn("space-y-4", className) }, /* @__PURE__ */ React10__default.createElement("h3", { className: "text-lg font-semibold text-gray-800" }, label), /* @__PURE__ */ React10__default.createElement("div", { className: "flex gap-3" }, options.map((option) => {
|
|
1734
2010
|
const isActive = value === option.value;
|
|
1735
|
-
return /* @__PURE__ */
|
|
2011
|
+
return /* @__PURE__ */ React10__default.createElement(
|
|
1736
2012
|
"button",
|
|
1737
2013
|
{
|
|
1738
2014
|
key: option.value,
|
|
@@ -1743,7 +2019,7 @@ function FilterButtonGroup({
|
|
|
1743
2019
|
isActive ? "text-white border-transparent shadow-md focus:ring-white" : "bg-white text-gray-700 border-gray-200 shadow-sm hover:bg-gray-50 hover:border-gray-300 hover:shadow focus:ring-blue-300"
|
|
1744
2020
|
)
|
|
1745
2021
|
},
|
|
1746
|
-
/* @__PURE__ */
|
|
2022
|
+
/* @__PURE__ */ React10__default.createElement("div", { className: "flex items-center justify-center space-x-2" }, /* @__PURE__ */ React10__default.createElement("span", { className: "text-lg" }, option.icon), /* @__PURE__ */ React10__default.createElement("span", null, option.label), option.showCount && option.count !== void 0 && /* @__PURE__ */ React10__default.createElement("span", { className: cn(
|
|
1747
2023
|
"text-xs font-semibold px-2 py-0.5 rounded-full min-w-[1.25rem] text-center",
|
|
1748
2024
|
isActive ? "bg-white/20 text-white" : "bg-gray-100 text-gray-600"
|
|
1749
2025
|
) }, option.count))
|
|
@@ -1752,7 +2028,7 @@ function FilterButtonGroup({
|
|
|
1752
2028
|
}
|
|
1753
2029
|
function SearchResultHint({ searchQuery, resultCount, className }) {
|
|
1754
2030
|
if (!searchQuery) return null;
|
|
1755
|
-
return /* @__PURE__ */
|
|
2031
|
+
return /* @__PURE__ */ React10__default.createElement("div", { className: cn("mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg", className) }, /* @__PURE__ */ React10__default.createElement("p", { className: "text-sm text-blue-700" }, '\u641C\u7D22 "', /* @__PURE__ */ React10__default.createElement("span", { className: "font-medium" }, searchQuery), '" \u627E\u5230 ', resultCount, " \u4E2A\u7ED3\u679C"));
|
|
1756
2032
|
}
|
|
1757
2033
|
var Modal = ({
|
|
1758
2034
|
isOpen,
|
|
@@ -1767,13 +2043,13 @@ var Modal = ({
|
|
|
1767
2043
|
overlayClassName
|
|
1768
2044
|
}) => {
|
|
1769
2045
|
const contentZIndex = Math.max(zIndex, 1e4);
|
|
1770
|
-
return /* @__PURE__ */
|
|
2046
|
+
return /* @__PURE__ */ React10__default.createElement(Dialog, { open: isOpen, onOpenChange: (open) => {
|
|
1771
2047
|
if (!open) {
|
|
1772
2048
|
if (maskClosable) {
|
|
1773
2049
|
onClose();
|
|
1774
2050
|
}
|
|
1775
2051
|
}
|
|
1776
|
-
} }, /* @__PURE__ */
|
|
2052
|
+
} }, /* @__PURE__ */ React10__default.createElement(
|
|
1777
2053
|
DialogContent,
|
|
1778
2054
|
{
|
|
1779
2055
|
className: cn("sm:max-w-[425px]", className),
|
|
@@ -1790,11 +2066,11 @@ var Modal = ({
|
|
|
1790
2066
|
...height ? { height: typeof height === "number" ? `${height}px` : height } : void 0
|
|
1791
2067
|
}
|
|
1792
2068
|
},
|
|
1793
|
-
title ? /* @__PURE__ */
|
|
2069
|
+
title ? /* @__PURE__ */ React10__default.createElement(DialogHeader, null, /* @__PURE__ */ React10__default.createElement(DialogTitle, null, title)) : (
|
|
1794
2070
|
// 无障碍性:始终需要 DialogTitle,使用 sr-only 对视觉隐藏但对屏幕阅读器可见
|
|
1795
|
-
/* @__PURE__ */
|
|
2071
|
+
/* @__PURE__ */ React10__default.createElement(DialogTitle, { className: "sr-only" }, "\u5F39\u7A97")
|
|
1796
2072
|
),
|
|
1797
|
-
/* @__PURE__ */
|
|
2073
|
+
/* @__PURE__ */ React10__default.createElement("div", { className: "py-4" }, children)
|
|
1798
2074
|
));
|
|
1799
2075
|
};
|
|
1800
2076
|
var ConfirmModal = ({
|
|
@@ -1807,7 +2083,7 @@ var ConfirmModal = ({
|
|
|
1807
2083
|
cancelText = "\u53D6\u6D88",
|
|
1808
2084
|
isLoading = false
|
|
1809
2085
|
}) => {
|
|
1810
|
-
return /* @__PURE__ */
|
|
2086
|
+
return /* @__PURE__ */ React10__default.createElement(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose() }, /* @__PURE__ */ React10__default.createElement(AlertDialogContent, null, /* @__PURE__ */ React10__default.createElement(DialogHeader, null, /* @__PURE__ */ React10__default.createElement(DialogTitle, null, title), /* @__PURE__ */ React10__default.createElement(DialogDescription, null, message)), /* @__PURE__ */ React10__default.createElement(DialogFooter, null, /* @__PURE__ */ React10__default.createElement(AlertDialogCancel, { disabled: isLoading }, cancelText), /* @__PURE__ */ React10__default.createElement(
|
|
1811
2087
|
AlertDialogAction,
|
|
1812
2088
|
{
|
|
1813
2089
|
onClick: (e) => {
|
|
@@ -1851,16 +2127,16 @@ function ImageMappingPanel({
|
|
|
1851
2127
|
delete next[id];
|
|
1852
2128
|
onChange(next);
|
|
1853
2129
|
};
|
|
1854
|
-
return /* @__PURE__ */
|
|
2130
|
+
return /* @__PURE__ */ React10__default.createElement("details", { className: cn("rounded-lg border border-slate-200 bg-white/80 p-3", className) }, /* @__PURE__ */ React10__default.createElement("summary", { className: "cursor-pointer text-sm font-semibold text-slate-700" }, title), /* @__PURE__ */ React10__default.createElement("div", { className: "mt-3 grid grid-cols-1 gap-2 sm:grid-cols-2" }, items.map((item) => {
|
|
1855
2131
|
const image = value[item.id];
|
|
1856
|
-
return /* @__PURE__ */
|
|
2132
|
+
return /* @__PURE__ */ React10__default.createElement(
|
|
1857
2133
|
"div",
|
|
1858
2134
|
{
|
|
1859
2135
|
key: item.id,
|
|
1860
2136
|
className: "flex items-center gap-2 rounded-md border border-slate-200 bg-white p-2"
|
|
1861
2137
|
},
|
|
1862
|
-
/* @__PURE__ */
|
|
1863
|
-
/* @__PURE__ */
|
|
2138
|
+
/* @__PURE__ */ React10__default.createElement("div", { className: "w-16 text-xs font-semibold text-slate-600" }, item.label),
|
|
2139
|
+
/* @__PURE__ */ React10__default.createElement("label", { className: "flex-1 cursor-pointer rounded-md bg-cyan-600 px-2 py-1 text-center text-xs font-medium text-white" }, uploadLabel, /* @__PURE__ */ React10__default.createElement(
|
|
1864
2140
|
"input",
|
|
1865
2141
|
{
|
|
1866
2142
|
type: "file",
|
|
@@ -1872,14 +2148,14 @@ function ImageMappingPanel({
|
|
|
1872
2148
|
}
|
|
1873
2149
|
}
|
|
1874
2150
|
)),
|
|
1875
|
-
image ? /* @__PURE__ */
|
|
2151
|
+
image ? /* @__PURE__ */ React10__default.createElement(React10__default.Fragment, null, /* @__PURE__ */ React10__default.createElement(
|
|
1876
2152
|
"img",
|
|
1877
2153
|
{
|
|
1878
2154
|
src: image,
|
|
1879
2155
|
alt: item.label,
|
|
1880
2156
|
className: "h-8 w-8 rounded-full border border-slate-200 object-cover"
|
|
1881
2157
|
}
|
|
1882
|
-
), /* @__PURE__ */
|
|
2158
|
+
), /* @__PURE__ */ React10__default.createElement(
|
|
1883
2159
|
"button",
|
|
1884
2160
|
{
|
|
1885
2161
|
type: "button",
|
|
@@ -1898,7 +2174,7 @@ function LocalImageMappingPanel({
|
|
|
1898
2174
|
...panelProps
|
|
1899
2175
|
}) {
|
|
1900
2176
|
const [value, setValue] = useLocalStorage(storageKey, defaultValue);
|
|
1901
|
-
return /* @__PURE__ */
|
|
2177
|
+
return /* @__PURE__ */ React10__default.createElement(
|
|
1902
2178
|
ImageMappingPanel,
|
|
1903
2179
|
{
|
|
1904
2180
|
...panelProps,
|
|
@@ -1911,6 +2187,6 @@ function LocalImageMappingPanel({
|
|
|
1911
2187
|
);
|
|
1912
2188
|
}
|
|
1913
2189
|
|
|
1914
|
-
export { AlertDialogAction, AlertDialogCancel, AlertDialogContent, Avatar, AvatarFallback, AvatarImage, BackButton, Badge, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CollisionBalls, ConfirmModal, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FilterButtonGroup, GenericOrderManager, Grid, ImageMappingPanel, Label, LocalImageMappingPanel, Modal, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ScrollArea, ScrollBar, SearchBox, SearchResultHint, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Timeline, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, components_exports };
|
|
1915
|
-
//# sourceMappingURL=chunk-
|
|
1916
|
-
//# sourceMappingURL=chunk-
|
|
2190
|
+
export { AlertDialogAction, AlertDialogCancel, AlertDialogContent, Avatar, AvatarFallback, AvatarImage, BackButton, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CollisionBalls, ConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FilterButtonGroup, GenericOrderManager, Grid, ImageMappingPanel, Input, Label, LocalImageMappingPanel, Modal, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ScrollArea, ScrollBar, SearchBox, SearchResultHint, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Timeline, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, components_exports };
|
|
2191
|
+
//# sourceMappingURL=chunk-XSTMLLJV.mjs.map
|
|
2192
|
+
//# sourceMappingURL=chunk-XSTMLLJV.mjs.map
|