@1337exp/taoui 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -2
- package/README.ru.md +17 -2
- package/dist/index.cjs +907 -551
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +281 -128
- package/dist/index.mjs +907 -551
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +420 -232
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
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$
|
|
3
|
-
const _hoisted_2$
|
|
2
|
+
const _hoisted_1$P = ["type", "disabled"];
|
|
3
|
+
const _hoisted_2$I = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "tao-button__loader"
|
|
6
6
|
};
|
|
7
|
-
const _hoisted_3$
|
|
7
|
+
const _hoisted_3$B = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "tao-button__icon"
|
|
10
10
|
};
|
|
11
|
-
const _hoisted_4$
|
|
12
|
-
const _sfc_main$
|
|
11
|
+
const _hoisted_4$v = { class: "tao-button__content" };
|
|
12
|
+
const _sfc_main$X = /* @__PURE__ */ defineComponent({
|
|
13
13
|
...{ name: "TaoButton" },
|
|
14
14
|
__name: "TaoButton",
|
|
15
15
|
props: {
|
|
@@ -48,12 +48,12 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
48
48
|
disabled: __props.disabled || __props.loading,
|
|
49
49
|
onClick: handleClick
|
|
50
50
|
}, [
|
|
51
|
-
__props.loading ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
52
|
-
__props.icon ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
53
|
-
createElementVNode("span", _hoisted_4$
|
|
51
|
+
__props.loading ? (openBlock(), createElementBlock("span", _hoisted_2$I)) : createCommentVNode("", true),
|
|
52
|
+
__props.icon ? (openBlock(), createElementBlock("span", _hoisted_3$B, toDisplayString(__props.icon), 1)) : createCommentVNode("", true),
|
|
53
|
+
createElementVNode("span", _hoisted_4$v, [
|
|
54
54
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
55
55
|
])
|
|
56
|
-
], 10, _hoisted_1$
|
|
56
|
+
], 10, _hoisted_1$P);
|
|
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$
|
|
68
|
-
const _sfc_main$
|
|
67
|
+
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-c3034f66"]]);
|
|
68
|
+
const _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
69
69
|
...{ name: "TaoBlock" },
|
|
70
70
|
__name: "TaoBlock",
|
|
71
71
|
props: {
|
|
@@ -97,24 +97,24 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
|
-
const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
100
|
+
const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-feb87e36"]]);
|
|
101
101
|
const formFieldKey = Symbol("taoFormField");
|
|
102
|
-
const _hoisted_1$
|
|
103
|
-
const _hoisted_2$
|
|
104
|
-
const _hoisted_3$
|
|
102
|
+
const _hoisted_1$O = { class: "tao-input-wrapper" };
|
|
103
|
+
const _hoisted_2$H = ["for"];
|
|
104
|
+
const _hoisted_3$A = {
|
|
105
105
|
key: 0,
|
|
106
106
|
class: "tao-input__affix tao-input__affix--prefix"
|
|
107
107
|
};
|
|
108
|
-
const _hoisted_4$
|
|
108
|
+
const _hoisted_4$u = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
|
|
109
109
|
const _hoisted_5$m = {
|
|
110
110
|
key: 1,
|
|
111
111
|
class: "tao-input__affix tao-input__affix--suffix"
|
|
112
112
|
};
|
|
113
|
-
const _hoisted_6$
|
|
113
|
+
const _hoisted_6$h = {
|
|
114
114
|
key: 1,
|
|
115
115
|
class: "tao-input__error"
|
|
116
116
|
};
|
|
117
|
-
const _sfc_main$
|
|
117
|
+
const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
118
118
|
...{ name: "TaoInput" },
|
|
119
119
|
__name: "TaoInput",
|
|
120
120
|
props: {
|
|
@@ -150,12 +150,12 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
150
150
|
emit("focus", event);
|
|
151
151
|
}
|
|
152
152
|
return (_ctx, _cache) => {
|
|
153
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
153
|
+
return openBlock(), createElementBlock("div", _hoisted_1$O, [
|
|
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$
|
|
158
|
+
}, toDisplayString(__props.label), 9, _hoisted_2$H)) : 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$T = /* @__PURE__ */ defineComponent({
|
|
|
165
165
|
"tao-input-shell--suffix": _ctx.$slots.suffix
|
|
166
166
|
}])
|
|
167
167
|
}, [
|
|
168
|
-
_ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
168
|
+
_ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_3$A, [
|
|
169
169
|
renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
170
170
|
])) : createCommentVNode("", true),
|
|
171
171
|
createElementVNode("input", {
|
|
@@ -180,27 +180,27 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
180
180
|
onInput: handleInput,
|
|
181
181
|
onBlur: handleBlur,
|
|
182
182
|
onFocus: handleFocus
|
|
183
|
-
}, null, 42, _hoisted_4$
|
|
183
|
+
}, null, 42, _hoisted_4$u),
|
|
184
184
|
_ctx.$slots.suffix ? (openBlock(), createElementBlock("span", _hoisted_5$m, [
|
|
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$
|
|
188
|
+
__props.error && __props.errorMessage ? (openBlock(), createElementBlock("span", _hoisted_6$h, toDisplayString(__props.errorMessage), 1)) : createCommentVNode("", true)
|
|
189
189
|
]);
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
192
|
});
|
|
193
|
-
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
194
|
-
const _hoisted_1$
|
|
193
|
+
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-b522e041"]]);
|
|
194
|
+
const _hoisted_1$N = {
|
|
195
195
|
key: 0,
|
|
196
196
|
class: "tao-input-group__addon tao-input-group__addon--before"
|
|
197
197
|
};
|
|
198
|
-
const _hoisted_2$
|
|
199
|
-
const _hoisted_3$
|
|
198
|
+
const _hoisted_2$G = { class: "tao-input-group__field" };
|
|
199
|
+
const _hoisted_3$z = {
|
|
200
200
|
key: 1,
|
|
201
201
|
class: "tao-input-group__addon tao-input-group__addon--after"
|
|
202
202
|
};
|
|
203
|
-
const _sfc_main$
|
|
203
|
+
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
204
204
|
...{ name: "TaoInputGroup" },
|
|
205
205
|
__name: "TaoInputGroup",
|
|
206
206
|
setup(__props) {
|
|
@@ -222,30 +222,30 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
222
222
|
onFocusin: onFocusIn,
|
|
223
223
|
onFocusout: onFocusOut
|
|
224
224
|
}, [
|
|
225
|
-
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
225
|
+
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_1$N, [
|
|
226
226
|
renderSlot(_ctx.$slots, "before", {}, void 0, true)
|
|
227
227
|
])) : createCommentVNode("", true),
|
|
228
|
-
createElementVNode("div", _hoisted_2$
|
|
228
|
+
createElementVNode("div", _hoisted_2$G, [
|
|
229
229
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
230
230
|
]),
|
|
231
|
-
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
231
|
+
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_3$z, [
|
|
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$
|
|
239
|
-
const _hoisted_1$
|
|
240
|
-
const _hoisted_2$
|
|
238
|
+
const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-f06bb3b1"]]);
|
|
239
|
+
const _hoisted_1$M = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
240
|
+
const _hoisted_2$F = {
|
|
241
241
|
key: 0,
|
|
242
242
|
class: "tao-input-number__steppers"
|
|
243
243
|
};
|
|
244
|
-
const _hoisted_3$
|
|
245
|
-
const _hoisted_4$
|
|
244
|
+
const _hoisted_3$y = ["aria-label", "disabled"];
|
|
245
|
+
const _hoisted_4$t = { "aria-hidden": "true" };
|
|
246
246
|
const _hoisted_5$l = ["aria-label", "disabled"];
|
|
247
|
-
const _hoisted_6$
|
|
248
|
-
const _sfc_main$
|
|
247
|
+
const _hoisted_6$g = { "aria-hidden": "true" };
|
|
248
|
+
const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
249
249
|
...{ name: "TaoInputNumber" },
|
|
250
250
|
__name: "TaoInputNumber",
|
|
251
251
|
props: {
|
|
@@ -396,8 +396,8 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
396
396
|
onFocus,
|
|
397
397
|
onBlur,
|
|
398
398
|
onKeydown
|
|
399
|
-
}, null, 40, _hoisted_1$
|
|
400
|
-
__props.controls ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
399
|
+
}, null, 40, _hoisted_1$M),
|
|
400
|
+
__props.controls ? (openBlock(), createElementBlock("div", _hoisted_2$F, [
|
|
401
401
|
createElementVNode("button", {
|
|
402
402
|
type: "button",
|
|
403
403
|
class: "tao-input-number__step",
|
|
@@ -406,12 +406,12 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
406
406
|
disabled: __props.disabled || atMax.value,
|
|
407
407
|
onClick: _cache[0] || (_cache[0] = ($event) => bump(1))
|
|
408
408
|
}, [
|
|
409
|
-
createElementVNode("span", _hoisted_4$
|
|
409
|
+
createElementVNode("span", _hoisted_4$t, [
|
|
410
410
|
renderSlot(_ctx.$slots, "increment-icon", {}, () => [
|
|
411
411
|
_cache[2] || (_cache[2] = createTextVNode("+", -1))
|
|
412
412
|
], true)
|
|
413
413
|
])
|
|
414
|
-
], 8, _hoisted_3$
|
|
414
|
+
], 8, _hoisted_3$y),
|
|
415
415
|
createElementVNode("button", {
|
|
416
416
|
type: "button",
|
|
417
417
|
class: "tao-input-number__step",
|
|
@@ -420,7 +420,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
420
420
|
disabled: __props.disabled || atMin.value,
|
|
421
421
|
onClick: _cache[1] || (_cache[1] = ($event) => bump(-1))
|
|
422
422
|
}, [
|
|
423
|
-
createElementVNode("span", _hoisted_6$
|
|
423
|
+
createElementVNode("span", _hoisted_6$g, [
|
|
424
424
|
renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
|
|
425
425
|
_cache[3] || (_cache[3] = createTextVNode("−", -1))
|
|
426
426
|
], true)
|
|
@@ -431,13 +431,13 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
433
|
});
|
|
434
|
-
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
435
|
-
const _hoisted_1$
|
|
436
|
-
const _hoisted_2$
|
|
437
|
-
const _hoisted_3$
|
|
438
|
-
const _hoisted_4$
|
|
434
|
+
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-331dd958"]]);
|
|
435
|
+
const _hoisted_1$L = ["aria-label", "disabled"];
|
|
436
|
+
const _hoisted_2$E = { "aria-hidden": "true" };
|
|
437
|
+
const _hoisted_3$x = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
438
|
+
const _hoisted_4$s = ["aria-label", "disabled"];
|
|
439
439
|
const _hoisted_5$k = { "aria-hidden": "true" };
|
|
440
|
-
const _sfc_main$
|
|
440
|
+
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
441
441
|
...{ name: "TaoQuantity" },
|
|
442
442
|
__name: "TaoQuantity",
|
|
443
443
|
props: {
|
|
@@ -574,12 +574,12 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
574
574
|
disabled: minusDisabled.value,
|
|
575
575
|
onClick: onDec
|
|
576
576
|
}, [
|
|
577
|
-
createElementVNode("span", _hoisted_2$
|
|
577
|
+
createElementVNode("span", _hoisted_2$E, [
|
|
578
578
|
renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
|
|
579
579
|
_cache[0] || (_cache[0] = createTextVNode("−", -1))
|
|
580
580
|
], true)
|
|
581
581
|
])
|
|
582
|
-
], 8, _hoisted_1$
|
|
582
|
+
], 8, _hoisted_1$L),
|
|
583
583
|
createElementVNode("input", {
|
|
584
584
|
id: controlId.value,
|
|
585
585
|
class: "tao-quantity__input",
|
|
@@ -599,7 +599,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
599
599
|
onFocus,
|
|
600
600
|
onBlur,
|
|
601
601
|
onKeydown
|
|
602
|
-
}, null, 40, _hoisted_3$
|
|
602
|
+
}, null, 40, _hoisted_3$x),
|
|
603
603
|
createElementVNode("button", {
|
|
604
604
|
type: "button",
|
|
605
605
|
class: "tao-quantity__btn tao-quantity__btn--inc",
|
|
@@ -612,22 +612,22 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
612
612
|
_cache[1] || (_cache[1] = createTextVNode("+", -1))
|
|
613
613
|
], true)
|
|
614
614
|
])
|
|
615
|
-
], 8, _hoisted_4$
|
|
615
|
+
], 8, _hoisted_4$s)
|
|
616
616
|
], 2);
|
|
617
617
|
};
|
|
618
618
|
}
|
|
619
619
|
});
|
|
620
|
-
const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
621
|
-
const _hoisted_1$
|
|
620
|
+
const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-c9c7c8b4"]]);
|
|
621
|
+
const _hoisted_1$K = {
|
|
622
622
|
key: 0,
|
|
623
623
|
class: "tao-card__cover"
|
|
624
624
|
};
|
|
625
|
-
const _hoisted_2$
|
|
625
|
+
const _hoisted_2$D = {
|
|
626
626
|
key: 0,
|
|
627
627
|
class: "tao-card__header-title"
|
|
628
628
|
};
|
|
629
|
-
const _hoisted_3$
|
|
630
|
-
const _hoisted_4$
|
|
629
|
+
const _hoisted_3$w = { key: 0 };
|
|
630
|
+
const _hoisted_4$r = {
|
|
631
631
|
key: 2,
|
|
632
632
|
class: "tao-card__title-block"
|
|
633
633
|
};
|
|
@@ -635,7 +635,7 @@ const _hoisted_5$j = {
|
|
|
635
635
|
key: 0,
|
|
636
636
|
class: "tao-card__title"
|
|
637
637
|
};
|
|
638
|
-
const _hoisted_6$
|
|
638
|
+
const _hoisted_6$f = {
|
|
639
639
|
key: 1,
|
|
640
640
|
class: "tao-card__sub"
|
|
641
641
|
};
|
|
@@ -647,7 +647,7 @@ const _hoisted_8$b = {
|
|
|
647
647
|
key: 4,
|
|
648
648
|
class: "tao-card__footer"
|
|
649
649
|
};
|
|
650
|
-
const _sfc_main$
|
|
650
|
+
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
651
651
|
...{ name: "TaoCard" },
|
|
652
652
|
__name: "TaoCard",
|
|
653
653
|
props: {
|
|
@@ -679,14 +679,14 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
679
679
|
}]),
|
|
680
680
|
style: normalizeStyle(radiusStyle.value)
|
|
681
681
|
}, [
|
|
682
|
-
_ctx.$slots.cover ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
682
|
+
_ctx.$slots.cover ? (openBlock(), createElementBlock("div", _hoisted_1$K, [
|
|
683
683
|
renderSlot(_ctx.$slots, "cover", {}, void 0, true)
|
|
684
684
|
])) : createCommentVNode("", true),
|
|
685
685
|
createElementVNode("div", {
|
|
686
686
|
class: "tao-card__content",
|
|
687
687
|
style: normalizeStyle(paddingStyle.value)
|
|
688
688
|
}, [
|
|
689
|
-
_ctx.$slots.headerTitle ? (openBlock(), createElementBlock("h2", _hoisted_2$
|
|
689
|
+
_ctx.$slots.headerTitle ? (openBlock(), createElementBlock("h2", _hoisted_2$D, [
|
|
690
690
|
renderSlot(_ctx.$slots, "headerTitle", {}, void 0, true)
|
|
691
691
|
])) : createCommentVNode("", true),
|
|
692
692
|
_ctx.$slots.header || _ctx.$slots.headerSecondary ? (openBlock(), createElementBlock("div", {
|
|
@@ -696,15 +696,15 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
696
696
|
createElementVNode("span", null, [
|
|
697
697
|
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
698
698
|
]),
|
|
699
|
-
_ctx.$slots.headerSecondary ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
699
|
+
_ctx.$slots.headerSecondary ? (openBlock(), createElementBlock("span", _hoisted_3$w, [
|
|
700
700
|
renderSlot(_ctx.$slots, "headerSecondary", {}, void 0, true)
|
|
701
701
|
])) : createCommentVNode("", true)
|
|
702
702
|
], 2)) : createCommentVNode("", true),
|
|
703
|
-
_ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
703
|
+
_ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_4$r, [
|
|
704
704
|
_ctx.$slots.title ? (openBlock(), createElementBlock("h2", _hoisted_5$j, [
|
|
705
705
|
renderSlot(_ctx.$slots, "title", {}, void 0, true)
|
|
706
706
|
])) : createCommentVNode("", true),
|
|
707
|
-
_ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
707
|
+
_ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_6$f, [
|
|
708
708
|
renderSlot(_ctx.$slots, "sub", {}, void 0, true)
|
|
709
709
|
])) : createCommentVNode("", true)
|
|
710
710
|
])) : createCommentVNode("", true),
|
|
@@ -719,7 +719,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
719
719
|
};
|
|
720
720
|
}
|
|
721
721
|
});
|
|
722
|
-
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
722
|
+
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-2ff3d055"]]);
|
|
723
723
|
const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
724
724
|
function getFocusable(root) {
|
|
725
725
|
return [...root.querySelectorAll(FOCUSABLE)].filter(
|
|
@@ -748,21 +748,46 @@ function trapTab(event, root) {
|
|
|
748
748
|
first.focus();
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
|
|
752
|
-
|
|
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$J = ["aria-labelledby"];
|
|
777
|
+
const _hoisted_2$C = {
|
|
753
778
|
key: 0,
|
|
754
779
|
class: "tao-modal__header"
|
|
755
780
|
};
|
|
756
|
-
const _hoisted_3$
|
|
757
|
-
const _hoisted_4$
|
|
781
|
+
const _hoisted_3$v = ["id"];
|
|
782
|
+
const _hoisted_4$q = { key: 1 };
|
|
758
783
|
const _hoisted_5$i = ["aria-label"];
|
|
759
|
-
const _hoisted_6$
|
|
784
|
+
const _hoisted_6$e = { "aria-hidden": "true" };
|
|
760
785
|
const _hoisted_7$b = { class: "tao-modal__content" };
|
|
761
786
|
const _hoisted_8$a = {
|
|
762
787
|
key: 1,
|
|
763
788
|
class: "tao-modal__footer"
|
|
764
789
|
};
|
|
765
|
-
const _sfc_main$
|
|
790
|
+
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
766
791
|
...{ name: "TaoModal" },
|
|
767
792
|
__name: "TaoModal",
|
|
768
793
|
props: {
|
|
@@ -777,9 +802,8 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
777
802
|
const emit = __emit;
|
|
778
803
|
const panelRef = ref(null);
|
|
779
804
|
const titleId = useId();
|
|
780
|
-
let previousOverflow = "";
|
|
781
805
|
let previousFocus = null;
|
|
782
|
-
let
|
|
806
|
+
let scrollHeld = false;
|
|
783
807
|
function close() {
|
|
784
808
|
if (!props.closable) {
|
|
785
809
|
return;
|
|
@@ -787,21 +811,19 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
787
811
|
emit("update:modelValue", false);
|
|
788
812
|
emit("close");
|
|
789
813
|
}
|
|
790
|
-
function
|
|
791
|
-
if (
|
|
814
|
+
function holdScroll() {
|
|
815
|
+
if (scrollHeld || !isBrowser()) {
|
|
792
816
|
return;
|
|
793
817
|
}
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
scrollLocked = true;
|
|
818
|
+
lockBodyScroll();
|
|
819
|
+
scrollHeld = true;
|
|
797
820
|
}
|
|
798
|
-
function
|
|
799
|
-
if (!
|
|
821
|
+
function releaseScroll() {
|
|
822
|
+
if (!scrollHeld) {
|
|
800
823
|
return;
|
|
801
824
|
}
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
scrollLocked = false;
|
|
825
|
+
unlockBodyScroll();
|
|
826
|
+
scrollHeld = false;
|
|
805
827
|
}
|
|
806
828
|
function restoreFocus() {
|
|
807
829
|
var _a;
|
|
@@ -819,6 +841,9 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
819
841
|
}
|
|
820
842
|
function onKeydown(event) {
|
|
821
843
|
if (event.key === "Escape") {
|
|
844
|
+
if (!props.closable) {
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
822
847
|
event.preventDefault();
|
|
823
848
|
close();
|
|
824
849
|
return;
|
|
@@ -830,19 +855,23 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
830
855
|
watch(
|
|
831
856
|
() => props.modelValue,
|
|
832
857
|
(isOpen) => {
|
|
858
|
+
if (!isBrowser()) {
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
833
861
|
if (isOpen) {
|
|
834
862
|
previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
835
|
-
|
|
863
|
+
holdScroll();
|
|
836
864
|
void focusPanel();
|
|
837
865
|
return;
|
|
838
866
|
}
|
|
839
|
-
|
|
867
|
+
releaseScroll();
|
|
840
868
|
restoreFocus();
|
|
841
869
|
},
|
|
842
870
|
{ immediate: true }
|
|
843
871
|
);
|
|
844
872
|
onBeforeUnmount(() => {
|
|
845
|
-
|
|
873
|
+
releaseScroll();
|
|
874
|
+
restoreFocus();
|
|
846
875
|
});
|
|
847
876
|
return (_ctx, _cache) => {
|
|
848
877
|
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
@@ -863,13 +892,13 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
863
892
|
"aria-labelledby": __props.title ? unref(titleId) : void 0,
|
|
864
893
|
tabindex: "-1"
|
|
865
894
|
}, [
|
|
866
|
-
__props.title || _ctx.$slots.header || __props.closable ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
895
|
+
__props.title || _ctx.$slots.header || __props.closable ? (openBlock(), createElementBlock("div", _hoisted_2$C, [
|
|
867
896
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
868
897
|
__props.title ? (openBlock(), createElementBlock("h2", {
|
|
869
898
|
key: 0,
|
|
870
899
|
id: unref(titleId),
|
|
871
900
|
class: "tao-modal__title"
|
|
872
|
-
}, toDisplayString(__props.title), 9, _hoisted_3$
|
|
901
|
+
}, toDisplayString(__props.title), 9, _hoisted_3$v)) : (openBlock(), createElementBlock("span", _hoisted_4$q))
|
|
873
902
|
], true),
|
|
874
903
|
__props.closable ? (openBlock(), createElementBlock("button", {
|
|
875
904
|
key: 0,
|
|
@@ -878,7 +907,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
878
907
|
"aria-label": __props.closeLabel,
|
|
879
908
|
onClick: close
|
|
880
909
|
}, [
|
|
881
|
-
createElementVNode("span", _hoisted_6$
|
|
910
|
+
createElementVNode("span", _hoisted_6$e, [
|
|
882
911
|
renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
883
912
|
_cache[0] || (_cache[0] = createTextVNode("×", -1))
|
|
884
913
|
], true)
|
|
@@ -891,7 +920,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
891
920
|
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$a, [
|
|
892
921
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
893
922
|
])) : createCommentVNode("", true)
|
|
894
|
-
], 8, _hoisted_1$
|
|
923
|
+
], 8, _hoisted_1$J)
|
|
895
924
|
], 32)) : createCommentVNode("", true)
|
|
896
925
|
]),
|
|
897
926
|
_: 3
|
|
@@ -900,11 +929,11 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
900
929
|
};
|
|
901
930
|
}
|
|
902
931
|
});
|
|
903
|
-
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
904
|
-
const _hoisted_1$
|
|
905
|
-
const _hoisted_2$
|
|
906
|
-
const _hoisted_3$
|
|
907
|
-
const _sfc_main$
|
|
932
|
+
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-102cfd66"]]);
|
|
933
|
+
const _hoisted_1$I = { class: "tao-tabs" };
|
|
934
|
+
const _hoisted_2$B = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
|
|
935
|
+
const _hoisted_3$u = ["id", "aria-labelledby"];
|
|
936
|
+
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
908
937
|
...{ name: "TaoTabs" },
|
|
909
938
|
__name: "TaoTabs",
|
|
910
939
|
props: {
|
|
@@ -968,7 +997,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
968
997
|
}
|
|
969
998
|
}
|
|
970
999
|
return (_ctx, _cache) => {
|
|
971
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1000
|
+
return openBlock(), createElementBlock("div", _hoisted_1$I, [
|
|
972
1001
|
createElementVNode("div", {
|
|
973
1002
|
class: "tao-tabs__list",
|
|
974
1003
|
role: "tablist",
|
|
@@ -993,7 +1022,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
993
1022
|
}, void 0, true, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
994
1023
|
createTextVNode(toDisplayString(tab.label), 1)
|
|
995
1024
|
], 64))
|
|
996
|
-
], 8, _hoisted_2$
|
|
1025
|
+
], 8, _hoisted_2$B);
|
|
997
1026
|
}), 128))
|
|
998
1027
|
], 32),
|
|
999
1028
|
createElementVNode("div", {
|
|
@@ -1003,12 +1032,12 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
1003
1032
|
"aria-labelledby": tabId(__props.modelValue)
|
|
1004
1033
|
}, [
|
|
1005
1034
|
renderSlot(_ctx.$slots, "default", { activeTab: __props.modelValue }, void 0, true)
|
|
1006
|
-
], 8, _hoisted_3$
|
|
1035
|
+
], 8, _hoisted_3$u)
|
|
1007
1036
|
]);
|
|
1008
1037
|
};
|
|
1009
1038
|
}
|
|
1010
1039
|
});
|
|
1011
|
-
const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1040
|
+
const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-bf16735e"]]);
|
|
1012
1041
|
function listenFocusLoss(onLoss) {
|
|
1013
1042
|
function onVisibilityChange() {
|
|
1014
1043
|
if (document.hidden) {
|
|
@@ -1024,7 +1053,7 @@ function listenFocusLoss(onLoss) {
|
|
|
1024
1053
|
window.removeEventListener("pagehide", onLoss);
|
|
1025
1054
|
};
|
|
1026
1055
|
}
|
|
1027
|
-
const _sfc_main$
|
|
1056
|
+
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
1028
1057
|
...{ name: "TaoTooltip" },
|
|
1029
1058
|
__name: "TaoTooltip",
|
|
1030
1059
|
props: {
|
|
@@ -1186,9 +1215,9 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
1186
1215
|
};
|
|
1187
1216
|
}
|
|
1188
1217
|
});
|
|
1189
|
-
const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1190
|
-
const _hoisted_1$
|
|
1191
|
-
const _sfc_main$
|
|
1218
|
+
const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-926dfa73"]]);
|
|
1219
|
+
const _hoisted_1$H = { class: "tao-popover" };
|
|
1220
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
1192
1221
|
...{ name: "TaoPopover" },
|
|
1193
1222
|
__name: "TaoPopover",
|
|
1194
1223
|
props: {
|
|
@@ -1222,15 +1251,26 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
1222
1251
|
function close() {
|
|
1223
1252
|
void applyOpen(false);
|
|
1224
1253
|
}
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
setOpen(next);
|
|
1228
|
-
if (!next) {
|
|
1254
|
+
function bindDismiss() {
|
|
1255
|
+
if (typeof document === "undefined") {
|
|
1229
1256
|
return;
|
|
1230
1257
|
}
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
(
|
|
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);
|
|
1234
1274
|
}
|
|
1235
1275
|
function focusTrigger() {
|
|
1236
1276
|
var _a, _b;
|
|
@@ -1243,7 +1283,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
1243
1283
|
function updatePosition() {
|
|
1244
1284
|
const trigger = triggerRef.value;
|
|
1245
1285
|
const panel = panelRef.value;
|
|
1246
|
-
if (!trigger || !panel) {
|
|
1286
|
+
if (typeof window === "undefined" || !trigger || !panel) {
|
|
1247
1287
|
return;
|
|
1248
1288
|
}
|
|
1249
1289
|
const rect = trigger.getBoundingClientRect();
|
|
@@ -1326,27 +1366,27 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
1326
1366
|
updatePosition();
|
|
1327
1367
|
}
|
|
1328
1368
|
}
|
|
1329
|
-
watch(
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
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
|
+
);
|
|
1342
1385
|
onBeforeUnmount(() => {
|
|
1343
|
-
|
|
1344
|
-
document.removeEventListener("keydown", onDocumentKey);
|
|
1345
|
-
window.removeEventListener("resize", onViewportChange);
|
|
1346
|
-
window.removeEventListener("scroll", onViewportChange, true);
|
|
1386
|
+
unbindDismiss();
|
|
1347
1387
|
});
|
|
1348
1388
|
return (_ctx, _cache) => {
|
|
1349
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1389
|
+
return openBlock(), createElementBlock("div", _hoisted_1$H, [
|
|
1350
1390
|
createElementVNode("div", {
|
|
1351
1391
|
ref_key: "triggerRef",
|
|
1352
1392
|
ref: triggerRef,
|
|
@@ -1375,17 +1415,17 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
1375
1415
|
};
|
|
1376
1416
|
}
|
|
1377
1417
|
});
|
|
1378
|
-
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1418
|
+
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-afd791a7"]]);
|
|
1379
1419
|
const spoilerGroupKey = Symbol("taoSpoilerGroup");
|
|
1380
|
-
const _hoisted_1$
|
|
1381
|
-
const _hoisted_2$
|
|
1382
|
-
const _hoisted_3$
|
|
1420
|
+
const _hoisted_1$G = { class: "tao-spoiler" };
|
|
1421
|
+
const _hoisted_2$A = ["aria-expanded", "aria-controls"];
|
|
1422
|
+
const _hoisted_3$t = {
|
|
1383
1423
|
key: 0,
|
|
1384
1424
|
class: "tao-spoiler__title"
|
|
1385
1425
|
};
|
|
1386
|
-
const _hoisted_4$
|
|
1426
|
+
const _hoisted_4$p = ["id"];
|
|
1387
1427
|
const _hoisted_5$h = { class: "tao-spoiler__content-inner" };
|
|
1388
|
-
const _sfc_main$
|
|
1428
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
1389
1429
|
...{ name: "TaoSpoiler" },
|
|
1390
1430
|
__name: "TaoSpoiler",
|
|
1391
1431
|
props: {
|
|
@@ -1440,7 +1480,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
1440
1480
|
});
|
|
1441
1481
|
}
|
|
1442
1482
|
return (_ctx, _cache) => {
|
|
1443
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1483
|
+
return openBlock(), createElementBlock("div", _hoisted_1$G, [
|
|
1444
1484
|
createElementVNode("button", {
|
|
1445
1485
|
type: "button",
|
|
1446
1486
|
class: "tao-spoiler__header",
|
|
@@ -1451,12 +1491,12 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
1451
1491
|
createElementVNode("span", {
|
|
1452
1492
|
class: normalizeClass(["tao-spoiler__icon", { "tao-spoiler__icon--open": isOpen.value }])
|
|
1453
1493
|
}, "▶", 2),
|
|
1454
|
-
__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
1494
|
+
__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_3$t, [
|
|
1455
1495
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
1456
1496
|
createTextVNode(toDisplayString(__props.title), 1)
|
|
1457
1497
|
], true)
|
|
1458
1498
|
])) : createCommentVNode("", true)
|
|
1459
|
-
], 8, _hoisted_2$
|
|
1499
|
+
], 8, _hoisted_2$A),
|
|
1460
1500
|
createVNode(Transition, {
|
|
1461
1501
|
name: "tao-spoiler-slide",
|
|
1462
1502
|
onBeforeEnter,
|
|
@@ -1473,7 +1513,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
1473
1513
|
createElementVNode("div", _hoisted_5$h, [
|
|
1474
1514
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1475
1515
|
])
|
|
1476
|
-
], 8, _hoisted_4$
|
|
1516
|
+
], 8, _hoisted_4$p)) : createCommentVNode("", true)
|
|
1477
1517
|
]),
|
|
1478
1518
|
_: 3
|
|
1479
1519
|
})
|
|
@@ -1481,20 +1521,25 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
1481
1521
|
};
|
|
1482
1522
|
}
|
|
1483
1523
|
});
|
|
1484
|
-
const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1485
|
-
const _hoisted_1$
|
|
1486
|
-
const _sfc_main$
|
|
1524
|
+
const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-ccb052cf"]]);
|
|
1525
|
+
const _hoisted_1$F = { class: "tao-spoiler-group" };
|
|
1526
|
+
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
1487
1527
|
...{ name: "TaoSpoilerGroup" },
|
|
1488
1528
|
__name: "TaoSpoilerGroup",
|
|
1489
1529
|
props: {
|
|
1490
|
-
modelValue: {
|
|
1530
|
+
modelValue: {}
|
|
1491
1531
|
},
|
|
1492
1532
|
emits: ["update:modelValue", "change"],
|
|
1493
1533
|
setup(__props, { emit: __emit }) {
|
|
1494
1534
|
const props = __props;
|
|
1495
1535
|
const emit = __emit;
|
|
1496
|
-
const
|
|
1536
|
+
const isControlled = computed(() => props.modelValue !== void 0);
|
|
1537
|
+
const internal = ref(null);
|
|
1538
|
+
const model = computed(() => isControlled.value ? props.modelValue : internal.value);
|
|
1497
1539
|
function setOpen(name) {
|
|
1540
|
+
if (!isControlled.value) {
|
|
1541
|
+
internal.value = name;
|
|
1542
|
+
}
|
|
1498
1543
|
emit("update:modelValue", name);
|
|
1499
1544
|
emit("change", name);
|
|
1500
1545
|
}
|
|
@@ -1503,15 +1548,15 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
1503
1548
|
setOpen
|
|
1504
1549
|
});
|
|
1505
1550
|
return (_ctx, _cache) => {
|
|
1506
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1551
|
+
return openBlock(), createElementBlock("div", _hoisted_1$F, [
|
|
1507
1552
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1508
1553
|
]);
|
|
1509
1554
|
};
|
|
1510
1555
|
}
|
|
1511
1556
|
});
|
|
1512
|
-
const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1513
|
-
const _hoisted_1$
|
|
1514
|
-
const _sfc_main$
|
|
1557
|
+
const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-118970dd"]]);
|
|
1558
|
+
const _hoisted_1$E = ["aria-label"];
|
|
1559
|
+
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
1515
1560
|
...{ name: "TaoCopy" },
|
|
1516
1561
|
__name: "TaoCopy",
|
|
1517
1562
|
props: {
|
|
@@ -1646,7 +1691,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
1646
1691
|
"stroke-width": "2"
|
|
1647
1692
|
})
|
|
1648
1693
|
], -1)
|
|
1649
|
-
])], 10, _hoisted_1$
|
|
1694
|
+
])], 10, _hoisted_1$E)
|
|
1650
1695
|
], true),
|
|
1651
1696
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
1652
1697
|
copied.value && __props.tip && __props.successMessage ? (openBlock(), createElementBlock("div", {
|
|
@@ -1662,8 +1707,8 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
1662
1707
|
};
|
|
1663
1708
|
}
|
|
1664
1709
|
});
|
|
1665
|
-
const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1666
|
-
const _sfc_main$
|
|
1710
|
+
const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-38d3381d"]]);
|
|
1711
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
1667
1712
|
...{ name: "TaoContainer" },
|
|
1668
1713
|
__name: "TaoContainer",
|
|
1669
1714
|
props: {
|
|
@@ -1680,8 +1725,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
1680
1725
|
};
|
|
1681
1726
|
}
|
|
1682
1727
|
});
|
|
1683
|
-
const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1684
|
-
const _sfc_main$
|
|
1728
|
+
const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-4c0deb90"]]);
|
|
1729
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
1685
1730
|
...{ name: "TaoFlex" },
|
|
1686
1731
|
__name: "TaoFlex",
|
|
1687
1732
|
props: {
|
|
@@ -1712,7 +1757,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
1712
1757
|
};
|
|
1713
1758
|
}
|
|
1714
1759
|
});
|
|
1715
|
-
const _sfc_main$
|
|
1760
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
1716
1761
|
...{ name: "TaoSpace" },
|
|
1717
1762
|
__name: "TaoSpace",
|
|
1718
1763
|
props: {
|
|
@@ -1732,15 +1777,15 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
1732
1777
|
};
|
|
1733
1778
|
}
|
|
1734
1779
|
});
|
|
1735
|
-
const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1736
|
-
const _hoisted_1$
|
|
1737
|
-
const _hoisted_2$
|
|
1738
|
-
const _hoisted_3$
|
|
1739
|
-
const _hoisted_4$
|
|
1780
|
+
const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-698ca712"]]);
|
|
1781
|
+
const _hoisted_1$D = { class: "tao-split__pane tao-split__pane--start" };
|
|
1782
|
+
const _hoisted_2$z = ["aria-orientation", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-disabled", "tabindex"];
|
|
1783
|
+
const _hoisted_3$s = { class: "tao-split__pane tao-split__pane--end" };
|
|
1784
|
+
const _hoisted_4$o = {
|
|
1740
1785
|
key: 0,
|
|
1741
1786
|
class: "tao-split__shield"
|
|
1742
1787
|
};
|
|
1743
|
-
const _sfc_main$
|
|
1788
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
1744
1789
|
...{ name: "TaoSplit" },
|
|
1745
1790
|
__name: "TaoSplit",
|
|
1746
1791
|
props: {
|
|
@@ -2025,7 +2070,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
2025
2070
|
]]),
|
|
2026
2071
|
style: normalizeStyle({ "--tao-split-start": `${startPx.value}px` })
|
|
2027
2072
|
}, [
|
|
2028
|
-
createElementVNode("div", _hoisted_1$
|
|
2073
|
+
createElementVNode("div", _hoisted_1$D, [
|
|
2029
2074
|
renderSlot(_ctx.$slots, "start", {}, void 0, true)
|
|
2030
2075
|
]),
|
|
2031
2076
|
createElementVNode("div", {
|
|
@@ -2048,18 +2093,18 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
2048
2093
|
onKeydown,
|
|
2049
2094
|
onDragstart: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
2050
2095
|
}, ["prevent"]))
|
|
2051
|
-
}, null, 40, _hoisted_2$
|
|
2052
|
-
createElementVNode("div", _hoisted_3$
|
|
2096
|
+
}, null, 40, _hoisted_2$z),
|
|
2097
|
+
createElementVNode("div", _hoisted_3$s, [
|
|
2053
2098
|
renderSlot(_ctx.$slots, "end", {}, void 0, true)
|
|
2054
2099
|
]),
|
|
2055
|
-
isDragging.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
2100
|
+
isDragging.value ? (openBlock(), createElementBlock("div", _hoisted_4$o)) : createCommentVNode("", true)
|
|
2056
2101
|
], 6);
|
|
2057
2102
|
};
|
|
2058
2103
|
}
|
|
2059
2104
|
});
|
|
2060
|
-
const TaoSplit = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2061
|
-
const _hoisted_1$
|
|
2062
|
-
const _sfc_main$
|
|
2105
|
+
const TaoSplit = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-f44196dc"]]);
|
|
2106
|
+
const _hoisted_1$C = { class: "tao-icon" };
|
|
2107
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
2063
2108
|
...{ name: "TaoIcon" },
|
|
2064
2109
|
__name: "TaoIcon",
|
|
2065
2110
|
props: {
|
|
@@ -2074,7 +2119,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
2074
2119
|
}));
|
|
2075
2120
|
const props = __props;
|
|
2076
2121
|
return (_ctx, _cache) => {
|
|
2077
|
-
return openBlock(), createElementBlock("span", _hoisted_1$
|
|
2122
|
+
return openBlock(), createElementBlock("span", _hoisted_1$C, [
|
|
2078
2123
|
renderSlot(_ctx.$slots, "prefix", {}, void 0, true),
|
|
2079
2124
|
createElementVNode("i", {
|
|
2080
2125
|
class: normalizeClass(["tao-icon__value", [`icon-${props.name}`, { "tao-icon__value--invert": props.invert }]]),
|
|
@@ -2085,8 +2130,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
2085
2130
|
};
|
|
2086
2131
|
}
|
|
2087
2132
|
});
|
|
2088
|
-
const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2089
|
-
const _sfc_main$
|
|
2133
|
+
const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-145b2cfc"]]);
|
|
2134
|
+
const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
2090
2135
|
...{ name: "TaoLoader" },
|
|
2091
2136
|
__name: "TaoLoader",
|
|
2092
2137
|
props: {
|
|
@@ -2147,11 +2192,11 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
2147
2192
|
};
|
|
2148
2193
|
}
|
|
2149
2194
|
});
|
|
2150
|
-
const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2151
|
-
const _hoisted_1$
|
|
2152
|
-
const _hoisted_2$
|
|
2153
|
-
const _hoisted_3$
|
|
2154
|
-
const _sfc_main$
|
|
2195
|
+
const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-75a40018"]]);
|
|
2196
|
+
const _hoisted_1$B = { class: "tao-image" };
|
|
2197
|
+
const _hoisted_2$y = ["src", "alt", "loading"];
|
|
2198
|
+
const _hoisted_3$r = { class: "tao-image__placeholder" };
|
|
2199
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
2155
2200
|
...{ name: "TaoImage" },
|
|
2156
2201
|
__name: "TaoImage",
|
|
2157
2202
|
props: {
|
|
@@ -2166,20 +2211,24 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
2166
2211
|
const props = __props;
|
|
2167
2212
|
const emit = __emit;
|
|
2168
2213
|
const isLoaded = ref(false);
|
|
2214
|
+
const hasError = ref(false);
|
|
2169
2215
|
function handleLoad() {
|
|
2170
2216
|
isLoaded.value = true;
|
|
2217
|
+
hasError.value = false;
|
|
2171
2218
|
emit("load");
|
|
2172
2219
|
}
|
|
2173
2220
|
function handleError() {
|
|
2174
2221
|
isLoaded.value = false;
|
|
2222
|
+
hasError.value = true;
|
|
2175
2223
|
emit("error");
|
|
2176
2224
|
}
|
|
2177
2225
|
watch(() => props.src, () => {
|
|
2178
2226
|
isLoaded.value = false;
|
|
2227
|
+
hasError.value = false;
|
|
2179
2228
|
});
|
|
2180
2229
|
return (_ctx, _cache) => {
|
|
2181
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2182
|
-
__props.src ? (openBlock(), createElementBlock("img", {
|
|
2230
|
+
return openBlock(), createElementBlock("div", _hoisted_1$B, [
|
|
2231
|
+
__props.src && !hasError.value ? (openBlock(), createElementBlock("img", {
|
|
2183
2232
|
key: 0,
|
|
2184
2233
|
class: normalizeClass({ "tao-image__img--hidden": !isLoaded.value, "tao-image__img--pixelated": props.pixelated }),
|
|
2185
2234
|
src: __props.src,
|
|
@@ -2189,25 +2238,26 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
2189
2238
|
draggable: "false",
|
|
2190
2239
|
onLoad: handleLoad,
|
|
2191
2240
|
onError: handleError
|
|
2192
|
-
}, null, 42, _hoisted_2$
|
|
2193
|
-
|
|
2194
|
-
|
|
2241
|
+
}, null, 42, _hoisted_2$y)) : createCommentVNode("", true),
|
|
2242
|
+
!__props.src || hasError.value ? renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2243
|
+
createElementVNode("div", _hoisted_3$r, toDisplayString(__props.placeholderText), 1)
|
|
2244
|
+
], true, 1) : createCommentVNode("", true)
|
|
2195
2245
|
]);
|
|
2196
2246
|
};
|
|
2197
2247
|
}
|
|
2198
2248
|
});
|
|
2199
|
-
const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2200
|
-
const _hoisted_1$
|
|
2201
|
-
const _hoisted_2$
|
|
2202
|
-
const _hoisted_3$
|
|
2249
|
+
const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-aea39025"]]);
|
|
2250
|
+
const _hoisted_1$A = ["for"];
|
|
2251
|
+
const _hoisted_2$x = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
|
|
2252
|
+
const _hoisted_3$q = {
|
|
2203
2253
|
key: 0,
|
|
2204
2254
|
class: "tao-checkbox__label"
|
|
2205
2255
|
};
|
|
2206
|
-
const _hoisted_4$
|
|
2256
|
+
const _hoisted_4$n = {
|
|
2207
2257
|
key: 1,
|
|
2208
2258
|
class: "tao-checkbox__label"
|
|
2209
2259
|
};
|
|
2210
|
-
const _sfc_main$
|
|
2260
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
2211
2261
|
...{ name: "TaoCheckbox" },
|
|
2212
2262
|
__name: "TaoCheckbox",
|
|
2213
2263
|
props: {
|
|
@@ -2277,25 +2327,25 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
2277
2327
|
"aria-invalid": invalid.value || void 0,
|
|
2278
2328
|
"aria-describedby": describedBy.value,
|
|
2279
2329
|
onChange: onInputChange
|
|
2280
|
-
}, null, 40, _hoisted_2$
|
|
2330
|
+
}, null, 40, _hoisted_2$x),
|
|
2281
2331
|
_cache[0] || (_cache[0] = createElementVNode("span", { class: "tao-checkbox__box" }, null, -1)),
|
|
2282
|
-
__props.label ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
2332
|
+
__props.label ? (openBlock(), createElementBlock("span", _hoisted_3$q, toDisplayString(__props.label), 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, [
|
|
2283
2333
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2284
2334
|
])),
|
|
2285
2335
|
renderSlot(_ctx.$slots, "post", { text: __props.label }, void 0, true)
|
|
2286
|
-
], 10, _hoisted_1$
|
|
2336
|
+
], 10, _hoisted_1$A);
|
|
2287
2337
|
};
|
|
2288
2338
|
}
|
|
2289
2339
|
});
|
|
2290
|
-
const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2291
|
-
const _hoisted_1$
|
|
2340
|
+
const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-f6b0e565"]]);
|
|
2341
|
+
const _hoisted_1$z = {
|
|
2292
2342
|
key: 0,
|
|
2293
2343
|
class: "tao-tag__prefix"
|
|
2294
2344
|
};
|
|
2295
|
-
const _hoisted_2$
|
|
2296
|
-
const _hoisted_3$
|
|
2297
|
-
const _hoisted_4$
|
|
2298
|
-
const _sfc_main$
|
|
2345
|
+
const _hoisted_2$w = { class: "tao-tag__text" };
|
|
2346
|
+
const _hoisted_3$p = ["aria-label"];
|
|
2347
|
+
const _hoisted_4$m = { "aria-hidden": "true" };
|
|
2348
|
+
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
2299
2349
|
...{ name: "TaoTag" },
|
|
2300
2350
|
__name: "TaoTag",
|
|
2301
2351
|
props: {
|
|
@@ -2335,10 +2385,10 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
2335
2385
|
]]),
|
|
2336
2386
|
style: normalizeStyle(style.value)
|
|
2337
2387
|
}, [
|
|
2338
|
-
_ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
2388
|
+
_ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_1$z, [
|
|
2339
2389
|
renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
2340
2390
|
])) : createCommentVNode("", true),
|
|
2341
|
-
createElementVNode("span", _hoisted_2$
|
|
2391
|
+
createElementVNode("span", _hoisted_2$w, [
|
|
2342
2392
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2343
2393
|
]),
|
|
2344
2394
|
__props.closable ? (openBlock(), createElementBlock("button", {
|
|
@@ -2348,27 +2398,27 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
2348
2398
|
"aria-label": __props.closeLabel,
|
|
2349
2399
|
onClick: withModifiers(onClose, ["stop"])
|
|
2350
2400
|
}, [
|
|
2351
|
-
createElementVNode("span", _hoisted_4$
|
|
2401
|
+
createElementVNode("span", _hoisted_4$m, [
|
|
2352
2402
|
renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
2353
2403
|
_cache[0] || (_cache[0] = createTextVNode("✕", -1))
|
|
2354
2404
|
], true)
|
|
2355
2405
|
])
|
|
2356
|
-
], 8, _hoisted_3$
|
|
2406
|
+
], 8, _hoisted_3$p)) : createCommentVNode("", true)
|
|
2357
2407
|
], 6);
|
|
2358
2408
|
};
|
|
2359
2409
|
}
|
|
2360
2410
|
});
|
|
2361
|
-
const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2362
|
-
const _hoisted_1$
|
|
2411
|
+
const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-f353f529"]]);
|
|
2412
|
+
const _hoisted_1$y = {
|
|
2363
2413
|
key: 1,
|
|
2364
2414
|
class: "tao-divider-text"
|
|
2365
2415
|
};
|
|
2366
|
-
const _hoisted_2$
|
|
2367
|
-
const _hoisted_3$
|
|
2416
|
+
const _hoisted_2$v = { class: "tao-divider-text__value" };
|
|
2417
|
+
const _hoisted_3$o = {
|
|
2368
2418
|
key: 2,
|
|
2369
2419
|
class: "tao-divider-line"
|
|
2370
2420
|
};
|
|
2371
|
-
const _sfc_main$
|
|
2421
|
+
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
2372
2422
|
...{ name: "TaoDivider" },
|
|
2373
2423
|
__name: "TaoDivider",
|
|
2374
2424
|
props: {
|
|
@@ -2382,23 +2432,23 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
2382
2432
|
return __props.variant === "gap" ? (openBlock(), createElementBlock("div", {
|
|
2383
2433
|
key: 0,
|
|
2384
2434
|
class: normalizeClass(["tao-divider-gap", `tao-divider-gap--${gapSize.value}`])
|
|
2385
|
-
}, null, 2)) : __props.variant === "text" ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2435
|
+
}, null, 2)) : __props.variant === "text" ? (openBlock(), createElementBlock("div", _hoisted_1$y, [
|
|
2386
2436
|
_cache[0] || (_cache[0] = createElementVNode("span", { class: "tao-divider-text__line tao-divider-text__line--left" }, null, -1)),
|
|
2387
|
-
createElementVNode("span", _hoisted_2$
|
|
2437
|
+
createElementVNode("span", _hoisted_2$v, [
|
|
2388
2438
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2389
2439
|
]),
|
|
2390
2440
|
_cache[1] || (_cache[1] = createElementVNode("span", { class: "tao-divider-text__line tao-divider-text__line--right" }, null, -1))
|
|
2391
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2441
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_3$o));
|
|
2392
2442
|
};
|
|
2393
2443
|
}
|
|
2394
2444
|
});
|
|
2395
|
-
const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2396
|
-
const _hoisted_1$
|
|
2445
|
+
const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-8187a15d"]]);
|
|
2446
|
+
const _hoisted_1$x = {
|
|
2397
2447
|
key: 0,
|
|
2398
2448
|
class: "tao-fieldset__legend"
|
|
2399
2449
|
};
|
|
2400
|
-
const _hoisted_2$
|
|
2401
|
-
const _sfc_main$
|
|
2450
|
+
const _hoisted_2$u = { class: "tao-fieldset__body" };
|
|
2451
|
+
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
2402
2452
|
...{ name: "TaoFieldset" },
|
|
2403
2453
|
__name: "TaoFieldset",
|
|
2404
2454
|
props: {
|
|
@@ -2410,20 +2460,20 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
2410
2460
|
return openBlock(), createElementBlock("fieldset", {
|
|
2411
2461
|
class: normalizeClass(["tao-fieldset", `tao-fieldset--${__props.align}`])
|
|
2412
2462
|
}, [
|
|
2413
|
-
__props.legend || _ctx.$slots.legend ? (openBlock(), createElementBlock("legend", _hoisted_1$
|
|
2463
|
+
__props.legend || _ctx.$slots.legend ? (openBlock(), createElementBlock("legend", _hoisted_1$x, [
|
|
2414
2464
|
renderSlot(_ctx.$slots, "legend", {}, () => [
|
|
2415
2465
|
createTextVNode(toDisplayString(__props.legend), 1)
|
|
2416
2466
|
], true)
|
|
2417
2467
|
])) : createCommentVNode("", true),
|
|
2418
|
-
createElementVNode("div", _hoisted_2$
|
|
2468
|
+
createElementVNode("div", _hoisted_2$u, [
|
|
2419
2469
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2420
2470
|
])
|
|
2421
2471
|
], 2);
|
|
2422
2472
|
};
|
|
2423
2473
|
}
|
|
2424
2474
|
});
|
|
2425
|
-
const TaoFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2426
|
-
const _sfc_main$
|
|
2475
|
+
const TaoFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-34440ba5"]]);
|
|
2476
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
2427
2477
|
...{ name: "TaoAnimatedBorder" },
|
|
2428
2478
|
__name: "TaoAnimatedBorder",
|
|
2429
2479
|
props: {
|
|
@@ -2447,18 +2497,18 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
2447
2497
|
};
|
|
2448
2498
|
}
|
|
2449
2499
|
});
|
|
2450
|
-
const TaoAnimatedBorder = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2451
|
-
const _hoisted_1$
|
|
2500
|
+
const TaoAnimatedBorder = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-f1534571"]]);
|
|
2501
|
+
const _hoisted_1$w = {
|
|
2452
2502
|
key: 0,
|
|
2453
2503
|
class: "tao-textarea tao-textarea--dummy"
|
|
2454
2504
|
};
|
|
2455
|
-
const _hoisted_2$
|
|
2505
|
+
const _hoisted_2$t = {
|
|
2456
2506
|
key: 1,
|
|
2457
2507
|
class: "tao-textarea-wrap"
|
|
2458
2508
|
};
|
|
2459
|
-
const _hoisted_3$
|
|
2460
|
-
const _hoisted_4$
|
|
2461
|
-
const _sfc_main$
|
|
2509
|
+
const _hoisted_3$n = ["id", "placeholder", "spellcheck", "autocomplete", "minlength", "maxlength", "disabled", "rows", "value", "aria-invalid", "aria-describedby"];
|
|
2510
|
+
const _hoisted_4$l = ["id"];
|
|
2511
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
2462
2512
|
...{ name: "TaoTextarea" },
|
|
2463
2513
|
__name: "TaoTextarea",
|
|
2464
2514
|
props: {
|
|
@@ -2555,7 +2605,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
2555
2605
|
nextTick(autoResize);
|
|
2556
2606
|
});
|
|
2557
2607
|
return (_ctx, _cache) => {
|
|
2558
|
-
return __props.dummy ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
2608
|
+
return __props.dummy ? (openBlock(), createElementBlock("span", _hoisted_1$w, toDisplayString(__props.modelValue), 1)) : (openBlock(), createElementBlock("div", _hoisted_2$t, [
|
|
2559
2609
|
createElementVNode("textarea", {
|
|
2560
2610
|
id: controlId.value,
|
|
2561
2611
|
ref_key: "textareaRef",
|
|
@@ -2584,21 +2634,21 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
2584
2634
|
onFocus,
|
|
2585
2635
|
onBlur,
|
|
2586
2636
|
onKeydown
|
|
2587
|
-
}, null, 42, _hoisted_3$
|
|
2637
|
+
}, null, 42, _hoisted_3$n),
|
|
2588
2638
|
__props.count ? (openBlock(), createElementBlock("span", {
|
|
2589
2639
|
key: 0,
|
|
2590
2640
|
id: counterId.value,
|
|
2591
2641
|
class: normalizeClass(["tao-textarea__count", { "tao-textarea__count--limit": atLimit.value }])
|
|
2592
|
-
}, toDisplayString(countLabel.value), 11, _hoisted_4$
|
|
2642
|
+
}, toDisplayString(countLabel.value), 11, _hoisted_4$l)) : createCommentVNode("", true)
|
|
2593
2643
|
]));
|
|
2594
2644
|
};
|
|
2595
2645
|
}
|
|
2596
2646
|
});
|
|
2597
|
-
const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2598
|
-
const _hoisted_1$
|
|
2599
|
-
const _hoisted_2$
|
|
2647
|
+
const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-2534c0c4"]]);
|
|
2648
|
+
const _hoisted_1$v = ["tabindex", "aria-label"];
|
|
2649
|
+
const _hoisted_2$s = { class: "tao-scroll-top__content" };
|
|
2600
2650
|
const RIPPLE_DURATION = 750;
|
|
2601
|
-
const _sfc_main$
|
|
2651
|
+
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
2602
2652
|
...{ name: "TaoScrollTop" },
|
|
2603
2653
|
__name: "TaoScrollTop",
|
|
2604
2654
|
props: {
|
|
@@ -2699,7 +2749,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
2699
2749
|
"aria-label": props.ariaLabel,
|
|
2700
2750
|
onClick: withModifiers(onClick, ["prevent"])
|
|
2701
2751
|
}, [
|
|
2702
|
-
createElementVNode("div", _hoisted_2$
|
|
2752
|
+
createElementVNode("div", _hoisted_2$s, [
|
|
2703
2753
|
createElementVNode("div", {
|
|
2704
2754
|
class: normalizeClass([{ "tao-scroll-top__ripple--active": isRippleActive.value }, "tao-scroll-top__ripple"]),
|
|
2705
2755
|
style: normalizeStyle(rippleStyle)
|
|
@@ -2716,21 +2766,21 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
2716
2766
|
], -1))
|
|
2717
2767
|
], true)
|
|
2718
2768
|
])
|
|
2719
|
-
], 14, _hoisted_1$
|
|
2769
|
+
], 14, _hoisted_1$v)) : createCommentVNode("", true)
|
|
2720
2770
|
]),
|
|
2721
2771
|
_: 3
|
|
2722
2772
|
});
|
|
2723
2773
|
};
|
|
2724
2774
|
}
|
|
2725
2775
|
});
|
|
2726
|
-
const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2727
|
-
const _hoisted_1$
|
|
2728
|
-
const _hoisted_2$
|
|
2776
|
+
const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-59678649"]]);
|
|
2777
|
+
const _hoisted_1$u = { class: "tao-progress" };
|
|
2778
|
+
const _hoisted_2$r = {
|
|
2729
2779
|
key: 0,
|
|
2730
2780
|
class: "tao-progress__side"
|
|
2731
2781
|
};
|
|
2732
|
-
const _hoisted_3$
|
|
2733
|
-
const _hoisted_4$
|
|
2782
|
+
const _hoisted_3$m = { class: "tao-progress__main" };
|
|
2783
|
+
const _hoisted_4$k = {
|
|
2734
2784
|
key: 0,
|
|
2735
2785
|
class: "tao-progress__percentage"
|
|
2736
2786
|
};
|
|
@@ -2738,11 +2788,11 @@ const _hoisted_5$g = {
|
|
|
2738
2788
|
key: 1,
|
|
2739
2789
|
class: "tao-progress__side"
|
|
2740
2790
|
};
|
|
2741
|
-
const _hoisted_6$
|
|
2791
|
+
const _hoisted_6$d = {
|
|
2742
2792
|
key: 0,
|
|
2743
2793
|
class: "tao-progress__percentage"
|
|
2744
2794
|
};
|
|
2745
|
-
const _sfc_main$
|
|
2795
|
+
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
2746
2796
|
...{ name: "TaoProgress" },
|
|
2747
2797
|
__name: "TaoProgress",
|
|
2748
2798
|
props: {
|
|
@@ -2773,16 +2823,16 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
2773
2823
|
() => hasRight.value ? `(${props.progress}%)` : `${props.progress}%`
|
|
2774
2824
|
);
|
|
2775
2825
|
return (_ctx, _cache) => {
|
|
2776
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2826
|
+
return openBlock(), createElementBlock("div", _hoisted_1$u, [
|
|
2777
2827
|
createElementVNode("div", {
|
|
2778
2828
|
class: normalizeClass(["tao-progress__container", { "tao-progress__container--over": showOverPercent.value }]),
|
|
2779
2829
|
style: normalizeStyle({ minWidth: `${minW.value}px`, maxWidth: `${maxW.value}px` })
|
|
2780
2830
|
}, [
|
|
2781
|
-
_ctx.$slots.left ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
2831
|
+
_ctx.$slots.left ? (openBlock(), createElementBlock("div", _hoisted_2$r, [
|
|
2782
2832
|
renderSlot(_ctx.$slots, "left", {}, void 0, true)
|
|
2783
2833
|
])) : createCommentVNode("", true),
|
|
2784
|
-
createElementVNode("div", _hoisted_3$
|
|
2785
|
-
showOverPercent.value ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
2834
|
+
createElementVNode("div", _hoisted_3$m, [
|
|
2835
|
+
showOverPercent.value ? (openBlock(), createElementBlock("span", _hoisted_4$k, toDisplayString(__props.progress) + "%", 1)) : createCommentVNode("", true),
|
|
2786
2836
|
createElementVNode("div", {
|
|
2787
2837
|
class: "tao-progress__track",
|
|
2788
2838
|
style: normalizeStyle({ height: `${__props.height}px` })
|
|
@@ -2795,21 +2845,21 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
2795
2845
|
]),
|
|
2796
2846
|
_ctx.$slots.right || showEndPercent.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
|
|
2797
2847
|
renderSlot(_ctx.$slots, "right", {}, void 0, true),
|
|
2798
|
-
showEndPercent.value ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
2848
|
+
showEndPercent.value ? (openBlock(), createElementBlock("span", _hoisted_6$d, toDisplayString(endPercentLabel.value), 1)) : createCommentVNode("", true)
|
|
2799
2849
|
])) : createCommentVNode("", true)
|
|
2800
2850
|
], 6)
|
|
2801
2851
|
]);
|
|
2802
2852
|
};
|
|
2803
2853
|
}
|
|
2804
2854
|
});
|
|
2805
|
-
const TaoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2806
|
-
const _hoisted_1$
|
|
2807
|
-
const _hoisted_2$
|
|
2808
|
-
const _hoisted_3$
|
|
2855
|
+
const TaoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-54c13718"]]);
|
|
2856
|
+
const _hoisted_1$t = ["id", "tabindex", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-disabled", "aria-describedby"];
|
|
2857
|
+
const _hoisted_2$q = ["placeholder"];
|
|
2858
|
+
const _hoisted_3$l = {
|
|
2809
2859
|
key: 1,
|
|
2810
2860
|
class: "tao-slider__value"
|
|
2811
2861
|
};
|
|
2812
|
-
const _sfc_main$
|
|
2862
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
2813
2863
|
...{ name: "TaoSlider" },
|
|
2814
2864
|
__name: "TaoSlider",
|
|
2815
2865
|
props: {
|
|
@@ -3026,24 +3076,24 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
3026
3076
|
onKeydown: onShadowKeydown,
|
|
3027
3077
|
onPointerdown: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
3028
3078
|
}, ["stop"]))
|
|
3029
|
-
}, null, 40, _hoisted_2$
|
|
3079
|
+
}, null, 40, _hoisted_2$q)), [
|
|
3030
3080
|
[vModelText, shadowModel.value]
|
|
3031
|
-
]) : __props.showValue ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
3081
|
+
]) : __props.showValue ? (openBlock(), createElementBlock("div", _hoisted_3$l, [
|
|
3032
3082
|
renderSlot(_ctx.$slots, "pre-value", {}, void 0, true),
|
|
3033
3083
|
createTextVNode(toDisplayString(__props.modelValue), 1),
|
|
3034
3084
|
renderSlot(_ctx.$slots, "post-value", {}, void 0, true)
|
|
3035
3085
|
])) : createCommentVNode("", true)
|
|
3036
|
-
], 42, _hoisted_1$
|
|
3086
|
+
], 42, _hoisted_1$t);
|
|
3037
3087
|
};
|
|
3038
3088
|
}
|
|
3039
3089
|
});
|
|
3040
|
-
const TaoSlider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3041
|
-
const _hoisted_1$
|
|
3042
|
-
const _hoisted_2$
|
|
3043
|
-
const _hoisted_3$
|
|
3044
|
-
const _hoisted_4$
|
|
3090
|
+
const TaoSlider = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-24a38782"]]);
|
|
3091
|
+
const _hoisted_1$s = { class: "tao-file-drop" };
|
|
3092
|
+
const _hoisted_2$p = { class: "tao-file-drop__row" };
|
|
3093
|
+
const _hoisted_3$k = ["aria-label"];
|
|
3094
|
+
const _hoisted_4$j = { "aria-hidden": "true" };
|
|
3045
3095
|
const _hoisted_5$f = ["accept", "multiple"];
|
|
3046
|
-
const _hoisted_6$
|
|
3096
|
+
const _hoisted_6$c = {
|
|
3047
3097
|
key: 0,
|
|
3048
3098
|
class: "tao-file-drop__list"
|
|
3049
3099
|
};
|
|
@@ -3051,7 +3101,7 @@ const _hoisted_7$a = { class: "tao-file-drop__name" };
|
|
|
3051
3101
|
const _hoisted_8$9 = { class: "tao-file-drop__meta" };
|
|
3052
3102
|
const _hoisted_9$4 = ["aria-label", "onClick"];
|
|
3053
3103
|
const _hoisted_10$4 = { "aria-hidden": "true" };
|
|
3054
|
-
const _sfc_main$
|
|
3104
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
3055
3105
|
...{ name: "TaoFileDrop" },
|
|
3056
3106
|
__name: "TaoFileDrop",
|
|
3057
3107
|
props: {
|
|
@@ -3074,6 +3124,28 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
3074
3124
|
function sameFile(a, b) {
|
|
3075
3125
|
return a.name === b.name && a.size === b.size && a.lastModified === b.lastModified;
|
|
3076
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
|
+
}
|
|
3077
3149
|
function commit(files) {
|
|
3078
3150
|
emit("update:modelValue", files);
|
|
3079
3151
|
emit("files", files);
|
|
@@ -3106,9 +3178,17 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
3106
3178
|
function removeAt(index) {
|
|
3107
3179
|
commit(props.modelValue.filter((_, item) => item !== index));
|
|
3108
3180
|
}
|
|
3181
|
+
function resetInput() {
|
|
3182
|
+
const el = fileInput.value;
|
|
3183
|
+
if (el) {
|
|
3184
|
+
el.type = "text";
|
|
3185
|
+
el.type = "file";
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3109
3188
|
function processFiles(fileList) {
|
|
3110
|
-
const incoming = Array.from(fileList);
|
|
3189
|
+
const incoming = Array.from(fileList).filter((file) => fileMatchesAccept(file, props.accept));
|
|
3111
3190
|
if (!incoming.length) {
|
|
3191
|
+
resetInput();
|
|
3112
3192
|
return;
|
|
3113
3193
|
}
|
|
3114
3194
|
let result;
|
|
@@ -3123,11 +3203,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
3123
3203
|
}
|
|
3124
3204
|
}
|
|
3125
3205
|
commit(result);
|
|
3126
|
-
|
|
3127
|
-
if (el) {
|
|
3128
|
-
el.type = "text";
|
|
3129
|
-
el.type = "file";
|
|
3130
|
-
}
|
|
3206
|
+
resetInput();
|
|
3131
3207
|
}
|
|
3132
3208
|
function defaultFormatSize(bytes) {
|
|
3133
3209
|
if (bytes < 1024) {
|
|
@@ -3156,8 +3232,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
3156
3232
|
});
|
|
3157
3233
|
onBeforeUnmount(() => stopFocusLoss == null ? void 0 : stopFocusLoss());
|
|
3158
3234
|
return (_ctx, _cache) => {
|
|
3159
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3160
|
-
createElementVNode("div", _hoisted_2$
|
|
3235
|
+
return openBlock(), createElementBlock("div", _hoisted_1$s, [
|
|
3236
|
+
createElementVNode("div", _hoisted_2$p, [
|
|
3161
3237
|
__props.showClear && __props.modelValue.length ? (openBlock(), createElementBlock("button", {
|
|
3162
3238
|
key: 0,
|
|
3163
3239
|
type: "button",
|
|
@@ -3165,12 +3241,12 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
3165
3241
|
"aria-label": __props.clearLabel,
|
|
3166
3242
|
onClick: requestClear
|
|
3167
3243
|
}, [
|
|
3168
|
-
createElementVNode("span", _hoisted_4$
|
|
3244
|
+
createElementVNode("span", _hoisted_4$j, [
|
|
3169
3245
|
renderSlot(_ctx.$slots, "clear-icon", {}, () => [
|
|
3170
3246
|
_cache[1] || (_cache[1] = createTextVNode("✕", -1))
|
|
3171
3247
|
], true)
|
|
3172
3248
|
])
|
|
3173
|
-
], 8, _hoisted_3$
|
|
3249
|
+
], 8, _hoisted_3$k)) : createCommentVNode("", true),
|
|
3174
3250
|
createElementVNode("label", {
|
|
3175
3251
|
class: normalizeClass(["tao-file-drop__zone", [`tao-file-drop__zone--${__props.size}`, { "tao-file-drop__zone--dragging": isDragging.value }]]),
|
|
3176
3252
|
onDragover: handleDragOver,
|
|
@@ -3193,7 +3269,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
3193
3269
|
}, null, 40, _hoisted_5$f)
|
|
3194
3270
|
], 34)
|
|
3195
3271
|
]),
|
|
3196
|
-
__props.list && __props.modelValue.length ? (openBlock(), createElementBlock("ul", _hoisted_6$
|
|
3272
|
+
__props.list && __props.modelValue.length ? (openBlock(), createElementBlock("ul", _hoisted_6$c, [
|
|
3197
3273
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.modelValue, (file, index) => {
|
|
3198
3274
|
return openBlock(), createElementBlock("li", {
|
|
3199
3275
|
key: fileKey(file, index),
|
|
@@ -3220,13 +3296,15 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
3220
3296
|
};
|
|
3221
3297
|
}
|
|
3222
3298
|
});
|
|
3223
|
-
const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3224
|
-
const _hoisted_1$
|
|
3225
|
-
const _hoisted_2$
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
const
|
|
3299
|
+
const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-4b36e2a3"]]);
|
|
3300
|
+
const _hoisted_1$r = ["aria-expanded", "aria-label"];
|
|
3301
|
+
const _hoisted_2$o = {
|
|
3302
|
+
key: 1,
|
|
3303
|
+
"aria-hidden": "true"
|
|
3304
|
+
};
|
|
3305
|
+
const _hoisted_3$j = ["onClick", "onMouseenter"];
|
|
3306
|
+
const _hoisted_4$i = { key: 1 };
|
|
3307
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
3230
3308
|
...{ name: "TaoDropdownMenu" },
|
|
3231
3309
|
__name: "TaoDropdownMenu",
|
|
3232
3310
|
props: {
|
|
@@ -3360,19 +3438,15 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
3360
3438
|
class: "tao-dropdown-menu__button",
|
|
3361
3439
|
"aria-haspopup": "menu",
|
|
3362
3440
|
"aria-expanded": isOpen.value,
|
|
3441
|
+
"aria-label": _ctx.$slots.button ? void 0 : __props.menuLabel,
|
|
3363
3442
|
onClick: toggleMenu
|
|
3364
3443
|
}, [
|
|
3365
|
-
_ctx.$slots.button ? renderSlot(_ctx.$slots, "button", {}, void 0, true, 0) : (openBlock(), createElementBlock("span",
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
_cache[0] || (_cache[0] = createTextVNode("⋮", -1))
|
|
3372
|
-
], true)
|
|
3373
|
-
])
|
|
3374
|
-
], 8, _hoisted_2$m))
|
|
3375
|
-
], 8, _hoisted_1$p),
|
|
3444
|
+
_ctx.$slots.button ? renderSlot(_ctx.$slots, "button", {}, void 0, true, 0) : (openBlock(), createElementBlock("span", _hoisted_2$o, [
|
|
3445
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
3446
|
+
_cache[0] || (_cache[0] = createTextVNode("⋮", -1))
|
|
3447
|
+
], true)
|
|
3448
|
+
]))
|
|
3449
|
+
], 8, _hoisted_1$r),
|
|
3376
3450
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
3377
3451
|
isOpen.value ? (openBlock(), createElementBlock("div", {
|
|
3378
3452
|
key: 0,
|
|
@@ -3397,8 +3471,8 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
3397
3471
|
id: action.id,
|
|
3398
3472
|
ico: action.ico,
|
|
3399
3473
|
text: action.name
|
|
3400
|
-
}, void 0, true, 0) : (openBlock(), createElementBlock("span",
|
|
3401
|
-
], 42,
|
|
3474
|
+
}, void 0, true, 0) : (openBlock(), createElementBlock("span", _hoisted_4$i, toDisplayString(action.name), 1))
|
|
3475
|
+
], 42, _hoisted_3$j);
|
|
3402
3476
|
}), 128))
|
|
3403
3477
|
], 36)) : createCommentVNode("", true)
|
|
3404
3478
|
]))
|
|
@@ -3406,10 +3480,10 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
3406
3480
|
};
|
|
3407
3481
|
}
|
|
3408
3482
|
});
|
|
3409
|
-
const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3410
|
-
const _hoisted_1$
|
|
3411
|
-
const _hoisted_2$
|
|
3412
|
-
const _sfc_main$
|
|
3483
|
+
const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-cbfa7294"]]);
|
|
3484
|
+
const _hoisted_1$q = ["aria-invalid", "aria-describedby"];
|
|
3485
|
+
const _hoisted_2$n = ["id", "value", "placeholder", "type", "inputmode", "pattern", "maxlength", "onInput", "onPaste", "onKeydown", "onFocus"];
|
|
3486
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
3413
3487
|
...{ name: "TaoPinCode" },
|
|
3414
3488
|
__name: "TaoPinCode",
|
|
3415
3489
|
props: {
|
|
@@ -3466,11 +3540,43 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
3466
3540
|
function isFilled() {
|
|
3467
3541
|
return numbers.value.length === props.length && numbers.value.every((cell) => cell !== "");
|
|
3468
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
|
+
}
|
|
3469
3568
|
function mutation(v, index) {
|
|
3470
3569
|
var _a;
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
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
|
+
}
|
|
3474
3580
|
return;
|
|
3475
3581
|
}
|
|
3476
3582
|
numbers.value = [...numbers.value];
|
|
@@ -3490,6 +3596,15 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
3490
3596
|
focusCell(target);
|
|
3491
3597
|
}
|
|
3492
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
|
+
}
|
|
3493
3608
|
function onFocus(index) {
|
|
3494
3609
|
if (props.clearOn === "input") {
|
|
3495
3610
|
const firstEmpty = firstEmptyIndex();
|
|
@@ -3571,19 +3686,20 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
3571
3686
|
inputmode: __props.numbersOnly ? "numeric" : "text",
|
|
3572
3687
|
pattern: __props.numbersOnly ? "[0-9]" : void 0,
|
|
3573
3688
|
autocomplete: "one-time-code",
|
|
3574
|
-
maxlength:
|
|
3689
|
+
maxlength: index === 0 ? __props.length : 1,
|
|
3575
3690
|
onInput: ($event) => onChange($event, index),
|
|
3691
|
+
onPaste: ($event) => onPaste($event, index),
|
|
3576
3692
|
onKeydown: ($event) => onKeydown($event, index),
|
|
3577
3693
|
onFocus: ($event) => onFocus(index),
|
|
3578
3694
|
onBlur
|
|
3579
|
-
}, null, 42, _hoisted_2$
|
|
3695
|
+
}, null, 42, _hoisted_2$n);
|
|
3580
3696
|
}), 128))
|
|
3581
|
-
], 8, _hoisted_1$
|
|
3697
|
+
], 8, _hoisted_1$q);
|
|
3582
3698
|
};
|
|
3583
3699
|
}
|
|
3584
3700
|
});
|
|
3585
|
-
const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3586
|
-
const _sfc_main$
|
|
3701
|
+
const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-44474500"]]);
|
|
3702
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
3587
3703
|
...{ name: "TaoLink" },
|
|
3588
3704
|
__name: "TaoLink",
|
|
3589
3705
|
props: {
|
|
@@ -3625,8 +3741,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
3625
3741
|
};
|
|
3626
3742
|
}
|
|
3627
3743
|
});
|
|
3628
|
-
const _hoisted_1$
|
|
3629
|
-
const _sfc_main$
|
|
3744
|
+
const _hoisted_1$p = ["for"];
|
|
3745
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
3630
3746
|
...{ name: "TaoFormField" },
|
|
3631
3747
|
__name: "TaoFormField",
|
|
3632
3748
|
props: {
|
|
@@ -3639,6 +3755,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3639
3755
|
const id = useId();
|
|
3640
3756
|
const hintId = `${id}-hint`;
|
|
3641
3757
|
const errorId = `${id}-error`;
|
|
3758
|
+
const labelId = `${id}-label`;
|
|
3642
3759
|
const invalid = computed(() => Boolean(props.error));
|
|
3643
3760
|
const describedBy = computed(() => {
|
|
3644
3761
|
if (props.error) {
|
|
@@ -3654,15 +3771,28 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3654
3771
|
invalid,
|
|
3655
3772
|
describedBy
|
|
3656
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
|
+
}
|
|
3657
3785
|
return (_ctx, _cache) => {
|
|
3658
3786
|
return openBlock(), createElementBlock("div", {
|
|
3659
3787
|
class: normalizeClass(["tao-form-field", { "tao-form-field--invalid": invalid.value }])
|
|
3660
3788
|
}, [
|
|
3661
3789
|
__props.label ? (openBlock(), createElementBlock("label", {
|
|
3662
3790
|
key: 0,
|
|
3791
|
+
id: labelId,
|
|
3663
3792
|
class: "tao-form-field__label",
|
|
3664
|
-
for: unref(id)
|
|
3665
|
-
|
|
3793
|
+
for: unref(id),
|
|
3794
|
+
onClick: onLabelClick
|
|
3795
|
+
}, toDisplayString(__props.label), 9, _hoisted_1$p)) : createCommentVNode("", true),
|
|
3666
3796
|
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
3667
3797
|
__props.error ? (openBlock(), createElementBlock("p", {
|
|
3668
3798
|
key: 1,
|
|
@@ -3677,12 +3807,12 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
3677
3807
|
};
|
|
3678
3808
|
}
|
|
3679
3809
|
});
|
|
3680
|
-
const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3681
|
-
const _hoisted_1$
|
|
3682
|
-
const _hoisted_2$
|
|
3683
|
-
const _hoisted_3$
|
|
3684
|
-
const _hoisted_4$
|
|
3685
|
-
const _sfc_main$
|
|
3810
|
+
const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-edd0be31"]]);
|
|
3811
|
+
const _hoisted_1$o = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
|
|
3812
|
+
const _hoisted_2$m = { class: "tao-select__value" };
|
|
3813
|
+
const _hoisted_3$i = ["aria-activedescendant"];
|
|
3814
|
+
const _hoisted_4$h = ["id", "aria-selected", "aria-disabled", "data-tao-select-index", "onClick", "onMouseenter"];
|
|
3815
|
+
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
3686
3816
|
...{ name: "TaoSelect" },
|
|
3687
3817
|
__name: "TaoSelect",
|
|
3688
3818
|
props: {
|
|
@@ -3721,12 +3851,16 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3721
3851
|
}
|
|
3722
3852
|
const rect = trigger.getBoundingClientRect();
|
|
3723
3853
|
const panelHeight = panel.offsetHeight;
|
|
3854
|
+
const panelWidth = panel.offsetWidth || rect.width;
|
|
3724
3855
|
const gap = 4;
|
|
3856
|
+
const pad = 8;
|
|
3725
3857
|
const spaceBelow = window.innerHeight - rect.bottom - gap;
|
|
3726
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);
|
|
3727
3861
|
listStyle.value = {
|
|
3728
3862
|
top: `${openUp ? rect.top - panelHeight - gap : rect.bottom + gap}px`,
|
|
3729
|
-
left: `${
|
|
3863
|
+
left: `${left}px`,
|
|
3730
3864
|
width: `${rect.width}px`
|
|
3731
3865
|
};
|
|
3732
3866
|
}
|
|
@@ -3740,7 +3874,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3740
3874
|
return;
|
|
3741
3875
|
}
|
|
3742
3876
|
const selectedIndex = props.options.findIndex((option) => option.value === props.modelValue);
|
|
3743
|
-
activeIndex.value = selectedIndex >= 0 ? selectedIndex : enabledIndexes.value[0] ?? -1;
|
|
3877
|
+
activeIndex.value = selectedIndex >= 0 && enabledIndexes.value.includes(selectedIndex) ? selectedIndex : enabledIndexes.value[0] ?? -1;
|
|
3744
3878
|
await nextTick();
|
|
3745
3879
|
updatePosition();
|
|
3746
3880
|
(_a = listRef.value) == null ? void 0 : _a.focus();
|
|
@@ -3896,14 +4030,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3896
4030
|
onClick: toggle,
|
|
3897
4031
|
onKeydown: onTriggerKeydown
|
|
3898
4032
|
}, [
|
|
3899
|
-
createElementVNode("span", _hoisted_2$
|
|
4033
|
+
createElementVNode("span", _hoisted_2$m, toDisplayString(((_a = selected.value) == null ? void 0 : _a.label) ?? __props.placeholder), 1),
|
|
3900
4034
|
createElementVNode("span", {
|
|
3901
4035
|
class: normalizeClass(["tao-select__chevron", { "tao-select__chevron--custom": _ctx.$slots.chevron }]),
|
|
3902
4036
|
"aria-hidden": "true"
|
|
3903
4037
|
}, [
|
|
3904
4038
|
renderSlot(_ctx.$slots, "chevron", {}, void 0, true)
|
|
3905
4039
|
], 2)
|
|
3906
|
-
], 42, _hoisted_1$
|
|
4040
|
+
], 42, _hoisted_1$o),
|
|
3907
4041
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
3908
4042
|
open.value ? (openBlock(), createElementBlock("div", {
|
|
3909
4043
|
key: 0,
|
|
@@ -3939,9 +4073,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3939
4073
|
}, ["prevent"])),
|
|
3940
4074
|
onClick: ($event) => selectOption(option),
|
|
3941
4075
|
onMouseenter: ($event) => !option.disabled && (activeIndex.value = index)
|
|
3942
|
-
}, toDisplayString(option.label), 43, _hoisted_4$
|
|
4076
|
+
}, toDisplayString(option.label), 43, _hoisted_4$h);
|
|
3943
4077
|
}), 128))
|
|
3944
|
-
], 40, _hoisted_3$
|
|
4078
|
+
], 40, _hoisted_3$i),
|
|
3945
4079
|
selected.value ? (openBlock(), createElementBlock("button", {
|
|
3946
4080
|
key: 0,
|
|
3947
4081
|
type: "button",
|
|
@@ -3960,14 +4094,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
3960
4094
|
};
|
|
3961
4095
|
}
|
|
3962
4096
|
});
|
|
3963
|
-
const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3964
|
-
const _hoisted_1$
|
|
3965
|
-
const _hoisted_2$
|
|
4097
|
+
const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-d9b336d8"]]);
|
|
4098
|
+
const _hoisted_1$n = ["id", "aria-expanded", "aria-activedescendant", "aria-invalid", "aria-describedby", "disabled", "placeholder", "value"];
|
|
4099
|
+
const _hoisted_2$l = {
|
|
3966
4100
|
key: 0,
|
|
3967
4101
|
class: "tao-combobox__empty"
|
|
3968
4102
|
};
|
|
3969
|
-
const _hoisted_3$
|
|
3970
|
-
const _sfc_main$
|
|
4103
|
+
const _hoisted_3$h = ["id", "aria-selected", "aria-disabled", "data-tao-combobox-index", "onClick", "onMouseenter"];
|
|
4104
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
3971
4105
|
...{ name: "TaoCombobox" },
|
|
3972
4106
|
__name: "TaoCombobox",
|
|
3973
4107
|
props: {
|
|
@@ -4048,12 +4182,16 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
4048
4182
|
}
|
|
4049
4183
|
const rect = trigger.getBoundingClientRect();
|
|
4050
4184
|
const panelHeight = panel.offsetHeight;
|
|
4185
|
+
const panelWidth = panel.offsetWidth || rect.width;
|
|
4051
4186
|
const gap = 4;
|
|
4187
|
+
const pad = 8;
|
|
4052
4188
|
const spaceBelow = window.innerHeight - rect.bottom - gap;
|
|
4053
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);
|
|
4054
4192
|
listStyle.value = {
|
|
4055
4193
|
top: `${openUp ? rect.top - panelHeight - gap : rect.bottom + gap}px`,
|
|
4056
|
-
left: `${
|
|
4194
|
+
left: `${left}px`,
|
|
4057
4195
|
width: `${rect.width}px`
|
|
4058
4196
|
};
|
|
4059
4197
|
}
|
|
@@ -4120,6 +4258,13 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
4120
4258
|
}
|
|
4121
4259
|
commitCreated(value);
|
|
4122
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
|
+
}
|
|
4123
4268
|
function revertQuery() {
|
|
4124
4269
|
syncQueryFromModel();
|
|
4125
4270
|
}
|
|
@@ -4377,7 +4522,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
4377
4522
|
onFocus,
|
|
4378
4523
|
onBlur,
|
|
4379
4524
|
onKeydown: onInputKeydown
|
|
4380
|
-
}, null, 40, _hoisted_1$
|
|
4525
|
+
}, null, 40, _hoisted_1$n),
|
|
4381
4526
|
createElementVNode("span", {
|
|
4382
4527
|
class: normalizeClass(["tao-combobox__chevron", { "tao-combobox__chevron--custom": _ctx.$slots.chevron }]),
|
|
4383
4528
|
"aria-hidden": "true"
|
|
@@ -4400,7 +4545,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
4400
4545
|
class: "tao-combobox__list",
|
|
4401
4546
|
role: "listbox"
|
|
4402
4547
|
}, [
|
|
4403
|
-
!rows.value.length ? (openBlock(), createElementBlock("li", _hoisted_2$
|
|
4548
|
+
!rows.value.length ? (openBlock(), createElementBlock("li", _hoisted_2$l, [
|
|
4404
4549
|
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
4405
4550
|
createTextVNode(toDisplayString(__props.emptyText), 1)
|
|
4406
4551
|
], true)
|
|
@@ -4430,14 +4575,15 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
4430
4575
|
], true, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4431
4576
|
createTextVNode(toDisplayString(row.option.label), 1)
|
|
4432
4577
|
], 64))
|
|
4433
|
-
], 42, _hoisted_3$
|
|
4578
|
+
], 42, _hoisted_3$h);
|
|
4434
4579
|
}), 128))
|
|
4435
4580
|
], 512),
|
|
4436
4581
|
selected.value ? (openBlock(), createElementBlock("button", {
|
|
4437
4582
|
key: 0,
|
|
4438
4583
|
type: "button",
|
|
4439
4584
|
class: "tao-combobox__clear",
|
|
4440
|
-
onMousedown: withModifiers(markPicking, ["prevent"])
|
|
4585
|
+
onMousedown: withModifiers(markPicking, ["prevent"]),
|
|
4586
|
+
onClick: clear
|
|
4441
4587
|
}, [
|
|
4442
4588
|
renderSlot(_ctx.$slots, "clear", {}, () => [
|
|
4443
4589
|
createTextVNode(toDisplayString(__props.clearText), 1)
|
|
@@ -4449,7 +4595,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
4449
4595
|
};
|
|
4450
4596
|
}
|
|
4451
4597
|
});
|
|
4452
|
-
const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4598
|
+
const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-131d254d"]]);
|
|
4453
4599
|
const ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
4454
4600
|
function formatTaoDateIso(parts) {
|
|
4455
4601
|
return `${String(parts.y).padStart(4, "0")}-${String(parts.m).padStart(2, "0")}-${String(parts.d).padStart(2, "0")}`;
|
|
@@ -4488,8 +4634,23 @@ function shiftTaoMonth(iso, months) {
|
|
|
4488
4634
|
if (!parts) {
|
|
4489
4635
|
return iso;
|
|
4490
4636
|
}
|
|
4491
|
-
const
|
|
4492
|
-
|
|
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;
|
|
4493
4654
|
}
|
|
4494
4655
|
function isTaoDateInRange(iso, min, max) {
|
|
4495
4656
|
if (!parseTaoDate(iso)) {
|
|
@@ -4577,15 +4738,15 @@ function buildTaoDateGrid(year, month) {
|
|
|
4577
4738
|
};
|
|
4578
4739
|
});
|
|
4579
4740
|
}
|
|
4580
|
-
const _hoisted_1$
|
|
4581
|
-
const _hoisted_2$
|
|
4582
|
-
const _hoisted_3$
|
|
4741
|
+
const _hoisted_1$m = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
|
|
4742
|
+
const _hoisted_2$k = { class: "tao-date__value" };
|
|
4743
|
+
const _hoisted_3$g = {
|
|
4583
4744
|
class: "tao-date__icon",
|
|
4584
4745
|
"aria-hidden": "true"
|
|
4585
4746
|
};
|
|
4586
|
-
const _hoisted_4$
|
|
4587
|
-
const _hoisted_5$
|
|
4588
|
-
const _hoisted_6$
|
|
4747
|
+
const _hoisted_4$g = ["aria-label"];
|
|
4748
|
+
const _hoisted_5$e = { class: "tao-date__header" };
|
|
4749
|
+
const _hoisted_6$b = ["aria-label"];
|
|
4589
4750
|
const _hoisted_7$9 = { "aria-hidden": "true" };
|
|
4590
4751
|
const _hoisted_8$8 = { class: "tao-date__month" };
|
|
4591
4752
|
const _hoisted_9$3 = ["aria-label"];
|
|
@@ -4601,7 +4762,7 @@ const _hoisted_12$1 = {
|
|
|
4601
4762
|
const _hoisted_13$1 = ["aria-label", "aria-selected", "disabled", "onClick"];
|
|
4602
4763
|
const _hoisted_14$1 = { class: "tao-date__footer" };
|
|
4603
4764
|
const _hoisted_15 = ["disabled"];
|
|
4604
|
-
const _sfc_main$
|
|
4765
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
4605
4766
|
...{ name: "TaoDate" },
|
|
4606
4767
|
__name: "TaoDate",
|
|
4607
4768
|
props: {
|
|
@@ -4680,7 +4841,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
4680
4841
|
if (!next) {
|
|
4681
4842
|
return;
|
|
4682
4843
|
}
|
|
4683
|
-
syncViewFrom(valueIso.value ?? todayIso.value);
|
|
4844
|
+
syncViewFrom(clampTaoDateCursor(valueIso.value ?? todayIso.value, props.min, props.max));
|
|
4684
4845
|
await nextTick();
|
|
4685
4846
|
updatePosition();
|
|
4686
4847
|
(_a = panelRef.value) == null ? void 0 : _a.focus();
|
|
@@ -4709,18 +4870,13 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
4709
4870
|
(_a = triggerRef.value) == null ? void 0 : _a.focus();
|
|
4710
4871
|
}
|
|
4711
4872
|
function goMonth(delta) {
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
if (!parts) {
|
|
4715
|
-
return;
|
|
4716
|
-
}
|
|
4717
|
-
viewYear.value = parts.y;
|
|
4718
|
-
viewMonth.value = parts.m;
|
|
4719
|
-
cursorIso.value = shiftTaoMonth(cursorIso.value, delta);
|
|
4873
|
+
cursorIso.value = clampTaoDateCursor(shiftTaoMonth(cursorIso.value, delta), props.min, props.max);
|
|
4874
|
+
syncViewFrom(cursorIso.value);
|
|
4720
4875
|
void nextTick(updatePosition);
|
|
4721
4876
|
}
|
|
4722
4877
|
function moveCursor(days) {
|
|
4723
|
-
|
|
4878
|
+
const next = shiftTaoDate(cursorIso.value, days);
|
|
4879
|
+
cursorIso.value = isTaoDateInRange(next, props.min, props.max) ? next : clampTaoDateCursor(next, props.min, props.max);
|
|
4724
4880
|
syncViewFrom(cursorIso.value);
|
|
4725
4881
|
void nextTick(updatePosition);
|
|
4726
4882
|
}
|
|
@@ -4835,8 +4991,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
4835
4991
|
onClick: toggle,
|
|
4836
4992
|
onKeydown: onTriggerKeydown
|
|
4837
4993
|
}, [
|
|
4838
|
-
createElementVNode("span", _hoisted_2$
|
|
4839
|
-
createElementVNode("span", _hoisted_3$
|
|
4994
|
+
createElementVNode("span", _hoisted_2$k, toDisplayString(displayLabel.value || __props.placeholder), 1),
|
|
4995
|
+
createElementVNode("span", _hoisted_3$g, [
|
|
4840
4996
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
4841
4997
|
_cache[4] || (_cache[4] = createElementVNode("svg", {
|
|
4842
4998
|
viewBox: "0 0 16 16",
|
|
@@ -4864,7 +5020,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
4864
5020
|
], -1))
|
|
4865
5021
|
], true)
|
|
4866
5022
|
])
|
|
4867
|
-
], 42, _hoisted_1$
|
|
5023
|
+
], 42, _hoisted_1$m),
|
|
4868
5024
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
4869
5025
|
open.value ? (openBlock(), createElementBlock("div", {
|
|
4870
5026
|
key: 0,
|
|
@@ -4878,7 +5034,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
4878
5034
|
style: normalizeStyle(panelStyle.value),
|
|
4879
5035
|
onKeydown: onPanelKeydown
|
|
4880
5036
|
}, [
|
|
4881
|
-
createElementVNode("div", _hoisted_5$
|
|
5037
|
+
createElementVNode("div", _hoisted_5$e, [
|
|
4882
5038
|
createElementVNode("button", {
|
|
4883
5039
|
type: "button",
|
|
4884
5040
|
class: "tao-date__nav",
|
|
@@ -4904,7 +5060,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
4904
5060
|
], -1))
|
|
4905
5061
|
], true)
|
|
4906
5062
|
])
|
|
4907
|
-
], 8, _hoisted_6$
|
|
5063
|
+
], 8, _hoisted_6$b),
|
|
4908
5064
|
createElementVNode("p", _hoisted_8$8, toDisplayString(monthLabel.value), 1),
|
|
4909
5065
|
createElementVNode("button", {
|
|
4910
5066
|
type: "button",
|
|
@@ -4982,22 +5138,22 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
4982
5138
|
], true)
|
|
4983
5139
|
])) : createCommentVNode("", true)
|
|
4984
5140
|
])
|
|
4985
|
-
], 44, _hoisted_4$
|
|
5141
|
+
], 44, _hoisted_4$g)) : createCommentVNode("", true)
|
|
4986
5142
|
]))
|
|
4987
5143
|
], 2);
|
|
4988
5144
|
};
|
|
4989
5145
|
}
|
|
4990
5146
|
});
|
|
4991
|
-
const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4992
|
-
const _hoisted_1$
|
|
4993
|
-
const _hoisted_2$
|
|
4994
|
-
const _hoisted_3$
|
|
5147
|
+
const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-ebd437a8"]]);
|
|
5148
|
+
const _hoisted_1$l = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
|
|
5149
|
+
const _hoisted_2$j = { class: "tao-date-range__value" };
|
|
5150
|
+
const _hoisted_3$f = {
|
|
4995
5151
|
class: "tao-date-range__icon",
|
|
4996
5152
|
"aria-hidden": "true"
|
|
4997
5153
|
};
|
|
4998
|
-
const _hoisted_4$
|
|
4999
|
-
const _hoisted_5$
|
|
5000
|
-
const _hoisted_6$
|
|
5154
|
+
const _hoisted_4$f = ["aria-label"];
|
|
5155
|
+
const _hoisted_5$d = { class: "tao-date__header" };
|
|
5156
|
+
const _hoisted_6$a = ["aria-label"];
|
|
5001
5157
|
const _hoisted_7$8 = { "aria-hidden": "true" };
|
|
5002
5158
|
const _hoisted_8$7 = { class: "tao-date__month" };
|
|
5003
5159
|
const _hoisted_9$2 = ["aria-label"];
|
|
@@ -5009,7 +5165,7 @@ const _hoisted_11$1 = {
|
|
|
5009
5165
|
const _hoisted_12 = ["aria-label", "aria-selected", "disabled", "onMouseenter", "onClick"];
|
|
5010
5166
|
const _hoisted_13 = { class: "tao-date__footer" };
|
|
5011
5167
|
const _hoisted_14 = ["disabled"];
|
|
5012
|
-
const _sfc_main$
|
|
5168
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
5013
5169
|
...{ name: "TaoDateRange" },
|
|
5014
5170
|
__name: "TaoDateRange",
|
|
5015
5171
|
props: {
|
|
@@ -5103,7 +5259,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
5103
5259
|
}
|
|
5104
5260
|
draftStart.value = null;
|
|
5105
5261
|
hoverIso.value = null;
|
|
5106
|
-
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));
|
|
5107
5263
|
await nextTick();
|
|
5108
5264
|
updatePosition();
|
|
5109
5265
|
(_b = panelRef.value) == null ? void 0 : _b.focus();
|
|
@@ -5152,19 +5308,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
5152
5308
|
}
|
|
5153
5309
|
function goMonth(delta) {
|
|
5154
5310
|
hoverIso.value = null;
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
if (!parts) {
|
|
5158
|
-
return;
|
|
5159
|
-
}
|
|
5160
|
-
viewYear.value = parts.y;
|
|
5161
|
-
viewMonth.value = parts.m;
|
|
5162
|
-
cursorIso.value = shiftTaoMonth(cursorIso.value, delta);
|
|
5311
|
+
cursorIso.value = clampTaoDateCursor(shiftTaoMonth(cursorIso.value, delta), props.min, props.max);
|
|
5312
|
+
syncViewFrom(cursorIso.value);
|
|
5163
5313
|
void nextTick(updatePosition);
|
|
5164
5314
|
}
|
|
5165
5315
|
function moveCursor(days) {
|
|
5166
5316
|
hoverIso.value = null;
|
|
5167
|
-
|
|
5317
|
+
const next = shiftTaoDate(cursorIso.value, days);
|
|
5318
|
+
cursorIso.value = isTaoDateInRange(next, props.min, props.max) ? next : clampTaoDateCursor(next, props.min, props.max);
|
|
5168
5319
|
syncViewFrom(cursorIso.value);
|
|
5169
5320
|
void nextTick(updatePosition);
|
|
5170
5321
|
}
|
|
@@ -5297,8 +5448,8 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
5297
5448
|
onClick: toggle,
|
|
5298
5449
|
onKeydown: onTriggerKeydown
|
|
5299
5450
|
}, [
|
|
5300
|
-
createElementVNode("span", _hoisted_2$
|
|
5301
|
-
createElementVNode("span", _hoisted_3$
|
|
5451
|
+
createElementVNode("span", _hoisted_2$j, toDisplayString(displayLabel.value || __props.placeholder), 1),
|
|
5452
|
+
createElementVNode("span", _hoisted_3$f, [
|
|
5302
5453
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
5303
5454
|
_cache[3] || (_cache[3] = createElementVNode("svg", {
|
|
5304
5455
|
viewBox: "0 0 16 16",
|
|
@@ -5326,7 +5477,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
5326
5477
|
], -1))
|
|
5327
5478
|
], true)
|
|
5328
5479
|
])
|
|
5329
|
-
], 42, _hoisted_1$
|
|
5480
|
+
], 42, _hoisted_1$l),
|
|
5330
5481
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
5331
5482
|
open.value ? (openBlock(), createElementBlock("div", {
|
|
5332
5483
|
key: 0,
|
|
@@ -5340,7 +5491,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
5340
5491
|
style: normalizeStyle(panelStyle.value),
|
|
5341
5492
|
onKeydown: onPanelKeydown
|
|
5342
5493
|
}, [
|
|
5343
|
-
createElementVNode("div", _hoisted_5$
|
|
5494
|
+
createElementVNode("div", _hoisted_5$d, [
|
|
5344
5495
|
createElementVNode("button", {
|
|
5345
5496
|
type: "button",
|
|
5346
5497
|
class: "tao-date__nav",
|
|
@@ -5366,7 +5517,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
5366
5517
|
], -1))
|
|
5367
5518
|
], true)
|
|
5368
5519
|
])
|
|
5369
|
-
], 8, _hoisted_6$
|
|
5520
|
+
], 8, _hoisted_6$a),
|
|
5370
5521
|
createElementVNode("p", _hoisted_8$7, toDisplayString(monthLabel.value), 1),
|
|
5371
5522
|
createElementVNode("button", {
|
|
5372
5523
|
type: "button",
|
|
@@ -5453,24 +5604,24 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
5453
5604
|
], true)
|
|
5454
5605
|
])) : createCommentVNode("", true)
|
|
5455
5606
|
])
|
|
5456
|
-
], 44, _hoisted_4$
|
|
5607
|
+
], 44, _hoisted_4$f)) : createCommentVNode("", true)
|
|
5457
5608
|
]))
|
|
5458
5609
|
], 2);
|
|
5459
5610
|
};
|
|
5460
5611
|
}
|
|
5461
5612
|
});
|
|
5462
|
-
const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5463
|
-
const _hoisted_1$
|
|
5464
|
-
const _hoisted_2$
|
|
5465
|
-
const _hoisted_3$
|
|
5613
|
+
const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-aa589793"]]);
|
|
5614
|
+
const _hoisted_1$k = ["for"];
|
|
5615
|
+
const _hoisted_2$i = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
|
|
5616
|
+
const _hoisted_3$e = {
|
|
5466
5617
|
key: 0,
|
|
5467
5618
|
class: "tao-switch__label"
|
|
5468
5619
|
};
|
|
5469
|
-
const _hoisted_4$
|
|
5620
|
+
const _hoisted_4$e = {
|
|
5470
5621
|
key: 1,
|
|
5471
5622
|
class: "tao-switch__label"
|
|
5472
5623
|
};
|
|
5473
|
-
const _sfc_main$
|
|
5624
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
5474
5625
|
...{ name: "TaoSwitch" },
|
|
5475
5626
|
__name: "TaoSwitch",
|
|
5476
5627
|
props: {
|
|
@@ -5485,6 +5636,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
5485
5636
|
const field = inject(formFieldKey, null);
|
|
5486
5637
|
const localId = useId();
|
|
5487
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);
|
|
5488
5641
|
function toggle() {
|
|
5489
5642
|
if (props.disabled) {
|
|
5490
5643
|
return;
|
|
@@ -5495,7 +5648,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
5495
5648
|
}
|
|
5496
5649
|
return (_ctx, _cache) => {
|
|
5497
5650
|
return openBlock(), createElementBlock("label", {
|
|
5498
|
-
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 }]),
|
|
5499
5652
|
for: controlId.value
|
|
5500
5653
|
}, [
|
|
5501
5654
|
createElementVNode("input", {
|
|
@@ -5506,34 +5659,36 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
5506
5659
|
checked: __props.modelValue,
|
|
5507
5660
|
disabled: __props.disabled,
|
|
5508
5661
|
"aria-checked": __props.modelValue,
|
|
5662
|
+
"aria-invalid": invalid.value || void 0,
|
|
5663
|
+
"aria-describedby": describedBy.value,
|
|
5509
5664
|
onChange: toggle
|
|
5510
|
-
}, null, 40, _hoisted_2$
|
|
5665
|
+
}, null, 40, _hoisted_2$i),
|
|
5511
5666
|
_cache[0] || (_cache[0] = createElementVNode("span", {
|
|
5512
5667
|
class: "tao-switch__track",
|
|
5513
5668
|
"aria-hidden": "true"
|
|
5514
5669
|
}, [
|
|
5515
5670
|
createElementVNode("span", { class: "tao-switch__thumb" })
|
|
5516
5671
|
], -1)),
|
|
5517
|
-
__props.label ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
5672
|
+
__props.label ? (openBlock(), createElementBlock("span", _hoisted_3$e, toDisplayString(__props.label), 1)) : _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$e, [
|
|
5518
5673
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5519
5674
|
])) : createCommentVNode("", true)
|
|
5520
|
-
], 10, _hoisted_1$
|
|
5675
|
+
], 10, _hoisted_1$k);
|
|
5521
5676
|
};
|
|
5522
5677
|
}
|
|
5523
5678
|
});
|
|
5524
|
-
const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5679
|
+
const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-17ce5000"]]);
|
|
5525
5680
|
const radioGroupKey = Symbol("taoRadioGroup");
|
|
5526
|
-
const _hoisted_1$
|
|
5527
|
-
const _hoisted_2$
|
|
5528
|
-
const _hoisted_3$
|
|
5681
|
+
const _hoisted_1$j = ["for"];
|
|
5682
|
+
const _hoisted_2$h = ["id", "name", "value", "checked", "disabled", "aria-invalid", "aria-describedby"];
|
|
5683
|
+
const _hoisted_3$d = {
|
|
5529
5684
|
key: 0,
|
|
5530
5685
|
class: "tao-radio__label"
|
|
5531
5686
|
};
|
|
5532
|
-
const _hoisted_4$
|
|
5687
|
+
const _hoisted_4$d = {
|
|
5533
5688
|
key: 1,
|
|
5534
5689
|
class: "tao-radio__label"
|
|
5535
5690
|
};
|
|
5536
|
-
const _sfc_main$
|
|
5691
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
5537
5692
|
...{ name: "TaoRadio" },
|
|
5538
5693
|
__name: "TaoRadio",
|
|
5539
5694
|
props: {
|
|
@@ -5548,7 +5703,11 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
5548
5703
|
const props = __props;
|
|
5549
5704
|
const emit = __emit;
|
|
5550
5705
|
const group = inject(radioGroupKey, null);
|
|
5706
|
+
const field = inject(formFieldKey, null);
|
|
5551
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);
|
|
5552
5711
|
const isDisabled = computed(() => props.disabled || Boolean(group == null ? void 0 : group.disabled.value));
|
|
5553
5712
|
const inputName = computed(() => (group == null ? void 0 : group.name.value) ?? props.name);
|
|
5554
5713
|
const isChecked = computed(() => {
|
|
@@ -5568,37 +5727,39 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
5568
5727
|
}
|
|
5569
5728
|
return (_ctx, _cache) => {
|
|
5570
5729
|
return openBlock(), createElementBlock("label", {
|
|
5571
|
-
class: normalizeClass(["tao-radio", { "tao-radio--disabled": isDisabled.value }]),
|
|
5572
|
-
for:
|
|
5730
|
+
class: normalizeClass(["tao-radio", { "tao-radio--disabled": isDisabled.value, "tao-radio--invalid": invalid.value && !unref(group) }]),
|
|
5731
|
+
for: controlId.value
|
|
5573
5732
|
}, [
|
|
5574
5733
|
createElementVNode("input", {
|
|
5575
|
-
id:
|
|
5734
|
+
id: controlId.value,
|
|
5576
5735
|
class: "tao-radio__input",
|
|
5577
5736
|
type: "radio",
|
|
5578
5737
|
name: inputName.value,
|
|
5579
5738
|
value: String(__props.value),
|
|
5580
5739
|
checked: isChecked.value,
|
|
5581
5740
|
disabled: isDisabled.value,
|
|
5741
|
+
"aria-invalid": !unref(group) && invalid.value || void 0,
|
|
5742
|
+
"aria-describedby": describedBy.value,
|
|
5582
5743
|
onChange
|
|
5583
|
-
}, null, 40, _hoisted_2$
|
|
5744
|
+
}, null, 40, _hoisted_2$h),
|
|
5584
5745
|
_cache[0] || (_cache[0] = createElementVNode("span", {
|
|
5585
5746
|
class: "tao-radio__dot",
|
|
5586
5747
|
"aria-hidden": "true"
|
|
5587
5748
|
}, null, -1)),
|
|
5588
|
-
__props.label ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
5749
|
+
__props.label ? (openBlock(), createElementBlock("span", _hoisted_3$d, toDisplayString(__props.label), 1)) : (openBlock(), createElementBlock("span", _hoisted_4$d, [
|
|
5589
5750
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5590
5751
|
]))
|
|
5591
|
-
], 10, _hoisted_1$
|
|
5752
|
+
], 10, _hoisted_1$j);
|
|
5592
5753
|
};
|
|
5593
5754
|
}
|
|
5594
5755
|
});
|
|
5595
|
-
const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5596
|
-
const _hoisted_1$
|
|
5597
|
-
const _hoisted_2$
|
|
5756
|
+
const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-e79d1fb6"]]);
|
|
5757
|
+
const _hoisted_1$i = ["id", "disabled", "aria-describedby", "aria-invalid", "aria-labelledby"];
|
|
5758
|
+
const _hoisted_2$g = {
|
|
5598
5759
|
key: 0,
|
|
5599
5760
|
class: "tao-radio-group__legend"
|
|
5600
5761
|
};
|
|
5601
|
-
const _sfc_main$
|
|
5762
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
5602
5763
|
...{ name: "TaoRadioGroup" },
|
|
5603
5764
|
__name: "TaoRadioGroup",
|
|
5604
5765
|
props: {
|
|
@@ -5612,10 +5773,14 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
5612
5773
|
setup(__props, { emit: __emit }) {
|
|
5613
5774
|
const props = __props;
|
|
5614
5775
|
const emit = __emit;
|
|
5776
|
+
const field = inject(formFieldKey, null);
|
|
5615
5777
|
const autoName = useId();
|
|
5616
5778
|
const groupName = computed(() => props.name || autoName);
|
|
5617
5779
|
const model = computed(() => props.modelValue);
|
|
5618
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`);
|
|
5619
5784
|
function setValue(value) {
|
|
5620
5785
|
emit("update:modelValue", value);
|
|
5621
5786
|
emit("change", value);
|
|
@@ -5627,24 +5792,29 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
5627
5792
|
setValue
|
|
5628
5793
|
});
|
|
5629
5794
|
return (_ctx, _cache) => {
|
|
5795
|
+
var _a;
|
|
5630
5796
|
return openBlock(), createElementBlock("fieldset", {
|
|
5631
|
-
|
|
5632
|
-
|
|
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
|
|
5633
5803
|
}, [
|
|
5634
|
-
__props.legend ? (openBlock(), createElementBlock("legend", _hoisted_2$
|
|
5804
|
+
__props.legend ? (openBlock(), createElementBlock("legend", _hoisted_2$g, toDisplayString(__props.legend), 1)) : createCommentVNode("", true),
|
|
5635
5805
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5636
|
-
], 10, _hoisted_1$
|
|
5806
|
+
], 10, _hoisted_1$i);
|
|
5637
5807
|
};
|
|
5638
5808
|
}
|
|
5639
5809
|
});
|
|
5640
|
-
const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5810
|
+
const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-6f6fa977"]]);
|
|
5641
5811
|
const segmentedKey = Symbol("taoSegmented");
|
|
5642
|
-
const _hoisted_1$
|
|
5643
|
-
const _hoisted_2$
|
|
5812
|
+
const _hoisted_1$h = ["disabled", "aria-describedby", "aria-invalid", "aria-labelledby", "id"];
|
|
5813
|
+
const _hoisted_2$f = {
|
|
5644
5814
|
key: 0,
|
|
5645
5815
|
class: "tao-segmented__legend"
|
|
5646
5816
|
};
|
|
5647
|
-
const _sfc_main$
|
|
5817
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
5648
5818
|
...{ name: "TaoSegmented" },
|
|
5649
5819
|
__name: "TaoSegmented",
|
|
5650
5820
|
props: {
|
|
@@ -5739,6 +5909,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
5739
5909
|
mutationObserver = null;
|
|
5740
5910
|
});
|
|
5741
5911
|
return (_ctx, _cache) => {
|
|
5912
|
+
var _a;
|
|
5742
5913
|
return openBlock(), createElementBlock("fieldset", {
|
|
5743
5914
|
class: normalizeClass(["tao-segmented", [
|
|
5744
5915
|
`tao-segmented--${__props.size}`,
|
|
@@ -5750,9 +5921,11 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
5750
5921
|
]]),
|
|
5751
5922
|
disabled: __props.disabled,
|
|
5752
5923
|
"aria-describedby": describedBy.value,
|
|
5753
|
-
"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
|
|
5754
5927
|
}, [
|
|
5755
|
-
__props.legend ? (openBlock(), createElementBlock("legend", _hoisted_2$
|
|
5928
|
+
__props.legend ? (openBlock(), createElementBlock("legend", _hoisted_2$f, toDisplayString(__props.legend), 1)) : createCommentVNode("", true),
|
|
5756
5929
|
createElementVNode("div", {
|
|
5757
5930
|
ref_key: "trackRef",
|
|
5758
5931
|
ref: trackRef,
|
|
@@ -5765,24 +5938,24 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
5765
5938
|
}, null, 4),
|
|
5766
5939
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5767
5940
|
], 512)
|
|
5768
|
-
], 10, _hoisted_1$
|
|
5941
|
+
], 10, _hoisted_1$h);
|
|
5769
5942
|
};
|
|
5770
5943
|
}
|
|
5771
5944
|
});
|
|
5772
|
-
const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5773
|
-
const _hoisted_1$
|
|
5774
|
-
const _hoisted_2$
|
|
5775
|
-
const _hoisted_3$
|
|
5776
|
-
const _hoisted_4$
|
|
5945
|
+
const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-af757a32"]]);
|
|
5946
|
+
const _hoisted_1$g = ["for"];
|
|
5947
|
+
const _hoisted_2$e = ["id", "name", "value", "checked", "disabled", "aria-label"];
|
|
5948
|
+
const _hoisted_3$c = { class: "tao-segmented-option__face" };
|
|
5949
|
+
const _hoisted_4$c = {
|
|
5777
5950
|
key: 0,
|
|
5778
5951
|
class: "tao-segmented-option__icon",
|
|
5779
5952
|
"aria-hidden": "true"
|
|
5780
5953
|
};
|
|
5781
|
-
const _hoisted_5$
|
|
5954
|
+
const _hoisted_5$c = {
|
|
5782
5955
|
key: 1,
|
|
5783
5956
|
class: "tao-segmented-option__label"
|
|
5784
5957
|
};
|
|
5785
|
-
const _hoisted_6$
|
|
5958
|
+
const _hoisted_6$9 = {
|
|
5786
5959
|
key: 2,
|
|
5787
5960
|
class: "tao-segmented-option__sr"
|
|
5788
5961
|
};
|
|
@@ -5790,7 +5963,7 @@ const _hoisted_7$7 = {
|
|
|
5790
5963
|
key: 3,
|
|
5791
5964
|
class: "tao-segmented-option__count"
|
|
5792
5965
|
};
|
|
5793
|
-
const _sfc_main$
|
|
5966
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
5794
5967
|
...{ name: "TaoSegmentedOption" },
|
|
5795
5968
|
__name: "TaoSegmentedOption",
|
|
5796
5969
|
props: {
|
|
@@ -5864,38 +6037,38 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
5864
6037
|
disabled: isDisabled.value,
|
|
5865
6038
|
"aria-label": __props.ariaLabel,
|
|
5866
6039
|
onChange
|
|
5867
|
-
}, null, 40, _hoisted_2$
|
|
5868
|
-
createElementVNode("span", _hoisted_3$
|
|
5869
|
-
__props.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
6040
|
+
}, null, 40, _hoisted_2$e),
|
|
6041
|
+
createElementVNode("span", _hoisted_3$c, [
|
|
6042
|
+
__props.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_4$c, [
|
|
5870
6043
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
5871
6044
|
createTextVNode(toDisplayString(__props.icon), 1)
|
|
5872
6045
|
], true)
|
|
5873
6046
|
])) : createCommentVNode("", true),
|
|
5874
|
-
hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
6047
|
+
hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_5$c, [
|
|
5875
6048
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
5876
6049
|
createTextVNode(toDisplayString(__props.label), 1)
|
|
5877
6050
|
], true)
|
|
5878
|
-
])) : __props.ariaLabel ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
6051
|
+
])) : __props.ariaLabel ? (openBlock(), createElementBlock("span", _hoisted_6$9, toDisplayString(__props.ariaLabel), 1)) : createCommentVNode("", true),
|
|
5879
6052
|
countLabel.value ? (openBlock(), createElementBlock("span", _hoisted_7$7, toDisplayString(countLabel.value), 1)) : createCommentVNode("", true)
|
|
5880
6053
|
])
|
|
5881
|
-
], 10, _hoisted_1$
|
|
6054
|
+
], 10, _hoisted_1$g);
|
|
5882
6055
|
};
|
|
5883
6056
|
}
|
|
5884
6057
|
});
|
|
5885
|
-
const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5886
|
-
const _hoisted_1$
|
|
5887
|
-
const _hoisted_2$
|
|
5888
|
-
const _hoisted_3$
|
|
6058
|
+
const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-1a9357a1"]]);
|
|
6059
|
+
const _hoisted_1$f = ["role", "aria-live"];
|
|
6060
|
+
const _hoisted_2$d = { class: "tao-alert__body" };
|
|
6061
|
+
const _hoisted_3$b = {
|
|
5889
6062
|
key: 0,
|
|
5890
6063
|
class: "tao-alert__title"
|
|
5891
6064
|
};
|
|
5892
|
-
const _hoisted_4$
|
|
6065
|
+
const _hoisted_4$b = {
|
|
5893
6066
|
key: 1,
|
|
5894
6067
|
class: "tao-alert__message"
|
|
5895
6068
|
};
|
|
5896
|
-
const _hoisted_5$
|
|
5897
|
-
const _hoisted_6$
|
|
5898
|
-
const _sfc_main$
|
|
6069
|
+
const _hoisted_5$b = ["aria-label"];
|
|
6070
|
+
const _hoisted_6$8 = { "aria-hidden": "true" };
|
|
6071
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
5899
6072
|
...{ name: "TaoAlert" },
|
|
5900
6073
|
__name: "TaoAlert",
|
|
5901
6074
|
props: {
|
|
@@ -5916,9 +6089,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
5916
6089
|
role: tone.value === "error" ? "alert" : "status",
|
|
5917
6090
|
"aria-live": live.value
|
|
5918
6091
|
}, [
|
|
5919
|
-
createElementVNode("div", _hoisted_2$
|
|
5920
|
-
__props.title ? (openBlock(), createElementBlock("strong", _hoisted_3$
|
|
5921
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("p", _hoisted_4$
|
|
6092
|
+
createElementVNode("div", _hoisted_2$d, [
|
|
6093
|
+
__props.title ? (openBlock(), createElementBlock("strong", _hoisted_3$b, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
6094
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("p", _hoisted_4$b, [
|
|
5922
6095
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5923
6096
|
])) : createCommentVNode("", true)
|
|
5924
6097
|
]),
|
|
@@ -5929,30 +6102,30 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
5929
6102
|
"aria-label": __props.closeLabel,
|
|
5930
6103
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
|
|
5931
6104
|
}, [
|
|
5932
|
-
createElementVNode("span", _hoisted_6$
|
|
6105
|
+
createElementVNode("span", _hoisted_6$8, [
|
|
5933
6106
|
renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
5934
6107
|
_cache[1] || (_cache[1] = createTextVNode("×", -1))
|
|
5935
6108
|
], true)
|
|
5936
6109
|
])
|
|
5937
|
-
], 8, _hoisted_5$
|
|
5938
|
-
], 10, _hoisted_1$
|
|
6110
|
+
], 8, _hoisted_5$b)) : createCommentVNode("", true)
|
|
6111
|
+
], 10, _hoisted_1$f);
|
|
5939
6112
|
};
|
|
5940
6113
|
}
|
|
5941
6114
|
});
|
|
5942
|
-
const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5943
|
-
const _hoisted_1$
|
|
5944
|
-
const _hoisted_2$
|
|
5945
|
-
const _hoisted_3$
|
|
5946
|
-
const _hoisted_4$
|
|
5947
|
-
const _hoisted_5$
|
|
5948
|
-
const _hoisted_6$
|
|
6115
|
+
const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-1a1dbef3"]]);
|
|
6116
|
+
const _hoisted_1$e = { key: 0 };
|
|
6117
|
+
const _hoisted_2$c = ["aria-sort"];
|
|
6118
|
+
const _hoisted_3$a = ["onClick"];
|
|
6119
|
+
const _hoisted_4$a = { key: 1 };
|
|
6120
|
+
const _hoisted_5$a = { key: 0 };
|
|
6121
|
+
const _hoisted_6$7 = ["colspan"];
|
|
5949
6122
|
const _hoisted_7$6 = ["onClick"];
|
|
5950
6123
|
const _hoisted_8$6 = {
|
|
5951
6124
|
key: 0,
|
|
5952
6125
|
class: "tao-table__loading",
|
|
5953
6126
|
"aria-busy": "true"
|
|
5954
6127
|
};
|
|
5955
|
-
const _sfc_main$
|
|
6128
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
5956
6129
|
...{ name: "TaoTable" },
|
|
5957
6130
|
__name: "TaoTable",
|
|
5958
6131
|
props: {
|
|
@@ -6033,7 +6206,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
6033
6206
|
"tao-table--sticky": __props.sticky
|
|
6034
6207
|
}])
|
|
6035
6208
|
}, [
|
|
6036
|
-
__props.caption ? (openBlock(), createElementBlock("caption", _hoisted_1$
|
|
6209
|
+
__props.caption ? (openBlock(), createElementBlock("caption", _hoisted_1$e, toDisplayString(__props.caption), 1)) : createCommentVNode("", true),
|
|
6037
6210
|
createElementVNode("thead", null, [
|
|
6038
6211
|
createElementVNode("tr", null, [
|
|
6039
6212
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
|
|
@@ -6057,13 +6230,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
6057
6230
|
}]),
|
|
6058
6231
|
"aria-hidden": "true"
|
|
6059
6232
|
}, null, 2)
|
|
6060
|
-
], 8, _hoisted_3$
|
|
6061
|
-
], 12, _hoisted_2$
|
|
6233
|
+
], 8, _hoisted_3$a)) : (openBlock(), createElementBlock("span", _hoisted_4$a, toDisplayString(column.label), 1))
|
|
6234
|
+
], 12, _hoisted_2$c);
|
|
6062
6235
|
}), 128))
|
|
6063
6236
|
])
|
|
6064
6237
|
]),
|
|
6065
6238
|
createElementVNode("tbody", null, [
|
|
6066
|
-
isEmpty.value ? (openBlock(), createElementBlock("tr", _hoisted_5$
|
|
6239
|
+
isEmpty.value ? (openBlock(), createElementBlock("tr", _hoisted_5$a, [
|
|
6067
6240
|
createElementVNode("td", {
|
|
6068
6241
|
class: "tao-table__empty",
|
|
6069
6242
|
colspan: colCount.value
|
|
@@ -6071,7 +6244,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
6071
6244
|
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
6072
6245
|
createTextVNode(toDisplayString(__props.emptyText), 1)
|
|
6073
6246
|
], true)
|
|
6074
|
-
], 8, _hoisted_6$
|
|
6247
|
+
], 8, _hoisted_6$7)
|
|
6075
6248
|
])) : createCommentVNode("", true),
|
|
6076
6249
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (row, index) => {
|
|
6077
6250
|
return openBlock(), createElementBlock("tr", {
|
|
@@ -6113,7 +6286,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
6113
6286
|
};
|
|
6114
6287
|
}
|
|
6115
6288
|
});
|
|
6116
|
-
const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6289
|
+
const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-5ce586b8"]]);
|
|
6117
6290
|
function buildPaginationItems(page, pageCount, siblingCount = 1) {
|
|
6118
6291
|
if (pageCount <= 0) {
|
|
6119
6292
|
return [];
|
|
@@ -6138,15 +6311,15 @@ function buildPaginationItems(page, pageCount, siblingCount = 1) {
|
|
|
6138
6311
|
items.push({ type: "page", page: pageCount });
|
|
6139
6312
|
return items;
|
|
6140
6313
|
}
|
|
6141
|
-
const _hoisted_1$
|
|
6142
|
-
const _hoisted_2$
|
|
6314
|
+
const _hoisted_1$d = ["aria-label"];
|
|
6315
|
+
const _hoisted_2$b = {
|
|
6143
6316
|
key: 0,
|
|
6144
6317
|
class: "tao-pagination__total"
|
|
6145
6318
|
};
|
|
6146
|
-
const _hoisted_3$
|
|
6147
|
-
const _hoisted_4$
|
|
6148
|
-
const _hoisted_5$
|
|
6149
|
-
const _hoisted_6$
|
|
6319
|
+
const _hoisted_3$9 = { class: "tao-pagination__pages" };
|
|
6320
|
+
const _hoisted_4$9 = ["aria-label", "disabled"];
|
|
6321
|
+
const _hoisted_5$9 = { "aria-hidden": "true" };
|
|
6322
|
+
const _hoisted_6$6 = ["aria-label", "disabled", "onClick"];
|
|
6150
6323
|
const _hoisted_7$5 = {
|
|
6151
6324
|
key: 1,
|
|
6152
6325
|
class: "tao-pagination__ellipsis",
|
|
@@ -6155,7 +6328,7 @@ const _hoisted_7$5 = {
|
|
|
6155
6328
|
const _hoisted_8$5 = ["aria-current", "aria-label", "disabled", "onClick"];
|
|
6156
6329
|
const _hoisted_9$1 = ["aria-label", "disabled"];
|
|
6157
6330
|
const _hoisted_10$1 = { "aria-hidden": "true" };
|
|
6158
|
-
const _sfc_main$
|
|
6331
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
6159
6332
|
...{ name: "TaoPagination" },
|
|
6160
6333
|
__name: "TaoPagination",
|
|
6161
6334
|
props: {
|
|
@@ -6183,11 +6356,15 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
6183
6356
|
const items = computed(() => buildPaginationItems(current.value, pageCount.value, props.siblingCount));
|
|
6184
6357
|
const from = computed(() => props.total === 0 ? 0 : (current.value - 1) * props.pageSize + 1);
|
|
6185
6358
|
const to = computed(() => Math.min(current.value * props.pageSize, props.total));
|
|
6186
|
-
watch(
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
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
|
+
);
|
|
6191
6368
|
function goTo(next) {
|
|
6192
6369
|
if (props.disabled) {
|
|
6193
6370
|
return;
|
|
@@ -6204,7 +6381,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
6204
6381
|
class: normalizeClass(["tao-pagination", `tao-pagination--${__props.size}`]),
|
|
6205
6382
|
"aria-label": __props.ariaLabel
|
|
6206
6383
|
}, [
|
|
6207
|
-
__props.showTotal ? (openBlock(), createElementBlock("p", _hoisted_2$
|
|
6384
|
+
__props.showTotal ? (openBlock(), createElementBlock("p", _hoisted_2$b, [
|
|
6208
6385
|
renderSlot(_ctx.$slots, "total", {
|
|
6209
6386
|
from: from.value,
|
|
6210
6387
|
to: to.value,
|
|
@@ -6217,7 +6394,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
6217
6394
|
], 64))
|
|
6218
6395
|
], true)
|
|
6219
6396
|
])) : createCommentVNode("", true),
|
|
6220
|
-
createElementVNode("div", _hoisted_3$
|
|
6397
|
+
createElementVNode("div", _hoisted_3$9, [
|
|
6221
6398
|
createElementVNode("button", {
|
|
6222
6399
|
type: "button",
|
|
6223
6400
|
class: "tao-pagination__btn",
|
|
@@ -6225,12 +6402,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
6225
6402
|
disabled: __props.disabled || current.value <= 1,
|
|
6226
6403
|
onClick: _cache[0] || (_cache[0] = ($event) => goTo(current.value - 1))
|
|
6227
6404
|
}, [
|
|
6228
|
-
createElementVNode("span", _hoisted_5$
|
|
6405
|
+
createElementVNode("span", _hoisted_5$9, [
|
|
6229
6406
|
renderSlot(_ctx.$slots, "prev-icon", {}, () => [
|
|
6230
6407
|
_cache[2] || (_cache[2] = createTextVNode("‹", -1))
|
|
6231
6408
|
], true)
|
|
6232
6409
|
])
|
|
6233
|
-
], 8, _hoisted_4$
|
|
6410
|
+
], 8, _hoisted_4$9),
|
|
6234
6411
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item) => {
|
|
6235
6412
|
return openBlock(), createElementBlock(Fragment, {
|
|
6236
6413
|
key: item.type === "page" ? item.page : item.id
|
|
@@ -6242,7 +6419,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
6242
6419
|
"aria-label": item.id === "left" ? __props.jumpPrevLabel.replace("{n}", String(__props.jump)) : __props.jumpNextLabel.replace("{n}", String(__props.jump)),
|
|
6243
6420
|
disabled: __props.disabled,
|
|
6244
6421
|
onClick: ($event) => goTo(item.id === "left" ? current.value - __props.jump : current.value + __props.jump)
|
|
6245
|
-
}, " … ", 8, _hoisted_6$
|
|
6422
|
+
}, " … ", 8, _hoisted_6$6)) : item.type === "ellipsis" ? (openBlock(), createElementBlock("span", _hoisted_7$5, "…")) : (openBlock(), createElementBlock("button", {
|
|
6246
6423
|
key: 2,
|
|
6247
6424
|
type: "button",
|
|
6248
6425
|
class: normalizeClass(["tao-pagination__btn", { "tao-pagination__btn--current": item.page === current.value }]),
|
|
@@ -6267,29 +6444,29 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
6267
6444
|
])
|
|
6268
6445
|
], 8, _hoisted_9$1)
|
|
6269
6446
|
])
|
|
6270
|
-
], 10, _hoisted_1$
|
|
6447
|
+
], 10, _hoisted_1$d);
|
|
6271
6448
|
};
|
|
6272
6449
|
}
|
|
6273
6450
|
});
|
|
6274
|
-
const TaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6275
|
-
const _hoisted_1$
|
|
6276
|
-
const _hoisted_2$
|
|
6451
|
+
const TaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-37f3d381"]]);
|
|
6452
|
+
const _hoisted_1$c = { class: "tao-empty" };
|
|
6453
|
+
const _hoisted_2$a = {
|
|
6277
6454
|
key: 0,
|
|
6278
6455
|
class: "tao-empty__icon"
|
|
6279
6456
|
};
|
|
6280
|
-
const _hoisted_3$
|
|
6457
|
+
const _hoisted_3$8 = {
|
|
6281
6458
|
key: 1,
|
|
6282
6459
|
class: "tao-empty__title"
|
|
6283
6460
|
};
|
|
6284
|
-
const _hoisted_4$
|
|
6461
|
+
const _hoisted_4$8 = {
|
|
6285
6462
|
key: 2,
|
|
6286
6463
|
class: "tao-empty__text"
|
|
6287
6464
|
};
|
|
6288
|
-
const _hoisted_5$
|
|
6465
|
+
const _hoisted_5$8 = {
|
|
6289
6466
|
key: 3,
|
|
6290
6467
|
class: "tao-empty__action"
|
|
6291
6468
|
};
|
|
6292
|
-
const _sfc_main$
|
|
6469
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
6293
6470
|
...{ name: "TaoEmpty" },
|
|
6294
6471
|
__name: "TaoEmpty",
|
|
6295
6472
|
props: {
|
|
@@ -6297,22 +6474,189 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
6297
6474
|
},
|
|
6298
6475
|
setup(__props) {
|
|
6299
6476
|
return (_ctx, _cache) => {
|
|
6300
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
6301
|
-
_ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
6477
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
6478
|
+
_ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
|
|
6302
6479
|
renderSlot(_ctx.$slots, "icon", {}, void 0, true)
|
|
6303
6480
|
])) : createCommentVNode("", true),
|
|
6304
|
-
__props.title ? (openBlock(), createElementBlock("p", _hoisted_3$
|
|
6305
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("p", _hoisted_4$
|
|
6481
|
+
__props.title ? (openBlock(), createElementBlock("p", _hoisted_3$8, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
6482
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("p", _hoisted_4$8, [
|
|
6306
6483
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
6307
6484
|
])) : createCommentVNode("", true),
|
|
6308
|
-
_ctx.$slots.action ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
6485
|
+
_ctx.$slots.action ? (openBlock(), createElementBlock("div", _hoisted_5$8, [
|
|
6309
6486
|
renderSlot(_ctx.$slots, "action", {}, void 0, true)
|
|
6310
6487
|
])) : createCommentVNode("", true)
|
|
6311
6488
|
]);
|
|
6312
6489
|
};
|
|
6313
6490
|
}
|
|
6314
6491
|
});
|
|
6315
|
-
const TaoEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6492
|
+
const TaoEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-8056884d"]]);
|
|
6493
|
+
const taoListKey = Symbol("taoList");
|
|
6494
|
+
const _hoisted_1$b = ["aria-label"];
|
|
6495
|
+
const _hoisted_2$9 = {
|
|
6496
|
+
key: 0,
|
|
6497
|
+
class: "tao-list__empty"
|
|
6498
|
+
};
|
|
6499
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
6500
|
+
...{ name: "TaoList" },
|
|
6501
|
+
__name: "TaoList",
|
|
6502
|
+
props: {
|
|
6503
|
+
size: { default: "medium" },
|
|
6504
|
+
bordered: { type: Boolean, default: true },
|
|
6505
|
+
divided: { type: Boolean, default: true },
|
|
6506
|
+
maxHeight: {},
|
|
6507
|
+
empty: { type: Boolean, default: false },
|
|
6508
|
+
ariaLabel: { default: "" }
|
|
6509
|
+
},
|
|
6510
|
+
setup(__props) {
|
|
6511
|
+
const props = __props;
|
|
6512
|
+
const size = computed(() => props.size);
|
|
6513
|
+
provide(taoListKey, { size });
|
|
6514
|
+
const listStyle = computed(() => {
|
|
6515
|
+
if (props.maxHeight === void 0 || props.maxHeight === "") {
|
|
6516
|
+
return void 0;
|
|
6517
|
+
}
|
|
6518
|
+
const value = typeof props.maxHeight === "number" ? `${props.maxHeight}px` : props.maxHeight;
|
|
6519
|
+
return { maxHeight: value };
|
|
6520
|
+
});
|
|
6521
|
+
return (_ctx, _cache) => {
|
|
6522
|
+
return openBlock(), createElementBlock("ul", {
|
|
6523
|
+
class: normalizeClass(["tao-list", [
|
|
6524
|
+
`tao-list--${size.value}`,
|
|
6525
|
+
{
|
|
6526
|
+
"tao-list--bordered": __props.bordered,
|
|
6527
|
+
"tao-list--divided": __props.divided,
|
|
6528
|
+
"tao-list--plain": !__props.bordered,
|
|
6529
|
+
"tao-list--empty": __props.empty,
|
|
6530
|
+
"tao-list--scroll": Boolean(__props.maxHeight)
|
|
6531
|
+
}
|
|
6532
|
+
]]),
|
|
6533
|
+
style: normalizeStyle(listStyle.value),
|
|
6534
|
+
"aria-label": __props.ariaLabel || void 0
|
|
6535
|
+
}, [
|
|
6536
|
+
__props.empty ? (openBlock(), createElementBlock("li", _hoisted_2$9, [
|
|
6537
|
+
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
6538
|
+
_cache[0] || (_cache[0] = createTextVNode("Ничего нет", -1))
|
|
6539
|
+
], true)
|
|
6540
|
+
])) : renderSlot(_ctx.$slots, "default", {}, void 0, true, 1)
|
|
6541
|
+
], 14, _hoisted_1$b);
|
|
6542
|
+
};
|
|
6543
|
+
}
|
|
6544
|
+
});
|
|
6545
|
+
const TaoList = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-798c83a3"]]);
|
|
6546
|
+
const _hoisted_1$a = ["aria-current", "aria-disabled"];
|
|
6547
|
+
const _hoisted_2$8 = {
|
|
6548
|
+
key: 0,
|
|
6549
|
+
class: "tao-list-item__prefix"
|
|
6550
|
+
};
|
|
6551
|
+
const _hoisted_3$7 = { class: "tao-list-item__text" };
|
|
6552
|
+
const _hoisted_4$7 = { class: "tao-list-item__title" };
|
|
6553
|
+
const _hoisted_5$7 = {
|
|
6554
|
+
key: 0,
|
|
6555
|
+
class: "tao-list-item__description"
|
|
6556
|
+
};
|
|
6557
|
+
const _hoisted_6$5 = {
|
|
6558
|
+
key: 1,
|
|
6559
|
+
class: "tao-list-item__suffix"
|
|
6560
|
+
};
|
|
6561
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
6562
|
+
...{ name: "TaoListItem" },
|
|
6563
|
+
__name: "TaoListItem",
|
|
6564
|
+
props: {
|
|
6565
|
+
title: { default: "" },
|
|
6566
|
+
description: { default: "" },
|
|
6567
|
+
selected: { type: Boolean, default: false },
|
|
6568
|
+
disabled: { type: Boolean, default: false },
|
|
6569
|
+
active: { type: Boolean, default: false },
|
|
6570
|
+
clickable: { type: Boolean, default: false },
|
|
6571
|
+
size: {},
|
|
6572
|
+
actionAlways: { type: Boolean, default: false }
|
|
6573
|
+
},
|
|
6574
|
+
emits: ["click"],
|
|
6575
|
+
setup(__props, { emit: __emit }) {
|
|
6576
|
+
const props = __props;
|
|
6577
|
+
const emit = __emit;
|
|
6578
|
+
const slots = useSlots();
|
|
6579
|
+
const list = inject(taoListKey, null);
|
|
6580
|
+
const sizeClass = computed(() => {
|
|
6581
|
+
const size = props.size ?? (list == null ? void 0 : list.size.value) ?? "medium";
|
|
6582
|
+
if (size === "small") {
|
|
6583
|
+
return "s";
|
|
6584
|
+
}
|
|
6585
|
+
if (size === "large") {
|
|
6586
|
+
return "l";
|
|
6587
|
+
}
|
|
6588
|
+
return "m";
|
|
6589
|
+
});
|
|
6590
|
+
const hasAction = computed(() => Boolean(slots.action));
|
|
6591
|
+
const hasPrefix = computed(() => Boolean(slots.prefix));
|
|
6592
|
+
const hasSuffix = computed(() => Boolean(slots.suffix));
|
|
6593
|
+
const hasDescription = computed(() => Boolean(props.description || slots.description));
|
|
6594
|
+
function onHitClick(event) {
|
|
6595
|
+
if (props.disabled || !props.clickable) {
|
|
6596
|
+
return;
|
|
6597
|
+
}
|
|
6598
|
+
emit("click", event);
|
|
6599
|
+
}
|
|
6600
|
+
return (_ctx, _cache) => {
|
|
6601
|
+
return openBlock(), createElementBlock("li", {
|
|
6602
|
+
class: normalizeClass(["tao-list-item", [
|
|
6603
|
+
`tao-list-item--${sizeClass.value}`,
|
|
6604
|
+
{
|
|
6605
|
+
"tao-list-item--selected": __props.selected,
|
|
6606
|
+
"tao-list-item--disabled": __props.disabled,
|
|
6607
|
+
"tao-list-item--active": __props.active,
|
|
6608
|
+
"tao-list-item--clickable": __props.clickable,
|
|
6609
|
+
"tao-list-item--has-action": hasAction.value,
|
|
6610
|
+
"tao-list-item--action-always": __props.actionAlways
|
|
6611
|
+
}
|
|
6612
|
+
]]),
|
|
6613
|
+
"aria-current": !__props.clickable && __props.selected ? "true" : void 0,
|
|
6614
|
+
"aria-disabled": __props.disabled || void 0
|
|
6615
|
+
}, [
|
|
6616
|
+
(openBlock(), createBlock(resolveDynamicComponent(__props.clickable ? "button" : "div"), {
|
|
6617
|
+
class: "tao-list-item__hit",
|
|
6618
|
+
type: __props.clickable ? "button" : void 0,
|
|
6619
|
+
disabled: __props.clickable ? __props.disabled : void 0,
|
|
6620
|
+
"aria-current": __props.clickable && __props.selected ? "true" : void 0,
|
|
6621
|
+
onClick: onHitClick
|
|
6622
|
+
}, {
|
|
6623
|
+
default: withCtx(() => [
|
|
6624
|
+
hasPrefix.value ? (openBlock(), createElementBlock("span", _hoisted_2$8, [
|
|
6625
|
+
renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
6626
|
+
])) : createCommentVNode("", true),
|
|
6627
|
+
createElementVNode("span", _hoisted_3$7, [
|
|
6628
|
+
createElementVNode("span", _hoisted_4$7, [
|
|
6629
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
6630
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
6631
|
+
], true)
|
|
6632
|
+
]),
|
|
6633
|
+
hasDescription.value ? (openBlock(), createElementBlock("span", _hoisted_5$7, [
|
|
6634
|
+
renderSlot(_ctx.$slots, "description", {}, () => [
|
|
6635
|
+
createTextVNode(toDisplayString(__props.description), 1)
|
|
6636
|
+
], true)
|
|
6637
|
+
])) : createCommentVNode("", true)
|
|
6638
|
+
]),
|
|
6639
|
+
hasSuffix.value ? (openBlock(), createElementBlock("span", _hoisted_6$5, [
|
|
6640
|
+
renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
|
|
6641
|
+
])) : createCommentVNode("", true)
|
|
6642
|
+
]),
|
|
6643
|
+
_: 3
|
|
6644
|
+
}, 8, ["type", "disabled", "aria-current"])),
|
|
6645
|
+
hasAction.value ? (openBlock(), createElementBlock("div", {
|
|
6646
|
+
key: 0,
|
|
6647
|
+
class: "tao-list-item__action",
|
|
6648
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
6649
|
+
}, ["stop"])),
|
|
6650
|
+
onKeydown: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
6651
|
+
}, ["stop"]))
|
|
6652
|
+
}, [
|
|
6653
|
+
renderSlot(_ctx.$slots, "action", {}, void 0, true)
|
|
6654
|
+
], 32)) : createCommentVNode("", true)
|
|
6655
|
+
], 10, _hoisted_1$a);
|
|
6656
|
+
};
|
|
6657
|
+
}
|
|
6658
|
+
});
|
|
6659
|
+
const TaoListItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-878b7727"]]);
|
|
6316
6660
|
const _hoisted_1$9 = {
|
|
6317
6661
|
class: "tao-skeleton-group",
|
|
6318
6662
|
"aria-hidden": true
|
|
@@ -6373,9 +6717,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
6373
6717
|
const emit = __emit;
|
|
6374
6718
|
const panelRef = ref(null);
|
|
6375
6719
|
const titleId = useId();
|
|
6376
|
-
let previousOverflow = "";
|
|
6377
6720
|
let previousFocus = null;
|
|
6378
|
-
let
|
|
6721
|
+
let scrollHeld = false;
|
|
6379
6722
|
function close() {
|
|
6380
6723
|
if (!props.closable) {
|
|
6381
6724
|
return;
|
|
@@ -6383,21 +6726,19 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
6383
6726
|
emit("update:modelValue", false);
|
|
6384
6727
|
emit("close");
|
|
6385
6728
|
}
|
|
6386
|
-
function
|
|
6387
|
-
if (
|
|
6729
|
+
function holdScroll() {
|
|
6730
|
+
if (scrollHeld || !isBrowser()) {
|
|
6388
6731
|
return;
|
|
6389
6732
|
}
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
scrollLocked = true;
|
|
6733
|
+
lockBodyScroll();
|
|
6734
|
+
scrollHeld = true;
|
|
6393
6735
|
}
|
|
6394
|
-
function
|
|
6395
|
-
if (!
|
|
6736
|
+
function releaseScroll() {
|
|
6737
|
+
if (!scrollHeld) {
|
|
6396
6738
|
return;
|
|
6397
6739
|
}
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
scrollLocked = false;
|
|
6740
|
+
unlockBodyScroll();
|
|
6741
|
+
scrollHeld = false;
|
|
6401
6742
|
}
|
|
6402
6743
|
function restoreFocus() {
|
|
6403
6744
|
var _a;
|
|
@@ -6415,6 +6756,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
6415
6756
|
}
|
|
6416
6757
|
function onKeydown(event) {
|
|
6417
6758
|
if (event.key === "Escape") {
|
|
6759
|
+
if (!props.closable) {
|
|
6760
|
+
return;
|
|
6761
|
+
}
|
|
6418
6762
|
event.preventDefault();
|
|
6419
6763
|
close();
|
|
6420
6764
|
return;
|
|
@@ -6426,19 +6770,23 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
6426
6770
|
watch(
|
|
6427
6771
|
() => props.modelValue,
|
|
6428
6772
|
(isOpen) => {
|
|
6773
|
+
if (!isBrowser()) {
|
|
6774
|
+
return;
|
|
6775
|
+
}
|
|
6429
6776
|
if (isOpen) {
|
|
6430
6777
|
previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
6431
|
-
|
|
6778
|
+
holdScroll();
|
|
6432
6779
|
void focusPanel();
|
|
6433
6780
|
return;
|
|
6434
6781
|
}
|
|
6435
|
-
|
|
6782
|
+
releaseScroll();
|
|
6436
6783
|
restoreFocus();
|
|
6437
6784
|
},
|
|
6438
6785
|
{ immediate: true }
|
|
6439
6786
|
);
|
|
6440
6787
|
onBeforeUnmount(() => {
|
|
6441
|
-
|
|
6788
|
+
releaseScroll();
|
|
6789
|
+
restoreFocus();
|
|
6442
6790
|
});
|
|
6443
6791
|
return (_ctx, _cache) => {
|
|
6444
6792
|
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
@@ -6499,7 +6847,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
6499
6847
|
};
|
|
6500
6848
|
}
|
|
6501
6849
|
});
|
|
6502
|
-
const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
6850
|
+
const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-10fb02f2"]]);
|
|
6503
6851
|
const _hoisted_1$7 = ["title"];
|
|
6504
6852
|
const _hoisted_2$6 = { class: "tao-avatar__face" };
|
|
6505
6853
|
const _hoisted_3$5 = ["src", "alt"];
|
|
@@ -6584,18 +6932,30 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
6584
6932
|
}
|
|
6585
6933
|
return extra.length ? `${base}, ${extra.join(", ")}` : base;
|
|
6586
6934
|
});
|
|
6935
|
+
const imgFailed = ref(false);
|
|
6936
|
+
const showImage = computed(() => Boolean(props.src) && !imgFailed.value);
|
|
6937
|
+
watch(
|
|
6938
|
+
() => props.src,
|
|
6939
|
+
() => {
|
|
6940
|
+
imgFailed.value = false;
|
|
6941
|
+
}
|
|
6942
|
+
);
|
|
6943
|
+
function onImgError() {
|
|
6944
|
+
imgFailed.value = true;
|
|
6945
|
+
}
|
|
6587
6946
|
return (_ctx, _cache) => {
|
|
6588
6947
|
return openBlock(), createElementBlock("span", {
|
|
6589
6948
|
class: normalizeClass(["tao-avatar", `tao-avatar--${sizeClass.value}`]),
|
|
6590
6949
|
title: label.value
|
|
6591
6950
|
}, [
|
|
6592
6951
|
createElementVNode("span", _hoisted_2$6, [
|
|
6593
|
-
|
|
6952
|
+
showImage.value ? (openBlock(), createElementBlock("img", {
|
|
6594
6953
|
key: 0,
|
|
6595
6954
|
class: "tao-avatar__img",
|
|
6596
6955
|
src: __props.src,
|
|
6597
|
-
alt: label.value
|
|
6598
|
-
|
|
6956
|
+
alt: label.value,
|
|
6957
|
+
onError: onImgError
|
|
6958
|
+
}, null, 40, _hoisted_3$5)) : (openBlock(), createElementBlock("span", {
|
|
6599
6959
|
key: 1,
|
|
6600
6960
|
class: "tao-avatar__fallback",
|
|
6601
6961
|
"aria-label": label.value
|
|
@@ -6611,7 +6971,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
6611
6971
|
};
|
|
6612
6972
|
}
|
|
6613
6973
|
});
|
|
6614
|
-
const TaoAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
6974
|
+
const TaoAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-65ed2d7a"]]);
|
|
6615
6975
|
const _hoisted_1$6 = ["aria-label"];
|
|
6616
6976
|
const _hoisted_2$5 = { class: "tao-breadcrumb__list" };
|
|
6617
6977
|
const _hoisted_3$4 = {
|
|
@@ -6648,7 +7008,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
6648
7008
|
class: "tao-breadcrumb__item"
|
|
6649
7009
|
}, [
|
|
6650
7010
|
index > 0 ? (openBlock(), createElementBlock("span", _hoisted_3$4, "/")) : createCommentVNode("", true),
|
|
6651
|
-
index === __props.items.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(item.label), 1)) : item.to ? (openBlock(), createBlock(_sfc_main$
|
|
7011
|
+
index === __props.items.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(item.label), 1)) : item.to ? (openBlock(), createBlock(_sfc_main$q, {
|
|
6652
7012
|
key: 2,
|
|
6653
7013
|
class: "tao-breadcrumb__link",
|
|
6654
7014
|
to: item.to
|
|
@@ -6820,7 +7180,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
6820
7180
|
return 0;
|
|
6821
7181
|
}
|
|
6822
7182
|
const left = ((_a = track.value) == null ? void 0 : _a.scrollLeft) ?? 0;
|
|
6823
|
-
|
|
7183
|
+
const last = Math.max(total - step.value, 0);
|
|
7184
|
+
return Math.min(Math.max(Math.round(left / (width + gap)), 0), last);
|
|
6824
7185
|
}
|
|
6825
7186
|
function setIndex(next) {
|
|
6826
7187
|
if (next === index.value) {
|
|
@@ -6871,13 +7232,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
6871
7232
|
autoplayTimer = 0;
|
|
6872
7233
|
}
|
|
6873
7234
|
function canAutoplay() {
|
|
6874
|
-
return props.autoplay > 0 && count.value > step.value && !hoverPaused.value && !focusPaused.value && !dragging.value && typeof document !== "undefined" && !document.hidden && !prefersReducedMotion();
|
|
7235
|
+
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);
|
|
6875
7236
|
}
|
|
6876
7237
|
function tickAutoplay() {
|
|
6877
7238
|
if (!canAutoplay()) {
|
|
6878
|
-
return;
|
|
6879
|
-
}
|
|
6880
|
-
if (!props.loop && index.value >= lastIndex.value) {
|
|
6881
7239
|
stopAutoplay();
|
|
6882
7240
|
return;
|
|
6883
7241
|
}
|
|
@@ -6917,7 +7275,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
6917
7275
|
}
|
|
6918
7276
|
cancelAnimationFrame(scrollFrame);
|
|
6919
7277
|
scrollFrame = requestAnimationFrame(() => {
|
|
6920
|
-
|
|
7278
|
+
const next = nearestIndex();
|
|
7279
|
+
const { width, gap } = metrics();
|
|
7280
|
+
const el = track.value;
|
|
7281
|
+
if (el && width > 0 && el.scrollLeft - next * (width + gap) > (width + gap) / 2) {
|
|
7282
|
+
goTo(next, true);
|
|
7283
|
+
return;
|
|
7284
|
+
}
|
|
7285
|
+
setIndex(next);
|
|
6921
7286
|
});
|
|
6922
7287
|
}
|
|
6923
7288
|
function releaseDragCapture() {
|
|
@@ -7022,7 +7387,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
7022
7387
|
}
|
|
7023
7388
|
);
|
|
7024
7389
|
watch(
|
|
7025
|
-
() => [props.autoplay, props.loop, count.value, dragging.value],
|
|
7390
|
+
() => [props.autoplay, props.loop, count.value, dragging.value, index.value],
|
|
7026
7391
|
() => syncAutoplay()
|
|
7027
7392
|
);
|
|
7028
7393
|
onMounted(() => {
|
|
@@ -7174,7 +7539,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
7174
7539
|
};
|
|
7175
7540
|
}
|
|
7176
7541
|
});
|
|
7177
|
-
const TaoCarousel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
7542
|
+
const TaoCarousel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-bc396e5d"]]);
|
|
7178
7543
|
const _hoisted_1$3 = ["aria-label"];
|
|
7179
7544
|
const _hoisted_2$2 = ["aria-label"];
|
|
7180
7545
|
const _hoisted_3$2 = {
|
|
@@ -7751,14 +8116,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7751
8116
|
__name: "TaoConfirmHost",
|
|
7752
8117
|
setup(__props) {
|
|
7753
8118
|
const panelRef = ref(null);
|
|
7754
|
-
let previousOverflow = "";
|
|
7755
8119
|
let previousFocus = null;
|
|
7756
|
-
let
|
|
8120
|
+
let scrollHeld = false;
|
|
7757
8121
|
onMounted(() => {
|
|
7758
8122
|
registerConfirmHost();
|
|
7759
8123
|
});
|
|
7760
8124
|
onBeforeUnmount(() => {
|
|
7761
|
-
|
|
8125
|
+
releaseScroll();
|
|
7762
8126
|
unregisterConfirmHost();
|
|
7763
8127
|
});
|
|
7764
8128
|
watch(
|
|
@@ -7769,12 +8133,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7769
8133
|
async (id) => {
|
|
7770
8134
|
var _a, _b;
|
|
7771
8135
|
if (!id) {
|
|
7772
|
-
|
|
8136
|
+
releaseScroll();
|
|
7773
8137
|
restoreFocus();
|
|
7774
8138
|
return;
|
|
7775
8139
|
}
|
|
8140
|
+
if (!isBrowser()) {
|
|
8141
|
+
return;
|
|
8142
|
+
}
|
|
7776
8143
|
previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
7777
|
-
|
|
8144
|
+
holdScroll();
|
|
7778
8145
|
await nextTick();
|
|
7779
8146
|
(_b = queryButton(((_a = currentConfirm.value) == null ? void 0 : _a.danger) ? "cancel" : "ok")) == null ? void 0 : _b.focus();
|
|
7780
8147
|
}
|
|
@@ -7783,21 +8150,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7783
8150
|
var _a;
|
|
7784
8151
|
return ((_a = panelRef.value) == null ? void 0 : _a.querySelector(`[data-tao-confirm-${which}]`)) ?? null;
|
|
7785
8152
|
}
|
|
7786
|
-
function
|
|
7787
|
-
if (
|
|
8153
|
+
function holdScroll() {
|
|
8154
|
+
if (scrollHeld || !isBrowser()) {
|
|
7788
8155
|
return;
|
|
7789
8156
|
}
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
scrollLocked = true;
|
|
8157
|
+
lockBodyScroll();
|
|
8158
|
+
scrollHeld = true;
|
|
7793
8159
|
}
|
|
7794
|
-
function
|
|
7795
|
-
if (!
|
|
8160
|
+
function releaseScroll() {
|
|
8161
|
+
if (!scrollHeld) {
|
|
7796
8162
|
return;
|
|
7797
8163
|
}
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
scrollLocked = false;
|
|
8164
|
+
unlockBodyScroll();
|
|
8165
|
+
scrollHeld = false;
|
|
7801
8166
|
}
|
|
7802
8167
|
function restoreFocus() {
|
|
7803
8168
|
var _a;
|
|
@@ -7811,26 +8176,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7811
8176
|
answer(false);
|
|
7812
8177
|
}
|
|
7813
8178
|
function onKeydown(event) {
|
|
7814
|
-
var _a, _b;
|
|
7815
8179
|
if (event.key === "Escape") {
|
|
7816
8180
|
event.preventDefault();
|
|
7817
8181
|
answer(false);
|
|
7818
8182
|
return;
|
|
7819
8183
|
}
|
|
7820
|
-
if (
|
|
7821
|
-
|
|
7822
|
-
}
|
|
7823
|
-
const first = queryButton(((_a = currentConfirm.value) == null ? void 0 : _a.danger) ? "cancel" : "ok");
|
|
7824
|
-
const last = queryButton(((_b = currentConfirm.value) == null ? void 0 : _b.danger) ? "ok" : "cancel");
|
|
7825
|
-
if (!first || !last) {
|
|
7826
|
-
return;
|
|
7827
|
-
}
|
|
7828
|
-
if (event.shiftKey && document.activeElement === first) {
|
|
7829
|
-
event.preventDefault();
|
|
7830
|
-
last.focus();
|
|
7831
|
-
} else if (!event.shiftKey && document.activeElement === last) {
|
|
7832
|
-
event.preventDefault();
|
|
7833
|
-
first.focus();
|
|
8184
|
+
if (panelRef.value) {
|
|
8185
|
+
trapTab(event, panelRef.value);
|
|
7834
8186
|
}
|
|
7835
8187
|
}
|
|
7836
8188
|
return (_ctx, _cache) => {
|
|
@@ -7933,7 +8285,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7933
8285
|
};
|
|
7934
8286
|
}
|
|
7935
8287
|
});
|
|
7936
|
-
const TaoConfirmHost = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
8288
|
+
const TaoConfirmHost = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d54ae27e"]]);
|
|
7937
8289
|
const TYPE_TIMEOUT = {
|
|
7938
8290
|
success: 3e3,
|
|
7939
8291
|
error: 5e3,
|
|
@@ -8325,7 +8677,7 @@ const components = [
|
|
|
8325
8677
|
TaoSpoilerGroup,
|
|
8326
8678
|
TaoCopy,
|
|
8327
8679
|
TaoContainer,
|
|
8328
|
-
_sfc_main$
|
|
8680
|
+
_sfc_main$I,
|
|
8329
8681
|
TaoSpace,
|
|
8330
8682
|
TaoSplit,
|
|
8331
8683
|
TaoIcon,
|
|
@@ -8343,7 +8695,7 @@ const components = [
|
|
|
8343
8695
|
TaoFileDrop,
|
|
8344
8696
|
TaoDropdownMenu,
|
|
8345
8697
|
TaoPinCode,
|
|
8346
|
-
_sfc_main$
|
|
8698
|
+
_sfc_main$q,
|
|
8347
8699
|
TaoFormField,
|
|
8348
8700
|
TaoSelect,
|
|
8349
8701
|
TaoCombobox,
|
|
@@ -8358,6 +8710,8 @@ const components = [
|
|
|
8358
8710
|
TaoTable,
|
|
8359
8711
|
TaoPagination,
|
|
8360
8712
|
TaoEmpty,
|
|
8713
|
+
TaoList,
|
|
8714
|
+
TaoListItem,
|
|
8361
8715
|
TaoSkeleton,
|
|
8362
8716
|
TaoDrawer,
|
|
8363
8717
|
TaoAvatar,
|
|
@@ -8398,14 +8752,16 @@ export {
|
|
|
8398
8752
|
TaoEmpty,
|
|
8399
8753
|
TaoFieldset,
|
|
8400
8754
|
TaoFileDrop,
|
|
8401
|
-
_sfc_main$
|
|
8755
|
+
_sfc_main$I as TaoFlex,
|
|
8402
8756
|
TaoFormField,
|
|
8403
8757
|
TaoIcon,
|
|
8404
8758
|
TaoImage,
|
|
8405
8759
|
TaoInput,
|
|
8406
8760
|
TaoInputGroup,
|
|
8407
8761
|
TaoInputNumber,
|
|
8408
|
-
_sfc_main$
|
|
8762
|
+
_sfc_main$q as TaoLink,
|
|
8763
|
+
TaoList,
|
|
8764
|
+
TaoListItem,
|
|
8409
8765
|
TaoLoader,
|
|
8410
8766
|
TaoModal,
|
|
8411
8767
|
TaoPagination,
|