@1337exp/taoui 3.0.0 → 3.1.1

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.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createCommentVNode, toDisplayString, createElementVNode, renderSlot, computed, normalizeStyle, getCurrentInstance, camelize, inject, useId, ref, shallowRef, watch, createTextVNode, useSlots, onBeforeUnmount, createBlock, Teleport, createVNode, Transition, withCtx, nextTick, Fragment, renderList, onMounted, mergeProps, createSlots, normalizeProps, guardReactiveProps, provide, resolveDynamicComponent, withModifiers, useCssVars, reactive, onBeforeMount, TransitionGroup, onUpdated, createApp } from "vue";
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createCommentVNode, toDisplayString, createElementVNode, renderSlot, computed, normalizeStyle, getCurrentInstance, camelize, inject, useId, ref, shallowRef, watch, createTextVNode, useSlots, onBeforeUnmount, createBlock, Teleport, createVNode, Transition, withCtx, nextTick, Fragment, renderList, onMounted, mergeProps, createSlots, normalizeProps, guardReactiveProps, provide, resolveDynamicComponent, withModifiers, useCssVars, reactive, onBeforeMount, withKeys, TransitionGroup, onUpdated, createApp } from "vue";
2
2
  const sizes = ["small", "medium", "large"];
3
3
  function sizeClass(size) {
4
4
  return size ? `tao-size-${size}` : void 0;
@@ -13,17 +13,17 @@ function resolveSize(el, size) {
13
13
  const value = getComputedStyle(el).getPropertyValue("--tao-size").trim();
14
14
  return sizes.includes(value) ? value : "medium";
15
15
  }
16
- const _hoisted_1$Q = ["type", "disabled"];
17
- const _hoisted_2$J = {
16
+ const _hoisted_1$S = ["type", "disabled"];
17
+ const _hoisted_2$L = {
18
18
  key: 0,
19
19
  class: "tao-button__loader"
20
20
  };
21
- const _hoisted_3$A = {
21
+ const _hoisted_3$C = {
22
22
  key: 1,
23
23
  class: "tao-button__icon"
24
24
  };
25
- const _hoisted_4$v = { class: "tao-button__content" };
26
- const _sfc_main$10 = /* @__PURE__ */ defineComponent({
25
+ const _hoisted_4$w = { class: "tao-button__content" };
26
+ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
27
27
  ...{ name: "TaoButton" },
28
28
  __name: "TaoButton",
29
29
  props: {
@@ -62,12 +62,12 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62
62
  disabled: __props.disabled || __props.loading,
63
63
  onClick: handleClick
64
64
  }, [
65
- __props.loading ? (openBlock(), createElementBlock("span", _hoisted_2$J)) : createCommentVNode("", true),
66
- __props.icon ? (openBlock(), createElementBlock("span", _hoisted_3$A, toDisplayString(__props.icon), 1)) : createCommentVNode("", true),
67
- createElementVNode("span", _hoisted_4$v, [
65
+ __props.loading ? (openBlock(), createElementBlock("span", _hoisted_2$L)) : createCommentVNode("", true),
66
+ __props.icon ? (openBlock(), createElementBlock("span", _hoisted_3$C, toDisplayString(__props.icon), 1)) : createCommentVNode("", true),
67
+ createElementVNode("span", _hoisted_4$w, [
68
68
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
69
69
  ])
70
- ], 10, _hoisted_1$Q);
70
+ ], 10, _hoisted_1$S);
71
71
  };
72
72
  }
73
73
  });
@@ -78,7 +78,7 @@ const _export_sfc = (sfc, props) => {
78
78
  }
79
79
  return target;
80
80
  };
81
- const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["__scopeId", "data-v-eb25f649"]]);
81
+ const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-eb25f649"]]);
82
82
  function toCssLength(value) {
83
83
  if (value === void 0 || value === null || value === "") {
84
84
  return void 0;
@@ -91,7 +91,7 @@ function toCssBox(value) {
91
91
  function surfaceClass(surface) {
92
92
  return surface && surface !== "flat" ? `tao-surface-${surface}` : void 0;
93
93
  }
94
- const _sfc_main$$ = /* @__PURE__ */ defineComponent({
94
+ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
95
95
  ...{ name: "TaoBlock" },
96
96
  __name: "TaoBlock",
97
97
  props: {
@@ -115,7 +115,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
115
115
  };
116
116
  }
117
117
  });
118
- const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-3d9abbef"]]);
118
+ const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-3d9abbef"]]);
119
119
  const formFieldKey = Symbol("taoFormField");
120
120
  function isDev() {
121
121
  try {
@@ -155,21 +155,21 @@ function warnDeprecated(component, replacements) {
155
155
  deprecationWarning(component, label, instead);
156
156
  }
157
157
  }
158
- const _hoisted_1$P = ["for"];
159
- const _hoisted_2$I = {
158
+ const _hoisted_1$R = ["for"];
159
+ const _hoisted_2$K = {
160
160
  key: 0,
161
161
  class: "tao-input__affix tao-input__affix--prefix"
162
162
  };
163
- const _hoisted_3$z = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
164
- const _hoisted_4$u = {
163
+ const _hoisted_3$B = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
164
+ const _hoisted_4$v = {
165
165
  key: 1,
166
166
  class: "tao-input__affix tao-input__affix--suffix"
167
167
  };
168
- const _hoisted_5$n = {
168
+ const _hoisted_5$o = {
169
169
  key: 1,
170
170
  class: "tao-input__error"
171
171
  };
172
- const _sfc_main$_ = /* @__PURE__ */ defineComponent({
172
+ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
173
173
  ...{ name: "TaoInput" },
174
174
  __name: "TaoInput",
175
175
  props: {
@@ -217,7 +217,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
217
217
  key: 0,
218
218
  class: "tao-input__label",
219
219
  for: controlId.value
220
- }, toDisplayString(__props.label), 9, _hoisted_1$P)) : createCommentVNode("", true),
220
+ }, toDisplayString(__props.label), 9, _hoisted_1$R)) : createCommentVNode("", true),
221
221
  createElementVNode("div", {
222
222
  class: normalizeClass(["tao-input-shell", {
223
223
  "tao-input-shell--focused": focused.value,
@@ -227,7 +227,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
227
227
  "tao-input-shell--suffix": _ctx.$slots.suffix
228
228
  }])
229
229
  }, [
230
- _ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_2$I, [
230
+ _ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_2$K, [
231
231
  renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
232
232
  ])) : createCommentVNode("", true),
233
233
  createElementVNode("input", {
@@ -242,27 +242,27 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
242
242
  onInput: handleInput,
243
243
  onBlur: handleBlur,
244
244
  onFocus: handleFocus
245
- }, null, 42, _hoisted_3$z),
246
- _ctx.$slots.suffix ? (openBlock(), createElementBlock("span", _hoisted_4$u, [
245
+ }, null, 42, _hoisted_3$B),
246
+ _ctx.$slots.suffix ? (openBlock(), createElementBlock("span", _hoisted_4$v, [
247
247
  renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
248
248
  ])) : createCommentVNode("", true)
249
249
  ], 2),
250
- __props.error && __props.errorMessage ? (openBlock(), createElementBlock("span", _hoisted_5$n, toDisplayString(__props.errorMessage), 1)) : createCommentVNode("", true)
250
+ __props.error && __props.errorMessage ? (openBlock(), createElementBlock("span", _hoisted_5$o, toDisplayString(__props.errorMessage), 1)) : createCommentVNode("", true)
251
251
  ], 2);
252
252
  };
253
253
  }
254
254
  });
255
- const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-aca887be"]]);
256
- const _hoisted_1$O = {
255
+ const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["__scopeId", "data-v-aca887be"]]);
256
+ const _hoisted_1$Q = {
257
257
  key: 0,
258
258
  class: "tao-input-group__addon tao-input-group__addon--before"
259
259
  };
260
- const _hoisted_2$H = { class: "tao-input-group__field" };
261
- const _hoisted_3$y = {
260
+ const _hoisted_2$J = { class: "tao-input-group__field" };
261
+ const _hoisted_3$A = {
262
262
  key: 1,
263
263
  class: "tao-input-group__addon tao-input-group__addon--after"
264
264
  };
265
- const _sfc_main$Z = /* @__PURE__ */ defineComponent({
265
+ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
266
266
  ...{ name: "TaoInputGroup" },
267
267
  __name: "TaoInputGroup",
268
268
  props: {
@@ -287,20 +287,20 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
287
287
  onFocusin: onFocusIn,
288
288
  onFocusout: onFocusOut
289
289
  }, [
290
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_1$O, [
290
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_1$Q, [
291
291
  renderSlot(_ctx.$slots, "before", {}, void 0, true)
292
292
  ])) : createCommentVNode("", true),
293
- createElementVNode("div", _hoisted_2$H, [
293
+ createElementVNode("div", _hoisted_2$J, [
294
294
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
295
295
  ]),
296
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
296
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
297
297
  renderSlot(_ctx.$slots, "after", {}, void 0, true)
298
298
  ])) : createCommentVNode("", true)
299
299
  ], 34);
300
300
  };
301
301
  }
302
302
  });
303
- const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-55b2d297"]]);
303
+ const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["__scopeId", "data-v-55b2d297"]]);
304
304
  const localeRu = {
305
305
  code: "ru-RU",
306
306
  alert: { closeLabel: "Закрыть" },
@@ -377,6 +377,16 @@ const localeRu = {
377
377
  },
378
378
  table: { emptyText: "Нет данных" },
379
379
  tag: { closeLabel: "Убрать" },
380
+ colorPicker: {
381
+ areaLabel: "Насыщенность и яркость",
382
+ hueLabel: "Оттенок",
383
+ alphaLabel: "Прозрачность",
384
+ hexLabel: "Цвет в hex",
385
+ modeLabel: "Способ ввода",
386
+ swatchesLabel: "Образцы",
387
+ eyedropperLabel: "Пипетка",
388
+ chooseLabel: "Выбрать цвет"
389
+ },
380
390
  timeline: { playLabel: "Играть", pauseLabel: "Пауза", restartLabel: "В начало" },
381
391
  toast: { closeLabel: "Закрыть уведомление" }
382
392
  };
@@ -581,6 +591,16 @@ const localeEn = {
581
591
  },
582
592
  table: { emptyText: "No data" },
583
593
  tag: { closeLabel: "Remove" },
594
+ colorPicker: {
595
+ areaLabel: "Saturation and brightness",
596
+ hueLabel: "Hue",
597
+ alphaLabel: "Opacity",
598
+ hexLabel: "Color in hex",
599
+ modeLabel: "Input mode",
600
+ swatchesLabel: "Swatches",
601
+ eyedropperLabel: "Eyedropper",
602
+ chooseLabel: "Choose color"
603
+ },
584
604
  timeline: { playLabel: "Play", pauseLabel: "Pause", restartLabel: "Restart" },
585
605
  toast: { closeLabel: "Close notification" }
586
606
  };
@@ -624,16 +644,16 @@ function useLocaleText(props, section) {
624
644
  function formatText(template, values) {
625
645
  return template.replace(/\{(\w+)\}/g, (match, key) => key in values ? String(values[key]) : match);
626
646
  }
627
- const _hoisted_1$N = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
628
- const _hoisted_2$G = {
647
+ const _hoisted_1$P = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
648
+ const _hoisted_2$I = {
629
649
  key: 0,
630
650
  class: "tao-input-number__steppers"
631
651
  };
632
- const _hoisted_3$x = ["aria-label", "disabled"];
633
- const _hoisted_4$t = { "aria-hidden": "true" };
634
- const _hoisted_5$m = ["aria-label", "disabled"];
635
- const _hoisted_6$h = { "aria-hidden": "true" };
636
- const _sfc_main$Y = /* @__PURE__ */ defineComponent({
652
+ const _hoisted_3$z = ["aria-label", "disabled"];
653
+ const _hoisted_4$u = { "aria-hidden": "true" };
654
+ const _hoisted_5$n = ["aria-label", "disabled"];
655
+ const _hoisted_6$i = { "aria-hidden": "true" };
656
+ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
637
657
  ...{ name: "TaoInputNumber" },
638
658
  __name: "TaoInputNumber",
639
659
  props: {
@@ -794,8 +814,8 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
794
814
  onFocus,
795
815
  onBlur,
796
816
  onKeydown
797
- }, null, 40, _hoisted_1$N),
798
- __props.controls ? (openBlock(), createElementBlock("div", _hoisted_2$G, [
817
+ }, null, 40, _hoisted_1$P),
818
+ __props.controls ? (openBlock(), createElementBlock("div", _hoisted_2$I, [
799
819
  createElementVNode("button", {
800
820
  type: "button",
801
821
  class: "tao-input-number__step",
@@ -804,12 +824,12 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
804
824
  disabled: __props.disabled || atMax.value,
805
825
  onClick: _cache[0] || (_cache[0] = ($event) => bump(1))
806
826
  }, [
807
- createElementVNode("span", _hoisted_4$t, [
827
+ createElementVNode("span", _hoisted_4$u, [
808
828
  renderSlot(_ctx.$slots, "increment-icon", {}, () => [
809
829
  _cache[2] || (_cache[2] = createTextVNode("+", -1))
810
830
  ], true)
811
831
  ])
812
- ], 8, _hoisted_3$x),
832
+ ], 8, _hoisted_3$z),
813
833
  createElementVNode("button", {
814
834
  type: "button",
815
835
  class: "tao-input-number__step",
@@ -818,24 +838,24 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
818
838
  disabled: __props.disabled || atMin.value,
819
839
  onClick: _cache[1] || (_cache[1] = ($event) => bump(-1))
820
840
  }, [
821
- createElementVNode("span", _hoisted_6$h, [
841
+ createElementVNode("span", _hoisted_6$i, [
822
842
  renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
823
843
  _cache[3] || (_cache[3] = createTextVNode("−", -1))
824
844
  ], true)
825
845
  ])
826
- ], 8, _hoisted_5$m)
846
+ ], 8, _hoisted_5$n)
827
847
  ])) : createCommentVNode("", true)
828
848
  ], 2);
829
849
  };
830
850
  }
831
851
  });
832
- const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-0594919d"]]);
833
- const _hoisted_1$M = ["aria-label", "disabled"];
834
- const _hoisted_2$F = { "aria-hidden": "true" };
835
- const _hoisted_3$w = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
836
- const _hoisted_4$s = ["aria-label", "disabled"];
837
- const _hoisted_5$l = { "aria-hidden": "true" };
838
- const _sfc_main$X = /* @__PURE__ */ defineComponent({
852
+ const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["__scopeId", "data-v-0594919d"]]);
853
+ const _hoisted_1$O = ["aria-label", "disabled"];
854
+ const _hoisted_2$H = { "aria-hidden": "true" };
855
+ const _hoisted_3$y = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
856
+ const _hoisted_4$t = ["aria-label", "disabled"];
857
+ const _hoisted_5$m = { "aria-hidden": "true" };
858
+ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
839
859
  ...{ name: "TaoQuantity" },
840
860
  __name: "TaoQuantity",
841
861
  props: {
@@ -978,12 +998,12 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
978
998
  disabled: minusDisabled.value,
979
999
  onClick: onDec
980
1000
  }, [
981
- createElementVNode("span", _hoisted_2$F, [
1001
+ createElementVNode("span", _hoisted_2$H, [
982
1002
  renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
983
1003
  _cache[0] || (_cache[0] = createTextVNode("−", -1))
984
1004
  ], true)
985
1005
  ])
986
- ], 8, _hoisted_1$M),
1006
+ ], 8, _hoisted_1$O),
987
1007
  createElementVNode("input", {
988
1008
  id: controlId.value,
989
1009
  class: "tao-quantity__input",
@@ -1003,7 +1023,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1003
1023
  onFocus,
1004
1024
  onBlur,
1005
1025
  onKeydown
1006
- }, null, 40, _hoisted_3$w),
1026
+ }, null, 40, _hoisted_3$y),
1007
1027
  createElementVNode("button", {
1008
1028
  type: "button",
1009
1029
  class: "tao-quantity__btn tao-quantity__btn--inc",
@@ -1011,43 +1031,43 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1011
1031
  disabled: plusDisabled.value,
1012
1032
  onClick: onInc
1013
1033
  }, [
1014
- createElementVNode("span", _hoisted_5$l, [
1034
+ createElementVNode("span", _hoisted_5$m, [
1015
1035
  renderSlot(_ctx.$slots, "increment-icon", {}, () => [
1016
1036
  _cache[1] || (_cache[1] = createTextVNode("+", -1))
1017
1037
  ], true)
1018
1038
  ])
1019
- ], 8, _hoisted_4$s)
1039
+ ], 8, _hoisted_4$t)
1020
1040
  ], 2);
1021
1041
  };
1022
1042
  }
1023
1043
  });
