@auronui/vue 1.0.4 → 1.0.6

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.
@@ -373,7 +373,7 @@ function createContext(contextName) {
373
373
  }
374
374
  //#endregion
375
375
  //#region src/components/spinner/Spinner.vue?vue&type=script&setup=true&lang.ts
376
- var _hoisted_1$58 = ["aria-label"];
376
+ var _hoisted_1$59 = ["aria-label"];
377
377
  var _hoisted_2$32 = {
378
378
  "data-slot": "spinner-icon",
379
379
  viewBox: "0 0 24 24",
@@ -447,13 +447,13 @@ var Spinner_default = /* @__PURE__ */ (0, vue.defineComponent)({
447
447
  fill: `url(#${gradId2})`,
448
448
  transform: "translate(1.5 1.625)"
449
449
  }, null, 8, _hoisted_5$10)
450
- ])]))], 10, _hoisted_1$58);
450
+ ])]))], 10, _hoisted_1$59);
451
451
  };
452
452
  }
453
453
  });
454
454
  //#endregion
455
455
  //#region src/components/separator/Separator.vue?vue&type=script&setup=true&lang.ts
456
- var _hoisted_1$57 = { class: "separator__content" };
456
+ var _hoisted_1$58 = { class: "separator__content" };
457
457
  //#endregion
458
458
  //#region src/components/separator/Separator.vue
459
459
  var Separator_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -487,7 +487,7 @@ var Separator_default = /* @__PURE__ */ (0, vue.defineComponent)({
487
487
  "aria-orientation": "horizontal"
488
488
  }, [
489
489
  _cache[0] || (_cache[0] = (0, vue.createElementVNode)("div", { class: "separator__line" }, null, -1)),
490
- (0, vue.createElementVNode)("div", _hoisted_1$57, [(0, vue.renderSlot)(_ctx.$slots, "default")]),
490
+ (0, vue.createElementVNode)("div", _hoisted_1$58, [(0, vue.renderSlot)(_ctx.$slots, "default")]),
491
491
  _cache[1] || (_cache[1] = (0, vue.createElementVNode)("div", { class: "separator__line" }, null, -1))
492
492
  ], 2));
493
493
  };
@@ -539,7 +539,7 @@ var Text_default = /* @__PURE__ */ (0, vue.defineComponent)({
539
539
  });
540
540
  //#endregion
541
541
  //#region src/components/label/Label.vue?vue&type=script&setup=true&lang.ts
542
- var _hoisted_1$56 = ["for"];
542
+ var _hoisted_1$57 = ["for"];
543
543
  //#endregion
544
544
  //#region src/components/label/Label.vue
545
545
  var Label_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -571,13 +571,13 @@ var Label_default = /* @__PURE__ */ (0, vue.defineComponent)({
571
571
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("label", {
572
572
  class: (0, vue.normalizeClass)(classes.value),
573
573
  for: props.for
574
- }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$56);
574
+ }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$57);
575
575
  };
576
576
  }
577
577
  });
578
578
  //#endregion
579
579
  //#region src/components/description/Description.vue?vue&type=script&setup=true&lang.ts
580
- var _hoisted_1$55 = ["id"];
580
+ var _hoisted_1$56 = ["id"];
581
581
  //#endregion
582
582
  //#region src/components/description/Description.vue
583
583
  var Description_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -593,7 +593,7 @@ var Description_default = /* @__PURE__ */ (0, vue.defineComponent)({
593
593
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("p", {
594
594
  id: props.id,
595
595
  class: (0, vue.normalizeClass)(classes.value)
596
- }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$55);
596
+ }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$56);
597
597
  };
598
598
  }
599
599
  });
@@ -661,7 +661,7 @@ var Badge_default = /* @__PURE__ */ (0, vue.defineComponent)({
661
661
  });
662
662
  //#endregion
663
663
  //#region src/components/chip/Chip.vue?vue&type=script&setup=true&lang.ts
664
- var _hoisted_1$54 = ["aria-label"];
664
+ var _hoisted_1$55 = ["aria-label"];
665
665
  //#endregion
666
666
  //#region src/components/chip/Chip.vue
667
667
  var Chip_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -734,7 +734,7 @@ var Chip_default = /* @__PURE__ */ (0, vue.defineComponent)({
734
734
  y1: "6",
735
735
  x2: "18",
736
736
  y2: "18"
737
- })], -1)])], 10, _hoisted_1$54)) : (0, vue.createCommentVNode)("", true)
737
+ })], -1)])], 10, _hoisted_1$55)) : (0, vue.createCommentVNode)("", true)
738
738
  ], 2);
739
739
  };
740
740
  }
