@1337exp/taoui 5.51.0 → 5.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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$b = {
1469
+ const _hoisted_9$c = {
1470
1470
  key: 3,
1471
1471
  class: "tao-card__footer"
1472
1472
  };
1473
- const _hoisted_10$7 = {
1473
+ const _hoisted_10$8 = {
1474
1474
  key: 3,
1475
1475
  class: "tao-card__corner"
1476
1476
  };
1477
- const _hoisted_11$5 = ["aria-label"];
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$b, [
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$7, [
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$5)) : createCommentVNode("", true)
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$a = { class: "tao-tour__progress-text" };
4541
- const _hoisted_10$6 = { class: "tao-tour__actions" };
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$a, toDisplayString(progress.value), 1)
4757
+ createElementVNode("span", _hoisted_9$b, toDisplayString(progress.value), 1)
4758
4758
  ])) : createCommentVNode("", true),
4759
- createElementVNode("span", _hoisted_10$6, [
4759
+ createElementVNode("span", _hoisted_10$7, [
4760
4760
  !isLast.value ? (openBlock(), createBlock(TaoButton, {
4761
4761
  key: 0,
4762
4762
  size: "small",
@@ -5743,11 +5743,32 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
5743
5743
  nextTick(autoResize);
5744
5744
  }
5745
5745
  );
5746
+ let resizeObserver;
5747
+ let lastWidth = -1;
5748
+ let frame = 0;
5746
5749
  onMounted(() => {
5747
5750
  if (props.autofocus) {
5748
5751
  textareaRef.value?.focus();
5749
5752
  }
5750
5753
  nextTick(autoResize);
5754
+ const textarea = textareaRef.value;
5755
+ if (textarea && typeof ResizeObserver !== "undefined") {
5756
+ resizeObserver = new ResizeObserver((entries) => {
5757
+ const width = entries[entries.length - 1]?.contentRect.width ?? textarea.offsetWidth;
5758
+ if (width === lastWidth) {
5759
+ return;
5760
+ }
5761
+ lastWidth = width;
5762
+ cancelAnimationFrame(frame);
5763
+ frame = requestAnimationFrame(autoResize);
5764
+ });
5765
+ resizeObserver.observe(textarea);
5766
+ }
5767
+ });
5768
+ onBeforeUnmount(() => {
5769
+ cancelAnimationFrame(frame);
5770
+ resizeObserver?.disconnect();
5771
+ resizeObserver = void 0;
5751
5772
  });
5752
5773
  return (_ctx, _cache) => {
5753
5774
  return openBlock(), createElementBlock("div", mergeProps(unref(rootAttrs)(), {
@@ -5793,7 +5814,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
5793
5814
  };
5794
5815
  }
5795
5816
  });
5796
- const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-9aaf7131"]]);
5817
+ const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-7fac72d5"]]);
5797
5818
  const _hoisted_1$N = ["aria-label"];
5798
5819
  const _hoisted_2$I = { class: "tao-scroll-top__content" };
5799
5820
  const _hoisted_3$B = {
@@ -6104,7 +6125,7 @@ const _hoisted_5$p = {
6104
6125
  const _hoisted_6$j = { class: "tao-file-drop__name" };
6105
6126
  const _hoisted_7$f = { class: "tao-file-drop__meta" };
6106
6127
  const _hoisted_8$c = ["aria-label", "onClick"];
6107
- const _hoisted_9$9 = { "aria-hidden": "true" };
6128
+ const _hoisted_9$a = { "aria-hidden": "true" };
6108
6129
  const _sfc_main$O = /* @__PURE__ */ defineComponent({
6109
6130
  ...{ name: "TaoFileDrop", inheritAttrs: false },
6110
6131
  __name: "TaoFileDrop",
@@ -6273,7 +6294,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
6273
6294
  "aria-label": unref(l10n).removeLabel.replace("{name}", file.name),
6274
6295
  onClick: ($event) => removeAt(index)
6275
6296
  }, [
6276
- createElementVNode("span", _hoisted_9$9, [
6297
+ createElementVNode("span", _hoisted_9$a, [
6277
6298
  renderSlot(_ctx.$slots, "remove-icon", {}, () => [
6278
6299
  createVNode(TaoIcon, { name: "tao-close" })
6279
6300
  ], true)
@@ -7775,12 +7796,12 @@ const _hoisted_6$g = {
7775
7796
  };
7776
7797
  const _hoisted_7$c = { class: "tao-nav__label" };
7777
7798
  const _hoisted_8$9 = ["aria-hidden"];
7778
- const _hoisted_9$8 = {
7799
+ const _hoisted_9$9 = {
7779
7800
  key: 0,
7780
7801
  class: "tao-nav__entry tao-nav__entry--more"
7781
7802
  };
7782
- const _hoisted_10$5 = ["aria-expanded"];
7783
- const _hoisted_11$4 = {
7803
+ const _hoisted_10$6 = ["aria-expanded"];
7804
+ const _hoisted_11$5 = {
7784
7805
  class: "tao-nav__icon",
7785
7806
  "aria-hidden": "true"
7786
7807
  };
@@ -7906,7 +7927,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
7906
7927
  }, 1032, ["class", "href", "type", "disabled", "aria-disabled", "aria-current", "onClick"]))
7907
7928
  ], 2);
7908
7929
  }), 128)),
7909
- overflowing.value ? (openBlock(), createElementBlock("li", _hoisted_9$8, [
7930
+ overflowing.value ? (openBlock(), createElementBlock("li", _hoisted_9$9, [
7910
7931
  createElementVNode("button", {
7911
7932
  ref_key: "moreButton",
7912
7933
  ref: moreButton,
@@ -7916,14 +7937,14 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
7916
7937
  "aria-expanded": moreOpen.value,
7917
7938
  onClick: _cache[0] || (_cache[0] = ($event) => moreOpen.value = !moreOpen.value)
7918
7939
  }, [
7919
- createElementVNode("span", _hoisted_11$4, [
7940
+ createElementVNode("span", _hoisted_11$5, [
7920
7941
  createVNode(TaoIcon, {
7921
7942
  name: "tao-more-horizontal",
7922
7943
  size: 20
7923
7944
  })
7924
7945
  ]),
7925
7946
  createElementVNode("span", _hoisted_12$2, toDisplayString(unref(l10n).moreLabel), 1)
7926
- ], 10, _hoisted_10$5)
7947
+ ], 10, _hoisted_10$6)
7927
7948
  ])) : createCommentVNode("", true)
7928
7949
  ]),
7929
7950
  has("footer") ? (openBlock(), createElementBlock("div", _hoisted_13$1, [
@@ -8494,11 +8515,11 @@ const _hoisted_8$8 = {
8494
8515
  key: 2,
8495
8516
  class: "tao-tree__hint"
8496
8517
  };
8497
- const _hoisted_9$7 = {
8518
+ const _hoisted_9$8 = {
8498
8519
  key: 0,
8499
8520
  class: "tao-tree__ghost-copy"
8500
8521
  };
8501
- const _hoisted_10$4 = {
8522
+ const _hoisted_10$5 = {
8502
8523
  class: "tao-sr-only",
8503
8524
  role: "status",
8504
8525
  "aria-live": "polite"
@@ -9090,10 +9111,10 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
9090
9111
  "aria-hidden": "true",
9091
9112
  style: normalizeStyle({ left: `${unref(ghost).x + 14}px`, top: `${unref(ghost).y + 10}px` })
9092
9113
  }, [
9093
- unref(ghost).copy ? (openBlock(), createElementBlock("span", _hoisted_9$7, "+")) : createCommentVNode("", true),
9114
+ unref(ghost).copy ? (openBlock(), createElementBlock("span", _hoisted_9$8, "+")) : createCommentVNode("", true),
9094
9115
  createTextVNode(toDisplayString(unref(ghost).text), 1)
9095
9116
  ], 6)) : createCommentVNode("", true),
9096
- createElementVNode("div", _hoisted_10$4, toDisplayString(liveText.value), 1)
9117
+ createElementVNode("div", _hoisted_10$5, toDisplayString(liveText.value), 1)
9097
9118
  ])) : createCommentVNode("", true)
9098
9119
  ], 10, _hoisted_1$B);
9099
9120
  };
@@ -9783,7 +9804,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
9783
9804
  to: { default: void 0 },
9784
9805
  newTab: { type: Boolean, default: false },
9785
9806
  private: { type: Boolean, default: false },
9786
- exactPath: { type: Boolean, default: false }
9807
+ exactPath: { type: Boolean, default: false },
9808
+ underline: { default: "always" }
9787
9809
  },
9788
9810
  setup(__props) {
9789
9811
  const props = __props;
@@ -9809,12 +9831,15 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
9809
9831
  };
9810
9832
  });
9811
9833
  return (_ctx, _cache) => {
9812
- return openBlock(), createBlock(resolveDynamicComponent(unref(linkComponent)), mergeProps(linkProps.value, { draggable: "false" }), {
9834
+ return openBlock(), createBlock(resolveDynamicComponent(unref(linkComponent)), mergeProps(linkProps.value, {
9835
+ class: ["tao-link", { "tao-link--hover": __props.underline === "hover", "tao-link--none": __props.underline === "none" }],
9836
+ draggable: "false"
9837
+ }), {
9813
9838
  default: withCtx(() => [
9814
9839
  renderSlot(_ctx.$slots, "default")
9815
9840
  ]),
9816
9841
  _: 3
9817
- }, 16);
9842
+ }, 16, ["class"]);
9818
9843
  };
9819
9844
  }
