@1337exp/taoui 2.1.1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -16,17 +16,17 @@
16
16
  const value = getComputedStyle(el).getPropertyValue("--tao-size").trim();
17
17
  return sizes.includes(value) ? value : "medium";
18
18
  }
19
- const _hoisted_1$P = ["type", "disabled"];
20
- const _hoisted_2$I = {
19
+ const _hoisted_1$S = ["type", "disabled"];
20
+ const _hoisted_2$L = {
21
21
  key: 0,
22
22
  class: "tao-button__loader"
23
23
  };
24
- const _hoisted_3$z = {
24
+ const _hoisted_3$C = {
25
25
  key: 1,
26
26
  class: "tao-button__icon"
27
27
  };
28
- const _hoisted_4$u = { class: "tao-button__content" };
29
- const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
28
+ const _hoisted_4$w = { class: "tao-button__content" };
29
+ const _sfc_main$12 = /* @__PURE__ */ vue.defineComponent({
30
30
  ...{ name: "TaoButton" },
31
31
  __name: "TaoButton",
32
32
  props: {
@@ -65,12 +65,12 @@
65
65
  disabled: __props.disabled || __props.loading,
66
66
  onClick: handleClick
67
67
  }, [
68
- __props.loading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$I)) : vue.createCommentVNode("", true),
69
- __props.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$z, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true),
70
- vue.createElementVNode("span", _hoisted_4$u, [
68
+ __props.loading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$L)) : vue.createCommentVNode("", true),
69
+ __props.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$C, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true),
70
+ vue.createElementVNode("span", _hoisted_4$w, [
71
71
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
72
72
  ])
73
- ], 10, _hoisted_1$P);
73
+ ], 10, _hoisted_1$S);
74
74
  };
75
75
  }
76
76
  });
@@ -81,7 +81,7 @@
81
81
  }
82
82
  return target;
83
83
  };
84
- const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-eb25f649"]]);
84
+ const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-eb25f649"]]);
85
85
  function toCssLength(value) {
86
86
  if (value === void 0 || value === null || value === "") {
87
87
  return void 0;
@@ -94,7 +94,7 @@
94
94
  function surfaceClass(surface) {
95
95
  return surface && surface !== "flat" ? `tao-surface-${surface}` : void 0;
96
96
  }
97
- const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
97
+ const _sfc_main$11 = /* @__PURE__ */ vue.defineComponent({
98
98
  ...{ name: "TaoBlock" },
99
99
  __name: "TaoBlock",
100
100
  props: {
@@ -118,7 +118,7 @@
118
118
  };
119
119
  }
120
120
  });
121
- const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-3d9abbef"]]);
121
+ const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-3d9abbef"]]);
122
122
  const formFieldKey = Symbol("taoFormField");
123
123
  function isDev() {
124
124
  try {
@@ -158,21 +158,21 @@
158
158
  deprecationWarning(component, label, instead);
159
159
  }
160
160
  }
161
- const _hoisted_1$O = ["for"];
162
- const _hoisted_2$H = {
161
+ const _hoisted_1$R = ["for"];
162
+ const _hoisted_2$K = {
163
163
  key: 0,
164
164
  class: "tao-input__affix tao-input__affix--prefix"
165
165
  };
166
- const _hoisted_3$y = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
167
- const _hoisted_4$t = {
166
+ const _hoisted_3$B = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
167
+ const _hoisted_4$v = {
168
168
  key: 1,
169
169
  class: "tao-input__affix tao-input__affix--suffix"
170
170
  };
171
- const _hoisted_5$m = {
171
+ const _hoisted_5$o = {
172
172
  key: 1,
173
173
  class: "tao-input__error"
174
174
  };
175
- const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
175
+ const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
176
176
  ...{ name: "TaoInput" },
177
177
  __name: "TaoInput",
178
178
  props: {
@@ -220,7 +220,7 @@
220
220
  key: 0,
221
221
  class: "tao-input__label",
222
222
  for: controlId.value
223
- }, vue.toDisplayString(__props.label), 9, _hoisted_1$O)) : vue.createCommentVNode("", true),
223
+ }, vue.toDisplayString(__props.label), 9, _hoisted_1$R)) : vue.createCommentVNode("", true),
224
224
  vue.createElementVNode("div", {
225
225
  class: vue.normalizeClass(["tao-input-shell", {
226
226
  "tao-input-shell--focused": focused.value,
@@ -230,7 +230,7 @@
230
230
  "tao-input-shell--suffix": _ctx.$slots.suffix
231
231
  }])
232
232
  }, [
233
- _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$H, [
233
+ _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$K, [
234
234
  vue.renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
235
235
  ])) : vue.createCommentVNode("", true),
236
236
  vue.createElementVNode("input", {
@@ -245,27 +245,27 @@
245
245
  onInput: handleInput,
246
246
  onBlur: handleBlur,
247
247
  onFocus: handleFocus
248
- }, null, 42, _hoisted_3$y),
249
- _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$t, [
248
+ }, null, 42, _hoisted_3$B),
249
+ _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$v, [
250
250
  vue.renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
251
251
  ])) : vue.createCommentVNode("", true)
252
252
  ], 2),
253
- __props.error && __props.errorMessage ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$m, vue.toDisplayString(__props.errorMessage), 1)) : vue.createCommentVNode("", true)
253
+ __props.error && __props.errorMessage ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$o, vue.toDisplayString(__props.errorMessage), 1)) : vue.createCommentVNode("", true)
254
254
  ], 2);
255
255
  };
256
256
  }
257
257
  });
258
- const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-aca887be"]]);
259
- const _hoisted_1$N = {
258
+ const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["__scopeId", "data-v-aca887be"]]);
259
+ const _hoisted_1$Q = {
260
260
  key: 0,
261
261
  class: "tao-input-group__addon tao-input-group__addon--before"
262
262
  };
263
- const _hoisted_2$G = { class: "tao-input-group__field" };
264
- const _hoisted_3$x = {
263
+ const _hoisted_2$J = { class: "tao-input-group__field" };
264
+ const _hoisted_3$A = {
265
265
  key: 1,
266
266
  class: "tao-input-group__addon tao-input-group__addon--after"
267
267
  };
268
- const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
268
+ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent({
269
269
  ...{ name: "TaoInputGroup" },
270
270
  __name: "TaoInputGroup",
271
271
  props: {
@@ -290,20 +290,20 @@
290
290
  onFocusin: onFocusIn,
291
291
  onFocusout: onFocusOut
292
292
  }, [
293
- _ctx.$slots.before ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$N, [
293
+ _ctx.$slots.before ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Q, [
294
294
  vue.renderSlot(_ctx.$slots, "before", {}, void 0, true)
295
295
  ])) : vue.createCommentVNode("", true),
296
- vue.createElementVNode("div", _hoisted_2$G, [
296
+ vue.createElementVNode("div", _hoisted_2$J, [
297
297
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
298
298
  ]),
299
- _ctx.$slots.after ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$x, [
299
+ _ctx.$slots.after ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$A, [
300
300
  vue.renderSlot(_ctx.$slots, "after", {}, void 0, true)
301
301
  ])) : vue.createCommentVNode("", true)
302
302
  ], 34);
303
303
  };
304
304
  }
305
305
  });
306
- const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-55b2d297"]]);
306
+ const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-55b2d297"]]);
307
307
  const localeRu = {
308
308
  code: "ru-RU",
309
309
  alert: { closeLabel: "Закрыть" },
@@ -380,6 +380,17 @@
380
380
  },
381
381
  table: { emptyText: "Нет данных" },
382
382
  tag: { closeLabel: "Убрать" },
383
+ colorPicker: {
384
+ areaLabel: "Насыщенность и яркость",
385
+ hueLabel: "Оттенок",
386
+ alphaLabel: "Прозрачность",
387
+ hexLabel: "Цвет в hex",
388
+ modeLabel: "Способ ввода",
389
+ swatchesLabel: "Образцы",
390
+ eyedropperLabel: "Пипетка",
391
+ chooseLabel: "Выбрать цвет"
392
+ },
393
+ timeline: { playLabel: "Играть", pauseLabel: "Пауза", restartLabel: "В начало" },
383
394
  toast: { closeLabel: "Закрыть уведомление" }
384
395
  };
385
396
  const confirmDefaults = {
@@ -583,6 +594,17 @@
583
594
  },
584
595
  table: { emptyText: "No data" },
585
596
  tag: { closeLabel: "Remove" },
597
+ colorPicker: {
598
+ areaLabel: "Saturation and brightness",
599
+ hueLabel: "Hue",
600
+ alphaLabel: "Opacity",
601
+ hexLabel: "Color in hex",
602
+ modeLabel: "Input mode",
603
+ swatchesLabel: "Swatches",
604
+ eyedropperLabel: "Eyedropper",
605
+ chooseLabel: "Choose color"
606
+ },
607
+ timeline: { playLabel: "Play", pauseLabel: "Pause", restartLabel: "Restart" },
586
608
  toast: { closeLabel: "Close notification" }
587
609
  };
588
610
  const current = vue.shallowRef(localeRu);
@@ -625,16 +647,16 @@
625
647
  function formatText(template, values) {
626
648
  return template.replace(/\{(\w+)\}/g, (match, key) => key in values ? String(values[key]) : match);
627
649
  }
628
- const _hoisted_1$M = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
629
- const _hoisted_2$F = {
650
+ const _hoisted_1$P = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
651
+ const _hoisted_2$I = {
630
652
  key: 0,
631
653
  class: "tao-input-number__steppers"
632
654
  };
633
- const _hoisted_3$w = ["aria-label", "disabled"];
634
- const _hoisted_4$s = { "aria-hidden": "true" };
635
- const _hoisted_5$l = ["aria-label", "disabled"];
636
- const _hoisted_6$g = { "aria-hidden": "true" };
637
- const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
655
+ const _hoisted_3$z = ["aria-label", "disabled"];
656
+ const _hoisted_4$u = { "aria-hidden": "true" };
657
+ const _hoisted_5$n = ["aria-label", "disabled"];
658
+ const _hoisted_6$i = { "aria-hidden": "true" };
659
+ const _sfc_main$_ = /* @__PURE__ */ vue.defineComponent({
638
660
  ...{ name: "TaoInputNumber" },
639
661
  __name: "TaoInputNumber",
640
662
  props: {
@@ -663,36 +685,37 @@
663
685
  const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
664
686
  const focused = vue.ref(false);
665
687
  const draft = vue.ref(toDraft(props.modelValue));
688
+ let emitted;
666
689
  vue.watch(
667
690
  () => props.modelValue,
668
691
  (value) => {
669
- if (!focused.value) {
692
+ if (!focused.value || value !== emitted) {
670
693
  draft.value = toDraft(value);
671
694
  }
672
695
  }
673
696
  );
674
- function decimalsOf(value) {
697
+ function decimalsOf2(value) {
675
698
  const text = String(value);
676
699
  const dot = text.indexOf(".");
677
700
  return dot === -1 ? 0 : text.length - dot - 1;
678
701
  }
679
- function roundTo(value) {
680
- const digits = props.precision ?? decimalsOf(props.step);
702
+ function roundTo2(value) {
703
+ const digits = props.precision ?? decimalsOf2(props.step);
681
704
  if (digits <= 0) {
682
705
  return Math.round(value);
683
706
  }
684
707
  const factor = 10 ** digits;
685
708
  return Math.round(value * factor) / factor;
686
709
  }
687
- function clamp(value) {
688
- let next = roundTo(value);
710
+ function clamp2(value) {
711
+ let next = roundTo2(value);
689
712
  if (props.min !== void 0 && next < props.min) {
690
713
  next = props.min;
691
714
  }
692
715
  if (props.max !== void 0 && next > props.max) {
693
716
  next = props.max;
694
717
  }
695
- return roundTo(next);
718
+ return roundTo2(next);
696
719
  }
697
720
  function toDraft(value) {
698
721
  if (value === null || value === void 0 || Number.isNaN(value)) {
@@ -718,7 +741,8 @@
718
741
  return /^-?\d*([.,]\d*)?$/.test(text);
719
742
  }
720
743
  function commit(value) {
721
- const next = value === null ? null : clamp(value);
744
+ const next = value === null ? null : clamp2(value);
745
+ emitted = next;
722
746
  emit("update:modelValue", next);
723
747
  draft.value = toDraft(next);
724
748
  emit("commit", next);
@@ -738,7 +762,8 @@
738
762
  draft.value = text;
739
763
  const parsed = parseDraft(text);
740
764
  if (parsed !== "incomplete") {
741
- emit("update:modelValue", parsed === null ? null : clamp(parsed));
765
+ emitted = parsed === null ? null : clamp2(parsed);
766
+ emit("update:modelValue", emitted);
742
767
  }
743
768
  }
744
769
  function onFocus(event) {
@@ -792,8 +817,8 @@
792
817
  onFocus,
793
818
  onBlur,
794
819
  onKeydown
795
- }, null, 40, _hoisted_1$M),
796
- __props.controls ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$F, [
820
+ }, null, 40, _hoisted_1$P),
821
+ __props.controls ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$I, [
797
822
  vue.createElementVNode("button", {
798
823
  type: "button",
799
824
  class: "tao-input-number__step",
@@ -802,12 +827,12 @@
802
827
  disabled: __props.disabled || atMax.value,
803
828
  onClick: _cache[0] || (_cache[0] = ($event) => bump(1))
804
829
  }, [
805
- vue.createElementVNode("span", _hoisted_4$s, [
830
+ vue.createElementVNode("span", _hoisted_4$u, [
806
831
  vue.renderSlot(_ctx.$slots, "increment-icon", {}, () => [
807
832
  _cache[2] || (_cache[2] = vue.createTextVNode("+", -1))
808
833
  ], true)
809
834
  ])
810
- ], 8, _hoisted_3$w),
835
+ ], 8, _hoisted_3$z),
811
836
  vue.createElementVNode("button", {
812
837
  type: "button",
813
838
  class: "tao-input-number__step",
@@ -816,24 +841,24 @@
816
841
  disabled: __props.disabled || atMin.value,
817
842
  onClick: _cache[1] || (_cache[1] = ($event) => bump(-1))
818
843
  }, [
819
- vue.createElementVNode("span", _hoisted_6$g, [
844
+ vue.createElementVNode("span", _hoisted_6$i, [
820
845
  vue.renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
821
846
  _cache[3] || (_cache[3] = vue.createTextVNode("−", -1))
822
847
  ], true)
823
848
  ])
824
- ], 8, _hoisted_5$l)
849
+ ], 8, _hoisted_5$n)
825
850
  ])) : vue.createCommentVNode("", true)
826
851
  ], 2);
827
852
  };
828
853
  }
829
854
  });
830
- const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-52c1f25a"]]);
831
- const _hoisted_1$L = ["aria-label", "disabled"];
832
- const _hoisted_2$E = { "aria-hidden": "true" };
833
- const _hoisted_3$v = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
834
- const _hoisted_4$r = ["aria-label", "disabled"];
835
- const _hoisted_5$k = { "aria-hidden": "true" };
836
- const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
855
+ const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-0594919d"]]);
856
+ const _hoisted_1$O = ["aria-label", "disabled"];
857
+ const _hoisted_2$H = { "aria-hidden": "true" };
858
+ const _hoisted_3$y = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
859
+ const _hoisted_4$t = ["aria-label", "disabled"];
860
+ const _hoisted_5$m = { "aria-hidden": "true" };
861
+ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
837
862
  ...{ name: "TaoQuantity" },
838
863
  __name: "TaoQuantity",
839
864
  props: {
@@ -976,12 +1001,12 @@
976
1001
  disabled: minusDisabled.value,
977
1002
  onClick: onDec
978
1003
  }, [
979
- vue.createElementVNode("span", _hoisted_2$E, [
1004
+ vue.createElementVNode("span", _hoisted_2$H, [
980
1005
  vue.renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
981
1006
  _cache[0] || (_cache[0] = vue.createTextVNode("−", -1))
982
1007
  ], true)
983
1008
  ])
984
- ], 8, _hoisted_1$L),
1009
+ ], 8, _hoisted_1$O),
985
1010
  vue.createElementVNode("input", {
986
1011
  id: controlId.value,
987
1012
  class: "tao-quantity__input",
@@ -1001,7 +1026,7 @@
1001
1026
  onFocus,
1002
1027
  onBlur,
1003
1028
  onKeydown
1004
- }, null, 40, _hoisted_3$v),
1029
+ }, null, 40, _hoisted_3$y),
1005
1030
  vue.createElementVNode("button", {
1006
1031
  type: "button",
1007
1032
  class: "tao-quantity__btn tao-quantity__btn--inc",
@@ -1009,43 +1034,43 @@
1009
1034
  disabled: plusDisabled.value,
1010
1035
  onClick: onInc
1011
1036
  }, [
1012
- vue.createElementVNode("span", _hoisted_5$k, [
1037
+ vue.createElementVNode("span", _hoisted_5$m, [
1013
1038
  vue.renderSlot(_ctx.$slots, "increment-icon", {}, () => [
1014
1039
  _cache[1] || (_cache[1] = vue.createTextVNode("+", -1))
1015
1040
  ], true)
1016
1041
  ])
1017
- ], 8, _hoisted_4$r)
1042
+ ], 8, _hoisted_4$t)
1018
1043
  ], 2);
1019
1044
  };
1020
1045
  }
1021
1046
  });
1022
- const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-e27165e3"]]);
1023
- const _hoisted_1$K = {
1047
+ const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-e27165e3"]]);
1048
+ const _hoisted_1$N = {
1024
1049
  key: 0,
1025
1050
  class: "tao-card__cover"
1026
1051
  };
1027
- const _hoisted_2$D = {
1052
+ const _hoisted_2$G = {
1028
1053
  key: 0,
1029
1054
  class: "tao-card__overlay"
1030
1055
  };
1031
- const _hoisted_3$u = {
1056
+ const _hoisted_3$x = {
1032
1057
  key: 1,
1033
1058
  class: "tao-card__overlay"
1034
1059
  };
1035
- const _hoisted_4$q = {
1060
+ const _hoisted_4$s = {
1036
1061
  key: 0,
1037
1062
  class: "tao-card__header-title"
1038
1063
  };
1039
- const _hoisted_5$j = { key: 0 };
1040
- const _hoisted_6$f = {
1064
+ const _hoisted_5$l = { key: 0 };
1065
+ const _hoisted_6$h = {
1041
1066
  key: 2,
1042
1067
  class: "tao-card__title-block"
1043
1068
  };
1044
- const _hoisted_7$c = {
1069
+ const _hoisted_7$d = {
1045
1070
  key: 0,
1046
1071
  class: "tao-card__title"
1047
1072
  };
1048
- const _hoisted_8$b = {
1073
+ const _hoisted_8$c = {
1049
1074
  key: 1,
1050
1075
  class: "tao-card__sub"
1051
1076
  };
@@ -1057,7 +1082,7 @@
1057
1082
  key: 4,
1058
1083
  class: "tao-card__footer"
1059
1084
  };
1060
- const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
1085
+ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
1061
1086
  ...{ name: "TaoCard" },
1062
1087
  __name: "TaoCard",
1063
1088
  props: {
@@ -1099,12 +1124,12 @@
1099
1124
  }]]),
1100
1125
  style: vue.normalizeStyle(radiusStyle.value)
1101
1126
  }, [
1102
- _ctx.$slots.cover ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$K, [
1127
+ _ctx.$slots.cover ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$N, [
1103
1128
  vue.renderSlot(_ctx.$slots, "cover", {}, void 0, true),
1104
- _ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$D, [
1129
+ _ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$G, [
1105
1130
  vue.renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
1106
1131
  ])) : vue.createCommentVNode("", true)
1107
- ])) : _ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$u, [
1132
+ ])) : _ctx.$slots.overlay ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$x, [
1108
1133
  vue.renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
1109
1134
  ])) : vue.createCommentVNode("", true),
1110
1135
  hasContent.value ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -1112,7 +1137,7 @@
1112
1137
  class: "tao-card__content",
1113
1138
  style: vue.normalizeStyle(paddingStyle.value)
1114
1139
  }, [
1115
- _ctx.$slots.headerTitle ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_4$q, [
1140
+ _ctx.$slots.headerTitle ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_4$s, [
1116
1141
  vue.renderSlot(_ctx.$slots, "headerTitle", {}, void 0, true)
1117
1142
  ])) : vue.createCommentVNode("", true),
1118
1143
  _ctx.$slots.header || _ctx.$slots.headerSecondary ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -1122,15 +1147,15 @@
1122
1147
  vue.createElementVNode("span", null, [
1123
1148
  vue.renderSlot(_ctx.$slots, "header", {}, void 0, true)
1124
1149
  ]),
1125
- _ctx.$slots.headerSecondary ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$j, [
1150
+ _ctx.$slots.headerSecondary ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$l, [
1126
1151
  vue.renderSlot(_ctx.$slots, "headerSecondary", {}, void 0, true)
1127
1152
  ])) : vue.createCommentVNode("", true)
1128
1153
  ], 2)) : vue.createCommentVNode("", true),
1129
- _ctx.$slots.title || _ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$f, [
1130
- _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_7$c, [
1154
+ _ctx.$slots.title || _ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$h, [
1155
+ _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_7$d, [
1131
1156
  vue.renderSlot(_ctx.$slots, "title", {}, void 0, true)
1132
1157
  ])) : vue.createCommentVNode("", true),
1133
- _ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$b, [
1158
+ _ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$c, [
1134
1159
  vue.renderSlot(_ctx.$slots, "sub", {}, void 0, true)
1135
1160
  ])) : vue.createCommentVNode("", true)
1136
1161
  ])) : vue.createCommentVNode("", true),
@@ -1145,7 +1170,7 @@
1145
1170
  };
1146
1171
  }
1147
1172
  });
1148
- const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-53c366d1"]]);
1173
+ const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-53c366d1"]]);
1149
1174
  const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
1150
1175
  function getFocusable(root) {
1151
1176
  return [...root.querySelectorAll(FOCUSABLE)].filter(
@@ -1199,21 +1224,21 @@
1199
1224
  previousOverflow = "";
1200
1225
  }
1201
1226
  }
