@typlog/ui 0.9.2 → 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.
Files changed (4) hide show
  1. package/dist/base.css +6920 -0
  2. package/dist/index.js +2392 -1716
  3. package/dist/style.css +10463 -1
  4. package/package.json +4 -2
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 j, 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 De, vModelText as $e, normalizeStyle as Be, normalizeProps as Fe, guardReactiveProps as Me, Fragment as G, watch as je, renderList as E, withModifiers as O, vModelRadio as Le, withKeys as he, vShow as Ge } from "vue";
2
- import { useForwardProps as V, useEmitAsProps as xe, AvatarRoot as He, AvatarImage as Ee, 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 F, 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 Se, ComboboxAnchor as St, ComboboxInput as ve, ComboboxTrigger as wt, ComboboxPortal as zt, ComboboxContent as It, ComboboxViewport as kt, ComboboxItem as Vt, ComboboxItemIndicator as Tt, ComboboxLabel as At, RadioGroupRoot as we, RadioGroupItem as ze, TabsList as Rt, TabsIndicator as Pt, TabsTrigger as Ot, AccordionRoot as Dt, AccordionItem as Ft, AccordionContent as Mt, AccordionTrigger as jt, CollapsibleContent as Lt, TooltipProvider as Gt, TooltipRoot as Ht, TooltipTrigger as Et, 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 Ss, DialogDescription as ws, 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 Os, SelectGroup as Ds, TabsContent as Fs, TabsRoot as Ms } from "reka-ui";
4
- import { Icon as k } from "@iconify/vue";
5
- import { Icon as Ls } 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(He), {
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(Ee), {
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
- j(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" },
@@ -91,111 +121,136 @@ const _a = /* @__PURE__ */ m({
91
121
  size: { default: "1" },
92
122
  highContrast: { type: Boolean, default: void 0 },
93
123
  asChild: { type: Boolean },
94
- as: { type: [String, Object, Function], default: "span" }
95
- },
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"]));
124
+ as: { default: "span" }
125
+ },
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" },
131
171
  radius: {},
132
172
  size: { default: "1" },
133
173
  asChild: { type: Boolean },
134
- as: { type: [String, Object, Function], default: "div" }
135
- },
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"]));
174
+ as: { default: "div" }
175
+ },
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
- as: { type: [String, Object, Function], default: "div" }
156
- },
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"]));
201
+ as: { default: "div" }
202
+ },
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
- as: { type: [String, Object, Function], default: "button" }
181
- },
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"]));
229
+ as: { default: "button" }
230
+ },
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: {},
@@ -205,18 +260,22 @@ const _a = /* @__PURE__ */ m({
205
260
  highContrast: { type: Boolean },
206
261
  disabled: { type: Boolean },
207
262
  asChild: { type: Boolean },
208
- as: { type: [String, Object, Function] }
209
- },
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));
263
+ as: {}
264
+ },
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: {},
@@ -232,28 +292,37 @@ const _a = /* @__PURE__ */ m({
232
292
  size: { default: "2" },
233
293
  disabled: { type: Boolean },
234
294
  asChild: { type: Boolean },
235
- as: { type: [String, Object, Function], default: "button" }
236
- },
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"]));
295
+ as: { default: "button" }
296
+ },
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,57 +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
- __: [0]
315
- }, 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
+ };
316
387
  }
317
- }), to = { class: "ui-DialogScroll" }, oo = ["data-align"], ba = /* @__PURE__ */ m({
318
- 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
+ },
319
395
  __name: "AlertDialogContent",
320
396
  props: {
321
397
  to: {},
@@ -335,8 +411,10 @@ const _a = /* @__PURE__ */ m({
335
411
  as: {}
336
412
  },
337
413
  emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
338
- setup(s, { emit: e }) {
339
- 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, [
340
418
  "to",
341
419
  "align",
342
420
  "class",
@@ -348,49 +426,56 @@ const _a = /* @__PURE__ */ m({
348
426
  "minHeight",
349
427
  "maxHeight"
350
428
  ]);
351
- return (n, i) => (r(), d(a(qe), {
352
- to: t.to
353
- }, {
354
- default: c(() => [
355
- p(a(Ne), { class: "ui-DialogOverlay" }, {
356
- default: c(() => [
357
- b("div", to, [
358
- b("div", {
359
- class: "ui-DialogScrollPadding",
360
- "data-align": t.align
361
- }, [
362
- p(a(Ke), g({
363
- class: ["ui-DialogContent", t.class],
364
- "data-size": t.size
365
- }, {
366
- ...n.$attrs,
367
- ...a(l)
368
- }, {
369
- style: {
370
- width: t.width,
371
- height: t.height,
372
- minWidth: t.minWidth,
373
- maxWidth: t.maxWidth,
374
- minHeight: t.minHeight,
375
- maxHeight: t.maxHeight
376
- }
377
- }), {
378
- default: c(() => [
379
- _(n.$slots, "default")
380
- ]),
381
- _: 3
382
- }, 16, ["class", "data-size", "style"])
383
- ], 8, oo)
384
- ])
385
- ]),
386
- _: 3
387
- })
388
- ]),
389
- _: 3
390
- }, 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
+ };
391
471
  }
392
- }), ao = { class: "ui-DialogScroll" }, so = ["data-align"], $a = /* @__PURE__ */ m({
393
- 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
+ },
394
479
  __name: "DialogContent",
395
480
  props: {
396
481
  to: {},
@@ -410,8 +495,10 @@ const _a = /* @__PURE__ */ m({
410
495
  as: {}
411
496
  },
412
497
  emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
413
- setup(s, { emit: e }) {
414
- 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, [
415
502
  "to",
416
503
  "align",
417
504
  "class",
@@ -423,85 +510,94 @@ const _a = /* @__PURE__ */ m({
423
510
  "minHeight",
424
511
  "maxHeight"
425
512
  ]);
426
- return (n, i) => (r(), d(a(Qe), {
427
- to: t.to
428
- }, {
429
- default: c(() => [
430
- p(a(Ze), { class: "ui-DialogOverlay" }, {
431
- default: c(() => [
432
- b("div", ao, [
433
- b("div", {
434
- class: "ui-DialogScrollPadding",
435
- "data-align": t.align
436
- }, [
437
- p(a(Je), g({
438
- class: ["ui-DialogContent", t.class],
439
- "data-size": t.size
440
- }, {
441
- ...n.$attrs,
442
- ...a(l)
443
- }, {
444
- style: {
445
- width: t.width,
446
- height: t.height,
447
- minWidth: t.minWidth,
448
- maxWidth: t.maxWidth,
449
- minHeight: t.minHeight,
450
- maxHeight: t.maxHeight
451
- }
452
- }), {
453
- default: c(() => [
454
- _(n.$slots, "default")
455
- ]),
456
- _: 3
457
- }, 16, ["class", "data-size", "style"])
458
- ], 8, so)
459
- ])
460
- ]),
461
- _: 3
462
- })
463
- ]),
464
- _: 3
465
- }, 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
+ };
466
555
  }
467
- }), Ba = /* @__PURE__ */ m({
556
+ });
557
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
468
558
  __name: "DialogHead",
469
559
  props: {
470
560
  title: {}
471
561
  },
472
- setup(s) {
473
- const e = s;
474
- return (t, o) => (r(), d(Xt, {
475
- class: "ui-DialogHead",
476
- side: "x"
477
- }, {
478
- default: c(() => [
479
- p(a(Xe), { class: "font-semibold" }, {
480
- default: c(() => [
481
- j(T(e.title), 1)
482
- ]),
483
- _: 1
484
- }),
485
- p(W, {
486
- as: a(Ye),
487
- type: "button",
488
- variant: "ghost",
489
- color: "gray",
490
- radius: "full",
491
- style: { "--button-ghost-padding-x": "var(--space-1)" },
492
- "aria-label": "Close"
493
- }, {
494
- default: c(() => [
495
- p(a(k), { icon: "lucide:x" })
496
- ]),
497
- _: 1
498
- }, 8, ["as"])
499
- ]),
500
- _: 1
501
- }));
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
+ };
502
593
  }
503
- }), lo = { class: "ui-MenuViewport" }, [no, ro] = oe("ui_DropdownMenuContent"), xa = /* @__PURE__ */ m({
504
- 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
+ },
505
601
  __name: "DropdownMenuContent",
506
602
  props: {
507
603
  to: {},
@@ -530,44 +626,53 @@ const _a = /* @__PURE__ */ m({
530
626
  as: {}
531
627
  },
532
628
  emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
533
- setup(s, { emit: e }) {
534
- 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, [
535
633
  "to",
536
634
  "size",
537
635
  "variant",
538
636
  "color",
539
637
  "highContrast"
540
- ]), { forwardRef: n } = F(), { size: i, variant: u, color: y, highContrast: v } = ee(t);
541
- return ro({ size: i, variant: u, color: y, highContrast: v }), (h, f) => (r(), d(a(et), {
542
- to: t.to
543
- }, {
544
- default: c(() => [
545
- p(a(tt), g({
546
- ...h.$attrs,
547
- ...a(l)
548
- }, {
549
- ref: a(n),
550
- class: "ui-PopperContent ui-MenuContent",
551
- "data-accent-color": t.color,
552
- "data-size": t.size
553
- }), {
554
- default: c(() => [
555
- p(Ie, { type: "auto" }, {
556
- default: c(() => [
557
- b("div", lo, [
558
- _(h.$slots, "default")
559
- ])
560
- ]),
561
- _: 3
562
- })
563
- ]),
564
- _: 3
565
- }, 16, ["data-accent-color", "data-size"])
566
- ]),
567
- _: 3
568
- }, 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
+ };
569
672
  }
570
- }), io = ["textContent"], Sa = /* @__PURE__ */ m({
673
+ });
674
+ const _hoisted_1$i = ["textContent"];
675
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
571
676
  __name: "DropdownMenuItem",
572
677
  props: {
573
678
  color: {},
@@ -575,36 +680,41 @@ const _a = /* @__PURE__ */ m({
575
680
  disabled: { type: Boolean },
576
681
  textValue: {},
577
682
  asChild: { type: Boolean },
578
- as: { type: [String, Object, Function] }
683
+ as: {}
579
684
  },
580
685
  emits: ["select"],
581
- setup(s, { emit: e }) {
582
- const t = s, l = q(t, e, ["color", "shortcut"]);
583
- F();
584
- const n = no();
585
- return (i, u) => {
586
- var y;
587
- 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({
588
695
  class: "ui-MenuItem",
589
- "data-accent-color": t.color,
590
- "data-size": a(n).size.value,
591
- "data-variant": a(n).variant.value,
592
- "data-high-contrast": ((y = a(n).highContrast) == null ? void 0 : y.value) || void 0
593
- }, a(l)), {
594
- default: c(() => [
595
- _(i.$slots, "default"),
596
- 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", {
597
704
  key: 0,
598
705
  class: "ui-MenuShortcut",
599
- textContent: T(t.shortcut)
600
- }, null, 8, io)) : z("", !0)
706
+ textContent: toDisplayString(props.shortcut)
707
+ }, null, 8, _hoisted_1$i)) : createCommentVNode("", true)
601
708
  ]),
602
709
  _: 3
603
710
  }, 16, ["data-accent-color", "data-size", "data-variant", "data-high-contrast"]);
604
711
  };