9820
9845
  });
@@ -9825,7 +9850,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
9825
9850
  to: { default: void 0 },
9826
9851
  newTab: { type: Boolean, default: false },
9827
9852
  private: { type: Boolean, default: false },
9828
- exactPath: { type: Boolean, default: false }
9853
+ exactPath: { type: Boolean, default: false },
9854
+ underline: { default: "none" }
9829
9855
  },
9830
9856
  setup(__props) {
9831
9857
  const props = __props;
@@ -10395,7 +10421,7 @@ const _hoisted_6$b = {
10395
10421
  };
10396
10422
  const _hoisted_7$8 = ["disabled", "aria-label", "title"];
10397
10423
  const _hoisted_8$7 = ["aria-label"];
10398
- const _hoisted_9$6 = ["disabled", "aria-label", "title", "onClick"];
10424
+ const _hoisted_9$7 = ["disabled", "aria-label", "title", "onClick"];
10399
10425
  const _sfc_main$s = /* @__PURE__ */ defineComponent({
10400
10426
  ...{ name: "TaoColorPicker" },
10401
10427
  __name: "TaoColorPicker",
@@ -10714,7 +10740,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
10714
10740
  "aria-label": s,
10715
10741
  title: s,
10716
10742
  onClick: ($event) => pick(s)
10717
- }, null, 14, _hoisted_9$6);
10743
+ }, null, 14, _hoisted_9$7);
10718
10744
  }), 128))
