@rafael_dias/akoma 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/akoma.js CHANGED
@@ -1,24 +1,24 @@
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, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createTextVNode as i, defineComponent as a, inject as o, normalizeClass as s, normalizeStyle as c, openBlock as l, provide as u, renderSlot as d, toDisplayString as f, unref as p, useId as m } from "vue";
2
2
  //#region \0rolldown/runtime.js
3
- var f = Object.defineProperty, p = (e, t) => {
3
+ var h = Object.defineProperty, g = (e, t) => {
4
4
  let n = {};
5
- for (var r in e) f(n, r, {
5
+ for (var r in e) h(n, r, {
6
6
  get: e[r],
7
7
  enumerable: !0
8
8
  });
9
- return t || f(n, Symbol.toStringTag, { value: "Module" }), n;
10
- }, m = [
9
+ return t || h(n, Symbol.toStringTag, { value: "Module" }), n;
10
+ }, _ = [
11
11
  "type",
12
12
  "disabled",
13
13
  "aria-busy"
14
- ], h = {
14
+ ], v = {
15
15
  key: 0,
16
16
  class: "ak-button__spinner",
17
17
  "aria-hidden": "true"
18
- }, g = {
18
+ }, y = {
19
19
  key: 1,
20
20
  class: "ak-button__icon"
21
- }, _ = { class: "ak-button__label" }, v = /*@__PURE__*/ a({
21
+ }, b = { class: "ak-button__label" }, ee = /*@__PURE__*/ a({
22
22
  __name: "AkButton",
23
23
  props: {
24
24
  variant: { default: "primary" },
@@ -38,8 +38,8 @@ var f = Object.defineProperty, p = (e, t) => {
38
38
  }
39
39
  },
40
40
  setup(e) {
41
- return (i, a) => (c(), n("button", {
42
- class: o(["ak-button tap-scale", [
41
+ return (i, a) => (l(), n("button", {
42
+ class: s(["ak-button tap-scale", [
43
43
  `ak-button--${e.variant}`,
44
44
  `ak-button--${e.size}`,
45
45
  {
@@ -51,25 +51,25 @@ var f = Object.defineProperty, p = (e, t) => {
51
51
  disabled: e.disabled || e.loading,
52
52
  "aria-busy": e.loading || void 0
53
53
  }, [
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));
54
+ e.loading ? (l(), n("span", v)) : t("", !0),
55
+ i.$slots.icon && !e.loading ? (l(), n("span", y, [d(i.$slots, "icon", {}, void 0, !0)])) : t("", !0),
56
+ r("span", b, [d(i.$slots, "default", {}, void 0, !0)])
57
+ ], 10, _));
58
58
  }
59
- }), y = (e, t) => {
59
+ }), x = (e, t) => {
60
60
  let n = e.__vccOpts || e;
61
61
  for (let [e, r] of t) n[e] = r;
62
62
  return n;
63
- }, b = /*#__PURE__*/ y(v, [["__scopeId", "data-v-78a39ccd"]]), x = /*#__PURE__*/ y(/* @__PURE__ */ a({
63
+ }, S = /*#__PURE__*/ x(ee, [["__scopeId", "data-v-7786dae9"]]), C = /*#__PURE__*/ x(/* @__PURE__ */ a({
64
64
  __name: "AkBadge",
65
65
  props: {
66
66
  variant: { default: "neutral" },
67
67
  label: {}
68
68
  },
69
69
  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));
70
+ return (t, r) => (l(), n("span", { class: s(["ak-badge", `ak-badge--${e.variant}`]) }, [d(t.$slots, "default", {}, () => [i(f(e.label), 1)], !0)], 2));
71
71
  }
72
- }), [["__scopeId", "data-v-02933f09"]]), S = ["disabled", "aria-pressed"], C = /*#__PURE__*/ y(/* @__PURE__ */ a({
72
+ }), [["__scopeId", "data-v-02933f09"]]), w = ["disabled", "aria-pressed"], T = /*#__PURE__*/ x(/* @__PURE__ */ a({
73
73
  __name: "AkChip",
74
74
  props: {
75
75
  active: {
@@ -85,28 +85,28 @@ var f = Object.defineProperty, p = (e, t) => {
85
85
  emits: ["click"],
86
86
  setup(e, { emit: t }) {
87
87
  let r = t;
88
- return (t, i) => (c(), n("button", {
88
+ return (t, i) => (l(), n("button", {
89
89
  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),
90
+ class: s(["ak-chip tap-scale", { "ak-chip--active": e.active }]),
91
+ style: c(e.active && e.color ? { "--ak-chip-active-bg": e.color } : void 0),
92
92
  disabled: e.disabled,
93
93
  "aria-pressed": e.active,
94
94
  onClick: i[0] ||= (e) => r("click", e)
95
- }, [l(t.$slots, "default", {}, void 0, !0)], 14, S));
95
+ }, [d(t.$slots, "default", {}, void 0, !0)], 14, w));
96
96
  }
97
- }), [["__scopeId", "data-v-c782362c"]]), w = {
97
+ }), [["__scopeId", "data-v-c782362c"]]), E = {
98
98
  key: 0,
99
99
  class: "ak-card__media"
100
- }, T = {
100
+ }, te = {
101
101
  key: 1,
102
102
  class: "ak-card__header"
103
- }, E = {
103
+ }, ne = {
104
104
  key: 2,
105
105
  class: "ak-card__body"
106
- }, D = {
106
+ }, re = {
107
107
  key: 3,
108
108
  class: "ak-card__footer"
109
- }, O = /*#__PURE__*/ y(/* @__PURE__ */ a({
109
+ }, D = /*#__PURE__*/ x(/* @__PURE__ */ a({
110
110
  __name: "AkCard",
111
111
  props: {
112
112
  interactive: {
@@ -116,21 +116,21 @@ var f = Object.defineProperty, p = (e, t) => {
116
116
  padding: { default: "md" }
117
117
  },
118
118
  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)
119
+ return (r, i) => (l(), n("article", { class: s(["ak-card", [`ak-card--pad-${e.padding}`, { "ak-card--interactive": e.interactive }]]) }, [
120
+ r.$slots.media ? (l(), n("div", E, [d(r.$slots, "media", {}, void 0, !0)])) : t("", !0),
121
+ r.$slots.header ? (l(), n("div", te, [d(r.$slots, "header", {}, void 0, !0)])) : t("", !0),
122
+ r.$slots.default ? (l(), n("div", ne, [d(r.$slots, "default", {}, void 0, !0)])) : t("", !0),
123
+ r.$slots.footer ? (l(), n("div", re, [d(r.$slots, "footer", {}, void 0, !0)])) : t("", !0)
124
124
  ], 2));
125
125
  }
126
- }), [["__scopeId", "data-v-0eb2f676"]]), k = {
126
+ }), [["__scopeId", "data-v-73ac6197"]]), ie = {
127
127
  key: 0,
128
128
  class: "ak-field__label"
129
- }, A = {
129
+ }, ae = {
130
130
  key: 0,
131
131
  class: "ak-field__required",
132
132
  "aria-hidden": "true"
133
- }, j = [
133
+ }, oe = [
134
134
  "id",
135
135
  "type",
136
136
  "value",
@@ -141,7 +141,7 @@ var f = Object.defineProperty, p = (e, t) => {
141
141
  "autocomplete",
142
142
  "aria-invalid",
143
143
  "aria-describedby"
144
- ], M = ["id"], N = /*#__PURE__*/ y(/* @__PURE__ */ a({
144
+ ], se = ["id"], O = /*#__PURE__*/ x(/* @__PURE__ */ a({
145
145
  __name: "AkInput",
146
146
  props: {
147
147
  modelValue: { default: "" },
@@ -163,20 +163,20 @@ var f = Object.defineProperty, p = (e, t) => {
163
163
  name: {}
164
164
  },
165
165
  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);
166
+ setup(a, { emit: o }) {
167
+ let c = a, u = o, d = m(), p = e(() => `ak-input-${d}`), h = e(() => c.hint || c.error ? `ak-input-hint-${d}` : void 0);
168
168
  function g(e) {
169
169
  let t = e.target;
170
- f("update:modelValue", t.value);
170
+ u("update:modelValue", t.value);
171
171
  }
172
- return (e, s) => (c(), n("label", { class: o(["ak-field", {
172
+ return (e, o) => (l(), n("label", { class: s(["ak-field", {
173
173
  "ak-field--disabled": a.disabled,
174
174
  "ak-field--error": !!a.error
175
175
  }]) }, [
176
- a.label ? (c(), n("span", k, [i(u(a.label) + " ", 1), a.required ? (c(), n("span", A, "*")) : t("", !0)])) : t("", !0),
176
+ a.label ? (l(), n("span", ie, [i(f(a.label) + " ", 1), a.required ? (l(), n("span", ae, "*")) : t("", !0)])) : t("", !0),
177
177
  r("input", {
178
- id: m.value,
179
- class: o(["ak-field__control", `ak-field__control--${a.size}`]),
178
+ id: p.value,
179
+ class: s(["ak-field__control", `ak-field__control--${a.size}`]),
180
180
  type: a.type,
181
181
  value: a.modelValue,
182
182
  placeholder: a.placeholder,
@@ -187,22 +187,22 @@ var f = Object.defineProperty, p = (e, t) => {
187
187
  "aria-invalid": !!a.error || void 0,
188
188
  "aria-describedby": h.value,
189
189
  onInput: g
190
- }, null, 42, j),
191
- a.error || a.hint ? (c(), n("span", {
190
+ }, null, 42, oe),
191
+ a.error || a.hint ? (l(), n("span", {
192
192
  key: 1,
193
193
  id: h.value,
194
194
  class: "ak-field__hint"
195
- }, u(a.error || a.hint), 9, M)) : t("", !0)
195
+ }, f(a.error || a.hint), 9, se)) : t("", !0)
196
196
  ], 2));
197
197
  }
198
- }), [["__scopeId", "data-v-60d7d2d0"]]), P = {
198
+ }), [["__scopeId", "data-v-60d7d2d0"]]), k = {
199
199
  key: 0,
200
200
  class: "ak-field__label"
201
- }, F = {
201
+ }, A = {
202
202
  key: 0,
203
203
  class: "ak-field__required",
204
204
  "aria-hidden": "true"
205
- }, I = [
205
+ }, j = [
206
206
  "id",
207
207
  "value",
208
208
  "placeholder",
@@ -212,7 +212,7 @@ var f = Object.defineProperty, p = (e, t) => {
212
212
  "rows",
213
213
  "aria-invalid",
214
214
  "aria-describedby"
215
- ], L = ["id"], R = /*#__PURE__*/ y(/* @__PURE__ */ a({
215
+ ], M = ["id"], N = /*#__PURE__*/ x(/* @__PURE__ */ a({
216
216
  __name: "AkTextarea",
217
217
  props: {
218
218
  modelValue: { default: "" },
@@ -232,19 +232,19 @@ var f = Object.defineProperty, p = (e, t) => {
232
232
  name: {}
233
233
  },
234
234
  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);
235
+ setup(a, { emit: o }) {
236
+ let c = a, u = o, d = m(), p = e(() => `ak-textarea-${d}`), h = e(() => c.hint || c.error ? `ak-textarea-hint-${d}` : void 0);
237
237
  function g(e) {
238
238
  let t = e.target;
239
- f("update:modelValue", t.value);
239
+ u("update:modelValue", t.value);
240
240
  }
241
- return (e, s) => (c(), n("label", { class: o(["ak-field", {
241
+ return (e, o) => (l(), n("label", { class: s(["ak-field", {
242
242
  "ak-field--disabled": a.disabled,
243
243
  "ak-field--error": !!a.error
244
244
  }]) }, [
245
- a.label ? (c(), n("span", P, [i(u(a.label) + " ", 1), a.required ? (c(), n("span", F, "*")) : t("", !0)])) : t("", !0),
245
+ a.label ? (l(), n("span", k, [i(f(a.label) + " ", 1), a.required ? (l(), n("span", A, "*")) : t("", !0)])) : t("", !0),
246
246
  r("textarea", {
247
- id: m.value,
247
+ id: p.value,
248
248
  class: "ak-field__control",
249
249
  value: a.modelValue,
250
250
  placeholder: a.placeholder,
@@ -255,45 +255,45 @@ var f = Object.defineProperty, p = (e, t) => {
255
255
  "aria-invalid": !!a.error || void 0,
256
256
  "aria-describedby": h.value,
257
257
  onInput: g
258
- }, null, 40, I),
259
- a.error || a.hint ? (c(), n("span", {
258
+ }, null, 40, j),
259
+ a.error || a.hint ? (l(), n("span", {
260
260
  key: 1,
261
261
  id: h.value,
262
262
  class: "ak-field__hint"
263
- }, u(a.error || a.hint), 9, L)) : t("", !0)
263
+ }, f(a.error || a.hint), 9, M)) : t("", !0)
264
264
  ], 2));
265
265
  }
266
- }), [["__scopeId", "data-v-d34da198"]]), z = { class: "ak-empty" }, B = {
266
+ }), [["__scopeId", "data-v-d34da198"]]), P = { class: "ak-empty" }, F = {
267
267
  class: "ak-empty__icon",
268
268
  "aria-hidden": "true"
269
- }, V = {
269
+ }, I = {
270
270
  key: 0,
271
271
  class: "ak-empty__glyph"
272
- }, H = { class: "ak-empty__title" }, U = {
272
+ }, L = { class: "ak-empty__title" }, R = {
273
273
  key: 0,
274
274
  class: "ak-empty__description"
275
- }, W = {
275
+ }, z = {
276
276
  key: 1,
277
277
  class: "ak-empty__action"
278
- }, G = /*#__PURE__*/ y(/* @__PURE__ */ a({
278
+ }, B = /*#__PURE__*/ x(/* @__PURE__ */ a({
279
279
  __name: "AkEmptyState",
280
280
  props: {
281
281
  title: {},
282
282
  description: {}
283
283
  },
284
284
  setup(e) {
285
- return (i, a) => (c(), n("div", z, [
286
- r("div", B, [
285
+ return (i, a) => (l(), n("div", P, [
286
+ r("div", F, [
287
287
  a[0] ||= r("span", { class: "ak-empty__ring ak-empty__ring--outer" }, null, -1),
288
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)
289
+ i.$slots.icon ? (l(), n("span", I, [d(i.$slots, "icon", {}, void 0, !0)])) : t("", !0)
290
290
  ]),
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)
291
+ r("h3", L, f(e.title), 1),
292
+ e.description ? (l(), n("p", R, f(e.description), 1)) : t("", !0),
293
+ i.$slots.action ? (l(), n("div", z, [d(i.$slots, "action", {}, void 0, !0)])) : t("", !0)
294
294
  ]));
295
295
  }
296
- }), [["__scopeId", "data-v-b8b16929"]]), K = /*#__PURE__*/ y(/* @__PURE__ */ a({
296
+ }), [["__scopeId", "data-v-ab81ece0"]]), V = /*#__PURE__*/ x(/* @__PURE__ */ a({
297
297
  __name: "AkShimmer",
298
298
  props: {
299
299
  width: { default: "100%" },
@@ -304,9 +304,9 @@ var f = Object.defineProperty, p = (e, t) => {
304
304
  function t(e) {
305
305
  return e === "sm" || e === "md" || e === "lg" || e === "full" ? `var(--radius-${e})` : e;
306
306
  }
307
- return (r, i) => (c(), n("div", {
307
+ return (r, i) => (l(), n("div", {
308
308
  class: "ak-shimmer",
309
- style: s({
309
+ style: c({
310
310
  width: e.width,
311
311
  height: e.height,
312
312
  borderRadius: t(e.radius)
@@ -314,15 +314,15 @@ var f = Object.defineProperty, p = (e, t) => {
314
314
  "aria-hidden": "true"
315
315
  }, null, 4));
316
316
  }
317
- }), [["__scopeId", "data-v-de7bd16d"]]), q = /*#__PURE__*/ y(/* @__PURE__ */ a({
317
+ }), [["__scopeId", "data-v-de7bd16d"]]), H = /*#__PURE__*/ x(/* @__PURE__ */ a({
318
318
  __name: "AkAmbientBg",
319
319
  props: { contained: {
320
320
  type: Boolean,
321
321
  default: !1
322
322
  } },
323
323
  setup(e) {
324
- return (t, i) => (c(), n("div", {
325
- class: o(["ambient", { "ambient--contained": e.contained }]),
324
+ return (t, i) => (l(), n("div", {
325
+ class: s(["ambient", { "ambient--contained": e.contained }]),
326
326
  "aria-hidden": "true"
327
327
  }, [...i[0] ||= [
328
328
  r("span", { class: "ambient__orb ambient__orb--1" }, null, -1),
@@ -330,19 +330,293 @@ var f = Object.defineProperty, p = (e, t) => {
330
330
  r("span", { class: "ambient__orb ambient__orb--3" }, null, -1)
331
331
  ]], 2));
332
332
  }
333
- }), [["__scopeId", "data-v-b34dece3"]]), J = /* @__PURE__ */ p({
334
- AkAmbientBg: () => q,
335
- AkBadge: () => x,
336
- AkButton: () => b,
337
- AkCard: () => O,
338
- AkChip: () => C,
339
- AkEmptyState: () => G,
340
- AkInput: () => N,
341
- AkShimmer: () => K,
342
- AkTextarea: () => R
343
- }), Y = { install(e, t = {}) {
333
+ }), [["__scopeId", "data-v-b34dece3"]]), U = ["aria-orientation"], W = {
334
+ key: 0,
335
+ class: "ak-divider__label"
336
+ }, G = /*#__PURE__*/ x(/* @__PURE__ */ a({
337
+ __name: "AkDivider",
338
+ props: {
339
+ spacing: { default: "md" },
340
+ label: {},
341
+ vertical: {
342
+ type: Boolean,
343
+ default: !1
344
+ }
345
+ },
346
+ setup(e) {
347
+ return (r, i) => (l(), n("div", {
348
+ class: s(["ak-divider", [e.vertical ? "ak-divider--vertical" : "ak-divider--horizontal", `ak-divider--spacing-${e.spacing}`]]),
349
+ role: "separator",
350
+ "aria-orientation": e.vertical ? "vertical" : "horizontal"
351
+ }, [e.label && !e.vertical ? (l(), n("span", W, f(e.label), 1)) : t("", !0)], 10, U));
352
+ }
353
+ }), [["__scopeId", "data-v-17bc7513"]]), K = {
354
+ key: 0,
355
+ class: "ak-progress__meta"
356
+ }, ce = {
357
+ key: 0,
358
+ class: "ak-progress__label"
359
+ }, le = {
360
+ key: 1,
361
+ class: "ak-progress__value numeric"
362
+ }, ue = [
363
+ "aria-valuenow",
364
+ "aria-valuemax",
365
+ "aria-label"
366
+ ], q = /*#__PURE__*/ x(/* @__PURE__ */ a({
367
+ __name: "AkProgress",
368
+ props: {
369
+ value: { default: 0 },
370
+ max: { default: 100 },
371
+ size: { default: "md" },
372
+ color: {},
373
+ label: {},
374
+ showValue: {
375
+ type: Boolean,
376
+ default: !1
377
+ }
378
+ },
379
+ setup(i) {
380
+ let a = i, o = e(() => a.max <= 0 ? 0 : Math.min(100, Math.max(0, a.value / a.max * 100))), u = e(() => ({
381
+ width: `${o.value}%`,
382
+ ...a.color ? { background: a.color } : {}
383
+ }));
384
+ return (e, a) => (l(), n("div", { class: s(["ak-progress", `ak-progress--${i.size}`]) }, [i.label || i.showValue ? (l(), n("div", K, [i.label ? (l(), n("span", ce, f(i.label), 1)) : t("", !0), i.showValue ? (l(), n("span", le, f(Math.round(o.value)) + "%", 1)) : t("", !0)])) : t("", !0), r("div", {
385
+ class: "ak-progress__track",
386
+ role: "progressbar",
387
+ "aria-valuenow": i.value,
388
+ "aria-valuemin": 0,
389
+ "aria-valuemax": i.max,
390
+ "aria-label": i.label
391
+ }, [r("span", {
392
+ class: "ak-progress__fill",
393
+ style: c(u.value)
394
+ }, null, 4)], 8, ue)], 2));
395
+ }
396
+ }), [["__scopeId", "data-v-ed0a6fcd"]]), de = { class: "ak-section-header" }, fe = { class: "ak-section-header__title" }, pe = {
397
+ key: 0,
398
+ class: "ak-section-header__action"
399
+ }, J = /*#__PURE__*/ x(/* @__PURE__ */ a({
400
+ __name: "AkSectionHeader",
401
+ props: { title: {} },
402
+ setup(e) {
403
+ return (a, o) => (l(), n("header", de, [r("h2", fe, [d(a.$slots, "default", {}, () => [i(f(e.title), 1)], !0)]), a.$slots.action ? (l(), n("div", pe, [d(a.$slots, "action", {}, void 0, !0)])) : t("", !0)]));
404
+ }
405
+ }), [["__scopeId", "data-v-65fca8d1"]]), me = { class: "ak-list" }, Y = /*#__PURE__*/ x(/* @__PURE__ */ a({
406
+ __name: "AkList",
407
+ setup(e) {
408
+ return u("ak-list", !0), (e, t) => (l(), n("ul", me, [d(e.$slots, "default", {}, void 0, !0)]));
409
+ }
410
+ }), [["__scopeId", "data-v-708bdd68"]]), he = ["disabled"], ge = {
411
+ key: 0,
412
+ class: "ak-list-row__leading"
413
+ }, _e = { class: "ak-list-row__content" }, ve = { class: "ak-list-row__title" }, ye = {
414
+ key: 0,
415
+ class: "ak-list-row__subtitle"
416
+ }, be = {
417
+ key: 1,
418
+ class: "ak-list-row__trailing"
419
+ }, xe = {
420
+ key: 0,
421
+ class: "ak-list-row__leading"
422
+ }, Se = { class: "ak-list-row__content" }, Ce = { class: "ak-list-row__title" }, we = {
423
+ key: 0,
424
+ class: "ak-list-row__subtitle"
425
+ }, Te = {
426
+ key: 1,
427
+ class: "ak-list-row__trailing"
428
+ }, Ee = ["disabled"], De = {
429
+ key: 0,
430
+ class: "ak-list-row__leading"
431
+ }, Oe = { class: "ak-list-row__content" }, ke = { class: "ak-list-row__title" }, Ae = {
432
+ key: 0,
433
+ class: "ak-list-row__subtitle"
434
+ }, je = {
435
+ key: 1,
436
+ class: "ak-list-row__trailing"
437
+ }, Me = {
438
+ key: 0,
439
+ class: "ak-list-row__leading"
440
+ }, Ne = { class: "ak-list-row__content" }, Pe = { class: "ak-list-row__title" }, Fe = {
441
+ key: 0,
442
+ class: "ak-list-row__subtitle"
443
+ }, Ie = {
444
+ key: 1,
445
+ class: "ak-list-row__trailing"
446
+ }, X = /*#__PURE__*/ x(/* @__PURE__ */ a({
447
+ __name: "AkListRow",
448
+ props: {
449
+ interactive: {
450
+ type: Boolean,
451
+ default: !1
452
+ },
453
+ disabled: {
454
+ type: Boolean,
455
+ default: !1
456
+ },
457
+ padding: { default: "md" },
458
+ divider: {
459
+ type: Boolean,
460
+ default: !0
461
+ }
462
+ },
463
+ setup(i) {
464
+ let a = i, c = o("ak-list", !1), u = e(() => [
465
+ "ak-list-row",
466
+ `ak-list-row--pad-${a.padding}`,
467
+ {
468
+ "ak-list-row--interactive": a.interactive,
469
+ "ak-list-row--disabled": a.disabled
470
+ }
471
+ ]);
472
+ return (e, a) => p(c) ? (l(), n("li", {
473
+ key: 0,
474
+ class: s(["ak-list-row-item", { "ak-list-row-item--divider": i.divider }])
475
+ }, [i.interactive ? (l(), n("button", {
476
+ key: 0,
477
+ type: "button",
478
+ class: s(u.value),
479
+ disabled: i.disabled
480
+ }, [
481
+ e.$slots.leading ? (l(), n("span", ge, [d(e.$slots, "leading", {}, void 0, !0)])) : t("", !0),
482
+ r("span", _e, [r("span", ve, [d(e.$slots, "default", {}, void 0, !0)]), e.$slots.subtitle ? (l(), n("span", ye, [d(e.$slots, "subtitle", {}, void 0, !0)])) : t("", !0)]),
483
+ e.$slots.trailing ? (l(), n("span", be, [d(e.$slots, "trailing", {}, void 0, !0)])) : t("", !0)
484
+ ], 10, he)) : (l(), n("div", {
485
+ key: 1,
486
+ class: s(u.value)
487
+ }, [
488
+ e.$slots.leading ? (l(), n("span", xe, [d(e.$slots, "leading", {}, void 0, !0)])) : t("", !0),
489
+ r("span", Se, [r("span", Ce, [d(e.$slots, "default", {}, void 0, !0)]), e.$slots.subtitle ? (l(), n("span", we, [d(e.$slots, "subtitle", {}, void 0, !0)])) : t("", !0)]),
490
+ e.$slots.trailing ? (l(), n("span", Te, [d(e.$slots, "trailing", {}, void 0, !0)])) : t("", !0)
491
+ ], 2))], 2)) : i.interactive ? (l(), n("button", {
492
+ key: 1,
493
+ type: "button",
494
+ class: s(u.value),
495
+ disabled: i.disabled
496
+ }, [
497
+ e.$slots.leading ? (l(), n("span", De, [d(e.$slots, "leading", {}, void 0, !0)])) : t("", !0),
498
+ r("span", Oe, [r("span", ke, [d(e.$slots, "default", {}, void 0, !0)]), e.$slots.subtitle ? (l(), n("span", Ae, [d(e.$slots, "subtitle", {}, void 0, !0)])) : t("", !0)]),
499
+ e.$slots.trailing ? (l(), n("span", je, [d(e.$slots, "trailing", {}, void 0, !0)])) : t("", !0)
500
+ ], 10, Ee)) : (l(), n("div", {
501
+ key: 2,
502
+ class: s(u.value)
503
+ }, [
504
+ e.$slots.leading ? (l(), n("span", Me, [d(e.$slots, "leading", {}, void 0, !0)])) : t("", !0),
505
+ r("span", Ne, [r("span", Pe, [d(e.$slots, "default", {}, void 0, !0)]), e.$slots.subtitle ? (l(), n("span", Fe, [d(e.$slots, "subtitle", {}, void 0, !0)])) : t("", !0)]),
506
+ e.$slots.trailing ? (l(), n("span", Ie, [d(e.$slots, "trailing", {}, void 0, !0)])) : t("", !0)
507
+ ], 2));
508
+ }
509
+ }), [["__scopeId", "data-v-9f8ea96f"]]), Z = [
510
+ "type",
511
+ "disabled",
512
+ "aria-label",
513
+ "aria-busy"
514
+ ], Le = {
515
+ key: 0,
516
+ class: "ak-icon-button__spinner",
517
+ "aria-hidden": "true"
518
+ }, Re = {
519
+ key: 1,
520
+ class: "ak-icon-button__icon"
521
+ }, Q = /*#__PURE__*/ x(/* @__PURE__ */ a({
522
+ __name: "AkIconButton",
523
+ props: {
524
+ variant: { default: "ghost" },
525
+ size: { default: "md" },
526
+ disabled: {
527
+ type: Boolean,
528
+ default: !1
529
+ },
530
+ loading: {
531
+ type: Boolean,
532
+ default: !1
533
+ },
534
+ type: { default: "button" },
535
+ label: {}
536
+ },
537
+ setup(e) {
538
+ return (t, r) => (l(), n("button", {
539
+ class: s(["ak-icon-button tap-scale", [
540
+ `ak-icon-button--${e.variant}`,
541
+ `ak-icon-button--${e.size}`,
542
+ { "ak-icon-button--loading": e.loading }
543
+ ]]),
544
+ type: e.type,
545
+ disabled: e.disabled || e.loading,
546
+ "aria-label": e.label,
547
+ "aria-busy": e.loading || void 0
548
+ }, [e.loading ? (l(), n("span", Le)) : (l(), n("span", Re, [d(t.$slots, "default", {}, void 0, !0)]))], 10, Z));
549
+ }
550
+ }), [["__scopeId", "data-v-559ec21c"]]), ze = {
551
+ key: 0,
552
+ class: "ak-switch__copy"
553
+ }, Be = {
554
+ key: 0,
555
+ class: "ak-switch__label"
556
+ }, Ve = {
557
+ key: 1,
558
+ class: "ak-switch__description"
559
+ }, He = { class: "ak-switch__control" }, Ue = [
560
+ "id",
561
+ "checked",
562
+ "disabled"
563
+ ], $ = /*#__PURE__*/ x(/* @__PURE__ */ a({
564
+ __name: "AkSwitch",
565
+ props: {
566
+ modelValue: {
567
+ type: Boolean,
568
+ default: !1
569
+ },
570
+ label: {},
571
+ description: {},
572
+ disabled: {
573
+ type: Boolean,
574
+ default: !1
575
+ }
576
+ },
577
+ emits: ["update:modelValue"],
578
+ setup(i, { emit: a }) {
579
+ let o = a, c = m(), u = e(() => `ak-switch-${c}`);
580
+ function d(e) {
581
+ let t = e.target;
582
+ o("update:modelValue", t.checked);
583
+ }
584
+ return (e, a) => (l(), n("label", { class: s(["ak-switch", {
585
+ "ak-switch--disabled": i.disabled,
586
+ "ak-switch--on": i.modelValue
587
+ }]) }, [i.label || i.description ? (l(), n("span", ze, [i.label ? (l(), n("span", Be, f(i.label), 1)) : t("", !0), i.description ? (l(), n("span", Ve, f(i.description), 1)) : t("", !0)])) : t("", !0), r("span", He, [r("input", {
588
+ id: u.value,
589
+ class: "ak-switch__input",
590
+ type: "checkbox",
591
+ role: "switch",
592
+ checked: i.modelValue,
593
+ disabled: i.disabled,
594
+ onChange: d
595
+ }, null, 40, Ue), a[0] ||= r("span", {
596
+ class: "ak-switch__track",
597
+ "aria-hidden": "true"
598
+ }, [r("span", { class: "ak-switch__thumb" })], -1)])], 2));
599
+ }
600
+ }), [["__scopeId", "data-v-d49f3b2e"]]), We = /* @__PURE__ */ g({
601
+ AkAmbientBg: () => H,
602
+ AkBadge: () => C,
603
+ AkButton: () => S,
604
+ AkCard: () => D,
605
+ AkChip: () => T,
606
+ AkDivider: () => G,
607
+ AkEmptyState: () => B,
608
+ AkIconButton: () => Q,
609
+ AkInput: () => O,
610
+ AkList: () => Y,
611
+ AkListRow: () => X,
612
+ AkProgress: () => q,
613
+ AkSectionHeader: () => J,
614
+ AkShimmer: () => V,
615
+ AkSwitch: () => $,
616
+ AkTextarea: () => N
617
+ }), Ge = { install(e, t = {}) {
344
618
  let n = t.prefix ?? "";
345
- for (let [t, r] of Object.entries(J)) e.component(`${n}${t}`, r);
619
+ for (let [t, r] of Object.entries(We)) e.component(`${n}${t}`, r);
346
620
  } };
347
621
  //#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 };
622
+ export { H as AkAmbientBg, C as AkBadge, S as AkButton, D as AkCard, T as AkChip, G as AkDivider, B as AkEmptyState, Q as AkIconButton, O as AkInput, Y as AkList, X as AkListRow, q as AkProgress, J as AkSectionHeader, V as AkShimmer, $ as AkSwitch, N as AkTextarea, Ge as Akoma };