605
712
  }
606
- }), wa = /* @__PURE__ */ m({
607
- inheritAttrs: !1,
713
+ });
714
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
715
+ ...{
716
+ inheritAttrs: false
717
+ },
608
718
  __name: "PopoverContent",
609
719
  props: {
610
720
  to: {},
@@ -630,26 +740,31 @@ const _a = /* @__PURE__ */ m({
630
740
  disableOutsidePointerEvents: { type: Boolean }
631
741
  },
632
742
  emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
633
- setup(s, { emit: e }) {
634
- const t = s, l = q(t, e, ["to", "size"]);
635
- return (n, i) => (r(), d(a(at), {
636
- to: t.to
637
- }, {
638
- default: c(() => [
639
- p(a(st), g({ ...n.$attrs, ...a(l) }, {
640
- "data-size": t.size,
641
- class: "ui-PopoverContent"
642
- }), {
643
- default: c(() => [
644
- _(n.$slots, "default")
645
- ]),
646
- _: 3
647
- }, 16, ["data-size"])
648
- ]),
649
- _: 3
650
- }, 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
+ };
651
765
  }
652
- }), za = /* @__PURE__ */ m({
766
+ });
767
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
653
768
  __name: "Switch",
654
769
  props: {
655
770
  color: {},
@@ -668,26 +783,31 @@ const _a = /* @__PURE__ */ m({
668
783
  required: { type: Boolean }
669
784
  },
670
785
  emits: ["update:modelValue"],
671
- setup(s, { emit: e }) {
672
- 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, [
673
790
  "color",
674
791
  "size",
675
792
  "variant",
676
793
  "highContrast",
677
794
  "radius"
678
795
  ]);
679
- return (i, u) => (r(), d(a(lt), g(a(l), {
680
- class: ["ui-Switch", a(n)],
681
- "data-accent-color": o.color,
682
- "data-radius": o.radius
683
- }), {
684
- default: c(() => [
685
- p(a(nt), { class: "ui-SwitchThumb" })
686
- ]),
687
- _: 1
688
- }, 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
+ };
689
808
  }
690
- }), co = {
809
+ });
810
+ const _hoisted_1$h = {
691
811
  key: 0,
692
812
  xmlns: "http://www.w3.org/2000/svg",
693
813
  viewBox: "0 0 24 24",
@@ -696,13 +816,16 @@ const _a = /* @__PURE__ */ m({
696
816
  "stroke-width": "4",
697
817
  "stroke-linecap": "round",
698
818
  "stroke-linejoin": "round"
699
- }, uo = {
819
+ };
820
+ const _hoisted_2$7 = {
700
821
  key: 0,
701
822
  d: "M5 12h14"
702
- }, po = {
823
+ };
824
+ const _hoisted_3$4 = {
703
825
  key: 1,
704
826
  d: "M20 6 9 17l-5-5"
705
- }, ke = /* @__PURE__ */ m({
827
+ };
828
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
706
829
  __name: "Checkbox",
707
830
  props: {
708
831
  color: {},
@@ -720,85 +843,126 @@ const _a = /* @__PURE__ */ m({
720
843
  required: { type: Boolean }
721
844
  },
722
845
  emits: ["update:modelValue"],
723
- setup(s, { emit: e }) {
724
- const t = e, o = s, [l, n] = N(o, t, ["color", "size", "variant", "highContrast"]);
725
- return (i, u) => (r(), d(a(rt), g(a(l), {
726
- class: ["ui-Checkbox", a(n)],
727
- "data-accent-color": o.color
728
- }), {
729
- default: c(() => [
730
- p(a(it), {
731
- class: "ui-CheckboxIndicator",
732
- "as-child": ""
733
- }, {
734
- default: c(() => [
735
- o.modelValue !== !1 ? (r(), $("svg", co, [
736
- o.modelValue === "indeterminate" ? (r(), $("path", uo)) : (r(), $("path", po))
737
- ])) : z("", !0)
738
- ]),
739
- _: 1
740
- })
741
- ]),
742
- _: 1
743
- }, 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
+ };
744
871
  }
745
- }), [Ve, fo] = oe("ui_CheckboxGroupRoot"), Ia = /* @__PURE__ */ m({
872
+ });
873
+ const [injectCheckboxGroupRootContext, provideCheckboxGroupRootContext] = createContext("ui_CheckboxGroupRoot");
874
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
746
875
  __name: "CheckboxGroupRoot",
747
- props: /* @__PURE__ */ Q({
876
+ props: /* @__PURE__ */ mergeModels({
748
877
  disabled: { type: Boolean },
749
878
  name: {},
750
879
  asChild: { type: Boolean },
751
- as: { type: [String, Object, Function] }
880
+ as: {}
752
881
  }, {
753
- modelValue: {
882
+ "modelValue": {
754
883
  default: []
755
884
  },
756
- modelModifiers: {}
885
+ "modelModifiers": {}
757
886
  }),
758
887
  emits: ["update:modelValue"],
759
- setup(s) {
760
- const e = s, { disabled: t, name: o } = ee(e), l = P([]), [n, i] = Z(s, "modelValue", {
761
- set(h) {
762
- 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);
763
923
  }
764
- }), u = C(() => n.value || []), y = C(() => {
765
- var h, f;
766
- 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;
767
- }), v = (h) => {
768
- var B, A;
769
- const f = (B = n.value) == null ? void 0 : B.indexOf(h);
770
- f !== -1 && f !== void 0 && ((A = n.value) == null || A.splice(f, 1));
771
- };
772
- return fo({
773
- selected: u,
774
- checked: y,
775
- addModelValue: (h) => {
776
- var f, B;
777
- ((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
+ }
778
933
  },
779
- removeModelValue: v,
780
- toggleModelValue: (h) => {
781
- 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
+ }
782
941
  },
783
- initAllValue: (h) => {
784
- l.value.push(h);
942
+ initAllValue: (value) => {
943
+ allValues.value.push(value);
785
944
  },
786
- removeAllValue: (h) => {
787
- 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);
788
948
  },
789
- disabled: t,
790
- name: o == null ? void 0 : o.value
791
- }), (h, f) => (r(), d(a(U), {
792
- as: e.as,
793
- "as-child": e.asChild
794
- }, {
795
- default: c(() => [
796
- _(h.$slots, "default")
797
- ]),
798
- _: 3
799
- }, 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
+ };
800
963
  }
801
- }), ka = /* @__PURE__ */ m({
964
+ });
965
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
802
966
  __name: "CheckboxGroupItem",
803
967
  props: {
804
968
  value: {},
@@ -811,31 +975,46 @@ const _a = /* @__PURE__ */ m({
811
975
  disabled: { type: Boolean },
812
976
  id: {},
813
977
  asChild: { type: Boolean },
814
- as: { type: [String, Object, Function] },
978
+ as: {},
815
979
  name: {},
816
980
  required: { type: Boolean }
817
981
  },
818
- setup(s) {
819
- const e = s, t = V(e);
820
- F();
821
- const o = Ve(), l = C(() => {
822
- var u;
823
- return ((u = o.disabled) == null ? void 0 : u.value) || e.disabled;
824
- }), n = C(() => o.selected.value.indexOf(e.value) !== -1), i = (u) => {
825
- u ? o.addModelValue(e.value) : o.removeModelValue(e.value);
826
- };
827
- return ue(() => {
828
- o.initAllValue(e.value);
829
- }), Ce(() => {
830
- o.removeAllValue(e.value);
831
- }), (u, y) => (r(), d(ke, g({
832
- ...a(t),
833
- name: e.name || a(o).name,
834
- modelValue: n.value,
835
- disabled: l.value
836
- }, { "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
+ };
837
1015
  }
838
- }), Va = /* @__PURE__ */ m({
1016
+ });
1017
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
839
1018
  __name: "CheckboxGroupControl",
840
1019
  props: {
841
1020
  color: {},
@@ -848,27 +1027,33 @@ const _a = /* @__PURE__ */ m({
848
1027
  value: {},
849
1028
  id: {},
850
1029
  asChild: { type: Boolean },
851
- as: { type: [String, Object, Function] },
1030
+ as: {},
852
1031
  name: {},
853
1032
  required: { type: Boolean }
854
1033
  },
855
- setup(s) {
856
- const e = s, t = V(e);
857
- F();
858
- const o = Ve(), l = C(() => {
859
- var i;
860
- return ((i = o.disabled) == null ? void 0 : i.value) || e.disabled;
861
- }), n = (i) => {
862
- o.toggleModelValue(i);
863
- };
864
- return (i, u) => (r(), d(ke, g({
865
- ...a(t),
866
- name: e.name || a(o).name,
867
- modelValue: a(o).checked.value,
868
- disabled: l.value
869
- }, { "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
+ };
870
1054
  }
871
- }), Ta = /* @__PURE__ */ m({
1055
+ });
1056
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
872
1057
  __name: "Toggle",
873
1058
  props: {
874
1059
  color: {},
@@ -885,26 +1070,31 @@ const _a = /* @__PURE__ */ m({
885
1070
  required: { type: Boolean }
886
1071
  },
887
1072
  emits: ["update:modelValue"],
888
- setup(s, { emit: e }) {
889
- 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, [
890
1077
  "color",
891
1078
  "size",
892
1079
  "variant",
893
1080
  "highContrast",
894
1081
  "radius"
895
1082
  ]);
896
- return (i, u) => (r(), d(a(ct), g(a(l), {
897
- class: ["ui-Toggle", a(n)],
898
- "data-accent-color": o.color,
899
- "data-radius": o.radius
900
- }), {
901
- default: c(() => [
902
- _(i.$slots, "default")
903
- ]),
904
- _: 3
905
- }, 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
+ };
906
1095
  }
907
- }), Aa = /* @__PURE__ */ m({
1096
+ });
1097
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
908
1098
  __name: "ToggleGroupRoot",
909
1099
  props: {
910
1100
  color: {},
@@ -926,54 +1116,69 @@ const _a = /* @__PURE__ */ m({
926
1116
  defaultValue: {}
927
1117
  },
928
1118
  emits: ["update:modelValue"],
929
- setup(s, { emit: e }) {
930
- 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, [
931
1123
  "color",
932
1124
  "size",
933
1125
  "variant",
934
1126
  "highContrast",
935
1127
  "radius"
936
1128
  ]);
937
- return (i, u) => (r(), d(a(ut), g(a(l), {
938
- class: ["ui-ToggleGroupRoot", a(n)],
939
- "data-accent-color": o.color,
940
- "data-radius": o.radius
941
- }), {
942
- default: c(() => [
943
- _(i.$slots, "default")
944
- ]),
945
- _: 3
946
- }, 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
+ };
947
1141
  }
948
- }), Ra = /* @__PURE__ */ m({
1142
+ });
1143
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
949
1144
  __name: "ToggleGroupItem",
950
1145
  props: {
951
1146
  value: {},
952
1147
  disabled: { type: Boolean },
953
1148
  asChild: { type: Boolean },
954
- as: { type: [String, Object, Function] }
955
- },
956
- setup(s) {
957
- const t = V(s);
958
- return (o, l) => (r(), d(a(dt), g(a(t), { class: "ui-ToggleGroupItem" }), {
959
- default: c(() => [
960
- _(o.$slots, "default")
961
- ]),
962
- _: 3
963
- }, 16));
1149
+ as: {}
1150
+ },
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
+ };
964
1162
  }
965
- }), 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 = {
966
1167
  key: 0,
967
1168
  class: "ui-TextFieldSlot",
968
1169
  "data-side": "left"
969
- }, _o = {
1170
+ };
1171
+ const _hoisted_4$1 = {
970
1172
  key: 1,
971
1173
  class: "ui-TextFieldSlot",
972
1174
  "data-side": "right"
973
- }, ae = /* @__PURE__ */ m({
974
- inheritAttrs: !1,
1175
+ };
1176
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
1177
+ ...{
1178
+ inheritAttrs: false
1179
+ },
975
1180
  __name: "TextField",
976
- props: /* @__PURE__ */ Q({
1181
+ props: /* @__PURE__ */ mergeModels({
977
1182
  id: {},
978
1183
  class: {},
979
1184
  size: { default: "2" },
@@ -982,57 +1187,78 @@ const _a = /* @__PURE__ */ m({
982
1187
  radius: {},
983
1188
  type: { default: "text" }
984
1189
  }, {
985
- modelValue: {
1190
+ "modelValue": {
986
1191
  default: ""
987
1192
  },
988
- modelModifiers: {}
1193
+ "modelModifiers": {}
989
1194
  }),
990
1195
  emits: ["update:modelValue"],
991
- setup(s) {
992
- const e = s, t = P(), o = (u) => {
993
- const y = u.target;
994
- if (y.closest("input, button, a")) return;
995
- const v = t.value;
996
- if (!v) return;
997
- 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;
998
1206
  requestAnimationFrame(() => {
999
- v.setSelectionRange(f, f), v.focus();
1207
+ input.setSelectionRange(cursorPosition, cursorPosition);
1208
+ input.focus();
1000
1209
  });
1001
- }, [l, n] = Z(s, "modelValue", {
1002
- set(u) {
1003
- 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;
1220
+ }
1221
+ });
1222
+ const resetClass = computed(() => {
1223
+ const rv = extractClass(props, ["size", "variant"]);
1224
+ if (props.class) {
1225
+ rv.push(props.class);
1004
1226
  }
1005
- }), i = C(() => {
1006
- const u = R(e, ["size", "variant"]);
1007
- return e.class && u.push(e.class), u;
1227
+ return rv;
1008
1228
  });
1009
- return (u, y) => (r(), $("div", {
1010
- class: I(["ui-TextField", i.value]),
1011
- "data-radius": e.radius,
1012
- "data-accent-color": e.color,
1013
- onPointerdown: o
1014
- }, [
1015
- te(b("input", g({
1016
- id: e.id,
1017
- ref_key: "inputRef",
1018
- ref: t,
1019
- "onUpdate:modelValue": y[0] || (y[0] = (v) => be(l) ? l.value = v : null),
1020
- type: e.type
1021
- }, u.$attrs, { class: "ui-TextFieldInput" }), null, 16, ho), [
1022
- [De, a(l)]
1023
- ]),
1024
- u.$slots.left ? (r(), $("div", vo, [
1025
- _(u.$slots, "left")
1026
- ])) : z("", !0),
1027
- u.$slots.right ? (r(), $("div", _o, [
1028
- _(u.$slots, "right")
1029
- ])) : z("", !0)
1030
- ], 42, mo));
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
+ };
1031
1253
  }
1032
- }), go = ["data-accent-color"], Pa = /* @__PURE__ */ m({
1033
- inheritAttrs: !1,
1254
+ });
1255
+ const _hoisted_1$f = ["data-accent-color"];
1256
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
1257
+ ...{
1258
+ inheritAttrs: false
1259
+ },
1034
1260
  __name: "TextArea",
1035
- props: /* @__PURE__ */ Q({
1261
+ props: /* @__PURE__ */ mergeModels({
1036
1262
  class: {},
1037
1263
  size: { default: "2" },
1038
1264
  variant: { default: "surface" },
@@ -1040,60 +1266,78 @@ const _a = /* @__PURE__ */ m({
1040
1266
  color: {},
1041
1267
  radius: {}
1042
1268
  }, {
1043
- modelValue: {
1269
+ "modelValue": {
1044
1270
  default: ""
1045
1271
  },
1046
- modelModifiers: {}
1272
+ "modelModifiers": {}
1047
1273
  }),
1048
1274
  emits: ["update:modelValue"],
1049
- setup(s) {
1050
- const e = s, t = Z(s, "modelValue"), o = C(() => {
1051
- const l = R(e, ["size", "variant", "resize"]);
1052
- 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;
1053
1284
  });
1054
- return (l, n) => (r(), $("div", {
1055
- class: I(["ui-TextArea", o.value]),
1056
- "data-accent-color": e.color
1057
- }, [
1058
- te(b("textarea", g({
1059
- "onUpdate:modelValue": n[0] || (n[0] = (i) => t.value = i)
1060
- }, l.$attrs, { class: "ui-TextAreaInput" }), null, 16), [
1061
- [$e, t.value]
1062
- ])
1063
- ], 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
+ };
1064
1297
  }
1065
- }), yo = ["data-radius"], Co = ["id"], Oa = /* @__PURE__ */ m({
1298
+ });
1299
+ const _hoisted_1$e = ["data-radius"];
1300
+ const _hoisted_2$5 = ["id"];
1301
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
1066
1302
  __name: "ColorField",
1067
- props: /* @__PURE__ */ Q({
1303
+ props: /* @__PURE__ */ mergeModels({
1068
1304
  id: {},
1069
1305
  variant: { default: "solid" },
1070
1306
  size: { default: "2" },
1071
1307
  radius: {}
1072
1308
  }, {
1073
- modelValue: {
1309
+ "modelValue": {
1074
1310
  default: "#000000"
1075
1311
  },
1076
- modelModifiers: {}
1312
+ "modelModifiers": {}
1077
1313
  }),
1078
1314
  emits: ["update:modelValue"],
1079
- setup(s) {
1080
- const e = s, t = Z(s, "modelValue"), o = C(() => R(e, ["size", "variant"]));
1081
- return (l, n) => (r(), $("div", {
1082
- class: I(["ui-ColorField", o.value]),
1083
- "data-radius": e.radius,
1084
- style: Be({ "--color-field-border-color": t.value })
1085
- }, [
1086
- te(b("input", {
1087
- id: e.id,
1088
- "onUpdate:modelValue": n[0] || (n[0] = (i) => t.value = i),
1089
- class: "ui-ColorFieldInput",
1090
- type: "color"
1091
- }, null, 8, Co), [
1092
- [$e, t.value]
1093
- ])
1094
- ], 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
+ };
1095
1337
  }
1096
- }), [Te, bo] = oe("ui_SelectRoot"), Da = /* @__PURE__ */ m({
1338
+ });
1339
+ const [injectSelectRootContext, provideSelectRootContext] = createContext("ui_SelectRoot");
1340
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
1097
1341
  __name: "SelectRoot",
1098
1342
  props: {
1099
1343
  size: { default: "2" },
@@ -1112,21 +1356,30 @@ const _a = /* @__PURE__ */ m({
1112
1356
  required: { type: Boolean }
1113
1357
  },
1114
1358
  emits: ["update:modelValue", "update:open"],
1115
- setup(s, { emit: e }) {
1116
- const t = s, o = e, { size: l, color: n, highContrast: i } = ee(t), u = q(t, o, ["size", "color", "highContrast"]);
1117
- return bo({
1118
- size: l,
1119
- color: n,
1120
- highContrast: i
1121
- }), (y, v) => (r(), d(a(pt), Fe(Me(a(u))), {
1122
- default: c(() => [
1123
- _(y.$slots, "default")
1124
- ]),
1125
- _: 3
1126
- }, 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
+ };
1127
1377
  }
1128
- }), Fa = /* @__PURE__ */ m({
1129
- inheritAttrs: !1,
1378
+ });
1379
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
1380
+ ...{
1381
+ inheritAttrs: false
1382
+ },
1130
1383
  __name: "SelectContent",
1131
1384
  props: {
1132
1385
  to: {},
@@ -1152,67 +1405,81 @@ const _a = /* @__PURE__ */ m({
1152
1405
  asChild: { type: Boolean },
1153
1406
  as: {}
1154
1407
  },
1155
- setup(s) {
1156
- const e = s, t = V(e), { forwardRef: o } = F(), l = Te(), n = C(() => {
1157
- const i = ["r-size-" + l.size.value, "r-variant-" + e.variant];
1158
- 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;
1159
1422
  });
1160
- return (i, u) => (r(), d(a(ft), {
1161
- to: e.to
1162
- }, {
1163
- default: c(() => [
1164
- p(a(mt), g({ ref: a(o) }, {
1165
- ...i.$attrs,
1166
- ...a(t),
1167
- to: void 0,
1168
- variant: void 0
1169
- }, {
1170
- class: ["ui-SelectContent", n.value],
1171
- "data-accent-color": a(l).color.value
1172
- }), {
1173
- default: c(() => [
1174
- p(a(de), {
1175
- type: "auto",
1176
- class: "ui-ScrollArea"
1177
- }, {
1178
- default: c(() => [
1179
- p(a(ht), {
1180
- class: "ui-SelectViewport",
1181
- "as-child": ""
1182
- }, {
1183
- default: c(() => [
1184
- p(a(pe), { class: "ui-ScrollAreaViewport" }, {
1185
- default: c(() => [
1186
- _(i.$slots, "default")
1187
- ]),
1188
- _: 3
1189
- }),
1190
- u[0] || (u[0] = b("div", { class: "ui-ScrollAreaViewportFocusRing" }, null, -1)),
1191
- p(a(ne), {
1192
- class: "ui-ScrollAreaScrollbar",
1193
- "data-size": 1,
1194
- orientation: "vertical"
1195
- }, {
1196
- default: c(() => [
1197
- p(a(re), { class: "ui-ScrollAreaThumb" })
1198
- ]),
1199
- _: 1
1200
- })
1201
- ]),
1202
- _: 3,
1203
- __: [0]
1204
- })
1205
- ]),
1206
- _: 3
1207
- })
1208
- ]),
1209
- _: 3
1210
- }, 16, ["class", "data-accent-color"])
1211
- ]),
1212
- _: 3
1213
- }, 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
+ };
1214
1479
  }
1215
- }), $o = { class: "ui-SelectTriggerInner" }, Ma = /* @__PURE__ */ m({
1480
+ });
1481
+ const _hoisted_1$d = { class: "ui-SelectTriggerInner" };
1482
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
1216
1483
  __name: "SelectTrigger",
1217
1484
  props: {
1218
1485
  variant: { default: "surface" },
@@ -1223,104 +1490,126 @@ const _a = /* @__PURE__ */ m({
1223
1490
  asChild: { type: Boolean },
1224
1491
  as: {}
1225
1492
  },
1226
- setup(s) {
1227
- const e = s, t = Te(), o = C(() => [`r-variant-${e.variant}`, `r-size-${t.size.value}`]);
1228
- return (l, n) => (r(), d(a(vt), {
1229
- class: I(["ui-SelectTrigger", o.value]),
1230
- disabled: e.disabled,
1231
- "data-accent-color": a(t).color.value,
1232
- "data-radius": e.radius
1233
- }, {
1234
- default: c(() => [
1235
- b("span", $o, [
1236
- p(a(_t), {
1237
- placeholder: e.placeholder
1238
- }, {
1239
- default: c(({ selectedLabel: i, modelValue: u }) => [
1240
- i.length ? _(l.$slots, "default", {
1241
- key: 0,
1242
- selectedLabel: i,
1243
- modelValue: u
1244
- }, () => [
1245
- j(T(i.join(", ")), 1)
1246
- ]) : (r(), $(G, { key: 1 }, [
1247
- j(T(e.placeholder), 1)
1248
- ], 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
+ })
1249
1531
  ]),
1250
- _: 3
1251
- }, 8, ["placeholder"])
1532
+ _: 1
1533
+ })
1252
1534
  ]),
1253
- p(a(gt), { "as-child": "" }, {
1254
- default: c(() => [
1255
- p(a(k), {
1256
- class: "ui-SelectIcon",
1257
- icon: "radix-icons:chevron-down"
1258
- })
1259
- ]),
1260
- _: 1
1261
- })
1262
- ]),
1263
- _: 3
1264
- }, 8, ["class", "disabled", "data-accent-color", "data-radius"]));
1535
+ _: 3
1536
+ }, 8, ["class", "disabled", "data-accent-color", "data-radius"]);
1537
+ };
1265
1538
  }
1266
- }), ja = /* @__PURE__ */ m({
1539
+ });
1540
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
1267
1541
  __name: "SelectItem",
1268
1542
  props: {
1269
1543
  value: {},
1270
1544
  disabled: { type: Boolean },
1271
1545
  textValue: {},
1272
1546
  asChild: { type: Boolean },
1273
- as: { type: [String, Object, Function] }
1274
- },
1275
- setup(s) {
1276
- const t = V(s);
1277
- return F(), (o, l) => (r(), d(a(yt), g({ class: "ui-SelectItem" }, a(t)), {
1278
- default: c(() => [
1279
- p(a(Ct), { class: "ui-SelectItemIndicator" }, {
1280
- default: c(() => [
1281
- p(a(k), { icon: "radix-icons:check" })
1282
- ]),
1283
- _: 1
1284
- }),
1285
- p(a(bt), null, {
1286
- default: c(() => [
1287
- _(o.$slots, "default")
1288
- ]),
1289
- _: 3
1290
- })
1291
- ]),
1292
- _: 3
1293
- }, 16));
1294
- }
1295
- }), La = /* @__PURE__ */ m({
1547
+ as: {}
1548
+ },
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
+ };
1572
+ }
1573
+ });
1574
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1296
1575
  __name: "SelectLabel",
1297
1576
  props: {
1298
1577
  for: {},
1299
1578
  asChild: { type: Boolean },
1300
- as: { type: [String, Object, Function] }
1301
- },
1302
- setup(s) {
1303
- const t = V(s);
1304
- return F(), (o, l) => (r(), d(a($t), g({ class: "ui-SelectLabel" }, a(t)), {
1305
- default: c(() => [
1306
- _(o.$slots, "default")
1307
- ]),
1308
- _: 3
1309
- }, 16));
1579
+ as: {}
1580
+ },
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
+ };
1310
1593
  }
1311
- }), Bo = (s, e) => {
1312
- const t = s.__vccOpts || s;
1313
- for (const [o, l] of e)
1314
- t[o] = l;
1315
- return t;
1316
- }, xo = {}, So = {
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 = {
1317
1604
  class: "ui-SelectSeparator",
1318
1605
  "aria-hidden": "true"
1319
1606
  };
1320
- function wo(s, e) {
1321
- return r(), $("div", So);
1607
+ function _sfc_render(_ctx, _cache) {
1608
+ return openBlock(), createElementBlock("div", _hoisted_1$c);
1322
1609
  }
1323
- const Ga = /* @__PURE__ */ Bo(xo, [["render", wo]]), [zo, Io] = oe("ui_ComboboxRoot"), Ha = /* @__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({
1324
1613
  __name: "ComboboxRoot",
1325
1614
  props: {
1326
1615
  size: { default: "2" },
@@ -1333,7 +1622,7 @@ const Ga = /* @__PURE__ */ Bo(xo, [["render", wo]]), [zo, Io] = oe("ui_ComboboxR
1333
1622
  ignoreFilter: { type: Boolean },
1334
1623
  modelValue: {},
1335
1624
  defaultValue: {},
1336
- multiple: { type: Boolean, default: !1 },
1625
+ multiple: { type: Boolean, default: false },
1337
1626
  dir: {},
1338
1627
  disabled: { type: Boolean },
1339
1628
  highlightOnHover: { type: Boolean },
@@ -1344,26 +1633,38 @@ const Ga = /* @__PURE__ */ Bo(xo, [["render", wo]]), [zo, Io] = oe("ui_ComboboxR
1344
1633
  required: { type: Boolean }
1345
1634
  },
1346
1635
  emits: ["update:modelValue", "highlight", "update:open"],
1347
- setup(s, { emit: e }) {
1348
- const t = s, o = e, { size: l, color: n, highContrast: i } = ee(t), [u, y] = N(t, o, ["size", "color", "highContrast"]);
1349
- return Io({
1350
- size: l,
1351
- color: n,
1352
- highContrast: i
1353
- }), (v, h) => (r(), d(a(Bt), g({
1354
- class: ["ui-ComboboxRoot", a(y)]
1355
- }, a(u)), {
1356
- default: c(() => [
1357
- _(v.$slots, "default")
1358
- ]),
1359
- _: 3
1360
- }, 16, ["class"]));
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
+ };
1361
1656
  }
1362
- }), ko = {
1657
+ });
1658
+ const _hoisted_1$b = {
1363
1659
  key: 0,
1364
1660
  class: "ui-ComboboxValues"
1365
- }, Vo = ["aria-current", "value"], To = ["onClick"], Ea = /* @__PURE__ */ m({
1366
- 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
+ },
1367
1668
  __name: "ComboboxInput",
1368
1669
  props: {
1369
1670
  variant: { default: "surface" },
@@ -1377,70 +1678,104 @@ const Ga = /* @__PURE__ */ Bo(xo, [["render", wo]]), [zo, Io] = oe("ui_ComboboxR
1377
1678
  as: {}
1378
1679
  },
1379
1680
  emits: ["update:modelValue"],
1380
- setup(s, { emit: e }) {
1381
- const t = xt(), n = Se(s, e), i = P(-1), u = C(() => t.modelValue.value), y = (f) => typeof f == "object" ? JSON.stringify(f) : f.toString(), v = (f) => {
1382
- i.value = f, t.modelValue.value.splice(f, 1), i.value = -1;
1383
- }, h = (f) => {
1384
- !f.target.value && (f.key === "Delete" || f.key === "Backspace") && (i.value !== -1 ? v(i.value) : (i.value = u.value.length - 1, setTimeout(() => {
1385
- i.value = -1;
1386
- }, 800)));
1387
- };
1388
- return je(u, () => {
1389
- t.filterState.search = "";
1390
- }, { deep: !0 }), (f, B) => (r(), d(a(St), {
1391
- class: I(["ui-ComboboxField", `r-variant-${f.variant}`]),
1392
- "data-radius": f.radius,
1393
- "data-multiple": a(t).multiple.value || void 0
1394
- }, {
1395
- default: c(() => [
1396
- a(t).multiple.value ? (r(), $("div", ko, [
1397
- (r(!0), $(G, null, E(u.value, (A, M) => (r(), $("div", {
1398
- key: y(A),
1399
- class: "ui-ComboboxValuesItem",
1400
- "aria-current": M === i.value,
1401
- value: A
1402
- }, [
1403
- _(f.$slots, "item", { value: A }, () => [
1404
- b("span", null, T(y(A)), 1)
1405
- ]),
1406
- b("button", {
1407
- type: "button",
1408
- tabindex: "-1",
1409
- onClick: O((H) => v(M), ["prevent"])
1410
- }, [
1411
- p(a(k), { icon: "lucide:x" })
1412
- ], 8, To)
1413
- ], 8, Vo))), 128)),
1414
- p(a(ve), g({
1415
- ...f.$attrs,
1416
- ...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),
1417
1760
  variant: void 0,
1418
1761
  radius: void 0
1419
- }, {
1420
- class: "ui-ComboboxInput",
1421
- onKeydown: h
1422
- }), null, 16)
1423
- ])) : (r(), d(a(ve), g({
1424
- key: 1,
1425
- class: "ui-ComboboxInput"
1426
- }, {
1427
- ...f.$attrs,
1428
- ...a(n),
1429
- variant: void 0,
1430
- radius: void 0
1431
- }), null, 16)),
1432
- p(a(wt), { class: "ui-ComboboxTrigger" }, {
1433
- default: c(() => [
1434
- p(a(k), { icon: "radix-icons:chevron-down" })
1435
- ]),
1436
- _: 1
1437
- })
1438
- ]),
1439
- _: 3
1440
- }, 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
+ };
1441
1773
  }
1442
- }), Wa = /* @__PURE__ */ m({
1443
- inheritAttrs: !1,
1774
+ });
1775
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1776
+ ...{
1777
+ inheritAttrs: false
1778
+ },
1444
1779
  __name: "ComboboxContent",
1445
1780
  props: {
1446
1781
  to: {},
@@ -1468,137 +1803,172 @@ const Ga = /* @__PURE__ */ Bo(xo, [["render", wo]]), [zo, Io] = oe("ui_ComboboxR
1468
1803
  disableOutsidePointerEvents: { type: Boolean }
1469
1804
  },
1470
1805
  emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside"],
1471
- setup(s, { emit: e }) {
1472
- const { forwardRef: t } = F(), o = s, n = Se(o, e), i = zo(), u = C(() => {
1473
- const y = ["r-size-" + i.size.value, "r-variant-" + o.variant];
1474
- 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;
1475
1818
  });
1476
- return (y, v) => (r(), d(a(zt), {
1477
- to: o.to
1478
- }, {
1479
- default: c(() => [
1480
- p(a(It), g({ ref: a(t) }, {
1481
- ...y.$attrs,
1482
- ...a(n),
1483
- position: "popper",
1484
- to: void 0,
1485
- variant: void 0
1486
- }, {
1487
- class: ["ui-ComboboxContent", u.value],
1488
- "data-accent-color": a(i).color.value
1489
- }), {
1490
- default: c(() => [
1491
- p(a(de), {
1492
- type: "auto",
1493
- class: "ui-ScrollArea"
1494
- }, {
1495
- default: c(() => [
1496
- p(a(kt), {
1497
- class: "ui-ComboboxViewport",
1498
- "as-child": ""
1499
- }, {
1500
- default: c(() => [
1501
- p(a(pe), { class: "ui-ScrollAreaViewport" }, {
1502
- default: c(() => [
1503
- _(y.$slots, "default")
1504
- ]),
1505
- _: 3
1506
- })
1507
- ]),
1508
- _: 3
1509
- }),
1510
- v[0] || (v[0] = b("div", { class: "ui-ScrollAreaViewportFocusRing" }, null, -1)),
1511
- p(a(ne), {
1512
- class: "ui-ScrollAreaScrollbar",
1513
- "data-size": 1,
1514
- orientation: "vertical"
1515
- }, {
1516
- default: c(() => [
1517
- p(a(re), { class: "ui-ScrollAreaThumb" })
1518
- ]),
1519
- _: 1
1520
- })
1521
- ]),
1522
- _: 3,
1523
- __: [0]
1524
- })
1525
- ]),
1526
- _: 3
1527
- }, 16, ["class", "data-accent-color"])
1528
- ]),
1529
- _: 3
1530
- }, 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
+ };
1531
1876
  }
1532
- }), Ua = /* @__PURE__ */ m({
1877
+ });
1878
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
1533
1879
  __name: "ComboboxItem",
1534
1880
  props: {
1535
1881
  textValue: {},
1536
1882
  value: {},
1537
1883
  disabled: { type: Boolean },
1538
1884
  asChild: { type: Boolean },
1539
- as: { type: [String, Object, Function] }
1540
- },
1541
- setup(s) {
1542
- const t = V(s);
1543
- return (o, l) => (r(), d(a(Vt), g({ class: "ui-ComboboxItem" }, a(t)), {
1544
- default: c(() => [
1545
- p(a(Tt), { class: "ui-ComboboxItemIndicator" }, {
1546
- default: c(() => [
1547
- p(a(k), { icon: "radix-icons:check" })
1548
- ]),
1549
- _: 1
1550
- }),
1551
- _(o.$slots, "default")
1552
- ]),
1553
- _: 3
1554
- }, 16));
1885
+ as: {}
1886
+ },
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
+ };
1555
1904
  }
1556
- }), qa = /* @__PURE__ */ m({
1905
+ });
1906
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1557
1907
  __name: "ComboboxLabel",
