@1337exp/taoui 1.5.0 → 1.6.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,15 +1,15 @@
1
- import { defineComponent, openBlock, createElementBlock, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, renderSlot, computed, normalizeStyle, inject, useId, ref, unref, watch, onBeforeUnmount, createBlock, Teleport, createVNode, Transition, withCtx, withModifiers, nextTick, Fragment, renderList, createTextVNode, onMounted, provide, resolveDynamicComponent, useCssVars, useSlots, reactive, onBeforeMount, withDirectives, vModelText, getCurrentInstance, mergeProps, TransitionGroup, onUpdated, createApp } from "vue";
2
- const _hoisted_1$M = ["type", "disabled"];
3
- const _hoisted_2$F = {
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, renderSlot, computed, normalizeStyle, inject, useId, ref, unref, watch, createTextVNode, onBeforeUnmount, createBlock, Teleport, createVNode, Transition, withCtx, withModifiers, nextTick, Fragment, renderList, onMounted, provide, resolveDynamicComponent, useCssVars, useSlots, reactive, onBeforeMount, withDirectives, vModelText, getCurrentInstance, mergeProps, TransitionGroup, onUpdated, createApp } from "vue";
2
+ const _hoisted_1$N = ["type", "disabled"];
3
+ const _hoisted_2$G = {
4
4
  key: 0,
5
5
  class: "tao-button__loader"
6
6
  };
7
- const _hoisted_3$y = {
7
+ const _hoisted_3$A = {
8
8
  key: 1,
9
9
  class: "tao-button__icon"
10
10
  };
11
- const _hoisted_4$r = { class: "tao-button__content" };
12
- const _sfc_main$U = /* @__PURE__ */ defineComponent({
11
+ const _hoisted_4$u = { class: "tao-button__content" };
12
+ const _sfc_main$V = /* @__PURE__ */ defineComponent({
13
13
  ...{ name: "TaoButton" },
14
14
  __name: "TaoButton",
15
15
  props: {
@@ -48,12 +48,12 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
48
48
  disabled: __props.disabled || __props.loading,
49
49
  onClick: handleClick
50
50
  }, [
51
- __props.loading ? (openBlock(), createElementBlock("span", _hoisted_2$F)) : createCommentVNode("", true),
52
- __props.icon ? (openBlock(), createElementBlock("span", _hoisted_3$y, toDisplayString(__props.icon), 1)) : createCommentVNode("", true),
53
- createElementVNode("span", _hoisted_4$r, [
51
+ __props.loading ? (openBlock(), createElementBlock("span", _hoisted_2$G)) : createCommentVNode("", true),
52
+ __props.icon ? (openBlock(), createElementBlock("span", _hoisted_3$A, toDisplayString(__props.icon), 1)) : createCommentVNode("", true),
53
+ createElementVNode("span", _hoisted_4$u, [
54
54
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
55
55
  ])
56
- ], 10, _hoisted_1$M);
56
+ ], 10, _hoisted_1$N);
57
57
  };
58
58
  }
59
59
  });
@@ -64,8 +64,8 @@ const _export_sfc = (sfc, props) => {
64
64
  }
65
65
  return target;
66
66
  };
67
- const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-c3034f66"]]);
68
- const _sfc_main$T = /* @__PURE__ */ defineComponent({
67
+ const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-c3034f66"]]);
68
+ const _sfc_main$U = /* @__PURE__ */ defineComponent({
69
69
  ...{ name: "TaoBlock" },
70
70
  __name: "TaoBlock",
71
71
  props: {
@@ -97,24 +97,24 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
97
97
  };
98
98
  }
99
99
  });
100
- const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-feb87e36"]]);
100
+ const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-feb87e36"]]);
101
101
  const formFieldKey = Symbol("taoFormField");
102
- const _hoisted_1$L = { class: "tao-input-wrapper" };
103
- const _hoisted_2$E = ["for"];
104
- const _hoisted_3$x = {
102
+ const _hoisted_1$M = { class: "tao-input-wrapper" };
103
+ const _hoisted_2$F = ["for"];
104
+ const _hoisted_3$z = {
105
105
  key: 0,
106
106
  class: "tao-input__affix tao-input__affix--prefix"
107
107
  };
108
- const _hoisted_4$q = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
109
- const _hoisted_5$i = {
108
+ const _hoisted_4$t = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
109
+ const _hoisted_5$l = {
110
110
  key: 1,
111
111
  class: "tao-input__affix tao-input__affix--suffix"
112
112
  };
113
- const _hoisted_6$e = {
113
+ const _hoisted_6$g = {
114
114
  key: 1,
115
115
  class: "tao-input__error"
116
116
  };
117
- const _sfc_main$S = /* @__PURE__ */ defineComponent({
117
+ const _sfc_main$T = /* @__PURE__ */ defineComponent({
118
118
  ...{ name: "TaoInput" },
119
119
  __name: "TaoInput",
120
120
  props: {
@@ -150,12 +150,12 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
150
150
  emit("focus", event);
151
151
  }
152
152
  return (_ctx, _cache) => {
153
- return openBlock(), createElementBlock("div", _hoisted_1$L, [
153
+ return openBlock(), createElementBlock("div", _hoisted_1$M, [
154
154
  __props.label && !unref(field) ? (openBlock(), createElementBlock("label", {
155
155
  key: 0,
156
156
  class: "tao-input__label",
157
157
  for: controlId.value
158
- }, toDisplayString(__props.label), 9, _hoisted_2$E)) : createCommentVNode("", true),
158
+ }, toDisplayString(__props.label), 9, _hoisted_2$F)) : createCommentVNode("", true),
159
159
  createElementVNode("div", {
160
160
  class: normalizeClass(["tao-input-shell", {
161
161
  "tao-input-shell--focused": focused.value,
@@ -165,7 +165,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
165
165
  "tao-input-shell--suffix": _ctx.$slots.suffix
166
166
  }])
167
167
  }, [
168
- _ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_3$x, [
168
+ _ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_3$z, [
169
169
  renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
170
170
  ])) : createCommentVNode("", true),
171
171
  createElementVNode("input", {
@@ -180,27 +180,27 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
180
180
  onInput: handleInput,
181
181
  onBlur: handleBlur,
182
182
  onFocus: handleFocus
183
- }, null, 42, _hoisted_4$q),
184
- _ctx.$slots.suffix ? (openBlock(), createElementBlock("span", _hoisted_5$i, [
183
+ }, null, 42, _hoisted_4$t),
184
+ _ctx.$slots.suffix ? (openBlock(), createElementBlock("span", _hoisted_5$l, [
185
185
  renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
186
186
  ])) : createCommentVNode("", true)
187
187
  ], 2),
188
- __props.error && __props.errorMessage ? (openBlock(), createElementBlock("span", _hoisted_6$e, toDisplayString(__props.errorMessage), 1)) : createCommentVNode("", true)
188
+ __props.error && __props.errorMessage ? (openBlock(), createElementBlock("span", _hoisted_6$g, toDisplayString(__props.errorMessage), 1)) : createCommentVNode("", true)
189
189
  ]);
190
190
  };
191
191
  }
192
192
  });
193
- const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-b522e041"]]);
194
- const _hoisted_1$K = {
193
+ const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-b522e041"]]);
194
+ const _hoisted_1$L = {
195
195
  key: 0,
196
196
  class: "tao-input-group__addon tao-input-group__addon--before"
197
197
  };
198
- const _hoisted_2$D = { class: "tao-input-group__field" };
199
- const _hoisted_3$w = {
198
+ const _hoisted_2$E = { class: "tao-input-group__field" };
199
+ const _hoisted_3$y = {
200
200
  key: 1,
201
201
  class: "tao-input-group__addon tao-input-group__addon--after"
202
202
  };
203
- const _sfc_main$R = /* @__PURE__ */ defineComponent({
203
+ const _sfc_main$S = /* @__PURE__ */ defineComponent({
204
204
  ...{ name: "TaoInputGroup" },
205
205
  __name: "TaoInputGroup",
206
206
  setup(__props) {
@@ -222,28 +222,30 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
222
222
  onFocusin: onFocusIn,
223
223
  onFocusout: onFocusOut
224
224
  }, [
225
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_1$K, [
225
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_1$L, [
226
226
  renderSlot(_ctx.$slots, "before", {}, void 0, true)
227
227
  ])) : createCommentVNode("", true),
228
- createElementVNode("div", _hoisted_2$D, [
228
+ createElementVNode("div", _hoisted_2$E, [
229
229
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
230
230
  ]),
231
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_3$w, [
231
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_3$y, [
232
232
  renderSlot(_ctx.$slots, "after", {}, void 0, true)
233
233
  ])) : createCommentVNode("", true)
234
234
  ], 34);
235
235
  };
236
236
  }
237
237
  });
238
- const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-f06bb3b1"]]);
239
- const _hoisted_1$J = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
240
- const _hoisted_2$C = {
238
+ const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-f06bb3b1"]]);
239
+ const _hoisted_1$K = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
240
+ const _hoisted_2$D = {
241
241
  key: 0,
242
242
  class: "tao-input-number__steppers"
243
243
  };
244
- const _hoisted_3$v = ["disabled"];
245
- const _hoisted_4$p = ["disabled"];
246
- const _sfc_main$Q = /* @__PURE__ */ defineComponent({
244
+ const _hoisted_3$x = ["aria-label", "disabled"];
245
+ const _hoisted_4$s = { "aria-hidden": "true" };
246
+ const _hoisted_5$k = ["aria-label", "disabled"];
247
+ const _hoisted_6$f = { "aria-hidden": "true" };
248
+ const _sfc_main$R = /* @__PURE__ */ defineComponent({
247
249
  ...{ name: "TaoInputNumber" },
248
250
  __name: "TaoInputNumber",
249
251
  props: {
@@ -254,7 +256,9 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
254
256
  precision: {},
255
257
  disabled: { type: Boolean, default: false },
256
258
  placeholder: { default: "" },
257
- controls: { type: Boolean, default: true }
259
+ controls: { type: Boolean, default: true },
260
+ incrementLabel: { default: "Увеличить" },
261
+ decrementLabel: { default: "Уменьшить" }
258
262
  },
259
263
  emits: ["update:modelValue", "blur", "focus"],
260
264
  setup(__props, { emit: __emit }) {
@@ -392,34 +396,48 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
392
396
  onFocus,
393
397
  onBlur,
394
398
  onKeydown
395
- }, null, 40, _hoisted_1$J),
396
- __props.controls ? (openBlock(), createElementBlock("div", _hoisted_2$C, [
399
+ }, null, 40, _hoisted_1$K),
400
+ __props.controls ? (openBlock(), createElementBlock("div", _hoisted_2$D, [
397
401
  createElementVNode("button", {
398
402
  type: "button",
399
403
  class: "tao-input-number__step",
400
- "aria-label": "Увеличить",
404
+ "aria-label": __props.incrementLabel,
401
405
  tabindex: "-1",
402
406
  disabled: __props.disabled || atMax.value,
403
407
  onClick: _cache[0] || (_cache[0] = ($event) => bump(1))
404
- }, " + ", 8, _hoisted_3$v),
408
+ }, [
409
+ createElementVNode("span", _hoisted_4$s, [
410
+ renderSlot(_ctx.$slots, "increment-icon", {}, () => [
411
+ _cache[2] || (_cache[2] = createTextVNode("+", -1))
412
+ ], true)
413
+ ])
414
+ ], 8, _hoisted_3$x),
405
415
  createElementVNode("button", {
406
416
  type: "button",
407
417
  class: "tao-input-number__step",
408
- "aria-label": "Уменьшить",
418
+ "aria-label": __props.decrementLabel,
409
419
  tabindex: "-1",
410
420
  disabled: __props.disabled || atMin.value,
411
421
  onClick: _cache[1] || (_cache[1] = ($event) => bump(-1))
412
- }, " − ", 8, _hoisted_4$p)
422
+ }, [
423
+ createElementVNode("span", _hoisted_6$f, [
424
+ renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
425
+ _cache[3] || (_cache[3] = createTextVNode("−", -1))
426
+ ], true)
427
+ ])
428
+ ], 8, _hoisted_5$k)
413
429
  ])) : createCommentVNode("", true)
414
430
  ], 2);
415
431
  };
416
432
  }
417
433
  });
418
- const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-55b65a4d"]]);
419
- const _hoisted_1$I = ["aria-label", "disabled"];
420
- const _hoisted_2$B = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
421
- const _hoisted_3$u = ["disabled"];
422
- const _sfc_main$P = /* @__PURE__ */ defineComponent({
434
+ const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-331dd958"]]);
435
+ const _hoisted_1$J = ["aria-label", "disabled"];
436
+ const _hoisted_2$C = { "aria-hidden": "true" };
437
+ const _hoisted_3$w = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
438
+ const _hoisted_4$r = ["aria-label", "disabled"];
439
+ const _hoisted_5$j = { "aria-hidden": "true" };
440
+ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
423
441
  ...{ name: "TaoQuantity" },
424
442
  __name: "TaoQuantity",
425
443
  props: {
@@ -428,7 +446,10 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
428
446
  max: {},
429
447
  disabled: { type: Boolean, default: false },
430
448
  allowRemove: { type: Boolean, default: true },
431
- forceMaxLimit: { type: Boolean, default: true }
449
+ forceMaxLimit: { type: Boolean, default: true },
450
+ decrementLabel: { default: "Уменьшить" },
451
+ removeLabel: { default: "Убрать" },
452
+ incrementLabel: { default: "Увеличить" }
432
453
  },
433
454
  emits: ["update:modelValue", "change", "dec", "inc", "blur", "focus"],
434
455
  setup(__props, { emit: __emit }) {
@@ -537,7 +558,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
537
558
  const atMax = computed(() => props.modelValue >= ceiling.value);
538
559
  const minusDisabled = computed(() => props.disabled || !props.allowRemove && atMin.value);
539
560
  const plusDisabled = computed(() => props.disabled || atMax.value);
540
- const minusLabel = computed(() => atMin.value && props.allowRemove ? "Убрать" : "Уменьшить");
561
+ const minusLabel = computed(() => atMin.value && props.allowRemove ? props.removeLabel : props.decrementLabel);
541
562
  return (_ctx, _cache) => {
542
563
  return openBlock(), createElementBlock("div", {
543
564
  class: normalizeClass(["tao-quantity", {
@@ -552,7 +573,13 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
552
573
  "aria-label": minusLabel.value,
553
574
  disabled: minusDisabled.value,
554
575
  onClick: onDec
555
- }, " − ", 8, _hoisted_1$I),
576
+ }, [
577
+ createElementVNode("span", _hoisted_2$C, [
578
+ renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
579
+ _cache[0] || (_cache[0] = createTextVNode("−", -1))
580
+ ], true)
581
+ ])
582
+ ], 8, _hoisted_1$J),
556
583
  createElementVNode("input", {
557
584
  id: controlId.value,
558
585
  class: "tao-quantity__input",
@@ -572,49 +599,55 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
572
599
  onFocus,
573
600
  onBlur,
574
601
  onKeydown
575
- }, null, 40, _hoisted_2$B),
602
+ }, null, 40, _hoisted_3$w),
576
603
  createElementVNode("button", {
577
604
  type: "button",
578
605
  class: "tao-quantity__btn tao-quantity__btn--inc",
579
- "aria-label": "Увеличить",
606
+ "aria-label": __props.incrementLabel,
580
607
  disabled: plusDisabled.value,
581
608
  onClick: onInc
582
- }, " + ", 8, _hoisted_3$u)
609
+ }, [
610
+ createElementVNode("span", _hoisted_5$j, [
611
+ renderSlot(_ctx.$slots, "increment-icon", {}, () => [
612
+ _cache[1] || (_cache[1] = createTextVNode("+", -1))
613
+ ], true)
614
+ ])
615
+ ], 8, _hoisted_4$r)
583
616
  ], 2);
584
617
  };
585
618
  }
586
619
  });