1024
- const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-e27165e3"]]);
1025
- const _hoisted_1$L = {
1044
+ const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-e27165e3"]]);
1045
+ const _hoisted_1$N = {
1026
1046
  key: 0,
1027
1047
  class: "tao-card__cover"
1028
1048
  };
1029
- const _hoisted_2$E = {
1049
+ const _hoisted_2$G = {
1030
1050
  key: 0,
1031
1051
  class: "tao-card__overlay"
1032
1052
  };
1033
- const _hoisted_3$v = {
1053
+ const _hoisted_3$x = {
1034
1054
  key: 1,
1035
1055
  class: "tao-card__overlay"
1036
1056
  };
1037
- const _hoisted_4$r = {
1057
+ const _hoisted_4$s = {
1038
1058
  key: 0,
1039
1059
  class: "tao-card__header-title"
1040
1060
  };
1041
- const _hoisted_5$k = { key: 0 };
1042
- const _hoisted_6$g = {
1061
+ const _hoisted_5$l = { key: 0 };
1062
+ const _hoisted_6$h = {
1043
1063
  key: 2,
1044
1064
  class: "tao-card__title-block"
1045
1065
  };
1046
- const _hoisted_7$c = {
1066
+ const _hoisted_7$d = {
1047
1067
  key: 0,
1048
1068
  class: "tao-card__title"
1049
1069
  };
1050
- const _hoisted_8$b = {
1070
+ const _hoisted_8$c = {
1051
1071
  key: 1,
1052
1072
  class: "tao-card__sub"
1053
1073
  };
@@ -1059,7 +1079,7 @@ const _hoisted_10$4 = {
1059
1079
  key: 4,
1060
1080
  class: "tao-card__footer"
1061
1081
  };
1062
- const _sfc_main$W = /* @__PURE__ */ defineComponent({
1082
+ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
1063
1083
  ...{ name: "TaoCard" },
1064
1084
  __name: "TaoCard",
1065
1085
  props: {
@@ -1101,12 +1121,12 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
1101
1121
  }]]),
1102
1122
  style: normalizeStyle(radiusStyle.value)
1103
1123
  }, [
1104
- _ctx.$slots.cover ? (openBlock(), createElementBlock("div", _hoisted_1$L, [
1124
+ _ctx.$slots.cover ? (openBlock(), createElementBlock("div", _hoisted_1$N, [
1105
1125
  renderSlot(_ctx.$slots, "cover", {}, void 0, true),
1106
- _ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_2$E, [
1126
+ _ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_2$G, [
1107
1127
  renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
1108
1128
  ])) : createCommentVNode("", true)
1109
- ])) : _ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_3$v, [
1129
+ ])) : _ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_3$x, [
1110
1130
  renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
1111
1131
  ])) : createCommentVNode("", true),
1112
1132
  hasContent.value ? (openBlock(), createElementBlock("div", {
@@ -1114,7 +1134,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
1114
1134
  class: "tao-card__content",
1115
1135
  style: normalizeStyle(paddingStyle.value)
1116
1136
  }, [
1117
- _ctx.$slots.headerTitle ? (openBlock(), createElementBlock("h2", _hoisted_4$r, [
1137
+ _ctx.$slots.headerTitle ? (openBlock(), createElementBlock("h2", _hoisted_4$s, [
1118
1138
  renderSlot(_ctx.$slots, "headerTitle", {}, void 0, true)
1119
1139
  ])) : createCommentVNode("", true),
1120
1140
  _ctx.$slots.header || _ctx.$slots.headerSecondary ? (openBlock(), createElementBlock("div", {
@@ -1124,15 +1144,15 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
1124
1144
  createElementVNode("span", null, [
1125
1145
  renderSlot(_ctx.$slots, "header", {}, void 0, true)
1126
1146
  ]),
1127
- _ctx.$slots.headerSecondary ? (openBlock(), createElementBlock("span", _hoisted_5$k, [
1147
+ _ctx.$slots.headerSecondary ? (openBlock(), createElementBlock("span", _hoisted_5$l, [
1128
1148
  renderSlot(_ctx.$slots, "headerSecondary", {}, void 0, true)
1129
1149
  ])) : createCommentVNode("", true)
1130
1150
  ], 2)) : createCommentVNode("", true),
1131
- _ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_6$g, [
1132
- _ctx.$slots.title ? (openBlock(), createElementBlock("h2", _hoisted_7$c, [
1151
+ _ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_6$h, [
1152
+ _ctx.$slots.title ? (openBlock(), createElementBlock("h2", _hoisted_7$d, [
1133
1153
  renderSlot(_ctx.$slots, "title", {}, void 0, true)
1134
1154
  ])) : createCommentVNode("", true),
1135
- _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_8$b, [
1155
+ _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_8$c, [
1136
1156
  renderSlot(_ctx.$slots, "sub", {}, void 0, true)
1137
1157
  ])) : createCommentVNode("", true)
1138
1158
  ])) : createCommentVNode("", true),
@@ -1147,7 +1167,7 @@ const _sfc_main$W = /* @__PURE__ */ defineComponent({
1147
1167
  };
1148
1168
  }
1149
1169
  });
1150
- const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-53c366d1"]]);
1170
+ const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-53c366d1"]]);
1151
1171
  const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
1152
1172
  function getFocusable(root) {
1153
1173
  return [...root.querySelectorAll(FOCUSABLE)].filter(
@@ -1201,21 +1221,21 @@ function unlockBodyScroll() {
1201
1221
  previousOverflow = "";
1202
1222
  }
1203
1223
  }
1204
- const _hoisted_1$K = ["aria-labelledby"];
1205
- const _hoisted_2$D = {
1224
+ const _hoisted_1$M = ["aria-labelledby"];
1225
+ const _hoisted_2$F = {
1206
1226
  key: 0,
1207
1227
  class: "tao-modal__header"
1208
1228
  };
1209
- const _hoisted_3$u = ["id"];
1210
- const _hoisted_4$q = { key: 1 };
1211
- const _hoisted_5$j = ["aria-label"];
1212
- const _hoisted_6$f = { "aria-hidden": "true" };
1213
- const _hoisted_7$b = { class: "tao-modal__content" };
1214
- const _hoisted_8$a = {
1229
+ const _hoisted_3$w = ["id"];
1230
+ const _hoisted_4$r = { key: 1 };
1231
+ const _hoisted_5$k = ["aria-label"];
1232
+ const _hoisted_6$g = { "aria-hidden": "true" };
1233
+ const _hoisted_7$c = { class: "tao-modal__content" };
1234
+ const _hoisted_8$b = {
1215
1235
  key: 1,
1216
1236
  class: "tao-modal__footer"
1217
1237
  };
1218
- const _sfc_main$V = /* @__PURE__ */ defineComponent({
1238
+ const _sfc_main$X = /* @__PURE__ */ defineComponent({
1219
1239
  ...{ name: "TaoModal" },
1220
1240
  __name: "TaoModal",
1221
1241
  props: {
@@ -1332,13 +1352,13 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
1332
1352
  "aria-labelledby": __props.title ? unref(titleId) : void 0,
1333
1353
  tabindex: "-1"
1334
1354
  }, [
1335
- __props.title || _ctx.$slots.header || __props.closable ? (openBlock(), createElementBlock("div", _hoisted_2$D, [
1355
+ __props.title || _ctx.$slots.header || __props.closable ? (openBlock(), createElementBlock("div", _hoisted_2$F, [
1336
1356
  renderSlot(_ctx.$slots, "header", {}, () => [
1337
1357
  __props.title ? (openBlock(), createElementBlock("h2", {
1338
1358
  key: 0,
1339
1359
  id: unref(titleId),
1340
1360
  class: "tao-modal__title"
1341
- }, toDisplayString(__props.title), 9, _hoisted_3$u)) : (openBlock(), createElementBlock("span", _hoisted_4$q))
1361
+ }, toDisplayString(__props.title), 9, _hoisted_3$w)) : (openBlock(), createElementBlock("span", _hoisted_4$r))
1342
1362
  ], true),
1343
1363
  __props.closable ? (openBlock(), createElementBlock("button", {
1344
1364
  key: 0,
@@ -1347,20 +1367,20 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
1347
1367
  "aria-label": unref(l10n).closeLabel,
1348
1368
  onClick: close
1349
1369
  }, [
1350
- createElementVNode("span", _hoisted_6$f, [
1370
+ createElementVNode("span", _hoisted_6$g, [
1351
1371
  renderSlot(_ctx.$slots, "close-icon", {}, () => [
1352
1372
  _cache[0] || (_cache[0] = createTextVNode("×", -1))
1353
1373
  ], true)
1354
1374
  ])
1355
- ], 8, _hoisted_5$j)) : createCommentVNode("", true)
1375
+ ], 8, _hoisted_5$k)) : createCommentVNode("", true)
1356
1376
  ])) : createCommentVNode("", true),
1357
- createElementVNode("div", _hoisted_7$b, [
1377
+ createElementVNode("div", _hoisted_7$c, [
1358
1378
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
1359
1379
  ]),
1360
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$a, [
1380
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$b, [
1361
1381
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
1362
1382
  ])) : createCommentVNode("", true)
1363
- ], 8, _hoisted_1$K)
1383
+ ], 8, _hoisted_1$M)
1364
1384
  ], 32)) : createCommentVNode("", true)
1365
1385
  ]),
1366
1386
  _: 3
@@ -1369,13 +1389,13 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
1369
1389
  };
1370
1390
  }
1371
1391
  });
1372
- const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-742274be"]]);
1392
+ const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-742274be"]]);
1373
1393
  function tabValue(tab) {
1374
1394
  return tab.value ?? tab.key;
1375
1395
  }
1376
- const _hoisted_1$J = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
1377
- const _hoisted_2$C = ["id", "aria-labelledby"];
1378
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
1396
+ const _hoisted_1$L = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
1397
+ const _hoisted_2$E = ["id", "aria-labelledby"];
1398
+ const _sfc_main$W = /* @__PURE__ */ defineComponent({
1379
1399
  ...{ name: "TaoTabs" },
1380
1400
  __name: "TaoTabs",
1381
1401
  props: {
@@ -1480,7 +1500,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
1480
1500
  }, void 0, true, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1481
1501
  createTextVNode(toDisplayString(tab.label), 1)
1482
1502
  ], 64))
1483
- ], 8, _hoisted_1$J);
1503
+ ], 8, _hoisted_1$L);
1484
1504
  }), 128))
1485
1505
  ], 36),
1486
1506
  createElementVNode("div", {
@@ -1490,12 +1510,12 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
1490
1510
  "aria-labelledby": tabId(__props.modelValue)
1491
1511
  }, [
1492
1512
  renderSlot(_ctx.$slots, "default", { activeTab: __props.modelValue }, void 0, true)
1493
- ], 8, _hoisted_2$C)
1513
+ ], 8, _hoisted_2$E)
1494
1514
  ], 2);
1495
1515
  };
1496
1516
  }
1497
1517
  });
1498
- const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-a9238d96"]]);
1518
+ const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-a9238d96"]]);
1499
1519
  function listenFocusLoss(onLoss) {
1500
1520
  function onVisibilityChange() {
1501
1521
  if (document.hidden) {
@@ -1511,7 +1531,7 @@ function listenFocusLoss(onLoss) {
1511
1531
  window.removeEventListener("pagehide", onLoss);
1512
1532
  };
1513
1533
  }
1514
- const clamp = (v, min, max) => Math.min(Math.max(v, min), max);
1534
+ const clamp$1 = (v, min, max) => Math.min(Math.max(v, min), max);
1515
1535
  function decimalsOf(step) {
1516
1536
  if (!Number.isFinite(step) || step <= 0) return 0;
1517
1537
  const s = String(step);
@@ -1523,13 +1543,13 @@ const roundTo = (v, decimals) => {
1523
1543
  return Math.round(v * k) / k + 0;
1524
1544
  };
1525
1545
  function ratioOf(value, min, max) {
1526
- return max > min ? clamp((value - min) / (max - min), 0, 1) : 0;
1546
+ return max > min ? clamp$1((value - min) / (max - min), 0, 1) : 0;
1527
1547
  }
1528
1548
  function valueAt(ratio, min, max, step) {
1529
- const raw = min + clamp(ratio, 0, 1) * (max - min);
1530
- if (!(step > 0)) return clamp(raw, min, max);
1549
+ const raw = min + clamp$1(ratio, 0, 1) * (max - min);
1550
+ if (!(step > 0)) return clamp$1(raw, min, max);
1531
1551
  const snapped = min + Math.round((raw - min) / step) * step;
1532
- return clamp(roundTo(snapped, Math.max(decimalsOf(step), decimalsOf(min))), min, max);
1552
+ return clamp$1(roundTo(snapped, Math.max(decimalsOf(step), decimalsOf(min))), min, max);
1533
1553
  }
1534
1554
  function nearestMark(value, marks) {
1535
1555
  let best = value;
@@ -1559,11 +1579,11 @@ function nearestThumb(values, target, last = 0) {
1559
1579
  }
1560
1580
  function moveThumb(values, index, next, min, max, gap = 0) {
1561
1581
  const [a, b] = values;
1562
- return index === 0 ? [clamp(next, min, Math.max(min, b - gap)), b] : [a, clamp(next, Math.min(max, a + gap), max)];
1582
+ return index === 0 ? [clamp$1(next, min, Math.max(min, b - gap)), b] : [a, clamp$1(next, Math.min(max, a + gap), max)];
1563
1583
  }
1564
1584
  function normalizeValue(value, min, max) {
1565
1585
  const list = Array.isArray(value) ? [value[0], value[1]] : [value];
1566
- const clamped = list.map((v) => clamp(Number.isFinite(v) ? v : min, min, max));
1586
+ const clamped = list.map((v) => clamp$1(Number.isFinite(v) ? v : min, min, max));
1567
1587
  return clamped.length === 2 ? clamped.sort((x, y) => x - y) : clamped;
1568
1588
  }
1569
1589
  function niceStep(span, count) {
@@ -1589,22 +1609,22 @@ function normalizeMarks(marks, min, max, format = String) {
1589
1609
  function isMarkActive(markValue, values) {
1590
1610
  return values.length === 2 ? markValue >= values[0] && markValue <= values[1] : markValue <= (values[0] ?? 0);
1591
1611
  }
1592
- const _hoisted_1$I = ["aria-disabled"];
1593
- const _hoisted_2$B = ["id", "tabindex", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "aria-invalid", "aria-describedby", "onKeydown"];
1594
- const _hoisted_3$t = {
1612
+ const _hoisted_1$K = ["aria-disabled"];
1613
+ 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"];
1614
+ const _hoisted_3$v = {
1595
1615
  key: 0,
1596
1616
  class: "tao-slider__value"
1597
1617
  };
1598
- const _hoisted_4$p = {
1618
+ const _hoisted_4$q = {
1599
1619
  key: 0,
1600
1620
  class: "tao-slider__marks"
1601
1621
  };
1602
- const _hoisted_5$i = ["disabled", "onClick"];
1603
- const _hoisted_6$e = {
1622
+ const _hoisted_5$j = ["disabled", "onClick"];
1623
+ const _hoisted_6$f = {
1604
1624
  key: 0,
1605
1625
  class: "tao-slider__mark-label"
1606
1626
  };
1607
- const _sfc_main$T = /* @__PURE__ */ defineComponent({
1627
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
1608
1628
  ...{ name: "TaoSliderBase" },
1609
1629
  __name: "TaoSliderBase",
1610
1630
  props: {
@@ -1623,6 +1643,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
1623
1643
  error: { type: Boolean, default: false },
1624
1644
  variant: { default: "bar" },
1625
1645
  size: {},
1646
+ ariaLabel: {},
1626
1647
  wheel: { default: 0 },
1627
1648
  modelValue: {}
1628
1649
  },
@@ -1823,21 +1844,22 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
1823
1844
  "aria-valuemax": __props.max,
1824
1845
  "aria-valuenow": v,
1825
1846
  "aria-valuetext": text(v),
1847
+ "aria-label": __props.ariaLabel,
1826
1848
  "aria-orientation": __props.vertical ? "vertical" : "horizontal",
1827
1849
  "aria-disabled": __props.disabled || void 0,
1828
1850
  "aria-invalid": invalid.value || void 0,
1829
1851
  "aria-describedby": describedBy.value,
1830
1852
  onKeydown: ($event) => onKeydown($event, i),
1831
1853
  onBlur: _cache[0] || (_cache[0] = ($event) => pointerFocus.value = false)
1832
- }, null, 46, _hoisted_2$B);
1854
+ }, null, 46, _hoisted_2$D);
1833
1855
  }), 128)),
1834
- __props.showValue ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
1856
+ __props.showValue ? (openBlock(), createElementBlock("div", _hoisted_3$v, [
1835
1857
  renderSlot(_ctx.$slots, "pre-value", {}, void 0, true),
1836
1858
  createTextVNode(toDisplayString(barText.value), 1),
1837
1859
  renderSlot(_ctx.$slots, "post-value", {}, void 0, true)
1838
1860
  ])) : createCommentVNode("", true)
1839
1861
  ], 544),
1840
- markList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$p, [
1862
+ markList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$q, [
1841
1863
  (openBlock(true), createElementBlock(Fragment, null, renderList(markList.value, (mark) => {
1842
1864
  return openBlock(), createElementBlock("button", {
1843
1865
  key: mark.value,
@@ -1853,7 +1875,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
1853
1875
  onClick: ($event) => onMarkClick(mark)
1854
1876
  }, [
1855
1877
  _cache[2] || (_cache[2] = createElementVNode("span", { class: "tao-slider__tick" }, null, -1)),
1856
- mark.label ? (openBlock(), createElementBlock("span", _hoisted_6$e, [
1878
+ mark.label ? (openBlock(), createElementBlock("span", _hoisted_6$f, [
1857
1879
  renderSlot(_ctx.$slots, "mark", {
1858
1880
  mark,
1859
1881
  active: unref(isMarkActive)(mark.value, values.value)
@@ -1861,15 +1883,15 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
1861
1883
  createTextVNode(toDisplayString(mark.label), 1)
1862
1884
  ], true)
1863
1885
  ])) : createCommentVNode("", true)
1864
- ], 14, _hoisted_5$i);
1886
+ ], 14, _hoisted_5$j);
1865
1887
  }), 128))
1866
1888
  ])) : createCommentVNode("", true)
1867
- ], 42, _hoisted_1$I);
1889
+ ], 42, _hoisted_1$K);
1868
1890
  };
1869
1891
  }
1870
1892
  });
1871
- const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-9d009dbd"]]);
1872
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
1893
+ const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-648d0bf1"]]);
1894
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
1873
1895
  ...{ name: "TaoSlider" },
1874
1896
  __name: "TaoSlider",
1875
1897
  props: {
@@ -1888,6 +1910,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
1888
1910
  error: { type: Boolean },
1889
1911
  variant: {},
1890
1912
  size: {},
1913
+ ariaLabel: {},
1891
1914
  wheel: {},
1892
1915
  modelValue: {}
1893
1916
  },
@@ -1925,13 +1948,13 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
1925
1948
  };
1926
1949
  }
1927
1950
  });
1928
- const _hoisted_1$H = { class: "tao-timeline__controls" };
1929
- const _hoisted_2$A = { class: "tao-timeline__track" };
1930
- const _hoisted_3$s = {
1951
+ const _hoisted_1$J = { class: "tao-timeline__controls" };
1952
+ const _hoisted_2$C = { class: "tao-timeline__track" };
1953
+ const _hoisted_3$u = {
1931
1954
  key: 0,
1932
1955
  class: "tao-timeline__time"
1933
1956
  };
1934
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
1957
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
1935
1958
  ...{ name: "TaoTimeline" },
1936
1959
  __name: "TaoTimeline",
1937
1960
  props: {
@@ -1971,7 +1994,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
1971
1994
  return openBlock(), createElementBlock("div", {
1972
1995
  class: normalizeClass(["tao-timeline", [unref(sizeClass)(__props.size), `tao-timeline--${__props.variant}`, { "tao-timeline--marks-start": __props.marksSide === "start", "tao-timeline--disabled": __props.disabled }]])
1973
1996
  }, [
1974
- createElementVNode("div", _hoisted_1$H, [
1997
+ createElementVNode("div", _hoisted_1$J, [
1975
1998
  createVNode(TaoButton, {
1976
1999
  size: "small",
1977
2000
  variant: "secondary",
@@ -1999,8 +2022,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
1999
2022
  _: 1
2000
2023
  }, 8, ["disabled", "aria-label"])) : createCommentVNode("", true)
2001
2024
  ]),
2002
- createElementVNode("div", _hoisted_2$A, [
2003
- createVNode(_sfc_main$S, {
2025
+ createElementVNode("div", _hoisted_2$C, [
2026
+ createVNode(_sfc_main$U, {
2004
2027
  "model-value": __props.modelValue,
2005
2028
  min: 0,
2006
2029
  max: __props.length,
@@ -2023,7 +2046,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2023
2046
  } : void 0
2024
2047
  ]), 1032, ["model-value", "max", "step", "marks", "marks-side", "variant", "size", "disabled"])
2025
2048
  ]),
2026
- __props.showTime ? (openBlock(), createElementBlock("div", _hoisted_3$s, [
2049
+ __props.showTime ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
2027
2050
  renderSlot(_ctx.$slots, "time", {
2028
2051
  time: __props.modelValue,
2029
2052
  length: __props.length,
@@ -2036,8 +2059,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2036
2059
  };
2037
2060
  }
2038
2061
  });
2039
- const TaoTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-fb8f6331"]]);
2040
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2062
+ const TaoTimeline = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-fb8f6331"]]);
2063
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
2041
2064
  ...{ name: "TaoTooltip" },
2042
2065
  __name: "TaoTooltip",
2043
2066
  props: {
@@ -2199,9 +2222,9 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2199
2222
  };
2200
2223
  }
2201
2224
  });
2202
- const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-09caf2f5"]]);
2203
- const _hoisted_1$G = { class: "tao-popover" };
2204
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
2225
+ const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-09caf2f5"]]);
2226
+ const _hoisted_1$I = { class: "tao-popover" };
2227
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
2205
2228
  ...{ name: "TaoPopover" },
2206
2229
  __name: "TaoPopover",
2207
2230
  props: {
@@ -2239,7 +2262,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2239
2262
  if (typeof document === "undefined") {
2240
2263
  return;
2241
2264
  }
2242
- document.addEventListener("pointerdown", onDocumentPointer);
2265
+ document.addEventListener("pointerdown", onDocumentPointer, true);
2243
2266
  document.addEventListener("keydown", onDocumentKey);
2244
2267
  window.addEventListener("resize", onViewportChange);
2245
2268
  window.addEventListener("scroll", onViewportChange, true);
@@ -2248,7 +2271,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2248
2271
  if (typeof document === "undefined") {
2249
2272
  return;
2250
2273
  }
2251
- document.removeEventListener("pointerdown", onDocumentPointer);
2274
+ document.removeEventListener("pointerdown", onDocumentPointer, true);
2252
2275
  document.removeEventListener("keydown", onDocumentKey);
2253
2276
  window.removeEventListener("resize", onViewportChange);
2254
2277
  window.removeEventListener("scroll", onViewportChange, true);
@@ -2370,7 +2393,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2370
2393
  unbindDismiss();
2371
2394
  });
2372
2395
  return (_ctx, _cache) => {
2373
- return openBlock(), createElementBlock("div", _hoisted_1$G, [
2396
+ return openBlock(), createElementBlock("div", _hoisted_1$I, [
2374
2397
  createElementVNode("div", {
2375
2398
  ref_key: "triggerRef",
2376
2399
  ref: triggerRef,
@@ -2399,17 +2422,17 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2399
2422
  };
2400
2423
  }
2401
2424
  });
2402
- const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-3e488e1b"]]);
2425
+ const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-9a1e8080"]]);
2403
2426
  const spoilerGroupKey = Symbol("taoSpoilerGroup");
2404
- const _hoisted_1$F = { class: "tao-spoiler" };
2405
- const _hoisted_2$z = ["aria-expanded", "aria-controls"];
2406
- const _hoisted_3$r = {
2427
+ const _hoisted_1$H = { class: "tao-spoiler" };
2428
+ const _hoisted_2$B = ["aria-expanded", "aria-controls"];
2429
+ const _hoisted_3$t = {
2407
2430
  key: 0,
2408
2431
  class: "tao-spoiler__title"
2409
2432
  };
2410
- const _hoisted_4$o = ["id"];
2411
- const _hoisted_5$h = { class: "tao-spoiler__content-inner" };
2412
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
2433
+ const _hoisted_4$p = ["id"];
2434
+ const _hoisted_5$i = { class: "tao-spoiler__content-inner" };
2435
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
2413
2436
  ...{ name: "TaoSpoiler" },
2414
2437
  __name: "TaoSpoiler",
2415
2438
  props: {
@@ -2465,7 +2488,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2465
2488
  });
2466
2489
  }
2467
2490
  return (_ctx, _cache) => {
2468
- return openBlock(), createElementBlock("div", _hoisted_1$F, [
2491
+ return openBlock(), createElementBlock("div", _hoisted_1$H, [
2469
2492
  createElementVNode("button", {
2470
2493
  type: "button",
2471
2494
  class: "tao-spoiler__header",
@@ -2476,12 +2499,12 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2476
2499
  createElementVNode("span", {
2477
2500
  class: normalizeClass(["tao-spoiler__icon", { "tao-spoiler__icon--open": isOpen.value }])
2478
2501
  }, "▶", 2),
2479
- __props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_3$r, [
2502
+ __props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_3$t, [
2480
2503
  renderSlot(_ctx.$slots, "title", {}, () => [
2481
2504
  createTextVNode(toDisplayString(__props.title), 1)
2482
2505
  ], true)
2483
2506
  ])) : createCommentVNode("", true)
2484
- ], 8, _hoisted_2$z),
2507
+ ], 8, _hoisted_2$B),
2485
2508
  createVNode(Transition, {
2486
2509
  name: "tao-spoiler-slide",
2487
2510
  onBeforeEnter,
@@ -2495,10 +2518,10 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2495
2518
  id: unref(panelId),
2496
2519
  class: "tao-spoiler__content"
2497
2520
  }, [
2498
- createElementVNode("div", _hoisted_5$h, [
2521
+ createElementVNode("div", _hoisted_5$i, [
2499
2522
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
2500
2523
  ])
2501
- ], 8, _hoisted_4$o)) : createCommentVNode("", true)
2524
+ ], 8, _hoisted_4$p)) : createCommentVNode("", true)
2502
2525
  ]),
2503
2526
  _: 3
2504
2527
  })
@@ -2506,9 +2529,9 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2506
2529
  };
2507
2530
  }
