@1337exp/taoui 5.12.0 → 5.14.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.14.0
4
+
5
+ Nothing to migrate.
6
+
7
+ - **`TaoList` `roving`.** One Tab stop for the whole list: the arrows move between the rows, Home / End to the first and the last, disabled rows are skipped, and Tab comes back to the row it left (the selected one the first time). The stop of a row is its button (`clickable`) or the row itself, with the focus ring of a clickable row. Rows added or removed are followed; a key pressed in a row's own control (an input, a menu) stays with it. An app no longer writes its own roving tabindex for a list of records.
8
+ - **`TaoListItem` focus ring round the whole row.** On a `clickable` row the ring was drawn on its button, inside the row's padding, so it stood off the edges while the highlight ran the full width. It goes round the row now (`:has()`; older browsers keep the ring on the button).
9
+ - Showcase: the «People» list is roving.
10
+
11
+ ## 5.13.0
12
+
13
+ Nothing to migrate.
14
+
15
+ - **Hidden inputs no longer stretch the page.** `TaoSwitch`, `TaoCheckbox`, `TaoRadio`, `TaoFileDrop` and `TaoPinCode` keep a visually hidden input (or a status) that is `position: absolute`, and their root was not positioned: the hidden element stood against the page, not the field, so a scrolling container did not clip it and the document grew (a long form in a `overflow: auto` block scrolled the whole page). Each root is `position: relative` now.
16
+ - **`TaoNav` `#footer`:** a small line under the items in the rail and the side panel (the version, «About», a link); the bar has no room for it and does not show it.
17
+ - Showcase: the TaoNav demo has a footer.
18
+
3
19
  ## 5.12.0
4
20
 
5
21
  Nothing to migrate.
package/README.md CHANGED
@@ -63,7 +63,7 @@
63
63
  - **TaoSpoiler** — disclosure. `v-model` and `aria-expanded`. Neighbours do not close each other
64
64
  - **TaoSpoilerGroup** — accordion: `v-model` is the open panel key (`null` = all closed); spoilers take `name`. Without `v-model` the group keeps that key itself
65
65
  - **TaoTabs** — tabbed sections
66
- - **TaoNav** — navigation between the sections of an app: one list of items (`icon`, `href`, `badge`), three looks. `layout="auto"` picks by the width of TaoNav itself (container queries, no JS): a bottom bar below 600px (more than five items: «More» with a menu), a rail with icons below 840px, a side panel with labels from 840px. With the page in its slot it lays the page out: the bar sticks to the bottom (safe area kept), the side list to the top. `floating` lifts the bar into a detached pill with a shadow (the rail and the side panel stay). `indicator="line"` marks the current section with a short accent line instead of a tint. The `#action` slot is the screen's main action and moves with the navigation: round above the bar at the end side, at the top of the rail, extended with its text at the top of the side panel. `select(id, event)` lets a router take over a link. Widths: `--tao-nav-rail-width` (80px), `--tao-nav-drawer-width` (240px); `--tao-nav-action-radius` for the action in the side panel; `surface="glass"` lets the page show blurred through the bar
66
+ - **TaoNav** — navigation between the sections of an app: one list of items (`icon`, `href`, `badge`), three looks. `layout="auto"` picks by the width of TaoNav itself (container queries, no JS): a bottom bar below 600px (more than five items: «More» with a menu), a rail with icons below 840px, a side panel with labels from 840px. With the page in its slot it lays the page out: the bar sticks to the bottom (safe area kept), the side list to the top. `floating` lifts the bar into a detached pill with a shadow (the rail and the side panel stay). `indicator="line"` marks the current section with a short accent line instead of a tint. The `#action` slot is the screen's main action and moves with the navigation: round above the bar at the end side, at the top of the rail, extended with its text at the top of the side panel. `select(id, event)` lets a router take over a link. Widths: `--tao-nav-rail-width` (80px), `--tao-nav-drawer-width` (240px); `--tao-nav-action-radius` for the action in the side panel; `surface="glass"` lets the page show blurred through the bar; `#footer` for a small line under the items on the side
67
67
  - **TaoTooltip** — hover hint. `placement`: `top` / `bottom` / `left` / `right`, each with `-start` / `-end`; flips at the viewport edge
68
68
  - **TaoPopover** — click panel with any slot content, Esc and outside click; `placement` as Tooltip. Not a tooltip, not an action menu
69
69
 