587
- const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-df6baf04"]]);
588
- const _hoisted_1$H = {
620
+ const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-c9c7c8b4"]]);
621
+ const _hoisted_1$I = {
589
622
  key: 0,
590
623
  class: "tao-card__cover"
591
624
  };
592
- const _hoisted_2$A = {
625
+ const _hoisted_2$B = {
593
626
  key: 0,
594
627
  class: "tao-card__header-title"
595
628
  };
596
- const _hoisted_3$t = { key: 0 };
597
- const _hoisted_4$o = {
629
+ const _hoisted_3$v = { key: 0 };
630
+ const _hoisted_4$q = {
598
631
  key: 2,
599
632
  class: "tao-card__title-block"
600
633
  };
601
- const _hoisted_5$h = {
634
+ const _hoisted_5$i = {
602
635
  key: 0,
603
636
  class: "tao-card__title"
604
637
  };
605
- const _hoisted_6$d = {
638
+ const _hoisted_6$e = {
606
639
  key: 1,
607
640
  class: "tao-card__sub"
608
641
  };
609
- const _hoisted_7$9 = {
642
+ const _hoisted_7$c = {
610
643
  key: 3,
611
644
  class: "tao-card__body"
612
645
  };
613
- const _hoisted_8$7 = {
646
+ const _hoisted_8$b = {
614
647
  key: 4,
615
648
  class: "tao-card__footer"
616
649
  };
617
- const _sfc_main$O = /* @__PURE__ */ defineComponent({
650
+ const _sfc_main$P = /* @__PURE__ */ defineComponent({
618
651
  ...{ name: "TaoCard" },
619
652
  __name: "TaoCard",
620
653
  props: {
@@ -646,14 +679,14 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
646
679
  }]),
647
680
  style: normalizeStyle(radiusStyle.value)
648
681
  }, [
649
- _ctx.$slots.cover ? (openBlock(), createElementBlock("div", _hoisted_1$H, [
682
+ _ctx.$slots.cover ? (openBlock(), createElementBlock("div", _hoisted_1$I, [
650
683
  renderSlot(_ctx.$slots, "cover", {}, void 0, true)
651
684
  ])) : createCommentVNode("", true),
652
685
  createElementVNode("div", {
653
686
  class: "tao-card__content",
654
687
  style: normalizeStyle(paddingStyle.value)
655
688
  }, [
656
- _ctx.$slots.headerTitle ? (openBlock(), createElementBlock("h2", _hoisted_2$A, [
689
+ _ctx.$slots.headerTitle ? (openBlock(), createElementBlock("h2", _hoisted_2$B, [
657
690
  renderSlot(_ctx.$slots, "headerTitle", {}, void 0, true)
658
691
  ])) : createCommentVNode("", true),
659
692
  _ctx.$slots.header || _ctx.$slots.headerSecondary ? (openBlock(), createElementBlock("div", {
@@ -663,22 +696,22 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
663
696
  createElementVNode("span", null, [
664
697
  renderSlot(_ctx.$slots, "header", {}, void 0, true)
665
698
  ]),
666
- _ctx.$slots.headerSecondary ? (openBlock(), createElementBlock("span", _hoisted_3$t, [
699
+ _ctx.$slots.headerSecondary ? (openBlock(), createElementBlock("span", _hoisted_3$v, [
667
700
  renderSlot(_ctx.$slots, "headerSecondary", {}, void 0, true)
668
701
  ])) : createCommentVNode("", true)
669
702
  ], 2)) : createCommentVNode("", true),
670
- _ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
671
- _ctx.$slots.title ? (openBlock(), createElementBlock("h2", _hoisted_5$h, [
703
+ _ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_4$q, [
704
+ _ctx.$slots.title ? (openBlock(), createElementBlock("h2", _hoisted_5$i, [
672
705
  renderSlot(_ctx.$slots, "title", {}, void 0, true)
673
706
  ])) : createCommentVNode("", true),
674
- _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_6$d, [
707
+ _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_6$e, [
675
708
  renderSlot(_ctx.$slots, "sub", {}, void 0, true)
676
709
  ])) : createCommentVNode("", true)
677
710
  ])) : createCommentVNode("", true),
678
- _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_7$9, [
711
+ _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_7$c, [
679
712
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
680
713
  ])) : createCommentVNode("", true),
681
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$7, [
714
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$b, [
682
715
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
683
716
  ])) : createCommentVNode("", true)
684
717
  ], 4)
@@ -686,7 +719,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
686
719
  };
687
720
  }
688
721
  });
689
- const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-2ff3d055"]]);
722
+ const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-2ff3d055"]]);
690
723
  const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
691
724
  function getFocusable(root) {
692
725
  return [...root.querySelectorAll(FOCUSABLE)].filter(
@@ -715,25 +748,53 @@ function trapTab(event, root) {
715
748
  first.focus();
716
749
  }
717
750
  }
718
- const _hoisted_1$G = ["aria-labelledby"];
719
- const _hoisted_2$z = {
751
+ let locks = 0;
752
+ let previousOverflow = "";
753
+ function isBrowser() {
754
+ return typeof document !== "undefined";
755
+ }
756
+ function lockBodyScroll() {
757
+ if (!isBrowser()) {
758
+ return;
759
+ }
760
+ if (locks === 0) {
761
+ previousOverflow = document.body.style.overflow;
762
+ document.body.style.overflow = "hidden";
763
+ }
764
+ locks += 1;
765
+ }
766
+ function unlockBodyScroll() {
767
+ if (!isBrowser() || locks === 0) {
768
+ return;
769
+ }
770
+ locks -= 1;
771
+ if (locks === 0) {
772
+ document.body.style.overflow = previousOverflow;
773
+ previousOverflow = "";
774
+ }
775
+ }
776
+ const _hoisted_1$H = ["aria-labelledby"];
777
+ const _hoisted_2$A = {
720
778
  key: 0,
721
779
  class: "tao-modal__header"
722
780
  };
723
- const _hoisted_3$s = ["id"];
724
- const _hoisted_4$n = { key: 1 };
725
- const _hoisted_5$g = { class: "tao-modal__content" };
726
- const _hoisted_6$c = {
781
+ const _hoisted_3$u = ["id"];
782
+ const _hoisted_4$p = { key: 1 };
783
+ const _hoisted_5$h = ["aria-label"];
784
+ const _hoisted_6$d = { "aria-hidden": "true" };
785
+ const _hoisted_7$b = { class: "tao-modal__content" };
786
+ const _hoisted_8$a = {
727
787
  key: 1,
728
788
  class: "tao-modal__footer"
729
789
  };
730
- const _sfc_main$N = /* @__PURE__ */ defineComponent({
790
+ const _sfc_main$O = /* @__PURE__ */ defineComponent({
731
791
  ...{ name: "TaoModal" },
732
792
  __name: "TaoModal",
733
793
  props: {
734
794
  modelValue: { type: Boolean },
735
795
  title: { default: "" },
736
- closable: { type: Boolean, default: true }
796
+ closable: { type: Boolean, default: true },
797
+ closeLabel: { default: "Закрыть" }
737
798
  },
738
799
  emits: ["update:modelValue", "close"],
739
800
  setup(__props, { emit: __emit }) {
@@ -741,9 +802,8 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
741
802
  const emit = __emit;
742
803
  const panelRef = ref(null);
743
804
  const titleId = useId();
744
- let previousOverflow = "";
745
805
  let previousFocus = null;
746
- let scrollLocked = false;
806
+ let scrollHeld = false;
747
807
  function close() {
748
808
  if (!props.closable) {
749
809
  return;
@@ -751,21 +811,19 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
751
811
  emit("update:modelValue", false);
752
812
  emit("close");
753
813
  }
754
- function lockBodyScroll() {
755
- if (scrollLocked) {
814
+ function holdScroll() {
815
+ if (scrollHeld || !isBrowser()) {
756
816
  return;
757
817
  }
758
- previousOverflow = document.body.style.overflow;
759
- document.body.style.overflow = "hidden";
760
- scrollLocked = true;
818
+ lockBodyScroll();
819
+ scrollHeld = true;
761
820
  }
762
- function unlockBodyScroll() {
763
- if (!scrollLocked) {
821
+ function releaseScroll() {
822
+ if (!scrollHeld) {
764
823
  return;
765
824
  }
766
- document.body.style.overflow = previousOverflow;
767
- previousOverflow = "";
768
- scrollLocked = false;
825
+ unlockBodyScroll();
826
+ scrollHeld = false;
769
827
  }
770
828
  function restoreFocus() {
771
829
  var _a;
@@ -783,6 +841,9 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
783
841
  }
784
842
  function onKeydown(event) {
785
843
  if (event.key === "Escape") {
844
+ if (!props.closable) {
845
+ return;
846
+ }
786
847
  event.preventDefault();
787
848
  close();
788
849
  return;
@@ -794,19 +855,23 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
794
855
  watch(
795
856
  () => props.modelValue,
796
857
  (isOpen) => {
858
+ if (!isBrowser()) {
859
+ return;
860
+ }
797
861
  if (isOpen) {
798
862
  previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
799
- lockBodyScroll();
863
+ holdScroll();
800
864
  void focusPanel();
801
865
  return;
802
866
  }
803
- unlockBodyScroll();
867
+ releaseScroll();
804
868
  restoreFocus();
805
869
  },
806
870
  { immediate: true }
807
871
  );
808
872
  onBeforeUnmount(() => {
809
- unlockBodyScroll();
873
+ releaseScroll();
874
+ restoreFocus();
810
875
  });
811
876
  return (_ctx, _cache) => {
812
877
  return openBlock(), createBlock(Teleport, { to: "body" }, [
@@ -827,29 +892,35 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
827
892
  "aria-labelledby": __props.title ? unref(titleId) : void 0,
828
893
  tabindex: "-1"
829
894
  }, [
830
- __props.title || _ctx.$slots.header || __props.closable ? (openBlock(), createElementBlock("div", _hoisted_2$z, [
895
+ __props.title || _ctx.$slots.header || __props.closable ? (openBlock(), createElementBlock("div", _hoisted_2$A, [
831
896
  renderSlot(_ctx.$slots, "header", {}, () => [
832
897
  __props.title ? (openBlock(), createElementBlock("h2", {
833
898
  key: 0,
834
899
  id: unref(titleId),
835
900
  class: "tao-modal__title"
836
- }, toDisplayString(__props.title), 9, _hoisted_3$s)) : (openBlock(), createElementBlock("span", _hoisted_4$n))
901
+ }, toDisplayString(__props.title), 9, _hoisted_3$u)) : (openBlock(), createElementBlock("span", _hoisted_4$p))
837
902
  ], true),
838
903
  __props.closable ? (openBlock(), createElementBlock("button", {
839
904
  key: 0,
840
905
  type: "button",
841
906
  class: "tao-modal__close",
842
- "aria-label": "Закрыть",
907
+ "aria-label": __props.closeLabel,
843
908
  onClick: close
844
- }, " × ")) : createCommentVNode("", true)
909
+ }, [
910
+ createElementVNode("span", _hoisted_6$d, [
911
+ renderSlot(_ctx.$slots, "close-icon", {}, () => [
912
+ _cache[0] || (_cache[0] = createTextVNode("×", -1))
913
+ ], true)
914
+ ])
915
+ ], 8, _hoisted_5$h)) : createCommentVNode("", true)
845
916
  ])) : createCommentVNode("", true),
846
- createElementVNode("div", _hoisted_5$g, [
917
+ createElementVNode("div", _hoisted_7$b, [
847
918
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
848
919
  ]),
849
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_6$c, [
920
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$a, [
850
921
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
851
922
  ])) : createCommentVNode("", true)
852
- ], 8, _hoisted_1$G)
923
+ ], 8, _hoisted_1$H)
853
924
  ], 32)) : createCommentVNode("", true)
854
925
  ]),
855
926
  _: 3
@@ -858,11 +929,11 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
858
929
  };
859
930
  }
860
931
  });
861
- const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-0cffe849"]]);
862
- const _hoisted_1$F = { class: "tao-tabs" };
863
- const _hoisted_2$y = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
864
- const _hoisted_3$r = ["id", "aria-labelledby"];
865
- const _sfc_main$M = /* @__PURE__ */ defineComponent({
932
+ const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-102cfd66"]]);
933
+ const _hoisted_1$G = { class: "tao-tabs" };
934
+ const _hoisted_2$z = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
935
+ const _hoisted_3$t = ["id", "aria-labelledby"];
936
+ const _sfc_main$N = /* @__PURE__ */ defineComponent({
866
937
  ...{ name: "TaoTabs" },
867
938
  __name: "TaoTabs",
868
939
  props: {
@@ -926,7 +997,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
926
997
  }
927
998
  }
928
999
  return (_ctx, _cache) => {
929
- return openBlock(), createElementBlock("div", _hoisted_1$F, [
1000
+ return openBlock(), createElementBlock("div", _hoisted_1$G, [
930
1001
  createElementVNode("div", {
931
1002
  class: "tao-tabs__list",
932
1003
  role: "tablist",
@@ -951,7 +1022,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
951
1022
  }, void 0, true, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
952
1023
  createTextVNode(toDisplayString(tab.label), 1)
953
1024
  ], 64))
954
- ], 8, _hoisted_2$y);
1025
+ ], 8, _hoisted_2$z);
955
1026
  }), 128))
956
1027
  ], 32),
957
1028
  createElementVNode("div", {
@@ -961,12 +1032,12 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
961
1032
  "aria-labelledby": tabId(__props.modelValue)
962
1033
  }, [
963
1034
  renderSlot(_ctx.$slots, "default", { activeTab: __props.modelValue }, void 0, true)
964
- ], 8, _hoisted_3$r)
1035
+ ], 8, _hoisted_3$t)
965
1036
  ]);
966
1037
  };
967
1038
  }
968
1039
  });
969
- const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-bf16735e"]]);
1040
+ const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-bf16735e"]]);
970
1041
  function listenFocusLoss(onLoss) {
971
1042
  function onVisibilityChange() {
972
1043
  if (document.hidden) {
@@ -982,7 +1053,7 @@ function listenFocusLoss(onLoss) {
982
1053
  window.removeEventListener("pagehide", onLoss);
983
1054
  };
984
1055
  }
985
- const _sfc_main$L = /* @__PURE__ */ defineComponent({
1056
+ const _sfc_main$M = /* @__PURE__ */ defineComponent({
986
1057
  ...{ name: "TaoTooltip" },
987
1058
  __name: "TaoTooltip",
988
1059
  props: {
@@ -1144,9 +1215,9 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
1144
1215
  };
1145
1216
  }
1146
1217
  });
1147
- const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-926dfa73"]]);
1148
- const _hoisted_1$E = { class: "tao-popover" };
1149
- const _sfc_main$K = /* @__PURE__ */ defineComponent({
1218
+ const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-926dfa73"]]);
1219
+ const _hoisted_1$F = { class: "tao-popover" };
1220
+ const _sfc_main$L = /* @__PURE__ */ defineComponent({
1150
1221
  ...{ name: "TaoPopover" },
1151
1222
  __name: "TaoPopover",
1152
1223
  props: {
@@ -1180,15 +1251,26 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
1180
1251
  function close() {
1181
1252
  void applyOpen(false);
1182
1253
  }
1183
- async function applyOpen(next) {
1184
- var _a;
1185
- setOpen(next);
1186
- if (!next) {
1254
+ function bindDismiss() {
1255
+ if (typeof document === "undefined") {
1187
1256
  return;
1188
1257
  }
1189
- await nextTick();
1190
- updatePosition();
1191
- (_a = panelRef.value) == null ? void 0 : _a.focus();
1258
+ document.addEventListener("pointerdown", onDocumentPointer);
1259
+ document.addEventListener("keydown", onDocumentKey);
1260
+ window.addEventListener("resize", onViewportChange);
1261
+ window.addEventListener("scroll", onViewportChange, true);
1262
+ }
1263
+ function unbindDismiss() {
1264
+ if (typeof document === "undefined") {
1265
+ return;
1266
+ }
1267
+ document.removeEventListener("pointerdown", onDocumentPointer);
1268
+ document.removeEventListener("keydown", onDocumentKey);
1269
+ window.removeEventListener("resize", onViewportChange);
1270
+ window.removeEventListener("scroll", onViewportChange, true);
1271
+ }
1272
+ function applyOpen(next) {
1273
+ setOpen(next);
1192
1274
  }
1193
1275
  function focusTrigger() {
1194
1276
  var _a, _b;
@@ -1201,7 +1283,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
1201
1283
  function updatePosition() {
1202
1284
  const trigger = triggerRef.value;
1203
1285
  const panel = panelRef.value;
1204
- if (!trigger || !panel) {
1286
+ if (typeof window === "undefined" || !trigger || !panel) {
1205
1287
  return;
1206
1288
  }
1207
1289
  const rect = trigger.getBoundingClientRect();
@@ -1284,27 +1366,27 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
1284
1366
  updatePosition();
1285
1367
  }
1286
1368
  }
1287
- watch(open, (isOpen) => {
1288
- if (isOpen) {
1289
- document.addEventListener("pointerdown", onDocumentPointer);
1290
- document.addEventListener("keydown", onDocumentKey);
1291
- window.addEventListener("resize", onViewportChange);
1292
- window.addEventListener("scroll", onViewportChange, true);
1293
- return;
1294
- }
1295
- document.removeEventListener("pointerdown", onDocumentPointer);
1296
- document.removeEventListener("keydown", onDocumentKey);
1297
- window.removeEventListener("resize", onViewportChange);
1298
- window.removeEventListener("scroll", onViewportChange, true);
1299
- });
1369
+ watch(
1370
+ open,
1371
+ (isOpen) => {
1372
+ if (isOpen) {
1373
+ bindDismiss();
1374
+ void nextTick(() => {
1375
+ var _a;
1376
+ updatePosition();
1377
+ (_a = panelRef.value) == null ? void 0 : _a.focus();
1378
+ });
1379
+ return;
1380
+ }
1381
+ unbindDismiss();
1382
+ },
1383
+ { immediate: true }
1384
+ );
1300
1385
  onBeforeUnmount(() => {
1301
- document.removeEventListener("pointerdown", onDocumentPointer);
1302
- document.removeEventListener("keydown", onDocumentKey);
1303
- window.removeEventListener("resize", onViewportChange);
1304
- window.removeEventListener("scroll", onViewportChange, true);
1386
+ unbindDismiss();
1305
1387
  });
1306
1388
  return (_ctx, _cache) => {
1307
- return openBlock(), createElementBlock("div", _hoisted_1$E, [
1389
+ return openBlock(), createElementBlock("div", _hoisted_1$F, [
1308
1390
  createElementVNode("div", {
1309
1391
  ref_key: "triggerRef",
1310
1392
  ref: triggerRef,
@@ -1333,17 +1415,17 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
1333
1415
  };
1334
1416
  }
1335
1417
  });
1336
- const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-e4ead301"]]);
1418
+ const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-afd791a7"]]);
1337
1419
  const spoilerGroupKey = Symbol("taoSpoilerGroup");
1338
- const _hoisted_1$D = { class: "tao-spoiler" };
1339
- const _hoisted_2$x = ["aria-expanded", "aria-controls"];
1340
- const _hoisted_3$q = {
1420
+ const _hoisted_1$E = { class: "tao-spoiler" };
1421
+ const _hoisted_2$y = ["aria-expanded", "aria-controls"];
1422
+ const _hoisted_3$s = {
1341
1423
  key: 0,
1342
1424
  class: "tao-spoiler__title"
1343
1425
  };
1344
- const _hoisted_4$m = ["id"];
1345
- const _hoisted_5$f = { class: "tao-spoiler__content-inner" };
1346
- const _sfc_main$J = /* @__PURE__ */ defineComponent({
1426
+ const _hoisted_4$o = ["id"];
1427
+ const _hoisted_5$g = { class: "tao-spoiler__content-inner" };
1428
+ const _sfc_main$K = /* @__PURE__ */ defineComponent({
1347
1429
  ...{ name: "TaoSpoiler" },
1348
1430
  __name: "TaoSpoiler",
1349
1431
  props: {
@@ -1398,7 +1480,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
1398
1480
  });
1399
1481
  }
1400
1482
  return (_ctx, _cache) => {
1401
- return openBlock(), createElementBlock("div", _hoisted_1$D, [
1483
+ return openBlock(), createElementBlock("div", _hoisted_1$E, [
1402
1484
  createElementVNode("button", {
1403
1485
  type: "button",
1404
1486
  class: "tao-spoiler__header",
@@ -1409,12 +1491,12 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
1409
1491
  createElementVNode("span", {
1410
1492
  class: normalizeClass(["tao-spoiler__icon", { "tao-spoiler__icon--open": isOpen.value }])
1411
1493
  }, "▶", 2),
1412
- __props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_3$q, [
1494
+ __props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_3$s, [
1413
1495
  renderSlot(_ctx.$slots, "title", {}, () => [
1414
1496
  createTextVNode(toDisplayString(__props.title), 1)
1415
1497
  ], true)
1416
1498
  ])) : createCommentVNode("", true)
1417
- ], 8, _hoisted_2$x),
1499
+ ], 8, _hoisted_2$y),
1418
1500
  createVNode(Transition, {
1419
1501
  name: "tao-spoiler-slide",
1420
1502
  onBeforeEnter,
@@ -1428,10 +1510,10 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
1428
1510
  id: unref(panelId),
1429
1511
  class: "tao-spoiler__content"
1430
1512
  }, [
1431
- createElementVNode("div", _hoisted_5$f, [
1513
+ createElementVNode("div", _hoisted_5$g, [
1432
1514
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
1433
1515
  ])
1434
- ], 8, _hoisted_4$m)) : createCommentVNode("", true)
1516
+ ], 8, _hoisted_4$o)) : createCommentVNode("", true)
1435
1517
  ]),
1436
1518
  _: 3
1437
1519
  })
@@ -1439,20 +1521,25 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
1439
1521
  };
1440
1522
  }
1441
1523
  });
1442
- const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-ccb052cf"]]);
1443
- const _hoisted_1$C = { class: "tao-spoiler-group" };
1444
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
1524
+ const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-ccb052cf"]]);
1525
+ const _hoisted_1$D = { class: "tao-spoiler-group" };
1526
+ const _sfc_main$J = /* @__PURE__ */ defineComponent({
1445
1527
  ...{ name: "TaoSpoilerGroup" },
1446
1528
  __name: "TaoSpoilerGroup",
1447
1529
  props: {
1448
- modelValue: { default: null }
1530
+ modelValue: {}
1449
1531
  },
1450
1532
  emits: ["update:modelValue", "change"],
1451
1533
  setup(__props, { emit: __emit }) {
1452
1534
  const props = __props;
1453
1535
  const emit = __emit;
1454
- const model = computed(() => props.modelValue);
1536
+ const isControlled = computed(() => props.modelValue !== void 0);
1537
+ const internal = ref(null);
1538
+ const model = computed(() => isControlled.value ? props.modelValue : internal.value);
1455
1539
  function setOpen(name) {
1540
+ if (!isControlled.value) {
1541
+ internal.value = name;
1542
+ }
1456
1543
  emit("update:modelValue", name);
1457
1544
  emit("change", name);
1458
1545
  }
@@ -1461,20 +1548,21 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
1461
1548
  setOpen
1462
1549
  });
1463
1550
  return (_ctx, _cache) => {
1464
- return openBlock(), createElementBlock("div", _hoisted_1$C, [
1551
+ return openBlock(), createElementBlock("div", _hoisted_1$D, [
1465
1552
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
1466
1553
  ]);
1467
1554
  };
1468
1555
  }
1469
1556
  });
1470
- const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-6b172e89"]]);
1471
- const _hoisted_1$B = ["aria-label"];
1472
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
1557
+ const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-118970dd"]]);
1558
+ const _hoisted_1$C = ["aria-label"];
1559
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
1473
1560
  ...{ name: "TaoCopy" },
1474
1561
  __name: "TaoCopy",
1475
1562
  props: {
1476
1563
  text: {},
1477
1564
  successMessage: { default: "Скопировано!" },
1565
+ copyLabel: { default: "Копировать" },
1478
1566
  tip: { type: Boolean, default: true }
1479
1567
  },
1480
1568
  setup(__props) {
@@ -1576,7 +1664,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
1576
1664
  createElementVNode("button", {
1577
1665
  type: "button",
1578
1666
  class: normalizeClass(["tao-copy__button", { "tao-copy__button--copied": copied.value }]),
1579
- "aria-label": copied.value ? __props.successMessage : "Копировать",
1667
+ "aria-label": copied.value ? __props.successMessage : __props.copyLabel,
1580
1668
  onClick: copy
1581
1669
  }, [..._cache[0] || (_cache[0] = [
1582
1670
  createElementVNode("svg", {
@@ -1603,7 +1691,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
1603
1691
  "stroke-width": "2"
1604
1692
  })
1605
1693
  ], -1)
1606
- ])], 10, _hoisted_1$B)
1694
+ ])], 10, _hoisted_1$C)
1607
1695
  ], true),
1608
1696
  (openBlock(), createBlock(Teleport, { to: "body" }, [
1609
1697
  copied.value && __props.tip && __props.successMessage ? (openBlock(), createElementBlock("div", {
@@ -1619,8 +1707,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
1619
1707
  };
1620
1708
  }
1621
1709
  });
1622
- const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-1953c07e"]]);
1623
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
1710
+ const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-38d3381d"]]);
1711
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
1624
1712
  ...{ name: "TaoContainer" },
1625
1713
  __name: "TaoContainer",
1626
1714
  props: {
@@ -1637,8 +1725,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
1637
1725
  };
1638
1726
  }
1639
1727
  });
1640
- const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-4c0deb90"]]);
1641
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
1728
+ const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-4c0deb90"]]);
1729
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
1642
1730
  ...{ name: "TaoFlex" },
1643
1731
  __name: "TaoFlex",
1644
1732
  props: {
@@ -1669,7 +1757,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
1669
1757
  };
1670
1758
  }
1671
1759
  });
1672
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
1760
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
1673
1761
  ...{ name: "TaoSpace" },
1674
1762
  __name: "TaoSpace",
1675
1763
  props: {
@@ -1689,7 +1777,332 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
1689
1777
  };
1690
1778
  }
1691
1779
  });
