@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.
@@ -1,7 +1,7 @@
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 l, x as e, c as p, d as h, e as v } from "../assets/index.es.js";
3
- s();
4
- class b extends r {
2
+ import { r as l, i as r, a as o, f as n, b as i, o as s, x as e, c as p, d as h, e as b } from "../assets/index.es.js";
3
+ l();
4
+ class v extends r {
5
5
  static styles = i`
6
6
  @font-face {
7
7
  font-family: 'Geist';
@@ -188,7 +188,7 @@ class b extends r {
188
188
  }
189
189
  render() {
190
190
  return e`
191
- <a href='${l(this.link)}' target="${l(this.target)}" tabindex="-1" class="${this.expand}">
191
+ <a href='${s(this.link)}' target="${s(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>
@@ -210,9 +210,9 @@ class b extends r {
210
210
  }
211
211
  }
212
212
  function d() {
213
- typeof window < "u" && !customElements.get("cd-button") && customElements.define("cd-button", b);
213
+ typeof window < "u" && !customElements.get("cd-button") && customElements.define("cd-button", v);
214
214
  }
215
- s();
215
+ l();
216
216
  class f extends r {
217
217
  static styles = i`
218
218
  @font-face {
@@ -287,7 +287,7 @@ class f extends r {
287
287
  function I() {
288
288
  !customElements.get("cd-header") && typeof window < "u" && customElements.define("cd-header", f);
289
289
  }
290
- s();
290
+ l();
291
291
  class g extends r {
292
292
  static formAssociated = !0;
293
293
  static styles = i`
@@ -524,8 +524,8 @@ class g extends r {
524
524
  render() {
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
- <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='${l(this.error ? "var(--input-error-border-color)" : void 0)}'></cd-icon></span>` : ""}
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=${s(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='${s(this.error ? "var(--input-error-border-color)" : void 0)}'></cd-icon></span>` : ""}
529
529
  `;
530
530
  }
531
531
  focus() {
@@ -646,8 +646,8 @@ function V() {
646
646
  typeof window < "u" && !customElements.get("cd-nav-bar") && customElements.define("cd-nav-bar", m);
647
647
  }
648
648
  h();
649
- s();
650
- class x extends r {
649
+ l();
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="${l(this.link)}" class="nav-item ${this.active ? "active" : ""} ${this.select ? "selected" : ""}" tabindex="0">
801
+ <a href="${s(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>` : ""}
@@ -828,9 +828,9 @@ class x extends r {
828
828
  }
829
829
  }
830
830
  function R() {
831
- typeof window < "u" && !customElements.get("cd-nav-item") && customElements.define("cd-nav-item", x);
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';
@@ -855,7 +855,7 @@ class y extends r {
855
855
  }
856
856
  }
857
857
  function F() {
858
- typeof window < "u" && !customElements.get("cd-table") && customElements.define("cd-table", y);
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`
@@ -961,7 +961,7 @@ class w extends r {
961
961
  function L() {
962
962
  typeof window < "u" && !customElements.get("cd-tool-tip") && customElements.define("cd-tool-tip", w);
963
963
  }
964
- s();
964
+ l();
965
965
  class k extends r {
966
966
  static styles = i`
967
967
  @font-face {
@@ -1045,7 +1045,7 @@ class k extends r {
1045
1045
  function P() {
1046
1046
  typeof window < "u" && !customElements.get("cd-nav-profile") && customElements.define("cd-nav-profile", k);
1047
1047
  }
1048
- s();
1048
+ l();
1049
1049
  class $ extends r {
1050
1050
  static styles = i`
1051
1051
  @font-face {
@@ -1143,16 +1143,16 @@ class $ extends r {
1143
1143
  }
1144
1144
  render() {
1145
1145
  return e`
1146
- ${this.variant === "default" ? e`<a href="${l(this.link)}" class="value"><slot></slot></a>` : ""}
1146
+ ${this.variant === "default" ? e`<a href="${s(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="${l(this.link)}" class="arrow-value"><slot></slot><cd-icon name="arrow" size="sm"></cd-icon></a>` : ""}
1148
+ ${this.variant === "arrow" ? e`<a href="${s(this.link)}" class="arrow-value"><slot></slot><cd-icon name="arrow" size="sm"></cd-icon></a>` : ""}
1149
1149
  `;
1150
1150
  }
1151
1151
  }
1152
1152
  function N() {
1153
1153
  typeof window < "u" && !customElements.get("cd-value") && customElements.define("cd-value", $);
1154
1154
  }
1155
- s();
1155
+ l();
1156
1156
  class E extends r {
1157
1157
  static styles = i`
1158
1158
  @font-face {
@@ -1497,7 +1497,7 @@ class E extends r {
1497
1497
  function G() {
1498
1498
  typeof window < "u" && !customElements.get("cd-search") && customElements.define("cd-search", E);
1499
1499
  }
1500
- s();
1500
+ l();
1501
1501
  class z extends r {
1502
1502
  static styles = i`
1503
1503
  @font-face {
@@ -1853,6 +1853,16 @@ class A extends r {
1853
1853
  type: String,
1854
1854
  reflect: !0
1855
1855
  },
1856
+ name: {
1857
+ type: String,
1858
+ reflect: !0
1859
+ },
1860
+ required: {
1861
+ type: Boolean,
1862
+ reflect: !0,
1863
+ attribute: "required",
1864
+ converter: (t) => t === "" || t === !0
1865
+ },
1856
1866
  shortcut: {
1857
1867
  type: String,
1858
1868
  reflect: !0
@@ -1896,7 +1906,7 @@ class A extends r {
1896
1906
  }
1897
1907
  };
1898
1908
  constructor() {
1899
- super(), this.value = "", this.shortcut = void 0, this.disabled = void 0, this.form = void 0, this.size = "md", this.fullWidth = !1, this.variant = "default", this.timezone = "America/New_York", this._internals = this.attachInternals(), this._internals.setValidity({
1909
+ super(), this.value = "", this.shortcut = void 0, this.disabled = void 0, this.form = void 0, this.size = "md", this.fullWidth = !1, this.variant = "default", this.timezone = "America/New_York", this.error = !1, this.name = void 0, this.required = !1, this._internals = this.attachInternals(), this._internals.setValidity({
1900
1910
  customError: this.errorText && this.errorText.length > 0 || !1
1901
1911
  });
1902
1912
  }
@@ -1931,7 +1941,7 @@ class A extends r {
1931
1941
  render() {
1932
1942
  return e`
1933
1943
  <div class='container'>
1934
- <input class='${this.error ? "input-error" : ""} ${this.disabled ? "disabled" : ""} ${this.fullWidth ? "full-width" : ""} ${this.variant} ${this.size}' type='date' id='${this.name | "date"}' name='${this.name | "date"}' .value='${this.value}' @change='${this.handleChange}' @focus='${this.handleFocus}' @blur='${this.handleBlur}' @input='${this.handleInput}' ?disabled='${this.disabled}' />
1944
+ <input class='${this.error ? "input-error" : ""} ${this.disabled ? "disabled" : ""} ${this.fullWidth ? "full-width" : ""} ${this.variant} ${this.size}' type='date' id='${this.name | "date"}' name='${this.name | "date"}' .value='${this.value}' @change='${this.handleChange}' @focus='${this.handleFocus}' @blur='${this.handleBlur}' @input='${this.handleInput}' ?disabled='${this.disabled}' ?required='${s(this.required)}' />
1935
1945
  ${this.shortcut ? e`<cd-button variant='primary' ?disabled='${this.disabled}'>${this.shortcut}</cd-button>` : ""}
1936
1946
  </div>
1937
1947
 
@@ -2119,6 +2129,16 @@ class C extends r {
2119
2129
  }
2120
2130
  `;
2121
2131
  static properties = {
2132
+ name: {
2133
+ type: String,
2134
+ reflect: !0
2135
+ },
2136
+ required: {
2137
+ type: Boolean,
2138
+ reflect: !0,
2139
+ attribute: "required",
2140
+ converter: (t) => t === "" || t === !0
2141
+ },
2122
2142
  value: {
2123
2143
  type: String,
2124
2144
  reflect: !0
@@ -2166,7 +2186,7 @@ class C extends r {
2166
2186
  }
2167
2187
  };
2168
2188
  constructor() {
2169
- super(), this.value = "", this.shortcut = void 0, this.error = !1, this.disabled = void 0, this.form = void 0, this.size = "md", this.fullWidth = !1, this.variant = "default", this.timezone = "America/New_York", this._internals = this.attachInternals(), this._internals.setValidity({
2189
+ super(), this.name = void 0, this.required = !1, this.value = "", this.shortcut = void 0, this.error = !1, this.disabled = void 0, this.form = void 0, this.size = "md", this.fullWidth = !1, this.variant = "default", this.timezone = "America/New_York", this._internals = this.attachInternals(), this._internals.setValidity({
2170
2190
  customError: this.errorText && this.errorText.length > 0 || !1
2171
2191
  });
2172
2192
  }
@@ -2201,7 +2221,7 @@ class C extends r {
2201
2221
  render() {
2202
2222
  return e`
2203
2223
  <div class='container'>
2204
- <input class='${this.error ? "input-error" : ""} ${this.disabled ? "disabled" : ""} ${this.fullWidth ? "full-width" : ""} ${this.variant} ${this.size}' type='time' id='${this.name | "time"}' name='${this.name | "time"}' .value='${this.value}' @change='${this.handleChange}' @focus='${this.handleFocus}' @blur='${this.handleBlur}' @input='${this.handleInput}' ?disabled='${this.disabled}' />
2224
+ <input class='${this.error ? "input-error" : ""} ${this.disabled ? "disabled" : ""} ${this.fullWidth ? "full-width" : ""} ${this.variant} ${this.size}' type='time' id='${this.name | "time"}' name='${this.name | "time"}' .value='${this.value}' @change='${this.handleChange}' @focus='${this.handleFocus}' @blur='${this.handleBlur}' @input='${this.handleInput}' ?disabled='${this.disabled}' ?required='${s(this.required)}' />
2205
2225
  ${this.shortcut ? e`<cd-button variant='primary' ?disabled='${this.disabled}'>${this.shortcut}</cd-button>` : ""}
2206
2226
  </div>
2207
2227
  `;
@@ -2253,12 +2273,12 @@ class C extends r {
2253
2273
  function W() {
2254
2274
  typeof window < "u" && !customElements.get("cd-time") && customElements.define("cd-time", C);
2255
2275
  }
2256
- s();
2257
- class B extends r {
2276
+ l();
2277
+ class q extends r {
2258
2278
  static styles = i`
2259
2279
  @font-face {
2260
2280
  font-family: 'GeistMono';
2261
- src: url(${o(v)}) format('woff');
2281
+ src: url(${o(b)}) format('woff');
2262
2282
  font-weight: 100 900;
2263
2283
  font-style: normal;
2264
2284
  }
@@ -2360,21 +2380,21 @@ class B extends r {
2360
2380
  }
2361
2381
  }
2362
2382
  function Y() {
2363
- typeof window < "u" && !customElements.get("cd-icon-container") && customElements.define("cd-icon-container", B);
2383
+ typeof window < "u" && !customElements.get("cd-icon-container") && customElements.define("cd-icon-container", q);
2364
2384
  }
2365
2385
  export {
2366
- b as Button,
2386
+ v as Button,
2367
2387
  A as DateComponent,
2368
2388
  f as Header,
2369
- B as IconContainer,
2389
+ q as IconContainer,
2370
2390
  g as Input,
2371
2391
  m as NavBar,
2372
- x as NavItem,
2392
+ y as NavItem,
2373
2393
  k as NavProfile,
2374
2394
  E as Search,
2375
2395
  z as Tab,
2376
2396
  S as TabContainer,
2377
- y as Table,
2397
+ x as Table,
2378
2398
  C as TimeComponent,
2379
2399
  w as ToolTip,
2380
2400
  $ as Value,