@@ -767,7 +767,7 @@ var Surface_default = /* @__PURE__ */ (0, vue.defineComponent)({
767
767
  var { useProvide: useCardProvide, useInject: useCardInject, key: cardContextKey } = createContext("Card");
768
768
  //#endregion
769
769
  //#region src/components/card/Card.vue?vue&type=script&setup=true&lang.ts
770
- var _hoisted_1$53 = [
770
+ var _hoisted_1$54 = [
771
771
  "role",
772
772
  "tabindex",
773
773
  "aria-disabled",
@@ -843,7 +843,7 @@ var Card_default = /* @__PURE__ */ (0, vue.defineComponent)({
843
843
  "data-disabled": __props.isDisabled || void 0,
844
844
  onClick,
845
845
  onKeydown
846
- }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 42, _hoisted_1$53);
846
+ }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 42, _hoisted_1$54);
847
847
  };
848
848
  }
849
849
  });
@@ -1068,7 +1068,7 @@ var Button_default = /* @__PURE__ */ (0, vue.defineComponent)({
1068
1068
  });
1069
1069
  //#endregion
1070
1070
  //#region src/components/button/ButtonGroup.vue?vue&type=script&setup=true&lang.ts
1071
- var _hoisted_1$52 = ["data-orientation"];
1071
+ var _hoisted_1$53 = ["data-orientation"];
1072
1072
  //#endregion
1073
1073
  //#region src/components/button/ButtonGroup.vue
1074
1074
  var ButtonGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -1133,7 +1133,7 @@ var ButtonGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
1133
1133
  class: (0, vue.normalizeClass)((0, vue.unref)(composeClassName)(slotFns.value.base(), props.class)),
1134
1134
  "data-orientation": props.orientation,
1135
1135
  role: "group"
1136
- }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$52);
1136
+ }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$53);
1137
1137
  };
1138
1138
  }
1139
1139
  });
@@ -1205,7 +1205,7 @@ var CloseButton_default = /* @__PURE__ */ (0, vue.defineComponent)({
1205
1205
  var { useProvide: useToggleButtonGroupProvide, useInject: useToggleButtonGroupInject, key: toggleButtonGroupContextKey } = createContext("ToggleButtonGroup");
1206
1206
  //#endregion
1207
1207
  //#region src/components/button/ToggleButton.vue?vue&type=script&setup=true&lang.ts
1208
- var _hoisted_1$51 = ["disabled", "data-orientation"];
1208
+ var _hoisted_1$52 = ["disabled", "data-orientation"];
1209
1209
  //#endregion
1210
1210
  //#region src/components/button/ToggleButton.vue
1211
1211
  var ToggleButton_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -1276,7 +1276,7 @@ var ToggleButton_default = /* @__PURE__ */ (0, vue.defineComponent)({
1276
1276
  disabled: isDisabled.value || void 0,
1277
1277
  "data-orientation": (0, vue.unref)(groupCtx).orientation.value,
1278
1278
  type: "button"
1279
- }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$51)]),
1279
+ }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$52)]),
1280
1280
  _: 3
1281
1281
  }, 8, [
1282
1282
  "disabled",
@@ -1288,7 +1288,7 @@ var ToggleButton_default = /* @__PURE__ */ (0, vue.defineComponent)({
1288
1288
  });
1289
1289
  //#endregion
1290
1290
  //#region src/components/button/ToggleButtonGroup.vue?vue&type=script&setup=true&lang.ts
1291
- var _hoisted_1$50 = ["data-orientation"];
1291
+ var _hoisted_1$51 = ["data-orientation"];
1292
1292
  //#endregion
1293
1293
  //#region src/components/button/ToggleButtonGroup.vue
1294
1294
  var ToggleButtonGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -1355,7 +1355,7 @@ var ToggleButtonGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
1355
1355
  class: (0, vue.normalizeClass)((0, vue.unref)(composeClassName)(slotFns.value.base(), props.class)),
1356
1356
  "data-orientation": props.orientation,
1357
1357
  role: "group"
1358
- }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$50);
1358
+ }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$51);
1359
1359
  };
1360
1360
  }
1361
1361
  });
@@ -1681,7 +1681,7 @@ var FormField_default = /* @__PURE__ */ (0, vue.defineComponent)({
1681
1681
  });
1682
1682
  //#endregion
1683
1683
  //#region src/components/input/Input.vue?vue&type=script&setup=true&lang.ts
1684
- var _hoisted_1$49 = [
1684
+ var _hoisted_1$50 = [
1685
1685
  "data-invalid",
1686
1686
  "data-disabled",
1687
1687
  "data-readonly",
@@ -1946,13 +1946,13 @@ var Input_default = /* @__PURE__ */ (0, vue.defineComponent)({
1946
1946
  key: 1,
1947
1947
  id: descriptionId.value,
1948
1948
  class: (0, vue.normalizeClass)(slotFns.value.description())
1949
- }, (0, vue.toDisplayString)(__props.description), 11, _hoisted_12)) : (0, vue.createCommentVNode)("", true)], 2)) : (0, vue.createCommentVNode)("", true)], 2)], 10, _hoisted_1$49);
1949
+ }, (0, vue.toDisplayString)(__props.description), 11, _hoisted_12)) : (0, vue.createCommentVNode)("", true)], 2)) : (0, vue.createCommentVNode)("", true)], 2)], 10, _hoisted_1$50);
1950
1950
  };
