@lovince/ui-vue 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +134 -2
- package/dist/components/accordion.d.ts +197 -0
- package/dist/components/avatar.d.ts +90 -0
- package/dist/components/calendar.d.ts +421 -0
- package/dist/components/carousel.d.ts +293 -0
- package/dist/components/combobox.d.ts +431 -0
- package/dist/components/command.d.ts +252 -0
- package/dist/components/dialog.d.ts +242 -0
- package/dist/components/disclosure.d.ts +120 -0
- package/dist/components/emoji-picker.d.ts +359 -0
- package/dist/components/menu.d.ts +493 -0
- package/dist/components/navigation-menu.d.ts +275 -0
- package/dist/components/number-field.d.ts +202 -0
- package/dist/components/pin-input.d.ts +174 -0
- package/dist/components/popover.d.ts +213 -0
- package/dist/components/progress.d.ts +82 -0
- package/dist/components/radio-group.d.ts +167 -0
- package/dist/components/select.d.ts +418 -0
- package/dist/components/slider.d.ts +222 -0
- package/dist/components/sortable.d.ts +140 -0
- package/dist/components/splitter.d.ts +167 -0
- package/dist/components/tabs.d.ts +183 -0
- package/dist/components/toast.d.ts +192 -0
- package/dist/components/toggle-group.d.ts +205 -0
- package/dist/components/toggles.d.ts +232 -0
- package/dist/components/tooltip.d.ts +370 -0
- package/dist/components/tree.d.ts +147 -0
- package/dist/composables/data-table.d.ts +25 -0
- package/dist/composables/observers.d.ts +42 -0
- package/dist/composables/presence.d.ts +7 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +4094 -0
- package/dist/shared/context.d.ts +2 -0
- package/dist/shared/dismiss.d.ts +17 -0
- package/dist/shared/element.d.ts +6 -0
- package/dist/shared/floating-props.d.ts +27 -0
- package/dist/shared/list.d.ts +17 -0
- package/dist/shared/machine.d.ts +38 -0
- package/dist/shared/parts.d.ts +8 -0
- package/dist/shared/portal.d.ts +34 -0
- package/dist/shared/primitive.d.ts +57 -0
- package/package.json +68 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,4094 @@
|
|
|
1
|
+
import { Comment as e, Fragment as t, Teleport as n, cloneVNode as r, computed as i, defineComponent as a, getCurrentInstance as o, h as s, inject as c, mergeProps as l, nextTick as u, onBeforeUnmount as d, onMounted as f, onScopeDispose as ee, onUpdated as te, provide as p, reactive as ne, ref as m, shallowRef as h, useId as g, watch as _ } from "vue";
|
|
2
|
+
import { COLLECTION_ATTR as re, copyText as ie, createCommandRunner as ae, createDomEffects as oe, createDomQuery as se, observeInView as ce, onExitEnd as le, scrollLockCount as ue, watchActiveSection as de, watchScrollEdges as fe, watchScrollPort as pe } from "@lovince/ui-dom";
|
|
3
|
+
import { ALIGNS as me, DEFAULT_PLACEMENT as he, NO_DOM as ge, NO_SCROLL_EDGES as _e, SIDES as ve, accordionMachine as ye, ariaChecked as be, avatarMachine as xe, calendarMachine as Se, cardLayout as Ce, carouselMachine as we, checkboxMachine as Te, checkedDataState as Ee, clampDate as De, comboboxContext as Oe, comboboxMachine as ke, commandMachine as Ae, connectAccordion as je, connectCalendar as Me, connectCarousel as Ne, connectCheckbox as Pe, connectCombobox as Fe, connectCommand as Ie, connectDialog as Le, connectDisclosure as Re, connectEmojiPicker as ze, connectHoverCard as Be, connectMenu as Ve, connectNavigationMenu as He, connectNumberField as Ue, connectPinInput as We, connectPopover as Ge, connectProgress as Ke, connectRadioGroup as qe, connectSelect as Je, connectSlider as Ye, connectSortable as Xe, connectSplitter as Ze, connectSwitch as Qe, connectTabs as $e, connectToast as et, connectToastViewport as tt, connectToggle as nt, connectToggleGroup as rt, connectTooltip as it, connectTree as at, createService as ot, createToastApi as st, createToastStore as ct, delayMachine as lt, dialogIds as ut, dialogMachine as dt, disclosureIds as ft, disclosureMachine as pt, emojiPickerMachine as mt, flag as ht, formatNumber as gt, hoverMachine as _t, isIsoDate as vt, isSkinTone as yt, menuContext as bt, menuMachine as xt, navigationMenuContext as St, navigationMenuMachine as Ct, nextSort as wt, numberFieldMachine as Tt, pinCharacters as Et, pinInputMachine as Dt, popoverMachine as Ot, progressMachine as kt, radioGroupMachine as At, scrollEdgesOf as jt, scrollOffsetForIndex as Mt, selectContext as Nt, selectMachine as Pt, selectionState as Ft, sliderMachine as It, sortRows as Lt, sortableMachine as Rt, splitterMachine as zt, startOfMonth as Bt, switchMachine as Vt, tabIds as Ht, tabsMachine as Ut, toastTimerMachine as Wt, toastViewportMachine as Gt, todayIso as Kt, toggleGroupMachine as qt, toggleMachine as Jt, togglePage as Yt, toggleValue as Xt, treeContext as Zt, treeMachine as Qt, valueMachine as $t, virtualRange as en, visibleColumns as tn, weekdayNames as nn } from "@lovince/ui-headless";
|
|
4
|
+
//#region src/shared/primitive.ts
|
|
5
|
+
var rn = (e) => e.flatMap((e) => e.type === t && Array.isArray(e.children) ? rn(e.children.filter(an)) : [e]), an = (e) => typeof e == "object" && !!e && "__v_isVNode" in e, on = a({
|
|
6
|
+
name: "Slot",
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
setup: (t, { attrs: n, slots: i }) => () => {
|
|
9
|
+
let [t, ...a] = rn(i.default?.() ?? []).filter((t) => t.type !== e);
|
|
10
|
+
if (t === void 0) return null;
|
|
11
|
+
a.length > 0 && typeof console < "u" && console.warn("[lovince-ui] asChild expects exactly one child element; extra children are ignored.");
|
|
12
|
+
let o = r(t, {}, !0);
|
|
13
|
+
return o.props = l(n, t.props ?? {}), o;
|
|
14
|
+
}
|
|
15
|
+
}), v = {
|
|
16
|
+
as: {
|
|
17
|
+
type: [String, Object],
|
|
18
|
+
default: "div"
|
|
19
|
+
},
|
|
20
|
+
asChild: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
}
|
|
24
|
+
}, y = {
|
|
25
|
+
...v,
|
|
26
|
+
as: {
|
|
27
|
+
...v.as,
|
|
28
|
+
default: "button"
|
|
29
|
+
}
|
|
30
|
+
}, b = a({
|
|
31
|
+
name: "Primitive",
|
|
32
|
+
inheritAttrs: !1,
|
|
33
|
+
props: v,
|
|
34
|
+
setup: (e, { attrs: t, slots: n }) => () => e.asChild ? s(on, t, n) : typeof e.as == "string" ? s(e.as, t, n.default?.()) : s(e.as, t, n)
|
|
35
|
+
}), x = a({
|
|
36
|
+
name: "Portal",
|
|
37
|
+
props: {
|
|
38
|
+
to: {
|
|
39
|
+
type: [String, Object],
|
|
40
|
+
default: "body"
|
|
41
|
+
},
|
|
42
|
+
disabled: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: !1
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
setup: (e, { slots: r }) => {
|
|
48
|
+
let i = m(!1);
|
|
49
|
+
return f(() => {
|
|
50
|
+
i.value = !0;
|
|
51
|
+
}), () => e.disabled ? s(t, r.default?.() ?? []) : i.value ? s(n, { to: e.to }, r.default?.() ?? []) : null;
|
|
52
|
+
}
|
|
53
|
+
}), sn = (e) => typeof e == "object" && !!e && "$el" in e, S = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, C = (e) => {
|
|
54
|
+
let t = e != null && "value" in e ? e.value : e;
|
|
55
|
+
if (t == null) return null;
|
|
56
|
+
if (S(t)) return t;
|
|
57
|
+
if (!sn(t)) return null;
|
|
58
|
+
let n = t.$el;
|
|
59
|
+
if (S(n)) return n;
|
|
60
|
+
let r = t.$.subTree.anchor, i = n instanceof Node ? n.nextSibling : null;
|
|
61
|
+
for (; i !== null && i !== r && !S(i);) i = i.nextSibling;
|
|
62
|
+
return S(i) ? i : null;
|
|
63
|
+
}, w = (e, t, n) => {
|
|
64
|
+
let r = () => {
|
|
65
|
+
let r = typeof e == "function" ? e() : C(e);
|
|
66
|
+
r !== null && r.id !== "" && r.id !== t() && n(r.id);
|
|
67
|
+
};
|
|
68
|
+
f(r), te(r);
|
|
69
|
+
}, cn = (e) => {
|
|
70
|
+
let t = {};
|
|
71
|
+
for (let n of Object.keys(e ?? {})) {
|
|
72
|
+
let r = e?.[n]?.();
|
|
73
|
+
r !== void 0 && (t[n] = r);
|
|
74
|
+
}
|
|
75
|
+
return t;
|
|
76
|
+
}, T = (e, t, n = {}) => {
|
|
77
|
+
let r = typeof document < "u", i = !1, a = (e) => {
|
|
78
|
+
i = !0;
|
|
79
|
+
try {
|
|
80
|
+
s.sync(e);
|
|
81
|
+
} finally {
|
|
82
|
+
i = !1;
|
|
83
|
+
}
|
|
84
|
+
}, s = ot(e, {
|
|
85
|
+
...t,
|
|
86
|
+
...cn(n.controlled)
|
|
87
|
+
}, {
|
|
88
|
+
effects: r ? oe() : {},
|
|
89
|
+
runCommand: r ? ae() : void 0,
|
|
90
|
+
schedule: (e) => void u(e),
|
|
91
|
+
filter: (e) => n.beforeSend?.(e) !== !1,
|
|
92
|
+
onChange: (e, t) => {
|
|
93
|
+
c.value = e, !i && (n.onChange?.(e, t), n.controlled !== void 0 && u(() => a(cn(n.controlled))));
|
|
94
|
+
}
|
|
95
|
+
}), c = h(s.snapshot());
|
|
96
|
+
for (let e of Object.keys(n.controlled ?? {})) {
|
|
97
|
+
let t = n.controlled?.[e];
|
|
98
|
+
t !== void 0 && _(t, (t) => {
|
|
99
|
+
t !== void 0 && a({ [e]: t });
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return o() !== null && (f(s.start), d(s.stop)), {
|
|
103
|
+
snapshot: c,
|
|
104
|
+
send: s.send,
|
|
105
|
+
sync: a,
|
|
106
|
+
refresh: s.refresh,
|
|
107
|
+
query: r ? se() : ge,
|
|
108
|
+
service: s
|
|
109
|
+
};
|
|
110
|
+
}, E = (e, t) => {
|
|
111
|
+
let n = {};
|
|
112
|
+
for (let [r, i] of Object.entries(e)) {
|
|
113
|
+
if (i === !1 || i === void 0 || r === "type" && t !== void 0 && t !== "button") continue;
|
|
114
|
+
let e = /^on[A-Z]/.test(r) && typeof i == "function";
|
|
115
|
+
n[e ? `on${r.charAt(2)}${r.slice(3).toLowerCase()}` : r] = i;
|
|
116
|
+
}
|
|
117
|
+
return n;
|
|
118
|
+
}, D = (e, t = {}) => {
|
|
119
|
+
let n = g(), r = typeof document > "u" ? ge : se(), i = m(0), a = () => {
|
|
120
|
+
i.value += 1;
|
|
121
|
+
};
|
|
122
|
+
return {
|
|
123
|
+
itemAttrs: { [re]: n },
|
|
124
|
+
items: () => (i.value, r.items(C(e), n, t)),
|
|
125
|
+
track: () => {
|
|
126
|
+
f(a), d(a);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}, O = {
|
|
130
|
+
side: {
|
|
131
|
+
type: String,
|
|
132
|
+
default: "bottom",
|
|
133
|
+
validator: (e) => ve.includes(e)
|
|
134
|
+
},
|
|
135
|
+
align: {
|
|
136
|
+
type: String,
|
|
137
|
+
default: "center",
|
|
138
|
+
validator: (e) => me.includes(e)
|
|
139
|
+
},
|
|
140
|
+
sideOffset: {
|
|
141
|
+
type: Number,
|
|
142
|
+
default: 4
|
|
143
|
+
},
|
|
144
|
+
collisionPadding: {
|
|
145
|
+
type: Number,
|
|
146
|
+
default: 8
|
|
147
|
+
},
|
|
148
|
+
avoidCollisions: {
|
|
149
|
+
type: Boolean,
|
|
150
|
+
default: !0
|
|
151
|
+
}
|
|
152
|
+
}, k = (e, t) => {
|
|
153
|
+
let n = m(e()), r = null, i = () => {
|
|
154
|
+
r?.(), r = null;
|
|
155
|
+
};
|
|
156
|
+
return _(e, (e) => {
|
|
157
|
+
if (i(), e) {
|
|
158
|
+
n.value = !0;
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
r = le(typeof document > "u" ? null : t(), () => {
|
|
162
|
+
r = null, n.value = !1;
|
|
163
|
+
});
|
|
164
|
+
}, { flush: "post" }), ee(i), n;
|
|
165
|
+
}, ln = (e) => {
|
|
166
|
+
let t = i(() => tn(e.columns(), e.hidden())), n = i(() => e.sortMode() === "server" ? [...e.rows()] : Lt(e.rows(), e.sort.value)), r = (t, n) => {
|
|
167
|
+
let r = t[e.rowKey()];
|
|
168
|
+
return typeof r == "string" || typeof r == "number" ? r : n;
|
|
169
|
+
}, a = i(() => e.rows().map(r));
|
|
170
|
+
return {
|
|
171
|
+
columns: t,
|
|
172
|
+
rows: n,
|
|
173
|
+
card: i(() => Ce(t.value)),
|
|
174
|
+
pageState: i(() => Ft(a.value, e.selected.value)),
|
|
175
|
+
keyOf: r,
|
|
176
|
+
isSelected: (t, n) => e.selected.value.includes(r(t, n)),
|
|
177
|
+
toggleRow: (t, n) => {
|
|
178
|
+
e.selected.value = Xt(e.selected.value, r(t, n));
|
|
179
|
+
},
|
|
180
|
+
togglePage: () => {
|
|
181
|
+
e.selected.value = Yt(a.value, e.selected.value);
|
|
182
|
+
},
|
|
183
|
+
toggleSort: (t) => {
|
|
184
|
+
e.sort.value = wt(e.sort.value, t);
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
}, un = (e) => {
|
|
188
|
+
let t = () => void 0;
|
|
189
|
+
f(() => {
|
|
190
|
+
t = e();
|
|
191
|
+
}), d(() => t());
|
|
192
|
+
}, dn = (e, t = {}) => {
|
|
193
|
+
let n = m(!1);
|
|
194
|
+
return un(() => ce(C(e), t, (e) => n.value = e)), n;
|
|
195
|
+
}, fn = (e) => {
|
|
196
|
+
let t = m(_e);
|
|
197
|
+
return un(() => fe(C(e), (e) => t.value = e)), {
|
|
198
|
+
edges: t,
|
|
199
|
+
measure: () => {
|
|
200
|
+
let n = C(e);
|
|
201
|
+
t.value = n === null ? _e : jt(n);
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
}, pn = (e, t = {}) => {
|
|
205
|
+
let n = m(e()[0]), r = () => void 0, i = () => {
|
|
206
|
+
r(), r = de(e, t.line ?? .3, (e) => n.value = e);
|
|
207
|
+
};
|
|
208
|
+
return f(i), _(() => e().join(" "), i), d(() => r()), n;
|
|
209
|
+
}, mn = (e, t) => {
|
|
210
|
+
let n = m(0), r = m(0);
|
|
211
|
+
return un(() => pe(C(e), (e) => {
|
|
212
|
+
n.value = e.scrollTop, r.value = e.height;
|
|
213
|
+
})), {
|
|
214
|
+
range: i(() => en(n.value, r.value || t.itemSize() * 10, t.itemSize(), t.count(), t.overscan?.() ?? 4)),
|
|
215
|
+
scrollToIndex: (r, i = "nearest") => {
|
|
216
|
+
let a = C(e);
|
|
217
|
+
a !== null && (a.scrollTop = Mt(r, t.count(), t.itemSize(), a.clientHeight, a.scrollTop, i), n.value = a.scrollTop);
|
|
218
|
+
},
|
|
219
|
+
viewportHeight: r
|
|
220
|
+
};
|
|
221
|
+
}, hn = (e = {}) => {
|
|
222
|
+
let t = m(!1), n = m(!1), r, i = () => {
|
|
223
|
+
r !== void 0 && clearTimeout(r), r = void 0;
|
|
224
|
+
};
|
|
225
|
+
return o() !== null && d(i), {
|
|
226
|
+
copied: t,
|
|
227
|
+
failed: n,
|
|
228
|
+
copy: async (a) => {
|
|
229
|
+
i(), n.value = !1;
|
|
230
|
+
let o = await ie(a);
|
|
231
|
+
return t.value = o, n.value = !o, o && (r = setTimeout(() => t.value = !1, e.resetAfter?.() ?? 2e3)), o;
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
}, A = (e) => {
|
|
235
|
+
let t = Symbol(e);
|
|
236
|
+
return [
|
|
237
|
+
(e) => (p(t, e), e),
|
|
238
|
+
(n) => {
|
|
239
|
+
let r = c(t, null);
|
|
240
|
+
if (r === null) throw Error(`[lovince-ui] <${n}> must be placed inside <${e}>.`);
|
|
241
|
+
return r;
|
|
242
|
+
},
|
|
243
|
+
t
|
|
244
|
+
];
|
|
245
|
+
}, [gn, _n, vn] = A("DisclosureRoot"), yn = () => c(vn, null), bn = a({
|
|
246
|
+
name: "DisclosureRoot",
|
|
247
|
+
props: {
|
|
248
|
+
...v,
|
|
249
|
+
open: {
|
|
250
|
+
type: Boolean,
|
|
251
|
+
default: void 0
|
|
252
|
+
},
|
|
253
|
+
defaultOpen: {
|
|
254
|
+
type: Boolean,
|
|
255
|
+
default: !1
|
|
256
|
+
},
|
|
257
|
+
disabled: {
|
|
258
|
+
type: Boolean,
|
|
259
|
+
default: !1
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
emits: { "update:open": (e) => typeof e == "boolean" },
|
|
263
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
264
|
+
let r = T(pt, {
|
|
265
|
+
open: e.defaultOpen,
|
|
266
|
+
disabled: e.disabled,
|
|
267
|
+
size: null,
|
|
268
|
+
ids: ft(g())
|
|
269
|
+
}, {
|
|
270
|
+
controlled: {
|
|
271
|
+
open: () => e.open,
|
|
272
|
+
disabled: () => e.disabled
|
|
273
|
+
},
|
|
274
|
+
onChange: (e, n) => {
|
|
275
|
+
e.context.open !== n.context.open && t("update:open", e.context.open);
|
|
276
|
+
}
|
|
277
|
+
}), a = i(() => Re(r.snapshot.value, r.send)), o = () => r.snapshot.value.context.ids;
|
|
278
|
+
return gn({
|
|
279
|
+
api: a,
|
|
280
|
+
ids: o,
|
|
281
|
+
setIds: (e) => r.sync({ ids: {
|
|
282
|
+
...o(),
|
|
283
|
+
...e
|
|
284
|
+
} }),
|
|
285
|
+
refresh: r.refresh,
|
|
286
|
+
triggerId: i(() => o().trigger)
|
|
287
|
+
}), () => s(b, {
|
|
288
|
+
as: e.as,
|
|
289
|
+
asChild: e.asChild,
|
|
290
|
+
...E(a.value.rootProps)
|
|
291
|
+
}, () => n.default?.({ open: a.value.open }));
|
|
292
|
+
}
|
|
293
|
+
}), xn = a({
|
|
294
|
+
name: "DisclosureTrigger",
|
|
295
|
+
props: y,
|
|
296
|
+
setup: (e, { slots: t }) => {
|
|
297
|
+
let n = _n("DisclosureTrigger"), r = m(null);
|
|
298
|
+
return w(r, () => n.ids().trigger, (e) => n.setIds({ trigger: e })), () => s(b, {
|
|
299
|
+
...E(n.api.value.triggerProps, e.as),
|
|
300
|
+
ref: r,
|
|
301
|
+
as: e.as,
|
|
302
|
+
asChild: e.asChild
|
|
303
|
+
}, () => t.default?.({ open: n.api.value.open }));
|
|
304
|
+
}
|
|
305
|
+
}), Sn = a({
|
|
306
|
+
name: "DisclosureContent",
|
|
307
|
+
props: v,
|
|
308
|
+
setup: (e, { slots: t }) => {
|
|
309
|
+
let n = _n("DisclosureContent"), r = m(null), i = k(() => n.api.value.open, () => C(r));
|
|
310
|
+
return w(r, () => n.ids().content, (e) => n.setIds({ content: e })), () => s(b, {
|
|
311
|
+
...E(n.api.value.contentProps(n.api.value.open || i.value)),
|
|
312
|
+
ref: r,
|
|
313
|
+
as: e.as,
|
|
314
|
+
asChild: e.asChild,
|
|
315
|
+
onVnodeMounted: n.refresh
|
|
316
|
+
}, t);
|
|
317
|
+
}
|
|
318
|
+
}), Cn = {
|
|
319
|
+
...y,
|
|
320
|
+
disabled: {
|
|
321
|
+
type: Boolean,
|
|
322
|
+
default: !1
|
|
323
|
+
},
|
|
324
|
+
readonly: {
|
|
325
|
+
type: Boolean,
|
|
326
|
+
default: !1
|
|
327
|
+
},
|
|
328
|
+
required: {
|
|
329
|
+
type: Boolean,
|
|
330
|
+
default: !1
|
|
331
|
+
},
|
|
332
|
+
name: {
|
|
333
|
+
type: String,
|
|
334
|
+
default: void 0
|
|
335
|
+
},
|
|
336
|
+
value: {
|
|
337
|
+
type: String,
|
|
338
|
+
default: "on"
|
|
339
|
+
}
|
|
340
|
+
}, wn = Symbol("CheckboxRoot"), Tn = Symbol("SwitchRoot"), En = a({
|
|
341
|
+
name: "CheckboxRoot",
|
|
342
|
+
inheritAttrs: !1,
|
|
343
|
+
props: {
|
|
344
|
+
...Cn,
|
|
345
|
+
modelValue: {
|
|
346
|
+
type: [Boolean, String],
|
|
347
|
+
default: void 0
|
|
348
|
+
},
|
|
349
|
+
defaultValue: {
|
|
350
|
+
type: [Boolean, String],
|
|
351
|
+
default: !1
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
emits: { "update:modelValue": (e) => e !== void 0 },
|
|
355
|
+
setup: (e, { slots: n, emit: r, attrs: a }) => {
|
|
356
|
+
let o = T(Te, {
|
|
357
|
+
checked: e.defaultValue,
|
|
358
|
+
disabled: e.disabled,
|
|
359
|
+
readOnly: e.readonly,
|
|
360
|
+
required: e.required
|
|
361
|
+
}, {
|
|
362
|
+
controlled: {
|
|
363
|
+
checked: () => e.modelValue,
|
|
364
|
+
disabled: () => e.disabled,
|
|
365
|
+
readOnly: () => e.readonly,
|
|
366
|
+
required: () => e.required
|
|
367
|
+
},
|
|
368
|
+
onChange: (e, t) => {
|
|
369
|
+
e.context.checked !== t.context.checked && r("update:modelValue", e.context.checked);
|
|
370
|
+
}
|
|
371
|
+
}), c = i(() => Pe(o.snapshot.value, o.send));
|
|
372
|
+
return p(wn, {
|
|
373
|
+
checked: () => c.value.checked,
|
|
374
|
+
props: () => E(c.value.indicatorProps)
|
|
375
|
+
}), () => s(t, [s(b, {
|
|
376
|
+
...E(c.value.controlProps, e.as),
|
|
377
|
+
...a,
|
|
378
|
+
as: e.as,
|
|
379
|
+
asChild: e.asChild
|
|
380
|
+
}, () => n.default?.({ checked: c.value.checked })), e.name === void 0 ? null : s("input", E(c.value.inputProps(e.name, e.value)))]);
|
|
381
|
+
}
|
|
382
|
+
}), Dn = (e, t, n) => a({
|
|
383
|
+
name: e,
|
|
384
|
+
props: {
|
|
385
|
+
...v,
|
|
386
|
+
as: {
|
|
387
|
+
...v.as,
|
|
388
|
+
default: "span"
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
setup: (e, { slots: r }) => {
|
|
392
|
+
let i = c(t, null);
|
|
393
|
+
return () => i === null || n && i.checked() === !1 ? null : s(b, {
|
|
394
|
+
...i.props(),
|
|
395
|
+
as: e.as,
|
|
396
|
+
asChild: e.asChild
|
|
397
|
+
}, () => r.default?.({ checked: i.checked() }));
|
|
398
|
+
}
|
|
399
|
+
}), On = Dn("CheckboxIndicator", wn, !0), kn = a({
|
|
400
|
+
name: "SwitchRoot",
|
|
401
|
+
inheritAttrs: !1,
|
|
402
|
+
props: {
|
|
403
|
+
...Cn,
|
|
404
|
+
modelValue: {
|
|
405
|
+
type: Boolean,
|
|
406
|
+
default: void 0
|
|
407
|
+
},
|
|
408
|
+
defaultValue: {
|
|
409
|
+
type: Boolean,
|
|
410
|
+
default: !1
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
emits: { "update:modelValue": (e) => typeof e == "boolean" },
|
|
414
|
+
setup: (e, { slots: n, emit: r, attrs: a }) => {
|
|
415
|
+
let o = T(Vt, {
|
|
416
|
+
checked: e.defaultValue,
|
|
417
|
+
disabled: e.disabled,
|
|
418
|
+
readOnly: e.readonly,
|
|
419
|
+
required: e.required
|
|
420
|
+
}, {
|
|
421
|
+
controlled: {
|
|
422
|
+
checked: () => e.modelValue,
|
|
423
|
+
disabled: () => e.disabled,
|
|
424
|
+
readOnly: () => e.readonly,
|
|
425
|
+
required: () => e.required
|
|
426
|
+
},
|
|
427
|
+
onChange: (e, t) => {
|
|
428
|
+
e.context.checked !== t.context.checked && r("update:modelValue", e.context.checked);
|
|
429
|
+
}
|
|
430
|
+
}), c = i(() => Qe(o.snapshot.value, o.send));
|
|
431
|
+
return p(Tn, {
|
|
432
|
+
checked: () => c.value.checked,
|
|
433
|
+
props: () => E(c.value.indicatorProps)
|
|
434
|
+
}), () => s(t, [s(b, {
|
|
435
|
+
...E(c.value.controlProps, e.as),
|
|
436
|
+
...a,
|
|
437
|
+
as: e.as,
|
|
438
|
+
asChild: e.asChild
|
|
439
|
+
}, () => n.default?.({ checked: c.value.checked })), e.name === void 0 ? null : s("input", E(c.value.inputProps(e.name, e.value)))]);
|
|
440
|
+
}
|
|
441
|
+
}), An = Dn("SwitchThumb", Tn, !1), [jn, Mn] = A("TabsRoot"), Nn = (e, t, n) => {
|
|
442
|
+
let r = () => {
|
|
443
|
+
let r = e()?.id;
|
|
444
|
+
r !== void 0 && r !== "" && (t[n()] = r);
|
|
445
|
+
};
|
|
446
|
+
f(r), te(r);
|
|
447
|
+
}, Pn = a({
|
|
448
|
+
name: "TabsRoot",
|
|
449
|
+
props: {
|
|
450
|
+
...v,
|
|
451
|
+
modelValue: {
|
|
452
|
+
type: String,
|
|
453
|
+
default: void 0
|
|
454
|
+
},
|
|
455
|
+
defaultValue: {
|
|
456
|
+
type: String,
|
|
457
|
+
default: void 0
|
|
458
|
+
},
|
|
459
|
+
orientation: {
|
|
460
|
+
type: String,
|
|
461
|
+
default: "horizontal"
|
|
462
|
+
},
|
|
463
|
+
dir: {
|
|
464
|
+
type: String,
|
|
465
|
+
default: "ltr"
|
|
466
|
+
},
|
|
467
|
+
activationMode: {
|
|
468
|
+
type: String,
|
|
469
|
+
default: "automatic"
|
|
470
|
+
},
|
|
471
|
+
loop: {
|
|
472
|
+
type: Boolean,
|
|
473
|
+
default: !0
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
emits: { "update:modelValue": (e) => typeof e == "string" },
|
|
477
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
478
|
+
let r = T(Ut, {
|
|
479
|
+
value: e.defaultValue,
|
|
480
|
+
orientation: e.orientation,
|
|
481
|
+
dir: e.dir,
|
|
482
|
+
loop: e.loop,
|
|
483
|
+
activationMode: e.activationMode
|
|
484
|
+
}, {
|
|
485
|
+
controlled: {
|
|
486
|
+
value: () => e.modelValue,
|
|
487
|
+
orientation: () => e.orientation,
|
|
488
|
+
dir: () => e.dir,
|
|
489
|
+
loop: () => e.loop,
|
|
490
|
+
activationMode: () => e.activationMode
|
|
491
|
+
},
|
|
492
|
+
onChange: (e, n) => {
|
|
493
|
+
e.context.value !== n.context.value && e.context.value !== void 0 && t("update:modelValue", e.context.value);
|
|
494
|
+
}
|
|
495
|
+
}), a = h([]), o = g(), c = ne({
|
|
496
|
+
triggers: {},
|
|
497
|
+
panels: {}
|
|
498
|
+
}), l = (e) => Ht(o, e), u = (e) => ({
|
|
499
|
+
trigger: c.triggers[e] ?? l(e).trigger,
|
|
500
|
+
content: c.panels[e] ?? l(e).content
|
|
501
|
+
}), d = () => a.value.map((e) => ({
|
|
502
|
+
value: e.value(),
|
|
503
|
+
disabled: e.disabled(),
|
|
504
|
+
id: u(e.value()).trigger
|
|
505
|
+
})), f = i(() => $e(r.snapshot.value, r.send, {
|
|
506
|
+
tabs: d,
|
|
507
|
+
ids: u
|
|
508
|
+
}, r.query));
|
|
509
|
+
return jn({
|
|
510
|
+
api: f,
|
|
511
|
+
register: (e) => (a.value = [...a.value, e], () => {
|
|
512
|
+
a.value = a.value.filter((t) => t !== e);
|
|
513
|
+
}),
|
|
514
|
+
generated: l,
|
|
515
|
+
actualIds: c
|
|
516
|
+
}), () => s(b, {
|
|
517
|
+
...E(f.value.rootProps),
|
|
518
|
+
as: e.as,
|
|
519
|
+
asChild: e.asChild
|
|
520
|
+
}, () => n.default?.({ value: f.value.selected }));
|
|
521
|
+
}
|
|
522
|
+
}), Fn = a({
|
|
523
|
+
name: "TabsList",
|
|
524
|
+
props: v,
|
|
525
|
+
setup: (e, { slots: t }) => {
|
|
526
|
+
let n = Mn("TabsList");
|
|
527
|
+
return () => s(b, {
|
|
528
|
+
...E(n.api.value.listProps),
|
|
529
|
+
as: e.as,
|
|
530
|
+
asChild: e.asChild
|
|
531
|
+
}, t);
|
|
532
|
+
}
|
|
533
|
+
}), In = a({
|
|
534
|
+
name: "TabsTrigger",
|
|
535
|
+
props: {
|
|
536
|
+
...y,
|
|
537
|
+
value: {
|
|
538
|
+
type: String,
|
|
539
|
+
required: !0
|
|
540
|
+
},
|
|
541
|
+
disabled: {
|
|
542
|
+
type: Boolean,
|
|
543
|
+
default: !1
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
setup: (e, { slots: t }) => {
|
|
547
|
+
let n = Mn("TabsTrigger"), r = m(null), i = () => C(r);
|
|
548
|
+
return d(n.register({
|
|
549
|
+
value: () => e.value,
|
|
550
|
+
disabled: () => e.disabled,
|
|
551
|
+
element: i
|
|
552
|
+
})), Nn(i, n.actualIds.triggers, () => e.value), () => s(b, {
|
|
553
|
+
...E(n.api.value.triggerProps({
|
|
554
|
+
value: e.value,
|
|
555
|
+
disabled: e.disabled
|
|
556
|
+
}, n.generated(e.value)), e.as),
|
|
557
|
+
ref: r,
|
|
558
|
+
as: e.as,
|
|
559
|
+
asChild: e.asChild
|
|
560
|
+
}, t);
|
|
561
|
+
}
|
|
562
|
+
}), Ln = a({
|
|
563
|
+
name: "TabsContent",
|
|
564
|
+
props: {
|
|
565
|
+
...v,
|
|
566
|
+
value: {
|
|
567
|
+
type: String,
|
|
568
|
+
required: !0
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
setup: (e, { slots: t }) => {
|
|
572
|
+
let n = Mn("TabsContent"), r = m(null);
|
|
573
|
+
return Nn(() => C(r), n.actualIds.panels, () => e.value), () => s(b, {
|
|
574
|
+
...E(n.api.value.contentProps(e.value, n.generated(e.value))),
|
|
575
|
+
ref: r,
|
|
576
|
+
as: e.as,
|
|
577
|
+
asChild: e.asChild
|
|
578
|
+
}, t);
|
|
579
|
+
}
|
|
580
|
+
}), Rn = (e) => e.type === "DISMISS", zn = () => {
|
|
581
|
+
let e = () => void 0;
|
|
582
|
+
return {
|
|
583
|
+
filter: (t) => !Rn(t) || !(t.native instanceof Event) || (e(t.reason, t.native), !t.native.defaultPrevented && (t.reason === "escape" && t.native.preventDefault(), !0)),
|
|
584
|
+
listen: (t) => {
|
|
585
|
+
e = t;
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
}, Bn = (e) => e === "escape" ? "escapeKeyDown" : e === "pointer-outside" ? "pointerDownOutside" : "focusOutside", [Vn, j] = A("DialogRoot"), Hn = (e, t) => (n) => e({ ids: {
|
|
589
|
+
...t().ids,
|
|
590
|
+
...n
|
|
591
|
+
} }), Un = a({
|
|
592
|
+
name: "DialogRoot",
|
|
593
|
+
props: {
|
|
594
|
+
open: {
|
|
595
|
+
type: Boolean,
|
|
596
|
+
default: void 0
|
|
597
|
+
},
|
|
598
|
+
defaultOpen: {
|
|
599
|
+
type: Boolean,
|
|
600
|
+
default: !1
|
|
601
|
+
},
|
|
602
|
+
modal: {
|
|
603
|
+
type: Boolean,
|
|
604
|
+
default: !0
|
|
605
|
+
},
|
|
606
|
+
role: {
|
|
607
|
+
type: String,
|
|
608
|
+
default: "dialog"
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
emits: {
|
|
612
|
+
"update:open": (e) => typeof e == "boolean",
|
|
613
|
+
dismiss: (e) => typeof e == "string"
|
|
614
|
+
},
|
|
615
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
616
|
+
let r = zn(), a = T(dt, {
|
|
617
|
+
open: e.defaultOpen,
|
|
618
|
+
modal: e.modal,
|
|
619
|
+
role: e.role,
|
|
620
|
+
closeOnEscape: !0,
|
|
621
|
+
closeOnOutside: !0,
|
|
622
|
+
hasTitle: !1,
|
|
623
|
+
hasDescription: !1,
|
|
624
|
+
closedBy: null,
|
|
625
|
+
ids: ut(g())
|
|
626
|
+
}, {
|
|
627
|
+
controlled: {
|
|
628
|
+
open: () => e.open,
|
|
629
|
+
modal: () => e.modal,
|
|
630
|
+
role: () => e.role
|
|
631
|
+
},
|
|
632
|
+
beforeSend: r.filter,
|
|
633
|
+
onChange: (e, n) => {
|
|
634
|
+
e.context.open !== n.context.open && (!e.context.open && e.context.closedBy !== null && t("dismiss", e.context.closedBy), t("update:open", e.context.open));
|
|
635
|
+
}
|
|
636
|
+
}), o = i(() => Le(a.snapshot.value, a.send));
|
|
637
|
+
return Vn({
|
|
638
|
+
api: o,
|
|
639
|
+
context: () => a.snapshot.value.context,
|
|
640
|
+
sync: a.sync,
|
|
641
|
+
refresh: a.refresh,
|
|
642
|
+
dismiss: r
|
|
643
|
+
}), () => n.default?.({
|
|
644
|
+
open: o.value.open,
|
|
645
|
+
close: o.value.close
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
}), Wn = a({
|
|
649
|
+
name: "DialogTrigger",
|
|
650
|
+
props: y,
|
|
651
|
+
setup: (e, { slots: t }) => {
|
|
652
|
+
let n = j("DialogTrigger"), r = m(null);
|
|
653
|
+
return w(r, () => n.context().ids.trigger, (e) => Hn(n.sync, n.context)({ trigger: e })), () => s(b, {
|
|
654
|
+
...E(n.api.value.triggerProps, e.as),
|
|
655
|
+
ref: r,
|
|
656
|
+
as: e.as,
|
|
657
|
+
asChild: e.asChild
|
|
658
|
+
}, t);
|
|
659
|
+
}
|
|
660
|
+
}), Gn = x, Kn = a({
|
|
661
|
+
name: "DialogOverlay",
|
|
662
|
+
props: v,
|
|
663
|
+
setup: (e, { slots: t }) => {
|
|
664
|
+
let n = j("DialogOverlay"), r = m(null), i = k(() => n.api.value.open, () => C(r));
|
|
665
|
+
return () => i.value && n.context().modal ? s(b, {
|
|
666
|
+
...E(n.api.value.overlayProps),
|
|
667
|
+
ref: r,
|
|
668
|
+
as: e.as,
|
|
669
|
+
asChild: e.asChild,
|
|
670
|
+
onVnodeMounted: n.refresh
|
|
671
|
+
}, t) : null;
|
|
672
|
+
}
|
|
673
|
+
}), qn = a({
|
|
674
|
+
name: "DialogContent",
|
|
675
|
+
props: {
|
|
676
|
+
...v,
|
|
677
|
+
closeOnEscape: {
|
|
678
|
+
type: Boolean,
|
|
679
|
+
default: !0
|
|
680
|
+
},
|
|
681
|
+
closeOnOutside: {
|
|
682
|
+
type: Boolean,
|
|
683
|
+
default: !0
|
|
684
|
+
}
|
|
685
|
+
},
|
|
686
|
+
emits: [
|
|
687
|
+
"escapeKeyDown",
|
|
688
|
+
"pointerDownOutside",
|
|
689
|
+
"focusOutside"
|
|
690
|
+
],
|
|
691
|
+
setup: (e, { slots: t, emit: n }) => {
|
|
692
|
+
let r = j("DialogContent"), i = m(null), a = k(() => r.api.value.open, () => C(i));
|
|
693
|
+
return w(i, () => r.context().ids.content, (e) => Hn(r.sync, r.context)({ content: e })), r.sync({
|
|
694
|
+
closeOnEscape: e.closeOnEscape,
|
|
695
|
+
closeOnOutside: e.closeOnOutside
|
|
696
|
+
}), r.dismiss.listen((e, t) => n(Bn(e), t)), () => a.value ? s(b, {
|
|
697
|
+
...E(r.api.value.contentProps),
|
|
698
|
+
ref: i,
|
|
699
|
+
as: e.as,
|
|
700
|
+
asChild: e.asChild,
|
|
701
|
+
onVnodeMounted: r.refresh
|
|
702
|
+
}, t) : null;
|
|
703
|
+
}
|
|
704
|
+
}), Jn = (e, t, n, r) => a({
|
|
705
|
+
name: e,
|
|
706
|
+
props: {
|
|
707
|
+
...v,
|
|
708
|
+
as: {
|
|
709
|
+
...v.as,
|
|
710
|
+
default: t
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
setup: (t, { slots: i }) => {
|
|
714
|
+
let a = j(e), o = m(null);
|
|
715
|
+
w(o, () => a.context().ids[r], (e) => Hn(a.sync, a.context)({ [r]: e })), f(() => a.sync({ [n]: !0 })), d(() => a.sync({ [n]: !1 }));
|
|
716
|
+
let c = () => E(r === "title" ? a.api.value.titleProps : a.api.value.descriptionProps);
|
|
717
|
+
return () => s(b, {
|
|
718
|
+
...c(),
|
|
719
|
+
ref: o,
|
|
720
|
+
as: t.as,
|
|
721
|
+
asChild: t.asChild
|
|
722
|
+
}, i);
|
|
723
|
+
}
|
|
724
|
+
}), Yn = Jn("DialogTitle", "h2", "hasTitle", "title"), Xn = Jn("DialogDescription", "p", "hasDescription", "description"), Zn = a({
|
|
725
|
+
name: "DialogClose",
|
|
726
|
+
props: y,
|
|
727
|
+
setup: (e, { slots: t }) => {
|
|
728
|
+
let n = j("DialogClose");
|
|
729
|
+
return () => s(b, {
|
|
730
|
+
...E(n.api.value.closeProps, e.as),
|
|
731
|
+
as: e.as,
|
|
732
|
+
asChild: e.asChild
|
|
733
|
+
}, t);
|
|
734
|
+
}
|
|
735
|
+
}), M = (e, t, n) => {
|
|
736
|
+
let r = c(e, null);
|
|
737
|
+
if (r === null) throw Error(`[lovince-ui] <${t}> must be placed inside <${n}>.`);
|
|
738
|
+
return r;
|
|
739
|
+
}, Qn = Ee, $n = ht, [er, N] = A("PopoverRoot"), P = (e, t) => e.sync({ ids: {
|
|
740
|
+
...e.context().ids,
|
|
741
|
+
...t
|
|
742
|
+
} }), tr = a({
|
|
743
|
+
name: "PopoverRoot",
|
|
744
|
+
props: {
|
|
745
|
+
open: {
|
|
746
|
+
type: Boolean,
|
|
747
|
+
default: void 0
|
|
748
|
+
},
|
|
749
|
+
defaultOpen: {
|
|
750
|
+
type: Boolean,
|
|
751
|
+
default: !1
|
|
752
|
+
},
|
|
753
|
+
modal: {
|
|
754
|
+
type: Boolean,
|
|
755
|
+
default: !1
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
emits: { "update:open": (e) => typeof e == "boolean" },
|
|
759
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
760
|
+
let r = g(), a = zn(), o = T(Ot, {
|
|
761
|
+
open: e.defaultOpen,
|
|
762
|
+
modal: e.modal,
|
|
763
|
+
placement: he,
|
|
764
|
+
position: null,
|
|
765
|
+
anchorWidth: 0,
|
|
766
|
+
ids: {
|
|
767
|
+
trigger: `${r}-trigger`,
|
|
768
|
+
content: `${r}-popover`,
|
|
769
|
+
anchor: null
|
|
770
|
+
}
|
|
771
|
+
}, {
|
|
772
|
+
controlled: {
|
|
773
|
+
open: () => e.open,
|
|
774
|
+
modal: () => e.modal
|
|
775
|
+
},
|
|
776
|
+
beforeSend: a.filter,
|
|
777
|
+
onChange: (e, n) => {
|
|
778
|
+
e.context.open !== n.context.open && t("update:open", e.context.open);
|
|
779
|
+
}
|
|
780
|
+
}), s = i(() => Ge(o.snapshot.value, o.send));
|
|
781
|
+
return er({
|
|
782
|
+
api: s,
|
|
783
|
+
context: () => o.snapshot.value.context,
|
|
784
|
+
sync: o.sync,
|
|
785
|
+
refresh: o.refresh,
|
|
786
|
+
dismiss: a
|
|
787
|
+
}), () => n.default?.({
|
|
788
|
+
open: s.value.open,
|
|
789
|
+
close: s.value.close
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
}), nr = a({
|
|
793
|
+
name: "PopoverTrigger",
|
|
794
|
+
props: y,
|
|
795
|
+
setup: (e, { slots: t }) => {
|
|
796
|
+
let n = N("PopoverTrigger"), r = m(null);
|
|
797
|
+
return w(r, () => n.context().ids.trigger, (e) => P(n, { trigger: e })), () => s(b, {
|
|
798
|
+
...E(n.api.value.triggerProps, e.as),
|
|
799
|
+
ref: r,
|
|
800
|
+
as: e.as,
|
|
801
|
+
asChild: e.asChild
|
|
802
|
+
}, t);
|
|
803
|
+
}
|
|
804
|
+
}), rr = a({
|
|
805
|
+
name: "PopoverAnchor",
|
|
806
|
+
props: v,
|
|
807
|
+
setup: (e, { slots: t }) => {
|
|
808
|
+
let n = N("PopoverAnchor"), r = m(null);
|
|
809
|
+
return P(n, { anchor: `${g()}-anchor` }), w(r, () => n.context().ids.anchor ?? "", (e) => P(n, { anchor: e })), () => s(b, {
|
|
810
|
+
...E(n.api.value.anchorProps),
|
|
811
|
+
ref: r,
|
|
812
|
+
as: e.as,
|
|
813
|
+
asChild: e.asChild
|
|
814
|
+
}, t);
|
|
815
|
+
}
|
|
816
|
+
}), ir = x, ar = a({
|
|
817
|
+
name: "PopoverContent",
|
|
818
|
+
props: {
|
|
819
|
+
...v,
|
|
820
|
+
...O
|
|
821
|
+
},
|
|
822
|
+
emits: [
|
|
823
|
+
"escapeKeyDown",
|
|
824
|
+
"pointerDownOutside",
|
|
825
|
+
"focusOutside"
|
|
826
|
+
],
|
|
827
|
+
setup: (e, { slots: t, emit: n }) => {
|
|
828
|
+
let r = N("PopoverContent"), i = m(null), a = k(() => r.api.value.open, () => C(i));
|
|
829
|
+
return w(i, () => r.context().ids.content, (e) => P(r, { content: e })), r.dismiss.listen((e, t) => n(Bn(e), t)), _(() => ({
|
|
830
|
+
side: e.side,
|
|
831
|
+
align: e.align,
|
|
832
|
+
sideOffset: e.sideOffset,
|
|
833
|
+
collisionPadding: e.collisionPadding,
|
|
834
|
+
avoidCollisions: e.avoidCollisions
|
|
835
|
+
}), (e) => r.sync({ placement: e }), { immediate: !0 }), () => a.value ? s(b, {
|
|
836
|
+
...E(r.api.value.contentProps),
|
|
837
|
+
ref: i,
|
|
838
|
+
as: e.as,
|
|
839
|
+
asChild: e.asChild,
|
|
840
|
+
onVnodeMounted: r.refresh
|
|
841
|
+
}, t) : null;
|
|
842
|
+
}
|
|
843
|
+
}), or = a({
|
|
844
|
+
name: "PopoverClose",
|
|
845
|
+
props: y,
|
|
846
|
+
setup: (e, { slots: t }) => {
|
|
847
|
+
let n = N("PopoverClose");
|
|
848
|
+
return () => s(b, {
|
|
849
|
+
...E(n.api.value.closeProps, e.as),
|
|
850
|
+
as: e.as,
|
|
851
|
+
asChild: e.asChild
|
|
852
|
+
}, t);
|
|
853
|
+
}
|
|
854
|
+
}), sr = (e) => ({
|
|
855
|
+
side: e.side,
|
|
856
|
+
align: e.align,
|
|
857
|
+
sideOffset: e.sideOffset,
|
|
858
|
+
collisionPadding: e.collisionPadding,
|
|
859
|
+
avoidCollisions: e.avoidCollisions
|
|
860
|
+
}), cr = (e, t) => {
|
|
861
|
+
let n = Symbol(`${e}Root`), r = e === "Tooltip" ? it : Be;
|
|
862
|
+
return {
|
|
863
|
+
Root: a({
|
|
864
|
+
name: `${e}Root`,
|
|
865
|
+
props: {
|
|
866
|
+
open: {
|
|
867
|
+
type: Boolean,
|
|
868
|
+
default: void 0
|
|
869
|
+
},
|
|
870
|
+
defaultOpen: {
|
|
871
|
+
type: Boolean,
|
|
872
|
+
default: !1
|
|
873
|
+
},
|
|
874
|
+
delayDuration: {
|
|
875
|
+
type: Number,
|
|
876
|
+
default: void 0
|
|
877
|
+
},
|
|
878
|
+
openDelay: {
|
|
879
|
+
type: Number,
|
|
880
|
+
default: void 0
|
|
881
|
+
},
|
|
882
|
+
closeDelay: {
|
|
883
|
+
type: Number,
|
|
884
|
+
default: t.closeDelay
|
|
885
|
+
},
|
|
886
|
+
disabled: {
|
|
887
|
+
type: Boolean,
|
|
888
|
+
default: !1
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
emits: { "update:open": (e) => typeof e == "boolean" },
|
|
892
|
+
setup: (e, { emit: a, slots: o }) => {
|
|
893
|
+
let s = g(), c = () => e.delayDuration ?? e.openDelay ?? t.openDelay, l = T(_t, {
|
|
894
|
+
open: e.defaultOpen,
|
|
895
|
+
openDelay: c(),
|
|
896
|
+
closeDelay: e.closeDelay,
|
|
897
|
+
disabled: e.disabled,
|
|
898
|
+
placement: {
|
|
899
|
+
...he,
|
|
900
|
+
side: t.side
|
|
901
|
+
},
|
|
902
|
+
position: null,
|
|
903
|
+
anchorWidth: 0,
|
|
904
|
+
ids: {
|
|
905
|
+
trigger: `${s}-trigger`,
|
|
906
|
+
content: `${s}-content`
|
|
907
|
+
}
|
|
908
|
+
}, {
|
|
909
|
+
controlled: {
|
|
910
|
+
open: () => e.open,
|
|
911
|
+
openDelay: c,
|
|
912
|
+
closeDelay: () => e.closeDelay,
|
|
913
|
+
disabled: () => e.disabled
|
|
914
|
+
},
|
|
915
|
+
onChange: (e, t) => {
|
|
916
|
+
e.context.open !== t.context.open && a("update:open", e.context.open);
|
|
917
|
+
}
|
|
918
|
+
}), u = i(() => r(l.snapshot.value, l.send));
|
|
919
|
+
return p(n, {
|
|
920
|
+
api: u,
|
|
921
|
+
machine: l
|
|
922
|
+
}), () => o.default?.({ open: u.value.open });
|
|
923
|
+
}
|
|
924
|
+
}),
|
|
925
|
+
Trigger: a({
|
|
926
|
+
name: `${e}Trigger`,
|
|
927
|
+
props: {
|
|
928
|
+
...y,
|
|
929
|
+
as: {
|
|
930
|
+
...y.as,
|
|
931
|
+
default: t.trigger
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
setup: (t, { slots: r }) => {
|
|
935
|
+
let i = M(n, `${e}Trigger`, `${e}Root`), a = m(null), o = () => i.machine.snapshot.value.context.ids;
|
|
936
|
+
return w(a, () => o().trigger, (e) => i.machine.sync({ ids: {
|
|
937
|
+
...o(),
|
|
938
|
+
trigger: e
|
|
939
|
+
} })), () => s(b, {
|
|
940
|
+
...E(i.api.value.triggerProps, t.as),
|
|
941
|
+
ref: a,
|
|
942
|
+
as: t.as,
|
|
943
|
+
asChild: t.asChild
|
|
944
|
+
}, r);
|
|
945
|
+
}
|
|
946
|
+
}),
|
|
947
|
+
Content: a({
|
|
948
|
+
name: `${e}Content`,
|
|
949
|
+
props: {
|
|
950
|
+
...v,
|
|
951
|
+
...O,
|
|
952
|
+
side: {
|
|
953
|
+
...O.side,
|
|
954
|
+
default: t.side
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
setup: (t, { slots: r }) => {
|
|
958
|
+
let i = M(n, `${e}Content`, `${e}Root`), a = m(null), o = k(() => i.api.value.open, () => C(a)), c = () => i.machine.snapshot.value.context.ids;
|
|
959
|
+
return w(a, () => c().content, (e) => i.machine.sync({ ids: {
|
|
960
|
+
...c(),
|
|
961
|
+
content: e
|
|
962
|
+
} })), _(() => sr(t), (e) => i.machine.sync({ placement: e }), {
|
|
963
|
+
immediate: !0,
|
|
964
|
+
deep: !0
|
|
965
|
+
}), () => o.value ? s(b, {
|
|
966
|
+
...E(i.api.value.contentProps),
|
|
967
|
+
ref: a,
|
|
968
|
+
as: t.as,
|
|
969
|
+
asChild: t.asChild,
|
|
970
|
+
onVnodeMounted: i.machine.refresh
|
|
971
|
+
}, r) : null;
|
|
972
|
+
}
|
|
973
|
+
})
|
|
974
|
+
};
|
|
975
|
+
}, lr = cr("Tooltip", {
|
|
976
|
+
openDelay: 400,
|
|
977
|
+
closeDelay: 120,
|
|
978
|
+
side: "top",
|
|
979
|
+
trigger: "button"
|
|
980
|
+
}), ur = lr.Root, dr = lr.Trigger, fr = x, pr = lr.Content, mr = cr("HoverCard", {
|
|
981
|
+
openDelay: 500,
|
|
982
|
+
closeDelay: 300,
|
|
983
|
+
side: "bottom",
|
|
984
|
+
trigger: "a"
|
|
985
|
+
}), hr = mr.Root, gr = mr.Trigger, _r = x, vr = mr.Content, [yr, F] = A("DropdownMenuRoot"), br = a({
|
|
986
|
+
name: "DropdownMenuRoot",
|
|
987
|
+
props: {
|
|
988
|
+
open: {
|
|
989
|
+
type: Boolean,
|
|
990
|
+
default: void 0
|
|
991
|
+
},
|
|
992
|
+
defaultOpen: {
|
|
993
|
+
type: Boolean,
|
|
994
|
+
default: !1
|
|
995
|
+
},
|
|
996
|
+
loop: {
|
|
997
|
+
type: Boolean,
|
|
998
|
+
default: !0
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
emits: { "update:open": (e) => typeof e == "boolean" },
|
|
1002
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
1003
|
+
let r = m(null), a = D(r), o = a.itemAttrs["data-lovince-item"] ?? "", s = T(xt, bt(g(), o, e.defaultOpen, e.loop), {
|
|
1004
|
+
controlled: {
|
|
1005
|
+
open: () => e.open,
|
|
1006
|
+
loop: () => e.loop
|
|
1007
|
+
},
|
|
1008
|
+
onChange: (e, n) => {
|
|
1009
|
+
e.context.open !== n.context.open && t("update:open", e.context.open);
|
|
1010
|
+
}
|
|
1011
|
+
}), c = i(() => Ve(s.snapshot.value, s.send, a, s.query));
|
|
1012
|
+
return yr({
|
|
1013
|
+
api: c,
|
|
1014
|
+
context: () => s.snapshot.value.context,
|
|
1015
|
+
sync: s.sync,
|
|
1016
|
+
refresh: s.refresh,
|
|
1017
|
+
list: a,
|
|
1018
|
+
content: r
|
|
1019
|
+
}), () => n.default?.({ open: c.value.open });
|
|
1020
|
+
}
|
|
1021
|
+
}), xr = (e, t) => e.sync({ ids: {
|
|
1022
|
+
...e.context().ids,
|
|
1023
|
+
...t
|
|
1024
|
+
} }), Sr = a({
|
|
1025
|
+
name: "DropdownMenuTrigger",
|
|
1026
|
+
props: {
|
|
1027
|
+
...y,
|
|
1028
|
+
disabled: {
|
|
1029
|
+
type: Boolean,
|
|
1030
|
+
default: !1
|
|
1031
|
+
}
|
|
1032
|
+
},
|
|
1033
|
+
setup: (e, { slots: t }) => {
|
|
1034
|
+
let n = F("DropdownMenuTrigger"), r = m(null);
|
|
1035
|
+
return w(r, () => n.context().ids.trigger, (e) => xr(n, { trigger: e })), () => s(b, {
|
|
1036
|
+
...E(n.api.value.triggerProps(e.disabled), e.as),
|
|
1037
|
+
ref: r,
|
|
1038
|
+
as: e.as,
|
|
1039
|
+
asChild: e.asChild
|
|
1040
|
+
}, t);
|
|
1041
|
+
}
|
|
1042
|
+
}), Cr = x, wr = a({
|
|
1043
|
+
name: "DropdownMenuContent",
|
|
1044
|
+
props: {
|
|
1045
|
+
...v,
|
|
1046
|
+
...O,
|
|
1047
|
+
align: {
|
|
1048
|
+
...O.align,
|
|
1049
|
+
default: "start"
|
|
1050
|
+
}
|
|
1051
|
+
},
|
|
1052
|
+
setup: (e, { slots: t }) => {
|
|
1053
|
+
let n = F("DropdownMenuContent"), r = k(() => n.api.value.open, () => C(n.content));
|
|
1054
|
+
return w(n.content, () => n.context().ids.content, (e) => xr(n, { content: e })), _(() => ({
|
|
1055
|
+
side: e.side,
|
|
1056
|
+
align: e.align,
|
|
1057
|
+
sideOffset: e.sideOffset,
|
|
1058
|
+
collisionPadding: e.collisionPadding,
|
|
1059
|
+
avoidCollisions: e.avoidCollisions
|
|
1060
|
+
}), (e) => n.sync({ placement: e }), { immediate: !0 }), () => r.value ? s(b, {
|
|
1061
|
+
...E(n.api.value.contentProps),
|
|
1062
|
+
ref: n.content,
|
|
1063
|
+
as: e.as,
|
|
1064
|
+
asChild: e.asChild,
|
|
1065
|
+
onVnodeMounted: n.refresh
|
|
1066
|
+
}, t) : null;
|
|
1067
|
+
}
|
|
1068
|
+
}), I = Symbol("MenuItemChecked"), Tr = (e, t, n, r) => {
|
|
1069
|
+
let a = F(e);
|
|
1070
|
+
a.list.track();
|
|
1071
|
+
let o = g();
|
|
1072
|
+
return i(() => ({
|
|
1073
|
+
...a.list.itemAttrs,
|
|
1074
|
+
...E(a.api.value.itemProps({
|
|
1075
|
+
id: o,
|
|
1076
|
+
disabled: t(),
|
|
1077
|
+
onSelect: (e) => {
|
|
1078
|
+
let t = new CustomEvent("lovince.select", {
|
|
1079
|
+
cancelable: !0,
|
|
1080
|
+
detail: { originalEvent: e }
|
|
1081
|
+
});
|
|
1082
|
+
r?.(), n(t), t.defaultPrevented || a.api.value.close();
|
|
1083
|
+
}
|
|
1084
|
+
}))
|
|
1085
|
+
}));
|
|
1086
|
+
}, Er = a({
|
|
1087
|
+
name: "DropdownMenuItem",
|
|
1088
|
+
props: {
|
|
1089
|
+
...v,
|
|
1090
|
+
disabled: {
|
|
1091
|
+
type: Boolean,
|
|
1092
|
+
default: !1
|
|
1093
|
+
}
|
|
1094
|
+
},
|
|
1095
|
+
emits: { select: (e) => e instanceof CustomEvent },
|
|
1096
|
+
setup: (e, { slots: t, emit: n }) => {
|
|
1097
|
+
let r = Tr("DropdownMenuItem", () => e.disabled, (e) => n("select", e));
|
|
1098
|
+
return () => s(b, {
|
|
1099
|
+
...r.value,
|
|
1100
|
+
as: e.as,
|
|
1101
|
+
asChild: e.asChild,
|
|
1102
|
+
role: "menuitem"
|
|
1103
|
+
}, t);
|
|
1104
|
+
}
|
|
1105
|
+
}), Dr = a({
|
|
1106
|
+
name: "DropdownMenuCheckboxItem",
|
|
1107
|
+
props: {
|
|
1108
|
+
...v,
|
|
1109
|
+
disabled: {
|
|
1110
|
+
type: Boolean,
|
|
1111
|
+
default: !1
|
|
1112
|
+
},
|
|
1113
|
+
modelValue: {
|
|
1114
|
+
type: [Boolean, String],
|
|
1115
|
+
default: void 0
|
|
1116
|
+
},
|
|
1117
|
+
defaultValue: {
|
|
1118
|
+
type: [Boolean, String],
|
|
1119
|
+
default: !1
|
|
1120
|
+
}
|
|
1121
|
+
},
|
|
1122
|
+
emits: {
|
|
1123
|
+
select: (e) => e instanceof CustomEvent,
|
|
1124
|
+
"update:modelValue": (e) => e !== void 0
|
|
1125
|
+
},
|
|
1126
|
+
setup: (e, { slots: t, emit: n }) => {
|
|
1127
|
+
let r = T(Te, {
|
|
1128
|
+
checked: e.defaultValue,
|
|
1129
|
+
disabled: e.disabled,
|
|
1130
|
+
readOnly: !1,
|
|
1131
|
+
required: !1
|
|
1132
|
+
}, {
|
|
1133
|
+
controlled: {
|
|
1134
|
+
checked: () => e.modelValue,
|
|
1135
|
+
disabled: () => e.disabled
|
|
1136
|
+
},
|
|
1137
|
+
onChange: (e, t) => {
|
|
1138
|
+
e.context.checked !== t.context.checked && n("update:modelValue", e.context.checked);
|
|
1139
|
+
}
|
|
1140
|
+
}), i = () => r.snapshot.value.context.checked;
|
|
1141
|
+
p(I, i);
|
|
1142
|
+
let a = Tr("DropdownMenuCheckboxItem", () => e.disabled, (e) => n("select", e), () => r.send({ type: "TOGGLE" }));
|
|
1143
|
+
return () => s(b, {
|
|
1144
|
+
...a.value,
|
|
1145
|
+
as: e.as,
|
|
1146
|
+
asChild: e.asChild,
|
|
1147
|
+
role: "menuitemcheckbox",
|
|
1148
|
+
"aria-checked": be(i()),
|
|
1149
|
+
"data-state": Qn(i())
|
|
1150
|
+
}, t);
|
|
1151
|
+
}
|
|
1152
|
+
}), Or = Symbol("DropdownMenuRadioGroup"), kr = a({
|
|
1153
|
+
name: "DropdownMenuRadioGroup",
|
|
1154
|
+
props: {
|
|
1155
|
+
...v,
|
|
1156
|
+
modelValue: {
|
|
1157
|
+
type: String,
|
|
1158
|
+
default: void 0
|
|
1159
|
+
},
|
|
1160
|
+
defaultValue: {
|
|
1161
|
+
type: String,
|
|
1162
|
+
default: void 0
|
|
1163
|
+
}
|
|
1164
|
+
},
|
|
1165
|
+
emits: { "update:modelValue": (e) => e === void 0 || typeof e == "string" },
|
|
1166
|
+
setup: (e, { slots: t, emit: n }) => {
|
|
1167
|
+
let r = T($t, { value: e.defaultValue }, {
|
|
1168
|
+
controlled: { value: () => e.modelValue },
|
|
1169
|
+
onChange: (e, t) => {
|
|
1170
|
+
e.context.value !== t.context.value && n("update:modelValue", e.context.value);
|
|
1171
|
+
}
|
|
1172
|
+
});
|
|
1173
|
+
return p(Or, {
|
|
1174
|
+
value: () => r.snapshot.value.context.value,
|
|
1175
|
+
set: (e) => r.send({
|
|
1176
|
+
type: "SET",
|
|
1177
|
+
value: e
|
|
1178
|
+
})
|
|
1179
|
+
}), () => s(b, {
|
|
1180
|
+
as: e.as,
|
|
1181
|
+
asChild: e.asChild,
|
|
1182
|
+
role: "group"
|
|
1183
|
+
}, t);
|
|
1184
|
+
}
|
|
1185
|
+
}), Ar = a({
|
|
1186
|
+
name: "DropdownMenuRadioItem",
|
|
1187
|
+
props: {
|
|
1188
|
+
...v,
|
|
1189
|
+
value: {
|
|
1190
|
+
type: String,
|
|
1191
|
+
required: !0
|
|
1192
|
+
},
|
|
1193
|
+
disabled: {
|
|
1194
|
+
type: Boolean,
|
|
1195
|
+
default: !1
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
emits: { select: (e) => e instanceof CustomEvent },
|
|
1199
|
+
setup: (e, { slots: t, emit: n }) => {
|
|
1200
|
+
let r = M(Or, "DropdownMenuRadioItem", "DropdownMenuRadioGroup"), i = () => r.value() === e.value;
|
|
1201
|
+
p(I, i);
|
|
1202
|
+
let a = Tr("DropdownMenuRadioItem", () => e.disabled, (e) => n("select", e), () => r.set(e.value));
|
|
1203
|
+
return () => s(b, {
|
|
1204
|
+
...a.value,
|
|
1205
|
+
as: e.as,
|
|
1206
|
+
asChild: e.asChild,
|
|
1207
|
+
role: "menuitemradio",
|
|
1208
|
+
"aria-checked": be(i()),
|
|
1209
|
+
"data-state": Qn(i())
|
|
1210
|
+
}, t);
|
|
1211
|
+
}
|
|
1212
|
+
}), jr = a({
|
|
1213
|
+
name: "DropdownMenuItemIndicator",
|
|
1214
|
+
props: {
|
|
1215
|
+
...v,
|
|
1216
|
+
as: {
|
|
1217
|
+
...v.as,
|
|
1218
|
+
default: "span"
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
setup: (e, { slots: t }) => {
|
|
1222
|
+
let n = c(I, () => !1);
|
|
1223
|
+
return () => n() === !1 ? null : s(b, {
|
|
1224
|
+
as: e.as,
|
|
1225
|
+
asChild: e.asChild,
|
|
1226
|
+
"data-state": Qn(n()),
|
|
1227
|
+
"aria-hidden": "true"
|
|
1228
|
+
}, t);
|
|
1229
|
+
}
|
|
1230
|
+
}), Mr = a({
|
|
1231
|
+
name: "DropdownMenuLabel",
|
|
1232
|
+
props: v,
|
|
1233
|
+
setup: (e, { slots: t }) => () => s(b, {
|
|
1234
|
+
as: e.as,
|
|
1235
|
+
asChild: e.asChild
|
|
1236
|
+
}, t)
|
|
1237
|
+
}), Nr = a({
|
|
1238
|
+
name: "DropdownMenuGroup",
|
|
1239
|
+
props: v,
|
|
1240
|
+
setup: (e, { slots: t }) => () => s(b, {
|
|
1241
|
+
as: e.as,
|
|
1242
|
+
asChild: e.asChild,
|
|
1243
|
+
role: "group"
|
|
1244
|
+
}, t)
|
|
1245
|
+
}), Pr = a({
|
|
1246
|
+
name: "DropdownMenuSeparator",
|
|
1247
|
+
props: v,
|
|
1248
|
+
setup: (e) => () => s(b, {
|
|
1249
|
+
as: e.as,
|
|
1250
|
+
asChild: e.asChild,
|
|
1251
|
+
role: "separator",
|
|
1252
|
+
"aria-orientation": "horizontal"
|
|
1253
|
+
})
|
|
1254
|
+
}), Fr = a({
|
|
1255
|
+
name: "ContextMenuTrigger",
|
|
1256
|
+
props: {
|
|
1257
|
+
...v,
|
|
1258
|
+
disabled: {
|
|
1259
|
+
type: Boolean,
|
|
1260
|
+
default: !1
|
|
1261
|
+
}
|
|
1262
|
+
},
|
|
1263
|
+
setup: (e, { slots: t }) => {
|
|
1264
|
+
let n = F("ContextMenuTrigger");
|
|
1265
|
+
return () => s(b, {
|
|
1266
|
+
...E(n.api.value.contextTriggerProps(e.disabled)),
|
|
1267
|
+
as: e.as,
|
|
1268
|
+
asChild: e.asChild
|
|
1269
|
+
}, () => [t.default?.(), s("span", E(n.api.value.anchorProps))]);
|
|
1270
|
+
}
|
|
1271
|
+
}), [Ir, L] = A("SelectRoot"), Lr = (e) => (Array.isArray(e) ? e : [e ?? ""]).filter((e) => e !== ""), Rr = a({
|
|
1272
|
+
name: "SelectRoot",
|
|
1273
|
+
props: {
|
|
1274
|
+
modelValue: {
|
|
1275
|
+
type: [String, Array],
|
|
1276
|
+
default: void 0
|
|
1277
|
+
},
|
|
1278
|
+
defaultValue: {
|
|
1279
|
+
type: [String, Array],
|
|
1280
|
+
default: void 0
|
|
1281
|
+
},
|
|
1282
|
+
multiple: {
|
|
1283
|
+
type: Boolean,
|
|
1284
|
+
default: !1
|
|
1285
|
+
},
|
|
1286
|
+
open: {
|
|
1287
|
+
type: Boolean,
|
|
1288
|
+
default: void 0
|
|
1289
|
+
},
|
|
1290
|
+
defaultOpen: {
|
|
1291
|
+
type: Boolean,
|
|
1292
|
+
default: !1
|
|
1293
|
+
},
|
|
1294
|
+
disabled: {
|
|
1295
|
+
type: Boolean,
|
|
1296
|
+
default: !1
|
|
1297
|
+
},
|
|
1298
|
+
required: {
|
|
1299
|
+
type: Boolean,
|
|
1300
|
+
default: !1
|
|
1301
|
+
},
|
|
1302
|
+
name: {
|
|
1303
|
+
type: String,
|
|
1304
|
+
default: void 0
|
|
1305
|
+
}
|
|
1306
|
+
},
|
|
1307
|
+
emits: {
|
|
1308
|
+
"update:modelValue": (e) => typeof e == "string" || Array.isArray(e),
|
|
1309
|
+
"update:open": (e) => typeof e == "boolean"
|
|
1310
|
+
},
|
|
1311
|
+
setup: (e, { emit: n, slots: r }) => {
|
|
1312
|
+
let a = m(null), o = D(a), c = T(Pt, Nt(g(), Lr(e.defaultValue), {
|
|
1313
|
+
multiple: e.multiple,
|
|
1314
|
+
open: e.defaultOpen,
|
|
1315
|
+
disabled: e.disabled,
|
|
1316
|
+
required: e.required
|
|
1317
|
+
}), {
|
|
1318
|
+
controlled: {
|
|
1319
|
+
value: () => e.modelValue === void 0 ? void 0 : Lr(e.modelValue),
|
|
1320
|
+
open: () => e.open,
|
|
1321
|
+
multiple: () => e.multiple,
|
|
1322
|
+
disabled: () => e.disabled,
|
|
1323
|
+
required: () => e.required
|
|
1324
|
+
},
|
|
1325
|
+
onChange: (t, r) => {
|
|
1326
|
+
t.context.value !== r.context.value && n("update:modelValue", e.multiple ? [...t.context.value] : t.context.value[0] ?? ""), t.context.open !== r.context.open && n("update:open", t.context.open);
|
|
1327
|
+
}
|
|
1328
|
+
}), l = i(() => Je(c.snapshot.value, c.send, o));
|
|
1329
|
+
return Ir({
|
|
1330
|
+
api: l,
|
|
1331
|
+
context: () => c.snapshot.value.context,
|
|
1332
|
+
sync: c.sync,
|
|
1333
|
+
refresh: c.refresh,
|
|
1334
|
+
list: o,
|
|
1335
|
+
content: a
|
|
1336
|
+
}), () => s(t, [r.default?.({
|
|
1337
|
+
value: e.multiple ? l.value.value : l.value.value[0],
|
|
1338
|
+
open: l.value.open
|
|
1339
|
+
}), e.name === void 0 ? null : l.value.inputProps(e.name).map((e) => s("input", E(e)))]);
|
|
1340
|
+
}
|
|
1341
|
+
}), zr = (e, t) => e.sync({ ids: {
|
|
1342
|
+
...e.context().ids,
|
|
1343
|
+
...t
|
|
1344
|
+
} }), Br = a({
|
|
1345
|
+
name: "SelectTrigger",
|
|
1346
|
+
props: y,
|
|
1347
|
+
setup: (e, { slots: t }) => {
|
|
1348
|
+
let n = L("SelectTrigger"), r = m(null);
|
|
1349
|
+
return w(r, () => n.context().ids.trigger, (e) => zr(n, { trigger: e })), () => s(b, {
|
|
1350
|
+
...E(n.api.value.triggerProps, e.as),
|
|
1351
|
+
ref: r,
|
|
1352
|
+
as: e.as,
|
|
1353
|
+
asChild: e.asChild
|
|
1354
|
+
}, t);
|
|
1355
|
+
}
|
|
1356
|
+
}), Vr = a({
|
|
1357
|
+
name: "SelectValue",
|
|
1358
|
+
props: {
|
|
1359
|
+
...v,
|
|
1360
|
+
as: {
|
|
1361
|
+
...v.as,
|
|
1362
|
+
default: "span"
|
|
1363
|
+
},
|
|
1364
|
+
placeholder: {
|
|
1365
|
+
type: String,
|
|
1366
|
+
default: ""
|
|
1367
|
+
}
|
|
1368
|
+
},
|
|
1369
|
+
setup: (t, { slots: n }) => {
|
|
1370
|
+
let r = L("SelectValue"), a = i(() => r.api.value.labels.length === 0 ? void 0 : r.api.value.labels.join(", ")), o = (t) => t !== void 0 && t.some((t) => t.type !== e) ? t : void 0;
|
|
1371
|
+
return () => s(b, {
|
|
1372
|
+
as: t.as,
|
|
1373
|
+
asChild: t.asChild,
|
|
1374
|
+
"data-placeholder": $n(a.value === void 0)
|
|
1375
|
+
}, () => a.value === void 0 ? o(n.placeholder?.()) ?? t.placeholder : o(n.default?.({
|
|
1376
|
+
value: r.context().multiple ? r.api.value.value : r.api.value.value[0],
|
|
1377
|
+
label: a.value,
|
|
1378
|
+
labels: r.api.value.labels
|
|
1379
|
+
})) ?? a.value);
|
|
1380
|
+
}
|
|
1381
|
+
}), Hr = x, Ur = a({
|
|
1382
|
+
name: "SelectContent",
|
|
1383
|
+
props: {
|
|
1384
|
+
...v,
|
|
1385
|
+
...O,
|
|
1386
|
+
align: {
|
|
1387
|
+
...O.align,
|
|
1388
|
+
default: "start"
|
|
1389
|
+
}
|
|
1390
|
+
},
|
|
1391
|
+
setup: (e, { slots: t }) => {
|
|
1392
|
+
let n = L("SelectContent"), r = k(() => n.api.value.open, () => C(n.content));
|
|
1393
|
+
return w(n.content, () => n.context().ids.content, (e) => zr(n, { content: e })), _(() => ({
|
|
1394
|
+
side: e.side,
|
|
1395
|
+
align: e.align,
|
|
1396
|
+
sideOffset: e.sideOffset,
|
|
1397
|
+
collisionPadding: e.collisionPadding,
|
|
1398
|
+
avoidCollisions: e.avoidCollisions
|
|
1399
|
+
}), (e) => n.sync({ placement: e }), { immediate: !0 }), () => s(b, {
|
|
1400
|
+
...E(n.api.value.contentProps(r.value)),
|
|
1401
|
+
ref: n.content,
|
|
1402
|
+
as: e.as,
|
|
1403
|
+
asChild: e.asChild,
|
|
1404
|
+
onVnodeMounted: n.refresh,
|
|
1405
|
+
onVnodeUpdated: n.refresh
|
|
1406
|
+
}, t);
|
|
1407
|
+
}
|
|
1408
|
+
}), Wr = Symbol("SelectItemSelected"), Gr = a({
|
|
1409
|
+
name: "SelectItem",
|
|
1410
|
+
props: {
|
|
1411
|
+
...v,
|
|
1412
|
+
value: {
|
|
1413
|
+
type: String,
|
|
1414
|
+
required: !0
|
|
1415
|
+
},
|
|
1416
|
+
disabled: {
|
|
1417
|
+
type: Boolean,
|
|
1418
|
+
default: !1
|
|
1419
|
+
},
|
|
1420
|
+
textValue: {
|
|
1421
|
+
type: String,
|
|
1422
|
+
default: void 0
|
|
1423
|
+
}
|
|
1424
|
+
},
|
|
1425
|
+
setup: (e, { slots: t }) => {
|
|
1426
|
+
let n = L("SelectItem");
|
|
1427
|
+
return n.list.track(), p(Wr, () => n.api.value.isSelected(e.value)), () => s(b, {
|
|
1428
|
+
...n.list.itemAttrs,
|
|
1429
|
+
...E(n.api.value.itemProps({
|
|
1430
|
+
value: e.value,
|
|
1431
|
+
disabled: e.disabled,
|
|
1432
|
+
label: e.textValue
|
|
1433
|
+
})),
|
|
1434
|
+
as: e.as,
|
|
1435
|
+
asChild: e.asChild
|
|
1436
|
+
}, t);
|
|
1437
|
+
}
|
|
1438
|
+
}), Kr = a({
|
|
1439
|
+
name: "SelectItemText",
|
|
1440
|
+
props: {
|
|
1441
|
+
...v,
|
|
1442
|
+
as: {
|
|
1443
|
+
...v.as,
|
|
1444
|
+
default: "span"
|
|
1445
|
+
}
|
|
1446
|
+
},
|
|
1447
|
+
setup: (e, { slots: t }) => () => s(b, {
|
|
1448
|
+
as: e.as,
|
|
1449
|
+
asChild: e.asChild
|
|
1450
|
+
}, t)
|
|
1451
|
+
}), qr = a({
|
|
1452
|
+
name: "SelectItemIndicator",
|
|
1453
|
+
props: {
|
|
1454
|
+
...v,
|
|
1455
|
+
as: {
|
|
1456
|
+
...v.as,
|
|
1457
|
+
default: "span"
|
|
1458
|
+
}
|
|
1459
|
+
},
|
|
1460
|
+
setup: (e, { slots: t }) => {
|
|
1461
|
+
let n = c(Wr, () => !1);
|
|
1462
|
+
return () => n() ? s(b, {
|
|
1463
|
+
as: e.as,
|
|
1464
|
+
asChild: e.asChild,
|
|
1465
|
+
"aria-hidden": "true"
|
|
1466
|
+
}, t) : null;
|
|
1467
|
+
}
|
|
1468
|
+
}), Jr = a({
|
|
1469
|
+
name: "SelectGroup",
|
|
1470
|
+
props: v,
|
|
1471
|
+
setup: (e, { slots: t }) => () => s(b, {
|
|
1472
|
+
as: e.as,
|
|
1473
|
+
asChild: e.asChild,
|
|
1474
|
+
role: "group"
|
|
1475
|
+
}, t)
|
|
1476
|
+
}), Yr = a({
|
|
1477
|
+
name: "SelectLabel",
|
|
1478
|
+
props: v,
|
|
1479
|
+
setup: (e, { slots: t }) => () => s(b, {
|
|
1480
|
+
as: e.as,
|
|
1481
|
+
asChild: e.asChild
|
|
1482
|
+
}, t)
|
|
1483
|
+
}), Xr = a({
|
|
1484
|
+
name: "SelectSeparator",
|
|
1485
|
+
props: v,
|
|
1486
|
+
setup: (e) => () => s(b, {
|
|
1487
|
+
as: e.as,
|
|
1488
|
+
asChild: e.asChild,
|
|
1489
|
+
"aria-hidden": "true"
|
|
1490
|
+
})
|
|
1491
|
+
}), [Zr, R] = A("ComboboxRoot"), Qr = (e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], $r = a({
|
|
1492
|
+
name: "ComboboxRoot",
|
|
1493
|
+
props: {
|
|
1494
|
+
modelValue: {
|
|
1495
|
+
type: [String, Array],
|
|
1496
|
+
default: void 0
|
|
1497
|
+
},
|
|
1498
|
+
defaultValue: {
|
|
1499
|
+
type: [String, Array],
|
|
1500
|
+
default: void 0
|
|
1501
|
+
},
|
|
1502
|
+
multiple: {
|
|
1503
|
+
type: Boolean,
|
|
1504
|
+
default: !1
|
|
1505
|
+
},
|
|
1506
|
+
open: {
|
|
1507
|
+
type: Boolean,
|
|
1508
|
+
default: void 0
|
|
1509
|
+
},
|
|
1510
|
+
defaultOpen: {
|
|
1511
|
+
type: Boolean,
|
|
1512
|
+
default: !1
|
|
1513
|
+
},
|
|
1514
|
+
searchTerm: {
|
|
1515
|
+
type: String,
|
|
1516
|
+
default: void 0
|
|
1517
|
+
},
|
|
1518
|
+
disabled: {
|
|
1519
|
+
type: Boolean,
|
|
1520
|
+
default: !1
|
|
1521
|
+
},
|
|
1522
|
+
required: {
|
|
1523
|
+
type: Boolean,
|
|
1524
|
+
default: !1
|
|
1525
|
+
},
|
|
1526
|
+
filter: {
|
|
1527
|
+
type: Boolean,
|
|
1528
|
+
default: !0
|
|
1529
|
+
},
|
|
1530
|
+
name: {
|
|
1531
|
+
type: String,
|
|
1532
|
+
default: void 0
|
|
1533
|
+
}
|
|
1534
|
+
},
|
|
1535
|
+
emits: {
|
|
1536
|
+
"update:modelValue": (e) => e === void 0 || typeof e == "string" || Array.isArray(e),
|
|
1537
|
+
"update:open": (e) => typeof e == "boolean",
|
|
1538
|
+
"update:searchTerm": (e) => typeof e == "string"
|
|
1539
|
+
},
|
|
1540
|
+
setup: (e, { emit: n, slots: r }) => {
|
|
1541
|
+
let a = m(null), o = D(a, { includeHidden: !0 }), c = T(ke, Oe(g(), Qr(e.defaultValue), {
|
|
1542
|
+
multiple: e.multiple,
|
|
1543
|
+
open: e.defaultOpen,
|
|
1544
|
+
search: e.searchTerm ?? "",
|
|
1545
|
+
disabled: e.disabled,
|
|
1546
|
+
required: e.required,
|
|
1547
|
+
filter: e.filter
|
|
1548
|
+
}), {
|
|
1549
|
+
controlled: {
|
|
1550
|
+
value: () => e.modelValue === void 0 ? void 0 : Qr(e.modelValue),
|
|
1551
|
+
open: () => e.open,
|
|
1552
|
+
search: () => e.searchTerm,
|
|
1553
|
+
multiple: () => e.multiple,
|
|
1554
|
+
disabled: () => e.disabled,
|
|
1555
|
+
required: () => e.required,
|
|
1556
|
+
filter: () => e.filter
|
|
1557
|
+
},
|
|
1558
|
+
onChange: (t, r) => {
|
|
1559
|
+
t.context.value !== r.context.value && n("update:modelValue", e.multiple ? [...t.context.value] : t.context.value[0]), t.context.open !== r.context.open && n("update:open", t.context.open), t.context.search !== r.context.search && n("update:searchTerm", t.context.search);
|
|
1560
|
+
}
|
|
1561
|
+
}), l = i(() => Fe(c.snapshot.value, c.send, o));
|
|
1562
|
+
return Zr({
|
|
1563
|
+
api: l,
|
|
1564
|
+
context: () => c.snapshot.value.context,
|
|
1565
|
+
sync: c.sync,
|
|
1566
|
+
refresh: c.refresh,
|
|
1567
|
+
list: o,
|
|
1568
|
+
content: a
|
|
1569
|
+
}), () => s(t, [r.default?.({
|
|
1570
|
+
value: e.multiple ? l.value.value : l.value.value[0],
|
|
1571
|
+
picked: l.value.value,
|
|
1572
|
+
labelOf: l.value.labelOf,
|
|
1573
|
+
open: l.value.open,
|
|
1574
|
+
search: l.value.search
|
|
1575
|
+
}), e.name === void 0 ? null : l.value.hiddenInputs(e.name).map((e) => s("input", E(e)))]);
|
|
1576
|
+
}
|
|
1577
|
+
}), z = (e, t) => e.sync({ ids: {
|
|
1578
|
+
...e.context().ids,
|
|
1579
|
+
...t
|
|
1580
|
+
} }), ei = a({
|
|
1581
|
+
name: "ComboboxAnchor",
|
|
1582
|
+
props: v,
|
|
1583
|
+
setup: (e, { slots: t }) => {
|
|
1584
|
+
let n = R("ComboboxAnchor"), r = m(null);
|
|
1585
|
+
return z(n, { anchor: `${g()}-anchor` }), w(r, () => n.context().ids.anchor ?? "", (e) => z(n, { anchor: e })), () => s(b, {
|
|
1586
|
+
...E(n.api.value.anchorProps),
|
|
1587
|
+
ref: r,
|
|
1588
|
+
as: e.as,
|
|
1589
|
+
asChild: e.asChild
|
|
1590
|
+
}, t);
|
|
1591
|
+
}
|
|
1592
|
+
}), ti = a({
|
|
1593
|
+
name: "ComboboxInput",
|
|
1594
|
+
props: {
|
|
1595
|
+
...v,
|
|
1596
|
+
as: {
|
|
1597
|
+
...v.as,
|
|
1598
|
+
default: "input"
|
|
1599
|
+
}
|
|
1600
|
+
},
|
|
1601
|
+
setup: (e) => {
|
|
1602
|
+
let t = R("ComboboxInput"), n = m(null);
|
|
1603
|
+
return w(n, () => t.context().ids.input, (e) => z(t, { input: e })), () => s(b, {
|
|
1604
|
+
...E(t.api.value.inputProps),
|
|
1605
|
+
ref: n,
|
|
1606
|
+
as: e.as,
|
|
1607
|
+
asChild: e.asChild
|
|
1608
|
+
});
|
|
1609
|
+
}
|
|
1610
|
+
}), ni = a({
|
|
1611
|
+
name: "ComboboxTrigger",
|
|
1612
|
+
props: {
|
|
1613
|
+
...y,
|
|
1614
|
+
label: {
|
|
1615
|
+
type: String,
|
|
1616
|
+
default: "Show options"
|
|
1617
|
+
}
|
|
1618
|
+
},
|
|
1619
|
+
setup: (e, { slots: t }) => {
|
|
1620
|
+
let n = R("ComboboxTrigger");
|
|
1621
|
+
return () => s(b, {
|
|
1622
|
+
...E(n.api.value.triggerProps(e.label), e.as),
|
|
1623
|
+
as: e.as,
|
|
1624
|
+
asChild: e.asChild
|
|
1625
|
+
}, t);
|
|
1626
|
+
}
|
|
1627
|
+
}), ri = a({
|
|
1628
|
+
name: "ComboboxClear",
|
|
1629
|
+
props: {
|
|
1630
|
+
...y,
|
|
1631
|
+
label: {
|
|
1632
|
+
type: String,
|
|
1633
|
+
default: "Clear"
|
|
1634
|
+
}
|
|
1635
|
+
},
|
|
1636
|
+
setup: (e, { slots: t }) => {
|
|
1637
|
+
let n = R("ComboboxClear");
|
|
1638
|
+
return () => n.api.value.hasValue ? s(b, {
|
|
1639
|
+
...E(n.api.value.clearProps(e.label), e.as),
|
|
1640
|
+
as: e.as,
|
|
1641
|
+
asChild: e.asChild
|
|
1642
|
+
}, t) : null;
|
|
1643
|
+
}
|
|
1644
|
+
}), ii = x, ai = a({
|
|
1645
|
+
name: "ComboboxContent",
|
|
1646
|
+
props: {
|
|
1647
|
+
...v,
|
|
1648
|
+
...O,
|
|
1649
|
+
align: {
|
|
1650
|
+
...O.align,
|
|
1651
|
+
default: "start"
|
|
1652
|
+
}
|
|
1653
|
+
},
|
|
1654
|
+
setup: (e, { slots: t }) => {
|
|
1655
|
+
let n = R("ComboboxContent"), r = k(() => n.api.value.open, () => C(n.content));
|
|
1656
|
+
return w(n.content, () => n.context().ids.content, (e) => z(n, { content: e })), _(() => ({
|
|
1657
|
+
side: e.side,
|
|
1658
|
+
align: e.align,
|
|
1659
|
+
sideOffset: e.sideOffset,
|
|
1660
|
+
collisionPadding: e.collisionPadding,
|
|
1661
|
+
avoidCollisions: e.avoidCollisions
|
|
1662
|
+
}), (e) => n.sync({ placement: e }), { immediate: !0 }), () => s(b, {
|
|
1663
|
+
...E(n.api.value.contentProps(r.value)),
|
|
1664
|
+
ref: n.content,
|
|
1665
|
+
as: e.as,
|
|
1666
|
+
asChild: e.asChild,
|
|
1667
|
+
onVnodeMounted: n.refresh,
|
|
1668
|
+
onVnodeUpdated: n.refresh
|
|
1669
|
+
}, t);
|
|
1670
|
+
}
|
|
1671
|
+
}), oi = Symbol("ComboboxItemSelected"), si = a({
|
|
1672
|
+
name: "ComboboxItem",
|
|
1673
|
+
props: {
|
|
1674
|
+
...v,
|
|
1675
|
+
value: {
|
|
1676
|
+
type: String,
|
|
1677
|
+
required: !0
|
|
1678
|
+
},
|
|
1679
|
+
disabled: {
|
|
1680
|
+
type: Boolean,
|
|
1681
|
+
default: !1
|
|
1682
|
+
},
|
|
1683
|
+
textValue: {
|
|
1684
|
+
type: String,
|
|
1685
|
+
default: void 0
|
|
1686
|
+
}
|
|
1687
|
+
},
|
|
1688
|
+
setup: (e, { slots: t }) => {
|
|
1689
|
+
let n = R("ComboboxItem");
|
|
1690
|
+
n.list.track(), p(oi, () => n.api.value.isSelected(e.value));
|
|
1691
|
+
let r = () => e.textValue ?? n.list.items().find((t) => t.value === e.value)?.label ?? e.value;
|
|
1692
|
+
return () => s(b, {
|
|
1693
|
+
...n.list.itemAttrs,
|
|
1694
|
+
...E(n.api.value.itemProps({
|
|
1695
|
+
value: e.value,
|
|
1696
|
+
disabled: e.disabled,
|
|
1697
|
+
label: r()
|
|
1698
|
+
})),
|
|
1699
|
+
"data-label": e.textValue,
|
|
1700
|
+
as: e.as,
|
|
1701
|
+
asChild: e.asChild
|
|
1702
|
+
}, t);
|
|
1703
|
+
}
|
|
1704
|
+
}), ci = a({
|
|
1705
|
+
name: "ComboboxItemIndicator",
|
|
1706
|
+
props: {
|
|
1707
|
+
...v,
|
|
1708
|
+
as: {
|
|
1709
|
+
...v.as,
|
|
1710
|
+
default: "span"
|
|
1711
|
+
}
|
|
1712
|
+
},
|
|
1713
|
+
setup: (e, { slots: t }) => {
|
|
1714
|
+
let n = c(oi, () => !1);
|
|
1715
|
+
return () => n() ? s(b, {
|
|
1716
|
+
as: e.as,
|
|
1717
|
+
asChild: e.asChild,
|
|
1718
|
+
"aria-hidden": "true"
|
|
1719
|
+
}, t) : null;
|
|
1720
|
+
}
|
|
1721
|
+
}), li = a({
|
|
1722
|
+
name: "ComboboxEmpty",
|
|
1723
|
+
props: v,
|
|
1724
|
+
setup: (e, { slots: t }) => {
|
|
1725
|
+
let n = R("ComboboxEmpty");
|
|
1726
|
+
return () => n.api.value.visibleCount > 0 ? null : s(b, {
|
|
1727
|
+
as: e.as,
|
|
1728
|
+
asChild: e.asChild,
|
|
1729
|
+
role: "status"
|
|
1730
|
+
}, t);
|
|
1731
|
+
}
|
|
1732
|
+
}), [ui, B] = A("CommandRoot"), di = Symbol("CommandGroup"), fi = a({
|
|
1733
|
+
name: "CommandRoot",
|
|
1734
|
+
props: {
|
|
1735
|
+
...v,
|
|
1736
|
+
search: {
|
|
1737
|
+
type: String,
|
|
1738
|
+
default: void 0
|
|
1739
|
+
},
|
|
1740
|
+
filter: {
|
|
1741
|
+
type: Boolean,
|
|
1742
|
+
default: !0
|
|
1743
|
+
}
|
|
1744
|
+
},
|
|
1745
|
+
emits: { "update:search": (e) => typeof e == "string" },
|
|
1746
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
1747
|
+
let r = m(null), a = D(r, { includeHidden: !0 }), o = g(), c = T(Ae, {
|
|
1748
|
+
search: e.search ?? "",
|
|
1749
|
+
filter: e.filter,
|
|
1750
|
+
highlighted: void 0,
|
|
1751
|
+
ids: {
|
|
1752
|
+
input: `${o}-input`,
|
|
1753
|
+
list: `${o}-list`
|
|
1754
|
+
}
|
|
1755
|
+
}, {
|
|
1756
|
+
controlled: {
|
|
1757
|
+
search: () => e.search,
|
|
1758
|
+
filter: () => e.filter
|
|
1759
|
+
},
|
|
1760
|
+
onChange: (e, n) => {
|
|
1761
|
+
e.context.search !== n.context.search && t("update:search", e.context.search);
|
|
1762
|
+
}
|
|
1763
|
+
}), l = i(() => Ie(c.snapshot.value, c.send, a, c.query, a.itemAttrs["data-lovince-item"] ?? "")), u = () => c.send({
|
|
1764
|
+
type: "RESET_HIGHLIGHT",
|
|
1765
|
+
items: a.items()
|
|
1766
|
+
});
|
|
1767
|
+
return f(u), _(() => e.search, u, { flush: "post" }), ui({
|
|
1768
|
+
api: l,
|
|
1769
|
+
context: () => c.snapshot.value.context,
|
|
1770
|
+
sync: c.sync,
|
|
1771
|
+
list: a,
|
|
1772
|
+
listElement: r,
|
|
1773
|
+
collection: a.itemAttrs["data-lovince-item"] ?? ""
|
|
1774
|
+
}), () => s(b, {
|
|
1775
|
+
as: e.as,
|
|
1776
|
+
asChild: e.asChild,
|
|
1777
|
+
"data-command": ""
|
|
1778
|
+
}, () => n.default?.({ search: l.value.search }));
|
|
1779
|
+
}
|
|
1780
|
+
}), pi = (e, t) => e.sync({ ids: {
|
|
1781
|
+
...e.context().ids,
|
|
1782
|
+
...t
|
|
1783
|
+
} }), mi = a({
|
|
1784
|
+
name: "CommandInput",
|
|
1785
|
+
props: {
|
|
1786
|
+
...v,
|
|
1787
|
+
as: {
|
|
1788
|
+
...v.as,
|
|
1789
|
+
default: "input"
|
|
1790
|
+
}
|
|
1791
|
+
},
|
|
1792
|
+
setup: (e) => {
|
|
1793
|
+
let t = B("CommandInput"), n = m(null);
|
|
1794
|
+
return w(n, () => t.context().ids.input, (e) => pi(t, { input: e })), () => s(b, {
|
|
1795
|
+
...E(t.api.value.inputProps),
|
|
1796
|
+
ref: n,
|
|
1797
|
+
as: e.as,
|
|
1798
|
+
asChild: e.asChild
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
}), hi = a({
|
|
1802
|
+
name: "CommandList",
|
|
1803
|
+
props: {
|
|
1804
|
+
...v,
|
|
1805
|
+
label: {
|
|
1806
|
+
type: String,
|
|
1807
|
+
default: "Suggestions"
|
|
1808
|
+
}
|
|
1809
|
+
},
|
|
1810
|
+
setup: (e, { slots: t }) => {
|
|
1811
|
+
let n = B("CommandList");
|
|
1812
|
+
return w(n.listElement, () => n.context().ids.list, (e) => pi(n, { list: e })), () => s(b, {
|
|
1813
|
+
...E(n.api.value.listProps(e.label)),
|
|
1814
|
+
ref: n.listElement,
|
|
1815
|
+
as: e.as,
|
|
1816
|
+
asChild: e.asChild
|
|
1817
|
+
}, t);
|
|
1818
|
+
}
|
|
1819
|
+
}), gi = a({
|
|
1820
|
+
name: "CommandGroup",
|
|
1821
|
+
props: {
|
|
1822
|
+
...v,
|
|
1823
|
+
heading: {
|
|
1824
|
+
type: String,
|
|
1825
|
+
default: void 0
|
|
1826
|
+
}
|
|
1827
|
+
},
|
|
1828
|
+
setup: (e, { slots: t }) => {
|
|
1829
|
+
let n = B("CommandGroup");
|
|
1830
|
+
p(di, !0);
|
|
1831
|
+
let r = g(), i = m(`${r}-group`), a = m(null);
|
|
1832
|
+
return w(a, () => i.value, (e) => i.value = e), () => (n.list.items(), s(b, {
|
|
1833
|
+
...E(n.api.value.groupProps(i.value, e.heading === void 0 ? void 0 : `${r}-heading`)),
|
|
1834
|
+
ref: a,
|
|
1835
|
+
as: e.as,
|
|
1836
|
+
asChild: e.asChild
|
|
1837
|
+
}, () => [e.heading === void 0 ? null : s("div", {
|
|
1838
|
+
id: `${r}-heading`,
|
|
1839
|
+
"data-command-heading": "",
|
|
1840
|
+
"aria-hidden": "true"
|
|
1841
|
+
}, e.heading), t.default?.()]));
|
|
1842
|
+
}
|
|
1843
|
+
}), _i = a({
|
|
1844
|
+
name: "CommandItem",
|
|
1845
|
+
props: {
|
|
1846
|
+
...v,
|
|
1847
|
+
value: {
|
|
1848
|
+
type: String,
|
|
1849
|
+
default: void 0
|
|
1850
|
+
},
|
|
1851
|
+
keywords: {
|
|
1852
|
+
type: Array,
|
|
1853
|
+
default: () => []
|
|
1854
|
+
},
|
|
1855
|
+
disabled: {
|
|
1856
|
+
type: Boolean,
|
|
1857
|
+
default: !1
|
|
1858
|
+
}
|
|
1859
|
+
},
|
|
1860
|
+
emits: { select: (e) => typeof e == "string" },
|
|
1861
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
1862
|
+
let r = B("CommandItem");
|
|
1863
|
+
r.list.track(), c(di, null);
|
|
1864
|
+
let i = `${g()}-item`;
|
|
1865
|
+
return () => (r.list.items(), s(b, {
|
|
1866
|
+
...r.list.itemAttrs,
|
|
1867
|
+
...E(r.api.value.itemProps({
|
|
1868
|
+
id: i,
|
|
1869
|
+
value: e.value,
|
|
1870
|
+
keywords: e.keywords,
|
|
1871
|
+
disabled: e.disabled,
|
|
1872
|
+
onSelect: (e) => t("select", e)
|
|
1873
|
+
})),
|
|
1874
|
+
as: e.as,
|
|
1875
|
+
asChild: e.asChild
|
|
1876
|
+
}, n));
|
|
1877
|
+
}
|
|
1878
|
+
}), vi = a({
|
|
1879
|
+
name: "CommandEmpty",
|
|
1880
|
+
props: v,
|
|
1881
|
+
setup: (e, { slots: t }) => {
|
|
1882
|
+
let n = B("CommandEmpty");
|
|
1883
|
+
return () => n.api.value.visibleCount > 0 ? null : s(b, {
|
|
1884
|
+
as: e.as,
|
|
1885
|
+
asChild: e.asChild,
|
|
1886
|
+
role: "status"
|
|
1887
|
+
}, t);
|
|
1888
|
+
}
|
|
1889
|
+
}), yi = a({
|
|
1890
|
+
name: "CommandSeparator",
|
|
1891
|
+
props: v,
|
|
1892
|
+
setup: (e) => {
|
|
1893
|
+
let t = B("CommandSeparator");
|
|
1894
|
+
return () => t.api.value.search.trim() === "" ? s(b, {
|
|
1895
|
+
as: e.as,
|
|
1896
|
+
asChild: e.asChild,
|
|
1897
|
+
role: "separator"
|
|
1898
|
+
}) : null;
|
|
1899
|
+
}
|
|
1900
|
+
}), V = Symbol("NavigationMenuRoot"), bi = Symbol("NavigationMenuItem"), xi = Symbol("NavigationMenuContent"), Si = a({
|
|
1901
|
+
name: "NavigationMenuRoot",
|
|
1902
|
+
props: {
|
|
1903
|
+
...v,
|
|
1904
|
+
as: {
|
|
1905
|
+
...v.as,
|
|
1906
|
+
default: "nav"
|
|
1907
|
+
},
|
|
1908
|
+
modelValue: {
|
|
1909
|
+
type: String,
|
|
1910
|
+
default: void 0
|
|
1911
|
+
},
|
|
1912
|
+
orientation: {
|
|
1913
|
+
type: String,
|
|
1914
|
+
default: "horizontal"
|
|
1915
|
+
},
|
|
1916
|
+
openDelay: {
|
|
1917
|
+
type: Number,
|
|
1918
|
+
default: 150
|
|
1919
|
+
},
|
|
1920
|
+
closeDelay: {
|
|
1921
|
+
type: Number,
|
|
1922
|
+
default: 300
|
|
1923
|
+
}
|
|
1924
|
+
},
|
|
1925
|
+
emits: { "update:modelValue": (e) => typeof e == "string" },
|
|
1926
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
1927
|
+
let r = m(null), a = D(r), o = T(Ct, St(`${g()}-navigation`, e.modelValue ?? "", {
|
|
1928
|
+
orientation: e.orientation,
|
|
1929
|
+
openDelay: e.openDelay,
|
|
1930
|
+
closeDelay: e.closeDelay
|
|
1931
|
+
}), {
|
|
1932
|
+
controlled: {
|
|
1933
|
+
value: () => e.modelValue,
|
|
1934
|
+
orientation: () => e.orientation,
|
|
1935
|
+
openDelay: () => e.openDelay,
|
|
1936
|
+
closeDelay: () => e.closeDelay
|
|
1937
|
+
},
|
|
1938
|
+
onChange: (e, n) => {
|
|
1939
|
+
e.context.value !== n.context.value && t("update:modelValue", e.context.value);
|
|
1940
|
+
}
|
|
1941
|
+
}), c = i(() => He(o.snapshot.value, o.send, a));
|
|
1942
|
+
return p(V, {
|
|
1943
|
+
api: c,
|
|
1944
|
+
context: () => o.snapshot.value.context,
|
|
1945
|
+
register: (e, t) => {
|
|
1946
|
+
let n = o.snapshot.value.context.items, r = n[e], i = {
|
|
1947
|
+
trigger: t.trigger ?? r?.trigger ?? "",
|
|
1948
|
+
content: t.content ?? r?.content ?? "",
|
|
1949
|
+
anchor: t.anchor ?? r?.anchor ?? "trigger",
|
|
1950
|
+
placement: t.placement ?? r?.placement ?? o.snapshot.value.context.placement
|
|
1951
|
+
};
|
|
1952
|
+
o.sync({ items: {
|
|
1953
|
+
...n,
|
|
1954
|
+
[e]: i
|
|
1955
|
+
} });
|
|
1956
|
+
},
|
|
1957
|
+
refresh: o.refresh,
|
|
1958
|
+
list: a
|
|
1959
|
+
}), () => s(b, {
|
|
1960
|
+
...E(c.value.rootProps),
|
|
1961
|
+
ref: r,
|
|
1962
|
+
as: e.as,
|
|
1963
|
+
asChild: e.asChild
|
|
1964
|
+
}, n);
|
|
1965
|
+
}
|
|
1966
|
+
}), Ci = a({
|
|
1967
|
+
name: "NavigationMenuList",
|
|
1968
|
+
props: {
|
|
1969
|
+
...v,
|
|
1970
|
+
as: {
|
|
1971
|
+
...v.as,
|
|
1972
|
+
default: "ul"
|
|
1973
|
+
}
|
|
1974
|
+
},
|
|
1975
|
+
setup: (e, { slots: t }) => {
|
|
1976
|
+
let n = M(V, "NavigationMenuList", "NavigationMenuRoot");
|
|
1977
|
+
return () => s(b, {
|
|
1978
|
+
...E(n.api.value.listProps),
|
|
1979
|
+
as: e.as,
|
|
1980
|
+
asChild: e.asChild
|
|
1981
|
+
}, t);
|
|
1982
|
+
}
|
|
1983
|
+
}), wi = a({
|
|
1984
|
+
name: "NavigationMenuItem",
|
|
1985
|
+
props: {
|
|
1986
|
+
...v,
|
|
1987
|
+
as: {
|
|
1988
|
+
...v.as,
|
|
1989
|
+
default: "li"
|
|
1990
|
+
},
|
|
1991
|
+
value: {
|
|
1992
|
+
type: String,
|
|
1993
|
+
default: void 0
|
|
1994
|
+
}
|
|
1995
|
+
},
|
|
1996
|
+
setup: (e, { slots: t }) => {
|
|
1997
|
+
let n = M(V, "NavigationMenuItem", "NavigationMenuRoot"), r = g(), i = e.value ?? r;
|
|
1998
|
+
return n.register(i, {
|
|
1999
|
+
trigger: `${r}-trigger`,
|
|
2000
|
+
content: `${r}-panel`
|
|
2001
|
+
}), p(bi, i), () => s(b, {
|
|
2002
|
+
as: e.as,
|
|
2003
|
+
asChild: e.asChild,
|
|
2004
|
+
style: { position: "relative" }
|
|
2005
|
+
}, t);
|
|
2006
|
+
}
|
|
2007
|
+
}), Ti = a({
|
|
2008
|
+
name: "NavigationMenuTrigger",
|
|
2009
|
+
props: y,
|
|
2010
|
+
setup: (e, { slots: t }) => {
|
|
2011
|
+
let n = M(V, "NavigationMenuTrigger", "NavigationMenuRoot"), r = M(bi, "NavigationMenuTrigger", "NavigationMenuItem");
|
|
2012
|
+
return n.list.track(), () => s(b, {
|
|
2013
|
+
...n.list.itemAttrs,
|
|
2014
|
+
...E(n.api.value.triggerProps(r), e.as),
|
|
2015
|
+
as: e.as,
|
|
2016
|
+
asChild: e.asChild
|
|
2017
|
+
}, t);
|
|
2018
|
+
}
|
|
2019
|
+
}), Ei = a({
|
|
2020
|
+
name: "NavigationMenuContent",
|
|
2021
|
+
props: {
|
|
2022
|
+
...v,
|
|
2023
|
+
...O,
|
|
2024
|
+
align: {
|
|
2025
|
+
...O.align,
|
|
2026
|
+
default: "start"
|
|
2027
|
+
},
|
|
2028
|
+
anchor: {
|
|
2029
|
+
type: String,
|
|
2030
|
+
default: "trigger"
|
|
2031
|
+
}
|
|
2032
|
+
},
|
|
2033
|
+
setup: (e, { slots: t }) => {
|
|
2034
|
+
let n = M(V, "NavigationMenuContent", "NavigationMenuRoot"), r = M(bi, "NavigationMenuContent", "NavigationMenuItem");
|
|
2035
|
+
p(xi, !0);
|
|
2036
|
+
let i = m(null), a = k(() => n.api.value.isOpen(r), () => C(i));
|
|
2037
|
+
return _(() => ({
|
|
2038
|
+
anchor: e.anchor,
|
|
2039
|
+
placement: {
|
|
2040
|
+
side: e.side,
|
|
2041
|
+
align: e.align,
|
|
2042
|
+
sideOffset: e.sideOffset,
|
|
2043
|
+
collisionPadding: e.collisionPadding,
|
|
2044
|
+
avoidCollisions: e.avoidCollisions
|
|
2045
|
+
}
|
|
2046
|
+
}), (e) => n.register(r, e), { immediate: !0 }), () => a.value ? s(b, {
|
|
2047
|
+
...E(n.api.value.contentProps(r)),
|
|
2048
|
+
ref: i,
|
|
2049
|
+
as: e.as,
|
|
2050
|
+
asChild: e.asChild,
|
|
2051
|
+
onVnodeMounted: n.refresh
|
|
2052
|
+
}, t) : null;
|
|
2053
|
+
}
|
|
2054
|
+
}), Di = a({
|
|
2055
|
+
name: "NavigationMenuLink",
|
|
2056
|
+
props: {
|
|
2057
|
+
...v,
|
|
2058
|
+
as: {
|
|
2059
|
+
...v.as,
|
|
2060
|
+
default: "a"
|
|
2061
|
+
},
|
|
2062
|
+
active: {
|
|
2063
|
+
type: Boolean,
|
|
2064
|
+
default: !1
|
|
2065
|
+
}
|
|
2066
|
+
},
|
|
2067
|
+
setup: (e, { slots: t }) => {
|
|
2068
|
+
let n = M(V, "NavigationMenuLink", "NavigationMenuRoot"), r = !c(xi, !1), i = g();
|
|
2069
|
+
return r && n.list.track(), () => s(b, {
|
|
2070
|
+
...r ? n.list.itemAttrs : {},
|
|
2071
|
+
...E(n.api.value.linkProps(e.active, r ? `${i}-link` : void 0)),
|
|
2072
|
+
as: e.as,
|
|
2073
|
+
asChild: e.asChild
|
|
2074
|
+
}, t);
|
|
2075
|
+
}
|
|
2076
|
+
}), H = Symbol("AccordionRoot"), Oi = Symbol("AccordionItem"), ki = (e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], Ai = a({
|
|
2077
|
+
name: "AccordionRoot",
|
|
2078
|
+
props: {
|
|
2079
|
+
...v,
|
|
2080
|
+
type: {
|
|
2081
|
+
type: String,
|
|
2082
|
+
default: "single"
|
|
2083
|
+
},
|
|
2084
|
+
modelValue: {
|
|
2085
|
+
type: [String, Array],
|
|
2086
|
+
default: void 0
|
|
2087
|
+
},
|
|
2088
|
+
defaultValue: {
|
|
2089
|
+
type: [String, Array],
|
|
2090
|
+
default: void 0
|
|
2091
|
+
},
|
|
2092
|
+
collapsible: {
|
|
2093
|
+
type: Boolean,
|
|
2094
|
+
default: !0
|
|
2095
|
+
},
|
|
2096
|
+
disabled: {
|
|
2097
|
+
type: Boolean,
|
|
2098
|
+
default: !1
|
|
2099
|
+
}
|
|
2100
|
+
},
|
|
2101
|
+
emits: { "update:modelValue": (e) => e === void 0 || typeof e == "string" || Array.isArray(e) },
|
|
2102
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
2103
|
+
let r = m(null), a = D(r), o = T(ye, {
|
|
2104
|
+
open: ki(e.defaultValue),
|
|
2105
|
+
type: e.type,
|
|
2106
|
+
collapsible: e.collapsible,
|
|
2107
|
+
disabled: e.disabled
|
|
2108
|
+
}, {
|
|
2109
|
+
controlled: {
|
|
2110
|
+
open: () => e.modelValue === void 0 ? void 0 : ki(e.modelValue),
|
|
2111
|
+
type: () => e.type,
|
|
2112
|
+
collapsible: () => e.collapsible,
|
|
2113
|
+
disabled: () => e.disabled
|
|
2114
|
+
},
|
|
2115
|
+
onChange: (n, r) => {
|
|
2116
|
+
n.context.open !== r.context.open && t("update:modelValue", e.type === "multiple" ? [...n.context.open] : n.context.open[0]);
|
|
2117
|
+
}
|
|
2118
|
+
}), c = i(() => je(o.snapshot.value, o.send, a));
|
|
2119
|
+
return p(H, {
|
|
2120
|
+
api: c,
|
|
2121
|
+
list: a,
|
|
2122
|
+
disabled: () => e.disabled
|
|
2123
|
+
}), () => s(b, {
|
|
2124
|
+
...E(c.value.rootProps),
|
|
2125
|
+
ref: r,
|
|
2126
|
+
as: e.as,
|
|
2127
|
+
asChild: e.asChild
|
|
2128
|
+
}, n);
|
|
2129
|
+
}
|
|
2130
|
+
}), ji = a({
|
|
2131
|
+
name: "AccordionItem",
|
|
2132
|
+
props: {
|
|
2133
|
+
...v,
|
|
2134
|
+
value: {
|
|
2135
|
+
type: String,
|
|
2136
|
+
required: !0
|
|
2137
|
+
},
|
|
2138
|
+
disabled: {
|
|
2139
|
+
type: Boolean,
|
|
2140
|
+
default: !1
|
|
2141
|
+
}
|
|
2142
|
+
},
|
|
2143
|
+
setup: (e, { slots: t }) => {
|
|
2144
|
+
let n = M(H, "AccordionItem", "AccordionRoot");
|
|
2145
|
+
return p(Oi, e.value), () => s(bn, {
|
|
2146
|
+
as: e.as,
|
|
2147
|
+
asChild: e.asChild,
|
|
2148
|
+
open: n.api.value.isOpen(e.value),
|
|
2149
|
+
disabled: e.disabled || n.disabled(),
|
|
2150
|
+
"onUpdate:open": (t) => n.api.value.setItem(e.value, t)
|
|
2151
|
+
}, t);
|
|
2152
|
+
}
|
|
2153
|
+
}), Mi = a({
|
|
2154
|
+
name: "AccordionHeader",
|
|
2155
|
+
props: {
|
|
2156
|
+
...v,
|
|
2157
|
+
as: {
|
|
2158
|
+
...v.as,
|
|
2159
|
+
default: "h3"
|
|
2160
|
+
}
|
|
2161
|
+
},
|
|
2162
|
+
setup: (e, { slots: t }) => () => s(b, {
|
|
2163
|
+
as: e.as,
|
|
2164
|
+
asChild: e.asChild
|
|
2165
|
+
}, t)
|
|
2166
|
+
}), Ni = a({
|
|
2167
|
+
name: "AccordionTrigger",
|
|
2168
|
+
props: {
|
|
2169
|
+
...v,
|
|
2170
|
+
as: {
|
|
2171
|
+
...v.as,
|
|
2172
|
+
default: "button"
|
|
2173
|
+
}
|
|
2174
|
+
},
|
|
2175
|
+
setup: (e, { slots: t }) => {
|
|
2176
|
+
let n = M(H, "AccordionTrigger", "AccordionRoot"), r = M(Oi, "AccordionTrigger", "AccordionItem");
|
|
2177
|
+
return n.list.track(), () => s(xn, {
|
|
2178
|
+
...n.list.itemAttrs,
|
|
2179
|
+
...E(n.api.value.triggerProps(r)),
|
|
2180
|
+
as: e.as,
|
|
2181
|
+
asChild: e.asChild
|
|
2182
|
+
}, t);
|
|
2183
|
+
}
|
|
2184
|
+
}), Pi = a({
|
|
2185
|
+
name: "AccordionContent",
|
|
2186
|
+
props: v,
|
|
2187
|
+
setup: (e, { slots: t }) => {
|
|
2188
|
+
let n = yn();
|
|
2189
|
+
return () => s(Sn, {
|
|
2190
|
+
as: e.as,
|
|
2191
|
+
asChild: e.asChild,
|
|
2192
|
+
role: "region",
|
|
2193
|
+
"aria-labelledby": n?.triggerId.value
|
|
2194
|
+
}, t);
|
|
2195
|
+
}
|
|
2196
|
+
}), Fi = Symbol("RadioGroupRoot"), Ii = Symbol("RadioGroupItem"), Li = a({
|
|
2197
|
+
name: "RadioGroupRoot",
|
|
2198
|
+
inheritAttrs: !1,
|
|
2199
|
+
props: {
|
|
2200
|
+
...v,
|
|
2201
|
+
modelValue: {
|
|
2202
|
+
type: String,
|
|
2203
|
+
default: void 0
|
|
2204
|
+
},
|
|
2205
|
+
defaultValue: {
|
|
2206
|
+
type: String,
|
|
2207
|
+
default: void 0
|
|
2208
|
+
},
|
|
2209
|
+
orientation: {
|
|
2210
|
+
type: String,
|
|
2211
|
+
default: "both"
|
|
2212
|
+
},
|
|
2213
|
+
dir: {
|
|
2214
|
+
type: String,
|
|
2215
|
+
default: "ltr"
|
|
2216
|
+
},
|
|
2217
|
+
loop: {
|
|
2218
|
+
type: Boolean,
|
|
2219
|
+
default: !0
|
|
2220
|
+
},
|
|
2221
|
+
disabled: {
|
|
2222
|
+
type: Boolean,
|
|
2223
|
+
default: !1
|
|
2224
|
+
},
|
|
2225
|
+
required: {
|
|
2226
|
+
type: Boolean,
|
|
2227
|
+
default: !1
|
|
2228
|
+
},
|
|
2229
|
+
name: {
|
|
2230
|
+
type: String,
|
|
2231
|
+
default: void 0
|
|
2232
|
+
}
|
|
2233
|
+
},
|
|
2234
|
+
emits: { "update:modelValue": (e) => typeof e == "string" },
|
|
2235
|
+
setup: (e, { slots: n, emit: r, attrs: a }) => {
|
|
2236
|
+
let o = m(null), c = D(o), l = T(At, {
|
|
2237
|
+
value: e.defaultValue,
|
|
2238
|
+
disabled: e.disabled,
|
|
2239
|
+
required: e.required,
|
|
2240
|
+
orientation: e.orientation,
|
|
2241
|
+
dir: e.dir,
|
|
2242
|
+
loop: e.loop,
|
|
2243
|
+
baseId: g()
|
|
2244
|
+
}, {
|
|
2245
|
+
controlled: {
|
|
2246
|
+
value: () => e.modelValue,
|
|
2247
|
+
disabled: () => e.disabled,
|
|
2248
|
+
required: () => e.required,
|
|
2249
|
+
orientation: () => e.orientation,
|
|
2250
|
+
dir: () => e.dir,
|
|
2251
|
+
loop: () => e.loop
|
|
2252
|
+
},
|
|
2253
|
+
onChange: (e, t) => {
|
|
2254
|
+
e.context.value !== t.context.value && e.context.value !== void 0 && r("update:modelValue", e.context.value);
|
|
2255
|
+
}
|
|
2256
|
+
}), u = i(() => qe(l.snapshot.value, l.send, c));
|
|
2257
|
+
return p(Fi, {
|
|
2258
|
+
api: u,
|
|
2259
|
+
list: c
|
|
2260
|
+
}), () => s(t, [s(b, {
|
|
2261
|
+
...E(u.value.rootProps),
|
|
2262
|
+
...a,
|
|
2263
|
+
ref: o,
|
|
2264
|
+
as: e.as,
|
|
2265
|
+
asChild: e.asChild
|
|
2266
|
+
}, () => n.default?.({ value: u.value.value })), e.name === void 0 ? null : s("input", E(u.value.inputProps(e.name)))]);
|
|
2267
|
+
}
|
|
2268
|
+
}), Ri = a({
|
|
2269
|
+
name: "RadioGroupItem",
|
|
2270
|
+
props: {
|
|
2271
|
+
...y,
|
|
2272
|
+
value: {
|
|
2273
|
+
type: String,
|
|
2274
|
+
required: !0
|
|
2275
|
+
},
|
|
2276
|
+
disabled: {
|
|
2277
|
+
type: Boolean,
|
|
2278
|
+
default: !1
|
|
2279
|
+
}
|
|
2280
|
+
},
|
|
2281
|
+
setup: (e, { slots: t }) => {
|
|
2282
|
+
let n = M(Fi, "RadioGroupItem", "RadioGroupRoot");
|
|
2283
|
+
n.list.track();
|
|
2284
|
+
let r = () => n.api.value.value === e.value;
|
|
2285
|
+
return p(Ii, r), () => s(b, {
|
|
2286
|
+
...n.list.itemAttrs,
|
|
2287
|
+
...E(n.api.value.itemProps({
|
|
2288
|
+
value: e.value,
|
|
2289
|
+
disabled: e.disabled
|
|
2290
|
+
}), e.as),
|
|
2291
|
+
as: e.as,
|
|
2292
|
+
asChild: e.asChild
|
|
2293
|
+
}, () => t.default?.({ checked: r() }));
|
|
2294
|
+
}
|
|
2295
|
+
}), zi = a({
|
|
2296
|
+
name: "RadioGroupIndicator",
|
|
2297
|
+
props: {
|
|
2298
|
+
...v,
|
|
2299
|
+
as: {
|
|
2300
|
+
...v.as,
|
|
2301
|
+
default: "span"
|
|
2302
|
+
}
|
|
2303
|
+
},
|
|
2304
|
+
setup: (e, { slots: t }) => {
|
|
2305
|
+
let n = c(Ii, () => !1);
|
|
2306
|
+
return () => n() ? s(b, {
|
|
2307
|
+
as: e.as,
|
|
2308
|
+
asChild: e.asChild,
|
|
2309
|
+
"data-state": "checked",
|
|
2310
|
+
"aria-hidden": "true"
|
|
2311
|
+
}, t) : null;
|
|
2312
|
+
}
|
|
2313
|
+
}), Bi = a({
|
|
2314
|
+
name: "ToggleRoot",
|
|
2315
|
+
props: {
|
|
2316
|
+
...y,
|
|
2317
|
+
pressed: {
|
|
2318
|
+
type: Boolean,
|
|
2319
|
+
default: void 0
|
|
2320
|
+
},
|
|
2321
|
+
defaultPressed: {
|
|
2322
|
+
type: Boolean,
|
|
2323
|
+
default: !1
|
|
2324
|
+
},
|
|
2325
|
+
disabled: {
|
|
2326
|
+
type: Boolean,
|
|
2327
|
+
default: !1
|
|
2328
|
+
}
|
|
2329
|
+
},
|
|
2330
|
+
emits: { "update:pressed": (e) => typeof e == "boolean" },
|
|
2331
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
2332
|
+
let r = T(Jt, {
|
|
2333
|
+
pressed: e.defaultPressed,
|
|
2334
|
+
disabled: e.disabled
|
|
2335
|
+
}, {
|
|
2336
|
+
controlled: {
|
|
2337
|
+
pressed: () => e.pressed,
|
|
2338
|
+
disabled: () => e.disabled
|
|
2339
|
+
},
|
|
2340
|
+
onChange: (e, n) => {
|
|
2341
|
+
e.context.pressed !== n.context.pressed && t("update:pressed", e.context.pressed);
|
|
2342
|
+
}
|
|
2343
|
+
}), a = i(() => nt(r.snapshot.value, r.send));
|
|
2344
|
+
return () => s(b, {
|
|
2345
|
+
...E(a.value.rootProps, e.as),
|
|
2346
|
+
as: e.as,
|
|
2347
|
+
asChild: e.asChild
|
|
2348
|
+
}, () => n.default?.({ pressed: a.value.pressed }));
|
|
2349
|
+
}
|
|
2350
|
+
}), Vi = Symbol("ToggleGroupRoot"), Hi = (e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], Ui = a({
|
|
2351
|
+
name: "ToggleGroupRoot",
|
|
2352
|
+
props: {
|
|
2353
|
+
...v,
|
|
2354
|
+
type: {
|
|
2355
|
+
type: String,
|
|
2356
|
+
default: "single"
|
|
2357
|
+
},
|
|
2358
|
+
modelValue: {
|
|
2359
|
+
type: [String, Array],
|
|
2360
|
+
default: void 0
|
|
2361
|
+
},
|
|
2362
|
+
defaultValue: {
|
|
2363
|
+
type: [String, Array],
|
|
2364
|
+
default: void 0
|
|
2365
|
+
},
|
|
2366
|
+
allowEmpty: {
|
|
2367
|
+
type: Boolean,
|
|
2368
|
+
default: !0
|
|
2369
|
+
},
|
|
2370
|
+
disabled: {
|
|
2371
|
+
type: Boolean,
|
|
2372
|
+
default: !1
|
|
2373
|
+
},
|
|
2374
|
+
orientation: {
|
|
2375
|
+
type: String,
|
|
2376
|
+
default: "horizontal"
|
|
2377
|
+
},
|
|
2378
|
+
loop: {
|
|
2379
|
+
type: Boolean,
|
|
2380
|
+
default: !0
|
|
2381
|
+
},
|
|
2382
|
+
dir: {
|
|
2383
|
+
type: String,
|
|
2384
|
+
default: "ltr"
|
|
2385
|
+
}
|
|
2386
|
+
},
|
|
2387
|
+
emits: { "update:modelValue": (e) => e === void 0 || typeof e == "string" || Array.isArray(e) },
|
|
2388
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
2389
|
+
let r = m(null), a = D(r), o = T(qt, {
|
|
2390
|
+
pressed: Hi(e.defaultValue),
|
|
2391
|
+
type: e.type,
|
|
2392
|
+
allowEmpty: e.allowEmpty,
|
|
2393
|
+
disabled: e.disabled,
|
|
2394
|
+
orientation: e.orientation,
|
|
2395
|
+
dir: e.dir,
|
|
2396
|
+
loop: e.loop,
|
|
2397
|
+
focused: void 0,
|
|
2398
|
+
baseId: g()
|
|
2399
|
+
}, {
|
|
2400
|
+
controlled: {
|
|
2401
|
+
pressed: () => e.modelValue === void 0 ? void 0 : Hi(e.modelValue),
|
|
2402
|
+
type: () => e.type,
|
|
2403
|
+
allowEmpty: () => e.allowEmpty,
|
|
2404
|
+
disabled: () => e.disabled,
|
|
2405
|
+
orientation: () => e.orientation,
|
|
2406
|
+
dir: () => e.dir,
|
|
2407
|
+
loop: () => e.loop
|
|
2408
|
+
},
|
|
2409
|
+
onChange: (n, r) => {
|
|
2410
|
+
n.context.pressed !== r.context.pressed && t("update:modelValue", e.type === "multiple" ? [...n.context.pressed] : n.context.pressed[0]);
|
|
2411
|
+
}
|
|
2412
|
+
}), c = i(() => rt(o.snapshot.value, o.send, a));
|
|
2413
|
+
return p(Vi, {
|
|
2414
|
+
api: c,
|
|
2415
|
+
list: a
|
|
2416
|
+
}), () => s(b, {
|
|
2417
|
+
...E(c.value.rootProps),
|
|
2418
|
+
ref: r,
|
|
2419
|
+
as: e.as,
|
|
2420
|
+
asChild: e.asChild
|
|
2421
|
+
}, n);
|
|
2422
|
+
}
|
|
2423
|
+
}), Wi = a({
|
|
2424
|
+
name: "ToggleGroupItem",
|
|
2425
|
+
props: {
|
|
2426
|
+
...y,
|
|
2427
|
+
value: {
|
|
2428
|
+
type: String,
|
|
2429
|
+
required: !0
|
|
2430
|
+
},
|
|
2431
|
+
disabled: {
|
|
2432
|
+
type: Boolean,
|
|
2433
|
+
default: !1
|
|
2434
|
+
}
|
|
2435
|
+
},
|
|
2436
|
+
setup: (e, { slots: t }) => {
|
|
2437
|
+
let n = M(Vi, "ToggleGroupItem", "ToggleGroupRoot");
|
|
2438
|
+
return n.list.track(), () => s(b, {
|
|
2439
|
+
...n.list.itemAttrs,
|
|
2440
|
+
...E(n.api.value.itemProps({
|
|
2441
|
+
value: e.value,
|
|
2442
|
+
disabled: e.disabled
|
|
2443
|
+
}), e.as),
|
|
2444
|
+
as: e.as,
|
|
2445
|
+
asChild: e.asChild
|
|
2446
|
+
}, () => t.default?.({ pressed: n.api.value.pressed.includes(e.value) }));
|
|
2447
|
+
}
|
|
2448
|
+
}), U = Symbol("SliderRoot"), Gi = a({
|
|
2449
|
+
name: "SliderRoot",
|
|
2450
|
+
props: {
|
|
2451
|
+
...v,
|
|
2452
|
+
modelValue: {
|
|
2453
|
+
type: Array,
|
|
2454
|
+
default: void 0
|
|
2455
|
+
},
|
|
2456
|
+
defaultValue: {
|
|
2457
|
+
type: Array,
|
|
2458
|
+
default: () => [0]
|
|
2459
|
+
},
|
|
2460
|
+
min: {
|
|
2461
|
+
type: Number,
|
|
2462
|
+
default: 0
|
|
2463
|
+
},
|
|
2464
|
+
max: {
|
|
2465
|
+
type: Number,
|
|
2466
|
+
default: 100
|
|
2467
|
+
},
|
|
2468
|
+
step: {
|
|
2469
|
+
type: Number,
|
|
2470
|
+
default: 1
|
|
2471
|
+
},
|
|
2472
|
+
minStepsBetween: {
|
|
2473
|
+
type: Number,
|
|
2474
|
+
default: 0
|
|
2475
|
+
},
|
|
2476
|
+
orientation: {
|
|
2477
|
+
type: String,
|
|
2478
|
+
default: "horizontal"
|
|
2479
|
+
},
|
|
2480
|
+
dir: {
|
|
2481
|
+
type: String,
|
|
2482
|
+
default: "ltr"
|
|
2483
|
+
},
|
|
2484
|
+
disabled: {
|
|
2485
|
+
type: Boolean,
|
|
2486
|
+
default: !1
|
|
2487
|
+
},
|
|
2488
|
+
getValueLabel: {
|
|
2489
|
+
type: Function,
|
|
2490
|
+
default: void 0
|
|
2491
|
+
},
|
|
2492
|
+
name: {
|
|
2493
|
+
type: String,
|
|
2494
|
+
default: void 0
|
|
2495
|
+
}
|
|
2496
|
+
},
|
|
2497
|
+
emits: {
|
|
2498
|
+
"update:modelValue": (e) => Array.isArray(e),
|
|
2499
|
+
commit: (e) => Array.isArray(e)
|
|
2500
|
+
},
|
|
2501
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
2502
|
+
let r = g(), a = T(It, {
|
|
2503
|
+
values: e.defaultValue,
|
|
2504
|
+
min: e.min,
|
|
2505
|
+
max: e.max,
|
|
2506
|
+
step: e.step,
|
|
2507
|
+
minStepsBetween: e.minStepsBetween,
|
|
2508
|
+
orientation: e.orientation,
|
|
2509
|
+
dir: e.dir,
|
|
2510
|
+
disabled: e.disabled,
|
|
2511
|
+
active: null,
|
|
2512
|
+
track: null,
|
|
2513
|
+
pointerId: 0,
|
|
2514
|
+
commits: 0,
|
|
2515
|
+
ids: {
|
|
2516
|
+
root: `${r}-slider`,
|
|
2517
|
+
thumb: `${r}-thumb`
|
|
2518
|
+
}
|
|
2519
|
+
}, {
|
|
2520
|
+
controlled: {
|
|
2521
|
+
values: () => e.modelValue,
|
|
2522
|
+
min: () => e.min,
|
|
2523
|
+
max: () => e.max,
|
|
2524
|
+
step: () => e.step,
|
|
2525
|
+
minStepsBetween: () => e.minStepsBetween,
|
|
2526
|
+
orientation: () => e.orientation,
|
|
2527
|
+
dir: () => e.dir,
|
|
2528
|
+
disabled: () => e.disabled
|
|
2529
|
+
},
|
|
2530
|
+
onChange: (e, n) => {
|
|
2531
|
+
e.context.values !== n.context.values && t("update:modelValue", [...e.context.values]), e.context.commits !== n.context.commits && t("commit", [...e.context.values]);
|
|
2532
|
+
}
|
|
2533
|
+
}), o = i(() => Ye(a.snapshot.value, a.send, a.query));
|
|
2534
|
+
return p(U, {
|
|
2535
|
+
api: o,
|
|
2536
|
+
label: (t, n) => e.getValueLabel?.(t, n)
|
|
2537
|
+
}), () => s(b, {
|
|
2538
|
+
...E(o.value.rootProps),
|
|
2539
|
+
as: e.as,
|
|
2540
|
+
asChild: e.asChild
|
|
2541
|
+
}, () => [n.default?.({ values: o.value.values }), e.name === void 0 ? null : o.value.inputProps(e.name).map((e) => s("input", E(e)))]);
|
|
2542
|
+
}
|
|
2543
|
+
}), Ki = a({
|
|
2544
|
+
name: "SliderTrack",
|
|
2545
|
+
props: v,
|
|
2546
|
+
setup: (e, { slots: t }) => {
|
|
2547
|
+
let n = M(U, "SliderTrack", "SliderRoot");
|
|
2548
|
+
return () => s(b, {
|
|
2549
|
+
...E(n.api.value.trackProps),
|
|
2550
|
+
as: e.as,
|
|
2551
|
+
asChild: e.asChild
|
|
2552
|
+
}, t);
|
|
2553
|
+
}
|
|
2554
|
+
}), qi = a({
|
|
2555
|
+
name: "SliderRange",
|
|
2556
|
+
props: v,
|
|
2557
|
+
setup: (e, { slots: t }) => {
|
|
2558
|
+
let n = M(U, "SliderRange", "SliderRoot");
|
|
2559
|
+
return () => s(b, {
|
|
2560
|
+
...E(n.api.value.rangeProps),
|
|
2561
|
+
as: e.as,
|
|
2562
|
+
asChild: e.asChild
|
|
2563
|
+
}, t);
|
|
2564
|
+
}
|
|
2565
|
+
}), Ji = a({
|
|
2566
|
+
name: "SliderThumb",
|
|
2567
|
+
props: {
|
|
2568
|
+
...v,
|
|
2569
|
+
as: {
|
|
2570
|
+
...v.as,
|
|
2571
|
+
default: "span"
|
|
2572
|
+
},
|
|
2573
|
+
index: {
|
|
2574
|
+
type: Number,
|
|
2575
|
+
default: 0
|
|
2576
|
+
}
|
|
2577
|
+
},
|
|
2578
|
+
setup: (e, { slots: t }) => {
|
|
2579
|
+
let n = M(U, "SliderThumb", "SliderRoot");
|
|
2580
|
+
return () => {
|
|
2581
|
+
let r = n.api.value.values[e.index] ?? 0;
|
|
2582
|
+
return s(b, {
|
|
2583
|
+
...E(n.api.value.thumbProps(e.index, n.label(r, e.index))),
|
|
2584
|
+
as: e.as,
|
|
2585
|
+
asChild: e.asChild
|
|
2586
|
+
}, () => t.default?.({ value: r }));
|
|
2587
|
+
};
|
|
2588
|
+
}
|
|
2589
|
+
}), W = Symbol("NumberFieldRoot"), Yi = a({
|
|
2590
|
+
name: "NumberFieldRoot",
|
|
2591
|
+
props: {
|
|
2592
|
+
...v,
|
|
2593
|
+
modelValue: {
|
|
2594
|
+
type: Number,
|
|
2595
|
+
default: void 0
|
|
2596
|
+
},
|
|
2597
|
+
defaultValue: {
|
|
2598
|
+
type: Number,
|
|
2599
|
+
default: null
|
|
2600
|
+
},
|
|
2601
|
+
min: {
|
|
2602
|
+
type: Number,
|
|
2603
|
+
default: void 0
|
|
2604
|
+
},
|
|
2605
|
+
max: {
|
|
2606
|
+
type: Number,
|
|
2607
|
+
default: void 0
|
|
2608
|
+
},
|
|
2609
|
+
step: {
|
|
2610
|
+
type: Number,
|
|
2611
|
+
default: 1
|
|
2612
|
+
},
|
|
2613
|
+
locale: {
|
|
2614
|
+
type: String,
|
|
2615
|
+
default: void 0
|
|
2616
|
+
},
|
|
2617
|
+
formatOptions: {
|
|
2618
|
+
type: Object,
|
|
2619
|
+
default: void 0
|
|
2620
|
+
},
|
|
2621
|
+
disabled: {
|
|
2622
|
+
type: Boolean,
|
|
2623
|
+
default: !1
|
|
2624
|
+
},
|
|
2625
|
+
getValueLabel: {
|
|
2626
|
+
type: Function,
|
|
2627
|
+
default: void 0
|
|
2628
|
+
},
|
|
2629
|
+
name: {
|
|
2630
|
+
type: String,
|
|
2631
|
+
default: void 0
|
|
2632
|
+
}
|
|
2633
|
+
},
|
|
2634
|
+
emits: { "update:modelValue": (e) => e === null || typeof e == "number" },
|
|
2635
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
2636
|
+
let r = e.modelValue === void 0 ? e.defaultValue : e.modelValue, a = T(Tt, {
|
|
2637
|
+
value: r,
|
|
2638
|
+
text: gt({
|
|
2639
|
+
locale: e.locale,
|
|
2640
|
+
formatOptions: e.formatOptions
|
|
2641
|
+
}, r),
|
|
2642
|
+
editing: !1,
|
|
2643
|
+
min: e.min,
|
|
2644
|
+
max: e.max,
|
|
2645
|
+
step: e.step,
|
|
2646
|
+
locale: e.locale,
|
|
2647
|
+
formatOptions: e.formatOptions,
|
|
2648
|
+
disabled: e.disabled,
|
|
2649
|
+
holding: 0,
|
|
2650
|
+
ticks: 0
|
|
2651
|
+
}, {
|
|
2652
|
+
controlled: {
|
|
2653
|
+
value: () => e.modelValue,
|
|
2654
|
+
min: () => e.min,
|
|
2655
|
+
max: () => e.max,
|
|
2656
|
+
step: () => e.step,
|
|
2657
|
+
locale: () => e.locale,
|
|
2658
|
+
formatOptions: () => e.formatOptions,
|
|
2659
|
+
disabled: () => e.disabled
|
|
2660
|
+
},
|
|
2661
|
+
onChange: (e, n) => {
|
|
2662
|
+
e.context.value !== n.context.value && t("update:modelValue", e.context.value);
|
|
2663
|
+
}
|
|
2664
|
+
}), o = i(() => Ue(a.snapshot.value, a.send));
|
|
2665
|
+
return p(W, {
|
|
2666
|
+
api: o,
|
|
2667
|
+
label: (t) => e.getValueLabel?.(t)
|
|
2668
|
+
}), () => s(b, {
|
|
2669
|
+
...E(o.value.rootProps),
|
|
2670
|
+
as: e.as,
|
|
2671
|
+
asChild: e.asChild
|
|
2672
|
+
}, () => [n.default?.({ value: o.value.value }), e.name === void 0 ? null : s("input", {
|
|
2673
|
+
type: "hidden",
|
|
2674
|
+
name: e.name,
|
|
2675
|
+
value: o.value.value ?? ""
|
|
2676
|
+
})]);
|
|
2677
|
+
}
|
|
2678
|
+
}), Xi = a({
|
|
2679
|
+
name: "NumberFieldInput",
|
|
2680
|
+
props: {
|
|
2681
|
+
...v,
|
|
2682
|
+
as: {
|
|
2683
|
+
...v.as,
|
|
2684
|
+
default: "input"
|
|
2685
|
+
}
|
|
2686
|
+
},
|
|
2687
|
+
setup: (e) => {
|
|
2688
|
+
let t = M(W, "NumberFieldInput", "NumberFieldRoot");
|
|
2689
|
+
return () => {
|
|
2690
|
+
let n = t.api.value.value;
|
|
2691
|
+
return s(b, {
|
|
2692
|
+
...E(t.api.value.inputProps(n === null ? void 0 : t.label(n))),
|
|
2693
|
+
as: e.as,
|
|
2694
|
+
asChild: e.asChild
|
|
2695
|
+
});
|
|
2696
|
+
};
|
|
2697
|
+
}
|
|
2698
|
+
}), Zi = (e, t, n) => a({
|
|
2699
|
+
name: e,
|
|
2700
|
+
props: y,
|
|
2701
|
+
setup: (r, { slots: i }) => {
|
|
2702
|
+
let a = M(W, e, "NumberFieldRoot");
|
|
2703
|
+
return () => s(b, {
|
|
2704
|
+
...E(a.api.value.stepperProps(t, n), r.as),
|
|
2705
|
+
as: r.as,
|
|
2706
|
+
asChild: r.asChild
|
|
2707
|
+
}, i);
|
|
2708
|
+
}
|
|
2709
|
+
}), Qi = Zi("NumberFieldIncrement", 1, "Increase"), $i = Zi("NumberFieldDecrement", -1, "Decrease"), ea = Symbol("PinInputRoot"), ta = a({
|
|
2710
|
+
name: "PinInputRoot",
|
|
2711
|
+
props: {
|
|
2712
|
+
...v,
|
|
2713
|
+
modelValue: {
|
|
2714
|
+
type: String,
|
|
2715
|
+
default: void 0
|
|
2716
|
+
},
|
|
2717
|
+
defaultValue: {
|
|
2718
|
+
type: String,
|
|
2719
|
+
default: ""
|
|
2720
|
+
},
|
|
2721
|
+
length: {
|
|
2722
|
+
type: Number,
|
|
2723
|
+
default: 6
|
|
2724
|
+
},
|
|
2725
|
+
type: {
|
|
2726
|
+
type: String,
|
|
2727
|
+
default: "numeric"
|
|
2728
|
+
},
|
|
2729
|
+
mask: {
|
|
2730
|
+
type: Boolean,
|
|
2731
|
+
default: !1
|
|
2732
|
+
},
|
|
2733
|
+
otp: {
|
|
2734
|
+
type: Boolean,
|
|
2735
|
+
default: !1
|
|
2736
|
+
},
|
|
2737
|
+
disabled: {
|
|
2738
|
+
type: Boolean,
|
|
2739
|
+
default: !1
|
|
2740
|
+
},
|
|
2741
|
+
invalid: {
|
|
2742
|
+
type: Boolean,
|
|
2743
|
+
default: !1
|
|
2744
|
+
},
|
|
2745
|
+
placeholder: {
|
|
2746
|
+
type: String,
|
|
2747
|
+
default: ""
|
|
2748
|
+
},
|
|
2749
|
+
name: {
|
|
2750
|
+
type: String,
|
|
2751
|
+
default: void 0
|
|
2752
|
+
}
|
|
2753
|
+
},
|
|
2754
|
+
emits: {
|
|
2755
|
+
"update:modelValue": (e) => typeof e == "string",
|
|
2756
|
+
complete: (e) => typeof e == "string"
|
|
2757
|
+
},
|
|
2758
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
2759
|
+
let r = g(), a = () => Math.max(1, Math.floor(e.length)), o = T(Dt, {
|
|
2760
|
+
value: e.defaultValue,
|
|
2761
|
+
length: a(),
|
|
2762
|
+
type: e.type,
|
|
2763
|
+
disabled: e.disabled,
|
|
2764
|
+
completions: 0,
|
|
2765
|
+
cursor: 0,
|
|
2766
|
+
focusedWhenDisabled: !1,
|
|
2767
|
+
ids: {
|
|
2768
|
+
base: `${r}-box`,
|
|
2769
|
+
root: `${r}-pin`
|
|
2770
|
+
}
|
|
2771
|
+
}, {
|
|
2772
|
+
controlled: {
|
|
2773
|
+
value: () => e.modelValue,
|
|
2774
|
+
length: a,
|
|
2775
|
+
type: () => e.type,
|
|
2776
|
+
disabled: () => e.disabled
|
|
2777
|
+
},
|
|
2778
|
+
onChange: (e, n) => {
|
|
2779
|
+
e.context.value !== n.context.value && t("update:modelValue", e.context.value), e.context.completions !== n.context.completions && t("complete", e.context.value);
|
|
2780
|
+
}
|
|
2781
|
+
}), c = i(() => We(o.snapshot.value, o.send, o.query));
|
|
2782
|
+
return p(ea, {
|
|
2783
|
+
api: c,
|
|
2784
|
+
setFirstId: (e) => o.sync({ ids: {
|
|
2785
|
+
...o.snapshot.value.context.ids,
|
|
2786
|
+
first: e
|
|
2787
|
+
} }),
|
|
2788
|
+
firstId: () => o.snapshot.value.context.ids.first ?? `${o.snapshot.value.context.ids.base}-0`,
|
|
2789
|
+
options: () => ({
|
|
2790
|
+
mask: e.mask,
|
|
2791
|
+
otp: e.otp,
|
|
2792
|
+
invalid: e.invalid,
|
|
2793
|
+
placeholder: e.placeholder
|
|
2794
|
+
})
|
|
2795
|
+
}), _(() => e.disabled, (e) => c.value.disabling(e), { flush: "pre" }), () => s(b, {
|
|
2796
|
+
...E(c.value.rootProps(e.invalid)),
|
|
2797
|
+
as: e.as,
|
|
2798
|
+
asChild: e.asChild
|
|
2799
|
+
}, () => [n.default?.({
|
|
2800
|
+
value: c.value.value,
|
|
2801
|
+
length: a(),
|
|
2802
|
+
complete: c.value.complete
|
|
2803
|
+
}), e.name === void 0 ? null : s("input", {
|
|
2804
|
+
type: "hidden",
|
|
2805
|
+
name: e.name,
|
|
2806
|
+
value: c.value.value
|
|
2807
|
+
})]);
|
|
2808
|
+
}
|
|
2809
|
+
}), na = a({
|
|
2810
|
+
name: "PinInputInput",
|
|
2811
|
+
props: {
|
|
2812
|
+
...v,
|
|
2813
|
+
as: {
|
|
2814
|
+
...v.as,
|
|
2815
|
+
default: "input"
|
|
2816
|
+
},
|
|
2817
|
+
index: {
|
|
2818
|
+
type: Number,
|
|
2819
|
+
required: !0
|
|
2820
|
+
},
|
|
2821
|
+
label: {
|
|
2822
|
+
type: String,
|
|
2823
|
+
default: void 0
|
|
2824
|
+
}
|
|
2825
|
+
},
|
|
2826
|
+
setup: (e) => {
|
|
2827
|
+
let t = M(ea, "PinInputInput", "PinInputRoot"), n = m(null);
|
|
2828
|
+
return e.index === 0 && w(n, t.firstId, t.setFirstId), () => s(b, {
|
|
2829
|
+
...E(t.api.value.boxProps(e.index, {
|
|
2830
|
+
...t.options(),
|
|
2831
|
+
label: e.label
|
|
2832
|
+
})),
|
|
2833
|
+
ref: n,
|
|
2834
|
+
as: e.as,
|
|
2835
|
+
asChild: e.asChild
|
|
2836
|
+
});
|
|
2837
|
+
}
|
|
2838
|
+
}), ra = Symbol("ProgressRoot"), ia = a({
|
|
2839
|
+
name: "ProgressRoot",
|
|
2840
|
+
props: {
|
|
2841
|
+
...v,
|
|
2842
|
+
value: {
|
|
2843
|
+
type: Number,
|
|
2844
|
+
default: null
|
|
2845
|
+
},
|
|
2846
|
+
max: {
|
|
2847
|
+
type: Number,
|
|
2848
|
+
default: 100
|
|
2849
|
+
},
|
|
2850
|
+
getValueLabel: {
|
|
2851
|
+
type: Function,
|
|
2852
|
+
default: void 0
|
|
2853
|
+
}
|
|
2854
|
+
},
|
|
2855
|
+
setup: (e, { slots: t }) => {
|
|
2856
|
+
let n = T(kt, {
|
|
2857
|
+
value: e.value,
|
|
2858
|
+
max: e.max
|
|
2859
|
+
}, { controlled: {
|
|
2860
|
+
value: () => e.value,
|
|
2861
|
+
max: () => e.max
|
|
2862
|
+
} }), r = i(() => Ke(n.snapshot.value, e.getValueLabel));
|
|
2863
|
+
return p(ra, r), () => s(b, {
|
|
2864
|
+
...E(r.value.rootProps),
|
|
2865
|
+
as: e.as,
|
|
2866
|
+
asChild: e.asChild
|
|
2867
|
+
}, t);
|
|
2868
|
+
}
|
|
2869
|
+
}), aa = a({
|
|
2870
|
+
name: "ProgressIndicator",
|
|
2871
|
+
props: v,
|
|
2872
|
+
setup: (e, { slots: t }) => {
|
|
2873
|
+
let n = c(ra, null);
|
|
2874
|
+
return () => s(b, {
|
|
2875
|
+
...E(n?.value.indicatorProps ?? {}),
|
|
2876
|
+
as: e.as,
|
|
2877
|
+
asChild: e.asChild
|
|
2878
|
+
}, t);
|
|
2879
|
+
}
|
|
2880
|
+
}), G = Symbol("AvatarRoot"), oa = a({
|
|
2881
|
+
name: "AvatarRoot",
|
|
2882
|
+
props: {
|
|
2883
|
+
...v,
|
|
2884
|
+
as: {
|
|
2885
|
+
...v.as,
|
|
2886
|
+
default: "span"
|
|
2887
|
+
}
|
|
2888
|
+
},
|
|
2889
|
+
setup: (e, { slots: t }) => {
|
|
2890
|
+
let n = T(xe, { src: void 0 });
|
|
2891
|
+
return p(G, {
|
|
2892
|
+
snapshot: n.snapshot,
|
|
2893
|
+
setSource: (e) => n.send({
|
|
2894
|
+
type: "SOURCE",
|
|
2895
|
+
src: e
|
|
2896
|
+
})
|
|
2897
|
+
}), () => s(b, {
|
|
2898
|
+
as: e.as,
|
|
2899
|
+
asChild: e.asChild,
|
|
2900
|
+
"data-status": n.snapshot.value.state
|
|
2901
|
+
}, t);
|
|
2902
|
+
}
|
|
2903
|
+
}), sa = a({
|
|
2904
|
+
name: "AvatarImage",
|
|
2905
|
+
props: {
|
|
2906
|
+
src: {
|
|
2907
|
+
type: String,
|
|
2908
|
+
default: void 0
|
|
2909
|
+
},
|
|
2910
|
+
alt: {
|
|
2911
|
+
type: String,
|
|
2912
|
+
default: ""
|
|
2913
|
+
}
|
|
2914
|
+
},
|
|
2915
|
+
emits: { status: (e) => typeof e == "string" },
|
|
2916
|
+
setup: (e, { emit: t, attrs: n }) => {
|
|
2917
|
+
let r = M(G, "AvatarImage", "AvatarRoot");
|
|
2918
|
+
return r.setSource(e.src), _(() => e.src, r.setSource), _(() => r.snapshot.value.state, (e) => t("status", e), { immediate: !0 }), () => r.snapshot.value.state === "loaded" ? s("img", {
|
|
2919
|
+
...n,
|
|
2920
|
+
src: e.src,
|
|
2921
|
+
alt: e.alt
|
|
2922
|
+
}) : null;
|
|
2923
|
+
}
|
|
2924
|
+
}), ca = a({
|
|
2925
|
+
name: "AvatarFallback",
|
|
2926
|
+
props: {
|
|
2927
|
+
...v,
|
|
2928
|
+
as: {
|
|
2929
|
+
...v.as,
|
|
2930
|
+
default: "span"
|
|
2931
|
+
},
|
|
2932
|
+
delayMs: {
|
|
2933
|
+
type: Number,
|
|
2934
|
+
default: 0
|
|
2935
|
+
}
|
|
2936
|
+
},
|
|
2937
|
+
setup: (e, { slots: t }) => {
|
|
2938
|
+
let n = c(G, null), r = T(lt, { delay: e.delayMs });
|
|
2939
|
+
return () => r.snapshot.value.state === "ready" && n?.snapshot.value.state !== "loaded" ? s(b, {
|
|
2940
|
+
as: e.as,
|
|
2941
|
+
asChild: e.asChild
|
|
2942
|
+
}, t) : null;
|
|
2943
|
+
}
|
|
2944
|
+
}), la = Symbol("CalendarRoot"), K = (e) => M(la, e, "CalendarRoot"), q = (e) => e !== void 0 && vt(e) ? e : void 0, ua = a({
|
|
2945
|
+
name: "CalendarRoot",
|
|
2946
|
+
props: {
|
|
2947
|
+
...v,
|
|
2948
|
+
mode: {
|
|
2949
|
+
type: String,
|
|
2950
|
+
default: "single"
|
|
2951
|
+
},
|
|
2952
|
+
modelValue: {
|
|
2953
|
+
type: String,
|
|
2954
|
+
default: void 0
|
|
2955
|
+
},
|
|
2956
|
+
defaultValue: {
|
|
2957
|
+
type: String,
|
|
2958
|
+
default: void 0
|
|
2959
|
+
},
|
|
2960
|
+
start: {
|
|
2961
|
+
type: String,
|
|
2962
|
+
default: void 0
|
|
2963
|
+
},
|
|
2964
|
+
end: {
|
|
2965
|
+
type: String,
|
|
2966
|
+
default: void 0
|
|
2967
|
+
},
|
|
2968
|
+
month: {
|
|
2969
|
+
type: String,
|
|
2970
|
+
default: void 0
|
|
2971
|
+
},
|
|
2972
|
+
numberOfMonths: {
|
|
2973
|
+
type: Number,
|
|
2974
|
+
default: 1
|
|
2975
|
+
},
|
|
2976
|
+
weekStartsOn: {
|
|
2977
|
+
type: Number,
|
|
2978
|
+
default: 1
|
|
2979
|
+
},
|
|
2980
|
+
locale: {
|
|
2981
|
+
type: String,
|
|
2982
|
+
default: void 0
|
|
2983
|
+
},
|
|
2984
|
+
min: {
|
|
2985
|
+
type: String,
|
|
2986
|
+
default: void 0
|
|
2987
|
+
},
|
|
2988
|
+
max: {
|
|
2989
|
+
type: String,
|
|
2990
|
+
default: void 0
|
|
2991
|
+
},
|
|
2992
|
+
isDateDisabled: {
|
|
2993
|
+
type: Function,
|
|
2994
|
+
default: void 0
|
|
2995
|
+
},
|
|
2996
|
+
disabled: {
|
|
2997
|
+
type: Boolean,
|
|
2998
|
+
default: !1
|
|
2999
|
+
},
|
|
3000
|
+
readonly: {
|
|
3001
|
+
type: Boolean,
|
|
3002
|
+
default: !1
|
|
3003
|
+
},
|
|
3004
|
+
dir: {
|
|
3005
|
+
type: String,
|
|
3006
|
+
default: "ltr"
|
|
3007
|
+
}
|
|
3008
|
+
},
|
|
3009
|
+
emits: {
|
|
3010
|
+
"update:modelValue": (e) => typeof e == "string",
|
|
3011
|
+
"update:start": (e) => e === void 0 || typeof e == "string",
|
|
3012
|
+
"update:end": (e) => e === void 0 || typeof e == "string",
|
|
3013
|
+
"update:month": (e) => typeof e == "string"
|
|
3014
|
+
},
|
|
3015
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
3016
|
+
let r = Kt(), a = q(e.modelValue) ?? q(e.defaultValue), o = q(e.start) ?? null, c = De((e.mode === "range" ? o : a) ?? r, e.min, e.max), l = () => ({
|
|
3017
|
+
min: e.min,
|
|
3018
|
+
max: e.max,
|
|
3019
|
+
isDateDisabled: e.isDateDisabled
|
|
3020
|
+
}), u = T(Se, {
|
|
3021
|
+
mode: e.mode,
|
|
3022
|
+
value: a,
|
|
3023
|
+
start: o,
|
|
3024
|
+
end: q(e.end) ?? null,
|
|
3025
|
+
month: q(e.month) === void 0 ? Bt(c) : Bt(q(e.month) ?? c),
|
|
3026
|
+
numberOfMonths: e.numberOfMonths,
|
|
3027
|
+
weekStartsOn: e.weekStartsOn,
|
|
3028
|
+
locale: e.locale,
|
|
3029
|
+
bounds: l(),
|
|
3030
|
+
disabled: e.disabled,
|
|
3031
|
+
readonly: e.readonly,
|
|
3032
|
+
dir: e.dir,
|
|
3033
|
+
focused: c,
|
|
3034
|
+
hover: null,
|
|
3035
|
+
today: r,
|
|
3036
|
+
ids: { base: `${g()}-day` }
|
|
3037
|
+
}, {
|
|
3038
|
+
controlled: {
|
|
3039
|
+
value: () => q(e.modelValue),
|
|
3040
|
+
start: () => e.start === void 0 ? void 0 : q(e.start) ?? null,
|
|
3041
|
+
end: () => e.end === void 0 ? void 0 : q(e.end) ?? null,
|
|
3042
|
+
month: () => q(e.month) === void 0 ? void 0 : Bt(q(e.month) ?? r),
|
|
3043
|
+
mode: () => e.mode,
|
|
3044
|
+
numberOfMonths: () => e.numberOfMonths,
|
|
3045
|
+
weekStartsOn: () => e.weekStartsOn,
|
|
3046
|
+
locale: () => e.locale,
|
|
3047
|
+
bounds: l,
|
|
3048
|
+
disabled: () => e.disabled,
|
|
3049
|
+
readonly: () => e.readonly,
|
|
3050
|
+
dir: () => e.dir
|
|
3051
|
+
},
|
|
3052
|
+
onChange: (e, n) => {
|
|
3053
|
+
e.context.value !== n.context.value && e.context.value !== void 0 && t("update:modelValue", e.context.value), (e.context.start !== n.context.start || e.context.end !== n.context.end) && (t("update:start", e.context.start ?? void 0), t("update:end", e.context.end ?? void 0)), e.context.month !== n.context.month && t("update:month", e.context.month);
|
|
3054
|
+
}
|
|
3055
|
+
});
|
|
3056
|
+
_(() => q(e.modelValue), (e) => {
|
|
3057
|
+
e !== void 0 && u.send({
|
|
3058
|
+
type: "SHOW",
|
|
3059
|
+
date: e
|
|
3060
|
+
});
|
|
3061
|
+
});
|
|
3062
|
+
let d = i(() => Me(u.snapshot.value, u.send));
|
|
3063
|
+
return p(la, d), () => s(b, {
|
|
3064
|
+
...E(d.value.rootProps),
|
|
3065
|
+
as: e.as,
|
|
3066
|
+
asChild: e.asChild
|
|
3067
|
+
}, () => n.default?.({
|
|
3068
|
+
months: d.value.months,
|
|
3069
|
+
weekdays: nn(e.weekStartsOn, e.locale)
|
|
3070
|
+
}));
|
|
3071
|
+
}
|
|
3072
|
+
}), da = { month: {
|
|
3073
|
+
type: String,
|
|
3074
|
+
default: void 0
|
|
3075
|
+
} }, fa = a({
|
|
3076
|
+
name: "CalendarHeading",
|
|
3077
|
+
props: {
|
|
3078
|
+
...v,
|
|
3079
|
+
as: {
|
|
3080
|
+
...v.as,
|
|
3081
|
+
default: "h2"
|
|
3082
|
+
},
|
|
3083
|
+
...da
|
|
3084
|
+
},
|
|
3085
|
+
setup: (e, { slots: t }) => {
|
|
3086
|
+
let n = K("CalendarHeading");
|
|
3087
|
+
return () => {
|
|
3088
|
+
let r = e.month ?? n.value.month, i = n.value.headingText(r);
|
|
3089
|
+
return s(b, {
|
|
3090
|
+
...E(n.value.headingProps(r)),
|
|
3091
|
+
as: e.as,
|
|
3092
|
+
asChild: e.asChild
|
|
3093
|
+
}, () => t.default?.({ heading: i }) ?? i);
|
|
3094
|
+
};
|
|
3095
|
+
}
|
|
3096
|
+
}), pa = (e, t, n) => a({
|
|
3097
|
+
name: e,
|
|
3098
|
+
props: {
|
|
3099
|
+
...y,
|
|
3100
|
+
label: {
|
|
3101
|
+
type: String,
|
|
3102
|
+
default: n
|
|
3103
|
+
}
|
|
3104
|
+
},
|
|
3105
|
+
setup: (n, { slots: r }) => {
|
|
3106
|
+
let i = K(e);
|
|
3107
|
+
return () => s(b, {
|
|
3108
|
+
...E(i.value.pagerProps(t, n.label), n.as),
|
|
3109
|
+
as: n.as,
|
|
3110
|
+
asChild: n.asChild
|
|
3111
|
+
}, r);
|
|
3112
|
+
}
|
|
3113
|
+
}), ma = pa("CalendarPrev", -1, "Previous month"), ha = pa("CalendarNext", 1, "Next month"), ga = a({
|
|
3114
|
+
name: "CalendarGrid",
|
|
3115
|
+
props: {
|
|
3116
|
+
...v,
|
|
3117
|
+
as: {
|
|
3118
|
+
...v.as,
|
|
3119
|
+
default: "table"
|
|
3120
|
+
},
|
|
3121
|
+
...da
|
|
3122
|
+
},
|
|
3123
|
+
setup: (e, { slots: t }) => {
|
|
3124
|
+
let n = K("CalendarGrid");
|
|
3125
|
+
return () => s(b, {
|
|
3126
|
+
...E(n.value.gridProps(e.month ?? n.value.month)),
|
|
3127
|
+
as: e.as,
|
|
3128
|
+
asChild: e.asChild
|
|
3129
|
+
}, t);
|
|
3130
|
+
}
|
|
3131
|
+
}), _a = a({
|
|
3132
|
+
name: "CalendarHeadCell",
|
|
3133
|
+
props: {
|
|
3134
|
+
...v,
|
|
3135
|
+
as: {
|
|
3136
|
+
...v.as,
|
|
3137
|
+
default: "th"
|
|
3138
|
+
},
|
|
3139
|
+
label: {
|
|
3140
|
+
type: String,
|
|
3141
|
+
default: void 0
|
|
3142
|
+
}
|
|
3143
|
+
},
|
|
3144
|
+
setup: (e, { slots: t }) => () => s(b, {
|
|
3145
|
+
as: e.as,
|
|
3146
|
+
asChild: e.asChild,
|
|
3147
|
+
scope: "col",
|
|
3148
|
+
abbr: e.label
|
|
3149
|
+
}, t)
|
|
3150
|
+
}), va = { date: {
|
|
3151
|
+
type: String,
|
|
3152
|
+
required: !0
|
|
3153
|
+
} }, ya = a({
|
|
3154
|
+
name: "CalendarCell",
|
|
3155
|
+
props: {
|
|
3156
|
+
...v,
|
|
3157
|
+
as: {
|
|
3158
|
+
...v.as,
|
|
3159
|
+
default: "td"
|
|
3160
|
+
},
|
|
3161
|
+
...va
|
|
3162
|
+
},
|
|
3163
|
+
setup: (e, { slots: t }) => {
|
|
3164
|
+
let n = K("CalendarCell");
|
|
3165
|
+
return () => s(b, {
|
|
3166
|
+
...E(n.value.cellProps(e.date)),
|
|
3167
|
+
as: e.as,
|
|
3168
|
+
asChild: e.asChild
|
|
3169
|
+
}, t);
|
|
3170
|
+
}
|
|
3171
|
+
}), ba = a({
|
|
3172
|
+
name: "CalendarDay",
|
|
3173
|
+
props: {
|
|
3174
|
+
...y,
|
|
3175
|
+
...va,
|
|
3176
|
+
month: {
|
|
3177
|
+
type: String,
|
|
3178
|
+
default: void 0
|
|
3179
|
+
}
|
|
3180
|
+
},
|
|
3181
|
+
setup: (e, { slots: t }) => {
|
|
3182
|
+
let n = K("CalendarDay");
|
|
3183
|
+
return () => s(b, {
|
|
3184
|
+
...E(n.value.dayProps(e.date, e.month), e.as),
|
|
3185
|
+
as: e.as,
|
|
3186
|
+
asChild: e.asChild
|
|
3187
|
+
}, () => t.default?.({ day: Number(e.date.slice(8)) }) ?? String(Number(e.date.slice(8))));
|
|
3188
|
+
}
|
|
3189
|
+
}), J = ct(), xa = st(J), Sa = () => {
|
|
3190
|
+
let e = h(J.toasts()), t = J.subscribe((t) => {
|
|
3191
|
+
e.value = t;
|
|
3192
|
+
});
|
|
3193
|
+
return d(t), e;
|
|
3194
|
+
}, Ca = Symbol("ToastViewport"), Y = Symbol("ToastRoot"), wa = a({
|
|
3195
|
+
name: "ToastViewport",
|
|
3196
|
+
props: {
|
|
3197
|
+
...v,
|
|
3198
|
+
as: {
|
|
3199
|
+
...v.as,
|
|
3200
|
+
default: "ol"
|
|
3201
|
+
},
|
|
3202
|
+
hotkey: {
|
|
3203
|
+
type: String,
|
|
3204
|
+
default: "F8"
|
|
3205
|
+
},
|
|
3206
|
+
label: {
|
|
3207
|
+
type: String,
|
|
3208
|
+
default: "Notifications"
|
|
3209
|
+
}
|
|
3210
|
+
},
|
|
3211
|
+
setup: (e, { slots: t }) => {
|
|
3212
|
+
let n = Sa(), r = T(Gt, {
|
|
3213
|
+
hovered: !1,
|
|
3214
|
+
focused: !1,
|
|
3215
|
+
hidden: !1,
|
|
3216
|
+
hotkey: e.hotkey,
|
|
3217
|
+
ids: { viewport: `${g()}-toasts` }
|
|
3218
|
+
}, {
|
|
3219
|
+
controlled: { hotkey: () => e.hotkey },
|
|
3220
|
+
beforeSend: (e) => e.type !== "DOCUMENT_KEY" || n.value.length !== 0 && (e.native instanceof Event && e.native.preventDefault(), !0)
|
|
3221
|
+
}), a = i(() => tt(r.snapshot.value, r.send, {
|
|
3222
|
+
label: e.label,
|
|
3223
|
+
empty: n.value.length === 0
|
|
3224
|
+
}));
|
|
3225
|
+
return p(Ca, { paused: () => a.value.paused }), () => s(b, {
|
|
3226
|
+
...E(a.value.viewportProps),
|
|
3227
|
+
as: e.as,
|
|
3228
|
+
asChild: e.asChild
|
|
3229
|
+
}, () => t.default?.({ toasts: n.value }));
|
|
3230
|
+
}
|
|
3231
|
+
}), Ta = a({
|
|
3232
|
+
name: "ToastRoot",
|
|
3233
|
+
props: {
|
|
3234
|
+
...v,
|
|
3235
|
+
as: {
|
|
3236
|
+
...v.as,
|
|
3237
|
+
default: "li"
|
|
3238
|
+
},
|
|
3239
|
+
toast: {
|
|
3240
|
+
type: Object,
|
|
3241
|
+
required: !0
|
|
3242
|
+
}
|
|
3243
|
+
},
|
|
3244
|
+
setup: (e, { slots: t }) => {
|
|
3245
|
+
let n = c(Ca, { paused: () => !1 }), r = m(null), a = k(() => e.toast.open, () => C(r));
|
|
3246
|
+
p(Y, { toast: () => e.toast });
|
|
3247
|
+
let o = T(Wt, {
|
|
3248
|
+
remaining: e.toast.duration,
|
|
3249
|
+
startedAt: Date.now()
|
|
3250
|
+
}, { onChange: (t) => {
|
|
3251
|
+
t.state === "done" && J.dismiss(e.toast.id);
|
|
3252
|
+
} });
|
|
3253
|
+
_(n.paused, (e) => o.send(e ? {
|
|
3254
|
+
type: "PAUSE",
|
|
3255
|
+
now: Date.now()
|
|
3256
|
+
} : {
|
|
3257
|
+
type: "RESUME",
|
|
3258
|
+
now: Date.now()
|
|
3259
|
+
}), { immediate: !0 }), _(() => [e.toast.createdAt, e.toast.duration], () => {
|
|
3260
|
+
o.send({
|
|
3261
|
+
type: "RESTART",
|
|
3262
|
+
duration: e.toast.duration,
|
|
3263
|
+
now: Date.now()
|
|
3264
|
+
}), n.paused() && o.send({
|
|
3265
|
+
type: "PAUSE",
|
|
3266
|
+
now: Date.now()
|
|
3267
|
+
});
|
|
3268
|
+
}), _(a, (t) => {
|
|
3269
|
+
t || J.remove(e.toast.id);
|
|
3270
|
+
});
|
|
3271
|
+
let l = i(() => et(e.toast, () => J.dismiss(e.toast.id)));
|
|
3272
|
+
return () => s(b, {
|
|
3273
|
+
...E(l.value.rootProps),
|
|
3274
|
+
ref: r,
|
|
3275
|
+
as: e.as,
|
|
3276
|
+
asChild: e.asChild
|
|
3277
|
+
}, t);
|
|
3278
|
+
}
|
|
3279
|
+
}), Ea = (e, t, n) => a({
|
|
3280
|
+
name: e,
|
|
3281
|
+
props: {
|
|
3282
|
+
...v,
|
|
3283
|
+
as: {
|
|
3284
|
+
...v.as,
|
|
3285
|
+
default: n
|
|
3286
|
+
}
|
|
3287
|
+
},
|
|
3288
|
+
setup: (n, { slots: r }) => {
|
|
3289
|
+
let i = M(Y, e, "ToastRoot");
|
|
3290
|
+
return () => {
|
|
3291
|
+
let e = i.toast()[t];
|
|
3292
|
+
return e === void 0 && r.default === void 0 ? null : s(b, {
|
|
3293
|
+
as: n.as,
|
|
3294
|
+
asChild: n.asChild
|
|
3295
|
+
}, () => r.default?.() ?? e);
|
|
3296
|
+
};
|
|
3297
|
+
}
|
|
3298
|
+
}), Da = Ea("ToastTitle", "title", "p"), Oa = Ea("ToastDescription", "description", "p"), ka = a({
|
|
3299
|
+
name: "ToastAction",
|
|
3300
|
+
props: y,
|
|
3301
|
+
setup: (e, { slots: t }) => {
|
|
3302
|
+
let n = M(Y, "ToastAction", "ToastRoot");
|
|
3303
|
+
return () => {
|
|
3304
|
+
let r = n.toast().action;
|
|
3305
|
+
return r === void 0 ? null : s(b, {
|
|
3306
|
+
as: e.as,
|
|
3307
|
+
asChild: e.asChild,
|
|
3308
|
+
type: e.as === "button" ? "button" : void 0,
|
|
3309
|
+
onClick: () => {
|
|
3310
|
+
try {
|
|
3311
|
+
r.onClick();
|
|
3312
|
+
} finally {
|
|
3313
|
+
J.dismiss(n.toast().id);
|
|
3314
|
+
}
|
|
3315
|
+
}
|
|
3316
|
+
}, () => t.default?.() ?? r.label);
|
|
3317
|
+
};
|
|
3318
|
+
}
|
|
3319
|
+
}), Aa = a({
|
|
3320
|
+
name: "ToastClose",
|
|
3321
|
+
props: {
|
|
3322
|
+
...y,
|
|
3323
|
+
label: {
|
|
3324
|
+
type: String,
|
|
3325
|
+
default: "Dismiss notification"
|
|
3326
|
+
}
|
|
3327
|
+
},
|
|
3328
|
+
setup: (e, { slots: t }) => {
|
|
3329
|
+
let n = M(Y, "ToastClose", "ToastRoot");
|
|
3330
|
+
return () => s(b, {
|
|
3331
|
+
...E(et(n.toast(), () => J.dismiss(n.toast().id)).closeProps(e.label), e.as),
|
|
3332
|
+
as: e.as,
|
|
3333
|
+
asChild: e.asChild
|
|
3334
|
+
}, t);
|
|
3335
|
+
}
|
|
3336
|
+
}), X = Symbol("SplitterGroup"), ja = a({
|
|
3337
|
+
name: "SplitterGroup",
|
|
3338
|
+
props: {
|
|
3339
|
+
...v,
|
|
3340
|
+
modelValue: {
|
|
3341
|
+
type: Array,
|
|
3342
|
+
default: void 0
|
|
3343
|
+
},
|
|
3344
|
+
orientation: {
|
|
3345
|
+
type: String,
|
|
3346
|
+
default: "horizontal"
|
|
3347
|
+
},
|
|
3348
|
+
dir: {
|
|
3349
|
+
type: String,
|
|
3350
|
+
default: "ltr"
|
|
3351
|
+
},
|
|
3352
|
+
disabled: {
|
|
3353
|
+
type: Boolean,
|
|
3354
|
+
default: !1
|
|
3355
|
+
},
|
|
3356
|
+
keyboardStep: {
|
|
3357
|
+
type: Number,
|
|
3358
|
+
default: 5
|
|
3359
|
+
}
|
|
3360
|
+
},
|
|
3361
|
+
emits: { "update:modelValue": (e) => Array.isArray(e) },
|
|
3362
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
3363
|
+
let r = T(zt, {
|
|
3364
|
+
sizes: [],
|
|
3365
|
+
panels: [],
|
|
3366
|
+
orientation: e.orientation,
|
|
3367
|
+
dir: e.dir,
|
|
3368
|
+
disabled: e.disabled,
|
|
3369
|
+
keyboardStep: e.keyboardStep,
|
|
3370
|
+
ids: { group: `${g()}-splitter` },
|
|
3371
|
+
drag: null
|
|
3372
|
+
}, {
|
|
3373
|
+
controlled: {
|
|
3374
|
+
sizes: () => e.modelValue,
|
|
3375
|
+
orientation: () => e.orientation,
|
|
3376
|
+
dir: () => e.dir,
|
|
3377
|
+
disabled: () => e.disabled,
|
|
3378
|
+
keyboardStep: () => e.keyboardStep
|
|
3379
|
+
},
|
|
3380
|
+
onChange: (e, n) => {
|
|
3381
|
+
e.context.sizes !== n.context.sizes && t("update:modelValue", [...e.context.sizes]);
|
|
3382
|
+
}
|
|
3383
|
+
}), a = i(() => Ze(r.snapshot.value, r.send, r.query)), o = [], c = () => void u(() => a.value.setPanels(o));
|
|
3384
|
+
return p(X, {
|
|
3385
|
+
api: a,
|
|
3386
|
+
register: (e) => (o = [...o, e], c(), () => {
|
|
3387
|
+
o = o.filter((t) => t !== e), c();
|
|
3388
|
+
})
|
|
3389
|
+
}), () => s(b, {
|
|
3390
|
+
...E(a.value.groupProps),
|
|
3391
|
+
as: e.as,
|
|
3392
|
+
asChild: e.asChild
|
|
3393
|
+
}, n);
|
|
3394
|
+
}
|
|
3395
|
+
}), Ma = a({
|
|
3396
|
+
name: "SplitterPanel",
|
|
3397
|
+
props: {
|
|
3398
|
+
...v,
|
|
3399
|
+
defaultSize: {
|
|
3400
|
+
type: Number,
|
|
3401
|
+
default: void 0
|
|
3402
|
+
},
|
|
3403
|
+
minSize: {
|
|
3404
|
+
type: Number,
|
|
3405
|
+
default: 10
|
|
3406
|
+
},
|
|
3407
|
+
maxSize: {
|
|
3408
|
+
type: Number,
|
|
3409
|
+
default: 100
|
|
3410
|
+
}
|
|
3411
|
+
},
|
|
3412
|
+
setup: (e, { slots: t }) => {
|
|
3413
|
+
let n = M(X, "SplitterPanel", "SplitterGroup"), r = `${g()}-panel`, i = () => void 0;
|
|
3414
|
+
return f(() => {
|
|
3415
|
+
i = n.register({
|
|
3416
|
+
id: r,
|
|
3417
|
+
defaultSize: e.defaultSize,
|
|
3418
|
+
limits: {
|
|
3419
|
+
min: e.minSize,
|
|
3420
|
+
max: e.maxSize
|
|
3421
|
+
}
|
|
3422
|
+
});
|
|
3423
|
+
}), d(() => i()), () => s(b, {
|
|
3424
|
+
...E(n.api.value.panelProps(r, e.defaultSize)),
|
|
3425
|
+
as: e.as,
|
|
3426
|
+
asChild: e.asChild
|
|
3427
|
+
}, t);
|
|
3428
|
+
}
|
|
3429
|
+
}), Na = a({
|
|
3430
|
+
name: "SplitterHandle",
|
|
3431
|
+
props: {
|
|
3432
|
+
...v,
|
|
3433
|
+
as: {
|
|
3434
|
+
...v.as,
|
|
3435
|
+
default: "div"
|
|
3436
|
+
},
|
|
3437
|
+
label: {
|
|
3438
|
+
type: String,
|
|
3439
|
+
default: "Resize"
|
|
3440
|
+
}
|
|
3441
|
+
},
|
|
3442
|
+
setup: (e, { slots: t }) => {
|
|
3443
|
+
let n = M(X, "SplitterHandle", "SplitterGroup"), r = `${g()}-handle`;
|
|
3444
|
+
return () => s(b, {
|
|
3445
|
+
...E(n.api.value.handleProps(r, e.label)),
|
|
3446
|
+
as: e.as,
|
|
3447
|
+
asChild: e.asChild
|
|
3448
|
+
}, t);
|
|
3449
|
+
}
|
|
3450
|
+
}), Pa = Symbol("TreeRoot"), Z = Symbol("TreeItem"), Fa = (e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], Ia = a({
|
|
3451
|
+
name: "TreeRoot",
|
|
3452
|
+
props: {
|
|
3453
|
+
...v,
|
|
3454
|
+
as: {
|
|
3455
|
+
...v.as,
|
|
3456
|
+
default: "ul"
|
|
3457
|
+
},
|
|
3458
|
+
modelValue: {
|
|
3459
|
+
type: [String, Array],
|
|
3460
|
+
default: void 0
|
|
3461
|
+
},
|
|
3462
|
+
defaultValue: {
|
|
3463
|
+
type: [String, Array],
|
|
3464
|
+
default: void 0
|
|
3465
|
+
},
|
|
3466
|
+
multiple: {
|
|
3467
|
+
type: Boolean,
|
|
3468
|
+
default: !1
|
|
3469
|
+
},
|
|
3470
|
+
expanded: {
|
|
3471
|
+
type: Array,
|
|
3472
|
+
default: void 0
|
|
3473
|
+
},
|
|
3474
|
+
defaultExpanded: {
|
|
3475
|
+
type: Array,
|
|
3476
|
+
default: () => []
|
|
3477
|
+
}
|
|
3478
|
+
},
|
|
3479
|
+
emits: {
|
|
3480
|
+
"update:modelValue": (e) => e === void 0 || typeof e == "string" || Array.isArray(e),
|
|
3481
|
+
"update:expanded": (e) => Array.isArray(e)
|
|
3482
|
+
},
|
|
3483
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
3484
|
+
let r = m(null), a = D(r, { label: "tree" }), o = T(Qt, Zt(`${g()}-tree`, Fa(e.modelValue ?? e.defaultValue), e.expanded ?? e.defaultExpanded, e.multiple), {
|
|
3485
|
+
controlled: {
|
|
3486
|
+
value: () => e.modelValue === void 0 ? void 0 : Fa(e.modelValue),
|
|
3487
|
+
expanded: () => e.expanded,
|
|
3488
|
+
multiple: () => e.multiple
|
|
3489
|
+
},
|
|
3490
|
+
onChange: (n, r) => {
|
|
3491
|
+
n.context.value !== r.context.value && t("update:modelValue", e.multiple ? [...n.context.value] : n.context.value[0]), n.context.expanded !== r.context.expanded && t("update:expanded", [...n.context.expanded]);
|
|
3492
|
+
}
|
|
3493
|
+
}), c = i(() => at(o.snapshot.value, o.send, a, o.query));
|
|
3494
|
+
return p(Pa, {
|
|
3495
|
+
api: c,
|
|
3496
|
+
list: a,
|
|
3497
|
+
multiple: () => e.multiple
|
|
3498
|
+
}), p(Z, null), () => s(b, {
|
|
3499
|
+
...E(c.value.rootProps(e.multiple)),
|
|
3500
|
+
ref: r,
|
|
3501
|
+
as: e.as,
|
|
3502
|
+
asChild: e.asChild
|
|
3503
|
+
}, n);
|
|
3504
|
+
}
|
|
3505
|
+
}), La = a({
|
|
3506
|
+
name: "TreeItem",
|
|
3507
|
+
props: {
|
|
3508
|
+
...v,
|
|
3509
|
+
as: {
|
|
3510
|
+
...v.as,
|
|
3511
|
+
default: "li"
|
|
3512
|
+
},
|
|
3513
|
+
value: {
|
|
3514
|
+
type: String,
|
|
3515
|
+
required: !0
|
|
3516
|
+
},
|
|
3517
|
+
disabled: {
|
|
3518
|
+
type: Boolean,
|
|
3519
|
+
default: !1
|
|
3520
|
+
}
|
|
3521
|
+
},
|
|
3522
|
+
setup: (e, { slots: t }) => {
|
|
3523
|
+
let n = M(Pa, "TreeItem", "TreeRoot"), r = c(Z, null);
|
|
3524
|
+
n.list.track();
|
|
3525
|
+
let i = m(!1), a = h([]), o = () => n.api.value.isExpanded(e.value), l = (r?.depth ?? 0) + 1;
|
|
3526
|
+
return p(Z, {
|
|
3527
|
+
value: () => e.value,
|
|
3528
|
+
depth: l,
|
|
3529
|
+
hasGroup: i,
|
|
3530
|
+
expanded: o,
|
|
3531
|
+
children: a
|
|
3532
|
+
}), r !== null && (r.children.value = [...r.children.value, e.value]), d(() => {
|
|
3533
|
+
r !== null && (r.children.value = r.children.value.filter((t) => t !== e.value)), n.api.value.passTabStop(e.value, r?.value());
|
|
3534
|
+
}), () => {
|
|
3535
|
+
let c = E(n.api.value.itemProps({
|
|
3536
|
+
value: e.value,
|
|
3537
|
+
branch: i.value,
|
|
3538
|
+
parent: r?.value(),
|
|
3539
|
+
firstChild: a.value[0],
|
|
3540
|
+
disabled: e.disabled,
|
|
3541
|
+
depth: l
|
|
3542
|
+
}));
|
|
3543
|
+
return s(b, {
|
|
3544
|
+
...n.list.itemAttrs,
|
|
3545
|
+
...c,
|
|
3546
|
+
as: e.as,
|
|
3547
|
+
asChild: e.asChild
|
|
3548
|
+
}, () => t.default?.({
|
|
3549
|
+
expanded: o(),
|
|
3550
|
+
selected: n.api.value.isSelected(e.value),
|
|
3551
|
+
branch: i.value,
|
|
3552
|
+
depth: l,
|
|
3553
|
+
toggle: () => n.api.value.toggle(e.value)
|
|
3554
|
+
}));
|
|
3555
|
+
};
|
|
3556
|
+
}
|
|
3557
|
+
}), Ra = a({
|
|
3558
|
+
name: "TreeGroup",
|
|
3559
|
+
props: {
|
|
3560
|
+
...v,
|
|
3561
|
+
as: {
|
|
3562
|
+
...v.as,
|
|
3563
|
+
default: "ul"
|
|
3564
|
+
}
|
|
3565
|
+
},
|
|
3566
|
+
setup: (e, { slots: t }) => {
|
|
3567
|
+
let n = c(Z, null);
|
|
3568
|
+
if (n === null) throw Error("[lovince-ui] <TreeGroup> must be placed inside <TreeItem>.");
|
|
3569
|
+
return n.hasGroup.value = !0, () => n.expanded() ? s(b, {
|
|
3570
|
+
as: e.as,
|
|
3571
|
+
asChild: e.asChild,
|
|
3572
|
+
role: "group"
|
|
3573
|
+
}, t) : null;
|
|
3574
|
+
}
|
|
3575
|
+
}), za = Symbol("CarouselRoot"), Q = (e) => M(za, e, "CarouselRoot"), Ba = a({
|
|
3576
|
+
name: "CarouselRoot",
|
|
3577
|
+
props: {
|
|
3578
|
+
...v,
|
|
3579
|
+
modelValue: {
|
|
3580
|
+
type: Number,
|
|
3581
|
+
default: void 0
|
|
3582
|
+
},
|
|
3583
|
+
orientation: {
|
|
3584
|
+
type: String,
|
|
3585
|
+
default: "horizontal"
|
|
3586
|
+
},
|
|
3587
|
+
loop: {
|
|
3588
|
+
type: Boolean,
|
|
3589
|
+
default: !1
|
|
3590
|
+
},
|
|
3591
|
+
label: {
|
|
3592
|
+
type: String,
|
|
3593
|
+
default: void 0
|
|
3594
|
+
},
|
|
3595
|
+
roleDescription: {
|
|
3596
|
+
type: String,
|
|
3597
|
+
default: "carousel"
|
|
3598
|
+
}
|
|
3599
|
+
},
|
|
3600
|
+
emits: { "update:modelValue": (e) => typeof e == "number" },
|
|
3601
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
3602
|
+
let r = T(we, {
|
|
3603
|
+
current: e.modelValue ?? 0,
|
|
3604
|
+
orientation: e.orientation,
|
|
3605
|
+
loop: e.loop,
|
|
3606
|
+
slides: [],
|
|
3607
|
+
offsets: [],
|
|
3608
|
+
maxScroll: 0,
|
|
3609
|
+
slideSize: 0,
|
|
3610
|
+
measured: !1,
|
|
3611
|
+
layout: 0,
|
|
3612
|
+
ids: { viewport: `${g()}-carousel` }
|
|
3613
|
+
}, {
|
|
3614
|
+
controlled: {
|
|
3615
|
+
orientation: () => e.orientation,
|
|
3616
|
+
loop: () => e.loop
|
|
3617
|
+
},
|
|
3618
|
+
onChange: (e, n) => {
|
|
3619
|
+
e.context.current !== n.context.current && t("update:modelValue", e.context.current);
|
|
3620
|
+
}
|
|
3621
|
+
});
|
|
3622
|
+
_(() => e.modelValue, (e) => {
|
|
3623
|
+
e !== void 0 && e !== r.snapshot.value.context.current && r.send({
|
|
3624
|
+
type: "GO",
|
|
3625
|
+
index: e
|
|
3626
|
+
});
|
|
3627
|
+
});
|
|
3628
|
+
let a = i(() => Ne(r.snapshot.value, r.send));
|
|
3629
|
+
return p(za, {
|
|
3630
|
+
api: a,
|
|
3631
|
+
slidesChanged: () => r.send({ type: "SLIDES_CHANGED" })
|
|
3632
|
+
}), () => s(b, {
|
|
3633
|
+
...E(a.value.rootProps(e.label, e.roleDescription)),
|
|
3634
|
+
as: e.as,
|
|
3635
|
+
asChild: e.asChild
|
|
3636
|
+
}, () => n.default?.({
|
|
3637
|
+
current: a.value.current,
|
|
3638
|
+
count: a.value.count,
|
|
3639
|
+
scrollTo: a.value.go
|
|
3640
|
+
}));
|
|
3641
|
+
}
|
|
3642
|
+
}), Va = a({
|
|
3643
|
+
name: "CarouselViewport",
|
|
3644
|
+
props: v,
|
|
3645
|
+
setup: (e, { slots: t }) => {
|
|
3646
|
+
let n = Q("CarouselViewport");
|
|
3647
|
+
return () => s(b, {
|
|
3648
|
+
...E(n.api.value.viewportProps),
|
|
3649
|
+
as: e.as,
|
|
3650
|
+
asChild: e.asChild
|
|
3651
|
+
}, t);
|
|
3652
|
+
}
|
|
3653
|
+
}), Ha = a({
|
|
3654
|
+
name: "CarouselSlide",
|
|
3655
|
+
props: {
|
|
3656
|
+
...v,
|
|
3657
|
+
getLabel: {
|
|
3658
|
+
type: Function,
|
|
3659
|
+
default: void 0
|
|
3660
|
+
},
|
|
3661
|
+
roleDescription: {
|
|
3662
|
+
type: String,
|
|
3663
|
+
default: "slide"
|
|
3664
|
+
}
|
|
3665
|
+
},
|
|
3666
|
+
setup: (e, { slots: t }) => {
|
|
3667
|
+
let n = Q("CarouselSlide"), r = `${g()}-slide`;
|
|
3668
|
+
return f(n.slidesChanged), d(n.slidesChanged), () => s(b, {
|
|
3669
|
+
...E(n.api.value.slideProps(r, e.roleDescription, e.getLabel)),
|
|
3670
|
+
as: e.as,
|
|
3671
|
+
asChild: e.asChild
|
|
3672
|
+
}, t);
|
|
3673
|
+
}
|
|
3674
|
+
}), Ua = (e, t, n) => a({
|
|
3675
|
+
name: e,
|
|
3676
|
+
props: {
|
|
3677
|
+
...y,
|
|
3678
|
+
label: {
|
|
3679
|
+
type: String,
|
|
3680
|
+
default: n
|
|
3681
|
+
}
|
|
3682
|
+
},
|
|
3683
|
+
setup: (n, { slots: r }) => {
|
|
3684
|
+
let i = Q(e);
|
|
3685
|
+
return () => s(b, {
|
|
3686
|
+
...E(i.api.value.stepProps(t, n.label), n.as),
|
|
3687
|
+
as: n.as,
|
|
3688
|
+
asChild: n.asChild
|
|
3689
|
+
}, r);
|
|
3690
|
+
}
|
|
3691
|
+
}), Wa = Ua("CarouselPrevious", -1, "Previous slide"), Ga = Ua("CarouselNext", 1, "Next slide"), Ka = a({
|
|
3692
|
+
name: "CarouselIndicators",
|
|
3693
|
+
props: {
|
|
3694
|
+
...v,
|
|
3695
|
+
label: {
|
|
3696
|
+
type: String,
|
|
3697
|
+
default: "Choose a slide"
|
|
3698
|
+
}
|
|
3699
|
+
},
|
|
3700
|
+
setup: (e, { slots: t }) => {
|
|
3701
|
+
let n = Q("CarouselIndicators");
|
|
3702
|
+
return () => s(b, {
|
|
3703
|
+
...E(n.api.value.indicatorsProps(e.label)),
|
|
3704
|
+
as: e.as,
|
|
3705
|
+
asChild: e.asChild
|
|
3706
|
+
}, () => t.default?.({
|
|
3707
|
+
count: n.api.value.count,
|
|
3708
|
+
current: n.api.value.current
|
|
3709
|
+
}));
|
|
3710
|
+
}
|
|
3711
|
+
}), qa = a({
|
|
3712
|
+
name: "CarouselIndicator",
|
|
3713
|
+
props: {
|
|
3714
|
+
...y,
|
|
3715
|
+
index: {
|
|
3716
|
+
type: Number,
|
|
3717
|
+
required: !0
|
|
3718
|
+
},
|
|
3719
|
+
label: {
|
|
3720
|
+
type: String,
|
|
3721
|
+
default: void 0
|
|
3722
|
+
}
|
|
3723
|
+
},
|
|
3724
|
+
setup: (e, { slots: t }) => {
|
|
3725
|
+
let n = Q("CarouselIndicator");
|
|
3726
|
+
return () => s(b, {
|
|
3727
|
+
...E(n.api.value.indicatorProps(e.index, e.label), e.as),
|
|
3728
|
+
as: e.as,
|
|
3729
|
+
asChild: e.asChild
|
|
3730
|
+
}, t);
|
|
3731
|
+
}
|
|
3732
|
+
}), Ja = Symbol("SortableRoot"), Ya = Symbol("SortableItem"), Xa = {
|
|
3733
|
+
position: "absolute",
|
|
3734
|
+
width: "1px",
|
|
3735
|
+
height: "1px",
|
|
3736
|
+
margin: "-1px",
|
|
3737
|
+
overflow: "hidden",
|
|
3738
|
+
clip: "rect(0 0 0 0)",
|
|
3739
|
+
whiteSpace: "nowrap"
|
|
3740
|
+
}, Za = a({
|
|
3741
|
+
name: "SortableRoot",
|
|
3742
|
+
props: {
|
|
3743
|
+
...v,
|
|
3744
|
+
as: {
|
|
3745
|
+
...v.as,
|
|
3746
|
+
default: "ul"
|
|
3747
|
+
},
|
|
3748
|
+
modelValue: {
|
|
3749
|
+
type: Array,
|
|
3750
|
+
default: void 0
|
|
3751
|
+
},
|
|
3752
|
+
defaultValue: {
|
|
3753
|
+
type: Array,
|
|
3754
|
+
default: () => []
|
|
3755
|
+
},
|
|
3756
|
+
orientation: {
|
|
3757
|
+
type: String,
|
|
3758
|
+
default: "vertical"
|
|
3759
|
+
},
|
|
3760
|
+
disabled: {
|
|
3761
|
+
type: Boolean,
|
|
3762
|
+
default: !1
|
|
3763
|
+
}
|
|
3764
|
+
},
|
|
3765
|
+
emits: { "update:modelValue": (e) => Array.isArray(e) },
|
|
3766
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
3767
|
+
let r = g(), a = T(Rt, {
|
|
3768
|
+
order: e.modelValue ?? e.defaultValue,
|
|
3769
|
+
orientation: e.orientation,
|
|
3770
|
+
disabled: e.disabled,
|
|
3771
|
+
grabbed: void 0,
|
|
3772
|
+
before: [],
|
|
3773
|
+
returnTo: void 0,
|
|
3774
|
+
pointerId: 0,
|
|
3775
|
+
labels: {},
|
|
3776
|
+
announcement: "",
|
|
3777
|
+
announced: 0,
|
|
3778
|
+
base: `${r}-sortable`
|
|
3779
|
+
}, {
|
|
3780
|
+
controlled: {
|
|
3781
|
+
order: () => e.modelValue,
|
|
3782
|
+
orientation: () => e.orientation,
|
|
3783
|
+
disabled: () => e.disabled
|
|
3784
|
+
},
|
|
3785
|
+
onChange: (e, n) => {
|
|
3786
|
+
e.context.order !== n.context.order && t("update:modelValue", [...e.context.order]);
|
|
3787
|
+
}
|
|
3788
|
+
}), o = i(() => Xe(a.snapshot.value, a.send, a.query)), c = m("");
|
|
3789
|
+
return _(() => o.value.announced, () => {
|
|
3790
|
+
c.value = "", u(() => c.value = o.value.announcement);
|
|
3791
|
+
}), p(Ja, {
|
|
3792
|
+
api: o,
|
|
3793
|
+
label: (e, t) => a.send({
|
|
3794
|
+
type: "LABEL",
|
|
3795
|
+
value: e,
|
|
3796
|
+
label: t
|
|
3797
|
+
}),
|
|
3798
|
+
instructions: `${r}-instructions`,
|
|
3799
|
+
dragging: () => a.snapshot.value.state === "dragging"
|
|
3800
|
+
}), () => [
|
|
3801
|
+
s(b, {
|
|
3802
|
+
...E(o.value.rootProps),
|
|
3803
|
+
as: e.as,
|
|
3804
|
+
asChild: e.asChild
|
|
3805
|
+
}, n),
|
|
3806
|
+
s("p", {
|
|
3807
|
+
id: `${r}-instructions`,
|
|
3808
|
+
hidden: !0
|
|
3809
|
+
}, "Press Space to pick up. Use the arrow keys to move, Space to drop, Escape to cancel."),
|
|
3810
|
+
s("div", {
|
|
3811
|
+
role: "status",
|
|
3812
|
+
"aria-live": "assertive",
|
|
3813
|
+
style: Xa
|
|
3814
|
+
}, c.value)
|
|
3815
|
+
];
|
|
3816
|
+
}
|
|
3817
|
+
}), Qa = a({
|
|
3818
|
+
name: "SortableItem",
|
|
3819
|
+
props: {
|
|
3820
|
+
...v,
|
|
3821
|
+
as: {
|
|
3822
|
+
...v.as,
|
|
3823
|
+
default: "li"
|
|
3824
|
+
},
|
|
3825
|
+
value: {
|
|
3826
|
+
type: String,
|
|
3827
|
+
required: !0
|
|
3828
|
+
},
|
|
3829
|
+
textValue: {
|
|
3830
|
+
type: String,
|
|
3831
|
+
default: void 0
|
|
3832
|
+
}
|
|
3833
|
+
},
|
|
3834
|
+
setup: (e, { slots: t }) => {
|
|
3835
|
+
let n = M(Ja, "SortableItem", "SortableRoot");
|
|
3836
|
+
return p(Ya, () => e.value), f(() => n.api.value.learnLabel(e.value, e.textValue)), () => s(b, {
|
|
3837
|
+
...E(n.api.value.itemProps(e.value)),
|
|
3838
|
+
as: e.as,
|
|
3839
|
+
asChild: e.asChild
|
|
3840
|
+
}, t);
|
|
3841
|
+
}
|
|
3842
|
+
}), $a = a({
|
|
3843
|
+
name: "SortableHandle",
|
|
3844
|
+
props: y,
|
|
3845
|
+
setup: (e, { slots: t }) => {
|
|
3846
|
+
let n = M(Ja, "SortableHandle", "SortableRoot"), r = c(Ya, null);
|
|
3847
|
+
if (r === null) throw Error("[lovince-ui] <SortableHandle> must be placed inside <SortableItem>.");
|
|
3848
|
+
return () => s(b, {
|
|
3849
|
+
...E(n.api.value.handleProps(r(), n.instructions), e.as),
|
|
3850
|
+
as: e.as,
|
|
3851
|
+
asChild: e.asChild
|
|
3852
|
+
}, t);
|
|
3853
|
+
}
|
|
3854
|
+
}), eo = Symbol("EmojiPickerRoot"), to = Symbol("EmojiPickerGroup"), $ = (e) => M(eo, e, "EmojiPickerRoot"), no = a({
|
|
3855
|
+
name: "EmojiPickerRoot",
|
|
3856
|
+
props: {
|
|
3857
|
+
...v,
|
|
3858
|
+
emojis: {
|
|
3859
|
+
type: Array,
|
|
3860
|
+
default: () => []
|
|
3861
|
+
},
|
|
3862
|
+
groups: {
|
|
3863
|
+
type: Array,
|
|
3864
|
+
default: () => []
|
|
3865
|
+
},
|
|
3866
|
+
search: {
|
|
3867
|
+
type: String,
|
|
3868
|
+
default: void 0
|
|
3869
|
+
},
|
|
3870
|
+
skinTone: {
|
|
3871
|
+
type: String,
|
|
3872
|
+
default: void 0
|
|
3873
|
+
},
|
|
3874
|
+
recent: {
|
|
3875
|
+
type: Array,
|
|
3876
|
+
default: void 0
|
|
3877
|
+
},
|
|
3878
|
+
maxRecent: {
|
|
3879
|
+
type: Number,
|
|
3880
|
+
default: 24
|
|
3881
|
+
},
|
|
3882
|
+
columns: {
|
|
3883
|
+
type: Number,
|
|
3884
|
+
default: 8
|
|
3885
|
+
},
|
|
3886
|
+
dir: {
|
|
3887
|
+
type: String,
|
|
3888
|
+
default: "ltr"
|
|
3889
|
+
}
|
|
3890
|
+
},
|
|
3891
|
+
emits: {
|
|
3892
|
+
"update:search": (e) => typeof e == "string",
|
|
3893
|
+
"update:skinTone": (e) => yt(e),
|
|
3894
|
+
"update:recent": (e) => Array.isArray(e),
|
|
3895
|
+
select: (e, t) => typeof e == "string" && typeof t == "object"
|
|
3896
|
+
},
|
|
3897
|
+
setup: (e, { emit: t, slots: n }) => {
|
|
3898
|
+
let r = T(mt, {
|
|
3899
|
+
emojis: e.emojis,
|
|
3900
|
+
groups: e.groups,
|
|
3901
|
+
search: e.search ?? "",
|
|
3902
|
+
skinTone: e.skinTone ?? "none",
|
|
3903
|
+
recent: e.recent ?? [],
|
|
3904
|
+
maxRecent: e.maxRecent,
|
|
3905
|
+
columns: e.columns,
|
|
3906
|
+
dir: e.dir,
|
|
3907
|
+
highlighted: -1,
|
|
3908
|
+
activeSection: null,
|
|
3909
|
+
picked: null,
|
|
3910
|
+
picks: 0,
|
|
3911
|
+
base: `${g()}-emoji`
|
|
3912
|
+
}, {
|
|
3913
|
+
controlled: {
|
|
3914
|
+
emojis: () => e.emojis,
|
|
3915
|
+
groups: () => e.groups,
|
|
3916
|
+
search: () => e.search,
|
|
3917
|
+
skinTone: () => e.skinTone,
|
|
3918
|
+
recent: () => e.recent,
|
|
3919
|
+
maxRecent: () => e.maxRecent,
|
|
3920
|
+
columns: () => e.columns,
|
|
3921
|
+
dir: () => e.dir
|
|
3922
|
+
},
|
|
3923
|
+
onChange: (e, n) => {
|
|
3924
|
+
e.context.search !== n.context.search && t("update:search", e.context.search), e.context.skinTone !== n.context.skinTone && t("update:skinTone", e.context.skinTone), e.context.recent !== n.context.recent && t("update:recent", e.context.recent), e.context.picks !== n.context.picks && e.context.picked !== null && t("select", e.context.picked.emoji, e.context.picked.record);
|
|
3925
|
+
}
|
|
3926
|
+
}), a = i(() => ze(r.snapshot.value, r.send));
|
|
3927
|
+
return p(eo, a), () => s(b, {
|
|
3928
|
+
...E(a.value.rootProps),
|
|
3929
|
+
as: e.as,
|
|
3930
|
+
asChild: e.asChild
|
|
3931
|
+
}, () => n.default?.({
|
|
3932
|
+
sections: a.value.sections,
|
|
3933
|
+
search: a.value.search,
|
|
3934
|
+
skinTone: a.value.skinTone,
|
|
3935
|
+
highlighted: a.value.highlightedRecord,
|
|
3936
|
+
activeSection: a.value.activeSection
|
|
3937
|
+
}));
|
|
3938
|
+
}
|
|
3939
|
+
}), ro = a({
|
|
3940
|
+
name: "EmojiPickerSearch",
|
|
3941
|
+
props: {
|
|
3942
|
+
...v,
|
|
3943
|
+
as: {
|
|
3944
|
+
...v.as,
|
|
3945
|
+
default: "input"
|
|
3946
|
+
}
|
|
3947
|
+
},
|
|
3948
|
+
setup: (e) => {
|
|
3949
|
+
let t = $("EmojiPickerSearch");
|
|
3950
|
+
return () => s(b, {
|
|
3951
|
+
...E(t.value.searchProps),
|
|
3952
|
+
as: e.as,
|
|
3953
|
+
asChild: e.asChild
|
|
3954
|
+
});
|
|
3955
|
+
}
|
|
3956
|
+
}), io = a({
|
|
3957
|
+
name: "EmojiPickerList",
|
|
3958
|
+
props: {
|
|
3959
|
+
...v,
|
|
3960
|
+
label: {
|
|
3961
|
+
type: String,
|
|
3962
|
+
default: "Emoji"
|
|
3963
|
+
}
|
|
3964
|
+
},
|
|
3965
|
+
setup: (e, { slots: t }) => {
|
|
3966
|
+
let n = $("EmojiPickerList");
|
|
3967
|
+
return () => s(b, {
|
|
3968
|
+
...E(n.value.listProps(e.label)),
|
|
3969
|
+
as: e.as,
|
|
3970
|
+
asChild: e.asChild
|
|
3971
|
+
}, t);
|
|
3972
|
+
}
|
|
3973
|
+
}), ao = a({
|
|
3974
|
+
name: "EmojiPickerGroup",
|
|
3975
|
+
props: {
|
|
3976
|
+
...v,
|
|
3977
|
+
section: {
|
|
3978
|
+
type: Object,
|
|
3979
|
+
required: !0
|
|
3980
|
+
}
|
|
3981
|
+
},
|
|
3982
|
+
setup: (e, { slots: t }) => {
|
|
3983
|
+
let n = $("EmojiPickerGroup"), r = `${g()}-heading`;
|
|
3984
|
+
return p(to, r), () => s(b, {
|
|
3985
|
+
...E(n.value.groupProps(e.section.key, r)),
|
|
3986
|
+
as: e.as,
|
|
3987
|
+
asChild: e.asChild
|
|
3988
|
+
}, () => t.default?.({
|
|
3989
|
+
emojis: e.section.emojis,
|
|
3990
|
+
start: e.section.start
|
|
3991
|
+
}));
|
|
3992
|
+
}
|
|
3993
|
+
}), oo = a({
|
|
3994
|
+
name: "EmojiPickerGroupHeading",
|
|
3995
|
+
props: {
|
|
3996
|
+
...v,
|
|
3997
|
+
as: {
|
|
3998
|
+
...v.as,
|
|
3999
|
+
default: "div"
|
|
4000
|
+
}
|
|
4001
|
+
},
|
|
4002
|
+
setup: (e, { slots: t }) => {
|
|
4003
|
+
let n = M(to, "EmojiPickerGroupHeading", "EmojiPickerGroup");
|
|
4004
|
+
return () => s(b, {
|
|
4005
|
+
as: e.as,
|
|
4006
|
+
asChild: e.asChild,
|
|
4007
|
+
id: n
|
|
4008
|
+
}, t);
|
|
4009
|
+
}
|
|
4010
|
+
}), so = a({
|
|
4011
|
+
name: "EmojiPickerItem",
|
|
4012
|
+
props: {
|
|
4013
|
+
...v,
|
|
4014
|
+
as: {
|
|
4015
|
+
...v.as,
|
|
4016
|
+
default: "div"
|
|
4017
|
+
},
|
|
4018
|
+
emoji: {
|
|
4019
|
+
type: Object,
|
|
4020
|
+
required: !0
|
|
4021
|
+
},
|
|
4022
|
+
index: {
|
|
4023
|
+
type: Number,
|
|
4024
|
+
required: !0
|
|
4025
|
+
}
|
|
4026
|
+
},
|
|
4027
|
+
setup: (e, { slots: t }) => {
|
|
4028
|
+
let n = $("EmojiPickerItem");
|
|
4029
|
+
return () => {
|
|
4030
|
+
let r = n.value.tone(e.emoji), i = n.value.isHighlighted(e.index);
|
|
4031
|
+
return s(b, {
|
|
4032
|
+
...E(n.value.itemProps(e.emoji, e.index)),
|
|
4033
|
+
as: e.as,
|
|
4034
|
+
asChild: e.asChild
|
|
4035
|
+
}, () => t.default?.({
|
|
4036
|
+
emoji: r,
|
|
4037
|
+
record: e.emoji,
|
|
4038
|
+
highlighted: i
|
|
4039
|
+
}) ?? r);
|
|
4040
|
+
};
|
|
4041
|
+
}
|
|
4042
|
+
}), co = a({
|
|
4043
|
+
name: "EmojiPickerNav",
|
|
4044
|
+
props: {
|
|
4045
|
+
...v,
|
|
4046
|
+
label: {
|
|
4047
|
+
type: String,
|
|
4048
|
+
default: "Categories"
|
|
4049
|
+
}
|
|
4050
|
+
},
|
|
4051
|
+
setup: (e, { slots: t }) => {
|
|
4052
|
+
let n = $("EmojiPickerNav");
|
|
4053
|
+
return () => s(b, {
|
|
4054
|
+
as: e.as,
|
|
4055
|
+
asChild: e.asChild,
|
|
4056
|
+
role: "group",
|
|
4057
|
+
"aria-label": e.label
|
|
4058
|
+
}, () => t.default?.({ activeSection: n.value.activeSection }));
|
|
4059
|
+
}
|
|
4060
|
+
}), lo = a({
|
|
4061
|
+
name: "EmojiPickerNavItem",
|
|
4062
|
+
props: {
|
|
4063
|
+
...y,
|
|
4064
|
+
section: {
|
|
4065
|
+
type: String,
|
|
4066
|
+
required: !0
|
|
4067
|
+
},
|
|
4068
|
+
label: {
|
|
4069
|
+
type: String,
|
|
4070
|
+
required: !0
|
|
4071
|
+
}
|
|
4072
|
+
},
|
|
4073
|
+
setup: (e, { slots: t }) => {
|
|
4074
|
+
let n = $("EmojiPickerNavItem");
|
|
4075
|
+
return () => s(b, {
|
|
4076
|
+
...E(n.value.navItemProps(e.section, e.label), e.as),
|
|
4077
|
+
as: e.as,
|
|
4078
|
+
asChild: e.asChild
|
|
4079
|
+
}, () => t.default?.({ active: n.value.isActiveSection(e.section) }));
|
|
4080
|
+
}
|
|
4081
|
+
}), uo = a({
|
|
4082
|
+
name: "EmojiPickerEmpty",
|
|
4083
|
+
props: v,
|
|
4084
|
+
setup: (e, { slots: t }) => {
|
|
4085
|
+
let n = $("EmojiPickerEmpty");
|
|
4086
|
+
return () => n.value.sections.length > 0 ? null : s(b, {
|
|
4087
|
+
as: e.as,
|
|
4088
|
+
asChild: e.asChild,
|
|
4089
|
+
role: "status"
|
|
4090
|
+
}, () => t.default?.({ search: n.value.search }));
|
|
4091
|
+
}
|
|
4092
|
+
});
|
|
4093
|
+
//#endregion
|
|
4094
|
+
export { Pi as AccordionContent, Mi as AccordionHeader, ji as AccordionItem, Ai as AccordionRoot, Ni as AccordionTrigger, ca as AvatarFallback, sa as AvatarImage, oa as AvatarRoot, ya as CalendarCell, ba as CalendarDay, ga as CalendarGrid, _a as CalendarHeadCell, fa as CalendarHeading, ha as CalendarNext, ma as CalendarPrev, ua as CalendarRoot, qa as CarouselIndicator, Ka as CarouselIndicators, Ga as CarouselNext, Wa as CarouselPrevious, Ba as CarouselRoot, Ha as CarouselSlide, Va as CarouselViewport, On as CheckboxIndicator, En as CheckboxRoot, ei as ComboboxAnchor, ri as ComboboxClear, ai as ComboboxContent, li as ComboboxEmpty, ti as ComboboxInput, si as ComboboxItem, ci as ComboboxItemIndicator, ii as ComboboxPortal, $r as ComboboxRoot, ni as ComboboxTrigger, vi as CommandEmpty, gi as CommandGroup, mi as CommandInput, _i as CommandItem, hi as CommandList, fi as CommandRoot, yi as CommandSeparator, Fr as ContextMenuTrigger, Zn as DialogClose, qn as DialogContent, Xn as DialogDescription, Kn as DialogOverlay, Gn as DialogPortal, Un as DialogRoot, Yn as DialogTitle, Wn as DialogTrigger, Sn as DisclosureContent, bn as DisclosureRoot, xn as DisclosureTrigger, Dr as DropdownMenuCheckboxItem, wr as DropdownMenuContent, Nr as DropdownMenuGroup, Er as DropdownMenuItem, jr as DropdownMenuItemIndicator, Mr as DropdownMenuLabel, Cr as DropdownMenuPortal, kr as DropdownMenuRadioGroup, Ar as DropdownMenuRadioItem, br as DropdownMenuRoot, Pr as DropdownMenuSeparator, Sr as DropdownMenuTrigger, uo as EmojiPickerEmpty, ao as EmojiPickerGroup, oo as EmojiPickerGroupHeading, so as EmojiPickerItem, io as EmojiPickerList, co as EmojiPickerNav, lo as EmojiPickerNavItem, no as EmojiPickerRoot, ro as EmojiPickerSearch, vr as HoverCardContent, _r as HoverCardPortal, hr as HoverCardRoot, gr as HoverCardTrigger, Ei as NavigationMenuContent, wi as NavigationMenuItem, Di as NavigationMenuLink, Ci as NavigationMenuList, Si as NavigationMenuRoot, Ti as NavigationMenuTrigger, $i as NumberFieldDecrement, Qi as NumberFieldIncrement, Xi as NumberFieldInput, Yi as NumberFieldRoot, na as PinInputInput, ta as PinInputRoot, rr as PopoverAnchor, or as PopoverClose, ar as PopoverContent, ir as PopoverPortal, tr as PopoverRoot, nr as PopoverTrigger, x as Portal, b as Primitive, aa as ProgressIndicator, ia as ProgressRoot, zi as RadioGroupIndicator, Ri as RadioGroupItem, Li as RadioGroupRoot, Ur as SelectContent, Jr as SelectGroup, Gr as SelectItem, qr as SelectItemIndicator, Kr as SelectItemText, Yr as SelectLabel, Hr as SelectPortal, Rr as SelectRoot, Xr as SelectSeparator, Br as SelectTrigger, Vr as SelectValue, qi as SliderRange, Gi as SliderRoot, Ji as SliderThumb, Ki as SliderTrack, on as Slot, $a as SortableHandle, Qa as SortableItem, Za as SortableRoot, ja as SplitterGroup, Na as SplitterHandle, Ma as SplitterPanel, kn as SwitchRoot, An as SwitchThumb, Ln as TabsContent, Fn as TabsList, Pn as TabsRoot, In as TabsTrigger, ka as ToastAction, Aa as ToastClose, Oa as ToastDescription, Ta as ToastRoot, Da as ToastTitle, wa as ToastViewport, Wi as ToggleGroupItem, Ui as ToggleGroupRoot, Bi as ToggleRoot, pr as TooltipContent, fr as TooltipPortal, ur as TooltipRoot, dr as TooltipTrigger, Ra as TreeGroup, La as TreeItem, Ia as TreeRoot, O as floatingProps, yn as injectDisclosure, E as normalizeProps, Et as pinCharacters, v as primitiveProps, ue as scrollLockCount, C as toElement, xa as toast, J as toastStore, pn as useActiveSection, hn as useClipboard, ln as useDataTable, w as useIdWatch, dn as useInView, D as useListEnv, T as useMachine, k as usePresence, fn as useScrollEdges, Sa as useToasts, mn as useVirtualList };
|