1558
1908
  props: {
1559
1909
  for: {},
1560
1910
  asChild: { type: Boolean },
1561
- as: { type: [String, Object, Function] }
1562
- },
1563
- setup(s) {
1564
- const t = V(s);
1565
- return F(), (o, l) => (r(), d(a(At), g({ class: "ui-ComboboxLabel" }, a(t)), {
1566
- default: c(() => [
1567
- _(o.$slots, "default")
1568
- ]),
1569
- _: 3
1570
- }, 16));
1911
+ as: {}
1912
+ },
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
+ };
1571
1925
  }
1572
- }), Ao = ["data-accent-color"], Na = /* @__PURE__ */ m({
1926
+ });
1927
+ const _hoisted_1$a = ["data-accent-color"];
1928
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
1573
1929
  __name: "Radio",
1574
- props: /* @__PURE__ */ Q({
1930
+ props: /* @__PURE__ */ mergeModels({
1575
1931
  color: {},
1576
1932
  size: { default: "2" },
1577
1933
  variant: { default: "surface" },
1578
1934
  highContrast: { type: Boolean }
1579
1935
  }, {
1580
- modelValue: {
1936
+ "modelValue": {
1581
1937
  default: ""
1582
1938
  },
1583
- modelModifiers: {}
1939
+ "modelModifiers": {}
1584
1940
  }),
1585
1941
  emits: ["update:modelValue"],
1586
- setup(s) {
1587
- const e = s, [t, o] = Z(s, "modelValue", {
1588
- set(n) {
1589
- 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;
1590
1953
  }
1591
- }), l = C(() => R(e, ["size", "variant", "highContrast"]));
1592
- return (n, i) => te((r(), $("input", {
1593
- "onUpdate:modelValue": i[0] || (i[0] = (u) => be(t) ? t.value = u : null),
1594
- class: I(["ui-Radio", l.value]),
1595
- type: "radio",
1596
- "data-accent-color": e.color
1597
- }, null, 10, Ao)), [
1598
- [Le, a(t)]
1599
- ]);
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
+ };
1600
1968
  }
1601
- }), [Ae, Ro] = oe("ui_RadioGroupRoot"), Ka = /* @__PURE__ */ m({
1969
+ });
1970
+ const [injectRadioGroupRootContext, provideRadioGroupRootContext] = createContext("ui_RadioGroupRoot");
1971
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
1602
1972
  __name: "RadioGroupRoot",