1202
- const _hoisted_1$J = ["aria-labelledby"];
1203
- const _hoisted_2$C = {
1227
+ const _hoisted_1$M = ["aria-labelledby"];
1228
+ const _hoisted_2$F = {
1204
1229
  key: 0,
1205
1230
  class: "tao-modal__header"
1206
1231
  };
1207
- const _hoisted_3$t = ["id"];
1208
- const _hoisted_4$p = { key: 1 };
1209
- const _hoisted_5$i = ["aria-label"];
1210
- const _hoisted_6$e = { "aria-hidden": "true" };
1211
- const _hoisted_7$b = { class: "tao-modal__content" };
1212
- const _hoisted_8$a = {
1232
+ const _hoisted_3$w = ["id"];
1233
+ const _hoisted_4$r = { key: 1 };
1234
+ const _hoisted_5$k = ["aria-label"];
1235
+ const _hoisted_6$g = { "aria-hidden": "true" };
1236
+ const _hoisted_7$c = { class: "tao-modal__content" };
1237
+ const _hoisted_8$b = {
1213
1238
  key: 1,
1214
1239
  class: "tao-modal__footer"
1215
1240
  };
1216
- const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
1241
+ const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
1217
1242
  ...{ name: "TaoModal" },
1218
1243
  __name: "TaoModal",
1219
1244
  props: {
@@ -1330,13 +1355,13 @@
1330
1355
  "aria-labelledby": __props.title ? vue.unref(titleId) : void 0,
1331
1356
  tabindex: "-1"
1332
1357
  }, [
1333
- __props.title || _ctx.$slots.header || __props.closable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$C, [
1358
+ __props.title || _ctx.$slots.header || __props.closable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$F, [
1334
1359
  vue.renderSlot(_ctx.$slots, "header", {}, () => [
1335
1360
  __props.title ? (vue.openBlock(), vue.createElementBlock("h2", {
1336
1361
  key: 0,
1337
1362
  id: vue.unref(titleId),
1338
1363
  class: "tao-modal__title"
1339
- }, vue.toDisplayString(__props.title), 9, _hoisted_3$t)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$p))
1364
+ }, vue.toDisplayString(__props.title), 9, _hoisted_3$w)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$r))
1340
1365
  ], true),
1341
1366
  __props.closable ? (vue.openBlock(), vue.createElementBlock("button", {
1342
1367
  key: 0,
@@ -1345,20 +1370,20 @@
1345
1370
  "aria-label": vue.unref(l10n).closeLabel,
1346
1371
  onClick: close
1347
1372
  }, [
1348
- vue.createElementVNode("span", _hoisted_6$e, [
1373
+ vue.createElementVNode("span", _hoisted_6$g, [
1349
1374
  vue.renderSlot(_ctx.$slots, "close-icon", {}, () => [
1350
1375
  _cache[0] || (_cache[0] = vue.createTextVNode("×", -1))
1351
1376
  ], true)
1352
1377
  ])
1353
- ], 8, _hoisted_5$i)) : vue.createCommentVNode("", true)
1378
+ ], 8, _hoisted_5$k)) : vue.createCommentVNode("", true)
1354
1379
  ])) : vue.createCommentVNode("", true),
1355
- vue.createElementVNode("div", _hoisted_7$b, [
1380
+ vue.createElementVNode("div", _hoisted_7$c, [
1356
1381
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1357
1382
  ]),
1358
- _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$a, [
1383
+ _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$b, [
1359
1384
  vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
1360
1385
  ])) : vue.createCommentVNode("", true)
1361
- ], 8, _hoisted_1$J)
1386
+ ], 8, _hoisted_1$M)
1362
1387
  ], 32)) : vue.createCommentVNode("", true)
1363
1388
  ]),
1364
1389
  _: 3
@@ -1367,13 +1392,13 @@
1367
1392
  };
1368
1393
  }
1369
1394
  });
1370
- const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-742274be"]]);
1395
+ const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-742274be"]]);
1371
1396
  function tabValue(tab) {
1372
1397
  return tab.value ?? tab.key;
1373
1398
  }
1374
- const _hoisted_1$I = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
1375
- const _hoisted_2$B = ["id", "aria-labelledby"];
1376
- const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
1399
+ const _hoisted_1$L = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
1400
+ const _hoisted_2$E = ["id", "aria-labelledby"];
1401
+ const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
1377
1402
  ...{ name: "TaoTabs" },
1378
1403
  __name: "TaoTabs",
1379
1404
  props: {
@@ -1478,7 +1503,7 @@
1478
1503
  }, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1479
1504
  vue.createTextVNode(vue.toDisplayString(tab.label), 1)
1480
1505
  ], 64))
1481
- ], 8, _hoisted_1$I);
1506
+ ], 8, _hoisted_1$L);
1482
1507
  }), 128))
1483
1508
  ], 36),
1484
1509
  vue.createElementVNode("div", {
@@ -1488,12 +1513,12 @@
1488
1513
  "aria-labelledby": tabId(__props.modelValue)
1489
1514
  }, [
1490
1515
  vue.renderSlot(_ctx.$slots, "default", { activeTab: __props.modelValue }, void 0, true)
1491
- ], 8, _hoisted_2$B)
1516
+ ], 8, _hoisted_2$E)
1492
1517
  ], 2);
1493
1518
  };
1494
1519
  }
1495
1520
  });
1496
- const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-a9238d96"]]);
1521
+ const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-a9238d96"]]);
1497
1522
  function listenFocusLoss(onLoss) {
1498
1523
  function onVisibilityChange() {
1499
1524
  if (document.hidden) {
@@ -1509,7 +1534,536 @@
1509
1534
  window.removeEventListener("pagehide", onLoss);
1510
1535
  };
1511
1536
  }
1512
- const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
1537
+ const clamp$1 = (v, min, max) => Math.min(Math.max(v, min), max);
1538
+ function decimalsOf(step) {
1539
+ if (!Number.isFinite(step) || step <= 0) return 0;
1540
+ const s = String(step);
1541
+ if (s.includes("e-")) return Number(s.split("e-")[1]);
1542
+ return s.includes(".") ? s.split(".")[1].length : 0;
1543
+ }
1544
+ const roundTo = (v, decimals) => {
1545
+ const k = Math.pow(10, decimals);
1546
+ return Math.round(v * k) / k + 0;
1547
+ };
1548
+ function ratioOf(value, min, max) {
1549
+ return max > min ? clamp$1((value - min) / (max - min), 0, 1) : 0;
1550
+ }
1551
+ function valueAt(ratio, min, max, step) {
1552
+ const raw = min + clamp$1(ratio, 0, 1) * (max - min);
1553
+ if (!(step > 0)) return clamp$1(raw, min, max);
1554
+ const snapped = min + Math.round((raw - min) / step) * step;
1555
+ return clamp$1(roundTo(snapped, Math.max(decimalsOf(step), decimalsOf(min))), min, max);
1556
+ }
1557
+ function nearestMark(value, marks) {
1558
+ let best = value;
1559
+ let bestDistance = Infinity;
1560
+ for (const m of marks) {
1561
+ const d = Math.abs(m - value);
1562
+ if (d < bestDistance || d === bestDistance && m < best) {
1563
+ best = m;
1564
+ bestDistance = d;
1565
+ }
1566
+ }
1567
+ return best;
1568
+ }
1569
+ function stepMark(value, marks, dir) {
1570
+ const sorted = [...marks].sort((a, b) => a - b);
1571
+ const next = dir > 0 ? sorted.find((m) => m > value) : [...sorted].reverse().find((m) => m < value);
1572
+ return next ?? value;
1573
+ }
1574
+ function nearestThumb(values, target, last = 0) {
1575
+ if (values.length < 2) return 0;
1576
+ const d0 = Math.abs(values[0] - target);
1577
+ const d1 = Math.abs(values[1] - target);
1578
+ if (d0 !== d1) return d0 < d1 ? 0 : 1;
1579
+ if (target > values[0]) return 1;
1580
+ if (target < values[0]) return 0;
1581
+ return last === 1 ? 1 : 0;
1582
+ }
1583
+ function moveThumb(values, index, next, min, max, gap = 0) {
1584
+ const [a, b] = values;
1585
+ return index === 0 ? [clamp$1(next, min, Math.max(min, b - gap)), b] : [a, clamp$1(next, Math.min(max, a + gap), max)];
1586
+ }
1587
+ function normalizeValue(value, min, max) {
1588
+ const list = Array.isArray(value) ? [value[0], value[1]] : [value];
1589
+ const clamped = list.map((v) => clamp$1(Number.isFinite(v) ? v : min, min, max));
1590
+ return clamped.length === 2 ? clamped.sort((x, y) => x - y) : clamped;
1591
+ }
1592
+ function niceStep(span, count) {
1593
+ if (!(span > 0)) return 1;
1594
+ const raw = span / Math.max(1, count);
1595
+ const pow = Math.pow(10, Math.floor(Math.log10(raw)));
1596
+ const f = raw / pow;
1597
+ return (f < 1.5 ? 1 : f < 3.5 ? 2 : f < 7.5 ? 5 : 10) * pow;
1598
+ }
1599
+ function niceTicks(min, max, count = 5) {
1600
+ if (!(max > min)) return [min];
1601
+ const step = niceStep(max - min, count);
1602
+ const decimals = decimalsOf(step);
1603
+ const out = [];
1604
+ for (let i = Math.ceil(min / step - 1e-9); i * step <= max + step * 1e-9; i++) out.push(roundTo(i * step, decimals));
1605
+ return out;
1606
+ }
1607
+ function normalizeMarks(marks, min, max, format = String) {
1608
+ if (!marks) return [];
1609
+ const list = marks === true ? niceTicks(min, max).map((value) => ({ value })) : marks.map((m) => typeof m === "number" ? { value: m } : m);
1610
+ return list.filter((m) => m.value >= min && m.value <= max).map((m) => m.label === void 0 ? { ...m, label: format(m.value) } : m).sort((a, b) => a.value - b.value);
1611
+ }
1612
+ function isMarkActive(markValue, values) {
1613
+ return values.length === 2 ? markValue >= values[0] && markValue <= values[1] : markValue <= (values[0] ?? 0);
1614
+ }
1615
+ const _hoisted_1$K = ["aria-disabled"];
1616
+ const _hoisted_2$D = ["id", "tabindex", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-label", "aria-orientation", "aria-disabled", "aria-invalid", "aria-describedby", "onKeydown"];
1617
+ const _hoisted_3$v = {
1618
+ key: 0,
1619
+ class: "tao-slider__value"
1620
+ };
1621
+ const _hoisted_4$q = {
1622
+ key: 0,
1623
+ class: "tao-slider__marks"
1624
+ };
1625
+ const _hoisted_5$j = ["disabled", "onClick"];
1626
+ const _hoisted_6$f = {
1627
+ key: 0,
1628
+ class: "tao-slider__mark-label"
1629
+ };
1630
+ const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
1631
+ ...{ name: "TaoSliderBase" },
1632
+ __name: "TaoSliderBase",
1633
+ props: {
1634
+ min: { default: 0 },
1635
+ max: { default: 100 },
1636
+ step: { default: 1 },
1637
+ minGap: { default: 0 },
1638
+ showValue: { type: Boolean, default: false },
1639
+ marks: { type: [Boolean, Array] },
1640
+ marksSide: { default: "end" },
1641
+ discrete: { type: Boolean, default: false },
1642
+ format: {},
1643
+ flat: { type: Boolean, default: false },
1644
+ vertical: { type: Boolean, default: false },
1645
+ disabled: { type: Boolean, default: false },
1646
+ error: { type: Boolean, default: false },
1647
+ variant: { default: "bar" },
1648
+ size: {},
1649
+ ariaLabel: {},
1650
+ wheel: { default: 0 },
1651
+ modelValue: {}
1652
+ },
1653
+ emits: ["update:modelValue", "change"],
1654
+ setup(__props, { emit: __emit }) {
1655
+ const props = __props;
1656
+ const emit = __emit;
1657
+ const field = vue.inject(formFieldKey, null);
1658
+ const localId = vue.useId();
1659
+ const controlId = vue.computed(() => (field == null ? void 0 : field.id) ?? localId);
1660
+ const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
1661
+ const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
1662
+ const isRange = vue.computed(() => Array.isArray(props.modelValue));
1663
+ const values = vue.computed(() => normalizeValue(props.modelValue, props.min, props.max));
1664
+ const text = (v) => props.format ? props.format(v) : String(v);
1665
+ const markList = vue.computed(() => normalizeMarks(props.marks, props.min, props.max, text));
1666
+ const markValues = vue.computed(() => markList.value.map((m) => m.value));
1667
+ const hasCaptions = vue.computed(() => markList.value.some((m) => m.label));
1668
+ const stepped = vue.computed(() => props.discrete && markValues.value.length > 0);
1669
+ const percent = (v) => ratioOf(v, props.min, props.max) * 100;
1670
+ const place = (v) => props.vertical ? { bottom: `${percent(v)}%` } : { left: `${percent(v)}%` };
1671
+ const fillStyle = vue.computed(() => {
1672
+ const from = isRange.value ? percent(values.value[0]) : 0;
1673
+ const to = percent(values.value[isRange.value ? 1 : 0]);
1674
+ return props.vertical ? { bottom: `${from}%`, height: `${to - from}%` } : { left: `${from}%`, width: `${to - from}%` };
1675
+ });
1676
+ const barText = vue.computed(() => values.value.map(text).join(" – "));
1677
+ function write(next, final = false) {
1678
+ const before = values.value;
1679
+ const value = isRange.value ? [next[0], next[1]] : next[0];
1680
+ const changed = next.some((v, i) => v !== before[i]);
1681
+ emit("update:modelValue", value);
1682
+ if (final && changed) emit("change", value);
1683
+ }
1684
+ function setThumb(index, target, final = false) {
1685
+ if (isRange.value) {
1686
+ write(moveThumb(values.value, index, target, props.min, props.max, props.minGap), final);
1687
+ } else {
1688
+ write([Math.min(Math.max(target, props.min), props.max)], final);
1689
+ }
1690
+ }
1691
+ function valueUnder(event) {
1692
+ const el = railRef.value;
1693
+ if (!el) return props.min;
1694
+ const rect = el.getBoundingClientRect();
1695
+ const ratio = props.vertical ? rect.height ? 1 - (event.clientY - rect.top) / rect.height : 0 : rect.width ? (event.clientX - rect.left) / rect.width : 0;
1696
+ const raw = valueAt(ratio, props.min, props.max, stepped.value ? 0 : props.step);
1697
+ return stepped.value ? nearestMark(raw, markValues.value) : raw;
1698
+ }
1699
+ const railRef = vue.ref(null);
1700
+ const isDragging = vue.ref(false);
1701
+ const activeThumb = vue.ref(0);
1702
+ const pointerFocus = vue.ref(false);
1703
+ let dragPointer = -1;
1704
+ let dragStart = [];
1705
+ let tieAt = null;
1706
+ function releaseDragCapture() {
1707
+ const el = railRef.value;
1708
+ const id = dragPointer;
1709
+ if (!el || id === -1) return;
1710
+ if (typeof el.hasPointerCapture === "function" && !el.hasPointerCapture(id)) return;
1711
+ try {
1712
+ el.releasePointerCapture(id);
1713
+ } catch {
1714
+ }
1715
+ }
1716
+ function endDrag() {
1717
+ if (!isDragging.value) return;
1718
+ isDragging.value = false;
1719
+ releaseDragCapture();
1720
+ dragPointer = -1;
1721
+ tieAt = null;
1722
+ if (values.value.some((v, i) => v !== dragStart[i])) {
1723
+ emit("change", isRange.value ? [values.value[0], values.value[1]] : values.value[0]);
1724
+ }
1725
+ }
1726
+ function onPointerDown(event) {
1727
+ var _a;
1728
+ if (props.disabled || event.button !== 0 || !railRef.value) return;
1729
+ const target = valueUnder(event);
1730
+ dragPointer = event.pointerId;
1731
+ dragStart = [...values.value];
1732
+ isDragging.value = true;
1733
+ activeThumb.value = nearestThumb(values.value, target, activeThumb.value);
1734
+ tieAt = isRange.value && values.value[0] === values.value[1] && target === values.value[0] ? target : null;
1735
+ pointerFocus.value = true;
1736
+ (_a = railRef.value.querySelectorAll(".tao-slider__thumb")[activeThumb.value]) == null ? void 0 : _a.focus({ preventScroll: true });
1737
+ setThumb(activeThumb.value, target);
1738
+ event.preventDefault();
1739
+ try {
1740
+ railRef.value.setPointerCapture(event.pointerId);
1741
+ } catch {
1742
+ }
1743
+ }
1744
+ function onPointerMove(event) {
1745
+ if (!isDragging.value || event.pointerId !== dragPointer) return;
1746
+ const target = valueUnder(event);
1747
+ if (tieAt !== null) {
1748
+ if (target === tieAt) return;
1749
+ activeThumb.value = target > tieAt ? 1 : 0;
1750
+ tieAt = null;
1751
+ }
1752
+ setThumb(activeThumb.value, target);
1753
+ }
1754
+ function onPointerEnd(event) {
1755
+ if (!isDragging.value) return;
1756
+ if (dragPointer !== -1 && event.pointerId !== dragPointer) return;
1757
+ endDrag();
1758
+ }
1759
+ function onKeydown(event, index) {
1760
+ if (props.disabled) return;
1761
+ pointerFocus.value = false;
1762
+ activeThumb.value = index;
1763
+ const at = values.value[index];
1764
+ let next = null;
1765
+ const forward = event.key === "ArrowRight" || event.key === "ArrowUp";
1766
+ const backward = event.key === "ArrowLeft" || event.key === "ArrowDown";
1767
+ if (forward || backward) {
1768
+ const dir = forward ? 1 : -1;
1769
+ next = stepped.value ? stepMark(at, markValues.value, dir) : at + dir * props.step;
1770
+ } else if (event.key === "PageUp" || event.key === "PageDown") {
1771
+ const dir = event.key === "PageUp" ? 1 : -1;
1772
+ next = stepped.value ? stepMark(at, markValues.value, dir) : at + dir * props.step * 10;
1773
+ } else if (event.key === "Home") {
1774
+ next = props.min;
1775
+ } else if (event.key === "End") {
1776
+ next = props.max;
1777
+ }
1778
+ if (next === null) return;
1779
+ event.preventDefault();
1780
+ setThumb(index, stepped.value ? nearestMark(next, markValues.value) : valueAt(ratioOf(next, props.min, props.max), props.min, props.max, props.step), true);
1781
+ }
1782
+ function onWheel(event) {
1783
+ if (props.disabled || props.wheel <= 0 || isRange.value) return;
1784
+ event.preventDefault();
1785
+ setThumb(0, values.value[0] + (event.deltaY < 0 ? props.wheel : -props.wheel), true);
1786
+ }
1787
+ function onMarkClick(mark) {
1788
+ if (props.disabled) return;
1789
+ activeThumb.value = nearestThumb(values.value, mark.value, activeThumb.value);
1790
+ setThumb(activeThumb.value, mark.value, true);
1791
+ }
1792
+ let stopFocusLoss;
1793
+ vue.onMounted(() => {
1794
+ stopFocusLoss = listenFocusLoss(endDrag);
1795
+ });
1796
+ vue.onBeforeUnmount(() => {
1797
+ endDrag();
1798
+ stopFocusLoss == null ? void 0 : stopFocusLoss();
1799
+ });
1800
+ return (_ctx, _cache) => {
1801
+ return vue.openBlock(), vue.createElementBlock("div", {
1802
+ class: vue.normalizeClass(["tao-slider", [
1803
+ `tao-slider--${__props.variant}`,
1804
+ vue.unref(sizeClass)(__props.size),
1805
+ {
1806
+ "tao-slider--vertical": __props.vertical,
1807
+ "tao-slider--flat": __props.flat,
1808
+ "tao-slider--pointer-focus": pointerFocus.value,
1809
+ "tao-slider--collapsed": isRange.value && values.value[0] === values.value[1],
1810
+ "tao-slider--range": isRange.value,
1811
+ "tao-slider--has-marks": markList.value.length > 0,
1812
+ "tao-slider--marks-start": __props.marksSide === "start",
1813
+ "tao-slider--marks-bare": markList.value.length > 0 && !hasCaptions.value,
1814
+ "tao-slider--show-value": __props.showValue,
1815
+ "tao-slider--disabled": __props.disabled,
1816
+ "tao-slider--invalid": invalid.value
1817
+ }
1818
+ ]]),
1819
+ role: "group",
1820
+ "aria-disabled": __props.disabled || void 0,
1821
+ onWheel
1822
+ }, [
1823
+ vue.createElementVNode("div", {
1824
+ ref_key: "railRef",
1825
+ ref: railRef,
1826
+ class: "tao-slider__rail",
1827
+ onPointerdown: onPointerDown,
1828
+ onPointermove: onPointerMove,
1829
+ onPointerup: onPointerEnd,
1830
+ onPointercancel: onPointerEnd,
1831
+ onLostpointercapture: endDrag
1832
+ }, [
1833
+ _cache[1] || (_cache[1] = vue.createElementVNode("div", { class: "tao-slider__track" }, null, -1)),
1834
+ vue.createElementVNode("div", {
1835
+ class: "tao-slider__fill",
1836
+ style: vue.normalizeStyle(fillStyle.value)
1837
+ }, null, 4),
1838
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(values.value, (v, i) => {
1839
+ return vue.openBlock(), vue.createElementBlock("div", {
1840
+ id: i === 0 ? controlId.value : void 0,
1841
+ key: i,
1842
+ class: vue.normalizeClass(["tao-slider__thumb", { "tao-slider__thumb--active": isDragging.value && activeThumb.value === i }]),
1843
+ style: vue.normalizeStyle(place(v)),
1844
+ role: "slider",
1845
+ tabindex: __props.disabled ? -1 : 0,
1846
+ "aria-valuemin": __props.min,
1847
+ "aria-valuemax": __props.max,
1848
+ "aria-valuenow": v,
1849
+ "aria-valuetext": text(v),
1850
+ "aria-label": __props.ariaLabel,
1851
+ "aria-orientation": __props.vertical ? "vertical" : "horizontal",
1852
+ "aria-disabled": __props.disabled || void 0,
1853
+ "aria-invalid": invalid.value || void 0,
1854
+ "aria-describedby": describedBy.value,
1855
+ onKeydown: ($event) => onKeydown($event, i),
1856
+ onBlur: _cache[0] || (_cache[0] = ($event) => pointerFocus.value = false)
1857
+ }, null, 46, _hoisted_2$D);
1858
+ }), 128)),
1859
+ __props.showValue ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$v, [
1860
+ vue.renderSlot(_ctx.$slots, "pre-value", {}, void 0, true),
1861
+ vue.createTextVNode(vue.toDisplayString(barText.value), 1),
1862
+ vue.renderSlot(_ctx.$slots, "post-value", {}, void 0, true)
1863
+ ])) : vue.createCommentVNode("", true)
1864
+ ], 544),
1865
+ markList.value.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$q, [
1866
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(markList.value, (mark) => {
1867
+ return vue.openBlock(), vue.createElementBlock("button", {
1868
+ key: mark.value,
1869
+ type: "button",
1870
+ class: vue.normalizeClass(["tao-slider__mark", {
1871
+ "tao-slider__mark--active": vue.unref(isMarkActive)(mark.value, values.value),
1872
+ "tao-slider__mark--start": mark.value === __props.min,
1873
+ "tao-slider__mark--end": mark.value === __props.max && __props.max > __props.min
1874
+ }]),
1875
+ style: vue.normalizeStyle(place(mark.value)),
1876
+ disabled: __props.disabled,
1877
+ tabindex: "-1",
1878
+ onClick: ($event) => onMarkClick(mark)
1879
+ }, [
1880
+ _cache[2] || (_cache[2] = vue.createElementVNode("span", { class: "tao-slider__tick" }, null, -1)),
1881
+ mark.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$f, [
1882
+ vue.renderSlot(_ctx.$slots, "mark", {
1883
+ mark,
1884
+ active: vue.unref(isMarkActive)(mark.value, values.value)
1885
+ }, () => [
1886
+ vue.createTextVNode(vue.toDisplayString(mark.label), 1)
1887
+ ], true)
1888
+ ])) : vue.createCommentVNode("", true)
1889
+ ], 14, _hoisted_5$j);
1890
+ }), 128))
1891
+ ])) : vue.createCommentVNode("", true)
1892
+ ], 42, _hoisted_1$K);
1893
+ };
1894
+ }
1895
+ });
1896
+ const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-648d0bf1"]]);
1897
+ const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
1898
+ ...{ name: "TaoSlider" },
1899
+ __name: "TaoSlider",
1900
+ props: {
1901
+ min: {},
1902
+ max: {},
1903
+ step: {},
1904
+ minGap: {},
1905
+ showValue: { type: Boolean },
1906
+ marks: { type: [Boolean, Array] },
1907
+ marksSide: {},
1908
+ discrete: { type: Boolean },
1909
+ format: { type: Function },
1910
+ flat: { type: Boolean },
1911
+ vertical: { type: Boolean },
1912
+ disabled: { type: Boolean },
1913
+ error: { type: Boolean },
1914
+ variant: {},
1915
+ size: {},
1916
+ ariaLabel: {},
1917
+ wheel: {},
1918
+ modelValue: {}
1919
+ },
1920
+ emits: ["update:modelValue", "change"],
1921
+ setup(__props, { emit: __emit }) {
1922
+ const props = __props;
1923
+ const emit = __emit;
1924
+ return (_ctx, _cache) => {
1925
+ return vue.openBlock(), vue.createBlock(TaoSliderBase, vue.mergeProps(props, {
1926
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event)),
1927
+ onChange: _cache[1] || (_cache[1] = ($event) => emit("change", $event))
1928
+ }), vue.createSlots({ _: 2 }, [
1929
+ _ctx.$slots.mark ? {
1930
+ name: "mark",
1931
+ fn: vue.withCtx((slot) => [
1932
+ vue.renderSlot(_ctx.$slots, "mark", vue.normalizeProps(vue.guardReactiveProps(slot)))
1933
+ ]),
1934
+ key: "0"
1935
+ } : void 0,
1936
+ _ctx.$slots["pre-value"] ? {
1937
+ name: "pre-value",
1938
+ fn: vue.withCtx(() => [
1939
+ vue.renderSlot(_ctx.$slots, "pre-value")
1940
+ ]),
1941
+ key: "1"
1942
+ } : void 0,
1943
+ _ctx.$slots["post-value"] ? {
1944
+ name: "post-value",
1945
+ fn: vue.withCtx(() => [
1946
+ vue.renderSlot(_ctx.$slots, "post-value")
1947
+ ]),
1948
+ key: "2"
1949
+ } : void 0
1950
+ ]), 1040);
1951
+ };
1952
+ }
1953
+ });
1954
+ const _hoisted_1$J = { class: "tao-timeline__controls" };
1955
+ const _hoisted_2$C = { class: "tao-timeline__track" };
1956
+ const _hoisted_3$u = {
1957
+ key: 0,
1958
+ class: "tao-timeline__time"
1959
+ };
1960
+ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
1961
+ ...{ name: "TaoTimeline" },
1962
+ __name: "TaoTimeline",
1963
+ props: {
1964
+ modelValue: {},
1965
+ playing: { type: Boolean, default: false },
1966
+ length: {},
1967
+ step: { default: 0.01 },
1968
+ marks: {},
1969
+ marksSide: { default: "end" },
1970
+ format: {},
1971
+ pauseOnScrub: { type: Boolean, default: true },
1972
+ showRestart: { type: Boolean, default: true },
1973
+ showTime: { type: Boolean, default: true },
1974
+ variant: { default: "thin" },
1975
+ size: {},
1976
+ disabled: { type: Boolean, default: false },
1977
+ playLabel: {},
1978
+ pauseLabel: {},
1979
+ restartLabel: {}
1980
+ },
1981
+ emits: ["update:modelValue", "update:playing", "restart", "seek"],
1982
+ setup(__props, { emit: __emit }) {
1983
+ const props = __props;
1984
+ const emit = __emit;
1985
+ const l10n = useLocaleText(props, "timeline");
1986
+ const text = (t) => props.format ? props.format(t) : t.toFixed(2);
1987
+ const label = vue.computed(() => `${text(props.modelValue)} / ${text(props.length)}`);
1988
+ function onScrub(time) {
1989
+ emit("update:modelValue", time);
1990
+ if (props.pauseOnScrub && props.playing) emit("update:playing", false);
1991
+ }
1992
+ function onRestart() {
1993
+ emit("update:modelValue", 0);
1994
+ emit("restart");
1995
+ }
1996
+ return (_ctx, _cache) => {
1997
+ return vue.openBlock(), vue.createElementBlock("div", {
1998
+ class: vue.normalizeClass(["tao-timeline", [vue.unref(sizeClass)(__props.size), `tao-timeline--${__props.variant}`, { "tao-timeline--marks-start": __props.marksSide === "start", "tao-timeline--disabled": __props.disabled }]])
1999
+ }, [
2000
+ vue.createElementVNode("div", _hoisted_1$J, [
2001
+ vue.createVNode(TaoButton, {
2002
+ size: "small",
2003
+ variant: "secondary",
2004
+ disabled: __props.disabled,
2005
+ "aria-label": __props.playing ? vue.unref(l10n).pauseLabel : vue.unref(l10n).playLabel,
2006
+ "aria-pressed": __props.playing,
2007
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("update:playing", !__props.playing))
2008
+ }, {
2009
+ default: vue.withCtx(() => [
2010
+ vue.createTextVNode(vue.toDisplayString(__props.playing ? "❚❚" : "▶"), 1)
2011
+ ]),
2012
+ _: 1
2013
+ }, 8, ["disabled", "aria-label", "aria-pressed"]),
2014
+ __props.showRestart ? (vue.openBlock(), vue.createBlock(TaoButton, {
2015
+ key: 0,
2016
+ size: "small",
2017
+ variant: "ghost",
2018
+ disabled: __props.disabled,
2019
+ "aria-label": vue.unref(l10n).restartLabel,
2020
+ onClick: onRestart
2021
+ }, {
2022
+ default: vue.withCtx(() => [..._cache[2] || (_cache[2] = [
2023
+ vue.createTextVNode("⏮", -1)
2024
+ ])]),
2025
+ _: 1
2026
+ }, 8, ["disabled", "aria-label"])) : vue.createCommentVNode("", true)
2027
+ ]),
2028
+ vue.createElementVNode("div", _hoisted_2$C, [
2029
+ vue.createVNode(_sfc_main$U, {
2030
+ "model-value": __props.modelValue,
2031
+ min: 0,
2032
+ max: __props.length,
2033
+ step: __props.step,
2034
+ marks: __props.marks,
2035
+ "marks-side": __props.marksSide,
2036
+ format: text,
2037
+ variant: __props.variant,
2038
+ size: __props.size,
2039
+ disabled: __props.disabled,
2040
+ "onUpdate:modelValue": onScrub,
2041
+ onChange: _cache[1] || (_cache[1] = ($event) => emit("seek", $event))
2042
+ }, vue.createSlots({ _: 2 }, [
2043
+ _ctx.$slots.mark ? {
2044
+ name: "mark",
2045
+ fn: vue.withCtx((slot) => [
2046
+ vue.renderSlot(_ctx.$slots, "mark", vue.normalizeProps(vue.guardReactiveProps(slot)), void 0, true)
2047
+ ]),
2048
+ key: "0"
2049
+ } : void 0
2050
+ ]), 1032, ["model-value", "max", "step", "marks", "marks-side", "variant", "size", "disabled"])
2051
+ ]),
2052
+ __props.showTime ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$u, [
2053
+ vue.renderSlot(_ctx.$slots, "time", {
2054
+ time: __props.modelValue,
2055
+ length: __props.length,
2056
+ text: label.value
2057
+ }, () => [
2058
+ vue.createTextVNode(vue.toDisplayString(label.value), 1)
2059
+ ], true)
2060
+ ])) : vue.createCommentVNode("", true)
2061
+ ], 2);
2062
+ };
2063
+ }
2064
+ });
2065
+ const TaoTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-fb8f6331"]]);
2066
+ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
1513
2067
  ...{ name: "TaoTooltip" },
