@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,2264 @@
|
|
|
1
|
+
import { r as s, i as r, c as o, f as i, d as a, o as c, x as e, a as p, b as h } from "../assets/Counter.es.js";
|
|
2
|
+
import "../fonts/index.es.js";
|
|
3
|
+
s();
|
|
4
|
+
class v extends r {
|
|
5
|
+
static styles = a`
|
|
6
|
+
@font-face {
|
|
7
|
+
font-family: 'Geist';
|
|
8
|
+
src: url(${o(i)}) format('woff');
|
|
9
|
+
font-weight: 100 900;
|
|
10
|
+
font-style: normal;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.button {
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
font-family: 'Geist', sans-serif;
|
|
17
|
+
height:40px;
|
|
18
|
+
width:fit-content;
|
|
19
|
+
padding: var(--button-vertical-padding, 10px) var(--button-horizontal-padding, 18px);
|
|
20
|
+
|
|
21
|
+
background-color: var(--button-background-default, var(--base-color-slate-900));
|
|
22
|
+
color: var(--button-text-default, var(--base-color-white));
|
|
23
|
+
font-size: var(--button-text-size, 16px);
|
|
24
|
+
border: 1px solid var(--button-border-default, var(--base-color-slate-950));
|
|
25
|
+
border-radius: var(--button-border-radius, 6px);
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: var(--button-gap, 8px);
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
--icon-stroke: var(--button-icon-default, var(--base-color-teal-300));
|
|
31
|
+
--icon-background-page: var(--button-background-default, var(--base-color-slate-900));
|
|
32
|
+
--icon-background-primary: var(--base-color-teal-400);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.classic {
|
|
36
|
+
--button-text-default: var(--base-color-teal-50);
|
|
37
|
+
--button-background-default: var(--base-color-teal-600);
|
|
38
|
+
--button-background-hover: var(--base-color-teal-500);
|
|
39
|
+
--button-background-disabled: var(--base-color-slate-300);
|
|
40
|
+
--button-border-default: var(--base-color-teal-700);
|
|
41
|
+
--button-text-disabled: var(--base-color-slate-100);
|
|
42
|
+
--button-border-disabled: var(--base-color-slate-500);
|
|
43
|
+
--button-icon-disabled: var(--base-color-slate-200)
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.secondary {
|
|
48
|
+
--button-background-disabled: var(--button-secondary-background-disabled);
|
|
49
|
+
--button-text-disabled: var(--button-secondary-text-disabled);
|
|
50
|
+
--button-border-disabled: var(--button-secondary-border-disabled);
|
|
51
|
+
--button-text-hover: var(--button-secondary-text-hover);
|
|
52
|
+
--button-background-hover: var(--button-secondary-background-hover);
|
|
53
|
+
--button-text-default: var(--button-secondary-text-default);
|
|
54
|
+
--button-background-default: var(--button-secondary-background-default);
|
|
55
|
+
--button-border-default: var(--button-secondary-border-default);
|
|
56
|
+
--button-border-hover: var(--button-secondary-border-hover);
|
|
57
|
+
--button-icon-default: var(--button-secondary-icon-default);
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.button:hover {
|
|
62
|
+
background-color: var(--button-background-hover, var(--base-color-slate-800));
|
|
63
|
+
color: var(--button-text-hover, var(--base-color-white));
|
|
64
|
+
border-color: var(--button-border-hover, var(--base-color-slate-900));
|
|
65
|
+
transition: background-color 0.2s ease-in-out;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.button:focus {
|
|
69
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
70
|
+
outline-offset: var(--button-focus-offset, 1px);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.disabled {
|
|
74
|
+
background-color: var(--button-background-disabled, var(--base-color-slate-400));
|
|
75
|
+
color: var(--button-text-disabled, var(--base-color-slate-200));
|
|
76
|
+
border-color: var(--button-border-disabled, var(--base-color-slate-450));
|
|
77
|
+
cursor: not-allowed;
|
|
78
|
+
--icon-stroke: var(--button-icon-disabled, var(--base-color-slate-300));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.disabled:hover {
|
|
82
|
+
background-color: var(--button-background-disabled, var(--base-color-slate-400));
|
|
83
|
+
color: var(--button-text-disabled, var(--base-color-slate-200));
|
|
84
|
+
border-color: var(--button-border-disabled, var(--base-color-slate-450));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.disabled:focus {
|
|
88
|
+
outline: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.sm {
|
|
92
|
+
height:36px;
|
|
93
|
+
padding: 0 var(--button-horizontal-padding-sm, 12px);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.lg {
|
|
97
|
+
height:50px;
|
|
98
|
+
padding: 0 var(--button-horizontal-padding-lg, 24px);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.square {
|
|
102
|
+
padding: 0;
|
|
103
|
+
aspect-ratio: 1 / 1;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.expand {
|
|
108
|
+
width: 100%;
|
|
109
|
+
padding-left: 0;
|
|
110
|
+
padding-right: 0;
|
|
111
|
+
flex-grow: 1;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
a {
|
|
116
|
+
text-decoration: none;
|
|
117
|
+
color: inherit;
|
|
118
|
+
outline: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
`;
|
|
122
|
+
static properties = {
|
|
123
|
+
variant: {
|
|
124
|
+
type: String,
|
|
125
|
+
reflect: !0,
|
|
126
|
+
converter: (t) => ["classic", "secondary", "primary"].includes(t) ? t : "classic"
|
|
127
|
+
},
|
|
128
|
+
size: {
|
|
129
|
+
type: String,
|
|
130
|
+
reflect: !0,
|
|
131
|
+
attribute: "size",
|
|
132
|
+
converter: (t) => ["sm", "md", "lg"].includes(t) ? t : "md"
|
|
133
|
+
},
|
|
134
|
+
disabled: {
|
|
135
|
+
type: Boolean,
|
|
136
|
+
reflect: !0,
|
|
137
|
+
attribute: "disabled"
|
|
138
|
+
},
|
|
139
|
+
link: {
|
|
140
|
+
type: String,
|
|
141
|
+
reflect: !0,
|
|
142
|
+
attribute: "link"
|
|
143
|
+
},
|
|
144
|
+
target: {
|
|
145
|
+
type: String,
|
|
146
|
+
reflect: !0,
|
|
147
|
+
attribute: "target",
|
|
148
|
+
converter: (t) => ["_blank", "_self", "_parent", "_top"].includes(t) ? t : "_self"
|
|
149
|
+
},
|
|
150
|
+
expand: {
|
|
151
|
+
type: Boolean,
|
|
152
|
+
reflect: !0,
|
|
153
|
+
attribute: "full-width",
|
|
154
|
+
converter: (t) => t == "" ? "expand" : ""
|
|
155
|
+
},
|
|
156
|
+
value: {
|
|
157
|
+
type: String,
|
|
158
|
+
reflect: !0,
|
|
159
|
+
attribute: "value",
|
|
160
|
+
defaultValue: ""
|
|
161
|
+
},
|
|
162
|
+
type: {
|
|
163
|
+
type: String,
|
|
164
|
+
reflect: !0,
|
|
165
|
+
attribute: "type",
|
|
166
|
+
converter: (t) => ["button", "submit", "reset"].includes(t) ? t : "button"
|
|
167
|
+
},
|
|
168
|
+
square: {
|
|
169
|
+
type: Boolean,
|
|
170
|
+
reflect: !0,
|
|
171
|
+
attribute: "square",
|
|
172
|
+
converter: (t) => t === "" ? "square" : ""
|
|
173
|
+
},
|
|
174
|
+
form: {
|
|
175
|
+
type: String,
|
|
176
|
+
reflect: !0,
|
|
177
|
+
attribute: "form"
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
firstUpdated() {
|
|
181
|
+
const t = document.getElementById(this.form);
|
|
182
|
+
this.shadowRoot.querySelector("button").addEventListener("click", () => {
|
|
183
|
+
t instanceof HTMLFormElement && (console.log("Form found, submitting..."), t.requestSubmit());
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
constructor() {
|
|
187
|
+
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 = "";
|
|
188
|
+
}
|
|
189
|
+
render() {
|
|
190
|
+
return e`
|
|
191
|
+
<a href='${c(this.link)}' target="${c(this.target)}" tabindex="-1" class="${this.expand}">
|
|
192
|
+
<button form="${this.form}" type="${this.button}" class="button ${this.square} ${this.variant} ${this.size} ${this.expand} ${this.disabled ? "disabled" : ""}" .name="${this.name}" tabindex="${this.disabled ? "-1" : 0}" @click='${this.handleClick}'>
|
|
193
|
+
<slot name='start'></slot> <slot></slot> <slot name='end'></slot>
|
|
194
|
+
</button>
|
|
195
|
+
</a> `;
|
|
196
|
+
}
|
|
197
|
+
handleClick(t) {
|
|
198
|
+
if (this.disabled) {
|
|
199
|
+
t.preventDefault(), t.stopPropagation();
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
this.dispatchEvent(new CustomEvent("button-click", {
|
|
203
|
+
detail: {
|
|
204
|
+
value: this.value,
|
|
205
|
+
name: this.name
|
|
206
|
+
},
|
|
207
|
+
bubbles: !0,
|
|
208
|
+
composed: !0
|
|
209
|
+
}));
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
function d() {
|
|
213
|
+
typeof window < "u" && !customElements.get("cd-button") && customElements.define("cd-button", v);
|
|
214
|
+
}
|
|
215
|
+
s();
|
|
216
|
+
class b extends r {
|
|
217
|
+
static styles = a`
|
|
218
|
+
@font-face {
|
|
219
|
+
font-family: 'Geist';
|
|
220
|
+
src: url(${o(i)}) format('woff');
|
|
221
|
+
font-weight: 100 900;
|
|
222
|
+
font-style: normal;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
:host {
|
|
226
|
+
width: 100%;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.header {
|
|
230
|
+
font-family: 'Geist', sans-serif;
|
|
231
|
+
display: flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
justify-content: space-between;
|
|
234
|
+
background-color: var(--header-background-color, var(--base-color-white));
|
|
235
|
+
border-bottom: 1px solid var(--header-border-color, var(--base-color-stone-200));
|
|
236
|
+
width: 100%;
|
|
237
|
+
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.left {
|
|
241
|
+
display: flex;
|
|
242
|
+
align-items: center;
|
|
243
|
+
font-size: var(--header-text-size, 16px);
|
|
244
|
+
font-weight: var(--header-text-weight, 500);
|
|
245
|
+
gap: var(--header-gap, 16px);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
cd-icon {
|
|
249
|
+
padding: var(--header-icon-padding) 0 var(--header-icon-padding) var(--header-icon-padding);
|
|
250
|
+
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.right {
|
|
254
|
+
padding: 0 16px;
|
|
255
|
+
|
|
256
|
+
}
|
|
257
|
+
`;
|
|
258
|
+
static properties = {
|
|
259
|
+
icon: {
|
|
260
|
+
type: String,
|
|
261
|
+
reflect: !0,
|
|
262
|
+
attribute: "icon"
|
|
263
|
+
},
|
|
264
|
+
title: {
|
|
265
|
+
type: String,
|
|
266
|
+
reflect: !0,
|
|
267
|
+
attribute: "title"
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
constructor() {
|
|
271
|
+
super(), this.icon = "", this.title = "";
|
|
272
|
+
}
|
|
273
|
+
render() {
|
|
274
|
+
return e`
|
|
275
|
+
<header class="header">
|
|
276
|
+
<div class='left'>
|
|
277
|
+
<cd-icon name="${this.icon}" size="md"></cd-icon>
|
|
278
|
+
<span class="title">${this.title}</span>
|
|
279
|
+
</div>
|
|
280
|
+
<div class='right'>
|
|
281
|
+
<slot></slot>
|
|
282
|
+
</div>
|
|
283
|
+
</header>
|
|
284
|
+
`;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
function T() {
|
|
288
|
+
!customElements.get("cd-header") && typeof window < "u" && customElements.define("cd-header", b);
|
|
289
|
+
}
|
|
290
|
+
s();
|
|
291
|
+
class f extends r {
|
|
292
|
+
static formAssociated = !0;
|
|
293
|
+
static styles = a`
|
|
294
|
+
@font-face {
|
|
295
|
+
font-family: 'Geist';
|
|
296
|
+
src: url(${o(i)}) format('woff');
|
|
297
|
+
font-weight: 100 900;
|
|
298
|
+
font-style: normal;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
:host {
|
|
302
|
+
width: 100%;
|
|
303
|
+
display: block;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
div {
|
|
307
|
+
font-family: 'Geist';
|
|
308
|
+
margin: var(--input-gap) 0;
|
|
309
|
+
width: 100%;
|
|
310
|
+
padding: var(--input-container-padding, 0);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
input {
|
|
314
|
+
box-sizing: border-box;
|
|
315
|
+
padding: 0 var(--input-horizontal-inline-padding);
|
|
316
|
+
height: 40px;
|
|
317
|
+
border-width: var(--input-border-width);
|
|
318
|
+
border-style: var(--input-border-style);
|
|
319
|
+
border-color: var(--input-border-color);
|
|
320
|
+
border-radius: var(--input-border-radius);
|
|
321
|
+
background-color: var(--input-background-color);
|
|
322
|
+
color: var(--input-text-color);
|
|
323
|
+
width: var(--input-width);
|
|
324
|
+
font-size: var(--input-font-size);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
input:hover {
|
|
328
|
+
border-color: var(--input-border-color-hover);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
input:focus {
|
|
332
|
+
background-color: var(--input-background-color-focus);
|
|
333
|
+
color: var(--input-text-color-focus);
|
|
334
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
335
|
+
border: 1px solid var(--input-border-color-focus);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.disabled {
|
|
339
|
+
background-color: var(--input-background-color-disabled);
|
|
340
|
+
color: var(--input-text-color-disabled);
|
|
341
|
+
border-color: var(--input-border-color-disabled);
|
|
342
|
+
cursor: not-allowed;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.disabled:hover {
|
|
346
|
+
outline: none;
|
|
347
|
+
border-color: var(--input-border-color-disabled);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.input-error {
|
|
351
|
+
border-color: var(--input-error-border-color);
|
|
352
|
+
color: var(--input-error-border-color);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.input-error:hover {
|
|
356
|
+
border-color: var(--input-error-border-hover-color);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.input-error:focus {
|
|
360
|
+
border-color: var(--input-error-border-color);
|
|
361
|
+
outline: 2px solid var(--input-error-border-color);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.full-width {
|
|
365
|
+
width: 100%;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.dashed {
|
|
369
|
+
border-style: dashed;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.dotted {
|
|
373
|
+
border-style: dotted;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.lg {
|
|
377
|
+
height: 50px;
|
|
378
|
+
padding: 0 var(--input-horizontal-inline-padding-lg, 24px);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.sm {
|
|
382
|
+
height: 36px;
|
|
383
|
+
padding: 0 var(--input-horizontal-inline-padding-sm, 12px);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.icon-left-container, .icon-right-container {
|
|
387
|
+
position: relative;
|
|
388
|
+
}
|
|
389
|
+
.icon-left, .icon-right {
|
|
390
|
+
position: absolute;
|
|
391
|
+
top: calc(50% + 1px);
|
|
392
|
+
transform: translateY(-50%);
|
|
393
|
+
pointer-events: none;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.icon-left {
|
|
397
|
+
left: 10px;
|
|
398
|
+
}
|
|
399
|
+
.icon-right {
|
|
400
|
+
right: 10px;
|
|
401
|
+
}
|
|
402
|
+
.icon-left-container cd-icon, .icon-right-container cd-icon {
|
|
403
|
+
color: var(--input-icon-color, var(--text-secondary-color));
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.icon-spacing-left {
|
|
407
|
+
padding-left: calc(var(--input-horizontal-inline-padding) + 20px);
|
|
408
|
+
}
|
|
409
|
+
.icon-spacing-right {
|
|
410
|
+
padding-right: calc(var(--input-horizontal-inline-padding) + 20px);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
`;
|
|
416
|
+
static properties = {
|
|
417
|
+
name: {
|
|
418
|
+
type: String,
|
|
419
|
+
reflect: !0
|
|
420
|
+
},
|
|
421
|
+
type: {
|
|
422
|
+
type: String,
|
|
423
|
+
reflect: !0,
|
|
424
|
+
converter: (t) => ["text", "date", "time", "number", "tel", "url", "phone", "email", "password"].includes(t) ? t : "text"
|
|
425
|
+
},
|
|
426
|
+
disabled: {
|
|
427
|
+
type: Boolean,
|
|
428
|
+
reflect: !0
|
|
429
|
+
},
|
|
430
|
+
placeholder: {
|
|
431
|
+
type: String,
|
|
432
|
+
reflect: !0
|
|
433
|
+
},
|
|
434
|
+
readOnly: {
|
|
435
|
+
type: Boolean,
|
|
436
|
+
reflect: !0,
|
|
437
|
+
attribute: "read-only"
|
|
438
|
+
},
|
|
439
|
+
required: {
|
|
440
|
+
type: Boolean,
|
|
441
|
+
reflect: !0
|
|
442
|
+
},
|
|
443
|
+
pattern: {
|
|
444
|
+
type: String
|
|
445
|
+
},
|
|
446
|
+
error: {
|
|
447
|
+
type: Boolean,
|
|
448
|
+
reflect: !0
|
|
449
|
+
},
|
|
450
|
+
value: {
|
|
451
|
+
type: String,
|
|
452
|
+
reflect: !0
|
|
453
|
+
},
|
|
454
|
+
fullWidth: {
|
|
455
|
+
type: Boolean,
|
|
456
|
+
reflect: !0,
|
|
457
|
+
attribute: "full-width"
|
|
458
|
+
},
|
|
459
|
+
variant: {
|
|
460
|
+
type: String,
|
|
461
|
+
reflect: !0
|
|
462
|
+
},
|
|
463
|
+
size: {
|
|
464
|
+
type: String,
|
|
465
|
+
reflect: !0,
|
|
466
|
+
converter: (t) => ["sm", "md", "lg"].includes(t) ? t : "md"
|
|
467
|
+
},
|
|
468
|
+
iconLeft: {
|
|
469
|
+
type: String,
|
|
470
|
+
reflect: !0,
|
|
471
|
+
attribute: "icon-left"
|
|
472
|
+
},
|
|
473
|
+
iconRight: {
|
|
474
|
+
type: String,
|
|
475
|
+
reflect: !0,
|
|
476
|
+
attribute: "icon-right"
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
handleKeyPress(t) {
|
|
480
|
+
return this.dispatchEvent(new CustomEvent("keypress", {
|
|
481
|
+
detail: {
|
|
482
|
+
value: t.target.value,
|
|
483
|
+
key: t.keyCode
|
|
484
|
+
}
|
|
485
|
+
})), t.key === "Enter" && this.dispatchEvent(new CustomEvent("onenter", {
|
|
486
|
+
detail: {
|
|
487
|
+
value: t.target.value
|
|
488
|
+
}
|
|
489
|
+
})), this.dispatchEvent(new CustomEvent("onkeyup", {
|
|
490
|
+
detail: {
|
|
491
|
+
value: t.target.value,
|
|
492
|
+
key: t.keyCode
|
|
493
|
+
}
|
|
494
|
+
})), this._internals.setFormValue(t.target.value), this.value = t.target.value, t.target.value;
|
|
495
|
+
}
|
|
496
|
+
handleInput(t) {
|
|
497
|
+
return this.dispatchEvent(new CustomEvent("input", {
|
|
498
|
+
detail: {
|
|
499
|
+
value: t.target.value
|
|
500
|
+
}
|
|
501
|
+
})), this._internals.setFormValue(t.target.value), this.value = t.target.value, t.target.value;
|
|
502
|
+
}
|
|
503
|
+
handleChange(t) {
|
|
504
|
+
return this.dispatchEvent(new CustomEvent("onchange", {
|
|
505
|
+
detail: {
|
|
506
|
+
value: t.target.value
|
|
507
|
+
}
|
|
508
|
+
})), this._internals.setFormValue(t.target.value), this.value = t.target.value, t.target.value;
|
|
509
|
+
}
|
|
510
|
+
handleFocus(t) {
|
|
511
|
+
return this.dispatchEvent(new CustomEvent("onblur", {
|
|
512
|
+
detail: {
|
|
513
|
+
value: t.target.value
|
|
514
|
+
}
|
|
515
|
+
})), this._internals.setFormValue(t.target.value), this.value = t.target.value, t.target;
|
|
516
|
+
}
|
|
517
|
+
constructor() {
|
|
518
|
+
super(), this.value = "", this.placeholder = "", this.pattern = "", this.variant = "solid", this.size = "md", this._internals = this.attachInternals();
|
|
519
|
+
}
|
|
520
|
+
render() {
|
|
521
|
+
return e`
|
|
522
|
+
${this.iconLeft ? e`<span class="icon-left-container"><cd-icon name="${this.iconLeft}" size="sm" class="icon-left"></cd-icon></span>` : ""}
|
|
523
|
+
<input id='${this.name}' class="${this.iconLeft ? "icon-spacing-left" : ""} ${this.iconRight ? " icon-spacing-right" : ""} ${this.disabled ? " disabled" : ""} ${this.error ? " input-error" : ""} ${this.fullWidth ? " full-width" : ""} ${this.variant === "dashed" ? " dashed" : this.variant == "dotted" ? " dotted" : ""} ${this.size}" type="${this.type}" placeholder="${this.placeholder}" ?required=${this.required} .value="${this.value}" ?readonly=${this.readOnly} ?disabled=${this.disabled} .pattern="${this.pattern}" @input="${this.handleInput}" @change="${this.handleChange}" @blur="${this.handleFocus}" @keypress=${this.handleKeyPress}/>
|
|
524
|
+
${this.iconRight ? e`<span class="icon-right-container"><cd-icon name="${this.iconRight}" size="sm" class="icon-right"></cd-icon></span>` : ""}
|
|
525
|
+
`;
|
|
526
|
+
}
|
|
527
|
+
focus() {
|
|
528
|
+
if (!this.shadowRoot) {
|
|
529
|
+
console.warn("Input element is not yet connected to the DOM.");
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
if (!this.shadowRoot.querySelector("input")) {
|
|
533
|
+
console.warn("Input element is not found in the shadow DOM.");
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
this.shadowRoot.querySelector("input").focus();
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
function q() {
|
|
540
|
+
typeof window < "u" && !customElements.get("cd-input") && customElements.define("cd-input", f);
|
|
541
|
+
}
|
|
542
|
+
p();
|
|
543
|
+
class g extends r {
|
|
544
|
+
static styles = a`
|
|
545
|
+
@font-face {
|
|
546
|
+
font-family: 'Geist';
|
|
547
|
+
src: url(${o(i)}) format('woff');
|
|
548
|
+
font-weight: 100 900;
|
|
549
|
+
font-style: normal;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.navbar {
|
|
553
|
+
font-family: 'Geist', sans-serif;
|
|
554
|
+
width: 300px;
|
|
555
|
+
height: 100%;
|
|
556
|
+
display: flex;
|
|
557
|
+
flex-direction: column;
|
|
558
|
+
border-right: 1px solid var(--base-color-stone-200);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.items {
|
|
562
|
+
flex-grow: 1;
|
|
563
|
+
display: flex;
|
|
564
|
+
flex-direction: column;
|
|
565
|
+
gap: 8px;
|
|
566
|
+
padding: 32px;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.image {
|
|
570
|
+
padding: 32px;
|
|
571
|
+
border-bottom: 1px solid var(--base-color-stone-200);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.small {
|
|
575
|
+
width: 225px;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.small .items {
|
|
579
|
+
padding: 16px;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
slot[name="start"] {
|
|
583
|
+
display: flex;
|
|
584
|
+
flex-direction: column;
|
|
585
|
+
gap: 4px;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
slot[name="end"] {
|
|
589
|
+
display: flex;
|
|
590
|
+
flex-direction: column;
|
|
591
|
+
gap: 4px;
|
|
592
|
+
flex-grow: 1;
|
|
593
|
+
justify-content: flex-end;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.small ::slotted(div) {
|
|
597
|
+
display: flex;
|
|
598
|
+
flex-direction: column;
|
|
599
|
+
gap: 8px;
|
|
600
|
+
}
|
|
601
|
+
`;
|
|
602
|
+
static properties = {
|
|
603
|
+
image: {
|
|
604
|
+
type: String,
|
|
605
|
+
reflect: !0,
|
|
606
|
+
attribute: "image",
|
|
607
|
+
defaultValue: ""
|
|
608
|
+
},
|
|
609
|
+
name: {
|
|
610
|
+
type: String,
|
|
611
|
+
reflect: !0,
|
|
612
|
+
attribute: "name",
|
|
613
|
+
defaultValue: ""
|
|
614
|
+
},
|
|
615
|
+
small: {
|
|
616
|
+
type: Boolean,
|
|
617
|
+
reflect: !0,
|
|
618
|
+
attribute: "sidebar",
|
|
619
|
+
defaultValue: !1
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
constructor() {
|
|
623
|
+
super(), this.image = "", this.name = "";
|
|
624
|
+
}
|
|
625
|
+
render() {
|
|
626
|
+
return e`
|
|
627
|
+
<nav class="navbar ${this.small ? "small" : ""}">
|
|
628
|
+
${this.image != "" && this.name != "" ? e` <div class="image">
|
|
629
|
+
<cd-nav-image src="${this.image}" alt="Logo" name="${this.name}"></cd-nav-image>
|
|
630
|
+
</div>` : ""}
|
|
631
|
+
|
|
632
|
+
<div class="items">
|
|
633
|
+
<slot name="start"></slot>
|
|
634
|
+
<slot></slot>
|
|
635
|
+
<slot name="end"></slot>
|
|
636
|
+
</div>
|
|
637
|
+
</nav>
|
|
638
|
+
`;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
function V() {
|
|
642
|
+
typeof window < "u" && !customElements.get("cd-nav-bar") && customElements.define("cd-nav-bar", g);
|
|
643
|
+
}
|
|
644
|
+
h();
|
|
645
|
+
s();
|
|
646
|
+
class m extends r {
|
|
647
|
+
static styles = a`
|
|
648
|
+
@font-face {
|
|
649
|
+
font-family: 'Geist';
|
|
650
|
+
src: url('${o(i)}') format('woff');
|
|
651
|
+
font-weight: 100 900;
|
|
652
|
+
font-style: normal;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.nav-item {
|
|
656
|
+
vertical-trim: trim;
|
|
657
|
+
flex-grow: 1;
|
|
658
|
+
font-family: Geist, sans-serif;
|
|
659
|
+
position: relative;
|
|
660
|
+
display: flex;
|
|
661
|
+
align-items: center;
|
|
662
|
+
padding: var(--nav-item-vertical-padding) var(--nav-item-horizontal-padding);
|
|
663
|
+
border-radius: var(--nav-item-border-radius);
|
|
664
|
+
color: var(--nav-item-text-color);
|
|
665
|
+
text-decoration: none;
|
|
666
|
+
font-size: var(--nav-item-font-size);
|
|
667
|
+
font-weight: 400;
|
|
668
|
+
gap: var(--nav-item-gap);
|
|
669
|
+
line-height: 0;
|
|
670
|
+
background-color: transparent;
|
|
671
|
+
transition: background-color 0.2s ease-in-out;
|
|
672
|
+
margin-bottom: 4px; /* Simulate the gap between the parent and the child thats between every child, see .children-active gap */
|
|
673
|
+
cursor: pointer;
|
|
674
|
+
--icon-stroke: var(--base-color-slate-600);
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
.nav-item:hover {
|
|
678
|
+
background-color: var(--nav-item-hover-background-color, var(--base-color-slate-50));
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.nav-item:focus {
|
|
682
|
+
background-color: var(--nav-item-hover-background-color, var(--base-color-slate-50));
|
|
683
|
+
outline-offset: 0;
|
|
684
|
+
border: none;
|
|
685
|
+
outline: 1px solid var(--input-border-color-focus);
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.nav-item .caret {
|
|
689
|
+
transform: rotate(270deg);
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
.active {
|
|
693
|
+
background-color: var(--nav-item-hover-background-color, var(--base-color-slate-50));
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.active .caret {
|
|
697
|
+
transform: rotate(0deg);
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
.nav-item p {
|
|
701
|
+
flex-grow: 1;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.children {
|
|
705
|
+
display: none;
|
|
706
|
+
padding-left: calc(var(--nav-item-horizontal-padding) + 32px); /* 32px for icon width */
|
|
707
|
+
padding-right: calc(-var(--nav-item-horizontal-padding) - 32px);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.children-active {
|
|
711
|
+
display: flex;
|
|
712
|
+
flex-grow: 1;
|
|
713
|
+
flex-direction: column;
|
|
714
|
+
gap: 4px;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
.selected {
|
|
718
|
+
background-color: var(--nav-item-selected-background-color, var(--base-color-grey-900));
|
|
719
|
+
color: var(--nav-item-selected-text-color, var(--base-color-white));
|
|
720
|
+
/*--icon-stroke: var(--base-color-teal-500);
|
|
721
|
+
--icon-background-page: var(--nav-item-selected-background-color, var(--base-color-grey-900));
|
|
722
|
+
--icon-background-primary: #00AB8E40;*/
|
|
723
|
+
--icon-stroke: var(--base-color-white);
|
|
724
|
+
--icon-background-page: var(--nav-item-selected-background-color, var(--base-color-grey-900));
|
|
725
|
+
--icon-background-primary: var(--nav-item-selected-background-color, var(--base-color-grey-900));
|
|
726
|
+
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.selected:hover {
|
|
730
|
+
background-color: var(--nav-item-selected-background-color, var(--base-color-grey-900));
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.selected:focus {
|
|
734
|
+
background-color: var(--nav-item-selected-background-color, var(--base-color-grey-900));
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.standout {
|
|
738
|
+
--icon-stroke: var(--base-color-teal-900);
|
|
739
|
+
--icon-background-primary: var(--base-color-teal-300);
|
|
740
|
+
}
|
|
741
|
+
`;
|
|
742
|
+
static properties = {
|
|
743
|
+
name: {
|
|
744
|
+
type: String,
|
|
745
|
+
reflect: !0,
|
|
746
|
+
attribute: "name"
|
|
747
|
+
},
|
|
748
|
+
variant: {
|
|
749
|
+
type: String,
|
|
750
|
+
reflect: !0,
|
|
751
|
+
attribute: "variant",
|
|
752
|
+
converter: (t) => ["dropdown", "link", "number"].includes(t) ? t : "none"
|
|
753
|
+
},
|
|
754
|
+
amount: {
|
|
755
|
+
type: Number,
|
|
756
|
+
reflect: !0,
|
|
757
|
+
attribute: "amount",
|
|
758
|
+
converter: (t) => isNaN(t) ? 0 : t
|
|
759
|
+
},
|
|
760
|
+
maxCount: {
|
|
761
|
+
type: Number,
|
|
762
|
+
reflect: !0,
|
|
763
|
+
attribute: "max-count",
|
|
764
|
+
converter: (t) => isNaN(t) ? 99 : t
|
|
765
|
+
},
|
|
766
|
+
important: {
|
|
767
|
+
type: Boolean,
|
|
768
|
+
reflect: !0,
|
|
769
|
+
attribute: "important"
|
|
770
|
+
},
|
|
771
|
+
link: {
|
|
772
|
+
type: String,
|
|
773
|
+
reflect: !0,
|
|
774
|
+
attribute: "link"
|
|
775
|
+
},
|
|
776
|
+
icon: {
|
|
777
|
+
type: String,
|
|
778
|
+
reflect: !0,
|
|
779
|
+
attribute: "icon"
|
|
780
|
+
},
|
|
781
|
+
active: {
|
|
782
|
+
type: Boolean,
|
|
783
|
+
reflect: !0,
|
|
784
|
+
attribute: "active"
|
|
785
|
+
},
|
|
786
|
+
select: {
|
|
787
|
+
type: Boolean,
|
|
788
|
+
reflect: !0,
|
|
789
|
+
attribute: "selected"
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
constructor() {
|
|
793
|
+
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;
|
|
794
|
+
}
|
|
795
|
+
render() {
|
|
796
|
+
return e`
|
|
797
|
+
<a href="${c(this.link)}" class="nav-item ${this.active ? "active" : ""} ${this.select ? "selected" : ""}" tabindex="0">
|
|
798
|
+
<slot name="before" class="${this.amount > 0 && !this.select ? "standout" : ""} ${this.select ? "selected" : ""}"></slot>
|
|
799
|
+
<p>${this.name}</p>
|
|
800
|
+
${this.variant == "dropdown" ? e`<cd-icon class='caret' name='caret-down' size='sm'></cd-icon>` : ""}
|
|
801
|
+
${this.variant == "link" ? e`<cd-icon name='external' size='sm'></cd-icon>` : ""}
|
|
802
|
+
${this.variant == "number" ? e`<cd-counter count='${this.amount}' max-count='${this.maxCount}' important='${this.important}'></cd-notification-counter>` : ""}
|
|
803
|
+
</a>
|
|
804
|
+
<div class="children ${this.active ? "children-active" : ""}">
|
|
805
|
+
<slot></slot>
|
|
806
|
+
</div>
|
|
807
|
+
`;
|
|
808
|
+
}
|
|
809
|
+
setSelectState(t) {
|
|
810
|
+
if (typeof t != "boolean")
|
|
811
|
+
throw new Error("Select must be a boolean value");
|
|
812
|
+
this.select !== t && (this.select = t, this.requestUpdate());
|
|
813
|
+
}
|
|
814
|
+
setActiveState(t) {
|
|
815
|
+
if (typeof t != "boolean")
|
|
816
|
+
throw new Error("Active must be a boolean value");
|
|
817
|
+
this.active !== t && (this.active = t, this.requestUpdate());
|
|
818
|
+
}
|
|
819
|
+
toggleSelect() {
|
|
820
|
+
this.select = !this.select, this.requestUpdate();
|
|
821
|
+
}
|
|
822
|
+
toggleActive() {
|
|
823
|
+
this.active = !this.active, this.requestUpdate();
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
function I() {
|
|
827
|
+
typeof window < "u" && !customElements.get("cd-nav-item") && customElements.define("cd-nav-item", m);
|
|
828
|
+
}
|
|
829
|
+
class y extends r {
|
|
830
|
+
static styles = a`
|
|
831
|
+
@font-face {
|
|
832
|
+
font-family: 'Geist';
|
|
833
|
+
src: url(${o(i)}) format('woff');
|
|
834
|
+
font-weight: 100 900;
|
|
835
|
+
font-style: normal;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
:host {
|
|
839
|
+
width: 100%;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
`;
|
|
843
|
+
static properties = {};
|
|
844
|
+
constructor() {
|
|
845
|
+
super();
|
|
846
|
+
}
|
|
847
|
+
render() {
|
|
848
|
+
return e`
|
|
849
|
+
<slot></slot>
|
|
850
|
+
`;
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
function D() {
|
|
854
|
+
typeof window < "u" && !customElements.get("cd-table") && customElements.define("cd-table", y);
|
|
855
|
+
}
|
|
856
|
+
class x extends r {
|
|
857
|
+
static styles = a`
|
|
858
|
+
@font-face {
|
|
859
|
+
font-family: 'Geist';
|
|
860
|
+
src: url(${o(i)}) format('woff');
|
|
861
|
+
font-weight: 100 900;
|
|
862
|
+
font-style: normal;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.tooltip-container {
|
|
866
|
+
position: relative;
|
|
867
|
+
z-index: 3;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
.tooltip {
|
|
871
|
+
width: max-content;
|
|
872
|
+
display: flex;
|
|
873
|
+
flex-direction: column;
|
|
874
|
+
align-items: center;
|
|
875
|
+
|
|
876
|
+
background-color: var(--tooltip-background-color, var(--base-color-slate-50));
|
|
877
|
+
border: 1px solid var(--tooltip-border-color, var(--base-color-slate-400));
|
|
878
|
+
border-radius: var(--tooltip-border-radius, 4px);
|
|
879
|
+
box-shadow: 6px 6px 12px 0px #0000001F;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
.tooltip::after {
|
|
883
|
+
content: '';
|
|
884
|
+
position: absolute;
|
|
885
|
+
width:10px;
|
|
886
|
+
height: 10px;
|
|
887
|
+
background-color:var(--tooltip-background-color, var(--base-color-slate-50));
|
|
888
|
+
border-width: 0 1px 1px 0;
|
|
889
|
+
border-style: solid;
|
|
890
|
+
border-color: var(--tooltip-border-color, var(--base-color-slate-400));
|
|
891
|
+
transform: rotate(45deg);
|
|
892
|
+
z-index: 1;
|
|
893
|
+
margin: 0 auto;
|
|
894
|
+
top: calc(100% - 6px);
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
.tooltip-content {
|
|
898
|
+
display: grid;
|
|
899
|
+
grid-template-columns: auto auto;
|
|
900
|
+
gap: var(--tooltip-gap, 6px);
|
|
901
|
+
padding: var(--tooltip-padding, 8px);
|
|
902
|
+
border-bottom: 1px solid var(--tooltip-border-color, var(--base-color-slate-400));
|
|
903
|
+
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
.tooltip-text {
|
|
907
|
+
display: flex;
|
|
908
|
+
flex-direction: column;
|
|
909
|
+
color: var(--tooltip-text-color, var(--text-secondary-color));
|
|
910
|
+
font-size: var(--tooltip-text-font-size, 12px);
|
|
911
|
+
font-weight: var(--tooltip-text-font-weight, 400);
|
|
912
|
+
padding: var(--tooltip-text-padding,8px);
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
.none {
|
|
916
|
+
display: none;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
.no-border {
|
|
920
|
+
border-bottom: none;
|
|
921
|
+
}
|
|
922
|
+
`;
|
|
923
|
+
static properties = {
|
|
924
|
+
text: {
|
|
925
|
+
type: String,
|
|
926
|
+
reflect: !0
|
|
927
|
+
},
|
|
928
|
+
position: {
|
|
929
|
+
type: String,
|
|
930
|
+
reflect: !0,
|
|
931
|
+
attribute: "position",
|
|
932
|
+
converter: (t) => ["top", "right", "bottom", "left"].includes(t) ? t : "top"
|
|
933
|
+
},
|
|
934
|
+
content: {
|
|
935
|
+
type: Boolean,
|
|
936
|
+
reflect: !0
|
|
937
|
+
}
|
|
938
|
+
};
|
|
939
|
+
constructor() {
|
|
940
|
+
super(), this.text = "", this.content = !1, this.position = "top";
|
|
941
|
+
}
|
|
942
|
+
render() {
|
|
943
|
+
return e`
|
|
944
|
+
<div class="tooltip-container">
|
|
945
|
+
<div class="tooltip ${this.position}">
|
|
946
|
+
<div class="${this.content ? "tooltip-content" : "none"} ${this.text ? "" : "no-border"}">
|
|
947
|
+
<slot></slot>
|
|
948
|
+
</div>
|
|
949
|
+
<div class="${this.text ? "tooltip-text" : "none"}">
|
|
950
|
+
${this.text}
|
|
951
|
+
</div>
|
|
952
|
+
</div>
|
|
953
|
+
</div>
|
|
954
|
+
`;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
function R() {
|
|
958
|
+
typeof window < "u" && !customElements.get("cd-tool-tip") && customElements.define("cd-tool-tip", x);
|
|
959
|
+
}
|
|
960
|
+
s();
|
|
961
|
+
class w extends r {
|
|
962
|
+
static styles = a`
|
|
963
|
+
@font-face {
|
|
964
|
+
font-family: 'Geist';
|
|
965
|
+
src: url(${o(i)}) format('woff');
|
|
966
|
+
font-weight: 100 900;
|
|
967
|
+
font-style: normal;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
.profile-stack {
|
|
971
|
+
font-family: 'Geist', sans-serif;
|
|
972
|
+
background-color: var(--nav-profile-background-color, var(--base-color-slate-50));
|
|
973
|
+
color: var(--nav-profile-text-color, var(--text-primary-color));
|
|
974
|
+
border: 1px solid var(--nav-profile-border-color, var(--base-color-slate-200));
|
|
975
|
+
border-radius: var(--nav-profile-border-radius, 8px);
|
|
976
|
+
padding: var(--nav-profile-padding, 17px 14px);
|
|
977
|
+
display: flex;
|
|
978
|
+
width: fix-content;
|
|
979
|
+
flex-direction: row;
|
|
980
|
+
align-items: center;
|
|
981
|
+
gap: var(--nav-profile-gap, 16px);
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
.text-stack {
|
|
985
|
+
display: flex;
|
|
986
|
+
flex-direction: column;
|
|
987
|
+
flex-grow: 1;
|
|
988
|
+
gap: 8px;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
.name {
|
|
992
|
+
font-size: var(--nav-profile-name-font-size, 14px);
|
|
993
|
+
font-weight: var(--nav-profile-name-font-weight, 500);
|
|
994
|
+
line-height: 100%;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
.org {
|
|
998
|
+
font-size: var(--nav-profile-org-font-size, 14px);
|
|
999
|
+
font-weight: var(--nav-profile-org-font-weight, 400);
|
|
1000
|
+
display: flex;
|
|
1001
|
+
gap: 6px;
|
|
1002
|
+
align-items: center;
|
|
1003
|
+
}
|
|
1004
|
+
`;
|
|
1005
|
+
static properties = {
|
|
1006
|
+
primaryText: {
|
|
1007
|
+
type: String,
|
|
1008
|
+
reflect: !0,
|
|
1009
|
+
attribute: "name",
|
|
1010
|
+
defaultValue: ""
|
|
1011
|
+
},
|
|
1012
|
+
secondaryText: {
|
|
1013
|
+
type: String,
|
|
1014
|
+
reflect: !0,
|
|
1015
|
+
attribute: "org",
|
|
1016
|
+
defaultValue: ""
|
|
1017
|
+
},
|
|
1018
|
+
icon: {
|
|
1019
|
+
type: String,
|
|
1020
|
+
reflect: !0,
|
|
1021
|
+
attribute: "icon",
|
|
1022
|
+
defaultValue: ""
|
|
1023
|
+
}
|
|
1024
|
+
};
|
|
1025
|
+
constructor() {
|
|
1026
|
+
super(), this.primaryText = "", this.secondaryText = "", this.icon = "hart";
|
|
1027
|
+
}
|
|
1028
|
+
render() {
|
|
1029
|
+
return e`
|
|
1030
|
+
<div class="profile-stack">
|
|
1031
|
+
<div class="text-stack">
|
|
1032
|
+
<span class="name">${this.primaryText}</span>
|
|
1033
|
+
${this.secondaryText != "" ? e`<span class="org"><cd-icon name="${this.icon}" size="sm"></cd-icon>${this.secondaryText}</span>` : ""}
|
|
1034
|
+
</div>
|
|
1035
|
+
<cd-icon name="caret-down" size="sm"></cd-icon>
|
|
1036
|
+
</div>
|
|
1037
|
+
|
|
1038
|
+
`;
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
function L() {
|
|
1042
|
+
typeof window < "u" && !customElements.get("cd-nav-profile") && customElements.define("cd-nav-profile", w);
|
|
1043
|
+
}
|
|
1044
|
+
s();
|
|
1045
|
+
class k extends r {
|
|
1046
|
+
static styles = a`
|
|
1047
|
+
@font-face {
|
|
1048
|
+
font-family: 'Geist';
|
|
1049
|
+
src: url(${o(i)}) format('woff');
|
|
1050
|
+
font-weight: 100 900;
|
|
1051
|
+
font-style: normal;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
a {
|
|
1055
|
+
text-decoration: none;
|
|
1056
|
+
color: var(--key-value-value-color, var(--text-primary-color));
|
|
1057
|
+
font-weight: var(--key-value-value-font-weight);
|
|
1058
|
+
font-size: var(--key-value-font-size, 14px);
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
.arrow-value {
|
|
1062
|
+
padding: 3px;
|
|
1063
|
+
font-family: 'Geist', sans-serif;
|
|
1064
|
+
color: var(--key-value-value-color, var(--text-primary-color));
|
|
1065
|
+
font-weight: var(--key-value-value-font-weight);
|
|
1066
|
+
font-size: var(--key-value-font-size, 14px);
|
|
1067
|
+
display: inline-flex;
|
|
1068
|
+
flex-direction: row;
|
|
1069
|
+
align-items: center;
|
|
1070
|
+
cursor: pointer;
|
|
1071
|
+
gap: 6px;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
.arrow-value cd-icon {
|
|
1075
|
+
transform: translateX(-0.25em);
|
|
1076
|
+
opacity: 0;
|
|
1077
|
+
transition: transform 0.3s ease, opacity 0.3s ease;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
.arrow-value:hover cd-icon {
|
|
1081
|
+
transform: translateX(0);
|
|
1082
|
+
opacity: 1;
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
.value {
|
|
1086
|
+
padding: 3px;
|
|
1087
|
+
font-family: 'Geist', sans-serif;
|
|
1088
|
+
color: var(--key-value-value-color, var(--text-primary-color));
|
|
1089
|
+
font-weight: var(--key-value-value-font-weight);
|
|
1090
|
+
font-size: var(--key-value-font-size, 14px);
|
|
1091
|
+
cursor: auto;
|
|
1092
|
+
}
|
|
1093
|
+
.value:focus, .arrow-value:focus {
|
|
1094
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
1095
|
+
border-radius: 4px;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
.arrow-value:focus cd-icon {
|
|
1099
|
+
transform: translateX(0);
|
|
1100
|
+
opacity: 1;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
::slotted(select) {
|
|
1104
|
+
color: var(--key-value-value-color, var(--text-primary-color));
|
|
1105
|
+
font-weight: var(--key-value-value-font-weight);
|
|
1106
|
+
font-size: var(--key-value-font-size, 14px);
|
|
1107
|
+
cursor: pointer;
|
|
1108
|
+
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");
|
|
1109
|
+
background-repeat: no-repeat;
|
|
1110
|
+
background-size: 16px;
|
|
1111
|
+
background-position-x: 100%;
|
|
1112
|
+
background-position-y: center;
|
|
1113
|
+
padding: 3px 20px 3px 3px;
|
|
1114
|
+
background-color: transparent;
|
|
1115
|
+
border: none;
|
|
1116
|
+
appearance: none;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
::slotted(select:focus) {
|
|
1120
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
1121
|
+
border-radius: 4px;
|
|
1122
|
+
}
|
|
1123
|
+
`;
|
|
1124
|
+
static properties = {
|
|
1125
|
+
variant: {
|
|
1126
|
+
type: String,
|
|
1127
|
+
reflect: !0,
|
|
1128
|
+
attribute: "variant",
|
|
1129
|
+
converter: (t) => ["default", "dropdown", "arrow"].includes(t) ? t : "default"
|
|
1130
|
+
},
|
|
1131
|
+
link: {
|
|
1132
|
+
type: String,
|
|
1133
|
+
reflect: !0,
|
|
1134
|
+
attribute: "link"
|
|
1135
|
+
}
|
|
1136
|
+
};
|
|
1137
|
+
constructor() {
|
|
1138
|
+
super(), this.variant = "default", this.link = void 0;
|
|
1139
|
+
}
|
|
1140
|
+
render() {
|
|
1141
|
+
return e`
|
|
1142
|
+
${this.variant === "default" ? e`<a href="${c(this.link)}" class="value"><slot></slot></a>` : ""}
|
|
1143
|
+
${this.variant === "dropdown" ? e`<span class="dropdown-value"><slot></slot></span>` : ""}
|
|
1144
|
+
${this.variant === "arrow" ? e`<a href="${c(this.link)}" class="arrow-value"><slot></slot><cd-icon name="arrow" size="sm"></cd-icon></a>` : ""}
|
|
1145
|
+
`;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
function P() {
|
|
1149
|
+
typeof window < "u" && !customElements.get("cd-value") && customElements.define("cd-value", k);
|
|
1150
|
+
}
|
|
1151
|
+
s();
|
|
1152
|
+
class $ extends r {
|
|
1153
|
+
static styles = a`
|
|
1154
|
+
@font-face {
|
|
1155
|
+
font-family: 'Geist';
|
|
1156
|
+
src: url(${o(i)}) format('woff');
|
|
1157
|
+
font-weight: 100 900;
|
|
1158
|
+
font-style: normal;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
.search-container {
|
|
1162
|
+
display: flex;
|
|
1163
|
+
flex-direction: row;
|
|
1164
|
+
gap: var(--input-icon-gap, 8px);
|
|
1165
|
+
align-items: center;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
.collapsed.md {
|
|
1169
|
+
width: 40px;
|
|
1170
|
+
cursor: pointer;
|
|
1171
|
+
padding: 0;
|
|
1172
|
+
position: relative;
|
|
1173
|
+
transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
.collapsed.lg {
|
|
1177
|
+
width: 50px;
|
|
1178
|
+
cursor: pointer;
|
|
1179
|
+
padding: 0;
|
|
1180
|
+
position: relative;
|
|
1181
|
+
transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
.collapsed.sm {
|
|
1185
|
+
width: 36px;
|
|
1186
|
+
cursor: pointer;
|
|
1187
|
+
padding: 0;
|
|
1188
|
+
position: relative;
|
|
1189
|
+
transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
.expanded {
|
|
1193
|
+
width: var(--input-width);
|
|
1194
|
+
padding: 0 var(--input-horizontal-inline-padding);
|
|
1195
|
+
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
input {
|
|
1199
|
+
box-sizing: border-box;
|
|
1200
|
+
border-width: var(--input-border-width);
|
|
1201
|
+
border-style: var(--input-border-style);
|
|
1202
|
+
border-color: var(--input-border-color);
|
|
1203
|
+
border-radius: var(--input-border-radius);
|
|
1204
|
+
background-color: var(--input-background-color);
|
|
1205
|
+
color: var(--input-text-color);
|
|
1206
|
+
font-size: var(--input-font-size);
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
input:hover {
|
|
1210
|
+
border-color: var(--input-border-color-hover);
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
input:focus {
|
|
1214
|
+
background-color: var(--input-background-color-focus);
|
|
1215
|
+
color: var(--input-text-color-focus);
|
|
1216
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
1217
|
+
border: 1px solid var(--input-border-color-focus);
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
label {
|
|
1221
|
+
font-weight: var(--input-label-font-weight, 500);
|
|
1222
|
+
font-size: var(--input-label-font-size);
|
|
1223
|
+
margin: 0 0 var(--input-gap) 0;
|
|
1224
|
+
color: var(--input-label-color);
|
|
1225
|
+
display: block;
|
|
1226
|
+
width: fit-content;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
.lg {
|
|
1230
|
+
height: 50px;
|
|
1231
|
+
padding: 0 var(--input-horizontal-inline-padding-lg, 24px);
|
|
1232
|
+
transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
.md {
|
|
1236
|
+
height: 40px;
|
|
1237
|
+
padding: 0 var(--input-horizontal-inline-padding-md, 18px);
|
|
1238
|
+
transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
.sm {
|
|
1242
|
+
height: 36px;
|
|
1243
|
+
padding: 0 var(--input-horizontal-inline-padding-sm, 12px);
|
|
1244
|
+
transition: width 0.5s ease-in-out, padding 0.5s ease-in-out;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
.icon-left-container, .icon-right-container {
|
|
1248
|
+
position: relative;
|
|
1249
|
+
}
|
|
1250
|
+
.icon-left, .icon-right {
|
|
1251
|
+
position: absolute;
|
|
1252
|
+
top: calc(50% + 1px);
|
|
1253
|
+
transform: translateY(-50%);
|
|
1254
|
+
pointer-events: none;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
.icon-left {
|
|
1258
|
+
left: 13px;
|
|
1259
|
+
}
|
|
1260
|
+
.icon-right {
|
|
1261
|
+
right: 13px;
|
|
1262
|
+
}
|
|
1263
|
+
.icon-left-container cd-icon, .icon-right-container cd-icon {
|
|
1264
|
+
color: var(--input-icon-color, var(--text-secondary-color));
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
.icon-spacing-left {
|
|
1268
|
+
padding-left: calc(var(--input-horizontal-inline-padding) + 10px + var(--input-icon-gap, 8px));
|
|
1269
|
+
}
|
|
1270
|
+
.icon-spacing-right {
|
|
1271
|
+
padding-right: calc(var(--input-horizontal-inline-padding) + 10px + var(--input-icon-gap, 8px));
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
.full-width {
|
|
1275
|
+
width: 100%;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
.icon-collapsed-container {
|
|
1279
|
+
position: relative;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
.icon-collapsed {
|
|
1283
|
+
cursor: pointer;
|
|
1284
|
+
position: absolute;
|
|
1285
|
+
top: calc(50% + 1px);
|
|
1286
|
+
transform: translate(-50%, -50%);
|
|
1287
|
+
right: calc(50% + var(--input-icon-gap, 8px));
|
|
1288
|
+
padding: 0;
|
|
1289
|
+
height: auto;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
.icon-collapsed.md {
|
|
1293
|
+
right: calc(50% - 4px + var(--input-icon-gap, 8px));
|
|
1294
|
+
padding:0;
|
|
1295
|
+
height: auto;
|
|
1296
|
+
}
|
|
1297
|
+
.icon-collapsed.sm {
|
|
1298
|
+
right: calc(50% - 6px + var(--input-icon-gap, 8px));
|
|
1299
|
+
padding:0;
|
|
1300
|
+
height: auto;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
.hidden {
|
|
1304
|
+
display: none;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
.active {
|
|
1308
|
+
display: block;
|
|
1309
|
+
cursor: pointer;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
.active:focus {
|
|
1313
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
1314
|
+
border-radius: 4px;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
.hidden-icon {
|
|
1318
|
+
opacity: 0;
|
|
1319
|
+
transition: opacity 0.5s ease-in-out;
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
.active-icon {
|
|
1323
|
+
cursor: pointer;
|
|
1324
|
+
opacity: 1;
|
|
1325
|
+
transition: opacity 0.5s ease-in-out;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
input::placeholder {
|
|
1329
|
+
opacity: 1;
|
|
1330
|
+
transition: opacity 0.5s ease-in-out;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
input.collapsed::placeholder {
|
|
1334
|
+
opacity: 0;
|
|
1335
|
+
transition: opacity 0.5s ease-in-out;
|
|
1336
|
+
}
|
|
1337
|
+
`;
|
|
1338
|
+
static properties = {
|
|
1339
|
+
placeholder: {
|
|
1340
|
+
type: String,
|
|
1341
|
+
reflect: !0
|
|
1342
|
+
},
|
|
1343
|
+
value: {
|
|
1344
|
+
type: String,
|
|
1345
|
+
reflect: !0
|
|
1346
|
+
},
|
|
1347
|
+
disabled: {
|
|
1348
|
+
type: Boolean,
|
|
1349
|
+
reflect: !0
|
|
1350
|
+
},
|
|
1351
|
+
collapsed: {
|
|
1352
|
+
type: Boolean,
|
|
1353
|
+
reflect: !0
|
|
1354
|
+
},
|
|
1355
|
+
iconLeft: {
|
|
1356
|
+
type: Boolean,
|
|
1357
|
+
reflect: !0,
|
|
1358
|
+
attribute: "icon-left"
|
|
1359
|
+
},
|
|
1360
|
+
iconRight: {
|
|
1361
|
+
type: Boolean,
|
|
1362
|
+
reflect: !0,
|
|
1363
|
+
attribute: "icon-right"
|
|
1364
|
+
},
|
|
1365
|
+
size: {
|
|
1366
|
+
type: String,
|
|
1367
|
+
reflect: !0
|
|
1368
|
+
},
|
|
1369
|
+
closeIcon: {
|
|
1370
|
+
type: Boolean,
|
|
1371
|
+
reflect: !0,
|
|
1372
|
+
attribute: "close-icon"
|
|
1373
|
+
},
|
|
1374
|
+
label: {
|
|
1375
|
+
type: String,
|
|
1376
|
+
reflect: !0
|
|
1377
|
+
},
|
|
1378
|
+
labelPosition: {
|
|
1379
|
+
type: String,
|
|
1380
|
+
reflect: !0,
|
|
1381
|
+
attribute: "label-position"
|
|
1382
|
+
},
|
|
1383
|
+
name: {
|
|
1384
|
+
type: String,
|
|
1385
|
+
reflect: !0
|
|
1386
|
+
},
|
|
1387
|
+
fullWidth: {
|
|
1388
|
+
type: Boolean,
|
|
1389
|
+
reflect: !0,
|
|
1390
|
+
attribute: "full-width"
|
|
1391
|
+
}
|
|
1392
|
+
};
|
|
1393
|
+
handleBlur(t) {
|
|
1394
|
+
return this.dispatchEvent(new CustomEvent("blur", {
|
|
1395
|
+
detail: {
|
|
1396
|
+
value: t.target.value
|
|
1397
|
+
},
|
|
1398
|
+
bubbles: !0,
|
|
1399
|
+
composed: !0
|
|
1400
|
+
})), this.value = t.target.value, t.target.value;
|
|
1401
|
+
}
|
|
1402
|
+
handleFocus(t) {
|
|
1403
|
+
return this.expandInput(), this.dispatchEvent(new CustomEvent("focus", {
|
|
1404
|
+
detail: {
|
|
1405
|
+
value: t.target.value
|
|
1406
|
+
},
|
|
1407
|
+
bubbles: !0,
|
|
1408
|
+
composed: !0
|
|
1409
|
+
})), this.value = t.target.value, t.target.value;
|
|
1410
|
+
}
|
|
1411
|
+
handleKeyPress(t) {
|
|
1412
|
+
return this.dispatchEvent(new CustomEvent("keypress", {
|
|
1413
|
+
detail: {
|
|
1414
|
+
value: t.target.value,
|
|
1415
|
+
key: t.target.keyCode
|
|
1416
|
+
},
|
|
1417
|
+
bubbles: !0,
|
|
1418
|
+
composed: !0
|
|
1419
|
+
})), this.value = t.target.value, t.target.value;
|
|
1420
|
+
}
|
|
1421
|
+
handleInput(t) {
|
|
1422
|
+
return this.dispatchEvent(new CustomEvent("input", {
|
|
1423
|
+
detail: {
|
|
1424
|
+
value: t.target.value
|
|
1425
|
+
},
|
|
1426
|
+
bubbles: !0,
|
|
1427
|
+
composed: !0
|
|
1428
|
+
})), this.value = t.target.value, t.target.value;
|
|
1429
|
+
}
|
|
1430
|
+
constructor() {
|
|
1431
|
+
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();
|
|
1432
|
+
}
|
|
1433
|
+
render() {
|
|
1434
|
+
return e`
|
|
1435
|
+
<div class="search-container ${this.labelPosition}">
|
|
1436
|
+
${this.label ? e`<label for="search-input">${this.label}</label>` : ""}
|
|
1437
|
+
${this.iconLeft && !this.collapsed ? e`<span class="icon-left-container"><cd-icon name="search" class="icon-left" variant="light-slate"></cd-icon></span>` : ""}
|
|
1438
|
+
|
|
1439
|
+
<input
|
|
1440
|
+
id="search-input"
|
|
1441
|
+
type="text"
|
|
1442
|
+
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" : ""}"
|
|
1443
|
+
placeholder="${this.placeholder}"
|
|
1444
|
+
.value="${this.value}"
|
|
1445
|
+
?disabled="${this.disabled}"
|
|
1446
|
+
@input="${this.handleInput}"
|
|
1447
|
+
@focus="${this.handleFocus}"
|
|
1448
|
+
@blur="${this.handleBlur}"
|
|
1449
|
+
@keypress="${this.handleKeyPress}"
|
|
1450
|
+
@click="${this.expandInput}"
|
|
1451
|
+
name="${this.name}"
|
|
1452
|
+
>
|
|
1453
|
+
${this.iconRight || this.collapsed ? e`<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>` : ""}
|
|
1454
|
+
${this.closeIcon ? e`<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>` : ""}
|
|
1455
|
+
</div>
|
|
1456
|
+
`;
|
|
1457
|
+
}
|
|
1458
|
+
firstUpdated() {
|
|
1459
|
+
if (!this.shadowRoot) {
|
|
1460
|
+
console.warn("Shadow DOM is not available.");
|
|
1461
|
+
return;
|
|
1462
|
+
}
|
|
1463
|
+
this.shadowRoot.querySelector(".active") && (console.log("Adding event listener to active element"), this.shadowRoot.querySelector(".active").addEventListener("keydown", (t) => {
|
|
1464
|
+
console.log("test"), t.keyCode === 13 && this.collapseInput();
|
|
1465
|
+
}));
|
|
1466
|
+
}
|
|
1467
|
+
focus() {
|
|
1468
|
+
if (!this.shadowRoot) {
|
|
1469
|
+
console.warn("Input element is not yet connected to the DOM.");
|
|
1470
|
+
return;
|
|
1471
|
+
}
|
|
1472
|
+
if (!this.shadowRoot.querySelector("input")) {
|
|
1473
|
+
console.warn("Input element is not found in the shadow DOM.");
|
|
1474
|
+
return;
|
|
1475
|
+
}
|
|
1476
|
+
this.shadowRoot.querySelector("#search-input").focus();
|
|
1477
|
+
}
|
|
1478
|
+
expandInput() {
|
|
1479
|
+
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) => {
|
|
1480
|
+
t.key === "Enter" && this.collapseInput();
|
|
1481
|
+
}));
|
|
1482
|
+
}
|
|
1483
|
+
collapseInput() {
|
|
1484
|
+
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", {
|
|
1485
|
+
detail: {
|
|
1486
|
+
closed: !0
|
|
1487
|
+
},
|
|
1488
|
+
bubbles: !0,
|
|
1489
|
+
composed: !0
|
|
1490
|
+
})), this.requestUpdate());
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
function N() {
|
|
1494
|
+
typeof window < "u" && !customElements.get("cd-search") && customElements.define("cd-search", $);
|
|
1495
|
+
}
|
|
1496
|
+
s();
|
|
1497
|
+
class E extends r {
|
|
1498
|
+
static styles = a`
|
|
1499
|
+
@font-face {
|
|
1500
|
+
font-family: 'Geist';
|
|
1501
|
+
src: url(${o(i)}) format('woff');
|
|
1502
|
+
font-weight: 100 900;
|
|
1503
|
+
font-style: normal;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
.tab {
|
|
1507
|
+
font-family: 'Geist', sans-serif;
|
|
1508
|
+
display: inline-flex;
|
|
1509
|
+
flex-direction: row;
|
|
1510
|
+
align-items: center;
|
|
1511
|
+
cursor: pointer;
|
|
1512
|
+
box-sizing: border-box;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
.tab.lg {
|
|
1516
|
+
padding: 0 var(--tab-horizontal-padding-lg, 16px);
|
|
1517
|
+
height: var(--tab-height-lg, 48px);
|
|
1518
|
+
gap: var(--tab-inner-gap-lg, 12px);
|
|
1519
|
+
border-radius: var(--tab-border-radius-lg, 8px);
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
.tab.md {
|
|
1523
|
+
padding: 0 var(--tab-horizontal-padding-md, 14px);
|
|
1524
|
+
height: var(--tab-height-md, 40px);
|
|
1525
|
+
gap: var(--tab-inner-gap-md, 10px);
|
|
1526
|
+
border-radius: var(--tab-border-radius, 6px);
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
.tab.sm {
|
|
1530
|
+
padding: 0 var(--tab-horizontal-padding-sm, 12px);
|
|
1531
|
+
height: var(--tab-height-sm, 32px);
|
|
1532
|
+
gap: var(--tab-inner-gap-sm, 8px);
|
|
1533
|
+
border-radius: var(--tab-border-radius-sm, 4px);
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
.tab-outer.default {
|
|
1537
|
+
border-bottom: var(--tab-border-width, 1px) solid var(--tab-border-color, #C5CCD3);
|
|
1538
|
+
padding-bottom: var(--tab-interior-line-gap, 4px);
|
|
1539
|
+
color: var(--tab-text-color, #666666);
|
|
1540
|
+
--icon-stroke: var(--tab-icon-color, #666666);
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
.tab-outer.default.active {
|
|
1544
|
+
border-bottom: var(--tab-border-width-active, 2px) solid var(--tab-border-color-active, #1A1A1A);
|
|
1545
|
+
color: var(--tab-text-color-active, #1A1A1A);
|
|
1546
|
+
--icon-stroke: var(--tab-icon-color-active, #1A1A1A);
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
.tab-outer.pill {
|
|
1550
|
+
--icon-stroke: var(--tab-icon-color, #666666);
|
|
1551
|
+
color: var(--tab-text-color, #666666);
|
|
1552
|
+
margin-right: 6px;
|
|
1553
|
+
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
.tab.pill.active {
|
|
1557
|
+
color: var(--base-color-slate-50);
|
|
1558
|
+
background-color: var(--tab-pill-active-background-color, #1A1A1A);
|
|
1559
|
+
--icon-stroke: var(--base-color-slate-300);
|
|
1560
|
+
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
.tab.outline {
|
|
1564
|
+
--icon-stroke: var(--tab-icon-color, #666666);
|
|
1565
|
+
color: var(--tab-text-color, #666666);
|
|
1566
|
+
border-radius: var(--tab-border-radius, 6px) var(--tab-border-radius, 6px) 0 0;
|
|
1567
|
+
border: 1px solid transparent;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
.tab.outline.active {
|
|
1571
|
+
border-bottom:none;
|
|
1572
|
+
border-left: 1px solid var(--tab-border-color, #C5CCD3);
|
|
1573
|
+
border-right: 1px solid var(--tab-border-color, #C5CCD3);
|
|
1574
|
+
border-top: 1px solid var(--tab-border-color, #C5CCD3);
|
|
1575
|
+
color: var(--tab-text-color-active, #1A1A1A);
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
.tab.outline.active {
|
|
1579
|
+
border-bottom: none;
|
|
1580
|
+
margin-bottom: -2px;
|
|
1581
|
+
z-index: 2;
|
|
1582
|
+
background-color: var(--page-background, var(--base-color-white));
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
.tab:hover {
|
|
1586
|
+
background-color: var(--tab-background-hover, var(--base-color-slate-50));
|
|
1587
|
+
color: var(--tab-text-color-hover, #1A1A1A);
|
|
1588
|
+
transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
.tab.disabled {
|
|
1592
|
+
color: var(--base-color-slate-200);
|
|
1593
|
+
cursor: not-allowed;
|
|
1594
|
+
pointer-events: none;
|
|
1595
|
+
--icon-stroke: var(--base-color-slate-200);
|
|
1596
|
+
--icon-background-primary: var(--base-color-white);
|
|
1597
|
+
--icon-background-secondary: var(--base-color-white);
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
.tab:focus {
|
|
1601
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
1602
|
+
}
|
|
1603
|
+
`;
|
|
1604
|
+
static properties = {
|
|
1605
|
+
label: {
|
|
1606
|
+
type: String,
|
|
1607
|
+
reflect: !0
|
|
1608
|
+
},
|
|
1609
|
+
active: {
|
|
1610
|
+
type: Boolean,
|
|
1611
|
+
reflect: !0
|
|
1612
|
+
},
|
|
1613
|
+
disabled: {
|
|
1614
|
+
type: Boolean,
|
|
1615
|
+
reflect: !0
|
|
1616
|
+
},
|
|
1617
|
+
variant: {
|
|
1618
|
+
type: String,
|
|
1619
|
+
reflect: !0,
|
|
1620
|
+
attribute: "variant",
|
|
1621
|
+
converter: (t) => ["default", "pill", "outline"].includes(t) ? t : "default"
|
|
1622
|
+
},
|
|
1623
|
+
size: {
|
|
1624
|
+
type: String,
|
|
1625
|
+
reflect: !0
|
|
1626
|
+
}
|
|
1627
|
+
};
|
|
1628
|
+
constructor() {
|
|
1629
|
+
super(), this.label = "", this.active = !1, this.disabled = !1, this.variant = "default", this.size = "md";
|
|
1630
|
+
}
|
|
1631
|
+
render() {
|
|
1632
|
+
return e`
|
|
1633
|
+
<div class="tab-outer ${this.variant} ${this.active ? "active" : ""}" >
|
|
1634
|
+
<div class='tab ${this.variant} ${this.size} ${this.disabled ? "disabled" : ""} ${this.active ? "active" : ""}' tabindex="${this.disabled ? -1 : 0}">
|
|
1635
|
+
<slot name="start"></slot>
|
|
1636
|
+
<span class="label">${this.label}</span>
|
|
1637
|
+
<slot name="end"></slot>
|
|
1638
|
+
</div>
|
|
1639
|
+
</div>
|
|
1640
|
+
`;
|
|
1641
|
+
}
|
|
1642
|
+
toggleActive() {
|
|
1643
|
+
this.active = !this.active;
|
|
1644
|
+
}
|
|
1645
|
+
setActive(t) {
|
|
1646
|
+
if (typeof t != "boolean")
|
|
1647
|
+
throw new TypeError("Active must be a boolean");
|
|
1648
|
+
if (this.disabled)
|
|
1649
|
+
throw new Error("Cannot set active state when the tab is disabled");
|
|
1650
|
+
this.active = t;
|
|
1651
|
+
}
|
|
1652
|
+
setDisabled(t) {
|
|
1653
|
+
if (typeof t != "boolean")
|
|
1654
|
+
throw new TypeError("Disabled must be a boolean");
|
|
1655
|
+
if (this.active && t)
|
|
1656
|
+
throw new Error("Cannot disable an active tab");
|
|
1657
|
+
this.disabled = t;
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
function G() {
|
|
1661
|
+
typeof window < "u" && !customElements.get("cd-tab") && customElements.define("cd-tab", E);
|
|
1662
|
+
}
|
|
1663
|
+
class z extends r {
|
|
1664
|
+
static styles = a`
|
|
1665
|
+
@font-face {
|
|
1666
|
+
font-family: 'Geist';
|
|
1667
|
+
src: url(${o(i)}) format('woff');
|
|
1668
|
+
font-weight: normal;
|
|
1669
|
+
font-style: normal;
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
.container {
|
|
1673
|
+
display: flex;
|
|
1674
|
+
font-family: 'Geist', sans-serif;
|
|
1675
|
+
flex-direction: row;
|
|
1676
|
+
align-items: center;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
.container.outline {
|
|
1680
|
+
border-bottom: 1px solid var(--tab-border-color, #C5CCD3);
|
|
1681
|
+
gap: var(--tab-interior-line-gap, 4px);
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
|
|
1685
|
+
|
|
1686
|
+
|
|
1687
|
+
`;
|
|
1688
|
+
static properties = {
|
|
1689
|
+
variant: {
|
|
1690
|
+
type: String,
|
|
1691
|
+
reflect: !0,
|
|
1692
|
+
attribute: "variant",
|
|
1693
|
+
converter: (t) => ["default", "pill", "outline"].includes(t) ? t : "default",
|
|
1694
|
+
defaultValue: "default"
|
|
1695
|
+
}
|
|
1696
|
+
};
|
|
1697
|
+
render() {
|
|
1698
|
+
return e`
|
|
1699
|
+
<div class='container ${this.variant}'>
|
|
1700
|
+
<slot></slot>
|
|
1701
|
+
</div>
|
|
1702
|
+
`;
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
function F() {
|
|
1706
|
+
typeof window < "u" && !customElements.get("cd-tab-container") && customElements.define("cd-tab-container", z);
|
|
1707
|
+
}
|
|
1708
|
+
d();
|
|
1709
|
+
class S extends r {
|
|
1710
|
+
static formAssociated = !0;
|
|
1711
|
+
static distinctTimezones = [
|
|
1712
|
+
"Etc/GMT+12",
|
|
1713
|
+
"Pacific/Pago_Pago",
|
|
1714
|
+
"Pacific/Honolulu",
|
|
1715
|
+
"America/Anchorage",
|
|
1716
|
+
"America/Los_Angeles",
|
|
1717
|
+
"America/Denver",
|
|
1718
|
+
"America/Chicago",
|
|
1719
|
+
"America/New_York",
|
|
1720
|
+
"America/Halifax",
|
|
1721
|
+
"America/Argentina/Buenos_Aires",
|
|
1722
|
+
"America/Noronha",
|
|
1723
|
+
"Atlantic/Azores",
|
|
1724
|
+
"Europe/London",
|
|
1725
|
+
"Europe/Paris",
|
|
1726
|
+
"Europe/Bucharest",
|
|
1727
|
+
"Europe/Moscow",
|
|
1728
|
+
"Asia/Tehran",
|
|
1729
|
+
"Asia/Dubai",
|
|
1730
|
+
"Asia/Kabul",
|
|
1731
|
+
"Asia/Karachi",
|
|
1732
|
+
"Asia/Kolkata",
|
|
1733
|
+
"Asia/Kathmandu",
|
|
1734
|
+
"Asia/Dhaka",
|
|
1735
|
+
"Asia/Yangon",
|
|
1736
|
+
"Asia/Bangkok",
|
|
1737
|
+
"Asia/Shanghai",
|
|
1738
|
+
"Australia/Eucla",
|
|
1739
|
+
"Asia/Tokyo",
|
|
1740
|
+
"Australia/Darwin",
|
|
1741
|
+
"Australia/Sydney",
|
|
1742
|
+
"Australia/Lord_Howe",
|
|
1743
|
+
"Pacific/Noumea",
|
|
1744
|
+
"Pacific/Auckland",
|
|
1745
|
+
"Pacific/Chatham",
|
|
1746
|
+
"Pacific/Tongatapu",
|
|
1747
|
+
"Pacific/Kiritimati"
|
|
1748
|
+
];
|
|
1749
|
+
static styles = a`
|
|
1750
|
+
@font-face {
|
|
1751
|
+
font-family: 'Geist';
|
|
1752
|
+
src: url(${o(i)}) format('woff');
|
|
1753
|
+
font-weight: 100 900;
|
|
1754
|
+
font-style: normal;
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
input {
|
|
1758
|
+
box-sizing: border-box;
|
|
1759
|
+
padding: 0 var(--input-horizontal-inline-padding);
|
|
1760
|
+
height: 40px;
|
|
1761
|
+
border-width: var(--input-border-width);
|
|
1762
|
+
border-style: var(--input-border-style);
|
|
1763
|
+
border-color: var(--input-border-color);
|
|
1764
|
+
border-radius: var(--input-border-radius);
|
|
1765
|
+
background-color: var(--input-background-color);
|
|
1766
|
+
color: var(--input-text-color);
|
|
1767
|
+
width: var(--input-width);
|
|
1768
|
+
font-size: var(--input-font-size);
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
input:hover {
|
|
1772
|
+
border-color: var(--input-border-color-hover);
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
input:focus {
|
|
1776
|
+
background-color: var(--input-background-color-focus);
|
|
1777
|
+
color: var(--input-text-color-focus);
|
|
1778
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
1779
|
+
border: 1px solid var(--input-border-color-focus);
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
.disabled {
|
|
1783
|
+
background-color: var(--input-background-color-disabled);
|
|
1784
|
+
color: var(--input-text-color-disabled);
|
|
1785
|
+
border-color: var(--input-border-color-disabled);
|
|
1786
|
+
cursor: not-allowed;
|
|
1787
|
+
poiinter-events: none;
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
.disabled:hover {
|
|
1791
|
+
outline: none;
|
|
1792
|
+
border-color: var(--input-border-color-disabled);
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
.input-error {
|
|
1796
|
+
border-color: var(--input-error-border-color);
|
|
1797
|
+
color: var(--input-error-border-color);
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
.input-error:hover {
|
|
1801
|
+
border-color: var(--input-error-border-hover-color);
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
.input-error:focus {
|
|
1805
|
+
border-color: var(--input-error-border-color);
|
|
1806
|
+
outline: 2px solid var(--input-error-border-color);
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
.full-width {
|
|
1810
|
+
width: 100%;
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
.default {
|
|
1814
|
+
border-style: solid;
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
.dashed {
|
|
1818
|
+
border-style: dashed;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
.dotted {
|
|
1822
|
+
border-style: dotted;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
.lg {
|
|
1826
|
+
height: 50px;
|
|
1827
|
+
padding: 0 var(--input-horizontal-inline-padding-lg, 24px);
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
.sm {
|
|
1831
|
+
height: 36px;
|
|
1832
|
+
padding: 0 var(--input-horizontal-inline-padding-sm, 12px);
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
.container {
|
|
1836
|
+
display: flex;
|
|
1837
|
+
gap: var(--input-gap);
|
|
1838
|
+
flex-direction: row;
|
|
1839
|
+
align-items: center;
|
|
1840
|
+
}
|
|
1841
|
+
`;
|
|
1842
|
+
static properties = {
|
|
1843
|
+
value: {
|
|
1844
|
+
type: String,
|
|
1845
|
+
reflect: !0
|
|
1846
|
+
},
|
|
1847
|
+
shortcut: {
|
|
1848
|
+
type: String,
|
|
1849
|
+
reflect: !0
|
|
1850
|
+
},
|
|
1851
|
+
error: {
|
|
1852
|
+
type: Boolean,
|
|
1853
|
+
reflect: !0,
|
|
1854
|
+
attribute: "error"
|
|
1855
|
+
},
|
|
1856
|
+
disabled: {
|
|
1857
|
+
type: Boolean,
|
|
1858
|
+
reflect: !0
|
|
1859
|
+
},
|
|
1860
|
+
form: {
|
|
1861
|
+
type: String,
|
|
1862
|
+
reflect: !0,
|
|
1863
|
+
attribute: "form"
|
|
1864
|
+
},
|
|
1865
|
+
size: {
|
|
1866
|
+
type: String,
|
|
1867
|
+
reflect: !0,
|
|
1868
|
+
attribute: "size",
|
|
1869
|
+
converter: (t) => ["sm", "md", "lg"].includes(t) ? t : "md"
|
|
1870
|
+
},
|
|
1871
|
+
fullWidth: {
|
|
1872
|
+
type: Boolean,
|
|
1873
|
+
reflect: !0,
|
|
1874
|
+
attribute: "full-width"
|
|
1875
|
+
},
|
|
1876
|
+
variant: {
|
|
1877
|
+
type: String,
|
|
1878
|
+
reflect: !0,
|
|
1879
|
+
attribute: "variant",
|
|
1880
|
+
converter: (t) => ["dashed", "dotted"].includes(t) ? t : "default"
|
|
1881
|
+
},
|
|
1882
|
+
timezone: {
|
|
1883
|
+
type: String,
|
|
1884
|
+
reflect: !0,
|
|
1885
|
+
attribute: "timezone",
|
|
1886
|
+
converter: (t) => distinctTimezones.includes(t) ? t : "America/New_York"
|
|
1887
|
+
}
|
|
1888
|
+
};
|
|
1889
|
+
constructor() {
|
|
1890
|
+
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({
|
|
1891
|
+
customError: this.errorText && this.errorText.length > 0 || !1
|
|
1892
|
+
});
|
|
1893
|
+
}
|
|
1894
|
+
handleChange = (t) => (this.value = t.target.value, this._internals.setFormValue(this.value), this.dispatchEvent(new CustomEvent("change", {
|
|
1895
|
+
detail: {
|
|
1896
|
+
value: this.value
|
|
1897
|
+
},
|
|
1898
|
+
bubbles: !0,
|
|
1899
|
+
composed: !0
|
|
1900
|
+
})), this.value);
|
|
1901
|
+
handleInput = (t) => (this.value = t.target.value, this._internals.setFormValue(this.value), this.dispatchEvent(new CustomEvent("input", {
|
|
1902
|
+
detail: {
|
|
1903
|
+
value: this.value
|
|
1904
|
+
},
|
|
1905
|
+
bubbles: !0,
|
|
1906
|
+
composed: !0
|
|
1907
|
+
})), this.value);
|
|
1908
|
+
handleFocus = (t) => (this.value = t.target.value, this._internals.setFormValue(this.value), this.dispatchEvent(new CustomEvent("focus", {
|
|
1909
|
+
detail: {
|
|
1910
|
+
value: this.value
|
|
1911
|
+
},
|
|
1912
|
+
bubbles: !0,
|
|
1913
|
+
composed: !0
|
|
1914
|
+
})), this.value);
|
|
1915
|
+
handleBlur = (t) => (this.value = t.target.value, this._internals.setFormValue(this.value), this.dispatchEvent(new CustomEvent("blur", {
|
|
1916
|
+
detail: {
|
|
1917
|
+
value: this.value
|
|
1918
|
+
},
|
|
1919
|
+
bubbles: !0,
|
|
1920
|
+
composed: !0
|
|
1921
|
+
})), this.value);
|
|
1922
|
+
render() {
|
|
1923
|
+
return e`
|
|
1924
|
+
<div class='container'>
|
|
1925
|
+
<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}' />
|
|
1926
|
+
${this.shortcut ? e`<cd-button variant='primary' ?disabled='${this.disabled}'>${this.shortcut}</cd-button>` : ""}
|
|
1927
|
+
</div>
|
|
1928
|
+
|
|
1929
|
+
`;
|
|
1930
|
+
}
|
|
1931
|
+
firstUpdated() {
|
|
1932
|
+
if (!this.shadowRoot) {
|
|
1933
|
+
console.warn("Shadow DOM not available, DateComponent may not render correctly.");
|
|
1934
|
+
return;
|
|
1935
|
+
}
|
|
1936
|
+
this.shadowRoot.querySelector("cd-button") && this.shadowRoot.querySelector("cd-button").addEventListener("button-click", () => {
|
|
1937
|
+
this.setValue(this.dateNow()), this.dispatchEvent(new CustomEvent("change", {
|
|
1938
|
+
detail: {
|
|
1939
|
+
value: this.value
|
|
1940
|
+
},
|
|
1941
|
+
bubbles: !0,
|
|
1942
|
+
composed: !0
|
|
1943
|
+
}));
|
|
1944
|
+
});
|
|
1945
|
+
}
|
|
1946
|
+
dateNow() {
|
|
1947
|
+
let t = (/* @__PURE__ */ new Date()).toLocaleString("en-US", {
|
|
1948
|
+
timeZone: this.timezone
|
|
1949
|
+
});
|
|
1950
|
+
return new Date(t).toISOString().slice(0, 10);
|
|
1951
|
+
}
|
|
1952
|
+
setValue(t) {
|
|
1953
|
+
this.value = t, this._internals.setFormValue(t), this.requestUpdate();
|
|
1954
|
+
}
|
|
1955
|
+
setError(t) {
|
|
1956
|
+
if (typeof t != "error") {
|
|
1957
|
+
console.warn("Error text must be a string");
|
|
1958
|
+
return;
|
|
1959
|
+
}
|
|
1960
|
+
this.error = t, this._internals.setValidity({
|
|
1961
|
+
customError: t
|
|
1962
|
+
}), this.requestUpdate();
|
|
1963
|
+
}
|
|
1964
|
+
setDisabled(t) {
|
|
1965
|
+
this.disabled = t, this._internals.setValidity({
|
|
1966
|
+
customError: t
|
|
1967
|
+
}), this.requestUpdate();
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
function U() {
|
|
1971
|
+
typeof window < "u" && !customElements.get("cd-date") && customElements.define("cd-date", S);
|
|
1972
|
+
}
|
|
1973
|
+
d();
|
|
1974
|
+
class A extends r {
|
|
1975
|
+
static formAssociated = !0;
|
|
1976
|
+
static distinctTimezones = [
|
|
1977
|
+
"Etc/GMT+12",
|
|
1978
|
+
"Pacific/Pago_Pago",
|
|
1979
|
+
"Pacific/Honolulu",
|
|
1980
|
+
"America/Anchorage",
|
|
1981
|
+
"America/Los_Angeles",
|
|
1982
|
+
"America/Denver",
|
|
1983
|
+
"America/Chicago",
|
|
1984
|
+
"America/New_York",
|
|
1985
|
+
"America/Halifax",
|
|
1986
|
+
"America/Argentina/Buenos_Aires",
|
|
1987
|
+
"America/Noronha",
|
|
1988
|
+
"Atlantic/Azores",
|
|
1989
|
+
"Europe/London",
|
|
1990
|
+
"Europe/Paris",
|
|
1991
|
+
"Europe/Bucharest",
|
|
1992
|
+
"Europe/Moscow",
|
|
1993
|
+
"Asia/Tehran",
|
|
1994
|
+
"Asia/Dubai",
|
|
1995
|
+
"Asia/Kabul",
|
|
1996
|
+
"Asia/Karachi",
|
|
1997
|
+
"Asia/Kolkata",
|
|
1998
|
+
"Asia/Kathmandu",
|
|
1999
|
+
"Asia/Dhaka",
|
|
2000
|
+
"Asia/Yangon",
|
|
2001
|
+
"Asia/Bangkok",
|
|
2002
|
+
"Asia/Shanghai",
|
|
2003
|
+
"Australia/Eucla",
|
|
2004
|
+
"Asia/Tokyo",
|
|
2005
|
+
"Australia/Darwin",
|
|
2006
|
+
"Australia/Sydney",
|
|
2007
|
+
"Australia/Lord_Howe",
|
|
2008
|
+
"Pacific/Noumea",
|
|
2009
|
+
"Pacific/Auckland",
|
|
2010
|
+
"Pacific/Chatham",
|
|
2011
|
+
"Pacific/Tongatapu",
|
|
2012
|
+
"Pacific/Kiritimati"
|
|
2013
|
+
];
|
|
2014
|
+
static styles = a`
|
|
2015
|
+
@font-face {
|
|
2016
|
+
font-family: 'Geist';
|
|
2017
|
+
src: url(${o(i)}) format('woff');
|
|
2018
|
+
font-weight: 100 900;
|
|
2019
|
+
font-style: normal;
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
input {
|
|
2023
|
+
box-sizing: border-box;
|
|
2024
|
+
padding: 0 var(--input-horizontal-inline-padding);
|
|
2025
|
+
height: 40px;
|
|
2026
|
+
border-width: var(--input-border-width);
|
|
2027
|
+
border-style: var(--input-border-style);
|
|
2028
|
+
border-color: var(--input-border-color);
|
|
2029
|
+
border-radius: var(--input-border-radius);
|
|
2030
|
+
background-color: var(--input-background-color);
|
|
2031
|
+
color: var(--input-text-color);
|
|
2032
|
+
width: var(--input-width);
|
|
2033
|
+
font-size: var(--input-font-size);
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
input:hover {
|
|
2037
|
+
border-color: var(--input-border-color-hover);
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
input:focus {
|
|
2041
|
+
background-color: var(--input-background-color-focus);
|
|
2042
|
+
color: var(--input-text-color-focus);
|
|
2043
|
+
outline: 2px solid var(--input-border-color-focus);
|
|
2044
|
+
border: 1px solid var(--input-border-color-focus);
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
.disabled {
|
|
2048
|
+
background-color: var(--input-background-color-disabled);
|
|
2049
|
+
color: var(--input-text-color-disabled);
|
|
2050
|
+
border-color: var(--input-border-color-disabled);
|
|
2051
|
+
cursor: not-allowed;
|
|
2052
|
+
poiinter-events: none;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
.disabled:hover {
|
|
2056
|
+
outline: none;
|
|
2057
|
+
border-color: var(--input-border-color-disabled);
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
.input-error {
|
|
2061
|
+
border-color: var(--input-error-border-color);
|
|
2062
|
+
color: var(--input-error-border-color);
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
.input-error:hover {
|
|
2066
|
+
border-color: var(--input-error-border-hover-color);
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
.input-error:focus {
|
|
2070
|
+
border-color: var(--input-error-border-color);
|
|
2071
|
+
outline: 2px solid var(--input-error-border-color);
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
.full-width {
|
|
2075
|
+
width: 100%;
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
.default {
|
|
2079
|
+
border-style: solid;
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
.dashed {
|
|
2083
|
+
border-style: dashed;
|
|
2084
|
+
}
|
|
2085
|
+
|
|
2086
|
+
.dotted {
|
|
2087
|
+
border-style: dotted;
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
.lg {
|
|
2091
|
+
height: 50px;
|
|
2092
|
+
padding: 0 var(--input-horizontal-inline-padding-lg, 24px);
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
.sm {
|
|
2096
|
+
height: 36px;
|
|
2097
|
+
padding: 0 var(--input-horizontal-inline-padding-sm, 12px);
|
|
2098
|
+
}
|
|
2099
|
+
`;
|
|
2100
|
+
static properties = {
|
|
2101
|
+
value: {
|
|
2102
|
+
type: String,
|
|
2103
|
+
reflect: !0
|
|
2104
|
+
},
|
|
2105
|
+
shortcut: {
|
|
2106
|
+
type: String,
|
|
2107
|
+
reflect: !0
|
|
2108
|
+
},
|
|
2109
|
+
error: {
|
|
2110
|
+
type: Boolean,
|
|
2111
|
+
reflect: !0,
|
|
2112
|
+
attribute: "error"
|
|
2113
|
+
},
|
|
2114
|
+
disabled: {
|
|
2115
|
+
type: Boolean,
|
|
2116
|
+
reflect: !0
|
|
2117
|
+
},
|
|
2118
|
+
form: {
|
|
2119
|
+
type: String,
|
|
2120
|
+
reflect: !0,
|
|
2121
|
+
attribute: "form"
|
|
2122
|
+
},
|
|
2123
|
+
size: {
|
|
2124
|
+
type: String,
|
|
2125
|
+
reflect: !0,
|
|
2126
|
+
attribute: "size",
|
|
2127
|
+
converter: (t) => ["sm", "md", "lg"].includes(t) ? t : "md"
|
|
2128
|
+
},
|
|
2129
|
+
fullWidth: {
|
|
2130
|
+
type: Boolean,
|
|
2131
|
+
reflect: !0,
|
|
2132
|
+
attribute: "full-width"
|
|
2133
|
+
},
|
|
2134
|
+
variant: {
|
|
2135
|
+
type: String,
|
|
2136
|
+
reflect: !0,
|
|
2137
|
+
attribute: "variant",
|
|
2138
|
+
converter: (t) => ["dashed", "dotted"].includes(t) ? t : "default"
|
|
2139
|
+
},
|
|
2140
|
+
timezone: {
|
|
2141
|
+
type: String,
|
|
2142
|
+
reflect: !0,
|
|
2143
|
+
attribute: "timezone",
|
|
2144
|
+
converter: (t) => distinctTimezones.includes(t) ? t : "America/New_York"
|
|
2145
|
+
}
|
|
2146
|
+
};
|
|
2147
|
+
constructor() {
|
|
2148
|
+
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({
|
|
2149
|
+
customError: this.errorText && this.errorText.length > 0 || !1
|
|
2150
|
+
});
|
|
2151
|
+
}
|
|
2152
|
+
handleChange = (t) => (this.value = t.target.value, this._internals.setFormValue(this.value), this.dispatchEvent(new CustomEvent("change", {
|
|
2153
|
+
detail: {
|
|
2154
|
+
value: this.value
|
|
2155
|
+
},
|
|
2156
|
+
bubbles: !0,
|
|
2157
|
+
composed: !0
|
|
2158
|
+
})), this.value);
|
|
2159
|
+
handleInput = (t) => (this.value = t.target.value, this._internals.setFormValue(this.value), this.dispatchEvent(new CustomEvent("input", {
|
|
2160
|
+
detail: {
|
|
2161
|
+
value: this.value
|
|
2162
|
+
},
|
|
2163
|
+
bubbles: !0,
|
|
2164
|
+
composed: !0
|
|
2165
|
+
})), this.value);
|
|
2166
|
+
handleFocus = (t) => (this.value = t.target.value, this._internals.setFormValue(this.value), this.dispatchEvent(new CustomEvent("focus", {
|
|
2167
|
+
detail: {
|
|
2168
|
+
value: this.value
|
|
2169
|
+
},
|
|
2170
|
+
bubbles: !0,
|
|
2171
|
+
composed: !0
|
|
2172
|
+
})), this.value);
|
|
2173
|
+
handleBlur = (t) => (this.value = t.target.value, this._internals.setFormValue(this.value), this.dispatchEvent(new CustomEvent("blur", {
|
|
2174
|
+
detail: {
|
|
2175
|
+
value: this.value
|
|
2176
|
+
},
|
|
2177
|
+
bubbles: !0,
|
|
2178
|
+
composed: !0
|
|
2179
|
+
})), this.value);
|
|
2180
|
+
render() {
|
|
2181
|
+
return e`
|
|
2182
|
+
<input class='${this.error ? "input-error" : ""} ${this.disabled ? "disabled" : ""} ${this.fullWidth ? "full-width" : ""} ${this.variant} ${this.size}' type='time' id='${this.name | "time"}' name='${this.name | "time"}' .value='${this.value}' @change='${this.handleChange}' @focus='${this.handleFocus}' @blur='${this.handleBlur}' @input='${this.handleInput}' ?disabled='${this.disabled}' />
|
|
2183
|
+
${this.shortcut ? e`<cd-button variant='primary' ?disabled='${this.disabled}'>${this.shortcut}</cd-button>` : ""}
|
|
2184
|
+
`;
|
|
2185
|
+
}
|
|
2186
|
+
firstUpdated() {
|
|
2187
|
+
if (!this.shadowRoot) {
|
|
2188
|
+
console.warn("Shadow DOM not available, TimeComponent may not render correctly.");
|
|
2189
|
+
return;
|
|
2190
|
+
}
|
|
2191
|
+
this.shadowRoot.querySelector("cd-button") && this.shadowRoot.querySelector("cd-button").addEventListener("button-click", () => {
|
|
2192
|
+
this.setValue(this.timeNow()), this.dispatchEvent(new CustomEvent("change", {
|
|
2193
|
+
detail: {
|
|
2194
|
+
value: this.value
|
|
2195
|
+
},
|
|
2196
|
+
bubbles: !0,
|
|
2197
|
+
composed: !0
|
|
2198
|
+
}));
|
|
2199
|
+
});
|
|
2200
|
+
}
|
|
2201
|
+
timeNow() {
|
|
2202
|
+
console.log(this.timezone);
|
|
2203
|
+
let t = (/* @__PURE__ */ new Date()).toLocaleString("en-US", {
|
|
2204
|
+
timeZone: this.timezone || "America/New_York"
|
|
2205
|
+
});
|
|
2206
|
+
if (console.log(t), console.log(t.split(" ")[2]), t.split(" ")[2] === "PM") {
|
|
2207
|
+
let l = t.split(" ");
|
|
2208
|
+
console.log(l), t = Number(l[1].split(":")[0]) + 12 + ":" + l[1].split(":")[1] + ":" + l[1].split(":")[2];
|
|
2209
|
+
} else
|
|
2210
|
+
t = t.split(" ")[1];
|
|
2211
|
+
return t;
|
|
2212
|
+
}
|
|
2213
|
+
setValue(t) {
|
|
2214
|
+
this.value = t, this._internals.setFormValue(t), this.requestUpdate();
|
|
2215
|
+
}
|
|
2216
|
+
setError(t) {
|
|
2217
|
+
if (typeof t != "error") {
|
|
2218
|
+
console.warn("Error text must be a string");
|
|
2219
|
+
return;
|
|
2220
|
+
}
|
|
2221
|
+
this.error = t, this._internals.setValidity({
|
|
2222
|
+
customError: t
|
|
2223
|
+
}), this.requestUpdate();
|
|
2224
|
+
}
|
|
2225
|
+
setDisabled(t) {
|
|
2226
|
+
this.disabled = t, this._internals.setValidity({
|
|
2227
|
+
customError: t
|
|
2228
|
+
}), this.requestUpdate();
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
function K() {
|
|
2232
|
+
typeof window < "u" && !customElements.get("cd-time") && customElements.define("cd-time", A);
|
|
2233
|
+
}
|
|
2234
|
+
export {
|
|
2235
|
+
v as Button,
|
|
2236
|
+
S as DateComponent,
|
|
2237
|
+
b as Header,
|
|
2238
|
+
f as Input,
|
|
2239
|
+
g as NavBar,
|
|
2240
|
+
m as NavItem,
|
|
2241
|
+
w as NavProfile,
|
|
2242
|
+
$ as Search,
|
|
2243
|
+
E as Tab,
|
|
2244
|
+
z as TabContainer,
|
|
2245
|
+
y as Table,
|
|
2246
|
+
A as TimeComponent,
|
|
2247
|
+
x as ToolTip,
|
|
2248
|
+
k as Value,
|
|
2249
|
+
d as registerButton,
|
|
2250
|
+
U as registerDate,
|
|
2251
|
+
T as registerHeader,
|
|
2252
|
+
q as registerInput,
|
|
2253
|
+
V as registerNavBar,
|
|
2254
|
+
I as registerNavItem,
|
|
2255
|
+
L as registerNavProfile,
|
|
2256
|
+
N as registerSearch,
|
|
2257
|
+
G as registerTab,
|
|
2258
|
+
F as registerTabContainer,
|
|
2259
|
+
D as registerTable,
|
|
2260
|
+
K as registerTime,
|
|
2261
|
+
R as registerToolTip,
|
|
2262
|
+
P as registerValue
|
|
2263
|
+
};
|
|
2264
|
+
//# sourceMappingURL=index.es.js.map
|