2508
2531
  });
2509
- const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-5a3147a2"]]);
2510
- const _hoisted_1$E = { class: "tao-spoiler-group" };
2511
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
2532
+ const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-5a3147a2"]]);
2533
+ const _hoisted_1$G = { class: "tao-spoiler-group" };
2534
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
2512
2535
  ...{ name: "TaoSpoilerGroup" },
2513
2536
  __name: "TaoSpoilerGroup",
2514
2537
  props: {
@@ -2533,15 +2556,15 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
2533
2556
  setOpen
2534
2557
  });
2535
2558
  return (_ctx, _cache) => {
2536
- return openBlock(), createElementBlock("div", _hoisted_1$E, [
2559
+ return openBlock(), createElementBlock("div", _hoisted_1$G, [
2537
2560
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
2538
2561
  ]);
2539
2562
  };
2540
2563
  }
2541
2564
  });
2542
- const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-7986fd2a"]]);
2543
- const _hoisted_1$D = ["aria-label"];
2544
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
2565
+ const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-7986fd2a"]]);
2566
+ const _hoisted_1$F = ["aria-label"];
2567
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2545
2568
  ...{ name: "TaoCopy" },
2546
2569
  __name: "TaoCopy",
2547
2570
  props: {
@@ -2682,7 +2705,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
2682
2705
  "stroke-width": "2"
2683
2706
  })
2684
2707
  ], -1)
2685
- ])], 10, _hoisted_1$D)
2708
+ ])], 10, _hoisted_1$F)
2686
2709
  ], true),
2687
2710
  (openBlock(), createBlock(Teleport, { to: "body" }, [
2688
2711
  copied.value && __props.tip && doneText.value ? (openBlock(), createElementBlock("div", {
@@ -2698,8 +2721,8 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
2698
2721
  };
2699
2722
  }
2700
2723
  });
2701
- const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-16581b4e"]]);
2702
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
2724
+ const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-16581b4e"]]);
2725
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
2703
2726
  ...{ name: "TaoContainer" },
2704
2727
  __name: "TaoContainer",
2705
2728
  props: {
@@ -2722,8 +2745,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
2722
2745
  };
2723
2746
  }
2724
2747
  });
2725
- const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-ef005f57"]]);
2726
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
2748
+ const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-ef005f57"]]);
2749
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
2727
2750
  ...{ name: "TaoFlex" },
2728
2751
  __name: "TaoFlex",
2729
2752
  props: {
@@ -2754,7 +2777,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
2754
2777
  };
2755
2778
  }
2756
2779
  });
2757
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
2780
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
2758
2781
  ...{ name: "TaoSpace" },
2759
2782
  __name: "TaoSpace",
2760
2783
  props: {
@@ -2779,8 +2802,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
2779
2802
  };
2780
2803
  }
2781
2804
  });
2782
- const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-67c9d3a2"]]);
2783
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
2805
+ const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-67c9d3a2"]]);
2806
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
2784
2807
  ...{ name: "TaoGrid" },
2785
2808
  __name: "TaoGrid",
2786
2809
  props: {
@@ -2806,8 +2829,8 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
2806
2829
  };
2807
2830
  }
2808
2831
  });
2809
- const TaoGrid = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-5baa4944"]]);
2810
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
2832
+ const TaoGrid = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-5baa4944"]]);
2833
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
2811
2834
  ...{ name: "TaoGridItem" },
2812
2835
  __name: "TaoGridItem",
2813
2836
  props: {
@@ -2830,15 +2853,15 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
2830
2853
  };
2831
2854
  }
2832
2855
  });
2833
- const TaoGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-ad288026"]]);
2834
- const _hoisted_1$C = { class: "tao-split__pane tao-split__pane--start" };
2835
- const _hoisted_2$y = ["aria-orientation", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-disabled", "tabindex"];
2836
- const _hoisted_3$q = { class: "tao-split__pane tao-split__pane--end" };
2837
- const _hoisted_4$n = {
2856
+ const TaoGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-ad288026"]]);
2857
+ const _hoisted_1$E = { class: "tao-split__pane tao-split__pane--start" };
2858
+ const _hoisted_2$A = ["aria-orientation", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-disabled", "tabindex"];
2859
+ const _hoisted_3$s = { class: "tao-split__pane tao-split__pane--end" };
2860
+ const _hoisted_4$o = {
2838
2861
  key: 0,
2839
2862
  class: "tao-split__shield"
2840
2863
  };
2841
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
2864
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
2842
2865
  ...{ name: "TaoSplit" },
2843
2866
  __name: "TaoSplit",
2844
2867
  props: {
@@ -3135,7 +3158,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
3135
3158
  ]]),
3136
3159
  style: normalizeStyle({ "--tao-split-start": `${startPx.value}px` })
3137
3160
  }, [
3138
- createElementVNode("div", _hoisted_1$C, [
3161
+ createElementVNode("div", _hoisted_1$E, [
3139
3162
  renderSlot(_ctx.$slots, "start", {}, void 0, true)
3140
3163
  ]),
3141
3164
  createElementVNode("div", {
@@ -3158,18 +3181,18 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
3158
3181
  onKeydown,
3159
3182
  onDragstart: _cache[0] || (_cache[0] = withModifiers(() => {
3160
3183
  }, ["prevent"]))
3161
- }, null, 40, _hoisted_2$y),
3162
- createElementVNode("div", _hoisted_3$q, [
3184
+ }, null, 40, _hoisted_2$A),
3185
+ createElementVNode("div", _hoisted_3$s, [
3163
3186
  renderSlot(_ctx.$slots, "end", {}, void 0, true)
3164
3187
  ]),
3165
- isDragging.value ? (openBlock(), createElementBlock("div", _hoisted_4$n)) : createCommentVNode("", true)
3188
+ isDragging.value ? (openBlock(), createElementBlock("div", _hoisted_4$o)) : createCommentVNode("", true)
3166
3189
  ], 6);
3167
3190
  };
3168
3191
  }
3169
3192
  });
3170
- const TaoSplit = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-f34ab385"]]);
3171
- const _hoisted_1$B = { class: "tao-icon" };
3172
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
3193
+ const TaoSplit = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-f34ab385"]]);
3194
+ const _hoisted_1$D = { class: "tao-icon" };
3195
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
3173
3196
  ...{ name: "TaoIcon" },
3174
3197
  __name: "TaoIcon",
3175
3198
  props: {
@@ -3184,7 +3207,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
3184
3207
  }));
3185
3208
  const props = __props;
3186
3209
  return (_ctx, _cache) => {
3187
- return openBlock(), createElementBlock("span", _hoisted_1$B, [
3210
+ return openBlock(), createElementBlock("span", _hoisted_1$D, [
3188
3211
  renderSlot(_ctx.$slots, "prefix", {}, void 0, true),
3189
3212
  createElementVNode("i", {
3190
3213
  class: normalizeClass(["tao-icon__value", [`icon-${props.name}`, { "tao-icon__value--invert": props.invert }]]),
@@ -3195,8 +3218,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
3195
3218
  };
3196
3219
  }
3197
3220
  });
3198
- const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-350b3502"]]);
3199
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
3221
+ const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-350b3502"]]);
3222
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
3200
3223
  ...{ name: "TaoLoader" },
3201
3224
  __name: "TaoLoader",
3202
3225
  props: {
@@ -3257,11 +3280,11 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
3257
3280
  };
3258
3281
  }
3259
3282
  });
3260
- const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-49a9f1b2"]]);
3261
- const _hoisted_1$A = { class: "tao-image" };
3262
- const _hoisted_2$x = ["src", "alt", "loading"];
3263
- const _hoisted_3$p = { class: "tao-image__placeholder" };
3264
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
3283
+ const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-49a9f1b2"]]);
3284
+ const _hoisted_1$C = { class: "tao-image" };
3285
+ const _hoisted_2$z = ["src", "alt", "loading"];
3286
+ const _hoisted_3$r = { class: "tao-image__placeholder" };
3287
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
3265
3288
  ...{ name: "TaoImage" },
3266
3289
  __name: "TaoImage",
3267
3290
  props: {
@@ -3292,7 +3315,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
3292
3315
  hasError.value = false;
3293
3316
  });
3294
3317
  return (_ctx, _cache) => {
3295
- return openBlock(), createElementBlock("div", _hoisted_1$A, [
3318
+ return openBlock(), createElementBlock("div", _hoisted_1$C, [
3296
3319
  __props.src && !hasError.value ? (openBlock(), createElementBlock("img", {
3297
3320
  key: 0,
3298
3321
  class: normalizeClass({ "tao-image__img--hidden": !isLoaded.value, "tao-image__img--pixelated": props.pixelated }),
@@ -3303,26 +3326,26 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
3303
3326
  draggable: "false",
3304
3327
  onLoad: handleLoad,
3305
3328
  onError: handleError
3306
- }, null, 42, _hoisted_2$x)) : createCommentVNode("", true),
3329
+ }, null, 42, _hoisted_2$z)) : createCommentVNode("", true),
3307
3330
  !__props.src || hasError.value ? renderSlot(_ctx.$slots, "default", {}, () => [
3308
- createElementVNode("div", _hoisted_3$p, toDisplayString(__props.placeholderText), 1)
3331
+ createElementVNode("div", _hoisted_3$r, toDisplayString(__props.placeholderText), 1)
3309
3332
  ], true, 1) : createCommentVNode("", true)
3310
3333
  ]);
3311
3334
  };
3312
3335
  }
3313
3336
  });
3314
- const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-61f47c52"]]);
3315
- const _hoisted_1$z = ["for"];
3316
- const _hoisted_2$w = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
3317
- const _hoisted_3$o = {
3337
+ const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-61f47c52"]]);
3338
+ const _hoisted_1$B = ["for"];
3339
+ const _hoisted_2$y = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
3340
+ const _hoisted_3$q = {
3318
3341
  key: 0,
3319
3342
  class: "tao-checkbox__label"
3320
3343
  };
3321
- const _hoisted_4$m = {
3344
+ const _hoisted_4$n = {
3322
3345
  key: 1,
3323
3346
  class: "tao-checkbox__label"
3324
3347
  };
3325
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
3348
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
3326
3349
  ...{ name: "TaoCheckbox" },
3327
3350
  __name: "TaoCheckbox",
3328
3351
  props: {
@@ -3400,25 +3423,25 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
3400
3423
  "aria-invalid": invalid.value || void 0,
3401
3424
  "aria-describedby": describedBy.value,
3402
3425
  onChange: onInputChange
3403
- }, null, 40, _hoisted_2$w),
3426
+ }, null, 40, _hoisted_2$y),
3404
3427
  _cache[0] || (_cache[0] = createElementVNode("span", { class: "tao-checkbox__box" }, null, -1)),
3405
- __props.label ? (openBlock(), createElementBlock("span", _hoisted_3$o, toDisplayString(__props.label), 1)) : (openBlock(), createElementBlock("span", _hoisted_4$m, [
3428
+ __props.label ? (openBlock(), createElementBlock("span", _hoisted_3$q, toDisplayString(__props.label), 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, [
3406
3429
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
3407
3430
  ])),
3408
3431
  renderSlot(_ctx.$slots, "post", { text: __props.label }, void 0, true)
3409
- ], 10, _hoisted_1$z);
3432
+ ], 10, _hoisted_1$B);
3410
3433
  };
3411
3434
  }
3412
3435
  });
3413
- const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-13f6cd33"]]);
3414
- const _hoisted_1$y = {
3436
+ const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-13f6cd33"]]);
3437
+ const _hoisted_1$A = {
3415
3438
  key: 0,
3416
3439
  class: "tao-tag__prefix"
3417
3440
  };
3418
- const _hoisted_2$v = { class: "tao-tag__text" };
3419
- const _hoisted_3$n = ["aria-label"];
3420
- const _hoisted_4$l = { "aria-hidden": "true" };
3421
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
3441
+ const _hoisted_2$x = { class: "tao-tag__text" };
3442
+ const _hoisted_3$p = ["aria-label"];
3443
+ const _hoisted_4$m = { "aria-hidden": "true" };
3444
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
3422
3445
  ...{ name: "TaoTag" },
3423
3446
  __name: "TaoTag",
3424
3447
  props: {
@@ -3470,10 +3493,10 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
3470
3493
  ]]),
3471
3494
  style: normalizeStyle(style.value)
3472
3495
  }, [
3473
- _ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_1$y, [
3496
+ _ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_1$A, [
3474
3497
  renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
3475
3498
  ])) : createCommentVNode("", true),
3476
- createElementVNode("span", _hoisted_2$v, [
3499
+ createElementVNode("span", _hoisted_2$x, [
3477
3500
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
3478
3501
  ]),
3479
3502
  __props.closable ? (openBlock(), createElementBlock("button", {
@@ -3483,27 +3506,27 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
3483
3506
  "aria-label": unref(l10n).closeLabel,
3484
3507
  onClick: withModifiers(onClose, ["stop"])
3485
3508
  }, [
3486
- createElementVNode("span", _hoisted_4$l, [
3509
+ createElementVNode("span", _hoisted_4$m, [
3487
3510
  renderSlot(_ctx.$slots, "close-icon", {}, () => [
3488
3511
  _cache[0] || (_cache[0] = createTextVNode("✕", -1))
3489
3512
  ], true)
3490
3513
  ])
3491
- ], 8, _hoisted_3$n)) : createCommentVNode("", true)
3514
+ ], 8, _hoisted_3$p)) : createCommentVNode("", true)
3492
3515
  ], 6);
3493
3516
  };
3494
3517
  }
3495
3518
  });
3496
- const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-ca0b1b42"]]);
3497
- const _hoisted_1$x = ["role", "aria-hidden"];
3498
- const _hoisted_2$u = {
3519
+ const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-ca0b1b42"]]);
3520
+ const _hoisted_1$z = ["role", "aria-hidden"];
3521
+ const _hoisted_2$w = {
3499
3522
  key: 1,
3500
3523
  class: "tao-divider__text"
3501
3524
  };
3502
- const _hoisted_3$m = {
3525
+ const _hoisted_3$o = {
3503
3526
  key: 2,
3504
3527
  class: "tao-divider__line tao-divider__line--end"
3505
3528
  };
3506
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
3529
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
3507
3530
  ...{ name: "TaoDivider" },
3508
3531
  __name: "TaoDivider",
3509
3532
  props: {
@@ -3537,23 +3560,23 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
3537
3560
  key: 0,
3538
3561
  class: normalizeClass(["tao-divider__line", { "tao-divider__line--start": hasLabel.value }])
3539
3562
  }, null, 2)) : createCommentVNode("", true),
3540
- hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_2$u, [
3563
+ hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_2$w, [
3541
3564
  renderSlot(_ctx.$slots, "default", {}, () => [
3542
3565
  createTextVNode(toDisplayString(__props.text), 1)
3543
3566
  ], true)
3544
3567
  ])) : createCommentVNode("", true),
3545
- __props.variant !== "gap" && hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_3$m)) : createCommentVNode("", true)
3546
- ], 10, _hoisted_1$x);
3568
+ __props.variant !== "gap" && hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_3$o)) : createCommentVNode("", true)
3569
+ ], 10, _hoisted_1$z);
3547
3570
  };
3548
3571
  }
3549
3572
  });
3550
- const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-32544dcc"]]);
3551
- const _hoisted_1$w = {
3573
+ const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-32544dcc"]]);
3574
+ const _hoisted_1$y = {
3552
3575
  key: 0,
3553
3576
  class: "tao-fieldset__legend"
3554
3577
  };
3555
- const _hoisted_2$t = { class: "tao-fieldset__body" };
3556
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
3578
+ const _hoisted_2$v = { class: "tao-fieldset__body" };
3579
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
3557
3580
  ...{ name: "TaoFieldset" },
3558
3581
  __name: "TaoFieldset",
3559
3582
  props: {
@@ -3565,20 +3588,20 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
3565
3588
  return openBlock(), createElementBlock("fieldset", {
3566
3589
  class: normalizeClass(["tao-fieldset", `tao-fieldset--${__props.align}`])
3567
3590
  }, [
3568
- __props.legend || _ctx.$slots.legend ? (openBlock(), createElementBlock("legend", _hoisted_1$w, [
3591
+ __props.legend || _ctx.$slots.legend ? (openBlock(), createElementBlock("legend", _hoisted_1$y, [
3569
3592
  renderSlot(_ctx.$slots, "legend", {}, () => [
3570
3593
  createTextVNode(toDisplayString(__props.legend), 1)
3571
3594
  ], true)
3572
3595
  ])) : createCommentVNode("", true),
3573
- createElementVNode("div", _hoisted_2$t, [
3596
+ createElementVNode("div", _hoisted_2$v, [
3574
3597
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
3575
3598
  ])
3576
3599
  ], 2);
3577
3600
  };
3578
3601
  }
3579
3602
  });
3580
- const TaoFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-3445dafd"]]);
3581
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
3603
+ const TaoFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-3445dafd"]]);
3604
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
3582
3605
  ...{ name: "TaoAnimatedBorder" },
3583
3606
  __name: "TaoAnimatedBorder",
3584
3607
  props: {
@@ -3602,10 +3625,10 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
3602
3625
  };
3603
3626
  }
3604
3627
  });
3605
- const TaoAnimatedBorder = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-c9434028"]]);
3606
- const _hoisted_1$v = ["id", "placeholder", "spellcheck", "autocomplete", "minlength", "maxlength", "disabled", "readonly", "rows", "value", "aria-invalid", "aria-describedby"];
3607
- const _hoisted_2$s = ["id"];
3608
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
3628
+ const TaoAnimatedBorder = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-c9434028"]]);
3629
+ const _hoisted_1$x = ["id", "placeholder", "spellcheck", "autocomplete", "minlength", "maxlength", "disabled", "readonly", "rows", "value", "aria-invalid", "aria-describedby"];
3630
+ const _hoisted_2$u = ["id"];
3631
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
3609
3632
  ...{ name: "TaoTextarea" },
3610
3633
  __name: "TaoTextarea",
3611
3634
  props: {
@@ -3781,21 +3804,21 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
3781
3804
  onFocus,
3782
3805
  onBlur,
3783
3806
  onKeydown
3784
- }, null, 42, _hoisted_1$v),
3807
+ }, null, 42, _hoisted_1$x),
3785
3808
  __props.count ? (openBlock(), createElementBlock("span", {
3786
3809
  key: 0,
3787
3810
  id: counterId.value,
3788
3811
  class: normalizeClass(["tao-textarea__count", { "tao-textarea__count--limit": atLimit.value }])
3789
- }, toDisplayString(countLabel.value), 11, _hoisted_2$s)) : createCommentVNode("", true)
3812
+ }, toDisplayString(countLabel.value), 11, _hoisted_2$u)) : createCommentVNode("", true)
3790
3813
  ], 2));
3791
3814
  };
3792
3815
  }
3793
3816
  });
