sigo-components
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -6,6 +6,6 @@ import './index.css';/** | ||
*/ | ||
const k = globalThis, K = k.ShadowRoot && (k.ShadyCSS === void 0 || k.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Z = Symbol(), X = /* @__PURE__ */ new WeakMap(); | ||
let ct = class { | ||
const M = globalThis, W = M.ShadowRoot && (M.ShadyCSS === void 0 || M.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, q = Symbol(), F = /* @__PURE__ */ new WeakMap(); | ||
let ot = class { | ||
constructor(t, e, s) { | ||
if (this._$cssResult$ = !0, s !== Z) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); | ||
if (this._$cssResult$ = !0, s !== q) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); | ||
this.cssText = t, this.t = e; | ||
@@ -16,5 +16,5 @@ } | ||
const e = this.t; | ||
if (K && t === void 0) { | ||
if (W && t === void 0) { | ||
const s = e !== void 0 && e.length === 1; | ||
s && (t = X.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && X.set(e, t)); | ||
s && (t = F.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && F.set(e, t)); | ||
} | ||
@@ -27,20 +27,20 @@ return t; | ||
}; | ||
const ft = (o) => new ct(typeof o == "string" ? o : o + "", void 0, Z), pt = (o, ...t) => { | ||
const e = o.length === 1 ? o[0] : t.reduce((s, i, n) => s + ((r) => { | ||
if (r._$cssResult$ === !0) return r.cssText; | ||
if (typeof r == "number") return r; | ||
throw Error("Value passed to 'css' function must be a 'css' function result: " + r + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); | ||
})(i) + o[n + 1], o[0]); | ||
return new ct(e, o, Z); | ||
}, gt = (o, t) => { | ||
if (K) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet); | ||
const ut = (r) => new ot(typeof r == "string" ? r : r + "", void 0, q), $t = (r, ...t) => { | ||
const e = r.length === 1 ? r[0] : t.reduce((s, i, o) => s + ((n) => { | ||
if (n._$cssResult$ === !0) return n.cssText; | ||
if (typeof n == "number") return n; | ||
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); | ||
})(i) + r[o + 1], r[0]); | ||
return new ot(e, r, q); | ||
}, _t = (r, t) => { | ||
if (W) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet); | ||
else for (const e of t) { | ||
const s = document.createElement("style"), i = k.litNonce; | ||
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, o.appendChild(s); | ||
const s = document.createElement("style"), i = M.litNonce; | ||
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s); | ||
} | ||
}, tt = K ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => { | ||
}, G = W ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => { | ||
let e = ""; | ||
for (const s of t.cssRules) e += s.cssText; | ||
return ft(e); | ||
})(o) : o; | ||
return ut(e); | ||
})(r) : r; | ||
/** | ||
@@ -51,20 +51,20 @@ * @license | ||
*/ | ||
const { is: mt, defineProperty: vt, getOwnPropertyDescriptor: yt, getOwnPropertyNames: At, getOwnPropertySymbols: bt, getPrototypeOf: wt } = Object, g = globalThis, et = g.trustedTypes, St = et ? et.emptyScript : "", V = g.reactiveElementPolyfillSupport, O = (o, t) => o, j = { toAttribute(o, t) { | ||
const { is: ft, defineProperty: mt, getOwnPropertyDescriptor: At, getOwnPropertyNames: yt, getOwnPropertySymbols: gt, getPrototypeOf: vt } = Object, f = globalThis, Q = f.trustedTypes, bt = Q ? Q.emptyScript : "", L = f.reactiveElementPolyfillSupport, w = (r, t) => r, N = { toAttribute(r, t) { | ||
switch (t) { | ||
case Boolean: | ||
o = o ? St : null; | ||
r = r ? bt : null; | ||
break; | ||
case Object: | ||
case Array: | ||
o = o == null ? o : JSON.stringify(o); | ||
r = r == null ? r : JSON.stringify(r); | ||
} | ||
return o; | ||
}, fromAttribute(o, t) { | ||
let e = o; | ||
return r; | ||
}, fromAttribute(r, t) { | ||
let e = r; | ||
switch (t) { | ||
case Boolean: | ||
e = o !== null; | ||
e = r !== null; | ||
break; | ||
case Number: | ||
e = o === null ? null : Number(o); | ||
e = r === null ? null : Number(r); | ||
break; | ||
@@ -74,3 +74,3 @@ case Object: | ||
try { | ||
e = JSON.parse(o); | ||
e = JSON.parse(r); | ||
} catch { | ||
@@ -81,5 +81,5 @@ e = null; | ||
return e; | ||
} }, F = (o, t) => !mt(o, t), st = { attribute: !0, type: String, converter: j, reflect: !1, hasChanged: F }; | ||
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), g.litPropertyMetadata ?? (g.litPropertyMetadata = /* @__PURE__ */ new WeakMap()); | ||
class w extends HTMLElement { | ||
} }, J = (r, t) => !ft(r, t), X = { attribute: !0, type: String, converter: N, reflect: !1, hasChanged: J }; | ||
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), f.litPropertyMetadata ?? (f.litPropertyMetadata = /* @__PURE__ */ new WeakMap()); | ||
class g extends HTMLElement { | ||
static addInitializer(t) { | ||
@@ -91,33 +91,33 @@ this._$Ei(), (this.l ?? (this.l = [])).push(t); | ||
} | ||
static createProperty(t, e = st) { | ||
static createProperty(t, e = X) { | ||
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) { | ||
const s = Symbol(), i = this.getPropertyDescriptor(t, s, e); | ||
i !== void 0 && vt(this.prototype, t, i); | ||
i !== void 0 && mt(this.prototype, t, i); | ||
} | ||
} | ||
static getPropertyDescriptor(t, e, s) { | ||
const { get: i, set: n } = yt(this.prototype, t) ?? { get() { | ||
const { get: i, set: o } = At(this.prototype, t) ?? { get() { | ||
return this[e]; | ||
}, set(r) { | ||
this[e] = r; | ||
}, set(n) { | ||
this[e] = n; | ||
} }; | ||
return { get() { | ||
return i == null ? void 0 : i.call(this); | ||
}, set(r) { | ||
const h = i == null ? void 0 : i.call(this); | ||
n.call(this, r), this.requestUpdate(t, h, s); | ||
}, set(n) { | ||
const l = i == null ? void 0 : i.call(this); | ||
o.call(this, n), this.requestUpdate(t, l, s); | ||
}, configurable: !0, enumerable: !0 }; | ||
} | ||
static getPropertyOptions(t) { | ||
return this.elementProperties.get(t) ?? st; | ||
return this.elementProperties.get(t) ?? X; | ||
} | ||
static _$Ei() { | ||
if (this.hasOwnProperty(O("elementProperties"))) return; | ||
const t = wt(this); | ||
if (this.hasOwnProperty(w("elementProperties"))) return; | ||
const t = vt(this); | ||
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties); | ||
} | ||
static finalize() { | ||
if (this.hasOwnProperty(O("finalized"))) return; | ||
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(O("properties"))) { | ||
const e = this.properties, s = [...At(e), ...bt(e)]; | ||
if (this.hasOwnProperty(w("finalized"))) return; | ||
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(w("properties"))) { | ||
const e = this.properties, s = [...yt(e), ...gt(e)]; | ||
for (const i of s) this.createProperty(i, e[i]); | ||
@@ -141,4 +141,4 @@ } | ||
const s = new Set(t.flat(1 / 0).reverse()); | ||
for (const i of s) e.unshift(tt(i)); | ||
} else t !== void 0 && e.push(tt(t)); | ||
for (const i of s) e.unshift(G(i)); | ||
} else t !== void 0 && e.push(G(t)); | ||
return e; | ||
@@ -172,3 +172,3 @@ } | ||
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); | ||
return gt(t, this.constructor.elementStyles), t; | ||
return _t(t, this.constructor.elementStyles), t; | ||
} | ||
@@ -195,15 +195,15 @@ connectedCallback() { | ||
_$EC(t, e) { | ||
var n; | ||
var o; | ||
const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s); | ||
if (i !== void 0 && s.reflect === !0) { | ||
const r = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : j).toAttribute(e, s.type); | ||
this._$Em = t, r == null ? this.removeAttribute(i) : this.setAttribute(i, r), this._$Em = null; | ||
const n = (((o = s.converter) == null ? void 0 : o.toAttribute) !== void 0 ? s.converter : N).toAttribute(e, s.type); | ||
this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null; | ||
} | ||
} | ||
_$AK(t, e) { | ||
var n; | ||
var o; | ||
const s = this.constructor, i = s._$Eh.get(t); | ||
if (i !== void 0 && this._$Em !== i) { | ||
const r = s.getPropertyOptions(i), h = typeof r.converter == "function" ? { fromAttribute: r.converter } : ((n = r.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? r.converter : j; | ||
this._$Em = i, this[i] = h.fromAttribute(e, r.type), this._$Em = null; | ||
const n = s.getPropertyOptions(i), l = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((o = n.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? n.converter : N; | ||
this._$Em = i, this[i] = l.fromAttribute(e, n.type), this._$Em = null; | ||
} | ||
@@ -213,3 +213,3 @@ } | ||
if (t !== void 0) { | ||
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? F)(this[t], e)) return; | ||
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? J)(this[t], e)) return; | ||
this.P(t, e, s); | ||
@@ -240,7 +240,7 @@ } | ||
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) { | ||
for (const [n, r] of this._$Ep) this[n] = r; | ||
for (const [o, n] of this._$Ep) this[o] = n; | ||
this._$Ep = void 0; | ||
} | ||
const i = this.constructor.elementProperties; | ||
if (i.size > 0) for (const [n, r] of i) r.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.P(n, this[n], r); | ||
if (i.size > 0) for (const [o, n] of i) n.wrapped !== !0 || this._$AL.has(o) || this[o] === void 0 || this.P(o, this[o], n); | ||
} | ||
@@ -251,4 +251,4 @@ let t = !1; | ||
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((i) => { | ||
var n; | ||
return (n = i.hostUpdate) == null ? void 0 : n.call(i); | ||
var o; | ||
return (o = i.hostUpdate) == null ? void 0 : o.call(i); | ||
}), this.update(e)) : this._$EU(); | ||
@@ -289,3 +289,3 @@ } catch (i) { | ||
} | ||
w.elementStyles = [], w.shadowRootOptions = { mode: "open" }, w[O("elementProperties")] = /* @__PURE__ */ new Map(), w[O("finalized")] = /* @__PURE__ */ new Map(), V == null || V({ ReactiveElement: w }), (g.reactiveElementVersions ?? (g.reactiveElementVersions = [])).push("2.0.4"); | ||
g.elementStyles = [], g.shadowRootOptions = { mode: "open" }, g[w("elementProperties")] = /* @__PURE__ */ new Map(), g[w("finalized")] = /* @__PURE__ */ new Map(), L == null || L({ ReactiveElement: g }), (f.reactiveElementVersions ?? (f.reactiveElementVersions = [])).push("2.0.4"); | ||
/** | ||
@@ -296,64 +296,64 @@ * @license | ||
*/ | ||
const C = globalThis, D = C.trustedTypes, it = D ? D.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, dt = "$lit$", f = `lit$${Math.random().toFixed(9).slice(2)}$`, ut = "?" + f, Et = `<${ut}>`, A = document, T = () => A.createComment(""), U = (o) => o === null || typeof o != "object" && typeof o != "function", Y = Array.isArray, xt = (o) => Y(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", W = `[ | ||
\f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ot = /-->/g, rt = />/g, m = RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^ | ||
\f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, at = /"/g, $t = /^(?:script|style|textarea|title)$/i, Pt = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), z = Pt(1), S = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), ht = /* @__PURE__ */ new WeakMap(), v = A.createTreeWalker(A, 129); | ||
function _t(o, t) { | ||
if (!Y(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array"); | ||
return it !== void 0 ? it.createHTML(t) : t; | ||
const C = globalThis, R = C.trustedTypes, Y = R ? R.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, ht = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, lt = "?" + _, St = `<${lt}>`, y = document, O = () => y.createComment(""), U = (r) => r === null || typeof r != "object" && typeof r != "function", K = Array.isArray, Et = (r) => K(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", B = `[ | ||
\f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, tt = /-->/g, et = />/g, m = RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ | ||
\f\r"'\`<>=]|("|')|))|$)`, "g"), st = /'/g, it = /"/g, at = /^(?:script|style|textarea|title)$/i, Pt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), Z = Pt(1), b = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), rt = /* @__PURE__ */ new WeakMap(), A = y.createTreeWalker(y, 129); | ||
function ct(r, t) { | ||
if (!K(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array"); | ||
return Y !== void 0 ? Y.createHTML(t) : t; | ||
} | ||
const Ot = (o, t) => { | ||
const e = o.length - 1, s = []; | ||
let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = P; | ||
for (let h = 0; h < e; h++) { | ||
const a = o[h]; | ||
let c, d, l = -1, u = 0; | ||
for (; u < a.length && (r.lastIndex = u, d = r.exec(a), d !== null); ) u = r.lastIndex, r === P ? d[1] === "!--" ? r = ot : d[1] !== void 0 ? r = rt : d[2] !== void 0 ? ($t.test(d[2]) && (i = RegExp("</" + d[2], "g")), r = m) : d[3] !== void 0 && (r = m) : r === m ? d[0] === ">" ? (r = i ?? P, l = -1) : d[1] === void 0 ? l = -2 : (l = r.lastIndex - d[2].length, c = d[1], r = d[3] === void 0 ? m : d[3] === '"' ? at : nt) : r === at || r === nt ? r = m : r === ot || r === rt ? r = P : (r = m, i = void 0); | ||
const _ = r === m && o[h + 1].startsWith("/>") ? " " : ""; | ||
n += r === P ? a + Et : l >= 0 ? (s.push(c), a.slice(0, l) + dt + a.slice(l) + f + _) : a + f + (l === -2 ? h : _); | ||
const wt = (r, t) => { | ||
const e = r.length - 1, s = []; | ||
let i, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = P; | ||
for (let l = 0; l < e; l++) { | ||
const h = r[l]; | ||
let c, d, a = -1, u = 0; | ||
for (; u < h.length && (n.lastIndex = u, d = n.exec(h), d !== null); ) u = n.lastIndex, n === P ? d[1] === "!--" ? n = tt : d[1] !== void 0 ? n = et : d[2] !== void 0 ? (at.test(d[2]) && (i = RegExp("</" + d[2], "g")), n = m) : d[3] !== void 0 && (n = m) : n === m ? d[0] === ">" ? (n = i ?? P, a = -1) : d[1] === void 0 ? a = -2 : (a = n.lastIndex - d[2].length, c = d[1], n = d[3] === void 0 ? m : d[3] === '"' ? it : st) : n === it || n === st ? n = m : n === tt || n === et ? n = P : (n = m, i = void 0); | ||
const $ = n === m && r[l + 1].startsWith("/>") ? " " : ""; | ||
o += n === P ? h + St : a >= 0 ? (s.push(c), h.slice(0, a) + ht + h.slice(a) + _ + $) : h + _ + (a === -2 ? l : $); | ||
} | ||
return [_t(o, n + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s]; | ||
return [ct(r, o + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s]; | ||
}; | ||
class H { | ||
class x { | ||
constructor({ strings: t, _$litType$: e }, s) { | ||
let i; | ||
this.parts = []; | ||
let n = 0, r = 0; | ||
const h = t.length - 1, a = this.parts, [c, d] = Ot(t, e); | ||
if (this.el = H.createElement(c, s), v.currentNode = this.el.content, e === 2 || e === 3) { | ||
const l = this.el.content.firstChild; | ||
l.replaceWith(...l.childNodes); | ||
let o = 0, n = 0; | ||
const l = t.length - 1, h = this.parts, [c, d] = wt(t, e); | ||
if (this.el = x.createElement(c, s), A.currentNode = this.el.content, e === 2 || e === 3) { | ||
const a = this.el.content.firstChild; | ||
a.replaceWith(...a.childNodes); | ||
} | ||
for (; (i = v.nextNode()) !== null && a.length < h; ) { | ||
for (; (i = A.nextNode()) !== null && h.length < l; ) { | ||
if (i.nodeType === 1) { | ||
if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(dt)) { | ||
const u = d[r++], _ = i.getAttribute(l).split(f), N = /([.?@])?(.*)/.exec(u); | ||
a.push({ type: 1, index: n, name: N[2], strings: _, ctor: N[1] === "." ? Tt : N[1] === "?" ? Ut : N[1] === "@" ? Ht : L }), i.removeAttribute(l); | ||
} else l.startsWith(f) && (a.push({ type: 6, index: n }), i.removeAttribute(l)); | ||
if ($t.test(i.tagName)) { | ||
const l = i.textContent.split(f), u = l.length - 1; | ||
if (i.hasAttributes()) for (const a of i.getAttributeNames()) if (a.endsWith(ht)) { | ||
const u = d[n++], $ = i.getAttribute(a).split(_), H = /([.?@])?(.*)/.exec(u); | ||
h.push({ type: 1, index: o, name: H[2], strings: $, ctor: H[1] === "." ? Ot : H[1] === "?" ? Ut : H[1] === "@" ? xt : j }), i.removeAttribute(a); | ||
} else a.startsWith(_) && (h.push({ type: 6, index: o }), i.removeAttribute(a)); | ||
if (at.test(i.tagName)) { | ||
const a = i.textContent.split(_), u = a.length - 1; | ||
if (u > 0) { | ||
i.textContent = D ? D.emptyScript : ""; | ||
for (let _ = 0; _ < u; _++) i.append(l[_], T()), v.nextNode(), a.push({ type: 2, index: ++n }); | ||
i.append(l[u], T()); | ||
i.textContent = R ? R.emptyScript : ""; | ||
for (let $ = 0; $ < u; $++) i.append(a[$], O()), A.nextNode(), h.push({ type: 2, index: ++o }); | ||
i.append(a[u], O()); | ||
} | ||
} | ||
} else if (i.nodeType === 8) if (i.data === ut) a.push({ type: 2, index: n }); | ||
} else if (i.nodeType === 8) if (i.data === lt) h.push({ type: 2, index: o }); | ||
else { | ||
let l = -1; | ||
for (; (l = i.data.indexOf(f, l + 1)) !== -1; ) a.push({ type: 7, index: n }), l += f.length - 1; | ||
let a = -1; | ||
for (; (a = i.data.indexOf(_, a + 1)) !== -1; ) h.push({ type: 7, index: o }), a += _.length - 1; | ||
} | ||
n++; | ||
o++; | ||
} | ||
} | ||
static createElement(t, e) { | ||
const s = A.createElement("template"); | ||
const s = y.createElement("template"); | ||
return s.innerHTML = t, s; | ||
} | ||
} | ||
function E(o, t, e = o, s) { | ||
var r, h; | ||
if (t === S) return t; | ||
let i = s !== void 0 ? (r = e._$Co) == null ? void 0 : r[s] : e._$Cl; | ||
const n = U(t) ? void 0 : t._$litDirective$; | ||
return (i == null ? void 0 : i.constructor) !== n && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), n === void 0 ? i = void 0 : (i = new n(o), i._$AT(o, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = E(o, i._$AS(o, t.values), i, s)), t; | ||
function S(r, t, e = r, s) { | ||
var n, l; | ||
if (t === b) return t; | ||
let i = s !== void 0 ? (n = e._$Co) == null ? void 0 : n[s] : e._$Cl; | ||
const o = U(t) ? void 0 : t._$litDirective$; | ||
return (i == null ? void 0 : i.constructor) !== o && ((l = i == null ? void 0 : i._$AO) == null || l.call(i, !1), o === void 0 ? i = void 0 : (i = new o(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = S(r, i._$AS(r, t.values), i, s)), t; | ||
} | ||
@@ -371,13 +371,13 @@ class Ct { | ||
u(t) { | ||
const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? A).importNode(e, !0); | ||
v.currentNode = i; | ||
let n = v.nextNode(), r = 0, h = 0, a = s[0]; | ||
for (; a !== void 0; ) { | ||
if (r === a.index) { | ||
const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? y).importNode(e, !0); | ||
A.currentNode = i; | ||
let o = A.nextNode(), n = 0, l = 0, h = s[0]; | ||
for (; h !== void 0; ) { | ||
if (n === h.index) { | ||
let c; | ||
a.type === 2 ? c = new R(n, n.nextSibling, this, t) : a.type === 1 ? c = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (c = new Rt(n, this, t)), this._$AV.push(c), a = s[++h]; | ||
h.type === 2 ? c = new T(o, o.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (c = new Tt(o, this, t)), this._$AV.push(c), h = s[++l]; | ||
} | ||
r !== (a == null ? void 0 : a.index) && (n = v.nextNode(), r++); | ||
n !== (h == null ? void 0 : h.index) && (o = A.nextNode(), n++); | ||
} | ||
return v.currentNode = A, i; | ||
return A.currentNode = y, i; | ||
} | ||
@@ -389,3 +389,3 @@ p(t) { | ||
} | ||
class R { | ||
class T { | ||
get _$AU() { | ||
@@ -410,3 +410,3 @@ var t; | ||
_$AI(t, e = this) { | ||
t = E(this, t, e), U(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : xt(t) ? this.k(t) : this._(t); | ||
t = S(this, t, e), U(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== b && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Et(t) ? this.k(t) : this._(t); | ||
} | ||
@@ -420,22 +420,22 @@ O(t) { | ||
_(t) { | ||
this._$AH !== p && U(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t; | ||
this._$AH !== p && U(this._$AH) ? this._$AA.nextSibling.data = t : this.T(y.createTextNode(t)), this._$AH = t; | ||
} | ||
$(t) { | ||
var n; | ||
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = H.createElement(_t(s.h, s.h[0]), this.options)), s); | ||
if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(e); | ||
var o; | ||
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = x.createElement(ct(s.h, s.h[0]), this.options)), s); | ||
if (((o = this._$AH) == null ? void 0 : o._$AD) === i) this._$AH.p(e); | ||
else { | ||
const r = new Ct(i, this), h = r.u(this.options); | ||
r.p(e), this.T(h), this._$AH = r; | ||
const n = new Ct(i, this), l = n.u(this.options); | ||
n.p(e), this.T(l), this._$AH = n; | ||
} | ||
} | ||
_$AC(t) { | ||
let e = ht.get(t.strings); | ||
return e === void 0 && ht.set(t.strings, e = new H(t)), e; | ||
let e = rt.get(t.strings); | ||
return e === void 0 && rt.set(t.strings, e = new x(t)), e; | ||
} | ||
k(t) { | ||
Y(this._$AH) || (this._$AH = [], this._$AR()); | ||
K(this._$AH) || (this._$AH = [], this._$AR()); | ||
const e = this._$AH; | ||
let s, i = 0; | ||
for (const n of t) i === e.length ? e.push(s = new R(this.O(T()), this.O(T()), this, this.options)) : s = e[i], s._$AI(n), i++; | ||
for (const o of t) i === e.length ? e.push(s = new T(this.O(O()), this.O(O()), this, this.options)) : s = e[i], s._$AI(o), i++; | ||
i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i); | ||
@@ -455,3 +455,3 @@ } | ||
} | ||
class L { | ||
class j { | ||
get tagName() { | ||
@@ -463,15 +463,15 @@ return this.element.tagName; | ||
} | ||
constructor(t, e, s, i, n) { | ||
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = p; | ||
constructor(t, e, s, i, o) { | ||
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = p; | ||
} | ||
_$AI(t, e = this, s, i) { | ||
const n = this.strings; | ||
let r = !1; | ||
if (n === void 0) t = E(this, t, e, 0), r = !U(t) || t !== this._$AH && t !== S, r && (this._$AH = t); | ||
const o = this.strings; | ||
let n = !1; | ||
if (o === void 0) t = S(this, t, e, 0), n = !U(t) || t !== this._$AH && t !== b, n && (this._$AH = t); | ||
else { | ||
const h = t; | ||
let a, c; | ||
for (t = n[0], a = 0; a < n.length - 1; a++) c = E(this, h[s + a], e, a), c === S && (c = this._$AH[a]), r || (r = !U(c) || c !== this._$AH[a]), c === p ? t = p : t !== p && (t += (c ?? "") + n[a + 1]), this._$AH[a] = c; | ||
const l = t; | ||
let h, c; | ||
for (t = o[0], h = 0; h < o.length - 1; h++) c = S(this, l[s + h], e, h), c === b && (c = this._$AH[h]), n || (n = !U(c) || c !== this._$AH[h]), c === p ? t = p : t !== p && (t += (c ?? "") + o[h + 1]), this._$AH[h] = c; | ||
} | ||
r && !i && this.j(t); | ||
n && !i && this.j(t); | ||
} | ||
@@ -482,3 +482,3 @@ j(t) { | ||
} | ||
class Tt extends L { | ||
class Ot extends j { | ||
constructor() { | ||
@@ -491,3 +491,3 @@ super(...arguments), this.type = 3; | ||
} | ||
class Ut extends L { | ||
class Ut extends j { | ||
constructor() { | ||
@@ -500,10 +500,10 @@ super(...arguments), this.type = 4; | ||
} | ||
class Ht extends L { | ||
constructor(t, e, s, i, n) { | ||
super(t, e, s, i, n), this.type = 5; | ||
class xt extends j { | ||
constructor(t, e, s, i, o) { | ||
super(t, e, s, i, o), this.type = 5; | ||
} | ||
_$AI(t, e = this) { | ||
if ((t = E(this, t, e, 0) ?? p) === S) return; | ||
const s = this._$AH, i = t === p && s !== p || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== p && (s === p || i); | ||
i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t; | ||
if ((t = S(this, t, e, 0) ?? p) === b) return; | ||
const s = this._$AH, i = t === p && s !== p || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== p && (s === p || i); | ||
i && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t; | ||
} | ||
@@ -515,3 +515,3 @@ handleEvent(t) { | ||
} | ||
class Rt { | ||
class Tt { | ||
constructor(t, e, s) { | ||
@@ -524,15 +524,15 @@ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s; | ||
_$AI(t) { | ||
E(this, t); | ||
S(this, t); | ||
} | ||
} | ||
const q = C.litHtmlPolyfillSupport; | ||
q == null || q(H, R), (C.litHtmlVersions ?? (C.litHtmlVersions = [])).push("3.2.1"); | ||
const Mt = (o, t, e) => { | ||
const I = C.litHtmlPolyfillSupport; | ||
I == null || I(x, T), (C.litHtmlVersions ?? (C.litHtmlVersions = [])).push("3.2.1"); | ||
const Ht = (r, t, e) => { | ||
const s = (e == null ? void 0 : e.renderBefore) ?? t; | ||
let i = s._$litPart$; | ||
if (i === void 0) { | ||
const n = (e == null ? void 0 : e.renderBefore) ?? null; | ||
s._$litPart$ = i = new R(t.insertBefore(T(), n), n, void 0, e ?? {}); | ||
const o = (e == null ? void 0 : e.renderBefore) ?? null; | ||
s._$litPart$ = i = new T(t.insertBefore(O(), o), o, void 0, e ?? {}); | ||
} | ||
return i._$AI(o), i; | ||
return i._$AI(r), i; | ||
}; | ||
@@ -544,3 +544,3 @@ /** | ||
*/ | ||
let y = class extends w { | ||
let v = class extends g { | ||
constructor() { | ||
@@ -556,3 +556,3 @@ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; | ||
const e = this.render(); | ||
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Mt(e, this.renderRoot, this.renderOptions); | ||
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ht(e, this.renderRoot, this.renderOptions); | ||
} | ||
@@ -568,9 +568,9 @@ connectedCallback() { | ||
render() { | ||
return S; | ||
return b; | ||
} | ||
}; | ||
var lt; | ||
y._$litElement$ = !0, y.finalized = !0, (lt = globalThis.litElementHydrateSupport) == null || lt.call(globalThis, { LitElement: y }); | ||
const J = globalThis.litElementPolyfillSupport; | ||
J == null || J({ LitElement: y }); | ||
var nt; | ||
v._$litElement$ = !0, v.finalized = !0, (nt = globalThis.litElementHydrateSupport) == null || nt.call(globalThis, { LitElement: v }); | ||
const k = globalThis.litElementPolyfillSupport; | ||
k == null || k({ LitElement: v }); | ||
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1"); | ||
@@ -582,6 +582,6 @@ /** | ||
*/ | ||
const G = (o) => (t, e) => { | ||
const pt = (r) => (t, e) => { | ||
e !== void 0 ? e.addInitializer(() => { | ||
customElements.define(o, t); | ||
}) : customElements.define(o, t); | ||
customElements.define(r, t); | ||
}) : customElements.define(r, t); | ||
}; | ||
@@ -593,19 +593,19 @@ /** | ||
*/ | ||
const Nt = { attribute: !0, type: String, converter: j, reflect: !1, hasChanged: F }, kt = (o = Nt, t, e) => { | ||
const Mt = { attribute: !0, type: String, converter: N, reflect: !1, hasChanged: J }, Nt = (r = Mt, t, e) => { | ||
const { kind: s, metadata: i } = e; | ||
let n = globalThis.litPropertyMetadata.get(i); | ||
if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), n.set(e.name, o), s === "accessor") { | ||
const { name: r } = e; | ||
return { set(h) { | ||
const a = t.get.call(this); | ||
t.set.call(this, h), this.requestUpdate(r, a, o); | ||
}, init(h) { | ||
return h !== void 0 && this.P(r, void 0, o), h; | ||
let o = globalThis.litPropertyMetadata.get(i); | ||
if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), o.set(e.name, r), s === "accessor") { | ||
const { name: n } = e; | ||
return { set(l) { | ||
const h = t.get.call(this); | ||
t.set.call(this, l), this.requestUpdate(n, h, r); | ||
}, init(l) { | ||
return l !== void 0 && this.P(n, void 0, r), l; | ||
} }; | ||
} | ||
if (s === "setter") { | ||
const { name: r } = e; | ||
return function(h) { | ||
const a = this[r]; | ||
t.call(this, h), this.requestUpdate(r, a, o); | ||
const { name: n } = e; | ||
return function(l) { | ||
const h = this[n]; | ||
t.call(this, l), this.requestUpdate(n, h, r); | ||
}; | ||
@@ -615,153 +615,20 @@ } | ||
}; | ||
function $(o) { | ||
return (t, e) => typeof e == "object" ? kt(o, t, e) : ((s, i, n) => { | ||
const r = i.hasOwnProperty(n); | ||
return i.constructor.createProperty(n, r ? { ...s, wrapped: !0 } : s), r ? Object.getOwnPropertyDescriptor(i, n) : void 0; | ||
})(o, t, e); | ||
function D(r) { | ||
return (t, e) => typeof e == "object" ? Nt(r, t, e) : ((s, i, o) => { | ||
const n = i.hasOwnProperty(o); | ||
return i.constructor.createProperty(o, n ? { ...s, wrapped: !0 } : s), n ? Object.getOwnPropertyDescriptor(i, o) : void 0; | ||
})(r, t, e); | ||
} | ||
var jt = Object.defineProperty, Dt = Object.getOwnPropertyDescriptor, M = (o, t, e, s) => { | ||
for (var i = s > 1 ? void 0 : s ? Dt(t, e) : t, n = o.length - 1, r; n >= 0; n--) | ||
(r = o[n]) && (i = (s ? r(t, e, i) : r(i)) || i); | ||
return s && i && jt(t, e, i), i; | ||
var Rt = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, z = (r, t, e, s) => { | ||
for (var i = s > 1 ? void 0 : s ? jt(t, e) : t, o = r.length - 1, n; o >= 0; o--) | ||
(n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i); | ||
return s && i && Rt(t, e, i), i; | ||
}; | ||
let b = class extends y { | ||
let E = class extends v { | ||
constructor() { | ||
super(...arguments), this.selectedValue = "", this.searchTerm = "", this.data = [ | ||
{ value: "1", label: "One" }, | ||
{ value: "2", label: "Two" }, | ||
{ value: "3", label: "Three" } | ||
], this.isOpen = !1; | ||
} | ||
toggleDropdown() { | ||
this.isOpen = !this.isOpen, this.requestUpdate(); | ||
} | ||
handleInput(o) { | ||
const t = o.target; | ||
this.searchTerm = t.value; | ||
} | ||
selectOption(o) { | ||
this.selectedValue = o, this.searchTerm = "", this.isOpen = !1, this.dispatchEvent(new CustomEvent("select-changed", { detail: o })); | ||
} | ||
handleBlur(o) { | ||
this.isOpen = !1; | ||
} | ||
render() { | ||
const o = this.data.filter( | ||
(t) => t.label.toLowerCase().includes(this.searchTerm.toLowerCase()) | ||
); | ||
return console.log(this.isOpen), z` | ||
<div class="dropdown" @click=${this.toggleDropdown}> | ||
<div class="search-input-wrapper"> | ||
<input | ||
type="text" | ||
class="search-input" | ||
placeholder="Search..." | ||
@input=${this.handleInput} | ||
@blur=${this.handleBlur} | ||
.value=${this.searchTerm} | ||
/> | ||
</div> | ||
<div style=${`${this.isOpen ? "" : "display: none;"}`} class="dropdown-content"> | ||
${o.map((t) => z` | ||
<div class="option" @click=${() => this.selectOption(t.value)}> | ||
${t.label} | ||
</div> | ||
`)} | ||
</div> | ||
</div> | ||
`; | ||
} | ||
}; | ||
b.styles = pt` | ||
.dropdown { | ||
position: relative; | ||
display: inline-block; | ||
width: 100%; /* Ajusta el ancho según sea necesario */ | ||
} | ||
.dropdown-content { | ||
/* display: none; */ | ||
position: absolute; | ||
background-color: white; | ||
min-width: 100%; /* Ajustar al ancho del dropdown */ | ||
border: 1px solid #ccc; | ||
z-index: 1; | ||
max-height: 200px; | ||
overflow-y: auto; | ||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); | ||
} | ||
.dropdown.open .dropdown-content { | ||
display: block; /* Mostrar dropdown cuando está abierto */ | ||
} | ||
.search-input { | ||
box-sizing: border-box; | ||
width: 100%; | ||
padding: 8px; | ||
border: 1px solid #ccc; | ||
border-radius: 4px; | ||
margin-bottom: 0; | ||
padding: 8px 30px 8px 8px; /* Espacio a la derecha para el icono */ | ||
--bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); | ||
} | ||
.search-input-wrapper { | ||
position: relative; | ||
display: inline-block; | ||
width: 100%; | ||
} | ||
.search-input-wrapper::after { | ||
content: ''; | ||
position: absolute; | ||
top: 50%; | ||
right: 10px; | ||
transform: translateY(-50%); | ||
width: 12px; | ||
height: 12px; | ||
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); | ||
background-size: contain; | ||
background-repeat: no-repeat; | ||
pointer-events: none; | ||
} | ||
.option { | ||
padding: 8px 12px; | ||
cursor: pointer; | ||
} | ||
.option:hover { | ||
background-color: #f1f1f1; | ||
} | ||
`; | ||
M([ | ||
$({ type: String }) | ||
], b.prototype, "selectedValue", 2); | ||
M([ | ||
$({ type: String }) | ||
], b.prototype, "searchTerm", 2); | ||
M([ | ||
$({ type: Array }) | ||
], b.prototype, "data", 2); | ||
M([ | ||
$({ type: Boolean }) | ||
], b.prototype, "isOpen", 2); | ||
b = M([ | ||
G("sigo-select-v1") | ||
], b); | ||
var zt = Object.defineProperty, Bt = Object.getOwnPropertyDescriptor, I = (o, t, e, s) => { | ||
for (var i = s > 1 ? void 0 : s ? Bt(t, e) : t, n = o.length - 1, r; n >= 0; n--) | ||
(r = o[n]) && (i = (s ? r(t, e, i) : r(i)) || i); | ||
return s && i && zt(t, e, i), i; | ||
}; | ||
let x = class extends y { | ||
constructor() { | ||
super(...arguments), this.selectedValue = "", this.searchTerm = "", this.isOpen = !1; | ||
} | ||
createRenderRoot() { | ||
return this; | ||
} | ||
render() { | ||
return z` | ||
return Z` | ||
<link rel='stylesheet' href='./node_modules/bootstrap/dist/css/bootstrap.min.css'> | ||
<select class="form-select form-select-sm" aria-label="Small select example"> | ||
@@ -773,48 +640,51 @@ <option selected>Open this select menu</option> | ||
</select> | ||
`; | ||
`; | ||
} | ||
}; | ||
x.styles = pt``; | ||
I([ | ||
$({ type: String }) | ||
], x.prototype, "selectedValue", 2); | ||
I([ | ||
$({ type: String }) | ||
], x.prototype, "searchTerm", 2); | ||
I([ | ||
$({ type: Boolean }) | ||
], x.prototype, "isOpen", 2); | ||
x = I([ | ||
G("sigo-select-v1-copy") | ||
], x); | ||
var Lt = Object.defineProperty, It = Object.getOwnPropertyDescriptor, Q = (o, t, e, s) => { | ||
for (var i = s > 1 ? void 0 : s ? It(t, e) : t, n = o.length - 1, r; n >= 0; n--) | ||
(r = o[n]) && (i = (s ? r(t, e, i) : r(i)) || i); | ||
return s && i && Lt(t, e, i), i; | ||
E.styles = $t``; | ||
z([ | ||
D({ type: String }) | ||
], E.prototype, "selectedValue", 2); | ||
z([ | ||
D({ type: String }) | ||
], E.prototype, "searchTerm", 2); | ||
z([ | ||
D({ type: Boolean }) | ||
], E.prototype, "isOpen", 2); | ||
E = z([ | ||
pt("sigo-select-v1") | ||
], E); | ||
function Dt() { | ||
return Z` | ||
<link rel='stylesheet' href='./node_modules/bootstrap/dist/css/bootstrap.min.css'> | ||
<sigo-select-v1></sigo-select-v1> | ||
`; | ||
} | ||
function zt() { | ||
this.renderTemplate = Dt.bind(this); | ||
} | ||
function Lt() { | ||
zt.call(this); | ||
} | ||
var Bt = Object.defineProperty, It = Object.getOwnPropertyDescriptor, dt = (r, t, e, s) => { | ||
for (var i = s > 1 ? void 0 : s ? It(t, e) : t, o = r.length - 1, n; o >= 0; o--) | ||
(n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i); | ||
return s && i && Bt(t, e, i), i; | ||
}; | ||
let B = class extends y { | ||
let V = class extends v { | ||
constructor() { | ||
super(...arguments), this.docsHint = "Click on the Vite and Lit logos to learn more", this.count = 0; | ||
super(), this.renderTemplate = () => Z``, Lt.call(this); | ||
} | ||
createRenderRoot() { | ||
return this; | ||
} | ||
render() { | ||
return z` | ||
<sigo-select-v1></sigo-select-v1> | ||
<sigo-select-v1-copy></sigo-select-v1-copy> | ||
`; | ||
return this.renderTemplate(); | ||
} | ||
}; | ||
Q([ | ||
$() | ||
], B.prototype, "docsHint", 2); | ||
Q([ | ||
$({ type: Number }) | ||
], B.prototype, "count", 2); | ||
B = Q([ | ||
G("sigo-reposicion-automatica") | ||
], B); | ||
dt([ | ||
D({ type: Object }) | ||
], V.prototype, "renderTemplate", 2); | ||
V = dt([ | ||
pt("sigo-reposicion-automatica") | ||
], V); | ||
export { | ||
B as SigoReposicionAutomatica | ||
V as SigoReposicionAutomatica | ||
}; |
{ | ||
"name": "sigo-components", | ||
"private": false, | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"type": "module", | ||
@@ -17,2 +17,3 @@ "main": "dist/sigo-components.js", | ||
"bootstrap": "^5.3.3", | ||
"construct-style-sheets-polyfill": "^3.1.0", | ||
"lit": "^3.2.1" | ||
@@ -19,0 +20,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
259054
3
1561
+ Addedconstruct-style-sheets-polyfill@3.1.0(transitive)