@atelier-ui/vue 0.3.9 → 0.3.11

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 (35) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/index.css +1 -1
  3. package/index.d.ts +1 -0
  4. package/index.d.ts.map +1 -1
  5. package/index.mjs +1048 -967
  6. package/lib/accordion/atl-accordion-item.vue.d.ts.map +1 -1
  7. package/lib/breadcrumbs/atl-breadcrumb-item.vue.d.ts +6 -1
  8. package/lib/breadcrumbs/atl-breadcrumb-item.vue.d.ts.map +1 -1
  9. package/lib/breadcrumbs/atl-breadcrumbs.vue.d.ts +1 -16
  10. package/lib/breadcrumbs/atl-breadcrumbs.vue.d.ts.map +1 -1
  11. package/lib/checkbox/atl-checkbox.vue.d.ts +3 -2
  12. package/lib/checkbox/atl-checkbox.vue.d.ts.map +1 -1
  13. package/lib/combobox/atl-combobox.vue.d.ts +3 -3
  14. package/lib/combobox/atl-combobox.vue.d.ts.map +1 -1
  15. package/lib/dialog/atl-dialog.vue.d.ts.map +1 -1
  16. package/lib/error-message.d.ts +7 -0
  17. package/lib/error-message.d.ts.map +1 -0
  18. package/lib/input/atl-input.vue.d.ts +3 -2
  19. package/lib/input/atl-input.vue.d.ts.map +1 -1
  20. package/lib/menu/atl-menu-trigger.vue.d.ts +2 -1
  21. package/lib/menu/atl-menu-trigger.vue.d.ts.map +1 -1
  22. package/lib/radio-group/atl-radio-group.vue.d.ts +3 -2
  23. package/lib/radio-group/atl-radio-group.vue.d.ts.map +1 -1
  24. package/lib/select/atl-select.vue.d.ts +3 -2
  25. package/lib/select/atl-select.vue.d.ts.map +1 -1
  26. package/lib/spec.d.ts +17 -0
  27. package/lib/spec.d.ts.map +1 -1
  28. package/lib/tabs/atl-tab-group.vue.d.ts.map +1 -1
  29. package/lib/textarea/atl-textarea.vue.d.ts +3 -2
  30. package/lib/textarea/atl-textarea.vue.d.ts.map +1 -1
  31. package/lib/toggle/atl-toggle.vue.d.ts +3 -2
  32. package/lib/toggle/atl-toggle.vue.d.ts.map +1 -1
  33. package/lib/tooltip/atl-tooltip.vue.d.ts +10 -3
  34. package/lib/tooltip/atl-tooltip.vue.d.ts.map +1 -1
  35. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./index.css";
2
- import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, inject as l, nextTick as u, normalizeClass as d, normalizeStyle as f, onBeforeUnmount as p, onMounted as m, onUnmounted as h, openBlock as g, provide as _, ref as v, renderList as y, renderSlot as b, resolveDynamicComponent as x, toDisplayString as S, toRef as C, unref as w, useId as T, useSlots as E, useTemplateRef as D, watch as O, withCtx as k, withModifiers as A } from "vue";
2
+ import { Comment as e, Fragment as t, cloneVNode as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, inject as d, nextTick as f, normalizeClass as p, normalizeStyle as m, onBeforeUnmount as h, onMounted as g, onUnmounted as _, openBlock as v, provide as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as C, toDisplayString as w, toRef as T, unref as E, useId as D, useSlots as O, useTemplateRef as k, watch as A, withCtx as ee, withModifiers as j } from "vue";
3
3
  //#region libs/vue/src/lib/accordion/atl-accordion-group.vue?vue&type=script&setup=true&lang.ts
