@1337exp/taoui 5.29.1 → 5.30.1
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 +726 -707
- package/README.md +1 -1
- package/README.ru.md +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +135 -82
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +105 -105
- package/skills/taoui/SKILL.md +8 -2
- package/skills/taoui/references/components.md +1 -1
- package/skills/taoui/references/patterns.md +163 -0
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, createStaticVNode, toDisplayString, createCommentVNode, useSlots, useAttrs, createBlock, useId, mergeProps, watch, createVNode, toValue, onBeforeUnmount, nextTick, onMounted, Teleport, Transition, withCtx,
|
|
1
|
+
import { Comment, Text, Fragment, 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, nextTick, onMounted, Teleport, Transition, withCtx, renderList, createTextVNode, withDirectives, withModifiers, withKeys, vModelText, createSlots, normalizeProps, guardReactiveProps, resolveDynamicComponent, onBeforeMount, resolveComponent, toRef, vShow, getCurrentInstance, reactive, TransitionGroup, onUpdated, createApp } from "vue";
|
|
2
2
|
function isDev() {
|
|
3
3
|
try {
|
|
4
4
|
return process.env.NODE_ENV !== "production";
|
|
@@ -28,6 +28,18 @@ function resolveSize(el, size) {
|
|
|
28
28
|
const value = getComputedStyle(el).getPropertyValue("--tao-size").trim();
|
|
29
29
|
return sizes.includes(value) ? value : "medium";
|
|
30
30
|
}
|
|
31
|
+
function slotHas(slots, name = "default") {
|
|
32
|
+
return slotHasContent(slots[name]?.());
|
|
33
|
+
}
|
|
34
|
+
function slotHasContent(nodes) {
|
|
35
|
+
if (!nodes) return false;
|
|
36
|
+
return nodes.some((node) => {
|
|
37
|
+
if (node.type === Comment) return false;
|
|
38
|
+
if (node.type === Text) return typeof node.children === "string" && node.children.trim() !== "";
|
|
39
|
+
if (node.type === Fragment) return Array.isArray(node.children) && slotHasContent(node.children);
|
|
40
|
+
return true;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
31
43
|
const tones = ["accent", "neutral", "success", "danger", "warning", "info"];
|
|
32
44
|
function toneClass(tone) {
|
|
33
45
|
if (tone && !tones.includes(tone)) {
|
|
@@ -660,7 +672,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
660
672
|
}
|
|
661
673
|
});
|
|
662
674
|
const TaoLoader = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["__scopeId", "data-v-03f29efb"]]);
|
|
663
|
-
const _hoisted_1$16 = ["type", "aria-pressed", "aria-keyshortcuts", "aria-busy", "disabled"];
|
|
675
|
+
const _hoisted_1$16 = ["type", "aria-pressed", "aria-keyshortcuts", "title", "aria-busy", "disabled"];
|
|
664
676
|
const _hoisted_2$Y = {
|
|
665
677
|
key: 2,
|
|
666
678
|
class: "tao-button__content"
|
|
@@ -696,10 +708,18 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
696
708
|
const emit = __emit;
|
|
697
709
|
const slots = useSlots();
|
|
698
710
|
const attrs = useAttrs();
|
|
699
|
-
const
|
|
700
|
-
|
|
711
|
+
const hasContent = () => slotHasContent(slots.default?.());
|
|
712
|
+
const isIconOnly = () => Boolean(props.icon || props.iconEnd) && !hasContent();
|
|
713
|
+
if (Boolean(props.icon || props.iconEnd) && !slots.default && !attrs["aria-label"] && !attrs["aria-labelledby"] && !attrs.title) {
|
|
701
714
|
devWarning("button:icon-only", "TaoButton: a button with only an icon needs aria-label (or aria-labelledby / title).");
|
|
702
715
|
}
|
|
716
|
+
function shortcutTitle() {
|
|
717
|
+
if (!props.shortcut || !isIconOnly()) {
|
|
718
|
+
return void 0;
|
|
719
|
+
}
|
|
720
|
+
const label = attrs["aria-label"];
|
|
721
|
+
return typeof label === "string" && label ? `${label} (${props.shortcut})` : props.shortcut;
|
|
722
|
+
}
|
|
703
723
|
function handleClick(event) {
|
|
704
724
|
if (!props.disabled && !props.loading) {
|
|
705
725
|
emit("click", event);
|
|
@@ -718,7 +738,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
718
738
|
"tao-button--disabled": __props.disabled,
|
|
719
739
|
"tao-button--loading": __props.loading,
|
|
720
740
|
"tao-button--block": __props.block,
|
|
721
|
-
"tao-button--icon-only":
|
|
741
|
+
"tao-button--icon-only": isIconOnly(),
|
|
722
742
|
"tao-button--toned": !!__props.tone && __props.tone !== "accent",
|
|
723
743
|
"tao-button--pressed": __props.pressed === true
|
|
724
744
|
}
|
|
@@ -727,6 +747,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
727
747
|
type: __props.type,
|
|
728
748
|
"aria-pressed": __props.pressed === void 0 ? void 0 : __props.pressed,
|
|
729
749
|
"aria-keyshortcuts": __props.shortcut || void 0,
|
|
750
|
+
title: shortcutTitle(),
|
|
730
751
|
"aria-busy": __props.loading || void 0,
|
|
731
752
|
disabled: __props.disabled || __props.loading,
|
|
732
753
|
onClick: handleClick
|
|
@@ -744,7 +765,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
744
765
|
class: "tao-button__icon",
|
|
745
766
|
name: __props.icon
|
|
746
767
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
747
|
-
|
|
768
|
+
hasContent() ? (openBlock(), createElementBlock("span", _hoisted_2$Y, [
|
|
748
769
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
749
770
|
])) : createCommentVNode("", true),
|
|
750
771
|
__props.iconEnd ? (openBlock(), createBlock(TaoIcon, {
|
|
@@ -752,12 +773,12 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
752
773
|
class: "tao-button__icon",
|
|
753
774
|
name: __props.iconEnd
|
|
754
775
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
755
|
-
__props.shortcut ? (openBlock(), createElementBlock("kbd", _hoisted_3$P, toDisplayString(__props.shortcut), 1)) : createCommentVNode("", true)
|
|
776
|
+
__props.shortcut && !isIconOnly() ? (openBlock(), createElementBlock("kbd", _hoisted_3$P, toDisplayString(__props.shortcut), 1)) : createCommentVNode("", true)
|
|
756
777
|
], 14, _hoisted_1$16);
|
|
757
778
|
};
|
|
758
779
|
}
|
|
759
780
|
});
|
|
760
|
-
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["__scopeId", "data-v-
|
|
781
|
+
const TaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["__scopeId", "data-v-be24f74d"]]);
|
|
761
782
|
function toCssLength(value) {
|
|
762
783
|
if (value === void 0 || value === null || value === "") {
|
|
763
784
|
return void 0;
|
|
@@ -872,6 +893,8 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
872
893
|
focused.value = true;
|
|
873
894
|
emit("focus", event);
|
|
874
895
|
}
|
|
896
|
+
const slots = useSlots();
|
|
897
|
+
const has = (name) => slotHas(slots, name);
|
|
875
898
|
return (_ctx, _cache) => {
|
|
876
899
|
return openBlock(), createElementBlock("div", mergeProps(unref(rootAttrs)(), {
|
|
877
900
|
class: ["tao-input-wrapper", unref(sizeClass)(__props.size)]
|
|
@@ -882,11 +905,11 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
882
905
|
"tao-input-shell--focused": focused.value,
|
|
883
906
|
"tao-input-shell--invalid": unref(invalid),
|
|
884
907
|
"tao-input-shell--disabled": __props.disabled,
|
|
885
|
-
"tao-input-shell--prefix":
|
|
886
|
-
"tao-input-shell--suffix":
|
|
908
|
+
"tao-input-shell--prefix": has("prefix"),
|
|
909
|
+
"tao-input-shell--suffix": has("suffix")
|
|
887
910
|
}])
|
|
888
911
|
}, [
|
|
889
|
-
|
|
912
|
+
has("prefix") ? (openBlock(), createElementBlock("span", _hoisted_1$15, [
|
|
890
913
|
renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
891
914
|
])) : createCommentVNode("", true),
|
|
892
915
|
createElementVNode("input", mergeProps(unref(controlAttrs)(), {
|
|
@@ -902,7 +925,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
902
925
|
onBlur: handleBlur,
|
|
903
926
|
onFocus: handleFocus
|
|
904
927
|
}), null, 16, _hoisted_2$X),
|
|
905
|
-
|
|
928
|
+
has("suffix") ? (openBlock(), createElementBlock("span", _hoisted_3$O, [
|
|
906
929
|
renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
|
|
907
930
|
])) : createCommentVNode("", true)
|
|
908
931
|
], 2)
|
|
@@ -910,7 +933,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
910
933
|
};
|
|
911
934
|
}
|
|
912
935
|
});
|
|
913
|
-
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["__scopeId", "data-v-
|
|
936
|
+
const TaoInput = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["__scopeId", "data-v-66bc5496"]]);
|
|
914
937
|
const _hoisted_1$14 = {
|
|
915
938
|
key: 0,
|
|
916
939
|
class: "tao-input-group__addon tao-input-group__addon--before"
|
|
@@ -938,6 +961,8 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
938
961
|
focused.value = false;
|
|
939
962
|
}
|
|
940
963
|
}
|
|
964
|
+
const slots = useSlots();
|
|
965
|
+
const has = (name) => slotHas(slots, name);
|
|
941
966
|
return (_ctx, _cache) => {
|
|
942
967
|
return openBlock(), createElementBlock("div", {
|
|
943
968
|
class: normalizeClass(["tao-input-group", [unref(sizeClass)(__props.size), { "tao-input-group--focused": focused.value }]]),
|
|
@@ -945,20 +970,20 @@ const _sfc_main$1g = /* @__PURE__ */ defineComponent({
|
|
|
945
970
|
onFocusin: onFocusIn,
|
|
946
971
|
onFocusout: onFocusOut
|
|
947
972
|
}, [
|
|
948
|
-
|
|
973
|
+
has("before") ? (openBlock(), createElementBlock("div", _hoisted_1$14, [
|
|
949
974
|
renderSlot(_ctx.$slots, "before", {}, void 0, true)
|
|
950
975
|
])) : createCommentVNode("", true),
|
|
951
976
|
createElementVNode("div", _hoisted_2$W, [
|
|
952
977
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
953
978
|
]),
|
|
954
|
-
|
|
979
|
+
has("after") ? (openBlock(), createElementBlock("div", _hoisted_3$N, [
|
|
955
980
|
renderSlot(_ctx.$slots, "after", {}, void 0, true)
|
|
956
981
|
])) : createCommentVNode("", true)
|
|
957
982
|
], 34);
|
|
958
983
|
};
|
|
959
984
|
}
|
|
960
985
|
});
|
|
961
|
-
const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["__scopeId", "data-v-
|
|
986
|
+
const TaoInputGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["__scopeId", "data-v-d38f6b53"]]);
|
|
962
987
|
const _hoisted_1$13 = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
963
988
|
const _hoisted_2$V = {
|
|
964
989
|
key: 0,
|
|
@@ -1417,11 +1442,12 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
1417
1442
|
const l10n = useLocaleText(props, "card");
|
|
1418
1443
|
const emit = __emit;
|
|
1419
1444
|
const slots = useSlots();
|
|
1445
|
+
const has = (name) => slotHas(slots, name);
|
|
1420
1446
|
const hasContent = computed(
|
|
1421
|
-
() =>
|
|
1447
|
+
() => has("header") || has("title") || has("sub") || has("default") || has("footer")
|
|
1422
1448
|
);
|
|
1423
|
-
const mediaOnly = computed(() =>
|
|
1424
|
-
const hasCorner = computed(() =>
|
|
1449
|
+
const mediaOnly = computed(() => has("media") && !hasContent.value);
|
|
1450
|
+
const hasCorner = computed(() => has("corner") || props.closable);
|
|
1425
1451
|
const paddingStyle = computed(() => props.padding === void 0 || props.flush ? void 0 : { padding: toCssBox(props.padding) });
|
|
1426
1452
|
const radiusStyle = computed(() => {
|
|
1427
1453
|
const pad = props.padding;
|
|
@@ -1459,21 +1485,21 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
1459
1485
|
class: "tao-card__content",
|
|
1460
1486
|
style: normalizeStyle(paddingStyle.value)
|
|
1461
1487
|
}, [
|
|
1462
|
-
|
|
1488
|
+
has("header") ? (openBlock(), createElementBlock("div", _hoisted_4$D, [
|
|
1463
1489
|
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
1464
1490
|
])) : createCommentVNode("", true),
|
|
1465
|
-
|
|
1466
|
-
|
|
1491
|
+
has("title") || has("sub") ? (openBlock(), createElementBlock("div", _hoisted_5$t, [
|
|
1492
|
+
has("title") ? (openBlock(), createElementBlock("h2", _hoisted_6$o, [
|
|
1467
1493
|
renderSlot(_ctx.$slots, "title", {}, void 0, true)
|
|
1468
1494
|
])) : createCommentVNode("", true),
|
|
1469
|
-
|
|
1495
|
+
has("sub") ? (openBlock(), createElementBlock("div", _hoisted_7$k, [
|
|
1470
1496
|
renderSlot(_ctx.$slots, "sub", {}, void 0, true)
|
|
1471
1497
|
])) : createCommentVNode("", true)
|
|
1472
1498
|
])) : createCommentVNode("", true),
|
|
1473
|
-
|
|
1499
|
+
has("default") ? (openBlock(), createElementBlock("div", _hoisted_8$d, [
|
|
1474
1500
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1475
1501
|
])) : createCommentVNode("", true),
|
|
1476
|
-
|
|
1502
|
+
has("footer") ? (openBlock(), createElementBlock("div", _hoisted_9$9, [
|
|
1477
1503
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1478
1504
|
])) : createCommentVNode("", true)
|
|
1479
1505
|
], 4)) : createCommentVNode("", true),
|
|
@@ -1496,7 +1522,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
1496
1522
|
};
|
|
1497
1523
|
}
|
|
1498
1524
|
});
|
|
1499
|
-
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-
|
|
1525
|
+
const TaoCard = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-4096cfb6"]]);
|
|
1500
1526
|
const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
1501
1527
|
function getFocusable(root) {
|
|
1502
1528
|
return [...root.querySelectorAll(FOCUSABLE)].filter(
|
|
@@ -1732,6 +1758,8 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
1732
1758
|
},
|
|
1733
1759
|
{ immediate: true }
|
|
1734
1760
|
);
|
|
1761
|
+
const slots = useSlots();
|
|
1762
|
+
const has = (name) => slotHas(slots, name);
|
|
1735
1763
|
return (_ctx, _cache) => {
|
|
1736
1764
|
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
1737
1765
|
createVNode(Transition, { name: "tao-modal-fade" }, {
|
|
@@ -1780,7 +1808,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
1780
1808
|
createElementVNode("div", _hoisted_7$j, [
|
|
1781
1809
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1782
1810
|
]),
|
|
1783
|
-
|
|
1811
|
+
has("footer") ? (openBlock(), createElementBlock("div", _hoisted_8$c, [
|
|
1784
1812
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1785
1813
|
])) : createCommentVNode("", true)
|
|
1786
1814
|
], 16, _hoisted_1$10)
|
|
@@ -1792,7 +1820,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
1792
1820
|
};
|
|
1793
1821
|
}
|
|
1794
1822
|
});
|
|
1795
|
-
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-
|
|
1823
|
+
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-855470e7"]]);
|
|
1796
1824
|
const _hoisted_1$$ = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
|
|
1797
1825
|
const _hoisted_2$R = ["id", "aria-labelledby"];
|
|
1798
1826
|
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
@@ -3233,6 +3261,17 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
3233
3261
|
}
|
|
3234
3262
|
});
|
|
3235
3263
|
const TaoTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-32ae3936"]]);
|
|
3264
|
+
const resolved = ["compact", "default", "comfortable"];
|
|
3265
|
+
function densityClass(density) {
|
|
3266
|
+
return density ? `tao-density-${density}` : void 0;
|
|
3267
|
+
}
|
|
3268
|
+
function resolveDensity(el) {
|
|
3269
|
+
if (!el || typeof getComputedStyle === "undefined") {
|
|
3270
|
+
return "default";
|
|
3271
|
+
}
|
|
3272
|
+
const value = getComputedStyle(el).getPropertyValue("--tao-density").trim();
|
|
3273
|
+
return resolved.includes(value) ? value : "default";
|
|
3274
|
+
}
|
|
3236
3275
|
function useDismiss(open, inside, onDismiss) {
|
|
3237
3276
|
function onPointer(event) {
|
|
3238
3277
|
const target = event.target;
|
|
@@ -3279,6 +3318,8 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
3279
3318
|
const internal = ref(false);
|
|
3280
3319
|
const isControlled = computed(() => props.modelValue !== void 0);
|
|
3281
3320
|
const open = computed(() => isControlled.value ? Boolean(props.modelValue) : internal.value);
|
|
3321
|
+
const panelSize = ref("medium");
|
|
3322
|
+
const panelDensity = ref("default");
|
|
3282
3323
|
function setOpen(next) {
|
|
3283
3324
|
if (props.disabled && next) {
|
|
3284
3325
|
return;
|
|
@@ -3312,6 +3353,8 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
3312
3353
|
});
|
|
3313
3354
|
watch(open, (isOpen) => {
|
|
3314
3355
|
if (isOpen) {
|
|
3356
|
+
panelSize.value = resolveSize(triggerRef.value);
|
|
3357
|
+
panelDensity.value = resolveDensity(triggerRef.value);
|
|
3315
3358
|
void nextTick(() => panelRef.value?.focus({ preventScroll: true }));
|
|
3316
3359
|
}
|
|
3317
3360
|
});
|
|
@@ -3333,19 +3376,19 @@ const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
|
3333
3376
|
key: 0,
|
|
3334
3377
|
ref_key: "panelRef",
|
|
3335
3378
|
ref: panelRef,
|
|
3336
|
-
class: "tao-popover__panel",
|
|
3379
|
+
class: normalizeClass(["tao-popover__panel", [unref(sizeClass)(panelSize.value), unref(densityClass)(panelDensity.value)]]),
|
|
3337
3380
|
role: "dialog",
|
|
3338
3381
|
tabindex: "-1",
|
|
3339
3382
|
style: normalizeStyle(unref(panelStyle))
|
|
3340
3383
|
}, [
|
|
3341
3384
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
3342
|
-
],
|
|
3385
|
+
], 6)) : createCommentVNode("", true)
|
|
3343
3386
|
]))
|
|
3344
3387
|
]);
|
|
3345
3388
|
};
|
|
3346
3389
|
}
|
|
3347
3390
|
});
|
|
3348
|
-
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-
|
|
3391
|
+
const TaoPopover = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["__scopeId", "data-v-5b104664"]]);
|
|
3349
3392
|
const spoilerGroupKey = Symbol("taoSpoilerGroup");
|
|
3350
3393
|
function frameStyle(bordered) {
|
|
3351
3394
|
if (bordered === void 0 || bordered === null) {
|
|
@@ -3416,6 +3459,8 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
3416
3459
|
element.style.height = "0";
|
|
3417
3460
|
});
|
|
3418
3461
|
}
|
|
3462
|
+
const slots = useSlots();
|
|
3463
|
+
const has = (name) => slotHas(slots, name);
|
|
3419
3464
|
return (_ctx, _cache) => {
|
|
3420
3465
|
return openBlock(), createElementBlock("div", {
|
|
3421
3466
|
class: "tao-spoiler",
|
|
@@ -3432,7 +3477,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
3432
3477
|
class: normalizeClass(["tao-spoiler__icon", { "tao-spoiler__icon--open": isOpen.value }]),
|
|
3433
3478
|
name: "tao-chevron-right"
|
|
3434
3479
|
}, null, 8, ["class"]),
|
|
3435
|
-
__props.title ||
|
|
3480
|
+
__props.title || has("title") ? (openBlock(), createElementBlock("span", _hoisted_2$O, [
|
|
3436
3481
|
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
3437
3482
|
createTextVNode(toDisplayString(__props.title), 1)
|
|
3438
3483
|
], true)
|
|
@@ -3462,7 +3507,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
3462
3507
|
};
|
|
3463
3508
|
}
|
|
3464
3509
|
});
|
|
3465
|
-
const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-
|
|
3510
|
+
const TaoSpoiler = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["__scopeId", "data-v-e9a2fb77"]]);
|
|
3466
3511
|
const _hoisted_1$W = { class: "tao-spoiler-group" };
|
|
3467
3512
|
const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
3468
3513
|
...{ name: "TaoSpoilerGroup" },
|
|
@@ -4670,6 +4715,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
4670
4715
|
const l10n = useLocaleText(props, "tag");
|
|
4671
4716
|
const emit = __emit;
|
|
4672
4717
|
const slots = useSlots();
|
|
4718
|
+
const has = (name) => slotHas(slots, name);
|
|
4673
4719
|
const style = computed(() => ({
|
|
4674
4720
|
color: props.color || "",
|
|
4675
4721
|
background: props.background || "",
|
|
@@ -4692,7 +4738,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
4692
4738
|
]]),
|
|
4693
4739
|
style: normalizeStyle(style.value)
|
|
4694
4740
|
}, [
|
|
4695
|
-
|
|
4741
|
+
has("prefix") ? (openBlock(), createElementBlock("span", _hoisted_1$P, [
|
|
4696
4742
|
renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
|
|
4697
4743
|
])) : createCommentVNode("", true),
|
|
4698
4744
|
createElementVNode("span", _hoisted_2$J, [
|
|
@@ -4715,7 +4761,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
4715
4761
|
};
|
|
4716
4762
|
}
|
|
4717
4763
|
});
|
|
4718
|
-
const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-
|
|
4764
|
+
const TaoTag = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-0af1f161"]]);
|
|
4719
4765
|
const _hoisted_1$O = ["role", "aria-hidden"];
|
|
4720
4766
|
const _hoisted_2$I = {
|
|
4721
4767
|
key: 1,
|
|
@@ -4737,8 +4783,9 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
4737
4783
|
setup(__props) {
|
|
4738
4784
|
const props = __props;
|
|
4739
4785
|
const slots = useSlots();
|
|
4786
|
+
const has = (name) => slotHas(slots, name);
|
|
4740
4787
|
const gapSize = computed(() => props.size);
|
|
4741
|
-
const hasLabel = computed(() => Boolean(props.text) ||
|
|
4788
|
+
const hasLabel = computed(() => Boolean(props.text) || has("default"));
|
|
4742
4789
|
return (_ctx, _cache) => {
|
|
4743
4790
|
return openBlock(), createElementBlock("div", {
|
|
4744
4791
|
class: normalizeClass(["tao-divider", [
|
|
@@ -4766,7 +4813,7 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
4766
4813
|
};
|
|
4767
4814
|
}
|
|
4768
4815
|
});
|
|
4769
|
-
const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-
|
|
4816
|
+
const TaoDivider = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-c4a941aa"]]);
|
|
4770
4817
|
const _hoisted_1$N = {
|
|
4771
4818
|
key: 0,
|
|
4772
4819
|
class: "tao-fieldset__legend"
|
|
@@ -4780,11 +4827,13 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
4780
4827
|
align: { default: "start" }
|
|
4781
4828
|
},
|
|
4782
4829
|
setup(__props) {
|
|
4830
|
+
const slots = useSlots();
|
|
4831
|
+
const has = (name) => slotHas(slots, name);
|
|
4783
4832
|
return (_ctx, _cache) => {
|
|
4784
4833
|
return openBlock(), createElementBlock("fieldset", {
|
|
4785
4834
|
class: normalizeClass(["tao-fieldset", `tao-fieldset--${__props.align}`])
|
|
4786
4835
|
}, [
|
|
4787
|
-
__props.legend ||
|
|
4836
|
+
__props.legend || has("legend") ? (openBlock(), createElementBlock("legend", _hoisted_1$N, [
|
|
4788
4837
|
renderSlot(_ctx.$slots, "legend", {}, () => [
|
|
4789
4838
|
createTextVNode(toDisplayString(__props.legend), 1)
|
|
4790
4839
|
], true)
|
|
@@ -4796,7 +4845,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
4796
4845
|
};
|
|
4797
4846
|
}
|
|
4798
4847
|
});
|
|
4799
|
-
const TaoFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-
|
|
4848
|
+
const TaoFieldset = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-3ab4beaf"]]);
|
|
4800
4849
|
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
4801
4850
|
...{ name: "TaoAnimatedBorder" },
|
|
4802
4851
|
__name: "TaoAnimatedBorder",
|
|
@@ -5150,9 +5199,10 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
5150
5199
|
setup(__props) {
|
|
5151
5200
|
const props = __props;
|
|
5152
5201
|
const slots = useSlots();
|
|
5202
|
+
const has = (name) => slotHas(slots, name);
|
|
5153
5203
|
const minW = computed(() => props.minWidth ?? 200);
|
|
5154
5204
|
const maxW = computed(() => props.maxWidth ?? 400);
|
|
5155
|
-
const hasRight = computed(() =>
|
|
5205
|
+
const hasRight = computed(() => has("right"));
|
|
5156
5206
|
const percentPlace = computed(() => {
|
|
5157
5207
|
if (!props.showPercentage) {
|
|
5158
5208
|
return null;
|
|
@@ -5170,7 +5220,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
5170
5220
|
class: normalizeClass(["tao-progress__container", { "tao-progress__container--over": showOverPercent.value }]),
|
|
5171
5221
|
style: normalizeStyle({ minWidth: `${minW.value}px`, maxWidth: `${maxW.value}px` })
|
|
5172
5222
|
}, [
|
|
5173
|
-
|
|
5223
|
+
has("left") ? (openBlock(), createElementBlock("div", _hoisted_2$E, [
|
|
5174
5224
|
renderSlot(_ctx.$slots, "left", {}, void 0, true)
|
|
5175
5225
|
])) : createCommentVNode("", true),
|
|
5176
5226
|
createElementVNode("div", _hoisted_3$y, [
|
|
@@ -5185,7 +5235,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
5185
5235
|
}, null, 6)
|
|
5186
5236
|
], 4)
|
|
5187
5237
|
]),
|
|
5188
|
-
|
|
5238
|
+
has("right") || showEndPercent.value ? (openBlock(), createElementBlock("div", _hoisted_5$p, [
|
|
5189
5239
|
renderSlot(_ctx.$slots, "right", {}, void 0, true),
|
|
5190
5240
|
showEndPercent.value ? (openBlock(), createElementBlock("span", _hoisted_6$k, toDisplayString(endPercentLabel.value), 1)) : createCommentVNode("", true)
|
|
5191
5241
|
])) : createCommentVNode("", true)
|
|
@@ -5194,7 +5244,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
5194
5244
|
};
|
|
5195
5245
|
}
|
|
5196
5246
|
});
|
|
5197
|
-
const TaoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-
|
|
5247
|
+
const TaoProgress = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["__scopeId", "data-v-35c69b59"]]);
|
|
5198
5248
|
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
5199
5249
|
...{ name: "TaoRangeSlider" },
|
|
5200
5250
|
__name: "TaoRangeSlider",
|
|
@@ -5494,17 +5544,6 @@ function menuReturnsFocus(reason) {
|
|
|
5494
5544
|
return reason !== "outside" && reason !== "scroll";
|
|
5495
5545
|
}
|
|
5496
5546
|
const menuTreeKey = Symbol("taoMenuTree");
|
|
5497
|
-
const resolved = ["compact", "default", "comfortable"];
|
|
5498
|
-
function densityClass(density) {
|
|
5499
|
-
return density ? `tao-density-${density}` : void 0;
|
|
5500
|
-
}
|
|
5501
|
-
function resolveDensity(el) {
|
|
5502
|
-
if (!el || typeof getComputedStyle === "undefined") {
|
|
5503
|
-
return "default";
|
|
5504
|
-
}
|
|
5505
|
-
const value = getComputedStyle(el).getPropertyValue("--tao-density").trim();
|
|
5506
|
-
return resolved.includes(value) ? value : "default";
|
|
5507
|
-
}
|
|
5508
5547
|
function stepEnabled(enabled, from, delta, loop = true) {
|
|
5509
5548
|
const count = enabled.length;
|
|
5510
5549
|
if (!enabled.some(Boolean)) {
|
|
@@ -6699,6 +6738,8 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6699
6738
|
const parts = props.segments ? arcs.value.map((arc) => `${arc.label} ${percent(arc.share)}`).join(", ") : `${props.value} / ${props.max}`;
|
|
6700
6739
|
return props.label ? `${props.label}: ${parts}` : parts;
|
|
6701
6740
|
});
|
|
6741
|
+
const slots = useSlots();
|
|
6742
|
+
const has = (name) => slotHas(slots, name);
|
|
6702
6743
|
return (_ctx, _cache) => {
|
|
6703
6744
|
return openBlock(), createElementBlock("div", {
|
|
6704
6745
|
class: normalizeClass(["tao-donut", { "tao-donut--legend": __props.legend }])
|
|
@@ -6740,7 +6781,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6740
6781
|
]);
|
|
6741
6782
|
}), 128))
|
|
6742
6783
|
], 8, _hoisted_2$x)),
|
|
6743
|
-
|
|
6784
|
+
has("default") ? (openBlock(), createElementBlock("div", _hoisted_5$l, [
|
|
6744
6785
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
6745
6786
|
])) : createCommentVNode("", true)
|
|
6746
6787
|
], 12, _hoisted_1$A),
|
|
@@ -6763,7 +6804,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
6763
6804
|
};
|
|
6764
6805
|
}
|
|
6765
6806
|
});
|
|
6766
|
-
const TaoDonut = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-
|
|
6807
|
+
const TaoDonut = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-51178c3f"]]);
|
|
6767
6808
|
const _hoisted_1$z = ["aria-label", "aria-rowcount", "aria-colcount"];
|
|
6768
6809
|
const _hoisted_2$w = {
|
|
6769
6810
|
class: "tao-heatmap__row tao-heatmap__head",
|
|
@@ -7080,6 +7121,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
7080
7121
|
const l10n = useLocaleText(props, "nav");
|
|
7081
7122
|
const emit = __emit;
|
|
7082
7123
|
const slots = useSlots();
|
|
7124
|
+
const has = (name) => slotHas(slots, name);
|
|
7083
7125
|
const standalone = computed(() => !slots.default);
|
|
7084
7126
|
const overflowing = computed(() => props.items.length > props.maxBarItems);
|
|
7085
7127
|
const barCount = computed(() => overflowing.value ? Math.max(1, props.maxBarItems - 1) : props.items.length);
|
|
@@ -7127,7 +7169,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
7127
7169
|
"aria-label": unref(l10n).ariaLabel
|
|
7128
7170
|
}, [
|
|
7129
7171
|
createElementVNode("div", _hoisted_3$q, [
|
|
7130
|
-
|
|
7172
|
+
has("action") ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
|
|
7131
7173
|
renderSlot(_ctx.$slots, "action", {}, void 0, true)
|
|
7132
7174
|
])) : createCommentVNode("", true),
|
|
7133
7175
|
createElementVNode("ul", _hoisted_5$j, [
|
|
@@ -7190,7 +7232,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
7190
7232
|
], 10, _hoisted_10$3)
|
|
7191
7233
|
])) : createCommentVNode("", true)
|
|
7192
7234
|
]),
|
|
7193
|
-
|
|
7235
|
+
has("footer") ? (openBlock(), createElementBlock("div", _hoisted_13$1, [
|
|
7194
7236
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
7195
7237
|
])) : createCommentVNode("", true)
|
|
7196
7238
|
])
|
|
@@ -7213,7 +7255,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
7213
7255
|
};
|
|
7214
7256
|
}
|
|
7215
7257
|
});
|
|
7216
|
-
const TaoNav = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-
|
|
7258
|
+
const TaoNav = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-83603250"]]);
|
|
7217
7259
|
function visibleRows(nodes, expanded, children) {
|
|
7218
7260
|
const rows = [];
|
|
7219
7261
|
const ancestors = /* @__PURE__ */ new Set();
|
|
@@ -7821,6 +7863,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
7821
7863
|
setup(__props, { expose: __expose }) {
|
|
7822
7864
|
const props = __props;
|
|
7823
7865
|
const slots = useSlots();
|
|
7866
|
+
const has = (name) => slotHas(slots, name);
|
|
7824
7867
|
const box = ref(null);
|
|
7825
7868
|
const meter = ref(null);
|
|
7826
7869
|
const itemWidth = ref(0);
|
|
@@ -7884,7 +7927,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
7884
7927
|
/** Measures again (after the content changed in a way the marquee cannot see). / Перемерить. */
|
|
7885
7928
|
measure
|
|
7886
7929
|
});
|
|
7887
|
-
const hasSlot = computed(() =>
|
|
7930
|
+
const hasSlot = computed(() => has("default"));
|
|
7888
7931
|
return (_ctx, _cache) => {
|
|
7889
7932
|
return openBlock(), createElementBlock("span", {
|
|
7890
7933
|
ref_key: "box",
|
|
@@ -7933,7 +7976,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
7933
7976
|
};
|
|
7934
7977
|
}
|
|
7935
7978
|
});
|
|
7936
|
-
const TaoMarquee = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-
|
|
7979
|
+
const TaoMarquee = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-0d2fc5c4"]]);
|
|
7937
7980
|
const PIN_CELL = "#";
|
|
7938
7981
|
function parsePinFormat(format) {
|
|
7939
7982
|
const mask = [...format];
|
|
@@ -8731,7 +8774,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
8731
8774
|
};
|
|
8732
8775
|
}
|
|
8733
8776
|
});
|
|
8734
|
-
const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-
|
|
8777
|
+
const TaoSegmented = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-49ed8ced"]]);
|
|
8735
8778
|
const _hoisted_1$p = ["for"];
|
|
8736
8779
|
const _hoisted_2$n = ["id", "name", "value", "checked", "disabled", "aria-label"];
|
|
8737
8780
|
const _hoisted_3$j = { class: "tao-segmented-option__face" };
|
|
@@ -8771,6 +8814,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8771
8814
|
const emit = __emit;
|
|
8772
8815
|
const group = inject(segmentedKey, null);
|
|
8773
8816
|
const slots = useSlots();
|
|
8817
|
+
const has = (name) => slotHas(slots, name);
|
|
8774
8818
|
const localId = useId();
|
|
8775
8819
|
const isDisabled = computed(() => props.disabled || Boolean(group?.disabled.value));
|
|
8776
8820
|
const inputName = computed(() => group?.name.value ?? props.name);
|
|
@@ -8778,8 +8822,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8778
8822
|
const current2 = group ? group.model.value : props.modelValue;
|
|
8779
8823
|
return current2 === props.value;
|
|
8780
8824
|
});
|
|
8781
|
-
const hasLabel = computed(() => Boolean(props.label ||
|
|
8782
|
-
const isIconOnly = computed(() => Boolean((props.icon ||
|
|
8825
|
+
const hasLabel = computed(() => Boolean(props.label || has("default")));
|
|
8826
|
+
const isIconOnly = computed(() => Boolean((props.icon || has("icon")) && !hasLabel.value));
|
|
8783
8827
|
const countLabel = computed(() => {
|
|
8784
8828
|
if (props.count === void 0 || props.count === null || props.count === "") {
|
|
8785
8829
|
return "";
|
|
@@ -8824,7 +8868,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8824
8868
|
onChange
|
|
8825
8869
|
}, null, 40, _hoisted_2$n),
|
|
8826
8870
|
createElementVNode("span", _hoisted_3$j, [
|
|
8827
|
-
__props.icon ||
|
|
8871
|
+
__props.icon || has("icon") ? (openBlock(), createElementBlock("span", _hoisted_4$i, [
|
|
8828
8872
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
8829
8873
|
createVNode(TaoIcon, { name: __props.icon }, null, 8, ["name"])
|
|
8830
8874
|
], true)
|
|
@@ -8840,7 +8884,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
8840
8884
|
};
|
|
8841
8885
|
}
|
|
8842
8886
|
});
|
|
8843
|
-
const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-
|
|
8887
|
+
const TaoSegmentedOption = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-71f5d295"]]);
|
|
8844
8888
|
const _hoisted_1$o = ["tabindex", "aria-label", "aria-valuetext", "aria-valuenow"];
|
|
8845
8889
|
const _hoisted_2$m = { class: "tao-color-picker__strips" };
|
|
8846
8890
|
const _hoisted_3$i = { class: "tao-color-picker__row" };
|
|
@@ -10702,6 +10746,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
10702
10746
|
emit("update:modelValue", next);
|
|
10703
10747
|
emit("change", next);
|
|
10704
10748
|
}
|
|
10749
|
+
const slots = useSlots();
|
|
10750
|
+
const has = (name) => slotHas(slots, name);
|
|
10705
10751
|
return (_ctx, _cache) => {
|
|
10706
10752
|
return openBlock(), createElementBlock("label", mergeProps(unref(rootAttrs)(), {
|
|
10707
10753
|
class: ["tao-switch", [unref(sizeClass)(__props.size), { "tao-switch--disabled": __props.disabled, "tao-switch--on": __props.modelValue, "tao-switch--invalid": unref(invalid), "tao-switch--loading": __props.loading }]],
|
|
@@ -10726,14 +10772,14 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
10726
10772
|
}, [
|
|
10727
10773
|
createElementVNode("span", { class: "tao-switch__thumb" })
|
|
10728
10774
|
], -1)),
|
|
10729
|
-
__props.label ? (openBlock(), createElementBlock("span", _hoisted_3$d, toDisplayString(__props.label), 1)) :
|
|
10775
|
+
__props.label ? (openBlock(), createElementBlock("span", _hoisted_3$d, toDisplayString(__props.label), 1)) : has("default") ? (openBlock(), createElementBlock("span", _hoisted_4$d, [
|
|
10730
10776
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
10731
10777
|
])) : createCommentVNode("", true)
|
|
10732
10778
|
], 16, _hoisted_1$i);
|
|
10733
10779
|
};
|
|
10734
10780
|
}
|
|
10735
10781
|
});
|
|
10736
|
-
const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-
|
|
10782
|
+
const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-a2c618be"]]);
|
|
10737
10783
|
const radioGroupKey = Symbol("taoRadioGroup");
|
|
10738
10784
|
const _hoisted_1$h = ["for"];
|
|
10739
10785
|
const _hoisted_2$f = ["id", "name", "value", "checked", "disabled", "aria-invalid", "aria-describedby"];
|
|
@@ -10938,6 +10984,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
10938
10984
|
});
|
|
10939
10985
|
onBeforeUnmount(() => pending?.());
|
|
10940
10986
|
const isUrgent = computed(() => props.tone === "danger" || props.tone === "warning");
|
|
10987
|
+
const slots = useSlots();
|
|
10988
|
+
const has = (name) => slotHas(slots, name);
|
|
10941
10989
|
return (_ctx, _cache) => {
|
|
10942
10990
|
return openBlock(), createElementBlock("div", {
|
|
10943
10991
|
class: normalizeClass(["tao-alert", unref(toneClass)(__props.tone)]),
|
|
@@ -10962,7 +11010,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
10962
11010
|
createVNode(TaoIcon, { name: "tao-chevron-down" })
|
|
10963
11011
|
], 2)
|
|
10964
11012
|
], 8, _hoisted_3$b)) : __props.title ? (openBlock(), createElementBlock("strong", _hoisted_5$a, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
10965
|
-
|
|
11013
|
+
has("default") && __props.collapsible ? (openBlock(), createElementBlock("div", {
|
|
10966
11014
|
key: 2,
|
|
10967
11015
|
ref_key: "fold",
|
|
10968
11016
|
ref: fold,
|
|
@@ -10976,7 +11024,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
10976
11024
|
}, [
|
|
10977
11025
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
10978
11026
|
], 40, _hoisted_6$7)
|
|
10979
|
-
], 2)) :
|
|
11027
|
+
], 2)) : has("default") ? (openBlock(), createElementBlock("div", {
|
|
10980
11028
|
key: 3,
|
|
10981
11029
|
id: unref(bodyId),
|
|
10982
11030
|
class: "tao-alert__message"
|
|
@@ -11001,7 +11049,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
11001
11049
|
};
|
|
11002
11050
|
}
|
|
11003
11051
|
});
|
|
11004
|
-
const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-
|
|
11052
|
+
const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-6327e98d"]]);
|
|
11005
11053
|
const _hoisted_1$e = { key: 0 };
|
|
11006
11054
|
const _hoisted_2$c = ["aria-sort"];
|
|
11007
11055
|
const _hoisted_3$a = ["onClick"];
|
|
@@ -11466,23 +11514,25 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
11466
11514
|
setup(__props) {
|
|
11467
11515
|
const props = __props;
|
|
11468
11516
|
const l10n = useLocaleText(props, "empty");
|
|
11517
|
+
const slots = useSlots();
|
|
11518
|
+
const has = (name) => slotHas(slots, name);
|
|
11469
11519
|
return (_ctx, _cache) => {
|
|
11470
11520
|
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
11471
|
-
|
|
11521
|
+
has("icon") ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
|
|
11472
11522
|
renderSlot(_ctx.$slots, "icon", {}, void 0, true)
|
|
11473
11523
|
])) : createCommentVNode("", true),
|
|
11474
11524
|
unref(l10n).title ? (openBlock(), createElementBlock("p", _hoisted_3$8, toDisplayString(unref(l10n).title), 1)) : createCommentVNode("", true),
|
|
11475
|
-
|
|
11525
|
+
has("default") ? (openBlock(), createElementBlock("p", _hoisted_4$8, [
|
|
11476
11526
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
11477
11527
|
])) : createCommentVNode("", true),
|
|
11478
|
-
|
|
11528
|
+
has("action") ? (openBlock(), createElementBlock("div", _hoisted_5$7, [
|
|
11479
11529
|
renderSlot(_ctx.$slots, "action", {}, void 0, true)
|
|
11480
11530
|
])) : createCommentVNode("", true)
|
|
11481
11531
|
]);
|
|
11482
11532
|
};
|
|
11483
11533
|
}
|
|
11484
11534
|
});
|
|
11485
|
-
const TaoEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
11535
|
+
const TaoEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-8dc64a22"]]);
|
|
11486
11536
|
const _hoisted_1$b = ["aria-label"];
|
|
11487
11537
|
const _hoisted_2$9 = {
|
|
11488
11538
|
key: 0,
|
|
@@ -11645,10 +11695,11 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
11645
11695
|
const props = __props;
|
|
11646
11696
|
const emit = __emit;
|
|
11647
11697
|
const slots = useSlots();
|
|
11648
|
-
const
|
|
11649
|
-
const
|
|
11650
|
-
const
|
|
11651
|
-
const
|
|
11698
|
+
const has = (name) => slotHas(slots, name);
|
|
11699
|
+
const hasAction = computed(() => has("action"));
|
|
11700
|
+
const hasPrefix = computed(() => has("prefix"));
|
|
11701
|
+
const hasSuffix = computed(() => has("suffix"));
|
|
11702
|
+
const hasDescription = computed(() => Boolean(props.description || has("description")));
|
|
11652
11703
|
function onHitClick(event) {
|
|
11653
11704
|
if (props.disabled || !props.clickable) {
|
|
11654
11705
|
return;
|
|
@@ -11714,7 +11765,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
11714
11765
|
};
|
|
11715
11766
|
}
|
|
11716
11767
|
});
|
|
11717
|
-
const TaoListItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
11768
|
+
const TaoListItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-a366ba66"]]);
|
|
11718
11769
|
const _hoisted_1$9 = {
|
|
11719
11770
|
class: "tao-skeleton-group",
|
|
11720
11771
|
"aria-hidden": true
|
|
@@ -11953,6 +12004,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
11953
12004
|
},
|
|
11954
12005
|
{ immediate: true }
|
|
11955
12006
|
);
|
|
12007
|
+
const slots = useSlots();
|
|
12008
|
+
const has = (name) => slotHas(slots, name);
|
|
11956
12009
|
return (_ctx, _cache) => {
|
|
11957
12010
|
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
11958
12011
|
createVNode(Transition, {
|
|
@@ -12010,7 +12063,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
12010
12063
|
createElementVNode("div", _hoisted_8$1, [
|
|
12011
12064
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
12012
12065
|
]),
|
|
12013
|
-
|
|
12066
|
+
has("footer") ? (openBlock(), createElementBlock("div", _hoisted_9$1, [
|
|
12014
12067
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
12015
12068
|
])) : createCommentVNode("", true)
|
|
12016
12069
|
], 16, _hoisted_1$8)
|
|
@@ -12022,7 +12075,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
12022
12075
|
};
|
|
12023
12076
|
}
|
|
12024
12077
|
});
|
|
12025
|
-
const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
12078
|
+
const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-62e7a0d6"]]);
|
|
12026
12079
|
const _hoisted_1$7 = ["title"];
|
|
12027
12080
|
const _hoisted_2$6 = { class: "tao-avatar__face" };
|
|
12028
12081
|
const _hoisted_3$5 = ["src", "alt"];
|