@cargosense/cargo-design-system 1.0.11 → 1.0.13
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.cjs.js +3 -3
- package/dist/assets/index.cjs.js.map +1 -1
- package/dist/assets/index.es.js +23 -21
- package/dist/assets/index.es.js.map +1 -1
- package/dist/molecules/index.cjs.js +12 -12
- package/dist/molecules/index.cjs.js.map +1 -1
- package/dist/molecules/index.es.js +39 -27
- package/dist/molecules/index.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../fonts/index.es.js";
|
|
2
|
-
import { r as
|
|
3
|
-
|
|
4
|
-
class
|
|
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='${
|
|
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",
|
|
213
|
+
typeof window < "u" && !customElements.get("cd-button") && customElements.define("cd-button", v);
|
|
214
214
|
}
|
|
215
|
-
|
|
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
|
-
|
|
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='${
|
|
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,7 +646,7 @@ function V() {
|
|
|
646
646
|
typeof window < "u" && !customElements.get("cd-nav-bar") && customElements.define("cd-nav-bar", m);
|
|
647
647
|
}
|
|
648
648
|
h();
|
|
649
|
-
|
|
649
|
+
l();
|
|
650
650
|
class y extends r {
|
|
651
651
|
static styles = i`
|
|
652
652
|
@font-face {
|
|
@@ -798,7 +798,7 @@ class y extends r {
|
|
|
798
798
|
}
|
|
799
799
|
render() {
|
|
800
800
|
return e`
|
|
801
|
-
<a href="${
|
|
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>` : ""}
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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="${
|
|
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="${
|
|
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
|
-
|
|
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
|
-
|
|
1500
|
+
l();
|
|
1501
1501
|
class z extends r {
|
|
1502
1502
|
static styles = i`
|
|
1503
1503
|
@font-face {
|
|
@@ -1857,6 +1857,12 @@ class A extends r {
|
|
|
1857
1857
|
type: String,
|
|
1858
1858
|
reflect: !0
|
|
1859
1859
|
},
|
|
1860
|
+
required: {
|
|
1861
|
+
type: Boolean,
|
|
1862
|
+
reflect: !0,
|
|
1863
|
+
attribute: "required",
|
|
1864
|
+
converter: (t) => t === "" || t === !0
|
|
1865
|
+
},
|
|
1860
1866
|
shortcut: {
|
|
1861
1867
|
type: String,
|
|
1862
1868
|
reflect: !0
|
|
@@ -1900,7 +1906,7 @@ class A extends r {
|
|
|
1900
1906
|
}
|
|
1901
1907
|
};
|
|
1902
1908
|
constructor() {
|
|
1903
|
-
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({
|
|
1904
1910
|
customError: this.errorText && this.errorText.length > 0 || !1
|
|
1905
1911
|
});
|
|
1906
1912
|
}
|
|
@@ -1935,7 +1941,7 @@ class A extends r {
|
|
|
1935
1941
|
render() {
|
|
1936
1942
|
return e`
|
|
1937
1943
|
<div class='container'>
|
|
1938
|
-
<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)}' />
|
|
1939
1945
|
${this.shortcut ? e`<cd-button variant='primary' ?disabled='${this.disabled}'>${this.shortcut}</cd-button>` : ""}
|
|
1940
1946
|
</div>
|
|
1941
1947
|
|
|
@@ -2127,6 +2133,12 @@ class C extends r {
|
|
|
2127
2133
|
type: String,
|
|
2128
2134
|
reflect: !0
|
|
2129
2135
|
},
|
|
2136
|
+
required: {
|
|
2137
|
+
type: Boolean,
|
|
2138
|
+
reflect: !0,
|
|
2139
|
+
attribute: "required",
|
|
2140
|
+
converter: (t) => t === "" || t === !0
|
|
2141
|
+
},
|
|
2130
2142
|
value: {
|
|
2131
2143
|
type: String,
|
|
2132
2144
|
reflect: !0
|
|
@@ -2174,7 +2186,7 @@ class C extends r {
|
|
|
2174
2186
|
}
|
|
2175
2187
|
};
|
|
2176
2188
|
constructor() {
|
|
2177
|
-
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({
|
|
2178
2190
|
customError: this.errorText && this.errorText.length > 0 || !1
|
|
2179
2191
|
});
|
|
2180
2192
|
}
|
|
@@ -2209,7 +2221,7 @@ class C extends r {
|
|
|
2209
2221
|
render() {
|
|
2210
2222
|
return e`
|
|
2211
2223
|
<div class='container'>
|
|
2212
|
-
<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)}' />
|
|
2213
2225
|
${this.shortcut ? e`<cd-button variant='primary' ?disabled='${this.disabled}'>${this.shortcut}</cd-button>` : ""}
|
|
2214
2226
|
</div>
|
|
2215
2227
|
`;
|
|
@@ -2261,12 +2273,12 @@ class C extends r {
|
|
|
2261
2273
|
function W() {
|
|
2262
2274
|
typeof window < "u" && !customElements.get("cd-time") && customElements.define("cd-time", C);
|
|
2263
2275
|
}
|
|
2264
|
-
|
|
2265
|
-
class
|
|
2276
|
+
l();
|
|
2277
|
+
class q extends r {
|
|
2266
2278
|
static styles = i`
|
|
2267
2279
|
@font-face {
|
|
2268
2280
|
font-family: 'GeistMono';
|
|
2269
|
-
src: url(${o(
|
|
2281
|
+
src: url(${o(b)}) format('woff');
|
|
2270
2282
|
font-weight: 100 900;
|
|
2271
2283
|
font-style: normal;
|
|
2272
2284
|
}
|
|
@@ -2368,13 +2380,13 @@ class B extends r {
|
|
|
2368
2380
|
}
|
|
2369
2381
|
}
|
|
2370
2382
|
function Y() {
|
|
2371
|
-
typeof window < "u" && !customElements.get("cd-icon-container") && customElements.define("cd-icon-container",
|
|
2383
|
+
typeof window < "u" && !customElements.get("cd-icon-container") && customElements.define("cd-icon-container", q);
|
|
2372
2384
|
}
|
|
2373
2385
|
export {
|
|
2374
|
-
|
|
2386
|
+
v as Button,
|
|
2375
2387
|
A as DateComponent,
|
|
2376
2388
|
f as Header,
|
|
2377
|
-
|
|
2389
|
+
q as IconContainer,
|
|
2378
2390
|
g as Input,
|
|
2379
2391
|
m as NavBar,
|
|
2380
2392
|
y as NavItem,
|