vectis-ui 0.13.0 → 0.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.
Files changed (43) hide show
  1. package/dist/components/VColorPicker/VColorPicker.css +1 -1
  2. package/dist/components/VColorPicker/VColorPicker.js.map +1 -1
  3. package/dist/components/VColorPicker/VColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  4. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  5. package/dist/components/VCommandPalette/VCommandPalette.css +1 -1
  6. package/dist/components/VCommandPalette/VCommandPalette.js.map +1 -1
  7. package/dist/components/VCommandPalette/VCommandPalette.vue_vue_type_script_setup_true_lang.js.map +1 -1
  8. package/dist/components/VDataTable/VDataTable.js.map +1 -1
  9. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +6 -5
  10. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  11. package/dist/components/VNumberInput/number.d.ts +2 -2
  12. package/dist/components/VNumberInput/number.js +1 -1
  13. package/dist/components/VNumberInput/number.js.map +1 -1
  14. package/dist/components/VPagination/VPagination.js.map +1 -1
  15. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +1 -1
  16. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  17. package/dist/components/VSelect/VSelect.js.map +1 -1
  18. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js +168 -174
  19. package/dist/components/VSelect/VSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  20. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  21. package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
  22. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +1 -1
  23. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  24. package/dist/components/VToggle/VToggle.js.map +1 -1
  25. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +1 -1
  26. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
  27. package/dist/components/VTreeView/VTreeView.js.map +1 -1
  28. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js +127 -131
  29. package/dist/components/VTreeView/VTreeView.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/composables/useHotkeyListener.js +5 -2
  31. package/dist/composables/useHotkeyListener.js.map +1 -1
  32. package/dist/composables/useInfiniteScroll.js +2 -2
  33. package/dist/composables/useInfiniteScroll.js.map +1 -1
  34. package/dist/composables/useTypeahead.d.ts +13 -0
  35. package/dist/composables/useTypeahead.js +23 -0
  36. package/dist/composables/useTypeahead.js.map +1 -0
  37. package/dist/i18n/state.d.ts +1 -1
  38. package/dist/i18n/state.js +17 -6
  39. package/dist/i18n/state.js.map +1 -1
  40. package/dist/styles.css +1 -1
  41. package/dist/utils/date.js +4 -3
  42. package/dist/utils/date.js.map +1 -1
  43. package/package.json +1 -1
@@ -8,10 +8,10 @@ import { useRootAttrs as o } from "../../composables/useRootAttrs.js";
8
8
  import { chevron_right as s } from "../VIcon/icons/chevron_right.js";
9
9
  import c from "../VCheckbox/VCheckMark.js";
10
10
  import { error as l } from "../VIcon/icons/error.js";
11
- import { useLiveAnnouncer as ee } from "../../composables/useLiveAnnouncer.js";
12
- import { useTimer as te } from "../../composables/useTimer.js";
13
- import { normalizeText as u } from "../../utils/text.js";
14
- import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as ne, createVNode as re, defineComponent as _, mergeModels as v, mergeProps as y, normalizeClass as ie, normalizeStyle as b, onMounted as ae, openBlock as x, ref as S, renderList as oe, renderSlot as C, resolveDynamicComponent as se, shallowReactive as w, toDisplayString as T, unref as E, useModel as ce, watch as le, withCtx as ue } from "vue";
11
+ import { useLiveAnnouncer as u } from "../../composables/useLiveAnnouncer.js";
12
+ import { normalizeText as ee } from "../../utils/text.js";
13
+ import { useTypeahead as te } from "../../composables/useTypeahead.js";
14
+ import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as ne, createVNode as re, defineComponent as _, mergeModels as v, mergeProps as y, normalizeClass as ie, normalizeStyle as ae, onMounted as oe, openBlock as b, ref as x, renderList as se, renderSlot as S, resolveDynamicComponent as ce, shallowReactive as C, toDisplayString as w, unref as T, useModel as E, watch as le, withCtx as ue } from "vue";
15
15
  //#region src/components/VTreeView/VTreeView.vue?vue&type=script&setup=true&lang.ts
