@cargosense/cargo-design-system 1.0.10 → 1.0.12

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.
@@ -273,8 +273,8 @@ const UA = (Q, A) => {
273
273
  let C, E = A === 2 ? "<svg>" : A === 3 ? "<math>" : "", I = v;
274
274
  for (let r = 0; r < g; r++) {
275
275
  const w = Q[r];
276
- let M, c, o = -1, F = 0;
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);
276
+ let M, c, o = -1, n = 0;
277
+ for (; n < w.length && (I.lastIndex = n, c = I.exec(w), c !== null); ) n = 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
278
  const U = I === l && Q[r + 1].startsWith("/>") ? " " : "";
279
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
  }
@@ -293,15 +293,15 @@ 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++], U = C.getAttribute(o).split(h), z = /([.?@])?(.*)/.exec(F);
296
+ const n = c[I++], U = C.getAttribute(o).split(h), z = /([.?@])?(.*)/.exec(n);
297
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
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(h), F = o.length - 1;
301
- if (F > 0) {
300
+ const o = C.textContent.split(h), n = o.length - 1;
301
+ if (n > 0) {
302
302
  C.textContent = R ? R.emptyScript : "";
303
- for (let U = 0; U < F; U++) C.append(o[U], N()), a.nextNode(), w.push({ type: 2, index: ++E });
304
- C.append(o[F], N());
303
+ for (let U = 0; U < n; U++) C.append(o[U], N()), a.nextNode(), w.push({ type: 2, index: ++E });
304
+ C.append(o[n], N());
305
305
  }
306
306
  }
307
307
  } else if (C.nodeType === 8) if (C.data === EA) w.push({ type: 2, index: E });
@@ -667,7 +667,7 @@ function gg() {
667
667
  * Copyright 2018 Google LLC
668
668
  * SPDX-License-Identifier: BSD-3-Clause
669
669
  */
670
- const n = (Q) => Q ?? t;
670
+ const F = (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="${n(this.link)}" class="default ${this.variant}" tabindex="0">
723
+ <a href="${F(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="${n(this.link)}" class="navImage">
965
+ <a href="${F(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='${n(this.value)}' ?checked="${this.checked}" ?disabled="${this.disabled}" @change="${this._onChange}" tabindex="-1">
1456
+ <input type="checkbox" id='${this.name | "checkbox"}' name='${this.name | "checkbox"}' aria-describedby='${this.description | this.name | "checkbox"}' value='${F(this.value)}' ?checked="${this.checked}" ?disabled="${this.disabled}" ?required='${this.required}' @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="${n(this.for)}"
1608
+ for="${F(this.for)}"
1609
1609
  >
1610
1610
  ${this.text}
1611
1611
  <slot></slot>
@@ -1990,7 +1990,7 @@ class KA extends e {
1990
1990
  ?disabled="${this.disabled}"
1991
1991
  @change="${this._handleChange}"
1992
1992
  @click="${this._select}"
1993
- required="${this.required}"
1993
+ ?required="${F(this.required)}"
1994
1994
  tabindex="0"
1995
1995
  >
1996
1996
  <div class='radio-text' @click="${this._handleLabelClick}">
@@ -2184,11 +2184,11 @@ class XA extends e {
2184
2184
  return D`
2185
2185
  <div class='container ${this.fullWidth ? "full-width" : ""}'>
2186
2186
  <select
2187
- name="${n(this.name)}"
2187
+ name="${F(this.name)}"
2188
2188
  ?disabled="${this.disabled}"
2189
2189
  ?required="${this.required}"
2190
2190
  ?error="${this.error}"
2191
- .value="${n(this.value)}"
2191
+ .value="${F(this.value)}"
2192
2192
  class="${this.error ? "input-error" : ""} ${this.size} ${this.fullWidth ? "full-width" : ""}"
2193
2193
  @change="${this.handleChange}"
2194
2194
  >
@@ -2399,8 +2399,8 @@ class ZA extends e {
2399
2399
  return D`
2400
2400
  <div class='container ${this.fullWidth ? "full-width" : ""}'>
2401
2401
  <textarea
2402
- id="${n(this.name)}"
2403
- name="${n(this.name)}"
2402
+ id="${F(this.name)}"
2403
+ name="${F(this.name)}"
2404
2404
  .value="${this.value}"
2405
2405
  placeholder="${this.placeholder}"
2406
2406
  ?disabled="${this.disabled}"
@@ -2412,7 +2412,7 @@ class ZA extends e {
2412
2412
  @focus="${this.handleFocus}"
2413
2413
  @blur="${this.handleBlur}">
2414
2414
  </textarea>
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>` : ""}
2415
+ ${this.iconRight ? D`<span class="icon-right-container"><cd-icon size='sm' name='${this.iconRight}' class='icon-right' color='${F(this.error ? "var(--input-error-border-color)" : void 0)}'></cd-icon></span>` : ""}
2416
2416
  </div>
2417
2417
  `;
2418
2418
  }
@@ -2512,7 +2512,7 @@ export {
2512
2512
  Cg as l,
2513
2513
  bA as m,
2514
2514
  Ig as n,
2515
- n as o,
2515
+ F as o,
2516
2516
  wg as p,
2517
2517
  Dg as q,
2518
2518
  zA as r,