@komarcalabs/design-system 0.1.2 → 0.1.4
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 +5 -0
- package/dist/index.js +79 -43
- package/dist/plugin-mUxynfRy.js +3064 -0
- package/dist/react/components/KmSkeleton.d.ts +16 -0
- package/dist/react/components/KmSkeleton.d.ts.map +1 -0
- package/dist/react/components/index.d.ts +1 -0
- package/dist/react/components/index.d.ts.map +1 -1
- package/dist/react.js +191 -149
- package/dist/skeleton-D8D5ibC2.js +664 -0
- package/dist/styles.css +1 -1
- package/dist/tokens.js +28 -17
- package/dist/treeview-C6_M73YM.js +641 -0
- package/dist/variants/alert.d.ts +201 -6
- package/dist/variants/alert.d.ts.map +1 -1
- package/dist/variants/checkbox.d.ts +133 -0
- package/dist/variants/checkbox.d.ts.map +1 -0
- package/dist/variants/index.d.ts +8 -0
- package/dist/variants/index.d.ts.map +1 -1
- package/dist/variants/pagination.d.ts +91 -0
- package/dist/variants/pagination.d.ts.map +1 -0
- package/dist/variants/radio.d.ts +143 -0
- package/dist/variants/radio.d.ts.map +1 -0
- package/dist/variants/select.d.ts +46 -1
- package/dist/variants/select.d.ts.map +1 -1
- package/dist/variants/skeleton.d.ts +64 -0
- package/dist/variants/skeleton.d.ts.map +1 -0
- package/dist/variants/table.d.ts +106 -0
- package/dist/variants/table.d.ts.map +1 -0
- package/dist/variants/tabs.d.ts +124 -0
- package/dist/variants/tabs.d.ts.map +1 -0
- package/dist/variants/toggleSwitch.d.ts +9 -0
- package/dist/variants/toggleSwitch.d.ts.map +1 -1
- package/dist/variants/treeview.d.ts +97 -0
- package/dist/variants/treeview.d.ts.map +1 -0
- package/dist/variants/typography.d.ts +377 -0
- package/dist/variants/typography.d.ts.map +1 -0
- package/dist/vue/components/KmAlert.vue.d.ts +16 -1
- package/dist/vue/components/KmAlert.vue.d.ts.map +1 -1
- package/dist/vue/components/KmBadge.vue.d.ts +2 -0
- package/dist/vue/components/KmBadge.vue.d.ts.map +1 -1
- package/dist/vue/components/KmButton.vue.d.ts +3 -1
- package/dist/vue/components/KmButton.vue.d.ts.map +1 -1
- package/dist/vue/components/KmCheckbox.vue.d.ts +45 -0
- package/dist/vue/components/KmCheckbox.vue.d.ts.map +1 -0
- package/dist/vue/components/KmDialog/KmDialog.vue.d.ts +2 -2
- package/dist/vue/components/KmDialog/KmDialog.vue.d.ts.map +1 -1
- package/dist/vue/components/KmFormControl.vue.d.ts +37 -0
- package/dist/vue/components/KmFormControl.vue.d.ts.map +1 -0
- package/dist/vue/components/KmHeading.vue.d.ts +34 -0
- package/dist/vue/components/KmHeading.vue.d.ts.map +1 -0
- package/dist/vue/components/KmHtml.vue.d.ts +32 -0
- package/dist/vue/components/KmHtml.vue.d.ts.map +1 -0
- package/dist/vue/components/KmInput.vue.d.ts +2 -0
- package/dist/vue/components/KmInput.vue.d.ts.map +1 -1
- package/dist/vue/components/KmPagination/KmPagination.vue.d.ts +53 -0
- package/dist/vue/components/KmPagination/KmPagination.vue.d.ts.map +1 -0
- package/dist/vue/components/KmPagination/index.d.ts +3 -0
- package/dist/vue/components/KmPagination/index.d.ts.map +1 -0
- package/dist/vue/components/KmPopover.vue.d.ts +141 -0
- package/dist/vue/components/KmPopover.vue.d.ts.map +1 -0
- package/dist/vue/components/KmRadio.vue.d.ts +47 -0
- package/dist/vue/components/KmRadio.vue.d.ts.map +1 -0
- package/dist/vue/components/KmRadioGroup.vue.d.ts +42 -0
- package/dist/vue/components/KmRadioGroup.vue.d.ts.map +1 -0
- package/dist/vue/components/KmScrollArea.vue.d.ts +60 -0
- package/dist/vue/components/KmScrollArea.vue.d.ts.map +1 -0
- package/dist/vue/components/KmSelect.vue.d.ts +66 -17
- package/dist/vue/components/KmSelect.vue.d.ts.map +1 -1
- package/dist/vue/components/KmSkeleton.vue.d.ts +38 -0
- package/dist/vue/components/KmSkeleton.vue.d.ts.map +1 -0
- package/dist/vue/components/KmStepper.vue.d.ts +8 -2
- package/dist/vue/components/KmStepper.vue.d.ts.map +1 -1
- package/dist/vue/components/KmTable/KmTable.vue.d.ts +39 -0
- package/dist/vue/components/KmTable/KmTable.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTable/KmTableBody.vue.d.ts +21 -0
- package/dist/vue/components/KmTable/KmTableBody.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTable/KmTableCaption.vue.d.ts +21 -0
- package/dist/vue/components/KmTable/KmTableCaption.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTable/KmTableCell.vue.d.ts +25 -0
- package/dist/vue/components/KmTable/KmTableCell.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTable/KmTableFooter.vue.d.ts +21 -0
- package/dist/vue/components/KmTable/KmTableFooter.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTable/KmTableHead.vue.d.ts +24 -0
- package/dist/vue/components/KmTable/KmTableHead.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTable/KmTableHeader.vue.d.ts +21 -0
- package/dist/vue/components/KmTable/KmTableHeader.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTable/KmTableRow.vue.d.ts +24 -0
- package/dist/vue/components/KmTable/KmTableRow.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTable/index.d.ts +17 -0
- package/dist/vue/components/KmTable/index.d.ts.map +1 -0
- package/dist/vue/components/KmTabs/KmTabs.vue.d.ts +45 -0
- package/dist/vue/components/KmTabs/KmTabs.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTabs/KmTabsContent.vue.d.ts +24 -0
- package/dist/vue/components/KmTabs/KmTabsContent.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTabs/KmTabsList.vue.d.ts +22 -0
- package/dist/vue/components/KmTabs/KmTabsList.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTabs/KmTabsTrigger.vue.d.ts +26 -0
- package/dist/vue/components/KmTabs/KmTabsTrigger.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTabs/index.d.ts +9 -0
- package/dist/vue/components/KmTabs/index.d.ts.map +1 -0
- package/dist/vue/components/KmText.vue.d.ts +43 -0
- package/dist/vue/components/KmText.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTextarea.vue.d.ts +2 -0
- package/dist/vue/components/KmTextarea.vue.d.ts.map +1 -1
- package/dist/vue/components/KmTreeview/KmTreeNode.vue.d.ts +37 -0
- package/dist/vue/components/KmTreeview/KmTreeNode.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTreeview/KmTreeview.vue.d.ts +48 -0
- package/dist/vue/components/KmTreeview/KmTreeview.vue.d.ts.map +1 -0
- package/dist/vue/components/KmTreeview/index.d.ts +5 -0
- package/dist/vue/components/KmTreeview/index.d.ts.map +1 -0
- package/dist/vue/components/KmTreeview/types.d.ts +11 -0
- package/dist/vue/components/KmTreeview/types.d.ts.map +1 -0
- package/dist/vue/components/index.d.ts +19 -0
- package/dist/vue/components/index.d.ts.map +1 -1
- package/dist/vue/plugin.d.ts.map +1 -1
- package/dist/vue.js +40 -15
- package/package.json +1 -1
- package/dist/carousel-D_f-K2v2.js +0 -83
- package/dist/plugin-DfFKi2ZR.js +0 -941
- package/dist/toggleSwitch-CpBXc_jq.js +0 -369
package/dist/plugin-DfFKi2ZR.js
DELETED
|
@@ -1,941 +0,0 @@
|
|
|
1
|
-
import { defineComponent as $, openBlock as s, createElementBlock as l, normalizeClass as a, unref as n, renderSlot as V, createTextVNode as H, toDisplayString as m, createCommentVNode as g, createElementVNode as r, computed as p, createBlock as I, resolveDynamicComponent as P, withCtx as B, ref as K, watch as Z, nextTick as W, onMounted as O, onBeforeUnmount as q, withDirectives as E, vShow as N, createVNode as L, withModifiers as U, mergeProps as F, Fragment as M, renderList as j, onUnmounted as G, normalizeStyle as J, withKeys as Q } from "vue";
|
|
2
|
-
import { a as X, c as Y, s as _ } from "./carousel-D_f-K2v2.js";
|
|
3
|
-
import { DialogRoot as ee, DialogPortal as te, DialogOverlay as se, DialogContent as ae, DialogTitle as le } from "reka-ui";
|
|
4
|
-
import { a as oe, b as ne, c as re, d as ie, f as R, i as de, s as ue, e as ce, t as me, g as b, h as fe } from "./toggleSwitch-CpBXc_jq.js";
|
|
5
|
-
const ve = /* @__PURE__ */ $({
|
|
6
|
-
__name: "KmAlert",
|
|
7
|
-
props: {
|
|
8
|
-
tone: { default: "neutral" },
|
|
9
|
-
title: {}
|
|
10
|
-
},
|
|
11
|
-
setup(e) {
|
|
12
|
-
const o = oe({ tone: e.tone });
|
|
13
|
-
return (u, c) => (s(), l("div", {
|
|
14
|
-
class: a(n(o).root()),
|
|
15
|
-
role: "status"
|
|
16
|
-
}, [
|
|
17
|
-
e.title || u.$slots.title ? (s(), l("div", {
|
|
18
|
-
key: 0,
|
|
19
|
-
class: a(n(o).title())
|
|
20
|
-
}, [
|
|
21
|
-
V(u.$slots, "title", {}, () => [
|
|
22
|
-
H(m(e.title), 1)
|
|
23
|
-
])
|
|
24
|
-
], 2)) : g("", !0),
|
|
25
|
-
r("div", {
|
|
26
|
-
class: a(n(o).description())
|
|
27
|
-
}, [
|
|
28
|
-
V(u.$slots, "default")
|
|
29
|
-
], 2)
|
|
30
|
-
], 2));
|
|
31
|
-
}
|
|
32
|
-
}), he = ["aria-label"], pe = ["src", "alt"], be = { key: 1 }, ge = /* @__PURE__ */ $({
|
|
33
|
-
__name: "KmAvatar",
|
|
34
|
-
props: {
|
|
35
|
-
displayName: {},
|
|
36
|
-
src: {},
|
|
37
|
-
size: { default: "sm" },
|
|
38
|
-
initials: {}
|
|
39
|
-
},
|
|
40
|
-
setup(e) {
|
|
41
|
-
const t = e, o = p(() => t.initials ? t.initials : t.displayName ? t.displayName.trim().split(/\s+/).filter((u, c) => c < 2).map((u) => u[0]).join("").toUpperCase() : "");
|
|
42
|
-
return (u, c) => (s(), l("div", {
|
|
43
|
-
class: a(n(X)({ size: e.size, hasImage: !!e.src })),
|
|
44
|
-
role: "img",
|
|
45
|
-
"aria-label": e.displayName
|
|
46
|
-
}, [
|
|
47
|
-
e.src ? (s(), l("img", {
|
|
48
|
-
key: 0,
|
|
49
|
-
src: e.src,
|
|
50
|
-
alt: e.displayName,
|
|
51
|
-
class: "h-full w-full object-cover"
|
|
52
|
-
}, null, 8, pe)) : (s(), l("span", be, m(o.value), 1))
|
|
53
|
-
], 10, he));
|
|
54
|
-
}
|
|
55
|
-
}), ke = /* @__PURE__ */ $({
|
|
56
|
-
__name: "KmBadge",
|
|
57
|
-
props: {
|
|
58
|
-
tone: { default: "neutral" }
|
|
59
|
-
},
|
|
60
|
-
setup(e) {
|
|
61
|
-
return (t, o) => (s(), l("span", {
|
|
62
|
-
class: a(n(ne)({ tone: e.tone }))
|
|
63
|
-
}, [
|
|
64
|
-
V(t.$slots, "default")
|
|
65
|
-
], 2));
|
|
66
|
-
}
|
|
67
|
-
}), ye = /* @__PURE__ */ $({
|
|
68
|
-
__name: "KmButton",
|
|
69
|
-
props: {
|
|
70
|
-
as: { default: "button" },
|
|
71
|
-
variant: { default: "solid" },
|
|
72
|
-
size: { default: "md" },
|
|
73
|
-
disabled: { type: Boolean, default: !1 },
|
|
74
|
-
loading: { type: Boolean, default: !1 },
|
|
75
|
-
href: {},
|
|
76
|
-
type: { default: "button" }
|
|
77
|
-
},
|
|
78
|
-
setup(e) {
|
|
79
|
-
const t = e, o = p(() => t.as), u = p(
|
|
80
|
-
() => re({
|
|
81
|
-
variant: t.variant,
|
|
82
|
-
size: t.size,
|
|
83
|
-
loading: t.loading
|
|
84
|
-
})
|
|
85
|
-
), c = p(() => ({
|
|
86
|
-
"animate-spin": t.loading,
|
|
87
|
-
"h-4 w-4": t.size === "sm" || t.size === "xs",
|
|
88
|
-
"h-5 w-5": t.size === "md" || t.size === "lg"
|
|
89
|
-
}));
|
|
90
|
-
return (i, d) => (s(), I(P(o.value), {
|
|
91
|
-
class: a(u.value),
|
|
92
|
-
href: e.as === "a" ? e.href : void 0,
|
|
93
|
-
type: e.as === "button" ? e.type : void 0,
|
|
94
|
-
disabled: e.as === "button" ? e.disabled || e.loading : void 0,
|
|
95
|
-
"aria-disabled": e.as === "a" && (e.disabled || e.loading) ? "true" : void 0,
|
|
96
|
-
"aria-busy": e.loading ? "true" : void 0
|
|
97
|
-
}, {
|
|
98
|
-
default: B(() => [
|
|
99
|
-
e.loading ? (s(), l("svg", {
|
|
100
|
-
key: 0,
|
|
101
|
-
class: a(c.value),
|
|
102
|
-
viewBox: "0 0 24 24",
|
|
103
|
-
fill: "none",
|
|
104
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
105
|
-
}, [...d[0] || (d[0] = [
|
|
106
|
-
r("circle", {
|
|
107
|
-
class: "opacity-25",
|
|
108
|
-
cx: "12",
|
|
109
|
-
cy: "12",
|
|
110
|
-
r: "10",
|
|
111
|
-
stroke: "currentColor",
|
|
112
|
-
"stroke-width": "4"
|
|
113
|
-
}, null, -1),
|
|
114
|
-
r("path", {
|
|
115
|
-
class: "opacity-75",
|
|
116
|
-
fill: "currentColor",
|
|
117
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
118
|
-
}, null, -1)
|
|
119
|
-
])], 2)) : g("", !0),
|
|
120
|
-
V(i.$slots, "default")
|
|
121
|
-
]),
|
|
122
|
-
_: 3
|
|
123
|
-
}, 8, ["class", "href", "type", "disabled", "aria-disabled", "aria-busy"]));
|
|
124
|
-
}
|
|
125
|
-
}), we = /* @__PURE__ */ $({
|
|
126
|
-
__name: "KmCard",
|
|
127
|
-
setup(e) {
|
|
128
|
-
const t = ie();
|
|
129
|
-
return (o, u) => (s(), l("section", {
|
|
130
|
-
class: a(n(t).root())
|
|
131
|
-
}, [
|
|
132
|
-
o.$slots.header ? (s(), l("header", {
|
|
133
|
-
key: 0,
|
|
134
|
-
class: a(n(t).header())
|
|
135
|
-
}, [
|
|
136
|
-
V(o.$slots, "header")
|
|
137
|
-
], 2)) : g("", !0),
|
|
138
|
-
r("div", {
|
|
139
|
-
class: a(n(t).body())
|
|
140
|
-
}, [
|
|
141
|
-
V(o.$slots, "default")
|
|
142
|
-
], 2),
|
|
143
|
-
o.$slots.footer ? (s(), l("footer", {
|
|
144
|
-
key: 1,
|
|
145
|
-
class: a(n(t).footer())
|
|
146
|
-
}, [
|
|
147
|
-
V(o.$slots, "footer")
|
|
148
|
-
], 2)) : g("", !0)
|
|
149
|
-
], 2));
|
|
150
|
-
}
|
|
151
|
-
}), $e = /* @__PURE__ */ $({
|
|
152
|
-
__name: "KmCarousel",
|
|
153
|
-
props: {
|
|
154
|
-
watchItems: { default: () => [] }
|
|
155
|
-
},
|
|
156
|
-
setup(e, { expose: t }) {
|
|
157
|
-
const o = e, u = Y(), c = p(() => u.root()), i = p(() => u.button()), d = p(() => u.wrapper()), v = K(null), C = K(!1), z = K(!1), k = () => {
|
|
158
|
-
if (!v.value) return;
|
|
159
|
-
const { scrollLeft: y, scrollWidth: f, clientWidth: w } = v.value;
|
|
160
|
-
C.value = y > 10, z.value = y + w < f - 10;
|
|
161
|
-
}, x = (y) => {
|
|
162
|
-
if (!v.value) return;
|
|
163
|
-
const f = v.value.clientWidth;
|
|
164
|
-
v.value.scrollBy({
|
|
165
|
-
left: y === "left" ? -f : f,
|
|
166
|
-
behavior: "smooth"
|
|
167
|
-
});
|
|
168
|
-
};
|
|
169
|
-
Z(
|
|
170
|
-
() => o.watchItems,
|
|
171
|
-
() => {
|
|
172
|
-
W(() => {
|
|
173
|
-
k();
|
|
174
|
-
});
|
|
175
|
-
},
|
|
176
|
-
{ deep: !0 }
|
|
177
|
-
);
|
|
178
|
-
let h = null;
|
|
179
|
-
return O(() => {
|
|
180
|
-
k(), window.addEventListener("resize", k), v.value && typeof ResizeObserver < "u" && (h = new ResizeObserver(() => {
|
|
181
|
-
k();
|
|
182
|
-
}), h.observe(v.value));
|
|
183
|
-
}), q(() => {
|
|
184
|
-
window.removeEventListener("resize", k), h && v.value && h.unobserve(v.value);
|
|
185
|
-
}), t({
|
|
186
|
-
recheck: k
|
|
187
|
-
}), (y, f) => (s(), l("div", {
|
|
188
|
-
class: a(c.value)
|
|
189
|
-
}, [
|
|
190
|
-
E(r("button", {
|
|
191
|
-
onClick: f[0] || (f[0] = (w) => x("left")),
|
|
192
|
-
class: a([i.value, "carousel-btn-left"]),
|
|
193
|
-
"aria-label": "Deslizar a la izquierda"
|
|
194
|
-
}, [...f[2] || (f[2] = [
|
|
195
|
-
r("svg", {
|
|
196
|
-
class: "w-5 h-5",
|
|
197
|
-
fill: "none",
|
|
198
|
-
viewBox: "0 0 24 24",
|
|
199
|
-
stroke: "currentColor",
|
|
200
|
-
"stroke-width": "2.5"
|
|
201
|
-
}, [
|
|
202
|
-
r("path", {
|
|
203
|
-
"stroke-linecap": "round",
|
|
204
|
-
"stroke-linejoin": "round",
|
|
205
|
-
d: "M15 19l-7-7 7-7"
|
|
206
|
-
})
|
|
207
|
-
], -1)
|
|
208
|
-
])], 2), [
|
|
209
|
-
[N, C.value]
|
|
210
|
-
]),
|
|
211
|
-
E(r("button", {
|
|
212
|
-
onClick: f[1] || (f[1] = (w) => x("right")),
|
|
213
|
-
class: a([i.value, "carousel-btn-right"]),
|
|
214
|
-
"aria-label": "Deslizar a la derecha"
|
|
215
|
-
}, [...f[3] || (f[3] = [
|
|
216
|
-
r("svg", {
|
|
217
|
-
class: "w-5 h-5",
|
|
218
|
-
fill: "none",
|
|
219
|
-
viewBox: "0 0 24 24",
|
|
220
|
-
stroke: "currentColor",
|
|
221
|
-
"stroke-width": "2.5"
|
|
222
|
-
}, [
|
|
223
|
-
r("path", {
|
|
224
|
-
"stroke-linecap": "round",
|
|
225
|
-
"stroke-linejoin": "round",
|
|
226
|
-
d: "M9 5l7 7-7 7"
|
|
227
|
-
})
|
|
228
|
-
], -1)
|
|
229
|
-
])], 2), [
|
|
230
|
-
[N, z.value]
|
|
231
|
-
]),
|
|
232
|
-
r("div", {
|
|
233
|
-
ref_key: "sliderRef",
|
|
234
|
-
ref: v,
|
|
235
|
-
onScroll: k,
|
|
236
|
-
class: a(d.value)
|
|
237
|
-
}, [
|
|
238
|
-
V(y.$slots, "default", {}, void 0, !0)
|
|
239
|
-
], 34)
|
|
240
|
-
], 2));
|
|
241
|
-
}
|
|
242
|
-
}), xe = (e, t) => {
|
|
243
|
-
const o = e.__vccOpts || e;
|
|
244
|
-
for (const [u, c] of t)
|
|
245
|
-
o[u] = c;
|
|
246
|
-
return o;
|
|
247
|
-
}, vt = /* @__PURE__ */ xe($e, [["__scopeId", "data-v-9659c808"]]), ht = /* @__PURE__ */ $({
|
|
248
|
-
__name: "KmDialog",
|
|
249
|
-
props: {
|
|
250
|
-
open: { type: Boolean },
|
|
251
|
-
defaultOpen: { type: Boolean },
|
|
252
|
-
modal: { type: Boolean },
|
|
253
|
-
size: { default: "md" },
|
|
254
|
-
preventScroll: { type: Boolean, default: !0 }
|
|
255
|
-
},
|
|
256
|
-
emits: ["update:open"],
|
|
257
|
-
setup(e, { emit: t }) {
|
|
258
|
-
const o = e, u = t, c = p(() => {
|
|
259
|
-
const i = "w-full max-w-full rounded-km-lg bg-km-surface p-6 shadow-km-xl";
|
|
260
|
-
switch (o.size) {
|
|
261
|
-
case "sm":
|
|
262
|
-
return `${i} max-w-sm`;
|
|
263
|
-
case "md":
|
|
264
|
-
return `${i} max-w-md`;
|
|
265
|
-
case "lg":
|
|
266
|
-
return `${i} max-w-lg`;
|
|
267
|
-
case "xl":
|
|
268
|
-
return `${i} max-w-xl`;
|
|
269
|
-
case "full":
|
|
270
|
-
return `${i} max-w-full m-4`;
|
|
271
|
-
default:
|
|
272
|
-
return i;
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
return (i, d) => (s(), I(n(ee), {
|
|
276
|
-
open: e.open,
|
|
277
|
-
modal: !0,
|
|
278
|
-
"onUpdate:open": d[0] || (d[0] = (v) => u("update:open", v))
|
|
279
|
-
}, {
|
|
280
|
-
default: B(() => [
|
|
281
|
-
L(n(te), null, {
|
|
282
|
-
default: B(() => [
|
|
283
|
-
L(n(se), { class: "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm km-dialog-overlay" }),
|
|
284
|
-
L(n(ae), {
|
|
285
|
-
class: a([c.value, "fixed left-1/2 top-1/2 z-[60] km-dialog-content"])
|
|
286
|
-
}, {
|
|
287
|
-
default: B(() => [
|
|
288
|
-
V(i.$slots, "default")
|
|
289
|
-
]),
|
|
290
|
-
_: 3
|
|
291
|
-
}, 8, ["class"])
|
|
292
|
-
]),
|
|
293
|
-
_: 3
|
|
294
|
-
})
|
|
295
|
-
]),
|
|
296
|
-
_: 3
|
|
297
|
-
}, 8, ["open"]));
|
|
298
|
-
}
|
|
299
|
-
}), Ce = { class: "flex items-start justify-between gap-4" }, ze = { class: "space-y-1.5" }, Ve = {
|
|
300
|
-
key: 1,
|
|
301
|
-
class: "text-sm text-km-muted-foreground"
|
|
302
|
-
}, pt = /* @__PURE__ */ $({
|
|
303
|
-
__name: "KmDialogHeader",
|
|
304
|
-
props: {
|
|
305
|
-
title: {},
|
|
306
|
-
description: {},
|
|
307
|
-
showClose: { type: Boolean }
|
|
308
|
-
},
|
|
309
|
-
emits: ["close"],
|
|
310
|
-
setup(e, { emit: t }) {
|
|
311
|
-
const o = t;
|
|
312
|
-
return (u, c) => (s(), l("div", Ce, [
|
|
313
|
-
r("div", ze, [
|
|
314
|
-
e.title ? (s(), I(n(le), {
|
|
315
|
-
key: 0,
|
|
316
|
-
class: "text-lg font-semibold text-km-foreground"
|
|
317
|
-
}, {
|
|
318
|
-
default: B(() => [
|
|
319
|
-
H(m(e.title), 1)
|
|
320
|
-
]),
|
|
321
|
-
_: 1
|
|
322
|
-
})) : g("", !0),
|
|
323
|
-
e.description ? (s(), l("p", Ve, m(e.description), 1)) : g("", !0)
|
|
324
|
-
]),
|
|
325
|
-
e.showClose ? (s(), l("button", {
|
|
326
|
-
key: 0,
|
|
327
|
-
type: "button",
|
|
328
|
-
class: "rounded-km-sm p-1 text-km-muted-foreground hover:text-km-foreground focus:outline-none focus:ring-2 focus:ring-km-primary",
|
|
329
|
-
onClick: c[0] || (c[0] = (i) => o("close"))
|
|
330
|
-
}, [...c[1] || (c[1] = [
|
|
331
|
-
r("svg", {
|
|
332
|
-
class: "h-4 w-4",
|
|
333
|
-
viewBox: "0 0 24 24",
|
|
334
|
-
fill: "none",
|
|
335
|
-
stroke: "currentColor",
|
|
336
|
-
"stroke-width": "2"
|
|
337
|
-
}, [
|
|
338
|
-
r("path", {
|
|
339
|
-
d: "M18 6L6 18M6 6l12 12",
|
|
340
|
-
"stroke-linecap": "round",
|
|
341
|
-
"stroke-linejoin": "round"
|
|
342
|
-
})
|
|
343
|
-
], -1)
|
|
344
|
-
])])) : g("", !0)
|
|
345
|
-
]));
|
|
346
|
-
}
|
|
347
|
-
}), Be = { class: "mt-4" }, bt = /* @__PURE__ */ $({
|
|
348
|
-
__name: "KmDialogBody",
|
|
349
|
-
setup(e) {
|
|
350
|
-
return (t, o) => (s(), l("div", Be, [
|
|
351
|
-
V(t.$slots, "default")
|
|
352
|
-
]));
|
|
353
|
-
}
|
|
354
|
-
}), gt = /* @__PURE__ */ $({
|
|
355
|
-
__name: "KmDialogFooter",
|
|
356
|
-
props: {
|
|
357
|
-
align: {},
|
|
358
|
-
gap: {}
|
|
359
|
-
},
|
|
360
|
-
setup(e) {
|
|
361
|
-
return (t, o) => (s(), l("div", {
|
|
362
|
-
class: a(["mt-6 flex", [
|
|
363
|
-
e.align === "start" && "justify-start",
|
|
364
|
-
e.align === "center" && "justify-center",
|
|
365
|
-
e.align === "end" && "justify-end",
|
|
366
|
-
e.gap === "sm" && "gap-2",
|
|
367
|
-
e.gap === "md" && "gap-3",
|
|
368
|
-
e.gap === "lg" && "gap-4"
|
|
369
|
-
]])
|
|
370
|
-
}, [
|
|
371
|
-
V(t.$slots, "default")
|
|
372
|
-
], 2));
|
|
373
|
-
}
|
|
374
|
-
});
|
|
375
|
-
let Ke = 0;
|
|
376
|
-
function T(e = "km") {
|
|
377
|
-
const t = Ke++;
|
|
378
|
-
return `${e}-${t}`;
|
|
379
|
-
}
|
|
380
|
-
const Se = ["for"], Me = { class: "relative flex items-center" }, je = ["id", "value", "type", "placeholder", "disabled", "aria-invalid", "aria-describedby"], Ie = {
|
|
381
|
-
key: 0,
|
|
382
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
383
|
-
fill: "none",
|
|
384
|
-
viewBox: "0 0 24 24",
|
|
385
|
-
"stroke-width": "1.5",
|
|
386
|
-
stroke: "currentColor",
|
|
387
|
-
class: "size-5"
|
|
388
|
-
}, Le = {
|
|
389
|
-
key: 1,
|
|
390
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
391
|
-
fill: "none",
|
|
392
|
-
viewBox: "0 0 24 24",
|
|
393
|
-
"stroke-width": "1.5",
|
|
394
|
-
stroke: "currentColor",
|
|
395
|
-
class: "size-5"
|
|
396
|
-
}, De = ["id"], Ae = ["id"], Re = /* @__PURE__ */ $({
|
|
397
|
-
__name: "KmInput",
|
|
398
|
-
props: {
|
|
399
|
-
id: {},
|
|
400
|
-
modelValue: {},
|
|
401
|
-
label: {},
|
|
402
|
-
hint: {},
|
|
403
|
-
error: {},
|
|
404
|
-
placeholder: {},
|
|
405
|
-
type: { default: "text" },
|
|
406
|
-
disabled: { type: Boolean, default: !1 }
|
|
407
|
-
},
|
|
408
|
-
emits: ["update:modelValue"],
|
|
409
|
-
setup(e, { emit: t }) {
|
|
410
|
-
const o = e, u = t, c = T("km-input"), i = p(() => o.id || c), d = R(), v = p(() => {
|
|
411
|
-
if (o.error) return `${i.value}-error`;
|
|
412
|
-
if (o.hint) return `${i.value}-hint`;
|
|
413
|
-
}), C = K(!1), z = p(() => o.type === "password" ? C.value ? "text" : "password" : o.type), k = () => {
|
|
414
|
-
C.value = !C.value;
|
|
415
|
-
};
|
|
416
|
-
return (x, h) => (s(), l("label", {
|
|
417
|
-
class: a(n(d).root()),
|
|
418
|
-
for: i.value
|
|
419
|
-
}, [
|
|
420
|
-
e.label ? (s(), l("span", {
|
|
421
|
-
key: 0,
|
|
422
|
-
class: a(n(d).label())
|
|
423
|
-
}, m(e.label), 3)) : g("", !0),
|
|
424
|
-
r("div", Me, [
|
|
425
|
-
r("input", {
|
|
426
|
-
id: i.value,
|
|
427
|
-
class: a([n(de)(), o.type === "password" ? "pr-10" : ""]),
|
|
428
|
-
value: e.modelValue,
|
|
429
|
-
type: z.value,
|
|
430
|
-
placeholder: e.placeholder,
|
|
431
|
-
disabled: e.disabled,
|
|
432
|
-
"aria-invalid": e.error ? "true" : void 0,
|
|
433
|
-
"aria-describedby": v.value,
|
|
434
|
-
onInput: h[0] || (h[0] = (y) => u("update:modelValue", y.target.value))
|
|
435
|
-
}, null, 42, je),
|
|
436
|
-
e.type === "password" ? (s(), l("button", {
|
|
437
|
-
key: 0,
|
|
438
|
-
type: "button",
|
|
439
|
-
class: "absolute right-3 text-km-muted-foreground hover:text-km-foreground focus:outline-none",
|
|
440
|
-
onClick: U(k, ["prevent"])
|
|
441
|
-
}, [
|
|
442
|
-
C.value ? (s(), l("svg", Le, [...h[2] || (h[2] = [
|
|
443
|
-
r("path", {
|
|
444
|
-
"stroke-linecap": "round",
|
|
445
|
-
"stroke-linejoin": "round",
|
|
446
|
-
d: "M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"
|
|
447
|
-
}, null, -1)
|
|
448
|
-
])])) : (s(), l("svg", Ie, [...h[1] || (h[1] = [
|
|
449
|
-
r("path", {
|
|
450
|
-
"stroke-linecap": "round",
|
|
451
|
-
"stroke-linejoin": "round",
|
|
452
|
-
d: "M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
|
|
453
|
-
}, null, -1),
|
|
454
|
-
r("path", {
|
|
455
|
-
"stroke-linecap": "round",
|
|
456
|
-
"stroke-linejoin": "round",
|
|
457
|
-
d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
|
|
458
|
-
}, null, -1)
|
|
459
|
-
])]))
|
|
460
|
-
])) : g("", !0)
|
|
461
|
-
]),
|
|
462
|
-
e.error ? (s(), l("span", {
|
|
463
|
-
key: 1,
|
|
464
|
-
id: `${i.value}-error`,
|
|
465
|
-
class: a(n(d).error())
|
|
466
|
-
}, m(e.error), 11, De)) : e.hint ? (s(), l("span", {
|
|
467
|
-
key: 2,
|
|
468
|
-
id: `${i.value}-hint`,
|
|
469
|
-
class: a(n(d).hint())
|
|
470
|
-
}, m(e.hint), 11, Ae)) : g("", !0)
|
|
471
|
-
], 10, Se));
|
|
472
|
-
}
|
|
473
|
-
}), Te = ["for"], Ee = ["id", "value", "disabled", "aria-invalid", "aria-describedby"], Ne = {
|
|
474
|
-
key: 0,
|
|
475
|
-
value: "",
|
|
476
|
-
disabled: ""
|
|
477
|
-
}, He = ["value", "disabled"], Pe = ["id"], Oe = ["id"], Ue = /* @__PURE__ */ $({
|
|
478
|
-
inheritAttrs: !1,
|
|
479
|
-
__name: "KmSelect",
|
|
480
|
-
props: {
|
|
481
|
-
id: {},
|
|
482
|
-
modelValue: {},
|
|
483
|
-
options: {},
|
|
484
|
-
label: {},
|
|
485
|
-
hint: {},
|
|
486
|
-
error: {},
|
|
487
|
-
placeholder: {},
|
|
488
|
-
disabled: { type: Boolean, default: !1 }
|
|
489
|
-
},
|
|
490
|
-
emits: ["update:modelValue"],
|
|
491
|
-
setup(e, { emit: t }) {
|
|
492
|
-
const o = e, u = t, c = T("km-select"), i = p(() => o.id || c), d = R(), v = p(() => {
|
|
493
|
-
if (o.error) return `${i.value}-error`;
|
|
494
|
-
if (o.hint) return `${i.value}-hint`;
|
|
495
|
-
});
|
|
496
|
-
return (C, z) => (s(), l("label", {
|
|
497
|
-
class: a(n(d).root()),
|
|
498
|
-
for: i.value
|
|
499
|
-
}, [
|
|
500
|
-
e.label ? (s(), l("span", {
|
|
501
|
-
key: 0,
|
|
502
|
-
class: a(n(d).label())
|
|
503
|
-
}, m(e.label), 3)) : g("", !0),
|
|
504
|
-
r("select", F(C.$attrs, {
|
|
505
|
-
id: i.value,
|
|
506
|
-
class: n(ue)(),
|
|
507
|
-
value: e.modelValue,
|
|
508
|
-
disabled: e.disabled,
|
|
509
|
-
"aria-invalid": e.error ? "true" : void 0,
|
|
510
|
-
"aria-describedby": v.value,
|
|
511
|
-
onChange: z[0] || (z[0] = (k) => u("update:modelValue", k.target.value))
|
|
512
|
-
}), [
|
|
513
|
-
e.placeholder ? (s(), l("option", Ne, m(e.placeholder), 1)) : g("", !0),
|
|
514
|
-
(s(!0), l(M, null, j(e.options, (k) => (s(), l("option", {
|
|
515
|
-
key: String(k.value),
|
|
516
|
-
value: k.value,
|
|
517
|
-
disabled: k.disabled
|
|
518
|
-
}, m(k.label), 9, He))), 128))
|
|
519
|
-
], 16, Ee),
|
|
520
|
-
e.error ? (s(), l("span", {
|
|
521
|
-
key: 1,
|
|
522
|
-
id: `${i.value}-error`,
|
|
523
|
-
class: a(n(d).error())
|
|
524
|
-
}, m(e.error), 11, Pe)) : e.hint ? (s(), l("span", {
|
|
525
|
-
key: 2,
|
|
526
|
-
id: `${i.value}-hint`,
|
|
527
|
-
class: a(n(d).hint())
|
|
528
|
-
}, m(e.hint), 11, Oe)) : g("", !0)
|
|
529
|
-
], 10, Te));
|
|
530
|
-
}
|
|
531
|
-
}), Ze = /* @__PURE__ */ $({
|
|
532
|
-
__name: "KmSpinner",
|
|
533
|
-
props: {
|
|
534
|
-
size: { default: "sm" },
|
|
535
|
-
color: { default: "current" }
|
|
536
|
-
},
|
|
537
|
-
setup(e) {
|
|
538
|
-
return (t, o) => (s(), l("svg", {
|
|
539
|
-
"aria-hidden": "true",
|
|
540
|
-
class: a(n(_)({ size: e.size, color: e.color })),
|
|
541
|
-
viewBox: "0 0 100 101",
|
|
542
|
-
fill: "none",
|
|
543
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
544
|
-
}, [...o[0] || (o[0] = [
|
|
545
|
-
r("path", {
|
|
546
|
-
d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
|
|
547
|
-
fill: "rgba(229, 231, 235, 0.3)"
|
|
548
|
-
}, null, -1),
|
|
549
|
-
r("path", {
|
|
550
|
-
d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
|
|
551
|
-
fill: "currentColor"
|
|
552
|
-
}, null, -1)
|
|
553
|
-
])], 2));
|
|
554
|
-
}
|
|
555
|
-
}), We = /* @__PURE__ */ $({
|
|
556
|
-
__name: "KmStack",
|
|
557
|
-
props: {
|
|
558
|
-
as: { default: "div" },
|
|
559
|
-
direction: { default: "column" },
|
|
560
|
-
gap: { default: "md" },
|
|
561
|
-
align: { default: "stretch" },
|
|
562
|
-
justify: { default: "start" },
|
|
563
|
-
wrap: { default: !1 }
|
|
564
|
-
},
|
|
565
|
-
setup(e) {
|
|
566
|
-
const t = e, o = p(
|
|
567
|
-
() => ce({
|
|
568
|
-
direction: t.direction,
|
|
569
|
-
gap: t.gap,
|
|
570
|
-
align: t.align,
|
|
571
|
-
justify: t.justify,
|
|
572
|
-
wrap: t.wrap
|
|
573
|
-
})
|
|
574
|
-
);
|
|
575
|
-
return (u, c) => (s(), I(P(e.as), {
|
|
576
|
-
class: a(o.value)
|
|
577
|
-
}, {
|
|
578
|
-
default: B(() => [
|
|
579
|
-
V(u.$slots, "default")
|
|
580
|
-
]),
|
|
581
|
-
_: 3
|
|
582
|
-
}, 8, ["class"]));
|
|
583
|
-
}
|
|
584
|
-
}), qe = ["for"], Fe = ["id", "value", "placeholder", "disabled", "rows", "aria-invalid", "aria-describedby"], Ge = ["id"], Je = ["id"], Qe = /* @__PURE__ */ $({
|
|
585
|
-
__name: "KmTextarea",
|
|
586
|
-
props: {
|
|
587
|
-
id: {},
|
|
588
|
-
modelValue: {},
|
|
589
|
-
label: {},
|
|
590
|
-
hint: {},
|
|
591
|
-
error: {},
|
|
592
|
-
placeholder: {},
|
|
593
|
-
disabled: { type: Boolean, default: !1 },
|
|
594
|
-
rows: { default: 4 }
|
|
595
|
-
},
|
|
596
|
-
emits: ["update:modelValue"],
|
|
597
|
-
setup(e, { emit: t }) {
|
|
598
|
-
const o = e, u = t, c = T("km-textarea"), i = p(() => o.id || c), d = R(), v = p(() => {
|
|
599
|
-
if (o.error) return `${i.value}-error`;
|
|
600
|
-
if (o.hint) return `${i.value}-hint`;
|
|
601
|
-
});
|
|
602
|
-
return (C, z) => (s(), l("label", {
|
|
603
|
-
class: a(n(d).root()),
|
|
604
|
-
for: i.value
|
|
605
|
-
}, [
|
|
606
|
-
e.label ? (s(), l("span", {
|
|
607
|
-
key: 0,
|
|
608
|
-
class: a(n(d).label())
|
|
609
|
-
}, m(e.label), 3)) : g("", !0),
|
|
610
|
-
r("textarea", {
|
|
611
|
-
id: i.value,
|
|
612
|
-
class: a(n(me)()),
|
|
613
|
-
value: e.modelValue,
|
|
614
|
-
placeholder: e.placeholder,
|
|
615
|
-
disabled: e.disabled,
|
|
616
|
-
rows: e.rows,
|
|
617
|
-
"aria-invalid": e.error ? "true" : void 0,
|
|
618
|
-
"aria-describedby": v.value,
|
|
619
|
-
onInput: z[0] || (z[0] = (k) => u("update:modelValue", k.target.value))
|
|
620
|
-
}, null, 42, Fe),
|
|
621
|
-
e.error ? (s(), l("span", {
|
|
622
|
-
key: 1,
|
|
623
|
-
id: `${i.value}-error`,
|
|
624
|
-
class: a(n(d).error())
|
|
625
|
-
}, m(e.error), 11, Ge)) : e.hint ? (s(), l("span", {
|
|
626
|
-
key: 2,
|
|
627
|
-
id: `${i.value}-hint`,
|
|
628
|
-
class: a(n(d).hint())
|
|
629
|
-
}, m(e.hint), 11, Je)) : g("", !0)
|
|
630
|
-
], 10, qe));
|
|
631
|
-
}
|
|
632
|
-
}), Xe = { key: 0 }, Ye = ["cx", "cy", "stroke-dasharray"], _e = ["cx", "cy", "stroke-dasharray"], et = {
|
|
633
|
-
key: 1,
|
|
634
|
-
class: "flex flex-row items-center justify-between w-full gap-4"
|
|
635
|
-
}, tt = { class: "flex items-center gap-3 shrink-0" }, st = {
|
|
636
|
-
key: 0,
|
|
637
|
-
width: "20",
|
|
638
|
-
height: "20",
|
|
639
|
-
viewBox: "0 0 24 24",
|
|
640
|
-
fill: "none",
|
|
641
|
-
stroke: "currentColor",
|
|
642
|
-
"stroke-width": "3",
|
|
643
|
-
"stroke-linecap": "round",
|
|
644
|
-
"stroke-linejoin": "round",
|
|
645
|
-
class: "w-5 h-5"
|
|
646
|
-
}, at = {
|
|
647
|
-
key: 1,
|
|
648
|
-
class: "text-sm font-bold"
|
|
649
|
-
}, lt = { class: "flex flex-col" }, ot = {
|
|
650
|
-
key: 0,
|
|
651
|
-
class: "text-xs text-km-muted-foreground whitespace-nowrap max-w-[150px] truncate"
|
|
652
|
-
}, nt = {
|
|
653
|
-
key: 0,
|
|
654
|
-
width: "20",
|
|
655
|
-
height: "20",
|
|
656
|
-
viewBox: "0 0 24 24",
|
|
657
|
-
fill: "none",
|
|
658
|
-
stroke: "currentColor",
|
|
659
|
-
"stroke-width": "3",
|
|
660
|
-
"stroke-linecap": "round",
|
|
661
|
-
"stroke-linejoin": "round",
|
|
662
|
-
class: "w-5 h-5"
|
|
663
|
-
}, rt = {
|
|
664
|
-
key: 1,
|
|
665
|
-
class: "text-sm font-bold"
|
|
666
|
-
}, S = 20, D = 5, A = 7, kt = /* @__PURE__ */ $({
|
|
667
|
-
__name: "KmStepper",
|
|
668
|
-
props: {
|
|
669
|
-
steps: {},
|
|
670
|
-
currentStep: {},
|
|
671
|
-
orientation: { default: "vertical" },
|
|
672
|
-
mode: { default: "auto" },
|
|
673
|
-
mobileLayout: { default: "circular" },
|
|
674
|
-
mobileLabel: { default: "" }
|
|
675
|
-
},
|
|
676
|
-
setup(e) {
|
|
677
|
-
const t = e, o = K(!1), u = K(null);
|
|
678
|
-
O(() => {
|
|
679
|
-
if (t.mode === "auto") {
|
|
680
|
-
o.value = window.innerWidth < 640;
|
|
681
|
-
const h = () => {
|
|
682
|
-
o.value = window.innerWidth < 640;
|
|
683
|
-
};
|
|
684
|
-
window.addEventListener("resize", h), G(() => {
|
|
685
|
-
window.removeEventListener("resize", h);
|
|
686
|
-
});
|
|
687
|
-
}
|
|
688
|
-
});
|
|
689
|
-
const c = p(() => t.mode === "mobile" ? !0 : t.mode === "desktop" ? !1 : o.value), i = 2 * Math.PI * S, d = (S + D) * 2, v = p(() => {
|
|
690
|
-
const h = t.steps.length;
|
|
691
|
-
return (i - h * A) / h;
|
|
692
|
-
}), C = p(() => {
|
|
693
|
-
const h = Math.min(Math.max(t.currentStep, 1), t.steps.length);
|
|
694
|
-
return Array.from(
|
|
695
|
-
{ length: h },
|
|
696
|
-
(y, f) => `${v.value} ${f < h - 1 ? A : i}`
|
|
697
|
-
).join(" ");
|
|
698
|
-
}), z = p(() => {
|
|
699
|
-
var y;
|
|
700
|
-
const h = Math.min(Math.max(t.currentStep - 1, 0), t.steps.length - 1);
|
|
701
|
-
return ((y = t.steps[h]) == null ? void 0 : y.title) || "";
|
|
702
|
-
}), k = p(() => t.mobileLabel ? t.mobileLabel : `Paso ${t.currentStep} de ${t.steps.length}`);
|
|
703
|
-
function x(h) {
|
|
704
|
-
const y = h + 1;
|
|
705
|
-
return y < t.currentStep ? "completed" : y === t.currentStep ? "active" : "upcoming";
|
|
706
|
-
}
|
|
707
|
-
return (h, y) => (s(), l("div", {
|
|
708
|
-
ref_key: "containerRef",
|
|
709
|
-
ref: u,
|
|
710
|
-
class: "w-full"
|
|
711
|
-
}, [
|
|
712
|
-
c.value ? (s(), l("div", Xe, [
|
|
713
|
-
e.mobileLayout === "circular" ? (s(), l("div", {
|
|
714
|
-
key: 0,
|
|
715
|
-
class: a(n(b)().mobileRoot())
|
|
716
|
-
}, [
|
|
717
|
-
r("div", {
|
|
718
|
-
class: a(n(b)().mobileInfo())
|
|
719
|
-
}, [
|
|
720
|
-
r("span", {
|
|
721
|
-
class: a(n(b)().mobileTitle())
|
|
722
|
-
}, m(z.value), 3),
|
|
723
|
-
r("span", {
|
|
724
|
-
class: a(n(b)().mobileLabel())
|
|
725
|
-
}, m(k.value), 3)
|
|
726
|
-
], 2),
|
|
727
|
-
r("div", {
|
|
728
|
-
class: a(n(b)().mobileProgress()),
|
|
729
|
-
style: J({ width: `${d}px`, height: `${d}px` })
|
|
730
|
-
}, [
|
|
731
|
-
(s(), l("svg", {
|
|
732
|
-
width: d,
|
|
733
|
-
height: d,
|
|
734
|
-
class: "-rotate-90"
|
|
735
|
-
}, [
|
|
736
|
-
r("circle", {
|
|
737
|
-
cx: d / 2,
|
|
738
|
-
cy: d / 2,
|
|
739
|
-
r: S,
|
|
740
|
-
fill: "none",
|
|
741
|
-
class: "stroke-km-border",
|
|
742
|
-
"stroke-width": D,
|
|
743
|
-
"stroke-dasharray": `${v.value} ${A}`,
|
|
744
|
-
"stroke-linecap": "square"
|
|
745
|
-
}, null, 8, Ye),
|
|
746
|
-
r("circle", {
|
|
747
|
-
cx: d / 2,
|
|
748
|
-
cy: d / 2,
|
|
749
|
-
r: S,
|
|
750
|
-
fill: "none",
|
|
751
|
-
class: "stroke-km-primary",
|
|
752
|
-
"stroke-width": D,
|
|
753
|
-
"stroke-dasharray": C.value,
|
|
754
|
-
"stroke-linecap": "square"
|
|
755
|
-
}, null, 8, _e)
|
|
756
|
-
])),
|
|
757
|
-
r("span", {
|
|
758
|
-
class: a(n(b)().mobilePercentText())
|
|
759
|
-
}, m(e.currentStep) + "/" + m(e.steps.length), 3)
|
|
760
|
-
], 6)
|
|
761
|
-
], 2)) : e.mobileLayout === "horizontal" ? (s(), l("div", {
|
|
762
|
-
key: 1,
|
|
763
|
-
class: a(n(b)().mobileHorizRoot())
|
|
764
|
-
}, [
|
|
765
|
-
r("div", {
|
|
766
|
-
class: a(n(b)().mobileHorizHeader())
|
|
767
|
-
}, [
|
|
768
|
-
r("span", {
|
|
769
|
-
class: a(n(b)().mobileHorizTitle())
|
|
770
|
-
}, m(z.value), 3),
|
|
771
|
-
r("span", {
|
|
772
|
-
class: a(n(b)().mobileHorizSteps())
|
|
773
|
-
}, m(e.currentStep) + "/" + m(e.steps.length), 3)
|
|
774
|
-
], 2),
|
|
775
|
-
r("div", {
|
|
776
|
-
class: a(n(b)().mobileHorizTrack())
|
|
777
|
-
}, [
|
|
778
|
-
(s(!0), l(M, null, j(e.steps.length, (f) => (s(), l("div", {
|
|
779
|
-
key: f,
|
|
780
|
-
class: a([
|
|
781
|
-
n(b)().mobileHorizBar(),
|
|
782
|
-
f <= e.currentStep ? "bg-km-primary" : "bg-km-border"
|
|
783
|
-
])
|
|
784
|
-
}, null, 2))), 128))
|
|
785
|
-
], 2)
|
|
786
|
-
], 2)) : g("", !0)
|
|
787
|
-
])) : e.orientation === "horizontal" ? (s(), l("ol", et, [
|
|
788
|
-
(s(!0), l(M, null, j(e.steps, (f, w) => (s(), l("li", {
|
|
789
|
-
key: f.title,
|
|
790
|
-
class: "flex items-center flex-1 last:flex-none gap-4"
|
|
791
|
-
}, [
|
|
792
|
-
r("div", tt, [
|
|
793
|
-
r("div", {
|
|
794
|
-
class: a(n(b)({ state: x(w) }).stepCircle())
|
|
795
|
-
}, [
|
|
796
|
-
x(w) === "completed" ? (s(), l("svg", st, [...y[0] || (y[0] = [
|
|
797
|
-
r("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
798
|
-
])])) : (s(), l("span", at, m(w + 1), 1))
|
|
799
|
-
], 2),
|
|
800
|
-
r("div", lt, [
|
|
801
|
-
r("span", {
|
|
802
|
-
class: a([n(b)({ state: x(w) }).title(), "text-sm font-bold whitespace-nowrap"])
|
|
803
|
-
}, m(f.title), 3),
|
|
804
|
-
f.description ? (s(), l("span", ot, m(f.description), 1)) : g("", !0)
|
|
805
|
-
])
|
|
806
|
-
]),
|
|
807
|
-
w < e.steps.length - 1 ? (s(), l("div", {
|
|
808
|
-
key: 0,
|
|
809
|
-
class: a(["flex-1 h-[3px] rounded-full transition-all duration-300", [
|
|
810
|
-
x(w) === "completed" ? "bg-km-success" : x(w) === "active" ? "bg-gradient-to-r from-km-primary to-km-border" : "bg-km-border"
|
|
811
|
-
]])
|
|
812
|
-
}, null, 2)) : g("", !0)
|
|
813
|
-
]))), 128))
|
|
814
|
-
])) : (s(), l("ol", {
|
|
815
|
-
key: 2,
|
|
816
|
-
class: a(n(b)({ orientation: "vertical" }).root())
|
|
817
|
-
}, [
|
|
818
|
-
(s(!0), l(M, null, j(e.steps, (f, w) => (s(), l("li", {
|
|
819
|
-
key: f.title,
|
|
820
|
-
class: a(n(b)().step())
|
|
821
|
-
}, [
|
|
822
|
-
r("div", {
|
|
823
|
-
class: a(n(b)().stepContainer())
|
|
824
|
-
}, [
|
|
825
|
-
r("div", {
|
|
826
|
-
class: a(n(b)({ state: x(w) }).stepCircle())
|
|
827
|
-
}, [
|
|
828
|
-
x(w) === "completed" ? (s(), l("svg", nt, [...y[1] || (y[1] = [
|
|
829
|
-
r("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
830
|
-
])])) : (s(), l("span", rt, m(w + 1), 1))
|
|
831
|
-
], 2),
|
|
832
|
-
w < e.steps.length - 1 ? (s(), l("div", {
|
|
833
|
-
key: 0,
|
|
834
|
-
class: a([
|
|
835
|
-
n(b)({ state: x(w), orientation: "vertical" }).connector(),
|
|
836
|
-
x(w) === "active" ? "bg-gradient-to-b from-km-primary to-km-border" : ""
|
|
837
|
-
])
|
|
838
|
-
}, null, 2)) : g("", !0)
|
|
839
|
-
], 2),
|
|
840
|
-
r("div", {
|
|
841
|
-
class: a(n(b)().content())
|
|
842
|
-
}, [
|
|
843
|
-
r("span", {
|
|
844
|
-
class: a(n(b)({ state: x(w) }).title())
|
|
845
|
-
}, m(f.title), 3),
|
|
846
|
-
f.description ? (s(), l("span", {
|
|
847
|
-
key: 0,
|
|
848
|
-
class: a(n(b)().description())
|
|
849
|
-
}, m(f.description), 3)) : g("", !0)
|
|
850
|
-
], 2)
|
|
851
|
-
], 2))), 128))
|
|
852
|
-
], 2))
|
|
853
|
-
], 512));
|
|
854
|
-
}
|
|
855
|
-
}), it = ["aria-checked", "aria-disabled", "onKeydown"], yt = /* @__PURE__ */ $({
|
|
856
|
-
__name: "KmToggleSwitch",
|
|
857
|
-
props: {
|
|
858
|
-
modelValue: { type: Boolean, default: !1 },
|
|
859
|
-
label: { default: "" },
|
|
860
|
-
size: { default: "medium" },
|
|
861
|
-
disabled: { type: Boolean, default: !1 }
|
|
862
|
-
},
|
|
863
|
-
emits: ["update:modelValue", "change"],
|
|
864
|
-
setup(e, { emit: t }) {
|
|
865
|
-
const o = e, u = t, c = p({
|
|
866
|
-
get: () => o.modelValue,
|
|
867
|
-
set: (v) => {
|
|
868
|
-
o.disabled || (u("update:modelValue", v), u("change", v));
|
|
869
|
-
}
|
|
870
|
-
});
|
|
871
|
-
function i() {
|
|
872
|
-
o.disabled || (c.value = !c.value);
|
|
873
|
-
}
|
|
874
|
-
const d = p(
|
|
875
|
-
() => fe({
|
|
876
|
-
size: o.size,
|
|
877
|
-
checked: c.value,
|
|
878
|
-
disabled: o.disabled
|
|
879
|
-
})
|
|
880
|
-
);
|
|
881
|
-
return (v, C) => (s(), l("div", {
|
|
882
|
-
class: a(d.value.root())
|
|
883
|
-
}, [
|
|
884
|
-
e.label ? (s(), l("span", {
|
|
885
|
-
key: 0,
|
|
886
|
-
class: a(d.value.label()),
|
|
887
|
-
onClick: i
|
|
888
|
-
}, m(e.label), 3)) : g("", !0),
|
|
889
|
-
r("div", {
|
|
890
|
-
class: a(d.value.track()),
|
|
891
|
-
onClick: i,
|
|
892
|
-
role: "checkbox",
|
|
893
|
-
"aria-checked": c.value,
|
|
894
|
-
"aria-disabled": e.disabled,
|
|
895
|
-
tabindex: "0",
|
|
896
|
-
onKeydown: Q(U(i, ["prevent"]), ["space"])
|
|
897
|
-
}, [
|
|
898
|
-
r("div", {
|
|
899
|
-
class: a(d.value.thumb())
|
|
900
|
-
}, null, 2)
|
|
901
|
-
], 42, it)
|
|
902
|
-
], 2));
|
|
903
|
-
}
|
|
904
|
-
}), dt = {
|
|
905
|
-
KmAlert: ve,
|
|
906
|
-
KmAvatar: ge,
|
|
907
|
-
KmBadge: ke,
|
|
908
|
-
KmButton: ye,
|
|
909
|
-
KmCard: we,
|
|
910
|
-
KmInput: Re,
|
|
911
|
-
KmSelect: Ue,
|
|
912
|
-
KmSpinner: Ze,
|
|
913
|
-
KmStack: We,
|
|
914
|
-
KmTextarea: Qe
|
|
915
|
-
}, wt = {
|
|
916
|
-
install(e) {
|
|
917
|
-
Object.entries(dt).forEach(([t, o]) => {
|
|
918
|
-
e.component(t, o);
|
|
919
|
-
});
|
|
920
|
-
}
|
|
921
|
-
};
|
|
922
|
-
export {
|
|
923
|
-
vt as K,
|
|
924
|
-
ve as _,
|
|
925
|
-
ge as a,
|
|
926
|
-
ke as b,
|
|
927
|
-
ye as c,
|
|
928
|
-
we as d,
|
|
929
|
-
ht as e,
|
|
930
|
-
bt as f,
|
|
931
|
-
gt as g,
|
|
932
|
-
pt as h,
|
|
933
|
-
Re as i,
|
|
934
|
-
Ue as j,
|
|
935
|
-
Ze as k,
|
|
936
|
-
We as l,
|
|
937
|
-
kt as m,
|
|
938
|
-
Qe as n,
|
|
939
|
-
yt as o,
|
|
940
|
-
wt as p
|
|
941
|
-
};
|