@typlog/ui 0.9.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,48 +1,66 @@
1
- import { computed as C, defineComponent as m, createBlock as d, openBlock as r, unref as a, normalizeClass as I, withCtx as c, createVNode as p, createTextVNode as L, toDisplayString as T, renderSlot as _, createElementBlock as $, mergeProps as g, createCommentVNode as z, createElementVNode as b, toRefs as ee, mergeModels as Q, ref as P, useModel as Z, onMounted as ue, onBeforeUnmount as Ce, withDirectives as te, isRef as be, vModelDynamic as Oe, vModelText as $e, normalizeStyle as Be, normalizeProps as Me, guardReactiveProps as Fe, Fragment as H, watch as Le, renderList as j, withModifiers as D, vModelRadio as Ge, withKeys as he, vShow as He } from "vue";
2
- import { useForwardProps as V, useEmitAsProps as xe, AvatarRoot as Ee, AvatarImage as je, AvatarFallback as We, Primitive as U, ScrollAreaRoot as de, ScrollAreaViewport as pe, ScrollAreaScrollbar as ne, ScrollAreaThumb as re, ScrollAreaCorner as Ue, AlertDialogPortal as qe, AlertDialogOverlay as Ne, AlertDialogContent as Ke, DialogPortal as Qe, DialogOverlay as Ze, DialogContent as Je, DialogTitle as Xe, DialogClose as Ye, useForwardExpose as M, createContext as oe, DropdownMenuPortal as et, DropdownMenuContent as tt, DropdownMenuItem as ot, PopoverPortal as at, PopoverContent as st, SwitchRoot as lt, SwitchThumb as nt, CheckboxRoot as rt, CheckboxIndicator as it, Toggle as ct, ToggleGroupRoot as ut, ToggleGroupItem as dt, SelectRoot as pt, SelectPortal as ft, SelectContent as mt, SelectViewport as ht, SelectTrigger as vt, SelectValue as _t, SelectIcon as gt, SelectItem as yt, SelectItemIndicator as Ct, SelectItemText as bt, SelectLabel as $t, ComboboxRoot as Bt, injectComboboxRootContext as xt, useForwardPropsEmits as we, ComboboxAnchor as wt, ComboboxInput as ve, ComboboxTrigger as St, ComboboxPortal as zt, ComboboxContent as It, ComboboxViewport as kt, ComboboxItem as Vt, ComboboxItemIndicator as Tt, ComboboxLabel as At, RadioGroupRoot as Se, RadioGroupItem as ze, TabsList as Rt, TabsIndicator as Pt, TabsTrigger as Dt, AccordionRoot as Ot, AccordionItem as Mt, AccordionContent as Ft, AccordionTrigger as Lt, CollapsibleContent as Gt, TooltipProvider as Ht, TooltipRoot as Et, TooltipTrigger as jt, TooltipPortal as Wt, TooltipContent as Ut, TooltipArrow as qt, ProgressRoot as Nt, ProgressIndicator as Kt } from "reka-ui";
3
- import { AlertDialogAction as hs, AlertDialogCancel as vs, AlertDialogDescription as _s, AlertDialogRoot as gs, AlertDialogTitle as ys, AlertDialogTrigger as Cs, CollapsibleRoot as bs, CollapsibleTrigger as $s, ComboboxEmpty as Bs, ComboboxGroup as xs, DialogClose as ws, DialogDescription as Ss, DialogRoot as zs, DialogTitle as Is, DialogTrigger as ks, DropdownMenuRoot as Vs, DropdownMenuTrigger as Ts, PopoverClose as As, PopoverRoot as Rs, PopoverTrigger as Ps, RadioGroupItem as Ds, SelectGroup as Os, TabsContent as Ms, TabsRoot as Fs } from "reka-ui";
4
- import { Icon as k } from "@iconify/vue";
5
- import { Icon as Gs } from "@iconify/vue";
6
- function q(s, e, t) {
7
- const o = V(s), l = xe(e);
8
- return C(() => ({
9
- ...fe(o.value, t),
10
- ...l
1
+ import { computed, defineComponent, createBlock, openBlock, unref, normalizeClass, withCtx, createVNode, createTextVNode, toDisplayString, renderSlot, createElementBlock, mergeProps, createCommentVNode, createElementVNode, toRefs, mergeModels, ref, useModel, onMounted, onBeforeUnmount, withDirectives, isRef, vModelDynamic, vModelText, normalizeStyle, normalizeProps, guardReactiveProps, Fragment, watch, renderList, withModifiers, vModelRadio, withKeys, vShow } from "vue";
2
+ import { useForwardProps, useEmitAsProps, AvatarRoot, AvatarImage, AvatarFallback, Primitive, ScrollAreaRoot, ScrollAreaViewport, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaCorner, AlertDialogPortal, AlertDialogOverlay, AlertDialogContent, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogClose, useForwardExpose, createContext, DropdownMenuPortal, DropdownMenuContent, DropdownMenuItem, PopoverPortal, PopoverContent, SwitchRoot, SwitchThumb, CheckboxRoot, CheckboxIndicator, Toggle, ToggleGroupRoot, ToggleGroupItem, SelectRoot, SelectPortal, SelectContent, SelectViewport, SelectTrigger, SelectValue, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel, ComboboxRoot, injectComboboxRootContext as injectComboboxRootContext$1, useForwardPropsEmits as useForwardPropsEmits$1, ComboboxAnchor, ComboboxInput, ComboboxTrigger, ComboboxPortal, ComboboxContent, ComboboxViewport, ComboboxItem, ComboboxItemIndicator, ComboboxLabel, RadioGroupRoot, RadioGroupItem, TabsList, TabsIndicator, TabsTrigger, AccordionRoot, AccordionItem, AccordionContent, AccordionTrigger, CollapsibleContent, TooltipProvider, TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow, ProgressRoot, ProgressIndicator } from "reka-ui";
3
+ import { AlertDialogAction, AlertDialogCancel, AlertDialogDescription, AlertDialogRoot, AlertDialogTitle, AlertDialogTrigger, CollapsibleRoot, CollapsibleTrigger, ComboboxEmpty, ComboboxGroup, DialogClose as DialogClose2, DialogDescription, DialogRoot, DialogTitle as DialogTitle2, DialogTrigger, DropdownMenuRoot, DropdownMenuTrigger, PopoverClose, PopoverRoot, PopoverTrigger, RadioGroupItem as RadioGroupItem2, SelectGroup, TabsContent, TabsRoot } from "reka-ui";
4
+ import { Icon } from "@iconify/vue";
5
+ import { Icon as Icon2 } from "@iconify/vue";
6
+ function useForwardPropsEmits(props, emit, exclude) {
7
+ const parsedProps = useForwardProps(props);
8
+ const emitsAsProps = useEmitAsProps(emit);
9
+ return computed(() => ({
10
+ ..._excludeProps(parsedProps.value, exclude),
11
+ ...emitsAsProps
11
12
  }));
12
13
  }
13
- function Qt(s, e) {
14
- const t = V(s), o = C(() => fe(t.value, e)), l = C(() => R(t.value, e));
15
- return [o, l];
14
+ function extractForwardProps(props, keys) {
15
+ const parsedProps = useForwardProps(props);
16
+ const fowarded = computed(() => _excludeProps(parsedProps.value, keys));
17
+ const classes = computed(() => {
18
+ return extractClass(parsedProps.value, keys);
19
+ });
20
+ return [fowarded, classes];
16
21
  }
17
- function N(s, e, t) {
18
- const o = V(s), l = xe(e), n = C(() => ({
19
- ...fe(o.value, t),
20
- ...l
21
- })), i = C(() => R(o.value, t));
22
- return [n, i];
22
+ function extractForwardPropsEmits(props, emit, keys) {
23
+ const parsedProps = useForwardProps(props);
24
+ const emitsAsProps = useEmitAsProps(emit);
25
+ const fowarded = computed(() => ({
26
+ ..._excludeProps(parsedProps.value, keys),
27
+ ...emitsAsProps
28
+ }));
29
+ const classes = computed(() => {
30
+ return extractClass(parsedProps.value, keys);
31
+ });
32
+ return [fowarded, classes];
23
33
  }
24
- function fe(s, e) {
25
- const t = {};
26
- return Object.keys(s).forEach((o) => {
27
- e.indexOf(o) === -1 && (t[o] = s[o]);
28
- }), t;
34
+ function _excludeProps(props, exclude) {
35
+ const rv = {};
36
+ Object.keys(props).forEach((k) => {
37
+ if (exclude.indexOf(k) === -1) {
38
+ rv[k] = props[k];
39
+ }
40
+ });
41
+ return rv;
29
42
  }
30
- const R = (s, e) => {
31
- const t = [];
32
- return e.forEach((o) => {
33
- if (o !== "color" && o !== "radius") {
34
- const l = s[o];
35
- l === !0 ? t.push(`r-${_e(o)}`) : l && t.push(`r-${_e(o)}-${l}`);
43
+ const extractClass = (props, keys) => {
44
+ const rv = [];
45
+ keys.forEach((key) => {
46
+ if (key !== "color" && key !== "radius") {
47
+ const value = props[key];
48
+ if (value === true) {
49
+ rv.push(`r-${kebabize(key)}`);
50
+ } else if (value) {
51
+ rv.push(`r-${kebabize(key)}-${value}`);
52
+ }
36
53
  }
37
- }), t;
54
+ });
55
+ return rv;
38
56
  };
39
- function _e(s) {
40
- return s.replace(/[A-Z]+(?![a-z])|[A-Z]/g, Zt);
57
+ function kebabize(str) {
58
+ return str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, _kebabReplace);
41
59
  }
42
- function Zt(s, e) {
43
- return (e ? "-" : "") + s.toLowerCase();
60
+ function _kebabReplace(str, ofs) {
61
+ return (ofs ? "-" : "") + str.toLowerCase();
44
62
  }
45
- const _a = /* @__PURE__ */ m({
63
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
46
64
  __name: "Avatar",
47
65
  props: {
48
66
  src: {},
@@ -53,36 +71,48 @@ const _a = /* @__PURE__ */ m({
53
71
  size: { default: "2" },
54
72
  color: {}
55
73
  },
56
- setup(s) {
57
- const e = s, t = C(() => R(e, ["size", "variant"])), o = C(() => {
58
- if (e.fallback)
59
- return e.fallback;
60
- const l = e.alt.split(/\s+/).map((n) => n[0]);
61
- return e.size === "1" ? l[0] : l.slice(0, 2).join("");
74
+ setup(__props) {
75
+ const props = __props;
76
+ const resetClass = computed(() => {
77
+ return extractClass(props, ["size", "variant"]);
62
78
  });
63
- return (l, n) => (r(), d(a(Ee), {
64
- class: I(["ui-Avatar", t.value]),
65
- "data-accent-color": e.color,
66
- "data-radius": e.radius
67
- }, {
68
- default: c(() => [
69
- p(a(je), {
70
- alt: e.alt,
71
- src: e.src || ""
72
- }, null, 8, ["alt", "src"]),
73
- p(a(We), {
74
- class: I(`r-count-${o.value.length}`)
75
- }, {
76
- default: c(() => [
77
- L(T(o.value), 1)
78
- ]),
79
- _: 1
80
- }, 8, ["class"])
81
- ]),
82
- _: 1
83
- }, 8, ["class", "data-accent-color", "data-radius"]));
79
+ const fallback = computed(() => {
80
+ if (props.fallback) {
81
+ return props.fallback;
82
+ }
83
+ const symbols = props.alt.split(/\s+/).map((p) => p[0]);
84
+ if (props.size === "1") {
85
+ return symbols[0];
86
+ } else {
87
+ return symbols.slice(0, 2).join("");
88
+ }
89
+ });
90
+ return (_ctx, _cache) => {
91
+ return openBlock(), createBlock(unref(AvatarRoot), {
92
+ class: normalizeClass(["ui-Avatar", resetClass.value]),
93
+ "data-accent-color": props.color,
94
+ "data-radius": props.radius
95
+ }, {
96
+ default: withCtx(() => [
97
+ createVNode(unref(AvatarImage), {
98
+ alt: props.alt,
99
+ src: props.src || ""
100
+ }, null, 8, ["alt", "src"]),
101
+ createVNode(unref(AvatarFallback), {
102
+ class: normalizeClass(`r-count-${fallback.value.length}`)
103
+ }, {
104
+ default: withCtx(() => [
105
+ createTextVNode(toDisplayString(fallback.value), 1)
106
+ ]),
107
+ _: 1
108
+ }, 8, ["class"])
109
+ ]),
110
+ _: 1
111
+ }, 8, ["class", "data-accent-color", "data-radius"]);
112
+ };
84
113
  }
85
- }), ga = /* @__PURE__ */ m({
114
+ });
115
+ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
86
116
  __name: "Badge",
87
117
  props: {
88
118
  variant: { default: "soft" },
@@ -93,38 +123,48 @@ const _a = /* @__PURE__ */ m({
93
123
  asChild: { type: Boolean },
94
124
  as: { default: "span" }
95
125
  },
96
- setup(s) {
97
- const e = s, t = C(() => R(e, ["size", "variant", "highContrast"]));
98
- return (o, l) => (r(), d(a(U), {
99
- class: I(["ui-Badge", t.value]),
100
- as: e.as,
101
- "as-child": e.asChild,
102
- "data-accent-color": e.color,
103
- "data-radius": e.radius
104
- }, {
105
- default: c(() => [
106
- _(o.$slots, "default")
107
- ]),
108
- _: 3
109
- }, 8, ["class", "as", "as-child", "data-accent-color", "data-radius"]));
126
+ setup(__props) {
127
+ const props = __props;
128
+ const resetClass = computed(() => {
129
+ return extractClass(props, ["size", "variant", "highContrast"]);
130
+ });
131
+ return (_ctx, _cache) => {
132
+ return openBlock(), createBlock(unref(Primitive), {
133
+ class: normalizeClass(["ui-Badge", resetClass.value]),
134
+ as: props.as,
135
+ "as-child": props.asChild,
136
+ "data-accent-color": props.color,
137
+ "data-radius": props.radius
138
+ }, {
139
+ default: withCtx(() => [
140
+ renderSlot(_ctx.$slots, "default")
141
+ ]),
142
+ _: 3
143
+ }, 8, ["class", "as", "as-child", "data-accent-color", "data-radius"]);
144
+ };
110
145
  }
111
- }), Jt = ["data-side", "data-clip"], Xt = /* @__PURE__ */ m({
146
+ });
147
+ const _hoisted_1$m = ["data-side", "data-clip"];
148
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
112
149
  __name: "Inset",
113
150
  props: {
114
151
  side: { default: "all" },
115
152
  clip: { default: "border-box" }
116
153
  },
117
- setup(s) {
118
- const e = s;
119
- return (t, o) => (r(), $("div", {
120
- class: "ui-Inset",
121
- "data-side": e.side,
122
- "data-clip": e.clip
123
- }, [
124
- _(t.$slots, "default")
125
- ], 8, Jt));
154
+ setup(__props) {
155
+ const props = __props;
156
+ return (_ctx, _cache) => {
157
+ return openBlock(), createElementBlock("div", {
158
+ class: "ui-Inset",
159
+ "data-side": props.side,
160
+ "data-clip": props.clip
161
+ }, [
162
+ renderSlot(_ctx.$slots, "default")
163
+ ], 8, _hoisted_1$m);
164
+ };
126
165
  }
127
- }), Yt = /* @__PURE__ */ m({
166
+ });
167
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
128
168
  __name: "Card",
129
169
  props: {
130
170
  variant: { default: "surface" },
@@ -133,69 +173,84 @@ const _a = /* @__PURE__ */ m({
133
173
  asChild: { type: Boolean },
134
174
  as: { default: "div" }
135
175
  },
136
- setup(s) {
137
- const e = s, t = C(() => R(e, ["size", "variant"]));
138
- return (o, l) => (r(), d(a(U), {
139
- class: I(["ui-Card", t.value]),
140
- "as-child": e.asChild,
141
- as: e.as,
142
- "data-radius": e.radius
143
- }, {
144
- default: c(() => [
145
- _(o.$slots, "default")
146
- ]),
147
- _: 3
148
- }, 8, ["class", "as-child", "as", "data-radius"]));
176
+ setup(__props) {
177
+ const props = __props;
178
+ const resetClass = computed(() => {
179
+ return extractClass(props, ["size", "variant"]);
180
+ });
181
+ return (_ctx, _cache) => {
182
+ return openBlock(), createBlock(unref(Primitive), {
183
+ class: normalizeClass(["ui-Card", resetClass.value]),
184
+ "as-child": props.asChild,
185
+ as: props.as,
186
+ "data-radius": props.radius
187
+ }, {
188
+ default: withCtx(() => [
189
+ renderSlot(_ctx.$slots, "default")
190
+ ]),
191
+ _: 3
192
+ }, 8, ["class", "as-child", "as", "data-radius"]);
193
+ };
149
194
  }
150
- }), ya = /* @__PURE__ */ m({
195
+ });
196
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
151
197
  __name: "CardHead",
152
198
  props: {
153
199
  color: {},
154
200
  asChild: { type: Boolean },
155
201
  as: { default: "div" }
156
202
  },
157
- setup(s) {
158
- const e = s;
159
- return (t, o) => (r(), d(a(U), {
160
- as: e.as,
161
- class: "ui-CardHead",
162
- "data-accent-color": e.color
163
- }, {
164
- default: c(() => [
165
- _(t.$slots, "default")
166
- ]),
167
- _: 3
168
- }, 8, ["as", "data-accent-color"]));
203
+ setup(__props) {
204
+ const props = __props;
205
+ return (_ctx, _cache) => {
206
+ return openBlock(), createBlock(unref(Primitive), {
207
+ as: props.as,
208
+ class: "ui-CardHead",
209
+ "data-accent-color": props.color
210
+ }, {
211
+ default: withCtx(() => [
212
+ renderSlot(_ctx.$slots, "default")
213
+ ]),
214
+ _: 3
215
+ }, 8, ["as", "data-accent-color"]);
216
+ };
169
217
  }
170
- }), W = /* @__PURE__ */ m({
218
+ });
219
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
171
220
  __name: "Button",
172
221
  props: {
173
222
  color: {},
174
223
  radius: {},
175
224
  variant: { default: "solid" },
176
225
  size: { default: "2" },
177
- highContrast: { type: Boolean, default: !1 },
226
+ highContrast: { type: Boolean, default: false },
178
227
  disabled: { type: Boolean },
179
228
  asChild: { type: Boolean },
180
229
  as: { default: "button" }
181
230
  },
182
- setup(s) {
183
- const e = s, t = C(() => R(e, ["size", "variant", "highContrast"]));
184
- return (o, l) => (r(), d(a(U), {
185
- class: I(["ui-Button", t.value]),
186
- "as-child": e.asChild,
187
- as: e.as,
188
- "data-accent-color": e.color,
189
- "data-radius": e.radius,
190
- "data-disabled": e.disabled ? !0 : void 0
191
- }, {
192
- default: c(() => [
193
- _(o.$slots, "default")
194
- ]),
195
- _: 3
196
- }, 8, ["class", "as-child", "as", "data-accent-color", "data-radius", "data-disabled"]));
231
+ setup(__props) {
232
+ const props = __props;
233
+ const resetClass = computed(() => {
234
+ return extractClass(props, ["size", "variant", "highContrast"]);
235
+ });
236
+ return (_ctx, _cache) => {
237
+ return openBlock(), createBlock(unref(Primitive), {
238
+ class: normalizeClass(["ui-Button", resetClass.value]),
239
+ "as-child": props.asChild,
240
+ as: props.as,
241
+ "data-accent-color": props.color,
242
+ "data-radius": props.radius,
243
+ "data-disabled": props.disabled ? true : void 0
244
+ }, {
245
+ default: withCtx(() => [
246
+ renderSlot(_ctx.$slots, "default")
247
+ ]),
248
+ _: 3
249
+ }, 8, ["class", "as-child", "as", "data-accent-color", "data-radius", "data-disabled"]);
250
+ };
197
251
  }
198
- }), Y = /* @__PURE__ */ m({
252
+ });
253
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
199
254
  __name: "IconButton",
200
255
  props: {
201
256
  color: {},
@@ -207,16 +262,20 @@ const _a = /* @__PURE__ */ m({
207
262
  asChild: { type: Boolean },
208
263
  as: {}
209
264
  },
210
- setup(s) {
211
- const t = V(s);
212
- return (o, l) => (r(), d(W, g({ class: "ui-IconButton" }, a(t)), {
213
- default: c(() => [
214
- _(o.$slots, "default")
215
- ]),
216
- _: 3
217
- }, 16));
265
+ setup(__props) {
266
+ const props = __props;
267
+ const forwarded = useForwardProps(props);
268
+ return (_ctx, _cache) => {
269
+ return openBlock(), createBlock(_sfc_main$U, mergeProps({ class: "ui-IconButton" }, unref(forwarded)), {
270
+ default: withCtx(() => [
271
+ renderSlot(_ctx.$slots, "default")
272
+ ]),
273
+ _: 3
274
+ }, 16);
275
+ };
218
276
  }
219
- }), eo = {
277
+ });
278
+ const BRAND_ICONS = {
220
279
  google: "logos:google-icon",
221
280
  facebook: "simple-icons:facebook",
222
281
  x: "simple-icons:x",
@@ -224,7 +283,8 @@ const _a = /* @__PURE__ */ m({
224
283
  apple: "simple-icons:apple",
225
284
  slack: "logos:slack-icon",
226
285
  figma: "logos:figma"
227
- }, Ca = /* @__PURE__ */ m({
286
+ };
287
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
228
288
  __name: "SocialButton",
229
289
  props: {
230
290
  brand: {},
@@ -234,26 +294,35 @@ const _a = /* @__PURE__ */ m({
234
294
  asChild: { type: Boolean },
235
295
  as: { default: "button" }
236
296
  },
237
- setup(s) {
238
- const e = s, t = C(() => R(e, ["size", "brand"])), o = C(() => eo[e.brand]);
239
- return (l, n) => (r(), d(a(U), {
240
- class: I(["ui-Button ui-SocialButton", t.value]),
241
- "as-child": e.asChild,
242
- as: e.as,
243
- "data-radius": e.radius,
244
- "data-disabled": e.disabled ? !0 : void 0
245
- }, {
246
- default: c(() => [
247
- o.value ? (r(), d(a(k), {
248
- key: 0,
249
- icon: o.value
250
- }, null, 8, ["icon"])) : z("", !0),
251
- _(l.$slots, "default")
252
- ]),
253
- _: 3
254
- }, 8, ["class", "as-child", "as", "data-radius", "data-disabled"]));
297
+ setup(__props) {
298
+ const props = __props;
299
+ const resetClass = computed(() => {
300
+ return extractClass(props, ["size", "brand"]);
301
+ });
302
+ const brandIcon = computed(() => {
303
+ return BRAND_ICONS[props.brand];
304
+ });
305
+ return (_ctx, _cache) => {
306
+ return openBlock(), createBlock(unref(Primitive), {
307
+ class: normalizeClass(["ui-Button ui-SocialButton", resetClass.value]),
308
+ "as-child": props.asChild,
309
+ as: props.as,
310
+ "data-radius": props.radius,
311
+ "data-disabled": props.disabled ? true : void 0
312
+ }, {
313
+ default: withCtx(() => [
314
+ brandIcon.value ? (openBlock(), createBlock(unref(Icon), {
315
+ key: 0,
316
+ icon: brandIcon.value
317
+ }, null, 8, ["icon"])) : createCommentVNode("", true),
318
+ renderSlot(_ctx.$slots, "default")
319
+ ]),
320
+ _: 3
321
+ }, 8, ["class", "as-child", "as", "data-radius", "data-disabled"]);
322
+ };
255
323
  }
256
- }), Ie = /* @__PURE__ */ m({
324
+ });
325
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
257
326
  __name: "ScrollArea",
258
327
  props: {
259
328
  size: { default: "1" },
@@ -265,56 +334,64 @@ const _a = /* @__PURE__ */ m({
265
334
  asChild: { type: Boolean },
266
335
  as: {}
267
336
  },
268
- setup(s) {
269
- const e = s;
270
- return (t, o) => (r(), d(a(de), {
271
- class: "ui-ScrollArea",
272
- "as-child": e.asChild,
273
- dir: e.dir,
274
- "scroll-hide-delay": e.scrollHideDelay,
275
- type: e.type,
276
- "data-radius": e.radius
277
- }, {
278
- default: c(() => [
279
- p(a(pe), { class: "ui-ScrollAreaViewport" }, {
280
- default: c(() => [
281
- _(t.$slots, "default")
282
- ]),
283
- _: 3
284
- }),
285
- o[0] || (o[0] = b("div", { class: "ui-ScrollAreaViewportFocusRing" }, null, -1)),
286
- e.scrollbars !== "horizontal" ? (r(), d(a(ne), {
287
- key: 0,
288
- class: "ui-ScrollAreaScrollbar",
289
- "data-size": e.size,
290
- orientation: "vertical"
291
- }, {
292
- default: c(() => [
293
- p(a(re), { class: "ui-ScrollAreaThumb" })
294
- ]),
295
- _: 1
296
- }, 8, ["data-size"])) : z("", !0),
297
- e.scrollbars !== "vertical" ? (r(), d(a(ne), {
298
- key: 1,
299
- class: "ui-ScrollAreaScrollbar",
300
- "data-size": e.size,
301
- orientation: "horizontal"
302
- }, {
303
- default: c(() => [
304
- p(a(re), { class: "ui-ScrollAreaThumb" })
305
- ]),
306
- _: 1
307
- }, 8, ["data-size"])) : z("", !0),
308
- e.scrollbars === "both" ? (r(), d(a(Ue), {
309
- key: 2,
310
- "class-name": "ui-ScrollAreaCorner"
311
- })) : z("", !0)
312
- ]),
313
- _: 3
314
- }, 8, ["as-child", "dir", "scroll-hide-delay", "type", "data-radius"]));
337
+ setup(__props) {
338
+ const props = __props;
339
+ return (_ctx, _cache) => {
340
+ return openBlock(), createBlock(unref(ScrollAreaRoot), {
341
+ class: "ui-ScrollArea",
342
+ "as-child": props.asChild,
343
+ dir: props.dir,
344
+ "scroll-hide-delay": props.scrollHideDelay,
345
+ type: props.type,
346
+ "data-radius": props.radius
347
+ }, {
348
+ default: withCtx(() => [
349
+ createVNode(unref(ScrollAreaViewport), { class: "ui-ScrollAreaViewport" }, {
350
+ default: withCtx(() => [
351
+ renderSlot(_ctx.$slots, "default")
352
+ ]),
353
+ _: 3
354
+ }),
355
+ _cache[0] || (_cache[0] = createElementVNode("div", { class: "ui-ScrollAreaViewportFocusRing" }, null, -1)),
356
+ props.scrollbars !== "horizontal" ? (openBlock(), createBlock(unref(ScrollAreaScrollbar), {
357
+ key: 0,
358
+ class: "ui-ScrollAreaScrollbar",
359
+ "data-size": props.size,
360
+ orientation: "vertical"
361
+ }, {
362
+ default: withCtx(() => [
363
+ createVNode(unref(ScrollAreaThumb), { class: "ui-ScrollAreaThumb" })
364
+ ]),
365
+ _: 1
366
+ }, 8, ["data-size"])) : createCommentVNode("", true),
367
+ props.scrollbars !== "vertical" ? (openBlock(), createBlock(unref(ScrollAreaScrollbar), {
368
+ key: 1,
369
+ class: "ui-ScrollAreaScrollbar",
370
+ "data-size": props.size,
371
+ orientation: "horizontal"
372
+ }, {
373
+ default: withCtx(() => [
374
+ createVNode(unref(ScrollAreaThumb), { class: "ui-ScrollAreaThumb" })
375
+ ]),
376
+ _: 1
377
+ }, 8, ["data-size"])) : createCommentVNode("", true),
378
+ props.scrollbars === "both" ? (openBlock(), createBlock(unref(ScrollAreaCorner), {
379
+ key: 2,
380
+ "class-name": "ui-ScrollAreaCorner"
381
+ })) : createCommentVNode("", true)
382
+ ]),
383
+ _: 3,
384
+ __: [0]
385
+ }, 8, ["as-child", "dir", "scroll-hide-delay", "type", "data-radius"]);
386
+ };
315
387
  }
316
- }), to = { class: "ui-DialogScroll" }, oo = ["data-align"], ba = /* @__PURE__ */ m({
317
- inheritAttrs: !1,
388
+ });
389
+ const _hoisted_1$l = { class: "ui-DialogScroll" };
390
+ const _hoisted_2$9 = ["data-align"];
391
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
392
+ ...{
393
+ inheritAttrs: false
394
+ },
318
395
  __name: "AlertDialogContent",
319
396
  props: {
320
397
  to: {},
@@ -334,8 +411,10 @@ const _a = /* @__PURE__ */ m({
334
411
  as: {}
335
412
  },
336
413
  emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
337
- setup(s, { emit: e }) {
338
- const t = s, l = q(t, e, [
414
+ setup(__props, { emit: __emit }) {
415
+ const props = __props;
416
+ const emits = __emit;
417
+ const forwarded = useForwardPropsEmits(props, emits, [
339
418
  "to",
340
419
  "align",
341
420
  "class",
@@ -347,49 +426,56 @@ const _a = /* @__PURE__ */ m({
347
426
  "minHeight",
348
427
  "maxHeight"
349
428
  ]);
350
- return (n, i) => (r(), d(a(qe), {
351
- to: t.to
352
- }, {
353
- default: c(() => [
354
- p(a(Ne), { class: "ui-DialogOverlay" }, {
355
- default: c(() => [
356
- b("div", to, [
357
- b("div", {
358
- class: "ui-DialogScrollPadding",
359
- "data-align": t.align
360
- }, [
361
- p(a(Ke), g({
362
- class: ["ui-DialogContent", t.class],
363
- "data-size": t.size
364
- }, {
365
- ...n.$attrs,
366
- ...a(l)
367
- }, {
368
- style: {
369
- width: t.width,
370
- height: t.height,
371
- minWidth: t.minWidth,
372
- maxWidth: t.maxWidth,
373
- minHeight: t.minHeight,
374
- maxHeight: t.maxHeight
375
- }
376
- }), {
377
- default: c(() => [
378
- _(n.$slots, "default")
379
- ]),
380
- _: 3
381
- }, 16, ["class", "data-size", "style"])
382
- ], 8, oo)
383
- ])
384
- ]),
385
- _: 3
386
- })
387
- ]),
388
- _: 3
389
- }, 8, ["to"]));
429
+ return (_ctx, _cache) => {
430
+ return openBlock(), createBlock(unref(AlertDialogPortal), {
431
+ to: props.to
432
+ }, {
433
+ default: withCtx(() => [
434
+ createVNode(unref(AlertDialogOverlay), { class: "ui-DialogOverlay" }, {
435
+ default: withCtx(() => [
436
+ createElementVNode("div", _hoisted_1$l, [
437
+ createElementVNode("div", {
438
+ class: "ui-DialogScrollPadding",
439
+ "data-align": props.align
440
+ }, [
441
+ createVNode(unref(AlertDialogContent), mergeProps({
442
+ class: ["ui-DialogContent", props.class],
443
+ "data-size": props.size
444
+ }, {
445
+ ..._ctx.$attrs,
446
+ ...unref(forwarded)
447
+ }, {
448
+ style: {
449
+ width: props.width,
450
+ height: props.height,
451
+ minWidth: props.minWidth,
452
+ maxWidth: props.maxWidth,
453
+ minHeight: props.minHeight,
454
+ maxHeight: props.maxHeight
455
+ }
456
+ }), {
457
+ default: withCtx(() => [
458
+ renderSlot(_ctx.$slots, "default")
459
+ ]),
460
+ _: 3
461
+ }, 16, ["class", "data-size", "style"])
462
+ ], 8, _hoisted_2$9)
463
+ ])
464
+ ]),
465
+ _: 3
466
+ })
467
+ ]),
468
+ _: 3
469
+ }, 8, ["to"]);
470
+ };
390
471
  }
391
- }), ao = { class: "ui-DialogScroll" }, so = ["data-align"], $a = /* @__PURE__ */ m({
392
- inheritAttrs: !1,
472
+ });
473
+ const _hoisted_1$k = { class: "ui-DialogScroll" };
474
+ const _hoisted_2$8 = ["data-align"];
475
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
476
+ ...{
477
+ inheritAttrs: false
478
+ },
393
479
  __name: "DialogContent",
394
480
  props: {
395
481
  to: {},
@@ -409,8 +495,10 @@ const _a = /* @__PURE__ */ m({
409
495
  as: {}
410
496
  },
411
497
  emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
412
- setup(s, { emit: e }) {
413
- const t = s, l = q(t, e, [
498
+ setup(__props, { emit: __emit }) {
499
+ const props = __props;
500
+ const emits = __emit;
501
+ const forwarded = useForwardPropsEmits(props, emits, [
414
502
  "to",
415
503
  "align",
416
504
  "class",
@@ -422,85 +510,94 @@ const _a = /* @__PURE__ */ m({
422
510
  "minHeight",
423
511
  "maxHeight"
424
512
  ]);
425
- return (n, i) => (r(), d(a(Qe), {
426
- to: t.to
427
- }, {
428
- default: c(() => [
429
- p(a(Ze), { class: "ui-DialogOverlay" }, {
430
- default: c(() => [
431
- b("div", ao, [
432
- b("div", {
433
- class: "ui-DialogScrollPadding",
434
- "data-align": t.align
435
- }, [
436
- p(a(Je), g({
437
- class: ["ui-DialogContent", t.class],
438
- "data-size": t.size
439
- }, {
440
- ...n.$attrs,
441
- ...a(l)
442
- }, {
443
- style: {
444
- width: t.width,
445
- height: t.height,
446
- minWidth: t.minWidth,
447
- maxWidth: t.maxWidth,
448
- minHeight: t.minHeight,
449
- maxHeight: t.maxHeight
450
- }
451
- }), {
452
- default: c(() => [
453
- _(n.$slots, "default")
454
- ]),
455
- _: 3
456
- }, 16, ["class", "data-size", "style"])
457
- ], 8, so)
458
- ])
459
- ]),
460
- _: 3
461
- })
462
- ]),
463
- _: 3
464
- }, 8, ["to"]));
513
+ return (_ctx, _cache) => {
514
+ return openBlock(), createBlock(unref(DialogPortal), {
515
+ to: props.to
516
+ }, {
517
+ default: withCtx(() => [
518
+ createVNode(unref(DialogOverlay), { class: "ui-DialogOverlay" }, {
519
+ default: withCtx(() => [
520
+ createElementVNode("div", _hoisted_1$k, [
521
+ createElementVNode("div", {
522
+ class: "ui-DialogScrollPadding",
523
+ "data-align": props.align
524
+ }, [
525
+ createVNode(unref(DialogContent), mergeProps({
526
+ class: ["ui-DialogContent", props.class],
527
+ "data-size": props.size
528
+ }, {
529
+ ..._ctx.$attrs,
530
+ ...unref(forwarded)
531
+ }, {
532
+ style: {
533
+ width: props.width,
534
+ height: props.height,
535
+ minWidth: props.minWidth,
536
+ maxWidth: props.maxWidth,
537
+ minHeight: props.minHeight,
538
+ maxHeight: props.maxHeight
539
+ }
540
+ }), {
541
+ default: withCtx(() => [
542
+ renderSlot(_ctx.$slots, "default")
543
+ ]),
544
+ _: 3
545
+ }, 16, ["class", "data-size", "style"])
546
+ ], 8, _hoisted_2$8)
547
+ ])
548
+ ]),
549
+ _: 3
550
+ })
551
+ ]),
552
+ _: 3
553
+ }, 8, ["to"]);
554
+ };
465
555
  }
466
- }), Ba = /* @__PURE__ */ m({
556
+ });
557
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
467
558
  __name: "DialogHead",
468
559
  props: {
469
560
  title: {}
470
561
  },
471
- setup(s) {
472
- const e = s;
473
- return (t, o) => (r(), d(Xt, {
474
- class: "ui-DialogHead",
475
- side: "x"
476
- }, {
477
- default: c(() => [
478
- p(a(Xe), { class: "font-semibold" }, {
479
- default: c(() => [
480
- L(T(e.title), 1)
481
- ]),
482
- _: 1
483
- }),
484
- p(W, {
485
- as: a(Ye),
486
- type: "button",
487
- variant: "ghost",
488
- color: "gray",
489
- radius: "full",
490
- style: { "--button-ghost-padding-x": "var(--space-1)" },
491
- "aria-label": "Close"
492
- }, {
493
- default: c(() => [
494
- p(a(k), { icon: "lucide:x" })
495
- ]),
496
- _: 1
497
- }, 8, ["as"])
498
- ]),
499
- _: 1
500
- }));
562
+ setup(__props) {
563
+ const props = __props;
564
+ return (_ctx, _cache) => {
565
+ return openBlock(), createBlock(_sfc_main$X, {
566
+ class: "ui-DialogHead",
567
+ side: "x"
568
+ }, {
569
+ default: withCtx(() => [
570
+ createVNode(unref(DialogTitle), { class: "font-semibold" }, {
571
+ default: withCtx(() => [
572
+ createTextVNode(toDisplayString(props.title), 1)
573
+ ]),
574
+ _: 1
575
+ }),
576
+ createVNode(_sfc_main$T, {
577
+ as: unref(DialogClose),
578
+ type: "button",
579
+ variant: "ghost",
580
+ color: "gray",
581
+ radius: "full",
582
+ "aria-label": "Close"
583
+ }, {
584
+ default: withCtx(() => [
585
+ createVNode(unref(Icon), { icon: "lucide:x" })
586
+ ]),
587
+ _: 1
588
+ }, 8, ["as"])
589
+ ]),
590
+ _: 1
591
+ });
592
+ };
501
593
  }
502
- }), lo = { class: "ui-MenuViewport" }, [no, ro] = oe("ui_DropdownMenuContent"), xa = /* @__PURE__ */ m({
503
- inheritAttrs: !1,
594
+ });
595
+ const _hoisted_1$j = { class: "ui-MenuViewport" };
596
+ const [injectDropdownMenuContentContext, provideDropdownMenuContentContext] = createContext("ui_DropdownMenuContent");
597
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
598
+ ...{
599
+ inheritAttrs: false
600
+ },
504
601
  __name: "DropdownMenuContent",
505
602
  props: {
506
603
  to: {},
@@ -529,44 +626,53 @@ const _a = /* @__PURE__ */ m({
529
626
  as: {}
530
627
  },
531
628
  emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
532
- setup(s, { emit: e }) {
533
- const t = s, l = q(t, e, [
629
+ setup(__props, { emit: __emit }) {
630
+ const props = __props;
631
+ const emits = __emit;
632
+ const forwarded = useForwardPropsEmits(props, emits, [
534
633
  "to",
535
634
  "size",
536
635
  "variant",
537
636
  "color",
538
637
  "highContrast"
539
- ]), { forwardRef: n } = M(), { size: i, variant: u, color: y, highContrast: v } = ee(t);
540
- return ro({ size: i, variant: u, color: y, highContrast: v }), (h, f) => (r(), d(a(et), {
541
- to: t.to
542
- }, {
543
- default: c(() => [
544
- p(a(tt), g({
545
- ...h.$attrs,
546
- ...a(l)
547
- }, {
548
- ref: a(n),
549
- class: "ui-PopperContent ui-MenuContent",
550
- "data-accent-color": t.color,
551
- "data-size": t.size
552
- }), {
553
- default: c(() => [
554
- p(Ie, { type: "auto" }, {
555
- default: c(() => [
556
- b("div", lo, [
557
- _(h.$slots, "default")
558
- ])
559
- ]),
560
- _: 3
561
- })
562
- ]),
563
- _: 3
564
- }, 16, ["data-accent-color", "data-size"])
565
- ]),
566
- _: 3
567
- }, 8, ["to"]));
638
+ ]);
639
+ const { forwardRef } = useForwardExpose();
640
+ const { size, variant, color, highContrast } = toRefs(props);
641
+ provideDropdownMenuContentContext({ size, variant, color, highContrast });
642
+ return (_ctx, _cache) => {
643
+ return openBlock(), createBlock(unref(DropdownMenuPortal), {
644
+ to: props.to
645
+ }, {
646
+ default: withCtx(() => [
647
+ createVNode(unref(DropdownMenuContent), mergeProps({
648
+ ..._ctx.$attrs,
649
+ ...unref(forwarded)
650
+ }, {
651
+ ref: unref(forwardRef),
652
+ class: "ui-PopperContent ui-MenuContent",
653
+ "data-accent-color": props.color,
654
+ "data-size": props.size
655
+ }), {
656
+ default: withCtx(() => [
657
+ createVNode(_sfc_main$R, { type: "auto" }, {
658
+ default: withCtx(() => [
659
+ createElementVNode("div", _hoisted_1$j, [
660
+ renderSlot(_ctx.$slots, "default")
661
+ ])
662
+ ]),
663
+ _: 3
664
+ })
665
+ ]),
666
+ _: 3
667
+ }, 16, ["data-accent-color", "data-size"])
668
+ ]),
669
+ _: 3
670
+ }, 8, ["to"]);
671
+ };
568
672
  }
569
- }), io = ["textContent"], wa = /* @__PURE__ */ m({
673
+ });
674
+ const _hoisted_1$i = ["textContent"];
675
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
570
676
  __name: "DropdownMenuItem",
571
677
  props: {
572
678
  color: {},
@@ -577,33 +683,38 @@ const _a = /* @__PURE__ */ m({
577
683
  as: {}
578
684
  },
579
685
  emits: ["select"],
580
- setup(s, { emit: e }) {
581
- const t = s, l = q(t, e, ["color", "shortcut"]);
582
- M();
583
- const n = no();
584
- return (i, u) => {
585
- var y;
586
- return r(), d(a(ot), g({
686
+ setup(__props, { emit: __emit }) {
687
+ const props = __props;
688
+ const emits = __emit;
689
+ const forwarded = useForwardPropsEmits(props, emits, ["color", "shortcut"]);
690
+ useForwardExpose();
691
+ const rootContext = injectDropdownMenuContentContext();
692
+ return (_ctx, _cache) => {
693
+ var _a;
694
+ return openBlock(), createBlock(unref(DropdownMenuItem), mergeProps({
587
695
  class: "ui-MenuItem",
588
- "data-accent-color": t.color,
589
- "data-size": a(n).size.value,
590
- "data-variant": a(n).variant.value,
591
- "data-high-contrast": ((y = a(n).highContrast) == null ? void 0 : y.value) || void 0
592
- }, a(l)), {
593
- default: c(() => [
594
- _(i.$slots, "default"),
595
- t.shortcut ? (r(), $("div", {
696
+ "data-accent-color": props.color,
697
+ "data-size": unref(rootContext).size.value,
698
+ "data-variant": unref(rootContext).variant.value,
699
+ "data-high-contrast": ((_a = unref(rootContext).highContrast) == null ? void 0 : _a.value) || void 0
700
+ }, unref(forwarded)), {
701
+ default: withCtx(() => [
702
+ renderSlot(_ctx.$slots, "default"),
703
+ props.shortcut ? (openBlock(), createElementBlock("div", {
596
704
  key: 0,
597
705
  class: "ui-MenuShortcut",
598
- textContent: T(t.shortcut)
599
- }, null, 8, io)) : z("", !0)
706
+ textContent: toDisplayString(props.shortcut)
707
+ }, null, 8, _hoisted_1$i)) : createCommentVNode("", true)
600
708
  ]),
601
709
  _: 3
602
710
  }, 16, ["data-accent-color", "data-size", "data-variant", "data-high-contrast"]);
603
711
  };
604
712
  }
605
- }), Sa = /* @__PURE__ */ m({
606
- inheritAttrs: !1,
713
+ });
714
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
715
+ ...{
716
+ inheritAttrs: false
717
+ },
607
718
  __name: "PopoverContent",
608
719
  props: {
609
720
  to: {},
@@ -629,26 +740,31 @@ const _a = /* @__PURE__ */ m({
629
740
  disableOutsidePointerEvents: { type: Boolean }
630
741
  },
631
742
  emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
632
- setup(s, { emit: e }) {
633
- const t = s, l = q(t, e, ["to", "size"]);
634
- return (n, i) => (r(), d(a(at), {
635
- to: t.to
636
- }, {
637
- default: c(() => [
638
- p(a(st), g({ ...n.$attrs, ...a(l) }, {
639
- "data-size": t.size,
640
- class: "ui-PopoverContent"
641
- }), {
642
- default: c(() => [
643
- _(n.$slots, "default")
644
- ]),
645
- _: 3
646
- }, 16, ["data-size"])
647
- ]),
648
- _: 3
649
- }, 8, ["to"]));
743
+ setup(__props, { emit: __emit }) {
744
+ const props = __props;
745
+ const emits = __emit;
746
+ const forwarded = useForwardPropsEmits(props, emits, ["to", "size"]);
747
+ return (_ctx, _cache) => {
748
+ return openBlock(), createBlock(unref(PopoverPortal), {
749
+ to: props.to
750
+ }, {
751
+ default: withCtx(() => [
752
+ createVNode(unref(PopoverContent), mergeProps({ ..._ctx.$attrs, ...unref(forwarded) }, {
753
+ "data-size": props.size,
754
+ class: "ui-PopoverContent"
755
+ }), {
756
+ default: withCtx(() => [
757
+ renderSlot(_ctx.$slots, "default")
758
+ ]),
759
+ _: 3
760
+ }, 16, ["data-size"])
761
+ ]),
762
+ _: 3
763
+ }, 8, ["to"]);
764
+ };
650
765
  }
651
- }), za = /* @__PURE__ */ m({
766
+ });
767
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
652
768
  __name: "Switch",
653
769
  props: {
654
770
  color: {},
@@ -667,26 +783,31 @@ const _a = /* @__PURE__ */ m({
667
783
  required: { type: Boolean }
668
784
  },
669
785
  emits: ["update:modelValue"],
670
- setup(s, { emit: e }) {
671
- const t = e, o = s, [l, n] = N(o, t, [
786
+ setup(__props, { emit: __emit }) {
787
+ const emits = __emit;
788
+ const props = __props;
789
+ const [forwarded, resetClass] = extractForwardPropsEmits(props, emits, [
672
790
  "color",
673
791
  "size",
674
792
  "variant",
675
793
  "highContrast",
676
794
  "radius"
677
795
  ]);
678
- return (i, u) => (r(), d(a(lt), g(a(l), {
679
- class: ["ui-Switch", a(n)],
680
- "data-accent-color": o.color,
681
- "data-radius": o.radius
682
- }), {
683
- default: c(() => [
684
- p(a(nt), { class: "ui-SwitchThumb" })
685
- ]),
686
- _: 1
687
- }, 16, ["class", "data-accent-color", "data-radius"]));
796
+ return (_ctx, _cache) => {
797
+ return openBlock(), createBlock(unref(SwitchRoot), mergeProps(unref(forwarded), {
798
+ class: ["ui-Switch", unref(resetClass)],
799
+ "data-accent-color": props.color,
800
+ "data-radius": props.radius
801
+ }), {
802
+ default: withCtx(() => [
803
+ createVNode(unref(SwitchThumb), { class: "ui-SwitchThumb" })
804
+ ]),
805
+ _: 1
806
+ }, 16, ["class", "data-accent-color", "data-radius"]);
807
+ };
688
808
  }
689
- }), co = {
809
+ });
810
+ const _hoisted_1$h = {
690
811
  key: 0,
691
812
  xmlns: "http://www.w3.org/2000/svg",
692
813
  viewBox: "0 0 24 24",
@@ -695,13 +816,16 @@ const _a = /* @__PURE__ */ m({
695
816
  "stroke-width": "4",
696
817
  "stroke-linecap": "round",
697
818
  "stroke-linejoin": "round"
698
- }, uo = {
819
+ };
820
+ const _hoisted_2$7 = {
699
821
  key: 0,
700
822
  d: "M5 12h14"
701
- }, po = {
823
+ };
824
+ const _hoisted_3$4 = {
702
825
  key: 1,
703
826
  d: "M20 6 9 17l-5-5"
704
- }, ke = /* @__PURE__ */ m({
827
+ };
828
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
705
829
  __name: "Checkbox",
706
830
  props: {
707
831
  color: {},
@@ -719,85 +843,126 @@ const _a = /* @__PURE__ */ m({
719
843
  required: { type: Boolean }
720
844
  },
721
845
  emits: ["update:modelValue"],
722
- setup(s, { emit: e }) {
723
- const t = e, o = s, [l, n] = N(o, t, ["color", "size", "variant", "highContrast"]);
724
- return (i, u) => (r(), d(a(rt), g(a(l), {
725
- class: ["ui-Checkbox", a(n)],
726
- "data-accent-color": o.color
727
- }), {
728
- default: c(() => [
729
- p(a(it), {
730
- class: "ui-CheckboxIndicator",
731
- "as-child": ""
732
- }, {
733
- default: c(() => [
734
- o.modelValue !== !1 ? (r(), $("svg", co, [
735
- o.modelValue === "indeterminate" ? (r(), $("path", uo)) : (r(), $("path", po))
736
- ])) : z("", !0)
737
- ]),
738
- _: 1
739
- })
740
- ]),
741
- _: 1
742
- }, 16, ["class", "data-accent-color"]));
846
+ setup(__props, { emit: __emit }) {
847
+ const emits = __emit;
848
+ const props = __props;
849
+ const [forwarded, resetClass] = extractForwardPropsEmits(props, emits, ["color", "size", "variant", "highContrast"]);
850
+ return (_ctx, _cache) => {
851
+ return openBlock(), createBlock(unref(CheckboxRoot), mergeProps(unref(forwarded), {
852
+ class: ["ui-Checkbox", unref(resetClass)],
853
+ "data-accent-color": props.color
854
+ }), {
855
+ default: withCtx(() => [
856
+ createVNode(unref(CheckboxIndicator), {
857
+ class: "ui-CheckboxIndicator",
858
+ "as-child": ""
859
+ }, {
860
+ default: withCtx(() => [
861
+ props.modelValue !== false ? (openBlock(), createElementBlock("svg", _hoisted_1$h, [
862
+ props.modelValue === "indeterminate" ? (openBlock(), createElementBlock("path", _hoisted_2$7)) : (openBlock(), createElementBlock("path", _hoisted_3$4))
863
+ ])) : createCommentVNode("", true)
864
+ ]),
865
+ _: 1
866
+ })
867
+ ]),
868
+ _: 1
869
+ }, 16, ["class", "data-accent-color"]);
870
+ };
743
871
  }
744
- }), [Ve, fo] = oe("ui_CheckboxGroupRoot"), Ia = /* @__PURE__ */ m({
872
+ });
873
+ const [injectCheckboxGroupRootContext, provideCheckboxGroupRootContext] = createContext("ui_CheckboxGroupRoot");
874
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
745
875
  __name: "CheckboxGroupRoot",
746
- props: /* @__PURE__ */ Q({
876
+ props: /* @__PURE__ */ mergeModels({
747
877
  disabled: { type: Boolean },
748
878
  name: {},
749
879
  asChild: { type: Boolean },
750
880
  as: {}
751
881
  }, {
752
- modelValue: {
882
+ "modelValue": {
753
883
  default: []
754
884
  },
755
- modelModifiers: {}
885
+ "modelModifiers": {}
756
886
  }),
757
887
  emits: ["update:modelValue"],
758
- setup(s) {
759
- const e = s, { disabled: t, name: o } = ee(e), l = P([]), [n, i] = Z(s, "modelValue", {
760
- set(h) {
761
- return i.number ? h = h.map((f) => Number(f)) : i.trim && (h = h.map((f) => f.trim())), h;
888
+ setup(__props) {
889
+ const props = __props;
890
+ const { disabled, name } = toRefs(props);
891
+ const allValues = ref([]);
892
+ const [modelValue, modifiers] = useModel(__props, "modelValue", {
893
+ set(value) {
894
+ if (modifiers.number) {
895
+ value = value.map((v) => Number(v));
896
+ } else if (modifiers.trim) {
897
+ value = value.map((v) => v.trim());
898
+ }
899
+ return value;
900
+ }
901
+ });
902
+ const selected = computed(() => {
903
+ return modelValue.value || [];
904
+ });
905
+ const checked = computed(() => {
906
+ var _a, _b;
907
+ if (!allValues.value.length) {
908
+ return false;
909
+ }
910
+ if (((_a = modelValue.value) == null ? void 0 : _a.length) === allValues.value.length) {
911
+ return true;
912
+ } else if ((_b = modelValue.value) == null ? void 0 : _b.length) {
913
+ return "indeterminate";
914
+ } else {
915
+ return false;
916
+ }
917
+ });
918
+ const removeModelValue = (value) => {
919
+ var _a, _b;
920
+ const index = (_a = modelValue.value) == null ? void 0 : _a.indexOf(value);
921
+ if (index !== -1 && index !== void 0) {
922
+ (_b = modelValue.value) == null ? void 0 : _b.splice(index, 1);
762
923
  }
763
- }), u = C(() => n.value || []), y = C(() => {
764
- var h, f;
765
- return l.value.length ? ((h = n.value) == null ? void 0 : h.length) === l.value.length ? !0 : (f = n.value) != null && f.length ? "indeterminate" : !1 : !1;
766
- }), v = (h) => {
767
- var B, A;
768
- const f = (B = n.value) == null ? void 0 : B.indexOf(h);
769
- f !== -1 && f !== void 0 && ((A = n.value) == null || A.splice(f, 1));
770
- };
771
- return fo({
772
- selected: u,
773
- checked: y,
774
- addModelValue: (h) => {
775
- var f, B;
776
- ((f = n.value) == null ? void 0 : f.indexOf(h)) === -1 && ((B = n.value) == null || B.push(h));
924
+ };
925
+ provideCheckboxGroupRootContext({
926
+ selected,
927
+ checked,
928
+ addModelValue: (value) => {
929
+ var _a, _b;
930
+ if (((_a = modelValue.value) == null ? void 0 : _a.indexOf(value)) === -1) {
931
+ (_b = modelValue.value) == null ? void 0 : _b.push(value);
932
+ }
777
933
  },
778
- removeModelValue: v,
779
- toggleModelValue: (h) => {
780
- h ? n.value = [...l.value] : n.value = [];
934
+ removeModelValue,
935
+ toggleModelValue: (checked2) => {
936
+ if (checked2) {
937
+ modelValue.value = [...allValues.value];
938
+ } else {
939
+ modelValue.value = [];
940
+ }
781
941
  },
782
- initAllValue: (h) => {
783
- l.value.push(h);
942
+ initAllValue: (value) => {
943
+ allValues.value.push(value);
784
944
  },
785
- removeAllValue: (h) => {
786
- l.value.splice(l.value.indexOf(h), 1), v(h);
945
+ removeAllValue: (value) => {
946
+ allValues.value.splice(allValues.value.indexOf(value), 1);
947
+ removeModelValue(value);
787
948
  },
788
- disabled: t,
789
- name: o == null ? void 0 : o.value
790
- }), (h, f) => (r(), d(a(U), {
791
- as: e.as,
792
- "as-child": e.asChild
793
- }, {
794
- default: c(() => [
795
- _(h.$slots, "default")
796
- ]),
797
- _: 3
798
- }, 8, ["as", "as-child"]));
949
+ disabled,
950
+ name: name == null ? void 0 : name.value
951
+ });
952
+ return (_ctx, _cache) => {
953
+ return openBlock(), createBlock(unref(Primitive), {
954
+ as: props.as,
955
+ "as-child": props.asChild
956
+ }, {
957
+ default: withCtx(() => [
958
+ renderSlot(_ctx.$slots, "default")
959
+ ]),
960
+ _: 3
961
+ }, 8, ["as", "as-child"]);
962
+ };
799
963
  }
800
- }), ka = /* @__PURE__ */ m({
964
+ });
965
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
801
966
  __name: "CheckboxGroupItem",
802
967
  props: {
803
968
  value: {},
@@ -814,27 +979,42 @@ const _a = /* @__PURE__ */ m({
814
979
  name: {},
815
980
  required: { type: Boolean }
816
981
  },
817
- setup(s) {
818
- const e = s, t = V(e);
819
- M();
820
- const o = Ve(), l = C(() => {
821
- var u;
822
- return ((u = o.disabled) == null ? void 0 : u.value) || e.disabled;
823
- }), n = C(() => o.selected.value.indexOf(e.value) !== -1), i = (u) => {
824
- u ? o.addModelValue(e.value) : o.removeModelValue(e.value);
825
- };
826
- return ue(() => {
827
- o.initAllValue(e.value);
828
- }), Ce(() => {
829
- o.removeAllValue(e.value);
830
- }), (u, y) => (r(), d(ke, g({
831
- ...a(t),
832
- name: e.name || a(o).name,
833
- modelValue: n.value,
834
- disabled: l.value
835
- }, { "onUpdate:modelValue": i }), null, 16));
982
+ setup(__props) {
983
+ const props = __props;
984
+ const forwarded = useForwardProps(props);
985
+ useForwardExpose();
986
+ const rootContext = injectCheckboxGroupRootContext();
987
+ const disabled = computed(() => {
988
+ var _a;
989
+ return ((_a = rootContext.disabled) == null ? void 0 : _a.value) || props.disabled;
990
+ });
991
+ const checked = computed(() => {
992
+ return rootContext.selected.value.indexOf(props.value) !== -1;
993
+ });
994
+ const onUpdate = (checked2) => {
995
+ if (checked2) {
996
+ rootContext.addModelValue(props.value);
997
+ } else {
998
+ rootContext.removeModelValue(props.value);
999
+ }
1000
+ };
1001
+ onMounted(() => {
1002
+ rootContext.initAllValue(props.value);
1003
+ });
1004
+ onBeforeUnmount(() => {
1005
+ rootContext.removeAllValue(props.value);
1006
+ });
1007
+ return (_ctx, _cache) => {
1008
+ return openBlock(), createBlock(_sfc_main$J, mergeProps({
1009
+ ...unref(forwarded),
1010
+ name: props.name || unref(rootContext).name,
1011
+ modelValue: checked.value,
1012
+ disabled: disabled.value
1013
+ }, { "onUpdate:modelValue": onUpdate }), null, 16);
1014
+ };
836
1015
  }
837
- }), Va = /* @__PURE__ */ m({
1016
+ });
1017
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
838
1018
  __name: "CheckboxGroupControl",
839
1019
  props: {
840
1020
  color: {},
@@ -851,23 +1031,29 @@ const _a = /* @__PURE__ */ m({
851
1031
  name: {},
852
1032
  required: { type: Boolean }
853
1033
  },
854
- setup(s) {
855
- const e = s, t = V(e);
856
- M();
857
- const o = Ve(), l = C(() => {
858
- var i;
859
- return ((i = o.disabled) == null ? void 0 : i.value) || e.disabled;
860
- }), n = (i) => {
861
- o.toggleModelValue(i);
862
- };
863
- return (i, u) => (r(), d(ke, g({
864
- ...a(t),
865
- name: e.name || a(o).name,
866
- modelValue: a(o).checked.value,
867
- disabled: l.value
868
- }, { "onUpdate:modelValue": n }), null, 16));
1034
+ setup(__props) {
1035
+ const props = __props;
1036
+ const forwarded = useForwardProps(props);
1037
+ useForwardExpose();
1038
+ const rootContext = injectCheckboxGroupRootContext();
1039
+ const disabled = computed(() => {
1040
+ var _a;
1041
+ return ((_a = rootContext.disabled) == null ? void 0 : _a.value) || props.disabled;
1042
+ });
1043
+ const toggleModelValue = (checked) => {
1044
+ rootContext.toggleModelValue(checked);
1045
+ };
1046
+ return (_ctx, _cache) => {
1047
+ return openBlock(), createBlock(_sfc_main$J, mergeProps({
1048
+ ...unref(forwarded),
1049
+ name: props.name || unref(rootContext).name,
1050
+ modelValue: unref(rootContext).checked.value,
1051
+ disabled: disabled.value
1052
+ }, { "onUpdate:modelValue": toggleModelValue }), null, 16);
1053
+ };
869
1054
  }
870
- }), Ta = /* @__PURE__ */ m({
1055
+ });
1056
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
871
1057
  __name: "Toggle",
872
1058
  props: {
873
1059
  color: {},
@@ -884,26 +1070,31 @@ const _a = /* @__PURE__ */ m({
884
1070
  required: { type: Boolean }
885
1071
  },
886
1072
  emits: ["update:modelValue"],
887
- setup(s, { emit: e }) {
888
- const t = e, o = s, [l, n] = N(o, t, [
1073
+ setup(__props, { emit: __emit }) {
1074
+ const emits = __emit;
1075
+ const props = __props;
1076
+ const [forwarded, resetClass] = extractForwardPropsEmits(props, emits, [
889
1077
  "color",
890
1078
  "size",
891
1079
  "variant",
892
1080
  "highContrast",
893
1081
  "radius"
894
1082
  ]);
895
- return (i, u) => (r(), d(a(ct), g(a(l), {
896
- class: ["ui-Toggle", a(n)],
897
- "data-accent-color": o.color,
898
- "data-radius": o.radius
899
- }), {
900
- default: c(() => [
901
- _(i.$slots, "default")
902
- ]),
903
- _: 3
904
- }, 16, ["class", "data-accent-color", "data-radius"]));
1083
+ return (_ctx, _cache) => {
1084
+ return openBlock(), createBlock(unref(Toggle), mergeProps(unref(forwarded), {
1085
+ class: ["ui-Toggle", unref(resetClass)],
1086
+ "data-accent-color": props.color,
1087
+ "data-radius": props.radius
1088
+ }), {
1089
+ default: withCtx(() => [
1090
+ renderSlot(_ctx.$slots, "default")
1091
+ ]),
1092
+ _: 3
1093
+ }, 16, ["class", "data-accent-color", "data-radius"]);
1094
+ };
905
1095
  }
906
- }), Aa = /* @__PURE__ */ m({
1096
+ });
1097
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
907
1098
  __name: "ToggleGroupRoot",
908
1099
  props: {
909
1100
  color: {},
@@ -925,26 +1116,31 @@ const _a = /* @__PURE__ */ m({
925
1116
  defaultValue: {}
926
1117
  },
927
1118
  emits: ["update:modelValue"],
928
- setup(s, { emit: e }) {
929
- const t = e, o = s, [l, n] = N(o, t, [
1119
+ setup(__props, { emit: __emit }) {
1120
+ const emits = __emit;
1121
+ const props = __props;
1122
+ const [forwarded, resetClass] = extractForwardPropsEmits(props, emits, [
930
1123
  "color",
931
1124
  "size",
932
1125
  "variant",
933
1126
  "highContrast",
934
1127
  "radius"
935
1128
  ]);
936
- return (i, u) => (r(), d(a(ut), g(a(l), {
937
- class: ["ui-ToggleGroupRoot", a(n)],
938
- "data-accent-color": o.color,
939
- "data-radius": o.radius
940
- }), {
941
- default: c(() => [
942
- _(i.$slots, "default")
943
- ]),
944
- _: 3
945
- }, 16, ["class", "data-accent-color", "data-radius"]));
1129
+ return (_ctx, _cache) => {
1130
+ return openBlock(), createBlock(unref(ToggleGroupRoot), mergeProps(unref(forwarded), {
1131
+ class: ["ui-ToggleGroupRoot", unref(resetClass)],
1132
+ "data-accent-color": props.color,
1133
+ "data-radius": props.radius
1134
+ }), {
1135
+ default: withCtx(() => [
1136
+ renderSlot(_ctx.$slots, "default")
1137
+ ]),
1138
+ _: 3
1139
+ }, 16, ["class", "data-accent-color", "data-radius"]);
1140
+ };
946
1141
  }
947
- }), Ra = /* @__PURE__ */ m({
1142
+ });
1143
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
948
1144
  __name: "ToggleGroupItem",
949
1145
  props: {
950
1146
  value: {},
@@ -952,27 +1148,37 @@ const _a = /* @__PURE__ */ m({
952
1148
  asChild: { type: Boolean },
953
1149
  as: {}
954
1150
  },
955
- setup(s) {
956
- const t = V(s);
957
- return (o, l) => (r(), d(a(dt), g(a(t), { class: "ui-ToggleGroupItem" }), {
958
- default: c(() => [
959
- _(o.$slots, "default")
960
- ]),
961
- _: 3
962
- }, 16));
1151
+ setup(__props) {
1152
+ const props = __props;
1153
+ const forwarded = useForwardProps(props);
1154
+ return (_ctx, _cache) => {
1155
+ return openBlock(), createBlock(unref(ToggleGroupItem), mergeProps(unref(forwarded), { class: "ui-ToggleGroupItem" }), {
1156
+ default: withCtx(() => [
1157
+ renderSlot(_ctx.$slots, "default")
1158
+ ]),
1159
+ _: 3
1160
+ }, 16);
1161
+ };
963
1162
  }
964
- }), mo = ["data-radius", "data-accent-color"], ho = ["id", "type"], vo = {
1163
+ });
1164
+ const _hoisted_1$g = ["data-radius", "data-accent-color"];
1165
+ const _hoisted_2$6 = ["id", "type"];
1166
+ const _hoisted_3$3 = {
965
1167
  key: 0,
966
1168
  class: "ui-TextFieldSlot",
967
1169
  "data-side": "left"
968
- }, _o = {
1170
+ };
1171
+ const _hoisted_4$1 = {
969
1172
  key: 1,
970
1173
  class: "ui-TextFieldSlot",
971
1174
  "data-side": "right"
972
- }, ae = /* @__PURE__ */ m({
973
- inheritAttrs: !1,
1175
+ };
1176
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
1177
+ ...{
1178
+ inheritAttrs: false
1179
+ },
974
1180
  __name: "TextField",
975
- props: /* @__PURE__ */ Q({
1181
+ props: /* @__PURE__ */ mergeModels({
976
1182
  id: {},
977
1183
  class: {},
978
1184
  size: { default: "2" },
@@ -981,57 +1187,78 @@ const _a = /* @__PURE__ */ m({
981
1187
  radius: {},
982
1188
  type: { default: "text" }
983
1189
  }, {
984
- modelValue: {
1190
+ "modelValue": {
985
1191
  default: ""
986
1192
  },
987
- modelModifiers: {}
1193
+ "modelModifiers": {}
988
1194
  }),
989
1195
  emits: ["update:modelValue"],
990
- setup(s) {
991
- const e = s, t = P(), o = (u) => {
992
- const y = u.target;
993
- if (y.closest("input, button, a")) return;
994
- const v = t.value;
995
- if (!v) return;
996
- const f = y.closest("[data-side=right]") ? v.value.length : 0;
1196
+ setup(__props) {
1197
+ const props = __props;
1198
+ const inputRef = ref();
1199
+ const onPointerDown = (event) => {
1200
+ const target = event.target;
1201
+ if (target.closest("input, button, a")) return;
1202
+ const input = inputRef.value;
1203
+ if (!input) return;
1204
+ const isRightSlot = target.closest("[data-side=right]");
1205
+ const cursorPosition = isRightSlot ? input.value.length : 0;
997
1206
  requestAnimationFrame(() => {
998
- v.setSelectionRange(f, f), v.focus();
1207
+ input.setSelectionRange(cursorPosition, cursorPosition);
1208
+ input.focus();
999
1209
  });
1000
- }, [l, n] = Z(s, "modelValue", {
1001
- set(u) {
1002
- return n.number ? Number(u) : n.trim ? u.trim() : u;
1210
+ };
1211
+ const [modelValue, modifiers] = useModel(__props, "modelValue", {
1212
+ set(value) {
1213
+ if (modifiers.number) {
1214
+ return Number(value);
1215
+ }
1216
+ if (modifiers.trim) {
1217
+ return value.trim();
1218
+ }
1219
+ return value;
1003
1220
  }
1004
- }), i = C(() => {
1005
- const u = R(e, ["size", "variant"]);
1006
- return e.class && u.push(e.class), u;
1007
1221
  });
1008
- return (u, y) => (r(), $("div", {
1009
- class: I(["ui-TextField", i.value]),
1010
- "data-radius": e.radius,
1011
- "data-accent-color": e.color,
1012
- onPointerdown: o
1013
- }, [
1014
- te(b("input", g({
1015
- id: e.id,
1016
- ref_key: "inputRef",
1017
- ref: t,
1018
- "onUpdate:modelValue": y[0] || (y[0] = (v) => be(l) ? l.value = v : null),
1019
- type: e.type
1020
- }, u.$attrs, { class: "ui-TextFieldInput" }), null, 16, ho), [
1021
- [Oe, a(l)]
1022
- ]),
1023
- u.$slots.left ? (r(), $("div", vo, [
1024
- _(u.$slots, "left")
1025
- ])) : z("", !0),
1026
- u.$slots.right ? (r(), $("div", _o, [
1027
- _(u.$slots, "right")
1028
- ])) : z("", !0)
1029
- ], 42, mo));
1222
+ const resetClass = computed(() => {
1223
+ const rv = extractClass(props, ["size", "variant"]);
1224
+ if (props.class) {
1225
+ rv.push(props.class);
1226
+ }
1227
+ return rv;
1228
+ });
1229
+ return (_ctx, _cache) => {
1230
+ return openBlock(), createElementBlock("div", {
1231
+ class: normalizeClass(["ui-TextField", resetClass.value]),
1232
+ "data-radius": props.radius,
1233
+ "data-accent-color": props.color,
1234
+ onPointerdown: onPointerDown
1235
+ }, [
1236
+ withDirectives(createElementVNode("input", mergeProps({
1237
+ id: props.id,
1238
+ ref_key: "inputRef",
1239
+ ref: inputRef,
1240
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
1241
+ type: props.type
1242
+ }, _ctx.$attrs, { class: "ui-TextFieldInput" }), null, 16, _hoisted_2$6), [
1243
+ [vModelDynamic, unref(modelValue)]
1244
+ ]),
1245
+ _ctx.$slots.left ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
1246
+ renderSlot(_ctx.$slots, "left")
1247
+ ])) : createCommentVNode("", true),
1248
+ _ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
1249
+ renderSlot(_ctx.$slots, "right")
1250
+ ])) : createCommentVNode("", true)
1251
+ ], 42, _hoisted_1$g);
1252
+ };
1030
1253
  }
1031
- }), go = ["data-accent-color"], Pa = /* @__PURE__ */ m({
1032
- inheritAttrs: !1,
1254
+ });
1255
+ const _hoisted_1$f = ["data-accent-color"];
1256
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
1257
+ ...{
1258
+ inheritAttrs: false
1259
+ },
1033
1260
  __name: "TextArea",
1034
- props: /* @__PURE__ */ Q({
1261
+ props: /* @__PURE__ */ mergeModels({
1035
1262
  class: {},
1036
1263
  size: { default: "2" },
1037
1264
  variant: { default: "surface" },
@@ -1039,60 +1266,78 @@ const _a = /* @__PURE__ */ m({
1039
1266
  color: {},
1040
1267
  radius: {}
1041
1268
  }, {
1042
- modelValue: {
1269
+ "modelValue": {
1043
1270
  default: ""
1044
1271
  },
1045
- modelModifiers: {}
1272
+ "modelModifiers": {}
1046
1273
  }),
1047
1274
  emits: ["update:modelValue"],
1048
- setup(s) {
1049
- const e = s, t = Z(s, "modelValue"), o = C(() => {
1050
- const l = R(e, ["size", "variant", "resize"]);
1051
- return e.class && l.push(e.class), l;
1275
+ setup(__props) {
1276
+ const props = __props;
1277
+ const modelValue = useModel(__props, "modelValue");
1278
+ const resetClass = computed(() => {
1279
+ const rv = extractClass(props, ["size", "variant", "resize"]);
1280
+ if (props.class) {
1281
+ rv.push(props.class);
1282
+ }
1283
+ return rv;
1052
1284
  });
1053
- return (l, n) => (r(), $("div", {
1054
- class: I(["ui-TextArea", o.value]),
1055
- "data-accent-color": e.color
1056
- }, [
1057
- te(b("textarea", g({
1058
- "onUpdate:modelValue": n[0] || (n[0] = (i) => t.value = i)
1059
- }, l.$attrs, { class: "ui-TextAreaInput" }), null, 16), [
1060
- [$e, t.value]
1061
- ])
1062
- ], 10, go));
1285
+ return (_ctx, _cache) => {
1286
+ return openBlock(), createElementBlock("div", {
1287
+ class: normalizeClass(["ui-TextArea", resetClass.value]),
1288
+ "data-accent-color": props.color
1289
+ }, [
1290
+ withDirectives(createElementVNode("textarea", mergeProps({
1291
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event)
1292
+ }, _ctx.$attrs, { class: "ui-TextAreaInput" }), null, 16), [
1293
+ [vModelText, modelValue.value]
1294
+ ])
1295
+ ], 10, _hoisted_1$f);
1296
+ };
1063
1297
  }
1064
- }), yo = ["data-radius"], Co = ["id"], Da = /* @__PURE__ */ m({
1298
+ });
1299
+ const _hoisted_1$e = ["data-radius"];
1300
+ const _hoisted_2$5 = ["id"];
1301
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
1065
1302
  __name: "ColorField",
1066
- props: /* @__PURE__ */ Q({
1303
+ props: /* @__PURE__ */ mergeModels({
1067
1304
  id: {},
1068
1305
  variant: { default: "solid" },
1069
1306
  size: { default: "2" },
1070
1307
  radius: {}
1071
1308
  }, {
1072
- modelValue: {
1309
+ "modelValue": {
1073
1310
  default: "#000000"
1074
1311
  },
1075
- modelModifiers: {}
1312
+ "modelModifiers": {}
1076
1313
  }),
1077
1314
  emits: ["update:modelValue"],
1078
- setup(s) {
1079
- const e = s, t = Z(s, "modelValue"), o = C(() => R(e, ["size", "variant"]));
1080
- return (l, n) => (r(), $("div", {
1081
- class: I(["ui-ColorField", o.value]),
1082
- "data-radius": e.radius,
1083
- style: Be({ "--color-field-border-color": t.value })
1084
- }, [
1085
- te(b("input", {
1086
- id: e.id,
1087
- "onUpdate:modelValue": n[0] || (n[0] = (i) => t.value = i),
1088
- class: "ui-ColorFieldInput",
1089
- type: "color"
1090
- }, null, 8, Co), [
1091
- [$e, t.value]
1092
- ])
1093
- ], 14, yo));
1315
+ setup(__props) {
1316
+ const props = __props;
1317
+ const modelValue = useModel(__props, "modelValue");
1318
+ const resetClass = computed(() => {
1319
+ return extractClass(props, ["size", "variant"]);
1320
+ });
1321
+ return (_ctx, _cache) => {
1322
+ return openBlock(), createElementBlock("div", {
1323
+ class: normalizeClass(["ui-ColorField", resetClass.value]),
1324
+ "data-radius": props.radius,
1325
+ style: normalizeStyle({ "--color-field-border-color": modelValue.value })
1326
+ }, [
1327
+ withDirectives(createElementVNode("input", {
1328
+ id: props.id,
1329
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
1330
+ class: "ui-ColorFieldInput",
1331
+ type: "color"
1332
+ }, null, 8, _hoisted_2$5), [
1333
+ [vModelText, modelValue.value]
1334
+ ])
1335
+ ], 14, _hoisted_1$e);
1336
+ };
1094
1337
  }
1095
- }), [Te, bo] = oe("ui_SelectRoot"), Oa = /* @__PURE__ */ m({
1338
+ });
1339
+ const [injectSelectRootContext, provideSelectRootContext] = createContext("ui_SelectRoot");
1340
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
1096
1341
  __name: "SelectRoot",
1097
1342
  props: {
1098
1343
  size: { default: "2" },
@@ -1111,21 +1356,30 @@ const _a = /* @__PURE__ */ m({
1111
1356
  required: { type: Boolean }
1112
1357
  },
1113
1358
  emits: ["update:modelValue", "update:open"],
1114
- setup(s, { emit: e }) {
1115
- const t = s, o = e, { size: l, color: n, highContrast: i } = ee(t), u = q(t, o, ["size", "color", "highContrast"]);
1116
- return bo({
1117
- size: l,
1118
- color: n,
1119
- highContrast: i
1120
- }), (y, v) => (r(), d(a(pt), Me(Fe(a(u))), {
1121
- default: c(() => [
1122
- _(y.$slots, "default")
1123
- ]),
1124
- _: 3
1125
- }, 16));
1359
+ setup(__props, { emit: __emit }) {
1360
+ const props = __props;
1361
+ const emits = __emit;
1362
+ const { size, color, highContrast } = toRefs(props);
1363
+ const forwarded = useForwardPropsEmits(props, emits, ["size", "color", "highContrast"]);
1364
+ provideSelectRootContext({
1365
+ size,
1366
+ color,
1367
+ highContrast
1368
+ });
1369
+ return (_ctx, _cache) => {
1370
+ return openBlock(), createBlock(unref(SelectRoot), normalizeProps(guardReactiveProps(unref(forwarded))), {
1371
+ default: withCtx(() => [
1372
+ renderSlot(_ctx.$slots, "default")
1373
+ ]),
1374
+ _: 3
1375
+ }, 16);
1376
+ };
1126
1377
  }
1127
- }), Ma = /* @__PURE__ */ m({
1128
- inheritAttrs: !1,
1378
+ });
1379
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
1380
+ ...{
1381
+ inheritAttrs: false
1382
+ },
1129
1383
  __name: "SelectContent",
1130
1384
  props: {
1131
1385
  to: {},
@@ -1151,66 +1405,81 @@ const _a = /* @__PURE__ */ m({
1151
1405
  asChild: { type: Boolean },
1152
1406
  as: {}
1153
1407
  },
1154
- setup(s) {
1155
- const e = s, t = V(e), { forwardRef: o } = M(), l = Te(), n = C(() => {
1156
- const i = ["r-size-" + l.size.value, "r-variant-" + e.variant];
1157
- return l.highContrast.value && i.push("r-high-contrast"), e.position === "popper" && i.push("ui-PopperContent"), i;
1408
+ setup(__props) {
1409
+ const props = __props;
1410
+ const forwarded = useForwardProps(props);
1411
+ const { forwardRef } = useForwardExpose();
1412
+ const context = injectSelectRootContext();
1413
+ const contentClass = computed(() => {
1414
+ const rv = ["r-size-" + context.size.value, "r-variant-" + props.variant];
1415
+ if (context.highContrast.value) {
1416
+ rv.push("r-high-contrast");
1417
+ }
1418
+ if (props.position === "popper") {
1419
+ rv.push("ui-PopperContent");
1420
+ }
1421
+ return rv;
1158
1422
  });
1159
- return (i, u) => (r(), d(a(ft), {
1160
- to: e.to
1161
- }, {
1162
- default: c(() => [
1163
- p(a(mt), g({ ref: a(o) }, {
1164
- ...i.$attrs,
1165
- ...a(t),
1166
- to: void 0,
1167
- variant: void 0
1168
- }, {
1169
- class: ["ui-SelectContent", n.value],
1170
- "data-accent-color": a(l).color.value
1171
- }), {
1172
- default: c(() => [
1173
- p(a(de), {
1174
- type: "auto",
1175
- class: "ui-ScrollArea"
1176
- }, {
1177
- default: c(() => [
1178
- p(a(ht), {
1179
- class: "ui-SelectViewport",
1180
- "as-child": ""
1181
- }, {
1182
- default: c(() => [
1183
- p(a(pe), { class: "ui-ScrollAreaViewport" }, {
1184
- default: c(() => [
1185
- _(i.$slots, "default")
1186
- ]),
1187
- _: 3
1188
- }),
1189
- u[0] || (u[0] = b("div", { class: "ui-ScrollAreaViewportFocusRing" }, null, -1)),
1190
- p(a(ne), {
1191
- class: "ui-ScrollAreaScrollbar",
1192
- "data-size": 1,
1193
- orientation: "vertical"
1194
- }, {
1195
- default: c(() => [
1196
- p(a(re), { class: "ui-ScrollAreaThumb" })
1197
- ]),
1198
- _: 1
1199
- })
1200
- ]),
1201
- _: 3
1202
- })
1203
- ]),
1204
- _: 3
1205
- })
1206
- ]),
1207
- _: 3
1208
- }, 16, ["class", "data-accent-color"])
1209
- ]),
1210
- _: 3
1211
- }, 8, ["to"]));
1423
+ return (_ctx, _cache) => {
1424
+ return openBlock(), createBlock(unref(SelectPortal), {
1425
+ to: props.to
1426
+ }, {
1427
+ default: withCtx(() => [
1428
+ createVNode(unref(SelectContent), mergeProps({ ref: unref(forwardRef) }, {
1429
+ ..._ctx.$attrs,
1430
+ ...unref(forwarded),
1431
+ to: void 0,
1432
+ variant: void 0
1433
+ }, {
1434
+ class: ["ui-SelectContent", contentClass.value],
1435
+ "data-accent-color": unref(context).color.value
1436
+ }), {
1437
+ default: withCtx(() => [
1438
+ createVNode(unref(ScrollAreaRoot), {
1439
+ type: "auto",
1440
+ class: "ui-ScrollArea"
1441
+ }, {
1442
+ default: withCtx(() => [
1443
+ createVNode(unref(SelectViewport), {
1444
+ class: "ui-SelectViewport",
1445
+ "as-child": ""
1446
+ }, {
1447
+ default: withCtx(() => [
1448
+ createVNode(unref(ScrollAreaViewport), { class: "ui-ScrollAreaViewport" }, {
1449
+ default: withCtx(() => [
1450
+ renderSlot(_ctx.$slots, "default")
1451
+ ]),
1452
+ _: 3
1453
+ }),
1454
+ _cache[0] || (_cache[0] = createElementVNode("div", { class: "ui-ScrollAreaViewportFocusRing" }, null, -1)),
1455
+ createVNode(unref(ScrollAreaScrollbar), {
1456
+ class: "ui-ScrollAreaScrollbar",
1457
+ "data-size": 1,
1458
+ orientation: "vertical"
1459
+ }, {
1460
+ default: withCtx(() => [
1461
+ createVNode(unref(ScrollAreaThumb), { class: "ui-ScrollAreaThumb" })
1462
+ ]),
1463
+ _: 1
1464
+ })
1465
+ ]),
1466
+ _: 3,
1467
+ __: [0]
1468
+ })
1469
+ ]),
1470
+ _: 3
1471
+ })
1472
+ ]),
1473
+ _: 3
1474
+ }, 16, ["class", "data-accent-color"])
1475
+ ]),
1476
+ _: 3
1477
+ }, 8, ["to"]);
1478
+ };
1212
1479
  }
1213
- }), $o = { class: "ui-SelectTriggerInner" }, Fa = /* @__PURE__ */ m({
1480
+ });
1481
+ const _hoisted_1$d = { class: "ui-SelectTriggerInner" };
1482
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
1214
1483
  __name: "SelectTrigger",
1215
1484
  props: {
1216
1485
  variant: { default: "surface" },
@@ -1221,47 +1490,54 @@ const _a = /* @__PURE__ */ m({
1221
1490
  asChild: { type: Boolean },
1222
1491
  as: {}
1223
1492
  },
1224
- setup(s) {
1225
- const e = s, t = Te(), o = C(() => [`r-variant-${e.variant}`, `r-size-${t.size.value}`]);
1226
- return (l, n) => (r(), d(a(vt), {
1227
- class: I(["ui-SelectTrigger", o.value]),
1228
- disabled: e.disabled,
1229
- "data-accent-color": a(t).color.value,
1230
- "data-radius": e.radius
1231
- }, {
1232
- default: c(() => [
1233
- b("span", $o, [
1234
- p(a(_t), {
1235
- placeholder: e.placeholder
1236
- }, {
1237
- default: c(({ selectedLabel: i, modelValue: u }) => [
1238
- i.length ? _(l.$slots, "default", {
1239
- key: 0,
1240
- selectedLabel: i,
1241
- modelValue: u
1242
- }, () => [
1243
- L(T(i.join(", ")), 1)
1244
- ]) : (r(), $(H, { key: 1 }, [
1245
- L(T(e.placeholder), 1)
1246
- ], 64))
1493
+ setup(__props) {
1494
+ const props = __props;
1495
+ const context = injectSelectRootContext();
1496
+ const resetClass = computed(() => {
1497
+ return [`r-variant-${props.variant}`, `r-size-${context.size.value}`];
1498
+ });
1499
+ return (_ctx, _cache) => {
1500
+ return openBlock(), createBlock(unref(SelectTrigger), {
1501
+ class: normalizeClass(["ui-SelectTrigger", resetClass.value]),
1502
+ disabled: props.disabled,
1503
+ "data-accent-color": unref(context).color.value,
1504
+ "data-radius": props.radius
1505
+ }, {
1506
+ default: withCtx(() => [
1507
+ createElementVNode("span", _hoisted_1$d, [
1508
+ createVNode(unref(SelectValue), {
1509
+ placeholder: props.placeholder
1510
+ }, {
1511
+ default: withCtx(({ selectedLabel, modelValue }) => [
1512
+ selectedLabel.length ? renderSlot(_ctx.$slots, "default", {
1513
+ key: 0,
1514
+ selectedLabel,
1515
+ modelValue
1516
+ }, () => [
1517
+ createTextVNode(toDisplayString(selectedLabel.join(", ")), 1)
1518
+ ]) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1519
+ createTextVNode(toDisplayString(props.placeholder), 1)
1520
+ ], 64))
1521
+ ]),
1522
+ _: 3
1523
+ }, 8, ["placeholder"])
1524
+ ]),
1525
+ createVNode(unref(SelectIcon), { "as-child": "" }, {
1526
+ default: withCtx(() => [
1527
+ createVNode(unref(Icon), {
1528
+ class: "ui-SelectIcon",
1529
+ icon: "radix-icons:chevron-down"
1530
+ })
1247
1531
  ]),
1248
- _: 3
1249
- }, 8, ["placeholder"])
1532
+ _: 1
1533
+ })
1250
1534
  ]),
1251
- p(a(gt), { "as-child": "" }, {
1252
- default: c(() => [
1253
- p(a(k), {
1254
- class: "ui-SelectIcon",
1255
- icon: "radix-icons:chevron-down"
1256
- })
1257
- ]),
1258
- _: 1
1259
- })
1260
- ]),
1261
- _: 3
1262
- }, 8, ["class", "disabled", "data-accent-color", "data-radius"]));
1535
+ _: 3
1536
+ }, 8, ["class", "disabled", "data-accent-color", "data-radius"]);
1537
+ };
1263
1538
  }
1264
- }), La = /* @__PURE__ */ m({
1539
+ });
1540
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
1265
1541
  __name: "SelectItem",
1266
1542
  props: {
1267
1543
  value: {},
@@ -1270,55 +1546,70 @@ const _a = /* @__PURE__ */ m({
1270
1546
  asChild: { type: Boolean },
1271
1547
  as: {}
1272
1548
  },
1273
- setup(s) {
1274
- const t = V(s);
1275
- return M(), (o, l) => (r(), d(a(yt), g({ class: "ui-SelectItem" }, a(t)), {
1276
- default: c(() => [
1277
- p(a(Ct), { class: "ui-SelectItemIndicator" }, {
1278
- default: c(() => [
1279
- p(a(k), { icon: "radix-icons:check" })
1280
- ]),
1281
- _: 1
1282
- }),
1283
- p(a(bt), null, {
1284
- default: c(() => [
1285
- _(o.$slots, "default")
1286
- ]),
1287
- _: 3
1288
- })
1289
- ]),
1290
- _: 3
1291
- }, 16));
1549
+ setup(__props) {
1550
+ const props = __props;
1551
+ const forwarded = useForwardProps(props);
1552
+ useForwardExpose();
1553
+ return (_ctx, _cache) => {
1554
+ return openBlock(), createBlock(unref(SelectItem), mergeProps({ class: "ui-SelectItem" }, unref(forwarded)), {
1555
+ default: withCtx(() => [
1556
+ createVNode(unref(SelectItemIndicator), { class: "ui-SelectItemIndicator" }, {
1557
+ default: withCtx(() => [
1558
+ createVNode(unref(Icon), { icon: "radix-icons:check" })
1559
+ ]),
1560
+ _: 1
1561
+ }),
1562
+ createVNode(unref(SelectItemText), null, {
1563
+ default: withCtx(() => [
1564
+ renderSlot(_ctx.$slots, "default")
1565
+ ]),
1566
+ _: 3
1567
+ })
1568
+ ]),
1569
+ _: 3
1570
+ }, 16);
1571
+ };
1292
1572
  }
1293
- }), Ga = /* @__PURE__ */ m({
1573
+ });
1574
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1294
1575
  __name: "SelectLabel",
1295
1576
  props: {
1296
1577
  for: {},
1297
1578
  asChild: { type: Boolean },
1298
1579
  as: {}
1299
1580
  },
1300
- setup(s) {
1301
- const t = V(s);
1302
- return M(), (o, l) => (r(), d(a($t), g({ class: "ui-SelectLabel" }, a(t)), {
1303
- default: c(() => [
1304
- _(o.$slots, "default")
1305
- ]),
1306
- _: 3
1307
- }, 16));
1581
+ setup(__props) {
1582
+ const props = __props;
1583
+ const forwarded = useForwardProps(props);
1584
+ useForwardExpose();
1585
+ return (_ctx, _cache) => {
1586
+ return openBlock(), createBlock(unref(SelectLabel), mergeProps({ class: "ui-SelectLabel" }, unref(forwarded)), {
1587
+ default: withCtx(() => [
1588
+ renderSlot(_ctx.$slots, "default")
1589
+ ]),
1590
+ _: 3
1591
+ }, 16);
1592
+ };
1308
1593
  }
1309
- }), Bo = (s, e) => {
1310
- const t = s.__vccOpts || s;
1311
- for (const [o, l] of e)
1312
- t[o] = l;
1313
- return t;
1314
- }, xo = {}, wo = {
1594
+ });
1595
+ const _export_sfc = (sfc, props) => {
1596
+ const target = sfc.__vccOpts || sfc;
1597
+ for (const [key, val] of props) {
1598
+ target[key] = val;
1599
+ }
1600
+ return target;
1601
+ };
1602
+ const _sfc_main$u = {};
1603
+ const _hoisted_1$c = {
1315
1604
  class: "ui-SelectSeparator",
1316
1605
  "aria-hidden": "true"
1317
1606
  };
1318
- function So(s, e) {
1319
- return r(), $("div", wo);
1607
+ function _sfc_render(_ctx, _cache) {
1608
+ return openBlock(), createElementBlock("div", _hoisted_1$c);
1320
1609
  }
1321
- const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxRoot"), Ea = /* @__PURE__ */ m({
1610
+ const SelectSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render]]);
1611
+ const [injectComboboxRootContext, provideComboboxRootContext] = createContext("ui_ComboboxRoot");
1612
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
1322
1613
  __name: "ComboboxRoot",
1323
1614
  props: {
1324
1615
  size: { default: "2" },
@@ -1331,7 +1622,7 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1331
1622
  ignoreFilter: { type: Boolean },
1332
1623
  modelValue: {},
1333
1624
  defaultValue: {},
1334
- multiple: { type: Boolean, default: !1 },
1625
+ multiple: { type: Boolean, default: false },
1335
1626
  dir: {},
1336
1627
  disabled: { type: Boolean },
1337
1628
  highlightOnHover: { type: Boolean },
@@ -1342,26 +1633,38 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1342
1633
  required: { type: Boolean }
1343
1634
  },
1344
1635
  emits: ["update:modelValue", "highlight", "update:open"],
1345
- setup(s, { emit: e }) {
1346
- const t = s, o = e, { size: l, color: n, highContrast: i } = ee(t), [u, y] = N(t, o, ["size", "color", "highContrast"]);
1347
- return Io({
1348
- size: l,
1349
- color: n,
1350
- highContrast: i
1351
- }), (v, h) => (r(), d(a(Bt), g({
1352
- class: ["ui-ComboboxRoot", a(y)]
1353
- }, a(u)), {
1354
- default: c(() => [
1355
- _(v.$slots, "default")
1356
- ]),
1357
- _: 3
1358
- }, 16, ["class"]));
1359
- }
1360
- }), ko = {
1636
+ setup(__props, { emit: __emit }) {
1637
+ const props = __props;
1638
+ const emits = __emit;
1639
+ const { size, color, highContrast } = toRefs(props);
1640
+ const [forwarded, resetClass] = extractForwardPropsEmits(props, emits, ["size", "color", "highContrast"]);
1641
+ provideComboboxRootContext({
1642
+ size,
1643
+ color,
1644
+ highContrast
1645
+ });
1646
+ return (_ctx, _cache) => {
1647
+ return openBlock(), createBlock(unref(ComboboxRoot), mergeProps({
1648
+ class: ["ui-ComboboxRoot", unref(resetClass)]
1649
+ }, unref(forwarded)), {
1650
+ default: withCtx(() => [
1651
+ renderSlot(_ctx.$slots, "default")
1652
+ ]),
1653
+ _: 3
1654
+ }, 16, ["class"]);
1655
+ };
1656
+ }
1657
+ });
1658
+ const _hoisted_1$b = {
1361
1659
  key: 0,
1362
1660
  class: "ui-ComboboxValues"
1363
- }, Vo = ["aria-current", "value"], To = ["onClick"], ja = /* @__PURE__ */ m({
1364
- inheritAttrs: !1,
1661
+ };
1662
+ const _hoisted_2$4 = ["aria-current", "value"];
1663
+ const _hoisted_3$2 = ["onClick"];
1664
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
1665
+ ...{
1666
+ inheritAttrs: false
1667
+ },
1365
1668
  __name: "ComboboxInput",
1366
1669
  props: {
1367
1670
  variant: { default: "surface" },
@@ -1375,70 +1678,104 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1375
1678
  as: {}
1376
1679
  },
1377
1680
  emits: ["update:modelValue"],
1378
- setup(s, { emit: e }) {
1379
- const t = xt(), n = we(s, e), i = P(-1), u = C(() => t.modelValue.value), y = (f) => typeof f == "object" ? JSON.stringify(f) : f.toString(), v = (f) => {
1380
- i.value = f, t.modelValue.value.splice(f, 1), i.value = -1;
1381
- }, h = (f) => {
1382
- !f.target.value && (f.key === "Delete" || f.key === "Backspace") && (i.value !== -1 ? v(i.value) : (i.value = u.value.length - 1, setTimeout(() => {
1383
- i.value = -1;
1384
- }, 800)));
1385
- };
1386
- return Le(u, () => {
1387
- t.filterState.search = "";
1388
- }, { deep: !0 }), (f, B) => (r(), d(a(wt), {
1389
- class: I(["ui-ComboboxField", `r-variant-${f.variant}`]),
1390
- "data-radius": f.radius,
1391
- "data-multiple": a(t).multiple.value || void 0
1392
- }, {
1393
- default: c(() => [
1394
- a(t).multiple.value ? (r(), $("div", ko, [
1395
- (r(!0), $(H, null, j(u.value, (A, F) => (r(), $("div", {
1396
- key: y(A),
1397
- class: "ui-ComboboxValuesItem",
1398
- "aria-current": F === i.value,
1399
- value: A
1400
- }, [
1401
- _(f.$slots, "item", { value: A }, () => [
1402
- b("span", null, T(y(A)), 1)
1403
- ]),
1404
- b("button", {
1405
- type: "button",
1406
- tabindex: "-1",
1407
- onClick: D((E) => v(F), ["prevent"])
1408
- }, [
1409
- p(a(k), { icon: "lucide:x" })
1410
- ], 8, To)
1411
- ], 8, Vo))), 128)),
1412
- p(a(ve), g({
1413
- ...f.$attrs,
1414
- ...a(n),
1681
+ setup(__props, { emit: __emit }) {
1682
+ const context = injectComboboxRootContext$1();
1683
+ const props = __props;
1684
+ const emits = __emit;
1685
+ const forwarded = useForwardPropsEmits$1(props, emits);
1686
+ const activeIndex = ref(-1);
1687
+ const values = computed(() => {
1688
+ return context.modelValue.value;
1689
+ });
1690
+ const displayValue = (value) => {
1691
+ if (typeof value === "object") {
1692
+ return JSON.stringify(value);
1693
+ } else {
1694
+ return value.toString();
1695
+ }
1696
+ };
1697
+ const onDeleteIndex = (index) => {
1698
+ activeIndex.value = index;
1699
+ context.modelValue.value.splice(index, 1);
1700
+ activeIndex.value = -1;
1701
+ };
1702
+ const onInputKeydown = (event) => {
1703
+ const value = event.target.value;
1704
+ if (!value && (event.key === "Delete" || event.key === "Backspace")) {
1705
+ if (activeIndex.value !== -1) {
1706
+ onDeleteIndex(activeIndex.value);
1707
+ } else {
1708
+ activeIndex.value = values.value.length - 1;
1709
+ setTimeout(() => {
1710
+ activeIndex.value = -1;
1711
+ }, 800);
1712
+ }
1713
+ }
1714
+ };
1715
+ watch(values, () => {
1716
+ context.filterState.search = "";
1717
+ }, { deep: true });
1718
+ return (_ctx, _cache) => {
1719
+ return openBlock(), createBlock(unref(ComboboxAnchor), {
1720
+ class: normalizeClass(["ui-ComboboxField", `r-variant-${_ctx.variant}`]),
1721
+ "data-radius": _ctx.radius,
1722
+ "data-multiple": unref(context).multiple.value || void 0
1723
+ }, {
1724
+ default: withCtx(() => [
1725
+ unref(context).multiple.value ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
1726
+ (openBlock(true), createElementBlock(Fragment, null, renderList(values.value, (item, index) => {
1727
+ return openBlock(), createElementBlock("div", {
1728
+ key: displayValue(item),
1729
+ class: "ui-ComboboxValuesItem",
1730
+ "aria-current": index === activeIndex.value,
1731
+ value: item
1732
+ }, [
1733
+ renderSlot(_ctx.$slots, "item", { value: item }, () => [
1734
+ createElementVNode("span", null, toDisplayString(displayValue(item)), 1)
1735
+ ]),
1736
+ createElementVNode("button", {
1737
+ type: "button",
1738
+ tabindex: "-1",
1739
+ onClick: withModifiers(($event) => onDeleteIndex(index), ["prevent"])
1740
+ }, [
1741
+ createVNode(unref(Icon), { icon: "lucide:x" })
1742
+ ], 8, _hoisted_3$2)
1743
+ ], 8, _hoisted_2$4);
1744
+ }), 128)),
1745
+ createVNode(unref(ComboboxInput), mergeProps({
1746
+ ..._ctx.$attrs,
1747
+ ...unref(forwarded),
1748
+ variant: void 0,
1749
+ radius: void 0
1750
+ }, {
1751
+ class: "ui-ComboboxInput",
1752
+ onKeydown: onInputKeydown
1753
+ }), null, 16)
1754
+ ])) : (openBlock(), createBlock(unref(ComboboxInput), mergeProps({
1755
+ key: 1,
1756
+ class: "ui-ComboboxInput"
1757
+ }, {
1758
+ ..._ctx.$attrs,
1759
+ ...unref(forwarded),
1415
1760
  variant: void 0,
1416
1761
  radius: void 0
1417
- }, {
1418
- class: "ui-ComboboxInput",
1419
- onKeydown: h
1420
- }), null, 16)
1421
- ])) : (r(), d(a(ve), g({
1422
- key: 1,
1423
- class: "ui-ComboboxInput"
1424
- }, {
1425
- ...f.$attrs,
1426
- ...a(n),
1427
- variant: void 0,
1428
- radius: void 0
1429
- }), null, 16)),
1430
- p(a(St), { class: "ui-ComboboxTrigger" }, {
1431
- default: c(() => [
1432
- p(a(k), { icon: "radix-icons:chevron-down" })
1433
- ]),
1434
- _: 1
1435
- })
1436
- ]),
1437
- _: 3
1438
- }, 8, ["class", "data-radius", "data-multiple"]));
1762
+ }), null, 16)),
1763
+ createVNode(unref(ComboboxTrigger), { class: "ui-ComboboxTrigger" }, {
1764
+ default: withCtx(() => [
1765
+ createVNode(unref(Icon), { icon: "radix-icons:chevron-down" })
1766
+ ]),
1767
+ _: 1
1768
+ })
1769
+ ]),
1770
+ _: 3
1771
+ }, 8, ["class", "data-radius", "data-multiple"]);
1772
+ };
1439
1773
  }
1440
- }), Wa = /* @__PURE__ */ m({
1441
- inheritAttrs: !1,
1774
+ });
1775
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1776
+ ...{
1777
+ inheritAttrs: false
1778
+ },
1442
1779
  __name: "ComboboxContent",
1443
1780
  props: {
1444
1781
  to: {},
@@ -1466,67 +1803,79 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1466
1803
  disableOutsidePointerEvents: { type: Boolean }
1467
1804
  },
1468
1805
  emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside"],
1469
- setup(s, { emit: e }) {
1470
- const { forwardRef: t } = M(), o = s, n = we(o, e), i = zo(), u = C(() => {
1471
- const y = ["r-size-" + i.size.value, "r-variant-" + o.variant];
1472
- return i.highContrast.value && y.push("r-high-contrast"), y;
1806
+ setup(__props, { emit: __emit }) {
1807
+ const { forwardRef } = useForwardExpose();
1808
+ const props = __props;
1809
+ const emits = __emit;
1810
+ const forwarded = useForwardPropsEmits$1(props, emits);
1811
+ const context = injectComboboxRootContext();
1812
+ const contentClass = computed(() => {
1813
+ const rv = ["r-size-" + context.size.value, "r-variant-" + props.variant];
1814
+ if (context.highContrast.value) {
1815
+ rv.push("r-high-contrast");
1816
+ }
1817
+ return rv;
1473
1818
  });
1474
- return (y, v) => (r(), d(a(zt), {
1475
- to: o.to
1476
- }, {
1477
- default: c(() => [
1478
- p(a(It), g({ ref: a(t) }, {
1479
- ...y.$attrs,
1480
- ...a(n),
1481
- position: "popper",
1482
- to: void 0,
1483
- variant: void 0
1484
- }, {
1485
- class: ["ui-ComboboxContent", u.value],
1486
- "data-accent-color": a(i).color.value
1487
- }), {
1488
- default: c(() => [
1489
- p(a(de), {
1490
- type: "auto",
1491
- class: "ui-ScrollArea"
1492
- }, {
1493
- default: c(() => [
1494
- p(a(kt), {
1495
- class: "ui-ComboboxViewport",
1496
- "as-child": ""
1497
- }, {
1498
- default: c(() => [
1499
- p(a(pe), { class: "ui-ScrollAreaViewport" }, {
1500
- default: c(() => [
1501
- _(y.$slots, "default")
1502
- ]),
1503
- _: 3
1504
- })
1505
- ]),
1506
- _: 3
1507
- }),
1508
- v[0] || (v[0] = b("div", { class: "ui-ScrollAreaViewportFocusRing" }, null, -1)),
1509
- p(a(ne), {
1510
- class: "ui-ScrollAreaScrollbar",
1511
- "data-size": 1,
1512
- orientation: "vertical"
1513
- }, {
1514
- default: c(() => [
1515
- p(a(re), { class: "ui-ScrollAreaThumb" })
1516
- ]),
1517
- _: 1
1518
- })
1519
- ]),
1520
- _: 3
1521
- })
1522
- ]),
1523
- _: 3
1524
- }, 16, ["class", "data-accent-color"])
1525
- ]),
1526
- _: 3
1527
- }, 8, ["to"]));
1819
+ return (_ctx, _cache) => {
1820
+ return openBlock(), createBlock(unref(ComboboxPortal), {
1821
+ to: props.to
1822
+ }, {
1823
+ default: withCtx(() => [
1824
+ createVNode(unref(ComboboxContent), mergeProps({ ref: unref(forwardRef) }, {
1825
+ ..._ctx.$attrs,
1826
+ ...unref(forwarded),
1827
+ position: "popper",
1828
+ to: void 0,
1829
+ variant: void 0
1830
+ }, {
1831
+ class: ["ui-ComboboxContent", contentClass.value],
1832
+ "data-accent-color": unref(context).color.value
1833
+ }), {
1834
+ default: withCtx(() => [
1835
+ createVNode(unref(ScrollAreaRoot), {
1836
+ type: "auto",
1837
+ class: "ui-ScrollArea"
1838
+ }, {
1839
+ default: withCtx(() => [
1840
+ createVNode(unref(ComboboxViewport), {
1841
+ class: "ui-ComboboxViewport",
1842
+ "as-child": ""
1843
+ }, {
1844
+ default: withCtx(() => [
1845
+ createVNode(unref(ScrollAreaViewport), { class: "ui-ScrollAreaViewport" }, {
1846
+ default: withCtx(() => [
1847
+ renderSlot(_ctx.$slots, "default")
1848
+ ]),
1849
+ _: 3
1850
+ })
1851
+ ]),
1852
+ _: 3
1853
+ }),
1854
+ _cache[0] || (_cache[0] = createElementVNode("div", { class: "ui-ScrollAreaViewportFocusRing" }, null, -1)),
1855
+ createVNode(unref(ScrollAreaScrollbar), {
1856
+ class: "ui-ScrollAreaScrollbar",
1857
+ "data-size": 1,
1858
+ orientation: "vertical"
1859
+ }, {
1860
+ default: withCtx(() => [
1861
+ createVNode(unref(ScrollAreaThumb), { class: "ui-ScrollAreaThumb" })
1862
+ ]),
1863
+ _: 1
1864
+ })
1865
+ ]),
1866
+ _: 3,
1867
+ __: [0]
1868
+ })
1869
+ ]),
1870
+ _: 3
1871
+ }, 16, ["class", "data-accent-color"])
1872
+ ]),
1873
+ _: 3
1874
+ }, 8, ["to"]);
1875
+ };
1528
1876
  }
1529
- }), Ua = /* @__PURE__ */ m({
1877
+ });
1878
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1530
1879
  __name: "ComboboxItem",
1531
1880
  props: {
1532
1881
  textValue: {},
@@ -1535,67 +1884,91 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1535
1884
  asChild: { type: Boolean },
1536
1885
  as: {}
1537
1886
  },
1538
- setup(s) {
1539
- const t = V(s);
1540
- return (o, l) => (r(), d(a(Vt), g({ class: "ui-ComboboxItem" }, a(t)), {
1541
- default: c(() => [
1542
- p(a(Tt), { class: "ui-ComboboxItemIndicator" }, {
1543
- default: c(() => [
1544
- p(a(k), { icon: "radix-icons:check" })
1545
- ]),
1546
- _: 1
1547
- }),
1548
- _(o.$slots, "default")
1549
- ]),
1550
- _: 3
1551
- }, 16));
1887
+ setup(__props) {
1888
+ const props = __props;
1889
+ const forwarded = useForwardProps(props);
1890
+ return (_ctx, _cache) => {
1891
+ return openBlock(), createBlock(unref(ComboboxItem), mergeProps({ class: "ui-ComboboxItem" }, unref(forwarded)), {
1892
+ default: withCtx(() => [
1893
+ createVNode(unref(ComboboxItemIndicator), { class: "ui-ComboboxItemIndicator" }, {
1894
+ default: withCtx(() => [
1895
+ createVNode(unref(Icon), { icon: "radix-icons:check" })
1896
+ ]),
1897
+ _: 1
1898
+ }),
1899
+ renderSlot(_ctx.$slots, "default")
1900
+ ]),
1901
+ _: 3
1902
+ }, 16);
1903
+ };
1552
1904
  }
1553
- }), qa = /* @__PURE__ */ m({
1905
+ });
1906
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1554
1907
  __name: "ComboboxLabel",
1555
1908
  props: {
1556
1909
  for: {},
1557
1910
  asChild: { type: Boolean },
1558
1911
  as: {}
1559
1912
  },
1560
- setup(s) {
1561
- const t = V(s);
1562
- return M(), (o, l) => (r(), d(a(At), g({ class: "ui-ComboboxLabel" }, a(t)), {
1563
- default: c(() => [
1564
- _(o.$slots, "default")
1565
- ]),
1566
- _: 3
1567
- }, 16));
1913
+ setup(__props) {
1914
+ const props = __props;
1915
+ const forwarded = useForwardProps(props);
1916
+ useForwardExpose();
1917
+ return (_ctx, _cache) => {
1918
+ return openBlock(), createBlock(unref(ComboboxLabel), mergeProps({ class: "ui-ComboboxLabel" }, unref(forwarded)), {
1919
+ default: withCtx(() => [
1920
+ renderSlot(_ctx.$slots, "default")
1921
+ ]),
1922
+ _: 3
1923
+ }, 16);
1924
+ };
1568
1925
  }
1569
- }), Ao = ["data-accent-color"], Na = /* @__PURE__ */ m({
1926
+ });
1927
+ const _hoisted_1$a = ["data-accent-color"];
1928
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1570
1929
  __name: "Radio",
1571
- props: /* @__PURE__ */ Q({
1930
+ props: /* @__PURE__ */ mergeModels({
1572
1931
  color: {},
1573
1932
  size: { default: "2" },
1574
1933
  variant: { default: "surface" },
1575
1934
  highContrast: { type: Boolean }
1576
1935
  }, {
1577
- modelValue: {
1936
+ "modelValue": {
1578
1937
  default: ""
1579
1938
  },
1580
- modelModifiers: {}
1939
+ "modelModifiers": {}
1581
1940
  }),
1582
1941
  emits: ["update:modelValue"],
1583
- setup(s) {
1584
- const e = s, [t, o] = Z(s, "modelValue", {
1585
- set(n) {
1586
- return o.number ? Number(n) : o.trim ? n.trim() : n;
1942
+ setup(__props) {
1943
+ const props = __props;
1944
+ const [modelValue, modifiers] = useModel(__props, "modelValue", {
1945
+ set(value) {
1946
+ if (modifiers.number) {
1947
+ return Number(value);
1948
+ }
1949
+ if (modifiers.trim) {
1950
+ return value.trim();
1951
+ }
1952
+ return value;
1587
1953
  }
1588
- }), l = C(() => R(e, ["size", "variant", "highContrast"]));
1589
- return (n, i) => te((r(), $("input", {
1590
- "onUpdate:modelValue": i[0] || (i[0] = (u) => be(t) ? t.value = u : null),
1591
- class: I(["ui-Radio", l.value]),
1592
- type: "radio",
1593
- "data-accent-color": e.color
1594
- }, null, 10, Ao)), [
1595
- [Ge, a(t)]
1596
- ]);
1954
+ });
1955
+ const resetClass = computed(() => {
1956
+ return extractClass(props, ["size", "variant", "highContrast"]);
1957
+ });
1958
+ return (_ctx, _cache) => {
1959
+ return withDirectives((openBlock(), createElementBlock("input", {
1960
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
1961
+ class: normalizeClass(["ui-Radio", resetClass.value]),
1962
+ type: "radio",
1963
+ "data-accent-color": props.color
1964
+ }, null, 10, _hoisted_1$a)), [
1965
+ [vModelRadio, unref(modelValue)]
1966
+ ]);
1967
+ };
1597
1968
  }
1598
- }), [Ae, Ro] = oe("ui_RadioGroupRoot"), Ka = /* @__PURE__ */ m({
1969
+ });
1970
+ const [injectRadioGroupRootContext, provideRadioGroupRootContext] = createContext("ui_RadioGroupRoot");
1971
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1599
1972
  __name: "RadioGroupRoot",
1600
1973
  props: {
1601
1974
  color: {},
@@ -1614,16 +1987,24 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1614
1987
  required: { type: Boolean }
1615
1988
  },
1616
1989
  emits: ["update:modelValue"],
1617
- setup(s, { emit: e }) {
1618
- const t = e, o = s, l = q(o, t, ["color", "size", "variant", "highContrast"]), { size: n, variant: i, color: u, highContrast: y } = ee(o);
1619
- return Ro({ size: n, variant: i, color: u, highContrast: y }), (v, h) => (r(), d(a(Se), g({ class: "ui-RadioGroupRoot" }, a(l)), {
1620
- default: c(() => [
1621
- _(v.$slots, "default")
1622
- ]),
1623
- _: 3
1624
- }, 16));
1990
+ setup(__props, { emit: __emit }) {
1991
+ const emits = __emit;
1992
+ const props = __props;
1993
+ const forwarded = useForwardPropsEmits(props, emits, ["color", "size", "variant", "highContrast"]);
1994
+ const { size, variant, color, highContrast } = toRefs(props);
1995
+ provideRadioGroupRootContext({ size, variant, color, highContrast });
1996
+ return (_ctx, _cache) => {
1997
+ return openBlock(), createBlock(unref(RadioGroupRoot), mergeProps({ class: "ui-RadioGroupRoot" }, unref(forwarded)), {
1998
+ default: withCtx(() => [
1999
+ renderSlot(_ctx.$slots, "default")
2000
+ ]),
2001
+ _: 3
2002
+ }, 16);
2003
+ };
1625
2004
  }
1626
- }), Po = { class: "ui-RadioGroupItem" }, Qa = /* @__PURE__ */ m({
2005
+ });
2006
+ const _hoisted_1$9 = { class: "ui-RadioGroupItem" };
2007
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1627
2008
  __name: "RadioGroupItem",
1628
2009
  props: {
1629
2010
  id: {},
@@ -1634,27 +2015,34 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1634
2015
  name: {},
1635
2016
  required: { type: Boolean }
1636
2017
  },
1637
- setup(s) {
1638
- const t = V(s), o = Ae(), l = C(() => {
1639
- var i;
1640
- const n = [
1641
- `r-size-${o.size.value}`,
1642
- `r-variant-${o.variant.value}`
2018
+ setup(__props) {
2019
+ const props = __props;
2020
+ const forwarded = useForwardProps(props);
2021
+ const rootContext = injectRadioGroupRootContext();
2022
+ const resetClass = computed(() => {
2023
+ var _a;
2024
+ const rv = [
2025
+ `r-size-${rootContext.size.value}`,
2026
+ `r-variant-${rootContext.variant.value}`
1643
2027
  ];
1644
- return (i = o.highContrast) != null && i.value && n.push("r-high-contrast"), n;
2028
+ if ((_a = rootContext.highContrast) == null ? void 0 : _a.value) {
2029
+ rv.push("r-high-contrast");
2030
+ }
2031
+ return rv;
1645
2032
  });
1646
- return (n, i) => {
1647
- var u;
1648
- return r(), $("label", Po, [
1649
- p(a(ze), g({
1650
- class: ["ui-Radio", l.value],
1651
- "data-accent-color": (u = a(o).color) == null ? void 0 : u.value
1652
- }, a(t)), null, 16, ["class", "data-accent-color"]),
1653
- _(n.$slots, "default")
2033
+ return (_ctx, _cache) => {
2034
+ var _a;
2035
+ return openBlock(), createElementBlock("label", _hoisted_1$9, [
2036
+ createVNode(unref(RadioGroupItem), mergeProps({
2037
+ class: ["ui-Radio", resetClass.value],
2038
+ "data-accent-color": (_a = unref(rootContext).color) == null ? void 0 : _a.value
2039
+ }, unref(forwarded)), null, 16, ["class", "data-accent-color"]),
2040
+ renderSlot(_ctx.$slots, "default")
1654
2041
  ]);
1655
2042
  };
1656
2043
  }
1657
- }), Za = /* @__PURE__ */ m({
2044
+ });
2045
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
1658
2046
  __name: "RadioCardsItem",
1659
2047
  props: {
1660
2048
  id: {},
@@ -1665,25 +2053,26 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1665
2053
  name: {},
1666
2054
  required: { type: Boolean }
1667
2055
  },
1668
- setup(s) {
1669
- const t = V(s);
1670
- M();
1671
- const o = Ae();
1672
- return (l, n) => {
1673
- var i, u;
1674
- return r(), d(a(ze), g({
2056
+ setup(__props) {
2057
+ const props = __props;
2058
+ const forwarded = useForwardProps(props);
2059
+ useForwardExpose();
2060
+ const rootContext = injectRadioGroupRootContext();
2061
+ return (_ctx, _cache) => {
2062
+ var _a, _b;
2063
+ return openBlock(), createBlock(unref(RadioGroupItem), mergeProps({
1675
2064
  class: "ui-RadioCardsItem",
1676
- "data-accent-color": (i = a(o).color) == null ? void 0 : i.value,
1677
- "data-size": a(o).size.value,
1678
- "data-variant": a(o).variant.value,
1679
- "data-high-contrast": (u = a(o).highContrast) == null ? void 0 : u.value
1680
- }, { ...a(t), asChild: !1 }), {
1681
- default: c(() => [
1682
- p(Yt, {
1683
- "as-child": a(t).asChild
2065
+ "data-accent-color": (_a = unref(rootContext).color) == null ? void 0 : _a.value,
2066
+ "data-size": unref(rootContext).size.value,
2067
+ "data-variant": unref(rootContext).variant.value,
2068
+ "data-high-contrast": (_b = unref(rootContext).highContrast) == null ? void 0 : _b.value
2069
+ }, { ...unref(forwarded), asChild: false }), {
2070
+ default: withCtx(() => [
2071
+ createVNode(_sfc_main$W, {
2072
+ "as-child": unref(forwarded).asChild
1684
2073
  }, {
1685
- default: c(() => [
1686
- _(l.$slots, "default")
2074
+ default: withCtx(() => [
2075
+ renderSlot(_ctx.$slots, "default")
1687
2076
  ]),
1688
2077
  _: 3
1689
2078
  }, 8, ["as-child"])
@@ -1692,7 +2081,8 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1692
2081
  }, 16, ["data-accent-color", "data-size", "data-variant", "data-high-contrast"]);
1693
2082
  };
1694
2083
  }
1695
- }), Ja = /* @__PURE__ */ m({
2084
+ });
2085
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1696
2086
  __name: "RadioTabsList",
1697
2087
  props: {
1698
2088
  size: { default: "2" },
@@ -1708,38 +2098,51 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1708
2098
  required: { type: Boolean }
1709
2099
  },
1710
2100
  emits: ["update:modelValue"],
1711
- setup(s, { emit: e }) {
1712
- const t = e, o = s, [l, n] = N(o, t, ["size"]);
1713
- return (i, u) => (r(), d(a(Se), g(a(l), {
1714
- class: ["ui-RadioTabsList", a(n)]
1715
- }), {
1716
- default: c(() => [
1717
- _(i.$slots, "default")
1718
- ]),
1719
- _: 3
1720
- }, 16, ["class"]));
2101
+ setup(__props, { emit: __emit }) {
2102
+ const emits = __emit;
2103
+ const props = __props;
2104
+ const [forwarded, resetClass] = extractForwardPropsEmits(props, emits, ["size"]);
2105
+ return (_ctx, _cache) => {
2106
+ return openBlock(), createBlock(unref(RadioGroupRoot), mergeProps(unref(forwarded), {
2107
+ class: ["ui-RadioTabsList", unref(resetClass)]
2108
+ }), {
2109
+ default: withCtx(() => [
2110
+ renderSlot(_ctx.$slots, "default")
2111
+ ]),
2112
+ _: 3
2113
+ }, 16, ["class"]);
2114
+ };
1721
2115
  }
1722
- }), Xa = /* @__PURE__ */ m({
2116
+ });
2117
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1723
2118
  __name: "TabsList",
1724
2119
  props: {
1725
2120
  size: { default: "2" },
1726
2121
  color: {},
1727
2122
  highContrast: { type: Boolean }
1728
2123
  },
1729
- setup(s) {
1730
- const e = s, t = C(() => R(e, ["size", "highContrast"]));
1731
- return (o, l) => (r(), d(a(Rt), {
1732
- class: I(["ui-TabList", t.value]),
1733
- "data-accent-color": e.color
1734
- }, {
1735
- default: c(() => [
1736
- p(a(Pt), { class: "ui-TabsIndicator" }),
1737
- _(o.$slots, "default")
1738
- ]),
1739
- _: 3
1740
- }, 8, ["class", "data-accent-color"]));
2124
+ setup(__props) {
2125
+ const props = __props;
2126
+ const resetClass = computed(() => {
2127
+ return extractClass(props, ["size", "highContrast"]);
2128
+ });
2129
+ return (_ctx, _cache) => {
2130
+ return openBlock(), createBlock(unref(TabsList), {
2131
+ class: normalizeClass(["ui-TabList", resetClass.value]),
2132
+ "data-accent-color": props.color
2133
+ }, {
2134
+ default: withCtx(() => [
2135
+ createVNode(unref(TabsIndicator), { class: "ui-TabsIndicator" }),
2136
+ renderSlot(_ctx.$slots, "default")
2137
+ ]),
2138
+ _: 3
2139
+ }, 8, ["class", "data-accent-color"]);
2140
+ };
1741
2141
  }
1742
- }), Do = { class: "ui-TabTriggerInner" }, Oo = { class: "ui-TabTriggerInnerHidden" }, Ya = /* @__PURE__ */ m({
2142
+ });
2143
+ const _hoisted_1$8 = { class: "ui-TabTriggerInner" };
2144
+ const _hoisted_2$3 = { class: "ui-TabTriggerInnerHidden" };
2145
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
1743
2146
  __name: "TabsTrigger",
1744
2147
  props: {
1745
2148
  value: {},
@@ -1747,21 +2150,25 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1747
2150
  asChild: { type: Boolean },
1748
2151
  as: {}
1749
2152
  },
1750
- setup(s) {
1751
- const t = V(s);
1752
- return (o, l) => (r(), d(a(Dt), g(a(t), { class: "ui-TabTrigger" }), {
1753
- default: c(() => [
1754
- b("span", Do, [
1755
- _(o.$slots, "default")
2153
+ setup(__props) {
2154
+ const props = __props;
2155
+ const forwarded = useForwardProps(props);
2156
+ return (_ctx, _cache) => {
2157
+ return openBlock(), createBlock(unref(TabsTrigger), mergeProps(unref(forwarded), { class: "ui-TabTrigger" }), {
2158
+ default: withCtx(() => [
2159
+ createElementVNode("span", _hoisted_1$8, [
2160
+ renderSlot(_ctx.$slots, "default")
2161
+ ]),
2162
+ createElementVNode("span", _hoisted_2$3, [
2163
+ renderSlot(_ctx.$slots, "default")
2164
+ ])
1756
2165
  ]),
1757
- b("span", Oo, [
1758
- _(o.$slots, "default")
1759
- ])
1760
- ]),
1761
- _: 3
1762
- }, 16));
2166
+ _: 3
2167
+ }, 16);
2168
+ };
1763
2169
  }
1764
- }), es = /* @__PURE__ */ m({
2170
+ });
2171
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1765
2172
  __name: "AccordionRoot",
1766
2173
  props: {
1767
2174
  size: { default: "1" },
@@ -1777,18 +2184,23 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1777
2184
  defaultValue: {}
1778
2185
  },
1779
2186
  emits: ["update:modelValue"],
1780
- setup(s, { emit: e }) {
1781
- const t = s, o = e, [l, n] = N(t, o, ["size"]);
1782
- return (i, u) => (r(), d(a(Ot), g(a(l), {
1783
- class: ["ui-AccordionRoot", a(n)]
1784
- }), {
1785
- default: c(() => [
1786
- _(i.$slots, "default")
1787
- ]),
1788
- _: 3
1789
- }, 16, ["class"]));
2187
+ setup(__props, { emit: __emit }) {
2188
+ const props = __props;
2189
+ const emits = __emit;
2190
+ const [forwarded, resetClass] = extractForwardPropsEmits(props, emits, ["size"]);
2191
+ return (_ctx, _cache) => {
2192
+ return openBlock(), createBlock(unref(AccordionRoot), mergeProps(unref(forwarded), {
2193
+ class: ["ui-AccordionRoot", unref(resetClass)]
2194
+ }), {
2195
+ default: withCtx(() => [
2196
+ renderSlot(_ctx.$slots, "default")
2197
+ ]),
2198
+ _: 3
2199
+ }, 16, ["class"]);
2200
+ };
1790
2201
  }
1791
- }), ts = /* @__PURE__ */ m({
2202
+ });
2203
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1792
2204
  __name: "AccordionItem",
1793
2205
  props: {
1794
2206
  disabled: { type: Boolean },
@@ -1797,111 +2209,139 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1797
2209
  asChild: { type: Boolean },
1798
2210
  as: {}
1799
2211
  },
1800
- setup(s) {
1801
- const t = V(s);
1802
- return (o, l) => (r(), d(a(Mt), g(a(t), { class: "ui-AccordionItem" }), {
1803
- default: c(() => [
1804
- _(o.$slots, "default")
1805
- ]),
1806
- _: 3
1807
- }, 16));
2212
+ setup(__props) {
2213
+ const props = __props;
2214
+ const forwardedProps = useForwardProps(props);
2215
+ return (_ctx, _cache) => {
2216
+ return openBlock(), createBlock(unref(AccordionItem), mergeProps(unref(forwardedProps), { class: "ui-AccordionItem" }), {
2217
+ default: withCtx(() => [
2218
+ renderSlot(_ctx.$slots, "default")
2219
+ ]),
2220
+ _: 3
2221
+ }, 16);
2222
+ };
1808
2223
  }
1809
- }), os = /* @__PURE__ */ m({
1810
- inheritAttrs: !1,
2224
+ });
2225
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2226
+ ...{
2227
+ inheritAttrs: false
2228
+ },
1811
2229
  __name: "AccordionContent",
1812
2230
  props: {
1813
2231
  forceMount: { type: Boolean },
1814
2232
  asChild: { type: Boolean },
1815
2233
  as: {}
1816
2234
  },
1817
- setup(s) {
1818
- const t = V(s);
1819
- return (o, l) => (r(), d(a(Ft), g(a(t), { class: "ui-AccordionContent" }), {
1820
- default: c(() => [
1821
- b("div", g({ class: "ui-AccordionContentInner" }, o.$attrs), [
1822
- _(o.$slots, "default")
1823
- ], 16)
1824
- ]),
1825
- _: 3
1826
- }, 16));
2235
+ setup(__props) {
2236
+ const props = __props;
2237
+ const forwardedProps = useForwardProps(props);
2238
+ return (_ctx, _cache) => {
2239
+ return openBlock(), createBlock(unref(AccordionContent), mergeProps(unref(forwardedProps), { class: "ui-AccordionContent" }), {
2240
+ default: withCtx(() => [
2241
+ createElementVNode("div", mergeProps({ class: "ui-AccordionContentInner" }, _ctx.$attrs), [
2242
+ renderSlot(_ctx.$slots, "default")
2243
+ ], 16)
2244
+ ]),
2245
+ _: 3
2246
+ }, 16);
2247
+ };
1827
2248
  }
1828
- }), Mo = ["data-accent-color"], Fo = /* @__PURE__ */ m({
2249
+ });
2250
+ const _hoisted_1$7 = ["data-accent-color"];
2251
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
1829
2252
  __name: "PlusMinusIcon",
1830
2253
  props: {
1831
2254
  color: { default: void 0 },
1832
2255
  size: { default: "1" }
1833
2256
  },
1834
- setup(s) {
1835
- const e = s;
1836
- return (t, o) => (r(), $("div", {
1837
- class: I(["ui-PlusMinusIcon", `r-size-${e.size}`]),
1838
- "data-accent-color": e.color
1839
- }, o[0] || (o[0] = [
1840
- b("div", { class: "ui-PlusMinusIcon-1" }, null, -1),
1841
- b("div", { class: "ui-PlusMinusIcon-2" }, null, -1)
1842
- ]), 10, Mo));
2257
+ setup(__props) {
2258
+ const props = __props;
2259
+ return (_ctx, _cache) => {
2260
+ return openBlock(), createElementBlock("div", {
2261
+ class: normalizeClass(["ui-PlusMinusIcon", `r-size-${props.size}`]),
2262
+ "data-accent-color": props.color
2263
+ }, _cache[0] || (_cache[0] = [
2264
+ createElementVNode("div", { class: "ui-PlusMinusIcon-1" }, null, -1),
2265
+ createElementVNode("div", { class: "ui-PlusMinusIcon-2" }, null, -1)
2266
+ ]), 10, _hoisted_1$7);
2267
+ };
1843
2268
  }
1844
- }), Lo = /* @__PURE__ */ m({
2269
+ });
2270
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1845
2271
  __name: "ChevronIcon",
1846
2272
  props: {
1847
2273
  arrowTransform: { default: "right-down" }
1848
2274
  },
1849
- setup(s) {
1850
- return (e, t) => (r(), d(a(k), {
1851
- class: "ui-ChevronIcon",
1852
- icon: "lucide:chevron-right",
1853
- "data-arrow-transform": e.arrowTransform
1854
- }, null, 8, ["data-arrow-transform"]));
2275
+ setup(__props) {
2276
+ return (_ctx, _cache) => {
2277
+ return openBlock(), createBlock(unref(Icon), {
2278
+ class: "ui-ChevronIcon",
2279
+ icon: "lucide:chevron-right",
2280
+ "data-arrow-transform": _ctx.arrowTransform
2281
+ }, null, 8, ["data-arrow-transform"]);
2282
+ };
1855
2283
  }
1856
- }), Go = { class: "ui-AccordionTriggerText" }, as = /* @__PURE__ */ m({
2284
+ });
2285
+ const _hoisted_1$6 = { class: "ui-AccordionTriggerText" };
2286
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
1857
2287
  __name: "AccordionTrigger",
1858
2288
  props: {
1859
2289
  indicator: { default: "chevron" },
1860
2290
  asChild: { type: Boolean },
1861
2291
  as: {}
1862
2292
  },
1863
- setup(s) {
1864
- const e = s, [t, o] = Qt(e, ["size"]);
1865
- return (l, n) => (r(), d(a(Lt), g({
1866
- class: ["ui-AccordionTrigger", a(o)]
1867
- }, a(t)), {
1868
- default: c(() => [
1869
- b("div", Go, [
1870
- _(l.$slots, "default")
2293
+ setup(__props) {
2294
+ const props = __props;
2295
+ const [forwarded, resetClass] = extractForwardProps(props, ["size"]);
2296
+ return (_ctx, _cache) => {
2297
+ return openBlock(), createBlock(unref(AccordionTrigger), mergeProps({
2298
+ class: ["ui-AccordionTrigger", unref(resetClass)]
2299
+ }, unref(forwarded)), {
2300
+ default: withCtx(() => [
2301
+ createElementVNode("div", _hoisted_1$6, [
2302
+ renderSlot(_ctx.$slots, "default")
2303
+ ]),
2304
+ props.indicator === "plus-minus" ? (openBlock(), createBlock(_sfc_main$e, {
2305
+ key: 0,
2306
+ class: "ui-AccordionTriggerIcon"
2307
+ })) : props.indicator === "chevron" ? (openBlock(), createBlock(_sfc_main$d, {
2308
+ key: 1,
2309
+ "arrow-transform": "down-up"
2310
+ })) : createCommentVNode("", true)
1871
2311
  ]),
1872
- e.indicator === "plus-minus" ? (r(), d(Fo, {
1873
- key: 0,
1874
- class: "ui-AccordionTriggerIcon"
1875
- })) : e.indicator === "chevron" ? (r(), d(Lo, {
1876
- key: 1,
1877
- "arrow-transform": "down-up"
1878
- })) : z("", !0)
1879
- ]),
1880
- _: 3
1881
- }, 16, ["class"]));
2312
+ _: 3
2313
+ }, 16, ["class"]);
2314
+ };
1882
2315
  }
1883
- }), ss = /* @__PURE__ */ m({
1884
- inheritAttrs: !1,
2316
+ });
2317
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2318
+ ...{
2319
+ inheritAttrs: false
2320
+ },
1885
2321
  __name: "CollapsibleContent",
1886
2322
  props: {
1887
2323
  forceMount: { type: Boolean },
1888
2324
  asChild: { type: Boolean },
1889
2325
  as: {}
1890
2326
  },
1891
- setup(s) {
1892
- const t = V(s);
1893
- return (o, l) => (r(), d(a(Gt), g(a(t), { class: "ui-CollapsibleContent" }), {
1894
- default: c(() => [
1895
- b("div", g({ class: "ui-CollapsibleContentInner" }, o.$attrs), [
1896
- _(o.$slots, "default")
1897
- ], 16)
1898
- ]),
1899
- _: 3
1900
- }, 16));
2327
+ setup(__props) {
2328
+ const props = __props;
2329
+ const forwardedProps = useForwardProps(props);
2330
+ return (_ctx, _cache) => {
2331
+ return openBlock(), createBlock(unref(CollapsibleContent), mergeProps(unref(forwardedProps), { class: "ui-CollapsibleContent" }), {
2332
+ default: withCtx(() => [
2333
+ createElementVNode("div", mergeProps({ class: "ui-CollapsibleContentInner" }, _ctx.$attrs), [
2334
+ renderSlot(_ctx.$slots, "default")
2335
+ ], 16)
2336
+ ]),
2337
+ _: 3
2338
+ }, 16);
2339
+ };
1901
2340
  }
1902
- }), Ho = /* @__PURE__ */ m({
2341
+ });
2342
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1903
2343
  __name: "Pagination",
1904
- props: /* @__PURE__ */ Q({
2344
+ props: /* @__PURE__ */ mergeModels({
1905
2345
  total: {},
1906
2346
  perpage: { default: 10 },
1907
2347
  edge: { default: 2 },
@@ -1914,163 +2354,195 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
1914
2354
  asChild: { type: Boolean },
1915
2355
  as: {}
1916
2356
  }, {
1917
- page: { required: !0 },
1918
- pageModifiers: {}
2357
+ "page": { required: true },
2358
+ "pageModifiers": {}
1919
2359
  }),
1920
2360
  emits: ["update:page"],
1921
- setup(s) {
1922
- const e = s, t = Z(s, "page"), o = C(() => R(e, ["size", "variant"])), l = C(() => ({
1923
- color: e.color,
1924
- radius: e.radius,
1925
- variant: e.variant,
1926
- size: e.size,
1927
- highContrast: e.highContrast,
1928
- disabled: e.disabled
1929
- })), n = C(() => {
1930
- const v = Math.ceil(e.total / e.perpage), h = t.value > 1 ? t.value - 1 : null, f = t.value < v ? t.value + 1 : null, B = 5 + e.edge * 2, A = v > B && t.value > e.edge + 3, F = v > B && t.value + e.edge + 2 < v, E = [];
1931
- let K = 2, J = v - 1;
1932
- A && !F ? K = Math.max(4, v - 2 * e.edge - 2) : !A && F ? J = Math.min(2 * e.edge + 3, v - 1) : A && F && (K = t.value - e.edge, J = t.value + e.edge);
1933
- for (let X = K; X <= J; X++)
1934
- E.push(X);
2361
+ setup(__props) {
2362
+ const props = __props;
2363
+ const page = useModel(__props, "page");
2364
+ const resetClass = computed(() => {
2365
+ return extractClass(props, ["size", "variant"]);
2366
+ });
2367
+ const buttonProps = computed(() => {
1935
2368
  return {
1936
- totalPages: v,
1937
- prev: h,
1938
- next: f,
1939
- hasLeftEdge: A,
1940
- hasRightEdge: F,
1941
- pageList: E
2369
+ color: props.color,
2370
+ radius: props.radius,
2371
+ variant: props.variant,
2372
+ size: props.size,
2373
+ highContrast: props.highContrast,
2374
+ disabled: props.disabled
1942
2375
  };
1943
- }), i = (v) => {
1944
- t.value = v;
1945
- }, u = () => {
1946
- i(t.value - e.edge);
1947
- }, y = () => {
1948
- i(t.value + e.edge);
1949
- };
1950
- return (v, h) => (r(), $("div", {
1951
- class: I(["ui-Pagination", o.value])
1952
- }, [
1953
- n.value.prev ? (r(), d(Y, g({ key: 0 }, l.value, {
1954
- "aria-label": "Previous",
1955
- onClick: h[0] || (h[0] = D((f) => i(n.value.prev), ["prevent"]))
1956
- }), {
1957
- default: c(() => [
1958
- _(v.$slots, "prev-page", {
1959
- page: n.value.prev
1960
- }, () => [
1961
- p(a(k), { icon: "lucide:chevron-left" })
1962
- ])
1963
- ]),
1964
- _: 3
1965
- }, 16)) : z("", !0),
1966
- p(W, g(l.value, {
1967
- disabled: t.value === 1,
1968
- "aria-current": "page",
1969
- onClick: h[1] || (h[1] = D((f) => i(1), ["prevent"]))
1970
- }), {
1971
- default: c(() => [
1972
- _(v.$slots, "page", { page: 1 }, () => [
1973
- h[4] || (h[4] = L("1"))
1974
- ])
1975
- ]),
1976
- _: 3
1977
- }, 16, ["disabled"]),
1978
- n.value.hasLeftEdge ? (r(), d(Y, g({ key: 1 }, l.value, {
1979
- onClick: D(u, ["prevent"])
1980
- }), {
1981
- default: c(() => [
1982
- _(v.$slots, "prev-edge", {
1983
- page: t.value - v.edge
1984
- }, () => [
1985
- p(a(k), { icon: "lucide:ellipsis" })
1986
- ])
1987
- ]),
1988
- _: 3
1989
- }, 16)) : z("", !0),
1990
- (r(!0), $(H, null, j(n.value.pageList, (f) => (r(), d(W, g({
1991
- key: f,
1992
- ref_for: !0
1993
- }, l.value, {
1994
- disabled: f === t.value,
1995
- "aria-current": "page",
1996
- onClick: D((B) => i(f), ["prevent"])
1997
- }), {
1998
- default: c(() => [
1999
- _(v.$slots, "page", { page: f }, () => [
2000
- L(T(f), 1)
2001
- ])
2002
- ]),
2003
- _: 2
2004
- }, 1040, ["disabled", "onClick"]))), 128)),
2005
- n.value.hasRightEdge ? (r(), d(Y, g({ key: 2 }, l.value, {
2006
- onClick: D(y, ["prevent"])
2007
- }), {
2008
- default: c(() => [
2009
- _(v.$slots, "next-edge", {
2010
- page: t.value + v.edge
2011
- }, () => [
2012
- p(a(k), { icon: "lucide:ellipsis" })
2013
- ])
2014
- ]),
2015
- _: 3
2016
- }, 16)) : z("", !0),
2017
- n.value.totalPages > 1 ? (r(), d(W, g({ key: 3 }, l.value, {
2018
- disabled: n.value.totalPages === t.value,
2019
- "aria-current": "page",
2020
- onClick: h[2] || (h[2] = D((f) => i(n.value.totalPages), ["prevent"]))
2021
- }), {
2022
- default: c(() => [
2023
- _(v.$slots, "page", {
2024
- page: n.value.totalPages
2025
- }, () => [
2026
- L(T(n.value.totalPages), 1)
2027
- ])
2028
- ]),
2029
- _: 3
2030
- }, 16, ["disabled"])) : z("", !0),
2031
- n.value.next ? (r(), d(Y, g({ key: 4 }, l.value, {
2032
- "aria-label": "Next",
2033
- onClick: h[3] || (h[3] = D((f) => i(n.value.next), ["prevent"]))
2034
- }), {
2035
- default: c(() => [
2036
- _(v.$slots, "next-page", {
2037
- page: n.value.next
2038
- }, () => [
2039
- p(a(k), { icon: "lucide:chevron-right" })
2040
- ])
2041
- ]),
2042
- _: 3
2043
- }, 16)) : z("", !0)
2044
- ], 2));
2376
+ });
2377
+ const pagination = computed(() => {
2378
+ const totalPages = Math.ceil(props.total / props.perpage);
2379
+ const prevPage = page.value > 1 ? page.value - 1 : null;
2380
+ const nextPage = page.value < totalPages ? page.value + 1 : null;
2381
+ const pagesOverflow = 5 + props.edge * 2;
2382
+ const hasLeftEdge = totalPages > pagesOverflow && page.value > props.edge + 3;
2383
+ const hasRightEdge = totalPages > pagesOverflow && page.value + props.edge + 2 < totalPages;
2384
+ const pageList = [];
2385
+ let left = 2, right = totalPages - 1;
2386
+ if (hasLeftEdge && !hasRightEdge) {
2387
+ left = Math.max(4, totalPages - 2 * props.edge - 2);
2388
+ } else if (!hasLeftEdge && hasRightEdge) {
2389
+ right = Math.min(2 * props.edge + 3, totalPages - 1);
2390
+ } else if (hasLeftEdge && hasRightEdge) {
2391
+ left = page.value - props.edge;
2392
+ right = page.value + props.edge;
2393
+ }
2394
+ for (let i = left; i <= right; i++) {
2395
+ pageList.push(i);
2396
+ }
2397
+ return {
2398
+ totalPages,
2399
+ prev: prevPage,
2400
+ next: nextPage,
2401
+ hasLeftEdge,
2402
+ hasRightEdge,
2403
+ pageList
2404
+ };
2405
+ });
2406
+ const selectPage = (n) => {
2407
+ page.value = n;
2408
+ };
2409
+ const selectLeft = () => {
2410
+ selectPage(page.value - props.edge);
2411
+ };
2412
+ const selectRight = () => {
2413
+ selectPage(page.value + props.edge);
2414
+ };
2415
+ return (_ctx, _cache) => {
2416
+ return openBlock(), createElementBlock("div", {
2417
+ class: normalizeClass(["ui-Pagination", resetClass.value])
2418
+ }, [
2419
+ pagination.value.prev ? (openBlock(), createBlock(_sfc_main$T, mergeProps({ key: 0 }, buttonProps.value, {
2420
+ "aria-label": "Previous",
2421
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => selectPage(pagination.value.prev), ["prevent"]))
2422
+ }), {
2423
+ default: withCtx(() => [
2424
+ renderSlot(_ctx.$slots, "prev-page", {
2425
+ page: pagination.value.prev
2426
+ }, () => [
2427
+ createVNode(unref(Icon), { icon: "lucide:chevron-left" })
2428
+ ])
2429
+ ]),
2430
+ _: 3
2431
+ }, 16)) : createCommentVNode("", true),
2432
+ createVNode(_sfc_main$U, mergeProps(buttonProps.value, {
2433
+ disabled: page.value === 1,
2434
+ "aria-current": "page",
2435
+ onClick: _cache[1] || (_cache[1] = withModifiers(($event) => selectPage(1), ["prevent"]))
2436
+ }), {
2437
+ default: withCtx(() => [
2438
+ renderSlot(_ctx.$slots, "page", { page: 1 }, () => [
2439
+ _cache[4] || (_cache[4] = createTextVNode("1"))
2440
+ ])
2441
+ ]),
2442
+ _: 3
2443
+ }, 16, ["disabled"]),
2444
+ pagination.value.hasLeftEdge ? (openBlock(), createBlock(_sfc_main$T, mergeProps({ key: 1 }, buttonProps.value, {
2445
+ onClick: withModifiers(selectLeft, ["prevent"])
2446
+ }), {
2447
+ default: withCtx(() => [
2448
+ renderSlot(_ctx.$slots, "prev-edge", {
2449
+ page: page.value - _ctx.edge
2450
+ }, () => [
2451
+ createVNode(unref(Icon), { icon: "lucide:ellipsis" })
2452
+ ])
2453
+ ]),
2454
+ _: 3
2455
+ }, 16)) : createCommentVNode("", true),
2456
+ (openBlock(true), createElementBlock(Fragment, null, renderList(pagination.value.pageList, (p) => {
2457
+ return openBlock(), createBlock(_sfc_main$U, mergeProps({ key: p }, { ref_for: true }, buttonProps.value, {
2458
+ disabled: p === page.value,
2459
+ "aria-current": "page",
2460
+ onClick: withModifiers(($event) => selectPage(p), ["prevent"])
2461
+ }), {
2462
+ default: withCtx(() => [
2463
+ renderSlot(_ctx.$slots, "page", { page: p }, () => [
2464
+ createTextVNode(toDisplayString(p), 1)
2465
+ ])
2466
+ ]),
2467
+ _: 2
2468
+ }, 1040, ["disabled", "onClick"]);
2469
+ }), 128)),
2470
+ pagination.value.hasRightEdge ? (openBlock(), createBlock(_sfc_main$T, mergeProps({ key: 2 }, buttonProps.value, {
2471
+ onClick: withModifiers(selectRight, ["prevent"])
2472
+ }), {
2473
+ default: withCtx(() => [
2474
+ renderSlot(_ctx.$slots, "next-edge", {
2475
+ page: page.value + _ctx.edge
2476
+ }, () => [
2477
+ createVNode(unref(Icon), { icon: "lucide:ellipsis" })
2478
+ ])
2479
+ ]),
2480
+ _: 3
2481
+ }, 16)) : createCommentVNode("", true),
2482
+ pagination.value.totalPages > 1 ? (openBlock(), createBlock(_sfc_main$U, mergeProps({ key: 3 }, buttonProps.value, {
2483
+ disabled: pagination.value.totalPages === page.value,
2484
+ "aria-current": "page",
2485
+ onClick: _cache[2] || (_cache[2] = withModifiers(($event) => selectPage(pagination.value.totalPages), ["prevent"]))
2486
+ }), {
2487
+ default: withCtx(() => [
2488
+ renderSlot(_ctx.$slots, "page", {
2489
+ page: pagination.value.totalPages
2490
+ }, () => [
2491
+ createTextVNode(toDisplayString(pagination.value.totalPages), 1)
2492
+ ])
2493
+ ]),
2494
+ _: 3
2495
+ }, 16, ["disabled"])) : createCommentVNode("", true),
2496
+ pagination.value.next ? (openBlock(), createBlock(_sfc_main$T, mergeProps({ key: 4 }, buttonProps.value, {
2497
+ "aria-label": "Next",
2498
+ onClick: _cache[3] || (_cache[3] = withModifiers(($event) => selectPage(pagination.value.next), ["prevent"]))
2499
+ }), {
2500
+ default: withCtx(() => [
2501
+ renderSlot(_ctx.$slots, "next-page", {
2502
+ page: pagination.value.next
2503
+ }, () => [
2504
+ createVNode(unref(Icon), { icon: "lucide:chevron-right" })
2505
+ ])
2506
+ ]),
2507
+ _: 3
2508
+ }, 16)) : createCommentVNode("", true)
2509
+ ], 2);
2510
+ };
2045
2511
  }
2046
- }), Eo = ["data-size", "data-variant"], jo = ["data-layout"], ls = /* @__PURE__ */ m({
2512
+ });
2513
+ const _hoisted_1$5 = ["data-size", "data-variant"];
2514
+ const _hoisted_2$2 = ["data-layout"];
2515
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
2047
2516
  __name: "Table",
2048
2517
  props: {
2049
2518
  size: { default: "2" },
2050
2519
  variant: { default: "ghost" },
2051
2520
  layout: {}
2052
2521
  },
2053
- setup(s) {
2054
- const e = s;
2055
- return (t, o) => (r(), $("div", {
2056
- class: "ui-Table",
2057
- "data-size": e.size,
2058
- "data-variant": e.variant
2059
- }, [
2060
- p(Ie, null, {
2061
- default: c(() => [
2062
- b("table", {
2063
- class: "ui-TableContent",
2064
- "data-layout": e.layout
2065
- }, [
2066
- _(t.$slots, "default")
2067
- ], 8, jo)
2068
- ]),
2069
- _: 3
2070
- })
2071
- ], 8, Eo));
2522
+ setup(__props) {
2523
+ const props = __props;
2524
+ return (_ctx, _cache) => {
2525
+ return openBlock(), createElementBlock("div", {
2526
+ class: "ui-Table",
2527
+ "data-size": props.size,
2528
+ "data-variant": props.variant
2529
+ }, [
2530
+ createVNode(_sfc_main$R, null, {
2531
+ default: withCtx(() => [
2532
+ createElementVNode("table", {
2533
+ class: "ui-TableContent",
2534
+ "data-layout": props.layout
2535
+ }, [
2536
+ renderSlot(_ctx.$slots, "default")
2537
+ ], 8, _hoisted_2$2)
2538
+ ]),
2539
+ _: 3
2540
+ })
2541
+ ], 8, _hoisted_1$5);
2542
+ };
2072
2543
  }
2073
- }), ns = /* @__PURE__ */ m({
2544
+ });
2545
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2074
2546
  __name: "Separator",
2075
2547
  props: {
2076
2548
  as: { default: "span" },
@@ -2078,18 +2550,24 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
2078
2550
  size: {},
2079
2551
  color: { default: "gray" }
2080
2552
  },
2081
- setup(s) {
2082
- const e = s;
2083
- return (t, o) => (r(), d(a(U), {
2084
- as: e.as,
2085
- class: I(["ui-Separator", `r-size-${e.size}`]),
2086
- role: "separator",
2087
- "data-accent-color": e.color,
2088
- "aria-orientation": e.orientation
2089
- }, null, 8, ["as", "class", "data-accent-color", "aria-orientation"]));
2553
+ setup(__props) {
2554
+ const props = __props;
2555
+ return (_ctx, _cache) => {
2556
+ return openBlock(), createBlock(unref(Primitive), {
2557
+ as: props.as,
2558
+ class: normalizeClass(["ui-Separator", `r-size-${props.size}`]),
2559
+ role: "separator",
2560
+ "data-accent-color": props.color,
2561
+ "aria-orientation": props.orientation
2562
+ }, null, 8, ["as", "class", "data-accent-color", "aria-orientation"]);
2563
+ };
2090
2564
  }
2091
- }), Wo = ["textContent"], Uo = /* @__PURE__ */ m({
2092
- inheritAttrs: !1,
2565
+ });
2566
+ const _hoisted_1$4 = ["textContent"];
2567
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2568
+ ...{
2569
+ inheritAttrs: false
2570
+ },
2093
2571
  __name: "Tooltip",
2094
2572
  props: {
2095
2573
  to: {},
@@ -2117,130 +2595,164 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
2117
2595
  positionStrategy: {},
2118
2596
  updatePositionStrategy: {}
2119
2597
  },
2120
- setup(s) {
2121
- const e = s;
2122
- return (t, o) => (r(), d(a(Ht), {
2123
- "delay-duration": e.delayDuration,
2124
- "disable-closing-trigger": e.disableClosingTrigger,
2125
- "disable-hoverable-content": e.disableHoverableContent,
2126
- disabled: e.disabled,
2127
- "ignore-non-keyboard-focus": e.ignoreNonKeyboardFocus,
2128
- "skip-delay-duration": e.skipDelayDuration
2129
- }, {
2130
- default: c(() => [
2131
- p(a(Et), null, {
2132
- default: c(() => [
2133
- p(a(jt), g({
2134
- as: e.as,
2135
- "as-child": e.asChild
2136
- }, t.$attrs), {
2137
- default: c(() => [
2138
- _(t.$slots, "default")
2139
- ]),
2140
- _: 3
2141
- }, 16, ["as", "as-child"]),
2142
- p(a(Wt), {
2143
- to: e.to
2144
- }, {
2145
- default: c(() => [
2146
- p(a(Ut), {
2147
- class: "ui-Tooltip",
2148
- align: e.align,
2149
- "align-offset": e.alignOffset,
2150
- "aria-label": e.ariaLabel,
2151
- "arrow-padding": e.arrowPadding,
2152
- "avoid-collisions": e.avoidCollisions,
2153
- "collision-boundary": e.collisionBoundary,
2154
- "collision-padding": e.collisionPadding,
2155
- "hide-when-detached": e.hideWhenDetached,
2156
- side: e.side,
2157
- "side-offset": e.sideOffset,
2158
- sticky: e.sticky
2159
- }, {
2160
- default: c(() => [
2161
- _(t.$slots, "content", {}, () => [
2162
- b("p", {
2163
- class: "ui-TooltipText",
2164
- textContent: T(e.content)
2165
- }, null, 8, Wo)
2598
+ setup(__props) {
2599
+ const props = __props;
2600
+ return (_ctx, _cache) => {
2601
+ return openBlock(), createBlock(unref(TooltipProvider), {
2602
+ "delay-duration": props.delayDuration,
2603
+ "disable-closing-trigger": props.disableClosingTrigger,
2604
+ "disable-hoverable-content": props.disableHoverableContent,
2605
+ disabled: props.disabled,
2606
+ "ignore-non-keyboard-focus": props.ignoreNonKeyboardFocus,
2607
+ "skip-delay-duration": props.skipDelayDuration
2608
+ }, {
2609
+ default: withCtx(() => [
2610
+ createVNode(unref(TooltipRoot), null, {
2611
+ default: withCtx(() => [
2612
+ createVNode(unref(TooltipTrigger), mergeProps({
2613
+ as: props.as,
2614
+ "as-child": props.asChild
2615
+ }, _ctx.$attrs), {
2616
+ default: withCtx(() => [
2617
+ renderSlot(_ctx.$slots, "default")
2618
+ ]),
2619
+ _: 3
2620
+ }, 16, ["as", "as-child"]),
2621
+ createVNode(unref(TooltipPortal), {
2622
+ to: props.to
2623
+ }, {
2624
+ default: withCtx(() => [
2625
+ createVNode(unref(TooltipContent), {
2626
+ class: "ui-Tooltip",
2627
+ align: props.align,
2628
+ "align-offset": props.alignOffset,
2629
+ "aria-label": props.ariaLabel,
2630
+ "arrow-padding": props.arrowPadding,
2631
+ "avoid-collisions": props.avoidCollisions,
2632
+ "collision-boundary": props.collisionBoundary,
2633
+ "collision-padding": props.collisionPadding,
2634
+ "hide-when-detached": props.hideWhenDetached,
2635
+ side: props.side,
2636
+ "side-offset": props.sideOffset,
2637
+ sticky: props.sticky
2638
+ }, {
2639
+ default: withCtx(() => [
2640
+ renderSlot(_ctx.$slots, "content", {}, () => [
2641
+ createElementVNode("p", {
2642
+ class: "ui-TooltipText",
2643
+ textContent: toDisplayString(props.content)
2644
+ }, null, 8, _hoisted_1$4)
2645
+ ]),
2646
+ createVNode(unref(TooltipArrow), { class: "ui-TooltipArrow" })
2166
2647
  ]),
2167
- p(a(qt), { class: "ui-TooltipArrow" })
2168
- ]),
2169
- _: 3
2170
- }, 8, ["align", "align-offset", "aria-label", "arrow-padding", "avoid-collisions", "collision-boundary", "collision-padding", "hide-when-detached", "side", "side-offset", "sticky"])
2171
- ]),
2172
- _: 3
2173
- }, 8, ["to"])
2174
- ]),
2175
- _: 3
2176
- })
2177
- ]),
2178
- _: 3
2179
- }, 8, ["delay-duration", "disable-closing-trigger", "disable-hoverable-content", "disabled", "ignore-non-keyboard-focus", "skip-delay-duration"]));
2648
+ _: 3
2649
+ }, 8, ["align", "align-offset", "aria-label", "arrow-padding", "avoid-collisions", "collision-boundary", "collision-padding", "hide-when-detached", "side", "side-offset", "sticky"])
2650
+ ]),
2651
+ _: 3
2652
+ }, 8, ["to"])
2653
+ ]),
2654
+ _: 3
2655
+ })
2656
+ ]),
2657
+ _: 3
2658
+ }, 8, ["delay-duration", "disable-closing-trigger", "disable-hoverable-content", "disabled", "ignore-non-keyboard-focus", "skip-delay-duration"]);
2659
+ };
2180
2660
  }
2181
- }), rs = /* @__PURE__ */ m({
2661
+ });
2662
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2182
2663
  __name: "Quota",
2183
2664
  props: {
2184
2665
  percent: {},
2185
2666
  color: {}
2186
2667
  },
2187
- setup(s) {
2188
- const e = s, t = C(() => {
2189
- const l = `translateX(-${100 - e.percent}%)`;
2190
- if (e.percent > 100)
2191
- return { transform: l, "background-color": "var(--red-a10)" };
2192
- let n = "a4";
2193
- return e.percent > 90 ? n = "a11" : e.percent > 66 ? n = "a9" : e.percent > 33 && (n = "a6"), { transform: l, "background-color": `var(--blue-${n})` };
2194
- }), o = C(() => e.percent > 100 ? 100 : e.percent < 0 ? 0 : e.percent);
2195
- return (l, n) => (r(), d(a(Nt), {
2196
- class: "ui-Quota",
2197
- "model-value": o.value,
2198
- "data-accent-color": e.color
2199
- }, {
2200
- default: c(() => [
2201
- p(a(Kt), {
2202
- class: "ui-QuotaValue",
2203
- style: Be(t.value)
2204
- }, null, 8, ["style"])
2205
- ]),
2206
- _: 1
2207
- }, 8, ["model-value", "data-accent-color"]));
2668
+ setup(__props) {
2669
+ const props = __props;
2670
+ const style = computed(() => {
2671
+ const transform = `translateX(-${100 - props.percent}%)`;
2672
+ if (props.percent > 100) {
2673
+ return { transform, "background-color": "var(--red-a10)" };
2674
+ }
2675
+ let alpha = "a4";
2676
+ if (props.percent > 90) {
2677
+ alpha = "a11";
2678
+ } else if (props.percent > 66) {
2679
+ alpha = "a9";
2680
+ } else if (props.percent > 33) {
2681
+ alpha = "a6";
2682
+ }
2683
+ return { transform, "background-color": `var(--blue-${alpha})` };
2684
+ });
2685
+ const percent = computed(() => {
2686
+ if (props.percent > 100) {
2687
+ return 100;
2688
+ } else if (props.percent < 0) {
2689
+ return 0;
2690
+ }
2691
+ return props.percent;
2692
+ });
2693
+ return (_ctx, _cache) => {
2694
+ return openBlock(), createBlock(unref(ProgressRoot), {
2695
+ class: "ui-Quota",
2696
+ "model-value": percent.value,
2697
+ "data-accent-color": props.color
2698
+ }, {
2699
+ default: withCtx(() => [
2700
+ createVNode(unref(ProgressIndicator), {
2701
+ class: "ui-QuotaValue",
2702
+ style: normalizeStyle(style.value)
2703
+ }, null, 8, ["style"])
2704
+ ]),
2705
+ _: 1
2706
+ }, 8, ["model-value", "data-accent-color"]);
2707
+ };
2208
2708
  }
2209
- }), is = /* @__PURE__ */ m({
2709
+ });
2710
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2210
2711
  __name: "Spinner",
2211
2712
  props: {
2212
2713
  icon: { default: "180-ring" },
2213
2714
  size: { default: "2" }
2214
2715
  },
2215
- setup(s) {
2216
- const e = s, t = C(() => `svg-spinners:${e.icon}`);
2217
- return (o, l) => (r(), d(a(k), {
2218
- class: I(["ui-Spinner", `r-size-${o.size}`]),
2219
- icon: t.value
2220
- }, null, 8, ["class", "icon"]));
2716
+ setup(__props) {
2717
+ const props = __props;
2718
+ const iconName = computed(() => {
2719
+ return `svg-spinners:${props.icon}`;
2720
+ });
2721
+ return (_ctx, _cache) => {
2722
+ return openBlock(), createBlock(unref(Icon), {
2723
+ class: normalizeClass(["ui-Spinner", `r-size-${_ctx.size}`]),
2724
+ icon: iconName.value
2725
+ }, null, 8, ["class", "icon"]);
2726
+ };
2221
2727
  }
2222
- }), qo = ["data-status"], cs = /* @__PURE__ */ m({
2728
+ });
2729
+ const _hoisted_1$3 = ["data-status"];
2730
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2223
2731
  __name: "SavingIndicator",
2224
2732
  props: {
2225
2733
  status: {},
2226
2734
  size: { default: "2" }
2227
2735
  },
2228
- setup(s) {
2229
- const e = s;
2230
- return (t, o) => (r(), $("div", {
2231
- class: I(["ui-SavingIndicator", `r-size-${t.size}`]),
2232
- "data-status": e.status
2233
- }, [
2234
- e.status === "saving" ? (r(), d(a(k), {
2235
- key: 0,
2236
- icon: "svg-spinners:180-ring"
2237
- })) : e.status === "saved" ? (r(), d(a(k), {
2238
- key: 1,
2239
- icon: "lucide:check-circle-2"
2240
- })) : z("", !0)
2241
- ], 10, qo));
2736
+ setup(__props) {
2737
+ const props = __props;
2738
+ return (_ctx, _cache) => {
2739
+ return openBlock(), createElementBlock("div", {
2740
+ class: normalizeClass(["ui-SavingIndicator", `r-size-${_ctx.size}`]),
2741
+ "data-status": props.status
2742
+ }, [
2743
+ props.status === "saving" ? (openBlock(), createBlock(unref(Icon), {
2744
+ key: 0,
2745
+ icon: "svg-spinners:180-ring"
2746
+ })) : props.status === "saved" ? (openBlock(), createBlock(unref(Icon), {
2747
+ key: 1,
2748
+ icon: "lucide:check-circle-2"
2749
+ })) : createCommentVNode("", true)
2750
+ ], 10, _hoisted_1$3);
2751
+ };
2242
2752
  }
2243
- }), No = ["data-accent-color"], us = /* @__PURE__ */ m({
2753
+ });
2754
+ const _hoisted_1$2 = ["data-accent-color"];
2755
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
2244
2756
  __name: "IconCircle",
2245
2757
  props: {
2246
2758
  color: {},
@@ -2248,21 +2760,31 @@ const Ha = /* @__PURE__ */ Bo(xo, [["render", So]]), [zo, Io] = oe("ui_ComboboxR
2248
2760
  variant: { default: "soft" },
2249
2761
  icon: {}
2250
2762
  },
2251
- setup(s) {
2252
- const e = s, t = C(() => R(e, ["size", "variant"]));
2253
- return (o, l) => (r(), $("span", {
2254
- class: I(["ui-IconCircle", t.value]),
2255
- "data-radius": "full",
2256
- "data-accent-color": e.color
2257
- }, [
2258
- p(a(k), {
2259
- icon: e.icon
2260
- }, null, 8, ["icon"])
2261
- ], 10, No));
2763
+ setup(__props) {
2764
+ const props = __props;
2765
+ const resetClass = computed(() => {
2766
+ return extractClass(props, ["size", "variant"]);
2767
+ });
2768
+ return (_ctx, _cache) => {
2769
+ return openBlock(), createElementBlock("span", {
2770
+ class: normalizeClass(["ui-IconCircle", resetClass.value]),
2771
+ "data-radius": "full",
2772
+ "data-accent-color": props.color
2773
+ }, [
2774
+ createVNode(unref(Icon), {
2775
+ icon: props.icon
2776
+ }, null, 8, ["icon"])
2777
+ ], 10, _hoisted_1$2);
2778
+ };
2262
2779
  }
2263
- }), Ko = "https://challenges.cloudflare.com/turnstile/v0/api.js", ge = "cfTurnstileOnLoad";
2264
- let se = typeof window < "u" && window.turnstile !== void 0 ? "ready" : "unloaded", ie, le, ye;
2265
- const ds = /* @__PURE__ */ m({
2780
+ });
2781
+ const turnstileSrc = "https://challenges.cloudflare.com/turnstile/v0/api.js";
2782
+ const turnstileLoadFunction = "cfTurnstileOnLoad";
2783
+ let turnstileState = typeof window !== "undefined" ? window.turnstile !== void 0 ? "ready" : "unloaded" : "unloaded";
2784
+ let turnstileLoad;
2785
+ let widgetId;
2786
+ let resetTimeout;
2787
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
2266
2788
  __name: "Turnstile",
2267
2789
  props: {
2268
2790
  sitekey: {},
@@ -2272,55 +2794,88 @@ const ds = /* @__PURE__ */ m({
2272
2794
  theme: { default: "auto" },
2273
2795
  action: { default: "" },
2274
2796
  appearance: { default: "always" },
2275
- renderOnMount: { type: Boolean, default: !0 }
2797
+ renderOnMount: { type: Boolean, default: true }
2276
2798
  },
2277
2799
  emits: ["update:modelValue"],
2278
- setup(s, { emit: e }) {
2279
- const t = s, o = e, l = P(), n = () => {
2280
- window.turnstile && (o("update:modelValue", ""), window.turnstile.reset());
2281
- }, i = () => {
2282
- le && (window.turnstile.remove(le), le = void 0);
2283
- }, u = (v) => {
2284
- o("update:modelValue", v), ye = setTimeout(() => {
2285
- n();
2286
- }, t.resetInterval);
2287
- }, y = () => {
2288
- le = window.turnstile.render(l.value, {
2289
- sitekey: t.sitekey,
2290
- theme: t.theme,
2291
- size: t.size,
2292
- callback: u,
2293
- action: t.action,
2294
- appearance: t.appearance
2800
+ setup(__props, { emit: __emit }) {
2801
+ const props = __props;
2802
+ const emit = __emit;
2803
+ const element = ref();
2804
+ const resetTurnstile = () => {
2805
+ if (window.turnstile) {
2806
+ emit("update:modelValue", "");
2807
+ window.turnstile.reset();
2808
+ }
2809
+ };
2810
+ const removeTurnstile = () => {
2811
+ if (widgetId) {
2812
+ window.turnstile.remove(widgetId);
2813
+ widgetId = void 0;
2814
+ }
2815
+ };
2816
+ const callbackTurnstile = (token) => {
2817
+ emit("update:modelValue", token);
2818
+ resetTimeout = setTimeout(() => {
2819
+ resetTurnstile();
2820
+ }, props.resetInterval);
2821
+ };
2822
+ const renderTurnstile = () => {
2823
+ widgetId = window.turnstile.render(element.value, {
2824
+ sitekey: props.sitekey,
2825
+ theme: props.theme,
2826
+ size: props.size,
2827
+ callback: callbackTurnstile,
2828
+ action: props.action,
2829
+ appearance: props.appearance
2295
2830
  });
2296
2831
  };
2297
- return ue(async () => {
2298
- const v = new Promise((f, B) => {
2299
- ie = { resolve: f, reject: B }, se === "ready" && f(void 0);
2832
+ onMounted(async () => {
2833
+ const turnstileLoadPromise = new Promise((resolve, reject) => {
2834
+ turnstileLoad = { resolve, reject };
2835
+ if (turnstileState === "ready") resolve(void 0);
2300
2836
  });
2301
- window[ge] = () => {
2302
- ie.resolve(), se = "ready";
2303
- }, await (() => {
2304
- if (se === "unloaded") {
2305
- se = "loading";
2306
- const f = `${Ko}?onload=${ge}&render=explicit`, B = document.createElement("script");
2307
- B.src = f, B.async = !0, B.addEventListener("error", () => {
2308
- ie.reject("Failed to load Turnstile.");
2309
- }), document.head.appendChild(B);
2837
+ window[turnstileLoadFunction] = () => {
2838
+ turnstileLoad.resolve();
2839
+ turnstileState = "ready";
2840
+ };
2841
+ const ensureTurnstile = () => {
2842
+ if (turnstileState === "unloaded") {
2843
+ turnstileState = "loading";
2844
+ const url = `${turnstileSrc}?onload=${turnstileLoadFunction}&render=explicit`;
2845
+ const script = document.createElement("script");
2846
+ script.src = url;
2847
+ script.async = true;
2848
+ script.addEventListener("error", () => {
2849
+ turnstileLoad.reject("Failed to load Turnstile.");
2850
+ });
2851
+ document.head.appendChild(script);
2310
2852
  }
2311
- return v;
2312
- })(), t.renderOnMount && y();
2313
- }), Ce(() => {
2314
- i(), clearTimeout(ye);
2315
- }), (v, h) => (r(), $("div", {
2316
- ref_key: "element",
2317
- ref: l
2318
- }, null, 512));
2853
+ return turnstileLoadPromise;
2854
+ };
2855
+ await ensureTurnstile();
2856
+ if (props.renderOnMount) {
2857
+ renderTurnstile();
2858
+ }
2859
+ });
2860
+ onBeforeUnmount(() => {
2861
+ removeTurnstile();
2862
+ clearTimeout(resetTimeout);
2863
+ });
2864
+ return (_ctx, _cache) => {
2865
+ return openBlock(), createElementBlock("div", {
2866
+ ref_key: "element",
2867
+ ref: element
2868
+ }, null, 512);
2869
+ };
2319
2870
  }
2320
- }), Qo = {
2871
+ });
2872
+ const _hoisted_1$1 = {
2321
2873
  type: "button",
2322
2874
  class: "ui-IconifySample"
2323
- }, Zo = { class: "ui-IconifySampleInfo" }, Jo = { class: "ui-IconifySampleIcons" }, Xo = /* @__PURE__ */ m({
2875
+ };
2876
+ const _hoisted_2$1 = { class: "ui-IconifySampleInfo" };
2877
+ const _hoisted_3$1 = { class: "ui-IconifySampleIcons" };
2878
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2324
2879
  __name: "IconifySample",
2325
2880
  props: {
2326
2881
  prefix: {},
@@ -2330,52 +2885,95 @@ const ds = /* @__PURE__ */ m({
2330
2885
  total: {},
2331
2886
  license: {}
2332
2887
  },
2333
- setup(s) {
2334
- const e = s;
2335
- return (t, o) => (r(), $("button", Qo, [
2336
- b("div", Zo, [
2337
- b("strong", null, T(e.name), 1),
2338
- b("span", null, T(e.license.title), 1),
2339
- b("span", null, T(e.total) + " icons", 1)
2340
- ]),
2341
- b("div", Jo, [
2342
- (r(!0), $(H, null, j(e.samples, (l) => (r(), $("span", { key: l }, [
2343
- p(a(k), {
2344
- icon: e.prefix + ":" + l
2345
- }, null, 8, ["icon"])
2346
- ]))), 128))
2347
- ])
2348
- ]));
2888
+ setup(__props) {
2889
+ const props = __props;
2890
+ return (_ctx, _cache) => {
2891
+ return openBlock(), createElementBlock("button", _hoisted_1$1, [
2892
+ createElementVNode("div", _hoisted_2$1, [
2893
+ createElementVNode("strong", null, toDisplayString(props.name), 1),
2894
+ createElementVNode("span", null, toDisplayString(props.license.title), 1),
2895
+ createElementVNode("span", null, toDisplayString(props.total) + " icons", 1)
2896
+ ]),
2897
+ createElementVNode("div", _hoisted_3$1, [
2898
+ (openBlock(true), createElementBlock(Fragment, null, renderList(props.samples, (icon) => {
2899
+ return openBlock(), createElementBlock("span", { key: icon }, [
2900
+ createVNode(unref(Icon), {
2901
+ icon: props.prefix + ":" + icon
2902
+ }, null, 8, ["icon"])
2903
+ ]);
2904
+ }), 128))
2905
+ ])
2906
+ ]);
2907
+ };
2349
2908
  }
2350
- }), Yo = { class: "ui-IconifyCollection" }, ea = { class: "ui-IconifyCollectionGroups" }, ta = { class: "ui-IconifyCollectionGroupsHead" }, oa = { class: "ui-IconifyCollectionForm" }, aa = { class: "mb-2" }, sa = { class: "font-medium" }, la = { class: "text-sm ml-1" }, na = { class: "ui-IconifyCollectionSampleGrid" }, ra = {
2909
+ });
2910
+ const _hoisted_1 = { class: "ui-IconifyCollection" };
2911
+ const _hoisted_2 = { class: "ui-IconifyCollectionGroups" };
2912
+ const _hoisted_3 = { class: "ui-IconifyCollectionGroupsHead" };
2913
+ const _hoisted_4 = { class: "ui-IconifyCollectionForm" };
2914
+ const _hoisted_5 = { class: "mb-2" };
2915
+ const _hoisted_6 = { class: "font-medium" };
2916
+ const _hoisted_7 = { class: "text-sm ml-1" };
2917
+ const _hoisted_8 = { class: "ui-IconifyCollectionSampleGrid" };
2918
+ const _hoisted_9 = {
2351
2919
  key: 0,
2352
2920
  class: "ui-IconifyCollectionIcons"
2353
- }, ia = { class: "ui-IconifyCollectionForm" }, ca = {
2921
+ };
2922
+ const _hoisted_10 = { class: "ui-IconifyCollectionForm" };
2923
+ const _hoisted_11 = {
2354
2924
  key: 0,
2355
2925
  class: "ui-IconifyCollectionSuffixes"
2356
- }, ua = { class: "ui-IconifyCollectionIconGrid" }, da = async () => {
2357
- const t = await (await fetch("https://api.iconify.design/collections")).json(), o = {};
2358
- Object.keys(t).forEach((n) => {
2359
- const i = t[n];
2360
- i.hidden || (o[i.category] || (o[i.category] = []), o[i.category].push({ ...i, prefix: n }));
2926
+ };
2927
+ const _hoisted_12 = { class: "ui-IconifyCollectionIconGrid" };
2928
+ const fetchCollections = async () => {
2929
+ const apiLink = "https://api.iconify.design/collections";
2930
+ const resp = await fetch(apiLink);
2931
+ const data = await resp.json();
2932
+ const cache = {};
2933
+ Object.keys(data).forEach((prefix) => {
2934
+ const item = data[prefix];
2935
+ if (item.hidden) {
2936
+ return;
2937
+ }
2938
+ if (!cache[item.category]) {
2939
+ cache[item.category] = [];
2940
+ }
2941
+ cache[item.category].push({ ...item, prefix });
2361
2942
  });
2362
- const l = [];
2363
- return Object.keys(o).forEach((n) => {
2364
- l.push({
2365
- category: n,
2366
- items: o[n]
2943
+ const collections = [];
2944
+ Object.keys(cache).forEach((category) => {
2945
+ collections.push({
2946
+ category,
2947
+ items: cache[category]
2367
2948
  });
2368
- }), l;
2369
- }, pa = async (s) => {
2370
- const e = `https://api.iconify.design/search?query=${encodeURIComponent(s)}&limit=999`;
2371
- return (await (await fetch(e)).json()).icons;
2372
- }, fa = async (s) => {
2373
- const e = `https://api.iconify.design/collection?prefix=${encodeURIComponent(s)}&chars=true&aliases=true`;
2374
- return await (await fetch(e)).json();
2375
- }, ce = (s, e, t) => s.filter((o) => {
2376
- let l = !0;
2377
- return e && o.indexOf(e) === -1 && (l = !1), t && o.indexOf(`-${t}`) === -1 && (l = !1), l;
2378
- }), ps = /* @__PURE__ */ m({
2949
+ });
2950
+ return collections;
2951
+ };
2952
+ const searchIcons = async (query) => {
2953
+ const apiLink = `https://api.iconify.design/search?query=${encodeURIComponent(query)}&limit=999`;
2954
+ const resp = await fetch(apiLink);
2955
+ const data = await resp.json();
2956
+ return data.icons;
2957
+ };
2958
+ const fetchCollectionIcons = async (prefix) => {
2959
+ const apiLink = `https://api.iconify.design/collection?prefix=${encodeURIComponent(prefix)}&chars=true&aliases=true`;
2960
+ const resp = await fetch(apiLink);
2961
+ const data = await resp.json();
2962
+ return data;
2963
+ };
2964
+ const filterIcons = (names, query, suffix) => {
2965
+ return names.filter((key) => {
2966
+ let match = true;
2967
+ if (query && key.indexOf(query) === -1) {
2968
+ match = false;
2969
+ }
2970
+ if (suffix && key.indexOf(`-${suffix}`) === -1) {
2971
+ match = false;
2972
+ }
2973
+ return match;
2974
+ });
2975
+ };
2976
+ const _sfc_main = /* @__PURE__ */ defineComponent({
2379
2977
  __name: "IconifyCollection",
2380
2978
  props: {
2381
2979
  prefix: {},
@@ -2383,242 +2981,320 @@ const ds = /* @__PURE__ */ m({
2383
2981
  perpage: { default: 200 }
2384
2982
  },
2385
2983
  emits: ["select"],
2386
- setup(s, { emit: e }) {
2387
- const t = s, o = e, l = P("all"), n = P([]), i = P(""), u = P(1), y = P(""), v = P([]), h = P(), f = P(""), B = P(""), A = () => {
2388
- u.value = 1, y.value = "", v.value = [], h.value = void 0, f.value = "", B.value = "", l.value = "all";
2389
- }, F = (w) => {
2390
- o("select", w);
2391
- }, E = async () => {
2392
- y.value ? (l.value = "search", v.value = await pa(y.value)) : l.value = "all";
2393
- }, K = async (w) => {
2394
- h.value = void 0, f.value = "", B.value = "", l.value = "collection", h.value = await fa(w);
2395
- }, J = C(() => {
2396
- let w = 0;
2397
- return n.value.forEach((S) => {
2398
- w += S.items.length;
2399
- }), w;
2400
- }), X = C(() => i.value ? n.value.map((w) => {
2401
- const S = w.items.filter((O) => [O.category, O.name, O.prefix].join(" ").toLowerCase().indexOf(i.value) !== -1);
2402
- return { ...w, items: S };
2403
- }).filter((w) => w.items.length !== 0) : n.value), Re = C(() => {
2404
- let w = [];
2405
- return h.value ? (h.value.uncategorized ? w = ce(h.value.uncategorized, f.value, B.value) : h.value.categories && Object.keys(h.value.categories).forEach((S) => {
2406
- const O = h.value.categories[S];
2407
- ce(O, f.value, B.value).forEach((x) => {
2408
- w.push(x);
2984
+ setup(__props, { emit: __emit }) {
2985
+ const props = __props;
2986
+ const emits = __emit;
2987
+ const shouldDisplay = ref("all");
2988
+ const groupCollections = ref([]);
2989
+ const collectionFilter = ref("");
2990
+ const page = ref(1);
2991
+ const searchQuery = ref("");
2992
+ const searchResultIcons = ref([]);
2993
+ const collectionData = ref();
2994
+ const collectionQuery = ref("");
2995
+ const collectionSuffix = ref("");
2996
+ const reset = () => {
2997
+ page.value = 1;
2998
+ searchQuery.value = "";
2999
+ searchResultIcons.value = [];
3000
+ collectionData.value = void 0;
3001
+ collectionQuery.value = "";
3002
+ collectionSuffix.value = "";
3003
+ shouldDisplay.value = "all";
3004
+ };
3005
+ const onSelectIcon = (icon) => {
3006
+ emits("select", icon);
3007
+ };
3008
+ const onSearch = async () => {
3009
+ if (searchQuery.value) {
3010
+ shouldDisplay.value = "search";
3011
+ searchResultIcons.value = await searchIcons(searchQuery.value);
3012
+ } else {
3013
+ shouldDisplay.value = "all";
3014
+ }
3015
+ };
3016
+ const onSelectPrefix = async (prefix) => {
3017
+ collectionData.value = void 0;
3018
+ collectionQuery.value = "";
3019
+ collectionSuffix.value = "";
3020
+ shouldDisplay.value = "collection";
3021
+ collectionData.value = await fetchCollectionIcons(prefix);
3022
+ };
3023
+ const collectionCount = computed(() => {
3024
+ let count = 0;
3025
+ groupCollections.value.forEach((item) => {
3026
+ count += item.items.length;
3027
+ });
3028
+ return count;
3029
+ });
3030
+ const visibleCollections = computed(() => {
3031
+ if (!collectionFilter.value) {
3032
+ return groupCollections.value;
3033
+ }
3034
+ return groupCollections.value.map((collection) => {
3035
+ const items = collection.items.filter((item) => {
3036
+ const key = [item.category, item.name, item.prefix].join(" ");
3037
+ return key.toLowerCase().indexOf(collectionFilter.value) !== -1;
2409
3038
  });
2410
- }), f.value && !w.length && h.value.hidden && (w = ce(h.value.hidden, f.value, B.value)), w.map((S) => {
2411
- var O;
2412
- return `${(O = h.value) == null ? void 0 : O.prefix}:${S}`;
2413
- })) : w;
2414
- }), me = C(() => l.value === "search" ? v.value : l.value === "collection" ? Re.value : []), Pe = C(() => {
2415
- const w = (u.value - 1) * t.perpage, S = u.value * t.perpage;
2416
- return me.value.slice(w, S);
3039
+ return { ...collection, items };
3040
+ }).filter((collection) => collection.items.length !== 0);
3041
+ });
3042
+ const collectionIcons = computed(() => {
3043
+ let rv = [];
3044
+ if (!collectionData.value) {
3045
+ return rv;
3046
+ }
3047
+ if (collectionData.value.uncategorized) {
3048
+ rv = filterIcons(collectionData.value.uncategorized, collectionQuery.value, collectionSuffix.value);
3049
+ } else if (collectionData.value.categories) {
3050
+ Object.keys(collectionData.value.categories).forEach((category) => {
3051
+ const icons = collectionData.value.categories[category];
3052
+ filterIcons(icons, collectionQuery.value, collectionSuffix.value).forEach((k) => {
3053
+ rv.push(k);
3054
+ });
3055
+ });
3056
+ }
3057
+ if (collectionQuery.value && !rv.length && collectionData.value.hidden) {
3058
+ rv = filterIcons(collectionData.value.hidden, collectionQuery.value, collectionSuffix.value);
3059
+ }
3060
+ return rv.map((name) => {
3061
+ var _a;
3062
+ return `${(_a = collectionData.value) == null ? void 0 : _a.prefix}:${name}`;
3063
+ });
3064
+ });
3065
+ const allIcons = computed(() => {
3066
+ if (shouldDisplay.value === "search") {
3067
+ return searchResultIcons.value;
3068
+ } else if (shouldDisplay.value === "collection") {
3069
+ return collectionIcons.value;
3070
+ } else {
3071
+ return [];
3072
+ }
3073
+ });
3074
+ const visibleIcons = computed(() => {
3075
+ const start = (page.value - 1) * props.perpage;
3076
+ const end = page.value * props.perpage;
3077
+ return allIcons.value.slice(start, end);
2417
3078
  });
2418
- return ue(async () => {
2419
- t.prefix ? K(t.prefix) : t.search && (y.value = t.search, E()), n.value = await da();
2420
- }), (w, S) => {
2421
- var O;
2422
- return r(), $("div", Yo, [
2423
- te(b("div", ea, [
2424
- b("section", ta, [
2425
- b("h1", null, T(J.value) + " icon sets", 1),
2426
- b("div", oa, [
2427
- p(ae, {
2428
- modelValue: i.value,
2429
- "onUpdate:modelValue": S[0] || (S[0] = (x) => i.value = x),
3079
+ onMounted(async () => {
3080
+ if (props.prefix) {
3081
+ onSelectPrefix(props.prefix);
3082
+ } else if (props.search) {
3083
+ searchQuery.value = props.search;
3084
+ onSearch();
3085
+ }
3086
+ groupCollections.value = await fetchCollections();
3087
+ });
3088
+ return (_ctx, _cache) => {
3089
+ var _a;
3090
+ return openBlock(), createElementBlock("div", _hoisted_1, [
3091
+ withDirectives(createElementVNode("div", _hoisted_2, [
3092
+ createElementVNode("section", _hoisted_3, [
3093
+ createElementVNode("h1", null, toDisplayString(collectionCount.value) + " icon sets", 1),
3094
+ createElementVNode("div", _hoisted_4, [
3095
+ createVNode(_sfc_main$C, {
3096
+ modelValue: collectionFilter.value,
3097
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => collectionFilter.value = $event),
2430
3098
  placeholder: "Filter icon sets..."
2431
3099
  }, null, 8, ["modelValue"]),
2432
- p(ae, {
2433
- modelValue: y.value,
2434
- "onUpdate:modelValue": S[1] || (S[1] = (x) => y.value = x),
3100
+ createVNode(_sfc_main$C, {
3101
+ modelValue: searchQuery.value,
3102
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchQuery.value = $event),
2435
3103
  placeholder: "Search icons...",
2436
- onKeydown: he(E, ["enter"])
3104
+ onKeydown: withKeys(onSearch, ["enter"])
2437
3105
  }, null, 8, ["modelValue"])
2438
3106
  ])
2439
3107
  ]),
2440
- (r(!0), $(H, null, j(X.value, (x) => (r(), $("section", {
2441
- key: x.category,
2442
- class: "ui-IconifyCollectionSample"
2443
- }, [
2444
- b("h1", aa, [
2445
- b("span", sa, T(x.category), 1),
2446
- b("span", la, "(" + T(x.items.length) + " icon sets)", 1)
2447
- ]),
2448
- b("div", na, [
2449
- (r(!0), $(H, null, j(x.items, (G) => (r(), d(Xo, g({
2450
- key: G.prefix,
2451
- ref_for: !0
2452
- }, G, {
2453
- onClick: D((De) => K(G.prefix), ["prevent"])
2454
- }), null, 16, ["onClick"]))), 128))
2455
- ])
2456
- ]))), 128))
3108
+ (openBlock(true), createElementBlock(Fragment, null, renderList(visibleCollections.value, (collection) => {
3109
+ return openBlock(), createElementBlock("section", {
3110
+ key: collection.category,
3111
+ class: "ui-IconifyCollectionSample"
3112
+ }, [
3113
+ createElementVNode("h1", _hoisted_5, [
3114
+ createElementVNode("span", _hoisted_6, toDisplayString(collection.category), 1),
3115
+ createElementVNode("span", _hoisted_7, "(" + toDisplayString(collection.items.length) + " icon sets)", 1)
3116
+ ]),
3117
+ createElementVNode("div", _hoisted_8, [
3118
+ (openBlock(true), createElementBlock(Fragment, null, renderList(collection.items, (item) => {
3119
+ return openBlock(), createBlock(_sfc_main$1, mergeProps({
3120
+ key: item.prefix
3121
+ }, { ref_for: true }, item, {
3122
+ onClick: withModifiers(($event) => onSelectPrefix(item.prefix), ["prevent"])
3123
+ }), null, 16, ["onClick"]);
3124
+ }), 128))
3125
+ ])
3126
+ ]);
3127
+ }), 128))
2457
3128
  ], 512), [
2458
- [He, l.value === "all"]
3129
+ [vShow, shouldDisplay.value === "all"]
2459
3130
  ]),
2460
- l.value !== "all" ? (r(), $("div", ra, [
2461
- b("div", ia, [
2462
- p(W, {
3131
+ shouldDisplay.value !== "all" ? (openBlock(), createElementBlock("div", _hoisted_9, [
3132
+ createElementVNode("div", _hoisted_10, [
3133
+ createVNode(_sfc_main$U, {
2463
3134
  type: "button",
2464
3135
  variant: "surface",
2465
3136
  color: "gray",
2466
- onClick: D(A, ["prevent"])
3137
+ onClick: withModifiers(reset, ["prevent"])
2467
3138
  }, {
2468
- default: c(() => S[5] || (S[5] = [
2469
- L(" Back ")
3139
+ default: withCtx(() => _cache[5] || (_cache[5] = [
3140
+ createTextVNode(" Back ")
2470
3141
  ])),
2471
- _: 1
3142
+ _: 1,
3143
+ __: [5]
2472
3144
  }),
2473
- l.value === "search" ? (r(), d(ae, {
3145
+ shouldDisplay.value === "search" ? (openBlock(), createBlock(_sfc_main$C, {
2474
3146
  key: 0,
2475
- modelValue: y.value,
2476
- "onUpdate:modelValue": S[2] || (S[2] = (x) => y.value = x),
3147
+ modelValue: searchQuery.value,
3148
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => searchQuery.value = $event),
2477
3149
  placeholder: "Search icons...",
2478
- onKeydown: he(E, ["enter"])
2479
- }, null, 8, ["modelValue"])) : z("", !0),
2480
- l.value === "collection" ? (r(), d(ae, {
3150
+ onKeydown: withKeys(onSearch, ["enter"])
3151
+ }, null, 8, ["modelValue"])) : createCommentVNode("", true),
3152
+ shouldDisplay.value === "collection" ? (openBlock(), createBlock(_sfc_main$C, {
2481
3153
  key: 1,
2482
- modelValue: f.value,
2483
- "onUpdate:modelValue": S[3] || (S[3] = (x) => f.value = x),
3154
+ modelValue: collectionQuery.value,
3155
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => collectionQuery.value = $event),
2484
3156
  placeholder: "Search icons..."
2485
- }, null, 8, ["modelValue"])) : z("", !0)
3157
+ }, null, 8, ["modelValue"])) : createCommentVNode("", true)
2486
3158
  ]),
2487
- l.value === "collection" && ((O = h.value) != null && O.suffixes) ? (r(), $("div", ca, [
2488
- (r(!0), $(H, null, j(h.value.suffixes, (x, G) => (r(), d(W, {
2489
- key: G,
2490
- variant: B.value === G ? "solid" : "outline",
2491
- color: "gray",
2492
- "high-contrast": "",
2493
- radius: "full",
2494
- onClick: D((De) => B.value = G, ["prevent"])
2495
- }, {
2496
- default: c(() => [
2497
- L(T(x), 1)
2498
- ]),
2499
- _: 2
2500
- }, 1032, ["variant", "onClick"]))), 128))
2501
- ])) : z("", !0),
2502
- b("div", ua, [
2503
- (r(!0), $(H, null, j(Pe.value, (x) => (r(), d(Uo, {
2504
- key: x,
2505
- as: "div",
2506
- content: x
2507
- }, {
2508
- default: c(() => [
2509
- p(Y, {
2510
- type: "button",
2511
- color: "gray",
2512
- variant: "ghost",
2513
- size: "4",
2514
- onClick: D((G) => F(x), ["prevent"])
2515
- }, {
2516
- default: c(() => [
2517
- p(a(k), { icon: x }, null, 8, ["icon"])
2518
- ]),
2519
- _: 2
2520
- }, 1032, ["onClick"])
2521
- ]),
2522
- _: 2
2523
- }, 1032, ["content"]))), 128))
3159
+ shouldDisplay.value === "collection" && ((_a = collectionData.value) == null ? void 0 : _a.suffixes) ? (openBlock(), createElementBlock("div", _hoisted_11, [
3160
+ (openBlock(true), createElementBlock(Fragment, null, renderList(collectionData.value.suffixes, (k, v) => {
3161
+ return openBlock(), createBlock(_sfc_main$U, {
3162
+ key: v,
3163
+ variant: collectionSuffix.value === v ? "solid" : "outline",
3164
+ color: "gray",
3165
+ "high-contrast": "",
3166
+ radius: "full",
3167
+ onClick: withModifiers(($event) => collectionSuffix.value = v, ["prevent"])
3168
+ }, {
3169
+ default: withCtx(() => [
3170
+ createTextVNode(toDisplayString(k), 1)
3171
+ ]),
3172
+ _: 2
3173
+ }, 1032, ["variant", "onClick"]);
3174
+ }), 128))
3175
+ ])) : createCommentVNode("", true),
3176
+ createElementVNode("div", _hoisted_12, [
3177
+ (openBlock(true), createElementBlock(Fragment, null, renderList(visibleIcons.value, (icon) => {
3178
+ return openBlock(), createBlock(_sfc_main$7, {
3179
+ key: icon,
3180
+ as: "div",
3181
+ content: icon
3182
+ }, {
3183
+ default: withCtx(() => [
3184
+ createVNode(_sfc_main$T, {
3185
+ type: "button",
3186
+ color: "gray",
3187
+ variant: "ghost",
3188
+ size: "4",
3189
+ onClick: withModifiers(($event) => onSelectIcon(icon), ["prevent"])
3190
+ }, {
3191
+ default: withCtx(() => [
3192
+ createVNode(unref(Icon), { icon }, null, 8, ["icon"])
3193
+ ]),
3194
+ _: 2
3195
+ }, 1032, ["onClick"])
3196
+ ]),
3197
+ _: 2
3198
+ }, 1032, ["content"]);
3199
+ }), 128))
2524
3200
  ]),
2525
- p(Ho, {
2526
- page: u.value,
2527
- "onUpdate:page": S[4] || (S[4] = (x) => u.value = x),
2528
- total: me.value.length,
2529
- perpage: w.perpage
3201
+ createVNode(_sfc_main$a, {
3202
+ page: page.value,
3203
+ "onUpdate:page": _cache[4] || (_cache[4] = ($event) => page.value = $event),
3204
+ total: allIcons.value.length,
3205
+ perpage: _ctx.perpage
2530
3206
  }, null, 8, ["page", "total", "perpage"])
2531
- ])) : z("", !0)
3207
+ ])) : createCommentVNode("", true)
2532
3208
  ]);
2533
3209
  };
2534
3210
  }
2535
3211
  });
2536
3212
  export {
2537
- os as AccordionContent,
2538
- ts as AccordionItem,
2539
- es as AccordionRoot,
2540
- as as AccordionTrigger,
2541
- hs as AlertDialogAction,
2542
- vs as AlertDialogCancel,
2543
- ba as AlertDialogContent,
2544
- _s as AlertDialogDescription,
2545
- gs as AlertDialogRoot,
2546
- ys as AlertDialogTitle,
2547
- Cs as AlertDialogTrigger,
2548
- _a as Avatar,
2549
- ga as Badge,
2550
- W as Button,
2551
- Yt as Card,
2552
- ya as CardHead,
2553
- ke as Checkbox,
2554
- Va as CheckboxGroupControl,
2555
- ka as CheckboxGroupItem,
2556
- Ia as CheckboxGroupRoot,
2557
- Lo as ChevronIcon,
2558
- ss as CollapsibleContent,
2559
- bs as CollapsibleRoot,
2560
- $s as CollapsibleTrigger,
2561
- Da as ColorField,
2562
- Wa as ComboboxContent,
2563
- Bs as ComboboxEmpty,
2564
- xs as ComboboxGroup,
2565
- ja as ComboboxInput,
2566
- Ua as ComboboxItem,
2567
- qa as ComboboxLabel,
2568
- Ea as ComboboxRoot,
2569
- ws as DialogClose,
2570
- $a as DialogContent,
2571
- Ss as DialogDescription,
2572
- Ba as DialogHead,
2573
- zs as DialogRoot,
2574
- Is as DialogTitle,
2575
- ks as DialogTrigger,
2576
- xa as DropdownMenuContent,
2577
- wa as DropdownMenuItem,
2578
- Vs as DropdownMenuRoot,
2579
- Ts as DropdownMenuTrigger,
2580
- Gs as Icon,
2581
- Y as IconButton,
2582
- us as IconCircle,
2583
- ps as IconifyCollection,
2584
- Xt as Inset,
2585
- Ho as Pagination,
2586
- Fo as PlusMinusIcon,
2587
- As as PopoverClose,
2588
- Sa as PopoverContent,
2589
- Rs as PopoverRoot,
2590
- Ps as PopoverTrigger,
2591
- rs as Quota,
2592
- Na as Radio,
2593
- Za as RadioCardsItem,
2594
- Ka as RadioCardsRoot,
2595
- Qa as RadioGroupItem,
2596
- Ka as RadioGroupRoot,
2597
- Ds as RadioTabsItem,
2598
- Ja as RadioTabsList,
2599
- cs as SavingIndicator,
2600
- Ie as ScrollArea,
2601
- Ma as SelectContent,
2602
- Os as SelectGroup,
2603
- La as SelectItem,
2604
- Ga as SelectLabel,
2605
- Oa as SelectRoot,
2606
- Ha as SelectSeparator,
2607
- Fa as SelectTrigger,
2608
- ns as Separator,
2609
- Ca as SocialButton,
2610
- is as Spinner,
2611
- za as Switch,
2612
- ls as Table,
2613
- Ms as TabsContent,
2614
- Xa as TabsList,
2615
- Fs as TabsRoot,
2616
- Ya as TabsTrigger,
2617
- Pa as TextArea,
2618
- ae as TextField,
2619
- Ta as Toggle,
2620
- Ra as ToggleGroupItem,
2621
- Aa as ToggleGroupRoot,
2622
- Uo as Tooltip,
2623
- ds as Turnstile
3213
+ _sfc_main$f as AccordionContent,
3214
+ _sfc_main$g as AccordionItem,
3215
+ _sfc_main$h as AccordionRoot,
3216
+ _sfc_main$c as AccordionTrigger,
3217
+ AlertDialogAction,
3218
+ AlertDialogCancel,
3219
+ _sfc_main$Q as AlertDialogContent,
3220
+ AlertDialogDescription,
3221
+ AlertDialogRoot,
3222
+ AlertDialogTitle,
3223
+ AlertDialogTrigger,
3224
+ _sfc_main$Z as Avatar,
3225
+ _sfc_main$Y as Badge,
3226
+ _sfc_main$U as Button,
3227
+ _sfc_main$W as Card,
3228
+ _sfc_main$V as CardHead,
3229
+ _sfc_main$J as Checkbox,
3230
+ _sfc_main$G as CheckboxGroupControl,
3231
+ _sfc_main$H as CheckboxGroupItem,
3232
+ _sfc_main$I as CheckboxGroupRoot,
3233
+ _sfc_main$d as ChevronIcon,
3234
+ _sfc_main$b as CollapsibleContent,
3235
+ CollapsibleRoot,
3236
+ CollapsibleTrigger,
3237
+ _sfc_main$A as ColorField,
3238
+ _sfc_main$r as ComboboxContent,
3239
+ ComboboxEmpty,
3240
+ ComboboxGroup,
3241
+ _sfc_main$s as ComboboxInput,
3242
+ _sfc_main$q as ComboboxItem,
3243
+ _sfc_main$p as ComboboxLabel,
3244
+ _sfc_main$t as ComboboxRoot,
3245
+ DialogClose2 as DialogClose,
3246
+ _sfc_main$P as DialogContent,
3247
+ DialogDescription,
3248
+ _sfc_main$O as DialogHead,
3249
+ DialogRoot,
3250
+ DialogTitle2 as DialogTitle,
3251
+ DialogTrigger,
3252
+ _sfc_main$N as DropdownMenuContent,
3253
+ _sfc_main$M as DropdownMenuItem,
3254
+ DropdownMenuRoot,
3255
+ DropdownMenuTrigger,
3256
+ Icon2 as Icon,
3257
+ _sfc_main$T as IconButton,
3258
+ _sfc_main$3 as IconCircle,
3259
+ _sfc_main as IconifyCollection,
3260
+ _sfc_main$X as Inset,
3261
+ _sfc_main$a as Pagination,
3262
+ _sfc_main$e as PlusMinusIcon,
3263
+ PopoverClose,
3264
+ _sfc_main$L as PopoverContent,
3265
+ PopoverRoot,
3266
+ PopoverTrigger,
3267
+ _sfc_main$6 as Quota,
3268
+ _sfc_main$o as Radio,
3269
+ _sfc_main$l as RadioCardsItem,
3270
+ _sfc_main$n as RadioCardsRoot,
3271
+ _sfc_main$m as RadioGroupItem,
3272
+ _sfc_main$n as RadioGroupRoot,
3273
+ RadioGroupItem2 as RadioTabsItem,
3274
+ _sfc_main$k as RadioTabsList,
3275
+ _sfc_main$4 as SavingIndicator,
3276
+ _sfc_main$R as ScrollArea,
3277
+ _sfc_main$y as SelectContent,
3278
+ SelectGroup,
3279
+ _sfc_main$w as SelectItem,
3280
+ _sfc_main$v as SelectLabel,
3281
+ _sfc_main$z as SelectRoot,
3282
+ SelectSeparator,
3283
+ _sfc_main$x as SelectTrigger,
3284
+ _sfc_main$8 as Separator,
3285
+ _sfc_main$S as SocialButton,
3286
+ _sfc_main$5 as Spinner,
3287
+ _sfc_main$K as Switch,
3288
+ _sfc_main$9 as Table,
3289
+ TabsContent,
3290
+ _sfc_main$j as TabsList,
3291
+ TabsRoot,
3292
+ _sfc_main$i as TabsTrigger,
3293
+ _sfc_main$B as TextArea,
3294
+ _sfc_main$C as TextField,
3295
+ _sfc_main$F as Toggle,
3296
+ _sfc_main$D as ToggleGroupItem,
3297
+ _sfc_main$E as ToggleGroupRoot,
3298
+ _sfc_main$7 as Tooltip,
3299
+ _sfc_main$2 as Turnstile
2624
3300
  };