@1337exp/taoui 5.51.0 → 5.52.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 +9 -0
- package/README.md +2 -2
- package/README.ru.md +2 -2
- package/dist/index.d.ts +196 -233
- package/dist/index.js +165 -86
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/skills/taoui/SKILL.md +2 -2
- package/skills/taoui/references/components.md +9 -4
- package/src/styles/base.css +23 -0
package/dist/index.js
CHANGED
|
@@ -1466,15 +1466,15 @@ const _hoisted_8$f = {
|
|
|
1466
1466
|
key: 2,
|
|
1467
1467
|
class: "tao-card__body"
|
|
1468
1468
|
};
|
|
1469
|
-
const _hoisted_9$
|
|
1469
|
+
const _hoisted_9$c = {
|
|
1470
1470
|
key: 3,
|
|
1471
1471
|
class: "tao-card__footer"
|
|
1472
1472
|
};
|
|
1473
|
-
const _hoisted_10$
|
|
1473
|
+
const _hoisted_10$8 = {
|
|
1474
1474
|
key: 3,
|
|
1475
1475
|
class: "tao-card__corner"
|
|
1476
1476
|
};
|
|
1477
|
-
const _hoisted_11$
|
|
1477
|
+
const _hoisted_11$6 = ["aria-label"];
|
|
1478
1478
|
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
1479
1479
|
...{ name: "TaoCard" },
|
|
1480
1480
|
__name: "TaoCard",
|
|
@@ -1556,11 +1556,11 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
1556
1556
|
has("default") ? (openBlock(), createElementBlock("div", _hoisted_8$f, [
|
|
1557
1557
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1558
1558
|
])) : createCommentVNode("", true),
|
|
1559
|
-
has("footer") ? (openBlock(), createElementBlock("div", _hoisted_9$
|
|
1559
|
+
has("footer") ? (openBlock(), createElementBlock("div", _hoisted_9$c, [
|
|
1560
1560
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
1561
1561
|
])) : createCommentVNode("", true)
|
|
1562
1562
|
], 4)) : createCommentVNode("", true),
|
|
1563
|
-
hasCorner.value ? (openBlock(), createElementBlock("div", _hoisted_10$
|
|
1563
|
+
hasCorner.value ? (openBlock(), createElementBlock("div", _hoisted_10$8, [
|
|
1564
1564
|
renderSlot(_ctx.$slots, "corner", {}, void 0, true),
|
|
1565
1565
|
__props.closable ? (openBlock(), createElementBlock("button", {
|
|
1566
1566
|
key: 0,
|
|
@@ -1573,7 +1573,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
1573
1573
|
name: "tao-close",
|
|
1574
1574
|
size: 14
|
|
1575
1575
|
})
|
|
1576
|
-
], 8, _hoisted_11$
|
|
1576
|
+
], 8, _hoisted_11$6)) : createCommentVNode("", true)
|
|
1577
1577
|
])) : createCommentVNode("", true)
|
|
1578
1578
|
], 6);
|
|
1579
1579
|
};
|
|
@@ -4537,8 +4537,8 @@ const _hoisted_8$d = {
|
|
|
4537
4537
|
class: "tao-tour__dots",
|
|
4538
4538
|
"aria-hidden": "true"
|
|
4539
4539
|
};
|
|
4540
|
-
const _hoisted_9$
|
|
4541
|
-
const _hoisted_10$
|
|
4540
|
+
const _hoisted_9$b = { class: "tao-tour__progress-text" };
|
|
4541
|
+
const _hoisted_10$7 = { class: "tao-tour__actions" };
|
|
4542
4542
|
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
4543
4543
|
...{ name: "TaoTour" },
|
|
4544
4544
|
__name: "TaoTour",
|
|
@@ -4754,9 +4754,9 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
4754
4754
|
}, null, 2);
|
|
4755
4755
|
}), 128))
|
|
4756
4756
|
]),
|
|
4757
|
-
createElementVNode("span", _hoisted_9$
|
|
4757
|
+
createElementVNode("span", _hoisted_9$b, toDisplayString(progress.value), 1)
|
|
4758
4758
|
])) : createCommentVNode("", true),
|
|
4759
|
-
createElementVNode("span", _hoisted_10$
|
|
4759
|
+
createElementVNode("span", _hoisted_10$7, [
|
|
4760
4760
|
!isLast.value ? (openBlock(), createBlock(TaoButton, {
|
|
4761
4761
|
key: 0,
|
|
4762
4762
|
size: "small",
|
|
@@ -6104,7 +6104,7 @@ const _hoisted_5$p = {
|
|
|
6104
6104
|
const _hoisted_6$j = { class: "tao-file-drop__name" };
|
|
6105
6105
|
const _hoisted_7$f = { class: "tao-file-drop__meta" };
|
|
6106
6106
|
const _hoisted_8$c = ["aria-label", "onClick"];
|
|
6107
|
-
const _hoisted_9$
|
|
6107
|
+
const _hoisted_9$a = { "aria-hidden": "true" };
|
|
6108
6108
|
const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
6109
6109
|
...{ name: "TaoFileDrop", inheritAttrs: false },
|
|
6110
6110
|
__name: "TaoFileDrop",
|
|
@@ -6273,7 +6273,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
6273
6273
|
"aria-label": unref(l10n).removeLabel.replace("{name}", file.name),
|
|
6274
6274
|
onClick: ($event) => removeAt(index)
|
|
6275
6275
|
}, [
|
|
6276
|
-
createElementVNode("span", _hoisted_9$
|
|
6276
|
+
createElementVNode("span", _hoisted_9$a, [
|
|
6277
6277
|
renderSlot(_ctx.$slots, "remove-icon", {}, () => [
|
|
6278
6278
|
createVNode(TaoIcon, { name: "tao-close" })
|
|
6279
6279
|
], true)
|
|
@@ -7775,12 +7775,12 @@ const _hoisted_6$g = {
|
|
|
7775
7775
|
};
|
|
7776
7776
|
const _hoisted_7$c = { class: "tao-nav__label" };
|
|
7777
7777
|
const _hoisted_8$9 = ["aria-hidden"];
|
|
7778
|
-
const _hoisted_9$
|
|
7778
|
+
const _hoisted_9$9 = {
|
|
7779
7779
|
key: 0,
|
|
7780
7780
|
class: "tao-nav__entry tao-nav__entry--more"
|
|
7781
7781
|
};
|
|
7782
|
-
const _hoisted_10$
|
|
7783
|
-
const _hoisted_11$
|
|
7782
|
+
const _hoisted_10$6 = ["aria-expanded"];
|
|
7783
|
+
const _hoisted_11$5 = {
|
|
7784
7784
|
class: "tao-nav__icon",
|
|
7785
7785
|
"aria-hidden": "true"
|
|
7786
7786
|
};
|
|
@@ -7906,7 +7906,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
7906
7906
|
}, 1032, ["class", "href", "type", "disabled", "aria-disabled", "aria-current", "onClick"]))
|
|
7907
7907
|
], 2);
|
|
7908
7908
|
}), 128)),
|
|
7909
|
-
overflowing.value ? (openBlock(), createElementBlock("li", _hoisted_9$
|
|
7909
|
+
overflowing.value ? (openBlock(), createElementBlock("li", _hoisted_9$9, [
|
|
7910
7910
|
createElementVNode("button", {
|
|
7911
7911
|
ref_key: "moreButton",
|
|
7912
7912
|
ref: moreButton,
|
|
@@ -7916,14 +7916,14 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
7916
7916
|
"aria-expanded": moreOpen.value,
|
|
7917
7917
|
onClick: _cache[0] || (_cache[0] = ($event) => moreOpen.value = !moreOpen.value)
|
|
7918
7918
|
}, [
|
|
7919
|
-
createElementVNode("span", _hoisted_11$
|
|
7919
|
+
createElementVNode("span", _hoisted_11$5, [
|
|
7920
7920
|
createVNode(TaoIcon, {
|
|
7921
7921
|
name: "tao-more-horizontal",
|
|
7922
7922
|
size: 20
|
|
7923
7923
|
})
|
|
7924
7924
|
]),
|
|
7925
7925
|
createElementVNode("span", _hoisted_12$2, toDisplayString(unref(l10n).moreLabel), 1)
|
|
7926
|
-
], 10, _hoisted_10$
|
|
7926
|
+
], 10, _hoisted_10$6)
|
|
7927
7927
|
])) : createCommentVNode("", true)
|
|
7928
7928
|
]),
|
|
7929
7929
|
has("footer") ? (openBlock(), createElementBlock("div", _hoisted_13$1, [
|
|
@@ -8494,11 +8494,11 @@ const _hoisted_8$8 = {
|
|
|
8494
8494
|
key: 2,
|
|
8495
8495
|
class: "tao-tree__hint"
|
|
8496
8496
|
};
|
|
8497
|
-
const _hoisted_9$
|
|
8497
|
+
const _hoisted_9$8 = {
|
|
8498
8498
|
key: 0,
|
|
8499
8499
|
class: "tao-tree__ghost-copy"
|
|
8500
8500
|
};
|
|
8501
|
-
const _hoisted_10$
|
|
8501
|
+
const _hoisted_10$5 = {
|
|
8502
8502
|
class: "tao-sr-only",
|
|
8503
8503
|
role: "status",
|
|
8504
8504
|
"aria-live": "polite"
|
|
@@ -9090,10 +9090,10 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
9090
9090
|
"aria-hidden": "true",
|
|
9091
9091
|
style: normalizeStyle({ left: `${unref(ghost).x + 14}px`, top: `${unref(ghost).y + 10}px` })
|
|
9092
9092
|
}, [
|
|
9093
|
-
unref(ghost).copy ? (openBlock(), createElementBlock("span", _hoisted_9$
|
|
9093
|
+
unref(ghost).copy ? (openBlock(), createElementBlock("span", _hoisted_9$8, "+")) : createCommentVNode("", true),
|
|
9094
9094
|
createTextVNode(toDisplayString(unref(ghost).text), 1)
|
|
9095
9095
|
], 6)) : createCommentVNode("", true),
|
|
9096
|
-
createElementVNode("div", _hoisted_10$
|
|
9096
|
+
createElementVNode("div", _hoisted_10$5, toDisplayString(liveText.value), 1)
|
|
9097
9097
|
])) : createCommentVNode("", true)
|
|
9098
9098
|
], 10, _hoisted_1$B);
|
|
9099
9099
|
};
|
|
@@ -9783,7 +9783,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
9783
9783
|
to: { default: void 0 },
|
|
9784
9784
|
newTab: { type: Boolean, default: false },
|
|
9785
9785
|
private: { type: Boolean, default: false },
|
|
9786
|
-
exactPath: { type: Boolean, default: false }
|
|
9786
|
+
exactPath: { type: Boolean, default: false },
|
|
9787
|
+
underline: { default: "always" }
|
|
9787
9788
|
},
|
|
9788
9789
|
setup(__props) {
|
|
9789
9790
|
const props = __props;
|
|
@@ -9809,12 +9810,15 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
9809
9810
|
};
|
|
9810
9811
|
});
|
|
9811
9812
|
return (_ctx, _cache) => {
|
|
9812
|
-
return openBlock(), createBlock(resolveDynamicComponent(unref(linkComponent)), mergeProps(linkProps.value, {
|
|
9813
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(linkComponent)), mergeProps(linkProps.value, {
|
|
9814
|
+
class: ["tao-link", { "tao-link--hover": __props.underline === "hover", "tao-link--none": __props.underline === "none" }],
|
|
9815
|
+
draggable: "false"
|
|
9816
|
+
}), {
|
|
9813
9817
|
default: withCtx(() => [
|
|
9814
9818
|
renderSlot(_ctx.$slots, "default")
|
|
9815
9819
|
]),
|
|
9816
9820
|
_: 3
|
|
9817
|
-
}, 16);
|
|
9821
|
+
}, 16, ["class"]);
|
|
9818
9822
|
};
|
|
9819
9823
|
}
|
|
9820
9824
|
});
|
|
@@ -9825,7 +9829,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
9825
9829
|
to: { default: void 0 },
|
|
9826
9830
|
newTab: { type: Boolean, default: false },
|
|
9827
9831
|
private: { type: Boolean, default: false },
|
|
9828
|
-
exactPath: { type: Boolean, default: false }
|
|
9832
|
+
exactPath: { type: Boolean, default: false },
|
|
9833
|
+
underline: { default: "none" }
|
|
9829
9834
|
},
|
|
9830
9835
|
setup(__props) {
|
|
9831
9836
|
const props = __props;
|
|
@@ -10395,7 +10400,7 @@ const _hoisted_6$b = {
|
|
|
10395
10400
|
};
|
|
10396
10401
|
const _hoisted_7$8 = ["disabled", "aria-label", "title"];
|
|
10397
10402
|
const _hoisted_8$7 = ["aria-label"];
|
|
10398
|
-
const _hoisted_9$
|
|
10403
|
+
const _hoisted_9$7 = ["disabled", "aria-label", "title", "onClick"];
|
|
10399
10404
|
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
10400
10405
|
...{ name: "TaoColorPicker" },
|
|
10401
10406
|
__name: "TaoColorPicker",
|
|
@@ -10714,7 +10719,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
10714
10719
|
"aria-label": s,
|
|
10715
10720
|
title: s,
|
|
10716
10721
|
onClick: ($event) => pick(s)
|
|
10717
|
-
}, null, 14, _hoisted_9$
|
|
10722
|
+
}, null, 14, _hoisted_9$7);
|
|
10718
10723
|
}), 128))
|
|
10719
10724
|
], 8, _hoisted_8$7)) : createCommentVNode("", true)
|
|
10720
10725
|
], 2);
|
|
@@ -11656,15 +11661,15 @@ const _hoisted_5$e = ["id", "aria-selected", "aria-disabled", "onPointermove", "
|
|
|
11656
11661
|
const _hoisted_6$a = { class: "tao-command-list__text" };
|
|
11657
11662
|
const _hoisted_7$7 = { class: "tao-command-list__label" };
|
|
11658
11663
|
const _hoisted_8$6 = { key: 0 };
|
|
11659
|
-
const _hoisted_9$
|
|
11664
|
+
const _hoisted_9$6 = {
|
|
11660
11665
|
key: 0,
|
|
11661
11666
|
class: "tao-command-list__description"
|
|
11662
11667
|
};
|
|
11663
|
-
const _hoisted_10$
|
|
11668
|
+
const _hoisted_10$4 = {
|
|
11664
11669
|
key: 1,
|
|
11665
11670
|
class: "tao-command-list__where"
|
|
11666
11671
|
};
|
|
11667
|
-
const _hoisted_11$
|
|
11672
|
+
const _hoisted_11$4 = {
|
|
11668
11673
|
key: 0,
|
|
11669
11674
|
class: "tao-command-list__empty",
|
|
11670
11675
|
role: "presentation"
|
|
@@ -11845,9 +11850,9 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
11845
11850
|
], 64);
|
|
11846
11851
|
}), 128))
|
|
11847
11852
|
]),
|
|
11848
|
-
row.match.item.description ? (openBlock(), createElementBlock("span", _hoisted_9$
|
|
11853
|
+
row.match.item.description ? (openBlock(), createElementBlock("span", _hoisted_9$6, toDisplayString(row.match.item.description), 1)) : createCommentVNode("", true)
|
|
11849
11854
|
]),
|
|
11850
|
-
query.value.trim() && row.match.item.group ? (openBlock(), createElementBlock("span", _hoisted_10$
|
|
11855
|
+
query.value.trim() && row.match.item.group ? (openBlock(), createElementBlock("span", _hoisted_10$4, toDisplayString(row.match.item.group), 1)) : createCommentVNode("", true),
|
|
11851
11856
|
row.match.item.shortcut ? (openBlock(), createBlock(_sfc_main$1q, {
|
|
11852
11857
|
key: 2,
|
|
11853
11858
|
variant: "plain",
|
|
@@ -11862,7 +11867,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
11862
11867
|
], 42, _hoisted_5$e))
|
|
11863
11868
|
], 64);
|
|
11864
11869
|
}), 128)),
|
|
11865
|
-
!results.value.length ? (openBlock(), createElementBlock("li", _hoisted_11$
|
|
11870
|
+
!results.value.length ? (openBlock(), createElementBlock("li", _hoisted_11$4, [
|
|
11866
11871
|
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
11867
11872
|
createTextVNode(toDisplayString(__props.emptyText ?? unref(l10n).emptyText), 1)
|
|
11868
11873
|
], true)
|
|
@@ -12422,9 +12427,9 @@ const _hoisted_8$5 = {
|
|
|
12422
12427
|
class: "tao-date__weekdays",
|
|
12423
12428
|
"aria-hidden": "true"
|
|
12424
12429
|
};
|
|
12425
|
-
const _hoisted_9$
|
|
12426
|
-
const _hoisted_10$
|
|
12427
|
-
const _hoisted_11$
|
|
12430
|
+
const _hoisted_9$5 = ["aria-label", "aria-selected", "disabled", "onMouseenter", "onClick"];
|
|
12431
|
+
const _hoisted_10$3 = { class: "tao-date__footer" };
|
|
12432
|
+
const _hoisted_11$3 = ["disabled"];
|
|
12428
12433
|
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
12429
12434
|
...{ name: "TaoCalendar" },
|
|
12430
12435
|
__name: "TaoCalendar",
|
|
@@ -12644,10 +12649,10 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
12644
12649
|
}, ["prevent"])),
|
|
12645
12650
|
onMouseenter: ($event) => onDayEnter(cell.iso),
|
|
12646
12651
|
onClick: ($event) => selectDay(cell.iso)
|
|
12647
|
-
}, toDisplayString(cell.day), 43, _hoisted_9$
|
|
12652
|
+
}, toDisplayString(cell.day), 43, _hoisted_9$5);
|
|
12648
12653
|
}), 128))
|
|
12649
12654
|
], 32),
|
|
12650
|
-
createElementVNode("div", _hoisted_10$
|
|
12655
|
+
createElementVNode("div", _hoisted_10$3, [
|
|
12651
12656
|
createElementVNode("button", {
|
|
12652
12657
|
type: "button",
|
|
12653
12658
|
class: "tao-date__link",
|
|
@@ -12657,7 +12662,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
12657
12662
|
renderSlot(_ctx.$slots, "today", {}, () => [
|
|
12658
12663
|
createTextVNode(toDisplayString(unref(l10n).todayText), 1)
|
|
12659
12664
|
])
|
|
12660
|
-
], 8, _hoisted_11$
|
|
12665
|
+
], 8, _hoisted_11$3),
|
|
12661
12666
|
committed.value ? (openBlock(), createElementBlock("button", {
|
|
12662
12667
|
key: 0,
|
|
12663
12668
|
type: "button",
|
|
@@ -13347,7 +13352,7 @@ const _hoisted_5$a = {
|
|
|
13347
13352
|
const _hoisted_6$7 = ["id", "^hidden"];
|
|
13348
13353
|
const _hoisted_7$5 = ["id"];
|
|
13349
13354
|
const _hoisted_8$4 = ["aria-label"];
|
|
13350
|
-
const _hoisted_9$
|
|
13355
|
+
const _hoisted_9$4 = { "aria-hidden": "true" };
|
|
13351
13356
|
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
13352
13357
|
...{ name: "TaoAlert" },
|
|
13353
13358
|
__name: "TaoAlert",
|
|
@@ -13463,7 +13468,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
13463
13468
|
"aria-label": unref(l10n).closeLabel,
|
|
13464
13469
|
onClick: _cache[2] || (_cache[2] = ($event) => emit("close"))
|
|
13465
13470
|
}, [
|
|
13466
|
-
createElementVNode("span", _hoisted_9$
|
|
13471
|
+
createElementVNode("span", _hoisted_9$4, [
|
|
13467
13472
|
renderSlot(_ctx.$slots, "close-icon", {}, () => [
|
|
13468
13473
|
createVNode(TaoIcon, { name: "tao-close" })
|
|
13469
13474
|
], true)
|
|
@@ -13474,14 +13479,47 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
13474
13479
|
}
|
|
13475
13480
|
});
|
|
13476
13481
|
const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-6327e98d"]]);
|
|
13477
|
-
|
|
13478
|
-
|
|
13479
|
-
|
|
13480
|
-
|
|
13481
|
-
|
|
13482
|
-
|
|
13483
|
-
|
|
13484
|
-
|
|
13482
|
+
function tableCellValue(row, column) {
|
|
13483
|
+
if (column.value) {
|
|
13484
|
+
return column.value(row);
|
|
13485
|
+
}
|
|
13486
|
+
return row[column.key];
|
|
13487
|
+
}
|
|
13488
|
+
function tableRowId(rowKey, row, index) {
|
|
13489
|
+
if (typeof rowKey === "function") {
|
|
13490
|
+
return rowKey(row, index);
|
|
13491
|
+
}
|
|
13492
|
+
const key = row[rowKey];
|
|
13493
|
+
return key == null ? index : String(key);
|
|
13494
|
+
}
|
|
13495
|
+
function tableRowTarget(key, from, count) {
|
|
13496
|
+
if (count <= 0) {
|
|
13497
|
+
return -1;
|
|
13498
|
+
}
|
|
13499
|
+
switch (key) {
|
|
13500
|
+
case "ArrowDown":
|
|
13501
|
+
return Math.min(from + 1, count - 1);
|
|
13502
|
+
case "ArrowUp":
|
|
13503
|
+
return Math.max(from - 1, 0);
|
|
13504
|
+
case "Home":
|
|
13505
|
+
return 0;
|
|
13506
|
+
case "End":
|
|
13507
|
+
return count - 1;
|
|
13508
|
+
default:
|
|
13509
|
+
return -1;
|
|
13510
|
+
}
|
|
13511
|
+
}
|
|
13512
|
+
const _hoisted_1$e = ["role"];
|
|
13513
|
+
const _hoisted_2$c = { key: 0 };
|
|
13514
|
+
const _hoisted_3$a = ["role"];
|
|
13515
|
+
const _hoisted_4$a = ["role", "aria-sort"];
|
|
13516
|
+
const _hoisted_5$9 = ["onClick"];
|
|
13517
|
+
const _hoisted_6$6 = { key: 1 };
|
|
13518
|
+
const _hoisted_7$4 = ["role"];
|
|
13519
|
+
const _hoisted_8$3 = ["colspan", "role"];
|
|
13520
|
+
const _hoisted_9$3 = ["role", "tabindex", "onClick", "onKeydown", "onFocusin"];
|
|
13521
|
+
const _hoisted_10$2 = ["data-label", "role"];
|
|
13522
|
+
const _hoisted_11$2 = {
|
|
13485
13523
|
key: 0,
|
|
13486
13524
|
class: "tao-table__loading",
|
|
13487
13525
|
"aria-busy": "true"
|
|
@@ -13505,7 +13543,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
13505
13543
|
clickable: { type: Boolean, default: false },
|
|
13506
13544
|
sort: { default: null },
|
|
13507
13545
|
caption: { default: "" },
|
|
13508
|
-
bordered: { type: Boolean, default: void 0 }
|
|
13546
|
+
bordered: { type: Boolean, default: void 0 },
|
|
13547
|
+
minWidth: { default: "" },
|
|
13548
|
+
stack: { type: Boolean, default: false }
|
|
13509
13549
|
},
|
|
13510
13550
|
emits: ["update:sort", "change", "row-click"],
|
|
13511
13551
|
setup(__props, { emit: __emit }) {
|
|
@@ -13529,19 +13569,15 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
13529
13569
|
}
|
|
13530
13570
|
return typeof column.width === "number" ? `${column.width}px` : column.width;
|
|
13531
13571
|
}
|
|
13532
|
-
function
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
function rowId(row, index) {
|
|
13539
|
-
if (typeof props.rowKey === "function") {
|
|
13540
|
-
return props.rowKey(row, index);
|
|
13541
|
-
}
|
|
13542
|
-
const key = row[props.rowKey];
|
|
13543
|
-
return key == null ? index : String(key);
|
|
13572
|
+
function cellStyle(column, head = false) {
|
|
13573
|
+
return {
|
|
13574
|
+
"--_tao-align": column.align || "left",
|
|
13575
|
+
width: head ? columnWidth(column) : void 0,
|
|
13576
|
+
minWidth: toCssLength(column.minWidth)
|
|
13577
|
+
};
|
|
13544
13578
|
}
|
|
13579
|
+
const cellValue = (row, column) => tableCellValue(row, column);
|
|
13580
|
+
const rowId = (row, index) => tableRowId(props.rowKey, row, index);
|
|
13545
13581
|
function sortDir(column) {
|
|
13546
13582
|
if (!props.sort || props.sort.key !== column.key) {
|
|
13547
13583
|
return null;
|
|
@@ -13563,13 +13599,34 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
13563
13599
|
}
|
|
13564
13600
|
emit("row-click", row, index);
|
|
13565
13601
|
}
|
|
13602
|
+
const body = ref(null);
|
|
13603
|
+
const stopRow = ref(0);
|
|
13604
|
+
const tabStop = computed(() => Math.min(stopRow.value, Math.max(props.rows.length - 1, 0)));
|
|
13605
|
+
function onRowKeydown(event, row, index) {
|
|
13606
|
+
if (!props.clickable || event.target !== event.currentTarget || event.altKey || event.ctrlKey || event.metaKey) {
|
|
13607
|
+
return;
|
|
13608
|
+
}
|
|
13609
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
13610
|
+
event.preventDefault();
|
|
13611
|
+
emit("row-click", row, index);
|
|
13612
|
+
return;
|
|
13613
|
+
}
|
|
13614
|
+
const to = tableRowTarget(event.key, index, props.rows.length);
|
|
13615
|
+
if (to < 0) {
|
|
13616
|
+
return;
|
|
13617
|
+
}
|
|
13618
|
+
event.preventDefault();
|
|
13619
|
+
stopRow.value = to;
|
|
13620
|
+
body.value?.children[to]?.focus();
|
|
13621
|
+
}
|
|
13566
13622
|
return (_ctx, _cache) => {
|
|
13567
13623
|
return openBlock(), createElementBlock("div", {
|
|
13568
13624
|
class: normalizeClass(["tao-table-wrap", [
|
|
13569
13625
|
unref(sizeClass)(__props.size),
|
|
13570
13626
|
{
|
|
13571
13627
|
"tao-table-wrap--sticky": __props.sticky,
|
|
13572
|
-
"tao-table-wrap--loading": __props.loading
|
|
13628
|
+
"tao-table-wrap--loading": __props.loading,
|
|
13629
|
+
"tao-table-wrap--stack": __props.stack
|
|
13573
13630
|
}
|
|
13574
13631
|
]]),
|
|
13575
13632
|
style: normalizeStyle([unref(frameStyle)(__props.bordered), __props.maxHeight ? { maxHeight: unref(toCssLength)(__props.maxHeight) } : void 0])
|
|
@@ -13582,17 +13639,24 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
13582
13639
|
"tao-table--head": __props.head,
|
|
13583
13640
|
"tao-table--lines": __props.lines,
|
|
13584
13641
|
"tao-table--clickable": __props.clickable,
|
|
13585
|
-
"tao-table--sticky": __props.sticky
|
|
13586
|
-
|
|
13642
|
+
"tao-table--sticky": __props.sticky,
|
|
13643
|
+
"tao-table--stack": __props.stack
|
|
13644
|
+
}]),
|
|
13645
|
+
style: normalizeStyle(__props.minWidth !== "" ? { "--_tao-table-min": unref(toCssLength)(__props.minWidth) } : void 0),
|
|
13646
|
+
role: __props.stack ? "table" : void 0
|
|
13587
13647
|
}, [
|
|
13588
|
-
__props.caption ? (openBlock(), createElementBlock("caption",
|
|
13648
|
+
__props.caption ? (openBlock(), createElementBlock("caption", _hoisted_2$c, toDisplayString(__props.caption), 1)) : createCommentVNode("", true),
|
|
13589
13649
|
createElementVNode("thead", null, [
|
|
13590
|
-
createElementVNode("tr",
|
|
13650
|
+
createElementVNode("tr", {
|
|
13651
|
+
role: __props.stack ? "row" : void 0
|
|
13652
|
+
}, [
|
|
13591
13653
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
|
|
13592
13654
|
return openBlock(), createElementBlock("th", {
|
|
13593
13655
|
key: column.key,
|
|
13594
|
-
|
|
13656
|
+
class: normalizeClass({ "tao-table__nowrap": column.nowrap }),
|
|
13657
|
+
style: normalizeStyle(cellStyle(column, true)),
|
|
13595
13658
|
scope: "col",
|
|
13659
|
+
role: __props.stack ? "columnheader" : void 0,
|
|
13596
13660
|
"aria-sort": column.sortable ? sortDir(column) === "asc" ? "ascending" : sortDir(column) === "desc" ? "descending" : "none" : void 0
|
|
13597
13661
|
}, [
|
|
13598
13662
|
column.sortable ? (openBlock(), createElementBlock("button", {
|
|
@@ -13609,31 +13673,45 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
13609
13673
|
}]),
|
|
13610
13674
|
"aria-hidden": "true"
|
|
13611
13675
|
}, null, 2)
|
|
13612
|
-
], 8,
|
|
13613
|
-
],
|
|
13676
|
+
], 8, _hoisted_5$9)) : (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(column.label), 1))
|
|
13677
|
+
], 14, _hoisted_4$a);
|
|
13614
13678
|
}), 128))
|
|
13615
|
-
])
|
|
13679
|
+
], 8, _hoisted_3$a)
|
|
13616
13680
|
]),
|
|
13617
|
-
createElementVNode("tbody",
|
|
13618
|
-
|
|
13681
|
+
createElementVNode("tbody", {
|
|
13682
|
+
ref_key: "body",
|
|
13683
|
+
ref: body
|
|
13684
|
+
}, [
|
|
13685
|
+
isEmpty.value ? (openBlock(), createElementBlock("tr", {
|
|
13686
|
+
key: 0,
|
|
13687
|
+
role: __props.stack ? "row" : void 0
|
|
13688
|
+
}, [
|
|
13619
13689
|
createElementVNode("td", {
|
|
13620
13690
|
class: "tao-table__empty",
|
|
13621
|
-
colspan: colCount.value
|
|
13691
|
+
colspan: colCount.value,
|
|
13692
|
+
role: __props.stack ? "cell" : void 0
|
|
13622
13693
|
}, [
|
|
13623
13694
|
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
13624
13695
|
createTextVNode(toDisplayString(unref(l10n).emptyText), 1)
|
|
13625
13696
|
], true)
|
|
13626
|
-
], 8,
|
|
13627
|
-
])) : createCommentVNode("", true),
|
|
13697
|
+
], 8, _hoisted_8$3)
|
|
13698
|
+
], 8, _hoisted_7$4)) : createCommentVNode("", true),
|
|
13628
13699
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (row, index) => {
|
|
13629
13700
|
return openBlock(), createElementBlock("tr", {
|
|
13630
13701
|
key: rowId(row, index),
|
|
13631
|
-
|
|
13702
|
+
role: __props.stack ? "row" : void 0,
|
|
13703
|
+
tabindex: __props.clickable ? index === tabStop.value ? 0 : -1 : void 0,
|
|
13704
|
+
onClick: ($event) => onRowClick(row, index),
|
|
13705
|
+
onKeydown: ($event) => onRowKeydown($event, row, index),
|
|
13706
|
+
onFocusin: ($event) => stopRow.value = index
|
|
13632
13707
|
}, [
|
|
13633
13708
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
|
|
13634
13709
|
return openBlock(), createElementBlock("td", {
|
|
13635
13710
|
key: column.key,
|
|
13636
|
-
|
|
13711
|
+
class: normalizeClass({ "tao-table__nowrap": column.nowrap }),
|
|
13712
|
+
style: normalizeStyle(cellStyle(column)),
|
|
13713
|
+
"data-label": __props.stack ? column.label : void 0,
|
|
13714
|
+
role: __props.stack ? "cell" : void 0
|
|
13637
13715
|
}, [
|
|
13638
13716
|
renderSlot(_ctx.$slots, `cell-${column.key}`, {
|
|
13639
13717
|
row,
|
|
@@ -13650,13 +13728,13 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
13650
13728
|
createTextVNode(toDisplayString(cellValue(row, column)), 1)
|
|
13651
13729
|
], true)
|
|
13652
13730
|
], true)
|
|
13653
|
-
],
|
|
13731
|
+
], 14, _hoisted_10$2);
|
|
13654
13732
|
}), 128))
|
|
13655
|
-
],
|
|
13733
|
+
], 40, _hoisted_9$3);
|
|
13656
13734
|
}), 128))
|
|
13657
|
-
])
|
|
13658
|
-
],
|
|
13659
|
-
__props.loading ? (openBlock(), createElementBlock("div",
|
|
13735
|
+
], 512)
|
|
13736
|
+
], 14, _hoisted_1$e),
|
|
13737
|
+
__props.loading ? (openBlock(), createElementBlock("div", _hoisted_11$2, [
|
|
13660
13738
|
renderSlot(_ctx.$slots, "loading", {}, () => [
|
|
13661
13739
|
createVNode(TaoLoader, { size: 36 })
|
|
13662
13740
|
], true)
|
|
@@ -13665,7 +13743,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
13665
13743
|
};
|
|
13666
13744
|
}
|
|
13667
13745
|
});
|
|
13668
|
-
const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
13746
|
+
const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-dbdbc388"]]);
|
|
13669
13747
|
function buildPaginationItems(page, pageCount, siblingCount = 1) {
|
|
13670
13748
|
if (pageCount <= 0) {
|
|
13671
13749
|
return [];
|
|
@@ -14660,6 +14738,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
14660
14738
|
index === __props.items.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(item.label), 1)) : item.to ? (openBlock(), createBlock(_sfc_main$y, {
|
|
14661
14739
|
key: 2,
|
|
14662
14740
|
class: "tao-breadcrumb__link",
|
|
14741
|
+
underline: "hover",
|
|
14663
14742
|
to: item.to
|
|
14664
14743
|
}, {
|
|
14665
14744
|
default: withCtx(() => [
|
|
@@ -14674,7 +14753,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
14674
14753
|
};
|
|
14675
14754
|
}
|
|
14676
14755
|
});
|
|
14677
|
-
const TaoBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
14756
|
+
const TaoBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-b27ec934"]]);
|
|
14678
14757
|
function rollRanks(previous, next) {
|
|
14679
14758
|
if (!previous) {
|
|
14680
14759
|
return next.map(() => 0);
|