10719
10745
  ], 8, _hoisted_8$7)) : createCommentVNode("", true)
10720
10746
  ], 2);
@@ -11656,15 +11682,15 @@ const _hoisted_5$e = ["id", "aria-selected", "aria-disabled", "onPointermove", "
11656
11682
  const _hoisted_6$a = { class: "tao-command-list__text" };
11657
11683
  const _hoisted_7$7 = { class: "tao-command-list__label" };
11658
11684
  const _hoisted_8$6 = { key: 0 };
11659
- const _hoisted_9$5 = {
11685
+ const _hoisted_9$6 = {
11660
11686
  key: 0,
11661
11687
  class: "tao-command-list__description"
11662
11688
  };
11663
- const _hoisted_10$3 = {
11689
+ const _hoisted_10$4 = {
11664
11690
  key: 1,
11665
11691
  class: "tao-command-list__where"
11666
11692
  };
11667
- const _hoisted_11$3 = {
11693
+ const _hoisted_11$4 = {
11668
11694
  key: 0,
11669
11695
  class: "tao-command-list__empty",
11670
11696
  role: "presentation"
@@ -11845,9 +11871,9 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
11845
11871
  ], 64);
11846
11872
  }), 128))
11847
11873
  ]),
11848
- row.match.item.description ? (openBlock(), createElementBlock("span", _hoisted_9$5, toDisplayString(row.match.item.description), 1)) : createCommentVNode("", true)
11874
+ row.match.item.description ? (openBlock(), createElementBlock("span", _hoisted_9$6, toDisplayString(row.match.item.description), 1)) : createCommentVNode("", true)
11849
11875
  ]),