3794
- const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-50628dd9"]]);
3795
- const _hoisted_1$u = ["tabindex", "aria-label"];
3796
- const _hoisted_2$r = { class: "tao-scroll-top__content" };
3817
+ const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-50628dd9"]]);
3818
+ const _hoisted_1$w = ["tabindex", "aria-label"];
3819
+ const _hoisted_2$t = { class: "tao-scroll-top__content" };
3797
3820
  const RIPPLE_DURATION = 750;
3798
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
3821
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
3799
3822
  ...{ name: "TaoScrollTop" },
3800
3823
  __name: "TaoScrollTop",
3801
3824
  props: {
@@ -3902,7 +3925,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
3902
3925
  "aria-label": props.ariaLabel,
3903
3926
  onClick: withModifiers(onClick, ["prevent"])
3904
3927
  }, [
3905
- createElementVNode("div", _hoisted_2$r, [
3928
+ createElementVNode("div", _hoisted_2$t, [
3906
3929
  createElementVNode("div", {
3907
3930
  class: normalizeClass([{ "tao-scroll-top__ripple--active": isRippleActive.value }, "tao-scroll-top__ripple"]),
3908
3931
  style: normalizeStyle(rippleStyle)
@@ -3919,33 +3942,33 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
3919
3942
  ], -1))
3920
3943
  ], true)
3921
3944
  ])
3922
- ], 14, _hoisted_1$u)) : createCommentVNode("", true)
3945
+ ], 14, _hoisted_1$w)) : createCommentVNode("", true)
3923
3946
  ]),
3924
3947
  _: 3
3925
3948
  });
3926
3949
  };
3927
3950
  }
3928
3951
  });
3929
- const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-89d2feaa"]]);
3930
- const _hoisted_1$t = { class: "tao-progress" };
3931
- const _hoisted_2$q = {
3952
+ const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-89d2feaa"]]);
3953
+ const _hoisted_1$v = { class: "tao-progress" };
3954
+ const _hoisted_2$s = {
3932
3955
  key: 0,
3933
3956
  class: "tao-progress__side"
3934
3957
  };
3935
- const _hoisted_3$l = { class: "tao-progress__main" };
3936
- const _hoisted_4$k = {
3958
+ const _hoisted_3$n = { class: "tao-progress__main" };
3959
+ const _hoisted_4$l = {
3937
3960
  key: 0,
3938
3961
  class: "tao-progress__percentage"
3939
3962
  };
3940
- const _hoisted_5$g = {
3963
+ const _hoisted_5$h = {
3941
3964
  key: 1,
3942
3965
  class: "tao-progress__side"
3943
3966
  };
3944
- const _hoisted_6$d = {
3967
+ const _hoisted_6$e = {
3945
3968
  key: 0,
3946
3969
  class: "tao-progress__percentage"
3947
3970
  };
3948
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
3971
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
3949
3972
  ...{ name: "TaoProgress" },
3950
3973
  __name: "TaoProgress",
3951
3974
  props: {
@@ -3976,16 +3999,16 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
3976
3999
  () => hasRight.value ? `(${props.progress}%)` : `${props.progress}%`
3977
4000
  );
3978
4001
  return (_ctx, _cache) => {
3979
- return openBlock(), createElementBlock("div", _hoisted_1$t, [
4002
+ return openBlock(), createElementBlock("div", _hoisted_1$v, [
3980
4003
  createElementVNode("div", {
3981
4004
  class: normalizeClass(["tao-progress__container", { "tao-progress__container--over": showOverPercent.value }]),
3982
4005
  style: normalizeStyle({ minWidth: `${minW.value}px`, maxWidth: `${maxW.value}px` })
3983
4006
  }, [
3984
- _ctx.$slots.left ? (openBlock(), createElementBlock("div", _hoisted_2$q, [
4007
+ _ctx.$slots.left ? (openBlock(), createElementBlock("div", _hoisted_2$s, [
3985
4008
  renderSlot(_ctx.$slots, "left", {}, void 0, true)
3986
4009
  ])) : createCommentVNode("", true),
3987
- createElementVNode("div", _hoisted_3$l, [
3988
- showOverPercent.value ? (openBlock(), createElementBlock("span", _hoisted_4$k, toDisplayString(__props.progress) + "%", 1)) : createCommentVNode("", true),
4010
+ createElementVNode("div", _hoisted_3$n, [
4011
+ showOverPercent.value ? (openBlock(), createElementBlock("span", _hoisted_4$l, toDisplayString(__props.progress) + "%", 1)) : createCommentVNode("", true),
3989
4012
  createElementVNode("div", {
3990
4013
  class: "tao-progress__track",
3991
4014
  style: normalizeStyle({ height: `${__props.height}px` })
@@ -3996,17 +4019,17 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
3996
4019
  }, null, 6)
3997
4020
  ], 4)
3998
4021
  ]),
3999
- _ctx.$slots.right || showEndPercent.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
4022
+ _ctx.$slots.right || showEndPercent.value ? (openBlock(), createElementBlock("div", _hoisted_5$h, [
4000
4023
  renderSlot(_ctx.$slots, "right", {}, void 0, true),
4001
- showEndPercent.value ? (openBlock(), createElementBlock("span", _hoisted_6$d, toDisplayString(endPercentLabel.value), 1)) : createCommentVNode("", true)
4024
+ showEndPercent.value ? (openBlock(), createElementBlock("span", _hoisted_6$e, toDisplayString(endPercentLabel.value), 1)) : createCommentVNode("", true)
4002
4025
  ])) : createCommentVNode("", true)
4003
4026
  ], 6)
4004
4027
  ]);
4005
4028
  };
4006
4029
  }
4007
4030
  });
4008
- const TaoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-1aae89cd"]]);
4009
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
4031
+ const TaoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-1aae89cd"]]);
4032
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
4010
4033
  ...{ name: "TaoRangeSlider" },
4011
4034
  __name: "TaoRangeSlider",
4012
4035
  props: {
@@ -4025,6 +4048,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
4025
4048
  error: { type: Boolean },
4026
4049
  variant: {},
4027
4050
  size: {},
4051
+ ariaLabel: {},
4028
4052
  wheel: {},
4029
4053
  modelValue: {}
4030
4054
  },
@@ -4062,19 +4086,19 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
4062
4086
  };
4063
4087
  }
4064
4088
  });
4065
- const _hoisted_1$s = { class: "tao-file-drop__row" };
4066
- const _hoisted_2$p = ["aria-label"];
4067
- const _hoisted_3$k = { "aria-hidden": "true" };
4068
- const _hoisted_4$j = ["accept", "multiple"];
4069
- const _hoisted_5$f = {
4089
+ const _hoisted_1$u = { class: "tao-file-drop__row" };
4090
+ const _hoisted_2$r = ["aria-label"];
4091
+ const _hoisted_3$m = { "aria-hidden": "true" };
4092
+ const _hoisted_4$k = ["accept", "multiple"];
4093
+ const _hoisted_5$g = {
4070
4094
  key: 0,
4071
4095
  class: "tao-file-drop__list"
4072
4096
  };
4073
- const _hoisted_6$c = { class: "tao-file-drop__name" };
4074
- const _hoisted_7$a = { class: "tao-file-drop__meta" };
4075
- const _hoisted_8$9 = ["aria-label", "onClick"];
4097
+ const _hoisted_6$d = { class: "tao-file-drop__name" };
4098
+ const _hoisted_7$b = { class: "tao-file-drop__meta" };
4099
+ const _hoisted_8$a = ["aria-label", "onClick"];
4076
4100
  const _hoisted_9$4 = { "aria-hidden": "true" };
4077
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
4101
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
4078
4102
  ...{ name: "TaoFileDrop" },
4079
4103
  __name: "TaoFileDrop",
4080
4104
  props: {
@@ -4214,7 +4238,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
4214
4238
  return openBlock(), createElementBlock("div", {
4215
4239
  class: normalizeClass(["tao-file-drop", unref(sizeClass)(__props.size)])
4216
4240
  }, [
4217
- createElementVNode("div", _hoisted_1$s, [
4241
+ createElementVNode("div", _hoisted_1$u, [
4218
4242
  __props.showClear && __props.modelValue.length ? (openBlock(), createElementBlock("button", {
4219
4243
  key: 0,
4220
4244
  type: "button",
@@ -4222,12 +4246,12 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
4222
4246
  "aria-label": unref(l10n).clearLabel,
4223
4247
  onClick: requestClear
4224
4248
  }, [
4225
- createElementVNode("span", _hoisted_3$k, [
4249
+ createElementVNode("span", _hoisted_3$m, [
4226
4250
  renderSlot(_ctx.$slots, "clear-icon", {}, () => [
4227
4251
  _cache[1] || (_cache[1] = createTextVNode("✕", -1))
4228
4252
  ], true)
4229
4253
  ])
4230
- ], 8, _hoisted_2$p)) : createCommentVNode("", true),
4254
+ ], 8, _hoisted_2$r)) : createCommentVNode("", true),
4231
4255
  createElementVNode("label", {
4232
4256
  class: normalizeClass(["tao-file-drop__zone", { "tao-file-drop__zone--dragging": isDragging.value }]),
4233
4257
  onDragover: handleDragOver,
@@ -4247,17 +4271,17 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
4247
4271
  onChange: handleFileSelect,
4248
4272
  onClick: _cache[0] || (_cache[0] = withModifiers(() => {
4249
4273
  }, ["stop"]))
4250
- }, null, 40, _hoisted_4$j)
4274
+ }, null, 40, _hoisted_4$k)
4251
4275
  ], 34)
4252
4276
  ]),
4253
- __props.list && __props.modelValue.length ? (openBlock(), createElementBlock("ul", _hoisted_5$f, [
4277
+ __props.list && __props.modelValue.length ? (openBlock(), createElementBlock("ul", _hoisted_5$g, [
4254
4278
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.modelValue, (file, index) => {
4255
4279
  return openBlock(), createElementBlock("li", {
4256
4280
  key: fileKey(file, index),
4257
4281
  class: "tao-file-drop__file"
4258
4282
  }, [
4259
- createElementVNode("span", _hoisted_6$c, toDisplayString(file.name), 1),
4260
- createElementVNode("span", _hoisted_7$a, toDisplayString(sizeLabel(file.size)), 1),
4283
+ createElementVNode("span", _hoisted_6$d, toDisplayString(file.name), 1),
4284
+ createElementVNode("span", _hoisted_7$b, toDisplayString(sizeLabel(file.size)), 1),
4261
4285
  createElementVNode("button", {
4262
4286
  type: "button",
4263
4287
  class: "tao-file-drop__remove",
@@ -4269,7 +4293,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
4269
4293
  _cache[2] || (_cache[2] = createTextVNode("✕", -1))
4270
4294
  ], true)
4271
4295
  ])
4272
- ], 8, _hoisted_8$9)
4296
+ ], 8, _hoisted_8$a)
4273
4297
  ]);
4274
4298
  }), 128))
4275
4299
  ])) : createCommentVNode("", true)
@@ -4277,15 +4301,15 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
4277
4301
  };
4278
4302
  }
4279
4303
  });
4280
- const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-f8c58faa"]]);
4281
- const _hoisted_1$r = ["aria-expanded", "aria-label"];
4282
- const _hoisted_2$o = {
4304
+ const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-f8c58faa"]]);
4305
+ const _hoisted_1$t = ["aria-expanded", "aria-label"];
4306
+ const _hoisted_2$q = {
4283
4307
  key: 1,
4284
4308
  "aria-hidden": "true"
4285
4309
  };
4286
- const _hoisted_3$j = ["onClick", "onMouseenter"];
4287
- const _hoisted_4$i = { key: 1 };
4288
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
4310
+ const _hoisted_3$l = ["onClick", "onMouseenter"];
4311
+ const _hoisted_4$j = { key: 1 };
4312
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
4289
4313
  ...{ name: "TaoDropdownMenu" },
4290
4314
  __name: "TaoDropdownMenu",
4291
4315
  props: {
@@ -4399,12 +4423,12 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
4399
4423
  }
4400
4424
  }
4401
4425
  onMounted(() => {
4402
- document.addEventListener("pointerdown", onDocumentPointer);
4426
+ document.addEventListener("pointerdown", onDocumentPointer, true);
4403
4427
  window.addEventListener("scroll", onWinScroll, true);
4404
4428
  window.addEventListener("resize", updatePosition);
4405
4429
  });
4406
4430
  onBeforeUnmount(() => {
4407
- document.removeEventListener("pointerdown", onDocumentPointer);
4431
+ document.removeEventListener("pointerdown", onDocumentPointer, true);
4408
4432
  window.removeEventListener("scroll", onWinScroll, true);
4409
4433
  window.removeEventListener("resize", updatePosition);
4410
4434
  });
@@ -4427,12 +4451,12 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
4427
4451
  "aria-label": _ctx.$slots.button ? void 0 : unref(l10n).menuLabel,
4428
4452
  onClick: toggleMenu
4429
4453
  }, [
4430
- _ctx.$slots.button ? renderSlot(_ctx.$slots, "button", {}, void 0, true, 0) : (openBlock(), createElementBlock("span", _hoisted_2$o, [
4454
+ _ctx.$slots.button ? renderSlot(_ctx.$slots, "button", {}, void 0, true, 0) : (openBlock(), createElementBlock("span", _hoisted_2$q, [
4431
4455
  renderSlot(_ctx.$slots, "icon", {}, () => [
4432
4456
  _cache[0] || (_cache[0] = createTextVNode("⋮", -1))
4433
4457
  ], true)
4434
4458
  ]))
4435
- ], 8, _hoisted_1$r),
4459
+ ], 8, _hoisted_1$t),
4436
4460
  (openBlock(), createBlock(Teleport, { to: "body" }, [
4437
4461
  isOpen.value ? (openBlock(), createElementBlock("div", {
4438
4462
  key: 0,
@@ -4457,8 +4481,8 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
4457
4481
  id: action.id,
4458
4482
  ico: action.ico,
4459
4483
  text: action.name
4460
- }, void 0, true, 0) : (openBlock(), createElementBlock("span", _hoisted_4$i, toDisplayString(action.name), 1))
4461
- ], 42, _hoisted_3$j);
4484
+ }, void 0, true, 0) : (openBlock(), createElementBlock("span", _hoisted_4$j, toDisplayString(action.name), 1))
4485
+ ], 42, _hoisted_3$l);
4462
4486
  }), 128))
4463
4487
  ], 36)) : createCommentVNode("", true)
4464
4488
  ]))
@@ -4466,10 +4490,10 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
4466
4490
  };
4467
4491
  }
4468
4492
  });
4469
- const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-5db490aa"]]);
4470
- const _hoisted_1$q = ["aria-invalid", "aria-describedby"];
4471
- const _hoisted_2$n = ["id", "value", "placeholder", "type", "disabled", "aria-invalid", "inputmode", "pattern", "maxlength", "onInput", "onPaste", "onKeydown", "onFocus"];
4472
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
4493
+ const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-de4a2254"]]);
4494
+ const _hoisted_1$s = ["aria-invalid", "aria-describedby"];
4495
+ const _hoisted_2$p = ["id", "value", "placeholder", "type", "disabled", "aria-invalid", "inputmode", "pattern", "maxlength", "onInput", "onPaste", "onKeydown", "onFocus"];
4496
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
4473
4497
  ...{ name: "TaoPinCode" },
4474
4498
  __name: "TaoPinCode",
4475
4499
  props: {
@@ -4688,14 +4712,14 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
4688
4712
  onKeydown: ($event) => onKeydown($event, index),
4689
4713
  onFocus: ($event) => onFocus(index),
4690
4714
  onBlur
4691
- }, null, 42, _hoisted_2$n);
4715
+ }, null, 42, _hoisted_2$p);
4692
4716
  }), 128))
4693
- ], 10, _hoisted_1$q);
4717
+ ], 10, _hoisted_1$s);
4694
4718
  };
4695
4719
  }
4696
4720
  });
4697
- const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-6f0df8bd"]]);
4698
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
4721
+ const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-6f0df8bd"]]);
4722
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
4699
4723
  ...{ name: "TaoLink" },
4700
4724
  __name: "TaoLink",
4701
4725
  props: {
@@ -4742,8 +4766,8 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
4742
4766
  };
4743
4767
  }
4744
4768
  });
4745
- const _hoisted_1$p = ["for"];
4746
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
4769
+ const _hoisted_1$r = ["for"];
4770
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
4747
4771
  ...{ name: "TaoFormField" },
4748
4772
  __name: "TaoFormField",
4749
4773
  props: {
@@ -4794,7 +4818,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
4794
4818
  class: "tao-form-field__label",
4795
4819
  for: unref(id),
4796
4820
  onClick: onLabelClick
4797
- }, toDisplayString(__props.label), 9, _hoisted_1$p)) : createCommentVNode("", true),
4821
+ }, toDisplayString(__props.label), 9, _hoisted_1$r)) : createCommentVNode("", true),
4798
4822
  renderSlot(_ctx.$slots, "default", {}, void 0, true),
4799
4823
  __props.error ? (openBlock(), createElementBlock("p", {
4800
4824
  key: 1,
@@ -4809,12 +4833,12 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
4809
4833
  };
4810
4834
  }
4811
4835
  });
4812
- const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-3cf90e3a"]]);
4813
- const _hoisted_1$o = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
4814
- const _hoisted_2$m = { class: "tao-select__value" };
4815
- const _hoisted_3$i = ["aria-activedescendant"];
4816
- const _hoisted_4$h = ["id", "aria-selected", "aria-disabled", "data-tao-select-index", "onClick", "onMouseenter"];
4817
- const _sfc_main$o = /* @__PURE__ */ defineComponent({
4836
+ const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-3cf90e3a"]]);
4837
+ const _hoisted_1$q = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
4838
+ const _hoisted_2$o = { class: "tao-select__value" };
4839
+ const _hoisted_3$k = ["aria-activedescendant"];
4840
+ const _hoisted_4$i = ["id", "aria-selected", "aria-disabled", "data-tao-select-index", "onClick", "onMouseenter"];
4841
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
4818
4842
  ...{ name: "TaoSelect" },
4819
4843
  __name: "TaoSelect",
4820
4844
  props: {
@@ -5002,17 +5026,17 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
5002
5026
  watch(open, (isOpen) => {
5003
5027
  if (isOpen) {
5004
5028
  panelSize.value = resolveSize(triggerRef.value, props.size);
5005
- document.addEventListener("pointerdown", onDocumentPointer);
5029
+ document.addEventListener("pointerdown", onDocumentPointer, true);
5006
5030
  window.addEventListener("resize", onViewportChange);
5007
5031
  window.addEventListener("scroll", onViewportChange, true);
5008
5032
  return;
5009
5033
  }
5010
- document.removeEventListener("pointerdown", onDocumentPointer);
5034
+ document.removeEventListener("pointerdown", onDocumentPointer, true);
5011
5035
  window.removeEventListener("resize", onViewportChange);
5012
5036
  window.removeEventListener("scroll", onViewportChange, true);
5013
5037
  });
5014
5038
  onBeforeUnmount(() => {
5015
- document.removeEventListener("pointerdown", onDocumentPointer);
5039
+ document.removeEventListener("pointerdown", onDocumentPointer, true);
5016
5040
  window.removeEventListener("resize", onViewportChange);
5017
5041
  window.removeEventListener("scroll", onViewportChange, true);
5018
5042
  });
@@ -5037,14 +5061,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
5037
5061
  onClick: toggle,
5038
5062
  onKeydown: onTriggerKeydown
5039
5063
  }, [
5040
- createElementVNode("span", _hoisted_2$m, toDisplayString(((_a = selected.value) == null ? void 0 : _a.label) ?? unref(l10n).placeholder), 1),
5064
+ createElementVNode("span", _hoisted_2$o, toDisplayString(((_a = selected.value) == null ? void 0 : _a.label) ?? unref(l10n).placeholder), 1),
5041
5065
  createElementVNode("span", {
5042
5066
  class: normalizeClass(["tao-select__chevron", { "tao-select__chevron--custom": _ctx.$slots.chevron }]),
5043
5067
  "aria-hidden": "true"
5044
5068
  }, [
5045
5069
  renderSlot(_ctx.$slots, "chevron", {}, void 0, true)
5046
5070
  ], 2)
5047
- ], 42, _hoisted_1$o),
5071
+ ], 42, _hoisted_1$q),
5048
5072
  (openBlock(), createBlock(Teleport, { to: "body" }, [
5049
5073
  open.value ? (openBlock(), createElementBlock("div", {
5050
5074
  key: 0,
@@ -5080,9 +5104,9 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
5080
5104
  }, ["prevent"])),
5081
5105
  onClick: ($event) => selectOption(option),
5082
5106
  onMouseenter: ($event) => !option.disabled && (activeIndex.value = index)
5083
- }, toDisplayString(option.label), 43, _hoisted_4$h);
5107
+ }, toDisplayString(option.label), 43, _hoisted_4$i);
5084
5108
  }), 128))