1514
2068
  __name: "TaoTooltip",
1515
2069
  props: {
@@ -1671,9 +2225,9 @@
1671
2225
  };
1672
2226
  }
1673
2227
  });
1674
- const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-09caf2f5"]]);
1675
- const _hoisted_1$H = { class: "tao-popover" };
1676
- const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
2228
+ const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-09caf2f5"]]);
2229
+ const _hoisted_1$I = { class: "tao-popover" };
2230
+ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
1677
2231
  ...{ name: "TaoPopover" },
1678
2232
  __name: "TaoPopover",
1679
2233
  props: {
@@ -1842,7 +2396,7 @@
1842
2396
  unbindDismiss();
1843
2397
  });
1844
2398
  return (_ctx, _cache) => {
1845
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$H, [
2399
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$I, [
1846
2400
  vue.createElementVNode("div", {
1847
2401
  ref_key: "triggerRef",
1848
2402
  ref: triggerRef,
@@ -1871,17 +2425,17 @@
1871
2425
  };
1872
2426
  }
1873
2427
  });
1874
- const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-3e488e1b"]]);
2428
+ const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-3e488e1b"]]);
1875
2429
  const spoilerGroupKey = Symbol("taoSpoilerGroup");
1876
- const _hoisted_1$G = { class: "tao-spoiler" };
1877
- const _hoisted_2$A = ["aria-expanded", "aria-controls"];
1878
- const _hoisted_3$s = {
2430
+ const _hoisted_1$H = { class: "tao-spoiler" };
2431
+ const _hoisted_2$B = ["aria-expanded", "aria-controls"];
2432
+ const _hoisted_3$t = {
1879
2433
  key: 0,
1880
2434
  class: "tao-spoiler__title"
1881
2435
  };
1882
- const _hoisted_4$o = ["id"];
1883
- const _hoisted_5$h = { class: "tao-spoiler__content-inner" };
1884
- const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
2436
+ const _hoisted_4$p = ["id"];
2437
+ const _hoisted_5$i = { class: "tao-spoiler__content-inner" };
2438
+ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
1885
2439
  ...{ name: "TaoSpoiler" },
1886
2440
  __name: "TaoSpoiler",
1887
2441
  props: {
@@ -1937,7 +2491,7 @@
1937
2491
  });
1938
2492
  }
1939
2493
  return (_ctx, _cache) => {
1940
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$G, [
2494
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$H, [
1941
2495
  vue.createElementVNode("button", {
1942
2496
  type: "button",
1943
2497
  class: "tao-spoiler__header",
@@ -1948,12 +2502,12 @@
1948
2502
  vue.createElementVNode("span", {
1949
2503
  class: vue.normalizeClass(["tao-spoiler__icon", { "tao-spoiler__icon--open": isOpen.value }])
1950
2504
  }, "▶", 2),
1951
- __props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$s, [
2505
+ __props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$t, [
1952
2506
  vue.renderSlot(_ctx.$slots, "title", {}, () => [
1953
2507
  vue.createTextVNode(vue.toDisplayString(__props.title), 1)
1954
2508
  ], true)
1955
2509
  ])) : vue.createCommentVNode("", true)
1956
- ], 8, _hoisted_2$A),
2510
+ ], 8, _hoisted_2$B),
1957
2511
  vue.createVNode(vue.Transition, {
1958
2512
  name: "tao-spoiler-slide",
1959
2513
  onBeforeEnter,
@@ -1967,10 +2521,10 @@
1967
2521
  id: vue.unref(panelId),
1968
2522
  class: "tao-spoiler__content"
1969
2523
  }, [
1970
- vue.createElementVNode("div", _hoisted_5$h, [
2524
+ vue.createElementVNode("div", _hoisted_5$i, [
1971
2525
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
1972
2526
  ])
1973
- ], 8, _hoisted_4$o)) : vue.createCommentVNode("", true)
2527
+ ], 8, _hoisted_4$p)) : vue.createCommentVNode("", true)
1974
2528
  ]),
1975
2529
  _: 3
1976
2530
  })
@@ -1978,9 +2532,9 @@
1978
2532
  };
1979
2533
  }
1980
2534
  });
1981
- const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-5a3147a2"]]);
1982
- const _hoisted_1$F = { class: "tao-spoiler-group" };
1983
- const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
2535
+ const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-5a3147a2"]]);
2536
+ const _hoisted_1$G = { class: "tao-spoiler-group" };
2537
+ const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
1984
2538
  ...{ name: "TaoSpoilerGroup" },
1985
2539
  __name: "TaoSpoilerGroup",
1986
2540
  props: {
@@ -2005,15 +2559,15 @@
2005
2559
  setOpen
2006
2560
  });
2007
2561
  return (_ctx, _cache) => {
2008
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$F, [
2562
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$G, [
2009
2563
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
2010
2564
  ]);
2011
2565
  };
2012
2566
  }
2013
2567
  });
2014
- const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-7986fd2a"]]);
2015
- const _hoisted_1$E = ["aria-label"];
2016
- const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
2568
+ const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-7986fd2a"]]);
2569
+ const _hoisted_1$F = ["aria-label"];
2570
+ const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
2017
2571
  ...{ name: "TaoCopy" },
2018
2572
  __name: "TaoCopy",
2019
2573
  props: {
@@ -2154,7 +2708,7 @@
2154
2708
  "stroke-width": "2"
2155
2709
  })
2156
2710
  ], -1)
2157
- ])], 10, _hoisted_1$E)
2711
+ ])], 10, _hoisted_1$F)
2158
2712
  ], true),
2159
2713
  (vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
2160
2714
  copied.value && __props.tip && doneText.value ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -2170,8 +2724,8 @@
2170
2724
  };
2171
2725
  }
2172
2726
  });
2173
- const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-16581b4e"]]);
2174
- const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
2727
+ const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-16581b4e"]]);
2728
+ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
2175
2729
  ...{ name: "TaoContainer" },
2176
2730
  __name: "TaoContainer",
2177
2731
  props: {
@@ -2194,8 +2748,8 @@
2194
2748
  };
2195
2749
  }
2196
2750
  });
2197
- const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-ef005f57"]]);
2198
- const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
2751
+ const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-ef005f57"]]);
2752
+ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
2199
2753
  ...{ name: "TaoFlex" },
2200
2754
  __name: "TaoFlex",
2201
2755
  props: {
@@ -2226,7 +2780,7 @@
2226
2780
  };
2227
2781
  }
2228
2782
  });
2229
- const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
2783
+ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
2230
2784
  ...{ name: "TaoSpace" },
2231
2785
  __name: "TaoSpace",
2232
2786
  props: {
@@ -2251,8 +2805,8 @@
2251
2805
  };
2252
2806
  }
2253
2807
  });
2254
- const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-67c9d3a2"]]);
2255
- const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
2808
+ const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-67c9d3a2"]]);
2809
+ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
2256
2810
  ...{ name: "TaoGrid" },
2257
2811
  __name: "TaoGrid",
2258
2812
  props: {
@@ -2278,8 +2832,8 @@
2278
2832
  };
2279
2833
  }
2280
2834
  });
2281
- const TaoGrid = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-5baa4944"]]);
2282
- const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
2835
+ const TaoGrid = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-5baa4944"]]);
2836
+ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
2283
2837
  ...{ name: "TaoGridItem" },
2284
2838
  __name: "TaoGridItem",
2285
2839
  props: {
@@ -2302,15 +2856,15 @@
2302
2856
  };
2303
2857
  }
2304
2858
  });
2305
- const TaoGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-ad288026"]]);
2306
- const _hoisted_1$D = { class: "tao-split__pane tao-split__pane--start" };
2307
- const _hoisted_2$z = ["aria-orientation", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-disabled", "tabindex"];
2308
- const _hoisted_3$r = { class: "tao-split__pane tao-split__pane--end" };
2309
- const _hoisted_4$n = {
2859
+ const TaoGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-ad288026"]]);
2860
+ const _hoisted_1$E = { class: "tao-split__pane tao-split__pane--start" };
2861
+ const _hoisted_2$A = ["aria-orientation", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-disabled", "tabindex"];
2862
+ const _hoisted_3$s = { class: "tao-split__pane tao-split__pane--end" };
2863
+ const _hoisted_4$o = {
2310
2864
  key: 0,
2311
2865
  class: "tao-split__shield"
2312
2866
  };
2313
- const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
2867
+ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
2314
2868
  ...{ name: "TaoSplit" },
2315
2869
  __name: "TaoSplit",
2316
2870
  props: {
@@ -2607,7 +3161,7 @@
2607
3161
  ]]),
2608
3162
  style: vue.normalizeStyle({ "--tao-split-start": `${startPx.value}px` })
2609
3163
  }, [
2610
- vue.createElementVNode("div", _hoisted_1$D, [
3164
+ vue.createElementVNode("div", _hoisted_1$E, [
2611
3165
  vue.renderSlot(_ctx.$slots, "start", {}, void 0, true)
2612
3166
  ]),
2613
3167
  vue.createElementVNode("div", {
@@ -2630,18 +3184,18 @@
2630
3184
  onKeydown,
2631
3185
  onDragstart: _cache[0] || (_cache[0] = vue.withModifiers(() => {
2632
3186
  }, ["prevent"]))
2633
- }, null, 40, _hoisted_2$z),
2634
- vue.createElementVNode("div", _hoisted_3$r, [
3187
+ }, null, 40, _hoisted_2$A),
3188
+ vue.createElementVNode("div", _hoisted_3$s, [
2635
3189
  vue.renderSlot(_ctx.$slots, "end", {}, void 0, true)
2636
3190
  ]),
2637
- isDragging.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$n)) : vue.createCommentVNode("", true)
3191
+ isDragging.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$o)) : vue.createCommentVNode("", true)
2638
3192
  ], 6);
2639
3193
  };
2640
3194
  }
2641
3195
  });
2642
- const TaoSplit = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-f34ab385"]]);
2643
- const _hoisted_1$C = { class: "tao-icon" };
2644
- const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
3196
+ const TaoSplit = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-f34ab385"]]);
3197
+ const _hoisted_1$D = { class: "tao-icon" };
3198
+ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
2645
3199
  ...{ name: "TaoIcon" },
2646
3200
  __name: "TaoIcon",
2647
3201
  props: {
@@ -2656,7 +3210,7 @@
2656
3210
  }));
2657
3211
  const props = __props;
2658
3212
  return (_ctx, _cache) => {
2659
- return vue.openBlock(), vue.createElementBlock("span", _hoisted_1$C, [
3213
+ return vue.openBlock(), vue.createElementBlock("span", _hoisted_1$D, [
2660
3214
  vue.renderSlot(_ctx.$slots, "prefix", {}, void 0, true),
2661
3215
  vue.createElementVNode("i", {
2662
3216
  class: vue.normalizeClass(["tao-icon__value", [`icon-${props.name}`, { "tao-icon__value--invert": props.invert }]]),
@@ -2667,8 +3221,8 @@
2667
3221
  };
2668
3222
  }
2669
3223
  });
2670
- const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-350b3502"]]);
2671
- const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
3224
+ const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-350b3502"]]);
3225
+ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
2672
3226
  ...{ name: "TaoLoader" },
2673
3227
  __name: "TaoLoader",
2674
3228
  props: {
@@ -2729,11 +3283,11 @@
2729
3283
  };
2730
3284
  }
2731
3285
  });
2732
- const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-49a9f1b2"]]);
2733
- const _hoisted_1$B = { class: "tao-image" };
2734
- const _hoisted_2$y = ["src", "alt", "loading"];
2735
- const _hoisted_3$q = { class: "tao-image__placeholder" };
2736
- const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
3286
+ const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-49a9f1b2"]]);
3287
+ const _hoisted_1$C = { class: "tao-image" };
3288
+ const _hoisted_2$z = ["src", "alt", "loading"];
3289
+ const _hoisted_3$r = { class: "tao-image__placeholder" };
3290
+ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
2737
3291
  ...{ name: "TaoImage" },
2738
3292
  __name: "TaoImage",
2739
3293
  props: {
@@ -2764,7 +3318,7 @@
2764
3318
  hasError.value = false;
2765
3319
  });
2766
3320
  return (_ctx, _cache) => {
2767
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$B, [
3321
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$C, [
2768
3322
  __props.src && !hasError.value ? (vue.openBlock(), vue.createElementBlock("img", {
2769
3323
  key: 0,
2770
3324
  class: vue.normalizeClass({ "tao-image__img--hidden": !isLoaded.value, "tao-image__img--pixelated": props.pixelated }),
@@ -2775,26 +3329,26 @@
2775
3329
  draggable: "false",
2776
3330
  onLoad: handleLoad,
2777
3331
  onError: handleError
2778
- }, null, 42, _hoisted_2$y)) : vue.createCommentVNode("", true),
3332
+ }, null, 42, _hoisted_2$z)) : vue.createCommentVNode("", true),
2779
3333
  !__props.src || hasError.value ? vue.renderSlot(_ctx.$slots, "default", {}, () => [
2780
- vue.createElementVNode("div", _hoisted_3$q, vue.toDisplayString(__props.placeholderText), 1)
3334
+ vue.createElementVNode("div", _hoisted_3$r, vue.toDisplayString(__props.placeholderText), 1)
2781
3335
  ], true, 1) : vue.createCommentVNode("", true)
2782
3336
  ]);
2783
3337
  };
2784
3338
  }
2785
3339
  });
2786
- const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-61f47c52"]]);
2787
- const _hoisted_1$A = ["for"];
2788
- const _hoisted_2$x = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
2789
- const _hoisted_3$p = {
3340
+ const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-61f47c52"]]);
3341
+ const _hoisted_1$B = ["for"];
3342
+ const _hoisted_2$y = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
3343
+ const _hoisted_3$q = {
2790
3344
  key: 0,
2791
3345
  class: "tao-checkbox__label"
2792
3346
  };
2793
- const _hoisted_4$m = {
3347
+ const _hoisted_4$n = {
2794
3348
  key: 1,
2795
3349
  class: "tao-checkbox__label"
2796
3350
  };
2797
- const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
3351
+ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
2798
3352
  ...{ name: "TaoCheckbox" },
2799
3353
  __name: "TaoCheckbox",
2800
3354
  props: {
@@ -2872,25 +3426,25 @@
2872
3426
  "aria-invalid": invalid.value || void 0,
2873
3427
  "aria-describedby": describedBy.value,
2874
3428
  onChange: onInputChange
2875
- }, null, 40, _hoisted_2$x),
3429
+ }, null, 40, _hoisted_2$y),
2876
3430
  _cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "tao-checkbox__box" }, null, -1)),
2877
- __props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$p, vue.toDisplayString(__props.label), 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$m, [
3431
+ __props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$q, vue.toDisplayString(__props.label), 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$n, [
2878
3432
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
2879
3433
  ])),
2880
3434
  vue.renderSlot(_ctx.$slots, "post", { text: __props.label }, void 0, true)
2881
- ], 10, _hoisted_1$A);
3435
+ ], 10, _hoisted_1$B);
2882
3436
  };
2883
3437
  }
2884
3438
  });