1692
- const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-698ca712"]]);
1780
+ const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-698ca712"]]);
1781
+ const _hoisted_1$B = { class: "tao-split__pane tao-split__pane--start" };
1782
+ const _hoisted_2$x = ["aria-orientation", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-disabled", "tabindex"];
1783
+ const _hoisted_3$r = { class: "tao-split__pane tao-split__pane--end" };
1784
+ const _hoisted_4$n = {
1785
+ key: 0,
1786
+ class: "tao-split__shield"
1787
+ };
1788
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
1789
+ ...{ name: "TaoSplit" },
1790
+ __name: "TaoSplit",
1791
+ props: {
1792
+ modelValue: { default: 50 },
1793
+ direction: { default: "row" },
1794
+ unit: { default: "%" },
1795
+ min: { default: 0 },
1796
+ max: {},
1797
+ minEnd: { default: 0 },
1798
+ resizable: { type: Boolean, default: true },
1799
+ step: {}
1800
+ },
1801
+ emits: ["update:modelValue"],
1802
+ setup(__props, { emit: __emit }) {
1803
+ const props = __props;
1804
+ const emit = __emit;
1805
+ const rootRef = ref(null);
1806
+ const handleRef = ref(null);
1807
+ const startPx = ref(0);
1808
+ const available = ref(0);
1809
+ const isDragging = ref(false);
1810
+ const size = ref(props.modelValue);
1811
+ const isRow = computed(() => props.direction === "row");
1812
+ const stepValue = computed(() => props.step ?? (props.unit === "%" ? 1 : 8));
1813
+ const ariaOrientation = computed(() => isRow.value ? "vertical" : "horizontal");
1814
+ let dragPointer = -1;
1815
+ let dragStartPx = 0;
1816
+ let dragStartCoord = 0;
1817
+ let savedBodyCursor = "";
1818
+ let savedHtmlCursor = "";
1819
+ let savedUserSelect = "";
1820
+ let resizeObserver = null;
1821
+ let stopFocusLoss;
1822
+ function axisSize(el) {
1823
+ const rect = el.getBoundingClientRect();
1824
+ return isRow.value ? rect.width : rect.height;
1825
+ }
1826
+ function measureAvailable() {
1827
+ if (!rootRef.value || !handleRef.value) {
1828
+ return 0;
1829
+ }
1830
+ return Math.max(0, axisSize(rootRef.value) - axisSize(handleRef.value));
1831
+ }
1832
+ function toPx(value, avail) {
1833
+ if (avail <= 0) {
1834
+ return 0;
1835
+ }
1836
+ return props.unit === "%" ? value / 100 * avail : value;
1837
+ }
1838
+ function fromPx(px, avail) {
1839
+ if (props.unit === "%") {
1840
+ if (avail <= 0) {
1841
+ return 0;
1842
+ }
1843
+ return Math.round(px / avail * 1e4) / 100;
1844
+ }
1845
+ return Math.round(px);
1846
+ }
1847
+ function valuesEqual(a, b) {
1848
+ if (props.unit === "%") {
1849
+ return Math.abs(a - b) < 5e-3;
1850
+ }
1851
+ return Math.round(a) === Math.round(b);
1852
+ }
1853
+ function clampStartPx(desiredPx, avail) {
1854
+ if (avail <= 0) {
1855
+ return 0;
1856
+ }
1857
+ const minStartPx = toPx(props.min, avail);
1858
+ const minEndPx = toPx(props.minEnd, avail);
1859
+ const maxStartPx = props.max != null ? toPx(props.max, avail) : Infinity;
1860
+ if (minStartPx + minEndPx > avail) {
1861
+ return Math.min(Math.max(desiredPx, 0), avail);
1862
+ }
1863
+ const lo = minStartPx;
1864
+ const hi = Math.min(maxStartPx, avail - minEndPx);
1865
+ return Math.min(Math.max(desiredPx, lo), Math.max(lo, hi));
1866
+ }
1867
+ function commit(next) {
1868
+ if (valuesEqual(next, size.value)) {
1869
+ size.value = next;
1870
+ return;
1871
+ }
1872
+ size.value = next;
1873
+ emit("update:modelValue", next);
1874
+ }
1875
+ function applyLayout(emitIfChanged) {
1876
+ const avail = measureAvailable();
1877
+ available.value = avail;
1878
+ const clamped = clampStartPx(toPx(size.value, avail), avail);
1879
+ startPx.value = clamped;
1880
+ const next = fromPx(clamped, avail);
1881
+ if (emitIfChanged) {
1882
+ commit(next);
1883
+ }
1884
+ }
1885
+ function isRtl() {
1886
+ return !!rootRef.value && getComputedStyle(rootRef.value).direction === "rtl";
1887
+ }
1888
+ function applyDragCursor() {
1889
+ savedBodyCursor = document.body.style.cursor;
1890
+ savedHtmlCursor = document.documentElement.style.cursor;
1891
+ savedUserSelect = document.body.style.userSelect;
1892
+ const cursor = isRow.value ? "col-resize" : "row-resize";
1893
+ document.body.style.cursor = cursor;
1894
+ document.documentElement.style.cursor = cursor;
1895
+ document.body.style.userSelect = "none";
1896
+ }
1897
+ function restoreDragCursor() {
1898
+ document.body.style.cursor = savedBodyCursor;
1899
+ document.documentElement.style.cursor = savedHtmlCursor;
1900
+ document.body.style.userSelect = savedUserSelect;
1901
+ }
1902
+ function releaseDragCapture() {
1903
+ const el = handleRef.value;
1904
+ const id = dragPointer;
1905
+ if (!el || id === -1) {
1906
+ return;
1907
+ }
1908
+ if (typeof el.hasPointerCapture === "function" && !el.hasPointerCapture(id)) {
1909
+ return;
1910
+ }
1911
+ try {
1912
+ el.releasePointerCapture(id);
1913
+ } catch {
1914
+ }
1915
+ }
1916
+ function endDrag() {
1917
+ if (!isDragging.value) {
1918
+ return;
1919
+ }
1920
+ isDragging.value = false;
1921
+ releaseDragCapture();
1922
+ dragPointer = -1;
1923
+ restoreDragCursor();
1924
+ applyLayout(true);
1925
+ }
1926
+ function setStartFromDelta(delta) {
1927
+ const avail = measureAvailable();
1928
+ available.value = avail;
1929
+ const nextPx = clampStartPx(dragStartPx + delta, avail);
1930
+ startPx.value = nextPx;
1931
+ commit(fromPx(nextPx, avail));
1932
+ }
1933
+ function onPointerDown(event) {
1934
+ if (!props.resizable || event.button !== 0 || !handleRef.value) {
1935
+ return;
1936
+ }
1937
+ dragPointer = event.pointerId;
1938
+ isDragging.value = true;
1939
+ dragStartPx = startPx.value;
1940
+ dragStartCoord = isRow.value ? event.clientX : event.clientY;
1941
+ applyDragCursor();
1942
+ event.preventDefault();
1943
+ try {
1944
+ handleRef.value.setPointerCapture(event.pointerId);
1945
+ } catch {
1946
+ }
1947
+ }
1948
+ function onPointerMove(event) {
1949
+ if (!isDragging.value || event.pointerId !== dragPointer) {
1950
+ return;
1951
+ }
1952
+ const coord = isRow.value ? event.clientX : event.clientY;
1953
+ let delta = coord - dragStartCoord;
1954
+ if (isRow.value && isRtl()) {
1955
+ delta = -delta;
1956
+ }
1957
+ setStartFromDelta(delta);
1958
+ }
1959
+ function onPointerEnd(event) {
1960
+ if (!isDragging.value) {
1961
+ return;
1962
+ }
1963
+ if (dragPointer !== -1 && event.pointerId !== dragPointer) {
1964
+ return;
1965
+ }
1966
+ endDrag();
1967
+ }
1968
+ function onLostPointerCapture() {
1969
+ endDrag();
1970
+ }
1971
+ function ariaMax() {
1972
+ const avail = available.value;
1973
+ if (avail <= 0) {
1974
+ return props.max ?? (props.unit === "%" ? 100 - props.minEnd : 0);
1975
+ }
1976
+ const maxByEnd = fromPx(Math.max(0, avail - toPx(props.minEnd, avail)), avail);
1977
+ if (props.max == null) {
1978
+ return maxByEnd;
1979
+ }
1980
+ return Math.min(props.max, maxByEnd);
1981
+ }
1982
+ const ariaValueMin = computed(() => props.min);
1983
+ const ariaValueMax = computed(() => ariaMax());
1984
+ const ariaValueNow = computed(() => size.value);
1985
+ const ariaValueText = computed(() => props.unit === "%" ? `${size.value}%` : `${Math.round(size.value)}px`);
1986
+ function onKeydown(event) {
1987
+ if (!props.resizable) {
1988
+ return;
1989
+ }
1990
+ const avail = measureAvailable();
1991
+ available.value = avail;
1992
+ if (event.key === "Home") {
1993
+ event.preventDefault();
1994
+ const nextPx2 = clampStartPx(toPx(props.min, avail), avail);
1995
+ startPx.value = nextPx2;
1996
+ commit(fromPx(nextPx2, avail));
1997
+ return;
1998
+ }
1999
+ if (event.key === "End") {
2000
+ event.preventDefault();
2001
+ const nextPx2 = clampStartPx(toPx(ariaMax(), avail), avail);
2002
+ startPx.value = nextPx2;
2003
+ commit(fromPx(nextPx2, avail));
2004
+ return;
2005
+ }
2006
+ const primary = isRow.value && (event.key === "ArrowLeft" || event.key === "ArrowRight") || !isRow.value && (event.key === "ArrowUp" || event.key === "ArrowDown");
2007
+ const secondary = isRow.value && (event.key === "ArrowUp" || event.key === "ArrowDown") || !isRow.value && (event.key === "ArrowLeft" || event.key === "ArrowRight");
2008
+ if (!primary && !secondary) {
2009
+ return;
2010
+ }
2011
+ event.preventDefault();
2012
+ let dir = event.key === "ArrowRight" || event.key === "ArrowDown" ? 1 : -1;
2013
+ if (isRow.value && isRtl() && (event.key === "ArrowLeft" || event.key === "ArrowRight")) {
2014
+ dir = -dir;
2015
+ }
2016
+ const nextModel = size.value + dir * stepValue.value;
2017
+ const nextPx = clampStartPx(toPx(nextModel, avail), avail);
2018
+ startPx.value = nextPx;
2019
+ commit(fromPx(nextPx, avail));
2020
+ }
2021
+ watch(
2022
+ () => props.modelValue,
2023
+ (value) => {
2024
+ if (isDragging.value) {
2025
+ return;
2026
+ }
2027
+ if (!valuesEqual(value, size.value)) {
2028
+ size.value = value;
2029
+ applyLayout(false);
2030
+ }
2031
+ }
2032
+ );
2033
+ watch(
2034
+ () => [props.unit, props.direction, props.min, props.max, props.minEnd, props.resizable],
2035
+ () => {
2036
+ if (!isDragging.value) {
2037
+ applyLayout(true);
2038
+ }
2039
+ }
2040
+ );
2041
+ onMounted(() => {
2042
+ applyLayout(false);
2043
+ resizeObserver = new ResizeObserver(() => {
2044
+ if (isDragging.value) {
2045
+ return;
2046
+ }
2047
+ applyLayout(true);
2048
+ });
2049
+ if (rootRef.value) {
2050
+ resizeObserver.observe(rootRef.value);
2051
+ }
2052
+ stopFocusLoss = listenFocusLoss(endDrag);
2053
+ });
2054
+ onBeforeUnmount(() => {
2055
+ endDrag();
2056
+ resizeObserver == null ? void 0 : resizeObserver.disconnect();
2057
+ resizeObserver = null;
2058
+ stopFocusLoss == null ? void 0 : stopFocusLoss();
2059
+ });
2060
+ return (_ctx, _cache) => {
2061
+ return openBlock(), createElementBlock("div", {
2062
+ ref_key: "rootRef",
2063
+ ref: rootRef,
2064
+ class: normalizeClass(["tao-split", [
2065
+ `tao-split--${__props.direction}`,
2066
+ {
2067
+ "tao-split--fixed": !__props.resizable,
2068
+ "tao-split--dragging": isDragging.value
2069
+ }
2070
+ ]]),
2071
+ style: normalizeStyle({ "--tao-split-start": `${startPx.value}px` })
2072
+ }, [
2073
+ createElementVNode("div", _hoisted_1$B, [
2074
+ renderSlot(_ctx.$slots, "start", {}, void 0, true)
2075
+ ]),
2076
+ createElementVNode("div", {
2077
+ ref_key: "handleRef",
2078
+ ref: handleRef,
2079
+ class: "tao-split__handle",
2080
+ role: "separator",
2081
+ "aria-orientation": ariaOrientation.value,
2082
+ "aria-valuemin": ariaValueMin.value,
2083
+ "aria-valuemax": ariaValueMax.value,
2084
+ "aria-valuenow": ariaValueNow.value,
2085
+ "aria-valuetext": ariaValueText.value,
2086
+ "aria-disabled": __props.resizable ? void 0 : true,
2087
+ tabindex: __props.resizable ? 0 : -1,
2088
+ onPointerdown: onPointerDown,
2089
+ onPointermove: onPointerMove,
2090
+ onPointerup: onPointerEnd,
2091
+ onPointercancel: onPointerEnd,
2092
+ onLostpointercapture: onLostPointerCapture,
2093
+ onKeydown,
2094
+ onDragstart: _cache[0] || (_cache[0] = withModifiers(() => {
2095
+ }, ["prevent"]))
2096
+ }, null, 40, _hoisted_2$x),
2097
+ createElementVNode("div", _hoisted_3$r, [
2098
+ renderSlot(_ctx.$slots, "end", {}, void 0, true)
2099
+ ]),
2100
+ isDragging.value ? (openBlock(), createElementBlock("div", _hoisted_4$n)) : createCommentVNode("", true)
2101
+ ], 6);
2102
+ };
2103
+ }
2104
+ });
2105
+ const TaoSplit = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-f44196dc"]]);
1693
2106
  const _hoisted_1$A = { class: "tao-icon" };
1694
2107
  const _sfc_main$D = /* @__PURE__ */ defineComponent({
1695
2108
  ...{ name: "TaoIcon" },
@@ -1782,6 +2195,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
1782
2195
  const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-75a40018"]]);
1783
2196
  const _hoisted_1$z = { class: "tao-image" };
1784
2197
  const _hoisted_2$w = ["src", "alt", "loading"];
2198
+ const _hoisted_3$q = { class: "tao-image__placeholder" };
1785
2199
  const _sfc_main$B = /* @__PURE__ */ defineComponent({
1786
2200
  ...{ name: "TaoImage" },
1787
2201
  __name: "TaoImage",
@@ -1789,27 +2203,32 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
1789
2203
  src: { default: "" },
1790
2204
  alt: { default: "" },
1791
2205
  pixelated: { type: Boolean, default: false },
1792
- lazy: { type: Boolean, default: false }
2206
+ lazy: { type: Boolean, default: false },
2207
+ placeholderText: { default: "No image available" }
1793
2208
  },
1794
2209
  emits: ["load", "error"],
1795
2210
  setup(__props, { emit: __emit }) {
1796
2211
  const props = __props;
1797
2212
  const emit = __emit;
1798
2213
  const isLoaded = ref(false);
2214
+ const hasError = ref(false);
1799
2215
  function handleLoad() {
1800
2216
  isLoaded.value = true;
2217
+ hasError.value = false;
1801
2218
  emit("load");
1802
2219
  }
1803
2220
  function handleError() {
1804
2221
  isLoaded.value = false;
2222
+ hasError.value = true;
1805
2223
  emit("error");
1806
2224
  }
1807
2225
  watch(() => props.src, () => {
1808
2226
  isLoaded.value = false;
2227
+ hasError.value = false;
1809
2228
  });
1810
2229
  return (_ctx, _cache) => {
1811
2230
  return openBlock(), createElementBlock("div", _hoisted_1$z, [
1812
- __props.src ? (openBlock(), createElementBlock("img", {
2231
+ __props.src && !hasError.value ? (openBlock(), createElementBlock("img", {
1813
2232
  key: 0,
1814
2233
  class: normalizeClass({ "tao-image__img--hidden": !isLoaded.value, "tao-image__img--pixelated": props.pixelated }),
1815
2234
  src: __props.src,
@@ -1819,21 +2238,22 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
1819
2238
  draggable: "false",
1820
2239
  onLoad: handleLoad,
1821
2240
  onError: handleError
1822
- }, null, 42, _hoisted_2$w)) : renderSlot(_ctx.$slots, "default", {}, () => [
1823
- _cache[0] || (_cache[0] = createElementVNode("div", { class: "tao-image__placeholder" }, "No image available", -1))
1824
- ], true, 1)
2241
+ }, null, 42, _hoisted_2$w)) : createCommentVNode("", true),
2242
+ !__props.src || hasError.value ? renderSlot(_ctx.$slots, "default", {}, () => [
2243
+ createElementVNode("div", _hoisted_3$q, toDisplayString(__props.placeholderText), 1)
2244
+ ], true, 1) : createCommentVNode("", true)
1825
2245
  ]);
1826
2246
  };
1827
2247
  }
1828
2248
  });
1829
- const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-522fe4da"]]);
2249
+ const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-aea39025"]]);
1830
2250
  const _hoisted_1$y = ["for"];
1831
2251
  const _hoisted_2$v = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
1832
2252
  const _hoisted_3$p = {
1833
2253
  key: 0,
1834
2254
  class: "tao-checkbox__label"
1835
2255
  };
1836
- const _hoisted_4$l = {
2256
+ const _hoisted_4$m = {
1837
2257
  key: 1,
1838
2258
  class: "tao-checkbox__label"
1839
2259
  };
@@ -1909,7 +2329,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
1909
2329
  onChange: onInputChange
1910
2330
  }, null, 40, _hoisted_2$v),
1911
2331
  _cache[0] || (_cache[0] = createElementVNode("span", { class: "tao-checkbox__box" }, null, -1)),
1912
- __props.label ? (openBlock(), createElementBlock("span", _hoisted_3$p, toDisplayString(__props.label), 1)) : (openBlock(), createElementBlock("span", _hoisted_4$l, [
2332
+ __props.label ? (openBlock(), createElementBlock("span", _hoisted_3$p, toDisplayString(__props.label), 1)) : (openBlock(), createElementBlock("span", _hoisted_4$m, [
1913
2333
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
1914
2334
  ])),
1915
2335
  renderSlot(_ctx.$slots, "post", { text: __props.label }, void 0, true)
@@ -1924,6 +2344,7 @@ const _hoisted_1$x = {
1924
2344
  };
1925
2345
  const _hoisted_2$u = { class: "tao-tag__text" };
1926
2346
  const _hoisted_3$o = ["aria-label"];
2347
+ const _hoisted_4$l = { "aria-hidden": "true" };
1927
2348
  const _sfc_main$z = /* @__PURE__ */ defineComponent({
1928
2349
  ...{ name: "TaoTag" },
1929
2350
  __name: "TaoTag",
@@ -1976,12 +2397,18 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
1976
2397
  class: "tao-tag__close",
1977
2398
  "aria-label": __props.closeLabel,
1978
2399
  onClick: withModifiers(onClose, ["stop"])
1979
- }, " ✕ ", 8, _hoisted_3$o)) : createCommentVNode("", true)
2400
+ }, [
2401
+ createElementVNode("span", _hoisted_4$l, [
2402
+ renderSlot(_ctx.$slots, "close-icon", {}, () => [
2403
+ _cache[0] || (_cache[0] = createTextVNode("✕", -1))
2404
+ ], true)
2405
+ ])
2406
+ ], 8, _hoisted_3$o)) : createCommentVNode("", true)
1980
2407
  ], 6);
1981
2408
  };
1982
2409
  }
1983
2410
  });
1984
- const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-5bd7ca79"]]);
2411
+ const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-f353f529"]]);
1985
2412
  const _hoisted_1$w = {
1986
2413
  key: 1,
1987
2414
  class: "tao-divider-text"
@@ -2218,7 +2645,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
2218
2645
  }
2219
2646
  });
2220
2647
  const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-2534c0c4"]]);
2221
- const _hoisted_1$t = ["tabindex"];
2648
+ const _hoisted_1$t = ["tabindex", "aria-label"];
2222
2649
  const _hoisted_2$q = { class: "tao-scroll-top__content" };
2223
2650
  const RIPPLE_DURATION = 750;
2224
2651
  const _sfc_main$u = /* @__PURE__ */ defineComponent({
@@ -2231,7 +2658,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
2231
2658
  zIndex: { default: 1e3 },
2232
2659
  boundary: { default: 300 },
2233
2660
  hasOutline: { type: Boolean, default: true },
2234
- tabindex: { default: 0 }
2661
+ tabindex: { default: 0 },
2662
+ ariaLabel: { default: "Наверх" }
2235
2663
  },
2236
2664
  setup(__props) {
2237
2665
  const props = __props;
@@ -2318,7 +2746,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
2318
2746
  style: normalizeStyle(mainStyle),
2319
2747
  tabindex: props.tabindex,
2320
2748
  class: normalizeClass(["tao-scroll-top", { "tao-scroll-top--no-outline": !props.hasOutline }]),
2321
- "aria-label": "Наверх",
2749
+ "aria-label": props.ariaLabel,
2322
2750
  onClick: withModifiers(onClick, ["prevent"])
2323
2751
  }, [
2324
2752
  createElementVNode("div", _hoisted_2$q, [
@@ -2345,7 +2773,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
2345
2773
  };
2346
2774
  }
2347
2775
  });
2348
- const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-ce902f42"]]);
2776
+ const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-59678649"]]);
2349
2777
  const _hoisted_1$s = { class: "tao-progress" };
2350
2778
  const _hoisted_2$p = {
2351
2779
  key: 0,
@@ -2356,11 +2784,11 @@ const _hoisted_4$j = {
2356
2784
  key: 0,
2357
2785
  class: "tao-progress__percentage"
2358
2786
  };
2359
- const _hoisted_5$e = {
2787
+ const _hoisted_5$f = {
2360
2788
  key: 1,
2361
2789
  class: "tao-progress__side"
2362
2790
  };
2363
- const _hoisted_6$b = {
2791
+ const _hoisted_6$c = {
2364
2792
  key: 0,
2365
2793
  class: "tao-progress__percentage"
2366
2794
  };
@@ -2415,9 +2843,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
2415
2843
  }, null, 6)
2416
2844
  ], 4)
2417
2845
  ]),
2418
- _ctx.$slots.right || showEndPercent.value ? (openBlock(), createElementBlock("div", _hoisted_5$e, [
2846
+ _ctx.$slots.right || showEndPercent.value ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
2419
2847
  renderSlot(_ctx.$slots, "right", {}, void 0, true),
2420
- showEndPercent.value ? (openBlock(), createElementBlock("span", _hoisted_6$b, toDisplayString(endPercentLabel.value), 1)) : createCommentVNode("", true)
2848
+ showEndPercent.value ? (openBlock(), createElementBlock("span", _hoisted_6$c, toDisplayString(endPercentLabel.value), 1)) : createCommentVNode("", true)
2421
2849
  ])) : createCommentVNode("", true)
