@cargosense/cargo-design-system 1.0.9 → 1.0.11

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() {
@@ -647,7 +647,7 @@ function V() {
647
647
  }
648
648
  h();
649
649
  s();
650
- class x extends r {
650
+ class y extends r {
651
651
  static styles = i`
652
652
  @font-face {
653
653
  font-family: 'Geist';
@@ -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,10 +827,10 @@ class x extends r {
827
827
  this.active = !this.active, this.requestUpdate();
828
828
  }
829
829
  }
830
- function F() {
831
- typeof window < "u" && !customElements.get("cd-nav-item") && customElements.define("cd-nav-item", x);
830
+ function R() {
831
+ typeof window < "u" && !customElements.get("cd-nav-item") && customElements.define("cd-nav-item", y);
832
832
  }
833
- class y extends r {
833
+ class x extends r {
834
834
  static styles = i`
835
835
  @font-face {
836
836
  font-family: 'Geist';
@@ -854,8 +854,8 @@ class y extends r {
854
854
  `;
855
855
  }
856
856
  }
857
- function R() {
858
- typeof window < "u" && !customElements.get("cd-table") && customElements.define("cd-table", y);
857
+ function F() {
858
+ typeof window < "u" && !customElements.get("cd-table") && customElements.define("cd-table", x);
859
859
  }
860
860
  class w extends r {
861
861
  static styles = i`
@@ -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) {
@@ -1853,6 +1853,10 @@ class A extends r {
1853
1853
  type: String,
1854
1854
  reflect: !0
1855
1855
  },
1856
+ name: {
1857
+ type: String,
1858
+ reflect: !0
1859
+ },
1856
1860
  shortcut: {
1857
1861
  type: String,
1858
1862
  reflect: !0
@@ -2119,6 +2123,10 @@ class C extends r {
2119
2123
  }
2120
2124
  `;
2121
2125
  static properties = {
2126
+ name: {
2127
+ type: String,
2128
+ reflect: !0
2129
+ },
2122
2130
  value: {
2123
2131
  type: String,
2124
2132
  reflect: !0
@@ -2222,13 +2230,12 @@ class C extends r {
2222
2230
  });
2223
2231
  }
2224
2232
  timeNow() {
2225
- console.log(this.timezone);
2226
2233
  let t = (/* @__PURE__ */ new Date()).toLocaleString("en-US", {
2227
2234
  timeZone: this.timezone || "America/New_York"
2228
2235
  });
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];
2236
+ if (t.split(" ")[2] === "PM") {
2237
+ let c = t.split(" ");
2238
+ t = Number(c[1].split(":")[0]) + 12 + ":" + c[1].split(":")[1] + ":" + c[1].split(":")[2];
2232
2239
  } else
2233
2240
  t = t.split(" ")[1];
2234
2241
  return t;
@@ -2370,12 +2377,12 @@ export {
2370
2377
  B as IconContainer,
2371
2378
  g as Input,
2372
2379
  m as NavBar,
2373
- x as NavItem,
2380
+ y as NavItem,
2374
2381
  k as NavProfile,
2375
2382
  E as Search,
2376
2383
  z as Tab,
2377
2384
  S as TabContainer,
2378
- y as Table,
2385
+ x as Table,
2379
2386
  C as TimeComponent,
2380
2387
  w as ToolTip,
2381
2388
  $ as Value,
@@ -2385,12 +2392,12 @@ export {
2385
2392
  Y as registerIconContainer,
2386
2393
  D as registerInput,
2387
2394
  V as registerNavBar,
2388
- F as registerNavItem,
2395
+ R as registerNavItem,
2389
2396
  P as registerNavProfile,
2390
2397
  G as registerSearch,
2391
2398
  U as registerTab,
2392
2399
  M as registerTabContainer,
2393
- R as registerTable,
2400
+ F as registerTable,
2394
2401
  W as registerTime,
2395
2402
  L as registerToolTip,
2396
2403
  N as registerValue