@ds-gn/ui 0.10.0 → 0.11.0

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 (81) hide show
  1. package/README.md +4 -4
  2. package/custom-elements.json +5511 -2144
  3. package/dist/common/controllers/OverlayDismissController.d.ts +52 -0
  4. package/dist/common/controllers/OverlayPositionController.d.ts +168 -0
  5. package/dist/common/controllers/RovingFocusController.d.ts +99 -0
  6. package/dist/common/helpers/field-control.d.ts +35 -0
  7. package/dist/common/helpers/listbox-navigation.d.ts +50 -0
  8. package/dist/common/props/size/size.props.d.ts +11 -0
  9. package/dist/common/styles/overlay-panel.styles.d.ts +55 -0
  10. package/dist/components/Button/src/Button.d.ts +20 -0
  11. package/dist/components/Button/src/Button.js +28 -0
  12. package/dist/components/DropdownMenu/src/DropdownMenu.d.ts +150 -0
  13. package/dist/components/DropdownMenu/src/DropdownMenu.js +1550 -0
  14. package/dist/components/DropdownMenu/src/DropdownMenu.playground.d.ts +2 -0
  15. package/dist/components/DropdownMenu/src/DropdownMenu.props.d.ts +47 -0
  16. package/dist/components/DropdownMenu/src/DropdownMenu.props.js +54 -0
  17. package/dist/components/DropdownMenu/src/DropdownMenu.styles.d.ts +20 -0
  18. package/dist/components/Field/src/Field.d.ts +39 -0
  19. package/dist/components/Field/src/Field.js +203 -0
  20. package/dist/components/Field/src/Field.playground.d.ts +2 -0
  21. package/dist/components/Field/src/Field.styles.d.ts +6 -0
  22. package/dist/components/Icon/src/Icon.d.ts +5 -0
  23. package/dist/components/Icon/src/Icon.js +3 -0
  24. package/dist/components/Icon/src/icons/arrow-down.d.ts +1 -0
  25. package/dist/components/Icon/src/icons/arrow-down.js +6 -0
  26. package/dist/components/Icon/src/icons/arrow-up.d.ts +1 -0
  27. package/dist/components/Icon/src/icons/arrow-up.js +6 -0
  28. package/dist/components/Icon/src/icons/chevrons-up-down.d.ts +1 -0
  29. package/dist/components/Icon/src/icons/chevrons-up-down.js +6 -0
  30. package/dist/components/Icon/src/icons/cookie.d.ts +1 -0
  31. package/dist/components/Icon/src/icons/cookie.js +6 -0
  32. package/dist/components/Icon/src/icons/icon-names.d.ts +1 -1
  33. package/dist/components/Icon/src/icons/icon-names.js +4 -0
  34. package/dist/components/Icon/src/icons/index.d.ts +4 -0
  35. package/dist/components/Icon/src/icons/index.js +4 -0
  36. package/dist/components/Input/src/Input.d.ts +37 -0
  37. package/dist/components/Input/src/Input.js +300 -143
  38. package/dist/components/Input/src/Input.props.d.ts +2 -1
  39. package/dist/components/Input/src/Input.props.js +12 -6
  40. package/dist/components/Input/src/Input.styles.d.ts +12 -4
  41. package/dist/components/Modal/src/Modal.d.ts +1 -0
  42. package/dist/components/Modal/src/Modal.js +1 -0
  43. package/dist/components/Nav/src/Nav.js +2 -1
  44. package/dist/components/NavLink/src/NavLink.d.ts +14 -30
  45. package/dist/components/NavLink/src/NavLink.js +201 -65
  46. package/dist/components/Select/src/Select.d.ts +157 -0
  47. package/dist/components/Select/src/Select.js +1766 -0
  48. package/dist/components/Select/src/Select.playground.d.ts +2 -0
  49. package/dist/components/Select/src/Select.props.d.ts +19 -0
  50. package/dist/components/Select/src/Select.props.js +40 -0
  51. package/dist/components/Select/src/Select.styles.d.ts +30 -0
  52. package/dist/components/Table/src/Table.d.ts +93 -0
  53. package/dist/components/Table/src/Table.js +1105 -0
  54. package/dist/components/Table/src/Table.playground.d.ts +2 -0
  55. package/dist/components/Table/src/Table.props.d.ts +53 -0
  56. package/dist/components/Table/src/Table.props.js +18 -0
  57. package/dist/components/Table/src/Table.styles.d.ts +33 -0
  58. package/dist/components/Toaster/src/Toaster.d.ts +174 -0
  59. package/dist/components/Toaster/src/Toaster.js +1489 -0
  60. package/dist/components/Toaster/src/Toaster.playground.d.ts +2 -0
  61. package/dist/components/Toaster/src/Toaster.props.d.ts +14 -0
  62. package/dist/components/Toaster/src/Toaster.props.js +81 -0
  63. package/dist/components/Toaster/src/Toaster.styles.d.ts +52 -0
  64. package/dist/components/Toaster/src/toast.d.ts +115 -0
  65. package/dist/components/Toaster/src/toast.js +74 -0
  66. package/dist/playground/types.d.ts +27 -0
  67. package/dist/playground-manifest.d.ts +3 -2
  68. package/dist/playground-manifest.js +507 -7
  69. package/dist/react/DropdownMenu.d.ts +8 -0
  70. package/dist/react/DropdownMenu.js +13 -0
  71. package/dist/react/Field.d.ts +6 -0
  72. package/dist/react/Field.js +13 -0
  73. package/dist/react/Select.d.ts +8 -0
  74. package/dist/react/Select.js +13 -0
  75. package/dist/react/Table.d.ts +8 -0
  76. package/dist/react/Table.js +13 -0
  77. package/dist/react/Toaster.d.ts +8 -0
  78. package/dist/react/Toaster.js +13 -0
  79. package/dist/react/index.d.ts +6 -0
  80. package/dist/react/index.js +6 -0
  81. package/package.json +52 -2
