@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.cjs
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue")) : typeof define === "function" && define.amd ? define(["exports", "vue"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.TaoUI = {}, global.Vue));
|
|
3
3
|
})(this, function(exports2, vue) {
|
|
4
4
|
"use strict";
|
|
5
|
-
const _hoisted_1$
|
|
6
|
-
const _hoisted_2$
|
|
5
|
+
const _hoisted_1$P = ["type", "disabled"];
|
|
6
|
+
const _hoisted_2$I = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "tao-button__loader"
|
|
9
9
|
};
|
|
10
|
-
const _hoisted_3$
|
|
10
|
+
const _hoisted_3$B = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "tao-button__icon"
|
|
13
13
|
};
|
|
14
|
-
const _hoisted_4$
|
|
15
|
-
const _sfc_main$
|
|
14
|
+
const _hoisted_4$v = { class: "tao-button__content" };
|
|
15
|
+
const _sfc_main$X = /* @__PURE__ */ vue.defineComponent({
|
|
16
16
|
...{ name: "TaoButton" },
|
|
17
17
|
__name: "TaoButton",
|
|
18
18
|
props: {
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
disabled: __props.disabled || __props.loading,
|
|
52
52
|
onClick: handleClick
|
|
53
53
|
}, [
|
|
54
|
-
__props.loading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$
|
|
55
|
-
__props.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
56
|
-
vue.createElementVNode("span", _hoisted_4$
|
|
54
|
+
__props.loading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$I)) : vue.createCommentVNode("", true),
|
|
55
|
+
__props.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$B, vue.toDisplayString(__props.icon), 1)) : vue.createCommentVNode("", true),
|
|
56
|
+
vue.createElementVNode("span", _hoisted_4$v, [
|
|
57
57
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
58
58
|
])
|
|
59
|
-
], 10, _hoisted_1$
|
|
59
|
+
], 10, _hoisted_1$P);
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
});
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
}
|
|
68
68
|
return target;
|
|
69
69
|
};
|
|
70
|
-
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
71
|
-
const _sfc_main$
|
|
70
|
+
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["__scopeId", "data-v-c3034f66"]]);
|
|
71
|
+
const _sfc_main$W = /* @__PURE__ */ vue.defineComponent({
|
|
72
72
|
...{ name: "TaoBlock" },
|
|
73
73
|
__name: "TaoBlock",
|
|
74
74
|
props: {
|
|
@@ -100,24 +100,24 @@
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
-
const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
103
|
+
const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["__scopeId", "data-v-feb87e36"]]);
|
|
104
104
|
const formFieldKey = Symbol("taoFormField");
|
|
105
|
-
const _hoisted_1$
|
|
106
|
-
const _hoisted_2$
|
|
107
|
-
const _hoisted_3$
|
|
105
|
+
const _hoisted_1$O = { class: "tao-input-wrapper" };
|
|
106
|
+
const _hoisted_2$H = ["for"];
|
|
107
|
+
const _hoisted_3$A = {
|
|
108
108
|
key: 0,
|
|
109
109
|
class: "tao-input__affix tao-input__affix--prefix"
|
|
110
110
|
};
|
|
111
|
-
const _hoisted_4$
|
|
111
|
+
const _hoisted_4$u = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
|
|
112
112
|
const _hoisted_5$m = {
|
|
113
113
|
key: 1,
|
|
114
114
|
class: "tao-input__affix tao-input__affix--suffix"
|
|
115
115
|
};
|
|
116
|
-
const _hoisted_6$
|
|
116
|
+
const _hoisted_6$h = {
|
|
117
117
|
key: 1,
|
|
118
118
|
class: "tao-input__error"
|
|
119
119
|
};
|
|
120
|
-
const _sfc_main$
|
|
120
|
+
const _sfc_main$V = /* @__PURE__ */ vue.defineComponent({
|
|
121
121
|
...{ name: "TaoInput" },
|
|
122
122
|
__name: "TaoInput",
|
|
123
123
|
props: {
|
|
@@ -153,12 +153,12 @@
|
|
|
153
153
|
emit("focus", event);
|
|
154
154
|
}
|
|
155
155
|
return (_ctx, _cache) => {
|
|
156
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
156
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$O, [
|
|
157
157
|
__props.label && !vue.unref(field) ? (vue.openBlock(), vue.createElementBlock("label", {
|
|
158
158
|
key: 0,
|
|
159
159
|
class: "tao-input__label",
|
|
160
160
|
for: controlId.value
|
|
161
|
-
}, vue.toDisplayString(__props.label), 9, _hoisted_2$
|
|
161
|
+
}, vue.toDisplayString(__props.label), 9, _hoisted_2$H)) : vue.createCommentVNode("", true),
|
|
162
162
|
vue.createElementVNode("div", {
|
|
163
163
|
class: vue.normalizeClass(["tao-input-shell", {
|
|
164
164
|
"tao-input-shell--focused": focused.value,
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
"tao-input-shell--suffix": _ctx.$slots.suffix
|
|
169
169
|
}])
|
|
170
170
|
}, [
|
|
171
|
-
_ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
171
|
+
_ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$A, [
|
|
172
172
|
vue.renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
173
173
|
])) : vue.createCommentVNode("", true),
|
|
174
174
|
vue.createElementVNode("input", {
|
|
@@ -183,27 +183,27 @@
|
|
|
183
183
|
onInput: handleInput,
|
|
184
184
|
onBlur: handleBlur,
|
|
185
185
|
onFocus: handleFocus
|
|
186
|
-
}, null, 42, _hoisted_4$
|
|
186
|
+
}, null, 42, _hoisted_4$u),
|
|
187
187
|
_ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$m, [
|
|
188
188
|
vue.renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
|
|
189
189
|
])) : vue.createCommentVNode("", true)
|
|
190
190
|
], 2),
|
|
191
|
-
__props.error && __props.errorMessage ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$
|
|
191
|
+
__props.error && __props.errorMessage ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$h, vue.toDisplayString(__props.errorMessage), 1)) : vue.createCommentVNode("", true)
|
|
192
192
|
]);
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
|
-
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
197
|
-
const _hoisted_1$
|
|
196
|
+
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-b522e041"]]);
|
|
197
|
+
const _hoisted_1$N = {
|
|
198
198
|
key: 0,
|
|
199
199
|
class: "tao-input-group__addon tao-input-group__addon--before"
|
|
200
200
|
};
|
|
201
|
-
const _hoisted_2$
|
|
202
|
-
const _hoisted_3$
|
|
201
|
+
const _hoisted_2$G = { class: "tao-input-group__field" };
|
|
202
|
+
const _hoisted_3$z = {
|
|
203
203
|
key: 1,
|
|
204
204
|
class: "tao-input-group__addon tao-input-group__addon--after"
|
|
205
205
|
};
|
|
206
|
-
const _sfc_main$
|
|
206
|
+
const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
|
|
207
207
|
...{ name: "TaoInputGroup" },
|
|
208
208
|
__name: "TaoInputGroup",
|
|
209
209
|
setup(__props) {
|
|
@@ -225,30 +225,30 @@
|
|
|
225
225
|
onFocusin: onFocusIn,
|
|
226
226
|
onFocusout: onFocusOut
|
|
227
227
|
}, [
|
|
228
|
-
_ctx.$slots.before ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
228
|
+
_ctx.$slots.before ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$N, [
|
|
229
229
|
vue.renderSlot(_ctx.$slots, "before", {}, void 0, true)
|
|
230
230
|
])) : vue.createCommentVNode("", true),
|
|
231
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
231
|
+
vue.createElementVNode("div", _hoisted_2$G, [
|
|
232
232
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
233
233
|
]),
|
|
234
|
-
_ctx.$slots.after ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
234
|
+
_ctx.$slots.after ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$z, [
|
|
235
235
|
vue.renderSlot(_ctx.$slots, "after", {}, void 0, true)
|
|
236
236
|
])) : vue.createCommentVNode("", true)
|
|
237
237
|
], 34);
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
240
|
});
|
|
241
|
-
const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
242
|
-
const _hoisted_1$
|
|
243
|
-
const _hoisted_2$
|
|
241
|
+
const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-f06bb3b1"]]);
|
|
242
|
+
const _hoisted_1$M = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
243
|
+
const _hoisted_2$F = {
|
|
244
244
|
key: 0,
|
|
245
245
|
class: "tao-input-number__steppers"
|
|
246
246
|
};
|
|
247
|
-
const _hoisted_3$
|
|
248
|
-
const _hoisted_4$
|
|
247
|
+
const _hoisted_3$y = ["aria-label", "disabled"];
|
|
248
|
+
const _hoisted_4$t = { "aria-hidden": "true" };
|
|
249
249
|
const _hoisted_5$l = ["aria-label", "disabled"];
|
|
250
|
-
const _hoisted_6$
|
|
251
|
-
const _sfc_main$
|
|
250
|
+
const _hoisted_6$g = { "aria-hidden": "true" };
|
|
251
|
+
const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
|
|
252
252
|
...{ name: "TaoInputNumber" },
|
|
253
253
|
__name: "TaoInputNumber",
|
|
254
254
|
props: {
|
|
@@ -399,8 +399,8 @@
|
|
|
399
399
|
onFocus,
|
|
400
400
|
onBlur,
|
|
401
401
|
onKeydown
|
|
402
|
-
}, null, 40, _hoisted_1$
|
|
403
|
-
__props.controls ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
402
|
+
}, null, 40, _hoisted_1$M),
|
|
403
|
+
__props.controls ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$F, [
|
|
404
404
|
vue.createElementVNode("button", {
|
|
405
405
|
type: "button",
|
|
406
406
|
class: "tao-input-number__step",
|
|
@@ -409,12 +409,12 @@
|
|
|
409
409
|
disabled: __props.disabled || atMax.value,
|
|
410
410
|
onClick: _cache[0] || (_cache[0] = ($event) => bump(1))
|
|
411
411
|
}, [
|
|
412
|
-
vue.createElementVNode("span", _hoisted_4$
|
|
412
|
+
vue.createElementVNode("span", _hoisted_4$t, [
|
|
413
413
|
vue.renderSlot(_ctx.$slots, "increment-icon", {}, () => [
|
|
414
414
|
_cache[2] || (_cache[2] = vue.createTextVNode("+", -1))
|
|
415
415
|
], true)
|
|
416
416
|
])
|
|
417
|
-
], 8, _hoisted_3$
|
|
417
|
+
], 8, _hoisted_3$y),
|
|
418
418
|
vue.createElementVNode("button", {
|
|
419
419
|
type: "button",
|
|
420
420
|
class: "tao-input-number__step",
|
|
@@ -423,7 +423,7 @@
|
|
|
423
423
|
disabled: __props.disabled || atMin.value,
|
|
424
424
|
onClick: _cache[1] || (_cache[1] = ($event) => bump(-1))
|
|
425
425
|
}, [
|
|
426
|
-
vue.createElementVNode("span", _hoisted_6$
|
|
426
|
+
vue.createElementVNode("span", _hoisted_6$g, [
|
|
427
427
|
vue.renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
|
|
428
428
|
_cache[3] || (_cache[3] = vue.createTextVNode("−", -1))
|
|
429
429
|
], true)
|
|
@@ -434,13 +434,13 @@
|
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
436
|
});
|
|
437
|
-
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
438
|
-
const _hoisted_1$
|
|
439
|
-
const _hoisted_2$
|
|
440
|
-
const _hoisted_3$
|
|
441
|
-
const _hoisted_4$
|
|
437
|
+
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-331dd958"]]);
|
|
438
|
+
const _hoisted_1$L = ["aria-label", "disabled"];
|
|
439
|
+
const _hoisted_2$E = { "aria-hidden": "true" };
|
|
440
|
+
const _hoisted_3$x = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
441
|
+
const _hoisted_4$s = ["aria-label", "disabled"];
|
|
442
442
|
const _hoisted_5$k = { "aria-hidden": "true" };
|
|
443
|
-
const _sfc_main$
|
|
443
|
+
const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
444
444
|
...{ name: "TaoQuantity" },
|
|
445
445
|
__name: "TaoQuantity",
|
|
446
446
|
props: {
|
|
@@ -577,12 +577,12 @@
|
|
|
577
577
|
disabled: minusDisabled.value,
|
|
578
578
|
onClick: onDec
|
|
579
579
|
}, [
|
|
580
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
580
|
+
vue.createElementVNode("span", _hoisted_2$E, [
|
|
581
581
|
vue.renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
|
|
582
582
|
_cache[0] || (_cache[0] = vue.createTextVNode("−", -1))
|
|
583
583
|
], true)
|
|
584
584
|
])
|
|
585
|
-
], 8, _hoisted_1$
|
|
585
|
+
], 8, _hoisted_1$L),
|
|
586
586
|
vue.createElementVNode("input", {
|
|
587
587
|
id: controlId.value,
|
|
588
588
|
class: "tao-quantity__input",
|
|
@@ -602,7 +602,7 @@
|
|
|
602
602
|
onFocus,
|
|
603
603
|
onBlur,
|
|
604
604
|
onKeydown
|
|
605
|
-
}, null, 40, _hoisted_3$
|
|
605
|
+
}, null, 40, _hoisted_3$x),
|
|
606
606
|
vue.createElementVNode("button", {
|
|
607
607
|
type: "button",
|
|
608
608
|
class: "tao-quantity__btn tao-quantity__btn--inc",
|
|
@@ -615,22 +615,22 @@
|
|
|
615
615
|
_cache[1] || (_cache[1] = vue.createTextVNode("+", -1))
|
|
616
616
|
], true)
|
|
617
617
|
])
|
|
618
|
-
], 8, _hoisted_4$
|
|
618
|
+
], 8, _hoisted_4$s)
|
|
619
619
|
], 2);
|
|
620
620
|
};
|
|
621
621
|
}
|
|
622
622
|
});
|
|
623
|
-
const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
624
|
-
const _hoisted_1$
|
|
623
|
+
const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-c9c7c8b4"]]);
|
|
624
|
+
const _hoisted_1$K = {
|
|
625
625
|
key: 0,
|
|
626
626
|
class: "tao-card__cover"
|
|
627
627
|
};
|
|
628
|
-
const _hoisted_2$
|
|
628
|
+
const _hoisted_2$D = {
|
|
629
629
|
key: 0,
|
|
630
630
|
class: "tao-card__header-title"
|
|
631
631
|
};
|
|
632
|
-
const _hoisted_3$
|
|
633
|
-
const _hoisted_4$
|
|
632
|
+
const _hoisted_3$w = { key: 0 };
|
|
633
|
+
const _hoisted_4$r = {
|
|
634
634
|
key: 2,
|
|
635
635
|
class: "tao-card__title-block"
|
|
636
636
|
};
|
|
@@ -638,7 +638,7 @@
|
|
|
638
638
|
key: 0,
|
|
639
639
|
class: "tao-card__title"
|
|
640
640
|
};
|
|
641
|
-
const _hoisted_6$
|
|
641
|
+
const _hoisted_6$f = {
|
|
642
642
|
key: 1,
|
|
643
643
|
class: "tao-card__sub"
|
|
644
644
|
};
|
|
@@ -650,7 +650,7 @@
|
|
|
650
650
|
key: 4,
|
|
651
651
|
class: "tao-card__footer"
|
|
652
652
|
};
|
|
653
|
-
const _sfc_main$
|
|
653
|
+
const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
654
654
|
...{ name: "TaoCard" },
|
|
655
655
|
__name: "TaoCard",
|
|
656
656
|
props: {
|
|
@@ -682,14 +682,14 @@
|
|
|
682
682
|
}]),
|
|
683
683
|
style: vue.normalizeStyle(radiusStyle.value)
|
|
684
684
|
}, [
|
|
685
|
-
_ctx.$slots.cover ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
685
|
+
_ctx.$slots.cover ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$K, [
|
|
686
686
|
vue.renderSlot(_ctx.$slots, "cover", {}, void 0, true)
|
|
687
687
|
])) : vue.createCommentVNode("", true),
|
|
688
688
|
vue.createElementVNode("div", {
|
|
689
689
|
class: "tao-card__content",
|
|
690
690
|
style: vue.normalizeStyle(paddingStyle.value)
|
|
691
691
|
}, [
|
|
692
|
-
_ctx.$slots.headerTitle ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_2$
|
|
692
|
+
_ctx.$slots.headerTitle ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_2$D, [
|
|
693
693
|
vue.renderSlot(_ctx.$slots, "headerTitle", {}, void 0, true)
|
|
694
694
|
])) : vue.createCommentVNode("", true),
|
|
695
695
|
_ctx.$slots.header || _ctx.$slots.headerSecondary ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -699,15 +699,15 @@
|
|
|
699
699
|
vue.createElementVNode("span", null, [
|
|
700
700
|
vue.renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
701
701
|
]),
|
|
702
|
-
_ctx.$slots.headerSecondary ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
702
|
+
_ctx.$slots.headerSecondary ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$w, [
|
|
703
703
|
vue.renderSlot(_ctx.$slots, "headerSecondary", {}, void 0, true)
|
|
704
704
|
])) : vue.createCommentVNode("", true)
|
|
705
705
|
], 2)) : vue.createCommentVNode("", true),
|
|
706
|
-
_ctx.$slots.title || _ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
706
|
+
_ctx.$slots.title || _ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$r, [
|
|
707
707
|
_ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("h2", _hoisted_5$j, [
|
|
708
708
|
vue.renderSlot(_ctx.$slots, "title", {}, void 0, true)
|
|
709
709
|
])) : vue.createCommentVNode("", true),
|
|
710
|
-
_ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$
|
|
710
|
+
_ctx.$slots.sub ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$f, [
|
|
711
711
|
vue.renderSlot(_ctx.$slots, "sub", {}, void 0, true)
|
|
712
712
|
])) : vue.createCommentVNode("", true)
|
|
713
713
|
])) : vue.createCommentVNode("", true),
|
|
@@ -722,7 +722,7 @@
|
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
724
|
});
|
|
725
|
-
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
725
|
+
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-2ff3d055"]]);
|
|
726
726
|
const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
727
727
|
function getFocusable(root) {
|
|
728
728
|
return [...root.querySelectorAll(FOCUSABLE)].filter(
|
|
@@ -751,21 +751,46 @@
|
|
|
751
751
|
first.focus();
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
|
-
|
|
755
|
-
|
|
754
|
+
let locks = 0;
|
|
755
|
+
let previousOverflow = "";
|
|
756
|
+
function isBrowser() {
|
|
757
|
+
return typeof document !== "undefined";
|
|
758
|
+
}
|
|
759
|
+
function lockBodyScroll() {
|
|
760
|
+
if (!isBrowser()) {
|
|
761
|
+
return;
|
|
762
|
+
}
|
|
763
|
+
if (locks === 0) {
|
|
764
|
+
previousOverflow = document.body.style.overflow;
|
|
765
|
+
document.body.style.overflow = "hidden";
|
|
766
|
+
}
|
|
767
|
+
locks += 1;
|
|
768
|
+
}
|
|
769
|
+
function unlockBodyScroll() {
|
|
770
|
+
if (!isBrowser() || locks === 0) {
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
locks -= 1;
|
|
774
|
+
if (locks === 0) {
|
|
775
|
+
document.body.style.overflow = previousOverflow;
|
|
776
|
+
previousOverflow = "";
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
const _hoisted_1$J = ["aria-labelledby"];
|
|
780
|
+
const _hoisted_2$C = {
|
|
756
781
|
key: 0,
|
|
757
782
|
class: "tao-modal__header"
|
|
758
783
|
};
|
|
759
|
-
const _hoisted_3$
|
|
760
|
-
const _hoisted_4$
|
|
784
|
+
const _hoisted_3$v = ["id"];
|
|
785
|
+
const _hoisted_4$q = { key: 1 };
|
|
761
786
|
const _hoisted_5$i = ["aria-label"];
|
|
762
|
-
const _hoisted_6$
|
|
787
|
+
const _hoisted_6$e = { "aria-hidden": "true" };
|
|
763
788
|
const _hoisted_7$b = { class: "tao-modal__content" };
|
|
764
789
|
const _hoisted_8$a = {
|
|
765
790
|
key: 1,
|
|
766
791
|
class: "tao-modal__footer"
|
|
767
792
|
};
|
|
768
|
-
const _sfc_main$
|
|
793
|
+
const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
|
|
769
794
|
...{ name: "TaoModal" },
|
|
770
795
|
__name: "TaoModal",
|
|
771
796
|
props: {
|
|
@@ -780,9 +805,8 @@
|
|
|
780
805
|
const emit = __emit;
|
|
781
806
|
const panelRef = vue.ref(null);
|
|
782
807
|
const titleId = vue.useId();
|
|
783
|
-
let previousOverflow = "";
|
|
784
808
|
let previousFocus = null;
|
|
785
|
-
let
|
|
809
|
+
let scrollHeld = false;
|
|
786
810
|
function close() {
|
|
787
811
|
if (!props.closable) {
|
|
788
812
|
return;
|
|
@@ -790,21 +814,19 @@
|
|
|
790
814
|
emit("update:modelValue", false);
|
|
791
815
|
emit("close");
|
|
792
816
|
}
|
|
793
|
-
function
|
|
794
|
-
if (
|
|
817
|
+
function holdScroll() {
|
|
818
|
+
if (scrollHeld || !isBrowser()) {
|
|
795
819
|
return;
|
|
796
820
|
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
scrollLocked = true;
|
|
821
|
+
lockBodyScroll();
|
|
822
|
+
scrollHeld = true;
|
|
800
823
|
}
|
|
801
|
-
function
|
|
802
|
-
if (!
|
|
824
|
+
function releaseScroll() {
|
|
825
|
+
if (!scrollHeld) {
|
|
803
826
|
return;
|
|
804
827
|
}
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
scrollLocked = false;
|
|
828
|
+
unlockBodyScroll();
|
|
829
|
+
scrollHeld = false;
|
|
808
830
|
}
|
|
809
831
|
function restoreFocus() {
|
|
810
832
|
var _a;
|
|
@@ -822,6 +844,9 @@
|
|
|
822
844
|
}
|
|
823
845
|
function onKeydown(event) {
|
|
824
846
|
if (event.key === "Escape") {
|
|
847
|
+
if (!props.closable) {
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
825
850
|
event.preventDefault();
|
|
826
851
|
close();
|
|
827
852
|
return;
|
|
@@ -833,19 +858,23 @@
|
|
|
833
858
|
vue.watch(
|
|
834
859
|
() => props.modelValue,
|
|
835
860
|
(isOpen) => {
|
|
861
|
+
if (!isBrowser()) {
|
|
862
|
+
return;
|
|
863
|
+
}
|
|
836
864
|
if (isOpen) {
|
|
837
865
|
previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
838
|
-
|
|
866
|
+
holdScroll();
|
|
839
867
|
void focusPanel();
|
|
840
868
|
return;
|
|
841
869
|
}
|
|
842
|
-
|
|
870
|
+
releaseScroll();
|
|
843
871
|
restoreFocus();
|
|
844
872
|
},
|
|
845
873
|
{ immediate: true }
|
|
846
874
|
);
|
|
847
875
|
vue.onBeforeUnmount(() => {
|
|
848
|
-
|
|
876
|
+
releaseScroll();
|
|
877
|
+
restoreFocus();
|
|
849
878
|
});
|
|
850
879
|
return (_ctx, _cache) => {
|
|
851
880
|
return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
@@ -866,13 +895,13 @@
|
|
|
866
895
|
"aria-labelledby": __props.title ? vue.unref(titleId) : void 0,
|
|
867
896
|
tabindex: "-1"
|
|
868
897
|
}, [
|
|
869
|
-
__props.title || _ctx.$slots.header || __props.closable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
898
|
+
__props.title || _ctx.$slots.header || __props.closable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$C, [
|
|
870
899
|
vue.renderSlot(_ctx.$slots, "header", {}, () => [
|
|
871
900
|
__props.title ? (vue.openBlock(), vue.createElementBlock("h2", {
|
|
872
901
|
key: 0,
|
|
873
902
|
id: vue.unref(titleId),
|
|
874
903
|
class: "tao-modal__title"
|
|
875
|
-
}, vue.toDisplayString(__props.title), 9, _hoisted_3$
|
|
904
|
+
}, vue.toDisplayString(__props.title), 9, _hoisted_3$v)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$q))
|
|
876
905
|
], true),
|
|
877
906
|
__props.closable ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
878
907
|
key: 0,
|
|
@@ -881,7 +910,7 @@
|
|
|
881
910
|
"aria-label": __props.closeLabel,
|
|
882
911
|
onClick: close
|
|
883
912
|
}, [
|
|
884
|
-
vue.createElementVNode("span", _hoisted_6$
|
|
913
|
+
vue.createElementVNode("span", _hoisted_6$e, [
|
|
885
914
|
vue.renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
886
915
|
_cache[0] || (_cache[0] = vue.createTextVNode("×", -1))
|
|
887
916
|
], true)
|
|
@@ -894,7 +923,7 @@
|
|
|
894
923
|
_ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$a, [
|
|
895
924
|
vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
896
925
|
])) : vue.createCommentVNode("", true)
|
|
897
|
-
], 8, _hoisted_1$
|
|
926
|
+
], 8, _hoisted_1$J)
|
|
898
927
|
], 32)) : vue.createCommentVNode("", true)
|
|
899
928
|
]),
|
|
900
929
|
_: 3
|
|
@@ -903,11 +932,11 @@
|
|
|
903
932
|
};
|
|
904
933
|
}
|
|
905
934
|
});
|
|
906
|
-
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
907
|
-
const _hoisted_1$
|
|
908
|
-
const _hoisted_2$
|
|
909
|
-
const _hoisted_3$
|
|
910
|
-
const _sfc_main$
|
|
935
|
+
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-102cfd66"]]);
|
|
936
|
+
const _hoisted_1$I = { class: "tao-tabs" };
|
|
937
|
+
const _hoisted_2$B = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
|
|
938
|
+
const _hoisted_3$u = ["id", "aria-labelledby"];
|
|
939
|
+
const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
|
|
911
940
|
...{ name: "TaoTabs" },
|
|
912
941
|
__name: "TaoTabs",
|
|
913
942
|
props: {
|
|
@@ -971,7 +1000,7 @@
|
|
|
971
1000
|
}
|
|
972
1001
|
}
|
|
973
1002
|
return (_ctx, _cache) => {
|
|
974
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1003
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$I, [
|
|
975
1004
|
vue.createElementVNode("div", {
|
|
976
1005
|
class: "tao-tabs__list",
|
|
977
1006
|
role: "tablist",
|
|
@@ -996,7 +1025,7 @@
|
|
|
996
1025
|
}, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
997
1026
|
vue.createTextVNode(vue.toDisplayString(tab.label), 1)
|
|
998
1027
|
], 64))
|
|
999
|
-
], 8, _hoisted_2$
|
|
1028
|
+
], 8, _hoisted_2$B);
|
|
1000
1029
|
}), 128))
|
|
1001
1030
|
], 32),
|
|
1002
1031
|
vue.createElementVNode("div", {
|
|
@@ -1006,12 +1035,12 @@
|
|
|
1006
1035
|
"aria-labelledby": tabId(__props.modelValue)
|
|
1007
1036
|
}, [
|
|
1008
1037
|
vue.renderSlot(_ctx.$slots, "default", { activeTab: __props.modelValue }, void 0, true)
|
|
1009
|
-
], 8, _hoisted_3$
|
|
1038
|
+
], 8, _hoisted_3$u)
|
|
1010
1039
|
]);
|
|
1011
1040
|
};
|
|
1012
1041
|
}
|
|
1013
1042
|
});
|
|
1014
|
-
const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1043
|
+
const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["__scopeId", "data-v-bf16735e"]]);
|
|
1015
1044
|
function listenFocusLoss(onLoss) {
|
|
1016
1045
|
function onVisibilityChange() {
|
|
1017
1046
|
if (document.hidden) {
|
|
@@ -1027,7 +1056,7 @@
|
|
|
1027
1056
|
window.removeEventListener("pagehide", onLoss);
|
|
1028
1057
|
};
|
|
1029
1058
|
}
|
|
1030
|
-
const _sfc_main$
|
|
1059
|
+
const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
|
|
1031
1060
|
...{ name: "TaoTooltip" },
|
|
1032
1061
|
__name: "TaoTooltip",
|
|
1033
1062
|
props: {
|
|
@@ -1189,9 +1218,9 @@
|
|
|
1189
1218
|
};
|
|
1190
1219
|
}
|
|
1191
1220
|
});
|
|
1192
|
-
const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1193
|
-
const _hoisted_1$
|
|
1194
|
-
const _sfc_main$
|
|
1221
|
+
const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-926dfa73"]]);
|
|
1222
|
+
const _hoisted_1$H = { class: "tao-popover" };
|
|
1223
|
+
const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
1195
1224
|
...{ name: "TaoPopover" },
|
|
1196
1225
|
__name: "TaoPopover",
|
|
1197
1226
|
props: {
|
|
@@ -1225,15 +1254,26 @@
|
|
|
1225
1254
|
function close() {
|
|
1226
1255
|
void applyOpen(false);
|
|
1227
1256
|
}
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
setOpen(next);
|
|
1231
|
-
if (!next) {
|
|
1257
|
+
function bindDismiss() {
|
|
1258
|
+
if (typeof document === "undefined") {
|
|
1232
1259
|
return;
|
|
1233
1260
|
}
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
(
|
|
1261
|
+
document.addEventListener("pointerdown", onDocumentPointer);
|
|
1262
|
+
document.addEventListener("keydown", onDocumentKey);
|
|
1263
|
+
window.addEventListener("resize", onViewportChange);
|
|
1264
|
+
window.addEventListener("scroll", onViewportChange, true);
|
|
1265
|
+
}
|
|
1266
|
+
function unbindDismiss() {
|
|
1267
|
+
if (typeof document === "undefined") {
|
|
1268
|
+
return;
|
|
1269
|
+
}
|
|
1270
|
+
document.removeEventListener("pointerdown", onDocumentPointer);
|
|
1271
|
+
document.removeEventListener("keydown", onDocumentKey);
|
|
1272
|
+
window.removeEventListener("resize", onViewportChange);
|
|
1273
|
+
window.removeEventListener("scroll", onViewportChange, true);
|
|
1274
|
+
}
|
|
1275
|
+
function applyOpen(next) {
|
|
1276
|
+
setOpen(next);
|
|
1237
1277
|
}
|
|
1238
1278
|
function focusTrigger() {
|
|
1239
1279
|
var _a, _b;
|
|
@@ -1246,7 +1286,7 @@
|
|
|
1246
1286
|
function updatePosition() {
|
|
1247
1287
|
const trigger = triggerRef.value;
|
|
1248
1288
|
const panel = panelRef.value;
|
|
1249
|
-
if (!trigger || !panel) {
|
|
1289
|
+
if (typeof window === "undefined" || !trigger || !panel) {
|
|
1250
1290
|
return;
|
|
1251
1291
|
}
|
|
1252
1292
|
const rect = trigger.getBoundingClientRect();
|
|
@@ -1329,27 +1369,27 @@
|
|
|
1329
1369
|
updatePosition();
|
|
1330
1370
|
}
|
|
1331
1371
|
}
|
|
1332
|
-
vue.watch(
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1372
|
+
vue.watch(
|
|
1373
|
+
open,
|
|
1374
|
+
(isOpen) => {
|
|
1375
|
+
if (isOpen) {
|
|
1376
|
+
bindDismiss();
|
|
1377
|
+
void vue.nextTick(() => {
|
|
1378
|
+
var _a;
|
|
1379
|
+
updatePosition();
|
|
1380
|
+
(_a = panelRef.value) == null ? void 0 : _a.focus();
|
|
1381
|
+
});
|
|
1382
|
+
return;
|
|
1383
|
+
}
|
|
1384
|
+
unbindDismiss();
|
|
1385
|
+
},
|
|
1386
|
+
{ immediate: true }
|
|
1387
|
+
);
|
|
1345
1388
|
vue.onBeforeUnmount(() => {
|
|
1346
|
-
|
|
1347
|
-
document.removeEventListener("keydown", onDocumentKey);
|
|
1348
|
-
window.removeEventListener("resize", onViewportChange);
|
|
1349
|
-
window.removeEventListener("scroll", onViewportChange, true);
|
|
1389
|
+
unbindDismiss();
|
|
1350
1390
|
});
|
|
1351
1391
|
return (_ctx, _cache) => {
|
|
1352
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1392
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$H, [
|
|
1353
1393
|
vue.createElementVNode("div", {
|
|
1354
1394
|
ref_key: "triggerRef",
|
|
1355
1395
|
ref: triggerRef,
|
|
@@ -1378,17 +1418,17 @@
|
|
|
1378
1418
|
};
|
|
1379
1419
|
}
|
|
1380
1420
|
});
|
|
1381
|
-
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1421
|
+
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-afd791a7"]]);
|
|
1382
1422
|
const spoilerGroupKey = Symbol("taoSpoilerGroup");
|
|
1383
|
-
const _hoisted_1$
|
|
1384
|
-
const _hoisted_2$
|
|
1385
|
-
const _hoisted_3$
|
|
1423
|
+
const _hoisted_1$G = { class: "tao-spoiler" };
|
|
1424
|
+
const _hoisted_2$A = ["aria-expanded", "aria-controls"];
|
|
1425
|
+
const _hoisted_3$t = {
|
|
1386
1426
|
key: 0,
|
|
1387
1427
|
class: "tao-spoiler__title"
|
|
1388
1428
|
};
|
|
1389
|
-
const _hoisted_4$
|
|
1429
|
+
const _hoisted_4$p = ["id"];
|
|
1390
1430
|
const _hoisted_5$h = { class: "tao-spoiler__content-inner" };
|
|
1391
|
-
const _sfc_main$
|
|
1431
|
+
const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
1392
1432
|
...{ name: "TaoSpoiler" },
|
|
1393
1433
|
__name: "TaoSpoiler",
|
|
1394
1434
|
props: {
|
|
@@ -1443,7 +1483,7 @@
|
|
|
1443
1483
|
});
|
|
1444
1484
|
}
|
|
1445
1485
|
return (_ctx, _cache) => {
|
|
1446
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1486
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$G, [
|
|
1447
1487
|
vue.createElementVNode("button", {
|
|
1448
1488
|
type: "button",
|
|
1449
1489
|
class: "tao-spoiler__header",
|
|
@@ -1454,12 +1494,12 @@
|
|
|
1454
1494
|
vue.createElementVNode("span", {
|
|
1455
1495
|
class: vue.normalizeClass(["tao-spoiler__icon", { "tao-spoiler__icon--open": isOpen.value }])
|
|
1456
1496
|
}, "▶", 2),
|
|
1457
|
-
__props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
1497
|
+
__props.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$t, [
|
|
1458
1498
|
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
1459
1499
|
vue.createTextVNode(vue.toDisplayString(__props.title), 1)
|
|
1460
1500
|
], true)
|
|
1461
1501
|
])) : vue.createCommentVNode("", true)
|
|
1462
|
-
], 8, _hoisted_2$
|
|
1502
|
+
], 8, _hoisted_2$A),
|
|
1463
1503
|
vue.createVNode(vue.Transition, {
|
|
1464
1504
|
name: "tao-spoiler-slide",
|
|
1465
1505
|
onBeforeEnter,
|
|
@@ -1476,7 +1516,7 @@
|
|
|
1476
1516
|
vue.createElementVNode("div", _hoisted_5$h, [
|
|
1477
1517
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1478
1518
|
])
|
|
1479
|
-
], 8, _hoisted_4$
|
|
1519
|
+
], 8, _hoisted_4$p)) : vue.createCommentVNode("", true)
|
|
1480
1520
|
]),
|
|
1481
1521
|
_: 3
|
|
1482
1522
|
})
|
|
@@ -1484,20 +1524,25 @@
|
|
|
1484
1524
|
};
|
|
1485
1525
|
}
|
|
1486
1526
|
});
|
|
1487
|
-
const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1488
|
-
const _hoisted_1$
|
|
1489
|
-
const _sfc_main$
|
|
1527
|
+
const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["__scopeId", "data-v-ccb052cf"]]);
|
|
1528
|
+
const _hoisted_1$F = { class: "tao-spoiler-group" };
|
|
1529
|
+
const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
|
|
1490
1530
|
...{ name: "TaoSpoilerGroup" },
|
|
1491
1531
|
__name: "TaoSpoilerGroup",
|
|
1492
1532
|
props: {
|
|
1493
|
-
modelValue: {
|
|
1533
|
+
modelValue: {}
|
|
1494
1534
|
},
|
|
1495
1535
|
emits: ["update:modelValue", "change"],
|
|
1496
1536
|
setup(__props, { emit: __emit }) {
|
|
1497
1537
|
const props = __props;
|
|
1498
1538
|
const emit = __emit;
|
|
1499
|
-
const
|
|
1539
|
+
const isControlled = vue.computed(() => props.modelValue !== void 0);
|
|
1540
|
+
const internal = vue.ref(null);
|
|
1541
|
+
const model = vue.computed(() => isControlled.value ? props.modelValue : internal.value);
|
|
1500
1542
|
function setOpen(name) {
|
|
1543
|
+
if (!isControlled.value) {
|
|
1544
|
+
internal.value = name;
|
|
1545
|
+
}
|
|
1501
1546
|
emit("update:modelValue", name);
|
|
1502
1547
|
emit("change", name);
|
|
1503
1548
|
}
|
|
@@ -1506,15 +1551,15 @@
|
|
|
1506
1551
|
setOpen
|
|
1507
1552
|
});
|
|
1508
1553
|
return (_ctx, _cache) => {
|
|
1509
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1554
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$F, [
|
|
1510
1555
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1511
1556
|
]);
|
|
1512
1557
|
};
|
|
1513
1558
|
}
|
|
1514
1559
|
});
|
|
1515
|
-
const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1516
|
-
const _hoisted_1$
|
|
1517
|
-
const _sfc_main$
|
|
1560
|
+
const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-118970dd"]]);
|
|
1561
|
+
const _hoisted_1$E = ["aria-label"];
|
|
1562
|
+
const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
|
|
1518
1563
|
...{ name: "TaoCopy" },
|
|
1519
1564
|
__name: "TaoCopy",
|
|
1520
1565
|
props: {
|
|
@@ -1649,7 +1694,7 @@
|
|
|
1649
1694
|
"stroke-width": "2"
|
|
1650
1695
|
})
|
|
1651
1696
|
], -1)
|
|
1652
|
-
])], 10, _hoisted_1$
|
|
1697
|
+
])], 10, _hoisted_1$E)
|
|
1653
1698
|
], true),
|
|
1654
1699
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
1655
1700
|
copied.value && __props.tip && __props.successMessage ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -1665,8 +1710,8 @@
|
|
|
1665
1710
|
};
|
|
1666
1711
|
}
|
|
1667
1712
|
});
|
|
1668
|
-
const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1669
|
-
const _sfc_main$
|
|
1713
|
+
const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-38d3381d"]]);
|
|
1714
|
+
const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
|
|
1670
1715
|
...{ name: "TaoContainer" },
|
|
1671
1716
|
__name: "TaoContainer",
|
|
1672
1717
|
props: {
|
|
@@ -1683,8 +1728,8 @@
|
|
|
1683
1728
|
};
|
|
1684
1729
|
}
|
|
1685
1730
|
});
|
|
1686
|
-
const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1687
|
-
const _sfc_main$
|
|
1731
|
+
const TaoContainer = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-4c0deb90"]]);
|
|
1732
|
+
const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
1688
1733
|
...{ name: "TaoFlex" },
|
|
1689
1734
|
__name: "TaoFlex",
|
|
1690
1735
|
props: {
|
|
@@ -1715,7 +1760,7 @@
|
|
|
1715
1760
|
};
|
|
1716
1761
|
}
|
|
1717
1762
|
});
|
|
1718
|
-
const _sfc_main$
|
|
1763
|
+
const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
1719
1764
|
...{ name: "TaoSpace" },
|
|
1720
1765
|
__name: "TaoSpace",
|
|
1721
1766
|
props: {
|
|
@@ -1735,15 +1780,15 @@
|
|
|
1735
1780
|
};
|
|
1736
1781
|
}
|
|
1737
1782
|
});
|
|
1738
|
-
const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1739
|
-
const _hoisted_1$
|
|
1740
|
-
const _hoisted_2$
|
|
1741
|
-
const _hoisted_3$
|
|
1742
|
-
const _hoisted_4$
|
|
1783
|
+
const TaoSpace = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-698ca712"]]);
|
|
1784
|
+
const _hoisted_1$D = { class: "tao-split__pane tao-split__pane--start" };
|
|
1785
|
+
const _hoisted_2$z = ["aria-orientation", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-disabled", "tabindex"];
|
|
1786
|
+
const _hoisted_3$s = { class: "tao-split__pane tao-split__pane--end" };
|
|
1787
|
+
const _hoisted_4$o = {
|
|
1743
1788
|
key: 0,
|
|
1744
1789
|
class: "tao-split__shield"
|
|
1745
1790
|
};
|
|
1746
|
-
const _sfc_main$
|
|
1791
|
+
const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
|
|
1747
1792
|
...{ name: "TaoSplit" },
|
|
1748
1793
|
__name: "TaoSplit",
|
|
1749
1794
|
props: {
|
|
@@ -2028,7 +2073,7 @@
|
|
|
2028
2073
|
]]),
|
|
2029
2074
|
style: vue.normalizeStyle({ "--tao-split-start": `${startPx.value}px` })
|
|
2030
2075
|
}, [
|
|
2031
|
-
vue.createElementVNode("div", _hoisted_1$
|
|
2076
|
+
vue.createElementVNode("div", _hoisted_1$D, [
|
|
2032
2077
|
vue.renderSlot(_ctx.$slots, "start", {}, void 0, true)
|
|
2033
2078
|
]),
|
|
2034
2079
|
vue.createElementVNode("div", {
|
|
@@ -2051,18 +2096,18 @@
|
|
|
2051
2096
|
onKeydown,
|
|
2052
2097
|
onDragstart: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
2053
2098
|
}, ["prevent"]))
|
|
2054
|
-
}, null, 40, _hoisted_2$
|
|
2055
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
2099
|
+
}, null, 40, _hoisted_2$z),
|
|
2100
|
+
vue.createElementVNode("div", _hoisted_3$s, [
|
|
2056
2101
|
vue.renderSlot(_ctx.$slots, "end", {}, void 0, true)
|
|
2057
2102
|
]),
|
|
2058
|
-
isDragging.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
2103
|
+
isDragging.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$o)) : vue.createCommentVNode("", true)
|
|
2059
2104
|
], 6);
|
|
2060
2105
|
};
|
|
2061
2106
|
}
|
|
2062
2107
|
});
|
|
2063
|
-
const TaoSplit = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2064
|
-
const _hoisted_1$
|
|
2065
|
-
const _sfc_main$
|
|
2108
|
+
const TaoSplit = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-f44196dc"]]);
|
|
2109
|
+
const _hoisted_1$C = { class: "tao-icon" };
|
|
2110
|
+
const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
2066
2111
|
...{ name: "TaoIcon" },
|
|
2067
2112
|
__name: "TaoIcon",
|
|
2068
2113
|
props: {
|
|
@@ -2077,7 +2122,7 @@
|
|
|
2077
2122
|
}));
|
|
2078
2123
|
const props = __props;
|
|
2079
2124
|
return (_ctx, _cache) => {
|
|
2080
|
-
return vue.openBlock(), vue.createElementBlock("span", _hoisted_1$
|
|
2125
|
+
return vue.openBlock(), vue.createElementBlock("span", _hoisted_1$C, [
|
|
2081
2126
|
vue.renderSlot(_ctx.$slots, "prefix", {}, void 0, true),
|
|
2082
2127
|
vue.createElementVNode("i", {
|
|
2083
2128
|
class: vue.normalizeClass(["tao-icon__value", [`icon-${props.name}`, { "tao-icon__value--invert": props.invert }]]),
|
|
@@ -2088,8 +2133,8 @@
|
|
|
2088
2133
|
};
|
|
2089
2134
|
}
|
|
2090
2135
|
});
|
|
2091
|
-
const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2092
|
-
const _sfc_main$
|
|
2136
|
+
const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-145b2cfc"]]);
|
|
2137
|
+
const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
|
|
2093
2138
|
...{ name: "TaoLoader" },
|
|
2094
2139
|
__name: "TaoLoader",
|
|
2095
2140
|
props: {
|
|
@@ -2150,11 +2195,11 @@
|
|
|
2150
2195
|
};
|
|
2151
2196
|
}
|
|
2152
2197
|
});
|
|
2153
|
-
const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2154
|
-
const _hoisted_1$
|
|
2155
|
-
const _hoisted_2$
|
|
2156
|
-
const _hoisted_3$
|
|
2157
|
-
const _sfc_main$
|
|
2198
|
+
const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-75a40018"]]);
|
|
2199
|
+
const _hoisted_1$B = { class: "tao-image" };
|
|
2200
|
+
const _hoisted_2$y = ["src", "alt", "loading"];
|
|
2201
|
+
const _hoisted_3$r = { class: "tao-image__placeholder" };
|
|
2202
|
+
const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
|
|
2158
2203
|
...{ name: "TaoImage" },
|
|
2159
2204
|
__name: "TaoImage",
|
|
2160
2205
|
props: {
|
|
@@ -2169,20 +2214,24 @@
|
|
|
2169
2214
|
const props = __props;
|
|
2170
2215
|
const emit = __emit;
|
|
2171
2216
|
const isLoaded = vue.ref(false);
|
|
2217
|
+
const hasError = vue.ref(false);
|
|
2172
2218
|
function handleLoad() {
|
|
2173
2219
|
isLoaded.value = true;
|
|
2220
|
+
hasError.value = false;
|
|
2174
2221
|
emit("load");
|
|
2175
2222
|
}
|
|
2176
2223
|
function handleError() {
|
|
2177
2224
|
isLoaded.value = false;
|
|
2225
|
+
hasError.value = true;
|
|
2178
2226
|
emit("error");
|
|
2179
2227
|
}
|
|
2180
2228
|
vue.watch(() => props.src, () => {
|
|
2181
2229
|
isLoaded.value = false;
|
|
2230
|
+
hasError.value = false;
|
|
2182
2231
|
});
|
|
2183
2232
|
return (_ctx, _cache) => {
|
|
2184
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2185
|
-
__props.src ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
2233
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$B, [
|
|
2234
|
+
__props.src && !hasError.value ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
2186
2235
|
key: 0,
|
|
2187
2236
|
class: vue.normalizeClass({ "tao-image__img--hidden": !isLoaded.value, "tao-image__img--pixelated": props.pixelated }),
|
|
2188
2237
|
src: __props.src,
|
|
@@ -2192,25 +2241,26 @@
|
|
|
2192
2241
|
draggable: "false",
|
|
2193
2242
|
onLoad: handleLoad,
|
|
2194
2243
|
onError: handleError
|
|
2195
|
-
}, null, 42, _hoisted_2$
|
|
2196
|
-
|
|
2197
|
-
|
|
2244
|
+
}, null, 42, _hoisted_2$y)) : vue.createCommentVNode("", true),
|
|
2245
|
+
!__props.src || hasError.value ? vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
2246
|
+
vue.createElementVNode("div", _hoisted_3$r, vue.toDisplayString(__props.placeholderText), 1)
|
|
2247
|
+
], true, 1) : vue.createCommentVNode("", true)
|
|
2198
2248
|
]);
|
|
2199
2249
|
};
|
|
2200
2250
|
}
|
|
2201
2251
|
});
|
|
2202
|
-
const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2203
|
-
const _hoisted_1$
|
|
2204
|
-
const _hoisted_2$
|
|
2205
|
-
const _hoisted_3$
|
|
2252
|
+
const TaoImage = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-aea39025"]]);
|
|
2253
|
+
const _hoisted_1$A = ["for"];
|
|
2254
|
+
const _hoisted_2$x = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
|
|
2255
|
+
const _hoisted_3$q = {
|
|
2206
2256
|
key: 0,
|
|
2207
2257
|
class: "tao-checkbox__label"
|
|
2208
2258
|
};
|
|
2209
|
-
const _hoisted_4$
|
|
2259
|
+
const _hoisted_4$n = {
|
|
2210
2260
|
key: 1,
|
|
2211
2261
|
class: "tao-checkbox__label"
|
|
2212
2262
|
};
|
|
2213
|
-
const _sfc_main$
|
|
2263
|
+
const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
|
|
2214
2264
|
...{ name: "TaoCheckbox" },
|
|
2215
2265
|
__name: "TaoCheckbox",
|
|
2216
2266
|
props: {
|
|
@@ -2280,25 +2330,25 @@
|
|
|
2280
2330
|
"aria-invalid": invalid.value || void 0,
|
|
2281
2331
|
"aria-describedby": describedBy.value,
|
|
2282
2332
|
onChange: onInputChange
|
|
2283
|
-
}, null, 40, _hoisted_2$
|
|
2333
|
+
}, null, 40, _hoisted_2$x),
|
|
2284
2334
|
_cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "tao-checkbox__box" }, null, -1)),
|
|
2285
|
-
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
2335
|
+
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$q, vue.toDisplayString(__props.label), 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$n, [
|
|
2286
2336
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2287
2337
|
])),
|
|
2288
2338
|
vue.renderSlot(_ctx.$slots, "post", { text: __props.label }, void 0, true)
|
|
2289
|
-
], 10, _hoisted_1$
|
|
2339
|
+
], 10, _hoisted_1$A);
|
|
2290
2340
|
};
|
|
2291
2341
|
}
|
|
2292
2342
|
});
|
|
2293
|
-
const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2294
|
-
const _hoisted_1$
|
|
2343
|
+
const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-f6b0e565"]]);
|
|
2344
|
+
const _hoisted_1$z = {
|
|
2295
2345
|
key: 0,
|
|
2296
2346
|
class: "tao-tag__prefix"
|
|
2297
2347
|
};
|
|
2298
|
-
const _hoisted_2$
|
|
2299
|
-
const _hoisted_3$
|
|
2300
|
-
const _hoisted_4$
|
|
2301
|
-
const _sfc_main$
|
|
2348
|
+
const _hoisted_2$w = { class: "tao-tag__text" };
|
|
2349
|
+
const _hoisted_3$p = ["aria-label"];
|
|
2350
|
+
const _hoisted_4$m = { "aria-hidden": "true" };
|
|
2351
|
+
const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
|
|
2302
2352
|
...{ name: "TaoTag" },
|
|
2303
2353
|
__name: "TaoTag",
|
|
2304
2354
|
props: {
|
|
@@ -2338,10 +2388,10 @@
|
|
|
2338
2388
|
]]),
|
|
2339
2389
|
style: vue.normalizeStyle(style.value)
|
|
2340
2390
|
}, [
|
|
2341
|
-
_ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$
|
|
2391
|
+
_ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$z, [
|
|
2342
2392
|
vue.renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
2343
2393
|
])) : vue.createCommentVNode("", true),
|
|
2344
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
2394
|
+
vue.createElementVNode("span", _hoisted_2$w, [
|
|
2345
2395
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2346
2396
|
]),
|
|
2347
2397
|
__props.closable ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
@@ -2351,27 +2401,27 @@
|
|
|
2351
2401
|
"aria-label": __props.closeLabel,
|
|
2352
2402
|
onClick: vue.withModifiers(onClose, ["stop"])
|
|
2353
2403
|
}, [
|
|
2354
|
-
vue.createElementVNode("span", _hoisted_4$
|
|
2404
|
+
vue.createElementVNode("span", _hoisted_4$m, [
|
|
2355
2405
|
vue.renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
2356
2406
|
_cache[0] || (_cache[0] = vue.createTextVNode("✕", -1))
|
|
2357
2407
|
], true)
|
|
2358
2408
|
])
|
|
2359
|
-
], 8, _hoisted_3$
|
|
2409
|
+
], 8, _hoisted_3$p)) : vue.createCommentVNode("", true)
|
|
2360
2410
|
], 6);
|
|
2361
2411
|
};
|
|
2362
2412
|
}
|
|
2363
2413
|
});
|
|
2364
|
-
const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2365
|
-
const _hoisted_1$
|
|
2414
|
+
const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-f353f529"]]);
|
|
2415
|
+
const _hoisted_1$y = {
|
|
2366
2416
|
key: 1,
|
|
2367
2417
|
class: "tao-divider-text"
|
|
2368
2418
|
};
|
|
2369
|
-
const _hoisted_2$
|
|
2370
|
-
const _hoisted_3$
|
|
2419
|
+
const _hoisted_2$v = { class: "tao-divider-text__value" };
|
|
2420
|
+
const _hoisted_3$o = {
|
|
2371
2421
|
key: 2,
|
|
2372
2422
|
class: "tao-divider-line"
|
|
2373
2423
|
};
|
|
2374
|
-
const _sfc_main$
|
|
2424
|
+
const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
|
|
2375
2425
|
...{ name: "TaoDivider" },
|
|
2376
2426
|
__name: "TaoDivider",
|
|
2377
2427
|
props: {
|
|
@@ -2385,23 +2435,23 @@
|
|
|
2385
2435
|
return __props.variant === "gap" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2386
2436
|
key: 0,
|
|
2387
2437
|
class: vue.normalizeClass(["tao-divider-gap", `tao-divider-gap--${gapSize.value}`])
|
|
2388
|
-
}, null, 2)) : __props.variant === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2438
|
+
}, null, 2)) : __props.variant === "text" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$y, [
|
|
2389
2439
|
_cache[0] || (_cache[0] = vue.createElementVNode("span", { class: "tao-divider-text__line tao-divider-text__line--left" }, null, -1)),
|
|
2390
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
2440
|
+
vue.createElementVNode("span", _hoisted_2$v, [
|
|
2391
2441
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2392
2442
|
]),
|
|
2393
2443
|
_cache[1] || (_cache[1] = vue.createElementVNode("span", { class: "tao-divider-text__line tao-divider-text__line--right" }, null, -1))
|
|
2394
|
-
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
2444
|
+
])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$o));
|
|
2395
2445
|
};
|
|
2396
2446
|
}
|
|
2397
2447
|
});
|
|
2398
|
-
const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2399
|
-
const _hoisted_1$
|
|
2448
|
+
const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-8187a15d"]]);
|
|
2449
|
+
const _hoisted_1$x = {
|
|
2400
2450
|
key: 0,
|
|
2401
2451
|
class: "tao-fieldset__legend"
|
|
2402
2452
|
};
|
|
2403
|
-
const _hoisted_2$
|
|
2404
|
-
const _sfc_main$
|
|
2453
|
+
const _hoisted_2$u = { class: "tao-fieldset__body" };
|
|
2454
|
+
const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
|
|
2405
2455
|
...{ name: "TaoFieldset" },
|
|
2406
2456
|
__name: "TaoFieldset",
|
|
2407
2457
|
props: {
|
|
@@ -2413,20 +2463,20 @@
|
|
|
2413
2463
|
return vue.openBlock(), vue.createElementBlock("fieldset", {
|
|
2414
2464
|
class: vue.normalizeClass(["tao-fieldset", `tao-fieldset--${__props.align}`])
|
|
2415
2465
|
}, [
|
|
2416
|
-
__props.legend || _ctx.$slots.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_1$
|
|
2466
|
+
__props.legend || _ctx.$slots.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_1$x, [
|
|
2417
2467
|
vue.renderSlot(_ctx.$slots, "legend", {}, () => [
|
|
2418
2468
|
vue.createTextVNode(vue.toDisplayString(__props.legend), 1)
|
|
2419
2469
|
], true)
|
|
2420
2470
|
])) : vue.createCommentVNode("", true),
|
|
2421
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
2471
|
+
vue.createElementVNode("div", _hoisted_2$u, [
|
|
2422
2472
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2423
2473
|
])
|
|
2424
2474
|
], 2);
|
|
2425
2475
|
};
|
|
2426
2476
|
}
|
|
2427
2477
|
});
|
|
2428
|
-
const TaoFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2429
|
-
const _sfc_main$
|
|
2478
|
+
const TaoFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-34440ba5"]]);
|
|
2479
|
+
const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
|
|
2430
2480
|
...{ name: "TaoAnimatedBorder" },
|
|
2431
2481
|
__name: "TaoAnimatedBorder",
|
|
2432
2482
|
props: {
|
|
@@ -2450,18 +2500,18 @@
|
|
|
2450
2500
|
};
|
|
2451
2501
|
}
|
|
2452
2502
|
});
|
|
2453
|
-
const TaoAnimatedBorder = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2454
|
-
const _hoisted_1$
|
|
2503
|
+
const TaoAnimatedBorder = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-f1534571"]]);
|
|
2504
|
+
const _hoisted_1$w = {
|
|
2455
2505
|
key: 0,
|
|
2456
2506
|
class: "tao-textarea tao-textarea--dummy"
|
|
2457
2507
|
};
|
|
2458
|
-
const _hoisted_2$
|
|
2508
|
+
const _hoisted_2$t = {
|
|
2459
2509
|
key: 1,
|
|
2460
2510
|
class: "tao-textarea-wrap"
|
|
2461
2511
|
};
|
|
2462
|
-
const _hoisted_3$
|
|
2463
|
-
const _hoisted_4$
|
|
2464
|
-
const _sfc_main$
|
|
2512
|
+
const _hoisted_3$n = ["id", "placeholder", "spellcheck", "autocomplete", "minlength", "maxlength", "disabled", "rows", "value", "aria-invalid", "aria-describedby"];
|
|
2513
|
+
const _hoisted_4$l = ["id"];
|
|
2514
|
+
const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
|
|
2465
2515
|
...{ name: "TaoTextarea" },
|
|
2466
2516
|
__name: "TaoTextarea",
|
|
2467
2517
|
props: {
|
|
@@ -2558,7 +2608,7 @@
|
|
|
2558
2608
|
vue.nextTick(autoResize);
|
|
2559
2609
|
});
|
|
2560
2610
|
return (_ctx, _cache) => {
|
|
2561
|
-
return __props.dummy ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$
|
|
2611
|
+
return __props.dummy ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$w, vue.toDisplayString(__props.modelValue), 1)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$t, [
|
|
2562
2612
|
vue.createElementVNode("textarea", {
|
|
2563
2613
|
id: controlId.value,
|
|
2564
2614
|
ref_key: "textareaRef",
|
|
@@ -2587,21 +2637,21 @@
|
|
|
2587
2637
|
onFocus,
|
|
2588
2638
|
onBlur,
|
|
2589
2639
|
onKeydown
|
|
2590
|
-
}, null, 42, _hoisted_3$
|
|
2640
|
+
}, null, 42, _hoisted_3$n),
|
|
2591
2641
|
__props.count ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
2592
2642
|
key: 0,
|
|
2593
2643
|
id: counterId.value,
|
|
2594
2644
|
class: vue.normalizeClass(["tao-textarea__count", { "tao-textarea__count--limit": atLimit.value }])
|
|
2595
|
-
}, vue.toDisplayString(countLabel.value), 11, _hoisted_4$
|
|
2645
|
+
}, vue.toDisplayString(countLabel.value), 11, _hoisted_4$l)) : vue.createCommentVNode("", true)
|
|
2596
2646
|
]));
|
|
2597
2647
|
};
|
|
2598
2648
|
}
|
|
2599
2649
|
});
|
|
2600
|
-
const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2601
|
-
const _hoisted_1$
|
|
2602
|
-
const _hoisted_2$
|
|
2650
|
+
const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-2534c0c4"]]);
|
|
2651
|
+
const _hoisted_1$v = ["tabindex", "aria-label"];
|
|
2652
|
+
const _hoisted_2$s = { class: "tao-scroll-top__content" };
|
|
2603
2653
|
const RIPPLE_DURATION = 750;
|
|
2604
|
-
const _sfc_main$
|
|
2654
|
+
const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
|
|
2605
2655
|
...{ name: "TaoScrollTop" },
|
|
2606
2656
|
__name: "TaoScrollTop",
|
|
2607
2657
|
props: {
|
|
@@ -2702,7 +2752,7 @@
|
|
|
2702
2752
|
"aria-label": props.ariaLabel,
|
|
2703
2753
|
onClick: vue.withModifiers(onClick, ["prevent"])
|
|
2704
2754
|
}, [
|
|
2705
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
2755
|
+
vue.createElementVNode("div", _hoisted_2$s, [
|
|
2706
2756
|
vue.createElementVNode("div", {
|
|
2707
2757
|
class: vue.normalizeClass([{ "tao-scroll-top__ripple--active": isRippleActive.value }, "tao-scroll-top__ripple"]),
|
|
2708
2758
|
style: vue.normalizeStyle(rippleStyle)
|
|
@@ -2719,21 +2769,21 @@
|
|
|
2719
2769
|
], -1))
|
|
2720
2770
|
], true)
|
|
2721
2771
|
])
|
|
2722
|
-
], 14, _hoisted_1$
|
|
2772
|
+
], 14, _hoisted_1$v)) : vue.createCommentVNode("", true)
|
|
2723
2773
|
]),
|
|
2724
2774
|
_: 3
|
|
2725
2775
|
});
|
|
2726
2776
|
};
|
|
2727
2777
|
}
|
|
2728
2778
|
});
|
|
2729
|
-
const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2730
|
-
const _hoisted_1$
|
|
2731
|
-
const _hoisted_2$
|
|
2779
|
+
const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-59678649"]]);
|
|
2780
|
+
const _hoisted_1$u = { class: "tao-progress" };
|
|
2781
|
+
const _hoisted_2$r = {
|
|
2732
2782
|
key: 0,
|
|
2733
2783
|
class: "tao-progress__side"
|
|
2734
2784
|
};
|
|
2735
|
-
const _hoisted_3$
|
|
2736
|
-
const _hoisted_4$
|
|
2785
|
+
const _hoisted_3$m = { class: "tao-progress__main" };
|
|
2786
|
+
const _hoisted_4$k = {
|
|
2737
2787
|
key: 0,
|
|
2738
2788
|
class: "tao-progress__percentage"
|
|
2739
2789
|
};
|
|
@@ -2741,11 +2791,11 @@
|
|
|
2741
2791
|
key: 1,
|
|
2742
2792
|
class: "tao-progress__side"
|
|
2743
2793
|
};
|
|
2744
|
-
const _hoisted_6$
|
|
2794
|
+
const _hoisted_6$d = {
|
|
2745
2795
|
key: 0,
|
|
2746
2796
|
class: "tao-progress__percentage"
|
|
2747
2797
|
};
|
|
2748
|
-
const _sfc_main$
|
|
2798
|
+
const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
|
|
2749
2799
|
...{ name: "TaoProgress" },
|
|
2750
2800
|
__name: "TaoProgress",
|
|
2751
2801
|
props: {
|
|
@@ -2776,16 +2826,16 @@
|
|
|
2776
2826
|
() => hasRight.value ? `(${props.progress}%)` : `${props.progress}%`
|
|
2777
2827
|
);
|
|
2778
2828
|
return (_ctx, _cache) => {
|
|
2779
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
2829
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$u, [
|
|
2780
2830
|
vue.createElementVNode("div", {
|
|
2781
2831
|
class: vue.normalizeClass(["tao-progress__container", { "tao-progress__container--over": showOverPercent.value }]),
|
|
2782
2832
|
style: vue.normalizeStyle({ minWidth: `${minW.value}px`, maxWidth: `${maxW.value}px` })
|
|
2783
2833
|
}, [
|
|
2784
|
-
_ctx.$slots.left ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
2834
|
+
_ctx.$slots.left ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$r, [
|
|
2785
2835
|
vue.renderSlot(_ctx.$slots, "left", {}, void 0, true)
|
|
2786
2836
|
])) : vue.createCommentVNode("", true),
|
|
2787
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
2788
|
-
showOverPercent.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$
|
|
2837
|
+
vue.createElementVNode("div", _hoisted_3$m, [
|
|
2838
|
+
showOverPercent.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$k, vue.toDisplayString(__props.progress) + "%", 1)) : vue.createCommentVNode("", true),
|
|
2789
2839
|
vue.createElementVNode("div", {
|
|
2790
2840
|
class: "tao-progress__track",
|
|
2791
2841
|
style: vue.normalizeStyle({ height: `${__props.height}px` })
|
|
@@ -2798,21 +2848,21 @@
|
|
|
2798
2848
|
]),
|
|
2799
2849
|
_ctx.$slots.right || showEndPercent.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$g, [
|
|
2800
2850
|
vue.renderSlot(_ctx.$slots, "right", {}, void 0, true),
|
|
2801
|
-
showEndPercent.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$
|
|
2851
|
+
showEndPercent.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$d, vue.toDisplayString(endPercentLabel.value), 1)) : vue.createCommentVNode("", true)
|
|
2802
2852
|
])) : vue.createCommentVNode("", true)
|
|
2803
2853
|
], 6)
|
|
2804
2854
|
]);
|
|
2805
2855
|
};
|
|
2806
2856
|
}
|
|
2807
2857
|
});
|
|
2808
|
-
const TaoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2809
|
-
const _hoisted_1$
|
|
2810
|
-
const _hoisted_2$
|
|
2811
|
-
const _hoisted_3$
|
|
2858
|
+
const TaoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-54c13718"]]);
|
|
2859
|
+
const _hoisted_1$t = ["id", "tabindex", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-disabled", "aria-describedby"];
|
|
2860
|
+
const _hoisted_2$q = ["placeholder"];
|
|
2861
|
+
const _hoisted_3$l = {
|
|
2812
2862
|
key: 1,
|
|
2813
2863
|
class: "tao-slider__value"
|
|
2814
2864
|
};
|
|
2815
|
-
const _sfc_main$
|
|
2865
|
+
const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
|
|
2816
2866
|
...{ name: "TaoSlider" },
|
|
2817
2867
|
__name: "TaoSlider",
|
|
2818
2868
|
props: {
|
|
@@ -3029,24 +3079,24 @@
|
|
|
3029
3079
|
onKeydown: onShadowKeydown,
|
|
3030
3080
|
onPointerdown: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
|
3031
3081
|
}, ["stop"]))
|
|
3032
|
-
}, null, 40, _hoisted_2$
|
|
3082
|
+
}, null, 40, _hoisted_2$q)), [
|
|
3033
3083
|
[vue.vModelText, shadowModel.value]
|
|
3034
|
-
]) : __props.showValue ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$
|
|
3084
|
+
]) : __props.showValue ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$l, [
|
|
3035
3085
|
vue.renderSlot(_ctx.$slots, "pre-value", {}, void 0, true),
|
|
3036
3086
|
vue.createTextVNode(vue.toDisplayString(__props.modelValue), 1),
|
|
3037
3087
|
vue.renderSlot(_ctx.$slots, "post-value", {}, void 0, true)
|
|
3038
3088
|
])) : vue.createCommentVNode("", true)
|
|
3039
|
-
], 42, _hoisted_1$
|
|
3089
|
+
], 42, _hoisted_1$t);
|
|
3040
3090
|
};
|
|
3041
3091
|
}
|
|
3042
3092
|
});
|
|
3043
|
-
const TaoSlider = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3044
|
-
const _hoisted_1$
|
|
3045
|
-
const _hoisted_2$
|
|
3046
|
-
const _hoisted_3$
|
|
3047
|
-
const _hoisted_4$
|
|
3093
|
+
const TaoSlider = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-24a38782"]]);
|
|
3094
|
+
const _hoisted_1$s = { class: "tao-file-drop" };
|
|
3095
|
+
const _hoisted_2$p = { class: "tao-file-drop__row" };
|
|
3096
|
+
const _hoisted_3$k = ["aria-label"];
|
|
3097
|
+
const _hoisted_4$j = { "aria-hidden": "true" };
|
|
3048
3098
|
const _hoisted_5$f = ["accept", "multiple"];
|
|
3049
|
-
const _hoisted_6$
|
|
3099
|
+
const _hoisted_6$c = {
|
|
3050
3100
|
key: 0,
|
|
3051
3101
|
class: "tao-file-drop__list"
|
|
3052
3102
|
};
|
|
@@ -3054,7 +3104,7 @@
|
|
|
3054
3104
|
const _hoisted_8$9 = { class: "tao-file-drop__meta" };
|
|
3055
3105
|
const _hoisted_9$4 = ["aria-label", "onClick"];
|
|
3056
3106
|
const _hoisted_10$4 = { "aria-hidden": "true" };
|
|
3057
|
-
const _sfc_main$
|
|
3107
|
+
const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
|
|
3058
3108
|
...{ name: "TaoFileDrop" },
|
|
3059
3109
|
__name: "TaoFileDrop",
|
|
3060
3110
|
props: {
|
|
@@ -3077,6 +3127,28 @@
|
|
|
3077
3127
|
function sameFile(a, b) {
|
|
3078
3128
|
return a.name === b.name && a.size === b.size && a.lastModified === b.lastModified;
|
|
3079
3129
|
}
|
|
3130
|
+
function acceptTokens(accept) {
|
|
3131
|
+
return accept.split(",").map((token) => token.trim().toLowerCase()).filter(Boolean);
|
|
3132
|
+
}
|
|
3133
|
+
function fileMatchesAccept(file, accept) {
|
|
3134
|
+
const tokens = acceptTokens(accept);
|
|
3135
|
+
if (!tokens.length || tokens.includes("*") || tokens.includes("*/*")) {
|
|
3136
|
+
return true;
|
|
3137
|
+
}
|
|
3138
|
+
const name = file.name.toLowerCase();
|
|
3139
|
+
const mime = (file.type || "").toLowerCase();
|
|
3140
|
+
const dot = name.lastIndexOf(".");
|
|
3141
|
+
const ext = dot >= 0 ? name.slice(dot) : "";
|
|
3142
|
+
return tokens.some((token) => {
|
|
3143
|
+
if (token.startsWith(".")) {
|
|
3144
|
+
return ext === token;
|
|
3145
|
+
}
|
|
3146
|
+
if (token.endsWith("/*")) {
|
|
3147
|
+
return mime.startsWith(token.slice(0, -1));
|
|
3148
|
+
}
|
|
3149
|
+
return mime === token;
|
|
3150
|
+
});
|
|
3151
|
+
}
|
|
3080
3152
|
function commit(files) {
|
|
3081
3153
|
emit("update:modelValue", files);
|
|
3082
3154
|
emit("files", files);
|
|
@@ -3109,9 +3181,17 @@
|
|
|
3109
3181
|
function removeAt(index) {
|
|
3110
3182
|
commit(props.modelValue.filter((_, item) => item !== index));
|
|
3111
3183
|
}
|
|
3184
|
+
function resetInput() {
|
|
3185
|
+
const el = fileInput.value;
|
|
3186
|
+
if (el) {
|
|
3187
|
+
el.type = "text";
|
|
3188
|
+
el.type = "file";
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3112
3191
|
function processFiles(fileList) {
|
|
3113
|
-
const incoming = Array.from(fileList);
|
|
3192
|
+
const incoming = Array.from(fileList).filter((file) => fileMatchesAccept(file, props.accept));
|
|
3114
3193
|
if (!incoming.length) {
|
|
3194
|
+
resetInput();
|
|
3115
3195
|
return;
|
|
3116
3196
|
}
|
|
3117
3197
|
let result;
|
|
@@ -3126,11 +3206,7 @@
|
|
|
3126
3206
|
}
|
|
3127
3207
|
}
|
|
3128
3208
|
commit(result);
|
|
3129
|
-
|
|
3130
|
-
if (el) {
|
|
3131
|
-
el.type = "text";
|
|
3132
|
-
el.type = "file";
|
|
3133
|
-
}
|
|
3209
|
+
resetInput();
|
|
3134
3210
|
}
|
|
3135
3211
|
function defaultFormatSize(bytes) {
|
|
3136
3212
|
if (bytes < 1024) {
|
|
@@ -3159,8 +3235,8 @@
|
|
|
3159
3235
|
});
|
|
3160
3236
|
vue.onBeforeUnmount(() => stopFocusLoss == null ? void 0 : stopFocusLoss());
|
|
3161
3237
|
return (_ctx, _cache) => {
|
|
3162
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
3163
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
3238
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$s, [
|
|
3239
|
+
vue.createElementVNode("div", _hoisted_2$p, [
|
|
3164
3240
|
__props.showClear && __props.modelValue.length ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
3165
3241
|
key: 0,
|
|
3166
3242
|
type: "button",
|
|
@@ -3168,12 +3244,12 @@
|
|
|
3168
3244
|
"aria-label": __props.clearLabel,
|
|
3169
3245
|
onClick: requestClear
|
|
3170
3246
|
}, [
|
|
3171
|
-
vue.createElementVNode("span", _hoisted_4$
|
|
3247
|
+
vue.createElementVNode("span", _hoisted_4$j, [
|
|
3172
3248
|
vue.renderSlot(_ctx.$slots, "clear-icon", {}, () => [
|
|
3173
3249
|
_cache[1] || (_cache[1] = vue.createTextVNode("✕", -1))
|
|
3174
3250
|
], true)
|
|
3175
3251
|
])
|
|
3176
|
-
], 8, _hoisted_3$
|
|
3252
|
+
], 8, _hoisted_3$k)) : vue.createCommentVNode("", true),
|
|
3177
3253
|
vue.createElementVNode("label", {
|
|
3178
3254
|
class: vue.normalizeClass(["tao-file-drop__zone", [`tao-file-drop__zone--${__props.size}`, { "tao-file-drop__zone--dragging": isDragging.value }]]),
|
|
3179
3255
|
onDragover: handleDragOver,
|
|
@@ -3196,7 +3272,7 @@
|
|
|
3196
3272
|
}, null, 40, _hoisted_5$f)
|
|
3197
3273
|
], 34)
|
|
3198
3274
|
]),
|
|
3199
|
-
__props.list && __props.modelValue.length ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_6$
|
|
3275
|
+
__props.list && __props.modelValue.length ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_6$c, [
|
|
3200
3276
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.modelValue, (file, index) => {
|
|
3201
3277
|
return vue.openBlock(), vue.createElementBlock("li", {
|
|
3202
3278
|
key: fileKey(file, index),
|
|
@@ -3223,13 +3299,15 @@
|
|
|
3223
3299
|
};
|
|
3224
3300
|
}
|
|
3225
3301
|
});
|
|
3226
|
-
const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3227
|
-
const _hoisted_1$
|
|
3228
|
-
const _hoisted_2$
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
const
|
|
3302
|
+
const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-4b36e2a3"]]);
|
|
3303
|
+
const _hoisted_1$r = ["aria-expanded", "aria-label"];
|
|
3304
|
+
const _hoisted_2$o = {
|
|
3305
|
+
key: 1,
|
|
3306
|
+
"aria-hidden": "true"
|
|
3307
|
+
};
|
|
3308
|
+
const _hoisted_3$j = ["onClick", "onMouseenter"];
|
|
3309
|
+
const _hoisted_4$i = { key: 1 };
|
|
3310
|
+
const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
|
|
3233
3311
|
...{ name: "TaoDropdownMenu" },
|
|
3234
3312
|
__name: "TaoDropdownMenu",
|
|
3235
3313
|
props: {
|
|
@@ -3363,19 +3441,15 @@
|
|
|
3363
3441
|
class: "tao-dropdown-menu__button",
|
|
3364
3442
|
"aria-haspopup": "menu",
|
|
3365
3443
|
"aria-expanded": isOpen.value,
|
|
3444
|
+
"aria-label": _ctx.$slots.button ? void 0 : __props.menuLabel,
|
|
3366
3445
|
onClick: toggleMenu
|
|
3367
3446
|
}, [
|
|
3368
|
-
_ctx.$slots.button ? vue.renderSlot(_ctx.$slots, "button", {}, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock("span",
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
_cache[0] || (_cache[0] = vue.createTextVNode("⋮", -1))
|
|
3375
|
-
], true)
|
|
3376
|
-
])
|
|
3377
|
-
], 8, _hoisted_2$m))
|
|
3378
|
-
], 8, _hoisted_1$p),
|
|
3447
|
+
_ctx.$slots.button ? vue.renderSlot(_ctx.$slots, "button", {}, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$o, [
|
|
3448
|
+
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
3449
|
+
_cache[0] || (_cache[0] = vue.createTextVNode("⋮", -1))
|
|
3450
|
+
], true)
|
|
3451
|
+
]))
|
|
3452
|
+
], 8, _hoisted_1$r),
|
|
3379
3453
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
3380
3454
|
isOpen.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
3381
3455
|
key: 0,
|
|
@@ -3400,8 +3474,8 @@
|
|
|
3400
3474
|
id: action.id,
|
|
3401
3475
|
ico: action.ico,
|
|
3402
3476
|
text: action.name
|
|
3403
|
-
}, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock("span",
|
|
3404
|
-
], 42,
|
|
3477
|
+
}, void 0, true, 0) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$i, vue.toDisplayString(action.name), 1))
|
|
3478
|
+
], 42, _hoisted_3$j);
|
|
3405
3479
|
}), 128))
|
|
3406
3480
|
], 36)) : vue.createCommentVNode("", true)
|
|
3407
3481
|
]))
|
|
@@ -3409,10 +3483,10 @@
|
|
|
3409
3483
|
};
|
|
3410
3484
|
}
|
|
3411
3485
|
});
|
|
3412
|
-
const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3413
|
-
const _hoisted_1$
|
|
3414
|
-
const _hoisted_2$
|
|
3415
|
-
const _sfc_main$
|
|
3486
|
+
const TaoDropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-cbfa7294"]]);
|
|
3487
|
+
const _hoisted_1$q = ["aria-invalid", "aria-describedby"];
|
|
3488
|
+
const _hoisted_2$n = ["id", "value", "placeholder", "type", "inputmode", "pattern", "maxlength", "onInput", "onPaste", "onKeydown", "onFocus"];
|
|
3489
|
+
const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
3416
3490
|
...{ name: "TaoPinCode" },
|
|
3417
3491
|
__name: "TaoPinCode",
|
|
3418
3492
|
props: {
|
|
@@ -3469,11 +3543,43 @@
|
|
|
3469
3543
|
function isFilled() {
|
|
3470
3544
|
return numbers.value.length === props.length && numbers.value.every((cell) => cell !== "");
|
|
3471
3545
|
}
|
|
3546
|
+
function applyChars(index, raw) {
|
|
3547
|
+
var _a;
|
|
3548
|
+
const chars = [...raw].map((ch) => acceptChar(ch)).filter(Boolean);
|
|
3549
|
+
if (!chars.length) {
|
|
3550
|
+
return;
|
|
3551
|
+
}
|
|
3552
|
+
numbers.value = [...numbers.value];
|
|
3553
|
+
let cursor = index;
|
|
3554
|
+
for (const ch of chars) {
|
|
3555
|
+
if (cursor >= props.length) {
|
|
3556
|
+
break;
|
|
3557
|
+
}
|
|
3558
|
+
numbers.value[cursor] = ch;
|
|
3559
|
+
cursor += 1;
|
|
3560
|
+
}
|
|
3561
|
+
emitChange();
|
|
3562
|
+
if (isFilled()) {
|
|
3563
|
+
(_a = inputRefs.value[index]) == null ? void 0 : _a.blur();
|
|
3564
|
+
emit("complete", serialize());
|
|
3565
|
+
return;
|
|
3566
|
+
}
|
|
3567
|
+
if (cursor < props.length) {
|
|
3568
|
+
focusCell(cursor);
|
|
3569
|
+
}
|
|
3570
|
+
}
|
|
3472
3571
|
function mutation(v, index) {
|
|
3473
3572
|
var _a;
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3573
|
+
if (v.length > 1) {
|
|
3574
|
+
applyChars(index, v);
|
|
3575
|
+
return;
|
|
3576
|
+
}
|
|
3577
|
+
const next = acceptChar(v);
|
|
3578
|
+
if (props.numbersOnly && v && !next) {
|
|
3579
|
+
const el = inputRefs.value[index];
|
|
3580
|
+
if (el) {
|
|
3581
|
+
el.value = numbers.value[index] ?? "";
|
|
3582
|
+
}
|
|
3477
3583
|
return;
|
|
3478
3584
|
}
|
|
3479
3585
|
numbers.value = [...numbers.value];
|
|
@@ -3493,6 +3599,15 @@
|
|
|
3493
3599
|
focusCell(target);
|
|
3494
3600
|
}
|
|
3495
3601
|
}
|
|
3602
|
+
function onPaste(event, index) {
|
|
3603
|
+
var _a;
|
|
3604
|
+
const text = ((_a = event.clipboardData) == null ? void 0 : _a.getData("text")) ?? "";
|
|
3605
|
+
if (!text) {
|
|
3606
|
+
return;
|
|
3607
|
+
}
|
|
3608
|
+
event.preventDefault();
|
|
3609
|
+
applyChars(index, text);
|
|
3610
|
+
}
|
|
3496
3611
|
function onFocus(index) {
|
|
3497
3612
|
if (props.clearOn === "input") {
|
|
3498
3613
|
const firstEmpty = firstEmptyIndex();
|
|
@@ -3574,19 +3689,20 @@
|
|
|
3574
3689
|
inputmode: __props.numbersOnly ? "numeric" : "text",
|
|
3575
3690
|
pattern: __props.numbersOnly ? "[0-9]" : void 0,
|
|
3576
3691
|
autocomplete: "one-time-code",
|
|
3577
|
-
maxlength:
|
|
3692
|
+
maxlength: index === 0 ? __props.length : 1,
|
|
3578
3693
|
onInput: ($event) => onChange($event, index),
|
|
3694
|
+
onPaste: ($event) => onPaste($event, index),
|
|
3579
3695
|
onKeydown: ($event) => onKeydown($event, index),
|
|
3580
3696
|
onFocus: ($event) => onFocus(index),
|
|
3581
3697
|
onBlur
|
|
3582
|
-
}, null, 42, _hoisted_2$
|
|
3698
|
+
}, null, 42, _hoisted_2$n);
|
|
3583
3699
|
}), 128))
|
|
3584
|
-
], 8, _hoisted_1$
|
|
3700
|
+
], 8, _hoisted_1$q);
|
|
3585
3701
|
};
|
|
3586
3702
|
}
|
|
3587
3703
|
});
|
|
3588
|
-
const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3589
|
-
const _sfc_main$
|
|
3704
|
+
const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-44474500"]]);
|
|
3705
|
+
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
3590
3706
|
...{ name: "TaoLink" },
|
|
3591
3707
|
__name: "TaoLink",
|
|
3592
3708
|
props: {
|
|
@@ -3628,8 +3744,8 @@
|
|
|
3628
3744
|
};
|
|
3629
3745
|
}
|
|
3630
3746
|
});
|
|
3631
|
-
const _hoisted_1$
|
|
3632
|
-
const _sfc_main$
|
|
3747
|
+
const _hoisted_1$p = ["for"];
|
|
3748
|
+
const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
3633
3749
|
...{ name: "TaoFormField" },
|
|
3634
3750
|
__name: "TaoFormField",
|
|
3635
3751
|
props: {
|
|
@@ -3642,6 +3758,7 @@
|
|
|
3642
3758
|
const id = vue.useId();
|
|
3643
3759
|
const hintId = `${id}-hint`;
|
|
3644
3760
|
const errorId = `${id}-error`;
|
|
3761
|
+
const labelId = `${id}-label`;
|
|
3645
3762
|
const invalid = vue.computed(() => Boolean(props.error));
|
|
3646
3763
|
const describedBy = vue.computed(() => {
|
|
3647
3764
|
if (props.error) {
|
|
@@ -3657,15 +3774,28 @@
|
|
|
3657
3774
|
invalid,
|
|
3658
3775
|
describedBy
|
|
3659
3776
|
});
|
|
3777
|
+
function onLabelClick() {
|
|
3778
|
+
var _a, _b;
|
|
3779
|
+
const target = document.getElementById(id);
|
|
3780
|
+
if (target instanceof HTMLInputElement || target instanceof HTMLButtonElement || target instanceof HTMLSelectElement || target instanceof HTMLTextAreaElement) {
|
|
3781
|
+
return;
|
|
3782
|
+
}
|
|
3783
|
+
const scope = target ?? ((_a = document.getElementById(labelId)) == null ? void 0 : _a.parentElement);
|
|
3784
|
+
(_b = scope == null ? void 0 : scope.querySelector(
|
|
3785
|
+
"input:not([disabled]), button:not([disabled]), textarea:not([disabled]), select:not([disabled])"
|
|
3786
|
+
)) == null ? void 0 : _b.focus();
|
|
3787
|
+
}
|
|
3660
3788
|
return (_ctx, _cache) => {
|
|
3661
3789
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
3662
3790
|
class: vue.normalizeClass(["tao-form-field", { "tao-form-field--invalid": invalid.value }])
|
|
3663
3791
|
}, [
|
|
3664
3792
|
__props.label ? (vue.openBlock(), vue.createElementBlock("label", {
|
|
3665
3793
|
key: 0,
|
|
3794
|
+
id: labelId,
|
|
3666
3795
|
class: "tao-form-field__label",
|
|
3667
|
-
for: vue.unref(id)
|
|
3668
|
-
|
|
3796
|
+
for: vue.unref(id),
|
|
3797
|
+
onClick: onLabelClick
|
|
3798
|
+
}, vue.toDisplayString(__props.label), 9, _hoisted_1$p)) : vue.createCommentVNode("", true),
|
|
3669
3799
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
3670
3800
|
__props.error ? (vue.openBlock(), vue.createElementBlock("p", {
|
|
3671
3801
|
key: 1,
|
|
@@ -3680,12 +3810,12 @@
|
|
|
3680
3810
|
};
|
|
3681
3811
|
}
|
|
3682
3812
|
});
|
|
3683
|
-
const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3684
|
-
const _hoisted_1$
|
|
3685
|
-
const _hoisted_2$
|
|
3686
|
-
const _hoisted_3$
|
|
3687
|
-
const _hoisted_4$
|
|
3688
|
-
const _sfc_main$
|
|
3813
|
+
const TaoFormField = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-edd0be31"]]);
|
|
3814
|
+
const _hoisted_1$o = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
|
|
3815
|
+
const _hoisted_2$m = { class: "tao-select__value" };
|
|
3816
|
+
const _hoisted_3$i = ["aria-activedescendant"];
|
|
3817
|
+
const _hoisted_4$h = ["id", "aria-selected", "aria-disabled", "data-tao-select-index", "onClick", "onMouseenter"];
|
|
3818
|
+
const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
3689
3819
|
...{ name: "TaoSelect" },
|
|
3690
3820
|
__name: "TaoSelect",
|
|
3691
3821
|
props: {
|
|
@@ -3724,12 +3854,16 @@
|
|
|
3724
3854
|
}
|
|
3725
3855
|
const rect = trigger.getBoundingClientRect();
|
|
3726
3856
|
const panelHeight = panel.offsetHeight;
|
|
3857
|
+
const panelWidth = panel.offsetWidth || rect.width;
|
|
3727
3858
|
const gap = 4;
|
|
3859
|
+
const pad = 8;
|
|
3728
3860
|
const spaceBelow = window.innerHeight - rect.bottom - gap;
|
|
3729
3861
|
const openUp = spaceBelow < panelHeight && rect.top > spaceBelow;
|
|
3862
|
+
const maxLeft = Math.max(pad, window.innerWidth - panelWidth - pad);
|
|
3863
|
+
const left = Math.min(Math.max(rect.left, pad), maxLeft);
|
|
3730
3864
|
listStyle.value = {
|
|
3731
3865
|
top: `${openUp ? rect.top - panelHeight - gap : rect.bottom + gap}px`,
|
|
3732
|
-
left: `${
|
|
3866
|
+
left: `${left}px`,
|
|
3733
3867
|
width: `${rect.width}px`
|
|
3734
3868
|
};
|
|
3735
3869
|
}
|
|
@@ -3743,7 +3877,7 @@
|
|
|
3743
3877
|
return;
|
|
3744
3878
|
}
|
|
3745
3879
|
const selectedIndex = props.options.findIndex((option) => option.value === props.modelValue);
|
|
3746
|
-
activeIndex.value = selectedIndex >= 0 ? selectedIndex : enabledIndexes.value[0] ?? -1;
|
|
3880
|
+
activeIndex.value = selectedIndex >= 0 && enabledIndexes.value.includes(selectedIndex) ? selectedIndex : enabledIndexes.value[0] ?? -1;
|
|
3747
3881
|
await vue.nextTick();
|
|
3748
3882
|
updatePosition();
|
|
3749
3883
|
(_a = listRef.value) == null ? void 0 : _a.focus();
|
|
@@ -3899,14 +4033,14 @@
|
|
|
3899
4033
|
onClick: toggle,
|
|
3900
4034
|
onKeydown: onTriggerKeydown
|
|
3901
4035
|
}, [
|
|
3902
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
4036
|
+
vue.createElementVNode("span", _hoisted_2$m, vue.toDisplayString(((_a = selected.value) == null ? void 0 : _a.label) ?? __props.placeholder), 1),
|
|
3903
4037
|
vue.createElementVNode("span", {
|
|
3904
4038
|
class: vue.normalizeClass(["tao-select__chevron", { "tao-select__chevron--custom": _ctx.$slots.chevron }]),
|
|
3905
4039
|
"aria-hidden": "true"
|
|
3906
4040
|
}, [
|
|
3907
4041
|
vue.renderSlot(_ctx.$slots, "chevron", {}, void 0, true)
|
|
3908
4042
|
], 2)
|
|
3909
|
-
], 42, _hoisted_1$
|
|
4043
|
+
], 42, _hoisted_1$o),
|
|
3910
4044
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
3911
4045
|
open.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
3912
4046
|
key: 0,
|
|
@@ -3942,9 +4076,9 @@
|
|
|
3942
4076
|
}, ["prevent"])),
|
|
3943
4077
|
onClick: ($event) => selectOption(option),
|
|
3944
4078
|
onMouseenter: ($event) => !option.disabled && (activeIndex.value = index)
|
|
3945
|
-
}, vue.toDisplayString(option.label), 43, _hoisted_4$
|
|
4079
|
+
}, vue.toDisplayString(option.label), 43, _hoisted_4$h);
|
|
3946
4080
|
}), 128))
|
|
3947
|
-
], 40, _hoisted_3$
|
|
4081
|
+
], 40, _hoisted_3$i),
|
|
3948
4082
|
selected.value ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
3949
4083
|
key: 0,
|
|
3950
4084
|
type: "button",
|
|
@@ -3963,14 +4097,14 @@
|
|
|
3963
4097
|
};
|
|
3964
4098
|
}
|
|
3965
4099
|
});
|
|
3966
|
-
const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3967
|
-
const _hoisted_1$
|
|
3968
|
-
const _hoisted_2$
|
|
4100
|
+
const TaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-d9b336d8"]]);
|
|
4101
|
+
const _hoisted_1$n = ["id", "aria-expanded", "aria-activedescendant", "aria-invalid", "aria-describedby", "disabled", "placeholder", "value"];
|
|
4102
|
+
const _hoisted_2$l = {
|
|
3969
4103
|
key: 0,
|
|
3970
4104
|
class: "tao-combobox__empty"
|
|
3971
4105
|
};
|
|
3972
|
-
const _hoisted_3$
|
|
3973
|
-
const _sfc_main$
|
|
4106
|
+
const _hoisted_3$h = ["id", "aria-selected", "aria-disabled", "data-tao-combobox-index", "onClick", "onMouseenter"];
|
|
4107
|
+
const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
3974
4108
|
...{ name: "TaoCombobox" },
|
|
3975
4109
|
__name: "TaoCombobox",
|
|
3976
4110
|
props: {
|
|
@@ -4051,12 +4185,16 @@
|
|
|
4051
4185
|
}
|
|
4052
4186
|
const rect = trigger.getBoundingClientRect();
|
|
4053
4187
|
const panelHeight = panel.offsetHeight;
|
|
4188
|
+
const panelWidth = panel.offsetWidth || rect.width;
|
|
4054
4189
|
const gap = 4;
|
|
4190
|
+
const pad = 8;
|
|
4055
4191
|
const spaceBelow = window.innerHeight - rect.bottom - gap;
|
|
4056
4192
|
const openUp = spaceBelow < panelHeight && rect.top > spaceBelow;
|
|
4193
|
+
const maxLeft = Math.max(pad, window.innerWidth - panelWidth - pad);
|
|
4194
|
+
const left = Math.min(Math.max(rect.left, pad), maxLeft);
|
|
4057
4195
|
listStyle.value = {
|
|
4058
4196
|
top: `${openUp ? rect.top - panelHeight - gap : rect.bottom + gap}px`,
|
|
4059
|
-
left: `${
|
|
4197
|
+
left: `${left}px`,
|
|
4060
4198
|
width: `${rect.width}px`
|
|
4061
4199
|
};
|
|
4062
4200
|
}
|
|
@@ -4123,6 +4261,13 @@
|
|
|
4123
4261
|
}
|
|
4124
4262
|
commitCreated(value);
|
|
4125
4263
|
}
|
|
4264
|
+
function clear() {
|
|
4265
|
+
var _a;
|
|
4266
|
+
emitValue(null);
|
|
4267
|
+
query.value = "";
|
|
4268
|
+
open.value = false;
|
|
4269
|
+
(_a = inputRef.value) == null ? void 0 : _a.focus();
|
|
4270
|
+
}
|
|
4126
4271
|
function revertQuery() {
|
|
4127
4272
|
syncQueryFromModel();
|
|
4128
4273
|
}
|
|
@@ -4380,7 +4525,7 @@
|
|
|
4380
4525
|
onFocus,
|
|
4381
4526
|
onBlur,
|
|
4382
4527
|
onKeydown: onInputKeydown
|
|
4383
|
-
}, null, 40, _hoisted_1$
|
|
4528
|
+
}, null, 40, _hoisted_1$n),
|
|
4384
4529
|
vue.createElementVNode("span", {
|
|
4385
4530
|
class: vue.normalizeClass(["tao-combobox__chevron", { "tao-combobox__chevron--custom": _ctx.$slots.chevron }]),
|
|
4386
4531
|
"aria-hidden": "true"
|
|
@@ -4403,7 +4548,7 @@
|
|
|
4403
4548
|
class: "tao-combobox__list",
|
|
4404
4549
|
role: "listbox"
|
|
4405
4550
|
}, [
|
|
4406
|
-
!rows.value.length ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$
|
|
4551
|
+
!rows.value.length ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$l, [
|
|
4407
4552
|
vue.renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
4408
4553
|
vue.createTextVNode(vue.toDisplayString(__props.emptyText), 1)
|
|
4409
4554
|
], true)
|
|
@@ -4433,14 +4578,15 @@
|
|
|
4433
4578
|
], true, 0) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
4434
4579
|
vue.createTextVNode(vue.toDisplayString(row.option.label), 1)
|
|
4435
4580
|
], 64))
|
|
4436
|
-
], 42, _hoisted_3$
|
|
4581
|
+
], 42, _hoisted_3$h);
|
|
4437
4582
|
}), 128))
|
|
4438
4583
|
], 512),
|
|
4439
4584
|
selected.value ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
4440
4585
|
key: 0,
|
|
4441
4586
|
type: "button",
|
|
4442
4587
|
class: "tao-combobox__clear",
|
|
4443
|
-
onMousedown: vue.withModifiers(markPicking, ["prevent"])
|
|
4588
|
+
onMousedown: vue.withModifiers(markPicking, ["prevent"]),
|
|
4589
|
+
onClick: clear
|
|
4444
4590
|
}, [
|
|
4445
4591
|
vue.renderSlot(_ctx.$slots, "clear", {}, () => [
|
|
4446
4592
|
vue.createTextVNode(vue.toDisplayString(__props.clearText), 1)
|
|
@@ -4452,7 +4598,7 @@
|
|
|
4452
4598
|
};
|
|
4453
4599
|
}
|
|
4454
4600
|
});
|
|
4455
|
-
const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4601
|
+
const TaoCombobox = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-131d254d"]]);
|
|
4456
4602
|
const ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
4457
4603
|
function formatTaoDateIso(parts) {
|
|
4458
4604
|
return `${String(parts.y).padStart(4, "0")}-${String(parts.m).padStart(2, "0")}-${String(parts.d).padStart(2, "0")}`;
|
|
@@ -4491,8 +4637,23 @@
|
|
|
4491
4637
|
if (!parts) {
|
|
4492
4638
|
return iso;
|
|
4493
4639
|
}
|
|
4494
|
-
const
|
|
4495
|
-
|
|
4640
|
+
const monthStart = new Date(parts.y, parts.m - 1 + months, 1);
|
|
4641
|
+
const y = monthStart.getFullYear();
|
|
4642
|
+
const m = monthStart.getMonth() + 1;
|
|
4643
|
+
const lastDay = new Date(y, m, 0).getDate();
|
|
4644
|
+
return formatTaoDateIso({ y, m, d: Math.min(parts.d, lastDay) });
|
|
4645
|
+
}
|
|
4646
|
+
function clampTaoDateCursor(iso, min, max) {
|
|
4647
|
+
if (isTaoDateInRange(iso, min, max)) {
|
|
4648
|
+
return iso;
|
|
4649
|
+
}
|
|
4650
|
+
if (min && parseTaoDate(min) && iso < min) {
|
|
4651
|
+
return min;
|
|
4652
|
+
}
|
|
4653
|
+
if (max && parseTaoDate(max) && iso > max) {
|
|
4654
|
+
return max;
|
|
4655
|
+
}
|
|
4656
|
+
return iso;
|
|
4496
4657
|
}
|
|
4497
4658
|
function isTaoDateInRange(iso, min, max) {
|
|
4498
4659
|
if (!parseTaoDate(iso)) {
|
|
@@ -4580,15 +4741,15 @@
|
|
|
4580
4741
|
};
|
|
4581
4742
|
});
|
|
4582
4743
|
}
|
|
4583
|
-
const _hoisted_1$
|
|
4584
|
-
const _hoisted_2$
|
|
4585
|
-
const _hoisted_3$
|
|
4744
|
+
const _hoisted_1$m = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
|
|
4745
|
+
const _hoisted_2$k = { class: "tao-date__value" };
|
|
4746
|
+
const _hoisted_3$g = {
|
|
4586
4747
|
class: "tao-date__icon",
|
|
4587
4748
|
"aria-hidden": "true"
|
|
4588
4749
|
};
|
|
4589
|
-
const _hoisted_4$
|
|
4590
|
-
const _hoisted_5$
|
|
4591
|
-
const _hoisted_6$
|
|
4750
|
+
const _hoisted_4$g = ["aria-label"];
|
|
4751
|
+
const _hoisted_5$e = { class: "tao-date__header" };
|
|
4752
|
+
const _hoisted_6$b = ["aria-label"];
|
|
4592
4753
|
const _hoisted_7$9 = { "aria-hidden": "true" };
|
|
4593
4754
|
const _hoisted_8$8 = { class: "tao-date__month" };
|
|
4594
4755
|
const _hoisted_9$3 = ["aria-label"];
|
|
@@ -4604,7 +4765,7 @@
|
|
|
4604
4765
|
const _hoisted_13$1 = ["aria-label", "aria-selected", "disabled", "onClick"];
|
|
4605
4766
|
const _hoisted_14$1 = { class: "tao-date__footer" };
|
|
4606
4767
|
const _hoisted_15 = ["disabled"];
|
|
4607
|
-
const _sfc_main$
|
|
4768
|
+
const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
|
|
4608
4769
|
...{ name: "TaoDate" },
|
|
4609
4770
|
__name: "TaoDate",
|
|
4610
4771
|
props: {
|
|
@@ -4683,7 +4844,7 @@
|
|
|
4683
4844
|
if (!next) {
|
|
4684
4845
|
return;
|
|
4685
4846
|
}
|
|
4686
|
-
syncViewFrom(valueIso.value ?? todayIso.value);
|
|
4847
|
+
syncViewFrom(clampTaoDateCursor(valueIso.value ?? todayIso.value, props.min, props.max));
|
|
4687
4848
|
await vue.nextTick();
|
|
4688
4849
|
updatePosition();
|
|
4689
4850
|
(_a = panelRef.value) == null ? void 0 : _a.focus();
|
|
@@ -4712,18 +4873,13 @@
|
|
|
4712
4873
|
(_a = triggerRef.value) == null ? void 0 : _a.focus();
|
|
4713
4874
|
}
|
|
4714
4875
|
function goMonth(delta) {
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
if (!parts) {
|
|
4718
|
-
return;
|
|
4719
|
-
}
|
|
4720
|
-
viewYear.value = parts.y;
|
|
4721
|
-
viewMonth.value = parts.m;
|
|
4722
|
-
cursorIso.value = shiftTaoMonth(cursorIso.value, delta);
|
|
4876
|
+
cursorIso.value = clampTaoDateCursor(shiftTaoMonth(cursorIso.value, delta), props.min, props.max);
|
|
4877
|
+
syncViewFrom(cursorIso.value);
|
|
4723
4878
|
void vue.nextTick(updatePosition);
|
|
4724
4879
|
}
|
|
4725
4880
|
function moveCursor(days) {
|
|
4726
|
-
|
|
4881
|
+
const next = shiftTaoDate(cursorIso.value, days);
|
|
4882
|
+
cursorIso.value = isTaoDateInRange(next, props.min, props.max) ? next : clampTaoDateCursor(next, props.min, props.max);
|
|
4727
4883
|
syncViewFrom(cursorIso.value);
|
|
4728
4884
|
void vue.nextTick(updatePosition);
|
|
4729
4885
|
}
|
|
@@ -4838,8 +4994,8 @@
|
|
|
4838
4994
|
onClick: toggle,
|
|
4839
4995
|
onKeydown: onTriggerKeydown
|
|
4840
4996
|
}, [
|
|
4841
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
4842
|
-
vue.createElementVNode("span", _hoisted_3$
|
|
4997
|
+
vue.createElementVNode("span", _hoisted_2$k, vue.toDisplayString(displayLabel.value || __props.placeholder), 1),
|
|
4998
|
+
vue.createElementVNode("span", _hoisted_3$g, [
|
|
4843
4999
|
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
4844
5000
|
_cache[4] || (_cache[4] = vue.createElementVNode("svg", {
|
|
4845
5001
|
viewBox: "0 0 16 16",
|
|
@@ -4867,7 +5023,7 @@
|
|
|
4867
5023
|
], -1))
|
|
4868
5024
|
], true)
|
|
4869
5025
|
])
|
|
4870
|
-
], 42, _hoisted_1$
|
|
5026
|
+
], 42, _hoisted_1$m),
|
|
4871
5027
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
4872
5028
|
open.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
4873
5029
|
key: 0,
|
|
@@ -4881,7 +5037,7 @@
|
|
|
4881
5037
|
style: vue.normalizeStyle(panelStyle.value),
|
|
4882
5038
|
onKeydown: onPanelKeydown
|
|
4883
5039
|
}, [
|
|
4884
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
5040
|
+
vue.createElementVNode("div", _hoisted_5$e, [
|
|
4885
5041
|
vue.createElementVNode("button", {
|
|
4886
5042
|
type: "button",
|
|
4887
5043
|
class: "tao-date__nav",
|
|
@@ -4907,7 +5063,7 @@
|
|
|
4907
5063
|
], -1))
|
|
4908
5064
|
], true)
|
|
4909
5065
|
])
|
|
4910
|
-
], 8, _hoisted_6$
|
|
5066
|
+
], 8, _hoisted_6$b),
|
|
4911
5067
|
vue.createElementVNode("p", _hoisted_8$8, vue.toDisplayString(monthLabel.value), 1),
|
|
4912
5068
|
vue.createElementVNode("button", {
|
|
4913
5069
|
type: "button",
|
|
@@ -4985,22 +5141,22 @@
|
|
|
4985
5141
|
], true)
|
|
4986
5142
|
])) : vue.createCommentVNode("", true)
|
|
4987
5143
|
])
|
|
4988
|
-
], 44, _hoisted_4$
|
|
5144
|
+
], 44, _hoisted_4$g)) : vue.createCommentVNode("", true)
|
|
4989
5145
|
]))
|
|
4990
5146
|
], 2);
|
|
4991
5147
|
};
|
|
4992
5148
|
}
|
|
4993
5149
|
});
|
|
4994
|
-
const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4995
|
-
const _hoisted_1$
|
|
4996
|
-
const _hoisted_2$
|
|
4997
|
-
const _hoisted_3$
|
|
5150
|
+
const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-ebd437a8"]]);
|
|
5151
|
+
const _hoisted_1$l = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
|
|
5152
|
+
const _hoisted_2$j = { class: "tao-date-range__value" };
|
|
5153
|
+
const _hoisted_3$f = {
|
|
4998
5154
|
class: "tao-date-range__icon",
|
|
4999
5155
|
"aria-hidden": "true"
|
|
5000
5156
|
};
|
|
5001
|
-
const _hoisted_4$
|
|
5002
|
-
const _hoisted_5$
|
|
5003
|
-
const _hoisted_6$
|
|
5157
|
+
const _hoisted_4$f = ["aria-label"];
|
|
5158
|
+
const _hoisted_5$d = { class: "tao-date__header" };
|
|
5159
|
+
const _hoisted_6$a = ["aria-label"];
|
|
5004
5160
|
const _hoisted_7$8 = { "aria-hidden": "true" };
|
|
5005
5161
|
const _hoisted_8$7 = { class: "tao-date__month" };
|
|
5006
5162
|
const _hoisted_9$2 = ["aria-label"];
|
|
@@ -5012,7 +5168,7 @@
|
|
|
5012
5168
|
const _hoisted_12 = ["aria-label", "aria-selected", "disabled", "onMouseenter", "onClick"];
|
|
5013
5169
|
const _hoisted_13 = { class: "tao-date__footer" };
|
|
5014
5170
|
const _hoisted_14 = ["disabled"];
|
|
5015
|
-
const _sfc_main$
|
|
5171
|
+
const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
|
|
5016
5172
|
...{ name: "TaoDateRange" },
|
|
5017
5173
|
__name: "TaoDateRange",
|
|
5018
5174
|
props: {
|
|
@@ -5106,7 +5262,7 @@
|
|
|
5106
5262
|
}
|
|
5107
5263
|
draftStart.value = null;
|
|
5108
5264
|
hoverIso.value = null;
|
|
5109
|
-
syncViewFrom(((_a = committed.value) == null ? void 0 : _a.start) ?? todayIso.value);
|
|
5265
|
+
syncViewFrom(clampTaoDateCursor(((_a = committed.value) == null ? void 0 : _a.start) ?? todayIso.value, props.min, props.max));
|
|
5110
5266
|
await vue.nextTick();
|
|
5111
5267
|
updatePosition();
|
|
5112
5268
|
(_b = panelRef.value) == null ? void 0 : _b.focus();
|
|
@@ -5155,19 +5311,14 @@
|
|
|
5155
5311
|
}
|
|
5156
5312
|
function goMonth(delta) {
|
|
5157
5313
|
hoverIso.value = null;
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
if (!parts) {
|
|
5161
|
-
return;
|
|
5162
|
-
}
|
|
5163
|
-
viewYear.value = parts.y;
|
|
5164
|
-
viewMonth.value = parts.m;
|
|
5165
|
-
cursorIso.value = shiftTaoMonth(cursorIso.value, delta);
|
|
5314
|
+
cursorIso.value = clampTaoDateCursor(shiftTaoMonth(cursorIso.value, delta), props.min, props.max);
|
|
5315
|
+
syncViewFrom(cursorIso.value);
|
|
5166
5316
|
void vue.nextTick(updatePosition);
|
|
5167
5317
|
}
|
|
5168
5318
|
function moveCursor(days) {
|
|
5169
5319
|
hoverIso.value = null;
|
|
5170
|
-
|
|
5320
|
+
const next = shiftTaoDate(cursorIso.value, days);
|
|
5321
|
+
cursorIso.value = isTaoDateInRange(next, props.min, props.max) ? next : clampTaoDateCursor(next, props.min, props.max);
|
|
5171
5322
|
syncViewFrom(cursorIso.value);
|
|
5172
5323
|
void vue.nextTick(updatePosition);
|
|
5173
5324
|
}
|
|
@@ -5300,8 +5451,8 @@
|
|
|
5300
5451
|
onClick: toggle,
|
|
5301
5452
|
onKeydown: onTriggerKeydown
|
|
5302
5453
|
}, [
|
|
5303
|
-
vue.createElementVNode("span", _hoisted_2$
|
|
5304
|
-
vue.createElementVNode("span", _hoisted_3$
|
|
5454
|
+
vue.createElementVNode("span", _hoisted_2$j, vue.toDisplayString(displayLabel.value || __props.placeholder), 1),
|
|
5455
|
+
vue.createElementVNode("span", _hoisted_3$f, [
|
|
5305
5456
|
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
5306
5457
|
_cache[3] || (_cache[3] = vue.createElementVNode("svg", {
|
|
5307
5458
|
viewBox: "0 0 16 16",
|
|
@@ -5329,7 +5480,7 @@
|
|
|
5329
5480
|
], -1))
|
|
5330
5481
|
], true)
|
|
5331
5482
|
])
|
|
5332
|
-
], 42, _hoisted_1$
|
|
5483
|
+
], 42, _hoisted_1$l),
|
|
5333
5484
|
(vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
5334
5485
|
open.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
5335
5486
|
key: 0,
|
|
@@ -5343,7 +5494,7 @@
|
|
|
5343
5494
|
style: vue.normalizeStyle(panelStyle.value),
|
|
5344
5495
|
onKeydown: onPanelKeydown
|
|
5345
5496
|
}, [
|
|
5346
|
-
vue.createElementVNode("div", _hoisted_5$
|
|
5497
|
+
vue.createElementVNode("div", _hoisted_5$d, [
|
|
5347
5498
|
vue.createElementVNode("button", {
|
|
5348
5499
|
type: "button",
|
|
5349
5500
|
class: "tao-date__nav",
|
|
@@ -5369,7 +5520,7 @@
|
|
|
5369
5520
|
], -1))
|
|
5370
5521
|
], true)
|
|
5371
5522
|
])
|
|
5372
|
-
], 8, _hoisted_6$
|
|
5523
|
+
], 8, _hoisted_6$a),
|
|
5373
5524
|
vue.createElementVNode("p", _hoisted_8$7, vue.toDisplayString(monthLabel.value), 1),
|
|
5374
5525
|
vue.createElementVNode("button", {
|
|
5375
5526
|
type: "button",
|
|
@@ -5456,24 +5607,24 @@
|
|
|
5456
5607
|
], true)
|
|
5457
5608
|
])) : vue.createCommentVNode("", true)
|
|
5458
5609
|
])
|
|
5459
|
-
], 44, _hoisted_4$
|
|
5610
|
+
], 44, _hoisted_4$f)) : vue.createCommentVNode("", true)
|
|
5460
5611
|
]))
|
|
5461
5612
|
], 2);
|
|
5462
5613
|
};
|
|
5463
5614
|
}
|
|
5464
5615
|
});
|
|
5465
|
-
const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5466
|
-
const _hoisted_1$
|
|
5467
|
-
const _hoisted_2$
|
|
5468
|
-
const _hoisted_3$
|
|
5616
|
+
const TaoDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-aa589793"]]);
|
|
5617
|
+
const _hoisted_1$k = ["for"];
|
|
5618
|
+
const _hoisted_2$i = ["id", "checked", "disabled", "aria-checked", "aria-invalid", "aria-describedby"];
|
|
5619
|
+
const _hoisted_3$e = {
|
|
5469
5620
|
key: 0,
|
|
5470
5621
|
class: "tao-switch__label"
|
|
5471
5622
|
};
|
|
5472
|
-
const _hoisted_4$
|
|
5623
|
+
const _hoisted_4$e = {
|
|
5473
5624
|
key: 1,
|
|
5474
5625
|
class: "tao-switch__label"
|
|
5475
5626
|
};
|
|
5476
|
-
const _sfc_main$
|
|
5627
|
+
const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
|
|
5477
5628
|
...{ name: "TaoSwitch" },
|
|
5478
5629
|
__name: "TaoSwitch",
|
|
5479
5630
|
props: {
|
|
@@ -5488,6 +5639,8 @@
|
|
|
5488
5639
|
const field = vue.inject(formFieldKey, null);
|
|
5489
5640
|
const localId = vue.useId();
|
|
5490
5641
|
const controlId = vue.computed(() => (field == null ? void 0 : field.id) ?? localId);
|
|
5642
|
+
const invalid = vue.computed(() => Boolean(field == null ? void 0 : field.invalid.value));
|
|
5643
|
+
const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
|
|
5491
5644
|
function toggle() {
|
|
5492
5645
|
if (props.disabled) {
|
|
5493
5646
|
return;
|
|
@@ -5498,7 +5651,7 @@
|
|
|
5498
5651
|
}
|
|
5499
5652
|
return (_ctx, _cache) => {
|
|
5500
5653
|
return vue.openBlock(), vue.createElementBlock("label", {
|
|
5501
|
-
class: vue.normalizeClass(["tao-switch", { "tao-switch--disabled": __props.disabled, "tao-switch--on": __props.modelValue }]),
|
|
5654
|
+
class: vue.normalizeClass(["tao-switch", { "tao-switch--disabled": __props.disabled, "tao-switch--on": __props.modelValue, "tao-switch--invalid": invalid.value }]),
|
|
5502
5655
|
for: controlId.value
|
|
5503
5656
|
}, [
|
|
5504
5657
|
vue.createElementVNode("input", {
|
|
@@ -5509,34 +5662,36 @@
|
|
|
5509
5662
|
checked: __props.modelValue,
|
|
5510
5663
|
disabled: __props.disabled,
|
|
5511
5664
|
"aria-checked": __props.modelValue,
|
|
5665
|
+
"aria-invalid": invalid.value || void 0,
|
|
5666
|
+
"aria-describedby": describedBy.value,
|
|
5512
5667
|
onChange: toggle
|
|
5513
|
-
}, null, 40, _hoisted_2$
|
|
5668
|
+
}, null, 40, _hoisted_2$i),
|
|
5514
5669
|
_cache[0] || (_cache[0] = vue.createElementVNode("span", {
|
|
5515
5670
|
class: "tao-switch__track",
|
|
5516
5671
|
"aria-hidden": "true"
|
|
5517
5672
|
}, [
|
|
5518
5673
|
vue.createElementVNode("span", { class: "tao-switch__thumb" })
|
|
5519
5674
|
], -1)),
|
|
5520
|
-
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
5675
|
+
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$e, vue.toDisplayString(__props.label), 1)) : _ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$e, [
|
|
5521
5676
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5522
5677
|
])) : vue.createCommentVNode("", true)
|
|
5523
|
-
], 10, _hoisted_1$
|
|
5678
|
+
], 10, _hoisted_1$k);
|
|
5524
5679
|
};
|
|
5525
5680
|
}
|
|
5526
5681
|
});
|
|
5527
|
-
const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5682
|
+
const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-17ce5000"]]);
|
|
5528
5683
|
const radioGroupKey = Symbol("taoRadioGroup");
|
|
5529
|
-
const _hoisted_1$
|
|
5530
|
-
const _hoisted_2$
|
|
5531
|
-
const _hoisted_3$
|
|
5684
|
+
const _hoisted_1$j = ["for"];
|
|
5685
|
+
const _hoisted_2$h = ["id", "name", "value", "checked", "disabled", "aria-invalid", "aria-describedby"];
|
|
5686
|
+
const _hoisted_3$d = {
|
|
5532
5687
|
key: 0,
|
|
5533
5688
|
class: "tao-radio__label"
|
|
5534
5689
|
};
|
|
5535
|
-
const _hoisted_4$
|
|
5690
|
+
const _hoisted_4$d = {
|
|
5536
5691
|
key: 1,
|
|
5537
5692
|
class: "tao-radio__label"
|
|
5538
5693
|
};
|
|
5539
|
-
const _sfc_main$
|
|
5694
|
+
const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
5540
5695
|
...{ name: "TaoRadio" },
|
|
5541
5696
|
__name: "TaoRadio",
|
|
5542
5697
|
props: {
|
|
@@ -5551,7 +5706,11 @@
|
|
|
5551
5706
|
const props = __props;
|
|
5552
5707
|
const emit = __emit;
|
|
5553
5708
|
const group = vue.inject(radioGroupKey, null);
|
|
5709
|
+
const field = vue.inject(formFieldKey, null);
|
|
5554
5710
|
const localId = vue.useId();
|
|
5711
|
+
const controlId = vue.computed(() => group ? localId : (field == null ? void 0 : field.id) ?? localId);
|
|
5712
|
+
const invalid = vue.computed(() => Boolean(field == null ? void 0 : field.invalid.value));
|
|
5713
|
+
const describedBy = vue.computed(() => group ? void 0 : field == null ? void 0 : field.describedBy.value);
|
|
5555
5714
|
const isDisabled = vue.computed(() => props.disabled || Boolean(group == null ? void 0 : group.disabled.value));
|
|
5556
5715
|
const inputName = vue.computed(() => (group == null ? void 0 : group.name.value) ?? props.name);
|
|
5557
5716
|
const isChecked = vue.computed(() => {
|
|
@@ -5571,37 +5730,39 @@
|
|
|
5571
5730
|
}
|
|
5572
5731
|
return (_ctx, _cache) => {
|
|
5573
5732
|
return vue.openBlock(), vue.createElementBlock("label", {
|
|
5574
|
-
class: vue.normalizeClass(["tao-radio", { "tao-radio--disabled": isDisabled.value }]),
|
|
5575
|
-
for:
|
|
5733
|
+
class: vue.normalizeClass(["tao-radio", { "tao-radio--disabled": isDisabled.value, "tao-radio--invalid": invalid.value && !vue.unref(group) }]),
|
|
5734
|
+
for: controlId.value
|
|
5576
5735
|
}, [
|
|
5577
5736
|
vue.createElementVNode("input", {
|
|
5578
|
-
id:
|
|
5737
|
+
id: controlId.value,
|
|
5579
5738
|
class: "tao-radio__input",
|
|
5580
5739
|
type: "radio",
|
|
5581
5740
|
name: inputName.value,
|
|
5582
5741
|
value: String(__props.value),
|
|
5583
5742
|
checked: isChecked.value,
|
|
5584
5743
|
disabled: isDisabled.value,
|
|
5744
|
+
"aria-invalid": !vue.unref(group) && invalid.value || void 0,
|
|
5745
|
+
"aria-describedby": describedBy.value,
|
|
5585
5746
|
onChange
|
|
5586
|
-
}, null, 40, _hoisted_2$
|
|
5747
|
+
}, null, 40, _hoisted_2$h),
|
|
5587
5748
|
_cache[0] || (_cache[0] = vue.createElementVNode("span", {
|
|
5588
5749
|
class: "tao-radio__dot",
|
|
5589
5750
|
"aria-hidden": "true"
|
|
5590
5751
|
}, null, -1)),
|
|
5591
|
-
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
5752
|
+
__props.label ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$d, vue.toDisplayString(__props.label), 1)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$d, [
|
|
5592
5753
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5593
5754
|
]))
|
|
5594
|
-
], 10, _hoisted_1$
|
|
5755
|
+
], 10, _hoisted_1$j);
|
|
5595
5756
|
};
|
|
5596
5757
|
}
|
|
5597
5758
|
});
|
|
5598
|
-
const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5599
|
-
const _hoisted_1$
|
|
5600
|
-
const _hoisted_2$
|
|
5759
|
+
const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-e79d1fb6"]]);
|
|
5760
|
+
const _hoisted_1$i = ["id", "disabled", "aria-describedby", "aria-invalid", "aria-labelledby"];
|
|
5761
|
+
const _hoisted_2$g = {
|
|
5601
5762
|
key: 0,
|
|
5602
5763
|
class: "tao-radio-group__legend"
|
|
5603
5764
|
};
|
|
5604
|
-
const _sfc_main$
|
|
5765
|
+
const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
5605
5766
|
...{ name: "TaoRadioGroup" },
|
|
5606
5767
|
__name: "TaoRadioGroup",
|
|
5607
5768
|
props: {
|
|
@@ -5615,10 +5776,14 @@
|
|
|
5615
5776
|
setup(__props, { emit: __emit }) {
|
|
5616
5777
|
const props = __props;
|
|
5617
5778
|
const emit = __emit;
|
|
5779
|
+
const field = vue.inject(formFieldKey, null);
|
|
5618
5780
|
const autoName = vue.useId();
|
|
5619
5781
|
const groupName = vue.computed(() => props.name || autoName);
|
|
5620
5782
|
const model = vue.computed(() => props.modelValue);
|
|
5621
5783
|
const groupDisabled = vue.computed(() => props.disabled);
|
|
5784
|
+
const invalid = vue.computed(() => Boolean(field == null ? void 0 : field.invalid.value));
|
|
5785
|
+
const describedBy = vue.computed(() => field == null ? void 0 : field.describedBy.value);
|
|
5786
|
+
const labelledBy = vue.computed(() => props.legend || !field ? void 0 : `${field.id}-label`);
|
|
5622
5787
|
function setValue(value) {
|
|
5623
5788
|
emit("update:modelValue", value);
|
|
5624
5789
|
emit("change", value);
|
|
@@ -5630,24 +5795,29 @@
|
|
|
5630
5795
|
setValue
|
|
5631
5796
|
});
|
|
5632
5797
|
return (_ctx, _cache) => {
|
|
5798
|
+
var _a;
|
|
5633
5799
|
return vue.openBlock(), vue.createElementBlock("fieldset", {
|
|
5634
|
-
|
|
5635
|
-
|
|
5800
|
+
id: (_a = vue.unref(field)) == null ? void 0 : _a.id,
|
|
5801
|
+
class: vue.normalizeClass(["tao-radio-group", [`tao-radio-group--${__props.direction}`, { "tao-radio-group--invalid": invalid.value }]]),
|
|
5802
|
+
disabled: __props.disabled,
|
|
5803
|
+
"aria-describedby": describedBy.value,
|
|
5804
|
+
"aria-invalid": invalid.value || void 0,
|
|
5805
|
+
"aria-labelledby": labelledBy.value
|
|
5636
5806
|
}, [
|
|
5637
|
-
__props.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_2$
|
|
5807
|
+
__props.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_2$g, vue.toDisplayString(__props.legend), 1)) : vue.createCommentVNode("", true),
|
|
5638
5808
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5639
|
-
], 10, _hoisted_1$
|
|
5809
|
+
], 10, _hoisted_1$i);
|
|
5640
5810
|
};
|
|
5641
5811
|
}
|
|
5642
5812
|
});
|
|
5643
|
-
const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5813
|
+
const TaoRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-6f6fa977"]]);
|
|
5644
5814
|
const segmentedKey = Symbol("taoSegmented");
|
|
5645
|
-
const _hoisted_1$
|
|
5646
|
-
const _hoisted_2$
|
|
5815
|
+
const _hoisted_1$h = ["disabled", "aria-describedby", "aria-invalid", "aria-labelledby", "id"];
|
|
5816
|
+
const _hoisted_2$f = {
|
|
5647
5817
|
key: 0,
|
|
5648
5818
|
class: "tao-segmented__legend"
|
|
5649
5819
|
};
|
|
5650
|
-
const _sfc_main$
|
|
5820
|
+
const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
5651
5821
|
...{ name: "TaoSegmented" },
|
|
5652
5822
|
__name: "TaoSegmented",
|
|
5653
5823
|
props: {
|
|
@@ -5742,6 +5912,7 @@
|
|
|
5742
5912
|
mutationObserver = null;
|
|
5743
5913
|
});
|
|
5744
5914
|
return (_ctx, _cache) => {
|
|
5915
|
+
var _a;
|
|
5745
5916
|
return vue.openBlock(), vue.createElementBlock("fieldset", {
|
|
5746
5917
|
class: vue.normalizeClass(["tao-segmented", [
|
|
5747
5918
|
`tao-segmented--${__props.size}`,
|
|
@@ -5753,9 +5924,11 @@
|
|
|
5753
5924
|
]]),
|
|
5754
5925
|
disabled: __props.disabled,
|
|
5755
5926
|
"aria-describedby": describedBy.value,
|
|
5756
|
-
"aria-invalid": invalid.value || void 0
|
|
5927
|
+
"aria-invalid": invalid.value || void 0,
|
|
5928
|
+
"aria-labelledby": __props.legend ? void 0 : vue.unref(field) ? `${vue.unref(field).id}-label` : void 0,
|
|
5929
|
+
id: (_a = vue.unref(field)) == null ? void 0 : _a.id
|
|
5757
5930
|
}, [
|
|
5758
|
-
__props.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_2$
|
|
5931
|
+
__props.legend ? (vue.openBlock(), vue.createElementBlock("legend", _hoisted_2$f, vue.toDisplayString(__props.legend), 1)) : vue.createCommentVNode("", true),
|
|
5759
5932
|
vue.createElementVNode("div", {
|
|
5760
5933
|
ref_key: "trackRef",
|
|
5761
5934
|
ref: trackRef,
|
|
@@ -5768,24 +5941,24 @@
|
|
|
5768
5941
|
}, null, 4),
|
|
5769
5942
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5770
5943
|
], 512)
|
|
5771
|
-
], 10, _hoisted_1$
|
|
5944
|
+
], 10, _hoisted_1$h);
|
|
5772
5945
|
};
|
|
5773
5946
|
}
|
|
5774
5947
|
});
|
|
5775
|
-
const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5776
|
-
const _hoisted_1$
|
|
5777
|
-
const _hoisted_2$
|
|
5778
|
-
const _hoisted_3$
|
|
5779
|
-
const _hoisted_4$
|
|
5948
|
+
const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-af757a32"]]);
|
|
5949
|
+
const _hoisted_1$g = ["for"];
|
|
5950
|
+
const _hoisted_2$e = ["id", "name", "value", "checked", "disabled", "aria-label"];
|
|
5951
|
+
const _hoisted_3$c = { class: "tao-segmented-option__face" };
|
|
5952
|
+
const _hoisted_4$c = {
|
|
5780
5953
|
key: 0,
|
|
5781
5954
|
class: "tao-segmented-option__icon",
|
|
5782
5955
|
"aria-hidden": "true"
|
|
5783
5956
|
};
|
|
5784
|
-
const _hoisted_5$
|
|
5957
|
+
const _hoisted_5$c = {
|
|
5785
5958
|
key: 1,
|
|
5786
5959
|
class: "tao-segmented-option__label"
|
|
5787
5960
|
};
|
|
5788
|
-
const _hoisted_6$
|
|
5961
|
+
const _hoisted_6$9 = {
|
|
5789
5962
|
key: 2,
|
|
5790
5963
|
class: "tao-segmented-option__sr"
|
|
5791
5964
|
};
|
|
@@ -5793,7 +5966,7 @@
|
|
|
5793
5966
|
key: 3,
|
|
5794
5967
|
class: "tao-segmented-option__count"
|
|
5795
5968
|
};
|
|
5796
|
-
const _sfc_main$
|
|
5969
|
+
const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
|
|
5797
5970
|
...{ name: "TaoSegmentedOption" },
|
|
5798
5971
|
__name: "TaoSegmentedOption",
|
|
5799
5972
|
props: {
|
|
@@ -5867,38 +6040,38 @@
|
|
|
5867
6040
|
disabled: isDisabled.value,
|
|
5868
6041
|
"aria-label": __props.ariaLabel,
|
|
5869
6042
|
onChange
|
|
5870
|
-
}, null, 40, _hoisted_2$
|
|
5871
|
-
vue.createElementVNode("span", _hoisted_3$
|
|
5872
|
-
__props.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$
|
|
6043
|
+
}, null, 40, _hoisted_2$e),
|
|
6044
|
+
vue.createElementVNode("span", _hoisted_3$c, [
|
|
6045
|
+
__props.icon || _ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$c, [
|
|
5873
6046
|
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
5874
6047
|
vue.createTextVNode(vue.toDisplayString(__props.icon), 1)
|
|
5875
6048
|
], true)
|
|
5876
6049
|
])) : vue.createCommentVNode("", true),
|
|
5877
|
-
hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$
|
|
6050
|
+
hasLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$c, [
|
|
5878
6051
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
5879
6052
|
vue.createTextVNode(vue.toDisplayString(__props.label), 1)
|
|
5880
6053
|
], true)
|
|
5881
|
-
])) : __props.ariaLabel ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$
|
|
6054
|
+
])) : __props.ariaLabel ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$9, vue.toDisplayString(__props.ariaLabel), 1)) : vue.createCommentVNode("", true),
|
|
5882
6055
|
countLabel.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$7, vue.toDisplayString(countLabel.value), 1)) : vue.createCommentVNode("", true)
|
|
5883
6056
|
])
|
|
5884
|
-
], 10, _hoisted_1$
|
|
6057
|
+
], 10, _hoisted_1$g);
|
|
5885
6058
|
};
|
|
5886
6059
|
}
|
|
5887
6060
|
});
|
|
5888
|
-
const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5889
|
-
const _hoisted_1$
|
|
5890
|
-
const _hoisted_2$
|
|
5891
|
-
const _hoisted_3$
|
|
6061
|
+
const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-1a9357a1"]]);
|
|
6062
|
+
const _hoisted_1$f = ["role", "aria-live"];
|
|
6063
|
+
const _hoisted_2$d = { class: "tao-alert__body" };
|
|
6064
|
+
const _hoisted_3$b = {
|
|
5892
6065
|
key: 0,
|
|
5893
6066
|
class: "tao-alert__title"
|
|
5894
6067
|
};
|
|
5895
|
-
const _hoisted_4$
|
|
6068
|
+
const _hoisted_4$b = {
|
|
5896
6069
|
key: 1,
|
|
5897
6070
|
class: "tao-alert__message"
|
|
5898
6071
|
};
|
|
5899
|
-
const _hoisted_5$
|
|
5900
|
-
const _hoisted_6$
|
|
5901
|
-
const _sfc_main$
|
|
6072
|
+
const _hoisted_5$b = ["aria-label"];
|
|
6073
|
+
const _hoisted_6$8 = { "aria-hidden": "true" };
|
|
6074
|
+
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
5902
6075
|
...{ name: "TaoAlert" },
|
|
5903
6076
|
__name: "TaoAlert",
|
|
5904
6077
|
props: {
|
|
@@ -5919,9 +6092,9 @@
|
|
|
5919
6092
|
role: tone.value === "error" ? "alert" : "status",
|
|
5920
6093
|
"aria-live": live.value
|
|
5921
6094
|
}, [
|
|
5922
|
-
vue.createElementVNode("div", _hoisted_2$
|
|
5923
|
-
__props.title ? (vue.openBlock(), vue.createElementBlock("strong", _hoisted_3$
|
|
5924
|
-
_ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_4$
|
|
6095
|
+
vue.createElementVNode("div", _hoisted_2$d, [
|
|
6096
|
+
__props.title ? (vue.openBlock(), vue.createElementBlock("strong", _hoisted_3$b, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true),
|
|
6097
|
+
_ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_4$b, [
|
|
5925
6098
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5926
6099
|
])) : vue.createCommentVNode("", true)
|
|
5927
6100
|
]),
|
|
@@ -5932,30 +6105,30 @@
|
|
|
5932
6105
|
"aria-label": __props.closeLabel,
|
|
5933
6106
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
|
|
5934
6107
|
}, [
|
|
5935
|
-
vue.createElementVNode("span", _hoisted_6$
|
|
6108
|
+
vue.createElementVNode("span", _hoisted_6$8, [
|
|
5936
6109
|
vue.renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
5937
6110
|
_cache[1] || (_cache[1] = vue.createTextVNode("×", -1))
|
|
5938
6111
|
], true)
|
|
5939
6112
|
])
|
|
5940
|
-
], 8, _hoisted_5$
|
|
5941
|
-
], 10, _hoisted_1$
|
|
6113
|
+
], 8, _hoisted_5$b)) : vue.createCommentVNode("", true)
|
|
6114
|
+
], 10, _hoisted_1$f);
|
|
5942
6115
|
};
|
|
5943
6116
|
}
|
|
5944
6117
|
});
|
|
5945
|
-
const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
5946
|
-
const _hoisted_1$
|
|
5947
|
-
const _hoisted_2$
|
|
5948
|
-
const _hoisted_3$
|
|
5949
|
-
const _hoisted_4$
|
|
5950
|
-
const _hoisted_5$
|
|
5951
|
-
const _hoisted_6$
|
|
6118
|
+
const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-1a1dbef3"]]);
|
|
6119
|
+
const _hoisted_1$e = { key: 0 };
|
|
6120
|
+
const _hoisted_2$c = ["aria-sort"];
|
|
6121
|
+
const _hoisted_3$a = ["onClick"];
|
|
6122
|
+
const _hoisted_4$a = { key: 1 };
|
|
6123
|
+
const _hoisted_5$a = { key: 0 };
|
|
6124
|
+
const _hoisted_6$7 = ["colspan"];
|
|
5952
6125
|
const _hoisted_7$6 = ["onClick"];
|
|
5953
6126
|
const _hoisted_8$6 = {
|
|
5954
6127
|
key: 0,
|
|
5955
6128
|
class: "tao-table__loading",
|
|
5956
6129
|
"aria-busy": "true"
|
|
5957
6130
|
};
|
|
5958
|
-
const _sfc_main$
|
|
6131
|
+
const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
5959
6132
|
...{ name: "TaoTable" },
|
|
5960
6133
|
__name: "TaoTable",
|
|
5961
6134
|
props: {
|
|
@@ -6036,7 +6209,7 @@
|
|
|
6036
6209
|
"tao-table--sticky": __props.sticky
|
|
6037
6210
|
}])
|
|
6038
6211
|
}, [
|
|
6039
|
-
__props.caption ? (vue.openBlock(), vue.createElementBlock("caption", _hoisted_1$
|
|
6212
|
+
__props.caption ? (vue.openBlock(), vue.createElementBlock("caption", _hoisted_1$e, vue.toDisplayString(__props.caption), 1)) : vue.createCommentVNode("", true),
|
|
6040
6213
|
vue.createElementVNode("thead", null, [
|
|
6041
6214
|
vue.createElementVNode("tr", null, [
|
|
6042
6215
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.columns, (column) => {
|
|
@@ -6060,13 +6233,13 @@
|
|
|
6060
6233
|
}]),
|
|
6061
6234
|
"aria-hidden": "true"
|
|
6062
6235
|
}, null, 2)
|
|
6063
|
-
], 8, _hoisted_3$
|
|
6064
|
-
], 12, _hoisted_2$
|
|
6236
|
+
], 8, _hoisted_3$a)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$a, vue.toDisplayString(column.label), 1))
|
|
6237
|
+
], 12, _hoisted_2$c);
|
|
6065
6238
|
}), 128))
|
|
6066
6239
|
])
|
|
6067
6240
|
]),
|
|
6068
6241
|
vue.createElementVNode("tbody", null, [
|
|
6069
|
-
isEmpty.value ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_5$
|
|
6242
|
+
isEmpty.value ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_5$a, [
|
|
6070
6243
|
vue.createElementVNode("td", {
|
|
6071
6244
|
class: "tao-table__empty",
|
|
6072
6245
|
colspan: colCount.value
|
|
@@ -6074,7 +6247,7 @@
|
|
|
6074
6247
|
vue.renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
6075
6248
|
vue.createTextVNode(vue.toDisplayString(__props.emptyText), 1)
|
|
6076
6249
|
], true)
|
|
6077
|
-
], 8, _hoisted_6$
|
|
6250
|
+
], 8, _hoisted_6$7)
|
|
6078
6251
|
])) : vue.createCommentVNode("", true),
|
|
6079
6252
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.rows, (row, index) => {
|
|
6080
6253
|
return vue.openBlock(), vue.createElementBlock("tr", {
|
|
@@ -6116,7 +6289,7 @@
|
|
|
6116
6289
|
};
|
|
6117
6290
|
}
|
|
6118
6291
|
});
|
|
6119
|
-
const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6292
|
+
const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-5ce586b8"]]);
|
|
6120
6293
|
function buildPaginationItems(page, pageCount, siblingCount = 1) {
|
|
6121
6294
|
if (pageCount <= 0) {
|
|
6122
6295
|
return [];
|
|
@@ -6141,15 +6314,15 @@
|
|
|
6141
6314
|
items.push({ type: "page", page: pageCount });
|
|
6142
6315
|
return items;
|
|
6143
6316
|
}
|
|
6144
|
-
const _hoisted_1$
|
|
6145
|
-
const _hoisted_2$
|
|
6317
|
+
const _hoisted_1$d = ["aria-label"];
|
|
6318
|
+
const _hoisted_2$b = {
|
|
6146
6319
|
key: 0,
|
|
6147
6320
|
class: "tao-pagination__total"
|
|
6148
6321
|
};
|
|
6149
|
-
const _hoisted_3$
|
|
6150
|
-
const _hoisted_4$
|
|
6151
|
-
const _hoisted_5$
|
|
6152
|
-
const _hoisted_6$
|
|
6322
|
+
const _hoisted_3$9 = { class: "tao-pagination__pages" };
|
|
6323
|
+
const _hoisted_4$9 = ["aria-label", "disabled"];
|
|
6324
|
+
const _hoisted_5$9 = { "aria-hidden": "true" };
|
|
6325
|
+
const _hoisted_6$6 = ["aria-label", "disabled", "onClick"];
|
|
6153
6326
|
const _hoisted_7$5 = {
|
|
6154
6327
|
key: 1,
|
|
6155
6328
|
class: "tao-pagination__ellipsis",
|
|
@@ -6158,7 +6331,7 @@
|
|
|
6158
6331
|
const _hoisted_8$5 = ["aria-current", "aria-label", "disabled", "onClick"];
|
|
6159
6332
|
const _hoisted_9$1 = ["aria-label", "disabled"];
|
|
6160
6333
|
const _hoisted_10$1 = { "aria-hidden": "true" };
|
|
6161
|
-
const _sfc_main$
|
|
6334
|
+
const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
|
|
6162
6335
|
...{ name: "TaoPagination" },
|
|
6163
6336
|
__name: "TaoPagination",
|
|
6164
6337
|
props: {
|
|
@@ -6186,11 +6359,15 @@
|
|
|
6186
6359
|
const items = vue.computed(() => buildPaginationItems(current.value, pageCount.value, props.siblingCount));
|
|
6187
6360
|
const from = vue.computed(() => props.total === 0 ? 0 : (current.value - 1) * props.pageSize + 1);
|
|
6188
6361
|
const to = vue.computed(() => Math.min(current.value * props.pageSize, props.total));
|
|
6189
|
-
vue.watch(
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6362
|
+
vue.watch(
|
|
6363
|
+
() => [props.page, pageCount.value],
|
|
6364
|
+
([page, count]) => {
|
|
6365
|
+
if (page > count || page < 1) {
|
|
6366
|
+
goTo(page);
|
|
6367
|
+
}
|
|
6368
|
+
},
|
|
6369
|
+
{ immediate: true }
|
|
6370
|
+
);
|
|
6194
6371
|
function goTo(next) {
|
|
6195
6372
|
if (props.disabled) {
|
|
6196
6373
|
return;
|
|
@@ -6207,7 +6384,7 @@
|
|
|
6207
6384
|
class: vue.normalizeClass(["tao-pagination", `tao-pagination--${__props.size}`]),
|
|
6208
6385
|
"aria-label": __props.ariaLabel
|
|
6209
6386
|
}, [
|
|
6210
|
-
__props.showTotal ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_2$
|
|
6387
|
+
__props.showTotal ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_2$b, [
|
|
6211
6388
|
vue.renderSlot(_ctx.$slots, "total", {
|
|
6212
6389
|
from: from.value,
|
|
6213
6390
|
to: to.value,
|
|
@@ -6220,7 +6397,7 @@
|
|
|
6220
6397
|
], 64))
|
|
6221
6398
|
], true)
|
|
6222
6399
|
])) : vue.createCommentVNode("", true),
|
|
6223
|
-
vue.createElementVNode("div", _hoisted_3$
|
|
6400
|
+
vue.createElementVNode("div", _hoisted_3$9, [
|
|
6224
6401
|
vue.createElementVNode("button", {
|
|
6225
6402
|
type: "button",
|
|
6226
6403
|
class: "tao-pagination__btn",
|
|
@@ -6228,12 +6405,12 @@
|
|
|
6228
6405
|
disabled: __props.disabled || current.value <= 1,
|
|
6229
6406
|
onClick: _cache[0] || (_cache[0] = ($event) => goTo(current.value - 1))
|
|
6230
6407
|
}, [
|
|
6231
|
-
vue.createElementVNode("span", _hoisted_5$
|
|
6408
|
+
vue.createElementVNode("span", _hoisted_5$9, [
|
|
6232
6409
|
vue.renderSlot(_ctx.$slots, "prev-icon", {}, () => [
|
|
6233
6410
|
_cache[2] || (_cache[2] = vue.createTextVNode("‹", -1))
|
|
6234
6411
|
], true)
|
|
6235
6412
|
])
|
|
6236
|
-
], 8, _hoisted_4$
|
|
6413
|
+
], 8, _hoisted_4$9),
|
|
6237
6414
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(items.value, (item) => {
|
|
6238
6415
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
6239
6416
|
key: item.type === "page" ? item.page : item.id
|
|
@@ -6245,7 +6422,7 @@
|
|
|
6245
6422
|
"aria-label": item.id === "left" ? __props.jumpPrevLabel.replace("{n}", String(__props.jump)) : __props.jumpNextLabel.replace("{n}", String(__props.jump)),
|
|
6246
6423
|
disabled: __props.disabled,
|
|
6247
6424
|
onClick: ($event) => goTo(item.id === "left" ? current.value - __props.jump : current.value + __props.jump)
|
|
6248
|
-
}, " … ", 8, _hoisted_6$
|
|
6425
|
+
}, " … ", 8, _hoisted_6$6)) : item.type === "ellipsis" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$5, "…")) : (vue.openBlock(), vue.createElementBlock("button", {
|
|
6249
6426
|
key: 2,
|
|
6250
6427
|
type: "button",
|
|
6251
6428
|
class: vue.normalizeClass(["tao-pagination__btn", { "tao-pagination__btn--current": item.page === current.value }]),
|
|
@@ -6270,29 +6447,29 @@
|
|
|
6270
6447
|
])
|
|
6271
6448
|
], 8, _hoisted_9$1)
|
|
6272
6449
|
])
|
|
6273
|
-
], 10, _hoisted_1$
|
|
6450
|
+
], 10, _hoisted_1$d);
|
|
6274
6451
|
};
|
|
6275
6452
|
}
|
|
6276
6453
|
});
|
|
6277
|
-
const TaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6278
|
-
const _hoisted_1$
|
|
6279
|
-
const _hoisted_2$
|
|
6454
|
+
const TaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-37f3d381"]]);
|
|
6455
|
+
const _hoisted_1$c = { class: "tao-empty" };
|
|
6456
|
+
const _hoisted_2$a = {
|
|
6280
6457
|
key: 0,
|
|
6281
6458
|
class: "tao-empty__icon"
|
|
6282
6459
|
};
|
|
6283
|
-
const _hoisted_3$
|
|
6460
|
+
const _hoisted_3$8 = {
|
|
6284
6461
|
key: 1,
|
|
6285
6462
|
class: "tao-empty__title"
|
|
6286
6463
|
};
|
|
6287
|
-
const _hoisted_4$
|
|
6464
|
+
const _hoisted_4$8 = {
|
|
6288
6465
|
key: 2,
|
|
6289
6466
|
class: "tao-empty__text"
|
|
6290
6467
|
};
|
|
6291
|
-
const _hoisted_5$
|
|
6468
|
+
const _hoisted_5$8 = {
|
|
6292
6469
|
key: 3,
|
|
6293
6470
|
class: "tao-empty__action"
|
|
6294
6471
|
};
|
|
6295
|
-
const _sfc_main$
|
|
6472
|
+
const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
|
|
6296
6473
|
...{ name: "TaoEmpty" },
|
|
6297
6474
|
__name: "TaoEmpty",
|
|
6298
6475
|
props: {
|
|
@@ -6300,22 +6477,189 @@
|
|
|
6300
6477
|
},
|
|
6301
6478
|
setup(__props) {
|
|
6302
6479
|
return (_ctx, _cache) => {
|
|
6303
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
6304
|
-
_ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
6480
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
|
|
6481
|
+
_ctx.$slots.icon ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$a, [
|
|
6305
6482
|
vue.renderSlot(_ctx.$slots, "icon", {}, void 0, true)
|
|
6306
6483
|
])) : vue.createCommentVNode("", true),
|
|
6307
|
-
__props.title ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3$
|
|
6308
|
-
_ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_4$
|
|
6484
|
+
__props.title ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3$8, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true),
|
|
6485
|
+
_ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_4$8, [
|
|
6309
6486
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
6310
6487
|
])) : vue.createCommentVNode("", true),
|
|
6311
|
-
_ctx.$slots.action ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$
|
|
6488
|
+
_ctx.$slots.action ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$8, [
|
|
6312
6489
|
vue.renderSlot(_ctx.$slots, "action", {}, void 0, true)
|
|
6313
6490
|
])) : vue.createCommentVNode("", true)
|
|
6314
6491
|
]);
|
|
6315
6492
|
};
|
|
6316
6493
|
}
|
|
6317
6494
|
});
|
|
6318
|
-
const TaoEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
6495
|
+
const TaoEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-8056884d"]]);
|
|
6496
|
+
const taoListKey = Symbol("taoList");
|
|
6497
|
+
const _hoisted_1$b = ["aria-label"];
|
|
6498
|
+
const _hoisted_2$9 = {
|
|
6499
|
+
key: 0,
|
|
6500
|
+
class: "tao-list__empty"
|
|
6501
|
+
};
|
|
6502
|
+
const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
6503
|
+
...{ name: "TaoList" },
|
|
6504
|
+
__name: "TaoList",
|
|
6505
|
+
props: {
|
|
6506
|
+
size: { default: "medium" },
|
|
6507
|
+
bordered: { type: Boolean, default: true },
|
|
6508
|
+
divided: { type: Boolean, default: true },
|
|
6509
|
+
maxHeight: {},
|
|
6510
|
+
empty: { type: Boolean, default: false },
|
|
6511
|
+
ariaLabel: { default: "" }
|
|
6512
|
+
},
|
|
6513
|
+
setup(__props) {
|
|
6514
|
+
const props = __props;
|
|
6515
|
+
const size = vue.computed(() => props.size);
|
|
6516
|
+
vue.provide(taoListKey, { size });
|
|
6517
|
+
const listStyle = vue.computed(() => {
|
|
6518
|
+
if (props.maxHeight === void 0 || props.maxHeight === "") {
|
|
6519
|
+
return void 0;
|
|
6520
|
+
}
|
|
6521
|
+
const value = typeof props.maxHeight === "number" ? `${props.maxHeight}px` : props.maxHeight;
|
|
6522
|
+
return { maxHeight: value };
|
|
6523
|
+
});
|
|
6524
|
+
return (_ctx, _cache) => {
|
|
6525
|
+
return vue.openBlock(), vue.createElementBlock("ul", {
|
|
6526
|
+
class: vue.normalizeClass(["tao-list", [
|
|
6527
|
+
`tao-list--${size.value}`,
|
|
6528
|
+
{
|
|
6529
|
+
"tao-list--bordered": __props.bordered,
|
|
6530
|
+
"tao-list--divided": __props.divided,
|
|
6531
|
+
"tao-list--plain": !__props.bordered,
|
|
6532
|
+
"tao-list--empty": __props.empty,
|
|
6533
|
+
"tao-list--scroll": Boolean(__props.maxHeight)
|
|
6534
|
+
}
|
|
6535
|
+
]]),
|
|
6536
|
+
style: vue.normalizeStyle(listStyle.value),
|
|
6537
|
+
"aria-label": __props.ariaLabel || void 0
|
|
6538
|
+
}, [
|
|
6539
|
+
__props.empty ? (vue.openBlock(), vue.createElementBlock("li", _hoisted_2$9, [
|
|
6540
|
+
vue.renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
6541
|
+
_cache[0] || (_cache[0] = vue.createTextVNode("Ничего нет", -1))
|
|
6542
|
+
], true)
|
|
6543
|
+
])) : vue.renderSlot(_ctx.$slots, "default", {}, void 0, true, 1)
|
|
6544
|
+
], 14, _hoisted_1$b);
|
|
6545
|
+
};
|
|
6546
|
+
}
|
|
6547
|
+
});
|
|
6548
|
+
const TaoList = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-798c83a3"]]);
|
|
6549
|
+
const _hoisted_1$a = ["aria-current", "aria-disabled"];
|
|
6550
|
+
const _hoisted_2$8 = {
|
|
6551
|
+
key: 0,
|
|
6552
|
+
class: "tao-list-item__prefix"
|
|
6553
|
+
};
|
|
6554
|
+
const _hoisted_3$7 = { class: "tao-list-item__text" };
|
|
6555
|
+
const _hoisted_4$7 = { class: "tao-list-item__title" };
|
|
6556
|
+
const _hoisted_5$7 = {
|
|
6557
|
+
key: 0,
|
|
6558
|
+
class: "tao-list-item__description"
|
|
6559
|
+
};
|
|
6560
|
+
const _hoisted_6$5 = {
|
|
6561
|
+
key: 1,
|
|
6562
|
+
class: "tao-list-item__suffix"
|
|
6563
|
+
};
|
|
6564
|
+
const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
6565
|
+
...{ name: "TaoListItem" },
|
|
6566
|
+
__name: "TaoListItem",
|
|
6567
|
+
props: {
|
|
6568
|
+
title: { default: "" },
|
|
6569
|
+
description: { default: "" },
|
|
6570
|
+
selected: { type: Boolean, default: false },
|
|
6571
|
+
disabled: { type: Boolean, default: false },
|
|
6572
|
+
active: { type: Boolean, default: false },
|
|
6573
|
+
clickable: { type: Boolean, default: false },
|
|
6574
|
+
size: {},
|
|
6575
|
+
actionAlways: { type: Boolean, default: false }
|
|
6576
|
+
},
|
|
6577
|
+
emits: ["click"],
|
|
6578
|
+
setup(__props, { emit: __emit }) {
|
|
6579
|
+
const props = __props;
|
|
6580
|
+
const emit = __emit;
|
|
6581
|
+
const slots = vue.useSlots();
|
|
6582
|
+
const list = vue.inject(taoListKey, null);
|
|
6583
|
+
const sizeClass = vue.computed(() => {
|
|
6584
|
+
const size = props.size ?? (list == null ? void 0 : list.size.value) ?? "medium";
|
|
6585
|
+
if (size === "small") {
|
|
6586
|
+
return "s";
|
|
6587
|
+
}
|
|
6588
|
+
if (size === "large") {
|
|
6589
|
+
return "l";
|
|
6590
|
+
}
|
|
6591
|
+
return "m";
|
|
6592
|
+
});
|
|
6593
|
+
const hasAction = vue.computed(() => Boolean(slots.action));
|
|
6594
|
+
const hasPrefix = vue.computed(() => Boolean(slots.prefix));
|
|
6595
|
+
const hasSuffix = vue.computed(() => Boolean(slots.suffix));
|
|
6596
|
+
const hasDescription = vue.computed(() => Boolean(props.description || slots.description));
|
|
6597
|
+
function onHitClick(event) {
|
|
6598
|
+
if (props.disabled || !props.clickable) {
|
|
6599
|
+
return;
|
|
6600
|
+
}
|
|
6601
|
+
emit("click", event);
|
|
6602
|
+
}
|
|
6603
|
+
return (_ctx, _cache) => {
|
|
6604
|
+
return vue.openBlock(), vue.createElementBlock("li", {
|
|
6605
|
+
class: vue.normalizeClass(["tao-list-item", [
|
|
6606
|
+
`tao-list-item--${sizeClass.value}`,
|
|
6607
|
+
{
|
|
6608
|
+
"tao-list-item--selected": __props.selected,
|
|
6609
|
+
"tao-list-item--disabled": __props.disabled,
|
|
6610
|
+
"tao-list-item--active": __props.active,
|
|
6611
|
+
"tao-list-item--clickable": __props.clickable,
|
|
6612
|
+
"tao-list-item--has-action": hasAction.value,
|
|
6613
|
+
"tao-list-item--action-always": __props.actionAlways
|
|
6614
|
+
}
|
|
6615
|
+
]]),
|
|
6616
|
+
"aria-current": !__props.clickable && __props.selected ? "true" : void 0,
|
|
6617
|
+
"aria-disabled": __props.disabled || void 0
|
|
6618
|
+
}, [
|
|
6619
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.clickable ? "button" : "div"), {
|
|
6620
|
+
class: "tao-list-item__hit",
|
|
6621
|
+
type: __props.clickable ? "button" : void 0,
|
|
6622
|
+
disabled: __props.clickable ? __props.disabled : void 0,
|
|
6623
|
+
"aria-current": __props.clickable && __props.selected ? "true" : void 0,
|
|
6624
|
+
onClick: onHitClick
|
|
6625
|
+
}, {
|
|
6626
|
+
default: vue.withCtx(() => [
|
|
6627
|
+
hasPrefix.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$8, [
|
|
6628
|
+
vue.renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
6629
|
+
])) : vue.createCommentVNode("", true),
|
|
6630
|
+
vue.createElementVNode("span", _hoisted_3$7, [
|
|
6631
|
+
vue.createElementVNode("span", _hoisted_4$7, [
|
|
6632
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
6633
|
+
vue.createTextVNode(vue.toDisplayString(__props.title), 1)
|
|
6634
|
+
], true)
|
|
6635
|
+
]),
|
|
6636
|
+
hasDescription.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$7, [
|
|
6637
|
+
vue.renderSlot(_ctx.$slots, "description", {}, () => [
|
|
6638
|
+
vue.createTextVNode(vue.toDisplayString(__props.description), 1)
|
|
6639
|
+
], true)
|
|
6640
|
+
])) : vue.createCommentVNode("", true)
|
|
6641
|
+
]),
|
|
6642
|
+
hasSuffix.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$5, [
|
|
6643
|
+
vue.renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
|
|
6644
|
+
])) : vue.createCommentVNode("", true)
|
|
6645
|
+
]),
|
|
6646
|
+
_: 3
|
|
6647
|
+
}, 8, ["type", "disabled", "aria-current"])),
|
|
6648
|
+
hasAction.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
6649
|
+
key: 0,
|
|
6650
|
+
class: "tao-list-item__action",
|
|
6651
|
+
onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
6652
|
+
}, ["stop"])),
|
|
6653
|
+
onKeydown: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
|
6654
|
+
}, ["stop"]))
|
|
6655
|
+
}, [
|
|
6656
|
+
vue.renderSlot(_ctx.$slots, "action", {}, void 0, true)
|
|
6657
|
+
], 32)) : vue.createCommentVNode("", true)
|
|
6658
|
+
], 10, _hoisted_1$a);
|
|
6659
|
+
};
|
|
6660
|
+
}
|
|
6661
|
+
});
|
|
6662
|
+
const TaoListItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-878b7727"]]);
|
|
6319
6663
|
const _hoisted_1$9 = {
|
|
6320
6664
|
class: "tao-skeleton-group",
|
|
6321
6665
|
"aria-hidden": true
|
|
@@ -6376,9 +6720,8 @@
|
|
|
6376
6720
|
const emit = __emit;
|
|
6377
6721
|
const panelRef = vue.ref(null);
|
|
6378
6722
|
const titleId = vue.useId();
|
|
6379
|
-
let previousOverflow = "";
|
|
6380
6723
|
let previousFocus = null;
|
|
6381
|
-
let
|
|
6724
|
+
let scrollHeld = false;
|
|
6382
6725
|
function close() {
|
|
6383
6726
|
if (!props.closable) {
|
|
6384
6727
|
return;
|
|
@@ -6386,21 +6729,19 @@
|
|
|
6386
6729
|
emit("update:modelValue", false);
|
|
6387
6730
|
emit("close");
|
|
6388
6731
|
}
|
|
6389
|
-
function
|
|
6390
|
-
if (
|
|
6732
|
+
function holdScroll() {
|
|
6733
|
+
if (scrollHeld || !isBrowser()) {
|
|
6391
6734
|
return;
|
|
6392
6735
|
}
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
scrollLocked = true;
|
|
6736
|
+
lockBodyScroll();
|
|
6737
|
+
scrollHeld = true;
|
|
6396
6738
|
}
|
|
6397
|
-
function
|
|
6398
|
-
if (!
|
|
6739
|
+
function releaseScroll() {
|
|
6740
|
+
if (!scrollHeld) {
|
|
6399
6741
|
return;
|
|
6400
6742
|
}
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
scrollLocked = false;
|
|
6743
|
+
unlockBodyScroll();
|
|
6744
|
+
scrollHeld = false;
|
|
6404
6745
|
}
|
|
6405
6746
|
function restoreFocus() {
|
|
6406
6747
|
var _a;
|
|
@@ -6418,6 +6759,9 @@
|
|
|
6418
6759
|
}
|
|
6419
6760
|
function onKeydown(event) {
|
|
6420
6761
|
if (event.key === "Escape") {
|
|
6762
|
+
if (!props.closable) {
|
|
6763
|
+
return;
|
|
6764
|
+
}
|
|
6421
6765
|
event.preventDefault();
|
|
6422
6766
|
close();
|
|
6423
6767
|
return;
|
|
@@ -6429,19 +6773,23 @@
|
|
|
6429
6773
|
vue.watch(
|
|
6430
6774
|
() => props.modelValue,
|
|
6431
6775
|
(isOpen) => {
|
|
6776
|
+
if (!isBrowser()) {
|
|
6777
|
+
return;
|
|
6778
|
+
}
|
|
6432
6779
|
if (isOpen) {
|
|
6433
6780
|
previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
6434
|
-
|
|
6781
|
+
holdScroll();
|
|
6435
6782
|
void focusPanel();
|
|
6436
6783
|
return;
|
|
6437
6784
|
}
|
|
6438
|
-
|
|
6785
|
+
releaseScroll();
|
|
6439
6786
|
restoreFocus();
|
|
6440
6787
|
},
|
|
6441
6788
|
{ immediate: true }
|
|
6442
6789
|
);
|
|
6443
6790
|
vue.onBeforeUnmount(() => {
|
|
6444
|
-
|
|
6791
|
+
releaseScroll();
|
|
6792
|
+
restoreFocus();
|
|
6445
6793
|
});
|
|
6446
6794
|
return (_ctx, _cache) => {
|
|
6447
6795
|
return vue.openBlock(), vue.createBlock(vue.Teleport, { to: "body" }, [
|
|
@@ -6502,7 +6850,7 @@
|
|
|
6502
6850
|
};
|
|
6503
6851
|
}
|
|
6504
6852
|
});
|
|
6505
|
-
const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
6853
|
+
const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-10fb02f2"]]);
|
|
6506
6854
|
const _hoisted_1$7 = ["title"];
|
|
6507
6855
|
const _hoisted_2$6 = { class: "tao-avatar__face" };
|
|
6508
6856
|
const _hoisted_3$5 = ["src", "alt"];
|
|
@@ -6587,18 +6935,30 @@
|
|
|
6587
6935
|
}
|
|
6588
6936
|
return extra.length ? `${base}, ${extra.join(", ")}` : base;
|
|
6589
6937
|
});
|
|
6938
|
+
const imgFailed = vue.ref(false);
|
|
6939
|
+
const showImage = vue.computed(() => Boolean(props.src) && !imgFailed.value);
|
|
6940
|
+
vue.watch(
|
|
6941
|
+
() => props.src,
|
|
6942
|
+
() => {
|
|
6943
|
+
imgFailed.value = false;
|
|
6944
|
+
}
|
|
6945
|
+
);
|
|
6946
|
+
function onImgError() {
|
|
6947
|
+
imgFailed.value = true;
|
|
6948
|
+
}
|
|
6590
6949
|
return (_ctx, _cache) => {
|
|
6591
6950
|
return vue.openBlock(), vue.createElementBlock("span", {
|
|
6592
6951
|
class: vue.normalizeClass(["tao-avatar", `tao-avatar--${sizeClass.value}`]),
|
|
6593
6952
|
title: label.value
|
|
6594
6953
|
}, [
|
|
6595
6954
|
vue.createElementVNode("span", _hoisted_2$6, [
|
|
6596
|
-
|
|
6955
|
+
showImage.value ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
6597
6956
|
key: 0,
|
|
6598
6957
|
class: "tao-avatar__img",
|
|
6599
6958
|
src: __props.src,
|
|
6600
|
-
alt: label.value
|
|
6601
|
-
|
|
6959
|
+
alt: label.value,
|
|
6960
|
+
onError: onImgError
|
|
6961
|
+
}, null, 40, _hoisted_3$5)) : (vue.openBlock(), vue.createElementBlock("span", {
|
|
6602
6962
|
key: 1,
|
|
6603
6963
|
class: "tao-avatar__fallback",
|
|
6604
6964
|
"aria-label": label.value
|
|
@@ -6614,7 +6974,7 @@
|
|
|
6614
6974
|
};
|
|
6615
6975
|
}
|
|
6616
6976
|
});
|
|
6617
|
-
const TaoAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
6977
|
+
const TaoAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-65ed2d7a"]]);
|
|
6618
6978
|
const _hoisted_1$6 = ["aria-label"];
|
|
6619
6979
|
const _hoisted_2$5 = { class: "tao-breadcrumb__list" };
|
|
6620
6980
|
const _hoisted_3$4 = {
|
|
@@ -6651,7 +7011,7 @@
|
|
|
6651
7011
|
class: "tao-breadcrumb__item"
|
|
6652
7012
|
}, [
|
|
6653
7013
|
index > 0 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$4, "/")) : vue.createCommentVNode("", true),
|
|
6654
|
-
index === __props.items.length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$4, vue.toDisplayString(item.label), 1)) : item.to ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
7014
|
+
index === __props.items.length - 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$4, vue.toDisplayString(item.label), 1)) : item.to ? (vue.openBlock(), vue.createBlock(_sfc_main$q, {
|
|
6655
7015
|
key: 2,
|
|
6656
7016
|
class: "tao-breadcrumb__link",
|
|
6657
7017
|
to: item.to
|
|
@@ -6823,7 +7183,8 @@
|
|
|
6823
7183
|
return 0;
|
|
6824
7184
|
}
|
|
6825
7185
|
const left = ((_a = track.value) == null ? void 0 : _a.scrollLeft) ?? 0;
|
|
6826
|
-
|
|
7186
|
+
const last = Math.max(total - step.value, 0);
|
|
7187
|
+
return Math.min(Math.max(Math.round(left / (width + gap)), 0), last);
|
|
6827
7188
|
}
|
|
6828
7189
|
function setIndex(next) {
|
|
6829
7190
|
if (next === index.value) {
|
|
@@ -6874,13 +7235,10 @@
|
|
|
6874
7235
|
autoplayTimer = 0;
|
|
6875
7236
|
}
|
|
6876
7237
|
function canAutoplay() {
|
|
6877
|
-
return props.autoplay > 0 && count.value > step.value && !hoverPaused.value && !focusPaused.value && !dragging.value && typeof document !== "undefined" && !document.hidden && !prefersReducedMotion();
|
|
7238
|
+
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);
|
|
6878
7239
|
}
|
|
6879
7240
|
function tickAutoplay() {
|
|
6880
7241
|
if (!canAutoplay()) {
|
|
6881
|
-
return;
|
|
6882
|
-
}
|
|
6883
|
-
if (!props.loop && index.value >= lastIndex.value) {
|
|
6884
7242
|
stopAutoplay();
|
|
6885
7243
|
return;
|
|
6886
7244
|
}
|
|
@@ -6920,7 +7278,14 @@
|
|
|
6920
7278
|
}
|
|
6921
7279
|
cancelAnimationFrame(scrollFrame);
|
|
6922
7280
|
scrollFrame = requestAnimationFrame(() => {
|
|
6923
|
-
|
|
7281
|
+
const next = nearestIndex();
|
|
7282
|
+
const { width, gap } = metrics();
|
|
7283
|
+
const el = track.value;
|
|
7284
|
+
if (el && width > 0 && el.scrollLeft - next * (width + gap) > (width + gap) / 2) {
|
|
7285
|
+
goTo(next, true);
|
|
7286
|
+
return;
|
|
7287
|
+
}
|
|
7288
|
+
setIndex(next);
|
|
6924
7289
|
});
|
|
6925
7290
|
}
|
|
6926
7291
|
function releaseDragCapture() {
|
|
@@ -7025,7 +7390,7 @@
|
|
|
7025
7390
|
}
|
|
7026
7391
|
);
|
|
7027
7392
|
vue.watch(
|
|
7028
|
-
() => [props.autoplay, props.loop, count.value, dragging.value],
|
|
7393
|
+
() => [props.autoplay, props.loop, count.value, dragging.value, index.value],
|
|
7029
7394
|
() => syncAutoplay()
|
|
7030
7395
|
);
|
|
7031
7396
|
vue.onMounted(() => {
|
|
@@ -7177,7 +7542,7 @@
|
|
|
7177
7542
|
};
|
|
7178
7543
|
}
|
|
7179
7544
|
});
|
|
7180
|
-
const TaoCarousel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
7545
|
+
const TaoCarousel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-bc396e5d"]]);
|
|
7181
7546
|
const _hoisted_1$3 = ["aria-label"];
|
|
7182
7547
|
const _hoisted_2$2 = ["aria-label"];
|
|
7183
7548
|
const _hoisted_3$2 = {
|
|
@@ -7754,14 +8119,13 @@
|
|
|
7754
8119
|
__name: "TaoConfirmHost",
|
|
7755
8120
|
setup(__props) {
|
|
7756
8121
|
const panelRef = vue.ref(null);
|
|
7757
|
-
let previousOverflow = "";
|
|
7758
8122
|
let previousFocus = null;
|
|
7759
|
-
let
|
|
8123
|
+
let scrollHeld = false;
|
|
7760
8124
|
vue.onMounted(() => {
|
|
7761
8125
|
registerConfirmHost();
|
|
7762
8126
|
});
|
|
7763
8127
|
vue.onBeforeUnmount(() => {
|
|
7764
|
-
|
|
8128
|
+
releaseScroll();
|
|
7765
8129
|
unregisterConfirmHost();
|
|
7766
8130
|
});
|
|
7767
8131
|
vue.watch(
|
|
@@ -7772,12 +8136,15 @@
|
|
|
7772
8136
|
async (id) => {
|
|
7773
8137
|
var _a, _b;
|
|
7774
8138
|
if (!id) {
|
|
7775
|
-
|
|
8139
|
+
releaseScroll();
|
|
7776
8140
|
restoreFocus();
|
|
7777
8141
|
return;
|
|
7778
8142
|
}
|
|
8143
|
+
if (!isBrowser()) {
|
|
8144
|
+
return;
|
|
8145
|
+
}
|
|
7779
8146
|
previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
7780
|
-
|
|
8147
|
+
holdScroll();
|
|
7781
8148
|
await vue.nextTick();
|
|
7782
8149
|
(_b = queryButton(((_a = currentConfirm.value) == null ? void 0 : _a.danger) ? "cancel" : "ok")) == null ? void 0 : _b.focus();
|
|
7783
8150
|
}
|
|
@@ -7786,21 +8153,19 @@
|
|
|
7786
8153
|
var _a;
|
|
7787
8154
|
return ((_a = panelRef.value) == null ? void 0 : _a.querySelector(`[data-tao-confirm-${which}]`)) ?? null;
|
|
7788
8155
|
}
|
|
7789
|
-
function
|
|
7790
|
-
if (
|
|
8156
|
+
function holdScroll() {
|
|
8157
|
+
if (scrollHeld || !isBrowser()) {
|
|
7791
8158
|
return;
|
|
7792
8159
|
}
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
scrollLocked = true;
|
|
8160
|
+
lockBodyScroll();
|
|
8161
|
+
scrollHeld = true;
|
|
7796
8162
|
}
|
|
7797
|
-
function
|
|
7798
|
-
if (!
|
|
8163
|
+
function releaseScroll() {
|
|
8164
|
+
if (!scrollHeld) {
|
|
7799
8165
|
return;
|
|
7800
8166
|
}
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
scrollLocked = false;
|
|
8167
|
+
unlockBodyScroll();
|
|
8168
|
+
scrollHeld = false;
|
|
7804
8169
|
}
|
|
7805
8170
|
function restoreFocus() {
|
|
7806
8171
|
var _a;
|
|
@@ -7814,26 +8179,13 @@
|
|
|
7814
8179
|
answer(false);
|
|
7815
8180
|
}
|
|
7816
8181
|
function onKeydown(event) {
|
|
7817
|
-
var _a, _b;
|
|
7818
8182
|
if (event.key === "Escape") {
|
|
7819
8183
|
event.preventDefault();
|
|
7820
8184
|
answer(false);
|
|
7821
8185
|
return;
|
|
7822
8186
|
}
|
|
7823
|
-
if (
|
|
7824
|
-
|
|
7825
|
-
}
|
|
7826
|
-
const first = queryButton(((_a = currentConfirm.value) == null ? void 0 : _a.danger) ? "cancel" : "ok");
|
|
7827
|
-
const last = queryButton(((_b = currentConfirm.value) == null ? void 0 : _b.danger) ? "ok" : "cancel");
|
|
7828
|
-
if (!first || !last) {
|
|
7829
|
-
return;
|
|
7830
|
-
}
|
|
7831
|
-
if (event.shiftKey && document.activeElement === first) {
|
|
7832
|
-
event.preventDefault();
|
|
7833
|
-
last.focus();
|
|
7834
|
-
} else if (!event.shiftKey && document.activeElement === last) {
|
|
7835
|
-
event.preventDefault();
|
|
7836
|
-
first.focus();
|
|
8187
|
+
if (panelRef.value) {
|
|
8188
|
+
trapTab(event, panelRef.value);
|
|
7837
8189
|
}
|
|
7838
8190
|
}
|
|
7839
8191
|
return (_ctx, _cache) => {
|
|
@@ -7936,7 +8288,7 @@
|
|
|
7936
8288
|
};
|
|
7937
8289
|
}
|
|
7938
8290
|
});
|
|
7939
|
-
const TaoConfirmHost = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
8291
|
+
const TaoConfirmHost = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d54ae27e"]]);
|
|
7940
8292
|
const TYPE_TIMEOUT = {
|
|
7941
8293
|
success: 3e3,
|
|
7942
8294
|
error: 5e3,
|
|
@@ -8328,7 +8680,7 @@
|
|
|
8328
8680
|
TaoSpoilerGroup,
|
|
8329
8681
|
TaoCopy,
|
|
8330
8682
|
TaoContainer,
|
|
8331
|
-
_sfc_main$
|
|
8683
|
+
_sfc_main$I,
|
|
8332
8684
|
TaoSpace,
|
|
8333
8685
|
TaoSplit,
|
|
8334
8686
|
TaoIcon,
|
|
@@ -8346,7 +8698,7 @@
|
|
|
8346
8698
|
TaoFileDrop,
|
|
8347
8699
|
TaoDropdownMenu,
|
|
8348
8700
|
TaoPinCode,
|
|
8349
|
-
_sfc_main$
|
|
8701
|
+
_sfc_main$q,
|
|
8350
8702
|
TaoFormField,
|
|
8351
8703
|
TaoSelect,
|
|
8352
8704
|
TaoCombobox,
|
|
@@ -8361,6 +8713,8 @@
|
|
|
8361
8713
|
TaoTable,
|
|
8362
8714
|
TaoPagination,
|
|
8363
8715
|
TaoEmpty,
|
|
8716
|
+
TaoList,
|
|
8717
|
+
TaoListItem,
|
|
8364
8718
|
TaoSkeleton,
|
|
8365
8719
|
TaoDrawer,
|
|
8366
8720
|
TaoAvatar,
|
|
@@ -8400,14 +8754,16 @@
|
|
|
8400
8754
|
exports2.TaoEmpty = TaoEmpty;
|
|
8401
8755
|
exports2.TaoFieldset = TaoFieldset;
|
|
8402
8756
|
exports2.TaoFileDrop = TaoFileDrop;
|
|
8403
|
-
exports2.TaoFlex = _sfc_main$
|
|
8757
|
+
exports2.TaoFlex = _sfc_main$I;
|
|
8404
8758
|
exports2.TaoFormField = TaoFormField;
|
|
8405
8759
|
exports2.TaoIcon = TaoIcon;
|
|
8406
8760
|
exports2.TaoImage = TaoImage;
|
|
8407
8761
|
exports2.TaoInput = TaoInput;
|
|
8408
8762
|
exports2.TaoInputGroup = TaoInputGroup;
|
|
8409
8763
|
exports2.TaoInputNumber = TaoInputNumber;
|
|
8410
|
-
exports2.TaoLink = _sfc_main$
|
|
8764
|
+
exports2.TaoLink = _sfc_main$q;
|
|
8765
|
+
exports2.TaoList = TaoList;
|
|
8766
|
+
exports2.TaoListItem = TaoListItem;
|
|
8411
8767
|
exports2.TaoLoader = TaoLoader;
|
|
8412
8768
|
exports2.TaoModal = TaoModal;
|
|
8413
8769
|
exports2.TaoPagination = TaoPagination;
|