2422
2850
  ], 6)
2423
2851
  ]);
@@ -2662,14 +3090,17 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
2662
3090
  const TaoSlider = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-24a38782"]]);
2663
3091
  const _hoisted_1$q = { class: "tao-file-drop" };
2664
3092
  const _hoisted_2$n = { class: "tao-file-drop__row" };
2665
- const _hoisted_3$j = ["accept", "multiple"];
2666
- const _hoisted_4$i = {
3093
+ const _hoisted_3$j = ["aria-label"];
3094
+ const _hoisted_4$i = { "aria-hidden": "true" };
3095
+ const _hoisted_5$e = ["accept", "multiple"];
3096
+ const _hoisted_6$b = {
2667
3097
  key: 0,
2668
3098
  class: "tao-file-drop__list"
2669
3099
  };
2670
- const _hoisted_5$d = { class: "tao-file-drop__name" };
2671
- const _hoisted_6$a = { class: "tao-file-drop__meta" };
2672
- const _hoisted_7$8 = ["aria-label", "onClick"];
3100
+ const _hoisted_7$a = { class: "tao-file-drop__name" };
3101
+ const _hoisted_8$9 = { class: "tao-file-drop__meta" };
3102
+ const _hoisted_9$4 = ["aria-label", "onClick"];
3103
+ const _hoisted_10$4 = { "aria-hidden": "true" };
2673
3104
  const _sfc_main$r = /* @__PURE__ */ defineComponent({
2674
3105
  ...{ name: "TaoFileDrop" },
2675
3106
  __name: "TaoFileDrop",
@@ -2679,6 +3110,9 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2679
3110
  accept: { default: "*" },
2680
3111
  multiple: { type: Boolean, default: false },
2681
3112
  showClear: { type: Boolean, default: false },
3113
+ clearLabel: { default: "Очистить файлы" },
3114
+ removeLabel: { default: "Убрать «{name}»" },
3115
+ formatSize: {},
2682
3116
  list: { type: Boolean, default: true }
2683
3117
  },
2684
3118
  emits: ["update:modelValue", "files", "clear-request"],
@@ -2690,6 +3124,28 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2690
3124
  function sameFile(a, b) {
2691
3125
  return a.name === b.name && a.size === b.size && a.lastModified === b.lastModified;
2692
3126
  }
3127
+ function acceptTokens(accept) {
3128
+ return accept.split(",").map((token) => token.trim().toLowerCase()).filter(Boolean);
3129
+ }
3130
+ function fileMatchesAccept(file, accept) {
3131
+ const tokens = acceptTokens(accept);
3132
+ if (!tokens.length || tokens.includes("*") || tokens.includes("*/*")) {
3133
+ return true;
3134
+ }
3135
+ const name = file.name.toLowerCase();
3136
+ const mime = (file.type || "").toLowerCase();
3137
+ const dot = name.lastIndexOf(".");
3138
+ const ext = dot >= 0 ? name.slice(dot) : "";
3139
+ return tokens.some((token) => {
3140
+ if (token.startsWith(".")) {
3141
+ return ext === token;
3142
+ }
3143
+ if (token.endsWith("/*")) {
3144
+ return mime.startsWith(token.slice(0, -1));
3145
+ }
3146
+ return mime === token;
3147
+ });
3148
+ }
2693
3149
  function commit(files) {
2694
3150
  emit("update:modelValue", files);
2695
3151
  emit("files", files);
@@ -2722,9 +3178,17 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2722
3178
  function removeAt(index) {
2723
3179
  commit(props.modelValue.filter((_, item) => item !== index));
2724
3180
  }
3181
+ function resetInput() {
3182
+ const el = fileInput.value;
3183
+ if (el) {
3184
+ el.type = "text";
3185
+ el.type = "file";
3186
+ }
3187
+ }
2725
3188
  function processFiles(fileList) {
2726
- const incoming = Array.from(fileList);
3189
+ const incoming = Array.from(fileList).filter((file) => fileMatchesAccept(file, props.accept));
2727
3190
  if (!incoming.length) {
3191
+ resetInput();
2728
3192
  return;
2729
3193
  }
2730
3194
  let result;
@@ -2739,13 +3203,9 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2739
3203
  }
2740
3204
  }
2741
3205
  commit(result);
2742
- const el = fileInput.value;
2743
- if (el) {
2744
- el.type = "text";
2745
- el.type = "file";
2746
- }
3206
+ resetInput();
2747
3207
  }
2748
- function formatSize(bytes) {
3208
+ function defaultFormatSize(bytes) {
2749
3209
  if (bytes < 1024) {
2750
3210
  return `${bytes} Б`;
2751
3211
  }
@@ -2758,6 +3218,9 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2758
3218
  const value = mb < 10 ? mb.toFixed(1) : String(Math.round(mb));
2759
3219
  return `${value.replace(".", ",")} МБ`;
2760
3220
  }
3221
+ function sizeLabel(bytes) {
3222
+ return props.formatSize ? props.formatSize(bytes) : defaultFormatSize(bytes);
3223
+ }
2761
3224
  function fileKey(file, index) {
2762
3225
  return `${file.name}-${file.size}-${file.lastModified}-${index}`;
2763
3226
  }
@@ -2775,9 +3238,15 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2775
3238
  key: 0,
2776
3239
  type: "button",
2777
3240
  class: "tao-file-drop__clear",
2778
- "aria-label": "Очистить файлы",
3241
+ "aria-label": __props.clearLabel,
2779
3242
  onClick: requestClear
2780
- }, " ✕ ")) : createCommentVNode("", true),
3243
+ }, [
3244
+ createElementVNode("span", _hoisted_4$i, [
3245
+ renderSlot(_ctx.$slots, "clear-icon", {}, () => [
3246
+ _cache[1] || (_cache[1] = createTextVNode("✕", -1))
3247
+ ], true)
3248
+ ])
3249
+ ], 8, _hoisted_3$j)) : createCommentVNode("", true),
2781
3250
  createElementVNode("label", {
2782
3251
  class: normalizeClass(["tao-file-drop__zone", [`tao-file-drop__zone--${__props.size}`, { "tao-file-drop__zone--dragging": isDragging.value }]]),
2783
3252
  onDragover: handleDragOver,
@@ -2785,7 +3254,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2785
3254
  onDrop: handleDrop
2786
3255
  }, [
2787
3256
  renderSlot(_ctx.$slots, "default", {}, () => [
2788
- _cache[1] || (_cache[1] = createTextVNode("Перетащите файл сюда или нажмите, чтобы выбрать", -1))
3257
+ _cache[2] || (_cache[2] = createTextVNode("Перетащите файл сюда или нажмите, чтобы выбрать", -1))
2789
3258
  ], true),
2790
3259
  createElementVNode("input", {
2791
3260
  ref_key: "fileInput",
@@ -2797,23 +3266,29 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2797
3266
  onChange: handleFileSelect,
2798
3267
  onClick: _cache[0] || (_cache[0] = withModifiers(() => {
2799
3268
  }, ["stop"]))
2800
- }, null, 40, _hoisted_3$j)
3269
+ }, null, 40, _hoisted_5$e)
2801
3270
  ], 34)
2802
3271
  ]),
2803
- __props.list && __props.modelValue.length ? (openBlock(), createElementBlock("ul", _hoisted_4$i, [
3272
+ __props.list && __props.modelValue.length ? (openBlock(), createElementBlock("ul", _hoisted_6$b, [
2804
3273
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.modelValue, (file, index) => {
2805
3274
  return openBlock(), createElementBlock("li", {
2806
3275
  key: fileKey(file, index),
2807
3276
  class: "tao-file-drop__file"
2808
3277
  }, [
2809
- createElementVNode("span", _hoisted_5$d, toDisplayString(file.name), 1),
2810
- createElementVNode("span", _hoisted_6$a, toDisplayString(formatSize(file.size)), 1),
3278
+ createElementVNode("span", _hoisted_7$a, toDisplayString(file.name), 1),
3279
+ createElementVNode("span", _hoisted_8$9, toDisplayString(sizeLabel(file.size)), 1),
2811
3280
  createElementVNode("button", {
2812
3281
  type: "button",
2813
3282
  class: "tao-file-drop__remove",
2814
- "aria-label": `Убрать «${file.name}»`,
3283
+ "aria-label": __props.removeLabel.replace("{name}", file.name),
2815
3284
  onClick: ($event) => removeAt(index)
2816
- }, " ✕ ", 8, _hoisted_7$8)
3285
+ }, [
3286
+ createElementVNode("span", _hoisted_10$4, [
3287
+ renderSlot(_ctx.$slots, "remove-icon", {}, () => [
3288
+ _cache[3] || (_cache[3] = createTextVNode("✕", -1))
3289
+ ], true)
3290
+ ])
3291
+ ], 8, _hoisted_9$4)
2817
3292
  ]);
2818
3293
  }), 128))
2819
3294
  ])) : createCommentVNode("", true)
@@ -2821,11 +3296,11 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
2821
3296
  };
2822
3297
  }
2823
3298
  });
2824
- const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-f97c4e91"]]);
2825
- const _hoisted_1$p = ["aria-expanded"];
3299
+ const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-4b36e2a3"]]);
3300
+ const _hoisted_1$p = ["aria-expanded", "aria-label"];
2826
3301
  const _hoisted_2$m = {
2827
3302
  key: 1,
2828
- "aria-label": "Меню"
3303
+ "aria-hidden": "true"
2829
3304
  };
2830
3305
  const _hoisted_3$i = ["onClick", "onMouseenter"];
2831
3306
  const _hoisted_4$h = { key: 1 };
@@ -2833,7 +3308,8 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
2833
3308
  ...{ name: "TaoDropdownMenu" },
2834
3309
  __name: "TaoDropdownMenu",
2835
3310
  props: {
2836
- actions: { default: () => [] }
3311
+ actions: { default: () => [] },
3312
+ menuLabel: { default: "Меню" }
2837
3313
  },
2838
3314
  emits: ["selected"],
2839
3315
  setup(__props, { emit: __emit }) {
@@ -2962,9 +3438,14 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
2962
3438
  class: "tao-dropdown-menu__button",
2963
3439
  "aria-haspopup": "menu",
2964
3440
  "aria-expanded": isOpen.value,
3441
+ "aria-label": _ctx.$slots.button ? void 0 : __props.menuLabel,
2965
3442
  onClick: toggleMenu
2966
3443
  }, [
2967
- _ctx.$slots.button ? renderSlot(_ctx.$slots, "button", {}, void 0, true, 0) : (openBlock(), createElementBlock("span", _hoisted_2$m, "⋮"))
3444
+ _ctx.$slots.button ? renderSlot(_ctx.$slots, "button", {}, void 0, true, 0) : (openBlock(), createElementBlock("span", _hoisted_2$m, [
3445
+ renderSlot(_ctx.$slots, "icon", {}, () => [
3446
+ _cache[0] || (_cache[0] = createTextVNode("⋮", -1))
3447
+ ], true)
3448
+ ]))
2968
3449
  ], 8, _hoisted_1$p),
2969
3450
  (openBlock(), createBlock(Teleport, { to: "body" }, [
2970
3451
  isOpen.value ? (openBlock(), createElementBlock("div", {
@@ -2999,9 +3480,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
2999
3480
  };
3000
3481
  }
3001
3482
  });
3002
- const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-420a7e63"]]);
3483
+ const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-4750fe54"]]);
3003
3484
  const _hoisted_1$o = ["aria-invalid", "aria-describedby"];
3004
- const _hoisted_2$l = ["id", "value", "placeholder", "type", "inputmode", "pattern", "onInput", "onKeydown", "onFocus"];
3485
+ const _hoisted_2$l = ["id", "value", "placeholder", "type", "inputmode", "pattern", "maxlength", "onInput", "onPaste", "onKeydown", "onFocus"];
3005
3486
  const _sfc_main$p = /* @__PURE__ */ defineComponent({
3006
3487
  ...{ name: "TaoPinCode" },
3007
3488
  __name: "TaoPinCode",
@@ -3059,11 +3540,43 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
3059
3540
  function isFilled() {
3060
3541
  return numbers.value.length === props.length && numbers.value.every((cell) => cell !== "");
3061
3542
  }
3543
+ function applyChars(index, raw) {
3544
+ var _a;
3545
+ const chars = [...raw].map((ch) => acceptChar(ch)).filter(Boolean);
3546
+ if (!chars.length) {
3547
+ return;
3548
+ }
3549
+ numbers.value = [...numbers.value];
3550
+ let cursor = index;
3551
+ for (const ch of chars) {
3552
+ if (cursor >= props.length) {
3553
+ break;
3554
+ }
3555
+ numbers.value[cursor] = ch;
3556
+ cursor += 1;
3557
+ }
3558
+ emitChange();
3559
+ if (isFilled()) {
3560
+ (_a = inputRefs.value[index]) == null ? void 0 : _a.blur();
3561
+ emit("complete", serialize());
3562
+ return;
3563
+ }
3564
+ if (cursor < props.length) {
3565
+ focusCell(cursor);
3566
+ }
3567
+ }
3062
3568
  function mutation(v, index) {
3063
3569
  var _a;
3064
- const char = v.length > 1 ? v[v.length - 1] ?? "" : v;
3065
- const next = acceptChar(char);
3066
- if (props.numbersOnly && char && !next) {
3570
+ if (v.length > 1) {
3571
+ applyChars(index, v);
3572
+ return;
3573
+ }
3574
+ const next = acceptChar(v);
3575
+ if (props.numbersOnly && v && !next) {
3576
+ const el = inputRefs.value[index];
3577
+ if (el) {
3578
+ el.value = numbers.value[index] ?? "";
3579
+ }
3067
3580
  return;
3068
3581
  }
3069
3582
  numbers.value = [...numbers.value];
@@ -3083,6 +3596,15 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
3083
3596
  focusCell(target);
3084
3597
  }
3085
3598
  }
3599
+ function onPaste(event, index) {
3600
+ var _a;
3601
+ const text = ((_a = event.clipboardData) == null ? void 0 : _a.getData("text")) ?? "";
3602
+ if (!text) {
3603
+ return;
3604
+ }
3605
+ event.preventDefault();
3606
+ applyChars(index, text);
3607
+ }
3086
3608
  function onFocus(index) {
3087
3609
  if (props.clearOn === "input") {
3088
3610
  const firstEmpty = firstEmptyIndex();
@@ -3164,8 +3686,9 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
3164
3686
  inputmode: __props.numbersOnly ? "numeric" : "text",
3165
3687
  pattern: __props.numbersOnly ? "[0-9]" : void 0,
3166
3688
  autocomplete: "one-time-code",
3167
- maxlength: "1",
3689
+ maxlength: index === 0 ? __props.length : 1,
3168
3690
  onInput: ($event) => onChange($event, index),
3691
+ onPaste: ($event) => onPaste($event, index),
3169
3692
  onKeydown: ($event) => onKeydown($event, index),
3170
3693
  onFocus: ($event) => onFocus(index),
3171
3694
  onBlur
@@ -3175,7 +3698,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
3175
3698
  };
3176
3699
  }
3177
3700
  });
3178
- const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-c3182673"]]);
3701
+ const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-44474500"]]);
3179
3702
  const _sfc_main$o = /* @__PURE__ */ defineComponent({
3180
3703
  ...{ name: "TaoLink" },
3181
3704
  __name: "TaoLink",
@@ -3232,6 +3755,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3232
3755
  const id = useId();
3233
3756
  const hintId = `${id}-hint`;
3234
3757
  const errorId = `${id}-error`;
3758
+ const labelId = `${id}-label`;
3235
3759
  const invalid = computed(() => Boolean(props.error));
3236
3760
  const describedBy = computed(() => {
3237
3761
  if (props.error) {
@@ -3247,14 +3771,27 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3247
3771
  invalid,
3248
3772
  describedBy
3249
3773
  });
3774
+ function onLabelClick() {
3775
+ var _a, _b;
3776
+ const target = document.getElementById(id);
3777
+ if (target instanceof HTMLInputElement || target instanceof HTMLButtonElement || target instanceof HTMLSelectElement || target instanceof HTMLTextAreaElement) {
3778
+ return;
3779
+ }
3780
+ const scope = target ?? ((_a = document.getElementById(labelId)) == null ? void 0 : _a.parentElement);
3781
+ (_b = scope == null ? void 0 : scope.querySelector(
3782
+ "input:not([disabled]), button:not([disabled]), textarea:not([disabled]), select:not([disabled])"
3783
+ )) == null ? void 0 : _b.focus();
3784
+ }
3250
3785
  return (_ctx, _cache) => {
3251
3786
  return openBlock(), createElementBlock("div", {
3252
3787
  class: normalizeClass(["tao-form-field", { "tao-form-field--invalid": invalid.value }])
3253
3788
  }, [
3254
3789
  __props.label ? (openBlock(), createElementBlock("label", {
3255
3790
  key: 0,
3791
+ id: labelId,
3256
3792
  class: "tao-form-field__label",
3257
- for: unref(id)
3793
+ for: unref(id),
3794
+ onClick: onLabelClick
3258
3795
  }, toDisplayString(__props.label), 9, _hoisted_1$n)) : createCommentVNode("", true),
3259
3796
  renderSlot(_ctx.$slots, "default", {}, void 0, true),
3260
3797
  __props.error ? (openBlock(), createElementBlock("p", {
@@ -3270,7 +3807,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
3270
3807
  };
3271
3808
  }
3272
3809
  });
3273
- const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-11324f0c"]]);
3810
+ const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-edd0be31"]]);
3274
3811
  const _hoisted_1$m = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
3275
3812
  const _hoisted_2$k = { class: "tao-select__value" };
3276
3813
  const _hoisted_3$h = ["aria-activedescendant"];
@@ -3283,7 +3820,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
3283
3820
  options: { default: () => [] },
3284
3821
  placeholder: { default: "Выберите" },
3285
3822
  disabled: { type: Boolean, default: false },
3286
- error: { type: Boolean, default: false }
3823
+ error: { type: Boolean, default: false },
3824
+ clearText: { default: "Очистить" }
3287
3825
  },
3288
3826
  emits: ["update:modelValue", "change"],
3289
3827
  setup(__props, { emit: __emit }) {
@@ -3313,12 +3851,16 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
3313
3851
  }
3314
3852
  const rect = trigger.getBoundingClientRect();
3315
3853
  const panelHeight = panel.offsetHeight;
3854
+ const panelWidth = panel.offsetWidth || rect.width;
3316
3855
  const gap = 4;
3856
+ const pad = 8;
3317
3857
  const spaceBelow = window.innerHeight - rect.bottom - gap;
3318
3858
  const openUp = spaceBelow < panelHeight && rect.top > spaceBelow;
3859
+ const maxLeft = Math.max(pad, window.innerWidth - panelWidth - pad);
3860
+ const left = Math.min(Math.max(rect.left, pad), maxLeft);
3319
3861
  listStyle.value = {
3320
3862
  top: `${openUp ? rect.top - panelHeight - gap : rect.bottom + gap}px`,
3321
- left: `${rect.left}px`,
3863
+ left: `${left}px`,
3322
3864
  width: `${rect.width}px`
3323
3865
  };
3324
3866
  }
@@ -3332,7 +3874,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
3332
3874
  return;
3333
3875
  }
3334
3876
  const selectedIndex = props.options.findIndex((option) => option.value === props.modelValue);
3335
- activeIndex.value = selectedIndex >= 0 ? selectedIndex : enabledIndexes.value[0] ?? -1;
3877
+ activeIndex.value = selectedIndex >= 0 && enabledIndexes.value.includes(selectedIndex) ? selectedIndex : enabledIndexes.value[0] ?? -1;
3336
3878
  await nextTick();
3337
3879
  updatePosition();
3338
3880
  (_a = listRef.value) == null ? void 0 : _a.focus();
@@ -3489,10 +4031,12 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
3489
4031
  onKeydown: onTriggerKeydown
3490
4032
  }, [
3491
4033
  createElementVNode("span", _hoisted_2$k, toDisplayString(((_a = selected.value) == null ? void 0 : _a.label) ?? __props.placeholder), 1),
3492
- _cache[2] || (_cache[2] = createElementVNode("span", {
3493
- class: "tao-select__chevron",
4034
+ createElementVNode("span", {
4035
+ class: normalizeClass(["tao-select__chevron", { "tao-select__chevron--custom": _ctx.$slots.chevron }]),
3494
4036
  "aria-hidden": "true"
3495
- }, null, -1))
4037
+ }, [
4038
+ renderSlot(_ctx.$slots, "chevron", {}, void 0, true)
4039
+ ], 2)
3496
4040
  ], 42, _hoisted_1$m),
3497
4041
  (openBlock(), createBlock(Teleport, { to: "body" }, [
3498
4042
  open.value ? (openBlock(), createElementBlock("div", {
@@ -3539,14 +4083,18 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
3539
4083
  onMousedown: _cache[1] || (_cache[1] = withModifiers(() => {
3540
4084
  }, ["prevent"])),
3541
4085
  onClick: clear
3542
- }, " Очистить ", 32)) : createCommentVNode("", true)
4086
+ }, [
4087
+ renderSlot(_ctx.$slots, "clear", {}, () => [
4088
+ createTextVNode(toDisplayString(__props.clearText), 1)
4089
+ ], true)
4090
+ ], 32)) : createCommentVNode("", true)
3543
4091
  ], 4)) : createCommentVNode("", true)
3544
4092
  ]))
3545
4093
  ], 2);
3546
4094
  };
3547
4095
  }
3548
4096
  });