@@ -107,7 +107,7 @@
107
107
  - **TaoHeatmap** — a value for each pair of two things (orders by weekday and hour): `values` by `rows` × `cols`, the colour by thresholds (`steps`, round numbers by default) that the legend names («500+»), the faint levels striped, a tip with the exact number. A `role="grid"` the arrows move through, a screen reader reads the row, the column and the number; it fits its container and shows the column names as often as they fit
108
108
  - **TaoPagination** — pages with ellipsis. Clicking “…” jumps `jump` pages (5 by default). `pageSizes` adds a «Per page» choice (`v-model:page-size`); the first row on screen stays on screen
109
109
  - **TaoEmpty** — empty list, no results, no access
110
- - **TaoList** / **TaoListItem** — list row: icon, title, caption, hover action. Not Select, not a table
110
+ - **TaoList** / **TaoListItem** — list row: icon, title, caption, hover action. Not Select, not a table; `roving` makes it one Tab stop with the arrows between the rows
111
111
  - **TaoTree** — files or objects as a tree: `v-model:expanded`, selection `none | single | multiple` (`v-model:selected`), checkboxes with mixed parents (`checkable`, `v-model:checked`), lazy children (`hasChildren` + `load`). ARIA tree: one tab stop, arrows, `→` / `←` in and out, Home / End, `*`, type-ahead. Slots `#icon`, `#label`, `#actions`; rows on the control tokens (size and density)
112
112
  - **TaoStages** — stage list: `wait` / `work` / `ok` / `bad`. Not a linear stepper
113
113
  - **TaoTimeline** — a vertical feed of events: order steps, releases, a log. `active` fills the line up to the current event (`aria-current="step"`), without it the feed is a log of the past; `tone` and `icon` per marker, `#marker` / `#title` / `#content` slots; `align="alternate"` puts events on both sides and folds into one below 480px of its own width
package/README.ru.md CHANGED
@@ -63,7 +63,7 @@
63
63
  - **TaoSpoiler** — раскрывающийся блок. `v-model` и `aria-expanded`. Несколько подряд сами друг друга не закрывают
64
64
  - **TaoSpoilerGroup** — аккордеон: `v-model` — ключ открытой панели (`null` — все закрыты), у спойлера `name`. Без `v-model` группа помнит ключ сама
65
65
  - **TaoTabs** — вкладки для переключения между секциями контента
66
- - **TaoNav** — навигация между разделами приложения: один список пунктов (`icon`, `href`, `badge`), три вида. `layout="auto"` выбирает по ширине самого TaoNav (container queries, без JS): нижняя панель до 600px (больше пяти пунктов: «Ещё» с меню), рейка с иконками до 840px, боковая панель с подписями от 840px. Со страницей в слоте раскладывает её сам: панель прилипает к низу (с учётом безопасной зоны), боковой список к верху. `floating` отрывает нижнюю панель в отдельную «пилюлю» с тенью (рейка и боковая панель не меняются). `indicator="line"` отмечает текущий раздел короткой чертой акцента вместо подложки. Слот `#action` — главное действие экрана, оно идёт за навигацией: круглое над панелью у конечного края, наверху рейки, широкое с текстом наверху боковой панели. `select(id, event)` даёт роутеру перехватить ссылку. Ширины: `--tao-nav-rail-width` (80px), `--tao-nav-drawer-width` (240px); `--tao-nav-action-radius` — углы действия в боковой панели; `surface="glass"` — страница размыто просвечивает сквозь панель
66
+ - **TaoNav** — навигация между разделами приложения: один список пунктов (`icon`, `href`, `badge`), три вида. `layout="auto"` выбирает по ширине самого TaoNav (container queries, без JS): нижняя панель до 600px (больше пяти пунктов: «Ещё» с меню), рейка с иконками до 840px, боковая панель с подписями от 840px. Со страницей в слоте раскладывает её сам: панель прилипает к низу (с учётом безопасной зоны), боковой список к верху. `floating` отрывает нижнюю панель в отдельную «пилюлю» с тенью (рейка и боковая панель не меняются). `indicator="line"` отмечает текущий раздел короткой чертой акцента вместо подложки. Слот `#action` — главное действие экрана, оно идёт за навигацией: круглое над панелью у конечного края, наверху рейки, широкое с текстом наверху боковой панели. `select(id, event)` даёт роутеру перехватить ссылку. Ширины: `--tao-nav-rail-width` (80px), `--tao-nav-drawer-width` (240px); `--tao-nav-action-radius` — углы действия в боковой панели; `surface="glass"` — страница размыто просвечивает сквозь панель; `#footer` — мелкая строка под пунктами сбоку
67
67
  - **TaoTooltip** — всплывающая подсказка при наведении. `placement`: `top` / `bottom` / `left` / `right`, у каждого `-start` / `-end`; у края экрана переворачивается
