@atelier-ui/vue 0.0.25 → 0.0.27
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/CHANGELOG.md +17 -0
- package/index.css +1 -1
- package/index.mjs +1061 -771
- package/libs/vue/src/index.d.ts +8 -0
- package/libs/vue/src/index.d.ts.map +1 -1
- package/libs/vue/src/lib/button/llm-button.vue.d.ts +2 -2
- package/libs/vue/src/lib/button/llm-button.vue.d.ts.map +1 -1
- package/libs/vue/src/lib/chat/llm-chat-header.vue.d.ts +18 -0
- package/libs/vue/src/lib/chat/llm-chat-header.vue.d.ts.map +1 -0
- package/libs/vue/src/lib/chat/llm-chat-input.vue.d.ts +20 -0
- package/libs/vue/src/lib/chat/llm-chat-input.vue.d.ts.map +1 -0
- package/libs/vue/src/lib/chat/llm-chat-message.vue.d.ts +26 -0
- package/libs/vue/src/lib/chat/llm-chat-message.vue.d.ts.map +1 -0
- package/libs/vue/src/lib/chat/llm-chat-messages.vue.d.ts +18 -0
- package/libs/vue/src/lib/chat/llm-chat-messages.vue.d.ts.map +1 -0
- package/libs/vue/src/lib/chat/llm-chat-suggestion.vue.d.ts +11 -0
- package/libs/vue/src/lib/chat/llm-chat-suggestion.vue.d.ts.map +1 -0
- package/libs/vue/src/lib/chat/llm-chat-typing.vue.d.ts +3 -0
- package/libs/vue/src/lib/chat/llm-chat-typing.vue.d.ts.map +1 -0
- package/libs/vue/src/lib/chat/llm-chat.vue.d.ts +36 -0
- package/libs/vue/src/lib/chat/llm-chat.vue.d.ts.map +1 -0
- package/libs/vue/src/lib/spec.d.ts +20 -1
- package/libs/vue/src/lib/spec.d.ts.map +1 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as v, ref as C, provide as H, computed as p, openBlock as l, createElementBlock as n, normalizeClass as $, renderSlot as b, useId as E, inject as R, onMounted as O, watch as q, onBeforeUnmount as G, createElementVNode as c, toDisplayString as L, createCommentVNode as w, useSlots as re, Fragment as B, renderList as z, createBlock as W, resolveDynamicComponent as de, normalizeStyle as P, unref as M, withModifiers as V, onUnmounted as J, createTextVNode as j, createVNode as ue, nextTick as ce, toRef as me } from "vue";
|
|
2
|
+
const Z = /* @__PURE__ */ Symbol("LlmAccordionGroup"), _t = /* @__PURE__ */ v({
|
|
3
3
|
name: "LlmAccordionGroup",
|
|
4
4
|
__name: "llm-accordion-group",
|
|
5
5
|
props: {
|
|
@@ -7,34 +7,34 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
7
7
|
variant: { default: "default" }
|
|
8
8
|
},
|
|
9
9
|
setup(e) {
|
|
10
|
-
const t = e, a =
|
|
11
|
-
function
|
|
10
|
+
const t = e, a = C(/* @__PURE__ */ new Set()), o = /* @__PURE__ */ new Map();
|
|
11
|
+
function s(i) {
|
|
12
12
|
const m = new Set(a.value);
|
|
13
|
-
m.has(
|
|
13
|
+
m.has(i) ? m.delete(i) : (t.multi || m.clear(), m.add(i)), a.value = m;
|
|
14
14
|
}
|
|
15
|
-
function d(
|
|
16
|
-
|
|
15
|
+
function d(i, m) {
|
|
16
|
+
o.set(i, m);
|
|
17
17
|
}
|
|
18
|
-
function u(
|
|
19
|
-
|
|
18
|
+
function u(i) {
|
|
19
|
+
o.delete(i);
|
|
20
20
|
}
|
|
21
|
-
H(
|
|
21
|
+
H(Z, {
|
|
22
22
|
get multi() {
|
|
23
23
|
return t.multi;
|
|
24
24
|
},
|
|
25
25
|
openItems: a,
|
|
26
|
-
toggleItem:
|
|
26
|
+
toggleItem: s,
|
|
27
27
|
registerItem: d,
|
|
28
28
|
unregisterItem: u
|
|
29
29
|
});
|
|
30
|
-
const r =
|
|
31
|
-
return (
|
|
32
|
-
class:
|
|
30
|
+
const r = p(() => ["llm-accordion-group", `variant-${t.variant}`]);
|
|
31
|
+
return (i, m) => (l(), n("div", {
|
|
32
|
+
class: $(r.value)
|
|
33
33
|
}, [
|
|
34
|
-
|
|
34
|
+
b(i.$slots, "default")
|
|
35
35
|
], 2));
|
|
36
36
|
}
|
|
37
|
-
}),
|
|
37
|
+
}), fe = { class: "accordion-heading" }, pe = ["aria-expanded", "disabled"], wt = /* @__PURE__ */ v({
|
|
38
38
|
name: "LlmAccordionItem",
|
|
39
39
|
__name: "llm-accordion-item",
|
|
40
40
|
props: {
|
|
@@ -43,54 +43,54 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
43
43
|
},
|
|
44
44
|
emits: ["update:expanded"],
|
|
45
45
|
setup(e, { emit: t }) {
|
|
46
|
-
const a = e,
|
|
47
|
-
function
|
|
48
|
-
a.disabled || (r ? r.toggleItem(
|
|
46
|
+
const a = e, o = t, s = E(), d = `llm-accordion-trigger-${s}`, u = `llm-accordion-panel-${s}`, r = R(Z, null), i = C(null), m = p(() => r ? r.openItems.value.has(s) : a.expanded ?? !1);
|
|
47
|
+
function k() {
|
|
48
|
+
a.disabled || (r ? r.toggleItem(s) : o("update:expanded", !m.value));
|
|
49
49
|
}
|
|
50
|
-
function y
|
|
50
|
+
function _(y) {
|
|
51
51
|
if (!r) return;
|
|
52
52
|
const f = Array.from(
|
|
53
53
|
document.querySelectorAll(".llm-accordion-item:not(.is-disabled) .accordion-trigger")
|
|
54
|
-
),
|
|
55
|
-
|
|
54
|
+
), I = f.indexOf(y.currentTarget);
|
|
55
|
+
y.key === "ArrowDown" ? (y.preventDefault(), f[(I + 1) % f.length]?.focus()) : y.key === "ArrowUp" ? (y.preventDefault(), f[(I - 1 + f.length) % f.length]?.focus()) : y.key === "Home" ? (y.preventDefault(), f[0]?.focus()) : y.key === "End" && (y.preventDefault(), f[f.length - 1]?.focus());
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
r &&
|
|
59
|
-
}),
|
|
57
|
+
O(() => {
|
|
58
|
+
r && i.value && r.registerItem(s, i.value), !r && a.expanded;
|
|
59
|
+
}), q(
|
|
60
60
|
() => a.expanded,
|
|
61
|
-
(
|
|
62
|
-
if (!r ||
|
|
63
|
-
const f = r.openItems.value.has(
|
|
64
|
-
(
|
|
61
|
+
(y) => {
|
|
62
|
+
if (!r || y === void 0) return;
|
|
63
|
+
const f = r.openItems.value.has(s);
|
|
64
|
+
(y && !f || !y && f) && r.toggleItem(s);
|
|
65
65
|
},
|
|
66
66
|
{ immediate: !0 }
|
|
67
|
-
),
|
|
68
|
-
r && r.unregisterItem(
|
|
67
|
+
), G(() => {
|
|
68
|
+
r && r.unregisterItem(s);
|
|
69
69
|
});
|
|
70
|
-
const
|
|
70
|
+
const h = p(() => [
|
|
71
71
|
"llm-accordion-item",
|
|
72
72
|
m.value && "is-expanded",
|
|
73
73
|
a.disabled && "is-disabled"
|
|
74
|
-
]),
|
|
75
|
-
return (
|
|
76
|
-
class:
|
|
74
|
+
]), g = p(() => ["chevron", m.value && "is-expanded"]);
|
|
75
|
+
return (y, f) => (l(), n("div", {
|
|
76
|
+
class: $(h.value)
|
|
77
77
|
}, [
|
|
78
|
-
c("h3",
|
|
78
|
+
c("h3", fe, [
|
|
79
79
|
c("button", {
|
|
80
80
|
id: d,
|
|
81
81
|
ref_key: "triggerRef",
|
|
82
|
-
ref:
|
|
82
|
+
ref: i,
|
|
83
83
|
class: "accordion-trigger",
|
|
84
84
|
type: "button",
|
|
85
85
|
"aria-expanded": m.value,
|
|
86
86
|
"aria-controls": u,
|
|
87
87
|
disabled: e.disabled,
|
|
88
|
-
onClick:
|
|
89
|
-
onKeydown:
|
|
88
|
+
onClick: k,
|
|
89
|
+
onKeydown: _
|
|
90
90
|
}, [
|
|
91
|
-
|
|
92
|
-
(
|
|
93
|
-
class: g
|
|
91
|
+
b(y.$slots, "header"),
|
|
92
|
+
(l(), n("svg", {
|
|
93
|
+
class: $(g.value),
|
|
94
94
|
width: "16",
|
|
95
95
|
height: "16",
|
|
96
96
|
viewBox: "0 0 16 16",
|
|
@@ -105,10 +105,10 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
105
105
|
"stroke-linejoin": "round"
|
|
106
106
|
}, null, -1)
|
|
107
107
|
])], 2))
|
|
108
|
-
], 40,
|
|
108
|
+
], 40, pe)
|
|
109
109
|
]),
|
|
110
110
|
c("div", {
|
|
111
|
-
class:
|
|
111
|
+
class: $(["accordion-panel-wrapper", m.value && "is-expanded"])
|
|
112
112
|
}, [
|
|
113
113
|
c("div", {
|
|
114
114
|
id: u,
|
|
@@ -116,23 +116,23 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
116
116
|
"aria-labelledby": d,
|
|
117
117
|
class: "accordion-panel"
|
|
118
118
|
}, [
|
|
119
|
-
|
|
119
|
+
b(y.$slots, "default")
|
|
120
120
|
])
|
|
121
121
|
], 2)
|
|
122
122
|
], 2));
|
|
123
123
|
}
|
|
124
|
-
}),
|
|
124
|
+
}), ve = { class: "accordion-header-content" }, Lt = /* @__PURE__ */ v({
|
|
125
125
|
name: "LlmAccordionHeader",
|
|
126
126
|
__name: "llm-accordion-header",
|
|
127
127
|
setup(e) {
|
|
128
|
-
return (t, a) => (
|
|
129
|
-
|
|
128
|
+
return (t, a) => (l(), n("span", ve, [
|
|
129
|
+
b(t.$slots, "default")
|
|
130
130
|
]));
|
|
131
131
|
}
|
|
132
|
-
}),
|
|
132
|
+
}), he = ["aria-live"], be = { class: "content" }, ge = {
|
|
133
133
|
class: "variant-icon",
|
|
134
134
|
"aria-hidden": "true"
|
|
135
|
-
},
|
|
135
|
+
}, xt = /* @__PURE__ */ v({
|
|
136
136
|
name: "LlmAlert",
|
|
137
137
|
__name: "llm-alert",
|
|
138
138
|
props: {
|
|
@@ -146,24 +146,24 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
146
146
|
success: "✓",
|
|
147
147
|
warning: "⚠",
|
|
148
148
|
danger: "✕"
|
|
149
|
-
},
|
|
150
|
-
() =>
|
|
151
|
-
), r =
|
|
152
|
-
return (
|
|
153
|
-
class:
|
|
149
|
+
}, o = e, s = t, d = p(() => ["llm-alert", `variant-${o.variant}`]), u = p(
|
|
150
|
+
() => o.variant === "danger" || o.variant === "warning" ? "assertive" : "polite"
|
|
151
|
+
), r = p(() => a[o.variant]);
|
|
152
|
+
return (i, m) => (l(), n("div", {
|
|
153
|
+
class: $(d.value),
|
|
154
154
|
role: "alert",
|
|
155
155
|
"aria-live": u.value
|
|
156
156
|
}, [
|
|
157
|
-
c("span",
|
|
158
|
-
c("span",
|
|
159
|
-
|
|
157
|
+
c("span", be, [
|
|
158
|
+
c("span", ge, L(r.value), 1),
|
|
159
|
+
b(i.$slots, "default")
|
|
160
160
|
]),
|
|
161
|
-
e.dismissible ? (
|
|
161
|
+
e.dismissible ? (l(), n("button", {
|
|
162
162
|
key: 0,
|
|
163
163
|
class: "dismiss",
|
|
164
164
|
type: "button",
|
|
165
165
|
"aria-label": "Dismiss",
|
|
166
|
-
onClick: m[0] || (m[0] = (
|
|
166
|
+
onClick: m[0] || (m[0] = (k) => s("dismissed"))
|
|
167
167
|
}, [...m[1] || (m[1] = [
|
|
168
168
|
c("svg", {
|
|
169
169
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -190,20 +190,20 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
190
190
|
y2: "18"
|
|
191
191
|
})
|
|
192
192
|
], -1)
|
|
193
|
-
])])) :
|
|
194
|
-
], 10,
|
|
193
|
+
])])) : w("", !0)
|
|
194
|
+
], 10, he));
|
|
195
195
|
}
|
|
196
|
-
}),
|
|
196
|
+
}), ye = ["aria-label"], $e = ["src", "alt"], ke = {
|
|
197
197
|
key: 1,
|
|
198
198
|
class: "initials"
|
|
199
|
-
},
|
|
199
|
+
}, _e = {
|
|
200
200
|
key: 2,
|
|
201
201
|
class: "icon",
|
|
202
202
|
xmlns: "http://www.w3.org/2000/svg",
|
|
203
203
|
viewBox: "0 0 24 24",
|
|
204
204
|
fill: "currentColor",
|
|
205
205
|
"aria-hidden": "true"
|
|
206
|
-
},
|
|
206
|
+
}, Ct = /* @__PURE__ */ v({
|
|
207
207
|
name: "LlmAvatar",
|
|
208
208
|
__name: "llm-avatar",
|
|
209
209
|
props: {
|
|
@@ -215,39 +215,39 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
215
215
|
status: { default: "" }
|
|
216
216
|
},
|
|
217
217
|
setup(e) {
|
|
218
|
-
const t = e, a =
|
|
219
|
-
|
|
218
|
+
const t = e, a = C(!1);
|
|
219
|
+
q(() => t.src, () => {
|
|
220
220
|
a.value = !1;
|
|
221
221
|
});
|
|
222
|
-
function
|
|
223
|
-
return r.split(" ").filter(Boolean).slice(0, 2).map((
|
|
222
|
+
function o(r) {
|
|
223
|
+
return r.split(" ").filter(Boolean).slice(0, 2).map((i) => i[0].toUpperCase()).join("");
|
|
224
224
|
}
|
|
225
|
-
const
|
|
225
|
+
const s = p(() => t.name ? o(t.name) : ""), d = p(() => t.alt || t.name || "Avatar"), u = p(() => [
|
|
226
226
|
"llm-avatar",
|
|
227
227
|
`size-${t.size}`,
|
|
228
228
|
`shape-${t.shape}`
|
|
229
229
|
]);
|
|
230
|
-
return (r,
|
|
231
|
-
class:
|
|
230
|
+
return (r, i) => (l(), n("div", {
|
|
231
|
+
class: $(u.value),
|
|
232
232
|
"aria-label": d.value,
|
|
233
233
|
role: "img"
|
|
234
234
|
}, [
|
|
235
|
-
e.src && !a.value ? (
|
|
235
|
+
e.src && !a.value ? (l(), n("img", {
|
|
236
236
|
key: 0,
|
|
237
237
|
src: e.src,
|
|
238
238
|
alt: e.alt || e.name,
|
|
239
|
-
onError:
|
|
240
|
-
}, null, 40,
|
|
239
|
+
onError: i[0] || (i[0] = (m) => a.value = !0)
|
|
240
|
+
}, null, 40, $e)) : s.value ? (l(), n("span", ke, L(s.value), 1)) : (l(), n("svg", _e, [...i[1] || (i[1] = [
|
|
241
241
|
c("path", { d: "M12 12c2.761 0 5-2.239 5-5s-2.239-5-5-5-5 2.239-5 5 2.239 5 5 5zm0 2c-3.314 0-10 1.343-10 4v2h20v-2c0-2.657-6.686-4-10-4z" }, null, -1)
|
|
242
242
|
])])),
|
|
243
|
-
e.status ? (
|
|
243
|
+
e.status ? (l(), n("span", {
|
|
244
244
|
key: 3,
|
|
245
|
-
class:
|
|
245
|
+
class: $(`status-dot status-${e.status}`),
|
|
246
246
|
"aria-hidden": "true"
|
|
247
|
-
}, null, 2)) :
|
|
248
|
-
], 10,
|
|
247
|
+
}, null, 2)) : w("", !0)
|
|
248
|
+
], 10, ye));
|
|
249
249
|
}
|
|
250
|
-
}),
|
|
250
|
+
}), we = ["aria-label"], Bt = /* @__PURE__ */ v({
|
|
251
251
|
name: "LlmAvatarGroup",
|
|
252
252
|
__name: "llm-avatar-group",
|
|
253
253
|
props: {
|
|
@@ -255,23 +255,23 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
255
255
|
size: { default: "md" }
|
|
256
256
|
},
|
|
257
257
|
setup(e) {
|
|
258
|
-
const t = e, a =
|
|
259
|
-
return (u, r) => (
|
|
260
|
-
class:
|
|
258
|
+
const t = e, a = re(), o = p(() => a.default?.() ?? []), s = p(() => o.value.slice(0, t.max)), d = p(() => Math.max(0, o.value.length - t.max));
|
|
259
|
+
return (u, r) => (l(), n("div", {
|
|
260
|
+
class: $(["llm-avatar-group", `size-${e.size}`])
|
|
261
261
|
}, [
|
|
262
|
-
(
|
|
263
|
-
d.value > 0 ? (
|
|
262
|
+
(l(!0), n(B, null, z(s.value, (i, m) => (l(), W(de(i), { key: m }))), 128)),
|
|
263
|
+
d.value > 0 ? (l(), n("div", {
|
|
264
264
|
key: 0,
|
|
265
|
-
class:
|
|
265
|
+
class: $(`overflow-badge size-${e.size}`),
|
|
266
266
|
"aria-label": `+${d.value} more`
|
|
267
|
-
}, " +" + L(d.value), 11,
|
|
267
|
+
}, " +" + L(d.value), 11, we)) : w("", !0)
|
|
268
268
|
], 2));
|
|
269
269
|
}
|
|
270
|
-
}),
|
|
270
|
+
}), Le = {
|
|
271
271
|
key: 0,
|
|
272
272
|
class: "variant-icon",
|
|
273
273
|
"aria-hidden": "true"
|
|
274
|
-
},
|
|
274
|
+
}, It = /* @__PURE__ */ v({
|
|
275
275
|
name: "LlmBadge",
|
|
276
276
|
__name: "llm-badge",
|
|
277
277
|
props: {
|
|
@@ -285,20 +285,20 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
285
285
|
warning: "⚠",
|
|
286
286
|
danger: "✕",
|
|
287
287
|
info: "ℹ"
|
|
288
|
-
}, a = e,
|
|
288
|
+
}, a = e, o = p(() => [
|
|
289
289
|
"llm-badge",
|
|
290
290
|
`variant-${a.variant}`,
|
|
291
291
|
`size-${a.size}`
|
|
292
|
-
]),
|
|
293
|
-
return (d, u) => (
|
|
294
|
-
class:
|
|
292
|
+
]), s = p(() => t[a.variant]);
|
|
293
|
+
return (d, u) => (l(), n("span", {
|
|
294
|
+
class: $(o.value),
|
|
295
295
|
role: "status"
|
|
296
296
|
}, [
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
s.value ? (l(), n("span", Le, L(s.value), 1)) : w("", !0),
|
|
298
|
+
b(d.$slots, "default")
|
|
299
299
|
], 2));
|
|
300
300
|
}
|
|
301
|
-
}),
|
|
301
|
+
}), xe = { class: "breadcrumbs-list" }, Tt = /* @__PURE__ */ v({
|
|
302
302
|
name: "LlmBreadcrumbs",
|
|
303
303
|
__name: "llm-breadcrumbs",
|
|
304
304
|
props: {
|
|
@@ -306,17 +306,17 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
306
306
|
},
|
|
307
307
|
setup(e) {
|
|
308
308
|
const t = e;
|
|
309
|
-
return (a,
|
|
309
|
+
return (a, o) => (l(), n("nav", {
|
|
310
310
|
class: "llm-breadcrumbs",
|
|
311
311
|
"aria-label": "Breadcrumb",
|
|
312
312
|
style: P({ "--llm-separator": `'${t.separator}'` })
|
|
313
313
|
}, [
|
|
314
|
-
c("ol",
|
|
315
|
-
|
|
314
|
+
c("ol", xe, [
|
|
315
|
+
b(a.$slots, "default")
|
|
316
316
|
])
|
|
317
317
|
], 4));
|
|
318
318
|
}
|
|
319
|
-
}),
|
|
319
|
+
}), Ce = ["href"], Be = ["aria-current"], Dt = /* @__PURE__ */ v({
|
|
320
320
|
name: "LlmBreadcrumbItem",
|
|
321
321
|
__name: "llm-breadcrumb-item",
|
|
322
322
|
props: {
|
|
@@ -324,33 +324,33 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
324
324
|
current: { type: Boolean, default: !1 }
|
|
325
325
|
},
|
|
326
326
|
setup(e) {
|
|
327
|
-
const t = e, a =
|
|
327
|
+
const t = e, a = p(() => [
|
|
328
328
|
"llm-breadcrumb-item",
|
|
329
329
|
t.current && "is-current"
|
|
330
330
|
].filter(Boolean));
|
|
331
|
-
return (
|
|
332
|
-
class:
|
|
331
|
+
return (o, s) => (l(), n("li", {
|
|
332
|
+
class: $(a.value)
|
|
333
333
|
}, [
|
|
334
|
-
e.href && !e.current ? (
|
|
334
|
+
e.href && !e.current ? (l(), n("a", {
|
|
335
335
|
key: 0,
|
|
336
336
|
href: e.href,
|
|
337
337
|
class: "breadcrumb-link"
|
|
338
338
|
}, [
|
|
339
|
-
|
|
340
|
-
], 8,
|
|
339
|
+
b(o.$slots, "default")
|
|
340
|
+
], 8, Ce)) : (l(), n("span", {
|
|
341
341
|
key: 1,
|
|
342
342
|
class: "breadcrumb-current",
|
|
343
343
|
"aria-current": e.current ? "page" : void 0
|
|
344
344
|
}, [
|
|
345
|
-
|
|
346
|
-
], 8,
|
|
345
|
+
b(o.$slots, "default")
|
|
346
|
+
], 8, Be))
|
|
347
347
|
], 2));
|
|
348
348
|
}
|
|
349
|
-
}),
|
|
349
|
+
}), Ie = ["type", "disabled", "aria-disabled"], Te = {
|
|
350
350
|
key: 0,
|
|
351
351
|
class: "spinner",
|
|
352
352
|
"aria-hidden": "true"
|
|
353
|
-
},
|
|
353
|
+
}, St = /* @__PURE__ */ v({
|
|
354
354
|
name: "LlmButton",
|
|
355
355
|
__name: "llm-button",
|
|
356
356
|
props: {
|
|
@@ -361,24 +361,24 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
361
361
|
type: { default: "button" }
|
|
362
362
|
},
|
|
363
363
|
setup(e) {
|
|
364
|
-
const t = e, a =
|
|
364
|
+
const t = e, a = p(() => t.disabled || t.loading), o = p(() => [
|
|
365
365
|
"llm-button",
|
|
366
366
|
`variant-${t.variant}`,
|
|
367
367
|
`size-${t.size}`,
|
|
368
368
|
a.value && "is-disabled",
|
|
369
369
|
t.loading && "is-loading"
|
|
370
370
|
].filter(Boolean));
|
|
371
|
-
return (
|
|
372
|
-
class:
|
|
371
|
+
return (s, d) => (l(), n("button", {
|
|
372
|
+
class: $(o.value),
|
|
373
373
|
type: e.type,
|
|
374
374
|
disabled: a.value,
|
|
375
375
|
"aria-disabled": a.value || void 0
|
|
376
376
|
}, [
|
|
377
|
-
e.loading ? (
|
|
378
|
-
|
|
379
|
-
], 10,
|
|
377
|
+
e.loading ? (l(), n("span", Te)) : w("", !0),
|
|
378
|
+
b(s.$slots, "default")
|
|
379
|
+
], 10, Ie));
|
|
380
380
|
}
|
|
381
|
-
}),
|
|
381
|
+
}), Mt = /* @__PURE__ */ v({
|
|
382
382
|
name: "LlmCard",
|
|
383
383
|
__name: "llm-card",
|
|
384
384
|
props: {
|
|
@@ -386,46 +386,46 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
386
386
|
padding: { default: "md" }
|
|
387
387
|
},
|
|
388
388
|
setup(e) {
|
|
389
|
-
const t = e, a =
|
|
389
|
+
const t = e, a = p(() => [
|
|
390
390
|
"llm-card",
|
|
391
391
|
`variant-${t.variant}`,
|
|
392
392
|
`padding-${t.padding}`
|
|
393
393
|
]);
|
|
394
|
-
return (
|
|
395
|
-
class:
|
|
394
|
+
return (o, s) => (l(), n("div", {
|
|
395
|
+
class: $(a.value)
|
|
396
396
|
}, [
|
|
397
|
-
|
|
397
|
+
b(o.$slots, "default")
|
|
398
398
|
], 2));
|
|
399
399
|
}
|
|
400
|
-
}),
|
|
400
|
+
}), De = { class: "llm-card-header" }, At = /* @__PURE__ */ v({
|
|
401
401
|
name: "LlmCardHeader",
|
|
402
402
|
__name: "llm-card-header",
|
|
403
403
|
setup(e) {
|
|
404
|
-
return (t, a) => (
|
|
405
|
-
|
|
404
|
+
return (t, a) => (l(), n("div", De, [
|
|
405
|
+
b(t.$slots, "default")
|
|
406
406
|
]));
|
|
407
407
|
}
|
|
408
|
-
}),
|
|
408
|
+
}), Se = { class: "llm-card-content" }, zt = /* @__PURE__ */ v({
|
|
409
409
|
name: "LlmCardContent",
|
|
410
410
|
__name: "llm-card-content",
|
|
411
411
|
setup(e) {
|
|
412
|
-
return (t, a) => (
|
|
413
|
-
|
|
412
|
+
return (t, a) => (l(), n("div", Se, [
|
|
413
|
+
b(t.$slots, "default")
|
|
414
414
|
]));
|
|
415
415
|
}
|
|
416
|
-
}),
|
|
416
|
+
}), Me = { class: "llm-card-footer" }, Rt = /* @__PURE__ */ v({
|
|
417
417
|
name: "LlmCardFooter",
|
|
418
418
|
__name: "llm-card-footer",
|
|
419
419
|
setup(e) {
|
|
420
|
-
return (t, a) => (
|
|
421
|
-
|
|
420
|
+
return (t, a) => (l(), n("div", Me, [
|
|
421
|
+
b(t.$slots, "default")
|
|
422
422
|
]));
|
|
423
423
|
}
|
|
424
|
-
}),
|
|
424
|
+
}), Ae = ["for"], ze = ["id", "checked", "disabled", "readonly", "required", "name", "aria-invalid"], Re = {
|
|
425
425
|
key: 0,
|
|
426
426
|
class: "errors",
|
|
427
427
|
"aria-live": "polite"
|
|
428
|
-
}, qe = /* @__PURE__ */
|
|
428
|
+
}, qe = /* @__PURE__ */ v({
|
|
429
429
|
name: "LlmCheckbox",
|
|
430
430
|
__name: "llm-checkbox",
|
|
431
431
|
props: {
|
|
@@ -441,21 +441,21 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
441
441
|
},
|
|
442
442
|
emits: ["update:checked"],
|
|
443
443
|
setup(e, { emit: t }) {
|
|
444
|
-
const a = e,
|
|
445
|
-
|
|
444
|
+
const a = e, o = t, s = C(null), d = p(() => a.id || `checkbox-${Math.random().toString(36).slice(2)}`);
|
|
445
|
+
q(
|
|
446
446
|
() => a.indeterminate,
|
|
447
447
|
(r) => {
|
|
448
|
-
|
|
448
|
+
s.value && (s.value.indeterminate = r);
|
|
449
449
|
}
|
|
450
|
-
),
|
|
451
|
-
|
|
450
|
+
), O(() => {
|
|
451
|
+
s.value && (s.value.indeterminate = a.indeterminate);
|
|
452
452
|
});
|
|
453
453
|
function u(r) {
|
|
454
|
-
const
|
|
455
|
-
|
|
454
|
+
const i = r.target;
|
|
455
|
+
o("update:checked", i.checked);
|
|
456
456
|
}
|
|
457
|
-
return (r,
|
|
458
|
-
class:
|
|
457
|
+
return (r, i) => (l(), n("div", {
|
|
458
|
+
class: $(["llm-checkbox", { "is-invalid": e.invalid, "is-disabled": e.disabled }])
|
|
459
459
|
}, [
|
|
460
460
|
c("label", {
|
|
461
461
|
for: d.value,
|
|
@@ -464,7 +464,7 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
464
464
|
c("input", {
|
|
465
465
|
id: d.value,
|
|
466
466
|
ref_key: "inputRef",
|
|
467
|
-
ref:
|
|
467
|
+
ref: s,
|
|
468
468
|
type: "checkbox",
|
|
469
469
|
checked: e.checked,
|
|
470
470
|
disabled: e.disabled,
|
|
@@ -473,18 +473,18 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
473
473
|
name: e.name,
|
|
474
474
|
"aria-invalid": e.invalid || void 0,
|
|
475
475
|
onChange: u
|
|
476
|
-
}, null, 40,
|
|
477
|
-
|
|
478
|
-
], 8,
|
|
479
|
-
e.errors.length ? (
|
|
480
|
-
(
|
|
481
|
-
key:
|
|
476
|
+
}, null, 40, ze),
|
|
477
|
+
b(r.$slots, "default")
|
|
478
|
+
], 8, Ae),
|
|
479
|
+
e.errors.length ? (l(), n("ul", Re, [
|
|
480
|
+
(l(!0), n(B, null, z(e.errors, (m, k) => (l(), n("li", {
|
|
481
|
+
key: k,
|
|
482
482
|
class: "error"
|
|
483
483
|
}, L(m), 1))), 128))
|
|
484
|
-
])) :
|
|
484
|
+
])) : w("", !0)
|
|
485
485
|
], 2));
|
|
486
486
|
}
|
|
487
|
-
}),
|
|
487
|
+
}), He = ["aria-label", "aria-labelledby"], Q = /* @__PURE__ */ Symbol("LlmDialog"), qt = /* @__PURE__ */ v({
|
|
488
488
|
name: "LlmDialog",
|
|
489
489
|
__name: "llm-dialog",
|
|
490
490
|
props: {
|
|
@@ -495,72 +495,72 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
495
495
|
},
|
|
496
496
|
emits: ["update:open"],
|
|
497
497
|
setup(e, { emit: t }) {
|
|
498
|
-
const a = e,
|
|
498
|
+
const a = e, o = t, s = C(null), d = E();
|
|
499
499
|
function u() {
|
|
500
|
-
|
|
500
|
+
o("update:open", !1);
|
|
501
501
|
}
|
|
502
502
|
H(Q, {
|
|
503
503
|
headerId: d,
|
|
504
504
|
close: u
|
|
505
|
-
}),
|
|
506
|
-
a.open &&
|
|
507
|
-
}),
|
|
505
|
+
}), O(() => {
|
|
506
|
+
a.open && s.value && s.value.showModal();
|
|
507
|
+
}), q(
|
|
508
508
|
() => a.open,
|
|
509
|
-
(
|
|
510
|
-
const
|
|
511
|
-
|
|
509
|
+
(_) => {
|
|
510
|
+
const h = s.value;
|
|
511
|
+
h && (_ ? h.open || h.showModal() : h.open && h.close());
|
|
512
512
|
},
|
|
513
513
|
{ flush: "post" }
|
|
514
514
|
);
|
|
515
515
|
function r() {
|
|
516
|
-
|
|
516
|
+
o("update:open", !1);
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
|
|
518
|
+
function i(_) {
|
|
519
|
+
_.preventDefault(), o("update:open", !1);
|
|
520
520
|
}
|
|
521
|
-
function m(
|
|
522
|
-
a.closeOnBackdrop &&
|
|
521
|
+
function m(_) {
|
|
522
|
+
a.closeOnBackdrop && _.target === s.value && o("update:open", !1);
|
|
523
523
|
}
|
|
524
|
-
const
|
|
525
|
-
return (
|
|
524
|
+
const k = p(() => ["panel", `size-${a.size}`]);
|
|
525
|
+
return (_, h) => (l(), n("dialog", {
|
|
526
526
|
ref_key: "dialogRef",
|
|
527
|
-
ref:
|
|
527
|
+
ref: s,
|
|
528
528
|
class: "llm-dialog",
|
|
529
529
|
"aria-label": e.ariaLabel || void 0,
|
|
530
|
-
"aria-labelledby": e.ariaLabel ? void 0 :
|
|
530
|
+
"aria-labelledby": e.ariaLabel ? void 0 : M(d),
|
|
531
531
|
"aria-modal": "true",
|
|
532
532
|
onClose: r,
|
|
533
|
-
onCancel:
|
|
533
|
+
onCancel: i,
|
|
534
534
|
onClick: m
|
|
535
535
|
}, [
|
|
536
536
|
c("div", {
|
|
537
|
-
class:
|
|
538
|
-
onClick:
|
|
537
|
+
class: $(k.value),
|
|
538
|
+
onClick: h[0] || (h[0] = V(() => {
|
|
539
539
|
}, ["stop"]))
|
|
540
540
|
}, [
|
|
541
|
-
|
|
541
|
+
b(_.$slots, "default")
|
|
542
542
|
], 2)
|
|
543
|
-
], 40,
|
|
543
|
+
], 40, He));
|
|
544
544
|
}
|
|
545
|
-
}),
|
|
545
|
+
}), Ee = ["id"], Oe = { class: "header-content" }, Ht = /* @__PURE__ */ v({
|
|
546
546
|
name: "LlmDialogHeader",
|
|
547
547
|
__name: "llm-dialog-header",
|
|
548
548
|
setup(e) {
|
|
549
549
|
const t = R(Q, { headerId: "", close: () => {
|
|
550
550
|
} });
|
|
551
|
-
return (a,
|
|
552
|
-
id:
|
|
551
|
+
return (a, o) => (l(), n("div", {
|
|
552
|
+
id: M(t).headerId,
|
|
553
553
|
class: "llm-dialog-header"
|
|
554
554
|
}, [
|
|
555
|
-
c("span",
|
|
556
|
-
|
|
555
|
+
c("span", Oe, [
|
|
556
|
+
b(a.$slots, "default")
|
|
557
557
|
]),
|
|
558
558
|
c("button", {
|
|
559
559
|
class: "close-btn",
|
|
560
560
|
type: "button",
|
|
561
561
|
"aria-label": "Close dialog",
|
|
562
|
-
onClick:
|
|
563
|
-
}, [...
|
|
562
|
+
onClick: o[0] || (o[0] = (s) => M(t).close())
|
|
563
|
+
}, [...o[1] || (o[1] = [
|
|
564
564
|
c("svg", {
|
|
565
565
|
xmlns: "http://www.w3.org/2000/svg",
|
|
566
566
|
width: "14",
|
|
@@ -587,25 +587,25 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
587
587
|
})
|
|
588
588
|
], -1)
|
|
589
589
|
])])
|
|
590
|
-
], 8,
|
|
590
|
+
], 8, Ee));
|
|
591
591
|
}
|
|
592
|
-
}),
|
|
592
|
+
}), Ke = { class: "llm-dialog-content" }, Et = /* @__PURE__ */ v({
|
|
593
593
|
name: "LlmDialogContent",
|
|
594
594
|
__name: "llm-dialog-content",
|
|
595
595
|
setup(e) {
|
|
596
|
-
return (t, a) => (
|
|
597
|
-
|
|
596
|
+
return (t, a) => (l(), n("div", Ke, [
|
|
597
|
+
b(t.$slots, "default")
|
|
598
598
|
]));
|
|
599
599
|
}
|
|
600
|
-
}),
|
|
600
|
+
}), je = { class: "llm-dialog-footer" }, Ot = /* @__PURE__ */ v({
|
|
601
601
|
name: "LlmDialogFooter",
|
|
602
602
|
__name: "llm-dialog-footer",
|
|
603
603
|
setup(e) {
|
|
604
|
-
return (t, a) => (
|
|
605
|
-
|
|
604
|
+
return (t, a) => (l(), n("div", je, [
|
|
605
|
+
b(t.$slots, "default")
|
|
606
606
|
]));
|
|
607
607
|
}
|
|
608
|
-
}),
|
|
608
|
+
}), Ge = ["aria-labelledby"], X = /* @__PURE__ */ Symbol("LlmDrawer"), Kt = /* @__PURE__ */ v({
|
|
609
609
|
name: "LlmDrawer",
|
|
610
610
|
__name: "llm-drawer",
|
|
611
611
|
props: {
|
|
@@ -616,76 +616,76 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
616
616
|
},
|
|
617
617
|
emits: ["update:open"],
|
|
618
618
|
setup(e, { emit: t }) {
|
|
619
|
-
const a = e,
|
|
619
|
+
const a = e, o = t, s = C(null), d = E();
|
|
620
620
|
function u() {
|
|
621
|
-
|
|
621
|
+
o("update:open", !1);
|
|
622
622
|
}
|
|
623
|
-
H(
|
|
623
|
+
H(X, {
|
|
624
624
|
headerId: d,
|
|
625
625
|
close: u
|
|
626
|
-
}),
|
|
627
|
-
a.open &&
|
|
628
|
-
}),
|
|
626
|
+
}), O(() => {
|
|
627
|
+
a.open && s.value && s.value.showModal();
|
|
628
|
+
}), q(
|
|
629
629
|
() => a.open,
|
|
630
|
-
(
|
|
631
|
-
const
|
|
632
|
-
|
|
630
|
+
(_) => {
|
|
631
|
+
const h = s.value;
|
|
632
|
+
h && (_ ? h.open || h.showModal() : h.open && h.close());
|
|
633
633
|
},
|
|
634
634
|
{ flush: "post" }
|
|
635
635
|
);
|
|
636
636
|
function r() {
|
|
637
|
-
|
|
637
|
+
o("update:open", !1);
|
|
638
638
|
}
|
|
639
|
-
function
|
|
640
|
-
|
|
639
|
+
function i(_) {
|
|
640
|
+
_.preventDefault(), o("update:open", !1);
|
|
641
641
|
}
|
|
642
|
-
function m(
|
|
643
|
-
a.closeOnBackdrop &&
|
|
642
|
+
function m(_) {
|
|
643
|
+
a.closeOnBackdrop && _.target === s.value && o("update:open", !1);
|
|
644
644
|
}
|
|
645
|
-
const
|
|
645
|
+
const k = p(() => [
|
|
646
646
|
"llm-drawer-host",
|
|
647
647
|
`position-${a.position}`,
|
|
648
648
|
`size-${a.size}`,
|
|
649
649
|
a.open && "is-open"
|
|
650
650
|
]);
|
|
651
|
-
return (
|
|
651
|
+
return (_, h) => (l(), n("dialog", {
|
|
652
652
|
ref_key: "dialogRef",
|
|
653
|
-
ref:
|
|
654
|
-
class:
|
|
655
|
-
"aria-labelledby":
|
|
653
|
+
ref: s,
|
|
654
|
+
class: $(k.value),
|
|
655
|
+
"aria-labelledby": M(d),
|
|
656
656
|
"aria-modal": "true",
|
|
657
657
|
onClose: r,
|
|
658
|
-
onCancel:
|
|
658
|
+
onCancel: i,
|
|
659
659
|
onClick: m
|
|
660
660
|
}, [
|
|
661
661
|
c("div", {
|
|
662
662
|
class: "panel",
|
|
663
|
-
onClick:
|
|
663
|
+
onClick: h[0] || (h[0] = V(() => {
|
|
664
664
|
}, ["stop"]))
|
|
665
665
|
}, [
|
|
666
|
-
|
|
666
|
+
b(_.$slots, "default")
|
|
667
667
|
])
|
|
668
|
-
], 42,
|
|
668
|
+
], 42, Ge));
|
|
669
669
|
}
|
|
670
|
-
}),
|
|
670
|
+
}), Pe = ["id"], Fe = { class: "header-content" }, jt = /* @__PURE__ */ v({
|
|
671
671
|
name: "LlmDrawerHeader",
|
|
672
672
|
__name: "llm-drawer-header",
|
|
673
673
|
setup(e) {
|
|
674
|
-
const t = R(
|
|
674
|
+
const t = R(X, { headerId: "", close: () => {
|
|
675
675
|
} });
|
|
676
|
-
return (a,
|
|
677
|
-
id:
|
|
676
|
+
return (a, o) => (l(), n("div", {
|
|
677
|
+
id: M(t).headerId,
|
|
678
678
|
class: "llm-drawer-header"
|
|
679
679
|
}, [
|
|
680
680
|
c("span", Fe, [
|
|
681
|
-
|
|
681
|
+
b(a.$slots, "default")
|
|
682
682
|
]),
|
|
683
683
|
c("button", {
|
|
684
684
|
class: "close-btn",
|
|
685
685
|
type: "button",
|
|
686
686
|
"aria-label": "Close drawer",
|
|
687
|
-
onClick:
|
|
688
|
-
}, [...
|
|
687
|
+
onClick: o[0] || (o[0] = (s) => M(t).close())
|
|
688
|
+
}, [...o[1] || (o[1] = [
|
|
689
689
|
c("svg", {
|
|
690
690
|
xmlns: "http://www.w3.org/2000/svg",
|
|
691
691
|
width: "14",
|
|
@@ -712,29 +712,29 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
712
712
|
})
|
|
713
713
|
], -1)
|
|
714
714
|
])])
|
|
715
|
-
], 8,
|
|
715
|
+
], 8, Pe));
|
|
716
716
|
}
|
|
717
|
-
}),
|
|
717
|
+
}), Ve = { class: "llm-drawer-content" }, Gt = /* @__PURE__ */ v({
|
|
718
718
|
name: "LlmDrawerContent",
|
|
719
719
|
__name: "llm-drawer-content",
|
|
720
720
|
setup(e) {
|
|
721
|
-
return (t, a) => (
|
|
722
|
-
|
|
721
|
+
return (t, a) => (l(), n("div", Ve, [
|
|
722
|
+
b(t.$slots, "default")
|
|
723
723
|
]));
|
|
724
724
|
}
|
|
725
|
-
}),
|
|
725
|
+
}), Ne = { class: "llm-drawer-footer" }, Pt = /* @__PURE__ */ v({
|
|
726
726
|
name: "LlmDrawerFooter",
|
|
727
727
|
__name: "llm-drawer-footer",
|
|
728
728
|
setup(e) {
|
|
729
|
-
return (t, a) => (
|
|
730
|
-
|
|
729
|
+
return (t, a) => (l(), n("div", Ne, [
|
|
730
|
+
b(t.$slots, "default")
|
|
731
731
|
]));
|
|
732
732
|
}
|
|
733
|
-
}),
|
|
733
|
+
}), Ue = ["for"], We = { class: "input-field" }, Je = ["id", "type", "value", "placeholder", "disabled", "readonly", "required", "name", "aria-invalid"], Ze = {
|
|
734
734
|
key: 1,
|
|
735
735
|
class: "errors",
|
|
736
736
|
"aria-live": "polite"
|
|
737
|
-
},
|
|
737
|
+
}, Ft = /* @__PURE__ */ v({
|
|
738
738
|
name: "LlmInput",
|
|
739
739
|
__name: "llm-input",
|
|
740
740
|
props: {
|
|
@@ -752,21 +752,21 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
752
752
|
},
|
|
753
753
|
emits: ["update:value"],
|
|
754
754
|
setup(e, { emit: t }) {
|
|
755
|
-
const a = e,
|
|
755
|
+
const a = e, o = t, s = p(() => a.id || (a.label ? `input-${Math.random().toString(36).slice(2)}` : void 0));
|
|
756
756
|
function d(u) {
|
|
757
|
-
|
|
757
|
+
o("update:value", u.target.value);
|
|
758
758
|
}
|
|
759
|
-
return (u, r) => (
|
|
760
|
-
class:
|
|
759
|
+
return (u, r) => (l(), n("div", {
|
|
760
|
+
class: $(["llm-input", { "is-invalid": e.invalid, "is-disabled": e.disabled }])
|
|
761
761
|
}, [
|
|
762
|
-
e.label ? (
|
|
762
|
+
e.label ? (l(), n("label", {
|
|
763
763
|
key: 0,
|
|
764
|
-
for:
|
|
764
|
+
for: s.value,
|
|
765
765
|
class: "input-label"
|
|
766
|
-
}, L(e.label), 9,
|
|
767
|
-
c("div",
|
|
766
|
+
}, L(e.label), 9, Ue)) : w("", !0),
|
|
767
|
+
c("div", We, [
|
|
768
768
|
c("input", {
|
|
769
|
-
id:
|
|
769
|
+
id: s.value,
|
|
770
770
|
type: e.type,
|
|
771
771
|
value: e.value,
|
|
772
772
|
placeholder: e.placeholder,
|
|
@@ -776,74 +776,74 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
776
776
|
name: e.name,
|
|
777
777
|
"aria-invalid": e.invalid || void 0,
|
|
778
778
|
onInput: d
|
|
779
|
-
}, null, 40,
|
|
779
|
+
}, null, 40, Je)
|
|
780
780
|
]),
|
|
781
|
-
e.errors.length ? (
|
|
782
|
-
(
|
|
781
|
+
e.errors.length ? (l(), n("ul", Ze, [
|
|
782
|
+
(l(!0), n(B, null, z(e.errors, (i, m) => (l(), n("li", {
|
|
783
783
|
key: m,
|
|
784
784
|
class: "error"
|
|
785
|
-
}, L(
|
|
786
|
-
])) :
|
|
785
|
+
}, L(i), 1))), 128))
|
|
786
|
+
])) : w("", !0)
|
|
787
787
|
], 2));
|
|
788
788
|
}
|
|
789
|
-
}),
|
|
789
|
+
}), Qe = { class: "llm-menu-trigger-wrapper" }, Y = /* @__PURE__ */ Symbol("LlmMenuTrigger"), Vt = /* @__PURE__ */ v({
|
|
790
790
|
name: "LlmMenuTrigger",
|
|
791
791
|
__name: "llm-menu-trigger",
|
|
792
792
|
setup(e) {
|
|
793
|
-
const t =
|
|
794
|
-
function
|
|
793
|
+
const t = C(!1), a = C(null), o = C(null);
|
|
794
|
+
function s() {
|
|
795
795
|
t.value = !t.value;
|
|
796
796
|
}
|
|
797
797
|
function d() {
|
|
798
798
|
t.value = !1;
|
|
799
799
|
}
|
|
800
|
-
H(
|
|
801
|
-
function u(
|
|
800
|
+
H(Y, { close: d });
|
|
801
|
+
function u(i) {
|
|
802
802
|
if (!t.value) return;
|
|
803
|
-
const m =
|
|
804
|
-
|
|
803
|
+
const m = i.target, k = a.value?.contains(m), _ = o.value?.contains(m);
|
|
804
|
+
!k && !_ && d();
|
|
805
805
|
}
|
|
806
|
-
function r(
|
|
807
|
-
|
|
806
|
+
function r(i) {
|
|
807
|
+
i.key === "Escape" && t.value && d();
|
|
808
808
|
}
|
|
809
|
-
return
|
|
809
|
+
return O(() => {
|
|
810
810
|
document.addEventListener("mousedown", u), document.addEventListener("keydown", r);
|
|
811
|
-
}),
|
|
811
|
+
}), G(() => {
|
|
812
812
|
document.removeEventListener("mousedown", u), document.removeEventListener("keydown", r);
|
|
813
|
-
}), (
|
|
813
|
+
}), (i, m) => (l(), n("div", Qe, [
|
|
814
814
|
c("span", {
|
|
815
815
|
ref_key: "triggerRef",
|
|
816
816
|
ref: a,
|
|
817
|
-
onClick:
|
|
817
|
+
onClick: s
|
|
818
818
|
}, [
|
|
819
|
-
|
|
819
|
+
b(i.$slots, "trigger")
|
|
820
820
|
], 512),
|
|
821
|
-
t.value ? (
|
|
821
|
+
t.value ? (l(), n("div", {
|
|
822
822
|
key: 0,
|
|
823
823
|
ref_key: "menuRef",
|
|
824
|
-
ref:
|
|
824
|
+
ref: o,
|
|
825
825
|
class: "llm-menu-panel"
|
|
826
826
|
}, [
|
|
827
|
-
|
|
828
|
-
], 512)) :
|
|
827
|
+
b(i.$slots, "menu")
|
|
828
|
+
], 512)) : w("", !0)
|
|
829
829
|
]));
|
|
830
830
|
}
|
|
831
|
-
}),
|
|
831
|
+
}), Nt = /* @__PURE__ */ v({
|
|
832
832
|
name: "LlmMenu",
|
|
833
833
|
__name: "llm-menu",
|
|
834
834
|
props: {
|
|
835
835
|
variant: { default: "default" }
|
|
836
836
|
},
|
|
837
837
|
setup(e) {
|
|
838
|
-
const t = e, a =
|
|
839
|
-
return (
|
|
840
|
-
class:
|
|
838
|
+
const t = e, a = p(() => ["llm-menu", `variant-${t.variant}`]);
|
|
839
|
+
return (o, s) => (l(), n("div", {
|
|
840
|
+
class: $(a.value),
|
|
841
841
|
role: "menu"
|
|
842
842
|
}, [
|
|
843
|
-
|
|
843
|
+
b(o.$slots, "default")
|
|
844
844
|
], 2));
|
|
845
845
|
}
|
|
846
|
-
}),
|
|
846
|
+
}), Xe = ["disabled"], Ut = /* @__PURE__ */ v({
|
|
847
847
|
name: "LlmMenuItem",
|
|
848
848
|
__name: "llm-menu-item",
|
|
849
849
|
props: {
|
|
@@ -851,38 +851,38 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
851
851
|
},
|
|
852
852
|
emits: ["triggered"],
|
|
853
853
|
setup(e, { emit: t }) {
|
|
854
|
-
const a = e,
|
|
854
|
+
const a = e, o = t, s = R(Y, null);
|
|
855
855
|
function d() {
|
|
856
|
-
a.disabled || (
|
|
856
|
+
a.disabled || (o("triggered"), s?.close());
|
|
857
857
|
}
|
|
858
|
-
const u =
|
|
859
|
-
return (r,
|
|
860
|
-
class:
|
|
858
|
+
const u = p(() => ["llm-menu-item", a.disabled && "is-disabled"]);
|
|
859
|
+
return (r, i) => (l(), n("button", {
|
|
860
|
+
class: $(u.value),
|
|
861
861
|
role: "menuitem",
|
|
862
862
|
type: "button",
|
|
863
863
|
disabled: e.disabled,
|
|
864
864
|
onClick: d
|
|
865
865
|
}, [
|
|
866
|
-
|
|
867
|
-
], 10,
|
|
866
|
+
b(r.$slots, "default")
|
|
867
|
+
], 10, Xe));
|
|
868
868
|
}
|
|
869
|
-
}),
|
|
869
|
+
}), Ye = {
|
|
870
870
|
class: "llm-menu-separator",
|
|
871
871
|
role: "separator"
|
|
872
|
-
},
|
|
872
|
+
}, Wt = /* @__PURE__ */ v({
|
|
873
873
|
name: "LlmMenuSeparator",
|
|
874
874
|
__name: "llm-menu-separator",
|
|
875
875
|
setup(e) {
|
|
876
|
-
return (t, a) => (
|
|
876
|
+
return (t, a) => (l(), n("hr", Ye));
|
|
877
877
|
}
|
|
878
|
-
}),
|
|
878
|
+
}), ea = {
|
|
879
879
|
class: "llm-pagination",
|
|
880
880
|
"aria-label": "Pagination"
|
|
881
|
-
},
|
|
881
|
+
}, aa = ["disabled"], ta = ["disabled"], la = {
|
|
882
882
|
key: 0,
|
|
883
883
|
class: "ellipsis",
|
|
884
884
|
"aria-hidden": "true"
|
|
885
|
-
},
|
|
885
|
+
}, sa = ["aria-label", "aria-current", "onClick"], na = ["disabled"], oa = ["disabled"], Jt = /* @__PURE__ */ v({
|
|
886
886
|
name: "LlmPagination",
|
|
887
887
|
__name: "llm-pagination",
|
|
888
888
|
props: {
|
|
@@ -893,62 +893,62 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
893
893
|
},
|
|
894
894
|
emits: ["pageChange"],
|
|
895
895
|
setup(e, { emit: t }) {
|
|
896
|
-
const a = e,
|
|
897
|
-
function
|
|
898
|
-
if (
|
|
899
|
-
const
|
|
900
|
-
|
|
901
|
-
const
|
|
902
|
-
|
|
903
|
-
for (let
|
|
904
|
-
return
|
|
905
|
-
}
|
|
906
|
-
const d =
|
|
896
|
+
const a = e, o = t;
|
|
897
|
+
function s(r, i, m) {
|
|
898
|
+
if (i <= 1) return [{ type: "page", page: 1 }];
|
|
899
|
+
const k = [];
|
|
900
|
+
k.push({ type: "page", page: 1 });
|
|
901
|
+
const _ = Math.max(2, r - m), h = Math.min(i - 1, r + m);
|
|
902
|
+
_ > 2 && k.push({ type: "ellipsis", key: "ellipsis-start" });
|
|
903
|
+
for (let g = _; g <= h; g++) k.push({ type: "page", page: g });
|
|
904
|
+
return h < i - 1 && k.push({ type: "ellipsis", key: "ellipsis-end" }), i > 1 && k.push({ type: "page", page: i }), k;
|
|
905
|
+
}
|
|
906
|
+
const d = p(() => s(a.page, a.pageCount, a.siblingCount));
|
|
907
907
|
function u(r) {
|
|
908
|
-
const
|
|
909
|
-
|
|
908
|
+
const i = Math.min(Math.max(r, 1), a.pageCount);
|
|
909
|
+
i !== a.page && o("pageChange", i);
|
|
910
910
|
}
|
|
911
|
-
return (r,
|
|
912
|
-
e.showFirstLast ? (
|
|
911
|
+
return (r, i) => (l(), n("nav", ea, [
|
|
912
|
+
e.showFirstLast ? (l(), n("button", {
|
|
913
913
|
key: 0,
|
|
914
914
|
class: "page-btn nav-btn",
|
|
915
915
|
disabled: e.page <= 1,
|
|
916
916
|
"aria-label": "First page",
|
|
917
|
-
onClick:
|
|
918
|
-
}, " « ", 8,
|
|
917
|
+
onClick: i[0] || (i[0] = (m) => u(1))
|
|
918
|
+
}, " « ", 8, aa)) : w("", !0),
|
|
919
919
|
c("button", {
|
|
920
920
|
class: "page-btn nav-btn",
|
|
921
921
|
disabled: e.page <= 1,
|
|
922
922
|
"aria-label": "Previous page",
|
|
923
|
-
onClick:
|
|
924
|
-
}, " ‹ ", 8,
|
|
925
|
-
(
|
|
923
|
+
onClick: i[1] || (i[1] = (m) => u(e.page - 1))
|
|
924
|
+
}, " ‹ ", 8, ta),
|
|
925
|
+
(l(!0), n(B, null, z(d.value, (m) => (l(), n(B, {
|
|
926
926
|
key: m.type === "page" ? m.page : m.key
|
|
927
927
|
}, [
|
|
928
|
-
m.type === "ellipsis" ? (
|
|
928
|
+
m.type === "ellipsis" ? (l(), n("span", la, "…")) : (l(), n("button", {
|
|
929
929
|
key: 1,
|
|
930
|
-
class:
|
|
930
|
+
class: $(["page-btn", { active: m.page === e.page }]),
|
|
931
931
|
"aria-label": `Page ${m.page}`,
|
|
932
932
|
"aria-current": m.page === e.page ? "page" : void 0,
|
|
933
|
-
onClick: (
|
|
934
|
-
}, L(m.page), 11,
|
|
933
|
+
onClick: (k) => u(m.page)
|
|
934
|
+
}, L(m.page), 11, sa))
|
|
935
935
|
], 64))), 128)),
|
|
936
936
|
c("button", {
|
|
937
937
|
class: "page-btn nav-btn",
|
|
938
938
|
disabled: e.page >= e.pageCount,
|
|
939
939
|
"aria-label": "Next page",
|
|
940
|
-
onClick:
|
|
941
|
-
}, " › ", 8,
|
|
942
|
-
e.showFirstLast ? (
|
|
940
|
+
onClick: i[2] || (i[2] = (m) => u(e.page + 1))
|
|
941
|
+
}, " › ", 8, na),
|
|
942
|
+
e.showFirstLast ? (l(), n("button", {
|
|
943
943
|
key: 1,
|
|
944
944
|
class: "page-btn nav-btn",
|
|
945
945
|
disabled: e.page >= e.pageCount,
|
|
946
946
|
"aria-label": "Last page",
|
|
947
|
-
onClick:
|
|
948
|
-
}, " » ", 8,
|
|
947
|
+
onClick: i[3] || (i[3] = (m) => u(e.pageCount))
|
|
948
|
+
}, " » ", 8, oa)) : w("", !0)
|
|
949
949
|
]));
|
|
950
950
|
}
|
|
951
|
-
}),
|
|
951
|
+
}), ia = ["aria-valuenow", "aria-valuemax"], ra = { class: "track" }, Zt = /* @__PURE__ */ v({
|
|
952
952
|
name: "LlmProgress",
|
|
953
953
|
__name: "llm-progress",
|
|
954
954
|
props: {
|
|
@@ -959,30 +959,30 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
959
959
|
indeterminate: { type: Boolean, default: !1 }
|
|
960
960
|
},
|
|
961
961
|
setup(e) {
|
|
962
|
-
const t = e, a =
|
|
962
|
+
const t = e, a = p(() => Math.min(Math.max(t.value, 0), t.max)), o = p(
|
|
963
963
|
() => t.indeterminate ? "100%" : `${a.value / t.max * 100}%`
|
|
964
|
-
),
|
|
964
|
+
), s = p(() => [
|
|
965
965
|
"llm-progress",
|
|
966
966
|
`variant-${t.variant}`,
|
|
967
967
|
`size-${t.size}`,
|
|
968
968
|
t.indeterminate && "is-indeterminate"
|
|
969
969
|
].filter(Boolean));
|
|
970
|
-
return (d, u) => (
|
|
971
|
-
class:
|
|
970
|
+
return (d, u) => (l(), n("div", {
|
|
971
|
+
class: $(s.value),
|
|
972
972
|
role: "progressbar",
|
|
973
973
|
"aria-valuemin": 0,
|
|
974
974
|
"aria-valuenow": e.indeterminate ? void 0 : a.value,
|
|
975
975
|
"aria-valuemax": e.indeterminate ? void 0 : e.max
|
|
976
976
|
}, [
|
|
977
|
-
c("div",
|
|
977
|
+
c("div", ra, [
|
|
978
978
|
c("div", {
|
|
979
979
|
class: "fill",
|
|
980
|
-
style: P({ width:
|
|
980
|
+
style: P({ width: o.value })
|
|
981
981
|
}, null, 4)
|
|
982
982
|
])
|
|
983
|
-
], 10,
|
|
983
|
+
], 10, ia));
|
|
984
984
|
}
|
|
985
|
-
}),
|
|
985
|
+
}), da = { class: "llm-combobox-wrapper" }, ua = ["aria-expanded", "aria-activedescendant", "aria-invalid", "disabled", "readonly", "required", "name", "placeholder", "value"], ca = ["id", "aria-selected", "aria-disabled", "onMousedown", "onMouseenter"], ma = {
|
|
986
986
|
key: 0,
|
|
987
987
|
class: "llm-combobox-check",
|
|
988
988
|
width: "14",
|
|
@@ -990,17 +990,17 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
990
990
|
viewBox: "0 0 14 14",
|
|
991
991
|
fill: "none",
|
|
992
992
|
"aria-hidden": "true"
|
|
993
|
-
},
|
|
993
|
+
}, fa = {
|
|
994
994
|
key: 1,
|
|
995
995
|
class: "llm-combobox-no-results",
|
|
996
996
|
role: "option",
|
|
997
997
|
"aria-disabled": "true"
|
|
998
|
-
},
|
|
998
|
+
}, pa = {
|
|
999
999
|
key: 1,
|
|
1000
1000
|
class: "llm-combobox-errors",
|
|
1001
1001
|
role: "alert",
|
|
1002
1002
|
"aria-live": "polite"
|
|
1003
|
-
},
|
|
1003
|
+
}, Qt = /* @__PURE__ */ v({
|
|
1004
1004
|
name: "LlmCombobox",
|
|
1005
1005
|
__name: "llm-combobox",
|
|
1006
1006
|
props: {
|
|
@@ -1016,108 +1016,108 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1016
1016
|
},
|
|
1017
1017
|
emits: ["update:value"],
|
|
1018
1018
|
setup(e, { emit: t }) {
|
|
1019
|
-
const a = e,
|
|
1019
|
+
const a = e, o = t, s = C(null), d = C(null), u = C(""), r = C(!1), i = C(-1);
|
|
1020
1020
|
let m = Math.random().toString(36).slice(2);
|
|
1021
|
-
const
|
|
1021
|
+
const k = `llm-combobox-input-${m}`, _ = `llm-combobox-panel-${m}`, h = p(
|
|
1022
1022
|
() => a.options.find((D) => D.value === a.value)?.label ?? ""
|
|
1023
|
-
),
|
|
1023
|
+
), g = p(() => {
|
|
1024
1024
|
const D = u.value.toLowerCase();
|
|
1025
|
-
return D ? a.options.filter((
|
|
1026
|
-
}),
|
|
1027
|
-
() =>
|
|
1028
|
-
), f =
|
|
1025
|
+
return D ? a.options.filter((A) => A.label.toLowerCase().includes(D)) : a.options;
|
|
1026
|
+
}), y = p(
|
|
1027
|
+
() => i.value >= 0 ? `${_}-option-${i.value}` : void 0
|
|
1028
|
+
), f = p(() => [
|
|
1029
1029
|
"llm-combobox",
|
|
1030
1030
|
r.value && "is-open",
|
|
1031
1031
|
a.disabled && "is-disabled",
|
|
1032
1032
|
a.invalid && "is-invalid"
|
|
1033
1033
|
]);
|
|
1034
|
-
|
|
1034
|
+
q(
|
|
1035
1035
|
() => a.value,
|
|
1036
1036
|
() => {
|
|
1037
|
-
r.value || (u.value =
|
|
1037
|
+
r.value || (u.value = h.value);
|
|
1038
1038
|
},
|
|
1039
1039
|
{ immediate: !0 }
|
|
1040
1040
|
);
|
|
1041
|
-
function
|
|
1042
|
-
a.disabled || a.readonly || r.value || (r.value = !0,
|
|
1041
|
+
function I() {
|
|
1042
|
+
a.disabled || a.readonly || r.value || (r.value = !0, i.value = -1, document.addEventListener("click", S));
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1045
|
-
r.value && (r.value = !1,
|
|
1044
|
+
function x() {
|
|
1045
|
+
r.value && (r.value = !1, i.value = -1, document.removeEventListener("click", S));
|
|
1046
1046
|
}
|
|
1047
1047
|
function S(D) {
|
|
1048
|
-
d.value?.contains(D.target) || (u.value =
|
|
1048
|
+
d.value?.contains(D.target) || (u.value = h.value, x());
|
|
1049
1049
|
}
|
|
1050
|
-
|
|
1050
|
+
J(() => {
|
|
1051
1051
|
document.removeEventListener("click", S);
|
|
1052
1052
|
});
|
|
1053
|
-
function
|
|
1054
|
-
D.disabled || a.disabled || a.readonly || (
|
|
1053
|
+
function F(D) {
|
|
1054
|
+
D.disabled || a.disabled || a.readonly || (o("update:value", D.value), u.value = D.label, x(), s.value?.focus());
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1057
|
-
const
|
|
1058
|
-
u.value =
|
|
1059
|
-
}
|
|
1060
|
-
function le() {
|
|
1061
|
-
C();
|
|
1056
|
+
function le(D) {
|
|
1057
|
+
const A = D.target.value;
|
|
1058
|
+
u.value = A, i.value = -1, A === "" && o("update:value", ""), r.value || I();
|
|
1062
1059
|
}
|
|
1063
1060
|
function se() {
|
|
1064
|
-
|
|
1061
|
+
I();
|
|
1062
|
+
}
|
|
1063
|
+
function ne() {
|
|
1064
|
+
u.value = h.value;
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1067
|
-
const
|
|
1066
|
+
function oe(D) {
|
|
1067
|
+
const A = g.value;
|
|
1068
1068
|
switch (D.key) {
|
|
1069
1069
|
case "ArrowDown": {
|
|
1070
1070
|
if (D.preventDefault(), !r.value) {
|
|
1071
|
-
|
|
1071
|
+
I();
|
|
1072
1072
|
return;
|
|
1073
1073
|
}
|
|
1074
|
-
const T =
|
|
1075
|
-
|
|
1074
|
+
const T = i.value + 1;
|
|
1075
|
+
i.value = T >= A.length ? 0 : T;
|
|
1076
1076
|
break;
|
|
1077
1077
|
}
|
|
1078
1078
|
case "ArrowUp": {
|
|
1079
1079
|
if (D.preventDefault(), !r.value) {
|
|
1080
|
-
|
|
1080
|
+
I();
|
|
1081
1081
|
return;
|
|
1082
1082
|
}
|
|
1083
|
-
const T =
|
|
1084
|
-
|
|
1083
|
+
const T = i.value - 1;
|
|
1084
|
+
i.value = T < 0 ? A.length - 1 : T;
|
|
1085
1085
|
break;
|
|
1086
1086
|
}
|
|
1087
1087
|
case "Enter": {
|
|
1088
1088
|
D.preventDefault();
|
|
1089
|
-
const T =
|
|
1090
|
-
r.value && T >= 0 && T <
|
|
1089
|
+
const T = i.value;
|
|
1090
|
+
r.value && T >= 0 && T < A.length && F(A[T]);
|
|
1091
1091
|
break;
|
|
1092
1092
|
}
|
|
1093
1093
|
case "Escape": {
|
|
1094
|
-
D.preventDefault(), u.value =
|
|
1094
|
+
D.preventDefault(), u.value = h.value, x();
|
|
1095
1095
|
break;
|
|
1096
1096
|
}
|
|
1097
1097
|
case "Tab": {
|
|
1098
|
-
|
|
1098
|
+
x();
|
|
1099
1099
|
break;
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
|
-
return (D,
|
|
1103
|
+
return (D, A) => (l(), n("div", {
|
|
1104
1104
|
ref_key: "containerRef",
|
|
1105
1105
|
ref: d,
|
|
1106
|
-
class:
|
|
1106
|
+
class: $(f.value)
|
|
1107
1107
|
}, [
|
|
1108
|
-
c("div",
|
|
1108
|
+
c("div", da, [
|
|
1109
1109
|
c("input", {
|
|
1110
1110
|
ref_key: "inputRef",
|
|
1111
|
-
ref:
|
|
1111
|
+
ref: s,
|
|
1112
1112
|
class: "llm-combobox-input",
|
|
1113
1113
|
type: "text",
|
|
1114
1114
|
autocomplete: "off",
|
|
1115
1115
|
role: "combobox",
|
|
1116
|
-
id:
|
|
1116
|
+
id: k,
|
|
1117
1117
|
"aria-expanded": r.value,
|
|
1118
|
-
"aria-controls":
|
|
1118
|
+
"aria-controls": _,
|
|
1119
1119
|
"aria-autocomplete": "list",
|
|
1120
|
-
"aria-activedescendant":
|
|
1120
|
+
"aria-activedescendant": y.value,
|
|
1121
1121
|
"aria-invalid": e.invalid || void 0,
|
|
1122
1122
|
disabled: e.disabled,
|
|
1123
1123
|
readonly: e.readonly,
|
|
@@ -1125,12 +1125,12 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1125
1125
|
name: e.name || void 0,
|
|
1126
1126
|
placeholder: e.placeholder,
|
|
1127
1127
|
value: u.value,
|
|
1128
|
-
onInput:
|
|
1129
|
-
onFocus:
|
|
1130
|
-
onBlur:
|
|
1131
|
-
onKeydown:
|
|
1132
|
-
}, null, 40,
|
|
1133
|
-
|
|
1128
|
+
onInput: le,
|
|
1129
|
+
onFocus: se,
|
|
1130
|
+
onBlur: ne,
|
|
1131
|
+
onKeydown: oe
|
|
1132
|
+
}, null, 40, ua),
|
|
1133
|
+
A[0] || (A[0] = c("span", {
|
|
1134
1134
|
class: "llm-combobox-icon",
|
|
1135
1135
|
"aria-hidden": "true"
|
|
1136
1136
|
}, [
|
|
@@ -1150,30 +1150,30 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1150
1150
|
])
|
|
1151
1151
|
], -1))
|
|
1152
1152
|
]),
|
|
1153
|
-
r.value ? (
|
|
1153
|
+
r.value ? (l(), n("ul", {
|
|
1154
1154
|
key: 0,
|
|
1155
|
-
id:
|
|
1155
|
+
id: _,
|
|
1156
1156
|
class: "llm-combobox-panel",
|
|
1157
1157
|
role: "listbox",
|
|
1158
|
-
"aria-labelledby":
|
|
1158
|
+
"aria-labelledby": k
|
|
1159
1159
|
}, [
|
|
1160
|
-
|
|
1160
|
+
g.value.length > 0 ? (l(!0), n(B, { key: 0 }, z(g.value, (T, K) => (l(), n("li", {
|
|
1161
1161
|
key: T.value,
|
|
1162
|
-
id: `${
|
|
1162
|
+
id: `${_}-option-${K}`,
|
|
1163
1163
|
role: "option",
|
|
1164
|
-
class:
|
|
1164
|
+
class: $([
|
|
1165
1165
|
"llm-combobox-option",
|
|
1166
|
-
|
|
1166
|
+
i.value === K && "is-active",
|
|
1167
1167
|
T.value === e.value && "is-selected",
|
|
1168
1168
|
T.disabled && "is-disabled"
|
|
1169
1169
|
]),
|
|
1170
1170
|
"aria-selected": T.value === e.value,
|
|
1171
1171
|
"aria-disabled": T.disabled || void 0,
|
|
1172
|
-
onMousedown: (
|
|
1173
|
-
onMouseenter: (
|
|
1172
|
+
onMousedown: (ie) => F(T),
|
|
1173
|
+
onMouseenter: (ie) => i.value = K
|
|
1174
1174
|
}, [
|
|
1175
1175
|
c("span", null, L(T.label), 1),
|
|
1176
|
-
T.value === e.value ? (
|
|
1176
|
+
T.value === e.value ? (l(), n("svg", ma, [...A[1] || (A[1] = [
|
|
1177
1177
|
c("path", {
|
|
1178
1178
|
d: "M2 7l4 4 6-7",
|
|
1179
1179
|
stroke: "currentColor",
|
|
@@ -1181,22 +1181,22 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1181
1181
|
"stroke-linecap": "round",
|
|
1182
1182
|
"stroke-linejoin": "round"
|
|
1183
1183
|
}, null, -1)
|
|
1184
|
-
])])) :
|
|
1185
|
-
], 42,
|
|
1186
|
-
])) :
|
|
1187
|
-
e.invalid && e.errors.length > 0 ? (
|
|
1188
|
-
(
|
|
1189
|
-
key:
|
|
1184
|
+
])])) : w("", !0)
|
|
1185
|
+
], 42, ca))), 128)) : (l(), n("li", fa, " No results found. "))
|
|
1186
|
+
])) : w("", !0),
|
|
1187
|
+
e.invalid && e.errors.length > 0 ? (l(), n("div", pa, [
|
|
1188
|
+
(l(!0), n(B, null, z(e.errors, (T, K) => (l(), n("p", {
|
|
1189
|
+
key: K,
|
|
1190
1190
|
class: "llm-combobox-error-message"
|
|
1191
1191
|
}, L(T), 1))), 128))
|
|
1192
|
-
])) :
|
|
1192
|
+
])) : w("", !0)
|
|
1193
1193
|
], 2));
|
|
1194
1194
|
}
|
|
1195
|
-
}),
|
|
1195
|
+
}), va = ["aria-invalid", "aria-required"], ha = {
|
|
1196
1196
|
key: 0,
|
|
1197
1197
|
class: "errors",
|
|
1198
1198
|
role: "alert"
|
|
1199
|
-
},
|
|
1199
|
+
}, ee = /* @__PURE__ */ Symbol("LlmRadioGroup"), Xt = /* @__PURE__ */ v({
|
|
1200
1200
|
name: "LlmRadioGroup",
|
|
1201
1201
|
__name: "llm-radio-group",
|
|
1202
1202
|
props: {
|
|
@@ -1210,8 +1210,8 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1210
1210
|
},
|
|
1211
1211
|
emits: ["update:value"],
|
|
1212
1212
|
setup(e, { emit: t }) {
|
|
1213
|
-
const a = e,
|
|
1214
|
-
H(
|
|
1213
|
+
const a = e, o = t;
|
|
1214
|
+
H(ee, {
|
|
1215
1215
|
get value() {
|
|
1216
1216
|
return a.value ?? "";
|
|
1217
1217
|
},
|
|
@@ -1228,33 +1228,33 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1228
1228
|
return a.invalid ?? !1;
|
|
1229
1229
|
},
|
|
1230
1230
|
onSelect(d) {
|
|
1231
|
-
!a.disabled && !a.readonly &&
|
|
1231
|
+
!a.disabled && !a.readonly && o("update:value", d);
|
|
1232
1232
|
}
|
|
1233
1233
|
});
|
|
1234
|
-
const
|
|
1234
|
+
const s = p(() => [
|
|
1235
1235
|
"llm-radio-group",
|
|
1236
1236
|
a.invalid && "is-invalid",
|
|
1237
1237
|
a.disabled && "is-disabled"
|
|
1238
1238
|
]);
|
|
1239
|
-
return (d, u) => (
|
|
1240
|
-
class:
|
|
1239
|
+
return (d, u) => (l(), n("div", {
|
|
1240
|
+
class: $(s.value),
|
|
1241
1241
|
role: "radiogroup",
|
|
1242
1242
|
"aria-invalid": e.invalid || void 0,
|
|
1243
1243
|
"aria-required": e.required || void 0
|
|
1244
1244
|
}, [
|
|
1245
|
-
|
|
1246
|
-
e.errors.length > 0 ? (
|
|
1247
|
-
(
|
|
1248
|
-
key:
|
|
1245
|
+
b(d.$slots, "default"),
|
|
1246
|
+
e.errors.length > 0 ? (l(), n("div", ha, [
|
|
1247
|
+
(l(!0), n(B, null, z(e.errors, (r, i) => (l(), n("p", {
|
|
1248
|
+
key: i,
|
|
1249
1249
|
class: "error-message"
|
|
1250
1250
|
}, L(r), 1))), 128))
|
|
1251
|
-
])) :
|
|
1252
|
-
], 10,
|
|
1251
|
+
])) : w("", !0)
|
|
1252
|
+
], 10, va));
|
|
1253
1253
|
}
|
|
1254
|
-
}),
|
|
1254
|
+
}), ba = ["name", "value", "checked", "disabled"], ga = {
|
|
1255
1255
|
key: 0,
|
|
1256
1256
|
class: "radio-text"
|
|
1257
|
-
},
|
|
1257
|
+
}, Yt = /* @__PURE__ */ v({
|
|
1258
1258
|
name: "LlmRadio",
|
|
1259
1259
|
__name: "llm-radio",
|
|
1260
1260
|
props: {
|
|
@@ -1262,7 +1262,7 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1262
1262
|
disabled: { type: Boolean, default: !1 }
|
|
1263
1263
|
},
|
|
1264
1264
|
setup(e) {
|
|
1265
|
-
const t = e, a = R(
|
|
1265
|
+
const t = e, a = R(ee, {
|
|
1266
1266
|
value: "",
|
|
1267
1267
|
name: "",
|
|
1268
1268
|
disabled: !1,
|
|
@@ -1270,42 +1270,42 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1270
1270
|
invalid: !1,
|
|
1271
1271
|
onSelect: () => {
|
|
1272
1272
|
}
|
|
1273
|
-
}),
|
|
1273
|
+
}), o = p(() => t.disabled || a.disabled), s = p(() => a.value === t.radioValue), d = p(() => [
|
|
1274
1274
|
"llm-radio",
|
|
1275
|
-
|
|
1276
|
-
|
|
1275
|
+
o.value && "is-disabled",
|
|
1276
|
+
s.value && "is-checked",
|
|
1277
1277
|
a.invalid && "is-invalid"
|
|
1278
1278
|
].filter(Boolean));
|
|
1279
1279
|
function u() {
|
|
1280
|
-
!
|
|
1280
|
+
!o.value && !a.readonly && a.onSelect(t.radioValue);
|
|
1281
1281
|
}
|
|
1282
|
-
return (r,
|
|
1283
|
-
class:
|
|
1282
|
+
return (r, i) => (l(), n("label", {
|
|
1283
|
+
class: $(d.value)
|
|
1284
1284
|
}, [
|
|
1285
1285
|
c("input", {
|
|
1286
1286
|
type: "radio",
|
|
1287
|
-
name:
|
|
1287
|
+
name: M(a).name || void 0,
|
|
1288
1288
|
value: e.radioValue,
|
|
1289
|
-
checked:
|
|
1290
|
-
disabled:
|
|
1289
|
+
checked: s.value,
|
|
1290
|
+
disabled: o.value,
|
|
1291
1291
|
class: "radio-input",
|
|
1292
1292
|
onChange: u
|
|
1293
|
-
}, null, 40,
|
|
1294
|
-
|
|
1293
|
+
}, null, 40, ba),
|
|
1294
|
+
i[0] || (i[0] = c("span", {
|
|
1295
1295
|
class: "radio-indicator",
|
|
1296
1296
|
"aria-hidden": "true"
|
|
1297
1297
|
}, null, -1)),
|
|
1298
|
-
r.$slots.default ? (
|
|
1299
|
-
|
|
1300
|
-
])) :
|
|
1298
|
+
r.$slots.default ? (l(), n("span", ga, [
|
|
1299
|
+
b(r.$slots, "default")
|
|
1300
|
+
])) : w("", !0)
|
|
1301
1301
|
], 2));
|
|
1302
1302
|
}
|
|
1303
|
-
}),
|
|
1303
|
+
}), ya = ["for"], $a = { class: "select-wrapper" }, ka = ["id", "name", "value", "disabled", "required", "aria-invalid", "aria-describedby"], _a = {
|
|
1304
1304
|
key: 0,
|
|
1305
1305
|
value: "",
|
|
1306
1306
|
disabled: "",
|
|
1307
1307
|
hidden: ""
|
|
1308
|
-
},
|
|
1308
|
+
}, wa = ["id"], el = /* @__PURE__ */ v({
|
|
1309
1309
|
name: "LlmSelect",
|
|
1310
1310
|
__name: "llm-select",
|
|
1311
1311
|
props: {
|
|
@@ -1321,56 +1321,56 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1321
1321
|
},
|
|
1322
1322
|
emits: ["update:value"],
|
|
1323
1323
|
setup(e, { emit: t }) {
|
|
1324
|
-
const a = e,
|
|
1324
|
+
const a = e, o = t, s = E(), d = E(), u = p(() => [
|
|
1325
1325
|
"llm-select",
|
|
1326
1326
|
a.invalid && "is-invalid",
|
|
1327
1327
|
a.disabled && "is-disabled"
|
|
1328
1328
|
]);
|
|
1329
|
-
function r(
|
|
1330
|
-
a.readonly || a.disabled ||
|
|
1329
|
+
function r(i) {
|
|
1330
|
+
a.readonly || a.disabled || o("update:value", i.target.value);
|
|
1331
1331
|
}
|
|
1332
|
-
return (
|
|
1333
|
-
class:
|
|
1332
|
+
return (i, m) => (l(), n("div", {
|
|
1333
|
+
class: $(u.value)
|
|
1334
1334
|
}, [
|
|
1335
|
-
e.label ? (
|
|
1335
|
+
e.label ? (l(), n("label", {
|
|
1336
1336
|
key: 0,
|
|
1337
|
-
for:
|
|
1337
|
+
for: M(s),
|
|
1338
1338
|
class: "select-label"
|
|
1339
|
-
}, L(e.label), 9,
|
|
1340
|
-
c("div",
|
|
1339
|
+
}, L(e.label), 9, ya)) : w("", !0),
|
|
1340
|
+
c("div", $a, [
|
|
1341
1341
|
c("select", {
|
|
1342
|
-
id:
|
|
1342
|
+
id: M(s),
|
|
1343
1343
|
name: e.name,
|
|
1344
1344
|
value: e.value,
|
|
1345
1345
|
disabled: e.disabled,
|
|
1346
1346
|
required: e.required,
|
|
1347
1347
|
"aria-invalid": e.invalid || void 0,
|
|
1348
|
-
"aria-describedby": e.errors.length > 0 ?
|
|
1348
|
+
"aria-describedby": e.errors.length > 0 ? M(d) : void 0,
|
|
1349
1349
|
class: "select-native",
|
|
1350
1350
|
onChange: r
|
|
1351
1351
|
}, [
|
|
1352
|
-
e.placeholder ? (
|
|
1353
|
-
|
|
1354
|
-
], 40,
|
|
1352
|
+
e.placeholder ? (l(), n("option", _a, L(e.placeholder), 1)) : w("", !0),
|
|
1353
|
+
b(i.$slots, "default")
|
|
1354
|
+
], 40, ka),
|
|
1355
1355
|
m[0] || (m[0] = c("span", {
|
|
1356
1356
|
class: "select-arrow",
|
|
1357
1357
|
"aria-hidden": "true"
|
|
1358
1358
|
}, "▾", -1))
|
|
1359
1359
|
]),
|
|
1360
|
-
e.errors.length > 0 ? (
|
|
1360
|
+
e.errors.length > 0 ? (l(), n("div", {
|
|
1361
1361
|
key: 1,
|
|
1362
|
-
id:
|
|
1362
|
+
id: M(d),
|
|
1363
1363
|
class: "errors",
|
|
1364
1364
|
role: "alert"
|
|
1365
1365
|
}, [
|
|
1366
|
-
(
|
|
1367
|
-
key:
|
|
1366
|
+
(l(!0), n(B, null, z(e.errors, (k, _) => (l(), n("p", {
|
|
1367
|
+
key: _,
|
|
1368
1368
|
class: "error-message"
|
|
1369
|
-
}, L(
|
|
1370
|
-
], 8,
|
|
1369
|
+
}, L(k), 1))), 128))
|
|
1370
|
+
], 8, wa)) : w("", !0)
|
|
1371
1371
|
], 2));
|
|
1372
1372
|
}
|
|
1373
|
-
}),
|
|
1373
|
+
}), La = ["value", "disabled"], al = /* @__PURE__ */ v({
|
|
1374
1374
|
name: "LlmOption",
|
|
1375
1375
|
__name: "llm-option",
|
|
1376
1376
|
props: {
|
|
@@ -1378,14 +1378,14 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1378
1378
|
disabled: { type: Boolean, default: !1 }
|
|
1379
1379
|
},
|
|
1380
1380
|
setup(e) {
|
|
1381
|
-
return (t, a) => (
|
|
1381
|
+
return (t, a) => (l(), n("option", {
|
|
1382
1382
|
value: e.optionValue,
|
|
1383
1383
|
disabled: e.disabled
|
|
1384
1384
|
}, [
|
|
1385
|
-
|
|
1386
|
-
], 8,
|
|
1385
|
+
b(t.$slots, "default")
|
|
1386
|
+
], 8, La));
|
|
1387
1387
|
}
|
|
1388
|
-
}),
|
|
1388
|
+
}), tl = /* @__PURE__ */ v({
|
|
1389
1389
|
name: "LlmSkeleton",
|
|
1390
1390
|
__name: "llm-skeleton",
|
|
1391
1391
|
props: {
|
|
@@ -1409,44 +1409,44 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1409
1409
|
return "1em";
|
|
1410
1410
|
}
|
|
1411
1411
|
}
|
|
1412
|
-
const
|
|
1412
|
+
const o = p(() => [
|
|
1413
1413
|
"llm-skeleton",
|
|
1414
1414
|
`variant-${t.variant}`,
|
|
1415
1415
|
t.animated && "is-animated"
|
|
1416
|
-
].filter(Boolean)),
|
|
1416
|
+
].filter(Boolean)), s = p(() => ({
|
|
1417
1417
|
width: t.width,
|
|
1418
1418
|
height: a(t.variant, t.width, t.height)
|
|
1419
1419
|
}));
|
|
1420
|
-
return (d, u) => (
|
|
1421
|
-
class:
|
|
1422
|
-
style: P(
|
|
1420
|
+
return (d, u) => (l(), n("div", {
|
|
1421
|
+
class: $(o.value),
|
|
1422
|
+
style: P(s.value),
|
|
1423
1423
|
"aria-hidden": "true"
|
|
1424
1424
|
}, null, 6));
|
|
1425
1425
|
}
|
|
1426
|
-
}),
|
|
1426
|
+
}), xa = {
|
|
1427
1427
|
class: "stepper-header",
|
|
1428
1428
|
role: "tablist"
|
|
1429
|
-
},
|
|
1429
|
+
}, Ca = ["id", "aria-label", "aria-selected", "aria-controls", "aria-disabled", "tabindex", "disabled", "onClick"], Ba = {
|
|
1430
1430
|
key: 0,
|
|
1431
1431
|
width: "14",
|
|
1432
1432
|
height: "14",
|
|
1433
1433
|
viewBox: "0 0 14 14",
|
|
1434
1434
|
fill: "none",
|
|
1435
1435
|
"aria-hidden": "true"
|
|
1436
|
-
},
|
|
1436
|
+
}, Ia = {
|
|
1437
1437
|
key: 1,
|
|
1438
1438
|
width: "14",
|
|
1439
1439
|
height: "14",
|
|
1440
1440
|
viewBox: "0 0 14 14",
|
|
1441
1441
|
fill: "none",
|
|
1442
1442
|
"aria-hidden": "true"
|
|
1443
|
-
},
|
|
1443
|
+
}, Ta = { class: "step-text" }, Da = { class: "step-label" }, Sa = {
|
|
1444
1444
|
key: 0,
|
|
1445
1445
|
class: "step-description"
|
|
1446
|
-
},
|
|
1446
|
+
}, Ma = {
|
|
1447
1447
|
key: 1,
|
|
1448
1448
|
class: "step-optional"
|
|
1449
|
-
},
|
|
1449
|
+
}, Aa = { class: "stepper-content" }, ae = /* @__PURE__ */ Symbol("LlmStepper"), ll = /* @__PURE__ */ v({
|
|
1450
1450
|
name: "LlmStepper",
|
|
1451
1451
|
__name: "llm-stepper",
|
|
1452
1452
|
props: {
|
|
@@ -1456,61 +1456,61 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1456
1456
|
},
|
|
1457
1457
|
emits: ["update:activeStep"],
|
|
1458
1458
|
setup(e, { emit: t }) {
|
|
1459
|
-
const a = e,
|
|
1460
|
-
|
|
1459
|
+
const a = e, o = t, s = C(a.activeStep), d = C([]), u = p(() => a.linear);
|
|
1460
|
+
q(
|
|
1461
1461
|
() => a.activeStep,
|
|
1462
1462
|
(f) => {
|
|
1463
|
-
|
|
1463
|
+
s.value = f;
|
|
1464
1464
|
}
|
|
1465
1465
|
);
|
|
1466
1466
|
function r(f) {
|
|
1467
1467
|
d.value.push(f);
|
|
1468
1468
|
}
|
|
1469
|
-
function
|
|
1470
|
-
d.value = d.value.filter((
|
|
1469
|
+
function i(f) {
|
|
1470
|
+
d.value = d.value.filter((I) => I.id !== f);
|
|
1471
1471
|
}
|
|
1472
|
-
function m(f,
|
|
1473
|
-
const
|
|
1474
|
-
|
|
1472
|
+
function m(f, I) {
|
|
1473
|
+
const x = d.value.findIndex((S) => S.id === f);
|
|
1474
|
+
x !== -1 && (d.value[x] = { ...d.value[x], ...I });
|
|
1475
1475
|
}
|
|
1476
|
-
function
|
|
1477
|
-
f < 0 || f >= d.value.length || d.value[f].disabled || a.linear && f >
|
|
1476
|
+
function k(f) {
|
|
1477
|
+
f < 0 || f >= d.value.length || d.value[f].disabled || a.linear && f > s.value && !d.value.slice(0, f).every((x) => x.completed || x.optional) || (s.value = f, o("update:activeStep", f));
|
|
1478
1478
|
}
|
|
1479
|
-
function
|
|
1480
|
-
|
|
1479
|
+
function _() {
|
|
1480
|
+
k(s.value + 1);
|
|
1481
1481
|
}
|
|
1482
|
-
function
|
|
1483
|
-
const f =
|
|
1484
|
-
f >= 0 && !d.value[f]?.disabled && (
|
|
1482
|
+
function h() {
|
|
1483
|
+
const f = s.value - 1;
|
|
1484
|
+
f >= 0 && !d.value[f]?.disabled && (s.value = f, o("update:activeStep", f));
|
|
1485
1485
|
}
|
|
1486
|
-
H(
|
|
1487
|
-
activeStep:
|
|
1486
|
+
H(ae, {
|
|
1487
|
+
activeStep: s,
|
|
1488
1488
|
steps: d,
|
|
1489
1489
|
linear: u,
|
|
1490
1490
|
registerStep: r,
|
|
1491
|
-
unregisterStep:
|
|
1491
|
+
unregisterStep: i,
|
|
1492
1492
|
updateStep: m,
|
|
1493
|
-
goTo:
|
|
1494
|
-
next:
|
|
1495
|
-
prev:
|
|
1493
|
+
goTo: k,
|
|
1494
|
+
next: _,
|
|
1495
|
+
prev: h
|
|
1496
1496
|
});
|
|
1497
|
-
const
|
|
1498
|
-
function
|
|
1499
|
-
return
|
|
1497
|
+
const g = p(() => ["llm-stepper", `orientation-${a.orientation}`]);
|
|
1498
|
+
function y(f) {
|
|
1499
|
+
return s.value > f || d.value[f]?.completed;
|
|
1500
1500
|
}
|
|
1501
|
-
return (f,
|
|
1502
|
-
class: g
|
|
1501
|
+
return (f, I) => (l(), n("div", {
|
|
1502
|
+
class: $(g.value)
|
|
1503
1503
|
}, [
|
|
1504
|
-
c("div",
|
|
1505
|
-
(
|
|
1506
|
-
key:
|
|
1504
|
+
c("div", xa, [
|
|
1505
|
+
(l(!0), n(B, null, z(d.value, (x, S) => (l(), n(B, {
|
|
1506
|
+
key: x.id
|
|
1507
1507
|
}, [
|
|
1508
1508
|
c("div", {
|
|
1509
|
-
class:
|
|
1510
|
-
"is-active":
|
|
1511
|
-
"is-completed":
|
|
1512
|
-
"is-error":
|
|
1513
|
-
"is-disabled":
|
|
1509
|
+
class: $(["step-item", {
|
|
1510
|
+
"is-active": s.value === S,
|
|
1511
|
+
"is-completed": x.completed && s.value !== S,
|
|
1512
|
+
"is-error": x.error,
|
|
1513
|
+
"is-disabled": x.disabled
|
|
1514
1514
|
}])
|
|
1515
1515
|
}, [
|
|
1516
1516
|
c("button", {
|
|
@@ -1518,15 +1518,15 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1518
1518
|
role: "tab",
|
|
1519
1519
|
class: "step-circle",
|
|
1520
1520
|
id: `llm-step-${S}`,
|
|
1521
|
-
"aria-label":
|
|
1522
|
-
"aria-selected":
|
|
1521
|
+
"aria-label": x.label,
|
|
1522
|
+
"aria-selected": s.value === S,
|
|
1523
1523
|
"aria-controls": `llm-step-panel-${S}`,
|
|
1524
|
-
"aria-disabled":
|
|
1525
|
-
tabindex:
|
|
1526
|
-
disabled:
|
|
1527
|
-
onClick: (
|
|
1524
|
+
"aria-disabled": x.disabled || void 0,
|
|
1525
|
+
tabindex: s.value === S ? 0 : -1,
|
|
1526
|
+
disabled: x.disabled || void 0,
|
|
1527
|
+
onClick: (F) => k(S)
|
|
1528
1528
|
}, [
|
|
1529
|
-
|
|
1529
|
+
x.completed && !x.error ? (l(), n("svg", Ba, [...I[0] || (I[0] = [
|
|
1530
1530
|
c("path", {
|
|
1531
1531
|
d: "M2 7L5.5 10.5L12 3.5",
|
|
1532
1532
|
stroke: "currentColor",
|
|
@@ -1534,35 +1534,35 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1534
1534
|
"stroke-linecap": "round",
|
|
1535
1535
|
"stroke-linejoin": "round"
|
|
1536
1536
|
}, null, -1)
|
|
1537
|
-
])])) :
|
|
1537
|
+
])])) : x.error ? (l(), n("svg", Ia, [...I[1] || (I[1] = [
|
|
1538
1538
|
c("path", {
|
|
1539
1539
|
d: "M3 3L11 11M11 3L3 11",
|
|
1540
1540
|
stroke: "currentColor",
|
|
1541
1541
|
"stroke-width": "2",
|
|
1542
1542
|
"stroke-linecap": "round"
|
|
1543
1543
|
}, null, -1)
|
|
1544
|
-
])])) : (
|
|
1545
|
-
|
|
1544
|
+
])])) : (l(), n(B, { key: 2 }, [
|
|
1545
|
+
j(L(S + 1), 1)
|
|
1546
1546
|
], 64))
|
|
1547
|
-
], 8,
|
|
1548
|
-
c("div",
|
|
1549
|
-
c("span",
|
|
1550
|
-
|
|
1551
|
-
|
|
1547
|
+
], 8, Ca),
|
|
1548
|
+
c("div", Ta, [
|
|
1549
|
+
c("span", Da, L(x.label), 1),
|
|
1550
|
+
x.description ? (l(), n("span", Sa, L(x.description), 1)) : w("", !0),
|
|
1551
|
+
x.optional && !x.completed ? (l(), n("span", Ma, "Optional")) : w("", !0)
|
|
1552
1552
|
])
|
|
1553
1553
|
], 2),
|
|
1554
|
-
S < d.value.length - 1 ? (
|
|
1554
|
+
S < d.value.length - 1 ? (l(), n("div", {
|
|
1555
1555
|
key: 0,
|
|
1556
|
-
class:
|
|
1557
|
-
}, null, 2)) :
|
|
1556
|
+
class: $(["step-connector", { "is-active": y(S) }])
|
|
1557
|
+
}, null, 2)) : w("", !0)
|
|
1558
1558
|
], 64))), 128))
|
|
1559
1559
|
]),
|
|
1560
|
-
c("div",
|
|
1561
|
-
|
|
1560
|
+
c("div", Aa, [
|
|
1561
|
+
b(f.$slots, "default")
|
|
1562
1562
|
])
|
|
1563
1563
|
], 2));
|
|
1564
1564
|
}
|
|
1565
|
-
}),
|
|
1565
|
+
}), za = ["id", "aria-labelledby", "hidden"], sl = /* @__PURE__ */ v({
|
|
1566
1566
|
name: "LlmStep",
|
|
1567
1567
|
__name: "llm-step",
|
|
1568
1568
|
props: {
|
|
@@ -1574,10 +1574,10 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1574
1574
|
disabled: { type: Boolean, default: !1 }
|
|
1575
1575
|
},
|
|
1576
1576
|
setup(e) {
|
|
1577
|
-
const t = e, a = R(
|
|
1578
|
-
|
|
1577
|
+
const t = e, a = R(ae), o = E();
|
|
1578
|
+
O(() => {
|
|
1579
1579
|
a.registerStep({
|
|
1580
|
-
id:
|
|
1580
|
+
id: o,
|
|
1581
1581
|
label: t.label,
|
|
1582
1582
|
description: t.description,
|
|
1583
1583
|
completed: t.completed,
|
|
@@ -1585,9 +1585,9 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1585
1585
|
optional: t.optional,
|
|
1586
1586
|
disabled: t.disabled
|
|
1587
1587
|
});
|
|
1588
|
-
}),
|
|
1589
|
-
a.unregisterStep(
|
|
1590
|
-
}),
|
|
1588
|
+
}), G(() => {
|
|
1589
|
+
a.unregisterStep(o);
|
|
1590
|
+
}), q(
|
|
1591
1591
|
() => ({
|
|
1592
1592
|
label: t.label,
|
|
1593
1593
|
description: t.description,
|
|
@@ -1597,22 +1597,22 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1597
1597
|
disabled: t.disabled
|
|
1598
1598
|
}),
|
|
1599
1599
|
(u) => {
|
|
1600
|
-
a.updateStep(
|
|
1600
|
+
a.updateStep(o, u);
|
|
1601
1601
|
}
|
|
1602
1602
|
);
|
|
1603
|
-
const
|
|
1604
|
-
return (u, r) =>
|
|
1603
|
+
const s = p(() => a.steps.value.findIndex((u) => u.id === o)), d = p(() => s.value === a.activeStep.value);
|
|
1604
|
+
return (u, r) => s.value >= 0 ? (l(), n("div", {
|
|
1605
1605
|
key: 0,
|
|
1606
|
-
id: `llm-step-panel-${
|
|
1606
|
+
id: `llm-step-panel-${s.value}`,
|
|
1607
1607
|
role: "tabpanel",
|
|
1608
|
-
"aria-labelledby": `llm-step-${
|
|
1608
|
+
"aria-labelledby": `llm-step-${s.value}`,
|
|
1609
1609
|
hidden: !d.value,
|
|
1610
1610
|
tabindex: "0"
|
|
1611
1611
|
}, [
|
|
1612
|
-
|
|
1613
|
-
], 8,
|
|
1612
|
+
b(u.$slots, "default")
|
|
1613
|
+
], 8, za)) : w("", !0);
|
|
1614
1614
|
}
|
|
1615
|
-
}),
|
|
1615
|
+
}), Ra = { class: "llm-table-wrapper" }, nl = /* @__PURE__ */ v({
|
|
1616
1616
|
name: "LlmTable",
|
|
1617
1617
|
__name: "llm-table",
|
|
1618
1618
|
props: {
|
|
@@ -1621,31 +1621,31 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1621
1621
|
stickyHeader: { type: Boolean, default: !1 }
|
|
1622
1622
|
},
|
|
1623
1623
|
setup(e) {
|
|
1624
|
-
const t = e, a =
|
|
1624
|
+
const t = e, a = p(() => [
|
|
1625
1625
|
"llm-table",
|
|
1626
1626
|
`variant-${t.variant}`,
|
|
1627
1627
|
`size-${t.size}`,
|
|
1628
1628
|
t.stickyHeader && "is-sticky-header"
|
|
1629
1629
|
]);
|
|
1630
|
-
return (
|
|
1631
|
-
class:
|
|
1630
|
+
return (o, s) => (l(), n("div", {
|
|
1631
|
+
class: $(a.value)
|
|
1632
1632
|
}, [
|
|
1633
|
-
c("div",
|
|
1633
|
+
c("div", Ra, [
|
|
1634
1634
|
c("table", null, [
|
|
1635
|
-
|
|
1635
|
+
b(o.$slots, "default")
|
|
1636
1636
|
])
|
|
1637
1637
|
])
|
|
1638
1638
|
], 2));
|
|
1639
1639
|
}
|
|
1640
|
-
}),
|
|
1640
|
+
}), ol = /* @__PURE__ */ v({
|
|
1641
1641
|
name: "LlmThead",
|
|
1642
1642
|
__name: "llm-thead",
|
|
1643
1643
|
setup(e) {
|
|
1644
|
-
return (t, a) => (
|
|
1645
|
-
|
|
1644
|
+
return (t, a) => (l(), n("thead", null, [
|
|
1645
|
+
b(t.$slots, "default")
|
|
1646
1646
|
]));
|
|
1647
1647
|
}
|
|
1648
|
-
}), qa = { key: 1 },
|
|
1648
|
+
}), qa = { key: 1 }, Ha = ["colspan"], il = /* @__PURE__ */ v({
|
|
1649
1649
|
name: "LlmTbody",
|
|
1650
1650
|
__name: "llm-tbody",
|
|
1651
1651
|
props: {
|
|
@@ -1653,21 +1653,21 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1653
1653
|
colSpan: { default: 1 }
|
|
1654
1654
|
},
|
|
1655
1655
|
setup(e) {
|
|
1656
|
-
return (t, a) => (
|
|
1657
|
-
e.empty ? (
|
|
1656
|
+
return (t, a) => (l(), n("tbody", null, [
|
|
1657
|
+
e.empty ? (l(), n("tr", qa, [
|
|
1658
1658
|
c("td", {
|
|
1659
1659
|
colspan: e.colSpan,
|
|
1660
1660
|
class: "llm-tbody-empty-cell"
|
|
1661
1661
|
}, [
|
|
1662
|
-
|
|
1663
|
-
], 8,
|
|
1664
|
-
])) :
|
|
1662
|
+
b(t.$slots, "empty")
|
|
1663
|
+
], 8, Ha)
|
|
1664
|
+
])) : b(t.$slots, "default", { key: 0 })
|
|
1665
1665
|
]));
|
|
1666
1666
|
}
|
|
1667
|
-
}),
|
|
1667
|
+
}), Ea = ["aria-selected"], Oa = {
|
|
1668
1668
|
key: 0,
|
|
1669
1669
|
class: "llm-tr-select-cell"
|
|
1670
|
-
},
|
|
1670
|
+
}, rl = /* @__PURE__ */ v({
|
|
1671
1671
|
name: "LlmTr",
|
|
1672
1672
|
__name: "llm-tr",
|
|
1673
1673
|
props: {
|
|
@@ -1677,20 +1677,20 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1677
1677
|
emits: ["update:selected"],
|
|
1678
1678
|
setup(e, { emit: t }) {
|
|
1679
1679
|
const a = t;
|
|
1680
|
-
return (
|
|
1680
|
+
return (o, s) => (l(), n("tr", {
|
|
1681
1681
|
"aria-selected": e.selectable ? e.selected : void 0,
|
|
1682
|
-
class:
|
|
1682
|
+
class: $({ "is-selected": e.selected })
|
|
1683
1683
|
}, [
|
|
1684
|
-
e.selectable ? (
|
|
1685
|
-
|
|
1684
|
+
e.selectable ? (l(), n("td", Oa, [
|
|
1685
|
+
ue(qe, {
|
|
1686
1686
|
checked: e.selected,
|
|
1687
|
-
"onUpdate:checked":
|
|
1687
|
+
"onUpdate:checked": s[0] || (s[0] = (d) => a("update:selected", d))
|
|
1688
1688
|
}, null, 8, ["checked"])
|
|
1689
|
-
])) :
|
|
1690
|
-
|
|
1691
|
-
], 10,
|
|
1689
|
+
])) : w("", !0),
|
|
1690
|
+
b(o.$slots, "default")
|
|
1691
|
+
], 10, Ea));
|
|
1692
1692
|
}
|
|
1693
|
-
}),
|
|
1693
|
+
}), Ka = ["aria-sort"], dl = /* @__PURE__ */ v({
|
|
1694
1694
|
name: "LlmTh",
|
|
1695
1695
|
__name: "llm-th",
|
|
1696
1696
|
props: {
|
|
@@ -1701,34 +1701,34 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1701
1701
|
},
|
|
1702
1702
|
emits: ["sort"],
|
|
1703
1703
|
setup(e, { emit: t }) {
|
|
1704
|
-
const a = e,
|
|
1704
|
+
const a = e, o = t, s = p(
|
|
1705
1705
|
() => [
|
|
1706
1706
|
`align-${a.align}`,
|
|
1707
1707
|
a.sortDirection && "is-sorted",
|
|
1708
1708
|
a.sortDirection === "asc" && "sort-asc",
|
|
1709
1709
|
a.sortDirection === "desc" && "sort-desc"
|
|
1710
1710
|
].filter(Boolean)
|
|
1711
|
-
), d =
|
|
1711
|
+
), d = p(() => {
|
|
1712
1712
|
if (a.sortable)
|
|
1713
1713
|
return a.sortDirection === "asc" ? "ascending" : a.sortDirection === "desc" ? "descending" : "none";
|
|
1714
1714
|
});
|
|
1715
1715
|
function u() {
|
|
1716
1716
|
const r = a.sortDirection === null ? "asc" : a.sortDirection === "asc" ? "desc" : null;
|
|
1717
|
-
|
|
1717
|
+
o("sort", r);
|
|
1718
1718
|
}
|
|
1719
|
-
return (r,
|
|
1720
|
-
class:
|
|
1719
|
+
return (r, i) => (l(), n("th", {
|
|
1720
|
+
class: $(s.value),
|
|
1721
1721
|
"aria-sort": d.value,
|
|
1722
1722
|
style: P(e.width ? { width: e.width } : void 0)
|
|
1723
1723
|
}, [
|
|
1724
|
-
e.sortable ? (
|
|
1724
|
+
e.sortable ? (l(), n("button", {
|
|
1725
1725
|
key: 0,
|
|
1726
1726
|
type: "button",
|
|
1727
1727
|
class: "llm-th-sort-btn",
|
|
1728
1728
|
onClick: u
|
|
1729
1729
|
}, [
|
|
1730
|
-
|
|
1731
|
-
|
|
1730
|
+
b(r.$slots, "default"),
|
|
1731
|
+
i[0] || (i[0] = c("svg", {
|
|
1732
1732
|
class: "llm-th-sort-icon",
|
|
1733
1733
|
"aria-hidden": "true",
|
|
1734
1734
|
width: "12",
|
|
@@ -1747,24 +1747,24 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1747
1747
|
fill: "currentColor"
|
|
1748
1748
|
})
|
|
1749
1749
|
], -1))
|
|
1750
|
-
])) :
|
|
1751
|
-
], 14,
|
|
1750
|
+
])) : b(r.$slots, "default", { key: 1 })
|
|
1751
|
+
], 14, Ka));
|
|
1752
1752
|
}
|
|
1753
|
-
}),
|
|
1753
|
+
}), ul = /* @__PURE__ */ v({
|
|
1754
1754
|
name: "LlmTd",
|
|
1755
1755
|
__name: "llm-td",
|
|
1756
1756
|
props: {
|
|
1757
1757
|
align: { default: "start" }
|
|
1758
1758
|
},
|
|
1759
1759
|
setup(e) {
|
|
1760
|
-
const t = e, a =
|
|
1761
|
-
return (
|
|
1762
|
-
class:
|
|
1760
|
+
const t = e, a = p(() => [`align-${t.align}`]);
|
|
1761
|
+
return (o, s) => (l(), n("td", {
|
|
1762
|
+
class: $(a.value)
|
|
1763
1763
|
}, [
|
|
1764
|
-
|
|
1764
|
+
b(o.$slots, "default")
|
|
1765
1765
|
], 2));
|
|
1766
1766
|
}
|
|
1767
|
-
}),
|
|
1767
|
+
}), ja = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"], Ga = { class: "tab-panels" }, te = /* @__PURE__ */ Symbol("LlmTabGroup"), cl = /* @__PURE__ */ v({
|
|
1768
1768
|
name: "LlmTabGroup",
|
|
1769
1769
|
__name: "llm-tab-group",
|
|
1770
1770
|
props: {
|
|
@@ -1773,75 +1773,75 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1773
1773
|
},
|
|
1774
1774
|
emits: ["update:selectedIndex"],
|
|
1775
1775
|
setup(e, { emit: t }) {
|
|
1776
|
-
const a = e,
|
|
1777
|
-
|
|
1776
|
+
const a = e, o = t, s = C(a.selectedIndex), d = C([]);
|
|
1777
|
+
q(
|
|
1778
1778
|
() => a.selectedIndex,
|
|
1779
|
-
(
|
|
1780
|
-
|
|
1779
|
+
(h) => {
|
|
1780
|
+
s.value = h;
|
|
1781
1781
|
}
|
|
1782
1782
|
);
|
|
1783
|
-
function u(
|
|
1784
|
-
d.value.push(
|
|
1783
|
+
function u(h) {
|
|
1784
|
+
d.value.push(h);
|
|
1785
1785
|
}
|
|
1786
|
-
function r(
|
|
1787
|
-
d.value = d.value.filter((
|
|
1786
|
+
function r(h) {
|
|
1787
|
+
d.value = d.value.filter((g) => g.id !== h);
|
|
1788
1788
|
}
|
|
1789
|
-
function
|
|
1790
|
-
|
|
1789
|
+
function i(h) {
|
|
1790
|
+
s.value = h, o("update:selectedIndex", h);
|
|
1791
1791
|
}
|
|
1792
|
-
H(
|
|
1793
|
-
selectedIndex:
|
|
1792
|
+
H(te, {
|
|
1793
|
+
selectedIndex: s,
|
|
1794
1794
|
tabs: d,
|
|
1795
1795
|
registerTab: u,
|
|
1796
1796
|
unregisterTab: r,
|
|
1797
|
-
selectTab:
|
|
1797
|
+
selectTab: i
|
|
1798
1798
|
});
|
|
1799
|
-
function m(
|
|
1800
|
-
const
|
|
1801
|
-
if (
|
|
1802
|
-
|
|
1803
|
-
const f =
|
|
1804
|
-
f !== void 0 &&
|
|
1805
|
-
} else if (
|
|
1806
|
-
|
|
1807
|
-
const f =
|
|
1808
|
-
f !== void 0 &&
|
|
1809
|
-
} else if (
|
|
1810
|
-
|
|
1811
|
-
else if (
|
|
1812
|
-
|
|
1813
|
-
const f =
|
|
1814
|
-
f !== void 0 &&
|
|
1799
|
+
function m(h) {
|
|
1800
|
+
const g = d.value.map((f, I) => ({ i: I, disabled: f.disabled })).filter((f) => !f.disabled).map((f) => f.i), y = g.indexOf(s.value);
|
|
1801
|
+
if (h.key === "ArrowRight") {
|
|
1802
|
+
h.preventDefault();
|
|
1803
|
+
const f = g[(y + 1) % g.length];
|
|
1804
|
+
f !== void 0 && i(f);
|
|
1805
|
+
} else if (h.key === "ArrowLeft") {
|
|
1806
|
+
h.preventDefault();
|
|
1807
|
+
const f = g[(y - 1 + g.length) % g.length];
|
|
1808
|
+
f !== void 0 && i(f);
|
|
1809
|
+
} else if (h.key === "Home")
|
|
1810
|
+
h.preventDefault(), g[0] !== void 0 && i(g[0]);
|
|
1811
|
+
else if (h.key === "End") {
|
|
1812
|
+
h.preventDefault();
|
|
1813
|
+
const f = g[g.length - 1];
|
|
1814
|
+
f !== void 0 && i(f);
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
|
-
const
|
|
1818
|
-
return (
|
|
1819
|
-
class:
|
|
1817
|
+
const k = `llm-tab-group-${Math.random().toString(36).slice(2, 9)}`, _ = p(() => ["llm-tab-group", `variant-${a.variant}`]);
|
|
1818
|
+
return (h, g) => (l(), n("div", {
|
|
1819
|
+
class: $(_.value)
|
|
1820
1820
|
}, [
|
|
1821
1821
|
c("div", {
|
|
1822
1822
|
class: "tablist",
|
|
1823
1823
|
role: "tablist",
|
|
1824
1824
|
onKeydown: m
|
|
1825
1825
|
}, [
|
|
1826
|
-
(
|
|
1827
|
-
key:
|
|
1826
|
+
(l(!0), n(B, null, z(d.value, (y, f) => (l(), n("button", {
|
|
1827
|
+
key: y.id,
|
|
1828
1828
|
role: "tab",
|
|
1829
|
-
id: `${
|
|
1830
|
-
"aria-selected": f ===
|
|
1831
|
-
"aria-controls": `${
|
|
1832
|
-
tabindex: f ===
|
|
1833
|
-
disabled:
|
|
1834
|
-
class:
|
|
1829
|
+
id: `${k}-tab-${f}`,
|
|
1830
|
+
"aria-selected": f === s.value,
|
|
1831
|
+
"aria-controls": `${k}-panel-${f}`,
|
|
1832
|
+
tabindex: f === s.value ? 0 : -1,
|
|
1833
|
+
disabled: y.disabled,
|
|
1834
|
+
class: $(["tab-button", f === s.value && "is-active", y.disabled && "is-disabled"]),
|
|
1835
1835
|
type: "button",
|
|
1836
|
-
onClick: (
|
|
1837
|
-
}, L(
|
|
1836
|
+
onClick: (I) => !y.disabled && i(f)
|
|
1837
|
+
}, L(y.label), 11, ja))), 128))
|
|
1838
1838
|
], 32),
|
|
1839
|
-
c("div",
|
|
1840
|
-
h
|
|
1839
|
+
c("div", Ga, [
|
|
1840
|
+
b(h.$slots, "default", { groupId: k })
|
|
1841
1841
|
])
|
|
1842
1842
|
], 2));
|
|
1843
1843
|
}
|
|
1844
|
-
}),
|
|
1844
|
+
}), Pa = ["hidden"], ml = /* @__PURE__ */ v({
|
|
1845
1845
|
name: "LlmTab",
|
|
1846
1846
|
__name: "llm-tab",
|
|
1847
1847
|
props: {
|
|
@@ -1849,15 +1849,15 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1849
1849
|
disabled: { type: Boolean, default: !1 }
|
|
1850
1850
|
},
|
|
1851
1851
|
setup(e) {
|
|
1852
|
-
const t = e, a = R(
|
|
1853
|
-
|
|
1854
|
-
a.registerTab({ id:
|
|
1855
|
-
}),
|
|
1856
|
-
a.unregisterTab(
|
|
1852
|
+
const t = e, a = R(te), o = E();
|
|
1853
|
+
O(() => {
|
|
1854
|
+
a.registerTab({ id: o, label: t.label, disabled: t.disabled });
|
|
1855
|
+
}), G(() => {
|
|
1856
|
+
a.unregisterTab(o);
|
|
1857
1857
|
});
|
|
1858
|
-
const
|
|
1859
|
-
return
|
|
1860
|
-
}), (u, r) =>
|
|
1858
|
+
const s = p(() => a.tabs.value.findIndex((u) => u.id === o)), d = p(() => s.value === a.selectedIndex.value);
|
|
1859
|
+
return p(() => {
|
|
1860
|
+
}), (u, r) => s.value >= 0 ? (l(), n("div", {
|
|
1861
1861
|
key: 0,
|
|
1862
1862
|
role: "tabpanel",
|
|
1863
1863
|
hidden: !d.value,
|
|
@@ -1865,14 +1865,14 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1865
1865
|
"aria-labelledby": void 0,
|
|
1866
1866
|
tabindex: "0"
|
|
1867
1867
|
}, [
|
|
1868
|
-
|
|
1869
|
-
], 8,
|
|
1868
|
+
b(u.$slots, "default")
|
|
1869
|
+
], 8, Pa)) : w("", !0);
|
|
1870
1870
|
}
|
|
1871
|
-
}), Fa = ["for"],
|
|
1871
|
+
}), Fa = ["for"], Va = { class: "textarea-field" }, Na = ["id", "value", "rows", "placeholder", "disabled", "readonly", "required", "name", "aria-invalid"], Ua = {
|
|
1872
1872
|
key: 1,
|
|
1873
1873
|
class: "errors",
|
|
1874
1874
|
"aria-live": "polite"
|
|
1875
|
-
},
|
|
1875
|
+
}, fl = /* @__PURE__ */ v({
|
|
1876
1876
|
name: "LlmTextarea",
|
|
1877
1877
|
__name: "llm-textarea",
|
|
1878
1878
|
props: {
|
|
@@ -1891,29 +1891,29 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1891
1891
|
},
|
|
1892
1892
|
emits: ["update:value"],
|
|
1893
1893
|
setup(e, { emit: t }) {
|
|
1894
|
-
const a = e,
|
|
1894
|
+
const a = e, o = t, s = C(null), d = p(() => a.id || (a.label ? `textarea-${Math.random().toString(36).slice(2)}` : void 0));
|
|
1895
1895
|
function u() {
|
|
1896
|
-
a.autoResize &&
|
|
1896
|
+
a.autoResize && s.value && (s.value.style.height = "auto", s.value.style.height = `${s.value.scrollHeight}px`);
|
|
1897
1897
|
}
|
|
1898
|
-
|
|
1899
|
-
await
|
|
1900
|
-
}),
|
|
1901
|
-
function r(
|
|
1902
|
-
|
|
1898
|
+
q(() => a.value, async () => {
|
|
1899
|
+
await ce(), u();
|
|
1900
|
+
}), O(() => u());
|
|
1901
|
+
function r(i) {
|
|
1902
|
+
o("update:value", i.target.value), u();
|
|
1903
1903
|
}
|
|
1904
|
-
return (
|
|
1905
|
-
class:
|
|
1904
|
+
return (i, m) => (l(), n("div", {
|
|
1905
|
+
class: $(["llm-textarea", { "is-invalid": e.invalid, "is-disabled": e.disabled }])
|
|
1906
1906
|
}, [
|
|
1907
|
-
e.label ? (
|
|
1907
|
+
e.label ? (l(), n("label", {
|
|
1908
1908
|
key: 0,
|
|
1909
1909
|
for: d.value,
|
|
1910
1910
|
class: "textarea-label"
|
|
1911
|
-
}, L(e.label), 9, Fa)) :
|
|
1912
|
-
c("div",
|
|
1911
|
+
}, L(e.label), 9, Fa)) : w("", !0),
|
|
1912
|
+
c("div", Va, [
|
|
1913
1913
|
c("textarea", {
|
|
1914
1914
|
id: d.value,
|
|
1915
1915
|
ref_key: "textareaRef",
|
|
1916
|
-
ref:
|
|
1916
|
+
ref: s,
|
|
1917
1917
|
value: e.value,
|
|
1918
1918
|
rows: e.rows,
|
|
1919
1919
|
placeholder: e.placeholder,
|
|
@@ -1923,48 +1923,48 @@ const J = /* @__PURE__ */ Symbol("LlmAccordionGroup"), ot = /* @__PURE__ */ p({
|
|
|
1923
1923
|
name: e.name,
|
|
1924
1924
|
"aria-invalid": e.invalid || void 0,
|
|
1925
1925
|
onInput: r
|
|
1926
|
-
}, null, 40,
|
|
1926
|
+
}, null, 40, Na)
|
|
1927
1927
|
]),
|
|
1928
|
-
e.errors.length ? (
|
|
1929
|
-
(
|
|
1930
|
-
key:
|
|
1928
|
+
e.errors.length ? (l(), n("ul", Ua, [
|
|
1929
|
+
(l(!0), n(B, null, z(e.errors, (k, _) => (l(), n("li", {
|
|
1930
|
+
key: _,
|
|
1931
1931
|
class: "error"
|
|
1932
|
-
}, L(
|
|
1933
|
-
])) :
|
|
1932
|
+
}, L(k), 1))), 128))
|
|
1933
|
+
])) : w("", !0)
|
|
1934
1934
|
], 2));
|
|
1935
1935
|
}
|
|
1936
|
-
}),
|
|
1937
|
-
function
|
|
1938
|
-
const e = R(
|
|
1936
|
+
}), N = /* @__PURE__ */ Symbol("LlmToast");
|
|
1937
|
+
function pl() {
|
|
1938
|
+
const e = R(N);
|
|
1939
1939
|
if (!e)
|
|
1940
1940
|
throw new Error(
|
|
1941
1941
|
"useLlmToast() must be called inside a component that is a descendant of LlmToastProvider."
|
|
1942
1942
|
);
|
|
1943
1943
|
return { show: e.show, dismiss: e.dismiss, clear: e.clear };
|
|
1944
1944
|
}
|
|
1945
|
-
const
|
|
1945
|
+
const vl = /* @__PURE__ */ v({
|
|
1946
1946
|
name: "LlmToastProvider",
|
|
1947
1947
|
__name: "llm-toast-provider",
|
|
1948
1948
|
setup(e) {
|
|
1949
|
-
const t =
|
|
1950
|
-
function
|
|
1951
|
-
const
|
|
1952
|
-
id:
|
|
1949
|
+
const t = C([]), a = /* @__PURE__ */ new Map();
|
|
1950
|
+
function o(u, r = {}) {
|
|
1951
|
+
const i = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 7)}`, m = r.duration ?? 5e3, k = {
|
|
1952
|
+
id: i,
|
|
1953
1953
|
message: u,
|
|
1954
1954
|
variant: r.variant ?? "default",
|
|
1955
1955
|
duration: m,
|
|
1956
1956
|
dismissible: r.dismissible ?? !0
|
|
1957
1957
|
};
|
|
1958
|
-
if (t.value = [...t.value,
|
|
1959
|
-
const
|
|
1960
|
-
|
|
1958
|
+
if (t.value = [...t.value, k], m > 0) {
|
|
1959
|
+
const _ = setTimeout(() => {
|
|
1960
|
+
s(i);
|
|
1961
1961
|
}, m);
|
|
1962
|
-
a.set(
|
|
1962
|
+
a.set(i, _);
|
|
1963
1963
|
}
|
|
1964
|
-
return
|
|
1964
|
+
return i;
|
|
1965
1965
|
}
|
|
1966
|
-
function
|
|
1967
|
-
t.value = t.value.filter((
|
|
1966
|
+
function s(u) {
|
|
1967
|
+
t.value = t.value.filter((i) => i.id !== u);
|
|
1968
1968
|
const r = a.get(u);
|
|
1969
1969
|
r !== void 0 && (clearTimeout(r), a.delete(u));
|
|
1970
1970
|
}
|
|
@@ -1973,9 +1973,9 @@ const Yt = /* @__PURE__ */ p({
|
|
|
1973
1973
|
clearTimeout(u);
|
|
1974
1974
|
a.clear(), t.value = [];
|
|
1975
1975
|
}
|
|
1976
|
-
return H(
|
|
1976
|
+
return H(N, { toasts: t, show: o, dismiss: s, clear: d }), (u, r) => b(u.$slots, "default");
|
|
1977
1977
|
}
|
|
1978
|
-
}),
|
|
1978
|
+
}), Wa = { class: "message" }, Ja = /* @__PURE__ */ v({
|
|
1979
1979
|
name: "LlmToastItem",
|
|
1980
1980
|
__name: "llm-toast-item",
|
|
1981
1981
|
props: {
|
|
@@ -1983,18 +1983,18 @@ const Yt = /* @__PURE__ */ p({
|
|
|
1983
1983
|
},
|
|
1984
1984
|
emits: ["dismiss"],
|
|
1985
1985
|
setup(e, { emit: t }) {
|
|
1986
|
-
const a = e,
|
|
1987
|
-
return (d, u) => (
|
|
1988
|
-
class:
|
|
1986
|
+
const a = e, o = t, s = p(() => ["llm-toast", `variant-${a.data.variant}`]);
|
|
1987
|
+
return (d, u) => (l(), n("div", {
|
|
1988
|
+
class: $(s.value),
|
|
1989
1989
|
role: "status"
|
|
1990
1990
|
}, [
|
|
1991
|
-
c("span",
|
|
1992
|
-
e.data.dismissible ? (
|
|
1991
|
+
c("span", Wa, L(e.data.message), 1),
|
|
1992
|
+
e.data.dismissible ? (l(), n("button", {
|
|
1993
1993
|
key: 0,
|
|
1994
1994
|
class: "dismiss",
|
|
1995
1995
|
type: "button",
|
|
1996
1996
|
"aria-label": "Dismiss",
|
|
1997
|
-
onClick: u[0] || (u[0] = (r) =>
|
|
1997
|
+
onClick: u[0] || (u[0] = (r) => o("dismiss", e.data.id))
|
|
1998
1998
|
}, [...u[1] || (u[1] = [
|
|
1999
1999
|
c("svg", {
|
|
2000
2000
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2021,38 +2021,38 @@ const Yt = /* @__PURE__ */ p({
|
|
|
2021
2021
|
y2: "18"
|
|
2022
2022
|
})
|
|
2023
2023
|
], -1)
|
|
2024
|
-
])])) :
|
|
2024
|
+
])])) : w("", !0)
|
|
2025
2025
|
], 2));
|
|
2026
2026
|
}
|
|
2027
|
-
}),
|
|
2027
|
+
}), hl = /* @__PURE__ */ v({
|
|
2028
2028
|
name: "LlmToastContainer",
|
|
2029
2029
|
__name: "llm-toast-container",
|
|
2030
2030
|
props: {
|
|
2031
2031
|
position: { default: "bottom-right" }
|
|
2032
2032
|
},
|
|
2033
2033
|
setup(e) {
|
|
2034
|
-
const t = e, a = R(
|
|
2035
|
-
function
|
|
2034
|
+
const t = e, a = R(N), o = p(() => a.toasts.value);
|
|
2035
|
+
function s(u) {
|
|
2036
2036
|
a.dismiss(u);
|
|
2037
2037
|
}
|
|
2038
|
-
const d =
|
|
2039
|
-
return (u, r) => (
|
|
2040
|
-
class:
|
|
2038
|
+
const d = p(() => ["llm-toast-container", `position-${t.position}`]);
|
|
2039
|
+
return (u, r) => (l(), n("div", {
|
|
2040
|
+
class: $(d.value),
|
|
2041
2041
|
"aria-live": "polite",
|
|
2042
2042
|
role: "status"
|
|
2043
2043
|
}, [
|
|
2044
|
-
(
|
|
2045
|
-
key:
|
|
2046
|
-
data:
|
|
2047
|
-
onDismiss: r[0] || (r[0] = (m) =>
|
|
2044
|
+
(l(!0), n(B, null, z(o.value, (i) => (l(), W(Ja, {
|
|
2045
|
+
key: i.id,
|
|
2046
|
+
data: i,
|
|
2047
|
+
onDismiss: r[0] || (r[0] = (m) => s(m))
|
|
2048
2048
|
}, null, 8, ["data"]))), 128))
|
|
2049
2049
|
], 2));
|
|
2050
2050
|
}
|
|
2051
|
-
}), Za = ["for"],
|
|
2051
|
+
}), Za = ["for"], Qa = ["id", "checked", "disabled", "required", "name", "aria-invalid", "aria-checked"], Xa = {
|
|
2052
2052
|
key: 0,
|
|
2053
2053
|
class: "errors",
|
|
2054
2054
|
"aria-live": "polite"
|
|
2055
|
-
},
|
|
2055
|
+
}, bl = /* @__PURE__ */ v({
|
|
2056
2056
|
name: "LlmToggle",
|
|
2057
2057
|
__name: "llm-toggle",
|
|
2058
2058
|
props: {
|
|
@@ -2067,19 +2067,19 @@ const Yt = /* @__PURE__ */ p({
|
|
|
2067
2067
|
},
|
|
2068
2068
|
emits: ["update:checked"],
|
|
2069
2069
|
setup(e, { emit: t }) {
|
|
2070
|
-
const a = e,
|
|
2070
|
+
const a = e, o = t, s = p(() => a.id || `toggle-${Math.random().toString(36).slice(2)}`);
|
|
2071
2071
|
function d(u) {
|
|
2072
|
-
a.readonly ||
|
|
2072
|
+
a.readonly || o("update:checked", u.target.checked);
|
|
2073
2073
|
}
|
|
2074
|
-
return (u, r) => (
|
|
2075
|
-
class:
|
|
2074
|
+
return (u, r) => (l(), n("div", {
|
|
2075
|
+
class: $(["llm-toggle", { "is-invalid": e.invalid, "is-disabled": e.disabled }])
|
|
2076
2076
|
}, [
|
|
2077
2077
|
c("label", {
|
|
2078
|
-
for:
|
|
2078
|
+
for: s.value,
|
|
2079
2079
|
class: "toggle-label"
|
|
2080
2080
|
}, [
|
|
2081
2081
|
c("input", {
|
|
2082
|
-
id:
|
|
2082
|
+
id: s.value,
|
|
2083
2083
|
type: "checkbox",
|
|
2084
2084
|
role: "switch",
|
|
2085
2085
|
checked: e.checked,
|
|
@@ -2089,21 +2089,21 @@ const Yt = /* @__PURE__ */ p({
|
|
|
2089
2089
|
"aria-invalid": e.invalid || void 0,
|
|
2090
2090
|
"aria-checked": e.checked,
|
|
2091
2091
|
onChange: d
|
|
2092
|
-
}, null, 40,
|
|
2092
|
+
}, null, 40, Qa),
|
|
2093
2093
|
r[0] || (r[0] = c("span", { class: "track" }, [
|
|
2094
2094
|
c("span", { class: "thumb" })
|
|
2095
2095
|
], -1)),
|
|
2096
|
-
|
|
2096
|
+
b(u.$slots, "default")
|
|
2097
2097
|
], 8, Za),
|
|
2098
|
-
e.errors.length ? (
|
|
2099
|
-
(
|
|
2098
|
+
e.errors.length ? (l(), n("ul", Xa, [
|
|
2099
|
+
(l(!0), n(B, null, z(e.errors, (i, m) => (l(), n("li", {
|
|
2100
2100
|
key: m,
|
|
2101
2101
|
class: "error"
|
|
2102
|
-
}, L(
|
|
2103
|
-
])) :
|
|
2102
|
+
}, L(i), 1))), 128))
|
|
2103
|
+
])) : w("", !0)
|
|
2104
2104
|
], 2));
|
|
2105
2105
|
}
|
|
2106
|
-
}),
|
|
2106
|
+
}), gl = /* @__PURE__ */ v({
|
|
2107
2107
|
name: "LlmTooltip",
|
|
2108
2108
|
__name: "llm-tooltip",
|
|
2109
2109
|
props: {
|
|
@@ -2114,41 +2114,41 @@ const Yt = /* @__PURE__ */ p({
|
|
|
2114
2114
|
llmTooltipHideDelay: { default: 0 }
|
|
2115
2115
|
},
|
|
2116
2116
|
setup(e) {
|
|
2117
|
-
const t = e, a =
|
|
2118
|
-
let
|
|
2117
|
+
const t = e, a = C(!1);
|
|
2118
|
+
let o = null, s = null;
|
|
2119
2119
|
function d() {
|
|
2120
|
-
|
|
2120
|
+
o && (clearTimeout(o), o = null), s && (clearTimeout(s), s = null);
|
|
2121
2121
|
}
|
|
2122
2122
|
function u() {
|
|
2123
|
-
t.llmTooltipDisabled || !t.llmTooltip || (d(),
|
|
2123
|
+
t.llmTooltipDisabled || !t.llmTooltip || (d(), o = setTimeout(() => {
|
|
2124
2124
|
a.value = !0;
|
|
2125
2125
|
}, t.llmTooltipShowDelay));
|
|
2126
2126
|
}
|
|
2127
2127
|
function r() {
|
|
2128
|
-
d(),
|
|
2128
|
+
d(), s = setTimeout(() => {
|
|
2129
2129
|
a.value = !1;
|
|
2130
2130
|
}, t.llmTooltipHideDelay);
|
|
2131
2131
|
}
|
|
2132
|
-
function
|
|
2132
|
+
function i(m) {
|
|
2133
2133
|
m.key === "Escape" && (d(), a.value = !1);
|
|
2134
2134
|
}
|
|
2135
|
-
return
|
|
2135
|
+
return J(() => d()), (m, k) => (l(), n("span", {
|
|
2136
2136
|
class: "llm-tooltip-wrapper",
|
|
2137
2137
|
onMouseenter: u,
|
|
2138
2138
|
onMouseleave: r,
|
|
2139
2139
|
onFocus: u,
|
|
2140
2140
|
onBlur: r,
|
|
2141
|
-
onKeydown:
|
|
2141
|
+
onKeydown: i
|
|
2142
2142
|
}, [
|
|
2143
|
-
|
|
2144
|
-
a.value && !e.llmTooltipDisabled && e.llmTooltip ? (
|
|
2143
|
+
b(m.$slots, "default"),
|
|
2144
|
+
a.value && !e.llmTooltipDisabled && e.llmTooltip ? (l(), n("div", {
|
|
2145
2145
|
key: 0,
|
|
2146
2146
|
role: "tooltip",
|
|
2147
|
-
class:
|
|
2148
|
-
}, L(e.llmTooltip), 3)) :
|
|
2147
|
+
class: $(`llm-tooltip position-${e.llmTooltipPosition}`)
|
|
2148
|
+
}, L(e.llmTooltip), 3)) : w("", !0)
|
|
2149
2149
|
], 32));
|
|
2150
2150
|
}
|
|
2151
|
-
}),
|
|
2151
|
+
}), Ya = { class: "llm-code-block" }, et = { class: "code-block-header" }, at = { class: "code-block-label" }, tt = ["aria-label"], lt = { class: "code-block-body" }, st = { class: "code-block-pre" }, nt = { class: "code-line-number" }, ot = { class: "code-line-text" }, yl = /* @__PURE__ */ v({
|
|
2152
2152
|
name: "LlmCodeBlock",
|
|
2153
2153
|
__name: "llm-code-block",
|
|
2154
2154
|
props: {
|
|
@@ -2159,7 +2159,7 @@ const Yt = /* @__PURE__ */ p({
|
|
|
2159
2159
|
showLineNumbers: { type: Boolean, default: !1 }
|
|
2160
2160
|
},
|
|
2161
2161
|
setup(e) {
|
|
2162
|
-
const t = e, a =
|
|
2162
|
+
const t = e, a = C(!1), o = p(() => t.filename || t.language), s = p(() => t.code.split(`
|
|
2163
2163
|
`));
|
|
2164
2164
|
function d() {
|
|
2165
2165
|
navigator.clipboard.writeText(t.code).then(() => {
|
|
@@ -2168,17 +2168,17 @@ const Yt = /* @__PURE__ */ p({
|
|
|
2168
2168
|
}, 1800);
|
|
2169
2169
|
});
|
|
2170
2170
|
}
|
|
2171
|
-
return (u, r) => (
|
|
2172
|
-
c("div",
|
|
2173
|
-
c("span",
|
|
2174
|
-
e.copyable ? (
|
|
2171
|
+
return (u, r) => (l(), n("div", Ya, [
|
|
2172
|
+
c("div", et, [
|
|
2173
|
+
c("span", at, L(o.value), 1),
|
|
2174
|
+
e.copyable ? (l(), n("button", {
|
|
2175
2175
|
key: 0,
|
|
2176
2176
|
class: "code-block-copy",
|
|
2177
2177
|
type: "button",
|
|
2178
2178
|
"aria-label": a.value ? "Copied" : "Copy code",
|
|
2179
2179
|
onClick: d
|
|
2180
2180
|
}, [
|
|
2181
|
-
a.value ? (
|
|
2181
|
+
a.value ? (l(), n(B, { key: 0 }, [
|
|
2182
2182
|
r[0] || (r[0] = c("svg", {
|
|
2183
2183
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2184
2184
|
width: "14",
|
|
@@ -2193,8 +2193,8 @@ const Yt = /* @__PURE__ */ p({
|
|
|
2193
2193
|
}, [
|
|
2194
2194
|
c("polyline", { points: "20 6 9 17 4 12" })
|
|
2195
2195
|
], -1)),
|
|
2196
|
-
r[1] || (r[1] =
|
|
2197
|
-
], 64)) : (
|
|
2196
|
+
r[1] || (r[1] = j(" Copied ", -1))
|
|
2197
|
+
], 64)) : (l(), n(B, { key: 1 }, [
|
|
2198
2198
|
r[2] || (r[2] = c("svg", {
|
|
2199
2199
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2200
2200
|
width: "14",
|
|
@@ -2217,81 +2217,371 @@ const Yt = /* @__PURE__ */ p({
|
|
|
2217
2217
|
}),
|
|
2218
2218
|
c("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
2219
2219
|
], -1)),
|
|
2220
|
-
r[3] || (r[3] =
|
|
2220
|
+
r[3] || (r[3] = j(" Copy ", -1))
|
|
2221
2221
|
], 64))
|
|
2222
|
-
], 8,
|
|
2222
|
+
], 8, tt)) : w("", !0)
|
|
2223
2223
|
]),
|
|
2224
|
-
c("div",
|
|
2225
|
-
c("pre",
|
|
2224
|
+
c("div", lt, [
|
|
2225
|
+
c("pre", st, [
|
|
2226
2226
|
c("code", null, [
|
|
2227
|
-
e.showLineNumbers ? (
|
|
2227
|
+
e.showLineNumbers ? (l(!0), n(B, { key: 0 }, z(s.value, (i, m) => (l(), n("span", {
|
|
2228
2228
|
key: m,
|
|
2229
2229
|
class: "code-line"
|
|
2230
2230
|
}, [
|
|
2231
|
-
c("span",
|
|
2232
|
-
c("span",
|
|
2233
|
-
]))), 128)) : (
|
|
2234
|
-
|
|
2231
|
+
c("span", nt, L(m + 1), 1),
|
|
2232
|
+
c("span", ot, L(i), 1)
|
|
2233
|
+
]))), 128)) : (l(), n(B, { key: 1 }, [
|
|
2234
|
+
j(L(e.code), 1)
|
|
2235
2235
|
], 64))
|
|
2236
2236
|
])
|
|
2237
2237
|
])
|
|
2238
2238
|
])
|
|
2239
2239
|
]));
|
|
2240
2240
|
}
|
|
2241
|
+
}), it = ["aria-labelledby"], rt = ["aria-labelledby"], dt = ["aria-label", "aria-expanded"], ut = ["aria-labelledby"], U = /* @__PURE__ */ Symbol("LlmChat"), $l = /* @__PURE__ */ v({
|
|
2242
|
+
name: "LlmChat",
|
|
2243
|
+
__name: "llm-chat",
|
|
2244
|
+
props: {
|
|
2245
|
+
variant: { default: "drawer" },
|
|
2246
|
+
status: { default: "idle" },
|
|
2247
|
+
open: { type: Boolean, default: !1 }
|
|
2248
|
+
},
|
|
2249
|
+
emits: ["update:open"],
|
|
2250
|
+
setup(e, { emit: t }) {
|
|
2251
|
+
const a = e, o = t, s = C(null), d = E(), u = me(a, "status");
|
|
2252
|
+
function r() {
|
|
2253
|
+
o("update:open", !1);
|
|
2254
|
+
}
|
|
2255
|
+
function i() {
|
|
2256
|
+
o("update:open", !a.open);
|
|
2257
|
+
}
|
|
2258
|
+
H(U, {
|
|
2259
|
+
headerId: d,
|
|
2260
|
+
status: u,
|
|
2261
|
+
close: r,
|
|
2262
|
+
toggle: i
|
|
2263
|
+
}), q(
|
|
2264
|
+
() => a.open,
|
|
2265
|
+
(g) => {
|
|
2266
|
+
if (a.variant !== "drawer") return;
|
|
2267
|
+
const y = s.value;
|
|
2268
|
+
y && (g ? y.open || y.showModal() : y.open && y.close());
|
|
2269
|
+
},
|
|
2270
|
+
{ flush: "post" }
|
|
2271
|
+
);
|
|
2272
|
+
function m() {
|
|
2273
|
+
o("update:open", !1);
|
|
2274
|
+
}
|
|
2275
|
+
function k(g) {
|
|
2276
|
+
g.preventDefault(), o("update:open", !1);
|
|
2277
|
+
}
|
|
2278
|
+
function _(g) {
|
|
2279
|
+
g.target === s.value && o("update:open", !1);
|
|
2280
|
+
}
|
|
2281
|
+
const h = p(() => [
|
|
2282
|
+
"llm-chat",
|
|
2283
|
+
`variant-${a.variant}`,
|
|
2284
|
+
`status-${a.status}`,
|
|
2285
|
+
a.open && "is-open"
|
|
2286
|
+
]);
|
|
2287
|
+
return (g, y) => (l(), n("div", {
|
|
2288
|
+
class: $(h.value)
|
|
2289
|
+
}, [
|
|
2290
|
+
e.variant === "drawer" ? (l(), n("dialog", {
|
|
2291
|
+
key: 0,
|
|
2292
|
+
ref_key: "dialogRef",
|
|
2293
|
+
ref: s,
|
|
2294
|
+
"aria-labelledby": M(d),
|
|
2295
|
+
"aria-modal": "true",
|
|
2296
|
+
onClose: m,
|
|
2297
|
+
onCancel: k,
|
|
2298
|
+
onClick: _
|
|
2299
|
+
}, [
|
|
2300
|
+
c("div", {
|
|
2301
|
+
class: "surface drawer-surface",
|
|
2302
|
+
onClick: y[0] || (y[0] = V(() => {
|
|
2303
|
+
}, ["stop"]))
|
|
2304
|
+
}, [
|
|
2305
|
+
b(g.$slots, "default")
|
|
2306
|
+
])
|
|
2307
|
+
], 40, it)) : e.variant === "popup" ? (l(), n(B, { key: 1 }, [
|
|
2308
|
+
e.open ? (l(), n("div", {
|
|
2309
|
+
key: 0,
|
|
2310
|
+
class: "surface popup-surface",
|
|
2311
|
+
role: "dialog",
|
|
2312
|
+
"aria-labelledby": M(d)
|
|
2313
|
+
}, [
|
|
2314
|
+
b(g.$slots, "default")
|
|
2315
|
+
], 8, rt)) : w("", !0),
|
|
2316
|
+
c("button", {
|
|
2317
|
+
type: "button",
|
|
2318
|
+
class: "fab-bubble",
|
|
2319
|
+
"aria-label": e.open ? "Close AI assistant" : "Open AI assistant",
|
|
2320
|
+
"aria-expanded": e.open,
|
|
2321
|
+
onClick: i
|
|
2322
|
+
}, [...y[1] || (y[1] = [
|
|
2323
|
+
c("span", { "aria-hidden": "true" }, "AI", -1)
|
|
2324
|
+
])], 8, dt)
|
|
2325
|
+
], 64)) : (l(), n("section", {
|
|
2326
|
+
key: 2,
|
|
2327
|
+
class: "surface inline-surface",
|
|
2328
|
+
"aria-labelledby": M(d)
|
|
2329
|
+
}, [
|
|
2330
|
+
b(g.$slots, "default")
|
|
2331
|
+
], 8, ut))
|
|
2332
|
+
], 2));
|
|
2333
|
+
}
|
|
2334
|
+
}), ct = ["id"], mt = { class: "title-block" }, kl = /* @__PURE__ */ v({
|
|
2335
|
+
name: "LlmChatHeader",
|
|
2336
|
+
__name: "llm-chat-header",
|
|
2337
|
+
setup(e) {
|
|
2338
|
+
const t = R(U, {
|
|
2339
|
+
headerId: "",
|
|
2340
|
+
status: C("idle"),
|
|
2341
|
+
close: () => {
|
|
2342
|
+
},
|
|
2343
|
+
toggle: () => {
|
|
2344
|
+
}
|
|
2345
|
+
});
|
|
2346
|
+
return (a, o) => (l(), n("div", {
|
|
2347
|
+
id: M(t).headerId,
|
|
2348
|
+
class: "llm-chat-header"
|
|
2349
|
+
}, [
|
|
2350
|
+
c("div", mt, [
|
|
2351
|
+
b(a.$slots, "default")
|
|
2352
|
+
]),
|
|
2353
|
+
c("button", {
|
|
2354
|
+
type: "button",
|
|
2355
|
+
class: "close-btn",
|
|
2356
|
+
"aria-label": "Close chat",
|
|
2357
|
+
onClick: o[0] || (o[0] = (s) => M(t).close())
|
|
2358
|
+
}, [...o[1] || (o[1] = [
|
|
2359
|
+
c("svg", {
|
|
2360
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2361
|
+
width: "14",
|
|
2362
|
+
height: "14",
|
|
2363
|
+
viewBox: "0 0 24 24",
|
|
2364
|
+
fill: "none",
|
|
2365
|
+
stroke: "currentColor",
|
|
2366
|
+
"stroke-width": "2.5",
|
|
2367
|
+
"stroke-linecap": "round",
|
|
2368
|
+
"stroke-linejoin": "round",
|
|
2369
|
+
"aria-hidden": "true"
|
|
2370
|
+
}, [
|
|
2371
|
+
c("line", {
|
|
2372
|
+
x1: "18",
|
|
2373
|
+
y1: "6",
|
|
2374
|
+
x2: "6",
|
|
2375
|
+
y2: "18"
|
|
2376
|
+
}),
|
|
2377
|
+
c("line", {
|
|
2378
|
+
x1: "6",
|
|
2379
|
+
y1: "6",
|
|
2380
|
+
x2: "18",
|
|
2381
|
+
y2: "18"
|
|
2382
|
+
})
|
|
2383
|
+
], -1)
|
|
2384
|
+
])])
|
|
2385
|
+
], 8, ct));
|
|
2386
|
+
}
|
|
2387
|
+
}), ft = { class: "llm-chat-messages" }, _l = /* @__PURE__ */ v({
|
|
2388
|
+
name: "LlmChatMessages",
|
|
2389
|
+
__name: "llm-chat-messages",
|
|
2390
|
+
setup(e) {
|
|
2391
|
+
return (t, a) => (l(), n("div", ft, [
|
|
2392
|
+
b(t.$slots, "default")
|
|
2393
|
+
]));
|
|
2394
|
+
}
|
|
2395
|
+
}), wl = /* @__PURE__ */ v({
|
|
2396
|
+
name: "LlmChatMessage",
|
|
2397
|
+
__name: "llm-chat-message",
|
|
2398
|
+
props: {
|
|
2399
|
+
role: { default: "assistant" },
|
|
2400
|
+
failed: { type: Boolean, default: !1 }
|
|
2401
|
+
},
|
|
2402
|
+
setup(e) {
|
|
2403
|
+
const t = e, a = p(() => [
|
|
2404
|
+
"llm-chat-message",
|
|
2405
|
+
`role-${t.role}`,
|
|
2406
|
+
t.failed && "is-failed"
|
|
2407
|
+
]);
|
|
2408
|
+
return (o, s) => (l(), n("div", {
|
|
2409
|
+
role: "listitem",
|
|
2410
|
+
class: $(a.value)
|
|
2411
|
+
}, [
|
|
2412
|
+
b(o.$slots, "default")
|
|
2413
|
+
], 2));
|
|
2414
|
+
}
|
|
2415
|
+
}), pt = {
|
|
2416
|
+
class: "llm-chat-typing",
|
|
2417
|
+
role: "status",
|
|
2418
|
+
"aria-live": "polite"
|
|
2419
|
+
}, Ll = /* @__PURE__ */ v({
|
|
2420
|
+
name: "LlmChatTyping",
|
|
2421
|
+
__name: "llm-chat-typing",
|
|
2422
|
+
setup(e) {
|
|
2423
|
+
return (t, a) => (l(), n("div", pt, [...a[0] || (a[0] = [
|
|
2424
|
+
c("span", { class: "dot" }, null, -1),
|
|
2425
|
+
c("span", { class: "dot" }, null, -1),
|
|
2426
|
+
c("span", { class: "dot" }, null, -1),
|
|
2427
|
+
c("span", { class: "sr-only" }, "Assistant is typing", -1)
|
|
2428
|
+
])]));
|
|
2429
|
+
}
|
|
2430
|
+
}), vt = { class: "llm-chat-suggestion" }, ht = { class: "chip-label" }, bt = {
|
|
2431
|
+
key: 0,
|
|
2432
|
+
class: "chip-hint"
|
|
2433
|
+
}, xl = /* @__PURE__ */ v({
|
|
2434
|
+
name: "LlmChatSuggestion",
|
|
2435
|
+
__name: "llm-chat-suggestion",
|
|
2436
|
+
props: {
|
|
2437
|
+
label: {},
|
|
2438
|
+
hint: {}
|
|
2439
|
+
},
|
|
2440
|
+
emits: ["selected"],
|
|
2441
|
+
setup(e, { emit: t }) {
|
|
2442
|
+
const a = e, o = t;
|
|
2443
|
+
return (s, d) => (l(), n("div", vt, [
|
|
2444
|
+
c("button", {
|
|
2445
|
+
type: "button",
|
|
2446
|
+
class: "chip",
|
|
2447
|
+
onClick: d[0] || (d[0] = (u) => o("selected", a.label))
|
|
2448
|
+
}, [
|
|
2449
|
+
c("span", ht, L(a.label), 1),
|
|
2450
|
+
a.hint ? (l(), n("span", bt, L(a.hint), 1)) : w("", !0)
|
|
2451
|
+
])
|
|
2452
|
+
]));
|
|
2453
|
+
}
|
|
2454
|
+
}), gt = { class: "llm-chat-input" }, yt = ["value", "placeholder", "disabled", "aria-label"], $t = ["disabled"], Cl = /* @__PURE__ */ v({
|
|
2455
|
+
name: "LlmChatInput",
|
|
2456
|
+
__name: "llm-chat-input",
|
|
2457
|
+
props: {
|
|
2458
|
+
value: { default: void 0 },
|
|
2459
|
+
placeholder: { default: "" },
|
|
2460
|
+
ariaLabel: { default: "Message your AI assistant" }
|
|
2461
|
+
},
|
|
2462
|
+
emits: ["update:value", "send", "stop"],
|
|
2463
|
+
setup(e, { emit: t }) {
|
|
2464
|
+
const a = e, o = t, s = R(U, {
|
|
2465
|
+
headerId: "",
|
|
2466
|
+
status: C("idle"),
|
|
2467
|
+
close: () => {
|
|
2468
|
+
},
|
|
2469
|
+
toggle: () => {
|
|
2470
|
+
}
|
|
2471
|
+
}), d = C(""), u = p(() => a.value !== void 0), r = p({
|
|
2472
|
+
get: () => u.value ? a.value ?? "" : d.value,
|
|
2473
|
+
set: (g) => {
|
|
2474
|
+
u.value || (d.value = g), o("update:value", g);
|
|
2475
|
+
}
|
|
2476
|
+
}), i = p(() => s.status.value === "streaming"), m = p(() => {
|
|
2477
|
+
if (a.placeholder) return a.placeholder;
|
|
2478
|
+
switch (s.status.value) {
|
|
2479
|
+
case "streaming":
|
|
2480
|
+
return "Waiting for response…";
|
|
2481
|
+
case "error":
|
|
2482
|
+
return "Try again…";
|
|
2483
|
+
default:
|
|
2484
|
+
return "Message your AI assistant…";
|
|
2485
|
+
}
|
|
2486
|
+
});
|
|
2487
|
+
function k() {
|
|
2488
|
+
const g = r.value.trim();
|
|
2489
|
+
!g || i.value || (o("send", g), r.value = "");
|
|
2490
|
+
}
|
|
2491
|
+
function _(g) {
|
|
2492
|
+
g.key === "Enter" && !g.shiftKey && (g.preventDefault(), k());
|
|
2493
|
+
}
|
|
2494
|
+
function h(g) {
|
|
2495
|
+
const y = g.target;
|
|
2496
|
+
r.value = y.value;
|
|
2497
|
+
}
|
|
2498
|
+
return (g, y) => (l(), n("div", gt, [
|
|
2499
|
+
c("textarea", {
|
|
2500
|
+
class: "field",
|
|
2501
|
+
rows: "1",
|
|
2502
|
+
value: r.value,
|
|
2503
|
+
placeholder: m.value,
|
|
2504
|
+
disabled: i.value,
|
|
2505
|
+
"aria-label": a.ariaLabel,
|
|
2506
|
+
onInput: h,
|
|
2507
|
+
onKeydown: _
|
|
2508
|
+
}, null, 40, yt),
|
|
2509
|
+
i.value ? (l(), n("button", {
|
|
2510
|
+
key: 0,
|
|
2511
|
+
type: "button",
|
|
2512
|
+
class: "action-btn variant-danger size-md",
|
|
2513
|
+
onClick: y[0] || (y[0] = (f) => o("stop"))
|
|
2514
|
+
}, " Stop ")) : (l(), n("button", {
|
|
2515
|
+
key: 1,
|
|
2516
|
+
type: "button",
|
|
2517
|
+
class: "action-btn variant-primary size-md",
|
|
2518
|
+
disabled: !r.value.trim(),
|
|
2519
|
+
onClick: k
|
|
2520
|
+
}, " Send ", 8, $t))
|
|
2521
|
+
]));
|
|
2522
|
+
}
|
|
2241
2523
|
});
|
|
2242
2524
|
export {
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2525
|
+
_t as LlmAccordionGroup,
|
|
2526
|
+
Lt as LlmAccordionHeader,
|
|
2527
|
+
wt as LlmAccordionItem,
|
|
2528
|
+
xt as LlmAlert,
|
|
2529
|
+
Ct as LlmAvatar,
|
|
2530
|
+
Bt as LlmAvatarGroup,
|
|
2531
|
+
It as LlmBadge,
|
|
2532
|
+
Dt as LlmBreadcrumbItem,
|
|
2533
|
+
Tt as LlmBreadcrumbs,
|
|
2534
|
+
St as LlmButton,
|
|
2535
|
+
Mt as LlmCard,
|
|
2536
|
+
zt as LlmCardContent,
|
|
2537
|
+
Rt as LlmCardFooter,
|
|
2538
|
+
At as LlmCardHeader,
|
|
2539
|
+
$l as LlmChat,
|
|
2540
|
+
kl as LlmChatHeader,
|
|
2541
|
+
Cl as LlmChatInput,
|
|
2542
|
+
U as LlmChatKey,
|
|
2543
|
+
wl as LlmChatMessage,
|
|
2544
|
+
_l as LlmChatMessages,
|
|
2545
|
+
xl as LlmChatSuggestion,
|
|
2546
|
+
Ll as LlmChatTyping,
|
|
2257
2547
|
qe as LlmCheckbox,
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2548
|
+
yl as LlmCodeBlock,
|
|
2549
|
+
Qt as LlmCombobox,
|
|
2550
|
+
qt as LlmDialog,
|
|
2551
|
+
Et as LlmDialogContent,
|
|
2552
|
+
Ot as LlmDialogFooter,
|
|
2553
|
+
Ht as LlmDialogHeader,
|
|
2554
|
+
Kt as LlmDrawer,
|
|
2555
|
+
Gt as LlmDrawerContent,
|
|
2556
|
+
Pt as LlmDrawerFooter,
|
|
2557
|
+
jt as LlmDrawerHeader,
|
|
2558
|
+
Ft as LlmInput,
|
|
2559
|
+
Nt as LlmMenu,
|
|
2560
|
+
Ut as LlmMenuItem,
|
|
2561
|
+
Wt as LlmMenuSeparator,
|
|
2562
|
+
Vt as LlmMenuTrigger,
|
|
2563
|
+
al as LlmOption,
|
|
2564
|
+
Jt as LlmPagination,
|
|
2565
|
+
Zt as LlmProgress,
|
|
2566
|
+
Yt as LlmRadio,
|
|
2567
|
+
Xt as LlmRadioGroup,
|
|
2568
|
+
el as LlmSelect,
|
|
2569
|
+
tl as LlmSkeleton,
|
|
2570
|
+
sl as LlmStep,
|
|
2571
|
+
ll as LlmStepper,
|
|
2572
|
+
ml as LlmTab,
|
|
2573
|
+
cl as LlmTabGroup,
|
|
2574
|
+
nl as LlmTable,
|
|
2575
|
+
il as LlmTbody,
|
|
2576
|
+
ul as LlmTd,
|
|
2577
|
+
fl as LlmTextarea,
|
|
2578
|
+
dl as LlmTh,
|
|
2579
|
+
ol as LlmThead,
|
|
2580
|
+
hl as LlmToastContainer,
|
|
2581
|
+
Ja as LlmToastItem,
|
|
2582
|
+
vl as LlmToastProvider,
|
|
2583
|
+
bl as LlmToggle,
|
|
2584
|
+
gl as LlmTooltip,
|
|
2585
|
+
rl as LlmTr,
|
|
2586
|
+
pl as useLlmToast
|
|
2297
2587
|
};
|