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