5085
- ], 40, _hoisted_3$i),
5109
+ ], 40, _hoisted_3$k),
5086
5110
  __props.clearable && selected.value ? (openBlock(), createElementBlock("button", {
5087
5111
  key: 0,
5088
5112
  type: "button",
@@ -5101,90 +5125,839 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
5101
5125
  };
5102
5126
  }
5103
5127
  });
5104
- const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-47d327a3"]]);
5105
- const _hoisted_1$n = ["id", "aria-expanded", "aria-activedescendant", "aria-invalid", "aria-describedby", "disabled", "placeholder", "value"];
5106
- const _hoisted_2$l = {
5128
+ const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-a3dccaa5"]]);
5129
+ const clamp = (v, lo, hi) => Math.min(Math.max(v, lo), hi);
5130
+ const byte = (v) => Math.round(clamp(v, 0, 255));
5131
+ const hex2 = (v) => byte(v).toString(16).padStart(2, "0");
5132
+ function channel(text, scale) {
5133
+ const t = text.trim();
5134
+ return t.endsWith("%") ? parseFloat(t) / 100 * scale : parseFloat(t);
5135
+ }
5136
+ function parseColor(input) {
5137
+ const text = input.trim();
5138
+ const hex = /^#?([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(text);
5139
+ if (hex) {
5140
+ let h = hex[1];
5141
+ if (h.length <= 4) h = [...h].map((c) => c + c).join("");
5142
+ const n = (i) => parseInt(h.slice(i, i + 2), 16);
5143
+ return { r: n(0), g: n(2), b: n(4), a: h.length === 8 ? n(6) / 255 : 1 };
5144
+ }
5145
+ const fn = /^(rgba?|hsla?)\(\s*([^)]+?)\s*\)$/i.exec(text);
5146
+ if (fn && fn[1].toLowerCase().startsWith("hsl")) {
5147
+ const [main, slash] = fn[2].split("/");
5148
+ const parts = main.trim().split(/[\s,]+/);
5149
+ const alphaText = slash !== void 0 ? slash : parts[3];
5150
+ if (parts.length < 3 || parts.length > (slash === void 0 ? 4 : 3)) return null;
5151
+ const h = parseFloat(parts[0]);
5152
+ const s = parseFloat(parts[1]) / 100;
5153
+ const l = parseFloat(parts[2]) / 100;
5154
+ const a = alphaText === void 0 ? 1 : channel(alphaText, 1);
5155
+ if ([h, s, l, a].some((v) => Number.isNaN(v))) return null;
5156
+ return { ...hslToRgb(h, s, l), a: clamp(a, 0, 1) };
5157
+ }
5158
+ if (fn) {
5159
+ const [main, slash] = fn[2].split("/");
5160
+ const parts = main.trim().split(/[\s,]+/);
5161
+ const alphaText = slash !== void 0 ? slash : parts[3];
5162
+ if (parts.length < 3 || parts.length > (slash === void 0 ? 4 : 3)) return null;
5163
+ const r = channel(parts[0], 255);
5164
+ const g = channel(parts[1], 255);
5165
+ const b = channel(parts[2], 255);
5166
+ const a = alphaText === void 0 ? 1 : channel(alphaText, 1);
5167
+ if ([r, g, b, a].some((v) => Number.isNaN(v))) return null;
5168
+ return { r: byte(r), g: byte(g), b: byte(b), a: clamp(a, 0, 1) };
5169
+ }
5170
+ return null;
5171
+ }
5172
+ function toHex(color, alpha = false) {
5173
+ const base = `#${hex2(color.r)}${hex2(color.g)}${hex2(color.b)}`;
5174
+ return alpha ? `${base}${hex2(clamp(color.a, 0, 1) * 255)}` : base;
5175
+ }
5176
+ function rgbToHsv(r, g, b) {
5177
+ const R = clamp(r, 0, 255) / 255;
5178
+ const G = clamp(g, 0, 255) / 255;
5179
+ const B = clamp(b, 0, 255) / 255;
5180
+ const max = Math.max(R, G, B);
5181
+ const d = max - Math.min(R, G, B);
5182
+ let h = 0;
5183
+ if (d > 0) {
5184
+ if (max === R) h = (G - B) / d % 6;
5185
+ else if (max === G) h = (B - R) / d + 2;
5186
+ else h = (R - G) / d + 4;
5187
+ h *= 60;
5188
+ if (h < 0) h += 360;
5189
+ }
5190
+ return { h, s: max === 0 ? 0 : d / max, v: max };
5191
+ }
5192
+ function hsvToRgb(h, s, v) {
5193
+ const H = (h % 360 + 360) % 360 / 60;
5194
+ const S = clamp(s, 0, 1);
5195
+ const V = clamp(v, 0, 1);
5196
+ const f = (n) => {
5197
+ const k = (n + H) % 6;
5198
+ return V - V * S * Math.max(0, Math.min(k, 4 - k, 1));
5199
+ };
5200
+ return { r: f(5) * 255, g: f(3) * 255, b: f(1) * 255 };
5201
+ }
5202
+ function rgbToHsl(r, g, b) {
5203
+ const { h, s: sv, v } = rgbToHsv(r, g, b);
5204
+ const l = v * (1 - sv / 2);
5205
+ return { h, s: l === 0 || l === 1 ? 0 : (v - l) / Math.min(l, 1 - l), l };
5206
+ }
5207
+ function hslToRgb(h, s, l) {
5208
+ const S = clamp(s, 0, 1);
5209
+ const L = clamp(l, 0, 1);
5210
+ const v = L + S * Math.min(L, 1 - L);
5211
+ const rgb = hsvToRgb(h, v === 0 ? 0 : 2 * (1 - L / v), v);
5212
+ return { r: byte(rgb.r), g: byte(rgb.g), b: byte(rgb.b) };
5213
+ }
5214
+ const rgbaToHsva = (c) => ({ ...rgbToHsv(c.r, c.g, c.b), a: c.a });
5215
+ const hsvaToRgba = (c) => ({ ...hsvToRgb(c.h, c.s, c.v), a: c.a });
5216
+ const linearToSrgb = (c) => {
5217
+ const x = clamp(c, 0, 1);
5218
+ return x <= 31308e-7 ? x * 12.92 : 1.055 * Math.pow(x, 1 / 2.4) - 0.055;
5219
+ };
5220
+ const srgbToLinear = (c) => {
5221
+ const x = clamp(c, 0, 1);
5222
+ return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
5223
+ };
5224
+ function normalizeHex(input, alpha = false) {
5225
+ const c = parseColor(input);
5226
+ return c ? toHex(c, alpha) : null;
5227
+ }
5228
+ const segmentedKey = Symbol("taoSegmented");
5229
+ const _hoisted_1$p = ["disabled", "aria-describedby", "aria-invalid", "aria-labelledby", "id"];
5230
+ const _hoisted_2$n = {
5107
5231
  key: 0,
5108
- class: "tao-combobox__empty"
5232
+ class: "tao-segmented__legend"
5109
5233
  };