11850
- query.value.trim() && row.match.item.group ? (openBlock(), createElementBlock("span", _hoisted_10$3, toDisplayString(row.match.item.group), 1)) : createCommentVNode("", true),
11876
+ query.value.trim() && row.match.item.group ? (openBlock(), createElementBlock("span", _hoisted_10$4, toDisplayString(row.match.item.group), 1)) : createCommentVNode("", true),
11851
11877
  row.match.item.shortcut ? (openBlock(), createBlock(_sfc_main$1q, {
11852
11878
  key: 2,
11853
11879
  variant: "plain",
@@ -11862,7 +11888,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
11862
11888
  ], 42, _hoisted_5$e))
11863
11889
  ], 64);
11864
11890
  }), 128)),
11865
- !results.value.length ? (openBlock(), createElementBlock("li", _hoisted_11$3, [
11891
+ !results.value.length ? (openBlock(), createElementBlock("li", _hoisted_11$4, [
11866
11892
  renderSlot(_ctx.$slots, "empty", {}, () => [
11867
11893
  createTextVNode(toDisplayString(__props.emptyText ?? unref(l10n).emptyText), 1)
11868
11894
  ], true)
@@ -12422,9 +12448,9 @@ const _hoisted_8$5 = {
12422
12448
  class: "tao-date__weekdays",
12423
12449
  "aria-hidden": "true"
12424
12450
  };
12425
- const _hoisted_9$4 = ["aria-label", "aria-selected", "disabled", "onMouseenter", "onClick"];
12426
- const _hoisted_10$2 = { class: "tao-date__footer" };
12427
- const _hoisted_11$2 = ["disabled"];
12451
+ const _hoisted_9$5 = ["aria-label", "aria-selected", "disabled", "onMouseenter", "onClick"];
12452
+ const _hoisted_10$3 = { class: "tao-date__footer" };
12453
+ const _hoisted_11$3 = ["disabled"];
12428
12454
  const _sfc_main$l = /* @__PURE__ */ defineComponent({
12429
12455
  ...{ name: "TaoCalendar" },
12430
12456
  __name: "TaoCalendar",
@@ -12644,10 +12670,10 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
12644
12670
  }, ["prevent"])),
12645
12671
  onMouseenter: ($event) => onDayEnter(cell.iso),
12646
12672
  onClick: ($event) => selectDay(cell.iso)
12647
- }, toDisplayString(cell.day), 43, _hoisted_9$4);
12673
+ }, toDisplayString(cell.day), 43, _hoisted_9$5);
12648
12674
  }), 128))
12649
12675
  ], 32),