1603
1973
  props: {
1604
1974
  color: {},
@@ -1617,76 +1987,92 @@ const Ga = /* @__PURE__ */ Bo(xo, [["render", wo]]), [zo, Io] = oe("ui_ComboboxR
1617
1987
  required: { type: Boolean }
1618
1988
  },
1619
1989
  emits: ["update:modelValue"],
1620
- setup(s, { emit: e }) {
1621
- const t = e, o = s, l = q(o, t, ["color", "size", "variant", "highContrast"]), { size: n, variant: i, color: u, highContrast: y } = ee(o);
1622
- return Ro({ size: n, variant: i, color: u, highContrast: y }), (v, h) => (r(), d(a(we), g({ class: "ui-RadioGroupRoot" }, a(l)), {
1623
- default: c(() => [
1624
- _(v.$slots, "default")
1625
- ]),
1626
- _: 3
1627
- }, 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
+ };
1628
2004
  }
1629
- }), Po = { class: "ui-RadioGroupItem" }, Qa = /* @__PURE__ */ m({
2005
+ });
2006
+ const _hoisted_1$9 = { class: "ui-RadioGroupItem" };
2007
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
1630
2008
  __name: "RadioGroupItem",
1631
2009
  props: {
1632
2010
  id: {},
1633
2011
  value: {},
1634
2012
  disabled: { type: Boolean },
1635
2013
  asChild: { type: Boolean },
1636
- as: { type: [String, Object, Function] },
2014
+ as: {},
1637
2015
  name: {},
1638
2016
  required: { type: Boolean }
1639
2017
  },
1640
- setup(s) {
1641
- const t = V(s), o = Ae(), l = C(() => {
1642
- var i;
1643
- const n = [
1644
- `r-size-${o.size.value}`,
1645
- `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}`
1646
2027
  ];
1647
- 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;
1648
2032
  });
1649
- return (n, i) => {
1650
- var u;
1651
- return r(), $("label", Po, [
1652
- p(a(ze), g({
1653
- class: ["ui-Radio", l.value],
1654
- "data-accent-color": (u = a(o).color) == null ? void 0 : u.value
1655
- }, a(t)), null, 16, ["class", "data-accent-color"]),
1656
- _(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")
1657
2041
  ]);
1658
2042
  };
1659
2043
  }
1660
- }), Za = /* @__PURE__ */ m({
2044
+ });
2045
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
1661
2046
  __name: "RadioCardsItem",
1662
2047
  props: {
1663
2048
  id: {},
1664
2049
  value: {},
1665
2050
  disabled: { type: Boolean },
1666
2051
  asChild: { type: Boolean },
1667
- as: { type: [String, Object, Function] },
2052
+ as: {},
1668
2053
  name: {},
1669
2054
  required: { type: Boolean }
1670
2055
  },
1671
- setup(s) {
1672
- const t = V(s);
1673
- F();
1674
- const o = Ae();
1675
- return (l, n) => {
1676
- var i, u;
1677
- 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({
1678
2064
  class: "ui-RadioCardsItem",
1679
- "data-accent-color": (i = a(o).color) == null ? void 0 : i.value,
1680
- "data-size": a(o).size.value,
1681
- "data-variant": a(o).variant.value,
1682
- "data-high-contrast": (u = a(o).highContrast) == null ? void 0 : u.value
1683
- }, { ...a(t), asChild: !1 }), {
1684
- default: c(() => [
1685
- p(Yt, {
1686
- "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
1687
2073
  }, {
1688
- default: c(() => [
1689
- _(l.$slots, "default")
2074
+ default: withCtx(() => [
2075
+ renderSlot(_ctx.$slots, "default")
1690
2076
  ]),
1691
2077
  _: 3
1692
2078
  }, 8, ["as-child"])
@@ -1695,7 +2081,8 @@ const Ga = /* @__PURE__ */ Bo(xo, [["render", wo]]), [zo, Io] = oe("ui_ComboboxR
1695
2081
  }, 16, ["data-accent-color", "data-size", "data-variant", "data-high-contrast"]);
1696
2082
  };
1697
2083
  }
1698
- }), Ja = /* @__PURE__ */ m({
2084
+ });
2085
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
1699
2086
  __name: "RadioTabsList",
1700
2087
  props: {
1701
2088
  size: { default: "2" },
@@ -1711,60 +2098,77 @@ const Ga = /* @__PURE__ */ Bo(xo, [["render", wo]]), [zo, Io] = oe("ui_ComboboxR
1711
2098
  required: { type: Boolean }
1712
2099
  },
1713
2100
  emits: ["update:modelValue"],
1714
- setup(s, { emit: e }) {
1715
- const t = e, o = s, [l, n] = N(o, t, ["size"]);
1716
- return (i, u) => (r(), d(a(we), g(a(l), {
1717
- class: ["ui-RadioTabsList", a(n)]
1718
- }), {
1719
- default: c(() => [
1720
- _(i.$slots, "default")
1721
- ]),
1722
- _: 3
1723
- }, 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
+ };
1724
2115
  }
1725
- }), Xa = /* @__PURE__ */ m({
2116
+ });
2117
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
1726
2118
  __name: "TabsList",
1727
2119
  props: {
1728
2120
  size: { default: "2" },
1729
2121
  color: {},
1730
2122
  highContrast: { type: Boolean }
1731
2123
  },
1732
- setup(s) {
1733
- const e = s, t = C(() => R(e, ["size", "highContrast"]));
1734
- return (o, l) => (r(), d(a(Rt), {
1735
- class: I(["ui-TabList", t.value]),
1736
- "data-accent-color": e.color
1737
- }, {
1738
- default: c(() => [
1739
- p(a(Pt), { class: "ui-TabsIndicator" }),
1740
- _(o.$slots, "default")
1741
- ]),
1742
- _: 3
1743
- }, 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
+ };
1744
2141
  }
1745
- }), Oo = { class: "ui-TabTriggerInner" }, Do = { 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({
1746
2146
  __name: "TabsTrigger",
1747
2147
  props: {
1748
2148
  value: {},
1749
2149
  disabled: { type: Boolean },
1750
2150
  asChild: { type: Boolean },
1751
- as: { type: [String, Object, Function] }
1752
- },
1753
- setup(s) {
1754
- const t = V(s);
1755
- return (o, l) => (r(), d(a(Ot), g(a(t), { class: "ui-TabTrigger" }), {
1756
- default: c(() => [
1757
- b("span", Oo, [
1758
- _(o.$slots, "default")
2151
+ as: {}
2152
+ },
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
+ ])
1759
2165
  ]),
1760
- b("span", Do, [
1761
- _(o.$slots, "default")
1762
- ])
1763
- ]),
1764
- _: 3
1765
- }, 16));
2166
+ _: 3
2167
+ }, 16);
2168
+ };
1766
2169
  }
1767
- }), es = /* @__PURE__ */ m({
2170
+ });
2171
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
1768
2172
  __name: "AccordionRoot",
1769
2173
  props: {
1770
2174
  size: { default: "1" },
@@ -1780,131 +2184,164 @@ const Ga = /* @__PURE__ */ Bo(xo, [["render", wo]]), [zo, Io] = oe("ui_ComboboxR
1780
2184
  defaultValue: {}
1781
2185
  },
1782
2186
  emits: ["update:modelValue"],
1783
- setup(s, { emit: e }) {
1784
- const t = s, o = e, [l, n] = N(t, o, ["size"]);
1785
- return (i, u) => (r(), d(a(Dt), g(a(l), {
1786
- class: ["ui-AccordionRoot", a(n)]
1787
- }), {
1788
- default: c(() => [
1789
- _(i.$slots, "default")
1790
- ]),
1791
- _: 3
1792
- }, 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
+ };
1793
2201
  }
1794
- }), ts = /* @__PURE__ */ m({
2202
+ });
2203
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
1795
2204
  __name: "AccordionItem",
1796
2205
  props: {
1797
2206
  disabled: { type: Boolean },
1798
2207
  value: {},
1799
2208
  unmountOnHide: { type: Boolean },
1800
2209
  asChild: { type: Boolean },
1801
- as: { type: [String, Object, Function] }
1802
- },
1803
- setup(s) {
1804
- const t = V(s);
1805
- return (o, l) => (r(), d(a(Ft), g(a(t), { class: "ui-AccordionItem" }), {
1806
- default: c(() => [
1807
- _(o.$slots, "default")
1808
- ]),
1809
- _: 3
1810
- }, 16));
2210
+ as: {}
2211
+ },
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
+ };
1811
2223
  }
1812
- }), os = /* @__PURE__ */ m({
1813
- inheritAttrs: !1,
2224
+ });
2225
+ const _sfc_main$f = /* @__PURE__ */ defineComponent({
2226
+ ...{
2227
+ inheritAttrs: false
2228
+ },
1814
2229
  __name: "AccordionContent",
1815
2230
  props: {
1816
2231
  forceMount: { type: Boolean },
1817
2232
  asChild: { type: Boolean },
1818
- as: { type: [String, Object, Function] }
1819
- },
1820
- setup(s) {
1821
- const t = V(s);
1822
- return (o, l) => (r(), d(a(Mt), g(a(t), { class: "ui-AccordionContent" }), {
1823
- default: c(() => [
1824
- b("div", g({ class: "ui-AccordionContentInner" }, o.$attrs), [
1825
- _(o.$slots, "default")
1826
- ], 16)
1827
- ]),
1828
- _: 3
1829
- }, 16));
2233
+ as: {}
2234
+ },
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
+ };
1830
2248
  }
1831
- }), Fo = ["data-accent-color"], Mo = /* @__PURE__ */ m({
2249
+ });
2250
+ const _hoisted_1$7 = ["data-accent-color"];
2251
+ const _sfc_main$e = /* @__PURE__ */ defineComponent({
1832
2252
  __name: "PlusMinusIcon",
1833
2253
  props: {
1834
2254
  color: { default: void 0 },
1835
2255
  size: { default: "1" }
1836
2256
  },
1837
- setup(s) {
1838
- const e = s;
1839
- return (t, o) => (r(), $("div", {
1840
- class: I(["ui-PlusMinusIcon", `r-size-${e.size}`]),
1841
- "data-accent-color": e.color
1842
- }, o[0] || (o[0] = [
1843
- b("div", { class: "ui-PlusMinusIcon-1" }, null, -1),
1844
- b("div", { class: "ui-PlusMinusIcon-2" }, null, -1)
1845
- ]), 10, Fo));
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
+ };
1846
2268
  }
1847
- }), jo = /* @__PURE__ */ m({
2269
+ });
2270
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
1848
2271
  __name: "ChevronIcon",
1849
2272
  props: {
1850
2273
  arrowTransform: { default: "right-down" }
1851
2274
  },
1852
- setup(s) {
1853
- return (e, t) => (r(), d(a(k), {
1854
- class: "ui-ChevronIcon",
1855
- icon: "lucide:chevron-right",
1856
- "data-arrow-transform": e.arrowTransform
1857
- }, 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
+ };
1858
2283
  }
1859
- }), Lo = { class: "ui-AccordionTriggerText" }, as = /* @__PURE__ */ m({
2284
+ });
2285
+ const _hoisted_1$6 = { class: "ui-AccordionTriggerText" };
2286
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
1860
2287
  __name: "AccordionTrigger",
1861
2288
  props: {
1862
2289
  indicator: { default: "chevron" },
1863
2290
  asChild: { type: Boolean },
1864
2291
  as: {}
1865
2292
  },
1866
- setup(s) {
1867
- const e = s, [t, o] = Qt(e, ["size"]);
1868
- return (l, n) => (r(), d(a(jt), g({
1869
- class: ["ui-AccordionTrigger", a(o)]
1870
- }, a(t)), {
1871
- default: c(() => [
1872
- b("div", Lo, [
1873
- _(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)
1874
2311
  ]),
1875
- e.indicator === "plus-minus" ? (r(), d(Mo, {
1876
- key: 0,
1877
- class: "ui-AccordionTriggerIcon"
1878
- })) : e.indicator === "chevron" ? (r(), d(jo, {
1879
- key: 1,
1880
- "arrow-transform": "down-up"
1881
- })) : z("", !0)
1882
- ]),
1883
- _: 3
1884
- }, 16, ["class"]));
2312
+ _: 3
2313
+ }, 16, ["class"]);
2314
+ };
1885
2315
  }
1886
- }), ss = /* @__PURE__ */ m({
1887
- inheritAttrs: !1,
2316
+ });
2317
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2318
+ ...{
2319
+ inheritAttrs: false
2320
+ },
1888
2321
  __name: "CollapsibleContent",
1889
2322
  props: {
1890
2323
  forceMount: { type: Boolean },
1891
2324
  asChild: { type: Boolean },
1892
- as: { type: [String, Object, Function] }
1893
- },
1894
- setup(s) {
1895
- const t = V(s);
1896
- return (o, l) => (r(), d(a(Lt), g(a(t), { class: "ui-CollapsibleContent" }), {
1897
- default: c(() => [
1898
- b("div", g({ class: "ui-CollapsibleContentInner" }, o.$attrs), [
1899
- _(o.$slots, "default")
1900
- ], 16)
1901
- ]),
1902
- _: 3
1903
- }, 16));
2325
+ as: {}
2326
+ },
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
+ };
1904
2340
  }
1905
- }), Go = /* @__PURE__ */ m({
2341
+ });
2342
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
1906
2343
  __name: "Pagination",
1907
- props: /* @__PURE__ */ Q({
2344
+ props: /* @__PURE__ */ mergeModels({
1908
2345
  total: {},
1909
2346
  perpage: { default: 10 },
1910
2347
  edge: { default: 2 },
@@ -1917,160 +2354,195 @@ const Ga = /* @__PURE__ */ Bo(xo, [["render", wo]]), [zo, Io] = oe("ui_ComboboxR
1917
2354
  asChild: { type: Boolean },
1918
2355
  as: {}
1919
2356
  }, {
1920
- page: { required: !0 },
1921
- pageModifiers: {}
2357
+ "page": { required: true },
2358
+ "pageModifiers": {}
1922
2359
  }),
1923
2360
  emits: ["update:page"],
1924
- setup(s) {
1925
- const e = s, t = Z(s, "page"), o = C(() => R(e, ["size", "variant"])), l = C(() => ({
1926
- color: e.color,
1927
- radius: e.radius,
1928
- variant: e.variant,
1929
- size: e.size,
1930
- highContrast: e.highContrast,
1931
- disabled: e.disabled
1932
- })), n = C(() => {
1933
- 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, M = v > B && t.value + e.edge + 2 < v, H = [];
1934
- let K = 2, J = v - 1;
1935
- A && !M ? K = Math.max(4, v - 2 * e.edge - 2) : !A && M ? J = Math.min(2 * e.edge + 3, v - 1) : A && M && (K = t.value - e.edge, J = t.value + e.edge);
1936
- for (let X = K; X <= J; X++)
1937
- H.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(() => {
1938
2368
  return {
1939
- totalPages: v,
1940
- prev: h,
1941
- next: f,
1942
- hasLeftEdge: A,
1943
- hasRightEdge: M,
1944
- pageList: H
2369
+ color: props.color,
2370
+ radius: props.radius,
2371
+ variant: props.variant,
2372
+ size: props.size,
2373
+ highContrast: props.highContrast,
2374
+ disabled: props.disabled
1945
2375
  };
1946
- }), i = (v) => {
1947
- t.value = v;
1948
- }, u = () => {
1949
- i(t.value - e.edge);
1950
- }, y = () => {
1951
- i(t.value + e.edge);
1952
- };
1953
- return (v, h) => (r(), $("div", {
1954
- class: I(["ui-Pagination", o.value])
1955
- }, [
1956
- n.value.prev ? (r(), d(Y, g({ key: 0 }, l.value, {
1957
- "aria-label": "Previous",
1958
- onClick: h[0] || (h[0] = O((f) => i(n.value.prev), ["prevent"]))
1959
- }), {
1960
- default: c(() => [
1961
- _(v.$slots, "prev-page", {
1962
- page: n.value.prev
1963
- }, () => [
1964
- p(a(k), { icon: "lucide:chevron-left" })
1965
- ])
1966
- ]),
1967
- _: 3
1968
- }, 16)) : z("", !0),
1969
- p(W, g(l.value, {
1970
- disabled: t.value === 1,
1971
- "aria-current": "page",
1972
- onClick: h[1] || (h[1] = O((f) => i(1), ["prevent"]))
1973
- }), {
1974
- default: c(() => [
1975
- _(v.$slots, "page", { page: 1 }, () => [
1976
- h[4] || (h[4] = j("1"))
1977
- ])
1978
- ]),
1979
- _: 3
1980
- }, 16, ["disabled"]),
1981
- n.value.hasLeftEdge ? (r(), d(Y, g({ key: 1 }, l.value, {
1982
- onClick: O(u, ["prevent"])
1983
- }), {
1984
- default: c(() => [
1985
- _(v.$slots, "prev-edge", {
1986
- page: t.value - v.edge
1987
- }, () => [
1988
- p(a(k), { icon: "lucide:ellipsis" })
1989
- ])
1990
- ]),
1991
- _: 3
1992
- }, 16)) : z("", !0),
1993
- (r(!0), $(G, null, E(n.value.pageList, (f) => (r(), d(W, g({ key: f }, { ref_for: !0 }, l.value, {
1994
- disabled: f === t.value,
1995
- "aria-current": "page",
1996
- onClick: O((B) => i(f), ["prevent"])
1997
- }), {
1998
- default: c(() => [
1999
- _(v.$slots, "page", { page: f }, () => [
2000
- j(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: O(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] = O((f) => i(n.value.totalPages), ["prevent"]))
2021
- }), {
2022
- default: c(() => [
2023
- _(v.$slots, "page", {
2024
- page: n.value.totalPages
2025
- }, () => [
2026
- j(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] = O((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
- }), Ho = ["data-size", "data-variant"], Eo = ["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, Eo)
2068
- ]),
2069
- _: 3
2070
- })
2071
- ], 8, Ho));
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 Ga = /* @__PURE__ */ Bo(xo, [["render", wo]]), [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 Ga = /* @__PURE__ */ Bo(xo, [["render", wo]]), [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(Gt), {
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(Ht), null, {
2132
- default: c(() => [
2133
- p(a(Et), 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 Ga = /* @__PURE__ */ Bo(xo, [["render", wo]]), [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), $(G, null, E(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
- }, M = (S) => {
2390
- o("select", S);
2391
- }, H = async () => {
2392
- y.value ? (l.value = "search", v.value = await pa(y.value)) : l.value = "all";
2393
- }, K = async (S) => {
2394
- h.value = void 0, f.value = "", B.value = "", l.value = "collection", h.value = await fa(S);
2395
- }, J = C(() => {
2396
- let S = 0;
2397
- return n.value.forEach((w) => {
2398
- S += w.items.length;
2399
- }), S;
2400
- }), X = C(() => i.value ? n.value.map((S) => {
2401
- const w = S.items.filter((D) => [D.category, D.name, D.prefix].join(" ").toLowerCase().indexOf(i.value) !== -1);
2402
- return { ...S, items: w };
2403
- }).filter((S) => S.items.length !== 0) : n.value), Re = C(() => {
2404
- let S = [];
2405
- return h.value ? (h.value.uncategorized ? S = ce(h.value.uncategorized, f.value, B.value) : h.value.categories && Object.keys(h.value.categories).forEach((w) => {
2406
- const D = h.value.categories[w];
2407
- ce(D, f.value, B.value).forEach((x) => {
2408
- S.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 && !S.length && h.value.hidden && (S = ce(h.value.hidden, f.value, B.value)), S.map((w) => {
2411
- var D;
2412
- return `${(D = h.value) == null ? void 0 : D.prefix}:${w}`;
2413
- })) : S;
2414
- }), me = C(() => l.value === "search" ? v.value : l.value === "collection" ? Re.value : []), Pe = C(() => {
2415
- const S = (u.value - 1) * t.perpage, w = u.value * t.perpage;
2416
- return me.value.slice(S, w);
3039
+ return { ...collection, items };
3040
+ }).filter((collection) => collection.items.length !== 0);
2417
3041
  });
2418
- return ue(async () => {
2419
- t.prefix ? K(t.prefix) : t.search && (y.value = t.search, H()), n.value = await da();
2420
- }), (S, w) => {
2421
- var D;
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": w[0] || (w[0] = (x) => i.value = x),
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);
3078
+ });
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": w[1] || (w[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(H, ["enter"])
3104
+ onKeydown: withKeys(onSearch, ["enter"])
2437
3105
  }, null, 8, ["modelValue"])
2438
3106
  ])
2439
3107
  ]),
2440
- (r(!0), $(G, null, E(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), $(G, null, E(x.items, (L) => (r(), d(Xo, g({
2450
- key: L.prefix
2451
- }, { ref_for: !0 }, L, {
2452
- onClick: O((Oe) => K(L.prefix), ["prevent"])
2453
- }), null, 16, ["onClick"]))), 128))
2454
- ])
2455
- ]))), 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))
2456
3128
  ], 512), [
2457
- [Ge, l.value === "all"]
3129
+ [vShow, shouldDisplay.value === "all"]
2458
3130
  ]),
2459
- l.value !== "all" ? (r(), $("div", ra, [
2460
- b("div", ia, [
2461
- p(W, {
3131
+ shouldDisplay.value !== "all" ? (openBlock(), createElementBlock("div", _hoisted_9, [
3132
+ createElementVNode("div", _hoisted_10, [
3133
+ createVNode(_sfc_main$U, {
2462
3134
  type: "button",
2463
3135
  variant: "surface",
2464
3136
  color: "gray",
2465
- onClick: O(A, ["prevent"])
3137
+ onClick: withModifiers(reset, ["prevent"])
2466
3138
  }, {
2467
- default: c(() => w[5] || (w[5] = [
2468
- j(" Back ")
3139
+ default: withCtx(() => _cache[5] || (_cache[5] = [
3140
+ createTextVNode(" Back ")
2469
3141
  ])),
2470
3142
  _: 1,
2471
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": w[2] || (w[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(H, ["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": w[3] || (w[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" && ((D = h.value) != null && D.suffixes) ? (r(), $("div", ca, [
2488
- (r(!0), $(G, null, E(h.value.suffixes, (x, L) => (r(), d(W, {
2489
- key: L,
2490
- variant: B.value === L ? "solid" : "outline",
2491
- color: "gray",
2492
- "high-contrast": "",
2493
- radius: "full",
2494
- onClick: O((Oe) => B.value = L, ["prevent"])
2495
- }, {
2496
- default: c(() => [
2497
- j(T(x), 1)
2498
- ]),
2499
- _: 2
2500
- }, 1032, ["variant", "onClick"]))), 128))
2501
- ])) : z("", !0),
2502
- b("div", ua, [
2503
- (r(!0), $(G, null, E(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: O((L) => M(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(Go, {
2526
- page: u.value,
2527
- "onUpdate:page": w[4] || (w[4] = (x) => u.value = x),
2528
- total: me.value.length,
2529
- perpage: S.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
- jo as ChevronIcon,
2558
- ss as CollapsibleContent,
2559
- bs as CollapsibleRoot,
2560
- $s as CollapsibleTrigger,
2561
- Oa as ColorField,
2562
- Wa as ComboboxContent,
2563
- Bs as ComboboxEmpty,
2564
- xs as ComboboxGroup,
2565
- Ea as ComboboxInput,
2566
- Ua as ComboboxItem,
2567
- qa as ComboboxLabel,
2568
- Ha as ComboboxRoot,
2569
- Ss as DialogClose,
2570
- $a as DialogContent,
2571
- ws as DialogDescription,
2572
- Ba as DialogHead,
2573
- zs as DialogRoot,
2574
- Is as DialogTitle,
2575
- ks as DialogTrigger,
2576
- xa as DropdownMenuContent,
2577
- Sa as DropdownMenuItem,
2578
- Vs as DropdownMenuRoot,
2579
- Ts as DropdownMenuTrigger,
2580
- Ls as Icon,
2581
- Y as IconButton,
2582
- us as IconCircle,
2583
- ps as IconifyCollection,
2584
- Xt as Inset,
2585
- Go as Pagination,
2586
- Mo as PlusMinusIcon,
2587
- As as PopoverClose,
2588
- wa 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
- Os as RadioTabsItem,
2598
- Ja as RadioTabsList,
2599
- cs as SavingIndicator,
2600
- Ie as ScrollArea,
2601
- Fa as SelectContent,
2602
- Ds as SelectGroup,
2603
- ja as SelectItem,
2604
- La as SelectLabel,
2605
- Da as SelectRoot,
2606
- Ga as SelectSeparator,
2607
- Ma as SelectTrigger,
2608
- ns as Separator,
2609
- Ca as SocialButton,
2610
- is as Spinner,
2611
- za as Switch,
2612
- ls as Table,
2613
- Fs as TabsContent,
2614
- Xa as TabsList,
2615
- Ms 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
  };