16
16
  var de = [
17
17
  "data-size",
@@ -24,7 +24,7 @@ var de = [
24
24
  class: "v-visually-hidden",
25
25
  role: "status",
26
26
  "aria-live": "polite"
27
- }, _e = /*@__PURE__*/ _({
27
+ }, D = /*@__PURE__*/ _({
28
28
  inheritAttrs: !1,
29
29
  __name: "VTreeView",
30
30
  props: /*@__PURE__*/ v({
@@ -43,18 +43,18 @@ var de = [
43
43
  expandedModifiers: {}
44
44
  }),
45
45
  emits: /*@__PURE__*/ v(["activate"], ["update:modelValue", "update:expanded"]),
46
- setup(_, { expose: v, emit: _e }) {
47
- let D = _, O = ce(_, "modelValue"), k = ce(_, "expanded"), ve = _e, { rootClass: ye, rootStyle: be, forwardedAttrs: xe } = o(), A = e(), Se = a(() => D.label ?? A.value.treeView.label), { polite: Ce, announce: we } = ee(), j = w(/* @__PURE__ */ new Map()), M = w(/* @__PURE__ */ new Set()), N = w(/* @__PURE__ */ new Set());
48
- function P(e) {
49
- return e.children ?? j.get(e.value);
50
- }
46
+ setup(_, { expose: v, emit: D }) {
47
+ let O = _, k = E(_, "modelValue"), A = E(_, "expanded"), _e = D, { rootClass: ve, rootStyle: ye, forwardedAttrs: be } = o(), j = e(), xe = a(() => O.label ?? j.value.treeView.label), { polite: Se, announce: Ce } = u(), M = C(/* @__PURE__ */ new Map()), N = C(/* @__PURE__ */ new Set()), P = C(/* @__PURE__ */ new Set());
51
48
  function F(e) {
52
- return !!D.loadChildren && !!e.lazy && !e.children && !j.has(e.value);
49
+ return e.children ?? M.get(e.value);
53
50
  }
54
51
  function I(e) {
55
- return !!P(e)?.length || F(e);
52
+ return !!O.loadChildren && !!e.lazy && !e.children && !M.has(e.value);
53
+ }
54
+ function L(e) {
55
+ return !!F(e)?.length || I(e);
56
56
  }
57
- let L = f(() => new Set(k.value)), R = f(() => {
57
+ let R = f(() => new Set(A.value)), z = f(() => {
58
58
  let e = [], t = (n, r, i) => {
59
59
  n.forEach((a, o) => {
60
60
  let s = {
@@ -65,236 +65,232 @@ var de = [
65
65
  setsize: n.length
66
66
  };
67
67
  e.push(s);
68
- let c = P(a);
69
- c && L.value.has(a.value) && t(c, r + 1, s);
68
+ let c = F(a);
69
+ c && R.value.has(a.value) && t(c, r + 1, s);
70
70
  });
71
71
  };
72
- return t(D.items, 1, null), e;
72
+ return t(O.items, 1, null), e;
73
73
  });
74
- function z(e, t) {
75
- t !== L.value.has(e.value) && (k.value = t ? [...k.value, e.value] : k.value.filter((t) => t !== e.value));
74
+ function B(e, t) {
75
+ t !== R.value.has(e.value) && (A.value = t ? [...A.value, e.value] : A.value.filter((t) => t !== e.value));
76
76
  }
77
- function B(e) {
77
+ function V(e) {
78
78
  let t = /* @__PURE__ */ new Map(), n = (r, i) => {
79
79
  t.set(r.value, "false");
80
- let a = i || e.has(r.value), o = P(r), s = a ? "true" : "false";
80
+ let a = i || e.has(r.value), o = F(r), s = a ? "true" : "false";
81
81
  if (o?.length) {
82
82
  let e = o.map((e) => n(e, a));
83
83
  s = e.every((e) => e === "true") ? "true" : e.every((e) => e === "false") ? "false" : "mixed";
84
84
  }
85
85
  return t.set(r.value, s), s;
86
86
  };
87
- return D.items.forEach((e) => n(e, !1)), t;
87
+ return O.items.forEach((e) => n(e, !1)), t;
88
88
  }
89
- let V = f(() => {
90
- let e = O.value;
91
- return D.selectionMode === "multiple" ? Array.isArray(e) ? e : [] : e === null || Array.isArray(e) ? [] : [e];
92
- }), H = f(() => D.selectionMode === "multiple" ? B(new Set(V.value)) : /* @__PURE__ */ new Map());
93
- function U(e, t) {
94
- t(e), P(e)?.forEach((e) => {
95
- e.disabled || U(e, t);
89
+ let H = f(() => {
90
+ let e = k.value;
91
+ return O.selectionMode === "multiple" ? Array.isArray(e) ? e : [] : e === null || Array.isArray(e) ? [] : [e];
92
+ }), U = f(() => O.selectionMode === "multiple" ? V(new Set(H.value)) : /* @__PURE__ */ new Map());
93
+ function W(e, t) {
94
+ t(e), F(e)?.forEach((e) => {
95
+ e.disabled || W(e, t);
96
96
  });
97
97
  }
98
- function Te(e) {
99
- let t = H.value, n = /* @__PURE__ */ new Set();
98
+ function we(e) {
99
+ let t = U.value, n = /* @__PURE__ */ new Set();
100
100
  t.forEach((e, t) => {
101
101
  e === "true" && n.add(t);
102
102
  });
103
- let r = V.value.filter((e) => !t.has(e)), i = !1;
104
- if (U(e.item, (e) => {
105
- !P(e)?.length && t.get(e.value) !== "true" && (i = !0);
106
- }), U(e.item, (e) => {
107
- i ? P(e)?.length || n.add(e.value) : n.delete(e.value);
103
+ let r = H.value.filter((e) => !t.has(e)), i = !1;
104
+ if (W(e.item, (e) => {
105
+ !F(e)?.length && t.get(e.value) !== "true" && (i = !0);
106
+ }), W(e.item, (e) => {
107
+ i ? F(e)?.length || n.add(e.value) : n.delete(e.value);
108
108
  }), !i) for (let t = e.parent; t; t = t.parent) n.delete(t.item.value);
109
109
  let a = [];
110
- B(n).forEach((e, t) => {
110
+ V(n).forEach((e, t) => {
111
111
  e === "true" && a.push(t);
112
- }), O.value = [...a, ...r];
113
- }
114
- function W(e) {
115
- return D.selectionMode === "single" && V.value[0] === e.value;
112
+ }), k.value = [...a, ...r];
116
113
  }
117
114
  function G(e) {
115
+ return O.selectionMode === "single" && H.value[0] === e.value;
116
+ }
117
+ function K(e) {
118
118
  let { item: t } = e;
119
- D.selectionMode === "single" ? O.value = t.value : D.selectionMode === "multiple" ? Te(e) : t.href === void 0 && I(t) && z(t, !L.value.has(t.value));
119
+ O.selectionMode === "single" ? k.value = t.value : O.selectionMode === "multiple" ? we(e) : t.href === void 0 && L(t) && B(t, !R.value.has(t.value));
120
120
  }
121
- function K(e, t) {
122
- G(e), ve("activate", e.item, t);
121
+ function q(e, t) {
122
+ K(e), _e("activate", e.item, t);
123
123
  }
124
- async function Ee(e) {
125
- let t = D.loadChildren;
124
+ async function Te(e) {
125
+ let t = O.loadChildren;
126
126
  if (t) {
127
- M.add(e.value), N.delete(e.value);
127
+ N.add(e.value), P.delete(e.value);
128
128
  try {
129
- j.set(e.value, await t(e));
129
+ M.set(e.value, await t(e));
130
130
  } catch {
131
- N.add(e.value), z(e, !1), we(A.value.treeView.loadError(e.label), !1);
131
+ P.add(e.value), B(e, !1), Ce(j.value.treeView.loadError(e.label), !1);
132
132
  } finally {
133
- M.delete(e.value);
133
+ N.delete(e.value);
134
134
  }
135
135
  }
136
136
  }
137
- ae(() => {
138
- le([R, L], ([e, t]) => {
139
- for (let { item: n } of e) t.has(n.value) && F(n) && !M.has(n.value) && Ee(n);
137
+ oe(() => {
138
+ le([z, R], ([e, t]) => {
139
+ for (let { item: n } of e) t.has(n.value) && I(n) && !N.has(n.value) && Te(n);
140
140
  }, { immediate: !0 });
141
141
  });
142
- let q = S(null), J = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new WeakMap();
143
- function De(e, t) {
144
- t instanceof HTMLElement ? (J.set(e, t), Y.set(t, e)) : J.delete(e);
142
+ let J = x(null), Y = /* @__PURE__ */ new Map(), X = /* @__PURE__ */ new WeakMap();
143
+ function Ee(e, t) {
144
+ t instanceof HTMLElement ? (Y.set(e, t), X.set(t, e)) : Y.delete(e);
145
145
  }
146
- let Oe = S(null), X = f(() => {
147
- let e = R.value, t = new Set(e.map((e) => e.item.value));
148
- for (let e = Oe.value; e; e = e.parent) if (t.has(e.item.value)) return e.item.value;
149
- return ((D.selectionMode === "multiple" ? e.find((e) => H.value.get(e.item.value) === "true") : e.find((e) => W(e.item))) ?? e.find((e) => e.item.current) ?? e[0])?.item.value;
146
+ let De = x(null), Z = f(() => {
147
+ let e = z.value, t = new Set(e.map((e) => e.item.value));
148
+ for (let e = De.value; e; e = e.parent) if (t.has(e.item.value)) return e.item.value;
149
+ return ((O.selectionMode === "multiple" ? e.find((e) => U.value.get(e.item.value) === "true") : e.find((e) => G(e.item))) ?? e.find((e) => e.item.current) ?? e[0])?.item.value;
150
150
  });
151
- function ke(e) {
152
- let t = Y.get(e.target);
153
- t !== void 0 && (Oe.value = R.value.find((e) => e.item.value === t) ?? null);
151
+ function Oe(e) {
152
+ let t = X.get(e.target);
153
+ t !== void 0 && (De.value = z.value.find((e) => e.item.value === t) ?? null);
154
154
  }
155
- function Z(e) {
156
- e && J.get(e.item.value)?.focus();
155
+ function Q(e) {
156
+ e && Y.get(e.item.value)?.focus();
157
157
  }
158
- let Ae = te(), Q = "";
159
- function je(e, t) {
160
- Q += u(e), Ae.start(() => Q = "", 500);
161
- let n = R.value, r = [...Q].every((e) => e === Q[0]) ? Q[0] : Q, i = r.length === 1 ? t + 1 : t;
162
- for (let e = 0; e < n.length; e++) {
163
- let t = n[(i + e) % n.length];
164
- if (u(t.item.label).startsWith(r)) return Z(t);
165
- }
158
+ let { find: ke } = te();
159
+ function Ae(e, t) {
160
+ let n = z.value;
161
+ Q(n[ke(e, n.length, t, (e) => ee(n[e].item.label))]);
166
162
  }
167
- function Me(e) {
168
- let t = q.value, n = Y.get(e.target);
163
+ function je(e) {
164
+ let t = J.value, n = X.get(e.target);
169
165
  if (!t || n === void 0 || e.altKey || e.ctrlKey || e.metaKey) return;
170
- let i = R.value, a = i.findIndex((e) => e.item.value === n), o = i[a];
166
+ let i = z.value, a = i.findIndex((e) => e.item.value === n), o = i[a];
171
167
  if (!o) return;
172
- let { item: s } = o, c = L.value.has(s.value), l = r(t) ? "ArrowLeft" : "ArrowRight", ee = r(t) ? "ArrowRight" : "ArrowLeft";
168
+ let { item: s } = o, c = R.value.has(s.value), l = r(t) ? "ArrowLeft" : "ArrowRight", u = r(t) ? "ArrowRight" : "ArrowLeft";
173
169
  switch (e.key) {
174
170
  case "ArrowDown":
175
- Z(i[a + 1]);
171
+ Q(i[a + 1]);
176
172
  break;
177
173
  case "ArrowUp":
178
- Z(i[a - 1]);
174
+ Q(i[a - 1]);
179
175
  break;
180
176
  case "Home":
181
- Z(i[0]);
177
+ Q(i[0]);
182
178
  break;
183
179
  case "End":
184
- Z(i.at(-1));
180
+ Q(i.at(-1));
185
181
  break;
186
182
  case l:
187
- if (!I(s)) break;
188
- c ? i[a + 1]?.parent?.item === s && Z(i[a + 1]) : s.disabled || z(s, !0);
183
+ if (!L(s)) break;
184
+ c ? i[a + 1]?.parent?.item === s && Q(i[a + 1]) : s.disabled || B(s, !0);
189
185
  break;
190
- case ee:
191
- I(s) && c && !s.disabled ? z(s, !1) : Z(o.parent ?? void 0);
186
+ case u:
187
+ L(s) && c && !s.disabled ? B(s, !1) : Q(o.parent ?? void 0);
192
188
  break;
193
189
  case "Enter":
194
190
  if (s.href !== void 0) return;
195
- s.disabled || K(o, e);
191
+ s.disabled || q(o, e);
196
192
  break;
197
193
  case " ":
198
194
  if (s.disabled) break;
199
- s.href === void 0 ? K(o, e) : G(o);
195
+ s.href === void 0 ? q(o, e) : K(o);
200
196
  break;
201
197
  case "*": {
202
- let e = (o.parent ? P(o.parent.item) : D.items).filter((e) => !e.disabled && I(e)).map((e) => e.value).filter((e) => !L.value.has(e));
203
- e.length && (k.value = [...k.value, ...e]);
198
+ let e = (o.parent ? F(o.parent.item) : O.items).filter((e) => !e.disabled && L(e)).map((e) => e.value).filter((e) => !R.value.has(e));
199
+ e.length && (A.value = [...A.value, ...e]);
204
200
  break;
205
201
  }
206
202
  default:
207
203
  if (e.key.length !== 1 || e.key === " ") return;
208
- je(e.key, a);
204
+ Ae(e.key, a);
209
205
  }
210
206
  e.preventDefault();
211
207
  }
212
- function Ne(e, t) {
208
+ function Me(e, t) {
213
209
  if (e.item.disabled) {
214
210
  t.preventDefault();
215
211
  return;
216
212
  }
217
- K(e, t);
213
+ q(e, t);
218
214
  }
219
- function Pe(e, t) {
220
- t.preventDefault(), t.stopPropagation(), !e.item.disabled && I(e.item) && z(e.item, !L.value.has(e.item.value));
215
+ function Ne(e, t) {
216
+ t.preventDefault(), t.stopPropagation(), !e.item.disabled && L(e.item) && B(e.item, !R.value.has(e.item.value));
221
217
  }
222
218
  function $(e) {
223
219
  return {
224
220
  item: e.item,
225
221
  level: e.level,
226
- expanded: L.value.has(e.item.value) && !F(e.item)
222
+ expanded: R.value.has(e.item.value) && !I(e.item)
227
223
  };
228
224
  }
229
- function Fe(e) {
230
- return I(e) ? String(L.value.has(e.value)) : void 0;
225
+ function Pe(e) {
226
+ return L(e) ? String(R.value.has(e.value)) : void 0;
231
227
  }
232
- function Ie(e) {
228
+ function Fe(e) {
233
229
  if (e.current) return e.href === void 0 ? "true" : "page";
234
230
  }
235
231
  return v({
236
- focus: (e) => X.value !== void 0 && J.get(X.value)?.focus(e),
237
- el: q
238
- }), (e, r) => (x(), h("div", {
239
- class: ie(["v-tree-view", E(ye)]),
240
- style: b(E(be))
232
+ focus: (e) => Z.value !== void 0 && Y.get(Z.value)?.focus(e),
233
+ el: J
234
+ }), (e, r) => (b(), h("div", {
235
+ class: ie(["v-tree-view", T(ve)]),
236
+ style: ae(T(ye))
241
237
  }, [g("ul", y({
242
238
  ref_key: "treeEl",
243
- ref: q,
239
+ ref: J,
244
240
  class: "v-tree v-control",
245
241
  role: "tree",
246
242
  "data-size": _.size,
247
243
  "aria-multiselectable": _.selectionMode === "multiple" || void 0
248
- }, E(xe), {
249
- "aria-label": E(Se),
250
- onKeydown: Me,
251
- onFocusin: ke
252
- }), [(x(!0), h(d, null, oe(R.value, (r) => (x(), h("li", {
244
+ }, T(be), {
245
+ "aria-label": T(xe),
246
+ onKeydown: je,
247
+ onFocusin: Oe
248
+ }), [(b(!0), h(d, null, se(z.value, (r) => (b(), h("li", {
253
249
  key: r.item.value,
254
250
  class: "v-tree-node",
255
251
  role: "none"
256
- }, [(x(), p(se(r.item.href === void 0 ? "div" : "a"), {
252
+ }, [(b(), p(ce(r.item.href === void 0 ? "div" : "a"), {
257
253
  ref_for: !0,
258
- ref: (e) => De(r.item.value, e),
254
+ ref: (e) => Ee(r.item.value, e),
259
255
  class: "v-tree-row",
260
256
  role: "treeitem",
261
- style: b({ "--tree-level": r.level - 1 }),
257
+ style: ae({ "--tree-level": r.level - 1 }),
262
258
  href: r.item.disabled ? void 0 : r.item.href,
263
- tabindex: X.value === r.item.value ? 0 : -1,
259
+ tabindex: Z.value === r.item.value ? 0 : -1,
264
260
  "aria-level": r.level,
265
261
  "aria-setsize": r.setsize,
266
262
  "aria-posinset": r.posinset,
267
- "aria-expanded": Fe(r.item),
268
- "aria-selected": _.selectionMode === "single" ? String(W(r.item)) : void 0,
269
- "aria-checked": _.selectionMode === "multiple" ? H.value.get(r.item.value) : void 0,
270
- "aria-current": Ie(r.item),
263
+ "aria-expanded": Pe(r.item),
264
+ "aria-selected": _.selectionMode === "single" ? String(G(r.item)) : void 0,
265
+ "aria-checked": _.selectionMode === "multiple" ? U.value.get(r.item.value) : void 0,
266
+ "aria-current": Fe(r.item),
271
267
  "aria-disabled": r.item.disabled || void 0,
272
- "aria-busy": E(M).has(r.item.value) || void 0,
268
+ "aria-busy": T(N).has(r.item.value) || void 0,
273
269
  "data-current": r.item.current ? "" : void 0,
274
- onClick: (e) => Ne(r, e)
270
+ onClick: (e) => Me(r, e)
275
271
  }, {
276
272
  default: ue(() => [
277
273
  g("span", {
278
274
  class: "v-tree-toggle",
279
275
  "aria-hidden": "true",
280
- onClick: (e) => Pe(r, e)
281
- }, [E(M).has(r.item.value) ? (x(), p(i, { key: 0 })) : I(r.item) ? (x(), p(n, {
276
+ onClick: (e) => Ne(r, e)
277
+ }, [T(N).has(r.item.value) ? (b(), p(i, { key: 0 })) : L(r.item) ? (b(), p(n, {
282
278
  key: 1,
283
279
  class: "v-tree-chevron",
284
- name: E(s),
280
+ name: T(s),
285
281
  mirrored: ""
286
282
  }, null, 8, ["name"])) : m("", !0)], 8, fe),
287
- _.selectionMode === "multiple" ? (x(), p(c, { key: 0 })) : m("", !0),
288
- C(e.$slots, "icon", y({ ref_for: !0 }, $(r)), () => [r.item.icon ? (x(), p(n, y({
283
+ _.selectionMode === "multiple" ? (b(), p(c, { key: 0 })) : m("", !0),
284
+ S(e.$slots, "icon", y({ ref_for: !0 }, $(r)), () => [r.item.icon ? (b(), p(n, y({
289
285
  key: 0,
290
286
  class: "v-tree-icon"
291
- }, { ref_for: !0 }, E(t)(r.item.icon)), null, 16)) : m("", !0)]),
292
- g("span", pe, [C(e.$slots, "label", y({ ref_for: !0 }, $(r)), () => [ne(T(r.item.label), 1)])]),
293
- E(N).has(r.item.value) ? (x(), h(d, { key: 1 }, [re(n, {
287
+ }, { ref_for: !0 }, T(t)(r.item.icon)), null, 16)) : m("", !0)]),
288
+ g("span", pe, [S(e.$slots, "label", y({ ref_for: !0 }, $(r)), () => [ne(w(r.item.label), 1)])]),
289
+ T(P).has(r.item.value) ? (b(), h(d, { key: 1 }, [re(n, {
294
290
  class: "v-tree-error",
295
- name: E(l)
296
- }, null, 8, ["name"]), g("span", me, T(E(A).treeView.loadFailed), 1)], 64)) : m("", !0),
297
- e.$slots.end ? (x(), h("span", he, [C(e.$slots, "end", y({ ref_for: !0 }, $(r)))])) : m("", !0)
291
+ name: T(l)
292
+ }, null, 8, ["name"]), g("span", me, w(T(j).treeView.loadFailed), 1)], 64)) : m("", !0),
293
+ e.$slots.end ? (b(), h("span", he, [S(e.$slots, "end", y({ ref_for: !0 }, $(r)))])) : m("", !0)
298
294
  ]),
299
295
  _: 2
300
296
  }, 1032, [
@@ -312,10 +308,10 @@ var de = [
312
308
  "aria-busy",
313
309
  "data-current",
314
310
  "onClick"
315
- ]))]))), 128))], 16, de), g("div", ge, T(E(Ce)), 1)], 6));
311
+ ]))]))), 128))], 16, de), g("div", ge, w(T(Se)), 1)], 6));
316
312
  }
317
313
  });
318
314
  //#endregion
319
- export { _e as default };
315
+ export { D as default };
320
316
 
321
317
  //# sourceMappingURL=VTreeView.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VTreeView.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VTreeView/VTreeView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @keyboard @a11y @core\n/**\n * A hierarchy following the ARIA tree pattern. The rows are rendered flat, in display order, their\n * depth carried by `aria-level`, `aria-setsize` and `aria-posinset`: no native element folds a tree\n * with a single tab stop, and a row that does not wrap its subtree keeps its accessible name free of\n * its descendants' text. JavaScript owns the focus, the keyboard, selection and lazy loading.\n */\nimport { computed, onMounted, ref, shallowReactive, watch } from 'vue'\nimport type { ComponentPublicInstance } from 'vue'\n\nimport VCheckMark from '../VCheckbox/VCheckMark.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport VSpinner from '../VSpinner/VSpinner.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { chevron_right as chevronRightIcon } from '../VIcon/icons/chevron_right'\nimport { error as errorIcon } from '../VIcon/icons/error'\nimport type { IconSource } from '../VIcon/types'\nimport type { ItemValue } from '../../types'\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useLiveAnnouncer } from '../../composables/useLiveAnnouncer'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { useTimer } from '../../composables/useTimer'\nimport { useMessages } from '../../i18n/state'\nimport { isRtl } from '../../utils/direction'\nimport { normalizeText } from '../../utils/text'\n\n/** Whether nodes can be selected: not at all, one at a time, or several with checkboxes. */\nexport type TreeSelectionMode = 'none' | 'single' | 'multiple'\n\n/** The height of the rows: 32 or 40 pixels. */\nexport type TreeViewSize = 'sm' | 'md'\n\n/**\n * What is selected, and its shape follows `selectionMode`: a single value (or `null`) in `single`\n * mode, an array in `multiple` mode.\n */\nexport type TreeViewModelValue = ItemValue | ItemValue[] | null\n\n/** One node of the tree. */\nexport interface TreeItem {\n /** What identifies the node, in the selection and expansion models. Unique across the tree. */\n value: ItemValue\n /** What the row says. It is also what typeahead matches. */\n label: string\n /** An icon before the label: an icon name, or an explicit render. */\n icon?: IconSource\n /** The child nodes, which make this node a branch. */\n children?: TreeItem[]\n /**\n * Marks a branch whose children `loadChildren` fetches on its first expansion. Ignored when\n * `children` is set or when the tree has no `loadChildren`.\n */\n lazy?: boolean\n /** Where the node leads, which makes the row a link. */\n href?: string\n /** Marks the node as the page being viewed (`aria-current`). */\n current?: boolean\n /**\n * Keeps the node focusable, so it is still found, but it cannot be selected, activated, expanded\n * or collapsed.\n */\n disabled?: boolean\n}\n\n/** What the `#icon`, `#label` and `#end` slots receive. */\nexport interface TreeItemSlotProps {\n item: TreeItem\n /** The depth of the node, from 1. */\n level: number\n /** Whether the node's children are shown. */\n expanded: boolean\n}\n\ntype CheckState = 'true' | 'false' | 'mixed'\n\ninterface TreeNode {\n item: TreeItem\n level: number\n parent: TreeNode | null\n posinset: number\n setsize: number\n}\n\ninterface TreeViewProps {\n /** The first level of the tree. */\n items: TreeItem[]\n /**\n * Whether nodes can be selected. In `multiple` mode each row has a checkbox, and checking a\n * branch checks everything under it.\n */\n selectionMode?: TreeSelectionMode\n /**\n * Fetches the children of a `lazy` node, on its first expansion. The tree keeps them; a failure\n * collapses the node again, and the next expansion retries.\n */\n loadChildren?: (item: TreeItem) => Promise<TreeItem[]>\n /** The height of the rows, 32 or 40 pixels. */\n size?: TreeViewSize\n /** What screen readers announce for the tree. It falls back to the design system dictionary. */\n label?: string\n}\n\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TreeViewProps>(), {\n selectionMode: 'none',\n loadChildren: undefined,\n size: 'md',\n label: undefined,\n})\n\n/**\n * What is selected. In `single` mode, a value or `null`; in `multiple` mode, the checked nodes in\n * tree order, a branch included when everything under it is checked. A value given for a branch\n * checks its whole subtree. A shape that does not match the mode reads as an empty selection.\n */\nconst model = defineModel<TreeViewModelValue>({ default: null })\n\n/** The values of the expanded nodes. Left unbound, the tree keeps that state itself. */\nconst expanded = defineModel<ItemValue[]>('expanded', { default: () => [] })\n\nconst emit = defineEmits<{\n /**\n * A node was clicked or Enter was pressed on it, after the tree applied its own effect: selecting\n * it, checking it, or folding a branch in `none` mode. For a link, calling `preventDefault()` on\n * the event stops the navigation, which hands it to a router.\n */\n activate: [item: TreeItem, event: MouseEvent | KeyboardEvent]\n}>()\n\ndefineSlots<{\n /** Replaces the icon of a node, for instance to show an open folder when it is expanded. */\n icon?(props: TreeItemSlotProps): unknown\n /** Replaces the label of a node. */\n label?(props: TreeItemSlotProps): unknown\n /**\n * Content at the end of a row: a count, a badge. It must not be focusable: a row is a single\n * control.\n */\n end?(props: TreeItemSlotProps): unknown\n}>()\n\nconst { rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\nconst m = useMessages()\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.treeView.label)\nconst { polite: announcement, announce } = useLiveAnnouncer()\n\nconst loaded = shallowReactive(new Map<ItemValue, TreeItem[]>())\nconst loading = shallowReactive(new Set<ItemValue>())\nconst failed = shallowReactive(new Set<ItemValue>())\n\nfunction childrenOf(item: TreeItem): TreeItem[] | undefined {\n return item.children ?? loaded.get(item.value)\n}\n\nfunction isPending(item: TreeItem): boolean {\n return !!props.loadChildren && !!item.lazy && !item.children && !loaded.has(item.value)\n}\n\nfunction isBranch(item: TreeItem): boolean {\n return !!childrenOf(item)?.length || isPending(item)\n}\n\nconst expandedSet = computed(() => new Set(expanded.value))\n\n/** The rows on screen, in display order: every node whose ancestors are all expanded. */\nconst visible = computed(() => {\n const rows: TreeNode[] = []\n const walk = (items: TreeItem[], level: number, parent: TreeNode | null) => {\n items.forEach((item, index) => {\n const node = { item, level, parent, posinset: index + 1, setsize: items.length }\n rows.push(node)\n const children = childrenOf(item)\n if (children && expandedSet.value.has(item.value)) walk(children, level + 1, node)\n })\n }\n walk(props.items, 1, null)\n return rows\n})\n\nfunction setExpanded(item: TreeItem, open: boolean) {\n if (open === expandedSet.value.has(item.value)) return\n expanded.value = open\n ? [...expanded.value, item.value]\n : expanded.value.filter((value) => value !== item.value)\n}\n\n// @core\n/**\n * Derives what each checkbox shows. A value in the selection checks its node and the whole subtree\n * under it; a branch then shows checked when all its children are, unchecked when none are, and\n * mixed otherwise, so its own presence in the selection only matters through its children. The map\n * is filled in tree order, which is the order the model is written in.\n */\nfunction deriveCheckStates(chosen: Set<ItemValue>): Map<ItemValue, CheckState> {\n const states = new Map<ItemValue, CheckState>()\n const visit = (item: TreeItem, inherited: boolean): CheckState => {\n states.set(item.value, 'false')\n const own = inherited || chosen.has(item.value)\n const children = childrenOf(item)\n let state: CheckState = own ? 'true' : 'false'\n if (children?.length) {\n const childStates = children.map((child) => visit(child, own))\n state = childStates.every((s) => s === 'true')\n ? 'true'\n : childStates.every((s) => s === 'false')\n ? 'false'\n : 'mixed'\n }\n states.set(item.value, state)\n return state\n }\n props.items.forEach((item) => visit(item, false))\n return states\n}\n\nconst chosenValues = computed<ItemValue[]>(() => {\n const value = model.value\n if (props.selectionMode === 'multiple') return Array.isArray(value) ? value : []\n return value === null || Array.isArray(value) ? [] : [value]\n})\n\nconst checkStates = computed(() =>\n props.selectionMode === 'multiple'\n ? deriveCheckStates(new Set(chosenValues.value))\n : new Map<ItemValue, CheckState>(),\n)\n\n/** Calls `fn` on a node and on every node under it that is not disabled. */\nfunction eachEnabled(item: TreeItem, fn: (item: TreeItem) => void) {\n fn(item)\n childrenOf(item)?.forEach((child) => {\n if (!child.disabled) eachEnabled(child, fn)\n })\n}\n\n// @core\n/**\n * Checks a node and its subtree when any leaf of it is unchecked, and unchecks them otherwise.\n * Disabled nodes keep their state. Unchecking also drops the ancestors, which would otherwise check\n * the node again through their subtree. Values the tree does not know, such as the children of a\n * node not loaded yet, are kept at the end.\n */\nfunction toggleCheck(node: TreeNode) {\n const states = checkStates.value\n const chosen = new Set<ItemValue>()\n states.forEach((state, value) => {\n if (state === 'true') chosen.add(value)\n })\n const unknown = chosenValues.value.filter((value) => !states.has(value))\n\n let check = false\n eachEnabled(node.item, (item) => {\n if (!childrenOf(item)?.length && states.get(item.value) !== 'true') check = true\n })\n // Only the leaves are added: a branch in the selection would check its disabled children too.\n eachEnabled(node.item, (item) => {\n if (!check) chosen.delete(item.value)\n else if (!childrenOf(item)?.length) chosen.add(item.value)\n })\n if (!check) for (let p = node.parent; p; p = p.parent) chosen.delete(p.item.value)\n\n const next: ItemValue[] = []\n deriveCheckStates(chosen).forEach((state, value) => {\n if (state === 'true') next.push(value)\n })\n model.value = [...next, ...unknown]\n}\n\nfunction isSelected(item: TreeItem): boolean {\n return props.selectionMode === 'single' && chosenValues.value[0] === item.value\n}\n\n// @core\n/** What a click or Enter does besides the `activate` event, which follows it. */\nfunction applyDefault(node: TreeNode) {\n const { item } = node\n if (props.selectionMode === 'single') model.value = item.value\n else if (props.selectionMode === 'multiple') toggleCheck(node)\n else if (item.href === undefined && isBranch(item))\n setExpanded(item, !expandedSet.value.has(item.value))\n}\n\nfunction activate(node: TreeNode, event: MouseEvent | KeyboardEvent) {\n applyDefault(node)\n emit('activate', node.item, event)\n}\n\nasync function load(item: TreeItem) {\n const loader = props.loadChildren\n if (!loader) return\n loading.add(item.value)\n failed.delete(item.value)\n try {\n loaded.set(item.value, await loader(item))\n } catch {\n failed.add(item.value)\n setExpanded(item, false)\n announce(m.value.treeView.loadError(item.label), false)\n } finally {\n loading.delete(item.value)\n }\n}\n\n// @ssr\n// Loading waits for the client: an expanded lazy node renders busy on the server, then fetches.\nonMounted(() => {\n // The expanded set is watched too: a pending node shows no children, so its expansion alone\n // does not change the rows.\n watch(\n [visible, expandedSet],\n ([rows, open]) => {\n for (const { item } of rows)\n if (open.has(item.value) && isPending(item) && !loading.has(item.value)) void load(item)\n },\n { immediate: true },\n )\n})\n\nconst treeEl = ref<HTMLElement | null>(null)\nconst rowEls = new Map<ItemValue, HTMLElement>()\nconst rowValues = new WeakMap<Element, ItemValue>()\n\nfunction bindRow(value: ItemValue, el: Element | ComponentPublicInstance | null) {\n if (el instanceof HTMLElement) {\n rowEls.set(value, el)\n rowValues.set(el, value)\n } else rowEls.delete(value)\n}\n\n// @keyboard @a11y\n/**\n * The single tab stop: the node last focused, or its closest ancestor still on screen once a\n * branch above it folds; before any focus, the first selected node on screen, then the current\n * one, then the first row.\n */\nconst active = ref<TreeNode | null>(null)\nconst tabStop = computed<ItemValue | undefined>(() => {\n const rows = visible.value\n const shown = new Set(rows.map((node) => node.item.value))\n for (let node = active.value; node; node = node.parent)\n if (shown.has(node.item.value)) return node.item.value\n const selected =\n props.selectionMode === 'multiple'\n ? rows.find((node) => checkStates.value.get(node.item.value) === 'true')\n : rows.find((node) => isSelected(node.item))\n return (selected ?? rows.find((node) => node.item.current) ?? rows[0])?.item.value\n})\n\nfunction onFocusin(event: FocusEvent) {\n const value = rowValues.get(event.target as Element)\n if (value === undefined) return\n active.value = visible.value.find((node) => node.item.value === value) ?? null\n}\n\nfunction focusRow(node: TreeNode | undefined) {\n if (node) rowEls.get(node.item.value)?.focus()\n}\n\nconst typeahead = useTimer()\nlet typed = ''\n\n// @keyboard\n/**\n * Moves to the next row whose label starts with what was typed in the last half-second. Repeating\n * one letter cycles through the rows starting with it.\n */\nfunction typeTo(char: string, index: number) {\n typed += normalizeText(char)\n typeahead.start(() => (typed = ''), 500)\n const rows = visible.value\n const needle = [...typed].every((c) => c === typed[0]) ? typed[0]! : typed\n const start = needle.length === 1 ? index + 1 : index\n for (let i = 0; i < rows.length; i++) {\n const node = rows[(start + i) % rows.length]!\n if (normalizeText(node.item.label).startsWith(needle)) return focusRow(node)\n }\n}\n\n// @keyboard @a11y\nfunction onKeydown(event: KeyboardEvent) {\n const tree = treeEl.value\n const value = rowValues.get(event.target as Element)\n if (!tree || value === undefined || event.altKey || event.ctrlKey || event.metaKey) return\n const rows = visible.value\n const index = rows.findIndex((node) => node.item.value === value)\n const node = rows[index]\n if (!node) return\n const { item } = node\n const isOpen = expandedSet.value.has(item.value)\n const forward = isRtl(tree) ? 'ArrowLeft' : 'ArrowRight'\n const back = isRtl(tree) ? 'ArrowRight' : 'ArrowLeft'\n\n switch (event.key) {\n case 'ArrowDown':\n focusRow(rows[index + 1])\n break\n case 'ArrowUp':\n focusRow(rows[index - 1])\n break\n case 'Home':\n focusRow(rows[0])\n break\n case 'End':\n focusRow(rows.at(-1))\n break\n case forward:\n if (!isBranch(item)) break\n if (!isOpen) {\n if (!item.disabled) setExpanded(item, true)\n } else if (rows[index + 1]?.parent?.item === item) focusRow(rows[index + 1])\n break\n case back:\n if (isBranch(item) && isOpen && !item.disabled) setExpanded(item, false)\n else focusRow(node.parent ?? undefined)\n break\n case 'Enter':\n // A link follows itself: the browser turns Enter into a click, which lands in onRowClick.\n if (item.href !== undefined) return\n if (!item.disabled) activate(node, event)\n break\n case ' ':\n // Space selects without following a link, as it does nothing on a link natively.\n if (item.disabled) break\n if (item.href !== undefined) applyDefault(node)\n else activate(node, event)\n break\n case '*': {\n const siblings = node.parent ? childrenOf(node.parent.item)! : props.items\n const closed = siblings\n .filter((sibling) => !sibling.disabled && isBranch(sibling))\n .map((sibling) => sibling.value)\n .filter((sibling) => !expandedSet.value.has(sibling))\n if (closed.length) expanded.value = [...expanded.value, ...closed]\n break\n }\n default:\n if (event.key.length !== 1 || event.key === ' ') return\n typeTo(event.key, index)\n }\n event.preventDefault()\n}\n\nfunction onRowClick(node: TreeNode, event: MouseEvent) {\n // An inert link has no address left to follow; this also covers a click on its children.\n if (node.item.disabled) {\n event.preventDefault()\n return\n }\n activate(node, event)\n}\n\n// The chevron folds without selecting, and without following the link it sits in.\nfunction onChevronClick(node: TreeNode, event: MouseEvent) {\n event.preventDefault()\n event.stopPropagation()\n if (!node.item.disabled && isBranch(node.item))\n setExpanded(node.item, !expandedSet.value.has(node.item.value))\n}\n\nfunction slotProps(node: TreeNode): TreeItemSlotProps {\n return {\n item: node.item,\n level: node.level,\n expanded: expandedSet.value.has(node.item.value) && !isPending(node.item),\n }\n}\n\nfunction ariaExpanded(item: TreeItem) {\n return isBranch(item) ? String(expandedSet.value.has(item.value)) : undefined\n}\n\nfunction ariaCurrent(item: TreeItem) {\n if (!item.current) return undefined\n return item.href !== undefined ? 'page' : 'true'\n}\n\n// The root is a wrapper holding the live region, which a tree may not contain: these two reach\n// the tree itself.\ndefineExpose({\n /** Moves the focus to the tree's tab stop: the last focused node, else the selected or current one. */\n focus: (options?: FocusOptions) =>\n tabStop.value !== undefined && rowEls.get(tabStop.value)?.focus(options),\n /** The `role=\"tree\"` element, which also receives the consumer's attributes. */\n el: treeEl,\n})\n</script>\n\n<template>\n <div class=\"v-tree-view\" :class=\"rootClass\" :style=\"rootStyle\">\n <ul\n ref=\"treeEl\"\n class=\"v-tree v-control\"\n role=\"tree\"\n :data-size=\"size\"\n :aria-multiselectable=\"selectionMode === 'multiple' || undefined\"\n v-bind=\"forwardedAttrs\"\n :aria-label=\"ariaLabel\"\n @keydown=\"onKeydown\"\n @focusin=\"onFocusin\"\n >\n <li v-for=\"node in visible\" :key=\"node.item.value\" class=\"v-tree-node\" role=\"none\">\n <component\n :is=\"node.item.href !== undefined ? 'a' : 'div'\"\n :ref=\"(el: Element | ComponentPublicInstance | null) => bindRow(node.item.value, el)\"\n class=\"v-tree-row\"\n role=\"treeitem\"\n :style=\"{ '--tree-level': node.level - 1 }\"\n :href=\"node.item.disabled ? undefined : node.item.href\"\n :tabindex=\"tabStop === node.item.value ? 0 : -1\"\n :aria-level=\"node.level\"\n :aria-setsize=\"node.setsize\"\n :aria-posinset=\"node.posinset\"\n :aria-expanded=\"ariaExpanded(node.item)\"\n :aria-selected=\"selectionMode === 'single' ? String(isSelected(node.item)) : undefined\"\n :aria-checked=\"\n selectionMode === 'multiple' ? checkStates.get(node.item.value) : undefined\n \"\n :aria-current=\"ariaCurrent(node.item)\"\n :aria-disabled=\"node.item.disabled || undefined\"\n :aria-busy=\"loading.has(node.item.value) || undefined\"\n :data-current=\"node.item.current ? '' : undefined\"\n @click=\"onRowClick(node, $event)\"\n >\n <!-- Decorative: the row is the control, and the arrows fold it. -->\n <span class=\"v-tree-toggle\" aria-hidden=\"true\" @click=\"onChevronClick(node, $event)\">\n <VSpinner v-if=\"loading.has(node.item.value)\" />\n <VIcon\n v-else-if=\"isBranch(node.item)\"\n class=\"v-tree-chevron\"\n :name=\"chevronRightIcon\"\n mirrored\n />\n </span>\n <VCheckMark v-if=\"selectionMode === 'multiple'\" />\n <slot name=\"icon\" v-bind=\"slotProps(node)\">\n <VIcon v-if=\"node.item.icon\" class=\"v-tree-icon\" v-bind=\"iconProps(node.item.icon)\" />\n </slot>\n <span class=\"v-tree-label\"\n ><slot name=\"label\" v-bind=\"slotProps(node)\">{{ node.item.label }}</slot></span\n >\n <template v-if=\"failed.has(node.item.value)\">\n <VIcon class=\"v-tree-error\" :name=\"errorIcon\" />\n <span class=\"v-visually-hidden\">{{ m.treeView.loadFailed }}</span>\n </template>\n <span v-if=\"$slots.end\" class=\"v-tree-end\"\n ><slot name=\"end\" v-bind=\"slotProps(node)\"\n /></span>\n </component>\n </li>\n </ul>\n <div class=\"v-visually-hidden\" role=\"status\" aria-live=\"polite\">{{ announcement }}</div>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-tree {\n /* One level of indentation puts a child's chevron under its parent's icon. */\n --tree-indent: calc(var(--vectis-icon-size) + var(--control-gap));\n\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n list-style: none;\n font-family: var(--vectis-text-family);\n }\n\n .v-tree-row {\n /* See VSideNavigation: the radius cannot exceed half the height of a single row. */\n --tree-row-radius: min(var(--vectis-radius-interactive), calc(var(--control-height) / 2));\n\n display: flex;\n align-items: center;\n gap: var(--control-gap);\n min-block-size: var(--control-height);\n padding-block: var(--vectis-space-1);\n padding-inline: calc(var(--vectis-space-2) + var(--tree-level, 0) * var(--tree-indent))\n var(--vectis-space-2);\n border-radius: var(--tree-row-radius);\n color: var(--vectis-color-text);\n font-size: var(--control-font-size);\n font-weight: var(--vectis-text-body-md-weight);\n line-height: var(--vectis-text-body-md-leading);\n text-decoration: none;\n cursor: pointer;\n user-select: none;\n }\n\n .v-tree-row:hover:not([aria-disabled='true']) {\n background: var(--vectis-color-surface-muted);\n }\n\n /* Drawn inwards, so that neighbouring rows cannot cover it. */\n .v-tree-row:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: calc(-1 * var(--vectis-focus-ring-width));\n }\n\n .v-tree-row:is([aria-selected='true'], [data-current]) {\n background: var(--vectis-color-accent-surface);\n color: var(--vectis-color-accent-text);\n }\n\n /* The selected row is already tinted, so its hover deepens that tint; the VMenuItem idiom. */\n .v-tree-row:is([aria-selected='true'], [data-current]):hover:not([aria-disabled='true']) {\n background: color-mix(\n in oklab,\n var(--vectis-color-accent-surface),\n var(--vectis-color-accent-text) 8%\n );\n }\n\n .v-tree-row:is([aria-selected='true'], [data-current]) :is(.v-tree-icon, .v-tree-toggle) {\n color: inherit;\n }\n\n .v-tree-row[data-current] .v-tree-label {\n font-weight: var(--vectis-text-label-weight);\n }\n\n .v-tree-toggle {\n display: inline-grid;\n flex: none;\n place-items: center;\n inline-size: var(--vectis-icon-size);\n block-size: var(--vectis-icon-size);\n color: var(--vectis-color-text-muted);\n }\n\n .v-tree-chevron {\n transition: rotate var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-tree-row[aria-expanded='true'] .v-tree-chevron {\n rotate: 90deg;\n }\n\n /* The mirrored chevron points left, and turns the other way to point down. */\n .v-tree-row[aria-expanded='true'] .v-tree-chevron:dir(rtl) {\n rotate: -90deg;\n }\n\n .v-tree-icon {\n flex: none;\n color: var(--vectis-color-text-muted);\n }\n\n .v-tree-label {\n flex: 1;\n min-inline-size: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .v-tree-end {\n flex: none;\n display: flex;\n align-items: center;\n gap: var(--vectis-space-1);\n color: var(--vectis-color-text-muted);\n }\n\n .v-tree-error {\n flex: none;\n color: var(--vectis-color-danger-text);\n }\n\n .v-tree-row:is([aria-checked='true'], [aria-checked='mixed']) .v-check-mark {\n background: var(--vectis-color-accent);\n border-color: var(--vectis-color-accent);\n }\n\n .v-tree-row[aria-checked='true'] .v-check-mark-tick,\n .v-tree-row[aria-checked='mixed'] .v-check-mark-dash {\n opacity: 1;\n }\n\n /* Last of the colour rules, so that a disabled node reads as such whatever its state. */\n .v-tree-row[aria-disabled='true'] {\n color: var(--vectis-color-text-subtle);\n cursor: not-allowed;\n }\n\n .v-tree-row[aria-disabled='true'] :is(.v-tree-icon, .v-tree-toggle, .v-tree-end) {\n color: inherit;\n }\n\n .v-tree-row[aria-disabled='true'] .v-check-mark {\n background: var(--vectis-color-surface-muted);\n border-color: var(--vectis-color-border);\n color: var(--vectis-color-text-subtle);\n }\n\n /*\n * Forced colours flatten the tint of the selected row: it takes the system selection pair,\n * repeated to (0,4,0) above its own hover.\n */\n @media (forced-colors: active) {\n .v-tree-row.v-tree-row:is([aria-selected='true'], [data-current]):not([aria-disabled='true']) {\n forced-color-adjust: none;\n background: Highlight;\n color: HighlightText;\n }\n\n .v-tree-row:is([aria-checked='true'], [aria-checked='mixed']):not([aria-disabled='true'])\n .v-check-mark {\n forced-color-adjust: none;\n background: Highlight;\n border-color: Highlight;\n color: HighlightText;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .v-tree-chevron {\n transition: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyGA,IAAM,IAAQ,GAYR,IAAQ,GAA+B,GAAA,YAAkB,GAGzD,IAAW,GAAwB,GAAC,UAAiC,GAErE,KAAO,IAqBP,EAAE,eAAW,eAAW,uBAAmB,EAAa,GACxD,IAAI,EAAY,GAChB,KAAY,QAAmB,EAAM,SAAS,EAAE,MAAM,SAAS,KAAK,GACpE,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wE,EAAA,SAAA,GAAA,GAA7C,EAAU,CAAI,CAAA,SAA+B,CAAA,GAAA,EAAzB,EAAK,KAAK,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IAEjD,EAAA,CAAA,CAAM,CAAC,IAAI,EAAK,KAAK,KAAK,KAAA,EAAA,GAA1C,EAGW,GAAA,EAAA,KAAA,EAAA,GAAA,CAFT,GAAgD,GAAA;KAAzC,OAAM;KAAgB,MAAM,EAAA,CAAA;2BACnC,EAAkE,QAAlE,IAAkE,EAA/B,EAAA,CAAA,CAAC,CAAC,SAAS,UAAU,GAAA,CAAA,CAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA;IAE9CA,EAAAA,OAAO,OAAA,EAAA,GAAnB,EAES,QAFT,IAES,CADN,EACD,EAAA,QAAA,OADC,EACD,EAAA,SAAA,GAAA,GAD0B,EAAU,CAAI,CAAA,CAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA;;;;;;;;;;;;;;;;;;4BAKhD,EAAwF,OAAxF,IAAwF,EAArB,EAAA,EAAA,CAAY,GAAA,CAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"VTreeView.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/VTreeView/VTreeView.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// @keyboard @a11y @core\n/**\n * A hierarchy following the ARIA tree pattern. The rows are rendered flat, in display order, their\n * depth carried by `aria-level`, `aria-setsize` and `aria-posinset`: no native element folds a tree\n * with a single tab stop, and a row that does not wrap its subtree keeps its accessible name free of\n * its descendants' text. JavaScript owns the focus, the keyboard, selection and lazy loading.\n */\nimport { computed, onMounted, ref, shallowReactive, watch } from 'vue'\nimport type { ComponentPublicInstance } from 'vue'\n\nimport VCheckMark from '../VCheckbox/VCheckMark.vue'\nimport VIcon from '../VIcon/VIcon.vue'\nimport VSpinner from '../VSpinner/VSpinner.vue'\nimport { iconProps } from '../VIcon/iconProps'\nimport { chevron_right as chevronRightIcon } from '../VIcon/icons/chevron_right'\nimport { error as errorIcon } from '../VIcon/icons/error'\nimport type { IconSource } from '../VIcon/types'\nimport type { ItemValue } from '../../types'\nimport { useAriaLabel } from '../../composables/useAriaLabel'\nimport { useLiveAnnouncer } from '../../composables/useLiveAnnouncer'\nimport { useRootAttrs } from '../../composables/useRootAttrs'\nimport { useTypeahead } from '../../composables/useTypeahead'\nimport { useMessages } from '../../i18n/state'\nimport { isRtl } from '../../utils/direction'\nimport { normalizeText } from '../../utils/text'\n\n/** Whether nodes can be selected: not at all, one at a time, or several with checkboxes. */\nexport type TreeSelectionMode = 'none' | 'single' | 'multiple'\n\n/** The height of the rows: 32 or 40 pixels. */\nexport type TreeViewSize = 'sm' | 'md'\n\n/**\n * What is selected, and its shape follows `selectionMode`: a single value (or `null`) in `single`\n * mode, an array in `multiple` mode.\n */\nexport type TreeViewModelValue = ItemValue | ItemValue[] | null\n\n/** One node of the tree. */\nexport interface TreeItem {\n /** What identifies the node, in the selection and expansion models. Unique across the tree. */\n value: ItemValue\n /** What the row says. It is also what typeahead matches. */\n label: string\n /** An icon before the label: an icon name, or an explicit render. */\n icon?: IconSource\n /** The child nodes, which make this node a branch. */\n children?: TreeItem[]\n /**\n * Marks a branch whose children `loadChildren` fetches on its first expansion. Ignored when\n * `children` is set or when the tree has no `loadChildren`.\n */\n lazy?: boolean\n /** Where the node leads, which makes the row a link. */\n href?: string\n /** Marks the node as the page being viewed (`aria-current`). */\n current?: boolean\n /**\n * Keeps the node focusable, so it is still found, but it cannot be selected, activated, expanded\n * or collapsed.\n */\n disabled?: boolean\n}\n\n/** What the `#icon`, `#label` and `#end` slots receive. */\nexport interface TreeItemSlotProps {\n item: TreeItem\n /** The depth of the node, from 1. */\n level: number\n /** Whether the node's children are shown. */\n expanded: boolean\n}\n\ntype CheckState = 'true' | 'false' | 'mixed'\n\ninterface TreeNode {\n item: TreeItem\n level: number\n parent: TreeNode | null\n posinset: number\n setsize: number\n}\n\ninterface TreeViewProps {\n /** The first level of the tree. */\n items: TreeItem[]\n /**\n * Whether nodes can be selected. In `multiple` mode each row has a checkbox, and checking a\n * branch checks everything under it.\n */\n selectionMode?: TreeSelectionMode\n /**\n * Fetches the children of a `lazy` node, on its first expansion. The tree keeps them; a failure\n * collapses the node again, and the next expansion retries.\n */\n loadChildren?: (item: TreeItem) => Promise<TreeItem[]>\n /** The height of the rows, 32 or 40 pixels. */\n size?: TreeViewSize\n /** What screen readers announce for the tree. It falls back to the design system dictionary. */\n label?: string\n}\n\ndefineOptions({ inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TreeViewProps>(), {\n selectionMode: 'none',\n loadChildren: undefined,\n size: 'md',\n label: undefined,\n})\n\n/**\n * What is selected. In `single` mode, a value or `null`; in `multiple` mode, the checked nodes in\n * tree order, a branch included when everything under it is checked. A value given for a branch\n * checks its whole subtree. A shape that does not match the mode reads as an empty selection.\n */\nconst model = defineModel<TreeViewModelValue>({ default: null })\n\n/** The values of the expanded nodes. Left unbound, the tree keeps that state itself. */\nconst expanded = defineModel<ItemValue[]>('expanded', { default: () => [] })\n\nconst emit = defineEmits<{\n /**\n * A node was clicked or Enter was pressed on it, after the tree applied its own effect: selecting\n * it, checking it, or folding a branch in `none` mode. For a link, calling `preventDefault()` on\n * the event stops the navigation, which hands it to a router.\n */\n activate: [item: TreeItem, event: MouseEvent | KeyboardEvent]\n}>()\n\ndefineSlots<{\n /** Replaces the icon of a node, for instance to show an open folder when it is expanded. */\n icon?(props: TreeItemSlotProps): unknown\n /** Replaces the label of a node. */\n label?(props: TreeItemSlotProps): unknown\n /**\n * Content at the end of a row: a count, a badge. It must not be focusable: a row is a single\n * control.\n */\n end?(props: TreeItemSlotProps): unknown\n}>()\n\nconst { rootClass, rootStyle, forwardedAttrs } = useRootAttrs()\nconst m = useMessages()\nconst ariaLabel = useAriaLabel(() => props.label ?? m.value.treeView.label)\nconst { polite: announcement, announce } = useLiveAnnouncer()\n\nconst loaded = shallowReactive(new Map<ItemValue, TreeItem[]>())\nconst loading = shallowReactive(new Set<ItemValue>())\nconst failed = shallowReactive(new Set<ItemValue>())\n\nfunction childrenOf(item: TreeItem): TreeItem[] | undefined {\n return item.children ?? loaded.get(item.value)\n}\n\nfunction isPending(item: TreeItem): boolean {\n return !!props.loadChildren && !!item.lazy && !item.children && !loaded.has(item.value)\n}\n\nfunction isBranch(item: TreeItem): boolean {\n return !!childrenOf(item)?.length || isPending(item)\n}\n\nconst expandedSet = computed(() => new Set(expanded.value))\n\n/** The rows on screen, in display order: every node whose ancestors are all expanded. */\nconst visible = computed(() => {\n const rows: TreeNode[] = []\n const walk = (items: TreeItem[], level: number, parent: TreeNode | null) => {\n items.forEach((item, index) => {\n const node = { item, level, parent, posinset: index + 1, setsize: items.length }\n rows.push(node)\n const children = childrenOf(item)\n if (children && expandedSet.value.has(item.value)) walk(children, level + 1, node)\n })\n }\n walk(props.items, 1, null)\n return rows\n})\n\nfunction setExpanded(item: TreeItem, open: boolean) {\n if (open === expandedSet.value.has(item.value)) return\n expanded.value = open\n ? [...expanded.value, item.value]\n : expanded.value.filter((value) => value !== item.value)\n}\n\n// @core\n/**\n * Derives what each checkbox shows. A value in the selection checks its node and the whole subtree\n * under it; a branch then shows checked when all its children are, unchecked when none are, and\n * mixed otherwise, so its own presence in the selection only matters through its children. The map\n * is filled in tree order, which is the order the model is written in.\n */\nfunction deriveCheckStates(chosen: Set<ItemValue>): Map<ItemValue, CheckState> {\n const states = new Map<ItemValue, CheckState>()\n const visit = (item: TreeItem, inherited: boolean): CheckState => {\n states.set(item.value, 'false')\n const own = inherited || chosen.has(item.value)\n const children = childrenOf(item)\n let state: CheckState = own ? 'true' : 'false'\n if (children?.length) {\n const childStates = children.map((child) => visit(child, own))\n state = childStates.every((s) => s === 'true')\n ? 'true'\n : childStates.every((s) => s === 'false')\n ? 'false'\n : 'mixed'\n }\n states.set(item.value, state)\n return state\n }\n props.items.forEach((item) => visit(item, false))\n return states\n}\n\nconst chosenValues = computed<ItemValue[]>(() => {\n const value = model.value\n if (props.selectionMode === 'multiple') return Array.isArray(value) ? value : []\n return value === null || Array.isArray(value) ? [] : [value]\n})\n\nconst checkStates = computed(() =>\n props.selectionMode === 'multiple'\n ? deriveCheckStates(new Set(chosenValues.value))\n : new Map<ItemValue, CheckState>(),\n)\n\n/** Calls `fn` on a node and on every node under it that is not disabled. */\nfunction eachEnabled(item: TreeItem, fn: (item: TreeItem) => void) {\n fn(item)\n childrenOf(item)?.forEach((child) => {\n if (!child.disabled) eachEnabled(child, fn)\n })\n}\n\n// @core\n/**\n * Checks a node and its subtree when any leaf of it is unchecked, and unchecks them otherwise.\n * Disabled nodes keep their state. Unchecking also drops the ancestors, which would otherwise check\n * the node again through their subtree. Values the tree does not know, such as the children of a\n * node not loaded yet, are kept at the end.\n */\nfunction toggleCheck(node: TreeNode) {\n const states = checkStates.value\n const chosen = new Set<ItemValue>()\n states.forEach((state, value) => {\n if (state === 'true') chosen.add(value)\n })\n const unknown = chosenValues.value.filter((value) => !states.has(value))\n\n let check = false\n eachEnabled(node.item, (item) => {\n if (!childrenOf(item)?.length && states.get(item.value) !== 'true') check = true\n })\n // Only the leaves are added: a branch in the selection would check its disabled children too.\n eachEnabled(node.item, (item) => {\n if (!check) chosen.delete(item.value)\n else if (!childrenOf(item)?.length) chosen.add(item.value)\n })\n if (!check) for (let p = node.parent; p; p = p.parent) chosen.delete(p.item.value)\n\n const next: ItemValue[] = []\n deriveCheckStates(chosen).forEach((state, value) => {\n if (state === 'true') next.push(value)\n })\n model.value = [...next, ...unknown]\n}\n\nfunction isSelected(item: TreeItem): boolean {\n return props.selectionMode === 'single' && chosenValues.value[0] === item.value\n}\n\n// @core\n/** What a click or Enter does besides the `activate` event, which follows it. */\nfunction applyDefault(node: TreeNode) {\n const { item } = node\n if (props.selectionMode === 'single') model.value = item.value\n else if (props.selectionMode === 'multiple') toggleCheck(node)\n else if (item.href === undefined && isBranch(item))\n setExpanded(item, !expandedSet.value.has(item.value))\n}\n\nfunction activate(node: TreeNode, event: MouseEvent | KeyboardEvent) {\n applyDefault(node)\n emit('activate', node.item, event)\n}\n\nasync function load(item: TreeItem) {\n const loader = props.loadChildren\n if (!loader) return\n loading.add(item.value)\n failed.delete(item.value)\n try {\n loaded.set(item.value, await loader(item))\n } catch {\n failed.add(item.value)\n setExpanded(item, false)\n announce(m.value.treeView.loadError(item.label), false)\n } finally {\n loading.delete(item.value)\n }\n}\n\n// @ssr\n// Loading waits for the client: an expanded lazy node renders busy on the server, then fetches.\nonMounted(() => {\n // The expanded set is watched too: a pending node shows no children, so its expansion alone\n // does not change the rows.\n watch(\n [visible, expandedSet],\n ([rows, open]) => {\n for (const { item } of rows)\n if (open.has(item.value) && isPending(item) && !loading.has(item.value)) void load(item)\n },\n { immediate: true },\n )\n})\n\nconst treeEl = ref<HTMLElement | null>(null)\nconst rowEls = new Map<ItemValue, HTMLElement>()\nconst rowValues = new WeakMap<Element, ItemValue>()\n\nfunction bindRow(value: ItemValue, el: Element | ComponentPublicInstance | null) {\n if (el instanceof HTMLElement) {\n rowEls.set(value, el)\n rowValues.set(el, value)\n } else rowEls.delete(value)\n}\n\n// @keyboard @a11y\n/**\n * The single tab stop: the node last focused, or its closest ancestor still on screen once a\n * branch above it folds; before any focus, the first selected node on screen, then the current\n * one, then the first row.\n */\nconst active = ref<TreeNode | null>(null)\nconst tabStop = computed<ItemValue | undefined>(() => {\n const rows = visible.value\n const shown = new Set(rows.map((node) => node.item.value))\n for (let node = active.value; node; node = node.parent)\n if (shown.has(node.item.value)) return node.item.value\n const selected =\n props.selectionMode === 'multiple'\n ? rows.find((node) => checkStates.value.get(node.item.value) === 'true')\n : rows.find((node) => isSelected(node.item))\n return (selected ?? rows.find((node) => node.item.current) ?? rows[0])?.item.value\n})\n\nfunction onFocusin(event: FocusEvent) {\n const value = rowValues.get(event.target as Element)\n if (value === undefined) return\n active.value = visible.value.find((node) => node.item.value === value) ?? null\n}\n\nfunction focusRow(node: TreeNode | undefined) {\n if (node) rowEls.get(node.item.value)?.focus()\n}\n\nconst { find: findTyped } = useTypeahead()\n\n// @keyboard\n// Moves to the row whose label starts with what was typed. Disabled rows stay focusable in a\n// tree, so they are matched too.\nfunction typeTo(char: string, index: number) {\n const rows = visible.value\n focusRow(rows[findTyped(char, rows.length, index, (i) => normalizeText(rows[i]!.item.label))])\n}\n\n// @keyboard @a11y\nfunction onKeydown(event: KeyboardEvent) {\n const tree = treeEl.value\n const value = rowValues.get(event.target as Element)\n if (!tree || value === undefined || event.altKey || event.ctrlKey || event.metaKey) return\n const rows = visible.value\n const index = rows.findIndex((node) => node.item.value === value)\n const node = rows[index]\n if (!node) return\n const { item } = node\n const isOpen = expandedSet.value.has(item.value)\n const forward = isRtl(tree) ? 'ArrowLeft' : 'ArrowRight'\n const back = isRtl(tree) ? 'ArrowRight' : 'ArrowLeft'\n\n switch (event.key) {\n case 'ArrowDown':\n focusRow(rows[index + 1])\n break\n case 'ArrowUp':\n focusRow(rows[index - 1])\n break\n case 'Home':\n focusRow(rows[0])\n break\n case 'End':\n focusRow(rows.at(-1))\n break\n case forward:\n if (!isBranch(item)) break\n if (!isOpen) {\n if (!item.disabled) setExpanded(item, true)\n } else if (rows[index + 1]?.parent?.item === item) focusRow(rows[index + 1])\n break\n case back:\n if (isBranch(item) && isOpen && !item.disabled) setExpanded(item, false)\n else focusRow(node.parent ?? undefined)\n break\n case 'Enter':\n // A link follows itself: the browser turns Enter into a click, which lands in onRowClick.\n if (item.href !== undefined) return\n if (!item.disabled) activate(node, event)\n break\n case ' ':\n // Space selects without following a link, as it does nothing on a link natively.\n if (item.disabled) break\n if (item.href !== undefined) applyDefault(node)\n else activate(node, event)\n break\n case '*': {\n const siblings = node.parent ? childrenOf(node.parent.item)! : props.items\n const closed = siblings\n .filter((sibling) => !sibling.disabled && isBranch(sibling))\n .map((sibling) => sibling.value)\n .filter((sibling) => !expandedSet.value.has(sibling))\n if (closed.length) expanded.value = [...expanded.value, ...closed]\n break\n }\n default:\n if (event.key.length !== 1 || event.key === ' ') return\n typeTo(event.key, index)\n }\n event.preventDefault()\n}\n\nfunction onRowClick(node: TreeNode, event: MouseEvent) {\n // An inert link has no address left to follow; this also covers a click on its children.\n if (node.item.disabled) {\n event.preventDefault()\n return\n }\n activate(node, event)\n}\n\n// The chevron folds without selecting, and without following the link it sits in.\nfunction onChevronClick(node: TreeNode, event: MouseEvent) {\n event.preventDefault()\n event.stopPropagation()\n if (!node.item.disabled && isBranch(node.item))\n setExpanded(node.item, !expandedSet.value.has(node.item.value))\n}\n\nfunction slotProps(node: TreeNode): TreeItemSlotProps {\n return {\n item: node.item,\n level: node.level,\n expanded: expandedSet.value.has(node.item.value) && !isPending(node.item),\n }\n}\n\nfunction ariaExpanded(item: TreeItem) {\n return isBranch(item) ? String(expandedSet.value.has(item.value)) : undefined\n}\n\nfunction ariaCurrent(item: TreeItem) {\n if (!item.current) return undefined\n return item.href !== undefined ? 'page' : 'true'\n}\n\n// The root is a wrapper holding the live region, which a tree may not contain: these two reach\n// the tree itself.\ndefineExpose({\n /** Moves the focus to the tree's tab stop: the last focused node, else the selected or current one. */\n focus: (options?: FocusOptions) =>\n tabStop.value !== undefined && rowEls.get(tabStop.value)?.focus(options),\n /** The `role=\"tree\"` element, which also receives the consumer's attributes. */\n el: treeEl,\n})\n</script>\n\n<template>\n <div class=\"v-tree-view\" :class=\"rootClass\" :style=\"rootStyle\">\n <ul\n ref=\"treeEl\"\n class=\"v-tree v-control\"\n role=\"tree\"\n :data-size=\"size\"\n :aria-multiselectable=\"selectionMode === 'multiple' || undefined\"\n v-bind=\"forwardedAttrs\"\n :aria-label=\"ariaLabel\"\n @keydown=\"onKeydown\"\n @focusin=\"onFocusin\"\n >\n <li v-for=\"node in visible\" :key=\"node.item.value\" class=\"v-tree-node\" role=\"none\">\n <component\n :is=\"node.item.href !== undefined ? 'a' : 'div'\"\n :ref=\"(el: Element | ComponentPublicInstance | null) => bindRow(node.item.value, el)\"\n class=\"v-tree-row\"\n role=\"treeitem\"\n :style=\"{ '--tree-level': node.level - 1 }\"\n :href=\"node.item.disabled ? undefined : node.item.href\"\n :tabindex=\"tabStop === node.item.value ? 0 : -1\"\n :aria-level=\"node.level\"\n :aria-setsize=\"node.setsize\"\n :aria-posinset=\"node.posinset\"\n :aria-expanded=\"ariaExpanded(node.item)\"\n :aria-selected=\"selectionMode === 'single' ? String(isSelected(node.item)) : undefined\"\n :aria-checked=\"\n selectionMode === 'multiple' ? checkStates.get(node.item.value) : undefined\n \"\n :aria-current=\"ariaCurrent(node.item)\"\n :aria-disabled=\"node.item.disabled || undefined\"\n :aria-busy=\"loading.has(node.item.value) || undefined\"\n :data-current=\"node.item.current ? '' : undefined\"\n @click=\"onRowClick(node, $event)\"\n >\n <!-- Decorative: the row is the control, and the arrows fold it. -->\n <span class=\"v-tree-toggle\" aria-hidden=\"true\" @click=\"onChevronClick(node, $event)\">\n <VSpinner v-if=\"loading.has(node.item.value)\" />\n <VIcon\n v-else-if=\"isBranch(node.item)\"\n class=\"v-tree-chevron\"\n :name=\"chevronRightIcon\"\n mirrored\n />\n </span>\n <VCheckMark v-if=\"selectionMode === 'multiple'\" />\n <slot name=\"icon\" v-bind=\"slotProps(node)\">\n <VIcon v-if=\"node.item.icon\" class=\"v-tree-icon\" v-bind=\"iconProps(node.item.icon)\" />\n </slot>\n <span class=\"v-tree-label\"\n ><slot name=\"label\" v-bind=\"slotProps(node)\">{{ node.item.label }}</slot></span\n >\n <template v-if=\"failed.has(node.item.value)\">\n <VIcon class=\"v-tree-error\" :name=\"errorIcon\" />\n <span class=\"v-visually-hidden\">{{ m.treeView.loadFailed }}</span>\n </template>\n <span v-if=\"$slots.end\" class=\"v-tree-end\"\n ><slot name=\"end\" v-bind=\"slotProps(node)\"\n /></span>\n </component>\n </li>\n </ul>\n <div class=\"v-visually-hidden\" role=\"status\" aria-live=\"polite\">{{ announcement }}</div>\n </div>\n</template>\n\n<style>\n@layer vectis.components {\n .v-tree {\n /* One level of indentation puts a child's chevron under its parent's icon. */\n --tree-indent: calc(var(--vectis-icon-size) + var(--control-gap));\n\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n list-style: none;\n font-family: var(--vectis-text-family);\n }\n\n .v-tree-row {\n /* See VSideNavigation: the radius cannot exceed half the height of a single row. */\n --tree-row-radius: min(var(--vectis-radius-interactive), calc(var(--control-height) / 2));\n\n display: flex;\n align-items: center;\n gap: var(--control-gap);\n min-block-size: var(--control-height);\n padding-block: var(--vectis-space-1);\n padding-inline: calc(var(--vectis-space-2) + var(--tree-level, 0) * var(--tree-indent))\n var(--vectis-space-2);\n border-radius: var(--tree-row-radius);\n color: var(--vectis-color-text);\n font-size: var(--control-font-size);\n font-weight: var(--vectis-text-body-md-weight);\n line-height: var(--vectis-text-body-md-leading);\n text-decoration: none;\n cursor: pointer;\n user-select: none;\n }\n\n .v-tree-row:hover:not([aria-disabled='true']) {\n background: var(--vectis-color-surface-muted);\n }\n\n /* Drawn inwards, so that neighbouring rows cannot cover it. */\n .v-tree-row:focus-visible {\n outline: var(--vectis-focus-ring-width) solid var(--vectis-focus-ring-color);\n outline-offset: calc(-1 * var(--vectis-focus-ring-width));\n }\n\n .v-tree-row:is([aria-selected='true'], [data-current]) {\n background: var(--vectis-color-accent-surface);\n color: var(--vectis-color-accent-text);\n }\n\n /* The selected row is already tinted, so its hover deepens that tint; the VMenuItem idiom. */\n .v-tree-row:is([aria-selected='true'], [data-current]):hover:not([aria-disabled='true']) {\n background: color-mix(\n in oklab,\n var(--vectis-color-accent-surface),\n var(--vectis-color-accent-text) 8%\n );\n }\n\n .v-tree-row:is([aria-selected='true'], [data-current]) :is(.v-tree-icon, .v-tree-toggle) {\n color: inherit;\n }\n\n .v-tree-row[data-current] .v-tree-label {\n font-weight: var(--vectis-text-label-weight);\n }\n\n .v-tree-toggle {\n display: inline-grid;\n flex: none;\n place-items: center;\n inline-size: var(--vectis-icon-size);\n block-size: var(--vectis-icon-size);\n color: var(--vectis-color-text-muted);\n }\n\n .v-tree-chevron {\n transition: rotate var(--vectis-duration-base) var(--vectis-ease-default);\n }\n\n .v-tree-row[aria-expanded='true'] .v-tree-chevron {\n rotate: 90deg;\n }\n\n /* The mirrored chevron points left, and turns the other way to point down. */\n .v-tree-row[aria-expanded='true'] .v-tree-chevron:dir(rtl) {\n rotate: -90deg;\n }\n\n .v-tree-icon {\n flex: none;\n color: var(--vectis-color-text-muted);\n }\n\n .v-tree-label {\n flex: 1;\n min-inline-size: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .v-tree-end {\n flex: none;\n display: flex;\n align-items: center;\n gap: var(--vectis-space-1);\n color: var(--vectis-color-text-muted);\n }\n\n .v-tree-error {\n flex: none;\n color: var(--vectis-color-danger-text);\n }\n\n .v-tree-row:is([aria-checked='true'], [aria-checked='mixed']) .v-check-mark {\n background: var(--vectis-color-accent);\n border-color: var(--vectis-color-accent);\n }\n\n .v-tree-row[aria-checked='true'] .v-check-mark-tick,\n .v-tree-row[aria-checked='mixed'] .v-check-mark-dash {\n opacity: 1;\n }\n\n /* Last of the colour rules, so that a disabled node reads as such whatever its state. */\n .v-tree-row[aria-disabled='true'] {\n color: var(--vectis-color-text-subtle);\n cursor: not-allowed;\n }\n\n .v-tree-row[aria-disabled='true'] :is(.v-tree-icon, .v-tree-toggle, .v-tree-end) {\n color: inherit;\n }\n\n .v-tree-row[aria-disabled='true'] .v-check-mark {\n background: var(--vectis-color-surface-muted);\n border-color: var(--vectis-color-border);\n color: var(--vectis-color-text-subtle);\n }\n\n /*\n * Forced colours flatten the tint of the selected row: it takes the system selection pair,\n * repeated to (0,4,0) above its own hover.\n */\n @media (forced-colors: active) {\n .v-tree-row.v-tree-row:is([aria-selected='true'], [data-current]):not([aria-disabled='true']) {\n forced-color-adjust: none;\n background: Highlight;\n color: HighlightText;\n }\n\n .v-tree-row:is([aria-checked='true'], [aria-checked='mixed']):not([aria-disabled='true'])\n .v-check-mark {\n forced-color-adjust: none;\n background: Highlight;\n border-color: Highlight;\n color: Highl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AAA,CAAA,CAAA;IAEnF,EAEC,QAFD,IAEC,CADE,EAAwE,EAAA,QAAA,SAAxE,EAAwE,EAAA,SAAA,GAAA,GAA7C,EAAU,CAAI,CAAA,SAA+B,CAAA,GAAA,EAAzB,EAAK,KAAK,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IAEjD,EAAA,CAAA,CAAM,CAAC,IAAI,EAAK,KAAK,KAAK,KAAA,EAAA,GAA1C,EAGW,GAAA,EAAA,KAAA,EAAA,GAAA,CAFT,GAAgD,GAAA;KAAzC,OAAM;KAAgB,MAAM,EAAA,CAAA;2BACnC,EAAkE,QAAlE,IAAkE,EAA/B,EAAA,CAAA,CAAC,CAAC,SAAS,UAAU,GAAA,CAAA,CAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA;IAE9CA,EAAAA,OAAO,OAAA,EAAA,GAAnB,EAES,QAFT,IAES,CADN,EACD,EAAA,QAAA,OADC,EACD,EAAA,SAAA,GAAA,GAD0B,EAAU,CAAI,CAAA,CAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA;;;;;;;;;;;;;;;;;;4BAKhD,EAAwF,OAAxF,IAAwF,EAArB,EAAA,EAAA,CAAY,GAAA,CAAA,CAAA,GAAA,CAAA"}
@@ -14,10 +14,13 @@ function s(s) {
14
14
  function d() {
15
15
  c &&= (document.removeEventListener("keydown", l), !1);
16
16
  }
17
+ let f = !0;
17
18
  a(() => {
18
19
  s.enabled() && u();
19
- }), o(s.enabled, (e) => e ? u() : d()), r(d), i(d), n(() => {
20
- s.enabled() && u();
20
+ }), o(s.enabled, (e) => e && f ? u() : d()), r(d), i(() => {
21
+ f = !1, d();
22
+ }), n(() => {
23
+ f = !0, s.enabled() && u();
21
24
  });
22
25
  }
23
26
  //#endregion