@aggc/ui 0.5.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{UiSkeleton.vue_vue_type_script_setup_true_lang-Lghyrtms.js → UiSkeleton.vue_vue_type_script_setup_true_lang-Dg-HzSqj.js} +286 -286
- package/dist/chunks/{pageHeader-CcJrPX_8.js → pageHeader-DhPY_hNA.js} +204 -146
- package/dist/components/StatusBadge.styles.d.ts +5 -0
- package/dist/components/StatusBadge.vue.d.ts +2 -2
- package/dist/components/UiButton.styles.d.ts +31 -12
- package/dist/components/UiButton.vue.d.ts +4 -0
- package/dist/components/UiCheckbox.styles.d.ts +2 -4
- package/dist/components/UiSegmentedControl.styles.d.ts +5 -1
- package/dist/components/UiSelect.styles.d.ts +10 -3
- package/dist/components/UiSkeleton.styles.d.ts +1 -33
- package/dist/components.js +1 -1
- package/dist/index.js +2 -2
- package/dist/styles/recipes/badge.recipe.d.ts +5 -0
- package/dist/styles/recipes/button.recipe.d.ts +31 -12
- package/dist/styles/recipes/card.recipe.d.ts +23 -12
- package/dist/styles/recipes/dropdown.recipe.d.ts +6 -6
- package/dist/styles/recipes/input.recipe.d.ts +0 -3
- package/dist/styles.js +118 -92
- package/dist/tokens/colors.d.ts +30 -0
- package/dist/tokens/core-colors.d.ts +30 -0
- package/dist/tokens/motion.d.ts +20 -0
- package/dist/tokens/radius.d.ts +9 -0
- package/dist/tokens-core.js +21 -5
- package/dist/ui.css +306 -228
- package/package.json +1 -1
- package/src/components/ResultPanel.styles.ts +7 -2
- package/src/components/SectionCard.styles.ts +1 -1
- package/src/components/SectionCard.vue +1 -1
- package/src/components/StatusBadge.styles.ts +10 -8
- package/src/components/StatusBadge.vue +1 -1
- package/src/components/UiButton.vue +5 -1
- package/src/components/UiCheckbox.styles.ts +7 -11
- package/src/components/UiField.styles.ts +2 -2
- package/src/components/UiLoadingState.styles.ts +2 -2
- package/src/components/UiSegmentedControl.styles.ts +14 -4
- package/src/components/UiSelect.styles.ts +24 -10
- package/src/components/UiSkeleton.styles.ts +7 -36
- package/src/css/base.css +44 -9
- package/src/styles/layouts/page.ts +5 -0
- package/src/styles/primitives/feedback.ts +1 -0
- package/src/styles/primitives/fields.ts +21 -11
- package/src/styles/primitives/surfaces.ts +13 -26
- package/src/styles/primitives/typography.ts +5 -4
- package/src/styles/recipes/badge.recipe.ts +5 -5
- package/src/styles/recipes/button.recipe.ts +86 -25
- package/src/styles/recipes/card.recipe.ts +24 -13
- package/src/styles/recipes/dropdown.recipe.ts +11 -8
- package/src/styles/recipes/input.recipe.ts +10 -6
- package/src/tokens/core-colors.ts +5 -0
- package/src/tokens/motion.ts +8 -0
- package/src/tokens/radius.ts +3 -0
|
@@ -1,33 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { j as
|
|
3
|
-
import { CheckCircle2 as
|
|
4
|
-
const Ce =
|
|
1
|
+
import { defineComponent as m, openBlock as l, createElementBlock as o, normalizeClass as t, unref as a, renderSlot as y, createElementVNode as d, createBlock as ee, resolveDynamicComponent as ae, toDisplayString as c, createVNode as R, withCtx as te, createTextVNode as O, Fragment as $, renderList as V, createCommentVNode as b, withKeys as U, withModifiers as K, ref as B, useId as se, computed as L, watch as N, onMounted as le, onBeforeUnmount as oe, nextTick as T, normalizeStyle as ie } from "vue";
|
|
2
|
+
import { j as re, o as f, q as H, n as Y, r, g as ne, f as de, a as X, l as ce, p as ue, b as be, h as fe, i as ge, d as me } from "./pageHeader-DhPY_hNA.js";
|
|
3
|
+
import { CheckCircle2 as pe, TriangleAlert as ve, LoaderCircle as he, Check as q, ChevronDown as ye } from "lucide-vue-next";
|
|
4
|
+
const Ce = re, Oa = /* @__PURE__ */ m({
|
|
5
5
|
__name: "PageSurface",
|
|
6
6
|
setup(e) {
|
|
7
|
-
return (s,
|
|
7
|
+
return (s, i) => (l(), o("div", {
|
|
8
8
|
class: t(a(Ce))
|
|
9
9
|
}, [
|
|
10
10
|
y(s.$slots, "default")
|
|
11
11
|
], 2));
|
|
12
12
|
}
|
|
13
|
-
}), xe =
|
|
13
|
+
}), xe = f({
|
|
14
14
|
base: {
|
|
15
15
|
display: "inline-flex",
|
|
16
16
|
alignItems: "center",
|
|
17
17
|
justifyContent: "center",
|
|
18
18
|
borderRadius: "full",
|
|
19
19
|
borderWidth: "1px",
|
|
20
|
-
px: "
|
|
21
|
-
py: "1
|
|
20
|
+
px: "2.5",
|
|
21
|
+
py: "1",
|
|
22
22
|
fontSize: "xs",
|
|
23
23
|
fontWeight: "700",
|
|
24
24
|
textTransform: "uppercase",
|
|
25
|
-
letterSpacing: "0.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
_dark: {
|
|
29
|
-
boxShadow: "inset 0 1px 0 rgba(255,255,255,0.04)"
|
|
30
|
-
}
|
|
25
|
+
letterSpacing: "0.06em",
|
|
26
|
+
lineHeight: "1",
|
|
27
|
+
whiteSpace: "nowrap"
|
|
31
28
|
},
|
|
32
29
|
variants: {
|
|
33
30
|
tone: {
|
|
@@ -50,29 +47,37 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
50
47
|
bg: "badge.neutralBg",
|
|
51
48
|
color: "badge.neutralText",
|
|
52
49
|
borderColor: "badge.neutralBorder"
|
|
50
|
+
},
|
|
51
|
+
danger: {
|
|
52
|
+
bg: "badge.dangerBg",
|
|
53
|
+
color: "badge.dangerText",
|
|
54
|
+
borderColor: "badge.dangerBorder"
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
},
|
|
56
58
|
defaultVariants: {
|
|
57
59
|
tone: "neutral"
|
|
58
60
|
}
|
|
59
|
-
}),
|
|
61
|
+
}), ke = /* @__PURE__ */ m({
|
|
60
62
|
__name: "StatusBadge",
|
|
61
63
|
props: {
|
|
62
64
|
tone: { default: "neutral" }
|
|
63
65
|
},
|
|
64
66
|
setup(e) {
|
|
65
67
|
const s = e;
|
|
66
|
-
return (
|
|
68
|
+
return (i, g) => (l(), o("span", {
|
|
67
69
|
class: t(a(xe)({ tone: s.tone }))
|
|
68
70
|
}, [
|
|
69
|
-
y(
|
|
71
|
+
y(i.$slots, "default")
|
|
70
72
|
], 2));
|
|
71
73
|
}
|
|
72
|
-
}),
|
|
74
|
+
}), we = f({
|
|
73
75
|
base: {
|
|
74
76
|
borderWidth: "1px",
|
|
75
|
-
padding: "5"
|
|
77
|
+
padding: "5",
|
|
78
|
+
_dark: {
|
|
79
|
+
borderColor: "border.default"
|
|
80
|
+
}
|
|
76
81
|
},
|
|
77
82
|
variants: {
|
|
78
83
|
ok: {
|
|
@@ -86,25 +91,26 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
86
91
|
}
|
|
87
92
|
}
|
|
88
93
|
}
|
|
89
|
-
}), Se = (e) =>
|
|
94
|
+
}), Se = (e) => H(Y, we({ ok: e })), ze = r({
|
|
90
95
|
display: "flex",
|
|
91
96
|
justifyContent: "space-between",
|
|
92
97
|
gap: "4",
|
|
93
98
|
alignItems: { base: "flex-start", md: "center" },
|
|
94
99
|
flexDirection: { base: "column", md: "row" },
|
|
95
100
|
mb: "3"
|
|
96
|
-
}),
|
|
101
|
+
}), Be = r({
|
|
97
102
|
display: "flex",
|
|
98
103
|
alignItems: "center",
|
|
99
104
|
gap: "3"
|
|
100
|
-
}),
|
|
105
|
+
}), $e = f({
|
|
101
106
|
base: {
|
|
102
|
-
width: "
|
|
103
|
-
height: "
|
|
107
|
+
width: "9",
|
|
108
|
+
height: "9",
|
|
104
109
|
borderRadius: "full",
|
|
105
110
|
display: "flex",
|
|
106
111
|
alignItems: "center",
|
|
107
|
-
justifyContent: "center"
|
|
112
|
+
justifyContent: "center",
|
|
113
|
+
flexShrink: "0"
|
|
108
114
|
},
|
|
109
115
|
variants: {
|
|
110
116
|
ok: {
|
|
@@ -118,11 +124,12 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
118
124
|
}
|
|
119
125
|
}
|
|
120
126
|
}
|
|
121
|
-
}), Ve =
|
|
127
|
+
}), Ve = r({
|
|
122
128
|
fontSize: "lg",
|
|
123
129
|
fontWeight: "700",
|
|
124
|
-
color: "text.primary"
|
|
125
|
-
|
|
130
|
+
color: "text.primary",
|
|
131
|
+
lineHeight: "1.3"
|
|
132
|
+
}), G = f({
|
|
126
133
|
base: {},
|
|
127
134
|
variants: {
|
|
128
135
|
spaced: {
|
|
@@ -130,7 +137,7 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
130
137
|
false: { mb: "0" }
|
|
131
138
|
}
|
|
132
139
|
}
|
|
133
|
-
}),
|
|
140
|
+
}), D = f({
|
|
134
141
|
base: {
|
|
135
142
|
fontSize: "sm",
|
|
136
143
|
fontWeight: "700",
|
|
@@ -143,7 +150,7 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
143
150
|
error: { color: "result.errorLabel" }
|
|
144
151
|
}
|
|
145
152
|
}
|
|
146
|
-
}), P =
|
|
153
|
+
}), P = f({
|
|
147
154
|
base: {
|
|
148
155
|
display: "grid",
|
|
149
156
|
gap: "1.5",
|
|
@@ -156,7 +163,7 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
156
163
|
error: { color: "result.errorBody" }
|
|
157
164
|
}
|
|
158
165
|
}
|
|
159
|
-
}),
|
|
166
|
+
}), Le = ["aria-live", "role"], Re = { key: 2 }, Ea = /* @__PURE__ */ m({
|
|
160
167
|
__name: "ResultPanel",
|
|
161
168
|
props: {
|
|
162
169
|
ok: { type: Boolean },
|
|
@@ -173,158 +180,158 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
173
180
|
},
|
|
174
181
|
setup(e) {
|
|
175
182
|
const s = e;
|
|
176
|
-
return (
|
|
183
|
+
return (i, g) => (l(), o("div", {
|
|
177
184
|
class: t(a(Se)(e.ok)),
|
|
178
185
|
"aria-live": s.live ?? "polite",
|
|
179
186
|
role: (s.live ?? "polite") === "off" ? void 0 : "status"
|
|
180
187
|
}, [
|
|
181
188
|
d("div", {
|
|
182
|
-
class: t(a(
|
|
189
|
+
class: t(a(ze))
|
|
183
190
|
}, [
|
|
184
191
|
d("div", {
|
|
185
|
-
class: t(a(
|
|
192
|
+
class: t(a(Be))
|
|
186
193
|
}, [
|
|
187
194
|
d("div", {
|
|
188
|
-
class: t(a(
|
|
195
|
+
class: t(a($e)({ ok: e.ok }))
|
|
189
196
|
}, [
|
|
190
|
-
(l(), ee(ae(e.ok ? a(
|
|
197
|
+
(l(), ee(ae(e.ok ? a(pe) : a(ve)), { size: 18 }))
|
|
191
198
|
], 2),
|
|
192
199
|
d("h3", {
|
|
193
200
|
class: t(a(Ve))
|
|
194
201
|
}, c(s.summary), 3)
|
|
195
202
|
], 2),
|
|
196
|
-
|
|
203
|
+
R(ke, {
|
|
197
204
|
tone: e.ok ? "success" : "warning"
|
|
198
205
|
}, {
|
|
199
206
|
default: te(() => [
|
|
200
|
-
|
|
207
|
+
O(c(e.ok ? s.passLabel ?? "Pass" : s.failLabel ?? "Fail"), 1)
|
|
201
208
|
]),
|
|
202
209
|
_: 1
|
|
203
210
|
}, 8, ["tone"])
|
|
204
211
|
], 2),
|
|
205
212
|
e.messages?.length ? (l(), o("div", {
|
|
206
213
|
key: 0,
|
|
207
|
-
class: t(a(
|
|
214
|
+
class: t(a(G)({ spaced: !0 }))
|
|
208
215
|
}, [
|
|
209
216
|
d("p", {
|
|
210
|
-
class: t(a(
|
|
217
|
+
class: t(a(D)({ tone: "detail" }))
|
|
211
218
|
}, c(s.detailsLabel ?? "Details"), 3),
|
|
212
219
|
d("ul", {
|
|
213
220
|
class: t(a(P)({ tone: "detail" }))
|
|
214
221
|
}, [
|
|
215
|
-
(l(!0), o(
|
|
222
|
+
(l(!0), o($, null, V(e.messages, (u) => (l(), o("li", { key: u }, c(u), 1))), 128))
|
|
216
223
|
], 2)
|
|
217
224
|
], 2)) : b("", !0),
|
|
218
225
|
e.warnings?.length ? (l(), o("div", {
|
|
219
226
|
key: 1,
|
|
220
|
-
class: t(a(
|
|
227
|
+
class: t(a(G)({ spaced: !!e.errors?.length }))
|
|
221
228
|
}, [
|
|
222
229
|
d("p", {
|
|
223
|
-
class: t(a(
|
|
230
|
+
class: t(a(D)({ tone: "warning" }))
|
|
224
231
|
}, c(s.warningsLabel ?? "Warnings"), 3),
|
|
225
232
|
d("ul", {
|
|
226
233
|
class: t(a(P)({ tone: "warning" }))
|
|
227
234
|
}, [
|
|
228
|
-
(l(!0), o(
|
|
235
|
+
(l(!0), o($, null, V(e.warnings, (u) => (l(), o("li", { key: u }, c(u), 1))), 128))
|
|
229
236
|
], 2)
|
|
230
237
|
], 2)) : b("", !0),
|
|
231
|
-
e.errors?.length ? (l(), o("div",
|
|
238
|
+
e.errors?.length ? (l(), o("div", Re, [
|
|
232
239
|
d("p", {
|
|
233
|
-
class: t(a(
|
|
240
|
+
class: t(a(D)({ tone: "error" }))
|
|
234
241
|
}, c(s.errorsLabel ?? "Errors"), 3),
|
|
235
242
|
d("ul", {
|
|
236
243
|
class: t(a(P)({ tone: "error" }))
|
|
237
244
|
}, [
|
|
238
|
-
(l(!0), o(
|
|
245
|
+
(l(!0), o($, null, V(e.errors, (u) => (l(), o("li", { key: u }, c(u), 1))), 128))
|
|
239
246
|
], 2)
|
|
240
247
|
])) : b("", !0)
|
|
241
|
-
], 10,
|
|
248
|
+
], 10, Le));
|
|
242
249
|
}
|
|
243
|
-
}), Ie =
|
|
250
|
+
}), Ie = r({
|
|
244
251
|
padding: "6"
|
|
245
|
-
}), We =
|
|
252
|
+
}), We = r({
|
|
246
253
|
height: "100%",
|
|
247
254
|
minHeight: "0",
|
|
248
255
|
display: "grid",
|
|
249
256
|
gridTemplateRows: "auto minmax(0, 1fr)"
|
|
250
|
-
}),
|
|
257
|
+
}), He = Y, Te = ne, De = r({
|
|
251
258
|
position: "relative",
|
|
252
259
|
zIndex: "1",
|
|
253
|
-
mb: "
|
|
254
|
-
}), Pe =
|
|
260
|
+
mb: "4"
|
|
261
|
+
}), Pe = r({
|
|
255
262
|
position: "relative",
|
|
256
263
|
zIndex: "1",
|
|
257
264
|
mb: "0"
|
|
258
|
-
}),
|
|
265
|
+
}), Oe = de, Ee = X, je = ce, Ae = r({
|
|
259
266
|
color: "text.secondary",
|
|
260
267
|
lineHeight: "1.65",
|
|
261
268
|
fontSize: "sm",
|
|
262
269
|
maxWidth: "2xl"
|
|
263
|
-
}),
|
|
270
|
+
}), Fe = ue, Me = r({
|
|
264
271
|
position: "relative",
|
|
265
272
|
zIndex: "1",
|
|
266
273
|
minHeight: "0",
|
|
267
274
|
overflowY: "auto",
|
|
268
275
|
paddingRight: "1",
|
|
269
276
|
overscrollBehavior: "contain"
|
|
270
|
-
}), Ue =
|
|
277
|
+
}), Ue = r({
|
|
271
278
|
position: "relative",
|
|
272
279
|
zIndex: "1"
|
|
273
|
-
}), ja = /* @__PURE__ */
|
|
280
|
+
}), ja = /* @__PURE__ */ m({
|
|
274
281
|
__name: "SectionCard",
|
|
275
282
|
props: {
|
|
276
283
|
title: {},
|
|
277
|
-
eyebrow: { default:
|
|
284
|
+
eyebrow: { default: void 0 },
|
|
278
285
|
description: { default: "" },
|
|
279
286
|
scrollBody: { type: Boolean, default: !1 },
|
|
280
287
|
collapseBodyGap: { type: Boolean, default: !1 }
|
|
281
288
|
},
|
|
282
289
|
setup(e) {
|
|
283
290
|
const s = e;
|
|
284
|
-
return (
|
|
285
|
-
class: t(a(
|
|
291
|
+
return (i, g) => (l(), o("section", {
|
|
292
|
+
class: t(a(H)(a(He), a(Ie), s.scrollBody && a(We)))
|
|
286
293
|
}, [
|
|
287
294
|
d("div", {
|
|
288
|
-
class: t(a(
|
|
295
|
+
class: t(a(H)(a(Te), s.collapseBodyGap ? a(Pe) : a(De)))
|
|
289
296
|
}, [
|
|
290
297
|
d("div", {
|
|
291
|
-
class: t(a(
|
|
298
|
+
class: t(a(Oe))
|
|
292
299
|
}, [
|
|
293
300
|
s.eyebrow ? (l(), o("p", {
|
|
294
301
|
key: 0,
|
|
295
|
-
class: t(a(
|
|
302
|
+
class: t(a(Ee))
|
|
296
303
|
}, c(s.eyebrow), 3)) : b("", !0),
|
|
297
304
|
d("h2", {
|
|
298
305
|
class: t(a(je))
|
|
299
306
|
}, c(s.title), 3),
|
|
300
307
|
s.description ? (l(), o("p", {
|
|
301
308
|
key: 1,
|
|
302
|
-
class: t(a(
|
|
309
|
+
class: t(a(Ae))
|
|
303
310
|
}, c(s.description), 3)) : b("", !0)
|
|
304
311
|
], 2),
|
|
305
|
-
|
|
312
|
+
i.$slots.actions ? (l(), o("div", {
|
|
306
313
|
key: 0,
|
|
307
|
-
class: t(a(
|
|
314
|
+
class: t(a(Fe))
|
|
308
315
|
}, [
|
|
309
|
-
y(
|
|
316
|
+
y(i.$slots, "actions")
|
|
310
317
|
], 2)) : b("", !0)
|
|
311
318
|
], 2),
|
|
312
319
|
d("div", {
|
|
313
320
|
class: t(s.scrollBody ? a(Me) : a(Ue))
|
|
314
321
|
}, [
|
|
315
|
-
y(
|
|
322
|
+
y(i.$slots, "default")
|
|
316
323
|
], 2)
|
|
317
324
|
], 2));
|
|
318
325
|
}
|
|
319
|
-
}), Ke = be, Ne =
|
|
326
|
+
}), Ke = be, Ne = r({
|
|
320
327
|
display: "inline-flex",
|
|
321
328
|
alignItems: "center",
|
|
322
329
|
justifyContent: "center",
|
|
323
330
|
gap: "2",
|
|
324
331
|
minWidth: "0"
|
|
325
|
-
}),
|
|
332
|
+
}), Ge = r({
|
|
326
333
|
visibility: "hidden"
|
|
327
|
-
}),
|
|
334
|
+
}), Ye = r({
|
|
328
335
|
position: "absolute",
|
|
329
336
|
inset: "0",
|
|
330
337
|
display: "inline-flex",
|
|
@@ -334,10 +341,12 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
334
341
|
px: "4",
|
|
335
342
|
py: "3",
|
|
336
343
|
pointerEvents: "none"
|
|
337
|
-
}), Xe = ["type", "disabled", "aria-busy", "aria-label"],
|
|
344
|
+
}), Xe = ["type", "disabled", "aria-busy", "aria-label"], Aa = /* @__PURE__ */ m({
|
|
338
345
|
__name: "UiButton",
|
|
339
346
|
props: {
|
|
340
347
|
variant: { default: "solid" },
|
|
348
|
+
size: { default: "md" },
|
|
349
|
+
tone: { default: "default" },
|
|
341
350
|
loading: { type: Boolean, default: !1 },
|
|
342
351
|
loadingLabel: { default: "Working..." },
|
|
343
352
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -345,23 +354,23 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
345
354
|
ariaLabel: { default: void 0 }
|
|
346
355
|
},
|
|
347
356
|
setup(e) {
|
|
348
|
-
return (s,
|
|
357
|
+
return (s, i) => (l(), o("button", {
|
|
349
358
|
type: e.type,
|
|
350
359
|
disabled: e.disabled || e.loading,
|
|
351
360
|
"aria-busy": e.loading || void 0,
|
|
352
361
|
"aria-label": e.ariaLabel,
|
|
353
|
-
class: t(a(Ke)({ variant: e.variant, disabled: e.disabled, loading: e.loading }))
|
|
362
|
+
class: t(a(Ke)({ variant: e.variant, size: e.size, tone: e.tone, disabled: e.disabled, loading: e.loading }))
|
|
354
363
|
}, [
|
|
355
364
|
d("span", {
|
|
356
|
-
class: t([a(Ne), e.loading ? a(
|
|
365
|
+
class: t([a(Ne), e.loading ? a(Ge) : void 0])
|
|
357
366
|
}, [
|
|
358
367
|
y(s.$slots, "default")
|
|
359
368
|
], 2),
|
|
360
369
|
e.loading ? (l(), o("span", {
|
|
361
370
|
key: 0,
|
|
362
|
-
class: t(a(
|
|
371
|
+
class: t(a(Ye))
|
|
363
372
|
}, [
|
|
364
|
-
|
|
373
|
+
R(a(he), {
|
|
365
374
|
size: 14,
|
|
366
375
|
class: "aggc-spin",
|
|
367
376
|
"aria-hidden": "true"
|
|
@@ -370,37 +379,35 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
370
379
|
], 2)) : b("", !0)
|
|
371
380
|
], 10, Xe));
|
|
372
381
|
}
|
|
373
|
-
}), qe =
|
|
382
|
+
}), qe = f({
|
|
374
383
|
base: {
|
|
375
384
|
width: "100%",
|
|
376
385
|
display: "flex",
|
|
377
386
|
alignItems: "flex-start",
|
|
378
387
|
gap: "3",
|
|
379
388
|
textAlign: "left",
|
|
380
|
-
borderRadius: "
|
|
389
|
+
borderRadius: "xl",
|
|
381
390
|
borderWidth: "1px",
|
|
382
391
|
px: "4",
|
|
383
392
|
py: "3.5",
|
|
384
393
|
color: "text.primary",
|
|
385
|
-
transition: "
|
|
394
|
+
transition: "border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), background-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 160ms cubic-bezier(0.25, 0.1, 0.25, 1)"
|
|
386
395
|
},
|
|
387
396
|
variants: {
|
|
388
397
|
checked: {
|
|
389
398
|
true: {
|
|
390
399
|
borderColor: "border.accent",
|
|
391
|
-
bg: "bg.selected"
|
|
392
|
-
boxShadow: "0 18px 40px -30px rgba(49,94,255,0.56)"
|
|
400
|
+
bg: "bg.selected"
|
|
393
401
|
},
|
|
394
402
|
false: {
|
|
395
403
|
borderColor: "border.default",
|
|
396
|
-
bg: "bg.input"
|
|
397
|
-
boxShadow: "0 14px 32px -30px rgba(15,23,42,0.42)"
|
|
404
|
+
bg: "bg.input"
|
|
398
405
|
}
|
|
399
406
|
},
|
|
400
407
|
disabled: {
|
|
401
408
|
true: {
|
|
402
409
|
cursor: "not-allowed",
|
|
403
|
-
opacity: 0.
|
|
410
|
+
opacity: 0.45
|
|
404
411
|
},
|
|
405
412
|
false: {
|
|
406
413
|
cursor: "pointer"
|
|
@@ -413,8 +420,7 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
413
420
|
disabled: !1,
|
|
414
421
|
css: {
|
|
415
422
|
_hover: {
|
|
416
|
-
borderColor: "border.accent"
|
|
417
|
-
transform: "translateY(-1px)"
|
|
423
|
+
borderColor: "border.accent"
|
|
418
424
|
}
|
|
419
425
|
}
|
|
420
426
|
},
|
|
@@ -423,8 +429,7 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
423
429
|
disabled: !1,
|
|
424
430
|
css: {
|
|
425
431
|
_hover: {
|
|
426
|
-
borderColor: "border.strong"
|
|
427
|
-
transform: "translateY(-1px)"
|
|
432
|
+
borderColor: "border.strong"
|
|
428
433
|
}
|
|
429
434
|
}
|
|
430
435
|
}
|
|
@@ -433,18 +438,18 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
433
438
|
checked: !1,
|
|
434
439
|
disabled: !1
|
|
435
440
|
}
|
|
436
|
-
}), Je =
|
|
441
|
+
}), Je = f({
|
|
437
442
|
base: {
|
|
438
443
|
mt: "0.5",
|
|
439
444
|
flexShrink: "0",
|
|
440
445
|
width: "22px",
|
|
441
446
|
height: "22px",
|
|
442
447
|
borderRadius: "md",
|
|
443
|
-
borderWidth: "
|
|
448
|
+
borderWidth: "1.5px",
|
|
444
449
|
display: "flex",
|
|
445
450
|
alignItems: "center",
|
|
446
451
|
justifyContent: "center",
|
|
447
|
-
transition: "
|
|
452
|
+
transition: "border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), background-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), transform 160ms cubic-bezier(0.25, 0.1, 0.25, 1)"
|
|
448
453
|
},
|
|
449
454
|
variants: {
|
|
450
455
|
checked: {
|
|
@@ -452,32 +457,32 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
452
457
|
borderColor: "border.accent",
|
|
453
458
|
bg: "bg.accentStrong",
|
|
454
459
|
color: "text.inverse",
|
|
455
|
-
|
|
460
|
+
transform: "scale(1)"
|
|
456
461
|
},
|
|
457
462
|
false: {
|
|
458
463
|
borderColor: "border.default",
|
|
459
464
|
bg: "bg.buttonOutline",
|
|
460
465
|
color: "transparent",
|
|
461
|
-
|
|
466
|
+
transform: "scale(1)"
|
|
462
467
|
}
|
|
463
468
|
}
|
|
464
469
|
},
|
|
465
470
|
defaultVariants: {
|
|
466
471
|
checked: !1
|
|
467
472
|
}
|
|
468
|
-
}), Qe =
|
|
473
|
+
}), Qe = r({
|
|
469
474
|
display: "grid",
|
|
470
475
|
gap: "1",
|
|
471
476
|
minWidth: "0"
|
|
472
|
-
}), Ze =
|
|
477
|
+
}), Ze = r({
|
|
473
478
|
fontSize: "sm",
|
|
474
479
|
fontWeight: "700",
|
|
475
480
|
lineHeight: "1.45"
|
|
476
|
-
}), _e =
|
|
481
|
+
}), _e = r({
|
|
477
482
|
color: "text.secondary",
|
|
478
483
|
fontSize: "sm",
|
|
479
484
|
lineHeight: "1.55"
|
|
480
|
-
}), ea = ["id", "name", "aria-checked", "aria-describedby", "aria-invalid", "disabled", "onKeydown"],
|
|
485
|
+
}), ea = ["id", "name", "aria-checked", "aria-describedby", "aria-invalid", "disabled", "onKeydown"], Fa = /* @__PURE__ */ m({
|
|
481
486
|
__name: "UiCheckbox",
|
|
482
487
|
props: {
|
|
483
488
|
modelValue: { type: Boolean },
|
|
@@ -491,11 +496,11 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
491
496
|
},
|
|
492
497
|
emits: ["update:modelValue"],
|
|
493
498
|
setup(e, { emit: s }) {
|
|
494
|
-
const
|
|
499
|
+
const i = e, g = s;
|
|
495
500
|
function u() {
|
|
496
|
-
|
|
501
|
+
i.disabled || g("update:modelValue", !i.modelValue);
|
|
497
502
|
}
|
|
498
|
-
return (
|
|
503
|
+
return (p, I) => (l(), o("button", {
|
|
499
504
|
type: "button",
|
|
500
505
|
id: e.id,
|
|
501
506
|
name: e.name,
|
|
@@ -515,50 +520,50 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
515
520
|
class: t(a(Je)({ checked: e.modelValue })),
|
|
516
521
|
"aria-hidden": "true"
|
|
517
522
|
}, [
|
|
518
|
-
|
|
523
|
+
R(a(q), { size: 14 })
|
|
519
524
|
], 2),
|
|
520
525
|
d("span", {
|
|
521
526
|
class: t(a(Qe))
|
|
522
527
|
}, [
|
|
523
|
-
e.label ||
|
|
528
|
+
e.label || p.$slots.default ? (l(), o("span", {
|
|
524
529
|
key: 0,
|
|
525
530
|
class: t(a(Ze))
|
|
526
531
|
}, [
|
|
527
|
-
y(
|
|
528
|
-
|
|
532
|
+
y(p.$slots, "default", {}, () => [
|
|
533
|
+
O(c(e.label), 1)
|
|
529
534
|
])
|
|
530
535
|
], 2)) : b("", !0),
|
|
531
|
-
e.description ||
|
|
536
|
+
e.description || p.$slots.description ? (l(), o("span", {
|
|
532
537
|
key: 1,
|
|
533
538
|
class: t(a(_e))
|
|
534
539
|
}, [
|
|
535
|
-
y(
|
|
536
|
-
|
|
540
|
+
y(p.$slots, "description", {}, () => [
|
|
541
|
+
O(c(e.description), 1)
|
|
537
542
|
])
|
|
538
543
|
], 2)) : b("", !0)
|
|
539
544
|
], 2)
|
|
540
545
|
], 42, ea));
|
|
541
546
|
}
|
|
542
|
-
}), aa =
|
|
547
|
+
}), aa = r({
|
|
543
548
|
display: "grid",
|
|
544
549
|
gap: "2",
|
|
545
550
|
minWidth: "0"
|
|
546
|
-
}), ta =
|
|
551
|
+
}), ta = r({
|
|
547
552
|
display: "flex",
|
|
548
553
|
alignItems: "flex-start",
|
|
549
554
|
justifyContent: "space-between",
|
|
550
555
|
gap: "3"
|
|
551
|
-
}), sa =
|
|
556
|
+
}), sa = r({
|
|
552
557
|
display: "grid",
|
|
553
|
-
gap: "
|
|
558
|
+
gap: "0.5",
|
|
554
559
|
minWidth: "0"
|
|
555
|
-
}), la = X, oa =
|
|
560
|
+
}), la = X, oa = r({
|
|
556
561
|
fontSize: "sm",
|
|
557
|
-
fontWeight: "
|
|
562
|
+
fontWeight: "600",
|
|
558
563
|
color: "text.primary"
|
|
559
|
-
}),
|
|
564
|
+
}), ia = fe, ra = r({
|
|
560
565
|
flexShrink: "0"
|
|
561
|
-
}),
|
|
566
|
+
}), na = ["for"], da = ["id"], Ma = /* @__PURE__ */ m({
|
|
562
567
|
__name: "UiField",
|
|
563
568
|
props: {
|
|
564
569
|
id: {},
|
|
@@ -568,7 +573,7 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
568
573
|
eyebrow: {}
|
|
569
574
|
},
|
|
570
575
|
setup(e) {
|
|
571
|
-
return (s,
|
|
576
|
+
return (s, i) => (l(), o("div", {
|
|
572
577
|
class: t(a(aa))
|
|
573
578
|
}, [
|
|
574
579
|
e.eyebrow || e.label || e.hint || s.$slots.meta ? (l(), o("div", {
|
|
@@ -586,16 +591,16 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
586
591
|
key: 1,
|
|
587
592
|
for: e.forId,
|
|
588
593
|
class: t(a(oa))
|
|
589
|
-
}, c(e.label), 11,
|
|
594
|
+
}, c(e.label), 11, na)) : b("", !0),
|
|
590
595
|
e.hint ? (l(), o("p", {
|
|
591
596
|
key: 2,
|
|
592
597
|
id: e.id,
|
|
593
|
-
class: t(a(
|
|
598
|
+
class: t(a(ia))
|
|
594
599
|
}, c(e.hint), 11, da)) : b("", !0)
|
|
595
600
|
], 2),
|
|
596
601
|
s.$slots.meta ? (l(), o("div", {
|
|
597
602
|
key: 0,
|
|
598
|
-
class: t(a(
|
|
603
|
+
class: t(a(ra))
|
|
599
604
|
}, [
|
|
600
605
|
y(s.$slots, "meta")
|
|
601
606
|
], 2)) : b("", !0)
|
|
@@ -603,9 +608,9 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
603
608
|
y(s.$slots, "default")
|
|
604
609
|
], 2));
|
|
605
610
|
}
|
|
606
|
-
}), ca =
|
|
607
|
-
|
|
608
|
-
|
|
611
|
+
}), ca = H(
|
|
612
|
+
ge,
|
|
613
|
+
r({
|
|
609
614
|
paddingX: "4",
|
|
610
615
|
paddingY: "3",
|
|
611
616
|
display: "flex",
|
|
@@ -615,21 +620,21 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
615
620
|
fontSize: "sm",
|
|
616
621
|
lineHeight: "1.5"
|
|
617
622
|
})
|
|
618
|
-
), ua =
|
|
623
|
+
), ua = r({
|
|
619
624
|
width: "2.5",
|
|
620
625
|
height: "2.5",
|
|
621
626
|
borderRadius: "full",
|
|
622
627
|
flexShrink: "0",
|
|
623
628
|
bg: "text.accent",
|
|
624
|
-
boxShadow: "0 0 0 0 rgba(49,94,255,0.
|
|
625
|
-
animation: "loadingPulse 1.
|
|
626
|
-
}), ba =
|
|
629
|
+
boxShadow: "0 0 0 0 var(--colors-bg-accentSoft, rgba(49, 94, 255, 0.3))",
|
|
630
|
+
animation: "loadingPulse 1.4s cubic-bezier(0.25, 0.1, 0.25, 1) infinite"
|
|
631
|
+
}), ba = r({
|
|
627
632
|
display: "grid",
|
|
628
633
|
gap: "0.5"
|
|
629
|
-
}),
|
|
634
|
+
}), fa = r({
|
|
630
635
|
fontWeight: "700",
|
|
631
636
|
color: "text.primary"
|
|
632
|
-
}),
|
|
637
|
+
}), ga = ["aria-live", "role"], Ua = /* @__PURE__ */ m({
|
|
633
638
|
__name: "UiLoadingState",
|
|
634
639
|
props: {
|
|
635
640
|
title: {},
|
|
@@ -637,7 +642,7 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
637
642
|
live: { default: "polite" }
|
|
638
643
|
},
|
|
639
644
|
setup(e) {
|
|
640
|
-
return (s,
|
|
645
|
+
return (s, i) => (l(), o("div", {
|
|
641
646
|
class: t(a(ca)),
|
|
642
647
|
"data-testid": "loading-state",
|
|
643
648
|
"aria-live": e.live,
|
|
@@ -652,13 +657,13 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
652
657
|
class: t(a(ba))
|
|
653
658
|
}, [
|
|
654
659
|
d("p", {
|
|
655
|
-
class: t(a(
|
|
660
|
+
class: t(a(fa))
|
|
656
661
|
}, c(e.title), 3),
|
|
657
662
|
d("p", null, c(e.description), 1)
|
|
658
663
|
], 2)
|
|
659
|
-
], 10,
|
|
664
|
+
], 10, ga));
|
|
660
665
|
}
|
|
661
|
-
}),
|
|
666
|
+
}), ma = r({
|
|
662
667
|
display: "inline-flex",
|
|
663
668
|
width: "fit-content",
|
|
664
669
|
borderRadius: "full",
|
|
@@ -667,9 +672,10 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
667
672
|
bg: "bg.input",
|
|
668
673
|
padding: "1",
|
|
669
674
|
gap: "1",
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
}
|
|
675
|
+
_dark: {
|
|
676
|
+
borderColor: "border.strong"
|
|
677
|
+
}
|
|
678
|
+
}), pa = f({
|
|
673
679
|
base: {
|
|
674
680
|
borderRadius: "full",
|
|
675
681
|
px: "3.5",
|
|
@@ -678,7 +684,12 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
678
684
|
fontWeight: "600",
|
|
679
685
|
cursor: "pointer",
|
|
680
686
|
borderWidth: "1px",
|
|
681
|
-
transition: "
|
|
687
|
+
transition: "background-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 160ms cubic-bezier(0.25, 0.1, 0.25, 1)",
|
|
688
|
+
_focusVisible: {
|
|
689
|
+
outline: "2px solid",
|
|
690
|
+
outlineColor: "text.accent",
|
|
691
|
+
outlineOffset: "2px"
|
|
692
|
+
}
|
|
682
693
|
},
|
|
683
694
|
variants: {
|
|
684
695
|
active: {
|
|
@@ -686,9 +697,13 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
686
697
|
borderColor: "border.accent",
|
|
687
698
|
bg: "bg.accentStrong",
|
|
688
699
|
color: "text.inverse",
|
|
689
|
-
boxShadow: "0 14px 26px -16px rgba(49,94,255,0.68)",
|
|
690
700
|
_hover: {
|
|
691
701
|
bg: "bg.accentStrong"
|
|
702
|
+
},
|
|
703
|
+
_dark: {
|
|
704
|
+
bg: "rgba(138, 180, 255, 0.2)",
|
|
705
|
+
color: "text.accent",
|
|
706
|
+
borderColor: "border.accent"
|
|
692
707
|
}
|
|
693
708
|
},
|
|
694
709
|
false: {
|
|
@@ -702,7 +717,7 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
702
717
|
}
|
|
703
718
|
}
|
|
704
719
|
}
|
|
705
|
-
}),
|
|
720
|
+
}), va = ["onClick"], Ka = /* @__PURE__ */ m({
|
|
706
721
|
__name: "UiSegmentedControl",
|
|
707
722
|
props: {
|
|
708
723
|
modelValue: {},
|
|
@@ -710,18 +725,18 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
710
725
|
},
|
|
711
726
|
emits: ["update:modelValue"],
|
|
712
727
|
setup(e) {
|
|
713
|
-
return (s,
|
|
714
|
-
class: t(a(
|
|
728
|
+
return (s, i) => (l(), o("div", {
|
|
729
|
+
class: t(a(ma))
|
|
715
730
|
}, [
|
|
716
|
-
(l(!0), o(
|
|
717
|
-
key:
|
|
731
|
+
(l(!0), o($, null, V(e.options, (g) => (l(), o("button", {
|
|
732
|
+
key: g.value,
|
|
718
733
|
type: "button",
|
|
719
|
-
class: t(a(
|
|
720
|
-
onClick: (u) => s.$emit("update:modelValue",
|
|
721
|
-
}, c(
|
|
734
|
+
class: t(a(pa)({ active: g.value === e.modelValue })),
|
|
735
|
+
onClick: (u) => s.$emit("update:modelValue", g.value)
|
|
736
|
+
}, c(g.label), 11, va))), 128))
|
|
722
737
|
], 2));
|
|
723
738
|
}
|
|
724
|
-
}),
|
|
739
|
+
}), ha = f({
|
|
725
740
|
base: {
|
|
726
741
|
position: "relative"
|
|
727
742
|
},
|
|
@@ -734,7 +749,7 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
734
749
|
defaultVariants: {
|
|
735
750
|
open: !1
|
|
736
751
|
}
|
|
737
|
-
}), ya =
|
|
752
|
+
}), ya = f({
|
|
738
753
|
base: {
|
|
739
754
|
width: "100%",
|
|
740
755
|
display: "flex",
|
|
@@ -744,8 +759,7 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
744
759
|
borderWidth: "1px",
|
|
745
760
|
fontSize: "sm",
|
|
746
761
|
overflow: "hidden",
|
|
747
|
-
|
|
748
|
-
transition: "all 160ms ease"
|
|
762
|
+
transition: "border-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), background-color 160ms cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 160ms cubic-bezier(0.25, 0.1, 0.25, 1)"
|
|
749
763
|
},
|
|
750
764
|
variants: {
|
|
751
765
|
size: {
|
|
@@ -766,12 +780,14 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
766
780
|
true: {
|
|
767
781
|
borderColor: "border.accent",
|
|
768
782
|
bg: "bg.cardStrong",
|
|
769
|
-
|
|
783
|
+
_dark: {
|
|
784
|
+
borderColor: "border.accent",
|
|
785
|
+
bg: "bg.input"
|
|
786
|
+
}
|
|
770
787
|
},
|
|
771
788
|
false: {
|
|
772
789
|
borderColor: "border.default",
|
|
773
|
-
bg: "bg.input"
|
|
774
|
-
boxShadow: "inset 0 1px 0 rgba(255,255,255,0.22)"
|
|
790
|
+
bg: "bg.input"
|
|
775
791
|
}
|
|
776
792
|
},
|
|
777
793
|
selected: {
|
|
@@ -781,10 +797,15 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
781
797
|
disabled: {
|
|
782
798
|
true: {
|
|
783
799
|
cursor: "not-allowed",
|
|
784
|
-
opacity: 0.
|
|
800
|
+
opacity: 0.45
|
|
785
801
|
},
|
|
786
802
|
false: {
|
|
787
|
-
cursor: "pointer"
|
|
803
|
+
cursor: "pointer",
|
|
804
|
+
_focusVisible: {
|
|
805
|
+
outline: "2px solid",
|
|
806
|
+
outlineColor: "text.accent",
|
|
807
|
+
outlineOffset: "2px"
|
|
808
|
+
}
|
|
788
809
|
}
|
|
789
810
|
}
|
|
790
811
|
},
|
|
@@ -794,7 +815,10 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
794
815
|
css: {
|
|
795
816
|
_hover: {
|
|
796
817
|
borderColor: "border.strong",
|
|
797
|
-
bg: "bg.cardStrong"
|
|
818
|
+
bg: "bg.cardStrong",
|
|
819
|
+
_dark: {
|
|
820
|
+
bg: "bg.input"
|
|
821
|
+
}
|
|
798
822
|
}
|
|
799
823
|
}
|
|
800
824
|
}
|
|
@@ -805,30 +829,30 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
805
829
|
selected: !1,
|
|
806
830
|
disabled: !1
|
|
807
831
|
}
|
|
808
|
-
}), Ca =
|
|
832
|
+
}), Ca = me({
|
|
809
833
|
placement: "anchored",
|
|
810
834
|
density: "cozy"
|
|
811
|
-
}), xa =
|
|
835
|
+
}), xa = r({
|
|
812
836
|
width: "100%",
|
|
813
837
|
zIndex: "30",
|
|
814
838
|
maxHeight: "320px",
|
|
815
839
|
overflowY: "auto",
|
|
816
840
|
display: "grid"
|
|
817
|
-
}),
|
|
841
|
+
}), ka = r({
|
|
818
842
|
display: "block",
|
|
819
843
|
textAlign: "left",
|
|
820
844
|
minWidth: "0",
|
|
821
845
|
flex: "1",
|
|
822
846
|
overflow: "hidden"
|
|
823
|
-
}),
|
|
847
|
+
}), wa = r({
|
|
824
848
|
display: "block",
|
|
825
849
|
overflow: "hidden",
|
|
826
850
|
textOverflow: "ellipsis",
|
|
827
851
|
whiteSpace: "nowrap"
|
|
828
|
-
}), Sa =
|
|
852
|
+
}), Sa = f({
|
|
829
853
|
base: {
|
|
830
854
|
color: "text.muted",
|
|
831
|
-
transition: "transform 160ms
|
|
855
|
+
transition: "transform 160ms cubic-bezier(0.25, 0.1, 0.25, 1)"
|
|
832
856
|
},
|
|
833
857
|
variants: {
|
|
834
858
|
open: {
|
|
@@ -839,7 +863,7 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
839
863
|
defaultVariants: {
|
|
840
864
|
open: !1
|
|
841
865
|
}
|
|
842
|
-
}),
|
|
866
|
+
}), za = f({
|
|
843
867
|
base: {
|
|
844
868
|
width: "100%",
|
|
845
869
|
display: "flex",
|
|
@@ -847,20 +871,25 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
847
871
|
justifyContent: "space-between",
|
|
848
872
|
gap: "3",
|
|
849
873
|
textAlign: "left",
|
|
850
|
-
borderRadius: "
|
|
874
|
+
borderRadius: "lg",
|
|
851
875
|
px: "3",
|
|
852
876
|
borderWidth: "1px",
|
|
853
877
|
cursor: "pointer",
|
|
854
|
-
transition: "
|
|
878
|
+
transition: "border-color 140ms cubic-bezier(0.25, 0.1, 0.25, 1), background-color 140ms cubic-bezier(0.25, 0.1, 0.25, 1), color 140ms cubic-bezier(0.25, 0.1, 0.25, 1)",
|
|
855
879
|
_hover: {
|
|
856
880
|
bg: "bg.selected",
|
|
857
881
|
borderColor: "border.accent"
|
|
882
|
+
},
|
|
883
|
+
_focusVisible: {
|
|
884
|
+
outline: "2px solid",
|
|
885
|
+
outlineColor: "text.accent",
|
|
886
|
+
outlineOffset: "-2px"
|
|
858
887
|
}
|
|
859
888
|
},
|
|
860
889
|
variants: {
|
|
861
890
|
size: {
|
|
862
891
|
sm: { py: "2.5" },
|
|
863
|
-
md: { py: "
|
|
892
|
+
md: { py: "2.5" }
|
|
864
893
|
},
|
|
865
894
|
active: {
|
|
866
895
|
true: {
|
|
@@ -879,26 +908,26 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
879
908
|
size: "md",
|
|
880
909
|
active: !1
|
|
881
910
|
}
|
|
882
|
-
}),
|
|
911
|
+
}), Ba = r({
|
|
883
912
|
display: "grid",
|
|
884
913
|
gap: "0.5",
|
|
885
914
|
minWidth: "0"
|
|
886
|
-
}),
|
|
915
|
+
}), $a = r({
|
|
887
916
|
fontSize: "sm",
|
|
888
917
|
fontWeight: "600",
|
|
889
918
|
minWidth: "0",
|
|
890
919
|
overflow: "hidden",
|
|
891
920
|
textOverflow: "ellipsis",
|
|
892
921
|
whiteSpace: "nowrap"
|
|
893
|
-
}), Va =
|
|
922
|
+
}), Va = r({
|
|
894
923
|
color: "text.secondary",
|
|
895
924
|
fontSize: "xs",
|
|
896
925
|
lineHeight: "1.45",
|
|
897
926
|
overflowWrap: "anywhere"
|
|
898
|
-
}),
|
|
927
|
+
}), La = f({
|
|
899
928
|
base: {
|
|
900
929
|
color: "text.accent",
|
|
901
|
-
transition: "opacity 140ms
|
|
930
|
+
transition: "opacity 140ms cubic-bezier(0.25, 0.1, 0.25, 1)"
|
|
902
931
|
},
|
|
903
932
|
variants: {
|
|
904
933
|
selected: {
|
|
@@ -909,7 +938,7 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
909
938
|
defaultVariants: {
|
|
910
939
|
selected: !1
|
|
911
940
|
}
|
|
912
|
-
}),
|
|
941
|
+
}), Ra = ["id", "name", "disabled", "aria-expanded", "aria-controls", "aria-label", "aria-labelledby", "aria-describedby", "aria-invalid"], Ia = ["id", "aria-activedescendant"], Wa = ["id", "aria-selected", "onMouseenter", "onClick", "onKeydown"], Na = /* @__PURE__ */ m({
|
|
913
942
|
__name: "UiSelect",
|
|
914
943
|
props: {
|
|
915
944
|
modelValue: {},
|
|
@@ -926,100 +955,100 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
926
955
|
},
|
|
927
956
|
emits: ["update:modelValue"],
|
|
928
957
|
setup(e, { emit: s }) {
|
|
929
|
-
const
|
|
930
|
-
() =>
|
|
958
|
+
const i = e, g = s, u = B(null), p = B(null), I = B([]), v = B(!1), x = B(-1), J = se(), W = L(() => i.id ?? `ui-select-${J}`), E = L(() => `${W.value}-listbox`), j = L(
|
|
959
|
+
() => i.options.find((n) => n.value === i.modelValue) ?? null
|
|
931
960
|
);
|
|
932
|
-
function
|
|
933
|
-
if (!
|
|
961
|
+
function w(n) {
|
|
962
|
+
if (!i.options.length) {
|
|
934
963
|
x.value = -1;
|
|
935
964
|
return;
|
|
936
965
|
}
|
|
937
|
-
const
|
|
938
|
-
x.value =
|
|
939
|
-
I.value[
|
|
966
|
+
const h = (n + i.options.length) % i.options.length;
|
|
967
|
+
x.value = h, T(() => {
|
|
968
|
+
I.value[h]?.focus();
|
|
940
969
|
});
|
|
941
970
|
}
|
|
942
|
-
function
|
|
943
|
-
|
|
971
|
+
function k() {
|
|
972
|
+
v.value = !1, x.value = -1;
|
|
944
973
|
}
|
|
945
|
-
async function
|
|
946
|
-
if (
|
|
974
|
+
async function A() {
|
|
975
|
+
if (i.disabled || !i.options.length)
|
|
947
976
|
return;
|
|
948
|
-
|
|
949
|
-
const
|
|
950
|
-
await T(),
|
|
977
|
+
v.value = !0;
|
|
978
|
+
const n = i.options.findIndex((h) => h.value === i.modelValue);
|
|
979
|
+
await T(), w(n >= 0 ? n : 0);
|
|
951
980
|
}
|
|
952
981
|
function Q() {
|
|
953
|
-
if (
|
|
954
|
-
|
|
982
|
+
if (v.value) {
|
|
983
|
+
k();
|
|
955
984
|
return;
|
|
956
985
|
}
|
|
957
|
-
|
|
986
|
+
A();
|
|
958
987
|
}
|
|
959
|
-
function
|
|
960
|
-
|
|
961
|
-
|
|
988
|
+
function F(n) {
|
|
989
|
+
g("update:modelValue", n), k(), T(() => {
|
|
990
|
+
p.value?.focus();
|
|
962
991
|
});
|
|
963
992
|
}
|
|
964
|
-
function Z(
|
|
965
|
-
|
|
993
|
+
function Z(n) {
|
|
994
|
+
i.disabled || (n.key === "ArrowDown" || n.key === "Enter" || n.key === " ") && (n.preventDefault(), A());
|
|
966
995
|
}
|
|
967
|
-
function _(
|
|
968
|
-
switch (
|
|
996
|
+
function _(n, h) {
|
|
997
|
+
switch (n.key) {
|
|
969
998
|
case "ArrowDown":
|
|
970
|
-
|
|
999
|
+
n.preventDefault(), w(h + 1);
|
|
971
1000
|
break;
|
|
972
1001
|
case "ArrowUp":
|
|
973
|
-
|
|
1002
|
+
n.preventDefault(), w(h - 1);
|
|
974
1003
|
break;
|
|
975
1004
|
case "Home":
|
|
976
|
-
|
|
1005
|
+
n.preventDefault(), w(0);
|
|
977
1006
|
break;
|
|
978
1007
|
case "End":
|
|
979
|
-
|
|
1008
|
+
n.preventDefault(), w(i.options.length - 1);
|
|
980
1009
|
break;
|
|
981
1010
|
case "Escape":
|
|
982
|
-
|
|
1011
|
+
n.preventDefault(), k(), p.value?.focus();
|
|
983
1012
|
break;
|
|
984
1013
|
case "Enter":
|
|
985
1014
|
case " ":
|
|
986
|
-
|
|
1015
|
+
n.preventDefault(), F(i.options[h].value);
|
|
987
1016
|
break;
|
|
988
1017
|
}
|
|
989
1018
|
}
|
|
990
|
-
function M(
|
|
991
|
-
|
|
1019
|
+
function M(n) {
|
|
1020
|
+
v.value && (u.value?.contains(n.target) || k());
|
|
992
1021
|
}
|
|
993
1022
|
return N(
|
|
994
|
-
() =>
|
|
1023
|
+
() => i.options,
|
|
995
1024
|
() => {
|
|
996
|
-
I.value = [],
|
|
1025
|
+
I.value = [], i.options.some((n) => n.value === i.modelValue) || k();
|
|
997
1026
|
}
|
|
998
1027
|
), N(
|
|
999
|
-
() =>
|
|
1000
|
-
(
|
|
1001
|
-
|
|
1028
|
+
() => i.disabled,
|
|
1029
|
+
(n) => {
|
|
1030
|
+
n && k();
|
|
1002
1031
|
}
|
|
1003
1032
|
), le(() => {
|
|
1004
1033
|
document.addEventListener("pointerdown", M);
|
|
1005
1034
|
}), oe(() => {
|
|
1006
1035
|
document.removeEventListener("pointerdown", M);
|
|
1007
|
-
}), (
|
|
1036
|
+
}), (n, h) => (l(), o("div", {
|
|
1008
1037
|
ref_key: "rootRef",
|
|
1009
1038
|
ref: u,
|
|
1010
|
-
class: t(a(
|
|
1039
|
+
class: t(a(ha)({ open: v.value }))
|
|
1011
1040
|
}, [
|
|
1012
1041
|
d("button", {
|
|
1013
1042
|
ref_key: "triggerRef",
|
|
1014
|
-
ref:
|
|
1043
|
+
ref: p,
|
|
1015
1044
|
type: "button",
|
|
1016
1045
|
id: W.value,
|
|
1017
1046
|
name: e.name,
|
|
1018
1047
|
disabled: e.disabled,
|
|
1019
|
-
class: t(a(ya)({ size: e.size, open:
|
|
1048
|
+
class: t(a(ya)({ size: e.size, open: v.value, selected: !!j.value, disabled: e.disabled })),
|
|
1020
1049
|
"aria-haspopup": "listbox",
|
|
1021
|
-
"aria-expanded":
|
|
1022
|
-
"aria-controls":
|
|
1050
|
+
"aria-expanded": v.value,
|
|
1051
|
+
"aria-controls": E.value,
|
|
1023
1052
|
"aria-label": e.ariaLabel,
|
|
1024
1053
|
"aria-labelledby": e.ariaLabelledby,
|
|
1025
1054
|
"aria-describedby": e.ariaDescribedby,
|
|
@@ -1028,71 +1057,74 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
1028
1057
|
onKeydown: Z
|
|
1029
1058
|
}, [
|
|
1030
1059
|
d("span", {
|
|
1031
|
-
class: t(a(
|
|
1060
|
+
class: t(a(ka))
|
|
1032
1061
|
}, [
|
|
1033
1062
|
d("span", {
|
|
1034
|
-
class: t(a(
|
|
1063
|
+
class: t(a(wa))
|
|
1035
1064
|
}, c(j.value?.label ?? e.placeholder), 3)
|
|
1036
1065
|
], 2),
|
|
1037
|
-
|
|
1066
|
+
R(a(ye), {
|
|
1038
1067
|
size: 16,
|
|
1039
|
-
class: t(a(Sa)({ open:
|
|
1068
|
+
class: t(a(Sa)({ open: v.value }))
|
|
1040
1069
|
}, null, 8, ["class"])
|
|
1041
|
-
], 42,
|
|
1042
|
-
|
|
1070
|
+
], 42, Ra),
|
|
1071
|
+
v.value ? (l(), o("div", {
|
|
1043
1072
|
key: 0,
|
|
1044
|
-
id:
|
|
1073
|
+
id: E.value,
|
|
1045
1074
|
class: t([a(Ca), a(xa)]),
|
|
1046
1075
|
role: "listbox",
|
|
1047
1076
|
"aria-activedescendant": x.value >= 0 ? `${W.value}-${x.value}` : void 0
|
|
1048
1077
|
}, [
|
|
1049
|
-
(l(!0), o(
|
|
1078
|
+
(l(!0), o($, null, V(e.options, (C, S) => (l(), o("button", {
|
|
1050
1079
|
id: `${W.value}-${S}`,
|
|
1051
1080
|
key: C.value,
|
|
1052
1081
|
ref_for: !0,
|
|
1053
|
-
ref: (
|
|
1082
|
+
ref: (z) => I.value[S] = z,
|
|
1054
1083
|
type: "button",
|
|
1055
1084
|
role: "option",
|
|
1056
1085
|
"aria-selected": C.value === e.modelValue,
|
|
1057
|
-
class: t(a(
|
|
1058
|
-
onMouseenter: (
|
|
1059
|
-
onClick: (
|
|
1060
|
-
onKeydown: (
|
|
1086
|
+
class: t(a(za)({ size: e.size, active: x.value === S || C.value === e.modelValue })),
|
|
1087
|
+
onMouseenter: (z) => x.value = S,
|
|
1088
|
+
onClick: (z) => F(C.value),
|
|
1089
|
+
onKeydown: (z) => _(z, S)
|
|
1061
1090
|
}, [
|
|
1062
1091
|
d("span", {
|
|
1063
|
-
class: t(a(
|
|
1092
|
+
class: t(a(Ba))
|
|
1064
1093
|
}, [
|
|
1065
1094
|
d("span", {
|
|
1066
|
-
class: t(a(
|
|
1095
|
+
class: t(a($a))
|
|
1067
1096
|
}, c(C.label), 3),
|
|
1068
1097
|
C.description && e.size === "md" ? (l(), o("span", {
|
|
1069
1098
|
key: 0,
|
|
1070
1099
|
class: t(a(Va))
|
|
1071
1100
|
}, c(C.description), 3)) : b("", !0)
|
|
1072
1101
|
], 2),
|
|
1073
|
-
|
|
1102
|
+
R(a(q), {
|
|
1074
1103
|
size: 15,
|
|
1075
|
-
class: t(a(
|
|
1104
|
+
class: t(a(La)({ selected: C.value === e.modelValue }))
|
|
1076
1105
|
}, null, 8, ["class"])
|
|
1077
1106
|
], 42, Wa))), 128))
|
|
1078
1107
|
], 10, Ia)) : b("", !0)
|
|
1079
1108
|
], 2));
|
|
1080
1109
|
}
|
|
1081
|
-
}),
|
|
1110
|
+
}), Ha = f({
|
|
1082
1111
|
base: {
|
|
1083
1112
|
position: "relative",
|
|
1084
1113
|
overflow: "hidden",
|
|
1114
|
+
bg: "bg.cardAlt",
|
|
1115
|
+
borderRadius: "md",
|
|
1085
1116
|
_before: {
|
|
1086
1117
|
content: '""',
|
|
1087
1118
|
position: "absolute",
|
|
1088
1119
|
inset: "0",
|
|
1089
|
-
background: "linear-gradient(90deg,
|
|
1120
|
+
background: "linear-gradient(90deg, transparent 0%, var(--colors-bg-overlay, rgba(255,255,255,0.36)) 50%, transparent 100%)",
|
|
1090
1121
|
transform: "translateX(-100%)",
|
|
1091
|
-
animation: "aggc-shimmer 1.
|
|
1122
|
+
animation: "aggc-shimmer 1.6s cubic-bezier(0.25, 0.1, 0.25, 1) infinite"
|
|
1092
1123
|
},
|
|
1093
1124
|
_dark: {
|
|
1125
|
+
bg: "rgba(255, 255, 255, 0.04)",
|
|
1094
1126
|
_before: {
|
|
1095
|
-
background: "linear-gradient(90deg,
|
|
1127
|
+
background: "linear-gradient(90deg, transparent 0%, rgba(186, 204, 236, 0.1) 50%, transparent 100%)"
|
|
1096
1128
|
}
|
|
1097
1129
|
}
|
|
1098
1130
|
},
|
|
@@ -1100,73 +1132,41 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
1100
1132
|
variant: {
|
|
1101
1133
|
text: {
|
|
1102
1134
|
width: "100%",
|
|
1103
|
-
height: "0.875rem"
|
|
1104
|
-
borderRadius: "md",
|
|
1105
|
-
bg: "rgba(127, 146, 184, 0.14)",
|
|
1106
|
-
_dark: {
|
|
1107
|
-
bg: "rgba(210, 220, 240, 0.09)"
|
|
1108
|
-
}
|
|
1135
|
+
height: "0.875rem"
|
|
1109
1136
|
},
|
|
1110
1137
|
title: {
|
|
1111
1138
|
width: "100%",
|
|
1112
1139
|
height: "1.75rem",
|
|
1113
|
-
borderRadius: "
|
|
1114
|
-
bg: "rgba(127, 146, 184, 0.14)",
|
|
1115
|
-
_dark: {
|
|
1116
|
-
bg: "rgba(210, 220, 240, 0.09)"
|
|
1117
|
-
}
|
|
1140
|
+
borderRadius: "md"
|
|
1118
1141
|
},
|
|
1119
1142
|
rect: {
|
|
1120
1143
|
width: "100%",
|
|
1121
|
-
height: "5rem"
|
|
1122
|
-
borderRadius: "xl",
|
|
1123
|
-
bg: "rgba(127, 146, 184, 0.14)",
|
|
1124
|
-
_dark: {
|
|
1125
|
-
bg: "rgba(210, 220, 240, 0.09)"
|
|
1126
|
-
}
|
|
1144
|
+
height: "5rem"
|
|
1127
1145
|
},
|
|
1128
1146
|
pill: {
|
|
1129
1147
|
width: "5rem",
|
|
1130
1148
|
height: "1.75rem",
|
|
1131
|
-
borderRadius: "999px"
|
|
1132
|
-
bg: "rgba(127, 146, 184, 0.14)",
|
|
1133
|
-
_dark: {
|
|
1134
|
-
bg: "rgba(210, 220, 240, 0.09)"
|
|
1135
|
-
}
|
|
1149
|
+
borderRadius: "999px"
|
|
1136
1150
|
},
|
|
1137
1151
|
circle: {
|
|
1138
1152
|
width: "2.75rem",
|
|
1139
1153
|
height: "2.75rem",
|
|
1140
|
-
borderRadius: "999px"
|
|
1141
|
-
bg: "rgba(127, 146, 184, 0.14)",
|
|
1142
|
-
_dark: {
|
|
1143
|
-
bg: "rgba(210, 220, 240, 0.09)"
|
|
1144
|
-
}
|
|
1154
|
+
borderRadius: "999px"
|
|
1145
1155
|
},
|
|
1146
1156
|
stat: {
|
|
1147
1157
|
width: "100%",
|
|
1148
|
-
height: "4.75rem"
|
|
1149
|
-
borderRadius: "xl",
|
|
1150
|
-
bg: "rgba(117, 138, 178, 0.16)",
|
|
1151
|
-
_dark: {
|
|
1152
|
-
bg: "rgba(210, 220, 240, 0.11)"
|
|
1153
|
-
}
|
|
1158
|
+
height: "4.75rem"
|
|
1154
1159
|
},
|
|
1155
1160
|
action: {
|
|
1156
1161
|
width: "100%",
|
|
1157
|
-
height: "2.75rem"
|
|
1158
|
-
borderRadius: "xl",
|
|
1159
|
-
bg: "rgba(127, 146, 184, 0.14)",
|
|
1160
|
-
_dark: {
|
|
1161
|
-
bg: "rgba(210, 220, 240, 0.09)"
|
|
1162
|
-
}
|
|
1162
|
+
height: "2.75rem"
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
1165
|
},
|
|
1166
1166
|
defaultVariants: {
|
|
1167
1167
|
variant: "rect"
|
|
1168
1168
|
}
|
|
1169
|
-
}),
|
|
1169
|
+
}), Ga = /* @__PURE__ */ m({
|
|
1170
1170
|
__name: "UiSkeleton",
|
|
1171
1171
|
props: {
|
|
1172
1172
|
variant: { default: "rect" },
|
|
@@ -1174,28 +1174,28 @@ const Ce = ie, Ea = /* @__PURE__ */ p({
|
|
|
1174
1174
|
height: { default: void 0 }
|
|
1175
1175
|
},
|
|
1176
1176
|
setup(e) {
|
|
1177
|
-
const s = e,
|
|
1177
|
+
const s = e, i = L(() => Ha({ variant: s.variant })), g = L(() => ({
|
|
1178
1178
|
width: s.width ?? (s.variant === "circle" ? "2.75rem" : s.variant === "pill" ? "5rem" : "100%"),
|
|
1179
1179
|
height: s.height ?? (s.variant === "text" ? "0.875rem" : s.variant === "title" || s.variant === "pill" ? "1.75rem" : s.variant === "circle" || s.variant === "action" ? "2.75rem" : s.variant === "stat" ? "4.75rem" : "5rem")
|
|
1180
1180
|
}));
|
|
1181
|
-
return (u,
|
|
1181
|
+
return (u, p) => (l(), o("div", {
|
|
1182
1182
|
"aria-hidden": "true",
|
|
1183
1183
|
"data-ui-skeleton": "",
|
|
1184
|
-
class: t(
|
|
1185
|
-
style:
|
|
1184
|
+
class: t(i.value),
|
|
1185
|
+
style: ie(g.value)
|
|
1186
1186
|
}, null, 6));
|
|
1187
1187
|
}
|
|
1188
1188
|
});
|
|
1189
1189
|
export {
|
|
1190
|
-
|
|
1191
|
-
|
|
1190
|
+
Oa as _,
|
|
1191
|
+
Ea as a,
|
|
1192
1192
|
ja as b,
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1193
|
+
ke as c,
|
|
1194
|
+
Aa as d,
|
|
1195
|
+
Fa as e,
|
|
1196
1196
|
Ma as f,
|
|
1197
1197
|
Ua as g,
|
|
1198
1198
|
Ka as h,
|
|
1199
1199
|
Na as i,
|
|
1200
|
-
|
|
1200
|
+
Ga as j
|
|
1201
1201
|
};
|