5110
- const _hoisted_3$h = ["id", "aria-selected", "aria-disabled", "data-tao-combobox-index", "onClick", "onMouseenter"];
5111
- const _sfc_main$n = /* @__PURE__ */ defineComponent({
5112
- ...{ name: "TaoCombobox" },
5113
- __name: "TaoCombobox",
5234
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
5235
+ ...{ name: "TaoSegmented" },
5236
+ __name: "TaoSegmented",
5114
5237
  props: {
5115
- modelValue: { default: null },
5116
- options: { default: () => [] },
5117
- placeholder: {},
5238
+ modelValue: { type: [String, Number, Boolean] },
5239
+ name: {},
5240
+ legend: {},
5118
5241
  disabled: { type: Boolean, default: false },
5119
5242
  error: { type: Boolean, default: false },
5120
- emptyText: {},
5121
- clearText: {},
5122
- clearable: { type: Boolean, default: true },
5123
5243
  size: {},
5124
- allowCreate: { type: Boolean, default: false }
5244
+ block: { type: Boolean, default: false }
5125
5245
  },
5126
- emits: ["update:modelValue", "change", "create"],
5246
+ emits: ["update:modelValue", "change"],
5127
5247
  setup(__props, { emit: __emit }) {
5128
5248
  const props = __props;
5129
- const l10n = useLocaleText(props, "combobox");
5130
5249
  const emit = __emit;
5131
5250
  const field = inject(formFieldKey, null);
5132
- const localId = useId();
5133
- const listId = `${localId}-list`;
5134
- const controlId = computed(() => (field == null ? void 0 : field.id) ?? localId);
5251
+ const autoName = useId();
5252
+ const groupName = computed(() => props.name || autoName);
5253
+ const model = computed(() => props.modelValue);
5254
+ const groupDisabled = computed(() => props.disabled);
5135
5255
  const invalid = computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
5136
5256
  const describedBy = computed(() => field == null ? void 0 : field.describedBy.value);
5137
- const open = ref(false);
5138
- const focused = ref(false);
5139
- const picking = ref(false);
5140
- const skipFocusOpen = ref(false);
5141
- const query = ref("");
5142
- const activeIndex = ref(-1);
5143
- const fieldRef = ref(null);
5144
- const inputRef = ref(null);
5145
- const panelRef = ref(null);
5146
- const panelSize = ref("medium");
5147
- const listRef = ref(null);
5148
- const listStyle = ref({ top: "0px", left: "0px", width: "0px" });
5149
- const selected = computed(() => {
5150
- const found = props.options.find((option) => option.value === props.modelValue);
5151
- if (found) {
5152
- return found;
5257
+ const trackRef = ref(null);
5258
+ const thumbStyle = ref({ opacity: "0" });
5259
+ let resizeObserver = null;
5260
+ let mutationObserver = null;
5261
+ function setValue(value) {
5262
+ emit("update:modelValue", value);
5263
+ emit("change", value);
5264
+ }
5265
+ function updateThumb() {
5266
+ const track = trackRef.value;
5267
+ if (!track) {
5268
+ return;
5153
5269
  }
5154
- if (props.modelValue === null || props.modelValue === void 0 || props.modelValue === "") {
5155
- return null;
5270
+ const selected = track.querySelector(".tao-segmented-option--checked");
5271
+ if (!selected) {
5272
+ if (thumbStyle.value.opacity !== "0") {
5273
+ thumbStyle.value = { opacity: "0" };
5274
+ }
5275
+ return;
5156
5276
  }
5157
- return { value: props.modelValue, label: String(props.modelValue) };
5158
- });
5159
- const needle = computed(() => query.value.trim().toLowerCase());
5160
- const filtered = computed(() => {
5161
- if (!needle.value) {
5162
- return props.options;
5277
+ const trackBox = track.getBoundingClientRect();
5278
+ const optionBox = selected.getBoundingClientRect();
5279
+ const next = {
5280
+ width: `${optionBox.width}px`,
5281
+ height: `${optionBox.height}px`,
5282
+ transform: `translate(${optionBox.left - trackBox.left - track.clientLeft}px, ${optionBox.top - trackBox.top - track.clientTop}px)`,
5283
+ opacity: "1"
5284
+ };
5285
+ const prev = thumbStyle.value;
5286
+ if (prev.width === next.width && prev.height === next.height && prev.transform === next.transform && prev.opacity === next.opacity) {
5287
+ return;
5163
5288
  }
5164
- return props.options.filter((option) => option.label.toLowerCase().includes(needle.value));
5289
+ thumbStyle.value = next;
5290
+ }
5291
+ provide(segmentedKey, {
5292
+ name: groupName,
5293
+ model,
5294
+ disabled: groupDisabled,
5295
+ setValue
5165
5296
  });
5166
- const canCreate = computed(() => {
5167
- const text = query.value.trim();
5168
- if (!props.allowCreate || !text) {
5169
- return false;
5297
+ onMounted(() => {
5298
+ const track = trackRef.value;
5299
+ void nextTick(updateThumb);
5300
+ if (!track) {
5301
+ return;
5170
5302
  }
5171
- return !props.options.some((option) => option.label.toLowerCase() === text.toLowerCase());
5172
- });
5173
- const rows = computed(() => {
5174
- const next = filtered.value.map((option) => ({ kind: "option", option }));
5175
- if (canCreate.value) {
5176
- next.push({ kind: "create", text: query.value.trim() });
5303
+ if (typeof ResizeObserver !== "undefined") {
5304
+ resizeObserver = new ResizeObserver(() => updateThumb());
5305
+ resizeObserver.observe(track);
5177
5306
  }
5178
- return next;
5307
+ mutationObserver = new MutationObserver(() => updateThumb());
5308
+ mutationObserver.observe(track, {
5309
+ subtree: true,
5310
+ childList: true,
5311
+ attributes: true,
5312
+ attributeFilter: ["class"]
5313
+ });
5179
5314
  });
5180
- const enabledIndexes = computed(
5181
- () => rows.value.map((row, index) => row.kind === "option" && row.option.disabled ? -1 : index).filter((index) => index >= 0)
5315
+ watch(
5316
+ () => [props.modelValue, props.size, props.block, props.disabled],
5317
+ () => {
5318
+ void nextTick(updateThumb);
5319
+ }
5182
5320
  );
5183
- const activeId = computed(() => activeIndex.value >= 0 ? `${listId}-row-${activeIndex.value}` : void 0);
5184
- function syncQueryFromModel() {
5185
- var _a;
5186
- query.value = ((_a = selected.value) == null ? void 0 : _a.label) ?? "";
5187
- }
5321
+ onBeforeUnmount(() => {
5322
+ resizeObserver == null ? void 0 : resizeObserver.disconnect();
5323
+ resizeObserver = null;
5324
+ mutationObserver == null ? void 0 : mutationObserver.disconnect();
5325
+ mutationObserver = null;
5326
+ });
5327
+ return (_ctx, _cache) => {
5328
+ var _a;
5329
+ return openBlock(), createElementBlock("fieldset", {
5330
+ class: normalizeClass(["tao-segmented", [
5331
+ unref(sizeClass)(__props.size),
5332
+ {
5333
+ "tao-segmented--block": __props.block,
5334
+ "tao-segmented--disabled": __props.disabled,
5335
+ "tao-segmented--invalid": invalid.value
5336
+ }
5337
+ ]]),
5338
+ disabled: __props.disabled,
5339
+ "aria-describedby": describedBy.value,
5340
+ "aria-invalid": invalid.value || void 0,
5341
+ "aria-labelledby": __props.legend ? void 0 : unref(field) ? `${unref(field).id}-label` : void 0,
5342
+ id: (_a = unref(field)) == null ? void 0 : _a.id
5343
+ }, [
5344
+ __props.legend ? (openBlock(), createElementBlock("legend", _hoisted_2$n, toDisplayString(__props.legend), 1)) : createCommentVNode("", true),
5345
+ createElementVNode("div", {
5346
+ ref_key: "trackRef",
5347
+ ref: trackRef,
5348
+ class: "tao-segmented__track"
5349
+ }, [
5350
+ createElementVNode("div", {
5351
+ class: "tao-segmented__thumb",
5352
+ style: normalizeStyle(thumbStyle.value),
5353
+ "aria-hidden": "true"
5354
+ }, null, 4),
5355
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
5356
+ ], 512)
5357
+ ], 10, _hoisted_1$p);
5358
+ };
5359
+ }
5360
+ });
5361
+ const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-7dc6820f"]]);
5362
+ const _hoisted_1$o = ["for"];
5363
+ const _hoisted_2$m = ["id", "name", "value", "checked", "disabled", "aria-label"];
5364
+ const _hoisted_3$j = { class: "tao-segmented-option__face" };
5365
+ const _hoisted_4$h = {
5366
+ key: 0,
5367
+ class: "tao-segmented-option__icon",
5368
+ "aria-hidden": "true"
5369
+ };
5370
+ const _hoisted_5$f = {
5371
+ key: 1,
5372
+ class: "tao-segmented-option__label"
5373
+ };
5374
+ const _hoisted_6$c = {
5375
+ key: 2,
5376
+ class: "tao-segmented-option__sr"
5377
+ };
5378
+ const _hoisted_7$a = {
5379
+ key: 3,
5380
+ class: "tao-segmented-option__count"
5381
+ };
5382
+ const _sfc_main$o = /* @__PURE__ */ defineComponent({
5383
+ ...{ name: "TaoSegmentedOption" },
5384
+ __name: "TaoSegmentedOption",
5385
+ props: {
5386
+ value: { type: [String, Number, Boolean] },
5387
+ modelValue: { type: [String, Number, Boolean] },
5388
+ name: {},
5389
+ label: { default: "" },
5390
+ icon: { default: "" },
5391
+ count: {},
5392
+ disabled: { type: Boolean, default: false },
5393
+ ariaLabel: {}
5394
+ },
5395
+ emits: ["update:modelValue", "change"],
5396
+ setup(__props, { emit: __emit }) {
5397
+ const props = __props;
5398
+ const emit = __emit;
5399
+ const group = inject(segmentedKey, null);
5400
+ const slots = useSlots();
5401
+ const localId = useId();
5402
+ const isDisabled = computed(() => props.disabled || Boolean(group == null ? void 0 : group.disabled.value));
5403
+ const inputName = computed(() => (group == null ? void 0 : group.name.value) ?? props.name);
5404
+ const isChecked = computed(() => {
5405
+ const current2 = group ? group.model.value : props.modelValue;
5406
+ return current2 === props.value;
5407
+ });
5408
+ const hasLabel = computed(() => Boolean(props.label || slots.default));
5409
+ const isIconOnly = computed(() => Boolean((props.icon || slots.icon) && !hasLabel.value));
5410
+ const countLabel = computed(() => {
5411
+ if (props.count === void 0 || props.count === null || props.count === "") {
5412
+ return "";
5413
+ }
5414
+ if (typeof props.count === "number") {
5415
+ if (props.count > 99) {
5416
+ return "99+";
5417
+ }
5418
+ return String(props.count);
5419
+ }
5420
+ return String(props.count);
5421
+ });
5422
+ function onChange() {
5423
+ if (isDisabled.value) {
5424
+ return;
5425
+ }
5426
+ if (group) {
5427
+ group.setValue(props.value);
5428
+ return;
5429
+ }
5430
+ emit("update:modelValue", props.value);
5431
+ emit("change", props.value);
5432
+ }
5433
+ return (_ctx, _cache) => {
5434
+ return openBlock(), createElementBlock("label", {
5435
+ class: normalizeClass(["tao-segmented-option", {
5436
+ "tao-segmented-option--checked": isChecked.value,
5437
+ "tao-segmented-option--disabled": props.disabled,
5438
+ "tao-segmented-option--icon-only": isIconOnly.value
5439
+ }]),
5440
+ for: unref(localId)
5441
+ }, [
5442
+ createElementVNode("input", {
5443
+ id: unref(localId),
5444
+ class: "tao-segmented-option__input",
5445
+ type: "radio",
5446
+ name: inputName.value,
5447
+ value: String(__props.value),
5448
+ checked: isChecked.value,
5449
+ disabled: isDisabled.value,
5450
+ "aria-label": __props.ariaLabel,
5451
+ onChange
5452
+ }, null, 40, _hoisted_2$m),
5453
+ createElementVNode("span", _hoisted_3$j, [
5454
+ __props.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_4$h, [
5455
+ renderSlot(_ctx.$slots, "icon", {}, () => [
5456
+ createTextVNode(toDisplayString(__props.icon), 1)
5457
+ ], true)
5458
+ ])) : createCommentVNode("", true),
5459
+ hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_5$f, [
5460
+ renderSlot(_ctx.$slots, "default", {}, () => [
5461
+ createTextVNode(toDisplayString(__props.label), 1)
5462
+ ], true)
5463
+ ])) : __props.ariaLabel ? (openBlock(), createElementBlock("span", _hoisted_6$c, toDisplayString(__props.ariaLabel), 1)) : createCommentVNode("", true),
5464
+ countLabel.value ? (openBlock(), createElementBlock("span", _hoisted_7$a, toDisplayString(countLabel.value), 1)) : createCommentVNode("", true)
5465
+ ])
5466
+ ], 10, _hoisted_1$o);
5467
+ };
5468
+ }
5469
+ });
5470
+ const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-fba7ca12"]]);
5471
+ const _hoisted_1$n = ["tabindex", "aria-label", "aria-valuetext", "aria-valuenow"];
5472
+ const _hoisted_2$l = { class: "tao-color-picker__strips" };
5473
+ const _hoisted_3$i = { class: "tao-color-picker__row" };
5474
+ const _hoisted_4$g = { class: "tao-color-picker__preview" };
5475
+ const _hoisted_5$e = {
5476
+ key: 1,
5477
+ class: "tao-color-picker__channels"
5478
+ };
5479
+ const _hoisted_6$b = ["disabled", "aria-label", "title"];
5480
+ const _hoisted_7$9 = ["aria-label"];
5481
+ const _hoisted_8$9 = ["disabled", "aria-label", "title", "onClick"];
5482
+ const _sfc_main$n = /* @__PURE__ */ defineComponent({
5483
+ ...{ name: "TaoColorPicker" },
5484
+ __name: "TaoColorPicker",
5485
+ props: {
5486
+ modelValue: {},
5487
+ alpha: { type: Boolean, default: false },
5488
+ swatches: {},
5489
+ modes: { default: () => ["hex", "rgb", "hsl"] },
5490
+ mode: {},
5491
+ eyedropper: { type: Boolean, default: true },
5492
+ disabled: { type: Boolean, default: false },
5493
+ size: {},
5494
+ areaLabel: {},
5495
+ hueLabel: {},
5496
+ alphaLabel: {},
5497
+ hexLabel: {},
5498
+ modeLabel: {},
5499
+ swatchesLabel: {},
5500
+ eyedropperLabel: {}
5501
+ },
5502
+ emits: ["update:modelValue", "update:mode", "change"],
5503
+ setup(__props, { emit: __emit }) {
5504
+ const props = __props;
5505
+ const emit = __emit;
5506
+ const l10n = useLocaleText(props, "colorPicker");
5507
+ const state = reactive({ h: 0, s: 0, v: 0, a: 1 });
5508
+ const hex = computed(() => toHex(hsvaToRgba(state), props.alpha));
5509
+ function load(value) {
5510
+ const c = parseColor(value);
5511
+ if (!c) return;
5512
+ const next = rgbaToHsva(c);
5513
+ state.h = next.s === 0 || next.v === 0 ? state.h : next.h;
5514
+ state.s = next.s;
5515
+ state.v = next.v;
5516
+ state.a = props.alpha ? next.a : 1;
5517
+ }
5518
+ load(props.modelValue);
5519
+ watch(
5520
+ () => props.modelValue,
5521
+ (value) => {
5522
+ if (normalizeHex(value, props.alpha) !== hex.value) load(value);
5523
+ }
5524
+ );
5525
+ watch(
5526
+ () => props.alpha,
5527
+ () => load(props.modelValue)
5528
+ );
5529
+ const currentMode = ref(props.mode ?? props.modes[0] ?? "hex");
5530
+ watch(
5531
+ () => props.mode,
5532
+ (m) => {
5533
+ if (m) currentMode.value = m;
5534
+ }
5535
+ );
5536
+ const activeMode = computed(() => props.modes.includes(currentMode.value) ? currentMode.value : props.modes[0] ?? "hex");
5537
+ const modeValue = computed({
5538
+ get: () => activeMode.value,
5539
+ set: (m) => {
5540
+ currentMode.value = m;
5541
+ emit("update:mode", m);
5542
+ }
5543
+ });
5544
+ const rgbFields = computed(() => {
5545
+ const c = hsvaToRgba(state);
5546
+ return [Math.round(c.r), Math.round(c.g), Math.round(c.b)];
5547
+ });
5548
+ const hslFields = computed(() => {
5549
+ const [r, g, b] = rgbFields.value;
5550
+ const { s, l } = rgbToHsl(r, g, b);
5551
+ return [Math.round(state.h) % 360, Math.round(s * 100), Math.round(l * 100)];
5552
+ });
5553
+ const alphaPercent = computed(() => Math.round(state.a * 100));
5554
+ const channels = computed(() => {
5555
+ const list = [];
5556
+ if (activeMode.value === "rgb") {
5557
+ ["R", "G", "B"].forEach((label, index) => list.push({ key: label, label, max: 255, value: rgbFields.value[index], kind: "rgb", index }));
5558
+ } else if (activeMode.value === "hsl") {
5559
+ const max = [360, 100, 100];
5560
+ ["H", "S", "L"].forEach((label, index) => list.push({ key: label, label, max: max[index], value: hslFields.value[index], kind: "hsl", index }));
5561
+ }
5562
+ if (activeMode.value !== "hex" && props.alpha) list.push({ key: "A", label: "A", max: 100, value: alphaPercent.value, kind: "alpha", index: 0 });
5563
+ return list;
5564
+ });
5565
+ function commitChannel(kind, index, value) {
5566
+ if (value === null || !Number.isFinite(value)) return;
5567
+ if (kind === "alpha") {
5568
+ state.a = Math.min(100, Math.max(0, value)) / 100;
5569
+ } else if (kind === "rgb") {
5570
+ const next = [...rgbFields.value];
5571
+ next[index] = Math.min(255, Math.max(0, Math.round(value)));
5572
+ load(toHex({ r: next[0], g: next[1], b: next[2], a: state.a }, true));
5573
+ } else {
5574
+ const next = [...hslFields.value];
5575
+ next[index] = value;
5576
+ const rgb = hslToRgb((next[0] % 360 + 360) % 360, next[1] / 100, next[2] / 100);
5577
+ load(toHex({ ...rgb, a: state.a }, true));
5578
+ state.h = (next[0] % 360 + 360) % 360;
5579
+ }
5580
+ push(true);
5581
+ }
5582
+ const hexText = ref(hex.value);
5583
+ const hexInvalid = ref(false);
5584
+ watch(hex, (h) => {
5585
+ hexText.value = h;
5586
+ hexInvalid.value = false;
5587
+ });
5588
+ function push(final = false) {
5589
+ emit("update:modelValue", hex.value);
5590
+ if (final) emit("change", hex.value);
5591
+ }
5592
+ const areaRef = ref(null);
5593
+ let dragging = -1;
5594
+ function fromPointer(e) {
5595
+ const el = areaRef.value;
5596
+ if (!el) return;
5597
+ const r = el.getBoundingClientRect();
5598
+ state.s = r.width ? Math.min(1, Math.max(0, (e.clientX - r.left) / r.width)) : 0;
5599
+ state.v = r.height ? 1 - Math.min(1, Math.max(0, (e.clientY - r.top) / r.height)) : 0;
5600
+ push();
5601
+ }
5602
+ function onAreaDown(e) {
5603
+ var _a, _b;
5604
+ if (props.disabled || e.button !== 0) return;
5605
+ dragging = e.pointerId;
5606
+ fromPointer(e);
5607
+ e.preventDefault();
5608
+ (_a = areaRef.value) == null ? void 0 : _a.focus({ preventScroll: true });
5609
+ try {
5610
+ (_b = areaRef.value) == null ? void 0 : _b.setPointerCapture(e.pointerId);
5611
+ } catch {
5612
+ }
5613
+ }
5614
+ function onAreaMove(e) {
5615
+ if (dragging === e.pointerId) fromPointer(e);
5616
+ }
5617
+ function onAreaUp(e) {
5618
+ if (dragging !== e.pointerId) return;
5619
+ dragging = -1;
5620
+ emit("change", hex.value);
5621
+ }
5622
+ function onAreaKey(e) {
5623
+ if (props.disabled) return;
5624
+ const k = e.shiftKey ? 0.1 : 0.01;
5625
+ const keys = { ArrowLeft: [-k, 0], ArrowRight: [k, 0], ArrowUp: [0, k], ArrowDown: [0, -k] };
5626
+ const d = keys[e.key];
5627
+ if (!d) return;
5628
+ e.preventDefault();
5629
+ state.s = Math.min(1, Math.max(0, Math.round((state.s + d[0]) * 1e3) / 1e3));
5630
+ state.v = Math.min(1, Math.max(0, Math.round((state.v + d[1]) * 1e3) / 1e3));
5631
+ push(true);
5632
+ }
5633
+ const hueValue = computed({ get: () => state.h, set: (v) => (state.h = v, push()) });
5634
+ const alphaValue = computed({ get: () => state.a, set: (v) => (state.a = v, push()) });
5635
+ const hueCss = computed(() => toHex(hsvaToRgba({ h: state.h, s: 1, v: 1, a: 1 })));
5636
+ const solidCss = computed(() => toHex(hsvaToRgba({ ...state, a: 1 })));
5637
+ function commitHex() {
5638
+ const next = normalizeHex(hexText.value, props.alpha);
5639
+ if (!next) {
5640
+ hexInvalid.value = true;
5641
+ return;
5642
+ }
5643
+ hexInvalid.value = false;
5644
+ load(next);
5645
+ hexText.value = hex.value;
5646
+ push(true);
5647
+ }
5648
+ function pick(color) {
5649
+ if (props.disabled) return;
5650
+ load(color);
5651
+ push(true);
5652
+ }
5653
+ const canEyedrop = computed(() => props.eyedropper && typeof window !== "undefined" && "EyeDropper" in window);
5654
+ async function eyedrop() {
5655
+ try {
5656
+ const EyeDropperCtor = window.EyeDropper;
5657
+ const { sRGBHex } = await new EyeDropperCtor().open();
5658
+ pick(sRGBHex);
5659
+ } catch {
5660
+ }
5661
+ }
5662
+ const areaText = computed(() => `${Math.round(state.s * 100)}%, ${Math.round(state.v * 100)}%`);
5663
+ return (_ctx, _cache) => {
5664
+ var _a;
5665
+ return openBlock(), createElementBlock("div", {
5666
+ class: normalizeClass(["tao-color-picker", [unref(sizeClass)(__props.size), { "tao-color-picker--disabled": __props.disabled }]])
5667
+ }, [
5668
+ createElementVNode("div", {
5669
+ ref_key: "areaRef",
5670
+ ref: areaRef,
5671
+ class: "tao-color-picker__area",
5672
+ style: normalizeStyle({ backgroundColor: hueCss.value }),
5673
+ role: "slider",
5674
+ tabindex: __props.disabled ? -1 : 0,
5675
+ "aria-label": unref(l10n).areaLabel,
5676
+ "aria-valuetext": areaText.value,
5677
+ "aria-valuenow": Math.round(state.s * 100),
5678
+ "aria-valuemin": "0",
5679
+ "aria-valuemax": "100",
5680
+ onPointerdown: onAreaDown,
5681
+ onPointermove: onAreaMove,
5682
+ onPointerup: onAreaUp,
5683
+ onPointercancel: onAreaUp,
5684
+ onKeydown: onAreaKey
5685
+ }, [
5686
+ createElementVNode("span", {
5687
+ class: "tao-color-picker__cursor",
5688
+ style: normalizeStyle({ left: `${state.s * 100}%`, top: `${(1 - state.v) * 100}%`, backgroundColor: solidCss.value })
5689
+ }, null, 4)
5690
+ ], 44, _hoisted_1$n),
5691
+ createElementVNode("div", _hoisted_2$l, [
5692
+ createVNode(_sfc_main$U, {
5693
+ modelValue: hueValue.value,
5694
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => hueValue.value = $event),
5695
+ class: "tao-color-picker__hue",
5696
+ variant: "thin",
5697
+ min: 0,
5698
+ max: 360,
5699
+ step: 1,
5700
+ disabled: __props.disabled,
5701
+ "aria-label": unref(l10n).hueLabel,
5702
+ onChange: _cache[1] || (_cache[1] = ($event) => emit("change", hex.value))
5703
+ }, null, 8, ["modelValue", "disabled", "aria-label"]),
5704
+ __props.alpha ? (openBlock(), createBlock(_sfc_main$U, {
5705
+ key: 0,
5706
+ modelValue: alphaValue.value,
5707
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => alphaValue.value = $event),
5708
+ class: "tao-color-picker__alpha",
5709
+ variant: "thin",
5710
+ min: 0,
5711
+ max: 1,
5712
+ step: 0.01,
5713
+ disabled: __props.disabled,
5714
+ "aria-label": unref(l10n).alphaLabel,
5715
+ style: normalizeStyle({ "--tao-color-picker-solid": solidCss.value }),
5716
+ onChange: _cache[3] || (_cache[3] = ($event) => emit("change", hex.value))
5717
+ }, null, 8, ["modelValue", "disabled", "aria-label", "style"])) : createCommentVNode("", true)
5718
+ ]),
5719
+ __props.modes.length > 1 ? (openBlock(), createBlock(TaoSegmented, {
5720
+ key: 0,
5721
+ modelValue: modeValue.value,
5722
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => modeValue.value = $event),
5723
+ class: "tao-color-picker__modes",
5724
+ size: "small",
5725
+ "aria-label": unref(l10n).modeLabel,
5726
+ disabled: __props.disabled
5727
+ }, {
5728
+ default: withCtx(() => [
5729
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.modes, (m) => {
5730
+ return openBlock(), createBlock(TaoSegmentedOption, {
5731
+ key: m,
5732
+ value: m,
5733
+ label: m.toUpperCase()
5734
+ }, null, 8, ["value", "label"]);
5735
+ }), 128))
5736
+ ]),
5737
+ _: 1
5738
+ }, 8, ["modelValue", "aria-label", "disabled"])) : createCommentVNode("", true),
5739
+ createElementVNode("div", _hoisted_3$i, [
5740
+ createElementVNode("span", _hoisted_4$g, [
5741
+ createElementVNode("span", {
5742
+ style: normalizeStyle({ backgroundColor: hex.value })
5743
+ }, null, 4)
5744
+ ]),
5745
+ activeMode.value === "hex" ? (openBlock(), createBlock(TaoInput, {
5746
+ key: 0,
5747
+ modelValue: hexText.value,
5748
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => hexText.value = $event),
5749
+ class: "tao-color-picker__hex",
5750
+ size: "small",
5751
+ error: hexInvalid.value,
5752
+ disabled: __props.disabled,
5753
+ "aria-label": unref(l10n).hexLabel,
5754
+ onBlur: commitHex,
5755
+ onKeydown: withKeys(commitHex, ["enter"])
5756
+ }, null, 8, ["modelValue", "error", "disabled", "aria-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$e, [
5757
+ (openBlock(true), createElementBlock(Fragment, null, renderList(channels.value, (c) => {
5758
+ return openBlock(), createElementBlock("label", {
5759
+ key: c.key,
5760
+ class: "tao-color-picker__channel"
5761
+ }, [
5762
+ createElementVNode("span", null, toDisplayString(c.label), 1),
5763
+ createVNode(TaoInputNumber, {
5764
+ size: "small",
5765
+ controls: false,
5766
+ min: 0,
5767
+ max: c.max,
5768
+ step: 1,
5769
+ "model-value": c.value,
5770
+ disabled: __props.disabled,
5771
+ onCommit: (v) => commitChannel(c.kind, c.index, v)
5772
+ }, null, 8, ["max", "model-value", "disabled", "onCommit"])
5773
+ ]);
5774
+ }), 128))
5775
+ ])),
5776
+ canEyedrop.value ? (openBlock(), createElementBlock("button", {
5777
+ key: 2,
5778
+ type: "button",
5779
+ class: "tao-color-picker__eyedropper",
5780
+ disabled: __props.disabled,
5781
+ "aria-label": unref(l10n).eyedropperLabel,
5782
+ title: unref(l10n).eyedropperLabel,
5783
+ onClick: eyedrop
5784
+ }, " ✎ ", 8, _hoisted_6$b)) : createCommentVNode("", true)
5785
+ ]),
5786
+ ((_a = __props.swatches) == null ? void 0 : _a.length) ? (openBlock(), createElementBlock("div", {
5787
+ key: 1,
5788
+ class: "tao-color-picker__swatches",
5789
+ role: "group",
5790
+ "aria-label": unref(l10n).swatchesLabel
5791
+ }, [
5792
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.swatches, (s) => {
5793
+ return openBlock(), createElementBlock("button", {
5794
+ key: s,
5795
+ type: "button",
5796
+ class: normalizeClass(["tao-color-picker__swatch", { "tao-color-picker__swatch--on": unref(normalizeHex)(s, __props.alpha) === hex.value }]),
5797
+ style: normalizeStyle({ backgroundColor: s }),
5798
+ disabled: __props.disabled,
5799
+ "aria-label": s,
5800
+ title: s,
5801
+ onClick: ($event) => pick(s)
5802
+ }, null, 14, _hoisted_8$9);
5803
+ }), 128))
5804
+ ], 8, _hoisted_7$9)) : createCommentVNode("", true)
5805
+ ], 2);
5806
+ };
5807
+ }
5808
+ });
5809
+ const TaoColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-9fe54966"]]);
5810
+ const _hoisted_1$m = ["disabled", "aria-label", "aria-expanded"];
5811
+ const _hoisted_2$k = { class: "tao-color-input__swatch" };
5812
+ const _hoisted_3$h = { class: "tao-color-input__text" };
5813
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
5814
+ ...{ name: "TaoColorInput" },
5815
+ __name: "TaoColorInput",
5816
+ props: {
5817
+ modelValue: {},
5818
+ alpha: { type: Boolean, default: false },
5819
+ swatches: {},
5820
+ modes: { default: () => ["hex", "rgb", "hsl"] },
5821
+ mode: {},
5822
+ eyedropper: { type: Boolean, default: true },
5823
+ disabled: { type: Boolean, default: false },
5824
+ error: { type: Boolean, default: false },
5825
+ position: { default: "bottom" },
5826
+ size: {},
5827
+ chooseLabel: {}
5828
+ },
5829
+ emits: ["update:modelValue", "update:mode", "change"],
5830
+ setup(__props, { emit: __emit }) {
5831
+ const props = __props;
5832
+ const emit = __emit;
5833
+ const l10n = useLocaleText(props, "colorPicker");
5834
+ const shown = computed(() => normalizeHex(props.modelValue, props.alpha) ?? props.modelValue);
5835
+ return (_ctx, _cache) => {
5836
+ return openBlock(), createBlock(TaoPopover, {
5837
+ position: __props.position,
5838
+ disabled: __props.disabled,
5839
+ class: "tao-color-input-root"
5840
+ }, {
5841
+ trigger: withCtx(({ open }) => [
5842
+ createElementVNode("button", {
5843
+ type: "button",
5844
+ class: normalizeClass(["tao-color-input", [unref(sizeClass)(__props.size), { "tao-color-input--open": open, "tao-color-input--invalid": __props.error }]]),
5845
+ disabled: __props.disabled,
5846
+ "aria-label": `${unref(l10n).chooseLabel}: ${shown.value}`,
5847
+ "aria-haspopup": "dialog",
5848
+ "aria-expanded": open
5849
+ }, [
5850
+ createElementVNode("span", _hoisted_2$k, [
5851
+ createElementVNode("span", {
5852
+ style: normalizeStyle({ backgroundColor: shown.value })
5853
+ }, null, 4)
5854
+ ]),
5855
+ createElementVNode("span", _hoisted_3$h, toDisplayString(shown.value), 1)
5856
+ ], 10, _hoisted_1$m)
5857
+ ]),
5858
+ default: withCtx(() => [
5859
+ createVNode(TaoColorPicker, {
5860
+ "model-value": __props.modelValue,
5861
+ alpha: __props.alpha,
5862
+ swatches: __props.swatches,
5863
+ modes: __props.modes,
5864
+ mode: __props.mode,
5865
+ eyedropper: __props.eyedropper,
5866
+ size: __props.size,
5867
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", $event)),
5868
+ "onUpdate:mode": _cache[1] || (_cache[1] = ($event) => emit("update:mode", $event)),
5869
+ onChange: _cache[2] || (_cache[2] = ($event) => emit("change", $event))
5870
+ }, null, 8, ["model-value", "alpha", "swatches", "modes", "mode", "eyedropper", "size"])
5871
+ ]),
5872
+ _: 1
5873
+ }, 8, ["position", "disabled"]);
5874
+ };
5875
+ }
5876
+ });
5877
+ const TaoColorInput = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-cc186067"]]);
5878
+ const _hoisted_1$l = ["id", "aria-expanded", "aria-activedescendant", "aria-invalid", "aria-describedby", "disabled", "placeholder", "value"];
5879
+ const _hoisted_2$j = {
5880
+ key: 0,
5881
+ class: "tao-combobox__empty"
5882
+ };
5883
+ const _hoisted_3$g = ["id", "aria-selected", "aria-disabled", "data-tao-combobox-index", "onClick", "onMouseenter"];
5884
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
5885
+ ...{ name: "TaoCombobox" },
5886
+ __name: "TaoCombobox",
5887
+ props: {
5888
+ modelValue: { default: null },
5889
+ options: { default: () => [] },
5890
+ placeholder: {},
5891
+ disabled: { type: Boolean, default: false },
5892
+ error: { type: Boolean, default: false },
5893
+ emptyText: {},
5894
+ clearText: {},
5895
+ clearable: { type: Boolean, default: true },
5896
+ size: {},
5897
+ allowCreate: { type: Boolean, default: false }
5898
+ },
5899
+ emits: ["update:modelValue", "change", "create"],
5900
+ setup(__props, { emit: __emit }) {
5901
+ const props = __props;
5902
+ const l10n = useLocaleText(props, "combobox");
5903
+ const emit = __emit;
5904
+ const field = inject(formFieldKey, null);
5905
+ const localId = useId();
5906
+ const listId = `${localId}-list`;
5907
+ const controlId = computed(() => (field == null ? void 0 : field.id) ?? localId);
5908
+ const invalid = computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
5909
+ const describedBy = computed(() => field == null ? void 0 : field.describedBy.value);
5910
+ const open = ref(false);
5911
+ const focused = ref(false);
5912
+ const picking = ref(false);
5913
+ const skipFocusOpen = ref(false);
5914
+ const query = ref("");
5915
+ const activeIndex = ref(-1);
5916
+ const fieldRef = ref(null);
5917
+ const inputRef = ref(null);
5918
+ const panelRef = ref(null);
5919
+ const panelSize = ref("medium");
5920
+ const listRef = ref(null);
5921
+ const listStyle = ref({ top: "0px", left: "0px", width: "0px" });
5922
+ const selected = computed(() => {
5923
+ const found = props.options.find((option) => option.value === props.modelValue);
5924
+ if (found) {
5925
+ return found;
5926
+ }
5927
+ if (props.modelValue === null || props.modelValue === void 0 || props.modelValue === "") {
5928
+ return null;
5929
+ }
5930
+ return { value: props.modelValue, label: String(props.modelValue) };
5931
+ });
5932
+ const needle = computed(() => query.value.trim().toLowerCase());
5933
+ const filtered = computed(() => {
5934
+ if (!needle.value) {
5935
+ return props.options;
5936
+ }
5937
+ return props.options.filter((option) => option.label.toLowerCase().includes(needle.value));
5938
+ });
5939
+ const canCreate = computed(() => {
5940
+ const text = query.value.trim();
5941
+ if (!props.allowCreate || !text) {
5942
+ return false;
5943
+ }
5944
+ return !props.options.some((option) => option.label.toLowerCase() === text.toLowerCase());
5945
+ });
5946
+ const rows = computed(() => {
5947
+ const next = filtered.value.map((option) => ({ kind: "option", option }));
5948
+ if (canCreate.value) {
5949
+ next.push({ kind: "create", text: query.value.trim() });
5950
+ }
5951
+ return next;
5952
+ });
5953
+ const enabledIndexes = computed(
5954
+ () => rows.value.map((row, index) => row.kind === "option" && row.option.disabled ? -1 : index).filter((index) => index >= 0)
5955
+ );
5956
+ const activeId = computed(() => activeIndex.value >= 0 ? `${listId}-row-${activeIndex.value}` : void 0);
5957
+ function syncQueryFromModel() {
5958
+ var _a;
5959
+ query.value = ((_a = selected.value) == null ? void 0 : _a.label) ?? "";
5960
+ }
5188
5961
  function updatePosition() {
5189
5962
  const trigger = fieldRef.value;
5190
5963
  const panel = panelRef.value;
@@ -5474,12 +6247,12 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
5474
6247
  watch(open, (isOpen) => {
5475
6248
  if (isOpen) {
5476
6249
  panelSize.value = resolveSize(fieldRef.value, props.size);
5477
- document.addEventListener("pointerdown", onDocumentPointer);
6250
+ document.addEventListener("pointerdown", onDocumentPointer, true);
5478
6251
  window.addEventListener("resize", onViewportChange);
5479
6252
  window.addEventListener("scroll", onViewportChange, true);
5480
6253
  return;
5481
6254
  }
5482
- document.removeEventListener("pointerdown", onDocumentPointer);
6255
+ document.removeEventListener("pointerdown", onDocumentPointer, true);
5483
6256
  window.removeEventListener("resize", onViewportChange);
5484
6257
  window.removeEventListener("scroll", onViewportChange, true);
5485
6258
  });
@@ -5491,7 +6264,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
5491
6264
  });