68
68
  - **TaoPopover** — панель по клику: слот с любым контентом, Esc и клик снаружи; `placement` как у Tooltip. Не тултип и не меню действий
69
69
 
@@ -107,7 +107,7 @@
107
107
  - **TaoHeatmap** — значение для каждой пары (заказы по дню недели и часу): `values` по `rows` × `cols`, цвет по порогам (`steps`, по умолчанию круглые числа), которые называет легенда («500+»), бледные уровни в полоску, подсказка с точным числом. `role="grid"`, по которому ходят стрелками; скринридер читает строку, столбец и число; занимает ширину контейнера и показывает имена столбцов так часто, как они помещаются
108
108
  - **TaoPagination** — страницы с многоточием. Клик по «…» прыгает на `jump` страниц (5 по умолчанию). `pageSizes` добавляет выбор «На странице» (`v-model:page-size`); первая видимая строка остаётся на экране
109
109
  - **TaoEmpty** — пустой список, нет результатов, нет прав
110
- - **TaoList** / **TaoListItem** — строка списка: иконка, заголовок, подпись, действие по ховеру. Не Select и не таблица
110
+ - **TaoList** / **TaoListItem** — строка списка: иконка, заголовок, подпись, действие по ховеру. Не Select и не таблица; `roving` — одна остановка Tab, стрелки ходят по строкам
111
111
  - **TaoTree** — файлы или объекты деревом: `v-model:expanded`, выбор `none | single | multiple` (`v-model:selected`), чекбоксы с промежуточным состоянием родителя (`checkable`, `v-model:checked`), ленивая подгрузка (`hasChildren` + `load`). ARIA tree: одна остановка Tab, стрелки, `→` / `←` внутрь и наружу, Home / End, `*`, поиск по буквам. Слоты `#icon`, `#label`, `#actions`; строки на токенах контролов (размер и плотность)
112
112
  - **TaoStages** — список стадий: `wait` / `work` / `ok` / `bad`. Не линейный степпер
113
113
  - **TaoTimeline** — вертикальная лента событий: шаги заказа, релизы, журнал. `active` заливает линию до текущего события (`aria-current="step"`), без него лента — журнал прошедшего; `tone` и `icon` у маркера, слоты `#marker` / `#title` / `#content`; `align="alternate"` раскладывает события по обе стороны и складывается в одну уже 480px своей ширины
package/dist/index.d.ts CHANGED
@@ -2580,11 +2580,21 @@ maxHeight?: TaoLength;
2580
2580
  /** Показать `#empty` вместо строк. */
2581
2581
  empty?: boolean;
2582
2582
  ariaLabel?: string;
