@xyhp915/slack-base-ui 0.0.13 → 0.0.14
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/libs/components/AlertDialog.d.ts +26 -0
- package/libs/components/AlertDialog.d.ts.map +1 -0
- package/libs/components/AutoComplete.d.ts +32 -0
- package/libs/components/AutoComplete.d.ts.map +1 -0
- package/libs/components/Avatar.d.ts +13 -0
- package/libs/components/Avatar.d.ts.map +1 -0
- package/libs/components/Badge.d.ts +8 -0
- package/libs/components/Badge.d.ts.map +1 -0
- package/libs/components/Button.d.ts +12 -0
- package/libs/components/Button.d.ts.map +1 -0
- package/libs/components/Checkbox.d.ts +21 -0
- package/libs/components/Checkbox.d.ts.map +1 -0
- package/libs/components/Combobox.d.ts +77 -0
- package/libs/components/Combobox.d.ts.map +1 -0
- package/libs/components/ContextMenu.d.ts +85 -0
- package/libs/components/ContextMenu.d.ts.map +1 -0
- package/libs/components/Dialog.d.ts +107 -0
- package/libs/components/Dialog.d.ts.map +1 -0
- package/libs/components/Dropdown.d.ts +177 -0
- package/libs/components/Dropdown.d.ts.map +1 -0
- package/libs/components/Form.d.ts +77 -0
- package/libs/components/Form.d.ts.map +1 -0
- package/libs/components/IconButton.d.ts +9 -0
- package/libs/components/IconButton.d.ts.map +1 -0
- package/libs/components/Input.d.ts +8 -0
- package/libs/components/Input.d.ts.map +1 -0
- package/libs/components/Loading.d.ts +16 -0
- package/libs/components/Loading.d.ts.map +1 -0
- package/libs/components/Menu.d.ts +89 -0
- package/libs/components/Menu.d.ts.map +1 -0
- package/libs/components/Popover.d.ts +112 -0
- package/libs/components/Popover.d.ts.map +1 -0
- package/libs/components/Progress.d.ts +18 -0
- package/libs/components/Progress.d.ts.map +1 -0
- package/libs/components/Radio.d.ts +29 -0
- package/libs/components/Radio.d.ts.map +1 -0
- package/libs/components/Select.d.ts +31 -0
- package/libs/components/Select.d.ts.map +1 -0
- package/libs/components/Switch.d.ts +20 -0
- package/libs/components/Switch.d.ts.map +1 -0
- package/libs/components/Tabs.d.ts +30 -0
- package/libs/components/Tabs.d.ts.map +1 -0
- package/libs/components/Toast.d.ts +49 -0
- package/libs/components/Toast.d.ts.map +1 -0
- package/libs/components/Tooltip.d.ts +9 -0
- package/libs/components/Tooltip.d.ts.map +1 -0
- package/libs/components/index.d.ts +47 -0
- package/libs/components/index.d.ts.map +1 -0
- package/libs/context/ThemeContext.d.ts +15 -0
- package/libs/context/ThemeContext.d.ts.map +1 -0
- package/libs/context/useTheme.d.ts +2 -0
- package/libs/context/useTheme.d.ts.map +1 -0
- package/libs/index.d.ts +3 -46
- package/libs/index.d.ts.map +1 -1
- package/libs/index.js +688 -687
- package/libs/theme.d.ts +3 -0
- package/libs/theme.d.ts.map +1 -0
- package/libs/theme.js +2 -0
- package/libs/useTheme-P7tC1A4a.js +26 -0
- package/package.json +16 -1
- package/src/context/ThemeContext.tsx +3 -3
- package/src/index.ts +3 -0
- package/src/theme.ts +8 -0
- package/tsconfig.libs.json +7 -2
- package/vite.libs.config.ts +5 -2
package/libs/index.js
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { n as e, r as t, t as n } from "./useTheme-P7tC1A4a.js";
|
|
2
|
+
import { Button as r, Checkbox as i, Combobox as a, Dialog as o, Input as s, Menu as c, Popover as l, Progress as u, Radio as d, RadioGroup as f, Select as p, Switch as m, Tabs as h, Toast as g, Tooltip as _ } from "@base-ui/react";
|
|
3
|
+
import v, { createContext as y, useCallback as b, useContext as x, useMemo as S, useState as C } from "react";
|
|
4
|
+
import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
5
|
+
import { AlertTriangle as D, Check as O, CheckCircle as k, ChevronDown as A, ChevronRight as j, ChevronUp as M, Info as N, Minus as P, X as F, XCircle as I } from "lucide-react";
|
|
5
6
|
//#region node_modules/clsx/dist/clsx.mjs
|
|
6
|
-
function
|
|
7
|
+
function L(e) {
|
|
7
8
|
var t, n, r = "";
|
|
8
9
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
9
10
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
10
11
|
var i = e.length;
|
|
11
|
-
for (t = 0; t < i; t++) e[t] && (n =
|
|
12
|
+
for (t = 0; t < i; t++) e[t] && (n = L(e[t])) && (r && (r += " "), r += n);
|
|
12
13
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
13
14
|
return r;
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
16
|
+
function R() {
|
|
17
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = L(e)) && (r && (r += " "), r += t);
|
|
17
18
|
return r;
|
|
18
19
|
}
|
|
19
20
|
//#endregion
|
|
20
21
|
//#region src/components/Button.tsx
|
|
21
|
-
var
|
|
22
|
+
var z = v.forwardRef(({ className: e, variant: t = "secondary", size: n = "md", fullWidth: i, children: a, ...o }, s) => /* @__PURE__ */ T(r, {
|
|
22
23
|
ref: s,
|
|
23
|
-
className:
|
|
24
|
+
className: R("inline-flex items-center justify-center font-bold transition-all outline-none focus-visible:ring-2 focus-visible:ring-(--focus-ring) focus-visible:ring-offset-2 focus-visible:ring-offset-(--bg-primary) disabled:opacity-50 disabled:cursor-not-allowed select-none", {
|
|
24
25
|
primary: "bg-(--accent-action) text-(--accent-contrast) hover:bg-(--accent-action-hover) border border-transparent shadow-sm active:scale-[0.98]",
|
|
25
26
|
secondary: "bg-(--bg-secondary) text-(--text-primary) border border-(--border-active) hover:bg-(--bg-hover) hover:shadow-sm active:bg-(--bg-secondary)",
|
|
26
27
|
danger: "bg-(--danger) text-(--accent-contrast) hover:bg-(--danger-hover) border border-transparent shadow-sm",
|
|
27
28
|
ghost: "bg-transparent text-(--text-secondary) hover:bg-(--bg-hover) hover:text-(--text-primary)"
|
|
28
|
-
}[
|
|
29
|
+
}[t], {
|
|
29
30
|
sm: "h-7 px-3 text-[13px] rounded",
|
|
30
31
|
md: "h-9 px-4 text-[15px] rounded-md",
|
|
31
32
|
lg: "h-11 px-6 text-[18px] rounded-lg"
|
|
32
|
-
}[
|
|
33
|
+
}[n], i && "w-full", e),
|
|
33
34
|
...o,
|
|
34
35
|
children: a
|
|
35
36
|
}));
|
|
36
|
-
|
|
37
|
+
z.displayName = "Button";
|
|
37
38
|
//#endregion
|
|
38
39
|
//#region src/components/Avatar.tsx
|
|
39
|
-
var
|
|
40
|
+
var B = v.forwardRef(({ className: e, src: t, alt: n, fallback: r, size: i = "md", status: a, rounded: o = !0, ...s }, c) => {
|
|
40
41
|
let l = {
|
|
41
42
|
xs: "h-5 w-5 text-[10px]",
|
|
42
43
|
sm: "h-6 w-6 text-xs",
|
|
@@ -49,179 +50,179 @@ var L = h.forwardRef(({ className: e, src: t, alt: n, fallback: r, size: i = "md
|
|
|
49
50
|
dnd: "bg-[#e01e5a]",
|
|
50
51
|
offline: "bg-(--text-muted)"
|
|
51
52
|
}, d = o ? "rounded-md" : "rounded-full";
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ E("div", {
|
|
53
54
|
ref: c,
|
|
54
|
-
className:
|
|
55
|
+
className: R("relative inline-block", e),
|
|
55
56
|
...s,
|
|
56
|
-
children: [/* @__PURE__ */
|
|
57
|
-
className:
|
|
58
|
-
children: t ? /* @__PURE__ */
|
|
57
|
+
children: [/* @__PURE__ */ T("div", {
|
|
58
|
+
className: R("overflow-hidden bg-(--bg-secondary) flex items-center justify-center font-medium text-(--text-secondary) select-none", l[i], d),
|
|
59
|
+
children: t ? /* @__PURE__ */ T("img", {
|
|
59
60
|
src: t,
|
|
60
61
|
alt: n,
|
|
61
62
|
className: "h-full w-full object-cover"
|
|
62
|
-
}) : /* @__PURE__ */
|
|
63
|
-
}), a && a !== "offline" && /* @__PURE__ */
|
|
63
|
+
}) : /* @__PURE__ */ T("span", { children: r || (n ? n.charAt(0).toUpperCase() : "?") })
|
|
64
|
+
}), a && a !== "offline" && /* @__PURE__ */ T("span", { className: R("absolute -bottom-0.5 -right-0.5 block h-2 w-2 rounded-full ring-2 ring-(--bg-primary)", u[a]) })]
|
|
64
65
|
});
|
|
65
66
|
});
|
|
66
|
-
|
|
67
|
+
B.displayName = "Avatar";
|
|
67
68
|
//#endregion
|
|
68
69
|
//#region src/components/Badge.tsx
|
|
69
|
-
var
|
|
70
|
+
var V = v.forwardRef(({ className: e, count: t, dot: n, variant: r = "danger", children: i, ...a }, o) => {
|
|
70
71
|
let s = {
|
|
71
72
|
danger: "bg-(--danger) text-(--accent-contrast)",
|
|
72
73
|
neutral: "bg-(--badge-neutral) text-(--accent-contrast)"
|
|
73
74
|
};
|
|
74
|
-
return n ? /* @__PURE__ */
|
|
75
|
+
return n ? /* @__PURE__ */ T("span", {
|
|
75
76
|
ref: o,
|
|
76
|
-
className:
|
|
77
|
+
className: R("inline-block h-2 w-2 rounded-full", s[r], e),
|
|
77
78
|
...a
|
|
78
|
-
}) : /* @__PURE__ */
|
|
79
|
+
}) : /* @__PURE__ */ T("span", {
|
|
79
80
|
ref: o,
|
|
80
|
-
className:
|
|
81
|
+
className: R("inline-flex items-center justify-center rounded-full px-2 py-0.5 text-[11px] font-bold min-w-5", s[r], e),
|
|
81
82
|
...a,
|
|
82
83
|
children: t === void 0 ? i : t
|
|
83
84
|
});
|
|
84
85
|
});
|
|
85
|
-
|
|
86
|
+
V.displayName = "Badge";
|
|
86
87
|
//#endregion
|
|
87
88
|
//#region src/components/Input.tsx
|
|
88
|
-
var
|
|
89
|
-
let c =
|
|
90
|
-
return /* @__PURE__ */
|
|
91
|
-
className:
|
|
89
|
+
var H = v.forwardRef(({ className: e, label: t, error: n, fullWidth: r, id: i, ...a }, o) => {
|
|
90
|
+
let c = v.useId(), l = i ?? c;
|
|
91
|
+
return /* @__PURE__ */ E("div", {
|
|
92
|
+
className: R("flex flex-col gap-1.5", r && "w-full"),
|
|
92
93
|
children: [
|
|
93
|
-
t && /* @__PURE__ */
|
|
94
|
+
t && /* @__PURE__ */ T("label", {
|
|
94
95
|
htmlFor: l,
|
|
95
96
|
className: "text-[14px] font-semibold text-(--text-primary)",
|
|
96
97
|
children: t
|
|
97
98
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ T("div", {
|
|
99
100
|
className: "relative",
|
|
100
|
-
children: /* @__PURE__ */
|
|
101
|
-
ref:
|
|
101
|
+
children: /* @__PURE__ */ T(s, {
|
|
102
|
+
ref: o,
|
|
102
103
|
id: l,
|
|
103
|
-
className:
|
|
104
|
-
...
|
|
104
|
+
className: R("appearance-none block w-full rounded-md border text-[15px] leading-[1.4] shadow-sm", "px-3 py-2 bg-(--bg-primary) text-(--text-primary) placeholder-(--text-muted)", "transition-[border-color,box-shadow,background-color] focus:outline-none", "focus:border-(--accent)/70", "disabled:bg-(--bg-primary) disabled:text-(--text-muted) disabled:cursor-not-allowed", n ? "border-(--danger) focus:border-(--danger) focus:shadow-[0_0_0_2px_var(--danger)]" : "border-(--border-light) hover:border-(--text-primary)/30", e),
|
|
105
|
+
...a
|
|
105
106
|
})
|
|
106
107
|
}),
|
|
107
|
-
n && /* @__PURE__ */
|
|
108
|
+
n && /* @__PURE__ */ E("span", {
|
|
108
109
|
className: "text-[12px] font-medium text-(--danger) flex items-center gap-1 leading-tight",
|
|
109
110
|
children: ["⚠️ ", n]
|
|
110
111
|
})
|
|
111
112
|
]
|
|
112
113
|
});
|
|
113
114
|
});
|
|
114
|
-
|
|
115
|
+
H.displayName = "Input";
|
|
115
116
|
//#endregion
|
|
116
117
|
//#region src/components/IconButton.tsx
|
|
117
|
-
var
|
|
118
|
+
var U = v.forwardRef(({ className: e, size: t = "md", variant: n = "ghost", active: i, children: a, ...o }, s) => {
|
|
118
119
|
let c = {
|
|
119
120
|
ghost: "bg-transparent text-(--text-secondary) hover:bg-(--bg-hover) hover:text-(--text-primary)",
|
|
120
121
|
filled: "bg-(--bg-secondary) text-(--text-primary) hover:bg-(--bg-hover)"
|
|
121
122
|
}, l = i ? "bg-(--bg-hover) text-(--accent)" : "";
|
|
122
|
-
return /* @__PURE__ */
|
|
123
|
+
return /* @__PURE__ */ T(r, {
|
|
123
124
|
ref: s,
|
|
124
|
-
className:
|
|
125
|
+
className: R("inline-flex items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--focus-ring) disabled:opacity-50", c[n], {
|
|
125
126
|
sm: "h-7 w-7 p-1",
|
|
126
127
|
md: "h-9 w-9 p-1.5",
|
|
127
128
|
lg: "h-11 w-11 p-2"
|
|
128
|
-
}[
|
|
129
|
+
}[t], l, e),
|
|
129
130
|
...o,
|
|
130
131
|
children: a
|
|
131
132
|
});
|
|
132
133
|
});
|
|
133
|
-
|
|
134
|
+
U.displayName = "IconButton";
|
|
134
135
|
//#endregion
|
|
135
136
|
//#region src/components/Tooltip.tsx
|
|
136
|
-
var ee = ({ content: e, children: t, side: n = "top", align: r = "center", delay: i = 200 }) => /* @__PURE__ */
|
|
137
|
+
var ee = ({ content: e, children: t, side: n = "top", align: r = "center", delay: i = 200 }) => /* @__PURE__ */ E(te, {
|
|
137
138
|
delayDuration: i,
|
|
138
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ T(_.Trigger, {
|
|
139
140
|
className: "cursor-default appearance-none border-none bg-transparent p-0",
|
|
140
141
|
children: t
|
|
141
|
-
}), /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ T(_.Portal, { children: /* @__PURE__ */ T(_.Positioner, {
|
|
142
143
|
side: n,
|
|
143
144
|
align: r,
|
|
144
145
|
sideOffset: 5,
|
|
145
|
-
children: /* @__PURE__ */
|
|
146
|
+
children: /* @__PURE__ */ E(_.Popup, {
|
|
146
147
|
className: "z-50 px-3 py-1.5 text-xs font-medium text-white bg-black rounded shadow-sm animate-in fade-in zoom-in-95 duration-200",
|
|
147
|
-
children: [e, /* @__PURE__ */
|
|
148
|
+
children: [e, /* @__PURE__ */ T(_.Arrow, { className: "fill-black" })]
|
|
148
149
|
})
|
|
149
150
|
}) })]
|
|
150
151
|
});
|
|
151
152
|
function te({ children: e }) {
|
|
152
|
-
return /* @__PURE__ */
|
|
153
|
+
return /* @__PURE__ */ T(_.Root, { children: e });
|
|
153
154
|
}
|
|
154
155
|
//#endregion
|
|
155
156
|
//#region src/components/Popover.tsx
|
|
156
|
-
var ne = ({ children: e, open: t, defaultOpen: n, onOpenChange: r, modal: i = !1 }) => /* @__PURE__ */
|
|
157
|
+
var ne = ({ children: e, open: t, defaultOpen: n, onOpenChange: r, modal: i = !1 }) => /* @__PURE__ */ T(l.Root, {
|
|
157
158
|
open: t,
|
|
158
159
|
defaultOpen: n,
|
|
159
160
|
onOpenChange: r,
|
|
160
161
|
modal: i,
|
|
161
162
|
children: e
|
|
162
|
-
}),
|
|
163
|
+
}), re = v.forwardRef(({ children: e, className: t, render: n }, r) => n ? /* @__PURE__ */ T("span", {
|
|
163
164
|
className: "contents",
|
|
164
|
-
children: /* @__PURE__ */
|
|
165
|
+
children: /* @__PURE__ */ T(l.Trigger, {
|
|
165
166
|
ref: r,
|
|
166
|
-
className:
|
|
167
|
+
className: R("outline-none", t),
|
|
167
168
|
render: n
|
|
168
169
|
})
|
|
169
|
-
}) : /* @__PURE__ */
|
|
170
|
+
}) : /* @__PURE__ */ T("span", {
|
|
170
171
|
className: "contents",
|
|
171
|
-
children: /* @__PURE__ */
|
|
172
|
+
children: /* @__PURE__ */ T(l.Trigger, {
|
|
172
173
|
ref: r,
|
|
173
|
-
className:
|
|
174
|
+
className: R("outline-none", t),
|
|
174
175
|
children: e
|
|
175
176
|
})
|
|
176
177
|
}));
|
|
177
|
-
|
|
178
|
-
var
|
|
178
|
+
re.displayName = "PopoverTrigger";
|
|
179
|
+
var ie = ({ children: e, className: t, side: n = "bottom", align: r = "center", sideOffset: i = 8, alignOffset: a = 0 }) => /* @__PURE__ */ T(l.Portal, { children: /* @__PURE__ */ T(l.Positioner, {
|
|
179
180
|
side: n,
|
|
180
181
|
align: r,
|
|
181
182
|
sideOffset: i,
|
|
182
183
|
alignOffset: a,
|
|
183
|
-
children: /* @__PURE__ */
|
|
184
|
-
className:
|
|
185
|
-
children: [e, /* @__PURE__ */
|
|
184
|
+
children: /* @__PURE__ */ E(l.Popup, {
|
|
185
|
+
className: R("z-50 min-w-50 max-w-90 rounded-lg border border-(--border-light) bg-(--bg-primary) shadow-lg", t),
|
|
186
|
+
children: [e, /* @__PURE__ */ T(l.Arrow, { className: "fill-(--bg-primary) stroke-(--border-light)" })]
|
|
186
187
|
})
|
|
187
188
|
}) });
|
|
188
|
-
|
|
189
|
-
var
|
|
189
|
+
ie.displayName = "PopoverContent";
|
|
190
|
+
var ae = v.forwardRef(({ children: e, className: t, render: n }, r) => n ? /* @__PURE__ */ T(l.Close, {
|
|
190
191
|
ref: r,
|
|
191
|
-
className:
|
|
192
|
+
className: R("outline-none", t),
|
|
192
193
|
render: n
|
|
193
|
-
}) : /* @__PURE__ */
|
|
194
|
+
}) : /* @__PURE__ */ T(l.Close, {
|
|
194
195
|
ref: r,
|
|
195
|
-
className:
|
|
196
|
+
className: R("outline-none", t),
|
|
196
197
|
children: e
|
|
197
198
|
}));
|
|
198
|
-
|
|
199
|
-
var
|
|
200
|
-
className:
|
|
199
|
+
ae.displayName = "PopoverClose";
|
|
200
|
+
var oe = ({ children: e, className: t }) => /* @__PURE__ */ T("div", {
|
|
201
|
+
className: R("px-4 py-3 border-b border-(--border-light)", "font-bold text-[15px] text-(--text-primary)", t),
|
|
201
202
|
children: e
|
|
202
|
-
}),
|
|
203
|
-
className:
|
|
203
|
+
}), se = ({ children: e, className: t }) => /* @__PURE__ */ T("div", {
|
|
204
|
+
className: R("px-4 py-3", "text-[15px] text-(--text-primary)", t),
|
|
204
205
|
children: e
|
|
205
|
-
}),
|
|
206
|
-
className:
|
|
206
|
+
}), ce = ({ children: e, className: t }) => /* @__PURE__ */ T("div", {
|
|
207
|
+
className: R("px-4 py-3 border-t border-(--border-light)", "flex items-center justify-end gap-2", t),
|
|
207
208
|
children: e
|
|
208
|
-
}),
|
|
209
|
-
let [t, n] =
|
|
209
|
+
}), le = y(null), ue = ({ children: e }) => {
|
|
210
|
+
let [t, n] = C({
|
|
210
211
|
open: !1,
|
|
211
212
|
anchor: null,
|
|
212
213
|
options: { content: null }
|
|
213
|
-
}), r =
|
|
214
|
+
}), r = b((e, t) => {
|
|
214
215
|
n({
|
|
215
216
|
open: !0,
|
|
216
217
|
anchor: e,
|
|
217
218
|
options: t
|
|
218
219
|
});
|
|
219
|
-
}, []), i =
|
|
220
|
+
}, []), i = b(() => {
|
|
220
221
|
n((e) => ({
|
|
221
222
|
...e,
|
|
222
223
|
open: !1
|
|
223
224
|
}));
|
|
224
|
-
}, []), a =
|
|
225
|
+
}, []), a = b((e, t) => {
|
|
225
226
|
n((n) => n.open && n.anchor === e ? {
|
|
226
227
|
...n,
|
|
227
228
|
open: !1
|
|
@@ -230,7 +231,7 @@ var ie = ({ children: e, className: t }) => /* @__PURE__ */ S("div", {
|
|
|
230
231
|
anchor: e,
|
|
231
232
|
options: t
|
|
232
233
|
});
|
|
233
|
-
}, []), o =
|
|
234
|
+
}, []), o = S(() => ({
|
|
234
235
|
show: r,
|
|
235
236
|
hide: i,
|
|
236
237
|
toggle: a,
|
|
@@ -241,175 +242,175 @@ var ie = ({ children: e, className: t }) => /* @__PURE__ */ S("div", {
|
|
|
241
242
|
a,
|
|
242
243
|
t.open
|
|
243
244
|
]);
|
|
244
|
-
return /* @__PURE__ */
|
|
245
|
+
return /* @__PURE__ */ E(le.Provider, {
|
|
245
246
|
value: o,
|
|
246
|
-
children: [e, /* @__PURE__ */
|
|
247
|
+
children: [e, /* @__PURE__ */ T(de, {
|
|
247
248
|
state: t,
|
|
248
249
|
onClose: i
|
|
249
250
|
})]
|
|
250
251
|
});
|
|
251
252
|
};
|
|
252
|
-
|
|
253
|
-
function
|
|
253
|
+
ue.displayName = "ImperativePopoverProvider";
|
|
254
|
+
function de({ state: e, onClose: t }) {
|
|
254
255
|
if (!e.open || !e.anchor) return null;
|
|
255
256
|
let { options: n } = e;
|
|
256
|
-
return /* @__PURE__ */
|
|
257
|
+
return /* @__PURE__ */ T(l.Root, {
|
|
257
258
|
open: e.open,
|
|
258
259
|
onOpenChange: (e) => !e && t(),
|
|
259
|
-
children: /* @__PURE__ */
|
|
260
|
+
children: /* @__PURE__ */ T(l.Portal, { children: /* @__PURE__ */ T(l.Positioner, {
|
|
260
261
|
anchor: e.anchor,
|
|
261
262
|
side: n.side ?? "bottom",
|
|
262
263
|
align: n.align ?? "center",
|
|
263
264
|
sideOffset: n.sideOffset ?? 8,
|
|
264
265
|
alignOffset: n.alignOffset ?? 0,
|
|
265
266
|
className: "z-50",
|
|
266
|
-
children: /* @__PURE__ */
|
|
267
|
-
className:
|
|
268
|
-
children: [n.content, /* @__PURE__ */
|
|
267
|
+
children: /* @__PURE__ */ E(l.Popup, {
|
|
268
|
+
className: R("z-50 min-w-50 max-w-90 rounded-lg border border-(--border-light) bg-(--bg-primary) shadow-lg", n.className),
|
|
269
|
+
children: [n.content, /* @__PURE__ */ T(l.Arrow, { className: "fill-(--bg-primary) stroke-(--border-light)" })]
|
|
269
270
|
})
|
|
270
271
|
}) })
|
|
271
272
|
});
|
|
272
273
|
}
|
|
273
|
-
function
|
|
274
|
-
let e =
|
|
274
|
+
function fe() {
|
|
275
|
+
let e = x(le);
|
|
275
276
|
if (!e) throw Error("useImperativePopover must be used within <ImperativePopoverProvider>");
|
|
276
277
|
return e;
|
|
277
278
|
}
|
|
278
279
|
//#endregion
|
|
279
280
|
//#region src/components/Menu.tsx
|
|
280
|
-
var
|
|
281
|
+
var pe = ({ children: e, open: t, defaultOpen: n, onOpenChange: r }) => /* @__PURE__ */ T(c.Root, {
|
|
281
282
|
open: t,
|
|
282
283
|
defaultOpen: n,
|
|
283
284
|
onOpenChange: r,
|
|
284
285
|
children: e
|
|
285
|
-
}),
|
|
286
|
+
}), W = v.forwardRef(({ children: e, className: t, render: n }, r) => n ? /* @__PURE__ */ T("span", {
|
|
286
287
|
className: "contents",
|
|
287
|
-
children: /* @__PURE__ */
|
|
288
|
+
children: /* @__PURE__ */ T(c.Trigger, {
|
|
288
289
|
ref: r,
|
|
289
|
-
className:
|
|
290
|
+
className: R("outline-none", t),
|
|
290
291
|
render: n
|
|
291
292
|
})
|
|
292
|
-
}) : /* @__PURE__ */
|
|
293
|
+
}) : /* @__PURE__ */ T("span", {
|
|
293
294
|
className: "contents",
|
|
294
|
-
children: /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ T(c.Trigger, {
|
|
295
296
|
ref: r,
|
|
296
|
-
className:
|
|
297
|
+
className: R("outline-none", t),
|
|
297
298
|
children: e
|
|
298
299
|
})
|
|
299
300
|
}));
|
|
300
|
-
|
|
301
|
-
var
|
|
301
|
+
W.displayName = "MenuTrigger";
|
|
302
|
+
var me = v.forwardRef(({ children: e, className: t, side: n = "bottom", align: r = "start", sideOffset: i = 4, alignOffset: a = 0 }, o) => /* @__PURE__ */ T(c.Portal, { children: /* @__PURE__ */ T(c.Positioner, {
|
|
302
303
|
side: n,
|
|
303
304
|
align: r,
|
|
304
305
|
sideOffset: i,
|
|
305
|
-
alignOffset:
|
|
306
|
-
children: /* @__PURE__ */
|
|
307
|
-
ref:
|
|
308
|
-
className:
|
|
309
|
-
children: [e, /* @__PURE__ */
|
|
306
|
+
alignOffset: a,
|
|
307
|
+
children: /* @__PURE__ */ E(c.Popup, {
|
|
308
|
+
ref: o,
|
|
309
|
+
className: R("z-50 min-w-45 max-w-80 rounded-md border border-(--border-light) bg-(--bg-primary) shadow-lg", "py-1", t),
|
|
310
|
+
children: [e, /* @__PURE__ */ T(c.Arrow, { className: "fill-(--bg-primary) stroke-(--border-light)" })]
|
|
310
311
|
})
|
|
311
312
|
}) }));
|
|
312
|
-
|
|
313
|
-
var
|
|
314
|
-
ref:
|
|
315
|
-
className:
|
|
313
|
+
me.displayName = "MenuContent";
|
|
314
|
+
var G = v.forwardRef(({ children: e, className: t, disabled: n, onSelect: r, destructive: i }, a) => /* @__PURE__ */ T(c.Item, {
|
|
315
|
+
ref: a,
|
|
316
|
+
className: R("relative flex items-center gap-2 px-3 py-1.5 text-[15px] outline-none cursor-pointer select-none", "text-(--text-primary) hover:bg-(--bg-hover)", "data-highlighted:bg-(--bg-hover)", "data-disabled:opacity-50 data-disabled:pointer-events-none", i && "text-(--danger) hover:bg-red-50 dark:hover:bg-red-950/20", t),
|
|
316
317
|
disabled: n,
|
|
317
318
|
onSelect: r,
|
|
318
319
|
children: e
|
|
319
320
|
}));
|
|
320
|
-
|
|
321
|
-
var
|
|
322
|
-
ref:
|
|
323
|
-
className:
|
|
321
|
+
G.displayName = "MenuItem";
|
|
322
|
+
var K = v.forwardRef(({ children: e, className: t, checked: n, onCheckedChange: r, disabled: i }, a) => /* @__PURE__ */ E(c.CheckboxItem, {
|
|
323
|
+
ref: a,
|
|
324
|
+
className: R("relative flex items-center gap-2 px-3 py-1.5 pl-8 text-[15px] outline-none cursor-pointer select-none", "text-(--text-primary) hover:bg-(--bg-hover)", "data-highlighted:bg-(--bg-hover)", "data-disabled:opacity-50 data-disabled:pointer-events-none", t),
|
|
324
325
|
checked: n,
|
|
325
326
|
onCheckedChange: r,
|
|
326
327
|
disabled: i,
|
|
327
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ T(c.CheckboxItemIndicator, {
|
|
328
329
|
className: "absolute left-2 flex items-center justify-center",
|
|
329
|
-
children: /* @__PURE__ */
|
|
330
|
+
children: /* @__PURE__ */ T(O, { className: "w-4 h-4" })
|
|
330
331
|
}), e]
|
|
331
332
|
}));
|
|
332
|
-
|
|
333
|
-
var
|
|
333
|
+
K.displayName = "MenuCheckboxItem";
|
|
334
|
+
var he = ({ children: e, value: t, onValueChange: n }) => /* @__PURE__ */ T(c.RadioGroup, {
|
|
334
335
|
value: t,
|
|
335
336
|
onValueChange: n,
|
|
336
337
|
children: e
|
|
337
|
-
}),
|
|
338
|
+
}), q = v.forwardRef(({ children: e, value: t, className: n, disabled: r }, i) => /* @__PURE__ */ E(c.RadioItem, {
|
|
338
339
|
ref: i,
|
|
339
340
|
value: t,
|
|
340
|
-
className:
|
|
341
|
+
className: R("relative flex items-center gap-2 px-3 py-1.5 pl-8 text-[15px] outline-none cursor-pointer select-none", "text-(--text-primary) hover:bg-(--bg-hover)", "data-highlighted:bg-(--bg-hover)", "data-disabled:opacity-50 data-disabled:pointer-events-none", n),
|
|
341
342
|
disabled: r,
|
|
342
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ T(c.RadioItemIndicator, {
|
|
343
344
|
className: "absolute left-2 flex items-center justify-center",
|
|
344
|
-
children: /* @__PURE__ */
|
|
345
|
+
children: /* @__PURE__ */ T(O, { className: "w-4 h-4" })
|
|
345
346
|
}), e]
|
|
346
347
|
}));
|
|
347
|
-
|
|
348
|
-
var
|
|
349
|
-
className:
|
|
348
|
+
q.displayName = "MenuRadioItem";
|
|
349
|
+
var ge = ({ children: e, className: t }) => /* @__PURE__ */ T("div", {
|
|
350
|
+
className: R("px-3 py-2 text-xs font-semibold text-(--text-muted) uppercase tracking-wider", t),
|
|
350
351
|
children: e
|
|
351
|
-
}),
|
|
352
|
+
}), _e = ({ className: e }) => /* @__PURE__ */ T(c.Separator, { className: R("my-1 h-px bg-(--border-light)", e) }), ve = ({ children: e, open: t, defaultOpen: n, onOpenChange: r }) => /* @__PURE__ */ T(c.Root, {
|
|
352
353
|
open: t,
|
|
353
354
|
defaultOpen: n,
|
|
354
355
|
onOpenChange: r,
|
|
355
356
|
children: e
|
|
356
|
-
}),
|
|
357
|
+
}), ye = v.forwardRef(({ children: e, className: t, disabled: n }, r) => /* @__PURE__ */ E(c.Trigger, {
|
|
357
358
|
ref: r,
|
|
358
|
-
className:
|
|
359
|
+
className: R("relative flex items-center justify-between gap-2 px-3 py-2 text-[15px] outline-none cursor-pointer select-none", "text-(--text-primary) hover:bg-(--bg-hover)", "data-highlighted:bg-(--bg-hover)", "data-disabled:opacity-50 data-disabled:pointer-events-none w-full", t),
|
|
359
360
|
disabled: n,
|
|
360
|
-
children: [e, /* @__PURE__ */
|
|
361
|
+
children: [e, /* @__PURE__ */ T(j, { className: "w-4 h-4 ml-auto" })]
|
|
361
362
|
}));
|
|
362
|
-
|
|
363
|
-
var
|
|
363
|
+
ye.displayName = "MenuSubTrigger";
|
|
364
|
+
var be = v.forwardRef(({ children: e, className: t }, n) => /* @__PURE__ */ T(c.Portal, { children: /* @__PURE__ */ T(c.Positioner, {
|
|
364
365
|
side: "right",
|
|
365
366
|
align: "start",
|
|
366
367
|
sideOffset: 8,
|
|
367
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ T(c.Popup, {
|
|
368
369
|
ref: n,
|
|
369
|
-
className:
|
|
370
|
+
className: R("z-50 min-w-45 max-w-80 rounded-md border border-(--border-light) bg-(--bg-primary) shadow-lg", "py-1", t),
|
|
370
371
|
children: e
|
|
371
372
|
})
|
|
372
373
|
}) }));
|
|
373
|
-
|
|
374
|
-
var
|
|
374
|
+
be.displayName = "MenuSubContent";
|
|
375
|
+
var xe = ({ icon: e, children: t, shortcut: n, className: r, disabled: i, onSelect: a, destructive: o }) => /* @__PURE__ */ E(G, {
|
|
375
376
|
className: r,
|
|
376
377
|
disabled: i,
|
|
377
378
|
onSelect: a,
|
|
378
379
|
destructive: o,
|
|
379
380
|
children: [
|
|
380
|
-
e && /* @__PURE__ */
|
|
381
|
+
e && /* @__PURE__ */ T("span", {
|
|
381
382
|
className: "shrink-0",
|
|
382
383
|
children: e
|
|
383
384
|
}),
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ T("span", {
|
|
385
386
|
className: "flex-1",
|
|
386
387
|
children: t
|
|
387
388
|
}),
|
|
388
|
-
n && /* @__PURE__ */
|
|
389
|
+
n && /* @__PURE__ */ T("span", {
|
|
389
390
|
className: "ml-auto text-xs text-(--text-muted)",
|
|
390
391
|
children: n
|
|
391
392
|
})
|
|
392
393
|
]
|
|
393
|
-
}),
|
|
394
|
-
let [i,
|
|
395
|
-
return /* @__PURE__ */
|
|
394
|
+
}), J = v.createContext(null), Se = ({ children: e, open: t, defaultOpen: n, onOpenChange: r }) => {
|
|
395
|
+
let [i, a] = v.useState(n ?? !1), [o, s] = v.useState(null), l = t ?? i;
|
|
396
|
+
return /* @__PURE__ */ T(J.Provider, {
|
|
396
397
|
value: {
|
|
397
|
-
anchorEl:
|
|
398
|
-
setAnchorEl:
|
|
398
|
+
anchorEl: o,
|
|
399
|
+
setAnchorEl: s
|
|
399
400
|
},
|
|
400
|
-
children: /* @__PURE__ */
|
|
401
|
+
children: /* @__PURE__ */ T(c.Root, {
|
|
401
402
|
open: l,
|
|
402
403
|
onOpenChange: (e) => {
|
|
403
|
-
|
|
404
|
+
a(e), r?.(e);
|
|
404
405
|
},
|
|
405
406
|
children: e
|
|
406
407
|
})
|
|
407
408
|
});
|
|
408
|
-
},
|
|
409
|
-
let i =
|
|
410
|
-
return /* @__PURE__ */
|
|
409
|
+
}, Ce = v.forwardRef(({ children: e, className: t, disabled: n }, r) => {
|
|
410
|
+
let i = v.useContext(J), a = v.useRef(null);
|
|
411
|
+
return /* @__PURE__ */ E("div", {
|
|
411
412
|
ref: r,
|
|
412
|
-
className:
|
|
413
|
+
className: R("outline-none focus:outline-none", t),
|
|
413
414
|
onContextMenu: (e) => {
|
|
414
415
|
e.preventDefault(), !n && (i?.setAnchorEl({ getBoundingClientRect: () => ({
|
|
415
416
|
width: 0,
|
|
@@ -423,10 +424,10 @@ var ye = ({ icon: e, children: t, shortcut: n, className: r, disabled: i, onSele
|
|
|
423
424
|
toJSON: () => ({})
|
|
424
425
|
}) }), a.current && a.current.click());
|
|
425
426
|
},
|
|
426
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ T(W, {
|
|
427
428
|
ref: a,
|
|
428
429
|
className: "!absolute !w-0 !h-0 !p-0 !m-0 !border-0 !outline-none !shadow-none !opacity-0 overflow-hidden pointer-events-none",
|
|
429
|
-
render: /* @__PURE__ */
|
|
430
|
+
render: /* @__PURE__ */ T("button", {
|
|
430
431
|
disabled: n,
|
|
431
432
|
tabIndex: -1,
|
|
432
433
|
"aria-hidden": "true"
|
|
@@ -434,23 +435,23 @@ var ye = ({ icon: e, children: t, shortcut: n, className: r, disabled: i, onSele
|
|
|
434
435
|
}), e]
|
|
435
436
|
});
|
|
436
437
|
});
|
|
437
|
-
|
|
438
|
-
var
|
|
439
|
-
let r =
|
|
440
|
-
return /* @__PURE__ */
|
|
438
|
+
Ce.displayName = "ContextMenuTrigger";
|
|
439
|
+
var we = v.forwardRef(({ children: e, className: t }, n) => {
|
|
440
|
+
let r = v.useContext(J);
|
|
441
|
+
return /* @__PURE__ */ T(c.Portal, { children: /* @__PURE__ */ T(c.Positioner, {
|
|
441
442
|
anchor: r?.anchorEl || void 0,
|
|
442
443
|
side: "bottom",
|
|
443
444
|
align: "start",
|
|
444
445
|
sideOffset: 4,
|
|
445
|
-
children: /* @__PURE__ */
|
|
446
|
+
children: /* @__PURE__ */ T(c.Popup, {
|
|
446
447
|
ref: n,
|
|
447
|
-
className:
|
|
448
|
+
className: R("z-50 min-w-56 rounded-md border border-(--border-light) bg-(--bg-primary) shadow-lg", "py-1 outline-0", t),
|
|
448
449
|
children: e
|
|
449
450
|
})
|
|
450
451
|
}) });
|
|
451
452
|
});
|
|
452
|
-
|
|
453
|
-
var
|
|
453
|
+
we.displayName = "ContextMenuContent";
|
|
454
|
+
var Y = v.forwardRef(({ children: e, className: t, disabled: n, onSelect: r, destructive: i }, a) => /* @__PURE__ */ T(G, {
|
|
454
455
|
ref: a,
|
|
455
456
|
className: t,
|
|
456
457
|
disabled: n,
|
|
@@ -458,8 +459,8 @@ var J = h.forwardRef(({ children: e, className: t, disabled: n, onSelect: r, des
|
|
|
458
459
|
destructive: i,
|
|
459
460
|
children: e
|
|
460
461
|
}));
|
|
461
|
-
|
|
462
|
-
var
|
|
462
|
+
Y.displayName = "ContextMenuItem";
|
|
463
|
+
var Te = v.forwardRef(({ children: e, className: t, checked: n, onCheckedChange: r, disabled: i }, a) => /* @__PURE__ */ T(K, {
|
|
463
464
|
ref: a,
|
|
464
465
|
className: t,
|
|
465
466
|
checked: n,
|
|
@@ -467,71 +468,71 @@ var Ce = h.forwardRef(({ children: e, className: t, checked: n, onCheckedChange:
|
|
|
467
468
|
disabled: i,
|
|
468
469
|
children: e
|
|
469
470
|
}));
|
|
470
|
-
|
|
471
|
-
var
|
|
471
|
+
Te.displayName = "ContextMenuCheckboxItem";
|
|
472
|
+
var Ee = ({ children: e, value: t, onValueChange: n }) => /* @__PURE__ */ T(c.RadioGroup, {
|
|
472
473
|
value: t,
|
|
473
474
|
onValueChange: n,
|
|
474
475
|
children: e
|
|
475
|
-
}),
|
|
476
|
+
}), De = v.forwardRef(({ children: e, value: t, className: n, disabled: r }, i) => /* @__PURE__ */ T(q, {
|
|
476
477
|
ref: i,
|
|
477
478
|
value: t,
|
|
478
479
|
className: n,
|
|
479
480
|
disabled: r,
|
|
480
481
|
children: e
|
|
481
482
|
}));
|
|
482
|
-
|
|
483
|
-
var
|
|
484
|
-
className:
|
|
483
|
+
De.displayName = "ContextMenuRadioItem";
|
|
484
|
+
var Oe = ({ children: e, className: t }) => /* @__PURE__ */ T("div", {
|
|
485
|
+
className: R("px-3 py-2 text-xs font-semibold text-(--text-muted) uppercase tracking-wider", t),
|
|
485
486
|
children: e
|
|
486
|
-
}),
|
|
487
|
+
}), ke = ({ className: e }) => /* @__PURE__ */ T(c.Separator, { className: R("my-1 h-px bg-(--border-light)", e) }), Ae = ({ children: e, open: t, defaultOpen: n, onOpenChange: r }) => /* @__PURE__ */ T(c.Root, {
|
|
487
488
|
open: t,
|
|
488
489
|
defaultOpen: n,
|
|
489
490
|
onOpenChange: r,
|
|
490
491
|
children: e
|
|
491
|
-
}),
|
|
492
|
+
}), je = v.forwardRef(({ children: e, className: t, disabled: n }, r) => /* @__PURE__ */ T(W, {
|
|
492
493
|
ref: r,
|
|
493
|
-
className:
|
|
494
|
-
render: /* @__PURE__ */
|
|
494
|
+
className: R("relative flex items-center justify-between gap-2 px-3 py-2 text-[15px] cursor-pointer select-none", "text-(--text-primary) hover:bg-(--bg-hover)", "data-highlighted:bg-(--bg-hover)", "data-disabled:opacity-50 data-disabled:pointer-events-none w-full", t),
|
|
495
|
+
render: /* @__PURE__ */ E("button", {
|
|
495
496
|
disabled: n,
|
|
496
|
-
children: [e, /* @__PURE__ */
|
|
497
|
+
children: [e, /* @__PURE__ */ T(j, { className: "w-4 h-4 ml-auto" })]
|
|
497
498
|
})
|
|
498
499
|
}));
|
|
499
|
-
|
|
500
|
-
var
|
|
500
|
+
je.displayName = "ContextMenuSubTrigger";
|
|
501
|
+
var Me = v.forwardRef(({ children: e, className: t }, n) => /* @__PURE__ */ T(c.Portal, { children: /* @__PURE__ */ T(c.Positioner, {
|
|
501
502
|
side: "right",
|
|
502
503
|
align: "start",
|
|
503
504
|
sideOffset: 8,
|
|
504
|
-
children: /* @__PURE__ */
|
|
505
|
+
children: /* @__PURE__ */ T(c.Popup, {
|
|
505
506
|
ref: n,
|
|
506
|
-
className:
|
|
507
|
+
className: R("z-50 min-w-45 max-w-80 rounded-md border border-(--border-light) bg-(--bg-primary) shadow-lg", "py-1", t),
|
|
507
508
|
children: e
|
|
508
509
|
})
|
|
509
510
|
}) }));
|
|
510
|
-
|
|
511
|
-
var
|
|
511
|
+
Me.displayName = "ContextMenuSubContent";
|
|
512
|
+
var Ne = ({ icon: e, children: t, shortcut: n, className: r, disabled: i, onSelect: a, destructive: o }) => /* @__PURE__ */ E(Y, {
|
|
512
513
|
className: r,
|
|
513
514
|
disabled: i,
|
|
514
515
|
onSelect: a,
|
|
515
516
|
destructive: o,
|
|
516
517
|
children: [
|
|
517
|
-
e && /* @__PURE__ */
|
|
518
|
+
e && /* @__PURE__ */ T("span", {
|
|
518
519
|
className: "shrink-0",
|
|
519
520
|
children: e
|
|
520
521
|
}),
|
|
521
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ T("span", {
|
|
522
523
|
className: "flex-1",
|
|
523
524
|
children: t
|
|
524
525
|
}),
|
|
525
|
-
n && /* @__PURE__ */
|
|
526
|
+
n && /* @__PURE__ */ T("span", {
|
|
526
527
|
className: "ml-auto text-xs text-(--text-muted)",
|
|
527
528
|
children: n
|
|
528
529
|
})
|
|
529
530
|
]
|
|
530
|
-
}),
|
|
531
|
+
}), X = ({ open: e, onOpenChange: t, title: n, description: r, children: i, size: a = "xl", showCloseButton: s = !0, className: c }) => /* @__PURE__ */ T(o.Root, {
|
|
531
532
|
open: e,
|
|
532
533
|
onOpenChange: t,
|
|
533
|
-
children: /* @__PURE__ */
|
|
534
|
-
className:
|
|
534
|
+
children: /* @__PURE__ */ E(o.Portal, { children: [/* @__PURE__ */ T(o.Backdrop, { className: "fixed inset-0 bg-black/50 z-40 transition-opacity duration-200" }), /* @__PURE__ */ E(o.Popup, {
|
|
535
|
+
className: R("fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%]", "w-full", {
|
|
535
536
|
sm: "max-w-sm",
|
|
536
537
|
md: "max-w-md",
|
|
537
538
|
lg: "max-w-lg",
|
|
@@ -539,52 +540,52 @@ var je = ({ icon: e, children: t, shortcut: n, className: r, disabled: i, onSele
|
|
|
539
540
|
"2xl": "max-w-2xl",
|
|
540
541
|
"3xl": "max-w-3xl",
|
|
541
542
|
"4xl": "max-w-4xl"
|
|
542
|
-
}[
|
|
543
|
-
children: [(n || s) && /* @__PURE__ */
|
|
543
|
+
}[a], "bg-(--bg-primary) rounded-xl border border-(--border-gray)", "transition-all duration-200", "outline-none focus-visible:outline-none", c),
|
|
544
|
+
children: [(n || s) && /* @__PURE__ */ E("div", {
|
|
544
545
|
className: "flex items-start justify-between p-6 border-b border-(--border-light)",
|
|
545
|
-
children: [/* @__PURE__ */
|
|
546
|
+
children: [/* @__PURE__ */ E("div", {
|
|
546
547
|
className: "flex-1",
|
|
547
|
-
children: [n && /* @__PURE__ */
|
|
548
|
+
children: [n && /* @__PURE__ */ T(o.Title, {
|
|
548
549
|
className: "text-2xl font-black text-(--text-primary) leading-tight",
|
|
549
550
|
children: n
|
|
550
|
-
}),
|
|
551
|
+
}), r && /* @__PURE__ */ T(o.Description, {
|
|
551
552
|
className: "text-(--text-secondary) mt-2 text-sm",
|
|
552
|
-
children:
|
|
553
|
+
children: r
|
|
553
554
|
})]
|
|
554
|
-
}), s && /* @__PURE__ */
|
|
555
|
+
}), s && /* @__PURE__ */ T(o.Close, {
|
|
555
556
|
className: "ml-4 p-2 rounded hover:bg-(--bg-hover) text-(--text-secondary) hover:text-(--text-primary) transition-colors focus-visible:ring-2 focus-visible:ring-(--slack-blue) focus-visible:ring-offset-2 outline-none",
|
|
556
557
|
"aria-label": "Close dialog",
|
|
557
|
-
children: /* @__PURE__ */
|
|
558
|
+
children: /* @__PURE__ */ T(F, { className: "w-5 h-5" })
|
|
558
559
|
})]
|
|
559
|
-
}), /* @__PURE__ */
|
|
560
|
+
}), /* @__PURE__ */ T("div", {
|
|
560
561
|
className: "p-6",
|
|
561
|
-
children:
|
|
562
|
+
children: i
|
|
562
563
|
})]
|
|
563
564
|
})] })
|
|
564
565
|
});
|
|
565
|
-
|
|
566
|
-
var
|
|
567
|
-
className:
|
|
566
|
+
X.displayName = "Dialog";
|
|
567
|
+
var Pe = ({ children: e, className: t }) => /* @__PURE__ */ T("div", {
|
|
568
|
+
className: R("mb-4", t),
|
|
568
569
|
children: e
|
|
569
|
-
}),
|
|
570
|
-
className:
|
|
570
|
+
}), Fe = ({ children: e, className: t }) => /* @__PURE__ */ T("div", {
|
|
571
|
+
className: R("text-(--text-primary)", t),
|
|
571
572
|
children: e
|
|
572
|
-
}),
|
|
573
|
-
className:
|
|
573
|
+
}), Ie = ({ children: e, className: t }) => /* @__PURE__ */ T("div", {
|
|
574
|
+
className: R("flex items-center justify-end gap-3 mt-6 pt-4 border-t border-(--border-light)", t),
|
|
574
575
|
children: e
|
|
575
|
-
}),
|
|
576
|
-
ref:
|
|
576
|
+
}), Le = v.forwardRef(({ children: e, asChild: t, ...n }, r) => t ? /* @__PURE__ */ T(o.Trigger, {
|
|
577
|
+
ref: r,
|
|
577
578
|
children: e
|
|
578
|
-
}) : /* @__PURE__ */
|
|
579
|
-
ref:
|
|
579
|
+
}) : /* @__PURE__ */ T(o.Trigger, {
|
|
580
|
+
ref: r,
|
|
580
581
|
...n,
|
|
581
582
|
children: e
|
|
582
583
|
}));
|
|
583
|
-
|
|
584
|
-
var
|
|
585
|
-
let [t, n] =
|
|
584
|
+
Le.displayName = "DialogTrigger";
|
|
585
|
+
var Re = o.Close, ze = y(null), Be = ({ children: e }) => {
|
|
586
|
+
let [t, n] = C([]), r = b((e) => {
|
|
586
587
|
n((t) => t.filter((t) => t.id !== e));
|
|
587
|
-
}, []), i =
|
|
588
|
+
}, []), i = b((e) => new Promise((t) => {
|
|
588
589
|
let r = Math.random().toString(36).slice(2, 9);
|
|
589
590
|
n((n) => [...n, {
|
|
590
591
|
...e,
|
|
@@ -592,7 +593,7 @@ var Fe = r.Close, Ie = g(null), Le = ({ children: e }) => {
|
|
|
592
593
|
type: "show",
|
|
593
594
|
resolve: () => t()
|
|
594
595
|
}]);
|
|
595
|
-
}), []), a =
|
|
596
|
+
}), []), a = b((e) => new Promise((t) => {
|
|
596
597
|
let r = Math.random().toString(36).slice(2, 9);
|
|
597
598
|
n((n) => [...n, {
|
|
598
599
|
...e,
|
|
@@ -600,7 +601,7 @@ var Fe = r.Close, Ie = g(null), Le = ({ children: e }) => {
|
|
|
600
601
|
type: "confirm",
|
|
601
602
|
resolve: t
|
|
602
603
|
}]);
|
|
603
|
-
}), []), o =
|
|
604
|
+
}), []), o = b((e) => new Promise((t) => {
|
|
604
605
|
let r = Math.random().toString(36).slice(2, 9);
|
|
605
606
|
n((n) => [...n, {
|
|
606
607
|
...e,
|
|
@@ -608,7 +609,7 @@ var Fe = r.Close, Ie = g(null), Le = ({ children: e }) => {
|
|
|
608
609
|
type: "alert",
|
|
609
610
|
resolve: () => t()
|
|
610
611
|
}]);
|
|
611
|
-
}), []), s =
|
|
612
|
+
}), []), s = S(() => ({
|
|
612
613
|
show: i,
|
|
613
614
|
confirm: a,
|
|
614
615
|
alert: o
|
|
@@ -617,17 +618,17 @@ var Fe = r.Close, Ie = g(null), Le = ({ children: e }) => {
|
|
|
617
618
|
a,
|
|
618
619
|
o
|
|
619
620
|
]);
|
|
620
|
-
return /* @__PURE__ */
|
|
621
|
+
return /* @__PURE__ */ E(ze.Provider, {
|
|
621
622
|
value: s,
|
|
622
|
-
children: [e, t.map((e) => /* @__PURE__ */
|
|
623
|
+
children: [e, t.map((e) => /* @__PURE__ */ T(Ve, {
|
|
623
624
|
dialog: e,
|
|
624
625
|
onRemove: () => r(e.id)
|
|
625
626
|
}, e.id))]
|
|
626
627
|
});
|
|
627
628
|
};
|
|
628
|
-
|
|
629
|
-
function
|
|
630
|
-
let [n, r] =
|
|
629
|
+
Be.displayName = "DialogProvider";
|
|
630
|
+
function Ve({ dialog: e, onRemove: t }) {
|
|
631
|
+
let [n, r] = C(!0), i = b((n) => {
|
|
631
632
|
r(!1), e.resolve(n), setTimeout(t, 300);
|
|
632
633
|
}, [e, t]), a = {
|
|
633
634
|
open: n,
|
|
@@ -636,115 +637,115 @@ function Re({ dialog: e, onRemove: t }) {
|
|
|
636
637
|
size: e.size,
|
|
637
638
|
className: e.className
|
|
638
639
|
};
|
|
639
|
-
return e.type === "show" ? /* @__PURE__ */
|
|
640
|
+
return e.type === "show" ? /* @__PURE__ */ T(X, {
|
|
640
641
|
...a,
|
|
641
642
|
showCloseButton: e.showCloseButton ?? !0,
|
|
642
643
|
onOpenChange: (e) => !e && i(!1),
|
|
643
644
|
children: e.content
|
|
644
|
-
}) : e.type === "confirm" ? /* @__PURE__ */
|
|
645
|
+
}) : e.type === "confirm" ? /* @__PURE__ */ E(X, {
|
|
645
646
|
...a,
|
|
646
647
|
size: e.size ?? "sm",
|
|
647
648
|
showCloseButton: !1,
|
|
648
649
|
onOpenChange: (e) => !e && i(!1),
|
|
649
|
-
children: [e.content, /* @__PURE__ */
|
|
650
|
+
children: [e.content, /* @__PURE__ */ E(Ie, { children: [/* @__PURE__ */ T(z, {
|
|
650
651
|
variant: "secondary",
|
|
651
652
|
onClick: () => i(!1),
|
|
652
653
|
children: e.cancelLabel ?? "Cancel"
|
|
653
|
-
}), /* @__PURE__ */
|
|
654
|
+
}), /* @__PURE__ */ T(z, {
|
|
654
655
|
variant: e.confirmVariant ?? "primary",
|
|
655
656
|
onClick: () => i(!0),
|
|
656
657
|
children: e.confirmLabel ?? "Confirm"
|
|
657
658
|
})] })]
|
|
658
|
-
}) : /* @__PURE__ */
|
|
659
|
+
}) : /* @__PURE__ */ E(X, {
|
|
659
660
|
...a,
|
|
660
661
|
size: e.size ?? "sm",
|
|
661
662
|
showCloseButton: !1,
|
|
662
663
|
onOpenChange: (e) => !e && i(!0),
|
|
663
|
-
children: [e.content, /* @__PURE__ */
|
|
664
|
+
children: [e.content, /* @__PURE__ */ T(Ie, { children: /* @__PURE__ */ T(z, {
|
|
664
665
|
variant: "primary",
|
|
665
666
|
onClick: () => i(!0),
|
|
666
667
|
children: e.confirmLabel ?? "OK"
|
|
667
668
|
}) })]
|
|
668
669
|
});
|
|
669
670
|
}
|
|
670
|
-
function
|
|
671
|
-
let e =
|
|
671
|
+
function He() {
|
|
672
|
+
let e = x(ze);
|
|
672
673
|
if (!e) throw Error("useDialog must be used within <DialogProvider>");
|
|
673
674
|
return e;
|
|
674
675
|
}
|
|
675
676
|
//#endregion
|
|
676
677
|
//#region src/components/AlertDialog.tsx
|
|
677
|
-
var
|
|
678
|
+
var Ue = {
|
|
678
679
|
info: {
|
|
679
|
-
icon:
|
|
680
|
+
icon: N,
|
|
680
681
|
iconClassName: "text-(--slack-blue)",
|
|
681
682
|
bgClassName: "bg-(--slack-blue)/10"
|
|
682
683
|
},
|
|
683
684
|
success: {
|
|
684
|
-
icon:
|
|
685
|
+
icon: k,
|
|
685
686
|
iconClassName: "text-(--slack-green)",
|
|
686
687
|
bgClassName: "bg-(--slack-green)/10"
|
|
687
688
|
},
|
|
688
689
|
warning: {
|
|
689
|
-
icon:
|
|
690
|
+
icon: D,
|
|
690
691
|
iconClassName: "text-[#E2A03F]",
|
|
691
692
|
bgClassName: "bg-[#E2A03F]/10"
|
|
692
693
|
},
|
|
693
694
|
danger: {
|
|
694
|
-
icon:
|
|
695
|
+
icon: I,
|
|
695
696
|
iconClassName: "text-(--danger)",
|
|
696
697
|
bgClassName: "bg-(--danger)/10"
|
|
697
698
|
}
|
|
698
|
-
},
|
|
699
|
-
let [m,
|
|
700
|
-
return /* @__PURE__ */
|
|
699
|
+
}, We = ({ open: e, onOpenChange: t, title: n, description: r, children: i, variant: a = "info", confirmText: s = "Confirm", cancelText: c = "Cancel", onConfirm: l, onCancel: u, showCancel: d = !0, confirmButtonVariant: f, className: p }) => {
|
|
700
|
+
let [m, h] = v.useState(!1), g = Ue[a], _ = g.icon, y = f ?? (a === "danger" ? "danger" : "primary");
|
|
701
|
+
return /* @__PURE__ */ T(o.Root, {
|
|
701
702
|
open: e,
|
|
702
703
|
onOpenChange: t,
|
|
703
|
-
children: /* @__PURE__ */
|
|
704
|
-
className:
|
|
705
|
-
children: /* @__PURE__ */
|
|
704
|
+
children: /* @__PURE__ */ E(o.Portal, { children: [/* @__PURE__ */ T(o.Backdrop, { className: "fixed inset-0 bg-black/50 z-40 transition-opacity duration-200" }), /* @__PURE__ */ T(o.Popup, {
|
|
705
|
+
className: R("fixed left-[50%] top-[50%] z-50 translate-x-[-50%] translate-y-[-50%]", "w-full max-w-md", "bg-(--bg-primary) rounded-lg shadow-2xl border border-(--border-gray)", "transition-all duration-200", "outline-none focus-visible:outline-none", p),
|
|
706
|
+
children: /* @__PURE__ */ E("div", {
|
|
706
707
|
className: "p-6",
|
|
707
708
|
children: [
|
|
708
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ E("div", {
|
|
709
710
|
className: "flex items-start gap-4 mb-4",
|
|
710
|
-
children: [/* @__PURE__ */
|
|
711
|
-
className:
|
|
712
|
-
children: /* @__PURE__ */
|
|
713
|
-
}), /* @__PURE__ */
|
|
711
|
+
children: [/* @__PURE__ */ T("div", {
|
|
712
|
+
className: R("p-2 rounded-lg shrink-0", g.bgClassName),
|
|
713
|
+
children: /* @__PURE__ */ T(_, { className: R("w-6 h-6", g.iconClassName) })
|
|
714
|
+
}), /* @__PURE__ */ E("div", {
|
|
714
715
|
className: "flex-1",
|
|
715
|
-
children: [/* @__PURE__ */
|
|
716
|
+
children: [/* @__PURE__ */ T(o.Title, {
|
|
716
717
|
className: "text-xl font-black text-(--text-primary) leading-tight",
|
|
717
718
|
children: n
|
|
718
|
-
}),
|
|
719
|
+
}), r && /* @__PURE__ */ T(o.Description, {
|
|
719
720
|
className: "text-(--text-secondary) mt-2 text-[15px] leading-relaxed",
|
|
720
|
-
children:
|
|
721
|
+
children: r
|
|
721
722
|
})]
|
|
722
723
|
})]
|
|
723
724
|
}),
|
|
724
|
-
|
|
725
|
+
i && /* @__PURE__ */ T("div", {
|
|
725
726
|
className: "mb-4 pl-14 text-(--text-primary) text-[15px] leading-relaxed",
|
|
726
|
-
children:
|
|
727
|
+
children: i
|
|
727
728
|
}),
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
+
/* @__PURE__ */ E("div", {
|
|
729
730
|
className: "flex items-center justify-end gap-3 mt-6",
|
|
730
|
-
children: [d && /* @__PURE__ */
|
|
731
|
+
children: [d && /* @__PURE__ */ T(z, {
|
|
731
732
|
variant: "secondary",
|
|
732
733
|
onClick: () => {
|
|
733
734
|
u?.(), t?.(!1);
|
|
734
735
|
},
|
|
735
736
|
disabled: m,
|
|
736
737
|
children: c
|
|
737
|
-
}), /* @__PURE__ */
|
|
738
|
+
}), /* @__PURE__ */ T(z, {
|
|
738
739
|
variant: y,
|
|
739
740
|
onClick: async () => {
|
|
740
741
|
if (l) {
|
|
741
|
-
|
|
742
|
+
h(!0);
|
|
742
743
|
try {
|
|
743
744
|
await l(), t?.(!1);
|
|
744
745
|
} catch (e) {
|
|
745
746
|
console.error("AlertDialog confirm error:", e);
|
|
746
747
|
} finally {
|
|
747
|
-
|
|
748
|
+
h(!1);
|
|
748
749
|
}
|
|
749
750
|
} else t?.(!1);
|
|
750
751
|
},
|
|
@@ -757,39 +758,39 @@ var Be = {
|
|
|
757
758
|
})] })
|
|
758
759
|
});
|
|
759
760
|
};
|
|
760
|
-
|
|
761
|
-
var
|
|
762
|
-
ref:
|
|
761
|
+
We.displayName = "AlertDialog";
|
|
762
|
+
var Ge = v.forwardRef(({ children: e, asChild: t, ...n }, r) => t ? /* @__PURE__ */ T(o.Trigger, {
|
|
763
|
+
ref: r,
|
|
763
764
|
children: e
|
|
764
|
-
}) : /* @__PURE__ */
|
|
765
|
-
ref:
|
|
765
|
+
}) : /* @__PURE__ */ T(o.Trigger, {
|
|
766
|
+
ref: r,
|
|
766
767
|
...n,
|
|
767
768
|
children: e
|
|
768
769
|
}));
|
|
769
|
-
|
|
770
|
+
Ge.displayName = "AlertDialogTrigger";
|
|
770
771
|
//#endregion
|
|
771
772
|
//#region src/components/Form.tsx
|
|
772
|
-
var
|
|
773
|
-
let e =
|
|
773
|
+
var Ke = v.createContext(null), Z = () => {
|
|
774
|
+
let e = v.useContext(Ke);
|
|
774
775
|
if (!e) throw Error("Form components must be used within a Form component");
|
|
775
776
|
return e;
|
|
776
|
-
},
|
|
777
|
-
let [o, s] =
|
|
777
|
+
}, qe = ({ children: e, onSubmit: t, initialValues: n = {}, validate: r, className: i, ...a }) => {
|
|
778
|
+
let [o, s] = v.useState(n), [c, l] = v.useState({}), [u, d] = v.useState({}), f = v.useCallback((e, t) => {
|
|
778
779
|
s((n) => ({
|
|
779
780
|
...n,
|
|
780
781
|
[e]: t
|
|
781
782
|
}));
|
|
782
|
-
}, []), p =
|
|
783
|
+
}, []), p = v.useCallback((e, t) => {
|
|
783
784
|
d((n) => ({
|
|
784
785
|
...n,
|
|
785
786
|
[e]: t
|
|
786
787
|
}));
|
|
787
|
-
}, []), m =
|
|
788
|
+
}, []), m = v.useCallback((e, t) => {
|
|
788
789
|
l((n) => ({
|
|
789
790
|
...n,
|
|
790
791
|
[e]: t
|
|
791
792
|
}));
|
|
792
|
-
}, []),
|
|
793
|
+
}, []), h = async (e) => {
|
|
793
794
|
e.preventDefault();
|
|
794
795
|
let n = r?.(o) ?? {};
|
|
795
796
|
if (l(n), d(Object.keys(o).reduce((e, t) => (e[t] = !0, e), {})), Object.keys(n).length === 0) try {
|
|
@@ -797,7 +798,7 @@ var Ue = h.createContext(null), Z = () => {
|
|
|
797
798
|
} catch (e) {
|
|
798
799
|
console.error("Form submission error:", e);
|
|
799
800
|
}
|
|
800
|
-
},
|
|
801
|
+
}, g = {
|
|
801
802
|
errors: c,
|
|
802
803
|
touched: u,
|
|
803
804
|
values: o,
|
|
@@ -805,25 +806,25 @@ var Ue = h.createContext(null), Z = () => {
|
|
|
805
806
|
setFieldTouched: p,
|
|
806
807
|
setFieldError: m
|
|
807
808
|
};
|
|
808
|
-
return /* @__PURE__ */
|
|
809
|
-
value:
|
|
810
|
-
children: /* @__PURE__ */
|
|
811
|
-
onSubmit:
|
|
812
|
-
className:
|
|
809
|
+
return /* @__PURE__ */ T(Ke.Provider, {
|
|
810
|
+
value: g,
|
|
811
|
+
children: /* @__PURE__ */ T("form", {
|
|
812
|
+
onSubmit: h,
|
|
813
|
+
className: R("space-y-4", i),
|
|
813
814
|
...a,
|
|
814
815
|
children: e
|
|
815
816
|
})
|
|
816
817
|
});
|
|
817
818
|
};
|
|
818
|
-
|
|
819
|
-
var
|
|
819
|
+
qe.displayName = "Form";
|
|
820
|
+
var Je = ({ name: e, label: t, children: n, required: r, className: i }) => {
|
|
820
821
|
let { values: a, errors: o, touched: s, setFieldValue: c, setFieldTouched: l } = Z(), u = a[e] ?? "", d = s[e] ? o[e] : void 0, f = s[e] ?? !1;
|
|
821
|
-
return /* @__PURE__ */
|
|
822
|
-
className:
|
|
823
|
-
children: [t && /* @__PURE__ */
|
|
822
|
+
return /* @__PURE__ */ E("div", {
|
|
823
|
+
className: R("flex flex-col gap-1.5", i),
|
|
824
|
+
children: [t && /* @__PURE__ */ E("label", {
|
|
824
825
|
htmlFor: e,
|
|
825
826
|
className: "text-[14px] font-semibold text-(--text-primary)",
|
|
826
|
-
children: [t, r && /* @__PURE__ */
|
|
827
|
+
children: [t, r && /* @__PURE__ */ T("span", {
|
|
827
828
|
className: "text-(--danger) ml-1",
|
|
828
829
|
children: "*"
|
|
829
830
|
})]
|
|
@@ -840,21 +841,21 @@ var Ge = ({ name: e, label: t, children: n, required: r, className: i }) => {
|
|
|
840
841
|
})]
|
|
841
842
|
});
|
|
842
843
|
};
|
|
843
|
-
|
|
844
|
-
var
|
|
844
|
+
Je.displayName = "FormField";
|
|
845
|
+
var Ye = v.forwardRef(({ name: e, label: t, required: n, fullWidth: r, className: i, ...a }, o) => {
|
|
845
846
|
let { values: s, errors: c, touched: l, setFieldValue: u, setFieldTouched: d } = Z(), f = s[e] ?? "", p = l[e] ? c[e] : void 0;
|
|
846
|
-
return /* @__PURE__ */
|
|
847
|
-
className:
|
|
847
|
+
return /* @__PURE__ */ E("div", {
|
|
848
|
+
className: R("flex flex-col gap-1.5", r && "w-full"),
|
|
848
849
|
children: [
|
|
849
|
-
t && /* @__PURE__ */
|
|
850
|
+
t && /* @__PURE__ */ E("label", {
|
|
850
851
|
htmlFor: e,
|
|
851
852
|
className: "text-[14px] font-semibold text-(--text-primary)",
|
|
852
|
-
children: [t, n && /* @__PURE__ */
|
|
853
|
+
children: [t, n && /* @__PURE__ */ T("span", {
|
|
853
854
|
className: "text-(--danger) ml-1",
|
|
854
855
|
children: "*"
|
|
855
856
|
})]
|
|
856
857
|
}),
|
|
857
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ T("input", {
|
|
858
859
|
ref: o,
|
|
859
860
|
id: e,
|
|
860
861
|
name: e,
|
|
@@ -865,31 +866,31 @@ var Ke = h.forwardRef(({ name: e, label: t, required: n, fullWidth: r, className
|
|
|
865
866
|
onBlur: () => {
|
|
866
867
|
d(e, !0);
|
|
867
868
|
},
|
|
868
|
-
className:
|
|
869
|
+
className: R("appearance-none block w-full rounded-md border text-[15px] leading-[1.4] shadow-sm", "px-3 py-2 bg-(--bg-primary) text-(--text-primary) placeholder-(--text-muted)", "transition-[border-color,box-shadow,background-color] focus:outline-none", "focus:border-(--accent)/70", "disabled:bg-(--bg-primary) disabled:text-(--text-muted) disabled:cursor-not-allowed", p ? "border-(--danger) focus:border-(--danger) focus:shadow-[0_0_0_2px_var(--danger)]" : "border-(--border-light) hover:border-(--text-primary)/30", i),
|
|
869
870
|
...a
|
|
870
871
|
}),
|
|
871
|
-
p && /* @__PURE__ */
|
|
872
|
+
p && /* @__PURE__ */ E("span", {
|
|
872
873
|
className: "text-[12px] font-medium text-(--danger) flex items-center gap-1 leading-tight",
|
|
873
874
|
children: ["⚠️ ", p]
|
|
874
875
|
})
|
|
875
876
|
]
|
|
876
877
|
});
|
|
877
878
|
});
|
|
878
|
-
|
|
879
|
-
var
|
|
879
|
+
Ye.displayName = "FormInput";
|
|
880
|
+
var Xe = v.forwardRef(({ name: e, label: t, required: n, fullWidth: r, className: i, ...a }, o) => {
|
|
880
881
|
let { values: s, errors: c, touched: l, setFieldValue: u, setFieldTouched: d } = Z(), f = s[e] ?? "", p = l[e] ? c[e] : void 0;
|
|
881
|
-
return /* @__PURE__ */
|
|
882
|
-
className:
|
|
882
|
+
return /* @__PURE__ */ E("div", {
|
|
883
|
+
className: R("flex flex-col gap-1.5", r && "w-full"),
|
|
883
884
|
children: [
|
|
884
|
-
t && /* @__PURE__ */
|
|
885
|
+
t && /* @__PURE__ */ E("label", {
|
|
885
886
|
htmlFor: e,
|
|
886
887
|
className: "text-[14px] font-semibold text-(--text-primary)",
|
|
887
|
-
children: [t, n && /* @__PURE__ */
|
|
888
|
+
children: [t, n && /* @__PURE__ */ T("span", {
|
|
888
889
|
className: "text-(--danger) ml-1",
|
|
889
890
|
children: "*"
|
|
890
891
|
})]
|
|
891
892
|
}),
|
|
892
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ T("textarea", {
|
|
893
894
|
ref: o,
|
|
894
895
|
id: e,
|
|
895
896
|
name: e,
|
|
@@ -900,31 +901,31 @@ var qe = h.forwardRef(({ name: e, label: t, required: n, fullWidth: r, className
|
|
|
900
901
|
onBlur: () => {
|
|
901
902
|
d(e, !0);
|
|
902
903
|
},
|
|
903
|
-
className:
|
|
904
|
+
className: R("appearance-none block w-full rounded-md border text-[15px] leading-[1.4] shadow-sm", "px-3 py-2 bg-(--bg-primary) text-(--text-primary) placeholder-(--text-muted)", "transition-[border-color,box-shadow,background-color] focus:outline-none", "focus:border-(--accent)/70", "disabled:bg-(--bg-primary) disabled:text-(--text-muted) disabled:cursor-not-allowed", "resize-y min-h-20", p ? "border-(--danger) focus:border-(--danger) focus:shadow-[0_0_0_2px_var(--danger)]" : "border-(--border-light) hover:border-(--text-primary)/30", i),
|
|
904
905
|
...a
|
|
905
906
|
}),
|
|
906
|
-
p && /* @__PURE__ */
|
|
907
|
+
p && /* @__PURE__ */ E("span", {
|
|
907
908
|
className: "text-[12px] font-medium text-(--danger) flex items-center gap-1 leading-tight",
|
|
908
909
|
children: ["⚠️ ", p]
|
|
909
910
|
})
|
|
910
911
|
]
|
|
911
912
|
});
|
|
912
913
|
});
|
|
913
|
-
|
|
914
|
-
var
|
|
914
|
+
Xe.displayName = "FormTextarea";
|
|
915
|
+
var Ze = v.forwardRef(({ name: e, label: t, required: n, fullWidth: r, options: i, className: a, ...o }, s) => {
|
|
915
916
|
let { values: c, errors: l, touched: u, setFieldValue: d, setFieldTouched: f } = Z(), p = c[e] ?? "", m = u[e] ? l[e] : void 0;
|
|
916
|
-
return /* @__PURE__ */
|
|
917
|
-
className:
|
|
917
|
+
return /* @__PURE__ */ E("div", {
|
|
918
|
+
className: R("flex flex-col gap-1.5", r && "w-full"),
|
|
918
919
|
children: [
|
|
919
|
-
t && /* @__PURE__ */
|
|
920
|
+
t && /* @__PURE__ */ E("label", {
|
|
920
921
|
htmlFor: e,
|
|
921
922
|
className: "text-[14px] font-semibold text-(--text-primary)",
|
|
922
|
-
children: [t, n && /* @__PURE__ */
|
|
923
|
+
children: [t, n && /* @__PURE__ */ T("span", {
|
|
923
924
|
className: "text-(--danger) ml-1",
|
|
924
925
|
children: "*"
|
|
925
926
|
})]
|
|
926
927
|
}),
|
|
927
|
-
/* @__PURE__ */
|
|
928
|
+
/* @__PURE__ */ E("select", {
|
|
928
929
|
ref: s,
|
|
929
930
|
id: e,
|
|
930
931
|
name: e,
|
|
@@ -935,29 +936,29 @@ var Je = h.forwardRef(({ name: e, label: t, required: n, fullWidth: r, options:
|
|
|
935
936
|
onBlur: () => {
|
|
936
937
|
f(e, !0);
|
|
937
938
|
},
|
|
938
|
-
className:
|
|
939
|
+
className: R("appearance-none block w-full rounded-md border text-[15px] leading-[1.4] shadow-sm", "px-3 py-2 bg-(--bg-primary) text-(--text-primary)", "transition-[border-color,box-shadow,background-color] focus:outline-none", "focus:border-(--accent)/70", "disabled:bg-(--bg-primary) disabled:text-(--text-muted) disabled:cursor-not-allowed", "cursor-pointer", m ? "border-(--danger) focus:border-(--danger) focus:shadow-[0_0_0_2px_var(--danger)]" : "border-(--border-light) hover:border-(--text-primary)/30", a),
|
|
939
940
|
...o,
|
|
940
|
-
children: [/* @__PURE__ */
|
|
941
|
+
children: [/* @__PURE__ */ T("option", {
|
|
941
942
|
value: "",
|
|
942
943
|
children: "Select an option"
|
|
943
|
-
}), i.map((e) => /* @__PURE__ */
|
|
944
|
+
}), i.map((e) => /* @__PURE__ */ T("option", {
|
|
944
945
|
value: e.value,
|
|
945
946
|
children: e.label
|
|
946
947
|
}, e.value))]
|
|
947
948
|
}),
|
|
948
|
-
m && /* @__PURE__ */
|
|
949
|
+
m && /* @__PURE__ */ E("span", {
|
|
949
950
|
className: "text-[12px] font-medium text-(--danger) flex items-center gap-1 leading-tight",
|
|
950
951
|
children: ["⚠️ ", m]
|
|
951
952
|
})
|
|
952
953
|
]
|
|
953
954
|
});
|
|
954
955
|
});
|
|
955
|
-
|
|
956
|
-
var
|
|
956
|
+
Ze.displayName = "FormSelect";
|
|
957
|
+
var Qe = v.forwardRef(({ name: e, label: t, className: n, ...r }, i) => {
|
|
957
958
|
let { values: a, setFieldValue: o } = Z();
|
|
958
|
-
return /* @__PURE__ */
|
|
959
|
+
return /* @__PURE__ */ E("div", {
|
|
959
960
|
className: "flex items-center gap-2",
|
|
960
|
-
children: [/* @__PURE__ */
|
|
961
|
+
children: [/* @__PURE__ */ T("input", {
|
|
961
962
|
ref: i,
|
|
962
963
|
id: e,
|
|
963
964
|
name: e,
|
|
@@ -966,221 +967,221 @@ var Ye = h.forwardRef(({ name: e, label: t, className: n, ...r }, i) => {
|
|
|
966
967
|
onChange: (t) => {
|
|
967
968
|
o(e, t.target.checked);
|
|
968
969
|
},
|
|
969
|
-
className:
|
|
970
|
+
className: R("w-4 h-4 rounded border-(--border-light) bg-(--bg-primary)", "text-(--slack-blue) focus:ring-2 focus:ring-(--slack-blue) focus:ring-offset-1", "cursor-pointer transition-colors", "disabled:cursor-not-allowed disabled:opacity-50", n),
|
|
970
971
|
...r
|
|
971
|
-
}), /* @__PURE__ */
|
|
972
|
+
}), /* @__PURE__ */ T("label", {
|
|
972
973
|
htmlFor: e,
|
|
973
974
|
className: "text-[15px] text-(--text-primary) cursor-pointer select-none",
|
|
974
975
|
children: t
|
|
975
976
|
})]
|
|
976
977
|
});
|
|
977
978
|
});
|
|
978
|
-
|
|
979
|
-
var
|
|
980
|
-
className:
|
|
979
|
+
Qe.displayName = "FormCheckbox";
|
|
980
|
+
var $e = ({ children: e, className: t }) => /* @__PURE__ */ T("div", {
|
|
981
|
+
className: R("flex items-center justify-end gap-3 pt-4", t),
|
|
981
982
|
children: e
|
|
982
983
|
});
|
|
983
|
-
|
|
984
|
+
$e.displayName = "FormActions";
|
|
984
985
|
//#endregion
|
|
985
986
|
//#region src/components/Select.tsx
|
|
986
|
-
var
|
|
987
|
-
let
|
|
988
|
-
|
|
989
|
-
}, [
|
|
990
|
-
return /* @__PURE__ */
|
|
991
|
-
className:
|
|
987
|
+
var et = R("relative flex cursor-default select-none items-center rounded px-3 py-1.5 text-[14px] text-(--text-primary)", "data-[highlighted]:bg-(--bg-hover) data-[highlighted]:outline-none", "data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"), tt = v.forwardRef(({ options: e, groups: t, value: n, defaultValue: r, onValueChange: i, placeholder: a = "Select an option", disabled: o, required: s, label: c, error: l, fullWidth: u, className: d, id: f }, m) => {
|
|
988
|
+
let h = v.useId(), g = f ?? h, _ = n !== void 0, [y, b] = v.useState(r ?? null), x = v.useMemo(() => t ? t.flatMap((e) => e.options) : e ?? [], [t, e]), S = _ ? n ?? null : y, C = v.useMemo(() => x.find((e) => e.value === S)?.label, [x, S]), w = v.useCallback((e) => {
|
|
989
|
+
_ || b(e), i?.(e);
|
|
990
|
+
}, [_, i]);
|
|
991
|
+
return /* @__PURE__ */ E("div", {
|
|
992
|
+
className: R("flex flex-col gap-1.5", u && "w-full"),
|
|
992
993
|
children: [
|
|
993
|
-
c && /* @__PURE__ */
|
|
994
|
-
htmlFor:
|
|
994
|
+
c && /* @__PURE__ */ E("label", {
|
|
995
|
+
htmlFor: g,
|
|
995
996
|
className: "text-[14px] font-semibold text-(--text-primary)",
|
|
996
|
-
children: [c, s && /* @__PURE__ */
|
|
997
|
+
children: [c, s && /* @__PURE__ */ T("span", {
|
|
997
998
|
className: "ml-0.5 text-(--danger)",
|
|
998
999
|
children: "*"
|
|
999
1000
|
})]
|
|
1000
1001
|
}),
|
|
1001
|
-
/* @__PURE__ */
|
|
1002
|
-
value:
|
|
1003
|
-
defaultValue:
|
|
1004
|
-
onValueChange:
|
|
1002
|
+
/* @__PURE__ */ E(p.Root, {
|
|
1003
|
+
value: _ ? n : void 0,
|
|
1004
|
+
defaultValue: _ ? void 0 : r,
|
|
1005
|
+
onValueChange: w,
|
|
1005
1006
|
disabled: o,
|
|
1006
1007
|
required: s,
|
|
1007
|
-
children: [/* @__PURE__ */
|
|
1008
|
-
id:
|
|
1008
|
+
children: [/* @__PURE__ */ E(p.Trigger, {
|
|
1009
|
+
id: g,
|
|
1009
1010
|
ref: m,
|
|
1010
|
-
className:
|
|
1011
|
-
children: [/* @__PURE__ */
|
|
1011
|
+
className: R("inline-flex h-9 w-full items-center justify-between gap-2 rounded-md border px-3 text-[14px]", "bg-(--bg-primary) text-(--text-primary)", "transition-[border-color,box-shadow] outline-none", "focus:border-(--accent)/70", "disabled:cursor-not-allowed disabled:opacity-50", l ? "border-(--danger) focus:shadow-[0_0_0_2px_var(--danger)]" : "border-(--border-light) hover:border-(--text-primary)/30", d),
|
|
1012
|
+
children: [/* @__PURE__ */ T(p.Value, {
|
|
1012
1013
|
className: "flex-1 text-left data-[placeholder]:text-(--text-muted)",
|
|
1013
1014
|
placeholder: a,
|
|
1014
|
-
children:
|
|
1015
|
-
}), /* @__PURE__ */
|
|
1015
|
+
children: C
|
|
1016
|
+
}), /* @__PURE__ */ T(p.Icon, {
|
|
1016
1017
|
className: "shrink-0 text-(--text-muted)",
|
|
1017
|
-
children: /* @__PURE__ */
|
|
1018
|
+
children: /* @__PURE__ */ T(A, { size: 14 })
|
|
1018
1019
|
})]
|
|
1019
|
-
}), /* @__PURE__ */
|
|
1020
|
+
}), /* @__PURE__ */ T(p.Portal, { children: /* @__PURE__ */ E(p.Positioner, {
|
|
1020
1021
|
sideOffset: 4,
|
|
1021
1022
|
className: "z-50",
|
|
1022
1023
|
children: [
|
|
1023
|
-
/* @__PURE__ */
|
|
1024
|
+
/* @__PURE__ */ T(p.ScrollUpArrow, {
|
|
1024
1025
|
className: "flex h-5 w-full cursor-default items-center justify-center rounded-t-md bg-(--bg-primary) text-(--text-muted)",
|
|
1025
|
-
children: /* @__PURE__ */
|
|
1026
|
+
children: /* @__PURE__ */ T(M, { size: 12 })
|
|
1026
1027
|
}),
|
|
1027
|
-
/* @__PURE__ */
|
|
1028
|
-
className:
|
|
1029
|
-
children: t ? t.map((e) => /* @__PURE__ */
|
|
1028
|
+
/* @__PURE__ */ T(p.Popup, {
|
|
1029
|
+
className: R("min-w-[var(--anchor-width)] overflow-auto rounded-lg border border-(--border-light) bg-(--bg-primary)", "py-1 shadow-lg"),
|
|
1030
|
+
children: t ? t.map((e) => /* @__PURE__ */ E(p.Group, { children: [/* @__PURE__ */ T(p.GroupLabel, {
|
|
1030
1031
|
className: "px-3 py-1 text-[12px] font-semibold text-(--text-muted) uppercase tracking-wider",
|
|
1031
1032
|
children: e.label
|
|
1032
|
-
}), e.options.map((e) => /* @__PURE__ */
|
|
1033
|
+
}), e.options.map((e) => /* @__PURE__ */ T(nt, {
|
|
1033
1034
|
value: e.value,
|
|
1034
1035
|
disabled: e.disabled,
|
|
1035
1036
|
children: e.label
|
|
1036
|
-
}, e.value))] }, e.label)) : e?.map((e) => /* @__PURE__ */
|
|
1037
|
+
}, e.value))] }, e.label)) : e?.map((e) => /* @__PURE__ */ T(nt, {
|
|
1037
1038
|
value: e.value,
|
|
1038
1039
|
disabled: e.disabled,
|
|
1039
1040
|
children: e.label
|
|
1040
1041
|
}, e.value))
|
|
1041
1042
|
}),
|
|
1042
|
-
/* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ T(p.ScrollDownArrow, {
|
|
1043
1044
|
className: "flex h-5 w-full cursor-default items-center justify-center rounded-b-md bg-(--bg-primary) text-(--text-muted)",
|
|
1044
|
-
children: /* @__PURE__ */
|
|
1045
|
+
children: /* @__PURE__ */ T(A, { size: 12 })
|
|
1045
1046
|
})
|
|
1046
1047
|
]
|
|
1047
1048
|
}) })]
|
|
1048
1049
|
}),
|
|
1049
|
-
l && /* @__PURE__ */
|
|
1050
|
+
l && /* @__PURE__ */ E("span", {
|
|
1050
1051
|
className: "flex items-center gap-1 text-[12px] font-medium leading-tight text-(--danger)",
|
|
1051
1052
|
children: ["⚠️ ", l]
|
|
1052
1053
|
})
|
|
1053
1054
|
]
|
|
1054
1055
|
});
|
|
1055
1056
|
});
|
|
1056
|
-
|
|
1057
|
-
function
|
|
1058
|
-
return /* @__PURE__ */
|
|
1057
|
+
tt.displayName = "Select";
|
|
1058
|
+
function nt({ value: e, disabled: t, children: n }) {
|
|
1059
|
+
return /* @__PURE__ */ E(p.Item, {
|
|
1059
1060
|
value: e,
|
|
1060
1061
|
disabled: t,
|
|
1061
|
-
className:
|
|
1062
|
-
children: [/* @__PURE__ */
|
|
1062
|
+
className: et,
|
|
1063
|
+
children: [/* @__PURE__ */ T(p.ItemIndicator, {
|
|
1063
1064
|
className: "absolute right-3 flex items-center text-(--accent)",
|
|
1064
|
-
children: /* @__PURE__ */
|
|
1065
|
-
}), /* @__PURE__ */
|
|
1065
|
+
children: /* @__PURE__ */ T(O, { size: 14 })
|
|
1066
|
+
}), /* @__PURE__ */ T(p.ItemText, { children: n })]
|
|
1066
1067
|
});
|
|
1067
1068
|
}
|
|
1068
1069
|
//#endregion
|
|
1069
1070
|
//#region src/components/Checkbox.tsx
|
|
1070
|
-
var
|
|
1071
|
-
let
|
|
1071
|
+
var rt = v.forwardRef(({ checked: e, defaultChecked: t, onCheckedChange: n, indeterminate: r, disabled: a, required: o, label: s, description: c, error: l, name: u, value: d, id: f, className: p }, m) => {
|
|
1072
|
+
let h = v.useId(), g = f ?? h, _ = /* @__PURE__ */ T(i.Root, {
|
|
1072
1073
|
ref: m,
|
|
1073
|
-
id:
|
|
1074
|
+
id: g,
|
|
1074
1075
|
checked: e,
|
|
1075
|
-
defaultChecked:
|
|
1076
|
-
onCheckedChange:
|
|
1077
|
-
indeterminate:
|
|
1076
|
+
defaultChecked: t,
|
|
1077
|
+
onCheckedChange: n,
|
|
1078
|
+
indeterminate: r,
|
|
1078
1079
|
disabled: a,
|
|
1079
1080
|
required: o,
|
|
1080
1081
|
name: u,
|
|
1081
1082
|
value: d,
|
|
1082
|
-
className:
|
|
1083
|
-
children: /* @__PURE__ */
|
|
1083
|
+
className: R("relative flex h-4 w-4 shrink-0 items-center justify-center rounded", "border-2 border-(--border-gray) bg-(--bg-primary)", "transition-[background-color,border-color] outline-none", "focus-visible:ring-2 focus-visible:ring-(--focus-ring) focus-visible:ring-offset-1", "data-[checked]:border-(--accent) data-[checked]:bg-(--accent)", "data-[indeterminate]:border-(--accent) data-[indeterminate]:bg-(--accent)", "disabled:cursor-not-allowed disabled:opacity-50", l && "border-(--danger)", p),
|
|
1084
|
+
children: /* @__PURE__ */ T(i.Indicator, {
|
|
1084
1085
|
className: "flex items-center justify-center text-white",
|
|
1085
|
-
children:
|
|
1086
|
+
children: T(r ? P : O, {
|
|
1086
1087
|
size: 10,
|
|
1087
1088
|
strokeWidth: 3
|
|
1088
1089
|
})
|
|
1089
1090
|
})
|
|
1090
1091
|
});
|
|
1091
|
-
return s ? /* @__PURE__ */
|
|
1092
|
+
return s ? /* @__PURE__ */ E("div", {
|
|
1092
1093
|
className: "flex flex-col gap-1",
|
|
1093
|
-
children: [/* @__PURE__ */
|
|
1094
|
+
children: [/* @__PURE__ */ E("div", {
|
|
1094
1095
|
className: "flex items-start gap-2",
|
|
1095
|
-
children: [
|
|
1096
|
+
children: [_, /* @__PURE__ */ E("div", {
|
|
1096
1097
|
className: "flex flex-col",
|
|
1097
|
-
children: [/* @__PURE__ */
|
|
1098
|
-
htmlFor:
|
|
1099
|
-
className:
|
|
1100
|
-
children: [s, o && /* @__PURE__ */
|
|
1098
|
+
children: [/* @__PURE__ */ E("label", {
|
|
1099
|
+
htmlFor: g,
|
|
1100
|
+
className: R("text-[14px] leading-none text-(--text-primary) select-none", a && "opacity-50 cursor-not-allowed"),
|
|
1101
|
+
children: [s, o && /* @__PURE__ */ T("span", {
|
|
1101
1102
|
className: "ml-0.5 text-(--danger)",
|
|
1102
1103
|
children: "*"
|
|
1103
1104
|
})]
|
|
1104
|
-
}), c && /* @__PURE__ */
|
|
1105
|
+
}), c && /* @__PURE__ */ T("span", {
|
|
1105
1106
|
className: "mt-0.5 text-[12px] text-(--text-muted)",
|
|
1106
1107
|
children: c
|
|
1107
1108
|
})]
|
|
1108
1109
|
})]
|
|
1109
|
-
}), l && /* @__PURE__ */
|
|
1110
|
+
}), l && /* @__PURE__ */ E("span", {
|
|
1110
1111
|
className: "flex items-center gap-1 text-[12px] font-medium leading-tight text-(--danger)",
|
|
1111
1112
|
children: ["⚠️ ", l]
|
|
1112
1113
|
})]
|
|
1113
|
-
}) :
|
|
1114
|
+
}) : _;
|
|
1114
1115
|
});
|
|
1115
|
-
|
|
1116
|
+
rt.displayName = "Checkbox";
|
|
1116
1117
|
//#endregion
|
|
1117
1118
|
//#region src/components/Radio.tsx
|
|
1118
|
-
var
|
|
1119
|
-
className:
|
|
1119
|
+
var it = v.forwardRef(({ children: e, value: t, defaultValue: n, onValueChange: r, disabled: i, required: a, label: o, error: s, orientation: c = "vertical", className: l }, u) => /* @__PURE__ */ E("div", {
|
|
1120
|
+
className: R("flex flex-col gap-1.5", l),
|
|
1120
1121
|
children: [
|
|
1121
|
-
o && /* @__PURE__ */
|
|
1122
|
+
o && /* @__PURE__ */ E("span", {
|
|
1122
1123
|
className: "text-[14px] font-semibold text-(--text-primary)",
|
|
1123
|
-
children: [o, a && /* @__PURE__ */
|
|
1124
|
+
children: [o, a && /* @__PURE__ */ T("span", {
|
|
1124
1125
|
className: "ml-0.5 text-(--danger)",
|
|
1125
1126
|
children: "*"
|
|
1126
1127
|
})]
|
|
1127
1128
|
}),
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
ref:
|
|
1129
|
+
/* @__PURE__ */ T(f, {
|
|
1130
|
+
ref: u,
|
|
1130
1131
|
value: t,
|
|
1131
1132
|
defaultValue: n,
|
|
1132
1133
|
onValueChange: r,
|
|
1133
1134
|
disabled: i,
|
|
1134
1135
|
required: a,
|
|
1135
|
-
className:
|
|
1136
|
+
className: R("flex gap-3", c === "vertical" ? "flex-col" : "flex-row flex-wrap"),
|
|
1136
1137
|
children: e
|
|
1137
1138
|
}),
|
|
1138
|
-
s && /* @__PURE__ */
|
|
1139
|
+
s && /* @__PURE__ */ E("span", {
|
|
1139
1140
|
className: "flex items-center gap-1 text-[12px] font-medium leading-tight text-(--danger)",
|
|
1140
1141
|
children: ["⚠️ ", s]
|
|
1141
1142
|
})
|
|
1142
1143
|
]
|
|
1143
1144
|
}));
|
|
1144
|
-
|
|
1145
|
-
var
|
|
1146
|
-
let s =
|
|
1145
|
+
it.displayName = "RadioGroup";
|
|
1146
|
+
var at = v.forwardRef(({ value: e, disabled: t, label: n, description: r, id: i, className: a }, o) => {
|
|
1147
|
+
let s = v.useId(), c = i ?? s, l = /* @__PURE__ */ T(d.Root, {
|
|
1147
1148
|
ref: o,
|
|
1148
|
-
id:
|
|
1149
|
+
id: c,
|
|
1149
1150
|
value: e,
|
|
1150
1151
|
disabled: t,
|
|
1151
|
-
className:
|
|
1152
|
-
children: /* @__PURE__ */
|
|
1152
|
+
className: R("relative flex h-4 w-4 shrink-0 items-center justify-center rounded-full", "border-2 border-(--border-gray) bg-(--bg-primary)", "transition-[background-color,border-color] outline-none", "focus-visible:ring-2 focus-visible:ring-(--focus-ring) focus-visible:ring-offset-1", "data-[checked]:border-(--accent)", "disabled:cursor-not-allowed disabled:opacity-50", a),
|
|
1153
|
+
children: /* @__PURE__ */ T(d.Indicator, { className: "h-2 w-2 rounded-full bg-(--accent) data-[unchecked]:hidden" })
|
|
1153
1154
|
});
|
|
1154
|
-
return n ? /* @__PURE__ */
|
|
1155
|
+
return n ? /* @__PURE__ */ E("div", {
|
|
1155
1156
|
className: "flex items-start gap-2",
|
|
1156
|
-
children: [
|
|
1157
|
+
children: [l, /* @__PURE__ */ E("div", {
|
|
1157
1158
|
className: "flex flex-col",
|
|
1158
|
-
children: [/* @__PURE__ */
|
|
1159
|
-
htmlFor:
|
|
1160
|
-
className:
|
|
1159
|
+
children: [/* @__PURE__ */ T("label", {
|
|
1160
|
+
htmlFor: c,
|
|
1161
|
+
className: R("text-[14px] leading-none text-(--text-primary) select-none", t && "opacity-50 cursor-not-allowed"),
|
|
1161
1162
|
children: n
|
|
1162
|
-
}), r && /* @__PURE__ */
|
|
1163
|
+
}), r && /* @__PURE__ */ T("span", {
|
|
1163
1164
|
className: "mt-0.5 text-[12px] text-(--text-muted)",
|
|
1164
1165
|
children: r
|
|
1165
1166
|
})]
|
|
1166
1167
|
})]
|
|
1167
|
-
}) :
|
|
1168
|
+
}) : l;
|
|
1168
1169
|
});
|
|
1169
|
-
|
|
1170
|
+
at.displayName = "Radio";
|
|
1170
1171
|
//#endregion
|
|
1171
1172
|
//#region src/components/Switch.tsx
|
|
1172
|
-
var
|
|
1173
|
+
var ot = {
|
|
1173
1174
|
sm: "h-4 w-7",
|
|
1174
1175
|
md: "h-5 w-9",
|
|
1175
1176
|
lg: "h-6 w-11"
|
|
1176
|
-
},
|
|
1177
|
+
}, st = {
|
|
1177
1178
|
sm: "h-3 w-3 data-[checked]:translate-x-3",
|
|
1178
1179
|
md: "h-3.5 w-3.5 data-[checked]:translate-x-4",
|
|
1179
1180
|
lg: "h-4.5 w-4.5 data-[checked]:translate-x-5"
|
|
1180
|
-
},
|
|
1181
|
-
let
|
|
1182
|
-
ref:
|
|
1183
|
-
id:
|
|
1181
|
+
}, ct = v.forwardRef(({ checked: e, defaultChecked: t, onCheckedChange: n, disabled: r, required: i, size: a = "md", label: o, description: s, name: c, value: l, id: u, className: d }, f) => {
|
|
1182
|
+
let p = v.useId(), h = u ?? p, g = /* @__PURE__ */ T(m.Root, {
|
|
1183
|
+
ref: f,
|
|
1184
|
+
id: h,
|
|
1184
1185
|
checked: e,
|
|
1185
1186
|
defaultChecked: t,
|
|
1186
1187
|
onCheckedChange: n,
|
|
@@ -1188,124 +1189,124 @@ var rt = {
|
|
|
1188
1189
|
required: i,
|
|
1189
1190
|
name: c,
|
|
1190
1191
|
value: l,
|
|
1191
|
-
className:
|
|
1192
|
-
children: /* @__PURE__ */
|
|
1192
|
+
className: R("relative inline-flex shrink-0 cursor-pointer items-center rounded-full p-0.5", "border-2 border-transparent outline-none", "transition-colors duration-200", "bg-(--border-gray)", "data-[checked]:bg-(--accent)", "focus-visible:ring-2 focus-visible:ring-(--focus-ring) focus-visible:ring-offset-1", "disabled:cursor-not-allowed disabled:opacity-50", ot[a], d),
|
|
1193
|
+
children: /* @__PURE__ */ T(m.Thumb, { className: R("block rounded-full bg-white shadow-sm", "transition-transform duration-200", "translate-x-0", st[a]) })
|
|
1193
1194
|
});
|
|
1194
|
-
return o ? /* @__PURE__ */
|
|
1195
|
+
return o ? /* @__PURE__ */ E("div", {
|
|
1195
1196
|
className: "flex items-start gap-3",
|
|
1196
|
-
children: [
|
|
1197
|
+
children: [g, /* @__PURE__ */ E("div", {
|
|
1197
1198
|
className: "flex flex-col",
|
|
1198
|
-
children: [/* @__PURE__ */
|
|
1199
|
-
htmlFor:
|
|
1200
|
-
className:
|
|
1201
|
-
children: [o, i && /* @__PURE__ */
|
|
1199
|
+
children: [/* @__PURE__ */ E("label", {
|
|
1200
|
+
htmlFor: h,
|
|
1201
|
+
className: R("text-[14px] leading-none text-(--text-primary) select-none", r && "opacity-50 cursor-not-allowed"),
|
|
1202
|
+
children: [o, i && /* @__PURE__ */ T("span", {
|
|
1202
1203
|
className: "ml-0.5 text-(--danger)",
|
|
1203
1204
|
children: "*"
|
|
1204
1205
|
})]
|
|
1205
|
-
}), s && /* @__PURE__ */
|
|
1206
|
+
}), s && /* @__PURE__ */ T("span", {
|
|
1206
1207
|
className: "mt-0.5 text-[12px] text-(--text-muted)",
|
|
1207
1208
|
children: s
|
|
1208
1209
|
})]
|
|
1209
1210
|
})]
|
|
1210
|
-
}) :
|
|
1211
|
+
}) : g;
|
|
1211
1212
|
});
|
|
1212
|
-
|
|
1213
|
+
ct.displayName = "Switch";
|
|
1213
1214
|
//#endregion
|
|
1214
1215
|
//#region src/components/Tabs.tsx
|
|
1215
|
-
var
|
|
1216
|
+
var lt = v.forwardRef(({ children: e, value: t, defaultValue: n, onValueChange: r, orientation: i = "horizontal", className: a }, o) => /* @__PURE__ */ T(h.Root, {
|
|
1216
1217
|
ref: o,
|
|
1217
1218
|
value: t,
|
|
1218
1219
|
defaultValue: n,
|
|
1219
1220
|
onValueChange: r,
|
|
1220
1221
|
orientation: i,
|
|
1221
|
-
className:
|
|
1222
|
+
className: R("flex", i === "horizontal" ? "flex-col" : "flex-row gap-4", a),
|
|
1222
1223
|
children: e
|
|
1223
1224
|
}));
|
|
1224
|
-
|
|
1225
|
-
var
|
|
1225
|
+
lt.displayName = "Tabs";
|
|
1226
|
+
var ut = v.forwardRef(({ children: e, className: t }, n) => /* @__PURE__ */ E(h.List, {
|
|
1226
1227
|
ref: n,
|
|
1227
|
-
className:
|
|
1228
|
-
children: [e, /* @__PURE__ */
|
|
1228
|
+
className: R("relative flex border-b border-(--border-light)", t),
|
|
1229
|
+
children: [e, /* @__PURE__ */ T(h.Indicator, { className: R("absolute bottom-0 left-0 h-0.5 bg-(--accent)", "transition-[left,width] duration-200 ease-out") })]
|
|
1229
1230
|
}));
|
|
1230
|
-
|
|
1231
|
-
var
|
|
1231
|
+
ut.displayName = "TabList";
|
|
1232
|
+
var dt = v.forwardRef(({ children: e, value: t, disabled: n, className: r }, i) => /* @__PURE__ */ T(h.Tab, {
|
|
1232
1233
|
ref: i,
|
|
1233
1234
|
value: t,
|
|
1234
1235
|
disabled: n,
|
|
1235
|
-
className:
|
|
1236
|
+
className: R("relative px-4 py-2.5 text-[14px] font-medium outline-none", "text-(--text-secondary) transition-colors", "hover:text-(--text-primary)", "data-[selected]:text-(--accent)", "focus-visible:ring-2 focus-visible:ring-(--focus-ring) focus-visible:ring-inset", "disabled:cursor-not-allowed disabled:opacity-50", r),
|
|
1236
1237
|
children: e
|
|
1237
1238
|
}));
|
|
1238
|
-
|
|
1239
|
-
var
|
|
1239
|
+
dt.displayName = "Tab";
|
|
1240
|
+
var ft = v.forwardRef(({ children: e, value: t, keepMounted: n = !1, className: r }, i) => /* @__PURE__ */ T(h.Panel, {
|
|
1240
1241
|
ref: i,
|
|
1241
1242
|
value: t,
|
|
1242
1243
|
keepMounted: n,
|
|
1243
|
-
className:
|
|
1244
|
+
className: R("pt-4 outline-none", r),
|
|
1244
1245
|
children: e
|
|
1245
1246
|
}));
|
|
1246
|
-
|
|
1247
|
+
ft.displayName = "TabPanel";
|
|
1247
1248
|
//#endregion
|
|
1248
1249
|
//#region src/components/Progress.tsx
|
|
1249
|
-
var
|
|
1250
|
+
var pt = {
|
|
1250
1251
|
default: "bg-(--accent)",
|
|
1251
1252
|
success: "bg-(--slack-green)",
|
|
1252
1253
|
warning: "bg-amber-400",
|
|
1253
1254
|
danger: "bg-(--danger)"
|
|
1254
|
-
},
|
|
1255
|
+
}, mt = {
|
|
1255
1256
|
sm: "h-1",
|
|
1256
1257
|
md: "h-2",
|
|
1257
1258
|
lg: "h-3"
|
|
1258
|
-
},
|
|
1259
|
-
className:
|
|
1260
|
-
children: [(i || a) && /* @__PURE__ */
|
|
1259
|
+
}, ht = v.forwardRef(({ value: e, max: t = 100, variant: n = "default", size: r = "md", label: i, showValue: a, className: o }, s) => /* @__PURE__ */ E("div", {
|
|
1260
|
+
className: R("flex flex-col gap-1.5", o),
|
|
1261
|
+
children: [(i || a) && /* @__PURE__ */ E("div", {
|
|
1261
1262
|
className: "flex items-center justify-between gap-2",
|
|
1262
|
-
children: [i && /* @__PURE__ */
|
|
1263
|
+
children: [i && /* @__PURE__ */ T("span", {
|
|
1263
1264
|
className: "text-[13px] font-medium text-(--text-secondary)",
|
|
1264
1265
|
children: i
|
|
1265
|
-
}), a && e !== void 0 && /* @__PURE__ */
|
|
1266
|
+
}), a && e !== void 0 && /* @__PURE__ */ E("span", {
|
|
1266
1267
|
className: "text-[12px] text-(--text-muted)",
|
|
1267
1268
|
children: [Math.round(e / t * 100), "%"]
|
|
1268
1269
|
})]
|
|
1269
|
-
}), /* @__PURE__ */
|
|
1270
|
-
ref:
|
|
1270
|
+
}), /* @__PURE__ */ T(u.Root, {
|
|
1271
|
+
ref: s,
|
|
1271
1272
|
value: e ?? null,
|
|
1272
1273
|
max: t,
|
|
1273
|
-
className:
|
|
1274
|
-
children: /* @__PURE__ */
|
|
1274
|
+
className: R("w-full overflow-hidden rounded-full bg-(--bg-hover)", mt[r]),
|
|
1275
|
+
children: /* @__PURE__ */ T(u.Track, {
|
|
1275
1276
|
className: "relative h-full w-full",
|
|
1276
|
-
children: /* @__PURE__ */
|
|
1277
|
+
children: /* @__PURE__ */ T(u.Indicator, { className: R("h-full rounded-full transition-[width] duration-300 ease-out", pt[n], e === void 0 && "w-1/3 animate-[progress-indeterminate_1.5s_ease-in-out_infinite]") })
|
|
1277
1278
|
})
|
|
1278
1279
|
})]
|
|
1279
1280
|
}));
|
|
1280
|
-
|
|
1281
|
+
ht.displayName = "Progress";
|
|
1281
1282
|
//#endregion
|
|
1282
1283
|
//#region src/components/Toast.tsx
|
|
1283
|
-
var
|
|
1284
|
+
var gt = y({
|
|
1284
1285
|
position: "bottom-right",
|
|
1285
1286
|
setPosition: () => {}
|
|
1286
|
-
}),
|
|
1287
|
+
}), _t = {
|
|
1287
1288
|
"top-left": "top-4 left-4 flex-col",
|
|
1288
1289
|
"top-center": "top-4 left-1/2 -translate-x-1/2 flex-col",
|
|
1289
1290
|
"top-right": "top-4 right-4 flex-col",
|
|
1290
1291
|
"bottom-left": "bottom-4 left-4 flex-col-reverse",
|
|
1291
1292
|
"bottom-center": "bottom-4 left-1/2 -translate-x-1/2 flex-col-reverse",
|
|
1292
1293
|
"bottom-right": "bottom-4 right-4 flex-col-reverse"
|
|
1293
|
-
},
|
|
1294
|
-
let [i, a] =
|
|
1295
|
-
return /* @__PURE__ */
|
|
1294
|
+
}, vt = ({ children: e, timeout: t = 5e3, limit: n = 5, position: r = "bottom-right" }) => {
|
|
1295
|
+
let [i, a] = C(r);
|
|
1296
|
+
return /* @__PURE__ */ T(g.Provider, {
|
|
1296
1297
|
timeout: t,
|
|
1297
1298
|
limit: n,
|
|
1298
|
-
children: /* @__PURE__ */
|
|
1299
|
+
children: /* @__PURE__ */ E(gt.Provider, {
|
|
1299
1300
|
value: {
|
|
1300
1301
|
position: i,
|
|
1301
1302
|
setPosition: a
|
|
1302
1303
|
},
|
|
1303
|
-
children: [e, /* @__PURE__ */
|
|
1304
|
+
children: [e, /* @__PURE__ */ T(bt, {})]
|
|
1304
1305
|
})
|
|
1305
1306
|
});
|
|
1306
1307
|
};
|
|
1307
|
-
function
|
|
1308
|
-
let e =
|
|
1308
|
+
function yt() {
|
|
1309
|
+
let e = g.useToastManager(), { position: t, setPosition: n } = x(gt);
|
|
1309
1310
|
return {
|
|
1310
1311
|
toast: (t) => e.add({
|
|
1311
1312
|
title: t.title,
|
|
@@ -1322,14 +1323,14 @@ function gt() {
|
|
|
1322
1323
|
setPosition: n
|
|
1323
1324
|
};
|
|
1324
1325
|
}
|
|
1325
|
-
function
|
|
1326
|
-
let { toasts: e } =
|
|
1327
|
-
return /* @__PURE__ */
|
|
1328
|
-
className:
|
|
1329
|
-
children: e.map((e) => /* @__PURE__ */
|
|
1326
|
+
function bt() {
|
|
1327
|
+
let { toasts: e } = g.useToastManager(), { position: t } = x(gt);
|
|
1328
|
+
return /* @__PURE__ */ T(g.Viewport, {
|
|
1329
|
+
className: R("fixed z-[100] flex w-80 gap-2 outline-none", _t[t]),
|
|
1330
|
+
children: e.map((e) => /* @__PURE__ */ T(St, { toast: e }, e.id))
|
|
1330
1331
|
});
|
|
1331
1332
|
}
|
|
1332
|
-
var
|
|
1333
|
+
var xt = {
|
|
1333
1334
|
default: {
|
|
1334
1335
|
icon: null,
|
|
1335
1336
|
titleClass: "text-(--text-primary) dark:text-white",
|
|
@@ -1338,7 +1339,7 @@ var vt = {
|
|
|
1338
1339
|
closeClass: "text-(--text-muted) hover:bg-(--bg-hover) hover:text-(--text-primary) dark:text-white/40 dark:hover:bg-white/10 dark:hover:text-white"
|
|
1339
1340
|
},
|
|
1340
1341
|
info: {
|
|
1341
|
-
icon: /* @__PURE__ */
|
|
1342
|
+
icon: /* @__PURE__ */ T(N, {
|
|
1342
1343
|
size: 14,
|
|
1343
1344
|
className: "text-[#1164A3] dark:text-[#5ba4cf]"
|
|
1344
1345
|
}),
|
|
@@ -1348,7 +1349,7 @@ var vt = {
|
|
|
1348
1349
|
closeClass: "text-[#7C9BB4] hover:bg-[#E8F2FB] hover:text-[#1164A3] dark:text-[#8AA7BD] dark:hover:bg-[#173547] dark:hover:text-[#7AB7DE]"
|
|
1349
1350
|
},
|
|
1350
1351
|
success: {
|
|
1351
|
-
icon: /* @__PURE__ */
|
|
1352
|
+
icon: /* @__PURE__ */ T(k, {
|
|
1352
1353
|
size: 14,
|
|
1353
1354
|
className: "text-[#007a5a] dark:text-[#39c088]"
|
|
1354
1355
|
}),
|
|
@@ -1358,7 +1359,7 @@ var vt = {
|
|
|
1358
1359
|
closeClass: "text-[#7A9E91] hover:bg-[#E7F6EE] hover:text-[#007A5A] dark:text-[#89A99E] dark:hover:bg-[#18372C] dark:hover:text-[#6FD4A3]"
|
|
1359
1360
|
},
|
|
1360
1361
|
warning: {
|
|
1361
|
-
icon: /* @__PURE__ */
|
|
1362
|
+
icon: /* @__PURE__ */ T(D, {
|
|
1362
1363
|
size: 14,
|
|
1363
1364
|
className: "text-amber-500 dark:text-amber-400"
|
|
1364
1365
|
}),
|
|
@@ -1368,7 +1369,7 @@ var vt = {
|
|
|
1368
1369
|
closeClass: "text-[#AA9B73] hover:bg-[#FFF3D6] hover:text-[#B26A00] dark:text-[#A99668] dark:hover:bg-[#4B3810] dark:hover:text-[#F0C46B]"
|
|
1369
1370
|
},
|
|
1370
1371
|
error: {
|
|
1371
|
-
icon: /* @__PURE__ */
|
|
1372
|
+
icon: /* @__PURE__ */ T(I, {
|
|
1372
1373
|
size: 14,
|
|
1373
1374
|
className: "text-[#E01E5A] dark:text-[#e06082]"
|
|
1374
1375
|
}),
|
|
@@ -1378,64 +1379,64 @@ var vt = {
|
|
|
1378
1379
|
closeClass: "text-[#B0929C] hover:bg-[#FBE8EE] hover:text-[#E01E5A] dark:text-[#A88E96] dark:hover:bg-[#4A1F2C] dark:hover:text-[#F08CA8]"
|
|
1379
1380
|
}
|
|
1380
1381
|
};
|
|
1381
|
-
function
|
|
1382
|
-
let t =
|
|
1383
|
-
return /* @__PURE__ */
|
|
1382
|
+
function St({ toast: e }) {
|
|
1383
|
+
let t = xt[e.type ?? "default"] ?? xt.default;
|
|
1384
|
+
return /* @__PURE__ */ E(g.Root, {
|
|
1384
1385
|
toast: e,
|
|
1385
1386
|
swipeDirection: [],
|
|
1386
|
-
className:
|
|
1387
|
+
className: R("group relative flex w-full items-start gap-2.5 overflow-hidden", "rounded-lg pl-3 pr-3 pt-3 pb-3", "border border-(--border-light)", "shadow-[0_2px_16px_rgba(0,0,0,0.08),0_1px_4px_rgba(0,0,0,0.05)]", "dark:shadow-[0_4px_24px_rgba(0,0,0,0.45)]", "data-[starting]:animate-[toast-slide-in_240ms_cubic-bezier(0.16,1,0.3,1)]", "data-[ending]:animate-[toast-slide-out_180ms_ease-in_forwards]", t.surfaceClass),
|
|
1387
1388
|
children: [
|
|
1388
|
-
t.icon && /* @__PURE__ */
|
|
1389
|
+
t.icon && /* @__PURE__ */ T("div", {
|
|
1389
1390
|
className: "flex h-5 shrink-0 items-center",
|
|
1390
1391
|
children: t.icon
|
|
1391
1392
|
}),
|
|
1392
|
-
/* @__PURE__ */
|
|
1393
|
+
/* @__PURE__ */ E("div", {
|
|
1393
1394
|
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
1394
1395
|
children: [
|
|
1395
|
-
e.title && /* @__PURE__ */
|
|
1396
|
-
className:
|
|
1396
|
+
e.title && /* @__PURE__ */ T(g.Title, {
|
|
1397
|
+
className: R("text-[14px] font-semibold leading-snug", t.titleClass),
|
|
1397
1398
|
children: e.title
|
|
1398
1399
|
}),
|
|
1399
|
-
e.description && /* @__PURE__ */
|
|
1400
|
+
e.description && /* @__PURE__ */ T(g.Description, {
|
|
1400
1401
|
className: "text-[13px] leading-snug text-(--text-secondary) dark:text-white/65",
|
|
1401
1402
|
children: e.description
|
|
1402
1403
|
}),
|
|
1403
|
-
e.actionProps && /* @__PURE__ */
|
|
1404
|
+
e.actionProps && /* @__PURE__ */ T("button", {
|
|
1404
1405
|
...e.actionProps,
|
|
1405
|
-
className:
|
|
1406
|
+
className: R("mt-1.5 self-start rounded text-[13px] font-semibold outline-none transition-colors", t.actionClass, "focus-visible:ring-1 focus-visible:ring-(--focus-ring) dark:focus-visible:ring-white/50")
|
|
1406
1407
|
})
|
|
1407
1408
|
]
|
|
1408
1409
|
}),
|
|
1409
|
-
/* @__PURE__ */
|
|
1410
|
-
className:
|
|
1411
|
-
children: /* @__PURE__ */
|
|
1410
|
+
/* @__PURE__ */ T(g.Close, {
|
|
1411
|
+
className: R("ml-0.5 shrink-0 rounded p-1 outline-none transition-colors", t.closeClass, "focus-visible:ring-1 focus-visible:ring-(--focus-ring) dark:focus-visible:ring-white/50"),
|
|
1412
|
+
children: /* @__PURE__ */ T(F, { size: 13 })
|
|
1412
1413
|
})
|
|
1413
1414
|
]
|
|
1414
1415
|
});
|
|
1415
1416
|
}
|
|
1416
1417
|
//#endregion
|
|
1417
1418
|
//#region src/components/Loading.tsx
|
|
1418
|
-
var
|
|
1419
|
+
var Ct = {
|
|
1419
1420
|
sm: "w-4 h-4 border-2",
|
|
1420
1421
|
md: "w-6 h-6 border-2",
|
|
1421
1422
|
lg: "w-9 h-9 border-[3px]"
|
|
1422
|
-
},
|
|
1423
|
+
}, wt = {
|
|
1423
1424
|
sm: "w-1.5 h-1.5",
|
|
1424
1425
|
md: "w-2.5 h-2.5",
|
|
1425
1426
|
lg: "w-3.5 h-3.5"
|
|
1426
|
-
},
|
|
1427
|
+
}, Tt = {
|
|
1427
1428
|
sm: "text-[12px]",
|
|
1428
1429
|
md: "text-[14px]",
|
|
1429
1430
|
lg: "text-[16px]"
|
|
1430
|
-
},
|
|
1431
|
+
}, Et = {
|
|
1431
1432
|
sm: "h-0.5",
|
|
1432
1433
|
md: "h-1",
|
|
1433
1434
|
lg: "h-1.5"
|
|
1434
|
-
},
|
|
1435
|
+
}, Dt = ({ size: e, color: t }) => /* @__PURE__ */ T("span", {
|
|
1435
1436
|
role: "status",
|
|
1436
1437
|
"aria-label": "Loading",
|
|
1437
|
-
className:
|
|
1438
|
-
}),
|
|
1438
|
+
className: R("inline-block rounded-full animate-spin", "border-current border-t-transparent", Ct[e], t ?? "text-(--accent)")
|
|
1439
|
+
}), Ot = ({ size: e, color: t }) => /* @__PURE__ */ T("span", {
|
|
1439
1440
|
role: "status",
|
|
1440
1441
|
"aria-label": "Loading",
|
|
1441
1442
|
className: "inline-flex items-center gap-1",
|
|
@@ -1443,149 +1444,149 @@ var bt = {
|
|
|
1443
1444
|
0,
|
|
1444
1445
|
1,
|
|
1445
1446
|
2
|
|
1446
|
-
].map((n) => /* @__PURE__ */
|
|
1447
|
-
className:
|
|
1447
|
+
].map((n) => /* @__PURE__ */ T("span", {
|
|
1448
|
+
className: R("inline-block rounded-full animate-bounce", wt[e], t ?? "bg-(--accent)"),
|
|
1448
1449
|
style: { animationDelay: `${n * .15}s` }
|
|
1449
1450
|
}, n))
|
|
1450
|
-
}),
|
|
1451
|
+
}), kt = ({ size: e, color: t }) => /* @__PURE__ */ T("span", {
|
|
1451
1452
|
role: "status",
|
|
1452
1453
|
"aria-label": "Loading",
|
|
1453
|
-
className:
|
|
1454
|
-
children: /* @__PURE__ */
|
|
1455
|
-
}),
|
|
1456
|
-
let s =
|
|
1454
|
+
className: R("relative block w-full overflow-hidden rounded-full bg-(--bg-hover)", Et[e]),
|
|
1455
|
+
children: /* @__PURE__ */ T("span", { className: R("absolute inset-y-0 w-1/3 rounded-full", "animate-[loading-bar_1.4s_ease-in-out_infinite]", t ?? "bg-(--accent)") })
|
|
1456
|
+
}), At = v.forwardRef(({ variant: e = "spinner", size: t = "md", label: n, centered: r, className: i, color: a }, o) => {
|
|
1457
|
+
let s = T(e === "dots" ? Ot : e === "bar" ? kt : Dt, {
|
|
1457
1458
|
size: t,
|
|
1458
1459
|
color: a
|
|
1459
1460
|
});
|
|
1460
|
-
return /* @__PURE__ */
|
|
1461
|
+
return /* @__PURE__ */ E("div", {
|
|
1461
1462
|
ref: o,
|
|
1462
|
-
className:
|
|
1463
|
-
children: [s, n && /* @__PURE__ */
|
|
1464
|
-
className:
|
|
1463
|
+
className: R("inline-flex items-center gap-2", r && "w-full justify-center", e === "bar" && "w-full flex-col items-stretch gap-1.5", i),
|
|
1464
|
+
children: [s, n && /* @__PURE__ */ T("span", {
|
|
1465
|
+
className: R("text-(--text-secondary)", Tt[t]),
|
|
1465
1466
|
children: n
|
|
1466
1467
|
})]
|
|
1467
1468
|
});
|
|
1468
1469
|
});
|
|
1469
|
-
|
|
1470
|
+
At.displayName = "Loading";
|
|
1470
1471
|
//#endregion
|
|
1471
1472
|
//#region src/components/AutoComplete.tsx
|
|
1472
|
-
var
|
|
1473
|
-
let
|
|
1473
|
+
var jt = v.forwardRef(({ options: e, value: t, defaultValue: n = "", onValueChange: r, onInputChange: i, placeholder: a = "Search…", disabled: o, required: s, label: c, error: l, fullWidth: u, clearable: d = !0, maxHeight: f = "max-h-60", emptyMessage: p = "No results found", className: m, id: h }, g) => {
|
|
1474
|
+
let _ = v.useId(), y = h ?? _, b = `${y}-listbox`, x = t !== void 0, [S, C] = v.useState(n), w = x ? t : S, [D, k] = v.useState(() => {
|
|
1474
1475
|
let r = e.find((e) => e.value === (x ? t : n));
|
|
1475
1476
|
return r ? r.label : x ? t ?? "" : n;
|
|
1476
|
-
}), [j,
|
|
1477
|
-
|
|
1477
|
+
}), [j, M] = v.useState(!1), [N, P] = v.useState(-1), I = v.useRef(null), L = v.useRef(null);
|
|
1478
|
+
v.useEffect(() => {
|
|
1478
1479
|
if (x) {
|
|
1479
1480
|
let n = e.find((e) => e.value === t);
|
|
1480
|
-
|
|
1481
|
+
k(n ? n.label : t ?? "");
|
|
1481
1482
|
}
|
|
1482
1483
|
}, [
|
|
1483
1484
|
t,
|
|
1484
1485
|
x,
|
|
1485
1486
|
e
|
|
1486
1487
|
]);
|
|
1487
|
-
let z =
|
|
1488
|
-
let t =
|
|
1488
|
+
let z = v.useMemo(() => {
|
|
1489
|
+
let t = D.toLowerCase();
|
|
1489
1490
|
return e.filter((e) => e.label.toLowerCase().includes(t));
|
|
1490
|
-
}, [e,
|
|
1491
|
-
e.disabled || (
|
|
1492
|
-
}, ee = (e) => {
|
|
1493
|
-
e.stopPropagation(), A(""), x || E(""), r?.(""), i?.(""), N(!1), R.current?.focus();
|
|
1494
|
-
}, te = (e) => {
|
|
1495
|
-
let t = e.target.value;
|
|
1496
|
-
A(t), i?.(t), x || E(""), r?.(""), N(!0), I(-1);
|
|
1497
|
-
}, ne = () => {
|
|
1498
|
-
N(!0);
|
|
1491
|
+
}, [e, D]), B = (e) => {
|
|
1492
|
+
e.disabled || (k(e.label), x || C(e.value), r?.(e.value), M(!1), P(-1));
|
|
1499
1493
|
}, V = (e) => {
|
|
1494
|
+
e.stopPropagation(), k(""), x || C(""), r?.(""), i?.(""), M(!1), L.current?.focus();
|
|
1495
|
+
}, H = (e) => {
|
|
1496
|
+
let t = e.target.value;
|
|
1497
|
+
k(t), i?.(t), x || C(""), r?.(""), M(!0), P(-1);
|
|
1498
|
+
}, U = () => {
|
|
1499
|
+
M(!0);
|
|
1500
|
+
}, ee = (e) => {
|
|
1500
1501
|
let t = z.filter((e) => !e.disabled);
|
|
1501
1502
|
switch (e.key) {
|
|
1502
1503
|
case "ArrowDown":
|
|
1503
|
-
e.preventDefault(),
|
|
1504
|
+
e.preventDefault(), M(!0), P((e) => Math.min(e + 1, t.length - 1));
|
|
1504
1505
|
break;
|
|
1505
1506
|
case "ArrowUp":
|
|
1506
|
-
e.preventDefault(),
|
|
1507
|
+
e.preventDefault(), P((e) => Math.max(e - 1, 0));
|
|
1507
1508
|
break;
|
|
1508
1509
|
case "Enter":
|
|
1509
|
-
e.preventDefault(), j &&
|
|
1510
|
+
e.preventDefault(), j && N >= 0 && t[N] && B(t[N]);
|
|
1510
1511
|
break;
|
|
1511
1512
|
case "Escape":
|
|
1512
|
-
|
|
1513
|
+
M(!1), P(-1);
|
|
1513
1514
|
break;
|
|
1514
1515
|
case "Tab":
|
|
1515
|
-
|
|
1516
|
+
M(!1);
|
|
1516
1517
|
break;
|
|
1517
1518
|
}
|
|
1518
1519
|
};
|
|
1519
|
-
|
|
1520
|
+
v.useEffect(() => {
|
|
1520
1521
|
let t = (t) => {
|
|
1521
|
-
if (
|
|
1522
|
-
|
|
1523
|
-
let t = e.find((e) => e.value ===
|
|
1524
|
-
t &&
|
|
1522
|
+
if (I.current && !I.current.contains(t.target)) {
|
|
1523
|
+
M(!1);
|
|
1524
|
+
let t = e.find((e) => e.value === w);
|
|
1525
|
+
t && k(t.label);
|
|
1525
1526
|
}
|
|
1526
1527
|
};
|
|
1527
1528
|
return document.addEventListener("pointerdown", t), () => document.removeEventListener("pointerdown", t);
|
|
1528
|
-
}, [e,
|
|
1529
|
-
let
|
|
1530
|
-
return /* @__PURE__ */
|
|
1531
|
-
ref:
|
|
1532
|
-
className:
|
|
1529
|
+
}, [e, w]);
|
|
1530
|
+
let te = d && (D || w);
|
|
1531
|
+
return /* @__PURE__ */ E("div", {
|
|
1532
|
+
ref: I,
|
|
1533
|
+
className: R("relative flex flex-col gap-1.5", u && "w-full", m),
|
|
1533
1534
|
children: [
|
|
1534
|
-
c && /* @__PURE__ */
|
|
1535
|
+
c && /* @__PURE__ */ E("label", {
|
|
1535
1536
|
htmlFor: y,
|
|
1536
1537
|
className: "text-[14px] font-semibold text-(--text-primary)",
|
|
1537
|
-
children: [c, s && /* @__PURE__ */
|
|
1538
|
+
children: [c, s && /* @__PURE__ */ T("span", {
|
|
1538
1539
|
className: "ml-0.5 text-(--danger)",
|
|
1539
1540
|
children: "*"
|
|
1540
1541
|
})]
|
|
1541
1542
|
}),
|
|
1542
|
-
/* @__PURE__ */
|
|
1543
|
+
/* @__PURE__ */ E("div", {
|
|
1543
1544
|
className: "relative",
|
|
1544
|
-
children: [/* @__PURE__ */
|
|
1545
|
+
children: [/* @__PURE__ */ T("input", {
|
|
1545
1546
|
ref: (e) => {
|
|
1546
|
-
|
|
1547
|
+
L.current = e, typeof g == "function" ? g(e) : g && (g.current = e);
|
|
1547
1548
|
},
|
|
1548
1549
|
id: y,
|
|
1549
1550
|
role: "combobox",
|
|
1550
1551
|
"aria-autocomplete": "list",
|
|
1551
1552
|
"aria-expanded": j,
|
|
1552
1553
|
"aria-controls": b,
|
|
1553
|
-
"aria-activedescendant":
|
|
1554
|
+
"aria-activedescendant": N >= 0 ? `${y}-option-${N}` : void 0,
|
|
1554
1555
|
autoComplete: "off",
|
|
1555
1556
|
disabled: o,
|
|
1556
1557
|
required: s,
|
|
1557
1558
|
placeholder: a,
|
|
1558
|
-
value:
|
|
1559
|
-
onChange:
|
|
1560
|
-
onFocus:
|
|
1561
|
-
onKeyDown:
|
|
1562
|
-
className:
|
|
1563
|
-
}), /* @__PURE__ */
|
|
1559
|
+
value: D,
|
|
1560
|
+
onChange: H,
|
|
1561
|
+
onFocus: U,
|
|
1562
|
+
onKeyDown: ee,
|
|
1563
|
+
className: R("appearance-none block w-full rounded-md border text-[15px] leading-[1.4] shadow-sm", "px-3 py-2 pr-9 bg-(--bg-primary) text-(--text-primary) placeholder-(--text-muted)", "transition-[border-color,box-shadow,background-color] focus:outline-none", "focus:border-(--accent)/70", "disabled:bg-(--bg-primary) disabled:text-(--text-muted) disabled:cursor-not-allowed", l ? "border-(--danger) focus:border-(--danger) focus:shadow-[0_0_0_2px_var(--danger)]" : "border-(--border-light) hover:border-(--text-primary)/30")
|
|
1564
|
+
}), /* @__PURE__ */ E("span", {
|
|
1564
1565
|
className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2.5 gap-0.5",
|
|
1565
|
-
children: [
|
|
1566
|
+
children: [te && /* @__PURE__ */ T("button", {
|
|
1566
1567
|
type: "button",
|
|
1567
1568
|
tabIndex: -1,
|
|
1568
1569
|
"aria-label": "Clear",
|
|
1569
|
-
onClick:
|
|
1570
|
-
className:
|
|
1571
|
-
children: /* @__PURE__ */
|
|
1572
|
-
}), /* @__PURE__ */
|
|
1570
|
+
onClick: V,
|
|
1571
|
+
className: R("pointer-events-auto p-0.5 rounded text-(--text-muted) hover:text-(--text-primary)", "transition-colors"),
|
|
1572
|
+
children: /* @__PURE__ */ T(F, { size: 14 })
|
|
1573
|
+
}), /* @__PURE__ */ T(A, {
|
|
1573
1574
|
size: 16,
|
|
1574
|
-
className:
|
|
1575
|
+
className: R("text-(--text-muted) transition-transform duration-150", j && "rotate-180")
|
|
1575
1576
|
})]
|
|
1576
1577
|
})]
|
|
1577
1578
|
}),
|
|
1578
|
-
j && /* @__PURE__ */
|
|
1579
|
+
j && /* @__PURE__ */ T("div", {
|
|
1579
1580
|
id: b,
|
|
1580
1581
|
role: "listbox",
|
|
1581
|
-
className:
|
|
1582
|
+
className: R("absolute left-0 right-0 z-50 mt-1 overflow-y-auto", "rounded-md border border-(--border-light) bg-(--bg-primary) shadow-lg", "py-1", f, "top-[calc(100%+2px)]"),
|
|
1582
1583
|
style: { top: c ? "calc(1.5rem + 0.375rem + 2.25rem + 2px)" : "calc(2.25rem + 2px)" },
|
|
1583
|
-
children: z.length === 0 ? /* @__PURE__ */
|
|
1584
|
+
children: z.length === 0 ? /* @__PURE__ */ T("div", {
|
|
1584
1585
|
className: "px-3 py-2 text-[13px] text-(--text-muted)",
|
|
1585
1586
|
children: p
|
|
1586
1587
|
}) : z.map((e, t) => {
|
|
1587
|
-
let n = e.value ===
|
|
1588
|
-
return /* @__PURE__ */
|
|
1588
|
+
let n = e.value === w, r = t === N;
|
|
1589
|
+
return /* @__PURE__ */ E("div", {
|
|
1589
1590
|
id: `${y}-option-${t}`,
|
|
1590
1591
|
role: "option",
|
|
1591
1592
|
"aria-selected": n,
|
|
@@ -1593,192 +1594,192 @@ var Ot = h.forwardRef(({ options: e, value: t, defaultValue: n = "", onValueChan
|
|
|
1593
1594
|
onPointerDown: (t) => {
|
|
1594
1595
|
t.preventDefault(), B(e);
|
|
1595
1596
|
},
|
|
1596
|
-
className:
|
|
1597
|
-
children: [/* @__PURE__ */
|
|
1597
|
+
className: R("relative flex cursor-default select-none items-center px-3 py-1.5 text-[14px] rounded mx-1", "transition-colors", r && "bg-(--bg-hover) outline-none", n && !r && "bg-(--bg-hover)/60 font-medium", e.disabled && "opacity-50 cursor-not-allowed"),
|
|
1598
|
+
children: [/* @__PURE__ */ T("span", {
|
|
1598
1599
|
className: "flex-1",
|
|
1599
1600
|
children: e.label
|
|
1600
|
-
}), n && /* @__PURE__ */
|
|
1601
|
+
}), n && /* @__PURE__ */ T(O, {
|
|
1601
1602
|
size: 14,
|
|
1602
1603
|
className: "ml-2 text-(--accent) shrink-0"
|
|
1603
1604
|
})]
|
|
1604
1605
|
}, e.value);
|
|
1605
1606
|
})
|
|
1606
1607
|
}),
|
|
1607
|
-
l && /* @__PURE__ */
|
|
1608
|
+
l && /* @__PURE__ */ E("span", {
|
|
1608
1609
|
className: "text-[12px] font-medium text-(--danger) flex items-center gap-1 leading-tight",
|
|
1609
1610
|
children: ["⚠️ ", l]
|
|
1610
1611
|
})
|
|
1611
1612
|
]
|
|
1612
1613
|
});
|
|
1613
1614
|
});
|
|
1614
|
-
|
|
1615
|
+
jt.displayName = "AutoComplete";
|
|
1615
1616
|
//#endregion
|
|
1616
1617
|
//#region src/components/Combobox.tsx
|
|
1617
|
-
var
|
|
1618
|
-
let
|
|
1618
|
+
var Mt = R("inline-flex w-full items-center rounded-md border", "bg-(--bg-primary) text-(--text-primary)", "transition-[border-color,box-shadow] outline-none", "has-[:focus]:border-(--accent)/70", "has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50"), Nt = R("flex-1 min-w-0 appearance-none bg-transparent text-[14px] leading-[1.4]", "px-3 py-2 text-(--text-primary) placeholder-(--text-muted)", "outline-none disabled:cursor-not-allowed"), Pt = R("min-w-[var(--anchor-width)] overflow-auto rounded-lg border border-(--border-light) bg-(--bg-primary)", "py-1 shadow-lg", "origin-[var(--transform-origin)]", "transition-[transform,scale,opacity]", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0"), Ft = R("relative flex cursor-default select-none items-center rounded px-3 py-1.5 text-[14px] text-(--text-primary) mx-1", "data-[highlighted]:bg-(--bg-hover) data-[highlighted]:outline-none", "data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"), It = v.forwardRef(({ options: e, groups: t, value: n, defaultValue: r, onValueChange: i, placeholder: o = "Search…", disabled: s, required: c, label: l, error: u, fullWidth: d, clearable: f = !0, emptyMessage: p = "No results found", className: m, id: h }, g) => {
|
|
1619
|
+
let _ = v.useId(), y = h ?? _, b = v.useMemo(() => t ? t.flatMap((e) => e.options) : e ?? [], [e, t]), x = v.useMemo(() => {
|
|
1619
1620
|
if (t) return t.map((e) => ({
|
|
1620
1621
|
value: e.label,
|
|
1621
1622
|
items: e.options
|
|
1622
1623
|
}));
|
|
1623
1624
|
}, [t]);
|
|
1624
|
-
return /* @__PURE__ */
|
|
1625
|
-
className:
|
|
1625
|
+
return /* @__PURE__ */ E("div", {
|
|
1626
|
+
className: R("flex flex-col gap-1.5", d && "w-full", m),
|
|
1626
1627
|
children: [
|
|
1627
|
-
l && /* @__PURE__ */
|
|
1628
|
+
l && /* @__PURE__ */ E("label", {
|
|
1628
1629
|
htmlFor: y,
|
|
1629
1630
|
className: "text-[14px] font-semibold text-(--text-primary)",
|
|
1630
|
-
children: [l, c && /* @__PURE__ */
|
|
1631
|
+
children: [l, c && /* @__PURE__ */ T("span", {
|
|
1631
1632
|
className: "ml-0.5 text-(--danger)",
|
|
1632
1633
|
children: "*"
|
|
1633
1634
|
})]
|
|
1634
1635
|
}),
|
|
1635
|
-
/* @__PURE__ */
|
|
1636
|
-
value:
|
|
1637
|
-
defaultValue:
|
|
1638
|
-
onValueChange:
|
|
1636
|
+
/* @__PURE__ */ E(a.Root, {
|
|
1637
|
+
value: n,
|
|
1638
|
+
defaultValue: r,
|
|
1639
|
+
onValueChange: i ? (e) => i(e) : void 0,
|
|
1639
1640
|
items: x ?? b,
|
|
1640
1641
|
disabled: s,
|
|
1641
1642
|
required: c,
|
|
1642
|
-
children: [/* @__PURE__ */
|
|
1643
|
-
className:
|
|
1644
|
-
children: [/* @__PURE__ */
|
|
1645
|
-
ref:
|
|
1643
|
+
children: [/* @__PURE__ */ E("div", {
|
|
1644
|
+
className: R(Mt, u ? "border-(--danger) has-[:focus]:border-(--danger) has-[:focus]:shadow-[0_0_0_2px_var(--danger)]" : "border-(--border-light) hover:border-(--text-primary)/30"),
|
|
1645
|
+
children: [/* @__PURE__ */ T(a.Input, {
|
|
1646
|
+
ref: g,
|
|
1646
1647
|
id: y,
|
|
1647
1648
|
placeholder: o,
|
|
1648
|
-
className:
|
|
1649
|
-
}), /* @__PURE__ */
|
|
1649
|
+
className: Nt
|
|
1650
|
+
}), /* @__PURE__ */ E("div", {
|
|
1650
1651
|
className: "flex items-center pr-2 gap-0.5 shrink-0",
|
|
1651
|
-
children: [f && /* @__PURE__ */
|
|
1652
|
+
children: [f && /* @__PURE__ */ T(a.Clear, {
|
|
1652
1653
|
"aria-label": "Clear",
|
|
1653
|
-
className:
|
|
1654
|
-
children: /* @__PURE__ */
|
|
1655
|
-
}), /* @__PURE__ */
|
|
1654
|
+
className: R("p-0.5 rounded text-(--text-muted) hover:text-(--text-primary)", "transition-colors cursor-pointer"),
|
|
1655
|
+
children: /* @__PURE__ */ T(F, { size: 14 })
|
|
1656
|
+
}), /* @__PURE__ */ T(a.Trigger, {
|
|
1656
1657
|
"aria-label": "Open",
|
|
1657
1658
|
className: "p-0.5 rounded text-(--text-muted) hover:text-(--text-primary) transition-colors cursor-pointer",
|
|
1658
|
-
children: /* @__PURE__ */
|
|
1659
|
+
children: /* @__PURE__ */ T(A, { size: 16 })
|
|
1659
1660
|
})]
|
|
1660
1661
|
})]
|
|
1661
|
-
}), /* @__PURE__ */
|
|
1662
|
+
}), /* @__PURE__ */ T(a.Portal, { children: /* @__PURE__ */ T(a.Positioner, {
|
|
1662
1663
|
sideOffset: 4,
|
|
1663
1664
|
className: "z-50",
|
|
1664
|
-
children: /* @__PURE__ */
|
|
1665
|
-
className:
|
|
1666
|
-
children: [/* @__PURE__ */
|
|
1665
|
+
children: /* @__PURE__ */ E(a.Popup, {
|
|
1666
|
+
className: Pt,
|
|
1667
|
+
children: [/* @__PURE__ */ T(a.Empty, {
|
|
1667
1668
|
className: "px-3 py-2 text-[13px] text-(--text-muted)",
|
|
1668
1669
|
children: p
|
|
1669
|
-
}), /* @__PURE__ */
|
|
1670
|
+
}), /* @__PURE__ */ T(a.List, {
|
|
1670
1671
|
className: "outline-none max-h-60 overflow-y-auto",
|
|
1671
|
-
children: t ? (e) => /* @__PURE__ */
|
|
1672
|
+
children: t ? (e) => /* @__PURE__ */ E(a.Group, { children: [/* @__PURE__ */ T(a.GroupLabel, {
|
|
1672
1673
|
className: "px-3 py-1 text-[12px] font-semibold text-(--text-muted) uppercase tracking-wider",
|
|
1673
1674
|
children: e.value
|
|
1674
|
-
}), e.items.map((e) => /* @__PURE__ */
|
|
1675
|
+
}), e.items.map((e) => /* @__PURE__ */ T(Q, { option: e }, e.value))] }, e.value) : (e) => /* @__PURE__ */ T(Q, { option: e }, e.value)
|
|
1675
1676
|
})]
|
|
1676
1677
|
})
|
|
1677
1678
|
}) })]
|
|
1678
1679
|
}),
|
|
1679
|
-
u && /* @__PURE__ */
|
|
1680
|
+
u && /* @__PURE__ */ E("span", {
|
|
1680
1681
|
className: "flex items-center gap-1 text-[12px] font-medium leading-tight text-(--danger)",
|
|
1681
1682
|
children: ["⚠️ ", u]
|
|
1682
1683
|
})
|
|
1683
1684
|
]
|
|
1684
1685
|
});
|
|
1685
1686
|
});
|
|
1686
|
-
|
|
1687
|
-
var
|
|
1688
|
-
let
|
|
1689
|
-
|
|
1690
|
-
}, [
|
|
1687
|
+
It.displayName = "Combobox";
|
|
1688
|
+
var Lt = v.forwardRef(({ options: e, groups: t, value: n, defaultValue: r, onValueChange: i, placeholder: o = "Search…", disabled: s, required: c, label: l, error: u, fullWidth: d, clearable: f = !0, emptyMessage: p = "No results found", className: m, id: h }, g) => {
|
|
1689
|
+
let _ = v.useId(), y = h ?? _, [b, x] = v.useState(r ?? []), S = n ?? b, C = v.useCallback((e) => {
|
|
1690
|
+
n === void 0 && x(e), i?.(e);
|
|
1691
|
+
}, [n, i]), w = v.useMemo(() => t ? t.flatMap((e) => e.options) : e ?? [], [e, t]), D = v.useMemo(() => {
|
|
1691
1692
|
if (t) return t.map((e) => ({
|
|
1692
1693
|
value: e.label,
|
|
1693
1694
|
items: e.options
|
|
1694
1695
|
}));
|
|
1695
1696
|
}, [t]);
|
|
1696
|
-
return /* @__PURE__ */
|
|
1697
|
-
className:
|
|
1697
|
+
return /* @__PURE__ */ E("div", {
|
|
1698
|
+
className: R("flex flex-col gap-1.5", d && "w-full", m),
|
|
1698
1699
|
children: [
|
|
1699
|
-
l && /* @__PURE__ */
|
|
1700
|
+
l && /* @__PURE__ */ E("label", {
|
|
1700
1701
|
htmlFor: y,
|
|
1701
1702
|
className: "text-[14px] font-semibold text-(--text-primary)",
|
|
1702
|
-
children: [l, c && /* @__PURE__ */
|
|
1703
|
+
children: [l, c && /* @__PURE__ */ T("span", {
|
|
1703
1704
|
className: "ml-0.5 text-(--danger)",
|
|
1704
1705
|
children: "*"
|
|
1705
1706
|
})]
|
|
1706
1707
|
}),
|
|
1707
|
-
/* @__PURE__ */
|
|
1708
|
+
/* @__PURE__ */ E(a.Root, {
|
|
1708
1709
|
multiple: !0,
|
|
1709
|
-
value:
|
|
1710
|
-
onValueChange:
|
|
1711
|
-
items:
|
|
1710
|
+
value: S,
|
|
1711
|
+
onValueChange: C,
|
|
1712
|
+
items: D ?? w,
|
|
1712
1713
|
disabled: s,
|
|
1713
1714
|
required: c,
|
|
1714
|
-
children: [/* @__PURE__ */
|
|
1715
|
-
className:
|
|
1715
|
+
children: [/* @__PURE__ */ E("div", {
|
|
1716
|
+
className: R(Mt, "flex-wrap gap-1 py-1", u ? "border-(--danger) has-[:focus]:border-(--danger) has-[:focus]:shadow-[0_0_0_2px_var(--danger)]" : "border-(--border-light) hover:border-(--text-primary)/30"),
|
|
1716
1717
|
children: [
|
|
1717
|
-
|
|
1718
|
+
S.length > 0 && /* @__PURE__ */ T(a.Chips, {
|
|
1718
1719
|
className: "flex flex-wrap gap-1 pl-2",
|
|
1719
|
-
children:
|
|
1720
|
-
className:
|
|
1721
|
-
children: [e.label, /* @__PURE__ */
|
|
1720
|
+
children: S.map((e) => /* @__PURE__ */ E(a.Chip, {
|
|
1721
|
+
className: R("inline-flex items-center gap-1 rounded-md px-2 py-0.5", "bg-(--bg-hover) text-(--text-primary) text-[12px] font-medium", "border border-(--border-light)"),
|
|
1722
|
+
children: [e.label, /* @__PURE__ */ T(a.ChipRemove, {
|
|
1722
1723
|
className: "rounded-sm p-0.5 hover:bg-(--bg-secondary) text-(--text-muted) hover:text-(--text-primary) transition-colors cursor-pointer",
|
|
1723
1724
|
"aria-label": `Remove ${e.label}`,
|
|
1724
|
-
children: /* @__PURE__ */
|
|
1725
|
+
children: /* @__PURE__ */ T(F, { size: 12 })
|
|
1725
1726
|
})]
|
|
1726
1727
|
}, e.value))
|
|
1727
1728
|
}),
|
|
1728
|
-
/* @__PURE__ */
|
|
1729
|
-
ref:
|
|
1729
|
+
/* @__PURE__ */ T(a.Input, {
|
|
1730
|
+
ref: g,
|
|
1730
1731
|
id: y,
|
|
1731
1732
|
placeholder: o,
|
|
1732
|
-
className:
|
|
1733
|
+
className: R(Nt, "py-1.5")
|
|
1733
1734
|
}),
|
|
1734
|
-
/* @__PURE__ */
|
|
1735
|
+
/* @__PURE__ */ E("div", {
|
|
1735
1736
|
className: "flex items-center pr-2 gap-0.5 shrink-0",
|
|
1736
|
-
children: [f && /* @__PURE__ */
|
|
1737
|
+
children: [f && /* @__PURE__ */ T(a.Clear, {
|
|
1737
1738
|
"aria-label": "Clear all",
|
|
1738
|
-
className:
|
|
1739
|
-
children: /* @__PURE__ */
|
|
1740
|
-
}), /* @__PURE__ */
|
|
1739
|
+
className: R("p-0.5 rounded text-(--text-muted) hover:text-(--text-primary)", "transition-colors cursor-pointer"),
|
|
1740
|
+
children: /* @__PURE__ */ T(F, { size: 14 })
|
|
1741
|
+
}), /* @__PURE__ */ T(a.Trigger, {
|
|
1741
1742
|
"aria-label": "Open",
|
|
1742
1743
|
className: "p-0.5 rounded text-(--text-muted) hover:text-(--text-primary) transition-colors cursor-pointer",
|
|
1743
|
-
children: /* @__PURE__ */
|
|
1744
|
+
children: /* @__PURE__ */ T(A, { size: 16 })
|
|
1744
1745
|
})]
|
|
1745
1746
|
})
|
|
1746
1747
|
]
|
|
1747
|
-
}), /* @__PURE__ */
|
|
1748
|
+
}), /* @__PURE__ */ T(a.Portal, { children: /* @__PURE__ */ T(a.Positioner, {
|
|
1748
1749
|
sideOffset: 4,
|
|
1749
1750
|
className: "z-50",
|
|
1750
|
-
children: /* @__PURE__ */
|
|
1751
|
-
className:
|
|
1752
|
-
children: [/* @__PURE__ */
|
|
1751
|
+
children: /* @__PURE__ */ E(a.Popup, {
|
|
1752
|
+
className: Pt,
|
|
1753
|
+
children: [/* @__PURE__ */ T(a.Empty, {
|
|
1753
1754
|
className: "px-3 py-2 text-[13px] text-(--text-muted)",
|
|
1754
1755
|
children: p
|
|
1755
|
-
}), /* @__PURE__ */
|
|
1756
|
+
}), /* @__PURE__ */ T(a.List, {
|
|
1756
1757
|
className: "outline-none max-h-60 overflow-y-auto",
|
|
1757
|
-
children: t ? (e) => /* @__PURE__ */
|
|
1758
|
+
children: t ? (e) => /* @__PURE__ */ E(a.Group, { children: [/* @__PURE__ */ T(a.GroupLabel, {
|
|
1758
1759
|
className: "px-3 py-1 text-[12px] font-semibold text-(--text-muted) uppercase tracking-wider",
|
|
1759
1760
|
children: e.value
|
|
1760
|
-
}), e.items.map((e) => /* @__PURE__ */
|
|
1761
|
+
}), e.items.map((e) => /* @__PURE__ */ T(Q, { option: e }, e.value))] }, e.value) : (e) => /* @__PURE__ */ T(Q, { option: e }, e.value)
|
|
1761
1762
|
})]
|
|
1762
1763
|
})
|
|
1763
1764
|
}) })]
|
|
1764
1765
|
}),
|
|
1765
|
-
u && /* @__PURE__ */
|
|
1766
|
+
u && /* @__PURE__ */ E("span", {
|
|
1766
1767
|
className: "flex items-center gap-1 text-[12px] font-medium leading-tight text-(--danger)",
|
|
1767
1768
|
children: ["⚠️ ", u]
|
|
1768
1769
|
})
|
|
1769
1770
|
]
|
|
1770
1771
|
});
|
|
1771
1772
|
});
|
|
1772
|
-
|
|
1773
|
+
Lt.displayName = "ComboboxMultiple";
|
|
1773
1774
|
function Q({ option: e }) {
|
|
1774
|
-
return /* @__PURE__ */
|
|
1775
|
+
return /* @__PURE__ */ E(a.Item, {
|
|
1775
1776
|
value: e,
|
|
1776
1777
|
disabled: e.disabled,
|
|
1777
|
-
className:
|
|
1778
|
-
children: [/* @__PURE__ */
|
|
1778
|
+
className: Ft,
|
|
1779
|
+
children: [/* @__PURE__ */ T(a.ItemIndicator, {
|
|
1779
1780
|
className: "absolute right-3 flex items-center text-(--accent)",
|
|
1780
|
-
children: /* @__PURE__ */
|
|
1781
|
-
}), /* @__PURE__ */
|
|
1781
|
+
children: /* @__PURE__ */ T(O, { size: 14 })
|
|
1782
|
+
}), /* @__PURE__ */ T("span", {
|
|
1782
1783
|
className: "flex-1",
|
|
1783
1784
|
children: e.label
|
|
1784
1785
|
})]
|
|
@@ -1786,67 +1787,67 @@ function Q({ option: e }) {
|
|
|
1786
1787
|
}
|
|
1787
1788
|
//#endregion
|
|
1788
1789
|
//#region src/components/Dropdown.tsx
|
|
1789
|
-
var
|
|
1790
|
+
var Rt = y(void 0), zt = ({ children: e, open: t, defaultOpen: n, onOpenChange: r, onSelect: i }) => /* @__PURE__ */ T(Rt.Provider, {
|
|
1790
1791
|
value: i,
|
|
1791
|
-
children: /* @__PURE__ */
|
|
1792
|
+
children: /* @__PURE__ */ T(c.Root, {
|
|
1792
1793
|
open: t,
|
|
1793
1794
|
defaultOpen: n,
|
|
1794
1795
|
onOpenChange: r,
|
|
1795
1796
|
children: e
|
|
1796
1797
|
})
|
|
1797
1798
|
});
|
|
1798
|
-
|
|
1799
|
-
var
|
|
1799
|
+
zt.displayName = "Dropdown";
|
|
1800
|
+
var Bt = v.forwardRef(({ children: e, className: t, render: n }, r) => n ? /* @__PURE__ */ T("span", {
|
|
1800
1801
|
className: "contents",
|
|
1801
|
-
children: /* @__PURE__ */
|
|
1802
|
+
children: /* @__PURE__ */ T(c.Trigger, {
|
|
1802
1803
|
ref: r,
|
|
1803
|
-
className:
|
|
1804
|
+
className: R("outline-none", t),
|
|
1804
1805
|
render: n
|
|
1805
1806
|
})
|
|
1806
|
-
}) : /* @__PURE__ */
|
|
1807
|
+
}) : /* @__PURE__ */ T("span", {
|
|
1807
1808
|
className: "contents",
|
|
1808
|
-
children: /* @__PURE__ */
|
|
1809
|
+
children: /* @__PURE__ */ T(c.Trigger, {
|
|
1809
1810
|
ref: r,
|
|
1810
|
-
className:
|
|
1811
|
+
className: R("outline-none", t),
|
|
1811
1812
|
children: e
|
|
1812
1813
|
})
|
|
1813
1814
|
}));
|
|
1814
|
-
|
|
1815
|
-
var
|
|
1815
|
+
Bt.displayName = "DropdownTrigger";
|
|
1816
|
+
var Vt = v.forwardRef(({ children: e, className: t, side: n = "bottom", align: r = "start", sideOffset: i = 4, alignOffset: a = 0 }, o) => /* @__PURE__ */ T(c.Portal, { children: /* @__PURE__ */ T(c.Positioner, {
|
|
1816
1817
|
side: n,
|
|
1817
1818
|
align: r,
|
|
1818
1819
|
sideOffset: i,
|
|
1819
|
-
alignOffset:
|
|
1820
|
-
children: /* @__PURE__ */
|
|
1821
|
-
ref:
|
|
1822
|
-
className:
|
|
1820
|
+
alignOffset: a,
|
|
1821
|
+
children: /* @__PURE__ */ T(c.Popup, {
|
|
1822
|
+
ref: o,
|
|
1823
|
+
className: R("z-50 min-w-40 max-w-72 rounded-md border border-(--border-light) bg-(--bg-primary) py-1 shadow-lg", t),
|
|
1823
1824
|
children: e
|
|
1824
1825
|
})
|
|
1825
1826
|
}) }));
|
|
1826
|
-
|
|
1827
|
-
var $ =
|
|
1828
|
-
let u =
|
|
1829
|
-
|
|
1827
|
+
Vt.displayName = "DropdownContent";
|
|
1828
|
+
var $ = v.forwardRef(({ value: e, children: t, icon: n, shortcut: r, className: i, disabled: a, destructive: o, onSelect: s }, l) => {
|
|
1829
|
+
let u = x(Rt), d = b(() => {
|
|
1830
|
+
s?.(e), u?.(e);
|
|
1830
1831
|
}, [
|
|
1831
1832
|
e,
|
|
1832
|
-
|
|
1833
|
+
s,
|
|
1833
1834
|
u
|
|
1834
1835
|
]);
|
|
1835
|
-
return /* @__PURE__ */
|
|
1836
|
+
return /* @__PURE__ */ E(c.Item, {
|
|
1836
1837
|
ref: l,
|
|
1837
|
-
className:
|
|
1838
|
-
disabled:
|
|
1838
|
+
className: R("relative flex items-center gap-2 px-3 py-1.5 text-[14px] outline-none cursor-pointer select-none", "text-(--text-primary)", "data-[highlighted]:bg-(--bg-hover)", "data-[disabled]:opacity-50 data-[disabled]:pointer-events-none", o && "text-(--danger) data-[highlighted]:bg-red-50 dark:data-[highlighted]:bg-red-950/20", i),
|
|
1839
|
+
disabled: a,
|
|
1839
1840
|
onSelect: d,
|
|
1840
1841
|
children: [
|
|
1841
|
-
n && /* @__PURE__ */
|
|
1842
|
+
n && /* @__PURE__ */ T("span", {
|
|
1842
1843
|
className: "shrink-0 text-(--text-muted)",
|
|
1843
1844
|
children: n
|
|
1844
1845
|
}),
|
|
1845
|
-
/* @__PURE__ */
|
|
1846
|
+
/* @__PURE__ */ T("span", {
|
|
1846
1847
|
className: "flex-1",
|
|
1847
1848
|
children: t
|
|
1848
1849
|
}),
|
|
1849
|
-
r && /* @__PURE__ */
|
|
1850
|
+
r && /* @__PURE__ */ T("span", {
|
|
1850
1851
|
className: "ml-auto text-[12px] text-(--text-muted)",
|
|
1851
1852
|
children: r
|
|
1852
1853
|
})
|
|
@@ -1854,22 +1855,22 @@ var $ = h.forwardRef(({ value: e, children: t, icon: n, shortcut: r, className:
|
|
|
1854
1855
|
});
|
|
1855
1856
|
});
|
|
1856
1857
|
$.displayName = "DropdownItem";
|
|
1857
|
-
var
|
|
1858
|
-
className:
|
|
1858
|
+
var Ht = ({ children: e, className: t }) => /* @__PURE__ */ T("div", {
|
|
1859
|
+
className: R("px-3 py-1.5 text-[11px] font-semibold text-(--text-muted) uppercase tracking-wider", t),
|
|
1859
1860
|
children: e
|
|
1860
1861
|
});
|
|
1861
|
-
|
|
1862
|
-
var
|
|
1863
|
-
|
|
1864
|
-
var
|
|
1862
|
+
Ht.displayName = "DropdownLabel";
|
|
1863
|
+
var Ut = ({ className: e }) => /* @__PURE__ */ T(c.Separator, { className: R("my-1 h-px bg-(--border-light)", e) });
|
|
1864
|
+
Ut.displayName = "DropdownSeparator";
|
|
1865
|
+
var Wt = ({ label: e, children: t, className: n }) => /* @__PURE__ */ E(c.Group, {
|
|
1865
1866
|
className: n,
|
|
1866
|
-
children: [/* @__PURE__ */
|
|
1867
|
+
children: [/* @__PURE__ */ T(c.GroupLabel, {
|
|
1867
1868
|
className: "px-3 py-1 text-[11px] font-semibold text-(--text-muted) uppercase tracking-wider",
|
|
1868
1869
|
children: e
|
|
1869
1870
|
}), t]
|
|
1870
1871
|
});
|
|
1871
|
-
|
|
1872
|
-
var
|
|
1872
|
+
Wt.displayName = "DropdownGroup";
|
|
1873
|
+
var Gt = ({ options: e, onSelect: t }) => /* @__PURE__ */ T(w, { children: e.map((e) => /* @__PURE__ */ T($, {
|
|
1873
1874
|
value: e.value,
|
|
1874
1875
|
icon: e.icon,
|
|
1875
1876
|
shortcut: e.shortcut,
|
|
@@ -1877,9 +1878,9 @@ var Ht = ({ options: e, onSelect: t }) => /* @__PURE__ */ S(x, { children: e.map
|
|
|
1877
1878
|
destructive: e.destructive,
|
|
1878
1879
|
onSelect: t,
|
|
1879
1880
|
children: e.label
|
|
1880
|
-
}, e.value)) }),
|
|
1881
|
+
}, e.value)) }), Kt = ({ groups: e, onSelect: t }) => /* @__PURE__ */ T(w, { children: e.map((e, n) => /* @__PURE__ */ E(v.Fragment, { children: [n > 0 && /* @__PURE__ */ T(Ut, {}), /* @__PURE__ */ T(Wt, {
|
|
1881
1882
|
label: e.label,
|
|
1882
|
-
children: e.options.map((e) => /* @__PURE__ */
|
|
1883
|
+
children: e.options.map((e) => /* @__PURE__ */ T($, {
|
|
1883
1884
|
value: e.value,
|
|
1884
1885
|
icon: e.icon,
|
|
1885
1886
|
shortcut: e.shortcut,
|
|
@@ -1888,48 +1889,48 @@ var Ht = ({ options: e, onSelect: t }) => /* @__PURE__ */ S(x, { children: e.map
|
|
|
1888
1889
|
onSelect: t,
|
|
1889
1890
|
children: e.label
|
|
1890
1891
|
}, e.value))
|
|
1891
|
-
})] }, e.label)) }),
|
|
1892
|
+
})] }, e.label)) }), qt = ({ children: e, open: t, defaultOpen: n, onOpenChange: r }) => /* @__PURE__ */ T(c.Root, {
|
|
1892
1893
|
open: t,
|
|
1893
1894
|
defaultOpen: n,
|
|
1894
1895
|
onOpenChange: r,
|
|
1895
1896
|
children: e
|
|
1896
1897
|
});
|
|
1897
|
-
|
|
1898
|
-
var
|
|
1898
|
+
qt.displayName = "DropdownSub";
|
|
1899
|
+
var Jt = v.forwardRef(({ children: e, className: t, disabled: n }, r) => /* @__PURE__ */ E(c.Trigger, {
|
|
1899
1900
|
ref: r,
|
|
1900
|
-
className:
|
|
1901
|
+
className: R("relative flex w-full items-center justify-between gap-2 px-3 py-1.5 text-[14px] outline-none cursor-pointer select-none", "text-(--text-primary) data-[highlighted]:bg-(--bg-hover)", "data-[disabled]:opacity-50 data-[disabled]:pointer-events-none", t),
|
|
1901
1902
|
disabled: n,
|
|
1902
|
-
children: [e, /* @__PURE__ */
|
|
1903
|
+
children: [e, /* @__PURE__ */ T(j, { className: "ml-auto h-3.5 w-3.5 text-(--text-muted)" })]
|
|
1903
1904
|
}));
|
|
1904
|
-
|
|
1905
|
-
var
|
|
1905
|
+
Jt.displayName = "DropdownSubTrigger";
|
|
1906
|
+
var Yt = v.forwardRef(({ children: e, className: t }, n) => /* @__PURE__ */ T(c.Portal, { children: /* @__PURE__ */ T(c.Positioner, {
|
|
1906
1907
|
side: "right",
|
|
1907
1908
|
align: "start",
|
|
1908
1909
|
sideOffset: 8,
|
|
1909
|
-
children: /* @__PURE__ */
|
|
1910
|
+
children: /* @__PURE__ */ T(c.Popup, {
|
|
1910
1911
|
ref: n,
|
|
1911
|
-
className:
|
|
1912
|
+
className: R("z-50 min-w-40 max-w-72 rounded-md border border-(--border-light) bg-(--bg-primary) py-1 shadow-lg", t),
|
|
1912
1913
|
children: e
|
|
1913
1914
|
})
|
|
1914
1915
|
}) }));
|
|
1915
|
-
|
|
1916
|
-
var
|
|
1917
|
-
let [t, n] =
|
|
1916
|
+
Yt.displayName = "DropdownSubContent";
|
|
1917
|
+
var Xt = y(null), Zt = ({ children: e }) => {
|
|
1918
|
+
let [t, n] = C({
|
|
1918
1919
|
open: !1,
|
|
1919
1920
|
anchor: null,
|
|
1920
1921
|
options: {}
|
|
1921
|
-
}), r =
|
|
1922
|
+
}), r = b((e, t) => {
|
|
1922
1923
|
n({
|
|
1923
1924
|
open: !0,
|
|
1924
1925
|
anchor: e,
|
|
1925
1926
|
options: t
|
|
1926
1927
|
});
|
|
1927
|
-
}, []), i =
|
|
1928
|
+
}, []), i = b(() => {
|
|
1928
1929
|
n((e) => ({
|
|
1929
1930
|
...e,
|
|
1930
1931
|
open: !1
|
|
1931
1932
|
}));
|
|
1932
|
-
}, []), a =
|
|
1933
|
+
}, []), a = b((e, t) => {
|
|
1933
1934
|
n((n) => n.open && n.anchor === e ? {
|
|
1934
1935
|
...n,
|
|
1935
1936
|
open: !1
|
|
@@ -1938,7 +1939,7 @@ var qt = g(null), Jt = ({ children: e }) => {
|
|
|
1938
1939
|
anchor: e,
|
|
1939
1940
|
options: t
|
|
1940
1941
|
});
|
|
1941
|
-
}, []), o =
|
|
1942
|
+
}, []), o = S(() => ({
|
|
1942
1943
|
show: r,
|
|
1943
1944
|
hide: i,
|
|
1944
1945
|
toggle: a,
|
|
@@ -1949,35 +1950,35 @@ var qt = g(null), Jt = ({ children: e }) => {
|
|
|
1949
1950
|
a,
|
|
1950
1951
|
t.open
|
|
1951
1952
|
]);
|
|
1952
|
-
return /* @__PURE__ */
|
|
1953
|
+
return /* @__PURE__ */ E(Xt.Provider, {
|
|
1953
1954
|
value: o,
|
|
1954
|
-
children: [e, /* @__PURE__ */
|
|
1955
|
+
children: [e, /* @__PURE__ */ T(Qt, {
|
|
1955
1956
|
state: t,
|
|
1956
1957
|
onClose: i
|
|
1957
1958
|
})]
|
|
1958
1959
|
});
|
|
1959
1960
|
};
|
|
1960
|
-
|
|
1961
|
-
function
|
|
1961
|
+
Zt.displayName = "DropdownProvider";
|
|
1962
|
+
function Qt({ state: e, onClose: t }) {
|
|
1962
1963
|
if (!e.open || !e.anchor) return null;
|
|
1963
1964
|
let { options: n } = e, r = (e) => {
|
|
1964
1965
|
n.onSelect?.(e), t();
|
|
1965
1966
|
};
|
|
1966
|
-
return /* @__PURE__ */
|
|
1967
|
+
return /* @__PURE__ */ T(c.Root, {
|
|
1967
1968
|
open: e.open,
|
|
1968
1969
|
onOpenChange: (e) => !e && t(),
|
|
1969
|
-
children: /* @__PURE__ */
|
|
1970
|
+
children: /* @__PURE__ */ T(c.Portal, { children: /* @__PURE__ */ T(c.Positioner, {
|
|
1970
1971
|
anchor: e.anchor,
|
|
1971
1972
|
side: n.side ?? "bottom",
|
|
1972
1973
|
align: n.align ?? "start",
|
|
1973
1974
|
sideOffset: n.sideOffset ?? 4,
|
|
1974
1975
|
alignOffset: n.alignOffset ?? 0,
|
|
1975
|
-
children: /* @__PURE__ */
|
|
1976
|
-
className:
|
|
1977
|
-
children: n.groups ? /* @__PURE__ */
|
|
1976
|
+
children: /* @__PURE__ */ T(c.Popup, {
|
|
1977
|
+
className: R("z-50 min-w-40 max-w-72 rounded-md border border-(--border-light) bg-(--bg-primary) py-1 shadow-lg", n.className),
|
|
1978
|
+
children: n.groups ? /* @__PURE__ */ T(Kt, {
|
|
1978
1979
|
groups: n.groups,
|
|
1979
1980
|
onSelect: r
|
|
1980
|
-
}) : /* @__PURE__ */
|
|
1981
|
+
}) : /* @__PURE__ */ T(Gt, {
|
|
1981
1982
|
options: n.options ?? [],
|
|
1982
1983
|
onSelect: r
|
|
1983
1984
|
})
|
|
@@ -1985,10 +1986,10 @@ function Yt({ state: e, onClose: t }) {
|
|
|
1985
1986
|
}) })
|
|
1986
1987
|
});
|
|
1987
1988
|
}
|
|
1988
|
-
function
|
|
1989
|
-
let e =
|
|
1989
|
+
function $t() {
|
|
1990
|
+
let e = x(Xt);
|
|
1990
1991
|
if (!e) throw Error("useDropdown must be used within <DropdownProvider>");
|
|
1991
1992
|
return e;
|
|
1992
1993
|
}
|
|
1993
1994
|
//#endregion
|
|
1994
|
-
export {
|
|
1995
|
+
export { We as AlertDialog, Ge as AlertDialogTrigger, jt as AutoComplete, B as Avatar, V as Badge, z as Button, rt as Checkbox, It as Combobox, Lt as ComboboxMultiple, Se as ContextMenu, Te as ContextMenuCheckboxItem, we as ContextMenuContent, Y as ContextMenuItem, Ne as ContextMenuItemWithIcon, Oe as ContextMenuLabel, Ee as ContextMenuRadioGroup, De as ContextMenuRadioItem, ke as ContextMenuSeparator, Ae as ContextMenuSub, Me as ContextMenuSubContent, je as ContextMenuSubTrigger, Ce as ContextMenuTrigger, X as Dialog, Fe as DialogBody, Re as DialogClose, Ie as DialogFooter, Pe as DialogHeader, Be as DialogProvider, Le as DialogTrigger, zt as Dropdown, Vt as DropdownContent, Wt as DropdownGroup, Kt as DropdownGroupList, $ as DropdownItem, Ht as DropdownLabel, Gt as DropdownOptionList, Zt as DropdownProvider, Ut as DropdownSeparator, qt as DropdownSub, Yt as DropdownSubContent, Jt as DropdownSubTrigger, Bt as DropdownTrigger, qe as Form, $e as FormActions, Qe as FormCheckbox, Je as FormField, Ye as FormInput, Ze as FormSelect, Xe as FormTextarea, U as IconButton, ue as ImperativePopoverProvider, H as Input, At as Loading, pe as Menu, K as MenuCheckboxItem, me as MenuContent, G as MenuItem, xe as MenuItemWithIcon, ge as MenuLabel, he as MenuRadioGroup, q as MenuRadioItem, _e as MenuSeparator, ve as MenuSub, be as MenuSubContent, ye as MenuSubTrigger, W as MenuTrigger, ne as Popover, se as PopoverBody, ae as PopoverClose, ie as PopoverContent, ce as PopoverFooter, oe as PopoverHeader, re as PopoverTrigger, ht as Progress, at as Radio, it as RadioGroup, tt as Select, ct as Switch, dt as Tab, ut as TabList, ft as TabPanel, lt as Tabs, e as ThemeContext, t as ThemeProvider, vt as ToastProvider, ee as Tooltip, He as useDialog, $t as useDropdown, Z as useFormContext, fe as useImperativePopover, n as useTheme, yt as useToast };
|