1951
1951
  }
1952
1952
  });
1953
1953
  //#endregion
1954
1954
  //#region src/components/textarea/Textarea.vue?vue&type=script&setup=true&lang.ts
1955
- var _hoisted_1$48 = [
1955
+ var _hoisted_1$49 = [
1956
1956
  "data-invalid",
1957
1957
  "data-disabled",
1958
1958
  "data-readonly",
@@ -2169,13 +2169,13 @@ var Textarea_default = /* @__PURE__ */ (0, vue.defineComponent)({
2169
2169
  key: 1,
2170
2170
  id: descriptionId.value,
2171
2171
  class: (0, vue.normalizeClass)(slotFns.value.description())
2172
- }, (0, vue.toDisplayString)(__props.description), 11, _hoisted_9)) : (0, vue.createCommentVNode)("", true)], 2)) : (0, vue.createCommentVNode)("", true)], 2)], 10, _hoisted_1$48);
2172
+ }, (0, vue.toDisplayString)(__props.description), 11, _hoisted_9)) : (0, vue.createCommentVNode)("", true)], 2)) : (0, vue.createCommentVNode)("", true)], 2)], 10, _hoisted_1$49);
2173
2173
  };
2174
2174
  }
2175
2175
  });
2176
2176
  //#endregion
2177
2177
  //#region src/components/number-field/NumberField.vue?vue&type=script&setup=true&lang.ts
2178
- var _hoisted_1$47 = ["for"];
2178
+ var _hoisted_1$48 = ["for"];
2179
2179
  //#endregion
2180
2180
  //#region src/components/number-field/NumberField.vue
2181
2181
  var NumberField_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -2255,7 +2255,7 @@ var NumberField_default = /* @__PURE__ */ (0, vue.defineComponent)({
2255
2255
  for: resolvedInputId.value,
2256
2256
  class: (0, vue.normalizeClass)(isLabelVisible.value ? void 0 : "sr-only"),
2257
2257
  "data-slot": "label"
2258
- }, (0, vue.toDisplayString)(props.label || props.ariaLabel), 11, _hoisted_1$47)) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div", {
2258
+ }, (0, vue.toDisplayString)(props.label || props.ariaLabel), 11, _hoisted_1$48)) : (0, vue.createCommentVNode)("", true), (0, vue.createElementVNode)("div", {
2259
2259
  class: (0, vue.normalizeClass)(slotFns.value.group()),
2260
2260
  "data-slot": "group"
2261
2261
  }, [
@@ -2318,7 +2318,7 @@ var NumberField_default = /* @__PURE__ */ (0, vue.defineComponent)({
2318
2318
  });
2319
2319
  //#endregion
2320
2320
  //#region src/components/fieldset/Fieldset.vue?vue&type=script&setup=true&lang.ts
2321
- var _hoisted_1$46 = ["disabled"];
2321
+ var _hoisted_1$47 = ["disabled"];
2322
2322
  //#endregion
2323
2323
  //#region src/components/fieldset/Fieldset.vue
2324
2324
  var Fieldset_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -2346,7 +2346,7 @@ var Fieldset_default = /* @__PURE__ */ (0, vue.defineComponent)({
2346
2346
  }, [props.legend ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("legend", {
2347
2347
  key: 0,
2348
2348
  class: (0, vue.normalizeClass)((0, vue.unref)(styles).legend())
2349
- }, (0, vue.toDisplayString)(props.legend), 3)) : (0, vue.createCommentVNode)("", true), (0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$46);
2349
+ }, (0, vue.toDisplayString)(props.legend), 3)) : (0, vue.createCommentVNode)("", true), (0, vue.renderSlot)(_ctx.$slots, "default")], 10, _hoisted_1$47);
2350
2350
  };
2351
2351
  }
2352
2352
  });
