@1337exp/taoui 5.24.0 → 5.26.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 +2 -1
- package/README.ru.md +2 -1
- package/dist/index.d.ts +487 -344
- package/dist/index.js +497 -171
- 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 +20 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { shallowReactive, defineComponent, useCssVars, computed, openBlock, createElementBlock, renderSlot, normalizeClass, normalizeStyle, ref, inject, provide, shallowRef, unref, createElementVNode, toDisplayString, createCommentVNode, useSlots, useAttrs, createBlock, useId, mergeProps, watch, createVNode, toValue, onBeforeUnmount, Teleport, Transition, withCtx, nextTick, Fragment, renderList, createTextVNode, onMounted, createSlots, normalizeProps, guardReactiveProps, resolveDynamicComponent, withModifiers, onBeforeMount, resolveComponent, toRef, withDirectives, vShow, getCurrentInstance, reactive, withKeys, vModelText, TransitionGroup, onUpdated, createApp } from "vue";
|
|
1
|
+
import { shallowReactive, defineComponent, useCssVars, computed, openBlock, createElementBlock, renderSlot, normalizeClass, normalizeStyle, ref, inject, provide, shallowRef, unref, createElementVNode, createStaticVNode, toDisplayString, createCommentVNode, useSlots, useAttrs, createBlock, useId, mergeProps, watch, createVNode, toValue, onBeforeUnmount, Teleport, Transition, withCtx, nextTick, Fragment, renderList, createTextVNode, onMounted, createSlots, normalizeProps, guardReactiveProps, resolveDynamicComponent, withModifiers, onBeforeMount, resolveComponent, toRef, withDirectives, vShow, getCurrentInstance, reactive, withKeys, vModelText, TransitionGroup, onUpdated, createApp } from "vue";
|
|
2
2
|
function isDev() {
|
|
3
3
|
try {
|
|
4
4
|
return process.env.NODE_ENV !== "production";
|
|
@@ -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,32 @@ 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
|
-
class: "tao-
|
|
557
|
+
class: "tao-loader__swap",
|
|
556
558
|
"aria-hidden": "true"
|
|
557
559
|
};
|
|
558
|
-
const _hoisted_5$
|
|
560
|
+
const _hoisted_5$w = {
|
|
559
561
|
key: 3,
|
|
562
|
+
class: "tao-loader__pulse",
|
|
563
|
+
"aria-hidden": "true"
|
|
564
|
+
};
|
|
565
|
+
const _hoisted_6$q = {
|
|
566
|
+
key: 4,
|
|
560
567
|
class: "tao-sr-only"
|
|
561
568
|
};
|
|
562
|
-
const _sfc_main$
|
|
569
|
+
const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
563
570
|
...{ name: "TaoLoader" },
|
|
564
571
|
__name: "TaoLoader",
|
|
565
572
|
props: {
|
|
@@ -597,29 +604,31 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
597
604
|
role: __props.decorative ? void 0 : "status",
|
|
598
605
|
"aria-hidden": __props.decorative ? "true" : void 0
|
|
599
606
|
}, [
|
|
600
|
-
__props.variant === "dots" ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
607
|
+
__props.variant === "dots" ? (openBlock(), createElementBlock("div", _hoisted_2$Z, [..._cache[0] || (_cache[0] = [
|
|
601
608
|
createElementVNode("div", null, null, -1),
|
|
602
609
|
createElementVNode("div", null, null, -1),
|
|
603
610
|
createElementVNode("div", null, null, -1),
|
|
604
611
|
createElementVNode("div", null, null, -1)
|
|
605
|
-
])])) : __props.variant === "ring" ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
606
|
-
|
|
607
|
-
|
|
612
|
+
])])) : __props.variant === "ring" ? (openBlock(), createElementBlock("span", _hoisted_3$R)) : __props.variant === "diamonds" ? (openBlock(), createElementBlock("span", _hoisted_4$G, [..._cache[1] || (_cache[1] = [
|
|
613
|
+
createStaticVNode('<span class="tao-loader__axis" data-v-03f29efb><i class="tao-loader__swap-left" data-v-03f29efb></i><i class="tao-loader__swap-right" data-v-03f29efb></i><i class="tao-loader__swap-hollow" data-v-03f29efb></i></span><span class="tao-loader__axis tao-loader__axis--cross" data-v-03f29efb><i class="tao-loader__swap-left" data-v-03f29efb></i><i class="tao-loader__swap-right" data-v-03f29efb></i><i class="tao-loader__swap-hollow" data-v-03f29efb></i></span>', 2)
|
|
614
|
+
])])) : (openBlock(), createElementBlock("span", _hoisted_5$w)),
|
|
615
|
+
!__props.decorative ? (openBlock(), createElementBlock("span", _hoisted_6$q, toDisplayString(unref(l10n).label), 1)) : createCommentVNode("", true)
|
|
616
|
+
], 14, _hoisted_1$17);
|
|
608
617
|
};
|
|
609
618
|
}
|
|
610
619
|
});
|
|
611
|
-
const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
612
|
-
const _hoisted_1$
|
|
613
|
-
const _hoisted_2$
|
|
620
|
+
const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["__scopeId", "data-v-03f29efb"]]);
|
|
621
|
+
const _hoisted_1$16 = ["type", "aria-pressed", "aria-keyshortcuts", "aria-busy", "disabled"];
|
|
622
|
+
const _hoisted_2$Y = {
|
|
614
623
|
key: 2,
|
|
615
624
|
class: "tao-button__content"
|
|
616
625
|
};
|
|
617
|
-
const _hoisted_3$
|
|
626
|
+
const _hoisted_3$Q = {
|
|
618
627
|
key: 4,
|
|
619
628
|
class: "tao-button__shortcut",
|
|
620
629
|
"aria-hidden": "true"
|
|
621
630
|
};
|
|
622
|
-
const _sfc_main$
|
|
631
|
+
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
623
632
|
...{ name: "TaoButton" },
|
|
624
633
|
__name: "TaoButton",
|
|
625
634
|
props: {
|
|
@@ -693,7 +702,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
693
702
|
class: "tao-button__icon",
|
|
694
703
|
name: __props.icon
|
|
695
704
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
696
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
705
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$Y, [
|
|
697
706
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
698
707
|
])) : createCommentVNode("", true),
|
|
699
708
|
__props.iconEnd ? (openBlock(), createBlock(TaoIcon, {
|
|
@@ -701,12 +710,12 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
701
710
|
class: "tao-button__icon",
|
|
702
711
|
name: __props.iconEnd
|
|
703
712
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
704
|
-
__props.shortcut ? (openBlock(), createElementBlock("kbd", _hoisted_3$
|
|
705
|
-
], 14, _hoisted_1$
|
|
713
|
+
__props.shortcut ? (openBlock(), createElementBlock("kbd", _hoisted_3$Q, toDisplayString(__props.shortcut), 1)) : createCommentVNode("", true)
|
|
714
|
+
], 14, _hoisted_1$16);
|
|
706
715
|
};
|
|
707
716
|
}
|
|
708
717
|
});
|
|
709
|
-
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
718
|
+
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["__scopeId", "data-v-278f587a"]]);
|
|
710
719
|
function toCssLength(value) {
|
|
711
720
|
if (value === void 0 || value === null || value === "") {
|
|
712
721
|
return void 0;
|
|
@@ -725,7 +734,7 @@ function stripeClasses(stripe, tone = "accent") {
|
|
|
725
734
|
function surfaceClass(surface) {
|
|
726
735
|
return surface && surface !== "flat" ? `tao-surface-${surface}` : void 0;
|
|
727
736
|
}
|
|
728
|
-
const _sfc_main$
|
|
737
|
+
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
729
738
|
...{ name: "TaoBlock" },
|
|
730
739
|
__name: "TaoBlock",
|
|
731
740
|
props: {
|
|
@@ -758,7 +767,7 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
758
767
|
};
|
|
759
768
|
}
|
|
760
769
|
});
|
|
761
|
-
const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
770
|
+
const TaoBlock = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["__scopeId", "data-v-1fc66575"]]);
|
|
762
771
|
function useControlAttrs() {
|
|
763
772
|
const attrs = useAttrs();
|
|
764
773
|
return {
|
|
@@ -780,16 +789,16 @@ function useField(props) {
|
|
|
780
789
|
const describedBy = computed(() => field?.describedBy.value);
|
|
781
790
|
return { field, controlId, invalid, describedBy, localId };
|
|
782
791
|
}
|
|
783
|
-
const _hoisted_1$
|
|
792
|
+
const _hoisted_1$15 = {
|
|
784
793
|
key: 0,
|
|
785
794
|
class: "tao-input__affix tao-input__affix--prefix"
|
|
786
795
|
};
|
|
787
|
-
const _hoisted_2$
|
|
788
|
-
const _hoisted_3$
|
|
796
|
+
const _hoisted_2$X = ["id", "type", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
|
|
797
|
+
const _hoisted_3$P = {
|
|
789
798
|
key: 1,
|
|
790
799
|
class: "tao-input__affix tao-input__affix--suffix"
|
|
791
800
|
};
|
|
792
|
-
const _sfc_main$
|
|
801
|
+
const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
793
802
|
...{ name: "TaoInput", inheritAttrs: false },
|
|
794
803
|
__name: "TaoInput",
|
|
795
804
|
props: {
|
|
@@ -835,7 +844,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
835
844
|
"tao-input-shell--suffix": _ctx.$slots.suffix
|
|
836
845
|
}])
|
|
837
846
|
}, [
|
|
838
|
-
_ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
847
|
+
_ctx.$slots.prefix ? (openBlock(), createElementBlock("span", _hoisted_1$15, [
|
|
839
848
|
renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
840
849
|
])) : createCommentVNode("", true),
|
|
841
850
|
createElementVNode("input", mergeProps(unref(controlAttrs)(), {
|
|
@@ -850,8 +859,8 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
850
859
|
onInput: handleInput,
|
|
851
860
|
onBlur: handleBlur,
|
|
852
861
|
onFocus: handleFocus
|
|
853
|
-
}), null, 16, _hoisted_2$
|
|
854
|
-
_ctx.$slots.suffix ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
862
|
+
}), null, 16, _hoisted_2$X),
|
|
863
|
+
_ctx.$slots.suffix ? (openBlock(), createElementBlock("span", _hoisted_3$P, [
|
|
855
864
|
renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
|
|
856
865
|
])) : createCommentVNode("", true)
|
|
857
866
|
], 2)
|
|
@@ -859,17 +868,17 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
859
868
|
};
|
|
860
869
|
}
|
|
861
870
|
});
|
|
862
|
-
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
863
|
-
const _hoisted_1$
|
|
871
|
+
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["__scopeId", "data-v-5b617319"]]);
|
|
872
|
+
const _hoisted_1$14 = {
|
|
864
873
|
key: 0,
|
|
865
874
|
class: "tao-input-group__addon tao-input-group__addon--before"
|
|
866
875
|
};
|
|
867
|
-
const _hoisted_2$
|
|
868
|
-
const _hoisted_3$
|
|
876
|
+
const _hoisted_2$W = { class: "tao-input-group__field" };
|
|
877
|
+
const _hoisted_3$O = {
|
|
869
878
|
key: 1,
|
|
870
879
|
class: "tao-input-group__addon tao-input-group__addon--after"
|
|
871
880
|
};
|
|
872
|
-
const _sfc_main$
|
|
881
|
+
const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
873
882
|
...{ name: "TaoInputGroup" },
|
|
874
883
|
__name: "TaoInputGroup",
|
|
875
884
|
props: {
|
|
@@ -894,30 +903,30 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
|
894
903
|
onFocusin: onFocusIn,
|
|
895
904
|
onFocusout: onFocusOut
|
|
896
905
|
}, [
|
|
897
|
-
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
906
|
+
_ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_1$14, [
|
|
898
907
|
renderSlot(_ctx.$slots, "before", {}, void 0, true)
|
|
899
908
|
])) : createCommentVNode("", true),
|
|
900
|
-
createElementVNode("div", _hoisted_2$
|
|
909
|
+
createElementVNode("div", _hoisted_2$W, [
|
|
901
910
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
902
911
|
]),
|
|
903
|
-
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
912
|
+
_ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_3$O, [
|
|
904
913
|
renderSlot(_ctx.$slots, "after", {}, void 0, true)
|
|
905
914
|
])) : createCommentVNode("", true)
|
|
906
915
|
], 34);
|
|
907
916
|
};
|
|
908
917
|
}
|
|
909
918
|
});
|
|
910
|
-
const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
911
|
-
const _hoisted_1$
|
|
912
|
-
const _hoisted_2$
|
|
919
|
+
const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["__scopeId", "data-v-55b2d297"]]);
|
|
920
|
+
const _hoisted_1$13 = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
921
|
+
const _hoisted_2$V = {
|
|
913
922
|
key: 0,
|
|
914
923
|
class: "tao-input-number__steppers"
|
|
915
924
|
};
|
|
916
|
-
const _hoisted_3$
|
|
917
|
-
const _hoisted_4$
|
|
918
|
-
const _hoisted_5$
|
|
919
|
-
const _hoisted_6$
|
|
920
|
-
const _sfc_main$
|
|
925
|
+
const _hoisted_3$N = ["aria-label", "disabled"];
|
|
926
|
+
const _hoisted_4$F = { "aria-hidden": "true" };
|
|
927
|
+
const _hoisted_5$v = ["aria-label", "disabled"];
|
|
928
|
+
const _hoisted_6$p = { "aria-hidden": "true" };
|
|
929
|
+
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
921
930
|
...{ name: "TaoInputNumber", inheritAttrs: false },
|
|
922
931
|
__name: "TaoInputNumber",
|
|
923
932
|
props: {
|
|
@@ -1076,8 +1085,8 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
1076
1085
|
onFocus,
|
|
1077
1086
|
onBlur,
|
|
1078
1087
|
onKeydown: onKeydown2
|
|
1079
|
-
}), null, 16, _hoisted_1$
|
|
1080
|
-
__props.controls ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
1088
|
+
}), null, 16, _hoisted_1$13),
|
|
1089
|
+
__props.controls ? (openBlock(), createElementBlock("div", _hoisted_2$V, [
|
|
1081
1090
|
createElementVNode("button", {
|
|
1082
1091
|
type: "button",
|
|
1083
1092
|
class: "tao-input-number__step",
|
|
@@ -1086,12 +1095,12 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
1086
1095
|
disabled: __props.disabled || atMax.value,
|
|
1087
1096
|
onClick: _cache[0] || (_cache[0] = ($event) => bump(1))
|
|
1088
1097
|
}, [
|
|
1089
|
-
createElementVNode("span", _hoisted_4$
|
|
1098
|
+
createElementVNode("span", _hoisted_4$F, [
|
|
1090
1099
|
renderSlot(_ctx.$slots, "increment-icon", {}, () => [
|
|
1091
1100
|
createVNode(TaoIcon, { name: "tao-plus" })
|
|
1092
1101
|
], true)
|
|
1093
1102
|
])
|
|
1094
|
-
], 8, _hoisted_3$
|
|
1103
|
+
], 8, _hoisted_3$N),
|
|
1095
1104
|
createElementVNode("button", {
|
|
1096
1105
|
type: "button",
|
|
1097
1106
|
class: "tao-input-number__step",
|
|
@@ -1100,24 +1109,24 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
1100
1109
|
disabled: __props.disabled || atMin.value,
|
|
1101
1110
|
onClick: _cache[1] || (_cache[1] = ($event) => bump(-1))
|
|
1102
1111
|
}, [
|
|
1103
|
-
createElementVNode("span", _hoisted_6$
|
|
1112
|
+
createElementVNode("span", _hoisted_6$p, [
|
|
1104
1113
|
renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
|
|
1105
1114
|
createVNode(TaoIcon, { name: "tao-minus" })
|
|
1106
1115
|
], true)
|
|
1107
1116
|
])
|
|
1108
|
-
], 8, _hoisted_5$
|
|
1117
|
+
], 8, _hoisted_5$v)
|
|
1109
1118
|
])) : createCommentVNode("", true)
|
|
1110
1119
|
], 16);
|
|
1111
1120
|
};
|
|
1112
1121
|
}
|
|
1113
1122
|
});
|
|
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$
|
|
1123
|
+
const TaoInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["__scopeId", "data-v-dc5bb759"]]);
|
|
1124
|
+
const _hoisted_1$12 = ["aria-label", "disabled"];
|
|
1125
|
+
const _hoisted_2$U = { "aria-hidden": "true" };
|
|
1126
|
+
const _hoisted_3$M = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
1127
|
+
const _hoisted_4$E = ["aria-label", "disabled"];
|
|
1128
|
+
const _hoisted_5$u = { "aria-hidden": "true" };
|
|
1129
|
+
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
1121
1130
|
...{ name: "TaoQuantity", inheritAttrs: false },
|
|
1122
1131
|
__name: "TaoQuantity",
|
|
1123
1132
|
props: {
|
|
@@ -1257,12 +1266,12 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
1257
1266
|
disabled: minusDisabled.value,
|
|
1258
1267
|
onClick: onDec
|
|
1259
1268
|
}, [
|
|
1260
|
-
createElementVNode("span", _hoisted_2$
|
|
1269
|
+
createElementVNode("span", _hoisted_2$U, [
|
|
1261
1270
|
renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
|
|
1262
1271
|
createVNode(TaoIcon, { name: "tao-minus" })
|
|
1263
1272
|
], true)
|
|
1264
1273
|
])
|
|
1265
|
-
], 8, _hoisted_1$
|
|
1274
|
+
], 8, _hoisted_1$12),
|
|
1266
1275
|
createElementVNode("input", mergeProps(unref(controlAttrs)(), {
|
|
1267
1276
|
id: unref(controlId),
|
|
1268
1277
|
class: "tao-quantity__input",
|
|
@@ -1282,7 +1291,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
1282
1291
|
onFocus,
|
|
1283
1292
|
onBlur,
|
|
1284
1293
|
onKeydown: onKeydown2
|
|
1285
|
-
}), null, 16, _hoisted_3$
|
|
1294
|
+
}), null, 16, _hoisted_3$M),
|
|
1286
1295
|
createElementVNode("button", {
|
|
1287
1296
|
type: "button",
|
|
1288
1297
|
class: "tao-quantity__btn tao-quantity__btn--inc",
|
|
@@ -1290,59 +1299,59 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
1290
1299
|
disabled: plusDisabled.value,
|
|
1291
1300
|
onClick: onInc
|
|
1292
1301
|
}, [
|
|
1293
|
-
createElementVNode("span", _hoisted_5$
|
|
1302
|
+
createElementVNode("span", _hoisted_5$u, [
|
|
1294
1303
|
renderSlot(_ctx.$slots, "increment-icon", {}, () => [
|
|
1295
1304
|
createVNode(TaoIcon, { name: "tao-plus" })
|
|
1296
1305
|
], true)
|
|
1297
1306
|
])
|
|
1298
|
-
], 8, _hoisted_4$
|
|
1307
|
+
], 8, _hoisted_4$E)
|
|
1299
1308
|
], 16);
|
|
1300
1309
|
};
|
|
1301
1310
|
}
|
|
1302
1311
|
});
|
|
1303
|
-
const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1304
|
-
const _hoisted_1$
|
|
1312
|
+
const TaoQuantity = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-6453479c"]]);
|
|
1313
|
+
const _hoisted_1$11 = {
|
|
1305
1314
|
key: 0,
|
|
1306
1315
|
class: "tao-card__media"
|
|
1307
1316
|
};
|
|
1308
|
-
const _hoisted_2$
|
|
1317
|
+
const _hoisted_2$T = {
|
|
1309
1318
|
key: 0,
|
|
1310
1319
|
class: "tao-card__overlay"
|
|
1311
1320
|
};
|
|
1312
|
-
const _hoisted_3$
|
|
1321
|
+
const _hoisted_3$L = {
|
|
1313
1322
|
key: 1,
|
|
1314
1323
|
class: "tao-card__overlay"
|
|
1315
1324
|
};
|
|
1316
|
-
const _hoisted_4$
|
|
1325
|
+
const _hoisted_4$D = {
|
|
1317
1326
|
key: 0,
|
|
1318
1327
|
class: "tao-card__header"
|
|
1319
1328
|
};
|
|
1320
|
-
const _hoisted_5$
|
|
1329
|
+
const _hoisted_5$t = {
|
|
1321
1330
|
key: 1,
|
|
1322
1331
|
class: "tao-card__title-block"
|
|
1323
1332
|
};
|
|
1324
|
-
const _hoisted_6$
|
|
1333
|
+
const _hoisted_6$o = {
|
|
1325
1334
|
key: 0,
|
|
1326
1335
|
class: "tao-card__title"
|
|
1327
1336
|
};
|
|
1328
|
-
const _hoisted_7$
|
|
1337
|
+
const _hoisted_7$j = {
|
|
1329
1338
|
key: 1,
|
|
1330
1339
|
class: "tao-card__sub"
|
|
1331
1340
|
};
|
|
1332
|
-
const _hoisted_8$
|
|
1341
|
+
const _hoisted_8$d = {
|
|
1333
1342
|
key: 2,
|
|
1334
1343
|
class: "tao-card__body"
|
|
1335
1344
|
};
|
|
1336
|
-
const _hoisted_9$
|
|
1345
|
+
const _hoisted_9$9 = {
|
|
1337
1346
|
key: 3,
|
|
1338
1347
|
class: "tao-card__footer"
|
|
1339
1348
|
};
|
|
1340
|
-
const _hoisted_10$
|
|
1349
|
+
const _hoisted_10$5 = {
|
|
1341
1350
|
key: 3,
|
|
1342
1351
|
class: "tao-card__corner"
|
|
1343
1352
|
};
|
|
1344
1353
|
const _hoisted_11$4 = ["aria-label"];
|
|
1345
|
-
const _sfc_main$
|
|
1354
|
+
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
1346
1355
|
...{ name: "TaoCard" },
|
|
1347
1356
|
__name: "TaoCard",
|
|
1348
1357
|
props: {
|
|
@@ -1395,12 +1404,12 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
1395
1404
|
}]]),
|
|
1396
1405
|
style: normalizeStyle(radiusStyle.value)
|
|
1397
1406
|
}, [
|
|
1398
|
-
_ctx.$slots.media ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1407
|
+
_ctx.$slots.media ? (openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
1399
1408
|
renderSlot(_ctx.$slots, "media", {}, void 0, true),
|
|
1400
|
-
_ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
1409
|
+
_ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_2$T, [
|
|
1401
1410
|
renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
|
|
1402
1411
|
])) : createCommentVNode("", true)
|
|
1403
|
-
])) : _ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
1412
|
+
])) : _ctx.$slots.overlay ? (openBlock(), createElementBlock("div", _hoisted_3$L, [
|
|
1404
1413
|
renderSlot(_ctx.$slots, "overlay", {}, void 0, true)
|
|
1405
1414
|
])) : createCommentVNode("", true),
|
|
1406
1415
|
hasContent.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -1408,25 +1417,25 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
1408
1417
|
class: "tao-card__content",
|
|
1409
1418
|
style: normalizeStyle(paddingStyle.value)
|
|
1410
1419
|
}, [
|
|
1411
|
-
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
1420
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_4$D, [
|
|
1412
1421
|
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
1413
1422
|
])) : createCommentVNode("", true),
|
|
1414
|
-
_ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
1415
|
-
_ctx.$slots.title ? (openBlock(), createElementBlock("h2", _hoisted_6$
|
|
1423
|
+
_ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_5$t, [
|
|
1424
|
+
_ctx.$slots.title ? (openBlock(), createElementBlock("h2", _hoisted_6$o, [
|
|
1416
1425
|
renderSlot(_ctx.$slots, "title", {}, void 0, true)
|
|
1417
1426
|
])) : createCommentVNode("", true),
|
|
1418
|
-
_ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_7$
|
|
1427
|
+
_ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_7$j, [
|
|
1419
1428
|
renderSlot(_ctx.$slots, "sub", {}, void 0, true)
|
|
1420
1429
|
])) : createCommentVNode("", true)
|
|
1421
1430
|
])) : createCommentVNode("", true),
|
|
1422
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
1431
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_8$d, [
|
|
1423
1432
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1424
1433
|
])) : createCommentVNode("", true),
|
|
1425
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_9$
|
|
1434
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_9$9, [
|
|
1426
1435
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1427
1436
|
])) : createCommentVNode("", true)
|
|
1428
1437
|
], 4)) : createCommentVNode("", true),
|
|
1429
|
-
hasCorner.value ? (openBlock(), createElementBlock("div", _hoisted_10$
|
|
1438
|
+
hasCorner.value ? (openBlock(), createElementBlock("div", _hoisted_10$5, [
|
|
1430
1439
|
renderSlot(_ctx.$slots, "corner", {}, void 0, true),
|
|
1431
1440
|
__props.closable ? (openBlock(), createElementBlock("button", {
|
|
1432
1441
|
key: 0,
|
|
@@ -1445,7 +1454,7 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
1445
1454
|
};
|
|
1446
1455
|
}
|
|
1447
1456
|
});
|
|
1448
|
-
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1457
|
+
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-72c9a80f"]]);
|
|
1449
1458
|
const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
1450
1459
|
function getFocusable(root) {
|
|
1451
1460
|
return [...root.querySelectorAll(FOCUSABLE)].filter(
|
|
@@ -1567,21 +1576,21 @@ function useLayer(open, options = {}) {
|
|
|
1567
1576
|
onBeforeUnmount(leave);
|
|
1568
1577
|
return { isTop: () => stack[stack.length - 1] === layer };
|
|
1569
1578
|
}
|
|
1570
|
-
const _hoisted_1
|
|
1571
|
-
const _hoisted_2$
|
|
1579
|
+
const _hoisted_1$10 = ["aria-labelledby"];
|
|
1580
|
+
const _hoisted_2$S = {
|
|
1572
1581
|
key: 0,
|
|
1573
1582
|
class: "tao-modal__header"
|
|
1574
1583
|
};
|
|
1575
|
-
const _hoisted_3$
|
|
1576
|
-
const _hoisted_4$
|
|
1577
|
-
const _hoisted_5$
|
|
1578
|
-
const _hoisted_6$
|
|
1579
|
-
const _hoisted_7$
|
|
1580
|
-
const _hoisted_8$
|
|
1584
|
+
const _hoisted_3$K = ["id"];
|
|
1585
|
+
const _hoisted_4$C = { key: 1 };
|
|
1586
|
+
const _hoisted_5$s = ["aria-label"];
|
|
1587
|
+
const _hoisted_6$n = { "aria-hidden": "true" };
|
|
1588
|
+
const _hoisted_7$i = { class: "tao-modal__content" };
|
|
1589
|
+
const _hoisted_8$c = {
|
|
1581
1590
|
key: 1,
|
|
1582
1591
|
class: "tao-modal__footer"
|
|
1583
1592
|
};
|
|
1584
|
-
const _sfc_main$
|
|
1593
|
+
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
1585
1594
|
...{ name: "TaoModal", inheritAttrs: false },
|
|
1586
1595
|
__name: "TaoModal",
|
|
1587
1596
|
props: {
|
|
@@ -1663,13 +1672,13 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
1663
1672
|
"aria-labelledby": __props.title ? unref(titleId) : void 0,
|
|
1664
1673
|
tabindex: "-1"
|
|
1665
1674
|
}), [
|
|
1666
|
-
__props.title || _ctx.$slots.header || __props.closable ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
1675
|
+
__props.title || _ctx.$slots.header || __props.closable ? (openBlock(), createElementBlock("div", _hoisted_2$S, [
|
|
1667
1676
|
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
1668
1677
|
__props.title ? (openBlock(), createElementBlock("h2", {
|
|
1669
1678
|
key: 0,
|
|
1670
1679
|
id: unref(titleId),
|
|
1671
1680
|
class: "tao-modal__title"
|
|
1672
|
-
}, toDisplayString(__props.title), 9, _hoisted_3$
|
|
1681
|
+
}, toDisplayString(__props.title), 9, _hoisted_3$K)) : (openBlock(), createElementBlock("span", _hoisted_4$C))
|
|
1673
1682
|
], true),
|
|
1674
1683
|
__props.closable ? (openBlock(), createElementBlock("button", {
|
|
1675
1684
|
key: 0,
|
|
@@ -1678,20 +1687,20 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
1678
1687
|
"aria-label": unref(l10n).closeLabel,
|
|
1679
1688
|
onClick: close
|
|
1680
1689
|
}, [
|
|
1681
|
-
createElementVNode("span", _hoisted_6$
|
|
1690
|
+
createElementVNode("span", _hoisted_6$n, [
|
|
1682
1691
|
renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
1683
1692
|
createVNode(TaoIcon, { name: "tao-close" })
|
|
1684
1693
|
], true)
|
|
1685
1694
|
])
|
|
1686
|
-
], 8, _hoisted_5$
|
|
1695
|
+
], 8, _hoisted_5$s)) : createCommentVNode("", true)
|
|
1687
1696
|
])) : createCommentVNode("", true),
|
|
1688
|
-
createElementVNode("div", _hoisted_7$
|
|
1697
|
+
createElementVNode("div", _hoisted_7$i, [
|
|
1689
1698
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1690
1699
|
]),
|
|
1691
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
1700
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$c, [
|
|
1692
1701
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1693
1702
|
])) : createCommentVNode("", true)
|
|
1694
|
-
], 16, _hoisted_1
|
|
1703
|
+
], 16, _hoisted_1$10)
|
|
1695
1704
|
], 34)) : createCommentVNode("", true)
|
|
1696
1705
|
]),
|
|
1697
1706
|
_: 3
|
|
@@ -1700,10 +1709,10 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
1700
1709
|
};
|
|
1701
1710
|
}
|
|
1702
1711
|
});
|
|
1703
|
-
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1704
|
-
const _hoisted_1
|
|
1705
|
-
const _hoisted_2$
|
|
1706
|
-
const _sfc_main$
|
|
1712
|
+
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["__scopeId", "data-v-ea0d125e"]]);
|
|
1713
|
+
const _hoisted_1$$ = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
|
|
1714
|
+
const _hoisted_2$R = ["id", "aria-labelledby"];
|
|
1715
|
+
const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
1707
1716
|
...{ name: "TaoTabs" },
|
|
1708
1717
|
__name: "TaoTabs",
|
|
1709
1718
|
props: {
|
|
@@ -1798,7 +1807,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1798
1807
|
}, void 0, true, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1799
1808
|
createTextVNode(toDisplayString(tab.label), 1)
|
|
1800
1809
|
], 64))
|
|
1801
|
-
], 8, _hoisted_1
|
|
1810
|
+
], 8, _hoisted_1$$);
|
|
1802
1811
|
}), 128))
|
|
1803
1812
|
], 36),
|
|
1804
1813
|
createElementVNode("div", {
|
|
@@ -1808,12 +1817,12 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1808
1817
|
"aria-labelledby": tabId(__props.modelValue)
|
|
1809
1818
|
}, [
|
|
1810
1819
|
renderSlot(_ctx.$slots, "default", { activeTab: __props.modelValue }, void 0, true)
|
|
1811
|
-
], 8, _hoisted_2$
|
|
1820
|
+
], 8, _hoisted_2$R)
|
|
1812
1821
|
], 2);
|
|
1813
1822
|
};
|
|
1814
1823
|
}
|
|
1815
1824
|
});
|
|
1816
|
-
const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1825
|
+
const TaoTabs = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["__scopeId", "data-v-70811078"]]);
|
|
1817
1826
|
function listenFocusLoss(onLoss) {
|
|
1818
1827
|
function onVisibilityChange() {
|
|
1819
1828
|
if (document.hidden) {
|
|
@@ -2326,22 +2335,22 @@ function zoneGradient(zones, min, max, vertical = false, dimmed = false) {
|
|
|
2326
2335
|
const stops = zones.map((z) => `${dimmed && z.reveal ? "transparent" : z.color} ${ratioOf(z.from, min, max) * 100}% ${ratioOf(z.to, min, max) * 100}%`);
|
|
2327
2336
|
return `linear-gradient(${vertical ? "to top" : "to right"}, ${stops.join(", ")})`;
|
|
2328
2337
|
}
|
|
2329
|
-
const _hoisted_1$
|
|
2330
|
-
const _hoisted_2$
|
|
2331
|
-
const _hoisted_3$
|
|
2338
|
+
const _hoisted_1$_ = ["aria-disabled"];
|
|
2339
|
+
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"];
|
|
2340
|
+
const _hoisted_3$J = {
|
|
2332
2341
|
key: 2,
|
|
2333
2342
|
class: "tao-slider__value"
|
|
2334
2343
|
};
|
|
2335
|
-
const _hoisted_4$
|
|
2344
|
+
const _hoisted_4$B = {
|
|
2336
2345
|
key: 0,
|
|
2337
2346
|
class: "tao-slider__marks"
|
|
2338
2347
|
};
|
|
2339
|
-
const _hoisted_5$
|
|
2340
|
-
const _hoisted_6$
|
|
2348
|
+
const _hoisted_5$r = ["disabled", "onClick"];
|
|
2349
|
+
const _hoisted_6$m = {
|
|
2341
2350
|
key: 0,
|
|
2342
2351
|
class: "tao-slider__mark-label"
|
|
2343
2352
|
};
|
|
2344
|
-
const _sfc_main$
|
|
2353
|
+
const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
2345
2354
|
...{ name: "TaoSliderBase" },
|
|
2346
2355
|
__name: "TaoSliderBase",
|
|
2347
2356
|
props: {
|
|
@@ -2614,7 +2623,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
2614
2623
|
"aria-describedby": unref(describedBy),
|
|
2615
2624
|
onKeydown: ($event) => onKeydown2($event, i),
|
|
2616
2625
|
onBlur: _cache[0] || (_cache[0] = ($event) => pointerFocus.value = false)
|
|
2617
|
-
}, null, 46, _hoisted_2$
|
|
2626
|
+
}, null, 46, _hoisted_2$Q),
|
|
2618
2627
|
__props.bubble ? (openBlock(), createElementBlock("div", {
|
|
2619
2628
|
key: 0,
|
|
2620
2629
|
class: normalizeClass(["tao-slider__bubble", { "tao-slider__bubble--auto": bubbleAuto(v) }]),
|
|
@@ -2630,13 +2639,13 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
2630
2639
|
], 6)) : createCommentVNode("", true)
|
|
2631
2640
|
], 64);
|
|
2632
2641
|
}), 128)),
|
|
2633
|
-
__props.showValue ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2642
|
+
__props.showValue ? (openBlock(), createElementBlock("div", _hoisted_3$J, [
|
|
2634
2643
|
renderSlot(_ctx.$slots, "pre-value", {}, void 0, true),
|
|
2635
2644
|
createTextVNode(toDisplayString(barText.value), 1),
|
|
2636
2645
|
renderSlot(_ctx.$slots, "post-value", {}, void 0, true)
|
|
2637
2646
|
])) : createCommentVNode("", true)
|
|
2638
2647
|
], 34),
|
|
2639
|
-
markList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
2648
|
+
markList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$B, [
|
|
2640
2649
|
(openBlock(true), createElementBlock(Fragment, null, renderList(markList.value, (mark) => {
|
|
2641
2650
|
return openBlock(), createElementBlock("button", {
|
|
2642
2651
|
key: mark.value,
|
|
@@ -2652,7 +2661,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
2652
2661
|
onClick: ($event) => onMarkClick(mark)
|
|
2653
2662
|
}, [
|
|
2654
2663
|
_cache[2] || (_cache[2] = createElementVNode("span", { class: "tao-slider__tick" }, null, -1)),
|
|
2655
|
-
mark.label ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
2664
|
+
mark.label ? (openBlock(), createElementBlock("span", _hoisted_6$m, [
|
|
2656
2665
|
renderSlot(_ctx.$slots, "mark", {
|
|
2657
2666
|
mark,
|
|
2658
2667
|
active: unref(isMarkActive)(mark.value, values.value)
|
|
@@ -2660,15 +2669,15 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
|
2660
2669
|
createTextVNode(toDisplayString(mark.label), 1)
|
|
2661
2670
|
], true)
|
|
2662
2671
|
])) : createCommentVNode("", true)
|
|
2663
|
-
], 14, _hoisted_5$
|
|
2672
|
+
], 14, _hoisted_5$r);
|
|
2664
2673
|
}), 128))
|
|
2665
2674
|
])) : createCommentVNode("", true)
|
|
2666
|
-
], 42, _hoisted_1$
|
|
2675
|
+
], 42, _hoisted_1$_);
|
|
2667
2676
|
};
|
|
2668
2677
|
}
|
|
2669
2678
|
});
|
|
2670
|
-
const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2671
|
-
const _sfc_main$
|
|
2679
|
+
const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["__scopeId", "data-v-f2374981"]]);
|
|
2680
|
+
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
2672
2681
|
...{ name: "TaoSlider" },
|
|
2673
2682
|
__name: "TaoSlider",
|
|
2674
2683
|
props: {
|
|
@@ -2734,13 +2743,13 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
2734
2743
|
};
|
|
2735
2744
|
}
|
|
2736
2745
|
});
|
|
2737
|
-
const _hoisted_1$
|
|
2738
|
-
const _hoisted_2$
|
|
2739
|
-
const _hoisted_3$
|
|
2746
|
+
const _hoisted_1$Z = { class: "tao-scrubber__controls" };
|
|
2747
|
+
const _hoisted_2$P = { class: "tao-scrubber__track" };
|
|
2748
|
+
const _hoisted_3$I = {
|
|
2740
2749
|
key: 0,
|
|
2741
2750
|
class: "tao-scrubber__time"
|
|
2742
2751
|
};
|
|
2743
|
-
const _sfc_main$
|
|
2752
|
+
const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
2744
2753
|
...{ name: "TaoScrubber" },
|
|
2745
2754
|
__name: "TaoScrubber",
|
|
2746
2755
|
props: {
|
|
@@ -2780,7 +2789,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
2780
2789
|
return openBlock(), createElementBlock("div", {
|
|
2781
2790
|
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
2791
|
}, [
|
|
2783
|
-
createElementVNode("div", _hoisted_1$
|
|
2792
|
+
createElementVNode("div", _hoisted_1$Z, [
|
|
2784
2793
|
createVNode(TaoButton, {
|
|
2785
2794
|
size: "small",
|
|
2786
2795
|
variant: "secondary",
|
|
@@ -2810,8 +2819,8 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
2810
2819
|
_: 1
|
|
2811
2820
|
}, 8, ["disabled", "aria-label"])) : createCommentVNode("", true)
|
|
2812
2821
|
]),
|
|
2813
|
-
createElementVNode("div", _hoisted_2$
|
|
2814
|
-
createVNode(_sfc_main$
|
|
2822
|
+
createElementVNode("div", _hoisted_2$P, [
|
|
2823
|
+
createVNode(_sfc_main$18, {
|
|
2815
2824
|
"model-value": __props.modelValue,
|
|
2816
2825
|
min: 0,
|
|
2817
2826
|
max: __props.length,
|
|
@@ -2834,7 +2843,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
2834
2843
|
} : void 0
|
|
2835
2844
|
]), 1032, ["model-value", "max", "step", "marks", "marks-side", "variant", "size", "disabled"])
|
|
2836
2845
|
]),
|
|
2837
|
-
__props.showTime ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2846
|
+
__props.showTime ? (openBlock(), createElementBlock("div", _hoisted_3$I, [
|
|
2838
2847
|
renderSlot(_ctx.$slots, "time", {
|
|
2839
2848
|
time: __props.modelValue,
|
|
2840
2849
|
length: __props.length,
|
|
@@ -2847,7 +2856,7 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
2847
2856
|
};
|
|
2848
2857
|
}
|
|
2849
2858
|
});
|
|
2850
|
-
const TaoScrubber = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2859
|
+
const TaoScrubber = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-517dc331"]]);
|
|
2851
2860
|
const opposite = { top: "bottom", bottom: "top", left: "right", right: "left" };
|
|
2852
2861
|
function computePosition(input) {
|
|
2853
2862
|
const { anchor, size, viewport, placement = "bottom-start", gap = 4, pad = 8, flip = true } = input;
|
|
@@ -2959,7 +2968,7 @@ function useFloating(anchor, panel, open, options = {}) {
|
|
|
2959
2968
|
window.addEventListener("resize", onViewportChange);
|
|
2960
2969
|
window.addEventListener("scroll", onViewportChange, true);
|
|
2961
2970
|
await nextTick();
|
|
2962
|
-
strategy = anchor.value && pinnedToScreen(anchor.value) ? "fixed" : "absolute";
|
|
2971
|
+
strategy = options.fixed || anchor.value && pinnedToScreen(anchor.value) ? "fixed" : "absolute";
|
|
2963
2972
|
update();
|
|
2964
2973
|
},
|
|
2965
2974
|
{ immediate: true }
|
|
@@ -2973,7 +2982,7 @@ function useFloating(anchor, panel, open, options = {}) {
|
|
|
2973
2982
|
});
|
|
2974
2983
|
return { style, side, anchorOffset, placed, update };
|
|
2975
2984
|
}
|
|
2976
|
-
const _sfc_main$
|
|
2985
|
+
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
2977
2986
|
...{ name: "TaoTooltip" },
|
|
2978
2987
|
__name: "TaoTooltip",
|
|
2979
2988
|
props: {
|
|
@@ -3051,7 +3060,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
3051
3060
|
};
|
|
3052
3061
|
}
|
|
3053
3062
|
});
|
|
3054
|
-
const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3063
|
+
const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-32ae3936"]]);
|
|
3055
3064
|
function useDismiss(open, inside, onDismiss) {
|
|
3056
3065
|
function onPointer(event) {
|
|
3057
3066
|
const target = event.target;
|
|
@@ -3080,8 +3089,8 @@ function useDismiss(open, inside, onDismiss) {
|
|
|
3080
3089
|
);
|
|
3081
3090
|
onBeforeUnmount(stop);
|
|
3082
3091
|
}
|
|
3083
|
-
const _hoisted_1$
|
|
3084
|
-
const _sfc_main$
|
|
3092
|
+
const _hoisted_1$Y = { class: "tao-popover" };
|
|
3093
|
+
const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
3085
3094
|
...{ name: "TaoPopover" },
|
|
3086
3095
|
__name: "TaoPopover",
|
|
3087
3096
|
props: {
|
|
@@ -3135,7 +3144,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
3135
3144
|
}
|
|
3136
3145
|
});
|
|
3137
3146
|
return (_ctx, _cache) => {
|
|
3138
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3147
|
+
return openBlock(), createElementBlock("div", _hoisted_1$Y, [
|
|
3139
3148
|
createElementVNode("div", {
|
|
3140
3149
|
ref_key: "triggerRef",
|
|
3141
3150
|
ref: triggerRef,
|
|
@@ -3164,7 +3173,7 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
3164
3173
|
};
|
|
3165
3174
|
}
|
|
3166
3175
|
});
|
|
3167
|
-
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3176
|
+
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-6822af1e"]]);
|
|
3168
3177
|
const spoilerGroupKey = Symbol("taoSpoilerGroup");
|
|
3169
3178
|
function frameStyle(bordered) {
|
|
3170
3179
|
if (bordered === void 0 || bordered === null) {
|
|
@@ -3172,14 +3181,14 @@ function frameStyle(bordered) {
|
|
|
3172
3181
|
}
|
|
3173
3182
|
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
3183
|
}
|
|
3175
|
-
const _hoisted_1$
|
|
3176
|
-
const _hoisted_2$
|
|
3184
|
+
const _hoisted_1$X = ["aria-expanded", "aria-controls"];
|
|
3185
|
+
const _hoisted_2$O = {
|
|
3177
3186
|
key: 0,
|
|
3178
3187
|
class: "tao-spoiler__title"
|
|
3179
3188
|
};
|
|
3180
|
-
const _hoisted_3$
|
|
3181
|
-
const _hoisted_4$
|
|
3182
|
-
const _sfc_main$
|
|
3189
|
+
const _hoisted_3$H = ["id"];
|
|
3190
|
+
const _hoisted_4$A = { class: "tao-spoiler__content-inner" };
|
|
3191
|
+
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
3183
3192
|
...{ name: "TaoSpoiler" },
|
|
3184
3193
|
__name: "TaoSpoiler",
|
|
3185
3194
|
props: {
|
|
@@ -3251,12 +3260,12 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
3251
3260
|
class: normalizeClass(["tao-spoiler__icon", { "tao-spoiler__icon--open": isOpen.value }]),
|
|
3252
3261
|
name: "tao-chevron-right"
|
|
3253
3262
|
}, null, 8, ["class"]),
|
|
3254
|
-
__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
3263
|
+
__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", _hoisted_2$O, [
|
|
3255
3264
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
3256
3265
|
createTextVNode(toDisplayString(__props.title), 1)
|
|
3257
3266
|
], true)
|
|
3258
3267
|
])) : createCommentVNode("", true)
|
|
3259
|
-
], 8, _hoisted_1$
|
|
3268
|
+
], 8, _hoisted_1$X),
|
|
3260
3269
|
createVNode(Transition, {
|
|
3261
3270
|
name: "tao-spoiler-slide",
|
|
3262
3271
|
onBeforeEnter,
|
|
@@ -3270,10 +3279,10 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
3270
3279
|
id: unref(panelId),
|
|
3271
3280
|
class: "tao-spoiler__content"
|
|
3272
3281
|
}, [
|
|
3273
|
-
createElementVNode("div", _hoisted_4$
|
|
3282
|
+
createElementVNode("div", _hoisted_4$A, [
|
|
3274
3283
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3275
3284
|
])
|
|
3276
|
-
], 8, _hoisted_3$
|
|
3285
|
+
], 8, _hoisted_3$H)) : createCommentVNode("", true)
|
|
3277
3286
|
]),
|
|
3278
3287
|
_: 3
|
|
3279
3288
|
})
|
|
@@ -3281,9 +3290,9 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
3281
3290
|
};
|
|
3282
3291
|
}
|
|
3283
3292
|
});
|
|
3284
|
-
const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3285
|
-
const _hoisted_1$
|
|
3286
|
-
const _sfc_main$
|
|
3293
|
+
const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["__scopeId", "data-v-1e16d6d1"]]);
|
|
3294
|
+
const _hoisted_1$W = { class: "tao-spoiler-group" };
|
|
3295
|
+
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
3287
3296
|
...{ name: "TaoSpoilerGroup" },
|
|
3288
3297
|
__name: "TaoSpoilerGroup",
|
|
3289
3298
|
props: {
|
|
@@ -3308,15 +3317,15 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
3308
3317
|
setOpen
|
|
3309
3318
|
});
|
|
3310
3319
|
return (_ctx, _cache) => {
|
|
3311
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3320
|
+
return openBlock(), createElementBlock("div", _hoisted_1$W, [
|
|
3312
3321
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3313
3322
|
]);
|
|
3314
3323
|
};
|
|
3315
3324
|
}
|
|
3316
3325
|
});
|
|
3317
|
-
const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3318
|
-
const _hoisted_1$
|
|
3319
|
-
const _sfc_main$
|
|
3326
|
+
const TaoSpoilerGroup = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-7986fd2a"]]);
|
|
3327
|
+
const _hoisted_1$V = ["aria-label"];
|
|
3328
|
+
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
3320
3329
|
...{ name: "TaoCopy" },
|
|
3321
3330
|
__name: "TaoCopy",
|
|
3322
3331
|
props: {
|
|
@@ -3388,7 +3397,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
3388
3397
|
name: "tao-copy",
|
|
3389
3398
|
size: 16
|
|
3390
3399
|
})
|
|
3391
|
-
], 10, _hoisted_1$
|
|
3400
|
+
], 10, _hoisted_1$V)
|
|
3392
3401
|
], true),
|
|
3393
3402
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
3394
3403
|
copied.value && __props.tip && doneText.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -3404,7 +3413,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
3404
3413
|
};
|
|
3405
3414
|
}
|
|
3406
3415
|
});
|
|
3407
|
-
const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3416
|
+
const TaoCopy = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["__scopeId", "data-v-e181129d"]]);
|
|
3408
3417
|
function readTaoMode(el) {
|
|
3409
3418
|
const mode = el.getAttribute("data-tao-mode");
|
|
3410
3419
|
if (mode === "light" || mode === "dark") {
|
|
@@ -3419,7 +3428,7 @@ function applyTaoMode(el, mode) {
|
|
|
3419
3428
|
el.setAttribute("data-tao-theme", mode);
|
|
3420
3429
|
}
|
|
3421
3430
|
}
|
|
3422
|
-
const _sfc_main$
|
|
3431
|
+
const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
3423
3432
|
...{ name: "TaoThemeToggle" },
|
|
3424
3433
|
__name: "TaoThemeToggle",
|
|
3425
3434
|
props: {
|
|
@@ -3503,6 +3512,320 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
3503
3512
|
};
|
|
3504
3513
|
}
|
|
3505
3514
|
});
|
|
3515
|
+
function resolveTourTarget(target, root = document) {
|
|
3516
|
+
if (!target) {
|
|
3517
|
+
return null;
|
|
3518
|
+
}
|
|
3519
|
+
let el = null;
|
|
3520
|
+
if (typeof target === "string") {
|
|
3521
|
+
try {
|
|
3522
|
+
el = root.querySelector(target);
|
|
3523
|
+
} catch {
|
|
3524
|
+
el = null;
|
|
3525
|
+
}
|
|
3526
|
+
} else if (typeof target === "function") {
|
|
3527
|
+
el = target();
|
|
3528
|
+
} else {
|
|
3529
|
+
el = target;
|
|
3530
|
+
}
|
|
3531
|
+
if (!(el instanceof HTMLElement) || !el.isConnected || el.getClientRects().length === 0) {
|
|
3532
|
+
return null;
|
|
3533
|
+
}
|
|
3534
|
+
return el;
|
|
3535
|
+
}
|
|
3536
|
+
function spotlightRect(rect, padding) {
|
|
3537
|
+
return { top: rect.top - padding, left: rect.left - padding, width: rect.width + padding * 2, height: rect.height + padding * 2 };
|
|
3538
|
+
}
|
|
3539
|
+
function holeClipPath(hole, viewport, radius) {
|
|
3540
|
+
const r = Math.max(0, Math.min(radius, hole.width / 2, hole.height / 2));
|
|
3541
|
+
const { left: x, top: y, width: w, height: h } = hole;
|
|
3542
|
+
const f = (n) => +n.toFixed(2);
|
|
3543
|
+
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`;
|
|
3544
|
+
return `path(evenodd, "M0 0H${f(viewport.width)}V${f(viewport.height)}H0Z${window2}")`;
|
|
3545
|
+
}
|
|
3546
|
+
function isInView(rect, viewport, margin = 0) {
|
|
3547
|
+
return rect.top >= margin && rect.left >= margin && rect.top + rect.height <= viewport.height - margin && rect.left + rect.width <= viewport.width - margin;
|
|
3548
|
+
}
|
|
3549
|
+
const _hoisted_1$U = {
|
|
3550
|
+
key: 0,
|
|
3551
|
+
class: "tao-tour"
|
|
3552
|
+
};
|
|
3553
|
+
const _hoisted_2$N = {
|
|
3554
|
+
key: 1,
|
|
3555
|
+
class: "tao-tour__dim",
|
|
3556
|
+
"aria-hidden": "true"
|
|
3557
|
+
};
|
|
3558
|
+
const _hoisted_3$G = ["aria-labelledby", "aria-describedby"];
|
|
3559
|
+
const _hoisted_4$z = ["id"];
|
|
3560
|
+
const _hoisted_5$q = ["id"];
|
|
3561
|
+
const _hoisted_6$l = { class: "tao-tour__footer" };
|
|
3562
|
+
const _hoisted_7$h = {
|
|
3563
|
+
key: 0,
|
|
3564
|
+
class: "tao-tour__progress"
|
|
3565
|
+
};
|
|
3566
|
+
const _hoisted_8$b = {
|
|
3567
|
+
class: "tao-tour__dots",
|
|
3568
|
+
"aria-hidden": "true"
|
|
3569
|
+
};
|
|
3570
|
+
const _hoisted_9$8 = { class: "tao-tour__progress-text" };
|
|
3571
|
+
const _hoisted_10$4 = { class: "tao-tour__actions" };
|
|
3572
|
+
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
3573
|
+
...{ name: "TaoTour" },
|
|
3574
|
+
__name: "TaoTour",
|
|
3575
|
+
props: {
|
|
3576
|
+
step: { default: null },
|
|
3577
|
+
index: { default: 0 },
|
|
3578
|
+
count: { default: 0 },
|
|
3579
|
+
first: { type: Boolean, default: void 0 },
|
|
3580
|
+
last: { type: Boolean, default: void 0 },
|
|
3581
|
+
placement: { default: "bottom" },
|
|
3582
|
+
padding: { default: 6 },
|
|
3583
|
+
interactive: { type: Boolean, default: false },
|
|
3584
|
+
nextLabel: { default: void 0 },
|
|
3585
|
+
prevLabel: { default: void 0 },
|
|
3586
|
+
skipLabel: { default: void 0 },
|
|
3587
|
+
doneLabel: { default: void 0 },
|
|
3588
|
+
progressLabel: { default: void 0 }
|
|
3589
|
+
},
|
|
3590
|
+
emits: ["next", "prev", "skip"],
|
|
3591
|
+
setup(__props, { emit: __emit }) {
|
|
3592
|
+
const props = __props;
|
|
3593
|
+
const emit = __emit;
|
|
3594
|
+
const l10n = useLocaleText(props, "tour");
|
|
3595
|
+
const open = computed(() => props.step !== null);
|
|
3596
|
+
const isFirst = computed(() => props.first ?? props.index <= 0);
|
|
3597
|
+
const isLast = computed(() => props.last ?? props.index >= props.count - 1);
|
|
3598
|
+
const cardRef = ref(null);
|
|
3599
|
+
const targetEl = ref(null);
|
|
3600
|
+
const rect = ref(null);
|
|
3601
|
+
const titleId = useId();
|
|
3602
|
+
const textId = useId();
|
|
3603
|
+
useLayer(open, { onEscape: () => emit("skip"), restoreFocus: true });
|
|
3604
|
+
const floating = useFloating(targetEl, cardRef, () => open.value && targetEl.value !== null, {
|
|
3605
|
+
placement: () => props.step?.placement ?? props.placement,
|
|
3606
|
+
gap: 8 + props.padding,
|
|
3607
|
+
fixed: true
|
|
3608
|
+
});
|
|
3609
|
+
const hole = computed(() => rect.value ? spotlightRect(rect.value, props.padding) : null);
|
|
3610
|
+
const viewport = ref({ width: 0, height: 0 });
|
|
3611
|
+
const hasTarget = computed(() => targetEl.value !== null && hole.value !== null);
|
|
3612
|
+
const holeStyle = computed(() => {
|
|
3613
|
+
const h = hole.value;
|
|
3614
|
+
return h ? { top: `${h.top}px`, left: `${h.left}px`, width: `${h.width}px`, height: `${h.height}px` } : {};
|
|
3615
|
+
});
|
|
3616
|
+
const blockerStyle = computed(() => {
|
|
3617
|
+
if (!props.interactive || !hole.value) {
|
|
3618
|
+
return {};
|
|
3619
|
+
}
|
|
3620
|
+
return { clipPath: holeClipPath(hole.value, viewport.value, 8) };
|
|
3621
|
+
});
|
|
3622
|
+
const cardStyle = computed(() => hasTarget.value ? floating.style.value : {});
|
|
3623
|
+
const arrowStyle = computed(() => {
|
|
3624
|
+
const el = cardRef.value;
|
|
3625
|
+
if (!hasTarget.value || !el) {
|
|
3626
|
+
return {};
|
|
3627
|
+
}
|
|
3628
|
+
const pad = 14;
|
|
3629
|
+
const { x, y } = floating.anchorOffset.value;
|
|
3630
|
+
if (floating.side.value === "top" || floating.side.value === "bottom") {
|
|
3631
|
+
return { left: `${Math.min(el.offsetWidth - pad, Math.max(pad, x))}px` };
|
|
3632
|
+
}
|
|
3633
|
+
return { top: `${Math.min(el.offsetHeight - pad, Math.max(pad, y))}px` };
|
|
3634
|
+
});
|
|
3635
|
+
const progress = computed(() => formatText(l10n.value.progressLabel, { n: props.index + 1, count: props.count }));
|
|
3636
|
+
const dots = computed(() => Array.from({ length: Math.max(0, props.count) }, (_, i) => i));
|
|
3637
|
+
function measure() {
|
|
3638
|
+
const el = targetEl.value;
|
|
3639
|
+
viewport.value = { width: window.innerWidth, height: window.innerHeight };
|
|
3640
|
+
if (!el || !el.isConnected) {
|
|
3641
|
+
rect.value = null;
|
|
3642
|
+
return;
|
|
3643
|
+
}
|
|
3644
|
+
const r = el.getBoundingClientRect();
|
|
3645
|
+
rect.value = { top: r.top, left: r.left, width: r.width, height: r.height };
|
|
3646
|
+
}
|
|
3647
|
+
let frame = 0;
|
|
3648
|
+
function onViewportChange() {
|
|
3649
|
+
if (frame) {
|
|
3650
|
+
return;
|
|
3651
|
+
}
|
|
3652
|
+
frame = window.requestAnimationFrame(() => {
|
|
3653
|
+
frame = 0;
|
|
3654
|
+
measure();
|
|
3655
|
+
floating.update();
|
|
3656
|
+
});
|
|
3657
|
+
}
|
|
3658
|
+
let resizeObserver = null;
|
|
3659
|
+
function stopWatching() {
|
|
3660
|
+
if (typeof window === "undefined") {
|
|
3661
|
+
return;
|
|
3662
|
+
}
|
|
3663
|
+
window.removeEventListener("scroll", onViewportChange, true);
|
|
3664
|
+
window.removeEventListener("resize", onViewportChange);
|
|
3665
|
+
resizeObserver?.disconnect();
|
|
3666
|
+
resizeObserver = null;
|
|
3667
|
+
if (frame) {
|
|
3668
|
+
window.cancelAnimationFrame(frame);
|
|
3669
|
+
frame = 0;
|
|
3670
|
+
}
|
|
3671
|
+
}
|
|
3672
|
+
async function focusCard() {
|
|
3673
|
+
await nextTick();
|
|
3674
|
+
const card = cardRef.value;
|
|
3675
|
+
if (!card) {
|
|
3676
|
+
return;
|
|
3677
|
+
}
|
|
3678
|
+
card.focus({ preventScroll: true });
|
|
3679
|
+
}
|
|
3680
|
+
async function showStep() {
|
|
3681
|
+
if (typeof window === "undefined") {
|
|
3682
|
+
return;
|
|
3683
|
+
}
|
|
3684
|
+
stopWatching();
|
|
3685
|
+
const step = props.step;
|
|
3686
|
+
if (!step) {
|
|
3687
|
+
targetEl.value = null;
|
|
3688
|
+
rect.value = null;
|
|
3689
|
+
return;
|
|
3690
|
+
}
|
|
3691
|
+
const el = resolveTourTarget(step.target);
|
|
3692
|
+
targetEl.value = el;
|
|
3693
|
+
if (el) {
|
|
3694
|
+
const r = el.getBoundingClientRect();
|
|
3695
|
+
const inView = isInView(r, { width: window.innerWidth, height: window.innerHeight }, 8);
|
|
3696
|
+
if (!inView) {
|
|
3697
|
+
const calm = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
3698
|
+
el.scrollIntoView({ block: "center", inline: "nearest", behavior: calm ? "auto" : "smooth" });
|
|
3699
|
+
}
|
|
3700
|
+
window.addEventListener("scroll", onViewportChange, true);
|
|
3701
|
+
window.addEventListener("resize", onViewportChange);
|
|
3702
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
3703
|
+
resizeObserver = new ResizeObserver(onViewportChange);
|
|
3704
|
+
resizeObserver.observe(el);
|
|
3705
|
+
}
|
|
3706
|
+
}
|
|
3707
|
+
measure();
|
|
3708
|
+
await nextTick();
|
|
3709
|
+
floating.update();
|
|
3710
|
+
focusCard();
|
|
3711
|
+
}
|
|
3712
|
+
watch(() => props.step, showStep, { immediate: true, flush: "post" });
|
|
3713
|
+
onBeforeUnmount(stopWatching);
|
|
3714
|
+
function onKeydown2(event) {
|
|
3715
|
+
if (event.key === "ArrowRight") {
|
|
3716
|
+
event.preventDefault();
|
|
3717
|
+
emit("next");
|
|
3718
|
+
} else if (event.key === "ArrowLeft" && !isFirst.value) {
|
|
3719
|
+
event.preventDefault();
|
|
3720
|
+
emit("prev");
|
|
3721
|
+
} else if (!props.interactive && cardRef.value) {
|
|
3722
|
+
trapTab(event, cardRef.value);
|
|
3723
|
+
}
|
|
3724
|
+
}
|
|
3725
|
+
function onBlockerPointerDown(event) {
|
|
3726
|
+
event.preventDefault();
|
|
3727
|
+
const card = cardRef.value;
|
|
3728
|
+
(card && getFocusable(card)[0] ? getFocusable(card).at(-1) : card)?.focus({ preventScroll: true });
|
|
3729
|
+
}
|
|
3730
|
+
return (_ctx, _cache) => {
|
|
3731
|
+
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
3732
|
+
__props.step ? (openBlock(), createElementBlock("div", _hoisted_1$U, [
|
|
3733
|
+
createElementVNode("div", {
|
|
3734
|
+
class: "tao-tour__blocker",
|
|
3735
|
+
style: normalizeStyle(blockerStyle.value),
|
|
3736
|
+
onPointerdown: onBlockerPointerDown
|
|
3737
|
+
}, null, 36),
|
|
3738
|
+
hasTarget.value ? (openBlock(), createElementBlock("div", {
|
|
3739
|
+
key: 0,
|
|
3740
|
+
class: "tao-tour__hole",
|
|
3741
|
+
style: normalizeStyle(holeStyle.value),
|
|
3742
|
+
"aria-hidden": "true"
|
|
3743
|
+
}, null, 4)) : (openBlock(), createElementBlock("div", _hoisted_2$N)),
|
|
3744
|
+
createElementVNode("div", {
|
|
3745
|
+
ref_key: "cardRef",
|
|
3746
|
+
ref: cardRef,
|
|
3747
|
+
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 }]]),
|
|
3748
|
+
role: "dialog",
|
|
3749
|
+
"aria-labelledby": __props.step.title ? unref(titleId) : void 0,
|
|
3750
|
+
"aria-describedby": __props.step.text ? unref(textId) : void 0,
|
|
3751
|
+
tabindex: "-1",
|
|
3752
|
+
style: normalizeStyle(cardStyle.value),
|
|
3753
|
+
onKeydown: onKeydown2
|
|
3754
|
+
}, [
|
|
3755
|
+
hasTarget.value ? (openBlock(), createElementBlock("span", {
|
|
3756
|
+
key: 0,
|
|
3757
|
+
class: "tao-tour__arrow",
|
|
3758
|
+
style: normalizeStyle(arrowStyle.value),
|
|
3759
|
+
"aria-hidden": "true"
|
|
3760
|
+
}, null, 4)) : createCommentVNode("", true),
|
|
3761
|
+
renderSlot(_ctx.$slots, "default", {
|
|
3762
|
+
step: __props.step,
|
|
3763
|
+
index: __props.index,
|
|
3764
|
+
count: __props.count
|
|
3765
|
+
}, () => [
|
|
3766
|
+
__props.step.title ? (openBlock(), createElementBlock("p", {
|
|
3767
|
+
key: 0,
|
|
3768
|
+
id: unref(titleId),
|
|
3769
|
+
class: "tao-tour__title"
|
|
3770
|
+
}, toDisplayString(__props.step.title), 9, _hoisted_4$z)) : createCommentVNode("", true),
|
|
3771
|
+
__props.step.text ? (openBlock(), createElementBlock("p", {
|
|
3772
|
+
key: 1,
|
|
3773
|
+
id: unref(textId),
|
|
3774
|
+
class: "tao-tour__text"
|
|
3775
|
+
}, toDisplayString(__props.step.text), 9, _hoisted_5$q)) : createCommentVNode("", true)
|
|
3776
|
+
]),
|
|
3777
|
+
createElementVNode("div", _hoisted_6$l, [
|
|
3778
|
+
__props.count > 1 ? (openBlock(), createElementBlock("span", _hoisted_7$h, [
|
|
3779
|
+
createElementVNode("span", _hoisted_8$b, [
|
|
3780
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(dots.value, (i) => {
|
|
3781
|
+
return openBlock(), createElementBlock("i", {
|
|
3782
|
+
key: i,
|
|
3783
|
+
class: normalizeClass({ "tao-tour__dot--on": i === __props.index })
|
|
3784
|
+
}, null, 2);
|
|
3785
|
+
}), 128))
|
|
3786
|
+
]),
|
|
3787
|
+
createElementVNode("span", _hoisted_9$8, toDisplayString(progress.value), 1)
|
|
3788
|
+
])) : createCommentVNode("", true),
|
|
3789
|
+
createElementVNode("span", _hoisted_10$4, [
|
|
3790
|
+
!isLast.value ? (openBlock(), createBlock(TaoButton, {
|
|
3791
|
+
key: 0,
|
|
3792
|
+
size: "small",
|
|
3793
|
+
variant: "text",
|
|
3794
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("skip"))
|
|
3795
|
+
}, {
|
|
3796
|
+
default: withCtx(() => [
|
|
3797
|
+
createTextVNode(toDisplayString(unref(l10n).skipLabel), 1)
|
|
3798
|
+
]),
|
|
3799
|
+
_: 1
|
|
3800
|
+
})) : createCommentVNode("", true),
|
|
3801
|
+
!isFirst.value ? (openBlock(), createBlock(TaoButton, {
|
|
3802
|
+
key: 1,
|
|
3803
|
+
size: "small",
|
|
3804
|
+
variant: "secondary",
|
|
3805
|
+
onClick: _cache[1] || (_cache[1] = ($event) => emit("prev"))
|
|
3806
|
+
}, {
|
|
3807
|
+
default: withCtx(() => [
|
|
3808
|
+
createTextVNode(toDisplayString(unref(l10n).prevLabel), 1)
|
|
3809
|
+
]),
|
|
3810
|
+
_: 1
|
|
3811
|
+
})) : createCommentVNode("", true),
|
|
3812
|
+
createVNode(TaoButton, {
|
|
3813
|
+
size: "small",
|
|
3814
|
+
onClick: _cache[2] || (_cache[2] = ($event) => emit("next"))
|
|
3815
|
+
}, {
|
|
3816
|
+
default: withCtx(() => [
|
|
3817
|
+
createTextVNode(toDisplayString(isLast.value ? unref(l10n).doneLabel : unref(l10n).nextLabel), 1)
|
|
3818
|
+
]),
|
|
3819
|
+
_: 1
|
|
3820
|
+
})
|
|
3821
|
+
])
|
|
3822
|
+
])
|
|
3823
|
+
], 46, _hoisted_3$G)
|
|
3824
|
+
])) : createCommentVNode("", true)
|
|
3825
|
+
]);
|
|
3826
|
+
};
|
|
3827
|
+
}
|
|
3828
|
+
});
|
|
3506
3829
|
const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
3507
3830
|
...{ name: "TaoContainer" },
|
|
3508
3831
|
__name: "TaoContainer",
|
|
@@ -8547,7 +8870,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8547
8870
|
}, null, 4)
|
|
8548
8871
|
], 44, _hoisted_1$o),
|
|
8549
8872
|
createElementVNode("div", _hoisted_2$m, [
|
|
8550
|
-
createVNode(_sfc_main$
|
|
8873
|
+
createVNode(_sfc_main$18, {
|
|
8551
8874
|
modelValue: hueValue.value,
|
|
8552
8875
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => hueValue.value = $event),
|
|
8553
8876
|
class: "tao-color-picker__hue",
|
|
@@ -8559,7 +8882,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
8559
8882
|
"aria-label": unref(l10n).hueLabel,
|
|
8560
8883
|
onChange: _cache[1] || (_cache[1] = ($event) => emit("change", hex.value))
|
|
8561
8884
|
}, null, 8, ["modelValue", "disabled", "aria-label"]),
|
|
8562
|
-
__props.alpha ? (openBlock(), createBlock(_sfc_main$
|
|
8885
|
+
__props.alpha ? (openBlock(), createBlock(_sfc_main$18, {
|
|
8563
8886
|
key: 0,
|
|
8564
8887
|
modelValue: alphaValue.value,
|
|
8565
8888
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => alphaValue.value = $event),
|
|
@@ -13292,6 +13615,7 @@ const components = [
|
|
|
13292
13615
|
TaoSpoiler,
|
|
13293
13616
|
TaoSpoilerGroup,
|
|
13294
13617
|
TaoCopy,
|
|
13618
|
+
_sfc_main$11,
|
|
13295
13619
|
_sfc_main$10,
|
|
13296
13620
|
TaoContainer,
|
|
13297
13621
|
_sfc_main$_,
|
|
@@ -13310,7 +13634,7 @@ const components = [
|
|
|
13310
13634
|
TaoTextarea,
|
|
13311
13635
|
TaoScrollTop,
|
|
13312
13636
|
TaoProgress,
|
|
13313
|
-
_sfc_main$
|
|
13637
|
+
_sfc_main$18,
|
|
13314
13638
|
_sfc_main$M,
|
|
13315
13639
|
TaoFileDrop,
|
|
13316
13640
|
TaoDropdownMenu,
|
|
@@ -13438,7 +13762,7 @@ export {
|
|
|
13438
13762
|
TaoSegmentedOption,
|
|
13439
13763
|
TaoSelect,
|
|
13440
13764
|
TaoSkeleton,
|
|
13441
|
-
_sfc_main$
|
|
13765
|
+
_sfc_main$18 as TaoSlider,
|
|
13442
13766
|
TaoSpace,
|
|
13443
13767
|
TaoSparkline,
|
|
13444
13768
|
TaoSplit,
|
|
@@ -13450,13 +13774,14 @@ export {
|
|
|
13450
13774
|
TaoTabs,
|
|
13451
13775
|
TaoTag,
|
|
13452
13776
|
TaoTextarea,
|
|
13453
|
-
_sfc_main$
|
|
13777
|
+
_sfc_main$11 as TaoThemeToggle,
|
|
13454
13778
|
TaoTimeline,
|
|
13455
13779
|
TaoToastViewport,
|
|
13456
13780
|
TaoToolbar,
|
|
13457
13781
|
TaoToolbarGroup,
|
|
13458
13782
|
TaoToolbarSeparator,
|
|
13459
13783
|
TaoTooltip,
|
|
13784
|
+
_sfc_main$10 as TaoTour,
|
|
13460
13785
|
TaoTree,
|
|
13461
13786
|
TaoUI,
|
|
13462
13787
|
apcaContrast,
|
|
@@ -13484,6 +13809,7 @@ export {
|
|
|
13484
13809
|
provideTaoLocale,
|
|
13485
13810
|
readTaoMode,
|
|
13486
13811
|
registerTaoIcons,
|
|
13812
|
+
resolveTourTarget,
|
|
13487
13813
|
rgbToHsl,
|
|
13488
13814
|
rgbaToHsva,
|
|
13489
13815
|
setTaoLocale,
|