@cargosense/cargo-design-system 1.0.5 → 1.0.8

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 c, x as e, c as p, d as h, e as b } from "../assets/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";
3
3
  s();
4
- class v extends r {
4
+ class b extends r {
5
5
  static styles = i`
6
6
  @font-face {
7
7
  font-family: 'Geist';
@@ -210,7 +210,7 @@ class v extends r {
210
210
  }
211
211
  }
212
212
  function d() {
213
- typeof window < "u" && !customElements.get("cd-button") && customElements.define("cd-button", v);
213
+ typeof window < "u" && !customElements.get("cd-button") && customElements.define("cd-button", b);
214
214
  }
215
215
  s();
216
216
  class f extends r {
@@ -361,6 +361,10 @@ class g extends r {
361
361
  outline: 2px solid var(--input-error-border-color);
362
362
  }
363
363
 
364
+ .input-error::placeholder {
365
+ color: var(--input-error-border-color);
366
+ }
367
+
364
368
  .full-width {
365
369
  width: 100%;
366
370
  }
@@ -521,7 +525,7 @@ class g extends r {
521
525
  return e`
522
526
  ${this.iconLeft ? e`<span class="icon-left-container"><cd-icon name="${this.iconLeft}" size="sm" class="icon-left"></cd-icon></span>` : ""}
523
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}/>
524
- ${this.iconRight ? e`<span class="icon-right-container"><cd-icon name="${this.iconRight}" size="sm" class="icon-right"></cd-icon></span>` : ""}
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>` : ""}
525
529
  `;
526
530
  }
527
531
  focus() {
@@ -1838,6 +1842,11 @@ class A extends r {
1838
1842
  flex-direction: row;
1839
1843
  align-items: center;
1840
1844
  }
1845
+
1846
+ .input-error::placeholder {
1847
+ color: var(--input-error-border-color);
1848
+ }
1849
+
1841
1850
  `;
1842
1851
  static properties = {
1843
1852
  value: {
@@ -2019,6 +2028,13 @@ class C extends r {
2019
2028
  font-style: normal;
2020
2029
  }
2021
2030
 
2031
+ .container {
2032
+ display: flex;
2033
+ gap: var(--input-gap);
2034
+ flex-direction: row;
2035
+ align-items: center;
2036
+ }
2037
+
2022
2038
  input {
2023
2039
  box-sizing: border-box;
2024
2040
  padding: 0 var(--input-horizontal-inline-padding);
@@ -2071,6 +2087,11 @@ class C extends r {
2071
2087
  outline: 2px solid var(--input-error-border-color);
2072
2088
  }
2073
2089
 
2090
+ .input-error::placeholder {
2091
+ color: var(--input-error-border-color);
2092
+ }
2093
+
2094
+
2074
2095
  .full-width {
2075
2096
  width: 100%;
2076
2097
  }
@@ -2179,8 +2200,10 @@ class C extends r {
2179
2200
  })), this.value);
2180
2201
  render() {
2181
2202
  return e`
2182
- <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}' />
2183
- ${this.shortcut ? e`<cd-button variant='primary' ?disabled='${this.disabled}'>${this.shortcut}</cd-button>` : ""}
2203
+ <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}' />
2205
+ ${this.shortcut ? e`<cd-button variant='primary' ?disabled='${this.disabled}'>${this.shortcut}</cd-button>` : ""}
2206
+ </div>
2184
2207
  `;
2185
2208
  }
2186
2209
  firstUpdated() {
@@ -2236,7 +2259,7 @@ class B extends r {
2236
2259
  static styles = i`
2237
2260
  @font-face {
2238
2261
  font-family: 'GeistMono';
2239
- src: url(${o(b)}) format('woff');
2262
+ src: url(${o(v)}) format('woff');
2240
2263
  font-weight: 100 900;
2241
2264
  font-style: normal;
2242
2265
  }
@@ -2341,7 +2364,7 @@ function Y() {
2341
2364
  typeof window < "u" && !customElements.get("cd-icon-container") && customElements.define("cd-icon-container", B);
2342
2365
  }
2343
2366
  export {
2344
- v as Button,
2367
+ b as Button,
2345
2368
  A as DateComponent,
2346
2369
  f as Header,
2347
2370
  B as IconContainer,