@vuetify/v0 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/browser/index.js +1497 -466
  2. package/dist/components/index.d.mts +4 -0
  3. package/dist/components/index.mjs +7 -0
  4. package/dist/components-DFGu8N2g.mjs +947 -0
  5. package/dist/composables/index.d.mts +4 -0
  6. package/dist/composables/{index.js → index.mjs} +3 -3
  7. package/dist/{composables-DTW0WfTC.js → composables-TCjvMHyU.mjs} +590 -162
  8. package/dist/constants/{index.d.ts → index.d.mts} +1 -1
  9. package/dist/constants/{index.js → index.mjs} +3 -3
  10. package/dist/{globals-Cfd1Dr_o.js → globals-y0mJ6Eg7.mjs} +2 -2
  11. package/dist/{index-DWx3x9vE.d.ts → index-CQjOW_w5.d.mts} +101 -846
  12. package/dist/{index-DIX3zaZG.d.ts → index-CSdGoUCI.d.mts} +3 -2
  13. package/dist/index-D-EP6KrS.d.mts +812 -0
  14. package/dist/index-DbBHGczA.d.mts +815 -0
  15. package/dist/index.d.mts +7 -0
  16. package/dist/index.mjs +8 -0
  17. package/dist/types/{index.d.ts → index.d.mts} +1 -1
  18. package/dist/utilities/index.d.mts +3 -0
  19. package/dist/utilities/index.mjs +3 -0
  20. package/dist/{utilities-rsKHgU2m.js → utilities-C26nB74O.mjs} +5 -1
  21. package/package.json +15 -15
  22. package/dist/components/index.d.ts +0 -4
  23. package/dist/components/index.js +0 -7
  24. package/dist/components-BfI4Pf1x.js +0 -350
  25. package/dist/composables/index.d.ts +0 -3
  26. package/dist/index-TlH7dtTg.d.ts +0 -241
  27. package/dist/index.d.ts +0 -6
  28. package/dist/index.js +0 -8
  29. package/dist/utilities/index.d.ts +0 -3
  30. package/dist/utilities/index.js +0 -3
  31. /package/dist/{constants-De5c3_aB.js → constants-Xfszzyok.mjs} +0 -0
  32. /package/dist/{htmlElements-lF7PGahL.js → htmlElements-BYo-fMlZ.mjs} +0 -0
  33. /package/dist/{index-BKc0YiL1.d.ts → index-8AIxAM2d.d.mts} +0 -0
  34. /package/dist/{index-C_lAPFXS.d.ts → index-DY7-T630.d.mts} +0 -0
  35. /package/dist/types/{index.js → index.mjs} +0 -0