2583
+ /**
2584
+ * One Tab stop for the whole list: the arrows move between the rows, Home / End to the first and the last;
2585
+ * disabled rows are skipped. Tab comes back to the row it left (the selected one the first time). A row's
2586
+ * stop is its button (`clickable`) or the row itself.
2587
+ * Одна остановка Tab на весь список: стрелки ходят по строкам, Home / End — в начало и в конец; недоступные
2588
+ * пропускаются. Tab возвращается в строку, из которой ушёл (в первый раз — в выбранную). Остановка строки — её
2589
+ * кнопка (`clickable`) или сама строка.
2590
+ */
2591
+ roving?: boolean;
2583
2592
  }>, {
2584
2593
  bordered: boolean;
2585
2594
  divided: boolean;
2586
2595
  empty: boolean;
2587
2596
  ariaLabel: string;
2597
+ roving: boolean;
2588
2598
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_65<__VLS_TypePropsToRuntimeProps_70<{
2589
2599
  /** Row height; items inherit it. Without it — the size of ancestors. / Высота строк, item наследует. Без него — размер предков. */
2590
2600
  size?: TaoSize;
@@ -2597,16 +2607,27 @@ maxHeight?: TaoLength;
2597
2607
  /** Показать `#empty` вместо строк. */
2598
2608
  empty?: boolean;
2599
2609
  ariaLabel?: string;
2610
+ /**
2611
+ * One Tab stop for the whole list: the arrows move between the rows, Home / End to the first and the last;
2612
+ * disabled rows are skipped. Tab comes back to the row it left (the selected one the first time). A row's
2613
+ * stop is its button (`clickable`) or the row itself.
2614
+ * Одна остановка Tab на весь список: стрелки ходят по строкам, Home / End — в начало и в конец; недоступные
2615
+ * пропускаются. Tab возвращается в строку, из которой ушёл (в первый раз — в выбранную). Остановка строки — её
2616
+ * кнопка (`clickable`) или сама строка.
2617
+ */
2618
+ roving?: boolean;
2600
2619
  }>, {
2601
2620
  bordered: boolean;
2602
2621
  divided: boolean;
2603
2622
  empty: boolean;
2604
2623
  ariaLabel: string;
2624
+ roving: boolean;
2605
2625
  }>>> & Readonly<{}>, {
2606
2626
  empty: boolean;
2607
2627
  ariaLabel: string;
2608
2628
  bordered: boolean;
2609
2629
  divided: boolean;
2630
+ roving: boolean;
2610
2631
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
2611
2632
 
2612
2633
  declare const __VLS_component_64: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_66<__VLS_TypePropsToRuntimeProps_71<{
@@ -3674,6 +3695,13 @@ declare function __VLS_template_41(): Readonly<{
3674
3695
  * наверху боковой панели во всю ширину с видимым текстом.
3675
3696
  */
3676
3697
  action?(): unknown;
3698
+ /**
3699
+ * A small line under the items in the rail and the side panel: the version, «About», a link. The bar has no room
3700
+ * for it and does not show it.
3701
+ * Мелкая строка под пунктами в рейке и боковой панели: версия, «О приложении», ссылка. В нижней панели для неё
3702
+ * нет места, там её нет.
3703
+ */
3704
+ footer?(): unknown;
3677
3705
  }> & {
3678
3706
  /** The page: TaoNav lays it out next to the navigation. / Страница: TaoNav раскладывает её рядом с навигацией. */
3679
3707
  default?(): unknown;
@@ -3691,6 +3719,13 @@ declare function __VLS_template_41(): Readonly<{
3691
3719
  * наверху боковой панели во всю ширину с видимым текстом.
3692
3720
  */
3693
3721
  action?(): unknown;
3722
+ /**
3723
+ * A small line under the items in the rail and the side panel: the version, «About», a link. The bar has no room
3724
+ * for it and does not show it.
3725
+ * Мелкая строка под пунктами в рейке и боковой панели: версия, «О приложении», ссылка. В нижней панели для неё
3726
+ * нет места, там её нет.
3727
+ */
3728
+ footer?(): unknown;
3694
3729
  };
3695
3730
 
3696
3731
  declare function __VLS_template_42(): Readonly<{
package/dist/index.js CHANGED
@@ -3527,7 +3527,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
3527
3527
  };
3528
3528
  }
3529
3529
  });
3530
- const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-64c6f73a"]]);
3530
+ const TaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-55451432"]]);
3531
3531
  const _hoisted_1$P = {
3532
3532
  key: 0,
3533
3533
  class: "tao-tag__prefix"
@@ -4349,7 +4349,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
4349
4349
  };
4350
4350
  }
4351
4351
  });
4352
- const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-21fc24d9"]]);
4352
+ const TaoFileDrop = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["__scopeId", "data-v-230d5ca0"]]);
4353
4353
  function isMenuSelectable(item) {
4354
4354
  return item.type !== "separator" && item.type !== "label" && !item.disabled;
4355
4355
  }
@@ -5911,6 +5911,10 @@ const _hoisted_11$3 = {
5911
5911
  };
5912
5912
  const _hoisted_12$2 = { class: "tao-nav__label" };
5913
5913
  const _hoisted_13$1 = {
5914
+ key: 1,
5915
+ class: "tao-nav__footer"
5916
+ };
5917
+ const _hoisted_14$1 = {
5914
5918
  key: 0,
5915
5919
  class: "tao-nav__content"
5916
5920
  };
@@ -6043,10 +6047,13 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
6043
6047
  createElementVNode("span", _hoisted_12$2, toDisplayString(unref(l10n).moreLabel), 1)
6044
6048
  ], 10, _hoisted_10$3)
6045
6049
  ])) : createCommentVNode("", true)