@@ -0,0 +1,1766 @@
1
+ var __legacyDecorateClassTS = function(decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
4
+ r = Reflect.decorate(decorators, target, key, desc);
5
+ else
6
+ for (var i = decorators.length - 1;i >= 0; i--)
7
+ if (d = decorators[i])
8
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
10
+ };
11
+
12
+ // components/Select/src/Select.ts
13
+ import { MotionController } from "@ds-gn/motion/lit";
14
+ import { html as html2, nothing } from "lit";
15
+ import { property, query, state } from "lit/decorators.js";
16
+
17
+ // common/Base/Base.ts
18
+ import { html, LitElement } from "lit";
19
+
20
+ // common/helpers/define-element.ts
21
+ var defineElement = (tag, ctor) => {
22
+ if (typeof customElements === "undefined")
23
+ return;
24
+ if (!customElements.get(tag))
25
+ customElements.define(tag, ctor);
26
+ };
27
+
28
+ // common/Base/Base.css
29
+ import { css } from "lit";
30
+ var styles = css`/* Base reset in @layer base ensures it comes before utilities in Tailwind v4 cascade
31
+ This prevents the reset from overriding component utility classes */
32
+ @layer base {
33
+ :host {
34
+ display: block;
35
+ box-sizing: border-box;
36
+ line-height: 1.5;
37
+ -webkit-text-size-adjust: 100%;
38
+ tab-size: 4;
39
+ font-family: var(
40
+ --default-font-family,
41
+ var(--font-sans, ui-sans-serif, system-ui, sans-serif)
42
+ );
43
+ }
44
+
45
+ *,
46
+ *::before,
47
+ *::after {
48
+ box-sizing: inherit;
49
+ margin: 0;
50
+ padding: 0;
51
+ border: 0 solid;
52
+ }
53
+
54
+ :host h1,
55
+ :host h2,
56
+ :host h3,
57
+ :host h4,
58
+ :host h5,
59
+ :host h6 {
60
+ font-size: inherit;
61
+ font-weight: inherit;
62
+ margin: 0;
63
+ padding: 0;
64
+ }
65
+ }
66
+ `;
67
+ var Base_default = styles;
68
+
69
+ // common/Base/Base.ts
70
+ class Base extends LitElement {
71
+ static styles = Base_default;
72
+ updateTheme(changedProperties, surface) {
73
+ if (changedProperties.has("surface")) {
74
+ if (surface) {
75
+ this.setAttribute("data-theme", surface);
76
+ } else {
77
+ this.removeAttribute("data-theme");
78
+ }
79
+ }
80
+ }
81
+ emit(name, detail, options = {}) {
82
+ return this.dispatchEvent(new CustomEvent(name, {
83
+ detail,
84
+ bubbles: true,
85
+ composed: true,
86
+ cancelable: options.cancelable ?? false
87
+ }));
88
+ }
89
+ render() {
90
+ return html`<slot></slot>`;
91
+ }
92
+ }
93
+ defineElement("dsgn-base", Base);
94
+
95
+ // common/controllers/OverlayDismissController.ts
96
+ class OverlayDismissController {
97
+ constructor(host, options) {
98
+ this.listening = false;
99
+ this.wantsOutside = false;
100
+ this.handleDocumentPointerDown = (event) => {
101
+ if (!event.composedPath().includes(this.host)) {
102
+ this.options.onDismiss("outside");
103
+ }
104
+ };
105
+ this.host = host;
106
+ this.options = options;
107
+ host.addController(this);
108
+ }
109
+ start() {
110
+ this.wantsOutside = true;
111
+ this.listen();
112
+ }
113
+ stop() {
114
+ this.wantsOutside = false;
115
+ this.unlisten();
116
+ }
117
+ handleKeydown(event) {
118
+ if (event.key !== "Escape" || !this.options.isOpen()) {
119
+ return false;
120
+ }
121
+ this.options.onDismiss("escape");
122
+ this.options.returnFocusTo?.()?.focus();
123
+ return true;
124
+ }
125
+ hostConnected() {
126
+ if (this.wantsOutside) {
127
+ this.listen();
128
+ }
129
+ }
130
+ hostDisconnected() {
131
+ this.unlisten();
132
+ }
133
+ listen() {
134
+ if (this.listening || typeof document === "undefined") {
135
+ return;
136
+ }
137
+ this.listening = true;
138
+ document.addEventListener("pointerdown", this.handleDocumentPointerDown);
139
+ }
140
+ unlisten() {
141
+ if (!this.listening) {
142
+ return;
143
+ }
144
+ this.listening = false;
145
+ document.removeEventListener("pointerdown", this.handleDocumentPointerDown);
146
+ }
147
+ }
148
+
149
+ // common/helpers/layout-change.ts
150
+ var listenersByTarget = new Map;
151
+ var observer;
152
+ var lastDocumentWidth;
153
+ var handleEntries = (entries) => {
154
+ const notify = new Set;
155
+ for (const entry of entries) {
156
+ if (entry.target !== document.documentElement) {
157
+ for (const listener of listenersByTarget.get(entry.target) ?? []) {
158
+ notify.add(listener);
159
+ }
160
+ continue;
161
+ }
162
+ const { width } = entry.contentRect;
163
+ if (width === lastDocumentWidth) {
164
+ continue;
165
+ }
166
+ lastDocumentWidth = width;
167
+ for (const listeners of listenersByTarget.values()) {
168
+ for (const listener of listeners) {
169
+ notify.add(listener);
170
+ }
171
+ }
172
+ }
173
+ for (const listener of notify) {
174
+ listener();
175
+ }
176
+ };
177
+ var observeLayoutChanges = (target, listener) => {
178
+ if (typeof ResizeObserver === "undefined" || typeof document === "undefined") {
179
+ return () => {};
180
+ }
181
+ if (!observer) {
182
+ lastDocumentWidth = undefined;
183
+ observer = new ResizeObserver(handleEntries);
184
+ observer.observe(document.documentElement);
185
+ }
186
+ let listeners = listenersByTarget.get(target);
187
+ if (!listeners) {
188
+ listeners = new Set;
189
+ listenersByTarget.set(target, listeners);
190
+ observer.observe(target);
191
+ }
192
+ listeners.add(listener);
193
+ return () => {
194
+ const current = listenersByTarget.get(target);
195
+ if (!current?.delete(listener)) {
196
+ return;
197
+ }
198
+ if (current.size === 0) {
199
+ listenersByTarget.delete(target);
200
+ observer?.unobserve(target);
201
+ }
202
+ if (listenersByTarget.size === 0) {
203
+ observer?.disconnect();
204
+ observer = undefined;
205
+ lastDocumentWidth = undefined;
206
+ }
207
+ };
208
+ };
209
+
210
+ // common/controllers/OverlayPositionController.ts
211
+ var overlayViewportGutter = 16;
212
+ var computeOverlayAvailableHeight = (viewport, viewportHeight, gutter = overlayViewportGutter) => Math.max(0, viewportHeight - (viewport.top ?? viewport.bottom ?? 0) - gutter);
213
+ var computeViewportPosition = (anchor, { placement, shift }, viewportHeight, offset = 0) => {
214
+ const below = placement.startsWith("bottom");
215
+ return {
216
+ left: anchor.left + shift,
217
+ top: below ? anchor.bottom + offset : null,
218
+ bottom: below ? null : viewportHeight - anchor.top + offset,
219
+ anchorWidth: anchor.width
220
+ };
221
+ };
222
+ var computeOverlayShift = (anchor, overlayWidth, viewportWidth, gutter = overlayViewportGutter, align = "start") => {
223
+ const viewportRight = viewportWidth - gutter;
224
+ const startFits = anchor.left + overlayWidth <= viewportRight;
225
+ const endAligned = anchor.width - overlayWidth;
226
+ const endFits = anchor.left + endAligned >= gutter;
227
+ if (!overlayWidth) {
228
+ return 0;
229
+ }
230
+ if (align === "end") {
231
+ if (endFits)
232
+ return endAligned;
233
+ return startFits ? 0 : viewportRight - overlayWidth - anchor.left;
234
+ }
235
+ if (startFits)
236
+ return 0;
237
+ return endFits ? endAligned : gutter - anchor.left;
238
+ };
239
+ var computeOverlayPlacement = (anchor, overlayHeight, viewportHeight, {
240
+ gutter = overlayViewportGutter,
241
+ offset = 0,
242
+ align = "start"
243
+ } = {}) => {
244
+ const below = viewportHeight - gutter - anchor.bottom - offset;
245
+ const above = anchor.top - gutter - offset;
246
+ const flips = !!overlayHeight && overlayHeight > below && (overlayHeight <= above || above > below);
247
+ return `${flips ? "top" : "bottom"}-${align}`;
248
+ };
249
+ var sizeOf = (overlay) => {
250
+ if (overlay.offsetWidth) {
251
+ return { width: overlay.offsetWidth, height: overlay.offsetHeight };
252
+ }
253
+ const { width, height } = overlay.getBoundingClientRect();
254
+ return { width, height };
255
+ };
256
+ var measureOverlay = (overlay) => {
257
+ const open = sizeOf(overlay);
258
+ if (open.width) {
259
+ return open;
260
+ }
261
+ const inline = overlay.style.cssText;
262
+ overlay.style.display = "block";
263
+ overlay.style.visibility = "hidden";
264
+ const size = sizeOf(overlay);
265
+ overlay.style.cssText = inline;
266
+ return size;
267
+ };
268
+
269
+ class OverlayPositionController {
270
+ constructor(host, options) {
271
+ this.wantsUpdates = false;
272
+ this.update = () => {
273
+ const anchor = this.options.anchor?.() ?? this.host;
274
+ const overlay = this.options.overlay();
275
+ if (!anchor || !overlay) {
276
+ return;
277
+ }
278
+ const anchorRect = anchor.getBoundingClientRect();
279
+ this.options.beforeMeasure?.(anchorRect);
280
+ const { width, height } = measureOverlay(overlay);
281
+ const gutter = this.options.gutter ?? overlayViewportGutter;
282
+ const offset = this.options.offset ?? 0;
283
+ const align = this.options.align?.() ?? "start";
284
+ const shift = computeOverlayShift(anchorRect, width, window.innerWidth, gutter, align);
285
+ const placement = this.options.flip ? computeOverlayPlacement(anchorRect, height, window.innerHeight, {
286
+ gutter,
287
+ offset,
288
+ align
289
+ }) : `bottom-${align}`;
290
+ this._position = {
291
+ shift,
292
+ placement,
293
+ viewport: computeViewportPosition(anchorRect, { placement, shift }, window.innerHeight, offset)
294
+ };
295
+ this.options.apply(this._position);
296
+ };
297
+ this.scheduleUpdate = () => {
298
+ if (this.frame !== undefined) {
299
+ return;
300
+ }
301
+ this.frame = requestAnimationFrame(() => {
302
+ this.frame = undefined;
303
+ this.update();
304
+ });
305
+ };
306
+ this.host = host;
307
+ this.options = options;
308
+ host.addController(this);
309
+ }
310
+ get position() {
311
+ return this._position;
312
+ }
313
+ start() {
314
+ this.wantsUpdates = true;
315
+ this.subscribe();
316
+ this.update();
317
+ }
318
+ stop() {
319
+ this.wantsUpdates = false;
320
+ this.unsubscribeAll();
321
+ this._position = undefined;
322
+ this.options.clear?.();
323
+ }
324
+ hostConnected() {
325
+ if (this.wantsUpdates) {
326
+ this.subscribe();
327
+ }
328
+ }
329
+ hostDisconnected() {
330
+ this.unsubscribeAll();
331
+ }
332
+ subscribe() {
333
+ if (this.unsubscribe) {
334
+ return;
335
+ }
336
+ const stopLayout = observeLayoutChanges(this.host, this.update);
337
+ if (!this.options.trackViewport || typeof window === "undefined") {
338
+ this.unsubscribe = stopLayout;
339
+ return;
340
+ }
341
+ const listenerOptions = { capture: true, passive: true };
342
+ window.addEventListener("scroll", this.scheduleUpdate, listenerOptions);
343
+ window.addEventListener("resize", this.scheduleUpdate, listenerOptions);
344
+ this.unsubscribe = () => {
345
+ stopLayout();
346
+ window.removeEventListener("scroll", this.scheduleUpdate, true);
347
+ window.removeEventListener("resize", this.scheduleUpdate, true);
348
+ };
349
+ }
350
+ unsubscribeAll() {
351
+ this.unsubscribe?.();
352
+ this.unsubscribe = undefined;
353
+ if (this.frame !== undefined) {
354
+ cancelAnimationFrame(this.frame);
355
+ this.frame = undefined;
356
+ }
357
+ }
358
+ }
359
+
360
+ // common/helpers/field-control.ts
361
+ var FIELD_CONTROL = Symbol.for("dsgn.field-control");
362
+ var markFieldControl = (ctor) => {
363
+ Object.defineProperty(ctor, FIELD_CONTROL, { value: true });
364
+ };
365
+ var describedBy = (...ids) => {
366
+ const value = ids.filter(Boolean).join(" ");
367
+ return value || undefined;
368
+ };
369
+
370
+ // common/helpers/listbox-navigation.ts
371
+ var stepEnabled = (items, from, dir) => {
372
+ for (let i = from + dir;i >= 0 && i < items.length; i += dir) {
373
+ if (!items[i].disabled)
374
+ return i;
375
+ }
376
+ return from;
377
+ };
378
+ var firstEnabled = (items) => stepEnabled(items, -1, 1);
379
+ var lastEnabled = (items) => {
380
+ const last = stepEnabled(items, items.length, -1);
381
+ return last === items.length ? -1 : last;
382
+ };
383
+ var isPrintableKey = (event) => event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;
384
+ var typeaheadTimeout = 500;
385
+
386
+ class TypeaheadBuffer {
387
+ constructor(timeout = typeaheadTimeout) {
388
+ this.timeout = timeout;
389
+ this.buffer = "";
390
+ }
391
+ get active() {
392
+ return this.buffer.length > 0;
393
+ }
394
+ search(items, char, from, labelOf, { cycle = true } = {}) {
395
+ this.buffer += char.toLowerCase();
396
+ clearTimeout(this.timer);
397
+ this.timer = setTimeout(() => this.clear(), this.timeout);
398
+ const repeated = [...this.buffer].every((key) => key === this.buffer[0]);
399
+ const search = repeated ? this.buffer[0] : this.buffer;
400
+ const start = cycle && search.length === 1 ? from + 1 : Math.max(from, 0);
401
+ for (let n = 0;n < items.length; n++) {
402
+ const i = (start + n) % items.length;
403
+ const item = items[i];
404
+ if (!item.disabled && labelOf(item).toLowerCase().startsWith(search)) {
405
+ return i;
406
+ }
407
+ }
408
+ return -1;
409
+ }
410
+ clear() {
411
+ clearTimeout(this.timer);
412
+ this.timer = undefined;
413
+ this.buffer = "";
414
+ }
415
+ }
416
+
417
+ // common/helpers/enum-validator.ts
418
+ var enumValidator = (propName, enumSet, candidateValue) => {
419
+ if (!enumSet.has(candidateValue)) {
420
+ throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
421
+ }
422
+ };
423
+
424
+ // common/helpers/enum-creator.ts
425
+ var enumCreator = (acceptableValues, propName, type, other = {}) => {
426
+ const acceptableValuesSet = new Set(acceptableValues);
427
+ return {
428
+ type,
429
+ hasChanged(newValue, oldValue) {
430
+ if (newValue !== oldValue) {
431
+ enumValidator(propName, acceptableValuesSet, newValue);
432
+ return true;
433
+ }
434
+ return false;
435
+ },
436
+ ...other
437
+ };
438
+ };
439
+
440
+ // common/props/surface/surface.props.ts
441
+ var surfaceValues = {
442
+ LIGHT: "light",
443
+ DARK: "dark"
444
+ };
445
+ var surfaceProps = enumCreator(Object.values(surfaceValues), "surface", String, { reflect: true });
446
+
447
+ // common/styles/overlay-panel.styles.ts
448
+ var overlayPositionProperties = {
449
+ shift: "--dsgn-overlay-shift",
450
+ left: "--dsgn-overlay-left",
451
+ top: "--dsgn-overlay-top",
452
+ bottom: "--dsgn-overlay-bottom",
453
+ width: "--dsgn-overlay-width",
454
+ maxHeight: "--dsgn-overlay-max-height"
455
+ };
456
+ var overlayPanelOffset = 4;
457
+ var originClasses = {
458
+ "bottom-start": "origin-top-left",
459
+ "top-start": "origin-bottom-left",
460
+ "bottom-end": "origin-top-right",
461
+ "top-end": "origin-bottom-right"
462
+ };
463
+ var anchoredPlacementClasses = {
464
+ "bottom-start": "top-[calc(100%+4px)]",
465
+ "top-start": "bottom-[calc(100%+4px)]",
466
+ "bottom-end": "top-[calc(100%+4px)]",
467
+ "top-end": "bottom-[calc(100%+4px)]"
468
+ };
469
+ var anchoredClasses = (placement) => [
470
+ "absolute",
471
+ "z-50",
472
+ "left-[var(--dsgn-overlay-shift,0px)]",
473
+ anchoredPlacementClasses[placement]
474
+ ];
475
+ var topLayerClasses = [
476
+ "fixed",
477
+ "inset-auto",
478
+ "m-0",
479
+ "left-[var(--dsgn-overlay-left,0px)]",
480
+ "top-[var(--dsgn-overlay-top,auto)]",
481
+ "bottom-[var(--dsgn-overlay-bottom,auto)]"
482
+ ];
483
+ var surfaceClasses = [
484
+ "box-border",
485
+ "flex",
486
+ "flex-col",
487
+ "gap-0.5",
488
+ "p-1",
489
+ "rounded-lg",
490
+ "border",
491
+ "border-popover-border",
492
+ "bg-popover-bg",
493
+ "[box-shadow:var(--shadow-popover)]",
494
+ "outline-none"
495
+ ];
496
+ var overlayPanelClasses = ({ visible, open, topLayer }, placement) => [
497
+ ...topLayer ? topLayerClasses : anchoredClasses(placement),
498
+ ...surfaceClasses,
499
+ originClasses[placement],
500
+ ...open ? [] : ["pointer-events-none"],
501
+ ...visible ? [] : ["hidden"]
502
+ ];
503
+ var overlayItemClasses = ({
504
+ active,
505
+ disabled,
506
+ tone
507
+ }) => {
508
+ const text = tone?.text ?? "text-input-text";
509
+ const fill = tone?.activeFill ?? "bg-surface-subtle";
510
+ return [
511
+ "flex",
512
+ "items-center",
513
+ "shrink-0",
514
+ "pl-2",
515
+ "pr-2.5",
516
+ "rounded-md",
517
+ "font-sans",
518
+ "select-none",
519
+ ...disabled ? ["text-input-text-disabled", "cursor-default"] : [text, "cursor-pointer"],
520
+ ...active ? [fill] : []
521
+ ];
522
+ };
523
+ // components/Icon/src/icons/check.ts
524
+ import { svg } from "lit";
525
+ var check = svg`<path d="M20 6 9 17l-5-5" />`;
526
+ // components/Icon/src/icons/chevron-down.ts
527
+ import { svg as svg2 } from "lit";
528
+ var chevronDown = svg2`<path d="m6 9 6 6 6-6" />`;
529
+ // components/Icon/src/icons/circle-alert.ts
530
+ import { svg as svg3 } from "lit";
531
+ var circleAlert = svg3`<circle cx="12" cy="12" r="10" /><line x1="12" x2="12" y1="8" y2="12" /><line x1="12" x2="12.01" y1="16" y2="16" />`;
532
+ // components/Select/src/Select.css
533
+ import { css as css2 } from "lit";
534
+ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
535
+ @layer properties;
536
+ @layer theme {
537
+ :root, :host {
538
+ --font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
539
+ 'Noto Color Emoji';
540
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
541
+ monospace;
542
+ --spacing: 0.25rem;
543
+ --text-xs: 0.75rem;
544
+ --text-xs--line-height: calc(1 / 0.75);
545
+ --text-sm: 0.875rem;
546
+ --text-sm--line-height: calc(1.25 / 0.875);
547
+ --text-base: 1rem;
548
+ --text-base--line-height: calc(1.5 / 1);
549
+ --font-weight-medium: 500;
550
+ --radius-md: 0.375rem;
551
+ --radius-lg: 0.5rem;
552
+ --ease-out: cubic-bezier(0, 0, 0.2, 1);
553
+ --default-transition-duration: 150ms;
554
+ --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
555
+ --ease-emphasized: var(--dsgn-src-ease-emphasized, cubic-bezier(0.16, 1, 0.3, 1));
556
+ --radius-control: var(--dsgn-src-radius-control, 0.375rem);
557
+ --radius-input: var(--dsgn-src-radius-input, var(--radius-control));
558
+ --color-error: inherit;
559
+ --color-error-strong: inherit;
560
+ --color-focus: inherit;
561
+ --color-input-bg: inherit;
562
+ --color-input-bg-disabled: inherit;
563
+ --color-input-border: inherit;
564
+ --color-input-border-disabled: inherit;
565
+ --color-input-border-hover: inherit;
566
+ --color-input-error-ring: inherit;
567
+ --color-input-error-text: inherit;
568
+ --color-input-focus: inherit;
569
+ --color-input-focus-ring: inherit;
570
+ --color-input-placeholder: inherit;
571
+ --color-input-text: inherit;
572
+ --color-input-text-disabled: inherit;
573
+ --color-popover-bg: inherit;
574
+ --color-popover-border: inherit;
575
+ --color-surface-subtle: inherit;
576
+ --color-text-primary: inherit;
577
+ --color-text-secondary: inherit;
578
+ --shadow-popover: inherit;
579
+ }
580
+ }
581
+ @layer utilities {
582
+ .pointer-events-none {
583
+ pointer-events: none;
584
+ }
585
+ .visible {
586
+ visibility: visible;
587
+ }
588
+ .absolute {
589
+ position: absolute;
590
+ }
591
+ .fixed {
592
+ position: fixed;
593
+ }
594
+ .relative {
595
+ position: relative;
596
+ }
597
+ .static {
598
+ position: static;
599
+ }
600
+ .inset-auto {
601
+ inset: auto;
602
+ }
603
+ .top-\\[calc\\(100\\%\\+4px\\)\\] {
604
+ top: calc(100% + 4px);
605
+ }
606
+ .top-\\[var\\(--dsgn-overlay-top\\,auto\\)\\] {
607
+ top: var(--dsgn-overlay-top,auto);
608
+ }
609
+ .bottom-\\[calc\\(100\\%\\+4px\\)\\] {
610
+ bottom: calc(100% + 4px);
611
+ }
612
+ .bottom-\\[var\\(--dsgn-overlay-bottom\\,auto\\)\\] {
613
+ bottom: var(--dsgn-overlay-bottom,auto);
614
+ }
615
+ .left-\\[var\\(--dsgn-overlay-left\\,0px\\)\\] {
616
+ left: var(--dsgn-overlay-left,0px);
617
+ }
618
+ .left-\\[var\\(--dsgn-overlay-shift\\,0px\\)\\] {
619
+ left: var(--dsgn-overlay-shift,0px);
620
+ }
621
+ .z-50 {
622
+ z-index: 50;
623
+ }
624
+ .m-0 {
625
+ margin: calc(var(--spacing) * 0);
626
+ }
627
+ .ml-auto {
628
+ margin-left: auto;
629
+ }
630
+ .box-border {
631
+ box-sizing: border-box;
632
+ }
633
+ .block {
634
+ display: block;
635
+ }
636
+ .flex {
637
+ display: flex;
638
+ }
639
+ .hidden {
640
+ display: none;
641
+ }
642
+ .table {
643
+ display: table;
644
+ }
645
+ .size-3\\.5 {
646
+ width: calc(var(--spacing) * 3.5);
647
+ height: calc(var(--spacing) * 3.5);
648
+ }
649
+ .size-4 {
650
+ width: calc(var(--spacing) * 4);
651
+ height: calc(var(--spacing) * 4);
652
+ }
653
+ .size-\\[18px\\] {
654
+ width: 18px;
655
+ height: 18px;
656
+ }
657
+ .h-8 {
658
+ height: calc(var(--spacing) * 8);
659
+ }
660
+ .h-9 {
661
+ height: calc(var(--spacing) * 9);
662
+ }
663
+ .h-10 {
664
+ height: calc(var(--spacing) * 10);
665
+ }
666
+ .h-12 {
667
+ height: calc(var(--spacing) * 12);
668
+ }
669
+ .max-h-\\[min\\(20rem\\,var\\(--dsgn-overlay-max-height\\,20rem\\)\\)\\] {
670
+ max-height: min(20rem, var(--dsgn-overlay-max-height,20rem));
671
+ }
672
+ .w-\\[var\\(--dsgn-overlay-width\\,auto\\)\\] {
673
+ width: var(--dsgn-overlay-width,auto);
674
+ }
675
+ .w-fit {
676
+ width: fit-content;
677
+ }
678
+ .w-full {
679
+ width: 100%;
680
+ }
681
+ .min-w-40 {
682
+ min-width: calc(var(--spacing) * 40);
683
+ }
684
+ .shrink-0 {
685
+ flex-shrink: 0;
686
+ }
687
+ .origin-bottom-left {
688
+ transform-origin: 0 100%;
689
+ }
690
+ .origin-bottom-right {
691
+ transform-origin: 100% 100%;
692
+ }
693
+ .origin-top-left {
694
+ transform-origin: 0 0;
695
+ }
696
+ .origin-top-right {
697
+ transform-origin: 100% 0;
698
+ }
699
+ .rotate-180 {
700
+ rotate: 180deg;
701
+ }
702
+ .transform {
703
+ transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
704
+ }
705
+ .cursor-default {
706
+ cursor: default;
707
+ }
708
+ .cursor-not-allowed {
709
+ cursor: not-allowed;
710
+ }
711
+ .cursor-pointer {
712
+ cursor: pointer;
713
+ }
714
+ .flex-col {
715
+ flex-direction: column;
716
+ }
717
+ .items-center {
718
+ align-items: center;
719
+ }
720
+ .justify-between {
721
+ justify-content: space-between;
722
+ }
723
+ .gap-0\\.5 {
724
+ gap: calc(var(--spacing) * 0.5);
725
+ }
726
+ .gap-1\\.5 {
727
+ gap: calc(var(--spacing) * 1.5);
728
+ }
729
+ .gap-2 {
730
+ gap: calc(var(--spacing) * 2);
731
+ }
732
+ .truncate {
733
+ overflow: hidden;
734
+ text-overflow: ellipsis;
735
+ white-space: nowrap;
736
+ }
737
+ .overflow-y-auto {
738
+ overflow-y: auto;
739
+ }
740
+ .rounded-\\[var\\(--radius-control\\,0\\.375rem\\)\\] {
741
+ border-radius: var(--radius-control,0.375rem);
742
+ }
743
+ .rounded-lg {
744
+ border-radius: var(--radius-lg);
745
+ }
746
+ .rounded-md {
747
+ border-radius: var(--radius-md);
748
+ }
749
+ .border {
750
+ border-style: var(--tw-border-style);
751
+ border-width: 1px;
752
+ }
753
+ .border-error {
754
+ border-color: var(--color-error);
755
+ }
756
+ .border-input-border {
757
+ border-color: var(--color-input-border);
758
+ }
759
+ .border-input-border-disabled {
760
+ border-color: var(--color-input-border-disabled);
761
+ }
762
+ .border-input-focus {
763
+ border-color: var(--color-input-focus);
764
+ }
765
+ .border-popover-border {
766
+ border-color: var(--color-popover-border);
767
+ }
768
+ .bg-input-bg {
769
+ background-color: var(--color-input-bg);
770
+ }
771
+ .bg-input-bg-disabled {
772
+ background-color: var(--color-input-bg-disabled);
773
+ }
774
+ .bg-popover-bg {
775
+ background-color: var(--color-popover-bg);
776
+ }
777
+ .bg-surface-subtle {
778
+ background-color: var(--color-surface-subtle);
779
+ }
780
+ .fill-none {
781
+ fill: none;
782
+ }
783
+ .stroke-current {
784
+ stroke: currentcolor;
785
+ }
786
+ .stroke-2 {
787
+ stroke-width: 2;
788
+ }
789
+ .stroke-\\[1\\.75\\] {
790
+ stroke-width: 1.75;
791
+ }
792
+ .p-1 {
793
+ padding: calc(var(--spacing) * 1);
794
+ }
795
+ .pr-2 {
796
+ padding-right: calc(var(--spacing) * 2);
797
+ }
798
+ .pr-2\\.5 {
799
+ padding-right: calc(var(--spacing) * 2.5);
800
+ }
801
+ .pr-3 {
802
+ padding-right: calc(var(--spacing) * 3);
803
+ }
804
+ .pl-2 {
805
+ padding-left: calc(var(--spacing) * 2);
806
+ }
807
+ .pl-2\\.5 {
808
+ padding-left: calc(var(--spacing) * 2.5);
809
+ }
810
+ .pl-3 {
811
+ padding-left: calc(var(--spacing) * 3);
812
+ }
813
+ .pl-3\\.5 {
814
+ padding-left: calc(var(--spacing) * 3.5);
815
+ }
816
+ .text-left {
817
+ text-align: left;
818
+ }
819
+ .font-mono {
820
+ font-family: var(--font-mono);
821
+ }
822
+ .font-sans {
823
+ font-family: var(--font-sans);
824
+ }
825
+ .text-base {
826
+ font-size: var(--text-base);
827
+ line-height: var(--tw-leading, var(--text-base--line-height));
828
+ }
829
+ .text-sm {
830
+ font-size: var(--text-sm);
831
+ line-height: var(--tw-leading, var(--text-sm--line-height));
832
+ }
833
+ .text-xs {
834
+ font-size: var(--text-xs);
835
+ line-height: var(--tw-leading, var(--text-xs--line-height));
836
+ }
837
+ .text-\\[11px\\] {
838
+ font-size: 11px;
839
+ }
840
+ .text-\\[13px\\] {
841
+ font-size: 13px;
842
+ }
843
+ .text-\\[15px\\] {
844
+ font-size: 15px;
845
+ }
846
+ .leading-4 {
847
+ --tw-leading: calc(var(--spacing) * 4);
848
+ line-height: calc(var(--spacing) * 4);
849
+ }
850
+ .leading-5 {
851
+ --tw-leading: calc(var(--spacing) * 5);
852
+ line-height: calc(var(--spacing) * 5);
853
+ }
854
+ .leading-\\[18px\\] {
855
+ --tw-leading: 18px;
856
+ line-height: 18px;
857
+ }
858
+ .leading-\\[22px\\] {
859
+ --tw-leading: 22px;
860
+ line-height: 22px;
861
+ }
862
+ .font-medium {
863
+ --tw-font-weight: var(--font-weight-medium);
864
+ font-weight: var(--font-weight-medium);
865
+ }
866
+ .text-error-strong {
867
+ color: var(--color-error-strong);
868
+ }
869
+ .text-focus {
870
+ color: var(--color-focus);
871
+ }
872
+ .text-input-error-text {
873
+ color: var(--color-input-error-text);
874
+ }
875
+ .text-input-placeholder {
876
+ color: var(--color-input-placeholder);
877
+ }
878
+ .text-input-text {
879
+ color: var(--color-input-text);
880
+ }
881
+ .text-input-text-disabled {
882
+ color: var(--color-input-text-disabled);
883
+ }
884
+ .text-text-primary {
885
+ color: var(--color-text-primary);
886
+ }
887
+ .text-text-secondary {
888
+ color: var(--color-text-secondary);
889
+ }
890
+ .shadow {
891
+ --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
892
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
893
+ }
894
+ .shadow-\\[0_0_0_3px_var\\(--color-input-focus-ring\\)\\] {
895
+ --tw-shadow: 0 0 0 3px var(--tw-shadow-color, var(--color-input-focus-ring));
896
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
897
+ }
898
+ .shadow-popover {
899
+ --tw-shadow: inherit;
900
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
901
+ }
902
+ .\\[box-shadow\\:var\\(--shadow-popover\\)\\] {
903
+ box-shadow: var(--shadow-popover);
904
+ }
905
+ .transition-\\[border-color\\,box-shadow\\] {
906
+ transition-property: border-color,box-shadow;
907
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
908
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
909
+ }
910
+ .transition-transform {
911
+ transition-property: transform, translate, scale, rotate;
912
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
913
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
914
+ }
915
+ .duration-150 {
916
+ --tw-duration: 150ms;
917
+ transition-duration: 150ms;
918
+ }
919
+ .duration-200 {
920
+ --tw-duration: 200ms;
921
+ transition-duration: 200ms;
922
+ }
923
+ .ease-\\[var\\(--ease-emphasized\\)\\] {
924
+ --tw-ease: var(--ease-emphasized);
925
+ transition-timing-function: var(--ease-emphasized);
926
+ }
927
+ .ease-out {
928
+ --tw-ease: var(--ease-out);
929
+ transition-timing-function: var(--ease-out);
930
+ }
931
+ .outline-none {
932
+ --tw-outline-style: none;
933
+ outline-style: none;
934
+ }
935
+ .select-none {
936
+ -webkit-user-select: none;
937
+ user-select: none;
938
+ }
939
+ .hover\\:border-input-border-hover {
940
+ &:hover {
941
+ @media (hover: hover) {
942
+ border-color: var(--color-input-border-hover);
943
+ }
944
+ }
945
+ }
946
+ .focus-visible\\:border-input-focus {
947
+ &:focus-visible {
948
+ border-color: var(--color-input-focus);
949
+ }
950
+ }
951
+ .focus-visible\\:shadow-\\[0_0_0_3px_var\\(--color-input-error-ring\\)\\] {
952
+ &:focus-visible {
953
+ --tw-shadow: 0 0 0 3px var(--tw-shadow-color, var(--color-input-error-ring));
954
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
955
+ }
956
+ }
957
+ .focus-visible\\:shadow-\\[0_0_0_3px_var\\(--color-input-focus-ring\\)\\] {
958
+ &:focus-visible {
959
+ --tw-shadow: 0 0 0 3px var(--tw-shadow-color, var(--color-input-focus-ring));
960
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
961
+ }
962
+ }
963
+ .motion-reduce\\:transition-none {
964
+ @media (prefers-reduced-motion: reduce) {
965
+ transition-property: none;
966
+ }
967
+ }
968
+ }
969
+ @property --dsgn-border-sweep-angle {
970
+ syntax: '<angle>';
971
+ inherits: false;
972
+ initial-value: 0deg;
973
+ }
974
+ @property --tw-rotate-x {
975
+ syntax: "*";
976
+ inherits: false;
977
+ }
978
+ @property --tw-rotate-y {
979
+ syntax: "*";
980
+ inherits: false;
981
+ }
982
+ @property --tw-rotate-z {
983
+ syntax: "*";
984
+ inherits: false;
985
+ }
986
+ @property --tw-skew-x {
987
+ syntax: "*";
988
+ inherits: false;
989
+ }
990
+ @property --tw-skew-y {
991
+ syntax: "*";
992
+ inherits: false;
993
+ }
994
+ @property --tw-border-style {
995
+ syntax: "*";
996
+ inherits: false;
997
+ initial-value: solid;
998
+ }
999
+ @property --tw-leading {
1000
+ syntax: "*";
1001
+ inherits: false;
1002
+ }
1003
+ @property --tw-font-weight {
1004
+ syntax: "*";
1005
+ inherits: false;
1006
+ }
1007
+ @property --tw-shadow {
1008
+ syntax: "*";
1009
+ inherits: false;
1010
+ initial-value: 0 0 #0000;
1011
+ }
1012
+ @property --tw-shadow-color {
1013
+ syntax: "*";
1014
+ inherits: false;
1015
+ }
1016
+ @property --tw-shadow-alpha {
1017
+ syntax: "<percentage>";
1018
+ inherits: false;
1019
+ initial-value: 100%;
1020
+ }
1021
+ @property --tw-inset-shadow {
1022
+ syntax: "*";
1023
+ inherits: false;
1024
+ initial-value: 0 0 #0000;
1025
+ }
1026
+ @property --tw-inset-shadow-color {
1027
+ syntax: "*";
1028
+ inherits: false;
1029
+ }
1030
+ @property --tw-inset-shadow-alpha {
1031
+ syntax: "<percentage>";
1032
+ inherits: false;
1033
+ initial-value: 100%;
1034
+ }
1035
+ @property --tw-ring-color {
1036
+ syntax: "*";
1037
+ inherits: false;
1038
+ }
1039
+ @property --tw-ring-shadow {
1040
+ syntax: "*";
1041
+ inherits: false;
1042
+ initial-value: 0 0 #0000;
1043
+ }
1044
+ @property --tw-inset-ring-color {
1045
+ syntax: "*";
1046
+ inherits: false;
1047
+ }
1048
+ @property --tw-inset-ring-shadow {
1049
+ syntax: "*";
1050
+ inherits: false;
1051
+ initial-value: 0 0 #0000;
1052
+ }
1053
+ @property --tw-ring-inset {
1054
+ syntax: "*";
1055
+ inherits: false;
1056
+ }
1057
+ @property --tw-ring-offset-width {
1058
+ syntax: "<length>";
1059
+ inherits: false;
1060
+ initial-value: 0px;
1061
+ }
1062
+ @property --tw-ring-offset-color {
1063
+ syntax: "*";
1064
+ inherits: false;
1065
+ initial-value: #fff;
1066
+ }
1067
+ @property --tw-ring-offset-shadow {
1068
+ syntax: "*";
1069
+ inherits: false;
1070
+ initial-value: 0 0 #0000;
1071
+ }
1072
+ @property --tw-duration {
1073
+ syntax: "*";
1074
+ inherits: false;
1075
+ }
1076
+ @property --tw-ease {
1077
+ syntax: "*";
1078
+ inherits: false;
1079
+ }
1080
+ @layer properties {
1081
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
1082
+ *, ::before, ::after, ::backdrop {
1083
+ --tw-rotate-x: initial;
1084
+ --tw-rotate-y: initial;
1085
+ --tw-rotate-z: initial;
1086
+ --tw-skew-x: initial;
1087
+ --tw-skew-y: initial;
1088
+ --tw-border-style: solid;
1089
+ --tw-leading: initial;
1090
+ --tw-font-weight: initial;
1091
+ --tw-shadow: 0 0 #0000;
1092
+ --tw-shadow-color: initial;
1093
+ --tw-shadow-alpha: 100%;
1094
+ --tw-inset-shadow: 0 0 #0000;
1095
+ --tw-inset-shadow-color: initial;
1096
+ --tw-inset-shadow-alpha: 100%;
1097
+ --tw-ring-color: initial;
1098
+ --tw-ring-shadow: 0 0 #0000;
1099
+ --tw-inset-ring-color: initial;
1100
+ --tw-inset-ring-shadow: 0 0 #0000;
1101
+ --tw-ring-inset: initial;
1102
+ --tw-ring-offset-width: 0px;
1103
+ --tw-ring-offset-color: #fff;
1104
+ --tw-ring-offset-shadow: 0 0 #0000;
1105
+ --tw-duration: initial;
1106
+ --tw-ease: initial;
1107
+ --dsgn-border-sweep-angle: 0deg;
1108
+ }
1109
+ }
1110
+ }
1111
+ `;
1112
+ var Select_default = styles2;
1113
+
1114
+ // common/props/size/size.props.ts
1115
+ var sizeValues = {
1116
+ SM: "sm",
1117
+ MD: "md",
1118
+ LG: "lg"
1119
+ };
1120
+ var sizeProps = enumCreator(Object.values(sizeValues), "size", String, {
1121
+ reflect: true
1122
+ });
1123
+
1124
+ // components/Select/src/Select.props.ts
1125
+ var selectSizeValues = sizeValues;
1126
+ var selectSizeProps = sizeProps;
1127
+
1128
+ // ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
1129
+ function r(e) {
1130
+ var t, f, n = "";
1131
+ if (typeof e == "string" || typeof e == "number")
1132
+ n += e;
1133
+ else if (typeof e == "object")
1134
+ if (Array.isArray(e)) {
1135
+ var o = e.length;
1136
+ for (t = 0;t < o; t++)
1137
+ e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
1138
+ } else
1139
+ for (f in e)
1140
+ e[f] && (n && (n += " "), n += f);
1141
+ return n;
1142
+ }
1143
+ function clsx() {
1144
+ for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
1145
+ (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
1146
+ return n;
1147
+ }
1148
+ var clsx_default = clsx;
1149
+
1150
+ // components/Select/src/Select.styles.ts
1151
+ var triggerBaseClasses = [
1152
+ "flex",
1153
+ "items-center",
1154
+ "justify-between",
1155
+ "gap-2",
1156
+ "w-full",
1157
+ "box-border",
1158
+ "border",
1159
+ "text-left",
1160
+ "text-input-text",
1161
+ "rounded-[var(--radius-control,0.375rem)]",
1162
+ "font-sans",
1163
+ "outline-none",
1164
+ "cursor-pointer",
1165
+ "transition-[border-color,box-shadow]",
1166
+ "duration-150",
1167
+ "ease-out",
1168
+ "motion-reduce:transition-none"
1169
+ ];
1170
+ var focusRing = [
1171
+ "border-input-focus",
1172
+ "shadow-[0_0_0_3px_var(--color-input-focus-ring)]"
1173
+ ];
1174
+ var triggerStateClasses = {
1175
+ default: [
1176
+ "bg-input-bg",
1177
+ "border-input-border",
1178
+ "hover:border-input-border-hover",
1179
+ "focus-visible:border-input-focus",
1180
+ "focus-visible:shadow-[0_0_0_3px_var(--color-input-focus-ring)]"
1181
+ ],
1182
+ open: ["bg-input-bg", ...focusRing],
1183
+ invalid: [
1184
+ "bg-input-bg",
1185
+ "border-error",
1186
+ "focus-visible:shadow-[0_0_0_3px_var(--color-input-error-ring)]"
1187
+ ],
1188
+ disabled: [
1189
+ "bg-input-bg-disabled",
1190
+ "border-input-border-disabled",
1191
+ "text-input-text-disabled",
1192
+ "cursor-not-allowed"
1193
+ ]
1194
+ };
1195
+ var triggerSizeClasses = {
1196
+ [selectSizeValues.SM]: ["h-8", "pl-2.5", "pr-2", "text-[13px]"],
1197
+ [selectSizeValues.MD]: ["h-10", "pl-3", "pr-2.5", "text-sm"],
1198
+ [selectSizeValues.LG]: ["h-12", "pl-3.5", "pr-3", "text-base"]
1199
+ };
1200
+ var triggerClasses = (size, state) => clsx_default(triggerBaseClasses, triggerSizeClasses[size], triggerStateClasses[state]);
1201
+ var valueClasses = (isPlaceholder) => clsx_default("truncate", isPlaceholder && "text-input-placeholder");
1202
+ var chevronSizeClasses = {
1203
+ [selectSizeValues.SM]: "size-3.5",
1204
+ [selectSizeValues.MD]: "size-4",
1205
+ [selectSizeValues.LG]: "size-[18px]"
1206
+ };
1207
+ var chevronClasses = (size, open) => clsx_default(chevronSizeClasses[size], "shrink-0", "fill-none", "stroke-current", "stroke-[1.75]", "transition-transform", "duration-200", "ease-[var(--ease-emphasized)]", "motion-reduce:transition-none", open && "rotate-180");
1208
+ var anchorClasses = () => clsx_default("relative", "w-full");
1209
+ var listboxClasses = (panel, placement) => clsx_default(overlayPanelClasses(panel, placement), panel.topLayer ? "w-[var(--dsgn-overlay-width,auto)]" : "w-full", "min-w-40", "max-h-[min(20rem,var(--dsgn-overlay-max-height,20rem))]", "overflow-y-auto");
1210
+ var optionSizeClasses = {
1211
+ [selectSizeValues.SM]: ["h-8", "text-[13px]"],
1212
+ [selectSizeValues.MD]: ["h-9", "text-sm"],
1213
+ [selectSizeValues.LG]: ["h-10", "text-base"]
1214
+ };
1215
+ var optionClasses = (size, {
1216
+ active,
1217
+ selected,
1218
+ disabled
1219
+ }) => clsx_default(overlayItemClasses({ active, disabled }), "gap-2", optionSizeClasses[size], selected && "font-medium");
1220
+ var checkClasses = () => clsx_default("size-4", "shrink-0", "fill-none", "stroke-current", "stroke-2", "text-focus");
1221
+ var checkSlotClasses = () => clsx_default("size-4", "shrink-0");
1222
+ var optionLabelClasses = () => clsx_default("truncate");
1223
+ var optionTagClasses = () => clsx_default("ml-auto", "shrink-0", "font-mono", "text-[11px]");
1224
+ var wrapperClasses = () => clsx_default("flex", "flex-col", "gap-1.5");
1225
+ var labelSizeClasses = {
1226
+ [selectSizeValues.SM]: ["text-[13px]", "leading-[18px]"],
1227
+ [selectSizeValues.MD]: ["text-sm", "leading-5"],
1228
+ [selectSizeValues.LG]: ["text-[15px]", "leading-[22px]"]
1229
+ };
1230
+ var labelClasses = (size, disabled) => clsx_default("block", "w-fit", "font-sans", "font-medium", labelSizeClasses[size], disabled ? "text-input-text-disabled" : "text-text-primary");
1231
+ var requiredClasses = () => clsx_default("text-error-strong");
1232
+ var messageSizeClasses = {
1233
+ [selectSizeValues.SM]: ["text-xs", "leading-4"],
1234
+ [selectSizeValues.MD]: ["text-[13px]", "leading-[18px]"],
1235
+ [selectSizeValues.LG]: ["text-sm", "leading-5"]
1236
+ };
1237
+ var hintClasses = (size) => clsx_default("font-sans", messageSizeClasses[size], "text-text-secondary");
1238
+ var errorClasses = (size) => clsx_default("flex", "items-center", "gap-1.5", "font-sans", "text-left", "text-input-error-text", messageSizeClasses[size]);
1239
+ var errorIconClasses = () => clsx_default("size-3.5", "shrink-0", "fill-none", "stroke-current", "stroke-[1.75]");
1240
+
1241
+ // components/Select/src/Select.ts
1242
+ var supportsPopover = () => typeof HTMLElement !== "undefined" && ("popover" in HTMLElement.prototype);
1243
+ var px = (value) => value === null ? "auto" : `${value}px`;
1244
+ var icon = (classes, path) => html2`<svg
1245
+ class="${classes}"
1246
+ viewBox="0 0 24 24"
1247
+ stroke-linecap="round"
1248
+ stroke-linejoin="round"
1249
+ aria-hidden="true"
1250
+ >
1251
+ ${path}
1252
+ </svg>`;
1253
+ var valueMissingMessage = () => {
1254
+ if (typeof document === "undefined")
1255
+ return "";
1256
+ const probe = document.createElement("select");
1257
+ probe.required = true;
1258
+ return probe.validationMessage;
1259
+ };
1260
+
1261
+ class Select extends Base {
1262
+ static styles = [Base.styles, Select_default];
1263
+ static formAssociated = true;
1264
+ static shadowRootOptions = {
1265
+ ...Base.shadowRootOptions,
1266
+ delegatesFocus: true
1267
+ };
1268
+ #internals;
1269
+ constructor() {
1270
+ super();
1271
+ this.surface = surfaceValues.LIGHT;
1272
+ this.size = selectSizeValues.MD;
1273
+ this.options = [];
1274
+ this.value = "";
1275
+ this.name = "";
1276
+ this.placeholder = "";
1277
+ this.label = "";
1278
+ this.ariaLabel = "";
1279
+ this.hint = "";
1280
+ this.error = "";
1281
+ this.invalid = false;
1282
+ this.disabled = false;
1283
+ this.required = false;
1284
+ this._formDisabled = false;
1285
+ this._open = false;
1286
+ this._visible = false;
1287
+ this._activeIndex = -1;
1288
+ this._placement = "bottom-start";
1289
+ this._defaultValue = "";
1290
+ this._typeahead = new TypeaheadBuffer;
1291
+ this._motion = new MotionController(this);
1292
+ this._exitRun = 0;
1293
+ this._topLayer = supportsPopover();
1294
+ this._inTopLayer = false;
1295
+ this._listboxScrollTop = 0;
1296
+ this._position = new OverlayPositionController(this, {
1297
+ anchor: () => this._trigger,
1298
+ overlay: () => this._listbox,
1299
+ flip: true,
1300
+ trackViewport: true,
1301
+ offset: overlayPanelOffset,
1302
+ beforeMeasure: ({ width }) => {
1303
+ this._listboxScrollTop = this._listbox?.scrollTop ?? 0;
1304
+ this.style.removeProperty(overlayPositionProperties.maxHeight);
1305
+ this.style.setProperty(overlayPositionProperties.width, `${width}px`);
1306
+ },
1307
+ apply: ({ shift, placement, viewport }) => {
1308
+ this.style.setProperty(overlayPositionProperties.shift, `${shift}px`);
1309
+ this.style.setProperty(overlayPositionProperties.left, px(viewport.left));
1310
+ this.style.setProperty(overlayPositionProperties.top, px(viewport.top));
1311
+ this.style.setProperty(overlayPositionProperties.bottom, px(viewport.bottom));
1312
+ const availableHeight = computeOverlayAvailableHeight(viewport, window.innerHeight);
1313
+ this.style.setProperty(overlayPositionProperties.maxHeight, `${availableHeight}px`);
1314
+ if (this._listbox)
1315
+ this._listbox.scrollTop = this._listboxScrollTop;
1316
+ this._placement = placement;
1317
+ },
1318
+ clear: () => {
1319
+ for (const name of Object.values(overlayPositionProperties)) {
1320
+ this.style.removeProperty(name);
1321
+ }
1322
+ this._placement = "bottom-start";
1323
+ }
1324
+ });
1325
+ this._dismiss = new OverlayDismissController(this, {
1326
+ isOpen: () => this._open,
1327
+ onDismiss: () => this._close(),
1328
+ returnFocusTo: () => this._trigger
1329
+ });
1330
+ this.#internals = this.attachInternals();
1331
+ }
1332
+ get _isDisabled() {
1333
+ return this.disabled || this._formDisabled;
1334
+ }
1335
+ get _isInvalid() {
1336
+ return this.invalid || !!this.error;
1337
+ }
1338
+ get _selectedIndex() {
1339
+ return this.options.findIndex((option) => option.value === this.value);
1340
+ }
1341
+ get _state() {
1342
+ if (this._isDisabled)
1343
+ return "disabled";
1344
+ if (this._open)
1345
+ return "open";
1346
+ if (this._isInvalid)
1347
+ return "invalid";
1348
+ return "default";
1349
+ }
1350
+ get _openingIndex() {
1351
+ const selected = this._selectedIndex;
1352
+ return selected >= 0 && !this.options[selected].disabled ? selected : firstEnabled(this.options);
1353
+ }
1354
+ _openAt(index) {
1355
+ if (this._isDisabled || !this.options.length)
1356
+ return;
1357
+ this._activeIndex = index;
1358
+ this._open = true;
1359
+ this._visible = true;
1360
+ }
1361
+ _close() {
1362
+ this._open = false;
1363
+ this._activeIndex = -1;
1364
+ this._typeahead.clear();
1365
+ }
1366
+ _pick(index) {
1367
+ const option = this.options[index];
1368
+ if (!option || option.disabled)
1369
+ return;
1370
+ const changed = option.value !== this.value;
1371
+ this.value = option.value;
1372
+ this.#internals.setFormValue(this.value);
1373
+ this._syncValidity();
1374
+ this._close();
1375
+ if (changed) {
1376
+ this.emit("dsgn-change", { value: this.value, name: this.name });
1377
+ }
1378
+ }
1379
+ _isTypeahead(event) {
1380
+ return isPrintableKey(event) && (event.key !== " " || this._typeahead.active);
1381
+ }
1382
+ _search(char, from, cycle) {
1383
+ return this._typeahead.search(this.options, char, from, (option) => option.label, { cycle });
1384
+ }
1385
+ _handleClosedKey(event) {
1386
+ if (this._isTypeahead(event)) {
1387
+ const match = this._search(event.key, Math.max(this._selectedIndex, 0), false);
1388
+ this._openAt(match >= 0 ? match : this._openingIndex);
1389
+ return true;
1390
+ }
1391
+ switch (event.key) {
1392
+ case "ArrowDown":
1393
+ case "ArrowUp":
1394
+ case "Enter":
1395
+ case " ":
1396
+ this._openAt(this._openingIndex);
1397
+ return true;
1398
+ case "Home":
1399
+ this._openAt(firstEnabled(this.options));
1400
+ return true;
1401
+ case "End":
1402
+ this._openAt(lastEnabled(this.options));
1403
+ return true;
1404
+ default:
1405
+ return false;
1406
+ }
1407
+ }
1408
+ _handleOpenKey(event) {
1409
+ const active = this._activeIndex;
1410
+ if (event.key === "Tab") {
1411
+ if (active >= 0)
1412
+ this._pick(active);
1413
+ else
1414
+ this._close();
1415
+ return false;
1416
+ }
1417
+ if (this._isTypeahead(event)) {
1418
+ const match = this._search(event.key, active, true);
1419
+ if (match >= 0)
1420
+ this._activeIndex = match;
1421
+ return true;
1422
+ }
1423
+ if (event.key === "ArrowUp" && event.altKey) {
1424
+ this._pick(active);
1425
+ return true;
1426
+ }
1427
+ const moves = {
1428
+ ArrowDown: () => stepEnabled(this.options, active, 1),
1429
+ ArrowUp: () => stepEnabled(this.options, active, -1),
1430
+ Home: () => firstEnabled(this.options),
1431
+ End: () => lastEnabled(this.options)
1432
+ };
1433
+ if (event.key in moves) {
1434
+ this._activeIndex = moves[event.key]();
1435
+ return true;
1436
+ }
1437
+ if (event.key === "Enter" || event.key === " ") {
1438
+ this._pick(active);
1439
+ return true;
1440
+ }
1441
+ return false;
1442
+ }
1443
+ _handleKeydown(event) {
1444
+ if (this._isDisabled)
1445
+ return;
1446
+ if (this._dismiss.handleKeydown(event)) {
1447
+ event.preventDefault();
1448
+ event.stopPropagation();
1449
+ return;
1450
+ }
1451
+ const handled = this._open ? this._handleOpenKey(event) : this._handleClosedKey(event);
1452
+ if (handled)
1453
+ event.preventDefault();
1454
+ }
1455
+ _handleKeyup(event) {
1456
+ if (event.key === " ")
1457
+ event.preventDefault();
1458
+ }
1459
+ _handleTriggerClick() {
1460
+ if (this._open)
1461
+ this._close();
1462
+ else
1463
+ this._openAt(this._openingIndex);
1464
+ }
1465
+ _handleOptionClick(index) {
1466
+ this._pick(index);
1467
+ this._trigger?.focus();
1468
+ }
1469
+ _handleOptionEnter(index) {
1470
+ if (!this.options[index]?.disabled)
1471
+ this._activeIndex = index;
1472
+ }
1473
+ _keepFocus(event) {
1474
+ event.preventDefault();
1475
+ }
1476
+ _handleBlur() {
1477
+ if (this._open)
1478
+ this._close();
1479
+ }
1480
+ _syncValidity() {
1481
+ if (this.required && !this.value && !this._isDisabled) {
1482
+ this.#internals.setValidity({ valueMissing: true }, valueMissingMessage() || this.error || " ", this._trigger ?? undefined);
1483
+ } else {
1484
+ this.#internals.setValidity({});
1485
+ }
1486
+ }
1487
+ formResetCallback() {
1488
+ this.value = this._defaultValue;
1489
+ this.#internals.setFormValue(this.value);
1490
+ this._syncValidity();
1491
+ this.error = "";
1492
+ this._close();
1493
+ }
1494
+ formDisabledCallback(disabled) {
1495
+ this._formDisabled = disabled;
1496
+ if (disabled)
1497
+ this._close();
1498
+ }
1499
+ formStateRestoreCallback(restored) {
1500
+ if (typeof restored === "string")
1501
+ this.value = restored;
1502
+ }
1503
+ firstUpdated() {
1504
+ this._defaultValue = this.value;
1505
+ }
1506
+ disconnectedCallback() {
1507
+ if (this._open || this._visible) {
1508
+ this._exitRun++;
1509
+ this._close();
1510
+ this._inTopLayer = false;
1511
+ this._visible = false;
1512
+ }
1513
+ super.disconnectedCallback();
1514
+ }
1515
+ willUpdate(changedProperties) {
1516
+ if (changedProperties.has("options") && this._open) {
1517
+ const active = this.options[this._activeIndex];
1518
+ if (!active || active.disabled)
1519
+ this._activeIndex = this._openingIndex;
1520
+ }
1521
+ if (changedProperties.has("disabled") && this.disabled)
1522
+ this._close();
1523
+ }
1524
+ updated(changedProperties) {
1525
+ super.updated(changedProperties);
1526
+ this.updateTheme(changedProperties, this.surface);
1527
+ if (changedProperties.has("value")) {
1528
+ this.#internals.setFormValue(this.value);
1529
+ }
1530
+ if (changedProperties.has("value") || changedProperties.has("required") || changedProperties.has("disabled") || changedProperties.has("_formDisabled")) {
1531
+ this._syncValidity();
1532
+ }
1533
+ if (changedProperties.has("_open")) {
1534
+ this._handleOpenChange();
1535
+ }
1536
+ if (changedProperties.has("_activeIndex") && this._open) {
1537
+ this._scrollActiveIntoView();
1538
+ }
1539
+ }
1540
+ _showListbox(listbox) {
1541
+ if (!this._topLayer || this._inTopLayer)
1542
+ return;
1543
+ listbox.showPopover();
1544
+ this._inTopLayer = true;
1545
+ }
1546
+ _hideListbox(listbox) {
1547
+ if (!this._inTopLayer)
1548
+ return;
1549
+ this._inTopLayer = false;
1550
+ listbox?.hidePopover();
1551
+ }
1552
+ _handleOpenChange() {
1553
+ const listbox = this._listbox;
1554
+ if (this._open) {
1555
+ this._exitRun++;
1556
+ this._dismiss.start();
1557
+ if (listbox)
1558
+ this._showListbox(listbox);
1559
+ this._position.start();
1560
+ if (listbox) {
1561
+ this._motion.enter(listbox, "scaleIn", { reducedMotion: "jump" });
1562
+ }
1563
+ return;
1564
+ }
1565
+ this._dismiss.stop();
1566
+ if (!this._visible)
1567
+ return;
1568
+ const run = ++this._exitRun;
1569
+ const hide = () => {
1570
+ if (run !== this._exitRun)
1571
+ return;
1572
+ this._hideListbox(listbox);
1573
+ this._visible = false;
1574
+ this._position.stop();
1575
+ };
1576
+ if (listbox) {
1577
+ this._motion.exit(listbox, "scaleIn", { reducedMotion: "jump" }).then(hide);
1578
+ } else {
1579
+ hide();
1580
+ }
1581
+ }
1582
+ _scrollActiveIntoView() {
1583
+ const option = this.renderRoot.querySelector(`#option-${this._activeIndex}`);
1584
+ option?.scrollIntoView?.({ block: "nearest" });
1585
+ }
1586
+ _renderLabel() {
1587
+ if (!this.label)
1588
+ return nothing;
1589
+ return html2`<label
1590
+ id="label"
1591
+ part="label"
1592
+ class="${labelClasses(this.size, this._isDisabled)}"
1593
+ for="trigger"
1594
+ >${this.label}${this.required ? html2` <span
1595
+ part="required-indicator"
1596
+ class="${requiredClasses()}"
1597
+ aria-hidden="true"
1598
+ >*</span
1599
+ >` : nothing}</label
1600
+ >`;
1601
+ }
1602
+ _renderHint() {
1603
+ if (!this.hint)
1604
+ return nothing;
1605
+ return html2`<div id="hint" part="hint" class="${hintClasses(this.size)}">
1606
+ ${this.hint}
1607
+ </div>`;
1608
+ }
1609
+ _renderError() {
1610
+ if (!this.error)
1611
+ return nothing;
1612
+ return html2`<div id="error" part="error" class="${errorClasses(this.size)}">
1613
+ ${icon(errorIconClasses(), circleAlert)}
1614
+ <span>${this.error}</span>
1615
+ </div>`;
1616
+ }
1617
+ _renderOption(option, index) {
1618
+ const selected = option.value === this.value;
1619
+ const disabled = !!option.disabled;
1620
+ return html2`<div
1621
+ id="option-${index}"
1622
+ part="option"
1623
+ role="option"
1624
+ class="${optionClasses(this.size, {
1625
+ active: index === this._activeIndex,
1626
+ selected,
1627
+ disabled
1628
+ })}"
1629
+ aria-selected="${selected ? "true" : "false"}"
1630
+ aria-disabled="${disabled ? "true" : nothing}"
1631
+ @click=${() => this._handleOptionClick(index)}
1632
+ @mouseenter=${() => this._handleOptionEnter(index)}
1633
+ >
1634
+ ${selected ? icon(checkClasses(), check) : html2`<span class="${checkSlotClasses()}"></span>`}
1635
+ <span class="${optionLabelClasses()}">${option.label}</span>
1636
+ ${option.tag ? html2`<span class="${optionTagClasses()}">${option.tag}</span>` : nothing}
1637
+ </div>`;
1638
+ }
1639
+ get _labelledBy() {
1640
+ return this.label ? "label" : nothing;
1641
+ }
1642
+ get _fallbackName() {
1643
+ return !this.label && this.ariaLabel || nothing;
1644
+ }
1645
+ _renderTrigger() {
1646
+ const selected = this.options[this._selectedIndex];
1647
+ const activeId = this._open && this._activeIndex >= 0 ? `option-${this._activeIndex}` : nothing;
1648
+ return html2`<button
1649
+ id="trigger"
1650
+ part="trigger"
1651
+ type="button"
1652
+ role="combobox"
1653
+ class="${triggerClasses(this.size, this._state)}"
1654
+ aria-haspopup="listbox"
1655
+ aria-expanded="${this._open ? "true" : "false"}"
1656
+ aria-controls="listbox"
1657
+ aria-activedescendant="${activeId}"
1658
+ aria-labelledby="${this._labelledBy}"
1659
+ aria-label="${this._fallbackName}"
1660
+ aria-required="${this.required ? "true" : nothing}"
1661
+ aria-invalid="${this._isInvalid ? "true" : nothing}"
1662
+ aria-describedby="${describedBy(!!this.error && "error", !!this.hint && "hint") ?? nothing}"
1663
+ ?disabled="${this._isDisabled}"
1664
+ @click=${this._handleTriggerClick}
1665
+ @keydown=${this._handleKeydown}
1666
+ @keyup=${this._handleKeyup}
1667
+ @blur=${this._handleBlur}
1668
+ >
1669
+ <span class="${valueClasses(!selected)}"
1670
+ >${selected ? selected.label : this.placeholder}</span
1671
+ >
1672
+ ${icon(chevronClasses(this.size, this._open), chevronDown)}
1673
+ </button>`;
1674
+ }
1675
+ _renderListbox() {
1676
+ return html2`<div
1677
+ id="listbox"
1678
+ part="listbox"
1679
+ role="listbox"
1680
+ popover=${this._topLayer ? "manual" : nothing}
1681
+ class="${listboxClasses({ visible: this._visible, open: this._open, topLayer: this._topLayer }, this._placement)}"
1682
+ aria-labelledby="${this._labelledBy}"
1683
+ aria-label="${this._fallbackName}"
1684
+ tabindex="-1"
1685
+ @mousedown=${this._keepFocus}
1686
+ >
1687
+ ${this.options.map((option, index) => this._renderOption(option, index))}
1688
+ </div>`;
1689
+ }
1690
+ render() {
1691
+ return html2`
1692
+ <div class="${wrapperClasses()}">
1693
+ ${this._renderLabel()}
1694
+ <div class="${anchorClasses()}">
1695
+ ${this._renderTrigger()} ${this._renderListbox()}
1696
+ </div>
1697
+ ${this._renderHint()} ${this._renderError()}
1698
+ </div>
1699
+ `;
1700
+ }
1701
+ }
1702
+ __legacyDecorateClassTS([
1703
+ property({ ...surfaceProps })
1704
+ ], Select.prototype, "surface", undefined);
1705
+ __legacyDecorateClassTS([
1706
+ property({ ...selectSizeProps })
1707
+ ], Select.prototype, "size", undefined);
1708
+ __legacyDecorateClassTS([
1709
+ property({ type: Array })
1710
+ ], Select.prototype, "options", undefined);
1711
+ __legacyDecorateClassTS([
1712
+ property({ type: String })
1713
+ ], Select.prototype, "value", undefined);
1714
+ __legacyDecorateClassTS([
1715
+ property({ type: String, reflect: true })
1716
+ ], Select.prototype, "name", undefined);
1717
+ __legacyDecorateClassTS([
1718
+ property({ type: String })
1719
+ ], Select.prototype, "placeholder", undefined);
1720
+ __legacyDecorateClassTS([
1721
+ property({ type: String })
1722
+ ], Select.prototype, "label", undefined);
1723
+ __legacyDecorateClassTS([
1724
+ property({ type: String, attribute: "aria-label" })
1725
+ ], Select.prototype, "ariaLabel", undefined);
1726
+ __legacyDecorateClassTS([
1727
+ property({ type: String })
1728
+ ], Select.prototype, "hint", undefined);
1729
+ __legacyDecorateClassTS([
1730
+ property({ type: String })
1731
+ ], Select.prototype, "error", undefined);
1732
+ __legacyDecorateClassTS([
1733
+ property({ type: Boolean, reflect: true })
1734
+ ], Select.prototype, "invalid", undefined);
1735
+ __legacyDecorateClassTS([
1736
+ property({ type: Boolean, reflect: true })
1737
+ ], Select.prototype, "disabled", undefined);
1738
+ __legacyDecorateClassTS([
1739
+ property({ type: Boolean, reflect: true })
1740
+ ], Select.prototype, "required", undefined);
1741
+ __legacyDecorateClassTS([
1742
+ state()
1743
+ ], Select.prototype, "_formDisabled", undefined);
1744
+ __legacyDecorateClassTS([
1745
+ state()
1746
+ ], Select.prototype, "_open", undefined);
1747
+ __legacyDecorateClassTS([
1748
+ state()
1749
+ ], Select.prototype, "_visible", undefined);
1750
+ __legacyDecorateClassTS([
1751
+ state()
1752
+ ], Select.prototype, "_activeIndex", undefined);
1753
+ __legacyDecorateClassTS([
1754
+ state()
1755
+ ], Select.prototype, "_placement", undefined);
1756
+ __legacyDecorateClassTS([
1757
+ query("#trigger")
1758
+ ], Select.prototype, "_trigger", undefined);
1759
+ __legacyDecorateClassTS([
1760
+ query("#listbox")
1761
+ ], Select.prototype, "_listbox", undefined);
1762
+ markFieldControl(Select);
1763
+ defineElement("dsgn-select", Select);
1764
+ export {
1765
+ Select
1766
+ };