2885
- const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-13f6cd33"]]);
2886
- const _hoisted_1$z = {
3439
+ const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-13f6cd33"]]);
3440
+ const _hoisted_1$A = {
2887
3441
  key: 0,
2888
3442
  class: "tao-tag__prefix"
2889
3443
  };
2890
- const _hoisted_2$w = { class: "tao-tag__text" };
2891
- const _hoisted_3$o = ["aria-label"];
2892
- const _hoisted_4$l = { "aria-hidden": "true" };
2893
- const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
3444
+ const _hoisted_2$x = { class: "tao-tag__text" };
3445
+ const _hoisted_3$p = ["aria-label"];
3446
+ const _hoisted_4$m = { "aria-hidden": "true" };
3447
+ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
2894
3448
  ...{ name: "TaoTag" },
2895
3449
  __name: "TaoTag",
2896
3450
  props: {
@@ -2942,10 +3496,10 @@
2942
3496
  ]]),
2943
3497
  style: vue.normalizeStyle(style.value)
2944
3498
  }, [
2945
- _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$z, [
3499
+ _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$A, [
2946
3500
  vue.renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
2947
3501
  ])) : vue.createCommentVNode("", true),
2948
- vue.createElementVNode("span", _hoisted_2$w, [
3502
+ vue.createElementVNode("span", _hoisted_2$x, [
2949
3503
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
2950
3504
  ]),
2951
3505
  __props.closable ? (vue.openBlock(), vue.createElementBlock("button", {
@@ -2955,27 +3509,27 @@
2955
3509
  "aria-label": vue.unref(l10n).closeLabel,
2956
3510
  onClick: vue.withModifiers(onClose, ["stop"])
2957
3511
  }, [
2958
- vue.createElementVNode("span", _hoisted_4$l, [
3512
+ vue.createElementVNode("span", _hoisted_4$m, [
2959
3513
  vue.renderSlot(_ctx.$slots, "close-icon", {}, () => [
2960
3514
  _cache[0] || (_cache[0] = vue.createTextVNode("✕", -1))
2961
3515
  ], true)
2962
3516
  ])
2963
- ], 8, _hoisted_3$o)) : vue.createCommentVNode("", true)
3517
+ ], 8, _hoisted_3$p)) : vue.createCommentVNode("", true)
2964
3518
  ], 6);
2965
3519
  };
2966
3520
  }
2967
3521
  });
2968
- const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-ca0b1b42"]]);
2969
- const _hoisted_1$y = ["role", "aria-hidden"];
2970
- const _hoisted_2$v = {
3522
+ const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-ca0b1b42"]]);
3523
+ const _hoisted_1$z = ["role", "aria-hidden"];
3524
+ const _hoisted_2$w = {
2971
3525
  key: 1,
2972
3526
  class: "tao-divider__text"
2973
3527
  };
2974
- const _hoisted_3$n = {
3528
+ const _hoisted_3$o = {
2975
3529
  key: 2,
2976
3530
  class: "tao-divider__line tao-divider__line--end"
2977
3531
  };
2978
- const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
3532
+ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
2979
3533
  ...{ name: "TaoDivider" },
2980
3534
  __name: "TaoDivider",
2981
3535
  props: {
@@ -3009,23 +3563,23 @@
3009
3563
  key: 0,
3010
3564
  class: vue.normalizeClass(["tao-divider__line", { "tao-divider__line--start": hasLabel.value }])
3011
3565
  }, null, 2)) : vue.createCommentVNode("", true),
3012
- hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$v, [
3566
+ hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$w, [
3013
3567
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
3014
3568
  vue.createTextVNode(vue.toDisplayString(__props.text), 1)
3015
3569
  ], true)
3016
3570
  ])) : vue.createCommentVNode("", true),
3017
- __props.variant !== "gap" && hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$n)) : vue.createCommentVNode("", true)
3018
- ], 10, _hoisted_1$y);
3571
+ __props.variant !== "gap" && hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$o)) : vue.createCommentVNode("", true)
3572
+ ], 10, _hoisted_1$z);
3019
3573
  };
3020
3574
  }
3021
3575
  });
3022
- const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-32544dcc"]]);
3023
- const _hoisted_1$x = {
3576
+ const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-32544dcc"]]);
3577
+ const _hoisted_1$y = {
3024
3578
  key: 0,
3025
3579
  class: "tao-fieldset__legend"
3026
3580
  };
3027
- const _hoisted_2$u = { class: "tao-fieldset__body" };
3028
- const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
3581
+ const _hoisted_2$v = { class: "tao-fieldset__body" };
3582
+ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
3029
3583
  ...{ name: "TaoFieldset" },
3030
3584
  __name: "TaoFieldset",
3031
3585
  props: {
@@ -3037,20 +3591,20 @@
3037
3591
  return vue.openBlock(), vue.createElementBlock("fieldset", {
3038
3592
  class: vue.normalizeClass(["tao-fieldset", `tao-fieldset--${__props.align}`])
3039
3593
  }, [
3040
- __props.legend || _ctx.$slots.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_1$x, [
3594
+ __props.legend || _ctx.$slots.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_1$y, [
3041
3595
  vue.renderSlot(_ctx.$slots, "legend", {}, () => [
3042
3596
  vue.createTextVNode(vue.toDisplayString(__props.legend), 1)
3043
3597
  ], true)
3044
3598
  ])) : vue.createCommentVNode("", true),
3045
- vue.createElementVNode("div", _hoisted_2$u, [
3599
+ vue.createElementVNode("div", _hoisted_2$v, [
3046
3600
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
3047
3601
  ])
3048
3602
  ], 2);
3049
3603
  };
3050
3604
  }
3051
3605
  });
3052
- const TaoFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-3445dafd"]]);
3053
- const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
3606
+ const TaoFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-3445dafd"]]);
3607
+ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
3054
3608
  ...{ name: "TaoAnimatedBorder" },
3055
3609
  __name: "TaoAnimatedBorder",
3056
3610
  props: {
@@ -3074,10 +3628,10 @@
3074
3628
  };
3075
3629
  }
3076
3630
  });
3077
- const TaoAnimatedBorder = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-c9434028"]]);
3078
- const _hoisted_1$w = ["id", "placeholder", "spellcheck", "autocomplete", "minlength", "maxlength", "disabled", "readonly", "rows", "value", "aria-invalid", "aria-describedby"];
3079
- const _hoisted_2$t = ["id"];
3080
- const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
3631
+ const TaoAnimatedBorder = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-c9434028"]]);
3632
+ const _hoisted_1$x = ["id", "placeholder", "spellcheck", "autocomplete", "minlength", "maxlength", "disabled", "readonly", "rows", "value", "aria-invalid", "aria-describedby"];
3633
+ const _hoisted_2$u = ["id"];
3634
+ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
3081
3635
  ...{ name: "TaoTextarea" },
3082
3636
  __name: "TaoTextarea",
3083
3637
  props: {
@@ -3253,21 +3807,21 @@
3253
3807
  onFocus,
3254
3808
  onBlur,
3255
3809
  onKeydown
3256
- }, null, 42, _hoisted_1$w),
3810
+ }, null, 42, _hoisted_1$x),
3257
3811
  __props.count ? (vue.openBlock(), vue.createElementBlock("span", {
3258
3812
  key: 0,
3259
3813
  id: counterId.value,
3260
3814
  class: vue.normalizeClass(["tao-textarea__count", { "tao-textarea__count--limit": atLimit.value }])
3261
- }, vue.toDisplayString(countLabel.value), 11, _hoisted_2$t)) : vue.createCommentVNode("", true)
3815
+ }, vue.toDisplayString(countLabel.value), 11, _hoisted_2$u)) : vue.createCommentVNode("", true)
3262
3816
  ], 2));
3263
3817
  };
3264
3818
  }
3265
3819
  });
3266
- const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-50628dd9"]]);
3267
- const _hoisted_1$v = ["tabindex", "aria-label"];
3268
- const _hoisted_2$s = { class: "tao-scroll-top__content" };
3820
+ const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-50628dd9"]]);
3821
+ const _hoisted_1$w = ["tabindex", "aria-label"];
3822
+ const _hoisted_2$t = { class: "tao-scroll-top__content" };
3269
3823
  const RIPPLE_DURATION = 750;
3270
- const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
3824
+ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
3271
3825
  ...{ name: "TaoScrollTop" },
3272
3826
  __name: "TaoScrollTop",
3273
3827
  props: {
@@ -3374,7 +3928,7 @@
3374
3928
  "aria-label": props.ariaLabel,
3375
3929
  onClick: vue.withModifiers(onClick, ["prevent"])
3376
3930
  }, [
3377
- vue.createElementVNode("div", _hoisted_2$s, [
3931
+ vue.createElementVNode("div", _hoisted_2$t, [
3378
3932
  vue.createElementVNode("div", {
3379
3933
  class: vue.normalizeClass([{ "tao-scroll-top__ripple--active": isRippleActive.value }, "tao-scroll-top__ripple"]),
3380
3934
  style: vue.normalizeStyle(rippleStyle)
@@ -3391,33 +3945,33 @@
3391
3945
  ], -1))
3392
3946
  ], true)
3393
3947
  ])
3394
- ], 14, _hoisted_1$v)) : vue.createCommentVNode("", true)
3948
+ ], 14, _hoisted_1$w)) : vue.createCommentVNode("", true)
3395
3949
  ]),
3396
3950
  _: 3
3397
3951
  });
3398
3952
  };
3399
3953
  }
3400
3954
  });
3401
- const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-89d2feaa"]]);
3402
- const _hoisted_1$u = { class: "tao-progress" };
3403
- const _hoisted_2$r = {
3955
+ const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-89d2feaa"]]);
3956
+ const _hoisted_1$v = { class: "tao-progress" };
3957
+ const _hoisted_2$s = {
3404
3958
  key: 0,
3405
3959
  class: "tao-progress__side"
3406
3960
  };
3407
- const _hoisted_3$m = { class: "tao-progress__main" };
3408
- const _hoisted_4$k = {
3961
+ const _hoisted_3$n = { class: "tao-progress__main" };
3962
+ const _hoisted_4$l = {
3409
3963
  key: 0,
3410
3964
  class: "tao-progress__percentage"
3411
3965
  };
3412
- const _hoisted_5$g = {
3966
+ const _hoisted_5$h = {
3413
3967
  key: 1,
3414
3968
  class: "tao-progress__side"
3415
3969
  };
3416
- const _hoisted_6$d = {
3970
+ const _hoisted_6$e = {
3417
3971
  key: 0,
3418
3972
  class: "tao-progress__percentage"
3419
3973
  };
3420
- const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
3974
+ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
3421
3975
  ...{ name: "TaoProgress" },
3422
3976
  __name: "TaoProgress",
3423
3977
  props: {
@@ -3448,16 +4002,16 @@
3448
4002
  () => hasRight.value ? `(${props.progress}%)` : `${props.progress}%`
3449
4003
  );
3450
4004
  return (_ctx, _cache) => {
3451
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$u, [
4005
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
3452
4006
  vue.createElementVNode("div", {
3453
4007
  class: vue.normalizeClass(["tao-progress__container", { "tao-progress__container--over": showOverPercent.value }]),
3454
4008
  style: vue.normalizeStyle({ minWidth: `${minW.value}px`, maxWidth: `${maxW.value}px` })
3455
4009
  }, [
3456
- _ctx.$slots.left ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$r, [
4010
+ _ctx.$slots.left ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$s, [
3457
4011
  vue.renderSlot(_ctx.$slots, "left", {}, void 0, true)
3458
4012
  ])) : vue.createCommentVNode("", true),
3459
- vue.createElementVNode("div", _hoisted_3$m, [
3460
- showOverPercent.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$k, vue.toDisplayString(__props.progress) + "%", 1)) : vue.createCommentVNode("", true),
4013
+ vue.createElementVNode("div", _hoisted_3$n, [
4014
+ showOverPercent.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$l, vue.toDisplayString(__props.progress) + "%", 1)) : vue.createCommentVNode("", true),
3461
4015
  vue.createElementVNode("div", {
3462
4016
  class: "tao-progress__track",
3463
4017
  style: vue.normalizeStyle({ height: `${__props.height}px` })
@@ -3468,289 +4022,86 @@
3468
4022
  }, null, 6)
3469
4023
  ], 4)
3470
4024
  ]),
3471
- _ctx.$slots.right || showEndPercent.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$g, [
4025
+ _ctx.$slots.right || showEndPercent.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$h, [
3472
4026
  vue.renderSlot(_ctx.$slots, "right", {}, void 0, true),
3473
- showEndPercent.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$d, vue.toDisplayString(endPercentLabel.value), 1)) : vue.createCommentVNode("", true)
4027
+ showEndPercent.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$e, vue.toDisplayString(endPercentLabel.value), 1)) : vue.createCommentVNode("", true)
3474
4028
  ])) : vue.createCommentVNode("", true)
3475
4029
  ], 6)
3476
4030
  ]);
3477
4031
  };
3478
4032
  }
3479
4033
  });
3480
- const TaoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-1aae89cd"]]);
3481
- const _hoisted_1$t = ["id", "tabindex", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-disabled", "aria-invalid", "aria-describedby"];
3482
- const _hoisted_2$q = ["placeholder"];
3483
- const _hoisted_3$l = {
3484
- key: 1,
3485
- class: "tao-slider__value"
3486
- };
3487
- const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
3488
- ...{ name: "TaoSlider" },
3489
- __name: "TaoSlider",
4034
+ const TaoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-1aae89cd"]]);
4035
+ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
4036
+ ...{ name: "TaoRangeSlider" },
4037
+ __name: "TaoRangeSlider",
3490
4038
  props: {
3491
- min: { default: 0 },
3492
- max: { default: 100 },
3493
- step: { default: 1 },
3494
- showValue: { type: Boolean, default: false },
3495
- placeholder: { default: "" },
3496
- modelValue: {},
3497
- disabled: { type: Boolean, default: false },
3498
- error: { type: Boolean, default: false },
3499
- variant: { default: "bar" },
4039
+ min: {},
4040
+ max: {},
4041
+ step: {},
4042
+ minGap: {},
4043
+ showValue: { type: Boolean },
4044
+ marks: { type: [Boolean, Array] },
4045
+ marksSide: {},
4046
+ discrete: { type: Boolean },
4047
+ format: { type: Function },
4048
+ flat: { type: Boolean },
4049
+ vertical: { type: Boolean },
4050
+ disabled: { type: Boolean },
4051
+ error: { type: Boolean },
4052
+ variant: {},
3500
4053
  size: {},
3501
- wheel: { default: 0 }
4054
+ ariaLabel: {},
4055
+ wheel: {},
4056
+ modelValue: {}
3502
4057
  },
3503
4058
  emits: ["update:modelValue", "change"],
3504
4059
  setup(__props, { emit: __emit }) {
3505
4060
  const props = __props;
3506
4061
  const emit = __emit;
3507
- const field = vue.inject(formFieldKey, null);
3508
- const localId = vue.useId();
3509
- const controlId = vue.computed(() => (field == null ? void 0 : field.id) ?? localId);
3510
- const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
3511
- const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
3512
- function packModelValue(value) {
3513
- return typeof props.modelValue === "string" ? `${value}` : value;
3514
- }
3515
- function unpackModelValue() {
3516
- const raw = typeof props.modelValue === "string" ? parseFloat(props.modelValue) : props.modelValue;
3517
- return Number.isFinite(raw) ? raw : props.min;
3518
- }
3519
- const current2 = vue.computed(() => unpackModelValue());
3520
- const trackRef = vue.ref(null);
3521
- const isDragging = vue.ref(false);
3522
- let dragPointer = -1;
3523
- let dragStartValue = 0;
3524
- const shadowInputRef = vue.ref(null);
3525
- const shadowModel = vue.ref("0");
3526
- const showShadowModel = vue.ref(false);
3527
- const progressPercent = vue.computed(() => {
3528
- const range = props.max - props.min;
3529
- if (range <= 0) {
3530
- return 0;
3531
- }
3532
- return (current2.value - props.min) / range * 100;
3533
- });
3534
- function clampValue(v) {
3535
- return Math.min(Math.max(v, props.min), props.max);
3536
- }
3537
- function commit(value, final = false) {
3538
- const next = clampValue(value);
3539
- const changed = next !== current2.value;
3540
- emit("update:modelValue", packModelValue(next));
3541
- if (final && changed) {
3542
- emit("change", packModelValue(next));
3543
- }
3544
- }
3545
- function calculateValue(event) {
3546
- if (!trackRef.value) {
3547
- return props.min;
3548
- }
3549
- const rect = trackRef.value.getBoundingClientRect();
3550
- const x = Math.min(Math.max(event.clientX - rect.left, 0), rect.width);
3551
- const ratio = rect.width ? x / rect.width : 0;
3552
- const v = props.min + ratio * (props.max - props.min);
3553
- return clampValue(Math.round((v - props.min) / props.step) * props.step + props.min);
3554
- }
3555
- function releaseDragCapture() {
3556
- const el = trackRef.value;
3557
- const id = dragPointer;
3558
- if (!el || id === -1) {
3559
- return;
3560
- }
3561
- if (typeof el.hasPointerCapture === "function" && !el.hasPointerCapture(id)) {
3562
- return;
3563
- }
3564
- try {
3565
- el.releasePointerCapture(id);
3566
- } catch {
3567
- }
3568
- }
3569
- function endDrag() {
3570
- if (!isDragging.value) {
3571
- return;
3572
- }
3573
- isDragging.value = false;
3574
- releaseDragCapture();
3575
- dragPointer = -1;
3576
- if (current2.value !== dragStartValue) {
3577
- emit("change", packModelValue(current2.value));
3578
- }
3579
- }
3580
- function onPointerDown(event) {
3581
- if (props.disabled || showShadowModel.value || event.button !== 0 || !trackRef.value) {
3582
- return;
3583
- }
3584
- dragPointer = event.pointerId;
3585
- dragStartValue = current2.value;
3586
- isDragging.value = true;
3587
- commit(calculateValue(event));
3588
- event.preventDefault();
3589
- try {
3590
- trackRef.value.setPointerCapture(event.pointerId);
3591
- } catch {
3592
- }
3593
- }
3594
- function onPointerMove(event) {
3595
- if (!isDragging.value || event.pointerId !== dragPointer) {
3596
- return;
3597
- }
3598
- commit(calculateValue(event));
3599
- }
3600
- function onPointerEnd(event) {
3601
- if (!isDragging.value) {
3602
- return;
3603
- }
3604
- if (dragPointer !== -1 && event.pointerId !== dragPointer) {
3605
- return;
3606
- }
3607
- endDrag();
3608
- }
3609
- function onLostPointerCapture() {
3610
- endDrag();
3611
- }
3612
- function onKeydown(event) {
3613
- if (props.disabled || showShadowModel.value) {
3614
- return;
3615
- }
3616
- const keys = {
3617
- ArrowLeft: -props.step,
3618
- ArrowDown: -props.step,
3619
- ArrowRight: props.step,
3620
- ArrowUp: props.step,
3621
- PageDown: -props.step * 10,
3622
- PageUp: props.step * 10
3623
- };
3624
- if (event.key in keys) {
3625
- event.preventDefault();
3626
- commit(current2.value + keys[event.key], true);
3627
- return;
3628
- }
3629
- if (event.key === "Home") {
3630
- event.preventDefault();
3631
- commit(props.min, true);
3632
- return;
3633
- }
3634
- if (event.key === "End") {
3635
- event.preventDefault();
3636
- commit(props.max, true);
3637
- }
3638
- }
3639
- function onWheel(event) {
3640
- if (props.disabled || props.wheel <= 0 || showShadowModel.value) {
3641
- return;
3642
- }
3643
- event.preventDefault();
3644
- const delta = event.deltaY < 0 ? props.wheel : -props.wheel;
3645
- commit(current2.value + delta, true);
3646
- }
3647
- function onBlurShadowModel() {
3648
- if (shadowModel.value) {
3649
- const next = clampValue(parseFloat(shadowModel.value) || 0);
3650
- shadowModel.value = `${packModelValue(next)}`;
3651
- commit(next, true);
3652
- }
3653
- showShadowModel.value = false;
3654
- }
3655
- function onShadowKeydown(event) {
3656
- var _a;
3657
- if (event.key === "Enter") {
3658
- (_a = shadowInputRef.value) == null ? void 0 : _a.blur();
3659
- }
3660
- }
3661
- function onContextMenu() {
3662
- if (props.disabled || !props.showValue) {
3663
- return;
3664
- }
3665
- shadowModel.value = `${props.modelValue}`;
3666
- showShadowModel.value = true;
3667
- requestAnimationFrame(() => {
3668
- var _a;
3669
- return (_a = shadowInputRef.value) == null ? void 0 : _a.focus();
3670
- });
3671
- }
3672
- let stopFocusLoss;
3673
- vue.onMounted(() => {
3674
- stopFocusLoss = listenFocusLoss(endDrag);
3675
- });
3676
- vue.onBeforeUnmount(() => {
3677
- endDrag();
3678
- stopFocusLoss == null ? void 0 : stopFocusLoss();
3679
- });
3680
4062
  return (_ctx, _cache) => {
3681
- return vue.openBlock(), vue.createElementBlock("div", {
3682
- id: controlId.value,
3683
- ref_key: "trackRef",
3684
- ref: trackRef,
3685
- class: vue.normalizeClass(["tao-slider", [
3686
- `tao-slider--${__props.variant}`,
3687
- vue.unref(sizeClass)(__props.size),
3688
- { "tao-slider--show-value": __props.showValue, "tao-slider--disabled": __props.disabled, "tao-slider--invalid": invalid.value }
3689
- ]]),
3690
- role: "slider",
3691
- tabindex: __props.disabled ? -1 : 0,
3692
- "aria-valuemin": __props.min,
3693
- "aria-valuemax": __props.max,
3694
- "aria-valuenow": current2.value,
3695
- "aria-disabled": __props.disabled || void 0,
3696
- "aria-invalid": invalid.value || void 0,
3697
- "aria-describedby": describedBy.value,
3698
- onContextmenu: vue.withModifiers(onContextMenu, ["prevent"]),
3699
- onPointerdown: onPointerDown,
3700
- onPointermove: onPointerMove,
3701
- onPointerup: onPointerEnd,
3702
- onPointercancel: onPointerEnd,
3703
- onLostpointercapture: onLostPointerCapture,
3704
- onKeydown,
3705
- onWheel
3706
- }, [
3707
- _cache[2] || (_cache[2] = vue.createElementVNode("div", { class: "tao-slider__track" }, null, -1)),
3708
- vue.createElementVNode("div", {
3709
- class: "tao-slider__fill",
3710
- style: vue.normalizeStyle({ width: `${progressPercent.value}%` })
3711
- }, null, 4),
3712
- vue.createElementVNode("div", {
3713
- class: "tao-slider__thumb",
3714
- style: vue.normalizeStyle({ left: `${progressPercent.value}%` })
3715
- }, null, 4),
3716
- showShadowModel.value ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
3717
- key: 0,
3718
- ref_key: "shadowInputRef",
3719
- ref: shadowInputRef,
3720
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => shadowModel.value = $event),
3721
- type: "number",
3722
- inputmode: "numeric",
3723
- placeholder: __props.placeholder,
3724
- class: "tao-slider__shadow-input",
3725
- onBlur: onBlurShadowModel,
3726
- onKeydown: onShadowKeydown,
3727
- onPointerdown: _cache[1] || (_cache[1] = vue.withModifiers(() => {
3728
- }, ["stop"]))
3729
- }, null, 40, _hoisted_2$q)), [
3730
- [vue.vModelText, shadowModel.value]
3731
- ]) : __props.showValue ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$l, [
3732
- vue.renderSlot(_ctx.$slots, "pre-value", {}, void 0, true),
3733
- vue.createTextVNode(vue.toDisplayString(__props.modelValue), 1),
3734
- vue.renderSlot(_ctx.$slots, "post-value", {}, void 0, true)
3735
- ])) : vue.createCommentVNode("", true)
3736
- ], 42, _hoisted_1$t);
4063
+ return vue.openBlock(), vue.createBlock(TaoSliderBase, vue.mergeProps(props, {
4064
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event)),
4065
+ onChange: _cache[1] || (_cache[1] = ($event) => emit("change", $event))
4066
+ }), vue.createSlots({ _: 2 }, [
4067
+ _ctx.$slots.mark ? {
4068
+ name: "mark",
4069
+ fn: vue.withCtx((slot) => [
4070
+ vue.renderSlot(_ctx.$slots, "mark", vue.normalizeProps(vue.guardReactiveProps(slot)))
4071
+ ]),
4072
+ key: "0"
4073
+ } : void 0,
4074
+ _ctx.$slots["pre-value"] ? {
4075
+ name: "pre-value",
4076
+ fn: vue.withCtx(() => [
4077
+ vue.renderSlot(_ctx.$slots, "pre-value")
4078
+ ]),
4079
+ key: "1"
4080
+ } : void 0,
4081
+ _ctx.$slots["post-value"] ? {
4082
+ name: "post-value",
4083
+ fn: vue.withCtx(() => [
4084
+ vue.renderSlot(_ctx.$slots, "post-value")
4085
+ ]),
4086
+ key: "2"
4087
+ } : void 0
4088
+ ]), 1040);
3737
4089
  };