12650
- createElementVNode("div", _hoisted_10$2, [
12676
+ createElementVNode("div", _hoisted_10$3, [
12651
12677
  createElementVNode("button", {
12652
12678
  type: "button",
12653
12679
  class: "tao-date__link",
@@ -12657,7 +12683,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
12657
12683
  renderSlot(_ctx.$slots, "today", {}, () => [
12658
12684
  createTextVNode(toDisplayString(unref(l10n).todayText), 1)
12659
12685
  ])
12660
- ], 8, _hoisted_11$2),
12686
+ ], 8, _hoisted_11$3),
12661
12687
  committed.value ? (openBlock(), createElementBlock("button", {
12662
12688
  key: 0,
12663
12689
  type: "button",
@@ -13347,7 +13373,7 @@ const _hoisted_5$a = {
13347
13373
  const _hoisted_6$7 = ["id", "^hidden"];
13348
13374
  const _hoisted_7$5 = ["id"];
13349
13375
  const _hoisted_8$4 = ["aria-label"];
13350
- const _hoisted_9$3 = { "aria-hidden": "true" };
13376
+ const _hoisted_9$4 = { "aria-hidden": "true" };
13351
13377
  const _sfc_main$f = /* @__PURE__ */ defineComponent({
13352
13378
  ...{ name: "TaoAlert" },
13353
13379
  __name: "TaoAlert",
@@ -13463,7 +13489,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
13463
13489
  "aria-label": unref(l10n).closeLabel,
13464
13490
  onClick: _cache[2] || (_cache[2] = ($event) => emit("close"))
13465
13491
  }, [
13466
- createElementVNode("span", _hoisted_9$3, [
13492
+ createElementVNode("span", _hoisted_9$4, [
13467
13493
  renderSlot(_ctx.$slots, "close-icon", {}, () => [
13468
13494
  createVNode(TaoIcon, { name: "tao-close" })
13469
13495
  ], true)
@@ -13474,14 +13500,47 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
13474
13500
  }
13475
13501
  });
13476
13502
  const TaoAlert = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-6327e98d"]]);
13477
- const _hoisted_1$e = { key: 0 };
13478
- const _hoisted_2$c = ["aria-sort"];
13479
- const _hoisted_3$a = ["onClick"];
13480
- const _hoisted_4$a = { key: 1 };
13481
- const _hoisted_5$9 = { key: 0 };
13482
- const _hoisted_6$6 = ["colspan"];
13483
- const _hoisted_7$4 = ["onClick"];
13484
- const _hoisted_8$3 = {
13503
+ function tableCellValue(row, column) {
13504
+ if (column.value) {
13505
+ return column.value(row);
13506
+ }
13507
+ return row[column.key];
13508
+ }
13509
+ function tableRowId(rowKey, row, index) {
13510
+ if (typeof rowKey === "function") {
13511
+ return rowKey(row, index);
13512
+ }
13513
+ const key = row[rowKey];
13514
+ return key == null ? index : String(key);
13515
+ }
13516
+ function tableRowTarget(key, from, count) {
13517
+ if (count <= 0) {
13518
+ return -1;
13519
+ }
13520
+ switch (key) {
13521
+ case "ArrowDown":
13522
+ return Math.min(from + 1, count - 1);
13523
+ case "ArrowUp":
13524
+ return Math.max(from - 1, 0);
13525
+ case "Home":
13526
+ return 0;
13527
+ case "End":
13528
+ return count - 1;
13529
+ default:
13530
+ return -1;
13531
+ }
13532
+ }
13533
+ const _hoisted_1$e = ["role"];
13534
+ const _hoisted_2$c = { key: 0 };
13535
+ const _hoisted_3$a = ["role"];
13536
+ const _hoisted_4$a = ["role", "aria-sort"];
13537
+ const _hoisted_5$9 = ["onClick"];
13538
+ const _hoisted_6$6 = { key: 1 };
13539
+ const _hoisted_7$4 = ["role"];
13540
+ const _hoisted_8$3 = ["colspan", "role"];
13541
+ const _hoisted_9$3 = ["role", "tabindex", "onClick", "onKeydown", "onFocusin"];
13542
+ const _hoisted_10$2 = ["data-label", "role"];
13543
+ const _hoisted_11$2 = {
13485
13544
  key: 0,
13486
13545
  class: "tao-table__loading",
13487
13546
  "aria-busy": "true"
@@ -13505,7 +13564,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
13505
13564
  clickable: { type: Boolean, default: false },
13506
13565
  sort: { default: null },
13507
13566
  caption: { default: "" },
13508
- bordered: { type: Boolean, default: void 0 }
13567
+ bordered: { type: Boolean, default: void 0 },
13568
+ minWidth: { default: "" },
13569
+ stack: { type: Boolean, default: false }
13509
13570
  },
13510
13571
  emits: ["update:sort", "change", "row-click"],
13511
13572
  setup(__props, { emit: __emit }) {
@@ -13529,19 +13590,15 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
13529
13590
  }
13530
13591
  return typeof column.width === "number" ? `${column.width}px` : column.width;
13531
13592
  }
13532
- function cellValue(row, column) {
13533
- if (column.value) {
13534
- return column.value(row);
13535
- }
13536
- return row[column.key];
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);
13593
+ function cellStyle(column, head = false) {
13594
+ return {
13595
+ "--_tao-align": column.align || "left",
13596
+ width: head ? columnWidth(column) : void 0,
13597
+ minWidth: toCssLength(column.minWidth)
13598
+ };
13544
13599
  }
13600
+ const cellValue = (row, column) => tableCellValue(row, column);
13601
+ const rowId = (row, index) => tableRowId(props.rowKey, row, index);
13545
13602
  function sortDir(column) {
13546
13603
  if (!props.sort || props.sort.key !== column.key) {
13547
13604
  return null;
@@ -13563,13 +13620,34 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
13563
13620
  }
13564
13621
  emit("row-click", row, index);
13565
13622
  }
13623
+ const body = ref(null);
13624
+ const stopRow = ref(0);
13625
+ const tabStop = computed(() => Math.min(stopRow.value, Math.max(props.rows.length - 1, 0)));
13626
+ function onRowKeydown(event, row, index) {
13627
+ if (!props.clickable || event.target !== event.currentTarget || event.altKey || event.ctrlKey || event.metaKey) {
13628
+ return;
13629
+ }
13630
+ if (event.key === "Enter" || event.key === " ") {
13631
+ event.preventDefault();
13632
+ emit("row-click", row, index);
13633
+ return;
13634
+ }
13635
+ const to = tableRowTarget(event.key, index, props.rows.length);
13636
+ if (to < 0) {
13637
+ return;
13638
+ }
13639
+ event.preventDefault();
13640
+ stopRow.value = to;
13641
+ body.value?.children[to]?.focus();
13642
+ }
13566
13643
  return (_ctx, _cache) => {
13567
13644
  return openBlock(), createElementBlock("div", {
13568
13645
  class: normalizeClass(["tao-table-wrap", [
13569
13646
  unref(sizeClass)(__props.size),
13570
13647
  {
13571
13648
  "tao-table-wrap--sticky": __props.sticky,
13572
- "tao-table-wrap--loading": __props.loading
13649
+ "tao-table-wrap--loading": __props.loading,
13650
+ "tao-table-wrap--stack": __props.stack
13573
13651
  }
13574
13652
  ]]),
13575
13653
  style: normalizeStyle([unref(frameStyle)(__props.bordered), __props.maxHeight ? { maxHeight: unref(toCssLength)(__props.maxHeight) } : void 0])
@@ -13582,17 +13660,24 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
13582
13660
  "tao-table--head": __props.head,
13583
13661
  "tao-table--lines": __props.lines,
13584
13662
  "tao-table--clickable": __props.clickable,
13585
- "tao-table--sticky": __props.sticky
13586
- }])
13663
+ "tao-table--sticky": __props.sticky,
13664
+ "tao-table--stack": __props.stack
13665
+ }]),
13666
+ style: normalizeStyle(__props.minWidth !== "" ? { "--_tao-table-min": unref(toCssLength)(__props.minWidth) } : void 0),
13667
+ role: __props.stack ? "table" : void 0
13587
13668
  }, [
13588
- __props.caption ? (openBlock(), createElementBlock("caption", _hoisted_1$e, toDisplayString(__props.caption), 1)) : createCommentVNode("", true),
13669
+ __props.caption ? (openBlock(), createElementBlock("caption", _hoisted_2$c, toDisplayString(__props.caption), 1)) : createCommentVNode("", true),
13589
13670
  createElementVNode("thead", null, [
13590
- createElementVNode("tr", null, [
13671
+ createElementVNode("tr", {
13672
+ role: __props.stack ? "row" : void 0
13673
+ }, [
13591
13674
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
13592
13675
  return openBlock(), createElementBlock("th", {
13593
13676
  key: column.key,
13594
- style: normalizeStyle({ width: columnWidth(column), textAlign: column.align || "left" }),
13677
+ class: normalizeClass({ "tao-table__nowrap": column.nowrap }),
13678
+ style: normalizeStyle(cellStyle(column, true)),
13595
13679
  scope: "col",
13680
+ role: __props.stack ? "columnheader" : void 0,
13596
13681
  "aria-sort": column.sortable ? sortDir(column) === "asc" ? "ascending" : sortDir(column) === "desc" ? "descending" : "none" : void 0
13597
13682
  }, [
13598
13683
  column.sortable ? (openBlock(), createElementBlock("button", {
@@ -13609,31 +13694,45 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
13609
13694
  }]),
13610
13695
  "aria-hidden": "true"
13611
13696
  }, null, 2)
13612
- ], 8, _hoisted_3$a)) : (openBlock(), createElementBlock("span", _hoisted_4$a, toDisplayString(column.label), 1))
13613
- ], 12, _hoisted_2$c);
13697
+ ], 8, _hoisted_5$9)) : (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(column.label), 1))
13698
+ ], 14, _hoisted_4$a);
13614
13699
  }), 128))
