@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/README.md +34 -4
- package/content/README.md +28 -0
- package/content/decisions.md +45 -0
- package/content/implementation.md +33 -0
- package/content/moods.md +31 -0
- package/content/philosophy.md +43 -0
- package/dist/akoma.cjs +1 -1
- package/dist/akoma.css +1 -1
- package/dist/akoma.js +363 -89
- package/dist/index.d.ts +186 -0
- package/package.json +8 -5
- package/src/styles/tokens.css +56 -55
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,
|
|
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
|
|
3
|
+
var h = Object.defineProperty, g = (e, t) => {
|
|
4
4
|
let n = {};
|
|
5
|
-
for (var r in e)
|
|
5
|
+
for (var r in e) h(n, r, {
|
|
6
6
|
get: e[r],
|
|
7
7
|
enumerable: !0
|
|
8
8
|
});
|
|
9
|
-
return t ||
|
|
10
|
-
},
|
|
9
|
+
return t || h(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
10
|
+
}, _ = [
|
|
11
11
|
"type",
|
|
12
12
|
"disabled",
|
|
13
13
|
"aria-busy"
|
|
14
|
-
],
|
|
14
|
+
], v = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "ak-button__spinner",
|
|
17
17
|
"aria-hidden": "true"
|
|
18
|
-
},
|
|
18
|
+
}, y = {
|
|
19
19
|
key: 1,
|
|
20
20
|
class: "ak-button__icon"
|
|
21
|
-
},
|
|
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) => (
|
|
42
|
-
class:
|
|
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 ? (
|
|
55
|
-
i.$slots.icon && !e.loading ? (
|
|
56
|
-
r("span",
|
|
57
|
-
], 10,
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
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) => (
|
|
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"]]),
|
|
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) => (
|
|
88
|
+
return (t, i) => (l(), n("button", {
|
|
89
89
|
type: "button",
|
|
90
|
-
class:
|
|
91
|
-
style:
|
|
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
|
-
}, [
|
|
95
|
+
}, [d(t.$slots, "default", {}, void 0, !0)], 14, w));
|
|
96
96
|
}
|
|
97
|
-
}), [["__scopeId", "data-v-c782362c"]]),
|
|
97
|
+
}), [["__scopeId", "data-v-c782362c"]]), E = {
|
|
98
98
|
key: 0,
|
|
99
99
|
class: "ak-card__media"
|
|
100
|
-
},
|
|
100
|
+
}, te = {
|
|
101
101
|
key: 1,
|
|
102
102
|
class: "ak-card__header"
|
|
103
|
-
},
|
|
103
|
+
}, ne = {
|
|
104
104
|
key: 2,
|
|
105
105
|
class: "ak-card__body"
|
|
106
|
-
},
|
|
106
|
+
}, re = {
|
|
107
107
|
key: 3,
|
|
108
108
|
class: "ak-card__footer"
|
|
109
|
-
},
|
|
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) => (
|
|
120
|
-
r.$slots.media ? (
|
|
121
|
-
r.$slots.header ? (
|
|
122
|
-
r.$slots.default ? (
|
|
123
|
-
r.$slots.footer ? (
|
|
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-
|
|
126
|
+
}), [["__scopeId", "data-v-73ac6197"]]), ie = {
|
|
127
127
|
key: 0,
|
|
128
128
|
class: "ak-field__label"
|
|
129
|
-
},
|
|
129
|
+
}, ae = {
|
|
130
130
|
key: 0,
|
|
131
131
|
class: "ak-field__required",
|
|
132
132
|
"aria-hidden": "true"
|
|
133
|
-
},
|
|
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
|
-
],
|
|
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:
|
|
167
|
-
let
|
|
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
|
-
|
|
170
|
+
u("update:modelValue", t.value);
|
|
171
171
|
}
|
|
172
|
-
return (e,
|
|
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 ? (
|
|
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:
|
|
179
|
-
class:
|
|
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,
|
|
191
|
-
a.error || a.hint ? (
|
|
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
|
-
},
|
|
195
|
+
}, f(a.error || a.hint), 9, se)) : t("", !0)
|
|
196
196
|
], 2));
|
|
197
197
|
}
|
|
198
|
-
}), [["__scopeId", "data-v-60d7d2d0"]]),
|
|
198
|
+
}), [["__scopeId", "data-v-60d7d2d0"]]), k = {
|
|
199
199
|
key: 0,
|
|
200
200
|
class: "ak-field__label"
|
|
201
|
-
},
|
|
201
|
+
}, A = {
|
|
202
202
|
key: 0,
|
|
203
203
|
class: "ak-field__required",
|
|
204
204
|
"aria-hidden": "true"
|
|
205
|
-
},
|
|
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
|
-
],
|
|
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:
|
|
236
|
-
let
|
|
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
|
-
|
|
239
|
+
u("update:modelValue", t.value);
|
|
240
240
|
}
|
|
241
|
-
return (e,
|
|
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 ? (
|
|
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:
|
|
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,
|
|
259
|
-
a.error || a.hint ? (
|
|
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
|
-
},
|
|
263
|
+
}, f(a.error || a.hint), 9, M)) : t("", !0)
|
|
264
264
|
], 2));
|
|
265
265
|
}
|
|
266
|
-
}), [["__scopeId", "data-v-d34da198"]]),
|
|
266
|
+
}), [["__scopeId", "data-v-d34da198"]]), P = { class: "ak-empty" }, F = {
|
|
267
267
|
class: "ak-empty__icon",
|
|
268
268
|
"aria-hidden": "true"
|
|
269
|
-
},
|
|
269
|
+
}, I = {
|
|
270
270
|
key: 0,
|
|
271
271
|
class: "ak-empty__glyph"
|
|
272
|
-
},
|
|
272
|
+
}, L = { class: "ak-empty__title" }, R = {
|
|
273
273
|
key: 0,
|
|
274
274
|
class: "ak-empty__description"
|
|
275
|
-
},
|
|
275
|
+
}, z = {
|
|
276
276
|
key: 1,
|
|
277
277
|
class: "ak-empty__action"
|
|
278
|
-
},
|
|
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) => (
|
|
286
|
-
r("div",
|
|
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 ? (
|
|
289
|
+
i.$slots.icon ? (l(), n("span", I, [d(i.$slots, "icon", {}, void 0, !0)])) : t("", !0)
|
|
290
290
|
]),
|
|
291
|
-
r("h3",
|
|
292
|
-
e.description ? (
|
|
293
|
-
i.$slots.action ? (
|
|
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-
|
|
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) => (
|
|
307
|
+
return (r, i) => (l(), n("div", {
|
|
308
308
|
class: "ak-shimmer",
|
|
309
|
-
style:
|
|
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"]]),
|
|
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) => (
|
|
325
|
-
class:
|
|
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"]]),
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
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(
|
|
619
|
+
for (let [t, r] of Object.entries(We)) e.component(`${n}${t}`, r);
|
|
346
620
|
} };
|
|
347
621
|
//#endregion
|
|
348
|
-
export {
|
|
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 };
|