3738
4090
  }
3739
4091
  });
3740
- const TaoSlider = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-47d32e2a"]]);
3741
- const _hoisted_1$s = { class: "tao-file-drop__row" };
3742
- const _hoisted_2$p = ["aria-label"];
3743
- const _hoisted_3$k = { "aria-hidden": "true" };
3744
- const _hoisted_4$j = ["accept", "multiple"];
3745
- const _hoisted_5$f = {
4092
+ const _hoisted_1$u = { class: "tao-file-drop__row" };
4093
+ const _hoisted_2$r = ["aria-label"];
4094
+ const _hoisted_3$m = { "aria-hidden": "true" };
4095
+ const _hoisted_4$k = ["accept", "multiple"];
4096
+ const _hoisted_5$g = {
3746
4097
  key: 0,
3747
4098
  class: "tao-file-drop__list"
3748
4099
  };
3749
- const _hoisted_6$c = { class: "tao-file-drop__name" };
3750
- const _hoisted_7$a = { class: "tao-file-drop__meta" };
3751
- const _hoisted_8$9 = ["aria-label", "onClick"];
4100
+ const _hoisted_6$d = { class: "tao-file-drop__name" };
4101
+ const _hoisted_7$b = { class: "tao-file-drop__meta" };
4102
+ const _hoisted_8$a = ["aria-label", "onClick"];
3752
4103
  const _hoisted_9$4 = { "aria-hidden": "true" };
3753
- const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
4104
+ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
3754
4105
  ...{ name: "TaoFileDrop" },
3755
4106
  __name: "TaoFileDrop",
3756
4107
  props: {
@@ -3890,7 +4241,7 @@
3890
4241
  return vue.openBlock(), vue.createElementBlock("div", {
3891
4242
  class: vue.normalizeClass(["tao-file-drop", vue.unref(sizeClass)(__props.size)])
3892
4243
  }, [
3893
- vue.createElementVNode("div", _hoisted_1$s, [
4244
+ vue.createElementVNode("div", _hoisted_1$u, [
3894
4245
  __props.showClear && __props.modelValue.length ? (vue.openBlock(), vue.createElementBlock("button", {
3895
4246
  key: 0,
3896
4247
  type: "button",
@@ -3898,12 +4249,12 @@
3898
4249
  "aria-label": vue.unref(l10n).clearLabel,
3899
4250
  onClick: requestClear
3900
4251
  }, [
3901
- vue.createElementVNode("span", _hoisted_3$k, [
4252
+ vue.createElementVNode("span", _hoisted_3$m, [
3902
4253
  vue.renderSlot(_ctx.$slots, "clear-icon", {}, () => [
3903
4254
  _cache[1] || (_cache[1] = vue.createTextVNode("✕", -1))
3904
4255
  ], true)
3905
4256
  ])
3906
- ], 8, _hoisted_2$p)) : vue.createCommentVNode("", true),
4257
+ ], 8, _hoisted_2$r)) : vue.createCommentVNode("", true),
3907
4258
  vue.createElementVNode("label", {
3908
4259
  class: vue.normalizeClass(["tao-file-drop__zone", { "tao-file-drop__zone--dragging": isDragging.value }]),
3909
4260
  onDragover: handleDragOver,
@@ -3923,17 +4274,17 @@
3923
4274
  onChange: handleFileSelect,
3924
4275
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
3925
4276
  }, ["stop"]))
3926
- }, null, 40, _hoisted_4$j)
4277
+ }, null, 40, _hoisted_4$k)
3927
4278
  ], 34)
3928
4279
  ]),
3929
- __props.list && __props.modelValue.length ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_5$f, [
4280
+ __props.list && __props.modelValue.length ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_5$g, [
3930
4281
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.modelValue, (file, index) => {
3931
4282
  return vue.openBlock(), vue.createElementBlock("li", {
3932
4283
  key: fileKey(file, index),
3933
4284
  class: "tao-file-drop__file"
3934
4285
  }, [
3935
- vue.createElementVNode("span", _hoisted_6$c, vue.toDisplayString(file.name), 1),
3936
- vue.createElementVNode("span", _hoisted_7$a, vue.toDisplayString(sizeLabel(file.size)), 1),
4286
+ vue.createElementVNode("span", _hoisted_6$d, vue.toDisplayString(file.name), 1),
4287
+ vue.createElementVNode("span", _hoisted_7$b, vue.toDisplayString(sizeLabel(file.size)), 1),
3937
4288
  vue.createElementVNode("button", {
3938
4289
  type: "button",
3939
4290
  class: "tao-file-drop__remove",
@@ -3945,7 +4296,7 @@
3945
4296
  _cache[2] || (_cache[2] = vue.createTextVNode("✕", -1))
3946
4297
  ], true)
3947
4298
  ])
3948
- ], 8, _hoisted_8$9)
4299
+ ], 8, _hoisted_8$a)
3949
4300
  ]);
3950
4301
  }), 128))
3951
4302
  ])) : vue.createCommentVNode("", true)
@@ -3953,15 +4304,15 @@
3953
4304
  };
3954
4305
  }
3955
4306
  });
3956
- const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-f8c58faa"]]);
3957
- const _hoisted_1$r = ["aria-expanded", "aria-label"];
3958
- const _hoisted_2$o = {
4307
+ const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-f8c58faa"]]);
4308
+ const _hoisted_1$t = ["aria-expanded", "aria-label"];
4309
+ const _hoisted_2$q = {
3959
4310
  key: 1,
3960
4311
  "aria-hidden": "true"
3961
4312
  };
3962
- const _hoisted_3$j = ["onClick", "onMouseenter"];
3963
- const _hoisted_4$i = { key: 1 };
3964
- const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
4313
+ const _hoisted_3$l = ["onClick", "onMouseenter"];
4314
+ const _hoisted_4$j = { key: 1 };
4315
+ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
3965
4316
  ...{ name: "TaoDropdownMenu" },
3966
4317
  __name: "TaoDropdownMenu",
3967
4318
  props: {
@@ -4103,12 +4454,12 @@
4103
4454
  "aria-label": _ctx.$slots.button ? void 0 : vue.unref(l10n).menuLabel,
4104
4455
  onClick: toggleMenu
4105
4456
  }, [
4106
- _ctx.$slots.button ? vue.renderSlot(_ctx.$slots, "button", {}, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$o, [
4457
+ _ctx.$slots.button ? vue.renderSlot(_ctx.$slots, "button", {}, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$q, [
4107
4458
  vue.renderSlot(_ctx.$slots, "icon", {}, () => [
4108
4459
  _cache[0] || (_cache[0] = vue.createTextVNode("⋮", -1))
4109
4460
  ], true)
4110
4461
  ]))
4111
- ], 8, _hoisted_1$r),
4462
+ ], 8, _hoisted_1$t),
4112
4463
  (vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
4113
4464
  isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", {
4114
4465
  key: 0,
@@ -4133,8 +4484,8 @@
4133
4484
  id: action.id,
4134
4485
  ico: action.ico,
4135
4486
  text: action.name
4136
- }, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$i, vue.toDisplayString(action.name), 1))
4137
- ], 42, _hoisted_3$j);
4487
+ }, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$j, vue.toDisplayString(action.name), 1))
4488
+ ], 42, _hoisted_3$l);
4138
4489
  }), 128))
4139
4490
  ], 36)) : vue.createCommentVNode("", true)
4140
4491
  ]))
@@ -4142,10 +4493,10 @@
4142
4493
  };
4143
4494
  }
4144
4495
  });
4145
- const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-5db490aa"]]);
4146
- const _hoisted_1$q = ["aria-invalid", "aria-describedby"];
4147
- const _hoisted_2$n = ["id", "value", "placeholder", "type", "disabled", "aria-invalid", "inputmode", "pattern", "maxlength", "onInput", "onPaste", "onKeydown", "onFocus"];
4148
- const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
4496
+ const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-5db490aa"]]);
4497
+ const _hoisted_1$s = ["aria-invalid", "aria-describedby"];
4498
+ const _hoisted_2$p = ["id", "value", "placeholder", "type", "disabled", "aria-invalid", "inputmode", "pattern", "maxlength", "onInput", "onPaste", "onKeydown", "onFocus"];
4499
+ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
4149
4500
  ...{ name: "TaoPinCode" },
4150
4501
  __name: "TaoPinCode",
4151
4502
  props: {
@@ -4364,14 +4715,14 @@
4364
4715
  onKeydown: ($event) => onKeydown($event, index),
4365
4716
  onFocus: ($event) => onFocus(index),
4366
4717
  onBlur
4367
- }, null, 42, _hoisted_2$n);
4718
+ }, null, 42, _hoisted_2$p);
4368
4719
  }), 128))
4369
- ], 10, _hoisted_1$q);
4720
+ ], 10, _hoisted_1$s);
4370
4721
  };
4371
4722
  }
4372
4723
  });
4373
- const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-6f0df8bd"]]);
4374
- const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
4724
+ const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-6f0df8bd"]]);
4725
+ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
4375
4726
  ...{ name: "TaoLink" },
4376
4727
  __name: "TaoLink",
4377
4728
  props: {
@@ -4418,8 +4769,8 @@
4418
4769
  };
4419
4770
  }
4420
4771
  });
4421
- const _hoisted_1$p = ["for"];
4422
- const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
4772
+ const _hoisted_1$r = ["for"];
4773
+ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
4423
4774
  ...{ name: "TaoFormField" },
4424
4775
  __name: "TaoFormField",
4425
4776
  props: {
@@ -4470,7 +4821,7 @@
4470
4821
  class: "tao-form-field__label",
4471
4822
  for: vue.unref(id),
4472
4823
  onClick: onLabelClick
4473
- }, vue.toDisplayString(__props.label), 9, _hoisted_1$p)) : vue.createCommentVNode("", true),
4824
+ }, vue.toDisplayString(__props.label), 9, _hoisted_1$r)) : vue.createCommentVNode("", true),
4474
4825
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
4475
4826
  __props.error ? (vue.openBlock(), vue.createElementBlock("p", {
4476
4827
  key: 1,
@@ -4485,12 +4836,12 @@
4485
4836
  };
4486
4837
  }
4487
4838
  });
4488
- const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-3cf90e3a"]]);
4489
- const _hoisted_1$o = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
4490
- const _hoisted_2$m = { class: "tao-select__value" };
4491
- const _hoisted_3$i = ["aria-activedescendant"];
4492
- const _hoisted_4$h = ["id", "aria-selected", "aria-disabled", "data-tao-select-index", "onClick", "onMouseenter"];
4493
- const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
4839
+ const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-3cf90e3a"]]);
4840
+ const _hoisted_1$q = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
4841
+ const _hoisted_2$o = { class: "tao-select__value" };
4842
+ const _hoisted_3$k = ["aria-activedescendant"];
4843
+ const _hoisted_4$i = ["id", "aria-selected", "aria-disabled", "data-tao-select-index", "onClick", "onMouseenter"];
4844
+ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
4494
4845
  ...{ name: "TaoSelect" },
4495
4846
  __name: "TaoSelect",
4496
4847
  props: {
@@ -4713,14 +5064,14 @@
4713
5064
  onClick: toggle,
4714
5065
  onKeydown: onTriggerKeydown
4715
5066
  }, [
4716
- vue.createElementVNode("span", _hoisted_2$m, vue.toDisplayString(((_a = selected.value) == null ? void 0 : _a.label) ?? vue.unref(l10n).placeholder), 1),
5067
+ vue.createElementVNode("span", _hoisted_2$o, vue.toDisplayString(((_a = selected.value) == null ? void 0 : _a.label) ?? vue.unref(l10n).placeholder), 1),
4717
5068
  vue.createElementVNode("span", {
4718
5069
  class: vue.normalizeClass(["tao-select__chevron", { "tao-select__chevron--custom": _ctx.$slots.chevron }]),
4719
5070
  "aria-hidden": "true"
4720
5071
  }, [
4721
5072
  vue.renderSlot(_ctx.$slots, "chevron", {}, void 0, true)
4722
5073
  ], 2)
4723
- ], 42, _hoisted_1$o),
5074
+ ], 42, _hoisted_1$q),
4724
5075
  (vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
4725
5076
  open.value ? (vue.openBlock(), vue.createElementBlock("div", {
4726
5077
  key: 0,
@@ -4756,9 +5107,9 @@
4756
5107
  }, ["prevent"])),
4757
5108
  onClick: ($event) => selectOption(option),
4758
5109
  onMouseenter: ($event) => !option.disabled && (activeIndex.value = index)
4759
- }, vue.toDisplayString(option.label), 43, _hoisted_4$h);
5110
+ }, vue.toDisplayString(option.label), 43, _hoisted_4$i);
4760
5111
  }), 128))
4761
- ], 40, _hoisted_3$i),
5112
+ ], 40, _hoisted_3$k),
4762
5113
  __props.clearable && selected.value ? (vue.openBlock(), vue.createElementBlock("button", {
4763
5114
  key: 0,
4764
5115
  type: "button",
@@ -4777,55 +5128,804 @@
4777
5128
  };
4778
5129
  }
4779
5130
  });
4780
- const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-47d327a3"]]);
4781
- const _hoisted_1$n = ["id", "aria-expanded", "aria-activedescendant", "aria-invalid", "aria-describedby", "disabled", "placeholder", "value"];
4782
- const _hoisted_2$l = {
5131
+ const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-47d327a3"]]);
5132
+ const clamp = (v, lo, hi) => Math.min(Math.max(v, lo), hi);
5133
+ const byte = (v) => Math.round(clamp(v, 0, 255));
5134
+ const hex2 = (v) => byte(v).toString(16).padStart(2, "0");
5135
+ function channel(text, scale) {
5136
+ const t = text.trim();
5137
+ return t.endsWith("%") ? parseFloat(t) / 100 * scale : parseFloat(t);
5138
+ }
5139
+ function parseColor(input) {
5140
+ const text = input.trim();
5141
+ const hex = /^#?([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(text);
5142
+ if (hex) {
5143
+ let h = hex[1];
5144
+ if (h.length <= 4) h = [...h].map((c) => c + c).join("");
5145
+ const n = (i) => parseInt(h.slice(i, i + 2), 16);
5146
+ return { r: n(0), g: n(2), b: n(4), a: h.length === 8 ? n(6) / 255 : 1 };
5147
+ }
5148
+ const fn = /^(rgba?|hsla?)\(\s*([^)]+?)\s*\)$/i.exec(text);
5149
+ if (fn && fn[1].toLowerCase().startsWith("hsl")) {
5150
+ const [main, slash] = fn[2].split("/");
5151
+ const parts = main.trim().split(/[\s,]+/);
5152
+ const alphaText = slash !== void 0 ? slash : parts[3];
5153
+ if (parts.length < 3 || parts.length > (slash === void 0 ? 4 : 3)) return null;
5154
+ const h = parseFloat(parts[0]);
5155
+ const s = parseFloat(parts[1]) / 100;
5156
+ const l = parseFloat(parts[2]) / 100;
5157
+ const a = alphaText === void 0 ? 1 : channel(alphaText, 1);
5158
+ if ([h, s, l, a].some((v) => Number.isNaN(v))) return null;
5159
+ return { ...hslToRgb(h, s, l), a: clamp(a, 0, 1) };
5160
+ }
5161
+ if (fn) {
5162
+ const [main, slash] = fn[2].split("/");
5163
+ const parts = main.trim().split(/[\s,]+/);
5164
+ const alphaText = slash !== void 0 ? slash : parts[3];
5165
+ if (parts.length < 3 || parts.length > (slash === void 0 ? 4 : 3)) return null;
5166
+ const r = channel(parts[0], 255);
5167
+ const g = channel(parts[1], 255);
5168
+ const b = channel(parts[2], 255);
5169
+ const a = alphaText === void 0 ? 1 : channel(alphaText, 1);
5170
+ if ([r, g, b, a].some((v) => Number.isNaN(v))) return null;
5171
+ return { r: byte(r), g: byte(g), b: byte(b), a: clamp(a, 0, 1) };
5172
+ }
5173
+ return null;
5174
+ }
5175
+ function toHex(color, alpha = false) {
5176
+ const base = `#${hex2(color.r)}${hex2(color.g)}${hex2(color.b)}`;
5177
+ return alpha ? `${base}${hex2(clamp(color.a, 0, 1) * 255)}` : base;
5178
+ }
5179
+ function rgbToHsv(r, g, b) {
5180
+ const R = clamp(r, 0, 255) / 255;
5181
+ const G = clamp(g, 0, 255) / 255;
5182
+ const B = clamp(b, 0, 255) / 255;
5183
+ const max = Math.max(R, G, B);
5184
+ const d = max - Math.min(R, G, B);
5185
+ let h = 0;
5186
+ if (d > 0) {
5187
+ if (max === R) h = (G - B) / d % 6;
5188
+ else if (max === G) h = (B - R) / d + 2;
5189
+ else h = (R - G) / d + 4;
5190
+ h *= 60;
5191
+ if (h < 0) h += 360;
5192
+ }
5193
+ return { h, s: max === 0 ? 0 : d / max, v: max };
5194
+ }
5195
+ function hsvToRgb(h, s, v) {
5196
+ const H = (h % 360 + 360) % 360 / 60;
5197
+ const S = clamp(s, 0, 1);
5198
+ const V = clamp(v, 0, 1);
5199
+ const f = (n) => {
5200
+ const k = (n + H) % 6;
5201
+ return V - V * S * Math.max(0, Math.min(k, 4 - k, 1));
5202
+ };
5203
+ return { r: f(5) * 255, g: f(3) * 255, b: f(1) * 255 };
5204
+ }
5205
+ function rgbToHsl(r, g, b) {
5206
+ const { h, s: sv, v } = rgbToHsv(r, g, b);
5207
+ const l = v * (1 - sv / 2);
5208
+ return { h, s: l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l), l };
5209
+ }
5210
+ function hslToRgb(h, s, l) {
5211
+ const S = clamp(s, 0, 1);
5212
+ const L = clamp(l, 0, 1);
5213
+ const v = L + S * Math.min(L, 1 - L);
5214
+ const rgb = hsvToRgb(h, v === 0 ? 0 : 2 * (1 - L / v), v);
5215
+ return { r: byte(rgb.r), g: byte(rgb.g), b: byte(rgb.b) };
5216
+ }
5217
+ const rgbaToHsva = (c) => ({ ...rgbToHsv(c.r, c.g, c.b), a: c.a });
5218
+ const hsvaToRgba = (c) => ({ ...hsvToRgb(c.h, c.s, c.v), a: c.a });
5219
+ const linearToSrgb = (c) => {
5220
+ const x = clamp(c, 0, 1);
5221
+ return x <= 31308e-7 ? x * 12.92 : 1.055 * Math.pow(x, 1 / 2.4) - 0.055;
5222
+ };
5223
+ const srgbToLinear = (c) => {
5224
+ const x = clamp(c, 0, 1);
5225
+ return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
5226
+ };
5227
+ function normalizeHex(input, alpha = false) {
5228
+ const c = parseColor(input);
5229
+ return c ? toHex(c, alpha) : null;
5230
+ }
5231
+ const segmentedKey = Symbol("taoSegmented");
5232
+ const _hoisted_1$p = ["disabled", "aria-describedby", "aria-invalid", "aria-labelledby", "id"];
5233
+ const _hoisted_2$n = {
4783
5234
  key: 0,
4784
- class: "tao-combobox__empty"
5235
+ class: "tao-segmented__legend"
4785
5236
  };
4786
- const _hoisted_3$h = ["id", "aria-selected", "aria-disabled", "data-tao-combobox-index", "onClick", "onMouseenter"];
4787
- const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
4788
- ...{ name: "TaoCombobox" },
4789
- __name: "TaoCombobox",
5237
+ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
5238
+ ...{ name: "TaoSegmented" },
5239
+ __name: "TaoSegmented",
4790
5240
  props: {
4791
- modelValue: { default: null },
4792
- options: { default: () => [] },
4793
- placeholder: {},
5241
+ modelValue: { type: [String, Number, Boolean] },
5242
+ name: {},
5243
+ legend: {},
4794
5244
  disabled: { type: Boolean, default: false },
4795
5245
  error: { type: Boolean, default: false },
4796
- emptyText: {},
4797
- clearText: {},
4798
- clearable: { type: Boolean, default: true },
4799
5246
  size: {},
4800
- allowCreate: { type: Boolean, default: false }
5247
+ block: { type: Boolean, default: false }
4801
5248
  },
