@aura-group/aura-design
Advanced tools
Comparing version 0.3.6 to 0.3.7
@@ -1,6 +0,6 @@ | ||
const ke = (e, n) => e === n, Ce = Symbol("solid-track"), U = { | ||
const ke = (e, n) => e === n, Ce = Symbol("solid-track"), q = { | ||
equals: ke | ||
}; | ||
let he = $e; | ||
const P = 1, M = 2, ge = { | ||
const N = 1, Y = 2, ge = { | ||
owned: null, | ||
@@ -11,6 +11,6 @@ cleanups: null, | ||
}; | ||
var y = null; | ||
let Z = null, $ = null, _ = null, j = null, W = 0; | ||
function G(e, n) { | ||
const t = $, o = y, r = e.length === 0, s = r ? ge : { | ||
var x = null; | ||
let te = null, v = null, k = null, R = null, Q = 0; | ||
function V(e, n) { | ||
const t = v, o = x, r = e.length === 0, l = r ? ge : { | ||
owned: null, | ||
@@ -20,12 +20,12 @@ cleanups: null, | ||
owner: n === void 0 ? o : n | ||
}, i = r ? e : () => e(() => O(() => X(s))); | ||
y = s, $ = null; | ||
}, s = r ? e : () => e(() => I(() => ee(l))); | ||
x = l, v = null; | ||
try { | ||
return K(i, !0); | ||
return U(s, !0); | ||
} finally { | ||
$ = t, y = o; | ||
v = t, x = o; | ||
} | ||
} | ||
function A(e, n) { | ||
n = n ? Object.assign({}, U, n) : U; | ||
function z(e, n) { | ||
n = n ? Object.assign({}, q, n) : q; | ||
const t = { | ||
@@ -39,47 +39,47 @@ value: e, | ||
} | ||
function g(e, n, t) { | ||
const o = se(e, n, !1, P); | ||
F(o); | ||
function p(e, n, t) { | ||
const o = se(e, n, !1, N); | ||
G(o); | ||
} | ||
function re(e, n, t) { | ||
function Z(e, n, t) { | ||
he = Ae; | ||
const o = se(e, n, !1, P); | ||
o.user = !0, j ? j.push(o) : F(o); | ||
const o = se(e, n, !1, N); | ||
o.user = !0, R ? R.push(o) : G(o); | ||
} | ||
function N(e, n, t) { | ||
t = t ? Object.assign({}, U, t) : U; | ||
function L(e, n, t) { | ||
t = t ? Object.assign({}, q, t) : q; | ||
const o = se(e, n, !0, 0); | ||
return o.observers = null, o.observerSlots = null, o.comparator = t.equals || void 0, F(o), be.bind(o); | ||
return o.observers = null, o.observerSlots = null, o.comparator = t.equals || void 0, G(o), be.bind(o); | ||
} | ||
function O(e) { | ||
if ($ === null) | ||
function I(e) { | ||
if (v === null) | ||
return e(); | ||
const n = $; | ||
$ = null; | ||
const n = v; | ||
v = null; | ||
try { | ||
return e(); | ||
} finally { | ||
$ = n; | ||
v = n; | ||
} | ||
} | ||
function oe(e) { | ||
re(() => O(e)); | ||
function le(e) { | ||
Z(() => I(e)); | ||
} | ||
function Ee(e) { | ||
return y === null || (y.cleanups === null ? y.cleanups = [e] : y.cleanups.push(e)), e; | ||
return x === null || (x.cleanups === null ? x.cleanups = [e] : x.cleanups.push(e)), e; | ||
} | ||
function h() { | ||
return y; | ||
function b() { | ||
return x; | ||
} | ||
function be() { | ||
if (this.sources && this.state) | ||
if (this.state === P) | ||
F(this); | ||
if (this.state === N) | ||
G(this); | ||
else { | ||
const e = _; | ||
_ = null, K(() => q(this), !1), _ = e; | ||
const e = k; | ||
k = null, U(() => W(this), !1), k = e; | ||
} | ||
if ($) { | ||
if (v) { | ||
const e = this.observers ? this.observers.length : 0; | ||
$.sources ? ($.sources.push(this), $.sourceSlots.push(e)) : ($.sources = [this], $.sourceSlots = [e]), this.observers ? (this.observers.push($), this.observerSlots.push($.sources.length - 1)) : (this.observers = [$], this.observerSlots = [$.sources.length - 1]); | ||
v.sources ? (v.sources.push(this), v.sourceSlots.push(e)) : (v.sources = [this], v.sourceSlots = [e]), this.observers ? (this.observers.push(v), this.observerSlots.push(v.sources.length - 1)) : (this.observers = [v], this.observerSlots = [v.sources.length - 1]); | ||
} | ||
@@ -90,17 +90,17 @@ return this.value; | ||
let o = e.value; | ||
return (!e.comparator || !e.comparator(o, n)) && (e.value = n, e.observers && e.observers.length && K(() => { | ||
return (!e.comparator || !e.comparator(o, n)) && (e.value = n, e.observers && e.observers.length && U(() => { | ||
for (let r = 0; r < e.observers.length; r += 1) { | ||
const s = e.observers[r], i = Z && Z.running; | ||
i && Z.disposed.has(s), (i ? !s.tState : !s.state) && (s.pure ? _.push(s) : j.push(s), s.observers && me(s)), i || (s.state = P); | ||
const l = e.observers[r], s = te && te.running; | ||
s && te.disposed.has(l), (s ? !l.tState : !l.state) && (l.pure ? k.push(l) : R.push(l), l.observers && ve(l)), s || (l.state = N); | ||
} | ||
if (_.length > 1e6) | ||
throw _ = [], new Error(); | ||
if (k.length > 1e6) | ||
throw k = [], new Error(); | ||
}, !1)), n; | ||
} | ||
function F(e) { | ||
function G(e) { | ||
if (!e.fn) | ||
return; | ||
X(e); | ||
const n = y, t = $, o = W; | ||
$ = y = e, Se(e, e.value, o), $ = t, y = n; | ||
ee(e); | ||
const n = x, t = v, o = Q; | ||
v = x = e, Se(e, e.value, o), v = t, x = n; | ||
} | ||
@@ -112,8 +112,8 @@ function Se(e, n, t) { | ||
} catch (r) { | ||
return e.pure && (e.state = P, e.owned && e.owned.forEach(X), e.owned = null), e.updatedAt = t + 1, ve(r); | ||
return e.pure && (e.state = N, e.owned && e.owned.forEach(ee), e.owned = null), e.updatedAt = t + 1, me(r); | ||
} | ||
(!e.updatedAt || e.updatedAt <= t) && (e.updatedAt != null && "observers" in e ? pe(e, o) : e.value = o, e.updatedAt = t); | ||
} | ||
function se(e, n, t, o = P, r) { | ||
const s = { | ||
function se(e, n, t, o = N, r) { | ||
const l = { | ||
fn: e, | ||
@@ -127,31 +127,31 @@ state: o, | ||
value: n, | ||
owner: y, | ||
owner: x, | ||
context: null, | ||
pure: t | ||
}; | ||
return y === null || y !== ge && (y.owned ? y.owned.push(s) : y.owned = [s]), s; | ||
return x === null || x !== ge && (x.owned ? x.owned.push(l) : x.owned = [l]), l; | ||
} | ||
function V(e) { | ||
function J(e) { | ||
if (e.state === 0) | ||
return; | ||
if (e.state === M) | ||
return q(e); | ||
if (e.suspense && O(e.suspense.inFallback)) | ||
if (e.state === Y) | ||
return W(e); | ||
if (e.suspense && I(e.suspense.inFallback)) | ||
return e.suspense.effects.push(e); | ||
const n = [e]; | ||
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < W); ) | ||
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Q); ) | ||
e.state && n.push(e); | ||
for (let t = n.length - 1; t >= 0; t--) | ||
if (e = n[t], e.state === P) | ||
F(e); | ||
else if (e.state === M) { | ||
const o = _; | ||
_ = null, K(() => q(e, n[0]), !1), _ = o; | ||
if (e = n[t], e.state === N) | ||
G(e); | ||
else if (e.state === Y) { | ||
const o = k; | ||
k = null, U(() => W(e, n[0]), !1), k = o; | ||
} | ||
} | ||
function K(e, n) { | ||
if (_) | ||
function U(e, n) { | ||
if (k) | ||
return e(); | ||
let t = !1; | ||
n || (_ = []), j ? t = !0 : j = [], W++; | ||
n || (k = []), R ? t = !0 : R = [], Q++; | ||
try { | ||
@@ -161,14 +161,14 @@ const o = e(); | ||
} catch (o) { | ||
t || (j = null), _ = null, ve(o); | ||
t || (R = null), k = null, me(o); | ||
} | ||
} | ||
function ze(e) { | ||
if (_ && ($e(_), _ = null), e) | ||
if (k && ($e(k), k = null), e) | ||
return; | ||
const n = j; | ||
j = null, n.length && K(() => he(n), !1); | ||
const n = R; | ||
R = null, n.length && U(() => he(n), !1); | ||
} | ||
function $e(e) { | ||
for (let n = 0; n < e.length; n++) | ||
V(e[n]); | ||
J(e[n]); | ||
} | ||
@@ -179,8 +179,8 @@ function Ae(e) { | ||
const o = e[n]; | ||
o.user ? e[t++] = o : V(o); | ||
o.user ? e[t++] = o : J(o); | ||
} | ||
for (n = 0; n < t; n++) | ||
V(e[n]); | ||
J(e[n]); | ||
} | ||
function q(e, n) { | ||
function W(e, n) { | ||
e.state = 0; | ||
@@ -191,13 +191,13 @@ for (let t = 0; t < e.sources.length; t += 1) { | ||
const r = o.state; | ||
r === P ? o !== n && (!o.updatedAt || o.updatedAt < W) && V(o) : r === M && q(o, n); | ||
r === N ? o !== n && (!o.updatedAt || o.updatedAt < Q) && J(o) : r === Y && W(o, n); | ||
} | ||
} | ||
} | ||
function me(e) { | ||
function ve(e) { | ||
for (let n = 0; n < e.observers.length; n += 1) { | ||
const t = e.observers[n]; | ||
t.state || (t.state = M, t.pure ? _.push(t) : j.push(t), t.observers && me(t)); | ||
t.state || (t.state = Y, t.pure ? k.push(t) : R.push(t), t.observers && ve(t)); | ||
} | ||
} | ||
function X(e) { | ||
function ee(e) { | ||
let n; | ||
@@ -208,4 +208,4 @@ if (e.sources) | ||
if (r && r.length) { | ||
const s = r.pop(), i = t.observerSlots.pop(); | ||
o < r.length && (s.sourceSlots[i] = o, r[o] = s, t.observerSlots[o] = i); | ||
const l = r.pop(), s = t.observerSlots.pop(); | ||
o < r.length && (l.sourceSlots[s] = o, r[o] = l, t.observerSlots[o] = s); | ||
} | ||
@@ -215,3 +215,3 @@ } | ||
for (n = e.owned.length - 1; n >= 0; n--) | ||
X(e.owned[n]); | ||
ee(e.owned[n]); | ||
e.owned = null; | ||
@@ -226,41 +226,41 @@ } | ||
} | ||
function ve(e) { | ||
function me(e) { | ||
throw e; | ||
} | ||
const Te = Symbol("fallback"); | ||
function le(e) { | ||
function ie(e) { | ||
for (let n = 0; n < e.length; n++) | ||
e[n](); | ||
} | ||
function je(e, n, t = {}) { | ||
let o = [], r = [], s = [], i = 0, l = n.length > 1 ? [] : null; | ||
return Ee(() => le(s)), () => { | ||
function Oe(e, n, t = {}) { | ||
let o = [], r = [], l = [], s = 0, i = n.length > 1 ? [] : null; | ||
return Ee(() => ie(l)), () => { | ||
let d = e() || [], c, a; | ||
return d[Ce], O(() => { | ||
let p = d.length, w, E, L, H, D, S, z, T, R; | ||
if (p === 0) | ||
i !== 0 && (le(s), s = [], o = [], r = [], i = 0, l && (l = [])), t.fallback && (o = [Te], r[0] = G((we) => (s[0] = we, t.fallback())), i = 1); | ||
else if (i === 0) { | ||
for (r = new Array(p), a = 0; a < p; a++) | ||
o[a] = d[a], r[a] = G(b); | ||
i = p; | ||
return d[Ce], I(() => { | ||
let g = d.length, C, S, $, y, B, T, O, P, F; | ||
if (g === 0) | ||
s !== 0 && (ie(l), l = [], o = [], r = [], s = 0, i && (i = [])), t.fallback && (o = [Te], r[0] = V((we) => (l[0] = we, t.fallback())), s = 1); | ||
else if (s === 0) { | ||
for (r = new Array(g), a = 0; a < g; a++) | ||
o[a] = d[a], r[a] = V(h); | ||
s = g; | ||
} else { | ||
for (L = new Array(p), H = new Array(p), l && (D = new Array(p)), S = 0, z = Math.min(i, p); S < z && o[S] === d[S]; S++) | ||
for ($ = new Array(g), y = new Array(g), i && (B = new Array(g)), T = 0, O = Math.min(s, g); T < O && o[T] === d[T]; T++) | ||
; | ||
for (z = i - 1, T = p - 1; z >= S && T >= S && o[z] === d[T]; z--, T--) | ||
L[T] = r[z], H[T] = s[z], l && (D[T] = l[z]); | ||
for (w = /* @__PURE__ */ new Map(), E = new Array(T + 1), a = T; a >= S; a--) | ||
R = d[a], c = w.get(R), E[a] = c === void 0 ? -1 : c, w.set(R, a); | ||
for (c = S; c <= z; c++) | ||
R = o[c], a = w.get(R), a !== void 0 && a !== -1 ? (L[a] = r[c], H[a] = s[c], l && (D[a] = l[c]), a = E[a], w.set(R, a)) : s[c](); | ||
for (a = S; a < p; a++) | ||
a in L ? (r[a] = L[a], s[a] = H[a], l && (l[a] = D[a], l[a](a))) : r[a] = G(b); | ||
r = r.slice(0, i = p), o = d.slice(0); | ||
for (O = s - 1, P = g - 1; O >= T && P >= T && o[O] === d[P]; O--, P--) | ||
$[P] = r[O], y[P] = l[O], i && (B[P] = i[O]); | ||
for (C = /* @__PURE__ */ new Map(), S = new Array(P + 1), a = P; a >= T; a--) | ||
F = d[a], c = C.get(F), S[a] = c === void 0 ? -1 : c, C.set(F, a); | ||
for (c = T; c <= O; c++) | ||
F = o[c], a = C.get(F), a !== void 0 && a !== -1 ? ($[a] = r[c], y[a] = l[c], i && (B[a] = i[c]), a = S[a], C.set(F, a)) : l[c](); | ||
for (a = T; a < g; a++) | ||
a in $ ? (r[a] = $[a], l[a] = y[a], i && (i[a] = B[a], i[a](a))) : r[a] = V(h); | ||
r = r.slice(0, s = g), o = d.slice(0); | ||
} | ||
return r; | ||
}); | ||
function b(p) { | ||
if (s[a] = p, l) { | ||
const [w, E] = A(a); | ||
return l[a] = E, n(d[a], w); | ||
function h(g) { | ||
if (l[a] = g, i) { | ||
const [C, S] = z(a); | ||
return i[a] = S, n(d[a], C); | ||
} | ||
@@ -271,23 +271,23 @@ return n(d[a]); | ||
} | ||
function k(e, n) { | ||
return O(() => e(n || {})); | ||
function w(e, n) { | ||
return I(() => e(n || {})); | ||
} | ||
const Be = (e) => `Stale read from <${e}>.`; | ||
function ie(e) { | ||
const je = (e) => `Stale read from <${e}>.`; | ||
function H(e) { | ||
const n = "fallback" in e && { | ||
fallback: () => e.fallback | ||
}; | ||
return N(je(() => e.each, e.children, n || void 0)); | ||
return L(Oe(() => e.each, e.children, n || void 0)); | ||
} | ||
function B(e) { | ||
const n = e.keyed, t = N(() => e.when, void 0, { | ||
function j(e) { | ||
const n = e.keyed, t = L(() => e.when, void 0, { | ||
equals: (o, r) => n ? o === r : !o == !r | ||
}); | ||
return N(() => { | ||
return L(() => { | ||
const o = t(); | ||
if (o) { | ||
const r = e.children; | ||
return typeof r == "function" && r.length > 0 ? O(() => r(n ? o : () => { | ||
if (!O(t)) | ||
throw Be("Show"); | ||
return typeof r == "function" && r.length > 0 ? I(() => r(n ? o : () => { | ||
if (!I(t)) | ||
throw je("Show"); | ||
return e.when; | ||
@@ -299,44 +299,44 @@ })) : r; | ||
} | ||
function Oe(e, n, t) { | ||
let o = t.length, r = n.length, s = o, i = 0, l = 0, d = n[r - 1].nextSibling, c = null; | ||
for (; i < r || l < s; ) { | ||
if (n[i] === t[l]) { | ||
i++, l++; | ||
function Be(e, n, t) { | ||
let o = t.length, r = n.length, l = o, s = 0, i = 0, d = n[r - 1].nextSibling, c = null; | ||
for (; s < r || i < l; ) { | ||
if (n[s] === t[i]) { | ||
s++, i++; | ||
continue; | ||
} | ||
for (; n[r - 1] === t[s - 1]; ) | ||
r--, s--; | ||
if (r === i) { | ||
const a = s < o ? l ? t[l - 1].nextSibling : t[s - l] : d; | ||
for (; l < s; ) | ||
e.insertBefore(t[l++], a); | ||
} else if (s === l) | ||
for (; i < r; ) | ||
(!c || !c.has(n[i])) && n[i].remove(), i++; | ||
else if (n[i] === t[s - 1] && t[l] === n[r - 1]) { | ||
for (; n[r - 1] === t[l - 1]; ) | ||
r--, l--; | ||
if (r === s) { | ||
const a = l < o ? i ? t[i - 1].nextSibling : t[l - i] : d; | ||
for (; i < l; ) | ||
e.insertBefore(t[i++], a); | ||
} else if (l === i) | ||
for (; s < r; ) | ||
(!c || !c.has(n[s])) && n[s].remove(), s++; | ||
else if (n[s] === t[l - 1] && t[i] === n[r - 1]) { | ||
const a = n[--r].nextSibling; | ||
e.insertBefore(t[l++], n[i++].nextSibling), e.insertBefore(t[--s], a), n[r] = t[s]; | ||
e.insertBefore(t[i++], n[s++].nextSibling), e.insertBefore(t[--l], a), n[r] = t[l]; | ||
} else { | ||
if (!c) { | ||
c = /* @__PURE__ */ new Map(); | ||
let b = l; | ||
for (; b < s; ) | ||
c.set(t[b], b++); | ||
let h = i; | ||
for (; h < l; ) | ||
c.set(t[h], h++); | ||
} | ||
const a = c.get(n[i]); | ||
const a = c.get(n[s]); | ||
if (a != null) | ||
if (l < a && a < s) { | ||
let b = i, p = 1, w; | ||
for (; ++b < r && b < s && !((w = c.get(n[b])) == null || w !== a + p); ) | ||
p++; | ||
if (p > a - l) { | ||
const E = n[i]; | ||
for (; l < a; ) | ||
e.insertBefore(t[l++], E); | ||
if (i < a && a < l) { | ||
let h = s, g = 1, C; | ||
for (; ++h < r && h < l && !((C = c.get(n[h])) == null || C !== a + g); ) | ||
g++; | ||
if (g > a - i) { | ||
const S = n[s]; | ||
for (; i < a; ) | ||
e.insertBefore(t[i++], S); | ||
} else | ||
e.replaceChild(t[l++], n[i++]); | ||
e.replaceChild(t[i++], n[s++]); | ||
} else | ||
i++; | ||
s++; | ||
else | ||
n[i++].remove(); | ||
n[s++].remove(); | ||
} | ||
@@ -349,27 +349,27 @@ } | ||
const r = () => { | ||
const i = document.createElement("template"); | ||
return i.innerHTML = e, t ? i.content.firstChild.firstChild : i.content.firstChild; | ||
}, s = n ? () => (o || (o = r())).cloneNode(!0) : () => O(() => document.importNode(o || (o = r()), !0)); | ||
return s.cloneNode = s, s; | ||
const s = document.createElement("template"); | ||
return s.innerHTML = e, t ? s.content.firstChild.firstChild : s.content.firstChild; | ||
}, l = n ? () => (o || (o = r())).cloneNode(!0) : () => I(() => document.importNode(o || (o = r()), !0)); | ||
return l.cloneNode = l, l; | ||
} | ||
function Q(e, n = window.document) { | ||
function M(e, n = window.document) { | ||
const t = n[ae] || (n[ae] = /* @__PURE__ */ new Set()); | ||
for (let o = 0, r = e.length; o < r; o++) { | ||
const s = e[o]; | ||
t.has(s) || (t.add(s), n.addEventListener(s, Re)); | ||
const l = e[o]; | ||
t.has(l) || (t.add(l), n.addEventListener(l, Re)); | ||
} | ||
} | ||
function x(e, n, t) { | ||
function E(e, n, t) { | ||
t == null ? e.removeAttribute(n) : e.setAttribute(n, t); | ||
} | ||
function Y(e, n) { | ||
function D(e, n) { | ||
n == null ? e.removeAttribute("class") : e.className = n; | ||
} | ||
function Pe(e, n, t) { | ||
return O(() => e(n, t)); | ||
return I(() => e(n, t)); | ||
} | ||
function f(e, n, t, o) { | ||
if (t !== void 0 && !o && (o = []), typeof n != "function") | ||
return J(e, n, o, t); | ||
g((r) => J(e, n(), r, t), o); | ||
return X(e, n, o, t); | ||
p((r) => X(e, n(), r, t), o); | ||
} | ||
@@ -397,3 +397,3 @@ function Re(e) { | ||
} | ||
function J(e, n, t, o, r) { | ||
function X(e, n, t, o, r) { | ||
for (; typeof t == "function"; ) | ||
@@ -403,34 +403,34 @@ t = t(); | ||
return t; | ||
const s = typeof n, i = o !== void 0; | ||
if (e = i && t[0] && t[0].parentNode || e, s === "string" || s === "number") | ||
if (s === "number" && (n = n.toString()), i) { | ||
let l = t[0]; | ||
l && l.nodeType === 3 ? l.data = n : l = document.createTextNode(n), t = I(e, t, o, l); | ||
const l = typeof n, s = o !== void 0; | ||
if (e = s && t[0] && t[0].parentNode || e, l === "string" || l === "number") | ||
if (l === "number" && (n = n.toString()), s) { | ||
let i = t[0]; | ||
i && i.nodeType === 3 ? i.data = n : i = document.createTextNode(n), t = K(e, t, o, i); | ||
} else | ||
t !== "" && typeof t == "string" ? t = e.firstChild.data = n : t = e.textContent = n; | ||
else if (n == null || s === "boolean") | ||
t = I(e, t, o); | ||
else if (n == null || l === "boolean") | ||
t = K(e, t, o); | ||
else { | ||
if (s === "function") | ||
return g(() => { | ||
let l = n(); | ||
for (; typeof l == "function"; ) | ||
l = l(); | ||
t = J(e, l, t, o); | ||
if (l === "function") | ||
return p(() => { | ||
let i = n(); | ||
for (; typeof i == "function"; ) | ||
i = i(); | ||
t = X(e, i, t, o); | ||
}), () => t; | ||
if (Array.isArray(n)) { | ||
const l = [], d = t && Array.isArray(t); | ||
if (te(l, n, t, r)) | ||
return g(() => t = J(e, l, t, o, !0)), () => t; | ||
if (l.length === 0) { | ||
if (t = I(e, t, o), i) | ||
const i = [], d = t && Array.isArray(t); | ||
if (re(i, n, t, r)) | ||
return p(() => t = X(e, i, t, o, !0)), () => t; | ||
if (i.length === 0) { | ||
if (t = K(e, t, o), s) | ||
return t; | ||
} else | ||
d ? t.length === 0 ? ce(e, l, o) : Oe(e, t, l) : (t && I(e), ce(e, l)); | ||
t = l; | ||
d ? t.length === 0 ? ce(e, i, o) : Be(e, t, i) : (t && K(e), ce(e, i)); | ||
t = i; | ||
} else if (n instanceof Node) { | ||
if (Array.isArray(t)) { | ||
if (i) | ||
return t = I(e, t, o, n); | ||
I(e, t, null, n); | ||
if (s) | ||
return t = K(e, t, o, n); | ||
K(e, t, null, n); | ||
} else | ||
@@ -444,20 +444,20 @@ t == null || t === "" || !e.firstChild ? e.appendChild(n) : e.replaceChild(n, e.firstChild); | ||
} | ||
function te(e, n, t, o) { | ||
function re(e, n, t, o) { | ||
let r = !1; | ||
for (let s = 0, i = n.length; s < i; s++) { | ||
let l = n[s], d = t && t[s]; | ||
if (l instanceof Node) | ||
e.push(l); | ||
else if (!(l == null || l === !0 || l === !1)) | ||
if (Array.isArray(l)) | ||
r = te(e, l, d) || r; | ||
else if (typeof l == "function") | ||
for (let l = 0, s = n.length; l < s; l++) { | ||
let i = n[l], d = t && t[l]; | ||
if (i instanceof Node) | ||
e.push(i); | ||
else if (!(i == null || i === !0 || i === !1)) | ||
if (Array.isArray(i)) | ||
r = re(e, i, d) || r; | ||
else if (typeof i == "function") | ||
if (o) { | ||
for (; typeof l == "function"; ) | ||
l = l(); | ||
r = te(e, Array.isArray(l) ? l : [l], Array.isArray(d) ? d : [d]) || r; | ||
for (; typeof i == "function"; ) | ||
i = i(); | ||
r = re(e, Array.isArray(i) ? i : [i], Array.isArray(d) ? d : [d]) || r; | ||
} else | ||
e.push(l), r = !0; | ||
e.push(i), r = !0; | ||
else { | ||
const c = String(l); | ||
const c = String(i); | ||
d && d.nodeType === 3 ? (d.data = c, e.push(d)) : e.push(document.createTextNode(c)); | ||
@@ -472,3 +472,3 @@ } | ||
} | ||
function I(e, n, t, o) { | ||
function K(e, n, t, o) { | ||
if (t === void 0) | ||
@@ -478,10 +478,10 @@ return e.textContent = ""; | ||
if (n.length) { | ||
let s = !1; | ||
for (let i = n.length - 1; i >= 0; i--) { | ||
const l = n[i]; | ||
if (r !== l) { | ||
const d = l.parentNode === e; | ||
!s && !i ? d ? e.replaceChild(r, l) : e.insertBefore(r, t) : d && l.remove(); | ||
let l = !1; | ||
for (let s = n.length - 1; s >= 0; s--) { | ||
const i = n[s]; | ||
if (r !== i) { | ||
const d = i.parentNode === e; | ||
!l && !s ? d ? e.replaceChild(r, i) : e.insertBefore(r, t) : d && i.remove(); | ||
} else | ||
s = !0; | ||
l = !0; | ||
} | ||
@@ -495,3 +495,3 @@ } else | ||
const r = e[o]; | ||
return t[o] = Object.assign({}, r), _e(r.value) && !He(r.value) && !Array.isArray(r.value) && (t[o].value = Object.assign({}, r.value)), Array.isArray(r.value) && (t[o].value = r.value.slice(0)), t; | ||
return t[o] = Object.assign({}, r), ye(r.value) && !He(r.value) && !Array.isArray(r.value) && (t[o].value = Object.assign({}, r.value)), Array.isArray(r.value) && (t[o].value = r.value.slice(0)), t; | ||
}, {}); | ||
@@ -502,3 +502,3 @@ } | ||
const r = e[o]; | ||
return t[o] = _e(r) && "value" in r ? r : { | ||
return t[o] = ye(r) && "value" in r ? r : { | ||
value: r | ||
@@ -514,11 +514,11 @@ }, t[o].attribute || (t[o].attribute = Ke(o)), t[o].parse = "parse" in t[o] ? t[o].parse : typeof t[o].value != "string", t; | ||
return Object.keys(n).forEach((r) => { | ||
const s = t[r], i = e.getAttribute(s.attribute), l = e[r]; | ||
i && (s.value = s.parse ? ye(i) : i), l != null && (s.value = Array.isArray(l) ? l.slice(0) : l), s.reflect && ue(e, s.attribute, s.value), Object.defineProperty(e, r, { | ||
const l = t[r], s = e.getAttribute(l.attribute), i = e[r]; | ||
s && (l.value = l.parse ? _e(s) : s), i != null && (l.value = Array.isArray(i) ? i.slice(0) : i), l.reflect && ue(e, l.attribute, l.value), Object.defineProperty(e, r, { | ||
get() { | ||
return s.value; | ||
return l.value; | ||
}, | ||
set(d) { | ||
const c = s.value; | ||
s.value = d, s.reflect && ue(this, s.attribute, s.value); | ||
for (let a = 0, b = this.__propertyChangedCallbacks.length; a < b; a++) | ||
const c = l.value; | ||
l.value = d, l.reflect && ue(this, l.attribute, l.value); | ||
for (let a = 0, h = this.__propertyChangedCallbacks.length; a < h; a++) | ||
this.__propertyChangedCallbacks[a](r, d, c); | ||
@@ -531,3 +531,3 @@ }, | ||
} | ||
function ye(e) { | ||
function _e(e) { | ||
if (e) | ||
@@ -549,3 +549,3 @@ try { | ||
} | ||
function _e(e) { | ||
function ye(e) { | ||
return e != null && (typeof e == "object" || typeof e == "function"); | ||
@@ -559,3 +559,3 @@ } | ||
} | ||
let ee; | ||
let ne; | ||
function Ge(e, n) { | ||
@@ -574,11 +574,11 @@ const t = Object.keys(n); | ||
this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = Fe(this, n); | ||
const r = Le(this.props), s = this.Component, i = ee; | ||
const r = Le(this.props), l = this.Component, s = ne; | ||
try { | ||
ee = this, this.__initialized = !0, De(s) ? new s(r, { | ||
ne = this, this.__initialized = !0, De(l) ? new l(r, { | ||
element: this | ||
}) : s(r, { | ||
}) : l(r, { | ||
element: this | ||
}); | ||
} finally { | ||
ee = i; | ||
ne = s; | ||
} | ||
@@ -595,7 +595,7 @@ } | ||
} | ||
attributeChangedCallback(r, s, i) { | ||
attributeChangedCallback(r, l, s) { | ||
if (this.__initialized && !this.__updating[r] && (r = this.lookupProp(r), r in n)) { | ||
if (i == null && !this[r]) | ||
if (s == null && !this[r]) | ||
return; | ||
this[r] = n[r].parse ? ye(i) : i; | ||
this[r] = n[r].parse ? _e(s) : s; | ||
} | ||
@@ -605,3 +605,3 @@ } | ||
if (n) | ||
return t.find((s) => r === s || r === n[s].attribute); | ||
return t.find((l) => r === l || r === n[l].attribute); | ||
} | ||
@@ -626,7 +626,7 @@ get renderRoot() { | ||
} = t; | ||
return (s) => { | ||
return (l) => { | ||
if (!e) | ||
throw new Error("tag is required to register a Component"); | ||
let i = customElements.get(e); | ||
return i ? (i.prototype.Component = s, i) : (i = Ge(o, Ne(n)), i.prototype.Component = s, i.prototype.registeredTag = e, customElements.define(e, i, r), i); | ||
let s = customElements.get(e); | ||
return s ? (s.prototype.Component = l, s) : (s = Ge(o, Ne(n)), s.prototype.Component = l, s.prototype.registeredTag = e, customElements.define(e, s, r), s); | ||
}; | ||
@@ -637,7 +637,7 @@ } | ||
for (let o = 0; o < n.length; o++) { | ||
const [r, s] = A(e[n[o]]); | ||
const [r, l] = z(e[n[o]]); | ||
Object.defineProperty(t, n[o], { | ||
get: r, | ||
set(i) { | ||
s(() => i); | ||
set(s) { | ||
l(() => s); | ||
} | ||
@@ -659,9 +659,9 @@ }); | ||
const { element: o } = t; | ||
return G((r) => { | ||
const s = Me(n); | ||
o.addPropertyChangedCallback((l, d) => s[l] = d), o.addReleaseCallback(() => { | ||
return V((r) => { | ||
const l = Me(n); | ||
o.addPropertyChangedCallback((i, d) => l[i] = d), o.addReleaseCallback(() => { | ||
o.renderRoot.textContent = "", r(); | ||
}); | ||
const i = e(s, t); | ||
return f(o.renderRoot, i); | ||
const s = e(l, t); | ||
return f(o.renderRoot, s); | ||
}, Ve(o)); | ||
@@ -673,7 +673,7 @@ }; | ||
} | ||
const v = "ar", Ye = `:host{align-items:center;border-radius:var(--border-radius);display:inline-flex;height:var(--input-height)}button{align-items:center;background:inherit;border:none;border-radius:inherit;box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;font:inherit;gap:var(--gap);height:inherit;justify-content:center;outline:none;padding:0 12px;width:inherit}button:hover{filter:brightness(1.1)}.primary{background-image:var(--accent-gradient);color:var(--accent-color)}.primary.text{background-image:none;color:var(--primary-color)}.primary.outline{background-image:none;border:1px solid var(--primary-color);color:var(--primary-color)}.primary:hover{filter:brightness(1.2)}.info{background:var(--info-color)}.info.text{background:none;color:var(--text-color)}.info.outline{background:none;border:1px solid var(--info-color);color:var(--text-color)}.info:hover{filter:brightness(.95)}.warning{background:var(--warning-color);color:var(--accent-color)}.warning.text{background:none;color:var(--warning-color)}.warning.outline{background:none;border:1px solid var(--warning-color);color:var(--warning-color)}.danger{background:var(--danger-color);color:var(--accent-color)}.danger.text{background:none;color:var(--danger-color)}.danger.outline{background:none;border:1px solid var(--danger-color);color:var(--danger-color)}.success{background:var(--success-color);color:var(--accent-color)}.success.text{background:none;color:var(--success-color)}.success.outline{background:none;border:1px solid var(--success-color);color:var(--success-color)}.circle{border-radius:50%;padding:0 2px;width:var(--input-height)}.round{border-radius:var(--round-radius)} | ||
const _ = "ar", Ye = `:host{align-items:center;border-radius:var(--border-radius);display:inline-flex;height:var(--input-height)}button{align-items:center;background:inherit;border:none;border-radius:inherit;box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;font:inherit;gap:var(--gap);height:inherit;justify-content:center;outline:none;padding:0 12px;width:inherit}button:hover{filter:brightness(1.1)}.primary{background-image:var(--accent-gradient);color:var(--accent-color)}.primary.text{background-image:none;color:var(--primary-color)}.primary.outline{background-image:none;border:1px solid var(--primary-color);color:var(--primary-color)}.primary:hover{filter:brightness(1.2)}.info{background:var(--info-color)}.info.text{background:none;color:var(--text-color)}.info.outline{background:none;border:1px solid var(--info-color);color:var(--text-color)}.info:hover{filter:brightness(.95)}.warning{background:var(--warning-color);color:var(--accent-color)}.warning.text{background:none;color:var(--warning-color)}.warning.outline{background:none;border:1px solid var(--warning-color);color:var(--warning-color)}.danger{background:var(--danger-color);color:var(--accent-color)}.danger.text{background:none;color:var(--danger-color)}.danger.outline{background:none;border:1px solid var(--danger-color);color:var(--danger-color)}.success{background:var(--success-color);color:var(--accent-color)}.success.text{background:none;color:var(--success-color)}.success.outline{background:none;border:1px solid var(--success-color);color:var(--success-color)}.circle{border-radius:50%;padding:0 2px;width:var(--input-height)}.round{border-radius:var(--round-radius)} | ||
`, Je = /* @__PURE__ */ u("<style>"), de = /* @__PURE__ */ u('<ar-icon name="loading" spin>', !0, !1), We = /* @__PURE__ */ u("<button>"), Xe = /* @__PURE__ */ u('<button><slot></slot><slot name="suffix">'), Qe = /* @__PURE__ */ u('<slot name="prefix">'), Ze = /* @__PURE__ */ u("<slot>"), et = (e) => [(() => { | ||
const n = Je(); | ||
return f(n, Ye), n; | ||
})(), k(B, { | ||
})(), w(j, { | ||
get when() { | ||
@@ -685,3 +685,3 @@ return e.shape === "circle"; | ||
const n = Xe(), t = n.firstChild, o = t.nextSibling; | ||
return f(n, k(B, { | ||
return f(n, w(j, { | ||
get when() { | ||
@@ -693,3 +693,3 @@ return e.loading; | ||
const r = Qe(); | ||
return r._$owner = h(), r; | ||
return r._$owner = b(), r; | ||
})(); | ||
@@ -699,5 +699,5 @@ }, | ||
const r = de(); | ||
return r._$owner = h(), r; | ||
return r._$owner = b(), r; | ||
} | ||
}), t), t._$owner = h(), o._$owner = h(), g(() => Y(n, `${e.status} ${e.type} ${e.shape}`)), n; | ||
}), t), t._$owner = b(), o._$owner = b(), p(() => D(n, `${e.status} ${e.type} ${e.shape}`)), n; | ||
})(); | ||
@@ -707,3 +707,3 @@ }, | ||
const n = We(); | ||
return f(n, k(B, { | ||
return f(n, w(j, { | ||
get when() { | ||
@@ -715,3 +715,3 @@ return e.loading; | ||
const t = Ze(); | ||
return t._$owner = h(), t; | ||
return t._$owner = b(), t; | ||
})(); | ||
@@ -721,8 +721,8 @@ }, | ||
const t = de(); | ||
return t._$owner = h(), t; | ||
return t._$owner = b(), t; | ||
} | ||
})), g(() => Y(n, `${e.status} ${e.type} ${e.shape}`)), n; | ||
})), p(() => D(n, `${e.status} ${e.type} ${e.shape}`)), n; | ||
} | ||
})], tt = () => { | ||
m(`${v}-button`, { | ||
m(`${_}-button`, { | ||
type: "default", | ||
@@ -733,3 +733,3 @@ status: "primary", | ||
}, et); | ||
}, C = (e, ...n) => e.reduce((o, r, s) => o + r + (n[s] || ""), ""), nt = /* @__PURE__ */ u('<ar-icon size="5rem">', !0, !1), rt = /* @__PURE__ */ u('<div class="flex flex-col justify-center gap-2 h-20"><div class="font-bold"></div><div class="font-size-3">'), ot = /* @__PURE__ */ u('<img class="w-20 rd-2" alt="logo">'), st = /* @__PURE__ */ u('<img class="w-6" alt="avatar">'), it = /* @__PURE__ */ u("<div>"), lt = /* @__PURE__ */ u(`<style>/* layer: preflights */ | ||
}, A = (e, ...n) => e.reduce((o, r, l) => o + r + (n[l] || ""), ""), nt = /* @__PURE__ */ u('<ar-icon size="5rem">', !0, !1), rt = /* @__PURE__ */ u('<div class="flex flex-col justify-center gap-2 h-20"><div class="font-bold"></div><div class="font-size-3">'), ot = /* @__PURE__ */ u('<img class="w-20 rd-2" alt="logo">'), lt = /* @__PURE__ */ u('<img class="w-6" alt="avatar">'), st = /* @__PURE__ */ u("<div>"), it = /* @__PURE__ */ u(`<style>/* layer: preflights */ | ||
*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;} | ||
@@ -754,3 +754,3 @@ /* layer: default */ | ||
.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / 0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / 0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);};`), at = /* @__PURE__ */ u('<slot class="flex items-center p-3 gap-3" style="border-bottom:1px solid var(--gray-2)" name="header">'), ct = /* @__PURE__ */ u('<slot name="footer" class="flex items-center p-3 gap-3" style="border-top:1px solid var(--gray-2)">'), ut = /* @__PURE__ */ u('<div class="bg-1 rd-3 cursor-pointer"><slot class="flex items-center p-3 gap-3">'), dt = (e) => { | ||
const n = C` | ||
const n = A` | ||
:host { | ||
@@ -766,3 +766,3 @@ display: block; | ||
} | ||
`, t = () => [k(B, { | ||
`, t = () => [w(j, { | ||
get when() { | ||
@@ -774,3 +774,3 @@ return e.icon; | ||
const r = ot(); | ||
return g(() => x(r, "src", e.logo)), r; | ||
return p(() => E(r, "src", e.logo)), r; | ||
})(); | ||
@@ -780,20 +780,20 @@ }, | ||
const r = nt(); | ||
return r._$owner = h(), g(() => r.name = e.logo), r; | ||
return r._$owner = b(), p(() => r.name = e.logo), r; | ||
} | ||
}), (() => { | ||
const r = rt(), s = r.firstChild, i = s.nextSibling; | ||
return f(s, () => e.title), f(i, () => e.description), r; | ||
const r = rt(), l = r.firstChild, s = l.nextSibling; | ||
return f(l, () => e.title), f(s, () => e.description), r; | ||
})()], o = () => [(() => { | ||
const r = lt(); | ||
return p(() => E(r, "src", e.avatar || "/apple-touch-icon.png")), r; | ||
})(), (() => { | ||
const r = st(); | ||
return g(() => x(r, "src", e.avatar || "/apple-touch-icon.png")), r; | ||
})(), (() => { | ||
const r = it(); | ||
return f(r, () => e.creator || "A-M"), r; | ||
})()]; | ||
return [(() => { | ||
const r = lt(), s = r.firstChild; | ||
return f(r, n, s), r; | ||
const r = it(), l = r.firstChild; | ||
return f(r, n, l), r; | ||
})(), (() => { | ||
const r = ut(), s = r.firstChild; | ||
return f(r, k(B, { | ||
const r = ut(), l = r.firstChild; | ||
return f(r, w(j, { | ||
get when() { | ||
@@ -803,6 +803,6 @@ return e.header; | ||
get children() { | ||
const i = at(); | ||
return i._$owner = h(), i; | ||
const s = at(); | ||
return s._$owner = b(), s; | ||
} | ||
}), s), s._$owner = h(), f(s, t), f(r, k(B, { | ||
}), l), l._$owner = b(), f(l, t), f(r, w(j, { | ||
get when() { | ||
@@ -812,4 +812,4 @@ return e.footer; | ||
get children() { | ||
const i = ct(); | ||
return i._$owner = h(), f(i, o), i; | ||
const s = ct(); | ||
return s._$owner = b(), f(s, o), s; | ||
} | ||
@@ -819,3 +819,3 @@ }), null), r; | ||
}, ft = () => { | ||
m(`${v}-card`, { | ||
m(`${_}-card`, { | ||
header: !1, | ||
@@ -843,4 +843,4 @@ footer: !0, | ||
.rd-3{border-radius:0.75rem;} | ||
.p-x-3{padding-left:0.75rem;padding-right:0.75rem;};`), gt = /* @__PURE__ */ u('<ar-icon size="2.75rem">', !0, !1), bt = /* @__PURE__ */ u('<div class="chat-avatar flex items-center">'), pt = /* @__PURE__ */ u('<div class="flex items-center gap-3"><p></p><ar-icon name="loading" spin>', !0, !1), $t = /* @__PURE__ */ u('<div><div class="chat-content p-x-3 rd-3">'), mt = /* @__PURE__ */ u('<img class="w-11 rd-2 self-start" alt="avatar">'), vt = /* @__PURE__ */ u("<ar-rich-text>", !0, !1), yt = (e) => { | ||
const n = C` | ||
.p-x-3{padding-left:0.75rem;padding-right:0.75rem;};`), gt = /* @__PURE__ */ u('<ar-icon size="2.75rem">', !0, !1), bt = /* @__PURE__ */ u('<div class="chat-avatar flex items-center">'), pt = /* @__PURE__ */ u('<div class="flex items-center gap-3"><p></p><ar-icon name="loading" spin>', !0, !1), $t = /* @__PURE__ */ u('<div><div class="chat-content p-x-3 rd-3">'), vt = /* @__PURE__ */ u('<img class="w-11 rd-2 self-start" alt="avatar">'), mt = /* @__PURE__ */ u("<ar-rich-text>", !0, !1), _t = (e) => { | ||
const n = A` | ||
:host { | ||
@@ -891,3 +891,3 @@ display: block; | ||
const t = $t(), o = t.firstChild; | ||
return f(t, k(B, { | ||
return f(t, w(j, { | ||
get when() { | ||
@@ -898,3 +898,3 @@ return e.showAvatar; | ||
const r = bt(); | ||
return f(r, k(B, { | ||
return f(r, w(j, { | ||
get when() { | ||
@@ -905,13 +905,13 @@ return e.avatarType === "icon"; | ||
return (() => { | ||
const s = mt(); | ||
return g(() => x(s, "src", e.avatar)), s; | ||
const l = vt(); | ||
return p(() => E(l, "src", e.avatar)), l; | ||
})(); | ||
}, | ||
get children() { | ||
const s = gt(); | ||
return s._$owner = h(), g(() => s.name = e.role === "user" ? e.avatar || "avatar-01" : e.avatar || "ai-chat"), s; | ||
const l = gt(); | ||
return l._$owner = b(), p(() => l.name = e.role === "user" ? e.avatar || "avatar-01" : e.avatar || "ai-chat"), l; | ||
} | ||
})), r; | ||
} | ||
}), o), f(o, k(B, { | ||
}), o), f(o, w(j, { | ||
get when() { | ||
@@ -922,14 +922,14 @@ return e.loading; | ||
return (() => { | ||
const r = vt(); | ||
return r._$owner = h(), g(() => r.text = e.content), r; | ||
const r = mt(); | ||
return r._$owner = b(), p(() => r.text = e.content), r; | ||
})(); | ||
}, | ||
get children() { | ||
const r = pt(), s = r.firstChild, i = s.nextSibling; | ||
return f(s, () => e.loadingText), i._$owner = h(), r; | ||
const r = pt(), l = r.firstChild, s = l.nextSibling; | ||
return f(l, () => e.loadingText), s._$owner = b(), r; | ||
} | ||
})), g(() => Y(t, `chat-bubble ${e.role === "user" ? "right" : "left"} m-3`)), t; | ||
})), p(() => D(t, `chat-bubble ${e.role === "user" ? "right" : "left"} m-3`)), t; | ||
})()]; | ||
}, _t = () => { | ||
m(`${v}-chat-bubble`, { | ||
}, yt = () => { | ||
m(`${_}-chat-bubble`, { | ||
role: "", | ||
@@ -943,7 +943,7 @@ content: "", | ||
direction: "row" | ||
}, yt); | ||
}, _t); | ||
}, xt = /* @__PURE__ */ u("<style>"), wt = /* @__PURE__ */ u('<label class="container"><input type="checkbox"><div class="checkmark"></div><slot>'), kt = (e, { | ||
element: n | ||
}) => { | ||
const t = C` | ||
const t = A` | ||
:host { | ||
@@ -1025,7 +1025,7 @@ display: inline-block; | ||
} | ||
`, [o, r] = A(e.value), s = (i) => { | ||
`, [o, r] = z(e.value), l = (s) => { | ||
r(!o()); | ||
const l = i.target, d = new CustomEvent("change", { | ||
const i = s.target, d = new CustomEvent("change", { | ||
detail: { | ||
value: l.value | ||
value: i.value | ||
} | ||
@@ -1036,10 +1036,10 @@ }); | ||
return [(() => { | ||
const i = xt(); | ||
return f(i, t), i; | ||
const s = xt(); | ||
return f(s, t), s; | ||
})(), (() => { | ||
const i = wt(), l = i.firstChild, d = l.nextSibling, c = d.nextSibling; | ||
return l.addEventListener("change", s), c._$owner = h(), g(() => l.checked = o()), i; | ||
const s = wt(), i = s.firstChild, d = i.nextSibling, c = d.nextSibling; | ||
return i.addEventListener("change", l), c._$owner = b(), p(() => i.checked = o()), s; | ||
})()]; | ||
}, Ct = () => { | ||
m(`${v}-checkbox`, { | ||
m(`${_}-checkbox`, { | ||
value: !1 | ||
@@ -1050,3 +1050,3 @@ }, kt); | ||
}) => { | ||
const t = C` | ||
const t = A` | ||
:host { | ||
@@ -1071,3 +1071,3 @@ display: inline-block; | ||
`; | ||
return oe(() => { | ||
return le(() => { | ||
setTimeout(() => { | ||
@@ -1082,10 +1082,10 @@ const o = n.shadowRoot.querySelector(".nums-chip"); | ||
}, xe = () => { | ||
m(`${v}-dance-number`, { | ||
m(`${_}-dance-number`, { | ||
number: 0, | ||
size: 12 | ||
}, zt); | ||
}, At = /* @__PURE__ */ u("<style>"), Tt = /* @__PURE__ */ u("<span>,"), jt = /* @__PURE__ */ u("<div><ar-dance-number>", !0, !1); | ||
}, At = /* @__PURE__ */ u("<style>"), Tt = /* @__PURE__ */ u("<span>,"), Ot = /* @__PURE__ */ u("<div><ar-dance-number>", !0, !1); | ||
xe(); | ||
const Bt = (e) => { | ||
const n = C` | ||
const jt = (e) => { | ||
const n = A` | ||
:host { | ||
@@ -1113,9 +1113,9 @@ display: inline-flex; | ||
return f(o, n), o; | ||
})(), k(ie, { | ||
})(), w(H, { | ||
each: t, | ||
children: (o) => o === "," ? Tt() : (() => { | ||
const r = jt(), s = r.firstChild; | ||
return s.number = o, s._$owner = h(), g((i) => { | ||
const l = e.type === "card" ? "card" : "", d = e.size; | ||
return l !== i._v$ && Y(r, i._v$ = l), d !== i._v$2 && (s.size = i._v$2 = d), i; | ||
const r = Ot(), l = r.firstChild; | ||
return l.number = o, l._$owner = b(), p((s) => { | ||
const i = e.type === "card" ? "card" : "", d = e.size; | ||
return i !== s._v$ && D(r, s._v$ = i), d !== s._v$2 && (l.size = s._v$2 = d), s; | ||
}, { | ||
@@ -1127,10 +1127,10 @@ _v$: void 0, | ||
})]; | ||
}, Ot = () => { | ||
m(`${v}-dance-count`, { | ||
}, Bt = () => { | ||
m(`${_}-dance-count`, { | ||
count: 0, | ||
size: 12, | ||
type: "default" | ||
}, Bt); | ||
}, jt); | ||
}, Pt = /* @__PURE__ */ u("<style>"), Rt = /* @__PURE__ */ u("<slot>"), It = (e) => { | ||
const n = C` | ||
const n = A` | ||
:host { | ||
@@ -1151,6 +1151,6 @@ display: flex; | ||
const t = Rt(); | ||
return t._$owner = h(), t; | ||
return t._$owner = b(), t; | ||
})()]; | ||
}, Nt = () => { | ||
m(`${v}-flex-box`, { | ||
m(`${_}-flex-box`, { | ||
gap: "1rem", | ||
@@ -1163,3 +1163,3 @@ direction: "row", | ||
}, Lt = /* @__PURE__ */ u("<style>"), Ft = /* @__PURE__ */ u("<slot>"), Kt = (e) => { | ||
const n = C` | ||
const n = A` | ||
:host { | ||
@@ -1176,6 +1176,6 @@ order: ${e.order}; | ||
const t = Ft(); | ||
return t._$owner = h(), t; | ||
return t._$owner = b(), t; | ||
})()]; | ||
}, Ht = () => { | ||
m(`${v}-flex-item`, { | ||
m(`${_}-flex-item`, { | ||
order: 0, | ||
@@ -1187,8 +1187,8 @@ flex: "0 1 auto", | ||
`, Gt = /* @__PURE__ */ u("<style>"), Ut = /* @__PURE__ */ u('<svg aria-hidden="true"><use>'); | ||
let ne = ""; | ||
const Yn = (e) => { | ||
ne = e; | ||
let oe = ""; | ||
const nr = (e) => { | ||
oe = e; | ||
}, Mt = (e) => { | ||
const n = `icon icon-${e.name}`; | ||
return ne || console.warn("You need use registerIcon first"), [(() => { | ||
return oe || console.warn("You need use registerIcon first"), [(() => { | ||
const t = Gt(); | ||
@@ -1198,5 +1198,5 @@ return f(t, Dt), t; | ||
const t = Ut(), o = t.firstChild; | ||
return x(t, "class", n), g((r) => { | ||
const s = e.size, i = e.size, l = e.color, d = `${ne}#icon-${e.name}`; | ||
return s !== r._v$ && x(t, "width", r._v$ = s), i !== r._v$2 && x(t, "height", r._v$2 = i), l !== r._v$3 && x(t, "fill", r._v$3 = l), d !== r._v$4 && x(o, "href", r._v$4 = d), r; | ||
return E(t, "class", n), p((r) => { | ||
const l = e.size, s = e.size, i = e.color, d = `${oe}#icon-${e.name}`; | ||
return l !== r._v$ && E(t, "width", r._v$ = l), s !== r._v$2 && E(t, "height", r._v$2 = s), i !== r._v$3 && E(t, "fill", r._v$3 = i), d !== r._v$4 && E(o, "href", r._v$4 = d), r; | ||
}, { | ||
@@ -1210,3 +1210,3 @@ _v$: void 0, | ||
}, Vt = () => { | ||
m(`${v}-icon`, { | ||
m(`${_}-icon`, { | ||
name: "date", | ||
@@ -1223,10 +1223,10 @@ size: "1em", | ||
return f(n, (() => { | ||
const s = N(() => !!e.imageUrl); | ||
return () => s() && (() => { | ||
const i = Wt(); | ||
return g(() => x(i, "src", e.imageUrl)), i; | ||
const l = L(() => !!e.imageUrl); | ||
return () => l() && (() => { | ||
const s = Wt(); | ||
return p(() => E(s, "src", e.imageUrl)), s; | ||
})(); | ||
})(), t), f(o, () => e.title), f(r, () => e.description), n; | ||
})()], Qt = () => { | ||
m(`${v}-image-card`, { | ||
m(`${_}-image-card`, { | ||
title: "", | ||
@@ -1237,3 +1237,3 @@ description: "", | ||
}, Zt = /* @__PURE__ */ u("<style>"), en = /* @__PURE__ */ u('<div class="grid-layout"><slot>'), tn = (e) => { | ||
const n = C` | ||
const n = A` | ||
.grid-layout { | ||
@@ -1276,6 +1276,6 @@ --cols: ${e.cols}; | ||
const t = en(), o = t.firstChild; | ||
return o._$owner = h(), t; | ||
return o._$owner = b(), t; | ||
})()]; | ||
}, nn = () => { | ||
m(`${v}-layout-grid`, { | ||
m(`${_}-layout-grid`, { | ||
gap: "1rem", | ||
@@ -1291,24 +1291,24 @@ cols: "auto-fit", | ||
}, rn = `:host{display:grid;grid-template:auto 1fr auto / auto 1fr auto;height:100%}::slotted([slot="header"]){grid-column:1 / 4}::slotted([slot="left-sider"]){grid-column:1 / 2;overflow:auto}::slotted([slot="content"]){grid-column:2 / 3;overflow:auto}::slotted([slot="right-sider"]){grid-column:3 / 4;overflow:auto}::slotted([slot="footer"]){grid-column:1 / 4} | ||
`, on = /* @__PURE__ */ u("<style>"), sn = /* @__PURE__ */ u('<slot name="header">'), ln = /* @__PURE__ */ u('<slot name="left-sider">'), an = /* @__PURE__ */ u('<slot name="content">'), cn = /* @__PURE__ */ u('<slot name="right-sider">'), un = /* @__PURE__ */ u('<slot name="footer">'), dn = () => [(() => { | ||
`, on = /* @__PURE__ */ u("<style>"), ln = /* @__PURE__ */ u('<slot name="header">'), sn = /* @__PURE__ */ u('<slot name="left-sider">'), an = /* @__PURE__ */ u('<slot name="content">'), cn = /* @__PURE__ */ u('<slot name="right-sider">'), un = /* @__PURE__ */ u('<slot name="footer">'), dn = () => [(() => { | ||
const e = on(); | ||
return f(e, rn), e; | ||
})(), (() => { | ||
const e = ln(); | ||
return e._$owner = b(), e; | ||
})(), (() => { | ||
const e = sn(); | ||
return e._$owner = h(), e; | ||
return e._$owner = b(), e; | ||
})(), (() => { | ||
const e = ln(); | ||
return e._$owner = h(), e; | ||
})(), (() => { | ||
const e = an(); | ||
return e._$owner = h(), e; | ||
return e._$owner = b(), e; | ||
})(), (() => { | ||
const e = cn(); | ||
return e._$owner = h(), e; | ||
return e._$owner = b(), e; | ||
})(), (() => { | ||
const e = un(); | ||
return e._$owner = h(), e; | ||
return e._$owner = b(), e; | ||
})()], fn = () => { | ||
m(`${v}-layout-holy`, dn); | ||
m(`${_}-layout-holy`, dn); | ||
}, hn = /* @__PURE__ */ u("<style>"), gn = /* @__PURE__ */ u('<div class="place-holder"><slot>'), bn = () => { | ||
const e = C` | ||
const e = A` | ||
:host { | ||
@@ -1332,8 +1332,8 @@ display: block; | ||
const n = gn(), t = n.firstChild; | ||
return t._$owner = h(), n; | ||
return t._$owner = b(), n; | ||
})()]; | ||
}, pn = () => { | ||
m(`${v}-place-holder`, bn); | ||
m(`${_}-place-holder`, bn); | ||
}, $n = /* @__PURE__ */ u('<label><input type="radio"><slot>'); | ||
function mn(e) { | ||
function vn(e) { | ||
function n() { | ||
@@ -1344,7 +1344,7 @@ e.onChange && !e.disabled && e.onChange(e.value); | ||
const t = $n(), o = t.firstChild, r = o.nextSibling; | ||
return o.addEventListener("change", n), r._$owner = h(), g(() => o.disabled = e.disabled), g(() => o.value = e.value), g(() => o.checked = e.checked), t; | ||
return o.addEventListener("change", n), r._$owner = b(), p(() => o.disabled = e.disabled), p(() => o.value = e.value), p(() => o.checked = e.checked), t; | ||
})(); | ||
} | ||
const vn = () => { | ||
m(`${v}-radio`, { | ||
const mn = () => { | ||
m(`${_}-radio`, { | ||
value: "", | ||
@@ -1356,7 +1356,7 @@ checked: !1, | ||
} | ||
}, mn); | ||
}, yn = /* @__PURE__ */ u("<style>"), _n = /* @__PURE__ */ u('<div class="root">'), xn = /* @__PURE__ */ u('<label><input type="radio" name="radio"><span>'), wn = (e, { | ||
}, vn); | ||
}, _n = /* @__PURE__ */ u("<style>"), yn = /* @__PURE__ */ u('<div class="root">'), xn = /* @__PURE__ */ u('<label><input type="radio" name="radio"><span>'), wn = (e, { | ||
element: n | ||
}) => { | ||
const t = C` | ||
const t = A` | ||
:host { | ||
@@ -1415,5 +1415,5 @@ display: inline-block; | ||
} | ||
`, [o, r] = A(e.value || ""); | ||
re(() => { | ||
const i = new CustomEvent("change", { | ||
`, [o, r] = z(e.value || ""); | ||
Z(() => { | ||
const s = new CustomEvent("change", { | ||
detail: { | ||
@@ -1424,24 +1424,24 @@ value: o() | ||
}); | ||
n.dispatchEvent(i); | ||
n.dispatchEvent(s); | ||
}); | ||
const s = (i) => { | ||
r(i); | ||
const l = (s) => { | ||
r(s); | ||
}; | ||
return [(() => { | ||
const i = yn(); | ||
return f(i, t), i; | ||
const s = _n(); | ||
return f(s, t), s; | ||
})(), (() => { | ||
const i = _n(); | ||
return f(i, k(ie, { | ||
const s = yn(); | ||
return f(s, w(H, { | ||
get each() { | ||
return e.options; | ||
}, | ||
children: (l) => (() => { | ||
children: (i) => (() => { | ||
const d = xn(), c = d.firstChild, a = c.nextSibling; | ||
return d.$$click = () => s(l.value), f(a, () => l.label), g(() => c.value = l.value), g(() => c.checked = o() === l.value), d; | ||
return d.$$click = () => l(i.value), f(a, () => i.label), p(() => c.value = i.value), p(() => c.checked = o() === i.value), d; | ||
})() | ||
})), i; | ||
})), s; | ||
})()]; | ||
}, kn = () => { | ||
m(`${v}-radio-button`, { | ||
m(`${_}-radio-button`, { | ||
options: [{ | ||
@@ -1461,7 +1461,7 @@ label: "Option1", | ||
}; | ||
Q(["click"]); | ||
M(["click"]); | ||
const Cn = /* @__PURE__ */ u("<style>"), En = /* @__PURE__ */ u('<div class="root">'), Sn = /* @__PURE__ */ u('<div class="radio-button"><input name="radio-group" class="radio-button__input" type="radio"><label class="radio-button__label"><span class="radio-button__custom">'), zn = (e, { | ||
element: n | ||
}) => { | ||
const t = C` | ||
const t = A` | ||
:host { | ||
@@ -1525,5 +1525,5 @@ display: inline-block; | ||
} | ||
`, [o, r] = A(e.value || ""); | ||
re(() => { | ||
const i = new CustomEvent("change", { | ||
`, [o, r] = z(e.value || ""); | ||
Z(() => { | ||
const s = new CustomEvent("change", { | ||
detail: { | ||
@@ -1534,30 +1534,30 @@ value: o() | ||
}); | ||
n.dispatchEvent(i); | ||
n.dispatchEvent(s); | ||
}); | ||
const s = (i) => { | ||
r(i); | ||
const l = (s) => { | ||
r(s); | ||
}; | ||
return [(() => { | ||
const i = Cn(); | ||
return f(i, t), i; | ||
const s = Cn(); | ||
return f(s, t), s; | ||
})(), (() => { | ||
const i = En(); | ||
return f(i, k(ie, { | ||
const s = En(); | ||
return f(s, w(H, { | ||
get each() { | ||
return e.options; | ||
}, | ||
children: (l, d) => (() => { | ||
const c = Sn(), a = c.firstChild, b = a.nextSibling; | ||
return b.firstChild, c.$$click = () => s(l.value), f(b, () => l.label, null), g((p) => { | ||
const w = `radio-${d()}`, E = `radio-${d()}`; | ||
return w !== p._v$ && x(a, "id", p._v$ = w), E !== p._v$2 && x(b, "for", p._v$2 = E), p; | ||
children: (i, d) => (() => { | ||
const c = Sn(), a = c.firstChild, h = a.nextSibling; | ||
return h.firstChild, c.$$click = () => l(i.value), f(h, () => i.label, null), p((g) => { | ||
const C = `radio-${d()}`, S = `radio-${d()}`; | ||
return C !== g._v$ && E(a, "id", g._v$ = C), S !== g._v$2 && E(h, "for", g._v$2 = S), g; | ||
}, { | ||
_v$: void 0, | ||
_v$2: void 0 | ||
}), g(() => a.value = l.value), g(() => a.checked = o() === l.value), c; | ||
}), p(() => a.value = i.value), p(() => a.checked = o() === i.value), c; | ||
})() | ||
})), i; | ||
})), s; | ||
})()]; | ||
}, An = () => { | ||
m(`${v}-radio-group`, { | ||
m(`${_}-radio-group`, { | ||
options: [{ | ||
@@ -1577,20 +1577,185 @@ label: "Option1", | ||
}; | ||
Q(["click"]); | ||
const Tn = `:host{align-items:center;background-color:var(--bg-2);border-radius:var(--border-radius);display:flex;gap:var(--gap);padding:0 10px}.textarea{background:none;border:none;box-sizing:border-box;flex:1;font:inherit;margin:0;outline:none;overflow:auto;padding:6px 0;resize:none;width:100%} | ||
`, jn = /* @__PURE__ */ u("<style>"), Bn = /* @__PURE__ */ u('<slot name="prefix">'), On = /* @__PURE__ */ u('<textarea class="textarea">'), Pn = /* @__PURE__ */ u('<slot name="suffix">'), Rn = (e, { | ||
M(["click"]); | ||
const Tn = /* @__PURE__ */ u("<style>"), On = /* @__PURE__ */ u('<div><div><select></select></div><div class="arrow"></div><ul>'), jn = /* @__PURE__ */ u("<ar-textfield>", !0, !1), Bn = /* @__PURE__ */ u('<div class="label-chip"><span>'), Pn = /* @__PURE__ */ u("<option>"), Rn = /* @__PURE__ */ u("<li>"), In = (e, { | ||
element: n | ||
}) => { | ||
const [t, o] = A(), [r, s] = A(e.height); | ||
oe(() => { | ||
const t = A` | ||
:host { | ||
align-items: center; | ||
background-color: var(--bg-2); | ||
border-radius: var(--border-radius); | ||
box-sizing: border-box; | ||
display: inline-flex; | ||
gap: var(--gap); | ||
height: var(--input-height); | ||
width: 100%; | ||
} | ||
.root { | ||
width: 100%; | ||
position: relative; | ||
} | ||
.label-chip { | ||
padding: 0 10px; | ||
} | ||
.root select { | ||
display: none; | ||
} | ||
.root > div { | ||
position: relative; | ||
z-index: 2; | ||
} | ||
.root > ul { | ||
margin: 0; | ||
padding: 0; | ||
list-style: none; | ||
z-index: 1; | ||
position: absolute; | ||
top: ${e.placement === "bottom" ? "100%" : 0}; | ||
bottom: ${e.placement === "top" ? "100%" : 0}; | ||
left: 0; | ||
right: 0; | ||
visibility: hidden; | ||
opacity: 0; | ||
transform: translate(0, 0) scale(0.8); | ||
transform-origin: 0 0; | ||
filter: drop-shadow(0 12px 20px rgba(22, 42, 90, 0.08)); | ||
transition: all 0.4s ease, transform 0.4s cubic-bezier(0.87, -0.41, 0.19, 1.44), | ||
filter 0.3s ease 0.2s; | ||
} | ||
.root > ul li { | ||
color: var(--text-color); | ||
background: #fff; | ||
padding: 6px 12px; | ||
cursor: pointer; | ||
overflow: hidden; | ||
position: relative; | ||
} | ||
.root > ul li:first-child { | ||
border-radius: var(--border-radius) var(--border-radius) 0 0; | ||
} | ||
.root > ul li:last-child { | ||
border-radius: 0 0 var(--border-radius) var(--border-radius); | ||
} | ||
.root > ul li:hover { | ||
background: var(--primary-color); | ||
color: var(--accent-color); | ||
} | ||
.root.open > ul { | ||
transform: translate(0, ${e.placement === "bottom" ? "12px" : "-12px"}) scale(1); | ||
opacity: 1; | ||
visibility: visible; | ||
filter: drop-shadow(0 16px 24px rgba(22, 42, 90, 0.16)); | ||
} | ||
`, [o, r] = z(!1), [l, s] = z(e.value || ""), i = L(() => { | ||
var a; | ||
return ((a = e.options) == null ? void 0 : a.filter((h) => h.value === l())) || []; | ||
}); | ||
Z(() => { | ||
const a = new CustomEvent("change", { | ||
detail: { | ||
value: l() | ||
}, | ||
bubbles: !0 | ||
}); | ||
n.dispatchEvent(a); | ||
}); | ||
const d = () => { | ||
r(!o()); | ||
}, c = (a) => { | ||
s(a.value); | ||
}; | ||
return [(() => { | ||
const a = Tn(); | ||
return f(a, t), a; | ||
})(), (() => { | ||
const a = On(), h = a.firstChild, g = h.firstChild, C = h.nextSibling, S = C.nextSibling; | ||
return a.$$click = d, f(h, w(j, { | ||
get when() { | ||
return i().length > 0; | ||
}, | ||
get fallback() { | ||
return (() => { | ||
const $ = jn(); | ||
return $._$owner = b(), $; | ||
})(); | ||
}, | ||
get children() { | ||
return w(H, { | ||
get each() { | ||
return i(); | ||
}, | ||
children: ($) => (() => { | ||
const y = Bn(), B = y.firstChild; | ||
return f(B, () => $.label), y; | ||
})() | ||
}); | ||
} | ||
}), g), f(g, w(H, { | ||
get each() { | ||
return e.options; | ||
}, | ||
children: ($) => (() => { | ||
const y = Pn(); | ||
return f(y, () => $.label), p(() => y.selected = l() === $.value), y; | ||
})() | ||
})), f(S, w(H, { | ||
get each() { | ||
return e.options; | ||
}, | ||
children: ($) => (() => { | ||
const y = Rn(); | ||
return y.$$click = () => c($), f(y, () => $.label), y; | ||
})() | ||
})), p(($) => { | ||
const y = `root ${o() ? "open" : ""}`, B = e.multiple; | ||
return y !== $._v$ && D(a, $._v$ = y), B !== $._v$2 && (g.multiple = $._v$2 = B), $; | ||
}, { | ||
_v$: void 0, | ||
_v$2: void 0 | ||
}), a; | ||
})()]; | ||
}, Nn = () => { | ||
m(`${_}-select`, { | ||
options: [{ | ||
label: "Option1", | ||
value: "1" | ||
}, { | ||
label: "Option2", | ||
value: "2" | ||
}, { | ||
label: "Option3", | ||
value: "3" | ||
}], | ||
value: "", | ||
placement: "bottom" | ||
}, In); | ||
}; | ||
M(["click"]); | ||
const Ln = `:host{align-items:center;background-color:var(--bg-2);border-radius:var(--border-radius);box-sizing:border-box;display:flex;gap:var(--gap);padding:0 10px}.textarea{background:none;border:none;box-sizing:border-box;flex:1;font:inherit;margin:0;outline:none;overflow:auto;padding:6px 0;resize:none;width:100%} | ||
`, Fn = /* @__PURE__ */ u("<style>"), Kn = /* @__PURE__ */ u('<slot name="prefix">'), Hn = /* @__PURE__ */ u('<textarea class="textarea">'), Dn = /* @__PURE__ */ u('<slot name="suffix">'), Gn = (e, { | ||
element: n | ||
}) => { | ||
const [t, o] = z(), [r, l] = z(e.height); | ||
le(() => { | ||
setTimeout(() => { | ||
var a; | ||
const c = (a = t()) == null ? void 0 : a.scrollHeight; | ||
c && s(`${c}px`); | ||
c && l(`${c}px`); | ||
}, 0); | ||
}); | ||
const i = (c) => { | ||
const s = (c) => { | ||
const a = c.target; | ||
s(e.height), s(`${a.scrollHeight}px`); | ||
}, l = (c) => { | ||
const a = c.target, b = new CustomEvent("change", { | ||
l(e.height), l(`${a.scrollHeight}px`); | ||
}, i = (c) => { | ||
const a = c.target, h = new CustomEvent("change", { | ||
detail: { | ||
@@ -1601,6 +1766,6 @@ value: a.value | ||
}); | ||
n.dispatchEvent(b); | ||
n.dispatchEvent(h); | ||
}, d = (c) => { | ||
if ((c.metaKey || c.ctrlKey) && c.key === "Enter" && (c.preventDefault(), c.target)) { | ||
const a = c.target, b = new CustomEvent("enter", { | ||
const a = c.target, h = new CustomEvent("enter", { | ||
detail: { | ||
@@ -1610,89 +1775,89 @@ value: a.value | ||
}); | ||
n.dispatchEvent(b); | ||
n.dispatchEvent(h); | ||
} | ||
}; | ||
return [(() => { | ||
const c = jn(); | ||
return f(c, Tn), c; | ||
const c = Fn(); | ||
return f(c, Ln), c; | ||
})(), (() => { | ||
const c = Bn(); | ||
return c._$owner = h(), c; | ||
const c = Kn(); | ||
return c._$owner = b(), c; | ||
})(), (() => { | ||
const c = On(); | ||
return c.$$keydown = d, c.addEventListener("change", l), c.$$input = i, Pe(o, c), g((a) => { | ||
const b = r(), p = e.placeholder; | ||
return b !== a._v$ && ((a._v$ = b) != null ? c.style.setProperty("height", b) : c.style.removeProperty("height")), p !== a._v$2 && x(c, "placeholder", a._v$2 = p), a; | ||
const c = Hn(); | ||
return c.$$keydown = d, c.addEventListener("change", i), c.$$input = s, Pe(o, c), p((a) => { | ||
const h = r(), g = e.placeholder; | ||
return h !== a._v$ && ((a._v$ = h) != null ? c.style.setProperty("height", h) : c.style.removeProperty("height")), g !== a._v$2 && E(c, "placeholder", a._v$2 = g), a; | ||
}, { | ||
_v$: void 0, | ||
_v$2: void 0 | ||
}), g(() => c.value = e.value), c; | ||
}), p(() => c.value = e.value), c; | ||
})(), (() => { | ||
const c = Pn(); | ||
return c._$owner = h(), c; | ||
const c = Dn(); | ||
return c._$owner = b(), c; | ||
})()]; | ||
}, In = () => { | ||
m(`${v}-textarea`, { | ||
}, Un = () => { | ||
m(`${_}-textarea`, { | ||
value: "", | ||
placeholder: "", | ||
height: "32px" | ||
}, Rn); | ||
}, Gn); | ||
}; | ||
Q(["input", "keydown"]); | ||
const Nn = `:host{align-items:center;background-color:var(--bg-2);border-radius:var(--border-radius);display:inline-flex;gap:var(--gap);height:var(--input-height);padding:0 12px;width:100%}input{background:none;border:none;box-sizing:border-box;color:inherit;font:inherit;outline:none;padding:0;width:inherit} | ||
`, Ln = /* @__PURE__ */ u("<style>"), Fn = /* @__PURE__ */ u('<slot name="prefix">'), Kn = /* @__PURE__ */ u('<input class="textarea">'), Hn = /* @__PURE__ */ u('<slot name="suffix">'), Dn = (e, { | ||
M(["input", "keydown"]); | ||
const Mn = `:host{align-items:center;background-color:var(--bg-2);border-radius:var(--border-radius);box-sizing:border-box;display:inline-flex;gap:var(--gap);height:var(--input-height);padding:0 12px;width:100%}input{background:none;border:none;box-sizing:border-box;color:inherit;font:inherit;outline:none;padding:0;width:inherit} | ||
`, Vn = /* @__PURE__ */ u("<style>"), qn = /* @__PURE__ */ u('<slot name="prefix">'), Yn = /* @__PURE__ */ u('<input class="textarea">'), Jn = /* @__PURE__ */ u('<slot name="suffix">'), Wn = (e, { | ||
element: n | ||
}) => { | ||
const t = (r) => { | ||
const s = r.target, i = new CustomEvent("change", { | ||
const l = r.target, s = new CustomEvent("change", { | ||
detail: { | ||
value: s.value | ||
value: l.value | ||
} | ||
}); | ||
n.dispatchEvent(i); | ||
n.dispatchEvent(s); | ||
}, o = (r) => { | ||
if (r.keyCode === 13 && (r.preventDefault(), r.target)) { | ||
const s = r.target, i = new CustomEvent("enter", { | ||
const l = r.target, s = new CustomEvent("enter", { | ||
detail: { | ||
value: s.value | ||
value: l.value | ||
} | ||
}); | ||
n.dispatchEvent(i); | ||
n.dispatchEvent(s); | ||
} | ||
}; | ||
return [(() => { | ||
const r = Ln(); | ||
return f(r, Nn), r; | ||
const r = Vn(); | ||
return f(r, Mn), r; | ||
})(), (() => { | ||
const r = Fn(); | ||
return r._$owner = h(), r; | ||
const r = qn(); | ||
return r._$owner = b(), r; | ||
})(), (() => { | ||
const r = Kn(); | ||
return r.$$keydown = o, r.addEventListener("change", t), g((s) => { | ||
const i = e.placeholder, l = e.type; | ||
return i !== s._v$ && x(r, "placeholder", s._v$ = i), l !== s._v$2 && x(r, "type", s._v$2 = l), s; | ||
const r = Yn(); | ||
return r.$$keydown = o, r.addEventListener("change", t), p((l) => { | ||
const s = e.placeholder, i = e.type; | ||
return s !== l._v$ && E(r, "placeholder", l._v$ = s), i !== l._v$2 && E(r, "type", l._v$2 = i), l; | ||
}, { | ||
_v$: void 0, | ||
_v$2: void 0 | ||
}), g(() => r.value = e.value), r; | ||
}), p(() => r.value = e.value), r; | ||
})(), (() => { | ||
const r = Hn(); | ||
return r._$owner = h(), r; | ||
const r = Jn(); | ||
return r._$owner = b(), r; | ||
})()]; | ||
}, Gn = () => { | ||
m(`${v}-textfield`, { | ||
}, Xn = () => { | ||
m(`${_}-textfield`, { | ||
value: "", | ||
placeholder: "", | ||
type: "text" | ||
}, Dn); | ||
}, Wn); | ||
}; | ||
Q(["keydown"]); | ||
const fe = /* @__PURE__ */ u("<span>"), Un = (e) => { | ||
const [n, t] = A(""), [o, r] = A(0), [s, i] = A(!0), { | ||
text: l, | ||
M(["keydown"]); | ||
const fe = /* @__PURE__ */ u("<span>"), Qn = (e) => { | ||
const [n, t] = z(""), [o, r] = z(0), [l, s] = z(!0), { | ||
text: i, | ||
speed: d = 100, | ||
cursor: c = "|" | ||
} = e; | ||
return oe(() => { | ||
return le(() => { | ||
const a = setInterval(() => { | ||
t(l.substr(0, o())), r(o() + 1), o() >= l.length && (i(!1), clearInterval(a)); | ||
t(i.substr(0, o())), r(o() + 1), o() >= i.length && (s(!1), clearInterval(a)); | ||
}, d); | ||
@@ -1702,22 +1867,22 @@ }), [(() => { | ||
return f(a, n), a; | ||
})(), N((() => { | ||
const a = N(() => !!s()); | ||
})(), L((() => { | ||
const a = L(() => !!l()); | ||
return () => a() && (() => { | ||
const b = fe(); | ||
return f(b, c), b; | ||
const h = fe(); | ||
return f(h, c), h; | ||
})(); | ||
})())]; | ||
}, Mn = () => { | ||
m(`${v}-typewriter`, { | ||
}, Zn = () => { | ||
m(`${_}-typewriter`, { | ||
text: "", | ||
speed: 100, | ||
cursor: "|" | ||
}, Un); | ||
}, Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ | ||
}, Qn); | ||
}, er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ | ||
__proto__: null, | ||
Button: tt, | ||
Card: ft, | ||
ChatBubble: _t, | ||
ChatBubble: yt, | ||
CheckBox: Ct, | ||
DanceCount: Ot, | ||
DanceCount: Bt, | ||
DanceNumber: xe, | ||
@@ -1731,10 +1896,11 @@ FlexBox: Nt, | ||
PlaceHolder: pn, | ||
Radio: vn, | ||
Radio: mn, | ||
RadioButton: kn, | ||
RadioGroup: An, | ||
Textarea: In, | ||
Textfield: Gn, | ||
Typewriter: Mn | ||
Select: Nn, | ||
Textarea: Un, | ||
Textfield: Xn, | ||
Typewriter: Zn | ||
}, Symbol.toStringTag, { value: "Module" })); | ||
const Jn = (e = Vn) => { | ||
const rr = (e = er) => { | ||
for (const n in e) { | ||
@@ -1748,5 +1914,5 @@ const t = e[n]; | ||
ft as Card, | ||
_t as ChatBubble, | ||
yt as ChatBubble, | ||
Ct as CheckBox, | ||
Ot as DanceCount, | ||
Bt as DanceCount, | ||
xe as DanceNumber, | ||
@@ -1760,10 +1926,11 @@ Nt as FlexBox, | ||
pn as PlaceHolder, | ||
vn as Radio, | ||
mn as Radio, | ||
kn as RadioButton, | ||
An as RadioGroup, | ||
In as Textarea, | ||
Gn as Textfield, | ||
Mn as Typewriter, | ||
Jn as defineCustomElements, | ||
Yn as registerIcon | ||
Nn as Select, | ||
Un as Textarea, | ||
Xn as Textfield, | ||
Zn as Typewriter, | ||
rr as defineCustomElements, | ||
nr as registerIcon | ||
}; |
@@ -1,3 +0,3 @@ | ||
(function(p,F){typeof exports=="object"&&typeof module<"u"?F(exports):typeof define=="function"&&define.amd?define(["exports"],F):(p=typeof globalThis<"u"?globalThis:p||self,F(p["aura-design"]={}))})(this,function(p){"use strict";const F=(e,n)=>e===n,Ge=Symbol("solid-track"),G={equals:F};let ue=ge;const I=1,M=2,de={owned:null,cleanups:null,context:null,owner:null};var _=null;let te=null,m=null,w=null,j=null,U=0;function V(e,n){const t=m,o=_,r=e.length===0,i=r?de:{owned:null,cleanups:null,context:null,owner:n===void 0?o:n},s=r?e:()=>e(()=>O(()=>J(i)));_=i,m=null;try{return H(s,!0)}finally{m=t,_=o}}function S(e,n){n=n?Object.assign({},G,n):G;const t={value:e,observers:null,observerSlots:null,comparator:n.equals||void 0},o=r=>(typeof r=="function"&&(r=r(t.value)),he(t,r));return[fe.bind(t),o]}function g(e,n,t){const o=oe(e,n,!1,I);K(o)}function ne(e,n,t){ue=qe;const o=oe(e,n,!1,I);o.user=!0,j?j.push(o):K(o)}function R(e,n,t){t=t?Object.assign({},G,t):G;const o=oe(e,n,!0,0);return o.observers=null,o.observerSlots=null,o.comparator=t.equals||void 0,K(o),fe.bind(o)}function O(e){if(m===null)return e();const n=m;m=null;try{return e()}finally{m=n}}function re(e){ne(()=>O(e))}function Me(e){return _===null||(_.cleanups===null?_.cleanups=[e]:_.cleanups.push(e)),e}function h(){return _}function fe(){if(this.sources&&this.state)if(this.state===I)K(this);else{const e=w;w=null,H(()=>Y(this),!1),w=e}if(m){const e=this.observers?this.observers.length:0;m.sources?(m.sources.push(this),m.sourceSlots.push(e)):(m.sources=[this],m.sourceSlots=[e]),this.observers?(this.observers.push(m),this.observerSlots.push(m.sources.length-1)):(this.observers=[m],this.observerSlots=[m.sources.length-1])}return this.value}function he(e,n,t){let o=e.value;return(!e.comparator||!e.comparator(o,n))&&(e.value=n,e.observers&&e.observers.length&&H(()=>{for(let r=0;r<e.observers.length;r+=1){const i=e.observers[r],s=te&&te.running;s&&te.disposed.has(i),(s?!i.tState:!i.state)&&(i.pure?w.push(i):j.push(i),i.observers&&be(i)),s||(i.state=I)}if(w.length>1e6)throw w=[],new Error},!1)),n}function K(e){if(!e.fn)return;J(e);const n=_,t=m,o=U;m=_=e,Ue(e,e.value,o),m=t,_=n}function Ue(e,n,t){let o;try{o=e.fn(n)}catch(r){return e.pure&&(e.state=I,e.owned&&e.owned.forEach(J),e.owned=null),e.updatedAt=t+1,pe(r)}(!e.updatedAt||e.updatedAt<=t)&&(e.updatedAt!=null&&"observers"in e?he(e,o):e.value=o,e.updatedAt=t)}function oe(e,n,t,o=I,r){const i={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:n,owner:_,context:null,pure:t};return _===null||_!==de&&(_.owned?_.owned.push(i):_.owned=[i]),i}function q(e){if(e.state===0)return;if(e.state===M)return Y(e);if(e.suspense&&O(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<U);)e.state&&n.push(e);for(let t=n.length-1;t>=0;t--)if(e=n[t],e.state===I)K(e);else if(e.state===M){const o=w;w=null,H(()=>Y(e,n[0]),!1),w=o}}function H(e,n){if(w)return e();let t=!1;n||(w=[]),j?t=!0:j=[],U++;try{const o=e();return Ve(t),o}catch(o){t||(j=null),w=null,pe(o)}}function Ve(e){if(w&&(ge(w),w=null),e)return;const n=j;j=null,n.length&&H(()=>ue(n),!1)}function ge(e){for(let n=0;n<e.length;n++)q(e[n])}function qe(e){let n,t=0;for(n=0;n<e.length;n++){const o=e[n];o.user?e[t++]=o:q(o)}for(n=0;n<t;n++)q(e[n])}function Y(e,n){e.state=0;for(let t=0;t<e.sources.length;t+=1){const o=e.sources[t];if(o.sources){const r=o.state;r===I?o!==n&&(!o.updatedAt||o.updatedAt<U)&&q(o):r===M&&Y(o,n)}}}function be(e){for(let n=0;n<e.observers.length;n+=1){const t=e.observers[n];t.state||(t.state=M,t.pure?w.push(t):j.push(t),t.observers&&be(t))}}function J(e){let n;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),o=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const i=r.pop(),s=t.observerSlots.pop();o<r.length&&(i.sourceSlots[s]=o,r[o]=i,t.observerSlots[o]=s)}}if(e.owned){for(n=e.owned.length-1;n>=0;n--)J(e.owned[n]);e.owned=null}if(e.cleanups){for(n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}e.state=0,e.context=null}function pe(e){throw e}const Ye=Symbol("fallback");function $e(e){for(let n=0;n<e.length;n++)e[n]()}function Je(e,n,t={}){let o=[],r=[],i=[],s=0,l=n.length>1?[]:null;return Me(()=>$e(i)),()=>{let d=e()||[],c,a;return d[Ge],O(()=>{let $=d.length,k,z,D,Z,ee,A,T,P,L;if($===0)s!==0&&($e(i),i=[],o=[],r=[],s=0,l&&(l=[])),t.fallback&&(o=[Ye],r[0]=V(Jn=>(i[0]=Jn,t.fallback())),s=1);else if(s===0){for(r=new Array($),a=0;a<$;a++)o[a]=d[a],r[a]=V(b);s=$}else{for(D=new Array($),Z=new Array($),l&&(ee=new Array($)),A=0,T=Math.min(s,$);A<T&&o[A]===d[A];A++);for(T=s-1,P=$-1;T>=A&&P>=A&&o[T]===d[P];T--,P--)D[P]=r[T],Z[P]=i[T],l&&(ee[P]=l[T]);for(k=new Map,z=new Array(P+1),a=P;a>=A;a--)L=d[a],c=k.get(L),z[a]=c===void 0?-1:c,k.set(L,a);for(c=A;c<=T;c++)L=o[c],a=k.get(L),a!==void 0&&a!==-1?(D[a]=r[c],Z[a]=i[c],l&&(ee[a]=l[c]),a=z[a],k.set(L,a)):i[c]();for(a=A;a<$;a++)a in D?(r[a]=D[a],i[a]=Z[a],l&&(l[a]=ee[a],l[a](a))):r[a]=V(b);r=r.slice(0,s=$),o=d.slice(0)}return r});function b($){if(i[a]=$,l){const[k,z]=S(a);return l[a]=z,n(d[a],k)}return n(d[a])}}}function C(e,n){return O(()=>e(n||{}))}const We=e=>`Stale read from <${e}>.`;function ie(e){const n="fallback"in e&&{fallback:()=>e.fallback};return R(Je(()=>e.each,e.children,n||void 0))}function B(e){const n=e.keyed,t=R(()=>e.when,void 0,{equals:(o,r)=>n?o===r:!o==!r});return R(()=>{const o=t();if(o){const r=e.children;return typeof r=="function"&&r.length>0?O(()=>r(n?o:()=>{if(!O(t))throw We("Show");return e.when})):r}return e.fallback},void 0,void 0)}function Xe(e,n,t){let o=t.length,r=n.length,i=o,s=0,l=0,d=n[r-1].nextSibling,c=null;for(;s<r||l<i;){if(n[s]===t[l]){s++,l++;continue}for(;n[r-1]===t[i-1];)r--,i--;if(r===s){const a=i<o?l?t[l-1].nextSibling:t[i-l]:d;for(;l<i;)e.insertBefore(t[l++],a)}else if(i===l)for(;s<r;)(!c||!c.has(n[s]))&&n[s].remove(),s++;else if(n[s]===t[i-1]&&t[l]===n[r-1]){const a=n[--r].nextSibling;e.insertBefore(t[l++],n[s++].nextSibling),e.insertBefore(t[--i],a),n[r]=t[i]}else{if(!c){c=new Map;let b=l;for(;b<i;)c.set(t[b],b++)}const a=c.get(n[s]);if(a!=null)if(l<a&&a<i){let b=s,$=1,k;for(;++b<r&&b<i&&!((k=c.get(n[b]))==null||k!==a+$);)$++;if($>a-l){const z=n[s];for(;l<a;)e.insertBefore(t[l++],z)}else e.replaceChild(t[l++],n[s++])}else s++;else n[s++].remove()}}}const me="_$DX_DELEGATE";function u(e,n,t){let o;const r=()=>{const s=document.createElement("template");return s.innerHTML=e,t?s.content.firstChild.firstChild:s.content.firstChild},i=n?()=>(o||(o=r())).cloneNode(!0):()=>O(()=>document.importNode(o||(o=r()),!0));return i.cloneNode=i,i}function W(e,n=window.document){const t=n[me]||(n[me]=new Set);for(let o=0,r=e.length;o<r;o++){const i=e[o];t.has(i)||(t.add(i),n.addEventListener(i,Ze))}}function x(e,n,t){t==null?e.removeAttribute(n):e.setAttribute(n,t)}function X(e,n){n==null?e.removeAttribute("class"):e.className=n}function Qe(e,n,t){return O(()=>e(n,t))}function f(e,n,t,o){if(t!==void 0&&!o&&(o=[]),typeof n!="function")return Q(e,n,o,t);g(r=>Q(e,n(),r,t),o)}function Ze(e){const n=`$$${e.type}`;let t=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==t&&Object.defineProperty(e,"target",{configurable:!0,value:t}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}});t;){const o=t[n];if(o&&!t.disabled){const r=t[`${n}Data`];if(r!==void 0?o.call(t,r,e):o.call(t,e),e.cancelBubble)return}t=t._$host||t.parentNode||t.host}}function Q(e,n,t,o,r){for(;typeof t=="function";)t=t();if(n===t)return t;const i=typeof n,s=o!==void 0;if(e=s&&t[0]&&t[0].parentNode||e,i==="string"||i==="number")if(i==="number"&&(n=n.toString()),s){let l=t[0];l&&l.nodeType===3?l.data=n:l=document.createTextNode(n),t=N(e,t,o,l)}else t!==""&&typeof t=="string"?t=e.firstChild.data=n:t=e.textContent=n;else if(n==null||i==="boolean")t=N(e,t,o);else{if(i==="function")return g(()=>{let l=n();for(;typeof l=="function";)l=l();t=Q(e,l,t,o)}),()=>t;if(Array.isArray(n)){const l=[],d=t&&Array.isArray(t);if(se(l,n,t,r))return g(()=>t=Q(e,l,t,o,!0)),()=>t;if(l.length===0){if(t=N(e,t,o),s)return t}else d?t.length===0?ve(e,l,o):Xe(e,t,l):(t&&N(e),ve(e,l));t=l}else if(n instanceof Node){if(Array.isArray(t)){if(s)return t=N(e,t,o,n);N(e,t,null,n)}else t==null||t===""||!e.firstChild?e.appendChild(n):e.replaceChild(n,e.firstChild);t=n}else console.warn("Unrecognized value. Skipped inserting",n)}return t}function se(e,n,t,o){let r=!1;for(let i=0,s=n.length;i<s;i++){let l=n[i],d=t&&t[i];if(l instanceof Node)e.push(l);else if(!(l==null||l===!0||l===!1))if(Array.isArray(l))r=se(e,l,d)||r;else if(typeof l=="function")if(o){for(;typeof l=="function";)l=l();r=se(e,Array.isArray(l)?l:[l],Array.isArray(d)?d:[d])||r}else e.push(l),r=!0;else{const c=String(l);d&&d.nodeType===3?(d.data=c,e.push(d)):e.push(document.createTextNode(c))}}return r}function ve(e,n,t=null){for(let o=0,r=n.length;o<r;o++)e.insertBefore(n[o],t)}function N(e,n,t,o){if(t===void 0)return e.textContent="";const r=o||document.createTextNode("");if(n.length){let i=!1;for(let s=n.length-1;s>=0;s--){const l=n[s];if(r!==l){const d=l.parentNode===e;!i&&!s?d?e.replaceChild(r,l):e.insertBefore(r,t):d&&l.remove()}else i=!0}}else e.insertBefore(r,t);return[r]}function et(e){return Object.keys(e).reduce((t,o)=>{const r=e[o];return t[o]=Object.assign({},r),we(r.value)&&!it(r.value)&&!Array.isArray(r.value)&&(t[o].value=Object.assign({},r.value)),Array.isArray(r.value)&&(t[o].value=r.value.slice(0)),t},{})}function tt(e){return e?Object.keys(e).reduce((t,o)=>{const r=e[o];return t[o]=we(r)&&"value"in r?r:{value:r},t[o].attribute||(t[o].attribute=ot(o)),t[o].parse="parse"in t[o]?t[o].parse:typeof t[o].value!="string",t},{}):{}}function nt(e){return Object.keys(e).reduce((t,o)=>(t[o]=e[o].value,t),{})}function rt(e,n){const t=et(n);return Object.keys(n).forEach(r=>{const i=t[r],s=e.getAttribute(i.attribute),l=e[r];s&&(i.value=i.parse?ye(s):s),l!=null&&(i.value=Array.isArray(l)?l.slice(0):l),i.reflect&&_e(e,i.attribute,i.value),Object.defineProperty(e,r,{get(){return i.value},set(d){const c=i.value;i.value=d,i.reflect&&_e(this,i.attribute,i.value);for(let a=0,b=this.__propertyChangedCallbacks.length;a<b;a++)this.__propertyChangedCallbacks[a](r,d,c)},enumerable:!0,configurable:!0})}),t}function ye(e){if(e)try{return JSON.parse(e)}catch{return e}}function _e(e,n,t){if(t==null||t===!1)return e.removeAttribute(n);let o=JSON.stringify(t);e.__updating[n]=!0,o==="true"&&(o=""),e.setAttribute(n,o),Promise.resolve().then(()=>delete e.__updating[n])}function ot(e){return e.replace(/\.?([A-Z]+)/g,(n,t)=>"-"+t.toLowerCase()).replace("_","-").replace(/^-/,"")}function we(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function it(e){return Object.prototype.toString.call(e)==="[object Function]"}function st(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let le;function lt(e,n){const t=Object.keys(n);return class extends e{static get observedAttributes(){return t.map(r=>n[r].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=rt(this,n);const r=nt(this.props),i=this.Component,s=le;try{le=this,this.__initialized=!0,st(i)?new i(r,{element:this}):i(r,{element:this})}finally{le=s}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let r=null;for(;r=this.__releaseCallbacks.pop();)r(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(r,i,s){if(this.__initialized&&!this.__updating[r]&&(r=this.lookupProp(r),r in n)){if(s==null&&!this[r])return;this[r]=n[r].parse?ye(s):s}}lookupProp(r){if(n)return t.find(i=>r===i||r===n[i].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(r){this.__releaseCallbacks.push(r)}addPropertyChangedCallback(r){this.__propertyChangedCallbacks.push(r)}}}function at(e,n={},t={}){const{BaseElement:o=HTMLElement,extension:r}=t;return i=>{if(!e)throw new Error("tag is required to register a Component");let s=customElements.get(e);return s?(s.prototype.Component=i,s):(s=lt(o,tt(n)),s.prototype.Component=i,s.prototype.registeredTag=e,customElements.define(e,s,r),s)}}function ct(e){const n=Object.keys(e),t={};for(let o=0;o<n.length;o++){const[r,i]=S(e[n[o]]);Object.defineProperty(t,n[o],{get:r,set(s){i(()=>s)}})}return t}function ut(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let n=e.parentNode;for(;n&&!n._$owner&&!(n.assignedSlot&&n.assignedSlot._$owner);)n=n.parentNode;return n&&n.assignedSlot?n.assignedSlot._$owner:e._$owner}function dt(e){return(n,t)=>{const{element:o}=t;return V(r=>{const i=ct(n);o.addPropertyChangedCallback((l,d)=>i[l]=d),o.addReleaseCallback(()=>{o.renderRoot.textContent="",r()});const s=e(i,t);return f(o.renderRoot,s)},ut(o))}}function v(e,n,t){return arguments.length===2&&(t=n,n={}),at(e,n)(dt(t))}const y="ar",ft=`:host{align-items:center;border-radius:var(--border-radius);display:inline-flex;height:var(--input-height)}button{align-items:center;background:inherit;border:none;border-radius:inherit;box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;font:inherit;gap:var(--gap);height:inherit;justify-content:center;outline:none;padding:0 12px;width:inherit}button:hover{filter:brightness(1.1)}.primary{background-image:var(--accent-gradient);color:var(--accent-color)}.primary.text{background-image:none;color:var(--primary-color)}.primary.outline{background-image:none;border:1px solid var(--primary-color);color:var(--primary-color)}.primary:hover{filter:brightness(1.2)}.info{background:var(--info-color)}.info.text{background:none;color:var(--text-color)}.info.outline{background:none;border:1px solid var(--info-color);color:var(--text-color)}.info:hover{filter:brightness(.95)}.warning{background:var(--warning-color);color:var(--accent-color)}.warning.text{background:none;color:var(--warning-color)}.warning.outline{background:none;border:1px solid var(--warning-color);color:var(--warning-color)}.danger{background:var(--danger-color);color:var(--accent-color)}.danger.text{background:none;color:var(--danger-color)}.danger.outline{background:none;border:1px solid var(--danger-color);color:var(--danger-color)}.success{background:var(--success-color);color:var(--accent-color)}.success.text{background:none;color:var(--success-color)}.success.outline{background:none;border:1px solid var(--success-color);color:var(--success-color)}.circle{border-radius:50%;padding:0 2px;width:var(--input-height)}.round{border-radius:var(--round-radius)} | ||
`,ht=u("<style>"),xe=u('<ar-icon name="loading" spin>',!0,!1),gt=u("<button>"),bt=u('<button><slot></slot><slot name="suffix">'),pt=u('<slot name="prefix">'),$t=u("<slot>"),mt=e=>[(()=>{const n=ht();return f(n,ft),n})(),C(B,{get when(){return e.shape==="circle"},get fallback(){return(()=>{const n=bt(),t=n.firstChild,o=t.nextSibling;return f(n,C(B,{get when(){return e.loading},get fallback(){return(()=>{const r=pt();return r._$owner=h(),r})()},get children(){const r=xe();return r._$owner=h(),r}}),t),t._$owner=h(),o._$owner=h(),g(()=>X(n,`${e.status} ${e.type} ${e.shape}`)),n})()},get children(){const n=gt();return f(n,C(B,{get when(){return e.loading},get fallback(){return(()=>{const t=$t();return t._$owner=h(),t})()},get children(){const t=xe();return t._$owner=h(),t}})),g(()=>X(n,`${e.status} ${e.type} ${e.shape}`)),n}})],ke=()=>{v(`${y}-button`,{type:"default",status:"primary",shape:"default",loading:!1},mt)},E=(e,...n)=>e.reduce((o,r,i)=>o+r+(n[i]||""),""),vt=u('<ar-icon size="5rem">',!0,!1),yt=u('<div class="flex flex-col justify-center gap-2 h-20"><div class="font-bold"></div><div class="font-size-3">'),_t=u('<img class="w-20 rd-2" alt="logo">'),wt=u('<img class="w-6" alt="avatar">'),xt=u("<div>"),kt=u(`<style>/* layer: preflights */ | ||
(function($,G){typeof exports=="object"&&typeof module<"u"?G(exports):typeof define=="function"&&define.amd?define(["exports"],G):($=typeof globalThis<"u"?globalThis:$||self,G($["aura-design"]={}))})(this,function($){"use strict";const G=(e,n)=>e===n,Me=Symbol("solid-track"),Y={equals:G};let ue=ge;const L=1,J=2,de={owned:null,cleanups:null,context:null,owner:null};var x=null;let re=null,m=null,k=null,P=null,W=0;function X(e,n){const t=m,o=x,r=e.length===0,i=r?de:{owned:null,cleanups:null,context:null,owner:n===void 0?o:n},l=r?e:()=>e(()=>I(()=>te(i)));x=i,m=null;try{return U(l,!0)}finally{m=t,x=o}}function z(e,n){n=n?Object.assign({},Y,n):Y;const t={value:e,observers:null,observerSlots:null,comparator:n.equals||void 0},o=r=>(typeof r=="function"&&(r=r(t.value)),he(t,r));return[fe.bind(t),o]}function g(e,n,t){const o=ie(e,n,!1,L);M(o)}function Q(e,n,t){ue=Ye;const o=ie(e,n,!1,L);o.user=!0,P?P.push(o):M(o)}function F(e,n,t){t=t?Object.assign({},Y,t):Y;const o=ie(e,n,!0,0);return o.observers=null,o.observerSlots=null,o.comparator=t.equals||void 0,M(o),fe.bind(o)}function I(e){if(m===null)return e();const n=m;m=null;try{return e()}finally{m=n}}function oe(e){Q(()=>I(e))}function Ue(e){return x===null||(x.cleanups===null?x.cleanups=[e]:x.cleanups.push(e)),e}function b(){return x}function fe(){if(this.sources&&this.state)if(this.state===L)M(this);else{const e=k;k=null,U(()=>ee(this),!1),k=e}if(m){const e=this.observers?this.observers.length:0;m.sources?(m.sources.push(this),m.sourceSlots.push(e)):(m.sources=[this],m.sourceSlots=[e]),this.observers?(this.observers.push(m),this.observerSlots.push(m.sources.length-1)):(this.observers=[m],this.observerSlots=[m.sources.length-1])}return this.value}function he(e,n,t){let o=e.value;return(!e.comparator||!e.comparator(o,n))&&(e.value=n,e.observers&&e.observers.length&&U(()=>{for(let r=0;r<e.observers.length;r+=1){const i=e.observers[r],l=re&&re.running;l&&re.disposed.has(i),(l?!i.tState:!i.state)&&(i.pure?k.push(i):P.push(i),i.observers&&be(i)),l||(i.state=L)}if(k.length>1e6)throw k=[],new Error},!1)),n}function M(e){if(!e.fn)return;te(e);const n=x,t=m,o=W;m=x=e,Ve(e,e.value,o),m=t,x=n}function Ve(e,n,t){let o;try{o=e.fn(n)}catch(r){return e.pure&&(e.state=L,e.owned&&e.owned.forEach(te),e.owned=null),e.updatedAt=t+1,pe(r)}(!e.updatedAt||e.updatedAt<=t)&&(e.updatedAt!=null&&"observers"in e?he(e,o):e.value=o,e.updatedAt=t)}function ie(e,n,t,o=L,r){const i={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:n,owner:x,context:null,pure:t};return x===null||x!==de&&(x.owned?x.owned.push(i):x.owned=[i]),i}function Z(e){if(e.state===0)return;if(e.state===J)return ee(e);if(e.suspense&&I(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<W);)e.state&&n.push(e);for(let t=n.length-1;t>=0;t--)if(e=n[t],e.state===L)M(e);else if(e.state===J){const o=k;k=null,U(()=>ee(e,n[0]),!1),k=o}}function U(e,n){if(k)return e();let t=!1;n||(k=[]),P?t=!0:P=[],W++;try{const o=e();return qe(t),o}catch(o){t||(P=null),k=null,pe(o)}}function qe(e){if(k&&(ge(k),k=null),e)return;const n=P;P=null,n.length&&U(()=>ue(n),!1)}function ge(e){for(let n=0;n<e.length;n++)Z(e[n])}function Ye(e){let n,t=0;for(n=0;n<e.length;n++){const o=e[n];o.user?e[t++]=o:Z(o)}for(n=0;n<t;n++)Z(e[n])}function ee(e,n){e.state=0;for(let t=0;t<e.sources.length;t+=1){const o=e.sources[t];if(o.sources){const r=o.state;r===L?o!==n&&(!o.updatedAt||o.updatedAt<W)&&Z(o):r===J&&ee(o,n)}}}function be(e){for(let n=0;n<e.observers.length;n+=1){const t=e.observers[n];t.state||(t.state=J,t.pure?k.push(t):P.push(t),t.observers&&be(t))}}function te(e){let n;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),o=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const i=r.pop(),l=t.observerSlots.pop();o<r.length&&(i.sourceSlots[l]=o,r[o]=i,t.observerSlots[o]=l)}}if(e.owned){for(n=e.owned.length-1;n>=0;n--)te(e.owned[n]);e.owned=null}if(e.cleanups){for(n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}e.state=0,e.context=null}function pe(e){throw e}const Je=Symbol("fallback");function $e(e){for(let n=0;n<e.length;n++)e[n]()}function We(e,n,t={}){let o=[],r=[],i=[],l=0,s=n.length>1?[]:null;return Ue(()=>$e(i)),()=>{let d=e()||[],c,a;return d[Me],I(()=>{let p=d.length,E,T,v,w,R,j,B,N,D;if(p===0)l!==0&&($e(i),i=[],o=[],r=[],l=0,s&&(s=[])),t.fallback&&(o=[Je],r[0]=X(rr=>(i[0]=rr,t.fallback())),l=1);else if(l===0){for(r=new Array(p),a=0;a<p;a++)o[a]=d[a],r[a]=X(h);l=p}else{for(v=new Array(p),w=new Array(p),s&&(R=new Array(p)),j=0,B=Math.min(l,p);j<B&&o[j]===d[j];j++);for(B=l-1,N=p-1;B>=j&&N>=j&&o[B]===d[N];B--,N--)v[N]=r[B],w[N]=i[B],s&&(R[N]=s[B]);for(E=new Map,T=new Array(N+1),a=N;a>=j;a--)D=d[a],c=E.get(D),T[a]=c===void 0?-1:c,E.set(D,a);for(c=j;c<=B;c++)D=o[c],a=E.get(D),a!==void 0&&a!==-1?(v[a]=r[c],w[a]=i[c],s&&(R[a]=s[c]),a=T[a],E.set(D,a)):i[c]();for(a=j;a<p;a++)a in v?(r[a]=v[a],i[a]=w[a],s&&(s[a]=R[a],s[a](a))):r[a]=X(h);r=r.slice(0,l=p),o=d.slice(0)}return r});function h(p){if(i[a]=p,s){const[E,T]=z(a);return s[a]=T,n(d[a],E)}return n(d[a])}}}function C(e,n){return I(()=>e(n||{}))}const Xe=e=>`Stale read from <${e}>.`;function K(e){const n="fallback"in e&&{fallback:()=>e.fallback};return F(We(()=>e.each,e.children,n||void 0))}function O(e){const n=e.keyed,t=F(()=>e.when,void 0,{equals:(o,r)=>n?o===r:!o==!r});return F(()=>{const o=t();if(o){const r=e.children;return typeof r=="function"&&r.length>0?I(()=>r(n?o:()=>{if(!I(t))throw Xe("Show");return e.when})):r}return e.fallback},void 0,void 0)}function Qe(e,n,t){let o=t.length,r=n.length,i=o,l=0,s=0,d=n[r-1].nextSibling,c=null;for(;l<r||s<i;){if(n[l]===t[s]){l++,s++;continue}for(;n[r-1]===t[i-1];)r--,i--;if(r===l){const a=i<o?s?t[s-1].nextSibling:t[i-s]:d;for(;s<i;)e.insertBefore(t[s++],a)}else if(i===s)for(;l<r;)(!c||!c.has(n[l]))&&n[l].remove(),l++;else if(n[l]===t[i-1]&&t[s]===n[r-1]){const a=n[--r].nextSibling;e.insertBefore(t[s++],n[l++].nextSibling),e.insertBefore(t[--i],a),n[r]=t[i]}else{if(!c){c=new Map;let h=s;for(;h<i;)c.set(t[h],h++)}const a=c.get(n[l]);if(a!=null)if(s<a&&a<i){let h=l,p=1,E;for(;++h<r&&h<i&&!((E=c.get(n[h]))==null||E!==a+p);)p++;if(p>a-s){const T=n[l];for(;s<a;)e.insertBefore(t[s++],T)}else e.replaceChild(t[s++],n[l++])}else l++;else n[l++].remove()}}}const ve="_$DX_DELEGATE";function u(e,n,t){let o;const r=()=>{const l=document.createElement("template");return l.innerHTML=e,t?l.content.firstChild.firstChild:l.content.firstChild},i=n?()=>(o||(o=r())).cloneNode(!0):()=>I(()=>document.importNode(o||(o=r()),!0));return i.cloneNode=i,i}function V(e,n=window.document){const t=n[ve]||(n[ve]=new Set);for(let o=0,r=e.length;o<r;o++){const i=e[o];t.has(i)||(t.add(i),n.addEventListener(i,et))}}function S(e,n,t){t==null?e.removeAttribute(n):e.setAttribute(n,t)}function q(e,n){n==null?e.removeAttribute("class"):e.className=n}function Ze(e,n,t){return I(()=>e(n,t))}function f(e,n,t,o){if(t!==void 0&&!o&&(o=[]),typeof n!="function")return ne(e,n,o,t);g(r=>ne(e,n(),r,t),o)}function et(e){const n=`$$${e.type}`;let t=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==t&&Object.defineProperty(e,"target",{configurable:!0,value:t}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}});t;){const o=t[n];if(o&&!t.disabled){const r=t[`${n}Data`];if(r!==void 0?o.call(t,r,e):o.call(t,e),e.cancelBubble)return}t=t._$host||t.parentNode||t.host}}function ne(e,n,t,o,r){for(;typeof t=="function";)t=t();if(n===t)return t;const i=typeof n,l=o!==void 0;if(e=l&&t[0]&&t[0].parentNode||e,i==="string"||i==="number")if(i==="number"&&(n=n.toString()),l){let s=t[0];s&&s.nodeType===3?s.data=n:s=document.createTextNode(n),t=H(e,t,o,s)}else t!==""&&typeof t=="string"?t=e.firstChild.data=n:t=e.textContent=n;else if(n==null||i==="boolean")t=H(e,t,o);else{if(i==="function")return g(()=>{let s=n();for(;typeof s=="function";)s=s();t=ne(e,s,t,o)}),()=>t;if(Array.isArray(n)){const s=[],d=t&&Array.isArray(t);if(le(s,n,t,r))return g(()=>t=ne(e,s,t,o,!0)),()=>t;if(s.length===0){if(t=H(e,t,o),l)return t}else d?t.length===0?me(e,s,o):Qe(e,t,s):(t&&H(e),me(e,s));t=s}else if(n instanceof Node){if(Array.isArray(t)){if(l)return t=H(e,t,o,n);H(e,t,null,n)}else t==null||t===""||!e.firstChild?e.appendChild(n):e.replaceChild(n,e.firstChild);t=n}else console.warn("Unrecognized value. Skipped inserting",n)}return t}function le(e,n,t,o){let r=!1;for(let i=0,l=n.length;i<l;i++){let s=n[i],d=t&&t[i];if(s instanceof Node)e.push(s);else if(!(s==null||s===!0||s===!1))if(Array.isArray(s))r=le(e,s,d)||r;else if(typeof s=="function")if(o){for(;typeof s=="function";)s=s();r=le(e,Array.isArray(s)?s:[s],Array.isArray(d)?d:[d])||r}else e.push(s),r=!0;else{const c=String(s);d&&d.nodeType===3?(d.data=c,e.push(d)):e.push(document.createTextNode(c))}}return r}function me(e,n,t=null){for(let o=0,r=n.length;o<r;o++)e.insertBefore(n[o],t)}function H(e,n,t,o){if(t===void 0)return e.textContent="";const r=o||document.createTextNode("");if(n.length){let i=!1;for(let l=n.length-1;l>=0;l--){const s=n[l];if(r!==s){const d=s.parentNode===e;!i&&!l?d?e.replaceChild(r,s):e.insertBefore(r,t):d&&s.remove()}else i=!0}}else e.insertBefore(r,t);return[r]}function tt(e){return Object.keys(e).reduce((t,o)=>{const r=e[o];return t[o]=Object.assign({},r),we(r.value)&&!lt(r.value)&&!Array.isArray(r.value)&&(t[o].value=Object.assign({},r.value)),Array.isArray(r.value)&&(t[o].value=r.value.slice(0)),t},{})}function nt(e){return e?Object.keys(e).reduce((t,o)=>{const r=e[o];return t[o]=we(r)&&"value"in r?r:{value:r},t[o].attribute||(t[o].attribute=it(o)),t[o].parse="parse"in t[o]?t[o].parse:typeof t[o].value!="string",t},{}):{}}function rt(e){return Object.keys(e).reduce((t,o)=>(t[o]=e[o].value,t),{})}function ot(e,n){const t=tt(n);return Object.keys(n).forEach(r=>{const i=t[r],l=e.getAttribute(i.attribute),s=e[r];l&&(i.value=i.parse?_e(l):l),s!=null&&(i.value=Array.isArray(s)?s.slice(0):s),i.reflect&&ye(e,i.attribute,i.value),Object.defineProperty(e,r,{get(){return i.value},set(d){const c=i.value;i.value=d,i.reflect&&ye(this,i.attribute,i.value);for(let a=0,h=this.__propertyChangedCallbacks.length;a<h;a++)this.__propertyChangedCallbacks[a](r,d,c)},enumerable:!0,configurable:!0})}),t}function _e(e){if(e)try{return JSON.parse(e)}catch{return e}}function ye(e,n,t){if(t==null||t===!1)return e.removeAttribute(n);let o=JSON.stringify(t);e.__updating[n]=!0,o==="true"&&(o=""),e.setAttribute(n,o),Promise.resolve().then(()=>delete e.__updating[n])}function it(e){return e.replace(/\.?([A-Z]+)/g,(n,t)=>"-"+t.toLowerCase()).replace("_","-").replace(/^-/,"")}function we(e){return e!=null&&(typeof e=="object"||typeof e=="function")}function lt(e){return Object.prototype.toString.call(e)==="[object Function]"}function st(e){return typeof e=="function"&&e.toString().indexOf("class")===0}let se;function at(e,n){const t=Object.keys(n);return class extends e{static get observedAttributes(){return t.map(r=>n[r].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={}}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=ot(this,n);const r=rt(this.props),i=this.Component,l=se;try{se=this,this.__initialized=!0,st(i)?new i(r,{element:this}):i(r,{element:this})}finally{se=l}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let r=null;for(;r=this.__releaseCallbacks.pop();)r(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(r,i,l){if(this.__initialized&&!this.__updating[r]&&(r=this.lookupProp(r),r in n)){if(l==null&&!this[r])return;this[r]=n[r].parse?_e(l):l}}lookupProp(r){if(n)return t.find(i=>r===i||r===n[i].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:"open"})}addReleaseCallback(r){this.__releaseCallbacks.push(r)}addPropertyChangedCallback(r){this.__propertyChangedCallbacks.push(r)}}}function ct(e,n={},t={}){const{BaseElement:o=HTMLElement,extension:r}=t;return i=>{if(!e)throw new Error("tag is required to register a Component");let l=customElements.get(e);return l?(l.prototype.Component=i,l):(l=at(o,nt(n)),l.prototype.Component=i,l.prototype.registeredTag=e,customElements.define(e,l,r),l)}}function ut(e){const n=Object.keys(e),t={};for(let o=0;o<n.length;o++){const[r,i]=z(e[n[o]]);Object.defineProperty(t,n[o],{get:r,set(l){i(()=>l)}})}return t}function dt(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let n=e.parentNode;for(;n&&!n._$owner&&!(n.assignedSlot&&n.assignedSlot._$owner);)n=n.parentNode;return n&&n.assignedSlot?n.assignedSlot._$owner:e._$owner}function ft(e){return(n,t)=>{const{element:o}=t;return X(r=>{const i=ut(n);o.addPropertyChangedCallback((s,d)=>i[s]=d),o.addReleaseCallback(()=>{o.renderRoot.textContent="",r()});const l=e(i,t);return f(o.renderRoot,l)},dt(o))}}function _(e,n,t){return arguments.length===2&&(t=n,n={}),ct(e,n)(ft(t))}const y="ar",ht=`:host{align-items:center;border-radius:var(--border-radius);display:inline-flex;height:var(--input-height)}button{align-items:center;background:inherit;border:none;border-radius:inherit;box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;font:inherit;gap:var(--gap);height:inherit;justify-content:center;outline:none;padding:0 12px;width:inherit}button:hover{filter:brightness(1.1)}.primary{background-image:var(--accent-gradient);color:var(--accent-color)}.primary.text{background-image:none;color:var(--primary-color)}.primary.outline{background-image:none;border:1px solid var(--primary-color);color:var(--primary-color)}.primary:hover{filter:brightness(1.2)}.info{background:var(--info-color)}.info.text{background:none;color:var(--text-color)}.info.outline{background:none;border:1px solid var(--info-color);color:var(--text-color)}.info:hover{filter:brightness(.95)}.warning{background:var(--warning-color);color:var(--accent-color)}.warning.text{background:none;color:var(--warning-color)}.warning.outline{background:none;border:1px solid var(--warning-color);color:var(--warning-color)}.danger{background:var(--danger-color);color:var(--accent-color)}.danger.text{background:none;color:var(--danger-color)}.danger.outline{background:none;border:1px solid var(--danger-color);color:var(--danger-color)}.success{background:var(--success-color);color:var(--accent-color)}.success.text{background:none;color:var(--success-color)}.success.outline{background:none;border:1px solid var(--success-color);color:var(--success-color)}.circle{border-radius:50%;padding:0 2px;width:var(--input-height)}.round{border-radius:var(--round-radius)} | ||
`,gt=u("<style>"),xe=u('<ar-icon name="loading" spin>',!0,!1),bt=u("<button>"),pt=u('<button><slot></slot><slot name="suffix">'),$t=u('<slot name="prefix">'),vt=u("<slot>"),mt=e=>[(()=>{const n=gt();return f(n,ht),n})(),C(O,{get when(){return e.shape==="circle"},get fallback(){return(()=>{const n=pt(),t=n.firstChild,o=t.nextSibling;return f(n,C(O,{get when(){return e.loading},get fallback(){return(()=>{const r=$t();return r._$owner=b(),r})()},get children(){const r=xe();return r._$owner=b(),r}}),t),t._$owner=b(),o._$owner=b(),g(()=>q(n,`${e.status} ${e.type} ${e.shape}`)),n})()},get children(){const n=bt();return f(n,C(O,{get when(){return e.loading},get fallback(){return(()=>{const t=vt();return t._$owner=b(),t})()},get children(){const t=xe();return t._$owner=b(),t}})),g(()=>q(n,`${e.status} ${e.type} ${e.shape}`)),n}})],ke=()=>{_(`${y}-button`,{type:"default",status:"primary",shape:"default",loading:!1},mt)},A=(e,...n)=>e.reduce((o,r,i)=>o+r+(n[i]||""),""),_t=u('<ar-icon size="5rem">',!0,!1),yt=u('<div class="flex flex-col justify-center gap-2 h-20"><div class="font-bold"></div><div class="font-size-3">'),wt=u('<img class="w-20 rd-2" alt="logo">'),xt=u('<img class="w-6" alt="avatar">'),kt=u("<div>"),Ct=u(`<style>/* layer: preflights */ | ||
*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;} | ||
@@ -21,3 +21,3 @@ /* layer: default */ | ||
.font-bold{font-weight:700;} | ||
.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / 0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / 0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);};`),Ct=u('<slot class="flex items-center p-3 gap-3" style="border-bottom:1px solid var(--gray-2)" name="header">'),Et=u('<slot name="footer" class="flex items-center p-3 gap-3" style="border-top:1px solid var(--gray-2)">'),St=u('<div class="bg-1 rd-3 cursor-pointer"><slot class="flex items-center p-3 gap-3">'),zt=e=>{const n=E` | ||
.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / 0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / 0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);};`),Et=u('<slot class="flex items-center p-3 gap-3" style="border-bottom:1px solid var(--gray-2)" name="header">'),St=u('<slot name="footer" class="flex items-center p-3 gap-3" style="border-top:1px solid var(--gray-2)">'),zt=u('<div class="bg-1 rd-3 cursor-pointer"><slot class="flex items-center p-3 gap-3">'),At=e=>{const n=A` | ||
:host { | ||
@@ -33,3 +33,3 @@ display: block; | ||
} | ||
`,t=()=>[C(B,{get when(){return e.icon},get fallback(){return(()=>{const r=_t();return g(()=>x(r,"src",e.logo)),r})()},get children(){const r=vt();return r._$owner=h(),g(()=>r.name=e.logo),r}}),(()=>{const r=yt(),i=r.firstChild,s=i.nextSibling;return f(i,()=>e.title),f(s,()=>e.description),r})()],o=()=>[(()=>{const r=wt();return g(()=>x(r,"src",e.avatar||"/apple-touch-icon.png")),r})(),(()=>{const r=xt();return f(r,()=>e.creator||"A-M"),r})()];return[(()=>{const r=kt(),i=r.firstChild;return f(r,n,i),r})(),(()=>{const r=St(),i=r.firstChild;return f(r,C(B,{get when(){return e.header},get children(){const s=Ct();return s._$owner=h(),s}}),i),i._$owner=h(),f(i,t),f(r,C(B,{get when(){return e.footer},get children(){const s=Et();return s._$owner=h(),f(s,o),s}}),null),r})()]},Ce=()=>{v(`${y}-card`,{header:!1,footer:!0,icon:!1,logo:"ai-chat",title:"",description:"",avatar:"",creator:"",shadow:"never"},zt)},At=u(`<style>/* layer: preflights */ | ||
`,t=()=>[C(O,{get when(){return e.icon},get fallback(){return(()=>{const r=wt();return g(()=>S(r,"src",e.logo)),r})()},get children(){const r=_t();return r._$owner=b(),g(()=>r.name=e.logo),r}}),(()=>{const r=yt(),i=r.firstChild,l=i.nextSibling;return f(i,()=>e.title),f(l,()=>e.description),r})()],o=()=>[(()=>{const r=xt();return g(()=>S(r,"src",e.avatar||"/apple-touch-icon.png")),r})(),(()=>{const r=kt();return f(r,()=>e.creator||"A-M"),r})()];return[(()=>{const r=Ct(),i=r.firstChild;return f(r,n,i),r})(),(()=>{const r=zt(),i=r.firstChild;return f(r,C(O,{get when(){return e.header},get children(){const l=Et();return l._$owner=b(),l}}),i),i._$owner=b(),f(i,t),f(r,C(O,{get when(){return e.footer},get children(){const l=St();return l._$owner=b(),f(l,o),l}}),null),r})()]},Ce=()=>{_(`${y}-card`,{header:!1,footer:!0,icon:!1,logo:"ai-chat",title:"",description:"",avatar:"",creator:"",shadow:"never"},At)},Tt=u(`<style>/* layer: preflights */ | ||
*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;} | ||
@@ -46,3 +46,3 @@ /* layer: default */ | ||
.rd-3{border-radius:0.75rem;} | ||
.p-x-3{padding-left:0.75rem;padding-right:0.75rem;};`),Tt=u('<ar-icon size="2.75rem">',!0,!1),jt=u('<div class="chat-avatar flex items-center">'),Ot=u('<div class="flex items-center gap-3"><p></p><ar-icon name="loading" spin>',!0,!1),Bt=u('<div><div class="chat-content p-x-3 rd-3">'),Pt=u('<img class="w-11 rd-2 self-start" alt="avatar">'),It=u("<ar-rich-text>",!0,!1),Rt=e=>{const n=E` | ||
.p-x-3{padding-left:0.75rem;padding-right:0.75rem;};`),Ot=u('<ar-icon size="2.75rem">',!0,!1),jt=u('<div class="chat-avatar flex items-center">'),Bt=u('<div class="flex items-center gap-3"><p></p><ar-icon name="loading" spin>',!0,!1),Pt=u('<div><div class="chat-content p-x-3 rd-3">'),It=u('<img class="w-11 rd-2 self-start" alt="avatar">'),Rt=u("<ar-rich-text>",!0,!1),Nt=e=>{const n=A` | ||
:host { | ||
@@ -87,3 +87,3 @@ display: block; | ||
} | ||
`;return[(()=>{const t=At(),o=t.firstChild;return f(t,n,o),t})(),(()=>{const t=Bt(),o=t.firstChild;return f(t,C(B,{get when(){return e.showAvatar},get children(){const r=jt();return f(r,C(B,{get when(){return e.avatarType==="icon"},get fallback(){return(()=>{const i=Pt();return g(()=>x(i,"src",e.avatar)),i})()},get children(){const i=Tt();return i._$owner=h(),g(()=>i.name=e.role==="user"?e.avatar||"avatar-01":e.avatar||"ai-chat"),i}})),r}}),o),f(o,C(B,{get when(){return e.loading},get fallback(){return(()=>{const r=It();return r._$owner=h(),g(()=>r.text=e.content),r})()},get children(){const r=Ot(),i=r.firstChild,s=i.nextSibling;return f(i,()=>e.loadingText),s._$owner=h(),r}})),g(()=>X(t,`chat-bubble ${e.role==="user"?"right":"left"} m-3`)),t})()]},Ee=()=>{v(`${y}-chat-bubble`,{role:"",content:"",loading:!1,loadingText:"",showAvatar:!0,avatar:"",avatarType:"icon",direction:"row"},Rt)},Nt=u("<style>"),Lt=u('<label class="container"><input type="checkbox"><div class="checkmark"></div><slot>'),Ft=(e,{element:n})=>{const t=E` | ||
`;return[(()=>{const t=Tt(),o=t.firstChild;return f(t,n,o),t})(),(()=>{const t=Pt(),o=t.firstChild;return f(t,C(O,{get when(){return e.showAvatar},get children(){const r=jt();return f(r,C(O,{get when(){return e.avatarType==="icon"},get fallback(){return(()=>{const i=It();return g(()=>S(i,"src",e.avatar)),i})()},get children(){const i=Ot();return i._$owner=b(),g(()=>i.name=e.role==="user"?e.avatar||"avatar-01":e.avatar||"ai-chat"),i}})),r}}),o),f(o,C(O,{get when(){return e.loading},get fallback(){return(()=>{const r=Rt();return r._$owner=b(),g(()=>r.text=e.content),r})()},get children(){const r=Bt(),i=r.firstChild,l=i.nextSibling;return f(i,()=>e.loadingText),l._$owner=b(),r}})),g(()=>q(t,`chat-bubble ${e.role==="user"?"right":"left"} m-3`)),t})()]},Ee=()=>{_(`${y}-chat-bubble`,{role:"",content:"",loading:!1,loadingText:"",showAvatar:!0,avatar:"",avatarType:"icon",direction:"row"},Nt)},Lt=u("<style>"),Ft=u('<label class="container"><input type="checkbox"><div class="checkmark"></div><slot>'),Kt=(e,{element:n})=>{const t=A` | ||
:host { | ||
@@ -165,3 +165,3 @@ display: inline-block; | ||
} | ||
`,[o,r]=S(e.value),i=s=>{r(!o());const l=s.target,d=new CustomEvent("change",{detail:{value:l.value}});n.dispatchEvent(d)};return[(()=>{const s=Nt();return f(s,t),s})(),(()=>{const s=Lt(),l=s.firstChild,d=l.nextSibling,c=d.nextSibling;return l.addEventListener("change",i),c._$owner=h(),g(()=>l.checked=o()),s})()]},Se=()=>{v(`${y}-checkbox`,{value:!1},Ft)},Kt=u("<style>"),Ht=u('<div class="box"><div class="nums-chip"><div class="number">0</div><div class="number">1</div><div class="number">2</div><div class="number">3</div><div class="number">4</div><div class="number">5</div><div class="number">6</div><div class="number">7</div><div class="number">8</div><div class="number">9'),Dt=(e,{element:n})=>{const t=E` | ||
`,[o,r]=z(e.value),i=l=>{r(!o());const s=l.target,d=new CustomEvent("change",{detail:{value:s.value}});n.dispatchEvent(d)};return[(()=>{const l=Lt();return f(l,t),l})(),(()=>{const l=Ft(),s=l.firstChild,d=s.nextSibling,c=d.nextSibling;return s.addEventListener("change",i),c._$owner=b(),g(()=>s.checked=o()),l})()]},Se=()=>{_(`${y}-checkbox`,{value:!1},Kt)},Ht=u("<style>"),Dt=u('<div class="box"><div class="nums-chip"><div class="number">0</div><div class="number">1</div><div class="number">2</div><div class="number">3</div><div class="number">4</div><div class="number">5</div><div class="number">6</div><div class="number">7</div><div class="number">8</div><div class="number">9'),Gt=(e,{element:n})=>{const t=A` | ||
:host { | ||
@@ -185,3 +185,3 @@ display: inline-block; | ||
} | ||
`;return re(()=>{setTimeout(()=>{const o=n.shadowRoot.querySelector(".nums-chip");o.style.transform=`translate(0, -${e.number*10}%)`},10)}),[(()=>{const o=Kt();return f(o,t),o})(),Ht()]},ae=()=>{v(`${y}-dance-number`,{number:0,size:12},Dt)},Gt=u("<style>"),Mt=u("<span>,"),Ut=u("<div><ar-dance-number>",!0,!1);ae();const Vt=e=>{const n=E` | ||
`;return oe(()=>{setTimeout(()=>{const o=n.shadowRoot.querySelector(".nums-chip");o.style.transform=`translate(0, -${e.number*10}%)`},10)}),[(()=>{const o=Ht();return f(o,t),o})(),Dt()]},ae=()=>{_(`${y}-dance-number`,{number:0,size:12},Gt)},Mt=u("<style>"),Ut=u("<span>,"),Vt=u("<div><ar-dance-number>",!0,!1);ae();const qt=e=>{const n=A` | ||
:host { | ||
@@ -205,3 +205,3 @@ display: inline-flex; | ||
} | ||
`,t=`${e.count}`.split("").map(o=>o===","?",":parseInt(o));return[(()=>{const o=Gt();return f(o,n),o})(),C(ie,{each:t,children:o=>o===","?Mt():(()=>{const r=Ut(),i=r.firstChild;return i.number=o,i._$owner=h(),g(s=>{const l=e.type==="card"?"card":"",d=e.size;return l!==s._v$&&X(r,s._v$=l),d!==s._v$2&&(i.size=s._v$2=d),s},{_v$:void 0,_v$2:void 0}),r})()})]},ze=()=>{v(`${y}-dance-count`,{count:0,size:12,type:"default"},Vt)},qt=u("<style>"),Yt=u("<slot>"),Jt=e=>{const n=E` | ||
`,t=`${e.count}`.split("").map(o=>o===","?",":parseInt(o));return[(()=>{const o=Mt();return f(o,n),o})(),C(K,{each:t,children:o=>o===","?Ut():(()=>{const r=Vt(),i=r.firstChild;return i.number=o,i._$owner=b(),g(l=>{const s=e.type==="card"?"card":"",d=e.size;return s!==l._v$&&q(r,l._v$=s),d!==l._v$2&&(i.size=l._v$2=d),l},{_v$:void 0,_v$2:void 0}),r})()})]},ze=()=>{_(`${y}-dance-count`,{count:0,size:12,type:"default"},qt)},Yt=u("<style>"),Jt=u("<slot>"),Wt=e=>{const n=A` | ||
:host { | ||
@@ -216,3 +216,3 @@ display: flex; | ||
} | ||
`;return[(()=>{const t=qt();return f(t,n),t})(),(()=>{const t=Yt();return t._$owner=h(),t})()]},Ae=()=>{v(`${y}-flex-box`,{gap:"1rem",direction:"row",wrap:"wrap",items:"stretch",justify:"flex-start"},Jt)},Wt=u("<style>"),Xt=u("<slot>"),Qt=e=>{const n=E` | ||
`;return[(()=>{const t=Yt();return f(t,n),t})(),(()=>{const t=Jt();return t._$owner=b(),t})()]},Ae=()=>{_(`${y}-flex-box`,{gap:"1rem",direction:"row",wrap:"wrap",items:"stretch",justify:"flex-start"},Wt)},Xt=u("<style>"),Qt=u("<slot>"),Zt=e=>{const n=A` | ||
:host { | ||
@@ -223,5 +223,5 @@ order: ${e.order}; | ||
} | ||
`;return[(()=>{const t=Wt();return f(t,n),t})(),(()=>{const t=Xt();return t._$owner=h(),t})()]},Te=()=>{v(`${y}-flex-item`,{order:0,flex:"0 1 auto",self:"auto"},Qt)},Zt=`:host{display:inline-flex;font-size:inherit;transition:.3s}:host([spin]){animation:rotate 1.4s linear infinite}@keyframes rotate{to{transform:rotate(360deg)}} | ||
`,en=u("<style>"),tn=u('<svg aria-hidden="true"><use>');let ce="";const nn=e=>{ce=e},rn=e=>{const n=`icon icon-${e.name}`;return ce||console.warn("You need use registerIcon first"),[(()=>{const t=en();return f(t,Zt),t})(),(()=>{const t=tn(),o=t.firstChild;return x(t,"class",n),g(r=>{const i=e.size,s=e.size,l=e.color,d=`${ce}#icon-${e.name}`;return i!==r._v$&&x(t,"width",r._v$=i),s!==r._v$2&&x(t,"height",r._v$2=s),l!==r._v$3&&x(t,"fill",r._v$3=l),d!==r._v$4&&x(o,"href",r._v$4=d),r},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),t})()]},je=()=>{v(`${y}-icon`,{name:"date",size:"1em",color:"currentColor"},rn)},on=`:host{--border-radius: 9px;display:inline-block}.card{border-radius:var(--border-radius);cursor:pointer;height:100%;overflow:hidden;position:relative;width:100%}.card-image{border-radius:var(--border-radius);height:100%;object-fit:cover;position:absolute;right:0;top:0;transition:all .4s ease-in-out;width:100%}.card-info{background-color:#0000007f;border-radius:var(--border-radius);bottom:0;box-sizing:border-box;color:#fff;left:0;position:absolute;transform:translateY(calc(100% - 50px));transition:all .4s ease-in-out;width:100%}.card:hover .card-image{transform:scale(1.1)}.card:hover .card-info{transform:translateY(0)}.card-title{align-items:center;display:flex;height:50px;padding:0 15px}.card-description{font-size:12px;padding:0 15px 15px} | ||
`,sn=u("<style>"),ln=u('<div class="card"><div class="card-info"><div class="card-title"></div><div class="card-description">'),an=u('<img class="card-image">'),cn=e=>[(()=>{const n=sn();return f(n,on),n})(),(()=>{const n=ln(),t=n.firstChild,o=t.firstChild,r=o.nextSibling;return f(n,(()=>{const i=R(()=>!!e.imageUrl);return()=>i()&&(()=>{const s=an();return g(()=>x(s,"src",e.imageUrl)),s})()})(),t),f(o,()=>e.title),f(r,()=>e.description),n})()],Oe=()=>{v(`${y}-image-card`,{title:"",description:"",imageUrl:""},cn)},un=u("<style>"),dn=u('<div class="grid-layout"><slot>'),fn=e=>{const n=E` | ||
`;return[(()=>{const t=Xt();return f(t,n),t})(),(()=>{const t=Qt();return t._$owner=b(),t})()]},Te=()=>{_(`${y}-flex-item`,{order:0,flex:"0 1 auto",self:"auto"},Zt)},en=`:host{display:inline-flex;font-size:inherit;transition:.3s}:host([spin]){animation:rotate 1.4s linear infinite}@keyframes rotate{to{transform:rotate(360deg)}} | ||
`,tn=u("<style>"),nn=u('<svg aria-hidden="true"><use>');let ce="";const rn=e=>{ce=e},on=e=>{const n=`icon icon-${e.name}`;return ce||console.warn("You need use registerIcon first"),[(()=>{const t=tn();return f(t,en),t})(),(()=>{const t=nn(),o=t.firstChild;return S(t,"class",n),g(r=>{const i=e.size,l=e.size,s=e.color,d=`${ce}#icon-${e.name}`;return i!==r._v$&&S(t,"width",r._v$=i),l!==r._v$2&&S(t,"height",r._v$2=l),s!==r._v$3&&S(t,"fill",r._v$3=s),d!==r._v$4&&S(o,"href",r._v$4=d),r},{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),t})()]},Oe=()=>{_(`${y}-icon`,{name:"date",size:"1em",color:"currentColor"},on)},ln=`:host{--border-radius: 9px;display:inline-block}.card{border-radius:var(--border-radius);cursor:pointer;height:100%;overflow:hidden;position:relative;width:100%}.card-image{border-radius:var(--border-radius);height:100%;object-fit:cover;position:absolute;right:0;top:0;transition:all .4s ease-in-out;width:100%}.card-info{background-color:#0000007f;border-radius:var(--border-radius);bottom:0;box-sizing:border-box;color:#fff;left:0;position:absolute;transform:translateY(calc(100% - 50px));transition:all .4s ease-in-out;width:100%}.card:hover .card-image{transform:scale(1.1)}.card:hover .card-info{transform:translateY(0)}.card-title{align-items:center;display:flex;height:50px;padding:0 15px}.card-description{font-size:12px;padding:0 15px 15px} | ||
`,sn=u("<style>"),an=u('<div class="card"><div class="card-info"><div class="card-title"></div><div class="card-description">'),cn=u('<img class="card-image">'),un=e=>[(()=>{const n=sn();return f(n,ln),n})(),(()=>{const n=an(),t=n.firstChild,o=t.firstChild,r=o.nextSibling;return f(n,(()=>{const i=F(()=>!!e.imageUrl);return()=>i()&&(()=>{const l=cn();return g(()=>S(l,"src",e.imageUrl)),l})()})(),t),f(o,()=>e.title),f(r,()=>e.description),n})()],je=()=>{_(`${y}-image-card`,{title:"",description:"",imageUrl:""},un)},dn=u("<style>"),fn=u('<div class="grid-layout"><slot>'),hn=e=>{const n=A` | ||
.grid-layout { | ||
@@ -258,4 +258,4 @@ --cols: ${e.cols}; | ||
} | ||
`;return[(()=>{const t=un();return f(t,n),t})(),(()=>{const t=dn(),o=t.firstChild;return o._$owner=h(),t})()]},Be=()=>{v(`${y}-layout-grid`,{gap:"1rem",cols:"auto-fit",xs:void 0,sm:void 0,md:void 0,lg:void 0,xl:void 0,min:"0"},fn)},hn=`:host{display:grid;grid-template:auto 1fr auto / auto 1fr auto;height:100%}::slotted([slot="header"]){grid-column:1 / 4}::slotted([slot="left-sider"]){grid-column:1 / 2;overflow:auto}::slotted([slot="content"]){grid-column:2 / 3;overflow:auto}::slotted([slot="right-sider"]){grid-column:3 / 4;overflow:auto}::slotted([slot="footer"]){grid-column:1 / 4} | ||
`,gn=u("<style>"),bn=u('<slot name="header">'),pn=u('<slot name="left-sider">'),$n=u('<slot name="content">'),mn=u('<slot name="right-sider">'),vn=u('<slot name="footer">'),yn=()=>[(()=>{const e=gn();return f(e,hn),e})(),(()=>{const e=bn();return e._$owner=h(),e})(),(()=>{const e=pn();return e._$owner=h(),e})(),(()=>{const e=$n();return e._$owner=h(),e})(),(()=>{const e=mn();return e._$owner=h(),e})(),(()=>{const e=vn();return e._$owner=h(),e})()],Pe=()=>{v(`${y}-layout-holy`,yn)},_n=u("<style>"),wn=u('<div class="place-holder"><slot>'),xn=()=>{const e=E` | ||
`;return[(()=>{const t=dn();return f(t,n),t})(),(()=>{const t=fn(),o=t.firstChild;return o._$owner=b(),t})()]},Be=()=>{_(`${y}-layout-grid`,{gap:"1rem",cols:"auto-fit",xs:void 0,sm:void 0,md:void 0,lg:void 0,xl:void 0,min:"0"},hn)},gn=`:host{display:grid;grid-template:auto 1fr auto / auto 1fr auto;height:100%}::slotted([slot="header"]){grid-column:1 / 4}::slotted([slot="left-sider"]){grid-column:1 / 2;overflow:auto}::slotted([slot="content"]){grid-column:2 / 3;overflow:auto}::slotted([slot="right-sider"]){grid-column:3 / 4;overflow:auto}::slotted([slot="footer"]){grid-column:1 / 4} | ||
`,bn=u("<style>"),pn=u('<slot name="header">'),$n=u('<slot name="left-sider">'),vn=u('<slot name="content">'),mn=u('<slot name="right-sider">'),_n=u('<slot name="footer">'),yn=()=>[(()=>{const e=bn();return f(e,gn),e})(),(()=>{const e=pn();return e._$owner=b(),e})(),(()=>{const e=$n();return e._$owner=b(),e})(),(()=>{const e=vn();return e._$owner=b(),e})(),(()=>{const e=mn();return e._$owner=b(),e})(),(()=>{const e=_n();return e._$owner=b(),e})()],Pe=()=>{_(`${y}-layout-holy`,yn)},wn=u("<style>"),xn=u('<div class="place-holder"><slot>'),kn=()=>{const e=A` | ||
:host { | ||
@@ -273,3 +273,3 @@ display: block; | ||
} | ||
`;return[(()=>{const n=_n();return f(n,e),n})(),(()=>{const n=wn(),t=n.firstChild;return t._$owner=h(),n})()]},Ie=()=>{v(`${y}-place-holder`,xn)},kn=u('<label><input type="radio"><slot>');function Cn(e){function n(){e.onChange&&!e.disabled&&e.onChange(e.value)}return(()=>{const t=kn(),o=t.firstChild,r=o.nextSibling;return o.addEventListener("change",n),r._$owner=h(),g(()=>o.disabled=e.disabled),g(()=>o.value=e.value),g(()=>o.checked=e.checked),t})()}const Re=()=>{v(`${y}-radio`,{value:"",checked:!1,disabled:!1,onChange:e=>{console.log(e)}},Cn)},En=u("<style>"),Sn=u('<div class="root">'),zn=u('<label><input type="radio" name="radio"><span>'),An=(e,{element:n})=>{const t=E` | ||
`;return[(()=>{const n=wn();return f(n,e),n})(),(()=>{const n=xn(),t=n.firstChild;return t._$owner=b(),n})()]},Ie=()=>{_(`${y}-place-holder`,kn)},Cn=u('<label><input type="radio"><slot>');function En(e){function n(){e.onChange&&!e.disabled&&e.onChange(e.value)}return(()=>{const t=Cn(),o=t.firstChild,r=o.nextSibling;return o.addEventListener("change",n),r._$owner=b(),g(()=>o.disabled=e.disabled),g(()=>o.value=e.value),g(()=>o.checked=e.checked),t})()}const Re=()=>{_(`${y}-radio`,{value:"",checked:!1,disabled:!1,onChange:e=>{console.log(e)}},En)},Sn=u("<style>"),zn=u('<div class="root">'),An=u('<label><input type="radio" name="radio"><span>'),Tn=(e,{element:n})=>{const t=A` | ||
:host { | ||
@@ -328,3 +328,3 @@ display: inline-block; | ||
} | ||
`,[o,r]=S(e.value||"");ne(()=>{const s=new CustomEvent("change",{detail:{value:o()},bubbles:!0});n.dispatchEvent(s)});const i=s=>{r(s)};return[(()=>{const s=En();return f(s,t),s})(),(()=>{const s=Sn();return f(s,C(ie,{get each(){return e.options},children:l=>(()=>{const d=zn(),c=d.firstChild,a=c.nextSibling;return d.$$click=()=>i(l.value),f(a,()=>l.label),g(()=>c.value=l.value),g(()=>c.checked=o()===l.value),d})()})),s})()]},Ne=()=>{v(`${y}-radio-button`,{options:[{label:"Option1",value:"1"},{label:"Option2",value:"2"},{label:"Option3",value:"3"}],value:"",direction:"row"},An)};W(["click"]);const Tn=u("<style>"),jn=u('<div class="root">'),On=u('<div class="radio-button"><input name="radio-group" class="radio-button__input" type="radio"><label class="radio-button__label"><span class="radio-button__custom">'),Bn=(e,{element:n})=>{const t=E` | ||
`,[o,r]=z(e.value||"");Q(()=>{const l=new CustomEvent("change",{detail:{value:o()},bubbles:!0});n.dispatchEvent(l)});const i=l=>{r(l)};return[(()=>{const l=Sn();return f(l,t),l})(),(()=>{const l=zn();return f(l,C(K,{get each(){return e.options},children:s=>(()=>{const d=An(),c=d.firstChild,a=c.nextSibling;return d.$$click=()=>i(s.value),f(a,()=>s.label),g(()=>c.value=s.value),g(()=>c.checked=o()===s.value),d})()})),l})()]},Ne=()=>{_(`${y}-radio-button`,{options:[{label:"Option1",value:"1"},{label:"Option2",value:"2"},{label:"Option3",value:"3"}],value:"",direction:"row"},Tn)};V(["click"]);const On=u("<style>"),jn=u('<div class="root">'),Bn=u('<div class="radio-button"><input name="radio-group" class="radio-button__input" type="radio"><label class="radio-button__label"><span class="radio-button__custom">'),Pn=(e,{element:n})=>{const t=A` | ||
:host { | ||
@@ -388,4 +388,81 @@ display: inline-block; | ||
} | ||
`,[o,r]=S(e.value||"");ne(()=>{const s=new CustomEvent("change",{detail:{value:o()},bubbles:!0});n.dispatchEvent(s)});const i=s=>{r(s)};return[(()=>{const s=Tn();return f(s,t),s})(),(()=>{const s=jn();return f(s,C(ie,{get each(){return e.options},children:(l,d)=>(()=>{const c=On(),a=c.firstChild,b=a.nextSibling;return b.firstChild,c.$$click=()=>i(l.value),f(b,()=>l.label,null),g($=>{const k=`radio-${d()}`,z=`radio-${d()}`;return k!==$._v$&&x(a,"id",$._v$=k),z!==$._v$2&&x(b,"for",$._v$2=z),$},{_v$:void 0,_v$2:void 0}),g(()=>a.value=l.value),g(()=>a.checked=o()===l.value),c})()})),s})()]},Le=()=>{v(`${y}-radio-group`,{options:[{label:"Option1",value:"1"},{label:"Option2",value:"2"},{label:"Option3",value:"3"}],value:"",direction:"row"},Bn)};W(["click"]);const Pn=`:host{align-items:center;background-color:var(--bg-2);border-radius:var(--border-radius);display:flex;gap:var(--gap);padding:0 10px}.textarea{background:none;border:none;box-sizing:border-box;flex:1;font:inherit;margin:0;outline:none;overflow:auto;padding:6px 0;resize:none;width:100%} | ||
`,In=u("<style>"),Rn=u('<slot name="prefix">'),Nn=u('<textarea class="textarea">'),Ln=u('<slot name="suffix">'),Fn=(e,{element:n})=>{const[t,o]=S(),[r,i]=S(e.height);re(()=>{setTimeout(()=>{var a;const c=(a=t())==null?void 0:a.scrollHeight;c&&i(`${c}px`)},0)});const s=c=>{const a=c.target;i(e.height),i(`${a.scrollHeight}px`)},l=c=>{const a=c.target,b=new CustomEvent("change",{detail:{value:a.value},bubbles:!0});n.dispatchEvent(b)},d=c=>{if((c.metaKey||c.ctrlKey)&&c.key==="Enter"&&(c.preventDefault(),c.target)){const a=c.target,b=new CustomEvent("enter",{detail:{value:a.value}});n.dispatchEvent(b)}};return[(()=>{const c=In();return f(c,Pn),c})(),(()=>{const c=Rn();return c._$owner=h(),c})(),(()=>{const c=Nn();return c.$$keydown=d,c.addEventListener("change",l),c.$$input=s,Qe(o,c),g(a=>{const b=r(),$=e.placeholder;return b!==a._v$&&((a._v$=b)!=null?c.style.setProperty("height",b):c.style.removeProperty("height")),$!==a._v$2&&x(c,"placeholder",a._v$2=$),a},{_v$:void 0,_v$2:void 0}),g(()=>c.value=e.value),c})(),(()=>{const c=Ln();return c._$owner=h(),c})()]},Fe=()=>{v(`${y}-textarea`,{value:"",placeholder:"",height:"32px"},Fn)};W(["input","keydown"]);const Kn=`:host{align-items:center;background-color:var(--bg-2);border-radius:var(--border-radius);display:inline-flex;gap:var(--gap);height:var(--input-height);padding:0 12px;width:100%}input{background:none;border:none;box-sizing:border-box;color:inherit;font:inherit;outline:none;padding:0;width:inherit} | ||
`,Hn=u("<style>"),Dn=u('<slot name="prefix">'),Gn=u('<input class="textarea">'),Mn=u('<slot name="suffix">'),Un=(e,{element:n})=>{const t=r=>{const i=r.target,s=new CustomEvent("change",{detail:{value:i.value}});n.dispatchEvent(s)},o=r=>{if(r.keyCode===13&&(r.preventDefault(),r.target)){const i=r.target,s=new CustomEvent("enter",{detail:{value:i.value}});n.dispatchEvent(s)}};return[(()=>{const r=Hn();return f(r,Kn),r})(),(()=>{const r=Dn();return r._$owner=h(),r})(),(()=>{const r=Gn();return r.$$keydown=o,r.addEventListener("change",t),g(i=>{const s=e.placeholder,l=e.type;return s!==i._v$&&x(r,"placeholder",i._v$=s),l!==i._v$2&&x(r,"type",i._v$2=l),i},{_v$:void 0,_v$2:void 0}),g(()=>r.value=e.value),r})(),(()=>{const r=Mn();return r._$owner=h(),r})()]},Ke=()=>{v(`${y}-textfield`,{value:"",placeholder:"",type:"text"},Un)};W(["keydown"]);const He=u("<span>"),Vn=e=>{const[n,t]=S(""),[o,r]=S(0),[i,s]=S(!0),{text:l,speed:d=100,cursor:c="|"}=e;return re(()=>{const a=setInterval(()=>{t(l.substr(0,o())),r(o()+1),o()>=l.length&&(s(!1),clearInterval(a))},d)}),[(()=>{const a=He();return f(a,n),a})(),R((()=>{const a=R(()=>!!i());return()=>a()&&(()=>{const b=He();return f(b,c),b})()})())]},De=()=>{v(`${y}-typewriter`,{text:"",speed:100,cursor:"|"},Vn)},qn=Object.freeze(Object.defineProperty({__proto__:null,Button:ke,Card:Ce,ChatBubble:Ee,CheckBox:Se,DanceCount:ze,DanceNumber:ae,FlexBox:Ae,FlexItem:Te,Icon:je,ImageCard:Oe,LayoutGrid:Be,LayoutHoly:Pe,PlaceHolder:Ie,Radio:Re,RadioButton:Ne,RadioGroup:Le,Textarea:Fe,Textfield:Ke,Typewriter:De},Symbol.toStringTag,{value:"Module"})),Wn="",Xn="",Qn="",Yn=(e=qn)=>{for(const n in e){const t=e[n];t()}};p.Button=ke,p.Card=Ce,p.ChatBubble=Ee,p.CheckBox=Se,p.DanceCount=ze,p.DanceNumber=ae,p.FlexBox=Ae,p.FlexItem=Te,p.Icon=je,p.ImageCard=Oe,p.LayoutGrid=Be,p.LayoutHoly=Pe,p.PlaceHolder=Ie,p.Radio=Re,p.RadioButton=Ne,p.RadioGroup=Le,p.Textarea=Fe,p.Textfield=Ke,p.Typewriter=De,p.defineCustomElements=Yn,p.registerIcon=nn,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}); | ||
`,[o,r]=z(e.value||"");Q(()=>{const l=new CustomEvent("change",{detail:{value:o()},bubbles:!0});n.dispatchEvent(l)});const i=l=>{r(l)};return[(()=>{const l=On();return f(l,t),l})(),(()=>{const l=jn();return f(l,C(K,{get each(){return e.options},children:(s,d)=>(()=>{const c=Bn(),a=c.firstChild,h=a.nextSibling;return h.firstChild,c.$$click=()=>i(s.value),f(h,()=>s.label,null),g(p=>{const E=`radio-${d()}`,T=`radio-${d()}`;return E!==p._v$&&S(a,"id",p._v$=E),T!==p._v$2&&S(h,"for",p._v$2=T),p},{_v$:void 0,_v$2:void 0}),g(()=>a.value=s.value),g(()=>a.checked=o()===s.value),c})()})),l})()]},Le=()=>{_(`${y}-radio-group`,{options:[{label:"Option1",value:"1"},{label:"Option2",value:"2"},{label:"Option3",value:"3"}],value:"",direction:"row"},Pn)};V(["click"]);const In=u("<style>"),Rn=u('<div><div><select></select></div><div class="arrow"></div><ul>'),Nn=u("<ar-textfield>",!0,!1),Ln=u('<div class="label-chip"><span>'),Fn=u("<option>"),Kn=u("<li>"),Hn=(e,{element:n})=>{const t=A` | ||
:host { | ||
align-items: center; | ||
background-color: var(--bg-2); | ||
border-radius: var(--border-radius); | ||
box-sizing: border-box; | ||
display: inline-flex; | ||
gap: var(--gap); | ||
height: var(--input-height); | ||
width: 100%; | ||
} | ||
.root { | ||
width: 100%; | ||
position: relative; | ||
} | ||
.label-chip { | ||
padding: 0 10px; | ||
} | ||
.root select { | ||
display: none; | ||
} | ||
.root > div { | ||
position: relative; | ||
z-index: 2; | ||
} | ||
.root > ul { | ||
margin: 0; | ||
padding: 0; | ||
list-style: none; | ||
z-index: 1; | ||
position: absolute; | ||
top: ${e.placement==="bottom"?"100%":0}; | ||
bottom: ${e.placement==="top"?"100%":0}; | ||
left: 0; | ||
right: 0; | ||
visibility: hidden; | ||
opacity: 0; | ||
transform: translate(0, 0) scale(0.8); | ||
transform-origin: 0 0; | ||
filter: drop-shadow(0 12px 20px rgba(22, 42, 90, 0.08)); | ||
transition: all 0.4s ease, transform 0.4s cubic-bezier(0.87, -0.41, 0.19, 1.44), | ||
filter 0.3s ease 0.2s; | ||
} | ||
.root > ul li { | ||
color: var(--text-color); | ||
background: #fff; | ||
padding: 6px 12px; | ||
cursor: pointer; | ||
overflow: hidden; | ||
position: relative; | ||
} | ||
.root > ul li:first-child { | ||
border-radius: var(--border-radius) var(--border-radius) 0 0; | ||
} | ||
.root > ul li:last-child { | ||
border-radius: 0 0 var(--border-radius) var(--border-radius); | ||
} | ||
.root > ul li:hover { | ||
background: var(--primary-color); | ||
color: var(--accent-color); | ||
} | ||
.root.open > ul { | ||
transform: translate(0, ${e.placement==="bottom"?"12px":"-12px"}) scale(1); | ||
opacity: 1; | ||
visibility: visible; | ||
filter: drop-shadow(0 16px 24px rgba(22, 42, 90, 0.16)); | ||
} | ||
`,[o,r]=z(!1),[i,l]=z(e.value||""),s=F(()=>{var a;return((a=e.options)==null?void 0:a.filter(h=>h.value===i()))||[]});Q(()=>{const a=new CustomEvent("change",{detail:{value:i()},bubbles:!0});n.dispatchEvent(a)});const d=()=>{r(!o())},c=a=>{l(a.value)};return[(()=>{const a=In();return f(a,t),a})(),(()=>{const a=Rn(),h=a.firstChild,p=h.firstChild,E=h.nextSibling,T=E.nextSibling;return a.$$click=d,f(h,C(O,{get when(){return s().length>0},get fallback(){return(()=>{const v=Nn();return v._$owner=b(),v})()},get children(){return C(K,{get each(){return s()},children:v=>(()=>{const w=Ln(),R=w.firstChild;return f(R,()=>v.label),w})()})}}),p),f(p,C(K,{get each(){return e.options},children:v=>(()=>{const w=Fn();return f(w,()=>v.label),g(()=>w.selected=i()===v.value),w})()})),f(T,C(K,{get each(){return e.options},children:v=>(()=>{const w=Kn();return w.$$click=()=>c(v),f(w,()=>v.label),w})()})),g(v=>{const w=`root ${o()?"open":""}`,R=e.multiple;return w!==v._v$&&q(a,v._v$=w),R!==v._v$2&&(p.multiple=v._v$2=R),v},{_v$:void 0,_v$2:void 0}),a})()]},Fe=()=>{_(`${y}-select`,{options:[{label:"Option1",value:"1"},{label:"Option2",value:"2"},{label:"Option3",value:"3"}],value:"",placement:"bottom"},Hn)};V(["click"]);const Dn=`:host{align-items:center;background-color:var(--bg-2);border-radius:var(--border-radius);box-sizing:border-box;display:flex;gap:var(--gap);padding:0 10px}.textarea{background:none;border:none;box-sizing:border-box;flex:1;font:inherit;margin:0;outline:none;overflow:auto;padding:6px 0;resize:none;width:100%} | ||
`,Gn=u("<style>"),Mn=u('<slot name="prefix">'),Un=u('<textarea class="textarea">'),Vn=u('<slot name="suffix">'),qn=(e,{element:n})=>{const[t,o]=z(),[r,i]=z(e.height);oe(()=>{setTimeout(()=>{var a;const c=(a=t())==null?void 0:a.scrollHeight;c&&i(`${c}px`)},0)});const l=c=>{const a=c.target;i(e.height),i(`${a.scrollHeight}px`)},s=c=>{const a=c.target,h=new CustomEvent("change",{detail:{value:a.value},bubbles:!0});n.dispatchEvent(h)},d=c=>{if((c.metaKey||c.ctrlKey)&&c.key==="Enter"&&(c.preventDefault(),c.target)){const a=c.target,h=new CustomEvent("enter",{detail:{value:a.value}});n.dispatchEvent(h)}};return[(()=>{const c=Gn();return f(c,Dn),c})(),(()=>{const c=Mn();return c._$owner=b(),c})(),(()=>{const c=Un();return c.$$keydown=d,c.addEventListener("change",s),c.$$input=l,Ze(o,c),g(a=>{const h=r(),p=e.placeholder;return h!==a._v$&&((a._v$=h)!=null?c.style.setProperty("height",h):c.style.removeProperty("height")),p!==a._v$2&&S(c,"placeholder",a._v$2=p),a},{_v$:void 0,_v$2:void 0}),g(()=>c.value=e.value),c})(),(()=>{const c=Vn();return c._$owner=b(),c})()]},Ke=()=>{_(`${y}-textarea`,{value:"",placeholder:"",height:"32px"},qn)};V(["input","keydown"]);const Yn=`:host{align-items:center;background-color:var(--bg-2);border-radius:var(--border-radius);box-sizing:border-box;display:inline-flex;gap:var(--gap);height:var(--input-height);padding:0 12px;width:100%}input{background:none;border:none;box-sizing:border-box;color:inherit;font:inherit;outline:none;padding:0;width:inherit} | ||
`,Jn=u("<style>"),Wn=u('<slot name="prefix">'),Xn=u('<input class="textarea">'),Qn=u('<slot name="suffix">'),Zn=(e,{element:n})=>{const t=r=>{const i=r.target,l=new CustomEvent("change",{detail:{value:i.value}});n.dispatchEvent(l)},o=r=>{if(r.keyCode===13&&(r.preventDefault(),r.target)){const i=r.target,l=new CustomEvent("enter",{detail:{value:i.value}});n.dispatchEvent(l)}};return[(()=>{const r=Jn();return f(r,Yn),r})(),(()=>{const r=Wn();return r._$owner=b(),r})(),(()=>{const r=Xn();return r.$$keydown=o,r.addEventListener("change",t),g(i=>{const l=e.placeholder,s=e.type;return l!==i._v$&&S(r,"placeholder",i._v$=l),s!==i._v$2&&S(r,"type",i._v$2=s),i},{_v$:void 0,_v$2:void 0}),g(()=>r.value=e.value),r})(),(()=>{const r=Qn();return r._$owner=b(),r})()]},He=()=>{_(`${y}-textfield`,{value:"",placeholder:"",type:"text"},Zn)};V(["keydown"]);const De=u("<span>"),er=e=>{const[n,t]=z(""),[o,r]=z(0),[i,l]=z(!0),{text:s,speed:d=100,cursor:c="|"}=e;return oe(()=>{const a=setInterval(()=>{t(s.substr(0,o())),r(o()+1),o()>=s.length&&(l(!1),clearInterval(a))},d)}),[(()=>{const a=De();return f(a,n),a})(),F((()=>{const a=F(()=>!!i());return()=>a()&&(()=>{const h=De();return f(h,c),h})()})())]},Ge=()=>{_(`${y}-typewriter`,{text:"",speed:100,cursor:"|"},er)},tr=Object.freeze(Object.defineProperty({__proto__:null,Button:ke,Card:Ce,ChatBubble:Ee,CheckBox:Se,DanceCount:ze,DanceNumber:ae,FlexBox:Ae,FlexItem:Te,Icon:Oe,ImageCard:je,LayoutGrid:Be,LayoutHoly:Pe,PlaceHolder:Ie,Radio:Re,RadioButton:Ne,RadioGroup:Le,Select:Fe,Textarea:Ke,Textfield:He,Typewriter:Ge},Symbol.toStringTag,{value:"Module"})),or="",ir="",lr="",nr=(e=tr)=>{for(const n in e){const t=e[n];t()}};$.Button=ke,$.Card=Ce,$.ChatBubble=Ee,$.CheckBox=Se,$.DanceCount=ze,$.DanceNumber=ae,$.FlexBox=Ae,$.FlexItem=Te,$.Icon=Oe,$.ImageCard=je,$.LayoutGrid=Be,$.LayoutHoly=Pe,$.PlaceHolder=Ie,$.Radio=Re,$.RadioButton=Ne,$.RadioGroup=Le,$.Select=Fe,$.Textarea=Ke,$.Textfield=He,$.Typewriter=Ge,$.defineCustomElements=nr,$.registerIcon=rn,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})}); |
@@ -17,5 +17,6 @@ import Button from './Button'; | ||
import RadioGroup from './RadioGroup'; | ||
import Select from './Select'; | ||
import Textarea from './Textarea'; | ||
import Textfield from './Textfield'; | ||
import Typewriter from './Typewriter'; | ||
export { Button, Card, ChatBubble, CheckBox, DanceCount, DanceNumber, FlexBox, FlexItem, Icon, ImageCard, LayoutGrid, LayoutHoly, PlaceHolder, Radio, RadioButton, RadioGroup, Textarea, Textfield, Typewriter, }; | ||
export { Button, Card, ChatBubble, CheckBox, DanceCount, DanceNumber, FlexBox, FlexItem, Icon, ImageCard, LayoutGrid, LayoutHoly, PlaceHolder, Radio, RadioButton, RadioGroup, Select, Textarea, Textfield, Typewriter, }; |
@@ -1,12 +0,12 @@ | ||
interface RadioOption { | ||
interface Option { | ||
label: string; | ||
value: string; | ||
} | ||
interface RadioGroupProps { | ||
options?: RadioOption[]; | ||
interface Props { | ||
options?: Option[]; | ||
value?: string; | ||
direction?: 'row' | 'column'; | ||
} | ||
export declare const RadioButton: (props: RadioGroupProps, { element }: any) => import("solid-js").JSX.Element; | ||
export declare const RadioButton: (props: Props, { element }: any) => import("solid-js").JSX.Element; | ||
declare const _default: () => void; | ||
export default _default; |
@@ -1,12 +0,12 @@ | ||
interface RadioOption { | ||
interface Option { | ||
label: string; | ||
value: string; | ||
} | ||
interface RadioGroupProps { | ||
options?: RadioOption[]; | ||
interface Props { | ||
options?: Option[]; | ||
value?: string; | ||
direction?: 'row' | 'column'; | ||
} | ||
export declare const RadioGroup: (props: RadioGroupProps, { element }: any) => import("solid-js").JSX.Element; | ||
export declare const RadioGroup: (props: Props, { element }: any) => import("solid-js").JSX.Element; | ||
declare const _default: () => void; | ||
export default _default; |
{ | ||
"name": "@aura-group/aura-design", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/aura-design.umd.js", |
120015
29
2600