@viglet/viglet-design-system 2026.3.9 → 2026.3.10
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/README.md +213 -16
- package/dist/badge-locale-Bij94NwL.cjs +1 -0
- package/dist/{badge-locale-CoEEv7s5.js → badge-locale-Du41PpLA.js} +183 -231
- package/dist/bento/bento-command-palette.d.ts +47 -12
- package/dist/bento/bento-command-palette.d.ts.map +1 -1
- package/dist/bento/bento-form-section.d.ts +7 -1
- package/dist/bento/bento-form-section.d.ts.map +1 -1
- package/dist/bento/bento-inline-edit.d.ts.map +1 -1
- package/dist/bento/bento-nav-rail.d.ts.map +1 -1
- package/dist/bento/bento-nav.d.ts +10 -2
- package/dist/bento/bento-nav.d.ts.map +1 -1
- package/dist/bento/bento-section-chrome.d.ts +5 -0
- package/dist/bento/bento-section-chrome.d.ts.map +1 -1
- package/dist/bento/bento-status-marker.d.ts.map +1 -1
- package/dist/bento/bento-tile.d.ts.map +1 -1
- package/dist/bento/index.d.ts +1 -1
- package/dist/bento/index.d.ts.map +1 -1
- package/dist/bento.cjs +1 -1
- package/dist/bento.es.js +464 -404
- package/dist/{breadcrumb.context-KQut7j8U.js → breadcrumb.context-BssgEydx.js} +229 -220
- package/dist/breadcrumb.context-DLsiMS59.cjs +1 -0
- package/dist/components/app-switcher.d.ts.map +1 -1
- package/dist/components/badge-colorful.d.ts +9 -0
- package/dist/components/badge-colorful.d.ts.map +1 -1
- package/dist/components/login/login.d.ts.map +1 -1
- package/dist/components/router/index.d.ts +1 -1
- package/dist/components/router/index.d.ts.map +1 -1
- package/dist/components/router/sub.page.d.ts.map +1 -1
- package/dist/components/startup-first/startup-first.d.ts.map +1 -1
- package/dist/components/ui/floating-formulas-bg.d.ts.map +1 -1
- package/dist/components/ui/glass-card.d.ts +10 -5
- package/dist/components/ui/glass-card.d.ts.map +1 -1
- package/dist/components/ui/icon-picker-dialog.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +6 -4
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +14 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/pulse-ring.d.ts.map +1 -1
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sonner.d.ts +12 -0
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/stepper.d.ts.map +1 -1
- package/dist/components/ui/viglet-assistant.d.ts +60 -0
- package/dist/components/ui/viglet-assistant.d.ts.map +1 -0
- package/dist/components/ui/viglet-avatar.d.ts +42 -0
- package/dist/components/ui/viglet-avatar.d.ts.map +1 -0
- package/dist/exports.json +24 -5
- package/dist/floating-formulas-bg.cjs +1 -1
- package/dist/floating-formulas-bg.es.js +56 -55
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/use-assistant-notifications.d.ts +15 -0
- package/dist/hooks/use-assistant-notifications.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +74 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/locales/en/assistant.json.d.ts +22 -0
- package/dist/i18n/locales/en/bento.json.d.ts +3 -1
- package/dist/i18n/locales/en/common.json.d.ts +6 -1
- package/dist/i18n/locales/en/language.json.d.ts +8 -0
- package/dist/i18n/locales/pt/assistant.json.d.ts +22 -0
- package/dist/i18n/locales/pt/bento.json.d.ts +3 -1
- package/dist/i18n/locales/pt/common.json.d.ts +6 -1
- package/dist/i18n/locales/pt/language.json.d.ts +8 -0
- package/dist/i18n.cjs +1 -1
- package/dist/i18n.es.js +478 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +1311 -698
- package/dist/loading-provider-B6-R2ONB.cjs +1 -0
- package/dist/{loading-provider-BWWhhfEn.js → loading-provider-E3fbcekM.js} +24 -23
- package/dist/router.cjs +1 -1
- package/dist/router.es.js +4 -4
- package/dist/{user.context-D1PxP4D4.js → user.context-CPmUBBLa.js} +97 -87
- package/dist/user.context-xsJgPpcO.cjs +1 -0
- package/dist/utils-Fk5jmzzb.js +41 -0
- package/dist/utils-Oagwe_oa.cjs +1 -0
- package/dist/viglet-design-system.css +1 -1
- package/dist/vite/boot-loader.d.ts +33 -2
- package/dist/vite/boot-loader.d.ts.map +1 -1
- package/dist/vite.cjs +16 -5
- package/dist/vite.es.js +27 -14
- package/docs/BENTO-AUTHORING.md +20 -2
- package/docs/reference/grounds.dc.html +9 -9
- package/package.json +4 -3
- package/dist/badge-locale-hQyWhAKe.cjs +0 -7
- package/dist/breadcrumb.context-Vwc3lAlf.cjs +0 -1
- package/dist/i18n-DD3rQOWi.js +0 -426
- package/dist/i18n-DrBq-qJJ.cjs +0 -1
- package/dist/loading-provider-CmeMqLGk.cjs +0 -1
- package/dist/user.context-B9vIBzY5.cjs +0 -1
|
@@ -1,53 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return t(e(n));
|
|
14
|
-
}
|
|
15
|
-
function _(e) {
|
|
16
|
-
let [t = "", n] = e.trim().replaceAll("-", "_").toUpperCase().split("_");
|
|
17
|
-
return {
|
|
18
|
-
language: t,
|
|
19
|
-
region: n?.length === 2 ? n : null
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
var v = (e, t = 10) => {
|
|
23
|
-
if (!e || e.length <= t) return e ?? "";
|
|
24
|
-
if (t < 3) return "...".slice(0, Math.max(t, 0));
|
|
25
|
-
let n = t - 3, r = Math.ceil(n / 2), i = Math.floor(n / 2);
|
|
26
|
-
return e.substring(0, r) + "..." + e.substring(e.length - i);
|
|
27
|
-
}, ee = (e) => {
|
|
28
|
-
let { region: t } = _(e);
|
|
29
|
-
return t ? t.split("").map((e) => String.fromCodePoint((e.codePointAt(0) ?? 0) + 127397)).join("") : "🌐";
|
|
30
|
-
}, y = (e) => {
|
|
31
|
-
let t = 0;
|
|
32
|
-
for (let n = 0; n < e.length; n++) t = (e.codePointAt(n) ?? 0) + ((t << 5) - t);
|
|
33
|
-
let n = Math.abs(t) % 360;
|
|
34
|
-
return {
|
|
35
|
-
h: n,
|
|
36
|
-
light: {
|
|
37
|
-
bg: `hsl(${n}, 70%, 95%)`,
|
|
38
|
-
text: `hsl(${n}, 70%, 20%)`,
|
|
39
|
-
border: `hsl(${n}, 70%, 90%)`
|
|
40
|
-
},
|
|
41
|
-
dark: {
|
|
42
|
-
bg: `hsl(${n}, 50%, 15%)`,
|
|
43
|
-
text: `hsl(${n}, 80%, 80%)`,
|
|
44
|
-
border: `hsl(${n}, 50%, 25%)`
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
}, b = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), x = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), te = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), S = (e) => {
|
|
48
|
-
let t = te(e);
|
|
1
|
+
import { i as e, r as t, t as n } from "./utils-Fk5jmzzb.js";
|
|
2
|
+
import { createContext as r, createElement as i, forwardRef as a, useContext as o, useState as s } from "react";
|
|
3
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
4
|
+
import { Slot as d } from "@radix-ui/react-slot";
|
|
5
|
+
import { cva as f } from "class-variance-authority";
|
|
6
|
+
import { useTranslation as p } from "react-i18next";
|
|
7
|
+
import * as m from "@radix-ui/react-dialog";
|
|
8
|
+
import * as h from "@radix-ui/react-dropdown-menu";
|
|
9
|
+
import * as g from "@radix-ui/react-tooltip";
|
|
10
|
+
//#region node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
|
|
11
|
+
var _ = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), v = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ee = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), y = (e) => {
|
|
12
|
+
let t = ee(e);
|
|
49
13
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
50
|
-
},
|
|
14
|
+
}, b = {
|
|
51
15
|
xmlns: "http://www.w3.org/2000/svg",
|
|
52
16
|
width: 24,
|
|
53
17
|
height: 24,
|
|
@@ -57,42 +21,42 @@ var v = (e, t = 10) => {
|
|
|
57
21
|
strokeWidth: 2,
|
|
58
22
|
strokeLinecap: "round",
|
|
59
23
|
strokeLinejoin: "round"
|
|
60
|
-
},
|
|
24
|
+
}, te = (e) => {
|
|
61
25
|
for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
|
|
62
26
|
return !1;
|
|
63
|
-
},
|
|
64
|
-
let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: f = !1, color: p = "currentColor", className: m = "" } =
|
|
65
|
-
return
|
|
27
|
+
}, x = r({}), S = () => o(x), ne = a(({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: a = "", children: o, iconNode: s, ...c }, l) => {
|
|
28
|
+
let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: f = !1, color: p = "currentColor", className: m = "" } = S() ?? {}, h = r ?? f ? Number(n ?? d) * 24 / Number(t ?? u) : n ?? d;
|
|
29
|
+
return i("svg", {
|
|
66
30
|
ref: l,
|
|
67
|
-
...
|
|
68
|
-
width: t ?? u ??
|
|
69
|
-
height: t ?? u ??
|
|
31
|
+
...b,
|
|
32
|
+
width: t ?? u ?? b.width,
|
|
33
|
+
height: t ?? u ?? b.height,
|
|
70
34
|
stroke: e ?? p,
|
|
71
35
|
strokeWidth: h,
|
|
72
|
-
className:
|
|
73
|
-
...!o && !
|
|
36
|
+
className: _("lucide", m, a),
|
|
37
|
+
...!o && !te(c) && { "aria-hidden": "true" },
|
|
74
38
|
...c
|
|
75
|
-
}, [...s.map(([e, t]) =>
|
|
76
|
-
}),
|
|
77
|
-
let n =
|
|
39
|
+
}, [...s.map(([e, t]) => i(e, t)), ...Array.isArray(o) ? o : [o]]);
|
|
40
|
+
}), C = (e, t) => {
|
|
41
|
+
let n = a(({ className: n, ...r }, a) => i(ne, {
|
|
78
42
|
ref: a,
|
|
79
43
|
iconNode: t,
|
|
80
|
-
className:
|
|
81
|
-
...
|
|
44
|
+
className: _(`lucide-${v(y(e))}`, `lucide-${e}`, n),
|
|
45
|
+
...r
|
|
82
46
|
}));
|
|
83
|
-
return n.displayName =
|
|
84
|
-
},
|
|
47
|
+
return n.displayName = y(e), n;
|
|
48
|
+
}, w = C("check", [["path", {
|
|
85
49
|
d: "M20 6 9 17l-5-5",
|
|
86
50
|
key: "1gmf2c"
|
|
87
|
-
}]]),
|
|
51
|
+
}]]), T = C("chevron-right", [["path", {
|
|
88
52
|
d: "m9 18 6-6-6-6",
|
|
89
53
|
key: "mthhwq"
|
|
90
|
-
}]]),
|
|
54
|
+
}]]), re = C("circle", [["circle", {
|
|
91
55
|
cx: "12",
|
|
92
56
|
cy: "12",
|
|
93
57
|
r: "10",
|
|
94
58
|
key: "1mglay"
|
|
95
|
-
}]]),
|
|
59
|
+
}]]), ie = C("globe", [
|
|
96
60
|
["circle", {
|
|
97
61
|
cx: "12",
|
|
98
62
|
cy: "12",
|
|
@@ -107,13 +71,13 @@ var v = (e, t = 10) => {
|
|
|
107
71
|
d: "M2 12h20",
|
|
108
72
|
key: "9i4pu4"
|
|
109
73
|
}]
|
|
110
|
-
]),
|
|
74
|
+
]), E = C("x", [["path", {
|
|
111
75
|
d: "M18 6 6 18",
|
|
112
76
|
key: "1bl5f8"
|
|
113
77
|
}], ["path", {
|
|
114
78
|
d: "m6 6 12 12",
|
|
115
79
|
key: "d8bk6v"
|
|
116
|
-
}]]),
|
|
80
|
+
}]]), D = f("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
|
|
117
81
|
variants: { variant: {
|
|
118
82
|
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
119
83
|
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
@@ -122,212 +86,212 @@ var v = (e, t = 10) => {
|
|
|
122
86
|
} },
|
|
123
87
|
defaultVariants: { variant: "default" }
|
|
124
88
|
});
|
|
125
|
-
function
|
|
126
|
-
return /* @__PURE__ */
|
|
89
|
+
function O({ className: e, variant: t, asChild: r = !1, ...i }) {
|
|
90
|
+
return /* @__PURE__ */ l(r ? d : "span", {
|
|
127
91
|
"data-slot": "badge",
|
|
128
|
-
className:
|
|
129
|
-
...
|
|
92
|
+
className: n(D({ variant: t }), e),
|
|
93
|
+
...i
|
|
130
94
|
});
|
|
131
95
|
}
|
|
132
96
|
//#endregion
|
|
133
97
|
//#region src/components/ui/dialog.tsx
|
|
134
|
-
function
|
|
135
|
-
return /* @__PURE__ */
|
|
98
|
+
function k({ ...e }) {
|
|
99
|
+
return /* @__PURE__ */ l(m.Root, {
|
|
136
100
|
"data-slot": "dialog",
|
|
137
101
|
...e
|
|
138
102
|
});
|
|
139
103
|
}
|
|
140
|
-
function
|
|
141
|
-
return /* @__PURE__ */
|
|
104
|
+
function A({ ...e }) {
|
|
105
|
+
return /* @__PURE__ */ l(m.Trigger, {
|
|
142
106
|
"data-slot": "dialog-trigger",
|
|
143
107
|
...e
|
|
144
108
|
});
|
|
145
109
|
}
|
|
146
|
-
function
|
|
147
|
-
return /* @__PURE__ */
|
|
110
|
+
function j({ ...e }) {
|
|
111
|
+
return /* @__PURE__ */ l(m.Portal, {
|
|
148
112
|
"data-slot": "dialog-portal",
|
|
149
113
|
...e
|
|
150
114
|
});
|
|
151
115
|
}
|
|
152
|
-
function
|
|
153
|
-
return /* @__PURE__ */
|
|
116
|
+
function M({ ...e }) {
|
|
117
|
+
return /* @__PURE__ */ l(m.Close, {
|
|
154
118
|
"data-slot": "dialog-close",
|
|
155
119
|
...e
|
|
156
120
|
});
|
|
157
121
|
}
|
|
158
|
-
function
|
|
159
|
-
return /* @__PURE__ */
|
|
122
|
+
function N({ className: e, ...t }) {
|
|
123
|
+
return /* @__PURE__ */ l(m.Overlay, {
|
|
160
124
|
"data-slot": "dialog-overlay",
|
|
161
|
-
className:
|
|
125
|
+
className: n("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", e),
|
|
162
126
|
...t
|
|
163
127
|
});
|
|
164
128
|
}
|
|
165
|
-
function
|
|
166
|
-
let { t:
|
|
167
|
-
return /* @__PURE__ */
|
|
129
|
+
function P({ className: e, children: t, showCloseButton: r = !0, ...i }) {
|
|
130
|
+
let { t: a } = p();
|
|
131
|
+
return /* @__PURE__ */ u(j, {
|
|
168
132
|
"data-slot": "dialog-portal",
|
|
169
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ l(N, {}), /* @__PURE__ */ u(m.Content, {
|
|
170
134
|
"data-slot": "dialog-content",
|
|
171
|
-
className:
|
|
172
|
-
...
|
|
173
|
-
children: [t,
|
|
135
|
+
className: n("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", e),
|
|
136
|
+
...i,
|
|
137
|
+
children: [t, r && /* @__PURE__ */ u(m.Close, {
|
|
174
138
|
"data-slot": "dialog-close",
|
|
175
139
|
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
140
|
+
children: [/* @__PURE__ */ l(E, {}), /* @__PURE__ */ l("span", {
|
|
177
141
|
className: "sr-only",
|
|
178
|
-
children:
|
|
142
|
+
children: a("dialog.close", { defaultValue: "Close" })
|
|
179
143
|
})]
|
|
180
144
|
})]
|
|
181
145
|
})]
|
|
182
146
|
});
|
|
183
147
|
}
|
|
184
|
-
function
|
|
185
|
-
return /* @__PURE__ */
|
|
148
|
+
function F({ className: e, ...t }) {
|
|
149
|
+
return /* @__PURE__ */ l("div", {
|
|
186
150
|
"data-slot": "dialog-header",
|
|
187
|
-
className:
|
|
151
|
+
className: n("flex flex-col gap-2 text-center sm:text-left", e),
|
|
188
152
|
...t
|
|
189
153
|
});
|
|
190
154
|
}
|
|
191
|
-
function
|
|
192
|
-
return /* @__PURE__ */
|
|
155
|
+
function I({ className: e, ...t }) {
|
|
156
|
+
return /* @__PURE__ */ l("div", {
|
|
193
157
|
"data-slot": "dialog-footer",
|
|
194
|
-
className:
|
|
158
|
+
className: n("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
|
|
195
159
|
...t
|
|
196
160
|
});
|
|
197
161
|
}
|
|
198
|
-
function
|
|
199
|
-
return /* @__PURE__ */
|
|
162
|
+
function L({ className: e, ...t }) {
|
|
163
|
+
return /* @__PURE__ */ l(m.Title, {
|
|
200
164
|
"data-slot": "dialog-title",
|
|
201
|
-
className:
|
|
165
|
+
className: n("text-lg leading-none font-semibold", e),
|
|
202
166
|
...t
|
|
203
167
|
});
|
|
204
168
|
}
|
|
205
|
-
function
|
|
206
|
-
return /* @__PURE__ */
|
|
169
|
+
function R({ className: e, ...t }) {
|
|
170
|
+
return /* @__PURE__ */ l(m.Description, {
|
|
207
171
|
"data-slot": "dialog-description",
|
|
208
|
-
className:
|
|
172
|
+
className: n("text-muted-foreground text-sm", e),
|
|
209
173
|
...t
|
|
210
174
|
});
|
|
211
175
|
}
|
|
212
176
|
//#endregion
|
|
213
177
|
//#region src/components/ui/dropdown-menu.tsx
|
|
214
|
-
function
|
|
215
|
-
return /* @__PURE__ */
|
|
178
|
+
function z({ ...e }) {
|
|
179
|
+
return /* @__PURE__ */ l(h.Root, {
|
|
216
180
|
"data-slot": "dropdown-menu",
|
|
217
181
|
...e
|
|
218
182
|
});
|
|
219
183
|
}
|
|
220
|
-
function
|
|
221
|
-
return /* @__PURE__ */
|
|
184
|
+
function B({ ...e }) {
|
|
185
|
+
return /* @__PURE__ */ l(h.Portal, {
|
|
222
186
|
"data-slot": "dropdown-menu-portal",
|
|
223
187
|
...e
|
|
224
188
|
});
|
|
225
189
|
}
|
|
226
|
-
function
|
|
227
|
-
return /* @__PURE__ */
|
|
190
|
+
function V({ ...e }) {
|
|
191
|
+
return /* @__PURE__ */ l(h.Trigger, {
|
|
228
192
|
"data-slot": "dropdown-menu-trigger",
|
|
229
193
|
...e
|
|
230
194
|
});
|
|
231
195
|
}
|
|
232
|
-
function
|
|
233
|
-
return /* @__PURE__ */
|
|
196
|
+
function H({ className: e, sideOffset: t = 4, ...r }) {
|
|
197
|
+
return /* @__PURE__ */ l(h.Portal, { children: /* @__PURE__ */ l(h.Content, {
|
|
234
198
|
"data-slot": "dropdown-menu-content",
|
|
235
199
|
sideOffset: t,
|
|
236
|
-
className:
|
|
237
|
-
...
|
|
200
|
+
className: n("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", e),
|
|
201
|
+
...r
|
|
238
202
|
}) });
|
|
239
203
|
}
|
|
240
|
-
function
|
|
241
|
-
return /* @__PURE__ */
|
|
204
|
+
function U({ ...e }) {
|
|
205
|
+
return /* @__PURE__ */ l(h.Group, {
|
|
242
206
|
"data-slot": "dropdown-menu-group",
|
|
243
207
|
...e
|
|
244
208
|
});
|
|
245
209
|
}
|
|
246
|
-
function
|
|
247
|
-
return /* @__PURE__ */
|
|
210
|
+
function ae({ className: e, inset: t, variant: r = "default", ...i }) {
|
|
211
|
+
return /* @__PURE__ */ l(h.Item, {
|
|
248
212
|
"data-slot": "dropdown-menu-item",
|
|
249
213
|
"data-inset": t,
|
|
250
|
-
"data-variant":
|
|
251
|
-
className:
|
|
252
|
-
...
|
|
214
|
+
"data-variant": r,
|
|
215
|
+
className: n("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
|
|
216
|
+
...i
|
|
253
217
|
});
|
|
254
218
|
}
|
|
255
|
-
function
|
|
256
|
-
return /* @__PURE__ */
|
|
219
|
+
function W({ className: e, children: t, checked: r, ...i }) {
|
|
220
|
+
return /* @__PURE__ */ u(h.CheckboxItem, {
|
|
257
221
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
258
|
-
className:
|
|
259
|
-
checked:
|
|
260
|
-
...
|
|
261
|
-
children: [/* @__PURE__ */
|
|
222
|
+
className: n("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
|
|
223
|
+
checked: r,
|
|
224
|
+
...i,
|
|
225
|
+
children: [/* @__PURE__ */ l("span", {
|
|
262
226
|
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
263
|
-
children: /* @__PURE__ */
|
|
227
|
+
children: /* @__PURE__ */ l(h.ItemIndicator, { children: /* @__PURE__ */ l(w, { className: "size-4" }) })
|
|
264
228
|
}), t]
|
|
265
229
|
});
|
|
266
230
|
}
|
|
267
|
-
function
|
|
268
|
-
return /* @__PURE__ */
|
|
231
|
+
function G({ ...e }) {
|
|
232
|
+
return /* @__PURE__ */ l(h.RadioGroup, {
|
|
269
233
|
"data-slot": "dropdown-menu-radio-group",
|
|
270
234
|
...e
|
|
271
235
|
});
|
|
272
236
|
}
|
|
273
|
-
function
|
|
274
|
-
return /* @__PURE__ */
|
|
237
|
+
function K({ className: e, children: t, ...r }) {
|
|
238
|
+
return /* @__PURE__ */ u(h.RadioItem, {
|
|
275
239
|
"data-slot": "dropdown-menu-radio-item",
|
|
276
|
-
className:
|
|
277
|
-
...
|
|
278
|
-
children: [/* @__PURE__ */
|
|
240
|
+
className: n("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
|
|
241
|
+
...r,
|
|
242
|
+
children: [/* @__PURE__ */ l("span", {
|
|
279
243
|
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
280
|
-
children: /* @__PURE__ */
|
|
244
|
+
children: /* @__PURE__ */ l(h.ItemIndicator, { children: /* @__PURE__ */ l(re, { className: "size-2 fill-current" }) })
|
|
281
245
|
}), t]
|
|
282
246
|
});
|
|
283
247
|
}
|
|
284
|
-
function
|
|
285
|
-
return /* @__PURE__ */
|
|
248
|
+
function q({ className: e, inset: t, ...r }) {
|
|
249
|
+
return /* @__PURE__ */ l(h.Label, {
|
|
286
250
|
"data-slot": "dropdown-menu-label",
|
|
287
251
|
"data-inset": t,
|
|
288
|
-
className:
|
|
289
|
-
...
|
|
252
|
+
className: n("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", e),
|
|
253
|
+
...r
|
|
290
254
|
});
|
|
291
255
|
}
|
|
292
|
-
function
|
|
293
|
-
return /* @__PURE__ */
|
|
256
|
+
function J({ className: e, ...t }) {
|
|
257
|
+
return /* @__PURE__ */ l(h.Separator, {
|
|
294
258
|
"data-slot": "dropdown-menu-separator",
|
|
295
|
-
className:
|
|
259
|
+
className: n("bg-border -mx-1 my-1 h-px", e),
|
|
296
260
|
...t
|
|
297
261
|
});
|
|
298
262
|
}
|
|
299
|
-
function
|
|
300
|
-
return /* @__PURE__ */
|
|
263
|
+
function oe({ className: e, ...t }) {
|
|
264
|
+
return /* @__PURE__ */ l("span", {
|
|
301
265
|
"data-slot": "dropdown-menu-shortcut",
|
|
302
|
-
className:
|
|
266
|
+
className: n("text-muted-foreground ml-auto text-xs tracking-widest", e),
|
|
303
267
|
...t
|
|
304
268
|
});
|
|
305
269
|
}
|
|
306
|
-
function
|
|
307
|
-
return /* @__PURE__ */
|
|
270
|
+
function se({ ...e }) {
|
|
271
|
+
return /* @__PURE__ */ l(h.Sub, {
|
|
308
272
|
"data-slot": "dropdown-menu-sub",
|
|
309
273
|
...e
|
|
310
274
|
});
|
|
311
275
|
}
|
|
312
|
-
function
|
|
313
|
-
return /* @__PURE__ */
|
|
276
|
+
function ce({ className: e, inset: t, children: r, ...i }) {
|
|
277
|
+
return /* @__PURE__ */ u(h.SubTrigger, {
|
|
314
278
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
315
279
|
"data-inset": t,
|
|
316
|
-
className:
|
|
317
|
-
...
|
|
318
|
-
children: [
|
|
280
|
+
className: n("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
|
|
281
|
+
...i,
|
|
282
|
+
children: [r, /* @__PURE__ */ l(T, { className: "ml-auto size-4" })]
|
|
319
283
|
});
|
|
320
284
|
}
|
|
321
|
-
function
|
|
322
|
-
return /* @__PURE__ */
|
|
285
|
+
function le({ className: e, ...t }) {
|
|
286
|
+
return /* @__PURE__ */ l(h.SubContent, {
|
|
323
287
|
"data-slot": "dropdown-menu-sub-content",
|
|
324
|
-
className:
|
|
288
|
+
className: n("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", e),
|
|
325
289
|
...t
|
|
326
290
|
});
|
|
327
291
|
}
|
|
328
292
|
//#endregion
|
|
329
293
|
//#region src/components/ui/gradient-button.tsx
|
|
330
|
-
var Y =
|
|
294
|
+
var Y = f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all duration-200 cursor-pointer disabled:cursor-not-allowed disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-[3px]", {
|
|
331
295
|
variants: {
|
|
332
296
|
variant: {
|
|
333
297
|
default: [
|
|
@@ -399,119 +363,107 @@ var Y = d("inline-flex items-center justify-center gap-2 whitespace-nowrap round
|
|
|
399
363
|
size: "default"
|
|
400
364
|
}
|
|
401
365
|
});
|
|
402
|
-
function
|
|
403
|
-
let
|
|
366
|
+
function ue({ className: e, variant: t, size: r, asChild: i = !1, loading: a = !1, ...o }) {
|
|
367
|
+
let s = n(Y({
|
|
404
368
|
variant: t,
|
|
405
|
-
size:
|
|
369
|
+
size: r,
|
|
406
370
|
className: e
|
|
407
371
|
}));
|
|
408
|
-
return /* @__PURE__ */
|
|
372
|
+
return /* @__PURE__ */ l(i ? d : "button", {
|
|
409
373
|
"data-slot": "gradient-button",
|
|
410
|
-
className:
|
|
411
|
-
disabled:
|
|
412
|
-
...
|
|
413
|
-
children:
|
|
374
|
+
className: s,
|
|
375
|
+
disabled: a || o.disabled,
|
|
376
|
+
...o,
|
|
377
|
+
children: a ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ u("svg", {
|
|
414
378
|
className: "size-4 animate-spin",
|
|
415
379
|
xmlns: "http://www.w3.org/2000/svg",
|
|
416
380
|
fill: "none",
|
|
417
381
|
viewBox: "0 0 24 24",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
382
|
+
children: [/* @__PURE__ */ l("circle", {
|
|
419
383
|
className: "opacity-25",
|
|
420
384
|
cx: "12",
|
|
421
385
|
cy: "12",
|
|
422
386
|
r: "10",
|
|
423
387
|
stroke: "currentColor",
|
|
424
388
|
strokeWidth: "4"
|
|
425
|
-
}), /* @__PURE__ */
|
|
389
|
+
}), /* @__PURE__ */ l("path", {
|
|
426
390
|
className: "opacity-75",
|
|
427
391
|
fill: "currentColor",
|
|
428
392
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
429
393
|
})]
|
|
430
|
-
}),
|
|
394
|
+
}), o.children] }) : o.children
|
|
431
395
|
});
|
|
432
396
|
}
|
|
433
397
|
//#endregion
|
|
434
398
|
//#region src/components/ui/input.tsx
|
|
435
|
-
function
|
|
436
|
-
return /* @__PURE__ */
|
|
399
|
+
function de({ className: e, type: t, ...r }) {
|
|
400
|
+
return /* @__PURE__ */ l("input", {
|
|
437
401
|
type: t,
|
|
438
402
|
"data-slot": "input",
|
|
439
|
-
className:
|
|
440
|
-
...
|
|
403
|
+
className: n("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent pl-3 pr-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", e),
|
|
404
|
+
...r
|
|
441
405
|
});
|
|
442
406
|
}
|
|
443
407
|
//#endregion
|
|
444
408
|
//#region src/components/ui/skeleton.tsx
|
|
445
|
-
function
|
|
446
|
-
return /* @__PURE__ */
|
|
409
|
+
function X({ className: e, ...t }) {
|
|
410
|
+
return /* @__PURE__ */ l("div", {
|
|
447
411
|
"data-slot": "skeleton",
|
|
448
|
-
className:
|
|
412
|
+
className: n("bg-accent animate-pulse rounded-md", e),
|
|
449
413
|
...t
|
|
450
414
|
});
|
|
451
415
|
}
|
|
452
416
|
//#endregion
|
|
453
417
|
//#region src/components/ui/tooltip.tsx
|
|
454
|
-
function
|
|
455
|
-
return /* @__PURE__ */
|
|
418
|
+
function Z({ delayDuration: e = 0, ...t }) {
|
|
419
|
+
return /* @__PURE__ */ l(g.Provider, {
|
|
456
420
|
"data-slot": "tooltip-provider",
|
|
457
421
|
delayDuration: e,
|
|
458
422
|
...t
|
|
459
423
|
});
|
|
460
424
|
}
|
|
461
|
-
function
|
|
462
|
-
return /* @__PURE__ */
|
|
425
|
+
function fe({ ...e }) {
|
|
426
|
+
return /* @__PURE__ */ l(Z, { children: /* @__PURE__ */ l(g.Root, {
|
|
463
427
|
"data-slot": "tooltip",
|
|
464
428
|
...e
|
|
465
429
|
}) });
|
|
466
430
|
}
|
|
467
|
-
function
|
|
468
|
-
return /* @__PURE__ */
|
|
431
|
+
function pe({ ...e }) {
|
|
432
|
+
return /* @__PURE__ */ l(g.Trigger, {
|
|
469
433
|
"data-slot": "tooltip-trigger",
|
|
470
434
|
...e
|
|
471
435
|
});
|
|
472
436
|
}
|
|
473
|
-
function
|
|
474
|
-
return /* @__PURE__ */
|
|
437
|
+
function me({ className: e, sideOffset: t = 0, children: r, ...i }) {
|
|
438
|
+
return /* @__PURE__ */ l(g.Portal, { children: /* @__PURE__ */ u(g.Content, {
|
|
475
439
|
"data-slot": "tooltip-content",
|
|
476
440
|
sideOffset: t,
|
|
477
|
-
className:
|
|
478
|
-
...
|
|
479
|
-
children: [
|
|
441
|
+
className: n("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", e),
|
|
442
|
+
...i,
|
|
443
|
+
children: [r, /* @__PURE__ */ l(g.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })]
|
|
480
444
|
}) });
|
|
481
445
|
}
|
|
482
446
|
//#endregion
|
|
483
447
|
//#region src/components/badge-colorful.tsx
|
|
484
|
-
var
|
|
448
|
+
var he = ({ text: e, href: r, onClick: i, className: a, prefix: o }) => {
|
|
485
449
|
if (!e) return null;
|
|
486
|
-
let
|
|
487
|
-
return /* @__PURE__ */
|
|
450
|
+
let s = t(e);
|
|
451
|
+
return /* @__PURE__ */ u(O, {
|
|
488
452
|
variant: "outline",
|
|
489
453
|
title: e,
|
|
490
|
-
onClick: () =>
|
|
491
|
-
className:
|
|
454
|
+
onClick: () => r && i?.(r),
|
|
455
|
+
className: n("vg-badge-colorful text-xs font-medium px-2 py-0.5 gap-1.5 cursor-pointer transition-all hover:opacity-80", `dynamic-badge-${e.length}`, a),
|
|
492
456
|
style: {
|
|
493
|
-
"--badge-bg":
|
|
494
|
-
"--badge-text":
|
|
495
|
-
"--badge-border":
|
|
496
|
-
"--badge-dark-bg":
|
|
497
|
-
"--badge-dark-text":
|
|
498
|
-
"--badge-dark-border":
|
|
499
|
-
backgroundColor: "var(--badge-bg)",
|
|
500
|
-
color: "var(--badge-text)",
|
|
501
|
-
borderColor: "var(--badge-border)"
|
|
457
|
+
"--badge-bg": s.light.bg,
|
|
458
|
+
"--badge-text": s.light.text,
|
|
459
|
+
"--badge-border": s.light.border,
|
|
460
|
+
"--badge-dark-bg": s.dark.bg,
|
|
461
|
+
"--badge-dark-text": s.dark.text,
|
|
462
|
+
"--badge-dark-border": s.dark.border
|
|
502
463
|
},
|
|
503
|
-
children: [
|
|
504
|
-
})
|
|
505
|
-
|
|
506
|
-
children: `
|
|
507
|
-
.dark [title="${e}"] {
|
|
508
|
-
background-color: var(--badge-dark-bg) !important;
|
|
509
|
-
color: var(--badge-dark-text) !important;
|
|
510
|
-
border-color: var(--badge-dark-border) !important;
|
|
511
|
-
}
|
|
512
|
-
`
|
|
513
|
-
})] });
|
|
514
|
-
}, be = {
|
|
464
|
+
children: [o, /* @__PURE__ */ l("span", { children: e })]
|
|
465
|
+
});
|
|
466
|
+
}, ge = {
|
|
515
467
|
AR: "SA",
|
|
516
468
|
BN: "BD",
|
|
517
469
|
CA: "ES",
|
|
@@ -554,28 +506,28 @@ var ye = ({ text: e, href: t, onClick: n, className: r, prefix: i }) => {
|
|
|
554
506
|
VI: "VN",
|
|
555
507
|
ZH: "CN"
|
|
556
508
|
}, Q = { UK: "GB" };
|
|
557
|
-
function $(
|
|
558
|
-
if (!
|
|
559
|
-
let { language:
|
|
560
|
-
if (
|
|
561
|
-
let
|
|
562
|
-
return
|
|
563
|
-
}
|
|
564
|
-
var
|
|
565
|
-
let
|
|
566
|
-
return /* @__PURE__ */
|
|
509
|
+
function $(t) {
|
|
510
|
+
if (!t) return "";
|
|
511
|
+
let { language: n, region: r } = e(t);
|
|
512
|
+
if (r) return (Q[r] || r).toLowerCase();
|
|
513
|
+
let i = ge[n];
|
|
514
|
+
return i ? i.toLowerCase() : (Q[n] || n).toLowerCase();
|
|
515
|
+
}
|
|
516
|
+
var _e = ({ locale: e, className: t }) => {
|
|
517
|
+
let r = $(e), [i, a] = s(null), o = i === r;
|
|
518
|
+
return /* @__PURE__ */ u(O, {
|
|
567
519
|
variant: "secondary",
|
|
568
|
-
className:
|
|
569
|
-
children: [!
|
|
570
|
-
src: `https://flagcdn.com/w40/${
|
|
571
|
-
alt:
|
|
572
|
-
onError: () =>
|
|
520
|
+
className: n("font-mono gap-2 py-1 pl-1 pr-2 w-fit", t),
|
|
521
|
+
children: [!o && r ? /* @__PURE__ */ l("img", {
|
|
522
|
+
src: `https://flagcdn.com/w40/${r}.png`,
|
|
523
|
+
alt: r,
|
|
524
|
+
onError: () => a(r),
|
|
573
525
|
className: "w-5 h-3.5 object-cover rounded-sm shadow-sm"
|
|
574
|
-
}) : /* @__PURE__ */
|
|
526
|
+
}) : /* @__PURE__ */ l(ie, { className: "w-3.5 h-3.5 text-muted-foreground" }), /* @__PURE__ */ l("span", {
|
|
575
527
|
className: "text-xs font-bold uppercase tracking-tight leading-none",
|
|
576
528
|
children: e
|
|
577
529
|
})]
|
|
578
530
|
});
|
|
579
531
|
};
|
|
580
532
|
//#endregion
|
|
581
|
-
export {
|
|
533
|
+
export { R as A, T as B, se as C, k as D, V as E, L as F, C as H, A as I, O as L, F as M, N, M as O, j as P, D as R, oe as S, ce as T, w as V, q as _, me as a, K as b, X as c, Y as d, z as f, ae as g, U as h, fe as i, I as j, P as k, de as l, H as m, $ as n, Z as o, W as p, he as r, pe as s, _e as t, ue as u, B as v, le as w, J as x, G as y, E as z };
|