@@ -2355,7 +2355,7 @@ var Fieldset_default = /* @__PURE__ */ (0, vue.defineComponent)({
2355
2355
  var { useProvide: useCheckboxGroupProvide, useInject: useCheckboxGroupInject, key: checkboxGroupContextKey } = createContext("CheckboxGroup");
2356
2356
  //#endregion
2357
2357
  //#region src/components/checkbox/Checkbox.vue?vue&type=script&setup=true&lang.ts
2358
- var _hoisted_1$45 = {
2358
+ var _hoisted_1$46 = {
2359
2359
  key: 0,
2360
2360
  xmlns: "http://www.w3.org/2000/svg",
2361
2361
  width: "12",
@@ -2442,7 +2442,7 @@ var Checkbox_default = /* @__PURE__ */ (0, vue.defineComponent)({
2442
2442
  "onUpdate:modelValue": handleUpdate
2443
2443
  }), {
2444
2444
  default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(slotFns.value.control()) }, [(0, vue.createVNode)((0, vue.unref)(reka_ui.CheckboxIndicator), { class: (0, vue.normalizeClass)(slotFns.value.indicator()) }, {
2445
- default: (0, vue.withCtx)(() => [props.isIndeterminate ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$45, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("line", {
2445
+ default: (0, vue.withCtx)(() => [props.isIndeterminate ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$46, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("line", {
2446
2446
  x1: "5",
2447
2447
  y1: "12",
2448
2448
  x2: "19",
@@ -2463,7 +2463,7 @@ var Checkbox_default = /* @__PURE__ */ (0, vue.defineComponent)({
2463
2463
  });
2464
2464
  //#endregion
2465
2465
  //#region src/components/checkbox/CheckboxGroup.vue?vue&type=script&setup=true&lang.ts
2466
- var _hoisted_1$44 = ["aria-labelledby", "data-orientation"];
2466
+ var _hoisted_1$45 = ["aria-labelledby", "data-orientation"];
2467
2467
  var _hoisted_2$28 = { class: "checkbox-group__wrapper" };
2468
2468
  var _hoisted_3$18 = {
2469
2469
  key: 1,
@@ -2521,7 +2521,7 @@ var CheckboxGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
2521
2521
  }, (0, vue.toDisplayString)(props.label), 1)) : (0, vue.createCommentVNode)("", true),
2522
2522
  (0, vue.createElementVNode)("div", _hoisted_2$28, [(0, vue.renderSlot)(_ctx.$slots, "default")]),
2523
2523
  props.description ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$18, (0, vue.toDisplayString)(props.description), 1)) : (0, vue.createCommentVNode)("", true)
2524
- ], 10, _hoisted_1$44);
2524
+ ], 10, _hoisted_1$45);
2525
2525
  };
2526
2526
  }
2527
2527
  });
@@ -2572,7 +2572,7 @@ var Radio_default = /* @__PURE__ */ (0, vue.defineComponent)({
2572
2572
  });
2573
2573
  //#endregion
2574
2574
  //#region src/components/radio/RadioGroup.vue?vue&type=script&setup=true&lang.ts
2575
- var _hoisted_1$43 = { class: "radio-group__wrapper" };
2575
+ var _hoisted_1$44 = { class: "radio-group__wrapper" };
2576
2576
  var _hoisted_2$27 = {
2577
2577
  key: 1,
2578
2578
  class: "radio-group__description"
@@ -2622,7 +2622,7 @@ var RadioGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
2622
2622
  id: labelId,
2623
2623
  class: "radio-group__label"
2624
2624
  }, (0, vue.toDisplayString)(props.label), 1)) : (0, vue.createCommentVNode)("", true),
2625
- (0, vue.createElementVNode)("div", _hoisted_1$43, [(0, vue.renderSlot)(_ctx.$slots, "default")]),
2625
+ (0, vue.createElementVNode)("div", _hoisted_1$44, [(0, vue.renderSlot)(_ctx.$slots, "default")]),
2626
2626
  props.description ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_2$27, (0, vue.toDisplayString)(props.description), 1)) : (0, vue.createCommentVNode)("", true)
2627
2627
  ]),
2628
2628
  _: 3
@@ -2714,7 +2714,7 @@ var Switch_default = /* @__PURE__ */ (0, vue.defineComponent)({
2714
2714
  });
2715
2715
  //#endregion
2716
2716
  //#region src/components/switch/SwitchGroup.vue?vue&type=script&setup=true&lang.ts
2717
- var _hoisted_1$42 = ["aria-labelledby", "data-orientation"];
2717
+ var _hoisted_1$43 = ["aria-labelledby", "data-orientation"];
2718
2718
  var _hoisted_2$26 = {
2719
2719
  key: 1,
2720
2720
  class: "switch-group__description"
@@ -2771,7 +2771,7 @@ var SwitchGroup_default = /* @__PURE__ */ (0, vue.defineComponent)({
2771
2771
  }, (0, vue.toDisplayString)(props.label), 1)) : (0, vue.createCommentVNode)("", true),
2772
2772
  (0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)(groupSlots.value.items()) }, [(0, vue.renderSlot)(_ctx.$slots, "default")], 2),
2773
2773
  props.description ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_2$26, (0, vue.toDisplayString)(props.description), 1)) : (0, vue.createCommentVNode)("", true)
2774
- ], 10, _hoisted_1$42);
2774
+ ], 10, _hoisted_1$43);
2775
2775
  };
2776
2776
  }
2777
2777
  });
@@ -12583,7 +12583,7 @@ var AlertDialogOverlay_default = /* @__PURE__ */ (0, vue.defineComponent)({
12583
12583
  });
12584
12584
  //#endregion
12585
12585
  //#region src/components/alert-dialog/AlertDialogContent.vue?vue&type=script&setup=true&lang.ts
12586
- var _hoisted_1$41 = ["data-placement"];
12586
+ var _hoisted_1$42 = ["data-placement"];
12587
12587
  //#endregion
12588
12588
  //#region src/components/alert-dialog/AlertDialogContent.vue