4802
- emits: ["update:modelValue", "change", "create"],
5249
+ emits: ["update:modelValue", "change"],
4803
5250
  setup(__props, { emit: __emit }) {
4804
5251
  const props = __props;
4805
- const l10n = useLocaleText(props, "combobox");
4806
5252
  const emit = __emit;
4807
5253
  const field = vue.inject(formFieldKey, null);
4808
- const localId = vue.useId();
4809
- const listId = `${localId}-list`;
4810
- const controlId = vue.computed(() => (field == null ? void 0 : field.id) ?? localId);
5254
+ const autoName = vue.useId();
5255
+ const groupName = vue.computed(() => props.name || autoName);
5256
+ const model = vue.computed(() => props.modelValue);
5257
+ const groupDisabled = vue.computed(() => props.disabled);
4811
5258
  const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
4812
5259
  const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
4813
- const open = vue.ref(false);
4814
- const focused = vue.ref(false);
4815
- const picking = vue.ref(false);
4816
- const skipFocusOpen = vue.ref(false);
4817
- const query = vue.ref("");
4818
- const activeIndex = vue.ref(-1);
4819
- const fieldRef = vue.ref(null);
4820
- const inputRef = vue.ref(null);
4821
- const panelRef = vue.ref(null);
4822
- const panelSize = vue.ref("medium");
4823
- const listRef = vue.ref(null);
4824
- const listStyle = vue.ref({ top: "0px", left: "0px", width: "0px" });
4825
- const selected = vue.computed(() => {
4826
- const found = props.options.find((option) => option.value === props.modelValue);
4827
- if (found) {
4828
- return found;
5260
+ const trackRef = vue.ref(null);
5261
+ const thumbStyle = vue.ref({ opacity: "0" });
5262
+ let resizeObserver = null;
5263
+ let mutationObserver = null;
5264
+ function setValue(value) {
5265
+ emit("update:modelValue", value);
5266
+ emit("change", value);
5267
+ }
5268
+ function updateThumb() {
5269
+ const track = trackRef.value;
5270
+ if (!track) {
5271
+ return;
5272
+ }
5273
+ const selected = track.querySelector(".tao-segmented-option--checked");
5274
+ if (!selected) {
5275
+ if (thumbStyle.value.opacity !== "0") {
5276
+ thumbStyle.value = { opacity: "0" };
5277
+ }
5278
+ return;
5279
+ }
5280
+ const trackBox = track.getBoundingClientRect();
5281
+ const optionBox = selected.getBoundingClientRect();
5282
+ const next = {
5283
+ width: `${optionBox.width}px`,
5284
+ height: `${optionBox.height}px`,
5285
+ transform: `translate(${optionBox.left - trackBox.left - track.clientLeft}px, ${optionBox.top - trackBox.top - track.clientTop}px)`,
5286
+ opacity: "1"
5287
+ };
5288
+ const prev = thumbStyle.value;
5289
+ if (prev.width === next.width && prev.height === next.height && prev.transform === next.transform && prev.opacity === next.opacity) {
5290
+ return;
5291
+ }
5292
+ thumbStyle.value = next;
5293
+ }
5294
+ vue.provide(segmentedKey, {
5295
+ name: groupName,
5296
+ model,
5297
+ disabled: groupDisabled,
5298
+ setValue
5299
+ });
5300
+ vue.onMounted(() => {
5301
+ const track = trackRef.value;
5302
+ void vue.nextTick(updateThumb);
5303
+ if (!track) {
5304
+ return;
5305
+ }
5306
+ if (typeof ResizeObserver !== "undefined") {
5307
+ resizeObserver = new ResizeObserver(() => updateThumb());
5308
+ resizeObserver.observe(track);
5309
+ }
5310
+ mutationObserver = new MutationObserver(() => updateThumb());
5311
+ mutationObserver.observe(track, {
5312
+ subtree: true,
5313
+ childList: true,
5314
+ attributes: true,
5315
+ attributeFilter: ["class"]
5316
+ });
5317
+ });
5318
+ vue.watch(
5319
+ () => [props.modelValue, props.size, props.block, props.disabled],
5320
+ () => {
5321
+ void vue.nextTick(updateThumb);
5322
+ }
5323
+ );
5324
+ vue.onBeforeUnmount(() => {
5325
+ resizeObserver == null ? void 0 : resizeObserver.disconnect();
5326
+ resizeObserver = null;
5327
+ mutationObserver == null ? void 0 : mutationObserver.disconnect();
5328
+ mutationObserver = null;
5329
+ });
5330
+ return (_ctx, _cache) => {
5331
+ var _a;
5332
+ return vue.openBlock(), vue.createElementBlock("fieldset", {
5333
+ class: vue.normalizeClass(["tao-segmented", [
5334
+ vue.unref(sizeClass)(__props.size),
5335
+ {
5336
+ "tao-segmented--block": __props.block,
5337
+ "tao-segmented--disabled": __props.disabled,
5338
+ "tao-segmented--invalid": invalid.value
5339
+ }
5340
+ ]]),
5341
+ disabled: __props.disabled,
5342
+ "aria-describedby": describedBy.value,
5343
+ "aria-invalid": invalid.value || void 0,
5344
+ "aria-labelledby": __props.legend ? void 0 : vue.unref(field) ? `${vue.unref(field).id}-label` : void 0,
5345
+ id: (_a = vue.unref(field)) == null ? void 0 : _a.id
5346
+ }, [
5347
+ __props.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_2$n, vue.toDisplayString(__props.legend), 1)) : vue.createCommentVNode("", true),
5348
+ vue.createElementVNode("div", {
5349
+ ref_key: "trackRef",
5350
+ ref: trackRef,
5351
+ class: "tao-segmented__track"
5352
+ }, [
5353
+ vue.createElementVNode("div", {
5354
+ class: "tao-segmented__thumb",
5355
+ style: vue.normalizeStyle(thumbStyle.value),
5356
+ "aria-hidden": "true"
5357
+ }, null, 4),
5358
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
5359
+ ], 512)
5360
+ ], 10, _hoisted_1$p);
5361
+ };
5362
+ }
5363
+ });
5364
+ const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-7dc6820f"]]);
5365
+ const _hoisted_1$o = ["for"];
5366
+ const _hoisted_2$m = ["id", "name", "value", "checked", "disabled", "aria-label"];
5367
+ const _hoisted_3$j = { class: "tao-segmented-option__face" };
5368
+ const _hoisted_4$h = {
5369
+ key: 0,
5370
+ class: "tao-segmented-option__icon",
5371
+ "aria-hidden": "true"
5372
+ };
5373
+ const _hoisted_5$f = {
5374
+ key: 1,
5375
+ class: "tao-segmented-option__label"
5376
+ };
5377
+ const _hoisted_6$c = {
5378
+ key: 2,
5379
+ class: "tao-segmented-option__sr"
5380
+ };
5381
+ const _hoisted_7$a = {
5382
+ key: 3,
5383
+ class: "tao-segmented-option__count"
5384
+ };
5385
+ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
5386
+ ...{ name: "TaoSegmentedOption" },
5387
+ __name: "TaoSegmentedOption",
5388
+ props: {
5389
+ value: { type: [String, Number, Boolean] },
5390
+ modelValue: { type: [String, Number, Boolean] },
5391
+ name: {},
5392
+ label: { default: "" },
5393
+ icon: { default: "" },
5394
+ count: {},
5395
+ disabled: { type: Boolean, default: false },
5396
+ ariaLabel: {}
5397
+ },
5398
+ emits: ["update:modelValue", "change"],
5399
+ setup(__props, { emit: __emit }) {
5400
+ const props = __props;
5401
+ const emit = __emit;
5402
+ const group = vue.inject(segmentedKey, null);
5403
+ const slots = vue.useSlots();
5404
+ const localId = vue.useId();
5405
+ const isDisabled = vue.computed(() => props.disabled || Boolean(group == null ? void 0 : group.disabled.value));
5406
+ const inputName = vue.computed(() => (group == null ? void 0 : group.name.value) ?? props.name);
5407
+ const isChecked = vue.computed(() => {
5408
+ const current2 = group ? group.model.value : props.modelValue;
5409
+ return current2 === props.value;
5410
+ });
5411
+ const hasLabel = vue.computed(() => Boolean(props.label || slots.default));
5412
+ const isIconOnly = vue.computed(() => Boolean((props.icon || slots.icon) && !hasLabel.value));
5413
+ const countLabel = vue.computed(() => {
5414
+ if (props.count === void 0 || props.count === null || props.count === "") {
5415
+ return "";
5416
+ }
5417
+ if (typeof props.count === "number") {
5418
+ if (props.count > 99) {
5419
+ return "99+";
5420
+ }
5421
+ return String(props.count);
5422
+ }
5423
+ return String(props.count);
5424
+ });
5425
+ function onChange() {
5426
+ if (isDisabled.value) {
5427
+ return;
5428
+ }
5429
+ if (group) {
5430
+ group.setValue(props.value);
5431
+ return;
5432
+ }
5433
+ emit("update:modelValue", props.value);
5434
+ emit("change", props.value);
5435
+ }
5436
+ return (_ctx, _cache) => {
5437
+ return vue.openBlock(), vue.createElementBlock("label", {
5438
+ class: vue.normalizeClass(["tao-segmented-option", {
5439
+ "tao-segmented-option--checked": isChecked.value,
5440
+ "tao-segmented-option--disabled": props.disabled,
5441
+ "tao-segmented-option--icon-only": isIconOnly.value
5442
+ }]),
5443
+ for: vue.unref(localId)
5444
+ }, [
5445
+ vue.createElementVNode("input", {
5446
+ id: vue.unref(localId),
5447
+ class: "tao-segmented-option__input",
5448
+ type: "radio",
5449
+ name: inputName.value,
5450
+ value: String(__props.value),
5451
+ checked: isChecked.value,
5452
+ disabled: isDisabled.value,
5453
+ "aria-label": __props.ariaLabel,
5454
+ onChange
5455
+ }, null, 40, _hoisted_2$m),
5456
+ vue.createElementVNode("span", _hoisted_3$j, [
5457
+ __props.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$h, [
5458
+ vue.renderSlot(_ctx.$slots, "icon", {}, () => [
5459
+ vue.createTextVNode(vue.toDisplayString(__props.icon), 1)
5460
+ ], true)
5461
+ ])) : vue.createCommentVNode("", true),
5462
+ hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$f, [
5463
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
5464
+ vue.createTextVNode(vue.toDisplayString(__props.label), 1)
5465
+ ], true)
5466
+ ])) : __props.ariaLabel ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$c, vue.toDisplayString(__props.ariaLabel), 1)) : vue.createCommentVNode("", true),
5467
+ countLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$a, vue.toDisplayString(countLabel.value), 1)) : vue.createCommentVNode("", true)
5468
+ ])
5469
+ ], 10, _hoisted_1$o);
5470
+ };
5471
+ }
5472
+ });
5473
+ const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-fba7ca12"]]);
5474
+ const _hoisted_1$n = ["tabindex", "aria-label", "aria-valuetext", "aria-valuenow"];
5475
+ const _hoisted_2$l = { class: "tao-color-picker__strips" };
5476
+ const _hoisted_3$i = { class: "tao-color-picker__row" };
5477
+ const _hoisted_4$g = { class: "tao-color-picker__preview" };
5478
+ const _hoisted_5$e = {
5479
+ key: 1,
5480
+ class: "tao-color-picker__channels"
5481
+ };
5482
+ const _hoisted_6$b = ["disabled", "aria-label", "title"];
5483
+ const _hoisted_7$9 = ["aria-label"];
5484
+ const _hoisted_8$9 = ["disabled", "aria-label", "title", "onClick"];
5485
+ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
5486
+ ...{ name: "TaoColorPicker" },
5487
+ __name: "TaoColorPicker",
5488
+ props: {
5489
+ modelValue: {},
5490
+ alpha: { type: Boolean, default: false },
5491
+ swatches: {},
5492
+ modes: { default: () => ["hex", "rgb", "hsl"] },
5493
+ mode: {},
5494
+ eyedropper: { type: Boolean, default: true },
5495
+ disabled: { type: Boolean, default: false },
5496
+ size: {},
5497
+ areaLabel: {},
5498
+ hueLabel: {},
5499
+ alphaLabel: {},
5500
+ hexLabel: {},
5501
+ modeLabel: {},
5502
+ swatchesLabel: {},
5503
+ eyedropperLabel: {}
5504
+ },
5505
+ emits: ["update:modelValue", "update:mode", "change"],
5506
+ setup(__props, { emit: __emit }) {
5507
+ const props = __props;
5508
+ const emit = __emit;
5509
+ const l10n = useLocaleText(props, "colorPicker");
5510
+ const state = vue.reactive({ h: 0, s: 0, v: 0, a: 1 });
5511
+ const hex = vue.computed(() => toHex(hsvaToRgba(state), props.alpha));
5512
+ function load(value) {
5513
+ const c = parseColor(value);
5514
+ if (!c) return;
5515
+ const next = rgbaToHsva(c);
5516
+ state.h = next.s === 0 || next.v === 0 ? state.h : next.h;
5517
+ state.s = next.s;
5518
+ state.v = next.v;
5519
+ state.a = props.alpha ? next.a : 1;
5520
+ }
5521
+ load(props.modelValue);
5522
+ vue.watch(
5523
+ () => props.modelValue,
5524
+ (value) => {
5525
+ if (normalizeHex(value, props.alpha) !== hex.value) load(value);
5526
+ }
5527
+ );
5528
+ vue.watch(
5529
+ () => props.alpha,
5530
+ () => load(props.modelValue)
5531
+ );
5532
+ const currentMode = vue.ref(props.mode ?? props.modes[0] ?? "hex");
5533
+ vue.watch(
5534
+ () => props.mode,
5535
+ (m) => {
5536
+ if (m) currentMode.value = m;
5537
+ }
5538
+ );
5539
+ const activeMode = vue.computed(() => props.modes.includes(currentMode.value) ? currentMode.value : props.modes[0] ?? "hex");
5540
+ const modeValue = vue.computed({
5541
+ get: () => activeMode.value,
5542
+ set: (m) => {
5543
+ currentMode.value = m;
5544
+ emit("update:mode", m);
5545
+ }
5546
+ });
5547
+ const rgbFields = vue.computed(() => {
5548
+ const c = hsvaToRgba(state);
5549
+ return [Math.round(c.r), Math.round(c.g), Math.round(c.b)];
5550
+ });
5551
+ const hslFields = vue.computed(() => {
5552
+ const [r, g, b] = rgbFields.value;
5553
+ const { s, l } = rgbToHsl(r, g, b);
5554
+ return [Math.round(state.h) % 360, Math.round(s * 100), Math.round(l * 100)];
5555
+ });
5556
+ const alphaPercent = vue.computed(() => Math.round(state.a * 100));
5557
+ const channels = vue.computed(() => {
5558
+ const list = [];
5559
+ if (activeMode.value === "rgb") {
5560
+ ["R", "G", "B"].forEach((label, index) => list.push({ key: label, label, max: 255, value: rgbFields.value[index], kind: "rgb", index }));
5561
+ } else if (activeMode.value === "hsl") {
5562
+ const max = [360, 100, 100];
5563
+ ["H", "S", "L"].forEach((label, index) => list.push({ key: label, label, max: max[index], value: hslFields.value[index], kind: "hsl", index }));
5564
+ }
5565
+ if (activeMode.value !== "hex" && props.alpha) list.push({ key: "A", label: "A", max: 100, value: alphaPercent.value, kind: "alpha", index: 0 });
5566
+ return list;
5567
+ });
5568
+ function commitChannel(kind, index, value) {
5569
+ if (value === null || !Number.isFinite(value)) return;
5570
+ if (kind === "alpha") {
5571
+ state.a = Math.min(100, Math.max(0, value)) / 100;
5572
+ } else if (kind === "rgb") {
5573
+ const next = [...rgbFields.value];
5574
+ next[index] = Math.min(255, Math.max(0, Math.round(value)));
5575
+ load(toHex({ r: next[0], g: next[1], b: next[2], a: state.a }, true));
5576
+ } else {
5577
+ const next = [...hslFields.value];
5578
+ next[index] = value;
5579
+ const rgb = hslToRgb((next[0] % 360 + 360) % 360, next[1] / 100, next[2] / 100);
5580
+ load(toHex({ ...rgb, a: state.a }, true));
5581
+ state.h = (next[0] % 360 + 360) % 360;
5582
+ }
5583
+ push(true);
5584
+ }
5585
+ const hexText = vue.ref(hex.value);
5586
+ const hexInvalid = vue.ref(false);
5587
+ vue.watch(hex, (h) => {
5588
+ hexText.value = h;
5589
+ hexInvalid.value = false;
5590
+ });
5591
+ function push(final = false) {
5592
+ emit("update:modelValue", hex.value);
5593
+ if (final) emit("change", hex.value);
5594
+ }
5595
+ const areaRef = vue.ref(null);
5596
+ let dragging = -1;
5597
+ function fromPointer(e) {
5598
+ const el = areaRef.value;
5599
+ if (!el) return;
5600
+ const r = el.getBoundingClientRect();
5601
+ state.s = r.width ? Math.min(1, Math.max(0, (e.clientX - r.left) / r.width)) : 0;
5602
+ state.v = r.height ? 1 - Math.min(1, Math.max(0, (e.clientY - r.top) / r.height)) : 0;
5603
+ push();
5604
+ }
5605
+ function onAreaDown(e) {
5606
+ var _a, _b;
5607
+ if (props.disabled || e.button !== 0) return;
5608
+ dragging = e.pointerId;
5609
+ fromPointer(e);
5610
+ e.preventDefault();
5611
+ (_a = areaRef.value) == null ? void 0 : _a.focus({ preventScroll: true });
5612
+ try {
5613
+ (_b = areaRef.value) == null ? void 0 : _b.setPointerCapture(e.pointerId);
5614
+ } catch {
5615
+ }
5616
+ }
5617
+ function onAreaMove(e) {
5618
+ if (dragging === e.pointerId) fromPointer(e);
5619
+ }
5620
+ function onAreaUp(e) {
5621
+ if (dragging !== e.pointerId) return;
5622
+ dragging = -1;
5623
+ emit("change", hex.value);
5624
+ }
5625
+ function onAreaKey(e) {
5626
+ if (props.disabled) return;
5627
+ const k = e.shiftKey ? 0.1 : 0.01;
5628
+ const keys = { ArrowLeft: [-k, 0], ArrowRight: [k, 0], ArrowUp: [0, k], ArrowDown: [0, -k] };
5629
+ const d = keys[e.key];
5630
+ if (!d) return;
5631
+ e.preventDefault();
5632
+ state.s = Math.min(1, Math.max(0, Math.round((state.s + d[0]) * 1e3) / 1e3));
5633
+ state.v = Math.min(1, Math.max(0, Math.round((state.v + d[1]) * 1e3) / 1e3));
5634
+ push(true);
5635
+ }
5636
+ const hueValue = vue.computed({ get: () => state.h, set: (v) => (state.h = v, push()) });
5637
+ const alphaValue = vue.computed({ get: () => state.a, set: (v) => (state.a = v, push()) });
5638
+ const hueCss = vue.computed(() => toHex(hsvaToRgba({ h: state.h, s: 1, v: 1, a: 1 })));
5639
+ const solidCss = vue.computed(() => toHex(hsvaToRgba({ ...state, a: 1 })));
5640
+ function commitHex() {
5641
+ const next = normalizeHex(hexText.value, props.alpha);
5642
+ if (!next) {
5643
+ hexInvalid.value = true;
5644
+ return;
5645
+ }
5646
+ hexInvalid.value = false;
5647
+ load(next);
5648
+ hexText.value = hex.value;
5649
+ push(true);
5650
+ }
5651
+ function pick(color) {
5652
+ if (props.disabled) return;
5653
+ load(color);
5654
+ push(true);
5655
+ }
5656
+ const canEyedrop = vue.computed(() => props.eyedropper && typeof window !== "undefined" && "EyeDropper" in window);
5657
+ async function eyedrop() {
5658
+ try {
5659
+ const EyeDropperCtor = window.EyeDropper;
5660
+ const { sRGBHex } = await new EyeDropperCtor().open();
5661
+ pick(sRGBHex);
5662
+ } catch {
5663
+ }
5664
+ }
5665
+ const areaText = vue.computed(() => `${Math.round(state.s * 100)}%, ${Math.round(state.v * 100)}%`);
5666
+ return (_ctx, _cache) => {
5667
+ var _a;
5668
+ return vue.openBlock(), vue.createElementBlock("div", {
5669
+ class: vue.normalizeClass(["tao-color-picker", [vue.unref(sizeClass)(__props.size), { "tao-color-picker--disabled": __props.disabled }]])
5670
+ }, [
5671
+ vue.createElementVNode("div", {
5672
+ ref_key: "areaRef",
5673
+ ref: areaRef,
5674
+ class: "tao-color-picker__area",
5675
+ style: vue.normalizeStyle({ backgroundColor: hueCss.value }),
5676
+ role: "slider",
5677
+ tabindex: __props.disabled ? -1 : 0,
5678
+ "aria-label": vue.unref(l10n).areaLabel,
5679
+ "aria-valuetext": areaText.value,
5680
+ "aria-valuenow": Math.round(state.s * 100),
5681
+ "aria-valuemin": "0",
5682
+ "aria-valuemax": "100",
5683
+ onPointerdown: onAreaDown,
5684
+ onPointermove: onAreaMove,
5685
+ onPointerup: onAreaUp,
5686
+ onPointercancel: onAreaUp,
5687
+ onKeydown: onAreaKey
5688
+ }, [
5689
+ vue.createElementVNode("span", {
5690
+ class: "tao-color-picker__cursor",
5691
+ style: vue.normalizeStyle({ left: `${state.s * 100}%`, top: `${(1 - state.v) * 100}%`, backgroundColor: solidCss.value })
5692
+ }, null, 4)
5693
+ ], 44, _hoisted_1$n),
5694
+ vue.createElementVNode("div", _hoisted_2$l, [
5695
+ vue.createVNode(_sfc_main$U, {
5696
+ modelValue: hueValue.value,
5697
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => hueValue.value = $event),
5698
+ class: "tao-color-picker__hue",
5699
+ variant: "thin",
5700
+ min: 0,
5701
+ max: 360,
5702
+ step: 1,
5703
+ disabled: __props.disabled,
5704
+ "aria-label": vue.unref(l10n).hueLabel,
5705
+ onChange: _cache[1] || (_cache[1] = ($event) => emit("change", hex.value))
5706
+ }, null, 8, ["modelValue", "disabled", "aria-label"]),
5707
+ __props.alpha ? (vue.openBlock(), vue.createBlock(_sfc_main$U, {
5708
+ key: 0,
5709
+ modelValue: alphaValue.value,
5710
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => alphaValue.value = $event),
5711
+ class: "tao-color-picker__alpha",
5712
+ variant: "thin",
5713
+ min: 0,
5714
+ max: 1,
5715
+ step: 0.01,
5716
+ disabled: __props.disabled,
5717
+ "aria-label": vue.unref(l10n).alphaLabel,
5718
+ style: vue.normalizeStyle({ "--tao-color-picker-solid": solidCss.value }),
5719
+ onChange: _cache[3] || (_cache[3] = ($event) => emit("change", hex.value))
5720
+ }, null, 8, ["modelValue", "disabled", "aria-label", "style"])) : vue.createCommentVNode("", true)
5721
+ ]),
5722
+ __props.modes.length > 1 ? (vue.openBlock(), vue.createBlock(TaoSegmented, {
5723
+ key: 0,
5724
+ modelValue: modeValue.value,
5725
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => modeValue.value = $event),
5726
+ class: "tao-color-picker__modes",
5727
+ size: "small",
5728
+ "aria-label": vue.unref(l10n).modeLabel,
5729
+ disabled: __props.disabled
5730
+ }, {
5731
+ default: vue.withCtx(() => [
5732
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.modes, (m) => {
5733
+ return vue.openBlock(), vue.createBlock(TaoSegmentedOption, {
5734
+ key: m,
5735
+ value: m,
5736
+ label: m.toUpperCase()
5737
+ }, null, 8, ["value", "label"]);
5738
+ }), 128))
5739
+ ]),
5740
+ _: 1
5741
+ }, 8, ["modelValue", "aria-label", "disabled"])) : vue.createCommentVNode("", true),
5742
+ vue.createElementVNode("div", _hoisted_3$i, [
5743
+ vue.createElementVNode("span", _hoisted_4$g, [
5744
+ vue.createElementVNode("span", {
5745
+ style: vue.normalizeStyle({ backgroundColor: hex.value })
5746
+ }, null, 4)
5747
+ ]),
5748
+ activeMode.value === "hex" ? (vue.openBlock(), vue.createBlock(TaoInput, {
5749
+ key: 0,
5750
+ modelValue: hexText.value,
5751
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => hexText.value = $event),
5752
+ class: "tao-color-picker__hex",
5753
+ size: "small",
5754
+ error: hexInvalid.value,
5755
+ disabled: __props.disabled,
5756
+ "aria-label": vue.unref(l10n).hexLabel,
5757
+ onBlur: commitHex,
5758
+ onKeydown: vue.withKeys(commitHex, ["enter"])
5759
+ }, null, 8, ["modelValue", "error", "disabled", "aria-label"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$e, [
5760
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(channels.value, (c) => {
5761
+ return vue.openBlock(), vue.createElementBlock("label", {
5762
+ key: c.key,
5763
+ class: "tao-color-picker__channel"
5764
+ }, [
5765
+ vue.createElementVNode("span", null, vue.toDisplayString(c.label), 1),
5766
+ vue.createVNode(TaoInputNumber, {
5767
+ size: "small",
5768
+ controls: false,
5769
+ min: 0,
5770
+ max: c.max,
5771
+ step: 1,
5772
+ "model-value": c.value,
5773
+ disabled: __props.disabled,
5774
+ onCommit: (v) => commitChannel(c.kind, c.index, v)
5775
+ }, null, 8, ["max", "model-value", "disabled", "onCommit"])
5776
+ ]);
5777
+ }), 128))
5778
+ ])),
5779
+ canEyedrop.value ? (vue.openBlock(), vue.createElementBlock("button", {
5780
+ key: 2,
5781
+ type: "button",
5782
+ class: "tao-color-picker__eyedropper",
5783
+ disabled: __props.disabled,
5784
+ "aria-label": vue.unref(l10n).eyedropperLabel,
5785
+ title: vue.unref(l10n).eyedropperLabel,
5786
+ onClick: eyedrop
5787
+ }, " ✎ ", 8, _hoisted_6$b)) : vue.createCommentVNode("", true)
5788
+ ]),
5789
+ ((_a = __props.swatches) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("div", {
5790
+ key: 1,
5791
+ class: "tao-color-picker__swatches",
5792
+ role: "group",
5793
+ "aria-label": vue.unref(l10n).swatchesLabel
5794
+ }, [
5795
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.swatches, (s) => {
5796
+ return vue.openBlock(), vue.createElementBlock("button", {
5797
+ key: s,
5798
+ type: "button",
5799
+ class: vue.normalizeClass(["tao-color-picker__swatch", { "tao-color-picker__swatch--on": vue.unref(normalizeHex)(s, __props.alpha) === hex.value }]),
5800
+ style: vue.normalizeStyle({ backgroundColor: s }),
5801
+ disabled: __props.disabled,
5802
+ "aria-label": s,
5803
+ title: s,
5804
+ onClick: ($event) => pick(s)
5805
+ }, null, 14, _hoisted_8$9);
5806
+ }), 128))
5807
+ ], 8, _hoisted_7$9)) : vue.createCommentVNode("", true)
5808
+ ], 2);
5809
+ };
5810
+ }
5811
+ });
5812
+ const TaoColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-9fe54966"]]);
5813
+ const _hoisted_1$m = ["disabled", "aria-label", "aria-expanded"];
5814
+ const _hoisted_2$k = { class: "tao-color-input__swatch" };
5815
+ const _hoisted_3$h = { class: "tao-color-input__text" };
5816
+ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
5817
+ ...{ name: "TaoColorInput" },
5818
+ __name: "TaoColorInput",
5819
+ props: {
5820
+ modelValue: {},
5821
+ alpha: { type: Boolean, default: false },
5822
+ swatches: {},
5823
+ modes: { default: () => ["hex", "rgb", "hsl"] },
5824
+ mode: {},
5825
+ eyedropper: { type: Boolean, default: true },
5826
+ disabled: { type: Boolean, default: false },
5827
+ error: { type: Boolean, default: false },
5828
+ position: { default: "bottom" },
5829
+ size: {},
5830
+ chooseLabel: {}
5831
+ },
5832
+ emits: ["update:modelValue", "update:mode", "change"],
5833
+ setup(__props, { emit: __emit }) {
5834
+ const props = __props;
5835
+ const emit = __emit;
5836
+ const l10n = useLocaleText(props, "colorPicker");
5837
+ const shown = vue.computed(() => normalizeHex(props.modelValue, props.alpha) ?? props.modelValue);
5838
+ return (_ctx, _cache) => {
5839
+ return vue.openBlock(), vue.createBlock(TaoPopover, {
5840
+ position: __props.position,
5841
+ disabled: __props.disabled,
5842
+ class: "tao-color-input-root"
5843
+ }, {
5844
+ trigger: vue.withCtx(({ open }) => [
5845
+ vue.createElementVNode("button", {
5846
+ type: "button",
5847
+ class: vue.normalizeClass(["tao-color-input", [vue.unref(sizeClass)(__props.size), { "tao-color-input--open": open, "tao-color-input--invalid": __props.error }]]),
5848
+ disabled: __props.disabled,
5849
+ "aria-label": `${vue.unref(l10n).chooseLabel}: ${shown.value}`,
5850
+ "aria-haspopup": "dialog",
5851
+ "aria-expanded": open
5852
+ }, [
5853
+ vue.createElementVNode("span", _hoisted_2$k, [
5854
+ vue.createElementVNode("span", {
5855
+ style: vue.normalizeStyle({ backgroundColor: shown.value })
5856
+ }, null, 4)
5857
+ ]),
5858
+ vue.createElementVNode("span", _hoisted_3$h, vue.toDisplayString(shown.value), 1)
5859
+ ], 10, _hoisted_1$m)
5860
+ ]),
5861
+ default: vue.withCtx(() => [
5862
+ vue.createVNode(TaoColorPicker, {
5863
+ "model-value": __props.modelValue,
5864
+ alpha: __props.alpha,
5865
+ swatches: __props.swatches,
5866
+ modes: __props.modes,
5867
+ mode: __props.mode,
5868
+ eyedropper: __props.eyedropper,
5869
+ size: __props.size,
5870
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event)),
5871
+ "onUpdate:mode": _cache[1] || (_cache[1] = ($event) => emit("update:mode", $event)),
5872
+ onChange: _cache[2] || (_cache[2] = ($event) => emit("change", $event))
5873
+ }, null, 8, ["model-value", "alpha", "swatches", "modes", "mode", "eyedropper", "size"])
5874
+ ]),
5875
+ _: 1
5876
+ }, 8, ["position", "disabled"]);
5877
+ };
5878
+ }
5879
+ });
5880
+ const TaoColorInput = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-cc186067"]]);
5881
+ const _hoisted_1$l = ["id", "aria-expanded", "aria-activedescendant", "aria-invalid", "aria-describedby", "disabled", "placeholder", "value"];
5882
+ const _hoisted_2$j = {
5883
+ key: 0,
5884
+ class: "tao-combobox__empty"
5885
+ };
5886
+ const _hoisted_3$g = ["id", "aria-selected", "aria-disabled", "data-tao-combobox-index", "onClick", "onMouseenter"];
5887
+ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
5888
+ ...{ name: "TaoCombobox" },
5889
+ __name: "TaoCombobox",
5890
+ props: {
5891
+ modelValue: { default: null },
5892
+ options: { default: () => [] },
5893
+ placeholder: {},
5894
+ disabled: { type: Boolean, default: false },
5895
+ error: { type: Boolean, default: false },
5896
+ emptyText: {},
5897
+ clearText: {},
5898
+ clearable: { type: Boolean, default: true },
5899
+ size: {},
5900
+ allowCreate: { type: Boolean, default: false }
5901
+ },
5902
+ emits: ["update:modelValue", "change", "create"],
5903
+ setup(__props, { emit: __emit }) {
5904
+ const props = __props;
5905
+ const l10n = useLocaleText(props, "combobox");
5906
+ const emit = __emit;
5907
+ const field = vue.inject(formFieldKey, null);
5908
+ const localId = vue.useId();
5909
+ const listId = `${localId}-list`;
5910
+ const controlId = vue.computed(() => (field == null ? void 0 : field.id) ?? localId);
5911
+ const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
5912
+ const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
5913
+ const open = vue.ref(false);
5914
+ const focused = vue.ref(false);
5915
+ const picking = vue.ref(false);
5916
+ const skipFocusOpen = vue.ref(false);
5917
+ const query = vue.ref("");
5918
+ const activeIndex = vue.ref(-1);
5919
+ const fieldRef = vue.ref(null);
5920
+ const inputRef = vue.ref(null);
5921
+ const panelRef = vue.ref(null);
5922
+ const panelSize = vue.ref("medium");
5923
+ const listRef = vue.ref(null);
5924
+ const listStyle = vue.ref({ top: "0px", left: "0px", width: "0px" });
5925
+ const selected = vue.computed(() => {
5926
+ const found = props.options.find((option) => option.value === props.modelValue);
5927
+ if (found) {
5928
+ return found;
4829
5929
  }
4830
5930
  if (props.modelValue === null || props.modelValue === void 0 || props.modelValue === "") {
4831
5931
  return null;
@@ -5213,7 +6313,7 @@
5213
6313
  onFocus,
5214
6314
  onBlur,
5215
6315
  onKeydown: onInputKeydown
5216
- }, null, 40, _hoisted_1$n),
6316
+ }, null, 40, _hoisted_1$l),
5217
6317
  vue.createElementVNode("span", {
5218
6318
  class: vue.normalizeClass(["tao-combobox__chevron", { "tao-combobox__chevron--custom": _ctx.$slots.chevron }]),
5219
6319
  "aria-hidden": "true"
@@ -5236,7 +6336,7 @@
5236
6336
  class: "tao-combobox__list",
5237
6337
  role: "listbox"
5238
6338
  }, [
5239
- !rows.value.length ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$l, [
6339
+ !rows.value.length ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$j, [
5240
6340
  vue.renderSlot(_ctx.$slots, "empty", {}, () => [
5241
6341
  vue.createTextVNode(vue.toDisplayString(vue.unref(l10n).emptyText), 1)
5242
6342
  ], true)
@@ -5266,7 +6366,7 @@
5266
6366
  ], true, 0) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
5267
6367
  vue.createTextVNode(vue.toDisplayString(row.option.label), 1)
5268
6368
  ], 64))
