@cargosense/cargo-design-system 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/assets/index.es.js
CHANGED
|
@@ -261,7 +261,7 @@ d.elementStyles = [], d.shadowRootOptions = { mode: "open" }, d[J("elementProper
|
|
|
261
261
|
* Copyright 2017 Google LLC
|
|
262
262
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
263
263
|
*/
|
|
264
|
-
const p = globalThis, R = p.trustedTypes, Z = R ? R.createPolicy("lit-html", { createHTML: (Q) => Q }) : void 0, QA = "$lit$",
|
|
264
|
+
const p = globalThis, R = p.trustedTypes, Z = R ? R.createPolicy("lit-html", { createHTML: (Q) => Q }) : void 0, QA = "$lit$", h = `lit$${Math.random().toFixed(9).slice(2)}$`, EA = "?" + h, YA = `<${EA}>`, G = document, N = () => G.createComment(""), f = (Q) => Q === null || typeof Q != "object" && typeof Q != "function", k = Array.isArray, FA = (Q) => k(Q) || typeof Q?.[Symbol.iterator] == "function", b = `[
|
|
265
265
|
\f\r]`, v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, q = /-->/g, $ = />/g, l = RegExp(`>|${b}(?:([^\\s"'>=/]+)(${b}*=${b}*(?:[^
|
|
266
266
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), _ = /'/g, AA = /"/g, IA = /^(?:script|style|textarea|title)$/i, nA = (Q) => (A, ...g) => ({ _$litType$: Q, strings: A, values: g }), D = nA(1), P = Symbol.for("lit-noChange"), t = Symbol.for("lit-nothing"), gA = /* @__PURE__ */ new WeakMap(), a = G.createTreeWalker(G, 129);
|
|
267
267
|
function wA(Q, A) {
|
|
@@ -275,8 +275,8 @@ const UA = (Q, A) => {
|
|
|
275
275
|
const w = Q[r];
|
|
276
276
|
let M, c, o = -1, F = 0;
|
|
277
277
|
for (; F < w.length && (I.lastIndex = F, c = I.exec(w), c !== null); ) F = I.lastIndex, I === v ? c[1] === "!--" ? I = q : c[1] !== void 0 ? I = $ : c[2] !== void 0 ? (IA.test(c[2]) && (C = RegExp("</" + c[2], "g")), I = l) : c[3] !== void 0 && (I = l) : I === l ? c[0] === ">" ? (I = C ?? v, o = -1) : c[1] === void 0 ? o = -2 : (o = I.lastIndex - c[2].length, M = c[1], I = c[3] === void 0 ? l : c[3] === '"' ? AA : _) : I === AA || I === _ ? I = l : I === q || I === $ ? I = v : (I = l, C = void 0);
|
|
278
|
-
const
|
|
279
|
-
E += I === v ? w + YA : o >= 0 ? (B.push(M), w.slice(0, o) + QA + w.slice(o) +
|
|
278
|
+
const U = I === l && Q[r + 1].startsWith("/>") ? " " : "";
|
|
279
|
+
E += I === v ? w + YA : o >= 0 ? (B.push(M), w.slice(0, o) + QA + w.slice(o) + h + U) : w + h + (o === -2 ? r : U);
|
|
280
280
|
}
|
|
281
281
|
return [wA(Q, E + (Q[g] || "<?>") + (A === 2 ? "</svg>" : A === 3 ? "</math>" : "")), B];
|
|
282
282
|
};
|
|
@@ -293,21 +293,21 @@ class H {
|
|
|
293
293
|
for (; (C = a.nextNode()) !== null && w.length < r; ) {
|
|
294
294
|
if (C.nodeType === 1) {
|
|
295
295
|
if (C.hasAttributes()) for (const o of C.getAttributeNames()) if (o.endsWith(QA)) {
|
|
296
|
-
const F = c[I++],
|
|
297
|
-
w.push({ type: 1, index: E, name: z[2], strings:
|
|
298
|
-
} else o.startsWith(
|
|
296
|
+
const F = c[I++], U = C.getAttribute(o).split(h), z = /([.?@])?(.*)/.exec(F);
|
|
297
|
+
w.push({ type: 1, index: E, name: z[2], strings: U, ctor: z[1] === "." ? lA : z[1] === "?" ? aA : z[1] === "@" ? GA : T }), C.removeAttribute(o);
|
|
298
|
+
} else o.startsWith(h) && (w.push({ type: 6, index: E }), C.removeAttribute(o));
|
|
299
299
|
if (IA.test(C.tagName)) {
|
|
300
|
-
const o = C.textContent.split(
|
|
300
|
+
const o = C.textContent.split(h), F = o.length - 1;
|
|
301
301
|
if (F > 0) {
|
|
302
302
|
C.textContent = R ? R.emptyScript : "";
|
|
303
|
-
for (let
|
|
303
|
+
for (let U = 0; U < F; U++) C.append(o[U], N()), a.nextNode(), w.push({ type: 2, index: ++E });
|
|
304
304
|
C.append(o[F], N());
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
} else if (C.nodeType === 8) if (C.data === EA) w.push({ type: 2, index: E });
|
|
308
308
|
else {
|
|
309
309
|
let o = -1;
|
|
310
|
-
for (; (o = C.data.indexOf(
|
|
310
|
+
for (; (o = C.data.indexOf(h, o + 1)) !== -1; ) w.push({ type: 7, index: E }), o += h.length - 1;
|
|
311
311
|
}
|
|
312
312
|
E++;
|
|
313
313
|
}
|
|
@@ -667,7 +667,7 @@ function gg() {
|
|
|
667
667
|
* Copyright 2018 Google LLC
|
|
668
668
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
669
669
|
*/
|
|
670
|
-
const
|
|
670
|
+
const n = (Q) => Q ?? t;
|
|
671
671
|
class fA extends e {
|
|
672
672
|
static styles = s`
|
|
673
673
|
@font-face {
|
|
@@ -720,7 +720,7 @@ class fA extends e {
|
|
|
720
720
|
}
|
|
721
721
|
render() {
|
|
722
722
|
return D`
|
|
723
|
-
<a href="${
|
|
723
|
+
<a href="${n(this.link)}" class="default ${this.variant}" tabindex="0">
|
|
724
724
|
<slot name="start"></slot>
|
|
725
725
|
<slot></slot>
|
|
726
726
|
<slot name="end"></slot>
|
|
@@ -962,7 +962,7 @@ class RA extends e {
|
|
|
962
962
|
}
|
|
963
963
|
render() {
|
|
964
964
|
return D`
|
|
965
|
-
<a href="${
|
|
965
|
+
<a href="${n(this.link)}" class="navImage">
|
|
966
966
|
<img src="${this.src}" alt="${this.alt}" />
|
|
967
967
|
<span>${this.name}</span>
|
|
968
968
|
</a>
|
|
@@ -1453,7 +1453,7 @@ class mA extends e {
|
|
|
1453
1453
|
</div>
|
|
1454
1454
|
|
|
1455
1455
|
|
|
1456
|
-
<input type="checkbox" id='${this.name | "checkbox"}' name='${this.name | "checkbox"}' aria-describedby='${this.description | this.name | "checkbox"}' value='${
|
|
1456
|
+
<input type="checkbox" id='${this.name | "checkbox"}' name='${this.name | "checkbox"}' aria-describedby='${this.description | this.name | "checkbox"}' value='${n(this.value)}' ?checked="${this.checked}" ?disabled="${this.disabled}" @change="${this._onChange}" tabindex="-1">
|
|
1457
1457
|
|
|
1458
1458
|
<div class='checkmark ${this.checked ? "active" : ""} ${this.error ? "error" : ""}' id='check' aria-describedby='${this.description | this.name | "checkbox"}' tabindex="${this.disabled ? "-1" : "0"}">
|
|
1459
1459
|
<cd-icon name='check' size='xs' color='white'></cd-icon>
|
|
@@ -1605,7 +1605,7 @@ class WA extends e {
|
|
|
1605
1605
|
return D`
|
|
1606
1606
|
<label
|
|
1607
1607
|
class="${this.disabled ? "disabled" : ""}"
|
|
1608
|
-
for="${
|
|
1608
|
+
for="${n(this.for)}"
|
|
1609
1609
|
>
|
|
1610
1610
|
${this.text}
|
|
1611
1611
|
<slot></slot>
|
|
@@ -2184,9 +2184,11 @@ class XA extends e {
|
|
|
2184
2184
|
return D`
|
|
2185
2185
|
<div class='container ${this.fullWidth ? "full-width" : ""}'>
|
|
2186
2186
|
<select
|
|
2187
|
-
name="${
|
|
2187
|
+
name="${n(this.name)}"
|
|
2188
2188
|
?disabled="${this.disabled}"
|
|
2189
2189
|
?required="${this.required}"
|
|
2190
|
+
?error="${this.error}"
|
|
2191
|
+
.value="${n(this.value)}"
|
|
2190
2192
|
class="${this.error ? "input-error" : ""} ${this.size} ${this.fullWidth ? "full-width" : ""}"
|
|
2191
2193
|
@change="${this.handleChange}"
|
|
2192
2194
|
>
|
|
@@ -2397,8 +2399,8 @@ class ZA extends e {
|
|
|
2397
2399
|
return D`
|
|
2398
2400
|
<div class='container ${this.fullWidth ? "full-width" : ""}'>
|
|
2399
2401
|
<textarea
|
|
2400
|
-
id="${
|
|
2401
|
-
name="${
|
|
2402
|
+
id="${n(this.name)}"
|
|
2403
|
+
name="${n(this.name)}"
|
|
2402
2404
|
.value="${this.value}"
|
|
2403
2405
|
placeholder="${this.placeholder}"
|
|
2404
2406
|
?disabled="${this.disabled}"
|
|
@@ -2410,7 +2412,7 @@ class ZA extends e {
|
|
|
2410
2412
|
@focus="${this.handleFocus}"
|
|
2411
2413
|
@blur="${this.handleBlur}">
|
|
2412
2414
|
</textarea>
|
|
2413
|
-
${this.iconRight ? D`<span class="icon-right-container"><cd-icon size='sm' name='${this.iconRight}' class='icon-right' color='${
|
|
2415
|
+
${this.iconRight ? D`<span class="icon-right-container"><cd-icon size='sm' name='${this.iconRight}' class='icon-right' color='${n(this.error ? "var(--input-error-border-color)" : void 0)}'></cd-icon></span>` : ""}
|
|
2414
2416
|
</div>
|
|
2415
2417
|
`;
|
|
2416
2418
|
}
|
|
@@ -2510,7 +2512,7 @@ export {
|
|
|
2510
2512
|
Cg as l,
|
|
2511
2513
|
bA as m,
|
|
2512
2514
|
Ig as n,
|
|
2513
|
-
|
|
2515
|
+
n as o,
|
|
2514
2516
|
wg as p,
|
|
2515
2517
|
Dg as q,
|
|
2516
2518
|
zA as r,
|