@@ -0,0 +1,947 @@
1
+ import { r as isSelfClosingTag } from "./htmlElements-BYo-fMlZ.mjs";
2
+ import { a as isNull, u as isString } from "./utilities-C26nB74O.mjs";
3
+ import { At as createContext, Mt as useContext, R as createSingleContext, T as useProxyModel, _ as createStepContext, at as useSelection, it as createSelectionContext, nt as useGroup, tt as createGroupContext, v as useStep, z as useSingle } from "./composables-TCjvMHyU.mjs";
4
+ import { computed, createBlock, createCommentVNode, createPropsRestProxy, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeProps, normalizeStyle, onMounted, onUnmounted, openBlock, renderSlot, resolveDynamicComponent, toRef, toValue, unref, useAttrs, useId, useModel, useTemplateRef, vShow, watch, withCtx, withDirectives } from "vue";
5
+
6
+ //#region src/components/Atom/Atom.vue
7
+ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
8
+ name: "Atom",
9
+ __name: "Atom",
10
+ props: {
11
+ as: { default: "div" },
12
+ renderless: {
13
+ type: Boolean,
14
+ default: false
15
+ }
16
+ },
17
+ setup(__props, { expose: __expose }) {
18
+ const element = useTemplateRef("element");
19
+ __expose({ element });
20
+ const attrs = useAttrs();
21
+ const isSelfClosing = toRef(() => /* @__PURE__ */ isString(__props.as) && isSelfClosingTag(__props.as));
22
+ const slotProps = toRef(() => attrs);
23
+ return (_ctx, _cache) => {
24
+ 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, {
25
+ ref_key: "element",
26
+ ref: element
27
+ }), {
28
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps.value)))]),
29
+ _: 3
30
+ }, 16)) : (openBlock(), createBlock(resolveDynamicComponent(__props.as), mergeProps({
31
+ key: 2,
32
+ ref_key: "element",
33
+ ref: element
34
+ }, slotProps.value), null, 16));
35
+ };
36
+ }
37
+ });
38
+ var Atom_default = _sfc_main$18;
39
+
40
+ //#endregion
41
+ //#region src/components/Avatar/AvatarFallback.vue
42
+ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
43
+ name: "AvatarFallback",
44
+ __name: "AvatarFallback",
45
+ props: {
46
+ namespace: { default: "v0:avatar" },
47
+ as: { default: "span" },
48
+ renderless: { type: Boolean }
49
+ },
50
+ setup(__props) {
51
+ const context = useContext(__props.namespace);
52
+ const ticket = context.register({ type: "fallback" });
53
+ onUnmounted(() => {
54
+ context.unregister(ticket.id);
55
+ });
56
+ return (_ctx, _cache) => {
57
+ return unref(ticket).isSelected.value ? (openBlock(), createBlock(unref(Atom_default), {
58
+ key: 0,
59
+ as: __props.as,
60
+ renderless: __props.renderless
61
+ }, {
62
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
63
+ _: 3
64
+ }, 8, ["as", "renderless"])) : createCommentVNode("v-if", true);
65
+ };
66
+ }
67
+ });
68
+ var AvatarFallback_default = _sfc_main$17;
69
+
70
+ //#endregion
71
+ //#region src/components/Avatar/AvatarImage.vue
72
+ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
73
+ name: "AvatarImage",
74
+ inheritAttrs: false,
75
+ __name: "AvatarImage",
76
+ props: {
77
+ src: {},
78
+ priority: { default: 0 },
79
+ namespace: { default: "v0:avatar" },
80
+ as: { default: "img" },
81
+ renderless: { type: Boolean }
82
+ },
83
+ emits: ["load", "error"],
84
+ setup(__props, { emit: __emit }) {
85
+ const props = createPropsRestProxy(__props, [
86
+ "as",
87
+ "renderless",
88
+ "priority",
89
+ "namespace"
90
+ ]);
91
+ const emit = __emit;
92
+ const context = useContext(__props.namespace);
93
+ const ticket = context.register({
94
+ priority: __props.priority,
95
+ type: "image",
96
+ disabled: true
97
+ });
98
+ function onLoad(e) {
99
+ ticket.disabled = false;
100
+ ticket.select();
101
+ emit("load", e);
102
+ }
103
+ function onError(e) {
104
+ ticket.disabled = true;
105
+ const first = context.seek("first");
106
+ if (first) context.select(first.id);
107
+ emit("error", e);
108
+ }
109
+ onUnmounted(() => {
110
+ context.unregister(ticket.id);
111
+ });
112
+ const bindableProps = toRef(() => ({
113
+ onError,
114
+ onLoad,
115
+ role: "img",
116
+ ...props
117
+ }));
118
+ return (_ctx, _cache) => {
119
+ return withDirectives((openBlock(), createBlock(unref(Atom_default), mergeProps({
120
+ as: __props.as,
121
+ renderless: __props.renderless
122
+ }, bindableProps.value), {
123
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(bindableProps.value)))]),
124
+ _: 3
125
+ }, 16, ["as", "renderless"])), [[vShow, unref(ticket).isSelected.value]]);
126
+ };
127
+ }
128
+ });
129
+ var AvatarImage_default = _sfc_main$16;
130
+
131
+ //#endregion
132
+ //#region src/components/Avatar/AvatarRoot.vue
133
+ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
134
+ name: "AvatarRoot",
135
+ __name: "AvatarRoot",
136
+ props: {
137
+ namespace: { default: "v0:avatar" },
138
+ as: { default: "div" },
139
+ renderless: { type: Boolean }
140
+ },
141
+ setup(__props) {
142
+ const [, provideAvatarContext] = createSelectionContext({
143
+ namespace: __props.namespace,
144
+ mandatory: "force",
145
+ multiple: false
146
+ });
147
+ provideAvatarContext();
148
+ return (_ctx, _cache) => {
149
+ return openBlock(), createBlock(unref(Atom_default), {
150
+ as: __props.as,
151
+ renderless: __props.renderless
152
+ }, {
153
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
154
+ _: 3
155
+ }, 8, ["as", "renderless"]);
156
+ };
157
+ }
158
+ });
159
+ var AvatarRoot_default = _sfc_main$15;
160
+
161
+ //#endregion
162
+ //#region src/components/Avatar/index.ts
163
+ const Avatar = {
164
+ Fallback: AvatarFallback_default,
165
+ Image: AvatarImage_default,
166
+ Root: AvatarRoot_default
167
+ };
168
+
169
+ //#endregion
170
+ //#region src/components/ExpansionPanel/ExpansionPanelActivator.vue
171
+ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
172
+ name: "ExpansionPanelActivator",
173
+ __name: "ExpansionPanelActivator",
174
+ props: {
175
+ itemNamespace: { default: "v0:expansion-panel-item" },
176
+ as: { default: "button" },
177
+ renderless: { type: Boolean }
178
+ },
179
+ setup(__props) {
180
+ const context = useContext(__props.itemNamespace);
181
+ function onKeydown(e) {
182
+ if (e.key === "Enter" || e.key === " ") {
183
+ e.preventDefault();
184
+ context.ticket.toggle();
185
+ }
186
+ }
187
+ const bindableProps = computed(() => ({
188
+ "id": context.headerId.value,
189
+ "role": "button",
190
+ "tabindex": context.isDisabled.value ? -1 : 0,
191
+ "aria-expanded": context.ticket.isSelected.value,
192
+ "aria-controls": context.contentId.value,
193
+ "aria-disabled": context.isDisabled.value,
194
+ "isSelected": context.ticket.isSelected.value,
195
+ "toggle": context.ticket.toggle,
196
+ "onClick": context.ticket.toggle,
197
+ onKeydown
198
+ }));
199
+ return (_ctx, _cache) => {
200
+ return openBlock(), createBlock(unref(Atom_default), {
201
+ id: bindableProps.value.id,
202
+ "aria-controls": bindableProps.value["aria-controls"],
203
+ "aria-disabled": bindableProps.value["aria-disabled"],
204
+ "aria-expanded": bindableProps.value["aria-expanded"],
205
+ as: __props.as,
206
+ renderless: __props.renderless,
207
+ role: bindableProps.value.role,
208
+ tabindex: bindableProps.value.tabindex,
209
+ onClick: unref(context).ticket.toggle,
210
+ onKeydown
211
+ }, {
212
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(bindableProps.value)))]),
213
+ _: 3
214
+ }, 8, [
215
+ "id",
216
+ "aria-controls",
217
+ "aria-disabled",
218
+ "aria-expanded",
219
+ "as",
220
+ "renderless",
221
+ "role",
222
+ "tabindex",
223
+ "onClick"
224
+ ]);
225
+ };
226
+ }
227
+ });
228
+ var ExpansionPanelActivator_default = _sfc_main$14;
229
+
230
+ //#endregion
231
+ //#region src/components/ExpansionPanel/ExpansionPanelContent.vue
232
+ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
233
+ name: "ExpansionPanelContent",
234
+ __name: "ExpansionPanelContent",
235
+ props: {
236
+ itemNamespace: { default: "v0:expansion-panel-item" },
237
+ as: {},
238
+ renderless: { type: Boolean }
239
+ },
240
+ setup(__props) {
241
+ const context = useContext(__props.itemNamespace);
242
+ const bindableProps = computed(() => ({
243
+ "id": context.contentId.value,
244
+ "role": "region",
245
+ "aria-labelledby": context.headerId.value,
246
+ "isSelected": context.ticket.isSelected.value
247
+ }));
248
+ return (_ctx, _cache) => {
249
+ return openBlock(), createBlock(unref(Atom_default), {
250
+ id: bindableProps.value.id,
251
+ "aria-labelledby": bindableProps.value["aria-labelledby"],
252
+ as: __props.as,
253
+ renderless: __props.renderless,
254
+ role: bindableProps.value.role
255
+ }, {
256
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(bindableProps.value)))]),
257
+ _: 3
258
+ }, 8, [
259
+ "id",
260
+ "aria-labelledby",
261
+ "as",
262
+ "renderless",
263
+ "role"
264
+ ]);
265
+ };
266
+ }
267
+ });
268
+ var ExpansionPanelContent_default = _sfc_main$13;
269
+
270
+ //#endregion
271
+ //#region src/components/ExpansionPanel/ExpansionPanelItem.vue
272
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
273
+ name: "ExpansionPanelItem",
274
+ __name: "ExpansionPanelItem",
275
+ props: {
276
+ id: {},
277
+ value: {},
278
+ disabled: {},
279
+ namespace: { default: "v0:expansion-panel" },
280
+ itemNamespace: { default: "v0:expansion-panel-item" },
281
+ as: {},
282
+ renderless: { type: Boolean }
283
+ },
284
+ setup(__props) {
285
+ const expansion = useSelection(__props.namespace);
286
+ const ticket = expansion.register({
287
+ id: __props.id,
288
+ value: __props.value,
289
+ disabled: __props.disabled
290
+ });
291
+ const headerId = toRef(() => `${ticket.id}-header`);
292
+ const contentId = toRef(() => `${ticket.id}-content`);
293
+ const isDisabled = toRef(() => toValue(ticket.disabled) || toValue(expansion.disabled));
294
+ const [, provideItemContext] = createContext(__props.itemNamespace);
295
+ provideItemContext({
296
+ ticket,
297
+ headerId,
298
+ contentId,
299
+ isDisabled
300
+ });
301
+ onUnmounted(() => {
302
+ expansion.unregister(ticket.id);
303
+ });
304
+ return (_ctx, _cache) => {
305
+ return openBlock(), createBlock(unref(Atom_default), {
306
+ as: __props.as,
307
+ renderless: __props.renderless
308
+ }, {
309
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
310
+ _: 3
311
+ }, 8, ["as", "renderless"]);
312
+ };
313
+ }
314
+ });
315
+ var ExpansionPanelItem_default = _sfc_main$12;
316
+
317
+ //#endregion
318
+ //#region src/components/ExpansionPanel/ExpansionPanelRoot.vue
319
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
320
+ name: "ExpansionPanelRoot",
321
+ __name: "ExpansionPanelRoot",
322
+ props: /* @__PURE__ */ mergeModels({
323
+ namespace: { default: "v0:expansion-panel" },
324
+ disabled: {
325
+ type: Boolean,
326
+ default: false
327
+ },
328
+ enroll: {
329
+ type: Boolean,
330
+ default: false
331
+ },
332
+ mandatory: {
333
+ type: [Boolean, String],
334
+ default: false
335
+ },
336
+ multiple: {
337
+ type: Boolean,
338
+ default: false
339
+ },
340
+ as: {},
341
+ renderless: { type: Boolean }
342
+ }, {
343
+ "modelValue": {},
344
+ "modelModifiers": {}
345
+ }),
346
+ emits: /* @__PURE__ */ mergeModels(["update:model-value"], ["update:modelValue"]),
347
+ setup(__props) {
348
+ const model = useModel(__props, "modelValue");
349
+ const [, provideExpansionControl, context] = createSelectionContext({
350
+ namespace: __props.namespace,
351
+ disabled: toRef(() => __props.disabled),
352
+ enroll: __props.enroll,
353
+ mandatory: __props.mandatory,
354
+ multiple: __props.multiple,
355
+ events: true
356
+ });
357
+ const bindableProps = computed(() => ({
358
+ disabled: toValue(context.disabled),
359
+ multiple: __props.multiple,
360
+ select: context.select,
361
+ unselect: context.unselect,
362
+ toggle: context.toggle,
363
+ ariaMultiselectable: __props.multiple
364
+ }));
365
+ useProxyModel(context, model, { multiple: __props.multiple });
366
+ provideExpansionControl(context);
367
+ return (_ctx, _cache) => {
368
+ return openBlock(), createBlock(unref(Atom_default), {
369
+ "aria-multiselectable": bindableProps.value.ariaMultiselectable,
370
+ as: __props.as,
371
+ disabled: bindableProps.value.disabled,
372
+ multiple: bindableProps.value.multiple,
373
+ renderless: __props.renderless,
374
+ select: bindableProps.value.select,
375
+ toggle: bindableProps.value.toggle,
376
+ unselect: bindableProps.value.unselect
377
+ }, {
378
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(bindableProps.value)))]),
379
+ _: 3
380
+ }, 8, [
381
+ "aria-multiselectable",
382
+ "as",
383
+ "disabled",
384
+ "multiple",
385
+ "renderless",
386
+ "select",
387
+ "toggle",
388
+ "unselect"
389
+ ]);
390
+ };
391
+ }
392
+ });
393
+ var ExpansionPanelRoot_default = _sfc_main$11;
394
+
395
+ //#endregion
396
+ //#region src/components/ExpansionPanel/index.ts
397
+ const ExpansionPanel = {
398
+ Root: ExpansionPanelRoot_default,
399
+ Item: ExpansionPanelItem_default,
400
+ Activator: ExpansionPanelActivator_default,
401
+ Content: ExpansionPanelContent_default
402
+ };
403
+
404
+ //#endregion
405
+ //#region src/components/Group/GroupItem.vue
406
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
407
+ name: "GroupItem",
408
+ __name: "GroupItem",
409
+ props: {
410
+ label: {},
411
+ id: {},
412
+ disabled: {},
413
+ value: {},
414
+ namespace: { default: "v0:group" }
415
+ },
416
+ setup(__props) {
417
+ const group = useGroup(__props.namespace);
418
+ const ticket = group.register({
419
+ id: __props.id,
420
+ value: __props.value,
421
+ disabled: __props.disabled
422
+ });
423
+ const isDisabled = toRef(() => ticket.disabled || group.disabled);
424
+ onUnmounted(() => {
425
+ group.unregister(ticket.id);
426
+ });
427
+ return (_ctx, _cache) => {
428
+ return renderSlot(_ctx.$slots, "default", {
429
+ id: String(unref(ticket).id),
430
+ ariaDisabled: toValue(isDisabled.value),
431
+ ariaSelected: toValue(unref(ticket).isSelected),
432
+ disabled: toValue(isDisabled.value),
433
+ isSelected: toValue(unref(ticket).isSelected),
434
+ label: __props.label,
435
+ select: unref(ticket).select,
436
+ toggle: unref(ticket).toggle,
437
+ unselect: unref(ticket).unselect,
438
+ value: __props.value
439
+ });
440
+ };
441
+ }
442
+ });
443
+ var GroupItem_default = _sfc_main$10;
444
+
445
+ //#endregion
446
+ //#region src/components/Group/GroupRoot.vue
447
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
448
+ name: "GroupRoot",
449
+ __name: "GroupRoot",
450
+ props: /* @__PURE__ */ mergeModels({
451
+ namespace: { default: "v0:group" },
452
+ disabled: {
453
+ type: Boolean,
454
+ default: false
455
+ },
456
+ enroll: {
457
+ type: Boolean,
458
+ default: false
459
+ },
460
+ mandatory: {
461
+ type: [Boolean, String],
462
+ default: false
463
+ }
464
+ }, {
465
+ "modelValue": {},
466
+ "modelModifiers": {}
467
+ }),
468
+ emits: ["update:modelValue"],
469
+ setup(__props) {
470
+ const model = useModel(__props, "modelValue");
471
+ const [, provideGroupControl, context] = createGroupContext({
472
+ namespace: __props.namespace,
473
+ disabled: toRef(() => __props.disabled),
474
+ enroll: __props.enroll,
475
+ mandatory: __props.mandatory,
476
+ events: true
477
+ });
478
+ useProxyModel(context, model, { multiple: true });
479
+ provideGroupControl(context);
480
+ return (_ctx, _cache) => {
481
+ return renderSlot(_ctx.$slots, "default", {
482
+ ariaMultiselectable: true,
483
+ disabled: toValue(unref(context).disabled),
484
+ select: unref(context).select,
485
+ toggle: unref(context).toggle,
486
+ unselect: unref(context).unselect
487
+ });
488
+ };
489
+ }
490
+ });
491
+ var GroupRoot_default = _sfc_main$9;
492
+
493
+ //#endregion
494
+ //#region src/components/Group/index.ts
495
+ const Group = {
496
+ Root: GroupRoot_default,
497
+ Item: GroupItem_default
498
+ };
499
+
500
+ //#endregion
501
+ //#region src/components/Popover/PopoverRoot.vue
502
+ const [usePopoverContext, providePopoverContext] = createContext("Popover");
503
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
504
+ name: "PopoverRoot",
505
+ __name: "PopoverRoot",
506
+ props: /* @__PURE__ */ mergeModels({
507
+ id: {},
508
+ as: { default: null },
509
+ renderless: { type: Boolean }
510
+ }, {
511
+ "modelValue": {
512
+ type: Boolean,
513
+ default: false
514
+ },
515
+ "modelModifiers": {}
516
+ }),
517
+ emits: ["update:modelValue"],
518
+ setup(__props) {
519
+ const props = createPropsRestProxy(__props, ["as"]);
520
+ const isSelected = useModel(__props, "modelValue");
521
+ const id = toRef(() => props.id ?? useId());
522
+ function toggle() {
523
+ isSelected.value = !isSelected.value;
524
+ }
525
+ const bindableProps = toRef(() => ({
526
+ id,
527
+ isSelected,
528
+ toggle
529
+ }));
530
+ providePopoverContext({
531
+ isSelected,
532
+ toggle,
533
+ id: id.value
534
+ });
535
+ return (_ctx, _cache) => {
536
+ return openBlock(), createBlock(unref(Atom_default), mergeProps({
537
+ as: __props.as,
538
+ renderless: __props.renderless
539
+ }, bindableProps.value), {
540
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(bindableProps.value)))]),
541
+ _: 3
542
+ }, 16, ["as", "renderless"]);
543
+ };
544
+ }
545
+ });
546
+ var PopoverRoot_default = _sfc_main$8;
547
+
548
+ //#endregion
549
+ //#region src/components/Popover/PopoverAnchor.vue
550
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
551
+ name: "PopoverAnchor",
552
+ __name: "PopoverAnchor",
553
+ props: {
554
+ target: {},
555
+ as: { default: "button" },
556
+ renderless: { type: Boolean }
557
+ },
558
+ setup(__props) {
559
+ const props = createPropsRestProxy(__props, ["as"]);
560
+ const context = usePopoverContext();
561
+ const popovertarget = toRef(() => props.target ?? context.id);
562
+ const style = toRef(() => ({ anchorName: `--${popovertarget.value}` }));
563
+ return (_ctx, _cache) => {
564
+ return openBlock(), createBlock(unref(Atom_default), {
565
+ as: __props.as,
566
+ "data-popover-open": unref(context).isSelected.value ? "" : void 0,
567
+ popovertarget: popovertarget.value,
568
+ style: normalizeStyle(style.value),
569
+ type: __props.as === "button" ? "button" : void 0
570
+ }, {
571
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
572
+ _: 3
573
+ }, 8, [
574
+ "as",
575
+ "data-popover-open",
576
+ "popovertarget",
577
+ "style",
578
+ "type"
579
+ ]);
580
+ };
581
+ }
582
+ });
583
+ var PopoverAnchor_default = _sfc_main$7;
584
+
585
+ //#endregion
586
+ //#region src/components/Popover/PopoverContent.vue
587
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
588
+ name: "PopoverContent",
589
+ __name: "PopoverContent",
590
+ props: {
591
+ id: {},
592
+ positionArea: { default: "bottom" },
593
+ positionTry: { default: "most-width bottom" },
594
+ as: {},
595
+ renderless: { type: Boolean }
596
+ },
597
+ emits: ["beforetoggle"],
598
+ setup(__props, { emit: __emit }) {
599
+ const props = createPropsRestProxy(__props, ["positionArea", "positionTry"]);
600
+ const emit = __emit;
601
+ const context = usePopoverContext();
602
+ const ref$1 = useTemplateRef("ref");
603
+ const id = toRef(() => props.id ?? context.id);
604
+ const style = toRef(() => ({
605
+ positionArea: __props.positionArea,
606
+ positionAnchor: `--${id.value}`,
607
+ positionTry: __props.positionTry
608
+ }));
609
+ onMounted(() => {
610
+ if (context.isSelected.value) ref$1.value?.element?.showPopover();
611
+ });
612
+ watch(context.isSelected, (isOpen) => {
613
+ const element = ref$1.value?.element;
614
+ if (!element) return;
615
+ if (isOpen) element.showPopover?.();
616
+ else element.hidePopover?.();
617
+ });
618
+ function onBeforeToggle(e) {
619
+ context.isSelected.value = e.newState === "open";
620
+ emit("beforetoggle", e);
621
+ }
622
+ return (_ctx, _cache) => {
623
+ return openBlock(), createBlock(unref(Atom_default), {
624
+ id: id.value,
625
+ ref_key: "ref",
626
+ ref: ref$1,
627
+ popover: "",
628
+ style: normalizeStyle(style.value),
629
+ onBeforetoggle: onBeforeToggle
630
+ }, {
631
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
632
+ _: 3
633
+ }, 8, ["id", "style"]);
634
+ };
635
+ }
636
+ });
637
+ var PopoverContent_default = _sfc_main$6;
638
+
639
+ //#endregion
640
+ //#region src/components/Popover/index.ts
641
+ const Popover = {
642
+ Root: PopoverRoot_default,
643
+ Anchor: PopoverAnchor_default,
644
+ Content: PopoverContent_default
645
+ };
646
+
647
+ //#endregion
648
+ //#region src/components/Selection/SelectionItem.vue
649
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
650
+ name: "SelectionItem",
651
+ __name: "SelectionItem",
652
+ props: {
653
+ label: {},
654
+ id: {},
655
+ disabled: {},
656
+ value: {},
657
+ namespace: { default: "v0:selection" }
658
+ },
659
+ setup(__props) {
660
+ const selection = useSelection(__props.namespace);
661
+ const ticket = selection.register({
662
+ id: __props.id,
663
+ value: __props.value,
664
+ disabled: __props.disabled
665
+ });
666
+ const isDisabled = toRef(() => ticket.disabled || selection.disabled);
667
+ onUnmounted(() => {
668
+ selection.unregister(ticket.id);
669
+ });
670
+ return (_ctx, _cache) => {
671
+ return renderSlot(_ctx.$slots, "default", {
672
+ id: String(unref(ticket).id),
673
+ ariaDisabled: toValue(isDisabled.value),
674
+ ariaSelected: toValue(unref(ticket).isSelected),
675
+ disabled: toValue(isDisabled.value),
676
+ isSelected: toValue(unref(ticket).isSelected),
677
+ label: __props.label,
678
+ select: unref(ticket).select,
679
+ toggle: unref(ticket).toggle,
680
+ unselect: unref(ticket).unselect,
681
+ value: __props.value
682
+ });
683
+ };
684
+ }
685
+ });
686
+ var SelectionItem_default = _sfc_main$5;
687
+
688
+ //#endregion
689
+ //#region src/components/Selection/SelectionRoot.vue
690
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
691
+ name: "SelectionRoot",
692
+ __name: "SelectionRoot",
693
+ props: /* @__PURE__ */ mergeModels({
694
+ namespace: { default: "v0:selection" },
695
+ disabled: {
696
+ type: Boolean,
697
+ default: false
698
+ },
699
+ enroll: {
700
+ type: Boolean,
701
+ default: false
702
+ },
703
+ mandatory: {
704
+ type: [Boolean, String],
705
+ default: false
706
+ },
707
+ multiple: {
708
+ type: Boolean,
709
+ default: false
710
+ }
711
+ }, {
712
+ "modelValue": {},
713
+ "modelModifiers": {}
714
+ }),
715
+ emits: ["update:modelValue"],
716
+ setup(__props) {
717
+ const model = useModel(__props, "modelValue");
718
+ const [, provideSelectionControl, context] = createSelectionContext({
719
+ namespace: __props.namespace,
720
+ disabled: toRef(() => __props.disabled),
721
+ enroll: __props.enroll,
722
+ mandatory: __props.mandatory,
723
+ multiple: __props.multiple,
724
+ events: true
725
+ });
726
+ useProxyModel(context, model, { multiple: __props.multiple });
727
+ provideSelectionControl(context);
728
+ return (_ctx, _cache) => {
729
+ return renderSlot(_ctx.$slots, "default", {
730
+ ariaMultiselectable: __props.multiple,
731
+ disabled: toValue(unref(context).disabled),
732
+ multiple: __props.multiple,
733
+ select: unref(context).select,
734
+ toggle: unref(context).toggle,
735
+ unselect: unref(context).unselect
736
+ });
737
+ };
738
+ }
739
+ });
740
+ var SelectionRoot_default = _sfc_main$4;
741
+
742
+ //#endregion
743
+ //#region src/components/Selection/index.ts
744
+ const Selection = {
745
+ Root: SelectionRoot_default,
746
+ Item: SelectionItem_default
747
+ };
748
+
749
+ //#endregion
750
+ //#region src/components/Single/SingleItem.vue
751
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
752
+ name: "SingleItem",
753
+ __name: "SingleItem",
754
+ props: {
755
+ label: {},
756
+ id: {},
757
+ disabled: {},
758
+ value: {},
759
+ namespace: { default: "v0:single" }
760
+ },
761
+ setup(__props) {
762
+ const single = useSingle(__props.namespace);
763
+ const ticket = single.register({
764
+ id: __props.id,
765
+ value: __props.value,
766
+ disabled: __props.disabled
767
+ });
768
+ const isDisabled = toRef(() => ticket.disabled || single.disabled);
769
+ onUnmounted(() => {
770
+ single.unregister(ticket.id);
771
+ });
772
+ return (_ctx, _cache) => {
773
+ return renderSlot(_ctx.$slots, "default", {
774
+ id: String(unref(ticket).id),
775
+ ariaDisabled: toValue(isDisabled.value),
776
+ ariaSelected: toValue(unref(ticket).isSelected),
777
+ disabled: toValue(isDisabled.value),
778
+ isSelected: toValue(unref(ticket).isSelected),
779
+ label: __props.label,
780
+ select: unref(ticket).select,
781
+ toggle: unref(ticket).toggle,
782
+ unselect: unref(ticket).unselect,
783
+ value: __props.value
784
+ });
785
+ };
786
+ }
787
+ });
788
+ var SingleItem_default = _sfc_main$3;
789
+
790
+ //#endregion
791
+ //#region src/components/Single/SingleRoot.vue
792
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
793
+ name: "SingleRoot",
794
+ __name: "SingleRoot",
795
+ props: /* @__PURE__ */ mergeModels({
796
+ namespace: { default: "v0:single" },
797
+ disabled: {
798
+ type: Boolean,
799
+ default: false
800
+ },
801
+ enroll: {
802
+ type: Boolean,
803
+ default: false
804
+ },
805
+ mandatory: {
806
+ type: [Boolean, String],
807
+ default: false
808
+ }
809
+ }, {
810
+ "modelValue": {},
811
+ "modelModifiers": {}
812
+ }),
813
+ emits: ["update:modelValue"],
814
+ setup(__props) {
815
+ const model = useModel(__props, "modelValue");
816
+ const [, provideSingleControl, context] = createSingleContext({
817
+ namespace: __props.namespace,
818
+ disabled: toRef(() => __props.disabled),
819
+ enroll: __props.enroll,
820
+ mandatory: __props.mandatory,
821
+ events: true
822
+ });
823
+ useProxyModel(context, model, { multiple: false });
824
+ provideSingleControl(context);
825
+ return (_ctx, _cache) => {
826
+ return renderSlot(_ctx.$slots, "default", {
827
+ ariaMultiselectable: true,
828
+ disabled: toValue(unref(context).disabled),
829
+ select: unref(context).select,
830
+ toggle: unref(context).toggle,
831
+ unselect: unref(context).unselect
832
+ });
833
+ };
834
+ }
835
+ });
836
+ var SingleRoot_default = _sfc_main$2;
837
+
838
+ //#endregion
839
+ //#region src/components/Single/index.ts
840
+ const Single = {
841
+ Root: SingleRoot_default,
842
+ Item: SingleItem_default
843
+ };
844
+
845
+ //#endregion
846
+ //#region src/components/Step/StepItem.vue
847
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
848
+ name: "StepItem",
849
+ __name: "StepItem",
850
+ props: {
851
+ label: {},
852
+ id: {},
853
+ disabled: {},
854
+ value: {},
855
+ namespace: { default: "v0:step" }
856
+ },
857
+ setup(__props) {
858
+ const step = useStep(__props.namespace);
859
+ const ticket = step.register({
860
+ id: __props.id,
861
+ value: __props.value,
862
+ disabled: __props.disabled
863
+ });
864
+ const isDisabled = toRef(() => ticket.disabled || step.disabled);
865
+ onUnmounted(() => {
866
+ step.unregister(ticket.id);
867
+ });
868
+ return (_ctx, _cache) => {
869
+ return renderSlot(_ctx.$slots, "default", {
870
+ id: String(unref(ticket).id),
871
+ ariaDisabled: toValue(isDisabled.value),
872
+ ariaSelected: toValue(unref(ticket).isSelected),
873
+ disabled: toValue(isDisabled.value),
874
+ isSelected: toValue(unref(ticket).isSelected),
875
+ label: __props.label,
876
+ select: unref(ticket).select,
877
+ toggle: unref(ticket).toggle,
878
+ unselect: unref(ticket).unselect,
879
+ value: __props.value
880
+ });
881
+ };
882
+ }
883
+ });
884
+ var StepItem_default = _sfc_main$1;
885
+
886
+ //#endregion
887
+ //#region src/components/Step/StepRoot.vue
888
+ const _sfc_main = /* @__PURE__ */ defineComponent({
889
+ name: "StepRoot",
890
+ __name: "StepRoot",
891
+ props: /* @__PURE__ */ mergeModels({
892
+ namespace: { default: "v0:step" },
893
+ disabled: {
894
+ type: Boolean,
895
+ default: false
896
+ },
897
+ enroll: {
898
+ type: Boolean,
899
+ default: false
900
+ },
901
+ mandatory: {
902
+ type: [Boolean, String],
903
+ default: false
904
+ }
905
+ }, {
906
+ "modelValue": {},
907
+ "modelModifiers": {}
908
+ }),
909
+ emits: ["update:modelValue"],
910
+ setup(__props) {
911
+ const model = useModel(__props, "modelValue");
912
+ const [, provideStepControl, context] = createStepContext({
913
+ namespace: __props.namespace,
914
+ disabled: toRef(() => __props.disabled),
915
+ enroll: __props.enroll,
916
+ mandatory: __props.mandatory,
917
+ events: true
918
+ });
919
+ useProxyModel(context, model, { multiple: false });
920
+ provideStepControl(context);
921
+ return (_ctx, _cache) => {
922
+ return renderSlot(_ctx.$slots, "default", {
923
+ ariaMultiselectable: true,
924
+ disabled: toValue(unref(context).disabled),
925
+ first: unref(context).first,
926
+ last: unref(context).last,
927
+ next: unref(context).next,
928
+ prev: unref(context).prev,
929
+ select: unref(context).select,
930
+ step: unref(context).step,
931
+ toggle: unref(context).toggle,
932
+ unselect: unref(context).unselect
933
+ });
934
+ };
935
+ }
936
+ });
937
+ var StepRoot_default = _sfc_main;
938
+
939
+ //#endregion
940
+ //#region src/components/Step/index.ts
941
+ const Step = {
942
+ Root: StepRoot_default,
943
+ Item: StepItem_default
944
+ };
945
+
946
+ //#endregion
947
+ export { providePopoverContext as a, ExpansionPanel as c, Popover as i, Avatar as l, Single as n, usePopoverContext as o, Selection as r, Group as s, Step as t, Atom_default as u };