3549
- const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-42551757"]]);
4097
+ const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-d9b336d8"]]);
3550
4098
  const _hoisted_1$l = ["id", "aria-expanded", "aria-activedescendant", "aria-invalid", "aria-describedby", "disabled", "placeholder", "value"];
3551
4099
  const _hoisted_2$j = {
3552
4100
  key: 0,
@@ -3562,6 +4110,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
3562
4110
  placeholder: { default: "Начните вводить" },
3563
4111
  disabled: { type: Boolean, default: false },
3564
4112
  error: { type: Boolean, default: false },
4113
+ emptyText: { default: "Ничего не найдено" },
4114
+ clearText: { default: "Очистить" },
3565
4115
  allowCreate: { type: Boolean, default: false }
3566
4116
  },
3567
4117
  emits: ["update:modelValue", "change", "create"],
@@ -3632,12 +4182,16 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
3632
4182
  }
3633
4183
  const rect = trigger.getBoundingClientRect();
3634
4184
  const panelHeight = panel.offsetHeight;
4185
+ const panelWidth = panel.offsetWidth || rect.width;
3635
4186
  const gap = 4;
4187
+ const pad = 8;
3636
4188
  const spaceBelow = window.innerHeight - rect.bottom - gap;
3637
4189
  const openUp = spaceBelow < panelHeight && rect.top > spaceBelow;
4190
+ const maxLeft = Math.max(pad, window.innerWidth - panelWidth - pad);
4191
+ const left = Math.min(Math.max(rect.left, pad), maxLeft);
3638
4192
  listStyle.value = {
3639
4193
  top: `${openUp ? rect.top - panelHeight - gap : rect.bottom + gap}px`,
3640
- left: `${rect.left}px`,
4194
+ left: `${left}px`,
3641
4195
  width: `${rect.width}px`
3642
4196
  };
3643
4197
  }
@@ -3704,6 +4258,13 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
3704
4258
  }
3705
4259
  commitCreated(value);
3706
4260
  }
4261
+ function clear() {
4262
+ var _a;
4263
+ emitValue(null);
4264
+ query.value = "";
4265
+ open.value = false;
4266
+ (_a = inputRef.value) == null ? void 0 : _a.focus();
4267
+ }
3707
4268
  function revertQuery() {
3708
4269
  syncQueryFromModel();
3709
4270
  }
@@ -3962,10 +4523,12 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
3962
4523
  onBlur,
3963
4524
  onKeydown: onInputKeydown
3964
4525
  }, null, 40, _hoisted_1$l),
3965
- _cache[1] || (_cache[1] = createElementVNode("span", {
3966
- class: "tao-combobox__chevron",
4526
+ createElementVNode("span", {
4527
+ class: normalizeClass(["tao-combobox__chevron", { "tao-combobox__chevron--custom": _ctx.$slots.chevron }]),
3967
4528
  "aria-hidden": "true"
3968
- }, null, -1))
4529
+ }, [
4530
+ renderSlot(_ctx.$slots, "chevron", {}, void 0, true)
4531
+ ], 2)
3969
4532
  ], 544),
3970
4533
  (openBlock(), createBlock(Teleport, { to: "body" }, [
3971
4534
  open.value ? (openBlock(), createElementBlock("div", {
@@ -3982,7 +4545,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
3982
4545
  class: "tao-combobox__list",
3983
4546
  role: "listbox"
3984
4547
  }, [
3985
- !rows.value.length ? (openBlock(), createElementBlock("li", _hoisted_2$j, "Ничего не найдено")) : createCommentVNode("", true),
4548
+ !rows.value.length ? (openBlock(), createElementBlock("li", _hoisted_2$j, [
4549
+ renderSlot(_ctx.$slots, "empty", {}, () => [
4550
+ createTextVNode(toDisplayString(__props.emptyText), 1)
4551
+ ], true)
4552
+ ])) : createCommentVNode("", true),
3986
4553
  (openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row, index) => {
3987
4554
  return openBlock(), createElementBlock("li", {
3988
4555
  id: `${listId}-row-${index}`,
@@ -4001,9 +4568,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
4001
4568
  onClick: ($event) => activateRow(row),
4002
4569
  onMouseenter: ($event) => !(row.kind === "option" && row.option.disabled) && (activeIndex.value = index)
4003
4570
  }, [
4004
- row.kind === "create" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
4571
+ row.kind === "create" ? renderSlot(_ctx.$slots, "create", {
4572
+ text: row.text
4573
+ }, () => [
4005
4574
  createTextVNode("Добавить «" + toDisplayString(row.text) + "»", 1)
4006
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
4575
+ ], true, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
4007
4576
  createTextVNode(toDisplayString(row.option.label), 1)
4008
4577
  ], 64))
4009
4578
  ], 42, _hoisted_3$g);
@@ -4013,15 +4582,20 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
4013
4582
  key: 0,
4014
4583
  type: "button",
4015
4584
  class: "tao-combobox__clear",
4016
- onMousedown: withModifiers(markPicking, ["prevent"])
4017
- }, " Очистить ", 32)) : createCommentVNode("", true)
4585
+ onMousedown: withModifiers(markPicking, ["prevent"]),
4586
+ onClick: clear
4587
+ }, [
4588
+ renderSlot(_ctx.$slots, "clear", {}, () => [
4589
+ createTextVNode(toDisplayString(__props.clearText), 1)
4590
+ ], true)
4591
+ ], 32)) : createCommentVNode("", true)
4018
4592
  ], 4)) : createCommentVNode("", true)
4019
4593
  ]))
4020
4594
  ], 2);
4021
4595
  };
4022
4596
  }
4023
4597
  });
4024
- const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-60be67d0"]]);
4598
+ const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-131d254d"]]);
4025
4599
  const ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
4026
4600
  function formatTaoDateIso(parts) {
4027
4601
  return `${String(parts.y).padStart(4, "0")}-${String(parts.m).padStart(2, "0")}-${String(parts.d).padStart(2, "0")}`;
@@ -4060,8 +4634,23 @@ function shiftTaoMonth(iso, months) {
4060
4634
  if (!parts) {
4061
4635
  return iso;
4062
4636
  }
4063
- const date = new Date(parts.y, parts.m - 1 + months, parts.d);
4064
- return formatTaoDateIso({ y: date.getFullYear(), m: date.getMonth() + 1, d: date.getDate() });
4637
+ const monthStart = new Date(parts.y, parts.m - 1 + months, 1);
4638
+ const y = monthStart.getFullYear();
4639
+ const m = monthStart.getMonth() + 1;
4640
+ const lastDay = new Date(y, m, 0).getDate();
4641
+ return formatTaoDateIso({ y, m, d: Math.min(parts.d, lastDay) });
4642
+ }
4643
+ function clampTaoDateCursor(iso, min, max) {
4644
+ if (isTaoDateInRange(iso, min, max)) {
4645
+ return iso;
4646
+ }
4647
+ if (min && parseTaoDate(min) && iso < min) {
4648
+ return min;
4649
+ }
4650
+ if (max && parseTaoDate(max) && iso > max) {
4651
+ return max;
4652
+ }
4653
+ return iso;
4065
4654
  }
4066
4655
  function isTaoDateInRange(iso, min, max) {
4067
4656
  if (!parseTaoDate(iso)) {
@@ -4151,20 +4740,28 @@ function buildTaoDateGrid(year, month) {
4151
4740
  }
4152
4741
  const _hoisted_1$k = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
4153
4742
  const _hoisted_2$i = { class: "tao-date__value" };
4154
- const _hoisted_3$f = ["aria-label"];
4155
- const _hoisted_4$f = { class: "tao-date__header" };
4156
- const _hoisted_5$c = { class: "tao-date__month" };
4157
- const _hoisted_6$9 = {
4743
+ const _hoisted_3$f = {
4744
+ class: "tao-date__icon",
4745
+ "aria-hidden": "true"
4746
+ };
4747
+ const _hoisted_4$f = ["aria-label"];
4748
+ const _hoisted_5$d = { class: "tao-date__header" };
4749
+ const _hoisted_6$a = ["aria-label"];
4750
+ const _hoisted_7$9 = { "aria-hidden": "true" };
4751
+ const _hoisted_8$8 = { class: "tao-date__month" };
4752
+ const _hoisted_9$3 = ["aria-label"];
4753
+ const _hoisted_10$3 = { "aria-hidden": "true" };
4754
+ const _hoisted_11$2 = {
4158
4755
  class: "tao-date__weekdays",
4159
4756
  "aria-hidden": "true"
4160
4757
  };
4161
- const _hoisted_7$7 = {
4758
+ const _hoisted_12$1 = {
4162
4759
  class: "tao-date__grid",
4163
4760
  role: "grid"
4164
4761
  };
4165
- const _hoisted_8$6 = ["aria-label", "aria-selected", "disabled", "onClick"];
4166
- const _hoisted_9$2 = { class: "tao-date__footer" };
4167
- const _hoisted_10$1 = ["disabled"];
4762
+ const _hoisted_13$1 = ["aria-label", "aria-selected", "disabled", "onClick"];
4763
+ const _hoisted_14$1 = { class: "tao-date__footer" };
4764
+ const _hoisted_15 = ["disabled"];
4168
4765
  const _sfc_main$k = /* @__PURE__ */ defineComponent({
4169
4766
  ...{ name: "TaoDate" },
4170
4767
  __name: "TaoDate",
@@ -4175,7 +4772,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
4175
4772
  error: { type: Boolean, default: false },
4176
4773
  min: { default: void 0 },
4177
4774
  max: { default: void 0 },
4178
- locale: { default: "ru-RU" }
4775
+ locale: { default: "ru-RU" },
4776
+ todayText: { default: "Сегодня" },
4777
+ clearText: { default: "Очистить" },
4778
+ prevMonthLabel: { default: "Предыдущий месяц" },
4779
+ nextMonthLabel: { default: "Следующий месяц" }
4179
4780
  },
4180
4781
  emits: ["update:modelValue", "change"],
4181
4782
  setup(__props, { emit: __emit }) {
@@ -4240,7 +4841,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
4240
4841
  if (!next) {
4241
4842
  return;
4242
4843
  }
4243
- syncViewFrom(valueIso.value ?? todayIso.value);
4844
+ syncViewFrom(clampTaoDateCursor(valueIso.value ?? todayIso.value, props.min, props.max));
4244
4845
  await nextTick();
4245
4846
  updatePosition();
4246
4847
  (_a = panelRef.value) == null ? void 0 : _a.focus();
@@ -4269,18 +4870,13 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
4269
4870
  (_a = triggerRef.value) == null ? void 0 : _a.focus();
4270
4871
  }
4271
4872
  function goMonth(delta) {
4272
- const next = shiftTaoMonth(`${viewYear.value}-${String(viewMonth.value).padStart(2, "0")}-01`, delta);
4273
- const parts = parseTaoDate(next);
4274
- if (!parts) {
4275
- return;
4276
- }
4277
- viewYear.value = parts.y;
4278
- viewMonth.value = parts.m;
4279
- cursorIso.value = shiftTaoMonth(cursorIso.value, delta);
4873
+ cursorIso.value = clampTaoDateCursor(shiftTaoMonth(cursorIso.value, delta), props.min, props.max);
4874
+ syncViewFrom(cursorIso.value);
4280
4875
  void nextTick(updatePosition);
4281
4876
  }
4282
4877
  function moveCursor(days) {
4283
- cursorIso.value = shiftTaoDate(cursorIso.value, days);
4878
+ const next = shiftTaoDate(cursorIso.value, days);
4879
+ cursorIso.value = isTaoDateInRange(next, props.min, props.max) ? next : clampTaoDateCursor(next, props.min, props.max);
4284
4880
  syncViewFrom(cursorIso.value);
4285
4881
  void nextTick(updatePosition);
4286
4882
  }
@@ -4396,32 +4992,34 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
4396
4992
  onKeydown: onTriggerKeydown
4397
4993
  }, [
4398
4994
  createElementVNode("span", _hoisted_2$i, toDisplayString(displayLabel.value || __props.placeholder), 1),
4399
- _cache[4] || (_cache[4] = createElementVNode("svg", {
4400
- class: "tao-date__icon",
4401
- viewBox: "0 0 16 16",
4402
- width: "16",
4403
- height: "16",
4404
- "aria-hidden": "true",
4405
- focusable: "false"
4406
- }, [
4407
- createElementVNode("rect", {
4408
- x: "2",
4409
- y: "3",
4410
- width: "12",
4411
- height: "11",
4412
- rx: "1.5",
4413
- fill: "none",
4414
- stroke: "currentColor",
4415
- "stroke-width": "1.4"
4416
- }),
4417
- createElementVNode("path", {
4418
- d: "M5 1.5v3M11 1.5v3M2 6.5h12",
4419
- fill: "none",
4420
- stroke: "currentColor",
4421
- "stroke-width": "1.4",
4422
- "stroke-linecap": "round"
4423
- })
4424
- ], -1))
4995
+ createElementVNode("span", _hoisted_3$f, [
4996
+ renderSlot(_ctx.$slots, "icon", {}, () => [
4997
+ _cache[4] || (_cache[4] = createElementVNode("svg", {
4998
+ viewBox: "0 0 16 16",
4999
+ width: "16",
5000
+ height: "16",
5001
+ focusable: "false"
5002
+ }, [
5003
+ createElementVNode("rect", {
5004
+ x: "2",
5005
+ y: "3",
5006
+ width: "12",
5007
+ height: "11",
5008
+ rx: "1.5",
5009
+ fill: "none",
5010
+ stroke: "currentColor",
5011
+ "stroke-width": "1.4"
5012
+ }),
5013
+ createElementVNode("path", {
5014
+ d: "M5 1.5v3M11 1.5v3M2 6.5h12",
5015
+ fill: "none",
5016
+ stroke: "currentColor",
5017
+ "stroke-width": "1.4",
5018
+ "stroke-linecap": "round"
5019
+ })
5020
+ ], -1))
5021
+ ], true)
5022
+ ])
4425
5023
  ], 42, _hoisted_1$k),
4426
5024
  (openBlock(), createBlock(Teleport, { to: "body" }, [
4427
5025
  open.value ? (openBlock(), createElementBlock("div", {
@@ -4436,61 +5034,67 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
4436
5034
  style: normalizeStyle(panelStyle.value),
4437
5035
  onKeydown: onPanelKeydown
4438
5036
  }, [
4439
- createElementVNode("div", _hoisted_4$f, [
5037
+ createElementVNode("div", _hoisted_5$d, [
4440
5038
  createElementVNode("button", {
4441
5039
  type: "button",
4442
5040
  class: "tao-date__nav",
4443
- "aria-label": "Предыдущий месяц",
5041
+ "aria-label": __props.prevMonthLabel,
4444
5042
  onClick: _cache[0] || (_cache[0] = ($event) => goMonth(-1))
4445
- }, [..._cache[5] || (_cache[5] = [
4446
- createElementVNode("svg", {
4447
- viewBox: "0 0 24 24",
4448
- width: "14",
4449
- height: "14",
4450
- "aria-hidden": "true",
4451
- focusable: "false"
4452
- }, [
4453
- createElementVNode("path", {
4454
- fill: "none",
4455
- stroke: "currentColor",
4456
- "stroke-width": "2.2",
4457
- "stroke-linecap": "round",
4458
- "stroke-linejoin": "round",
4459
- d: "M14.5 5 8 12l6.5 7"
4460
- })
4461
- ], -1)
4462
- ])]),
4463
- createElementVNode("p", _hoisted_5$c, toDisplayString(monthLabel.value), 1),
5043
+ }, [
5044
+ createElementVNode("span", _hoisted_7$9, [
5045
+ renderSlot(_ctx.$slots, "prev-icon", {}, () => [
5046
+ _cache[5] || (_cache[5] = createElementVNode("svg", {
5047
+ viewBox: "0 0 24 24",
5048
+ width: "14",
5049
+ height: "14",
5050
+ focusable: "false"
5051
+ }, [
5052
+ createElementVNode("path", {
5053
+ fill: "none",
5054
+ stroke: "currentColor",
5055
+ "stroke-width": "2.2",
5056
+ "stroke-linecap": "round",
5057
+ "stroke-linejoin": "round",
5058
+ d: "M14.5 5 8 12l6.5 7"
5059
+ })
5060
+ ], -1))
5061
+ ], true)
5062
+ ])
5063
+ ], 8, _hoisted_6$a),
5064
+ createElementVNode("p", _hoisted_8$8, toDisplayString(monthLabel.value), 1),
4464
5065
  createElementVNode("button", {
4465
5066
  type: "button",
4466
5067
  class: "tao-date__nav",
4467
- "aria-label": "Следующий месяц",
5068
+ "aria-label": __props.nextMonthLabel,
4468
5069
  onClick: _cache[1] || (_cache[1] = ($event) => goMonth(1))
4469
- }, [..._cache[6] || (_cache[6] = [
4470
- createElementVNode("svg", {
4471
- viewBox: "0 0 24 24",
4472
- width: "14",
4473
- height: "14",
4474
- "aria-hidden": "true",
4475
- focusable: "false"
4476
- }, [
4477
- createElementVNode("path", {
4478
- fill: "none",
4479
- stroke: "currentColor",
4480
- "stroke-width": "2.2",
4481
- "stroke-linecap": "round",
4482
- "stroke-linejoin": "round",
4483
- d: "M9.5 5 16 12l-6.5 7"
4484
- })
4485
- ], -1)
4486
- ])])
5070
+ }, [
5071
+ createElementVNode("span", _hoisted_10$3, [
5072
+ renderSlot(_ctx.$slots, "next-icon", {}, () => [
5073
+ _cache[6] || (_cache[6] = createElementVNode("svg", {
5074
+ viewBox: "0 0 24 24",
5075
+ width: "14",
5076
+ height: "14",
5077
+ focusable: "false"
5078
+ }, [
5079
+ createElementVNode("path", {
5080
+ fill: "none",
5081
+ stroke: "currentColor",
5082
+ "stroke-width": "2.2",
5083
+ "stroke-linecap": "round",
5084
+ "stroke-linejoin": "round",
5085
+ d: "M9.5 5 16 12l-6.5 7"
5086
+ })
5087
+ ], -1))
5088
+ ], true)
5089
+ ])
5090
+ ], 8, _hoisted_9$3)
4487
5091
  ]),
4488
- createElementVNode("div", _hoisted_6$9, [
5092
+ createElementVNode("div", _hoisted_11$2, [
4489
5093
  (openBlock(true), createElementBlock(Fragment, null, renderList(weekdays.value, (day) => {
4490
5094
  return openBlock(), createElementBlock("span", { key: day }, toDisplayString(day), 1);
4491
5095
  }), 128))
4492
5096
  ]),
4493
- createElementVNode("div", _hoisted_7$7, [
5097
+ createElementVNode("div", _hoisted_12$1, [
4494
5098
  (openBlock(true), createElementBlock(Fragment, null, renderList(cells.value, (cell) => {
4495
5099
  return openBlock(), createElementBlock("button", {
4496
5100
  key: cell.iso,
@@ -4509,42 +5113,58 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
4509
5113
  onMousedown: _cache[2] || (_cache[2] = withModifiers(() => {
4510
5114
  }, ["prevent"])),
4511
5115
  onClick: ($event) => selectDay(cell.iso)
4512
- }, toDisplayString(cell.day), 43, _hoisted_8$6);
5116
+ }, toDisplayString(cell.day), 43, _hoisted_13$1);
4513
5117
  }), 128))
4514
5118
  ]),
4515
- createElementVNode("div", _hoisted_9$2, [
5119
+ createElementVNode("div", _hoisted_14$1, [
4516
5120
  createElementVNode("button", {
4517
5121
  type: "button",
4518
5122
  class: "tao-date__link",
4519
5123
  disabled: !todayEnabled.value,
4520
5124
  onClick: _cache[3] || (_cache[3] = ($event) => selectDay(todayIso.value))
4521
- }, " Сегодня ", 8, _hoisted_10$1),
5125
+ }, [
5126
+ renderSlot(_ctx.$slots, "today", {}, () => [
5127
+ createTextVNode(toDisplayString(__props.todayText), 1)
5128
+ ], true)
5129
+ ], 8, _hoisted_15),
4522
5130
  valueIso.value ? (openBlock(), createElementBlock("button", {
4523
5131
  key: 0,
4524
5132
  type: "button",
4525
5133
  class: "tao-date__link",
4526
5134
  onClick: clear
4527
- }, "Очистить")) : createCommentVNode("", true)
5135
+ }, [
5136
+ renderSlot(_ctx.$slots, "clear", {}, () => [
5137
+ createTextVNode(toDisplayString(__props.clearText), 1)
5138
+ ], true)
5139
+ ])) : createCommentVNode("", true)
4528
5140
  ])
4529
- ], 44, _hoisted_3$f)) : createCommentVNode("", true)
5141
+ ], 44, _hoisted_4$f)) : createCommentVNode("", true)
4530
5142
  ]))
4531
5143
  ], 2);
4532
5144
  };
4533
5145
  }
4534
5146
  });
4535
- const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-f4a9cddd"]]);
5147
+ const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-ebd437a8"]]);
4536
5148
  const _hoisted_1$j = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
4537
5149
  const _hoisted_2$h = { class: "tao-date-range__value" };