13615
- ])
13700
+ ], 8, _hoisted_3$a)
13616
13701
  ]),
13617
- createElementVNode("tbody", null, [
13618
- isEmpty.value ? (openBlock(), createElementBlock("tr", _hoisted_5$9, [
13702
+ createElementVNode("tbody", {
13703
+ ref_key: "body",
13704
+ ref: body
13705
+ }, [
13706
+ isEmpty.value ? (openBlock(), createElementBlock("tr", {
13707
+ key: 0,
13708
+ role: __props.stack ? "row" : void 0
13709
+ }, [
13619
13710
  createElementVNode("td", {
13620
13711
  class: "tao-table__empty",
13621
- colspan: colCount.value
13712
+ colspan: colCount.value,
13713
+ role: __props.stack ? "cell" : void 0
13622
13714
  }, [
13623
13715
  renderSlot(_ctx.$slots, "empty", {}, () => [
13624
13716
  createTextVNode(toDisplayString(unref(l10n).emptyText), 1)
13625
13717
  ], true)
13626
- ], 8, _hoisted_6$6)
13627
- ])) : createCommentVNode("", true),
13718
+ ], 8, _hoisted_8$3)
13719
+ ], 8, _hoisted_7$4)) : createCommentVNode("", true),
13628
13720
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (row, index) => {
13629
13721
  return openBlock(), createElementBlock("tr", {
13630
13722
  key: rowId(row, index),
13631
- onClick: ($event) => onRowClick(row, index)
13723
+ role: __props.stack ? "row" : void 0,
13724
+ tabindex: __props.clickable ? index === tabStop.value ? 0 : -1 : void 0,
13725
+ onClick: ($event) => onRowClick(row, index),
13726
+ onKeydown: ($event) => onRowKeydown($event, row, index),
13727
+ onFocusin: ($event) => stopRow.value = index
13632
13728
  }, [
13633
13729
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
13634
13730
  return openBlock(), createElementBlock("td", {
13635
13731
  key: column.key,
13636
- style: normalizeStyle({ textAlign: column.align || "left" })
13732
+ class: normalizeClass({ "tao-table__nowrap": column.nowrap }),
13733
+ style: normalizeStyle(cellStyle(column)),
13734
+ "data-label": __props.stack ? column.label : void 0,
13735
+ role: __props.stack ? "cell" : void 0
13637
13736
  }, [
13638
13737
  renderSlot(_ctx.$slots, `cell-${column.key}`, {
13639
13738
  row,
@@ -13650,13 +13749,13 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
13650
13749
  createTextVNode(toDisplayString(cellValue(row, column)), 1)
13651
13750
  ], true)
13652
13751
  ], true)
13653
- ], 4);
13752
+ ], 14, _hoisted_10$2);
13654
13753
  }), 128))
