@cargosense/cargo-design-system 1.0.1 → 1.0.5
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/README.md +18 -0
- package/dist/assets/index.cjs.js +1008 -0
- package/dist/assets/index.cjs.js.map +1 -0
- package/dist/assets/{Counter.es.js → index.es.js} +1772 -338
- package/dist/assets/index.es.js.map +1 -0
- package/dist/atoms/index.cjs.js +1 -861
- package/dist/atoms/index.cjs.js.map +1 -1
- package/dist/atoms/index.es.js +33 -1464
- package/dist/atoms/index.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +48 -47
- package/dist/index.es.js.map +1 -1
- package/dist/molecules/index.cjs.js +187 -120
- package/dist/molecules/index.cjs.js.map +1 -1
- package/dist/molecules/index.es.js +1174 -1049
- package/dist/molecules/index.es.js.map +1 -1
- package/dist/register/index.cjs.js +1 -1
- package/dist/register/index.cjs.js.map +1 -1
- package/dist/register/index.es.js +8 -7
- package/dist/register/index.es.js.map +1 -1
- package/package.json +4 -3
- package/dist/assets/Counter.cjs.js +0 -148
- package/dist/assets/Counter.cjs.js.map +0 -1
- package/dist/assets/Counter.es.js.map +0 -1
- package/src/components/index.js +0 -7
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
<a href='${e.o(this.link)}' target="${e.o(this.target)}" tabindex="-1" class="${this.expand}">
|
|
3
|
-
<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}'>
|
|
4
|
-
<slot name='start'></slot> <slot></slot> <slot name='end'></slot>
|
|
5
|
-
</button>
|
|
6
|
-
</a> `}handleClick(t){if(this.disabled){t.preventDefault(),t.stopPropagation();return}this.dispatchEvent(new CustomEvent("button-click",{detail:{value:this.value,name:this.name},bubbles:!0,composed:!0}))}}o(c,"styles",e.i$1`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../fonts/index.cjs.js");const e=require("../assets/index.cjs.js");e.registerIcon();class a extends e.i{static styles=e.i$1`
|
|
7
2
|
@font-face {
|
|
8
3
|
font-family: 'Geist';
|
|
9
4
|
src: url(${e.r(e.fontURL)}) format('woff');
|
|
@@ -119,17 +114,12 @@
|
|
|
119
114
|
outline: none;
|
|
120
115
|
}
|
|
121
116
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
<div class='right'>
|
|
129
|
-
<slot></slot>
|
|
130
|
-
</div>
|
|
131
|
-
</header>
|
|
132
|
-
`}}o(d,"styles",e.i$1`
|
|
117
|
+
`;static properties={variant:{type:String,reflect:!0,converter:t=>["classic","secondary","primary"].includes(t)?t:"classic"},size:{type:String,reflect:!0,attribute:"size",converter:t=>["sm","md","lg"].includes(t)?t:"md"},disabled:{type:Boolean,reflect:!0,attribute:"disabled"},link:{type:String,reflect:!0,attribute:"link"},target:{type:String,reflect:!0,attribute:"target",converter:t=>["_blank","_self","_parent","_top"].includes(t)?t:"_self"},expand:{type:Boolean,reflect:!0,attribute:"full-width",converter:t=>t==""?"expand":""},value:{type:String,reflect:!0,attribute:"value",defaultValue:""},type:{type:String,reflect:!0,attribute:"type",converter:t=>["button","submit","reset"].includes(t)?t:"button"},square:{type:Boolean,reflect:!0,attribute:"square",converter:t=>t===""?"square":""},form:{type:String,reflect:!0,attribute:"form"}};firstUpdated(){const t=document.getElementById(this.form);this.shadowRoot.querySelector("button").addEventListener("click",()=>{t instanceof HTMLFormElement&&(console.log("Form found, submitting..."),t.requestSubmit())})}constructor(){super(),this.link=void 0,this.target=void 0,this.disabled=!1,this.size="md",this.expand="",this._variant="primary",this.name=void 0,this.button="button",this.form=void 0,this.square=""}render(){return e.x`
|
|
118
|
+
<a href='${e.o(this.link)}' target="${e.o(this.target)}" tabindex="-1" class="${this.expand}">
|
|
119
|
+
<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}'>
|
|
120
|
+
<slot name='start'></slot> <slot></slot> <slot name='end'></slot>
|
|
121
|
+
</button>
|
|
122
|
+
</a> `}handleClick(t){if(this.disabled){t.preventDefault(),t.stopPropagation();return}this.dispatchEvent(new CustomEvent("button-click",{detail:{value:this.value,name:this.name},bubbles:!0,composed:!0}))}}function i(){typeof window<"u"&&!customElements.get("cd-button")&&customElements.define("cd-button",a)}e.registerIcon();class n extends e.i{static styles=e.i$1`
|
|
133
123
|
@font-face {
|
|
134
124
|
font-family: 'Geist';
|
|
135
125
|
src: url(${e.r(e.fontURL)}) format('woff');
|
|
@@ -169,11 +159,17 @@
|
|
|
169
159
|
padding: 0 16px;
|
|
170
160
|
|
|
171
161
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
162
|
+
`;static properties={icon:{type:String,reflect:!0,attribute:"icon"},title:{type:String,reflect:!0,attribute:"title"}};constructor(){super(),this.icon="",this.title=""}render(){return e.x`
|
|
163
|
+
<header class="header">
|
|
164
|
+
<div class='left'>
|
|
165
|
+
<cd-icon name="${this.icon}" size="md"></cd-icon>
|
|
166
|
+
<span class="title">${this.title}</span>
|
|
167
|
+
</div>
|
|
168
|
+
<div class='right'>
|
|
169
|
+
<slot></slot>
|
|
170
|
+
</div>
|
|
171
|
+
</header>
|
|
172
|
+
`}}function w(){!customElements.get("cd-header")&&typeof window<"u"&&customElements.define("cd-header",n)}e.registerIcon();class s extends e.i{static formAssociated=!0;static styles=e.i$1`
|
|
177
173
|
@font-face {
|
|
178
174
|
font-family: 'Geist';
|
|
179
175
|
src: url(${e.r(e.fontURL)}) format('woff');
|
|
@@ -295,19 +291,11 @@
|
|
|
295
291
|
|
|
296
292
|
|
|
297
293
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
<div class="items">
|
|
305
|
-
<slot name="start"></slot>
|
|
306
|
-
<slot></slot>
|
|
307
|
-
<slot name="end"></slot>
|
|
308
|
-
</div>
|
|
309
|
-
</nav>
|
|
310
|
-
`}}o(u,"styles",e.i$1`
|
|
294
|
+
`;static properties={name:{type:String,reflect:!0},type:{type:String,reflect:!0,converter:t=>["text","date","time","number","tel","url","phone","email","password"].includes(t)?t:"text"},disabled:{type:Boolean,reflect:!0},placeholder:{type:String,reflect:!0},readOnly:{type:Boolean,reflect:!0,attribute:"read-only"},required:{type:Boolean,reflect:!0},pattern:{type:String},error:{type:Boolean,reflect:!0},value:{type:String,reflect:!0},fullWidth:{type:Boolean,reflect:!0,attribute:"full-width"},variant:{type:String,reflect:!0},size:{type:String,reflect:!0,converter:t=>["sm","md","lg"].includes(t)?t:"md"},iconLeft:{type:String,reflect:!0,attribute:"icon-left"},iconRight:{type:String,reflect:!0,attribute:"icon-right"}};handleKeyPress(t){return this.dispatchEvent(new CustomEvent("keypress",{detail:{value:t.target.value,key:t.keyCode}})),t.key==="Enter"&&this.dispatchEvent(new CustomEvent("onenter",{detail:{value:t.target.value}})),this.dispatchEvent(new CustomEvent("onkeyup",{detail:{value:t.target.value,key:t.keyCode}})),this._internals.setFormValue(t.target.value),this.value=t.target.value,t.target.value}handleInput(t){return this.dispatchEvent(new CustomEvent("input",{detail:{value:t.target.value}})),this._internals.setFormValue(t.target.value),this.value=t.target.value,t.target.value}handleChange(t){return this.dispatchEvent(new CustomEvent("onchange",{detail:{value:t.target.value}})),this._internals.setFormValue(t.target.value),this.value=t.target.value,t.target.value}handleFocus(t){return this.dispatchEvent(new CustomEvent("onblur",{detail:{value:t.target.value}})),this._internals.setFormValue(t.target.value),this.value=t.target.value,t.target}constructor(){super(),this.value="",this.placeholder="",this.pattern="",this.variant="solid",this.size="md",this._internals=this.attachInternals()}render(){return e.x`
|
|
295
|
+
${this.iconLeft?e.x`<span class="icon-left-container"><cd-icon name="${this.iconLeft}" size="sm" class="icon-left"></cd-icon></span>`:""}
|
|
296
|
+
<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}/>
|
|
297
|
+
${this.iconRight?e.x`<span class="icon-right-container"><cd-icon name="${this.iconRight}" size="sm" class="icon-right"></cd-icon></span>`:""}
|
|
298
|
+
`}focus(){if(!this.shadowRoot){console.warn("Input element is not yet connected to the DOM.");return}if(!this.shadowRoot.querySelector("input")){console.warn("Input element is not found in the shadow DOM.");return}this.shadowRoot.querySelector("input").focus()}}function k(){typeof window<"u"&&!customElements.get("cd-input")&&customElements.define("cd-input",s)}e.registerNavImage();class l extends e.i{static styles=e.i$1`
|
|
311
299
|
@font-face {
|
|
312
300
|
font-family: 'Geist';
|
|
313
301
|
src: url(${e.r(e.fontURL)}) format('woff');
|
|
@@ -364,18 +352,19 @@
|
|
|
364
352
|
flex-direction: column;
|
|
365
353
|
gap: 8px;
|
|
366
354
|
}
|
|
367
|
-
|
|
368
|
-
<
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
355
|
+
`;static properties={image:{type:String,reflect:!0,attribute:"image",defaultValue:""},name:{type:String,reflect:!0,attribute:"name",defaultValue:""},small:{type:Boolean,reflect:!0,attribute:"sidebar",defaultValue:!1}};constructor(){super(),this.image="",this.name=""}render(){return e.x`
|
|
356
|
+
<nav class="navbar ${this.small?"small":""}">
|
|
357
|
+
${this.image!=""&&this.name!=""?e.x` <div class="image">
|
|
358
|
+
<cd-nav-image src="${this.image}" alt="Logo" name="${this.name}"></cd-nav-image>
|
|
359
|
+
</div>`:""}
|
|
360
|
+
|
|
361
|
+
<div class="items">
|
|
362
|
+
<slot name="start"></slot>
|
|
363
|
+
<slot></slot>
|
|
364
|
+
<slot name="end"></slot>
|
|
365
|
+
</div>
|
|
366
|
+
</nav>
|
|
367
|
+
`}}function $(){typeof window<"u"&&!customElements.get("cd-nav-bar")&&customElements.define("cd-nav-bar",l)}e.registerCounter();e.registerIcon();class c extends e.i{static styles=e.i$1`
|
|
379
368
|
@font-face {
|
|
380
369
|
font-family: 'Geist';
|
|
381
370
|
src: url('${e.r(e.fontURL)}') format('woff');
|
|
@@ -469,9 +458,18 @@
|
|
|
469
458
|
--icon-stroke: var(--base-color-teal-900);
|
|
470
459
|
--icon-background-primary: var(--base-color-teal-300);
|
|
471
460
|
}
|
|
472
|
-
|
|
461
|
+
`;static properties={name:{type:String,reflect:!0,attribute:"name"},variant:{type:String,reflect:!0,attribute:"variant",converter:t=>["dropdown","link","number"].includes(t)?t:"none"},amount:{type:Number,reflect:!0,attribute:"amount",converter:t=>isNaN(t)?0:t},maxCount:{type:Number,reflect:!0,attribute:"max-count",converter:t=>isNaN(t)?99:t},important:{type:Boolean,reflect:!0,attribute:"important"},link:{type:String,reflect:!0,attribute:"link"},icon:{type:String,reflect:!0,attribute:"icon"},active:{type:Boolean,reflect:!0,attribute:"active"},select:{type:Boolean,reflect:!0,attribute:"selected"}};constructor(){super(),this.icon="",this.name="",this.variant="none",this.amount=0,this.maxCount=99,this.important=!1,this.dropdown=!1,this.active=!1,this.selected=!1,this.link=void 0}render(){return e.x`
|
|
462
|
+
<a href="${e.o(this.link)}" class="nav-item ${this.active?"active":""} ${this.select?"selected":""}" tabindex="0">
|
|
463
|
+
<slot name="before" class="${this.amount>0&&!this.select?"standout":""} ${this.select?"selected":""}"></slot>
|
|
464
|
+
<p>${this.name}</p>
|
|
465
|
+
${this.variant=="dropdown"?e.x`<cd-icon class='caret' name='caret-down' size='sm'></cd-icon>`:""}
|
|
466
|
+
${this.variant=="link"?e.x`<cd-icon name='external' size='sm'></cd-icon>`:""}
|
|
467
|
+
${this.variant=="number"?e.x`<cd-counter count='${this.amount}' max-count='${this.maxCount}' important='${this.important}'></cd-notification-counter>`:""}
|
|
468
|
+
</a>
|
|
469
|
+
<div class="children ${this.active?"children-active":""}">
|
|
473
470
|
<slot></slot>
|
|
474
|
-
|
|
471
|
+
</div>
|
|
472
|
+
`}setSelectState(t){if(typeof t!="boolean")throw new Error("Select must be a boolean value");this.select!==t&&(this.select=t,this.requestUpdate())}setActiveState(t){if(typeof t!="boolean")throw new Error("Active must be a boolean value");this.active!==t&&(this.active=t,this.requestUpdate())}toggleSelect(){this.select=!this.select,this.requestUpdate()}toggleActive(){this.active=!this.active,this.requestUpdate()}}function E(){typeof window<"u"&&!customElements.get("cd-nav-item")&&customElements.define("cd-nav-item",c)}class d extends e.i{static styles=e.i$1`
|
|
475
473
|
@font-face {
|
|
476
474
|
font-family: 'Geist';
|
|
477
475
|
src: url(${e.r(e.fontURL)}) format('woff');
|
|
@@ -483,18 +481,9 @@
|
|
|
483
481
|
width: 100%;
|
|
484
482
|
}
|
|
485
483
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
<div class="${this.content?"tooltip-content":"none"} ${this.text?"":"no-border"}">
|
|
490
|
-
<slot></slot>
|
|
491
|
-
</div>
|
|
492
|
-
<div class="${this.text?"tooltip-text":"none"}">
|
|
493
|
-
${this.text}
|
|
494
|
-
</div>
|
|
495
|
-
</div>
|
|
496
|
-
</div>
|
|
497
|
-
`}}o(v,"styles",e.i$1`
|
|
484
|
+
`;static properties={};constructor(){super()}render(){return e.x`
|
|
485
|
+
<slot></slot>
|
|
486
|
+
`}}function z(){typeof window<"u"&&!customElements.get("cd-table")&&customElements.define("cd-table",d)}class u extends e.i{static styles=e.i$1`
|
|
498
487
|
@font-face {
|
|
499
488
|
font-family: 'Geist';
|
|
500
489
|
src: url(${e.r(e.fontURL)}) format('woff');
|
|
@@ -559,16 +548,18 @@
|
|
|
559
548
|
.no-border {
|
|
560
549
|
border-bottom: none;
|
|
561
550
|
}
|
|
562
|
-
|
|
563
|
-
<div class="
|
|
564
|
-
<div class="
|
|
565
|
-
<
|
|
566
|
-
|
|
551
|
+
`;static properties={text:{type:String,reflect:!0},position:{type:String,reflect:!0,attribute:"position",converter:t=>["top","right","bottom","left"].includes(t)?t:"top"},content:{type:Boolean,reflect:!0}};constructor(){super(),this.text="",this.content=!1,this.position="top"}render(){return e.x`
|
|
552
|
+
<div class="tooltip-container">
|
|
553
|
+
<div class="tooltip ${this.position}">
|
|
554
|
+
<div class="${this.content?"tooltip-content":"none"} ${this.text?"":"no-border"}">
|
|
555
|
+
<slot></slot>
|
|
556
|
+
</div>
|
|
557
|
+
<div class="${this.text?"tooltip-text":"none"}">
|
|
558
|
+
${this.text}
|
|
559
|
+
</div>
|
|
567
560
|
</div>
|
|
568
|
-
<cd-icon name="caret-down" size="sm"></cd-icon>
|
|
569
561
|
</div>
|
|
570
|
-
|
|
571
|
-
`}}o(b,"styles",e.i$1`
|
|
562
|
+
`}}function S(){typeof window<"u"&&!customElements.get("cd-tool-tip")&&customElements.define("cd-tool-tip",u)}e.registerIcon();class p extends e.i{static styles=e.i$1`
|
|
572
563
|
@font-face {
|
|
573
564
|
font-family: 'Geist';
|
|
574
565
|
src: url(${e.r(e.fontURL)}) format('woff');
|
|
@@ -610,11 +601,16 @@
|
|
|
610
601
|
gap: 6px;
|
|
611
602
|
align-items: center;
|
|
612
603
|
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
604
|
+
`;static properties={primaryText:{type:String,reflect:!0,attribute:"name",defaultValue:""},secondaryText:{type:String,reflect:!0,attribute:"org",defaultValue:""},icon:{type:String,reflect:!0,attribute:"icon",defaultValue:""}};constructor(){super(),this.primaryText="",this.secondaryText="",this.icon="hart"}render(){return e.x`
|
|
605
|
+
<div class="profile-stack">
|
|
606
|
+
<div class="text-stack">
|
|
607
|
+
<span class="name">${this.primaryText}</span>
|
|
608
|
+
${this.secondaryText!=""?e.x`<span class="org"><cd-icon name="${this.icon}" size="sm"></cd-icon>${this.secondaryText}</span>`:""}
|
|
609
|
+
</div>
|
|
610
|
+
<cd-icon name="caret-down" size="sm"></cd-icon>
|
|
611
|
+
</div>
|
|
612
|
+
|
|
613
|
+
`}}function A(){typeof window<"u"&&!customElements.get("cd-nav-profile")&&customElements.define("cd-nav-profile",p)}e.registerIcon();class h extends e.i{static styles=e.i$1`
|
|
618
614
|
@font-face {
|
|
619
615
|
font-family: 'Geist';
|
|
620
616
|
src: url(${e.r(e.fontURL)}) format('woff');
|
|
@@ -691,29 +687,11 @@
|
|
|
691
687
|
outline: 2px solid var(--input-border-color-focus);
|
|
692
688
|
border-radius: 4px;
|
|
693
689
|
}
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
<input
|
|
700
|
-
id="search-input"
|
|
701
|
-
type="text"
|
|
702
|
-
class="search-input ${this.collapsed?"collapsed":"expanded"} ${this.iconLeft?"icon-spacing-left":""} ${this.iconRight?"icon-spacing-right":""} ${this.size} ${this.fullWidth&&!this.collapsed?"full-width":""}"
|
|
703
|
-
placeholder="${this.placeholder}"
|
|
704
|
-
.value="${this.value}"
|
|
705
|
-
?disabled="${this.disabled}"
|
|
706
|
-
@input="${this.handleInput}"
|
|
707
|
-
@focus="${this.handleFocus}"
|
|
708
|
-
@blur="${this.handleBlur}"
|
|
709
|
-
@keypress="${this.handleKeyPress}"
|
|
710
|
-
@click="${this.expandInput}"
|
|
711
|
-
name="${this.name}"
|
|
712
|
-
>
|
|
713
|
-
${this.iconRight||this.collapsed?e.x`<span @click="${this.expandInput}" class="${this.collapsed?"icon-collapsed-container":"icon-right-container"}"><cd-icon name="search" class="${this.collapsed?"icon-collapsed "+this.size:"icon-right"}" variant="light-slate"></cd-icon></span>`:""}
|
|
714
|
-
${this.closeIcon?e.x`<span class="${this.collapsed?"hidden":"active"}" id='closeIcon' tabindex='0'><cd-icon name="exit" id="close-icon" class="icon close ${this.collapsed?"hidden-icon":"active-icon"}" @click="${this.collapseInput}"></cd-icon></span>`:""}
|
|
715
|
-
</div>
|
|
716
|
-
`}firstUpdated(){if(!this.shadowRoot){console.warn("Shadow DOM is not available.");return}this.shadowRoot.querySelector(".active")&&(console.log("Adding event listener to active element"),this.shadowRoot.querySelector(".active").addEventListener("keydown",t=>{console.log("test"),t.keyCode===13&&this.collapseInput()}))}focus(){if(!this.shadowRoot){console.warn("Input element is not yet connected to the DOM.");return}if(!this.shadowRoot.querySelector("input")){console.warn("Input element is not found in the shadow DOM.");return}this.shadowRoot.querySelector("#search-input").focus()}expandInput(){this.collapsed&&(this.collapsed=!1,this.shadowRoot.querySelector("#search-input").focus(),this.shadowRoot.querySelector("#close-icon").classList.remove("hidden-icon"),this.shadowRoot.querySelector("#close-icon").classList.remove("hidden"),this.shadowRoot.querySelector("#close-icon").classList.add("active-icon"),this.shadowRoot.querySelector("#close-icon").classList.add("active"),this.requestUpdate(),this.shadowRoot.querySelector("#closeIcon").addEventListener("keydown",t=>{t.key==="Enter"&&this.collapseInput()}))}collapseInput(){this.collapsed||(this.collapsed=!0,this.value="",this.shadowRoot.querySelector("#close-icon").classList.add("hidden-icon"),this.shadowRoot.querySelector("#close-icon").classList.add("hidden"),this.shadowRoot.querySelector("#close-icon").classList.remove("active"),this.shadowRoot.querySelector("#close-icon").classList.remove("active-icon"),this.dispatchEvent(new CustomEvent("collapsed",{detail:{closed:!0},bubbles:!0,composed:!0})),this.requestUpdate())}}o(g,"styles",e.i$1`
|
|
690
|
+
`;static properties={variant:{type:String,reflect:!0,attribute:"variant",converter:t=>["default","dropdown","arrow"].includes(t)?t:"default"},link:{type:String,reflect:!0,attribute:"link"}};constructor(){super(),this.variant="default",this.link=void 0}render(){return e.x`
|
|
691
|
+
${this.variant==="default"?e.x`<a href="${e.o(this.link)}" class="value"><slot></slot></a>`:""}
|
|
692
|
+
${this.variant==="dropdown"?e.x`<span class="dropdown-value"><slot></slot></span>`:""}
|
|
693
|
+
${this.variant==="arrow"?e.x`<a href="${e.o(this.link)}" class="arrow-value"><slot></slot><cd-icon name="arrow" size="sm"></cd-icon></a>`:""}
|
|
694
|
+
`}}function C(){typeof window<"u"&&!customElements.get("cd-value")&&customElements.define("cd-value",h)}e.registerIcon();class b extends e.i{static styles=e.i$1`
|
|
717
695
|
@font-face {
|
|
718
696
|
font-family: 'Geist';
|
|
719
697
|
src: url(${e.r(e.fontURL)}) format('woff');
|
|
@@ -897,15 +875,29 @@
|
|
|
897
875
|
opacity: 0;
|
|
898
876
|
transition: opacity 0.5s ease-in-out;
|
|
899
877
|
}
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
<
|
|
878
|
+
`;static properties={placeholder:{type:String,reflect:!0},value:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},collapsed:{type:Boolean,reflect:!0},iconLeft:{type:Boolean,reflect:!0,attribute:"icon-left"},iconRight:{type:Boolean,reflect:!0,attribute:"icon-right"},size:{type:String,reflect:!0},closeIcon:{type:Boolean,reflect:!0,attribute:"close-icon"},label:{type:String,reflect:!0},labelPosition:{type:String,reflect:!0,attribute:"label-position"},name:{type:String,reflect:!0},fullWidth:{type:Boolean,reflect:!0,attribute:"full-width"}};handleBlur(t){return this.dispatchEvent(new CustomEvent("blur",{detail:{value:t.target.value},bubbles:!0,composed:!0})),this.value=t.target.value,t.target.value}handleFocus(t){return this.expandInput(),this.dispatchEvent(new CustomEvent("focus",{detail:{value:t.target.value},bubbles:!0,composed:!0})),this.value=t.target.value,t.target.value}handleKeyPress(t){return this.dispatchEvent(new CustomEvent("keypress",{detail:{value:t.target.value,key:t.target.keyCode},bubbles:!0,composed:!0})),this.value=t.target.value,t.target.value}handleInput(t){return this.dispatchEvent(new CustomEvent("input",{detail:{value:t.target.value},bubbles:!0,composed:!0})),this.value=t.target.value,t.target.value}constructor(){super(),this.placeholder="Search",this.value="",this.disabled=!1,this.collapsed=!1,this.iconLeft=!1,this.iconRight=!1,this.size="md",this.closeIcon=!1,this.label="",this.labelPosition="left",this.name="",this.fullWidth=!1,this._internals=this.attachInternals()}render(){return e.x`
|
|
879
|
+
<div class="search-container ${this.labelPosition}">
|
|
880
|
+
${this.label?e.x`<label for="search-input">${this.label}</label>`:""}
|
|
881
|
+
${this.iconLeft&&!this.collapsed?e.x`<span class="icon-left-container"><cd-icon name="search" class="icon-left" variant="light-slate"></cd-icon></span>`:""}
|
|
882
|
+
|
|
883
|
+
<input
|
|
884
|
+
id="search-input"
|
|
885
|
+
type="text"
|
|
886
|
+
class="search-input ${this.collapsed?"collapsed":"expanded"} ${this.iconLeft?"icon-spacing-left":""} ${this.iconRight?"icon-spacing-right":""} ${this.size} ${this.fullWidth&&!this.collapsed?"full-width":""}"
|
|
887
|
+
placeholder="${this.placeholder}"
|
|
888
|
+
.value="${this.value}"
|
|
889
|
+
?disabled="${this.disabled}"
|
|
890
|
+
@input="${this.handleInput}"
|
|
891
|
+
@focus="${this.handleFocus}"
|
|
892
|
+
@blur="${this.handleBlur}"
|
|
893
|
+
@keypress="${this.handleKeyPress}"
|
|
894
|
+
@click="${this.expandInput}"
|
|
895
|
+
name="${this.name}"
|
|
896
|
+
>
|
|
897
|
+
${this.iconRight||this.collapsed?e.x`<span @click="${this.expandInput}" class="${this.collapsed?"icon-collapsed-container":"icon-right-container"}"><cd-icon name="search" class="${this.collapsed?"icon-collapsed "+this.size:"icon-right"}" variant="light-slate"></cd-icon></span>`:""}
|
|
898
|
+
${this.closeIcon?e.x`<span class="${this.collapsed?"hidden":"active"}" id='closeIcon' tabindex='0'><cd-icon name="exit" id="close-icon" class="icon close ${this.collapsed?"hidden-icon":"active-icon"}" @click="${this.collapseInput}"></cd-icon></span>`:""}
|
|
906
899
|
</div>
|
|
907
|
-
|
|
908
|
-
`}toggleActive(){this.active=!this.active}setActive(t){if(typeof t!="boolean")throw new TypeError("Active must be a boolean");if(this.disabled)throw new Error("Cannot set active state when the tab is disabled");this.active=t}setDisabled(t){if(typeof t!="boolean")throw new TypeError("Disabled must be a boolean");if(this.active&&t)throw new Error("Cannot disable an active tab");this.disabled=t}}o(m,"styles",e.i$1`
|
|
900
|
+
`}firstUpdated(){if(!this.shadowRoot){console.warn("Shadow DOM is not available.");return}this.shadowRoot.querySelector(".active")&&(console.log("Adding event listener to active element"),this.shadowRoot.querySelector(".active").addEventListener("keydown",t=>{console.log("test"),t.keyCode===13&&this.collapseInput()}))}focus(){if(!this.shadowRoot){console.warn("Input element is not yet connected to the DOM.");return}if(!this.shadowRoot.querySelector("input")){console.warn("Input element is not found in the shadow DOM.");return}this.shadowRoot.querySelector("#search-input").focus()}expandInput(){this.collapsed&&(this.collapsed=!1,this.shadowRoot.querySelector("#search-input").focus(),this.shadowRoot.querySelector("#close-icon").classList.remove("hidden-icon"),this.shadowRoot.querySelector("#close-icon").classList.remove("hidden"),this.shadowRoot.querySelector("#close-icon").classList.add("active-icon"),this.shadowRoot.querySelector("#close-icon").classList.add("active"),this.requestUpdate(),this.shadowRoot.querySelector("#closeIcon").addEventListener("keydown",t=>{t.key==="Enter"&&this.collapseInput()}))}collapseInput(){this.collapsed||(this.collapsed=!0,this.value="",this.shadowRoot.querySelector("#close-icon").classList.add("hidden-icon"),this.shadowRoot.querySelector("#close-icon").classList.add("hidden"),this.shadowRoot.querySelector("#close-icon").classList.remove("active"),this.shadowRoot.querySelector("#close-icon").classList.remove("active-icon"),this.dispatchEvent(new CustomEvent("collapsed",{detail:{closed:!0},bubbles:!0,composed:!0})),this.requestUpdate())}}function T(){typeof window<"u"&&!customElements.get("cd-search")&&customElements.define("cd-search",b)}e.registerIcon();class v extends e.i{static styles=e.i$1`
|
|
909
901
|
@font-face {
|
|
910
902
|
font-family: 'Geist';
|
|
911
903
|
src: url(${e.r(e.fontURL)}) format('woff');
|
|
@@ -1010,11 +1002,15 @@
|
|
|
1010
1002
|
.tab:focus {
|
|
1011
1003
|
outline: 2px solid var(--input-border-color-focus);
|
|
1012
1004
|
}
|
|
1013
|
-
|
|
1014
|
-
<div class=
|
|
1015
|
-
<
|
|
1005
|
+
`;static properties={label:{type:String,reflect:!0},active:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},variant:{type:String,reflect:!0,attribute:"variant",converter:t=>["default","pill","outline"].includes(t)?t:"default"},size:{type:String,reflect:!0}};constructor(){super(),this.label="",this.active=!1,this.disabled=!1,this.variant="default",this.size="md"}render(){return e.x`
|
|
1006
|
+
<div class="tab-outer ${this.variant} ${this.active?"active":""}" >
|
|
1007
|
+
<div class='tab ${this.variant} ${this.size} ${this.disabled?"disabled":""} ${this.active?"active":""}' tabindex="${this.disabled?-1:0}">
|
|
1008
|
+
<slot name="start"></slot>
|
|
1009
|
+
<span class="label">${this.label}</span>
|
|
1010
|
+
<slot name="end"></slot>
|
|
1011
|
+
</div>
|
|
1016
1012
|
</div>
|
|
1017
|
-
`}}
|
|
1013
|
+
`}toggleActive(){this.active=!this.active}setActive(t){if(typeof t!="boolean")throw new TypeError("Active must be a boolean");if(this.disabled)throw new Error("Cannot set active state when the tab is disabled");this.active=t}setDisabled(t){if(typeof t!="boolean")throw new TypeError("Disabled must be a boolean");if(this.active&&t)throw new Error("Cannot disable an active tab");this.disabled=t}}function I(){typeof window<"u"&&!customElements.get("cd-tab")&&customElements.define("cd-tab",v)}class f extends e.i{static styles=e.i$1`
|
|
1018
1014
|
@font-face {
|
|
1019
1015
|
font-family: 'Geist';
|
|
1020
1016
|
src: url(${e.r(e.fontURL)}) format('woff');
|
|
@@ -1037,13 +1033,11 @@
|
|
|
1037
1033
|
|
|
1038
1034
|
|
|
1039
1035
|
|
|
1040
|
-
|
|
1041
|
-
<div class='container'>
|
|
1042
|
-
<
|
|
1043
|
-
${this.shortcut?e.x`<cd-button variant='primary' ?disabled='${this.disabled}'>${this.shortcut}</cd-button>`:""}
|
|
1036
|
+
`;static properties={variant:{type:String,reflect:!0,attribute:"variant",converter:t=>["default","pill","outline"].includes(t)?t:"default",defaultValue:"default"}};render(){return e.x`
|
|
1037
|
+
<div class='container ${this.variant}'>
|
|
1038
|
+
<slot></slot>
|
|
1044
1039
|
</div>
|
|
1045
|
-
|
|
1046
|
-
`}firstUpdated(){if(!this.shadowRoot){console.warn("Shadow DOM not available, DateComponent may not render correctly.");return}this.shadowRoot.querySelector("cd-button")&&this.shadowRoot.querySelector("cd-button").addEventListener("button-click",()=>{this.setValue(this.dateNow()),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))})}dateNow(){let r=new Date().toLocaleString("en-US",{timeZone:this.timezone});return new Date(r).toISOString().slice(0,10)}setValue(r){this.value=r,this._internals.setFormValue(r),this.requestUpdate()}setError(r){if(typeof r!="error"){console.warn("Error text must be a string");return}this.error=r,this._internals.setValidity({customError:r}),this.requestUpdate()}setDisabled(r){this.disabled=r,this._internals.setValidity({customError:r}),this.requestUpdate()}}o(a,"formAssociated",!0),o(a,"distinctTimezones",["Etc/GMT+12","Pacific/Pago_Pago","Pacific/Honolulu","America/Anchorage","America/Los_Angeles","America/Denver","America/Chicago","America/New_York","America/Halifax","America/Argentina/Buenos_Aires","America/Noronha","Atlantic/Azores","Europe/London","Europe/Paris","Europe/Bucharest","Europe/Moscow","Asia/Tehran","Asia/Dubai","Asia/Kabul","Asia/Karachi","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Yangon","Asia/Bangkok","Asia/Shanghai","Australia/Eucla","Asia/Tokyo","Australia/Darwin","Australia/Sydney","Australia/Lord_Howe","Pacific/Noumea","Pacific/Auckland","Pacific/Chatham","Pacific/Tongatapu","Pacific/Kiritimati"]),o(a,"styles",e.i$1`
|
|
1040
|
+
`}}function B(){typeof window<"u"&&!customElements.get("cd-tab-container")&&customElements.define("cd-tab-container",f)}i();class g extends e.i{static formAssociated=!0;static distinctTimezones=["Etc/GMT+12","Pacific/Pago_Pago","Pacific/Honolulu","America/Anchorage","America/Los_Angeles","America/Denver","America/Chicago","America/New_York","America/Halifax","America/Argentina/Buenos_Aires","America/Noronha","Atlantic/Azores","Europe/London","Europe/Paris","Europe/Bucharest","Europe/Moscow","Asia/Tehran","Asia/Dubai","Asia/Kabul","Asia/Karachi","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Yangon","Asia/Bangkok","Asia/Shanghai","Australia/Eucla","Asia/Tokyo","Australia/Darwin","Australia/Sydney","Australia/Lord_Howe","Pacific/Noumea","Pacific/Auckland","Pacific/Chatham","Pacific/Tongatapu","Pacific/Kiritimati"];static styles=e.i$1`
|
|
1047
1041
|
@font-face {
|
|
1048
1042
|
font-family: 'Geist';
|
|
1049
1043
|
src: url(${e.r(e.fontURL)}) format('woff');
|
|
@@ -1135,10 +1129,13 @@
|
|
|
1135
1129
|
flex-direction: row;
|
|
1136
1130
|
align-items: center;
|
|
1137
1131
|
}
|
|
1138
|
-
|
|
1139
|
-
<
|
|
1140
|
-
|
|
1141
|
-
|
|
1132
|
+
`;static properties={value:{type:String,reflect:!0},shortcut:{type:String,reflect:!0},error:{type:Boolean,reflect:!0,attribute:"error"},disabled:{type:Boolean,reflect:!0},form:{type:String,reflect:!0,attribute:"form"},size:{type:String,reflect:!0,attribute:"size",converter:t=>["sm","md","lg"].includes(t)?t:"md"},fullWidth:{type:Boolean,reflect:!0,attribute:"full-width"},variant:{type:String,reflect:!0,attribute:"variant",converter:t=>["dashed","dotted"].includes(t)?t:"default"},timezone:{type:String,reflect:!0,attribute:"timezone",converter:t=>distinctTimezones.includes(t)?t:"America/New_York"}};constructor(){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({customError:this.errorText&&this.errorText.length>0||!1})}handleChange=t=>(this.value=t.target.value,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this.value);handleInput=t=>(this.value=t.target.value,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0})),this.value);handleFocus=t=>(this.value=t.target.value,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("focus",{detail:{value:this.value},bubbles:!0,composed:!0})),this.value);handleBlur=t=>(this.value=t.target.value,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("blur",{detail:{value:this.value},bubbles:!0,composed:!0})),this.value);render(){return e.x`
|
|
1133
|
+
<div class='container'>
|
|
1134
|
+
<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}' />
|
|
1135
|
+
${this.shortcut?e.x`<cd-button variant='primary' ?disabled='${this.disabled}'>${this.shortcut}</cd-button>`:""}
|
|
1136
|
+
</div>
|
|
1137
|
+
|
|
1138
|
+
`}firstUpdated(){if(!this.shadowRoot){console.warn("Shadow DOM not available, DateComponent may not render correctly.");return}this.shadowRoot.querySelector("cd-button")&&this.shadowRoot.querySelector("cd-button").addEventListener("button-click",()=>{this.setValue(this.dateNow()),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))})}dateNow(){let t=new Date().toLocaleString("en-US",{timeZone:this.timezone});return new Date(t).toISOString().slice(0,10)}setValue(t){this.value=t,this._internals.setFormValue(t),this.requestUpdate()}setError(t){if(typeof t!="error"){console.warn("Error text must be a string");return}this.error=t,this._internals.setValidity({customError:t}),this.requestUpdate()}setDisabled(t){this.disabled=t,this._internals.setValidity({customError:t}),this.requestUpdate()}}function R(){typeof window<"u"&&!customElements.get("cd-date")&&customElements.define("cd-date",g)}i();class m extends e.i{static formAssociated=!0;static distinctTimezones=["Etc/GMT+12","Pacific/Pago_Pago","Pacific/Honolulu","America/Anchorage","America/Los_Angeles","America/Denver","America/Chicago","America/New_York","America/Halifax","America/Argentina/Buenos_Aires","America/Noronha","Atlantic/Azores","Europe/London","Europe/Paris","Europe/Bucharest","Europe/Moscow","Asia/Tehran","Asia/Dubai","Asia/Kabul","Asia/Karachi","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Yangon","Asia/Bangkok","Asia/Shanghai","Australia/Eucla","Asia/Tokyo","Australia/Darwin","Australia/Sydney","Australia/Lord_Howe","Pacific/Noumea","Pacific/Auckland","Pacific/Chatham","Pacific/Tongatapu","Pacific/Kiritimati"];static styles=e.i$1`
|
|
1142
1139
|
@font-face {
|
|
1143
1140
|
font-family: 'Geist';
|
|
1144
1141
|
src: url(${e.r(e.fontURL)}) format('woff');
|
|
@@ -1223,5 +1220,75 @@
|
|
|
1223
1220
|
height: 36px;
|
|
1224
1221
|
padding: 0 var(--input-horizontal-inline-padding-sm, 12px);
|
|
1225
1222
|
}
|
|
1226
|
-
|
|
1223
|
+
`;static properties={value:{type:String,reflect:!0},shortcut:{type:String,reflect:!0},error:{type:Boolean,reflect:!0,attribute:"error"},disabled:{type:Boolean,reflect:!0},form:{type:String,reflect:!0,attribute:"form"},size:{type:String,reflect:!0,attribute:"size",converter:t=>["sm","md","lg"].includes(t)?t:"md"},fullWidth:{type:Boolean,reflect:!0,attribute:"full-width"},variant:{type:String,reflect:!0,attribute:"variant",converter:t=>["dashed","dotted"].includes(t)?t:"default"},timezone:{type:String,reflect:!0,attribute:"timezone",converter:t=>distinctTimezones.includes(t)?t:"America/New_York"}};constructor(){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({customError:this.errorText&&this.errorText.length>0||!1})}handleChange=t=>(this.value=t.target.value,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})),this.value);handleInput=t=>(this.value=t.target.value,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0})),this.value);handleFocus=t=>(this.value=t.target.value,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("focus",{detail:{value:this.value},bubbles:!0,composed:!0})),this.value);handleBlur=t=>(this.value=t.target.value,this._internals.setFormValue(this.value),this.dispatchEvent(new CustomEvent("blur",{detail:{value:this.value},bubbles:!0,composed:!0})),this.value);render(){return e.x`
|
|
1224
|
+
<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}' />
|
|
1225
|
+
${this.shortcut?e.x`<cd-button variant='primary' ?disabled='${this.disabled}'>${this.shortcut}</cd-button>`:""}
|
|
1226
|
+
`}firstUpdated(){if(!this.shadowRoot){console.warn("Shadow DOM not available, TimeComponent may not render correctly.");return}this.shadowRoot.querySelector("cd-button")&&this.shadowRoot.querySelector("cd-button").addEventListener("button-click",()=>{this.setValue(this.timeNow()),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))})}timeNow(){console.log(this.timezone);let t=new Date().toLocaleString("en-US",{timeZone:this.timezone||"America/New_York"});if(console.log(t),console.log(t.split(" ")[2]),t.split(" ")[2]==="PM"){let o=t.split(" ");console.log(o),t=Number(o[1].split(":")[0])+12+":"+o[1].split(":")[1]+":"+o[1].split(":")[2]}else t=t.split(" ")[1];return t}setValue(t){this.value=t,this._internals.setFormValue(t),this.requestUpdate()}setError(t){if(typeof t!="error"){console.warn("Error text must be a string");return}this.error=t,this._internals.setValidity({customError:t}),this.requestUpdate()}setDisabled(t){this.disabled=t,this._internals.setValidity({customError:t}),this.requestUpdate()}}function L(){typeof window<"u"&&!customElements.get("cd-time")&&customElements.define("cd-time",m)}e.registerIcon();class x extends e.i{static styles=e.i$1`
|
|
1227
|
+
@font-face {
|
|
1228
|
+
font-family: 'GeistMono';
|
|
1229
|
+
src: url(${e.r(e.fontURL$1)}) format('woff');
|
|
1230
|
+
font-weight: 100 900;
|
|
1231
|
+
font-style: normal;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
:host {
|
|
1235
|
+
height: var(--icon-container-size, 36px);
|
|
1236
|
+
width: var(--icon-container-size, 36px);
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
.icon-container {
|
|
1240
|
+
font-family: 'GeistMono', sans-serif;
|
|
1241
|
+
display: inline-flex;
|
|
1242
|
+
align-items: center;
|
|
1243
|
+
justify-content: center;
|
|
1244
|
+
width: var(--icon-container-size, 36px);
|
|
1245
|
+
height: var(--icon-container-size, 36px);
|
|
1246
|
+
border-radius: var(--icon-container-border-radius, 5px);
|
|
1247
|
+
cursor: pointer;
|
|
1248
|
+
box-sizing: border-box;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
.icon-container.default {
|
|
1252
|
+
background-color: var(--icon-container-default-background, #2D3339);
|
|
1253
|
+
border: 1px solid var(--icon-container-default-border, #1B1F23);
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
.icon-container.primary {
|
|
1257
|
+
background-color: var(--icon-container-primary-background, #747E8B);
|
|
1258
|
+
border: 1px solid var(--icon-container-primary-border, #5C6570);
|
|
1259
|
+
}
|
|
1260
|
+
.icon-container.secondary {
|
|
1261
|
+
background-color: var(--icon-container-secondary-background, #F1F4F6);
|
|
1262
|
+
border: 1px solid var(--icon-container-secondary-border, #F1F4F6);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
.icon-container.exception {
|
|
1266
|
+
background-color: var(--icon-container-exception-background, #C30F21);
|
|
1267
|
+
border: 1px solid var(--icon-container-exception-border, #A20D1C);
|
|
1268
|
+
}
|
|
1269
|
+
.icon-container.sensor {
|
|
1270
|
+
background-color: var(--icon-container-sensor-background, #0F665F);
|
|
1271
|
+
border: 1px solid var(--icon-container-sensor-border, #024C49);
|
|
1272
|
+
}
|
|
1273
|
+
.icon-container.fedex {
|
|
1274
|
+
background-color: var(--icon-container-fedex-background, #572297);
|
|
1275
|
+
border: 1px solid var(--icon-container-fedex-border, #481E7A);
|
|
1276
|
+
}
|
|
1277
|
+
.icon-container.ups {
|
|
1278
|
+
background-color: var(--icon-container-ups-background, #573C3C);
|
|
1279
|
+
border: 1px solid var(--icon-container-ups-border, #352222);
|
|
1280
|
+
}
|
|
1281
|
+
.icon-container.air {
|
|
1282
|
+
background-color: var(--icon-container-air-background, #1D5FAA);
|
|
1283
|
+
border: 1px solid var(--icon-container-air-border, #185294);
|
|
1284
|
+
}
|
|
1285
|
+
.icon-container.ocean {
|
|
1286
|
+
background-color: var(--icon-container-ocean-background, #12378E);
|
|
1287
|
+
border: 1px solid var(--icon-container-ocean-border, #132E6E);
|
|
1288
|
+
}
|
|
1289
|
+
`;static properties={icon:{type:String,reflect:!0,attribute:"icon"},size:{type:String,reflect:!0,attribute:"size"},variant:{type:String,reflect:!0,attribute:"variant"}};constructor(){super(),this.icon=void 0,this.size="md",this.variant="default"}setIcon(t){this.icon=t}_handleIconClick(){this.dispatchEvent(new CustomEvent("click",{bubbles:!0,composed:!0,detail:{icon:this.icon}}))}render(){return e.x`
|
|
1290
|
+
<div class="icon-container ${this.variant}" @click="${this._handleIconClick}">
|
|
1291
|
+
${this.icon?e.x`<cd-icon name="${this.icon}" size="${this.size|"md"}"></cd-icon>`:e.x`<slot></slot>`}
|
|
1292
|
+
</div>
|
|
1293
|
+
`}}function _(){typeof window<"u"&&!customElements.get("cd-icon-container")&&customElements.define("cd-icon-container",x)}exports.Button=a;exports.DateComponent=g;exports.Header=n;exports.IconContainer=x;exports.Input=s;exports.NavBar=l;exports.NavItem=c;exports.NavProfile=p;exports.Search=b;exports.Tab=v;exports.TabContainer=f;exports.Table=d;exports.TimeComponent=m;exports.ToolTip=u;exports.Value=h;exports.registerButton=i;exports.registerDate=R;exports.registerHeader=w;exports.registerIconContainer=_;exports.registerInput=k;exports.registerNavBar=$;exports.registerNavItem=E;exports.registerNavProfile=A;exports.registerSearch=T;exports.registerTab=I;exports.registerTabContainer=B;exports.registerTable=z;exports.registerTime=L;exports.registerToolTip=S;exports.registerValue=C;
|
|
1227
1294
|
//# sourceMappingURL=index.cjs.js.map
|