4538
- const _hoisted_3$e = ["aria-label"];
4539
- const _hoisted_4$e = { class: "tao-date__header" };
4540
- const _hoisted_5$b = { class: "tao-date__month" };
4541
- const _hoisted_6$8 = {
5150
+ const _hoisted_3$e = {
5151
+ class: "tao-date-range__icon",
5152
+ "aria-hidden": "true"
5153
+ };
5154
+ const _hoisted_4$e = ["aria-label"];
5155
+ const _hoisted_5$c = { class: "tao-date__header" };
5156
+ const _hoisted_6$9 = ["aria-label"];
5157
+ const _hoisted_7$8 = { "aria-hidden": "true" };
5158
+ const _hoisted_8$7 = { class: "tao-date__month" };
5159
+ const _hoisted_9$2 = ["aria-label"];
5160
+ const _hoisted_10$2 = { "aria-hidden": "true" };
5161
+ const _hoisted_11$1 = {
4542
5162
  class: "tao-date__weekdays",
4543
5163
  "aria-hidden": "true"
4544
5164
  };
4545
- const _hoisted_7$6 = ["aria-label", "aria-selected", "disabled", "onMouseenter", "onClick"];
4546
- const _hoisted_8$5 = { class: "tao-date__footer" };
4547
- const _hoisted_9$1 = ["disabled"];
5165
+ const _hoisted_12 = ["aria-label", "aria-selected", "disabled", "onMouseenter", "onClick"];
5166
+ const _hoisted_13 = { class: "tao-date__footer" };
5167
+ const _hoisted_14 = ["disabled"];
4548
5168
  const _sfc_main$j = /* @__PURE__ */ defineComponent({
4549
5169
  ...{ name: "TaoDateRange" },
4550
5170
  __name: "TaoDateRange",
@@ -4555,7 +5175,11 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
4555
5175
  error: { type: Boolean, default: false },
4556
5176
  min: { default: void 0 },
4557
5177
  max: { default: void 0 },
4558
- locale: { default: "ru-RU" }
5178
+ locale: { default: "ru-RU" },
5179
+ todayText: { default: "Сегодня" },
5180
+ clearText: { default: "Очистить" },
5181
+ prevMonthLabel: { default: "Предыдущий месяц" },
5182
+ nextMonthLabel: { default: "Следующий месяц" }
4559
5183
  },
4560
5184
  emits: ["update:modelValue", "change"],
4561
5185
  setup(__props, { emit: __emit }) {
@@ -4635,7 +5259,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
4635
5259
  }
4636
5260
  draftStart.value = null;
4637
5261
  hoverIso.value = null;
4638
- syncViewFrom(((_a = committed.value) == null ? void 0 : _a.start) ?? todayIso.value);
5262
+ syncViewFrom(clampTaoDateCursor(((_a = committed.value) == null ? void 0 : _a.start) ?? todayIso.value, props.min, props.max));
4639
5263
  await nextTick();
4640
5264
  updatePosition();
4641
5265
  (_b = panelRef.value) == null ? void 0 : _b.focus();
@@ -4684,19 +5308,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
4684
5308
  }
4685
5309
  function goMonth(delta) {
4686
5310
  hoverIso.value = null;
4687
- const next = shiftTaoMonth(`${viewYear.value}-${String(viewMonth.value).padStart(2, "0")}-01`, delta);
4688
- const parts = parseTaoDate(next);
4689
- if (!parts) {
4690
- return;
4691
- }
4692
- viewYear.value = parts.y;
4693
- viewMonth.value = parts.m;
4694
- cursorIso.value = shiftTaoMonth(cursorIso.value, delta);
5311
+ cursorIso.value = clampTaoDateCursor(shiftTaoMonth(cursorIso.value, delta), props.min, props.max);
5312
+ syncViewFrom(cursorIso.value);
4695
5313
  void nextTick(updatePosition);
4696
5314
  }
4697
5315
  function moveCursor(days) {
4698
5316
  hoverIso.value = null;
4699
- cursorIso.value = shiftTaoDate(cursorIso.value, days);
5317
+ const next = shiftTaoDate(cursorIso.value, days);
5318
+ cursorIso.value = isTaoDateInRange(next, props.min, props.max) ? next : clampTaoDateCursor(next, props.min, props.max);
4700
5319
  syncViewFrom(cursorIso.value);
4701
5320
  void nextTick(updatePosition);
4702
5321
  }
@@ -4830,32 +5449,34 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
4830
5449
  onKeydown: onTriggerKeydown
4831
5450
  }, [
4832
5451
  createElementVNode("span", _hoisted_2$h, toDisplayString(displayLabel.value || __props.placeholder), 1),
4833
- _cache[3] || (_cache[3] = createElementVNode("svg", {
4834
- class: "tao-date-range__icon",
4835
- viewBox: "0 0 16 16",
4836
- width: "16",
4837
- height: "16",
4838
- "aria-hidden": "true",
4839
- focusable: "false"
4840
- }, [
4841
- createElementVNode("rect", {
4842
- x: "2",
4843
- y: "3",
4844
- width: "12",
4845
- height: "11",
4846
- rx: "1.5",
4847
- fill: "none",
4848
- stroke: "currentColor",
4849
- "stroke-width": "1.4"
4850
- }),
4851
- createElementVNode("path", {
4852
- d: "M5 1.5v3M11 1.5v3M2 6.5h12",
4853
- fill: "none",
4854
- stroke: "currentColor",
4855
- "stroke-width": "1.4",
4856
- "stroke-linecap": "round"
4857
- })
4858
- ], -1))
5452
+ createElementVNode("span", _hoisted_3$e, [
5453
+ renderSlot(_ctx.$slots, "icon", {}, () => [
5454
+ _cache[3] || (_cache[3] = createElementVNode("svg", {
5455
+ viewBox: "0 0 16 16",
5456
+ width: "16",
5457
+ height: "16",
5458
+ focusable: "false"
5459
+ }, [
5460
+ createElementVNode("rect", {
5461
+ x: "2",
5462
+ y: "3",
5463
+ width: "12",
5464
+ height: "11",
5465
+ rx: "1.5",
5466
+ fill: "none",
5467
+ stroke: "currentColor",
5468
+ "stroke-width": "1.4"
5469
+ }),
5470
+ createElementVNode("path", {
5471
+ d: "M5 1.5v3M11 1.5v3M2 6.5h12",
5472
+ fill: "none",
5473
+ stroke: "currentColor",
5474
+ "stroke-width": "1.4",
5475
+ "stroke-linecap": "round"
5476
+ })
5477
+ ], -1))
5478
+ ], true)
5479
+ ])
4859
5480
  ], 42, _hoisted_1$j),
4860
5481
  (openBlock(), createBlock(Teleport, { to: "body" }, [
4861
5482
  open.value ? (openBlock(), createElementBlock("div", {
@@ -4870,56 +5491,62 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
4870
5491
  style: normalizeStyle(panelStyle.value),
4871
5492
  onKeydown: onPanelKeydown
4872
5493
  }, [
4873
- createElementVNode("div", _hoisted_4$e, [
5494
+ createElementVNode("div", _hoisted_5$c, [
4874
5495
  createElementVNode("button", {
4875
5496
  type: "button",
4876
5497
  class: "tao-date__nav",
4877
- "aria-label": "Предыдущий месяц",
5498
+ "aria-label": __props.prevMonthLabel,
4878
5499
  onClick: _cache[0] || (_cache[0] = ($event) => goMonth(-1))
4879
- }, [..._cache[4] || (_cache[4] = [
4880
- createElementVNode("svg", {
4881
- viewBox: "0 0 24 24",
4882
- width: "14",
4883
- height: "14",
4884
- "aria-hidden": "true",
4885
- focusable: "false"
4886
- }, [
4887
- createElementVNode("path", {
4888
- fill: "none",
4889
- stroke: "currentColor",
4890
- "stroke-width": "2.2",
4891
- "stroke-linecap": "round",
4892
- "stroke-linejoin": "round",
4893
- d: "M14.5 5 8 12l6.5 7"
4894
- })
4895
- ], -1)
4896
- ])]),
4897
- createElementVNode("p", _hoisted_5$b, toDisplayString(monthLabel.value), 1),
5500
+ }, [
5501
+ createElementVNode("span", _hoisted_7$8, [
5502
+ renderSlot(_ctx.$slots, "prev-icon", {}, () => [
5503
+ _cache[4] || (_cache[4] = createElementVNode("svg", {
5504
+ viewBox: "0 0 24 24",
5505
+ width: "14",
5506
+ height: "14",
5507
+ focusable: "false"
5508
+ }, [
5509
+ createElementVNode("path", {
5510
+ fill: "none",
5511
+ stroke: "currentColor",
5512
+ "stroke-width": "2.2",
5513
+ "stroke-linecap": "round",
5514
+ "stroke-linejoin": "round",
5515
+ d: "M14.5 5 8 12l6.5 7"
5516
+ })
5517
+ ], -1))
5518
+ ], true)
5519
+ ])
5520
+ ], 8, _hoisted_6$9),
5521
+ createElementVNode("p", _hoisted_8$7, toDisplayString(monthLabel.value), 1),
4898
5522
  createElementVNode("button", {
4899
5523
  type: "button",
4900
5524
  class: "tao-date__nav",
4901
- "aria-label": "Следующий месяц",
5525
+ "aria-label": __props.nextMonthLabel,
4902
5526
  onClick: _cache[1] || (_cache[1] = ($event) => goMonth(1))
4903
- }, [..._cache[5] || (_cache[5] = [
4904
- createElementVNode("svg", {
4905
- viewBox: "0 0 24 24",
4906
- width: "14",
4907
- height: "14",
4908
- "aria-hidden": "true",
4909
- focusable: "false"
4910
- }, [
4911
- createElementVNode("path", {
4912
- fill: "none",
4913
- stroke: "currentColor",
4914
- "stroke-width": "2.2",
4915
- "stroke-linecap": "round",
4916
- "stroke-linejoin": "round",
4917
- d: "M9.5 5 16 12l-6.5 7"
4918
- })
4919
- ], -1)
4920
- ])])
5527
+ }, [
5528
+ createElementVNode("span", _hoisted_10$2, [
5529
+ renderSlot(_ctx.$slots, "next-icon", {}, () => [
5530
+ _cache[5] || (_cache[5] = createElementVNode("svg", {
5531
+ viewBox: "0 0 24 24",
5532
+ width: "14",
5533
+ height: "14",
5534
+ focusable: "false"
5535
+ }, [
5536
+ createElementVNode("path", {
5537
+ fill: "none",
5538
+ stroke: "currentColor",
5539
+ "stroke-width": "2.2",
5540
+ "stroke-linecap": "round",
5541
+ "stroke-linejoin": "round",
5542
+ d: "M9.5 5 16 12l-6.5 7"
5543
+ })
5544
+ ], -1))
5545
+ ], true)
5546
+ ])
5547
+ ], 8, _hoisted_9$2)
4921
5548
  ]),
4922
- createElementVNode("div", _hoisted_6$8, [
5549
+ createElementVNode("div", _hoisted_11$1, [
4923
5550
  (openBlock(true), createElementBlock(Fragment, null, renderList(weekdays.value, (day) => {
4924
5551
  return openBlock(), createElementBlock("span", { key: day }, toDisplayString(day), 1);
4925
5552
  }), 128))
@@ -4952,32 +5579,40 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
4952
5579
  }, ["prevent"])),
4953
5580
  onMouseenter: ($event) => onDayEnter(cell.iso),
4954
5581
  onClick: ($event) => selectDay(cell.iso)
4955
- }, toDisplayString(cell.day), 43, _hoisted_7$6);
5582
+ }, toDisplayString(cell.day), 43, _hoisted_12);
4956
5583
  }), 128))
4957
5584
  ], 32),
4958
- createElementVNode("div", _hoisted_8$5, [
5585
+ createElementVNode("div", _hoisted_13, [
4959
5586
  createElementVNode("button", {
4960
5587
  type: "button",
4961
5588
  class: "tao-date__link",
4962
5589
  disabled: !todayEnabled.value,
4963
5590
  onClick: selectToday
4964
- }, " Сегодня ", 8, _hoisted_9$1),
5591
+ }, [
5592
+ renderSlot(_ctx.$slots, "today", {}, () => [
5593
+ createTextVNode(toDisplayString(__props.todayText), 1)
5594
+ ], true)
5595
+ ], 8, _hoisted_14),
4965
5596
  committed.value ? (openBlock(), createElementBlock("button", {
4966
5597
  key: 0,
4967
5598
  type: "button",
4968
5599
  class: "tao-date__link",
4969
5600
  onClick: clear
4970
- }, "Очистить")) : createCommentVNode("", true)
5601
+ }, [
5602
+ renderSlot(_ctx.$slots, "clear", {}, () => [
5603
+ createTextVNode(toDisplayString(__props.clearText), 1)
5604
+ ], true)
5605
+ ])) : createCommentVNode("", true)
4971
5606
  ])
4972
- ], 44, _hoisted_3$e)) : createCommentVNode("", true)
5607
+ ], 44, _hoisted_4$e)) : createCommentVNode("", true)
4973
5608
  ]))
4974
5609
  ], 2);
4975
5610
  };
4976
5611
  }
4977
5612
  });
4978
- const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-3d067081"]]);
5613
+ const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-aa589793"]]);
4979
5614
  const _hoisted_1$i = ["for"];
4980
- const _hoisted_2$g = ["id", "checked", "disabled", "aria-checked"];
5615
+ const _hoisted_2$g = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
4981
5616
  const _hoisted_3$d = {
4982
5617
  key: 0,
4983
5618
  class: "tao-switch__label"
@@ -5001,6 +5636,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
5001
5636
  const field = inject(formFieldKey, null);
5002
5637
  const localId = useId();
5003
5638
  const controlId = computed(() => (field == null ? void 0 : field.id) ?? localId);
5639
+ const invalid = computed(() => Boolean(field == null ? void 0 : field.invalid.value));
5640
+ const describedBy = computed(() => field == null ? void 0 : field.describedBy.value);
5004
5641
  function toggle() {
5005
5642
  if (props.disabled) {
5006
5643
  return;
@@ -5011,7 +5648,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
5011
5648
  }
5012
5649
  return (_ctx, _cache) => {
5013
5650
  return openBlock(), createElementBlock("label", {
5014
- class: normalizeClass(["tao-switch", { "tao-switch--disabled": __props.disabled, "tao-switch--on": __props.modelValue }]),
5651
+ class: normalizeClass(["tao-switch", { "tao-switch--disabled": __props.disabled, "tao-switch--on": __props.modelValue, "tao-switch--invalid": invalid.value }]),
5015
5652
  for: controlId.value
5016
5653
  }, [
5017
5654
  createElementVNode("input", {
@@ -5022,6 +5659,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
5022
5659
  checked: __props.modelValue,
5023
5660
  disabled: __props.disabled,
5024
5661
  "aria-checked": __props.modelValue,
5662
+ "aria-invalid": invalid.value || void 0,
5663
+ "aria-describedby": describedBy.value,
5025
5664
  onChange: toggle
5026
5665
  }, null, 40, _hoisted_2$g),
5027
5666
  _cache[0] || (_cache[0] = createElementVNode("span", {
@@ -5037,10 +5676,10 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
5037
5676
  };
5038
5677
  }
5039
5678
  });
5040
- const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-db2bca61"]]);
5679
+ const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-17ce5000"]]);
5041
5680
  const radioGroupKey = Symbol("taoRadioGroup");
5042
5681
  const _hoisted_1$h = ["for"];
5043
- const _hoisted_2$f = ["id", "name", "value", "checked", "disabled"];
5682
+ const _hoisted_2$f = ["id", "name", "value", "checked", "disabled", "aria-invalid", "aria-describedby"];
5044
5683
  const _hoisted_3$c = {
5045
5684
  key: 0,
5046
5685
  class: "tao-radio__label"
@@ -5064,7 +5703,11 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
5064
5703
  const props = __props;
5065
5704
  const emit = __emit;
5066
5705
  const group = inject(radioGroupKey, null);
5706
+ const field = inject(formFieldKey, null);
5067
5707
  const localId = useId();
5708
+ const controlId = computed(() => group ? localId : (field == null ? void 0 : field.id) ?? localId);
5709
+ const invalid = computed(() => Boolean(field == null ? void 0 : field.invalid.value));
5710
+ const describedBy = computed(() => group ? void 0 : field == null ? void 0 : field.describedBy.value);
5068
5711
  const isDisabled = computed(() => props.disabled || Boolean(group == null ? void 0 : group.disabled.value));
5069
5712
  const inputName = computed(() => (group == null ? void 0 : group.name.value) ?? props.name);
5070
5713
  const isChecked = computed(() => {
@@ -5084,17 +5727,19 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
5084
5727
  }
5085
5728
  return (_ctx, _cache) => {
5086
5729
  return openBlock(), createElementBlock("label", {
5087
- class: normalizeClass(["tao-radio", { "tao-radio--disabled": isDisabled.value }]),
5088
- for: unref(localId)
5730
+ class: normalizeClass(["tao-radio", { "tao-radio--disabled": isDisabled.value, "tao-radio--invalid": invalid.value && !unref(group) }]),
5731
+ for: controlId.value
5089
5732
  }, [
5090
5733
  createElementVNode("input", {
5091
- id: unref(localId),
5734
+ id: controlId.value,
5092
5735
  class: "tao-radio__input",
5093
5736
  type: "radio",
5094
5737
  name: inputName.value,
5095
5738
  value: String(__props.value),
5096
5739
  checked: isChecked.value,
5097
5740
  disabled: isDisabled.value,
5741
+ "aria-invalid": !unref(group) && invalid.value || void 0,
5742
+ "aria-describedby": describedBy.value,
5098
5743
  onChange
5099
5744
  }, null, 40, _hoisted_2$f),
5100
5745
  _cache[0] || (_cache[0] = createElementVNode("span", {
@@ -5108,8 +5753,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
5108
5753
  };
5109
5754
  }
5110
5755
  });
5111
- const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-c9c84481"]]);
5112
- const _hoisted_1$g = ["disabled"];
5756
+ const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-e79d1fb6"]]);
5757
+ const _hoisted_1$g = ["id", "disabled", "aria-describedby", "aria-invalid", "aria-labelledby"];
5113
5758
  const _hoisted_2$e = {
5114
5759
  key: 0,
5115
5760
  class: "tao-radio-group__legend"
@@ -5128,10 +5773,14 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
5128
5773
  setup(__props, { emit: __emit }) {
5129
5774
  const props = __props;
5130
5775
  const emit = __emit;
5776
+ const field = inject(formFieldKey, null);
5131
5777
  const autoName = useId();
5132
5778
  const groupName = computed(() => props.name || autoName);
5133
5779
  const model = computed(() => props.modelValue);
5134
5780
  const groupDisabled = computed(() => props.disabled);
5781
+ const invalid = computed(() => Boolean(field == null ? void 0 : field.invalid.value));
5782
+ const describedBy = computed(() => field == null ? void 0 : field.describedBy.value);
5783
+ const labelledBy = computed(() => props.legend || !field ? void 0 : `${field.id}-label`);
5135
5784
  function setValue(value) {
5136
5785
  emit("update:modelValue", value);
5137
5786
  emit("change", value);
@@ -5143,9 +5792,14 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
5143
5792
  setValue
5144
5793
  });
5145
5794
  return (_ctx, _cache) => {
5795
+ var _a;
5146
5796
  return openBlock(), createElementBlock("fieldset", {
5147
- class: normalizeClass(["tao-radio-group", `tao-radio-group--${__props.direction}`]),
5148
- disabled: __props.disabled
5797
+ id: (_a = unref(field)) == null ? void 0 : _a.id,
5798
+ class: normalizeClass(["tao-radio-group", [`tao-radio-group--${__props.direction}`, { "tao-radio-group--invalid": invalid.value }]]),
5799
+ disabled: __props.disabled,
5800
+ "aria-describedby": describedBy.value,
5801
+ "aria-invalid": invalid.value || void 0,
5802
+ "aria-labelledby": labelledBy.value
5149
5803
  }, [
5150
5804
  __props.legend ? (openBlock(), createElementBlock("legend", _hoisted_2$e, toDisplayString(__props.legend), 1)) : createCommentVNode("", true),
5151
5805
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
@@ -5153,9 +5807,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
5153
5807
  };
5154
5808
  }
5155
5809
  });
5156
- const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-a0b1cb1f"]]);
5810
+ const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-6f6fa977"]]);
5157
5811
  const segmentedKey = Symbol("taoSegmented");
5158
- const _hoisted_1$f = ["disabled", "aria-describedby", "aria-invalid"];
5812
+ const _hoisted_1$f = ["disabled", "aria-describedby", "aria-invalid", "aria-labelledby", "id"];
5159
5813
  const _hoisted_2$d = {
5160
5814
  key: 0,
5161
5815
  class: "tao-segmented__legend"
@@ -5255,6 +5909,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
5255
5909
  mutationObserver = null;
5256
5910
  });
5257
5911
  return (_ctx, _cache) => {
5912
+ var _a;
5258
5913
  return openBlock(), createElementBlock("fieldset", {
5259
5914
  class: normalizeClass(["tao-segmented", [
5260
5915
  `tao-segmented--${__props.size}`,
@@ -5266,7 +5921,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
5266
5921
  ]]),
5267
5922
  disabled: __props.disabled,
5268
5923
  "aria-describedby": describedBy.value,
5269
- "aria-invalid": invalid.value || void 0
5924
+ "aria-invalid": invalid.value || void 0,
5925
+ "aria-labelledby": __props.legend ? void 0 : unref(field) ? `${unref(field).id}-label` : void 0,
5926
+ id: (_a = unref(field)) == null ? void 0 : _a.id
5270
5927
  }, [
5271
5928
  __props.legend ? (openBlock(), createElementBlock("legend", _hoisted_2$d, toDisplayString(__props.legend), 1)) : createCommentVNode("", true),
5272
5929
  createElementVNode("div", {
@@ -5285,7 +5942,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
5285
5942
  };
5286
5943
  }
5287
5944
  });
5288
- const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-cb3c591b"]]);
5945
+ const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-af757a32"]]);
5289
5946
  const _hoisted_1$e = ["for"];
5290
5947
  const _hoisted_2$c = ["id", "name", "value", "checked", "disabled", "aria-label"];
5291
5948
  const _hoisted_3$b = { class: "tao-segmented-option__face" };
@@ -5294,15 +5951,15 @@ const _hoisted_4$b = {
5294
5951
  class: "tao-segmented-option__icon",
5295
5952
  "aria-hidden": "true"
5296
5953
  };
5297
- const _hoisted_5$a = {
5954
+ const _hoisted_5$b = {
5298
5955
  key: 1,
5299
5956
  class: "tao-segmented-option__label"
5300
5957
  };
5301
- const _hoisted_6$7 = {
5958
+ const _hoisted_6$8 = {
5302
5959
  key: 2,
5303
5960
  class: "tao-segmented-option__sr"
5304
5961
  };
5305
- const _hoisted_7$5 = {
5962
+ const _hoisted_7$7 = {
5306
5963
  key: 3,
5307
5964
  class: "tao-segmented-option__count"
5308
5965
  };
@@ -5387,12 +6044,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
5387
6044
  createTextVNode(toDisplayString(__props.icon), 1)
5388
6045
  ], true)
5389
6046
  ])) : createCommentVNode("", true),
5390
- hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_5$a, [
6047
+ hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_5$b, [
5391
6048
  renderSlot(_ctx.$slots, "default", {}, () => [
5392
6049
  createTextVNode(toDisplayString(__props.label), 1)
5393
6050
  ], true)
5394
- ])) : __props.ariaLabel ? (openBlock(), createElementBlock("span", _hoisted_6$7, toDisplayString(__props.ariaLabel), 1)) : createCommentVNode("", true),
5395
- countLabel.value ? (openBlock(), createElementBlock("span", _hoisted_7$5, toDisplayString(countLabel.value), 1)) : createCommentVNode("", true)
6051
+ ])) : __props.ariaLabel ? (openBlock(), createElementBlock("span", _hoisted_6$8, toDisplayString(__props.ariaLabel), 1)) : createCommentVNode("", true),
6052
+ countLabel.value ? (openBlock(), createElementBlock("span", _hoisted_7$7, toDisplayString(countLabel.value), 1)) : createCommentVNode("", true)
5396
6053
  ])
