sa2kit 1.6.30 → 1.6.32
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/AliyunOSSProvider-4W47OFEK.mjs +6 -0
- package/dist/{AliyunOSSProvider-KJYRIZES.mjs.map → AliyunOSSProvider-4W47OFEK.mjs.map} +1 -1
- package/dist/AliyunOSSProvider-HCNGDJL7.js +15 -0
- package/dist/{AliyunOSSProvider-FWAKUB2T.js.map → AliyunOSSProvider-HCNGDJL7.js.map} +1 -1
- package/dist/ConfigService-3DIC6C3Q.js +21 -0
- package/dist/{ConfigService-7MEZXKJ5.js.map → ConfigService-3DIC6C3Q.js.map} +1 -1
- package/dist/ConfigService-V6ZK273Z.mjs +4 -0
- package/dist/{ConfigService-BV57YYFW.mjs.map → ConfigService-V6ZK273Z.mjs.map} +1 -1
- package/dist/LocalStorageProvider-3RVPCQB3.mjs +6 -0
- package/dist/{LocalStorageProvider-RTPMUOZ2.mjs.map → LocalStorageProvider-3RVPCQB3.mjs.map} +1 -1
- package/dist/LocalStorageProvider-PP7MA5OT.js +15 -0
- package/dist/{LocalStorageProvider-XSRCUXOU.js.map → LocalStorageProvider-PP7MA5OT.js.map} +1 -1
- package/dist/PMXParser-2VTA737I.js +13 -0
- package/dist/{PMXParser-YBS3B6HM.js.map → PMXParser-2VTA737I.js.map} +1 -1
- package/dist/PMXParser-RNVQL76A.mjs +4 -0
- package/dist/{PMXParser-L6IWHL4I.mjs.map → PMXParser-RNVQL76A.mjs.map} +1 -1
- package/dist/analytics/index.js +46 -45
- package/dist/analytics/index.js.map +1 -1
- package/dist/analytics/index.mjs +45 -44
- package/dist/analytics/index.mjs.map +1 -1
- package/dist/analytics/server/index.js +4 -4
- package/dist/analytics/server/index.js.map +1 -1
- package/dist/analytics/server/index.mjs +4 -4
- package/dist/analytics/server/index.mjs.map +1 -1
- package/dist/api/index.js +5 -5
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +5 -5
- package/dist/api/index.mjs.map +1 -1
- package/dist/audioDetection/index.js +17 -16
- package/dist/audioDetection/index.js.map +1 -1
- package/dist/audioDetection/index.mjs +17 -16
- package/dist/audioDetection/index.mjs.map +1 -1
- package/dist/auth/client/index.js +4 -4
- package/dist/auth/client/index.mjs +1 -1
- package/dist/auth/components/index.js +3 -3
- package/dist/auth/components/index.js.map +1 -1
- package/dist/auth/components/index.mjs +3 -3
- package/dist/auth/components/index.mjs.map +1 -1
- package/dist/auth/index.js +29 -29
- package/dist/auth/index.mjs +5 -5
- package/dist/auth/middleware/index.js +3 -3
- package/dist/auth/middleware/index.mjs +2 -2
- package/dist/auth/routes/index.js +14 -14
- package/dist/auth/routes/index.mjs +2 -2
- package/dist/auth/services/index.js +7 -7
- package/dist/auth/services/index.mjs +1 -1
- package/dist/calendar/index.js +146 -182
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs +139 -175
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/calendar/routes/index.js +1 -1
- package/dist/calendar/routes/index.js.map +1 -1
- package/dist/calendar/routes/index.mjs +1 -1
- package/dist/calendar/routes/index.mjs.map +1 -1
- package/dist/{chunk-5YQ5B7IZ.js → chunk-24HGREE6.js} +5 -5
- package/dist/{chunk-5YQ5B7IZ.js.map → chunk-24HGREE6.js.map} +1 -1
- package/dist/{chunk-6PRFP5EG.js → chunk-25OFOKNF.js} +6 -6
- package/dist/chunk-25OFOKNF.js.map +1 -0
- package/dist/{chunk-KQGP6BTS.mjs → chunk-3DXPQ4YV.mjs} +6 -6
- package/dist/chunk-3DXPQ4YV.mjs.map +1 -0
- package/dist/{chunk-3BGPZN4X.mjs → chunk-3NHAT7D4.mjs} +12 -12
- package/dist/chunk-3NHAT7D4.mjs.map +1 -0
- package/dist/{chunk-MW4BCIZC.mjs → chunk-4HC6M7FK.mjs} +3 -3
- package/dist/chunk-4HC6M7FK.mjs.map +1 -0
- package/dist/{chunk-ESRCX5TQ.mjs → chunk-52TN2QSS.mjs} +3 -3
- package/dist/{chunk-ESRCX5TQ.mjs.map → chunk-52TN2QSS.mjs.map} +1 -1
- package/dist/{chunk-CNTILN5J.mjs → chunk-5YQ62BKX.mjs} +20 -19
- package/dist/chunk-5YQ62BKX.mjs.map +1 -0
- package/dist/{chunk-6W5BMXJG.js → chunk-6OWNMJKG.js} +4 -4
- package/dist/{chunk-6W5BMXJG.js.map → chunk-6OWNMJKG.js.map} +1 -1
- package/dist/{chunk-DUHZ7VZP.js → chunk-7VRT55ZD.js} +3 -3
- package/dist/chunk-7VRT55ZD.js.map +1 -0
- package/dist/{chunk-3WOAPLEG.mjs → chunk-EB4NR623.mjs} +27 -26
- package/dist/chunk-EB4NR623.mjs.map +1 -0
- package/dist/chunk-EI27JKND.mjs +1988 -0
- package/dist/chunk-EI27JKND.mjs.map +1 -0
- package/dist/{chunk-CD77U7LZ.js → chunk-GBPLX42J.js} +9 -9
- package/dist/chunk-GBPLX42J.js.map +1 -0
- package/dist/{chunk-TFQF2HDO.mjs → chunk-HDEOCX2L.mjs} +12 -12
- package/dist/chunk-HDEOCX2L.mjs.map +1 -0
- package/dist/{chunk-TV3VKRJK.mjs → chunk-HDMIOOZY.mjs} +38 -68
- package/dist/chunk-HDMIOOZY.mjs.map +1 -0
- package/dist/{chunk-OPPF3326.js → chunk-HJ6MH7J7.js} +39 -69
- package/dist/chunk-HJ6MH7J7.js.map +1 -0
- package/dist/chunk-KO73EBUT.js +80 -0
- package/dist/chunk-KO73EBUT.js.map +1 -0
- package/dist/{chunk-6YKMCPQI.mjs → chunk-KZKIH4AS.mjs} +4 -4
- package/dist/chunk-KZKIH4AS.mjs.map +1 -0
- package/dist/{chunk-LX4XX6W7.js → chunk-L47ZOYHL.js} +15 -89
- package/dist/chunk-L47ZOYHL.js.map +1 -0
- package/dist/{chunk-6MQUBPKB.mjs → chunk-LJ4CCSSY.mjs} +3 -3
- package/dist/{chunk-6MQUBPKB.mjs.map → chunk-LJ4CCSSY.mjs.map} +1 -1
- package/dist/{chunk-TOC5FSHP.js → chunk-NJ2SNXBJ.js} +12 -12
- package/dist/chunk-NJ2SNXBJ.js.map +1 -0
- package/dist/{chunk-OCR5DS4C.mjs → chunk-PE5EAHZK.mjs} +3 -3
- package/dist/chunk-PE5EAHZK.mjs.map +1 -0
- package/dist/{chunk-LZHMNOED.js → chunk-Q5EDCKQA.js} +26 -26
- package/dist/chunk-Q5EDCKQA.js.map +1 -0
- package/dist/{chunk-CLKKZSPZ.js → chunk-RBKGYWME.js} +20 -19
- package/dist/chunk-RBKGYWME.js.map +1 -0
- package/dist/{chunk-VRTRSEEH.mjs → chunk-RSJSZ7QH.mjs} +11 -11
- package/dist/chunk-RSJSZ7QH.mjs.map +1 -0
- package/dist/{chunk-E7RGBAYJ.js → chunk-TDCDEBGP.js} +30 -29
- package/dist/chunk-TDCDEBGP.js.map +1 -0
- package/dist/{chunk-JZXJQMVE.js → chunk-UIFFDRTE.js} +11 -11
- package/dist/chunk-UIFFDRTE.js.map +1 -0
- package/dist/{chunk-T5OZHYVM.mjs → chunk-UKT3PLON.mjs} +13 -85
- package/dist/chunk-UKT3PLON.mjs.map +1 -0
- package/dist/{chunk-UOFTHYIH.js → chunk-UL6XJGUZ.js} +4 -4
- package/dist/chunk-UL6XJGUZ.js.map +1 -0
- package/dist/chunk-VVWQTO4Y.mjs +77 -0
- package/dist/chunk-VVWQTO4Y.mjs.map +1 -0
- package/dist/{chunk-A3UP56MS.js → chunk-WA67GZSZ.js} +3 -3
- package/dist/chunk-WA67GZSZ.js.map +1 -0
- package/dist/{chunk-OLHGZXN3.mjs → chunk-WEEXCPSE.mjs} +5 -5
- package/dist/chunk-WEEXCPSE.mjs.map +1 -0
- package/dist/chunk-XGBE4SUV.js +2093 -0
- package/dist/chunk-XGBE4SUV.js.map +1 -0
- package/dist/{chunk-QU5OT4DF.js → chunk-XJ7ZAGC5.js} +5 -5
- package/dist/chunk-XJ7ZAGC5.js.map +1 -0
- package/dist/{chunk-ZI25QCHD.mjs → chunk-YOTQG4NP.mjs} +25 -25
- package/dist/chunk-YOTQG4NP.mjs.map +1 -0
- package/dist/{chunk-QAT2RWAO.mjs → chunk-Z36R3P62.mjs} +7 -7
- package/dist/chunk-Z36R3P62.mjs.map +1 -0
- package/dist/{chunk-7Z5LLJ3A.js → chunk-ZWQJSZEY.js} +13 -13
- package/dist/chunk-ZWQJSZEY.js.map +1 -0
- package/dist/config/index.js +6 -6
- package/dist/config/index.js.map +1 -1
- package/dist/config/index.mjs +6 -6
- package/dist/config/index.mjs.map +1 -1
- package/dist/config/server/index.js +37 -37
- package/dist/config/server/index.js.map +1 -1
- package/dist/config/server/index.mjs +37 -37
- package/dist/config/server/index.mjs.map +1 -1
- package/dist/i18n/index.d.mts +2 -2
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +16 -17
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/index.mjs +16 -17
- package/dist/i18n/index.mjs.map +1 -1
- package/dist/imageCrop/index.js +11 -10
- package/dist/imageCrop/index.js.map +1 -1
- package/dist/imageCrop/index.mjs +11 -10
- package/dist/imageCrop/index.mjs.map +1 -1
- package/dist/index.d.mts +185 -100
- package/dist/index.d.ts +185 -100
- package/dist/index.js +225 -249
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +80 -104
- package/dist/index.mjs.map +1 -1
- package/dist/logger/index.js +6 -6
- package/dist/logger/index.mjs +1 -1
- package/dist/mikuFusionGame/index.d.mts +112 -0
- package/dist/mikuFusionGame/index.d.ts +112 -0
- package/dist/mikuFusionGame/index.js +680 -0
- package/dist/mikuFusionGame/index.js.map +1 -0
- package/dist/mikuFusionGame/index.mjs +667 -0
- package/dist/mikuFusionGame/index.mjs.map +1 -0
- package/dist/mmd/admin/index.js +11 -10
- package/dist/mmd/admin/index.js.map +1 -1
- package/dist/mmd/admin/index.mjs +11 -10
- package/dist/mmd/admin/index.mjs.map +1 -1
- package/dist/mmd/index.js +223 -241
- package/dist/mmd/index.js.map +1 -1
- package/dist/mmd/index.mjs +220 -238
- package/dist/mmd/index.mjs.map +1 -1
- package/dist/mmd/server/index.js +6 -6
- package/dist/mmd/server/index.js.map +1 -1
- package/dist/mmd/server/index.mjs +6 -6
- package/dist/mmd/server/index.mjs.map +1 -1
- package/dist/music/index.js +16 -16
- package/dist/music/index.mjs +2 -2
- package/dist/music/server/index.js +8 -8
- package/dist/music/server/index.mjs +1 -1
- package/dist/request/index.js +2 -2
- package/dist/request/index.js.map +1 -1
- package/dist/request/index.mjs +2 -2
- package/dist/request/index.mjs.map +1 -1
- package/dist/storage/index.js +15 -14
- package/dist/storage/index.mjs +3 -2
- package/dist/testYourself/admin/index.js +3 -3
- package/dist/testYourself/admin/index.mjs +1 -1
- package/dist/testYourself/index.js +22 -22
- package/dist/testYourself/index.js.map +1 -1
- package/dist/testYourself/index.mjs +14 -14
- package/dist/testYourself/index.mjs.map +1 -1
- package/dist/testYourself/server/index.js +4 -4
- package/dist/testYourself/server/index.mjs +1 -1
- package/dist/universalExport/index.d.mts +3 -3
- package/dist/universalExport/index.d.ts +3 -3
- package/dist/universalExport/index.js +48 -47
- package/dist/universalExport/index.js.map +1 -1
- package/dist/universalExport/index.mjs +48 -47
- package/dist/universalExport/index.mjs.map +1 -1
- package/dist/universalExport/server/index.js +29 -29
- package/dist/universalExport/server/index.js.map +1 -1
- package/dist/universalExport/server/index.mjs +28 -28
- package/dist/universalExport/server/index.mjs.map +1 -1
- package/dist/universalFile/index.d.mts +3 -3
- package/dist/universalFile/index.d.ts +3 -3
- package/dist/universalFile/index.js +73 -72
- package/dist/universalFile/index.js.map +1 -1
- package/dist/universalFile/index.mjs +73 -72
- package/dist/universalFile/index.mjs.map +1 -1
- package/dist/universalFile/server/index.js +258 -260
- package/dist/universalFile/server/index.js.map +1 -1
- package/dist/universalFile/server/index.mjs +244 -246
- package/dist/universalFile/server/index.mjs.map +1 -1
- package/dist/utils/index.js +11 -11
- package/dist/utils/index.mjs +2 -2
- package/package.json +25 -31
- package/dist/AliyunOSSProvider-FWAKUB2T.js +0 -15
- package/dist/AliyunOSSProvider-KJYRIZES.mjs +0 -6
- package/dist/ConfigService-7MEZXKJ5.js +0 -21
- package/dist/ConfigService-BV57YYFW.mjs +0 -4
- package/dist/LocalStorageProvider-RTPMUOZ2.mjs +0 -6
- package/dist/LocalStorageProvider-XSRCUXOU.js +0 -15
- package/dist/PMXParser-L6IWHL4I.mjs +0 -4
- package/dist/PMXParser-YBS3B6HM.js +0 -13
- package/dist/chunk-3BGPZN4X.mjs.map +0 -1
- package/dist/chunk-3WOAPLEG.mjs.map +0 -1
- package/dist/chunk-6PRFP5EG.js.map +0 -1
- package/dist/chunk-6YKMCPQI.mjs.map +0 -1
- package/dist/chunk-7Z5LLJ3A.js.map +0 -1
- package/dist/chunk-A3UP56MS.js.map +0 -1
- package/dist/chunk-CD77U7LZ.js.map +0 -1
- package/dist/chunk-CLKKZSPZ.js.map +0 -1
- package/dist/chunk-CNTILN5J.mjs.map +0 -1
- package/dist/chunk-DUHZ7VZP.js.map +0 -1
- package/dist/chunk-DW2ZTOCV.js +0 -1727
- package/dist/chunk-DW2ZTOCV.js.map +0 -1
- package/dist/chunk-E7RGBAYJ.js.map +0 -1
- package/dist/chunk-JZXJQMVE.js.map +0 -1
- package/dist/chunk-KQGP6BTS.mjs.map +0 -1
- package/dist/chunk-LFG6FPM5.mjs +0 -1597
- package/dist/chunk-LFG6FPM5.mjs.map +0 -1
- package/dist/chunk-LX4XX6W7.js.map +0 -1
- package/dist/chunk-LZHMNOED.js.map +0 -1
- package/dist/chunk-MW4BCIZC.mjs.map +0 -1
- package/dist/chunk-OCR5DS4C.mjs.map +0 -1
- package/dist/chunk-OLHGZXN3.mjs.map +0 -1
- package/dist/chunk-OPPF3326.js.map +0 -1
- package/dist/chunk-QAT2RWAO.mjs.map +0 -1
- package/dist/chunk-QU5OT4DF.js.map +0 -1
- package/dist/chunk-T5OZHYVM.mjs.map +0 -1
- package/dist/chunk-TFQF2HDO.mjs.map +0 -1
- package/dist/chunk-TOC5FSHP.js.map +0 -1
- package/dist/chunk-TV3VKRJK.mjs.map +0 -1
- package/dist/chunk-UOFTHYIH.js.map +0 -1
- package/dist/chunk-VRTRSEEH.mjs.map +0 -1
- package/dist/chunk-ZI25QCHD.mjs.map +0 -1
|
@@ -0,0 +1,2093 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkZWQJSZEY_js = require('./chunk-ZWQJSZEY.js');
|
|
4
|
+
var React10 = require('react');
|
|
5
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
6
|
+
var reactDom = require('react-dom');
|
|
7
|
+
var lucideReact = require('lucide-react');
|
|
8
|
+
var clsx = require('clsx');
|
|
9
|
+
var navigation = require('next/navigation');
|
|
10
|
+
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var React10__namespace = /*#__PURE__*/_interopNamespace(React10);
|
|
30
|
+
|
|
31
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
32
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
33
|
+
{
|
|
34
|
+
variants: {
|
|
35
|
+
variant: {
|
|
36
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
37
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
38
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
39
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
40
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
41
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
42
|
+
},
|
|
43
|
+
size: {
|
|
44
|
+
default: "h-9 px-4 py-2",
|
|
45
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
46
|
+
lg: "h-10 rounded-md px-8",
|
|
47
|
+
icon: "h-9 w-9"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
variant: "default",
|
|
52
|
+
size: "default"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
var Button = React10__namespace.forwardRef(
|
|
57
|
+
({ className, variant = "default", size = "default", asChild = false, children, ...props }, ref) => {
|
|
58
|
+
if (asChild && React10__namespace.isValidElement(children)) {
|
|
59
|
+
const childProps = children.props;
|
|
60
|
+
return React10__namespace.cloneElement(children, {
|
|
61
|
+
...props,
|
|
62
|
+
className: chunkZWQJSZEY_js.cn(buttonVariants({ variant, size, className }), childProps.className)
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
66
|
+
"button",
|
|
67
|
+
{
|
|
68
|
+
className: chunkZWQJSZEY_js.cn(buttonVariants({ variant, size, className })),
|
|
69
|
+
ref,
|
|
70
|
+
...props
|
|
71
|
+
},
|
|
72
|
+
children
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
Button.displayName = "Button";
|
|
77
|
+
var Card = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
ref,
|
|
81
|
+
className: chunkZWQJSZEY_js.cn(
|
|
82
|
+
"rounded-xl border bg-card text-card-foreground shadow",
|
|
83
|
+
className
|
|
84
|
+
),
|
|
85
|
+
...props
|
|
86
|
+
}
|
|
87
|
+
));
|
|
88
|
+
Card.displayName = "Card";
|
|
89
|
+
var CardHeader = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
ref,
|
|
93
|
+
className: chunkZWQJSZEY_js.cn("flex flex-col space-y-1.5 p-6", className),
|
|
94
|
+
...props
|
|
95
|
+
}
|
|
96
|
+
));
|
|
97
|
+
CardHeader.displayName = "CardHeader";
|
|
98
|
+
var CardTitle = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
ref,
|
|
102
|
+
className: chunkZWQJSZEY_js.cn("font-semibold leading-none tracking-tight", className),
|
|
103
|
+
...props
|
|
104
|
+
}
|
|
105
|
+
));
|
|
106
|
+
CardTitle.displayName = "CardTitle";
|
|
107
|
+
var CardDescription = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
ref,
|
|
111
|
+
className: chunkZWQJSZEY_js.cn("text-sm text-muted-foreground", className),
|
|
112
|
+
...props
|
|
113
|
+
}
|
|
114
|
+
));
|
|
115
|
+
CardDescription.displayName = "CardDescription";
|
|
116
|
+
var CardContent = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement("div", { ref, className: chunkZWQJSZEY_js.cn("p-6 pt-0", className), ...props }));
|
|
117
|
+
CardContent.displayName = "CardContent";
|
|
118
|
+
var CardFooter = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
ref,
|
|
122
|
+
className: chunkZWQJSZEY_js.cn("flex items-center p-6 pt-0", className),
|
|
123
|
+
...props
|
|
124
|
+
}
|
|
125
|
+
));
|
|
126
|
+
CardFooter.displayName = "CardFooter";
|
|
127
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
128
|
+
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
129
|
+
{
|
|
130
|
+
variants: {
|
|
131
|
+
variant: {
|
|
132
|
+
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
133
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
134
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
135
|
+
outline: "text-foreground"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
defaultVariants: {
|
|
139
|
+
variant: "default"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
function Badge({ className, variant, ...props }) {
|
|
144
|
+
return /* @__PURE__ */ React10__namespace.createElement("div", { className: chunkZWQJSZEY_js.cn(badgeVariants({ variant }), className), ...props });
|
|
145
|
+
}
|
|
146
|
+
var Input = React10__namespace.forwardRef(
|
|
147
|
+
({ className, type, ...props }, ref) => {
|
|
148
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
149
|
+
"input",
|
|
150
|
+
{
|
|
151
|
+
type,
|
|
152
|
+
className: chunkZWQJSZEY_js.cn(
|
|
153
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
154
|
+
className
|
|
155
|
+
),
|
|
156
|
+
ref,
|
|
157
|
+
...props
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
Input.displayName = "Input";
|
|
163
|
+
var labelVariants = classVarianceAuthority.cva(
|
|
164
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
165
|
+
);
|
|
166
|
+
var Label = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
167
|
+
"label",
|
|
168
|
+
{
|
|
169
|
+
ref,
|
|
170
|
+
className: chunkZWQJSZEY_js.cn(labelVariants(), className),
|
|
171
|
+
...props
|
|
172
|
+
}
|
|
173
|
+
));
|
|
174
|
+
Label.displayName = "Label";
|
|
175
|
+
function useControllableState({
|
|
176
|
+
value,
|
|
177
|
+
defaultValue,
|
|
178
|
+
onChange
|
|
179
|
+
}) {
|
|
180
|
+
const [internal, setInternal] = React10__namespace.useState(defaultValue);
|
|
181
|
+
const isControlled = value !== void 0;
|
|
182
|
+
const state = isControlled ? value : internal;
|
|
183
|
+
const setState = React10__namespace.useCallback(
|
|
184
|
+
(next) => {
|
|
185
|
+
if (!isControlled) setInternal(next);
|
|
186
|
+
onChange?.(next);
|
|
187
|
+
},
|
|
188
|
+
[isControlled, onChange]
|
|
189
|
+
);
|
|
190
|
+
return [state, setState];
|
|
191
|
+
}
|
|
192
|
+
function Portal({
|
|
193
|
+
children,
|
|
194
|
+
container
|
|
195
|
+
}) {
|
|
196
|
+
const [mounted, setMounted] = React10__namespace.useState(false);
|
|
197
|
+
React10__namespace.useEffect(() => {
|
|
198
|
+
setMounted(true);
|
|
199
|
+
}, []);
|
|
200
|
+
if (!mounted) return null;
|
|
201
|
+
return reactDom.createPortal(children, container ?? document.body);
|
|
202
|
+
}
|
|
203
|
+
function useOnClickOutside(refs, handler, enabled) {
|
|
204
|
+
React10__namespace.useEffect(() => {
|
|
205
|
+
if (!enabled) return;
|
|
206
|
+
const listener = (event) => {
|
|
207
|
+
const target = event.target;
|
|
208
|
+
const clickedInside = refs.some((ref) => {
|
|
209
|
+
const el = ref.current;
|
|
210
|
+
return el && el.contains(target);
|
|
211
|
+
});
|
|
212
|
+
if (!clickedInside) {
|
|
213
|
+
handler(event);
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
document.addEventListener("mousedown", listener);
|
|
217
|
+
document.addEventListener("touchstart", listener);
|
|
218
|
+
return () => {
|
|
219
|
+
document.removeEventListener("mousedown", listener);
|
|
220
|
+
document.removeEventListener("touchstart", listener);
|
|
221
|
+
};
|
|
222
|
+
}, [refs, handler, enabled]);
|
|
223
|
+
}
|
|
224
|
+
function mergeRefs(...refs) {
|
|
225
|
+
return (value) => {
|
|
226
|
+
refs.forEach((ref) => {
|
|
227
|
+
if (!ref) return;
|
|
228
|
+
if (typeof ref === "function") {
|
|
229
|
+
ref(value);
|
|
230
|
+
} else {
|
|
231
|
+
ref.current = value;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// src/components/Tabs.tsx
|
|
238
|
+
var TabsContext = React10__namespace.createContext(null);
|
|
239
|
+
var Tabs = ({
|
|
240
|
+
value,
|
|
241
|
+
defaultValue = "",
|
|
242
|
+
onValueChange,
|
|
243
|
+
className,
|
|
244
|
+
...props
|
|
245
|
+
}) => {
|
|
246
|
+
const [current, setCurrent] = useControllableState({
|
|
247
|
+
value,
|
|
248
|
+
defaultValue,
|
|
249
|
+
onChange: onValueChange
|
|
250
|
+
});
|
|
251
|
+
return /* @__PURE__ */ React10__namespace.createElement(TabsContext.Provider, { value: { value: current, setValue: setCurrent } }, /* @__PURE__ */ React10__namespace.createElement("div", { className, ...props }));
|
|
252
|
+
};
|
|
253
|
+
var TabsList = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
254
|
+
"div",
|
|
255
|
+
{
|
|
256
|
+
ref,
|
|
257
|
+
className: chunkZWQJSZEY_js.cn(
|
|
258
|
+
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
259
|
+
className
|
|
260
|
+
),
|
|
261
|
+
...props
|
|
262
|
+
}
|
|
263
|
+
));
|
|
264
|
+
TabsList.displayName = "TabsList";
|
|
265
|
+
var TabsTrigger = React10__namespace.forwardRef(
|
|
266
|
+
({ className, value, onClick, ...props }, ref) => {
|
|
267
|
+
const ctx = React10__namespace.useContext(TabsContext);
|
|
268
|
+
const active = ctx?.value === value;
|
|
269
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
270
|
+
"button",
|
|
271
|
+
{
|
|
272
|
+
ref,
|
|
273
|
+
type: "button",
|
|
274
|
+
"data-state": active ? "active" : "inactive",
|
|
275
|
+
className: chunkZWQJSZEY_js.cn(
|
|
276
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
277
|
+
active && "bg-background text-foreground shadow",
|
|
278
|
+
className
|
|
279
|
+
),
|
|
280
|
+
onClick: (e) => {
|
|
281
|
+
ctx?.setValue(value);
|
|
282
|
+
onClick?.(e);
|
|
283
|
+
},
|
|
284
|
+
...props
|
|
285
|
+
}
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
);
|
|
289
|
+
TabsTrigger.displayName = "TabsTrigger";
|
|
290
|
+
var TabsContent = React10__namespace.forwardRef(
|
|
291
|
+
({ className, value, forceMount = false, ...props }, ref) => {
|
|
292
|
+
const ctx = React10__namespace.useContext(TabsContext);
|
|
293
|
+
const active = ctx?.value === value;
|
|
294
|
+
if (!active && !forceMount) return null;
|
|
295
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
296
|
+
"div",
|
|
297
|
+
{
|
|
298
|
+
ref,
|
|
299
|
+
"data-state": active ? "active" : "inactive",
|
|
300
|
+
hidden: !active && forceMount,
|
|
301
|
+
className: chunkZWQJSZEY_js.cn(
|
|
302
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
303
|
+
className
|
|
304
|
+
),
|
|
305
|
+
...props
|
|
306
|
+
}
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
TabsContent.displayName = "TabsContent";
|
|
311
|
+
var DialogContext = React10__namespace.createContext(null);
|
|
312
|
+
var Dialog = ({ open, defaultOpen = false, onOpenChange, children }) => {
|
|
313
|
+
const [isOpen, setIsOpen] = useControllableState({
|
|
314
|
+
value: open,
|
|
315
|
+
defaultValue: defaultOpen,
|
|
316
|
+
onChange: onOpenChange
|
|
317
|
+
});
|
|
318
|
+
const triggerRef = React10__namespace.useRef(null);
|
|
319
|
+
const contentRef = React10__namespace.useRef(null);
|
|
320
|
+
return /* @__PURE__ */ React10__namespace.createElement(DialogContext.Provider, { value: { open: isOpen, setOpen: setIsOpen, triggerRef, contentRef } }, children);
|
|
321
|
+
};
|
|
322
|
+
var DialogTrigger = React10__namespace.forwardRef(
|
|
323
|
+
({ children, onClick, ...props }, ref) => {
|
|
324
|
+
const ctx = React10__namespace.useContext(DialogContext);
|
|
325
|
+
if (!ctx) return null;
|
|
326
|
+
const mergedRef = mergeRefs(ctx.triggerRef, ref);
|
|
327
|
+
const handleClick = (e) => {
|
|
328
|
+
ctx.setOpen(true);
|
|
329
|
+
onClick?.(e);
|
|
330
|
+
};
|
|
331
|
+
return /* @__PURE__ */ React10__namespace.createElement("button", { ref: mergedRef, type: "button", onClick: handleClick, ...props }, children);
|
|
332
|
+
}
|
|
333
|
+
);
|
|
334
|
+
DialogTrigger.displayName = "DialogTrigger";
|
|
335
|
+
var DialogPortal = ({ children }) => {
|
|
336
|
+
const ctx = React10__namespace.useContext(DialogContext);
|
|
337
|
+
if (!ctx?.open) return null;
|
|
338
|
+
return /* @__PURE__ */ React10__namespace.createElement(Portal, null, children);
|
|
339
|
+
};
|
|
340
|
+
var DialogClose = React10__namespace.forwardRef(({ onClick, ...props }, ref) => {
|
|
341
|
+
const ctx = React10__namespace.useContext(DialogContext);
|
|
342
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
343
|
+
"button",
|
|
344
|
+
{
|
|
345
|
+
ref,
|
|
346
|
+
type: "button",
|
|
347
|
+
onClick: (e) => {
|
|
348
|
+
ctx?.setOpen(false);
|
|
349
|
+
onClick?.(e);
|
|
350
|
+
},
|
|
351
|
+
...props
|
|
352
|
+
}
|
|
353
|
+
);
|
|
354
|
+
});
|
|
355
|
+
DialogClose.displayName = "DialogClose";
|
|
356
|
+
var DialogOverlay = React10__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
357
|
+
const ctx = React10__namespace.useContext(DialogContext);
|
|
358
|
+
if (!ctx?.open) return null;
|
|
359
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
360
|
+
"div",
|
|
361
|
+
{
|
|
362
|
+
ref,
|
|
363
|
+
className: chunkZWQJSZEY_js.cn("fixed inset-0 z-[9999] bg-black/80", className),
|
|
364
|
+
...props
|
|
365
|
+
}
|
|
366
|
+
);
|
|
367
|
+
});
|
|
368
|
+
DialogOverlay.displayName = "DialogOverlay";
|
|
369
|
+
var DialogContent = React10__namespace.forwardRef(
|
|
370
|
+
({ className, children, onPointerDownOutside, onEscapeKeyDown, showCloseButton = true, ...props }, ref) => {
|
|
371
|
+
const ctx = React10__namespace.useContext(DialogContext);
|
|
372
|
+
const open = !!ctx?.open;
|
|
373
|
+
useOnClickOutside(
|
|
374
|
+
[ctx?.contentRef ?? { current: null }, ctx?.triggerRef ?? { current: null }],
|
|
375
|
+
(evt) => {
|
|
376
|
+
onPointerDownOutside?.(evt);
|
|
377
|
+
if (!evt.defaultPrevented) {
|
|
378
|
+
ctx?.setOpen(false);
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
open
|
|
382
|
+
);
|
|
383
|
+
React10__namespace.useEffect(() => {
|
|
384
|
+
if (!open) return;
|
|
385
|
+
const onKey = (e) => {
|
|
386
|
+
if (e.key !== "Escape") return;
|
|
387
|
+
onEscapeKeyDown?.(e);
|
|
388
|
+
if (!e.defaultPrevented) {
|
|
389
|
+
ctx?.setOpen(false);
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
document.addEventListener("keydown", onKey);
|
|
393
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
394
|
+
}, [ctx, onEscapeKeyDown, open]);
|
|
395
|
+
if (!ctx || !open) return null;
|
|
396
|
+
return /* @__PURE__ */ React10__namespace.createElement(DialogPortal, null, /* @__PURE__ */ React10__namespace.createElement(DialogOverlay, null), /* @__PURE__ */ React10__namespace.createElement(
|
|
397
|
+
"div",
|
|
398
|
+
{
|
|
399
|
+
ref: mergeRefs(ctx.contentRef, ref),
|
|
400
|
+
className: chunkZWQJSZEY_js.cn(
|
|
401
|
+
"fixed left-[50%] top-[50%] z-[10000] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg",
|
|
402
|
+
className
|
|
403
|
+
),
|
|
404
|
+
...props
|
|
405
|
+
},
|
|
406
|
+
children,
|
|
407
|
+
showCloseButton ? /* @__PURE__ */ React10__namespace.createElement(DialogClose, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100" }, /* @__PURE__ */ React10__namespace.createElement(lucideReact.X, { className: "h-4 w-4" }), /* @__PURE__ */ React10__namespace.createElement("span", { className: "sr-only" }, "Close")) : null
|
|
408
|
+
));
|
|
409
|
+
}
|
|
410
|
+
);
|
|
411
|
+
DialogContent.displayName = "DialogContent";
|
|
412
|
+
var DialogHeader = ({
|
|
413
|
+
className,
|
|
414
|
+
...props
|
|
415
|
+
}) => /* @__PURE__ */ React10__namespace.createElement(
|
|
416
|
+
"div",
|
|
417
|
+
{
|
|
418
|
+
className: chunkZWQJSZEY_js.cn(
|
|
419
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
420
|
+
className
|
|
421
|
+
),
|
|
422
|
+
...props
|
|
423
|
+
}
|
|
424
|
+
);
|
|
425
|
+
DialogHeader.displayName = "DialogHeader";
|
|
426
|
+
var DialogFooter = ({
|
|
427
|
+
className,
|
|
428
|
+
...props
|
|
429
|
+
}) => /* @__PURE__ */ React10__namespace.createElement(
|
|
430
|
+
"div",
|
|
431
|
+
{
|
|
432
|
+
className: chunkZWQJSZEY_js.cn(
|
|
433
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
434
|
+
className
|
|
435
|
+
),
|
|
436
|
+
...props
|
|
437
|
+
}
|
|
438
|
+
);
|
|
439
|
+
DialogFooter.displayName = "DialogFooter";
|
|
440
|
+
var DialogTitle = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
441
|
+
"h2",
|
|
442
|
+
{
|
|
443
|
+
ref,
|
|
444
|
+
className: chunkZWQJSZEY_js.cn(
|
|
445
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
446
|
+
className
|
|
447
|
+
),
|
|
448
|
+
...props
|
|
449
|
+
}
|
|
450
|
+
));
|
|
451
|
+
DialogTitle.displayName = "DialogTitle";
|
|
452
|
+
var DialogDescription = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
453
|
+
"p",
|
|
454
|
+
{
|
|
455
|
+
ref,
|
|
456
|
+
className: chunkZWQJSZEY_js.cn("text-sm text-muted-foreground", className),
|
|
457
|
+
...props
|
|
458
|
+
}
|
|
459
|
+
));
|
|
460
|
+
DialogDescription.displayName = "DialogDescription";
|
|
461
|
+
var AlertDialogContent = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
462
|
+
DialogContent,
|
|
463
|
+
{
|
|
464
|
+
ref,
|
|
465
|
+
className: chunkZWQJSZEY_js.cn("z-[9999]", className),
|
|
466
|
+
...props
|
|
467
|
+
}
|
|
468
|
+
));
|
|
469
|
+
AlertDialogContent.displayName = "AlertDialogContent";
|
|
470
|
+
var AlertDialogAction = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
471
|
+
DialogClose,
|
|
472
|
+
{
|
|
473
|
+
ref,
|
|
474
|
+
className: chunkZWQJSZEY_js.cn(buttonVariants(), className),
|
|
475
|
+
...props
|
|
476
|
+
}
|
|
477
|
+
));
|
|
478
|
+
AlertDialogAction.displayName = "AlertDialogAction";
|
|
479
|
+
var AlertDialogCancel = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
480
|
+
DialogClose,
|
|
481
|
+
{
|
|
482
|
+
ref,
|
|
483
|
+
className: chunkZWQJSZEY_js.cn(
|
|
484
|
+
buttonVariants({ variant: "outline" }),
|
|
485
|
+
"mt-2 sm:mt-0",
|
|
486
|
+
className
|
|
487
|
+
),
|
|
488
|
+
...props
|
|
489
|
+
}
|
|
490
|
+
));
|
|
491
|
+
AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
492
|
+
var DropdownMenuContext = React10__namespace.createContext(null);
|
|
493
|
+
var DropdownMenuRadioGroupContext = React10__namespace.createContext(null);
|
|
494
|
+
var DropdownMenu = ({ open, defaultOpen = false, onOpenChange, children }) => {
|
|
495
|
+
const [isOpen, setIsOpen] = useControllableState({
|
|
496
|
+
value: open,
|
|
497
|
+
defaultValue: defaultOpen,
|
|
498
|
+
onChange: onOpenChange
|
|
499
|
+
});
|
|
500
|
+
const triggerRef = React10__namespace.useRef(null);
|
|
501
|
+
const contentRef = React10__namespace.useRef(null);
|
|
502
|
+
return /* @__PURE__ */ React10__namespace.createElement(DropdownMenuContext.Provider, { value: { open: isOpen, setOpen: setIsOpen, triggerRef, contentRef } }, children);
|
|
503
|
+
};
|
|
504
|
+
var DropdownMenuTrigger = React10__namespace.forwardRef(({ children, onClick, ...props }, ref) => {
|
|
505
|
+
const ctx = React10__namespace.useContext(DropdownMenuContext);
|
|
506
|
+
if (!ctx) return null;
|
|
507
|
+
const mergedRef = mergeRefs(ctx.triggerRef, ref);
|
|
508
|
+
const handleClick = (e) => {
|
|
509
|
+
ctx.setOpen(!ctx.open);
|
|
510
|
+
onClick?.(e);
|
|
511
|
+
};
|
|
512
|
+
return /* @__PURE__ */ React10__namespace.createElement("button", { ref: mergedRef, type: "button", onClick: handleClick, ...props }, children);
|
|
513
|
+
});
|
|
514
|
+
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
515
|
+
var DropdownMenuGroup = ({ children }) => /* @__PURE__ */ React10__namespace.createElement(React10__namespace.Fragment, null, children);
|
|
516
|
+
var DropdownMenuPortal = ({ children }) => /* @__PURE__ */ React10__namespace.createElement(Portal, null, children);
|
|
517
|
+
var DropdownMenuSub = ({ children }) => /* @__PURE__ */ React10__namespace.createElement(React10__namespace.Fragment, null, children);
|
|
518
|
+
var DropdownMenuContent = React10__namespace.forwardRef(({ className, sideOffset = 4, style, ...props }, ref) => {
|
|
519
|
+
const ctx = React10__namespace.useContext(DropdownMenuContext);
|
|
520
|
+
const [pos, setPos] = React10__namespace.useState({ top: 0, left: 0 });
|
|
521
|
+
const open = !!ctx?.open;
|
|
522
|
+
const trigger = ctx?.triggerRef.current ?? null;
|
|
523
|
+
React10__namespace.useLayoutEffect(() => {
|
|
524
|
+
if (!trigger) return;
|
|
525
|
+
const rect = trigger.getBoundingClientRect();
|
|
526
|
+
setPos({ top: rect.bottom + sideOffset, left: rect.left });
|
|
527
|
+
}, [trigger, sideOffset]);
|
|
528
|
+
useOnClickOutside(
|
|
529
|
+
[ctx?.contentRef ?? { current: null }, ctx?.triggerRef ?? { current: null }],
|
|
530
|
+
() => ctx?.setOpen(false),
|
|
531
|
+
open
|
|
532
|
+
);
|
|
533
|
+
if (!ctx || !open || !trigger) return null;
|
|
534
|
+
return /* @__PURE__ */ React10__namespace.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React10__namespace.createElement(
|
|
535
|
+
"div",
|
|
536
|
+
{
|
|
537
|
+
ref: mergeRefs(ctx.contentRef, ref),
|
|
538
|
+
className: chunkZWQJSZEY_js.cn(
|
|
539
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
540
|
+
className
|
|
541
|
+
),
|
|
542
|
+
style: { position: "fixed", top: pos.top, left: pos.left, ...style },
|
|
543
|
+
...props
|
|
544
|
+
}
|
|
545
|
+
));
|
|
546
|
+
});
|
|
547
|
+
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
548
|
+
var DropdownMenuItem = React10__namespace.forwardRef(({ className, inset, onSelect, onClick, ...props }, ref) => {
|
|
549
|
+
const ctx = React10__namespace.useContext(DropdownMenuContext);
|
|
550
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
551
|
+
"button",
|
|
552
|
+
{
|
|
553
|
+
ref,
|
|
554
|
+
type: "button",
|
|
555
|
+
className: chunkZWQJSZEY_js.cn(
|
|
556
|
+
"relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50",
|
|
557
|
+
inset && "pl-8",
|
|
558
|
+
className
|
|
559
|
+
),
|
|
560
|
+
onClick: (e) => {
|
|
561
|
+
onSelect?.(e.nativeEvent);
|
|
562
|
+
onClick?.(e);
|
|
563
|
+
if (!e.isDefaultPrevented()) {
|
|
564
|
+
ctx?.setOpen(false);
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
...props
|
|
568
|
+
}
|
|
569
|
+
);
|
|
570
|
+
});
|
|
571
|
+
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
572
|
+
var DropdownMenuCheckboxItem = React10__namespace.forwardRef(({ className, children, checked = false, onCheckedChange, onClick, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
573
|
+
"button",
|
|
574
|
+
{
|
|
575
|
+
ref,
|
|
576
|
+
type: "button",
|
|
577
|
+
className: chunkZWQJSZEY_js.cn(
|
|
578
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50",
|
|
579
|
+
className
|
|
580
|
+
),
|
|
581
|
+
onClick: (e) => {
|
|
582
|
+
onCheckedChange?.(!checked);
|
|
583
|
+
onClick?.(e);
|
|
584
|
+
},
|
|
585
|
+
...props
|
|
586
|
+
},
|
|
587
|
+
/* @__PURE__ */ React10__namespace.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, checked ? /* @__PURE__ */ React10__namespace.createElement(lucideReact.Check, { className: "h-4 w-4" }) : null),
|
|
588
|
+
children
|
|
589
|
+
));
|
|
590
|
+
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
591
|
+
var DropdownMenuRadioGroup = ({
|
|
592
|
+
value,
|
|
593
|
+
onValueChange,
|
|
594
|
+
children
|
|
595
|
+
}) => /* @__PURE__ */ React10__namespace.createElement(DropdownMenuRadioGroupContext.Provider, { value: { value, onValueChange } }, children);
|
|
596
|
+
var DropdownMenuRadioItem = React10__namespace.forwardRef(({ className, children, value, onClick, ...props }, ref) => {
|
|
597
|
+
const radioCtx = React10__namespace.useContext(DropdownMenuRadioGroupContext);
|
|
598
|
+
const menuCtx = React10__namespace.useContext(DropdownMenuContext);
|
|
599
|
+
const checked = radioCtx?.value === value;
|
|
600
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
601
|
+
"button",
|
|
602
|
+
{
|
|
603
|
+
ref,
|
|
604
|
+
type: "button",
|
|
605
|
+
className: chunkZWQJSZEY_js.cn(
|
|
606
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50",
|
|
607
|
+
className
|
|
608
|
+
),
|
|
609
|
+
onClick: (e) => {
|
|
610
|
+
radioCtx?.onValueChange?.(value);
|
|
611
|
+
onClick?.(e);
|
|
612
|
+
menuCtx?.setOpen(false);
|
|
613
|
+
},
|
|
614
|
+
...props
|
|
615
|
+
},
|
|
616
|
+
/* @__PURE__ */ React10__namespace.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, checked ? /* @__PURE__ */ React10__namespace.createElement(lucideReact.Circle, { className: "h-2 w-2 fill-current" }) : null),
|
|
617
|
+
children
|
|
618
|
+
);
|
|
619
|
+
});
|
|
620
|
+
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
621
|
+
var DropdownMenuLabel = React10__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
622
|
+
"div",
|
|
623
|
+
{
|
|
624
|
+
ref,
|
|
625
|
+
className: chunkZWQJSZEY_js.cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className),
|
|
626
|
+
...props
|
|
627
|
+
}
|
|
628
|
+
));
|
|
629
|
+
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
630
|
+
var DropdownMenuSeparator = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
631
|
+
"div",
|
|
632
|
+
{
|
|
633
|
+
ref,
|
|
634
|
+
className: chunkZWQJSZEY_js.cn("-mx-1 my-1 h-px bg-muted", className),
|
|
635
|
+
...props
|
|
636
|
+
}
|
|
637
|
+
));
|
|
638
|
+
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
639
|
+
var DropdownMenuShortcut = ({
|
|
640
|
+
className,
|
|
641
|
+
...props
|
|
642
|
+
}) => /* @__PURE__ */ React10__namespace.createElement(
|
|
643
|
+
"span",
|
|
644
|
+
{
|
|
645
|
+
className: chunkZWQJSZEY_js.cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
646
|
+
...props
|
|
647
|
+
}
|
|
648
|
+
);
|
|
649
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
650
|
+
var DropdownMenuSubTrigger = React10__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
651
|
+
"button",
|
|
652
|
+
{
|
|
653
|
+
ref,
|
|
654
|
+
type: "button",
|
|
655
|
+
className: chunkZWQJSZEY_js.cn(
|
|
656
|
+
"flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent",
|
|
657
|
+
inset && "pl-8",
|
|
658
|
+
className
|
|
659
|
+
),
|
|
660
|
+
...props
|
|
661
|
+
},
|
|
662
|
+
children,
|
|
663
|
+
/* @__PURE__ */ React10__namespace.createElement(lucideReact.ChevronRight, { className: "ml-auto" })
|
|
664
|
+
));
|
|
665
|
+
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
666
|
+
var DropdownMenuSubContent = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
667
|
+
"div",
|
|
668
|
+
{
|
|
669
|
+
ref,
|
|
670
|
+
className: chunkZWQJSZEY_js.cn(
|
|
671
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg",
|
|
672
|
+
className
|
|
673
|
+
),
|
|
674
|
+
...props
|
|
675
|
+
}
|
|
676
|
+
));
|
|
677
|
+
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
678
|
+
var PopoverContext = React10__namespace.createContext(null);
|
|
679
|
+
var Popover = ({ open, defaultOpen = false, onOpenChange, children }) => {
|
|
680
|
+
const [isOpen, setIsOpen] = useControllableState({
|
|
681
|
+
value: open,
|
|
682
|
+
defaultValue: defaultOpen,
|
|
683
|
+
onChange: onOpenChange
|
|
684
|
+
});
|
|
685
|
+
const triggerRef = React10__namespace.useRef(null);
|
|
686
|
+
const anchorRef = React10__namespace.useRef(null);
|
|
687
|
+
const contentRef = React10__namespace.useRef(null);
|
|
688
|
+
return /* @__PURE__ */ React10__namespace.createElement(PopoverContext.Provider, { value: { open: isOpen, setOpen: setIsOpen, triggerRef, anchorRef, contentRef } }, children);
|
|
689
|
+
};
|
|
690
|
+
var PopoverTrigger = React10__namespace.forwardRef(
|
|
691
|
+
({ children, onClick, ...props }, ref) => {
|
|
692
|
+
const ctx = React10__namespace.useContext(PopoverContext);
|
|
693
|
+
if (!ctx) return null;
|
|
694
|
+
const mergedRef = mergeRefs(ctx.triggerRef, ref);
|
|
695
|
+
const handleClick = (e) => {
|
|
696
|
+
ctx.setOpen(!ctx.open);
|
|
697
|
+
onClick?.(e);
|
|
698
|
+
};
|
|
699
|
+
return /* @__PURE__ */ React10__namespace.createElement("button", { ref: mergedRef, type: "button", onClick: handleClick, ...props }, children);
|
|
700
|
+
}
|
|
701
|
+
);
|
|
702
|
+
PopoverTrigger.displayName = "PopoverTrigger";
|
|
703
|
+
var PopoverAnchor = React10__namespace.forwardRef(
|
|
704
|
+
({ ...props }, ref) => {
|
|
705
|
+
const ctx = React10__namespace.useContext(PopoverContext);
|
|
706
|
+
if (!ctx) return null;
|
|
707
|
+
return /* @__PURE__ */ React10__namespace.createElement("span", { ref: mergeRefs(ctx.anchorRef, ref), ...props });
|
|
708
|
+
}
|
|
709
|
+
);
|
|
710
|
+
PopoverAnchor.displayName = "PopoverAnchor";
|
|
711
|
+
var PopoverContent = React10__namespace.forwardRef(
|
|
712
|
+
({ className, align = "center", sideOffset = 4, style, ...props }, ref) => {
|
|
713
|
+
const ctx = React10__namespace.useContext(PopoverContext);
|
|
714
|
+
const [position, setPosition] = React10__namespace.useState({ top: 0, left: 0 });
|
|
715
|
+
const open = !!ctx?.open;
|
|
716
|
+
const anchor = ctx?.anchorRef.current ?? ctx?.triggerRef.current ?? null;
|
|
717
|
+
React10__namespace.useLayoutEffect(() => {
|
|
718
|
+
if (!anchor) return;
|
|
719
|
+
const rect = anchor.getBoundingClientRect();
|
|
720
|
+
let left = rect.left + rect.width / 2;
|
|
721
|
+
if (align === "start") left = rect.left;
|
|
722
|
+
if (align === "end") left = rect.right;
|
|
723
|
+
setPosition({ top: rect.bottom + sideOffset, left });
|
|
724
|
+
}, [anchor, align, sideOffset]);
|
|
725
|
+
useOnClickOutside(
|
|
726
|
+
[ctx?.contentRef ?? { current: null }, ctx?.triggerRef ?? { current: null }],
|
|
727
|
+
() => ctx?.setOpen(false),
|
|
728
|
+
open
|
|
729
|
+
);
|
|
730
|
+
if (!ctx || !open) return null;
|
|
731
|
+
return /* @__PURE__ */ React10__namespace.createElement(Portal, null, /* @__PURE__ */ React10__namespace.createElement(
|
|
732
|
+
"div",
|
|
733
|
+
{
|
|
734
|
+
ref: mergeRefs(ctx.contentRef, ref),
|
|
735
|
+
className: chunkZWQJSZEY_js.cn(
|
|
736
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
737
|
+
className
|
|
738
|
+
),
|
|
739
|
+
style: {
|
|
740
|
+
position: "fixed",
|
|
741
|
+
top: position.top,
|
|
742
|
+
left: position.left,
|
|
743
|
+
transform: align === "center" ? "translateX(-50%)" : align === "end" ? "translateX(-100%)" : void 0,
|
|
744
|
+
...style
|
|
745
|
+
},
|
|
746
|
+
...props
|
|
747
|
+
}
|
|
748
|
+
));
|
|
749
|
+
}
|
|
750
|
+
);
|
|
751
|
+
PopoverContent.displayName = "PopoverContent";
|
|
752
|
+
var Progress = React10__namespace.forwardRef(
|
|
753
|
+
({ className, value = 0, max = 100, ...props }, ref) => {
|
|
754
|
+
const safeMax = max <= 0 ? 100 : max;
|
|
755
|
+
const safeValue = Math.max(0, Math.min(value, safeMax));
|
|
756
|
+
const percent = safeValue / safeMax * 100;
|
|
757
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
758
|
+
"div",
|
|
759
|
+
{
|
|
760
|
+
ref,
|
|
761
|
+
role: "progressbar",
|
|
762
|
+
"aria-valuemin": 0,
|
|
763
|
+
"aria-valuemax": safeMax,
|
|
764
|
+
"aria-valuenow": safeValue,
|
|
765
|
+
className: chunkZWQJSZEY_js.cn(
|
|
766
|
+
"relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
|
|
767
|
+
className
|
|
768
|
+
),
|
|
769
|
+
...props
|
|
770
|
+
},
|
|
771
|
+
/* @__PURE__ */ React10__namespace.createElement(
|
|
772
|
+
"div",
|
|
773
|
+
{
|
|
774
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
775
|
+
style: { transform: `translateX(-${100 - percent}%)` }
|
|
776
|
+
}
|
|
777
|
+
)
|
|
778
|
+
);
|
|
779
|
+
}
|
|
780
|
+
);
|
|
781
|
+
Progress.displayName = "Progress";
|
|
782
|
+
var ScrollArea = React10__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
783
|
+
"div",
|
|
784
|
+
{
|
|
785
|
+
ref,
|
|
786
|
+
className: chunkZWQJSZEY_js.cn("relative overflow-auto", className),
|
|
787
|
+
...props
|
|
788
|
+
},
|
|
789
|
+
children
|
|
790
|
+
));
|
|
791
|
+
ScrollArea.displayName = "ScrollArea";
|
|
792
|
+
var ScrollBar = React10__namespace.forwardRef(
|
|
793
|
+
({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
794
|
+
"div",
|
|
795
|
+
{
|
|
796
|
+
ref,
|
|
797
|
+
className: chunkZWQJSZEY_js.cn(
|
|
798
|
+
"pointer-events-none absolute",
|
|
799
|
+
orientation === "vertical" ? "right-0 top-0 h-full w-2.5" : "bottom-0 left-0 h-2.5 w-full",
|
|
800
|
+
className
|
|
801
|
+
),
|
|
802
|
+
...props
|
|
803
|
+
}
|
|
804
|
+
)
|
|
805
|
+
);
|
|
806
|
+
ScrollBar.displayName = "ScrollBar";
|
|
807
|
+
var SelectContext = React10__namespace.createContext(null);
|
|
808
|
+
var SelectGroupContext = React10__namespace.createContext(false);
|
|
809
|
+
var Select = ({
|
|
810
|
+
value,
|
|
811
|
+
defaultValue,
|
|
812
|
+
onValueChange,
|
|
813
|
+
open,
|
|
814
|
+
defaultOpen = false,
|
|
815
|
+
onOpenChange,
|
|
816
|
+
disabled = false,
|
|
817
|
+
children
|
|
818
|
+
}) => {
|
|
819
|
+
const [isOpen, setIsOpen] = useControllableState({
|
|
820
|
+
value: open,
|
|
821
|
+
defaultValue: defaultOpen,
|
|
822
|
+
onChange: onOpenChange
|
|
823
|
+
});
|
|
824
|
+
const [currentValue, setCurrentValue] = useControllableState({
|
|
825
|
+
value,
|
|
826
|
+
defaultValue,
|
|
827
|
+
onChange: (next) => {
|
|
828
|
+
if (next !== void 0) {
|
|
829
|
+
onValueChange?.(next);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
});
|
|
833
|
+
const triggerRef = React10__namespace.useRef(null);
|
|
834
|
+
const contentRef = React10__namespace.useRef(null);
|
|
835
|
+
const itemsRef = React10__namespace.useRef(/* @__PURE__ */ new Map());
|
|
836
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
837
|
+
SelectContext.Provider,
|
|
838
|
+
{
|
|
839
|
+
value: {
|
|
840
|
+
open: disabled ? false : isOpen,
|
|
841
|
+
setOpen: disabled ? () => void 0 : setIsOpen,
|
|
842
|
+
value: currentValue,
|
|
843
|
+
setValue: (next) => {
|
|
844
|
+
if (disabled) return;
|
|
845
|
+
setCurrentValue(next);
|
|
846
|
+
setIsOpen(false);
|
|
847
|
+
},
|
|
848
|
+
triggerRef,
|
|
849
|
+
contentRef,
|
|
850
|
+
itemsRef
|
|
851
|
+
}
|
|
852
|
+
},
|
|
853
|
+
children
|
|
854
|
+
);
|
|
855
|
+
};
|
|
856
|
+
var SelectGroup = ({ children }) => /* @__PURE__ */ React10__namespace.createElement(SelectGroupContext.Provider, { value: true }, children);
|
|
857
|
+
var SelectValue = ({
|
|
858
|
+
placeholder,
|
|
859
|
+
children
|
|
860
|
+
}) => {
|
|
861
|
+
const ctx = React10__namespace.useContext(SelectContext);
|
|
862
|
+
if (!ctx) return null;
|
|
863
|
+
if (children) return /* @__PURE__ */ React10__namespace.createElement(React10__namespace.Fragment, null, children);
|
|
864
|
+
if (ctx.value && ctx.itemsRef.current.has(ctx.value)) {
|
|
865
|
+
return /* @__PURE__ */ React10__namespace.createElement(React10__namespace.Fragment, null, ctx.itemsRef.current.get(ctx.value));
|
|
866
|
+
}
|
|
867
|
+
return /* @__PURE__ */ React10__namespace.createElement("span", { className: "text-muted-foreground" }, placeholder);
|
|
868
|
+
};
|
|
869
|
+
var SelectTrigger = React10__namespace.forwardRef(({ className, children, onClick, ...props }, ref) => {
|
|
870
|
+
const ctx = React10__namespace.useContext(SelectContext);
|
|
871
|
+
if (!ctx) return null;
|
|
872
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
873
|
+
"button",
|
|
874
|
+
{
|
|
875
|
+
ref: mergeRefs(ctx.triggerRef, ref),
|
|
876
|
+
type: "button",
|
|
877
|
+
className: chunkZWQJSZEY_js.cn(
|
|
878
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
879
|
+
className
|
|
880
|
+
),
|
|
881
|
+
onClick: (e) => {
|
|
882
|
+
ctx.setOpen(!ctx.open);
|
|
883
|
+
onClick?.(e);
|
|
884
|
+
},
|
|
885
|
+
...props
|
|
886
|
+
},
|
|
887
|
+
/* @__PURE__ */ React10__namespace.createElement("span", null, children),
|
|
888
|
+
/* @__PURE__ */ React10__namespace.createElement(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-50" })
|
|
889
|
+
);
|
|
890
|
+
});
|
|
891
|
+
SelectTrigger.displayName = "SelectTrigger";
|
|
892
|
+
var SelectScrollUpButton = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
893
|
+
"div",
|
|
894
|
+
{
|
|
895
|
+
ref,
|
|
896
|
+
className: chunkZWQJSZEY_js.cn("flex cursor-default items-center justify-center py-1", className),
|
|
897
|
+
...props
|
|
898
|
+
},
|
|
899
|
+
/* @__PURE__ */ React10__namespace.createElement(lucideReact.ChevronUp, { className: "h-4 w-4" })
|
|
900
|
+
));
|
|
901
|
+
SelectScrollUpButton.displayName = "SelectScrollUpButton";
|
|
902
|
+
var SelectScrollDownButton = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
903
|
+
"div",
|
|
904
|
+
{
|
|
905
|
+
ref,
|
|
906
|
+
className: chunkZWQJSZEY_js.cn("flex cursor-default items-center justify-center py-1", className),
|
|
907
|
+
...props
|
|
908
|
+
},
|
|
909
|
+
/* @__PURE__ */ React10__namespace.createElement(lucideReact.ChevronDown, { className: "h-4 w-4" })
|
|
910
|
+
));
|
|
911
|
+
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
912
|
+
var SelectContent = React10__namespace.forwardRef(({ className, children, style, ...props }, ref) => {
|
|
913
|
+
const ctx = React10__namespace.useContext(SelectContext);
|
|
914
|
+
const [pos, setPos] = React10__namespace.useState({ top: 0, left: 0, width: 0 });
|
|
915
|
+
const open = !!ctx?.open;
|
|
916
|
+
const trigger = ctx?.triggerRef.current ?? null;
|
|
917
|
+
React10__namespace.useLayoutEffect(() => {
|
|
918
|
+
if (!trigger) return;
|
|
919
|
+
const rect = trigger.getBoundingClientRect();
|
|
920
|
+
setPos({ top: rect.bottom + 4, left: rect.left, width: rect.width });
|
|
921
|
+
}, [trigger]);
|
|
922
|
+
useOnClickOutside(
|
|
923
|
+
[ctx?.contentRef ?? { current: null }, ctx?.triggerRef ?? { current: null }],
|
|
924
|
+
() => ctx?.setOpen(false),
|
|
925
|
+
open
|
|
926
|
+
);
|
|
927
|
+
if (!ctx || !open || !trigger) return null;
|
|
928
|
+
return /* @__PURE__ */ React10__namespace.createElement(Portal, null, /* @__PURE__ */ React10__namespace.createElement(
|
|
929
|
+
"div",
|
|
930
|
+
{
|
|
931
|
+
ref: mergeRefs(ctx.contentRef, ref),
|
|
932
|
+
className: chunkZWQJSZEY_js.cn(
|
|
933
|
+
"relative z-50 max-h-80 overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
934
|
+
className
|
|
935
|
+
),
|
|
936
|
+
style: {
|
|
937
|
+
position: "fixed",
|
|
938
|
+
top: pos.top,
|
|
939
|
+
left: pos.left,
|
|
940
|
+
minWidth: Math.max(pos.width, 128),
|
|
941
|
+
...style
|
|
942
|
+
},
|
|
943
|
+
...props
|
|
944
|
+
},
|
|
945
|
+
/* @__PURE__ */ React10__namespace.createElement("div", { className: "p-1" }, children)
|
|
946
|
+
));
|
|
947
|
+
});
|
|
948
|
+
SelectContent.displayName = "SelectContent";
|
|
949
|
+
var SelectLabel = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
950
|
+
"div",
|
|
951
|
+
{
|
|
952
|
+
ref,
|
|
953
|
+
className: chunkZWQJSZEY_js.cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
954
|
+
...props
|
|
955
|
+
}
|
|
956
|
+
));
|
|
957
|
+
SelectLabel.displayName = "SelectLabel";
|
|
958
|
+
var SelectItem = React10__namespace.forwardRef(
|
|
959
|
+
({ className, children, value, onClick, ...props }, ref) => {
|
|
960
|
+
const ctx = React10__namespace.useContext(SelectContext);
|
|
961
|
+
React10__namespace.useEffect(() => {
|
|
962
|
+
if (!ctx) return;
|
|
963
|
+
ctx.itemsRef.current.set(value, children);
|
|
964
|
+
return () => {
|
|
965
|
+
ctx.itemsRef.current.delete(value);
|
|
966
|
+
};
|
|
967
|
+
}, [ctx, value, children]);
|
|
968
|
+
if (!ctx) return null;
|
|
969
|
+
const selected = ctx.value === value;
|
|
970
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
971
|
+
"button",
|
|
972
|
+
{
|
|
973
|
+
ref,
|
|
974
|
+
type: "button",
|
|
975
|
+
className: chunkZWQJSZEY_js.cn(
|
|
976
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50",
|
|
977
|
+
className
|
|
978
|
+
),
|
|
979
|
+
onClick: (e) => {
|
|
980
|
+
ctx.setValue(value);
|
|
981
|
+
onClick?.(e);
|
|
982
|
+
},
|
|
983
|
+
...props
|
|
984
|
+
},
|
|
985
|
+
/* @__PURE__ */ React10__namespace.createElement("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center" }, selected ? /* @__PURE__ */ React10__namespace.createElement(lucideReact.Check, { className: "h-4 w-4" }) : null),
|
|
986
|
+
/* @__PURE__ */ React10__namespace.createElement("span", null, children)
|
|
987
|
+
);
|
|
988
|
+
}
|
|
989
|
+
);
|
|
990
|
+
SelectItem.displayName = "SelectItem";
|
|
991
|
+
var SelectSeparator = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
992
|
+
"div",
|
|
993
|
+
{
|
|
994
|
+
ref,
|
|
995
|
+
className: chunkZWQJSZEY_js.cn("-mx-1 my-1 h-px bg-muted", className),
|
|
996
|
+
...props
|
|
997
|
+
}
|
|
998
|
+
));
|
|
999
|
+
SelectSeparator.displayName = "SelectSeparator";
|
|
1000
|
+
var Separator = React10__namespace.forwardRef(
|
|
1001
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
1002
|
+
"div",
|
|
1003
|
+
{
|
|
1004
|
+
ref,
|
|
1005
|
+
role: decorative ? void 0 : "separator",
|
|
1006
|
+
"aria-orientation": orientation,
|
|
1007
|
+
className: chunkZWQJSZEY_js.cn(
|
|
1008
|
+
"shrink-0 bg-border",
|
|
1009
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
1010
|
+
className
|
|
1011
|
+
),
|
|
1012
|
+
...props
|
|
1013
|
+
}
|
|
1014
|
+
)
|
|
1015
|
+
);
|
|
1016
|
+
Separator.displayName = "Separator";
|
|
1017
|
+
var sheetVariants = classVarianceAuthority.cva(
|
|
1018
|
+
"fixed z-[10000] gap-4 bg-background p-6 shadow-lg transition ease-in-out translate-x-0 translate-y-0",
|
|
1019
|
+
{
|
|
1020
|
+
variants: {
|
|
1021
|
+
side: {
|
|
1022
|
+
top: "inset-x-0 top-0 left-0 border-b",
|
|
1023
|
+
bottom: "inset-x-0 bottom-0 left-0 border-t",
|
|
1024
|
+
left: "inset-y-0 left-0 top-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
1025
|
+
right: "inset-y-0 right-0 top-0 h-full w-3/4 border-l sm:max-w-sm"
|
|
1026
|
+
}
|
|
1027
|
+
},
|
|
1028
|
+
defaultVariants: {
|
|
1029
|
+
side: "right"
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
);
|
|
1033
|
+
var SheetContent = React10__namespace.forwardRef(
|
|
1034
|
+
({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
1035
|
+
DialogContent,
|
|
1036
|
+
{
|
|
1037
|
+
ref,
|
|
1038
|
+
className: chunkZWQJSZEY_js.cn(
|
|
1039
|
+
"max-w-none rounded-none",
|
|
1040
|
+
sheetVariants({ side }),
|
|
1041
|
+
className
|
|
1042
|
+
),
|
|
1043
|
+
showCloseButton: false,
|
|
1044
|
+
...props
|
|
1045
|
+
},
|
|
1046
|
+
/* @__PURE__ */ React10__namespace.createElement(DialogClose, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100" }, /* @__PURE__ */ React10__namespace.createElement(lucideReact.X, { className: "h-4 w-4" }), /* @__PURE__ */ React10__namespace.createElement("span", { className: "sr-only" }, "Close")),
|
|
1047
|
+
children
|
|
1048
|
+
)
|
|
1049
|
+
);
|
|
1050
|
+
SheetContent.displayName = "SheetContent";
|
|
1051
|
+
var SheetHeader = ({
|
|
1052
|
+
className,
|
|
1053
|
+
...props
|
|
1054
|
+
}) => /* @__PURE__ */ React10__namespace.createElement(
|
|
1055
|
+
"div",
|
|
1056
|
+
{
|
|
1057
|
+
className: chunkZWQJSZEY_js.cn(
|
|
1058
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
1059
|
+
className
|
|
1060
|
+
),
|
|
1061
|
+
...props
|
|
1062
|
+
}
|
|
1063
|
+
);
|
|
1064
|
+
SheetHeader.displayName = "SheetHeader";
|
|
1065
|
+
var SheetFooter = ({
|
|
1066
|
+
className,
|
|
1067
|
+
...props
|
|
1068
|
+
}) => /* @__PURE__ */ React10__namespace.createElement(
|
|
1069
|
+
"div",
|
|
1070
|
+
{
|
|
1071
|
+
className: chunkZWQJSZEY_js.cn(
|
|
1072
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
1073
|
+
className
|
|
1074
|
+
),
|
|
1075
|
+
...props
|
|
1076
|
+
}
|
|
1077
|
+
);
|
|
1078
|
+
SheetFooter.displayName = "SheetFooter";
|
|
1079
|
+
var SheetTitle = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
1080
|
+
"h2",
|
|
1081
|
+
{
|
|
1082
|
+
ref,
|
|
1083
|
+
className: chunkZWQJSZEY_js.cn("text-lg font-semibold text-foreground", className),
|
|
1084
|
+
...props
|
|
1085
|
+
}
|
|
1086
|
+
));
|
|
1087
|
+
SheetTitle.displayName = "SheetTitle";
|
|
1088
|
+
var SheetDescription = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React10__namespace.createElement(
|
|
1089
|
+
"p",
|
|
1090
|
+
{
|
|
1091
|
+
ref,
|
|
1092
|
+
className: chunkZWQJSZEY_js.cn("text-sm text-muted-foreground", className),
|
|
1093
|
+
...props
|
|
1094
|
+
}
|
|
1095
|
+
));
|
|
1096
|
+
SheetDescription.displayName = "SheetDescription";
|
|
1097
|
+
var Textarea = React10__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1098
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
1099
|
+
"textarea",
|
|
1100
|
+
{
|
|
1101
|
+
className: chunkZWQJSZEY_js.cn(
|
|
1102
|
+
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1103
|
+
className
|
|
1104
|
+
),
|
|
1105
|
+
ref,
|
|
1106
|
+
...props
|
|
1107
|
+
}
|
|
1108
|
+
);
|
|
1109
|
+
});
|
|
1110
|
+
Textarea.displayName = "Textarea";
|
|
1111
|
+
var TooltipConfigContext = React10__namespace.createContext({
|
|
1112
|
+
delayDuration: 200
|
|
1113
|
+
});
|
|
1114
|
+
var TooltipContext = React10__namespace.createContext(null);
|
|
1115
|
+
var TooltipProvider = ({
|
|
1116
|
+
children,
|
|
1117
|
+
delayDuration = 200
|
|
1118
|
+
}) => {
|
|
1119
|
+
return /* @__PURE__ */ React10__namespace.createElement(TooltipConfigContext.Provider, { value: { delayDuration } }, children);
|
|
1120
|
+
};
|
|
1121
|
+
var Tooltip = ({ children }) => {
|
|
1122
|
+
const [open, setOpen] = React10__namespace.useState(false);
|
|
1123
|
+
const triggerRef = React10__namespace.useRef(null);
|
|
1124
|
+
return /* @__PURE__ */ React10__namespace.createElement(TooltipContext.Provider, { value: { open, setOpen, triggerRef } }, children);
|
|
1125
|
+
};
|
|
1126
|
+
var TooltipTrigger = React10__namespace.forwardRef(({ children, ...props }, ref) => {
|
|
1127
|
+
const ctx = React10__namespace.useContext(TooltipContext);
|
|
1128
|
+
const cfg = React10__namespace.useContext(TooltipConfigContext);
|
|
1129
|
+
const timer = React10__namespace.useRef(null);
|
|
1130
|
+
if (!ctx) return null;
|
|
1131
|
+
const setRef = mergeRefs(ctx.triggerRef, ref);
|
|
1132
|
+
const openWithDelay = () => {
|
|
1133
|
+
if (timer.current) clearTimeout(timer.current);
|
|
1134
|
+
timer.current = setTimeout(() => ctx.setOpen(true), cfg.delayDuration);
|
|
1135
|
+
};
|
|
1136
|
+
const closeNow = () => {
|
|
1137
|
+
if (timer.current) clearTimeout(timer.current);
|
|
1138
|
+
ctx.setOpen(false);
|
|
1139
|
+
};
|
|
1140
|
+
const shared = {
|
|
1141
|
+
onMouseEnter: openWithDelay,
|
|
1142
|
+
onMouseLeave: closeNow,
|
|
1143
|
+
onFocus: openWithDelay,
|
|
1144
|
+
onBlur: closeNow,
|
|
1145
|
+
...props
|
|
1146
|
+
};
|
|
1147
|
+
return /* @__PURE__ */ React10__namespace.createElement("span", { ref: setRef, ...shared }, children);
|
|
1148
|
+
});
|
|
1149
|
+
TooltipTrigger.displayName = "TooltipTrigger";
|
|
1150
|
+
var TooltipContent = React10__namespace.forwardRef(({ className, sideOffset = 4, style, ...props }, ref) => {
|
|
1151
|
+
const ctx = React10__namespace.useContext(TooltipContext);
|
|
1152
|
+
const [pos, setPos] = React10__namespace.useState({ top: 0, left: 0 });
|
|
1153
|
+
const open = !!ctx?.open;
|
|
1154
|
+
const trigger = ctx?.triggerRef.current ?? null;
|
|
1155
|
+
React10__namespace.useLayoutEffect(() => {
|
|
1156
|
+
if (!trigger) return;
|
|
1157
|
+
const rect = trigger.getBoundingClientRect();
|
|
1158
|
+
setPos({
|
|
1159
|
+
top: rect.top - sideOffset,
|
|
1160
|
+
left: rect.left + rect.width / 2
|
|
1161
|
+
});
|
|
1162
|
+
}, [trigger, sideOffset]);
|
|
1163
|
+
if (!ctx || !open || !trigger) return null;
|
|
1164
|
+
return /* @__PURE__ */ React10__namespace.createElement(Portal, null, /* @__PURE__ */ React10__namespace.createElement(
|
|
1165
|
+
"div",
|
|
1166
|
+
{
|
|
1167
|
+
ref,
|
|
1168
|
+
className: chunkZWQJSZEY_js.cn(
|
|
1169
|
+
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground",
|
|
1170
|
+
className
|
|
1171
|
+
),
|
|
1172
|
+
style: {
|
|
1173
|
+
position: "fixed",
|
|
1174
|
+
top: pos.top,
|
|
1175
|
+
left: pos.left,
|
|
1176
|
+
transform: "translate(-50%, -100%)",
|
|
1177
|
+
...style
|
|
1178
|
+
},
|
|
1179
|
+
...props
|
|
1180
|
+
}
|
|
1181
|
+
));
|
|
1182
|
+
});
|
|
1183
|
+
TooltipContent.displayName = "TooltipContent";
|
|
1184
|
+
var AvatarContext = React10__namespace.createContext(null);
|
|
1185
|
+
var Avatar = React10__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1186
|
+
const [status, setStatus] = React10__namespace.useState("idle");
|
|
1187
|
+
return /* @__PURE__ */ React10__namespace.createElement(AvatarContext.Provider, { value: { status, setStatus } }, /* @__PURE__ */ React10__namespace.createElement(
|
|
1188
|
+
"span",
|
|
1189
|
+
{
|
|
1190
|
+
ref,
|
|
1191
|
+
className: chunkZWQJSZEY_js.cn(
|
|
1192
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
1193
|
+
className
|
|
1194
|
+
),
|
|
1195
|
+
...props
|
|
1196
|
+
}
|
|
1197
|
+
));
|
|
1198
|
+
});
|
|
1199
|
+
Avatar.displayName = "Avatar";
|
|
1200
|
+
var AvatarImage = React10__namespace.forwardRef(({ className, onLoad, onError, ...props }, ref) => {
|
|
1201
|
+
const ctx = React10__namespace.useContext(AvatarContext);
|
|
1202
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
1203
|
+
"img",
|
|
1204
|
+
{
|
|
1205
|
+
ref,
|
|
1206
|
+
className: chunkZWQJSZEY_js.cn(
|
|
1207
|
+
"aspect-square h-full w-full",
|
|
1208
|
+
ctx?.status === "error" ? "hidden" : void 0,
|
|
1209
|
+
className
|
|
1210
|
+
),
|
|
1211
|
+
onLoad: (e) => {
|
|
1212
|
+
ctx?.setStatus("loaded");
|
|
1213
|
+
onLoad?.(e);
|
|
1214
|
+
},
|
|
1215
|
+
onError: (e) => {
|
|
1216
|
+
ctx?.setStatus("error");
|
|
1217
|
+
onError?.(e);
|
|
1218
|
+
},
|
|
1219
|
+
...props
|
|
1220
|
+
}
|
|
1221
|
+
);
|
|
1222
|
+
});
|
|
1223
|
+
AvatarImage.displayName = "AvatarImage";
|
|
1224
|
+
var AvatarFallback = React10__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1225
|
+
const ctx = React10__namespace.useContext(AvatarContext);
|
|
1226
|
+
const show = ctx?.status !== "loaded";
|
|
1227
|
+
if (!show) return null;
|
|
1228
|
+
return /* @__PURE__ */ React10__namespace.createElement(
|
|
1229
|
+
"span",
|
|
1230
|
+
{
|
|
1231
|
+
ref,
|
|
1232
|
+
className: chunkZWQJSZEY_js.cn(
|
|
1233
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
1234
|
+
className
|
|
1235
|
+
),
|
|
1236
|
+
...props
|
|
1237
|
+
}
|
|
1238
|
+
);
|
|
1239
|
+
});
|
|
1240
|
+
AvatarFallback.displayName = "AvatarFallback";
|
|
1241
|
+
function buildGridColsClasses(columns) {
|
|
1242
|
+
return [
|
|
1243
|
+
"grid-cols-1",
|
|
1244
|
+
// 默认单列
|
|
1245
|
+
columns.sm ? "sm:grid-cols-" + columns.sm : "",
|
|
1246
|
+
columns.md ? "md:grid-cols-" + columns.md : "md:grid-cols-2",
|
|
1247
|
+
columns.lg ? "lg:grid-cols-" + columns.lg : "lg:grid-cols-3",
|
|
1248
|
+
columns.xl ? "xl:grid-cols-" + columns.xl : ""
|
|
1249
|
+
].filter(Boolean).join(" ");
|
|
1250
|
+
}
|
|
1251
|
+
function getGapClassName(gap) {
|
|
1252
|
+
const gapClasses = {
|
|
1253
|
+
sm: "gap-3",
|
|
1254
|
+
md: "gap-6",
|
|
1255
|
+
lg: "gap-8",
|
|
1256
|
+
xl: "gap-10"
|
|
1257
|
+
};
|
|
1258
|
+
return gapClasses[gap];
|
|
1259
|
+
}
|
|
1260
|
+
function Grid({
|
|
1261
|
+
items,
|
|
1262
|
+
renderItem,
|
|
1263
|
+
columns = { md: 2, lg: 3 },
|
|
1264
|
+
gap = "md",
|
|
1265
|
+
className = "",
|
|
1266
|
+
style
|
|
1267
|
+
}) {
|
|
1268
|
+
const gridColsClasses = buildGridColsClasses(columns);
|
|
1269
|
+
const gapClass = getGapClassName(gap);
|
|
1270
|
+
return /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1271
|
+
"div",
|
|
1272
|
+
{
|
|
1273
|
+
className: clsx.clsx("grid", gridColsClasses, gapClass, className),
|
|
1274
|
+
style
|
|
1275
|
+
},
|
|
1276
|
+
items.map((item, index) => /* @__PURE__ */ React10__namespace.default.createElement("div", { key: item.id }, renderItem(item, index)))
|
|
1277
|
+
);
|
|
1278
|
+
}
|
|
1279
|
+
var SearchBox = ({
|
|
1280
|
+
searchQuery,
|
|
1281
|
+
onSearchChange,
|
|
1282
|
+
placeholder = "\u641C\u7D22\u5B9E\u9A8C\u9879\u76EE\u7684\u6807\u9898\u3001\u63CF\u8FF0\u6216\u6807\u7B7E...",
|
|
1283
|
+
size = "large"
|
|
1284
|
+
}) => {
|
|
1285
|
+
const getSizeStyles = () => {
|
|
1286
|
+
switch (size) {
|
|
1287
|
+
case "small":
|
|
1288
|
+
return {
|
|
1289
|
+
container: "h-10",
|
|
1290
|
+
input: "pl-10 pr-10 text-sm",
|
|
1291
|
+
icon: "w-4 h-4",
|
|
1292
|
+
iconPosition: "left-3",
|
|
1293
|
+
clearButton: "right-2 w-6 h-6",
|
|
1294
|
+
clearIcon: "w-3 h-3"
|
|
1295
|
+
};
|
|
1296
|
+
case "medium":
|
|
1297
|
+
return {
|
|
1298
|
+
container: "h-12",
|
|
1299
|
+
input: "pl-12 pr-12 text-base",
|
|
1300
|
+
icon: "w-5 h-5",
|
|
1301
|
+
iconPosition: "left-3",
|
|
1302
|
+
clearButton: "right-3 w-7 h-7",
|
|
1303
|
+
clearIcon: "w-4 h-4"
|
|
1304
|
+
};
|
|
1305
|
+
case "large":
|
|
1306
|
+
default:
|
|
1307
|
+
return {
|
|
1308
|
+
container: "h-16",
|
|
1309
|
+
input: "pl-6 pr-16 text-lg",
|
|
1310
|
+
icon: "w-6 h-6",
|
|
1311
|
+
iconPosition: "left-6",
|
|
1312
|
+
clearButton: "right-4 w-8 h-8",
|
|
1313
|
+
clearIcon: "w-4 h-4"
|
|
1314
|
+
};
|
|
1315
|
+
}
|
|
1316
|
+
};
|
|
1317
|
+
const styles = getSizeStyles();
|
|
1318
|
+
const isLarge = size === "large";
|
|
1319
|
+
return /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "relative group w-full" }, /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1320
|
+
"input",
|
|
1321
|
+
{
|
|
1322
|
+
type: "text",
|
|
1323
|
+
placeholder,
|
|
1324
|
+
value: searchQuery,
|
|
1325
|
+
onChange: (e) => onSearchChange(e.target.value),
|
|
1326
|
+
className: clsx.clsx(
|
|
1327
|
+
"w-full",
|
|
1328
|
+
styles.container,
|
|
1329
|
+
styles.input,
|
|
1330
|
+
isLarge ? "border-2 border-gray-200 rounded-2xl shadow-lg" : "border border-gray-300 rounded-lg shadow-sm",
|
|
1331
|
+
"bg-white focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 hover:border-gray-400",
|
|
1332
|
+
isLarge ? "hover:shadow-xl" : "hover:shadow-md",
|
|
1333
|
+
"transition-all duration-300 ease-out text-gray-800 placeholder-gray-500",
|
|
1334
|
+
isLarge ? "font-medium" : "font-normal"
|
|
1335
|
+
)
|
|
1336
|
+
}
|
|
1337
|
+
), searchQuery && /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1338
|
+
"button",
|
|
1339
|
+
{
|
|
1340
|
+
onClick: () => onSearchChange(""),
|
|
1341
|
+
className: clsx.clsx(
|
|
1342
|
+
"absolute top-1/2",
|
|
1343
|
+
styles.clearButton,
|
|
1344
|
+
"transform -translate-y-1/2 z-10 group/clear"
|
|
1345
|
+
)
|
|
1346
|
+
},
|
|
1347
|
+
/* @__PURE__ */ React10__namespace.default.createElement("div", { className: clsx.clsx(
|
|
1348
|
+
styles.clearButton,
|
|
1349
|
+
"flex items-center justify-center rounded-full bg-gray-100 hover:bg-gray-200 transition-all duration-200 group-hover/clear:scale-105"
|
|
1350
|
+
) }, /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1351
|
+
"svg",
|
|
1352
|
+
{
|
|
1353
|
+
className: clsx.clsx(styles.clearIcon, "text-gray-500 group-hover/clear:text-gray-700"),
|
|
1354
|
+
fill: "none",
|
|
1355
|
+
stroke: "currentColor",
|
|
1356
|
+
viewBox: "0 0 24 24"
|
|
1357
|
+
},
|
|
1358
|
+
/* @__PURE__ */ React10__namespace.default.createElement(
|
|
1359
|
+
"path",
|
|
1360
|
+
{
|
|
1361
|
+
strokeLinecap: "round",
|
|
1362
|
+
strokeLinejoin: "round",
|
|
1363
|
+
strokeWidth: 2,
|
|
1364
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
1365
|
+
}
|
|
1366
|
+
)
|
|
1367
|
+
))
|
|
1368
|
+
));
|
|
1369
|
+
};
|
|
1370
|
+
var Timeline = ({ items = [] }) => {
|
|
1371
|
+
if (!items || items.length === 0) {
|
|
1372
|
+
return null;
|
|
1373
|
+
}
|
|
1374
|
+
return /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "relative" }, /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "absolute left-4 top-0 bottom-0 w-0.5 bg-gray-200" }), items.map((item, index) => /* @__PURE__ */ React10__namespace.default.createElement("div", { key: index, className: "relative pl-12 pb-8" }, /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "absolute left-0 w-8 h-8 rounded-full bg-blue-500 border-4 border-white shadow-md flex items-center justify-center" }, /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "w-2 h-2 rounded-full bg-white" })), /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "bg-white rounded-lg p-4 shadow-md" }, /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "text-sm text-gray-500 mb-2" }, item.date), /* @__PURE__ */ React10__namespace.default.createElement("h4", { className: "text-lg font-semibold mb-2" }, item.title), /* @__PURE__ */ React10__namespace.default.createElement("p", { className: "text-gray-600" }, item.description)))));
|
|
1375
|
+
};
|
|
1376
|
+
var CollisionBalls = ({
|
|
1377
|
+
collisionBallsConfig: {
|
|
1378
|
+
balls,
|
|
1379
|
+
width,
|
|
1380
|
+
height
|
|
1381
|
+
}
|
|
1382
|
+
}) => {
|
|
1383
|
+
const canvasRef = React10.useRef(null);
|
|
1384
|
+
const containerRef = React10.useRef(null);
|
|
1385
|
+
const ballsRef = React10.useRef([]);
|
|
1386
|
+
const [isShaking, setIsShaking] = React10.useState(false);
|
|
1387
|
+
const [draggedBall, setDraggedBall] = React10.useState(null);
|
|
1388
|
+
const [mousePos, setMousePos] = React10.useState({ x: 0, y: 0 });
|
|
1389
|
+
const animationRef = React10.useRef(null);
|
|
1390
|
+
const updateCanvasSize = () => {
|
|
1391
|
+
const container = containerRef.current;
|
|
1392
|
+
const canvas = canvasRef.current;
|
|
1393
|
+
if (!container || !canvas) {
|
|
1394
|
+
console.error("Container or canvas not found");
|
|
1395
|
+
return;
|
|
1396
|
+
}
|
|
1397
|
+
const containerWidth = container.clientWidth;
|
|
1398
|
+
const containerHeight = container.clientHeight;
|
|
1399
|
+
console.log("Container size:", { containerWidth, containerHeight });
|
|
1400
|
+
canvas.width = containerWidth;
|
|
1401
|
+
canvas.height = containerHeight;
|
|
1402
|
+
canvas.style.width = containerWidth + "px";
|
|
1403
|
+
canvas.style.height = containerHeight + "px";
|
|
1404
|
+
console.log("Canvas size updated:", {
|
|
1405
|
+
width: canvas.width,
|
|
1406
|
+
height: canvas.height,
|
|
1407
|
+
containerWidth,
|
|
1408
|
+
containerHeight
|
|
1409
|
+
});
|
|
1410
|
+
};
|
|
1411
|
+
const initBalls = () => {
|
|
1412
|
+
const canvas = canvasRef.current;
|
|
1413
|
+
if (!canvas) {
|
|
1414
|
+
console.error("Canvas not found during ball initialization");
|
|
1415
|
+
return [];
|
|
1416
|
+
}
|
|
1417
|
+
console.log("Initializing balls with canvas size:", {
|
|
1418
|
+
width: canvas.width,
|
|
1419
|
+
height: canvas.height
|
|
1420
|
+
});
|
|
1421
|
+
return balls.map((ballConfig) => ({
|
|
1422
|
+
x: Math.random() * (canvas.width - 100) + 50,
|
|
1423
|
+
y: Math.random() * (canvas.height - 100) + 50,
|
|
1424
|
+
vx: (Math.random() - 0.5) * 4,
|
|
1425
|
+
vy: (Math.random() - 0.5) * 4,
|
|
1426
|
+
radius: ballConfig.size,
|
|
1427
|
+
color: ballConfig.color,
|
|
1428
|
+
text: ballConfig.label,
|
|
1429
|
+
isDragging: false
|
|
1430
|
+
}));
|
|
1431
|
+
};
|
|
1432
|
+
React10.useEffect(() => {
|
|
1433
|
+
const handleResize = () => {
|
|
1434
|
+
console.log("Window resized");
|
|
1435
|
+
updateCanvasSize();
|
|
1436
|
+
};
|
|
1437
|
+
if (typeof window !== "undefined") {
|
|
1438
|
+
window.addEventListener("resize", handleResize);
|
|
1439
|
+
updateCanvasSize();
|
|
1440
|
+
}
|
|
1441
|
+
return () => {
|
|
1442
|
+
if (typeof window !== "undefined") {
|
|
1443
|
+
window.removeEventListener("resize", handleResize);
|
|
1444
|
+
}
|
|
1445
|
+
};
|
|
1446
|
+
}, []);
|
|
1447
|
+
React10.useEffect(() => {
|
|
1448
|
+
const canvas = canvasRef.current;
|
|
1449
|
+
if (!canvas) {
|
|
1450
|
+
console.error("Canvas element not found");
|
|
1451
|
+
return;
|
|
1452
|
+
}
|
|
1453
|
+
const ctx = canvas.getContext("2d");
|
|
1454
|
+
if (!ctx) {
|
|
1455
|
+
console.error("Failed to get canvas context");
|
|
1456
|
+
return;
|
|
1457
|
+
}
|
|
1458
|
+
console.log("Starting animation setup...");
|
|
1459
|
+
updateCanvasSize();
|
|
1460
|
+
ballsRef.current = initBalls();
|
|
1461
|
+
console.log("Balls initialized:", ballsRef.current);
|
|
1462
|
+
let lastTime = performance.now();
|
|
1463
|
+
let frameCount = 0;
|
|
1464
|
+
const animate = (currentTime) => {
|
|
1465
|
+
try {
|
|
1466
|
+
frameCount++;
|
|
1467
|
+
if (currentTime - lastTime >= 1e3) {
|
|
1468
|
+
console.log("FPS: " + frameCount);
|
|
1469
|
+
frameCount = 0;
|
|
1470
|
+
lastTime = currentTime;
|
|
1471
|
+
}
|
|
1472
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
1473
|
+
ballsRef.current.forEach((ball) => {
|
|
1474
|
+
if (!ball.isDragging) {
|
|
1475
|
+
updatePosition(ball, canvas.width, canvas.height);
|
|
1476
|
+
}
|
|
1477
|
+
for (let i = 0; i < ballsRef.current.length; i++) {
|
|
1478
|
+
for (let j = i + 1; j < ballsRef.current.length; j++) {
|
|
1479
|
+
const ball1 = ballsRef.current[i];
|
|
1480
|
+
const ball2 = ballsRef.current[j];
|
|
1481
|
+
if (ball1 && ball2) {
|
|
1482
|
+
checkCollision(ball1, ball2);
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
draw(ctx, ball);
|
|
1487
|
+
});
|
|
1488
|
+
animationRef.current = requestAnimationFrame(animate);
|
|
1489
|
+
} catch (error) {
|
|
1490
|
+
console.error("Animation error:", error);
|
|
1491
|
+
}
|
|
1492
|
+
};
|
|
1493
|
+
console.log("Starting animation loop...");
|
|
1494
|
+
animationRef.current = requestAnimationFrame(animate);
|
|
1495
|
+
return () => {
|
|
1496
|
+
console.log("Cleaning up animation...");
|
|
1497
|
+
if (animationRef.current) {
|
|
1498
|
+
cancelAnimationFrame(animationRef.current);
|
|
1499
|
+
animationRef.current = null;
|
|
1500
|
+
}
|
|
1501
|
+
};
|
|
1502
|
+
}, []);
|
|
1503
|
+
const shake = () => {
|
|
1504
|
+
setIsShaking(true);
|
|
1505
|
+
ballsRef.current.forEach((ball) => {
|
|
1506
|
+
ball.vx = (Math.random() - 0.5) * 10;
|
|
1507
|
+
ball.vy = (Math.random() - 0.5) * 10;
|
|
1508
|
+
});
|
|
1509
|
+
setTimeout(() => setIsShaking(false), 200);
|
|
1510
|
+
};
|
|
1511
|
+
const slowdown = () => {
|
|
1512
|
+
setIsShaking(true);
|
|
1513
|
+
ballsRef.current.forEach((ball) => {
|
|
1514
|
+
ball.vx = ball.vx * 0.5;
|
|
1515
|
+
ball.vy = ball.vy * 0.5;
|
|
1516
|
+
});
|
|
1517
|
+
setTimeout(() => setIsShaking(false), 200);
|
|
1518
|
+
};
|
|
1519
|
+
const checkCollision = (ball1, ball2) => {
|
|
1520
|
+
const dx = ball2.x - ball1.x;
|
|
1521
|
+
const dy = ball2.y - ball1.y;
|
|
1522
|
+
const distance = Math.sqrt(dx * dx + dy * dy);
|
|
1523
|
+
if (distance < ball1.radius + ball2.radius) {
|
|
1524
|
+
const angle = Math.atan2(dy, dx);
|
|
1525
|
+
const overlap = (ball1.radius + ball2.radius - distance) / 2;
|
|
1526
|
+
if (ball1.isDragging || ball2.isDragging) {
|
|
1527
|
+
const draggedBall2 = ball1.isDragging ? ball1 : ball2;
|
|
1528
|
+
const otherBall = ball1.isDragging ? ball2 : ball1;
|
|
1529
|
+
otherBall.x += (draggedBall2 === ball1 ? 1 : -1) * overlap * Math.cos(angle);
|
|
1530
|
+
otherBall.y += (draggedBall2 === ball1 ? 1 : -1) * overlap * Math.sin(angle);
|
|
1531
|
+
const pushForce = 2;
|
|
1532
|
+
otherBall.vx = (draggedBall2 === ball1 ? -1 : 1) * Math.cos(angle) * pushForce;
|
|
1533
|
+
otherBall.vy = (draggedBall2 === ball1 ? -1 : 1) * Math.sin(angle) * pushForce;
|
|
1534
|
+
return;
|
|
1535
|
+
}
|
|
1536
|
+
const sin = Math.sin(angle);
|
|
1537
|
+
const cos = Math.cos(angle);
|
|
1538
|
+
const vx1 = ball1.vx * cos + ball1.vy * sin;
|
|
1539
|
+
const vy1 = ball1.vy * cos - ball1.vx * sin;
|
|
1540
|
+
const vx2 = ball2.vx * cos + ball2.vy * sin;
|
|
1541
|
+
const vy2 = ball2.vy * cos - ball2.vx * sin;
|
|
1542
|
+
const newVx1 = vx2;
|
|
1543
|
+
const newVx2 = vx1;
|
|
1544
|
+
ball1.vx = newVx1 * cos - vy1 * sin;
|
|
1545
|
+
ball1.vy = vy1 * cos + newVx1 * sin;
|
|
1546
|
+
ball2.vx = newVx2 * cos - vy2 * sin;
|
|
1547
|
+
ball2.vy = vy2 * cos + newVx2 * sin;
|
|
1548
|
+
ball1.x -= overlap * Math.cos(angle);
|
|
1549
|
+
ball1.y -= overlap * Math.sin(angle);
|
|
1550
|
+
ball2.x += overlap * Math.cos(angle);
|
|
1551
|
+
ball2.y += overlap * Math.sin(angle);
|
|
1552
|
+
}
|
|
1553
|
+
};
|
|
1554
|
+
const updatePosition = (ball, width2, height2) => {
|
|
1555
|
+
const handleBoundaryCollision = (velocity, position, boundary, radius) => {
|
|
1556
|
+
let newVelocity = velocity;
|
|
1557
|
+
let newPosition = position;
|
|
1558
|
+
if (position - radius < 0) {
|
|
1559
|
+
newPosition = radius;
|
|
1560
|
+
newVelocity = Math.abs(velocity);
|
|
1561
|
+
} else if (position + radius > boundary) {
|
|
1562
|
+
newPosition = boundary - radius;
|
|
1563
|
+
newVelocity = -Math.abs(velocity);
|
|
1564
|
+
}
|
|
1565
|
+
return [newVelocity, newPosition];
|
|
1566
|
+
};
|
|
1567
|
+
const [newVx, newX] = handleBoundaryCollision(
|
|
1568
|
+
ball.vx,
|
|
1569
|
+
ball.x,
|
|
1570
|
+
width2,
|
|
1571
|
+
ball.radius
|
|
1572
|
+
);
|
|
1573
|
+
const [newVy, newY] = handleBoundaryCollision(
|
|
1574
|
+
ball.vy,
|
|
1575
|
+
ball.y,
|
|
1576
|
+
height2,
|
|
1577
|
+
ball.radius
|
|
1578
|
+
);
|
|
1579
|
+
ball.vx = newVx;
|
|
1580
|
+
ball.vy = newVy;
|
|
1581
|
+
ball.x = newX;
|
|
1582
|
+
ball.y = newY;
|
|
1583
|
+
};
|
|
1584
|
+
const draw = (ctx, ball) => {
|
|
1585
|
+
ctx.beginPath();
|
|
1586
|
+
ctx.arc(ball.x, ball.y, ball.radius, 0, Math.PI * 2);
|
|
1587
|
+
ctx.fillStyle = ball.color;
|
|
1588
|
+
ctx.fill();
|
|
1589
|
+
ctx.closePath();
|
|
1590
|
+
if (ball.text) {
|
|
1591
|
+
ctx.font = "14px Arial";
|
|
1592
|
+
ctx.fillStyle = "#fff";
|
|
1593
|
+
ctx.textAlign = "center";
|
|
1594
|
+
ctx.textBaseline = "middle";
|
|
1595
|
+
ctx.fillText(ball.text, ball.x, ball.y);
|
|
1596
|
+
}
|
|
1597
|
+
};
|
|
1598
|
+
const handleMouseDown = (event) => {
|
|
1599
|
+
const mousePos2 = getMousePos(event);
|
|
1600
|
+
const ball = ballsRef.current.find((b) => {
|
|
1601
|
+
const dx = b.x - mousePos2.x;
|
|
1602
|
+
const dy = b.y - mousePos2.y;
|
|
1603
|
+
return Math.sqrt(dx * dx + dy * dy) < b.radius;
|
|
1604
|
+
});
|
|
1605
|
+
if (ball) {
|
|
1606
|
+
ball.isDragging = true;
|
|
1607
|
+
setDraggedBall(ball);
|
|
1608
|
+
}
|
|
1609
|
+
};
|
|
1610
|
+
const handleMouseMove = (event) => {
|
|
1611
|
+
const mousePos2 = getMousePos(event);
|
|
1612
|
+
setMousePos(mousePos2);
|
|
1613
|
+
if (draggedBall) {
|
|
1614
|
+
draggedBall.x = mousePos2.x;
|
|
1615
|
+
draggedBall.y = mousePos2.y;
|
|
1616
|
+
draggedBall.vx = 0;
|
|
1617
|
+
draggedBall.vy = 0;
|
|
1618
|
+
}
|
|
1619
|
+
};
|
|
1620
|
+
const handleMouseUp = () => {
|
|
1621
|
+
if (draggedBall) {
|
|
1622
|
+
draggedBall.isDragging = false;
|
|
1623
|
+
setDraggedBall(null);
|
|
1624
|
+
}
|
|
1625
|
+
};
|
|
1626
|
+
const getMousePos = (event) => {
|
|
1627
|
+
const canvas = canvasRef.current;
|
|
1628
|
+
if (!canvas) return { x: 0, y: 0 };
|
|
1629
|
+
const rect = canvas.getBoundingClientRect();
|
|
1630
|
+
const scaleX = canvas.width / rect.width;
|
|
1631
|
+
const scaleY = canvas.height / rect.height;
|
|
1632
|
+
return {
|
|
1633
|
+
x: (event.clientX - rect.left) * scaleX,
|
|
1634
|
+
y: (event.clientY - rect.top) * scaleY
|
|
1635
|
+
};
|
|
1636
|
+
};
|
|
1637
|
+
return /* @__PURE__ */ React10__namespace.default.createElement("div", { style: { width: "100%", height: "100%", position: "relative", backgroundColor: "#f9fafb", borderRadius: "0.5rem" } }, /* @__PURE__ */ React10__namespace.default.createElement("div", { ref: containerRef, style: { width: "100%", height: "100%", position: "absolute", top: 0, left: 0 } }, /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1638
|
+
"canvas",
|
|
1639
|
+
{
|
|
1640
|
+
ref: canvasRef,
|
|
1641
|
+
style: {
|
|
1642
|
+
width: "100%",
|
|
1643
|
+
height: "100%",
|
|
1644
|
+
display: "block"
|
|
1645
|
+
// 确保canvas正确显示
|
|
1646
|
+
},
|
|
1647
|
+
onMouseDown: handleMouseDown,
|
|
1648
|
+
onMouseMove: handleMouseMove,
|
|
1649
|
+
onMouseUp: handleMouseUp,
|
|
1650
|
+
onMouseLeave: handleMouseUp
|
|
1651
|
+
}
|
|
1652
|
+
)), /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "absolute bottom-4 right-4 flex gap-2" }, /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1653
|
+
"button",
|
|
1654
|
+
{
|
|
1655
|
+
onClick: shake,
|
|
1656
|
+
className: clsx.clsx("px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors", isShaking ? "animate-pulse" : "")
|
|
1657
|
+
},
|
|
1658
|
+
"\u6447\u4E00\u6447"
|
|
1659
|
+
), /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1660
|
+
"button",
|
|
1661
|
+
{
|
|
1662
|
+
onClick: slowdown,
|
|
1663
|
+
className: clsx.clsx("px-4 py-2 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors", isShaking ? "animate-pulse" : "")
|
|
1664
|
+
},
|
|
1665
|
+
"\u51CF\u901F"
|
|
1666
|
+
)));
|
|
1667
|
+
};
|
|
1668
|
+
function GenericOrderManager({
|
|
1669
|
+
operations,
|
|
1670
|
+
renderItem,
|
|
1671
|
+
className = "",
|
|
1672
|
+
title = "\u987A\u5E8F\u7BA1\u7406",
|
|
1673
|
+
description = "\u62D6\u62FD\u6216\u4F7F\u7528\u6309\u94AE\u8C03\u6574\u663E\u793A\u987A\u5E8F",
|
|
1674
|
+
onOrderChanged,
|
|
1675
|
+
emptyMessage = "\u6682\u65E0\u6570\u636E",
|
|
1676
|
+
loadingMessage = "\u52A0\u8F7D\u6570\u636E..."
|
|
1677
|
+
}) {
|
|
1678
|
+
const [items, setItems] = React10.useState([]);
|
|
1679
|
+
const [originalOrder, setOriginalOrder] = React10.useState([]);
|
|
1680
|
+
const [loading, setLoading] = React10.useState(true);
|
|
1681
|
+
const [saving, setSaving] = React10.useState(false);
|
|
1682
|
+
const [error, setError] = React10.useState(null);
|
|
1683
|
+
const [hasChanges, setHasChanges] = React10.useState(false);
|
|
1684
|
+
const [draggedItem, setDraggedItem] = React10.useState(null);
|
|
1685
|
+
const loadItems = React10.useCallback(async () => {
|
|
1686
|
+
try {
|
|
1687
|
+
setLoading(true);
|
|
1688
|
+
setError(null);
|
|
1689
|
+
const data = await operations.loadItems();
|
|
1690
|
+
setItems(data);
|
|
1691
|
+
setOriginalOrder([...data]);
|
|
1692
|
+
setHasChanges(false);
|
|
1693
|
+
} catch (err) {
|
|
1694
|
+
console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u52A0\u8F7D\u6570\u636E\u9519\u8BEF:", err);
|
|
1695
|
+
setError(err instanceof Error ? err.message : "\u52A0\u8F7D\u6570\u636E\u5931\u8D25");
|
|
1696
|
+
} finally {
|
|
1697
|
+
setLoading(false);
|
|
1698
|
+
}
|
|
1699
|
+
}, [operations]);
|
|
1700
|
+
React10.useEffect(() => {
|
|
1701
|
+
loadItems();
|
|
1702
|
+
}, [loadItems]);
|
|
1703
|
+
React10.useEffect(() => {
|
|
1704
|
+
const hasOrderChanged = items.some(
|
|
1705
|
+
(item, index) => originalOrder[index]?.id !== item.id
|
|
1706
|
+
);
|
|
1707
|
+
setHasChanges(hasOrderChanged);
|
|
1708
|
+
}, [items, originalOrder]);
|
|
1709
|
+
const handleMoveUp = async (itemId) => {
|
|
1710
|
+
try {
|
|
1711
|
+
setError(null);
|
|
1712
|
+
const currentIndex = items.findIndex((item) => item.id === itemId);
|
|
1713
|
+
if (currentIndex === -1) {
|
|
1714
|
+
setError("\u9879\u76EE\u4E0D\u5B58\u5728");
|
|
1715
|
+
return;
|
|
1716
|
+
}
|
|
1717
|
+
if (currentIndex === 0) {
|
|
1718
|
+
setError("\u9879\u76EE\u5DF2\u7ECF\u5728\u6700\u524D\u9762\uFF0C\u65E0\u6CD5\u4E0A\u79FB");
|
|
1719
|
+
return;
|
|
1720
|
+
}
|
|
1721
|
+
await operations.moveItemUp(itemId);
|
|
1722
|
+
await loadItems();
|
|
1723
|
+
onOrderChanged?.();
|
|
1724
|
+
} catch (err) {
|
|
1725
|
+
console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u4E0A\u79FB\u9879\u76EE\u9519\u8BEF:", err);
|
|
1726
|
+
setError(err instanceof Error ? err.message : "\u4E0A\u79FB\u5931\u8D25");
|
|
1727
|
+
}
|
|
1728
|
+
};
|
|
1729
|
+
const handleMoveDown = async (itemId) => {
|
|
1730
|
+
try {
|
|
1731
|
+
setError(null);
|
|
1732
|
+
const currentIndex = items.findIndex((item) => item.id === itemId);
|
|
1733
|
+
if (currentIndex === -1) {
|
|
1734
|
+
setError("\u9879\u76EE\u4E0D\u5B58\u5728");
|
|
1735
|
+
return;
|
|
1736
|
+
}
|
|
1737
|
+
if (currentIndex === items.length - 1) {
|
|
1738
|
+
setError("\u9879\u76EE\u5DF2\u7ECF\u5728\u6700\u540E\u9762\uFF0C\u65E0\u6CD5\u4E0B\u79FB");
|
|
1739
|
+
return;
|
|
1740
|
+
}
|
|
1741
|
+
await operations.moveItemDown(itemId);
|
|
1742
|
+
await loadItems();
|
|
1743
|
+
onOrderChanged?.();
|
|
1744
|
+
} catch (err) {
|
|
1745
|
+
console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u4E0B\u79FB\u9879\u76EE\u9519\u8BEF:", err);
|
|
1746
|
+
setError(err instanceof Error ? err.message : "\u4E0B\u79FB\u5931\u8D25");
|
|
1747
|
+
}
|
|
1748
|
+
};
|
|
1749
|
+
const handleDragStart = (e, index) => {
|
|
1750
|
+
setDraggedItem(index);
|
|
1751
|
+
e.dataTransfer.effectAllowed = "move";
|
|
1752
|
+
};
|
|
1753
|
+
const handleDragOver = (e, _index) => {
|
|
1754
|
+
e.preventDefault();
|
|
1755
|
+
e.dataTransfer.dropEffect = "move";
|
|
1756
|
+
};
|
|
1757
|
+
const handleDrop = async (e, dropIndex) => {
|
|
1758
|
+
e.preventDefault();
|
|
1759
|
+
if (draggedItem === null || draggedItem === dropIndex) {
|
|
1760
|
+
setDraggedItem(null);
|
|
1761
|
+
return;
|
|
1762
|
+
}
|
|
1763
|
+
try {
|
|
1764
|
+
setError(null);
|
|
1765
|
+
const newItems = [...items];
|
|
1766
|
+
const draggedItemData = newItems[draggedItem];
|
|
1767
|
+
if (!draggedItemData) return;
|
|
1768
|
+
newItems.splice(draggedItem, 1);
|
|
1769
|
+
newItems.splice(dropIndex, 0, draggedItemData);
|
|
1770
|
+
const itemOrders = newItems.map((item, index) => ({
|
|
1771
|
+
id: item.id,
|
|
1772
|
+
order: index
|
|
1773
|
+
}));
|
|
1774
|
+
await operations.updateItemOrder(itemOrders);
|
|
1775
|
+
await loadItems();
|
|
1776
|
+
onOrderChanged?.();
|
|
1777
|
+
} catch (err) {
|
|
1778
|
+
console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u62D6\u62FD\u6392\u5E8F\u9519\u8BEF:", err);
|
|
1779
|
+
setError(err instanceof Error ? err.message : "\u6392\u5E8F\u5931\u8D25");
|
|
1780
|
+
} finally {
|
|
1781
|
+
setDraggedItem(null);
|
|
1782
|
+
}
|
|
1783
|
+
};
|
|
1784
|
+
const handleSaveOrder = async () => {
|
|
1785
|
+
try {
|
|
1786
|
+
setSaving(true);
|
|
1787
|
+
setError(null);
|
|
1788
|
+
const itemOrders = items.map((item, index) => ({
|
|
1789
|
+
id: item.id,
|
|
1790
|
+
order: index
|
|
1791
|
+
}));
|
|
1792
|
+
await operations.updateItemOrder(itemOrders);
|
|
1793
|
+
setOriginalOrder([...items]);
|
|
1794
|
+
setHasChanges(false);
|
|
1795
|
+
onOrderChanged?.();
|
|
1796
|
+
} catch (err) {
|
|
1797
|
+
console.error("\u274C [\u901A\u7528\u6392\u5E8F] \u4FDD\u5B58\u987A\u5E8F\u9519\u8BEF:", err);
|
|
1798
|
+
setError(err instanceof Error ? err.message : "\u4FDD\u5B58\u5931\u8D25");
|
|
1799
|
+
await loadItems();
|
|
1800
|
+
} finally {
|
|
1801
|
+
setSaving(false);
|
|
1802
|
+
}
|
|
1803
|
+
};
|
|
1804
|
+
const handleResetOrder = () => {
|
|
1805
|
+
setItems([...originalOrder]);
|
|
1806
|
+
};
|
|
1807
|
+
if (loading) {
|
|
1808
|
+
return /* @__PURE__ */ React10__namespace.default.createElement("div", { className: chunkZWQJSZEY_js.cn("flex flex-col items-center justify-center p-12 text-gray-500", className) }, /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "w-6 h-6 border-2 border-gray-200 border-t-blue-500 rounded-full animate-spin mb-2" }), /* @__PURE__ */ React10__namespace.default.createElement("span", null, loadingMessage));
|
|
1809
|
+
}
|
|
1810
|
+
return /* @__PURE__ */ React10__namespace.default.createElement("div", { className: chunkZWQJSZEY_js.cn("bg-white rounded-xl p-6 shadow-md border-2 border-gray-100", className) }, /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "flex items-center justify-between mb-4 pb-3 border-b border-gray-100 sm:flex-row flex-col sm:items-center items-start gap-4" }, /* @__PURE__ */ React10__namespace.default.createElement("h3", { className: "m-0 text-gray-900 text-lg font-semibold" }, title), /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "flex gap-3 w-full sm:w-auto" }, hasChanges && /* @__PURE__ */ React10__namespace.default.createElement(React10__namespace.default.Fragment, null, /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1811
|
+
"button",
|
|
1812
|
+
{
|
|
1813
|
+
onClick: handleResetOrder,
|
|
1814
|
+
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",
|
|
1815
|
+
title: "\u91CD\u7F6E\u4E3A\u539F\u59CB\u987A\u5E8F"
|
|
1816
|
+
},
|
|
1817
|
+
/* @__PURE__ */ React10__namespace.default.createElement(lucideReact.RotateCcw, { size: 16 }),
|
|
1818
|
+
"\u91CD\u7F6E"
|
|
1819
|
+
), /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1820
|
+
"button",
|
|
1821
|
+
{
|
|
1822
|
+
onClick: handleSaveOrder,
|
|
1823
|
+
disabled: saving,
|
|
1824
|
+
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",
|
|
1825
|
+
title: "\u4FDD\u5B58\u65B0\u987A\u5E8F"
|
|
1826
|
+
},
|
|
1827
|
+
/* @__PURE__ */ React10__namespace.default.createElement(lucideReact.Save, { size: 16 }),
|
|
1828
|
+
saving ? "\u4FDD\u5B58\u4E2D..." : "\u4FDD\u5B58\u987A\u5E8F"
|
|
1829
|
+
)))), error && /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "flex items-center gap-2 bg-red-50 text-red-600 p-3 rounded-lg mb-4 border border-red-200" }, /* @__PURE__ */ React10__namespace.default.createElement(lucideReact.AlertCircle, { size: 16 }), /* @__PURE__ */ React10__namespace.default.createElement("span", null, error)), /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "bg-slate-50 border border-slate-200 rounded-lg p-4 mb-6" }, /* @__PURE__ */ React10__namespace.default.createElement("p", { className: "m-0 mb-2 color-slate-500 text-sm" }, description), /* @__PURE__ */ React10__namespace.default.createElement("ul", { className: "m-0 pl-6 color-slate-500 text-sm list-disc" }, /* @__PURE__ */ React10__namespace.default.createElement("li", { className: "mb-1" }, "\u4F7F\u7528\u62D6\u62FD\uFF1A\u70B9\u51FB\u5E76\u62D6\u52A8 ", /* @__PURE__ */ React10__namespace.default.createElement(lucideReact.GripVertical, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u56FE\u6807"), /* @__PURE__ */ React10__namespace.default.createElement("li", { className: "mb-1" }, "\u4F7F\u7528\u6309\u94AE\uFF1A\u70B9\u51FB ", /* @__PURE__ */ React10__namespace.default.createElement(lucideReact.ChevronUp, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u6216 ", /* @__PURE__ */ React10__namespace.default.createElement(lucideReact.ChevronDown, { size: 14, className: "inline-block align-middle text-gray-500" }), " \u6309\u94AE"), /* @__PURE__ */ React10__namespace.default.createElement("li", null, '\u5B8C\u6210\u8C03\u6574\u540E\uFF0C\u70B9\u51FB"\u4FDD\u5B58\u987A\u5E8F"\u6309\u94AE\u4FDD\u5B58\u66F4\u6539'))), /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "flex flex-col gap-3" }, items.map((item, index) => /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1830
|
+
"div",
|
|
1831
|
+
{
|
|
1832
|
+
key: item.id,
|
|
1833
|
+
className: chunkZWQJSZEY_js.cn(
|
|
1834
|
+
"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",
|
|
1835
|
+
draggedItem === index && "opacity-50 rotate-2 border-blue-500"
|
|
1836
|
+
),
|
|
1837
|
+
draggable: true,
|
|
1838
|
+
onDragStart: (e) => handleDragStart(e, index),
|
|
1839
|
+
onDragOver: (e) => handleDragOver(e),
|
|
1840
|
+
onDrop: (e) => handleDrop(e, index)
|
|
1841
|
+
},
|
|
1842
|
+
/* @__PURE__ */ React10__namespace.default.createElement("div", { className: "flex items-center cursor-grab active:cursor-grabbing text-gray-400 p-1 rounded hover:text-gray-500 hover:bg-gray-100 transition-colors" }, /* @__PURE__ */ React10__namespace.default.createElement(lucideReact.GripVertical, { size: 20 })),
|
|
1843
|
+
/* @__PURE__ */ React10__namespace.default.createElement("div", { className: "flex-1 min-w-0" }, renderItem(item, index, index === 0, index === items.length - 1)),
|
|
1844
|
+
/* @__PURE__ */ React10__namespace.default.createElement("div", { className: "flex items-center mx-3" }, /* @__PURE__ */ React10__namespace.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)),
|
|
1845
|
+
/* @__PURE__ */ React10__namespace.default.createElement("div", { className: "flex flex-col gap-1 sm:flex-col flex-row" }, /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1846
|
+
"button",
|
|
1847
|
+
{
|
|
1848
|
+
onClick: () => handleMoveUp(item.id),
|
|
1849
|
+
disabled: index === 0,
|
|
1850
|
+
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",
|
|
1851
|
+
title: "\u4E0A\u79FB"
|
|
1852
|
+
},
|
|
1853
|
+
/* @__PURE__ */ React10__namespace.default.createElement(lucideReact.ChevronUp, { size: 18 })
|
|
1854
|
+
), /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1855
|
+
"button",
|
|
1856
|
+
{
|
|
1857
|
+
onClick: () => handleMoveDown(item.id),
|
|
1858
|
+
disabled: index === items.length - 1,
|
|
1859
|
+
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",
|
|
1860
|
+
title: "\u4E0B\u79FB"
|
|
1861
|
+
},
|
|
1862
|
+
/* @__PURE__ */ React10__namespace.default.createElement(lucideReact.ChevronDown, { size: 18 })
|
|
1863
|
+
))
|
|
1864
|
+
))), items.length === 0 && /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "text-center p-12 text-gray-400 italic" }, /* @__PURE__ */ React10__namespace.default.createElement("p", { className: "m-0" }, emptyMessage)));
|
|
1865
|
+
}
|
|
1866
|
+
var BackButton = ({ href, className = "" }) => {
|
|
1867
|
+
const router = navigation.useRouter();
|
|
1868
|
+
const handleClick = () => {
|
|
1869
|
+
if (href) {
|
|
1870
|
+
router.push(href);
|
|
1871
|
+
} else {
|
|
1872
|
+
router.back();
|
|
1873
|
+
}
|
|
1874
|
+
};
|
|
1875
|
+
return /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1876
|
+
"button",
|
|
1877
|
+
{
|
|
1878
|
+
onClick: handleClick,
|
|
1879
|
+
className: chunkZWQJSZEY_js.cn(
|
|
1880
|
+
"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",
|
|
1881
|
+
className
|
|
1882
|
+
)
|
|
1883
|
+
},
|
|
1884
|
+
/* @__PURE__ */ React10__namespace.default.createElement(
|
|
1885
|
+
"svg",
|
|
1886
|
+
{
|
|
1887
|
+
className: "w-5 h-5 mr-2",
|
|
1888
|
+
fill: "none",
|
|
1889
|
+
stroke: "currentColor",
|
|
1890
|
+
viewBox: "0 0 24 24"
|
|
1891
|
+
},
|
|
1892
|
+
/* @__PURE__ */ React10__namespace.default.createElement(
|
|
1893
|
+
"path",
|
|
1894
|
+
{
|
|
1895
|
+
strokeLinecap: "round",
|
|
1896
|
+
strokeLinejoin: "round",
|
|
1897
|
+
strokeWidth: 2,
|
|
1898
|
+
d: "M10 19l-7-7m0 0l7-7m-7 7h18"
|
|
1899
|
+
}
|
|
1900
|
+
)
|
|
1901
|
+
),
|
|
1902
|
+
"\u8FD4\u56DE"
|
|
1903
|
+
);
|
|
1904
|
+
};
|
|
1905
|
+
function getColorValue(bgClass) {
|
|
1906
|
+
const colorMap = {
|
|
1907
|
+
"bg-blue-500": "#3b82f6",
|
|
1908
|
+
"bg-green-500": "#10b981",
|
|
1909
|
+
"bg-red-500": "#ef4444",
|
|
1910
|
+
"bg-purple-500": "#8b5cf6",
|
|
1911
|
+
"bg-slate-500": "#64748b",
|
|
1912
|
+
"bg-emerald-500": "#10b981",
|
|
1913
|
+
"bg-orange-500": "#f97316"
|
|
1914
|
+
};
|
|
1915
|
+
return colorMap[bgClass] || "#3b82f6";
|
|
1916
|
+
}
|
|
1917
|
+
function FilterButtonGroup({
|
|
1918
|
+
label,
|
|
1919
|
+
value,
|
|
1920
|
+
options,
|
|
1921
|
+
onChange,
|
|
1922
|
+
className
|
|
1923
|
+
}) {
|
|
1924
|
+
return /* @__PURE__ */ React10__namespace.default.createElement("div", { className: chunkZWQJSZEY_js.cn("space-y-4", className) }, /* @__PURE__ */ React10__namespace.default.createElement("h3", { className: "text-lg font-semibold text-gray-800" }, label), /* @__PURE__ */ React10__namespace.default.createElement("div", { className: "flex gap-3" }, options.map((option) => {
|
|
1925
|
+
const isActive = value === option.value;
|
|
1926
|
+
return /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1927
|
+
"button",
|
|
1928
|
+
{
|
|
1929
|
+
key: option.value,
|
|
1930
|
+
onClick: () => onChange(option.value),
|
|
1931
|
+
style: isActive ? { backgroundColor: getColorValue(option.activeColor.bg) } : void 0,
|
|
1932
|
+
className: chunkZWQJSZEY_js.cn(
|
|
1933
|
+
"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",
|
|
1934
|
+
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"
|
|
1935
|
+
)
|
|
1936
|
+
},
|
|
1937
|
+
/* @__PURE__ */ React10__namespace.default.createElement("div", { className: "flex items-center justify-center space-x-2" }, /* @__PURE__ */ React10__namespace.default.createElement("span", { className: "text-lg" }, option.icon), /* @__PURE__ */ React10__namespace.default.createElement("span", null, option.label), option.showCount && option.count !== void 0 && /* @__PURE__ */ React10__namespace.default.createElement("span", { className: chunkZWQJSZEY_js.cn(
|
|
1938
|
+
"text-xs font-semibold px-2 py-0.5 rounded-full min-w-[1.25rem] text-center",
|
|
1939
|
+
isActive ? "bg-white/20 text-white" : "bg-gray-100 text-gray-600"
|
|
1940
|
+
) }, option.count))
|
|
1941
|
+
);
|
|
1942
|
+
})));
|
|
1943
|
+
}
|
|
1944
|
+
function SearchResultHint({ searchQuery, resultCount, className }) {
|
|
1945
|
+
if (!searchQuery) return null;
|
|
1946
|
+
return /* @__PURE__ */ React10__namespace.default.createElement("div", { className: chunkZWQJSZEY_js.cn("mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg", className) }, /* @__PURE__ */ React10__namespace.default.createElement("p", { className: "text-sm text-blue-700" }, '\u641C\u7D22 "', /* @__PURE__ */ React10__namespace.default.createElement("span", { className: "font-medium" }, searchQuery), '" \u627E\u5230 ', resultCount, " \u4E2A\u7ED3\u679C"));
|
|
1947
|
+
}
|
|
1948
|
+
var Modal = ({
|
|
1949
|
+
isOpen,
|
|
1950
|
+
onClose,
|
|
1951
|
+
title,
|
|
1952
|
+
width,
|
|
1953
|
+
className,
|
|
1954
|
+
maskClosable = true,
|
|
1955
|
+
children,
|
|
1956
|
+
zIndex = 50
|
|
1957
|
+
}) => {
|
|
1958
|
+
return /* @__PURE__ */ React10__namespace.default.createElement(Dialog, { open: isOpen, onOpenChange: (open) => {
|
|
1959
|
+
if (!open) {
|
|
1960
|
+
if (maskClosable) {
|
|
1961
|
+
onClose();
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
} }, /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1965
|
+
DialogContent,
|
|
1966
|
+
{
|
|
1967
|
+
className: chunkZWQJSZEY_js.cn("sm:max-w-[425px]", className) + " z-[" + zIndex + "]",
|
|
1968
|
+
onPointerDownOutside: (e) => {
|
|
1969
|
+
if (!maskClosable) e.preventDefault();
|
|
1970
|
+
},
|
|
1971
|
+
onEscapeKeyDown: (e) => {
|
|
1972
|
+
if (!maskClosable) e.preventDefault();
|
|
1973
|
+
},
|
|
1974
|
+
style: width ? { maxWidth: typeof width === "number" ? width + "px" : width } : void 0
|
|
1975
|
+
},
|
|
1976
|
+
title ? /* @__PURE__ */ React10__namespace.default.createElement(DialogHeader, null, /* @__PURE__ */ React10__namespace.default.createElement(DialogTitle, null, title)) : (
|
|
1977
|
+
// 无障碍性:始终需要 DialogTitle,使用 sr-only 对视觉隐藏但对屏幕阅读器可见
|
|
1978
|
+
/* @__PURE__ */ React10__namespace.default.createElement(DialogTitle, { className: "sr-only" }, "\u5F39\u7A97")
|
|
1979
|
+
),
|
|
1980
|
+
/* @__PURE__ */ React10__namespace.default.createElement("div", { className: "py-4" }, children)
|
|
1981
|
+
));
|
|
1982
|
+
};
|
|
1983
|
+
var ConfirmModal = ({
|
|
1984
|
+
isOpen,
|
|
1985
|
+
onClose,
|
|
1986
|
+
onConfirm,
|
|
1987
|
+
title = "\u786E\u8BA4\u64CD\u4F5C",
|
|
1988
|
+
message,
|
|
1989
|
+
confirmText = "\u786E\u8BA4",
|
|
1990
|
+
cancelText = "\u53D6\u6D88",
|
|
1991
|
+
isLoading = false
|
|
1992
|
+
}) => {
|
|
1993
|
+
return /* @__PURE__ */ React10__namespace.default.createElement(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose() }, /* @__PURE__ */ React10__namespace.default.createElement(AlertDialogContent, null, /* @__PURE__ */ React10__namespace.default.createElement(DialogHeader, null, /* @__PURE__ */ React10__namespace.default.createElement(DialogTitle, null, title), /* @__PURE__ */ React10__namespace.default.createElement(DialogDescription, null, message)), /* @__PURE__ */ React10__namespace.default.createElement(DialogFooter, null, /* @__PURE__ */ React10__namespace.default.createElement(AlertDialogCancel, { disabled: isLoading }, cancelText), /* @__PURE__ */ React10__namespace.default.createElement(
|
|
1994
|
+
AlertDialogAction,
|
|
1995
|
+
{
|
|
1996
|
+
onClick: (e) => {
|
|
1997
|
+
e.preventDefault();
|
|
1998
|
+
onConfirm();
|
|
1999
|
+
},
|
|
2000
|
+
disabled: isLoading,
|
|
2001
|
+
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
|
2002
|
+
},
|
|
2003
|
+
isLoading ? "\u5904\u7406\u4E2D..." : confirmText
|
|
2004
|
+
))));
|
|
2005
|
+
};
|
|
2006
|
+
|
|
2007
|
+
exports.AlertDialogAction = AlertDialogAction;
|
|
2008
|
+
exports.AlertDialogCancel = AlertDialogCancel;
|
|
2009
|
+
exports.AlertDialogContent = AlertDialogContent;
|
|
2010
|
+
exports.Avatar = Avatar;
|
|
2011
|
+
exports.AvatarFallback = AvatarFallback;
|
|
2012
|
+
exports.AvatarImage = AvatarImage;
|
|
2013
|
+
exports.BackButton = BackButton;
|
|
2014
|
+
exports.Badge = Badge;
|
|
2015
|
+
exports.Button = Button;
|
|
2016
|
+
exports.Card = Card;
|
|
2017
|
+
exports.CardContent = CardContent;
|
|
2018
|
+
exports.CardDescription = CardDescription;
|
|
2019
|
+
exports.CardFooter = CardFooter;
|
|
2020
|
+
exports.CardHeader = CardHeader;
|
|
2021
|
+
exports.CardTitle = CardTitle;
|
|
2022
|
+
exports.CollisionBalls = CollisionBalls;
|
|
2023
|
+
exports.ConfirmModal = ConfirmModal;
|
|
2024
|
+
exports.Dialog = Dialog;
|
|
2025
|
+
exports.DialogClose = DialogClose;
|
|
2026
|
+
exports.DialogContent = DialogContent;
|
|
2027
|
+
exports.DialogDescription = DialogDescription;
|
|
2028
|
+
exports.DialogFooter = DialogFooter;
|
|
2029
|
+
exports.DialogHeader = DialogHeader;
|
|
2030
|
+
exports.DialogOverlay = DialogOverlay;
|
|
2031
|
+
exports.DialogPortal = DialogPortal;
|
|
2032
|
+
exports.DialogTitle = DialogTitle;
|
|
2033
|
+
exports.DialogTrigger = DialogTrigger;
|
|
2034
|
+
exports.DropdownMenu = DropdownMenu;
|
|
2035
|
+
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
2036
|
+
exports.DropdownMenuContent = DropdownMenuContent;
|
|
2037
|
+
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
2038
|
+
exports.DropdownMenuItem = DropdownMenuItem;
|
|
2039
|
+
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
2040
|
+
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
2041
|
+
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
2042
|
+
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
2043
|
+
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
2044
|
+
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
2045
|
+
exports.DropdownMenuSub = DropdownMenuSub;
|
|
2046
|
+
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
2047
|
+
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
2048
|
+
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
2049
|
+
exports.FilterButtonGroup = FilterButtonGroup;
|
|
2050
|
+
exports.GenericOrderManager = GenericOrderManager;
|
|
2051
|
+
exports.Grid = Grid;
|
|
2052
|
+
exports.Input = Input;
|
|
2053
|
+
exports.Label = Label;
|
|
2054
|
+
exports.Modal = Modal;
|
|
2055
|
+
exports.Popover = Popover;
|
|
2056
|
+
exports.PopoverAnchor = PopoverAnchor;
|
|
2057
|
+
exports.PopoverContent = PopoverContent;
|
|
2058
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
2059
|
+
exports.Progress = Progress;
|
|
2060
|
+
exports.ScrollArea = ScrollArea;
|
|
2061
|
+
exports.ScrollBar = ScrollBar;
|
|
2062
|
+
exports.SearchBox = SearchBox;
|
|
2063
|
+
exports.SearchResultHint = SearchResultHint;
|
|
2064
|
+
exports.Select = Select;
|
|
2065
|
+
exports.SelectContent = SelectContent;
|
|
2066
|
+
exports.SelectGroup = SelectGroup;
|
|
2067
|
+
exports.SelectItem = SelectItem;
|
|
2068
|
+
exports.SelectLabel = SelectLabel;
|
|
2069
|
+
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
2070
|
+
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
2071
|
+
exports.SelectSeparator = SelectSeparator;
|
|
2072
|
+
exports.SelectTrigger = SelectTrigger;
|
|
2073
|
+
exports.SelectValue = SelectValue;
|
|
2074
|
+
exports.Separator = Separator;
|
|
2075
|
+
exports.SheetContent = SheetContent;
|
|
2076
|
+
exports.SheetDescription = SheetDescription;
|
|
2077
|
+
exports.SheetFooter = SheetFooter;
|
|
2078
|
+
exports.SheetHeader = SheetHeader;
|
|
2079
|
+
exports.SheetTitle = SheetTitle;
|
|
2080
|
+
exports.Tabs = Tabs;
|
|
2081
|
+
exports.TabsContent = TabsContent;
|
|
2082
|
+
exports.TabsList = TabsList;
|
|
2083
|
+
exports.TabsTrigger = TabsTrigger;
|
|
2084
|
+
exports.Textarea = Textarea;
|
|
2085
|
+
exports.Timeline = Timeline;
|
|
2086
|
+
exports.Tooltip = Tooltip;
|
|
2087
|
+
exports.TooltipContent = TooltipContent;
|
|
2088
|
+
exports.TooltipProvider = TooltipProvider;
|
|
2089
|
+
exports.TooltipTrigger = TooltipTrigger;
|
|
2090
|
+
exports.badgeVariants = badgeVariants;
|
|
2091
|
+
exports.buttonVariants = buttonVariants;
|
|
2092
|
+
//# sourceMappingURL=chunk-XGBE4SUV.js.map
|
|
2093
|
+
//# sourceMappingURL=chunk-XGBE4SUV.js.map
|