@vuetify/v0 0.0.14 → 0.0.16

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.
@@ -0,0 +1,1445 @@
1
+ import { r as isSelfClosingTag } from "./htmlElements-BYo-fMlZ.mjs";
2
+ import { c as isNull, l as isNullOrUndefined, p as isString, r as genId } from "./utilities-DQWf_4V_.mjs";
3
+ import { F as createSelection, N as useProxyModel, Y as createContext, c as useLocale, g as createPagination, k as createGroup, p as createSingle, t as createStep, y as createOverflow, z as useRegistry } from "./useStep-Bqhi_DDs.mjs";
4
+ import { t as IN_BROWSER } from "./globals-Rnihe4SF.mjs";
5
+ import { computed, createBlock, createCommentVNode, createPropsRestProxy, createTextVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeProps, onBeforeUnmount, onMounted, onUnmounted, openBlock, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRef, toValue, unref, useAttrs, useId, useModel, useTemplateRef, vShow, watch, withCtx, withDirectives } from "vue";
6
+
7
+ //#region src/components/Atom/Atom.vue
8
+ const _sfc_main$26 = /* @__PURE__ */ defineComponent({
9
+ name: "Atom",
10
+ __name: "Atom",
11
+ props: {
12
+ as: { default: "div" },
13
+ renderless: {
14
+ type: Boolean,
15
+ default: false
16
+ }
17
+ },
18
+ setup(__props, { expose: __expose }) {
19
+ const element = useTemplateRef("element");
20
+ __expose({ element });
21
+ const attrs = useAttrs();
22
+ const isSelfClosing = toRef(() => /* @__PURE__ */ isString(__props.as) && isSelfClosingTag(__props.as));
23
+ const slotProps = toRef(() => attrs);
24
+ return (_ctx, _cache) => {
25
+ return __props.renderless || unref(isNull)(__props.as) ? renderSlot(_ctx.$slots, "default", normalizeProps(mergeProps({ key: 0 }, slotProps.value))) : !isSelfClosing.value ? (openBlock(), createBlock(resolveDynamicComponent(__props.as), mergeProps({ key: 1 }, slotProps.value, {
26
+ ref_key: "element",
27
+ ref: element
28
+ }), {
29
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
30
+ _: 3
31
+ }, 16)) : (openBlock(), createBlock(resolveDynamicComponent(__props.as), mergeProps({
32
+ key: 2,
33
+ ref_key: "element",
34
+ ref: element
35
+ }, slotProps.value), null, 16));
36
+ };
37
+ }
38
+ });
39
+ var Atom_default = _sfc_main$26;
40
+
41
+ //#endregion
42
+ //#region src/components/Avatar/AvatarRoot.vue
43
+ const [useAvatarRoot, provideAvatarContext] = createContext();
44
+ const _sfc_main$25 = /* @__PURE__ */ defineComponent({
45
+ name: "AvatarRoot",
46
+ __name: "AvatarRoot",
47
+ props: {
48
+ namespace: { default: "v0:avatar" },
49
+ as: { default: "div" },
50
+ renderless: { type: Boolean }
51
+ },
52
+ setup(__props) {
53
+ const selection = createSelection({
54
+ mandatory: "force",
55
+ multiple: false
56
+ });
57
+ provideAvatarContext(__props.namespace, selection);
58
+ return (_ctx, _cache) => {
59
+ return openBlock(), createBlock(unref(Atom_default), {
60
+ as: __props.as,
61
+ renderless: __props.renderless
62
+ }, {
63
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
64
+ _: 3
65
+ }, 8, ["as", "renderless"]);
66
+ };
67
+ }
68
+ });
69
+ var AvatarRoot_default = _sfc_main$25;
70
+
71
+ //#endregion
72
+ //#region src/components/Avatar/AvatarFallback.vue
73
+ const _sfc_main$24 = /* @__PURE__ */ defineComponent({
74
+ name: "AvatarFallback",
75
+ __name: "AvatarFallback",
76
+ props: {
77
+ namespace: { default: "v0:avatar" },
78
+ as: { default: "span" },
79
+ renderless: { type: Boolean }
80
+ },
81
+ setup(__props) {
82
+ const context = useAvatarRoot(__props.namespace);
83
+ const ticket = context.register({ type: "fallback" });
84
+ const slotProps = toRef(() => ({ isSelected: ticket.isSelected.value }));
85
+ onUnmounted(() => context.unregister(ticket.id));
86
+ return (_ctx, _cache) => {
87
+ return unref(ticket).isSelected.value ? (openBlock(), createBlock(unref(Atom_default), {
88
+ key: 0,
89
+ as: __props.as,
90
+ renderless: __props.renderless
91
+ }, {
92
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
93
+ _: 3
94
+ }, 8, ["as", "renderless"])) : createCommentVNode("v-if", true);
95
+ };
96
+ }
97
+ });
98
+ var AvatarFallback_default = _sfc_main$24;
99
+
100
+ //#endregion
101
+ //#region src/components/Avatar/AvatarImage.vue
102
+ const _sfc_main$23 = /* @__PURE__ */ defineComponent({
103
+ name: "AvatarImage",
104
+ inheritAttrs: false,
105
+ __name: "AvatarImage",
106
+ props: {
107
+ src: {},
108
+ priority: { default: 0 },
109
+ namespace: { default: "v0:avatar" },
110
+ as: { default: "img" },
111
+ renderless: { type: Boolean }
112
+ },
113
+ emits: ["load", "error"],
114
+ setup(__props, { emit: __emit }) {
115
+ const props = createPropsRestProxy(__props, [
116
+ "as",
117
+ "renderless",
118
+ "priority",
119
+ "namespace"
120
+ ]);
121
+ const emit = __emit;
122
+ const context = useAvatarRoot(__props.namespace);
123
+ const ticket = context.register({
124
+ priority: __props.priority,
125
+ type: "image",
126
+ disabled: true
127
+ });
128
+ function onLoad(e) {
129
+ ticket.disabled = false;
130
+ ticket.select();
131
+ emit("load", e);
132
+ }
133
+ function onError(e) {
134
+ ticket.disabled = true;
135
+ const first = context.seek("first");
136
+ if (first) context.select(first.id);
137
+ emit("error", e);
138
+ }
139
+ onUnmounted(() => {
140
+ context.unregister(ticket.id);
141
+ });
142
+ const slotProps = toRef(() => ({
143
+ isSelected: ticket.isSelected.value,
144
+ attrs: {
145
+ role: "img",
146
+ onLoad,
147
+ onError,
148
+ ...props
149
+ }
150
+ }));
151
+ return (_ctx, _cache) => {
152
+ return withDirectives((openBlock(), createBlock(unref(Atom_default), mergeProps(slotProps.value.attrs, {
153
+ as: __props.as,
154
+ renderless: __props.renderless
155
+ }), {
156
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
157
+ _: 3
158
+ }, 16, ["as", "renderless"])), [[vShow, unref(ticket).isSelected.value]]);
159
+ };
160
+ }
161
+ });
162
+ var AvatarImage_default = _sfc_main$23;
163
+
164
+ //#endregion
165
+ //#region src/components/Avatar/index.ts
166
+ const Avatar = {
167
+ Fallback: AvatarFallback_default,
168
+ Image: AvatarImage_default,
169
+ Root: AvatarRoot_default
170
+ };
171
+
172
+ //#endregion
173
+ //#region src/components/ExpansionPanel/ExpansionPanelRoot.vue
174
+ const [useExpansionPanelRoot, provideExpansionPanelSelection] = createContext();
175
+ const _sfc_main$22 = /* @__PURE__ */ defineComponent({
176
+ name: "ExpansionPanelRoot",
177
+ __name: "ExpansionPanelRoot",
178
+ props: /* @__PURE__ */ mergeModels({
179
+ namespace: { default: "v0:expansion-panel" },
180
+ disabled: {
181
+ type: Boolean,
182
+ default: false
183
+ },
184
+ enroll: {
185
+ type: Boolean,
186
+ default: false
187
+ },
188
+ mandatory: {
189
+ type: [Boolean, String],
190
+ default: false
191
+ },
192
+ multiple: {
193
+ type: Boolean,
194
+ default: false
195
+ },
196
+ as: {},
197
+ renderless: { type: Boolean }
198
+ }, {
199
+ "modelValue": {},
200
+ "modelModifiers": {}
201
+ }),
202
+ emits: /* @__PURE__ */ mergeModels(["update:model-value"], ["update:modelValue"]),
203
+ setup(__props) {
204
+ const model = useModel(__props, "modelValue");
205
+ const isDisabled = toRef(() => __props.disabled);
206
+ const selection = createSelection({
207
+ disabled: isDisabled,
208
+ enroll: __props.enroll,
209
+ mandatory: __props.mandatory,
210
+ multiple: __props.multiple,
211
+ events: true
212
+ });
213
+ useProxyModel(selection, model, { multiple: __props.multiple });
214
+ const slotProps = toRef(() => ({
215
+ isDisabled,
216
+ select: selection.select,
217
+ unselect: selection.unselect,
218
+ toggle: selection.toggle
219
+ }));
220
+ provideExpansionPanelSelection(__props.namespace, selection);
221
+ return (_ctx, _cache) => {
222
+ return openBlock(), createBlock(unref(Atom_default), {
223
+ as: __props.as,
224
+ renderless: __props.renderless
225
+ }, {
226
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
227
+ _: 3
228
+ }, 8, ["as", "renderless"]);
229
+ };
230
+ }
231
+ });
232
+ var ExpansionPanelRoot_default = _sfc_main$22;
233
+
234
+ //#endregion
235
+ //#region src/components/ExpansionPanel/ExpansionPanelItem.vue
236
+ const [useExpansionPanelItem, provideExpansionPanelItem] = createContext({ suffix: "item" });
237
+ const _sfc_main$21 = /* @__PURE__ */ defineComponent({
238
+ name: "ExpansionPanelItem",
239
+ __name: "ExpansionPanelItem",
240
+ props: {
241
+ id: {},
242
+ value: {},
243
+ disabled: {},
244
+ namespace: { default: "v0:expansion-panel" },
245
+ as: {},
246
+ renderless: { type: Boolean }
247
+ },
248
+ setup(__props) {
249
+ const selection = useExpansionPanelRoot(__props.namespace);
250
+ const ticket = selection.register({
251
+ id: __props.id,
252
+ value: __props.value,
253
+ disabled: __props.disabled
254
+ });
255
+ const headerId = toRef(() => `${ticket.id}-header`);
256
+ const contentId = toRef(() => `${ticket.id}-content`);
257
+ const isDisabled = toRef(() => toValue(ticket.disabled) || toValue(selection.disabled));
258
+ const slotProps = toRef(() => ({
259
+ isSelected: ticket.isSelected.value,
260
+ isDisabled: isDisabled.value,
261
+ attrs: { "data-selected": ticket.isSelected.value || void 0 }
262
+ }));
263
+ onBeforeUnmount(() => selection.unregister(ticket.id));
264
+ provideExpansionPanelItem(__props.namespace, {
265
+ ticket,
266
+ headerId,
267
+ contentId,
268
+ isDisabled
269
+ });
270
+ return (_ctx, _cache) => {
271
+ return openBlock(), createBlock(unref(Atom_default), mergeProps(slotProps.value.attrs, {
272
+ as: __props.as,
273
+ renderless: __props.renderless
274
+ }), {
275
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
276
+ _: 3
277
+ }, 16, ["as", "renderless"]);
278
+ };
279
+ }
280
+ });
281
+ var ExpansionPanelItem_default = _sfc_main$21;
282
+
283
+ //#endregion
284
+ //#region src/components/ExpansionPanel/ExpansionPanelActivator.vue
285
+ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
286
+ name: "ExpansionPanelActivator",
287
+ __name: "ExpansionPanelActivator",
288
+ props: {
289
+ namespace: { default: "v0:expansion-panel" },
290
+ as: { default: "button" },
291
+ renderless: { type: Boolean }
292
+ },
293
+ setup(__props) {
294
+ const item = useExpansionPanelItem(__props.namespace);
295
+ function onKeydown(e) {
296
+ if (e.key === "Enter" || e.key === " ") {
297
+ e.preventDefault();
298
+ item.ticket.toggle();
299
+ }
300
+ }
301
+ const slotProps = toRef(() => ({
302
+ isDisabled: item.isDisabled.value,
303
+ isSelected: item.ticket.isSelected.value,
304
+ toggle: item.ticket.toggle,
305
+ attrs: {
306
+ "id": item.headerId.value,
307
+ "role": __props.as === "button" ? void 0 : "button",
308
+ "tabindex": item.isDisabled.value ? -1 : 0,
309
+ "aria-expanded": item.ticket.isSelected.value,
310
+ "aria-controls": item.contentId.value,
311
+ "aria-disabled": item.isDisabled.value,
312
+ "data-disabled": item.isDisabled.value || void 0,
313
+ "data-selected": item.ticket.isSelected.value || void 0,
314
+ "disabled": __props.as === "button" ? item.isDisabled.value : void 0,
315
+ "type": __props.as === "button" ? "button" : void 0,
316
+ "onClick": item.ticket.toggle,
317
+ onKeydown
318
+ }
319
+ }));
320
+ return (_ctx, _cache) => {
321
+ return openBlock(), createBlock(unref(Atom_default), mergeProps(slotProps.value.attrs, {
322
+ as: __props.as,
323
+ renderless: __props.renderless
324
+ }), {
325
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
326
+ _: 3
327
+ }, 16, ["as", "renderless"]);
328
+ };
329
+ }
330
+ });
331
+ var ExpansionPanelActivator_default = _sfc_main$20;
332
+
333
+ //#endregion
334
+ //#region src/components/ExpansionPanel/ExpansionPanelContent.vue
335
+ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
336
+ name: "ExpansionPanelContent",
337
+ __name: "ExpansionPanelContent",
338
+ props: {
339
+ namespace: { default: "v0:expansion-panel" },
340
+ as: { default: "div" },
341
+ renderless: { type: Boolean }
342
+ },
343
+ setup(__props) {
344
+ const item = useExpansionPanelItem(__props.namespace);
345
+ const slotProps = toRef(() => ({
346
+ isSelected: item.ticket.isSelected.value,
347
+ attrs: {
348
+ "data-selected": item.ticket.isSelected.value,
349
+ "id": item.contentId.value,
350
+ "role": "region",
351
+ "aria-labelledby": item.headerId.value,
352
+ "hidden": !item.ticket.isSelected.value
353
+ }
354
+ }));
355
+ return (_ctx, _cache) => {
356
+ return openBlock(), createBlock(unref(Atom_default), mergeProps(slotProps.value.attrs, {
357
+ as: __props.as,
358
+ renderless: __props.renderless
359
+ }), {
360
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
361
+ _: 3
362
+ }, 16, ["as", "renderless"]);
363
+ };
364
+ }
365
+ });
366
+ var ExpansionPanelContent_default = _sfc_main$19;
367
+
368
+ //#endregion
369
+ //#region src/components/ExpansionPanel/ExpansionPanelHeader.vue
370
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
371
+ name: "ExpansionPanelHeader",
372
+ __name: "ExpansionPanelHeader",
373
+ props: {
374
+ namespace: { default: "v0:expansion-panel" },
375
+ as: { default: "h3" },
376
+ renderless: { type: Boolean }
377
+ },
378
+ setup(__props) {
379
+ const item = useExpansionPanelItem(__props.namespace);
380
+ const slotProps = toRef(() => ({
381
+ isSelected: item.ticket.isSelected.value,
382
+ attrs: { "data-selected": item.ticket.isSelected.value || void 0 }
383
+ }));
384
+ return (_ctx, _cache) => {
385
+ return openBlock(), createBlock(unref(Atom_default), mergeProps(slotProps.value.attrs, {
386
+ as: __props.as,
387
+ renderless: __props.renderless
388
+ }), {
389
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
390
+ _: 3
391
+ }, 16, ["as", "renderless"]);
392
+ };
393
+ }
394
+ });
395
+ var ExpansionPanelHeader_default = _sfc_main$18;
396
+
397
+ //#endregion
398
+ //#region src/components/ExpansionPanel/index.ts
399
+ const ExpansionPanel = {
400
+ Root: ExpansionPanelRoot_default,
401
+ Item: ExpansionPanelItem_default,
402
+ Header: ExpansionPanelHeader_default,
403
+ Activator: ExpansionPanelActivator_default,
404
+ Content: ExpansionPanelContent_default
405
+ };
406
+
407
+ //#endregion
408
+ //#region src/components/Group/GroupRoot.vue
409
+ const [useGroupRoot, provideGroupRoot] = createContext();
410
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
411
+ name: "GroupRoot",
412
+ __name: "GroupRoot",
413
+ props: /* @__PURE__ */ mergeModels({
414
+ namespace: { default: "v0:group" },
415
+ disabled: {
416
+ type: Boolean,
417
+ default: false
418
+ },
419
+ enroll: {
420
+ type: Boolean,
421
+ default: false
422
+ },
423
+ mandatory: {
424
+ type: [Boolean, String],
425
+ default: false
426
+ }
427
+ }, {
428
+ "modelValue": {},
429
+ "modelModifiers": {}
430
+ }),
431
+ emits: ["update:modelValue"],
432
+ setup(__props) {
433
+ const model = useModel(__props, "modelValue");
434
+ const group = createGroup({
435
+ disabled: toRef(() => __props.disabled),
436
+ enroll: __props.enroll,
437
+ mandatory: __props.mandatory,
438
+ events: true
439
+ });
440
+ useProxyModel(group, model, { multiple: true });
441
+ provideGroupRoot(__props.namespace, group);
442
+ const slotProps = toRef(() => ({
443
+ isDisabled: toValue(group.disabled),
444
+ isNoneSelected: group.isNoneSelected.value,
445
+ isAllSelected: group.isAllSelected.value,
446
+ isMixed: group.isMixed.value,
447
+ select: group.select,
448
+ unselect: group.unselect,
449
+ toggle: group.toggle,
450
+ selectAll: group.selectAll,
451
+ unselectAll: group.unselectAll,
452
+ toggleAll: group.toggleAll,
453
+ attrs: { "aria-multiselectable": true }
454
+ }));
455
+ return (_ctx, _cache) => {
456
+ return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)));
457
+ };
458
+ }
459
+ });
460
+ var GroupRoot_default = _sfc_main$17;
461
+
462
+ //#endregion
463
+ //#region src/components/Group/GroupItem.vue
464
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
465
+ name: "GroupItem",
466
+ __name: "GroupItem",
467
+ props: {
468
+ id: {},
469
+ label: {},
470
+ value: {},
471
+ disabled: {},
472
+ indeterminate: { default: false },
473
+ namespace: { default: "v0:group" }
474
+ },
475
+ setup(__props) {
476
+ const group = useGroupRoot(__props.namespace);
477
+ const ticket = group.register({
478
+ id: __props.id,
479
+ value: __props.value,
480
+ disabled: __props.disabled,
481
+ indeterminate: __props.indeterminate
482
+ });
483
+ const isDisabled = toRef(() => toValue(ticket.disabled) || toValue(group.disabled));
484
+ onUnmounted(() => {
485
+ group.unregister(ticket.id);
486
+ });
487
+ const slotProps = toRef(() => ({
488
+ id: String(ticket.id),
489
+ label: __props.label,
490
+ value: __props.value,
491
+ isSelected: toValue(ticket.isSelected),
492
+ isMixed: toValue(ticket.isMixed),
493
+ isDisabled: toValue(isDisabled),
494
+ select: ticket.select,
495
+ unselect: ticket.unselect,
496
+ toggle: ticket.toggle,
497
+ mix: ticket.mix,
498
+ unmix: ticket.unmix,
499
+ attrs: {
500
+ "aria-selected": toValue(ticket.isSelected),
501
+ "aria-disabled": toValue(isDisabled),
502
+ "data-selected": toValue(ticket.isSelected) || void 0,
503
+ "data-disabled": toValue(isDisabled) || void 0,
504
+ "data-mixed": toValue(ticket.isMixed) || void 0
505
+ }
506
+ }));
507
+ return (_ctx, _cache) => {
508
+ return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)));
509
+ };
510
+ }
511
+ });
512
+ var GroupItem_default = _sfc_main$16;
513
+
514
+ //#endregion
515
+ //#region src/components/Group/index.ts
516
+ const Group = {
517
+ Root: GroupRoot_default,
518
+ Item: GroupItem_default
519
+ };
520
+
521
+ //#endregion
522
+ //#region src/components/Pagination/PaginationRoot.vue
523
+ const [usePaginationRoot, providePaginationRoot] = createContext();
524
+ const [usePaginationControls, providePaginationControls] = createContext({ suffix: "controls" });
525
+ const [usePaginationItems, providePaginationItems] = createContext({ suffix: "items" });
526
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
527
+ name: "PaginationRoot",
528
+ __name: "PaginationRoot",
529
+ props: /* @__PURE__ */ mergeModels({
530
+ namespace: { default: "v0:pagination" },
531
+ size: { default: 1 },
532
+ totalVisible: {},
533
+ itemsPerPage: { default: 10 },
534
+ ellipsis: {
535
+ type: [String, Boolean],
536
+ default: "..."
537
+ },
538
+ as: { default: "nav" },
539
+ renderless: { type: Boolean }
540
+ }, {
541
+ "modelValue": { default: 1 },
542
+ "modelModifiers": {}
543
+ }),
544
+ emits: /* @__PURE__ */ mergeModels(["update:model-value"], ["update:modelValue"]),
545
+ setup(__props) {
546
+ const page = useModel(__props, "modelValue");
547
+ const locale = useLocale();
548
+ const controls = useRegistry();
549
+ const items = useRegistry();
550
+ const atom = useTemplateRef("atom");
551
+ const itemWidth = shallowRef(0);
552
+ const itemGap = shallowRef(0);
553
+ const overflow = createOverflow({
554
+ container: () => atom.value?.element,
555
+ itemWidth,
556
+ gap: itemGap
557
+ });
558
+ watch([() => items.size, () => overflow.width.value], () => {
559
+ if (!IN_BROWSER) return;
560
+ const el = items.seek("first")?.value;
561
+ const root = overflow.container.value;
562
+ if (!el || !root) return;
563
+ const rootStyle = getComputedStyle(root);
564
+ const style = getComputedStyle(el);
565
+ const marginX = Number.parseFloat(style.marginLeft) + Number.parseFloat(style.marginRight);
566
+ const gapX = Number.parseFloat(rootStyle.gap) || 0;
567
+ itemWidth.value = el.offsetWidth + marginX;
568
+ itemGap.value = gapX;
569
+ }, { flush: "post" });
570
+ const pagination = createPagination({
571
+ page,
572
+ visible: computed(() => {
573
+ const totalCap = overflow.capacity.value;
574
+ if (totalCap === Infinity) return __props.totalVisible ?? Infinity;
575
+ const pageCap = Math.max(0, totalCap - controls.size);
576
+ const noVisible = /* @__PURE__ */ isNullOrUndefined(__props.totalVisible);
577
+ if (pageCap > 0) return noVisible ? pageCap : Math.min(__props.totalVisible, pageCap);
578
+ return noVisible ? 1 : __props.totalVisible;
579
+ }),
580
+ ellipsis: __props.ellipsis,
581
+ size: () => __props.size,
582
+ itemsPerPage: () => __props.itemsPerPage
583
+ });
584
+ const slotProps = toRef(() => ({
585
+ page: pagination.page.value,
586
+ size: pagination.size,
587
+ pages: pagination.pages,
588
+ itemsPerPage: pagination.itemsPerPage,
589
+ items: pagination.items.value,
590
+ pageStart: pagination.pageStart.value,
591
+ pageStop: pagination.pageStop.value,
592
+ isFirst: pagination.isFirst.value,
593
+ isLast: pagination.isLast.value,
594
+ first: pagination.first,
595
+ last: pagination.last,
596
+ next: pagination.next,
597
+ prev: pagination.prev,
598
+ select: pagination.select,
599
+ attrs: { "aria-label": locale.t("Pagination.label", void 0, "Pagination") }
600
+ }));
601
+ providePaginationRoot(__props.namespace, pagination);
602
+ providePaginationControls(__props.namespace, controls);
603
+ providePaginationItems(__props.namespace, items);
604
+ return (_ctx, _cache) => {
605
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
606
+ ref_key: "atom",
607
+ ref: atom
608
+ }, slotProps.value.attrs, {
609
+ as: __props.as,
610
+ renderless: __props.renderless
611
+ }), {
612
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
613
+ _: 3
614
+ }, 16, ["as", "renderless"]);
615
+ };
616
+ }
617
+ });
618
+ var PaginationRoot_default = _sfc_main$15;
619
+
620
+ //#endregion
621
+ //#region src/components/Pagination/PaginationEllipsis.vue
622
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
623
+ name: "PaginationEllipsis",
624
+ __name: "PaginationEllipsis",
625
+ props: {
626
+ namespace: { default: "v0:pagination" },
627
+ ellipsis: {},
628
+ id: { default: () => /* @__PURE__ */ genId() },
629
+ as: { default: "span" },
630
+ renderless: { type: Boolean }
631
+ },
632
+ setup(__props) {
633
+ const pagination = usePaginationRoot(__props.namespace);
634
+ const items = usePaginationItems(__props.namespace);
635
+ const atom = useTemplateRef("atom");
636
+ watch(() => atom.value?.element, (el) => {
637
+ if (!el) return;
638
+ items.register({
639
+ id: __props.id,
640
+ value: el
641
+ });
642
+ }, { immediate: true });
643
+ const resolvedEllipsis = toRef(() => __props.ellipsis ?? pagination.ellipsis);
644
+ const slotProps = toRef(() => ({
645
+ ellipsis: resolvedEllipsis.value,
646
+ attrs: { "aria-hidden": "true" }
647
+ }));
648
+ onBeforeUnmount(() => items.unregister(__props.id));
649
+ return (_ctx, _cache) => {
650
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
651
+ ref_key: "atom",
652
+ ref: atom
653
+ }, slotProps.value.attrs, {
654
+ as: __props.as,
655
+ renderless: __props.renderless
656
+ }), {
657
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)), () => [createTextVNode(toDisplayString(resolvedEllipsis.value), 1)])]),
658
+ _: 3
659
+ }, 16, ["as", "renderless"]);
660
+ };
661
+ }
662
+ });
663
+ var PaginationEllipsis_default = _sfc_main$14;
664
+
665
+ //#endregion
666
+ //#region src/components/Pagination/PaginationFirst.vue
667
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
668
+ name: "PaginationFirst",
669
+ __name: "PaginationFirst",
670
+ props: {
671
+ namespace: { default: "v0:pagination" },
672
+ disabled: { type: Boolean },
673
+ id: { default: () => /* @__PURE__ */ genId() },
674
+ as: { default: "button" },
675
+ renderless: { type: Boolean }
676
+ },
677
+ setup(__props) {
678
+ const locale = useLocale();
679
+ const pagination = usePaginationRoot(__props.namespace);
680
+ const controls = usePaginationControls(__props.namespace);
681
+ const atom = useTemplateRef("atom");
682
+ watch(() => atom.value?.element, (el) => {
683
+ if (!el) return;
684
+ controls.register({
685
+ id: __props.id,
686
+ value: el
687
+ });
688
+ }, { immediate: true });
689
+ const isDisabled = toRef(() => __props.disabled || pagination.isFirst.value);
690
+ function first() {
691
+ if (isDisabled.value) return;
692
+ pagination.first();
693
+ }
694
+ const slotProps = toRef(() => ({
695
+ isDisabled: isDisabled.value,
696
+ first,
697
+ attrs: {
698
+ "aria-label": locale.t("Pagination.first", void 0, "Go to first page"),
699
+ "aria-disabled": __props.as === "button" ? void 0 : isDisabled.value,
700
+ "data-disabled": isDisabled.value || void 0,
701
+ "disabled": __props.as === "button" ? isDisabled.value : void 0,
702
+ "type": __props.as === "button" ? "button" : void 0,
703
+ "onClick": first
704
+ }
705
+ }));
706
+ onBeforeUnmount(() => controls.unregister(__props.id));
707
+ return (_ctx, _cache) => {
708
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
709
+ ref_key: "atom",
710
+ ref: atom
711
+ }, slotProps.value.attrs, {
712
+ as: __props.as,
713
+ renderless: __props.renderless
714
+ }), {
715
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
716
+ _: 3
717
+ }, 16, ["as", "renderless"]);
718
+ };
719
+ }
720
+ });
721
+ var PaginationFirst_default = _sfc_main$13;
722
+
723
+ //#endregion
724
+ //#region src/components/Pagination/PaginationItem.vue
725
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
726
+ name: "PaginationItem",
727
+ __name: "PaginationItem",
728
+ props: {
729
+ namespace: { default: "v0:pagination" },
730
+ value: {},
731
+ disabled: {
732
+ type: Boolean,
733
+ default: false
734
+ },
735
+ id: { default: () => /* @__PURE__ */ genId() },
736
+ as: { default: "button" },
737
+ renderless: { type: Boolean }
738
+ },
739
+ setup(__props) {
740
+ const locale = useLocale();
741
+ const pagination = usePaginationRoot(__props.namespace);
742
+ const items = usePaginationItems(__props.namespace);
743
+ const atom = useTemplateRef("atom");
744
+ watch(() => atom.value?.element, (el) => {
745
+ if (!el) return;
746
+ items.register({
747
+ id: __props.id,
748
+ value: el
749
+ });
750
+ }, { immediate: true });
751
+ const isSelected = toRef(() => pagination.page.value === __props.value);
752
+ const ariaLabel = toRef(() => {
753
+ return isSelected.value ? locale.t("Pagination.currentPage", { page: __props.value }, `Page ${__props.value}, current page`) : locale.t("Pagination.goToPage", { page: __props.value }, `Go to page ${__props.value}`);
754
+ });
755
+ function select() {
756
+ if (__props.disabled) return;
757
+ pagination.select(__props.value);
758
+ }
759
+ const slotProps = toRef(() => ({
760
+ page: __props.value,
761
+ isSelected: isSelected.value,
762
+ isDisabled: __props.disabled,
763
+ select,
764
+ attrs: {
765
+ "aria-label": ariaLabel.value,
766
+ "aria-current": isSelected.value ? "page" : void 0,
767
+ "data-selected": isSelected.value || void 0,
768
+ "data-disabled": __props.disabled || void 0,
769
+ "disabled": __props.as === "button" ? __props.disabled : void 0,
770
+ "type": __props.as === "button" ? "button" : void 0,
771
+ "onClick": select
772
+ }
773
+ }));
774
+ onBeforeUnmount(() => items.unregister(__props.id));
775
+ return (_ctx, _cache) => {
776
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
777
+ ref_key: "atom",
778
+ ref: atom
779
+ }, slotProps.value.attrs, {
780
+ as: __props.as,
781
+ renderless: __props.renderless
782
+ }), {
783
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
784
+ _: 3
785
+ }, 16, ["as", "renderless"]);
786
+ };
787
+ }
788
+ });
789
+ var PaginationItem_default = _sfc_main$12;
790
+
791
+ //#endregion
792
+ //#region src/components/Pagination/PaginationLast.vue
793
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
794
+ name: "PaginationLast",
795
+ __name: "PaginationLast",
796
+ props: {
797
+ namespace: { default: "v0:pagination" },
798
+ disabled: { type: Boolean },
799
+ id: { default: () => /* @__PURE__ */ genId() },
800
+ as: { default: "button" },
801
+ renderless: { type: Boolean }
802
+ },
803
+ setup(__props) {
804
+ const locale = useLocale();
805
+ const pagination = usePaginationRoot(__props.namespace);
806
+ const controls = usePaginationControls(__props.namespace);
807
+ const atom = useTemplateRef("atom");
808
+ watch(() => atom.value?.element, (el) => {
809
+ if (!el) return;
810
+ controls.register({
811
+ id: __props.id,
812
+ value: el
813
+ });
814
+ }, { immediate: true });
815
+ const isDisabled = toRef(() => __props.disabled || pagination.isLast.value);
816
+ function last() {
817
+ if (isDisabled.value) return;
818
+ pagination.last();
819
+ }
820
+ const slotProps = toRef(() => ({
821
+ isDisabled: isDisabled.value,
822
+ last,
823
+ attrs: {
824
+ "aria-label": locale.t("Pagination.last", void 0, "Go to last page"),
825
+ "aria-disabled": __props.as === "button" ? void 0 : isDisabled.value,
826
+ "data-disabled": isDisabled.value || void 0,
827
+ "disabled": __props.as === "button" ? isDisabled.value : void 0,
828
+ "type": __props.as === "button" ? "button" : void 0,
829
+ "onClick": last
830
+ }
831
+ }));
832
+ onBeforeUnmount(() => controls.unregister(__props.id));
833
+ return (_ctx, _cache) => {
834
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
835
+ ref_key: "atom",
836
+ ref: atom
837
+ }, slotProps.value.attrs, {
838
+ as: __props.as,
839
+ renderless: __props.renderless
840
+ }), {
841
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
842
+ _: 3
843
+ }, 16, ["as", "renderless"]);
844
+ };
845
+ }
846
+ });
847
+ var PaginationLast_default = _sfc_main$11;
848
+
849
+ //#endregion
850
+ //#region src/components/Pagination/PaginationNext.vue
851
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
852
+ name: "PaginationNext",
853
+ __name: "PaginationNext",
854
+ props: {
855
+ namespace: { default: "v0:pagination" },
856
+ disabled: { type: Boolean },
857
+ id: { default: () => /* @__PURE__ */ genId() },
858
+ as: { default: "button" },
859
+ renderless: { type: Boolean }
860
+ },
861
+ setup(__props) {
862
+ const locale = useLocale();
863
+ const pagination = usePaginationRoot(__props.namespace);
864
+ const controls = usePaginationControls(__props.namespace);
865
+ const atom = useTemplateRef("atom");
866
+ watch(() => atom.value?.element, (el) => {
867
+ if (!el) return;
868
+ controls.register({
869
+ id: __props.id,
870
+ value: el
871
+ });
872
+ }, { immediate: true });
873
+ const isDisabled = toRef(() => __props.disabled || pagination.isLast.value);
874
+ function next() {
875
+ if (isDisabled.value) return;
876
+ pagination.next();
877
+ }
878
+ const slotProps = toRef(() => ({
879
+ isDisabled: isDisabled.value,
880
+ next,
881
+ attrs: {
882
+ "aria-label": locale.t("Pagination.next", void 0, "Go to next page"),
883
+ "aria-disabled": __props.as === "button" ? void 0 : isDisabled.value,
884
+ "data-disabled": isDisabled.value || void 0,
885
+ "disabled": __props.as === "button" ? isDisabled.value : void 0,
886
+ "type": __props.as === "button" ? "button" : void 0,
887
+ "onClick": next
888
+ }
889
+ }));
890
+ onBeforeUnmount(() => controls.unregister(__props.id));
891
+ return (_ctx, _cache) => {
892
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
893
+ ref_key: "atom",
894
+ ref: atom
895
+ }, slotProps.value.attrs, {
896
+ as: __props.as,
897
+ renderless: __props.renderless
898
+ }), {
899
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
900
+ _: 3
901
+ }, 16, ["as", "renderless"]);
902
+ };
903
+ }
904
+ });
905
+ var PaginationNext_default = _sfc_main$10;
906
+
907
+ //#endregion
908
+ //#region src/components/Pagination/PaginationPrev.vue
909
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
910
+ name: "PaginationPrev",
911
+ __name: "PaginationPrev",
912
+ props: {
913
+ namespace: { default: "v0:pagination" },
914
+ disabled: { type: Boolean },
915
+ id: { default: () => /* @__PURE__ */ genId() },
916
+ as: { default: "button" },
917
+ renderless: { type: Boolean }
918
+ },
919
+ setup(__props) {
920
+ const locale = useLocale();
921
+ const pagination = usePaginationRoot(__props.namespace);
922
+ const controls = usePaginationControls(__props.namespace);
923
+ const atom = useTemplateRef("atom");
924
+ watch(() => atom.value?.element, (el) => {
925
+ if (!el) return;
926
+ controls.register({
927
+ id: __props.id,
928
+ value: el
929
+ });
930
+ }, { immediate: true });
931
+ const isDisabled = toRef(() => __props.disabled || pagination.isFirst.value);
932
+ function prev() {
933
+ if (isDisabled.value) return;
934
+ pagination.prev();
935
+ }
936
+ const slotProps = toRef(() => ({
937
+ isDisabled: isDisabled.value,
938
+ prev,
939
+ attrs: {
940
+ "aria-label": locale.t("Pagination.prev", void 0, "Go to previous page"),
941
+ "aria-disabled": __props.as === "button" ? void 0 : isDisabled.value,
942
+ "data-disabled": isDisabled.value || void 0,
943
+ "disabled": __props.as === "button" ? isDisabled.value : void 0,
944
+ "type": __props.as === "button" ? "button" : void 0,
945
+ "onClick": prev
946
+ }
947
+ }));
948
+ onBeforeUnmount(() => controls.unregister(__props.id));
949
+ return (_ctx, _cache) => {
950
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
951
+ ref_key: "atom",
952
+ ref: atom
953
+ }, slotProps.value.attrs, {
954
+ as: __props.as,
955
+ renderless: __props.renderless
956
+ }), {
957
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
958
+ _: 3
959
+ }, 16, ["as", "renderless"]);
960
+ };
961
+ }
962
+ });
963
+ var PaginationPrev_default = _sfc_main$9;
964
+
965
+ //#endregion
966
+ //#region src/components/Pagination/index.ts
967
+ const Pagination = {
968
+ Root: PaginationRoot_default,
969
+ Item: PaginationItem_default,
970
+ First: PaginationFirst_default,
971
+ Prev: PaginationPrev_default,
972
+ Ellipsis: PaginationEllipsis_default,
973
+ Next: PaginationNext_default,
974
+ Last: PaginationLast_default
975
+ };
976
+
977
+ //#endregion
978
+ //#region src/components/Popover/PopoverRoot.vue
979
+ const [usePopoverContext, providePopoverContext] = createContext("Popover");
980
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
981
+ name: "PopoverRoot",
982
+ __name: "PopoverRoot",
983
+ props: /* @__PURE__ */ mergeModels({
984
+ id: {},
985
+ as: { default: null },
986
+ renderless: { type: Boolean }
987
+ }, {
988
+ "modelValue": {
989
+ type: Boolean,
990
+ default: false
991
+ },
992
+ "modelModifiers": {}
993
+ }),
994
+ emits: ["update:modelValue"],
995
+ setup(__props) {
996
+ const props = createPropsRestProxy(__props, ["as"]);
997
+ const isSelected = useModel(__props, "modelValue");
998
+ const id = toRef(() => props.id ?? useId());
999
+ function toggle() {
1000
+ isSelected.value = !isSelected.value;
1001
+ }
1002
+ providePopoverContext({
1003
+ isSelected,
1004
+ toggle,
1005
+ id: toValue(id)
1006
+ });
1007
+ const slotProps = toRef(() => ({
1008
+ id: toValue(id),
1009
+ isSelected: isSelected.value,
1010
+ toggle
1011
+ }));
1012
+ return (_ctx, _cache) => {
1013
+ return openBlock(), createBlock(unref(Atom_default), {
1014
+ as: __props.as,
1015
+ renderless: ""
1016
+ }, {
1017
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
1018
+ _: 3
1019
+ }, 8, ["as"]);
1020
+ };
1021
+ }
1022
+ });
1023
+ var PopoverRoot_default = _sfc_main$8;
1024
+
1025
+ //#endregion
1026
+ //#region src/components/Popover/PopoverAnchor.vue
1027
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1028
+ name: "PopoverAnchor",
1029
+ __name: "PopoverAnchor",
1030
+ props: {
1031
+ target: {},
1032
+ as: { default: "button" },
1033
+ renderless: { type: Boolean }
1034
+ },
1035
+ setup(__props) {
1036
+ const props = createPropsRestProxy(__props, ["as"]);
1037
+ const context = usePopoverContext();
1038
+ const popovertarget = toRef(() => props.target ?? context.id);
1039
+ const style = toRef(() => ({ anchorName: `--${toValue(popovertarget)}` }));
1040
+ const slotProps = toRef(() => ({
1041
+ isOpen: context.isSelected.value,
1042
+ attrs: {
1043
+ "popovertarget": toValue(popovertarget),
1044
+ "type": __props.as === "button" ? "button" : void 0,
1045
+ "data-popover-open": context.isSelected.value ? "" : void 0
1046
+ }
1047
+ }));
1048
+ return (_ctx, _cache) => {
1049
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
1050
+ as: __props.as,
1051
+ style: style.value
1052
+ }, slotProps.value.attrs), {
1053
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
1054
+ _: 3
1055
+ }, 16, ["as", "style"]);
1056
+ };
1057
+ }
1058
+ });
1059
+ var PopoverAnchor_default = _sfc_main$7;
1060
+
1061
+ //#endregion
1062
+ //#region src/components/Popover/PopoverContent.vue
1063
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1064
+ name: "PopoverContent",
1065
+ __name: "PopoverContent",
1066
+ props: {
1067
+ id: {},
1068
+ positionArea: { default: "bottom" },
1069
+ positionTry: { default: "most-width bottom" },
1070
+ as: {},
1071
+ renderless: { type: Boolean }
1072
+ },
1073
+ emits: ["beforetoggle"],
1074
+ setup(__props, { emit: __emit }) {
1075
+ const props = createPropsRestProxy(__props, ["positionArea", "positionTry"]);
1076
+ const emit = __emit;
1077
+ const context = usePopoverContext();
1078
+ const ref$1 = useTemplateRef("ref");
1079
+ const id = toRef(() => props.id ?? context.id);
1080
+ const style = toRef(() => ({
1081
+ positionArea: __props.positionArea,
1082
+ positionAnchor: `--${toValue(id)}`,
1083
+ positionTry: __props.positionTry
1084
+ }));
1085
+ onMounted(() => {
1086
+ if (context.isSelected.value) ref$1.value?.element?.showPopover();
1087
+ });
1088
+ watch(context.isSelected, (isOpen) => {
1089
+ const element = ref$1.value?.element;
1090
+ if (!element) return;
1091
+ if (isOpen) element.showPopover?.();
1092
+ else element.hidePopover?.();
1093
+ });
1094
+ function onBeforeToggle(e) {
1095
+ context.isSelected.value = e.newState === "open";
1096
+ emit("beforetoggle", e);
1097
+ }
1098
+ const slotProps = toRef(() => ({
1099
+ isOpen: context.isSelected.value,
1100
+ attrs: {
1101
+ id: toValue(id),
1102
+ popover: ""
1103
+ }
1104
+ }));
1105
+ return (_ctx, _cache) => {
1106
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
1107
+ ref_key: "ref",
1108
+ ref: ref$1,
1109
+ style: style.value
1110
+ }, slotProps.value.attrs, { onBeforetoggle: onBeforeToggle }), {
1111
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
1112
+ _: 3
1113
+ }, 16, ["style"]);
1114
+ };
1115
+ }
1116
+ });
1117
+ var PopoverContent_default = _sfc_main$6;
1118
+
1119
+ //#endregion
1120
+ //#region src/components/Popover/index.ts
1121
+ const Popover = {
1122
+ Root: PopoverRoot_default,
1123
+ Anchor: PopoverAnchor_default,
1124
+ Content: PopoverContent_default
1125
+ };
1126
+
1127
+ //#endregion
1128
+ //#region src/components/Selection/SelectionRoot.vue
1129
+ const [useSelectionRoot, provideSelectionRoot] = createContext();
1130
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1131
+ name: "SelectionRoot",
1132
+ __name: "SelectionRoot",
1133
+ props: /* @__PURE__ */ mergeModels({
1134
+ namespace: { default: "v0:selection" },
1135
+ disabled: {
1136
+ type: Boolean,
1137
+ default: false
1138
+ },
1139
+ enroll: {
1140
+ type: Boolean,
1141
+ default: false
1142
+ },
1143
+ mandatory: {
1144
+ type: [Boolean, String],
1145
+ default: false
1146
+ },
1147
+ multiple: {
1148
+ type: Boolean,
1149
+ default: false
1150
+ }
1151
+ }, {
1152
+ "modelValue": {},
1153
+ "modelModifiers": {}
1154
+ }),
1155
+ emits: ["update:modelValue"],
1156
+ setup(__props) {
1157
+ const model = useModel(__props, "modelValue");
1158
+ const selection = createSelection({
1159
+ disabled: toRef(() => __props.disabled),
1160
+ enroll: __props.enroll,
1161
+ mandatory: __props.mandatory,
1162
+ multiple: __props.multiple,
1163
+ events: true
1164
+ });
1165
+ useProxyModel(selection, model, { multiple: __props.multiple });
1166
+ provideSelectionRoot(__props.namespace, selection);
1167
+ const slotProps = toRef(() => ({
1168
+ isDisabled: toValue(selection.disabled),
1169
+ multiple: __props.multiple,
1170
+ select: selection.select,
1171
+ unselect: selection.unselect,
1172
+ toggle: selection.toggle,
1173
+ attrs: { "aria-multiselectable": __props.multiple }
1174
+ }));
1175
+ return (_ctx, _cache) => {
1176
+ return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)));
1177
+ };
1178
+ }
1179
+ });
1180
+ var SelectionRoot_default = _sfc_main$5;
1181
+
1182
+ //#endregion
1183
+ //#region src/components/Selection/SelectionItem.vue
1184
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1185
+ name: "SelectionItem",
1186
+ __name: "SelectionItem",
1187
+ props: {
1188
+ id: {},
1189
+ label: {},
1190
+ value: {},
1191
+ disabled: {},
1192
+ namespace: { default: "v0:selection" }
1193
+ },
1194
+ setup(__props) {
1195
+ const selection = useSelectionRoot(__props.namespace);
1196
+ const ticket = selection.register({
1197
+ id: __props.id,
1198
+ value: __props.value,
1199
+ disabled: __props.disabled
1200
+ });
1201
+ const isDisabled = toRef(() => toValue(ticket.disabled) || toValue(selection.disabled));
1202
+ onUnmounted(() => {
1203
+ selection.unregister(ticket.id);
1204
+ });
1205
+ const slotProps = toRef(() => ({
1206
+ id: String(ticket.id),
1207
+ label: __props.label,
1208
+ value: __props.value,
1209
+ isSelected: toValue(ticket.isSelected),
1210
+ isDisabled: toValue(isDisabled),
1211
+ select: ticket.select,
1212
+ unselect: ticket.unselect,
1213
+ toggle: ticket.toggle,
1214
+ attrs: {
1215
+ "aria-selected": toValue(ticket.isSelected),
1216
+ "aria-disabled": toValue(isDisabled),
1217
+ "data-selected": toValue(ticket.isSelected) || void 0,
1218
+ "data-disabled": toValue(isDisabled) || void 0
1219
+ }
1220
+ }));
1221
+ return (_ctx, _cache) => {
1222
+ return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)));
1223
+ };
1224
+ }
1225
+ });
1226
+ var SelectionItem_default = _sfc_main$4;
1227
+
1228
+ //#endregion
1229
+ //#region src/components/Selection/index.ts
1230
+ const Selection = {
1231
+ Root: SelectionRoot_default,
1232
+ Item: SelectionItem_default
1233
+ };
1234
+
1235
+ //#endregion
1236
+ //#region src/components/Single/SingleRoot.vue
1237
+ const [useSingleRoot, provideSingleRoot] = createContext();
1238
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1239
+ name: "SingleRoot",
1240
+ __name: "SingleRoot",
1241
+ props: /* @__PURE__ */ mergeModels({
1242
+ namespace: { default: "v0:single" },
1243
+ disabled: {
1244
+ type: Boolean,
1245
+ default: false
1246
+ },
1247
+ enroll: {
1248
+ type: Boolean,
1249
+ default: false
1250
+ },
1251
+ mandatory: {
1252
+ type: [Boolean, String],
1253
+ default: false
1254
+ }
1255
+ }, {
1256
+ "modelValue": {},
1257
+ "modelModifiers": {}
1258
+ }),
1259
+ emits: ["update:modelValue"],
1260
+ setup(__props) {
1261
+ const model = useModel(__props, "modelValue");
1262
+ const single = createSingle({
1263
+ disabled: toRef(() => __props.disabled),
1264
+ enroll: __props.enroll,
1265
+ mandatory: __props.mandatory,
1266
+ events: true
1267
+ });
1268
+ useProxyModel(single, model, { multiple: false });
1269
+ provideSingleRoot(__props.namespace, single);
1270
+ const slotProps = toRef(() => ({
1271
+ isDisabled: toValue(single.disabled),
1272
+ select: single.select,
1273
+ unselect: single.unselect,
1274
+ toggle: single.toggle,
1275
+ attrs: { "aria-multiselectable": false }
1276
+ }));
1277
+ return (_ctx, _cache) => {
1278
+ return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)));
1279
+ };
1280
+ }
1281
+ });
1282
+ var SingleRoot_default = _sfc_main$3;
1283
+
1284
+ //#endregion
1285
+ //#region src/components/Single/SingleItem.vue
1286
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1287
+ name: "SingleItem",
1288
+ __name: "SingleItem",
1289
+ props: {
1290
+ id: {},
1291
+ label: {},
1292
+ value: {},
1293
+ disabled: {},
1294
+ namespace: { default: "v0:single" }
1295
+ },
1296
+ setup(__props) {
1297
+ const single = useSingleRoot(__props.namespace);
1298
+ const ticket = single.register({
1299
+ id: __props.id,
1300
+ value: __props.value,
1301
+ disabled: __props.disabled
1302
+ });
1303
+ const isDisabled = toRef(() => toValue(ticket.disabled) || toValue(single.disabled));
1304
+ onUnmounted(() => {
1305
+ single.unregister(ticket.id);
1306
+ });
1307
+ const slotProps = toRef(() => ({
1308
+ id: String(ticket.id),
1309
+ label: __props.label,
1310
+ value: __props.value,
1311
+ isSelected: toValue(ticket.isSelected),
1312
+ isDisabled: toValue(isDisabled),
1313
+ select: ticket.select,
1314
+ unselect: ticket.unselect,
1315
+ toggle: ticket.toggle,
1316
+ attrs: {
1317
+ "aria-selected": toValue(ticket.isSelected),
1318
+ "aria-disabled": toValue(isDisabled),
1319
+ "data-selected": toValue(ticket.isSelected) || void 0,
1320
+ "data-disabled": toValue(isDisabled) || void 0
1321
+ }
1322
+ }));
1323
+ return (_ctx, _cache) => {
1324
+ return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)));
1325
+ };
1326
+ }
1327
+ });
1328
+ var SingleItem_default = _sfc_main$2;
1329
+
1330
+ //#endregion
1331
+ //#region src/components/Single/index.ts
1332
+ const Single = {
1333
+ Root: SingleRoot_default,
1334
+ Item: SingleItem_default
1335
+ };
1336
+
1337
+ //#endregion
1338
+ //#region src/components/Step/StepRoot.vue
1339
+ const [useStepRoot, provideStepRoot] = createContext();
1340
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1341
+ name: "StepRoot",
1342
+ __name: "StepRoot",
1343
+ props: /* @__PURE__ */ mergeModels({
1344
+ namespace: { default: "v0:step" },
1345
+ disabled: {
1346
+ type: Boolean,
1347
+ default: false
1348
+ },
1349
+ enroll: {
1350
+ type: Boolean,
1351
+ default: false
1352
+ },
1353
+ mandatory: {
1354
+ type: [Boolean, String],
1355
+ default: false
1356
+ }
1357
+ }, {
1358
+ "modelValue": {},
1359
+ "modelModifiers": {}
1360
+ }),
1361
+ emits: ["update:modelValue"],
1362
+ setup(__props) {
1363
+ const model = useModel(__props, "modelValue");
1364
+ const step = createStep({
1365
+ disabled: toRef(() => __props.disabled),
1366
+ enroll: __props.enroll,
1367
+ mandatory: __props.mandatory,
1368
+ events: true
1369
+ });
1370
+ useProxyModel(step, model, { multiple: false });
1371
+ provideStepRoot(__props.namespace, step);
1372
+ const slotProps = toRef(() => ({
1373
+ isDisabled: toValue(step.disabled),
1374
+ first: step.first,
1375
+ last: step.last,
1376
+ next: step.next,
1377
+ prev: step.prev,
1378
+ step: step.step,
1379
+ select: step.select,
1380
+ unselect: step.unselect,
1381
+ toggle: step.toggle,
1382
+ attrs: { "aria-multiselectable": false }
1383
+ }));
1384
+ return (_ctx, _cache) => {
1385
+ return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)));
1386
+ };
1387
+ }
1388
+ });
1389
+ var StepRoot_default = _sfc_main$1;
1390
+
1391
+ //#endregion
1392
+ //#region src/components/Step/StepItem.vue
1393
+ const _sfc_main = /* @__PURE__ */ defineComponent({
1394
+ name: "StepItem",
1395
+ __name: "StepItem",
1396
+ props: {
1397
+ id: {},
1398
+ label: {},
1399
+ value: {},
1400
+ disabled: {},
1401
+ namespace: { default: "v0:step" }
1402
+ },
1403
+ setup(__props) {
1404
+ const step = useStepRoot(__props.namespace);
1405
+ const ticket = step.register({
1406
+ id: __props.id,
1407
+ value: __props.value,
1408
+ disabled: __props.disabled
1409
+ });
1410
+ const isDisabled = toRef(() => toValue(ticket.disabled) || toValue(step.disabled));
1411
+ onUnmounted(() => {
1412
+ step.unregister(ticket.id);
1413
+ });
1414
+ const slotProps = toRef(() => ({
1415
+ id: String(ticket.id),
1416
+ label: __props.label,
1417
+ value: __props.value,
1418
+ isSelected: toValue(ticket.isSelected),
1419
+ isDisabled: toValue(isDisabled),
1420
+ select: ticket.select,
1421
+ unselect: ticket.unselect,
1422
+ toggle: ticket.toggle,
1423
+ attrs: {
1424
+ "aria-selected": toValue(ticket.isSelected),
1425
+ "aria-disabled": toValue(isDisabled),
1426
+ "data-selected": toValue(ticket.isSelected) || void 0,
1427
+ "data-disabled": toValue(isDisabled) || void 0
1428
+ }
1429
+ }));
1430
+ return (_ctx, _cache) => {
1431
+ return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)));
1432
+ };
1433
+ }
1434
+ });
1435
+ var StepItem_default = _sfc_main;
1436
+
1437
+ //#endregion
1438
+ //#region src/components/Step/index.ts
1439
+ const Step = {
1440
+ Root: StepRoot_default,
1441
+ Item: StepItem_default
1442
+ };
1443
+
1444
+ //#endregion
1445
+ export { useAvatarRoot as A, ExpansionPanel as C, useExpansionPanelRoot as D, provideExpansionPanelSelection as E, Avatar as O, useGroupRoot as S, useExpansionPanelItem as T, usePaginationControls as _, provideSingleRoot as a, Group as b, provideSelectionRoot as c, providePopoverContext as d, usePopoverContext as f, providePaginationRoot as g, providePaginationItems as h, Single as i, Atom_default as j, provideAvatarContext as k, useSelectionRoot as l, providePaginationControls as m, provideStepRoot as n, useSingleRoot as o, Pagination as p, useStepRoot as r, Selection as s, Step as t, Popover as u, usePaginationItems as v, provideExpansionPanelItem as w, provideGroupRoot as x, usePaginationRoot as y };