5269
- ], 42, _hoisted_3$h);
6369
+ ], 42, _hoisted_3$g);
5270
6370
  }), 128))
5271
6371
  ], 512),
5272
6372
  __props.clearable && selected.value ? (vue.openBlock(), vue.createElementBlock("button", {
@@ -5286,7 +6386,7 @@
5286
6386
  };
5287
6387
  }
5288
6388
  });
5289
- const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-e75a5550"]]);
6389
+ const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-e75a5550"]]);
5290
6390
  const ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
5291
6391
  function formatTaoDateIso(parts) {
5292
6392
  return `${String(parts.y).padStart(4, "0")}-${String(parts.m).padStart(2, "0")}-${String(parts.d).padStart(2, "0")}`;
@@ -5429,16 +6529,16 @@
5429
6529
  };
5430
6530
  });
5431
6531
  }
5432
- const _hoisted_1$m = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
5433
- const _hoisted_2$k = { class: "tao-date__value" };
5434
- const _hoisted_3$g = {
6532
+ const _hoisted_1$k = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
6533
+ const _hoisted_2$i = { class: "tao-date__value" };
6534
+ const _hoisted_3$f = {
5435
6535
  class: "tao-date__icon",
5436
6536
  "aria-hidden": "true"
5437
6537
  };
5438
- const _hoisted_4$g = ["aria-label"];
5439
- const _hoisted_5$e = { class: "tao-date__header" };
5440
- const _hoisted_6$b = ["aria-label"];
5441
- const _hoisted_7$9 = { "aria-hidden": "true" };
6538
+ const _hoisted_4$f = ["aria-label"];
6539
+ const _hoisted_5$d = { class: "tao-date__header" };
6540
+ const _hoisted_6$a = ["aria-label"];
6541
+ const _hoisted_7$8 = { "aria-hidden": "true" };
5442
6542
  const _hoisted_8$8 = { class: "tao-date__month" };
5443
6543
  const _hoisted_9$3 = ["aria-label"];
5444
6544
  const _hoisted_10$3 = { "aria-hidden": "true" };
@@ -5453,7 +6553,7 @@
5453
6553
  const _hoisted_13$1 = ["aria-label", "aria-selected", "disabled", "onClick"];
5454
6554
  const _hoisted_14$1 = { class: "tao-date__footer" };
5455
6555
  const _hoisted_15 = ["disabled"];
5456
- const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
6556
+ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
5457
6557
  ...{ name: "TaoDate" },
5458
6558
  __name: "TaoDate",
5459
6559
  props: {
@@ -5685,8 +6785,8 @@
5685
6785
  onClick: toggle,
5686
6786
  onKeydown: onTriggerKeydown
5687
6787
  }, [
5688
- vue.createElementVNode("span", _hoisted_2$k, vue.toDisplayString(displayLabel.value || vue.unref(l10n).placeholder), 1),
5689
- vue.createElementVNode("span", _hoisted_3$g, [
6788
+ vue.createElementVNode("span", _hoisted_2$i, vue.toDisplayString(displayLabel.value || vue.unref(l10n).placeholder), 1),
6789
+ vue.createElementVNode("span", _hoisted_3$f, [
5690
6790
  vue.renderSlot(_ctx.$slots, "icon", {}, () => [
5691
6791
  _cache[4] || (_cache[4] = vue.createElementVNode("svg", {
5692
6792
  viewBox: "0 0 16 16",
@@ -5714,7 +6814,7 @@
5714
6814
  ], -1))
5715
6815
  ], true)
5716
6816
  ])
5717
- ], 42, _hoisted_1$m),
6817
+ ], 42, _hoisted_1$k),
5718
6818
  (vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
5719
6819
  open.value ? (vue.openBlock(), vue.createElementBlock("div", {
5720
6820
  key: 0,
@@ -5728,14 +6828,14 @@
5728
6828
  style: vue.normalizeStyle(panelStyle.value),
5729
6829
  onKeydown: onPanelKeydown
5730
6830
  }, [
5731
- vue.createElementVNode("div", _hoisted_5$e, [
6831
+ vue.createElementVNode("div", _hoisted_5$d, [
5732
6832
  vue.createElementVNode("button", {
5733
6833
  type: "button",
5734
6834
  class: "tao-date__nav",
5735
6835
  "aria-label": vue.unref(l10n).prevMonthLabel,
5736
6836
  onClick: _cache[0] || (_cache[0] = ($event) => goMonth(-1))
5737
6837
  }, [
5738
- vue.createElementVNode("span", _hoisted_7$9, [
6838
+ vue.createElementVNode("span", _hoisted_7$8, [
5739
6839
  vue.renderSlot(_ctx.$slots, "prev-icon", {}, () => [
5740
6840
  _cache[5] || (_cache[5] = vue.createElementVNode("svg", {
5741
6841
  viewBox: "0 0 24 24",
@@ -5754,7 +6854,7 @@
5754
6854
  ], -1))
5755
6855
  ], true)
5756
6856
  ])
5757
- ], 8, _hoisted_6$b),
6857
+ ], 8, _hoisted_6$a),
5758
6858
  vue.createElementVNode("p", _hoisted_8$8, vue.toDisplayString(monthLabel.value), 1),
5759
6859
  vue.createElementVNode("button", {
5760
6860
  type: "button",
@@ -5832,23 +6932,23 @@
5832
6932
  ], true)
5833
6933
  ])) : vue.createCommentVNode("", true)
5834
6934
  ])
5835
- ], 44, _hoisted_4$g)) : vue.createCommentVNode("", true)
6935
+ ], 44, _hoisted_4$f)) : vue.createCommentVNode("", true)
5836
6936
  ]))
5837
6937
  ], 2);
5838
6938
  };
5839
6939
  }
5840
6940
  });
5841
- const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-97f71e11"]]);
5842
- const _hoisted_1$l = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
5843
- const _hoisted_2$j = { class: "tao-date-range__value" };
5844
- const _hoisted_3$f = {
6941
+ const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-97f71e11"]]);
6942
+ const _hoisted_1$j = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
6943
+ const _hoisted_2$h = { class: "tao-date-range__value" };
6944
+ const _hoisted_3$e = {
5845
6945
  class: "tao-date-range__icon",
5846
6946
  "aria-hidden": "true"
5847
6947
  };
5848
- const _hoisted_4$f = ["aria-label"];
5849
- const _hoisted_5$d = { class: "tao-date__header" };
5850
- const _hoisted_6$a = ["aria-label"];
5851
- const _hoisted_7$8 = { "aria-hidden": "true" };
6948
+ const _hoisted_4$e = ["aria-label"];
6949
+ const _hoisted_5$c = { class: "tao-date__header" };
6950
+ const _hoisted_6$9 = ["aria-label"];
6951
+ const _hoisted_7$7 = { "aria-hidden": "true" };
5852
6952
  const _hoisted_8$7 = { class: "tao-date__month" };
5853
6953
  const _hoisted_9$2 = ["aria-label"];
5854
6954
  const _hoisted_10$2 = { "aria-hidden": "true" };
@@ -5859,7 +6959,7 @@
5859
6959
  const _hoisted_12 = ["aria-label", "aria-selected", "disabled", "onMouseenter", "onClick"];
5860
6960
  const _hoisted_13 = { class: "tao-date__footer" };
5861
6961
  const _hoisted_14 = ["disabled"];
5862
- const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
6962
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
5863
6963
  ...{ name: "TaoDateRange" },
5864
6964
  __name: "TaoDateRange",
5865
6965
  props: {
@@ -6145,8 +7245,8 @@
6145
7245
  onClick: toggle,
6146
7246
  onKeydown: onTriggerKeydown
6147
7247
  }, [
6148
- vue.createElementVNode("span", _hoisted_2$j, vue.toDisplayString(displayLabel.value || vue.unref(l10n).placeholder), 1),
6149
- vue.createElementVNode("span", _hoisted_3$f, [
7248
+ vue.createElementVNode("span", _hoisted_2$h, vue.toDisplayString(displayLabel.value || vue.unref(l10n).placeholder), 1),
7249
+ vue.createElementVNode("span", _hoisted_3$e, [
6150
7250
  vue.renderSlot(_ctx.$slots, "icon", {}, () => [
6151
7251
  _cache[3] || (_cache[3] = vue.createElementVNode("svg", {
6152
7252
  viewBox: "0 0 16 16",
@@ -6174,7 +7274,7 @@
6174
7274
  ], -1))
6175
7275
  ], true)
6176
7276
  ])
6177
- ], 42, _hoisted_1$l),
7277
+ ], 42, _hoisted_1$j),
6178
7278
  (vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
6179
7279
  open.value ? (vue.openBlock(), vue.createElementBlock("div", {
6180
7280
  key: 0,
@@ -6188,14 +7288,14 @@
6188
7288
  style: vue.normalizeStyle(panelStyle.value),
6189
7289
  onKeydown: onPanelKeydown
6190
7290
  }, [
6191
- vue.createElementVNode("div", _hoisted_5$d, [
7291
+ vue.createElementVNode("div", _hoisted_5$c, [
6192
7292
  vue.createElementVNode("button", {
6193
7293
  type: "button",
6194
7294
  class: "tao-date__nav",
6195
7295
  "aria-label": vue.unref(l10n).prevMonthLabel,
6196
7296
  onClick: _cache[0] || (_cache[0] = ($event) => goMonth(-1))
6197
7297
  }, [
6198
- vue.createElementVNode("span", _hoisted_7$8, [
7298
+ vue.createElementVNode("span", _hoisted_7$7, [
6199
7299
  vue.renderSlot(_ctx.$slots, "prev-icon", {}, () => [
6200
7300
  _cache[4] || (_cache[4] = vue.createElementVNode("svg", {
6201
7301
  viewBox: "0 0 24 24",
@@ -6214,7 +7314,7 @@
6214
7314
  ], -1))
6215
7315
  ], true)
6216
7316
  ])
6217
- ], 8, _hoisted_6$a),
7317
+ ], 8, _hoisted_6$9),
6218
7318
  vue.createElementVNode("p", _hoisted_8$7, vue.toDisplayString(monthLabel.value), 1),
6219
7319
  vue.createElementVNode("button", {
6220
7320
  type: "button",
@@ -6301,24 +7401,24 @@
6301
7401
  ], true)
6302
7402
  ])) : vue.createCommentVNode("", true)
6303
7403
  ])
6304
- ], 44, _hoisted_4$f)) : vue.createCommentVNode("", true)
7404
+ ], 44, _hoisted_4$e)) : vue.createCommentVNode("", true)
6305
7405
  ]))
6306
7406
  ], 2);
6307
7407
  };
6308
7408
  }
6309
7409
  });
6310
- const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-da3794c7"]]);
6311
- const _hoisted_1$k = ["for"];
6312
- const _hoisted_2$i = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
6313
- const _hoisted_3$e = {
7410
+ const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-da3794c7"]]);
7411
+ const _hoisted_1$i = ["for"];
7412
+ const _hoisted_2$g = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
7413
+ const _hoisted_3$d = {
6314
7414
  key: 0,
6315
7415
  class: "tao-switch__label"
6316
7416
  };
6317
- const _hoisted_4$e = {
7417
+ const _hoisted_4$d = {
6318
7418
  key: 1,
6319
7419
  class: "tao-switch__label"
6320
7420
  };
6321
- const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
7421
+ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
6322
7422
  ...{ name: "TaoSwitch" },
6323
7423
  __name: "TaoSwitch",
6324
7424
  props: {
@@ -6361,33 +7461,33 @@
6361
7461
  "aria-invalid": invalid.value || void 0,
6362
7462
  "aria-describedby": describedBy.value,
6363
7463
  onChange: toggle
6364
- }, null, 40, _hoisted_2$i),
7464
+ }, null, 40, _hoisted_2$g),
6365
7465
  _cache[0] || (_cache[0] = vue.createElementVNode("span", {
6366
7466
  class: "tao-switch__track",
6367
7467
  "aria-hidden": "true"
6368
7468
  }, [
6369
7469
  vue.createElementVNode("span", { class: "tao-switch__thumb" })
6370
7470
  ], -1)),