5397
6054
  ], 10, _hoisted_1$e);
5398
6055
  };
@@ -5409,13 +6066,16 @@ const _hoisted_4$a = {
5409
6066
  key: 1,
5410
6067
  class: "tao-alert__message"
5411
6068
  };
6069
+ const _hoisted_5$a = ["aria-label"];
6070
+ const _hoisted_6$7 = { "aria-hidden": "true" };
5412
6071
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
5413
6072
  ...{ name: "TaoAlert" },
5414
6073
  __name: "TaoAlert",
5415
6074
  props: {
5416
6075
  type: { default: "info" },
5417
6076
  title: { default: "" },
5418
- closable: { type: Boolean, default: false }
6077
+ closable: { type: Boolean, default: false },
6078
+ closeLabel: { default: "Закрыть" }
5419
6079
  },
5420
6080
  emits: ["close"],
5421
6081
  setup(__props, { emit: __emit }) {
@@ -5439,22 +6099,28 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
5439
6099
  key: 0,
5440
6100
  type: "button",
5441
6101
  class: "tao-alert__close",
5442
- "aria-label": "Закрыть",
6102
+ "aria-label": __props.closeLabel,
5443
6103
  onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
5444
- }, " × ")) : createCommentVNode("", true)
6104
+ }, [
6105
+ createElementVNode("span", _hoisted_6$7, [
6106
+ renderSlot(_ctx.$slots, "close-icon", {}, () => [
6107
+ _cache[1] || (_cache[1] = createTextVNode("×", -1))
6108
+ ], true)
6109
+ ])
6110
+ ], 8, _hoisted_5$a)) : createCommentVNode("", true)
5445
6111
  ], 10, _hoisted_1$d);
5446
6112
  };
5447
6113
  }
5448
6114
  });
5449
- const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-4c89fa1f"]]);
6115
+ const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-1a1dbef3"]]);
5450
6116
  const _hoisted_1$c = { key: 0 };
5451
6117
  const _hoisted_2$a = ["aria-sort"];
5452
6118
  const _hoisted_3$9 = ["onClick"];
5453
6119
  const _hoisted_4$9 = { key: 1 };
5454
6120
  const _hoisted_5$9 = { key: 0 };
5455
6121
  const _hoisted_6$6 = ["colspan"];
5456
- const _hoisted_7$4 = ["onClick"];
5457
- const _hoisted_8$4 = {
6122
+ const _hoisted_7$6 = ["onClick"];
6123
+ const _hoisted_8$6 = {
5458
6124
  key: 0,
5459
6125
  class: "tao-table__loading",
5460
6126
  "aria-busy": "true"
@@ -5607,11 +6273,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
5607
6273
  ], true)
5608
6274
  ], 4);
5609
6275
  }), 128))
5610
- ], 8, _hoisted_7$4);
6276
+ ], 8, _hoisted_7$6);
5611
6277
  }), 128))
5612
6278
  ])
5613
6279
  ], 2),
5614
- __props.loading ? (openBlock(), createElementBlock("div", _hoisted_8$4, [
6280
+ __props.loading ? (openBlock(), createElementBlock("div", _hoisted_8$6, [
5615
6281
  renderSlot(_ctx.$slots, "loading", {}, () => [
5616
6282
  createVNode(TaoLoader, { size: 36 })
5617
6283
  ], true)
@@ -5651,15 +6317,17 @@ const _hoisted_2$9 = {
5651
6317
  class: "tao-pagination__total"
5652
6318
  };
5653
6319
  const _hoisted_3$8 = { class: "tao-pagination__pages" };
5654
- const _hoisted_4$8 = ["disabled"];
5655
- const _hoisted_5$8 = ["aria-label", "disabled", "onClick"];
5656
- const _hoisted_6$5 = {
6320
+ const _hoisted_4$8 = ["aria-label", "disabled"];
6321
+ const _hoisted_5$8 = { "aria-hidden": "true" };
6322
+ const _hoisted_6$5 = ["aria-label", "disabled", "onClick"];
6323
+ const _hoisted_7$5 = {
5657
6324
  key: 1,
5658
6325
  class: "tao-pagination__ellipsis",
5659
6326
  "aria-hidden": "true"
5660
6327
  };
5661
- const _hoisted_7$3 = ["aria-current", "aria-label", "disabled", "onClick"];
5662
- const _hoisted_8$3 = ["disabled"];
6328
+ const _hoisted_8$5 = ["aria-current", "aria-label", "disabled", "onClick"];
6329
+ const _hoisted_9$1 = ["aria-label", "disabled"];
6330
+ const _hoisted_10$1 = { "aria-hidden": "true" };
5663
6331
  const _sfc_main$b = /* @__PURE__ */ defineComponent({
5664
6332
  ...{ name: "TaoPagination" },
5665
6333
  __name: "TaoPagination",
@@ -5672,7 +6340,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
5672
6340
  showTotal: { type: Boolean, default: true },
5673
6341
  size: { default: "medium" },
5674
6342
  jump: { default: 5 },
5675
- ariaLabel: { default: "Пагинация" }
6343
+ ariaLabel: { default: "Пагинация" },
6344
+ prevLabel: { default: "Назад" },
6345
+ nextLabel: { default: "Вперёд" },
6346
+ pageLabel: { default: "Страница {page}" },
6347
+ jumpPrevLabel: { default: "Назад на {n} страниц" },
6348
+ jumpNextLabel: { default: "Вперёд на {n} страниц" }
5676
6349
  },
5677
6350
  emits: ["update:page", "change"],
5678
6351
  setup(__props, { emit: __emit }) {
@@ -5683,11 +6356,15 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
5683
6356
  const items = computed(() => buildPaginationItems(current.value, pageCount.value, props.siblingCount));
5684
6357
  const from = computed(() => props.total === 0 ? 0 : (current.value - 1) * props.pageSize + 1);
5685
6358
  const to = computed(() => Math.min(current.value * props.pageSize, props.total));
5686
- watch(pageCount, (count) => {
5687
- if (props.page > count) {
5688
- goTo(count);
5689
- }
5690
- });
6359
+ watch(
6360
+ () => [props.page, pageCount.value],
6361
+ ([page, count]) => {
6362
+ if (page > count || page < 1) {
6363
+ goTo(page);
6364
+ }
6365
+ },
6366
+ { immediate: true }
6367
+ );
5691
6368
  function goTo(next) {
5692
6369
  if (props.disabled) {
5693
6370
  return;
@@ -5705,20 +6382,32 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
5705
6382
  "aria-label": __props.ariaLabel
5706
6383
  }, [
5707
6384
  __props.showTotal ? (openBlock(), createElementBlock("p", _hoisted_2$9, [
5708
- __props.total === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
5709
- createTextVNode("0 из 0")
5710
- ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
5711
- createTextVNode(toDisplayString(from.value) + "–" + toDisplayString(to.value) + " из " + toDisplayString(__props.total), 1)
5712
- ], 64))
6385
+ renderSlot(_ctx.$slots, "total", {
6386
+ from: from.value,
6387
+ to: to.value,
6388
+ total: __props.total
6389
+ }, () => [
6390
+ __props.total === 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
6391
+ createTextVNode("0 из 0")
6392
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
6393
+ createTextVNode(toDisplayString(from.value) + "–" + toDisplayString(to.value) + " из " + toDisplayString(__props.total), 1)
6394
+ ], 64))
6395
+ ], true)
5713
6396
  ])) : createCommentVNode("", true),
5714
6397
  createElementVNode("div", _hoisted_3$8, [
5715
6398
  createElementVNode("button", {
5716
6399
  type: "button",
5717
6400
  class: "tao-pagination__btn",
5718
- "aria-label": "Назад",
6401
+ "aria-label": __props.prevLabel,
5719
6402
  disabled: __props.disabled || current.value <= 1,
5720
6403
  onClick: _cache[0] || (_cache[0] = ($event) => goTo(current.value - 1))
5721
- }, " ‹ ", 8, _hoisted_4$8),
6404
+ }, [
6405
+ createElementVNode("span", _hoisted_5$8, [
6406
+ renderSlot(_ctx.$slots, "prev-icon", {}, () => [
6407
+ _cache[2] || (_cache[2] = createTextVNode("‹", -1))
6408
+ ], true)
6409
+ ])
6410
+ ], 8, _hoisted_4$8),
5722
6411
  (openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item) => {
5723
6412
  return openBlock(), createElementBlock(Fragment, {
5724
6413
  key: item.type === "page" ? item.page : item.id
@@ -5727,33 +6416,39 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
5727
6416
  key: 0,
5728
6417
  type: "button",
5729
6418
  class: "tao-pagination__btn tao-pagination__btn--jump",
5730
- "aria-label": item.id === "left" ? `Назад на ${__props.jump} страниц` : `Вперёд на ${__props.jump} страниц`,
6419
+ "aria-label": item.id === "left" ? __props.jumpPrevLabel.replace("{n}", String(__props.jump)) : __props.jumpNextLabel.replace("{n}", String(__props.jump)),
5731
6420
  disabled: __props.disabled,
5732
6421
  onClick: ($event) => goTo(item.id === "left" ? current.value - __props.jump : current.value + __props.jump)
5733
- }, " … ", 8, _hoisted_5$8)) : item.type === "ellipsis" ? (openBlock(), createElementBlock("span", _hoisted_6$5, "…")) : (openBlock(), createElementBlock("button", {
6422
+ }, " … ", 8, _hoisted_6$5)) : item.type === "ellipsis" ? (openBlock(), createElementBlock("span", _hoisted_7$5, "…")) : (openBlock(), createElementBlock("button", {
5734
6423
  key: 2,
5735
6424
  type: "button",
5736
6425
  class: normalizeClass(["tao-pagination__btn", { "tao-pagination__btn--current": item.page === current.value }]),
5737
6426
  "aria-current": item.page === current.value ? "page" : void 0,
5738
- "aria-label": `Страница ${item.page}`,
6427
+ "aria-label": __props.pageLabel.replace("{page}", String(item.page)),
5739
6428
  disabled: __props.disabled,
5740
6429
  onClick: ($event) => goTo(item.page)
5741
- }, toDisplayString(item.page), 11, _hoisted_7$3))
6430
+ }, toDisplayString(item.page), 11, _hoisted_8$5))
5742
6431
  ], 64);
5743
6432
  }), 128)),
5744
6433
  createElementVNode("button", {
5745
6434
  type: "button",
5746
6435
  class: "tao-pagination__btn",
5747
- "aria-label": "Вперёд",
6436
+ "aria-label": __props.nextLabel,
5748
6437
  disabled: __props.disabled || current.value >= pageCount.value,
5749
6438
  onClick: _cache[1] || (_cache[1] = ($event) => goTo(current.value + 1))
5750
- }, " › ", 8, _hoisted_8$3)
6439
+ }, [
6440
+ createElementVNode("span", _hoisted_10$1, [
6441
+ renderSlot(_ctx.$slots, "next-icon", {}, () => [
6442
+ _cache[3] || (_cache[3] = createTextVNode("›", -1))
6443
+ ], true)
6444
+ ])
6445
+ ], 8, _hoisted_9$1)
5751
6446
  ])
5752
6447
  ], 10, _hoisted_1$b);
5753
6448
  };
5754
6449
  }
5755
6450
  });
5756
- const TaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-fd69be36"]]);
6451
+ const TaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-37f3d381"]]);
5757
6452
  const _hoisted_1$a = { class: "tao-empty" };
5758
6453
  const _hoisted_2$8 = {
5759
6454
  key: 0,
@@ -5832,8 +6527,10 @@ const _hoisted_2$7 = {
5832
6527
  };
5833
6528
  const _hoisted_3$6 = ["id"];
5834
6529
  const _hoisted_4$6 = { key: 1 };
5835
- const _hoisted_5$6 = { class: "tao-drawer__content" };
5836
- const _hoisted_6$4 = {
6530
+ const _hoisted_5$6 = ["aria-label"];
6531
+ const _hoisted_6$4 = { "aria-hidden": "true" };
6532
+ const _hoisted_7$4 = { class: "tao-drawer__content" };
6533
+ const _hoisted_8$4 = {
5837
6534
  key: 1,
5838
6535
  class: "tao-drawer__footer"
5839
6536
  };
@@ -5844,7 +6541,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5844
6541
  modelValue: { type: Boolean },
5845
6542
  title: { default: "" },
5846
6543
  side: { default: "right" },
5847
- closable: { type: Boolean, default: true }
6544
+ closable: { type: Boolean, default: true },
6545
+ closeLabel: { default: "Закрыть" }
5848
6546
  },
5849
6547
  emits: ["update:modelValue", "close"],
5850
6548
  setup(__props, { emit: __emit }) {
@@ -5852,9 +6550,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5852
6550
  const emit = __emit;
5853
6551
  const panelRef = ref(null);
5854
6552
  const titleId = useId();
5855
- let previousOverflow = "";
5856
6553
  let previousFocus = null;
5857
- let scrollLocked = false;
6554
+ let scrollHeld = false;
5858
6555
  function close() {
5859
6556
  if (!props.closable) {
5860
6557
  return;
@@ -5862,21 +6559,19 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5862
6559
  emit("update:modelValue", false);
5863
6560
  emit("close");
5864
6561
  }
5865
- function lockBodyScroll() {
5866
- if (scrollLocked) {
6562
+ function holdScroll() {
6563
+ if (scrollHeld || !isBrowser()) {
5867
6564
  return;
5868
6565
  }
5869
- previousOverflow = document.body.style.overflow;
5870
- document.body.style.overflow = "hidden";
5871
- scrollLocked = true;
6566
+ lockBodyScroll();
6567
+ scrollHeld = true;
5872
6568
  }
5873
- function unlockBodyScroll() {
5874
- if (!scrollLocked) {
6569
+ function releaseScroll() {
6570
+ if (!scrollHeld) {
5875
6571
  return;
5876
6572
  }
5877
- document.body.style.overflow = previousOverflow;
5878
- previousOverflow = "";
5879
- scrollLocked = false;
6573
+ unlockBodyScroll();
6574
+ scrollHeld = false;
5880
6575
  }
5881
6576
  function restoreFocus() {
5882
6577
  var _a;
@@ -5894,6 +6589,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5894
6589
  }
5895
6590
  function onKeydown(event) {
5896
6591
  if (event.key === "Escape") {
6592
+ if (!props.closable) {
6593
+ return;
6594
+ }
5897
6595
  event.preventDefault();
5898
6596
  close();
5899
6597
  return;
@@ -5905,19 +6603,23 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5905
6603
  watch(
5906
6604
  () => props.modelValue,
5907
6605
  (isOpen) => {
6606
+ if (!isBrowser()) {
6607
+ return;
6608
+ }
5908
6609
  if (isOpen) {
5909
6610
  previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
5910
- lockBodyScroll();
6611
+ holdScroll();
5911
6612
  void focusPanel();
5912
6613
  return;
5913
6614
  }
5914
- unlockBodyScroll();
6615
+ releaseScroll();
5915
6616
  restoreFocus();
5916
6617
  },
5917
6618
  { immediate: true }
5918
6619
  );
5919
6620
  onBeforeUnmount(() => {
5920
- unlockBodyScroll();
6621
+ releaseScroll();
6622
+ restoreFocus();
5921
6623
  });
5922
6624
  return (_ctx, _cache) => {
5923
6625
  return openBlock(), createBlock(Teleport, { to: "body" }, [
@@ -5953,14 +6655,20 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5953
6655
  key: 2,
5954
6656
  type: "button",
5955
6657
  class: "tao-drawer__close",
5956
- "aria-label": "Закрыть",
6658
+ "aria-label": __props.closeLabel,
5957
6659
  onClick: close
5958
- }, " × ")) : createCommentVNode("", true)
6660
+ }, [
6661
+ createElementVNode("span", _hoisted_6$4, [
6662
+ renderSlot(_ctx.$slots, "close-icon", {}, () => [
6663
+ _cache[0] || (_cache[0] = createTextVNode("×", -1))
6664
+ ], true)
6665
+ ])
6666
+ ], 8, _hoisted_5$6)) : createCommentVNode("", true)
5959
6667
  ])) : createCommentVNode("", true),
5960
- createElementVNode("div", _hoisted_5$6, [
6668
+ createElementVNode("div", _hoisted_7$4, [
5961
6669
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
5962
6670
  ]),
5963
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_6$4, [
6671
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$4, [
5964
6672
  renderSlot(_ctx.$slots, "footer", {}, void 0, true)
5965
6673
  ])) : createCommentVNode("", true)
5966
6674
  ], 8, _hoisted_1$8)
@@ -5972,7 +6680,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5972
6680
  };
5973
6681
  }
5974
6682
  });
5975
- const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-6a0c0e98"]]);
6683
+ const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-10fb02f2"]]);
5976
6684
  const _hoisted_1$7 = ["title"];
5977
6685
  const _hoisted_2$6 = { class: "tao-avatar__face" };
5978
6686
  const _hoisted_3$5 = ["src", "alt"];
@@ -5991,7 +6699,10 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
5991
6699
  alt: { default: "" },
5992
6700
  size: { default: "medium" },
5993
6701
  dot: { type: [Boolean, String], default: false },
5994
- count: { default: void 0 }
6702
+ count: { default: void 0 },
6703
+ fallbackLabel: { default: "Аватар" },
6704
+ notificationsLabel: { default: "{count} уведомлений" },
6705
+ dotLabels: { default: () => ({}) }
5995
6706
  },
5996
6707
  setup(__props) {
5997
6708
  const props = __props;
@@ -6036,7 +6747,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
6036
6747
  }
6037
6748
  return String(props.count);
6038
6749
  });
