@rafael_dias/akoma 0.3.0 → 0.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/akoma.js CHANGED
@@ -1,24 +1,25 @@
1
- import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createTextVNode as i, defineComponent as a, normalizeClass as o, normalizeStyle as s, openBlock as c, renderSlot as l, toDisplayString as u, useId as d } from "vue";
1
+ import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, inject as s, nextTick as c, normalizeClass as l, normalizeStyle as u, onMounted as d, onUnmounted as f, openBlock as p, provide as m, reactive as h, ref as g, renderSlot as _, toDisplayString as v, toRef as y, unref as b, useId as x, watch as ee } from "vue";
2
+ import { completeIconSet as S } from "@sysvale/cuida-icons";
2
3
  //#region \0rolldown/runtime.js
3
- var f = Object.defineProperty, p = (e, t) => {
4
+ var C = Object.defineProperty, te = (e, t) => {
4
5
  let n = {};
5
- for (var r in e) f(n, r, {
6
+ for (var r in e) C(n, r, {
6
7
  get: e[r],
7
8
  enumerable: !0
8
9
  });
9
- return t || f(n, Symbol.toStringTag, { value: "Module" }), n;
10
- }, m = [
10
+ return t || C(n, Symbol.toStringTag, { value: "Module" }), n;
11
+ }, ne = [
11
12
  "type",
12
13
  "disabled",
13
14
  "aria-busy"
14
- ], h = {
15
+ ], re = {
15
16
  key: 0,
16
17
  class: "ak-button__spinner",
17
18
  "aria-hidden": "true"
18
- }, g = {
19
+ }, ie = {
19
20
  key: 1,
20
21
  class: "ak-button__icon"
21
- }, _ = { class: "ak-button__label" }, v = /*@__PURE__*/ a({
22
+ }, ae = { class: "ak-button__label" }, oe = /*@__PURE__*/ o({
22
23
  __name: "AkButton",
23
24
  props: {
24
25
  variant: { default: "primary" },
@@ -38,8 +39,8 @@ var f = Object.defineProperty, p = (e, t) => {
38
39
  }
39
40
  },
40
41
  setup(e) {
41
- return (i, a) => (c(), n("button", {
42
- class: o(["ak-button tap-scale", [
42
+ return (t, a) => (p(), r("button", {
43
+ class: l(["ak-button tap-scale", [
43
44
  `ak-button--${e.variant}`,
44
45
  `ak-button--${e.size}`,
45
46
  {
@@ -51,25 +52,25 @@ var f = Object.defineProperty, p = (e, t) => {
51
52
  disabled: e.disabled || e.loading,
52
53
  "aria-busy": e.loading || void 0
53
54
  }, [
54
- e.loading ? (c(), n("span", h)) : t("", !0),
55
- i.$slots.icon && !e.loading ? (c(), n("span", g, [l(i.$slots, "icon", {}, void 0, !0)])) : t("", !0),
56
- r("span", _, [l(i.$slots, "default", {}, void 0, !0)])
57
- ], 10, m));
55
+ e.loading ? (p(), r("span", re)) : n("", !0),
56
+ t.$slots.icon && !e.loading ? (p(), r("span", ie, [_(t.$slots, "icon", {}, void 0, !0)])) : n("", !0),
57
+ i("span", ae, [_(t.$slots, "default", {}, void 0, !0)])
58
+ ], 10, ne));
58
59
  }
59
- }), y = (e, t) => {
60
+ }), w = (e, t) => {
60
61
  let n = e.__vccOpts || e;
61
62
  for (let [e, r] of t) n[e] = r;
62
63
  return n;
63
- }, b = /*#__PURE__*/ y(v, [["__scopeId", "data-v-78a39ccd"]]), x = /*#__PURE__*/ y(/* @__PURE__ */ a({
64
+ }, T = /*#__PURE__*/ w(oe, [["__scopeId", "data-v-7786dae9"]]), E = /*#__PURE__*/ w(/* @__PURE__ */ o({
64
65
  __name: "AkBadge",
65
66
  props: {
66
67
  variant: { default: "neutral" },
67
68
  label: {}
68
69
  },
69
70
  setup(e) {
70
- return (t, r) => (c(), n("span", { class: o(["ak-badge", `ak-badge--${e.variant}`]) }, [l(t.$slots, "default", {}, () => [i(u(e.label), 1)], !0)], 2));
71
+ return (t, n) => (p(), r("span", { class: l(["ak-badge", `ak-badge--${e.variant}`]) }, [_(t.$slots, "default", {}, () => [a(v(e.label), 1)], !0)], 2));
71
72
  }
72
- }), [["__scopeId", "data-v-02933f09"]]), S = ["disabled", "aria-pressed"], C = /*#__PURE__*/ y(/* @__PURE__ */ a({
73
+ }), [["__scopeId", "data-v-02933f09"]]), se = ["disabled", "aria-pressed"], D = /*#__PURE__*/ w(/* @__PURE__ */ o({
73
74
  __name: "AkChip",
74
75
  props: {
75
76
  active: {
@@ -84,29 +85,29 @@ var f = Object.defineProperty, p = (e, t) => {
84
85
  },
85
86
  emits: ["click"],
86
87
  setup(e, { emit: t }) {
87
- let r = t;
88
- return (t, i) => (c(), n("button", {
88
+ let n = t;
89
+ return (t, i) => (p(), r("button", {
89
90
  type: "button",
90
- class: o(["ak-chip tap-scale", { "ak-chip--active": e.active }]),
91
- style: s(e.active && e.color ? { "--ak-chip-active-bg": e.color } : void 0),
91
+ class: l(["ak-chip tap-scale", { "ak-chip--active": e.active }]),
92
+ style: u(e.active && e.color ? { "--ak-chip-active-bg": e.color } : void 0),
92
93
  disabled: e.disabled,
93
94
  "aria-pressed": e.active,
94
- onClick: i[0] ||= (e) => r("click", e)
95
- }, [l(t.$slots, "default", {}, void 0, !0)], 14, S));
95
+ onClick: i[0] ||= (e) => n("click", e)
96
+ }, [_(t.$slots, "default", {}, void 0, !0)], 14, se));
96
97
  }
97
- }), [["__scopeId", "data-v-c782362c"]]), w = {
98
+ }), [["__scopeId", "data-v-c782362c"]]), ce = {
98
99
  key: 0,
99
100
  class: "ak-card__media"
100
- }, T = {
101
+ }, le = {
101
102
  key: 1,
102
103
  class: "ak-card__header"
103
- }, E = {
104
+ }, ue = {
104
105
  key: 2,
105
106
  class: "ak-card__body"
106
- }, D = {
107
+ }, de = {
107
108
  key: 3,
108
109
  class: "ak-card__footer"
109
- }, O = /*#__PURE__*/ y(/* @__PURE__ */ a({
110
+ }, O = /*#__PURE__*/ w(/* @__PURE__ */ o({
110
111
  __name: "AkCard",
111
112
  props: {
112
113
  interactive: {
@@ -116,21 +117,21 @@ var f = Object.defineProperty, p = (e, t) => {
116
117
  padding: { default: "md" }
117
118
  },
118
119
  setup(e) {
119
- return (r, i) => (c(), n("article", { class: o(["ak-card", [`ak-card--pad-${e.padding}`, { "ak-card--interactive tap-scale": e.interactive }]]) }, [
120
- r.$slots.media ? (c(), n("div", w, [l(r.$slots, "media", {}, void 0, !0)])) : t("", !0),
121
- r.$slots.header ? (c(), n("div", T, [l(r.$slots, "header", {}, void 0, !0)])) : t("", !0),
122
- r.$slots.default ? (c(), n("div", E, [l(r.$slots, "default", {}, void 0, !0)])) : t("", !0),
123
- r.$slots.footer ? (c(), n("div", D, [l(r.$slots, "footer", {}, void 0, !0)])) : t("", !0)
120
+ return (t, i) => (p(), r("article", { class: l(["ak-card", [`ak-card--pad-${e.padding}`, { "ak-card--interactive": e.interactive }]]) }, [
121
+ t.$slots.media ? (p(), r("div", ce, [_(t.$slots, "media", {}, void 0, !0)])) : n("", !0),
122
+ t.$slots.header ? (p(), r("div", le, [_(t.$slots, "header", {}, void 0, !0)])) : n("", !0),
123
+ t.$slots.default ? (p(), r("div", ue, [_(t.$slots, "default", {}, void 0, !0)])) : n("", !0),
124
+ t.$slots.footer ? (p(), r("div", de, [_(t.$slots, "footer", {}, void 0, !0)])) : n("", !0)
124
125
  ], 2));
125
126
  }
126
- }), [["__scopeId", "data-v-0eb2f676"]]), k = {
127
+ }), [["__scopeId", "data-v-73ac6197"]]), fe = {
127
128
  key: 0,
128
129
  class: "ak-field__label"
129
- }, A = {
130
+ }, pe = {
130
131
  key: 0,
131
132
  class: "ak-field__required",
132
133
  "aria-hidden": "true"
133
- }, j = [
134
+ }, me = [
134
135
  "id",
135
136
  "type",
136
137
  "value",
@@ -141,7 +142,7 @@ var f = Object.defineProperty, p = (e, t) => {
141
142
  "autocomplete",
142
143
  "aria-invalid",
143
144
  "aria-describedby"
144
- ], M = ["id"], N = /*#__PURE__*/ y(/* @__PURE__ */ a({
145
+ ], he = ["id"], k = /*#__PURE__*/ w(/* @__PURE__ */ o({
145
146
  __name: "AkInput",
146
147
  props: {
147
148
  modelValue: { default: "" },
@@ -163,46 +164,46 @@ var f = Object.defineProperty, p = (e, t) => {
163
164
  name: {}
164
165
  },
165
166
  emits: ["update:modelValue"],
166
- setup(a, { emit: s }) {
167
- let l = a, f = s, p = d(), m = e(() => `ak-input-${p}`), h = e(() => l.hint || l.error ? `ak-input-hint-${p}` : void 0);
168
- function g(e) {
167
+ setup(t, { emit: o }) {
168
+ let s = t, c = o, u = x(), d = e(() => `ak-input-${u}`), f = e(() => s.hint || s.error ? `ak-input-hint-${u}` : void 0);
169
+ function m(e) {
169
170
  let t = e.target;
170
- f("update:modelValue", t.value);
171
+ c("update:modelValue", t.value);
171
172
  }
172
- return (e, s) => (c(), n("label", { class: o(["ak-field", {
173
- "ak-field--disabled": a.disabled,
174
- "ak-field--error": !!a.error
173
+ return (e, o) => (p(), r("label", { class: l(["ak-field", {
174
+ "ak-field--disabled": t.disabled,
175
+ "ak-field--error": !!t.error
175
176
  }]) }, [
176
- a.label ? (c(), n("span", k, [i(u(a.label) + " ", 1), a.required ? (c(), n("span", A, "*")) : t("", !0)])) : t("", !0),
177
- r("input", {
178
- id: m.value,
179
- class: o(["ak-field__control", `ak-field__control--${a.size}`]),
180
- type: a.type,
181
- value: a.modelValue,
182
- placeholder: a.placeholder,
183
- disabled: a.disabled,
184
- required: a.required,
185
- name: a.name,
186
- autocomplete: a.autocomplete,
187
- "aria-invalid": !!a.error || void 0,
188
- "aria-describedby": h.value,
189
- onInput: g
190
- }, null, 42, j),
191
- a.error || a.hint ? (c(), n("span", {
177
+ t.label ? (p(), r("span", fe, [a(v(t.label) + " ", 1), t.required ? (p(), r("span", pe, "*")) : n("", !0)])) : n("", !0),
178
+ i("input", {
179
+ id: d.value,
180
+ class: l(["ak-field__control", `ak-field__control--${t.size}`]),
181
+ type: t.type,
182
+ value: t.modelValue,
183
+ placeholder: t.placeholder,
184
+ disabled: t.disabled,
185
+ required: t.required,
186
+ name: t.name,
187
+ autocomplete: t.autocomplete,
188
+ "aria-invalid": !!t.error || void 0,
189
+ "aria-describedby": f.value,
190
+ onInput: m
191
+ }, null, 42, me),
192
+ t.error || t.hint ? (p(), r("span", {
192
193
  key: 1,
193
- id: h.value,
194
+ id: f.value,
194
195
  class: "ak-field__hint"
195
- }, u(a.error || a.hint), 9, M)) : t("", !0)
196
+ }, v(t.error || t.hint), 9, he)) : n("", !0)
196
197
  ], 2));
197
198
  }
198
- }), [["__scopeId", "data-v-60d7d2d0"]]), P = {
199
+ }), [["__scopeId", "data-v-60d7d2d0"]]), ge = {
199
200
  key: 0,
200
201
  class: "ak-field__label"
201
- }, F = {
202
+ }, _e = {
202
203
  key: 0,
203
204
  class: "ak-field__required",
204
205
  "aria-hidden": "true"
205
- }, I = [
206
+ }, ve = [
206
207
  "id",
207
208
  "value",
208
209
  "placeholder",
@@ -212,7 +213,7 @@ var f = Object.defineProperty, p = (e, t) => {
212
213
  "rows",
213
214
  "aria-invalid",
214
215
  "aria-describedby"
215
- ], L = ["id"], R = /*#__PURE__*/ y(/* @__PURE__ */ a({
216
+ ], ye = ["id"], A = /*#__PURE__*/ w(/* @__PURE__ */ o({
216
217
  __name: "AkTextarea",
217
218
  props: {
218
219
  modelValue: { default: "" },
@@ -232,68 +233,68 @@ var f = Object.defineProperty, p = (e, t) => {
232
233
  name: {}
233
234
  },
234
235
  emits: ["update:modelValue"],
235
- setup(a, { emit: s }) {
236
- let l = a, f = s, p = d(), m = e(() => `ak-textarea-${p}`), h = e(() => l.hint || l.error ? `ak-textarea-hint-${p}` : void 0);
237
- function g(e) {
236
+ setup(t, { emit: o }) {
237
+ let s = t, c = o, u = x(), d = e(() => `ak-textarea-${u}`), f = e(() => s.hint || s.error ? `ak-textarea-hint-${u}` : void 0);
238
+ function m(e) {
238
239
  let t = e.target;
239
- f("update:modelValue", t.value);
240
+ c("update:modelValue", t.value);
240
241
  }
241
- return (e, s) => (c(), n("label", { class: o(["ak-field", {
242
- "ak-field--disabled": a.disabled,
243
- "ak-field--error": !!a.error
242
+ return (e, o) => (p(), r("label", { class: l(["ak-field", {
243
+ "ak-field--disabled": t.disabled,
244
+ "ak-field--error": !!t.error
244
245
  }]) }, [
245
- a.label ? (c(), n("span", P, [i(u(a.label) + " ", 1), a.required ? (c(), n("span", F, "*")) : t("", !0)])) : t("", !0),
246
- r("textarea", {
247
- id: m.value,
246
+ t.label ? (p(), r("span", ge, [a(v(t.label) + " ", 1), t.required ? (p(), r("span", _e, "*")) : n("", !0)])) : n("", !0),
247
+ i("textarea", {
248
+ id: d.value,
248
249
  class: "ak-field__control",
249
- value: a.modelValue,
250
- placeholder: a.placeholder,
251
- disabled: a.disabled,
252
- required: a.required,
253
- name: a.name,
254
- rows: a.rows,
255
- "aria-invalid": !!a.error || void 0,
256
- "aria-describedby": h.value,
257
- onInput: g
258
- }, null, 40, I),
259
- a.error || a.hint ? (c(), n("span", {
250
+ value: t.modelValue,
251
+ placeholder: t.placeholder,
252
+ disabled: t.disabled,
253
+ required: t.required,
254
+ name: t.name,
255
+ rows: t.rows,
256
+ "aria-invalid": !!t.error || void 0,
257
+ "aria-describedby": f.value,
258
+ onInput: m
259
+ }, null, 40, ve),
260
+ t.error || t.hint ? (p(), r("span", {
260
261
  key: 1,
261
- id: h.value,
262
+ id: f.value,
262
263
  class: "ak-field__hint"
263
- }, u(a.error || a.hint), 9, L)) : t("", !0)
264
+ }, v(t.error || t.hint), 9, ye)) : n("", !0)
264
265
  ], 2));
265
266
  }
266
- }), [["__scopeId", "data-v-d34da198"]]), z = { class: "ak-empty" }, B = {
267
+ }), [["__scopeId", "data-v-d34da198"]]), be = { class: "ak-empty" }, j = {
267
268
  class: "ak-empty__icon",
268
269
  "aria-hidden": "true"
269
- }, V = {
270
+ }, M = {
270
271
  key: 0,
271
272
  class: "ak-empty__glyph"
272
- }, H = { class: "ak-empty__title" }, U = {
273
+ }, N = { class: "ak-empty__title" }, xe = {
273
274
  key: 0,
274
275
  class: "ak-empty__description"
275
- }, W = {
276
+ }, Se = {
276
277
  key: 1,
277
278
  class: "ak-empty__action"
278
- }, G = /*#__PURE__*/ y(/* @__PURE__ */ a({
279
+ }, P = /*#__PURE__*/ w(/* @__PURE__ */ o({
279
280
  __name: "AkEmptyState",
280
281
  props: {
281
282
  title: {},
282
283
  description: {}
283
284
  },
284
285
  setup(e) {
285
- return (i, a) => (c(), n("div", z, [
286
- r("div", B, [
287
- a[0] ||= r("span", { class: "ak-empty__ring ak-empty__ring--outer" }, null, -1),
288
- a[1] ||= r("span", { class: "ak-empty__ring ak-empty__ring--inner" }, null, -1),
289
- i.$slots.icon ? (c(), n("span", V, [l(i.$slots, "icon", {}, void 0, !0)])) : t("", !0)
286
+ return (t, a) => (p(), r("div", be, [
287
+ i("div", j, [
288
+ a[0] ||= i("span", { class: "ak-empty__ring ak-empty__ring--outer" }, null, -1),
289
+ a[1] ||= i("span", { class: "ak-empty__ring ak-empty__ring--inner" }, null, -1),
290
+ t.$slots.icon ? (p(), r("span", M, [_(t.$slots, "icon", {}, void 0, !0)])) : n("", !0)
290
291
  ]),
291
- r("h3", H, u(e.title), 1),
292
- e.description ? (c(), n("p", U, u(e.description), 1)) : t("", !0),
293
- i.$slots.action ? (c(), n("div", W, [l(i.$slots, "action", {}, void 0, !0)])) : t("", !0)
292
+ i("h3", N, v(e.title), 1),
293
+ e.description ? (p(), r("p", xe, v(e.description), 1)) : n("", !0),
294
+ t.$slots.action ? (p(), r("div", Se, [_(t.$slots, "action", {}, void 0, !0)])) : n("", !0)
294
295
  ]));
295
296
  }
296
- }), [["__scopeId", "data-v-b8b16929"]]), K = /*#__PURE__*/ y(/* @__PURE__ */ a({
297
+ }), [["__scopeId", "data-v-ab81ece0"]]), F = /*#__PURE__*/ w(/* @__PURE__ */ o({
297
298
  __name: "AkShimmer",
298
299
  props: {
299
300
  width: { default: "100%" },
@@ -304,9 +305,9 @@ var f = Object.defineProperty, p = (e, t) => {
304
305
  function t(e) {
305
306
  return e === "sm" || e === "md" || e === "lg" || e === "full" ? `var(--radius-${e})` : e;
306
307
  }
307
- return (r, i) => (c(), n("div", {
308
+ return (n, i) => (p(), r("div", {
308
309
  class: "ak-shimmer",
309
- style: s({
310
+ style: u({
310
311
  width: e.width,
311
312
  height: e.height,
312
313
  borderRadius: t(e.radius)
@@ -314,35 +315,514 @@ var f = Object.defineProperty, p = (e, t) => {
314
315
  "aria-hidden": "true"
315
316
  }, null, 4));
316
317
  }
317
- }), [["__scopeId", "data-v-de7bd16d"]]), q = /*#__PURE__*/ y(/* @__PURE__ */ a({
318
+ }), [["__scopeId", "data-v-de7bd16d"]]), I = /*#__PURE__*/ w(/* @__PURE__ */ o({
318
319
  __name: "AkAmbientBg",
319
320
  props: { contained: {
320
321
  type: Boolean,
321
322
  default: !1
322
323
  } },
323
324
  setup(e) {
324
- return (t, i) => (c(), n("div", {
325
- class: o(["ambient", { "ambient--contained": e.contained }]),
325
+ return (t, n) => (p(), r("div", {
326
+ class: l(["ambient", { "ambient--contained": e.contained }]),
326
327
  "aria-hidden": "true"
327
- }, [...i[0] ||= [
328
- r("span", { class: "ambient__orb ambient__orb--1" }, null, -1),
329
- r("span", { class: "ambient__orb ambient__orb--2" }, null, -1),
330
- r("span", { class: "ambient__orb ambient__orb--3" }, null, -1)
328
+ }, [...n[0] ||= [
329
+ i("span", { class: "ambient__orb ambient__orb--1" }, null, -1),
330
+ i("span", { class: "ambient__orb ambient__orb--2" }, null, -1),
331
+ i("span", { class: "ambient__orb ambient__orb--3" }, null, -1)
331
332
  ]], 2));
332
333
  }
333
- }), [["__scopeId", "data-v-b34dece3"]]), J = /* @__PURE__ */ p({
334
- AkAmbientBg: () => q,
335
- AkBadge: () => x,
336
- AkButton: () => b,
334
+ }), [["__scopeId", "data-v-b34dece3"]]), L = new Map(S.map((e) => [e.name, Ce(e.data)]));
335
+ function Ce(e) {
336
+ let t = e.match(/<path\b[^>]*\/>/g);
337
+ return t?.length ? `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">${t.map((e) => e.replace(/\sfill="[^"]*"/g, "").replace(/\s(fill-rule|clip-rule)="[^"]*"/g, "")).join("")}</svg>` : e;
338
+ }
339
+ function R(e) {
340
+ return L.get(e) ?? "";
341
+ }
342
+ //#endregion
343
+ //#region src/components/AkIcon.vue?vue&type=script&setup=true&lang.ts
344
+ var we = [
345
+ "role",
346
+ "aria-label",
347
+ "aria-hidden",
348
+ "innerHTML"
349
+ ], z = /*#__PURE__*/ w(/* @__PURE__ */ o({
350
+ __name: "AkIcon",
351
+ props: {
352
+ name: {},
353
+ size: { default: 20 },
354
+ label: {}
355
+ },
356
+ setup(t) {
357
+ let n = t, i = e(() => typeof n.size == "number" ? `${n.size}px` : n.size), a = e(() => R(n.name));
358
+ return (e, n) => (p(), r("span", {
359
+ class: l(["ak-icon", { "ak-icon--missing": !a.value }]),
360
+ style: u({
361
+ width: i.value,
362
+ height: i.value
363
+ }),
364
+ role: t.label ? "img" : void 0,
365
+ "aria-label": t.label,
366
+ "aria-hidden": !t.label || void 0,
367
+ innerHTML: a.value
368
+ }, null, 14, we));
369
+ }
370
+ }), [["__scopeId", "data-v-083f6c55"]]), Te = ["aria-orientation"], Ee = {
371
+ key: 0,
372
+ class: "ak-divider__label"
373
+ }, B = /*#__PURE__*/ w(/* @__PURE__ */ o({
374
+ __name: "AkDivider",
375
+ props: {
376
+ spacing: { default: "md" },
377
+ label: {},
378
+ vertical: {
379
+ type: Boolean,
380
+ default: !1
381
+ }
382
+ },
383
+ setup(e) {
384
+ return (t, i) => (p(), r("div", {
385
+ class: l(["ak-divider", [e.vertical ? "ak-divider--vertical" : "ak-divider--horizontal", `ak-divider--spacing-${e.spacing}`]]),
386
+ role: "separator",
387
+ "aria-orientation": e.vertical ? "vertical" : "horizontal"
388
+ }, [e.label && !e.vertical ? (p(), r("span", Ee, v(e.label), 1)) : n("", !0)], 10, Te));
389
+ }
390
+ }), [["__scopeId", "data-v-17bc7513"]]), De = {
391
+ key: 0,
392
+ class: "ak-progress__meta"
393
+ }, Oe = {
394
+ key: 0,
395
+ class: "ak-progress__label"
396
+ }, ke = {
397
+ key: 1,
398
+ class: "ak-progress__value numeric"
399
+ }, Ae = [
400
+ "aria-valuenow",
401
+ "aria-valuemax",
402
+ "aria-label"
403
+ ], V = /*#__PURE__*/ w(/* @__PURE__ */ o({
404
+ __name: "AkProgress",
405
+ props: {
406
+ value: { default: 0 },
407
+ max: { default: 100 },
408
+ size: { default: "md" },
409
+ color: {},
410
+ label: {},
411
+ showValue: {
412
+ type: Boolean,
413
+ default: !1
414
+ }
415
+ },
416
+ setup(t) {
417
+ let a = t, o = e(() => a.max <= 0 ? 0 : Math.min(100, Math.max(0, a.value / a.max * 100))), s = e(() => ({
418
+ width: `${o.value}%`,
419
+ ...a.color ? { background: a.color } : {}
420
+ }));
421
+ return (e, a) => (p(), r("div", { class: l(["ak-progress", `ak-progress--${t.size}`]) }, [t.label || t.showValue ? (p(), r("div", De, [t.label ? (p(), r("span", Oe, v(t.label), 1)) : n("", !0), t.showValue ? (p(), r("span", ke, v(Math.round(o.value)) + "%", 1)) : n("", !0)])) : n("", !0), i("div", {
422
+ class: "ak-progress__track",
423
+ role: "progressbar",
424
+ "aria-valuenow": t.value,
425
+ "aria-valuemin": 0,
426
+ "aria-valuemax": t.max,
427
+ "aria-label": t.label
428
+ }, [i("span", {
429
+ class: "ak-progress__fill",
430
+ style: u(s.value)
431
+ }, null, 4)], 8, Ae)], 2));
432
+ }
433
+ }), [["__scopeId", "data-v-ed0a6fcd"]]), je = { class: "ak-section-header" }, Me = { class: "ak-section-header__title" }, Ne = {
434
+ key: 0,
435
+ class: "ak-section-header__action"
436
+ }, H = /*#__PURE__*/ w(/* @__PURE__ */ o({
437
+ __name: "AkSectionHeader",
438
+ props: { title: {} },
439
+ setup(e) {
440
+ return (t, o) => (p(), r("header", je, [i("h2", Me, [_(t.$slots, "default", {}, () => [a(v(e.title), 1)], !0)]), t.$slots.action ? (p(), r("div", Ne, [_(t.$slots, "action", {}, void 0, !0)])) : n("", !0)]));
441
+ }
442
+ }), [["__scopeId", "data-v-65fca8d1"]]), U = { class: "ak-list" }, W = /*#__PURE__*/ w(/* @__PURE__ */ o({
443
+ __name: "AkList",
444
+ setup(e) {
445
+ return m("ak-list", !0), (e, t) => (p(), r("ul", U, [_(e.$slots, "default", {}, void 0, !0)]));
446
+ }
447
+ }), [["__scopeId", "data-v-708bdd68"]]), Pe = ["disabled"], Fe = {
448
+ key: 0,
449
+ class: "ak-list-row__leading"
450
+ }, Ie = { class: "ak-list-row__content" }, Le = { class: "ak-list-row__title" }, Re = {
451
+ key: 0,
452
+ class: "ak-list-row__subtitle"
453
+ }, ze = {
454
+ key: 1,
455
+ class: "ak-list-row__trailing"
456
+ }, Be = {
457
+ key: 0,
458
+ class: "ak-list-row__leading"
459
+ }, Ve = { class: "ak-list-row__content" }, He = { class: "ak-list-row__title" }, Ue = {
460
+ key: 0,
461
+ class: "ak-list-row__subtitle"
462
+ }, We = {
463
+ key: 1,
464
+ class: "ak-list-row__trailing"
465
+ }, Ge = ["disabled"], Ke = {
466
+ key: 0,
467
+ class: "ak-list-row__leading"
468
+ }, qe = { class: "ak-list-row__content" }, Je = { class: "ak-list-row__title" }, Ye = {
469
+ key: 0,
470
+ class: "ak-list-row__subtitle"
471
+ }, Xe = {
472
+ key: 1,
473
+ class: "ak-list-row__trailing"
474
+ }, Ze = {
475
+ key: 0,
476
+ class: "ak-list-row__leading"
477
+ }, Qe = { class: "ak-list-row__content" }, $e = { class: "ak-list-row__title" }, et = {
478
+ key: 0,
479
+ class: "ak-list-row__subtitle"
480
+ }, tt = {
481
+ key: 1,
482
+ class: "ak-list-row__trailing"
483
+ }, G = /*#__PURE__*/ w(/* @__PURE__ */ o({
484
+ __name: "AkListRow",
485
+ props: {
486
+ interactive: {
487
+ type: Boolean,
488
+ default: !1
489
+ },
490
+ disabled: {
491
+ type: Boolean,
492
+ default: !1
493
+ },
494
+ padding: { default: "md" },
495
+ divider: {
496
+ type: Boolean,
497
+ default: !0
498
+ }
499
+ },
500
+ setup(t) {
501
+ let a = t, o = s("ak-list", !1), c = e(() => [
502
+ "ak-list-row",
503
+ `ak-list-row--pad-${a.padding}`,
504
+ {
505
+ "ak-list-row--interactive": a.interactive,
506
+ "ak-list-row--disabled": a.disabled
507
+ }
508
+ ]);
509
+ return (e, a) => b(o) ? (p(), r("li", {
510
+ key: 0,
511
+ class: l(["ak-list-row-item", { "ak-list-row-item--divider": t.divider }])
512
+ }, [t.interactive ? (p(), r("button", {
513
+ key: 0,
514
+ type: "button",
515
+ class: l(c.value),
516
+ disabled: t.disabled
517
+ }, [
518
+ e.$slots.leading ? (p(), r("span", Fe, [_(e.$slots, "leading", {}, void 0, !0)])) : n("", !0),
519
+ i("span", Ie, [i("span", Le, [_(e.$slots, "default", {}, void 0, !0)]), e.$slots.subtitle ? (p(), r("span", Re, [_(e.$slots, "subtitle", {}, void 0, !0)])) : n("", !0)]),
520
+ e.$slots.trailing ? (p(), r("span", ze, [_(e.$slots, "trailing", {}, void 0, !0)])) : n("", !0)
521
+ ], 10, Pe)) : (p(), r("div", {
522
+ key: 1,
523
+ class: l(c.value)
524
+ }, [
525
+ e.$slots.leading ? (p(), r("span", Be, [_(e.$slots, "leading", {}, void 0, !0)])) : n("", !0),
526
+ i("span", Ve, [i("span", He, [_(e.$slots, "default", {}, void 0, !0)]), e.$slots.subtitle ? (p(), r("span", Ue, [_(e.$slots, "subtitle", {}, void 0, !0)])) : n("", !0)]),
527
+ e.$slots.trailing ? (p(), r("span", We, [_(e.$slots, "trailing", {}, void 0, !0)])) : n("", !0)
528
+ ], 2))], 2)) : t.interactive ? (p(), r("button", {
529
+ key: 1,
530
+ type: "button",
531
+ class: l(c.value),
532
+ disabled: t.disabled
533
+ }, [
534
+ e.$slots.leading ? (p(), r("span", Ke, [_(e.$slots, "leading", {}, void 0, !0)])) : n("", !0),
535
+ i("span", qe, [i("span", Je, [_(e.$slots, "default", {}, void 0, !0)]), e.$slots.subtitle ? (p(), r("span", Ye, [_(e.$slots, "subtitle", {}, void 0, !0)])) : n("", !0)]),
536
+ e.$slots.trailing ? (p(), r("span", Xe, [_(e.$slots, "trailing", {}, void 0, !0)])) : n("", !0)
537
+ ], 10, Ge)) : (p(), r("div", {
538
+ key: 2,
539
+ class: l(c.value)
540
+ }, [
541
+ e.$slots.leading ? (p(), r("span", Ze, [_(e.$slots, "leading", {}, void 0, !0)])) : n("", !0),
542
+ i("span", Qe, [i("span", $e, [_(e.$slots, "default", {}, void 0, !0)]), e.$slots.subtitle ? (p(), r("span", et, [_(e.$slots, "subtitle", {}, void 0, !0)])) : n("", !0)]),
543
+ e.$slots.trailing ? (p(), r("span", tt, [_(e.$slots, "trailing", {}, void 0, !0)])) : n("", !0)
544
+ ], 2));
545
+ }
546
+ }), [["__scopeId", "data-v-9f8ea96f"]]), nt = [
547
+ "type",
548
+ "disabled",
549
+ "aria-label",
550
+ "aria-busy"
551
+ ], rt = {
552
+ key: 0,
553
+ class: "ak-icon-button__spinner",
554
+ "aria-hidden": "true"
555
+ }, it = {
556
+ key: 1,
557
+ class: "ak-icon-button__icon"
558
+ }, K = /*#__PURE__*/ w(/* @__PURE__ */ o({
559
+ __name: "AkIconButton",
560
+ props: {
561
+ variant: { default: "ghost" },
562
+ size: { default: "md" },
563
+ disabled: {
564
+ type: Boolean,
565
+ default: !1
566
+ },
567
+ loading: {
568
+ type: Boolean,
569
+ default: !1
570
+ },
571
+ type: { default: "button" },
572
+ label: {},
573
+ icon: {}
574
+ },
575
+ setup(n) {
576
+ let i = n, a = e(() => ({
577
+ sm: 18,
578
+ md: 20,
579
+ lg: 22
580
+ })[i.size]);
581
+ return (e, i) => (p(), r("button", {
582
+ class: l(["ak-icon-button tap-scale", [
583
+ `ak-icon-button--${n.variant}`,
584
+ `ak-icon-button--${n.size}`,
585
+ { "ak-icon-button--loading": n.loading }
586
+ ]]),
587
+ type: n.type,
588
+ disabled: n.disabled || n.loading,
589
+ "aria-label": n.label,
590
+ "aria-busy": n.loading || void 0
591
+ }, [n.loading ? (p(), r("span", rt)) : (p(), r("span", it, [n.icon ? (p(), t(z, {
592
+ key: 0,
593
+ name: n.icon,
594
+ size: a.value
595
+ }, null, 8, ["name", "size"])) : _(e.$slots, "default", {}, void 0, !0, 1)]))], 10, nt));
596
+ }
597
+ }), [["__scopeId", "data-v-b4833b10"]]), at = {
598
+ key: 0,
599
+ class: "ak-switch__copy"
600
+ }, ot = {
601
+ key: 0,
602
+ class: "ak-switch__label"
603
+ }, st = {
604
+ key: 1,
605
+ class: "ak-switch__description"
606
+ }, ct = { class: "ak-switch__control" }, lt = [
607
+ "id",
608
+ "checked",
609
+ "disabled"
610
+ ], q = /*#__PURE__*/ w(/* @__PURE__ */ o({
611
+ __name: "AkSwitch",
612
+ props: {
613
+ modelValue: {
614
+ type: Boolean,
615
+ default: !1
616
+ },
617
+ label: {},
618
+ description: {},
619
+ disabled: {
620
+ type: Boolean,
621
+ default: !1
622
+ }
623
+ },
624
+ emits: ["update:modelValue"],
625
+ setup(t, { emit: a }) {
626
+ let o = a, s = x(), c = e(() => `ak-switch-${s}`);
627
+ function u(e) {
628
+ let t = e.target;
629
+ o("update:modelValue", t.checked);
630
+ }
631
+ return (e, a) => (p(), r("label", { class: l(["ak-switch", {
632
+ "ak-switch--disabled": t.disabled,
633
+ "ak-switch--on": t.modelValue
634
+ }]) }, [t.label || t.description ? (p(), r("span", at, [t.label ? (p(), r("span", ot, v(t.label), 1)) : n("", !0), t.description ? (p(), r("span", st, v(t.description), 1)) : n("", !0)])) : n("", !0), i("span", ct, [i("input", {
635
+ id: c.value,
636
+ class: "ak-switch__input",
637
+ type: "checkbox",
638
+ role: "switch",
639
+ checked: t.modelValue,
640
+ disabled: t.disabled,
641
+ onChange: u
642
+ }, null, 40, lt), a[0] ||= i("span", {
643
+ class: "ak-switch__track",
644
+ "aria-hidden": "true"
645
+ }, [i("span", { class: "ak-switch__thumb" })], -1)])], 2));
646
+ }
647
+ }), [["__scopeId", "data-v-d49f3b2e"]]), J = Symbol("ak-tab-bar"), ut = {
648
+ class: "ak-tab-bar",
649
+ "aria-label": "Primary"
650
+ }, Y = /*#__PURE__*/ w(/* @__PURE__ */ o({
651
+ __name: "AkTabBar",
652
+ props: { modelValue: {} },
653
+ emits: ["update:modelValue"],
654
+ setup(e, { emit: t }) {
655
+ let n = e, a = t, o = g(null), s = h(/* @__PURE__ */ new Map()), v = g({
656
+ x: 0,
657
+ y: 0,
658
+ w: 0,
659
+ h: 0,
660
+ ready: !1
661
+ });
662
+ function b() {
663
+ let e = o.value, t = s.get(n.modelValue);
664
+ if (!e || !t) {
665
+ v.value.ready = !1;
666
+ return;
667
+ }
668
+ let r = e.getBoundingClientRect(), i = (t.querySelector(".ak-tab-bar__icon") ?? t).getBoundingClientRect();
669
+ v.value = {
670
+ x: i.left - r.left,
671
+ y: i.top - r.top,
672
+ w: i.width,
673
+ h: i.height,
674
+ ready: !0
675
+ };
676
+ }
677
+ function x(e, t) {
678
+ s.set(e, t), c(b);
679
+ }
680
+ function S(e) {
681
+ s.delete(e), c(b);
682
+ }
683
+ let C;
684
+ return d(() => {
685
+ c(b), C = new ResizeObserver(() => b()), o.value && C.observe(o.value);
686
+ }), f(() => C?.disconnect()), ee(() => n.modelValue, () => void c(b)), m(J, {
687
+ active: y(n, "modelValue"),
688
+ select: (e) => a("update:modelValue", e),
689
+ register: x,
690
+ unregister: S
691
+ }), (e, t) => (p(), r("nav", ut, [i("div", {
692
+ ref_key: "trackRef",
693
+ ref: o,
694
+ class: "ak-tab-bar__track",
695
+ role: "tablist"
696
+ }, [i("span", {
697
+ class: l(["ak-tab-bar__indicator", { "ak-tab-bar__indicator--ready": v.value.ready }]),
698
+ style: u({
699
+ transform: `translate(${v.value.x}px, ${v.value.y}px)`,
700
+ width: `${v.value.w}px`,
701
+ height: `${v.value.h}px`
702
+ }),
703
+ "aria-hidden": "true"
704
+ }, null, 6), _(e.$slots, "default", {}, void 0, !0)], 512)]));
705
+ }
706
+ }), [["__scopeId", "data-v-636977ec"]]), dt = [
707
+ "aria-selected",
708
+ "aria-label",
709
+ "disabled"
710
+ ], ft = {
711
+ class: "ak-tab-bar__icon",
712
+ "aria-hidden": "true"
713
+ }, pt = { class: "ak-tab-bar__label" }, X = /*#__PURE__*/ w(/* @__PURE__ */ o({
714
+ __name: "AkTabBarItem",
715
+ props: {
716
+ value: {},
717
+ label: {},
718
+ icon: {},
719
+ disabled: {
720
+ type: Boolean,
721
+ default: !1
722
+ }
723
+ },
724
+ setup(a) {
725
+ let o = a, c = s(J);
726
+ if (!c) throw Error("AkTabBarItem must be used inside AkTabBar");
727
+ let u = c, m = g(null), h = e(() => u.active.value === o.value);
728
+ d(() => {
729
+ m.value && u.register(o.value, m.value);
730
+ }), f(() => {
731
+ u.unregister(o.value);
732
+ });
733
+ function y() {
734
+ o.disabled || u.select(o.value);
735
+ }
736
+ return (e, o) => (p(), r("button", {
737
+ ref_key: "itemRef",
738
+ ref: m,
739
+ type: "button",
740
+ class: l(["ak-tab-bar__item", { "ak-tab-bar__item--active": h.value }]),
741
+ role: "tab",
742
+ "aria-selected": h.value,
743
+ "aria-label": a.label,
744
+ disabled: a.disabled,
745
+ onClick: y
746
+ }, [i("span", ft, [_(e.$slots, "icon", {}, () => [a.icon ? (p(), t(z, {
747
+ key: 0,
748
+ name: a.icon,
749
+ size: 20
750
+ }, null, 8, ["name"])) : n("", !0)], !0)]), i("span", pt, v(a.label), 1)], 10, dt));
751
+ }
752
+ }), [["__scopeId", "data-v-2a73a441"]]), mt = /* @__PURE__ */ te({
753
+ AkAmbientBg: () => I,
754
+ AkBadge: () => E,
755
+ AkButton: () => T,
337
756
  AkCard: () => O,
338
- AkChip: () => C,
339
- AkEmptyState: () => G,
340
- AkInput: () => N,
341
- AkShimmer: () => K,
342
- AkTextarea: () => R
343
- }), Y = { install(e, t = {}) {
757
+ AkChip: () => D,
758
+ AkDivider: () => B,
759
+ AkEmptyState: () => P,
760
+ AkIcon: () => z,
761
+ AkIconButton: () => K,
762
+ AkInput: () => k,
763
+ AkList: () => W,
764
+ AkListRow: () => G,
765
+ AkProgress: () => V,
766
+ AkSectionHeader: () => H,
767
+ AkShimmer: () => F,
768
+ AkSwitch: () => q,
769
+ AkTabBar: () => Y,
770
+ AkTabBarItem: () => X,
771
+ AkTextarea: () => A
772
+ }), ht = { install(e, t = {}) {
344
773
  let n = t.prefix ?? "";
345
- for (let [t, r] of Object.entries(J)) e.component(`${n}${t}`, r);
346
- } };
774
+ for (let [t, r] of Object.entries(mt)) e.component(`${n}${t}`, r);
775
+ } }, Z = {
776
+ violet: {
777
+ label: "Violet",
778
+ description: "Mineral violet — default for App mood.",
779
+ sample: "#6658b8"
780
+ },
781
+ evergreen: {
782
+ label: "Evergreen",
783
+ description: "Confident green — default for Site mood.",
784
+ sample: "#2e684f"
785
+ },
786
+ teal: {
787
+ label: "Teal",
788
+ description: "Calm mineral teal for productivity and wellness apps.",
789
+ sample: "#3a7d85"
790
+ },
791
+ ocean: {
792
+ label: "Ocean",
793
+ description: "Trustworthy blue for data-heavy products.",
794
+ sample: "#3d6a94"
795
+ },
796
+ amber: {
797
+ label: "Amber",
798
+ description: "Warm gold for optimistic, human interfaces.",
799
+ sample: "#9a702d"
800
+ },
801
+ rose: {
802
+ label: "Rose",
803
+ description: "Dusty rose for lifestyle and creative tools.",
804
+ sample: "#a8586a"
805
+ },
806
+ coral: {
807
+ label: "Coral",
808
+ description: "Terracotta warmth without feeling playful.",
809
+ sample: "#b5644a"
810
+ },
811
+ slate: {
812
+ label: "Slate",
813
+ description: "Blue-gray for neutral B2B surfaces.",
814
+ sample: "#4a5d73"
815
+ }
816
+ }, gt = Object.keys(Z), Q = "violet", $ = "evergreen";
817
+ function _t(e, t) {
818
+ if (t === "auto") {
819
+ delete e.dataset.accent;
820
+ return;
821
+ }
822
+ e.dataset.accent = t;
823
+ }
824
+ function vt(e, t) {
825
+ return t || (e === "site" ? $ : Q);
826
+ }
347
827
  //#endregion
348
- export { q as AkAmbientBg, x as AkBadge, b as AkButton, O as AkCard, C as AkChip, G as AkEmptyState, N as AkInput, K as AkShimmer, R as AkTextarea, Y as Akoma };
828
+ export { I as AkAmbientBg, E as AkBadge, T as AkButton, O as AkCard, D as AkChip, B as AkDivider, P as AkEmptyState, z as AkIcon, K as AkIconButton, k as AkInput, W as AkList, G as AkListRow, V as AkProgress, H as AkSectionHeader, F as AkShimmer, q as AkSwitch, Y as AkTabBar, X as AkTabBarItem, A as AkTextarea, ht as Akoma, gt as accentPaletteIds, Z as accentPalettes, Q as appDefaultAccent, _t as applyAccentPalette, L as cuidaIconMap, R as getCuidaIconMarkup, vt as resolveAccentPalette, $ as siteDefaultAccent };