sa2kit 1.6.6 → 1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +106 -1
- package/dist/index.d.ts +106 -1
- package/dist/index.js +738 -221
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +674 -168
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5,10 +5,10 @@ export { useAsyncStorage, useElectronStorage, useLocalStorage, useStorage, useTa
|
|
|
5
5
|
import './chunk-OLHGZXN3.mjs';
|
|
6
6
|
export { ConsoleLoggerAdapter, LogLevel, Logger, createLogger, logger } from './chunk-KQGP6BTS.mjs';
|
|
7
7
|
import './chunk-BJTO5JO5.mjs';
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
8
|
+
import * as React37 from 'react';
|
|
9
|
+
import React37__default, { useState, useRef, useCallback, useEffect } from 'react';
|
|
10
10
|
import { createWorker } from 'tesseract.js';
|
|
11
|
-
import { X, ChevronRight, Check, Circle, ChevronDown, ChevronUp, Upload, Loader2, FileText, Eraser, Download, MessageSquare, Send, Bot, User, Meh, Frown, Smile } from 'lucide-react';
|
|
11
|
+
import { X, ChevronRight, Check, Circle, ChevronDown, ChevronUp, Upload, Loader2, FileText, Eraser, Download, MessageSquare, Send, Bot, User, RotateCcw, Save, AlertCircle, GripVertical, Meh, Frown, Smile } from 'lucide-react';
|
|
12
12
|
import { Slot } from '@radix-ui/react-slot';
|
|
13
13
|
import { cva } from 'class-variance-authority';
|
|
14
14
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
@@ -23,6 +23,8 @@ import * as SelectPrimitive from '@radix-ui/react-select';
|
|
|
23
23
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
24
24
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
25
25
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
26
|
+
import { useRouter } from 'next/navigation';
|
|
27
|
+
import Link from 'next/link';
|
|
26
28
|
import { createPortal } from 'react-dom';
|
|
27
29
|
|
|
28
30
|
var useOCR = (options = {}) => {
|
|
@@ -152,43 +154,43 @@ var OCRScanner = ({
|
|
|
152
154
|
handleFileChange(mockEvent);
|
|
153
155
|
}
|
|
154
156
|
};
|
|
155
|
-
return /* @__PURE__ */
|
|
157
|
+
return /* @__PURE__ */ React37__default.createElement(
|
|
156
158
|
"div",
|
|
157
159
|
{
|
|
158
160
|
className: `p-6 border-2 border-dashed rounded-xl transition-all ${isProcessing ? "border-blue-400 bg-blue-50/10" : "border-gray-200 hover:border-blue-400"} ${className}`,
|
|
159
161
|
onDragOver: handleDragOver,
|
|
160
162
|
onDrop: handleDrop
|
|
161
163
|
},
|
|
162
|
-
!imagePreview ? /* @__PURE__ */
|
|
164
|
+
!imagePreview ? /* @__PURE__ */ React37__default.createElement(
|
|
163
165
|
"div",
|
|
164
166
|
{
|
|
165
167
|
className: "flex flex-col items-center justify-center cursor-pointer space-y-4",
|
|
166
168
|
onClick: () => fileInputRef.current?.click()
|
|
167
169
|
},
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
) : /* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ React37__default.createElement("div", { className: "p-4 bg-blue-50 rounded-full text-blue-500" }, /* @__PURE__ */ React37__default.createElement(Upload, { size: 32 })),
|
|
171
|
+
/* @__PURE__ */ React37__default.createElement("div", { className: "text-center" }, /* @__PURE__ */ React37__default.createElement("p", { className: "text-lg font-medium text-gray-700" }, "\u70B9\u51FB\u6216\u62D6\u62FD\u56FE\u7247\u8FDB\u884C OCR \u8BC6\u522B"), /* @__PURE__ */ React37__default.createElement("p", { className: "text-sm text-gray-500" }, "\u652F\u6301 JPG, PNG, WebP"))
|
|
172
|
+
) : /* @__PURE__ */ React37__default.createElement("div", { className: "space-y-4" }, /* @__PURE__ */ React37__default.createElement("div", { className: "relative group rounded-lg overflow-hidden border border-gray-200" }, /* @__PURE__ */ React37__default.createElement(
|
|
171
173
|
"img",
|
|
172
174
|
{
|
|
173
175
|
src: imagePreview,
|
|
174
176
|
alt: "Preview",
|
|
175
177
|
className: `max-h-64 mx-auto object-contain transition-opacity ${isProcessing ? "opacity-50" : "opacity-100"}`
|
|
176
178
|
}
|
|
177
|
-
), !isProcessing && /* @__PURE__ */
|
|
179
|
+
), !isProcessing && /* @__PURE__ */ React37__default.createElement(
|
|
178
180
|
"button",
|
|
179
181
|
{
|
|
180
182
|
onClick: reset,
|
|
181
183
|
className: "absolute top-2 right-2 p-1 bg-white/80 rounded-full hover:bg-white text-gray-600 shadow-sm"
|
|
182
184
|
},
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
), isProcessing && /* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ React37__default.createElement(X, { size: 18 })
|
|
186
|
+
), isProcessing && /* @__PURE__ */ React37__default.createElement("div", { className: "absolute inset-0 flex flex-col items-center justify-center bg-black/5" }, /* @__PURE__ */ React37__default.createElement(Loader2, { className: "animate-spin text-blue-500 mb-2", size: 32 }), /* @__PURE__ */ React37__default.createElement("div", { className: "w-48 bg-gray-200 rounded-full h-1.5 overflow-hidden" }, /* @__PURE__ */ React37__default.createElement(
|
|
185
187
|
"div",
|
|
186
188
|
{
|
|
187
189
|
className: "bg-blue-500 h-full transition-all duration-300",
|
|
188
190
|
style: { width: `${progress * 100}%` }
|
|
189
191
|
}
|
|
190
|
-
)), /* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
+
)), /* @__PURE__ */ React37__default.createElement("p", { className: "text-xs font-medium text-blue-600 mt-2" }, status === "initializing" ? "\u6B63\u5728\u52A0\u8F7D\u5F15\u64CE..." : `\u8BC6\u522B\u4E2D ${Math.round(progress * 100)}%`))), result && !isProcessing && /* @__PURE__ */ React37__default.createElement("div", { className: "bg-gray-50 p-4 rounded-lg border border-gray-100 animate-in fade-in slide-in-from-bottom-2" }, /* @__PURE__ */ React37__default.createElement("div", { className: "flex items-center gap-2 mb-2 text-gray-600 font-medium" }, /* @__PURE__ */ React37__default.createElement(FileText, { size: 18 }), /* @__PURE__ */ React37__default.createElement("span", null, "\u8BC6\u522B\u7ED3\u679C (\u7F6E\u4FE1\u5EA6: ", Math.round(result.confidence), "%)")), /* @__PURE__ */ React37__default.createElement("pre", { className: "text-sm text-gray-800 whitespace-pre-wrap font-sans" }, result.text)), error && /* @__PURE__ */ React37__default.createElement("div", { className: "p-3 bg-red-50 text-red-600 text-sm rounded-lg border border-red-100" }, "\u8BC6\u522B\u5931\u8D25: ", error.message)),
|
|
193
|
+
/* @__PURE__ */ React37__default.createElement(
|
|
192
194
|
"input",
|
|
193
195
|
{
|
|
194
196
|
type: "file",
|
|
@@ -336,37 +338,37 @@ var BackgroundRemover = ({
|
|
|
336
338
|
a.download = "removed_background.png";
|
|
337
339
|
a.click();
|
|
338
340
|
};
|
|
339
|
-
return /* @__PURE__ */
|
|
341
|
+
return /* @__PURE__ */ React37__default.createElement("div", { className: `p-6 border-2 border-dashed rounded-xl transition-all ${isProcessing ? "border-purple-400 bg-purple-50/10" : "border-gray-200 hover:border-purple-400"} ${className}` }, !imagePreview ? /* @__PURE__ */ React37__default.createElement(
|
|
340
342
|
"div",
|
|
341
343
|
{
|
|
342
344
|
className: "flex flex-col items-center justify-center cursor-pointer space-y-4",
|
|
343
345
|
onClick: () => fileInputRef.current?.click()
|
|
344
346
|
},
|
|
345
|
-
/* @__PURE__ */
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
-
) : /* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ React37__default.createElement("div", { className: "p-4 bg-purple-50 rounded-full text-purple-500" }, /* @__PURE__ */ React37__default.createElement(Eraser, { size: 32 })),
|
|
348
|
+
/* @__PURE__ */ React37__default.createElement("div", { className: "text-center" }, /* @__PURE__ */ React37__default.createElement("p", { className: "text-lg font-medium text-gray-700" }, "\u4E0A\u4F20\u56FE\u7247\u79FB\u9664\u80CC\u666F"), /* @__PURE__ */ React37__default.createElement("p", { className: "text-sm text-gray-500" }, "\u5EFA\u8BAE\u4F7F\u7528\u4E3B\u4F53\u660E\u786E\u7684\u56FE\u7247"))
|
|
349
|
+
) : /* @__PURE__ */ React37__default.createElement("div", { className: "space-y-4" }, /* @__PURE__ */ React37__default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React37__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React37__default.createElement("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider" }, "\u539F\u56FE"), /* @__PURE__ */ React37__default.createElement("div", { className: "relative rounded-lg overflow-hidden border border-gray-200 bg-gray-50" }, /* @__PURE__ */ React37__default.createElement("img", { src: imagePreview, alt: "Original", className: "max-h-64 mx-auto object-contain" }))), /* @__PURE__ */ React37__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React37__default.createElement("p", { className: "text-xs font-medium text-gray-500 uppercase tracking-wider" }, "\u5904\u7406\u7ED3\u679C"), /* @__PURE__ */ React37__default.createElement("div", { className: "relative rounded-lg overflow-hidden border border-gray-200 bg-grid-slate-100 bg-[size:20px_20px]" }, resultUrl ? /* @__PURE__ */ React37__default.createElement("img", { src: resultUrl, alt: "Result", className: "max-h-64 mx-auto object-contain animate-in fade-in zoom-in-95 duration-500" }) : /* @__PURE__ */ React37__default.createElement("div", { className: "h-64 flex flex-col items-center justify-center text-gray-400" }, isProcessing ? /* @__PURE__ */ React37__default.createElement(React37__default.Fragment, null, /* @__PURE__ */ React37__default.createElement(Loader2, { className: "animate-spin text-purple-500 mb-2", size: 32 }), /* @__PURE__ */ React37__default.createElement("div", { className: "w-32 bg-gray-200 rounded-full h-1.5 overflow-hidden" }, /* @__PURE__ */ React37__default.createElement(
|
|
348
350
|
"div",
|
|
349
351
|
{
|
|
350
352
|
className: "bg-purple-500 h-full transition-all duration-300",
|
|
351
353
|
style: { width: `${progress * 100}%` }
|
|
352
354
|
}
|
|
353
|
-
)), /* @__PURE__ */
|
|
355
|
+
)), /* @__PURE__ */ React37__default.createElement("p", { className: "text-[10px] mt-2 font-mono uppercase" }, status.replace(/-/g, " "))) : /* @__PURE__ */ React37__default.createElement("span", { className: "text-sm italic" }, "\u7B49\u5F85\u5904\u7406..."))))), /* @__PURE__ */ React37__default.createElement("div", { className: "flex justify-between items-center pt-2" }, !isProcessing && /* @__PURE__ */ React37__default.createElement(
|
|
354
356
|
"button",
|
|
355
357
|
{
|
|
356
358
|
onClick: reset,
|
|
357
359
|
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors"
|
|
358
360
|
},
|
|
359
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ React37__default.createElement(X, { size: 16 }),
|
|
360
362
|
"\u91CD\u65B0\u5F00\u59CB"
|
|
361
|
-
), resultUrl && !isProcessing && /* @__PURE__ */
|
|
363
|
+
), resultUrl && !isProcessing && /* @__PURE__ */ React37__default.createElement(
|
|
362
364
|
"button",
|
|
363
365
|
{
|
|
364
366
|
onClick: downloadResult,
|
|
365
367
|
className: "flex items-center gap-2 px-6 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-lg shadow-sm transition-all"
|
|
366
368
|
},
|
|
367
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ React37__default.createElement(Download, { size: 16 }),
|
|
368
370
|
"\u4E0B\u8F7D PNG"
|
|
369
|
-
)), error && /* @__PURE__ */
|
|
371
|
+
)), error && /* @__PURE__ */ React37__default.createElement("div", { className: "p-3 bg-red-50 text-red-600 text-sm rounded-lg border border-red-100" }, "\u5904\u7406\u5931\u8D25: ", error.message)), /* @__PURE__ */ React37__default.createElement(
|
|
370
372
|
"input",
|
|
371
373
|
{
|
|
372
374
|
type: "file",
|
|
@@ -485,11 +487,11 @@ var SentimentAnalyzer = ({
|
|
|
485
487
|
if (!result) return null;
|
|
486
488
|
switch (result.sentiment) {
|
|
487
489
|
case "positive":
|
|
488
|
-
return /* @__PURE__ */
|
|
490
|
+
return /* @__PURE__ */ React37__default.createElement(Smile, { className: "text-green-500", size: 24 });
|
|
489
491
|
case "negative":
|
|
490
|
-
return /* @__PURE__ */
|
|
492
|
+
return /* @__PURE__ */ React37__default.createElement(Frown, { className: "text-red-500", size: 24 });
|
|
491
493
|
default:
|
|
492
|
-
return /* @__PURE__ */
|
|
494
|
+
return /* @__PURE__ */ React37__default.createElement(Meh, { className: "text-yellow-500", size: 24 });
|
|
493
495
|
}
|
|
494
496
|
};
|
|
495
497
|
const getSentimentColor = () => {
|
|
@@ -503,7 +505,7 @@ var SentimentAnalyzer = ({
|
|
|
503
505
|
return "bg-yellow-50 border-yellow-200 text-yellow-700";
|
|
504
506
|
}
|
|
505
507
|
};
|
|
506
|
-
return /* @__PURE__ */
|
|
508
|
+
return /* @__PURE__ */ React37__default.createElement("div", { className: `p-6 border rounded-xl bg-white dark:bg-gray-800 shadow-sm ${className}` }, /* @__PURE__ */ React37__default.createElement("div", { className: "flex items-center gap-2 mb-4 text-gray-700 dark:text-gray-300 font-medium" }, /* @__PURE__ */ React37__default.createElement(MessageSquare, { size: 20 }), /* @__PURE__ */ React37__default.createElement("span", null, "\u6587\u672C\u60C5\u611F\u5206\u6790")), /* @__PURE__ */ React37__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React37__default.createElement(
|
|
507
509
|
"textarea",
|
|
508
510
|
{
|
|
509
511
|
value: text,
|
|
@@ -512,15 +514,15 @@ var SentimentAnalyzer = ({
|
|
|
512
514
|
className: "w-full h-32 p-4 bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all outline-none resize-none text-gray-800 dark:text-gray-200",
|
|
513
515
|
disabled: isProcessing
|
|
514
516
|
}
|
|
515
|
-
), /* @__PURE__ */
|
|
517
|
+
), /* @__PURE__ */ React37__default.createElement(
|
|
516
518
|
"button",
|
|
517
519
|
{
|
|
518
520
|
onClick: handleAnalyze,
|
|
519
521
|
disabled: !text.trim() || isProcessing,
|
|
520
522
|
className: "absolute bottom-3 right-3 p-2 bg-blue-600 hover:bg-blue-700 disabled:bg-gray-400 text-white rounded-md transition-colors shadow-sm"
|
|
521
523
|
},
|
|
522
|
-
isProcessing ? /* @__PURE__ */
|
|
523
|
-
)), isProcessing && /* @__PURE__ */
|
|
524
|
+
isProcessing ? /* @__PURE__ */ React37__default.createElement(Loader2, { className: "animate-spin", size: 18 }) : /* @__PURE__ */ React37__default.createElement(Send, { size: 18 })
|
|
525
|
+
)), isProcessing && /* @__PURE__ */ React37__default.createElement("div", { className: "mt-4 flex items-center gap-2 text-sm text-blue-600 animate-pulse" }, /* @__PURE__ */ React37__default.createElement(Loader2, { size: 14, className: "animate-spin" }), /* @__PURE__ */ React37__default.createElement("span", null, "\u6B63\u5728\u5206\u6790 (\u9996\u6B21\u8FD0\u884C\u5C06\u52A0\u8F7D\u6A21\u578B\u8D44\u6E90)...")), result && !isProcessing && /* @__PURE__ */ React37__default.createElement("div", { className: `mt-4 p-4 border rounded-lg flex items-center gap-4 animate-in fade-in slide-in-from-top-2 ${getSentimentColor()}` }, /* @__PURE__ */ React37__default.createElement("div", { className: "p-2 bg-white rounded-full shadow-sm" }, getSentimentIcon()), /* @__PURE__ */ React37__default.createElement("div", null, /* @__PURE__ */ React37__default.createElement("p", { className: "font-bold text-lg capitalize" }, result.sentiment), /* @__PURE__ */ React37__default.createElement("p", { className: "text-sm opacity-80" }, "\u7F6E\u4FE1\u5EA6: ", (result.score * 100).toFixed(1), "% (", result.label, ")"))), error && /* @__PURE__ */ React37__default.createElement("div", { className: "mt-4 p-3 bg-red-50 text-red-600 text-sm rounded-lg border border-red-100" }, "\u5206\u6790\u5931\u8D25: ", error.message));
|
|
524
526
|
};
|
|
525
527
|
var useTextGeneration = (options = {}) => {
|
|
526
528
|
const [state, setState] = useState({
|
|
@@ -660,7 +662,7 @@ AI\u56DE\u5E94\uFF1A\u201C`;
|
|
|
660
662
|
setChatHistory((prev) => [...prev, { role: "assistant", content: "\uFF08\u672C\u5730\u6A21\u578B\u601D\u8003\u8FC7\u5EA6\uFF0C\u6682\u65F6\u4F11\u606F\u4E2D...\uFF09" }]);
|
|
661
663
|
}
|
|
662
664
|
};
|
|
663
|
-
return /* @__PURE__ */
|
|
665
|
+
return /* @__PURE__ */ React37__default.createElement("div", { className: `flex flex-col h-[500px] bg-white dark:bg-gray-800 rounded-xl shadow-inner border border-gray-100 dark:border-gray-700 overflow-hidden ${className}` }, /* @__PURE__ */ React37__default.createElement("div", { ref: scrollRef, className: "flex-1 overflow-y-auto p-4 space-y-4 bg-gray-50/50 dark:bg-gray-900/50" }, chatHistory.length === 0 && /* @__PURE__ */ React37__default.createElement("div", { className: "h-full flex flex-col items-center justify-center text-gray-400 space-y-2" }, /* @__PURE__ */ React37__default.createElement(Bot, { size: 48, className: "opacity-20" }), /* @__PURE__ */ React37__default.createElement("p", { className: "text-sm italic text-center px-8 text-gray-400 font-sans" }, "\u4F60\u597D\uFF01\u6211\u662F 100% \u672C\u5730\u8FD0\u884C\u7684 AI\u3002", /* @__PURE__ */ React37__default.createElement("br", null), "\u4F60\u53EF\u4EE5\u548C\u6211\u804A\u804A\u5929\uFF0C\u6211\u4F1A\u5C1D\u8BD5\u7406\u89E3\u4F60\u7684\u610F\u601D\u3002")), chatHistory.map((msg, i) => /* @__PURE__ */ React37__default.createElement("div", { key: i, className: `flex ${msg.role === "user" ? "justify-end" : "justify-start"} animate-in fade-in slide-in-from-bottom-2` }, /* @__PURE__ */ React37__default.createElement("div", { className: `flex gap-3 max-w-[85%] ${msg.role === "user" ? "flex-row-reverse" : ""}` }, /* @__PURE__ */ React37__default.createElement("div", { className: `p-2 rounded-lg h-fit ${msg.role === "user" ? "bg-blue-100 text-blue-600" : "bg-white dark:bg-gray-700 shadow-sm border border-gray-100 dark:border-gray-600 text-gray-400"}` }, msg.role === "user" ? /* @__PURE__ */ React37__default.createElement(User, { size: 18 }) : /* @__PURE__ */ React37__default.createElement(Bot, { size: 18 })), /* @__PURE__ */ React37__default.createElement("div", { className: `p-3 rounded-2xl shadow-sm text-sm ${msg.role === "user" ? "bg-blue-600 text-white rounded-tr-none" : "bg-white dark:bg-gray-700 text-gray-800 dark:text-gray-200 rounded-tl-none border border-gray-100 dark:border-gray-600 leading-relaxed"}` }, msg.content)))), isGenerating && /* @__PURE__ */ React37__default.createElement("div", { className: "flex justify-start" }, /* @__PURE__ */ React37__default.createElement("div", { className: "flex gap-3 items-center bg-white dark:bg-gray-700 p-3 rounded-2xl rounded-tl-none border border-gray-100 dark:border-gray-600" }, /* @__PURE__ */ React37__default.createElement(Loader2, { className: "animate-spin text-blue-500", size: 16 }), /* @__PURE__ */ React37__default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React37__default.createElement("span", { className: "text-xs text-gray-500 font-medium" }, "\u601D\u8003\u4E2D..."), /* @__PURE__ */ React37__default.createElement("span", { className: "text-[10px] text-blue-400 font-mono tracking-tighter" }, genStatus))))), /* @__PURE__ */ React37__default.createElement("div", { className: "p-4 bg-white dark:bg-gray-800 border-t border-gray-100 dark:border-gray-700" }, /* @__PURE__ */ React37__default.createElement("div", { className: "relative flex items-center gap-2" }, /* @__PURE__ */ React37__default.createElement(
|
|
664
666
|
"input",
|
|
665
667
|
{
|
|
666
668
|
type: "text",
|
|
@@ -671,14 +673,14 @@ AI\u56DE\u5E94\uFF1A\u201C`;
|
|
|
671
673
|
className: "flex-1 bg-gray-50 dark:bg-gray-900 border-none rounded-full px-5 py-3 pr-12 text-sm focus:ring-2 focus:ring-blue-500 outline-none dark:text-white text-gray-800",
|
|
672
674
|
disabled: isGenerating
|
|
673
675
|
}
|
|
674
|
-
), /* @__PURE__ */
|
|
676
|
+
), /* @__PURE__ */ React37__default.createElement(
|
|
675
677
|
"button",
|
|
676
678
|
{
|
|
677
679
|
onClick: handleSend,
|
|
678
680
|
disabled: !input.trim() || isGenerating,
|
|
679
681
|
className: "absolute right-1 p-2.5 bg-blue-600 hover:bg-blue-700 disabled:bg-gray-400 text-white rounded-full transition-all shadow-md active:scale-95 flex items-center justify-center"
|
|
680
682
|
},
|
|
681
|
-
/* @__PURE__ */
|
|
683
|
+
/* @__PURE__ */ React37__default.createElement(Send, { size: 18 })
|
|
682
684
|
))));
|
|
683
685
|
};
|
|
684
686
|
var buttonVariants = cva(
|
|
@@ -706,10 +708,10 @@ var buttonVariants = cva(
|
|
|
706
708
|
}
|
|
707
709
|
}
|
|
708
710
|
);
|
|
709
|
-
var Button =
|
|
711
|
+
var Button = React37.forwardRef(
|
|
710
712
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
711
713
|
const Comp = asChild ? Slot : "button";
|
|
712
|
-
return /* @__PURE__ */
|
|
714
|
+
return /* @__PURE__ */ React37.createElement(
|
|
713
715
|
Comp,
|
|
714
716
|
{
|
|
715
717
|
className: cn(buttonVariants({ variant, size, className })),
|
|
@@ -720,7 +722,7 @@ var Button = React33.forwardRef(
|
|
|
720
722
|
}
|
|
721
723
|
);
|
|
722
724
|
Button.displayName = "Button";
|
|
723
|
-
var Card =
|
|
725
|
+
var Card = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
724
726
|
"div",
|
|
725
727
|
{
|
|
726
728
|
ref,
|
|
@@ -732,7 +734,7 @@ var Card = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
732
734
|
}
|
|
733
735
|
));
|
|
734
736
|
Card.displayName = "Card";
|
|
735
|
-
var CardHeader =
|
|
737
|
+
var CardHeader = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
736
738
|
"div",
|
|
737
739
|
{
|
|
738
740
|
ref,
|
|
@@ -741,7 +743,7 @@ var CardHeader = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
741
743
|
}
|
|
742
744
|
));
|
|
743
745
|
CardHeader.displayName = "CardHeader";
|
|
744
|
-
var CardTitle =
|
|
746
|
+
var CardTitle = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
745
747
|
"div",
|
|
746
748
|
{
|
|
747
749
|
ref,
|
|
@@ -750,7 +752,7 @@ var CardTitle = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
750
752
|
}
|
|
751
753
|
));
|
|
752
754
|
CardTitle.displayName = "CardTitle";
|
|
753
|
-
var CardDescription =
|
|
755
|
+
var CardDescription = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
754
756
|
"div",
|
|
755
757
|
{
|
|
756
758
|
ref,
|
|
@@ -759,9 +761,9 @@ var CardDescription = React33.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
759
761
|
}
|
|
760
762
|
));
|
|
761
763
|
CardDescription.displayName = "CardDescription";
|
|
762
|
-
var CardContent =
|
|
764
|
+
var CardContent = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
763
765
|
CardContent.displayName = "CardContent";
|
|
764
|
-
var CardFooter =
|
|
766
|
+
var CardFooter = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
765
767
|
"div",
|
|
766
768
|
{
|
|
767
769
|
ref,
|
|
@@ -787,11 +789,11 @@ var badgeVariants = cva(
|
|
|
787
789
|
}
|
|
788
790
|
);
|
|
789
791
|
function Badge({ className, variant, ...props }) {
|
|
790
|
-
return /* @__PURE__ */
|
|
792
|
+
return /* @__PURE__ */ React37.createElement("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
791
793
|
}
|
|
792
|
-
var Input =
|
|
794
|
+
var Input = React37.forwardRef(
|
|
793
795
|
({ className, type, ...props }, ref) => {
|
|
794
|
-
return /* @__PURE__ */
|
|
796
|
+
return /* @__PURE__ */ React37.createElement(
|
|
795
797
|
"input",
|
|
796
798
|
{
|
|
797
799
|
type,
|
|
@@ -809,7 +811,7 @@ Input.displayName = "Input";
|
|
|
809
811
|
var labelVariants = cva(
|
|
810
812
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
811
813
|
);
|
|
812
|
-
var Label =
|
|
814
|
+
var Label = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
813
815
|
LabelPrimitive.Root,
|
|
814
816
|
{
|
|
815
817
|
ref,
|
|
@@ -819,7 +821,7 @@ var Label = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
819
821
|
));
|
|
820
822
|
Label.displayName = LabelPrimitive.Root.displayName;
|
|
821
823
|
var Tabs = TabsPrimitive.Root;
|
|
822
|
-
var TabsList =
|
|
824
|
+
var TabsList = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
823
825
|
TabsPrimitive.List,
|
|
824
826
|
{
|
|
825
827
|
ref,
|
|
@@ -831,7 +833,7 @@ var TabsList = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
831
833
|
}
|
|
832
834
|
));
|
|
833
835
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
834
|
-
var TabsTrigger =
|
|
836
|
+
var TabsTrigger = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
835
837
|
TabsPrimitive.Trigger,
|
|
836
838
|
{
|
|
837
839
|
ref,
|
|
@@ -843,7 +845,7 @@ var TabsTrigger = React33.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
843
845
|
}
|
|
844
846
|
));
|
|
845
847
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
846
|
-
var TabsContent =
|
|
848
|
+
var TabsContent = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
847
849
|
TabsPrimitive.Content,
|
|
848
850
|
{
|
|
849
851
|
ref,
|
|
@@ -859,7 +861,7 @@ var Dialog = DialogPrimitive.Root;
|
|
|
859
861
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
860
862
|
var DialogPortal = DialogPrimitive.Portal;
|
|
861
863
|
var DialogClose = DialogPrimitive.Close;
|
|
862
|
-
var DialogOverlay =
|
|
864
|
+
var DialogOverlay = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
863
865
|
DialogPrimitive.Overlay,
|
|
864
866
|
{
|
|
865
867
|
ref,
|
|
@@ -871,7 +873,7 @@ var DialogOverlay = React33.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
871
873
|
}
|
|
872
874
|
));
|
|
873
875
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
874
|
-
var DialogContent =
|
|
876
|
+
var DialogContent = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React37.createElement(DialogPortal, null, /* @__PURE__ */ React37.createElement(DialogOverlay, null), /* @__PURE__ */ React37.createElement(
|
|
875
877
|
DialogPrimitive.Content,
|
|
876
878
|
{
|
|
877
879
|
ref,
|
|
@@ -882,13 +884,13 @@ var DialogContent = React33.forwardRef(({ className, children, ...props }, ref)
|
|
|
882
884
|
...props
|
|
883
885
|
},
|
|
884
886
|
children,
|
|
885
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ React37.createElement(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground" }, /* @__PURE__ */ React37.createElement(X, { className: "h-4 w-4" }), /* @__PURE__ */ React37.createElement("span", { className: "sr-only" }, "Close"))
|
|
886
888
|
)));
|
|
887
889
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
888
890
|
var DialogHeader = ({
|
|
889
891
|
className,
|
|
890
892
|
...props
|
|
891
|
-
}) => /* @__PURE__ */
|
|
893
|
+
}) => /* @__PURE__ */ React37.createElement(
|
|
892
894
|
"div",
|
|
893
895
|
{
|
|
894
896
|
className: cn(
|
|
@@ -902,7 +904,7 @@ DialogHeader.displayName = "DialogHeader";
|
|
|
902
904
|
var DialogFooter = ({
|
|
903
905
|
className,
|
|
904
906
|
...props
|
|
905
|
-
}) => /* @__PURE__ */
|
|
907
|
+
}) => /* @__PURE__ */ React37.createElement(
|
|
906
908
|
"div",
|
|
907
909
|
{
|
|
908
910
|
className: cn(
|
|
@@ -913,7 +915,7 @@ var DialogFooter = ({
|
|
|
913
915
|
}
|
|
914
916
|
);
|
|
915
917
|
DialogFooter.displayName = "DialogFooter";
|
|
916
|
-
var DialogTitle =
|
|
918
|
+
var DialogTitle = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
917
919
|
DialogPrimitive.Title,
|
|
918
920
|
{
|
|
919
921
|
ref,
|
|
@@ -925,7 +927,7 @@ var DialogTitle = React33.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
925
927
|
}
|
|
926
928
|
));
|
|
927
929
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
928
|
-
var DialogDescription =
|
|
930
|
+
var DialogDescription = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
929
931
|
DialogPrimitive.Description,
|
|
930
932
|
{
|
|
931
933
|
ref,
|
|
@@ -937,7 +939,7 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
|
937
939
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
938
940
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
939
941
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
940
|
-
var AlertDialogOverlay =
|
|
942
|
+
var AlertDialogOverlay = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
941
943
|
AlertDialogPrimitive.Overlay,
|
|
942
944
|
{
|
|
943
945
|
className: cn(
|
|
@@ -949,7 +951,7 @@ var AlertDialogOverlay = React33.forwardRef(({ className, ...props }, ref) => /*
|
|
|
949
951
|
}
|
|
950
952
|
));
|
|
951
953
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
952
|
-
var AlertDialogContent =
|
|
954
|
+
var AlertDialogContent = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(AlertDialogPortal, null, /* @__PURE__ */ React37.createElement(AlertDialogOverlay, null), /* @__PURE__ */ React37.createElement(
|
|
953
955
|
AlertDialogPrimitive.Content,
|
|
954
956
|
{
|
|
955
957
|
ref,
|
|
@@ -964,7 +966,7 @@ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
|
964
966
|
var AlertDialogHeader = ({
|
|
965
967
|
className,
|
|
966
968
|
...props
|
|
967
|
-
}) => /* @__PURE__ */
|
|
969
|
+
}) => /* @__PURE__ */ React37.createElement(
|
|
968
970
|
"div",
|
|
969
971
|
{
|
|
970
972
|
className: cn(
|
|
@@ -978,7 +980,7 @@ AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
|
978
980
|
var AlertDialogFooter = ({
|
|
979
981
|
className,
|
|
980
982
|
...props
|
|
981
|
-
}) => /* @__PURE__ */
|
|
983
|
+
}) => /* @__PURE__ */ React37.createElement(
|
|
982
984
|
"div",
|
|
983
985
|
{
|
|
984
986
|
className: cn(
|
|
@@ -989,7 +991,7 @@ var AlertDialogFooter = ({
|
|
|
989
991
|
}
|
|
990
992
|
);
|
|
991
993
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
992
|
-
var AlertDialogTitle =
|
|
994
|
+
var AlertDialogTitle = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
993
995
|
AlertDialogPrimitive.Title,
|
|
994
996
|
{
|
|
995
997
|
ref,
|
|
@@ -998,7 +1000,7 @@ var AlertDialogTitle = React33.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
998
1000
|
}
|
|
999
1001
|
));
|
|
1000
1002
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
1001
|
-
var AlertDialogDescription =
|
|
1003
|
+
var AlertDialogDescription = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1002
1004
|
AlertDialogPrimitive.Description,
|
|
1003
1005
|
{
|
|
1004
1006
|
ref,
|
|
@@ -1007,7 +1009,7 @@ var AlertDialogDescription = React33.forwardRef(({ className, ...props }, ref) =
|
|
|
1007
1009
|
}
|
|
1008
1010
|
));
|
|
1009
1011
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
1010
|
-
var AlertDialogAction =
|
|
1012
|
+
var AlertDialogAction = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1011
1013
|
AlertDialogPrimitive.Action,
|
|
1012
1014
|
{
|
|
1013
1015
|
ref,
|
|
@@ -1016,7 +1018,7 @@ var AlertDialogAction = React33.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1016
1018
|
}
|
|
1017
1019
|
));
|
|
1018
1020
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
1019
|
-
var AlertDialogCancel =
|
|
1021
|
+
var AlertDialogCancel = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1020
1022
|
AlertDialogPrimitive.Cancel,
|
|
1021
1023
|
{
|
|
1022
1024
|
ref,
|
|
@@ -1035,7 +1037,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
|
1035
1037
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
1036
1038
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
1037
1039
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
1038
|
-
var DropdownMenuSubTrigger =
|
|
1040
|
+
var DropdownMenuSubTrigger = React37.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1039
1041
|
DropdownMenuPrimitive.SubTrigger,
|
|
1040
1042
|
{
|
|
1041
1043
|
ref,
|
|
@@ -1047,10 +1049,10 @@ var DropdownMenuSubTrigger = React33.forwardRef(({ className, inset, children, .
|
|
|
1047
1049
|
...props
|
|
1048
1050
|
},
|
|
1049
1051
|
children,
|
|
1050
|
-
/* @__PURE__ */
|
|
1052
|
+
/* @__PURE__ */ React37.createElement(ChevronRight, { className: "ml-auto" })
|
|
1051
1053
|
));
|
|
1052
1054
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1053
|
-
var DropdownMenuSubContent =
|
|
1055
|
+
var DropdownMenuSubContent = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1054
1056
|
DropdownMenuPrimitive.SubContent,
|
|
1055
1057
|
{
|
|
1056
1058
|
ref,
|
|
@@ -1062,7 +1064,7 @@ var DropdownMenuSubContent = React33.forwardRef(({ className, ...props }, ref) =
|
|
|
1062
1064
|
}
|
|
1063
1065
|
));
|
|
1064
1066
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1065
|
-
var DropdownMenuContent =
|
|
1067
|
+
var DropdownMenuContent = React37.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React37.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React37.createElement(
|
|
1066
1068
|
DropdownMenuPrimitive.Content,
|
|
1067
1069
|
{
|
|
1068
1070
|
ref,
|
|
@@ -1076,7 +1078,7 @@ var DropdownMenuContent = React33.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
1076
1078
|
}
|
|
1077
1079
|
)));
|
|
1078
1080
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1079
|
-
var DropdownMenuItem =
|
|
1081
|
+
var DropdownMenuItem = React37.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1080
1082
|
DropdownMenuPrimitive.Item,
|
|
1081
1083
|
{
|
|
1082
1084
|
ref,
|
|
@@ -1089,7 +1091,7 @@ var DropdownMenuItem = React33.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1089
1091
|
}
|
|
1090
1092
|
));
|
|
1091
1093
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1092
|
-
var DropdownMenuCheckboxItem =
|
|
1094
|
+
var DropdownMenuCheckboxItem = React37.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1093
1095
|
DropdownMenuPrimitive.CheckboxItem,
|
|
1094
1096
|
{
|
|
1095
1097
|
ref,
|
|
@@ -1100,11 +1102,11 @@ var DropdownMenuCheckboxItem = React33.forwardRef(({ className, children, checke
|
|
|
1100
1102
|
checked,
|
|
1101
1103
|
...props
|
|
1102
1104
|
},
|
|
1103
|
-
/* @__PURE__ */
|
|
1105
|
+
/* @__PURE__ */ React37.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React37.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React37.createElement(Check, { className: "h-4 w-4" }))),
|
|
1104
1106
|
children
|
|
1105
1107
|
));
|
|
1106
1108
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1107
|
-
var DropdownMenuRadioItem =
|
|
1109
|
+
var DropdownMenuRadioItem = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1108
1110
|
DropdownMenuPrimitive.RadioItem,
|
|
1109
1111
|
{
|
|
1110
1112
|
ref,
|
|
@@ -1114,11 +1116,11 @@ var DropdownMenuRadioItem = React33.forwardRef(({ className, children, ...props
|
|
|
1114
1116
|
),
|
|
1115
1117
|
...props
|
|
1116
1118
|
},
|
|
1117
|
-
/* @__PURE__ */
|
|
1119
|
+
/* @__PURE__ */ React37.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React37.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React37.createElement(Circle, { className: "h-2 w-2 fill-current" }))),
|
|
1118
1120
|
children
|
|
1119
1121
|
));
|
|
1120
1122
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1121
|
-
var DropdownMenuLabel =
|
|
1123
|
+
var DropdownMenuLabel = React37.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1122
1124
|
DropdownMenuPrimitive.Label,
|
|
1123
1125
|
{
|
|
1124
1126
|
ref,
|
|
@@ -1131,7 +1133,7 @@ var DropdownMenuLabel = React33.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1131
1133
|
}
|
|
1132
1134
|
));
|
|
1133
1135
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1134
|
-
var DropdownMenuSeparator =
|
|
1136
|
+
var DropdownMenuSeparator = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1135
1137
|
DropdownMenuPrimitive.Separator,
|
|
1136
1138
|
{
|
|
1137
1139
|
ref,
|
|
@@ -1144,7 +1146,7 @@ var DropdownMenuShortcut = ({
|
|
|
1144
1146
|
className,
|
|
1145
1147
|
...props
|
|
1146
1148
|
}) => {
|
|
1147
|
-
return /* @__PURE__ */
|
|
1149
|
+
return /* @__PURE__ */ React37.createElement(
|
|
1148
1150
|
"span",
|
|
1149
1151
|
{
|
|
1150
1152
|
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
@@ -1156,7 +1158,7 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
1156
1158
|
var Popover = PopoverPrimitive.Root;
|
|
1157
1159
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1158
1160
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
1159
|
-
var PopoverContent =
|
|
1161
|
+
var PopoverContent = React37.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React37.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React37.createElement(
|
|
1160
1162
|
PopoverPrimitive.Content,
|
|
1161
1163
|
{
|
|
1162
1164
|
ref,
|
|
@@ -1170,7 +1172,7 @@ var PopoverContent = React33.forwardRef(({ className, align = "center", sideOffs
|
|
|
1170
1172
|
}
|
|
1171
1173
|
)));
|
|
1172
1174
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1173
|
-
var Progress =
|
|
1175
|
+
var Progress = React37.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1174
1176
|
ProgressPrimitive.Root,
|
|
1175
1177
|
{
|
|
1176
1178
|
ref,
|
|
@@ -1180,7 +1182,7 @@ var Progress = React33.forwardRef(({ className, value, ...props }, ref) => /* @_
|
|
|
1180
1182
|
),
|
|
1181
1183
|
...props
|
|
1182
1184
|
},
|
|
1183
|
-
/* @__PURE__ */
|
|
1185
|
+
/* @__PURE__ */ React37.createElement(
|
|
1184
1186
|
ProgressPrimitive.Indicator,
|
|
1185
1187
|
{
|
|
1186
1188
|
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
@@ -1189,19 +1191,19 @@ var Progress = React33.forwardRef(({ className, value, ...props }, ref) => /* @_
|
|
|
1189
1191
|
)
|
|
1190
1192
|
));
|
|
1191
1193
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
1192
|
-
var ScrollArea =
|
|
1194
|
+
var ScrollArea = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1193
1195
|
ScrollAreaPrimitive.Root,
|
|
1194
1196
|
{
|
|
1195
1197
|
ref,
|
|
1196
1198
|
className: cn("relative overflow-hidden", className),
|
|
1197
1199
|
...props
|
|
1198
1200
|
},
|
|
1199
|
-
/* @__PURE__ */
|
|
1200
|
-
/* @__PURE__ */
|
|
1201
|
-
/* @__PURE__ */
|
|
1201
|
+
/* @__PURE__ */ React37.createElement(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]" }, children),
|
|
1202
|
+
/* @__PURE__ */ React37.createElement(ScrollBar, null),
|
|
1203
|
+
/* @__PURE__ */ React37.createElement(ScrollAreaPrimitive.Corner, null)
|
|
1202
1204
|
));
|
|
1203
1205
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
1204
|
-
var ScrollBar =
|
|
1206
|
+
var ScrollBar = React37.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1205
1207
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
1206
1208
|
{
|
|
1207
1209
|
ref,
|
|
@@ -1214,13 +1216,13 @@ var ScrollBar = React33.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
1214
1216
|
),
|
|
1215
1217
|
...props
|
|
1216
1218
|
},
|
|
1217
|
-
/* @__PURE__ */
|
|
1219
|
+
/* @__PURE__ */ React37.createElement(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1218
1220
|
));
|
|
1219
1221
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
1220
1222
|
var Select = SelectPrimitive.Root;
|
|
1221
1223
|
var SelectGroup = SelectPrimitive.Group;
|
|
1222
1224
|
var SelectValue = SelectPrimitive.Value;
|
|
1223
|
-
var SelectTrigger =
|
|
1225
|
+
var SelectTrigger = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1224
1226
|
SelectPrimitive.Trigger,
|
|
1225
1227
|
{
|
|
1226
1228
|
ref,
|
|
@@ -1231,10 +1233,10 @@ var SelectTrigger = React33.forwardRef(({ className, children, ...props }, ref)
|
|
|
1231
1233
|
...props
|
|
1232
1234
|
},
|
|
1233
1235
|
children,
|
|
1234
|
-
/* @__PURE__ */
|
|
1236
|
+
/* @__PURE__ */ React37.createElement(SelectPrimitive.Icon, { asChild: true }, /* @__PURE__ */ React37.createElement(ChevronDown, { className: "h-4 w-4 opacity-50" }))
|
|
1235
1237
|
));
|
|
1236
1238
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
1237
|
-
var SelectScrollUpButton =
|
|
1239
|
+
var SelectScrollUpButton = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1238
1240
|
SelectPrimitive.ScrollUpButton,
|
|
1239
1241
|
{
|
|
1240
1242
|
ref,
|
|
@@ -1244,10 +1246,10 @@ var SelectScrollUpButton = React33.forwardRef(({ className, ...props }, ref) =>
|
|
|
1244
1246
|
),
|
|
1245
1247
|
...props
|
|
1246
1248
|
},
|
|
1247
|
-
/* @__PURE__ */
|
|
1249
|
+
/* @__PURE__ */ React37.createElement(ChevronUp, { className: "h-4 w-4" })
|
|
1248
1250
|
));
|
|
1249
1251
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
1250
|
-
var SelectScrollDownButton =
|
|
1252
|
+
var SelectScrollDownButton = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1251
1253
|
SelectPrimitive.ScrollDownButton,
|
|
1252
1254
|
{
|
|
1253
1255
|
ref,
|
|
@@ -1257,10 +1259,10 @@ var SelectScrollDownButton = React33.forwardRef(({ className, ...props }, ref) =
|
|
|
1257
1259
|
),
|
|
1258
1260
|
...props
|
|
1259
1261
|
},
|
|
1260
|
-
/* @__PURE__ */
|
|
1262
|
+
/* @__PURE__ */ React37.createElement(ChevronDown, { className: "h-4 w-4" })
|
|
1261
1263
|
));
|
|
1262
1264
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
1263
|
-
var SelectContent =
|
|
1265
|
+
var SelectContent = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ React37.createElement(SelectPrimitive.Portal, null, /* @__PURE__ */ React37.createElement(
|
|
1264
1266
|
SelectPrimitive.Content,
|
|
1265
1267
|
{
|
|
1266
1268
|
ref,
|
|
@@ -1272,8 +1274,8 @@ var SelectContent = React33.forwardRef(({ className, children, position = "poppe
|
|
|
1272
1274
|
position,
|
|
1273
1275
|
...props
|
|
1274
1276
|
},
|
|
1275
|
-
/* @__PURE__ */
|
|
1276
|
-
/* @__PURE__ */
|
|
1277
|
+
/* @__PURE__ */ React37.createElement(SelectScrollUpButton, null),
|
|
1278
|
+
/* @__PURE__ */ React37.createElement(
|
|
1277
1279
|
SelectPrimitive.Viewport,
|
|
1278
1280
|
{
|
|
1279
1281
|
className: cn(
|
|
@@ -1283,10 +1285,10 @@ var SelectContent = React33.forwardRef(({ className, children, position = "poppe
|
|
|
1283
1285
|
},
|
|
1284
1286
|
children
|
|
1285
1287
|
),
|
|
1286
|
-
/* @__PURE__ */
|
|
1288
|
+
/* @__PURE__ */ React37.createElement(SelectScrollDownButton, null)
|
|
1287
1289
|
)));
|
|
1288
1290
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
1289
|
-
var SelectLabel =
|
|
1291
|
+
var SelectLabel = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1290
1292
|
SelectPrimitive.Label,
|
|
1291
1293
|
{
|
|
1292
1294
|
ref,
|
|
@@ -1295,7 +1297,7 @@ var SelectLabel = React33.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1295
1297
|
}
|
|
1296
1298
|
));
|
|
1297
1299
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
1298
|
-
var SelectItem =
|
|
1300
|
+
var SelectItem = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1299
1301
|
SelectPrimitive.Item,
|
|
1300
1302
|
{
|
|
1301
1303
|
ref,
|
|
@@ -1305,11 +1307,11 @@ var SelectItem = React33.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
1305
1307
|
),
|
|
1306
1308
|
...props
|
|
1307
1309
|
},
|
|
1308
|
-
/* @__PURE__ */
|
|
1309
|
-
/* @__PURE__ */
|
|
1310
|
+
/* @__PURE__ */ React37.createElement("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React37.createElement(SelectPrimitive.ItemIndicator, null, /* @__PURE__ */ React37.createElement(Check, { className: "h-4 w-4" }))),
|
|
1311
|
+
/* @__PURE__ */ React37.createElement(SelectPrimitive.ItemText, null, children)
|
|
1310
1312
|
));
|
|
1311
1313
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
1312
|
-
var SelectSeparator =
|
|
1314
|
+
var SelectSeparator = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1313
1315
|
SelectPrimitive.Separator,
|
|
1314
1316
|
{
|
|
1315
1317
|
ref,
|
|
@@ -1318,8 +1320,8 @@ var SelectSeparator = React33.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
1318
1320
|
}
|
|
1319
1321
|
));
|
|
1320
1322
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
1321
|
-
var Separator3 =
|
|
1322
|
-
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */
|
|
1323
|
+
var Separator3 = React37.forwardRef(
|
|
1324
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1323
1325
|
SeparatorPrimitive.Root,
|
|
1324
1326
|
{
|
|
1325
1327
|
ref,
|
|
@@ -1339,7 +1341,7 @@ var Sheet = DialogPrimitive.Root;
|
|
|
1339
1341
|
var SheetTrigger = DialogPrimitive.Trigger;
|
|
1340
1342
|
var SheetClose = DialogPrimitive.Close;
|
|
1341
1343
|
var SheetPortal = DialogPrimitive.Portal;
|
|
1342
|
-
var SheetOverlay =
|
|
1344
|
+
var SheetOverlay = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1343
1345
|
DialogPrimitive.Overlay,
|
|
1344
1346
|
{
|
|
1345
1347
|
className: cn(
|
|
@@ -1367,21 +1369,21 @@ var sheetVariants = cva(
|
|
|
1367
1369
|
}
|
|
1368
1370
|
}
|
|
1369
1371
|
);
|
|
1370
|
-
var SheetContent =
|
|
1372
|
+
var SheetContent = React37.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ React37.createElement(SheetPortal, null, /* @__PURE__ */ React37.createElement(SheetOverlay, null), /* @__PURE__ */ React37.createElement(
|
|
1371
1373
|
DialogPrimitive.Content,
|
|
1372
1374
|
{
|
|
1373
1375
|
ref,
|
|
1374
1376
|
className: cn(sheetVariants({ side }), className),
|
|
1375
1377
|
...props
|
|
1376
1378
|
},
|
|
1377
|
-
/* @__PURE__ */
|
|
1379
|
+
/* @__PURE__ */ React37.createElement(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary" }, /* @__PURE__ */ React37.createElement(X, { className: "h-4 w-4" }), /* @__PURE__ */ React37.createElement("span", { className: "sr-only" }, "Close")),
|
|
1378
1380
|
children
|
|
1379
1381
|
)));
|
|
1380
1382
|
SheetContent.displayName = DialogPrimitive.Content.displayName;
|
|
1381
1383
|
var SheetHeader = ({
|
|
1382
1384
|
className,
|
|
1383
1385
|
...props
|
|
1384
|
-
}) => /* @__PURE__ */
|
|
1386
|
+
}) => /* @__PURE__ */ React37.createElement(
|
|
1385
1387
|
"div",
|
|
1386
1388
|
{
|
|
1387
1389
|
className: cn(
|
|
@@ -1395,7 +1397,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
1395
1397
|
var SheetFooter = ({
|
|
1396
1398
|
className,
|
|
1397
1399
|
...props
|
|
1398
|
-
}) => /* @__PURE__ */
|
|
1400
|
+
}) => /* @__PURE__ */ React37.createElement(
|
|
1399
1401
|
"div",
|
|
1400
1402
|
{
|
|
1401
1403
|
className: cn(
|
|
@@ -1406,7 +1408,7 @@ var SheetFooter = ({
|
|
|
1406
1408
|
}
|
|
1407
1409
|
);
|
|
1408
1410
|
SheetFooter.displayName = "SheetFooter";
|
|
1409
|
-
var SheetTitle =
|
|
1411
|
+
var SheetTitle = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1410
1412
|
DialogPrimitive.Title,
|
|
1411
1413
|
{
|
|
1412
1414
|
ref,
|
|
@@ -1415,7 +1417,7 @@ var SheetTitle = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1415
1417
|
}
|
|
1416
1418
|
));
|
|
1417
1419
|
SheetTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1418
|
-
var SheetDescription =
|
|
1420
|
+
var SheetDescription = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1419
1421
|
DialogPrimitive.Description,
|
|
1420
1422
|
{
|
|
1421
1423
|
ref,
|
|
@@ -1424,8 +1426,8 @@ var SheetDescription = React33.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1424
1426
|
}
|
|
1425
1427
|
));
|
|
1426
1428
|
SheetDescription.displayName = DialogPrimitive.Description.displayName;
|
|
1427
|
-
var Textarea =
|
|
1428
|
-
return /* @__PURE__ */
|
|
1429
|
+
var Textarea = React37.forwardRef(({ className, ...props }, ref) => {
|
|
1430
|
+
return /* @__PURE__ */ React37.createElement(
|
|
1429
1431
|
"textarea",
|
|
1430
1432
|
{
|
|
1431
1433
|
className: cn(
|
|
@@ -1441,7 +1443,7 @@ Textarea.displayName = "Textarea";
|
|
|
1441
1443
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
1442
1444
|
var Tooltip = TooltipPrimitive.Root;
|
|
1443
1445
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
1444
|
-
var TooltipContent =
|
|
1446
|
+
var TooltipContent = React37.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React37.createElement(TooltipPrimitive.Portal, null, /* @__PURE__ */ React37.createElement(
|
|
1445
1447
|
TooltipPrimitive.Content,
|
|
1446
1448
|
{
|
|
1447
1449
|
ref,
|
|
@@ -1454,7 +1456,7 @@ var TooltipContent = React33.forwardRef(({ className, sideOffset = 4, ...props }
|
|
|
1454
1456
|
}
|
|
1455
1457
|
)));
|
|
1456
1458
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
1457
|
-
var Avatar =
|
|
1459
|
+
var Avatar = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1458
1460
|
AvatarPrimitive.Root,
|
|
1459
1461
|
{
|
|
1460
1462
|
ref,
|
|
@@ -1466,7 +1468,7 @@ var Avatar = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
1466
1468
|
}
|
|
1467
1469
|
));
|
|
1468
1470
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
1469
|
-
var AvatarImage =
|
|
1471
|
+
var AvatarImage = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1470
1472
|
AvatarPrimitive.Image,
|
|
1471
1473
|
{
|
|
1472
1474
|
ref,
|
|
@@ -1475,7 +1477,7 @@ var AvatarImage = React33.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1475
1477
|
}
|
|
1476
1478
|
));
|
|
1477
1479
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
1478
|
-
var AvatarFallback =
|
|
1480
|
+
var AvatarFallback = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
|
|
1479
1481
|
AvatarPrimitive.Fallback,
|
|
1480
1482
|
{
|
|
1481
1483
|
ref,
|
|
@@ -1516,20 +1518,20 @@ function Grid({
|
|
|
1516
1518
|
}) {
|
|
1517
1519
|
const gridColsClasses = buildGridColsClasses(columns);
|
|
1518
1520
|
const gapClass = getGapClassName(gap);
|
|
1519
|
-
return /* @__PURE__ */
|
|
1521
|
+
return /* @__PURE__ */ React37__default.createElement(
|
|
1520
1522
|
"div",
|
|
1521
1523
|
{
|
|
1522
1524
|
className: `grid ${gridColsClasses} ${gapClass} ${className}`.trim(),
|
|
1523
1525
|
style
|
|
1524
1526
|
},
|
|
1525
|
-
items.map((item, index) => /* @__PURE__ */
|
|
1527
|
+
items.map((item, index) => /* @__PURE__ */ React37__default.createElement("div", { key: item.id }, renderItem(item, index)))
|
|
1526
1528
|
);
|
|
1527
1529
|
}
|
|
1528
1530
|
var Timeline = ({ items = [] }) => {
|
|
1529
1531
|
if (!items || items.length === 0) {
|
|
1530
1532
|
return null;
|
|
1531
1533
|
}
|
|
1532
|
-
return /* @__PURE__ */
|
|
1534
|
+
return /* @__PURE__ */ React37__default.createElement("div", { className: "relative" }, /* @__PURE__ */ React37__default.createElement("div", { className: "absolute left-4 top-0 bottom-0 w-0.5 bg-gray-200" }), items.map((item, index) => /* @__PURE__ */ React37__default.createElement("div", { key: index, className: "relative pl-12 pb-8" }, /* @__PURE__ */ React37__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__ */ React37__default.createElement("div", { className: "w-2 h-2 rounded-full bg-white" })), /* @__PURE__ */ React37__default.createElement("div", { className: "bg-white rounded-lg p-4 shadow-md" }, /* @__PURE__ */ React37__default.createElement("div", { className: "text-sm text-gray-500 mb-2" }, item.date), /* @__PURE__ */ React37__default.createElement("h4", { className: "text-lg font-semibold mb-2" }, item.title), /* @__PURE__ */ React37__default.createElement("p", { className: "text-gray-600" }, item.description)))));
|
|
1533
1535
|
};
|
|
1534
1536
|
var CollisionBalls = ({
|
|
1535
1537
|
collisionBallsConfig: {
|
|
@@ -1792,7 +1794,7 @@ var CollisionBalls = ({
|
|
|
1792
1794
|
y: (event.clientY - rect.top) * scaleY
|
|
1793
1795
|
};
|
|
1794
1796
|
};
|
|
1795
|
-
return /* @__PURE__ */
|
|
1797
|
+
return /* @__PURE__ */ React37__default.createElement("div", { style: { width: "100%", height: "100%", position: "relative", backgroundColor: "#f9fafb", borderRadius: "0.5rem" } }, /* @__PURE__ */ React37__default.createElement("div", { ref: containerRef, style: { width: "100%", height: "100%", position: "absolute", top: 0, left: 0 } }, /* @__PURE__ */ React37__default.createElement(
|
|
1796
1798
|
"canvas",
|
|
1797
1799
|
{
|
|
1798
1800
|
ref: canvasRef,
|
|
@@ -1807,14 +1809,14 @@ var CollisionBalls = ({
|
|
|
1807
1809
|
onMouseUp: handleMouseUp,
|
|
1808
1810
|
onMouseLeave: handleMouseUp
|
|
1809
1811
|
}
|
|
1810
|
-
)), /* @__PURE__ */
|
|
1812
|
+
)), /* @__PURE__ */ React37__default.createElement("div", { className: "absolute bottom-4 right-4 flex gap-2" }, /* @__PURE__ */ React37__default.createElement(
|
|
1811
1813
|
"button",
|
|
1812
1814
|
{
|
|
1813
1815
|
onClick: shake,
|
|
1814
1816
|
className: `px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors ${isShaking ? "animate-pulse" : ""}`
|
|
1815
1817
|
},
|
|
1816
1818
|
"\u6447\u4E00\u6447"
|
|
1817
|
-
), /* @__PURE__ */
|
|
1819
|
+
), /* @__PURE__ */ React37__default.createElement(
|
|
1818
1820
|
"button",
|
|
1819
1821
|
{
|
|
1820
1822
|
onClick: slowdown,
|
|
@@ -1823,6 +1825,286 @@ var CollisionBalls = ({
|
|
|
1823
1825
|
"\u51CF\u901F"
|
|
1824
1826
|
)));
|
|
1825
1827
|
};
|
|
1828
|
+
function GenericOrderManager({
|
|
1829
|
+
operations,
|
|
1830
|
+
renderItem,
|
|
1831
|
+
className = "",
|
|
1832
|
+
title = "\u987A\u5E8F\u7BA1\u7406",
|
|
1833
|
+
description = "\u62D6\u62FD\u6216\u4F7F\u7528\u6309\u94AE\u8C03\u6574\u663E\u793A\u987A\u5E8F",
|
|
1834
|
+
onOrderChanged,
|
|
1835
|
+
emptyMessage = "\u6682\u65E0\u6570\u636E",
|
|
1836
|
+
loadingMessage = "\u52A0\u8F7D\u6570\u636E..."
|
|
1837
|
+
}) {
|
|
1838
|
+
const [items, setItems] = useState([]);
|
|
1839
|
+
const [originalOrder, setOriginalOrder] = useState([]);
|
|
1840
|
+
const [loading, setLoading] = useState(true);
|
|
1841
|
+
const [saving, setSaving] = useState(false);
|
|
1842
|
+
const [error, setError] = useState(null);
|
|
1843
|
+
const [hasChanges, setHasChanges] = useState(false);
|
|
1844
|
+
const [draggedItem, setDraggedItem] = useState(null);
|
|
1845
|
+
const loadItems = useCallback(async () => {
|
|
1846
|
+
try {
|
|
1847
|
+
setLoading(true);
|
|
1848
|
+
setError(null);
|
|
1849
|
+
const data = await operations.loadItems();
|
|
1850
|
+
setItems(data);
|
|
1851
|
+
setOriginalOrder([...data]);
|
|
1852
|
+
setHasChanges(false);
|
|
1853
|
+
} catch (err) {
|
|
1854
|
+
console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u52A0\u8F7D\u6570\u636E\u9519\u8BEF:", err);
|
|
1855
|
+
setError(err instanceof Error ? err.message : "\u52A0\u8F7D\u6570\u636E\u5931\u8D25");
|
|
1856
|
+
} finally {
|
|
1857
|
+
setLoading(false);
|
|
1858
|
+
}
|
|
1859
|
+
}, [operations]);
|
|
1860
|
+
useEffect(() => {
|
|
1861
|
+
loadItems();
|
|
1862
|
+
}, [loadItems]);
|
|
1863
|
+
useEffect(() => {
|
|
1864
|
+
const hasOrderChanged = items.some(
|
|
1865
|
+
(item, index) => originalOrder[index]?.id !== item.id
|
|
1866
|
+
);
|
|
1867
|
+
setHasChanges(hasOrderChanged);
|
|
1868
|
+
}, [items, originalOrder]);
|
|
1869
|
+
const handleMoveUp = async (itemId) => {
|
|
1870
|
+
try {
|
|
1871
|
+
setError(null);
|
|
1872
|
+
const currentIndex = items.findIndex((item) => item.id === itemId);
|
|
1873
|
+
if (currentIndex === -1) {
|
|
1874
|
+
setError("\u9879\u76EE\u4E0D\u5B58\u5728");
|
|
1875
|
+
return;
|
|
1876
|
+
}
|
|
1877
|
+
if (currentIndex === 0) {
|
|
1878
|
+
setError("\u9879\u76EE\u5DF2\u7ECF\u5728\u6700\u524D\u9762\uFF0C\u65E0\u6CD5\u4E0A\u79FB");
|
|
1879
|
+
return;
|
|
1880
|
+
}
|
|
1881
|
+
await operations.moveItemUp(itemId);
|
|
1882
|
+
await loadItems();
|
|
1883
|
+
onOrderChanged?.();
|
|
1884
|
+
} catch (err) {
|
|
1885
|
+
console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u4E0A\u79FB\u9879\u76EE\u9519\u8BEF:", err);
|
|
1886
|
+
setError(err instanceof Error ? err.message : "\u4E0A\u79FB\u5931\u8D25");
|
|
1887
|
+
}
|
|
1888
|
+
};
|
|
1889
|
+
const handleMoveDown = async (itemId) => {
|
|
1890
|
+
try {
|
|
1891
|
+
setError(null);
|
|
1892
|
+
const currentIndex = items.findIndex((item) => item.id === itemId);
|
|
1893
|
+
if (currentIndex === -1) {
|
|
1894
|
+
setError("\u9879\u76EE\u4E0D\u5B58\u5728");
|
|
1895
|
+
return;
|
|
1896
|
+
}
|
|
1897
|
+
if (currentIndex === items.length - 1) {
|
|
1898
|
+
setError("\u9879\u76EE\u5DF2\u7ECF\u5728\u6700\u540E\u9762\uFF0C\u65E0\u6CD5\u4E0B\u79FB");
|
|
1899
|
+
return;
|
|
1900
|
+
}
|
|
1901
|
+
await operations.moveItemDown(itemId);
|
|
1902
|
+
await loadItems();
|
|
1903
|
+
onOrderChanged?.();
|
|
1904
|
+
} catch (err) {
|
|
1905
|
+
console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u4E0B\u79FB\u9879\u76EE\u9519\u8BEF:", err);
|
|
1906
|
+
setError(err instanceof Error ? err.message : "\u4E0B\u79FB\u5931\u8D25");
|
|
1907
|
+
}
|
|
1908
|
+
};
|
|
1909
|
+
const handleDragStart = (e, index) => {
|
|
1910
|
+
setDraggedItem(index);
|
|
1911
|
+
e.dataTransfer.effectAllowed = "move";
|
|
1912
|
+
};
|
|
1913
|
+
const handleDragOver = (e, _index) => {
|
|
1914
|
+
e.preventDefault();
|
|
1915
|
+
e.dataTransfer.dropEffect = "move";
|
|
1916
|
+
};
|
|
1917
|
+
const handleDrop = async (e, dropIndex) => {
|
|
1918
|
+
e.preventDefault();
|
|
1919
|
+
if (draggedItem === null || draggedItem === dropIndex) {
|
|
1920
|
+
setDraggedItem(null);
|
|
1921
|
+
return;
|
|
1922
|
+
}
|
|
1923
|
+
try {
|
|
1924
|
+
setError(null);
|
|
1925
|
+
const newItems = [...items];
|
|
1926
|
+
const draggedItemData = newItems[draggedItem];
|
|
1927
|
+
if (!draggedItemData) return;
|
|
1928
|
+
newItems.splice(draggedItem, 1);
|
|
1929
|
+
newItems.splice(dropIndex, 0, draggedItemData);
|
|
1930
|
+
const itemOrders = newItems.map((item, index) => ({
|
|
1931
|
+
id: item.id,
|
|
1932
|
+
order: index
|
|
1933
|
+
}));
|
|
1934
|
+
await operations.updateItemOrder(itemOrders);
|
|
1935
|
+
await loadItems();
|
|
1936
|
+
onOrderChanged?.();
|
|
1937
|
+
} catch (err) {
|
|
1938
|
+
console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u62D6\u62FD\u6392\u5E8F\u9519\u8BEF:", err);
|
|
1939
|
+
setError(err instanceof Error ? err.message : "\u6392\u5E8F\u5931\u8D25");
|
|
1940
|
+
} finally {
|
|
1941
|
+
setDraggedItem(null);
|
|
1942
|
+
}
|
|
1943
|
+
};
|
|
1944
|
+
const handleSaveOrder = async () => {
|
|
1945
|
+
try {
|
|
1946
|
+
setSaving(true);
|
|
1947
|
+
setError(null);
|
|
1948
|
+
const itemOrders = items.map((item, index) => ({
|
|
1949
|
+
id: item.id,
|
|
1950
|
+
order: index
|
|
1951
|
+
}));
|
|
1952
|
+
await operations.updateItemOrder(itemOrders);
|
|
1953
|
+
setOriginalOrder([...items]);
|
|
1954
|
+
setHasChanges(false);
|
|
1955
|
+
onOrderChanged?.();
|
|
1956
|
+
} catch (err) {
|
|
1957
|
+
console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u4FDD\u5B58\u987A\u5E8F\u9519\u8BEF:", err);
|
|
1958
|
+
setError(err instanceof Error ? err.message : "\u4FDD\u5B58\u5931\u8D25");
|
|
1959
|
+
await loadItems();
|
|
1960
|
+
} finally {
|
|
1961
|
+
setSaving(false);
|
|
1962
|
+
}
|
|
1963
|
+
};
|
|
1964
|
+
const handleResetOrder = () => {
|
|
1965
|
+
setItems([...originalOrder]);
|
|
1966
|
+
};
|
|
1967
|
+
if (loading) {
|
|
1968
|
+
return /* @__PURE__ */ React37__default.createElement("div", { className: cn("flex flex-col items-center justify-center p-12 text-gray-500", className) }, /* @__PURE__ */ React37__default.createElement("div", { className: "w-6 h-6 border-2 border-gray-200 border-t-blue-500 rounded-full animate-spin mb-2" }), /* @__PURE__ */ React37__default.createElement("span", null, loadingMessage));
|
|
1969
|
+
}
|
|
1970
|
+
return /* @__PURE__ */ React37__default.createElement("div", { className: cn("bg-white rounded-xl p-6 shadow-md border-2 border-gray-100", className) }, /* @__PURE__ */ React37__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__ */ React37__default.createElement("h3", { className: "m-0 text-gray-900 text-lg font-semibold" }, title), /* @__PURE__ */ React37__default.createElement("div", { className: "flex gap-3 w-full sm:w-auto" }, hasChanges && /* @__PURE__ */ React37__default.createElement(React37__default.Fragment, null, /* @__PURE__ */ React37__default.createElement(
|
|
1971
|
+
"button",
|
|
1972
|
+
{
|
|
1973
|
+
onClick: handleResetOrder,
|
|
1974
|
+
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",
|
|
1975
|
+
title: "\u91CD\u7F6E\u4E3A\u539F\u59CB\u987A\u5E8F"
|
|
1976
|
+
},
|
|
1977
|
+
/* @__PURE__ */ React37__default.createElement(RotateCcw, { size: 16 }),
|
|
1978
|
+
"\u91CD\u7F6E"
|
|
1979
|
+
), /* @__PURE__ */ React37__default.createElement(
|
|
1980
|
+
"button",
|
|
1981
|
+
{
|
|
1982
|
+
onClick: handleSaveOrder,
|
|
1983
|
+
disabled: saving,
|
|
1984
|
+
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",
|
|
1985
|
+
title: "\u4FDD\u5B58\u65B0\u987A\u5E8F"
|
|
1986
|
+
},
|
|
1987
|
+
/* @__PURE__ */ React37__default.createElement(Save, { size: 16 }),
|
|
1988
|
+
saving ? "\u4FDD\u5B58\u4E2D..." : "\u4FDD\u5B58\u987A\u5E8F"
|
|
1989
|
+
)))), error && /* @__PURE__ */ React37__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__ */ React37__default.createElement(AlertCircle, { size: 16 }), /* @__PURE__ */ React37__default.createElement("span", null, error)), /* @__PURE__ */ React37__default.createElement("div", { className: "bg-slate-50 border border-slate-200 rounded-lg p-4 mb-6" }, /* @__PURE__ */ React37__default.createElement("p", { className: "m-0 mb-2 color-slate-500 text-sm" }, description), /* @__PURE__ */ React37__default.createElement("ul", { className: "m-0 pl-6 color-slate-500 text-sm list-disc" }, /* @__PURE__ */ React37__default.createElement("li", { className: "mb-1" }, "\u4F7F\u7528\u62D6\u62FD\uFF1A\u70B9\u51FB\u5E76\u62D6\u52A8 ", /* @__PURE__ */ React37__default.createElement(GripVertical, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u56FE\u6807"), /* @__PURE__ */ React37__default.createElement("li", { className: "mb-1" }, "\u4F7F\u7528\u6309\u94AE\uFF1A\u70B9\u51FB ", /* @__PURE__ */ React37__default.createElement(ChevronUp, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u6216 ", /* @__PURE__ */ React37__default.createElement(ChevronDown, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u6309\u94AE"), /* @__PURE__ */ React37__default.createElement("li", null, '\u5B8C\u6210\u8C03\u6574\u540E\uFF0C\u70B9\u51FB"\u4FDD\u5B58\u987A\u5E8F"\u6309\u94AE\u4FDD\u5B58\u66F4\u6539'))), /* @__PURE__ */ React37__default.createElement("div", { className: "flex flex-col gap-3" }, items.map((item, index) => /* @__PURE__ */ React37__default.createElement(
|
|
1990
|
+
"div",
|
|
1991
|
+
{
|
|
1992
|
+
key: item.id,
|
|
1993
|
+
className: cn(
|
|
1994
|
+
"flex items-center gap-3 p-4 bg-gray-50 border-2 border-gray-200 rounded-lg transition-all hover:border-gray-300 hover:shadow-sm",
|
|
1995
|
+
draggedItem === index && "opacity-50 rotate-2 border-blue-500"
|
|
1996
|
+
),
|
|
1997
|
+
draggable: true,
|
|
1998
|
+
onDragStart: (e) => handleDragStart(e, index),
|
|
1999
|
+
onDragOver: (e) => handleDragOver(e),
|
|
2000
|
+
onDrop: (e) => handleDrop(e, index)
|
|
2001
|
+
},
|
|
2002
|
+
/* @__PURE__ */ React37__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__ */ React37__default.createElement(GripVertical, { size: 20 })),
|
|
2003
|
+
/* @__PURE__ */ React37__default.createElement("div", { className: "flex-1 min-w-0" }, renderItem(item, index, index === 0, index === items.length - 1)),
|
|
2004
|
+
/* @__PURE__ */ React37__default.createElement("div", { className: "flex items-center mx-3" }, /* @__PURE__ */ React37__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)),
|
|
2005
|
+
/* @__PURE__ */ React37__default.createElement("div", { className: "flex flex-col gap-1 sm:flex-col flex-row" }, /* @__PURE__ */ React37__default.createElement(
|
|
2006
|
+
"button",
|
|
2007
|
+
{
|
|
2008
|
+
onClick: () => handleMoveUp(item.id),
|
|
2009
|
+
disabled: index === 0,
|
|
2010
|
+
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",
|
|
2011
|
+
title: "\u4E0A\u79FB"
|
|
2012
|
+
},
|
|
2013
|
+
/* @__PURE__ */ React37__default.createElement(ChevronUp, { size: 18 })
|
|
2014
|
+
), /* @__PURE__ */ React37__default.createElement(
|
|
2015
|
+
"button",
|
|
2016
|
+
{
|
|
2017
|
+
onClick: () => handleMoveDown(item.id),
|
|
2018
|
+
disabled: index === items.length - 1,
|
|
2019
|
+
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",
|
|
2020
|
+
title: "\u4E0B\u79FB"
|
|
2021
|
+
},
|
|
2022
|
+
/* @__PURE__ */ React37__default.createElement(ChevronDown, { size: 18 })
|
|
2023
|
+
))
|
|
2024
|
+
))), items.length === 0 && /* @__PURE__ */ React37__default.createElement("div", { className: "text-center p-12 text-gray-400 italic" }, /* @__PURE__ */ React37__default.createElement("p", { className: "m-0" }, emptyMessage)));
|
|
2025
|
+
}
|
|
2026
|
+
var BackButton = ({ href, className = "" }) => {
|
|
2027
|
+
const router = useRouter();
|
|
2028
|
+
const handleClick = () => {
|
|
2029
|
+
if (href) {
|
|
2030
|
+
router.push(href);
|
|
2031
|
+
} else {
|
|
2032
|
+
router.back();
|
|
2033
|
+
}
|
|
2034
|
+
};
|
|
2035
|
+
return /* @__PURE__ */ React37__default.createElement(
|
|
2036
|
+
"button",
|
|
2037
|
+
{
|
|
2038
|
+
onClick: handleClick,
|
|
2039
|
+
className: cn(
|
|
2040
|
+
"inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors",
|
|
2041
|
+
className
|
|
2042
|
+
)
|
|
2043
|
+
},
|
|
2044
|
+
/* @__PURE__ */ React37__default.createElement(
|
|
2045
|
+
"svg",
|
|
2046
|
+
{
|
|
2047
|
+
className: "w-5 h-5 mr-2",
|
|
2048
|
+
fill: "none",
|
|
2049
|
+
stroke: "currentColor",
|
|
2050
|
+
viewBox: "0 0 24 24"
|
|
2051
|
+
},
|
|
2052
|
+
/* @__PURE__ */ React37__default.createElement(
|
|
2053
|
+
"path",
|
|
2054
|
+
{
|
|
2055
|
+
strokeLinecap: "round",
|
|
2056
|
+
strokeLinejoin: "round",
|
|
2057
|
+
strokeWidth: 2,
|
|
2058
|
+
d: "M10 19l-7-7m0 0l7-7m-7 7h18"
|
|
2059
|
+
}
|
|
2060
|
+
)
|
|
2061
|
+
),
|
|
2062
|
+
"\u8FD4\u56DE"
|
|
2063
|
+
);
|
|
2064
|
+
};
|
|
2065
|
+
function getColorValue(bgClass) {
|
|
2066
|
+
const colorMap = {
|
|
2067
|
+
"bg-blue-500": "#3b82f6",
|
|
2068
|
+
"bg-green-500": "#10b981",
|
|
2069
|
+
"bg-red-500": "#ef4444",
|
|
2070
|
+
"bg-purple-500": "#8b5cf6",
|
|
2071
|
+
"bg-slate-500": "#64748b",
|
|
2072
|
+
"bg-emerald-500": "#10b981",
|
|
2073
|
+
"bg-orange-500": "#f97316"
|
|
2074
|
+
};
|
|
2075
|
+
return colorMap[bgClass] || "#3b82f6";
|
|
2076
|
+
}
|
|
2077
|
+
function FilterButtonGroup({
|
|
2078
|
+
label,
|
|
2079
|
+
value,
|
|
2080
|
+
options,
|
|
2081
|
+
onChange,
|
|
2082
|
+
className
|
|
2083
|
+
}) {
|
|
2084
|
+
return /* @__PURE__ */ React37__default.createElement("div", { className: cn("space-y-4", className) }, /* @__PURE__ */ React37__default.createElement("h3", { className: "text-lg font-semibold text-gray-800" }, label), /* @__PURE__ */ React37__default.createElement("div", { className: "flex gap-3" }, options.map((option) => {
|
|
2085
|
+
const isActive = value === option.value;
|
|
2086
|
+
return /* @__PURE__ */ React37__default.createElement(
|
|
2087
|
+
"button",
|
|
2088
|
+
{
|
|
2089
|
+
key: option.value,
|
|
2090
|
+
onClick: () => onChange(option.value),
|
|
2091
|
+
style: isActive ? { backgroundColor: getColorValue(option.activeColor.bg) } : void 0,
|
|
2092
|
+
className: cn(
|
|
2093
|
+
"flex-1 h-12 rounded-lg font-medium text-sm transition-all duration-200 ease-out focus:outline-none focus:ring-2 focus:ring-opacity-50 border",
|
|
2094
|
+
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"
|
|
2095
|
+
)
|
|
2096
|
+
},
|
|
2097
|
+
/* @__PURE__ */ React37__default.createElement("div", { className: "flex items-center justify-center space-x-2" }, /* @__PURE__ */ React37__default.createElement("span", { className: "text-lg" }, option.icon), /* @__PURE__ */ React37__default.createElement("span", null, option.label), option.showCount && option.count !== void 0 && /* @__PURE__ */ React37__default.createElement("span", { className: cn(
|
|
2098
|
+
"text-xs font-semibold px-2 py-0.5 rounded-full min-w-[1.25rem] text-center",
|
|
2099
|
+
isActive ? "bg-white/20 text-white" : "bg-gray-100 text-gray-600"
|
|
2100
|
+
) }, option.count))
|
|
2101
|
+
);
|
|
2102
|
+
})));
|
|
2103
|
+
}
|
|
2104
|
+
function SearchResultHint({ searchQuery, resultCount, className }) {
|
|
2105
|
+
if (!searchQuery) return null;
|
|
2106
|
+
return /* @__PURE__ */ React37__default.createElement("div", { className: cn("mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg", className) }, /* @__PURE__ */ React37__default.createElement("p", { className: "text-sm text-blue-700" }, '\u641C\u7D22 "', /* @__PURE__ */ React37__default.createElement("span", { className: "font-medium" }, searchQuery), '" \u627E\u5230 ', resultCount, " \u4E2A\u7ED3\u679C"));
|
|
2107
|
+
}
|
|
1826
2108
|
var themeStyles = {
|
|
1827
2109
|
light: "",
|
|
1828
2110
|
dark: "bg-[#222] text-[#eee] border-[#444]",
|
|
@@ -1845,7 +2127,7 @@ var ProfileModal = ({
|
|
|
1845
2127
|
}) => {
|
|
1846
2128
|
const renderSocialLinks = () => {
|
|
1847
2129
|
if (!data.socialLinks || data.socialLinks.length === 0) return null;
|
|
1848
|
-
return /* @__PURE__ */
|
|
2130
|
+
return /* @__PURE__ */ React37__default.createElement("div", { className: "flex gap-3 mt-2" }, data.socialLinks.map((link, index) => /* @__PURE__ */ React37__default.createElement(
|
|
1849
2131
|
"a",
|
|
1850
2132
|
{
|
|
1851
2133
|
key: index,
|
|
@@ -1864,15 +2146,15 @@ var ProfileModal = ({
|
|
|
1864
2146
|
}
|
|
1865
2147
|
}
|
|
1866
2148
|
},
|
|
1867
|
-
link.icon ? /* @__PURE__ */
|
|
2149
|
+
link.icon ? /* @__PURE__ */ React37__default.createElement("span", { className: "text-base" }, link.icon) : /* @__PURE__ */ React37__default.createElement("span", { className: "text-[10px] font-semibold" }, link.type)
|
|
1868
2150
|
)));
|
|
1869
2151
|
};
|
|
1870
2152
|
const renderContacts = () => {
|
|
1871
2153
|
if (!data.contacts || Object.keys(data.contacts).length === 0) return null;
|
|
1872
|
-
return /* @__PURE__ */
|
|
2154
|
+
return /* @__PURE__ */ React37__default.createElement("div", { className: cn(
|
|
1873
2155
|
"mt-4 border-t pt-4",
|
|
1874
2156
|
themeName === "dark" ? "border-gray-800" : "border-gray-100"
|
|
1875
|
-
) }, Object.entries(data.contacts).map(([type, value], index) => /* @__PURE__ */
|
|
2157
|
+
) }, Object.entries(data.contacts).map(([type, value], index) => /* @__PURE__ */ React37__default.createElement(
|
|
1876
2158
|
"div",
|
|
1877
2159
|
{
|
|
1878
2160
|
key: index,
|
|
@@ -1882,35 +2164,35 @@ var ProfileModal = ({
|
|
|
1882
2164
|
),
|
|
1883
2165
|
onClick: () => onContactClick && onContactClick(type, value)
|
|
1884
2166
|
},
|
|
1885
|
-
/* @__PURE__ */
|
|
2167
|
+
/* @__PURE__ */ React37__default.createElement("span", { className: cn(
|
|
1886
2168
|
"font-medium w-[70px] shrink-0",
|
|
1887
2169
|
themeName === "dark" ? "text-gray-400" : "text-gray-500"
|
|
1888
2170
|
) }, type, ":"),
|
|
1889
|
-
/* @__PURE__ */
|
|
2171
|
+
/* @__PURE__ */ React37__default.createElement("span", { className: themeName === "dark" ? "text-gray-200" : "text-gray-800" }, value)
|
|
1890
2172
|
)));
|
|
1891
2173
|
};
|
|
1892
|
-
return /* @__PURE__ */
|
|
2174
|
+
return /* @__PURE__ */ React37__default.createElement(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose() }, /* @__PURE__ */ React37__default.createElement(DialogContent, { className: cn(
|
|
1893
2175
|
"sm:max-w-[500px] p-0 overflow-hidden border-none shadow-2xl",
|
|
1894
2176
|
themeStyles[themeName] || "",
|
|
1895
2177
|
className
|
|
1896
|
-
) }, /* @__PURE__ */
|
|
2178
|
+
) }, /* @__PURE__ */ React37__default.createElement("div", { className: "p-6" }, /* @__PURE__ */ React37__default.createElement("div", { className: "flex gap-5 mb-5" }, showAvatar && /* @__PURE__ */ React37__default.createElement(
|
|
1897
2179
|
"div",
|
|
1898
2180
|
{
|
|
1899
2181
|
className: "shrink-0",
|
|
1900
2182
|
onClick: onAvatarClick,
|
|
1901
2183
|
style: { cursor: onAvatarClick ? "pointer" : "default" }
|
|
1902
2184
|
},
|
|
1903
|
-
/* @__PURE__ */
|
|
1904
|
-
), /* @__PURE__ */
|
|
2185
|
+
/* @__PURE__ */ React37__default.createElement(Avatar, { className: "border-2 border-primary/10 shadow-sm", style: { width: avatarSize, height: avatarSize } }, data.avatar && /* @__PURE__ */ React37__default.createElement(AvatarImage, { src: data.avatar, alt: data.name, className: "object-cover" }), /* @__PURE__ */ React37__default.createElement(AvatarFallback, { className: "text-xl" }, data.name.substring(0, 2).toUpperCase()))
|
|
2186
|
+
), /* @__PURE__ */ React37__default.createElement("div", { className: "flex-1 min-w-0 flex flex-col justify-center" }, /* @__PURE__ */ React37__default.createElement("h2", { className: cn(
|
|
1905
2187
|
"text-2xl font-bold m-0 mb-1",
|
|
1906
2188
|
themeName === "dark" ? "text-white" : "text-gray-900"
|
|
1907
|
-
) }, data.name), data.title && /* @__PURE__ */
|
|
2189
|
+
) }, data.name), data.title && /* @__PURE__ */ React37__default.createElement("div", { className: cn(
|
|
1908
2190
|
"text-sm mb-2",
|
|
1909
2191
|
themeName === "dark" ? "text-gray-400" : "text-gray-500"
|
|
1910
|
-
) }, data.title), showSocial && renderSocialLinks())), showBio && data.bio && /* @__PURE__ */
|
|
2192
|
+
) }, data.title), showSocial && renderSocialLinks())), showBio && data.bio && /* @__PURE__ */ React37__default.createElement("div", { className: cn(
|
|
1911
2193
|
"mb-5 leading-relaxed text-sm",
|
|
1912
2194
|
themeName === "dark" ? "text-gray-300" : "text-gray-600"
|
|
1913
|
-
) }, /* @__PURE__ */
|
|
2195
|
+
) }, /* @__PURE__ */ React37__default.createElement("p", null, data.bio)), showContacts && renderContacts(), data.customContent && /* @__PURE__ */ React37__default.createElement("div", { className: "mt-5" }, data.customContent))));
|
|
1914
2196
|
};
|
|
1915
2197
|
var ProfileModal_default = ProfileModal;
|
|
1916
2198
|
var BadgeList = ({
|
|
@@ -1918,13 +2200,13 @@ var BadgeList = ({
|
|
|
1918
2200
|
className = ""
|
|
1919
2201
|
}) => {
|
|
1920
2202
|
if (!badges || badges.length === 0) return null;
|
|
1921
|
-
return /* @__PURE__ */
|
|
2203
|
+
return /* @__PURE__ */ React37__default.createElement("div", { className: cn("flex flex-wrap gap-2 mt-4", className) }, badges.map((badge, index) => /* @__PURE__ */ React37__default.createElement(
|
|
1922
2204
|
Badge,
|
|
1923
2205
|
{
|
|
1924
2206
|
key: index,
|
|
1925
2207
|
variant: badge.type === "default" ? "default" : badge.type
|
|
1926
2208
|
},
|
|
1927
|
-
badge.icon && /* @__PURE__ */
|
|
2209
|
+
badge.icon && /* @__PURE__ */ React37__default.createElement("span", { className: "mr-1" }, badge.icon),
|
|
1928
2210
|
badge.label
|
|
1929
2211
|
)));
|
|
1930
2212
|
};
|
|
@@ -1975,7 +2257,7 @@ var exampleProfileData = {
|
|
|
1975
2257
|
{ label: "\u7C89\u4E1D", value: 1024 },
|
|
1976
2258
|
{ label: "\u8BC4\u5206", value: "4.9" }
|
|
1977
2259
|
],
|
|
1978
|
-
customContent: /* @__PURE__ */
|
|
2260
|
+
customContent: /* @__PURE__ */ React37__default.createElement("div", { className: "mt-5 border-t border-gray-100 pt-4" }, /* @__PURE__ */ React37__default.createElement("h3", { className: "text-sm font-semibold mb-2" }, "\u4E13\u4E1A\u6280\u80FD"), /* @__PURE__ */ React37__default.createElement("p", { className: "text-sm text-gray-600 leading-relaxed" }, "\u7CBE\u901AReact\u3001Vue\u3001Angular\u7B49\u524D\u7AEF\u6846\u67B6\uFF0C\u719F\u6089TypeScript\u3001JavaScript\u3001CSS3\u3001HTML5\u7B49\u524D\u7AEF\u6280\u672F\u3002 \u6709\u4E30\u5BCC\u7684\u5927\u578B\u9879\u76EE\u5F00\u53D1\u7ECF\u9A8C\uFF0C\u80FD\u72EC\u7ACB\u8D1F\u8D23\u524D\u7AEF\u67B6\u6784\u8BBE\u8BA1\u3002"))
|
|
1979
2261
|
};
|
|
1980
2262
|
var ProfileButton = ({
|
|
1981
2263
|
data = exampleProfileData,
|
|
@@ -1995,7 +2277,7 @@ var ProfileButton = ({
|
|
|
1995
2277
|
window.open(`tel:${value}`);
|
|
1996
2278
|
}
|
|
1997
2279
|
};
|
|
1998
|
-
return /* @__PURE__ */
|
|
2280
|
+
return /* @__PURE__ */ React37__default.createElement(React37__default.Fragment, null, /* @__PURE__ */ React37__default.createElement(
|
|
1999
2281
|
Button,
|
|
2000
2282
|
{
|
|
2001
2283
|
variant,
|
|
@@ -2004,7 +2286,7 @@ var ProfileButton = ({
|
|
|
2004
2286
|
className
|
|
2005
2287
|
},
|
|
2006
2288
|
buttonText
|
|
2007
|
-
), /* @__PURE__ */
|
|
2289
|
+
), /* @__PURE__ */ React37__default.createElement(
|
|
2008
2290
|
ProfileModal_default,
|
|
2009
2291
|
{
|
|
2010
2292
|
isOpen: isModalOpen,
|
|
@@ -2015,8 +2297,8 @@ var ProfileButton = ({
|
|
|
2015
2297
|
onSocialLinkClick: (url) => window.open(url, "_blank")
|
|
2016
2298
|
},
|
|
2017
2299
|
data.customContent,
|
|
2018
|
-
data.badges && /* @__PURE__ */
|
|
2019
|
-
data.stats && /* @__PURE__ */
|
|
2300
|
+
data.badges && /* @__PURE__ */ React37__default.createElement(BadgeList, { badges: data.badges }),
|
|
2301
|
+
data.stats && /* @__PURE__ */ React37__default.createElement(StatList, { stats: data.stats })
|
|
2020
2302
|
));
|
|
2021
2303
|
};
|
|
2022
2304
|
var AutoOpenModal = ({
|
|
@@ -2046,7 +2328,7 @@ var AutoOpenModal = ({
|
|
|
2046
2328
|
window.open(`tel:${value}`);
|
|
2047
2329
|
}
|
|
2048
2330
|
};
|
|
2049
|
-
return /* @__PURE__ */
|
|
2331
|
+
return /* @__PURE__ */ React37__default.createElement(
|
|
2050
2332
|
ProfileModal_default,
|
|
2051
2333
|
{
|
|
2052
2334
|
isOpen: isModalOpen,
|
|
@@ -2056,8 +2338,8 @@ var AutoOpenModal = ({
|
|
|
2056
2338
|
onContactClick: handleContactClick,
|
|
2057
2339
|
onSocialLinkClick: (url) => window.open(url, "_blank")
|
|
2058
2340
|
},
|
|
2059
|
-
data.badges && /* @__PURE__ */
|
|
2060
|
-
data.stats && /* @__PURE__ */
|
|
2341
|
+
data.badges && /* @__PURE__ */ React37__default.createElement(BadgeList, { badges: data.badges }),
|
|
2342
|
+
data.stats && /* @__PURE__ */ React37__default.createElement(StatList, { stats: data.stats })
|
|
2061
2343
|
);
|
|
2062
2344
|
};
|
|
2063
2345
|
var sizeMap = {
|
|
@@ -2081,7 +2363,7 @@ var EnhancedAvatar = ({
|
|
|
2081
2363
|
}) => {
|
|
2082
2364
|
const sizeClass = typeof size === "string" ? sizeMap[size] : "";
|
|
2083
2365
|
const customSizeStyle = typeof size === "number" ? { width: size, height: size } : {};
|
|
2084
|
-
return /* @__PURE__ */
|
|
2366
|
+
return /* @__PURE__ */ React37__default.createElement("div", { className: cn("relative inline-block", className), onClick }, /* @__PURE__ */ React37__default.createElement(Avatar, { className: cn(sizeClass, onClick && "cursor-pointer hover:ring-2 hover:ring-blue-500 transition-all"), style: customSizeStyle }, src && /* @__PURE__ */ React37__default.createElement(AvatarImage, { src, alt: name || "Avatar", className: "object-cover" }), /* @__PURE__ */ React37__default.createElement(AvatarFallback, { className: "bg-primary/10 text-primary-foreground" }, name ? name.substring(0, 2).toUpperCase() : "??")), mood && /* @__PURE__ */ React37__default.createElement(
|
|
2085
2367
|
"div",
|
|
2086
2368
|
{
|
|
2087
2369
|
className: cn(
|
|
@@ -2090,13 +2372,13 @@ var EnhancedAvatar = ({
|
|
|
2090
2372
|
typeof size === "number" ? size > 60 ? "h-4 w-4" : "h-3 w-3" : size === "large" ? "h-4 w-4" : "h-3 w-3"
|
|
2091
2373
|
)
|
|
2092
2374
|
}
|
|
2093
|
-
), statusText && /* @__PURE__ */
|
|
2375
|
+
), statusText && /* @__PURE__ */ React37__default.createElement("div", { className: "absolute -bottom-6 left-1/2 transform -translate-x-1/2 whitespace-nowrap" }, /* @__PURE__ */ React37__default.createElement("span", { className: "text-xs text-muted-foreground" }, statusText)));
|
|
2094
2376
|
};
|
|
2095
2377
|
var About = ({
|
|
2096
2378
|
timelineConfig,
|
|
2097
2379
|
collisionBallsConfig
|
|
2098
2380
|
}) => {
|
|
2099
|
-
return /* @__PURE__ */
|
|
2381
|
+
return /* @__PURE__ */ React37__default.createElement("section", { id: "about", className: "py-16 bg-white" }, /* @__PURE__ */ React37__default.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React37__default.createElement("h2", { className: "text-3xl font-bold text-center mb-12" }, "\u5173\u4E8E\u6211"), /* @__PURE__ */ React37__default.createElement("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-12" }, /* @__PURE__ */ React37__default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6" }, /* @__PURE__ */ React37__default.createElement("h3", { className: "text-2xl font-semibold mb-6" }, "\u4E2A\u4EBA\u7ECF\u5386"), /* @__PURE__ */ React37__default.createElement(Timeline, { items: timelineConfig.items })), /* @__PURE__ */ React37__default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6" }, /* @__PURE__ */ React37__default.createElement("h3", { className: "text-2xl font-semibold mb-6" }, "\u6280\u80FD\u5C55\u793A"), /* @__PURE__ */ React37__default.createElement("div", { style: { height: "400px", position: "relative" } }, /* @__PURE__ */ React37__default.createElement(CollisionBalls, { collisionBallsConfig }))))));
|
|
2100
2382
|
};
|
|
2101
2383
|
var About_default = About;
|
|
2102
2384
|
var Contact = () => {
|
|
@@ -2128,7 +2410,7 @@ var Contact = () => {
|
|
|
2128
2410
|
setIsSubmitting(false);
|
|
2129
2411
|
}
|
|
2130
2412
|
};
|
|
2131
|
-
return /* @__PURE__ */
|
|
2413
|
+
return /* @__PURE__ */ React37__default.createElement("section", { id: "contact", className: "py-16 bg-gray-50" }, /* @__PURE__ */ React37__default.createElement("div", { className: "max-w-4xl mx-auto px-4 sm:px-6 lg:px-8" }, /* @__PURE__ */ React37__default.createElement("div", { className: "text-center mb-12" }, /* @__PURE__ */ React37__default.createElement("h2", { className: "text-3xl font-bold text-gray-900 sm:text-4xl" }, "\u8054\u7CFB\u6211"), /* @__PURE__ */ React37__default.createElement("p", { className: "mt-4 text-lg text-gray-600" }, "\u6709\u4EFB\u4F55\u95EE\u9898\u6216\u5EFA\u8BAE\uFF1F\u8BF7\u968F\u65F6\u8054\u7CFB\u6211")), /* @__PURE__ */ React37__default.createElement("div", { className: "bg-white rounded-lg shadow-xl p-6 sm:p-8" }, /* @__PURE__ */ React37__default.createElement("form", { onSubmit: handleSubmit, className: "space-y-6" }, /* @__PURE__ */ React37__default.createElement("div", null, /* @__PURE__ */ React37__default.createElement("label", { htmlFor: "name", className: "block text-sm font-medium text-gray-700" }, "\u59D3\u540D"), /* @__PURE__ */ React37__default.createElement(
|
|
2132
2414
|
"input",
|
|
2133
2415
|
{
|
|
2134
2416
|
type: "text",
|
|
@@ -2140,7 +2422,7 @@ var Contact = () => {
|
|
|
2140
2422
|
className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm",
|
|
2141
2423
|
placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u59D3\u540D"
|
|
2142
2424
|
}
|
|
2143
|
-
)), /* @__PURE__ */
|
|
2425
|
+
)), /* @__PURE__ */ React37__default.createElement("div", null, /* @__PURE__ */ React37__default.createElement("label", { htmlFor: "email", className: "block text-sm font-medium text-gray-700" }, "\u90AE\u7BB1"), /* @__PURE__ */ React37__default.createElement(
|
|
2144
2426
|
"input",
|
|
2145
2427
|
{
|
|
2146
2428
|
type: "email",
|
|
@@ -2152,7 +2434,7 @@ var Contact = () => {
|
|
|
2152
2434
|
className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm",
|
|
2153
2435
|
placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u90AE\u7BB1"
|
|
2154
2436
|
}
|
|
2155
|
-
)), /* @__PURE__ */
|
|
2437
|
+
)), /* @__PURE__ */ React37__default.createElement("div", null, /* @__PURE__ */ React37__default.createElement("label", { htmlFor: "message", className: "block text-sm font-medium text-gray-700" }, "\u6D88\u606F"), /* @__PURE__ */ React37__default.createElement(
|
|
2156
2438
|
"textarea",
|
|
2157
2439
|
{
|
|
2158
2440
|
name: "message",
|
|
@@ -2164,7 +2446,7 @@ var Contact = () => {
|
|
|
2164
2446
|
className: "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm",
|
|
2165
2447
|
placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u6D88\u606F"
|
|
2166
2448
|
}
|
|
2167
|
-
)), /* @__PURE__ */
|
|
2449
|
+
)), /* @__PURE__ */ React37__default.createElement("div", { className: "flex items-center justify-end" }, /* @__PURE__ */ React37__default.createElement(
|
|
2168
2450
|
"button",
|
|
2169
2451
|
{
|
|
2170
2452
|
type: "submit",
|
|
@@ -2173,9 +2455,182 @@ var Contact = () => {
|
|
|
2173
2455
|
${isSubmitting ? "bg-blue-400 cursor-not-allowed" : "bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"}`
|
|
2174
2456
|
},
|
|
2175
2457
|
isSubmitting ? "\u53D1\u9001\u4E2D..." : "\u53D1\u9001\u6D88\u606F"
|
|
2176
|
-
)), submitStatus === "success" && /* @__PURE__ */
|
|
2458
|
+
)), submitStatus === "success" && /* @__PURE__ */ React37__default.createElement("div", { className: "rounded-md bg-green-50 p-4" }, /* @__PURE__ */ React37__default.createElement("div", { className: "flex" }, /* @__PURE__ */ React37__default.createElement("div", { className: "flex-shrink-0" }, /* @__PURE__ */ React37__default.createElement("svg", { className: "h-5 w-5 text-green-400", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React37__default.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", clipRule: "evenodd" }))), /* @__PURE__ */ React37__default.createElement("div", { className: "ml-3" }, /* @__PURE__ */ React37__default.createElement("p", { className: "text-sm font-medium text-green-800" }, "\u6D88\u606F\u5DF2\u6210\u529F\u53D1\u9001\uFF01")))), submitStatus === "error" && /* @__PURE__ */ React37__default.createElement("div", { className: "rounded-md bg-red-50 p-4" }, /* @__PURE__ */ React37__default.createElement("div", { className: "flex" }, /* @__PURE__ */ React37__default.createElement("div", { className: "flex-shrink-0" }, /* @__PURE__ */ React37__default.createElement("svg", { className: "h-5 w-5 text-red-400", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React37__default.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", clipRule: "evenodd" }))), /* @__PURE__ */ React37__default.createElement("div", { className: "ml-3" }, /* @__PURE__ */ React37__default.createElement("p", { className: "text-sm font-medium text-red-800" }, "\u53D1\u9001\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5")))))), /* @__PURE__ */ React37__default.createElement("div", { className: "mt-12 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3" }, /* @__PURE__ */ React37__default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React37__default.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React37__default.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React37__default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" }))), /* @__PURE__ */ React37__default.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u90AE\u7BB1"), /* @__PURE__ */ React37__default.createElement("p", { className: "mt-2 text-gray-600" }, "your.email@example.com")), /* @__PURE__ */ React37__default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React37__default.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React37__default.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React37__default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" }))), /* @__PURE__ */ React37__default.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u7535\u8BDD"), /* @__PURE__ */ React37__default.createElement("p", { className: "mt-2 text-gray-600" }, "+86 123 4567 8900")), /* @__PURE__ */ React37__default.createElement("div", { className: "bg-white rounded-lg shadow-lg p-6 text-center" }, /* @__PURE__ */ React37__default.createElement("div", { className: "text-blue-600 mb-4" }, /* @__PURE__ */ React37__default.createElement("svg", { className: "h-8 w-8 mx-auto", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React37__default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" }), /* @__PURE__ */ React37__default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z" }))), /* @__PURE__ */ React37__default.createElement("h3", { className: "text-lg font-medium text-gray-900" }, "\u5730\u5740"), /* @__PURE__ */ React37__default.createElement("p", { className: "mt-2 text-gray-600" }, "\u4E2D\u56FD\uFF0C\u5317\u4EAC")))));
|
|
2177
2459
|
};
|
|
2178
2460
|
var Contact_default = Contact;
|
|
2461
|
+
var Home = ({ homeConfig, className }) => {
|
|
2462
|
+
const { title, subtitle, buttons, imageSrc } = homeConfig;
|
|
2463
|
+
const [displayText, setDisplayText] = useState("");
|
|
2464
|
+
const [currentIndex, setCurrentIndex] = useState(0);
|
|
2465
|
+
useEffect(() => {
|
|
2466
|
+
if (currentIndex < title.length) {
|
|
2467
|
+
const timer = setTimeout(() => {
|
|
2468
|
+
setDisplayText((prev) => prev + title[currentIndex]);
|
|
2469
|
+
setCurrentIndex((prev) => prev + 1);
|
|
2470
|
+
}, 150);
|
|
2471
|
+
return () => clearTimeout(timer);
|
|
2472
|
+
}
|
|
2473
|
+
return () => {
|
|
2474
|
+
setDisplayText("");
|
|
2475
|
+
setCurrentIndex(0);
|
|
2476
|
+
};
|
|
2477
|
+
}, [currentIndex, title]);
|
|
2478
|
+
return /* @__PURE__ */ React37__default.createElement(
|
|
2479
|
+
"section",
|
|
2480
|
+
{
|
|
2481
|
+
id: "home",
|
|
2482
|
+
className: cn("min-h-screen flex items-center justify-center py-16 bg-gradient-to-b from-white to-gray-50", className)
|
|
2483
|
+
},
|
|
2484
|
+
/* @__PURE__ */ React37__default.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React37__default.createElement("div", { className: "flex flex-col md:flex-row items-center gap-12" }, /* @__PURE__ */ React37__default.createElement("div", { className: "flex-1 text-center md:text-left" }, /* @__PURE__ */ React37__default.createElement("h1", { className: "text-4xl md:text-6xl font-bold mb-6 text-gray-900" }, /* @__PURE__ */ React37__default.createElement("span", { className: "inline-block" }, displayText), /* @__PURE__ */ React37__default.createElement("span", { className: "animate-pulse ml-1 text-blue-500" }, "|")), /* @__PURE__ */ React37__default.createElement("p", { className: "text-xl md:text-2xl text-gray-600 mb-8" }, subtitle), /* @__PURE__ */ React37__default.createElement("div", { className: "flex flex-wrap gap-4 justify-center md:justify-start" }, buttons.map((button) => /* @__PURE__ */ React37__default.createElement(
|
|
2485
|
+
"a",
|
|
2486
|
+
{
|
|
2487
|
+
key: button.link,
|
|
2488
|
+
href: button.link,
|
|
2489
|
+
className: "px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-all duration-300 shadow-md hover:shadow-lg font-medium"
|
|
2490
|
+
},
|
|
2491
|
+
button.text
|
|
2492
|
+
)))), /* @__PURE__ */ React37__default.createElement("div", { className: "flex-1" }, /* @__PURE__ */ React37__default.createElement("div", { className: "relative group" }, /* @__PURE__ */ React37__default.createElement("div", { className: "absolute -inset-1 bg-gradient-to-r from-blue-600 to-purple-600 rounded-lg blur opacity-25 group-hover:opacity-50 transition duration-1000 group-hover:duration-200" }), /* @__PURE__ */ React37__default.createElement(
|
|
2493
|
+
"img",
|
|
2494
|
+
{
|
|
2495
|
+
src: imageSrc,
|
|
2496
|
+
alt: "Profile",
|
|
2497
|
+
className: "relative w-full max-w-md mx-auto rounded-lg shadow-xl transform hover:scale-[1.02] transition-transform duration-300 bg-white"
|
|
2498
|
+
}
|
|
2499
|
+
)))))
|
|
2500
|
+
);
|
|
2501
|
+
};
|
|
2502
|
+
var Home_default = Home;
|
|
2503
|
+
var ExperimentCard = ({
|
|
2504
|
+
href,
|
|
2505
|
+
title,
|
|
2506
|
+
description,
|
|
2507
|
+
tags,
|
|
2508
|
+
category,
|
|
2509
|
+
isCompleted,
|
|
2510
|
+
updatedAt,
|
|
2511
|
+
createdAt,
|
|
2512
|
+
className
|
|
2513
|
+
}) => {
|
|
2514
|
+
const formatDate = (dateString) => {
|
|
2515
|
+
if (!dateString) return "";
|
|
2516
|
+
try {
|
|
2517
|
+
const date = new Date(dateString);
|
|
2518
|
+
return date.toLocaleDateString("zh-CN", {
|
|
2519
|
+
year: "numeric",
|
|
2520
|
+
month: "2-digit",
|
|
2521
|
+
day: "2-digit"
|
|
2522
|
+
});
|
|
2523
|
+
} catch (e) {
|
|
2524
|
+
return dateString;
|
|
2525
|
+
}
|
|
2526
|
+
};
|
|
2527
|
+
return /* @__PURE__ */ React37__default.createElement(Link, { href, className: cn("block group", className) }, /* @__PURE__ */ React37__default.createElement("div", { className: "w-full h-full bg-white rounded-2xl overflow-hidden shadow-md hover:shadow-2xl transition-all duration-300 transform group-hover:-translate-y-1 border border-gray-100 hover:border-gray-200" }, /* @__PURE__ */ React37__default.createElement("div", { className: "p-6" }, /* @__PURE__ */ React37__default.createElement("div", { className: "flex items-start justify-between mb-4" }, /* @__PURE__ */ React37__default.createElement("h3", { className: "text-xl font-semibold text-gray-900 flex-1 pr-4 leading-tight" }, title), /* @__PURE__ */ React37__default.createElement("div", { className: "flex flex-col gap-2 flex-shrink-0" }, /* @__PURE__ */ React37__default.createElement("span", { className: cn(
|
|
2528
|
+
"px-3 py-1.5 text-xs font-medium rounded-full shadow-sm",
|
|
2529
|
+
category === "utility" ? "bg-gradient-to-r from-green-50 to-green-100 text-green-700 border border-green-200" : "bg-gradient-to-r from-purple-50 to-purple-100 text-purple-700 border border-purple-200"
|
|
2530
|
+
) }, category === "utility" ? "\u{1F527} \u5B9E\u7528\u5DE5\u5177" : "\u{1F3AE} \u4F11\u95F2\u5A31\u4E50"), /* @__PURE__ */ React37__default.createElement("span", { className: cn(
|
|
2531
|
+
"px-3 py-1.5 text-xs font-medium rounded-full shadow-sm border",
|
|
2532
|
+
isCompleted ? "bg-gradient-to-r from-emerald-50 to-emerald-100 text-emerald-700 border border-emerald-200" : "bg-gradient-to-r from-orange-50 to-orange-100 text-orange-700 border border-orange-200"
|
|
2533
|
+
) }, isCompleted ? "\u2705 \u5DF2\u5B8C\u6210" : "\u{1F6A7} \u8FDB\u884C\u4E2D"))), /* @__PURE__ */ React37__default.createElement("p", { className: "text-gray-600 mb-4" }, description), updatedAt && /* @__PURE__ */ React37__default.createElement("div", { className: "flex items-center gap-1 mb-3 text-xs text-gray-500" }, /* @__PURE__ */ React37__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React37__default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" })), /* @__PURE__ */ React37__default.createElement("span", null, "\u66F4\u65B0\u4E8E: ", formatDate(updatedAt)), createdAt && createdAt !== updatedAt && /* @__PURE__ */ React37__default.createElement("span", { className: "ml-2 text-gray-400" }, "\u521B\u5EFA\u4E8E: ", formatDate(createdAt))), /* @__PURE__ */ React37__default.createElement("div", { className: "flex flex-wrap gap-2" }, tags.map((tag) => /* @__PURE__ */ React37__default.createElement(
|
|
2534
|
+
"span",
|
|
2535
|
+
{
|
|
2536
|
+
key: tag,
|
|
2537
|
+
className: "px-3 py-1.5 text-xs font-medium bg-gradient-to-r from-gray-50 to-gray-100 text-gray-700 rounded-full border border-gray-200 shadow-sm hover:shadow-md transition-shadow duration-200"
|
|
2538
|
+
},
|
|
2539
|
+
"#",
|
|
2540
|
+
tag
|
|
2541
|
+
))))));
|
|
2542
|
+
};
|
|
2543
|
+
var ProjectCarousel = ({ projects, className }) => {
|
|
2544
|
+
const [currentIndex, setCurrentIndex] = useState(0);
|
|
2545
|
+
const nextSlide = () => {
|
|
2546
|
+
setCurrentIndex(
|
|
2547
|
+
(prevIndex) => prevIndex === projects.length - 1 ? 0 : prevIndex + 1
|
|
2548
|
+
);
|
|
2549
|
+
};
|
|
2550
|
+
const prevSlide = () => {
|
|
2551
|
+
setCurrentIndex(
|
|
2552
|
+
(prevIndex) => prevIndex === 0 ? projects.length - 1 : prevIndex - 1
|
|
2553
|
+
);
|
|
2554
|
+
};
|
|
2555
|
+
return /* @__PURE__ */ React37__default.createElement("section", { id: "projects", className: cn("py-16 bg-gray-50", className) }, /* @__PURE__ */ React37__default.createElement("div", { className: "container mx-auto px-4" }, /* @__PURE__ */ React37__default.createElement("h2", { className: "text-3xl font-bold text-center mb-12 text-gray-900" }, "\u9879\u76EE\u5C55\u793A"), /* @__PURE__ */ React37__default.createElement("div", { className: "relative max-w-4xl mx-auto" }, /* @__PURE__ */ React37__default.createElement("div", { className: "relative h-[400px] overflow-hidden rounded-lg shadow-xl" }, projects.map((project, index) => /* @__PURE__ */ React37__default.createElement(
|
|
2556
|
+
"div",
|
|
2557
|
+
{
|
|
2558
|
+
key: project.id,
|
|
2559
|
+
className: cn(
|
|
2560
|
+
"absolute w-full h-full transition-all duration-500 transform",
|
|
2561
|
+
index === currentIndex ? "translate-x-0 opacity-100" : index < currentIndex ? "-translate-x-full opacity-0" : "translate-x-full opacity-0"
|
|
2562
|
+
)
|
|
2563
|
+
},
|
|
2564
|
+
/* @__PURE__ */ React37__default.createElement(
|
|
2565
|
+
ExperimentCard,
|
|
2566
|
+
{
|
|
2567
|
+
href: project.link || "#",
|
|
2568
|
+
title: project.title,
|
|
2569
|
+
description: project.description,
|
|
2570
|
+
tags: project.tags,
|
|
2571
|
+
category: "utility"
|
|
2572
|
+
}
|
|
2573
|
+
)
|
|
2574
|
+
))), /* @__PURE__ */ React37__default.createElement(
|
|
2575
|
+
"button",
|
|
2576
|
+
{
|
|
2577
|
+
onClick: prevSlide,
|
|
2578
|
+
className: "absolute left-4 top-1/2 -translate-y-1/2 p-2 rounded-full bg-white/80 hover:bg-white shadow-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all z-10"
|
|
2579
|
+
},
|
|
2580
|
+
/* @__PURE__ */ React37__default.createElement(
|
|
2581
|
+
"svg",
|
|
2582
|
+
{
|
|
2583
|
+
className: "w-6 h-6 text-gray-600",
|
|
2584
|
+
fill: "none",
|
|
2585
|
+
stroke: "currentColor",
|
|
2586
|
+
viewBox: "0 0 24 24"
|
|
2587
|
+
},
|
|
2588
|
+
/* @__PURE__ */ React37__default.createElement(
|
|
2589
|
+
"path",
|
|
2590
|
+
{
|
|
2591
|
+
strokeLinecap: "round",
|
|
2592
|
+
strokeLinejoin: "round",
|
|
2593
|
+
strokeWidth: 2,
|
|
2594
|
+
d: "M15 19l-7-7 7-7"
|
|
2595
|
+
}
|
|
2596
|
+
)
|
|
2597
|
+
)
|
|
2598
|
+
), /* @__PURE__ */ React37__default.createElement(
|
|
2599
|
+
"button",
|
|
2600
|
+
{
|
|
2601
|
+
onClick: nextSlide,
|
|
2602
|
+
className: "absolute right-4 top-1/2 -translate-y-1/2 p-2 rounded-full bg-white/80 hover:bg-white shadow-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all z-10"
|
|
2603
|
+
},
|
|
2604
|
+
/* @__PURE__ */ React37__default.createElement(
|
|
2605
|
+
"svg",
|
|
2606
|
+
{
|
|
2607
|
+
className: "w-6 h-6 text-gray-600",
|
|
2608
|
+
fill: "none",
|
|
2609
|
+
stroke: "currentColor",
|
|
2610
|
+
viewBox: "0 0 24 24"
|
|
2611
|
+
},
|
|
2612
|
+
/* @__PURE__ */ React37__default.createElement(
|
|
2613
|
+
"path",
|
|
2614
|
+
{
|
|
2615
|
+
strokeLinecap: "round",
|
|
2616
|
+
strokeLinejoin: "round",
|
|
2617
|
+
strokeWidth: 2,
|
|
2618
|
+
d: "M9 5l7 7-7 7"
|
|
2619
|
+
}
|
|
2620
|
+
)
|
|
2621
|
+
)
|
|
2622
|
+
), /* @__PURE__ */ React37__default.createElement("div", { className: "absolute bottom-4 left-1/2 transform -translate-x-1/2 flex space-x-2 z-10" }, projects.map((_, index) => /* @__PURE__ */ React37__default.createElement(
|
|
2623
|
+
"button",
|
|
2624
|
+
{
|
|
2625
|
+
key: index,
|
|
2626
|
+
onClick: () => setCurrentIndex(index),
|
|
2627
|
+
className: cn(
|
|
2628
|
+
"w-2 h-2 rounded-full transition-all duration-300",
|
|
2629
|
+
index === currentIndex ? "bg-blue-500 w-4" : "bg-gray-300"
|
|
2630
|
+
)
|
|
2631
|
+
}
|
|
2632
|
+
))))));
|
|
2633
|
+
};
|
|
2179
2634
|
var NavigationItemComponent = ({
|
|
2180
2635
|
item,
|
|
2181
2636
|
direction,
|
|
@@ -2197,7 +2652,7 @@ var NavigationItemComponent = ({
|
|
|
2197
2652
|
const stateClasses = isActive ? "bg-blue-500 text-white shadow-lg" : item.isExternal ? "text-gray-700 hover:bg-purple-50 hover:text-purple-600 border border-purple-200" : "text-gray-700 hover:bg-blue-50 hover:text-blue-600";
|
|
2198
2653
|
return `${baseClasses} ${directionClasses} ${stateClasses}`;
|
|
2199
2654
|
};
|
|
2200
|
-
return /* @__PURE__ */
|
|
2655
|
+
return /* @__PURE__ */ React37__default.createElement(
|
|
2201
2656
|
"a",
|
|
2202
2657
|
{
|
|
2203
2658
|
href: item.href,
|
|
@@ -2206,9 +2661,9 @@ var NavigationItemComponent = ({
|
|
|
2206
2661
|
rel: item.isExternal ? "noopener noreferrer" : void 0,
|
|
2207
2662
|
className: getItemClasses()
|
|
2208
2663
|
},
|
|
2209
|
-
item.icon && /* @__PURE__ */
|
|
2210
|
-
/* @__PURE__ */
|
|
2211
|
-
item.isExternal && /* @__PURE__ */
|
|
2664
|
+
item.icon && /* @__PURE__ */ React37__default.createElement("span", { className: "flex-shrink-0" }, item.icon),
|
|
2665
|
+
/* @__PURE__ */ React37__default.createElement("span", { className: `font-medium ${direction === "vertical" ? "text-sm" : "text-xs"}` }, item.label),
|
|
2666
|
+
item.isExternal && /* @__PURE__ */ React37__default.createElement(
|
|
2212
2667
|
"svg",
|
|
2213
2668
|
{
|
|
2214
2669
|
className: "w-3 h-3 opacity-60 group-hover:opacity-100 transition-opacity",
|
|
@@ -2216,7 +2671,7 @@ var NavigationItemComponent = ({
|
|
|
2216
2671
|
stroke: "currentColor",
|
|
2217
2672
|
viewBox: "0 0 24 24"
|
|
2218
2673
|
},
|
|
2219
|
-
/* @__PURE__ */
|
|
2674
|
+
/* @__PURE__ */ React37__default.createElement(
|
|
2220
2675
|
"path",
|
|
2221
2676
|
{
|
|
2222
2677
|
strokeLinecap: "round",
|
|
@@ -2226,7 +2681,7 @@ var NavigationItemComponent = ({
|
|
|
2226
2681
|
}
|
|
2227
2682
|
)
|
|
2228
2683
|
),
|
|
2229
|
-
direction === "vertical" && isActive && /* @__PURE__ */
|
|
2684
|
+
direction === "vertical" && isActive && /* @__PURE__ */ React37__default.createElement("div", { className: "absolute left-1 top-1/2 transform -translate-y-1/2 w-1 h-6 bg-white rounded-full" })
|
|
2230
2685
|
);
|
|
2231
2686
|
};
|
|
2232
2687
|
var NavigationItem_default = NavigationItemComponent;
|
|
@@ -2286,14 +2741,14 @@ var Navigation = ({
|
|
|
2286
2741
|
onItemClick?.(item);
|
|
2287
2742
|
};
|
|
2288
2743
|
if (!isOpen) return null;
|
|
2289
|
-
return /* @__PURE__ */
|
|
2744
|
+
return /* @__PURE__ */ React37__default.createElement("nav", { className: `${getContainerClasses()} ${className}` }, /* @__PURE__ */ React37__default.createElement("div", { className: getContentClasses() }, logo && /* @__PURE__ */ React37__default.createElement("div", { className: "flex items-center justify-center mb-4" }, /* @__PURE__ */ React37__default.createElement(
|
|
2290
2745
|
"img",
|
|
2291
2746
|
{
|
|
2292
2747
|
src: logo.src,
|
|
2293
2748
|
alt: logo.alt || "Logo",
|
|
2294
2749
|
className: "h-8 w-auto"
|
|
2295
2750
|
}
|
|
2296
|
-
)), direction === "vertical" && /* @__PURE__ */
|
|
2751
|
+
)), direction === "vertical" && /* @__PURE__ */ React37__default.createElement("div", { className: "h-12 flex-shrink-0" }), /* @__PURE__ */ React37__default.createElement("div", { className: getItemsListClasses() }, items.map((item) => /* @__PURE__ */ React37__default.createElement(
|
|
2297
2752
|
NavigationItem_default,
|
|
2298
2753
|
{
|
|
2299
2754
|
key: item.id,
|
|
@@ -2302,14 +2757,14 @@ var Navigation = ({
|
|
|
2302
2757
|
isActive: activeItemId === item.id,
|
|
2303
2758
|
onClick: handleItemClick
|
|
2304
2759
|
}
|
|
2305
|
-
))), avatar && direction === "vertical" && /* @__PURE__ */
|
|
2760
|
+
))), avatar && direction === "vertical" && /* @__PURE__ */ React37__default.createElement("div", { className: "flex items-center justify-center mt-auto pt-4" }, /* @__PURE__ */ React37__default.createElement(
|
|
2306
2761
|
"img",
|
|
2307
2762
|
{
|
|
2308
2763
|
src: avatar.src,
|
|
2309
2764
|
alt: avatar.alt || "Avatar",
|
|
2310
2765
|
className: "w-10 h-10 rounded-full border-2 border-gray-200"
|
|
2311
2766
|
}
|
|
2312
|
-
)), avatar && direction === "horizontal" && /* @__PURE__ */
|
|
2767
|
+
)), avatar && direction === "horizontal" && /* @__PURE__ */ React37__default.createElement("div", { className: "flex items-center" }, /* @__PURE__ */ React37__default.createElement(
|
|
2313
2768
|
"img",
|
|
2314
2769
|
{
|
|
2315
2770
|
src: avatar.src,
|
|
@@ -2338,7 +2793,7 @@ var NavigationToggle = ({
|
|
|
2338
2793
|
return "top-4 left-4";
|
|
2339
2794
|
}
|
|
2340
2795
|
};
|
|
2341
|
-
return /* @__PURE__ */
|
|
2796
|
+
return /* @__PURE__ */ React37__default.createElement(
|
|
2342
2797
|
"button",
|
|
2343
2798
|
{
|
|
2344
2799
|
onClick,
|
|
@@ -2354,7 +2809,7 @@ var NavigationToggle = ({
|
|
|
2354
2809
|
`,
|
|
2355
2810
|
"aria-label": isOpen ? "\u5173\u95ED\u5BFC\u822A\u680F" : "\u6253\u5F00\u5BFC\u822A\u680F"
|
|
2356
2811
|
},
|
|
2357
|
-
/* @__PURE__ */
|
|
2812
|
+
/* @__PURE__ */ React37__default.createElement("div", { className: "w-5 h-5 flex flex-col justify-center items-center" }, /* @__PURE__ */ React37__default.createElement(
|
|
2358
2813
|
"span",
|
|
2359
2814
|
{
|
|
2360
2815
|
className: `
|
|
@@ -2363,7 +2818,7 @@ var NavigationToggle = ({
|
|
|
2363
2818
|
${isOpen ? "rotate-45 translate-y-0.5" : ""}
|
|
2364
2819
|
`
|
|
2365
2820
|
}
|
|
2366
|
-
), /* @__PURE__ */
|
|
2821
|
+
), /* @__PURE__ */ React37__default.createElement(
|
|
2367
2822
|
"span",
|
|
2368
2823
|
{
|
|
2369
2824
|
className: `
|
|
@@ -2372,7 +2827,7 @@ var NavigationToggle = ({
|
|
|
2372
2827
|
${isOpen ? "opacity-0 scale-0" : "opacity-100 scale-100"}
|
|
2373
2828
|
`
|
|
2374
2829
|
}
|
|
2375
|
-
), /* @__PURE__ */
|
|
2830
|
+
), /* @__PURE__ */ React37__default.createElement(
|
|
2376
2831
|
"span",
|
|
2377
2832
|
{
|
|
2378
2833
|
className: `
|
|
@@ -2521,7 +2976,7 @@ var FloatingMenu = ({
|
|
|
2521
2976
|
}, [mounted]);
|
|
2522
2977
|
if (!mounted) return null;
|
|
2523
2978
|
return createPortal(
|
|
2524
|
-
/* @__PURE__ */
|
|
2979
|
+
/* @__PURE__ */ React37__default.createElement(
|
|
2525
2980
|
"div",
|
|
2526
2981
|
{
|
|
2527
2982
|
ref: containerRef,
|
|
@@ -2532,7 +2987,7 @@ var FloatingMenu = ({
|
|
|
2532
2987
|
zIndex
|
|
2533
2988
|
}
|
|
2534
2989
|
},
|
|
2535
|
-
/* @__PURE__ */
|
|
2990
|
+
/* @__PURE__ */ React37__default.createElement(
|
|
2536
2991
|
"div",
|
|
2537
2992
|
{
|
|
2538
2993
|
className: `
|
|
@@ -2550,7 +3005,7 @@ var FloatingMenu = ({
|
|
|
2550
3005
|
},
|
|
2551
3006
|
trigger
|
|
2552
3007
|
),
|
|
2553
|
-
isMenuOpen && /* @__PURE__ */
|
|
3008
|
+
isMenuOpen && /* @__PURE__ */ React37__default.createElement(
|
|
2554
3009
|
"div",
|
|
2555
3010
|
{
|
|
2556
3011
|
className: `
|
|
@@ -2579,7 +3034,58 @@ var FloatingMenu = ({
|
|
|
2579
3034
|
);
|
|
2580
3035
|
};
|
|
2581
3036
|
var FloatingMenu_default = FloatingMenu;
|
|
3037
|
+
var FloatingMenuExample = () => {
|
|
3038
|
+
const [windowWidth, setWindowWidth] = useState(0);
|
|
3039
|
+
useEffect(() => {
|
|
3040
|
+
setWindowWidth(window.innerWidth);
|
|
3041
|
+
const handleResize = () => setWindowWidth(window.innerWidth);
|
|
3042
|
+
window.addEventListener("resize", handleResize);
|
|
3043
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
3044
|
+
}, []);
|
|
3045
|
+
const menuItems = [
|
|
3046
|
+
{ id: 1, label: "\u9996\u9875", icon: "\u{1F3E0}" },
|
|
3047
|
+
{ id: 2, label: "\u8BBE\u7F6E", icon: "\u2699\uFE0F" },
|
|
3048
|
+
{ id: 3, label: "\u6D88\u606F", icon: "\u{1F4E9}" },
|
|
3049
|
+
{ id: 4, label: "\u5E2E\u52A9", icon: "\u2753" },
|
|
3050
|
+
{ id: 5, label: "\u9000\u51FA", icon: "\u{1F6AA}" }
|
|
3051
|
+
];
|
|
3052
|
+
const handleMenuItemClick = (id) => {
|
|
3053
|
+
console.log(`\u70B9\u51FB\u4E86\u83DC\u5355\u9879: ${id}`);
|
|
3054
|
+
};
|
|
3055
|
+
return /* @__PURE__ */ React37__default.createElement("div", { className: "w-full h-screen bg-gray-100 relative p-8" }, /* @__PURE__ */ React37__default.createElement("div", { className: "max-w-2xl mx-auto bg-white rounded-2xl shadow-sm p-8 mt-12" }, /* @__PURE__ */ React37__default.createElement("h1", { className: "text-3xl font-bold mb-4 text-gray-900" }, "\u60AC\u6D6E\u83DC\u5355\u793A\u4F8B"), /* @__PURE__ */ React37__default.createElement("p", { className: "text-gray-600 leading-relaxed mb-6" }, "\u8FD9\u662F\u4E00\u4E2A\u53EF\u62D6\u62FD\u7684\u60AC\u6D6E\u83DC\u5355\u7EC4\u4EF6\u793A\u4F8B\u3002\u4F60\u53EF\u4EE5\u5C1D\u8BD5\u62D6\u52A8\u4E0B\u65B9\u7684 ", /* @__PURE__ */ React37__default.createElement("span", { className: "font-bold text-blue-600" }, "\u84DD\u8272\u6309\u94AE"), " \u5230\u5904\u79FB\u52A8\u3002"), /* @__PURE__ */ React37__default.createElement("div", { className: "bg-blue-50 border-l-4 border-blue-500 p-4 mb-6" }, /* @__PURE__ */ React37__default.createElement("p", { className: "text-sm text-blue-700" }, /* @__PURE__ */ React37__default.createElement("strong", null, "\u667A\u80FD\u5B9A\u4F4D\uFF1A"), " \u83DC\u5355\u4F1A\u6839\u636E\u6309\u94AE\u5728\u5C4F\u5E55\u4E0A\u7684\u4F4D\u7F6E\u81EA\u52A8\u8C03\u6574\u5F39\u51FA\u65B9\u5411\uFF08\u5411\u5DE6\u6216\u5411\u53F3\uFF09\u3002"))), /* @__PURE__ */ React37__default.createElement(
|
|
3056
|
+
FloatingMenu_default,
|
|
3057
|
+
{
|
|
3058
|
+
trigger: /* @__PURE__ */ React37__default.createElement("div", { className: "w-12 h-12 bg-blue-600 rounded-full flex items-center justify-center text-white shadow-lg cursor-pointer" }, /* @__PURE__ */ React37__default.createElement("span", { className: "text-xl" }, "\u2795")),
|
|
3059
|
+
menu: /* @__PURE__ */ React37__default.createElement("div", { className: "w-48 bg-white rounded-xl shadow-xl border border-gray-100 overflow-hidden" }, /* @__PURE__ */ React37__default.createElement("div", { className: "px-4 py-3 border-b border-gray-100" }, /* @__PURE__ */ React37__default.createElement("h3", { className: "text-sm font-bold text-gray-900" }, "\u5FEB\u6377\u83DC\u5355")), /* @__PURE__ */ React37__default.createElement("ul", { className: "py-1" }, menuItems.map((item) => /* @__PURE__ */ React37__default.createElement(
|
|
3060
|
+
"li",
|
|
3061
|
+
{
|
|
3062
|
+
key: item.id,
|
|
3063
|
+
className: "flex items-center gap-3 px-4 py-2.5 hover:bg-blue-50 text-gray-700 hover:text-blue-600 cursor-pointer transition-colors text-sm",
|
|
3064
|
+
onClick: () => handleMenuItemClick(item.id)
|
|
3065
|
+
},
|
|
3066
|
+
/* @__PURE__ */ React37__default.createElement("span", { className: "text-lg" }, item.icon),
|
|
3067
|
+
/* @__PURE__ */ React37__default.createElement("span", { className: "font-medium" }, item.label)
|
|
3068
|
+
)))),
|
|
3069
|
+
initialPosition: { x: 100, y: 100 }
|
|
3070
|
+
}
|
|
3071
|
+
), windowWidth > 0 && /* @__PURE__ */ React37__default.createElement(
|
|
3072
|
+
FloatingMenu_default,
|
|
3073
|
+
{
|
|
3074
|
+
trigger: /* @__PURE__ */ React37__default.createElement("div", { className: "w-12 h-12 bg-purple-600 rounded-full flex items-center justify-center text-white shadow-lg cursor-pointer" }, /* @__PURE__ */ React37__default.createElement("span", { className: "text-xl" }, "\u{1F50D}")),
|
|
3075
|
+
menu: /* @__PURE__ */ React37__default.createElement("div", { className: "w-64 bg-white rounded-xl shadow-xl border border-gray-100 p-4" }, /* @__PURE__ */ React37__default.createElement("h3", { className: "text-sm font-bold text-gray-900 mb-3" }, "\u5FEB\u901F\u641C\u7D22"), /* @__PURE__ */ React37__default.createElement("div", { className: "space-y-3" }, /* @__PURE__ */ React37__default.createElement(
|
|
3076
|
+
"input",
|
|
3077
|
+
{
|
|
3078
|
+
type: "text",
|
|
3079
|
+
placeholder: "\u8F93\u5165\u5173\u952E\u5B57...",
|
|
3080
|
+
className: "w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent outline-none"
|
|
3081
|
+
}
|
|
3082
|
+
), /* @__PURE__ */ React37__default.createElement("button", { className: "w-full bg-purple-600 text-white py-2 rounded-lg text-sm font-medium hover:bg-purple-700 transition-colors" }, "\u641C\u7D22"))),
|
|
3083
|
+
initialPosition: { x: windowWidth - 100, y: 100 }
|
|
3084
|
+
}
|
|
3085
|
+
));
|
|
3086
|
+
};
|
|
3087
|
+
var FloatingMenuExample_default = FloatingMenuExample;
|
|
2582
3088
|
|
|
2583
|
-
export { About_default as About, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AutoOpenModal, Avatar, AvatarFallback, AvatarImage, BackgroundRemover, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CollisionBalls, Contact_default as Contact, 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, EnhancedAvatar, FloatingMenu_default as FloatingMenu, Grid, Input, Label, Navigation_default as Navigation, NavigationItem_default as NavigationItem, NavigationToggle_default as NavigationToggle, OCRScanner, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProfileButton, ProfileModal, Progress, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SentimentAnalyzer, Separator3 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SmartAssistant, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Timeline, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, useBackgroundRemoval, useOCR, useSentimentAnalysis, useTextGeneration };
|
|
3089
|
+
export { About_default as About, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AutoOpenModal, Avatar, AvatarFallback, AvatarImage, BackButton, BackgroundRemover, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CollisionBalls, Contact_default as Contact, 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, EnhancedAvatar, ExperimentCard, FilterButtonGroup, FloatingMenu_default as FloatingMenu, FloatingMenuExample_default as FloatingMenuExample, GenericOrderManager, Grid, Home_default as Home, Input, Label, Navigation_default as Navigation, NavigationItem_default as NavigationItem, NavigationToggle_default as NavigationToggle, OCRScanner, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProfileButton, ProfileModal, Progress, ProjectCarousel, ScrollArea, ScrollBar, SearchResultHint, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SentimentAnalyzer, Separator3 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SmartAssistant, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Timeline, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, useBackgroundRemoval, useOCR, useSentimentAnalysis, useTextGeneration };
|
|
2584
3090
|
//# sourceMappingURL=index.mjs.map
|
|
2585
3091
|
//# sourceMappingURL=index.mjs.map
|