6046
- ])
6050
+ ]),
6051
+ _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_13$1, [
6052
+ renderSlot(_ctx.$slots, "footer", {}, void 0, true)
6053
+ ])) : createCommentVNode("", true)
6047
6054
  ])
6048
6055
  ], 10, _hoisted_2$v),
6049
- !standalone.value ? (openBlock(), createElementBlock("div", _hoisted_13$1, [
6056
+ !standalone.value ? (openBlock(), createElementBlock("div", _hoisted_14$1, [
6050
6057
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
6051
6058
  ])) : createCommentVNode("", true)
6052
6059
  ]),
@@ -6064,7 +6071,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
6064
6071
  };
6065
6072
  }
6066
6073
  });
6067
- const TaoNav = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-21852ef0"]]);
6074
+ const TaoNav = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-93f7c67b"]]);
6068
6075
  function visibleRows(nodes, expanded, children) {
6069
6076
  const rows = [];
6070
6077
  const walk = (list, level, parentId) => {
@@ -7085,7 +7092,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
7085
7092
  };
7086
7093
  }
7087
7094
  });
7088
- const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-94bbb076"]]);
7095
+ const TaoPinCode = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-383c8197"]]);
7089
7096
  const _sfc_main$t = /* @__PURE__ */ defineComponent({
7090
7097
  ...{ name: "TaoLink" },
7091
7098
  __name: "TaoLink",
@@ -9622,7 +9629,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
9622
9629
  };
9623
9630
  }
9624
9631
  });
9625
- const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-538eb64b"]]);
9632
+ const TaoSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-06d25cc6"]]);
9626
9633
  const radioGroupKey = Symbol("taoRadioGroup");
9627
9634
  const _hoisted_1$h = ["for"];
9628
9635
  const _hoisted_2$f = ["id", "name", "value", "checked", "disabled", "aria-invalid", "aria-describedby"];
@@ -9701,7 +9708,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
9701
9708
  };
9702
9709
  }
9703
9710
  });
9704
- const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-7c95fa50"]]);
9711
+ const TaoRadio = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-cdf15a82"]]);
9705
9712
  const _hoisted_1$g = ["id", "disabled", "aria-describedby", "aria-invalid", "aria-labelledby"];
9706
9713
  const _hoisted_2$e = {
9707
9714
  key: 0,
@@ -10383,7 +10390,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
10383
10390
  divided: { type: Boolean, default: true },
10384
10391
  maxHeight: {},
10385
10392
  empty: { type: Boolean, default: false },
10386
- ariaLabel: { default: "" }
10393
+ ariaLabel: { default: "" },
10394
+ roving: { type: Boolean, default: false }
10387
10395
  },
10388
10396
  setup(__props) {
10389
10397
  const appLocale = useTaoLocale();
@@ -10392,8 +10400,85 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
10392
10400
  const value = toCssLength(props.maxHeight);
10393
10401
  return value ? { maxHeight: value } : void 0;
10394
10402
  });