4
- var j = Symbol("AtlAccordionGroup"), M = /* @__PURE__ */ c({
4
+ var M = Symbol("AtlAccordionGroup"), N = /* @__PURE__ */ u({
5
5
  name: "AtlAccordionGroup",
6
6
  __name: "atl-accordion-group",
7
7
  props: {
@@ -12,30 +12,30 @@ var j = Symbol("AtlAccordionGroup"), M = /* @__PURE__ */ c({
12
12
  variant: { default: "default" }
13
13
  },
14
14
  setup(e) {
15
- let n = e, r = v(/* @__PURE__ */ new Set()), a = /* @__PURE__ */ new Map();
16
- function o(e) {
17
- let t = new Set(r.value);
18
- t.has(e) ? t.delete(e) : (n.multi || t.clear(), t.add(e)), r.value = t;
15
+ let t = e, n = b(/* @__PURE__ */ new Set()), i = /* @__PURE__ */ new Map();
16
+ function a(e) {
17
+ let r = new Set(n.value);
18
+ r.has(e) ? r.delete(e) : (t.multi || r.clear(), r.add(e)), n.value = r;
19
19
  }
20
20
  function s(e, t) {
21
- a.set(e, t);
21
+ i.set(e, t);
22
22
  }
23
23
  function c(e) {
24
- a.delete(e);
24
+ i.delete(e);
25
25
  }
26
- _(j, {
26
+ y(M, {
27
27
  get multi() {
28
- return n.multi;
28
+ return t.multi;
29
29
  },
30
- openItems: r,
31
- toggleItem: o,
30
+ openItems: n,
31
+ toggleItem: a,
32
32
  registerItem: s,
33
33
  unregisterItem: c
34
34
  });
35
- let l = t(() => ["atl-accordion-group", `variant-${n.variant}`]);
36
- return (e, t) => (g(), i("div", { class: d(l.value) }, [b(e.$slots, "default")], 2));
35
+ let l = r(() => ["atl-accordion-group", `variant-${t.variant}`]);
36
+ return (e, t) => (v(), o("div", { class: p(l.value) }, [S(e.$slots, "default")], 2));
37
37
  }
38
- }), N = "0 0 24 24", P = {
38
+ }), P = "0 0 24 24", F = {
39
39
  success: {
40
40
  kind: "stroke",
41
41
  paths: ["M12 3A9 9 0 1 0 12 21A9 9 0 1 0 12 3", "M8 12L11 15L16 9"]
@@ -162,18 +162,18 @@ var j = Symbol("AtlAccordionGroup"), M = /* @__PURE__ */ c({
162
162
  kind: "stroke",
163
163
  paths: ["M4 5H20V16H13L8 20V16H4V5Z"]
164
164
  }
165
- }, F = [
165
+ }, I = [
166
166
  "role",
167
167
  "aria-label",
168
168
  "aria-hidden"
169
- ], I = [
169
+ ], L = [
170
170
  "viewBox",
171
171
  "fill",
172
172
  "stroke",
173
173
  "stroke-width",
174
174
  "stroke-linecap",
175
175
  "stroke-linejoin"
176
- ], L = ["d"], R = /* @__PURE__ */ c({
176
+ ], R = ["d"], z = /* @__PURE__ */ u({
177
177
  name: "AtlIcon",
178
178
  __name: "atl-icon",
179
179
  props: {
@@ -181,28 +181,28 @@ var j = Symbol("AtlAccordionGroup"), M = /* @__PURE__ */ c({
181
181
  size: { default: "md" },
182
182
  label: { default: void 0 }
183
183
  },
184
- setup(n) {
185
- let r = n, a = t(() => ["atl-icon", `size-${r.size}`]), o = t(() => P[r.name]), s = t(() => o.value.kind === "stroke");
186
- return (t, r) => (g(), i("span", {
187
- class: d(a.value),
188
- role: n.label ? "img" : void 0,
189
- "aria-label": n.label || void 0,
190
- "aria-hidden": n.label ? void 0 : "true"
191
- }, [(g(), i("svg", {
192
- viewBox: w(N),
184
+ setup(e) {
185
+ let n = e, i = r(() => ["atl-icon", `size-${n.size}`]), a = r(() => F[n.name]), s = r(() => a.value.kind === "stroke");
186
+ return (n, r) => (v(), o("span", {
187
+ class: p(i.value),
188
+ role: e.label ? "img" : void 0,
189
+ "aria-label": e.label || void 0,
190
+ "aria-hidden": e.label ? void 0 : "true"
191
+ }, [(v(), o("svg", {
192
+ viewBox: E(P),
193
193
  fill: s.value ? "none" : "currentColor",
194
194
  stroke: s.value ? "currentColor" : void 0,
195
- "stroke-width": s.value ? w(2) : void 0,
195
+ "stroke-width": s.value ? E(2) : void 0,
196
196
  "stroke-linecap": s.value ? "round" : void 0,
197
197
  "stroke-linejoin": s.value ? "round" : void 0,
198
198
  "aria-hidden": "true",
199
199
  focusable: "false"
200
- }, [(g(!0), i(e, null, y(o.value.paths, (e) => (g(), i("path", {
200
+ }, [(v(!0), o(t, null, x(a.value.paths, (e) => (v(), o("path", {
201
201
  key: e,
202
202
  d: e
203
- }, null, 8, L))), 128))], 8, I))], 10, F));
203
+ }, null, 8, R))), 128))], 8, L))], 10, I));
204
204
  }
205
- }), z = ["aria-expanded", "disabled"], ee = /* @__PURE__ */ c({
205
+ }), B = ["aria-expanded", "disabled"], te = /* @__PURE__ */ u({
206
206
  name: "AtlAccordionItem",
207
207
  __name: "atl-accordion-item",
208
208
  props: {
@@ -217,62 +217,62 @@ var j = Symbol("AtlAccordionGroup"), M = /* @__PURE__ */ c({
217
217
  headingLevel: { default: 3 }
218
218
  },
219
219
  emits: ["update:expanded"],
220
- setup(e, { emit: r }) {
221
- let o = e, c = t(() => `h${o.headingLevel}`), u = r, f = T(), h = `atl-accordion-trigger-${f}`, _ = `atl-accordion-panel-${f}`, y = l(j, null), S = v(null), C = t(() => y ? y.openItems.value.has(f) : o.expanded ?? !1);
220
+ setup(e, { emit: t }) {
221
+ let n = e, a = r(() => `h${n.headingLevel}`), c = t, u = D(), f = `atl-accordion-trigger-${u}`, m = `atl-accordion-panel-${u}`, _ = d(M, null), y = b(null), x = r(() => _ ? _.openItems.value.has(u) : n.expanded ?? !1);
222
222
  function w() {
223
- o.disabled || (y ? y.toggleItem(f) : u("update:expanded", !C.value));
224
- }
225
- function E(e) {
226
- if (!y) return;
227
- let t = Array.from(document.querySelectorAll(".atl-accordion-item:not(.is-disabled) .accordion-trigger")), n = t.indexOf(e.currentTarget);
228
- e.key === "ArrowDown" ? (e.preventDefault(), t[(n + 1) % t.length]?.focus()) : e.key === "ArrowUp" ? (e.preventDefault(), t[(n - 1 + t.length) % t.length]?.focus()) : e.key === "Home" ? (e.preventDefault(), t[0]?.focus()) : e.key === "End" && (e.preventDefault(), t[t.length - 1]?.focus());
229
- }
230
- m(() => {
231
- y && S.value && y.registerItem(f, S.value), !y && o.expanded;
232
- }), O(() => o.expanded, (e) => {
233
- if (!y || e === void 0) return;
234
- let t = y.openItems.value.has(f);
235
- (e && !t || !e && t) && y.toggleItem(f);
236
- }, { immediate: !0 }), p(() => {
237
- y && y.unregisterItem(f);
223
+ n.disabled || (_ ? _.toggleItem(u) : c("update:expanded", !x.value));
224
+ }
225
+ function T(e) {
226
+ if (!_) return;
227
+ let t = e.currentTarget, n = t.closest(".atl-accordion-group"), r = Array.from(n?.querySelectorAll(".atl-accordion-item:not(.is-disabled) .accordion-trigger") ?? []).filter((e) => e.closest(".atl-accordion-group") === n), i = r.indexOf(t);
228
+ e.key === "ArrowDown" ? (e.preventDefault(), r[(i + 1) % r.length]?.focus()) : e.key === "ArrowUp" ? (e.preventDefault(), r[(i - 1 + r.length) % r.length]?.focus()) : e.key === "Home" ? (e.preventDefault(), r[0]?.focus()) : e.key === "End" && (e.preventDefault(), r[r.length - 1]?.focus());
229
+ }
230
+ g(() => {
231
+ _ && y.value && _.registerItem(u, y.value), !_ && n.expanded;
232
+ }), A(() => n.expanded, (e) => {
233
+ if (!_ || e === void 0) return;
234
+ let t = _.openItems.value.has(u);
235
+ (e && !t || !e && t) && _.toggleItem(u);
236
+ }, { immediate: !0 }), h(() => {
237
+ _ && _.unregisterItem(u);
238
238
  });
239
- let D = t(() => [
239
+ let E = r(() => [
240
240
  "atl-accordion-item",
241
- C.value && "is-expanded",
242
- o.disabled && "is-disabled"
243
- ]), A = t(() => ["chevron", C.value && "is-expanded"]);
244
- return (t, r) => (g(), i("div", { class: d(D.value) }, [(g(), n(x(c.value), { class: "accordion-heading" }, {
245
- default: k(() => [a("button", {
246
- id: h,
241
+ x.value && "is-expanded",
242
+ n.disabled && "is-disabled"
243
+ ]), O = r(() => ["chevron", x.value && "is-expanded"]);
244
+ return (t, n) => (v(), o("div", { class: p(E.value) }, [(v(), i(C(a.value), { class: "accordion-heading" }, {
245
+ default: ee(() => [s("button", {
246
+ id: f,
247
247
  ref_key: "triggerRef",
248
- ref: S,
248
+ ref: y,
249
249
  class: "accordion-trigger",
250
250
  type: "button",
251
- "aria-expanded": C.value,
252
- "aria-controls": _,
251
+ "aria-expanded": x.value,
252
+ "aria-controls": m,
253
253
  disabled: e.disabled,
254
254
  onClick: w,
255
- onKeydown: E
256
- }, [b(t.$slots, "header"), s(R, {
255
+ onKeydown: T
256
+ }, [S(t.$slots, "header"), l(z, {
257
257
  name: "chevron-down",
258
258
  size: "sm",
259
- class: d(A.value)
260
- }, null, 8, ["class"])], 40, z)]),
259
+ class: p(O.value)
260
+ }, null, 8, ["class"])], 40, B)]),
261
261
  _: 3
262
- })), a("div", { class: d(["accordion-panel-wrapper", C.value && "is-expanded"]) }, [a("div", {
263
- id: _,
262
+ })), s("div", { class: p(["accordion-panel-wrapper", x.value && "is-expanded"]) }, [s("div", {
263
+ id: m,
264
264
  role: "region",
265
- "aria-labelledby": h,
265
+ "aria-labelledby": f,
266
266
  class: "accordion-panel"
267
- }, [b(t.$slots, "default")])], 2)], 2));
267
+ }, [S(t.$slots, "default")])], 2)], 2));
268
268
  }
269
- }), te = { class: "accordion-header-content" }, ne = /* @__PURE__ */ c({
269
+ }), ne = { class: "accordion-header-content" }, re = /* @__PURE__ */ u({
270
270
  name: "AtlAccordionHeader",
271
271
  __name: "atl-accordion-header",
272
272
  setup(e) {
273
- return (e, t) => (g(), i("span", te, [b(e.$slots, "default")]));
273
+ return (e, t) => (v(), o("span", ne, [S(e.$slots, "default")]));
274
274
  }
275
- }), re = ["aria-live"], ie = { class: "content" }, ae = /* @__PURE__ */ c({
275
+ }), ie = ["aria-live"], ae = { class: "content" }, oe = /* @__PURE__ */ u({
276
276
  name: "AtlAlert",
277
277
  __name: "atl-alert",
278
278
  props: {
@@ -283,37 +283,37 @@ var j = Symbol("AtlAccordionGroup"), M = /* @__PURE__ */ c({
283
283
  }
284
284
  },
285
285
  emits: ["dismissed"],
286
- setup(e, { emit: o }) {
287
- let c = {
286
+ setup(e, { emit: t }) {
287
+ let n = {
288
288
  info: "info",
289
289
  success: "success",
290
290
  warning: "warning",
291
291
  danger: "danger"
292
- }, l = e, u = o, f = t(() => ["atl-alert", `variant-${l.variant}`]), p = t(() => l.variant === "danger" || l.variant === "warning" ? "assertive" : "polite"), m = t(() => c[l.variant]);
293
- return (t, o) => (g(), i("div", {
294
- class: d(f.value),
292
+ }, c = e, u = t, d = r(() => ["atl-alert", `variant-${c.variant}`]), f = r(() => c.variant === "danger" || c.variant === "warning" ? "assertive" : "polite"), m = r(() => n[c.variant]);
293
+ return (t, n) => (v(), o("div", {
294
+ class: p(d.value),
295
295
  role: "alert",
296
- "aria-live": p.value
297
- }, [a("span", ie, [m.value ? (g(), n(R, {
296
+ "aria-live": f.value
297
+ }, [s("span", ae, [m.value ? (v(), i(z, {
298
298
  key: 0,
299
299
  class: "variant-icon",
300
300
  name: m.value,
301
301
  size: "sm"
302
- }, null, 8, ["name"])) : r("", !0), b(t.$slots, "default")]), e.dismissible ? (g(), i("button", {
302
+ }, null, 8, ["name"])) : a("", !0), S(t.$slots, "default")]), e.dismissible ? (v(), o("button", {
303
303
  key: 0,
304
304
  class: "dismiss",
305
305
  type: "button",
306
306
  "aria-label": "Dismiss",
307
- onClick: o[0] ||= (e) => u("dismissed")
308
- }, [s(R, {
307
+ onClick: n[0] ||= (e) => u("dismissed")
308
+ }, [l(z, {
309
309
  name: "close",
310
310
  size: "sm"
311
- })])) : r("", !0)], 10, re));
311
+ })])) : a("", !0)], 10, ie));
312
312
  }
313
- }), oe = ["aria-label"], se = ["src", "alt"], ce = {
313
+ }), se = ["aria-label"], ce = ["src", "alt"], le = {
314
314
  key: 1,
315
315
  class: "initials"
316
- }, le = /* @__PURE__ */ c({
316
+ }, ue = /* @__PURE__ */ u({
317
317
  name: "AtlAvatar",
318
318
  __name: "atl-avatar",
319
319
  props: {
@@ -325,57 +325,57 @@ var j = Symbol("AtlAccordionGroup"), M = /* @__PURE__ */ c({
325
325
  status: { default: "" }
326
326
  },
327
327
  setup(e) {
328
- let n = e, a = v(!1);
329
- O(() => n.src, () => {
330
- a.value = !1;
328
+ let t = e, n = b(!1);
329
+ A(() => t.src, () => {
330
+ n.value = !1;
331
331
  });
332
- function o(e) {
332
+ function i(e) {
333
333
  return e.split(" ").filter(Boolean).slice(0, 2).map((e) => e[0].toUpperCase()).join("");
334
334
  }
335
- let c = t(() => n.name ? o(n.name) : ""), l = t(() => n.alt || n.name || "Avatar"), u = t(() => [
335
+ let s = r(() => t.name ? i(t.name) : ""), c = r(() => t.alt || t.name || "Avatar"), u = r(() => [
336
336
  "atl-avatar",
337
- `size-${n.size}`,
338
- `shape-${n.shape}`
337
+ `size-${t.size}`,
338
+ `shape-${t.shape}`
339
339
  ]);
340
- return (t, n) => (g(), i("div", {
341
- class: d(u.value),
342
- "aria-label": l.value,
340
+ return (t, r) => (v(), o("div", {
341
+ class: p(u.value),
342
+ "aria-label": c.value,
343
343
  role: "img"
344
344
  }, [
345
- e.src && !a.value ? (g(), i("img", {
345
+ e.src && !n.value ? (v(), o("img", {
346
346
  key: 0,
347
347
  src: e.src,
348
348
  alt: e.alt || e.name,
349
- onError: n[0] ||= (e) => a.value = !0
350
- }, null, 40, se)) : c.value ? (g(), i("span", ce, S(c.value), 1)) : r("", !0),
351
- s(R, {
349
+ onError: r[0] ||= (e) => n.value = !0
350
+ }, null, 40, ce)) : s.value ? (v(), o("span", le, w(s.value), 1)) : a("", !0),
351
+ l(z, {
352
352
  name: "person",
353
353
  size: "sm",
354
354
  class: "icon"
355
355
  }),
356
- e.status ? (g(), i("span", {
356
+ e.status ? (v(), o("span", {
357
357
  key: 2,
358
- class: d(`status-dot status-${e.status}`),
358
+ class: p(`status-dot status-${e.status}`),
359
359
  "aria-hidden": "true"
360
- }, null, 2)) : r("", !0)
361
- ], 10, oe));
360
+ }, null, 2)) : a("", !0)
361
+ ], 10, se));
362
362
  }
363
- }), ue = ["aria-label"], de = /* @__PURE__ */ c({
363
+ }), de = ["aria-label"], fe = /* @__PURE__ */ u({
364
364
  name: "AtlAvatarGroup",
365
365
  __name: "atl-avatar-group",
366
366
  props: {
367
367
  max: { default: 5 },
368
368
  size: { default: "md" }
369
369
  },
370
- setup(a) {
371
- let o = a, s = E(), c = t(() => s.default?.() ?? []), l = t(() => c.value.slice(0, o.max)), u = t(() => Math.max(0, c.value.length - o.max));
372
- return (t, o) => (g(), i("div", { class: d(["atl-avatar-group", `size-${a.size}`]) }, [(g(!0), i(e, null, y(l.value, (e, t) => (g(), n(x(e), { key: t }))), 128)), u.value > 0 ? (g(), i("div", {
370
+ setup(e) {
371
+ let n = e, s = O(), c = r(() => s.default?.() ?? []), l = r(() => c.value.slice(0, n.max)), u = r(() => Math.max(0, c.value.length - n.max));
372
+ return (n, r) => (v(), o("div", { class: p(["atl-avatar-group", `size-${e.size}`]) }, [(v(!0), o(t, null, x(l.value, (e, t) => (v(), i(C(e), { key: t }))), 128)), u.value > 0 ? (v(), o("div", {
373
373
  key: 0,
374
- class: d(`overflow-badge size-${a.size}`),
374
+ class: p(`overflow-badge size-${e.size}`),
375
375
  "aria-label": `+${u.value} more`
376
- }, " +" + S(u.value), 11, ue)) : r("", !0)], 2));
376
+ }, " +" + w(u.value), 11, de)) : a("", !0)], 2));
377
377
  }
378
- }), fe = /* @__PURE__ */ c({
378
+ }), pe = /* @__PURE__ */ u({
379
379
  name: "AtlBadge",
380
380
  __name: "atl-badge",
381
381
  props: {
@@ -383,49 +383,57 @@ var j = Symbol("AtlAccordionGroup"), M = /* @__PURE__ */ c({
383
383
  size: { default: "md" }
384
384
  },
385
385
  setup(e) {
386
- let a = {
386
+ let t = {
387
387
  info: "info",
388
388
  success: "success",
389
389
  warning: "warning",
390
390
  danger: "danger"
391
- }, o = e, s = t(() => [
391
+ }, n = e, s = r(() => [
392
392
  "atl-badge",
393
- `variant-${o.variant}`,
394
- `size-${o.size}`
395
- ]), c = t(() => a[o.variant]);
396
- return (e, t) => (g(), i("span", {
397
- class: d(s.value),
393
+ `variant-${n.variant}`,
394
+ `size-${n.size}`
395
+ ]), c = r(() => t[n.variant]);
396
+ return (e, t) => (v(), o("span", {
397
+ class: p(s.value),
398
398
  role: "status"
399
- }, [c.value ? (g(), n(R, {
399
+ }, [c.value ? (v(), i(z, {
400
400
  key: 0,
401
401
  class: "variant-icon",
402
402
  name: c.value,
403
403
  size: "sm"
404
- }, null, 8, ["name"])) : r("", !0), b(e.$slots, "default")], 2));
404
+ }, null, 8, ["name"])) : a("", !0), S(e.$slots, "default")], 2));
405
405
  }
406
- }), pe = {
406
+ }), me = {
407
407
  role: "list",
408
408
  class: "breadcrumbs-list"
409
- }, B = /* @__PURE__ */ c({
409
+ }, he = /* @__PURE__ */ u({
410
410
  name: "AtlBreadcrumbs",
411
411
  __name: "atl-breadcrumbs",
412
412
  props: { separator: { default: "/" } },
413
- setup(e) {
414
- let t = e;
415
- return (e, n) => (g(), i("nav", {
413
+ setup(r) {
414
+ let i = r, a = O();
415
+ function c(n) {
416
+ return n.flatMap((n) => n.type === t && Array.isArray(n.children) ? c(n.children) : n.type === e ? [] : [n]);
417
+ }
418
+ function u(e) {
419
+ let t = c(e), r = t.filter((e) => typeof e.type == "object" || typeof e.type == "function"), i = r.some((e) => e.props != null && e.props.current != null), a = r[r.length - 1];
420
+ return i ? t : t.map((e) => e === a ? n(e, { current: !0 }) : e);
421
+ }
422
+ let d = () => u(a.default?.() ?? []);
423
+ return (e, t) => (v(), o("nav", {
416
424
  class: "atl-breadcrumbs",
417
425
  "aria-label": "Breadcrumb",
418
- style: f({ "--atl-separator": `'${t.separator}'` })
419
- }, [a("ol", pe, [b(e.$slots, "default")])], 4));
426
+ style: m({ "--atl-separator": `'${i.separator}'` })
427
+ }, [s("ol", me, [l(d)])], 4));
420
428
  }
421
- }), me = ["href"], he = {
429
+ }), ge = ["href"], _e = {
422
430
  key: 1,
423
431
  class: "breadcrumb-current",
424
432
  "aria-current": "page"
425
- }, ge = {
433
+ }, ve = {
426
434
  key: 2,
427
435
  class: "breadcrumb-text"
428
- }, _e = /* @__PURE__ */ c({
436
+ }, ye = /* @__PURE__ */ u({
429
437
  name: "AtlBreadcrumbItem",
430
438
  __name: "atl-breadcrumb-item",
431
439
  props: {
@@ -436,22 +444,22 @@ var j = Symbol("AtlAccordionGroup"), M = /* @__PURE__ */ c({
436
444
  }
437
445
  },
438
446
  setup(e) {
439
- let n = e, r = t(() => ["atl-breadcrumb-item", n.current && "is-current"].filter(Boolean));
440
- return (t, n) => (g(), i("li", { class: d(r.value) }, [e.href && !e.current ? (g(), i("a", {
447
+ let t = e, n = r(() => ["atl-breadcrumb-item", t.current && "is-current"].filter(Boolean));
448
+ return (t, r) => (v(), o("li", { class: p(n.value) }, [e.href && !e.current ? (v(), o("a", {
441
449
  key: 0,
442
450
  href: e.href,
443
451
  class: "breadcrumb-link"
444
- }, [b(t.$slots, "default")], 8, me)) : e.current ? (g(), i("span", he, [b(t.$slots, "default")])) : (g(), i("span", ge, [b(t.$slots, "default")]))], 2));
452
+ }, [S(t.$slots, "default")], 8, ge)) : e.current ? (v(), o("span", _e, [S(t.$slots, "default")])) : (v(), o("span", ve, [S(t.$slots, "default")]))], 2));
445
453
  }
446
- }), ve = [
454
+ }), be = [
447
455
  "type",
448
456
  "disabled",
449
457
  "aria-disabled"
450
- ], ye = {
458
+ ], xe = {
451
459
  key: 0,
452
460
  class: "spinner",
453
461
  "aria-hidden": "true"
454
- }, be = /* @__PURE__ */ c({
462
+ }, Se = /* @__PURE__ */ u({
455
463
  name: "AtlButton",
456
464
  __name: "atl-button",
457
465
  props: {
@@ -468,23 +476,23 @@ var j = Symbol("AtlAccordionGroup"), M = /* @__PURE__ */ c({
468
476
  type: { default: "button" }
469
477
  },
470
478
  setup(e) {
471
- let n = e, a = t(() => n.disabled || n.loading), o = t(() => [
479
+ let t = e, n = r(() => t.disabled || t.loading), i = r(() => [
472
480
  "atl-button",
473
- `variant-${n.variant}`,
474
- `size-${n.size}`,
475
- a.value && "is-disabled",
476
- n.loading && "is-loading"
477
- ].filter(Boolean)), s = v(null);
478
- return m(() => {}), (t, n) => (g(), i("button", {
481
+ `variant-${t.variant}`,
482
+ `size-${t.size}`,
483
+ n.value && "is-disabled",
484
+ t.loading && "is-loading"
485
+ ].filter(Boolean)), s = b(null);
486
+ return g(() => {}), (t, r) => (v(), o("button", {
479
487
  ref_key: "buttonRef",
480
488
  ref: s,
481
- class: d(o.value),
489
+ class: p(i.value),
482
490
  type: e.type,
483
- disabled: a.value,
484
- "aria-disabled": a.value || void 0
485
- }, [e.loading ? (g(), i("span", ye)) : r("", !0), b(t.$slots, "default")], 10, ve));
491
+ disabled: n.value,
492
+ "aria-disabled": n.value || void 0
493
+ }, [e.loading ? (v(), o("span", xe)) : a("", !0), S(t.$slots, "default")], 10, be));
486
494
  }
487
- }), xe = ["role"], Se = /* @__PURE__ */ c({
495
+ }), Ce = ["role"], we = /* @__PURE__ */ u({
488
496
  name: "AtlCard",
489
497
  __name: "atl-card",
490
498
  props: {
@@ -493,35 +501,43 @@ var j = Symbol("AtlAccordionGroup"), M = /* @__PURE__ */ c({
493
501
  role: { default: void 0 }
494
502
  },
495
503
  setup(e) {
496
- let n = e, r = t(() => [
504
+ let t = e, n = r(() => [
497
505
  "atl-card",
498
- `variant-${n.variant}`,
499
- `padding-${n.padding}`
506
+ `variant-${t.variant}`,
507
+ `padding-${t.padding}`
500
508
  ]);
501
- return (t, n) => (g(), i("div", {
502
- class: d(r.value),
509
+ return (t, r) => (v(), o("div", {
510
+ class: p(n.value),
503
511
  role: e.role
504
- }, [b(t.$slots, "default")], 10, xe));
512
+ }, [S(t.$slots, "default")], 10, Ce));
505
513
  }
506
- }), Ce = { class: "atl-card-header" }, we = /* @__PURE__ */ c({
514
+ }), Te = { class: "atl-card-header" }, Ee = /* @__PURE__ */ u({
507
515
  name: "AtlCardHeader",
508
516
  __name: "atl-card-header",
509
517
  setup(e) {
510
- return (e, t) => (g(), i("div", Ce, [b(e.$slots, "default")]));
518
+ return (e, t) => (v(), o("div", Te, [S(e.$slots, "default")]));
511
519
  }
512
- }), Te = { class: "atl-card-content" }, Ee = /* @__PURE__ */ c({
520
+ }), De = { class: "atl-card-content" }, Oe = /* @__PURE__ */ u({
513
521
  name: "AtlCardContent",
514
522
  __name: "atl-card-content",
515
523
  setup(e) {
516
- return (e, t) => (g(), i("div", Te, [b(e.$slots, "default")]));
524
+ return (e, t) => (v(), o("div", De, [S(e.$slots, "default")]));
517
525
  }
518
- }), De = { class: "atl-card-footer" }, Oe = /* @__PURE__ */ c({
526
+ }), ke = { class: "atl-card-footer" }, Ae = /* @__PURE__ */ u({
519
527
  name: "AtlCardFooter",
520
528
  __name: "atl-card-footer",
521
529
  setup(e) {
522
- return (e, t) => (g(), i("div", De, [b(e.$slots, "default")]));
530
+ return (e, t) => (v(), o("div", ke, [S(e.$slots, "default")]));
523
531
  }
524
- }), ke = ["for"], Ae = [
532
+ });
533
+ //#endregion
534
+ //#region libs/vue/src/lib/error-message.ts
535
+ function V(e) {
536
+ return typeof e == "string" ? e : e.message;
537
+ }
538
+ //#endregion
539
+ //#region libs/vue/src/lib/checkbox/atl-checkbox.vue?vue&type=script&setup=true&lang.ts
540
+ var je = ["for"], Me = [
525
541
  "id",
526
542
  "checked",
527
543
  "disabled",
@@ -529,7 +545,7 @@ var j = Symbol("AtlAccordionGroup"), M = /* @__PURE__ */ c({
529
545
  "name",
530
546
  "aria-invalid",
531
547
  "aria-describedby"
532
- ], je = ["id"], V = /* @__PURE__ */ c({
548
+ ], Ne = ["id"], H = /* @__PURE__ */ u({
533
549
  name: "AtlCheckbox",
534
550
  __name: "atl-checkbox",
535
551
  props: {
@@ -558,59 +574,59 @@ var j = Symbol("AtlAccordionGroup"), M = /* @__PURE__ */ c({
558
574
  id: { default: "" }
559
575
  },
560
576
  emits: ["update:checked"],
561
- setup(n, { emit: o }) {
562
- let s = n, c = o, l = v(null), u = T(), f = T(), p = t(() => s.id || `checkbox-${f}`);
563
- O(() => s.indeterminate, (e) => {
577
+ setup(e, { emit: n }) {
578
+ let i = e, c = n, l = b(null), u = D(), d = D(), f = r(() => i.id || `checkbox-${d}`);
579
+ A(() => i.indeterminate, (e) => {
564
580
  l.value && (l.value.indeterminate = e);
565
- }), m(() => {
566
- l.value && (l.value.indeterminate = s.indeterminate);
581
+ }), g(() => {
582
+ l.value && (l.value.indeterminate = i.indeterminate);
567
583
  });
568
- function h(e) {
584
+ function m(e) {
569
585
  let t = e.target;
570
586
  c("update:checked", t.checked);
571
587
  }
572
- return (t, o) => (g(), i("div", { class: d(["atl-checkbox", {
573
- "is-invalid": n.invalid,
574
- "is-disabled": n.disabled
575
- }]) }, [a("label", {
576
- for: p.value,
588
+ return (n, r) => (v(), o("div", { class: p(["atl-checkbox", {
589
+ "is-invalid": e.invalid,
590
+ "is-disabled": e.disabled
591
+ }]) }, [s("label", {
592
+ for: f.value,
577
593
  class: "checkbox-label"
578
- }, [a("input", {
579
- id: p.value,
594
+ }, [s("input", {
595
+ id: f.value,
580
596
  ref_key: "inputRef",
581
597
  ref: l,
582
598
  type: "checkbox",
583
- checked: n.checked,
584
- disabled: n.disabled,
585
- required: n.required,
586
- name: n.name,
587
- "aria-invalid": n.invalid || void 0,
588
- "aria-describedby": n.errors.length > 0 ? w(u) : void 0,
589
- onChange: h
590
- }, null, 40, Ae), b(t.$slots, "default")], 8, ke), n.errors.length ? (g(), i("div", {
599
+ checked: e.checked,
600
+ disabled: e.disabled,
601
+ required: e.required,
602
+ name: e.name,
603
+ "aria-invalid": e.invalid || void 0,
604
+ "aria-describedby": e.errors.length > 0 ? E(u) : void 0,
605
+ onChange: m
606
+ }, null, 40, Me), S(n.$slots, "default")], 8, je), e.errors.length ? (v(), o("div", {
591
607
  key: 0,
592
- id: w(u),
608
+ id: E(u),
593
609
  class: "errors",
594
610
  "aria-live": "polite"
595
- }, [(g(!0), i(e, null, y(n.errors, (e, t) => (g(), i("p", {
611
+ }, [(v(!0), o(t, null, x(e.errors, (e, t) => (v(), o("p", {
596
612
  key: t,
597
613
  class: "error-message"
598
- }, S(e), 1))), 128))], 8, je)) : r("", !0)], 2));
614
+ }, w(E(V)(e)), 1))), 128))], 8, Ne)) : a("", !0)], 2));
599
615
  }
600
616
  });
601
617
  //#endregion
602
618
  //#region libs/vue/src/lib/a11y-dev-warn.ts
603
- function H() {
619
+ function U() {
604
620
  return !1;
605
621
  }
606
- function U(e, t, n) {
607
- H() && e && u(() => {
622
+ function W(e, t, n) {
623
+ U() && e && f(() => {
608
624
  (e.getAttribute("aria-label") ?? "").trim().length > 0 || e.hasAttribute("aria-labelledby") || (e.labels?.length ?? 0) > 0 || console.warn(`[${t}] no accessible name — ${n} so screen readers announce its purpose.`, e);
609
625
  });
610
626
  }
611
627
  //#endregion
612
628
  //#region libs/vue/src/lib/dialog/atl-dialog.vue?vue&type=script&setup=true&lang.ts
613
- var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__PURE__ */ c({
629
+ var Pe = ["aria-label", "aria-labelledby"], G = Symbol("AtlDialog"), Fe = /* @__PURE__ */ u({
614
630
  name: "AtlDialog",
615
631
  __name: "atl-dialog",
616
632
  props: {
@@ -626,85 +642,85 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
626
642
  ariaLabel: { default: void 0 }
627
643
  },
628
644
  emits: ["update:open"],
629
- setup(e, { emit: n }) {
630
- let r = e, o = n, s = v(null), c = T(), l = !1;
631
- function f() {
632
- let e = s.value;
633
- H() && !l && e && (l = !0, u(() => {
634
- r.ariaLabel || e.getAttribute("aria-labelledby") !== c || e.querySelector(`[id="${c}"]`) !== null || console.warn("[AtlDialog] opened with no accessible name — add an <atl-dialog-header> or set aria-label / aria-labelledby so screen readers announce its purpose.", e);
645
+ setup(e, { emit: t }) {
646
+ let n = e, i = t, a = b(null), c = D(), l = !1;
647
+ function u() {
648
+ let e = a.value;
649
+ U() && !l && e && (l = !0, f(() => {
650
+ n.ariaLabel || e.getAttribute("aria-labelledby") !== c || e.querySelector(`[id="${c}"]`) !== null || console.warn("[AtlDialog] opened with no accessible name — add an <atl-dialog-header> or set aria-label / aria-labelledby so screen readers announce its purpose.", e);
635
651
  }));
636
652
  }
637
- function p() {
638
- o("update:open", !1);
653
+ function d() {
654
+ i("update:open", !1);
639
655
  }
640
- _(W, {
656
+ y(G, {
641
657
  headerId: c,
642
- close: p
643
- }), m(() => {
644
- r.open && s.value && (s.value.showModal(), f());
645
- }), O(() => r.open, (e) => {
646
- let t = s.value;
647
- t && (e ? (t.open || t.showModal(), f()) : t.open && t.close());
658
+ close: d
659
+ }), g(() => {
660
+ n.open && a.value && (a.value.showModal(), u());
661
+ }), A(() => n.open, (e) => {
662
+ let t = a.value;
663
+ t && (e ? (t.open || t.showModal(), u()) : t.open && t.close());
648
664
  }, { flush: "post" });
649
- function h() {
650
- o("update:open", !1);
665
+ function m() {
666
+ i("update:open", !1);
651
667
  }
652
- function y(e) {
653
- e.preventDefault(), o("update:open", !1);
668
+ function h(e) {
669
+ e.preventDefault(), i("update:open", !1);
654
670
  }
655
- function x(e) {
656
- r.closeOnBackdrop && e.target === s.value && o("update:open", !1);
671
+ function _(e) {
672
+ n.closeOnBackdrop && e.target === a.value && i("update:open", !1);
657
673
  }
658
- let S = t(() => ["panel", `size-${r.size}`]);
659
- return (t, n) => (g(), i("dialog", {
674
+ let x = r(() => ["panel", `size-${n.size}`]);
675
+ return (t, n) => (v(), o("dialog", {
660
676
  ref_key: "dialogRef",
661
- ref: s,
677
+ ref: a,
662
678
  class: "atl-dialog",
663
679
  "aria-label": e.ariaLabel || void 0,
664
- "aria-labelledby": e.ariaLabel ? void 0 : w(c),
680
+ "aria-labelledby": e.ariaLabel ? void 0 : E(c),
665
681
  "aria-modal": "true",
666
- onClose: h,
667
- onCancel: y,
668
- onClick: x
669
- }, [a("div", {
670
- class: d(S.value),
671
- onClick: n[0] ||= A(() => {}, ["stop"])
672
- }, [b(t.$slots, "default")], 2)], 40, Me));
682
+ onClose: m,
683
+ onCancel: h,
684
+ onClick: _
685
+ }, [s("div", {
686
+ class: p(x.value),
687
+ onClick: n[0] ||= j(() => {}, ["stop"])
688
+ }, [S(t.$slots, "default")], 2)], 40, Pe));
673
689
  }
674
- }), Pe = ["id"], Fe = { class: "header-content" }, Ie = /* @__PURE__ */ c({
690
+ }), Ie = ["id"], Le = { class: "header-content" }, Re = /* @__PURE__ */ u({
675
691
  name: "AtlDialogHeader",
676
692
  __name: "atl-dialog-header",
677
693
  setup(e) {
678
- let t = l(W, {
694
+ let t = d(G, {
679
695
  headerId: "",
680
696
  close: () => void 0
681
697
  });
682
- return (e, n) => (g(), i("div", {
683
- id: w(t).headerId,
698
+ return (e, n) => (v(), o("div", {
699
+ id: E(t).headerId,
684
700
  class: "atl-dialog-header"
685
- }, [a("span", Fe, [b(e.$slots, "default")]), a("button", {
701
+ }, [s("span", Le, [S(e.$slots, "default")]), s("button", {
686
702
  class: "close-btn",
687
703
  type: "button",
688
704
  "aria-label": "Close dialog",
689
- onClick: n[0] ||= (e) => w(t).close()
690
- }, [s(R, {
705
+ onClick: n[0] ||= (e) => E(t).close()
706
+ }, [l(z, {
691
707
  name: "close",
692
708
  size: "sm"
693
- })])], 8, Pe));
709
+ })])], 8, Ie));
694
710
  }
695
- }), Le = { class: "atl-dialog-content" }, Re = /* @__PURE__ */ c({
711
+ }), ze = { class: "atl-dialog-content" }, Be = /* @__PURE__ */ u({
696
712
  name: "AtlDialogContent",
697
713
  __name: "atl-dialog-content",
698
714
  setup(e) {
699
- return (e, t) => (g(), i("div", Le, [b(e.$slots, "default")]));
715
+ return (e, t) => (v(), o("div", ze, [S(e.$slots, "default")]));
700
716
  }
701
- }), ze = { class: "atl-dialog-footer" }, Be = /* @__PURE__ */ c({
717
+ }), Ve = { class: "atl-dialog-footer" }, He = /* @__PURE__ */ u({
702
718
  name: "AtlDialogFooter",
703
719
  __name: "atl-dialog-footer",
704
720
  setup(e) {
705
- return (e, t) => (g(), i("div", ze, [b(e.$slots, "default")]));
721
+ return (e, t) => (v(), o("div", Ve, [S(e.$slots, "default")]));
706
722
  }
707
- }), Ve = ["aria-labelledby"], G = Symbol("AtlDrawer"), He = /* @__PURE__ */ c({
723
+ }), Ue = ["aria-labelledby"], K = Symbol("AtlDrawer"), We = /* @__PURE__ */ u({
708
724
  name: "AtlDrawer",
709
725
  __name: "atl-drawer",
710
726
  props: {
@@ -720,88 +736,88 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
720
736
  }
721
737
  },
722
738
  emits: ["update:open"],
723
- setup(e, { emit: n }) {
724
- let r = e, o = n, s = v(null), c = T(), l = !1;
725
- function f() {
726
- let e = s.value;
727
- H() && !l && e && (l = !0, u(() => {
739
+ setup(e, { emit: t }) {
740
+ let n = e, i = t, a = b(null), c = D(), l = !1;
741
+ function u() {
742
+ let e = a.value;
743
+ U() && !l && e && (l = !0, f(() => {
728
744
  e.getAttribute("aria-labelledby") === c && e.querySelector(`[id="${c}"]`) === null && console.warn("[AtlDrawer] opened with no accessible name — add an <atl-drawer-header> so screen readers announce its purpose.", e);
729
745
  }));
730
746
  }
731
- function p() {
732
- o("update:open", !1);
747
+ function d() {
748
+ i("update:open", !1);
733
749
  }
734
- _(G, {
750
+ y(K, {
735
751
  headerId: c,
736
- close: p
737
- }), m(() => {
738
- r.open && s.value && (s.value.showModal(), f());
739
- }), O(() => r.open, (e) => {
740
- let t = s.value;
741
- t && (e ? (t.open || t.showModal(), f()) : t.open && t.close());
752
+ close: d
753
+ }), g(() => {
754
+ n.open && a.value && (a.value.showModal(), u());
755
+ }), A(() => n.open, (e) => {
756
+ let t = a.value;
757
+ t && (e ? (t.open || t.showModal(), u()) : t.open && t.close());
742
758
  }, { flush: "post" });
743
- function h() {
744
- o("update:open", !1);
759
+ function m() {
760
+ i("update:open", !1);
745
761
  }
746
- function y(e) {
747
- e.preventDefault(), o("update:open", !1);
762
+ function h(e) {
763
+ e.preventDefault(), i("update:open", !1);
748
764
  }
749
- function x(e) {
750
- r.closeOnBackdrop && e.target === s.value && o("update:open", !1);
765
+ function _(e) {
766
+ n.closeOnBackdrop && e.target === a.value && i("update:open", !1);
751
767
  }
752
- let S = t(() => [
768
+ let x = r(() => [
753
769
  "atl-drawer",
754
- `position-${r.position}`,
755
- `size-${r.size}`,
756
- r.open && "is-open"
770
+ `position-${n.position}`,
771
+ `size-${n.size}`,
772
+ n.open && "is-open"
757
773
  ]);
758
- return (e, t) => (g(), i("div", { class: d(S.value) }, [a("dialog", {
774
+ return (e, t) => (v(), o("div", { class: p(x.value) }, [s("dialog", {
759
775
  ref_key: "dialogRef",
760
- ref: s,
761
- "aria-labelledby": w(c),
776
+ ref: a,
777
+ "aria-labelledby": E(c),
762
778
  "aria-modal": "true",
763
- onClose: h,
764
- onCancel: y,
765
- onClick: x
766
- }, [a("div", {
779
+ onClose: m,
780
+ onCancel: h,
781
+ onClick: _
782
+ }, [s("div", {
767
783
  class: "panel",
768
- onClick: t[0] ||= A(() => {}, ["stop"])
769
- }, [b(e.$slots, "default")])], 40, Ve)], 2));
784
+ onClick: t[0] ||= j(() => {}, ["stop"])
785
+ }, [S(e.$slots, "default")])], 40, Ue)], 2));
770
786
  }
771
- }), Ue = ["id"], We = { class: "header-content" }, Ge = /* @__PURE__ */ c({
787
+ }), Ge = ["id"], Ke = { class: "header-content" }, qe = /* @__PURE__ */ u({
772
788
  name: "AtlDrawerHeader",
773
789
  __name: "atl-drawer-header",
774
790
  setup(e) {
775
- let t = l(G, {
791
+ let t = d(K, {
776
792
  headerId: "",
777
793
  close: () => void 0
778
794
  });
779
- return (e, n) => (g(), i("div", {
780
- id: w(t).headerId,
795
+ return (e, n) => (v(), o("div", {
796
+ id: E(t).headerId,
781
797
  class: "atl-drawer-header"
782
- }, [a("span", We, [b(e.$slots, "default")]), a("button", {
798
+ }, [s("span", Ke, [S(e.$slots, "default")]), s("button", {
783
799
  class: "close-btn",
784
800
  type: "button",
785
801
  "aria-label": "Close drawer",
786
- onClick: n[0] ||= (e) => w(t).close()
787
- }, [s(R, {
802
+ onClick: n[0] ||= (e) => E(t).close()
803
+ }, [l(z, {
788
804
  name: "close",
789
805
  size: "sm"
790
- })])], 8, Ue));
806
+ })])], 8, Ge));
791
807
  }
792
- }), Ke = { class: "atl-drawer-content" }, qe = /* @__PURE__ */ c({
808
+ }), Je = { class: "atl-drawer-content" }, Ye = /* @__PURE__ */ u({
793
809
  name: "AtlDrawerContent",
794
810
  __name: "atl-drawer-content",
795
811
  setup(e) {
796
- return (e, t) => (g(), i("div", Ke, [b(e.$slots, "default")]));
812
+ return (e, t) => (v(), o("div", Je, [S(e.$slots, "default")]));
797
813
  }
798
- }), Je = { class: "atl-drawer-footer" }, Ye = /* @__PURE__ */ c({
814
+ }), Xe = { class: "atl-drawer-footer" }, Ze = /* @__PURE__ */ u({
799
815
  name: "AtlDrawerFooter",
800
816
  __name: "atl-drawer-footer",
801
817
  setup(e) {
802
- return (e, t) => (g(), i("div", Je, [b(e.$slots, "default")]));
818
+ return (e, t) => (v(), o("div", Xe, [S(e.$slots, "default")]));
803
819
  }
804
- }), Xe = ["for"], Ze = { class: "input-field" }, Qe = [
820
+ }), Qe = ["for"], $e = { class: "input-field" }, et = [
805
821
  "id",
806
822
  "type",
807
823
  "value",
@@ -814,7 +830,7 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
814
830
  "aria-invalid",
815
831
  "aria-describedby",
816
832
  "aria-required"
817
- ], $e = ["id"], et = /* @__PURE__ */ c({
833
+ ], tt = ["id"], nt = /* @__PURE__ */ u({
818
834
  name: "AtlInput",
819
835
  __name: "atl-input",
820
836
  props: {
@@ -844,108 +860,161 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
844
860
  ariaLabel: { default: "" }
845
861
  },
846
862
  emits: ["update:value"],
847
- setup(o, { emit: s }) {
848
- let c = o, l = T(), u = T(), f = s, p = t(() => c.id || (c.label ? `input-${u}` : void 0)), h = v(null);
849
- m(() => U(h.value, "AtlInput", "set label or aria-label, or associate a <label for> with the input id"));
850
- function _(e) {
851
- f("update:value", e.target.value);
863
+ setup(e, { emit: n }) {
864
+ let c = e, l = D(), u = D(), d = n, f = r(() => c.id || (c.label ? `input-${u}` : void 0)), m = b(null);
865
+ g(() => W(m.value, "AtlInput", "set label or aria-label, or associate a <label for> with the input id"));
866
+ function h(e) {
867
+ d("update:value", e.target.value);
852
868
  }
853
- return (t, s) => (g(), i("div", { class: d(["atl-input", {
854
- "is-invalid": o.invalid,
855
- "is-disabled": o.disabled,
856
- "is-readonly": o.readonly
869
+ return (n, r) => (v(), o("div", { class: p(["atl-input", {
870
+ "is-invalid": e.invalid,
871
+ "is-disabled": e.disabled,
872
+ "is-readonly": e.readonly
857
873
  }]) }, [
858
- o.label ? (g(), i("label", {
874
+ e.label ? (v(), o("label", {
859
875
  key: 0,
860
- for: p.value
861
- }, S(o.label), 9, Xe)) : r("", !0),
862
- a("div", Ze, [a("input", {
876
+ for: f.value
877
+ }, w(e.label), 9, Qe)) : a("", !0),
878
+ s("div", $e, [s("input", {
863
879
  ref_key: "inputRef",
864
- ref: h,
865
- id: p.value,
866
- type: o.type,
867
- value: o.value,
868
- placeholder: o.placeholder,
869
- disabled: o.disabled,
870
- readonly: o.readonly,
871
- required: o.required,
872
- name: o.name,
873
- "aria-label": o.ariaLabel || void 0,
874
- "aria-invalid": o.invalid || void 0,
875
- "aria-describedby": o.errors.length > 0 ? w(l) : void 0,
876
- "aria-required": o.required || void 0,
877
- onInput: _
878
- }, null, 40, Qe), o.invalid ? (g(), n(R, {
880
+ ref: m,
881
+ id: f.value,
882
+ type: e.type,
883
+ value: e.value,
884
+ placeholder: e.placeholder,
885
+ disabled: e.disabled,
886
+ readonly: e.readonly,
887
+ required: e.required,
888
+ name: e.name,
889
+ "aria-label": e.ariaLabel || void 0,
890
+ "aria-invalid": e.invalid || void 0,
891
+ "aria-describedby": e.errors.length > 0 ? E(l) : void 0,
892
+ "aria-required": e.required || void 0,
893
+ onInput: h
894
+ }, null, 40, et), e.invalid ? (v(), i(z, {
879
895
  key: 0,
880
896
  name: "danger",
881
897
  size: "sm",
882
898
  class: "invalid-icon"
883
- })) : r("", !0)]),
884
- o.errors.length ? (g(), i("div", {
899
+ })) : a("", !0)]),
900
+ e.errors.length ? (v(), o("div", {
885
901
  key: 1,
886
- id: w(l),
902
+ id: E(l),
887
903
  class: "errors",
888
904
  "aria-live": "polite"
889
- }, [(g(!0), i(e, null, y(o.errors, (e, t) => (g(), i("p", {
905
+ }, [(v(!0), o(t, null, x(e.errors, (e, t) => (v(), o("p", {
890
906
  key: t,
891
907
  class: "error-message"
892
- }, S(e), 1))), 128))], 8, $e)) : r("", !0)
908
+ }, w(E(V)(e)), 1))), 128))], 8, tt)) : a("", !0)
893
909
  ], 2));
894
910
  }
895
- }), tt = { class: "atl-menu-trigger-wrapper" }, K = Symbol("AtlMenuTrigger"), nt = /* @__PURE__ */ c({
911
+ }), q = Symbol("AtlMenuTrigger"), rt = /* @__PURE__ */ u({
896
912
  name: "AtlMenuTrigger",
897
913
  __name: "atl-menu-trigger",
898
914
  setup(e) {
899
- let t = v(!1), n = v(null), o = v(null);
900
- O([t, n], () => {
915
+ let t = b(!1), n = b(null), r = b(null);
916
+ A([t, n], () => {
901
917
  let e = n.value?.firstElementChild;
902
918
  e && (e.setAttribute("aria-haspopup", "menu"), e.setAttribute("aria-expanded", String(t.value)));
903
919
  }, {
904
920
  immediate: !0,
905
921
  flush: "post"
906
922
  });
907
- function s() {
908
- t.value = !t.value;
923
+ let i = "first", c = "", l = 0;
924
+ function u() {
925
+ return n.value?.firstElementChild ?? null;
909
926
  }
910
- function c() {
911
- t.value = !1;
927
+ function d() {
928
+ let e = r.value;
929
+ return e ? Array.from(e.querySelectorAll("[role=\"menuitem\"]")).filter((t) => t.closest(".atl-menu-panel") === e) : [];
912
930
  }
913
- _(K, { close: c });
914
- function l(e) {
915
- if (!t.value) return;
916
- let r = e.target, i = n.value?.contains(r), a = o.value?.contains(r);
917
- !i && !a && c();
931
+ function p(e, t) {
932
+ e.forEach((e) => e.setAttribute("tabindex", "-1")), t.setAttribute("tabindex", "0"), t.focus();
918
933
  }
919
- function u(e) {
920
- e.key === "Escape" && t.value && c();
934
+ function m() {
935
+ i = "first", t.value = !t.value;
936
+ }
937
+ function _(e = !0) {
938
+ d().forEach((e) => e.setAttribute("tabindex", "-1")), t.value = !1, e && u()?.focus();
939
+ }
940
+ y(q, { close: () => _(!0) }), A(t, async (e) => {
941
+ if (!e) return;
942
+ await f();
943
+ let t = d(), n = i === "last" ? t[t.length - 1] : t[0];
944
+ n && p(t, n);
945
+ });
946
+ function x(e) {
947
+ let a = e.target;
948
+ if (n.value?.contains(a)) {
949
+ (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), i = e.key === "ArrowUp" ? "last" : "first", t.value ||= !0);
950
+ return;
951
+ }
952
+ if (!t.value || !r.value?.contains(a)) return;
953
+ if (e.key === "Tab") {
954
+ _(!0);
955
+ return;
956
+ }
957
+ let o = d();
958
+ if (!o.length) return;
959
+ let s = o.indexOf(document.activeElement), u;
960
+ if (e.key === "ArrowDown") u = o[(s + 1) % o.length];
961
+ else if (e.key === "ArrowUp") u = o[s <= 0 ? o.length - 1 : s - 1];
962
+ else if (e.key === "Home") u = o[0];
963
+ else if (e.key === "End") u = o[o.length - 1];
964
+ else if (e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && (e.key !== " " || c)) {
965
+ window.clearTimeout(l), c += e.key.toLowerCase(), l = window.setTimeout(() => {
966
+ c = "";
967
+ }, 500);
968
+ let t = c.length === 1 ? s + 1 : Math.max(s, 0);
969
+ for (let e = 0; e < o.length; e++) {
970
+ let n = o[(t + e) % o.length];
971
+ if (n.textContent?.trim().toLowerCase().startsWith(c)) {
972
+ u = n;
973
+ break;
974
+ }
975
+ }
976
+ if (!u) return;
977
+ } else return;
978
+ e.preventDefault(), u && p(o, u);
979
+ }
980
+ function C(e) {
981
+ if (!t.value) return;
982
+ let i = e.target, a = n.value?.contains(i), o = r.value?.contains(i);
983
+ !a && !o && _(!1);
921
984
  }
922
- return m(() => {
923
- document.addEventListener("mousedown", l), document.addEventListener("keydown", u);
924
- }), p(() => {
925
- document.removeEventListener("mousedown", l), document.removeEventListener("keydown", u);
926
- }), (e, c) => (g(), i("div", tt, [a("span", {
985
+ function w(e) {
986
+ e.key === "Escape" && t.value && _(!0);
987
+ }
988
+ return g(() => {
989
+ document.addEventListener("mousedown", C), document.addEventListener("keydown", w);
990
+ }), h(() => {
991
+ document.removeEventListener("mousedown", C), document.removeEventListener("keydown", w), window.clearTimeout(l);
992
+ }), (e, i) => (v(), o("div", {
993
+ class: "atl-menu-trigger-wrapper",
994
+ onKeydown: x
995
+ }, [s("span", {
927
996
  ref_key: "triggerRef",
928
997
  ref: n,
929
- onClick: s
930
- }, [b(e.$slots, "trigger")], 512), t.value ? (g(), i("div", {
998
+ onClick: m
999
+ }, [S(e.$slots, "trigger")], 512), t.value ? (v(), o("div", {
931
1000
  key: 0,
932
1001
  ref_key: "menuRef",
933
- ref: o,
1002
+ ref: r,
934
1003
  class: "atl-menu-panel"
935
- }, [b(e.$slots, "menu")], 512)) : r("", !0)]));
1004
+ }, [S(e.$slots, "menu")], 512)) : a("", !0)], 32));
936
1005
  }
937
- }), rt = /* @__PURE__ */ c({
1006
+ }), it = /* @__PURE__ */ u({
938
1007
  name: "AtlMenu",
939
1008
  __name: "atl-menu",
940
1009
  props: { variant: { default: "default" } },
941
1010
  setup(e) {
942
- let n = e, r = t(() => ["atl-menu", `variant-${n.variant}`]);
943
- return (e, t) => (g(), i("div", {
944
- class: d(r.value),
1011
+ let t = e, n = r(() => ["atl-menu", `variant-${t.variant}`]);
1012
+ return (e, t) => (v(), o("div", {
1013
+ class: p(n.value),
945
1014
  role: "menu"
946
- }, [b(e.$slots, "default")], 2));
1015
+ }, [S(e.$slots, "default")], 2));
947
1016
  }
948
- }), it = ["disabled"], at = /* @__PURE__ */ c({
1017
+ }), at = ["aria-disabled"], ot = /* @__PURE__ */ u({
949
1018
  name: "AtlMenuItem",
950
1019
  __name: "atl-menu-item",
951
1020
  props: { disabled: {
@@ -953,34 +1022,34 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
953
1022
  default: !1
954
1023
  } },
955
1024
  emits: ["triggered"],
956
- setup(e, { emit: n }) {
957
- let r = e, a = n, o = l(K, null);
1025
+ setup(e, { emit: t }) {
1026
+ let n = e, i = t, a = d(q, null);
958
1027
  function s() {
959
- r.disabled || (a("triggered"), o?.close());
1028
+ n.disabled || (i("triggered"), a?.close());
960
1029
  }
961
- let c = t(() => ["atl-menu-item", r.disabled && "is-disabled"]);
962
- return (t, n) => (g(), i("button", {
963
- class: d(c.value),
1030
+ let c = r(() => ["atl-menu-item", n.disabled && "is-disabled"]);
1031
+ return (t, n) => (v(), o("button", {
1032
+ class: p(c.value),
964
1033
  role: "menuitem",
965
1034
  type: "button",
966
- disabled: e.disabled,
1035
+ "aria-disabled": e.disabled || void 0,
967
1036
  onClick: s
968
- }, [b(t.$slots, "default")], 10, it));
1037
+ }, [S(t.$slots, "default")], 10, at));
969
1038
  }
970
- }), ot = { class: "atl-menu-separator" }, st = /* @__PURE__ */ c({
1039
+ }), st = { class: "atl-menu-separator" }, ct = /* @__PURE__ */ u({
971
1040
  name: "AtlMenuSeparator",
972
1041
  __name: "atl-menu-separator",
973
1042
  setup(e) {
974
- return (e, t) => (g(), i("hr", ot));
1043
+ return (e, t) => (v(), o("hr", st));
975
1044
  }
976
- }), ct = {
1045
+ }), lt = {
977
1046
  class: "atl-pagination",
978
1047
  "aria-label": "Pagination"
979
- }, lt = { class: "page-list" }, ut = { key: 0 }, dt = ["disabled"], ft = ["disabled"], pt = { key: 0 }, mt = { key: 1 }, ht = [
1048
+ }, ut = { class: "page-list" }, dt = { key: 0 }, ft = ["disabled"], pt = ["disabled"], mt = { key: 0 }, ht = { key: 1 }, gt = [
980
1049
  "aria-label",
981
1050
  "aria-current",
982
1051
  "onClick"
983
- ], gt = ["disabled"], _t = { key: 1 }, vt = ["disabled"], yt = /* @__PURE__ */ c({
1052
+ ], _t = ["disabled"], vt = { key: 1 }, yt = ["disabled"], bt = /* @__PURE__ */ u({
984
1053
  name: "AtlPagination",
985
1054
  __name: "atl-pagination",
986
1055
  props: {
@@ -993,8 +1062,8 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
993
1062
  }
994
1063
  },
995
1064
  emits: ["pageChange"],
996
- setup(n, { emit: o }) {
997
- let c = n, l = o;
1065
+ setup(e, { emit: n }) {
1066
+ let i = e, c = n;
998
1067
  function u(e, t, n) {
999
1068
  if (t <= 1) return [{
1000
1069
  type: "page",
@@ -1022,64 +1091,64 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1022
1091
  page: t
1023
1092
  }), r;
1024
1093
  }
1025
- let f = t(() => u(c.page, c.pageCount, c.siblingCount));
1026
- function p(e) {
1027
- let t = Math.min(Math.max(e, 1), c.pageCount);
1028
- t !== c.page && l("pageChange", t);
1094
+ let d = r(() => u(i.page, i.pageCount, i.siblingCount));
1095
+ function f(e) {
1096
+ let t = Math.min(Math.max(e, 1), i.pageCount);
1097
+ t !== i.page && c("pageChange", t);
1029
1098
  }
1030
- return (t, o) => (g(), i("nav", ct, [a("ul", lt, [
1031
- n.showFirstLast ? (g(), i("li", ut, [a("button", {
1032
- class: d(["page-btn nav-btn", { "is-disabled": n.page <= 1 }]),
1033
- disabled: n.page <= 1,
1099
+ return (n, r) => (v(), o("nav", lt, [s("ul", ut, [
1100
+ e.showFirstLast ? (v(), o("li", dt, [s("button", {
1101
+ class: p(["page-btn nav-btn", { "is-disabled": e.page <= 1 }]),
1102
+ disabled: e.page <= 1,
1034
1103
  "aria-label": "First page",
1035
- onClick: o[0] ||= (e) => p(1)
1036
- }, [s(R, {
1104
+ onClick: r[0] ||= (e) => f(1)
1105
+ }, [l(z, {
1037
1106
  name: "chevron-double-left",
1038
1107
  size: "sm"
1039
- })], 10, dt)])) : r("", !0),
1040
- a("li", null, [a("button", {
1041
- class: d(["page-btn nav-btn", { "is-disabled": n.page <= 1 }]),
1042
- disabled: n.page <= 1,
1108
+ })], 10, ft)])) : a("", !0),
1109
+ s("li", null, [s("button", {
1110
+ class: p(["page-btn nav-btn", { "is-disabled": e.page <= 1 }]),
1111
+ disabled: e.page <= 1,
1043
1112
  "aria-label": "Previous page",
1044
- onClick: o[1] ||= (e) => p(n.page - 1)
1045
- }, [s(R, {
1113
+ onClick: r[1] ||= (t) => f(e.page - 1)
1114
+ }, [l(z, {
1046
1115
  name: "chevron-left",
1047
1116
  size: "sm"
1048
- })], 10, ft)]),
1049
- (g(!0), i(e, null, y(f.value, (t) => (g(), i(e, { key: t.type === "page" ? t.page : t.key }, [t.type === "ellipsis" ? (g(), i("li", pt, [...o[4] ||= [a("span", {
1117
+ })], 10, pt)]),
1118
+ (v(!0), o(t, null, x(d.value, (n) => (v(), o(t, { key: n.type === "page" ? n.page : n.key }, [n.type === "ellipsis" ? (v(), o("li", mt, [...r[4] ||= [s("span", {
1050
1119
  class: "ellipsis",
1051
1120
  "aria-hidden": "true"
1052
- }, "…", -1)]])) : (g(), i("li", mt, [a("button", {
1053
- class: d(["page-btn", { "is-active": t.page === n.page }]),
1054
- "aria-label": `Page ${t.page}`,
1055
- "aria-current": t.page === n.page ? "page" : void 0,
1056
- onClick: (e) => p(t.page)
1057
- }, S(t.page), 11, ht)]))], 64))), 128)),
1058
- a("li", null, [a("button", {
1059
- class: d(["page-btn nav-btn", { "is-disabled": n.page >= n.pageCount }]),
1060
- disabled: n.page >= n.pageCount,
1121
+ }, "…", -1)]])) : (v(), o("li", ht, [s("button", {
1122
+ class: p(["page-btn", { "is-active": n.page === e.page }]),
1123
+ "aria-label": `Page ${n.page}`,
1124
+ "aria-current": n.page === e.page ? "page" : void 0,
1125
+ onClick: (e) => f(n.page)
1126
+ }, w(n.page), 11, gt)]))], 64))), 128)),
1127
+ s("li", null, [s("button", {
1128
+ class: p(["page-btn nav-btn", { "is-disabled": e.page >= e.pageCount }]),
1129
+ disabled: e.page >= e.pageCount,
1061
1130
  "aria-label": "Next page",
1062
- onClick: o[2] ||= (e) => p(n.page + 1)
1063
- }, [s(R, {
1131
+ onClick: r[2] ||= (t) => f(e.page + 1)
1132
+ }, [l(z, {
1064
1133
  name: "chevron-right",
1065
1134
  size: "sm"
1066
- })], 10, gt)]),
1067
- n.showFirstLast ? (g(), i("li", _t, [a("button", {
1068
- class: d(["page-btn nav-btn", { "is-disabled": n.page >= n.pageCount }]),
1069
- disabled: n.page >= n.pageCount,
1135
+ })], 10, _t)]),
1136
+ e.showFirstLast ? (v(), o("li", vt, [s("button", {
1137
+ class: p(["page-btn nav-btn", { "is-disabled": e.page >= e.pageCount }]),
1138
+ disabled: e.page >= e.pageCount,
1070
1139
  "aria-label": "Last page",
1071
- onClick: o[3] ||= (e) => p(n.pageCount)
1072
- }, [s(R, {
1140
+ onClick: r[3] ||= (t) => f(e.pageCount)
1141
+ }, [l(z, {
1073
1142
  name: "chevron-double-right",
1074
1143
  size: "sm"
1075
- })], 10, vt)])) : r("", !0)
1144
+ })], 10, yt)])) : a("", !0)
1076
1145
  ])]));
1077
1146
  }
1078
- }), bt = [
1147
+ }), xt = [
1079
1148
  "aria-label",
1080
1149
  "aria-valuenow",
1081
1150
  "aria-valuemax"
1082
- ], xt = { class: "track" }, St = /* @__PURE__ */ c({
1151
+ ], St = { class: "track" }, Ct = /* @__PURE__ */ u({
1083
1152
  name: "AtlProgress",
1084
1153
  __name: "atl-progress",
1085
1154
  props: {
@@ -1094,25 +1163,25 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1094
1163
  label: { default: void 0 }
1095
1164
  },
1096
1165
  setup(e) {
1097
- let n = e, r = t(() => Math.min(Math.max(n.value, 0), n.max)), o = t(() => n.indeterminate ? "100%" : `${r.value / n.max * 100}%`), s = t(() => [
1166
+ let t = e, n = r(() => Math.min(Math.max(t.value, 0), t.max)), i = r(() => t.indeterminate ? "100%" : `${n.value / t.max * 100}%`), a = r(() => [
1098
1167
  "atl-progress",
1099
- `variant-${n.variant}`,
1100
- `size-${n.size}`,
1101
- n.indeterminate && "is-indeterminate"
1168
+ `variant-${t.variant}`,
1169
+ `size-${t.size}`,
1170
+ t.indeterminate && "is-indeterminate"
1102
1171
  ].filter(Boolean));
1103
- return (t, n) => (g(), i("div", {
1104
- class: d(s.value),
1172
+ return (t, r) => (v(), o("div", {
1173
+ class: p(a.value),
1105
1174
  role: "progressbar",
1106
1175
  "aria-label": e.label,
1107
1176
  "aria-valuemin": 0,
1108
- "aria-valuenow": e.indeterminate ? void 0 : r.value,
1177
+ "aria-valuenow": e.indeterminate ? void 0 : n.value,
1109
1178
  "aria-valuemax": e.indeterminate ? void 0 : e.max
1110
- }, [a("div", xt, [a("div", {
1179
+ }, [s("div", St, [s("div", {
1111
1180
  class: "fill",
1112
- style: f({ width: o.value })
1113
- }, null, 4)])], 10, bt));
1181
+ style: m({ width: i.value })
1182
+ }, null, 4)])], 10, xt));
1114
1183
  }
1115
- }), Ct = { class: "atl-combobox-wrapper" }, wt = [
1184
+ }), wt = { class: "atl-combobox-wrapper" }, Tt = [
1116
1185
  "aria-expanded",
1117
1186
  "aria-activedescendant",
1118
1187
  "aria-invalid",
@@ -1123,22 +1192,22 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1123
1192
  "name",
1124
1193
  "placeholder",
1125
1194
  "value"
1126
- ], Tt = {
1195
+ ], Et = {
1127
1196
  class: "atl-combobox-icon",
1128
1197
  "aria-hidden": "true"
1129
- }, Et = [
1198
+ }, Dt = [
1130
1199
  "id",
1131
1200
  "aria-selected",
1132
1201
  "aria-disabled",
1133
1202
  "onMousedown",
1134
1203
  "onMouseenter"
1135
- ], Dt = {
1204
+ ], Ot = {
1136
1205
  key: 1,
1137
1206
  class: "atl-combobox-no-results",
1138
1207
  role: "option",
1139
1208
  "aria-disabled": "true",
1140
1209
  "aria-selected": "false"
1141
- }, Ot = /* @__PURE__ */ c({
1210
+ }, kt = /* @__PURE__ */ u({
1142
1211
  name: "AtlCombobox",
1143
1212
  __name: "atl-combobox",
1144
1213
  props: {
@@ -1165,161 +1234,165 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1165
1234
  errors: { default: () => [] }
1166
1235
  },
1167
1236
  emits: ["update:value"],
1168
- setup(o, { emit: c }) {
1169
- let l = o, u = c, f = v(null), p = v(null), m = v(""), _ = v(!1), b = v(-1), x = Math.random().toString(36).slice(2), C = `atl-combobox-input-${x}`, w = `atl-combobox-panel-${x}`, T = `atl-combobox-errors-${x}`, E = t(() => l.options.find((e) => e.value === l.value)?.label ?? ""), D = t(() => {
1237
+ setup(e, { emit: n }) {
1238
+ let c = e, u = n, d = b(null), f = b(null), m = b(""), h = b(!1), g = b(-1), y = Math.random().toString(36).slice(2), S = `atl-combobox-input-${y}`, C = `atl-combobox-panel-${y}`, T = `atl-combobox-errors-${y}`, D = r(() => c.options.find((e) => e.value === c.value)?.label ?? ""), O = r(() => {
1170
1239
  let e = m.value.toLowerCase();
1171
- return e ? l.options.filter((t) => t.label.toLowerCase().includes(e)) : l.options;
1172
- }), k = t(() => b.value >= 0 ? `${w}-option-${b.value}` : void 0), A = t(() => [
1240
+ return e ? c.options.filter((t) => t.label.toLowerCase().includes(e)) : c.options;
1241
+ }), k = r(() => g.value >= 0 ? `${C}-option-${g.value}` : void 0), ee = r(() => [
1173
1242
  "atl-combobox",
1174
- _.value && "is-open",
1175
- l.disabled && "is-disabled",
1176
- l.readonly && "is-readonly",
1177
- l.invalid && "is-invalid"
1243
+ h.value && "is-open",
1244
+ c.disabled && "is-disabled",
1245
+ c.readonly && "is-readonly",
1246
+ c.invalid && "is-invalid"
1178
1247
  ]);
1179
- O(() => l.value, () => {
1180
- _.value || (m.value = E.value);
1248
+ A(() => c.value, () => {
1249
+ h.value || (m.value = D.value);
1181
1250
  }, { immediate: !0 });
1182
1251
  function j() {
1183
- l.disabled || l.readonly || _.value || (_.value = !0, b.value = -1, document.addEventListener("click", N));
1252
+ c.disabled || c.readonly || h.value || (h.value = !0, g.value = -1, document.addEventListener("click", N));
1184
1253
  }
1185
1254
  function M() {
1186
- _.value && (_.value = !1, b.value = -1, document.removeEventListener("click", N));
1255
+ h.value && (h.value = !1, g.value = -1, document.removeEventListener("click", N));
1187
1256
  }
1188
1257
  function N(e) {
1189
- p.value?.contains(e.target) || (m.value = E.value, M());
1258
+ f.value?.contains(e.target) || (m.value = D.value, M());
1190
1259
  }
1191
- h(() => {
1260
+ _(() => {
1192
1261
  document.removeEventListener("click", N);
1193
1262
  });
1194
1263
  function P(e) {
1195
- e.disabled || l.disabled || l.readonly || (u("update:value", e.value), m.value = e.label, M(), f.value?.focus());
1264
+ e.disabled || c.disabled || c.readonly || (u("update:value", e.value), m.value = e.label, M(), d.value?.focus());
1196
1265
  }
1197
1266
  function F(e) {
1198
1267
  let t = e.target.value;
1199
- m.value = t, b.value = -1, t === "" && u("update:value", ""), _.value || j();
1268
+ m.value = t, g.value = -1, t === "" && u("update:value", ""), h.value || j();
1200
1269
  }
1201
1270
  function I() {
1202
1271
  j();
1203
1272
  }
1204
1273
  function L() {
1205
- m.value = E.value;
1274
+ m.value = D.value;
1275
+ }
1276
+ function R(e, t, n) {
1277
+ let r = e.length, i = t < 0 && n === -1 ? 0 : t;
1278
+ for (let t = 1; t <= r; t++) {
1279
+ let a = ((i + n * t) % r + r) % r;
1280
+ if (!e[a].disabled) return a;
1281
+ }
1282
+ return t;
1206
1283
  }
1207
- function z(e) {
1208
- let t = D.value;
1284
+ function B(e) {
1285
+ let t = O.value;
1209
1286
  switch (e.key) {
1210
- case "ArrowDown": {
1211
- if (e.preventDefault(), !_.value) {
1287
+ case "ArrowDown":
1288
+ if (e.preventDefault(), !h.value) {
1212
1289
  j();
1213
1290
  return;
1214
1291
  }
1215
- let n = b.value + 1;
1216
- b.value = n >= t.length ? 0 : n;
1292
+ g.value = R(t, g.value, 1);
1217
1293
  break;
1218
- }
1219
- case "ArrowUp": {
1220
- if (e.preventDefault(), !_.value) {
1294
+ case "ArrowUp":
1295
+ if (e.preventDefault(), !h.value) {
1221
1296
  j();
1222
1297
  return;
1223
1298
  }
1224
- let n = b.value - 1;
1225
- b.value = n < 0 ? t.length - 1 : n;
1299
+ g.value = R(t, g.value, -1);
1226
1300
  break;
1227
- }
1228
1301
  case "Enter": {
1229
1302
  e.preventDefault();
1230
- let n = b.value;
1231
- _.value && n >= 0 && n < t.length && P(t[n]);
1303
+ let n = g.value;
1304
+ h.value && n >= 0 && n < t.length && P(t[n]);
1232
1305
  break;
1233
1306
  }
1234
1307
  case "Escape":
1235
- e.preventDefault(), m.value = E.value, M();
1308
+ e.preventDefault(), m.value = D.value, M();
1236
1309
  break;
1237
1310
  case "Tab": M();
1238
1311
  }
1239
1312
  }
1240
- return (t, c) => (g(), i("div", {
1313
+ return (n, r) => (v(), o("div", {
1241
1314
  ref_key: "containerRef",
1242
- ref: p,
1243
- class: d(A.value)
1315
+ ref: f,
1316
+ class: p(ee.value)
1244
1317
  }, [
1245
- a("div", Ct, [
1246
- a("input", {
1247
- id: C,
1318
+ s("div", wt, [
1319
+ s("input", {
1320
+ id: S,
1248
1321
  ref_key: "inputRef",
1249
- ref: f,
1322
+ ref: d,
1250
1323
  class: "atl-combobox-input",
1251
1324
  type: "text",
1252
1325
  autocomplete: "off",
1253
1326
  role: "combobox",
1254
- "aria-expanded": _.value,
1255
- "aria-controls": w,
1327
+ "aria-expanded": h.value,
1328
+ "aria-controls": C,
1256
1329
  "aria-autocomplete": "list",
1257
1330
  "aria-activedescendant": k.value,
1258
- "aria-invalid": o.invalid || void 0,
1259
- "aria-describedby": o.errors.length > 0 ? T : void 0,
1260
- disabled: o.disabled,
1261
- readonly: o.readonly,
1262
- required: o.required,
1263
- name: o.name || void 0,
1264
- placeholder: o.placeholder,
1331
+ "aria-invalid": e.invalid || void 0,
1332
+ "aria-describedby": e.errors.length > 0 ? T : void 0,
1333
+ disabled: e.disabled,
1334
+ readonly: e.readonly,
1335
+ required: e.required,
1336
+ name: e.name || void 0,
1337
+ placeholder: e.placeholder,
1265
1338
  value: m.value,
1266
1339
  onInput: F,
1267
1340
  onFocus: I,
1268
1341
  onBlur: L,
1269
- onKeydown: z
1270
- }, null, 40, wt),
1271
- o.invalid ? (g(), n(R, {
1342
+ onKeydown: B
1343
+ }, null, 40, Tt),
1344
+ e.invalid ? (v(), i(z, {
1272
1345
  key: 0,
1273
1346
  name: "danger",
1274
1347
  size: "sm",
1275
1348
  class: "invalid-icon"
1276
- })) : r("", !0),
1277
- a("span", Tt, [s(R, {
1349
+ })) : a("", !0),
1350
+ s("span", Et, [l(z, {
1278
1351
  name: "chevron-down",
1279
1352
  size: "sm"
1280
1353
  })])
1281
1354
  ]),
1282
- _.value ? (g(), i("ul", {
1355
+ h.value ? (v(), o("ul", {
1283
1356
  key: 0,
1284
- id: w,
1357
+ id: C,
1285
1358
  class: "atl-combobox-panel",
1286
1359
  role: "listbox",
1287
- "aria-labelledby": C
1288
- }, [D.value.length > 0 ? (g(!0), i(e, { key: 0 }, y(D.value, (e, t) => (g(), i("li", {
1289
- id: `${w}-option-${t}`,
1290
- key: e.value,
1360
+ "aria-labelledby": S
1361
+ }, [O.value.length > 0 ? (v(!0), o(t, { key: 0 }, x(O.value, (t, n) => (v(), o("li", {
1362
+ id: `${C}-option-${n}`,
1363
+ key: t.value,
1291
1364
  role: "option",
1292
- class: d([
1365
+ class: p([
1293
1366
  "atl-combobox-option",
1294
- b.value === t && "is-active",
1295
- e.value === o.value && "is-selected",
1296
- e.disabled && "is-disabled"
1367
+ g.value === n && "is-active",
1368
+ t.value === e.value && "is-selected",
1369
+ t.disabled && "is-disabled"
1297
1370
  ]),
1298
- "aria-selected": e.value === o.value,
1299
- "aria-disabled": e.disabled || void 0,
1300
- onMousedown: (t) => P(e),
1301
- onMouseenter: (e) => b.value = t
1302
- }, [a("span", null, S(e.label), 1), s(R, {
1371
+ "aria-selected": t.value === e.value,
1372
+ "aria-disabled": t.disabled || void 0,
1373
+ onMousedown: (e) => P(t),
1374
+ onMouseenter: (e) => g.value = n
1375
+ }, [s("span", null, w(t.label), 1), l(z, {
1303
1376
  name: "check",
1304
1377
  size: "sm",
1305
1378
  class: "atl-combobox-check"
1306
- })], 42, Et))), 128)) : (g(), i("li", Dt, " No results found. "))])) : r("", !0),
1307
- o.errors.length > 0 ? (g(), i("div", {
1379
+ })], 42, Dt))), 128)) : (v(), o("li", Ot, " No results found. "))])) : a("", !0),
1380
+ e.errors.length > 0 ? (v(), o("div", {
1308
1381
  key: 1,
1309
1382
  id: T,
1310
1383
  class: "atl-combobox-errors",
1311
1384
  "aria-live": "polite"
1312
- }, [(g(!0), i(e, null, y(o.errors, (e, t) => (g(), i("p", {
1385
+ }, [(v(!0), o(t, null, x(e.errors, (e, t) => (v(), o("p", {
1313
1386
  key: t,
1314
1387
  class: "atl-combobox-error-message"
1315
- }, S(e), 1))), 128))])) : r("", !0)
1388
+ }, w(E(V)(e)), 1))), 128))])) : a("", !0)
1316
1389
  ], 2));
1317
1390
  }
1318
- }), kt = ["aria-invalid", "aria-required"], At = {
1391
+ }), At = ["aria-invalid", "aria-required"], jt = {
1319
1392
  key: 0,
1320
1393
  class: "errors",
1321
1394
  role: "alert"
1322
- }, q = Symbol("AtlRadioGroup"), jt = /* @__PURE__ */ c({
1395
+ }, J = Symbol("AtlRadioGroup"), Mt = /* @__PURE__ */ u({
1323
1396
  name: "AtlRadioGroup",
1324
1397
  __name: "atl-radio-group",
1325
1398
  props: {
@@ -1344,66 +1417,66 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1344
1417
  errors: { default: () => [] }
1345
1418
  },
1346
1419
  emits: ["update:value"],
1347
- setup(n, { emit: a }) {
1348
- let o = n, s = a;
1349
- _(q, {
1420
+ setup(e, { emit: n }) {
1421
+ let i = e, s = n;
1422
+ y(J, {
1350
1423
  get value() {
1351
- return o.value ?? "";
1424
+ return i.value ?? "";
1352
1425
  },
1353
1426
  get name() {
1354
- return o.name ?? "";
1427
+ return i.name ?? "";
1355
1428
  },
1356
1429
  get disabled() {
1357
- return o.disabled ?? !1;
1430
+ return i.disabled ?? !1;
1358
1431
  },
1359
1432
  get readonly() {
1360
- return o.readonly ?? !1;
1433
+ return i.readonly ?? !1;
1361
1434
  },
1362
1435
  get invalid() {
1363
- return o.invalid ?? !1;
1436
+ return i.invalid ?? !1;
1364
1437
  },
1365
1438
  onSelect(e) {
1366
- !o.disabled && !o.readonly && s("update:value", e);
1439
+ !i.disabled && !i.readonly && s("update:value", e);
1367
1440
  }
1368
1441
  });
1369
- let c = t(() => [
1442
+ let c = r(() => [
1370
1443
  "atl-radio-group",
1371
- o.invalid && "is-invalid",
1372
- o.disabled && "is-disabled",
1373
- o.readonly && "is-readonly"
1374
- ]), l = v(null);
1444
+ i.invalid && "is-invalid",
1445
+ i.disabled && "is-disabled",
1446
+ i.readonly && "is-readonly"
1447
+ ]), l = b(null);
1375
1448
  function u(e) {
1376
- if (o.disabled || o.readonly) return;
1449
+ if (i.disabled || i.readonly) return;
1377
1450
  let t = e.key === "ArrowDown" || e.key === "ArrowRight", n = e.key === "ArrowUp" || e.key === "ArrowLeft";
1378
1451
  if (!t && !n) return;
1379
1452
  let r = Array.from(l.value?.querySelectorAll("input[type=\"radio\"]") ?? []).filter((e) => !e.disabled);
1380
1453
  if (r.length === 0) return;
1381
1454
  e.preventDefault();
1382
- let i = r.findIndex((e) => e.value === o.value), a = r[((i === -1 ? t ? -1 : 0 : i) + (t ? 1 : -1) + r.length) % r.length];
1383
- a.focus(), s("update:value", a.value);
1455
+ let a = r.findIndex((e) => e.value === i.value), o = r[((a === -1 ? t ? -1 : 0 : a) + (t ? 1 : -1) + r.length) % r.length];
1456
+ o.focus(), s("update:value", o.value);
1384
1457
  }
1385
- return (t, a) => (g(), i("div", {
1458
+ return (n, r) => (v(), o("div", {
1386
1459
  ref_key: "groupRef",
1387
1460
  ref: l,
1388
- class: d(c.value),
1461
+ class: p(c.value),
1389
1462
  role: "radiogroup",
1390
- "aria-invalid": n.invalid || void 0,
1391
- "aria-required": n.required || void 0,
1463
+ "aria-invalid": e.invalid || void 0,
1464
+ "aria-required": e.required || void 0,
1392
1465
  onKeydown: u
1393
- }, [b(t.$slots, "default"), n.errors.length > 0 ? (g(), i("div", At, [(g(!0), i(e, null, y(n.errors, (e, t) => (g(), i("p", {
1466
+ }, [S(n.$slots, "default"), e.errors.length > 0 ? (v(), o("div", jt, [(v(!0), o(t, null, x(e.errors, (e, t) => (v(), o("p", {
1394
1467
  key: t,
1395
1468
  class: "error-message"
1396
- }, S(e), 1))), 128))])) : r("", !0)], 42, kt));
1469
+ }, w(E(V)(e)), 1))), 128))])) : a("", !0)], 42, At));
1397
1470
  }
1398
- }), Mt = [
1471
+ }), Nt = [
1399
1472
  "name",
1400
1473
  "value",
1401
1474
  "checked",
1402
1475
  "disabled"
1403
- ], Nt = {
1476
+ ], Pt = {
1404
1477
  key: 0,
1405
1478
  class: "radio-text"
1406
- }, Pt = /* @__PURE__ */ c({
1479
+ }, Ft = /* @__PURE__ */ u({
1407
1480
  name: "AtlRadio",
1408
1481
  __name: "atl-radio",
1409
1482
  props: {
@@ -1414,44 +1487,44 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1414
1487
  }
1415
1488
  },
1416
1489
  setup(e) {
1417
- let n = e, o = l(q, {
1490
+ let t = e, n = d(J, {
1418
1491
  value: "",
1419
1492
  name: "",
1420
1493
  disabled: !1,
1421
1494
  readonly: !1,
1422
1495
  invalid: !1,
1423
1496
  onSelect: () => void 0
1424
- }), s = t(() => n.disabled || o.disabled), c = t(() => o.value === n.radioValue), u = t(() => [
1497
+ }), i = r(() => t.disabled || n.disabled), c = r(() => n.value === t.radioValue), l = r(() => [
1425
1498
  "atl-radio",
1426
- s.value && "is-disabled",
1499
+ i.value && "is-disabled",
1427
1500
  c.value && "is-checked",
1428
- o.invalid && "is-invalid"
1501
+ n.invalid && "is-invalid"
1429
1502
  ].filter(Boolean));
1430
- function f() {
1431
- !s.value && !o.readonly && o.onSelect(n.radioValue);
1503
+ function u() {
1504
+ !i.value && !n.readonly && n.onSelect(t.radioValue);
1432
1505
  }
1433
- function p(e) {
1434
- o.readonly && e.preventDefault();
1506
+ function f(e) {
1507
+ n.readonly && e.preventDefault();
1435
1508
  }
1436
- return (t, n) => (g(), i("label", { class: d(u.value) }, [
1437
- a("input", {
1509
+ return (t, r) => (v(), o("label", { class: p(l.value) }, [
1510
+ s("input", {
1438
1511
  type: "radio",
1439
- name: w(o).name || void 0,
1512
+ name: E(n).name || void 0,
1440
1513
  value: e.radioValue,
1441
1514
  checked: c.value,
1442
- disabled: s.value,
1515
+ disabled: i.value,
1443
1516
  class: "radio-input",
1444
- onClick: p,
1445
- onChange: f
1446
- }, null, 40, Mt),
1447
- n[0] ||= a("span", {
1517
+ onClick: f,
1518
+ onChange: u
1519
+ }, null, 40, Nt),
1520
+ r[0] ||= s("span", {
1448
1521
  class: "radio-indicator",
1449
1522
  "aria-hidden": "true"
1450
1523
  }, null, -1),
1451
- t.$slots.default ? (g(), i("span", Nt, [b(t.$slots, "default")])) : r("", !0)
1524
+ t.$slots.default ? (v(), o("span", Pt, [S(t.$slots, "default")])) : a("", !0)
1452
1525
  ], 2));
1453
1526
  }
1454
- }), Ft = ["for"], It = { class: "select-wrapper" }, Lt = [
1527
+ }), It = ["for"], Lt = { class: "select-wrapper" }, Rt = [
1455
1528
  "id",
1456
1529
  "name",
1457
1530
  "value",
@@ -1460,15 +1533,15 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1460
1533
  "aria-label",
1461
1534
  "aria-invalid",
1462
1535
  "aria-describedby"
1463
- ], Rt = {
1536
+ ], zt = {
1464
1537
  key: 0,
1465
1538
  value: "",
1466
1539
  disabled: "",
1467
1540
  hidden: ""
1468
- }, zt = {
1541
+ }, Bt = {
1469
1542
  class: "select-arrow",
1470
1543
  "aria-hidden": "true"
1471
- }, Bt = ["id"], Vt = /* @__PURE__ */ c({
1544
+ }, Vt = ["id"], Ht = /* @__PURE__ */ u({
1472
1545
  name: "AtlSelect",
1473
1546
  __name: "atl-select",
1474
1547
  props: {
@@ -1492,59 +1565,59 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1492
1565
  ariaLabel: { default: void 0 }
1493
1566
  },
1494
1567
  emits: ["update:value"],
1495
- setup(o, { emit: c }) {
1496
- let l = o, u = c, f = T(), p = T(), h = t(() => [
1568
+ setup(e, { emit: n }) {
1569
+ let c = e, u = n, d = D(), f = D(), m = r(() => [
1497
1570
  "atl-select",
1498
- l.invalid && "is-invalid",
1499
- l.disabled && "is-disabled"
1500
- ]), _ = v(null);
1501
- m(() => U(_.value, "AtlSelect", "set label or aria-label, or wrap it in a <label>"));
1502
- function x(e) {
1503
- l.disabled || u("update:value", e.target.value);
1571
+ c.invalid && "is-invalid",
1572
+ c.disabled && "is-disabled"
1573
+ ]), h = b(null);
1574
+ g(() => W(h.value, "AtlSelect", "set label or aria-label, or wrap it in a <label>"));
1575
+ function _(e) {
1576
+ c.disabled || u("update:value", e.target.value);
1504
1577
  }
1505
- return (t, c) => (g(), i("div", { class: d(h.value) }, [
1506
- o.label ? (g(), i("label", {
1578
+ return (n, r) => (v(), o("div", { class: p(m.value) }, [
1579
+ e.label ? (v(), o("label", {
1507
1580
  key: 0,
1508
- for: w(f)
1509
- }, S(o.label), 9, Ft)) : r("", !0),
1510
- a("div", It, [
1511
- a("select", {
1581
+ for: E(d)
1582
+ }, w(e.label), 9, It)) : a("", !0),
1583
+ s("div", Lt, [
1584
+ s("select", {
1512
1585
  ref_key: "selectRef",
1513
- ref: _,
1514
- id: w(f),
1515
- name: o.name,
1516
- value: o.value,
1517
- disabled: o.disabled,
1518
- required: o.required,
1519
- "aria-label": o.ariaLabel || void 0,
1520
- "aria-invalid": o.invalid || void 0,
1521
- "aria-describedby": o.errors.length > 0 ? w(p) : void 0,
1586
+ ref: h,
1587
+ id: E(d),
1588
+ name: e.name,
1589
+ value: e.value,
1590
+ disabled: e.disabled,
1591
+ required: e.required,
1592
+ "aria-label": e.ariaLabel || void 0,
1593
+ "aria-invalid": e.invalid || void 0,
1594
+ "aria-describedby": e.errors.length > 0 ? E(f) : void 0,
1522
1595
  class: "select-native",
1523
- onChange: x
1524
- }, [o.placeholder ? (g(), i("option", Rt, S(o.placeholder), 1)) : r("", !0), b(t.$slots, "default")], 40, Lt),
1525
- o.invalid ? (g(), n(R, {
1596
+ onChange: _
1597
+ }, [e.placeholder ? (v(), o("option", zt, w(e.placeholder), 1)) : a("", !0), S(n.$slots, "default")], 40, Rt),
1598
+ e.invalid ? (v(), i(z, {
1526
1599
  key: 0,
1527
1600
  name: "danger",
1528
1601
  size: "sm",
1529
1602
  class: "invalid-icon"
1530
- })) : r("", !0),
1531
- a("span", zt, [s(R, {
1603
+ })) : a("", !0),
1604
+ s("span", Bt, [l(z, {
1532
1605
  name: "chevron-down",
1533
1606
  size: "sm"
1534
1607
  })])
1535
1608
  ]),
1536
- o.errors.length > 0 ? (g(), i("div", {
1609
+ e.errors.length > 0 ? (v(), o("div", {
1537
1610
  key: 1,
1538
- id: w(p),
1611
+ id: E(f),
1539
1612
  class: "errors",
1540
1613
  "aria-live": "polite"
1541
- }, [(g(!0), i(e, null, y(o.errors, (e, t) => (g(), i("p", {
1614
+ }, [(v(!0), o(t, null, x(e.errors, (e, t) => (v(), o("p", {
1542
1615
  key: t,
1543
1616
  class: "error-message"
1544
- }, S(e), 1))), 128))], 8, Bt)) : r("", !0)
1617
+ }, w(E(V)(e)), 1))), 128))], 8, Vt)) : a("", !0)
1545
1618
  ], 2));
1546
1619
  }
1547
- }), Ht = ["value", "disabled"], Ut = /* @__PURE__ */ c({
1620
+ }), Ut = ["value", "disabled"], Wt = /* @__PURE__ */ u({
1548
1621
  name: "AtlOption",
1549
1622
  __name: "atl-option",
1550
1623
  props: {
@@ -1555,12 +1628,12 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1555
1628
  }
1556
1629
  },
1557
1630
  setup(e) {
1558
- return (t, n) => (g(), i("option", {
1631
+ return (t, n) => (v(), o("option", {
1559
1632
  value: e.optionValue,
1560
1633
  disabled: e.disabled
1561
- }, [b(t.$slots, "default")], 8, Ht));
1634
+ }, [S(t.$slots, "default")], 8, Ut));
1562
1635
  }
1563
- }), Wt = /* @__PURE__ */ c({
1636
+ }), Gt = /* @__PURE__ */ u({
1564
1637
  name: "AtlSkeleton",
1565
1638
  __name: "atl-skeleton",
1566
1639
  props: {
@@ -1573,8 +1646,8 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1573
1646
  }
1574
1647
  },
1575
1648
  setup(e) {
1576
- let n = e;
1577
- function r(e, t, n) {
1649
+ let t = e;
1650
+ function n(e, t, n) {
1578
1651
  if (n) return n;
1579
1652
  switch (e) {
1580
1653
  case "text": return "1em";
@@ -1583,37 +1656,37 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1583
1656
  default: return "1em";
1584
1657
  }
1585
1658
  }
1586
- let a = t(() => [
1659
+ let i = r(() => [
1587
1660
  "atl-skeleton",
1588
- `variant-${n.variant}`,
1589
- n.animated && "is-animated"
1590
- ].filter(Boolean)), o = t(() => ({
1591
- width: n.width,
1592
- height: r(n.variant, n.width, n.height)
1661
+ `variant-${t.variant}`,
1662
+ t.animated && "is-animated"
1663
+ ].filter(Boolean)), a = r(() => ({
1664
+ width: t.width,
1665
+ height: n(t.variant, t.width, t.height)
1593
1666
  }));
1594
- return (e, t) => (g(), i("div", {
1595
- class: d(a.value),
1596
- style: f(o.value),
1667
+ return (e, t) => (v(), o("div", {
1668
+ class: p(i.value),
1669
+ style: m(a.value),
1597
1670
  "aria-hidden": "true"
1598
1671
  }, null, 6));
1599
1672
  }
1600
- }), Gt = {
1673
+ }), Kt = {
1601
1674
  class: "stepper-header",
1602
1675
  role: "list",
1603
1676
  "aria-label": "Progress"
1604
- }, Kt = [
1677
+ }, qt = [
1605
1678
  "id",
1606
1679
  "aria-label",
1607
1680
  "aria-current",
1608
1681
  "disabled",
1609
1682
  "onClick"
1610
- ], qt = { class: "step-text" }, Jt = { class: "step-label" }, Yt = {
1683
+ ], Jt = { class: "step-text" }, Yt = { class: "step-label" }, Xt = {
1611
1684
  key: 0,
1612
1685
  class: "step-description"
1613
- }, Xt = {
1686
+ }, Zt = {
1614
1687
  key: 1,
1615
1688
  class: "step-optional"
1616
- }, Zt = { class: "stepper-content" }, J = Symbol("AtlStepper"), Qt = /* @__PURE__ */ c({
1689
+ }, Qt = { class: "stepper-content" }, Y = Symbol("AtlStepper"), $t = /* @__PURE__ */ u({
1617
1690
  name: "AtlStepper",
1618
1691
  __name: "atl-stepper",
1619
1692
  props: {
@@ -1625,85 +1698,85 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1625
1698
  }
1626
1699
  },
1627
1700
  emits: ["update:activeStep"],
1628
- setup(s, { emit: c }) {
1629
- let l = s, u = c, f = v(l.activeStep), p = v([]), m = t(() => l.linear);
1630
- O(() => l.activeStep, (e) => {
1631
- f.value = e;
1701
+ setup(e, { emit: n }) {
1702
+ let l = e, u = n, d = b(l.activeStep), f = b([]), m = r(() => l.linear);
1703
+ A(() => l.activeStep, (e) => {
1704
+ d.value = e;
1632
1705
  });
1633
1706
  function h(e) {
1634
- p.value.push(e);
1707
+ f.value.push(e);
1635
1708
  }
1636
- function x(e) {
1637
- p.value = p.value.filter((t) => t.id !== e);
1709
+ function g(e) {
1710
+ f.value = f.value.filter((t) => t.id !== e);
1638
1711
  }
1639
- function C(e, t) {
1640
- let n = p.value.findIndex((t) => t.id === e);
1641
- n !== -1 && (p.value[n] = {
1642
- ...p.value[n],
1712
+ function _(e, t) {
1713
+ let n = f.value.findIndex((t) => t.id === e);
1714
+ n !== -1 && (f.value[n] = {
1715
+ ...f.value[n],
1643
1716
  ...t
1644
1717
  });
1645
1718
  }
1646
- function w(e) {
1647
- let t = p.value[e];
1648
- return !t || t.disabled ? !1 : !l.linear || e <= f.value || p.value.slice(0, e).every((e) => e.completed || e.optional);
1719
+ function C(e) {
1720
+ let t = f.value[e];
1721
+ return !t || t.disabled ? !1 : !l.linear || e <= d.value || f.value.slice(0, e).every((e) => e.completed || e.optional);
1649
1722
  }
1650
1723
  function T(e) {
1651
- e < 0 || e >= p.value.length || w(e) && (f.value = e, u("update:activeStep", e));
1724
+ e < 0 || e >= f.value.length || C(e) && (d.value = e, u("update:activeStep", e));
1652
1725
  }
1653
1726
  function E() {
1654
- T(f.value + 1);
1727
+ T(d.value + 1);
1655
1728
  }
1656
1729
  function D() {
1657
- let e = f.value - 1;
1658
- e >= 0 && !p.value[e]?.disabled && (f.value = e, u("update:activeStep", e));
1730
+ let e = d.value - 1;
1731
+ e >= 0 && !f.value[e]?.disabled && (d.value = e, u("update:activeStep", e));
1659
1732
  }
1660
- _(J, {
1661
- activeStep: f,
1662
- steps: p,
1733
+ y(Y, {
1734
+ activeStep: d,
1735
+ steps: f,
1663
1736
  linear: m,
1664
1737
  registerStep: h,
1665
- unregisterStep: x,
1666
- updateStep: C,
1738
+ unregisterStep: g,
1739
+ updateStep: _,
1667
1740
  goTo: T,
1668
1741
  next: E,
1669
1742
  prev: D
1670
1743
  });
1671
- let k = t(() => ["atl-stepper", `orientation-${l.orientation}`]);
1672
- function A(e) {
1673
- return f.value > e || p.value[e]?.completed;
1674
- }
1675
- return (t, s) => (g(), i("div", { class: d(k.value) }, [a("ol", Gt, [(g(!0), i(e, null, y(p.value, (t, s) => (g(), i(e, { key: t.id }, [a("li", { class: d(["step-item", {
1676
- "is-active": f.value === s,
1677
- "is-completed": t.completed && f.value !== s,
1678
- "is-error": t.error,
1679
- "is-disabled": t.disabled
1680
- }]) }, [a("button", {
1681
- id: `atl-step-${s}`,
1744
+ let O = r(() => ["atl-stepper", `orientation-${l.orientation}`]);
1745
+ function k(e) {
1746
+ return d.value > e || f.value[e]?.completed;
1747
+ }
1748
+ return (e, n) => (v(), o("div", { class: p(O.value) }, [s("ol", Kt, [(v(!0), o(t, null, x(f.value, (e, n) => (v(), o(t, { key: e.id }, [s("li", { class: p(["step-item", {
1749
+ "is-active": d.value === n,
1750
+ "is-completed": e.completed && d.value !== n,
1751
+ "is-error": e.error,
1752
+ "is-disabled": e.disabled
1753
+ }]) }, [s("button", {
1754
+ id: `atl-step-${n}`,
1682
1755
  type: "button",
1683
1756
  class: "step-circle",
1684
- "aria-label": t.label,
1685
- "aria-current": f.value === s ? "step" : void 0,
1686
- disabled: !w(s),
1687
- onClick: (e) => T(s)
1688
- }, [t.completed && !t.error ? (g(), n(R, {
1757
+ "aria-label": e.label,
1758
+ "aria-current": d.value === n ? "step" : void 0,
1759
+ disabled: !C(n),
1760
+ onClick: (e) => T(n)
1761
+ }, [e.completed && !e.error ? (v(), i(z, {
1689
1762
  key: 0,
1690
1763
  name: "check",
1691
1764
  size: "sm"
1692
- })) : t.error ? (g(), n(R, {
1765
+ })) : e.error ? (v(), i(z, {
1693
1766
  key: 1,
1694
1767
  name: "close",
1695
1768
  size: "sm"
1696
- })) : (g(), i(e, { key: 2 }, [o(S(s + 1), 1)], 64))], 8, Kt), a("div", qt, [
1697
- a("span", Jt, S(t.label), 1),
1698
- t.description ? (g(), i("span", Yt, S(t.description), 1)) : r("", !0),
1699
- t.optional && !t.completed ? (g(), i("span", Xt, "Optional")) : r("", !0)
1700
- ])], 2), s < p.value.length - 1 ? (g(), i("li", {
1769
+ })) : (v(), o(t, { key: 2 }, [c(w(n + 1), 1)], 64))], 8, qt), s("div", Jt, [
1770
+ s("span", Yt, w(e.label), 1),
1771
+ e.description ? (v(), o("span", Xt, w(e.description), 1)) : a("", !0),
1772
+ e.optional && !e.completed ? (v(), o("span", Zt, "Optional")) : a("", !0)
1773
+ ])], 2), n < f.value.length - 1 ? (v(), o("li", {
1701
1774
  key: 0,
1702
- class: d(["step-connector", { "is-active": A(s) }]),
1775
+ class: p(["step-connector", { "is-active": k(n) }]),
1703
1776
  "aria-hidden": "true"
1704
- }, null, 2)) : r("", !0)], 64))), 128))]), a("div", Zt, [b(t.$slots, "default")])], 2));
1777
+ }, null, 2)) : a("", !0)], 64))), 128))]), s("div", Qt, [S(e.$slots, "default")])], 2));
1705
1778
  }
1706
- }), $t = ["aria-labelledby", "hidden"], en = /* @__PURE__ */ c({
1779
+ }), en = ["aria-labelledby", "hidden"], tn = /* @__PURE__ */ u({
1707
1780
  name: "AtlStep",
1708
1781
  __name: "atl-step",
1709
1782
  props: {
@@ -1727,39 +1800,39 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1727
1800
  }
1728
1801
  },
1729
1802
  setup(e) {
1730
- let n = e, a = l(J), o = T();
1731
- m(() => {
1732
- a.registerStep({
1733
- id: o,
1734
- label: n.label,
1735
- description: n.description,
1736
- completed: n.completed,
1737
- error: n.error,
1738
- optional: n.optional,
1739
- disabled: n.disabled
1803
+ let t = e, n = d(Y), i = D();
1804
+ g(() => {
1805
+ n.registerStep({
1806
+ id: i,
1807
+ label: t.label,
1808
+ description: t.description,
1809
+ completed: t.completed,
1810
+ error: t.error,
1811
+ optional: t.optional,
1812
+ disabled: t.disabled
1740
1813
  });
1741
- }), p(() => {
1742
- a.unregisterStep(o);
1743
- }), O(() => ({
1744
- label: n.label,
1745
- description: n.description,
1746
- completed: n.completed,
1747
- error: n.error,
1748
- optional: n.optional,
1749
- disabled: n.disabled
1814
+ }), h(() => {
1815
+ n.unregisterStep(i);
1816
+ }), A(() => ({
1817
+ label: t.label,
1818
+ description: t.description,
1819
+ completed: t.completed,
1820
+ error: t.error,
1821
+ optional: t.optional,
1822
+ disabled: t.disabled
1750
1823
  }), (e) => {
1751
- a.updateStep(o, e);
1824
+ n.updateStep(i, e);
1752
1825
  });
1753
- let s = t(() => a.steps.value.findIndex((e) => e.id === o)), c = t(() => s.value === a.activeStep.value);
1754
- return (e, t) => s.value >= 0 ? (g(), i("div", {
1826
+ let s = r(() => n.steps.value.findIndex((e) => e.id === i)), c = r(() => s.value === n.activeStep.value);
1827
+ return (e, t) => s.value >= 0 ? (v(), o("div", {
1755
1828
  key: 0,
1756
1829
  role: "region",
1757
1830
  class: "step-panel",
1758
1831
  "aria-labelledby": `atl-step-${s.value}`,
1759
1832
  hidden: !c.value
1760
- }, [b(e.$slots, "default")], 8, $t)) : r("", !0);
1833
+ }, [S(e.$slots, "default")], 8, en)) : a("", !0);
1761
1834
  }
1762
- }), tn = ["aria-label"], nn = /* @__PURE__ */ c({
1835
+ }), nn = ["aria-label"], rn = /* @__PURE__ */ u({
1763
1836
  name: "AtlTable",
1764
1837
  __name: "atl-table",
1765
1838
  props: {
@@ -1772,26 +1845,26 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1772
1845
  ariaLabel: { default: void 0 }
1773
1846
  },
1774
1847
  setup(e) {
1775
- let n = e, r = t(() => [
1848
+ let t = e, n = r(() => [
1776
1849
  "atl-table",
1777
- `variant-${n.variant}`,
1778
- `size-${n.size}`,
1779
- n.stickyHeader && "is-sticky-header"
1850
+ `variant-${t.variant}`,
1851
+ `size-${t.size}`,
1852
+ t.stickyHeader && "is-sticky-header"
1780
1853
  ]);
1781
- return (t, n) => (g(), i("div", { class: d(r.value) }, [a("div", {
1854
+ return (t, r) => (v(), o("div", { class: p(n.value) }, [s("div", {
1782
1855
  class: "atl-table-wrapper",
1783
1856
  tabindex: "0",
1784
1857
  role: "region",
1785
1858
  "aria-label": e.ariaLabel ?? "Table"
1786
- }, [a("table", null, [b(t.$slots, "default")])], 8, tn)], 2));
1859
+ }, [s("table", null, [S(t.$slots, "default")])], 8, nn)], 2));
1787
1860
  }
1788
- }), rn = /* @__PURE__ */ c({
1861
+ }), an = /* @__PURE__ */ u({
1789
1862
  name: "AtlThead",
1790
1863
  __name: "atl-thead",
1791
1864
  setup(e) {
1792
- return (e, t) => (g(), i("thead", null, [b(e.$slots, "default")]));
1865
+ return (e, t) => (v(), o("thead", null, [S(e.$slots, "default")]));
1793
1866
  }
1794
- }), an = { key: 1 }, on = ["colspan"], sn = /* @__PURE__ */ c({
1867
+ }), on = { key: 1 }, sn = ["colspan"], cn = /* @__PURE__ */ u({
1795
1868
  name: "AtlTbody",
1796
1869
  __name: "atl-tbody",
1797
1870
  props: {
@@ -1802,15 +1875,15 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1802
1875
  colSpan: { default: 1 }
1803
1876
  },
1804
1877
  setup(e) {
1805
- return (t, n) => (g(), i("tbody", null, [e.empty ? (g(), i("tr", an, [a("td", {
1878
+ return (t, n) => (v(), o("tbody", null, [e.empty ? (v(), o("tr", on, [s("td", {
1806
1879
  colspan: e.colSpan,
1807
1880
  class: "atl-tbody-empty-cell"
1808
- }, [b(t.$slots, "empty")], 8, on)])) : b(t.$slots, "default", {}, void 0, void 0, 0)]));
1881
+ }, [S(t.$slots, "empty")], 8, sn)])) : S(t.$slots, "default", {}, void 0, void 0, 0)]));
1809
1882
  }
1810
- }), cn = ["aria-selected"], ln = {
1883
+ }), ln = ["aria-selected"], un = {
1811
1884
  key: 0,
1812
1885
  class: "atl-tr-select-cell"
1813
- }, un = /* @__PURE__ */ c({
1886
+ }, dn = /* @__PURE__ */ u({
1814
1887
  name: "AtlTr",
1815
1888
  __name: "atl-tr",
1816
1889
  props: {
@@ -1826,18 +1899,18 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1826
1899
  emits: ["update:selected"],
1827
1900
  setup(e, { emit: t }) {
1828
1901
  let n = t;
1829
- return (t, a) => (g(), i("tr", {
1902
+ return (t, r) => (v(), o("tr", {
1830
1903
  "aria-selected": e.selectable ? e.selected : void 0,
1831
- class: d({ "is-selected": e.selected })
1832
- }, [e.selectable ? (g(), i("td", ln, [s(V, {
1904
+ class: p({ "is-selected": e.selected })
1905
+ }, [e.selectable ? (v(), o("td", un, [l(H, {
1833
1906
  checked: e.selected,
1834
- "onUpdate:checked": a[0] ||= (e) => n("update:selected", e)
1835
- }, null, 8, ["checked"])])) : r("", !0), b(t.$slots, "default")], 10, cn));
1907
+ "onUpdate:checked": r[0] ||= (e) => n("update:selected", e)
1908
+ }, null, 8, ["checked"])])) : a("", !0), S(t.$slots, "default")], 10, ln));
1836
1909
  }
1837
- }), dn = ["aria-sort"], fn = {
1910
+ }), fn = ["aria-sort"], pn = {
1838
1911
  class: "atl-th-sort-icon",
1839
1912
  "aria-hidden": "true"
1840
- }, pn = /* @__PURE__ */ c({
1913
+ }, mn = /* @__PURE__ */ u({
1841
1914
  name: "AtlTh",
1842
1915
  __name: "atl-th",
1843
1916
  props: {
@@ -1850,54 +1923,54 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1850
1923
  width: { default: void 0 }
1851
1924
  },
1852
1925
  emits: ["sort"],
1853
- setup(e, { emit: n }) {
1854
- let r = e, o = n, c = t(() => [
1855
- `align-${r.align}`,
1856
- r.sortDirection && "is-sorted",
1857
- r.sortDirection === "asc" && "sort-asc",
1858
- r.sortDirection === "desc" && "sort-desc"
1859
- ].filter(Boolean)), l = t(() => {
1860
- if (r.sortable) return r.sortDirection === "asc" ? "ascending" : r.sortDirection === "desc" ? "descending" : "none";
1926
+ setup(e, { emit: t }) {
1927
+ let n = e, i = t, a = r(() => [
1928
+ `align-${n.align}`,
1929
+ n.sortDirection && "is-sorted",
1930
+ n.sortDirection === "asc" && "sort-asc",
1931
+ n.sortDirection === "desc" && "sort-desc"
1932
+ ].filter(Boolean)), c = r(() => {
1933
+ if (n.sortable) return n.sortDirection === "asc" ? "ascending" : n.sortDirection === "desc" ? "descending" : "none";
1861
1934
  });
1862
1935
  function u() {
1863
- let e = r.sortDirection === null ? "asc" : r.sortDirection === "asc" ? "desc" : null;
1864
- o("sort", e);
1865
- }
1866
- return (t, n) => (g(), i("th", {
1867
- class: d(c.value),
1868
- "aria-sort": l.value,
1869
- style: f(e.width ? { width: e.width } : void 0)
1870
- }, [e.sortable ? (g(), i("button", {
1936
+ let e = n.sortDirection === null ? "asc" : n.sortDirection === "asc" ? "desc" : null;
1937
+ i("sort", e);
1938
+ }
1939
+ return (t, n) => (v(), o("th", {
1940
+ class: p(a.value),
1941
+ "aria-sort": c.value,
1942
+ style: m(e.width ? { width: e.width } : void 0)
1943
+ }, [e.sortable ? (v(), o("button", {
1871
1944
  key: 0,
1872
1945
  type: "button",
1873
1946
  class: "atl-th-sort-btn",
1874
1947
  onClick: u
1875
- }, [b(t.$slots, "default"), a("span", fn, [s(R, {
1948
+ }, [S(t.$slots, "default"), s("span", pn, [l(z, {
1876
1949
  name: "sort-asc",
1877
1950
  size: "sm",
1878
1951
  class: "atl-th-sort-asc-arrow"
1879
- }), s(R, {
1952
+ }), l(z, {
1880
1953
  name: "sort-desc",
1881
1954
  size: "sm",
1882
1955
  class: "atl-th-sort-desc-arrow"
1883
- })])])) : b(t.$slots, "default", {}, void 0, void 0, 1)], 14, dn));
1956
+ })])])) : S(t.$slots, "default", {}, void 0, void 0, 1)], 14, fn));
1884
1957
  }
1885
- }), mn = /* @__PURE__ */ c({
1958
+ }), hn = /* @__PURE__ */ u({
1886
1959
  name: "AtlTd",
1887
1960
  __name: "atl-td",
1888
1961
  props: { align: { default: "start" } },
1889
1962
  setup(e) {
1890
- let n = e, r = t(() => [`align-${n.align}`]);
1891
- return (e, t) => (g(), i("td", { class: d(r.value) }, [b(e.$slots, "default")], 2));
1963
+ let t = e, n = r(() => [`align-${t.align}`]);
1964
+ return (e, t) => (v(), o("td", { class: p(n.value) }, [S(e.$slots, "default")], 2));
1892
1965
  }
1893
- }), hn = [
1966
+ }), gn = [
1894
1967
  "id",
1895
1968
  "aria-selected",
1896
1969
  "aria-controls",
1897
1970
  "tabindex",
1898
1971
  "disabled",
1899
1972
  "onClick"
1900
- ], gn = { class: "tab-panels" }, Y = Symbol("AtlTabGroup"), _n = /* @__PURE__ */ c({
1973
+ ], _n = { class: "tab-panels" }, X = Symbol("AtlTabGroup"), vn = /* @__PURE__ */ u({
1901
1974
  name: "AtlTabGroup",
1902
1975
  __name: "atl-tab-group",
1903
1976
  props: {
@@ -1905,55 +1978,57 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1905
1978
  variant: { default: "default" }
1906
1979
  },
1907
1980
  emits: ["update:selectedIndex"],
1908
- setup(n, { emit: r }) {
1909
- let o = n, s = r, c = v(o.selectedIndex), l = v([]);
1910
- O(() => o.selectedIndex, (e) => {
1981
+ setup(e, { emit: n }) {
1982
+ let i = e, a = n, c = b(i.selectedIndex), l = b([]);
1983
+ A(() => i.selectedIndex, (e) => {
1911
1984
  c.value = e;
1912
1985
  });
1913
1986
  function u(e) {
1914
1987
  l.value.push(e);
1915
1988
  }
1916
- function f(e) {
1989
+ function d(e) {
1917
1990
  l.value = l.value.filter((t) => t.id !== e);
1918
1991
  }
1919
- function p(e) {
1920
- c.value = e, s("update:selectedIndex", e);
1992
+ function f(e) {
1993
+ c.value = e, a("update:selectedIndex", e);
1921
1994
  }
1922
1995
  let m = `atl-tab-group-${Math.random().toString(36).slice(2, 9)}`;
1923
- _(Y, {
1996
+ y(X, {
1924
1997
  selectedIndex: c,
1925
1998
  tabs: l,
1926
1999
  registerTab: u,
1927
- unregisterTab: f,
1928
- selectTab: p,
2000
+ unregisterTab: d,
2001
+ selectTab: f,
1929
2002
  groupId: m
1930
2003
  });
1931
2004
  function h(e) {
1932
- let t = l.value.map((e, t) => ({
2005
+ let t = e.currentTarget, n = (e) => {
2006
+ f(e), t.querySelectorAll("[role=\"tab\"]")[e]?.focus();
2007
+ }, r = l.value.map((e, t) => ({
1933
2008
  i: t,
1934
2009
  disabled: e.disabled
1935
- })).filter((e) => !e.disabled).map((e) => e.i), n = t.indexOf(c.value);
2010
+ })).filter((e) => !e.disabled).map((e) => e.i), i = r.indexOf(c.value);
1936
2011
  if (e.key === "ArrowRight") {
1937
2012
  e.preventDefault();
1938
- let r = t[(n + 1) % t.length];
1939
- r !== void 0 && p(r);
2013
+ let t = r[(i + 1) % r.length];
2014
+ t !== void 0 && n(t);
1940
2015
  } else if (e.key === "ArrowLeft") {
1941
2016
  e.preventDefault();
1942
- let r = t[(n - 1 + t.length) % t.length];
1943
- r !== void 0 && p(r);
1944
- } else if (e.key === "Home") e.preventDefault(), t[0] !== void 0 && p(t[0]);
2017
+ let t = r[(i - 1 + r.length) % r.length];
2018
+ t !== void 0 && n(t);
2019
+ } else if (e.key === "Home") e.preventDefault(), r[0] !== void 0 && n(r[0]);
1945
2020
  else if (e.key === "End") {
1946
2021
  e.preventDefault();
1947
- let n = t[t.length - 1];
1948
- n !== void 0 && p(n);
2022
+ let t = r[r.length - 1];
2023
+ t !== void 0 && n(t);
1949
2024
  }
1950
2025
  }
1951
- let x = t(() => ["atl-tab-group", `variant-${o.variant}`]);
1952
- return (t, n) => (g(), i("div", { class: d(x.value) }, [a("div", {
2026
+ let g = r(() => ["atl-tab-group", `variant-${i.variant}`]);
2027
+ return (e, n) => (v(), o("div", { class: p(g.value) }, [s("div", {
1953
2028
  class: "tablist",
1954
2029
  role: "tablist",
1955
2030
  onKeydown: h
1956
- }, [(g(!0), i(e, null, y(l.value, (e, t) => (g(), i("button", {
2031
+ }, [(v(!0), o(t, null, x(l.value, (e, t) => (v(), o("button", {
1957
2032
  id: `${m}-tab-${t}`,
1958
2033
  key: e.id,
1959
2034
  role: "tab",
@@ -1961,20 +2036,20 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1961
2036
  "aria-controls": `${m}-panel-${t}`,
1962
2037
  tabindex: t === c.value ? 0 : -1,
1963
2038
  disabled: e.disabled,
1964
- class: d([
2039
+ class: p([
1965
2040
  "tab-button",
1966
2041
  t === c.value && "is-active",
1967
2042
  e.disabled && "is-disabled"
1968
2043
  ]),
1969
2044
  type: "button",
1970
- onClick: (n) => !e.disabled && p(t)
1971
- }, S(e.label), 11, hn))), 128))], 32), a("div", gn, [b(t.$slots, "default", { groupId: m })])], 2));
2045
+ onClick: (n) => !e.disabled && f(t)
2046
+ }, w(e.label), 11, gn))), 128))], 32), s("div", _n, [S(e.$slots, "default", { groupId: m })])], 2));
1972
2047
  }
1973
- }), vn = [
2048
+ }), yn = [
1974
2049
  "id",
1975
2050
  "hidden",
1976
2051
  "aria-labelledby"
1977
- ], yn = /* @__PURE__ */ c({
2052
+ ], bn = /* @__PURE__ */ u({
1978
2053
  name: "AtlTab",
1979
2054
  __name: "atl-tab",
1980
2055
  props: {
@@ -1985,28 +2060,28 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
1985
2060
  }
1986
2061
  },
1987
2062
  setup(e) {
1988
- let n = e, a = l(Y), o = T();
1989
- m(() => {
1990
- a.registerTab({
1991
- id: o,
1992
- label: n.label,
1993
- disabled: n.disabled
2063
+ let t = e, n = d(X), i = D();
2064
+ g(() => {
2065
+ n.registerTab({
2066
+ id: i,
2067
+ label: t.label,
2068
+ disabled: t.disabled
1994
2069
  });
1995
- }), p(() => {
1996
- a.unregisterTab(o);
2070
+ }), h(() => {
2071
+ n.unregisterTab(i);
1997
2072
  });
1998
- let s = t(() => a.tabs.value.findIndex((e) => e.id === o)), c = t(() => s.value === a.selectedIndex.value), u = t(() => s.value >= 0 ? `${a.groupId}-panel-${s.value}` : void 0), d = t(() => s.value >= 0 ? `${a.groupId}-tab-${s.value}` : void 0);
1999
- return (e, t) => s.value >= 0 ? (g(), i("div", {
2073
+ let s = r(() => n.tabs.value.findIndex((e) => e.id === i)), c = r(() => s.value === n.selectedIndex.value), l = r(() => s.value >= 0 ? `${n.groupId}-panel-${s.value}` : void 0), u = r(() => s.value >= 0 ? `${n.groupId}-tab-${s.value}` : void 0);
2074
+ return (e, t) => s.value >= 0 ? (v(), o("div", {
2000
2075
  key: 0,
2001
- id: u.value,
2076
+ id: l.value,
2002
2077
  role: "tabpanel",
2003
2078
  hidden: !c.value,
2004
2079
  class: "tab-panel",
2005
- "aria-labelledby": d.value,
2080
+ "aria-labelledby": u.value,
2006
2081
  tabindex: "0"
2007
- }, [b(e.$slots, "default")], 8, vn)) : r("", !0);
2082
+ }, [S(e.$slots, "default")], 8, yn)) : a("", !0);
2008
2083
  }
2009
- }), bn = ["for"], xn = { class: "textarea-field" }, Sn = [
2084
+ }), xn = ["for"], Sn = { class: "textarea-field" }, Cn = [
2010
2085
  "id",
2011
2086
  "value",
2012
2087
  "rows",
@@ -2018,7 +2093,7 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
2018
2093
  "aria-label",
2019
2094
  "aria-invalid",
2020
2095
  "aria-describedby"
2021
- ], Cn = ["id"], wn = /* @__PURE__ */ c({
2096
+ ], wn = ["id"], Tn = /* @__PURE__ */ u({
2022
2097
  name: "AtlTextarea",
2023
2098
  __name: "atl-textarea",
2024
2099
  props: {
@@ -2052,64 +2127,64 @@ var Me = ["aria-label", "aria-labelledby"], W = Symbol("AtlDialog"), Ne = /* @__
2052
2127
  ariaLabel: { default: "" }
2053
2128
  },
2054
2129
  emits: ["update:value"],
2055
- setup(o, { emit: s }) {
2056
- let c = o, l = T(), f = T(), p = s, h = v(null), _ = t(() => c.id || (c.label ? `textarea-${f}` : void 0));
2057
- function b() {
2058
- c.autoResize && h.value && (h.value.style.height = "auto", h.value.style.height = `${h.value.scrollHeight}px`);
2059
- }
2060
- O(() => c.value, async () => {
2061
- await u(), b();
2062
- }), m(() => {
2063
- b(), U(h.value, "AtlTextarea", "set label or aria-label, or associate a <label for> with the textarea id");
2130
+ setup(e, { emit: n }) {
2131
+ let c = e, l = D(), u = D(), d = n, m = b(null), h = r(() => c.id || (c.label ? `textarea-${u}` : void 0));
2132
+ function _() {
2133
+ c.autoResize && m.value && (m.value.style.height = "auto", m.value.style.height = `${m.value.scrollHeight}px`);
2134
+ }
2135
+ A(() => c.value, async () => {
2136
+ await f(), _();
2137
+ }), g(() => {
2138
+ _(), W(m.value, "AtlTextarea", "set label or aria-label, or associate a <label for> with the textarea id");
2064
2139
  });
2065
- function x(e) {
2066
- p("update:value", e.target.value), b();
2140
+ function y(e) {
2141
+ d("update:value", e.target.value), _();
2067
2142
  }
2068
- return (t, s) => (g(), i("div", { class: d(["atl-textarea", {
2069
- "is-invalid": o.invalid,
2070
- "is-disabled": o.disabled,
2071
- "is-readonly": o.readonly,
2072
- "is-auto-resize": o.autoResize
2143
+ return (n, r) => (v(), o("div", { class: p(["atl-textarea", {
2144
+ "is-invalid": e.invalid,
2145
+ "is-disabled": e.disabled,
2146
+ "is-readonly": e.readonly,
2147
+ "is-auto-resize": e.autoResize
2073
2148
  }]) }, [
2074
- o.label ? (g(), i("label", {
2149
+ e.label ? (v(), o("label", {
2075
2150
  key: 0,
2076
- for: _.value
2077
- }, S(o.label), 9, bn)) : r("", !0),
2078
- a("div", xn, [a("textarea", {
2079
- id: _.value,
2151
+ for: h.value
2152
+ }, w(e.label), 9, xn)) : a("", !0),
2153
+ s("div", Sn, [s("textarea", {
2154
+ id: h.value,
2080
2155
  ref_key: "textareaRef",
2081
- ref: h,
2082
- value: o.value,
2083
- rows: o.rows,
2084
- placeholder: o.placeholder,
2085
- disabled: o.disabled,
2086
- readonly: o.readonly,
2087
- required: o.required,
2088
- name: o.name,
2089
- "aria-label": o.ariaLabel || void 0,
2090
- "aria-invalid": o.invalid || void 0,
2091
- "aria-describedby": o.errors.length > 0 ? w(l) : void 0,
2092
- onInput: x
2093
- }, null, 40, Sn), o.invalid ? (g(), n(R, {
2156
+ ref: m,
2157
+ value: e.value,
2158
+ rows: e.rows,
2159
+ placeholder: e.placeholder,
2160
+ disabled: e.disabled,
2161
+ readonly: e.readonly,
2162
+ required: e.required,
2163
+ name: e.name,
2164
+ "aria-label": e.ariaLabel || void 0,
2165
+ "aria-invalid": e.invalid || void 0,
2166
+ "aria-describedby": e.errors.length > 0 ? E(l) : void 0,
2167
+ onInput: y
2168
+ }, null, 40, Cn), e.invalid ? (v(), i(z, {
2094
2169
  key: 0,
2095
2170
  name: "danger",
2096
2171
  size: "sm",
2097
2172
  class: "invalid-icon"
2098
- })) : r("", !0)]),
2099
- o.errors.length ? (g(), i("div", {
2173
+ })) : a("", !0)]),
2174
+ e.errors.length ? (v(), o("div", {
2100
2175
  key: 1,
2101
- id: w(l),
2176
+ id: E(l),
2102
2177
  class: "errors",
2103
2178
  "aria-live": "polite"
2104
- }, [(g(!0), i(e, null, y(o.errors, (e, t) => (g(), i("p", {
2179
+ }, [(v(!0), o(t, null, x(e.errors, (e, t) => (v(), o("p", {
2105
2180
  key: t,
2106
2181
  class: "error-message"
2107
- }, S(e), 1))), 128))], 8, Cn)) : r("", !0)
2182
+ }, w(E(V)(e)), 1))), 128))], 8, wn)) : a("", !0)
2108
2183
  ], 2));
2109
2184
  }
2110
- }), X = Symbol("AtlToast");
2111
- function Tn() {
2112
- let e = l(X);
2185
+ }), Z = Symbol("AtlToast");
2186
+ function En() {
2187
+ let e = d(Z);
2113
2188
  if (!e) throw Error("useAtlToast() must be called inside a component that is a descendant of AtlToastProvider.");
2114
2189
  return {
2115
2190
  show: e.show,
@@ -2119,11 +2194,11 @@ function Tn() {
2119
2194
  }
2120
2195
  //#endregion
2121
2196
  //#region libs/vue/src/lib/toast/atl-toast-provider.vue
2122
- var En = /* @__PURE__ */ c({
2197
+ var Dn = /* @__PURE__ */ u({
2123
2198
  name: "AtlToastProvider",
2124
2199
  __name: "atl-toast-provider",
2125
2200
  setup(e) {
2126
- let t = v([]), n = /* @__PURE__ */ new Map();
2201
+ let t = b([]), n = /* @__PURE__ */ new Map();
2127
2202
  function r(e, r = {}) {
2128
2203
  let a = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`, o = r.duration ?? 5e3, s = {
2129
2204
  id: a,
@@ -2149,55 +2224,55 @@ var En = /* @__PURE__ */ c({
2149
2224
  for (let e of n.values()) clearTimeout(e);
2150
2225
  n.clear(), t.value = [];
2151
2226
  }
2152
- return _(X, {
2227
+ return y(Z, {
2153
2228
  toasts: t,
2154
2229
  show: r,
2155
2230
  dismiss: i,
2156
2231
  clear: a
2157
- }), (e, t) => b(e.$slots, "default");
2232
+ }), (e, t) => S(e.$slots, "default");
2158
2233
  }
2159
- }), Dn = { class: "message" }, Z = /* @__PURE__ */ c({
2234
+ }), On = { class: "message" }, Q = /* @__PURE__ */ u({
2160
2235
  name: "AtlToastItem",
2161
2236
  __name: "atl-toast-item",
2162
2237
  props: { data: {} },
2163
2238
  emits: ["dismiss"],
2164
- setup(e, { emit: n }) {
2165
- let o = e, c = n, l = t(() => ["atl-toast", `variant-${o.data.variant}`]);
2166
- return (t, n) => (g(), i("div", {
2167
- class: d(l.value),
2239
+ setup(e, { emit: t }) {
2240
+ let n = e, i = t, c = r(() => ["atl-toast", `variant-${n.data.variant}`]);
2241
+ return (t, n) => (v(), o("div", {
2242
+ class: p(c.value),
2168
2243
  role: "status"
2169
- }, [a("span", Dn, S(e.data.message), 1), e.data.dismissible ? (g(), i("button", {
2244
+ }, [s("span", On, w(e.data.message), 1), e.data.dismissible ? (v(), o("button", {
2170
2245
  key: 0,
2171
2246
  class: "dismiss",
2172
2247
  type: "button",
2173
2248
  "aria-label": "Dismiss",
2174
- onClick: n[0] ||= (t) => c("dismiss", e.data.id)
2175
- }, [s(R, {
2249
+ onClick: n[0] ||= (t) => i("dismiss", e.data.id)
2250
+ }, [l(z, {
2176
2251
  name: "close",
2177
2252
  size: "sm"
2178
- })])) : r("", !0)], 2));
2253
+ })])) : a("", !0)], 2));
2179
2254
  }
2180
- }), On = /* @__PURE__ */ c({
2255
+ }), kn = /* @__PURE__ */ u({
2181
2256
  name: "AtlToastContainer",
2182
2257
  __name: "atl-toast-container",
2183
2258
  props: { position: { default: "bottom-right" } },
2184
- setup(r) {
2185
- let a = r, o = l(X), s = t(() => o.toasts.value);
2259
+ setup(e) {
2260
+ let n = e, a = d(Z), s = r(() => a.toasts.value);
2186
2261
  function c(e) {
2187
- o.dismiss(e);
2262
+ a.dismiss(e);
2188
2263
  }
2189
- let u = t(() => ["atl-toast-container", `position-${a.position}`]);
2190
- return (t, r) => (g(), i("div", {
2191
- class: d(u.value),
2264
+ let l = r(() => ["atl-toast-container", `position-${n.position}`]);
2265
+ return (e, n) => (v(), o("div", {
2266
+ class: p(l.value),
2192
2267
  "aria-live": "polite",
2193
2268
  role: "status"
2194
- }, [(g(!0), i(e, null, y(s.value, (e) => (g(), n(Z, {
2269
+ }, [(v(!0), o(t, null, x(s.value, (e) => (v(), i(Q, {
2195
2270
  key: e.id,
2196
2271
  data: e,
2197
- onDismiss: r[0] ||= (e) => c(e)
2272
+ onDismiss: n[0] ||= (e) => c(e)
2198
2273
  }, null, 8, ["data"]))), 128))], 2));
2199
2274
  }
2200
- }), kn = ["for"], An = [
2275
+ }), An = ["for"], jn = [
2201
2276
  "id",
2202
2277
  "checked",
2203
2278
  "disabled",
@@ -2206,7 +2281,7 @@ var En = /* @__PURE__ */ c({
2206
2281
  "aria-invalid",
2207
2282
  "aria-checked",
2208
2283
  "aria-describedby"
2209
- ], jn = ["id"], Mn = /* @__PURE__ */ c({
2284
+ ], Mn = ["id"], Nn = /* @__PURE__ */ u({
2210
2285
  name: "AtlToggle",
2211
2286
  __name: "atl-toggle",
2212
2287
  props: {
@@ -2231,45 +2306,45 @@ var En = /* @__PURE__ */ c({
2231
2306
  id: { default: "" }
2232
2307
  },
2233
2308
  emits: ["update:checked"],
2234
- setup(n, { emit: o }) {
2235
- let s = n, c = o, l = t(() => s.id || `toggle-${Math.random().toString(36).slice(2)}`), u = T();
2309
+ setup(e, { emit: n }) {
2310
+ let i = e, c = n, l = D(), u = r(() => i.id || `toggle-${l}`), d = D();
2236
2311
  function f(e) {
2237
2312
  c("update:checked", e.target.checked);
2238
2313
  }
2239
- return (t, o) => (g(), i("div", { class: d(["atl-toggle", {
2240
- "is-checked": n.checked,
2241
- "is-invalid": n.invalid,
2242
- "is-disabled": n.disabled
2243
- }]) }, [a("label", {
2244
- for: l.value,
2314
+ return (n, r) => (v(), o("div", { class: p(["atl-toggle", {
2315
+ "is-checked": e.checked,
2316
+ "is-invalid": e.invalid,
2317
+ "is-disabled": e.disabled
2318
+ }]) }, [s("label", {
2319
+ for: u.value,
2245
2320
  class: "toggle-label"
2246
2321
  }, [
2247
- a("input", {
2248
- id: l.value,
2322
+ s("input", {
2323
+ id: u.value,
2249
2324
  type: "checkbox",
2250
2325
  role: "switch",
2251
- checked: n.checked,
2252
- disabled: n.disabled,
2253
- required: n.required,
2254
- name: n.name,
2255
- "aria-invalid": n.invalid || void 0,
2256
- "aria-checked": n.checked,
2257
- "aria-describedby": n.errors.length > 0 ? w(u) : void 0,
2326
+ checked: e.checked,
2327
+ disabled: e.disabled,
2328
+ required: e.required,
2329
+ name: e.name,
2330
+ "aria-invalid": e.invalid || void 0,
2331
+ "aria-checked": e.checked,
2332
+ "aria-describedby": e.errors.length > 0 ? E(d) : void 0,
2258
2333
  onChange: f
2259
- }, null, 40, An),
2260
- o[0] ||= a("span", { class: "track" }, [a("span", { class: "thumb" })], -1),
2261
- b(t.$slots, "default")
2262
- ], 8, kn), n.errors.length ? (g(), i("div", {
2334
+ }, null, 40, jn),
2335
+ r[0] ||= s("span", { class: "track" }, [s("span", { class: "thumb" })], -1),
2336
+ S(n.$slots, "default")
2337
+ ], 8, An), e.errors.length ? (v(), o("div", {
2263
2338
  key: 0,
2264
- id: w(u),
2339
+ id: E(d),
2265
2340
  class: "errors",
2266
2341
  "aria-live": "polite"
2267
- }, [(g(!0), i(e, null, y(n.errors, (e, t) => (g(), i("p", {
2342
+ }, [(v(!0), o(t, null, x(e.errors, (e, t) => (v(), o("p", {
2268
2343
  key: t,
2269
2344
  class: "error-message"
2270
- }, S(e), 1))), 128))], 8, jn)) : r("", !0)], 2));
2345
+ }, w(E(V)(e)), 1))), 128))], 8, Mn)) : a("", !0)], 2));
2271
2346
  }
2272
- }), Nn = /* @__PURE__ */ c({
2347
+ }), Pn = /* @__PURE__ */ u({
2273
2348
  name: "AtlTooltip",
2274
2349
  __name: "atl-tooltip",
2275
2350
  props: {
@@ -2283,37 +2358,43 @@ var En = /* @__PURE__ */ c({
2283
2358
  atlTooltipHideDelay: { default: 0 }
2284
2359
  },
2285
2360
  setup(e) {
2286
- let t = e, n = v(!1), a = null, o = null;
2287
- function s() {
2288
- a &&= (clearTimeout(a), null), o &&= (clearTimeout(o), null);
2361
+ let t = e, n = b(!1), r = b(null), i = `tooltip-${D()}`, s = null, c = null;
2362
+ function l() {
2363
+ s &&= (clearTimeout(s), null), c &&= (clearTimeout(c), null);
2289
2364
  }
2290
- function c() {
2291
- !t.atlTooltipDisabled && t.atlTooltip && (s(), a = setTimeout(() => {
2365
+ function u() {
2366
+ !t.atlTooltipDisabled && t.atlTooltip && (l(), s = setTimeout(() => {
2292
2367
  n.value = !0;
2293
2368
  }, t.atlTooltipShowDelay));
2294
2369
  }
2295
- function l() {
2296
- s(), o = setTimeout(() => {
2370
+ function d() {
2371
+ l(), c = setTimeout(() => {
2297
2372
  n.value = !1;
2298
2373
  }, t.atlTooltipHideDelay);
2299
2374
  }
2300
- function u(e) {
2301
- e.key === "Escape" && (s(), n.value = !1);
2302
- }
2303
- return h(() => s()), (t, a) => (g(), i("span", {
2375
+ function f(e) {
2376
+ e.key === "Escape" && (l(), n.value = !1);
2377
+ }
2378
+ return A(n, (e) => {
2379
+ let t = r.value?.firstElementChild;
2380
+ t && (e ? t.setAttribute("aria-describedby", i) : t.removeAttribute("aria-describedby"));
2381
+ }, { flush: "post" }), _(() => l()), (t, s) => (v(), o("span", {
2382
+ ref_key: "wrapper",
2383
+ ref: r,
2304
2384
  class: "atl-tooltip-wrapper",
2305
- onMouseenter: c,
2306
- onMouseleave: l,
2307
- onFocusin: c,
2308
- onFocusout: l,
2309
- onKeydown: u
2310
- }, [b(t.$slots, "default"), n.value && !e.atlTooltipDisabled && e.atlTooltip ? (g(), i("div", {
2385
+ onMouseenter: u,
2386
+ onMouseleave: d,
2387
+ onFocusin: u,
2388
+ onFocusout: d,
2389
+ onKeydown: f
2390
+ }, [S(t.$slots, "default"), n.value && !e.atlTooltipDisabled && e.atlTooltip ? (v(), o("div", {
2311
2391
  key: 0,
2392
+ id: i,
2312
2393
  role: "tooltip",
2313
- class: d(`atl-tooltip position-${e.atlTooltipPosition}`)
2314
- }, S(e.atlTooltip), 3)) : r("", !0)], 32));
2394
+ class: p(`atl-tooltip position-${e.atlTooltipPosition}`)
2395
+ }, w(e.atlTooltip), 3)) : a("", !0)], 544));
2315
2396
  }
2316
- }), Pn = { class: "atl-code-block" }, Fn = { class: "code-block-header" }, In = { class: "code-block-label" }, Ln = ["aria-label"], Rn = { class: "code-block-body" }, zn = { class: "code-block-pre" }, Bn = { class: "code-line-number" }, Vn = { class: "code-line-text" }, Q = /* @__PURE__ */ c({
2397
+ }), Fn = { class: "atl-code-block" }, In = { class: "code-block-header" }, Ln = { class: "code-block-label" }, Rn = ["aria-label"], zn = { class: "code-block-body" }, Bn = { class: "code-block-pre" }, Vn = { class: "code-line-number" }, Hn = { class: "code-line-text" }, Un = /* @__PURE__ */ u({
2317
2398
  name: "AtlCodeBlock",
2318
2399
  __name: "atl-code-block",
2319
2400
  props: {
@@ -2329,33 +2410,33 @@ var En = /* @__PURE__ */ c({
2329
2410
  default: !1
2330
2411
  }
2331
2412
  },
2332
- setup(n) {
2333
- let c = n, l = v(!1), u = t(() => c.filename || c.language), d = t(() => c.code.split("\n"));
2413
+ setup(e) {
2414
+ let n = e, i = b(!1), u = r(() => n.filename || n.language), d = r(() => n.code.split("\n"));
2334
2415
  function f() {
2335
- navigator.clipboard.writeText(c.code).then(() => {
2336
- l.value = !0, setTimeout(() => {
2337
- l.value = !1;
2416
+ navigator.clipboard.writeText(n.code).then(() => {
2417
+ i.value = !0, setTimeout(() => {
2418
+ i.value = !1;
2338
2419
  }, 1800);
2339
2420
  });
2340
2421
  }
2341
- return (t, c) => (g(), i("div", Pn, [a("div", Fn, [a("span", In, S(u.value), 1), n.copyable ? (g(), i("button", {
2422
+ return (n, r) => (v(), o("div", Fn, [s("div", In, [s("span", Ln, w(u.value), 1), e.copyable ? (v(), o("button", {
2342
2423
  key: 0,
2343
2424
  class: "code-block-copy",
2344
2425
  type: "button",
2345
- "aria-label": l.value ? "Copied" : "Copy code",
2426
+ "aria-label": i.value ? "Copied" : "Copy code",
2346
2427
  onClick: f
2347
- }, [l.value ? (g(), i(e, { key: 0 }, [s(R, {
2428
+ }, [i.value ? (v(), o(t, { key: 0 }, [l(z, {
2348
2429
  name: "check",
2349
2430
  size: "sm"
2350
- }), c[0] ||= o(" Copied ", -1)], 64)) : (g(), i(e, { key: 1 }, [s(R, {
2431
+ }), r[0] ||= c(" Copied ", -1)], 64)) : (v(), o(t, { key: 1 }, [l(z, {
2351
2432
  name: "copy",
2352
2433
  size: "sm"
2353
- }), c[1] ||= o(" Copy ", -1)], 64))], 8, Ln)) : r("", !0)]), a("div", Rn, [a("pre", zn, [a("code", null, [n.showLineNumbers ? (g(!0), i(e, { key: 0 }, y(d.value, (e, t) => (g(), i("span", {
2434
+ }), r[1] ||= c(" Copy ", -1)], 64))], 8, Rn)) : a("", !0)]), s("div", zn, [s("pre", Bn, [s("code", null, [e.showLineNumbers ? (v(!0), o(t, { key: 0 }, x(d.value, (e, t) => (v(), o("span", {
2354
2435
  key: t,
2355
2436
  class: "code-line"
2356
- }, [a("span", Bn, S(t + 1), 1), a("span", Vn, S(e), 1)]))), 128)) : (g(), i(e, { key: 1 }, [o(S(n.code), 1)], 64))])])])]));
2437
+ }, [s("span", Vn, w(t + 1), 1), s("span", Hn, w(e), 1)]))), 128)) : (v(), o(t, { key: 1 }, [c(w(e.code), 1)], 64))])])])]));
2357
2438
  }
2358
- }), Hn = ["aria-labelledby"], Un = ["aria-labelledby"], Wn = ["aria-label", "aria-expanded"], Gn = ["aria-labelledby"], $ = Symbol("AtlChat"), Kn = /* @__PURE__ */ c({
2439
+ }), Wn = ["aria-labelledby"], Gn = ["aria-labelledby"], Kn = ["aria-label", "aria-expanded"], qn = ["aria-labelledby"], $ = Symbol("AtlChat"), Jn = /* @__PURE__ */ u({
2359
2440
  name: "AtlChat",
2360
2441
  __name: "atl-chat",
2361
2442
  props: {
@@ -2367,114 +2448,114 @@ var En = /* @__PURE__ */ c({
2367
2448
  }
2368
2449
  },
2369
2450
  emits: ["update:open"],
2370
- setup(n, { emit: o }) {
2371
- let s = n, c = o, l = v(null), f = D("hostRef"), p = T(), h = C(s, "status");
2372
- function y() {
2451
+ setup(e, { emit: n }) {
2452
+ let i = e, c = n, l = b(null), u = k("hostRef"), d = D(), m = T(i, "status");
2453
+ function h() {
2373
2454
  c("update:open", !1);
2374
2455
  }
2375
- function x() {
2376
- c("update:open", !s.open);
2377
- }
2378
- _($, {
2379
- headerId: p,
2380
- status: h,
2381
- close: y,
2382
- toggle: x
2383
- }), m(() => {
2384
- s.variant === "drawer" && s.open && l.value && l.value.showModal();
2385
- }), O(() => s.open, (e) => {
2386
- if (s.variant !== "drawer") return;
2456
+ function _() {
2457
+ c("update:open", !i.open);
2458
+ }
2459
+ y($, {
2460
+ headerId: d,
2461
+ status: m,
2462
+ close: h,
2463
+ toggle: _
2464
+ }), g(() => {
2465
+ i.variant === "drawer" && i.open && l.value && l.value.showModal();
2466
+ }), A(() => i.open, (e) => {
2467
+ if (i.variant !== "drawer") return;
2387
2468
  let t = l.value;
2388
2469
  t && (e ? t.open || t.showModal() : t.open && t.close());
2389
- }, { flush: "post" }), O(() => s.open, async (e) => {
2390
- e && s.variant !== "inline" && (await u(), requestAnimationFrame(() => {
2391
- f.value?.querySelector("textarea")?.focus();
2470
+ }, { flush: "post" }), A(() => i.open, async (e) => {
2471
+ e && i.variant !== "inline" && (await f(), requestAnimationFrame(() => {
2472
+ u.value?.querySelector("textarea")?.focus();
2392
2473
  }));
2393
2474
  }, {
2394
2475
  flush: "post",
2395
2476
  immediate: !0
2396
2477
  });
2397
- function S() {
2478
+ function x() {
2398
2479
  c("update:open", !1);
2399
2480
  }
2400
- function E(e) {
2481
+ function C(e) {
2401
2482
  e.preventDefault(), c("update:open", !1);
2402
2483
  }
2403
- function k(e) {
2484
+ function w(e) {
2404
2485
  e.target === l.value && c("update:open", !1);
2405
2486
  }
2406
- let j = t(() => [
2487
+ let O = r(() => [
2407
2488
  "atl-chat",
2408
- `variant-${s.variant}`,
2409
- `status-${s.status}`,
2410
- s.open && "is-open"
2489
+ `variant-${i.variant}`,
2490
+ `status-${i.status}`,
2491
+ i.open && "is-open"
2411
2492
  ]);
2412
- return (t, o) => (g(), i("div", {
2493
+ return (n, r) => (v(), o("div", {
2413
2494
  ref_key: "hostRef",
2414
- ref: f,
2415
- class: d(j.value)
2416
- }, [n.variant === "drawer" ? (g(), i("dialog", {
2495
+ ref: u,
2496
+ class: p(O.value)
2497
+ }, [e.variant === "drawer" ? (v(), o("dialog", {
2417
2498
  key: 0,
2418
2499
  ref_key: "dialogRef",
2419
2500
  ref: l,
2420
- "aria-labelledby": w(p),
2501
+ "aria-labelledby": E(d),
2421
2502
  "aria-modal": "true",
2422
- onClose: S,
2423
- onCancel: E,
2424
- onClick: k
2425
- }, [a("div", {
2503
+ onClose: x,
2504
+ onCancel: C,
2505
+ onClick: w
2506
+ }, [s("div", {
2426
2507
  class: "surface drawer-surface",
2427
- onClick: o[0] ||= A(() => {}, ["stop"])
2428
- }, [b(t.$slots, "default")])], 40, Hn)) : n.variant === "popup" ? (g(), i(e, { key: 1 }, [n.open ? (g(), i("div", {
2508
+ onClick: r[0] ||= j(() => {}, ["stop"])
2509
+ }, [S(n.$slots, "default")])], 40, Wn)) : e.variant === "popup" ? (v(), o(t, { key: 1 }, [e.open ? (v(), o("div", {
2429
2510
  key: 0,
2430
2511
  class: "surface popup-surface",
2431
2512
  role: "dialog",
2432
- "aria-labelledby": w(p)
2433
- }, [b(t.$slots, "default")], 8, Un)) : r("", !0), a("button", {
2513
+ "aria-labelledby": E(d)
2514
+ }, [S(n.$slots, "default")], 8, Gn)) : a("", !0), s("button", {
2434
2515
  type: "button",
2435
2516
  class: "fab-bubble",
2436
- "aria-label": n.open ? "Close AI assistant" : "Open AI assistant",
2437
- "aria-expanded": n.open,
2438
- onClick: x
2439
- }, [...o[1] ||= [a("span", { "aria-hidden": "true" }, "AI", -1)]], 8, Wn)], 64)) : (g(), i("section", {
2517
+ "aria-label": e.open ? "Close AI assistant" : "Open AI assistant",
2518
+ "aria-expanded": e.open,
2519
+ onClick: _
2520
+ }, [...r[1] ||= [s("span", { "aria-hidden": "true" }, "AI", -1)]], 8, Kn)], 64)) : (v(), o("section", {
2440
2521
  key: 2,
2441
2522
  class: "surface inline-surface",
2442
- "aria-labelledby": w(p)
2443
- }, [b(t.$slots, "default")], 8, Gn))], 2));
2523
+ "aria-labelledby": E(d)
2524
+ }, [S(n.$slots, "default")], 8, qn))], 2));
2444
2525
  }
2445
- }), qn = ["id"], Jn = { class: "title-block" }, Yn = /* @__PURE__ */ c({
2526
+ }), Yn = ["id"], Xn = { class: "title-block" }, Zn = /* @__PURE__ */ u({
2446
2527
  name: "AtlChatHeader",
2447
2528
  __name: "atl-chat-header",
2448
2529
  setup(e) {
2449
- let t = l($, {
2530
+ let t = d($, {
2450
2531
  headerId: "",
2451
- status: v("idle"),
2532
+ status: b("idle"),
2452
2533
  close: () => void 0,
2453
2534
  toggle: () => void 0
2454
2535
  });
2455
- return (e, n) => (g(), i("div", {
2456
- id: w(t).headerId,
2536
+ return (e, n) => (v(), o("div", {
2537
+ id: E(t).headerId,
2457
2538
  class: "atl-chat-header"
2458
- }, [a("div", Jn, [b(e.$slots, "default")]), a("button", {
2539
+ }, [s("div", Xn, [S(e.$slots, "default")]), s("button", {
2459
2540
  type: "button",
2460
2541
  class: "close-btn",
2461
2542
  "aria-label": "Close chat",
2462
- onClick: n[0] ||= (e) => w(t).close()
2463
- }, [s(R, {
2543
+ onClick: n[0] ||= (e) => E(t).close()
2544
+ }, [l(z, {
2464
2545
  name: "close",
2465
2546
  size: "sm"
2466
- })])], 8, qn));
2547
+ })])], 8, Yn));
2467
2548
  }
2468
- }), Xn = {
2549
+ }), Qn = {
2469
2550
  class: "messages-list",
2470
2551
  role: "list",
2471
2552
  "aria-label": "Messages"
2472
- }, Zn = /* @__PURE__ */ c({
2553
+ }, $n = /* @__PURE__ */ u({
2473
2554
  name: "AtlChatMessages",
2474
2555
  __name: "atl-chat-messages",
2475
2556
  setup(e) {
2476
- let t = D("root"), n = null;
2477
- return m(() => {
2557
+ let t = k("root"), n = null;
2558
+ return g(() => {
2478
2559
  let e = t.value;
2479
2560
  if (!e) return;
2480
2561
  let r = () => {
@@ -2485,18 +2566,18 @@ var En = /* @__PURE__ */ c({
2485
2566
  subtree: !0,
2486
2567
  characterData: !0
2487
2568
  });
2488
- }), p(() => {
2569
+ }), h(() => {
2489
2570
  n?.disconnect(), n = null;
2490
- }), (e, n) => (g(), i("div", {
2571
+ }), (e, n) => (v(), o("div", {
2491
2572
  ref_key: "root",
2492
2573
  ref: t,
2493
2574
  class: "atl-chat-messages",
2494
2575
  role: "log",
2495
2576
  "aria-live": "polite",
2496
2577
  "aria-label": "Conversation"
2497
- }, [a("div", Xn, [b(e.$slots, "default")])], 512));
2578
+ }, [s("div", Qn, [S(e.$slots, "default")])], 512));
2498
2579
  }
2499
- }), Qn = /* @__PURE__ */ c({
2580
+ }), er = /* @__PURE__ */ u({
2500
2581
  name: "AtlChatMessage",
2501
2582
  __name: "atl-chat-message",
2502
2583
  props: {
@@ -2507,17 +2588,17 @@ var En = /* @__PURE__ */ c({
2507
2588
  }
2508
2589
  },
2509
2590
  setup(e) {
2510
- let n = e, r = t(() => [
2591
+ let t = e, n = r(() => [
2511
2592
  "atl-chat-message",
2512
- `role-${n.role}`,
2513
- n.failed && "is-failed"
2593
+ `role-${t.role}`,
2594
+ t.failed && "is-failed"
2514
2595
  ]);
2515
- return (e, t) => (g(), i("div", {
2596
+ return (e, t) => (v(), o("div", {
2516
2597
  role: "listitem",
2517
- class: d(r.value)
2518
- }, [b(e.$slots, "default")], 2));
2598
+ class: p(n.value)
2599
+ }, [S(e.$slots, "default")], 2));
2519
2600
  }
2520
- }), $n = /* @__PURE__ */ c({
2601
+ }), tr = /* @__PURE__ */ u({
2521
2602
  name: "AtlChatTyping",
2522
2603
  __name: "atl-chat-typing",
2523
2604
  props: { inline: {
@@ -2525,22 +2606,22 @@ var En = /* @__PURE__ */ c({
2525
2606
  default: !1
2526
2607
  } },
2527
2608
  setup(e) {
2528
- let n = e, r = t(() => ["atl-chat-typing", n.inline && "is-inline"]);
2529
- return (e, t) => (g(), i("div", {
2530
- class: d(r.value),
2609
+ let t = e, n = r(() => ["atl-chat-typing", t.inline && "is-inline"]);
2610
+ return (e, t) => (v(), o("div", {
2611
+ class: p(n.value),
2531
2612
  role: "status",
2532
2613
  "aria-live": "polite"
2533
2614
  }, [...t[0] ||= [
2534
- a("span", { class: "dot" }, null, -1),
2535
- a("span", { class: "dot" }, null, -1),
2536
- a("span", { class: "dot" }, null, -1),
2537
- a("span", { class: "sr-only" }, "Assistant is typing", -1)
2615
+ s("span", { class: "dot" }, null, -1),
2616
+ s("span", { class: "dot" }, null, -1),
2617
+ s("span", { class: "dot" }, null, -1),
2618
+ s("span", { class: "sr-only" }, "Assistant is typing", -1)
2538
2619
  ]], 2));
2539
2620
  }
2540
- }), er = { class: "atl-chat-suggestion" }, tr = { class: "chip-label" }, nr = {
2621
+ }), nr = { class: "atl-chat-suggestion" }, rr = { class: "chip-label" }, ir = {
2541
2622
  key: 0,
2542
2623
  class: "chip-hint"
2543
- }, rr = /* @__PURE__ */ c({
2624
+ }, ar = /* @__PURE__ */ u({
2544
2625
  name: "AtlChatSuggestion",
2545
2626
  __name: "atl-chat-suggestion",
2546
2627
  props: {
@@ -2549,19 +2630,19 @@ var En = /* @__PURE__ */ c({
2549
2630
  },
2550
2631
  emits: ["selected"],
2551
2632
  setup(e, { emit: t }) {
2552
- let n = e, o = t;
2553
- return (e, t) => (g(), i("div", er, [a("button", {
2633
+ let n = e, r = t;
2634
+ return (e, t) => (v(), o("div", nr, [s("button", {
2554
2635
  type: "button",
2555
2636
  class: "chip",
2556
- onClick: t[0] ||= (e) => o("selected", n.label)
2557
- }, [a("span", tr, S(n.label), 1), n.hint ? (g(), i("span", nr, S(n.hint), 1)) : r("", !0)])]));
2637
+ onClick: t[0] ||= (e) => r("selected", n.label)
2638
+ }, [s("span", rr, w(n.label), 1), n.hint ? (v(), o("span", ir, w(n.hint), 1)) : a("", !0)])]));
2558
2639
  }
2559
- }), ir = { class: "atl-chat-input" }, ar = [
2640
+ }), or = { class: "atl-chat-input" }, sr = [
2560
2641
  "value",
2561
2642
  "placeholder",
2562
2643
  "disabled",
2563
2644
  "aria-label"
2564
- ], or = ["disabled"], sr = /* @__PURE__ */ c({
2645
+ ], cr = ["disabled"], lr = /* @__PURE__ */ u({
2565
2646
  name: "AtlChatInput",
2566
2647
  __name: "atl-chat-input",
2567
2648
  props: {
@@ -2574,58 +2655,58 @@ var En = /* @__PURE__ */ c({
2574
2655
  "send",
2575
2656
  "stop"
2576
2657
  ],
2577
- setup(e, { emit: n }) {
2578
- let r = e, o = n, s = l($, {
2658
+ setup(e, { emit: t }) {
2659
+ let n = e, i = t, a = d($, {
2579
2660
  headerId: "",
2580
- status: v("idle"),
2661
+ status: b("idle"),
2581
2662
  close: () => void 0,
2582
2663
  toggle: () => void 0
2583
- }), c = v(""), u = t(() => r.value !== void 0), d = t({
2584
- get: () => u.value ? r.value ?? "" : c.value,
2664
+ }), c = b(""), l = r(() => n.value !== void 0), u = r({
2665
+ get: () => l.value ? n.value ?? "" : c.value,
2585
2666
  set: (e) => {
2586
- u.value || (c.value = e), o("update:value", e);
2667
+ l.value || (c.value = e), i("update:value", e);
2587
2668
  }
2588
- }), f = t(() => s.status.value === "streaming"), p = t(() => {
2589
- if (r.placeholder) return r.placeholder;
2590
- switch (s.status.value) {
2669
+ }), f = r(() => a.status.value === "streaming"), p = r(() => {
2670
+ if (n.placeholder) return n.placeholder;
2671
+ switch (a.status.value) {
2591
2672
  case "streaming": return "Waiting for response…";
2592
2673
  case "error": return "Try again…";
2593
2674
  default: return "Message your AI assistant…";
2594
2675
  }
2595
2676
  });
2596
2677
  function m() {
2597
- let e = d.value.trim();
2598
- e && !f.value && (o("send", e), d.value = "");
2678
+ let e = u.value.trim();
2679
+ e && !f.value && (i("send", e), u.value = "");
2599
2680
  }
2600
2681
  function h(e) {
2601
2682
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), m());
2602
2683
  }
2603
- function _(e) {
2684
+ function g(e) {
2604
2685
  let t = e.target;
2605
- d.value = t.value;
2686
+ u.value = t.value;
2606
2687
  }
2607
- return (e, t) => (g(), i("div", ir, [a("textarea", {
2688
+ return (e, t) => (v(), o("div", or, [s("textarea", {
2608
2689
  class: "field",
2609
2690
  rows: "1",
2610
- value: d.value,
2691
+ value: u.value,
2611
2692
  placeholder: p.value,
2612
2693
  disabled: f.value,
2613
- "aria-label": r.ariaLabel,
2614
- onInput: _,
2694
+ "aria-label": n.ariaLabel,
2695
+ onInput: g,
2615
2696
  onKeydown: h
2616
- }, null, 40, ar), f.value ? (g(), i("button", {
2697
+ }, null, 40, sr), f.value ? (v(), o("button", {
2617
2698
  key: 0,
2618
2699
  type: "button",
2619
2700
  class: "action-btn variant-danger size-md",
2620
- onClick: t[0] ||= (e) => o("stop")
2621
- }, " Stop ")) : (g(), i("button", {
2701
+ onClick: t[0] ||= (e) => i("stop")
2702
+ }, " Stop ")) : (v(), o("button", {
2622
2703
  key: 1,
2623
2704
  type: "button",
2624
2705
  class: "action-btn variant-primary size-md",
2625
- disabled: !d.value.trim(),
2706
+ disabled: !u.value.trim(),
2626
2707
  onClick: m
2627
- }, " Send ", 8, or))]));
2708
+ }, " Send ", 8, cr))]));
2628
2709
  }
2629
2710
  });
2630
2711
  //#endregion
2631
- export { M as AtlAccordionGroup, ne as AtlAccordionHeader, ee as AtlAccordionItem, ae as AtlAlert, le as AtlAvatar, de as AtlAvatarGroup, fe as AtlBadge, _e as AtlBreadcrumbItem, B as AtlBreadcrumbs, be as AtlButton, Se as AtlCard, Ee as AtlCardContent, Oe as AtlCardFooter, we as AtlCardHeader, Kn as AtlChat, Yn as AtlChatHeader, sr as AtlChatInput, $ as AtlChatKey, Qn as AtlChatMessage, Zn as AtlChatMessages, rr as AtlChatSuggestion, $n as AtlChatTyping, V as AtlCheckbox, Q as AtlCodeBlock, Ot as AtlCombobox, Ne as AtlDialog, Re as AtlDialogContent, Be as AtlDialogFooter, Ie as AtlDialogHeader, He as AtlDrawer, qe as AtlDrawerContent, Ye as AtlDrawerFooter, Ge as AtlDrawerHeader, R as AtlIcon, et as AtlInput, rt as AtlMenu, at as AtlMenuItem, st as AtlMenuSeparator, nt as AtlMenuTrigger, Ut as AtlOption, yt as AtlPagination, St as AtlProgress, Pt as AtlRadio, jt as AtlRadioGroup, Vt as AtlSelect, Wt as AtlSkeleton, en as AtlStep, Qt as AtlStepper, yn as AtlTab, _n as AtlTabGroup, nn as AtlTable, sn as AtlTbody, mn as AtlTd, wn as AtlTextarea, pn as AtlTh, rn as AtlThead, On as AtlToastContainer, Z as AtlToastItem, En as AtlToastProvider, Mn as AtlToggle, Nn as AtlTooltip, un as AtlTr, Tn as useAtlToast };
2712
+ export { N as AtlAccordionGroup, re as AtlAccordionHeader, te as AtlAccordionItem, oe as AtlAlert, ue as AtlAvatar, fe as AtlAvatarGroup, pe as AtlBadge, ye as AtlBreadcrumbItem, he as AtlBreadcrumbs, Se as AtlButton, we as AtlCard, Oe as AtlCardContent, Ae as AtlCardFooter, Ee as AtlCardHeader, Jn as AtlChat, Zn as AtlChatHeader, lr as AtlChatInput, $ as AtlChatKey, er as AtlChatMessage, $n as AtlChatMessages, ar as AtlChatSuggestion, tr as AtlChatTyping, H as AtlCheckbox, Un as AtlCodeBlock, kt as AtlCombobox, Fe as AtlDialog, Be as AtlDialogContent, He as AtlDialogFooter, Re as AtlDialogHeader, We as AtlDrawer, Ye as AtlDrawerContent, Ze as AtlDrawerFooter, qe as AtlDrawerHeader, z as AtlIcon, nt as AtlInput, it as AtlMenu, ot as AtlMenuItem, ct as AtlMenuSeparator, rt as AtlMenuTrigger, Wt as AtlOption, bt as AtlPagination, Ct as AtlProgress, Ft as AtlRadio, Mt as AtlRadioGroup, Ht as AtlSelect, Gt as AtlSkeleton, tn as AtlStep, $t as AtlStepper, bn as AtlTab, vn as AtlTabGroup, rn as AtlTable, cn as AtlTbody, hn as AtlTd, Tn as AtlTextarea, mn as AtlTh, an as AtlThead, kn as AtlToastContainer, Q as AtlToastItem, Dn as AtlToastProvider, Nn as AtlToggle, Pn as AtlTooltip, dn as AtlTr, En as useAtlToast };