5492
6265
  onBeforeUnmount(() => {
5493
6266
  stopFocusLoss == null ? void 0 : stopFocusLoss();
5494
- document.removeEventListener("pointerdown", onDocumentPointer);
6267
+ document.removeEventListener("pointerdown", onDocumentPointer, true);
5495
6268
  window.removeEventListener("resize", onViewportChange);
5496
6269
  window.removeEventListener("scroll", onViewportChange, true);
5497
6270
  });
@@ -5537,7 +6310,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
5537
6310
  onFocus,
5538
6311
  onBlur,
5539
6312
  onKeydown: onInputKeydown
5540
- }, null, 40, _hoisted_1$n),
6313
+ }, null, 40, _hoisted_1$l),
5541
6314
  createElementVNode("span", {
5542
6315
  class: normalizeClass(["tao-combobox__chevron", { "tao-combobox__chevron--custom": _ctx.$slots.chevron }]),
5543
6316
  "aria-hidden": "true"
@@ -5560,7 +6333,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
5560
6333
  class: "tao-combobox__list",
5561
6334
  role: "listbox"
5562
6335
  }, [
5563
- !rows.value.length ? (openBlock(), createElementBlock("li", _hoisted_2$l, [
6336
+ !rows.value.length ? (openBlock(), createElementBlock("li", _hoisted_2$j, [
5564
6337
  renderSlot(_ctx.$slots, "empty", {}, () => [
5565
6338
  createTextVNode(toDisplayString(unref(l10n).emptyText), 1)
5566
6339
  ], true)
@@ -5590,7 +6363,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
5590
6363
  ], true, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
5591
6364
  createTextVNode(toDisplayString(row.option.label), 1)
5592
6365
  ], 64))
5593
- ], 42, _hoisted_3$h);
6366
+ ], 42, _hoisted_3$g);
5594
6367
  }), 128))
5595
6368
  ], 512),
5596
6369
  __props.clearable && selected.value ? (openBlock(), createElementBlock("button", {
@@ -5610,7 +6383,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
5610
6383
  };
5611
6384
  }
5612
6385
  });
5613
- const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-e75a5550"]]);
6386
+ const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-c030f18f"]]);
5614
6387
  const ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
5615
6388
  function formatTaoDateIso(parts) {
5616
6389
  return `${String(parts.y).padStart(4, "0")}-${String(parts.m).padStart(2, "0")}-${String(parts.d).padStart(2, "0")}`;
@@ -5753,16 +6526,16 @@ function buildTaoDateGrid(year, month) {
5753
6526
  };
5754
6527
  });
5755
6528
  }
5756
- const _hoisted_1$m = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
5757
- const _hoisted_2$k = { class: "tao-date__value" };
5758
- const _hoisted_3$g = {
6529
+ const _hoisted_1$k = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
6530
+ const _hoisted_2$i = { class: "tao-date__value" };
6531
+ const _hoisted_3$f = {
5759
6532
  class: "tao-date__icon",
5760
6533
  "aria-hidden": "true"
5761
6534
  };
5762
- const _hoisted_4$g = ["aria-label"];
5763
- const _hoisted_5$e = { class: "tao-date__header" };
5764
- const _hoisted_6$b = ["aria-label"];
5765
- const _hoisted_7$9 = { "aria-hidden": "true" };
6535
+ const _hoisted_4$f = ["aria-label"];
6536
+ const _hoisted_5$d = { class: "tao-date__header" };
6537
+ const _hoisted_6$a = ["aria-label"];
6538
+ const _hoisted_7$8 = { "aria-hidden": "true" };
5766
6539
  const _hoisted_8$8 = { class: "tao-date__month" };
5767
6540
  const _hoisted_9$3 = ["aria-label"];
5768
6541
  const _hoisted_10$3 = { "aria-hidden": "true" };
@@ -5777,7 +6550,7 @@ const _hoisted_12$1 = {
5777
6550
  const _hoisted_13$1 = ["aria-label", "aria-selected", "disabled", "onClick"];
5778
6551
  const _hoisted_14$1 = { class: "tao-date__footer" };
5779
6552
  const _hoisted_15 = ["disabled"];
5780
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
6553
+ const _sfc_main$k = /* @__PURE__ */ defineComponent({
5781
6554
  ...{ name: "TaoDate" },
5782
6555
  __name: "TaoDate",
5783
6556
  props: {
@@ -5975,17 +6748,17 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
5975
6748
  }
5976
6749
  watch(open, (isOpen) => {
5977
6750
  if (isOpen) {
5978
- document.addEventListener("pointerdown", onDocumentPointer);
6751
+ document.addEventListener("pointerdown", onDocumentPointer, true);
5979
6752
  window.addEventListener("resize", onViewportChange);
5980
6753
  window.addEventListener("scroll", onViewportChange, true);
5981
6754
  return;
5982
6755
  }
5983
- document.removeEventListener("pointerdown", onDocumentPointer);
6756
+ document.removeEventListener("pointerdown", onDocumentPointer, true);
5984
6757
  window.removeEventListener("resize", onViewportChange);
5985
6758
  window.removeEventListener("scroll", onViewportChange, true);
5986
6759
  });
5987
6760
  onBeforeUnmount(() => {
5988
- document.removeEventListener("pointerdown", onDocumentPointer);
6761
+ document.removeEventListener("pointerdown", onDocumentPointer, true);
5989
6762
  window.removeEventListener("resize", onViewportChange);
5990
6763
  window.removeEventListener("scroll", onViewportChange, true);
5991
6764
  });
@@ -6009,8 +6782,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
6009
6782
  onClick: toggle,
6010
6783
  onKeydown: onTriggerKeydown
6011
6784
  }, [
6012
- createElementVNode("span", _hoisted_2$k, toDisplayString(displayLabel.value || unref(l10n).placeholder), 1),
6013
- createElementVNode("span", _hoisted_3$g, [
6785
+ createElementVNode("span", _hoisted_2$i, toDisplayString(displayLabel.value || unref(l10n).placeholder), 1),
6786
+ createElementVNode("span", _hoisted_3$f, [
6014
6787
  renderSlot(_ctx.$slots, "icon", {}, () => [
6015
6788
  _cache[4] || (_cache[4] = createElementVNode("svg", {
6016
6789
  viewBox: "0 0 16 16",
@@ -6038,7 +6811,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
6038
6811
  ], -1))
6039
6812
  ], true)
6040
6813
  ])
6041
- ], 42, _hoisted_1$m),
6814
+ ], 42, _hoisted_1$k),
6042
6815
  (openBlock(), createBlock(Teleport, { to: "body" }, [
6043
6816
  open.value ? (openBlock(), createElementBlock("div", {
6044
6817
  key: 0,
@@ -6052,14 +6825,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
6052
6825
  style: normalizeStyle(panelStyle.value),
6053
6826
  onKeydown: onPanelKeydown
6054
6827
  }, [
6055
- createElementVNode("div", _hoisted_5$e, [
6828
+ createElementVNode("div", _hoisted_5$d, [
6056
6829
  createElementVNode("button", {
6057
6830
  type: "button",
6058
6831
  class: "tao-date__nav",
6059
6832
  "aria-label": unref(l10n).prevMonthLabel,
6060
6833
  onClick: _cache[0] || (_cache[0] = ($event) => goMonth(-1))
6061
6834
  }, [
6062
- createElementVNode("span", _hoisted_7$9, [
6835
+ createElementVNode("span", _hoisted_7$8, [
6063
6836
  renderSlot(_ctx.$slots, "prev-icon", {}, () => [
6064
6837
  _cache[5] || (_cache[5] = createElementVNode("svg", {
6065
6838
  viewBox: "0 0 24 24",
@@ -6078,7 +6851,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
6078
6851
  ], -1))
6079
6852
  ], true)
6080
6853
  ])
6081
- ], 8, _hoisted_6$b),
6854
+ ], 8, _hoisted_6$a),
6082
6855
  createElementVNode("p", _hoisted_8$8, toDisplayString(monthLabel.value), 1),
6083
6856
  createElementVNode("button", {
6084
6857
  type: "button",
@@ -6156,23 +6929,23 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
6156
6929
  ], true)
6157
6930
  ])) : createCommentVNode("", true)
6158
6931
  ])
6159
- ], 44, _hoisted_4$g)) : createCommentVNode("", true)
6932
+ ], 44, _hoisted_4$f)) : createCommentVNode("", true)
6160
6933
  ]))
6161
6934
  ], 2);
6162
6935
  };
6163
6936
  }
6164
6937
  });
6165
- const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-97f71e11"]]);
6166
- const _hoisted_1$l = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
6167
- const _hoisted_2$j = { class: "tao-date-range__value" };
6168
- const _hoisted_3$f = {
6938
+ const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-6a9754ce"]]);
6939
+ const _hoisted_1$j = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
6940
+ const _hoisted_2$h = { class: "tao-date-range__value" };
6941
+ const _hoisted_3$e = {
6169
6942
  class: "tao-date-range__icon",
6170
6943
  "aria-hidden": "true"
6171
6944
  };
6172
- const _hoisted_4$f = ["aria-label"];
6173
- const _hoisted_5$d = { class: "tao-date__header" };
6174
- const _hoisted_6$a = ["aria-label"];
6175
- const _hoisted_7$8 = { "aria-hidden": "true" };
6945
+ const _hoisted_4$e = ["aria-label"];
6946
+ const _hoisted_5$c = { class: "tao-date__header" };
6947
+ const _hoisted_6$9 = ["aria-label"];
6948
+ const _hoisted_7$7 = { "aria-hidden": "true" };
6176
6949
  const _hoisted_8$7 = { class: "tao-date__month" };
6177
6950
  const _hoisted_9$2 = ["aria-label"];
6178
6951
  const _hoisted_10$2 = { "aria-hidden": "true" };
@@ -6183,7 +6956,7 @@ const _hoisted_11$1 = {
6183
6956
  const _hoisted_12 = ["aria-label", "aria-selected", "disabled", "onMouseenter", "onClick"];
6184
6957
  const _hoisted_13 = { class: "tao-date__footer" };
6185
6958
  const _hoisted_14 = ["disabled"];
6186
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
6959
+ const _sfc_main$j = /* @__PURE__ */ defineComponent({
6187
6960
  ...{ name: "TaoDateRange" },
6188
6961
  __name: "TaoDateRange",
6189
6962
  props: {
@@ -6426,14 +7199,14 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
6426
7199
  }
6427
7200
  watch(open, (isOpen) => {
6428
7201
  if (isOpen) {
6429
- document.addEventListener("pointerdown", onDocumentPointer);
7202
+ document.addEventListener("pointerdown", onDocumentPointer, true);
6430
7203
  window.addEventListener("resize", onViewportChange);
6431
7204
  window.addEventListener("scroll", onViewportChange, true);
6432
7205
  return;
6433
7206
  }
6434
7207
  draftStart.value = null;
6435
7208
  hoverIso.value = null;
6436
- document.removeEventListener("pointerdown", onDocumentPointer);
7209
+ document.removeEventListener("pointerdown", onDocumentPointer, true);
6437
7210
  window.removeEventListener("resize", onViewportChange);
6438
7211
  window.removeEventListener("scroll", onViewportChange, true);
6439
7212
  });
@@ -6445,7 +7218,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
6445
7218
  });
6446
7219
  onBeforeUnmount(() => {
6447
7220
  stopFocusLoss == null ? void 0 : stopFocusLoss();
6448
- document.removeEventListener("pointerdown", onDocumentPointer);
7221
+ document.removeEventListener("pointerdown", onDocumentPointer, true);
6449
7222
  window.removeEventListener("resize", onViewportChange);
6450
7223
  window.removeEventListener("scroll", onViewportChange, true);
6451
7224
  });
@@ -6469,8 +7242,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
6469
7242
  onClick: toggle,
6470
7243
  onKeydown: onTriggerKeydown
6471
7244
  }, [
6472
- createElementVNode("span", _hoisted_2$j, toDisplayString(displayLabel.value || unref(l10n).placeholder), 1),
6473
- createElementVNode("span", _hoisted_3$f, [
7245
+ createElementVNode("span", _hoisted_2$h, toDisplayString(displayLabel.value || unref(l10n).placeholder), 1),
7246
+ createElementVNode("span", _hoisted_3$e, [
6474
7247
  renderSlot(_ctx.$slots, "icon", {}, () => [
6475
7248
  _cache[3] || (_cache[3] = createElementVNode("svg", {
6476
7249
  viewBox: "0 0 16 16",
@@ -6498,7 +7271,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
6498
7271
  ], -1))
6499
7272
  ], true)
6500
7273
  ])
6501
- ], 42, _hoisted_1$l),
7274
+ ], 42, _hoisted_1$j),
6502
7275
  (openBlock(), createBlock(Teleport, { to: "body" }, [
6503
7276
  open.value ? (openBlock(), createElementBlock("div", {
6504
7277
  key: 0,
@@ -6512,14 +7285,14 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
6512
7285
  style: normalizeStyle(panelStyle.value),
6513
7286
  onKeydown: onPanelKeydown
6514
7287
  }, [
6515
- createElementVNode("div", _hoisted_5$d, [
7288
+ createElementVNode("div", _hoisted_5$c, [
6516
7289
  createElementVNode("button", {
6517
7290
  type: "button",
6518
7291
  class: "tao-date__nav",
6519
7292
  "aria-label": unref(l10n).prevMonthLabel,
6520
7293
  onClick: _cache[0] || (_cache[0] = ($event) => goMonth(-1))
6521
7294
  }, [
6522
- createElementVNode("span", _hoisted_7$8, [
7295
+ createElementVNode("span", _hoisted_7$7, [
6523
7296
  renderSlot(_ctx.$slots, "prev-icon", {}, () => [
6524
7297
  _cache[4] || (_cache[4] = createElementVNode("svg", {
6525
7298
  viewBox: "0 0 24 24",
@@ -6538,7 +7311,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
6538
7311
  ], -1))
6539
7312
  ], true)
6540
7313
  ])
6541
- ], 8, _hoisted_6$a),
7314
+ ], 8, _hoisted_6$9),
6542
7315
  createElementVNode("p", _hoisted_8$7, toDisplayString(monthLabel.value), 1),
6543
7316
  createElementVNode("button", {
6544
7317
  type: "button",
@@ -6625,24 +7398,24 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
6625
7398
  ], true)
6626
7399
  ])) : createCommentVNode("", true)
6627
7400
  ])
6628
- ], 44, _hoisted_4$f)) : createCommentVNode("", true)
7401
+ ], 44, _hoisted_4$e)) : createCommentVNode("", true)
6629
7402
  ]))
6630
7403
  ], 2);
6631
7404
  };
6632
7405
  }
6633
7406
  });
6634
- const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-da3794c7"]]);
6635
- const _hoisted_1$k = ["for"];
6636
- const _hoisted_2$i = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
6637
- const _hoisted_3$e = {
7407
+ const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-fc2e92f1"]]);
7408
+ const _hoisted_1$i = ["for"];
7409
+ const _hoisted_2$g = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
7410
+ const _hoisted_3$d = {
6638
7411
  key: 0,
6639
7412
  class: "tao-switch__label"
6640
7413
  };
6641
- const _hoisted_4$e = {
7414
+ const _hoisted_4$d = {
6642
7415
  key: 1,
6643
7416
  class: "tao-switch__label"
6644
7417
  };
6645
- const _sfc_main$k = /* @__PURE__ */ defineComponent({
7418
+ const _sfc_main$i = /* @__PURE__ */ defineComponent({
6646
7419
  ...{ name: "TaoSwitch" },
6647
7420
  __name: "TaoSwitch",
6648
7421
  props: {
@@ -6685,33 +7458,33 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
6685
7458
  "aria-invalid": invalid.value || void 0,
6686
7459
  "aria-describedby": describedBy.value,
6687
7460
  onChange: toggle
6688
- }, null, 40, _hoisted_2$i),
7461
+ }, null, 40, _hoisted_2$g),
6689
7462
  _cache[0] || (_cache[0] = createElementVNode("span", {
6690
7463
  class: "tao-switch__track",
6691
7464
  "aria-hidden": "true"
6692
7465
  }, [
6693
7466
  createElementVNode("span", { class: "tao-switch__thumb" })
6694
7467
  ], -1)),
6695
- __props.label ? (openBlock(), createElementBlock("span", _hoisted_3$e, toDisplayString(__props.label), 1)) : _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$e, [
7468
+ __props.label ? (openBlock(), createElementBlock("span", _hoisted_3$d, toDisplayString(__props.label), 1)) : _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$d, [
6696
7469
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
6697
7470
  ])) : createCommentVNode("", true)
6698
- ], 10, _hoisted_1$k);
7471
+ ], 10, _hoisted_1$i);
6699
7472
  };
6700
7473
  }
6701
7474
  });
6702
- const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-28965b34"]]);
7475
+ const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-28965b34"]]);
6703
7476
  const radioGroupKey = Symbol("taoRadioGroup");
