@cargosense/cargo-design-system 1.0.16 → 1.0.17
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
|
@@ -263,22 +263,22 @@ G.elementStyles = [], G.shadowRootOptions = { mode: "open" }, G[f("elementProper
|
|
|
263
263
|
* Copyright 2017 Google LLC
|
|
264
264
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
265
265
|
*/
|
|
266
|
-
const m = globalThis, b = m.trustedTypes, Z = b ? b.createPolicy("lit-html", { createHTML: (Q) => Q }) : void 0, QA = "$lit$",
|
|
267
|
-
\f\r]`, v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, q = /-->/g, $ = />/g,
|
|
266
|
+
const m = globalThis, b = m.trustedTypes, Z = b ? b.createPolicy("lit-html", { createHTML: (Q) => Q }) : void 0, QA = "$lit$", l = `lit$${Math.random().toFixed(9).slice(2)}$`, EA = "?" + l, nA = `<${EA}>`, d = document, J = () => d.createComment(""), N = (Q) => Q === null || typeof Q != "object" && typeof Q != "function", k = Array.isArray, FA = (Q) => k(Q) || typeof Q?.[Symbol.iterator] == "function", T = `[
|
|
267
|
+
\f\r]`, v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, q = /-->/g, $ = />/g, h = RegExp(`>|${T}(?:([^\\s"'>=/]+)(${T}*=${T}*(?:[^
|
|
268
268
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), _ = /'/g, AA = /"/g, eA = /^(?:script|style|textarea|title)$/i, aA = (Q) => (A, ...g) => ({ _$litType$: Q, strings: A, values: g }), t = aA(1), u = Symbol.for("lit-noChange"), M = Symbol.for("lit-nothing"), gA = /* @__PURE__ */ new WeakMap(), U = d.createTreeWalker(d, 129);
|
|
269
269
|
function IA(Q, A) {
|
|
270
270
|
if (!k(Q) || !Q.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
271
271
|
return Z !== void 0 ? Z.createHTML(A) : A;
|
|
272
272
|
}
|
|
273
|
-
const
|
|
273
|
+
const lA = (Q, A) => {
|
|
274
274
|
const g = Q.length - 1, B = [];
|
|
275
275
|
let C, E = A === 2 ? "<svg>" : A === 3 ? "<math>" : "", e = v;
|
|
276
276
|
for (let s = 0; s < g; s++) {
|
|
277
277
|
const I = Q[s];
|
|
278
278
|
let r, Y, o = -1, F = 0;
|
|
279
|
-
for (; F < I.length && (e.lastIndex = F, Y = e.exec(I), Y !== null); ) F = e.lastIndex, e === v ? Y[1] === "!--" ? e = q : Y[1] !== void 0 ? e = $ : Y[2] !== void 0 ? (eA.test(Y[2]) && (C = RegExp("</" + Y[2], "g")), e =
|
|
280
|
-
const a = e ===
|
|
281
|
-
E += e === v ? I + nA : o >= 0 ? (B.push(r), I.slice(0, o) + QA + I.slice(o) +
|
|
279
|
+
for (; F < I.length && (e.lastIndex = F, Y = e.exec(I), Y !== null); ) F = e.lastIndex, e === v ? Y[1] === "!--" ? e = q : Y[1] !== void 0 ? e = $ : Y[2] !== void 0 ? (eA.test(Y[2]) && (C = RegExp("</" + Y[2], "g")), e = h) : Y[3] !== void 0 && (e = h) : e === h ? Y[0] === ">" ? (e = C ?? v, o = -1) : Y[1] === void 0 ? o = -2 : (o = e.lastIndex - Y[2].length, r = Y[1], e = Y[3] === void 0 ? h : Y[3] === '"' ? AA : _) : e === AA || e === _ ? e = h : e === q || e === $ ? e = v : (e = h, C = void 0);
|
|
280
|
+
const a = e === h && Q[s + 1].startsWith("/>") ? " " : "";
|
|
281
|
+
E += e === v ? I + nA : o >= 0 ? (B.push(r), I.slice(0, o) + QA + I.slice(o) + l + a) : I + l + (o === -2 ? s : a);
|
|
282
282
|
}
|
|
283
283
|
return [IA(Q, E + (Q[g] || "<?>") + (A === 2 ? "</svg>" : A === 3 ? "</math>" : "")), B];
|
|
284
284
|
};
|
|
@@ -287,7 +287,7 @@ class z {
|
|
|
287
287
|
let C;
|
|
288
288
|
this.parts = [];
|
|
289
289
|
let E = 0, e = 0;
|
|
290
|
-
const s = A.length - 1, I = this.parts, [r, Y] =
|
|
290
|
+
const s = A.length - 1, I = this.parts, [r, Y] = lA(A, g);
|
|
291
291
|
if (this.el = z.createElement(r, B), U.currentNode = this.el.content, g === 2 || g === 3) {
|
|
292
292
|
const o = this.el.content.firstChild;
|
|
293
293
|
o.replaceWith(...o.childNodes);
|
|
@@ -295,11 +295,11 @@ class z {
|
|
|
295
295
|
for (; (C = U.nextNode()) !== null && I.length < s; ) {
|
|
296
296
|
if (C.nodeType === 1) {
|
|
297
297
|
if (C.hasAttributes()) for (const o of C.getAttributeNames()) if (o.endsWith(QA)) {
|
|
298
|
-
const F = Y[e++], a = C.getAttribute(o).split(
|
|
298
|
+
const F = Y[e++], a = C.getAttribute(o).split(l), y = /([.?@])?(.*)/.exec(F);
|
|
299
299
|
I.push({ type: 1, index: E, name: y[2], strings: a, ctor: y[1] === "." ? UA : y[1] === "?" ? dA : y[1] === "@" ? GA : x }), C.removeAttribute(o);
|
|
300
|
-
} else o.startsWith(
|
|
300
|
+
} else o.startsWith(l) && (I.push({ type: 6, index: E }), C.removeAttribute(o));
|
|
301
301
|
if (eA.test(C.tagName)) {
|
|
302
|
-
const o = C.textContent.split(
|
|
302
|
+
const o = C.textContent.split(l), F = o.length - 1;
|
|
303
303
|
if (F > 0) {
|
|
304
304
|
C.textContent = b ? b.emptyScript : "";
|
|
305
305
|
for (let a = 0; a < F; a++) C.append(o[a], J()), U.nextNode(), I.push({ type: 2, index: ++E });
|
|
@@ -309,7 +309,7 @@ class z {
|
|
|
309
309
|
} else if (C.nodeType === 8) if (C.data === EA) I.push({ type: 2, index: E });
|
|
310
310
|
else {
|
|
311
311
|
let o = -1;
|
|
312
|
-
for (; (o = C.data.indexOf(
|
|
312
|
+
for (; (o = C.data.indexOf(l, o + 1)) !== -1; ) I.push({ type: 7, index: E }), o += l.length - 1;
|
|
313
313
|
}
|
|
314
314
|
E++;
|
|
315
315
|
}
|
|
@@ -325,7 +325,7 @@ function P(Q, A, g = Q, B) {
|
|
|
325
325
|
const E = N(A) ? void 0 : A._$litDirective$;
|
|
326
326
|
return C?.constructor !== E && (C?._$AO?.(!1), E === void 0 ? C = void 0 : (C = new E(Q), C._$AT(Q, g, B)), B !== void 0 ? (g._$Co ??= [])[B] = C : g._$Cl = C), C !== void 0 && (A = P(Q, C._$AS(Q, A.values), C, B)), A;
|
|
327
327
|
}
|
|
328
|
-
class
|
|
328
|
+
class hA {
|
|
329
329
|
constructor(A, g) {
|
|
330
330
|
this._$AV = [], this._$AN = void 0, this._$AD = A, this._$AM = g;
|
|
331
331
|
}
|
|
@@ -387,7 +387,7 @@ class H {
|
|
|
387
387
|
const { values: g, _$litType$: B } = A, C = typeof B == "number" ? this._$AC(A) : (B.el === void 0 && (B.el = z.createElement(IA(B.h, B.h[0]), this.options)), B);
|
|
388
388
|
if (this._$AH?._$AD === C) this._$AH.p(g);
|
|
389
389
|
else {
|
|
390
|
-
const E = new
|
|
390
|
+
const E = new hA(C, this), e = E.u(this.options);
|
|
391
391
|
E.p(g), this.T(e), this._$AH = E;
|
|
392
392
|
}
|
|
393
393
|
}
|
|
@@ -2570,6 +2570,26 @@ class $A extends w {
|
|
|
2570
2570
|
reflect: !0,
|
|
2571
2571
|
attribute: "disabled-next",
|
|
2572
2572
|
defaultValue: !1
|
|
2573
|
+
},
|
|
2574
|
+
skipToStartClick: {
|
|
2575
|
+
type: Function,
|
|
2576
|
+
reflect: !1,
|
|
2577
|
+
attribute: !1
|
|
2578
|
+
},
|
|
2579
|
+
previousClick: {
|
|
2580
|
+
type: Function,
|
|
2581
|
+
reflect: !1,
|
|
2582
|
+
attribute: !1
|
|
2583
|
+
},
|
|
2584
|
+
nextClick: {
|
|
2585
|
+
type: Function,
|
|
2586
|
+
reflect: !1,
|
|
2587
|
+
attribute: !1
|
|
2588
|
+
},
|
|
2589
|
+
skipToEndClick: {
|
|
2590
|
+
type: Function,
|
|
2591
|
+
reflect: !1,
|
|
2592
|
+
attribute: !1
|
|
2573
2593
|
}
|
|
2574
2594
|
};
|
|
2575
2595
|
constructor() {
|
|
@@ -2581,17 +2601,17 @@ class $A extends w {
|
|
|
2581
2601
|
<slot name="default"></slot>
|
|
2582
2602
|
|
|
2583
2603
|
${this.skipToStart ? t`
|
|
2584
|
-
<cd-icon name="caret-end-mini-left" @click="${
|
|
2604
|
+
<cd-icon name="caret-end-mini-left" @click="${this.skipToStartClick}" color="${n(this.currentPage === 1 || this.disabled || this.disabledPrevious ? "var(--input-border-color-disabled)" : void 0)}" tabindex="${this.currentPage === 1 ? -1 : 0}"></cd-icon>
|
|
2585
2605
|
` : ""}
|
|
2586
2606
|
|
|
2587
|
-
<cd-icon name="caret-mini-left" @click="${this.
|
|
2607
|
+
<cd-icon name="caret-mini-left" @click="${this.previousClick}" color="${n(this.currentPage === 1 || this.disabled || this.disabledPrevious ? "var(--input-border-color-disabled)" : void 0)}" tabindex="${this.currentPage === 1 ? -1 : 0}"></cd-icon>
|
|
2588
2608
|
|
|
2589
2609
|
<span>Page <span class="page-number">${this.currentPage}</span> of <span class="page-number">${this.totalPages}</span></span>
|
|
2590
2610
|
|
|
2591
|
-
<cd-icon name="caret-mini-right" @click="${this.
|
|
2611
|
+
<cd-icon name="caret-mini-right" @click="${this.nextClick}" color="${n(this.currentPage === this.totalPages || this.disabled || this.disabledNext ? "var(--input-border-color-disabled)" : void 0)}" tabindex="${this.currentPage === this.totalPages ? -1 : 0}"></cd-icon>
|
|
2592
2612
|
|
|
2593
2613
|
${this.skipToEnd ? t`
|
|
2594
|
-
<cd-icon name="caret-end-mini-right" @click="${
|
|
2614
|
+
<cd-icon name="caret-end-mini-right" @click="${this.skipToEndClick}" color="${n(this.currentPage === this.totalPages || this.disabled || this.disabledNext ? "var(--input-border-color-disabled)" : void 0)}" tabindex="${this.currentPage === this.totalPages ? -1 : 0}"></cd-icon>
|
|
2595
2615
|
` : ""}
|
|
2596
2616
|
|
|
2597
2617
|
<slot name="after"></slot>
|