@1337exp/taoui 5.24.0 → 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 +5 -0
- package/README.md +1 -0
- package/README.ru.md +1 -0
- package/dist/index.d.ts +484 -341
- package/dist/index.js +488 -169
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/SKILL.md +1 -1
- package/skills/taoui/references/components.md +19 -0
package/dist/index.js
CHANGED
|
@@ -97,9 +97,9 @@ function resolveTaoIcon(name) {
|
|
|
97
97
|
return name.startsWith(TAO_ICON_PREFIX) ? builtin[name.slice(TAO_ICON_PREFIX.length)] : registered[name];
|
|
98
98
|
}
|
|
99
99
|
const taoIconNames = Object.keys(builtin).map((name) => TAO_ICON_PREFIX + name);
|
|
100
|
-
const _hoisted_1$
|
|
101
|
-
const _hoisted_2$
|
|
102
|
-
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({
|
|
103
103
|
...{ name: "TaoIcon" },
|
|
104
104
|
__name: "TaoIcon",
|
|
105
105
|
props: {
|
|
@@ -119,7 +119,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
119
119
|
}
|
|
120
120
|
const box = computed(() => props.size ? `${props.size}px` : "1em");
|
|
121
121
|
return (_ctx, _cache) => {
|
|
122
|
-
return openBlock(), createElementBlock("span", _hoisted_1$
|
|
122
|
+
return openBlock(), createElementBlock("span", _hoisted_1$18, [
|
|
123
123
|
renderSlot(_ctx.$slots, "prefix", {}, void 0, true),
|
|
124
124
|
def.value ? (openBlock(), createElementBlock("svg", {
|
|
125
125
|
key: 0,
|
|
@@ -135,7 +135,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
135
135
|
"aria-hidden": "true",
|
|
136
136
|
focusable: "false",
|
|
137
137
|
innerHTML: def.value.body
|
|
138
|
-
}, null, 10, _hoisted_2$
|
|
138
|
+
}, null, 10, _hoisted_2$_)) : (openBlock(), createElementBlock("i", {
|
|
139
139
|
key: 1,
|
|
140
140
|
class: normalizeClass(["tao-icon__value", [`icon-${props.name}`, { "tao-icon__value--invert": props.invert }]]),
|
|
141
141
|
style: normalizeStyle(props.size ? `font-size: ${props.size}px` : "")
|
|
@@ -152,7 +152,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
152
152
|
}
|
|
153
153
|
return target;
|
|
154
154
|
};
|
|
155
|
-
const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
155
|
+
const TaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["__scopeId", "data-v-ef842331"]]);
|
|
156
156
|
const localeEn = {
|
|
157
157
|
code: "en-US",
|
|
158
158
|
alert: { closeLabel: "Close", detailsLabel: "Details" },
|
|
@@ -187,6 +187,7 @@ const localeEn = {
|
|
|
187
187
|
},
|
|
188
188
|
confirm: { ok: "OK", cancel: "Cancel" },
|
|
189
189
|
copy: { copyLabel: "Copy", successText: "Copied!" },
|
|
190
|
+
tour: { nextLabel: "Next", prevLabel: "Back", skipLabel: "Skip", doneLabel: "Done", progressLabel: "Step {n} of {count}" },
|
|
190
191
|
themeToggle: { toLightLabel: "Switch to the light theme", toDarkLabel: "Switch to the dark theme" },
|
|
191
192
|
loader: { label: "Loading" },
|
|
192
193
|
date: {
|
|
@@ -417,6 +418,7 @@ const localeRu = {
|
|
|
417
418
|
},
|
|
418
419
|
confirm: { ok: "ОК", cancel: "Отмена" },
|
|
419
420
|
copy: { copyLabel: "Копировать", successText: "Скопировано!" },
|
|
421
|
+
tour: { nextLabel: "Далее", prevLabel: "Назад", skipLabel: "Пропустить", doneLabel: "Готово", progressLabel: "Шаг {n} из {count}" },
|
|
420
422
|
themeToggle: { toLightLabel: "Включить светлую тему", toDarkLabel: "Включить тёмную тему" },
|
|
421
423
|
loader: { label: "Загрузка" },
|
|
422
424
|
date: {
|
|
@@ -539,27 +541,27 @@ function useLocaleText(props, section) {
|
|
|
539
541
|
function formatText(template, values) {
|
|
540
542
|
return template.replace(/\{(\w+)\}/g, (match, key) => key in values ? String(values[key]) : match);
|
|
541
543
|
}
|
|
542
|
-
const _hoisted_1$
|
|
543
|
-
const _hoisted_2$
|
|
544
|
+
const _hoisted_1$17 = ["role", "aria-hidden"];
|
|
545
|
+
const _hoisted_2$Z = {
|
|
544
546
|
key: 0,
|
|
545
547
|
class: "tao-loader__ellipsis",
|
|
546
548
|
"aria-hidden": "true"
|
|
547
549
|
};
|
|
548
|
-
const _hoisted_3$
|
|
550
|
+
const _hoisted_3$R = {
|
|
549
551
|
key: 1,
|
|
550
552
|
class: "tao-loader__ring",
|
|
551
553
|
"aria-hidden": "true"
|
|
552
554
|
};
|
|
553
|
-
const _hoisted_4$
|
|
555
|
+
const _hoisted_4$G = {
|
|
554
556
|
key: 2,
|
|
555
557
|
class: "tao-loader__pulse",
|
|
556
558
|
"aria-hidden": "true"
|
|
557
559
|
};
|
|
558
|
-
const _hoisted_5$
|
|
560
|
+
const _hoisted_5$w = {
|
|
559
561
|
key: 3,
|
|
560
562
|
class: "tao-sr-only"
|
|
561
563
|
};
|
|
562
|
-
const _sfc_main$
|
|
564
|
+
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
563
565
|
...{ name: "TaoLoader" },
|
|
564
566
|
__name: "TaoLoader",
|
|
565
567
|
props: {
|
|
@@ -597,29 +599,29 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
597
599
|
role: __props.decorative ? void 0 : "status",
|
|
598
600
|
"aria-hidden": __props.decorative ? "true" : void 0
|
|
599
601
|
}, [
|
|
600
|
-
__props.variant === "dots" ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
602
|
+
__props.variant === "dots" ? (openBlock(), createElementBlock("div", _hoisted_2$Z, [..._cache[0] || (_cache[0] = [
|
|
601
603
|
createElementVNode("div", null, null, -1),
|
|
602
604
|
createElementVNode("div", null, null, -1),
|
|
603
605
|
createElementVNode("div", null, null, -1),
|
|
604
606
|
createElementVNode("div", null, null, -1)
|
|
605
|
-
])])) : __props.variant === "ring" ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
606
|
-
!__props.decorative ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
607
|
-
], 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);
|
|
608
610
|
};
|
|
609
611
|
}
|
|
610
612
|
});
|
|
611
|
-
const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
612
|
-
const _hoisted_1$
|
|
613
|
-
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 = {
|
|
614
616
|
key: 2,
|
|
615
617
|
class: "tao-button__content"
|
|
616
618
|
};
|
|
617
|
-
const _hoisted_3$
|
|
619
|
+
const _hoisted_3$Q = {
|
|
618
620
|
key: 4,
|
|
619
621
|
class: "tao-button__shortcut",
|
|
620
622
|
"aria-hidden": "true"
|
|
621
623
|
};
|
|
622
|
-
const _sfc_main$
|
|
624
|
+
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
623
625
|
...{ name: "TaoButton" },
|
|
624
626
|
__name: "TaoButton",
|
|
625
627
|
props: {
|
|
@@ -693,7 +695,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
693
695
|
class: "tao-button__icon",
|
|
694
696
|
name: __props.icon
|
|
695
697
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
696
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
698
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$Y, [
|
|
697
699
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
698
700
|
])) : createCommentVNode("", true),
|
|
699
701
|
__props.iconEnd ? (openBlock(), createBlock(TaoIcon, {
|
|
@@ -701,12 +703,12 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
701
703
|
class: "tao-button__icon",
|
|
702
704
|
name: __props.iconEnd
|
|
703
705
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
704
|
-
__props.shortcut ? (openBlock(), createElementBlock("kbd", _hoisted_3$
|
|
705
|
-
], 14, _hoisted_1$
|
|
706
|
+
__props.shortcut ? (openBlock(), createElementBlock("kbd", _hoisted_3$Q, toDisplayString(__props.shortcut), 1)) : createCommentVNode("", true)
|
|
707
|
+
], 14, _hoisted_1$16);
|
|
706
708
|
};
|
|
707
709
|
}
|
|
708
710
|
});
|
|
709
|
-
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
711
|
+
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["__scopeId", "data-v-278f587a"]]);
|
|
710
712
|
function toCssLength(value) {
|
|
711
713
|
if (value === void 0 || value === null || value === "") {
|
|
712
714
|
return void 0;
|
|
@@ -725,7 +727,7 @@ function stripeClasses(stripe, tone = "accent") {
|
|
|
725
727
|
function surfaceClass(surface) {
|
|
726
728
|
return surface && surface !== "flat" ? `tao-surface-${surface}` : void 0;
|
|
727
729
|
}
|
|
728
|
-
const _sfc_main$
|
|
730
|
+
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
729
731
|
...{ name: "TaoBlock" },
|
|
730
732
|
__name: "TaoBlock",
|
|
731
733
|
props: {
|
|
@@ -758,7 +760,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
758
760
|
};
|
|
759
761
|
}
|
|
760
762
|
});
|
|
761
|
-
const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
763
|
+
const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["__scopeId", "data-v-1fc66575"]]);
|
|
762
764
|
function useControlAttrs() {
|
|
763
765
|
const attrs = useAttrs();
|
|
764
766
|
return {
|
|
@@ -780,16 +782,16 @@ function useField(props) {
|
|
|
780
782
|
const describedBy = computed(() => field?.describedBy.value);
|
|
781
783
|
return { field, controlId, invalid, describedBy, localId };
|
|
782
784
|
}
|
|
783
|
-
const _hoisted_1$
|
|
785
|
+
const _hoisted_1$15 = {
|
|
784
786
|
key: 0,
|
|
785
787
|
class: "tao-input__affix tao-input__affix--prefix"
|
|
786
788
|
};
|
|
787
|
-
const _hoisted_2$
|
|
788
|
-
const _hoisted_3$
|
|
789
|
+
const _hoisted_2$X = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
|
|
790
|
+
const _hoisted_3$P = {
|
|
789
791
|
key: 1,
|
|
790
792
|
class: "tao-input__affix tao-input__affix--suffix"
|
|
791
793
|
};
|
|
792
|
-
const _sfc_main$
|
|
794
|
+
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
793
795
|
...{ name: "TaoInput", inheritAttrs: false },
|
|
794
796
|
__name: "TaoInput",
|
|
795
797
|
props: {
|
|
@@ -835,7 +837,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
835
837
|
"tao-input-shell--suffix": _ctx.$slots.suffix
|
|
836
838
|
}])
|
|
837
839
|
}, [
|
|
838
|
-
_ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
840
|
+
_ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_1$15, [
|
|
839
841
|
renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
840
842
|
])) : createCommentVNode("", true),
|
|
841
843
|
createElementVNode("input", mergeProps(unref(controlAttrs)(), {
|
|
@@ -850,8 +852,8 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
850
852
|
onInput: handleInput,
|
|
851
853
|
onBlur: handleBlur,
|
|
852
854
|
onFocus: handleFocus
|
|
853
|
-
}), null, 16, _hoisted_2$
|
|
854
|
-
_ctx.$slots.suffix ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
855
|
+
}), null, 16, _hoisted_2$X),
|
|
856
|
+
_ctx.$slots.suffix ? (openBlock(), createElementBlock("span", _hoisted_3$P, [
|
|
855
857
|
renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
|
|
856
858
|
])) : createCommentVNode("", true)
|
|
857
859
|
], 2)
|
|
@@ -859,17 +861,17 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
859
861
|
};
|
|
860
862
|
}
|
|
861
863
|
});
|
|
862
|
-
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
863
|
-
const _hoisted_1$
|
|
864
|
+
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["__scopeId", "data-v-5b617319"]]);
|
|
865
|
+
const _hoisted_1$14 = {
|
|
864
866
|
key: 0,
|
|
865
867
|
class: "tao-input-group__addon tao-input-group__addon--before"
|
|
866
868
|
};
|
|
867
|
-
const _hoisted_2$
|
|
868
|
-
const _hoisted_3$
|
|
869
|
+
const _hoisted_2$W = { class: "tao-input-group__field" };
|
|
870
|
+
const _hoisted_3$O = {
|
|
869
871
|
key: 1,
|
|
870
872
|
class: "tao-input-group__addon tao-input-group__addon--after"
|
|
871
873
|
};
|
|
872
|
-
const _sfc_main$
|
|
874
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
873
875
|
...{ name: "TaoInputGroup" },
|
|
874
876
|
__name: "TaoInputGroup",
|
|
875
877
|
props: {
|
|
@@ -894,30 +896,30 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
894
896
|
onFocusin: onFocusIn,
|
|
895
897
|
onFocusout: onFocusOut
|
|
896
898
|
}, [
|
|
897
|
-
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
899
|
+
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_1$14, [
|
|
898
900
|
renderSlot(_ctx.$slots, "before", {}, void 0, true)
|
|
899
901
|
])) : createCommentVNode("", true),
|
|
900
|
-
createElementVNode("div", _hoisted_2$
|
|
902
|
+
createElementVNode("div", _hoisted_2$W, [
|
|
901
903
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
902
904
|
]),
|
|
903
|
-
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
905
|
+
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_3$O, [
|
|
904
906
|
renderSlot(_ctx.$slots, "after", {}, void 0, true)
|
|
905
907
|
])) : createCommentVNode("", true)
|
|
906
908
|
], 34);
|
|
907
909
|
};
|
|
908
910
|
}
|
|
909
911
|
});
|
|
910
|
-
const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
911
|
-
const _hoisted_1$
|
|
912
|
-
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 = {
|
|
913
915
|
key: 0,
|
|
914
916
|
class: "tao-input-number__steppers"
|
|
915
917
|
};
|
|
916
|
-
const _hoisted_3$
|
|
917
|
-
const _hoisted_4$
|
|
918
|
-
const _hoisted_5$
|
|
919
|
-
const _hoisted_6$
|
|
920
|
-
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({
|
|
921
923
|
...{ name: "TaoInputNumber", inheritAttrs: false },
|
|
922
924
|
__name: "TaoInputNumber",
|
|
923
925
|
props: {
|
|
@@ -1076,8 +1078,8 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
1076
1078
|
onFocus,
|
|
1077
1079
|
onBlur,
|
|
1078
1080
|
onKeydown: onKeydown2
|
|
1079
|
-
}), null, 16, _hoisted_1$
|
|
1080
|
-
__props.controls ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
1081
|
+
}), null, 16, _hoisted_1$13),
|
|
1082
|
+
__props.controls ? (openBlock(), createElementBlock("div", _hoisted_2$V, [
|
|
1081
1083
|
createElementVNode("button", {
|
|
1082
1084
|
type: "button",
|
|
1083
1085
|
class: "tao-input-number__step",
|
|
@@ -1086,12 +1088,12 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
1086
1088
|
disabled: __props.disabled || atMax.value,
|
|
1087
1089
|
onClick: _cache[0] || (_cache[0] = ($event) => bump(1))
|
|
1088
1090
|
}, [
|
|
1089
|
-
createElementVNode("span", _hoisted_4$
|
|
1091
|
+
createElementVNode("span", _hoisted_4$F, [
|
|
1090
1092
|
renderSlot(_ctx.$slots, "increment-icon", {}, () => [
|
|
1091
1093
|
createVNode(TaoIcon, { name: "tao-plus" })
|
|
1092
1094
|
], true)
|
|
1093
1095
|
])
|
|
1094
|
-
], 8, _hoisted_3$
|
|
1096
|
+
], 8, _hoisted_3$N),
|
|
1095
1097
|
createElementVNode("button", {
|
|
1096
1098
|
type: "button",
|
|
1097
1099
|
class: "tao-input-number__step",
|
|
@@ -1100,24 +1102,24 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
1100
1102
|
disabled: __props.disabled || atMin.value,
|
|
1101
1103
|
onClick: _cache[1] || (_cache[1] = ($event) => bump(-1))
|
|
1102
1104
|
}, [
|
|
1103
|
-
createElementVNode("span", _hoisted_6$
|
|
1105
|
+
createElementVNode("span", _hoisted_6$p, [
|
|
1104
1106
|
renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
|
|
1105
1107
|
createVNode(TaoIcon, { name: "tao-minus" })
|
|
1106
1108
|
], true)
|
|
1107
1109
|
])
|
|
1108
|
-
], 8, _hoisted_5$
|
|
1110
|
+
], 8, _hoisted_5$v)
|
|
1109
1111
|
])) : createCommentVNode("", true)
|
|
1110
1112
|
], 16);
|
|
1111
1113
|
};
|
|
1112
1114
|
}
|
|
1113
1115
|
});
|
|
1114
|
-
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1115
|
-
const _hoisted_1$
|
|
1116
|
-
const _hoisted_2$
|
|
1117
|
-
const _hoisted_3$
|
|
1118
|
-
const _hoisted_4$
|
|
1119
|
-
const _hoisted_5$
|
|
1120
|
-
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({
|
|
1121
1123
|
...{ name: "TaoQuantity", inheritAttrs: false },
|
|
1122
1124
|
__name: "TaoQuantity",
|
|
1123
1125
|
props: {
|
|
@@ -1257,12 +1259,12 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
1257
1259
|
disabled: minusDisabled.value,
|
|
1258
1260
|
onClick: onDec
|
|
1259
1261
|
}, [
|
|
1260
|
-
createElementVNode("span", _hoisted_2$
|
|
1262
|
+
createElementVNode("span", _hoisted_2$U, [
|
|
1261
1263
|
renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
|
|
1262
1264
|
createVNode(TaoIcon, { name: "tao-minus" })
|
|
1263
1265
|
], true)
|
|
1264
1266
|
])
|
|
1265
|
-
], 8, _hoisted_1$
|
|
1267
|
+
], 8, _hoisted_1$12),
|
|
1266
1268
|
createElementVNode("input", mergeProps(unref(controlAttrs)(), {
|
|
1267
1269
|
id: unref(controlId),
|
|
1268
1270
|
class: "tao-quantity__input",
|
|
@@ -1282,7 +1284,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
1282
1284
|
onFocus,
|
|
1283
1285
|
onBlur,
|
|
1284
1286
|
onKeydown: onKeydown2
|
|
1285
|
-
}), null, 16, _hoisted_3$
|
|
1287
|
+
}), null, 16, _hoisted_3$M),
|
|
1286
1288
|
createElementVNode("button", {
|
|
1287
1289
|
type: "button",
|
|
1288
1290
|
class: "tao-quantity__btn tao-quantity__btn--inc",
|
|
@@ -1290,59 +1292,59 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
1290
1292
|
disabled: plusDisabled.value,
|
|
1291
1293
|
onClick: onInc
|
|
1292
1294
|
}, [
|
|
1293
|
-
createElementVNode("span", _hoisted_5$
|
|
1295
|
+
createElementVNode("span", _hoisted_5$u, [
|
|
1294
1296
|
renderSlot(_ctx.$slots, "increment-icon", {}, () => [
|
|
1295
1297
|
createVNode(TaoIcon, { name: "tao-plus" })
|
|
1296
1298
|
], true)
|
|
1297
1299
|
])
|
|
1298
|
-
], 8, _hoisted_4$
|
|
1300
|
+
], 8, _hoisted_4$E)
|
|
1299
1301
|
], 16);
|
|
1300
1302
|
};
|
|
1301
1303
|
}
|
|
1302
1304
|
});
|
|
1303
|
-
const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1304
|
-
const _hoisted_1$
|
|
1305
|
+
const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-6453479c"]]);
|
|
1306
|
+
const _hoisted_1$11 = {
|
|
1305
1307
|
key: 0,
|
|
1306
1308
|
class: "tao-card__media"
|
|
1307
1309
|
};
|
|
1308
|
-
const _hoisted_2$
|
|
1310
|
+
const _hoisted_2$T = {
|
|
1309
1311
|
key: 0,
|
|
1310
1312
|
class: "tao-card__overlay"
|
|
1311
1313
|
};
|
|
1312
|
-
const _hoisted_3$
|
|
1314
|
+
const _hoisted_3$L = {
|
|
1313
1315
|
key: 1,
|
|
1314
1316
|
class: "tao-card__overlay"
|
|
1315
1317
|
};
|
|
1316
|
-
const _hoisted_4$
|
|
1318
|
+
const _hoisted_4$D = {
|
|
1317
1319
|
key: 0,
|
|
1318
1320
|
class: "tao-card__header"
|
|
1319
1321
|
};
|
|
1320
|
-
const _hoisted_5$
|
|
1322
|
+
const _hoisted_5$t = {
|
|
1321
1323
|
key: 1,
|
|
1322
1324
|
class: "tao-card__title-block"
|
|
1323
1325
|
};
|
|
1324
|
-
const _hoisted_6$
|
|
1326
|
+
const _hoisted_6$o = {
|
|
1325
1327
|
key: 0,
|
|
1326
1328
|
class: "tao-card__title"
|
|
1327
1329
|
};
|
|
1328
|
-
const _hoisted_7$
|
|
1330
|
+
const _hoisted_7$j = {
|
|
1329
1331
|
key: 1,
|
|
1330
1332
|
class: "tao-card__sub"
|
|
1331
1333
|
};
|
|
1332
|
-
const _hoisted_8$
|
|
1334
|
+
const _hoisted_8$d = {
|
|
1333
1335
|
key: 2,
|
|
1334
1336
|
class: "tao-card__body"
|
|
1335
1337
|
};
|
|
1336
|
-
const _hoisted_9$
|
|
1338
|
+
const _hoisted_9$9 = {
|
|
1337
1339
|
key: 3,
|
|
1338
1340
|
class: "tao-card__footer"
|
|
1339
1341
|
};
|
|
1340
|
-
const _hoisted_10$
|
|
1342
|
+
const _hoisted_10$5 = {
|
|
1341
1343
|
key: 3,
|
|
1342
1344
|
class: "tao-card__corner"
|
|
1343
1345
|
};
|
|
1344
1346
|
const _hoisted_11$4 = ["aria-label"];
|
|
1345
|
-
const _sfc_main$
|
|
1347
|
+
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
1346
1348
|
...{ name: "TaoCard" },
|
|
1347
1349
|
__name: "TaoCard",
|
|
1348
1350
|
props: {
|
|
@@ -1395,12 +1397,12 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
1395
1397
|
}]]),
|
|
1396
1398
|
style: normalizeStyle(radiusStyle.value)
|
|
1397
1399
|
}, [
|
|
1398
|
-
_ctx.$slots.media ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1400
|
+
_ctx.$slots.media ? (openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
1399
1401
|
renderSlot(_ctx.$slots, "media", {}, void 0, true),
|
|
1400
|
-
_ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
1402
|
+
_ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_2$T, [
|
|
1401
1403
|
renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
|
|
1402
1404
|
])) : createCommentVNode("", true)
|
|
1403
|
-
])) : _ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
1405
|
+
])) : _ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_3$L, [
|
|
1404
1406
|
renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
|
|
1405
1407
|
])) : createCommentVNode("", true),
|
|
1406
1408
|
hasContent.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -1408,25 +1410,25 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
1408
1410
|
class: "tao-card__content",
|
|
1409
1411
|
style: normalizeStyle(paddingStyle.value)
|
|
1410
1412
|
}, [
|
|
1411
|
-
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
1413
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_4$D, [
|
|
1412
1414
|
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
1413
1415
|
])) : createCommentVNode("", true),
|
|
1414
|
-
_ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
1415
|
-
_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, [
|
|
1416
1418
|
renderSlot(_ctx.$slots, "title", {}, void 0, true)
|
|
1417
1419
|
])) : createCommentVNode("", true),
|
|
1418
|
-
_ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_7$
|
|
1420
|
+
_ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_7$j, [
|
|
1419
1421
|
renderSlot(_ctx.$slots, "sub", {}, void 0, true)
|
|
1420
1422
|
])) : createCommentVNode("", true)
|
|
1421
1423
|
])) : createCommentVNode("", true),
|
|
1422
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
1424
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_8$d, [
|
|
1423
1425
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1424
1426
|
])) : createCommentVNode("", true),
|
|
1425
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_9$
|
|
1427
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_9$9, [
|
|
1426
1428
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1427
1429
|
])) : createCommentVNode("", true)
|
|
1428
1430
|
], 4)) : createCommentVNode("", true),
|
|
1429
|
-
hasCorner.value ? (openBlock(), createElementBlock("div", _hoisted_10$
|
|
1431
|
+
hasCorner.value ? (openBlock(), createElementBlock("div", _hoisted_10$5, [
|
|
1430
1432
|
renderSlot(_ctx.$slots, "corner", {}, void 0, true),
|
|
1431
1433
|
__props.closable ? (openBlock(), createElementBlock("button", {
|
|
1432
1434
|
key: 0,
|
|
@@ -1445,7 +1447,7 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
1445
1447
|
};
|
|
1446
1448
|
}
|
|
1447
1449
|
});
|
|
1448
|
-
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1450
|
+
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-72c9a80f"]]);
|
|
1449
1451
|
const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
1450
1452
|
function getFocusable(root) {
|
|
1451
1453
|
return [...root.querySelectorAll(FOCUSABLE)].filter(
|
|
@@ -1567,21 +1569,21 @@ function useLayer(open, options = {}) {
|
|
|
1567
1569
|
onBeforeUnmount(leave);
|
|
1568
1570
|
return { isTop: () => stack[stack.length - 1] === layer };
|
|
1569
1571
|
}
|
|
1570
|
-
const _hoisted_1
|
|
1571
|
-
const _hoisted_2$
|
|
1572
|
+
const _hoisted_1$10 = ["aria-labelledby"];
|
|
1573
|
+
const _hoisted_2$S = {
|
|
1572
1574
|
key: 0,
|
|
1573
1575
|
class: "tao-modal__header"
|
|
1574
1576
|
};
|
|
1575
|
-
const _hoisted_3$
|
|
1576
|
-
const _hoisted_4$
|
|
1577
|
-
const _hoisted_5$
|
|
1578
|
-
const _hoisted_6$
|
|
1579
|
-
const _hoisted_7$
|
|
1580
|
-
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 = {
|
|
1581
1583
|
key: 1,
|
|
1582
1584
|
class: "tao-modal__footer"
|
|
1583
1585
|
};
|
|
1584
|
-
const _sfc_main$
|
|
1586
|
+
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
1585
1587
|
...{ name: "TaoModal", inheritAttrs: false },
|
|
1586
1588
|
__name: "TaoModal",
|
|
1587
1589
|
props: {
|
|
@@ -1663,13 +1665,13 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
1663
1665
|
"aria-labelledby": __props.title ? unref(titleId) : void 0,
|
|
1664
1666
|
tabindex: "-1"
|
|
1665
1667
|
}), [
|
|
1666
|
-
__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, [
|
|
1667
1669
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1668
1670
|
__props.title ? (openBlock(), createElementBlock("h2", {
|
|
1669
1671
|
key: 0,
|
|
1670
1672
|
id: unref(titleId),
|
|
1671
1673
|
class: "tao-modal__title"
|
|
1672
|
-
}, toDisplayString(__props.title), 9, _hoisted_3$
|
|
1674
|
+
}, toDisplayString(__props.title), 9, _hoisted_3$K)) : (openBlock(), createElementBlock("span", _hoisted_4$C))
|
|
1673
1675
|
], true),
|
|
1674
1676
|
__props.closable ? (openBlock(), createElementBlock("button", {
|
|
1675
1677
|
key: 0,
|
|
@@ -1678,20 +1680,20 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
1678
1680
|
"aria-label": unref(l10n).closeLabel,
|
|
1679
1681
|
onClick: close
|
|
1680
1682
|
}, [
|
|
1681
|
-
createElementVNode("span", _hoisted_6$
|
|
1683
|
+
createElementVNode("span", _hoisted_6$n, [
|
|
1682
1684
|
renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
1683
1685
|
createVNode(TaoIcon, { name: "tao-close" })
|
|
1684
1686
|
], true)
|
|
1685
1687
|
])
|
|
1686
|
-
], 8, _hoisted_5$
|
|
1688
|
+
], 8, _hoisted_5$s)) : createCommentVNode("", true)
|
|
1687
1689
|
])) : createCommentVNode("", true),
|
|
1688
|
-
createElementVNode("div", _hoisted_7$
|
|
1690
|
+
createElementVNode("div", _hoisted_7$i, [
|
|
1689
1691
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1690
1692
|
]),
|
|
1691
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
1693
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$c, [
|
|
1692
1694
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1693
1695
|
])) : createCommentVNode("", true)
|
|
1694
|
-
], 16, _hoisted_1
|
|
1696
|
+
], 16, _hoisted_1$10)
|
|
1695
1697
|
], 34)) : createCommentVNode("", true)
|
|
1696
1698
|
]),
|
|
1697
1699
|
_: 3
|
|
@@ -1700,10 +1702,10 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
1700
1702
|
};
|
|
1701
1703
|
}
|
|
1702
1704
|
});
|
|
1703
|
-
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1704
|
-
const _hoisted_1
|
|
1705
|
-
const _hoisted_2$
|
|
1706
|
-
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({
|
|
1707
1709
|
...{ name: "TaoTabs" },
|
|
1708
1710
|
__name: "TaoTabs",
|
|
1709
1711
|
props: {
|
|
@@ -1798,7 +1800,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1798
1800
|
}, void 0, true, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1799
1801
|
createTextVNode(toDisplayString(tab.label), 1)
|
|
1800
1802
|
], 64))
|
|
1801
|
-
], 8, _hoisted_1
|
|
1803
|
+
], 8, _hoisted_1$$);
|
|
1802
1804
|
}), 128))
|
|
1803
1805
|
], 36),
|
|
1804
1806
|
createElementVNode("div", {
|
|
@@ -1808,12 +1810,12 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1808
1810
|
"aria-labelledby": tabId(__props.modelValue)
|
|
1809
1811
|
}, [
|
|
1810
1812
|
renderSlot(_ctx.$slots, "default", { activeTab: __props.modelValue }, void 0, true)
|
|
1811
|
-
], 8, _hoisted_2$
|
|
1813
|
+
], 8, _hoisted_2$R)
|
|
1812
1814
|
], 2);
|
|
1813
1815
|
};
|
|
1814
1816
|
}
|
|
1815
1817
|
});
|
|
1816
|
-
const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1818
|
+
const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["__scopeId", "data-v-70811078"]]);
|
|
1817
1819
|
function listenFocusLoss(onLoss) {
|
|
1818
1820
|
function onVisibilityChange() {
|
|
1819
1821
|
if (document.hidden) {
|
|
@@ -2326,22 +2328,22 @@ function zoneGradient(zones, min, max, vertical = false, dimmed = false) {
|
|
|
2326
2328
|
const stops = zones.map((z) => `${dimmed && z.reveal ? "transparent" : z.color} ${ratioOf(z.from, min, max) * 100}% ${ratioOf(z.to, min, max) * 100}%`);
|
|
2327
2329
|
return `linear-gradient(${vertical ? "to top" : "to right"}, ${stops.join(", ")})`;
|
|
2328
2330
|
}
|
|
2329
|
-
const _hoisted_1$
|
|
2330
|
-
const _hoisted_2$
|
|
2331
|
-
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 = {
|
|
2332
2334
|
key: 2,
|
|
2333
2335
|
class: "tao-slider__value"
|
|
2334
2336
|
};
|
|
2335
|
-
const _hoisted_4$
|
|
2337
|
+
const _hoisted_4$B = {
|
|
2336
2338
|
key: 0,
|
|
2337
2339
|
class: "tao-slider__marks"
|
|
2338
2340
|
};
|
|
2339
|
-
const _hoisted_5$
|
|
2340
|
-
const _hoisted_6$
|
|
2341
|
+
const _hoisted_5$r = ["disabled", "onClick"];
|
|
2342
|
+
const _hoisted_6$m = {
|
|
2341
2343
|
key: 0,
|
|
2342
2344
|
class: "tao-slider__mark-label"
|
|
2343
2345
|
};
|
|
2344
|
-
const _sfc_main$
|
|
2346
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
2345
2347
|
...{ name: "TaoSliderBase" },
|
|
2346
2348
|
__name: "TaoSliderBase",
|
|
2347
2349
|
props: {
|
|
@@ -2614,7 +2616,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
2614
2616
|
"aria-describedby": unref(describedBy),
|
|
2615
2617
|
onKeydown: ($event) => onKeydown2($event, i),
|
|
2616
2618
|
onBlur: _cache[0] || (_cache[0] = ($event) => pointerFocus.value = false)
|
|
2617
|
-
}, null, 46, _hoisted_2$
|
|
2619
|
+
}, null, 46, _hoisted_2$Q),
|
|
2618
2620
|
__props.bubble ? (openBlock(), createElementBlock("div", {
|
|
2619
2621
|
key: 0,
|
|
2620
2622
|
class: normalizeClass(["tao-slider__bubble", { "tao-slider__bubble--auto": bubbleAuto(v) }]),
|
|
@@ -2630,13 +2632,13 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
2630
2632
|
], 6)) : createCommentVNode("", true)
|
|
2631
2633
|
], 64);
|
|
2632
2634
|
}), 128)),
|
|
2633
|
-
__props.showValue ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2635
|
+
__props.showValue ? (openBlock(), createElementBlock("div", _hoisted_3$J, [
|
|
2634
2636
|
renderSlot(_ctx.$slots, "pre-value", {}, void 0, true),
|
|
2635
2637
|
createTextVNode(toDisplayString(barText.value), 1),
|
|
2636
2638
|
renderSlot(_ctx.$slots, "post-value", {}, void 0, true)
|
|
2637
2639
|
])) : createCommentVNode("", true)
|
|
2638
2640
|
], 34),
|
|
2639
|
-
markList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
2641
|
+
markList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$B, [
|
|
2640
2642
|
(openBlock(true), createElementBlock(Fragment, null, renderList(markList.value, (mark) => {
|
|
2641
2643
|
return openBlock(), createElementBlock("button", {
|
|
2642
2644
|
key: mark.value,
|
|
@@ -2652,7 +2654,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
2652
2654
|
onClick: ($event) => onMarkClick(mark)
|
|
2653
2655
|
}, [
|
|
2654
2656
|
_cache[2] || (_cache[2] = createElementVNode("span", { class: "tao-slider__tick" }, null, -1)),
|
|
2655
|
-
mark.label ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
2657
|
+
mark.label ? (openBlock(), createElementBlock("span", _hoisted_6$m, [
|
|
2656
2658
|
renderSlot(_ctx.$slots, "mark", {
|
|
2657
2659
|
mark,
|
|
2658
2660
|
active: unref(isMarkActive)(mark.value, values.value)
|
|
@@ -2660,15 +2662,15 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
2660
2662
|
createTextVNode(toDisplayString(mark.label), 1)
|
|
2661
2663
|
], true)
|
|
2662
2664
|
])) : createCommentVNode("", true)
|
|
2663
|
-
], 14, _hoisted_5$
|
|
2665
|
+
], 14, _hoisted_5$r);
|
|
2664
2666
|
}), 128))
|
|
2665
2667
|
])) : createCommentVNode("", true)
|
|
2666
|
-
], 42, _hoisted_1$
|
|
2668
|
+
], 42, _hoisted_1$_);
|
|
2667
2669
|
};
|
|
2668
2670
|
}
|
|
2669
2671
|
});
|
|
2670
|
-
const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2671
|
-
const _sfc_main$
|
|
2672
|
+
const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["__scopeId", "data-v-f2374981"]]);
|
|
2673
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
2672
2674
|
...{ name: "TaoSlider" },
|
|
2673
2675
|
__name: "TaoSlider",
|
|
2674
2676
|
props: {
|
|
@@ -2734,13 +2736,13 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
2734
2736
|
};
|
|
2735
2737
|
}
|
|
2736
2738
|
});
|
|
2737
|
-
const _hoisted_1$
|
|
2738
|
-
const _hoisted_2$
|
|
2739
|
-
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 = {
|
|
2740
2742
|
key: 0,
|
|
2741
2743
|
class: "tao-scrubber__time"
|
|
2742
2744
|
};
|
|
2743
|
-
const _sfc_main$
|
|
2745
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
2744
2746
|
...{ name: "TaoScrubber" },
|
|
2745
2747
|
__name: "TaoScrubber",
|
|
2746
2748
|
props: {
|
|
@@ -2780,7 +2782,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
2780
2782
|
return openBlock(), createElementBlock("div", {
|
|
2781
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 }]])
|
|
2782
2784
|
}, [
|
|
2783
|
-
createElementVNode("div", _hoisted_1$
|
|
2785
|
+
createElementVNode("div", _hoisted_1$Z, [
|
|
2784
2786
|
createVNode(TaoButton, {
|
|
2785
2787
|
size: "small",
|
|
2786
2788
|
variant: "secondary",
|
|
@@ -2810,8 +2812,8 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
2810
2812
|
_: 1
|
|
2811
2813
|
}, 8, ["disabled", "aria-label"])) : createCommentVNode("", true)
|
|
2812
2814
|
]),
|
|
2813
|
-
createElementVNode("div", _hoisted_2$
|
|
2814
|
-
createVNode(_sfc_main$
|
|
2815
|
+
createElementVNode("div", _hoisted_2$P, [
|
|
2816
|
+
createVNode(_sfc_main$18, {
|
|
2815
2817
|
"model-value": __props.modelValue,
|
|
2816
2818
|
min: 0,
|
|
2817
2819
|
max: __props.length,
|
|
@@ -2834,7 +2836,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
2834
2836
|
} : void 0
|
|
2835
2837
|
]), 1032, ["model-value", "max", "step", "marks", "marks-side", "variant", "size", "disabled"])
|
|
2836
2838
|
]),
|
|
2837
|
-
__props.showTime ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2839
|
+
__props.showTime ? (openBlock(), createElementBlock("div", _hoisted_3$I, [
|
|
2838
2840
|
renderSlot(_ctx.$slots, "time", {
|
|
2839
2841
|
time: __props.modelValue,
|
|
2840
2842
|
length: __props.length,
|
|
@@ -2847,7 +2849,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
2847
2849
|
};
|
|
2848
2850
|
}
|
|
2849
2851
|
});
|
|
2850
|
-
const TaoScrubber = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2852
|
+
const TaoScrubber = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-517dc331"]]);
|
|
2851
2853
|
const opposite = { top: "bottom", bottom: "top", left: "right", right: "left" };
|
|
2852
2854
|
function computePosition(input) {
|
|
2853
2855
|
const { anchor, size, viewport, placement = "bottom-start", gap = 4, pad = 8, flip = true } = input;
|
|
@@ -2959,7 +2961,7 @@ function useFloating(anchor, panel, open, options = {}) {
|
|
|
2959
2961
|
window.addEventListener("resize", onViewportChange);
|
|
2960
2962
|
window.addEventListener("scroll", onViewportChange, true);
|
|
2961
2963
|
await nextTick();
|
|
2962
|
-
strategy = anchor.value && pinnedToScreen(anchor.value) ? "fixed" : "absolute";
|
|
2964
|
+
strategy = options.fixed || anchor.value && pinnedToScreen(anchor.value) ? "fixed" : "absolute";
|
|
2963
2965
|
update();
|
|
2964
2966
|
},
|
|
2965
2967
|
{ immediate: true }
|
|
@@ -2973,7 +2975,7 @@ function useFloating(anchor, panel, open, options = {}) {
|
|
|
2973
2975
|
});
|
|
2974
2976
|
return { style, side, anchorOffset, placed, update };
|
|
2975
2977
|
}
|
|
2976
|
-
const _sfc_main$
|
|
2978
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
2977
2979
|
...{ name: "TaoTooltip" },
|
|
2978
2980
|
__name: "TaoTooltip",
|
|
2979
2981
|
props: {
|
|
@@ -3051,7 +3053,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
3051
3053
|
};
|
|
3052
3054
|
}
|
|
3053
3055
|
});
|
|
3054
|
-
const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3056
|
+
const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-32ae3936"]]);
|
|
3055
3057
|
function useDismiss(open, inside, onDismiss) {
|
|
3056
3058
|
function onPointer(event) {
|
|
3057
3059
|
const target = event.target;
|
|
@@ -3080,8 +3082,8 @@ function useDismiss(open, inside, onDismiss) {
|
|
|
3080
3082
|
);
|
|
3081
3083
|
onBeforeUnmount(stop);
|
|
3082
3084
|
}
|
|
3083
|
-
const _hoisted_1$
|
|
3084
|
-
const _sfc_main$
|
|
3085
|
+
const _hoisted_1$Y = { class: "tao-popover" };
|
|
3086
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
3085
3087
|
...{ name: "TaoPopover" },
|
|
3086
3088
|
__name: "TaoPopover",
|
|
3087
3089
|
props: {
|
|
@@ -3135,7 +3137,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
3135
3137
|
}
|
|
3136
3138
|
});
|
|
3137
3139
|
return (_ctx, _cache) => {
|
|
3138
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3140
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Y, [
|
|
3139
3141
|
createElementVNode("div", {
|
|
3140
3142
|
ref_key: "triggerRef",
|
|
3141
3143
|
ref: triggerRef,
|
|
@@ -3164,7 +3166,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
3164
3166
|
};
|
|
3165
3167
|
}
|
|
3166
3168
|
});
|
|
3167
|
-
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3169
|
+
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-6822af1e"]]);
|
|
3168
3170
|
const spoilerGroupKey = Symbol("taoSpoilerGroup");
|
|
3169
3171
|
function frameStyle(bordered) {
|
|
3170
3172
|
if (bordered === void 0 || bordered === null) {
|
|
@@ -3172,14 +3174,14 @@ function frameStyle(bordered) {
|
|
|
3172
3174
|
}
|
|
3173
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%" };
|
|
3174
3176
|
}
|
|
3175
|
-
const _hoisted_1$
|
|
3176
|
-
const _hoisted_2$
|
|
3177
|
+
const _hoisted_1$X = ["aria-expanded", "aria-controls"];
|
|
3178
|
+
const _hoisted_2$O = {
|
|
3177
3179
|
key: 0,
|
|
3178
3180
|
class: "tao-spoiler__title"
|
|
3179
3181
|
};
|
|
3180
|
-
const _hoisted_3$
|
|
3181
|
-
const _hoisted_4$
|
|
3182
|
-
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({
|
|
3183
3185
|
...{ name: "TaoSpoiler" },
|
|
3184
3186
|
__name: "TaoSpoiler",
|
|
3185
3187
|
props: {
|
|
@@ -3251,12 +3253,12 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
3251
3253
|
class: normalizeClass(["tao-spoiler__icon", { "tao-spoiler__icon--open": isOpen.value }]),
|
|
3252
3254
|
name: "tao-chevron-right"
|
|
3253
3255
|
}, null, 8, ["class"]),
|
|
3254
|
-
__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
3256
|
+
__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_2$O, [
|
|
3255
3257
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
3256
3258
|
createTextVNode(toDisplayString(__props.title), 1)
|
|
3257
3259
|
], true)
|
|
3258
3260
|
])) : createCommentVNode("", true)
|
|
3259
|
-
], 8, _hoisted_1$
|
|
3261
|
+
], 8, _hoisted_1$X),
|
|
3260
3262
|
createVNode(Transition, {
|
|
3261
3263
|
name: "tao-spoiler-slide",
|
|
3262
3264
|
onBeforeEnter,
|
|
@@ -3270,10 +3272,10 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
3270
3272
|
id: unref(panelId),
|
|
3271
3273
|
class: "tao-spoiler__content"
|
|
3272
3274
|
}, [
|
|
3273
|
-
createElementVNode("div", _hoisted_4$
|
|
3275
|
+
createElementVNode("div", _hoisted_4$A, [
|
|
3274
3276
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3275
3277
|
])
|
|
3276
|
-
], 8, _hoisted_3$
|
|
3278
|
+
], 8, _hoisted_3$H)) : createCommentVNode("", true)
|
|
3277
3279
|
]),
|
|
3278
3280
|
_: 3
|
|
3279
3281
|
})
|
|
@@ -3281,9 +3283,9 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
3281
3283
|
};
|
|
3282
3284
|
}
|
|
3283
3285
|
});
|
|
3284
|
-
const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3285
|
-
const _hoisted_1$
|
|
3286
|
-
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({
|
|
3287
3289
|
...{ name: "TaoSpoilerGroup" },
|
|
3288
3290
|
__name: "TaoSpoilerGroup",
|
|
3289
3291
|
props: {
|
|
@@ -3308,15 +3310,15 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
3308
3310
|
setOpen
|
|
3309
3311
|
});
|
|
3310
3312
|
return (_ctx, _cache) => {
|
|
3311
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3313
|
+
return openBlock(), createElementBlock("div", _hoisted_1$W, [
|
|
3312
3314
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3313
3315
|
]);
|
|
3314
3316
|
};
|
|
3315
3317
|
}
|
|
3316
3318
|
});
|
|
3317
|
-
const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3318
|
-
const _hoisted_1$
|
|
3319
|
-
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({
|
|
3320
3322
|
...{ name: "TaoCopy" },
|
|
3321
3323
|
__name: "TaoCopy",
|
|
3322
3324
|
props: {
|
|
@@ -3388,7 +3390,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
3388
3390
|
name: "tao-copy",
|
|
3389
3391
|
size: 16
|
|
3390
3392
|
})
|
|
3391
|
-
], 10, _hoisted_1$
|
|
3393
|
+
], 10, _hoisted_1$V)
|
|
3392
3394
|
], true),
|
|
3393
3395
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
3394
3396
|
copied.value && __props.tip && doneText.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -3404,7 +3406,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
3404
3406
|
};
|
|
3405
3407
|
}
|
|
3406
3408
|
});
|
|
3407
|
-
const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3409
|
+
const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-e181129d"]]);
|
|
3408
3410
|
function readTaoMode(el) {
|
|
3409
3411
|
const mode = el.getAttribute("data-tao-mode");
|
|
3410
3412
|
if (mode === "light" || mode === "dark") {
|
|
@@ -3419,7 +3421,7 @@ function applyTaoMode(el, mode) {
|
|
|
3419
3421
|
el.setAttribute("data-tao-theme", mode);
|
|
3420
3422
|
}
|
|
3421
3423
|
}
|
|
3422
|
-
const _sfc_main$
|
|
3424
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
3423
3425
|
...{ name: "TaoThemeToggle" },
|
|
3424
3426
|
__name: "TaoThemeToggle",
|
|
3425
3427
|
props: {
|
|
@@ -3503,6 +3505,320 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
3503
3505
|
};
|
|
3504
3506
|
}
|
|
3505
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
|
+
});
|
|
3506
3822
|
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
3507
3823
|
...{ name: "TaoContainer" },
|
|
3508
3824
|
__name: "TaoContainer",
|
|
@@ -8547,7 +8863,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8547
8863
|
}, null, 4)
|
|
8548
8864
|
], 44, _hoisted_1$o),
|
|
8549
8865
|
createElementVNode("div", _hoisted_2$m, [
|
|
8550
|
-
createVNode(_sfc_main$
|
|
8866
|
+
createVNode(_sfc_main$18, {
|
|
8551
8867
|
modelValue: hueValue.value,
|
|
8552
8868
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => hueValue.value = $event),
|
|
8553
8869
|
class: "tao-color-picker__hue",
|
|
@@ -8559,7 +8875,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8559
8875
|
"aria-label": unref(l10n).hueLabel,
|
|
8560
8876
|
onChange: _cache[1] || (_cache[1] = ($event) => emit("change", hex.value))
|
|
8561
8877
|
}, null, 8, ["modelValue", "disabled", "aria-label"]),
|
|
8562
|
-
__props.alpha ? (openBlock(), createBlock(_sfc_main$
|
|
8878
|
+
__props.alpha ? (openBlock(), createBlock(_sfc_main$18, {
|
|
8563
8879
|
key: 0,
|
|
8564
8880
|
modelValue: alphaValue.value,
|
|
8565
8881
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => alphaValue.value = $event),
|
|
@@ -13292,6 +13608,7 @@ const components = [
|
|
|
13292
13608
|
TaoSpoiler,
|
|
13293
13609
|
TaoSpoilerGroup,
|
|
13294
13610
|
TaoCopy,
|
|
13611
|
+
_sfc_main$11,
|
|
13295
13612
|
_sfc_main$10,
|
|
13296
13613
|
TaoContainer,
|
|
13297
13614
|
_sfc_main$_,
|
|
@@ -13310,7 +13627,7 @@ const components = [
|
|
|
13310
13627
|
TaoTextarea,
|
|
13311
13628
|
TaoScrollTop,
|
|
13312
13629
|
TaoProgress,
|
|
13313
|
-
_sfc_main$
|
|
13630
|
+
_sfc_main$18,
|
|
13314
13631
|
_sfc_main$M,
|
|
13315
13632
|
TaoFileDrop,
|
|
13316
13633
|
TaoDropdownMenu,
|
|
@@ -13438,7 +13755,7 @@ export {
|
|
|
13438
13755
|
TaoSegmentedOption,
|
|
13439
13756
|
TaoSelect,
|
|
13440
13757
|
TaoSkeleton,
|
|
13441
|
-
_sfc_main$
|
|
13758
|
+
_sfc_main$18 as TaoSlider,
|
|
13442
13759
|
TaoSpace,
|
|
13443
13760
|
TaoSparkline,
|
|
13444
13761
|
TaoSplit,
|
|
@@ -13450,13 +13767,14 @@ export {
|
|
|
13450
13767
|
TaoTabs,
|
|
13451
13768
|
TaoTag,
|
|
13452
13769
|
TaoTextarea,
|
|
13453
|
-
_sfc_main$
|
|
13770
|
+
_sfc_main$11 as TaoThemeToggle,
|
|
13454
13771
|
TaoTimeline,
|
|
13455
13772
|
TaoToastViewport,
|
|
13456
13773
|
TaoToolbar,
|
|
13457
13774
|
TaoToolbarGroup,
|
|
13458
13775
|
TaoToolbarSeparator,
|
|
13459
13776
|
TaoTooltip,
|
|
13777
|
+
_sfc_main$10 as TaoTour,
|
|
13460
13778
|
TaoTree,
|
|
13461
13779
|
TaoUI,
|
|
13462
13780
|
apcaContrast,
|
|
@@ -13484,6 +13802,7 @@ export {
|
|
|
13484
13802
|
provideTaoLocale,
|
|
13485
13803
|
readTaoMode,
|
|
13486
13804
|
registerTaoIcons,
|
|
13805
|
+
resolveTourTarget,
|
|
13487
13806
|
rgbToHsl,
|
|
13488
13807
|
rgbaToHsva,
|
|
13489
13808
|
setTaoLocale,
|