12589
12589
  var AlertDialogContent_default = /* @__PURE__ */ (0, vue.defineComponent)({
@@ -12618,7 +12618,7 @@ var AlertDialogContent_default = /* @__PURE__ */ (0, vue.defineComponent)({
12618
12618
  }, {
12619
12619
  default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
12620
12620
  _: 3
12621
- }, 8, ["class", "data-placement"])], 10, _hoisted_1$41)]),
12621
+ }, 8, ["class", "data-placement"])], 10, _hoisted_1$42)]),
12622
12622
  _: 3
12623
12623
  });
12624
12624
  };
@@ -12768,7 +12768,7 @@ var AlertDialogDescription_default = /* @__PURE__ */ (0, vue.defineComponent)({
12768
12768
  });
12769
12769
  //#endregion
12770
12770
  //#region src/components/alert-dialog/AlertDialogIcon.vue?vue&type=script&setup=true&lang.ts
12771
- var _hoisted_1$40 = {
12771
+ var _hoisted_1$41 = {
12772
12772
  key: 0,
12773
12773
  "data-slot": "alert-dialog-default-icon",
12774
12774
  viewBox: "0 0 24 24",
@@ -12830,7 +12830,7 @@ var AlertDialogIcon_default = /* @__PURE__ */ (0, vue.defineComponent)({
12830
12830
  return (0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
12831
12831
  class: (0, vue.normalizeClass)((0, vue.unref)(composeClassName)((0, vue.unref)(styles).icon({ status: resolvedStatus() }), props.class)),
12832
12832
  "aria-hidden": "true"
12833
- }, [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [resolvedStatus() === "danger" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$40, [..._cache[0] || (_cache[0] = [
12833
+ }, [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [resolvedStatus() === "danger" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("svg", _hoisted_1$41, [..._cache[0] || (_cache[0] = [
12834
12834
  (0, vue.createElementVNode)("circle", {
12835
12835
  cx: "12",
12836
12836
  cy: "12",
@@ -13180,26 +13180,34 @@ var Tabs_default = /* @__PURE__ */ (0, vue.defineComponent)({
13180
13180
  setup(__props, { emit: __emit }) {
13181
13181
  const props = __props;
13182
13182
  const emit = __emit;
13183
+ const internalValue = (0, vue.ref)(props.modelValue ?? props.defaultValue);
13184
+ (0, vue.watch)(() => props.modelValue, (v) => {
13185
+ if (v !== void 0) internalValue.value = v;
13186
+ });
13187
+ function changeTab(value) {
13188
+ internalValue.value = value;
13189
+ emit("update:modelValue", value);
13190
+ }
13183
13191
  const slotFns = (0, vue.computed)(() => (0, _auronui_styles.tabsVariants)({ variant: props.variant }));
13184
13192
  useTabsProvide({
13185
13193
  slotFns,
13186
- orientation: (0, vue.toRef)(props, "orientation")
13194
+ orientation: (0, vue.toRef)(props, "orientation"),
13195
+ currentValue: internalValue,
13196
+ changeTab
13187
13197
  });
13188
13198
  return (_ctx, _cache) => {
13189
13199
  return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.TabsRoot), {
13190
- "model-value": props.modelValue,
13191
- "default-value": props.defaultValue,
13200
+ "model-value": internalValue.value,
13192
13201
  orientation: props.orientation,
13193
13202
  "activation-mode": props.activationMode,
13194
13203
  class: (0, vue.normalizeClass)((0, vue.unref)(composeClassName)(slotFns.value.base(), props.class)),
13195
13204
  "data-orientation": props.orientation,
13196
- "onUpdate:modelValue": _cache[0] || (_cache[0] = (v) => emit("update:modelValue", v))
13205
+ "onUpdate:modelValue": changeTab
13197
13206
  }, {
13198
13207
  default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
13199
13208
  _: 3
13200
13209
  }, 8, [
13201
13210
  "model-value",
13202
- "default-value",
13203
13211
  "orientation",
13204
13212
  "activation-mode",
13205
13213
  "class",
@@ -13209,24 +13217,283 @@ var Tabs_default = /* @__PURE__ */ (0, vue.defineComponent)({
13209
13217
  }
13210
13218
  });
13211
13219
  //#endregion
13220
+ //#region src/components/tabs/TabList.vue?vue&type=script&setup=true&lang.ts
13221
+ var _hoisted_1$40 = {
13222
+ key: 0,
13223
+ class: "tabs__overflow-menu",
13224
+ role: "menu"
13225
+ };
13226
+ //#endregion
13212
13227
  //#region src/components/tabs/TabList.vue
13213
13228
  var TabList_default = /* @__PURE__ */ (0, vue.defineComponent)({
13214
13229
  __name: "TabList",
13215
13230
  props: {
13216
13231
  loop: { type: Boolean },
13232
+ overflow: {},
13217
13233
  class: {}
13218
13234
  },
13219
13235
  setup(__props) {
13220
13236
  const props = __props;
13221
13237
  const ctx = useTabsInject();
13238
+ const scrollWrapperEl = (0, vue.useTemplateRef)("scrollWrapperEl");
13239
+ const canScrollLeft = (0, vue.ref)(false);
13240
+ const canScrollRight = (0, vue.ref)(false);
13241
+ function updateScrollButtons() {
13242
+ const el = scrollWrapperEl.value;
13243
+ if (!el) {
13244
+ canScrollLeft.value = false;
13245
+ canScrollRight.value = false;
13246
+ return;
13247
+ }
13248
+ canScrollLeft.value = el.scrollLeft > 1;
13249
+ canScrollRight.value = el.scrollLeft + el.clientWidth < el.scrollWidth - 1;
13250
+ }
13251
+ function scrollTabs(dir) {
13252
+ const el = scrollWrapperEl.value;
13253
+ if (!el) return;
13254
+ el.scrollBy({
13255
+ left: dir === "left" ? -200 : 200,
13256
+ behavior: "smooth"
13257
+ });
13258
+ setTimeout(updateScrollButtons, 150);
13259
+ setTimeout(updateScrollButtons, 350);
13260
+ }
13261
+ (0, vue.watch)(scrollWrapperEl, (el, oldEl) => {
13262
+ if (oldEl) oldEl.removeEventListener("scroll", updateScrollButtons);
13263
+ if (el) {
13264
+ el.addEventListener("scroll", updateScrollButtons, { passive: true });
13265
+ (0, vue.nextTick)(updateScrollButtons);
13266
+ }
13267
+ }, { immediate: true });
13268
+ (0, _vueuse_core.useResizeObserver)(scrollWrapperEl, () => (0, vue.nextTick)(updateScrollButtons));
13269
+ const containerEl = (0, vue.useTemplateRef)("containerEl");
13270
+ const moreBtnEl = (0, vue.useTemplateRef)("moreBtnEl");
13271
+ const dropdownEl = (0, vue.useTemplateRef)("dropdownEl");
13272
+ const hiddenTabs = (0, vue.ref)([]);
13273
+ const dropdownOpen = (0, vue.ref)(false);
13274
+ const hasOverflow = (0, vue.computed)(() => hiddenTabs.value.length > 0);
13275
+ let moreBtnNaturalWidth = 48;
13276
+ (0, _vueuse_core.onClickOutside)(dropdownEl, () => {
13277
+ dropdownOpen.value = false;
13278
+ });
13279
+ function computeOverflow() {
13280
+ if (!containerEl.value) return;
13281
+ const allTabs = Array.from(containerEl.value.querySelectorAll("[data-tab-value]"));
13282
+ allTabs.forEach((t) => t.removeAttribute("data-overflow-hidden"));
13283
+ const listEl = containerEl.value.querySelector("[role=\"tablist\"]");
13284
+ if (listEl) {
13285
+ listEl.style.overflow = "visible";
13286
+ allTabs.forEach((t) => {
13287
+ t.style.flexShrink = "0";
13288
+ t.style.width = "auto";
13289
+ });
13290
+ listEl.offsetWidth;
13291
+ }
13292
+ const containerWidth = containerEl.value.clientWidth;
13293
+ const tabWidths = allTabs.map((t) => t.offsetWidth);
13294
+ const totalWidth = tabWidths.reduce((sum, w) => sum + w, 0);
13295
+ if (listEl) {
13296
+ listEl.style.overflow = "";
13297
+ allTabs.forEach((t) => {
13298
+ t.style.flexShrink = "";
13299
+ t.style.width = "";
13300
+ });
13301
+ }
13302
+ if (totalWidth <= containerWidth) {
13303
+ hiddenTabs.value = [];
13304
+ return;
13305
+ }
13306
+ const available = containerWidth - moreBtnNaturalWidth;
13307
+ let accumulated = 0;
13308
+ const newHidden = [];
13309
+ const visibleEls = [];
13310
+ for (let i = 0; i < allTabs.length; i++) {
13311
+ const tab = allTabs[i];
13312
+ const w = tabWidths[i];
13313
+ if (accumulated + w <= available) {
13314
+ accumulated += w;
13315
+ visibleEls.push(tab);
13316
+ } else {
13317
+ newHidden.push({
13318
+ value: tab.getAttribute("data-tab-value") ?? "",
13319
+ label: tab.textContent?.trim() ?? "",
13320
+ disabled: tab.hasAttribute("data-disabled") || tab.getAttribute("aria-disabled") === "true"
13321
+ });
13322
+ tab.setAttribute("data-overflow-hidden", "");
13323
+ }
13324
+ }
13325
+ const activeValue = ctx.currentValue.value;
13326
+ if (activeValue) {
13327
+ const hiddenActiveIdx = newHidden.findIndex((t) => t.value === activeValue);
13328
+ if (hiddenActiveIdx !== -1 && visibleEls.length > 0) {
13329
+ const displacedEl = visibleEls[visibleEls.length - 1];
13330
+ const activeEl = allTabs.find((t) => t.getAttribute("data-tab-value") === activeValue);
13331
+ if (displacedEl && activeEl) {
13332
+ displacedEl.setAttribute("data-overflow-hidden", "");
13333
+ activeEl.removeAttribute("data-overflow-hidden");
13334
+ const displaced = {
13335
+ value: displacedEl.getAttribute("data-tab-value") ?? "",
13336
+ label: displacedEl.textContent?.trim() ?? "",
13337
+ disabled: displacedEl.hasAttribute("data-disabled") || displacedEl.getAttribute("aria-disabled") === "true"
13338
+ };
13339
+ newHidden.splice(hiddenActiveIdx, 1);
13340
+ newHidden.unshift(displaced);
13341
+ }
13342
+ }
13343
+ }
13344
+ hiddenTabs.value = newHidden;
13345
+ }
13346
+ (0, _vueuse_core.useResizeObserver)(containerEl, () => (0, vue.nextTick)(computeOverflow));
13347
+ (0, vue.onMounted)(() => {
13348
+ const btnEl = moreBtnEl.value?.$el;
13349
+ if (btnEl) {
13350
+ btnEl.style.display = "flex";
13351
+ btnEl.offsetWidth;
13352
+ moreBtnNaturalWidth = btnEl.offsetWidth;
13353
+ btnEl.style.display = "";
13354
+ }
13355
+ (0, vue.nextTick)(computeOverflow);
13356
+ });
13357
+ (0, vue.watch)(() => ctx.currentValue.value, () => {
13358
+ if (props.overflow === "dropdown") (0, vue.nextTick)(computeOverflow);
13359
+ });
13360
+ (0, vue.watch)(hasOverflow, () => {
13361
+ if (props.overflow === "dropdown") (0, vue.nextTick)(computeOverflow);
13362
+ });
13363
+ function selectOverflowTab(value) {
13364
+ ctx.changeTab(value);
13365
+ dropdownOpen.value = false;
13366
+ }
13222
13367
  return (_ctx, _cache) => {
13223
- return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.TabsList), {
13368
+ return !props.overflow ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.TabsList), {
13369
+ key: 0,
13224
13370
  loop: props.loop ?? true,
13225
13371
  class: (0, vue.normalizeClass)((0, vue.unref)(composeClassName)((0, vue.unref)(ctx).slotFns.value.tabList(), props.class))
13226
13372
  }, {
13227
13373
  default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
13228
13374
  _: 3
13229
- }, 8, ["loop", "class"]);
13375
+ }, 8, ["loop", "class"])) : props.overflow === "arrows" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
13376
+ key: 1,
13377
+ class: (0, vue.normalizeClass)(["tabs__list-container tabs__list-container--arrows", {
13378
+ "has-left": canScrollLeft.value,
13379
+ "has-right": canScrollRight.value
13380
+ }])
13381
+ }, [
13382
+ (0, vue.createVNode)(Button_default, {
13383
+ variant: "secondary",
13384
+ size: "sm",
13385
+ radius: "full",
13386
+ "is-icon-only": true,
13387
+ class: (0, vue.normalizeClass)((0, vue.unref)(composeClassName)("tabs__arrow tabs__arrow--left", canScrollLeft.value && "is-visible")),
13388
+ "aria-label": "Scroll tabs left",
13389
+ tabindex: "-1",
13390
+ onClick: _cache[0] || (_cache[0] = ($event) => scrollTabs("left"))
13391
+ }, {
13392
+ default: (0, vue.withCtx)(() => [..._cache[3] || (_cache[3] = [(0, vue.createElementVNode)("svg", {
13393
+ width: "14",
13394
+ height: "14",
13395
+ viewBox: "0 0 14 14",
13396
+ fill: "none",
13397
+ "aria-hidden": "true"
13398
+ }, [(0, vue.createElementVNode)("path", {
13399
+ d: "M9 11L5 7L9 3",
13400
+ stroke: "currentColor",
13401
+ "stroke-width": "1.75",
13402
+ "stroke-linecap": "round",
13403
+ "stroke-linejoin": "round"
13404
+ })], -1)])]),
13405
+ _: 1
13406
+ }, 8, ["class"]),
13407
+ (0, vue.createElementVNode)("div", {
13408
+ ref_key: "scrollWrapperEl",
13409
+ ref: scrollWrapperEl,
13410
+ class: "tabs__scroll-wrapper"
13411
+ }, [(0, vue.createVNode)((0, vue.unref)(reka_ui.TabsList), {
13412
+ loop: props.loop ?? true,
13413
+ class: (0, vue.normalizeClass)((0, vue.unref)(composeClassName)((0, vue.unref)(ctx).slotFns.value.tabList(), "tabs__list--scroll", props.class))
13414
+ }, {
13415
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
13416
+ _: 3
13417
+ }, 8, ["loop", "class"])], 512),
13418
+ (0, vue.createVNode)(Button_default, {
13419
+ variant: "secondary",
13420
+ size: "sm",
13421
+ radius: "full",
13422
+ "is-icon-only": true,
13423
+ class: (0, vue.normalizeClass)((0, vue.unref)(composeClassName)("tabs__arrow tabs__arrow--right", canScrollRight.value && "is-visible")),
13424
+ "aria-label": "Scroll tabs right",
13425
+ tabindex: "-1",
13426
+ onClick: _cache[1] || (_cache[1] = ($event) => scrollTabs("right"))
13427
+ }, {
13428
+ default: (0, vue.withCtx)(() => [..._cache[4] || (_cache[4] = [(0, vue.createElementVNode)("svg", {
13429
+ width: "14",
13430
+ height: "14",
13431
+ viewBox: "0 0 14 14",
13432
+ fill: "none",
13433
+ "aria-hidden": "true"
13434
+ }, [(0, vue.createElementVNode)("path", {
13435
+ d: "M5 3L9 7L5 11",
13436
+ stroke: "currentColor",
13437
+ "stroke-width": "1.75",
13438
+ "stroke-linecap": "round",
13439
+ "stroke-linejoin": "round"
13440
+ })], -1)])]),
13441
+ _: 1
13442
+ }, 8, ["class"])
13443
+ ], 2)) : props.overflow === "dropdown" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
13444
+ key: 2,
13445
+ ref_key: "containerEl",
13446
+ ref: containerEl,
13447
+ class: "tabs__list-container tabs__list-container--dropdown"
13448
+ }, [(0, vue.createVNode)((0, vue.unref)(reka_ui.TabsList), {
13449
+ loop: props.loop ?? true,
13450
+ class: (0, vue.normalizeClass)((0, vue.unref)(composeClassName)((0, vue.unref)(ctx).slotFns.value.tabList(), "tabs__list--clipped", props.class))
13451
+ }, {
13452
+ default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
13453
+ _: 3
13454
+ }, 8, ["loop", "class"]), (0, vue.createElementVNode)("div", {
13455
+ ref_key: "dropdownEl",
13456
+ ref: dropdownEl,
13457
+ class: (0, vue.normalizeClass)(["tabs__more", { "tabs__more--visible": hasOverflow.value }])
13458
+ }, [(0, vue.createVNode)(Button_default, {
13459
+ ref_key: "moreBtnEl",
13460
+ ref: moreBtnEl,
13461
+ variant: "secondary",
13462
+ size: "sm",
13463
+ radius: "full",
13464
+ class: "tabs__more-btn",
13465
+ "aria-expanded": dropdownOpen.value,
13466
+ "aria-haspopup": "menu",
13467
+ onClick: _cache[2] || (_cache[2] = ($event) => dropdownOpen.value = !dropdownOpen.value)
13468
+ }, {
13469
+ default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)(" +" + (0, vue.toDisplayString)(hiddenTabs.value.length) + " ", 1), _cache[5] || (_cache[5] = (0, vue.createElementVNode)("svg", {
13470
+ width: "12",
13471
+ height: "12",
13472
+ viewBox: "0 0 12 12",
13473
+ fill: "none",
13474
+ "aria-hidden": "true"
13475
+ }, [(0, vue.createElementVNode)("path", {
13476
+ d: "M2 4L6 8L10 4",
13477
+ stroke: "currentColor",
13478
+ "stroke-width": "1.5",
13479
+ "stroke-linecap": "round",
13480
+ "stroke-linejoin": "round"
13481
+ })], -1))]),
13482
+ _: 1
13483
+ }, 8, ["aria-expanded"]), dropdownOpen.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$40, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(hiddenTabs.value, (tab) => {
13484
+ return (0, vue.openBlock)(), (0, vue.createBlock)(Button_default, {
13485
+ key: tab.value,
13486
+ variant: "ghost",
13487
+ radius: "lg",
13488
+ class: "tabs__overflow-item",
13489
+ role: "menuitem",
13490
+ disabled: tab.disabled,
13491
+ onClick: ($event) => selectOverflowTab(tab.value)
13492
+ }, {
13493
+ default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)(tab.label), 1)]),
13494
+ _: 2
13495
+ }, 1032, ["disabled", "onClick"]);
13496
+ }), 128))])) : (0, vue.createCommentVNode)("", true)], 2)], 512)) : (0, vue.createCommentVNode)("", true);
13230
13497
  };
13231
13498
  }
13232
13499
  });
@@ -13246,6 +13513,7 @@ var Tab_default = /* @__PURE__ */ (0, vue.defineComponent)({
13246
13513
  return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.TabsTrigger), {
13247
13514
  value: props.value,
13248
13515
  disabled: props.disabled,
13516
+ "data-tab-value": props.value,
13249
13517
  class: (0, vue.normalizeClass)((0, vue.unref)(composeClassName)((0, vue.unref)(ctx).slotFns.value.tab(), props.class))
13250
13518
  }, {
13251
13519
  default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
@@ -13253,6 +13521,7 @@ var Tab_default = /* @__PURE__ */ (0, vue.defineComponent)({
13253
13521
  }, 8, [
13254
13522
  "value",
13255
13523
  "disabled",
13524
+ "data-tab-value",
13256
13525
  "class"
13257
13526
  ]);
13258
13527
  };