6039
- const dotLabel = {
6750
+ const defaultDotLabel = {
6040
6751
  success: "в сети",
6041
6752
  danger: "занят",
6042
6753
  warning: "отошёл",
@@ -6044,28 +6755,40 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
6044
6755
  neutral: "не в сети"
6045
6756
  };
6046
6757
  const label = computed(() => {
6047
- const base = props.alt || props.name || "Аватар";
6758
+ const base = props.alt || props.name || props.fallbackLabel;
6048
6759
  const extra = [];
6049
6760
  if (dotTone.value) {
6050
- extra.push(dotLabel[dotTone.value]);
6761
+ extra.push(props.dotLabels[dotTone.value] ?? defaultDotLabel[dotTone.value]);
6051
6762
  }
6052
6763
  if (badge.value) {
6053
- extra.push(`${badge.value} уведомлений`);
6764
+ extra.push(props.notificationsLabel.replace("{count}", badge.value));
6054
6765
  }
6055
6766
  return extra.length ? `${base}, ${extra.join(", ")}` : base;
6056
6767
  });
6768
+ const imgFailed = ref(false);
6769
+ const showImage = computed(() => Boolean(props.src) && !imgFailed.value);
6770
+ watch(
6771
+ () => props.src,
6772
+ () => {
6773
+ imgFailed.value = false;
6774
+ }
6775
+ );
6776
+ function onImgError() {
6777
+ imgFailed.value = true;
6778
+ }
6057
6779
  return (_ctx, _cache) => {
6058
6780
  return openBlock(), createElementBlock("span", {
6059
6781
  class: normalizeClass(["tao-avatar", `tao-avatar--${sizeClass.value}`]),
6060
6782
  title: label.value
6061
6783
  }, [
6062
6784
  createElementVNode("span", _hoisted_2$6, [
6063
- __props.src ? (openBlock(), createElementBlock("img", {
6785
+ showImage.value ? (openBlock(), createElementBlock("img", {
6064
6786
  key: 0,
6065
6787
  class: "tao-avatar__img",
6066
6788
  src: __props.src,
6067
- alt: label.value
6068
- }, null, 8, _hoisted_3$5)) : (openBlock(), createElementBlock("span", {
6789
+ alt: label.value,
6790
+ onError: onImgError
6791
+ }, null, 40, _hoisted_3$5)) : (openBlock(), createElementBlock("span", {
6069
6792
  key: 1,
6070
6793
  class: "tao-avatar__fallback",
6071
6794
  "aria-label": label.value
@@ -6081,11 +6804,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
6081
6804
  };
6082
6805
  }
6083
6806
  });
6084
- const TaoAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-cb4ec893"]]);
6085
- const _hoisted_1$6 = {
6086
- class: "tao-breadcrumb",
6087
- "aria-label": "Хлебные крошки"
6088
- };
6807
+ const TaoAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-65ed2d7a"]]);
6808
+ const _hoisted_1$6 = ["aria-label"];
6089
6809
  const _hoisted_2$5 = { class: "tao-breadcrumb__list" };
6090
6810
  const _hoisted_3$4 = {
6091
6811
  key: 0,
@@ -6105,11 +6825,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
6105
6825
  ...{ name: "TaoBreadcrumb" },
6106
6826
  __name: "TaoBreadcrumb",
6107
6827
  props: {
6108
- items: {}
6828
+ items: {},
6829
+ ariaLabel: { default: "Хлебные крошки" }
6109
6830
  },
6110
6831
  setup(__props) {
6111
6832
  return (_ctx, _cache) => {
6112
- return openBlock(), createElementBlock("nav", _hoisted_1$6, [
6833
+ return openBlock(), createElementBlock("nav", {
6834
+ class: "tao-breadcrumb",
6835
+ "aria-label": __props.ariaLabel
6836
+ }, [
6113
6837
  createElementVNode("ol", _hoisted_2$5, [
6114
6838
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
6115
6839
  return openBlock(), createElementBlock("li", {
@@ -6130,11 +6854,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
6130
6854
  ]);
6131
6855
  }), 128))
6132
6856
  ])
6133
- ]);
6857
+ ], 8, _hoisted_1$6);
6134
6858
  };
6135
6859
  }
6136
6860
  });
6137
- const TaoBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-48cf9bb5"]]);
6861
+ const TaoBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-94ab1f67"]]);
6138
6862
  const _hoisted_1$5 = ["aria-label"];
6139
6863
  const _hoisted_2$4 = {
6140
6864
  class: "tao-counter__row",
@@ -6218,16 +6942,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
6218
6942
  });
6219
6943
  const TaoCounter = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-6b746f2f"]]);
6220
6944
  const _hoisted_1$4 = { class: "tao-carousel__row" };
6221
- const _hoisted_2$3 = ["disabled"];
6222
- const _hoisted_3$3 = ["aria-label"];
6223
- const _hoisted_4$3 = ["disabled"];
6224
- const _hoisted_5$3 = {
6225
- key: 0,
6226
- class: "tao-carousel__dots",
6227
- role: "group",
6228
- "aria-label": "Слайды"
6229
- };
6230
- const _hoisted_6$3 = ["aria-label", "aria-current", "onClick"];
6945
+ const _hoisted_2$3 = ["aria-label", "disabled"];
6946
+ const _hoisted_3$3 = { "aria-hidden": "true" };
6947
+ const _hoisted_4$3 = ["aria-label"];
6948
+ const _hoisted_5$3 = ["aria-label", "disabled"];
6949
+ const _hoisted_6$3 = { "aria-hidden": "true" };
6950
+ const _hoisted_7$3 = ["aria-label"];
6951
+ const _hoisted_8$3 = ["aria-label", "aria-current", "onClick"];
6231
6952
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6232
6953
  ...{ name: "TaoCarousel" },
6233
6954
  __name: "TaoCarousel",
@@ -6239,7 +6960,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6239
6960
  autoplay: { default: 0 },
6240
6961
  loop: { type: Boolean, default: false },
6241
6962
  dots: { type: Boolean, default: false },
6242
- ariaLabel: { default: "Лента" }
6963
+ ariaLabel: { default: "Лента" },
6964
+ prevLabel: { default: "Назад" },
6965
+ nextLabel: { default: "Вперёд" },
6966
+ dotsLabel: { default: "Слайды" },
6967
+ slideLabel: { default: "Слайд {n} из {count}" }
6243
6968
  },
6244
6969
  emits: ["update:modelValue", "change"],
6245
6970
  setup(__props, { emit: __emit }) {
@@ -6288,7 +7013,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6288
7013
  return 0;
6289
7014
  }
6290
7015
  const left = ((_a = track.value) == null ? void 0 : _a.scrollLeft) ?? 0;
6291
- return Math.min(Math.max(Math.round(left / (width + gap)), 0), total - 1);
7016
+ const last = Math.max(total - step.value, 0);
7017
+ return Math.min(Math.max(Math.round(left / (width + gap)), 0), last);
6292
7018
  }
6293
7019
  function setIndex(next) {
6294
7020
  if (next === index.value) {
@@ -6339,13 +7065,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6339
7065
  autoplayTimer = 0;
6340
7066
  }
6341
7067
  function canAutoplay() {
6342
- return props.autoplay > 0 && count.value > step.value && !hoverPaused.value && !focusPaused.value && !dragging.value && typeof document !== "undefined" && !document.hidden && !prefersReducedMotion();
7068
+ return props.autoplay > 0 && count.value > step.value && !hoverPaused.value && !focusPaused.value && !dragging.value && typeof document !== "undefined" && !document.hidden && !prefersReducedMotion() && (props.loop || index.value < lastIndex.value);
6343
7069
  }
6344
7070
  function tickAutoplay() {
6345
7071
  if (!canAutoplay()) {
6346
- return;
6347
- }
6348
- if (!props.loop && index.value >= lastIndex.value) {
6349
7072
  stopAutoplay();
6350
7073
  return;
6351
7074
  }
@@ -6385,7 +7108,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6385
7108
  }
6386
7109
  cancelAnimationFrame(scrollFrame);
6387
7110
  scrollFrame = requestAnimationFrame(() => {
6388
- setIndex(nearestIndex());
7111
+ const next = nearestIndex();
7112
+ const { width, gap } = metrics();
7113
+ const el = track.value;
7114
+ if (el && width > 0 && el.scrollLeft - next * (width + gap) > (width + gap) / 2) {
7115
+ goTo(next, true);
7116
+ return;
7117
+ }
7118
+ setIndex(next);
6389
7119
  });
6390
7120
  }
6391
7121
  function releaseDragCapture() {
@@ -6490,7 +7220,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6490
7220
  }
6491
7221
  );
6492
7222
  watch(
6493
- () => [props.autoplay, props.loop, count.value, dragging.value],
7223
+ () => [props.autoplay, props.loop, count.value, dragging.value, index.value],
6494
7224
  () => syncAutoplay()
6495
7225
  );
6496
7226
  onMounted(() => {
@@ -6530,27 +7260,30 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6530
7260
  key: 0,
6531
7261
  type: "button",
6532
7262
  class: "tao-carousel__nav",
6533
- "aria-label": "Назад",
7263
+ "aria-label": __props.prevLabel,
6534
7264
  disabled: atStart.value,
6535
7265
  onClick: goPrev
6536
- }, [..._cache[0] || (_cache[0] = [
6537
- createElementVNode("svg", {
6538
- viewBox: "0 0 24 24",
6539
- width: "16",
6540
- height: "16",
6541
- "aria-hidden": "true",
6542
- focusable: "false"
6543
- }, [
6544
- createElementVNode("path", {
6545
- fill: "none",
6546
- stroke: "currentColor",
6547
- "stroke-width": "2.2",
6548
- "stroke-linecap": "round",
6549
- "stroke-linejoin": "round",
6550
- d: "M14.5 5 8 12l6.5 7"
6551
- })
6552
- ], -1)
6553
- ])], 8, _hoisted_2$3)) : createCommentVNode("", true)
7266
+ }, [
7267
+ createElementVNode("span", _hoisted_3$3, [
7268
+ renderSlot(_ctx.$slots, "prev-icon", {}, () => [
7269
+ _cache[0] || (_cache[0] = createElementVNode("svg", {
7270
+ viewBox: "0 0 24 24",
7271
+ width: "16",
7272
+ height: "16",
7273
+ focusable: "false"
7274
+ }, [
7275
+ createElementVNode("path", {
7276
+ fill: "none",
7277
+ stroke: "currentColor",
7278
+ "stroke-width": "2.2",
7279
+ "stroke-linecap": "round",
7280
+ "stroke-linejoin": "round",
7281
+ d: "M14.5 5 8 12l6.5 7"
7282
+ })
7283
+ ], -1))
7284
+ ], true)
7285
+ ])
7286
+ ], 8, _hoisted_2$3)) : createCommentVNode("", true)
6554
7287
  ], true),
6555
7288
  createElementVNode("div", {
6556
7289
  ref_key: "track",
@@ -6569,7 +7302,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6569
7302
  onClickCapture
6570
7303
  }, [
6571
7304
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
6572
- ], 42, _hoisted_3$3),
7305
+ ], 42, _hoisted_4$3),
6573
7306
  renderSlot(_ctx.$slots, "next", {
6574
7307
  disabled: atEnd.value,
6575
7308
  go: goNext
@@ -6578,27 +7311,30 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6578
7311
  key: 0,
6579
7312
  type: "button",
6580
7313
  class: "tao-carousel__nav",
6581
- "aria-label": "Вперёд",
7314
+ "aria-label": __props.nextLabel,
6582
7315
  disabled: atEnd.value,
6583
7316
  onClick: goNext
6584
- }, [..._cache[1] || (_cache[1] = [
6585
- createElementVNode("svg", {
6586
- viewBox: "0 0 24 24",
6587
- width: "16",
6588
- height: "16",
6589
- "aria-hidden": "true",
6590
- focusable: "false"
6591
- }, [
6592
- createElementVNode("path", {
6593
- fill: "none",
6594
- stroke: "currentColor",
6595
- "stroke-width": "2.2",
6596
- "stroke-linecap": "round",
6597
- "stroke-linejoin": "round",
6598
- d: "M9.5 5 16 12l-6.5 7"
6599
- })
6600
- ], -1)
6601
- ])], 8, _hoisted_4$3)) : createCommentVNode("", true)
7317
+ }, [
7318
+ createElementVNode("span", _hoisted_6$3, [
7319
+ renderSlot(_ctx.$slots, "next-icon", {}, () => [
7320
+ _cache[1] || (_cache[1] = createElementVNode("svg", {
7321
+ viewBox: "0 0 24 24",
7322
+ width: "16",
7323
+ height: "16",
7324
+ focusable: "false"
7325
+ }, [
7326
+ createElementVNode("path", {
7327
+ fill: "none",
7328
+ stroke: "currentColor",
7329
+ "stroke-width": "2.2",
7330
+ "stroke-linecap": "round",
7331
+ "stroke-linejoin": "round",
7332
+ d: "M9.5 5 16 12l-6.5 7"
7333
+ })
7334
+ ], -1))
7335
+ ], true)
7336
+ ])
7337
+ ], 8, _hoisted_5$3)) : createCommentVNode("", true)
6602
7338
  ], true)
6603
7339
  ]),
6604
7340
  renderSlot(_ctx.$slots, "dots", {
@@ -6606,13 +7342,18 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6606
7342
  count: snapCount.value,
6607
7343
  go: goTo
6608
7344
  }, () => [
6609
- showDots.value ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
7345
+ showDots.value ? (openBlock(), createElementBlock("div", {
7346
+ key: 0,
7347
+ class: "tao-carousel__dots",
7348
+ role: "group",
7349
+ "aria-label": __props.dotsLabel
7350
+ }, [
6610
7351
  (openBlock(true), createElementBlock(Fragment, null, renderList(snapCount.value, (n) => {
6611
7352
  return openBlock(), createElementBlock("button", {
6612
7353
  key: n,
6613
7354
  type: "button",
6614
7355
  class: normalizeClass(["tao-carousel__dot", { "tao-carousel__dot--active": n - 1 === index.value }]),
6615
- "aria-label": `Слайд ${n} из ${snapCount.value}`,
7356
+ "aria-label": __props.slideLabel.replace("{n}", String(n)).replace("{count}", String(snapCount.value)),
6616
7357
  "aria-current": n - 1 === index.value ? "true" : void 0,
6617
7358
  onClick: ($event) => goTo(n - 1)
6618
7359
  }, [
@@ -6623,15 +7364,15 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6623
7364
  }, () => [
6624
7365
  _cache[2] || (_cache[2] = createElementVNode("span", { class: "tao-carousel__pip" }, null, -1))
6625
7366
  ], true)
6626
- ], 10, _hoisted_6$3);
7367
+ ], 10, _hoisted_8$3);
6627
7368
  }), 128))
6628
- ])) : createCommentVNode("", true)
7369
+ ], 8, _hoisted_7$3)) : createCommentVNode("", true)
6629
7370
  ], true)
6630
7371
  ], 36);
6631
7372
  };
6632
7373
  }
6633
7374
  });
6634
- const TaoCarousel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-4f6de725"]]);
7375
+ const TaoCarousel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-bc396e5d"]]);
6635
7376
  const _hoisted_1$3 = ["aria-label"];
6636
7377
  const _hoisted_2$2 = ["aria-label"];
6637
7378
  const _hoisted_3$2 = {
@@ -6673,11 +7414,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
6673
7414
  props: {
6674
7415
  items: { default: () => [] },
6675
7416
  vertical: { type: Boolean, default: true },
6676
- ariaLabel: { default: "Стадии" }
7417
+ ariaLabel: { default: "Стадии" },
7418
+ statusLabels: { default: () => ({}) }
6677
7419
  },
6678
7420
  setup(__props) {
6679
7421
  const props = __props;
6680
- const statusText = {
7422
+ const fallbackStatusText = {
6681
7423
  wait: "ожидание",
6682
7424
  work: "в работе",
6683
7425
  ok: "готово",
@@ -6690,7 +7432,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
6690
7432
  return item.status ?? "wait";
6691
7433
  }
6692
7434
  function itemLabel(item) {
6693
- return `${item.label ?? item.key}, ${statusText[statusOf(item)]}`;
7435
+ const status = statusOf(item);
7436
+ return `${item.label ?? item.key}, ${props.statusLabels[status] ?? fallbackStatusText[status]}`;
6694
7437
  }
6695
7438
  return (_ctx, _cache) => {
6696
7439
  return openBlock(), createElementBlock("ul", {
@@ -6764,7 +7507,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
6764
7507
  };
6765
7508
  }
6766
7509
  });
6767
- const TaoStages = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-fefa5c65"]]);
7510
+ const TaoStages = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-b62db56d"]]);
6768
7511
  const TOAST_POSITIONS = [
6769
7512
  "topRight",
6770
7513
  "topLeft",
@@ -6778,7 +7521,8 @@ const toastDefaults = {
6778
7521
  position: "topCenter",
6779
7522
  timeout: 3e3,
6780
7523
  closable: true,
6781
- progress: true
7524
+ progress: true,
7525
+ closeLabel: "Закрыть уведомление"
6782
7526
  };
6783
7527
  const toasts = ref([]);
6784
7528
  const toastsByPosition = computed(() => {
@@ -6889,6 +7633,7 @@ const _hoisted_10 = {
6889
7633
  key: 2,
6890
7634
  class: "tao-toast__actions"
6891
7635
  };
7636
+ const _hoisted_11 = ["aria-label"];
6892
7637
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6893
7638
  ...{ name: "TaoToastItem" },
6894
7639
  __name: "TaoToastItem",
@@ -7057,9 +7802,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7057
7802
  key: 0,
7058
7803
  type: "button",
7059
7804
  class: "tao-toast__close",
7060
- "aria-label": "Закрыть уведомление",
7805
+ "aria-label": unref(toastDefaults).closeLabel,
7061
7806
  onClick: close
7062
- }, " × ")) : createCommentVNode("", true),
7807
+ }, " × ", 8, _hoisted_11)) : createCommentVNode("", true),
7063
7808
  __props.toast.progress && __props.toast.timeout ? (openBlock(), createElementBlock("span", {
7064
7809
  key: 1,
7065
7810
  class: "tao-toast__progress",
@@ -7069,7 +7814,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
7069
7814
  };
7070
7815
  }
7071
7816
  });
7072
- const TaoToastItem = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-7c4692c0"]]);
7817
+ const TaoToastItem = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-3909ff09"]]);
7073
7818
  const _hoisted_1$1 = { class: "tao-toast-slot__inner" };
7074
7819
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7075
7820
  ...{ name: "TaoToastViewport" },
@@ -7204,14 +7949,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7204
7949
  __name: "TaoConfirmHost",
7205
7950
  setup(__props) {
7206
7951
  const panelRef = ref(null);
7207
- let previousOverflow = "";
7208
7952
  let previousFocus = null;
7209
- let scrollLocked = false;
7953
+ let scrollHeld = false;
7210
7954
  onMounted(() => {
7211
7955
  registerConfirmHost();
7212
7956
  });
7213
7957
  onBeforeUnmount(() => {
7214
- unlockBodyScroll();
7958
+ releaseScroll();
7215
7959
  unregisterConfirmHost();
7216
7960
  });
7217
7961
  watch(
@@ -7222,12 +7966,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7222
7966
  async (id) => {
7223
7967
  var _a, _b;
7224
7968
  if (!id) {
7225
- unlockBodyScroll();
7969
+ releaseScroll();
7226
7970
  restoreFocus();
7227
7971
  return;
7228
7972
  }
7973
+ if (!isBrowser()) {
7974
+ return;
7975
+ }
7229
7976
  previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
7230
- lockBodyScroll();
7977
+ holdScroll();
7231
7978
  await nextTick();
7232
7979
  (_b = queryButton(((_a = currentConfirm.value) == null ? void 0 : _a.danger) ? "cancel" : "ok")) == null ? void 0 : _b.focus();
7233
7980
  }
@@ -7236,21 +7983,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7236
7983
  var _a;
7237
7984
  return ((_a = panelRef.value) == null ? void 0 : _a.querySelector(`[data-tao-confirm-${which}]`)) ?? null;
7238
7985
  }
7239
- function lockBodyScroll() {
7240
- if (scrollLocked) {
7986
+ function holdScroll() {
7987
+ if (scrollHeld || !isBrowser()) {
7241
7988
  return;
7242
7989
  }
7243
- previousOverflow = document.body.style.overflow;
7244
- document.body.style.overflow = "hidden";
7245
- scrollLocked = true;
7990
+ lockBodyScroll();
7991
+ scrollHeld = true;
7246
7992
  }
7247
- function unlockBodyScroll() {
7248
- if (!scrollLocked) {
7993
+ function releaseScroll() {
7994
+ if (!scrollHeld) {
7249
7995
  return;
7250
7996
  }
7251
- document.body.style.overflow = previousOverflow;
7252
- previousOverflow = "";
7253
- scrollLocked = false;
7997
+ unlockBodyScroll();
7998
+ scrollHeld = false;
7254
7999
  }
7255
8000
  function restoreFocus() {
7256
8001
  var _a;
@@ -7264,26 +8009,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7264
8009
  answer(false);
7265
8010
  }
7266
8011
  function onKeydown(event) {
7267
- var _a, _b;
7268
8012
  if (event.key === "Escape") {
7269
8013
  event.preventDefault();
7270
8014
  answer(false);
7271
8015
  return;
7272
8016
  }
7273
- if (event.key !== "Tab") {
7274
- return;
7275
- }
7276
- const first = queryButton(((_a = currentConfirm.value) == null ? void 0 : _a.danger) ? "cancel" : "ok");
7277
- const last = queryButton(((_b = currentConfirm.value) == null ? void 0 : _b.danger) ? "ok" : "cancel");
7278
- if (!first || !last) {
7279
- return;
7280
- }
7281
- if (event.shiftKey && document.activeElement === first) {
7282
- event.preventDefault();
7283
- last.focus();
7284
- } else if (!event.shiftKey && document.activeElement === last) {
7285
- event.preventDefault();
7286
- first.focus();
8017
+ if (panelRef.value) {
8018
+ trapTab(event, panelRef.value);
7287
8019
  }
7288
8020
  }
7289
8021
  return (_ctx, _cache) => {
@@ -7386,7 +8118,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7386
8118
  };
7387
8119
  }
7388
8120
  });
7389
- const TaoConfirmHost = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-503301db"]]);
8121
+ const TaoConfirmHost = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d54ae27e"]]);
7390
8122
  const TYPE_TIMEOUT = {
7391
8123
  success: 3e3,
7392
8124
  error: 5e3,
@@ -7778,8 +8510,9 @@ const components = [
7778
8510
  TaoSpoilerGroup,
7779
8511
  TaoCopy,
7780
8512
  TaoContainer,
7781
- _sfc_main$F,
8513
+ _sfc_main$G,
7782
8514
  TaoSpace,
8515
+ TaoSplit,
7783
8516
  TaoIcon,
7784
8517
  TaoLoader,
7785
8518
  TaoImage,
@@ -7850,7 +8583,7 @@ export {
7850
8583
  TaoEmpty,
7851
8584
  TaoFieldset,
7852
8585
  TaoFileDrop,
7853
- _sfc_main$F as TaoFlex,
8586
+ _sfc_main$G as TaoFlex,
7854
8587
  TaoFormField,
7855
8588
  TaoIcon,
7856
8589
  TaoImage,
@@ -7874,6 +8607,7 @@ export {
7874
8607
  TaoSkeleton,
7875
8608
  TaoSlider,
7876
8609
  TaoSpace,
8610
+ TaoSplit,
7877
8611
  TaoSpoiler,
7878
8612
  TaoSpoilerGroup,
7879
8613
  TaoStages,