@cargosense/cargo-design-system 1.0.0 → 1.0.1

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