6371
- __props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$e, vue.toDisplayString(__props.label), 1)) : _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$e, [
7471
+ __props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$d, vue.toDisplayString(__props.label), 1)) : _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$d, [
6372
7472
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
6373
7473
  ])) : vue.createCommentVNode("", true)
6374
- ], 10, _hoisted_1$k);
7474
+ ], 10, _hoisted_1$i);
6375
7475
  };
6376
7476
  }
6377
7477
  });
6378
- const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-28965b34"]]);
7478
+ const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-28965b34"]]);
6379
7479
  const radioGroupKey = Symbol("taoRadioGroup");
6380
- const _hoisted_1$j = ["for"];
6381
- const _hoisted_2$h = ["id", "name", "value", "checked", "disabled", "aria-invalid", "aria-describedby"];
6382
- const _hoisted_3$d = {
7480
+ const _hoisted_1$h = ["for"];
7481
+ const _hoisted_2$f = ["id", "name", "value", "checked", "disabled", "aria-invalid", "aria-describedby"];
7482
+ const _hoisted_3$c = {
6383
7483
  key: 0,
6384
7484
  class: "tao-radio__label"
6385
7485
  };
6386
- const _hoisted_4$d = {
7486
+ const _hoisted_4$c = {
6387
7487
  key: 1,
6388
7488
  class: "tao-radio__label"
6389
7489
  };
6390
- const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
7490
+ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
6391
7491
  ...{ name: "TaoRadio" },
6392
7492
  __name: "TaoRadio",
6393
7493
  props: {
@@ -6442,25 +7542,25 @@
6442
7542
  "aria-invalid": !vue.unref(group) && invalid.value || void 0,
6443
7543
  "aria-describedby": describedBy.value,
6444
7544
  onChange
6445
- }, null, 40, _hoisted_2$h),
7545
+ }, null, 40, _hoisted_2$f),
6446
7546
  _cache[0] || (_cache[0] = vue.createElementVNode("span", {
6447
7547
  class: "tao-radio__dot",
6448
7548
  "aria-hidden": "true"
6449
7549
  }, null, -1)),
6450
- __props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$d, vue.toDisplayString(__props.label), 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$d, [
7550
+ __props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$c, vue.toDisplayString(__props.label), 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$c, [
6451
7551
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
6452
7552
  ]))
6453
- ], 10, _hoisted_1$j);
7553
+ ], 10, _hoisted_1$h);
6454
7554
  };
6455
7555
  }
6456
7556
  });
6457
- const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-70ac1c11"]]);
6458
- const _hoisted_1$i = ["id", "disabled", "aria-describedby", "aria-invalid", "aria-labelledby"];
6459
- const _hoisted_2$g = {
7557
+ const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-70ac1c11"]]);
7558
+ const _hoisted_1$g = ["id", "disabled", "aria-describedby", "aria-invalid", "aria-labelledby"];
7559
+ const _hoisted_2$e = {
6460
7560
  key: 0,
6461
7561
  class: "tao-radio-group__legend"
6462
7562
  };
6463
- const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
7563
+ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
6464
7564
  ...{ name: "TaoRadioGroup" },
6465
7565
  __name: "TaoRadioGroup",
6466
7566
  props: {
@@ -6504,256 +7604,13 @@
6504
7604
  "aria-invalid": invalid.value || void 0,
6505
7605
  "aria-labelledby": labelledBy.value
6506
7606
  }, [
6507
- __props.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_2$g, vue.toDisplayString(__props.legend), 1)) : vue.createCommentVNode("", true),
7607
+ __props.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_2$e, vue.toDisplayString(__props.legend), 1)) : vue.createCommentVNode("", true),
6508
7608
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
6509
- ], 10, _hoisted_1$i);
6510
- };
6511
- }
6512
- });
6513
- const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-c76ef504"]]);
6514
- const segmentedKey = Symbol("taoSegmented");
6515
- const _hoisted_1$h = ["disabled", "aria-describedby", "aria-invalid", "aria-labelledby", "id"];
6516
- const _hoisted_2$f = {
6517
- key: 0,
6518
- class: "tao-segmented__legend"
6519
- };
6520
- const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
6521
- ...{ name: "TaoSegmented" },
6522
- __name: "TaoSegmented",
6523
- props: {
6524
- modelValue: { type: [String, Number, Boolean] },
6525
- name: {},
6526
- legend: {},
6527
- disabled: { type: Boolean, default: false },
6528
- error: { type: Boolean, default: false },
6529
- size: {},
6530
- block: { type: Boolean, default: false }
6531
- },
6532
- emits: ["update:modelValue", "change"],
6533
- setup(__props, { emit: __emit }) {
6534
- const props = __props;
6535
- const emit = __emit;
6536
- const field = vue.inject(formFieldKey, null);
6537
- const autoName = vue.useId();
6538
- const groupName = vue.computed(() => props.name || autoName);
6539
- const model = vue.computed(() => props.modelValue);
6540
- const groupDisabled = vue.computed(() => props.disabled);
6541
- const invalid = vue.computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
6542
- const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
6543
- const trackRef = vue.ref(null);
6544
- const thumbStyle = vue.ref({ opacity: "0" });
6545
- let resizeObserver = null;
6546
- let mutationObserver = null;
6547
- function setValue(value) {
6548
- emit("update:modelValue", value);
6549
- emit("change", value);
6550
- }
6551
- function updateThumb() {
6552
- const track = trackRef.value;
6553
- if (!track) {
6554
- return;
6555
- }
6556
- const selected = track.querySelector(".tao-segmented-option--checked");
6557
- if (!selected) {
6558
- if (thumbStyle.value.opacity !== "0") {
6559
- thumbStyle.value = { opacity: "0" };
6560
- }
6561
- return;
6562
- }
6563
- const trackBox = track.getBoundingClientRect();
6564
- const optionBox = selected.getBoundingClientRect();
6565
- const next = {
6566
- width: `${optionBox.width}px`,
6567
- height: `${optionBox.height}px`,
6568
- transform: `translate(${optionBox.left - trackBox.left - track.clientLeft}px, ${optionBox.top - trackBox.top - track.clientTop}px)`,
6569
- opacity: "1"
6570
- };
6571
- const prev = thumbStyle.value;
6572
- if (prev.width === next.width && prev.height === next.height && prev.transform === next.transform && prev.opacity === next.opacity) {
6573
- return;
6574
- }
6575
- thumbStyle.value = next;
6576
- }
6577
- vue.provide(segmentedKey, {
6578
- name: groupName,
6579
- model,
6580
- disabled: groupDisabled,
6581
- setValue
6582
- });
6583
- vue.onMounted(() => {
6584
- const track = trackRef.value;
6585
- void vue.nextTick(updateThumb);
6586
- if (!track) {
6587
- return;
6588
- }
6589
- if (typeof ResizeObserver !== "undefined") {
6590
- resizeObserver = new ResizeObserver(() => updateThumb());
6591
- resizeObserver.observe(track);
6592
- }
6593
- mutationObserver = new MutationObserver(() => updateThumb());
6594
- mutationObserver.observe(track, {
6595
- subtree: true,
6596
- childList: true,
6597
- attributes: true,
6598
- attributeFilter: ["class"]
6599
- });
6600
- });
6601
- vue.watch(
6602
- () => [props.modelValue, props.size, props.block, props.disabled],
6603
- () => {
6604
- void vue.nextTick(updateThumb);
6605
- }
6606
- );
6607
- vue.onBeforeUnmount(() => {
6608
- resizeObserver == null ? void 0 : resizeObserver.disconnect();
6609
- resizeObserver = null;
6610
- mutationObserver == null ? void 0 : mutationObserver.disconnect();
6611
- mutationObserver = null;
6612
- });
6613
- return (_ctx, _cache) => {
6614
- var _a;
6615
- return vue.openBlock(), vue.createElementBlock("fieldset", {
6616
- class: vue.normalizeClass(["tao-segmented", [
6617
- vue.unref(sizeClass)(__props.size),
6618
- {
6619
- "tao-segmented--block": __props.block,
6620
- "tao-segmented--disabled": __props.disabled,
6621
- "tao-segmented--invalid": invalid.value
6622
- }
6623
- ]]),
6624
- disabled: __props.disabled,
6625
- "aria-describedby": describedBy.value,
6626
- "aria-invalid": invalid.value || void 0,
6627
- "aria-labelledby": __props.legend ? void 0 : vue.unref(field) ? `${vue.unref(field).id}-label` : void 0,
6628
- id: (_a = vue.unref(field)) == null ? void 0 : _a.id
6629
- }, [
6630
- __props.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_2$f, vue.toDisplayString(__props.legend), 1)) : vue.createCommentVNode("", true),
6631
- vue.createElementVNode("div", {
6632
- ref_key: "trackRef",
6633
- ref: trackRef,
6634
- class: "tao-segmented__track"
6635
- }, [
6636
- vue.createElementVNode("div", {
6637
- class: "tao-segmented__thumb",
6638
- style: vue.normalizeStyle(thumbStyle.value),
6639
- "aria-hidden": "true"
6640
- }, null, 4),
6641
- vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
6642
- ], 512)
6643
- ], 10, _hoisted_1$h);
6644
- };
6645
- }
6646
- });
6647
- const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-7dc6820f"]]);
6648
- const _hoisted_1$g = ["for"];
6649
- const _hoisted_2$e = ["id", "name", "value", "checked", "disabled", "aria-label"];
6650
- const _hoisted_3$c = { class: "tao-segmented-option__face" };
6651
- const _hoisted_4$c = {
6652
- key: 0,
6653
- class: "tao-segmented-option__icon",
6654
- "aria-hidden": "true"
6655
- };
6656
- const _hoisted_5$c = {
6657
- key: 1,
6658
- class: "tao-segmented-option__label"
6659
- };
6660
- const _hoisted_6$9 = {
6661
- key: 2,
6662
- class: "tao-segmented-option__sr"
6663
- };
6664
- const _hoisted_7$7 = {
6665
- key: 3,
6666
- class: "tao-segmented-option__count"
6667
- };
6668
- const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
6669
- ...{ name: "TaoSegmentedOption" },
6670
- __name: "TaoSegmentedOption",
6671
- props: {
6672
- value: { type: [String, Number, Boolean] },
6673
- modelValue: { type: [String, Number, Boolean] },
6674
- name: {},
6675
- label: { default: "" },
6676
- icon: { default: "" },
6677
- count: {},
6678
- disabled: { type: Boolean, default: false },
6679
- ariaLabel: {}
6680
- },
6681
- emits: ["update:modelValue", "change"],
6682
- setup(__props, { emit: __emit }) {
6683
- const props = __props;
6684
- const emit = __emit;
6685
- const group = vue.inject(segmentedKey, null);
6686
- const slots = vue.useSlots();
6687
- const localId = vue.useId();
6688
- const isDisabled = vue.computed(() => props.disabled || Boolean(group == null ? void 0 : group.disabled.value));
6689
- const inputName = vue.computed(() => (group == null ? void 0 : group.name.value) ?? props.name);
6690
- const isChecked = vue.computed(() => {
6691
- const current2 = group ? group.model.value : props.modelValue;
6692
- return current2 === props.value;
6693
- });
6694
- const hasLabel = vue.computed(() => Boolean(props.label || slots.default));
6695
- const isIconOnly = vue.computed(() => Boolean((props.icon || slots.icon) && !hasLabel.value));
6696
- const countLabel = vue.computed(() => {
6697
- if (props.count === void 0 || props.count === null || props.count === "") {
6698
- return "";
6699
- }
6700
- if (typeof props.count === "number") {
6701
- if (props.count > 99) {
6702
- return "99+";
6703
- }
6704
- return String(props.count);
6705
- }
6706
- return String(props.count);
6707
- });
6708
- function onChange() {
6709
- if (isDisabled.value) {
6710
- return;
6711
- }
6712
- if (group) {
6713
- group.setValue(props.value);
6714
- return;
6715
- }
6716
- emit("update:modelValue", props.value);
6717
- emit("change", props.value);
6718
- }
6719
- return (_ctx, _cache) => {
6720
- return vue.openBlock(), vue.createElementBlock("label", {
6721
- class: vue.normalizeClass(["tao-segmented-option", {
6722
- "tao-segmented-option--checked": isChecked.value,
6723
- "tao-segmented-option--disabled": props.disabled,
6724
- "tao-segmented-option--icon-only": isIconOnly.value
6725
- }]),
6726
- for: vue.unref(localId)
6727
- }, [
6728
- vue.createElementVNode("input", {
6729
- id: vue.unref(localId),
6730
- class: "tao-segmented-option__input",
6731
- type: "radio",
6732
- name: inputName.value,
6733
- value: String(__props.value),
6734
- checked: isChecked.value,
6735
- disabled: isDisabled.value,
6736
- "aria-label": __props.ariaLabel,
6737
- onChange
6738
- }, null, 40, _hoisted_2$e),
6739
- vue.createElementVNode("span", _hoisted_3$c, [
6740
- __props.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$c, [
6741
- vue.renderSlot(_ctx.$slots, "icon", {}, () => [
6742
- vue.createTextVNode(vue.toDisplayString(__props.icon), 1)
6743
- ], true)
6744
- ])) : vue.createCommentVNode("", true),
6745
- hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$c, [
6746
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
6747
- vue.createTextVNode(vue.toDisplayString(__props.label), 1)
6748
- ], true)
6749
- ])) : __props.ariaLabel ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$9, vue.toDisplayString(__props.ariaLabel), 1)) : vue.createCommentVNode("", true),
6750
- countLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$7, vue.toDisplayString(countLabel.value), 1)) : vue.createCommentVNode("", true)
6751
- ])
6752
7609
  ], 10, _hoisted_1$g);
6753
7610
  };
6754
7611
  }
6755
7612
  });
6756
- const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-fba7ca12"]]);
7613
+ const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-c76ef504"]]);
6757
7614
  const _hoisted_1$f = ["role", "aria-live"];
6758
7615
  const _hoisted_2$d = { class: "tao-alert__body" };
6759
7616
  const _hoisted_3$b = {
@@ -7725,7 +8582,7 @@
7725
8582
  class: "tao-breadcrumb__item"
7726
8583
  }, [
7727
8584
  index > 0 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$4, "/")) : vue.createCommentVNode("", true),
7728
- index === __props.items.length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$4, vue.toDisplayString(item.label), 1)) : item.to ? (vue.openBlock(), vue.createBlock(_sfc_main$q, {
8585
+ index === __props.items.length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$4, vue.toDisplayString(item.label), 1)) : item.to ? (vue.openBlock(), vue.createBlock(_sfc_main$s, {
7729
8586
  key: 2,
7730
8587
  class: "tao-breadcrumb__link",
7731
8588
  to: item.to
@@ -9409,6 +10266,50 @@
9409
10266
  resolveConfirm(false);
9410
10267
  }
9411
10268
  });
10269
+ const round = (v, digits) => {
10270
+ const k = Math.pow(10, digits);
10271
+ return Math.round(v * k) / k + 0;
10272
+ };
10273
+ function colorModel(source, options = {}) {
10274
+ const { format = "object", range = 255, space = "srgb", alpha = false, precision = 5 } = options;
10275
+ if (space === "linear" && range !== 1) throw new Error("colorModel: linear space needs range: 1");
10276
+ function read(value) {
10277
+ let parts;
10278
+ if (format === "css") {
10279
+ return parseColor(String(value)) ?? { r: 0, g: 0, b: 0, a: 1 };
10280
+ } else if (format === "array") {
10281
+ parts = value.slice(0, 4);
10282
+ } else {
10283
+ const o = value;
10284
+ parts = [o.r ?? 0, o.g ?? 0, o.b ?? 0, o.a ?? 1];
10285
+ }
10286
+ const channels = [0, 1, 2].map((i) => {
10287
+ const v = Number(parts[i] ?? 0);
10288
+ return space === "linear" ? linearToSrgb(v) * 255 : range === 1 ? v * 255 : v;
10289
+ });
10290
+ return { r: channels[0], g: channels[1], b: channels[2], a: parts[3] === void 0 ? 1 : Number(parts[3]) };
10291
+ }
10292
+ function write(c) {
10293
+ const out = [c.r, c.g, c.b].map((v) => {
10294
+ if (space === "linear") return round(srgbToLinear(v / 255), precision);
10295
+ return range === 1 ? round(v / 255, precision) : Math.round(v);
10296
+ });
10297
+ const a = round(c.a, 3);
10298
+ if (format === "css") {
10299
+ const [r, g, b] = [c.r, c.g, c.b].map(Math.round);
10300
+ return alpha ? `rgb(${r} ${g} ${b} / ${a})` : `rgb(${r} ${g} ${b})`;
10301
+ }
10302
+ if (format === "array") return alpha ? [...out, a] : out;
10303
+ return alpha ? { r: out[0], g: out[1], b: out[2], a } : { r: out[0], g: out[1], b: out[2] };
10304
+ }
10305
+ return vue.computed({
10306
+ get: () => toHex(read(source.value), alpha),
10307
+ set: (hex) => {
10308
+ const parsed = parseColor(hex);
10309
+ if (parsed) source.value = write(parsed);
10310
+ }
10311
+ });
10312
+ }
9412
10313
  const components = [
9413
10314
  TaoButton,
9414
10315
  TaoBlock,
@@ -9419,13 +10320,14 @@
9419
10320
  TaoCard,
9420
10321
  TaoModal,
9421
10322
  TaoTabs,
10323
+ TaoTimeline,
9422
10324
  TaoTooltip,
9423
10325
  TaoPopover,
9424
10326
  TaoSpoiler,
9425
10327
  TaoSpoilerGroup,
9426
10328
  TaoCopy,
9427
10329
  TaoContainer,
9428
- _sfc_main$K,
10330
+ _sfc_main$M,
9429
10331
  TaoSpace,
9430
10332
  TaoGrid,
9431
10333
  TaoGridItem,
@@ -9441,13 +10343,16 @@
9441
10343
  TaoTextarea,
9442
10344
  TaoScrollTop,
9443
10345
  TaoProgress,
9444
- TaoSlider,
10346
+ _sfc_main$U,
10347
+ _sfc_main$w,
9445
10348
  TaoFileDrop,
9446
10349
  TaoDropdownMenu,
9447
10350
  TaoPinCode,
9448
- _sfc_main$q,
10351
+ _sfc_main$s,
9449
10352
  TaoFormField,
9450
10353
  TaoSelect,
10354
+ TaoColorInput,
10355
+ TaoColorPicker,
9451
10356
  TaoCombobox,
9452
10357
  TaoDate,
9453
10358
  TaoDateRange,
@@ -9491,6 +10396,8 @@
9491
10396
  exports2.TaoCard = TaoCard;
9492
10397
  exports2.TaoCarousel = TaoCarousel;
9493
10398
  exports2.TaoCheckbox = TaoCheckbox;
10399
+ exports2.TaoColorInput = TaoColorInput;
10400
+ exports2.TaoColorPicker = TaoColorPicker;
9494
10401
  exports2.TaoCombobox = TaoCombobox;
9495
10402
  exports2.TaoConfirmHost = TaoConfirmHost;
9496
10403
  exports2.TaoContainer = TaoContainer;
@@ -9504,7 +10411,7 @@
9504
10411
  exports2.TaoEmpty = TaoEmpty;
9505
10412
  exports2.TaoFieldset = TaoFieldset;
9506
10413
  exports2.TaoFileDrop = TaoFileDrop;
9507
- exports2.TaoFlex = _sfc_main$K;
10414
+ exports2.TaoFlex = _sfc_main$M;
9508
10415
  exports2.TaoFormField = TaoFormField;
9509
10416
  exports2.TaoGrid = TaoGrid;
9510
10417
  exports2.TaoGridItem = TaoGridItem;
@@ -9513,7 +10420,7 @@
9513
10420
  exports2.TaoInput = TaoInput;
9514
10421
  exports2.TaoInputGroup = TaoInputGroup;
9515
10422
  exports2.TaoInputNumber = TaoInputNumber;
9516
- exports2.TaoLink = _sfc_main$q;
10423
+ exports2.TaoLink = _sfc_main$s;
9517
10424
  exports2.TaoList = TaoList;
9518
10425
  exports2.TaoListItem = TaoListItem;
9519
10426
  exports2.TaoLoader = TaoLoader;
@@ -9525,12 +10432,13 @@
9525
10432
  exports2.TaoQuantity = TaoQuantity;
9526
10433
  exports2.TaoRadio = TaoRadio;
9527
10434
  exports2.TaoRadioGroup = TaoRadioGroup;
10435
+ exports2.TaoRangeSlider = _sfc_main$w;
9528
10436
  exports2.TaoScrollTop = TaoScrollTop;
9529
10437
  exports2.TaoSegmented = TaoSegmented;
9530
10438
  exports2.TaoSegmentedOption = TaoSegmentedOption;
9531
10439
  exports2.TaoSelect = TaoSelect;
9532
10440
  exports2.TaoSkeleton = TaoSkeleton;
9533
- exports2.TaoSlider = TaoSlider;
10441
+ exports2.TaoSlider = _sfc_main$U;
9534
10442
  exports2.TaoSpace = TaoSpace;
9535
10443
  exports2.TaoSplit = TaoSplit;
9536
10444
  exports2.TaoSpoiler = TaoSpoiler;
@@ -9541,20 +10449,31 @@
9541
10449
  exports2.TaoTabs = TaoTabs;
9542
10450
  exports2.TaoTag = TaoTag;
9543
10451
  exports2.TaoTextarea = TaoTextarea;
10452
+ exports2.TaoTimeline = TaoTimeline;
9544
10453
  exports2.TaoToastViewport = TaoToastViewport;
9545
10454
  exports2.TaoTooltip = TaoTooltip;
9546
10455
  exports2.TaoUI = TaoUI;
10456
+ exports2.colorModel = colorModel;
9547
10457
  exports2.confirm = confirm;
9548
10458
  exports2.default = TaoUI;
9549
10459
  exports2.formatTaoDateIso = formatTaoDateIso;
9550
10460
  exports2.formatTaoDateLabel = formatTaoDateLabel;
9551
10461
  exports2.formatTaoDateRangeLabel = formatTaoDateRangeLabel;
10462
+ exports2.hslToRgb = hslToRgb;
10463
+ exports2.hsvaToRgba = hsvaToRgba;
10464
+ exports2.linearToSrgb = linearToSrgb;
9552
10465
  exports2.localeEn = localeEn;
9553
10466
  exports2.localeRu = localeRu;
10467
+ exports2.normalizeHex = normalizeHex;
10468
+ exports2.parseColor = parseColor;
9554
10469
  exports2.parseTaoDate = parseTaoDate;
9555
10470
  exports2.parseTaoDateRange = parseTaoDateRange;
10471
+ exports2.rgbToHsl = rgbToHsl;
10472
+ exports2.rgbaToHsva = rgbaToHsva;
9556
10473
  exports2.setTaoLocale = setTaoLocale;
10474
+ exports2.srgbToLinear = srgbToLinear;
9557
10475
  exports2.taoLocale = taoLocale;
10476
+ exports2.toHex = toHex;
9558
10477
  exports2.toast = toast;
9559
10478
  exports2.todayTaoDate = todayTaoDate;
9560
10479
  Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });