@typlog/ui 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/addons.css +244 -118
- package/addons.d.ts +195 -34
- package/addons.js +1827 -479
- package/charts.css +161 -0
- package/charts.d.ts +233 -0
- package/charts.js +382 -0
- package/index.css +13652 -2
- package/index.d.ts +3061 -0
- package/index.js +5995 -0
- package/package.json +27 -15
- package/util-lkbchXvM.js +42 -0
- package/base.css +0 -6623
- package/components.css +0 -5012
- package/components.d.ts +0 -2231
- package/components.js +0 -4518
- package/tailwind.css +0 -1110
package/components.js
DELETED
|
@@ -1,4518 +0,0 @@
|
|
|
1
|
-
import { defineComponent, toRefs, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot, markRaw, createElementBlock, createElementVNode, computed, normalizeClass, createTextVNode, toDisplayString, createCommentVNode, normalizeStyle, normalizeProps, guardReactiveProps, useAttrs, ref, shallowReactive, onMounted, onBeforeUnmount, useId, watch, nextTick, Fragment, createSlots, useTemplateRef, useModel, withDirectives, isRef, vModelDynamic, mergeModels, vModelText, renderList, withModifiers, vModelRadio, effectScope, createStaticVNode, resolveDynamicComponent } from "vue";
|
|
2
|
-
import { TooltipProvider, Primitive, createContext, useForwardProps, useEmitAsProps, AvatarRoot, AvatarImage, AvatarFallback, ScrollAreaRoot, ScrollAreaViewport, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaCorner, TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow, DialogClose, injectDialogRootContext, useForwardExpose, DialogPortal, DialogOverlay, DialogContent, useForwardPropsEmits, AlertDialogPortal, AlertDialogOverlay, AlertDialogContent, DropdownMenuPortal, DropdownMenuContent, DropdownMenuItem, PopoverPortal, PopoverContent, NavigationMenuRoot, NavigationMenuViewport, NavigationMenuList, NavigationMenuIndicator, NavigationMenuLink, NavigationMenuTrigger, NavigationMenuContent, DialogRoot, DialogTitle, DialogDescription, SwitchRoot, SwitchThumb, CheckboxRoot, CheckboxIndicator, Toggle, ToggleGroupRoot, ToggleGroupItem, PinInputRoot, PinInputInput, SelectRoot, SelectPortal, SelectContent, SelectViewport, SelectTrigger, SelectValue, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel, ComboboxRoot, injectComboboxRootContext as injectComboboxRootContext$1, ComboboxAnchor, ComboboxInput, ComboboxTrigger, ComboboxPortal, ComboboxContent, ComboboxViewport, ComboboxItem, ComboboxItemIndicator, ComboboxLabel, ComboboxEmpty, RadioGroupRoot, RadioGroupItem, TabsList, TabsIndicator, TabsTrigger, EditableRoot, EditableArea, EditablePreview, EditableInput, AccordionRoot, useId as useId$1, AccordionItem, AccordionContent, AccordionTrigger, CollapsibleRoot, CollapsibleTrigger, CollapsibleContent, injectPaginationRootContext, PaginationEllipsis, PaginationRoot, PaginationList, PaginationFirst, PaginationPrev, PaginationListItem, PaginationNext, PaginationLast, ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastProvider, ToastPortal, ToastViewport, ProgressRoot, ProgressIndicator } from "reka-ui";
|
|
3
|
-
import { AlertDialogAction, AlertDialogCancel, AlertDialogRoot, AlertDialogTrigger, CheckboxGroupRoot, ComboboxGroup, DialogClose as DialogClose2, DialogRoot as DialogRoot2, DialogTrigger, DropdownMenuRoot, DropdownMenuTrigger, NavigationMenuItem, PopoverClose, PopoverRoot, PopoverTrigger, SelectGroup, TabsContent, TabsRoot } from "reka-ui";
|
|
4
|
-
import { Icon } from "@iconify/vue";
|
|
5
|
-
const [injectThemeContext, provideThemeContext] = createContext("ThemeProvider");
|
|
6
|
-
const _sfc_main$1q = /* @__PURE__ */ defineComponent({
|
|
7
|
-
...{
|
|
8
|
-
inheritAttrs: false
|
|
9
|
-
},
|
|
10
|
-
__name: "ThemeProvider",
|
|
11
|
-
props: {
|
|
12
|
-
accentColor: { default: "indigo" },
|
|
13
|
-
radius: { default: "medium" },
|
|
14
|
-
grayColor: { default: "auto" },
|
|
15
|
-
scaling: { default: "100%" },
|
|
16
|
-
panelBackground: { default: "translucent" },
|
|
17
|
-
hasBackground: { type: Boolean, default: true },
|
|
18
|
-
asChild: { type: Boolean },
|
|
19
|
-
as: { default: "div" }
|
|
20
|
-
},
|
|
21
|
-
setup(__props) {
|
|
22
|
-
const props = __props;
|
|
23
|
-
const { accentColor, radius, grayColor, scaling, panelBackground, hasBackground } = toRefs(props);
|
|
24
|
-
provideThemeContext({
|
|
25
|
-
accentColor,
|
|
26
|
-
radius,
|
|
27
|
-
grayColor,
|
|
28
|
-
scaling,
|
|
29
|
-
panelBackground,
|
|
30
|
-
hasBackground
|
|
31
|
-
});
|
|
32
|
-
return (_ctx, _cache) => {
|
|
33
|
-
return openBlock(), createBlock(unref(TooltipProvider), null, {
|
|
34
|
-
default: withCtx(() => [
|
|
35
|
-
createVNode(unref(Primitive), mergeProps({
|
|
36
|
-
class: "ui-root",
|
|
37
|
-
"data-accent-color": unref(accentColor),
|
|
38
|
-
"data-gray-color": unref(grayColor),
|
|
39
|
-
"data-radius": unref(radius),
|
|
40
|
-
"data-scaling": unref(scaling),
|
|
41
|
-
"data-panel-background": unref(panelBackground),
|
|
42
|
-
"data-has-background": unref(hasBackground),
|
|
43
|
-
as: props.as,
|
|
44
|
-
"as-child": props.asChild
|
|
45
|
-
}, _ctx.$attrs), {
|
|
46
|
-
default: withCtx(() => [
|
|
47
|
-
renderSlot(_ctx.$slots, "default")
|
|
48
|
-
]),
|
|
49
|
-
_: 3
|
|
50
|
-
}, 16, ["data-accent-color", "data-gray-color", "data-radius", "data-scaling", "data-panel-background", "data-has-background", "as", "as-child"])
|
|
51
|
-
]),
|
|
52
|
-
_: 3
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
const _hoisted_1$B = {
|
|
58
|
-
viewBox: "0 0 24 24",
|
|
59
|
-
width: "1em",
|
|
60
|
-
height: "1em"
|
|
61
|
-
};
|
|
62
|
-
function render$e(_ctx, _cache) {
|
|
63
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$B, [..._cache[0] || (_cache[0] = [
|
|
64
|
-
createElementVNode("path", {
|
|
65
|
-
fill: "currentColor",
|
|
66
|
-
d: "M4 22a8 8 0 1 1 16 0h-2a6 6 0 0 0-12 0zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6s6 2.685 6 6s-2.685 6-6 6m0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4"
|
|
67
|
-
}, null, -1)
|
|
68
|
-
])]);
|
|
69
|
-
}
|
|
70
|
-
const UserIcon = markRaw({ name: "ri-user-line", render: render$e });
|
|
71
|
-
function useForwardPropsWithout(props, exclude) {
|
|
72
|
-
const parsedProps = useForwardProps(props);
|
|
73
|
-
return computed(() => ({
|
|
74
|
-
..._excludeProps(parsedProps.value, exclude)
|
|
75
|
-
}));
|
|
76
|
-
}
|
|
77
|
-
function useForwardPropsEmitsWithout(props, emit, exclude) {
|
|
78
|
-
const parsedProps = useForwardProps(props);
|
|
79
|
-
const emitsAsProps = useEmitAsProps(emit);
|
|
80
|
-
return computed(() => ({
|
|
81
|
-
..._excludeProps(parsedProps.value, exclude),
|
|
82
|
-
...emitsAsProps
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
const buildPropsClass = (props, keys) => {
|
|
86
|
-
return computed(() => {
|
|
87
|
-
const rv = [];
|
|
88
|
-
keys.forEach((key) => {
|
|
89
|
-
const value = props[key];
|
|
90
|
-
if (key === "class") {
|
|
91
|
-
rv.push(value);
|
|
92
|
-
}
|
|
93
|
-
if (value === true) {
|
|
94
|
-
rv.push(`r-${kebabize(key)}`);
|
|
95
|
-
} else if (value) {
|
|
96
|
-
rv.push(`r-${kebabize(key)}-${value}`);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
return rv;
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
function _excludeProps(props, exclude) {
|
|
103
|
-
const rv = {};
|
|
104
|
-
Object.keys(props).forEach((k) => {
|
|
105
|
-
if (exclude.indexOf(k) === -1) {
|
|
106
|
-
rv[k] = props[k];
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
return rv;
|
|
110
|
-
}
|
|
111
|
-
function kebabize(str) {
|
|
112
|
-
return str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, _kebabReplace);
|
|
113
|
-
}
|
|
114
|
-
function _kebabReplace(str, ofs) {
|
|
115
|
-
return (ofs ? "-" : "") + str.toLowerCase();
|
|
116
|
-
}
|
|
117
|
-
const _sfc_main$1p = /* @__PURE__ */ defineComponent({
|
|
118
|
-
__name: "Avatar",
|
|
119
|
-
props: {
|
|
120
|
-
alt: {},
|
|
121
|
-
src: {},
|
|
122
|
-
fallback: {},
|
|
123
|
-
radius: { default: "small" },
|
|
124
|
-
variant: { default: "solid" },
|
|
125
|
-
size: { default: "2" },
|
|
126
|
-
color: {}
|
|
127
|
-
},
|
|
128
|
-
setup(__props) {
|
|
129
|
-
const props = __props;
|
|
130
|
-
const resetClass = buildPropsClass(props, ["size", "variant"]);
|
|
131
|
-
const fallback = computed(() => {
|
|
132
|
-
if (props.fallback) {
|
|
133
|
-
return props.fallback;
|
|
134
|
-
}
|
|
135
|
-
if (props.alt) {
|
|
136
|
-
const symbols = props.alt.split(/\s+/).map((p) => p[0]);
|
|
137
|
-
if (props.size === "1") {
|
|
138
|
-
return symbols[0];
|
|
139
|
-
} else {
|
|
140
|
-
return symbols.slice(0, 2).join("");
|
|
141
|
-
}
|
|
142
|
-
} else {
|
|
143
|
-
return "";
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
return (_ctx, _cache) => {
|
|
147
|
-
return openBlock(), createBlock(unref(AvatarRoot), {
|
|
148
|
-
class: normalizeClass(["ui-Avatar", unref(resetClass)]),
|
|
149
|
-
"data-accent-color": props.color,
|
|
150
|
-
"data-radius": props.radius
|
|
151
|
-
}, {
|
|
152
|
-
default: withCtx(() => [
|
|
153
|
-
createVNode(unref(AvatarImage), {
|
|
154
|
-
alt: props.alt,
|
|
155
|
-
src: props.src || ""
|
|
156
|
-
}, null, 8, ["alt", "src"]),
|
|
157
|
-
fallback.value ? (openBlock(), createBlock(unref(AvatarFallback), {
|
|
158
|
-
key: 0,
|
|
159
|
-
class: normalizeClass(`r-count-${fallback.value.length}`)
|
|
160
|
-
}, {
|
|
161
|
-
default: withCtx(() => [
|
|
162
|
-
createTextVNode(toDisplayString(fallback.value), 1)
|
|
163
|
-
]),
|
|
164
|
-
_: 1
|
|
165
|
-
}, 8, ["class"])) : (openBlock(), createBlock(unref(AvatarFallback), { key: 1 }, {
|
|
166
|
-
default: withCtx(() => [
|
|
167
|
-
createVNode(unref(UserIcon))
|
|
168
|
-
]),
|
|
169
|
-
_: 1
|
|
170
|
-
}))
|
|
171
|
-
]),
|
|
172
|
-
_: 1
|
|
173
|
-
}, 8, ["class", "data-accent-color", "data-radius"]);
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
const _sfc_main$1o = /* @__PURE__ */ defineComponent({
|
|
178
|
-
__name: "Badge",
|
|
179
|
-
props: {
|
|
180
|
-
variant: { default: "soft" },
|
|
181
|
-
color: {},
|
|
182
|
-
radius: { default: "small" },
|
|
183
|
-
size: { default: "1" },
|
|
184
|
-
highContrast: { type: Boolean, default: void 0 },
|
|
185
|
-
as: { default: "span" },
|
|
186
|
-
asChild: { type: Boolean }
|
|
187
|
-
},
|
|
188
|
-
setup(__props) {
|
|
189
|
-
const props = __props;
|
|
190
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "highContrast"]);
|
|
191
|
-
return (_ctx, _cache) => {
|
|
192
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
193
|
-
class: normalizeClass(["ui-Badge", unref(resetClass)]),
|
|
194
|
-
as: props.as,
|
|
195
|
-
"as-child": props.asChild,
|
|
196
|
-
"data-accent-color": props.color,
|
|
197
|
-
"data-radius": props.radius
|
|
198
|
-
}, {
|
|
199
|
-
default: withCtx(() => [
|
|
200
|
-
renderSlot(_ctx.$slots, "default")
|
|
201
|
-
]),
|
|
202
|
-
_: 3
|
|
203
|
-
}, 8, ["class", "as", "as-child", "data-accent-color", "data-radius"]);
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
208
|
-
__name: "Card",
|
|
209
|
-
props: {
|
|
210
|
-
variant: { default: "surface" },
|
|
211
|
-
radius: {},
|
|
212
|
-
size: { default: "1" },
|
|
213
|
-
asChild: { type: Boolean },
|
|
214
|
-
as: { default: "div" }
|
|
215
|
-
},
|
|
216
|
-
setup(__props) {
|
|
217
|
-
const props = __props;
|
|
218
|
-
const resetClass = buildPropsClass(props, ["size", "variant"]);
|
|
219
|
-
return (_ctx, _cache) => {
|
|
220
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
221
|
-
class: normalizeClass(["ui-Card ui-BaseCard", unref(resetClass)]),
|
|
222
|
-
"as-child": props.asChild,
|
|
223
|
-
as: props.as,
|
|
224
|
-
"data-radius": props.radius
|
|
225
|
-
}, {
|
|
226
|
-
default: withCtx(() => [
|
|
227
|
-
renderSlot(_ctx.$slots, "default")
|
|
228
|
-
]),
|
|
229
|
-
_: 3
|
|
230
|
-
}, 8, ["class", "as-child", "as", "data-radius"]);
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
const _sfc_main$1m = /* @__PURE__ */ defineComponent({
|
|
235
|
-
__name: "Button",
|
|
236
|
-
props: {
|
|
237
|
-
variant: { default: "solid" },
|
|
238
|
-
color: {},
|
|
239
|
-
radius: {},
|
|
240
|
-
size: { default: "2" },
|
|
241
|
-
highContrast: { type: Boolean, default: false },
|
|
242
|
-
disabled: { type: Boolean },
|
|
243
|
-
as: { default: "button" },
|
|
244
|
-
asChild: { type: Boolean }
|
|
245
|
-
},
|
|
246
|
-
setup(__props) {
|
|
247
|
-
const props = __props;
|
|
248
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "highContrast"]);
|
|
249
|
-
return (_ctx, _cache) => {
|
|
250
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
251
|
-
class: normalizeClass(["ui-Button", unref(resetClass)]),
|
|
252
|
-
"as-child": props.asChild,
|
|
253
|
-
as: props.as,
|
|
254
|
-
"data-accent-color": props.color,
|
|
255
|
-
"data-radius": props.radius,
|
|
256
|
-
"data-disabled": props.disabled ? true : void 0,
|
|
257
|
-
disabled: props.disabled && props.as === "button" ? true : void 0
|
|
258
|
-
}, {
|
|
259
|
-
default: withCtx(() => [
|
|
260
|
-
renderSlot(_ctx.$slots, "default")
|
|
261
|
-
]),
|
|
262
|
-
_: 3
|
|
263
|
-
}, 8, ["class", "as-child", "as", "data-accent-color", "data-radius", "data-disabled", "disabled"]);
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
268
|
-
__name: "IconButton",
|
|
269
|
-
props: {
|
|
270
|
-
variant: { default: "solid" },
|
|
271
|
-
color: {},
|
|
272
|
-
radius: {},
|
|
273
|
-
size: { default: "2" },
|
|
274
|
-
highContrast: { type: Boolean, default: false },
|
|
275
|
-
disabled: { type: Boolean },
|
|
276
|
-
as: { default: "button" },
|
|
277
|
-
asChild: { type: Boolean }
|
|
278
|
-
},
|
|
279
|
-
setup(__props) {
|
|
280
|
-
const props = __props;
|
|
281
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "highContrast"]);
|
|
282
|
-
return (_ctx, _cache) => {
|
|
283
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
284
|
-
class: normalizeClass(["ui-Button ui-IconButton", unref(resetClass)]),
|
|
285
|
-
"as-child": props.asChild,
|
|
286
|
-
as: props.as,
|
|
287
|
-
"data-accent-color": props.color,
|
|
288
|
-
"data-radius": props.radius,
|
|
289
|
-
"data-disabled": props.disabled ? true : void 0,
|
|
290
|
-
disabled: props.disabled && props.as === "button" ? true : void 0
|
|
291
|
-
}, {
|
|
292
|
-
default: withCtx(() => [
|
|
293
|
-
renderSlot(_ctx.$slots, "default")
|
|
294
|
-
]),
|
|
295
|
-
_: 3
|
|
296
|
-
}, 8, ["class", "as-child", "as", "data-accent-color", "data-radius", "data-disabled", "disabled"]);
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
const _hoisted_1$A = {
|
|
301
|
-
viewBox: "0 0 15 15",
|
|
302
|
-
width: "1em",
|
|
303
|
-
height: "1em"
|
|
304
|
-
};
|
|
305
|
-
function render$d(_ctx, _cache) {
|
|
306
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$A, [..._cache[0] || (_cache[0] = [
|
|
307
|
-
createElementVNode("path", {
|
|
308
|
-
fill: "currentColor",
|
|
309
|
-
d: "M10.969 3.219a.574.574 0 1 1 .812.812L8.313 7.5l3.468 3.469l.074.09a.575.575 0 0 1-.796.796l-.09-.074L7.5 8.312l-3.469 3.47a.574.574 0 1 1-.812-.813L6.688 7.5l-3.47-3.469l-.073-.09a.575.575 0 0 1 .796-.797l.09.075L7.5 6.687z"
|
|
310
|
-
}, null, -1)
|
|
311
|
-
])]);
|
|
312
|
-
}
|
|
313
|
-
const CrossIcon = markRaw({ name: "radix-icons-cross-2", render: render$d });
|
|
314
|
-
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
315
|
-
__name: "CloseButton",
|
|
316
|
-
props: {
|
|
317
|
-
variant: { default: "ghost" },
|
|
318
|
-
color: { default: "gray" },
|
|
319
|
-
radius: {},
|
|
320
|
-
size: { default: "2" },
|
|
321
|
-
highContrast: { type: Boolean, default: false },
|
|
322
|
-
disabled: { type: Boolean },
|
|
323
|
-
as: { default: "button" },
|
|
324
|
-
asChild: { type: Boolean }
|
|
325
|
-
},
|
|
326
|
-
setup(__props) {
|
|
327
|
-
const props = __props;
|
|
328
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "highContrast"]);
|
|
329
|
-
return (_ctx, _cache) => {
|
|
330
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
331
|
-
class: normalizeClass(["ui-Button ui-CloseButton", unref(resetClass)]),
|
|
332
|
-
"as-child": props.asChild,
|
|
333
|
-
as: props.as,
|
|
334
|
-
"data-accent-color": props.color,
|
|
335
|
-
"data-radius": props.radius,
|
|
336
|
-
"data-disabled": props.disabled ? true : void 0,
|
|
337
|
-
disabled: props.disabled && props.as === "button" ? true : void 0
|
|
338
|
-
}, {
|
|
339
|
-
default: withCtx(() => [
|
|
340
|
-
createVNode(unref(CrossIcon))
|
|
341
|
-
]),
|
|
342
|
-
_: 1
|
|
343
|
-
}, 8, ["class", "as-child", "as", "data-accent-color", "data-radius", "data-disabled", "disabled"]);
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
348
|
-
__name: "ScrollArea",
|
|
349
|
-
props: {
|
|
350
|
-
size: { default: "1" },
|
|
351
|
-
radius: {},
|
|
352
|
-
scrollbars: { default: "both" },
|
|
353
|
-
type: { default: "scroll" },
|
|
354
|
-
dir: {},
|
|
355
|
-
scrollHideDelay: {},
|
|
356
|
-
asChild: { type: Boolean },
|
|
357
|
-
as: {}
|
|
358
|
-
},
|
|
359
|
-
setup(__props) {
|
|
360
|
-
const props = __props;
|
|
361
|
-
return (_ctx, _cache) => {
|
|
362
|
-
return openBlock(), createBlock(unref(ScrollAreaRoot), {
|
|
363
|
-
class: "ui-ScrollArea",
|
|
364
|
-
"as-child": props.asChild,
|
|
365
|
-
dir: props.dir,
|
|
366
|
-
"scroll-hide-delay": props.scrollHideDelay,
|
|
367
|
-
type: props.type,
|
|
368
|
-
"data-radius": props.radius
|
|
369
|
-
}, {
|
|
370
|
-
default: withCtx(() => [
|
|
371
|
-
createVNode(unref(ScrollAreaViewport), { class: "ui-ScrollAreaViewport" }, {
|
|
372
|
-
default: withCtx(() => [
|
|
373
|
-
renderSlot(_ctx.$slots, "default")
|
|
374
|
-
]),
|
|
375
|
-
_: 3
|
|
376
|
-
}),
|
|
377
|
-
_cache[0] || (_cache[0] = createElementVNode("div", { class: "ui-ScrollAreaViewportFocusRing" }, null, -1)),
|
|
378
|
-
props.scrollbars !== "horizontal" ? (openBlock(), createBlock(unref(ScrollAreaScrollbar), {
|
|
379
|
-
key: 0,
|
|
380
|
-
class: "ui-ScrollAreaScrollbar",
|
|
381
|
-
"data-size": props.size,
|
|
382
|
-
orientation: "vertical"
|
|
383
|
-
}, {
|
|
384
|
-
default: withCtx(() => [
|
|
385
|
-
createVNode(unref(ScrollAreaThumb), { class: "ui-ScrollAreaThumb" })
|
|
386
|
-
]),
|
|
387
|
-
_: 1
|
|
388
|
-
}, 8, ["data-size"])) : createCommentVNode("", true),
|
|
389
|
-
props.scrollbars !== "vertical" ? (openBlock(), createBlock(unref(ScrollAreaScrollbar), {
|
|
390
|
-
key: 1,
|
|
391
|
-
class: "ui-ScrollAreaScrollbar",
|
|
392
|
-
"data-size": props.size,
|
|
393
|
-
orientation: "horizontal"
|
|
394
|
-
}, {
|
|
395
|
-
default: withCtx(() => [
|
|
396
|
-
createVNode(unref(ScrollAreaThumb), { class: "ui-ScrollAreaThumb" })
|
|
397
|
-
]),
|
|
398
|
-
_: 1
|
|
399
|
-
}, 8, ["data-size"])) : createCommentVNode("", true),
|
|
400
|
-
props.scrollbars === "both" ? (openBlock(), createBlock(unref(ScrollAreaCorner), {
|
|
401
|
-
key: 2,
|
|
402
|
-
"class-name": "ui-ScrollAreaCorner"
|
|
403
|
-
})) : createCommentVNode("", true)
|
|
404
|
-
]),
|
|
405
|
-
_: 3
|
|
406
|
-
}, 8, ["as-child", "dir", "scroll-hide-delay", "type", "data-radius"]);
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
});
|
|
410
|
-
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
411
|
-
__name: "ThemeWrapper",
|
|
412
|
-
props: {
|
|
413
|
-
accentColor: {},
|
|
414
|
-
radius: {}
|
|
415
|
-
},
|
|
416
|
-
setup(__props) {
|
|
417
|
-
const props = __props;
|
|
418
|
-
const theme = injectThemeContext();
|
|
419
|
-
return (_ctx, _cache) => {
|
|
420
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
421
|
-
class: "ui-root",
|
|
422
|
-
"data-accent-color": props.accentColor || unref(theme).accentColor.value,
|
|
423
|
-
"data-gray-color": unref(theme).grayColor.value,
|
|
424
|
-
"data-radius": props.radius || unref(theme).radius.value,
|
|
425
|
-
"data-scaling": unref(theme).scaling.value,
|
|
426
|
-
"as-child": ""
|
|
427
|
-
}, {
|
|
428
|
-
default: withCtx(() => [
|
|
429
|
-
renderSlot(_ctx.$slots, "default")
|
|
430
|
-
]),
|
|
431
|
-
_: 3
|
|
432
|
-
}, 8, ["data-accent-color", "data-gray-color", "data-radius", "data-scaling"]);
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
});
|
|
436
|
-
const _hoisted_1$z = ["textContent"];
|
|
437
|
-
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
438
|
-
...{
|
|
439
|
-
inheritAttrs: false
|
|
440
|
-
},
|
|
441
|
-
__name: "Tooltip",
|
|
442
|
-
props: {
|
|
443
|
-
content: {},
|
|
444
|
-
maxWidth: { default: "360px" },
|
|
445
|
-
color: { default: "gray" },
|
|
446
|
-
defaultOpen: { type: Boolean },
|
|
447
|
-
open: { type: Boolean },
|
|
448
|
-
delayDuration: {},
|
|
449
|
-
disableHoverableContent: { type: Boolean },
|
|
450
|
-
disableClosingTrigger: { type: Boolean },
|
|
451
|
-
disabled: { type: Boolean },
|
|
452
|
-
ignoreNonKeyboardFocus: { type: Boolean },
|
|
453
|
-
forceMount: { type: Boolean },
|
|
454
|
-
ariaLabel: {},
|
|
455
|
-
asChild: { type: Boolean },
|
|
456
|
-
as: {},
|
|
457
|
-
side: { default: "top" },
|
|
458
|
-
sideOffset: { default: 4 },
|
|
459
|
-
align: {},
|
|
460
|
-
alignOffset: {},
|
|
461
|
-
avoidCollisions: { type: Boolean, default: true },
|
|
462
|
-
collisionBoundary: {},
|
|
463
|
-
collisionPadding: { default: 10 },
|
|
464
|
-
arrowPadding: {},
|
|
465
|
-
sticky: {},
|
|
466
|
-
hideWhenDetached: { type: Boolean },
|
|
467
|
-
positionStrategy: {},
|
|
468
|
-
updatePositionStrategy: {}
|
|
469
|
-
},
|
|
470
|
-
setup(__props) {
|
|
471
|
-
const props = __props;
|
|
472
|
-
return (_ctx, _cache) => {
|
|
473
|
-
return openBlock(), createBlock(unref(TooltipRoot), {
|
|
474
|
-
"default-open": props.defaultOpen,
|
|
475
|
-
"delay-duration": props.delayDuration,
|
|
476
|
-
"disable-hoverable-content": props.disableHoverableContent,
|
|
477
|
-
"disable-closing-trigger": props.disableClosingTrigger,
|
|
478
|
-
disabled: props.disabled,
|
|
479
|
-
"ignore-non-keyboard-focus": props.ignoreNonKeyboardFocus
|
|
480
|
-
}, {
|
|
481
|
-
default: withCtx(() => [
|
|
482
|
-
createVNode(unref(TooltipTrigger), mergeProps({
|
|
483
|
-
as: props.as,
|
|
484
|
-
"as-child": props.asChild
|
|
485
|
-
}, _ctx.$attrs), {
|
|
486
|
-
default: withCtx(() => [
|
|
487
|
-
renderSlot(_ctx.$slots, "default")
|
|
488
|
-
]),
|
|
489
|
-
_: 3
|
|
490
|
-
}, 16, ["as", "as-child"]),
|
|
491
|
-
createVNode(unref(TooltipPortal), null, {
|
|
492
|
-
default: withCtx(() => [
|
|
493
|
-
createVNode(_sfc_main$1i, null, {
|
|
494
|
-
default: withCtx(() => [
|
|
495
|
-
createVNode(unref(TooltipContent), {
|
|
496
|
-
class: "ui-Tooltip",
|
|
497
|
-
align: props.align,
|
|
498
|
-
"align-offset": props.alignOffset,
|
|
499
|
-
"aria-label": props.ariaLabel,
|
|
500
|
-
"arrow-padding": props.arrowPadding,
|
|
501
|
-
"avoid-collisions": props.avoidCollisions,
|
|
502
|
-
"collision-boundary": props.collisionBoundary,
|
|
503
|
-
"collision-padding": props.collisionPadding,
|
|
504
|
-
"hide-when-detached": props.hideWhenDetached,
|
|
505
|
-
side: props.side,
|
|
506
|
-
"side-offset": props.sideOffset,
|
|
507
|
-
sticky: props.sticky,
|
|
508
|
-
"data-accent-color": props.color,
|
|
509
|
-
style: normalizeStyle({ maxWidth: props.maxWidth })
|
|
510
|
-
}, {
|
|
511
|
-
default: withCtx(() => [
|
|
512
|
-
renderSlot(_ctx.$slots, "content", {}, () => [
|
|
513
|
-
createElementVNode("p", {
|
|
514
|
-
class: "ui-TooltipText",
|
|
515
|
-
textContent: toDisplayString(props.content)
|
|
516
|
-
}, null, 8, _hoisted_1$z)
|
|
517
|
-
]),
|
|
518
|
-
createVNode(unref(TooltipArrow), { class: "ui-TooltipArrow" })
|
|
519
|
-
]),
|
|
520
|
-
_: 3
|
|
521
|
-
}, 8, ["align", "align-offset", "aria-label", "arrow-padding", "avoid-collisions", "collision-boundary", "collision-padding", "hide-when-detached", "side", "side-offset", "sticky", "data-accent-color", "style"])
|
|
522
|
-
]),
|
|
523
|
-
_: 3
|
|
524
|
-
})
|
|
525
|
-
]),
|
|
526
|
-
_: 3
|
|
527
|
-
})
|
|
528
|
-
]),
|
|
529
|
-
_: 3
|
|
530
|
-
}, 8, ["default-open", "delay-duration", "disable-hoverable-content", "disable-closing-trigger", "disabled", "ignore-non-keyboard-focus"]);
|
|
531
|
-
};
|
|
532
|
-
}
|
|
533
|
-
});
|
|
534
|
-
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
535
|
-
__name: "DialogCloseButton",
|
|
536
|
-
props: {
|
|
537
|
-
tooltip: { default: "Close" },
|
|
538
|
-
variant: { default: "ghost" },
|
|
539
|
-
color: { default: "gray" },
|
|
540
|
-
radius: {},
|
|
541
|
-
size: { default: "2" },
|
|
542
|
-
highContrast: { type: Boolean, default: false },
|
|
543
|
-
disabled: { type: Boolean },
|
|
544
|
-
as: { default: "button" },
|
|
545
|
-
asChild: { type: Boolean }
|
|
546
|
-
},
|
|
547
|
-
setup(__props) {
|
|
548
|
-
const props = __props;
|
|
549
|
-
const forwarded = useForwardPropsWithout(props, ["tooltip"]);
|
|
550
|
-
return (_ctx, _cache) => {
|
|
551
|
-
return openBlock(), createBlock(_sfc_main$1h, {
|
|
552
|
-
content: props.tooltip,
|
|
553
|
-
"as-child": ""
|
|
554
|
-
}, {
|
|
555
|
-
default: withCtx(() => [
|
|
556
|
-
createVNode(unref(DialogClose), {
|
|
557
|
-
class: "ui-DialogCloseButton",
|
|
558
|
-
"as-child": ""
|
|
559
|
-
}, {
|
|
560
|
-
default: withCtx(() => [
|
|
561
|
-
createVNode(_sfc_main$1l, normalizeProps(guardReactiveProps(unref(forwarded))), {
|
|
562
|
-
default: withCtx(() => [
|
|
563
|
-
createVNode(unref(CrossIcon))
|
|
564
|
-
]),
|
|
565
|
-
_: 1
|
|
566
|
-
}, 16)
|
|
567
|
-
]),
|
|
568
|
-
_: 1
|
|
569
|
-
})
|
|
570
|
-
]),
|
|
571
|
-
_: 1
|
|
572
|
-
}, 8, ["content"]);
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
577
|
-
__name: "DialogTitle",
|
|
578
|
-
props: {
|
|
579
|
-
asChild: { type: Boolean },
|
|
580
|
-
as: { default: "h2" }
|
|
581
|
-
},
|
|
582
|
-
setup(__props) {
|
|
583
|
-
const props = __props;
|
|
584
|
-
const rootContext = injectDialogRootContext();
|
|
585
|
-
useForwardExpose();
|
|
586
|
-
return (_ctx, _cache) => {
|
|
587
|
-
return openBlock(), createBlock(unref(Primitive), mergeProps(props, {
|
|
588
|
-
id: unref(rootContext).titleId,
|
|
589
|
-
class: "ui-DialogTitle"
|
|
590
|
-
}), {
|
|
591
|
-
default: withCtx(() => [
|
|
592
|
-
renderSlot(_ctx.$slots, "default")
|
|
593
|
-
]),
|
|
594
|
-
_: 3
|
|
595
|
-
}, 16, ["id"]);
|
|
596
|
-
};
|
|
597
|
-
}
|
|
598
|
-
});
|
|
599
|
-
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
600
|
-
__name: "DialogDescription",
|
|
601
|
-
props: {
|
|
602
|
-
asChild: { type: Boolean },
|
|
603
|
-
as: { default: "p" }
|
|
604
|
-
},
|
|
605
|
-
setup(__props) {
|
|
606
|
-
const props = __props;
|
|
607
|
-
useForwardExpose();
|
|
608
|
-
const rootContext = injectDialogRootContext();
|
|
609
|
-
return (_ctx, _cache) => {
|
|
610
|
-
return openBlock(), createBlock(unref(Primitive), mergeProps(props, {
|
|
611
|
-
id: unref(rootContext).descriptionId,
|
|
612
|
-
class: "ui-DialogDescription"
|
|
613
|
-
}), {
|
|
614
|
-
default: withCtx(() => [
|
|
615
|
-
renderSlot(_ctx.$slots, "default")
|
|
616
|
-
]),
|
|
617
|
-
_: 3
|
|
618
|
-
}, 16, ["id"]);
|
|
619
|
-
};
|
|
620
|
-
}
|
|
621
|
-
});
|
|
622
|
-
const _hoisted_1$y = { class: "ui-DialogWrapper" };
|
|
623
|
-
const _hoisted_2$8 = { class: "ui-DialogContainer" };
|
|
624
|
-
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
625
|
-
...{
|
|
626
|
-
inheritAttrs: false
|
|
627
|
-
},
|
|
628
|
-
__name: "DialogPopup",
|
|
629
|
-
props: {
|
|
630
|
-
size: { default: "1" },
|
|
631
|
-
forceMount: { type: Boolean },
|
|
632
|
-
disableOutsidePointerEvents: { type: Boolean },
|
|
633
|
-
asChild: { type: Boolean },
|
|
634
|
-
as: {}
|
|
635
|
-
},
|
|
636
|
-
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
|
|
637
|
-
setup(__props, { emit: __emit }) {
|
|
638
|
-
const props = __props;
|
|
639
|
-
const emits = __emit;
|
|
640
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["align", "class", "size"]);
|
|
641
|
-
return (_ctx, _cache) => {
|
|
642
|
-
return openBlock(), createBlock(unref(DialogPortal), null, {
|
|
643
|
-
default: withCtx(() => [
|
|
644
|
-
createVNode(_sfc_main$1i, null, {
|
|
645
|
-
default: withCtx(() => [
|
|
646
|
-
createVNode(unref(DialogOverlay), { class: "ui-DialogOverlay" }, {
|
|
647
|
-
default: withCtx(() => [
|
|
648
|
-
createElementVNode("div", _hoisted_1$y, [
|
|
649
|
-
createElementVNode("div", _hoisted_2$8, [
|
|
650
|
-
createVNode(unref(DialogContent), mergeProps({
|
|
651
|
-
class: ["ui-DialogPopup", `r-size-${props.size}`]
|
|
652
|
-
}, {
|
|
653
|
-
..._ctx.$attrs,
|
|
654
|
-
...unref(forwarded)
|
|
655
|
-
}), {
|
|
656
|
-
default: withCtx(() => [
|
|
657
|
-
renderSlot(_ctx.$slots, "default")
|
|
658
|
-
]),
|
|
659
|
-
_: 3
|
|
660
|
-
}, 16, ["class"])
|
|
661
|
-
])
|
|
662
|
-
])
|
|
663
|
-
]),
|
|
664
|
-
_: 3
|
|
665
|
-
})
|
|
666
|
-
]),
|
|
667
|
-
_: 3
|
|
668
|
-
})
|
|
669
|
-
]),
|
|
670
|
-
_: 3
|
|
671
|
-
});
|
|
672
|
-
};
|
|
673
|
-
}
|
|
674
|
-
});
|
|
675
|
-
const _hoisted_1$x = { class: "ui-DialogWrapper" };
|
|
676
|
-
const _hoisted_2$7 = { class: "ui-DialogContainer" };
|
|
677
|
-
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
678
|
-
...{
|
|
679
|
-
inheritAttrs: false
|
|
680
|
-
},
|
|
681
|
-
__name: "AlertDialogPopup",
|
|
682
|
-
props: {
|
|
683
|
-
forceMount: { type: Boolean },
|
|
684
|
-
disableOutsidePointerEvents: { type: Boolean },
|
|
685
|
-
asChild: { type: Boolean },
|
|
686
|
-
as: {}
|
|
687
|
-
},
|
|
688
|
-
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
|
|
689
|
-
setup(__props, { emit: __emit }) {
|
|
690
|
-
const props = __props;
|
|
691
|
-
const emits = __emit;
|
|
692
|
-
const forwarded = useForwardPropsEmits(props, emits);
|
|
693
|
-
return (_ctx, _cache) => {
|
|
694
|
-
return openBlock(), createBlock(unref(AlertDialogPortal), null, {
|
|
695
|
-
default: withCtx(() => [
|
|
696
|
-
createVNode(_sfc_main$1i, null, {
|
|
697
|
-
default: withCtx(() => [
|
|
698
|
-
createVNode(unref(AlertDialogOverlay), { class: "ui-DialogOverlay" }, {
|
|
699
|
-
default: withCtx(() => [
|
|
700
|
-
createElementVNode("div", _hoisted_1$x, [
|
|
701
|
-
createElementVNode("div", _hoisted_2$7, [
|
|
702
|
-
createVNode(unref(AlertDialogContent), mergeProps({ class: "ui-DialogPopup ui-AlertPopup r-size-3" }, {
|
|
703
|
-
..._ctx.$attrs,
|
|
704
|
-
...unref(forwarded)
|
|
705
|
-
}), {
|
|
706
|
-
default: withCtx(() => [
|
|
707
|
-
renderSlot(_ctx.$slots, "default")
|
|
708
|
-
]),
|
|
709
|
-
_: 3
|
|
710
|
-
}, 16)
|
|
711
|
-
])
|
|
712
|
-
])
|
|
713
|
-
]),
|
|
714
|
-
_: 3
|
|
715
|
-
})
|
|
716
|
-
]),
|
|
717
|
-
_: 3
|
|
718
|
-
})
|
|
719
|
-
]),
|
|
720
|
-
_: 3
|
|
721
|
-
});
|
|
722
|
-
};
|
|
723
|
-
}
|
|
724
|
-
});
|
|
725
|
-
const _hoisted_1$w = { class: "ui-MenuViewport" };
|
|
726
|
-
const [injectDropdownMenuContentContext, provideDropdownMenuContentContext] = createContext("ui:DropdownMenuContent");
|
|
727
|
-
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
728
|
-
...{
|
|
729
|
-
inheritAttrs: false
|
|
730
|
-
},
|
|
731
|
-
__name: "DropdownMenuContent",
|
|
732
|
-
props: {
|
|
733
|
-
size: { default: "2" },
|
|
734
|
-
variant: { default: "solid" },
|
|
735
|
-
color: {},
|
|
736
|
-
highContrast: { type: Boolean },
|
|
737
|
-
forceMount: { type: Boolean },
|
|
738
|
-
loop: { type: Boolean },
|
|
739
|
-
memoDependencies: {},
|
|
740
|
-
side: {},
|
|
741
|
-
sideOffset: { default: 4 },
|
|
742
|
-
sideFlip: { type: Boolean },
|
|
743
|
-
align: { default: "start" },
|
|
744
|
-
alignOffset: {},
|
|
745
|
-
alignFlip: { type: Boolean },
|
|
746
|
-
avoidCollisions: { type: Boolean },
|
|
747
|
-
collisionBoundary: {},
|
|
748
|
-
collisionPadding: { default: 10 },
|
|
749
|
-
arrowPadding: {},
|
|
750
|
-
hideShiftedArrow: { type: Boolean },
|
|
751
|
-
sticky: {},
|
|
752
|
-
hideWhenDetached: { type: Boolean },
|
|
753
|
-
positionStrategy: {},
|
|
754
|
-
updatePositionStrategy: {},
|
|
755
|
-
disableUpdateOnLayoutShift: { type: Boolean },
|
|
756
|
-
prioritizePosition: { type: Boolean },
|
|
757
|
-
reference: {},
|
|
758
|
-
asChild: { type: Boolean },
|
|
759
|
-
as: {}
|
|
760
|
-
},
|
|
761
|
-
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
|
|
762
|
-
setup(__props, { emit: __emit }) {
|
|
763
|
-
const props = __props;
|
|
764
|
-
const emits = __emit;
|
|
765
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, [
|
|
766
|
-
"to",
|
|
767
|
-
"size",
|
|
768
|
-
"variant",
|
|
769
|
-
"color",
|
|
770
|
-
"highContrast"
|
|
771
|
-
]);
|
|
772
|
-
const { forwardRef } = useForwardExpose();
|
|
773
|
-
const { size, variant, color, highContrast } = toRefs(props);
|
|
774
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "highContrast"]);
|
|
775
|
-
provideDropdownMenuContentContext({ size, variant, color, highContrast });
|
|
776
|
-
return (_ctx, _cache) => {
|
|
777
|
-
return openBlock(), createBlock(unref(DropdownMenuPortal), null, {
|
|
778
|
-
default: withCtx(() => [
|
|
779
|
-
createVNode(_sfc_main$1i, {
|
|
780
|
-
"accent-color": props.color
|
|
781
|
-
}, {
|
|
782
|
-
default: withCtx(() => [
|
|
783
|
-
createVNode(unref(DropdownMenuContent), mergeProps({
|
|
784
|
-
..._ctx.$attrs,
|
|
785
|
-
...unref(forwarded)
|
|
786
|
-
}, {
|
|
787
|
-
ref: unref(forwardRef),
|
|
788
|
-
class: ["ui-PopperContent ui-MenuContent", unref(resetClass)]
|
|
789
|
-
}), {
|
|
790
|
-
default: withCtx(() => [
|
|
791
|
-
createVNode(_sfc_main$1j, { type: "auto" }, {
|
|
792
|
-
default: withCtx(() => [
|
|
793
|
-
createElementVNode("div", _hoisted_1$w, [
|
|
794
|
-
renderSlot(_ctx.$slots, "default")
|
|
795
|
-
])
|
|
796
|
-
]),
|
|
797
|
-
_: 3
|
|
798
|
-
})
|
|
799
|
-
]),
|
|
800
|
-
_: 3
|
|
801
|
-
}, 16, ["class"])
|
|
802
|
-
]),
|
|
803
|
-
_: 3
|
|
804
|
-
}, 8, ["accent-color"])
|
|
805
|
-
]),
|
|
806
|
-
_: 3
|
|
807
|
-
});
|
|
808
|
-
};
|
|
809
|
-
}
|
|
810
|
-
});
|
|
811
|
-
const _hoisted_1$v = ["textContent"];
|
|
812
|
-
const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
813
|
-
__name: "DropdownMenuItem",
|
|
814
|
-
props: {
|
|
815
|
-
color: {},
|
|
816
|
-
shortcut: {},
|
|
817
|
-
disabled: { type: Boolean },
|
|
818
|
-
textValue: {},
|
|
819
|
-
asChild: { type: Boolean },
|
|
820
|
-
as: {}
|
|
821
|
-
},
|
|
822
|
-
emits: ["select"],
|
|
823
|
-
setup(__props, { emit: __emit }) {
|
|
824
|
-
const props = __props;
|
|
825
|
-
const emits = __emit;
|
|
826
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["color", "shortcut"]);
|
|
827
|
-
useForwardExpose();
|
|
828
|
-
const rootContext = injectDropdownMenuContentContext();
|
|
829
|
-
return (_ctx, _cache) => {
|
|
830
|
-
return openBlock(), createBlock(unref(DropdownMenuItem), mergeProps({
|
|
831
|
-
class: "ui-MenuItem",
|
|
832
|
-
"data-accent-color": props.color || unref(rootContext).color.value,
|
|
833
|
-
"data-high-contrast": unref(rootContext).highContrast?.value || void 0
|
|
834
|
-
}, unref(forwarded)), {
|
|
835
|
-
default: withCtx(() => [
|
|
836
|
-
renderSlot(_ctx.$slots, "default"),
|
|
837
|
-
props.shortcut ? (openBlock(), createElementBlock("div", {
|
|
838
|
-
key: 0,
|
|
839
|
-
class: "ui-MenuShortcut",
|
|
840
|
-
textContent: toDisplayString(props.shortcut)
|
|
841
|
-
}, null, 8, _hoisted_1$v)) : createCommentVNode("", true)
|
|
842
|
-
]),
|
|
843
|
-
_: 3
|
|
844
|
-
}, 16, ["data-accent-color", "data-high-contrast"]);
|
|
845
|
-
};
|
|
846
|
-
}
|
|
847
|
-
});
|
|
848
|
-
const _export_sfc = (sfc, props) => {
|
|
849
|
-
const target = sfc.__vccOpts || sfc;
|
|
850
|
-
for (const [key, val] of props) {
|
|
851
|
-
target[key] = val;
|
|
852
|
-
}
|
|
853
|
-
return target;
|
|
854
|
-
};
|
|
855
|
-
const _sfc_main$19 = {};
|
|
856
|
-
const _hoisted_1$u = {
|
|
857
|
-
class: "ui-DropdownMenuSeparator",
|
|
858
|
-
"aria-hidden": "true"
|
|
859
|
-
};
|
|
860
|
-
function _sfc_render$2(_ctx, _cache) {
|
|
861
|
-
return openBlock(), createElementBlock("div", _hoisted_1$u);
|
|
862
|
-
}
|
|
863
|
-
const DropdownMenuSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$2]]);
|
|
864
|
-
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
865
|
-
...{
|
|
866
|
-
inheritAttrs: false
|
|
867
|
-
},
|
|
868
|
-
__name: "PopoverPopup",
|
|
869
|
-
props: {
|
|
870
|
-
size: { default: "1" },
|
|
871
|
-
forceMount: { type: Boolean },
|
|
872
|
-
memoDependencies: {},
|
|
873
|
-
side: { default: "bottom" },
|
|
874
|
-
sideOffset: { default: 4 },
|
|
875
|
-
sideFlip: { type: Boolean },
|
|
876
|
-
align: { default: "start" },
|
|
877
|
-
alignOffset: {},
|
|
878
|
-
alignFlip: { type: Boolean },
|
|
879
|
-
avoidCollisions: { type: Boolean },
|
|
880
|
-
collisionBoundary: {},
|
|
881
|
-
collisionPadding: {},
|
|
882
|
-
arrowPadding: {},
|
|
883
|
-
hideShiftedArrow: { type: Boolean },
|
|
884
|
-
sticky: {},
|
|
885
|
-
hideWhenDetached: { type: Boolean },
|
|
886
|
-
positionStrategy: {},
|
|
887
|
-
updatePositionStrategy: {},
|
|
888
|
-
disableUpdateOnLayoutShift: { type: Boolean },
|
|
889
|
-
prioritizePosition: { type: Boolean },
|
|
890
|
-
reference: {},
|
|
891
|
-
dir: {},
|
|
892
|
-
asChild: { type: Boolean },
|
|
893
|
-
as: {},
|
|
894
|
-
disableOutsidePointerEvents: { type: Boolean }
|
|
895
|
-
},
|
|
896
|
-
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
|
|
897
|
-
setup(__props, { emit: __emit }) {
|
|
898
|
-
const props = __props;
|
|
899
|
-
const emits = __emit;
|
|
900
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["to", "size"]);
|
|
901
|
-
return (_ctx, _cache) => {
|
|
902
|
-
return openBlock(), createBlock(unref(PopoverPortal), null, {
|
|
903
|
-
default: withCtx(() => [
|
|
904
|
-
createVNode(_sfc_main$1i, null, {
|
|
905
|
-
default: withCtx(() => [
|
|
906
|
-
createVNode(unref(PopoverContent), mergeProps({ ..._ctx.$attrs, ...unref(forwarded) }, {
|
|
907
|
-
class: ["ui-PopoverPopup ui-PopperContent", `r-size-${props.size}`]
|
|
908
|
-
}), {
|
|
909
|
-
default: withCtx(() => [
|
|
910
|
-
renderSlot(_ctx.$slots, "default")
|
|
911
|
-
]),
|
|
912
|
-
_: 3
|
|
913
|
-
}, 16, ["class"])
|
|
914
|
-
]),
|
|
915
|
-
_: 3
|
|
916
|
-
})
|
|
917
|
-
]),
|
|
918
|
-
_: 3
|
|
919
|
-
});
|
|
920
|
-
};
|
|
921
|
-
}
|
|
922
|
-
});
|
|
923
|
-
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
924
|
-
__name: "NavigationMenuRoot",
|
|
925
|
-
props: {
|
|
926
|
-
modelValue: {},
|
|
927
|
-
defaultValue: {},
|
|
928
|
-
dir: {},
|
|
929
|
-
orientation: {},
|
|
930
|
-
delayDuration: {},
|
|
931
|
-
skipDelayDuration: {},
|
|
932
|
-
disableClickTrigger: { type: Boolean },
|
|
933
|
-
disableHoverTrigger: { type: Boolean },
|
|
934
|
-
disablePointerLeaveClose: { type: Boolean },
|
|
935
|
-
unmountOnHide: { type: Boolean },
|
|
936
|
-
asChild: { type: Boolean },
|
|
937
|
-
as: {}
|
|
938
|
-
},
|
|
939
|
-
emits: ["update:modelValue"],
|
|
940
|
-
setup(__props, { emit: __emit }) {
|
|
941
|
-
const props = __props;
|
|
942
|
-
const emits = __emit;
|
|
943
|
-
const forwarded = useForwardPropsEmits(props, emits);
|
|
944
|
-
return (_ctx, _cache) => {
|
|
945
|
-
return openBlock(), createBlock(unref(NavigationMenuRoot), mergeProps(unref(forwarded), { class: "ui-NavigationMenuRoot" }), {
|
|
946
|
-
default: withCtx(() => [
|
|
947
|
-
renderSlot(_ctx.$slots, "default"),
|
|
948
|
-
createVNode(unref(NavigationMenuViewport), { class: "ui-NavigationMenuViewport" })
|
|
949
|
-
]),
|
|
950
|
-
_: 3
|
|
951
|
-
}, 16);
|
|
952
|
-
};
|
|
953
|
-
}
|
|
954
|
-
});
|
|
955
|
-
const [injectNavigationMenuListContext, provideNavigationMenuListContext] = createContext("ui:NavigationMenuList");
|
|
956
|
-
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
957
|
-
__name: "NavigationMenuList",
|
|
958
|
-
props: {
|
|
959
|
-
color: {},
|
|
960
|
-
size: { default: "2" },
|
|
961
|
-
radius: {},
|
|
962
|
-
asChild: { type: Boolean },
|
|
963
|
-
as: {}
|
|
964
|
-
},
|
|
965
|
-
setup(__props) {
|
|
966
|
-
const props = __props;
|
|
967
|
-
const forwarded = useForwardPropsWithout(props, ["color", "size", "radius"]);
|
|
968
|
-
const resetClass = buildPropsClass(props, ["size"]);
|
|
969
|
-
const { color, radius, size } = toRefs(props);
|
|
970
|
-
provideNavigationMenuListContext({
|
|
971
|
-
color,
|
|
972
|
-
radius,
|
|
973
|
-
size
|
|
974
|
-
});
|
|
975
|
-
return (_ctx, _cache) => {
|
|
976
|
-
return openBlock(), createBlock(unref(NavigationMenuList), mergeProps(unref(forwarded), {
|
|
977
|
-
class: ["ui-NavigationMenuList", unref(resetClass)]
|
|
978
|
-
}), {
|
|
979
|
-
default: withCtx(() => [
|
|
980
|
-
renderSlot(_ctx.$slots, "default"),
|
|
981
|
-
createVNode(unref(NavigationMenuIndicator), { class: "ui-NavigationMenuIndicator" })
|
|
982
|
-
]),
|
|
983
|
-
_: 3
|
|
984
|
-
}, 16, ["class"]);
|
|
985
|
-
};
|
|
986
|
-
}
|
|
987
|
-
});
|
|
988
|
-
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
989
|
-
__name: "NavigationMenuLink",
|
|
990
|
-
props: {
|
|
991
|
-
color: {},
|
|
992
|
-
size: { default: "2" },
|
|
993
|
-
radius: {},
|
|
994
|
-
active: { type: Boolean },
|
|
995
|
-
asChild: { type: Boolean },
|
|
996
|
-
as: {}
|
|
997
|
-
},
|
|
998
|
-
emits: ["select"],
|
|
999
|
-
setup(__props, { emit: __emit }) {
|
|
1000
|
-
const props = __props;
|
|
1001
|
-
const emits = __emit;
|
|
1002
|
-
const ctx = injectNavigationMenuListContext(null);
|
|
1003
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["color", "size", "radius"]);
|
|
1004
|
-
const resetClass = computed(() => {
|
|
1005
|
-
const size = props.size || ctx?.size.value || "2";
|
|
1006
|
-
return `r-size-${size}`;
|
|
1007
|
-
});
|
|
1008
|
-
return (_ctx, _cache) => {
|
|
1009
|
-
return openBlock(), createBlock(unref(NavigationMenuLink), mergeProps({ class: "ui-NavigationMenuLink" }, unref(forwarded), {
|
|
1010
|
-
class: resetClass.value,
|
|
1011
|
-
"data-accent-color": props.color || unref(ctx)?.color.value,
|
|
1012
|
-
"data-radius": props.radius || unref(ctx)?.radius.value
|
|
1013
|
-
}), {
|
|
1014
|
-
default: withCtx(() => [
|
|
1015
|
-
renderSlot(_ctx.$slots, "default")
|
|
1016
|
-
]),
|
|
1017
|
-
_: 3
|
|
1018
|
-
}, 16, ["class", "data-accent-color", "data-radius"]);
|
|
1019
|
-
};
|
|
1020
|
-
}
|
|
1021
|
-
});
|
|
1022
|
-
const _hoisted_1$t = {
|
|
1023
|
-
viewBox: "0 0 15 15",
|
|
1024
|
-
width: "1em",
|
|
1025
|
-
height: "1em"
|
|
1026
|
-
};
|
|
1027
|
-
function render$c(_ctx, _cache) {
|
|
1028
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$t, [..._cache[0] || (_cache[0] = [
|
|
1029
|
-
createElementVNode("path", {
|
|
1030
|
-
fill: "currentColor",
|
|
1031
|
-
d: "M7.5 9.95a.45.45 0 0 0 .319-.132l3-3a.45.45 0 0 0-.637-.637L7.5 8.863L4.82 6.181l-.07-.057a.451.451 0 0 0-.625.624l.058.07l3 3a.45.45 0 0 0 .318.132"
|
|
1032
|
-
}, null, -1)
|
|
1033
|
-
])]);
|
|
1034
|
-
}
|
|
1035
|
-
const CaretDownIcon = markRaw({ name: "radix-icons-caret-down", render: render$c });
|
|
1036
|
-
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
1037
|
-
__name: "NavigationMenuTrigger",
|
|
1038
|
-
props: {
|
|
1039
|
-
color: {},
|
|
1040
|
-
size: {},
|
|
1041
|
-
radius: {},
|
|
1042
|
-
disabled: { type: Boolean },
|
|
1043
|
-
asChild: { type: Boolean },
|
|
1044
|
-
as: {}
|
|
1045
|
-
},
|
|
1046
|
-
setup(__props) {
|
|
1047
|
-
const props = __props;
|
|
1048
|
-
const ctx = injectNavigationMenuListContext(null);
|
|
1049
|
-
const forwarded = useForwardPropsWithout(props, ["color", "size", "radius"]);
|
|
1050
|
-
const attrs = useAttrs();
|
|
1051
|
-
const defaultAs = computed(() => {
|
|
1052
|
-
if (props.as) {
|
|
1053
|
-
return props.as;
|
|
1054
|
-
}
|
|
1055
|
-
if (attrs.href) {
|
|
1056
|
-
return "a";
|
|
1057
|
-
} else {
|
|
1058
|
-
return forwarded.value.as;
|
|
1059
|
-
}
|
|
1060
|
-
});
|
|
1061
|
-
const resetClass = computed(() => {
|
|
1062
|
-
const size = props.size || ctx?.size.value || "2";
|
|
1063
|
-
return `r-size-${size}`;
|
|
1064
|
-
});
|
|
1065
|
-
return (_ctx, _cache) => {
|
|
1066
|
-
return openBlock(), createBlock(unref(NavigationMenuTrigger), mergeProps({ class: "ui-NavigationMenuTrigger" }, unref(forwarded), {
|
|
1067
|
-
as: defaultAs.value,
|
|
1068
|
-
class: resetClass.value,
|
|
1069
|
-
"data-accent-color": props.color || unref(ctx)?.color.value,
|
|
1070
|
-
"data-radius": props.radius || unref(ctx)?.radius.value
|
|
1071
|
-
}), {
|
|
1072
|
-
default: withCtx(() => [
|
|
1073
|
-
renderSlot(_ctx.$slots, "default"),
|
|
1074
|
-
createVNode(unref(CaretDownIcon), { class: "ui-NavigationMenuTriggerArrow" })
|
|
1075
|
-
]),
|
|
1076
|
-
_: 3
|
|
1077
|
-
}, 16, ["as", "class", "data-accent-color", "data-radius"]);
|
|
1078
|
-
};
|
|
1079
|
-
}
|
|
1080
|
-
});
|
|
1081
|
-
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
1082
|
-
__name: "NavigationMenuContent",
|
|
1083
|
-
props: {
|
|
1084
|
-
forceMount: { type: Boolean },
|
|
1085
|
-
disableOutsidePointerEvents: { type: Boolean },
|
|
1086
|
-
asChild: { type: Boolean },
|
|
1087
|
-
as: {}
|
|
1088
|
-
},
|
|
1089
|
-
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside"],
|
|
1090
|
-
setup(__props, { emit: __emit }) {
|
|
1091
|
-
const props = __props;
|
|
1092
|
-
const emits = __emit;
|
|
1093
|
-
const forwarded = useForwardPropsEmits(props, emits);
|
|
1094
|
-
return (_ctx, _cache) => {
|
|
1095
|
-
return openBlock(), createBlock(unref(NavigationMenuContent), mergeProps(unref(forwarded), { class: "ui-NavigationMenuContent" }), {
|
|
1096
|
-
default: withCtx(() => [
|
|
1097
|
-
renderSlot(_ctx.$slots, "default")
|
|
1098
|
-
]),
|
|
1099
|
-
_: 3
|
|
1100
|
-
}, 16);
|
|
1101
|
-
};
|
|
1102
|
-
}
|
|
1103
|
-
});
|
|
1104
|
-
const [injectSidebarProviderContext, provideSidebarProviderContext] = createContext("ui:SidebarProvider");
|
|
1105
|
-
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
1106
|
-
__name: "SidebarProvider",
|
|
1107
|
-
props: {
|
|
1108
|
-
as: { default: "div" }
|
|
1109
|
-
},
|
|
1110
|
-
setup(__props) {
|
|
1111
|
-
const props = __props;
|
|
1112
|
-
const isMobile = ref(false);
|
|
1113
|
-
const sidebars = shallowReactive({});
|
|
1114
|
-
function register(side, controller) {
|
|
1115
|
-
const existing = sidebars[side];
|
|
1116
|
-
if (existing && existing !== controller) {
|
|
1117
|
-
console.warn(`[Typlog UI] SidebarProvider accepts at most one Sidebar for side="${side}".`);
|
|
1118
|
-
return false;
|
|
1119
|
-
}
|
|
1120
|
-
sidebars[side] = controller;
|
|
1121
|
-
return true;
|
|
1122
|
-
}
|
|
1123
|
-
function unregister(side, controller) {
|
|
1124
|
-
if (sidebars[side] === controller)
|
|
1125
|
-
delete sidebars[side];
|
|
1126
|
-
}
|
|
1127
|
-
function requestOpen(side, controller) {
|
|
1128
|
-
const other = sidebars[side === "left" ? "right" : "left"];
|
|
1129
|
-
if (other && other !== controller && other.open.value)
|
|
1130
|
-
other.setOpen(false);
|
|
1131
|
-
}
|
|
1132
|
-
provideSidebarProviderContext({ isMobile, sidebars, register, unregister, requestOpen });
|
|
1133
|
-
let mediaQuery;
|
|
1134
|
-
function updateMobile(event) {
|
|
1135
|
-
isMobile.value = event.matches;
|
|
1136
|
-
}
|
|
1137
|
-
onMounted(() => {
|
|
1138
|
-
mediaQuery = window.matchMedia("(max-width: 1023.98px)");
|
|
1139
|
-
updateMobile(mediaQuery);
|
|
1140
|
-
mediaQuery.addEventListener("change", updateMobile);
|
|
1141
|
-
});
|
|
1142
|
-
onBeforeUnmount(() => {
|
|
1143
|
-
mediaQuery?.removeEventListener("change", updateMobile);
|
|
1144
|
-
});
|
|
1145
|
-
const hasInset = computed(() => sidebars.left?.variant.value === "inset" || sidebars.right?.variant.value === "inset");
|
|
1146
|
-
const hasPadding = computed(() => sidebars.left?.variant.value === "floating" || sidebars.right?.variant.value === "floating" || hasInset.value);
|
|
1147
|
-
return (_ctx, _cache) => {
|
|
1148
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1149
|
-
class: "ui-SidebarProvider",
|
|
1150
|
-
as: props.as,
|
|
1151
|
-
"data-mobile": isMobile.value,
|
|
1152
|
-
"data-padded": hasPadding.value,
|
|
1153
|
-
"data-inset": hasInset.value
|
|
1154
|
-
}, {
|
|
1155
|
-
default: withCtx(() => [
|
|
1156
|
-
renderSlot(_ctx.$slots, "default", { isMobile: isMobile.value })
|
|
1157
|
-
]),
|
|
1158
|
-
_: 3
|
|
1159
|
-
}, 8, ["as", "data-mobile", "data-padded", "data-inset"]);
|
|
1160
|
-
};
|
|
1161
|
-
}
|
|
1162
|
-
});
|
|
1163
|
-
const _hoisted_1$s = ["data-collapsed"];
|
|
1164
|
-
const [injectSidebarContext, provideSidebarContext] = createContext("ui:Sidebar");
|
|
1165
|
-
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
1166
|
-
...{ inheritAttrs: false },
|
|
1167
|
-
__name: "Sidebar",
|
|
1168
|
-
props: {
|
|
1169
|
-
open: { type: Boolean, default: void 0 },
|
|
1170
|
-
defaultOpen: { type: Boolean, default: false },
|
|
1171
|
-
collapsed: { type: Boolean, default: void 0 },
|
|
1172
|
-
defaultCollapsed: { type: Boolean, default: false },
|
|
1173
|
-
side: { default: "left" },
|
|
1174
|
-
variant: { default: "default" },
|
|
1175
|
-
collapsible: { default: "offcanvas" },
|
|
1176
|
-
width: { default: "16rem" },
|
|
1177
|
-
collapsedWidth: { default: "3.5rem" },
|
|
1178
|
-
mobileWidth: { default: "18rem" },
|
|
1179
|
-
mobileTitle: { default: "Navigation" },
|
|
1180
|
-
mobileDescription: { default: "Site navigation" },
|
|
1181
|
-
forceMount: { type: Boolean },
|
|
1182
|
-
disableOutsidePointerEvents: { type: Boolean, default: void 0 },
|
|
1183
|
-
asChild: { type: Boolean },
|
|
1184
|
-
as: { default: "aside" }
|
|
1185
|
-
},
|
|
1186
|
-
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus", "update:open", "update:collapsed"],
|
|
1187
|
-
setup(__props, { emit: __emit }) {
|
|
1188
|
-
const props = __props;
|
|
1189
|
-
const emits = __emit;
|
|
1190
|
-
const provider = injectSidebarProviderContext();
|
|
1191
|
-
const internalOpen = ref(props.defaultOpen);
|
|
1192
|
-
const internalCollapsed = ref(props.defaultCollapsed);
|
|
1193
|
-
const isMobile = provider.isMobile;
|
|
1194
|
-
const lastTrigger = ref(null);
|
|
1195
|
-
const panelId = `ui-sidebar-${useId()}`;
|
|
1196
|
-
const { side, variant, collapsible } = toRefs(props);
|
|
1197
|
-
const open = computed({
|
|
1198
|
-
get: () => props.open ?? internalOpen.value,
|
|
1199
|
-
set: (value) => {
|
|
1200
|
-
if (value && isMobile.value)
|
|
1201
|
-
provider.requestOpen(side.value, controller);
|
|
1202
|
-
if (props.open === void 0)
|
|
1203
|
-
internalOpen.value = value;
|
|
1204
|
-
emits("update:open", value);
|
|
1205
|
-
}
|
|
1206
|
-
});
|
|
1207
|
-
const collapsed = computed({
|
|
1208
|
-
get: () => props.collapsed ?? internalCollapsed.value,
|
|
1209
|
-
set: (value) => {
|
|
1210
|
-
if (props.collapsed === void 0)
|
|
1211
|
-
internalCollapsed.value = value;
|
|
1212
|
-
emits("update:collapsed", value);
|
|
1213
|
-
}
|
|
1214
|
-
});
|
|
1215
|
-
function toggleCollapsed() {
|
|
1216
|
-
if (collapsible.value !== "none")
|
|
1217
|
-
collapsed.value = !collapsed.value;
|
|
1218
|
-
}
|
|
1219
|
-
function toggle() {
|
|
1220
|
-
if (isMobile.value)
|
|
1221
|
-
open.value = !open.value;
|
|
1222
|
-
else
|
|
1223
|
-
toggleCollapsed();
|
|
1224
|
-
}
|
|
1225
|
-
function setOpen(value) {
|
|
1226
|
-
open.value = value;
|
|
1227
|
-
}
|
|
1228
|
-
function shouldRestoreFocus() {
|
|
1229
|
-
const other = provider.sidebars[side.value === "left" ? "right" : "left"];
|
|
1230
|
-
return !other?.open.value;
|
|
1231
|
-
}
|
|
1232
|
-
const controller = {
|
|
1233
|
-
side,
|
|
1234
|
-
open,
|
|
1235
|
-
collapsed,
|
|
1236
|
-
collapsible,
|
|
1237
|
-
variant,
|
|
1238
|
-
panelId,
|
|
1239
|
-
lastTrigger,
|
|
1240
|
-
setOpen,
|
|
1241
|
-
toggle
|
|
1242
|
-
};
|
|
1243
|
-
watch(side, (value, _oldValue, onCleanup) => {
|
|
1244
|
-
if (provider.register(value, controller))
|
|
1245
|
-
onCleanup(() => provider.unregister(value, controller));
|
|
1246
|
-
}, { immediate: true });
|
|
1247
|
-
watch([open, isMobile], ([isOpen, mobile]) => {
|
|
1248
|
-
if (isOpen && mobile)
|
|
1249
|
-
provider.requestOpen(side.value, controller);
|
|
1250
|
-
}, { immediate: true });
|
|
1251
|
-
provideSidebarContext({
|
|
1252
|
-
open,
|
|
1253
|
-
collapsed,
|
|
1254
|
-
isMobile,
|
|
1255
|
-
side,
|
|
1256
|
-
variant,
|
|
1257
|
-
collapsible,
|
|
1258
|
-
panelId,
|
|
1259
|
-
lastTrigger,
|
|
1260
|
-
toggle,
|
|
1261
|
-
toggleCollapsed,
|
|
1262
|
-
shouldRestoreFocus
|
|
1263
|
-
});
|
|
1264
|
-
const sidebarProps = [
|
|
1265
|
-
"open",
|
|
1266
|
-
"defaultOpen",
|
|
1267
|
-
"collapsed",
|
|
1268
|
-
"defaultCollapsed",
|
|
1269
|
-
"side",
|
|
1270
|
-
"variant",
|
|
1271
|
-
"collapsible",
|
|
1272
|
-
"width",
|
|
1273
|
-
"collapsedWidth",
|
|
1274
|
-
"mobileWidth",
|
|
1275
|
-
"mobileTitle",
|
|
1276
|
-
"mobileDescription"
|
|
1277
|
-
];
|
|
1278
|
-
const forwardedDialogProps = useForwardPropsWithout(props, sidebarProps);
|
|
1279
|
-
const resetClass = buildPropsClass(props, ["side", "variant", "collapsible"]);
|
|
1280
|
-
const mobileClass = computed(() => [
|
|
1281
|
-
`r-side-${props.side}`,
|
|
1282
|
-
`r-variant-${props.variant}`
|
|
1283
|
-
]);
|
|
1284
|
-
const sidebarStyle = computed(() => ({
|
|
1285
|
-
"--sidebar-width": props.width,
|
|
1286
|
-
"--sidebar-collapsed-width": props.collapsedWidth,
|
|
1287
|
-
"--sidebar-mobile-width": props.mobileWidth
|
|
1288
|
-
}));
|
|
1289
|
-
function closeAutoFocus(event) {
|
|
1290
|
-
emits("closeAutoFocus", event);
|
|
1291
|
-
if (event.defaultPrevented)
|
|
1292
|
-
return;
|
|
1293
|
-
if (!shouldRestoreFocus()) {
|
|
1294
|
-
event.preventDefault();
|
|
1295
|
-
return;
|
|
1296
|
-
}
|
|
1297
|
-
const trigger = lastTrigger.value;
|
|
1298
|
-
if (trigger?.isConnected) {
|
|
1299
|
-
event.preventDefault();
|
|
1300
|
-
nextTick(() => trigger.focus());
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
return (_ctx, _cache) => {
|
|
1304
|
-
return openBlock(), createBlock(unref(DialogRoot), {
|
|
1305
|
-
open: open.value,
|
|
1306
|
-
"onUpdate:open": setOpen
|
|
1307
|
-
}, {
|
|
1308
|
-
default: withCtx(() => [
|
|
1309
|
-
!unref(isMobile) ? (openBlock(), createElementBlock("div", {
|
|
1310
|
-
key: 0,
|
|
1311
|
-
class: normalizeClass(["ui-Sidebar", unref(resetClass)]),
|
|
1312
|
-
style: normalizeStyle(sidebarStyle.value),
|
|
1313
|
-
"data-collapsed": collapsed.value
|
|
1314
|
-
}, [
|
|
1315
|
-
createVNode(unref(Primitive), mergeProps(_ctx.$attrs, {
|
|
1316
|
-
id: panelId,
|
|
1317
|
-
as: props.as,
|
|
1318
|
-
"as-child": props.asChild,
|
|
1319
|
-
class: "ui-SidebarPanel r-desktop"
|
|
1320
|
-
}), {
|
|
1321
|
-
default: withCtx(() => [
|
|
1322
|
-
renderSlot(_ctx.$slots, "default", {
|
|
1323
|
-
open: open.value,
|
|
1324
|
-
collapsed: collapsed.value,
|
|
1325
|
-
isMobile: unref(isMobile),
|
|
1326
|
-
toggle
|
|
1327
|
-
})
|
|
1328
|
-
]),
|
|
1329
|
-
_: 3
|
|
1330
|
-
}, 16, ["as", "as-child"])
|
|
1331
|
-
], 14, _hoisted_1$s)) : (openBlock(), createBlock(unref(DialogPortal), { key: 1 }, {
|
|
1332
|
-
default: withCtx(() => [
|
|
1333
|
-
createVNode(_sfc_main$1i, null, {
|
|
1334
|
-
default: withCtx(() => [
|
|
1335
|
-
createVNode(unref(DialogOverlay), {
|
|
1336
|
-
class: "ui-SidebarOverlay",
|
|
1337
|
-
"force-mount": props.forceMount
|
|
1338
|
-
}, {
|
|
1339
|
-
default: withCtx(() => [
|
|
1340
|
-
createVNode(unref(DialogContent), mergeProps({ ..._ctx.$attrs, ...unref(forwardedDialogProps) }, {
|
|
1341
|
-
id: panelId,
|
|
1342
|
-
class: ["ui-SidebarPanel r-mobile", mobileClass.value],
|
|
1343
|
-
style: sidebarStyle.value,
|
|
1344
|
-
onCloseAutoFocus: closeAutoFocus,
|
|
1345
|
-
onEscapeKeyDown: _cache[0] || (_cache[0] = ($event) => emits("escapeKeyDown", $event)),
|
|
1346
|
-
onFocusOutside: _cache[1] || (_cache[1] = ($event) => emits("focusOutside", $event)),
|
|
1347
|
-
onInteractOutside: _cache[2] || (_cache[2] = ($event) => emits("interactOutside", $event)),
|
|
1348
|
-
onOpenAutoFocus: _cache[3] || (_cache[3] = ($event) => emits("openAutoFocus", $event)),
|
|
1349
|
-
onPointerDownOutside: _cache[4] || (_cache[4] = ($event) => emits("pointerDownOutside", $event))
|
|
1350
|
-
}), {
|
|
1351
|
-
default: withCtx(() => [
|
|
1352
|
-
renderSlot(_ctx.$slots, "default", {
|
|
1353
|
-
open: open.value,
|
|
1354
|
-
collapsed: collapsed.value,
|
|
1355
|
-
isMobile: unref(isMobile),
|
|
1356
|
-
toggle
|
|
1357
|
-
}),
|
|
1358
|
-
createVNode(unref(DialogTitle), { class: "ui-SidebarVisuallyHidden" }, {
|
|
1359
|
-
default: withCtx(() => [
|
|
1360
|
-
createTextVNode(toDisplayString(props.mobileTitle), 1)
|
|
1361
|
-
]),
|
|
1362
|
-
_: 1
|
|
1363
|
-
}),
|
|
1364
|
-
createVNode(unref(DialogDescription), { class: "ui-SidebarVisuallyHidden" }, {
|
|
1365
|
-
default: withCtx(() => [
|
|
1366
|
-
createTextVNode(toDisplayString(props.mobileDescription), 1)
|
|
1367
|
-
]),
|
|
1368
|
-
_: 1
|
|
1369
|
-
})
|
|
1370
|
-
]),
|
|
1371
|
-
_: 3
|
|
1372
|
-
}, 16, ["class", "style"])
|
|
1373
|
-
]),
|
|
1374
|
-
_: 3
|
|
1375
|
-
}, 8, ["force-mount"])
|
|
1376
|
-
]),
|
|
1377
|
-
_: 3
|
|
1378
|
-
})
|
|
1379
|
-
]),
|
|
1380
|
-
_: 3
|
|
1381
|
-
}))
|
|
1382
|
-
]),
|
|
1383
|
-
_: 3
|
|
1384
|
-
}, 8, ["open"]);
|
|
1385
|
-
};
|
|
1386
|
-
}
|
|
1387
|
-
});
|
|
1388
|
-
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
1389
|
-
__name: "SidebarHeader",
|
|
1390
|
-
props: {
|
|
1391
|
-
asChild: { type: Boolean },
|
|
1392
|
-
as: { default: "header" }
|
|
1393
|
-
},
|
|
1394
|
-
setup(__props) {
|
|
1395
|
-
const props = __props;
|
|
1396
|
-
return (_ctx, _cache) => {
|
|
1397
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1398
|
-
class: "ui-SidebarHeader",
|
|
1399
|
-
as: props.as,
|
|
1400
|
-
"as-child": props.asChild
|
|
1401
|
-
}, {
|
|
1402
|
-
default: withCtx(() => [
|
|
1403
|
-
renderSlot(_ctx.$slots, "default")
|
|
1404
|
-
]),
|
|
1405
|
-
_: 3
|
|
1406
|
-
}, 8, ["as", "as-child"]);
|
|
1407
|
-
};
|
|
1408
|
-
}
|
|
1409
|
-
});
|
|
1410
|
-
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
1411
|
-
__name: "SidebarBody",
|
|
1412
|
-
props: {
|
|
1413
|
-
asChild: { type: Boolean },
|
|
1414
|
-
as: { default: "div" }
|
|
1415
|
-
},
|
|
1416
|
-
setup(__props) {
|
|
1417
|
-
const props = __props;
|
|
1418
|
-
return (_ctx, _cache) => {
|
|
1419
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1420
|
-
class: "ui-SidebarBody",
|
|
1421
|
-
as: props.as,
|
|
1422
|
-
"as-child": props.asChild
|
|
1423
|
-
}, {
|
|
1424
|
-
default: withCtx(() => [
|
|
1425
|
-
renderSlot(_ctx.$slots, "default")
|
|
1426
|
-
]),
|
|
1427
|
-
_: 3
|
|
1428
|
-
}, 8, ["as", "as-child"]);
|
|
1429
|
-
};
|
|
1430
|
-
}
|
|
1431
|
-
});
|
|
1432
|
-
const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
1433
|
-
__name: "SidebarFooter",
|
|
1434
|
-
props: {
|
|
1435
|
-
asChild: { type: Boolean },
|
|
1436
|
-
as: { default: "footer" }
|
|
1437
|
-
},
|
|
1438
|
-
setup(__props) {
|
|
1439
|
-
const props = __props;
|
|
1440
|
-
return (_ctx, _cache) => {
|
|
1441
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1442
|
-
class: "ui-SidebarFooter",
|
|
1443
|
-
as: props.as,
|
|
1444
|
-
"as-child": props.asChild
|
|
1445
|
-
}, {
|
|
1446
|
-
default: withCtx(() => [
|
|
1447
|
-
renderSlot(_ctx.$slots, "default")
|
|
1448
|
-
]),
|
|
1449
|
-
_: 3
|
|
1450
|
-
}, 8, ["as", "as-child"]);
|
|
1451
|
-
};
|
|
1452
|
-
}
|
|
1453
|
-
});
|
|
1454
|
-
const _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
1455
|
-
__name: "SidebarTrigger",
|
|
1456
|
-
props: {
|
|
1457
|
-
target: { default: "left" },
|
|
1458
|
-
label: {},
|
|
1459
|
-
disabled: { type: Boolean, default: false },
|
|
1460
|
-
asChild: { type: Boolean },
|
|
1461
|
-
as: { default: "button" }
|
|
1462
|
-
},
|
|
1463
|
-
setup(__props) {
|
|
1464
|
-
const props = __props;
|
|
1465
|
-
const provider = injectSidebarProviderContext();
|
|
1466
|
-
const target = computed(() => provider.sidebars[props.target]);
|
|
1467
|
-
const isDisabled = computed(() => props.disabled || !target.value || !provider.isMobile.value && target.value.collapsible.value === "none");
|
|
1468
|
-
const accessibleLabel = computed(() => {
|
|
1469
|
-
if (props.label)
|
|
1470
|
-
return props.label;
|
|
1471
|
-
if (provider.isMobile.value)
|
|
1472
|
-
return `${target.value?.open.value ? "Close" : "Open"} ${props.target} sidebar`;
|
|
1473
|
-
return `${target.value?.collapsed.value ? "Expand" : "Collapse"} ${props.target} sidebar`;
|
|
1474
|
-
});
|
|
1475
|
-
function toggle(event) {
|
|
1476
|
-
if (isDisabled.value || !target.value)
|
|
1477
|
-
return;
|
|
1478
|
-
target.value.lastTrigger.value = event.currentTarget;
|
|
1479
|
-
target.value.toggle();
|
|
1480
|
-
}
|
|
1481
|
-
return (_ctx, _cache) => {
|
|
1482
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1483
|
-
class: "ui-SidebarTrigger",
|
|
1484
|
-
as: props.as,
|
|
1485
|
-
"as-child": props.asChild,
|
|
1486
|
-
type: props.as === "button" ? "button" : void 0,
|
|
1487
|
-
disabled: isDisabled.value && props.as === "button" ? true : void 0,
|
|
1488
|
-
"data-disabled": isDisabled.value ? true : void 0,
|
|
1489
|
-
"aria-disabled": isDisabled.value ? true : void 0,
|
|
1490
|
-
"data-mobile": unref(provider).isMobile.value,
|
|
1491
|
-
"data-collapsible": target.value?.collapsible.value,
|
|
1492
|
-
"data-target": props.target,
|
|
1493
|
-
"aria-label": accessibleLabel.value,
|
|
1494
|
-
"aria-controls": target.value?.panelId,
|
|
1495
|
-
"aria-expanded": unref(provider).isMobile.value ? target.value?.open.value ?? false : !(target.value?.collapsed.value ?? true),
|
|
1496
|
-
"aria-haspopup": unref(provider).isMobile.value ? "dialog" : void 0,
|
|
1497
|
-
onClick: toggle
|
|
1498
|
-
}, {
|
|
1499
|
-
default: withCtx(() => [
|
|
1500
|
-
renderSlot(_ctx.$slots, "default", {
|
|
1501
|
-
open: target.value?.open.value ?? false,
|
|
1502
|
-
collapsed: target.value?.collapsed.value ?? false,
|
|
1503
|
-
isMobile: unref(provider).isMobile.value,
|
|
1504
|
-
target: props.target
|
|
1505
|
-
}, () => [
|
|
1506
|
-
createVNode(unref(Icon), {
|
|
1507
|
-
class: "ui-SidebarTriggerIcon",
|
|
1508
|
-
icon: props.target === "right" ? "lucide:panel-right" : "lucide:panel-left",
|
|
1509
|
-
"aria-hidden": "true"
|
|
1510
|
-
}, null, 8, ["icon"])
|
|
1511
|
-
])
|
|
1512
|
-
]),
|
|
1513
|
-
_: 3
|
|
1514
|
-
}, 8, ["as", "as-child", "type", "disabled", "data-disabled", "aria-disabled", "data-mobile", "data-collapsible", "data-target", "aria-label", "aria-controls", "aria-expanded", "aria-haspopup"]);
|
|
1515
|
-
};
|
|
1516
|
-
}
|
|
1517
|
-
});
|
|
1518
|
-
const _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
1519
|
-
__name: "SidebarRail",
|
|
1520
|
-
props: {
|
|
1521
|
-
label: {},
|
|
1522
|
-
disabled: { type: Boolean, default: false },
|
|
1523
|
-
asChild: { type: Boolean },
|
|
1524
|
-
as: { default: "button" }
|
|
1525
|
-
},
|
|
1526
|
-
setup(__props) {
|
|
1527
|
-
const props = __props;
|
|
1528
|
-
const context = injectSidebarContext();
|
|
1529
|
-
const isDisabled = computed(() => props.disabled || context.collapsible.value === "none");
|
|
1530
|
-
const accessibleLabel = computed(() => props.label ?? `${context.collapsed.value ? "Expand" : "Collapse"} ${context.side.value} sidebar`);
|
|
1531
|
-
return (_ctx, _cache) => {
|
|
1532
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1533
|
-
class: "ui-SidebarRail",
|
|
1534
|
-
as: props.as,
|
|
1535
|
-
"as-child": props.asChild,
|
|
1536
|
-
type: props.as === "button" ? "button" : void 0,
|
|
1537
|
-
disabled: isDisabled.value && props.as === "button" ? true : void 0,
|
|
1538
|
-
"data-disabled": isDisabled.value ? true : void 0,
|
|
1539
|
-
"aria-disabled": isDisabled.value ? true : void 0,
|
|
1540
|
-
"aria-label": accessibleLabel.value,
|
|
1541
|
-
"aria-controls": unref(context).panelId,
|
|
1542
|
-
"aria-expanded": !unref(context).collapsed.value,
|
|
1543
|
-
onClick: _cache[0] || (_cache[0] = ($event) => !isDisabled.value && unref(context).toggleCollapsed())
|
|
1544
|
-
}, {
|
|
1545
|
-
default: withCtx(() => [
|
|
1546
|
-
renderSlot(_ctx.$slots, "default", {
|
|
1547
|
-
collapsed: unref(context).collapsed.value
|
|
1548
|
-
})
|
|
1549
|
-
]),
|
|
1550
|
-
_: 3
|
|
1551
|
-
}, 8, ["as", "as-child", "type", "disabled", "data-disabled", "aria-disabled", "aria-label", "aria-controls", "aria-expanded"]);
|
|
1552
|
-
};
|
|
1553
|
-
}
|
|
1554
|
-
});
|
|
1555
|
-
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
1556
|
-
__name: "SidebarInset",
|
|
1557
|
-
props: {
|
|
1558
|
-
asChild: { type: Boolean },
|
|
1559
|
-
as: { default: "main" }
|
|
1560
|
-
},
|
|
1561
|
-
setup(__props) {
|
|
1562
|
-
const props = __props;
|
|
1563
|
-
return (_ctx, _cache) => {
|
|
1564
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1565
|
-
class: "ui-SidebarInset",
|
|
1566
|
-
as: props.as,
|
|
1567
|
-
"as-child": props.asChild
|
|
1568
|
-
}, {
|
|
1569
|
-
default: withCtx(() => [
|
|
1570
|
-
renderSlot(_ctx.$slots, "default")
|
|
1571
|
-
]),
|
|
1572
|
-
_: 3
|
|
1573
|
-
}, 8, ["as", "as-child"]);
|
|
1574
|
-
};
|
|
1575
|
-
}
|
|
1576
|
-
});
|
|
1577
|
-
const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
1578
|
-
__name: "SidebarGroup",
|
|
1579
|
-
props: {
|
|
1580
|
-
asChild: { type: Boolean },
|
|
1581
|
-
as: { default: "div" }
|
|
1582
|
-
},
|
|
1583
|
-
setup(__props) {
|
|
1584
|
-
const props = __props;
|
|
1585
|
-
return (_ctx, _cache) => {
|
|
1586
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1587
|
-
class: "ui-SidebarGroup",
|
|
1588
|
-
as: props.as,
|
|
1589
|
-
"as-child": props.asChild
|
|
1590
|
-
}, {
|
|
1591
|
-
default: withCtx(() => [
|
|
1592
|
-
renderSlot(_ctx.$slots, "default")
|
|
1593
|
-
]),
|
|
1594
|
-
_: 3
|
|
1595
|
-
}, 8, ["as", "as-child"]);
|
|
1596
|
-
};
|
|
1597
|
-
}
|
|
1598
|
-
});
|
|
1599
|
-
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
1600
|
-
__name: "SidebarGroupLabel",
|
|
1601
|
-
props: {
|
|
1602
|
-
asChild: { type: Boolean },
|
|
1603
|
-
as: { default: "div" }
|
|
1604
|
-
},
|
|
1605
|
-
setup(__props) {
|
|
1606
|
-
const props = __props;
|
|
1607
|
-
return (_ctx, _cache) => {
|
|
1608
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1609
|
-
class: "ui-SidebarGroupLabel",
|
|
1610
|
-
as: props.as,
|
|
1611
|
-
"as-child": props.asChild
|
|
1612
|
-
}, {
|
|
1613
|
-
default: withCtx(() => [
|
|
1614
|
-
renderSlot(_ctx.$slots, "default")
|
|
1615
|
-
]),
|
|
1616
|
-
_: 3
|
|
1617
|
-
}, 8, ["as", "as-child"]);
|
|
1618
|
-
};
|
|
1619
|
-
}
|
|
1620
|
-
});
|
|
1621
|
-
const [injectSidebarMenuContext, provideSidebarMenuContext] = createContext("ui:SidebarMenu");
|
|
1622
|
-
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
1623
|
-
__name: "SidebarMenu",
|
|
1624
|
-
props: {
|
|
1625
|
-
size: { default: "2" },
|
|
1626
|
-
color: {},
|
|
1627
|
-
asChild: { type: Boolean },
|
|
1628
|
-
as: { default: "ul" }
|
|
1629
|
-
},
|
|
1630
|
-
setup(__props) {
|
|
1631
|
-
const props = __props;
|
|
1632
|
-
const forwarded = useForwardPropsWithout(props, ["size", "color"]);
|
|
1633
|
-
const resetClass = buildPropsClass(props, ["size"]);
|
|
1634
|
-
const { size, color } = toRefs(props);
|
|
1635
|
-
provideSidebarMenuContext({ size, color });
|
|
1636
|
-
return (_ctx, _cache) => {
|
|
1637
|
-
return openBlock(), createBlock(unref(Primitive), mergeProps(unref(forwarded), {
|
|
1638
|
-
class: ["ui-SidebarMenu", unref(resetClass)],
|
|
1639
|
-
"data-accent-color": props.color
|
|
1640
|
-
}), {
|
|
1641
|
-
default: withCtx(() => [
|
|
1642
|
-
renderSlot(_ctx.$slots, "default")
|
|
1643
|
-
]),
|
|
1644
|
-
_: 3
|
|
1645
|
-
}, 16, ["class", "data-accent-color"]);
|
|
1646
|
-
};
|
|
1647
|
-
}
|
|
1648
|
-
});
|
|
1649
|
-
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
1650
|
-
__name: "SidebarMenuItem",
|
|
1651
|
-
props: {
|
|
1652
|
-
asChild: { type: Boolean },
|
|
1653
|
-
as: { default: "li" }
|
|
1654
|
-
},
|
|
1655
|
-
setup(__props) {
|
|
1656
|
-
const props = __props;
|
|
1657
|
-
return (_ctx, _cache) => {
|
|
1658
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1659
|
-
class: "ui-SidebarMenuItem",
|
|
1660
|
-
as: props.as,
|
|
1661
|
-
"as-child": props.asChild
|
|
1662
|
-
}, {
|
|
1663
|
-
default: withCtx(() => [
|
|
1664
|
-
renderSlot(_ctx.$slots, "default")
|
|
1665
|
-
]),
|
|
1666
|
-
_: 3
|
|
1667
|
-
}, 8, ["as", "as-child"]);
|
|
1668
|
-
};
|
|
1669
|
-
}
|
|
1670
|
-
});
|
|
1671
|
-
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
1672
|
-
__name: "SidebarMenuButtonContent",
|
|
1673
|
-
props: {
|
|
1674
|
-
icon: {},
|
|
1675
|
-
text: {},
|
|
1676
|
-
trailingIcon: {},
|
|
1677
|
-
isSub: { type: Boolean, default: false }
|
|
1678
|
-
},
|
|
1679
|
-
setup(__props) {
|
|
1680
|
-
const props = __props;
|
|
1681
|
-
const part = computed(() => props.isSub ? "ui-SidebarMenuSubButton" : "ui-SidebarMenuButton");
|
|
1682
|
-
return (_ctx, _cache) => {
|
|
1683
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
1684
|
-
_ctx.$slots.icon || props.icon ? (openBlock(), createElementBlock("span", {
|
|
1685
|
-
key: 0,
|
|
1686
|
-
class: normalizeClass(`${part.value}Icon`)
|
|
1687
|
-
}, [
|
|
1688
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
1689
|
-
createVNode(unref(Icon), {
|
|
1690
|
-
class: normalizeClass(`${part.value}IconGraphic`),
|
|
1691
|
-
icon: props.icon,
|
|
1692
|
-
"aria-hidden": "true"
|
|
1693
|
-
}, null, 8, ["class", "icon"])
|
|
1694
|
-
])
|
|
1695
|
-
], 2)) : createCommentVNode("", true),
|
|
1696
|
-
_ctx.$slots.text || _ctx.$slots.default || props.text ? (openBlock(), createElementBlock("span", {
|
|
1697
|
-
key: 1,
|
|
1698
|
-
class: normalizeClass(`${part.value}Text`)
|
|
1699
|
-
}, [
|
|
1700
|
-
renderSlot(_ctx.$slots, "text", {}, () => [
|
|
1701
|
-
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
1702
|
-
createTextVNode(toDisplayString(props.text), 1)
|
|
1703
|
-
])
|
|
1704
|
-
])
|
|
1705
|
-
], 2)) : createCommentVNode("", true),
|
|
1706
|
-
_ctx.$slots.trailing || props.trailingIcon ? (openBlock(), createElementBlock("span", {
|
|
1707
|
-
key: 2,
|
|
1708
|
-
class: normalizeClass(`${part.value}Trailing`)
|
|
1709
|
-
}, [
|
|
1710
|
-
renderSlot(_ctx.$slots, "trailing", {}, () => [
|
|
1711
|
-
createVNode(unref(Icon), {
|
|
1712
|
-
class: normalizeClass(`${part.value}TrailingIcon`),
|
|
1713
|
-
icon: props.trailingIcon,
|
|
1714
|
-
"aria-hidden": "true"
|
|
1715
|
-
}, null, 8, ["class", "icon"])
|
|
1716
|
-
])
|
|
1717
|
-
], 2)) : createCommentVNode("", true)
|
|
1718
|
-
], 64);
|
|
1719
|
-
};
|
|
1720
|
-
}
|
|
1721
|
-
});
|
|
1722
|
-
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
1723
|
-
...{ inheritAttrs: false },
|
|
1724
|
-
__name: "SidebarMenuButton",
|
|
1725
|
-
props: {
|
|
1726
|
-
icon: {},
|
|
1727
|
-
text: {},
|
|
1728
|
-
trailingIcon: {},
|
|
1729
|
-
active: { type: Boolean, default: false },
|
|
1730
|
-
disabled: { type: Boolean, default: false },
|
|
1731
|
-
tooltip: { type: [String, Boolean] },
|
|
1732
|
-
asChild: { type: Boolean },
|
|
1733
|
-
as: { default: "button" }
|
|
1734
|
-
},
|
|
1735
|
-
setup(__props) {
|
|
1736
|
-
const props = __props;
|
|
1737
|
-
const context = injectSidebarContext();
|
|
1738
|
-
injectSidebarMenuContext();
|
|
1739
|
-
const tooltip = computed(() => props.tooltip === false ? void 0 : props.tooltip ?? props.text);
|
|
1740
|
-
const showTooltip = computed(() => Boolean(tooltip.value) && !props.disabled && !context.isMobile.value && context.collapsible.value === "icon" && context.collapsed.value);
|
|
1741
|
-
const tooltipSide = computed(() => context.side.value === "left" ? "right" : "left");
|
|
1742
|
-
function preventDisabled(event) {
|
|
1743
|
-
if (!props.disabled)
|
|
1744
|
-
return;
|
|
1745
|
-
event.preventDefault();
|
|
1746
|
-
event.stopImmediatePropagation();
|
|
1747
|
-
}
|
|
1748
|
-
return (_ctx, _cache) => {
|
|
1749
|
-
return showTooltip.value ? (openBlock(), createBlock(_sfc_main$1h, {
|
|
1750
|
-
key: 0,
|
|
1751
|
-
"as-child": "",
|
|
1752
|
-
content: tooltip.value,
|
|
1753
|
-
side: tooltipSide.value,
|
|
1754
|
-
"side-offset": 8
|
|
1755
|
-
}, {
|
|
1756
|
-
default: withCtx(() => [
|
|
1757
|
-
createVNode(unref(Primitive), mergeProps(_ctx.$attrs, {
|
|
1758
|
-
class: "ui-SidebarMenuButton",
|
|
1759
|
-
as: props.as,
|
|
1760
|
-
"as-child": props.asChild,
|
|
1761
|
-
type: props.as === "button" && !props.asChild ? "button" : void 0,
|
|
1762
|
-
disabled: props.disabled && props.as === "button" && !props.asChild ? true : void 0,
|
|
1763
|
-
"data-active": props.active ? true : void 0,
|
|
1764
|
-
"data-disabled": props.disabled ? true : void 0,
|
|
1765
|
-
"aria-disabled": props.disabled ? true : void 0,
|
|
1766
|
-
onClick: preventDisabled
|
|
1767
|
-
}), {
|
|
1768
|
-
default: withCtx(() => [
|
|
1769
|
-
props.asChild ? renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 0) : (openBlock(), createBlock(_sfc_main$S, {
|
|
1770
|
-
key: 1,
|
|
1771
|
-
icon: props.icon,
|
|
1772
|
-
text: props.text,
|
|
1773
|
-
"trailing-icon": props.trailingIcon
|
|
1774
|
-
}, createSlots({ _: 2 }, [
|
|
1775
|
-
_ctx.$slots.icon ? {
|
|
1776
|
-
name: "icon",
|
|
1777
|
-
fn: withCtx(() => [
|
|
1778
|
-
renderSlot(_ctx.$slots, "icon")
|
|
1779
|
-
]),
|
|
1780
|
-
key: "0"
|
|
1781
|
-
} : void 0,
|
|
1782
|
-
_ctx.$slots.text ? {
|
|
1783
|
-
name: "text",
|
|
1784
|
-
fn: withCtx(() => [
|
|
1785
|
-
renderSlot(_ctx.$slots, "text")
|
|
1786
|
-
]),
|
|
1787
|
-
key: "1"
|
|
1788
|
-
} : void 0,
|
|
1789
|
-
_ctx.$slots.default ? {
|
|
1790
|
-
name: "default",
|
|
1791
|
-
fn: withCtx(() => [
|
|
1792
|
-
renderSlot(_ctx.$slots, "default")
|
|
1793
|
-
]),
|
|
1794
|
-
key: "2"
|
|
1795
|
-
} : void 0,
|
|
1796
|
-
_ctx.$slots.trailing ? {
|
|
1797
|
-
name: "trailing",
|
|
1798
|
-
fn: withCtx(() => [
|
|
1799
|
-
renderSlot(_ctx.$slots, "trailing")
|
|
1800
|
-
]),
|
|
1801
|
-
key: "3"
|
|
1802
|
-
} : void 0
|
|
1803
|
-
]), 1032, ["icon", "text", "trailing-icon"]))
|
|
1804
|
-
]),
|
|
1805
|
-
_: 3
|
|
1806
|
-
}, 16, ["as", "as-child", "type", "disabled", "data-active", "data-disabled", "aria-disabled"])
|
|
1807
|
-
]),
|
|
1808
|
-
_: 3
|
|
1809
|
-
}, 8, ["content", "side"])) : (openBlock(), createBlock(unref(Primitive), mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
1810
|
-
class: "ui-SidebarMenuButton",
|
|
1811
|
-
as: props.as,
|
|
1812
|
-
"as-child": props.asChild,
|
|
1813
|
-
type: props.as === "button" && !props.asChild ? "button" : void 0,
|
|
1814
|
-
disabled: props.disabled && props.as === "button" && !props.asChild ? true : void 0,
|
|
1815
|
-
"data-active": props.active ? true : void 0,
|
|
1816
|
-
"data-disabled": props.disabled ? true : void 0,
|
|
1817
|
-
"aria-disabled": props.disabled ? true : void 0,
|
|
1818
|
-
onClick: preventDisabled
|
|
1819
|
-
}), {
|
|
1820
|
-
default: withCtx(() => [
|
|
1821
|
-
props.asChild ? renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 0) : (openBlock(), createBlock(_sfc_main$S, {
|
|
1822
|
-
key: 1,
|
|
1823
|
-
icon: props.icon,
|
|
1824
|
-
text: props.text,
|
|
1825
|
-
"trailing-icon": props.trailingIcon
|
|
1826
|
-
}, createSlots({ _: 2 }, [
|
|
1827
|
-
_ctx.$slots.icon ? {
|
|
1828
|
-
name: "icon",
|
|
1829
|
-
fn: withCtx(() => [
|
|
1830
|
-
renderSlot(_ctx.$slots, "icon")
|
|
1831
|
-
]),
|
|
1832
|
-
key: "0"
|
|
1833
|
-
} : void 0,
|
|
1834
|
-
_ctx.$slots.text ? {
|
|
1835
|
-
name: "text",
|
|
1836
|
-
fn: withCtx(() => [
|
|
1837
|
-
renderSlot(_ctx.$slots, "text")
|
|
1838
|
-
]),
|
|
1839
|
-
key: "1"
|
|
1840
|
-
} : void 0,
|
|
1841
|
-
_ctx.$slots.default ? {
|
|
1842
|
-
name: "default",
|
|
1843
|
-
fn: withCtx(() => [
|
|
1844
|
-
renderSlot(_ctx.$slots, "default")
|
|
1845
|
-
]),
|
|
1846
|
-
key: "2"
|
|
1847
|
-
} : void 0,
|
|
1848
|
-
_ctx.$slots.trailing ? {
|
|
1849
|
-
name: "trailing",
|
|
1850
|
-
fn: withCtx(() => [
|
|
1851
|
-
renderSlot(_ctx.$slots, "trailing")
|
|
1852
|
-
]),
|
|
1853
|
-
key: "3"
|
|
1854
|
-
} : void 0
|
|
1855
|
-
]), 1032, ["icon", "text", "trailing-icon"]))
|
|
1856
|
-
]),
|
|
1857
|
-
_: 3
|
|
1858
|
-
}, 16, ["as", "as-child", "type", "disabled", "data-active", "data-disabled", "aria-disabled"]));
|
|
1859
|
-
};
|
|
1860
|
-
}
|
|
1861
|
-
});
|
|
1862
|
-
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
1863
|
-
__name: "SidebarMenuSub",
|
|
1864
|
-
props: {
|
|
1865
|
-
asChild: { type: Boolean },
|
|
1866
|
-
as: { default: "ul" }
|
|
1867
|
-
},
|
|
1868
|
-
setup(__props) {
|
|
1869
|
-
const props = __props;
|
|
1870
|
-
return (_ctx, _cache) => {
|
|
1871
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1872
|
-
class: "ui-SidebarMenuSub",
|
|
1873
|
-
as: props.as,
|
|
1874
|
-
"as-child": props.asChild
|
|
1875
|
-
}, {
|
|
1876
|
-
default: withCtx(() => [
|
|
1877
|
-
renderSlot(_ctx.$slots, "default")
|
|
1878
|
-
]),
|
|
1879
|
-
_: 3
|
|
1880
|
-
}, 8, ["as", "as-child"]);
|
|
1881
|
-
};
|
|
1882
|
-
}
|
|
1883
|
-
});
|
|
1884
|
-
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
1885
|
-
__name: "SidebarMenuSubItem",
|
|
1886
|
-
props: {
|
|
1887
|
-
asChild: { type: Boolean },
|
|
1888
|
-
as: { default: "li" }
|
|
1889
|
-
},
|
|
1890
|
-
setup(__props) {
|
|
1891
|
-
const props = __props;
|
|
1892
|
-
return (_ctx, _cache) => {
|
|
1893
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
1894
|
-
class: "ui-SidebarMenuSubItem",
|
|
1895
|
-
as: props.as,
|
|
1896
|
-
"as-child": props.asChild
|
|
1897
|
-
}, {
|
|
1898
|
-
default: withCtx(() => [
|
|
1899
|
-
renderSlot(_ctx.$slots, "default")
|
|
1900
|
-
]),
|
|
1901
|
-
_: 3
|
|
1902
|
-
}, 8, ["as", "as-child"]);
|
|
1903
|
-
};
|
|
1904
|
-
}
|
|
1905
|
-
});
|
|
1906
|
-
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
1907
|
-
...{ inheritAttrs: false },
|
|
1908
|
-
__name: "SidebarMenuSubButton",
|
|
1909
|
-
props: {
|
|
1910
|
-
icon: {},
|
|
1911
|
-
text: {},
|
|
1912
|
-
trailingIcon: {},
|
|
1913
|
-
active: { type: Boolean, default: false },
|
|
1914
|
-
disabled: { type: Boolean, default: false },
|
|
1915
|
-
asChild: { type: Boolean },
|
|
1916
|
-
as: { default: "button" }
|
|
1917
|
-
},
|
|
1918
|
-
setup(__props) {
|
|
1919
|
-
const props = __props;
|
|
1920
|
-
injectSidebarMenuContext();
|
|
1921
|
-
function preventDisabled(event) {
|
|
1922
|
-
if (!props.disabled)
|
|
1923
|
-
return;
|
|
1924
|
-
event.preventDefault();
|
|
1925
|
-
event.stopImmediatePropagation();
|
|
1926
|
-
}
|
|
1927
|
-
return (_ctx, _cache) => {
|
|
1928
|
-
return openBlock(), createBlock(unref(Primitive), mergeProps(_ctx.$attrs, {
|
|
1929
|
-
class: "ui-SidebarMenuSubButton",
|
|
1930
|
-
as: props.as,
|
|
1931
|
-
"as-child": props.asChild,
|
|
1932
|
-
type: props.as === "button" && !props.asChild ? "button" : void 0,
|
|
1933
|
-
disabled: props.disabled && props.as === "button" && !props.asChild ? true : void 0,
|
|
1934
|
-
"data-active": props.active ? true : void 0,
|
|
1935
|
-
"data-disabled": props.disabled ? true : void 0,
|
|
1936
|
-
"aria-disabled": props.disabled ? true : void 0,
|
|
1937
|
-
onClick: preventDisabled
|
|
1938
|
-
}), {
|
|
1939
|
-
default: withCtx(() => [
|
|
1940
|
-
props.asChild ? renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 0) : (openBlock(), createBlock(_sfc_main$S, {
|
|
1941
|
-
key: 1,
|
|
1942
|
-
"is-sub": "",
|
|
1943
|
-
icon: props.icon,
|
|
1944
|
-
text: props.text,
|
|
1945
|
-
"trailing-icon": props.trailingIcon
|
|
1946
|
-
}, createSlots({ _: 2 }, [
|
|
1947
|
-
_ctx.$slots.icon ? {
|
|
1948
|
-
name: "icon",
|
|
1949
|
-
fn: withCtx(() => [
|
|
1950
|
-
renderSlot(_ctx.$slots, "icon")
|
|
1951
|
-
]),
|
|
1952
|
-
key: "0"
|
|
1953
|
-
} : void 0,
|
|
1954
|
-
_ctx.$slots.text ? {
|
|
1955
|
-
name: "text",
|
|
1956
|
-
fn: withCtx(() => [
|
|
1957
|
-
renderSlot(_ctx.$slots, "text")
|
|
1958
|
-
]),
|
|
1959
|
-
key: "1"
|
|
1960
|
-
} : void 0,
|
|
1961
|
-
_ctx.$slots.default ? {
|
|
1962
|
-
name: "default",
|
|
1963
|
-
fn: withCtx(() => [
|
|
1964
|
-
renderSlot(_ctx.$slots, "default")
|
|
1965
|
-
]),
|
|
1966
|
-
key: "2"
|
|
1967
|
-
} : void 0,
|
|
1968
|
-
_ctx.$slots.trailing ? {
|
|
1969
|
-
name: "trailing",
|
|
1970
|
-
fn: withCtx(() => [
|
|
1971
|
-
renderSlot(_ctx.$slots, "trailing")
|
|
1972
|
-
]),
|
|
1973
|
-
key: "3"
|
|
1974
|
-
} : void 0
|
|
1975
|
-
]), 1032, ["icon", "text", "trailing-icon"]))
|
|
1976
|
-
]),
|
|
1977
|
-
_: 3
|
|
1978
|
-
}, 16, ["as", "as-child", "type", "disabled", "data-active", "data-disabled", "aria-disabled"]);
|
|
1979
|
-
};
|
|
1980
|
-
}
|
|
1981
|
-
});
|
|
1982
|
-
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
1983
|
-
__name: "Switch",
|
|
1984
|
-
props: {
|
|
1985
|
-
color: {},
|
|
1986
|
-
variant: { default: "surface" },
|
|
1987
|
-
size: { default: "2" },
|
|
1988
|
-
highContrast: { type: Boolean },
|
|
1989
|
-
radius: {},
|
|
1990
|
-
defaultValue: {},
|
|
1991
|
-
modelValue: {},
|
|
1992
|
-
disabled: { type: Boolean },
|
|
1993
|
-
id: {},
|
|
1994
|
-
value: {},
|
|
1995
|
-
trueValue: {},
|
|
1996
|
-
falseValue: {},
|
|
1997
|
-
asChild: { type: Boolean },
|
|
1998
|
-
as: {},
|
|
1999
|
-
name: {},
|
|
2000
|
-
required: { type: Boolean }
|
|
2001
|
-
},
|
|
2002
|
-
emits: ["update:modelValue"],
|
|
2003
|
-
setup(__props, { emit: __emit }) {
|
|
2004
|
-
const emits = __emit;
|
|
2005
|
-
const props = __props;
|
|
2006
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["color", "size", "variant", "highContrast", "radius"]);
|
|
2007
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "highContrast"]);
|
|
2008
|
-
return (_ctx, _cache) => {
|
|
2009
|
-
return openBlock(), createBlock(unref(SwitchRoot), mergeProps(unref(forwarded), {
|
|
2010
|
-
class: ["ui-Switch", unref(resetClass)],
|
|
2011
|
-
"data-accent-color": props.color,
|
|
2012
|
-
"data-radius": props.radius
|
|
2013
|
-
}), {
|
|
2014
|
-
default: withCtx(() => [
|
|
2015
|
-
createVNode(unref(SwitchThumb), { class: "ui-SwitchThumb" }, {
|
|
2016
|
-
default: withCtx(() => [
|
|
2017
|
-
renderSlot(_ctx.$slots, "default")
|
|
2018
|
-
]),
|
|
2019
|
-
_: 3
|
|
2020
|
-
})
|
|
2021
|
-
]),
|
|
2022
|
-
_: 3
|
|
2023
|
-
}, 16, ["class", "data-accent-color", "data-radius"]);
|
|
2024
|
-
};
|
|
2025
|
-
}
|
|
2026
|
-
});
|
|
2027
|
-
const _hoisted_1$r = {
|
|
2028
|
-
width: "9",
|
|
2029
|
-
height: "9",
|
|
2030
|
-
viewBox: "0 0 9 9",
|
|
2031
|
-
fill: "currentcolor",
|
|
2032
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2033
|
-
};
|
|
2034
|
-
const _hoisted_2$6 = {
|
|
2035
|
-
key: 0,
|
|
2036
|
-
fillRule: "evenodd",
|
|
2037
|
-
clipRule: "evenodd",
|
|
2038
|
-
d: "M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z"
|
|
2039
|
-
};
|
|
2040
|
-
const _hoisted_3$2 = {
|
|
2041
|
-
key: 1,
|
|
2042
|
-
fillRule: "evenodd",
|
|
2043
|
-
clipRule: "evenodd",
|
|
2044
|
-
d: "M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z"
|
|
2045
|
-
};
|
|
2046
|
-
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
2047
|
-
__name: "Checkbox",
|
|
2048
|
-
props: {
|
|
2049
|
-
color: {},
|
|
2050
|
-
variant: { default: "surface" },
|
|
2051
|
-
size: { default: "2" },
|
|
2052
|
-
highContrast: { type: Boolean },
|
|
2053
|
-
defaultValue: {},
|
|
2054
|
-
modelValue: {},
|
|
2055
|
-
disabled: { type: Boolean },
|
|
2056
|
-
value: {},
|
|
2057
|
-
id: {},
|
|
2058
|
-
trueValue: {},
|
|
2059
|
-
falseValue: {},
|
|
2060
|
-
asChild: { type: Boolean },
|
|
2061
|
-
as: {},
|
|
2062
|
-
name: {},
|
|
2063
|
-
required: { type: Boolean }
|
|
2064
|
-
},
|
|
2065
|
-
emits: ["update:modelValue"],
|
|
2066
|
-
setup(__props, { emit: __emit }) {
|
|
2067
|
-
const emits = __emit;
|
|
2068
|
-
const props = __props;
|
|
2069
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["color", "size", "variant", "highContrast"]);
|
|
2070
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "highContrast"]);
|
|
2071
|
-
return (_ctx, _cache) => {
|
|
2072
|
-
return openBlock(), createBlock(unref(CheckboxRoot), mergeProps(unref(forwarded), {
|
|
2073
|
-
class: ["ui-Checkbox", unref(resetClass)],
|
|
2074
|
-
"data-accent-color": props.color
|
|
2075
|
-
}), {
|
|
2076
|
-
default: withCtx(({ state }) => [
|
|
2077
|
-
createVNode(unref(CheckboxIndicator), {
|
|
2078
|
-
class: "ui-CheckboxIndicator",
|
|
2079
|
-
"as-child": ""
|
|
2080
|
-
}, {
|
|
2081
|
-
default: withCtx(() => [
|
|
2082
|
-
(openBlock(), createElementBlock("svg", _hoisted_1$r, [
|
|
2083
|
-
state === "indeterminate" ? (openBlock(), createElementBlock("path", _hoisted_2$6)) : (openBlock(), createElementBlock("path", _hoisted_3$2))
|
|
2084
|
-
]))
|
|
2085
|
-
]),
|
|
2086
|
-
_: 2
|
|
2087
|
-
}, 1024)
|
|
2088
|
-
]),
|
|
2089
|
-
_: 1
|
|
2090
|
-
}, 16, ["class", "data-accent-color"]);
|
|
2091
|
-
};
|
|
2092
|
-
}
|
|
2093
|
-
});
|
|
2094
|
-
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
2095
|
-
__name: "Toggle",
|
|
2096
|
-
props: {
|
|
2097
|
-
variant: { default: "soft" },
|
|
2098
|
-
color: {},
|
|
2099
|
-
radius: {},
|
|
2100
|
-
size: { default: "2" },
|
|
2101
|
-
highContrast: { type: Boolean },
|
|
2102
|
-
defaultValue: { type: Boolean },
|
|
2103
|
-
modelValue: { type: [Boolean, null] },
|
|
2104
|
-
disabled: { type: Boolean },
|
|
2105
|
-
asChild: { type: Boolean },
|
|
2106
|
-
as: {},
|
|
2107
|
-
name: {},
|
|
2108
|
-
required: { type: Boolean }
|
|
2109
|
-
},
|
|
2110
|
-
emits: ["update:modelValue"],
|
|
2111
|
-
setup(__props, { emit: __emit }) {
|
|
2112
|
-
const emits = __emit;
|
|
2113
|
-
const props = __props;
|
|
2114
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["color", "size", "variant", "highContrast", "radius"]);
|
|
2115
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "highContrast"]);
|
|
2116
|
-
return (_ctx, _cache) => {
|
|
2117
|
-
return openBlock(), createBlock(unref(Toggle), mergeProps(unref(forwarded), {
|
|
2118
|
-
class: ["ui-Toggle", unref(resetClass)],
|
|
2119
|
-
"data-accent-color": props.color,
|
|
2120
|
-
"data-radius": props.radius
|
|
2121
|
-
}), {
|
|
2122
|
-
default: withCtx(() => [
|
|
2123
|
-
renderSlot(_ctx.$slots, "default")
|
|
2124
|
-
]),
|
|
2125
|
-
_: 3
|
|
2126
|
-
}, 16, ["class", "data-accent-color", "data-radius"]);
|
|
2127
|
-
};
|
|
2128
|
-
}
|
|
2129
|
-
});
|
|
2130
|
-
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
2131
|
-
__name: "ToggleGroupRoot",
|
|
2132
|
-
props: {
|
|
2133
|
-
variant: { default: "solid" },
|
|
2134
|
-
color: {},
|
|
2135
|
-
size: { default: "2" },
|
|
2136
|
-
highContrast: { type: Boolean },
|
|
2137
|
-
radius: {},
|
|
2138
|
-
rovingFocus: { type: Boolean },
|
|
2139
|
-
disabled: { type: Boolean },
|
|
2140
|
-
orientation: {},
|
|
2141
|
-
dir: {},
|
|
2142
|
-
loop: { type: Boolean },
|
|
2143
|
-
asChild: { type: Boolean },
|
|
2144
|
-
as: {},
|
|
2145
|
-
name: {},
|
|
2146
|
-
required: { type: Boolean },
|
|
2147
|
-
type: {},
|
|
2148
|
-
modelValue: {},
|
|
2149
|
-
defaultValue: {}
|
|
2150
|
-
},
|
|
2151
|
-
emits: ["update:modelValue"],
|
|
2152
|
-
setup(__props, { emit: __emit }) {
|
|
2153
|
-
const emits = __emit;
|
|
2154
|
-
const props = __props;
|
|
2155
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["color", "size", "variant", "highContrast", "radius"]);
|
|
2156
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "highContrast"]);
|
|
2157
|
-
return (_ctx, _cache) => {
|
|
2158
|
-
return openBlock(), createBlock(unref(ToggleGroupRoot), mergeProps(unref(forwarded), {
|
|
2159
|
-
class: ["ui-ToggleGroupRoot", unref(resetClass)],
|
|
2160
|
-
"data-accent-color": props.color,
|
|
2161
|
-
"data-radius": props.radius
|
|
2162
|
-
}), {
|
|
2163
|
-
default: withCtx(() => [
|
|
2164
|
-
renderSlot(_ctx.$slots, "default")
|
|
2165
|
-
]),
|
|
2166
|
-
_: 3
|
|
2167
|
-
}, 16, ["class", "data-accent-color", "data-radius"]);
|
|
2168
|
-
};
|
|
2169
|
-
}
|
|
2170
|
-
});
|
|
2171
|
-
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
2172
|
-
__name: "ToggleGroupItem",
|
|
2173
|
-
props: {
|
|
2174
|
-
value: {},
|
|
2175
|
-
disabled: { type: Boolean },
|
|
2176
|
-
asChild: { type: Boolean },
|
|
2177
|
-
as: {}
|
|
2178
|
-
},
|
|
2179
|
-
setup(__props) {
|
|
2180
|
-
const props = __props;
|
|
2181
|
-
const forwarded = useForwardProps(props);
|
|
2182
|
-
return (_ctx, _cache) => {
|
|
2183
|
-
return openBlock(), createBlock(unref(ToggleGroupItem), mergeProps(unref(forwarded), { class: "ui-ToggleGroupItem" }), {
|
|
2184
|
-
default: withCtx(() => [
|
|
2185
|
-
renderSlot(_ctx.$slots, "default")
|
|
2186
|
-
]),
|
|
2187
|
-
_: 3
|
|
2188
|
-
}, 16);
|
|
2189
|
-
};
|
|
2190
|
-
}
|
|
2191
|
-
});
|
|
2192
|
-
const _hoisted_1$q = ["data-radius", "data-accent-color"];
|
|
2193
|
-
const _hoisted_2$5 = ["id", "type"];
|
|
2194
|
-
const _hoisted_3$1 = ["id", "type"];
|
|
2195
|
-
const _hoisted_4 = {
|
|
2196
|
-
key: 2,
|
|
2197
|
-
class: "ui-TextFieldSlot",
|
|
2198
|
-
"data-side": "left"
|
|
2199
|
-
};
|
|
2200
|
-
const _hoisted_5 = {
|
|
2201
|
-
key: 3,
|
|
2202
|
-
class: "ui-TextFieldSlot",
|
|
2203
|
-
"data-side": "right"
|
|
2204
|
-
};
|
|
2205
|
-
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
2206
|
-
...{
|
|
2207
|
-
inheritAttrs: false
|
|
2208
|
-
},
|
|
2209
|
-
__name: "TextField",
|
|
2210
|
-
props: /* @__PURE__ */ mergeModels({
|
|
2211
|
-
id: {},
|
|
2212
|
-
class: {},
|
|
2213
|
-
size: { default: "2" },
|
|
2214
|
-
variant: { default: "surface" },
|
|
2215
|
-
color: {},
|
|
2216
|
-
radius: {},
|
|
2217
|
-
type: { default: "text" }
|
|
2218
|
-
}, {
|
|
2219
|
-
"modelValue": {
|
|
2220
|
-
default: ""
|
|
2221
|
-
},
|
|
2222
|
-
"modelModifiers": {}
|
|
2223
|
-
}),
|
|
2224
|
-
emits: ["update:modelValue"],
|
|
2225
|
-
setup(__props) {
|
|
2226
|
-
const props = __props;
|
|
2227
|
-
const inputRef = useTemplateRef("input");
|
|
2228
|
-
const onPointerDown = (event) => {
|
|
2229
|
-
const target = event.target;
|
|
2230
|
-
if (target.closest("input, button, a")) return;
|
|
2231
|
-
const input = inputRef.value;
|
|
2232
|
-
if (!input) return;
|
|
2233
|
-
const isRightSlot = target.closest("[data-side=right]");
|
|
2234
|
-
const cursorPosition = isRightSlot ? input.value.length : 0;
|
|
2235
|
-
requestAnimationFrame(() => {
|
|
2236
|
-
input.setSelectionRange(cursorPosition, cursorPosition);
|
|
2237
|
-
input.focus();
|
|
2238
|
-
});
|
|
2239
|
-
};
|
|
2240
|
-
const [modelValue, modifiers] = useModel(__props, "modelValue", {
|
|
2241
|
-
set(value) {
|
|
2242
|
-
if (modifiers.number) {
|
|
2243
|
-
return Number(value);
|
|
2244
|
-
}
|
|
2245
|
-
if (modifiers.trim) {
|
|
2246
|
-
return value.trim();
|
|
2247
|
-
}
|
|
2248
|
-
return value;
|
|
2249
|
-
}
|
|
2250
|
-
});
|
|
2251
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "class"]);
|
|
2252
|
-
const onFileChange = () => {
|
|
2253
|
-
modelValue.value = inputRef.value?.files;
|
|
2254
|
-
};
|
|
2255
|
-
return (_ctx, _cache) => {
|
|
2256
|
-
return openBlock(), createElementBlock("div", {
|
|
2257
|
-
class: normalizeClass(["ui-TextField", unref(resetClass)]),
|
|
2258
|
-
"data-radius": props.radius,
|
|
2259
|
-
"data-accent-color": props.color,
|
|
2260
|
-
onPointerdown: onPointerDown
|
|
2261
|
-
}, [
|
|
2262
|
-
props.type === "file" ? (openBlock(), createElementBlock("input", mergeProps({
|
|
2263
|
-
key: 0,
|
|
2264
|
-
id: props.id,
|
|
2265
|
-
ref: "input",
|
|
2266
|
-
type: props.type
|
|
2267
|
-
}, _ctx.$attrs, {
|
|
2268
|
-
class: "ui-TextFieldInput",
|
|
2269
|
-
onChange: onFileChange
|
|
2270
|
-
}), null, 16, _hoisted_2$5)) : withDirectives((openBlock(), createElementBlock("input", mergeProps({
|
|
2271
|
-
key: 1,
|
|
2272
|
-
id: props.id,
|
|
2273
|
-
ref: "input",
|
|
2274
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
2275
|
-
type: props.type
|
|
2276
|
-
}, _ctx.$attrs, { class: "ui-TextFieldInput" }), null, 16, _hoisted_3$1)), [
|
|
2277
|
-
[vModelDynamic, unref(modelValue)]
|
|
2278
|
-
]),
|
|
2279
|
-
_ctx.$slots.left ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
2280
|
-
renderSlot(_ctx.$slots, "left")
|
|
2281
|
-
])) : createCommentVNode("", true),
|
|
2282
|
-
_ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
2283
|
-
renderSlot(_ctx.$slots, "right")
|
|
2284
|
-
])) : createCommentVNode("", true)
|
|
2285
|
-
], 42, _hoisted_1$q);
|
|
2286
|
-
};
|
|
2287
|
-
}
|
|
2288
|
-
});
|
|
2289
|
-
const _hoisted_1$p = ["data-accent-color", "data-radius"];
|
|
2290
|
-
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
2291
|
-
...{
|
|
2292
|
-
inheritAttrs: false
|
|
2293
|
-
},
|
|
2294
|
-
__name: "TextArea",
|
|
2295
|
-
props: /* @__PURE__ */ mergeModels({
|
|
2296
|
-
class: {},
|
|
2297
|
-
size: { default: "2" },
|
|
2298
|
-
variant: { default: "surface" },
|
|
2299
|
-
resize: {},
|
|
2300
|
-
color: {},
|
|
2301
|
-
radius: {}
|
|
2302
|
-
}, {
|
|
2303
|
-
"modelValue": {
|
|
2304
|
-
default: ""
|
|
2305
|
-
},
|
|
2306
|
-
"modelModifiers": {}
|
|
2307
|
-
}),
|
|
2308
|
-
emits: ["update:modelValue"],
|
|
2309
|
-
setup(__props) {
|
|
2310
|
-
const props = __props;
|
|
2311
|
-
const modelValue = useModel(__props, "modelValue");
|
|
2312
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "resize", "class"]);
|
|
2313
|
-
return (_ctx, _cache) => {
|
|
2314
|
-
return openBlock(), createElementBlock("div", {
|
|
2315
|
-
class: normalizeClass(["ui-TextArea", unref(resetClass)]),
|
|
2316
|
-
"data-accent-color": props.color,
|
|
2317
|
-
"data-radius": props.radius
|
|
2318
|
-
}, [
|
|
2319
|
-
withDirectives(createElementVNode("textarea", mergeProps({
|
|
2320
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event)
|
|
2321
|
-
}, _ctx.$attrs, { class: "ui-TextAreaInput" }), null, 16), [
|
|
2322
|
-
[vModelText, modelValue.value]
|
|
2323
|
-
])
|
|
2324
|
-
], 10, _hoisted_1$p);
|
|
2325
|
-
};
|
|
2326
|
-
}
|
|
2327
|
-
});
|
|
2328
|
-
const _hoisted_1$o = ["id"];
|
|
2329
|
-
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
2330
|
-
__name: "ColorField",
|
|
2331
|
-
props: /* @__PURE__ */ mergeModels({
|
|
2332
|
-
id: {},
|
|
2333
|
-
variant: { default: "solid" },
|
|
2334
|
-
size: { default: "2" },
|
|
2335
|
-
radius: {},
|
|
2336
|
-
defaultValue: {},
|
|
2337
|
-
as: { default: "div" }
|
|
2338
|
-
}, {
|
|
2339
|
-
"modelValue": { required: false },
|
|
2340
|
-
"modelModifiers": {}
|
|
2341
|
-
}),
|
|
2342
|
-
emits: ["update:modelValue"],
|
|
2343
|
-
setup(__props) {
|
|
2344
|
-
const props = __props;
|
|
2345
|
-
const modelValue = useModel(__props, "modelValue");
|
|
2346
|
-
const resetClass = buildPropsClass(props, ["size", "variant"]);
|
|
2347
|
-
onMounted(() => {
|
|
2348
|
-
if (props.defaultValue && !modelValue.value) {
|
|
2349
|
-
modelValue.value = props.defaultValue;
|
|
2350
|
-
}
|
|
2351
|
-
});
|
|
2352
|
-
return (_ctx, _cache) => {
|
|
2353
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
2354
|
-
class: normalizeClass(["ui-ColorField", unref(resetClass)]),
|
|
2355
|
-
as: props.as,
|
|
2356
|
-
"data-radius": props.radius,
|
|
2357
|
-
style: normalizeStyle({ "--color-field-color": modelValue.value })
|
|
2358
|
-
}, {
|
|
2359
|
-
default: withCtx(() => [
|
|
2360
|
-
withDirectives(createElementVNode("input", {
|
|
2361
|
-
id: props.id,
|
|
2362
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
2363
|
-
class: "ui-ColorFieldInput",
|
|
2364
|
-
type: "color"
|
|
2365
|
-
}, null, 8, _hoisted_1$o), [
|
|
2366
|
-
[vModelText, modelValue.value]
|
|
2367
|
-
])
|
|
2368
|
-
]),
|
|
2369
|
-
_: 1
|
|
2370
|
-
}, 8, ["as", "class", "data-radius", "style"]);
|
|
2371
|
-
};
|
|
2372
|
-
}
|
|
2373
|
-
});
|
|
2374
|
-
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
2375
|
-
__name: "PinInputRoot",
|
|
2376
|
-
props: {
|
|
2377
|
-
size: { default: "2" },
|
|
2378
|
-
variant: { default: "surface" },
|
|
2379
|
-
color: {},
|
|
2380
|
-
radius: {},
|
|
2381
|
-
modelValue: {},
|
|
2382
|
-
defaultValue: {},
|
|
2383
|
-
placeholder: {},
|
|
2384
|
-
mask: { type: Boolean },
|
|
2385
|
-
otp: { type: Boolean },
|
|
2386
|
-
type: {},
|
|
2387
|
-
dir: {},
|
|
2388
|
-
disabled: { type: Boolean },
|
|
2389
|
-
id: {},
|
|
2390
|
-
asChild: { type: Boolean },
|
|
2391
|
-
as: {},
|
|
2392
|
-
name: {},
|
|
2393
|
-
required: { type: Boolean }
|
|
2394
|
-
},
|
|
2395
|
-
emits: ["update:modelValue", "complete"],
|
|
2396
|
-
setup(__props, { emit: __emit }) {
|
|
2397
|
-
const props = __props;
|
|
2398
|
-
const emits = __emit;
|
|
2399
|
-
const asPinInputValue = (value) => value;
|
|
2400
|
-
const forwarded = useForwardPropsEmitsWithout(
|
|
2401
|
-
props,
|
|
2402
|
-
emits,
|
|
2403
|
-
["size", "variant", "color", "radius"]
|
|
2404
|
-
);
|
|
2405
|
-
const resetClass = buildPropsClass(props, ["size", "variant"]);
|
|
2406
|
-
return (_ctx, _cache) => {
|
|
2407
|
-
return openBlock(), createBlock(unref(PinInputRoot), mergeProps(unref(forwarded), {
|
|
2408
|
-
class: ["ui-PinInputRoot", unref(resetClass)],
|
|
2409
|
-
"data-accent-color": props.color,
|
|
2410
|
-
"data-radius": props.radius
|
|
2411
|
-
}), {
|
|
2412
|
-
default: withCtx(({ modelValue }) => [
|
|
2413
|
-
renderSlot(_ctx.$slots, "default", {
|
|
2414
|
-
modelValue: asPinInputValue(modelValue)
|
|
2415
|
-
})
|
|
2416
|
-
]),
|
|
2417
|
-
_: 3
|
|
2418
|
-
}, 16, ["class", "data-accent-color", "data-radius"]);
|
|
2419
|
-
};
|
|
2420
|
-
}
|
|
2421
|
-
});
|
|
2422
|
-
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
2423
|
-
__name: "PinInputInput",
|
|
2424
|
-
props: {
|
|
2425
|
-
index: {},
|
|
2426
|
-
disabled: { type: Boolean },
|
|
2427
|
-
asChild: { type: Boolean },
|
|
2428
|
-
as: { default: "input" }
|
|
2429
|
-
},
|
|
2430
|
-
setup(__props) {
|
|
2431
|
-
const props = __props;
|
|
2432
|
-
const forwarded = useForwardProps(props);
|
|
2433
|
-
useForwardExpose();
|
|
2434
|
-
return (_ctx, _cache) => {
|
|
2435
|
-
return openBlock(), createBlock(unref(PinInputInput), mergeProps({ class: "ui-PinInputInput" }, unref(forwarded)), {
|
|
2436
|
-
default: withCtx(() => [
|
|
2437
|
-
renderSlot(_ctx.$slots, "default")
|
|
2438
|
-
]),
|
|
2439
|
-
_: 3
|
|
2440
|
-
}, 16);
|
|
2441
|
-
};
|
|
2442
|
-
}
|
|
2443
|
-
});
|
|
2444
|
-
const [injectSelectRootContext, provideSelectRootContext] = createContext("ui:SelectRoot");
|
|
2445
|
-
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
2446
|
-
__name: "SelectRoot",
|
|
2447
|
-
props: {
|
|
2448
|
-
size: { default: "2" },
|
|
2449
|
-
color: {},
|
|
2450
|
-
highContrast: { type: Boolean },
|
|
2451
|
-
open: { type: Boolean },
|
|
2452
|
-
defaultOpen: { type: Boolean },
|
|
2453
|
-
defaultValue: {},
|
|
2454
|
-
modelValue: {},
|
|
2455
|
-
nullableValue: {},
|
|
2456
|
-
by: {},
|
|
2457
|
-
dir: {},
|
|
2458
|
-
multiple: { type: Boolean },
|
|
2459
|
-
autocomplete: {},
|
|
2460
|
-
disabled: { type: Boolean },
|
|
2461
|
-
name: {},
|
|
2462
|
-
required: { type: Boolean }
|
|
2463
|
-
},
|
|
2464
|
-
emits: ["update:modelValue", "update:open"],
|
|
2465
|
-
setup(__props, { emit: __emit }) {
|
|
2466
|
-
const props = __props;
|
|
2467
|
-
const emits = __emit;
|
|
2468
|
-
const { size, color, highContrast } = toRefs(props);
|
|
2469
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["size", "color", "highContrast"]);
|
|
2470
|
-
provideSelectRootContext({
|
|
2471
|
-
size,
|
|
2472
|
-
color,
|
|
2473
|
-
highContrast
|
|
2474
|
-
});
|
|
2475
|
-
return (_ctx, _cache) => {
|
|
2476
|
-
return openBlock(), createBlock(unref(SelectRoot), normalizeProps(guardReactiveProps(unref(forwarded))), {
|
|
2477
|
-
default: withCtx(() => [
|
|
2478
|
-
renderSlot(_ctx.$slots, "default")
|
|
2479
|
-
]),
|
|
2480
|
-
_: 3
|
|
2481
|
-
}, 16);
|
|
2482
|
-
};
|
|
2483
|
-
}
|
|
2484
|
-
});
|
|
2485
|
-
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
2486
|
-
...{
|
|
2487
|
-
inheritAttrs: false
|
|
2488
|
-
},
|
|
2489
|
-
__name: "SelectContent",
|
|
2490
|
-
props: {
|
|
2491
|
-
variant: { default: "solid" },
|
|
2492
|
-
forceMount: { type: Boolean },
|
|
2493
|
-
position: {},
|
|
2494
|
-
bodyLock: { type: Boolean },
|
|
2495
|
-
memoDependencies: {},
|
|
2496
|
-
side: {},
|
|
2497
|
-
sideOffset: {},
|
|
2498
|
-
sideFlip: { type: Boolean },
|
|
2499
|
-
align: {},
|
|
2500
|
-
alignOffset: {},
|
|
2501
|
-
alignFlip: { type: Boolean },
|
|
2502
|
-
avoidCollisions: { type: Boolean },
|
|
2503
|
-
collisionBoundary: {},
|
|
2504
|
-
collisionPadding: {},
|
|
2505
|
-
arrowPadding: {},
|
|
2506
|
-
hideShiftedArrow: { type: Boolean },
|
|
2507
|
-
sticky: {},
|
|
2508
|
-
hideWhenDetached: { type: Boolean },
|
|
2509
|
-
positionStrategy: {},
|
|
2510
|
-
updatePositionStrategy: {},
|
|
2511
|
-
disableUpdateOnLayoutShift: { type: Boolean },
|
|
2512
|
-
prioritizePosition: { type: Boolean },
|
|
2513
|
-
reference: {},
|
|
2514
|
-
dir: {},
|
|
2515
|
-
asChild: { type: Boolean },
|
|
2516
|
-
as: {},
|
|
2517
|
-
disableOutsidePointerEvents: { type: Boolean }
|
|
2518
|
-
},
|
|
2519
|
-
setup(__props) {
|
|
2520
|
-
const props = __props;
|
|
2521
|
-
const forwarded = useForwardProps(props);
|
|
2522
|
-
const { forwardRef } = useForwardExpose();
|
|
2523
|
-
const context = injectSelectRootContext();
|
|
2524
|
-
const contentClass = computed(() => {
|
|
2525
|
-
const rv = ["r-size-" + context.size.value, "r-variant-" + props.variant];
|
|
2526
|
-
if (context.highContrast.value) {
|
|
2527
|
-
rv.push("r-high-contrast");
|
|
2528
|
-
}
|
|
2529
|
-
if (props.position === "popper") {
|
|
2530
|
-
rv.push("ui-PopperContent");
|
|
2531
|
-
}
|
|
2532
|
-
return rv;
|
|
2533
|
-
});
|
|
2534
|
-
return (_ctx, _cache) => {
|
|
2535
|
-
return openBlock(), createBlock(unref(SelectPortal), null, {
|
|
2536
|
-
default: withCtx(() => [
|
|
2537
|
-
createVNode(_sfc_main$1i, {
|
|
2538
|
-
"accent-color": unref(context).color.value
|
|
2539
|
-
}, {
|
|
2540
|
-
default: withCtx(() => [
|
|
2541
|
-
createVNode(unref(SelectContent), mergeProps({ ref: unref(forwardRef) }, {
|
|
2542
|
-
..._ctx.$attrs,
|
|
2543
|
-
...unref(forwarded),
|
|
2544
|
-
variant: void 0
|
|
2545
|
-
}, {
|
|
2546
|
-
class: ["ui-SelectContent", contentClass.value]
|
|
2547
|
-
}), {
|
|
2548
|
-
default: withCtx(() => [
|
|
2549
|
-
createVNode(unref(ScrollAreaRoot), {
|
|
2550
|
-
type: "auto",
|
|
2551
|
-
class: "ui-ScrollArea"
|
|
2552
|
-
}, {
|
|
2553
|
-
default: withCtx(() => [
|
|
2554
|
-
createVNode(unref(SelectViewport), {
|
|
2555
|
-
class: "ui-SelectViewport",
|
|
2556
|
-
"as-child": ""
|
|
2557
|
-
}, {
|
|
2558
|
-
default: withCtx(() => [
|
|
2559
|
-
createVNode(unref(ScrollAreaViewport), { class: "ui-ScrollAreaViewport" }, {
|
|
2560
|
-
default: withCtx(() => [
|
|
2561
|
-
renderSlot(_ctx.$slots, "default")
|
|
2562
|
-
]),
|
|
2563
|
-
_: 3
|
|
2564
|
-
}),
|
|
2565
|
-
_cache[0] || (_cache[0] = createElementVNode("div", { class: "ui-ScrollAreaViewportFocusRing" }, null, -1)),
|
|
2566
|
-
createVNode(unref(ScrollAreaScrollbar), {
|
|
2567
|
-
class: "ui-ScrollAreaScrollbar",
|
|
2568
|
-
"data-size": 1,
|
|
2569
|
-
orientation: "vertical"
|
|
2570
|
-
}, {
|
|
2571
|
-
default: withCtx(() => [
|
|
2572
|
-
createVNode(unref(ScrollAreaThumb), { class: "ui-ScrollAreaThumb" })
|
|
2573
|
-
]),
|
|
2574
|
-
_: 1
|
|
2575
|
-
})
|
|
2576
|
-
]),
|
|
2577
|
-
_: 3
|
|
2578
|
-
})
|
|
2579
|
-
]),
|
|
2580
|
-
_: 3
|
|
2581
|
-
})
|
|
2582
|
-
]),
|
|
2583
|
-
_: 3
|
|
2584
|
-
}, 16, ["class"])
|
|
2585
|
-
]),
|
|
2586
|
-
_: 3
|
|
2587
|
-
}, 8, ["accent-color"])
|
|
2588
|
-
]),
|
|
2589
|
-
_: 3
|
|
2590
|
-
});
|
|
2591
|
-
};
|
|
2592
|
-
}
|
|
2593
|
-
});
|
|
2594
|
-
const _hoisted_1$n = {
|
|
2595
|
-
viewBox: "0 0 15 15",
|
|
2596
|
-
width: "1em",
|
|
2597
|
-
height: "1em"
|
|
2598
|
-
};
|
|
2599
|
-
function render$b(_ctx, _cache) {
|
|
2600
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$n, [..._cache[0] || (_cache[0] = [
|
|
2601
|
-
createElementVNode("path", {
|
|
2602
|
-
fill: "currentColor",
|
|
2603
|
-
d: "M11.158 6.135a.5.5 0 0 1 .684.73l-4 3.75a.5.5 0 0 1-.684 0l-4-3.75l-.066-.077a.5.5 0 0 1 .67-.715l.08.062L7.5 9.564z"
|
|
2604
|
-
}, null, -1)
|
|
2605
|
-
])]);
|
|
2606
|
-
}
|
|
2607
|
-
const ChevronDownIcon = markRaw({ name: "radix-icons-chevron-down", render: render$b });
|
|
2608
|
-
const _hoisted_1$m = { class: "ui-SelectTriggerInner" };
|
|
2609
|
-
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
2610
|
-
__name: "SelectTrigger",
|
|
2611
|
-
props: {
|
|
2612
|
-
variant: { default: "surface" },
|
|
2613
|
-
radius: {},
|
|
2614
|
-
placeholder: {},
|
|
2615
|
-
disabled: { type: Boolean },
|
|
2616
|
-
reference: {},
|
|
2617
|
-
asChild: { type: Boolean },
|
|
2618
|
-
as: {}
|
|
2619
|
-
},
|
|
2620
|
-
setup(__props) {
|
|
2621
|
-
const props = __props;
|
|
2622
|
-
const context = injectSelectRootContext();
|
|
2623
|
-
const resetClass = computed(() => {
|
|
2624
|
-
return [`r-variant-${props.variant}`, `r-size-${context.size.value}`];
|
|
2625
|
-
});
|
|
2626
|
-
return (_ctx, _cache) => {
|
|
2627
|
-
return openBlock(), createBlock(unref(SelectTrigger), {
|
|
2628
|
-
class: normalizeClass(["ui-SelectTrigger", resetClass.value]),
|
|
2629
|
-
disabled: props.disabled,
|
|
2630
|
-
"data-accent-color": unref(context).color.value,
|
|
2631
|
-
"data-radius": props.radius
|
|
2632
|
-
}, {
|
|
2633
|
-
default: withCtx(() => [
|
|
2634
|
-
createElementVNode("span", _hoisted_1$m, [
|
|
2635
|
-
createVNode(unref(SelectValue), {
|
|
2636
|
-
placeholder: props.placeholder
|
|
2637
|
-
}, {
|
|
2638
|
-
default: withCtx(({ selectedLabel, modelValue }) => [
|
|
2639
|
-
selectedLabel.length ? renderSlot(_ctx.$slots, "default", {
|
|
2640
|
-
selectedLabel,
|
|
2641
|
-
modelValue
|
|
2642
|
-
}, () => [
|
|
2643
|
-
createTextVNode(toDisplayString(selectedLabel.join(", ")), 1)
|
|
2644
|
-
], void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2645
|
-
createTextVNode(toDisplayString(props.placeholder), 1)
|
|
2646
|
-
], 64))
|
|
2647
|
-
]),
|
|
2648
|
-
_: 3
|
|
2649
|
-
}, 8, ["placeholder"])
|
|
2650
|
-
]),
|
|
2651
|
-
createVNode(unref(ChevronDownIcon), { class: "ui-SelectIcon" })
|
|
2652
|
-
]),
|
|
2653
|
-
_: 3
|
|
2654
|
-
}, 8, ["class", "disabled", "data-accent-color", "data-radius"]);
|
|
2655
|
-
};
|
|
2656
|
-
}
|
|
2657
|
-
});
|
|
2658
|
-
const _hoisted_1$l = {
|
|
2659
|
-
viewBox: "0 0 15 15",
|
|
2660
|
-
width: "1em",
|
|
2661
|
-
height: "1em"
|
|
2662
|
-
};
|
|
2663
|
-
function render$a(_ctx, _cache) {
|
|
2664
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$l, [..._cache[0] || (_cache[0] = [
|
|
2665
|
-
createElementVNode("path", {
|
|
2666
|
-
fill: "currentColor",
|
|
2667
|
-
d: "M10.602 3.908a.626.626 0 0 1 1.046.684l-4.25 6.5a.626.626 0 0 1-.944.12l-2.75-2.5l-.084-.094a.626.626 0 0 1 .823-.906l.103.075l2.207 2.006z"
|
|
2668
|
-
}, null, -1)
|
|
2669
|
-
])]);
|
|
2670
|
-
}
|
|
2671
|
-
const CheckIcon$1 = markRaw({ name: "radix-icons-check", render: render$a });
|
|
2672
|
-
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
2673
|
-
__name: "SelectItem",
|
|
2674
|
-
props: {
|
|
2675
|
-
value: {},
|
|
2676
|
-
disabled: { type: Boolean },
|
|
2677
|
-
textValue: {},
|
|
2678
|
-
asChild: { type: Boolean },
|
|
2679
|
-
as: {}
|
|
2680
|
-
},
|
|
2681
|
-
setup(__props) {
|
|
2682
|
-
const props = __props;
|
|
2683
|
-
const forwarded = useForwardProps(props);
|
|
2684
|
-
useForwardExpose();
|
|
2685
|
-
return (_ctx, _cache) => {
|
|
2686
|
-
return openBlock(), createBlock(unref(SelectItem), mergeProps({ class: "ui-SelectItem" }, unref(forwarded)), {
|
|
2687
|
-
default: withCtx(() => [
|
|
2688
|
-
createVNode(unref(SelectItemIndicator), { class: "ui-SelectItemIndicator" }, {
|
|
2689
|
-
default: withCtx(() => [
|
|
2690
|
-
createVNode(unref(CheckIcon$1))
|
|
2691
|
-
]),
|
|
2692
|
-
_: 1
|
|
2693
|
-
}),
|
|
2694
|
-
createVNode(unref(SelectItemText), null, {
|
|
2695
|
-
default: withCtx(() => [
|
|
2696
|
-
renderSlot(_ctx.$slots, "default")
|
|
2697
|
-
]),
|
|
2698
|
-
_: 3
|
|
2699
|
-
})
|
|
2700
|
-
]),
|
|
2701
|
-
_: 3
|
|
2702
|
-
}, 16);
|
|
2703
|
-
};
|
|
2704
|
-
}
|
|
2705
|
-
});
|
|
2706
|
-
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
2707
|
-
__name: "SelectLabel",
|
|
2708
|
-
props: {
|
|
2709
|
-
for: {},
|
|
2710
|
-
asChild: { type: Boolean },
|
|
2711
|
-
as: {}
|
|
2712
|
-
},
|
|
2713
|
-
setup(__props) {
|
|
2714
|
-
const props = __props;
|
|
2715
|
-
const forwarded = useForwardProps(props);
|
|
2716
|
-
useForwardExpose();
|
|
2717
|
-
return (_ctx, _cache) => {
|
|
2718
|
-
return openBlock(), createBlock(unref(SelectLabel), mergeProps({ class: "ui-SelectLabel" }, unref(forwarded)), {
|
|
2719
|
-
default: withCtx(() => [
|
|
2720
|
-
renderSlot(_ctx.$slots, "default")
|
|
2721
|
-
]),
|
|
2722
|
-
_: 3
|
|
2723
|
-
}, 16);
|
|
2724
|
-
};
|
|
2725
|
-
}
|
|
2726
|
-
});
|
|
2727
|
-
const _sfc_main$y = {};
|
|
2728
|
-
const _hoisted_1$k = {
|
|
2729
|
-
class: "ui-SelectSeparator",
|
|
2730
|
-
"aria-hidden": "true"
|
|
2731
|
-
};
|
|
2732
|
-
function _sfc_render$1(_ctx, _cache) {
|
|
2733
|
-
return openBlock(), createElementBlock("div", _hoisted_1$k);
|
|
2734
|
-
}
|
|
2735
|
-
const SelectSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$1]]);
|
|
2736
|
-
const [injectComboboxRootContext, provideComboboxRootContext] = createContext("ui:ComboboxRoot");
|
|
2737
|
-
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
2738
|
-
__name: "ComboboxRoot",
|
|
2739
|
-
props: {
|
|
2740
|
-
size: { default: "2" },
|
|
2741
|
-
color: {},
|
|
2742
|
-
highContrast: { type: Boolean },
|
|
2743
|
-
open: { type: Boolean },
|
|
2744
|
-
defaultOpen: { type: Boolean },
|
|
2745
|
-
resetSearchTermOnBlur: { type: Boolean },
|
|
2746
|
-
resetSearchTermOnSelect: { type: Boolean },
|
|
2747
|
-
openOnFocus: { type: Boolean },
|
|
2748
|
-
openOnClick: { type: Boolean },
|
|
2749
|
-
ignoreFilter: { type: Boolean },
|
|
2750
|
-
resetModelValueOnClear: { type: Boolean },
|
|
2751
|
-
modelValue: {},
|
|
2752
|
-
defaultValue: {},
|
|
2753
|
-
multiple: { type: Boolean, default: false },
|
|
2754
|
-
dir: {},
|
|
2755
|
-
disabled: { type: Boolean },
|
|
2756
|
-
highlightOnHover: { type: Boolean },
|
|
2757
|
-
by: {},
|
|
2758
|
-
asChild: { type: Boolean },
|
|
2759
|
-
as: {},
|
|
2760
|
-
name: {},
|
|
2761
|
-
required: { type: Boolean }
|
|
2762
|
-
},
|
|
2763
|
-
emits: ["update:modelValue", "highlight", "update:open"],
|
|
2764
|
-
setup(__props, { emit: __emit }) {
|
|
2765
|
-
const props = __props;
|
|
2766
|
-
const emits = __emit;
|
|
2767
|
-
const { size, color, highContrast } = toRefs(props);
|
|
2768
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["size", "color", "highContrast"]);
|
|
2769
|
-
const resetClass = buildPropsClass(props, ["size", "highContrast", "multiple"]);
|
|
2770
|
-
provideComboboxRootContext({
|
|
2771
|
-
size,
|
|
2772
|
-
color,
|
|
2773
|
-
highContrast
|
|
2774
|
-
});
|
|
2775
|
-
return (_ctx, _cache) => {
|
|
2776
|
-
return openBlock(), createBlock(unref(ComboboxRoot), mergeProps({
|
|
2777
|
-
class: ["ui-ComboboxRoot", unref(resetClass)]
|
|
2778
|
-
}, unref(forwarded)), {
|
|
2779
|
-
default: withCtx(() => [
|
|
2780
|
-
renderSlot(_ctx.$slots, "default")
|
|
2781
|
-
]),
|
|
2782
|
-
_: 3
|
|
2783
|
-
}, 16, ["class"]);
|
|
2784
|
-
};
|
|
2785
|
-
}
|
|
2786
|
-
});
|
|
2787
|
-
const _hoisted_1$j = {
|
|
2788
|
-
key: 0,
|
|
2789
|
-
class: "ui-ComboboxValues"
|
|
2790
|
-
};
|
|
2791
|
-
const _hoisted_2$4 = ["aria-current", "value"];
|
|
2792
|
-
const _hoisted_3 = ["onClick"];
|
|
2793
|
-
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
2794
|
-
...{
|
|
2795
|
-
inheritAttrs: false
|
|
2796
|
-
},
|
|
2797
|
-
__name: "ComboboxInput",
|
|
2798
|
-
props: {
|
|
2799
|
-
variant: { default: "surface" },
|
|
2800
|
-
radius: {},
|
|
2801
|
-
placeholder: {},
|
|
2802
|
-
displayValue: {},
|
|
2803
|
-
modelValue: {},
|
|
2804
|
-
autoFocus: { type: Boolean },
|
|
2805
|
-
disabled: { type: Boolean },
|
|
2806
|
-
asChild: { type: Boolean },
|
|
2807
|
-
as: {}
|
|
2808
|
-
},
|
|
2809
|
-
emits: ["update:modelValue"],
|
|
2810
|
-
setup(__props, { emit: __emit }) {
|
|
2811
|
-
const context = injectComboboxRootContext$1();
|
|
2812
|
-
const props = __props;
|
|
2813
|
-
const emits = __emit;
|
|
2814
|
-
const forwarded = useForwardPropsEmits(props, emits);
|
|
2815
|
-
const activeIndex = ref(-1);
|
|
2816
|
-
const values = computed(() => {
|
|
2817
|
-
return context.modelValue.value;
|
|
2818
|
-
});
|
|
2819
|
-
const displayValue = (value) => {
|
|
2820
|
-
if (typeof value === "object") {
|
|
2821
|
-
return JSON.stringify(value);
|
|
2822
|
-
} else {
|
|
2823
|
-
return value.toString();
|
|
2824
|
-
}
|
|
2825
|
-
};
|
|
2826
|
-
const onDeleteIndex = (index) => {
|
|
2827
|
-
activeIndex.value = index;
|
|
2828
|
-
context.modelValue.value.splice(index, 1);
|
|
2829
|
-
activeIndex.value = -1;
|
|
2830
|
-
};
|
|
2831
|
-
const onInputKeydown = (event) => {
|
|
2832
|
-
const input = event.target;
|
|
2833
|
-
if (!input.value && (event.key === "Delete" || event.key === "Backspace")) {
|
|
2834
|
-
if (activeIndex.value !== -1) {
|
|
2835
|
-
onDeleteIndex(activeIndex.value);
|
|
2836
|
-
} else {
|
|
2837
|
-
activeIndex.value = values.value.length - 1;
|
|
2838
|
-
setTimeout(() => {
|
|
2839
|
-
activeIndex.value = -1;
|
|
2840
|
-
}, 800);
|
|
2841
|
-
}
|
|
2842
|
-
} else if (input.value && event.key === "Enter") {
|
|
2843
|
-
setTimeout(() => {
|
|
2844
|
-
input.value = "";
|
|
2845
|
-
});
|
|
2846
|
-
}
|
|
2847
|
-
};
|
|
2848
|
-
watch(values, () => {
|
|
2849
|
-
context.filterSearch.value = "";
|
|
2850
|
-
emits("update:modelValue", "");
|
|
2851
|
-
}, { deep: true });
|
|
2852
|
-
return (_ctx, _cache) => {
|
|
2853
|
-
return openBlock(), createBlock(unref(ComboboxAnchor), {
|
|
2854
|
-
class: normalizeClass(["ui-ComboboxField", `r-variant-${__props.variant}`]),
|
|
2855
|
-
"data-radius": __props.radius,
|
|
2856
|
-
"data-multiple": unref(context).multiple.value || void 0
|
|
2857
|
-
}, {
|
|
2858
|
-
default: withCtx(() => [
|
|
2859
|
-
unref(context).multiple.value ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
2860
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(values.value, (item, index) => {
|
|
2861
|
-
return openBlock(), createElementBlock("div", {
|
|
2862
|
-
key: displayValue(item),
|
|
2863
|
-
class: "ui-ComboboxValuesItem",
|
|
2864
|
-
"aria-current": index === activeIndex.value,
|
|
2865
|
-
value: item
|
|
2866
|
-
}, [
|
|
2867
|
-
renderSlot(_ctx.$slots, "item", { value: item }, () => [
|
|
2868
|
-
createElementVNode("span", null, toDisplayString(displayValue(item)), 1)
|
|
2869
|
-
]),
|
|
2870
|
-
createElementVNode("button", {
|
|
2871
|
-
type: "button",
|
|
2872
|
-
tabindex: "-1",
|
|
2873
|
-
onClick: withModifiers(($event) => onDeleteIndex(index), ["prevent"])
|
|
2874
|
-
}, [
|
|
2875
|
-
createVNode(unref(CrossIcon))
|
|
2876
|
-
], 8, _hoisted_3)
|
|
2877
|
-
], 8, _hoisted_2$4);
|
|
2878
|
-
}), 128)),
|
|
2879
|
-
createVNode(unref(ComboboxInput), mergeProps({
|
|
2880
|
-
..._ctx.$attrs,
|
|
2881
|
-
...unref(forwarded),
|
|
2882
|
-
variant: void 0,
|
|
2883
|
-
radius: void 0
|
|
2884
|
-
}, {
|
|
2885
|
-
class: "ui-ComboboxInput",
|
|
2886
|
-
onKeydown: onInputKeydown
|
|
2887
|
-
}), null, 16)
|
|
2888
|
-
])) : (openBlock(), createBlock(unref(ComboboxInput), mergeProps({
|
|
2889
|
-
key: 1,
|
|
2890
|
-
class: "ui-ComboboxInput"
|
|
2891
|
-
}, {
|
|
2892
|
-
..._ctx.$attrs,
|
|
2893
|
-
...unref(forwarded),
|
|
2894
|
-
variant: void 0,
|
|
2895
|
-
radius: void 0
|
|
2896
|
-
}), null, 16)),
|
|
2897
|
-
createVNode(unref(ComboboxTrigger), { class: "ui-ComboboxTrigger" }, {
|
|
2898
|
-
default: withCtx(() => [
|
|
2899
|
-
createVNode(unref(ChevronDownIcon))
|
|
2900
|
-
]),
|
|
2901
|
-
_: 1
|
|
2902
|
-
})
|
|
2903
|
-
]),
|
|
2904
|
-
_: 3
|
|
2905
|
-
}, 8, ["class", "data-radius", "data-multiple"]);
|
|
2906
|
-
};
|
|
2907
|
-
}
|
|
2908
|
-
});
|
|
2909
|
-
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
2910
|
-
...{
|
|
2911
|
-
inheritAttrs: false
|
|
2912
|
-
},
|
|
2913
|
-
__name: "ComboboxContent",
|
|
2914
|
-
props: {
|
|
2915
|
-
variant: { default: "solid" },
|
|
2916
|
-
forceMount: { type: Boolean },
|
|
2917
|
-
position: { default: "popper" },
|
|
2918
|
-
bodyLock: { type: Boolean },
|
|
2919
|
-
hideWhenEmpty: { type: Boolean },
|
|
2920
|
-
memoDependencies: {},
|
|
2921
|
-
side: {},
|
|
2922
|
-
sideOffset: { default: 5 },
|
|
2923
|
-
sideFlip: { type: Boolean },
|
|
2924
|
-
align: {},
|
|
2925
|
-
alignOffset: {},
|
|
2926
|
-
alignFlip: { type: Boolean },
|
|
2927
|
-
avoidCollisions: { type: Boolean },
|
|
2928
|
-
collisionBoundary: {},
|
|
2929
|
-
collisionPadding: {},
|
|
2930
|
-
arrowPadding: {},
|
|
2931
|
-
hideShiftedArrow: { type: Boolean },
|
|
2932
|
-
sticky: {},
|
|
2933
|
-
hideWhenDetached: { type: Boolean },
|
|
2934
|
-
positionStrategy: {},
|
|
2935
|
-
updatePositionStrategy: {},
|
|
2936
|
-
disableUpdateOnLayoutShift: { type: Boolean },
|
|
2937
|
-
prioritizePosition: { type: Boolean },
|
|
2938
|
-
reference: {},
|
|
2939
|
-
dir: {},
|
|
2940
|
-
asChild: { type: Boolean },
|
|
2941
|
-
as: {},
|
|
2942
|
-
disableOutsidePointerEvents: { type: Boolean }
|
|
2943
|
-
},
|
|
2944
|
-
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside"],
|
|
2945
|
-
setup(__props, { emit: __emit }) {
|
|
2946
|
-
const { forwardRef } = useForwardExpose();
|
|
2947
|
-
const props = __props;
|
|
2948
|
-
const emits = __emit;
|
|
2949
|
-
const forwarded = useForwardPropsEmits(props, emits);
|
|
2950
|
-
const context = injectComboboxRootContext();
|
|
2951
|
-
const contentClass = computed(() => {
|
|
2952
|
-
const rv = ["r-size-" + context.size.value, "r-variant-" + props.variant];
|
|
2953
|
-
if (context.highContrast.value) {
|
|
2954
|
-
rv.push("r-high-contrast");
|
|
2955
|
-
}
|
|
2956
|
-
return rv;
|
|
2957
|
-
});
|
|
2958
|
-
return (_ctx, _cache) => {
|
|
2959
|
-
return openBlock(), createBlock(unref(ComboboxPortal), null, {
|
|
2960
|
-
default: withCtx(() => [
|
|
2961
|
-
createVNode(_sfc_main$1i, {
|
|
2962
|
-
"accent-color": unref(context).color.value
|
|
2963
|
-
}, {
|
|
2964
|
-
default: withCtx(() => [
|
|
2965
|
-
createVNode(unref(ComboboxContent), mergeProps({ ref: unref(forwardRef) }, {
|
|
2966
|
-
..._ctx.$attrs,
|
|
2967
|
-
...unref(forwarded),
|
|
2968
|
-
position: "popper",
|
|
2969
|
-
to: void 0,
|
|
2970
|
-
variant: void 0
|
|
2971
|
-
}, {
|
|
2972
|
-
class: ["ui-ComboboxContent", contentClass.value]
|
|
2973
|
-
}), {
|
|
2974
|
-
default: withCtx(() => [
|
|
2975
|
-
createVNode(unref(ScrollAreaRoot), {
|
|
2976
|
-
type: "auto",
|
|
2977
|
-
class: "ui-ScrollArea"
|
|
2978
|
-
}, {
|
|
2979
|
-
default: withCtx(() => [
|
|
2980
|
-
createVNode(unref(ComboboxViewport), {
|
|
2981
|
-
class: "ui-ComboboxViewport",
|
|
2982
|
-
"as-child": ""
|
|
2983
|
-
}, {
|
|
2984
|
-
default: withCtx(() => [
|
|
2985
|
-
createVNode(unref(ScrollAreaViewport), { class: "ui-ScrollAreaViewport" }, {
|
|
2986
|
-
default: withCtx(() => [
|
|
2987
|
-
renderSlot(_ctx.$slots, "default")
|
|
2988
|
-
]),
|
|
2989
|
-
_: 3
|
|
2990
|
-
})
|
|
2991
|
-
]),
|
|
2992
|
-
_: 3
|
|
2993
|
-
}),
|
|
2994
|
-
_cache[0] || (_cache[0] = createElementVNode("div", { class: "ui-ScrollAreaViewportFocusRing" }, null, -1)),
|
|
2995
|
-
createVNode(unref(ScrollAreaScrollbar), {
|
|
2996
|
-
class: "ui-ScrollAreaScrollbar",
|
|
2997
|
-
"data-size": 1,
|
|
2998
|
-
orientation: "vertical"
|
|
2999
|
-
}, {
|
|
3000
|
-
default: withCtx(() => [
|
|
3001
|
-
createVNode(unref(ScrollAreaThumb), { class: "ui-ScrollAreaThumb" })
|
|
3002
|
-
]),
|
|
3003
|
-
_: 1
|
|
3004
|
-
})
|
|
3005
|
-
]),
|
|
3006
|
-
_: 3
|
|
3007
|
-
})
|
|
3008
|
-
]),
|
|
3009
|
-
_: 3
|
|
3010
|
-
}, 16, ["class"])
|
|
3011
|
-
]),
|
|
3012
|
-
_: 3
|
|
3013
|
-
}, 8, ["accent-color"])
|
|
3014
|
-
]),
|
|
3015
|
-
_: 3
|
|
3016
|
-
});
|
|
3017
|
-
};
|
|
3018
|
-
}
|
|
3019
|
-
});
|
|
3020
|
-
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
3021
|
-
__name: "ComboboxItem",
|
|
3022
|
-
props: {
|
|
3023
|
-
textValue: {},
|
|
3024
|
-
value: {},
|
|
3025
|
-
disabled: { type: Boolean },
|
|
3026
|
-
asChild: { type: Boolean },
|
|
3027
|
-
as: {}
|
|
3028
|
-
},
|
|
3029
|
-
setup(__props) {
|
|
3030
|
-
const props = __props;
|
|
3031
|
-
const forwarded = useForwardProps(props);
|
|
3032
|
-
return (_ctx, _cache) => {
|
|
3033
|
-
return openBlock(), createBlock(unref(ComboboxItem), mergeProps({ class: "ui-ComboboxItem" }, unref(forwarded)), {
|
|
3034
|
-
default: withCtx(() => [
|
|
3035
|
-
createVNode(unref(ComboboxItemIndicator), { class: "ui-ComboboxItemIndicator" }, {
|
|
3036
|
-
default: withCtx(() => [
|
|
3037
|
-
createVNode(unref(CheckIcon$1))
|
|
3038
|
-
]),
|
|
3039
|
-
_: 1
|
|
3040
|
-
}),
|
|
3041
|
-
renderSlot(_ctx.$slots, "default")
|
|
3042
|
-
]),
|
|
3043
|
-
_: 3
|
|
3044
|
-
}, 16);
|
|
3045
|
-
};
|
|
3046
|
-
}
|
|
3047
|
-
});
|
|
3048
|
-
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
3049
|
-
__name: "ComboboxLabel",
|
|
3050
|
-
props: {
|
|
3051
|
-
for: {},
|
|
3052
|
-
asChild: { type: Boolean },
|
|
3053
|
-
as: {}
|
|
3054
|
-
},
|
|
3055
|
-
setup(__props) {
|
|
3056
|
-
const props = __props;
|
|
3057
|
-
const forwarded = useForwardProps(props);
|
|
3058
|
-
useForwardExpose();
|
|
3059
|
-
return (_ctx, _cache) => {
|
|
3060
|
-
return openBlock(), createBlock(unref(ComboboxLabel), mergeProps({ class: "ui-ComboboxLabel" }, unref(forwarded)), {
|
|
3061
|
-
default: withCtx(() => [
|
|
3062
|
-
renderSlot(_ctx.$slots, "default")
|
|
3063
|
-
]),
|
|
3064
|
-
_: 3
|
|
3065
|
-
}, 16);
|
|
3066
|
-
};
|
|
3067
|
-
}
|
|
3068
|
-
});
|
|
3069
|
-
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
3070
|
-
__name: "ComboboxEmpty",
|
|
3071
|
-
setup(__props) {
|
|
3072
|
-
return (_ctx, _cache) => {
|
|
3073
|
-
return openBlock(), createBlock(unref(ComboboxEmpty), { class: "ui-ComboboxEmpty" }, {
|
|
3074
|
-
default: withCtx(() => [
|
|
3075
|
-
renderSlot(_ctx.$slots, "default")
|
|
3076
|
-
]),
|
|
3077
|
-
_: 3
|
|
3078
|
-
});
|
|
3079
|
-
};
|
|
3080
|
-
}
|
|
3081
|
-
});
|
|
3082
|
-
const _hoisted_1$i = ["data-accent-color"];
|
|
3083
|
-
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
3084
|
-
__name: "Radio",
|
|
3085
|
-
props: /* @__PURE__ */ mergeModels({
|
|
3086
|
-
variant: { default: "surface" },
|
|
3087
|
-
color: {},
|
|
3088
|
-
size: { default: "2" },
|
|
3089
|
-
highContrast: { type: Boolean }
|
|
3090
|
-
}, {
|
|
3091
|
-
"modelValue": {
|
|
3092
|
-
default: ""
|
|
3093
|
-
},
|
|
3094
|
-
"modelModifiers": {}
|
|
3095
|
-
}),
|
|
3096
|
-
emits: ["update:modelValue"],
|
|
3097
|
-
setup(__props) {
|
|
3098
|
-
const props = __props;
|
|
3099
|
-
const [modelValue, modifiers] = useModel(__props, "modelValue", {
|
|
3100
|
-
set(value) {
|
|
3101
|
-
if (modifiers.number) {
|
|
3102
|
-
return Number(value);
|
|
3103
|
-
}
|
|
3104
|
-
if (modifiers.trim) {
|
|
3105
|
-
return value.trim();
|
|
3106
|
-
}
|
|
3107
|
-
return value;
|
|
3108
|
-
}
|
|
3109
|
-
});
|
|
3110
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "highContrast"]);
|
|
3111
|
-
return (_ctx, _cache) => {
|
|
3112
|
-
return withDirectives((openBlock(), createElementBlock("input", {
|
|
3113
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
|
|
3114
|
-
class: normalizeClass(["ui-RadioBase ui-Radio", unref(resetClass)]),
|
|
3115
|
-
type: "radio",
|
|
3116
|
-
"data-accent-color": props.color
|
|
3117
|
-
}, null, 10, _hoisted_1$i)), [
|
|
3118
|
-
[vModelRadio, unref(modelValue)]
|
|
3119
|
-
]);
|
|
3120
|
-
};
|
|
3121
|
-
}
|
|
3122
|
-
});
|
|
3123
|
-
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
3124
|
-
__name: "RadioGroupRoot",
|
|
3125
|
-
props: {
|
|
3126
|
-
variant: { default: "surface" },
|
|
3127
|
-
size: { default: "2" },
|
|
3128
|
-
color: {},
|
|
3129
|
-
highContrast: { type: Boolean },
|
|
3130
|
-
modelValue: {},
|
|
3131
|
-
defaultValue: {},
|
|
3132
|
-
disabled: { type: Boolean },
|
|
3133
|
-
orientation: {},
|
|
3134
|
-
dir: {},
|
|
3135
|
-
loop: { type: Boolean },
|
|
3136
|
-
asChild: { type: Boolean },
|
|
3137
|
-
as: {},
|
|
3138
|
-
name: {},
|
|
3139
|
-
required: { type: Boolean }
|
|
3140
|
-
},
|
|
3141
|
-
emits: ["update:modelValue"],
|
|
3142
|
-
setup(__props, { emit: __emit }) {
|
|
3143
|
-
const emits = __emit;
|
|
3144
|
-
const props = __props;
|
|
3145
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["color", "size", "variant", "highContrast"]);
|
|
3146
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "highContrast"]);
|
|
3147
|
-
return (_ctx, _cache) => {
|
|
3148
|
-
return openBlock(), createBlock(unref(RadioGroupRoot), mergeProps({
|
|
3149
|
-
class: ["ui-RadioGroupRoot", unref(resetClass)],
|
|
3150
|
-
"data-accent-color": props.color
|
|
3151
|
-
}, unref(forwarded)), {
|
|
3152
|
-
default: withCtx(() => [
|
|
3153
|
-
renderSlot(_ctx.$slots, "default")
|
|
3154
|
-
]),
|
|
3155
|
-
_: 3
|
|
3156
|
-
}, 16, ["class", "data-accent-color"]);
|
|
3157
|
-
};
|
|
3158
|
-
}
|
|
3159
|
-
});
|
|
3160
|
-
const _hoisted_1$h = { class: "ui-RadioGroupItem" };
|
|
3161
|
-
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
3162
|
-
__name: "RadioGroupItem",
|
|
3163
|
-
props: {
|
|
3164
|
-
color: {},
|
|
3165
|
-
size: {},
|
|
3166
|
-
variant: {},
|
|
3167
|
-
highContrast: { type: Boolean },
|
|
3168
|
-
id: {},
|
|
3169
|
-
value: {},
|
|
3170
|
-
disabled: { type: Boolean },
|
|
3171
|
-
asChild: { type: Boolean },
|
|
3172
|
-
as: {},
|
|
3173
|
-
name: {},
|
|
3174
|
-
required: { type: Boolean }
|
|
3175
|
-
},
|
|
3176
|
-
setup(__props) {
|
|
3177
|
-
const props = __props;
|
|
3178
|
-
const forwarded = useForwardPropsWithout(props, ["color", "size", "variant", "highContrast"]);
|
|
3179
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "highContrast"]);
|
|
3180
|
-
return (_ctx, _cache) => {
|
|
3181
|
-
return openBlock(), createElementBlock("label", _hoisted_1$h, [
|
|
3182
|
-
createVNode(unref(RadioGroupItem), mergeProps({
|
|
3183
|
-
class: ["ui-RadioBase ui-RadioGroupItemIndicator", unref(resetClass)],
|
|
3184
|
-
"data-accent-color": props.color
|
|
3185
|
-
}, unref(forwarded)), null, 16, ["class", "data-accent-color"]),
|
|
3186
|
-
renderSlot(_ctx.$slots, "default")
|
|
3187
|
-
]);
|
|
3188
|
-
};
|
|
3189
|
-
}
|
|
3190
|
-
});
|
|
3191
|
-
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
3192
|
-
__name: "RadioCardsRoot",
|
|
3193
|
-
props: {
|
|
3194
|
-
variant: { default: "surface" },
|
|
3195
|
-
size: { default: "2" },
|
|
3196
|
-
color: {},
|
|
3197
|
-
highContrast: { type: Boolean },
|
|
3198
|
-
modelValue: {},
|
|
3199
|
-
defaultValue: {},
|
|
3200
|
-
disabled: { type: Boolean },
|
|
3201
|
-
orientation: {},
|
|
3202
|
-
dir: {},
|
|
3203
|
-
loop: { type: Boolean },
|
|
3204
|
-
asChild: { type: Boolean },
|
|
3205
|
-
as: {},
|
|
3206
|
-
name: {},
|
|
3207
|
-
required: { type: Boolean }
|
|
3208
|
-
},
|
|
3209
|
-
emits: ["update:modelValue"],
|
|
3210
|
-
setup(__props, { emit: __emit }) {
|
|
3211
|
-
const emits = __emit;
|
|
3212
|
-
const props = __props;
|
|
3213
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["color", "size", "variant", "highContrast"]);
|
|
3214
|
-
const resetClass = buildPropsClass(props, ["size", "variant", "highContrast"]);
|
|
3215
|
-
return (_ctx, _cache) => {
|
|
3216
|
-
return openBlock(), createBlock(unref(RadioGroupRoot), mergeProps({
|
|
3217
|
-
class: ["ui-RadioCardsRoot", unref(resetClass)],
|
|
3218
|
-
"data-accent-color": props.color
|
|
3219
|
-
}, unref(forwarded)), {
|
|
3220
|
-
default: withCtx(() => [
|
|
3221
|
-
renderSlot(_ctx.$slots, "default")
|
|
3222
|
-
]),
|
|
3223
|
-
_: 3
|
|
3224
|
-
}, 16, ["class", "data-accent-color"]);
|
|
3225
|
-
};
|
|
3226
|
-
}
|
|
3227
|
-
});
|
|
3228
|
-
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
3229
|
-
__name: "RadioCardsItem",
|
|
3230
|
-
props: {
|
|
3231
|
-
id: {},
|
|
3232
|
-
value: {},
|
|
3233
|
-
disabled: { type: Boolean },
|
|
3234
|
-
asChild: { type: Boolean },
|
|
3235
|
-
as: {},
|
|
3236
|
-
name: {},
|
|
3237
|
-
required: { type: Boolean }
|
|
3238
|
-
},
|
|
3239
|
-
setup(__props) {
|
|
3240
|
-
const props = __props;
|
|
3241
|
-
const forwarded = useForwardProps(props);
|
|
3242
|
-
useForwardExpose();
|
|
3243
|
-
return (_ctx, _cache) => {
|
|
3244
|
-
return openBlock(), createBlock(unref(RadioGroupItem), mergeProps({ class: "ui-RadioCardsItem ui-BaseCard" }, { ...unref(forwarded), asChild: false }), {
|
|
3245
|
-
default: withCtx(() => [
|
|
3246
|
-
renderSlot(_ctx.$slots, "default")
|
|
3247
|
-
]),
|
|
3248
|
-
_: 3
|
|
3249
|
-
}, 16);
|
|
3250
|
-
};
|
|
3251
|
-
}
|
|
3252
|
-
});
|
|
3253
|
-
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
3254
|
-
__name: "RadioTabsRoot",
|
|
3255
|
-
props: {
|
|
3256
|
-
variant: { default: "classic" },
|
|
3257
|
-
size: { default: "2" },
|
|
3258
|
-
color: {},
|
|
3259
|
-
radius: {},
|
|
3260
|
-
modelValue: {},
|
|
3261
|
-
defaultValue: {},
|
|
3262
|
-
disabled: { type: Boolean },
|
|
3263
|
-
orientation: {},
|
|
3264
|
-
dir: {},
|
|
3265
|
-
loop: { type: Boolean },
|
|
3266
|
-
asChild: { type: Boolean },
|
|
3267
|
-
as: {},
|
|
3268
|
-
name: {},
|
|
3269
|
-
required: { type: Boolean }
|
|
3270
|
-
},
|
|
3271
|
-
emits: ["update:modelValue"],
|
|
3272
|
-
setup(__props, { emit: __emit }) {
|
|
3273
|
-
const emits = __emit;
|
|
3274
|
-
const props = __props;
|
|
3275
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["size", "color", "radius", "variant"]);
|
|
3276
|
-
const resetClass = buildPropsClass(props, ["size", "variant"]);
|
|
3277
|
-
return (_ctx, _cache) => {
|
|
3278
|
-
return openBlock(), createBlock(unref(RadioGroupRoot), mergeProps(unref(forwarded), {
|
|
3279
|
-
class: ["ui-RadioTabsRoot", unref(resetClass)],
|
|
3280
|
-
"data-accent-color": props.color,
|
|
3281
|
-
"data-radius": props.radius
|
|
3282
|
-
}), {
|
|
3283
|
-
default: withCtx(() => [
|
|
3284
|
-
renderSlot(_ctx.$slots, "default")
|
|
3285
|
-
]),
|
|
3286
|
-
_: 3
|
|
3287
|
-
}, 16, ["data-accent-color", "data-radius", "class"]);
|
|
3288
|
-
};
|
|
3289
|
-
}
|
|
3290
|
-
});
|
|
3291
|
-
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
3292
|
-
__name: "RadioTabsItem",
|
|
3293
|
-
props: {
|
|
3294
|
-
id: {},
|
|
3295
|
-
value: {},
|
|
3296
|
-
disabled: { type: Boolean },
|
|
3297
|
-
asChild: { type: Boolean },
|
|
3298
|
-
as: {},
|
|
3299
|
-
name: {},
|
|
3300
|
-
required: { type: Boolean }
|
|
3301
|
-
},
|
|
3302
|
-
setup(__props) {
|
|
3303
|
-
const props = __props;
|
|
3304
|
-
const forwarded = useForwardProps(props);
|
|
3305
|
-
return (_ctx, _cache) => {
|
|
3306
|
-
return openBlock(), createBlock(unref(RadioGroupItem), mergeProps({ class: "ui-RadioTabsItem" }, unref(forwarded)), {
|
|
3307
|
-
default: withCtx(() => [
|
|
3308
|
-
renderSlot(_ctx.$slots, "default")
|
|
3309
|
-
]),
|
|
3310
|
-
_: 3
|
|
3311
|
-
}, 16);
|
|
3312
|
-
};
|
|
3313
|
-
}
|
|
3314
|
-
});
|
|
3315
|
-
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
3316
|
-
__name: "TabsList",
|
|
3317
|
-
props: {
|
|
3318
|
-
size: { default: "2" },
|
|
3319
|
-
radius: {},
|
|
3320
|
-
color: {},
|
|
3321
|
-
variant: { default: "outline" },
|
|
3322
|
-
highContrast: { type: Boolean }
|
|
3323
|
-
},
|
|
3324
|
-
setup(__props) {
|
|
3325
|
-
const props = __props;
|
|
3326
|
-
const resetClass = buildPropsClass(props, ["variant", "size", "highContrast"]);
|
|
3327
|
-
return (_ctx, _cache) => {
|
|
3328
|
-
return openBlock(), createBlock(unref(TabsList), {
|
|
3329
|
-
class: normalizeClass(["ui-TabsList", unref(resetClass)]),
|
|
3330
|
-
"data-radius": props.radius,
|
|
3331
|
-
"data-accent-color": props.color
|
|
3332
|
-
}, {
|
|
3333
|
-
default: withCtx(() => [
|
|
3334
|
-
createVNode(unref(TabsIndicator), { class: "ui-TabsIndicator" }),
|
|
3335
|
-
renderSlot(_ctx.$slots, "default")
|
|
3336
|
-
]),
|
|
3337
|
-
_: 3
|
|
3338
|
-
}, 8, ["class", "data-radius", "data-accent-color"]);
|
|
3339
|
-
};
|
|
3340
|
-
}
|
|
3341
|
-
});
|
|
3342
|
-
const _hoisted_1$g = { class: "ui-TabTriggerInner" };
|
|
3343
|
-
const _hoisted_2$3 = { class: "ui-TabTriggerInnerHidden" };
|
|
3344
|
-
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
3345
|
-
__name: "TabsTrigger",
|
|
3346
|
-
props: {
|
|
3347
|
-
value: {},
|
|
3348
|
-
disabled: { type: Boolean },
|
|
3349
|
-
asChild: { type: Boolean },
|
|
3350
|
-
as: {}
|
|
3351
|
-
},
|
|
3352
|
-
setup(__props) {
|
|
3353
|
-
const props = __props;
|
|
3354
|
-
const forwarded = useForwardProps(props);
|
|
3355
|
-
return (_ctx, _cache) => {
|
|
3356
|
-
return openBlock(), createBlock(unref(TabsTrigger), mergeProps(unref(forwarded), { class: "ui-TabTrigger" }), {
|
|
3357
|
-
default: withCtx(() => [
|
|
3358
|
-
createElementVNode("span", _hoisted_1$g, [
|
|
3359
|
-
renderSlot(_ctx.$slots, "default")
|
|
3360
|
-
]),
|
|
3361
|
-
createElementVNode("span", _hoisted_2$3, [
|
|
3362
|
-
renderSlot(_ctx.$slots, "default")
|
|
3363
|
-
])
|
|
3364
|
-
]),
|
|
3365
|
-
_: 3
|
|
3366
|
-
}, 16);
|
|
3367
|
-
};
|
|
3368
|
-
}
|
|
3369
|
-
});
|
|
3370
|
-
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
3371
|
-
...{
|
|
3372
|
-
inheritAttrs: false
|
|
3373
|
-
},
|
|
3374
|
-
__name: "Editable",
|
|
3375
|
-
props: {
|
|
3376
|
-
radius: { default: "small" },
|
|
3377
|
-
color: {},
|
|
3378
|
-
size: { default: "1" },
|
|
3379
|
-
defaultValue: {},
|
|
3380
|
-
modelValue: {},
|
|
3381
|
-
placeholder: {},
|
|
3382
|
-
dir: {},
|
|
3383
|
-
disabled: { type: Boolean },
|
|
3384
|
-
readonly: { type: Boolean },
|
|
3385
|
-
activationMode: {},
|
|
3386
|
-
selectOnFocus: { type: Boolean },
|
|
3387
|
-
submitMode: {},
|
|
3388
|
-
startWithEditMode: { type: Boolean },
|
|
3389
|
-
maxLength: {},
|
|
3390
|
-
autoResize: { type: Boolean },
|
|
3391
|
-
id: {},
|
|
3392
|
-
asChild: { type: Boolean },
|
|
3393
|
-
as: {},
|
|
3394
|
-
name: {},
|
|
3395
|
-
required: { type: Boolean }
|
|
3396
|
-
},
|
|
3397
|
-
emits: ["update:modelValue", "submit", "update:state"],
|
|
3398
|
-
setup(__props, { emit: __emit }) {
|
|
3399
|
-
const props = __props;
|
|
3400
|
-
const emits = __emit;
|
|
3401
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["radius", "color", "size"]);
|
|
3402
|
-
const resetClass = buildPropsClass(props, ["radius", "size"]);
|
|
3403
|
-
return (_ctx, _cache) => {
|
|
3404
|
-
return openBlock(), createBlock(unref(EditableRoot), mergeProps({
|
|
3405
|
-
class: ["ui-Editable", unref(resetClass)],
|
|
3406
|
-
"data-accent-color": props.color
|
|
3407
|
-
}, unref(forwarded)), {
|
|
3408
|
-
default: withCtx(() => [
|
|
3409
|
-
createVNode(unref(EditableArea), mergeProps({ class: "ui-EditableArea" }, _ctx.$attrs), {
|
|
3410
|
-
default: withCtx(() => [
|
|
3411
|
-
createVNode(unref(EditablePreview), { class: "ui-EditablePreview" }),
|
|
3412
|
-
createVNode(unref(EditableInput), { class: "ui-EditableInput" })
|
|
3413
|
-
]),
|
|
3414
|
-
_: 1
|
|
3415
|
-
}, 16)
|
|
3416
|
-
]),
|
|
3417
|
-
_: 1
|
|
3418
|
-
}, 16, ["class", "data-accent-color"]);
|
|
3419
|
-
};
|
|
3420
|
-
}
|
|
3421
|
-
});
|
|
3422
|
-
const [injectAccordionRootContext, provideAccordionRootContext] = createContext("ui:AccordionRoot");
|
|
3423
|
-
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
3424
|
-
__name: "AccordionRoot",
|
|
3425
|
-
props: {
|
|
3426
|
-
size: { default: "1" },
|
|
3427
|
-
indicatorSide: { default: "right" },
|
|
3428
|
-
indicatorIcon: { default: "chevron" },
|
|
3429
|
-
orientation: {},
|
|
3430
|
-
collapsible: { type: Boolean },
|
|
3431
|
-
disabled: { type: Boolean },
|
|
3432
|
-
dir: {},
|
|
3433
|
-
unmountOnHide: { type: Boolean },
|
|
3434
|
-
asChild: { type: Boolean },
|
|
3435
|
-
as: {},
|
|
3436
|
-
type: {},
|
|
3437
|
-
modelValue: {},
|
|
3438
|
-
defaultValue: {}
|
|
3439
|
-
},
|
|
3440
|
-
emits: ["update:modelValue"],
|
|
3441
|
-
setup(__props, { emit: __emit }) {
|
|
3442
|
-
const props = __props;
|
|
3443
|
-
const emits = __emit;
|
|
3444
|
-
const { indicatorSide, indicatorIcon } = toRefs(props);
|
|
3445
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["size", "indicatorSide", "indicatorIcon"]);
|
|
3446
|
-
const resetClass = buildPropsClass(props, ["size"]);
|
|
3447
|
-
provideAccordionRootContext({
|
|
3448
|
-
indicatorSide,
|
|
3449
|
-
indicatorIcon
|
|
3450
|
-
});
|
|
3451
|
-
return (_ctx, _cache) => {
|
|
3452
|
-
return openBlock(), createBlock(unref(AccordionRoot), mergeProps(unref(forwarded), {
|
|
3453
|
-
class: ["ui-AccordionRoot", unref(resetClass)]
|
|
3454
|
-
}), {
|
|
3455
|
-
default: withCtx(() => [
|
|
3456
|
-
renderSlot(_ctx.$slots, "default")
|
|
3457
|
-
]),
|
|
3458
|
-
_: 3
|
|
3459
|
-
}, 16, ["class"]);
|
|
3460
|
-
};
|
|
3461
|
-
}
|
|
3462
|
-
});
|
|
3463
|
-
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
3464
|
-
__name: "AccordionItem",
|
|
3465
|
-
props: {
|
|
3466
|
-
value: {},
|
|
3467
|
-
disabled: { type: Boolean },
|
|
3468
|
-
unmountOnHide: { type: Boolean },
|
|
3469
|
-
asChild: { type: Boolean },
|
|
3470
|
-
as: {}
|
|
3471
|
-
},
|
|
3472
|
-
setup(__props) {
|
|
3473
|
-
const props = __props;
|
|
3474
|
-
const id = useId$1(null, "accordion-item");
|
|
3475
|
-
const forwarded = computed(() => {
|
|
3476
|
-
const refProps = useForwardProps(props);
|
|
3477
|
-
if (!refProps.value.value) {
|
|
3478
|
-
return { ...refProps.value, value: id };
|
|
3479
|
-
} else {
|
|
3480
|
-
return refProps.value;
|
|
3481
|
-
}
|
|
3482
|
-
});
|
|
3483
|
-
return (_ctx, _cache) => {
|
|
3484
|
-
return openBlock(), createBlock(unref(AccordionItem), mergeProps(forwarded.value, { class: "ui-AccordionItem" }), {
|
|
3485
|
-
default: withCtx(() => [
|
|
3486
|
-
renderSlot(_ctx.$slots, "default")
|
|
3487
|
-
]),
|
|
3488
|
-
_: 3
|
|
3489
|
-
}, 16);
|
|
3490
|
-
};
|
|
3491
|
-
}
|
|
3492
|
-
});
|
|
3493
|
-
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
3494
|
-
...{
|
|
3495
|
-
inheritAttrs: false
|
|
3496
|
-
},
|
|
3497
|
-
__name: "AccordionContent",
|
|
3498
|
-
props: {
|
|
3499
|
-
forceMount: { type: Boolean },
|
|
3500
|
-
asChild: { type: Boolean },
|
|
3501
|
-
as: {}
|
|
3502
|
-
},
|
|
3503
|
-
setup(__props) {
|
|
3504
|
-
const props = __props;
|
|
3505
|
-
const forwardedProps = useForwardProps(props);
|
|
3506
|
-
return (_ctx, _cache) => {
|
|
3507
|
-
return openBlock(), createBlock(unref(AccordionContent), mergeProps(unref(forwardedProps), { class: "ui-AccordionContent" }), {
|
|
3508
|
-
default: withCtx(() => [
|
|
3509
|
-
createElementVNode("div", mergeProps({ class: "ui-AccordionContentInner" }, _ctx.$attrs), [
|
|
3510
|
-
renderSlot(_ctx.$slots, "default")
|
|
3511
|
-
], 16)
|
|
3512
|
-
]),
|
|
3513
|
-
_: 3
|
|
3514
|
-
}, 16);
|
|
3515
|
-
};
|
|
3516
|
-
}
|
|
3517
|
-
});
|
|
3518
|
-
const _hoisted_1$f = {
|
|
3519
|
-
viewBox: "0 0 15 15",
|
|
3520
|
-
width: "1em",
|
|
3521
|
-
height: "1em"
|
|
3522
|
-
};
|
|
3523
|
-
function render$9(_ctx, _cache) {
|
|
3524
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$f, [..._cache[0] || (_cache[0] = [
|
|
3525
|
-
createElementVNode("path", {
|
|
3526
|
-
fill: "currentColor",
|
|
3527
|
-
d: "M6.159 11.865a.5.5 0 0 0 .707-.023l3.75-4a.5.5 0 0 0 0-.684l-3.75-4l-.077-.066a.5.5 0 0 0-.715.67l.061.08L9.565 7.5l-3.43 3.658a.5.5 0 0 0 .024.707"
|
|
3528
|
-
}, null, -1)
|
|
3529
|
-
])]);
|
|
3530
|
-
}
|
|
3531
|
-
const NextIcon = markRaw({ name: "radix-icons-chevron-right", render: render$9 });
|
|
3532
|
-
const _hoisted_1$e = { class: "ui-AccordionIndicator" };
|
|
3533
|
-
const _hoisted_2$2 = {
|
|
3534
|
-
key: 1,
|
|
3535
|
-
class: "ui-AccordionIndicator-plus"
|
|
3536
|
-
};
|
|
3537
|
-
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
3538
|
-
__name: "AccordionIndicator",
|
|
3539
|
-
props: {
|
|
3540
|
-
variant: { default: "chevron" }
|
|
3541
|
-
},
|
|
3542
|
-
setup(__props) {
|
|
3543
|
-
return (_ctx, _cache) => {
|
|
3544
|
-
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
3545
|
-
__props.variant == "chevron" ? (openBlock(), createBlock(unref(NextIcon), {
|
|
3546
|
-
key: 0,
|
|
3547
|
-
class: "ui-AccordionIndicator-chevron"
|
|
3548
|
-
})) : createCommentVNode("", true),
|
|
3549
|
-
__props.variant == "plus" ? (openBlock(), createElementBlock("div", _hoisted_2$2, [..._cache[0] || (_cache[0] = [
|
|
3550
|
-
createElementVNode("span", { class: "ui-AccordionIndicator-plus-1" }, null, -1),
|
|
3551
|
-
createElementVNode("span", { class: "ui-AccordionIndicator-plus-2" }, null, -1)
|
|
3552
|
-
])])) : createCommentVNode("", true)
|
|
3553
|
-
]);
|
|
3554
|
-
};
|
|
3555
|
-
}
|
|
3556
|
-
});
|
|
3557
|
-
const _hoisted_1$d = { class: "ui-AccordionTriggerText" };
|
|
3558
|
-
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
3559
|
-
__name: "AccordionTrigger",
|
|
3560
|
-
props: {
|
|
3561
|
-
indicatorSide: {},
|
|
3562
|
-
indicatorIcon: {},
|
|
3563
|
-
asChild: { type: Boolean },
|
|
3564
|
-
as: {}
|
|
3565
|
-
},
|
|
3566
|
-
setup(__props) {
|
|
3567
|
-
const props = __props;
|
|
3568
|
-
const ctx = injectAccordionRootContext();
|
|
3569
|
-
const forwarded = useForwardPropsWithout(props, ["indicatorSide", "indicatorIcon"]);
|
|
3570
|
-
const indicatorIcon = computed(() => {
|
|
3571
|
-
return props.indicatorIcon || ctx.indicatorIcon.value;
|
|
3572
|
-
});
|
|
3573
|
-
const indicatorSide = computed(() => {
|
|
3574
|
-
return props.indicatorSide || ctx.indicatorSide.value;
|
|
3575
|
-
});
|
|
3576
|
-
return (_ctx, _cache) => {
|
|
3577
|
-
return openBlock(), createBlock(unref(AccordionTrigger), mergeProps({ class: "ui-AccordionTrigger" }, unref(forwarded)), {
|
|
3578
|
-
default: withCtx(() => [
|
|
3579
|
-
createElementVNode("div", _hoisted_1$d, [
|
|
3580
|
-
renderSlot(_ctx.$slots, "default")
|
|
3581
|
-
]),
|
|
3582
|
-
indicatorIcon.value !== "none" ? (openBlock(), createBlock(_sfc_main$e, {
|
|
3583
|
-
key: 0,
|
|
3584
|
-
"data-side": indicatorSide.value,
|
|
3585
|
-
variant: indicatorIcon.value
|
|
3586
|
-
}, null, 8, ["data-side", "variant"])) : createCommentVNode("", true)
|
|
3587
|
-
]),
|
|
3588
|
-
_: 3
|
|
3589
|
-
}, 16);
|
|
3590
|
-
};
|
|
3591
|
-
}
|
|
3592
|
-
});
|
|
3593
|
-
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
3594
|
-
__name: "CollapsibleRoot",
|
|
3595
|
-
props: {
|
|
3596
|
-
color: {},
|
|
3597
|
-
radius: {},
|
|
3598
|
-
variant: { default: "ghost" },
|
|
3599
|
-
size: { default: "2" },
|
|
3600
|
-
defaultOpen: { type: Boolean },
|
|
3601
|
-
open: { type: Boolean },
|
|
3602
|
-
disabled: { type: Boolean },
|
|
3603
|
-
unmountOnHide: { type: Boolean },
|
|
3604
|
-
asChild: { type: Boolean },
|
|
3605
|
-
as: {}
|
|
3606
|
-
},
|
|
3607
|
-
emits: ["update:open"],
|
|
3608
|
-
setup(__props, { emit: __emit }) {
|
|
3609
|
-
const props = __props;
|
|
3610
|
-
const emits = __emit;
|
|
3611
|
-
const forwarded = useForwardPropsEmitsWithout(props, emits, ["color", "radius", "variant", "size"]);
|
|
3612
|
-
const resetClass = buildPropsClass(props, ["variant", "size"]);
|
|
3613
|
-
return (_ctx, _cache) => {
|
|
3614
|
-
return openBlock(), createBlock(unref(CollapsibleRoot), mergeProps({
|
|
3615
|
-
class: ["ui-CollapsibleRoot", unref(resetClass)]
|
|
3616
|
-
}, unref(forwarded), {
|
|
3617
|
-
"data-accent-color": __props.color,
|
|
3618
|
-
"data-radius": __props.radius
|
|
3619
|
-
}), {
|
|
3620
|
-
default: withCtx(() => [
|
|
3621
|
-
renderSlot(_ctx.$slots, "default")
|
|
3622
|
-
]),
|
|
3623
|
-
_: 3
|
|
3624
|
-
}, 16, ["class", "data-accent-color", "data-radius"]);
|
|
3625
|
-
};
|
|
3626
|
-
}
|
|
3627
|
-
});
|
|
3628
|
-
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
3629
|
-
__name: "CollapsibleIndicator",
|
|
3630
|
-
setup(__props) {
|
|
3631
|
-
return (_ctx, _cache) => {
|
|
3632
|
-
return openBlock(), createBlock(unref(NextIcon), { class: "ui-CollapsibleIndicator" });
|
|
3633
|
-
};
|
|
3634
|
-
}
|
|
3635
|
-
});
|
|
3636
|
-
const _hoisted_1$c = { class: "ui-CollapsibleTriggerText" };
|
|
3637
|
-
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
3638
|
-
__name: "CollapsibleTrigger",
|
|
3639
|
-
props: {
|
|
3640
|
-
indicator: { default: "right" },
|
|
3641
|
-
asChild: { type: Boolean },
|
|
3642
|
-
as: {}
|
|
3643
|
-
},
|
|
3644
|
-
setup(__props) {
|
|
3645
|
-
const props = __props;
|
|
3646
|
-
const forwarded = useForwardPropsWithout(props, ["indicator"]);
|
|
3647
|
-
return (_ctx, _cache) => {
|
|
3648
|
-
return props.asChild ? (openBlock(), createBlock(unref(CollapsibleTrigger), mergeProps({
|
|
3649
|
-
key: 0,
|
|
3650
|
-
class: "ui-CollapsibleTrigger"
|
|
3651
|
-
}, unref(forwarded)), {
|
|
3652
|
-
default: withCtx(() => [
|
|
3653
|
-
renderSlot(_ctx.$slots, "default")
|
|
3654
|
-
]),
|
|
3655
|
-
_: 3
|
|
3656
|
-
}, 16)) : (openBlock(), createBlock(unref(CollapsibleTrigger), mergeProps({
|
|
3657
|
-
key: 1,
|
|
3658
|
-
class: "ui-CollapsibleTrigger"
|
|
3659
|
-
}, unref(forwarded)), {
|
|
3660
|
-
default: withCtx(() => [
|
|
3661
|
-
createElementVNode("span", _hoisted_1$c, [
|
|
3662
|
-
renderSlot(_ctx.$slots, "default")
|
|
3663
|
-
]),
|
|
3664
|
-
__props.indicator !== "none" ? (openBlock(), createBlock(_sfc_main$b, {
|
|
3665
|
-
key: 0,
|
|
3666
|
-
"data-side": __props.indicator
|
|
3667
|
-
}, null, 8, ["data-side"])) : createCommentVNode("", true)
|
|
3668
|
-
]),
|
|
3669
|
-
_: 3
|
|
3670
|
-
}, 16));
|
|
3671
|
-
};
|
|
3672
|
-
}
|
|
3673
|
-
});
|
|
3674
|
-
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
3675
|
-
__name: "CollapsibleContent",
|
|
3676
|
-
props: {
|
|
3677
|
-
forceMount: { type: Boolean },
|
|
3678
|
-
asChild: { type: Boolean },
|
|
3679
|
-
as: {}
|
|
3680
|
-
},
|
|
3681
|
-
setup(__props) {
|
|
3682
|
-
const props = __props;
|
|
3683
|
-
const forwardedProps = useForwardProps(props);
|
|
3684
|
-
return (_ctx, _cache) => {
|
|
3685
|
-
return openBlock(), createBlock(unref(CollapsibleContent), mergeProps(unref(forwardedProps), { class: "ui-CollapsibleContent" }), {
|
|
3686
|
-
default: withCtx(() => [
|
|
3687
|
-
renderSlot(_ctx.$slots, "default")
|
|
3688
|
-
]),
|
|
3689
|
-
_: 3
|
|
3690
|
-
}, 16);
|
|
3691
|
-
};
|
|
3692
|
-
}
|
|
3693
|
-
});
|
|
3694
|
-
const _hoisted_1$b = {
|
|
3695
|
-
viewBox: "0 0 15 15",
|
|
3696
|
-
width: "1em",
|
|
3697
|
-
height: "1em"
|
|
3698
|
-
};
|
|
3699
|
-
function render$8(_ctx, _cache) {
|
|
3700
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$b, [..._cache[0] || (_cache[0] = [
|
|
3701
|
-
createElementVNode("path", {
|
|
3702
|
-
fill: "currentColor",
|
|
3703
|
-
d: "M6.225 3.082a.5.5 0 0 1 .693.694l-.065.078L3.207 7.5l3.646 3.647l.065.078a.5.5 0 0 1-.693.693l-.079-.064l-4-4a.5.5 0 0 1 0-.707l4-4zm6 0a.5.5 0 0 1 .693.694l-.064.078L9.207 7.5l3.646 3.647l.065.078a.5.5 0 0 1-.693.693l-.079-.064l-4-4a.5.5 0 0 1 0-.707l4-4z"
|
|
3704
|
-
}, null, -1)
|
|
3705
|
-
])]);
|
|
3706
|
-
}
|
|
3707
|
-
const FirstIcon = markRaw({ name: "radix-icons-double-arrow-left", render: render$8 });
|
|
3708
|
-
const _hoisted_1$a = {
|
|
3709
|
-
viewBox: "0 0 15 15",
|
|
3710
|
-
width: "1em",
|
|
3711
|
-
height: "1em"
|
|
3712
|
-
};
|
|
3713
|
-
function render$7(_ctx, _cache) {
|
|
3714
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$a, [..._cache[0] || (_cache[0] = [
|
|
3715
|
-
createElementVNode("path", {
|
|
3716
|
-
fill: "currentColor",
|
|
3717
|
-
d: "M2.147 3.147a.5.5 0 0 1 .629-.065l.078.065l4 4a.5.5 0 0 1 0 .707l-4 4l-.078.064a.5.5 0 0 1-.694-.693l.065-.078L5.793 7.5L2.147 3.854l-.065-.078a.5.5 0 0 1 .065-.63m6 0a.5.5 0 0 1 .629-.065l.078.065l4 4a.5.5 0 0 1 0 .707l-4 4l-.078.064a.5.5 0 0 1-.694-.693l.065-.078L11.793 7.5L8.147 3.854l-.065-.078a.5.5 0 0 1 .065-.63"
|
|
3718
|
-
}, null, -1)
|
|
3719
|
-
])]);
|
|
3720
|
-
}
|
|
3721
|
-
const LastIcon = markRaw({ name: "radix-icons-double-arrow-right", render: render$7 });
|
|
3722
|
-
const _hoisted_1$9 = {
|
|
3723
|
-
viewBox: "0 0 15 15",
|
|
3724
|
-
width: "1em",
|
|
3725
|
-
height: "1em"
|
|
3726
|
-
};
|
|
3727
|
-
function render$6(_ctx, _cache) {
|
|
3728
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$9, [..._cache[0] || (_cache[0] = [
|
|
3729
|
-
createElementVNode("path", {
|
|
3730
|
-
fill: "currentColor",
|
|
3731
|
-
d: "M8.212 3.092a.5.5 0 0 1 .715.67l-.062.08L5.435 7.5l3.43 3.658l.062.08a.501.501 0 0 1-.715.67l-.077-.066l-3.75-4a.5.5 0 0 1 0-.684l3.75-4z"
|
|
3732
|
-
}, null, -1)
|
|
3733
|
-
])]);
|
|
3734
|
-
}
|
|
3735
|
-
const PrevIcon = markRaw({ name: "radix-icons-chevron-left", render: render$6 });
|
|
3736
|
-
const _hoisted_1$8 = {
|
|
3737
|
-
viewBox: "0 0 15 15",
|
|
3738
|
-
width: "1em",
|
|
3739
|
-
height: "1em"
|
|
3740
|
-
};
|
|
3741
|
-
function render$5(_ctx, _cache) {
|
|
3742
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$8, [..._cache[0] || (_cache[0] = [
|
|
3743
|
-
createElementVNode("path", {
|
|
3744
|
-
fill: "currentColor",
|
|
3745
|
-
d: "M2.5 6.375a1.125 1.125 0 1 1 0 2.25a1.125 1.125 0 0 1 0-2.25m5 0a1.125 1.125 0 1 1 0 2.25a1.125 1.125 0 0 1 0-2.25m5 0a1.125 1.125 0 1 1 0 2.25a1.125 1.125 0 0 1 0-2.25"
|
|
3746
|
-
}, null, -1)
|
|
3747
|
-
])]);
|
|
3748
|
-
}
|
|
3749
|
-
const EllipsisIcon = markRaw({ name: "radix-icons-dots-horizontal", render: render$5 });
|
|
3750
|
-
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
3751
|
-
__name: "PaginationEllipsis",
|
|
3752
|
-
props: {
|
|
3753
|
-
items: {},
|
|
3754
|
-
index: {}
|
|
3755
|
-
},
|
|
3756
|
-
setup(__props) {
|
|
3757
|
-
const props = __props;
|
|
3758
|
-
const ellipsisPage = computed(() => {
|
|
3759
|
-
if (props.index === 1) {
|
|
3760
|
-
const page = props.items[props.index + 1];
|
|
3761
|
-
return page.value - 1;
|
|
3762
|
-
} else {
|
|
3763
|
-
const page = props.items[props.index - 1];
|
|
3764
|
-
return page.value + 1;
|
|
3765
|
-
}
|
|
3766
|
-
});
|
|
3767
|
-
const ctx = injectPaginationRootContext();
|
|
3768
|
-
const onSelect = () => {
|
|
3769
|
-
ctx.onPageChange(ellipsisPage.value);
|
|
3770
|
-
};
|
|
3771
|
-
return (_ctx, _cache) => {
|
|
3772
|
-
return openBlock(), createBlock(unref(PaginationEllipsis), {
|
|
3773
|
-
class: "ui-PaginationEllipsis ui-Button",
|
|
3774
|
-
as: "button",
|
|
3775
|
-
type: "button",
|
|
3776
|
-
value: ellipsisPage.value,
|
|
3777
|
-
"aria-label": `Page ${ellipsisPage.value}`,
|
|
3778
|
-
onClick: withModifiers(onSelect, ["prevent"])
|
|
3779
|
-
}, {
|
|
3780
|
-
default: withCtx(() => [
|
|
3781
|
-
createVNode(unref(EllipsisIcon))
|
|
3782
|
-
]),
|
|
3783
|
-
_: 1
|
|
3784
|
-
}, 8, ["value", "aria-label"]);
|
|
3785
|
-
};
|
|
3786
|
-
}
|
|
3787
|
-
});
|
|
3788
|
-
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
3789
|
-
__name: "Pagination",
|
|
3790
|
-
props: {
|
|
3791
|
-
color: { default: "gray" },
|
|
3792
|
-
size: { default: "2" },
|
|
3793
|
-
variant: { default: "ghost" },
|
|
3794
|
-
navigation: { default: "all" },
|
|
3795
|
-
page: {},
|
|
3796
|
-
defaultPage: {},
|
|
3797
|
-
itemsPerPage: { default: 10 },
|
|
3798
|
-
total: {},
|
|
3799
|
-
siblingCount: {},
|
|
3800
|
-
disabled: { type: Boolean },
|
|
3801
|
-
showEdges: { type: Boolean },
|
|
3802
|
-
asChild: { type: Boolean },
|
|
3803
|
-
as: {}
|
|
3804
|
-
},
|
|
3805
|
-
emits: ["update:page"],
|
|
3806
|
-
setup(__props, { emit: __emit }) {
|
|
3807
|
-
const props = __props;
|
|
3808
|
-
const emits = __emit;
|
|
3809
|
-
const forwarded = useForwardPropsEmitsWithout(
|
|
3810
|
-
props,
|
|
3811
|
-
emits,
|
|
3812
|
-
["color", "size", "variant", "navigation"]
|
|
3813
|
-
);
|
|
3814
|
-
const resetClass = buildPropsClass(props, ["size", "variant"]);
|
|
3815
|
-
const showPrevNext = computed(() => {
|
|
3816
|
-
return props.navigation === "all" || props.navigation === "prev-next";
|
|
3817
|
-
});
|
|
3818
|
-
const showFirstLast = computed(() => {
|
|
3819
|
-
return props.navigation === "all" || props.navigation === "first-last";
|
|
3820
|
-
});
|
|
3821
|
-
return (_ctx, _cache) => {
|
|
3822
|
-
return openBlock(), createBlock(unref(PaginationRoot), mergeProps(unref(forwarded), {
|
|
3823
|
-
class: ["ui-PaginationRoot", unref(resetClass)],
|
|
3824
|
-
"data-accent-color": __props.color
|
|
3825
|
-
}), {
|
|
3826
|
-
default: withCtx(() => [
|
|
3827
|
-
createVNode(unref(PaginationList), { class: "ui-PaginationList" }, {
|
|
3828
|
-
default: withCtx(({ items }) => [
|
|
3829
|
-
showFirstLast.value ? (openBlock(), createBlock(unref(PaginationFirst), {
|
|
3830
|
-
key: 0,
|
|
3831
|
-
class: normalizeClass(["ui-PaginationFirst ui-Button", unref(resetClass)])
|
|
3832
|
-
}, {
|
|
3833
|
-
default: withCtx(() => [
|
|
3834
|
-
createVNode(unref(FirstIcon))
|
|
3835
|
-
]),
|
|
3836
|
-
_: 1
|
|
3837
|
-
}, 8, ["class"])) : createCommentVNode("", true),
|
|
3838
|
-
showPrevNext.value ? (openBlock(), createBlock(unref(PaginationPrev), {
|
|
3839
|
-
key: 1,
|
|
3840
|
-
class: normalizeClass(["ui-PaginationPrev ui-Button", unref(resetClass)])
|
|
3841
|
-
}, {
|
|
3842
|
-
default: withCtx(() => [
|
|
3843
|
-
createVNode(unref(PrevIcon))
|
|
3844
|
-
]),
|
|
3845
|
-
_: 1
|
|
3846
|
-
}, 8, ["class"])) : createCommentVNode("", true),
|
|
3847
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(items, (page, index) => {
|
|
3848
|
-
return openBlock(), createElementBlock(Fragment, { key: index }, [
|
|
3849
|
-
page.type === "page" ? (openBlock(), createBlock(unref(PaginationListItem), {
|
|
3850
|
-
key: 0,
|
|
3851
|
-
class: normalizeClass(["ui-PaginationListItem ui-Button", unref(resetClass)]),
|
|
3852
|
-
value: page.value
|
|
3853
|
-
}, {
|
|
3854
|
-
default: withCtx(() => [
|
|
3855
|
-
createTextVNode(toDisplayString(page.value), 1)
|
|
3856
|
-
]),
|
|
3857
|
-
_: 2
|
|
3858
|
-
}, 1032, ["class", "value"])) : (openBlock(), createBlock(_sfc_main$8, {
|
|
3859
|
-
key: 1,
|
|
3860
|
-
items,
|
|
3861
|
-
index,
|
|
3862
|
-
class: normalizeClass(unref(resetClass)),
|
|
3863
|
-
as: "button"
|
|
3864
|
-
}, null, 8, ["items", "index", "class"]))
|
|
3865
|
-
], 64);
|
|
3866
|
-
}), 128)),
|
|
3867
|
-
showPrevNext.value ? (openBlock(), createBlock(unref(PaginationNext), {
|
|
3868
|
-
key: 2,
|
|
3869
|
-
class: normalizeClass(["ui-PaginationNext ui-Button", unref(resetClass)])
|
|
3870
|
-
}, {
|
|
3871
|
-
default: withCtx(() => [
|
|
3872
|
-
createVNode(unref(NextIcon))
|
|
3873
|
-
]),
|
|
3874
|
-
_: 1
|
|
3875
|
-
}, 8, ["class"])) : createCommentVNode("", true),
|
|
3876
|
-
showFirstLast.value ? (openBlock(), createBlock(unref(PaginationLast), {
|
|
3877
|
-
key: 3,
|
|
3878
|
-
class: normalizeClass(["ui-PaginationLast ui-Button", unref(resetClass)])
|
|
3879
|
-
}, {
|
|
3880
|
-
default: withCtx(() => [
|
|
3881
|
-
createVNode(unref(LastIcon))
|
|
3882
|
-
]),
|
|
3883
|
-
_: 1
|
|
3884
|
-
}, 8, ["class"])) : createCommentVNode("", true)
|
|
3885
|
-
]),
|
|
3886
|
-
_: 1
|
|
3887
|
-
})
|
|
3888
|
-
]),
|
|
3889
|
-
_: 1
|
|
3890
|
-
}, 16, ["class", "data-accent-color"]);
|
|
3891
|
-
};
|
|
3892
|
-
}
|
|
3893
|
-
});
|
|
3894
|
-
// @__NO_SIDE_EFFECTS__
|
|
3895
|
-
function createGlobalState(stateFactory) {
|
|
3896
|
-
let initialized = false;
|
|
3897
|
-
let state;
|
|
3898
|
-
const scope = effectScope(true);
|
|
3899
|
-
return ((...args) => {
|
|
3900
|
-
if (!initialized) {
|
|
3901
|
-
state = scope.run(() => stateFactory(...args));
|
|
3902
|
-
initialized = true;
|
|
3903
|
-
}
|
|
3904
|
-
return state;
|
|
3905
|
-
});
|
|
3906
|
-
}
|
|
3907
|
-
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
3908
|
-
let count = 0;
|
|
3909
|
-
const useToastManager = /* @__PURE__ */ createGlobalState(() => {
|
|
3910
|
-
const messages = ref([]);
|
|
3911
|
-
const add = (msg, category) => {
|
|
3912
|
-
const id = count++;
|
|
3913
|
-
if (typeof msg === "string") {
|
|
3914
|
-
messages.value.unshift({ title: msg, category, id });
|
|
3915
|
-
} else {
|
|
3916
|
-
messages.value.unshift({ ...msg, category, id });
|
|
3917
|
-
}
|
|
3918
|
-
return id;
|
|
3919
|
-
};
|
|
3920
|
-
const update = (id, msg) => {
|
|
3921
|
-
const messageArray = [...messages.value];
|
|
3922
|
-
const index = messageArray.findIndex((item) => item.id === id);
|
|
3923
|
-
if (index !== -1) {
|
|
3924
|
-
const found = messageArray[index];
|
|
3925
|
-
if (found) {
|
|
3926
|
-
messageArray[index] = { ...found, ...msg };
|
|
3927
|
-
messages.value = messageArray;
|
|
3928
|
-
}
|
|
3929
|
-
}
|
|
3930
|
-
};
|
|
3931
|
-
const remove = (id) => {
|
|
3932
|
-
const index = messages.value.findIndex((item) => item.id === id);
|
|
3933
|
-
if (index !== -1) {
|
|
3934
|
-
messages.value.splice(index, 1);
|
|
3935
|
-
}
|
|
3936
|
-
};
|
|
3937
|
-
const info = (msg) => {
|
|
3938
|
-
return add(msg, "info");
|
|
3939
|
-
};
|
|
3940
|
-
const success = (msg) => {
|
|
3941
|
-
return add(msg, "success");
|
|
3942
|
-
};
|
|
3943
|
-
const warning = (msg) => {
|
|
3944
|
-
return add(msg, "warning");
|
|
3945
|
-
};
|
|
3946
|
-
const error = (msg) => {
|
|
3947
|
-
return add(msg, "error");
|
|
3948
|
-
};
|
|
3949
|
-
const promise = (fn, options) => {
|
|
3950
|
-
const id = add({ title: options.loading, duration: 6e6 }, "loading");
|
|
3951
|
-
fn().then((value) => {
|
|
3952
|
-
const msg = options.success(value);
|
|
3953
|
-
if (typeof msg === "string") {
|
|
3954
|
-
update(id, { duration: void 0, title: msg, category: "success" });
|
|
3955
|
-
} else {
|
|
3956
|
-
update(id, { duration: void 0, ...msg, category: "success" });
|
|
3957
|
-
}
|
|
3958
|
-
}).catch((e) => {
|
|
3959
|
-
if (options.error) {
|
|
3960
|
-
const msg = options.error(e);
|
|
3961
|
-
if (typeof msg === "string") {
|
|
3962
|
-
update(id, { duration: void 0, title: msg, category: "error" });
|
|
3963
|
-
} else {
|
|
3964
|
-
update(id, { duration: void 0, ...msg, category: "error" });
|
|
3965
|
-
}
|
|
3966
|
-
}
|
|
3967
|
-
});
|
|
3968
|
-
return id;
|
|
3969
|
-
};
|
|
3970
|
-
return {
|
|
3971
|
-
messages,
|
|
3972
|
-
add,
|
|
3973
|
-
update,
|
|
3974
|
-
remove,
|
|
3975
|
-
info,
|
|
3976
|
-
success,
|
|
3977
|
-
warning,
|
|
3978
|
-
error,
|
|
3979
|
-
promise
|
|
3980
|
-
};
|
|
3981
|
-
});
|
|
3982
|
-
const _sfc_main$6 = {};
|
|
3983
|
-
const _hoisted_1$7 = { class: "ui-SpinnerIcon" };
|
|
3984
|
-
function _sfc_render(_ctx, _cache) {
|
|
3985
|
-
return openBlock(), createElementBlock("span", _hoisted_1$7, [..._cache[0] || (_cache[0] = [
|
|
3986
|
-
createStaticVNode('<span class="ui-SpinnerLeaf"></span><span class="ui-SpinnerLeaf"></span><span class="ui-SpinnerLeaf"></span><span class="ui-SpinnerLeaf"></span><span class="ui-SpinnerLeaf"></span><span class="ui-SpinnerLeaf"></span><span class="ui-SpinnerLeaf"></span><span class="ui-SpinnerLeaf"></span>', 8)
|
|
3987
|
-
])]);
|
|
3988
|
-
}
|
|
3989
|
-
const SpinnerIcon = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]);
|
|
3990
|
-
const _hoisted_1$6 = {
|
|
3991
|
-
viewBox: "0 0 24 24",
|
|
3992
|
-
width: "1em",
|
|
3993
|
-
height: "1em"
|
|
3994
|
-
};
|
|
3995
|
-
function render$4(_ctx, _cache) {
|
|
3996
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$6, [..._cache[0] || (_cache[0] = [
|
|
3997
|
-
createElementVNode("path", {
|
|
3998
|
-
fill: "currentColor",
|
|
3999
|
-
d: "M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-12.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m2 5.5h-1v-4.5h-3v2h1V15h-1v2h4z"
|
|
4000
|
-
}, null, -1)
|
|
4001
|
-
])]);
|
|
4002
|
-
}
|
|
4003
|
-
const InfoIcon = markRaw({ name: "ri-information-2-fill", render: render$4 });
|
|
4004
|
-
const _hoisted_1$5 = {
|
|
4005
|
-
viewBox: "0 0 24 24",
|
|
4006
|
-
width: "1em",
|
|
4007
|
-
height: "1em"
|
|
4008
|
-
};
|
|
4009
|
-
function render$3(_ctx, _cache) {
|
|
4010
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$5, [..._cache[0] || (_cache[0] = [
|
|
4011
|
-
createElementVNode("path", {
|
|
4012
|
-
fill: "currentColor",
|
|
4013
|
-
d: "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10m5.457-12.543L11 15.914l-4.207-4.207l1.414-1.414L11 13.086l5.043-5.043z"
|
|
4014
|
-
}, null, -1)
|
|
4015
|
-
])]);
|
|
4016
|
-
}
|
|
4017
|
-
const SuccessIcon = markRaw({ name: "ri-checkbox-circle-fill", render: render$3 });
|
|
4018
|
-
const _hoisted_1$4 = {
|
|
4019
|
-
viewBox: "0 0 24 24",
|
|
4020
|
-
width: "1em",
|
|
4021
|
-
height: "1em"
|
|
4022
|
-
};
|
|
4023
|
-
function render$2(_ctx, _cache) {
|
|
4024
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$4, [..._cache[0] || (_cache[0] = [
|
|
4025
|
-
createElementVNode("path", {
|
|
4026
|
-
fill: "currentColor",
|
|
4027
|
-
d: "m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0M11 16v2h2v-2zm0-7v5h2V9z"
|
|
4028
|
-
}, null, -1)
|
|
4029
|
-
])]);
|
|
4030
|
-
}
|
|
4031
|
-
const WarningIcon = markRaw({ name: "ri-alert-fill", render: render$2 });
|
|
4032
|
-
const _hoisted_1$3 = {
|
|
4033
|
-
viewBox: "0 0 24 24",
|
|
4034
|
-
width: "1em",
|
|
4035
|
-
height: "1em"
|
|
4036
|
-
};
|
|
4037
|
-
function render$1(_ctx, _cache) {
|
|
4038
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$3, [..._cache[0] || (_cache[0] = [
|
|
4039
|
-
createElementVNode("path", {
|
|
4040
|
-
fill: "currentColor",
|
|
4041
|
-
d: "M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m-1-7v2h2v-2zm0-8v6h2V7z"
|
|
4042
|
-
}, null, -1)
|
|
4043
|
-
])]);
|
|
4044
|
-
}
|
|
4045
|
-
const ErrorIcon = markRaw({ name: "ri-error-warning-fill", render: render$1 });
|
|
4046
|
-
const _hoisted_1$2 = ["data-accent-color"];
|
|
4047
|
-
const _hoisted_2$1 = { class: "ui-ToastContent" };
|
|
4048
|
-
const CATEGORY_ICONS = {
|
|
4049
|
-
loading: SpinnerIcon,
|
|
4050
|
-
info: InfoIcon,
|
|
4051
|
-
success: SuccessIcon,
|
|
4052
|
-
warning: WarningIcon,
|
|
4053
|
-
error: ErrorIcon
|
|
4054
|
-
};
|
|
4055
|
-
const CATEGORY_COLORS = {
|
|
4056
|
-
loading: "gray",
|
|
4057
|
-
info: "indigo",
|
|
4058
|
-
success: "green",
|
|
4059
|
-
warning: "orange",
|
|
4060
|
-
error: "red"
|
|
4061
|
-
};
|
|
4062
|
-
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
4063
|
-
__name: "ToastItem",
|
|
4064
|
-
props: {
|
|
4065
|
-
yPosition: {},
|
|
4066
|
-
xPosition: {},
|
|
4067
|
-
message: {},
|
|
4068
|
-
index: {}
|
|
4069
|
-
},
|
|
4070
|
-
setup(__props) {
|
|
4071
|
-
const props = __props;
|
|
4072
|
-
const toastRef = useTemplateRef("toastRef");
|
|
4073
|
-
const paused = ref(false);
|
|
4074
|
-
const manager = useToastManager();
|
|
4075
|
-
const styleVars = computed(() => {
|
|
4076
|
-
const heights = manager.messages.value.slice(0, props.index).map((item) => item.height || 60);
|
|
4077
|
-
const offsetY = heights.reduce((sum, num) => sum + num, 0);
|
|
4078
|
-
return { "--toast-index": props.index, "--toast-offset-y": offsetY + "px" };
|
|
4079
|
-
});
|
|
4080
|
-
const categoryIcon = computed(() => {
|
|
4081
|
-
if (props.message.category) {
|
|
4082
|
-
return CATEGORY_ICONS[props.message.category];
|
|
4083
|
-
} else {
|
|
4084
|
-
return "";
|
|
4085
|
-
}
|
|
4086
|
-
});
|
|
4087
|
-
const categoryColor = computed(() => {
|
|
4088
|
-
if (props.message.category) {
|
|
4089
|
-
return CATEGORY_COLORS[props.message.category];
|
|
4090
|
-
} else {
|
|
4091
|
-
return void 0;
|
|
4092
|
-
}
|
|
4093
|
-
});
|
|
4094
|
-
const onOpenChange = (open) => {
|
|
4095
|
-
if (open === false) {
|
|
4096
|
-
setTimeout(() => {
|
|
4097
|
-
manager.remove(props.message.id);
|
|
4098
|
-
}, 500);
|
|
4099
|
-
}
|
|
4100
|
-
};
|
|
4101
|
-
const onPause = () => {
|
|
4102
|
-
paused.value = true;
|
|
4103
|
-
};
|
|
4104
|
-
const onResume = () => {
|
|
4105
|
-
paused.value = false;
|
|
4106
|
-
};
|
|
4107
|
-
onMounted(() => {
|
|
4108
|
-
const el = toastRef.value.$el;
|
|
4109
|
-
manager.update(props.message.id, { height: el.clientHeight });
|
|
4110
|
-
});
|
|
4111
|
-
return (_ctx, _cache) => {
|
|
4112
|
-
return openBlock(), createBlock(unref(ToastRoot), {
|
|
4113
|
-
ref_key: "toastRef",
|
|
4114
|
-
ref: toastRef,
|
|
4115
|
-
key: __props.message.id,
|
|
4116
|
-
class: "ui-ToastItem",
|
|
4117
|
-
duration: __props.message.duration,
|
|
4118
|
-
"data-expanded": paused.value,
|
|
4119
|
-
"data-visible": __props.index < 3,
|
|
4120
|
-
style: normalizeStyle(styleVars.value),
|
|
4121
|
-
"onUpdate:open": onOpenChange,
|
|
4122
|
-
onPause,
|
|
4123
|
-
onResume
|
|
4124
|
-
}, {
|
|
4125
|
-
default: withCtx(() => [
|
|
4126
|
-
__props.message.category ? (openBlock(), createElementBlock("div", {
|
|
4127
|
-
key: 0,
|
|
4128
|
-
class: "ui-ToastIcon",
|
|
4129
|
-
"data-accent-color": categoryColor.value
|
|
4130
|
-
}, [
|
|
4131
|
-
(openBlock(), createBlock(resolveDynamicComponent(categoryIcon.value)))
|
|
4132
|
-
], 8, _hoisted_1$2)) : createCommentVNode("", true),
|
|
4133
|
-
createElementVNode("div", _hoisted_2$1, [
|
|
4134
|
-
createVNode(unref(ToastTitle), { class: "ui-ToastTitle" }, {
|
|
4135
|
-
default: withCtx(() => [
|
|
4136
|
-
createTextVNode(toDisplayString(__props.message.title), 1)
|
|
4137
|
-
]),
|
|
4138
|
-
_: 1
|
|
4139
|
-
}),
|
|
4140
|
-
__props.message.description ? (openBlock(), createBlock(unref(ToastDescription), {
|
|
4141
|
-
key: 0,
|
|
4142
|
-
class: "ui-ToastDescription"
|
|
4143
|
-
}, {
|
|
4144
|
-
default: withCtx(() => [
|
|
4145
|
-
createTextVNode(toDisplayString(__props.message.description), 1)
|
|
4146
|
-
]),
|
|
4147
|
-
_: 1
|
|
4148
|
-
})) : createCommentVNode("", true)
|
|
4149
|
-
]),
|
|
4150
|
-
__props.message.action ? (openBlock(), createBlock(unref(ToastAction), {
|
|
4151
|
-
key: 1,
|
|
4152
|
-
class: "ui-ToastAction",
|
|
4153
|
-
"alt-text": __props.message.action.altText || __props.message.action.label,
|
|
4154
|
-
"as-child": "",
|
|
4155
|
-
onClick: __props.message.action.onClick
|
|
4156
|
-
}, {
|
|
4157
|
-
default: withCtx(() => [
|
|
4158
|
-
createVNode(_sfc_main$1m, {
|
|
4159
|
-
variant: __props.message.action.variant || "soft",
|
|
4160
|
-
radius: __props.message.action.radius,
|
|
4161
|
-
size: __props.message.action.size || "1",
|
|
4162
|
-
color: __props.message.action.color
|
|
4163
|
-
}, {
|
|
4164
|
-
default: withCtx(() => [
|
|
4165
|
-
createTextVNode(toDisplayString(__props.message.action.label), 1)
|
|
4166
|
-
]),
|
|
4167
|
-
_: 1
|
|
4168
|
-
}, 8, ["variant", "radius", "size", "color"])
|
|
4169
|
-
]),
|
|
4170
|
-
_: 1
|
|
4171
|
-
}, 8, ["alt-text", "onClick"])) : createCommentVNode("", true)
|
|
4172
|
-
]),
|
|
4173
|
-
_: 1
|
|
4174
|
-
}, 8, ["duration", "data-expanded", "data-visible", "style"]);
|
|
4175
|
-
};
|
|
4176
|
-
}
|
|
4177
|
-
});
|
|
4178
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
4179
|
-
...{
|
|
4180
|
-
inheritAttrs: false
|
|
4181
|
-
},
|
|
4182
|
-
__name: "ToastProvider",
|
|
4183
|
-
props: {
|
|
4184
|
-
size: { default: "1" },
|
|
4185
|
-
position: { default: "bottom-right" },
|
|
4186
|
-
label: {},
|
|
4187
|
-
duration: {},
|
|
4188
|
-
disableSwipe: { type: Boolean },
|
|
4189
|
-
swipeDirection: {},
|
|
4190
|
-
swipeThreshold: {}
|
|
4191
|
-
},
|
|
4192
|
-
setup(__props) {
|
|
4193
|
-
const props = __props;
|
|
4194
|
-
const forwarded = useForwardPropsWithout(props, ["position", "size"]);
|
|
4195
|
-
const { messages } = useToastManager();
|
|
4196
|
-
const yPosition = computed(() => {
|
|
4197
|
-
return props.position.split("-")[0];
|
|
4198
|
-
});
|
|
4199
|
-
const xPosition = computed(() => {
|
|
4200
|
-
return props.position.split("-")[1];
|
|
4201
|
-
});
|
|
4202
|
-
const swipeDirection = computed(() => {
|
|
4203
|
-
if (props.swipeDirection) {
|
|
4204
|
-
return props.swipeDirection;
|
|
4205
|
-
}
|
|
4206
|
-
if (xPosition.value !== "center") {
|
|
4207
|
-
return xPosition.value;
|
|
4208
|
-
}
|
|
4209
|
-
return yPosition.value === "top" ? "up" : "down";
|
|
4210
|
-
});
|
|
4211
|
-
return (_ctx, _cache) => {
|
|
4212
|
-
return openBlock(), createBlock(unref(ToastProvider), normalizeProps(guardReactiveProps({ ...unref(forwarded), swipeDirection: swipeDirection.value })), {
|
|
4213
|
-
default: withCtx(() => [
|
|
4214
|
-
renderSlot(_ctx.$slots, "default"),
|
|
4215
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(messages), (msg, index) => {
|
|
4216
|
-
return renderSlot(_ctx.$slots, "item", {
|
|
4217
|
-
key: msg.id,
|
|
4218
|
-
message: msg,
|
|
4219
|
-
index
|
|
4220
|
-
}, () => [
|
|
4221
|
-
(openBlock(), createBlock(_sfc_main$5, {
|
|
4222
|
-
key: msg.id,
|
|
4223
|
-
message: msg,
|
|
4224
|
-
index,
|
|
4225
|
-
"x-position": xPosition.value,
|
|
4226
|
-
"y-position": yPosition.value
|
|
4227
|
-
}, null, 8, ["message", "index", "x-position", "y-position"]))
|
|
4228
|
-
]);
|
|
4229
|
-
}), 128)),
|
|
4230
|
-
createVNode(unref(ToastPortal), null, {
|
|
4231
|
-
default: withCtx(() => [
|
|
4232
|
-
createVNode(_sfc_main$1i, null, {
|
|
4233
|
-
default: withCtx(() => [
|
|
4234
|
-
createVNode(unref(ToastViewport), mergeProps({ class: "ui-ToastViewport" }, _ctx.$attrs, {
|
|
4235
|
-
class: `r-size-${__props.size}`,
|
|
4236
|
-
"data-x-position": xPosition.value,
|
|
4237
|
-
"data-y-position": yPosition.value
|
|
4238
|
-
}), null, 16, ["class", "data-x-position", "data-y-position"])
|
|
4239
|
-
]),
|
|
4240
|
-
_: 1
|
|
4241
|
-
})
|
|
4242
|
-
]),
|
|
4243
|
-
_: 1
|
|
4244
|
-
})
|
|
4245
|
-
]),
|
|
4246
|
-
_: 3
|
|
4247
|
-
}, 16);
|
|
4248
|
-
};
|
|
4249
|
-
}
|
|
4250
|
-
});
|
|
4251
|
-
const toastManager = useToastManager();
|
|
4252
|
-
const toast = Object.assign(
|
|
4253
|
-
(msg) => {
|
|
4254
|
-
return toastManager.add(msg);
|
|
4255
|
-
},
|
|
4256
|
-
{
|
|
4257
|
-
info: toastManager.info,
|
|
4258
|
-
success: toastManager.success,
|
|
4259
|
-
warning: toastManager.warning,
|
|
4260
|
-
error: toastManager.error,
|
|
4261
|
-
promise: toastManager.promise
|
|
4262
|
-
}
|
|
4263
|
-
);
|
|
4264
|
-
const _hoisted_1$1 = ["data-size", "data-variant"];
|
|
4265
|
-
const _hoisted_2 = ["data-layout"];
|
|
4266
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
4267
|
-
__name: "Table",
|
|
4268
|
-
props: {
|
|
4269
|
-
size: { default: "2" },
|
|
4270
|
-
variant: { default: "ghost" },
|
|
4271
|
-
layout: {}
|
|
4272
|
-
},
|
|
4273
|
-
setup(__props) {
|
|
4274
|
-
const props = __props;
|
|
4275
|
-
return (_ctx, _cache) => {
|
|
4276
|
-
return openBlock(), createElementBlock("div", {
|
|
4277
|
-
class: "ui-Table",
|
|
4278
|
-
"data-size": props.size,
|
|
4279
|
-
"data-variant": props.variant
|
|
4280
|
-
}, [
|
|
4281
|
-
createVNode(_sfc_main$1j, null, {
|
|
4282
|
-
default: withCtx(() => [
|
|
4283
|
-
createElementVNode("table", {
|
|
4284
|
-
class: "ui-TableContent",
|
|
4285
|
-
"data-layout": props.layout
|
|
4286
|
-
}, [
|
|
4287
|
-
renderSlot(_ctx.$slots, "default")
|
|
4288
|
-
], 8, _hoisted_2)
|
|
4289
|
-
]),
|
|
4290
|
-
_: 3
|
|
4291
|
-
})
|
|
4292
|
-
], 8, _hoisted_1$1);
|
|
4293
|
-
};
|
|
4294
|
-
}
|
|
4295
|
-
});
|
|
4296
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
4297
|
-
__name: "Separator",
|
|
4298
|
-
props: {
|
|
4299
|
-
as: { default: "span" },
|
|
4300
|
-
orientation: { default: "horizontal" },
|
|
4301
|
-
size: { default: "1" },
|
|
4302
|
-
color: { default: "gray" }
|
|
4303
|
-
},
|
|
4304
|
-
setup(__props) {
|
|
4305
|
-
const props = __props;
|
|
4306
|
-
return (_ctx, _cache) => {
|
|
4307
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
4308
|
-
as: props.as,
|
|
4309
|
-
class: normalizeClass(["ui-Separator", `r-size-${props.size}`]),
|
|
4310
|
-
role: "separator",
|
|
4311
|
-
"data-accent-color": props.color,
|
|
4312
|
-
"aria-orientation": props.orientation
|
|
4313
|
-
}, null, 8, ["as", "class", "data-accent-color", "aria-orientation"]);
|
|
4314
|
-
};
|
|
4315
|
-
}
|
|
4316
|
-
});
|
|
4317
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
4318
|
-
__name: "Quota",
|
|
4319
|
-
props: {
|
|
4320
|
-
percent: {},
|
|
4321
|
-
color: {}
|
|
4322
|
-
},
|
|
4323
|
-
setup(__props) {
|
|
4324
|
-
const props = __props;
|
|
4325
|
-
const style = computed(() => {
|
|
4326
|
-
const transform = `translateX(-${100 - props.percent}%)`;
|
|
4327
|
-
if (props.percent > 100) {
|
|
4328
|
-
return { transform, "background-color": "var(--red-a10)" };
|
|
4329
|
-
}
|
|
4330
|
-
let alpha = "a4";
|
|
4331
|
-
if (props.percent > 90) {
|
|
4332
|
-
alpha = "a11";
|
|
4333
|
-
} else if (props.percent > 66) {
|
|
4334
|
-
alpha = "a9";
|
|
4335
|
-
} else if (props.percent > 33) {
|
|
4336
|
-
alpha = "a6";
|
|
4337
|
-
}
|
|
4338
|
-
return { transform, "background-color": `var(--blue-${alpha})` };
|
|
4339
|
-
});
|
|
4340
|
-
const percent = computed(() => {
|
|
4341
|
-
if (props.percent > 100) {
|
|
4342
|
-
return 100;
|
|
4343
|
-
} else if (props.percent < 0) {
|
|
4344
|
-
return 0;
|
|
4345
|
-
}
|
|
4346
|
-
return props.percent;
|
|
4347
|
-
});
|
|
4348
|
-
return (_ctx, _cache) => {
|
|
4349
|
-
return openBlock(), createBlock(unref(ProgressRoot), {
|
|
4350
|
-
class: "ui-Quota",
|
|
4351
|
-
"model-value": percent.value,
|
|
4352
|
-
"data-accent-color": props.color
|
|
4353
|
-
}, {
|
|
4354
|
-
default: withCtx(() => [
|
|
4355
|
-
createVNode(unref(ProgressIndicator), {
|
|
4356
|
-
class: "ui-QuotaValue",
|
|
4357
|
-
style: normalizeStyle(style.value)
|
|
4358
|
-
}, null, 8, ["style"])
|
|
4359
|
-
]),
|
|
4360
|
-
_: 1
|
|
4361
|
-
}, 8, ["model-value", "data-accent-color"]);
|
|
4362
|
-
};
|
|
4363
|
-
}
|
|
4364
|
-
});
|
|
4365
|
-
const _hoisted_1 = {
|
|
4366
|
-
viewBox: "0 0 24 24",
|
|
4367
|
-
width: "1em",
|
|
4368
|
-
height: "1em"
|
|
4369
|
-
};
|
|
4370
|
-
function render(_ctx, _cache) {
|
|
4371
|
-
return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [
|
|
4372
|
-
createElementVNode("path", {
|
|
4373
|
-
fill: "currentColor",
|
|
4374
|
-
d: "M4 12a8 8 0 1 1 16 0a8 8 0 0 1-16 0m8-10C6.477 2 2 6.477 2 12s4.477 10 10 10s10-4.477 10-10S17.523 2 12 2m5.457 7.457l-1.414-1.414L11 13.086l-2.793-2.793l-1.414 1.414L11 15.914z"
|
|
4375
|
-
}, null, -1)
|
|
4376
|
-
])]);
|
|
4377
|
-
}
|
|
4378
|
-
const CheckIcon = markRaw({ name: "ri-checkbox-circle-line", render });
|
|
4379
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4380
|
-
__name: "SavingIndicator",
|
|
4381
|
-
props: {
|
|
4382
|
-
status: {},
|
|
4383
|
-
size: { default: "2" },
|
|
4384
|
-
as: { default: "span" }
|
|
4385
|
-
},
|
|
4386
|
-
setup(__props) {
|
|
4387
|
-
const props = __props;
|
|
4388
|
-
return (_ctx, _cache) => {
|
|
4389
|
-
return openBlock(), createBlock(unref(Primitive), {
|
|
4390
|
-
class: normalizeClass(["ui-SavingIndicator", `r-size-${__props.size}`]),
|
|
4391
|
-
"data-status": props.status
|
|
4392
|
-
}, {
|
|
4393
|
-
default: withCtx(() => [
|
|
4394
|
-
renderSlot(_ctx.$slots, "default", { status: __props.status }, () => [
|
|
4395
|
-
props.status === "saving" ? (openBlock(), createBlock(SpinnerIcon, { key: 0 })) : props.status === "saved" ? (openBlock(), createBlock(unref(CheckIcon), { key: 1 })) : createCommentVNode("", true)
|
|
4396
|
-
])
|
|
4397
|
-
]),
|
|
4398
|
-
_: 3
|
|
4399
|
-
}, 8, ["class", "data-status"]);
|
|
4400
|
-
};
|
|
4401
|
-
}
|
|
4402
|
-
});
|
|
4403
|
-
export {
|
|
4404
|
-
_sfc_main$f as AccordionContent,
|
|
4405
|
-
_sfc_main$e as AccordionIndicator,
|
|
4406
|
-
_sfc_main$g as AccordionItem,
|
|
4407
|
-
_sfc_main$h as AccordionRoot,
|
|
4408
|
-
_sfc_main$d as AccordionTrigger,
|
|
4409
|
-
AlertDialogAction,
|
|
4410
|
-
AlertDialogCancel,
|
|
4411
|
-
_sfc_main$1g as AlertDialogCancelButton,
|
|
4412
|
-
_sfc_main$1e as AlertDialogDescription,
|
|
4413
|
-
_sfc_main$1c as AlertDialogPopup,
|
|
4414
|
-
AlertDialogRoot,
|
|
4415
|
-
_sfc_main$1f as AlertDialogTitle,
|
|
4416
|
-
AlertDialogTrigger,
|
|
4417
|
-
_sfc_main$1p as Avatar,
|
|
4418
|
-
_sfc_main$1o as Badge,
|
|
4419
|
-
_sfc_main$1m as Button,
|
|
4420
|
-
_sfc_main$1n as Card,
|
|
4421
|
-
_sfc_main$M as Checkbox,
|
|
4422
|
-
CheckboxGroupRoot as CheckboxGroup,
|
|
4423
|
-
_sfc_main$1k as CloseButton,
|
|
4424
|
-
_sfc_main$9 as CollapsibleContent,
|
|
4425
|
-
_sfc_main$b as CollapsibleIndicator,
|
|
4426
|
-
_sfc_main$c as CollapsibleRoot,
|
|
4427
|
-
_sfc_main$a as CollapsibleTrigger,
|
|
4428
|
-
_sfc_main$G as ColorField,
|
|
4429
|
-
_sfc_main$v as ComboboxContent,
|
|
4430
|
-
_sfc_main$s as ComboboxEmpty,
|
|
4431
|
-
ComboboxGroup,
|
|
4432
|
-
_sfc_main$w as ComboboxInput,
|
|
4433
|
-
_sfc_main$u as ComboboxItem,
|
|
4434
|
-
_sfc_main$t as ComboboxLabel,
|
|
4435
|
-
_sfc_main$x as ComboboxRoot,
|
|
4436
|
-
DialogClose2 as DialogClose,
|
|
4437
|
-
_sfc_main$1g as DialogCloseButton,
|
|
4438
|
-
_sfc_main$1e as DialogDescription,
|
|
4439
|
-
_sfc_main$1d as DialogPopup,
|
|
4440
|
-
DialogRoot2 as DialogRoot,
|
|
4441
|
-
_sfc_main$1f as DialogTitle,
|
|
4442
|
-
DialogTrigger,
|
|
4443
|
-
_sfc_main$1b as DropdownMenuContent,
|
|
4444
|
-
_sfc_main$1a as DropdownMenuItem,
|
|
4445
|
-
DropdownMenuRoot,
|
|
4446
|
-
DropdownMenuSeparator,
|
|
4447
|
-
DropdownMenuTrigger,
|
|
4448
|
-
_sfc_main$i as Editable,
|
|
4449
|
-
_sfc_main$1l as IconButton,
|
|
4450
|
-
_sfc_main$13 as NavigationMenuContent,
|
|
4451
|
-
NavigationMenuItem,
|
|
4452
|
-
_sfc_main$15 as NavigationMenuLink,
|
|
4453
|
-
_sfc_main$16 as NavigationMenuList,
|
|
4454
|
-
_sfc_main$17 as NavigationMenuRoot,
|
|
4455
|
-
_sfc_main$14 as NavigationMenuTrigger,
|
|
4456
|
-
_sfc_main$7 as Pagination,
|
|
4457
|
-
_sfc_main$E as PinInputInput,
|
|
4458
|
-
_sfc_main$F as PinInputRoot,
|
|
4459
|
-
PopoverClose,
|
|
4460
|
-
_sfc_main$18 as PopoverPopup,
|
|
4461
|
-
PopoverRoot,
|
|
4462
|
-
PopoverTrigger,
|
|
4463
|
-
_sfc_main$1 as Quota,
|
|
4464
|
-
_sfc_main$r as Radio,
|
|
4465
|
-
_sfc_main$n as RadioCardsItem,
|
|
4466
|
-
_sfc_main$o as RadioCardsRoot,
|
|
4467
|
-
_sfc_main$p as RadioGroupItem,
|
|
4468
|
-
_sfc_main$q as RadioGroupRoot,
|
|
4469
|
-
_sfc_main$l as RadioTabsItem,
|
|
4470
|
-
_sfc_main$m as RadioTabsRoot,
|
|
4471
|
-
_sfc_main as SavingIndicator,
|
|
4472
|
-
_sfc_main$1j as ScrollArea,
|
|
4473
|
-
_sfc_main$C as SelectContent,
|
|
4474
|
-
SelectGroup,
|
|
4475
|
-
_sfc_main$A as SelectItem,
|
|
4476
|
-
_sfc_main$z as SelectLabel,
|
|
4477
|
-
_sfc_main$D as SelectRoot,
|
|
4478
|
-
SelectSeparator,
|
|
4479
|
-
_sfc_main$B as SelectTrigger,
|
|
4480
|
-
_sfc_main$2 as Separator,
|
|
4481
|
-
_sfc_main$11 as Sidebar,
|
|
4482
|
-
_sfc_main$$ as SidebarBody,
|
|
4483
|
-
_sfc_main$_ as SidebarFooter,
|
|
4484
|
-
_sfc_main$W as SidebarGroup,
|
|
4485
|
-
_sfc_main$V as SidebarGroupLabel,
|
|
4486
|
-
_sfc_main$10 as SidebarHeader,
|
|
4487
|
-
_sfc_main$X as SidebarInset,
|
|
4488
|
-
_sfc_main$U as SidebarMenu,
|
|
4489
|
-
_sfc_main$R as SidebarMenuButton,
|
|
4490
|
-
_sfc_main$T as SidebarMenuItem,
|
|
4491
|
-
_sfc_main$Q as SidebarMenuSub,
|
|
4492
|
-
_sfc_main$O as SidebarMenuSubButton,
|
|
4493
|
-
_sfc_main$P as SidebarMenuSubItem,
|
|
4494
|
-
_sfc_main$12 as SidebarProvider,
|
|
4495
|
-
_sfc_main$Y as SidebarRail,
|
|
4496
|
-
_sfc_main$Z as SidebarTrigger,
|
|
4497
|
-
SpinnerIcon,
|
|
4498
|
-
_sfc_main$N as Switch,
|
|
4499
|
-
_sfc_main$3 as Table,
|
|
4500
|
-
TabsContent,
|
|
4501
|
-
_sfc_main$k as TabsList,
|
|
4502
|
-
TabsRoot,
|
|
4503
|
-
_sfc_main$j as TabsTrigger,
|
|
4504
|
-
_sfc_main$H as TextArea,
|
|
4505
|
-
_sfc_main$I as TextField,
|
|
4506
|
-
_sfc_main$1q as ThemeProvider,
|
|
4507
|
-
_sfc_main$4 as ToastProvider,
|
|
4508
|
-
_sfc_main$L as Toggle,
|
|
4509
|
-
_sfc_main$J as ToggleGroupItem,
|
|
4510
|
-
_sfc_main$K as ToggleGroupRoot,
|
|
4511
|
-
_sfc_main$1h as Tooltip,
|
|
4512
|
-
buildPropsClass,
|
|
4513
|
-
injectThemeContext,
|
|
4514
|
-
provideThemeContext,
|
|
4515
|
-
toast,
|
|
4516
|
-
useForwardPropsEmitsWithout,
|
|
4517
|
-
useForwardPropsWithout
|
|
4518
|
-
};
|