@cargosense/cargo-design-system 1.0.9 → 1.0.10

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.
@@ -1,5 +1,5 @@
1
1
  import "../fonts/index.es.js";
2
- import { r as s, i as r, a as o, f as n, b as i, o as c, x as e, c as p, d as h, e as v } from "../assets/index.es.js";
2
+ import { r as s, i as r, a as o, f as n, b as i, o as l, x as e, c as p, d as h, e as v } from "../assets/index.es.js";
3
3
  s();
4
4
  class b extends r {
5
5
  static styles = i`
@@ -180,7 +180,7 @@ class b extends r {
180
180
  firstUpdated() {
181
181
  const t = document.getElementById(this.form);
182
182
  this.shadowRoot.querySelector("button").addEventListener("click", () => {
183
- t instanceof HTMLFormElement && (console.log("Form found, submitting..."), t.requestSubmit());
183
+ t instanceof HTMLFormElement && t.requestSubmit();
184
184
  });
185
185
  }
186
186
  constructor() {
@@ -188,7 +188,7 @@ class b extends r {
188
188
  }
189
189
  render() {
190
190
  return e`
191
- <a href='${c(this.link)}' target="${c(this.target)}" tabindex="-1" class="${this.expand}">
191
+ <a href='${l(this.link)}' target="${l(this.target)}" tabindex="-1" class="${this.expand}">
192
192
  <button form="${this.form}" type="${this.button}" class="button ${this.square} ${this.variant} ${this.size} ${this.expand} ${this.disabled ? "disabled" : ""}" .name="${this.name}" tabindex="${this.disabled ? "-1" : 0}" @click='${this.handleClick}'>
193
193
  <slot name='start'></slot> <slot></slot> <slot name='end'></slot>
194
194
  </button>
@@ -525,7 +525,7 @@ class g extends r {
525
525
  return e`
526
526
  ${this.iconLeft ? e`<span class="icon-left-container"><cd-icon name="${this.iconLeft}" size="sm" class="icon-left"></cd-icon></span>` : ""}
527
527
  <input id='${this.name}' class="${this.iconLeft ? "icon-spacing-left" : ""} ${this.iconRight ? " icon-spacing-right" : ""} ${this.disabled ? " disabled" : ""} ${this.error ? " input-error" : ""} ${this.fullWidth ? " full-width" : ""} ${this.variant === "dashed" ? " dashed" : this.variant == "dotted" ? " dotted" : ""} ${this.size}" type="${this.type}" placeholder="${this.placeholder}" ?required=${this.required} .value="${this.value}" ?readonly=${this.readOnly} ?disabled=${this.disabled} .pattern="${this.pattern}" @input="${this.handleInput}" @change="${this.handleChange}" @blur="${this.handleFocus}" @keypress=${this.handleKeyPress}/>
528
- ${this.iconRight ? e`<span class="icon-right-container"><cd-icon name="${this.iconRight}" size="sm" class="icon-right" color='${ifDefined(this.error ? "var(--input-error-border-color)" : void 0)}'></cd-icon></span>` : ""}
528
+ ${this.iconRight ? e`<span class="icon-right-container"><cd-icon name="${this.iconRight}" size="sm" class="icon-right" color='${l(this.error ? "var(--input-error-border-color)" : void 0)}'></cd-icon></span>` : ""}
529
529
  `;
530
530
  }
531
531
  focus() {
@@ -798,7 +798,7 @@ class x extends r {
798
798
  }
799
799
  render() {
800
800
  return e`
801
- <a href="${c(this.link)}" class="nav-item ${this.active ? "active" : ""} ${this.select ? "selected" : ""}" tabindex="0">
801
+ <a href="${l(this.link)}" class="nav-item ${this.active ? "active" : ""} ${this.select ? "selected" : ""}" tabindex="0">
802
802
  <slot name="before" class="${this.amount > 0 && !this.select ? "standout" : ""} ${this.select ? "selected" : ""}"></slot>
803
803
  <p>${this.name}</p>
804
804
  ${this.variant == "dropdown" ? e`<cd-icon class='caret' name='caret-down' size='sm'></cd-icon>` : ""}
@@ -827,7 +827,7 @@ class x extends r {
827
827
  this.active = !this.active, this.requestUpdate();
828
828
  }
829
829
  }
830
- function F() {
830
+ function R() {
831
831
  typeof window < "u" && !customElements.get("cd-nav-item") && customElements.define("cd-nav-item", x);
832
832
  }
833
833
  class y extends r {
@@ -854,7 +854,7 @@ class y extends r {
854
854
  `;
855
855
  }
856
856
  }
857
- function R() {
857
+ function F() {
858
858
  typeof window < "u" && !customElements.get("cd-table") && customElements.define("cd-table", y);
859
859
  }
860
860
  class w extends r {
@@ -1143,9 +1143,9 @@ class $ extends r {
1143
1143
  }
1144
1144
  render() {
1145
1145
  return e`
1146
- ${this.variant === "default" ? e`<a href="${c(this.link)}" class="value"><slot></slot></a>` : ""}
1146
+ ${this.variant === "default" ? e`<a href="${l(this.link)}" class="value"><slot></slot></a>` : ""}
1147
1147
  ${this.variant === "dropdown" ? e`<span class="dropdown-value"><slot></slot></span>` : ""}
1148
- ${this.variant === "arrow" ? e`<a href="${c(this.link)}" class="arrow-value"><slot></slot><cd-icon name="arrow" size="sm"></cd-icon></a>` : ""}
1148
+ ${this.variant === "arrow" ? e`<a href="${l(this.link)}" class="arrow-value"><slot></slot><cd-icon name="arrow" size="sm"></cd-icon></a>` : ""}
1149
1149
  `;
1150
1150
  }
1151
1151
  }
@@ -1464,9 +1464,9 @@ class E extends r {
1464
1464
  console.warn("Shadow DOM is not available.");
1465
1465
  return;
1466
1466
  }
1467
- this.shadowRoot.querySelector(".active") && (console.log("Adding event listener to active element"), this.shadowRoot.querySelector(".active").addEventListener("keydown", (t) => {
1468
- console.log("test"), t.keyCode === 13 && this.collapseInput();
1469
- }));
1467
+ this.shadowRoot.querySelector(".active") && this.shadowRoot.querySelector(".active").addEventListener("keydown", (t) => {
1468
+ t.keyCode === 13 && this.collapseInput();
1469
+ });
1470
1470
  }
1471
1471
  focus() {
1472
1472
  if (!this.shadowRoot) {
@@ -2222,13 +2222,12 @@ class C extends r {
2222
2222
  });
2223
2223
  }
2224
2224
  timeNow() {
2225
- console.log(this.timezone);
2226
2225
  let t = (/* @__PURE__ */ new Date()).toLocaleString("en-US", {
2227
2226
  timeZone: this.timezone || "America/New_York"
2228
2227
  });
2229
- if (console.log(t), console.log(t.split(" ")[2]), t.split(" ")[2] === "PM") {
2230
- let l = t.split(" ");
2231
- console.log(l), t = Number(l[1].split(":")[0]) + 12 + ":" + l[1].split(":")[1] + ":" + l[1].split(":")[2];
2228
+ if (t.split(" ")[2] === "PM") {
2229
+ let c = t.split(" ");
2230
+ t = Number(c[1].split(":")[0]) + 12 + ":" + c[1].split(":")[1] + ":" + c[1].split(":")[2];
2232
2231
  } else
2233
2232
  t = t.split(" ")[1];
2234
2233
  return t;
@@ -2385,12 +2384,12 @@ export {
2385
2384
  Y as registerIconContainer,
2386
2385
  D as registerInput,
2387
2386
  V as registerNavBar,
2388
- F as registerNavItem,
2387
+ R as registerNavItem,
2389
2388
  P as registerNavProfile,
2390
2389
  G as registerSearch,
2391
2390
  U as registerTab,
2392
2391
  M as registerTabContainer,
2393
- R as registerTable,
2392
+ F as registerTable,
2394
2393
  W as registerTime,
2395
2394
  L as registerToolTip,
2396
2395
  N as registerValue