@cargosense/cargo-design-system 1.0.0 → 1.0.4
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/Counter.cjs.js +148 -0
- package/dist/assets/Counter.cjs.js.map +1 -0
- package/dist/assets/Counter.es.js +794 -0
- package/dist/assets/Counter.es.js.map +1 -0
- package/dist/assets/add-circle.cjs.js +14 -0
- package/dist/assets/add-circle.cjs.js.map +1 -0
- package/dist/assets/add-circle.es.js +17 -0
- package/dist/assets/add-circle.es.js.map +1 -0
- package/dist/assets/air.cjs.js +6 -0
- package/dist/assets/air.cjs.js.map +1 -0
- package/dist/assets/air.es.js +9 -0
- package/dist/assets/air.es.js.map +1 -0
- package/dist/assets/api.cjs.js +11 -0
- package/dist/assets/api.cjs.js.map +1 -0
- package/dist/assets/api.es.js +14 -0
- package/dist/assets/api.es.js.map +1 -0
- package/dist/assets/arrow.cjs.js +5 -0
- package/dist/assets/arrow.cjs.js.map +1 -0
- package/dist/assets/arrow.es.js +8 -0
- package/dist/assets/arrow.es.js.map +1 -0
- package/dist/assets/browser-settings.cjs.js +11 -0
- package/dist/assets/browser-settings.cjs.js.map +1 -0
- package/dist/assets/browser-settings.es.js +14 -0
- package/dist/assets/browser-settings.es.js.map +1 -0
- package/dist/assets/caret-down.cjs.js +5 -0
- package/dist/assets/caret-down.cjs.js.map +1 -0
- package/dist/assets/caret-down.es.js +8 -0
- package/dist/assets/caret-down.es.js.map +1 -0
- package/dist/assets/cargo-design-system.css +1 -0
- package/dist/assets/check.cjs.js +5 -0
- package/dist/assets/check.cjs.js.map +1 -0
- package/dist/assets/check.es.js +8 -0
- package/dist/assets/check.es.js.map +1 -0
- package/dist/assets/configuration.cjs.js +6 -0
- package/dist/assets/configuration.cjs.js.map +1 -0
- package/dist/assets/configuration.es.js +9 -0
- package/dist/assets/configuration.es.js.map +1 -0
- package/dist/assets/copy.cjs.js +11 -0
- package/dist/assets/copy.cjs.js.map +1 -0
- package/dist/assets/copy.es.js +14 -0
- package/dist/assets/copy.es.js.map +1 -0
- package/dist/assets/cost.cjs.js +15 -0
- package/dist/assets/cost.cjs.js.map +1 -0
- package/dist/assets/cost.es.js +18 -0
- package/dist/assets/cost.es.js.map +1 -0
- package/dist/assets/document.cjs.js +8 -0
- package/dist/assets/document.cjs.js.map +1 -0
- package/dist/assets/document.es.js +11 -0
- package/dist/assets/document.es.js.map +1 -0
- package/dist/assets/exception.cjs.js +9 -0
- package/dist/assets/exception.cjs.js.map +1 -0
- package/dist/assets/exception.es.js +12 -0
- package/dist/assets/exception.es.js.map +1 -0
- package/dist/assets/exit.cjs.js +6 -0
- package/dist/assets/exit.cjs.js.map +1 -0
- package/dist/assets/exit.es.js +9 -0
- package/dist/assets/exit.es.js.map +1 -0
- package/dist/assets/external.cjs.js +7 -0
- package/dist/assets/external.cjs.js.map +1 -0
- package/dist/assets/external.es.js +10 -0
- package/dist/assets/external.es.js.map +1 -0
- package/dist/assets/gps-device.cjs.js +12 -0
- package/dist/assets/gps-device.cjs.js.map +1 -0
- package/dist/assets/gps-device.es.js +15 -0
- package/dist/assets/gps-device.es.js.map +1 -0
- package/dist/assets/hart.cjs.js +9 -0
- package/dist/assets/hart.cjs.js.map +1 -0
- package/dist/assets/hart.es.js +12 -0
- package/dist/assets/hart.es.js.map +1 -0
- package/dist/assets/insights.cjs.js +9 -0
- package/dist/assets/insights.cjs.js.map +1 -0
- package/dist/assets/insights.es.js +12 -0
- package/dist/assets/insights.es.js.map +1 -0
- package/dist/assets/integration.cjs.js +13 -0
- package/dist/assets/integration.cjs.js.map +1 -0
- package/dist/assets/integration.es.js +16 -0
- package/dist/assets/integration.es.js.map +1 -0
- package/dist/assets/inventory.cjs.js +16 -0
- package/dist/assets/inventory.cjs.js.map +1 -0
- package/dist/assets/inventory.es.js +19 -0
- package/dist/assets/inventory.es.js.map +1 -0
- package/dist/assets/issue.cjs.js +11 -0
- package/dist/assets/issue.cjs.js.map +1 -0
- package/dist/assets/issue.es.js +14 -0
- package/dist/assets/issue.es.js.map +1 -0
- package/dist/assets/it.cjs.js +11 -0
- package/dist/assets/it.cjs.js.map +1 -0
- package/dist/assets/it.es.js +14 -0
- package/dist/assets/it.es.js.map +1 -0
- package/dist/assets/logistics-contract.cjs.js +14 -0
- package/dist/assets/logistics-contract.cjs.js.map +1 -0
- package/dist/assets/logistics-contract.es.js +17 -0
- package/dist/assets/logistics-contract.es.js.map +1 -0
- package/dist/assets/ocean.cjs.js +9 -0
- package/dist/assets/ocean.cjs.js.map +1 -0
- package/dist/assets/ocean.es.js +12 -0
- package/dist/assets/ocean.es.js.map +1 -0
- package/dist/assets/package-with-qr.cjs.js +28 -0
- package/dist/assets/package-with-qr.cjs.js.map +1 -0
- package/dist/assets/package-with-qr.es.js +31 -0
- package/dist/assets/package-with-qr.es.js.map +1 -0
- package/dist/assets/package.cjs.js +10 -0
- package/dist/assets/package.cjs.js.map +1 -0
- package/dist/assets/package.es.js +13 -0
- package/dist/assets/package.es.js.map +1 -0
- package/dist/assets/phone-with-qr.cjs.js +11 -0
- package/dist/assets/phone-with-qr.cjs.js.map +1 -0
- package/dist/assets/phone-with-qr.es.js +14 -0
- package/dist/assets/phone-with-qr.es.js.map +1 -0
- package/dist/assets/ping.cjs.js +7 -0
- package/dist/assets/ping.cjs.js.map +1 -0
- package/dist/assets/ping.es.js +10 -0
- package/dist/assets/ping.es.js.map +1 -0
- package/dist/assets/playbook.cjs.js +8 -0
- package/dist/assets/playbook.cjs.js.map +1 -0
- package/dist/assets/playbook.es.js +11 -0
- package/dist/assets/playbook.es.js.map +1 -0
- package/dist/assets/plus.cjs.js +6 -0
- package/dist/assets/plus.cjs.js.map +1 -0
- package/dist/assets/plus.es.js +9 -0
- package/dist/assets/plus.es.js.map +1 -0
- package/dist/assets/pm.cjs.js +10 -0
- package/dist/assets/pm.cjs.js.map +1 -0
- package/dist/assets/pm.es.js +13 -0
- package/dist/assets/pm.es.js.map +1 -0
- package/dist/assets/qr-code.cjs.js +16 -0
- package/dist/assets/qr-code.cjs.js.map +1 -0
- package/dist/assets/qr-code.es.js +19 -0
- package/dist/assets/qr-code.es.js.map +1 -0
- package/dist/assets/search.cjs.js +6 -0
- package/dist/assets/search.cjs.js.map +1 -0
- package/dist/assets/search.es.js +9 -0
- package/dist/assets/search.es.js.map +1 -0
- package/dist/assets/sensors.cjs.js +11 -0
- package/dist/assets/sensors.cjs.js.map +1 -0
- package/dist/assets/sensors.es.js +14 -0
- package/dist/assets/sensors.es.js.map +1 -0
- package/dist/assets/server.cjs.js +14 -0
- package/dist/assets/server.cjs.js.map +1 -0
- package/dist/assets/server.es.js +17 -0
- package/dist/assets/server.es.js.map +1 -0
- package/dist/assets/sustainablity.cjs.js +17 -0
- package/dist/assets/sustainablity.cjs.js.map +1 -0
- package/dist/assets/sustainablity.es.js +20 -0
- package/dist/assets/sustainablity.es.js.map +1 -0
- package/dist/assets/task-list.cjs.js +20 -0
- package/dist/assets/task-list.cjs.js.map +1 -0
- package/dist/assets/task-list.es.js +23 -0
- package/dist/assets/task-list.es.js.map +1 -0
- package/dist/assets/temperature-device.cjs.js +9 -0
- package/dist/assets/temperature-device.cjs.js.map +1 -0
- package/dist/assets/temperature-device.es.js +12 -0
- package/dist/assets/temperature-device.es.js.map +1 -0
- package/dist/assets/truck.cjs.js +13 -0
- package/dist/assets/truck.cjs.js.map +1 -0
- package/dist/assets/truck.es.js +16 -0
- package/dist/assets/truck.es.js.map +1 -0
- package/dist/assets/users.cjs.js +10 -0
- package/dist/assets/users.cjs.js.map +1 -0
- package/dist/assets/users.es.js +13 -0
- package/dist/assets/users.es.js.map +1 -0
- package/dist/assets/warehouse.cjs.js +12 -0
- package/dist/assets/warehouse.cjs.js.map +1 -0
- package/dist/assets/warehouse.es.js +15 -0
- package/dist/assets/warehouse.es.js.map +1 -0
- package/dist/assets/water-device.cjs.js +8 -0
- package/dist/assets/water-device.cjs.js.map +1 -0
- package/dist/assets/water-device.es.js +11 -0
- package/dist/assets/water-device.es.js.map +1 -0
- package/dist/atoms/index.cjs.js +862 -0
- package/dist/atoms/index.cjs.js.map +1 -0
- package/dist/atoms/index.es.js +1484 -0
- package/dist/atoms/index.es.js.map +1 -0
- package/dist/fonts/Geist-Italic[wght].ttf +0 -0
- package/dist/fonts/Geist-Regular.woff +0 -0
- package/dist/fonts/Geist-Regular.woff2 +0 -0
- package/dist/fonts/GeistMono-Italic[wght].ttf +0 -0
- package/dist/fonts/GeistMono[wght].ttf +0 -0
- package/dist/fonts/Geist[wght].ttf +0 -0
- package/dist/fonts/index.cjs.js +2 -0
- package/dist/fonts/index.cjs.js.map +1 -0
- package/dist/fonts/index.es.js +2 -0
- package/dist/fonts/index.es.js.map +1 -0
- package/dist/icons/index.cjs.js +2 -0
- package/dist/icons/index.cjs.js.map +1 -0
- package/dist/icons/index.es.js +45 -0
- package/dist/icons/index.es.js.map +1 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.es.js +69 -0
- package/dist/index.es.js.map +1 -0
- package/dist/molecules/index.cjs.js +1227 -0
- package/dist/molecules/index.cjs.js.map +1 -0
- package/dist/molecules/index.es.js +2264 -0
- package/dist/molecules/index.es.js.map +1 -0
- package/dist/register/index.cjs.js +2 -0
- package/dist/register/index.cjs.js.map +1 -0
- package/dist/register/index.es.js +45 -0
- package/dist/register/index.es.js.map +1 -0
- package/package.json +4 -3
- package/src/components/index.js +0 -7
|
@@ -0,0 +1,1227 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../assets/Counter.cjs.js");require("../fonts/index.cjs.js");e.registerIcon();class a extends e.i{static styles=e.i$1`
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: 'Geist';
|
|
4
|
+
src: url(${e.r(e.fontURL)}) format('woff');
|
|
5
|
+
font-weight: 100 900;
|
|
6
|
+
font-style: normal;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.button {
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
text-decoration: none;
|
|
12
|
+
font-family: 'Geist', sans-serif;
|
|
13
|
+
height:40px;
|
|
14
|
+
width:fit-content;
|
|
15
|
+
padding: var(--button-vertical-padding, 10px) var(--button-horizontal-padding, 18px);
|
|
16
|
+
|
|
17
|
+
background-color: var(--button-background-default, var(--base-color-slate-900));
|
|
18
|
+
color: var(--button-text-default, var(--base-color-white));
|
|
19
|
+
font-size: var(--button-text-size, 16px);
|
|
20
|
+
border: 1px solid var(--button-border-default, var(--base-color-slate-950));
|
|
21
|
+
border-radius: var(--button-border-radius, 6px);
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: var(--button-gap, 8px);
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
--icon-stroke: var(--button-icon-default, var(--base-color-teal-300));
|
|
27
|
+
--icon-background-page: var(--button-background-default, var(--base-color-slate-900));
|
|
28
|
+
--icon-background-primary: var(--base-color-teal-400);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.classic {
|
|
32
|
+
--button-text-default: var(--base-color-teal-50);
|
|
33
|
+
--button-background-default: var(--base-color-teal-600);
|
|
34
|
+
--button-background-hover: var(--base-color-teal-500);
|
|
35
|
+
--button-background-disabled: var(--base-color-slate-300);
|
|
36
|
+
--button-border-default: var(--base-color-teal-700);
|
|
37
|
+
--button-text-disabled: var(--base-color-slate-100);
|
|
38
|
+
--button-border-disabled: var(--base-color-slate-500);
|
|
39
|
+
--button-icon-disabled: var(--base-color-slate-200)
|
|
40
|
+
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.secondary {
|
|
44
|
+
--button-background-disabled: var(--button-secondary-background-disabled);
|
|
45
|
+
--button-text-disabled: var(--button-secondary-text-disabled);
|
|
46
|
+
--button-border-disabled: var(--button-secondary-border-disabled);
|
|
47
|
+
--button-text-hover: var(--button-secondary-text-hover);
|
|
48
|
+
--button-background-hover: var(--button-secondary-background-hover);
|
|
49
|
+
--button-text-default: var(--button-secondary-text-default);
|
|
50
|
+
--button-background-default: var(--button-secondary-background-default);
|
|
51
|
+
--button-border-default: var(--button-secondary-border-default);
|
|
52
|
+
--button-border-hover: var(--button-secondary-border-hover);
|
|
53
|
+
--button-icon-default: var(--button-secondary-icon-default);
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.button:hover {
|
|
58
|
+
background-color: var(--button-background-hover, var(--base-color-slate-800));
|
|
59
|
+
color: var(--button-text-hover, var(--base-color-white));
|
|
60
|
+
border-color: var(--button-border-hover, var(--base-color-slate-900));
|
|
61
|
+
transition: background-color 0.2s ease-in-out;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.button:focus {
|
|
65
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
66
|
+
outline-offset: var(--button-focus-offset, 1px);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.disabled {
|
|
70
|
+
background-color: var(--button-background-disabled, var(--base-color-slate-400));
|
|
71
|
+
color: var(--button-text-disabled, var(--base-color-slate-200));
|
|
72
|
+
border-color: var(--button-border-disabled, var(--base-color-slate-450));
|
|
73
|
+
cursor: not-allowed;
|
|
74
|
+
--icon-stroke: var(--button-icon-disabled, var(--base-color-slate-300));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.disabled:hover {
|
|
78
|
+
background-color: var(--button-background-disabled, var(--base-color-slate-400));
|
|
79
|
+
color: var(--button-text-disabled, var(--base-color-slate-200));
|
|
80
|
+
border-color: var(--button-border-disabled, var(--base-color-slate-450));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.disabled:focus {
|
|
84
|
+
outline: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.sm {
|
|
88
|
+
height:36px;
|
|
89
|
+
padding: 0 var(--button-horizontal-padding-sm, 12px);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.lg {
|
|
93
|
+
height:50px;
|
|
94
|
+
padding: 0 var(--button-horizontal-padding-lg, 24px);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.square {
|
|
98
|
+
padding: 0;
|
|
99
|
+
aspect-ratio: 1 / 1;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.expand {
|
|
104
|
+
width: 100%;
|
|
105
|
+
padding-left: 0;
|
|
106
|
+
padding-right: 0;
|
|
107
|
+
flex-grow: 1;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
a {
|
|
112
|
+
text-decoration: none;
|
|
113
|
+
color: inherit;
|
|
114
|
+
outline: none;
|
|
115
|
+
}
|
|
116
|
+
|
|
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`
|
|
123
|
+
@font-face {
|
|
124
|
+
font-family: 'Geist';
|
|
125
|
+
src: url(${e.r(e.fontURL)}) format('woff');
|
|
126
|
+
font-weight: 100 900;
|
|
127
|
+
font-style: normal;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:host {
|
|
131
|
+
width: 100%;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.header {
|
|
135
|
+
font-family: 'Geist', sans-serif;
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: space-between;
|
|
139
|
+
background-color: var(--header-background-color, var(--base-color-white));
|
|
140
|
+
border-bottom: 1px solid var(--header-border-color, var(--base-color-stone-200));
|
|
141
|
+
width: 100%;
|
|
142
|
+
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.left {
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
font-size: var(--header-text-size, 16px);
|
|
149
|
+
font-weight: var(--header-text-weight, 500);
|
|
150
|
+
gap: var(--header-gap, 16px);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
cd-icon {
|
|
154
|
+
padding: var(--header-icon-padding) 0 var(--header-icon-padding) var(--header-icon-padding);
|
|
155
|
+
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.right {
|
|
159
|
+
padding: 0 16px;
|
|
160
|
+
|
|
161
|
+
}
|
|
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 y(){!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`
|
|
173
|
+
@font-face {
|
|
174
|
+
font-family: 'Geist';
|
|
175
|
+
src: url(${e.r(e.fontURL)}) format('woff');
|
|
176
|
+
font-weight: 100 900;
|
|
177
|
+
font-style: normal;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
:host {
|
|
181
|
+
width: 100%;
|
|
182
|
+
display: block;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
div {
|
|
186
|
+
font-family: 'Geist';
|
|
187
|
+
margin: var(--input-gap) 0;
|
|
188
|
+
width: 100%;
|
|
189
|
+
padding: var(--input-container-padding, 0);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
input {
|
|
193
|
+
box-sizing: border-box;
|
|
194
|
+
padding: 0 var(--input-horizontal-inline-padding);
|
|
195
|
+
height: 40px;
|
|
196
|
+
border-width: var(--input-border-width);
|
|
197
|
+
border-style: var(--input-border-style);
|
|
198
|
+
border-color: var(--input-border-color);
|
|
199
|
+
border-radius: var(--input-border-radius);
|
|
200
|
+
background-color: var(--input-background-color);
|
|
201
|
+
color: var(--input-text-color);
|
|
202
|
+
width: var(--input-width);
|
|
203
|
+
font-size: var(--input-font-size);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
input:hover {
|
|
207
|
+
border-color: var(--input-border-color-hover);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
input:focus {
|
|
211
|
+
background-color: var(--input-background-color-focus);
|
|
212
|
+
color: var(--input-text-color-focus);
|
|
213
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
214
|
+
border: 1px solid var(--input-border-color-focus);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.disabled {
|
|
218
|
+
background-color: var(--input-background-color-disabled);
|
|
219
|
+
color: var(--input-text-color-disabled);
|
|
220
|
+
border-color: var(--input-border-color-disabled);
|
|
221
|
+
cursor: not-allowed;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.disabled:hover {
|
|
225
|
+
outline: none;
|
|
226
|
+
border-color: var(--input-border-color-disabled);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.input-error {
|
|
230
|
+
border-color: var(--input-error-border-color);
|
|
231
|
+
color: var(--input-error-border-color);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.input-error:hover {
|
|
235
|
+
border-color: var(--input-error-border-hover-color);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.input-error:focus {
|
|
239
|
+
border-color: var(--input-error-border-color);
|
|
240
|
+
outline: 2px solid var(--input-error-border-color);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.full-width {
|
|
244
|
+
width: 100%;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.dashed {
|
|
248
|
+
border-style: dashed;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.dotted {
|
|
252
|
+
border-style: dotted;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.lg {
|
|
256
|
+
height: 50px;
|
|
257
|
+
padding: 0 var(--input-horizontal-inline-padding-lg, 24px);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.sm {
|
|
261
|
+
height: 36px;
|
|
262
|
+
padding: 0 var(--input-horizontal-inline-padding-sm, 12px);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.icon-left-container, .icon-right-container {
|
|
266
|
+
position: relative;
|
|
267
|
+
}
|
|
268
|
+
.icon-left, .icon-right {
|
|
269
|
+
position: absolute;
|
|
270
|
+
top: calc(50% + 1px);
|
|
271
|
+
transform: translateY(-50%);
|
|
272
|
+
pointer-events: none;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.icon-left {
|
|
276
|
+
left: 10px;
|
|
277
|
+
}
|
|
278
|
+
.icon-right {
|
|
279
|
+
right: 10px;
|
|
280
|
+
}
|
|
281
|
+
.icon-left-container cd-icon, .icon-right-container cd-icon {
|
|
282
|
+
color: var(--input-icon-color, var(--text-secondary-color));
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.icon-spacing-left {
|
|
286
|
+
padding-left: calc(var(--input-horizontal-inline-padding) + 20px);
|
|
287
|
+
}
|
|
288
|
+
.icon-spacing-right {
|
|
289
|
+
padding-right: calc(var(--input-horizontal-inline-padding) + 20px);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
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 w(){typeof window<"u"&&!customElements.get("cd-input")&&customElements.define("cd-input",s)}e.registerNavImage();class l extends e.i{static styles=e.i$1`
|
|
299
|
+
@font-face {
|
|
300
|
+
font-family: 'Geist';
|
|
301
|
+
src: url(${e.r(e.fontURL)}) format('woff');
|
|
302
|
+
font-weight: 100 900;
|
|
303
|
+
font-style: normal;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.navbar {
|
|
307
|
+
font-family: 'Geist', sans-serif;
|
|
308
|
+
width: 300px;
|
|
309
|
+
height: 100%;
|
|
310
|
+
display: flex;
|
|
311
|
+
flex-direction: column;
|
|
312
|
+
border-right: 1px solid var(--base-color-stone-200);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.items {
|
|
316
|
+
flex-grow: 1;
|
|
317
|
+
display: flex;
|
|
318
|
+
flex-direction: column;
|
|
319
|
+
gap: 8px;
|
|
320
|
+
padding: 32px;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.image {
|
|
324
|
+
padding: 32px;
|
|
325
|
+
border-bottom: 1px solid var(--base-color-stone-200);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.small {
|
|
329
|
+
width: 225px;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.small .items {
|
|
333
|
+
padding: 16px;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
slot[name="start"] {
|
|
337
|
+
display: flex;
|
|
338
|
+
flex-direction: column;
|
|
339
|
+
gap: 4px;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
slot[name="end"] {
|
|
343
|
+
display: flex;
|
|
344
|
+
flex-direction: column;
|
|
345
|
+
gap: 4px;
|
|
346
|
+
flex-grow: 1;
|
|
347
|
+
justify-content: flex-end;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.small ::slotted(div) {
|
|
351
|
+
display: flex;
|
|
352
|
+
flex-direction: column;
|
|
353
|
+
gap: 8px;
|
|
354
|
+
}
|
|
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 k(){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`
|
|
368
|
+
@font-face {
|
|
369
|
+
font-family: 'Geist';
|
|
370
|
+
src: url('${e.r(e.fontURL)}') format('woff');
|
|
371
|
+
font-weight: 100 900;
|
|
372
|
+
font-style: normal;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.nav-item {
|
|
376
|
+
vertical-trim: trim;
|
|
377
|
+
flex-grow: 1;
|
|
378
|
+
font-family: Geist, sans-serif;
|
|
379
|
+
position: relative;
|
|
380
|
+
display: flex;
|
|
381
|
+
align-items: center;
|
|
382
|
+
padding: var(--nav-item-vertical-padding) var(--nav-item-horizontal-padding);
|
|
383
|
+
border-radius: var(--nav-item-border-radius);
|
|
384
|
+
color: var(--nav-item-text-color);
|
|
385
|
+
text-decoration: none;
|
|
386
|
+
font-size: var(--nav-item-font-size);
|
|
387
|
+
font-weight: 400;
|
|
388
|
+
gap: var(--nav-item-gap);
|
|
389
|
+
line-height: 0;
|
|
390
|
+
background-color: transparent;
|
|
391
|
+
transition: background-color 0.2s ease-in-out;
|
|
392
|
+
margin-bottom: 4px; /* Simulate the gap between the parent and the child thats between every child, see .children-active gap */
|
|
393
|
+
cursor: pointer;
|
|
394
|
+
--icon-stroke: var(--base-color-slate-600);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.nav-item:hover {
|
|
398
|
+
background-color: var(--nav-item-hover-background-color, var(--base-color-slate-50));
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.nav-item:focus {
|
|
402
|
+
background-color: var(--nav-item-hover-background-color, var(--base-color-slate-50));
|
|
403
|
+
outline-offset: 0;
|
|
404
|
+
border: none;
|
|
405
|
+
outline: 1px solid var(--input-border-color-focus);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.nav-item .caret {
|
|
409
|
+
transform: rotate(270deg);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.active {
|
|
413
|
+
background-color: var(--nav-item-hover-background-color, var(--base-color-slate-50));
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.active .caret {
|
|
417
|
+
transform: rotate(0deg);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.nav-item p {
|
|
421
|
+
flex-grow: 1;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.children {
|
|
425
|
+
display: none;
|
|
426
|
+
padding-left: calc(var(--nav-item-horizontal-padding) + 32px); /* 32px for icon width */
|
|
427
|
+
padding-right: calc(-var(--nav-item-horizontal-padding) - 32px);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.children-active {
|
|
431
|
+
display: flex;
|
|
432
|
+
flex-grow: 1;
|
|
433
|
+
flex-direction: column;
|
|
434
|
+
gap: 4px;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.selected {
|
|
438
|
+
background-color: var(--nav-item-selected-background-color, var(--base-color-grey-900));
|
|
439
|
+
color: var(--nav-item-selected-text-color, var(--base-color-white));
|
|
440
|
+
/*--icon-stroke: var(--base-color-teal-500);
|
|
441
|
+
--icon-background-page: var(--nav-item-selected-background-color, var(--base-color-grey-900));
|
|
442
|
+
--icon-background-primary: #00AB8E40;*/
|
|
443
|
+
--icon-stroke: var(--base-color-white);
|
|
444
|
+
--icon-background-page: var(--nav-item-selected-background-color, var(--base-color-grey-900));
|
|
445
|
+
--icon-background-primary: var(--nav-item-selected-background-color, var(--base-color-grey-900));
|
|
446
|
+
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.selected:hover {
|
|
450
|
+
background-color: var(--nav-item-selected-background-color, var(--base-color-grey-900));
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.selected:focus {
|
|
454
|
+
background-color: var(--nav-item-selected-background-color, var(--base-color-grey-900));
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.standout {
|
|
458
|
+
--icon-stroke: var(--base-color-teal-900);
|
|
459
|
+
--icon-background-primary: var(--base-color-teal-300);
|
|
460
|
+
}
|
|
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":""}">
|
|
470
|
+
<slot></slot>
|
|
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 $(){typeof window<"u"&&!customElements.get("cd-nav-item")&&customElements.define("cd-nav-item",c)}class d extends e.i{static styles=e.i$1`
|
|
473
|
+
@font-face {
|
|
474
|
+
font-family: 'Geist';
|
|
475
|
+
src: url(${e.r(e.fontURL)}) format('woff');
|
|
476
|
+
font-weight: 100 900;
|
|
477
|
+
font-style: normal;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
:host {
|
|
481
|
+
width: 100%;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
`;static properties={};constructor(){super()}render(){return e.x`
|
|
485
|
+
<slot></slot>
|
|
486
|
+
`}}function E(){typeof window<"u"&&!customElements.get("cd-table")&&customElements.define("cd-table",d)}class u extends e.i{static styles=e.i$1`
|
|
487
|
+
@font-face {
|
|
488
|
+
font-family: 'Geist';
|
|
489
|
+
src: url(${e.r(e.fontURL)}) format('woff');
|
|
490
|
+
font-weight: 100 900;
|
|
491
|
+
font-style: normal;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.tooltip-container {
|
|
495
|
+
position: relative;
|
|
496
|
+
z-index: 3;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.tooltip {
|
|
500
|
+
width: max-content;
|
|
501
|
+
display: flex;
|
|
502
|
+
flex-direction: column;
|
|
503
|
+
align-items: center;
|
|
504
|
+
|
|
505
|
+
background-color: var(--tooltip-background-color, var(--base-color-slate-50));
|
|
506
|
+
border: 1px solid var(--tooltip-border-color, var(--base-color-slate-400));
|
|
507
|
+
border-radius: var(--tooltip-border-radius, 4px);
|
|
508
|
+
box-shadow: 6px 6px 12px 0px #0000001F;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.tooltip::after {
|
|
512
|
+
content: '';
|
|
513
|
+
position: absolute;
|
|
514
|
+
width:10px;
|
|
515
|
+
height: 10px;
|
|
516
|
+
background-color:var(--tooltip-background-color, var(--base-color-slate-50));
|
|
517
|
+
border-width: 0 1px 1px 0;
|
|
518
|
+
border-style: solid;
|
|
519
|
+
border-color: var(--tooltip-border-color, var(--base-color-slate-400));
|
|
520
|
+
transform: rotate(45deg);
|
|
521
|
+
z-index: 1;
|
|
522
|
+
margin: 0 auto;
|
|
523
|
+
top: calc(100% - 6px);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.tooltip-content {
|
|
527
|
+
display: grid;
|
|
528
|
+
grid-template-columns: auto auto;
|
|
529
|
+
gap: var(--tooltip-gap, 6px);
|
|
530
|
+
padding: var(--tooltip-padding, 8px);
|
|
531
|
+
border-bottom: 1px solid var(--tooltip-border-color, var(--base-color-slate-400));
|
|
532
|
+
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.tooltip-text {
|
|
536
|
+
display: flex;
|
|
537
|
+
flex-direction: column;
|
|
538
|
+
color: var(--tooltip-text-color, var(--text-secondary-color));
|
|
539
|
+
font-size: var(--tooltip-text-font-size, 12px);
|
|
540
|
+
font-weight: var(--tooltip-text-font-weight, 400);
|
|
541
|
+
padding: var(--tooltip-text-padding,8px);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.none {
|
|
545
|
+
display: none;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
.no-border {
|
|
549
|
+
border-bottom: none;
|
|
550
|
+
}
|
|
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>
|
|
560
|
+
</div>
|
|
561
|
+
</div>
|
|
562
|
+
`}}function z(){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`
|
|
563
|
+
@font-face {
|
|
564
|
+
font-family: 'Geist';
|
|
565
|
+
src: url(${e.r(e.fontURL)}) format('woff');
|
|
566
|
+
font-weight: 100 900;
|
|
567
|
+
font-style: normal;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.profile-stack {
|
|
571
|
+
font-family: 'Geist', sans-serif;
|
|
572
|
+
background-color: var(--nav-profile-background-color, var(--base-color-slate-50));
|
|
573
|
+
color: var(--nav-profile-text-color, var(--text-primary-color));
|
|
574
|
+
border: 1px solid var(--nav-profile-border-color, var(--base-color-slate-200));
|
|
575
|
+
border-radius: var(--nav-profile-border-radius, 8px);
|
|
576
|
+
padding: var(--nav-profile-padding, 17px 14px);
|
|
577
|
+
display: flex;
|
|
578
|
+
width: fix-content;
|
|
579
|
+
flex-direction: row;
|
|
580
|
+
align-items: center;
|
|
581
|
+
gap: var(--nav-profile-gap, 16px);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.text-stack {
|
|
585
|
+
display: flex;
|
|
586
|
+
flex-direction: column;
|
|
587
|
+
flex-grow: 1;
|
|
588
|
+
gap: 8px;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.name {
|
|
592
|
+
font-size: var(--nav-profile-name-font-size, 14px);
|
|
593
|
+
font-weight: var(--nav-profile-name-font-weight, 500);
|
|
594
|
+
line-height: 100%;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.org {
|
|
598
|
+
font-size: var(--nav-profile-org-font-size, 14px);
|
|
599
|
+
font-weight: var(--nav-profile-org-font-weight, 400);
|
|
600
|
+
display: flex;
|
|
601
|
+
gap: 6px;
|
|
602
|
+
align-items: center;
|
|
603
|
+
}
|
|
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 S(){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`
|
|
614
|
+
@font-face {
|
|
615
|
+
font-family: 'Geist';
|
|
616
|
+
src: url(${e.r(e.fontURL)}) format('woff');
|
|
617
|
+
font-weight: 100 900;
|
|
618
|
+
font-style: normal;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
a {
|
|
622
|
+
text-decoration: none;
|
|
623
|
+
color: var(--key-value-value-color, var(--text-primary-color));
|
|
624
|
+
font-weight: var(--key-value-value-font-weight);
|
|
625
|
+
font-size: var(--key-value-font-size, 14px);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.arrow-value {
|
|
629
|
+
padding: 3px;
|
|
630
|
+
font-family: 'Geist', sans-serif;
|
|
631
|
+
color: var(--key-value-value-color, var(--text-primary-color));
|
|
632
|
+
font-weight: var(--key-value-value-font-weight);
|
|
633
|
+
font-size: var(--key-value-font-size, 14px);
|
|
634
|
+
display: inline-flex;
|
|
635
|
+
flex-direction: row;
|
|
636
|
+
align-items: center;
|
|
637
|
+
cursor: pointer;
|
|
638
|
+
gap: 6px;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
.arrow-value cd-icon {
|
|
642
|
+
transform: translateX(-0.25em);
|
|
643
|
+
opacity: 0;
|
|
644
|
+
transition: transform 0.3s ease, opacity 0.3s ease;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.arrow-value:hover cd-icon {
|
|
648
|
+
transform: translateX(0);
|
|
649
|
+
opacity: 1;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.value {
|
|
653
|
+
padding: 3px;
|
|
654
|
+
font-family: 'Geist', sans-serif;
|
|
655
|
+
color: var(--key-value-value-color, var(--text-primary-color));
|
|
656
|
+
font-weight: var(--key-value-value-font-weight);
|
|
657
|
+
font-size: var(--key-value-font-size, 14px);
|
|
658
|
+
cursor: auto;
|
|
659
|
+
}
|
|
660
|
+
.value:focus, .arrow-value:focus {
|
|
661
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
662
|
+
border-radius: 4px;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.arrow-value:focus cd-icon {
|
|
666
|
+
transform: translateX(0);
|
|
667
|
+
opacity: 1;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
::slotted(select) {
|
|
671
|
+
color: var(--key-value-value-color, var(--text-primary-color));
|
|
672
|
+
font-weight: var(--key-value-value-font-weight);
|
|
673
|
+
font-size: var(--key-value-font-size, 14px);
|
|
674
|
+
cursor: pointer;
|
|
675
|
+
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.4286 6.13289L7.99997 9.56151L4.57135 6.13289' stroke='%235C6570' stroke-width='1.5'/%3E%3C/svg%3E%0A");
|
|
676
|
+
background-repeat: no-repeat;
|
|
677
|
+
background-size: 16px;
|
|
678
|
+
background-position-x: 100%;
|
|
679
|
+
background-position-y: center;
|
|
680
|
+
padding: 3px 20px 3px 3px;
|
|
681
|
+
background-color: transparent;
|
|
682
|
+
border: none;
|
|
683
|
+
appearance: none;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
::slotted(select:focus) {
|
|
687
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
688
|
+
border-radius: 4px;
|
|
689
|
+
}
|
|
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 A(){typeof window<"u"&&!customElements.get("cd-value")&&customElements.define("cd-value",h)}e.registerIcon();class v extends e.i{static styles=e.i$1`
|
|
695
|
+
@font-face {
|
|
696
|
+
font-family: 'Geist';
|
|
697
|
+
src: url(${e.r(e.fontURL)}) format('woff');
|
|
698
|
+
font-weight: 100 900;
|
|
699
|
+
font-style: normal;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.search-container {
|
|
703
|
+
display: flex;
|
|
704
|
+
flex-direction: row;
|
|
705
|
+
gap: var(--input-icon-gap, 8px);
|
|
706
|
+
align-items: center;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
.collapsed.md {
|
|
710
|
+
width: 40px;
|
|
711
|
+
cursor: pointer;
|
|
712
|
+
padding: 0;
|
|
713
|
+
position: relative;
|
|
714
|
+
transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
.collapsed.lg {
|
|
718
|
+
width: 50px;
|
|
719
|
+
cursor: pointer;
|
|
720
|
+
padding: 0;
|
|
721
|
+
position: relative;
|
|
722
|
+
transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
.collapsed.sm {
|
|
726
|
+
width: 36px;
|
|
727
|
+
cursor: pointer;
|
|
728
|
+
padding: 0;
|
|
729
|
+
position: relative;
|
|
730
|
+
transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.expanded {
|
|
734
|
+
width: var(--input-width);
|
|
735
|
+
padding: 0 var(--input-horizontal-inline-padding);
|
|
736
|
+
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
input {
|
|
740
|
+
box-sizing: border-box;
|
|
741
|
+
border-width: var(--input-border-width);
|
|
742
|
+
border-style: var(--input-border-style);
|
|
743
|
+
border-color: var(--input-border-color);
|
|
744
|
+
border-radius: var(--input-border-radius);
|
|
745
|
+
background-color: var(--input-background-color);
|
|
746
|
+
color: var(--input-text-color);
|
|
747
|
+
font-size: var(--input-font-size);
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
input:hover {
|
|
751
|
+
border-color: var(--input-border-color-hover);
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
input:focus {
|
|
755
|
+
background-color: var(--input-background-color-focus);
|
|
756
|
+
color: var(--input-text-color-focus);
|
|
757
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
758
|
+
border: 1px solid var(--input-border-color-focus);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
label {
|
|
762
|
+
font-weight: var(--input-label-font-weight, 500);
|
|
763
|
+
font-size: var(--input-label-font-size);
|
|
764
|
+
margin: 0 0 var(--input-gap) 0;
|
|
765
|
+
color: var(--input-label-color);
|
|
766
|
+
display: block;
|
|
767
|
+
width: fit-content;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
.lg {
|
|
771
|
+
height: 50px;
|
|
772
|
+
padding: 0 var(--input-horizontal-inline-padding-lg, 24px);
|
|
773
|
+
transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
.md {
|
|
777
|
+
height: 40px;
|
|
778
|
+
padding: 0 var(--input-horizontal-inline-padding-md, 18px);
|
|
779
|
+
transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.sm {
|
|
783
|
+
height: 36px;
|
|
784
|
+
padding: 0 var(--input-horizontal-inline-padding-sm, 12px);
|
|
785
|
+
transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
.icon-left-container, .icon-right-container {
|
|
789
|
+
position: relative;
|
|
790
|
+
}
|
|
791
|
+
.icon-left, .icon-right {
|
|
792
|
+
position: absolute;
|
|
793
|
+
top: calc(50% + 1px);
|
|
794
|
+
transform: translateY(-50%);
|
|
795
|
+
pointer-events: none;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
.icon-left {
|
|
799
|
+
left: 13px;
|
|
800
|
+
}
|
|
801
|
+
.icon-right {
|
|
802
|
+
right: 13px;
|
|
803
|
+
}
|
|
804
|
+
.icon-left-container cd-icon, .icon-right-container cd-icon {
|
|
805
|
+
color: var(--input-icon-color, var(--text-secondary-color));
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
.icon-spacing-left {
|
|
809
|
+
padding-left: calc(var(--input-horizontal-inline-padding) + 10px + var(--input-icon-gap, 8px));
|
|
810
|
+
}
|
|
811
|
+
.icon-spacing-right {
|
|
812
|
+
padding-right: calc(var(--input-horizontal-inline-padding) + 10px + var(--input-icon-gap, 8px));
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.full-width {
|
|
816
|
+
width: 100%;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
.icon-collapsed-container {
|
|
820
|
+
position: relative;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
.icon-collapsed {
|
|
824
|
+
cursor: pointer;
|
|
825
|
+
position: absolute;
|
|
826
|
+
top: calc(50% + 1px);
|
|
827
|
+
transform: translate(-50%, -50%);
|
|
828
|
+
right: calc(50% + var(--input-icon-gap, 8px));
|
|
829
|
+
padding: 0;
|
|
830
|
+
height: auto;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.icon-collapsed.md {
|
|
834
|
+
right: calc(50% - 4px + var(--input-icon-gap, 8px));
|
|
835
|
+
padding:0;
|
|
836
|
+
height: auto;
|
|
837
|
+
}
|
|
838
|
+
.icon-collapsed.sm {
|
|
839
|
+
right: calc(50% - 6px + var(--input-icon-gap, 8px));
|
|
840
|
+
padding:0;
|
|
841
|
+
height: auto;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
.hidden {
|
|
845
|
+
display: none;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
.active {
|
|
849
|
+
display: block;
|
|
850
|
+
cursor: pointer;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
.active:focus {
|
|
854
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
855
|
+
border-radius: 4px;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
.hidden-icon {
|
|
859
|
+
opacity: 0;
|
|
860
|
+
transition: opacity 0.5s ease-in-out;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
.active-icon {
|
|
864
|
+
cursor: pointer;
|
|
865
|
+
opacity: 1;
|
|
866
|
+
transition: opacity 0.5s ease-in-out;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
input::placeholder {
|
|
870
|
+
opacity: 1;
|
|
871
|
+
transition: opacity 0.5s ease-in-out;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
input.collapsed::placeholder {
|
|
875
|
+
opacity: 0;
|
|
876
|
+
transition: opacity 0.5s ease-in-out;
|
|
877
|
+
}
|
|
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>`:""}
|
|
899
|
+
</div>
|
|
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 C(){typeof window<"u"&&!customElements.get("cd-search")&&customElements.define("cd-search",v)}e.registerIcon();class b extends e.i{static styles=e.i$1`
|
|
901
|
+
@font-face {
|
|
902
|
+
font-family: 'Geist';
|
|
903
|
+
src: url(${e.r(e.fontURL)}) format('woff');
|
|
904
|
+
font-weight: 100 900;
|
|
905
|
+
font-style: normal;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.tab {
|
|
909
|
+
font-family: 'Geist', sans-serif;
|
|
910
|
+
display: inline-flex;
|
|
911
|
+
flex-direction: row;
|
|
912
|
+
align-items: center;
|
|
913
|
+
cursor: pointer;
|
|
914
|
+
box-sizing: border-box;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
.tab.lg {
|
|
918
|
+
padding: 0 var(--tab-horizontal-padding-lg, 16px);
|
|
919
|
+
height: var(--tab-height-lg, 48px);
|
|
920
|
+
gap: var(--tab-inner-gap-lg, 12px);
|
|
921
|
+
border-radius: var(--tab-border-radius-lg, 8px);
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
.tab.md {
|
|
925
|
+
padding: 0 var(--tab-horizontal-padding-md, 14px);
|
|
926
|
+
height: var(--tab-height-md, 40px);
|
|
927
|
+
gap: var(--tab-inner-gap-md, 10px);
|
|
928
|
+
border-radius: var(--tab-border-radius, 6px);
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
.tab.sm {
|
|
932
|
+
padding: 0 var(--tab-horizontal-padding-sm, 12px);
|
|
933
|
+
height: var(--tab-height-sm, 32px);
|
|
934
|
+
gap: var(--tab-inner-gap-sm, 8px);
|
|
935
|
+
border-radius: var(--tab-border-radius-sm, 4px);
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
.tab-outer.default {
|
|
939
|
+
border-bottom: var(--tab-border-width, 1px) solid var(--tab-border-color, #C5CCD3);
|
|
940
|
+
padding-bottom: var(--tab-interior-line-gap, 4px);
|
|
941
|
+
color: var(--tab-text-color, #666666);
|
|
942
|
+
--icon-stroke: var(--tab-icon-color, #666666);
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
.tab-outer.default.active {
|
|
946
|
+
border-bottom: var(--tab-border-width-active, 2px) solid var(--tab-border-color-active, #1A1A1A);
|
|
947
|
+
color: var(--tab-text-color-active, #1A1A1A);
|
|
948
|
+
--icon-stroke: var(--tab-icon-color-active, #1A1A1A);
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
.tab-outer.pill {
|
|
952
|
+
--icon-stroke: var(--tab-icon-color, #666666);
|
|
953
|
+
color: var(--tab-text-color, #666666);
|
|
954
|
+
margin-right: 6px;
|
|
955
|
+
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
.tab.pill.active {
|
|
959
|
+
color: var(--base-color-slate-50);
|
|
960
|
+
background-color: var(--tab-pill-active-background-color, #1A1A1A);
|
|
961
|
+
--icon-stroke: var(--base-color-slate-300);
|
|
962
|
+
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
.tab.outline {
|
|
966
|
+
--icon-stroke: var(--tab-icon-color, #666666);
|
|
967
|
+
color: var(--tab-text-color, #666666);
|
|
968
|
+
border-radius: var(--tab-border-radius, 6px) var(--tab-border-radius, 6px) 0 0;
|
|
969
|
+
border: 1px solid transparent;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
.tab.outline.active {
|
|
973
|
+
border-bottom:none;
|
|
974
|
+
border-left: 1px solid var(--tab-border-color, #C5CCD3);
|
|
975
|
+
border-right: 1px solid var(--tab-border-color, #C5CCD3);
|
|
976
|
+
border-top: 1px solid var(--tab-border-color, #C5CCD3);
|
|
977
|
+
color: var(--tab-text-color-active, #1A1A1A);
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
.tab.outline.active {
|
|
981
|
+
border-bottom: none;
|
|
982
|
+
margin-bottom: -2px;
|
|
983
|
+
z-index: 2;
|
|
984
|
+
background-color: var(--page-background, var(--base-color-white));
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
.tab:hover {
|
|
988
|
+
background-color: var(--tab-background-hover, var(--base-color-slate-50));
|
|
989
|
+
color: var(--tab-text-color-hover, #1A1A1A);
|
|
990
|
+
transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
.tab.disabled {
|
|
994
|
+
color: var(--base-color-slate-200);
|
|
995
|
+
cursor: not-allowed;
|
|
996
|
+
pointer-events: none;
|
|
997
|
+
--icon-stroke: var(--base-color-slate-200);
|
|
998
|
+
--icon-background-primary: var(--base-color-white);
|
|
999
|
+
--icon-background-secondary: var(--base-color-white);
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
.tab:focus {
|
|
1003
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
1004
|
+
}
|
|
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>
|
|
1012
|
+
</div>
|
|
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 T(){typeof window<"u"&&!customElements.get("cd-tab")&&customElements.define("cd-tab",b)}class f extends e.i{static styles=e.i$1`
|
|
1014
|
+
@font-face {
|
|
1015
|
+
font-family: 'Geist';
|
|
1016
|
+
src: url(${e.r(e.fontURL)}) format('woff');
|
|
1017
|
+
font-weight: normal;
|
|
1018
|
+
font-style: normal;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
.container {
|
|
1022
|
+
display: flex;
|
|
1023
|
+
font-family: 'Geist', sans-serif;
|
|
1024
|
+
flex-direction: row;
|
|
1025
|
+
align-items: center;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
.container.outline {
|
|
1029
|
+
border-bottom: 1px solid var(--tab-border-color, #C5CCD3);
|
|
1030
|
+
gap: var(--tab-interior-line-gap, 4px);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
|
|
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>
|
|
1039
|
+
</div>
|
|
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`
|
|
1041
|
+
@font-face {
|
|
1042
|
+
font-family: 'Geist';
|
|
1043
|
+
src: url(${e.r(e.fontURL)}) format('woff');
|
|
1044
|
+
font-weight: 100 900;
|
|
1045
|
+
font-style: normal;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
input {
|
|
1049
|
+
box-sizing: border-box;
|
|
1050
|
+
padding: 0 var(--input-horizontal-inline-padding);
|
|
1051
|
+
height: 40px;
|
|
1052
|
+
border-width: var(--input-border-width);
|
|
1053
|
+
border-style: var(--input-border-style);
|
|
1054
|
+
border-color: var(--input-border-color);
|
|
1055
|
+
border-radius: var(--input-border-radius);
|
|
1056
|
+
background-color: var(--input-background-color);
|
|
1057
|
+
color: var(--input-text-color);
|
|
1058
|
+
width: var(--input-width);
|
|
1059
|
+
font-size: var(--input-font-size);
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
input:hover {
|
|
1063
|
+
border-color: var(--input-border-color-hover);
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
input:focus {
|
|
1067
|
+
background-color: var(--input-background-color-focus);
|
|
1068
|
+
color: var(--input-text-color-focus);
|
|
1069
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
1070
|
+
border: 1px solid var(--input-border-color-focus);
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
.disabled {
|
|
1074
|
+
background-color: var(--input-background-color-disabled);
|
|
1075
|
+
color: var(--input-text-color-disabled);
|
|
1076
|
+
border-color: var(--input-border-color-disabled);
|
|
1077
|
+
cursor: not-allowed;
|
|
1078
|
+
poiinter-events: none;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
.disabled:hover {
|
|
1082
|
+
outline: none;
|
|
1083
|
+
border-color: var(--input-border-color-disabled);
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
.input-error {
|
|
1087
|
+
border-color: var(--input-error-border-color);
|
|
1088
|
+
color: var(--input-error-border-color);
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
.input-error:hover {
|
|
1092
|
+
border-color: var(--input-error-border-hover-color);
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
.input-error:focus {
|
|
1096
|
+
border-color: var(--input-error-border-color);
|
|
1097
|
+
outline: 2px solid var(--input-error-border-color);
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
.full-width {
|
|
1101
|
+
width: 100%;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
.default {
|
|
1105
|
+
border-style: solid;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
.dashed {
|
|
1109
|
+
border-style: dashed;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
.dotted {
|
|
1113
|
+
border-style: dotted;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.lg {
|
|
1117
|
+
height: 50px;
|
|
1118
|
+
padding: 0 var(--input-horizontal-inline-padding-lg, 24px);
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
.sm {
|
|
1122
|
+
height: 36px;
|
|
1123
|
+
padding: 0 var(--input-horizontal-inline-padding-sm, 12px);
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
.container {
|
|
1127
|
+
display: flex;
|
|
1128
|
+
gap: var(--input-gap);
|
|
1129
|
+
flex-direction: row;
|
|
1130
|
+
align-items: center;
|
|
1131
|
+
}
|
|
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 I(){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`
|
|
1139
|
+
@font-face {
|
|
1140
|
+
font-family: 'Geist';
|
|
1141
|
+
src: url(${e.r(e.fontURL)}) format('woff');
|
|
1142
|
+
font-weight: 100 900;
|
|
1143
|
+
font-style: normal;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
input {
|
|
1147
|
+
box-sizing: border-box;
|
|
1148
|
+
padding: 0 var(--input-horizontal-inline-padding);
|
|
1149
|
+
height: 40px;
|
|
1150
|
+
border-width: var(--input-border-width);
|
|
1151
|
+
border-style: var(--input-border-style);
|
|
1152
|
+
border-color: var(--input-border-color);
|
|
1153
|
+
border-radius: var(--input-border-radius);
|
|
1154
|
+
background-color: var(--input-background-color);
|
|
1155
|
+
color: var(--input-text-color);
|
|
1156
|
+
width: var(--input-width);
|
|
1157
|
+
font-size: var(--input-font-size);
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
input:hover {
|
|
1161
|
+
border-color: var(--input-border-color-hover);
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
input:focus {
|
|
1165
|
+
background-color: var(--input-background-color-focus);
|
|
1166
|
+
color: var(--input-text-color-focus);
|
|
1167
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
1168
|
+
border: 1px solid var(--input-border-color-focus);
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
.disabled {
|
|
1172
|
+
background-color: var(--input-background-color-disabled);
|
|
1173
|
+
color: var(--input-text-color-disabled);
|
|
1174
|
+
border-color: var(--input-border-color-disabled);
|
|
1175
|
+
cursor: not-allowed;
|
|
1176
|
+
poiinter-events: none;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
.disabled:hover {
|
|
1180
|
+
outline: none;
|
|
1181
|
+
border-color: var(--input-border-color-disabled);
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
.input-error {
|
|
1185
|
+
border-color: var(--input-error-border-color);
|
|
1186
|
+
color: var(--input-error-border-color);
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
.input-error:hover {
|
|
1190
|
+
border-color: var(--input-error-border-hover-color);
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
.input-error:focus {
|
|
1194
|
+
border-color: var(--input-error-border-color);
|
|
1195
|
+
outline: 2px solid var(--input-error-border-color);
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
.full-width {
|
|
1199
|
+
width: 100%;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
.default {
|
|
1203
|
+
border-style: solid;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
.dashed {
|
|
1207
|
+
border-style: dashed;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
.dotted {
|
|
1211
|
+
border-style: dotted;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
.lg {
|
|
1215
|
+
height: 50px;
|
|
1216
|
+
padding: 0 var(--input-horizontal-inline-padding-lg, 24px);
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
.sm {
|
|
1220
|
+
height: 36px;
|
|
1221
|
+
padding: 0 var(--input-horizontal-inline-padding-sm, 12px);
|
|
1222
|
+
}
|
|
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 R(){typeof window<"u"&&!customElements.get("cd-time")&&customElements.define("cd-time",m)}exports.Button=a;exports.DateComponent=g;exports.Header=n;exports.Input=s;exports.NavBar=l;exports.NavItem=c;exports.NavProfile=p;exports.Search=v;exports.Tab=b;exports.TabContainer=f;exports.Table=d;exports.TimeComponent=m;exports.ToolTip=u;exports.Value=h;exports.registerButton=i;exports.registerDate=I;exports.registerHeader=y;exports.registerInput=w;exports.registerNavBar=k;exports.registerNavItem=$;exports.registerNavProfile=S;exports.registerSearch=C;exports.registerTab=T;exports.registerTabContainer=B;exports.registerTable=E;exports.registerTime=R;exports.registerToolTip=z;exports.registerValue=A;
|
|
1227
|
+
//# sourceMappingURL=index.cjs.js.map
|