@1337exp/taoui 5.23.2 → 5.25.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/CHANGELOG.md +11 -0
- package/README.md +5 -3
- package/README.ru.md +5 -3
- package/dist/index.d.ts +768 -514
- package/dist/index.js +592 -167
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/SKILL.md +2 -2
- package/skills/taoui/references/components.md +34 -0
package/dist/index.js
CHANGED
|
@@ -58,6 +58,8 @@ const builtin = {
|
|
|
58
58
|
pause: { body: '<path d="M7 5h3.5v14H7zM13.5 5H17v14h-3.5z" fill="currentColor"/>' },
|
|
59
59
|
"skip-back": { body: '<path d="M19 5.5v13L9.5 12z" fill="currentColor"/><path d="M6 5.5v13"/>' },
|
|
60
60
|
copy: { body: '<rect x="9" y="9" width="11" height="11" rx="2"/><path d="M15 9V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7a2 2 0 002 2h3"/>' },
|
|
61
|
+
sun: { body: '<circle cx="12" cy="12" r="4.25"/><path d="M12 3.75L12 1M18.45 6.86L20.6 5.14M20.04 13.84L22.72 14.45M15.58 19.43L16.77 21.91M8.42 19.43L7.23 21.91M3.96 13.84L1.28 14.45M5.55 6.86L3.4 5.14"/>' },
|
|
62
|
+
moon: { body: '<path d="M20 14.5A8 8 0 019.5 4a8 8 0 1010.5 10.5z"/>' },
|
|
61
63
|
calendar: { body: '<rect x="4" y="5.5" width="16" height="14.5" rx="2"/><path d="M4 10h16M8.5 3.5v4M15.5 3.5v4"/>' },
|
|
62
64
|
info: { body: '<circle cx="12" cy="12" r="9"/><path d="M12 11v5.5"/>' + dot(12, 7.8, 1.1) },
|
|
63
65
|
"alert-triangle": { body: '<path d="M12 4L2.8 19.5h18.4z"/><path d="M12 10v4.5"/>' + dot(12, 17.2, 1.1) },
|
|
@@ -95,9 +97,9 @@ function resolveTaoIcon(name) {
|
|
|
95
97
|
return name.startsWith(TAO_ICON_PREFIX) ? builtin[name.slice(TAO_ICON_PREFIX.length)] : registered[name];
|
|
96
98
|
}
|
|
97
99
|
const taoIconNames = Object.keys(builtin).map((name) => TAO_ICON_PREFIX + name);
|
|
98
|
-
const _hoisted_1$
|
|
99
|
-
const _hoisted_2$
|
|
100
|
-
const _sfc_main$
|
|
100
|
+
const _hoisted_1$18 = { class: "tao-icon" };
|
|
101
|
+
const _hoisted_2$_ = ["viewBox", "width", "height", "innerHTML"];
|
|
102
|
+
const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
101
103
|
...{ name: "TaoIcon" },
|
|
102
104
|
__name: "TaoIcon",
|
|
103
105
|
props: {
|
|
@@ -117,7 +119,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
117
119
|
}
|
|
118
120
|
const box = computed(() => props.size ? `${props.size}px` : "1em");
|
|
119
121
|
return (_ctx, _cache) => {
|
|
120
|
-
return openBlock(), createElementBlock("span", _hoisted_1$
|
|
122
|
+
return openBlock(), createElementBlock("span", _hoisted_1$18, [
|
|
121
123
|
renderSlot(_ctx.$slots, "prefix", {}, void 0, true),
|
|
122
124
|
def.value ? (openBlock(), createElementBlock("svg", {
|
|
123
125
|
key: 0,
|
|
@@ -133,7 +135,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
133
135
|
"aria-hidden": "true",
|
|
134
136
|
focusable: "false",
|
|
135
137
|
innerHTML: def.value.body
|
|
136
|
-
}, null, 10, _hoisted_2$
|
|
138
|
+
}, null, 10, _hoisted_2$_)) : (openBlock(), createElementBlock("i", {
|
|
137
139
|
key: 1,
|
|
138
140
|
class: normalizeClass(["tao-icon__value", [`icon-${props.name}`, { "tao-icon__value--invert": props.invert }]]),
|
|
139
141
|
style: normalizeStyle(props.size ? `font-size: ${props.size}px` : "")
|
|
@@ -150,7 +152,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
150
152
|
}
|
|
151
153
|
return target;
|
|
152
154
|
};
|
|
153
|
-
const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
155
|
+
const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["__scopeId", "data-v-ef842331"]]);
|
|
154
156
|
const localeEn = {
|
|
155
157
|
code: "en-US",
|
|
156
158
|
alert: { closeLabel: "Close", detailsLabel: "Details" },
|
|
@@ -185,6 +187,8 @@ const localeEn = {
|
|
|
185
187
|
},
|
|
186
188
|
confirm: { ok: "OK", cancel: "Cancel" },
|
|
187
189
|
copy: { copyLabel: "Copy", successText: "Copied!" },
|
|
190
|
+
tour: { nextLabel: "Next", prevLabel: "Back", skipLabel: "Skip", doneLabel: "Done", progressLabel: "Step {n} of {count}" },
|
|
191
|
+
themeToggle: { toLightLabel: "Switch to the light theme", toDarkLabel: "Switch to the dark theme" },
|
|
188
192
|
loader: { label: "Loading" },
|
|
189
193
|
date: {
|
|
190
194
|
placeholder: "Date",
|
|
@@ -414,6 +418,8 @@ const localeRu = {
|
|
|
414
418
|
},
|
|
415
419
|
confirm: { ok: "ОК", cancel: "Отмена" },
|
|
416
420
|
copy: { copyLabel: "Копировать", successText: "Скопировано!" },
|
|
421
|
+
tour: { nextLabel: "Далее", prevLabel: "Назад", skipLabel: "Пропустить", doneLabel: "Готово", progressLabel: "Шаг {n} из {count}" },
|
|
422
|
+
themeToggle: { toLightLabel: "Включить светлую тему", toDarkLabel: "Включить тёмную тему" },
|
|
417
423
|
loader: { label: "Загрузка" },
|
|
418
424
|
date: {
|
|
419
425
|
placeholder: "Дата",
|
|
@@ -535,27 +541,27 @@ function useLocaleText(props, section) {
|
|
|
535
541
|
function formatText(template, values) {
|
|
536
542
|
return template.replace(/\{(\w+)\}/g, (match, key) => key in values ? String(values[key]) : match);
|
|
537
543
|
}
|
|
538
|
-
const _hoisted_1$
|
|
539
|
-
const _hoisted_2$
|
|
544
|
+
const _hoisted_1$17 = ["role", "aria-hidden"];
|
|
545
|
+
const _hoisted_2$Z = {
|
|
540
546
|
key: 0,
|
|
541
547
|
class: "tao-loader__ellipsis",
|
|
542
548
|
"aria-hidden": "true"
|
|
543
549
|
};
|
|
544
|
-
const _hoisted_3$
|
|
550
|
+
const _hoisted_3$R = {
|
|
545
551
|
key: 1,
|
|
546
552
|
class: "tao-loader__ring",
|
|
547
553
|
"aria-hidden": "true"
|
|
548
554
|
};
|
|
549
|
-
const _hoisted_4$
|
|
555
|
+
const _hoisted_4$G = {
|
|
550
556
|
key: 2,
|
|
551
557
|
class: "tao-loader__pulse",
|
|
552
558
|
"aria-hidden": "true"
|
|
553
559
|
};
|
|
554
|
-
const _hoisted_5$
|
|
560
|
+
const _hoisted_5$w = {
|
|
555
561
|
key: 3,
|
|
556
562
|
class: "tao-sr-only"
|
|
557
563
|
};
|
|
558
|
-
const _sfc_main$
|
|
564
|
+
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
559
565
|
...{ name: "TaoLoader" },
|
|
560
566
|
__name: "TaoLoader",
|
|
561
567
|
props: {
|
|
@@ -593,29 +599,29 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
593
599
|
role: __props.decorative ? void 0 : "status",
|
|
594
600
|
"aria-hidden": __props.decorative ? "true" : void 0
|
|
595
601
|
}, [
|
|
596
|
-
__props.variant === "dots" ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
602
|
+
__props.variant === "dots" ? (openBlock(), createElementBlock("div", _hoisted_2$Z, [..._cache[0] || (_cache[0] = [
|
|
597
603
|
createElementVNode("div", null, null, -1),
|
|
598
604
|
createElementVNode("div", null, null, -1),
|
|
599
605
|
createElementVNode("div", null, null, -1),
|
|
600
606
|
createElementVNode("div", null, null, -1)
|
|
601
|
-
])])) : __props.variant === "ring" ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
602
|
-
!__props.decorative ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
603
|
-
], 14, _hoisted_1$
|
|
607
|
+
])])) : __props.variant === "ring" ? (openBlock(), createElementBlock("span", _hoisted_3$R)) : (openBlock(), createElementBlock("span", _hoisted_4$G)),
|
|
608
|
+
!__props.decorative ? (openBlock(), createElementBlock("span", _hoisted_5$w, toDisplayString(unref(l10n).label), 1)) : createCommentVNode("", true)
|
|
609
|
+
], 14, _hoisted_1$17);
|
|
604
610
|
};
|
|
605
611
|
}
|
|
606
612
|
});
|
|
607
|
-
const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
608
|
-
const _hoisted_1$
|
|
609
|
-
const _hoisted_2$
|
|
613
|
+
const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["__scopeId", "data-v-77dd8549"]]);
|
|
614
|
+
const _hoisted_1$16 = ["type", "aria-pressed", "aria-keyshortcuts", "aria-busy", "disabled"];
|
|
615
|
+
const _hoisted_2$Y = {
|
|
610
616
|
key: 2,
|
|
611
617
|
class: "tao-button__content"
|
|
612
618
|
};
|
|
613
|
-
const _hoisted_3$
|
|
619
|
+
const _hoisted_3$Q = {
|
|
614
620
|
key: 4,
|
|
615
621
|
class: "tao-button__shortcut",
|
|
616
622
|
"aria-hidden": "true"
|
|
617
623
|
};
|
|
618
|
-
const _sfc_main$
|
|
624
|
+
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
619
625
|
...{ name: "TaoButton" },
|
|
620
626
|
__name: "TaoButton",
|
|
621
627
|
props: {
|
|
@@ -689,7 +695,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
689
695
|
class: "tao-button__icon",
|
|
690
696
|
name: __props.icon
|
|
691
697
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
692
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
698
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$Y, [
|
|
693
699
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
694
700
|
])) : createCommentVNode("", true),
|
|
695
701
|
__props.iconEnd ? (openBlock(), createBlock(TaoIcon, {
|
|
@@ -697,12 +703,12 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
697
703
|
class: "tao-button__icon",
|
|
698
704
|
name: __props.iconEnd
|
|
699
705
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
700
|
-
__props.shortcut ? (openBlock(), createElementBlock("kbd", _hoisted_3$
|
|
701
|
-
], 14, _hoisted_1$
|
|
706
|
+
__props.shortcut ? (openBlock(), createElementBlock("kbd", _hoisted_3$Q, toDisplayString(__props.shortcut), 1)) : createCommentVNode("", true)
|
|
707
|
+
], 14, _hoisted_1$16);
|
|
702
708
|
};
|
|
703
709
|
}
|
|
704
710
|
});
|
|
705
|
-
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
711
|
+
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["__scopeId", "data-v-278f587a"]]);
|
|
706
712
|
function toCssLength(value) {
|
|
707
713
|
if (value === void 0 || value === null || value === "") {
|
|
708
714
|
return void 0;
|
|
@@ -721,7 +727,7 @@ function stripeClasses(stripe, tone = "accent") {
|
|
|
721
727
|
function surfaceClass(surface) {
|
|
722
728
|
return surface && surface !== "flat" ? `tao-surface-${surface}` : void 0;
|
|
723
729
|
}
|
|
724
|
-
const _sfc_main$
|
|
730
|
+
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
725
731
|
...{ name: "TaoBlock" },
|
|
726
732
|
__name: "TaoBlock",
|
|
727
733
|
props: {
|
|
@@ -754,7 +760,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
754
760
|
};
|
|
755
761
|
}
|
|
756
762
|
});
|
|
757
|
-
const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
763
|
+
const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["__scopeId", "data-v-1fc66575"]]);
|
|
758
764
|
function useControlAttrs() {
|
|
759
765
|
const attrs = useAttrs();
|
|
760
766
|
return {
|
|
@@ -776,16 +782,16 @@ function useField(props) {
|
|
|
776
782
|
const describedBy = computed(() => field?.describedBy.value);
|
|
777
783
|
return { field, controlId, invalid, describedBy, localId };
|
|
778
784
|
}
|
|
779
|
-
const _hoisted_1$
|
|
785
|
+
const _hoisted_1$15 = {
|
|
780
786
|
key: 0,
|
|
781
787
|
class: "tao-input__affix tao-input__affix--prefix"
|
|
782
788
|
};
|
|
783
|
-
const _hoisted_2$
|
|
784
|
-
const _hoisted_3$
|
|
789
|
+
const _hoisted_2$X = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
|
|
790
|
+
const _hoisted_3$P = {
|
|
785
791
|
key: 1,
|
|
786
792
|
class: "tao-input__affix tao-input__affix--suffix"
|
|
787
793
|
};
|
|
788
|
-
const _sfc_main$
|
|
794
|
+
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
789
795
|
...{ name: "TaoInput", inheritAttrs: false },
|
|
790
796
|
__name: "TaoInput",
|
|
791
797
|
props: {
|
|
@@ -831,7 +837,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
831
837
|
"tao-input-shell--suffix": _ctx.$slots.suffix
|
|
832
838
|
}])
|
|
833
839
|
}, [
|
|
834
|
-
_ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
840
|
+
_ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_1$15, [
|
|
835
841
|
renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
836
842
|
])) : createCommentVNode("", true),
|
|
837
843
|
createElementVNode("input", mergeProps(unref(controlAttrs)(), {
|
|
@@ -846,8 +852,8 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
846
852
|
onInput: handleInput,
|
|
847
853
|
onBlur: handleBlur,
|
|
848
854
|
onFocus: handleFocus
|
|
849
|
-
}), null, 16, _hoisted_2$
|
|
850
|
-
_ctx.$slots.suffix ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
855
|
+
}), null, 16, _hoisted_2$X),
|
|
856
|
+
_ctx.$slots.suffix ? (openBlock(), createElementBlock("span", _hoisted_3$P, [
|
|
851
857
|
renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
|
|
852
858
|
])) : createCommentVNode("", true)
|
|
853
859
|
], 2)
|
|
@@ -855,17 +861,17 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
855
861
|
};
|
|
856
862
|
}
|
|
857
863
|
});
|
|
858
|
-
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
859
|
-
const _hoisted_1$
|
|
864
|
+
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["__scopeId", "data-v-5b617319"]]);
|
|
865
|
+
const _hoisted_1$14 = {
|
|
860
866
|
key: 0,
|
|
861
867
|
class: "tao-input-group__addon tao-input-group__addon--before"
|
|
862
868
|
};
|
|
863
|
-
const _hoisted_2$
|
|
864
|
-
const _hoisted_3$
|
|
869
|
+
const _hoisted_2$W = { class: "tao-input-group__field" };
|
|
870
|
+
const _hoisted_3$O = {
|
|
865
871
|
key: 1,
|
|
866
872
|
class: "tao-input-group__addon tao-input-group__addon--after"
|
|
867
873
|
};
|
|
868
|
-
const _sfc_main$
|
|
874
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
869
875
|
...{ name: "TaoInputGroup" },
|
|
870
876
|
__name: "TaoInputGroup",
|
|
871
877
|
props: {
|
|
@@ -890,30 +896,30 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
890
896
|
onFocusin: onFocusIn,
|
|
891
897
|
onFocusout: onFocusOut
|
|
892
898
|
}, [
|
|
893
|
-
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
899
|
+
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_1$14, [
|
|
894
900
|
renderSlot(_ctx.$slots, "before", {}, void 0, true)
|
|
895
901
|
])) : createCommentVNode("", true),
|
|
896
|
-
createElementVNode("div", _hoisted_2$
|
|
902
|
+
createElementVNode("div", _hoisted_2$W, [
|
|
897
903
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
898
904
|
]),
|
|
899
|
-
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
905
|
+
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_3$O, [
|
|
900
906
|
renderSlot(_ctx.$slots, "after", {}, void 0, true)
|
|
901
907
|
])) : createCommentVNode("", true)
|
|
902
908
|
], 34);
|
|
903
909
|
};
|
|
904
910
|
}
|
|
905
911
|
});
|
|
906
|
-
const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
907
|
-
const _hoisted_1$
|
|
908
|
-
const _hoisted_2$
|
|
912
|
+
const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["__scopeId", "data-v-55b2d297"]]);
|
|
913
|
+
const _hoisted_1$13 = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
914
|
+
const _hoisted_2$V = {
|
|
909
915
|
key: 0,
|
|
910
916
|
class: "tao-input-number__steppers"
|
|
911
917
|
};
|
|
912
|
-
const _hoisted_3$
|
|
913
|
-
const _hoisted_4$
|
|
914
|
-
const _hoisted_5$
|
|
915
|
-
const _hoisted_6$
|
|
916
|
-
const _sfc_main$
|
|
918
|
+
const _hoisted_3$N = ["aria-label", "disabled"];
|
|
919
|
+
const _hoisted_4$F = { "aria-hidden": "true" };
|
|
920
|
+
const _hoisted_5$v = ["aria-label", "disabled"];
|
|
921
|
+
const _hoisted_6$p = { "aria-hidden": "true" };
|
|
922
|
+
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
917
923
|
...{ name: "TaoInputNumber", inheritAttrs: false },
|
|
918
924
|
__name: "TaoInputNumber",
|
|
919
925
|
props: {
|
|
@@ -1072,8 +1078,8 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
1072
1078
|
onFocus,
|
|
1073
1079
|
onBlur,
|
|
1074
1080
|
onKeydown: onKeydown2
|
|
1075
|
-
}), null, 16, _hoisted_1$
|
|
1076
|
-
__props.controls ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
1081
|
+
}), null, 16, _hoisted_1$13),
|
|
1082
|
+
__props.controls ? (openBlock(), createElementBlock("div", _hoisted_2$V, [
|
|
1077
1083
|
createElementVNode("button", {
|
|
1078
1084
|
type: "button",
|
|
1079
1085
|
class: "tao-input-number__step",
|
|
@@ -1082,12 +1088,12 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
1082
1088
|
disabled: __props.disabled || atMax.value,
|
|
1083
1089
|
onClick: _cache[0] || (_cache[0] = ($event) => bump(1))
|
|
1084
1090
|
}, [
|
|
1085
|
-
createElementVNode("span", _hoisted_4$
|
|
1091
|
+
createElementVNode("span", _hoisted_4$F, [
|
|
1086
1092
|
renderSlot(_ctx.$slots, "increment-icon", {}, () => [
|
|
1087
1093
|
createVNode(TaoIcon, { name: "tao-plus" })
|
|
1088
1094
|
], true)
|
|
1089
1095
|
])
|
|
1090
|
-
], 8, _hoisted_3$
|
|
1096
|
+
], 8, _hoisted_3$N),
|
|
1091
1097
|
createElementVNode("button", {
|
|
1092
1098
|
type: "button",
|
|
1093
1099
|
class: "tao-input-number__step",
|
|
@@ -1096,24 +1102,24 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
1096
1102
|
disabled: __props.disabled || atMin.value,
|
|
1097
1103
|
onClick: _cache[1] || (_cache[1] = ($event) => bump(-1))
|
|
1098
1104
|
}, [
|
|
1099
|
-
createElementVNode("span", _hoisted_6$
|
|
1105
|
+
createElementVNode("span", _hoisted_6$p, [
|
|
1100
1106
|
renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
|
|
1101
1107
|
createVNode(TaoIcon, { name: "tao-minus" })
|
|
1102
1108
|
], true)
|
|
1103
1109
|
])
|
|
1104
|
-
], 8, _hoisted_5$
|
|
1110
|
+
], 8, _hoisted_5$v)
|
|
1105
1111
|
])) : createCommentVNode("", true)
|
|
1106
1112
|
], 16);
|
|
1107
1113
|
};
|
|
1108
1114
|
}
|
|
1109
1115
|
});
|
|
1110
|
-
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1111
|
-
const _hoisted_1$
|
|
1112
|
-
const _hoisted_2$
|
|
1113
|
-
const _hoisted_3$
|
|
1114
|
-
const _hoisted_4$
|
|
1115
|
-
const _hoisted_5$
|
|
1116
|
-
const _sfc_main$
|
|
1116
|
+
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["__scopeId", "data-v-dc5bb759"]]);
|
|
1117
|
+
const _hoisted_1$12 = ["aria-label", "disabled"];
|
|
1118
|
+
const _hoisted_2$U = { "aria-hidden": "true" };
|
|
1119
|
+
const _hoisted_3$M = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
1120
|
+
const _hoisted_4$E = ["aria-label", "disabled"];
|
|
1121
|
+
const _hoisted_5$u = { "aria-hidden": "true" };
|
|
1122
|
+
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
1117
1123
|
...{ name: "TaoQuantity", inheritAttrs: false },
|
|
1118
1124
|
__name: "TaoQuantity",
|
|
1119
1125
|
props: {
|
|
@@ -1253,12 +1259,12 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
1253
1259
|
disabled: minusDisabled.value,
|
|
1254
1260
|
onClick: onDec
|
|
1255
1261
|
}, [
|
|
1256
|
-
createElementVNode("span", _hoisted_2$
|
|
1262
|
+
createElementVNode("span", _hoisted_2$U, [
|
|
1257
1263
|
renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
|
|
1258
1264
|
createVNode(TaoIcon, { name: "tao-minus" })
|
|
1259
1265
|
], true)
|
|
1260
1266
|
])
|
|
1261
|
-
], 8, _hoisted_1$
|
|
1267
|
+
], 8, _hoisted_1$12),
|
|
1262
1268
|
createElementVNode("input", mergeProps(unref(controlAttrs)(), {
|
|
1263
1269
|
id: unref(controlId),
|
|
1264
1270
|
class: "tao-quantity__input",
|
|
@@ -1278,7 +1284,7 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
1278
1284
|
onFocus,
|
|
1279
1285
|
onBlur,
|
|
1280
1286
|
onKeydown: onKeydown2
|
|
1281
|
-
}), null, 16, _hoisted_3$
|
|
1287
|
+
}), null, 16, _hoisted_3$M),
|
|
1282
1288
|
createElementVNode("button", {
|
|
1283
1289
|
type: "button",
|
|
1284
1290
|
class: "tao-quantity__btn tao-quantity__btn--inc",
|
|
@@ -1286,59 +1292,59 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
1286
1292
|
disabled: plusDisabled.value,
|
|
1287
1293
|
onClick: onInc
|
|
1288
1294
|
}, [
|
|
1289
|
-
createElementVNode("span", _hoisted_5$
|
|
1295
|
+
createElementVNode("span", _hoisted_5$u, [
|
|
1290
1296
|
renderSlot(_ctx.$slots, "increment-icon", {}, () => [
|
|
1291
1297
|
createVNode(TaoIcon, { name: "tao-plus" })
|
|
1292
1298
|
], true)
|
|
1293
1299
|
])
|
|
1294
|
-
], 8, _hoisted_4$
|
|
1300
|
+
], 8, _hoisted_4$E)
|
|
1295
1301
|
], 16);
|
|
1296
1302
|
};
|
|
1297
1303
|
}
|
|
1298
1304
|
});
|
|
1299
|
-
const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1300
|
-
const _hoisted_1$
|
|
1305
|
+
const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-6453479c"]]);
|
|
1306
|
+
const _hoisted_1$11 = {
|
|
1301
1307
|
key: 0,
|
|
1302
1308
|
class: "tao-card__media"
|
|
1303
1309
|
};
|
|
1304
|
-
const _hoisted_2$
|
|
1310
|
+
const _hoisted_2$T = {
|
|
1305
1311
|
key: 0,
|
|
1306
1312
|
class: "tao-card__overlay"
|
|
1307
1313
|
};
|
|
1308
|
-
const _hoisted_3$
|
|
1314
|
+
const _hoisted_3$L = {
|
|
1309
1315
|
key: 1,
|
|
1310
1316
|
class: "tao-card__overlay"
|
|
1311
1317
|
};
|
|
1312
|
-
const _hoisted_4$
|
|
1318
|
+
const _hoisted_4$D = {
|
|
1313
1319
|
key: 0,
|
|
1314
1320
|
class: "tao-card__header"
|
|
1315
1321
|
};
|
|
1316
|
-
const _hoisted_5$
|
|
1322
|
+
const _hoisted_5$t = {
|
|
1317
1323
|
key: 1,
|
|
1318
1324
|
class: "tao-card__title-block"
|
|
1319
1325
|
};
|
|
1320
|
-
const _hoisted_6$
|
|
1326
|
+
const _hoisted_6$o = {
|
|
1321
1327
|
key: 0,
|
|
1322
1328
|
class: "tao-card__title"
|
|
1323
1329
|
};
|
|
1324
|
-
const _hoisted_7$
|
|
1330
|
+
const _hoisted_7$j = {
|
|
1325
1331
|
key: 1,
|
|
1326
1332
|
class: "tao-card__sub"
|
|
1327
1333
|
};
|
|
1328
|
-
const _hoisted_8$
|
|
1334
|
+
const _hoisted_8$d = {
|
|
1329
1335
|
key: 2,
|
|
1330
1336
|
class: "tao-card__body"
|
|
1331
1337
|
};
|
|
1332
|
-
const _hoisted_9$
|
|
1338
|
+
const _hoisted_9$9 = {
|
|
1333
1339
|
key: 3,
|
|
1334
1340
|
class: "tao-card__footer"
|
|
1335
1341
|
};
|
|
1336
|
-
const _hoisted_10$
|
|
1342
|
+
const _hoisted_10$5 = {
|
|
1337
1343
|
key: 3,
|
|
1338
1344
|
class: "tao-card__corner"
|
|
1339
1345
|
};
|
|
1340
1346
|
const _hoisted_11$4 = ["aria-label"];
|
|
1341
|
-
const _sfc_main$
|
|
1347
|
+
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
1342
1348
|
...{ name: "TaoCard" },
|
|
1343
1349
|
__name: "TaoCard",
|
|
1344
1350
|
props: {
|
|
@@ -1391,12 +1397,12 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
1391
1397
|
}]]),
|
|
1392
1398
|
style: normalizeStyle(radiusStyle.value)
|
|
1393
1399
|
}, [
|
|
1394
|
-
_ctx.$slots.media ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1400
|
+
_ctx.$slots.media ? (openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
1395
1401
|
renderSlot(_ctx.$slots, "media", {}, void 0, true),
|
|
1396
|
-
_ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
1402
|
+
_ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_2$T, [
|
|
1397
1403
|
renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
|
|
1398
1404
|
])) : createCommentVNode("", true)
|
|
1399
|
-
])) : _ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
1405
|
+
])) : _ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_3$L, [
|
|
1400
1406
|
renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
|
|
1401
1407
|
])) : createCommentVNode("", true),
|
|
1402
1408
|
hasContent.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -1404,25 +1410,25 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
1404
1410
|
class: "tao-card__content",
|
|
1405
1411
|
style: normalizeStyle(paddingStyle.value)
|
|
1406
1412
|
}, [
|
|
1407
|
-
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
1413
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_4$D, [
|
|
1408
1414
|
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
1409
1415
|
])) : createCommentVNode("", true),
|
|
1410
|
-
_ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
1411
|
-
_ctx.$slots.title ? (openBlock(), createElementBlock("h2", _hoisted_6$
|
|
1416
|
+
_ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_5$t, [
|
|
1417
|
+
_ctx.$slots.title ? (openBlock(), createElementBlock("h2", _hoisted_6$o, [
|
|
1412
1418
|
renderSlot(_ctx.$slots, "title", {}, void 0, true)
|
|
1413
1419
|
])) : createCommentVNode("", true),
|
|
1414
|
-
_ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_7$
|
|
1420
|
+
_ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_7$j, [
|
|
1415
1421
|
renderSlot(_ctx.$slots, "sub", {}, void 0, true)
|
|
1416
1422
|
])) : createCommentVNode("", true)
|
|
1417
1423
|
])) : createCommentVNode("", true),
|
|
1418
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
1424
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_8$d, [
|
|
1419
1425
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1420
1426
|
])) : createCommentVNode("", true),
|
|
1421
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_9$
|
|
1427
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_9$9, [
|
|
1422
1428
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1423
1429
|
])) : createCommentVNode("", true)
|
|
1424
1430
|
], 4)) : createCommentVNode("", true),
|
|
1425
|
-
hasCorner.value ? (openBlock(), createElementBlock("div", _hoisted_10$
|
|
1431
|
+
hasCorner.value ? (openBlock(), createElementBlock("div", _hoisted_10$5, [
|
|
1426
1432
|
renderSlot(_ctx.$slots, "corner", {}, void 0, true),
|
|
1427
1433
|
__props.closable ? (openBlock(), createElementBlock("button", {
|
|
1428
1434
|
key: 0,
|
|
@@ -1441,7 +1447,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
1441
1447
|
};
|
|
1442
1448
|
}
|
|
1443
1449
|
});
|
|
1444
|
-
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1450
|
+
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-72c9a80f"]]);
|
|
1445
1451
|
const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
1446
1452
|
function getFocusable(root) {
|
|
1447
1453
|
return [...root.querySelectorAll(FOCUSABLE)].filter(
|
|
@@ -1563,21 +1569,21 @@ function useLayer(open, options = {}) {
|
|
|
1563
1569
|
onBeforeUnmount(leave);
|
|
1564
1570
|
return { isTop: () => stack[stack.length - 1] === layer };
|
|
1565
1571
|
}
|
|
1566
|
-
const _hoisted_1
|
|
1567
|
-
const _hoisted_2$
|
|
1572
|
+
const _hoisted_1$10 = ["aria-labelledby"];
|
|
1573
|
+
const _hoisted_2$S = {
|
|
1568
1574
|
key: 0,
|
|
1569
1575
|
class: "tao-modal__header"
|
|
1570
1576
|
};
|
|
1571
|
-
const _hoisted_3$
|
|
1572
|
-
const _hoisted_4$
|
|
1573
|
-
const _hoisted_5$
|
|
1574
|
-
const _hoisted_6$
|
|
1575
|
-
const _hoisted_7$
|
|
1576
|
-
const _hoisted_8$
|
|
1577
|
+
const _hoisted_3$K = ["id"];
|
|
1578
|
+
const _hoisted_4$C = { key: 1 };
|
|
1579
|
+
const _hoisted_5$s = ["aria-label"];
|
|
1580
|
+
const _hoisted_6$n = { "aria-hidden": "true" };
|
|
1581
|
+
const _hoisted_7$i = { class: "tao-modal__content" };
|
|
1582
|
+
const _hoisted_8$c = {
|
|
1577
1583
|
key: 1,
|
|
1578
1584
|
class: "tao-modal__footer"
|
|
1579
1585
|
};
|
|
1580
|
-
const _sfc_main$
|
|
1586
|
+
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
1581
1587
|
...{ name: "TaoModal", inheritAttrs: false },
|
|
1582
1588
|
__name: "TaoModal",
|
|
1583
1589
|
props: {
|
|
@@ -1659,13 +1665,13 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1659
1665
|
"aria-labelledby": __props.title ? unref(titleId) : void 0,
|
|
1660
1666
|
tabindex: "-1"
|
|
1661
1667
|
}), [
|
|
1662
|
-
__props.title || _ctx.$slots.header || __props.closable ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
1668
|
+
__props.title || _ctx.$slots.header || __props.closable ? (openBlock(), createElementBlock("div", _hoisted_2$S, [
|
|
1663
1669
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1664
1670
|
__props.title ? (openBlock(), createElementBlock("h2", {
|
|
1665
1671
|
key: 0,
|
|
1666
1672
|
id: unref(titleId),
|
|
1667
1673
|
class: "tao-modal__title"
|
|
1668
|
-
}, toDisplayString(__props.title), 9, _hoisted_3$
|
|
1674
|
+
}, toDisplayString(__props.title), 9, _hoisted_3$K)) : (openBlock(), createElementBlock("span", _hoisted_4$C))
|
|
1669
1675
|
], true),
|
|
1670
1676
|
__props.closable ? (openBlock(), createElementBlock("button", {
|
|
1671
1677
|
key: 0,
|
|
@@ -1674,20 +1680,20 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1674
1680
|
"aria-label": unref(l10n).closeLabel,
|
|
1675
1681
|
onClick: close
|
|
1676
1682
|
}, [
|
|
1677
|
-
createElementVNode("span", _hoisted_6$
|
|
1683
|
+
createElementVNode("span", _hoisted_6$n, [
|
|
1678
1684
|
renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
1679
1685
|
createVNode(TaoIcon, { name: "tao-close" })
|
|
1680
1686
|
], true)
|
|
1681
1687
|
])
|
|
1682
|
-
], 8, _hoisted_5$
|
|
1688
|
+
], 8, _hoisted_5$s)) : createCommentVNode("", true)
|
|
1683
1689
|
])) : createCommentVNode("", true),
|
|
1684
|
-
createElementVNode("div", _hoisted_7$
|
|
1690
|
+
createElementVNode("div", _hoisted_7$i, [
|
|
1685
1691
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1686
1692
|
]),
|
|
1687
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
1693
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$c, [
|
|
1688
1694
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1689
1695
|
])) : createCommentVNode("", true)
|
|
1690
|
-
], 16, _hoisted_1
|
|
1696
|
+
], 16, _hoisted_1$10)
|
|
1691
1697
|
], 34)) : createCommentVNode("", true)
|
|
1692
1698
|
]),
|
|
1693
1699
|
_: 3
|
|
@@ -1696,10 +1702,10 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1696
1702
|
};
|
|
1697
1703
|
}
|
|
1698
1704
|
});
|
|
1699
|
-
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1700
|
-
const _hoisted_1
|
|
1701
|
-
const _hoisted_2$
|
|
1702
|
-
const _sfc_main$
|
|
1705
|
+
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["__scopeId", "data-v-ea0d125e"]]);
|
|
1706
|
+
const _hoisted_1$$ = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
|
|
1707
|
+
const _hoisted_2$R = ["id", "aria-labelledby"];
|
|
1708
|
+
const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
1703
1709
|
...{ name: "TaoTabs" },
|
|
1704
1710
|
__name: "TaoTabs",
|
|
1705
1711
|
props: {
|
|
@@ -1794,7 +1800,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
1794
1800
|
}, void 0, true, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1795
1801
|
createTextVNode(toDisplayString(tab.label), 1)
|
|
1796
1802
|
], 64))
|
|
1797
|
-
], 8, _hoisted_1
|
|
1803
|
+
], 8, _hoisted_1$$);
|
|
1798
1804
|
}), 128))
|
|
1799
1805
|
], 36),
|
|
1800
1806
|
createElementVNode("div", {
|
|
@@ -1804,12 +1810,12 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
1804
1810
|
"aria-labelledby": tabId(__props.modelValue)
|
|
1805
1811
|
}, [
|
|
1806
1812
|
renderSlot(_ctx.$slots, "default", { activeTab: __props.modelValue }, void 0, true)
|
|
1807
|
-
], 8, _hoisted_2$
|
|
1813
|
+
], 8, _hoisted_2$R)
|
|
1808
1814
|
], 2);
|
|
1809
1815
|
};
|
|
1810
1816
|
}
|
|
1811
1817
|
});
|
|
1812
|
-
const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1818
|
+
const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["__scopeId", "data-v-70811078"]]);
|
|
1813
1819
|
function listenFocusLoss(onLoss) {
|
|
1814
1820
|
function onVisibilityChange() {
|
|
1815
1821
|
if (document.hidden) {
|
|
@@ -2322,22 +2328,22 @@ function zoneGradient(zones, min, max, vertical = false, dimmed = false) {
|
|
|
2322
2328
|
const stops = zones.map((z) => `${dimmed && z.reveal ? "transparent" : z.color} ${ratioOf(z.from, min, max) * 100}% ${ratioOf(z.to, min, max) * 100}%`);
|
|
2323
2329
|
return `linear-gradient(${vertical ? "to top" : "to right"}, ${stops.join(", ")})`;
|
|
2324
2330
|
}
|
|
2325
|
-
const _hoisted_1$
|
|
2326
|
-
const _hoisted_2$
|
|
2327
|
-
const _hoisted_3$
|
|
2331
|
+
const _hoisted_1$_ = ["aria-disabled"];
|
|
2332
|
+
const _hoisted_2$Q = ["id", "tabindex", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-label", "aria-orientation", "aria-disabled", "aria-invalid", "aria-describedby", "onKeydown"];
|
|
2333
|
+
const _hoisted_3$J = {
|
|
2328
2334
|
key: 2,
|
|
2329
2335
|
class: "tao-slider__value"
|
|
2330
2336
|
};
|
|
2331
|
-
const _hoisted_4$
|
|
2337
|
+
const _hoisted_4$B = {
|
|
2332
2338
|
key: 0,
|
|
2333
2339
|
class: "tao-slider__marks"
|
|
2334
2340
|
};
|
|
2335
|
-
const _hoisted_5$
|
|
2336
|
-
const _hoisted_6$
|
|
2341
|
+
const _hoisted_5$r = ["disabled", "onClick"];
|
|
2342
|
+
const _hoisted_6$m = {
|
|
2337
2343
|
key: 0,
|
|
2338
2344
|
class: "tao-slider__mark-label"
|
|
2339
2345
|
};
|
|
2340
|
-
const _sfc_main$
|
|
2346
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
2341
2347
|
...{ name: "TaoSliderBase" },
|
|
2342
2348
|
__name: "TaoSliderBase",
|
|
2343
2349
|
props: {
|
|
@@ -2610,7 +2616,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
2610
2616
|
"aria-describedby": unref(describedBy),
|
|
2611
2617
|
onKeydown: ($event) => onKeydown2($event, i),
|
|
2612
2618
|
onBlur: _cache[0] || (_cache[0] = ($event) => pointerFocus.value = false)
|
|
2613
|
-
}, null, 46, _hoisted_2$
|
|
2619
|
+
}, null, 46, _hoisted_2$Q),
|
|
2614
2620
|
__props.bubble ? (openBlock(), createElementBlock("div", {
|
|
2615
2621
|
key: 0,
|
|
2616
2622
|
class: normalizeClass(["tao-slider__bubble", { "tao-slider__bubble--auto": bubbleAuto(v) }]),
|
|
@@ -2626,13 +2632,13 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
2626
2632
|
], 6)) : createCommentVNode("", true)
|
|
2627
2633
|
], 64);
|
|
2628
2634
|
}), 128)),
|
|
2629
|
-
__props.showValue ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2635
|
+
__props.showValue ? (openBlock(), createElementBlock("div", _hoisted_3$J, [
|
|
2630
2636
|
renderSlot(_ctx.$slots, "pre-value", {}, void 0, true),
|
|
2631
2637
|
createTextVNode(toDisplayString(barText.value), 1),
|
|
2632
2638
|
renderSlot(_ctx.$slots, "post-value", {}, void 0, true)
|
|
2633
2639
|
])) : createCommentVNode("", true)
|
|
2634
2640
|
], 34),
|
|
2635
|
-
markList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
2641
|
+
markList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$B, [
|
|
2636
2642
|
(openBlock(true), createElementBlock(Fragment, null, renderList(markList.value, (mark) => {
|
|
2637
2643
|
return openBlock(), createElementBlock("button", {
|
|
2638
2644
|
key: mark.value,
|
|
@@ -2648,7 +2654,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
2648
2654
|
onClick: ($event) => onMarkClick(mark)
|
|
2649
2655
|
}, [
|
|
2650
2656
|
_cache[2] || (_cache[2] = createElementVNode("span", { class: "tao-slider__tick" }, null, -1)),
|
|
2651
|
-
mark.label ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
2657
|
+
mark.label ? (openBlock(), createElementBlock("span", _hoisted_6$m, [
|
|
2652
2658
|
renderSlot(_ctx.$slots, "mark", {
|
|
2653
2659
|
mark,
|
|
2654
2660
|
active: unref(isMarkActive)(mark.value, values.value)
|
|
@@ -2656,15 +2662,15 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
2656
2662
|
createTextVNode(toDisplayString(mark.label), 1)
|
|
2657
2663
|
], true)
|
|
2658
2664
|
])) : createCommentVNode("", true)
|
|
2659
|
-
], 14, _hoisted_5$
|
|
2665
|
+
], 14, _hoisted_5$r);
|
|
2660
2666
|
}), 128))
|
|
2661
2667
|
])) : createCommentVNode("", true)
|
|
2662
|
-
], 42, _hoisted_1$
|
|
2668
|
+
], 42, _hoisted_1$_);
|
|
2663
2669
|
};
|
|
2664
2670
|
}
|
|
2665
2671
|
});
|
|
2666
|
-
const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2667
|
-
const _sfc_main$
|
|
2672
|
+
const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["__scopeId", "data-v-f2374981"]]);
|
|
2673
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
2668
2674
|
...{ name: "TaoSlider" },
|
|
2669
2675
|
__name: "TaoSlider",
|
|
2670
2676
|
props: {
|
|
@@ -2730,13 +2736,13 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
2730
2736
|
};
|
|
2731
2737
|
}
|
|
2732
2738
|
});
|
|
2733
|
-
const _hoisted_1$
|
|
2734
|
-
const _hoisted_2$
|
|
2735
|
-
const _hoisted_3$
|
|
2739
|
+
const _hoisted_1$Z = { class: "tao-scrubber__controls" };
|
|
2740
|
+
const _hoisted_2$P = { class: "tao-scrubber__track" };
|
|
2741
|
+
const _hoisted_3$I = {
|
|
2736
2742
|
key: 0,
|
|
2737
2743
|
class: "tao-scrubber__time"
|
|
2738
2744
|
};
|
|
2739
|
-
const _sfc_main$
|
|
2745
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
2740
2746
|
...{ name: "TaoScrubber" },
|
|
2741
2747
|
__name: "TaoScrubber",
|
|
2742
2748
|
props: {
|
|
@@ -2776,7 +2782,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
2776
2782
|
return openBlock(), createElementBlock("div", {
|
|
2777
2783
|
class: normalizeClass(["tao-scrubber", [unref(sizeClass)(__props.size), `tao-scrubber--${__props.variant}`, { "tao-scrubber--marks-start": __props.marksSide === "start", "tao-scrubber--disabled": __props.disabled }]])
|
|
2778
2784
|
}, [
|
|
2779
|
-
createElementVNode("div", _hoisted_1$
|
|
2785
|
+
createElementVNode("div", _hoisted_1$Z, [
|
|
2780
2786
|
createVNode(TaoButton, {
|
|
2781
2787
|
size: "small",
|
|
2782
2788
|
variant: "secondary",
|
|
@@ -2806,8 +2812,8 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
2806
2812
|
_: 1
|
|
2807
2813
|
}, 8, ["disabled", "aria-label"])) : createCommentVNode("", true)
|
|
2808
2814
|
]),
|
|
2809
|
-
createElementVNode("div", _hoisted_2$
|
|
2810
|
-
createVNode(_sfc_main$
|
|
2815
|
+
createElementVNode("div", _hoisted_2$P, [
|
|
2816
|
+
createVNode(_sfc_main$18, {
|
|
2811
2817
|
"model-value": __props.modelValue,
|
|
2812
2818
|
min: 0,
|
|
2813
2819
|
max: __props.length,
|
|
@@ -2830,7 +2836,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
2830
2836
|
} : void 0
|
|
2831
2837
|
]), 1032, ["model-value", "max", "step", "marks", "marks-side", "variant", "size", "disabled"])
|
|
2832
2838
|
]),
|
|
2833
|
-
__props.showTime ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2839
|
+
__props.showTime ? (openBlock(), createElementBlock("div", _hoisted_3$I, [
|
|
2834
2840
|
renderSlot(_ctx.$slots, "time", {
|
|
2835
2841
|
time: __props.modelValue,
|
|
2836
2842
|
length: __props.length,
|
|
@@ -2843,7 +2849,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
2843
2849
|
};
|
|
2844
2850
|
}
|
|
2845
2851
|
});
|
|
2846
|
-
const TaoScrubber = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2852
|
+
const TaoScrubber = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-517dc331"]]);
|
|
2847
2853
|
const opposite = { top: "bottom", bottom: "top", left: "right", right: "left" };
|
|
2848
2854
|
function computePosition(input) {
|
|
2849
2855
|
const { anchor, size, viewport, placement = "bottom-start", gap = 4, pad = 8, flip = true } = input;
|
|
@@ -2955,7 +2961,7 @@ function useFloating(anchor, panel, open, options = {}) {
|
|
|
2955
2961
|
window.addEventListener("resize", onViewportChange);
|
|
2956
2962
|
window.addEventListener("scroll", onViewportChange, true);
|
|
2957
2963
|
await nextTick();
|
|
2958
|
-
strategy = anchor.value && pinnedToScreen(anchor.value) ? "fixed" : "absolute";
|
|
2964
|
+
strategy = options.fixed || anchor.value && pinnedToScreen(anchor.value) ? "fixed" : "absolute";
|
|
2959
2965
|
update();
|
|
2960
2966
|
},
|
|
2961
2967
|
{ immediate: true }
|
|
@@ -2969,7 +2975,7 @@ function useFloating(anchor, panel, open, options = {}) {
|
|
|
2969
2975
|
});
|
|
2970
2976
|
return { style, side, anchorOffset, placed, update };
|
|
2971
2977
|
}
|
|
2972
|
-
const _sfc_main$
|
|
2978
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
2973
2979
|
...{ name: "TaoTooltip" },
|
|
2974
2980
|
__name: "TaoTooltip",
|
|
2975
2981
|
props: {
|
|
@@ -3047,7 +3053,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
3047
3053
|
};
|
|
3048
3054
|
}
|
|
3049
3055
|
});
|
|
3050
|
-
const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3056
|
+
const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-32ae3936"]]);
|
|
3051
3057
|
function useDismiss(open, inside, onDismiss) {
|
|
3052
3058
|
function onPointer(event) {
|
|
3053
3059
|
const target = event.target;
|
|
@@ -3076,8 +3082,8 @@ function useDismiss(open, inside, onDismiss) {
|
|
|
3076
3082
|
);
|
|
3077
3083
|
onBeforeUnmount(stop);
|
|
3078
3084
|
}
|
|
3079
|
-
const _hoisted_1$
|
|
3080
|
-
const _sfc_main$
|
|
3085
|
+
const _hoisted_1$Y = { class: "tao-popover" };
|
|
3086
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
3081
3087
|
...{ name: "TaoPopover" },
|
|
3082
3088
|
__name: "TaoPopover",
|
|
3083
3089
|
props: {
|
|
@@ -3131,7 +3137,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
3131
3137
|
}
|
|
3132
3138
|
});
|
|
3133
3139
|
return (_ctx, _cache) => {
|
|
3134
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3140
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Y, [
|
|
3135
3141
|
createElementVNode("div", {
|
|
3136
3142
|
ref_key: "triggerRef",
|
|
3137
3143
|
ref: triggerRef,
|
|
@@ -3160,7 +3166,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
3160
3166
|
};
|
|
3161
3167
|
}
|
|
3162
3168
|
});
|
|
3163
|
-
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3169
|
+
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-6822af1e"]]);
|
|
3164
3170
|
const spoilerGroupKey = Symbol("taoSpoilerGroup");
|
|
3165
3171
|
function frameStyle(bordered) {
|
|
3166
3172
|
if (bordered === void 0 || bordered === null) {
|
|
@@ -3168,14 +3174,14 @@ function frameStyle(bordered) {
|
|
|
3168
3174
|
}
|
|
3169
3175
|
return bordered ? { "--tao-frame-alpha": "100%", "--tao-frame-tint": "0%", "--tao-frame-fill": "0%" } : { "--tao-frame-alpha": "0%", "--tao-frame-tint": "6%", "--tao-frame-fill": "100%" };
|
|
3170
3176
|
}
|
|
3171
|
-
const _hoisted_1$
|
|
3172
|
-
const _hoisted_2$
|
|
3177
|
+
const _hoisted_1$X = ["aria-expanded", "aria-controls"];
|
|
3178
|
+
const _hoisted_2$O = {
|
|
3173
3179
|
key: 0,
|
|
3174
3180
|
class: "tao-spoiler__title"
|
|
3175
3181
|
};
|
|
3176
|
-
const _hoisted_3$
|
|
3177
|
-
const _hoisted_4$
|
|
3178
|
-
const _sfc_main$
|
|
3182
|
+
const _hoisted_3$H = ["id"];
|
|
3183
|
+
const _hoisted_4$A = { class: "tao-spoiler__content-inner" };
|
|
3184
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
3179
3185
|
...{ name: "TaoSpoiler" },
|
|
3180
3186
|
__name: "TaoSpoiler",
|
|
3181
3187
|
props: {
|
|
@@ -3247,12 +3253,12 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
3247
3253
|
class: normalizeClass(["tao-spoiler__icon", { "tao-spoiler__icon--open": isOpen.value }]),
|
|
3248
3254
|
name: "tao-chevron-right"
|
|
3249
3255
|
}, null, 8, ["class"]),
|
|
3250
|
-
__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
3256
|
+
__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_2$O, [
|
|
3251
3257
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
3252
3258
|
createTextVNode(toDisplayString(__props.title), 1)
|
|
3253
3259
|
], true)
|
|
3254
3260
|
])) : createCommentVNode("", true)
|
|
3255
|
-
], 8, _hoisted_1$
|
|
3261
|
+
], 8, _hoisted_1$X),
|
|
3256
3262
|
createVNode(Transition, {
|
|
3257
3263
|
name: "tao-spoiler-slide",
|
|
3258
3264
|
onBeforeEnter,
|
|
@@ -3266,10 +3272,10 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
3266
3272
|
id: unref(panelId),
|
|
3267
3273
|
class: "tao-spoiler__content"
|
|
3268
3274
|
}, [
|
|
3269
|
-
createElementVNode("div", _hoisted_4$
|
|
3275
|
+
createElementVNode("div", _hoisted_4$A, [
|
|
3270
3276
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3271
3277
|
])
|
|
3272
|
-
], 8, _hoisted_3$
|
|
3278
|
+
], 8, _hoisted_3$H)) : createCommentVNode("", true)
|
|
3273
3279
|
]),
|
|
3274
3280
|
_: 3
|
|
3275
3281
|
})
|
|
@@ -3277,9 +3283,9 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
3277
3283
|
};
|
|
3278
3284
|
}
|
|
3279
3285
|
});
|
|
3280
|
-
const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3281
|
-
const _hoisted_1$
|
|
3282
|
-
const _sfc_main$
|
|
3286
|
+
const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-1e16d6d1"]]);
|
|
3287
|
+
const _hoisted_1$W = { class: "tao-spoiler-group" };
|
|
3288
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
3283
3289
|
...{ name: "TaoSpoilerGroup" },
|
|
3284
3290
|
__name: "TaoSpoilerGroup",
|
|
3285
3291
|
props: {
|
|
@@ -3304,15 +3310,15 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
3304
3310
|
setOpen
|
|
3305
3311
|
});
|
|
3306
3312
|
return (_ctx, _cache) => {
|
|
3307
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3313
|
+
return openBlock(), createElementBlock("div", _hoisted_1$W, [
|
|
3308
3314
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3309
3315
|
]);
|
|
3310
3316
|
};
|
|
3311
3317
|
}
|
|
3312
3318
|
});
|
|
3313
|
-
const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3314
|
-
const _hoisted_1$
|
|
3315
|
-
const _sfc_main$
|
|
3319
|
+
const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-7986fd2a"]]);
|
|
3320
|
+
const _hoisted_1$V = ["aria-label"];
|
|
3321
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
3316
3322
|
...{ name: "TaoCopy" },
|
|
3317
3323
|
__name: "TaoCopy",
|
|
3318
3324
|
props: {
|
|
@@ -3384,7 +3390,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
3384
3390
|
name: "tao-copy",
|
|
3385
3391
|
size: 16
|
|
3386
3392
|
})
|
|
3387
|
-
], 10, _hoisted_1$
|
|
3393
|
+
], 10, _hoisted_1$V)
|
|
3388
3394
|
], true),
|
|
3389
3395
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
3390
3396
|
copied.value && __props.tip && doneText.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -3400,7 +3406,419 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
3400
3406
|
};
|
|
3401
3407
|
}
|
|
3402
3408
|
});
|
|
3403
|
-
const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3409
|
+
const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-e181129d"]]);
|
|
3410
|
+
function readTaoMode(el) {
|
|
3411
|
+
const mode = el.getAttribute("data-tao-mode");
|
|
3412
|
+
if (mode === "light" || mode === "dark") {
|
|
3413
|
+
return mode;
|
|
3414
|
+
}
|
|
3415
|
+
return el.getAttribute("data-tao-theme") === "light" ? "light" : "dark";
|
|
3416
|
+
}
|
|
3417
|
+
function applyTaoMode(el, mode) {
|
|
3418
|
+
el.setAttribute("data-tao-mode", mode);
|
|
3419
|
+
const theme = el.getAttribute("data-tao-theme");
|
|
3420
|
+
if (theme === "dark" || theme === "light") {
|
|
3421
|
+
el.setAttribute("data-tao-theme", mode);
|
|
3422
|
+
}
|
|
3423
|
+
}
|
|
3424
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
3425
|
+
...{ name: "TaoThemeToggle" },
|
|
3426
|
+
__name: "TaoThemeToggle",
|
|
3427
|
+
props: {
|
|
3428
|
+
modelValue: { default: void 0 },
|
|
3429
|
+
apply: { type: Boolean, default: true },
|
|
3430
|
+
size: { default: void 0 },
|
|
3431
|
+
variant: { default: "ghost" },
|
|
3432
|
+
toLightLabel: { default: void 0 },
|
|
3433
|
+
toDarkLabel: { default: void 0 }
|
|
3434
|
+
},
|
|
3435
|
+
emits: ["update:modelValue", "change"],
|
|
3436
|
+
setup(__props, { emit: __emit }) {
|
|
3437
|
+
const props = __props;
|
|
3438
|
+
const emit = __emit;
|
|
3439
|
+
const l10n = useLocaleText(props, "themeToggle");
|
|
3440
|
+
const own = ref("dark");
|
|
3441
|
+
const mode = computed(() => props.modelValue ?? own.value);
|
|
3442
|
+
let observer = null;
|
|
3443
|
+
onMounted(() => {
|
|
3444
|
+
const root = document.documentElement;
|
|
3445
|
+
if (props.modelValue === void 0) {
|
|
3446
|
+
own.value = readTaoMode(root);
|
|
3447
|
+
observer = new MutationObserver(() => {
|
|
3448
|
+
if (props.modelValue === void 0) {
|
|
3449
|
+
own.value = readTaoMode(root);
|
|
3450
|
+
}
|
|
3451
|
+
});
|
|
3452
|
+
observer.observe(root, { attributes: true, attributeFilter: ["data-tao-mode", "data-tao-theme"] });
|
|
3453
|
+
} else if (props.apply) {
|
|
3454
|
+
applyTaoMode(root, props.modelValue);
|
|
3455
|
+
}
|
|
3456
|
+
});
|
|
3457
|
+
onBeforeUnmount(() => {
|
|
3458
|
+
observer?.disconnect();
|
|
3459
|
+
observer = null;
|
|
3460
|
+
});
|
|
3461
|
+
watch(
|
|
3462
|
+
() => props.modelValue,
|
|
3463
|
+
(value) => {
|
|
3464
|
+
if (value && props.apply && typeof document !== "undefined") {
|
|
3465
|
+
applyTaoMode(document.documentElement, value);
|
|
3466
|
+
}
|
|
3467
|
+
}
|
|
3468
|
+
);
|
|
3469
|
+
function toggle() {
|
|
3470
|
+
const next = mode.value === "dark" ? "light" : "dark";
|
|
3471
|
+
own.value = next;
|
|
3472
|
+
if (props.apply && typeof document !== "undefined") {
|
|
3473
|
+
applyTaoMode(document.documentElement, next);
|
|
3474
|
+
}
|
|
3475
|
+
emit("update:modelValue", next);
|
|
3476
|
+
emit("change", next);
|
|
3477
|
+
}
|
|
3478
|
+
const icon = computed(() => mode.value === "dark" ? "tao-sun" : "tao-moon");
|
|
3479
|
+
const label = computed(() => mode.value === "dark" ? l10n.value.toLightLabel : l10n.value.toDarkLabel);
|
|
3480
|
+
return (_ctx, _cache) => {
|
|
3481
|
+
return _ctx.$slots.icon ? (openBlock(), createBlock(TaoButton, {
|
|
3482
|
+
key: 0,
|
|
3483
|
+
class: "tao-theme-toggle tao-theme-toggle--custom",
|
|
3484
|
+
size: __props.size,
|
|
3485
|
+
variant: __props.variant,
|
|
3486
|
+
"aria-label": label.value,
|
|
3487
|
+
onClick: toggle
|
|
3488
|
+
}, {
|
|
3489
|
+
default: withCtx(() => [
|
|
3490
|
+
renderSlot(_ctx.$slots, "icon", {
|
|
3491
|
+
mode: mode.value,
|
|
3492
|
+
next: mode.value === "dark" ? "light" : "dark"
|
|
3493
|
+
})
|
|
3494
|
+
]),
|
|
3495
|
+
_: 3
|
|
3496
|
+
}, 8, ["size", "variant", "aria-label"])) : (openBlock(), createBlock(TaoButton, {
|
|
3497
|
+
key: 1,
|
|
3498
|
+
class: "tao-theme-toggle",
|
|
3499
|
+
icon: icon.value,
|
|
3500
|
+
size: __props.size,
|
|
3501
|
+
variant: __props.variant,
|
|
3502
|
+
"aria-label": label.value,
|
|
3503
|
+
onClick: toggle
|
|
3504
|
+
}, null, 8, ["icon", "size", "variant", "aria-label"]));
|
|
3505
|
+
};
|
|
3506
|
+
}
|
|
3507
|
+
});
|
|
3508
|
+
function resolveTourTarget(target, root = document) {
|
|
3509
|
+
if (!target) {
|
|
3510
|
+
return null;
|
|
3511
|
+
}
|
|
3512
|
+
let el = null;
|
|
3513
|
+
if (typeof target === "string") {
|
|
3514
|
+
try {
|
|
3515
|
+
el = root.querySelector(target);
|
|
3516
|
+
} catch {
|
|
3517
|
+
el = null;
|
|
3518
|
+
}
|
|
3519
|
+
} else if (typeof target === "function") {
|
|
3520
|
+
el = target();
|
|
3521
|
+
} else {
|
|
3522
|
+
el = target;
|
|
3523
|
+
}
|
|
3524
|
+
if (!(el instanceof HTMLElement) || !el.isConnected || el.getClientRects().length === 0) {
|
|
3525
|
+
return null;
|
|
3526
|
+
}
|
|
3527
|
+
return el;
|
|
3528
|
+
}
|
|
3529
|
+
function spotlightRect(rect, padding) {
|
|
3530
|
+
return { top: rect.top - padding, left: rect.left - padding, width: rect.width + padding * 2, height: rect.height + padding * 2 };
|
|
3531
|
+
}
|
|
3532
|
+
function holeClipPath(hole, viewport, radius) {
|
|
3533
|
+
const r = Math.max(0, Math.min(radius, hole.width / 2, hole.height / 2));
|
|
3534
|
+
const { left: x, top: y, width: w, height: h } = hole;
|
|
3535
|
+
const f = (n) => +n.toFixed(2);
|
|
3536
|
+
const window2 = `M${f(x + r)} ${f(y)}H${f(x + w - r)}A${f(r)} ${f(r)} 0 0 1 ${f(x + w)} ${f(y + r)}V${f(y + h - r)}A${f(r)} ${f(r)} 0 0 1 ${f(x + w - r)} ${f(y + h)}H${f(x + r)}A${f(r)} ${f(r)} 0 0 1 ${f(x)} ${f(y + h - r)}V${f(y + r)}A${f(r)} ${f(r)} 0 0 1 ${f(x + r)} ${f(y)}Z`;
|
|
3537
|
+
return `path(evenodd, "M0 0H${f(viewport.width)}V${f(viewport.height)}H0Z${window2}")`;
|
|
3538
|
+
}
|
|
3539
|
+
function isInView(rect, viewport, margin = 0) {
|
|
3540
|
+
return rect.top >= margin && rect.left >= margin && rect.top + rect.height <= viewport.height - margin && rect.left + rect.width <= viewport.width - margin;
|
|
3541
|
+
}
|
|
3542
|
+
const _hoisted_1$U = {
|
|
3543
|
+
key: 0,
|
|
3544
|
+
class: "tao-tour"
|
|
3545
|
+
};
|
|
3546
|
+
const _hoisted_2$N = {
|
|
3547
|
+
key: 1,
|
|
3548
|
+
class: "tao-tour__dim",
|
|
3549
|
+
"aria-hidden": "true"
|
|
3550
|
+
};
|
|
3551
|
+
const _hoisted_3$G = ["aria-labelledby", "aria-describedby"];
|
|
3552
|
+
const _hoisted_4$z = ["id"];
|
|
3553
|
+
const _hoisted_5$q = ["id"];
|
|
3554
|
+
const _hoisted_6$l = { class: "tao-tour__footer" };
|
|
3555
|
+
const _hoisted_7$h = {
|
|
3556
|
+
key: 0,
|
|
3557
|
+
class: "tao-tour__progress"
|
|
3558
|
+
};
|
|
3559
|
+
const _hoisted_8$b = {
|
|
3560
|
+
class: "tao-tour__dots",
|
|
3561
|
+
"aria-hidden": "true"
|
|
3562
|
+
};
|
|
3563
|
+
const _hoisted_9$8 = { class: "tao-tour__progress-text" };
|
|
3564
|
+
const _hoisted_10$4 = { class: "tao-tour__actions" };
|
|
3565
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
3566
|
+
...{ name: "TaoTour" },
|
|
3567
|
+
__name: "TaoTour",
|
|
3568
|
+
props: {
|
|
3569
|
+
step: { default: null },
|
|
3570
|
+
index: { default: 0 },
|
|
3571
|
+
count: { default: 0 },
|
|
3572
|
+
first: { type: Boolean, default: void 0 },
|
|
3573
|
+
last: { type: Boolean, default: void 0 },
|
|
3574
|
+
placement: { default: "bottom" },
|
|
3575
|
+
padding: { default: 6 },
|
|
3576
|
+
interactive: { type: Boolean, default: false },
|
|
3577
|
+
nextLabel: { default: void 0 },
|
|
3578
|
+
prevLabel: { default: void 0 },
|
|
3579
|
+
skipLabel: { default: void 0 },
|
|
3580
|
+
doneLabel: { default: void 0 },
|
|
3581
|
+
progressLabel: { default: void 0 }
|
|
3582
|
+
},
|
|
3583
|
+
emits: ["next", "prev", "skip"],
|
|
3584
|
+
setup(__props, { emit: __emit }) {
|
|
3585
|
+
const props = __props;
|
|
3586
|
+
const emit = __emit;
|
|
3587
|
+
const l10n = useLocaleText(props, "tour");
|
|
3588
|
+
const open = computed(() => props.step !== null);
|
|
3589
|
+
const isFirst = computed(() => props.first ?? props.index <= 0);
|
|
3590
|
+
const isLast = computed(() => props.last ?? props.index >= props.count - 1);
|
|
3591
|
+
const cardRef = ref(null);
|
|
3592
|
+
const targetEl = ref(null);
|
|
3593
|
+
const rect = ref(null);
|
|
3594
|
+
const titleId = useId();
|
|
3595
|
+
const textId = useId();
|
|
3596
|
+
useLayer(open, { onEscape: () => emit("skip"), restoreFocus: true });
|
|
3597
|
+
const floating = useFloating(targetEl, cardRef, () => open.value && targetEl.value !== null, {
|
|
3598
|
+
placement: () => props.step?.placement ?? props.placement,
|
|
3599
|
+
gap: 8 + props.padding,
|
|
3600
|
+
fixed: true
|
|
3601
|
+
});
|
|
3602
|
+
const hole = computed(() => rect.value ? spotlightRect(rect.value, props.padding) : null);
|
|
3603
|
+
const viewport = ref({ width: 0, height: 0 });
|
|
3604
|
+
const hasTarget = computed(() => targetEl.value !== null && hole.value !== null);
|
|
3605
|
+
const holeStyle = computed(() => {
|
|
3606
|
+
const h = hole.value;
|
|
3607
|
+
return h ? { top: `${h.top}px`, left: `${h.left}px`, width: `${h.width}px`, height: `${h.height}px` } : {};
|
|
3608
|
+
});
|
|
3609
|
+
const blockerStyle = computed(() => {
|
|
3610
|
+
if (!props.interactive || !hole.value) {
|
|
3611
|
+
return {};
|
|
3612
|
+
}
|
|
3613
|
+
return { clipPath: holeClipPath(hole.value, viewport.value, 8) };
|
|
3614
|
+
});
|
|
3615
|
+
const cardStyle = computed(() => hasTarget.value ? floating.style.value : {});
|
|
3616
|
+
const arrowStyle = computed(() => {
|
|
3617
|
+
const el = cardRef.value;
|
|
3618
|
+
if (!hasTarget.value || !el) {
|
|
3619
|
+
return {};
|
|
3620
|
+
}
|
|
3621
|
+
const pad = 14;
|
|
3622
|
+
const { x, y } = floating.anchorOffset.value;
|
|
3623
|
+
if (floating.side.value === "top" || floating.side.value === "bottom") {
|
|
3624
|
+
return { left: `${Math.min(el.offsetWidth - pad, Math.max(pad, x))}px` };
|
|
3625
|
+
}
|
|
3626
|
+
return { top: `${Math.min(el.offsetHeight - pad, Math.max(pad, y))}px` };
|
|
3627
|
+
});
|
|
3628
|
+
const progress = computed(() => formatText(l10n.value.progressLabel, { n: props.index + 1, count: props.count }));
|
|
3629
|
+
const dots = computed(() => Array.from({ length: Math.max(0, props.count) }, (_, i) => i));
|
|
3630
|
+
function measure() {
|
|
3631
|
+
const el = targetEl.value;
|
|
3632
|
+
viewport.value = { width: window.innerWidth, height: window.innerHeight };
|
|
3633
|
+
if (!el || !el.isConnected) {
|
|
3634
|
+
rect.value = null;
|
|
3635
|
+
return;
|
|
3636
|
+
}
|
|
3637
|
+
const r = el.getBoundingClientRect();
|
|
3638
|
+
rect.value = { top: r.top, left: r.left, width: r.width, height: r.height };
|
|
3639
|
+
}
|
|
3640
|
+
let frame = 0;
|
|
3641
|
+
function onViewportChange() {
|
|
3642
|
+
if (frame) {
|
|
3643
|
+
return;
|
|
3644
|
+
}
|
|
3645
|
+
frame = window.requestAnimationFrame(() => {
|
|
3646
|
+
frame = 0;
|
|
3647
|
+
measure();
|
|
3648
|
+
floating.update();
|
|
3649
|
+
});
|
|
3650
|
+
}
|
|
3651
|
+
let resizeObserver = null;
|
|
3652
|
+
function stopWatching() {
|
|
3653
|
+
if (typeof window === "undefined") {
|
|
3654
|
+
return;
|
|
3655
|
+
}
|
|
3656
|
+
window.removeEventListener("scroll", onViewportChange, true);
|
|
3657
|
+
window.removeEventListener("resize", onViewportChange);
|
|
3658
|
+
resizeObserver?.disconnect();
|
|
3659
|
+
resizeObserver = null;
|
|
3660
|
+
if (frame) {
|
|
3661
|
+
window.cancelAnimationFrame(frame);
|
|
3662
|
+
frame = 0;
|
|
3663
|
+
}
|
|
3664
|
+
}
|
|
3665
|
+
async function focusCard() {
|
|
3666
|
+
await nextTick();
|
|
3667
|
+
const card = cardRef.value;
|
|
3668
|
+
if (!card) {
|
|
3669
|
+
return;
|
|
3670
|
+
}
|
|
3671
|
+
card.focus({ preventScroll: true });
|
|
3672
|
+
}
|
|
3673
|
+
async function showStep() {
|
|
3674
|
+
if (typeof window === "undefined") {
|
|
3675
|
+
return;
|
|
3676
|
+
}
|
|
3677
|
+
stopWatching();
|
|
3678
|
+
const step = props.step;
|
|
3679
|
+
if (!step) {
|
|
3680
|
+
targetEl.value = null;
|
|
3681
|
+
rect.value = null;
|
|
3682
|
+
return;
|
|
3683
|
+
}
|
|
3684
|
+
const el = resolveTourTarget(step.target);
|
|
3685
|
+
targetEl.value = el;
|
|
3686
|
+
if (el) {
|
|
3687
|
+
const r = el.getBoundingClientRect();
|
|
3688
|
+
const inView = isInView(r, { width: window.innerWidth, height: window.innerHeight }, 8);
|
|
3689
|
+
if (!inView) {
|
|
3690
|
+
const calm = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
3691
|
+
el.scrollIntoView({ block: "center", inline: "nearest", behavior: calm ? "auto" : "smooth" });
|
|
3692
|
+
}
|
|
3693
|
+
window.addEventListener("scroll", onViewportChange, true);
|
|
3694
|
+
window.addEventListener("resize", onViewportChange);
|
|
3695
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
3696
|
+
resizeObserver = new ResizeObserver(onViewportChange);
|
|
3697
|
+
resizeObserver.observe(el);
|
|
3698
|
+
}
|
|
3699
|
+
}
|
|
3700
|
+
measure();
|
|
3701
|
+
await nextTick();
|
|
3702
|
+
floating.update();
|
|
3703
|
+
focusCard();
|
|
3704
|
+
}
|
|
3705
|
+
watch(() => props.step, showStep, { immediate: true, flush: "post" });
|
|
3706
|
+
onBeforeUnmount(stopWatching);
|
|
3707
|
+
function onKeydown2(event) {
|
|
3708
|
+
if (event.key === "ArrowRight") {
|
|
3709
|
+
event.preventDefault();
|
|
3710
|
+
emit("next");
|
|
3711
|
+
} else if (event.key === "ArrowLeft" && !isFirst.value) {
|
|
3712
|
+
event.preventDefault();
|
|
3713
|
+
emit("prev");
|
|
3714
|
+
} else if (!props.interactive && cardRef.value) {
|
|
3715
|
+
trapTab(event, cardRef.value);
|
|
3716
|
+
}
|
|
3717
|
+
}
|
|
3718
|
+
function onBlockerPointerDown(event) {
|
|
3719
|
+
event.preventDefault();
|
|
3720
|
+
const card = cardRef.value;
|
|
3721
|
+
(card && getFocusable(card)[0] ? getFocusable(card).at(-1) : card)?.focus({ preventScroll: true });
|
|
3722
|
+
}
|
|
3723
|
+
return (_ctx, _cache) => {
|
|
3724
|
+
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
3725
|
+
__props.step ? (openBlock(), createElementBlock("div", _hoisted_1$U, [
|
|
3726
|
+
createElementVNode("div", {
|
|
3727
|
+
class: "tao-tour__blocker",
|
|
3728
|
+
style: normalizeStyle(blockerStyle.value),
|
|
3729
|
+
onPointerdown: onBlockerPointerDown
|
|
3730
|
+
}, null, 36),
|
|
3731
|
+
hasTarget.value ? (openBlock(), createElementBlock("div", {
|
|
3732
|
+
key: 0,
|
|
3733
|
+
class: "tao-tour__hole",
|
|
3734
|
+
style: normalizeStyle(holeStyle.value),
|
|
3735
|
+
"aria-hidden": "true"
|
|
3736
|
+
}, null, 4)) : (openBlock(), createElementBlock("div", _hoisted_2$N)),
|
|
3737
|
+
createElementVNode("div", {
|
|
3738
|
+
ref_key: "cardRef",
|
|
3739
|
+
ref: cardRef,
|
|
3740
|
+
class: normalizeClass(["tao-tour__card", [hasTarget.value ? `tao-tour__card--${unref(floating).side.value}` : "tao-tour__card--centered", { "tao-tour__card--placed": !hasTarget.value || unref(floating).placed.value }]]),
|
|
3741
|
+
role: "dialog",
|
|
3742
|
+
"aria-labelledby": __props.step.title ? unref(titleId) : void 0,
|
|
3743
|
+
"aria-describedby": __props.step.text ? unref(textId) : void 0,
|
|
3744
|
+
tabindex: "-1",
|
|
3745
|
+
style: normalizeStyle(cardStyle.value),
|
|
3746
|
+
onKeydown: onKeydown2
|
|
3747
|
+
}, [
|
|
3748
|
+
hasTarget.value ? (openBlock(), createElementBlock("span", {
|
|
3749
|
+
key: 0,
|
|
3750
|
+
class: "tao-tour__arrow",
|
|
3751
|
+
style: normalizeStyle(arrowStyle.value),
|
|
3752
|
+
"aria-hidden": "true"
|
|
3753
|
+
}, null, 4)) : createCommentVNode("", true),
|
|
3754
|
+
renderSlot(_ctx.$slots, "default", {
|
|
3755
|
+
step: __props.step,
|
|
3756
|
+
index: __props.index,
|
|
3757
|
+
count: __props.count
|
|
3758
|
+
}, () => [
|
|
3759
|
+
__props.step.title ? (openBlock(), createElementBlock("p", {
|
|
3760
|
+
key: 0,
|
|
3761
|
+
id: unref(titleId),
|
|
3762
|
+
class: "tao-tour__title"
|
|
3763
|
+
}, toDisplayString(__props.step.title), 9, _hoisted_4$z)) : createCommentVNode("", true),
|
|
3764
|
+
__props.step.text ? (openBlock(), createElementBlock("p", {
|
|
3765
|
+
key: 1,
|
|
3766
|
+
id: unref(textId),
|
|
3767
|
+
class: "tao-tour__text"
|
|
3768
|
+
}, toDisplayString(__props.step.text), 9, _hoisted_5$q)) : createCommentVNode("", true)
|
|
3769
|
+
]),
|
|
3770
|
+
createElementVNode("div", _hoisted_6$l, [
|
|
3771
|
+
__props.count > 1 ? (openBlock(), createElementBlock("span", _hoisted_7$h, [
|
|
3772
|
+
createElementVNode("span", _hoisted_8$b, [
|
|
3773
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(dots.value, (i) => {
|
|
3774
|
+
return openBlock(), createElementBlock("i", {
|
|
3775
|
+
key: i,
|
|
3776
|
+
class: normalizeClass({ "tao-tour__dot--on": i === __props.index })
|
|
3777
|
+
}, null, 2);
|
|
3778
|
+
}), 128))
|
|
3779
|
+
]),
|
|
3780
|
+
createElementVNode("span", _hoisted_9$8, toDisplayString(progress.value), 1)
|
|
3781
|
+
])) : createCommentVNode("", true),
|
|
3782
|
+
createElementVNode("span", _hoisted_10$4, [
|
|
3783
|
+
!isLast.value ? (openBlock(), createBlock(TaoButton, {
|
|
3784
|
+
key: 0,
|
|
3785
|
+
size: "small",
|
|
3786
|
+
variant: "text",
|
|
3787
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("skip"))
|
|
3788
|
+
}, {
|
|
3789
|
+
default: withCtx(() => [
|
|
3790
|
+
createTextVNode(toDisplayString(unref(l10n).skipLabel), 1)
|
|
3791
|
+
]),
|
|
3792
|
+
_: 1
|
|
3793
|
+
})) : createCommentVNode("", true),
|
|
3794
|
+
!isFirst.value ? (openBlock(), createBlock(TaoButton, {
|
|
3795
|
+
key: 1,
|
|
3796
|
+
size: "small",
|
|
3797
|
+
variant: "secondary",
|
|
3798
|
+
onClick: _cache[1] || (_cache[1] = ($event) => emit("prev"))
|
|
3799
|
+
}, {
|
|
3800
|
+
default: withCtx(() => [
|
|
3801
|
+
createTextVNode(toDisplayString(unref(l10n).prevLabel), 1)
|
|
3802
|
+
]),
|
|
3803
|
+
_: 1
|
|
3804
|
+
})) : createCommentVNode("", true),
|
|
3805
|
+
createVNode(TaoButton, {
|
|
3806
|
+
size: "small",
|
|
3807
|
+
onClick: _cache[2] || (_cache[2] = ($event) => emit("next"))
|
|
3808
|
+
}, {
|
|
3809
|
+
default: withCtx(() => [
|
|
3810
|
+
createTextVNode(toDisplayString(isLast.value ? unref(l10n).doneLabel : unref(l10n).nextLabel), 1)
|
|
3811
|
+
]),
|
|
3812
|
+
_: 1
|
|
3813
|
+
})
|
|
3814
|
+
])
|
|
3815
|
+
])
|
|
3816
|
+
], 46, _hoisted_3$G)
|
|
3817
|
+
])) : createCommentVNode("", true)
|
|
3818
|
+
]);
|
|
3819
|
+
};
|
|
3820
|
+
}
|
|
3821
|
+
});
|
|
3404
3822
|
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
3405
3823
|
...{ name: "TaoContainer" },
|
|
3406
3824
|
__name: "TaoContainer",
|
|
@@ -8445,7 +8863,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8445
8863
|
}, null, 4)
|
|
8446
8864
|
], 44, _hoisted_1$o),
|
|
8447
8865
|
createElementVNode("div", _hoisted_2$m, [
|
|
8448
|
-
createVNode(_sfc_main$
|
|
8866
|
+
createVNode(_sfc_main$18, {
|
|
8449
8867
|
modelValue: hueValue.value,
|
|
8450
8868
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => hueValue.value = $event),
|
|
8451
8869
|
class: "tao-color-picker__hue",
|
|
@@ -8457,7 +8875,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8457
8875
|
"aria-label": unref(l10n).hueLabel,
|
|
8458
8876
|
onChange: _cache[1] || (_cache[1] = ($event) => emit("change", hex.value))
|
|
8459
8877
|
}, null, 8, ["modelValue", "disabled", "aria-label"]),
|
|
8460
|
-
__props.alpha ? (openBlock(), createBlock(_sfc_main$
|
|
8878
|
+
__props.alpha ? (openBlock(), createBlock(_sfc_main$18, {
|
|
8461
8879
|
key: 0,
|
|
8462
8880
|
modelValue: alphaValue.value,
|
|
8463
8881
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => alphaValue.value = $event),
|
|
@@ -13190,6 +13608,8 @@ const components = [
|
|
|
13190
13608
|
TaoSpoiler,
|
|
13191
13609
|
TaoSpoilerGroup,
|
|
13192
13610
|
TaoCopy,
|
|
13611
|
+
_sfc_main$11,
|
|
13612
|
+
_sfc_main$10,
|
|
13193
13613
|
TaoContainer,
|
|
13194
13614
|
_sfc_main$_,
|
|
13195
13615
|
TaoSpace,
|
|
@@ -13207,7 +13627,7 @@ const components = [
|
|
|
13207
13627
|
TaoTextarea,
|
|
13208
13628
|
TaoScrollTop,
|
|
13209
13629
|
TaoProgress,
|
|
13210
|
-
_sfc_main$
|
|
13630
|
+
_sfc_main$18,
|
|
13211
13631
|
_sfc_main$M,
|
|
13212
13632
|
TaoFileDrop,
|
|
13213
13633
|
TaoDropdownMenu,
|
|
@@ -13335,7 +13755,7 @@ export {
|
|
|
13335
13755
|
TaoSegmentedOption,
|
|
13336
13756
|
TaoSelect,
|
|
13337
13757
|
TaoSkeleton,
|
|
13338
|
-
_sfc_main$
|
|
13758
|
+
_sfc_main$18 as TaoSlider,
|
|
13339
13759
|
TaoSpace,
|
|
13340
13760
|
TaoSparkline,
|
|
13341
13761
|
TaoSplit,
|
|
@@ -13347,15 +13767,18 @@ export {
|
|
|
13347
13767
|
TaoTabs,
|
|
13348
13768
|
TaoTag,
|
|
13349
13769
|
TaoTextarea,
|
|
13770
|
+
_sfc_main$11 as TaoThemeToggle,
|
|
13350
13771
|
TaoTimeline,
|
|
13351
13772
|
TaoToastViewport,
|
|
13352
13773
|
TaoToolbar,
|
|
13353
13774
|
TaoToolbarGroup,
|
|
13354
13775
|
TaoToolbarSeparator,
|
|
13355
13776
|
TaoTooltip,
|
|
13777
|
+
_sfc_main$10 as TaoTour,
|
|
13356
13778
|
TaoTree,
|
|
13357
13779
|
TaoUI,
|
|
13358
13780
|
apcaContrast,
|
|
13781
|
+
applyTaoMode,
|
|
13359
13782
|
applyTaoPalette,
|
|
13360
13783
|
colorModel,
|
|
13361
13784
|
confirm,
|
|
@@ -13377,7 +13800,9 @@ export {
|
|
|
13377
13800
|
parseTaoDateInput,
|
|
13378
13801
|
parseTaoDateRange,
|
|
13379
13802
|
provideTaoLocale,
|
|
13803
|
+
readTaoMode,
|
|
13380
13804
|
registerTaoIcons,
|
|
13805
|
+
resolveTourTarget,
|
|
13381
13806
|
rgbToHsl,
|
|
13382
13807
|
rgbaToHsva,
|
|
13383
13808
|
setTaoLocale,
|