10403
+ const listRef = ref(null);
10404
+ const current2 = ref(-1);
10405
+ function rows() {
10406
+ const list = listRef.value;
10407
+ if (!list) {
10408
+ return [];
10409
+ }
10410
+ return [...list.children].filter((el) => el instanceof HTMLElement && el.tagName === "LI" && !el.classList.contains("tao-list__empty")).map((el) => {
10411
+ const hit = [...el.children].find((child) => child.matches("button.tao-list-item__hit"));
10412
+ return { el, target: hit ?? el, enabled: el.getAttribute("aria-disabled") !== "true" && !hit?.disabled };
10413
+ });
10414
+ }
10415
+ const isSelected = (row) => row.el.classList.contains("tao-list-item--selected") || row.el.getAttribute("aria-current") === "true" || row.target.getAttribute("aria-current") === "true";
10416
+ function sync() {
10417
+ if (!props.roving) {
10418
+ return;
10419
+ }
10420
+ const all = rows();
10421
+ let index = current2.value;
10422
+ if (!all[index]?.enabled) {
10423
+ const selected = all.findIndex((row) => row.enabled && isSelected(row));
10424
+ index = selected >= 0 ? selected : all.findIndex((row) => row.enabled);
10425
+ }
10426
+ current2.value = index;
10427
+ all.forEach((row, i) => row.target.setAttribute("tabindex", i === index ? "0" : "-1"));
10428
+ }
10429
+ function release() {
10430
+ for (const row of rows()) {
10431
+ row.target.removeAttribute("tabindex");
10432
+ }
10433
+ }
10434
+ function onKeydown2(event) {
10435
+ if (!props.roving || event.altKey || event.metaKey) {
10436
+ return;
10437
+ }
10438
+ const all = rows();
10439
+ const from = all.findIndex((row) => row.target === event.target);
10440
+ if (from < 0) {
10441
+ return;
10442
+ }
10443
+ const enabled = all.map((row) => row.enabled);
10444
+ const to = event.key === "ArrowDown" ? stepEnabled(enabled, from, 1, false) : event.key === "ArrowUp" ? stepEnabled(enabled, from, -1, false) : event.key === "Home" ? firstEnabled(enabled) : event.key === "End" ? lastEnabled(enabled) : -2;
10445
+ if (to === -2) {
10446
+ return;
10447
+ }
10448
+ event.preventDefault();
10449
+ if (to >= 0 && to !== from) {
10450
+ current2.value = to;
10451
+ sync();
10452
+ all[to].target.focus();
10453
+ }
10454
+ }
10455
+ function onFocusIn(event) {
10456
+ if (!props.roving) {
10457
+ return;
10458
+ }
10459
+ const index = rows().findIndex((row) => row.target === event.target);
10460
+ if (index >= 0 && index !== current2.value) {
10461
+ current2.value = index;
10462
+ sync();
10463
+ }
10464
+ }
10465
+ let observer;
10466
+ onMounted(() => {
10467
+ sync();
10468
+ if (typeof MutationObserver !== "undefined" && listRef.value) {
10469
+ observer = new MutationObserver(() => sync());
10470
+ observer.observe(listRef.value, { childList: true, subtree: true });
10471
+ }
10472
+ });
10473
+ onBeforeUnmount(() => observer?.disconnect());
10474
+ watch(
10475
+ () => props.roving,
10476
+ (on) => nextTick(() => on ? sync() : release())
10477
+ );
10395
10478
  return (_ctx, _cache) => {
10396
10479
  return openBlock(), createElementBlock("ul", {
10480
+ ref_key: "listRef",
10481
+ ref: listRef,
10397
10482
  class: normalizeClass(["tao-list", [
10398
10483
  unref(sizeClass)(__props.size),
10399
10484
  {
@@ -10401,22 +10486,25 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
10401
10486
  "tao-list--divided": __props.divided,
10402
10487
  "tao-list--plain": !__props.bordered,
10403
10488
  "tao-list--empty": __props.empty,
10404
- "tao-list--scroll": Boolean(__props.maxHeight)
10489
+ "tao-list--scroll": Boolean(__props.maxHeight),
10490
+ "tao-list--roving": __props.roving
10405
10491
  }
10406
10492
  ]]),
10407
10493
  style: normalizeStyle(listStyle.value),
10408
- "aria-label": __props.ariaLabel || void 0
10494
+ "aria-label": __props.ariaLabel || void 0,
10495
+ onKeydown: onKeydown2,
10496
+ onFocusin: onFocusIn
10409
10497
  }, [
10410
10498
  __props.empty ? (openBlock(), createElementBlock("li", _hoisted_2$9, [
10411
10499
  renderSlot(_ctx.$slots, "empty", {}, () => [
10412
10500
  createTextVNode(toDisplayString(unref(appLocale).list.emptyText), 1)
10413
10501
  ], true)
10414
10502
  ])) : renderSlot(_ctx.$slots, "default", {}, void 0, true, 1)
10415
- ], 14, _hoisted_1$b);
10503
+ ], 46, _hoisted_1$b);
10416
10504
  };
10417
10505
  }
10418
10506
  });
10419
- const TaoList = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-c883af92"]]);
10507
+ const TaoList = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-ddec81f4"]]);
10420
10508
  const _hoisted_1$a = ["aria-current", "aria-disabled"];
10421
10509
  const _hoisted_2$8 = {
10422
10510
  key: 0,
@@ -10519,7 +10607,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
10519
10607
  };
10520
10608
  }
10521
10609
  });
10522
- const TaoListItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-5b58c12a"]]);
10610
+ const TaoListItem = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-dd4f25c2"]]);
10523
10611
  const _hoisted_1$9 = {
10524
10612
  class: "tao-skeleton-group",
10525
10613
  "aria-hidden": true