@1337exp/taoui 5.4.1 → 5.6.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 +37 -0
- package/README.md +834 -833
- package/README.ru.md +834 -833
- package/dist/index.d.ts +113 -7
- package/dist/index.js +399 -147
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +105 -105
- package/skills/taoui/SKILL.md +4 -3
- package/skills/taoui/references/components.md +7 -3
- package/src/styles/themes/dark.css +1 -1
- package/src/styles/themes/light.css +4 -3
- package/src/styles/tokens/primitives.css +5 -5
package/dist/index.js
CHANGED
|
@@ -69,6 +69,17 @@ const builtin = {
|
|
|
69
69
|
"align-left": { body: '<path d="M4 6.5h16M4 12h10M4 17.5h16"/>', grid: true },
|
|
70
70
|
"align-center": { body: '<path d="M4 6.5h16M7 12h10M4 17.5h16"/>', grid: true },
|
|
71
71
|
"align-right": { body: '<path d="M4 6.5h16M10 12h10M4 17.5h16"/>', grid: true },
|
|
72
|
+
// app actions / действия приложения
|
|
73
|
+
settings: {
|
|
74
|
+
body: '<circle cx="12" cy="12" r="3"/><path d="M12 3l1.6 2.4 2.8-.6.6 2.8L19.4 9 18.6 12l.8 3-2.4 1.4-.6 2.8-2.8-.6L12 21l-1.6-2.4-2.8.6-.6-2.8L4.6 15l.8-3-.8-3 2.4-1.4.6-2.8 2.8.6z"/>'
|
|
75
|
+
},
|
|
76
|
+
edit: { body: '<path d="M4 20h4L19.5 8.5a2.1 2.1 0 00-3-3L5 17z"/><path d="M14.5 7.5l2 2"/>' },
|
|
77
|
+
trash: { body: '<path d="M4 7h16M10 3.5h4"/><path d="M6.5 7l.9 12.6a1.5 1.5 0 001.5 1.4h6.2a1.5 1.5 0 001.5-1.4L17.5 7"/><path d="M10 11v6M14 11v6"/>' },
|
|
78
|
+
bell: { body: '<path d="M6 16v-5a6 6 0 0112 0v5l1.5 2h-15z"/><path d="M10 20.5a2 2 0 004 0"/>' },
|
|
79
|
+
tag: { body: '<path d="M3.5 12.6V4.5a1 1 0 011-1h8.1l8 8a1.4 1.4 0 010 2l-7 7a1.4 1.4 0 01-2 0z"/>' + dot(8, 8) },
|
|
80
|
+
repeat: { body: '<path d="M4 12V9.5A3.5 3.5 0 017.5 6H20M17 3l3 3-3 3"/><path d="M20 12v2.5a3.5 3.5 0 01-3.5 3.5H4M7 21l-3-3 3-3"/>' },
|
|
81
|
+
undo: { body: '<path d="M9 14L4 9l5-5"/><path d="M4 9h10.5a5.5 5.5 0 010 11H11"/>' },
|
|
82
|
+
redo: { body: '<path d="M15 14l5-5-5-5"/><path d="M20 9H9.5a5.5 5.5 0 000 11H13"/>' },
|
|
72
83
|
file: { body: '<path d="M14 3.5H7.5A1.5 1.5 0 006 5v14a1.5 1.5 0 001.5 1.5h9A1.5 1.5 0 0018 19V7.5z"/><path d="M14 3.5v4h4"/>' }
|
|
73
84
|
};
|
|
74
85
|
const registered = shallowReactive({});
|
|
@@ -451,7 +462,8 @@ const localeEn = {
|
|
|
451
462
|
todayText: "Today",
|
|
452
463
|
clearText: "Clear",
|
|
453
464
|
prevMonthLabel: "Previous month",
|
|
454
|
-
nextMonthLabel: "Next month"
|
|
465
|
+
nextMonthLabel: "Next month",
|
|
466
|
+
calendarLabel: "Choose a date"
|
|
455
467
|
},
|
|
456
468
|
dateRange: {
|
|
457
469
|
placeholder: "Period",
|
|
@@ -672,7 +684,8 @@ const localeRu = {
|
|
|
672
684
|
todayText: "Сегодня",
|
|
673
685
|
clearText: "Очистить",
|
|
674
686
|
prevMonthLabel: "Предыдущий месяц",
|
|
675
|
-
nextMonthLabel: "Следующий месяц"
|
|
687
|
+
nextMonthLabel: "Следующий месяц",
|
|
688
|
+
calendarLabel: "Выбрать дату"
|
|
676
689
|
},
|
|
677
690
|
dateRange: {
|
|
678
691
|
placeholder: "Период",
|
|
@@ -792,8 +805,8 @@ const _hoisted_2$T = {
|
|
|
792
805
|
};
|
|
793
806
|
const _hoisted_3$L = ["aria-label", "disabled"];
|
|
794
807
|
const _hoisted_4$D = { "aria-hidden": "true" };
|
|
795
|
-
const _hoisted_5$
|
|
796
|
-
const _hoisted_6$
|
|
808
|
+
const _hoisted_5$u = ["aria-label", "disabled"];
|
|
809
|
+
const _hoisted_6$n = { "aria-hidden": "true" };
|
|
797
810
|
const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
798
811
|
...{ name: "TaoInputNumber" },
|
|
799
812
|
__name: "TaoInputNumber",
|
|
@@ -975,12 +988,12 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
975
988
|
disabled: __props.disabled || atMin.value,
|
|
976
989
|
onClick: _cache[1] || (_cache[1] = ($event) => bump(-1))
|
|
977
990
|
}, [
|
|
978
|
-
createElementVNode("span", _hoisted_6$
|
|
991
|
+
createElementVNode("span", _hoisted_6$n, [
|
|
979
992
|
renderSlot(_ctx.$slots, "decrement-icon", {}, () => [
|
|
980
993
|
createVNode(TaoIcon, { name: "tao-minus" })
|
|
981
994
|
], true)
|
|
982
995
|
])
|
|
983
|
-
], 8, _hoisted_5$
|
|
996
|
+
], 8, _hoisted_5$u)
|
|
984
997
|
])) : createCommentVNode("", true)
|
|
985
998
|
], 2);
|
|
986
999
|
};
|
|
@@ -991,7 +1004,7 @@ const _hoisted_1$10 = ["aria-label", "disabled"];
|
|
|
991
1004
|
const _hoisted_2$S = { "aria-hidden": "true" };
|
|
992
1005
|
const _hoisted_3$K = ["id", "value", "disabled", "aria-invalid", "aria-describedby", "aria-valuenow", "aria-valuemin", "aria-valuemax"];
|
|
993
1006
|
const _hoisted_4$C = ["aria-label", "disabled"];
|
|
994
|
-
const _hoisted_5$
|
|
1007
|
+
const _hoisted_5$t = { "aria-hidden": "true" };
|
|
995
1008
|
const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
996
1009
|
...{ name: "TaoQuantity" },
|
|
997
1010
|
__name: "TaoQuantity",
|
|
@@ -1164,7 +1177,7 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
1164
1177
|
disabled: plusDisabled.value,
|
|
1165
1178
|
onClick: onInc
|
|
1166
1179
|
}, [
|
|
1167
|
-
createElementVNode("span", _hoisted_5$
|
|
1180
|
+
createElementVNode("span", _hoisted_5$t, [
|
|
1168
1181
|
renderSlot(_ctx.$slots, "increment-icon", {}, () => [
|
|
1169
1182
|
createVNode(TaoIcon, { name: "tao-plus" })
|
|
1170
1183
|
], true)
|
|
@@ -1191,11 +1204,11 @@ const _hoisted_4$B = {
|
|
|
1191
1204
|
key: 0,
|
|
1192
1205
|
class: "tao-card__header"
|
|
1193
1206
|
};
|
|
1194
|
-
const _hoisted_5$
|
|
1207
|
+
const _hoisted_5$s = {
|
|
1195
1208
|
key: 1,
|
|
1196
1209
|
class: "tao-card__title-block"
|
|
1197
1210
|
};
|
|
1198
|
-
const _hoisted_6$
|
|
1211
|
+
const _hoisted_6$m = {
|
|
1199
1212
|
key: 0,
|
|
1200
1213
|
class: "tao-card__title"
|
|
1201
1214
|
};
|
|
@@ -1207,7 +1220,7 @@ const _hoisted_8$b = {
|
|
|
1207
1220
|
key: 2,
|
|
1208
1221
|
class: "tao-card__body"
|
|
1209
1222
|
};
|
|
1210
|
-
const _hoisted_9$
|
|
1223
|
+
const _hoisted_9$8 = {
|
|
1211
1224
|
key: 3,
|
|
1212
1225
|
class: "tao-card__footer"
|
|
1213
1226
|
};
|
|
@@ -1285,8 +1298,8 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
1285
1298
|
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_4$B, [
|
|
1286
1299
|
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
1287
1300
|
])) : createCommentVNode("", true),
|
|
1288
|
-
_ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
1289
|
-
_ctx.$slots.title ? (openBlock(), createElementBlock("h2", _hoisted_6$
|
|
1301
|
+
_ctx.$slots.title || _ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_5$s, [
|
|
1302
|
+
_ctx.$slots.title ? (openBlock(), createElementBlock("h2", _hoisted_6$m, [
|
|
1290
1303
|
renderSlot(_ctx.$slots, "title", {}, void 0, true)
|
|
1291
1304
|
])) : createCommentVNode("", true),
|
|
1292
1305
|
_ctx.$slots.sub ? (openBlock(), createElementBlock("div", _hoisted_7$h, [
|
|
@@ -1296,7 +1309,7 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
1296
1309
|
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_8$b, [
|
|
1297
1310
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1298
1311
|
])) : createCommentVNode("", true),
|
|
1299
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_9$
|
|
1312
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_9$8, [
|
|
1300
1313
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1301
1314
|
])) : createCommentVNode("", true)
|
|
1302
1315
|
], 4)) : createCommentVNode("", true),
|
|
@@ -1448,8 +1461,8 @@ const _hoisted_2$Q = {
|
|
|
1448
1461
|
};
|
|
1449
1462
|
const _hoisted_3$I = ["id"];
|
|
1450
1463
|
const _hoisted_4$A = { key: 1 };
|
|
1451
|
-
const _hoisted_5$
|
|
1452
|
-
const _hoisted_6$
|
|
1464
|
+
const _hoisted_5$r = ["aria-label"];
|
|
1465
|
+
const _hoisted_6$l = { "aria-hidden": "true" };
|
|
1453
1466
|
const _hoisted_7$g = { class: "tao-modal__content" };
|
|
1454
1467
|
const _hoisted_8$a = {
|
|
1455
1468
|
key: 1,
|
|
@@ -1462,7 +1475,8 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1462
1475
|
modelValue: { type: Boolean },
|
|
1463
1476
|
title: { default: "" },
|
|
1464
1477
|
closable: { type: Boolean, default: true },
|
|
1465
|
-
closeLabel: {}
|
|
1478
|
+
closeLabel: {},
|
|
1479
|
+
fullscreen: { type: [Boolean, String], default: false }
|
|
1466
1480
|
},
|
|
1467
1481
|
emits: ["update:modelValue", "close"],
|
|
1468
1482
|
setup(__props, { emit: __emit }) {
|
|
@@ -1518,7 +1532,10 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1518
1532
|
default: withCtx(() => [
|
|
1519
1533
|
__props.modelValue ? (openBlock(), createElementBlock("div", {
|
|
1520
1534
|
key: 0,
|
|
1521
|
-
class: "tao-modal-overlay",
|
|
1535
|
+
class: normalizeClass(["tao-modal-overlay", {
|
|
1536
|
+
"tao-modal-overlay--fullscreen": __props.fullscreen === true,
|
|
1537
|
+
"tao-modal-overlay--fullscreen-narrow": __props.fullscreen === "narrow"
|
|
1538
|
+
}]),
|
|
1522
1539
|
onPointerdown: onOverlayPointerDown,
|
|
1523
1540
|
onPointerup: onOverlayPointerUp,
|
|
1524
1541
|
onKeydown: onKeydown2
|
|
@@ -1547,12 +1564,12 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1547
1564
|
"aria-label": unref(l10n).closeLabel,
|
|
1548
1565
|
onClick: close
|
|
1549
1566
|
}, [
|
|
1550
|
-
createElementVNode("span", _hoisted_6$
|
|
1567
|
+
createElementVNode("span", _hoisted_6$l, [
|
|
1551
1568
|
renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
1552
1569
|
createVNode(TaoIcon, { name: "tao-close" })
|
|
1553
1570
|
], true)
|
|
1554
1571
|
])
|
|
1555
|
-
], 8, _hoisted_5$
|
|
1572
|
+
], 8, _hoisted_5$r)) : createCommentVNode("", true)
|
|
1556
1573
|
])) : createCommentVNode("", true),
|
|
1557
1574
|
createElementVNode("div", _hoisted_7$g, [
|
|
1558
1575
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
@@ -1561,7 +1578,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1561
1578
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1562
1579
|
])) : createCommentVNode("", true)
|
|
1563
1580
|
], 8, _hoisted_1$_)
|
|
1564
|
-
],
|
|
1581
|
+
], 34)) : createCommentVNode("", true)
|
|
1565
1582
|
]),
|
|
1566
1583
|
_: 3
|
|
1567
1584
|
})
|
|
@@ -1569,7 +1586,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
1569
1586
|
};
|
|
1570
1587
|
}
|
|
1571
1588
|
});
|
|
1572
|
-
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["__scopeId", "data-v-
|
|
1589
|
+
const TaoModal = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["__scopeId", "data-v-f4246a64"]]);
|
|
1573
1590
|
const _hoisted_1$Z = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"];
|
|
1574
1591
|
const _hoisted_2$P = ["id", "aria-labelledby"];
|
|
1575
1592
|
const _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
@@ -1786,8 +1803,8 @@ const _hoisted_4$z = {
|
|
|
1786
1803
|
key: 0,
|
|
1787
1804
|
class: "tao-slider__marks"
|
|
1788
1805
|
};
|
|
1789
|
-
const _hoisted_5$
|
|
1790
|
-
const _hoisted_6$
|
|
1806
|
+
const _hoisted_5$q = ["disabled", "onClick"];
|
|
1807
|
+
const _hoisted_6$k = {
|
|
1791
1808
|
key: 0,
|
|
1792
1809
|
class: "tao-slider__mark-label"
|
|
1793
1810
|
};
|
|
@@ -1982,7 +1999,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
1982
1999
|
createElementVNode("div", {
|
|
1983
2000
|
ref_key: "railRef",
|
|
1984
2001
|
ref: railRef,
|
|
1985
|
-
class: "tao-slider__rail",
|
|
2002
|
+
class: normalizeClass(["tao-slider__rail", { "tao-slider__rail--dragging": isDragging.value }]),
|
|
1986
2003
|
onPointerdown: onPointerDown,
|
|
1987
2004
|
onPointermove: onPointerMove,
|
|
1988
2005
|
onPointerup: onPointerEnd,
|
|
@@ -2020,7 +2037,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
2020
2037
|
createTextVNode(toDisplayString(barText.value), 1),
|
|
2021
2038
|
renderSlot(_ctx.$slots, "post-value", {}, void 0, true)
|
|
2022
2039
|
])) : createCommentVNode("", true)
|
|
2023
|
-
],
|
|
2040
|
+
], 34),
|
|
2024
2041
|
markList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$z, [
|
|
2025
2042
|
(openBlock(true), createElementBlock(Fragment, null, renderList(markList.value, (mark) => {
|
|
2026
2043
|
return openBlock(), createElementBlock("button", {
|
|
@@ -2037,7 +2054,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
2037
2054
|
onClick: ($event) => onMarkClick(mark)
|
|
2038
2055
|
}, [
|
|
2039
2056
|
_cache[2] || (_cache[2] = createElementVNode("span", { class: "tao-slider__tick" }, null, -1)),
|
|
2040
|
-
mark.label ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
2057
|
+
mark.label ? (openBlock(), createElementBlock("span", _hoisted_6$k, [
|
|
2041
2058
|
renderSlot(_ctx.$slots, "mark", {
|
|
2042
2059
|
mark,
|
|
2043
2060
|
active: unref(isMarkActive)(mark.value, values.value)
|
|
@@ -2045,14 +2062,14 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
2045
2062
|
createTextVNode(toDisplayString(mark.label), 1)
|
|
2046
2063
|
], true)
|
|
2047
2064
|
])) : createCommentVNode("", true)
|
|
2048
|
-
], 14, _hoisted_5$
|
|
2065
|
+
], 14, _hoisted_5$q);
|
|
2049
2066
|
}), 128))
|
|
2050
2067
|
])) : createCommentVNode("", true)
|
|
2051
2068
|
], 42, _hoisted_1$Y);
|
|
2052
2069
|
};
|
|
2053
2070
|
}
|
|
2054
2071
|
});
|
|
2055
|
-
const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-
|
|
2072
|
+
const TaoSliderBase = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-992bdfd9"]]);
|
|
2056
2073
|
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
2057
2074
|
...{ name: "TaoSlider" },
|
|
2058
2075
|
__name: "TaoSlider",
|
|
@@ -2549,7 +2566,7 @@ const _hoisted_3$F = {
|
|
|
2549
2566
|
class: "tao-spoiler__title"
|
|
2550
2567
|
};
|
|
2551
2568
|
const _hoisted_4$y = ["id"];
|
|
2552
|
-
const _hoisted_5$
|
|
2569
|
+
const _hoisted_5$p = { class: "tao-spoiler__content-inner" };
|
|
2553
2570
|
const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
2554
2571
|
...{ name: "TaoSpoiler" },
|
|
2555
2572
|
__name: "TaoSpoiler",
|
|
@@ -2637,7 +2654,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
2637
2654
|
id: unref(panelId),
|
|
2638
2655
|
class: "tao-spoiler__content"
|
|
2639
2656
|
}, [
|
|
2640
|
-
createElementVNode("div", _hoisted_5$
|
|
2657
|
+
createElementVNode("div", _hoisted_5$p, [
|
|
2641
2658
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2642
2659
|
])
|
|
2643
2660
|
], 8, _hoisted_4$y)) : createCommentVNode("", true)
|
|
@@ -3957,11 +3974,11 @@ const _hoisted_4$u = {
|
|
|
3957
3974
|
key: 0,
|
|
3958
3975
|
class: "tao-progress__percentage"
|
|
3959
3976
|
};
|
|
3960
|
-
const _hoisted_5$
|
|
3977
|
+
const _hoisted_5$o = {
|
|
3961
3978
|
key: 1,
|
|
3962
3979
|
class: "tao-progress__side"
|
|
3963
3980
|
};
|
|
3964
|
-
const _hoisted_6$
|
|
3981
|
+
const _hoisted_6$j = {
|
|
3965
3982
|
key: 0,
|
|
3966
3983
|
class: "tao-progress__percentage"
|
|
3967
3984
|
};
|
|
@@ -4014,9 +4031,9 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
4014
4031
|
}, null, 6)
|
|
4015
4032
|
], 4)
|
|
4016
4033
|
]),
|
|
4017
|
-
_ctx.$slots.right || showEndPercent.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
4034
|
+
_ctx.$slots.right || showEndPercent.value ? (openBlock(), createElementBlock("div", _hoisted_5$o, [
|
|
4018
4035
|
renderSlot(_ctx.$slots, "right", {}, void 0, true),
|
|
4019
|
-
showEndPercent.value ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
4036
|
+
showEndPercent.value ? (openBlock(), createElementBlock("span", _hoisted_6$j, toDisplayString(endPercentLabel.value), 1)) : createCommentVNode("", true)
|
|
4020
4037
|
])) : createCommentVNode("", true)
|
|
4021
4038
|
], 6)
|
|
4022
4039
|
]);
|
|
@@ -4085,14 +4102,14 @@ const _hoisted_1$I = { class: "tao-file-drop__row" };
|
|
|
4085
4102
|
const _hoisted_2$C = ["aria-label"];
|
|
4086
4103
|
const _hoisted_3$x = { "aria-hidden": "true" };
|
|
4087
4104
|
const _hoisted_4$t = ["accept", "multiple"];
|
|
4088
|
-
const _hoisted_5$
|
|
4105
|
+
const _hoisted_5$n = {
|
|
4089
4106
|
key: 0,
|
|
4090
4107
|
class: "tao-file-drop__list"
|
|
4091
4108
|
};
|
|
4092
|
-
const _hoisted_6$
|
|
4109
|
+
const _hoisted_6$i = { class: "tao-file-drop__name" };
|
|
4093
4110
|
const _hoisted_7$f = { class: "tao-file-drop__meta" };
|
|
4094
4111
|
const _hoisted_8$9 = ["aria-label", "onClick"];
|
|
4095
|
-
const _hoisted_9$
|
|
4112
|
+
const _hoisted_9$7 = { "aria-hidden": "true" };
|
|
4096
4113
|
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
4097
4114
|
...{ name: "TaoFileDrop" },
|
|
4098
4115
|
__name: "TaoFileDrop",
|
|
@@ -4265,13 +4282,13 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
4265
4282
|
}, null, 40, _hoisted_4$t)
|
|
4266
4283
|
], 34)
|
|
4267
4284
|
]),
|
|
4268
|
-
__props.list && __props.modelValue.length ? (openBlock(), createElementBlock("ul", _hoisted_5$
|
|
4285
|
+
__props.list && __props.modelValue.length ? (openBlock(), createElementBlock("ul", _hoisted_5$n, [
|
|
4269
4286
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.modelValue, (file, index) => {
|
|
4270
4287
|
return openBlock(), createElementBlock("li", {
|
|
4271
4288
|
key: fileKey(file, index),
|
|
4272
4289
|
class: "tao-file-drop__file"
|
|
4273
4290
|
}, [
|
|
4274
|
-
createElementVNode("span", _hoisted_6$
|
|
4291
|
+
createElementVNode("span", _hoisted_6$i, toDisplayString(file.name), 1),
|
|
4275
4292
|
createElementVNode("span", _hoisted_7$f, toDisplayString(sizeLabel(file.size)), 1),
|
|
4276
4293
|
createElementVNode("button", {
|
|
4277
4294
|
type: "button",
|
|
@@ -4279,7 +4296,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
4279
4296
|
"aria-label": unref(l10n).removeLabel.replace("{name}", file.name),
|
|
4280
4297
|
onClick: ($event) => removeAt(index)
|
|
4281
4298
|
}, [
|
|
4282
|
-
createElementVNode("span", _hoisted_9$
|
|
4299
|
+
createElementVNode("span", _hoisted_9$7, [
|
|
4283
4300
|
renderSlot(_ctx.$slots, "remove-icon", {}, () => [
|
|
4284
4301
|
createVNode(TaoIcon, { name: "tao-close" })
|
|
4285
4302
|
], true)
|
|
@@ -4401,8 +4418,8 @@ const _hoisted_3$w = {
|
|
|
4401
4418
|
role: "presentation"
|
|
4402
4419
|
};
|
|
4403
4420
|
const _hoisted_4$s = ["id", "role", "aria-checked", "aria-disabled", "aria-haspopup", "aria-expanded", "aria-keyshortcuts", "onClick", "onMouseenter"];
|
|
4404
|
-
const _hoisted_5$
|
|
4405
|
-
const _hoisted_6$
|
|
4421
|
+
const _hoisted_5$m = { class: "tao-menu__text" };
|
|
4422
|
+
const _hoisted_6$h = {
|
|
4406
4423
|
key: 1,
|
|
4407
4424
|
class: "tao-menu__shortcut"
|
|
4408
4425
|
};
|
|
@@ -4629,9 +4646,9 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
4629
4646
|
class: "tao-menu__icon",
|
|
4630
4647
|
name: item.icon
|
|
4631
4648
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
4632
|
-
createElementVNode("span", _hoisted_5$
|
|
4649
|
+
createElementVNode("span", _hoisted_5$m, toDisplayString(item.label), 1)
|
|
4633
4650
|
]),
|
|
4634
|
-
"shortcut" in item && item.shortcut ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
4651
|
+
"shortcut" in item && item.shortcut ? (openBlock(), createElementBlock("span", _hoisted_6$h, toDisplayString(item.shortcut), 1)) : createCommentVNode("", true),
|
|
4635
4652
|
"items" in item && item.items ? (openBlock(), createElementBlock("span", _hoisted_7$e)) : createCommentVNode("", true)
|
|
4636
4653
|
], 42, _hoisted_4$s),
|
|
4637
4654
|
"items" in item && item.items && openSub.value === index ? (openBlock(), createBlock(_component_TaoMenu, {
|
|
@@ -5361,7 +5378,7 @@ const _hoisted_4$q = {
|
|
|
5361
5378
|
key: 0,
|
|
5362
5379
|
class: "tao-meter__value"
|
|
5363
5380
|
};
|
|
5364
|
-
const _hoisted_5$
|
|
5381
|
+
const _hoisted_5$l = { class: "tao-meter__track" };
|
|
5365
5382
|
const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
5366
5383
|
...{ name: "TaoMeter" },
|
|
5367
5384
|
__name: "TaoMeter",
|
|
@@ -5400,7 +5417,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
5400
5417
|
createElementVNode("span", _hoisted_3$t, toDisplayString(__props.label), 1),
|
|
5401
5418
|
shown.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(shown.value), 1)) : createCommentVNode("", true)
|
|
5402
5419
|
])) : createCommentVNode("", true),
|
|
5403
|
-
createElementVNode("div", _hoisted_5$
|
|
5420
|
+
createElementVNode("div", _hoisted_5$l, [
|
|
5404
5421
|
createElementVNode("div", {
|
|
5405
5422
|
class: "tao-meter__fill",
|
|
5406
5423
|
style: normalizeStyle({ width: `${share.value * 100}%` })
|
|
@@ -5415,12 +5432,12 @@ const _hoisted_1$z = ["aria-label"];
|
|
|
5415
5432
|
const _hoisted_2$w = ["viewBox", "width", "height"];
|
|
5416
5433
|
const _hoisted_3$s = ["cx", "cy", "r", "stroke-width"];
|
|
5417
5434
|
const _hoisted_4$p = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "transform"];
|
|
5418
|
-
const _hoisted_5$
|
|
5435
|
+
const _hoisted_5$k = {
|
|
5419
5436
|
key: 0,
|
|
5420
5437
|
class: "tao-donut__centre",
|
|
5421
5438
|
"aria-hidden": "true"
|
|
5422
5439
|
};
|
|
5423
|
-
const _hoisted_6$
|
|
5440
|
+
const _hoisted_6$g = {
|
|
5424
5441
|
key: 0,
|
|
5425
5442
|
class: "tao-donut__legend",
|
|
5426
5443
|
"aria-hidden": "true"
|
|
@@ -5507,11 +5524,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
5507
5524
|
]);
|
|
5508
5525
|
}), 128))
|
|
5509
5526
|
], 8, _hoisted_2$w)),
|
|
5510
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
5527
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_5$k, [
|
|
5511
5528
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5512
5529
|
])) : createCommentVNode("", true)
|
|
5513
5530
|
], 12, _hoisted_1$z),
|
|
5514
|
-
__props.legend && __props.segments ? (openBlock(), createElementBlock("ul", _hoisted_6$
|
|
5531
|
+
__props.legend && __props.segments ? (openBlock(), createElementBlock("ul", _hoisted_6$g, [
|
|
5515
5532
|
(openBlock(true), createElementBlock(Fragment, null, renderList(arcs.value, (arc) => {
|
|
5516
5533
|
return openBlock(), createElementBlock("li", {
|
|
5517
5534
|
key: arc.key,
|
|
@@ -5538,15 +5555,15 @@ const _hoisted_4$o = {
|
|
|
5538
5555
|
key: 0,
|
|
5539
5556
|
class: "tao-nav__action"
|
|
5540
5557
|
};
|
|
5541
|
-
const _hoisted_5$
|
|
5542
|
-
const _hoisted_6$
|
|
5558
|
+
const _hoisted_5$j = { class: "tao-nav__list" };
|
|
5559
|
+
const _hoisted_6$f = {
|
|
5543
5560
|
key: 0,
|
|
5544
5561
|
class: "tao-nav__icon",
|
|
5545
5562
|
"aria-hidden": "true"
|
|
5546
5563
|
};
|
|
5547
5564
|
const _hoisted_7$c = { class: "tao-nav__label" };
|
|
5548
5565
|
const _hoisted_8$7 = ["aria-hidden"];
|
|
5549
|
-
const _hoisted_9$
|
|
5566
|
+
const _hoisted_9$6 = {
|
|
5550
5567
|
key: 0,
|
|
5551
5568
|
class: "tao-nav__entry tao-nav__entry--more"
|
|
5552
5569
|
};
|
|
@@ -5628,7 +5645,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
5628
5645
|
_ctx.$slots.action ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
|
|
5629
5646
|
renderSlot(_ctx.$slots, "action", {}, void 0, true)
|
|
5630
5647
|
])) : createCommentVNode("", true),
|
|
5631
|
-
createElementVNode("ul", _hoisted_5$
|
|
5648
|
+
createElementVNode("ul", _hoisted_5$j, [
|
|
5632
5649
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
|
|
5633
5650
|
return openBlock(), createElementBlock("li", {
|
|
5634
5651
|
key: item.id,
|
|
@@ -5644,7 +5661,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
5644
5661
|
onClick: ($event) => choose(item, $event)
|
|
5645
5662
|
}, {
|
|
5646
5663
|
default: withCtx(() => [
|
|
5647
|
-
item.icon ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
5664
|
+
item.icon ? (openBlock(), createElementBlock("span", _hoisted_6$f, [
|
|
5648
5665
|
createVNode(TaoIcon, {
|
|
5649
5666
|
name: item.icon,
|
|
5650
5667
|
size: 20
|
|
@@ -5668,7 +5685,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
5668
5685
|
}, 1032, ["class", "href", "type", "disabled", "aria-disabled", "aria-current", "onClick"]))
|
|
5669
5686
|
], 2);
|
|
5670
5687
|
}), 128)),
|
|
5671
|
-
overflowing.value ? (openBlock(), createElementBlock("li", _hoisted_9$
|
|
5688
|
+
overflowing.value ? (openBlock(), createElementBlock("li", _hoisted_9$6, [
|
|
5672
5689
|
createElementVNode("button", {
|
|
5673
5690
|
ref_key: "moreButton",
|
|
5674
5691
|
ref: moreButton,
|
|
@@ -5708,7 +5725,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
5708
5725
|
};
|
|
5709
5726
|
}
|
|
5710
5727
|
});
|
|
5711
|
-
const TaoNav = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-
|
|
5728
|
+
const TaoNav = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-beedd254"]]);
|
|
5712
5729
|
function visibleRows(nodes, expanded, children) {
|
|
5713
5730
|
const rows = [];
|
|
5714
5731
|
const walk = (list, level, parentId) => {
|
|
@@ -5732,18 +5749,18 @@ function checkUnits(node, children) {
|
|
|
5732
5749
|
}
|
|
5733
5750
|
return own.flatMap((child) => checkUnits(child, children));
|
|
5734
5751
|
}
|
|
5735
|
-
function checkState(node,
|
|
5752
|
+
function checkState(node, checked2, children) {
|
|
5736
5753
|
const units = checkUnits(node, children);
|
|
5737
5754
|
if (!units.length) {
|
|
5738
|
-
return
|
|
5755
|
+
return checked2.has(node.id) ? "checked" : "unchecked";
|
|
5739
5756
|
}
|
|
5740
|
-
const count = units.filter((id) =>
|
|
5757
|
+
const count = units.filter((id) => checked2.has(id)).length;
|
|
5741
5758
|
return count === 0 ? "unchecked" : count === units.length ? "checked" : "mixed";
|
|
5742
5759
|
}
|
|
5743
|
-
function toggleCheck(node,
|
|
5744
|
-
const next = new Set(
|
|
5760
|
+
function toggleCheck(node, checked2, children) {
|
|
5761
|
+
const next = new Set(checked2);
|
|
5745
5762
|
const units = checkUnits(node, children);
|
|
5746
|
-
const on = checkState(node,
|
|
5763
|
+
const on = checkState(node, checked2, children) !== "checked";
|
|
5747
5764
|
for (const id of units) {
|
|
5748
5765
|
if (on) {
|
|
5749
5766
|
next.add(id);
|
|
@@ -5757,8 +5774,8 @@ const _hoisted_1$x = ["aria-label", "aria-multiselectable"];
|
|
|
5757
5774
|
const _hoisted_2$u = ["id", "tabindex", "aria-level", "aria-setsize", "aria-posinset", "aria-expanded", "aria-selected", "aria-checked", "aria-disabled", "aria-busy", "onKeydown", "onClick", "onFocus"];
|
|
5758
5775
|
const _hoisted_3$q = ["onClick"];
|
|
5759
5776
|
const _hoisted_4$n = ["title"];
|
|
5760
|
-
const _hoisted_5$
|
|
5761
|
-
const _hoisted_6$
|
|
5777
|
+
const _hoisted_5$i = ["onClick"];
|
|
5778
|
+
const _hoisted_6$e = {
|
|
5762
5779
|
key: 1,
|
|
5763
5780
|
class: "tao-tree__icon",
|
|
5764
5781
|
"aria-hidden": "true"
|
|
@@ -6044,8 +6061,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
6044
6061
|
class: normalizeClass(["tao-tree__check", `tao-tree__check--${stateOf(row)}`]),
|
|
6045
6062
|
"aria-hidden": "true",
|
|
6046
6063
|
onClick: withModifiers(($event) => check(row), ["stop"])
|
|
6047
|
-
}, null, 10, _hoisted_5$
|
|
6048
|
-
_ctx.$slots.icon || row.node.icon ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
6064
|
+
}, null, 10, _hoisted_5$i)) : createCommentVNode("", true),
|
|
6065
|
+
_ctx.$slots.icon || row.node.icon ? (openBlock(), createElementBlock("span", _hoisted_6$e, [
|
|
6049
6066
|
renderSlot(_ctx.$slots, "icon", mergeProps({ ref_for: true }, slotProps(row)), () => [
|
|
6050
6067
|
createVNode(TaoIcon, {
|
|
6051
6068
|
name: row.node.icon
|
|
@@ -6085,8 +6102,8 @@ const _hoisted_4$m = {
|
|
|
6085
6102
|
class: "tao-checklist__counter",
|
|
6086
6103
|
"aria-live": "polite"
|
|
6087
6104
|
};
|
|
6088
|
-
const _hoisted_5$
|
|
6089
|
-
const _hoisted_6$
|
|
6105
|
+
const _hoisted_5$h = { class: "tao-checklist__text" };
|
|
6106
|
+
const _hoisted_6$d = { class: "tao-checklist__label" };
|
|
6090
6107
|
const _hoisted_7$a = {
|
|
6091
6108
|
key: 0,
|
|
6092
6109
|
class: "tao-checklist__description"
|
|
@@ -6115,10 +6132,10 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
6115
6132
|
const { field, invalid, describedBy } = useField(props);
|
|
6116
6133
|
provide(formFieldKey, null);
|
|
6117
6134
|
const labelledBy = computed(() => props.legend || !field ? void 0 : `${field.id}-label`);
|
|
6118
|
-
const
|
|
6135
|
+
const checked2 = computed(() => new Set(props.modelValue));
|
|
6119
6136
|
const enabledItems = computed(() => props.items.filter((item) => !item.disabled));
|
|
6120
|
-
const checkedCount = computed(() => props.items.filter((item) =>
|
|
6121
|
-
const enabledChecked = computed(() => enabledItems.value.filter((item) =>
|
|
6137
|
+
const checkedCount = computed(() => props.items.filter((item) => checked2.value.has(item.value)).length);
|
|
6138
|
+
const enabledChecked = computed(() => enabledItems.value.filter((item) => checked2.value.has(item.value)).length);
|
|
6122
6139
|
const allChecked = computed(() => enabledItems.value.length > 0 && enabledChecked.value === enabledItems.value.length);
|
|
6123
6140
|
const someChecked = computed(() => enabledChecked.value > 0 && !allChecked.value);
|
|
6124
6141
|
function commit(next) {
|
|
@@ -6127,7 +6144,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
6127
6144
|
emit("change", values);
|
|
6128
6145
|
}
|
|
6129
6146
|
function setItem(item, on) {
|
|
6130
|
-
const next = new Set(
|
|
6147
|
+
const next = new Set(checked2.value);
|
|
6131
6148
|
if (on) {
|
|
6132
6149
|
next.add(item.value);
|
|
6133
6150
|
} else {
|
|
@@ -6136,7 +6153,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
6136
6153
|
commit(next);
|
|
6137
6154
|
}
|
|
6138
6155
|
function setAll() {
|
|
6139
|
-
const next = new Set(
|
|
6156
|
+
const next = new Set(checked2.value);
|
|
6140
6157
|
const on = !allChecked.value;
|
|
6141
6158
|
for (const item of enabledItems.value) {
|
|
6142
6159
|
if (on) {
|
|
@@ -6176,21 +6193,21 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
6176
6193
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
|
|
6177
6194
|
return openBlock(), createElementBlock("li", {
|
|
6178
6195
|
key: item.value,
|
|
6179
|
-
class: normalizeClass(["tao-checklist__item", { "tao-checklist__item--checked":
|
|
6196
|
+
class: normalizeClass(["tao-checklist__item", { "tao-checklist__item--checked": checked2.value.has(item.value) }])
|
|
6180
6197
|
}, [
|
|
6181
6198
|
createVNode(TaoCheckbox, {
|
|
6182
|
-
"model-value":
|
|
6199
|
+
"model-value": checked2.value.has(item.value),
|
|
6183
6200
|
disabled: __props.disabled || item.disabled,
|
|
6184
6201
|
error: unref(invalid),
|
|
6185
6202
|
"onUpdate:modelValue": ($event) => setItem(item, $event)
|
|
6186
6203
|
}, {
|
|
6187
6204
|
default: withCtx(() => [
|
|
6188
|
-
createElementVNode("span", _hoisted_5$
|
|
6205
|
+
createElementVNode("span", _hoisted_5$h, [
|
|
6189
6206
|
renderSlot(_ctx.$slots, "item", {
|
|
6190
6207
|
item,
|
|
6191
|
-
checked:
|
|
6208
|
+
checked: checked2.value.has(item.value)
|
|
6192
6209
|
}, () => [
|
|
6193
|
-
createElementVNode("span", _hoisted_6$
|
|
6210
|
+
createElementVNode("span", _hoisted_6$d, toDisplayString(item.label), 1),
|
|
6194
6211
|
item.description ? (openBlock(), createElementBlock("span", _hoisted_7$a, toDisplayString(item.description), 1)) : createCommentVNode("", true)
|
|
6195
6212
|
], true)
|
|
6196
6213
|
])
|
|
@@ -6221,8 +6238,8 @@ const _hoisted_3$o = {
|
|
|
6221
6238
|
class: "tao-timeline__line"
|
|
6222
6239
|
};
|
|
6223
6240
|
const _hoisted_4$l = { class: "tao-timeline__body" };
|
|
6224
|
-
const _hoisted_5$
|
|
6225
|
-
const _hoisted_6$
|
|
6241
|
+
const _hoisted_5$g = ["datetime"];
|
|
6242
|
+
const _hoisted_6$c = { class: "tao-timeline__title" };
|
|
6226
6243
|
const _hoisted_7$9 = {
|
|
6227
6244
|
key: 1,
|
|
6228
6245
|
class: "tao-timeline__description"
|
|
@@ -6271,8 +6288,8 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
6271
6288
|
key: 0,
|
|
6272
6289
|
class: "tao-timeline__time",
|
|
6273
6290
|
datetime: item.datetime
|
|
6274
|
-
}, toDisplayString(item.time), 9, _hoisted_5$
|
|
6275
|
-
createElementVNode("div", _hoisted_6$
|
|
6291
|
+
}, toDisplayString(item.time), 9, _hoisted_5$g)) : createCommentVNode("", true),
|
|
6292
|
+
createElementVNode("div", _hoisted_6$c, [
|
|
6276
6293
|
renderSlot(_ctx.$slots, "title", mergeProps({ ref_for: true }, slotProps(item, index)), () => [
|
|
6277
6294
|
createTextVNode(toDisplayString(item.title), 1)
|
|
6278
6295
|
], true)
|
|
@@ -6464,7 +6481,7 @@ const _hoisted_4$k = {
|
|
|
6464
6481
|
class: "tao-pin-code__separator",
|
|
6465
6482
|
"aria-hidden": "true"
|
|
6466
6483
|
};
|
|
6467
|
-
const _hoisted_5$
|
|
6484
|
+
const _hoisted_5$f = {
|
|
6468
6485
|
class: "tao-sr-only",
|
|
6469
6486
|
role: "status"
|
|
6470
6487
|
};
|
|
@@ -6723,7 +6740,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
6723
6740
|
], 64);
|
|
6724
6741
|
}), 128)),
|
|
6725
6742
|
layout.value?.after ? (openBlock(), createElementBlock("span", _hoisted_4$k, toDisplayString(layout.value.after), 1)) : createCommentVNode("", true),
|
|
6726
|
-
createElementVNode("span", _hoisted_5$
|
|
6743
|
+
createElementVNode("span", _hoisted_5$f, toDisplayString(__props.status === "success" ? unref(l10n).successText : __props.status === "error" ? unref(l10n).errorText : ""), 1)
|
|
6727
6744
|
], 10, _hoisted_1$t);
|
|
6728
6745
|
};
|
|
6729
6746
|
}
|
|
@@ -7297,11 +7314,11 @@ const _hoisted_4$i = {
|
|
|
7297
7314
|
class: "tao-segmented-option__icon",
|
|
7298
7315
|
"aria-hidden": "true"
|
|
7299
7316
|
};
|
|
7300
|
-
const _hoisted_5$
|
|
7317
|
+
const _hoisted_5$e = {
|
|
7301
7318
|
key: 1,
|
|
7302
7319
|
class: "tao-segmented-option__label"
|
|
7303
7320
|
};
|
|
7304
|
-
const _hoisted_6$
|
|
7321
|
+
const _hoisted_6$b = {
|
|
7305
7322
|
key: 2,
|
|
7306
7323
|
class: "tao-segmented-option__sr"
|
|
7307
7324
|
};
|
|
@@ -7386,11 +7403,11 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
7386
7403
|
createVNode(TaoIcon, { name: __props.icon }, null, 8, ["name"])
|
|
7387
7404
|
], true)
|
|
7388
7405
|
])) : createCommentVNode("", true),
|
|
7389
|
-
hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
7406
|
+
hasLabel.value ? (openBlock(), createElementBlock("span", _hoisted_5$e, [
|
|
7390
7407
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
7391
7408
|
createTextVNode(toDisplayString(__props.label), 1)
|
|
7392
7409
|
], true)
|
|
7393
|
-
])) : __props.ariaLabel ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
7410
|
+
])) : __props.ariaLabel ? (openBlock(), createElementBlock("span", _hoisted_6$b, toDisplayString(__props.ariaLabel), 1)) : createCommentVNode("", true),
|
|
7394
7411
|
countLabel.value ? (openBlock(), createElementBlock("span", _hoisted_7$8, toDisplayString(countLabel.value), 1)) : createCommentVNode("", true)
|
|
7395
7412
|
])
|
|
7396
7413
|
], 10, _hoisted_1$p);
|
|
@@ -7402,17 +7419,17 @@ const _hoisted_1$o = ["tabindex", "aria-label", "aria-valuetext", "aria-valuenow
|
|
|
7402
7419
|
const _hoisted_2$m = { class: "tao-color-picker__strips" };
|
|
7403
7420
|
const _hoisted_3$j = { class: "tao-color-picker__row" };
|
|
7404
7421
|
const _hoisted_4$h = { class: "tao-color-picker__preview" };
|
|
7405
|
-
const _hoisted_5$
|
|
7422
|
+
const _hoisted_5$d = {
|
|
7406
7423
|
key: 0,
|
|
7407
7424
|
class: "tao-color-picker__hex"
|
|
7408
7425
|
};
|
|
7409
|
-
const _hoisted_6$
|
|
7426
|
+
const _hoisted_6$a = {
|
|
7410
7427
|
key: 1,
|
|
7411
7428
|
class: "tao-color-picker__channels"
|
|
7412
7429
|
};
|
|
7413
7430
|
const _hoisted_7$7 = ["disabled", "aria-label", "title"];
|
|
7414
7431
|
const _hoisted_8$6 = ["aria-label"];
|
|
7415
|
-
const _hoisted_9$
|
|
7432
|
+
const _hoisted_9$5 = ["disabled", "aria-label", "title", "onClick"];
|
|
7416
7433
|
const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
7417
7434
|
...{ name: "TaoColorPicker" },
|
|
7418
7435
|
__name: "TaoColorPicker",
|
|
@@ -7674,7 +7691,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
7674
7691
|
style: normalizeStyle({ backgroundColor: hex.value })
|
|
7675
7692
|
}, null, 4)
|
|
7676
7693
|
]),
|
|
7677
|
-
activeMode.value === "hex" ? (openBlock(), createElementBlock("label", _hoisted_5$
|
|
7694
|
+
activeMode.value === "hex" ? (openBlock(), createElementBlock("label", _hoisted_5$d, [
|
|
7678
7695
|
_cache[6] || (_cache[6] = createElementVNode("span", null, "HEX", -1)),
|
|
7679
7696
|
createVNode(TaoInput, {
|
|
7680
7697
|
modelValue: hexText.value,
|
|
@@ -7686,7 +7703,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
7686
7703
|
onBlur: commitHex,
|
|
7687
7704
|
onKeydown: withKeys(commitHex, ["enter"])
|
|
7688
7705
|
}, null, 8, ["modelValue", "error", "disabled", "aria-label"])
|
|
7689
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_6$
|
|
7706
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_6$a, [
|
|
7690
7707
|
(openBlock(true), createElementBlock(Fragment, null, renderList(channels.value, (c) => {
|
|
7691
7708
|
return openBlock(), createElementBlock("label", {
|
|
7692
7709
|
key: c.key,
|
|
@@ -7732,7 +7749,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
7732
7749
|
"aria-label": s,
|
|
7733
7750
|
title: s,
|
|
7734
7751
|
onClick: ($event) => pick(s)
|
|
7735
|
-
}, null, 14, _hoisted_9$
|
|
7752
|
+
}, null, 14, _hoisted_9$5);
|
|
7736
7753
|
}), 128))
|
|
7737
7754
|
], 8, _hoisted_8$6)) : createCommentVNode("", true)
|
|
7738
7755
|
], 2);
|
|
@@ -8396,18 +8413,90 @@ function buildTaoDateGrid(year, month) {
|
|
|
8396
8413
|
};
|
|
8397
8414
|
});
|
|
8398
8415
|
}
|
|
8416
|
+
function taoDateOrder(locale = "en-US") {
|
|
8417
|
+
try {
|
|
8418
|
+
const parts = new Intl.DateTimeFormat(locale, { day: "numeric", month: "numeric", year: "numeric" }).formatToParts(
|
|
8419
|
+
new Date(2001, 10, 22)
|
|
8420
|
+
);
|
|
8421
|
+
const order = parts.map((p) => p.type === "day" ? "d" : p.type === "month" ? "m" : p.type === "year" ? "y" : null).filter((f) => f !== null);
|
|
8422
|
+
return order.length === 3 ? order : ["d", "m", "y"];
|
|
8423
|
+
} catch {
|
|
8424
|
+
return ["d", "m", "y"];
|
|
8425
|
+
}
|
|
8426
|
+
}
|
|
8427
|
+
function formatTaoDateShort(iso, locale = "en-US") {
|
|
8428
|
+
const parts = parseTaoDate(iso);
|
|
8429
|
+
if (!parts) {
|
|
8430
|
+
return "";
|
|
8431
|
+
}
|
|
8432
|
+
return new Date(parts.y, parts.m - 1, parts.d).toLocaleDateString(locale, { day: "2-digit", month: "2-digit", year: "numeric" });
|
|
8433
|
+
}
|
|
8434
|
+
function fullYear(yy, referenceYear) {
|
|
8435
|
+
const base = Math.floor(referenceYear / 100) * 100;
|
|
8436
|
+
const candidates = [base - 100 + yy, base + yy, base + 100 + yy];
|
|
8437
|
+
return candidates.reduce((best, y) => Math.abs(y - referenceYear) < Math.abs(best - referenceYear) ? y : best);
|
|
8438
|
+
}
|
|
8439
|
+
function parseTaoDateInput(text, options = {}) {
|
|
8440
|
+
const value = text.trim();
|
|
8441
|
+
if (!value) {
|
|
8442
|
+
return null;
|
|
8443
|
+
}
|
|
8444
|
+
if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(value)) {
|
|
8445
|
+
const [y2, m2, d2] = value.split("-").map(Number);
|
|
8446
|
+
return checked(y2, m2, d2);
|
|
8447
|
+
}
|
|
8448
|
+
const ref2 = parseTaoDate(options.reference) ?? parseTaoDate(todayTaoDate());
|
|
8449
|
+
let tokens = value.split(/[\s./,-]+/).filter(Boolean);
|
|
8450
|
+
if (tokens.some((t) => !/^\d+$/.test(t))) {
|
|
8451
|
+
return null;
|
|
8452
|
+
}
|
|
8453
|
+
if (tokens.length === 1 && tokens[0].length > 2) {
|
|
8454
|
+
const digits = tokens[0];
|
|
8455
|
+
if (![4, 6, 8].includes(digits.length)) {
|
|
8456
|
+
return null;
|
|
8457
|
+
}
|
|
8458
|
+
tokens = [digits.slice(0, 2), digits.slice(2, 4), digits.slice(4)].filter(Boolean);
|
|
8459
|
+
}
|
|
8460
|
+
if (tokens.length > 3) {
|
|
8461
|
+
return null;
|
|
8462
|
+
}
|
|
8463
|
+
const order = taoDateOrder(options.locale).filter((f) => f !== "y");
|
|
8464
|
+
const n = tokens.map(Number);
|
|
8465
|
+
let d;
|
|
8466
|
+
let m = ref2.m;
|
|
8467
|
+
let y = ref2.y;
|
|
8468
|
+
if (n.length === 1) {
|
|
8469
|
+
d = n[0];
|
|
8470
|
+
} else {
|
|
8471
|
+
const yearFirst = taoDateOrder(options.locale)[0] === "y" && n.length === 3;
|
|
8472
|
+
const [a, b, c] = yearFirst ? [n[1], n[2], n[0]] : [n[0], n[1], n[2]];
|
|
8473
|
+
d = order[0] === "d" ? a : b;
|
|
8474
|
+
m = order[0] === "d" ? b : a;
|
|
8475
|
+
if (c !== void 0) {
|
|
8476
|
+
const yearText = yearFirst ? tokens[0] : tokens[2];
|
|
8477
|
+
if (yearText.length === 2) y = fullYear(c, ref2.y);
|
|
8478
|
+
else if (yearText.length === 4) y = c;
|
|
8479
|
+
else return null;
|
|
8480
|
+
}
|
|
8481
|
+
}
|
|
8482
|
+
return checked(y, m, d);
|
|
8483
|
+
}
|
|
8484
|
+
function checked(y, m, d) {
|
|
8485
|
+
const iso = formatTaoDateIso({ y, m, d });
|
|
8486
|
+
return parseTaoDate(iso) ? iso : null;
|
|
8487
|
+
}
|
|
8399
8488
|
const _hoisted_1$l = ["aria-label"];
|
|
8400
8489
|
const _hoisted_2$j = { class: "tao-date__header" };
|
|
8401
8490
|
const _hoisted_3$g = ["aria-label"];
|
|
8402
8491
|
const _hoisted_4$g = { "aria-hidden": "true" };
|
|
8403
|
-
const _hoisted_5$
|
|
8404
|
-
const _hoisted_6$
|
|
8492
|
+
const _hoisted_5$c = { class: "tao-date__month" };
|
|
8493
|
+
const _hoisted_6$9 = ["aria-label"];
|
|
8405
8494
|
const _hoisted_7$6 = { "aria-hidden": "true" };
|
|
8406
8495
|
const _hoisted_8$5 = {
|
|
8407
8496
|
class: "tao-date__weekdays",
|
|
8408
8497
|
"aria-hidden": "true"
|
|
8409
8498
|
};
|
|
8410
|
-
const _hoisted_9$
|
|
8499
|
+
const _hoisted_9$4 = ["aria-label", "aria-selected", "disabled", "onMouseenter", "onClick"];
|
|
8411
8500
|
const _hoisted_10$2 = { class: "tao-date__footer" };
|
|
8412
8501
|
const _hoisted_11$2 = ["disabled"];
|
|
8413
8502
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
@@ -8580,7 +8669,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8580
8669
|
])
|
|
8581
8670
|
])
|
|
8582
8671
|
], 8, _hoisted_3$g),
|
|
8583
|
-
createElementVNode("p", _hoisted_5$
|
|
8672
|
+
createElementVNode("p", _hoisted_5$c, toDisplayString(monthLabel.value), 1),
|
|
8584
8673
|
createElementVNode("button", {
|
|
8585
8674
|
type: "button",
|
|
8586
8675
|
class: "tao-date__nav",
|
|
@@ -8595,7 +8684,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8595
8684
|
})
|
|
8596
8685
|
])
|
|
8597
8686
|
])
|
|
8598
|
-
], 8, _hoisted_6$
|
|
8687
|
+
], 8, _hoisted_6$9)
|
|
8599
8688
|
]),
|
|
8600
8689
|
createElementVNode("div", _hoisted_8$5, [
|
|
8601
8690
|
(openBlock(true), createElementBlock(Fragment, null, renderList(weekdays.value, (day) => {
|
|
@@ -8629,7 +8718,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8629
8718
|
}, ["prevent"])),
|
|
8630
8719
|
onMouseenter: ($event) => onDayEnter(cell.iso),
|
|
8631
8720
|
onClick: ($event) => selectDay(cell.iso)
|
|
8632
|
-
}, toDisplayString(cell.day), 43, _hoisted_9$
|
|
8721
|
+
}, toDisplayString(cell.day), 43, _hoisted_9$4);
|
|
8633
8722
|
}), 128))
|
|
8634
8723
|
], 32),
|
|
8635
8724
|
createElementVNode("div", _hoisted_10$2, [
|
|
@@ -8658,13 +8747,15 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
8658
8747
|
};
|
|
8659
8748
|
}
|
|
8660
8749
|
});
|
|
8661
|
-
const _hoisted_1$k = ["id", "
|
|
8662
|
-
const _hoisted_2$i =
|
|
8663
|
-
const _hoisted_3$f =
|
|
8750
|
+
const _hoisted_1$k = ["id", "value", "placeholder", "disabled", "aria-invalid", "aria-describedby"];
|
|
8751
|
+
const _hoisted_2$i = ["aria-label", "aria-expanded", "disabled"];
|
|
8752
|
+
const _hoisted_3$f = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
|
|
8753
|
+
const _hoisted_4$f = { class: "tao-date__value" };
|
|
8754
|
+
const _hoisted_5$b = {
|
|
8664
8755
|
class: "tao-date__icon",
|
|
8665
8756
|
"aria-hidden": "true"
|
|
8666
8757
|
};
|
|
8667
|
-
const
|
|
8758
|
+
const _hoisted_6$8 = ["aria-label"];
|
|
8668
8759
|
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
8669
8760
|
...{ name: "TaoDate" },
|
|
8670
8761
|
__name: "TaoDate",
|
|
@@ -8680,7 +8771,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8680
8771
|
todayText: {},
|
|
8681
8772
|
clearText: {},
|
|
8682
8773
|
prevMonthLabel: {},
|
|
8683
|
-
nextMonthLabel: {}
|
|
8774
|
+
nextMonthLabel: {},
|
|
8775
|
+
editable: { type: Boolean, default: false },
|
|
8776
|
+
parse: { type: Function, default: void 0 },
|
|
8777
|
+
format: { type: Function, default: void 0 },
|
|
8778
|
+
calendarLabel: {}
|
|
8684
8779
|
},
|
|
8685
8780
|
emits: ["update:modelValue", "change"],
|
|
8686
8781
|
setup(__props, { emit: __emit }) {
|
|
@@ -8693,6 +8788,9 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8693
8788
|
const gridId = `${localId}-grid`;
|
|
8694
8789
|
const open = ref(false);
|
|
8695
8790
|
const triggerRef = ref(null);
|
|
8791
|
+
const fieldRef = ref(null);
|
|
8792
|
+
const inputRef = ref(null);
|
|
8793
|
+
const anchorRef = computed(() => props.editable ? fieldRef.value : triggerRef.value);
|
|
8696
8794
|
const panelRef = ref(null);
|
|
8697
8795
|
const calendarRef = ref(null);
|
|
8698
8796
|
const valueIso = computed(() => {
|
|
@@ -8700,14 +8798,65 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8700
8798
|
return parsed ? formatTaoDateIso(parsed) : null;
|
|
8701
8799
|
});
|
|
8702
8800
|
const displayLabel = computed(() => valueIso.value ? formatTaoDateLabel(valueIso.value, dateLocale.value) : "");
|
|
8703
|
-
const { style: panelStyle, update: updatePosition } = useFloating(
|
|
8704
|
-
useDismiss(open, () => [
|
|
8801
|
+
const { style: panelStyle, update: updatePosition } = useFloating(anchorRef, panelRef, open, { placement: "bottom-start" });
|
|
8802
|
+
useDismiss(open, () => [anchorRef.value, panelRef.value], close);
|
|
8705
8803
|
useLayer(open, {
|
|
8706
8804
|
onEscape: () => {
|
|
8707
8805
|
close();
|
|
8708
|
-
|
|
8806
|
+
focusBack();
|
|
8709
8807
|
}
|
|
8710
8808
|
});
|
|
8809
|
+
function focusBack() {
|
|
8810
|
+
(props.editable ? inputRef.value : triggerRef.value)?.focus();
|
|
8811
|
+
}
|
|
8812
|
+
function shortText(iso) {
|
|
8813
|
+
if (!iso) return "";
|
|
8814
|
+
return props.format ? props.format(iso, dateLocale.value) : formatTaoDateShort(iso, dateLocale.value);
|
|
8815
|
+
}
|
|
8816
|
+
const text = ref(shortText(valueIso.value));
|
|
8817
|
+
let typing = false;
|
|
8818
|
+
watch([valueIso, dateLocale], () => {
|
|
8819
|
+
if (!typing) text.value = shortText(valueIso.value);
|
|
8820
|
+
});
|
|
8821
|
+
function emitValue(next) {
|
|
8822
|
+
if (next === valueIso.value) return;
|
|
8823
|
+
emit("update:modelValue", next);
|
|
8824
|
+
emit("change", next);
|
|
8825
|
+
}
|
|
8826
|
+
function commitText() {
|
|
8827
|
+
typing = false;
|
|
8828
|
+
const raw = text.value.trim();
|
|
8829
|
+
if (!raw) {
|
|
8830
|
+
emitValue(null);
|
|
8831
|
+
text.value = "";
|
|
8832
|
+
return;
|
|
8833
|
+
}
|
|
8834
|
+
const context = { locale: dateLocale.value, reference: valueIso.value ?? todayTaoDate() };
|
|
8835
|
+
const parsed = props.parse ? props.parse(raw, context) : parseTaoDateInput(raw, context);
|
|
8836
|
+
if (parsed && isTaoDateInRange(parsed, props.min, props.max)) {
|
|
8837
|
+
emitValue(parsed);
|
|
8838
|
+
text.value = shortText(parsed);
|
|
8839
|
+
} else {
|
|
8840
|
+
text.value = shortText(valueIso.value);
|
|
8841
|
+
}
|
|
8842
|
+
}
|
|
8843
|
+
function onInput(event) {
|
|
8844
|
+
typing = true;
|
|
8845
|
+
text.value = event.target.value;
|
|
8846
|
+
}
|
|
8847
|
+
function onInputKeydown(event) {
|
|
8848
|
+
if (event.key === "Enter") {
|
|
8849
|
+
commitText();
|
|
8850
|
+
} else if (event.key === "Escape" && typing) {
|
|
8851
|
+
event.stopPropagation();
|
|
8852
|
+
typing = false;
|
|
8853
|
+
text.value = shortText(valueIso.value);
|
|
8854
|
+
} else if (event.key === "ArrowDown" && !event.shiftKey) {
|
|
8855
|
+
event.preventDefault();
|
|
8856
|
+
commitText();
|
|
8857
|
+
void setOpen(true);
|
|
8858
|
+
}
|
|
8859
|
+
}
|
|
8711
8860
|
async function setOpen(next) {
|
|
8712
8861
|
if (props.disabled) {
|
|
8713
8862
|
return;
|
|
@@ -8728,10 +8877,16 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8728
8877
|
}
|
|
8729
8878
|
function onChange(value) {
|
|
8730
8879
|
const next = value ?? null;
|
|
8731
|
-
|
|
8732
|
-
|
|
8880
|
+
if (props.editable) {
|
|
8881
|
+
typing = false;
|
|
8882
|
+
emitValue(next);
|
|
8883
|
+
text.value = shortText(next);
|
|
8884
|
+
} else {
|
|
8885
|
+
emit("update:modelValue", next);
|
|
8886
|
+
emit("change", next);
|
|
8887
|
+
}
|
|
8733
8888
|
close();
|
|
8734
|
-
|
|
8889
|
+
focusBack();
|
|
8735
8890
|
}
|
|
8736
8891
|
function onTriggerKeydown(event) {
|
|
8737
8892
|
if (props.disabled) {
|
|
@@ -8744,9 +8899,50 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8744
8899
|
}
|
|
8745
8900
|
return (_ctx, _cache) => {
|
|
8746
8901
|
return openBlock(), createElementBlock("div", {
|
|
8747
|
-
class: normalizeClass(["tao-date", [unref(sizeClass)(__props.size), { "tao-date--open": open.value, "tao-date--invalid": unref(invalid) }]])
|
|
8902
|
+
class: normalizeClass(["tao-date", [unref(sizeClass)(__props.size), { "tao-date--open": open.value, "tao-date--invalid": unref(invalid), "tao-date--editable": __props.editable }]])
|
|
8748
8903
|
}, [
|
|
8749
|
-
|
|
8904
|
+
__props.editable ? (openBlock(), createElementBlock("div", {
|
|
8905
|
+
key: 0,
|
|
8906
|
+
ref_key: "fieldRef",
|
|
8907
|
+
ref: fieldRef,
|
|
8908
|
+
class: normalizeClass(["tao-date__field", { "tao-date__field--disabled": __props.disabled }])
|
|
8909
|
+
}, [
|
|
8910
|
+
createElementVNode("input", {
|
|
8911
|
+
id: unref(controlId),
|
|
8912
|
+
ref_key: "inputRef",
|
|
8913
|
+
ref: inputRef,
|
|
8914
|
+
class: "tao-date__input",
|
|
8915
|
+
type: "text",
|
|
8916
|
+
inputmode: "decimal",
|
|
8917
|
+
autocomplete: "off",
|
|
8918
|
+
value: text.value,
|
|
8919
|
+
placeholder: unref(l10n).placeholder,
|
|
8920
|
+
disabled: __props.disabled,
|
|
8921
|
+
"aria-invalid": unref(invalid) || void 0,
|
|
8922
|
+
"aria-describedby": unref(describedBy),
|
|
8923
|
+
onInput,
|
|
8924
|
+
onKeydown: onInputKeydown,
|
|
8925
|
+
onBlur: commitText
|
|
8926
|
+
}, null, 40, _hoisted_1$k),
|
|
8927
|
+
createElementVNode("button", {
|
|
8928
|
+
type: "button",
|
|
8929
|
+
class: "tao-date__toggle",
|
|
8930
|
+
"aria-label": unref(l10n).calendarLabel ?? unref(localeEn).date.calendarLabel,
|
|
8931
|
+
"aria-haspopup": "dialog",
|
|
8932
|
+
"aria-expanded": open.value,
|
|
8933
|
+
"aria-controls": gridId,
|
|
8934
|
+
disabled: __props.disabled,
|
|
8935
|
+
onClick: toggle
|
|
8936
|
+
}, [
|
|
8937
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
8938
|
+
createVNode(TaoIcon, {
|
|
8939
|
+
name: "tao-calendar",
|
|
8940
|
+
size: 16
|
|
8941
|
+
})
|
|
8942
|
+
], true)
|
|
8943
|
+
], 8, _hoisted_2$i)
|
|
8944
|
+
], 2)) : (openBlock(), createElementBlock("button", {
|
|
8945
|
+
key: 1,
|
|
8750
8946
|
id: unref(controlId),
|
|
8751
8947
|
ref_key: "triggerRef",
|
|
8752
8948
|
ref: triggerRef,
|
|
@@ -8762,8 +8958,8 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8762
8958
|
onClick: toggle,
|
|
8763
8959
|
onKeydown: onTriggerKeydown
|
|
8764
8960
|
}, [
|
|
8765
|
-
createElementVNode("span",
|
|
8766
|
-
createElementVNode("span",
|
|
8961
|
+
createElementVNode("span", _hoisted_4$f, toDisplayString(displayLabel.value || unref(l10n).placeholder), 1),
|
|
8962
|
+
createElementVNode("span", _hoisted_5$b, [
|
|
8767
8963
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
8768
8964
|
createVNode(TaoIcon, {
|
|
8769
8965
|
name: "tao-calendar",
|
|
@@ -8771,7 +8967,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8771
8967
|
})
|
|
8772
8968
|
], true)
|
|
8773
8969
|
])
|
|
8774
|
-
], 42,
|
|
8970
|
+
], 42, _hoisted_3$f)),
|
|
8775
8971
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
8776
8972
|
open.value ? (openBlock(), createElementBlock("div", {
|
|
8777
8973
|
key: 0,
|
|
@@ -8827,13 +9023,13 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
8827
9023
|
key: "3"
|
|
8828
9024
|
} : void 0
|
|
8829
9025
|
]), 1032, ["model-value", "min", "max", "locale", "today-text", "clear-text", "prev-month-label", "next-month-label"])
|
|
8830
|
-
], 12,
|
|
9026
|
+
], 12, _hoisted_6$8)) : createCommentVNode("", true)
|
|
8831
9027
|
]))
|
|
8832
9028
|
], 2);
|
|
8833
9029
|
};
|
|
8834
9030
|
}
|
|
8835
9031
|
});
|
|
8836
|
-
const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-
|
|
9032
|
+
const TaoDate = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-584a0343"]]);
|
|
8837
9033
|
const _hoisted_1$j = ["id", "aria-expanded", "aria-invalid", "aria-describedby", "disabled"];
|
|
8838
9034
|
const _hoisted_2$h = { class: "tao-date-range__value" };
|
|
8839
9035
|
const _hoisted_3$e = {
|
|
@@ -9218,8 +9414,9 @@ const _hoisted_5$a = {
|
|
|
9218
9414
|
class: "tao-alert__title"
|
|
9219
9415
|
};
|
|
9220
9416
|
const _hoisted_6$7 = ["id", "^hidden"];
|
|
9221
|
-
const _hoisted_7$5 = ["
|
|
9222
|
-
const _hoisted_8$4 =
|
|
9417
|
+
const _hoisted_7$5 = ["id"];
|
|
9418
|
+
const _hoisted_8$4 = ["aria-label"];
|
|
9419
|
+
const _hoisted_9$3 = { "aria-hidden": "true" };
|
|
9223
9420
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
9224
9421
|
...{ name: "TaoAlert" },
|
|
9225
9422
|
__name: "TaoAlert",
|
|
@@ -9244,6 +9441,40 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
9244
9441
|
ownCollapsed.value = value;
|
|
9245
9442
|
emit("update:collapsed", value);
|
|
9246
9443
|
}
|
|
9444
|
+
const fold = ref(null);
|
|
9445
|
+
const sealed = ref(isCollapsed.value);
|
|
9446
|
+
let pending;
|
|
9447
|
+
function transitionMs(el) {
|
|
9448
|
+
const value = getComputedStyle(el).transitionDuration.split(",")[0]?.trim() ?? "";
|
|
9449
|
+
const n = parseFloat(value);
|
|
9450
|
+
return value.endsWith("ms") ? n : n * 1e3;
|
|
9451
|
+
}
|
|
9452
|
+
watch(isCollapsed, (collapsed) => {
|
|
9453
|
+
pending?.();
|
|
9454
|
+
if (!collapsed) {
|
|
9455
|
+
sealed.value = false;
|
|
9456
|
+
return;
|
|
9457
|
+
}
|
|
9458
|
+
const el = fold.value;
|
|
9459
|
+
const ms = el && typeof getComputedStyle !== "undefined" ? transitionMs(el) : 0;
|
|
9460
|
+
if (!el || !(ms > 0)) {
|
|
9461
|
+
sealed.value = true;
|
|
9462
|
+
return;
|
|
9463
|
+
}
|
|
9464
|
+
const seal = () => {
|
|
9465
|
+
pending?.();
|
|
9466
|
+
sealed.value = true;
|
|
9467
|
+
};
|
|
9468
|
+
const onEnd = (event) => event.target === el && seal();
|
|
9469
|
+
const timer = setTimeout(seal, ms + 100);
|
|
9470
|
+
el.addEventListener("transitionend", onEnd);
|
|
9471
|
+
pending = () => {
|
|
9472
|
+
clearTimeout(timer);
|
|
9473
|
+
el.removeEventListener("transitionend", onEnd);
|
|
9474
|
+
pending = void 0;
|
|
9475
|
+
};
|
|
9476
|
+
});
|
|
9477
|
+
onBeforeUnmount(() => pending?.());
|
|
9247
9478
|
const isUrgent = computed(() => props.tone === "danger" || props.tone === "warning");
|
|
9248
9479
|
return (_ctx, _cache) => {
|
|
9249
9480
|
return openBlock(), createElementBlock("div", {
|
|
@@ -9268,15 +9499,27 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
9268
9499
|
createVNode(TaoIcon, { name: "tao-chevron-down" })
|
|
9269
9500
|
], 2)
|
|
9270
9501
|
], 8, _hoisted_3$b)) : __props.title ? (openBlock(), createElementBlock("strong", _hoisted_5$a, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
9271
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
9502
|
+
_ctx.$slots.default && __props.collapsible ? (openBlock(), createElementBlock("div", {
|
|
9272
9503
|
key: 2,
|
|
9504
|
+
ref_key: "fold",
|
|
9505
|
+
ref: fold,
|
|
9506
|
+
class: normalizeClass(["tao-alert__fold", { "tao-alert__fold--closed": isCollapsed.value }])
|
|
9507
|
+
}, [
|
|
9508
|
+
createElementVNode("div", {
|
|
9509
|
+
id: unref(bodyId),
|
|
9510
|
+
class: "tao-alert__message",
|
|
9511
|
+
"^hidden": sealed.value ? "until-found" : void 0,
|
|
9512
|
+
onBeforematch: _cache[1] || (_cache[1] = ($event) => setCollapsed(false))
|
|
9513
|
+
}, [
|
|
9514
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
9515
|
+
], 40, _hoisted_6$7)
|
|
9516
|
+
], 2)) : _ctx.$slots.default ? (openBlock(), createElementBlock("div", {
|
|
9517
|
+
key: 3,
|
|
9273
9518
|
id: unref(bodyId),
|
|
9274
|
-
class: "tao-alert__message"
|
|
9275
|
-
"^hidden": isCollapsed.value ? "until-found" : void 0,
|
|
9276
|
-
onBeforematch: _cache[1] || (_cache[1] = ($event) => setCollapsed(false))
|
|
9519
|
+
class: "tao-alert__message"
|
|
9277
9520
|
}, [
|
|
9278
9521
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
9279
|
-
],
|
|
9522
|
+
], 8, _hoisted_7$5)) : createCommentVNode("", true)
|
|
9280
9523
|
]),
|
|
9281
9524
|
__props.closable ? (openBlock(), createElementBlock("button", {
|
|
9282
9525
|
key: 0,
|
|
@@ -9285,17 +9528,17 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
9285
9528
|
"aria-label": unref(l10n).closeLabel,
|
|
9286
9529
|
onClick: _cache[2] || (_cache[2] = ($event) => emit("close"))
|
|
9287
9530
|
}, [
|
|
9288
|
-
createElementVNode("span",
|
|
9531
|
+
createElementVNode("span", _hoisted_9$3, [
|
|
9289
9532
|
renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
9290
9533
|
createVNode(TaoIcon, { name: "tao-close" })
|
|
9291
9534
|
], true)
|
|
9292
9535
|
])
|
|
9293
|
-
], 8,
|
|
9536
|
+
], 8, _hoisted_8$4)) : createCommentVNode("", true)
|
|
9294
9537
|
], 10, _hoisted_1$f);
|
|
9295
9538
|
};
|
|
9296
9539
|
}
|
|
9297
9540
|
});
|
|
9298
|
-
const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-
|
|
9541
|
+
const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-491e9235"]]);
|
|
9299
9542
|
const _hoisted_1$e = { key: 0 };
|
|
9300
9543
|
const _hoisted_2$c = ["aria-sort"];
|
|
9301
9544
|
const _hoisted_3$a = ["onClick"];
|
|
@@ -9526,7 +9769,7 @@ const _hoisted_7$3 = {
|
|
|
9526
9769
|
"aria-hidden": "true"
|
|
9527
9770
|
};
|
|
9528
9771
|
const _hoisted_8$2 = ["aria-current", "aria-label", "disabled", "onClick"];
|
|
9529
|
-
const _hoisted_9$
|
|
9772
|
+
const _hoisted_9$2 = ["aria-label", "disabled"];
|
|
9530
9773
|
const _hoisted_10$1 = { "aria-hidden": "true" };
|
|
9531
9774
|
const _hoisted_11$1 = {
|
|
9532
9775
|
key: 0,
|
|
@@ -9668,7 +9911,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
9668
9911
|
createVNode(TaoIcon, { name: "tao-chevron-right" })
|
|
9669
9912
|
], true)
|
|
9670
9913
|
])
|
|
9671
|
-
], 8, _hoisted_9$
|
|
9914
|
+
], 8, _hoisted_9$2),
|
|
9672
9915
|
showInput.value ? (openBlock(), createElementBlock("label", _hoisted_11$1, [
|
|
9673
9916
|
createElementVNode("span", _hoisted_12$1, toDisplayString(unref(l10n).goToText), 1),
|
|
9674
9917
|
withDirectives(createElementVNode("input", {
|
|
@@ -9924,15 +10167,20 @@ const TaoSkeleton = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "dat
|
|
|
9924
10167
|
const _hoisted_1$8 = ["aria-labelledby"];
|
|
9925
10168
|
const _hoisted_2$7 = {
|
|
9926
10169
|
key: 0,
|
|
9927
|
-
class: "tao-
|
|
10170
|
+
class: "tao-drawer__grip",
|
|
10171
|
+
"aria-hidden": "true"
|
|
9928
10172
|
};
|
|
9929
|
-
const _hoisted_3$6 =
|
|
9930
|
-
const _hoisted_4$6 = { key: 1 };
|
|
9931
|
-
const _hoisted_5$5 = ["aria-label"];
|
|
9932
|
-
const _hoisted_6$3 = { "aria-hidden": "true" };
|
|
9933
|
-
const _hoisted_7$2 = { class: "tao-drawer__content" };
|
|
9934
|
-
const _hoisted_8$1 = {
|
|
10173
|
+
const _hoisted_3$6 = {
|
|
9935
10174
|
key: 1,
|
|
10175
|
+
class: "tao-drawer__header"
|
|
10176
|
+
};
|
|
10177
|
+
const _hoisted_4$6 = ["id"];
|
|
10178
|
+
const _hoisted_5$5 = { key: 1 };
|
|
10179
|
+
const _hoisted_6$3 = ["aria-label"];
|
|
10180
|
+
const _hoisted_7$2 = { "aria-hidden": "true" };
|
|
10181
|
+
const _hoisted_8$1 = { class: "tao-drawer__content" };
|
|
10182
|
+
const _hoisted_9$1 = {
|
|
10183
|
+
key: 2,
|
|
9936
10184
|
class: "tao-drawer__footer"
|
|
9937
10185
|
};
|
|
9938
10186
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
@@ -10007,12 +10255,13 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
10007
10255
|
"aria-labelledby": __props.title ? unref(titleId) : void 0,
|
|
10008
10256
|
tabindex: "-1"
|
|
10009
10257
|
}, [
|
|
10010
|
-
__props.
|
|
10258
|
+
__props.side === "bottom" ? (openBlock(), createElementBlock("span", _hoisted_2$7)) : createCommentVNode("", true),
|
|
10259
|
+
__props.title || __props.closable ? (openBlock(), createElementBlock("div", _hoisted_3$6, [
|
|
10011
10260
|
__props.title ? (openBlock(), createElementBlock("h2", {
|
|
10012
10261
|
key: 0,
|
|
10013
10262
|
id: unref(titleId),
|
|
10014
10263
|
class: "tao-drawer__title"
|
|
10015
|
-
}, toDisplayString(__props.title), 9,
|
|
10264
|
+
}, toDisplayString(__props.title), 9, _hoisted_4$6)) : (openBlock(), createElementBlock("span", _hoisted_5$5)),
|
|
10016
10265
|
__props.closable ? (openBlock(), createElementBlock("button", {
|
|
10017
10266
|
key: 2,
|
|
10018
10267
|
type: "button",
|
|
@@ -10020,17 +10269,17 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
10020
10269
|
"aria-label": unref(l10n).closeLabel,
|
|
10021
10270
|
onClick: close
|
|
10022
10271
|
}, [
|
|
10023
|
-
createElementVNode("span",
|
|
10272
|
+
createElementVNode("span", _hoisted_7$2, [
|
|
10024
10273
|
renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
10025
10274
|
createVNode(TaoIcon, { name: "tao-close" })
|
|
10026
10275
|
], true)
|
|
10027
10276
|
])
|
|
10028
|
-
], 8,
|
|
10277
|
+
], 8, _hoisted_6$3)) : createCommentVNode("", true)
|
|
10029
10278
|
])) : createCommentVNode("", true),
|
|
10030
|
-
createElementVNode("div",
|
|
10279
|
+
createElementVNode("div", _hoisted_8$1, [
|
|
10031
10280
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
10032
10281
|
]),
|
|
10033
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("div",
|
|
10282
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_9$1, [
|
|
10034
10283
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
10035
10284
|
])) : createCommentVNode("", true)
|
|
10036
10285
|
], 8, _hoisted_1$8)
|
|
@@ -10042,7 +10291,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
10042
10291
|
};
|
|
10043
10292
|
}
|
|
10044
10293
|
});
|
|
10045
|
-
const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
10294
|
+
const TaoDrawer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-06056d16"]]);
|
|
10046
10295
|
const _hoisted_1$7 = ["title"];
|
|
10047
10296
|
const _hoisted_2$6 = { class: "tao-avatar__face" };
|
|
10048
10297
|
const _hoisted_3$5 = ["src", "alt"];
|
|
@@ -11180,7 +11429,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
11180
11429
|
};
|
|
11181
11430
|
}
|
|
11182
11431
|
});
|
|
11183
|
-
const TaoToastViewport = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
11432
|
+
const TaoToastViewport = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-14bc09d4"]]);
|
|
11184
11433
|
const _hoisted_1 = ["aria-labelledby", "aria-describedby"];
|
|
11185
11434
|
const _hoisted_2 = {
|
|
11186
11435
|
class: "tao-confirm__icon",
|
|
@@ -12212,6 +12461,7 @@ export {
|
|
|
12212
12461
|
formatTaoDateIso,
|
|
12213
12462
|
formatTaoDateLabel,
|
|
12214
12463
|
formatTaoDateRangeLabel,
|
|
12464
|
+
formatTaoDateShort,
|
|
12215
12465
|
hslToRgb,
|
|
12216
12466
|
hsvaToRgba,
|
|
12217
12467
|
linearToSrgb,
|
|
@@ -12221,6 +12471,7 @@ export {
|
|
|
12221
12471
|
normalizeHex,
|
|
12222
12472
|
parseColor,
|
|
12223
12473
|
parseTaoDate,
|
|
12474
|
+
parseTaoDateInput,
|
|
12224
12475
|
parseTaoDateRange,
|
|
12225
12476
|
provideTaoLocale,
|
|
12226
12477
|
registerTaoIcons,
|
|
@@ -12229,6 +12480,7 @@ export {
|
|
|
12229
12480
|
setTaoLocale,
|
|
12230
12481
|
srgbToLinear,
|
|
12231
12482
|
taoChartTheme,
|
|
12483
|
+
taoDateOrder,
|
|
12232
12484
|
taoIconNames,
|
|
12233
12485
|
taoLocale,
|
|
12234
12486
|
paletteCss as taoPaletteCss,
|