13655
- ], 8, _hoisted_7$4);
13754
+ ], 40, _hoisted_9$3);
13656
13755
  }), 128))
13657
- ])
13658
- ], 2),
13659
- __props.loading ? (openBlock(), createElementBlock("div", _hoisted_8$3, [
13756
+ ], 512)
13757
+ ], 14, _hoisted_1$e),
13758
+ __props.loading ? (openBlock(), createElementBlock("div", _hoisted_11$2, [
13660
13759
  renderSlot(_ctx.$slots, "loading", {}, () => [
13661
13760
  createVNode(TaoLoader, { size: 36 })
13662
13761
  ], true)
@@ -13665,7 +13764,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
13665
13764
  };
13666
13765
  }
13667
13766
  });
13668
- const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-8b5bb7ae"]]);
13767
+ const TaoTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-dbdbc388"]]);
13669
13768
  function buildPaginationItems(page, pageCount, siblingCount = 1) {
13670
13769
  if (pageCount <= 0) {
13671
13770
  return [];
@@ -14660,6 +14759,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
14660
14759
  index === __props.items.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(item.label), 1)) : item.to ? (openBlock(), createBlock(_sfc_main$y, {
14661
14760
  key: 2,
14662
14761
  class: "tao-breadcrumb__link",
14762
+ underline: "hover",
14663
14763
  to: item.to
14664
14764
  }, {
14665
14765
  default: withCtx(() => [
@@ -14674,7 +14774,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
14674
14774
  };
14675
14775
  }
14676
14776
  });
14677
- const TaoBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-b853fbd5"]]);
14777
+ const TaoBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-b27ec934"]]);
14678
14778
  function rollRanks(previous, next) {
14679
14779
  if (!previous) {
14680
14780
  return next.map(() => 0);