6704
- const _hoisted_1$j = ["for"];
6705
- const _hoisted_2$h = ["id", "name", "value", "checked", "disabled", "aria-invalid", "aria-describedby"];
6706
- const _hoisted_3$d = {
7477
+ const _hoisted_1$h = ["for"];
7478
+ const _hoisted_2$f = ["id", "name", "value", "checked", "disabled", "aria-invalid", "aria-describedby"];
7479
+ const _hoisted_3$c = {
6707
7480
  key: 0,
6708
7481
  class: "tao-radio__label"
6709
7482
  };
6710
- const _hoisted_4$d = {
7483
+ const _hoisted_4$c = {
6711
7484
  key: 1,
6712
7485
  class: "tao-radio__label"
6713
7486
  };
6714
- const _sfc_main$j = /* @__PURE__ */ defineComponent({
7487
+ const _sfc_main$h = /* @__PURE__ */ defineComponent({
6715
7488
  ...{ name: "TaoRadio" },
6716
7489
  __name: "TaoRadio",
6717
7490
  props: {
@@ -6766,25 +7539,25 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
6766
7539
  "aria-invalid": !unref(group) && invalid.value || void 0,
6767
7540
  "aria-describedby": describedBy.value,
6768
7541
  onChange
6769
- }, null, 40, _hoisted_2$h),
7542
+ }, null, 40, _hoisted_2$f),
6770
7543
  _cache[0] || (_cache[0] = createElementVNode("span", {
6771
7544
  class: "tao-radio__dot",
6772
7545
  "aria-hidden": "true"
6773
7546
  }, null, -1)),
6774
- __props.label ? (openBlock(), createElementBlock("span", _hoisted_3$d, toDisplayString(__props.label), 1)) : (openBlock(), createElementBlock("span", _hoisted_4$d, [
7547
+ __props.label ? (openBlock(), createElementBlock("span", _hoisted_3$c, toDisplayString(__props.label), 1)) : (openBlock(), createElementBlock("span", _hoisted_4$c, [
6775
7548
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
6776
7549
  ]))
6777
- ], 10, _hoisted_1$j);
7550
+ ], 10, _hoisted_1$h);
6778
7551
  };
6779
7552
  }
6780
7553
  });
6781
- const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-70ac1c11"]]);
6782
- const _hoisted_1$i = ["id", "disabled", "aria-describedby", "aria-invalid", "aria-labelledby"];
6783
- const _hoisted_2$g = {
7554
+ const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-70ac1c11"]]);
7555
+ const _hoisted_1$g = ["id", "disabled", "aria-describedby", "aria-invalid", "aria-labelledby"];
7556
+ const _hoisted_2$e = {
6784
7557
  key: 0,
6785
7558
  class: "tao-radio-group__legend"
6786
7559
  };
6787
- const _sfc_main$i = /* @__PURE__ */ defineComponent({
7560
+ const _sfc_main$g = /* @__PURE__ */ defineComponent({
6788
7561
  ...{ name: "TaoRadioGroup" },
6789
7562
  __name: "TaoRadioGroup",
6790
7563
  props: {
@@ -6828,256 +7601,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
6828
7601
  "aria-invalid": invalid.value || void 0,
6829
7602
  "aria-labelledby": labelledBy.value
6830
7603
  }, [
6831
- __props.legend ? (openBlock(), createElementBlock("legend", _hoisted_2$g, toDisplayString(__props.legend), 1)) : createCommentVNode("", true),
7604
+ __props.legend ? (openBlock(), createElementBlock("legend", _hoisted_2$e, toDisplayString(__props.legend), 1)) : createCommentVNode("", true),
6832
7605
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
6833
- ], 10, _hoisted_1$i);
6834
- };
6835
- }
6836
- });
6837
- const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-c76ef504"]]);
6838
- const segmentedKey = Symbol("taoSegmented");
6839
- const _hoisted_1$h = ["disabled", "aria-describedby", "aria-invalid", "aria-labelledby", "id"];
6840
- const _hoisted_2$f = {
6841
- key: 0,
6842
- class: "tao-segmented__legend"
6843
- };
6844
- const _sfc_main$h = /* @__PURE__ */ defineComponent({
6845
- ...{ name: "TaoSegmented" },
6846
- __name: "TaoSegmented",
6847
- props: {
6848
- modelValue: { type: [String, Number, Boolean] },
6849
- name: {},
6850
- legend: {},
6851
- disabled: { type: Boolean, default: false },
6852
- error: { type: Boolean, default: false },
6853
- size: {},
6854
- block: { type: Boolean, default: false }
6855
- },
6856
- emits: ["update:modelValue", "change"],
6857
- setup(__props, { emit: __emit }) {
6858
- const props = __props;
6859
- const emit = __emit;
6860
- const field = inject(formFieldKey, null);
6861
- const autoName = useId();
6862
- const groupName = computed(() => props.name || autoName);
6863
- const model = computed(() => props.modelValue);
6864
- const groupDisabled = computed(() => props.disabled);
6865
- const invalid = computed(() => props.error || Boolean(field == null ? void 0 : field.invalid.value));
6866
- const describedBy = computed(() => field == null ? void 0 : field.describedBy.value);
6867
- const trackRef = ref(null);
6868
- const thumbStyle = ref({ opacity: "0" });
6869
- let resizeObserver = null;
6870
- let mutationObserver = null;
6871
- function setValue(value) {
6872
- emit("update:modelValue", value);
6873
- emit("change", value);
6874
- }
6875
- function updateThumb() {
6876
- const track = trackRef.value;
6877
- if (!track) {
6878
- return;
6879
- }
6880
- const selected = track.querySelector(".tao-segmented-option--checked");
6881
- if (!selected) {
6882
- if (thumbStyle.value.opacity !== "0") {
6883
- thumbStyle.value = { opacity: "0" };
6884
- }
6885
- return;
6886
- }
6887
- const trackBox = track.getBoundingClientRect();
6888
- const optionBox = selected.getBoundingClientRect();
6889
- const next = {
6890
- width: `${optionBox.width}px`,
6891
- height: `${optionBox.height}px`,
6892
- transform: `translate(${optionBox.left - trackBox.left - track.clientLeft}px, ${optionBox.top - trackBox.top - track.clientTop}px)`,
6893
- opacity: "1"
6894
- };
6895
- const prev = thumbStyle.value;
6896
- if (prev.width === next.width && prev.height === next.height && prev.transform === next.transform && prev.opacity === next.opacity) {
6897
- return;
6898
- }
6899
- thumbStyle.value = next;
6900
- }
6901
- provide(segmentedKey, {
6902
- name: groupName,
6903
- model,
6904
- disabled: groupDisabled,
6905
- setValue
6906
- });
6907
- onMounted(() => {
6908
- const track = trackRef.value;
6909
- void nextTick(updateThumb);
6910
- if (!track) {
6911
- return;
6912
- }
6913
- if (typeof ResizeObserver !== "undefined") {
6914
- resizeObserver = new ResizeObserver(() => updateThumb());
6915
- resizeObserver.observe(track);
6916
- }
6917
- mutationObserver = new MutationObserver(() => updateThumb());
6918
- mutationObserver.observe(track, {
6919
- subtree: true,
6920
- childList: true,
6921
- attributes: true,
6922
- attributeFilter: ["class"]
6923
- });
6924
- });
6925
- watch(
6926
- () => [props.modelValue, props.size, props.block, props.disabled],
6927
- () => {
6928
- void nextTick(updateThumb);
6929
- }
6930
- );
6931
- onBeforeUnmount(() => {
6932
- resizeObserver == null ? void 0 : resizeObserver.disconnect();
6933
- resizeObserver = null;
6934
- mutationObserver == null ? void 0 : mutationObserver.disconnect();
6935
- mutationObserver = null;
6936
- });
6937
- return (_ctx, _cache) => {
6938
- var _a;
6939
- return openBlock(), createElementBlock("fieldset", {
6940
- class: normalizeClass(["tao-segmented", [
6941
- unref(sizeClass)(__props.size),
6942
- {
6943
- "tao-segmented--block": __props.block,
6944
- "tao-segmented--disabled": __props.disabled,
6945
- "tao-segmented--invalid": invalid.value
6946
- }
6947
- ]]),
6948
- disabled: __props.disabled,
6949
- "aria-describedby": describedBy.value,
6950
- "aria-invalid": invalid.value || void 0,
6951
- "aria-labelledby": __props.legend ? void 0 : unref(field) ? `${unref(field).id}-label` : void 0,
6952
- id: (_a = unref(field)) == null ? void 0 : _a.id
6953
- }, [
6954
- __props.legend ? (openBlock(), createElementBlock("legend", _hoisted_2$f, toDisplayString(__props.legend), 1)) : createCommentVNode("", true),
6955
- createElementVNode("div", {
6956
- ref_key: "trackRef",
6957
- ref: trackRef,
6958
- class: "tao-segmented__track"
6959
- }, [
6960
- createElementVNode("div", {
6961
- class: "tao-segmented__thumb",
6962
- style: normalizeStyle(thumbStyle.value),
6963
- "aria-hidden": "true"
6964
- }, null, 4),
6965
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
6966
- ], 512)
6967
- ], 10, _hoisted_1$h);
6968
- };
6969
- }
6970
- });
6971
- const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-7dc6820f"]]);
6972
- const _hoisted_1$g = ["for"];
6973
- const _hoisted_2$e = ["id", "name", "value", "checked", "disabled", "aria-label"];
6974
- const _hoisted_3$c = { class: "tao-segmented-option__face" };
6975
- const _hoisted_4$c = {
6976
- key: 0,
6977
- class: "tao-segmented-option__icon",
6978
- "aria-hidden": "true"
6979
- };
6980
- const _hoisted_5$c = {
6981
- key: 1,
6982
- class: "tao-segmented-option__label"
6983
- };
6984
- const _hoisted_6$9 = {
6985
- key: 2,
6986
- class: "tao-segmented-option__sr"
6987
- };
6988
- const _hoisted_7$7 = {
6989
- key: 3,
6990
- class: "tao-segmented-option__count"
6991
- };
6992
- const _sfc_main$g = /* @__PURE__ */ defineComponent({
6993
- ...{ name: "TaoSegmentedOption" },
6994
- __name: "TaoSegmentedOption",
6995
- props: {
6996
- value: { type: [String, Number, Boolean] },
6997
- modelValue: { type: [String, Number, Boolean] },
6998
- name: {},
6999
- label: { default: "" },
7000
- icon: { default: "" },
7001
- count: {},
7002
- disabled: { type: Boolean, default: false },
7003
- ariaLabel: {}
7004
- },
7005
- emits: ["update:modelValue", "change"],
7006
- setup(__props, { emit: __emit }) {
7007
- const props = __props;
7008
- const emit = __emit;
7009
- const group = inject(segmentedKey, null);
7010
- const slots = useSlots();
7011
- const localId = useId();
7012
- const isDisabled = computed(() => props.disabled || Boolean(group == null ? void 0 : group.disabled.value));
7013
- const inputName = computed(() => (group == null ? void 0 : group.name.value) ?? props.name);
7014
- const isChecked = computed(() => {
7015
- const current2 = group ? group.model.value : props.modelValue;
7016
- return current2 === props.value;
7017
- });
7018
- const hasLabel = computed(() => Boolean(props.label || slots.default));
7019
- const isIconOnly = computed(() => Boolean((props.icon || slots.icon) && !hasLabel.value));
7020
- const countLabel = computed(() => {
7021
- if (props.count === void 0 || props.count === null || props.count === "") {
7022
- return "";
7023
- }
7024
- if (typeof props.count === "number") {
7025
- if (props.count > 99) {
7026
- return "99+";
7027
- }
7028
- return String(props.count);
7029
- }
7030
- return String(props.count);
7031
- });
7032
- function onChange() {
7033
- if (isDisabled.value) {
7034
- return;
7035
- }
7036
- if (group) {
7037
- group.setValue(props.value);
7038
- return;
7039
- }
7040
- emit("update:modelValue", props.value);
7041
- emit("change", props.value);
7042
- }
7043
- return (_ctx, _cache) => {
7044
- return openBlock(), createElementBlock("label", {
7045
- class: normalizeClass(["tao-segmented-option", {
7046
- "tao-segmented-option--checked": isChecked.value,
7047
- "tao-segmented-option--disabled": props.disabled,
7048
- "tao-segmented-option--icon-only": isIconOnly.value
7049
- }]),
7050
- for: unref(localId)
7051
- }, [
7052
- createElementVNode("input", {
7053
- id: unref(localId),
7054
- class: "tao-segmented-option__input",
7055
- type: "radio",
7056
- name: inputName.value,
7057
- value: String(__props.value),
7058
- checked: isChecked.value,
7059
- disabled: isDisabled.value,
7060
- "aria-label": __props.ariaLabel,
7061
- onChange
7062
- }, null, 40, _hoisted_2$e),
7063
- createElementVNode("span", _hoisted_3$c, [
7064
- __props.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_4$c, [
7065
- renderSlot(_ctx.$slots, "icon", {}, () => [
7066
- createTextVNode(toDisplayString(__props.icon), 1)
7067
- ], true)
7068
- ])) : createCommentVNode("", true),
7069
- hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_5$c, [
7070
- renderSlot(_ctx.$slots, "default", {}, () => [
7071
- createTextVNode(toDisplayString(__props.label), 1)
7072
- ], true)
7073
- ])) : __props.ariaLabel ? (openBlock(), createElementBlock("span", _hoisted_6$9, toDisplayString(__props.ariaLabel), 1)) : createCommentVNode("", true),
7074
- countLabel.value ? (openBlock(), createElementBlock("span", _hoisted_7$7, toDisplayString(countLabel.value), 1)) : createCommentVNode("", true)
7075
- ])
7076
7606
  ], 10, _hoisted_1$g);
7077
7607
  };
7078
7608
  }
7079
7609
  });
7080
- const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-fba7ca12"]]);
7610
+ const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-c76ef504"]]);
7081
7611
  const _hoisted_1$f = ["role", "aria-live"];
7082
7612
  const _hoisted_2$d = { class: "tao-alert__body" };
7083
7613
  const _hoisted_3$b = {
@@ -8049,7 +8579,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
8049
8579
  class: "tao-breadcrumb__item"
8050
8580
  }, [
8051
8581
  index > 0 ? (openBlock(), createElementBlock("span", _hoisted_3$4, "/")) : createCommentVNode("", true),
8052
- index === __props.items.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(item.label), 1)) : item.to ? (openBlock(), createBlock(_sfc_main$q, {
8582
+ index === __props.items.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(item.label), 1)) : item.to ? (openBlock(), createBlock(_sfc_main$s, {
8053
8583
  key: 2,
8054
8584
  class: "tao-breadcrumb__link",
8055
8585
  to: item.to
@@ -9733,6 +10263,50 @@ const confirm = Object.assign(confirmFn, {
9733
10263
  resolveConfirm(false);
9734
10264
  }
9735
10265
  });
10266
+ const round = (v, digits) => {
10267
+ const k = Math.pow(10, digits);
10268
+ return Math.round(v * k) / k + 0;
10269
+ };
10270
+ function colorModel(source, options = {}) {
10271
+ const { format = "object", range = 255, space = "srgb", alpha = false, precision = 5 } = options;
10272
+ if (space === "linear" && range !== 1) throw new Error("colorModel: linear space needs range: 1");
10273
+ function read(value) {
10274
+ let parts;
10275
+ if (format === "css") {
10276
+ return parseColor(String(value)) ?? { r: 0, g: 0, b: 0, a: 1 };
10277
+ } else if (format === "array") {
10278
+ parts = value.slice(0, 4);
10279
+ } else {
10280
+ const o = value;
10281
+ parts = [o.r ?? 0, o.g ?? 0, o.b ?? 0, o.a ?? 1];
10282
+ }
10283
+ const channels = [0, 1, 2].map((i) => {
10284
+ const v = Number(parts[i] ?? 0);
10285
+ return space === "linear" ? linearToSrgb(v) * 255 : range === 1 ? v * 255 : v;
10286
+ });
10287
+ return { r: channels[0], g: channels[1], b: channels[2], a: parts[3] === void 0 ? 1 : Number(parts[3]) };
10288
+ }
10289
+ function write(c) {
10290
+ const out = [c.r, c.g, c.b].map((v) => {
10291
+ if (space === "linear") return round(srgbToLinear(v / 255), precision);
10292
+ return range === 1 ? round(v / 255, precision) : Math.round(v);
10293
+ });
10294
+ const a = round(c.a, 3);
10295
+ if (format === "css") {
10296
+ const [r, g, b] = [c.r, c.g, c.b].map(Math.round);
10297
+ return alpha ? `rgb(${r} ${g} ${b} / ${a})` : `rgb(${r} ${g} ${b})`;
10298
+ }
10299
+ if (format === "array") return alpha ? [...out, a] : out;
10300
+ return alpha ? { r: out[0], g: out[1], b: out[2], a } : { r: out[0], g: out[1], b: out[2] };
10301
+ }
10302
+ return computed({
10303
+ get: () => toHex(read(source.value), alpha),
10304
+ set: (hex) => {
10305
+ const parsed = parseColor(hex);
10306
+ if (parsed) source.value = write(parsed);
10307
+ }
10308
+ });
10309
+ }
9736
10310
  const components = [
9737
10311
  TaoButton,
9738
10312
  TaoBlock,
@@ -9750,7 +10324,7 @@ const components = [
9750
10324
  TaoSpoilerGroup,
9751
10325
  TaoCopy,
9752
10326
  TaoContainer,
9753
- _sfc_main$K,
10327
+ _sfc_main$M,
9754
10328
  TaoSpace,
9755
10329
  TaoGrid,
9756
10330
  TaoGridItem,
@@ -9766,14 +10340,16 @@ const components = [
9766
10340
  TaoTextarea,
9767
10341
  TaoScrollTop,
9768
10342
  TaoProgress,
9769
- _sfc_main$S,
9770
- _sfc_main$u,
10343
+ _sfc_main$U,
10344
+ _sfc_main$w,
9771
10345
  TaoFileDrop,
9772
10346
  TaoDropdownMenu,
9773
10347
  TaoPinCode,
9774
- _sfc_main$q,
10348
+ _sfc_main$s,
9775
10349
  TaoFormField,
9776
10350
  TaoSelect,
10351
+ TaoColorInput,
10352
+ TaoColorPicker,
9777
10353
  TaoCombobox,
9778
10354
  TaoDate,
9779
10355
  TaoDateRange,
@@ -9818,6 +10394,8 @@ export {
9818
10394
  TaoCard,
9819
10395
  TaoCarousel,
9820
10396
  TaoCheckbox,
10397
+ TaoColorInput,
10398
+ TaoColorPicker,
9821
10399
  TaoCombobox,
9822
10400
  TaoConfirmHost,
9823
10401
  TaoContainer,
@@ -9831,7 +10409,7 @@ export {
9831
10409
  TaoEmpty,
9832
10410
  TaoFieldset,
9833
10411
  TaoFileDrop,
9834
- _sfc_main$K as TaoFlex,
10412
+ _sfc_main$M as TaoFlex,
9835
10413
  TaoFormField,
9836
10414
  TaoGrid,
9837
10415
  TaoGridItem,
@@ -9840,7 +10418,7 @@ export {
9840
10418
  TaoInput,
9841
10419
  TaoInputGroup,
9842
10420
  TaoInputNumber,
9843
- _sfc_main$q as TaoLink,
10421
+ _sfc_main$s as TaoLink,
9844
10422
  TaoList,
9845
10423
  TaoListItem,
9846
10424
  TaoLoader,
@@ -9852,13 +10430,13 @@ export {
9852
10430
  TaoQuantity,
9853
10431
  TaoRadio,
9854
10432
  TaoRadioGroup,
9855
- _sfc_main$u as TaoRangeSlider,
10433
+ _sfc_main$w as TaoRangeSlider,
9856
10434
  TaoScrollTop,
9857
10435
  TaoSegmented,
9858
10436
  TaoSegmentedOption,
9859
10437
  TaoSelect,
9860
10438
  TaoSkeleton,
9861
- _sfc_main$S as TaoSlider,
10439
+ _sfc_main$U as TaoSlider,
9862
10440
  TaoSpace,
9863
10441
  TaoSplit,
9864
10442
  TaoSpoiler,
@@ -9873,17 +10451,27 @@ export {
9873
10451
  TaoToastViewport,
9874
10452
  TaoTooltip,
9875
10453
  TaoUI,
10454
+ colorModel,
9876
10455
  confirm,
9877
10456
  TaoUI as default,
9878
10457
  formatTaoDateIso,
9879
10458
  formatTaoDateLabel,
9880
10459
  formatTaoDateRangeLabel,
10460
+ hslToRgb,
10461
+ hsvaToRgba,
10462
+ linearToSrgb,
9881
10463
  localeEn,
9882
10464
  localeRu,
10465
+ normalizeHex,
10466
+ parseColor,
9883
10467
  parseTaoDate,
9884
10468
  parseTaoDateRange,
10469
+ rgbToHsl,
10470
+ rgbaToHsva,
9885
10471
  setTaoLocale,
10472
+ srgbToLinear,
9886
10473
  taoLocale,
10474
+ toHex,
9887
10475
  toast,
9888
10476
  todayTaoDate
9889
10477
  };