@hypoth-ui/wc 0.1.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 (87) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +60 -0
  3. package/dist/button-MKQKTC5Q.js +10 -0
  4. package/dist/button-MKQKTC5Q.js.map +1 -0
  5. package/dist/chunk-4HLM6DBG.js +910 -0
  6. package/dist/chunk-4HLM6DBG.js.map +1 -0
  7. package/dist/chunk-55ID7LJL.js +3602 -0
  8. package/dist/chunk-55ID7LJL.js.map +1 -0
  9. package/dist/chunk-66HFYJD7.js +86 -0
  10. package/dist/chunk-66HFYJD7.js.map +1 -0
  11. package/dist/chunk-CZOXIJVS.js +70 -0
  12. package/dist/chunk-CZOXIJVS.js.map +1 -0
  13. package/dist/chunk-DHUM4Q5Y.js +495 -0
  14. package/dist/chunk-DHUM4Q5Y.js.map +1 -0
  15. package/dist/chunk-DNNI5BDE.js +1842 -0
  16. package/dist/chunk-DNNI5BDE.js.map +1 -0
  17. package/dist/chunk-GXKZ6E6K.js +99 -0
  18. package/dist/chunk-GXKZ6E6K.js.map +1 -0
  19. package/dist/chunk-H4GJJZ3N.js +51 -0
  20. package/dist/chunk-H4GJJZ3N.js.map +1 -0
  21. package/dist/chunk-JMPTFALJ.js +175 -0
  22. package/dist/chunk-JMPTFALJ.js.map +1 -0
  23. package/dist/chunk-MYQWCLUJ.js +45 -0
  24. package/dist/chunk-MYQWCLUJ.js.map +1 -0
  25. package/dist/chunk-QZSPWT7L.js +183 -0
  26. package/dist/chunk-QZSPWT7L.js.map +1 -0
  27. package/dist/chunk-TSKBQCTR.js +5137 -0
  28. package/dist/chunk-TSKBQCTR.js.map +1 -0
  29. package/dist/chunk-TXIIUVL3.js +130 -0
  30. package/dist/chunk-TXIIUVL3.js.map +1 -0
  31. package/dist/chunk-UM7WRO7W.js +237 -0
  32. package/dist/chunk-UM7WRO7W.js.map +1 -0
  33. package/dist/chunk-VPXL4RB3.js +202 -0
  34. package/dist/chunk-VPXL4RB3.js.map +1 -0
  35. package/dist/chunk-VX5CKSMN.js +39 -0
  36. package/dist/chunk-VX5CKSMN.js.map +1 -0
  37. package/dist/chunk-WQ5BEP3E.js +2845 -0
  38. package/dist/chunk-WQ5BEP3E.js.map +1 -0
  39. package/dist/chunk-YDQ434UH.js +60 -0
  40. package/dist/chunk-YDQ434UH.js.map +1 -0
  41. package/dist/chunk-ZWV4VI6D.js +153 -0
  42. package/dist/chunk-ZWV4VI6D.js.map +1 -0
  43. package/dist/core.d.ts +127 -0
  44. package/dist/core.js +38 -0
  45. package/dist/core.js.map +1 -0
  46. package/dist/data-display.d.ts +872 -0
  47. package/dist/data-display.js +57 -0
  48. package/dist/data-display.js.map +1 -0
  49. package/dist/ds-element-Db0LMfxI.d.ts +43 -0
  50. package/dist/feedback.d.ts +292 -0
  51. package/dist/feedback.js +31 -0
  52. package/dist/feedback.js.map +1 -0
  53. package/dist/form-controls.d.ts +1713 -0
  54. package/dist/form-controls.js +63 -0
  55. package/dist/form-controls.js.map +1 -0
  56. package/dist/icon-7IZTJ5WT.js +8 -0
  57. package/dist/icon-7IZTJ5WT.js.map +1 -0
  58. package/dist/index.d.ts +15 -0
  59. package/dist/index.js +423 -0
  60. package/dist/index.js.map +1 -0
  61. package/dist/input-LB6UR37A.js +10 -0
  62. package/dist/input-LB6UR37A.js.map +1 -0
  63. package/dist/layout.d.ts +504 -0
  64. package/dist/layout.js +34 -0
  65. package/dist/layout.js.map +1 -0
  66. package/dist/link-NHDJ6SFY.js +9 -0
  67. package/dist/link-NHDJ6SFY.js.map +1 -0
  68. package/dist/navigation.d.ts +255 -0
  69. package/dist/navigation.js +111 -0
  70. package/dist/navigation.js.map +1 -0
  71. package/dist/overlays.d.ts +1291 -0
  72. package/dist/overlays.js +106 -0
  73. package/dist/overlays.js.map +1 -0
  74. package/dist/primitives.d.ts +230 -0
  75. package/dist/primitives.js +26 -0
  76. package/dist/primitives.js.map +1 -0
  77. package/dist/registry-Bns0t11H.d.ts +233 -0
  78. package/dist/skeleton-MUdd2029.d.ts +109 -0
  79. package/dist/spinner-BWaNlc-Y.d.ts +45 -0
  80. package/dist/spinner-UIYDUVBZ.js +8 -0
  81. package/dist/spinner-UIYDUVBZ.js.map +1 -0
  82. package/dist/stepper-CCRwcQOe.d.ts +851 -0
  83. package/dist/text-MT3S3EMU.js +8 -0
  84. package/dist/text-MT3S3EMU.js.map +1 -0
  85. package/dist/visually-hidden-MW2XY4CS.js +8 -0
  86. package/dist/visually-hidden-MW2XY4CS.js.map +1 -0
  87. package/package.json +92 -0
@@ -0,0 +1,1713 @@
1
+ import { b as FormAssociatedInterface, V as ValidationFlags } from './registry-Bns0t11H.js';
2
+ export { D as DsInput, j as InputSize, I as InputType } from './registry-Bns0t11H.js';
3
+ import * as lit from 'lit';
4
+ import { PropertyValues, nothing } from 'lit';
5
+ import { D as DSElement } from './ds-element-Db0LMfxI.js';
6
+ import './primitives.js';
7
+ import './spinner-BWaNlc-Y.js';
8
+ import './overlays.js';
9
+ import { Placement, Option, FileInfo } from '@hypoth-ui/primitives-dom';
10
+ import './data-display.js';
11
+ import './stepper-CCRwcQOe.js';
12
+ import './feedback.js';
13
+ import './skeleton-MUdd2029.js';
14
+ import './layout.js';
15
+
16
+ type TextareaSize = "sm" | "md" | "lg";
17
+ /**
18
+ * A textarea component with optional auto-resize.
19
+ *
20
+ * @element ds-textarea
21
+ * @fires input - Fired when the textarea value changes
22
+ * @fires ds:change - Fired when the textarea value is committed
23
+ *
24
+ * @example
25
+ * ```html
26
+ * <ds-field>
27
+ * <ds-label>Description</ds-label>
28
+ * <ds-textarea placeholder="Enter description..."></ds-textarea>
29
+ * </ds-field>
30
+ * ```
31
+ */
32
+ declare class DsTextarea extends DSElement {
33
+ /** Textarea size */
34
+ size: TextareaSize;
35
+ /** Textarea name */
36
+ name: string;
37
+ /** Textarea value */
38
+ value: string;
39
+ /** Placeholder text */
40
+ placeholder: string;
41
+ /** Disabled state */
42
+ disabled: boolean;
43
+ /** Read-only state */
44
+ readonly: boolean;
45
+ /** Required state */
46
+ required: boolean;
47
+ /** Error state */
48
+ error: boolean;
49
+ /** Minimum length */
50
+ minlength?: number;
51
+ /** Maximum length */
52
+ maxlength?: number;
53
+ /** Number of visible text rows */
54
+ rows: number;
55
+ /** Minimum number of rows (for auto-resize) */
56
+ minRows: number;
57
+ /** Maximum number of rows (for auto-resize) */
58
+ maxRows?: number;
59
+ /** Enable auto-resize behavior */
60
+ autoResize: boolean;
61
+ /** ARIA labelledby - ID of element that labels this textarea */
62
+ private ariaLabelledBy?;
63
+ /** ARIA describedby - IDs of elements that describe this textarea */
64
+ private ariaDescribedBy?;
65
+ private attributeObserver;
66
+ private nativeTextarea;
67
+ connectedCallback(): void;
68
+ disconnectedCallback(): void;
69
+ /**
70
+ * Syncs ARIA attributes from the host element to internal state.
71
+ * The render method will apply these to the native textarea.
72
+ */
73
+ private syncAriaAttributes;
74
+ private handleInput;
75
+ private handleChange;
76
+ /**
77
+ * Adjusts the textarea height based on content.
78
+ */
79
+ private adjustHeight;
80
+ updated(changedProperties: Map<string, unknown>): void;
81
+ /**
82
+ * Returns the effective number of rows.
83
+ */
84
+ private getEffectiveRows;
85
+ render(): lit.TemplateResult<1>;
86
+ }
87
+ declare global {
88
+ interface HTMLElementTagNameMap {
89
+ "ds-textarea": DsTextarea;
90
+ }
91
+ }
92
+
93
+ /**
94
+ * Label component for form fields.
95
+ *
96
+ * Used within ds-field to provide an accessible label that is
97
+ * automatically associated with the form control via aria-labelledby.
98
+ *
99
+ * @element ds-label
100
+ *
101
+ * @slot - Label text content
102
+ *
103
+ * @example
104
+ * ```html
105
+ * <ds-field>
106
+ * <ds-label>Email address</ds-label>
107
+ * <ds-input type="email"></ds-input>
108
+ * </ds-field>
109
+ * ```
110
+ */
111
+ declare class DsLabel extends DSElement {
112
+ /**
113
+ * ID of the associated form control.
114
+ * Typically set automatically by the parent ds-field component.
115
+ */
116
+ for: string;
117
+ render(): lit.TemplateResult<1>;
118
+ }
119
+ declare global {
120
+ interface HTMLElementTagNameMap {
121
+ "ds-label": DsLabel;
122
+ }
123
+ }
124
+
125
+ /**
126
+ * Description/help text component for form fields.
127
+ *
128
+ * Used within ds-field to provide supplementary help text that is
129
+ * automatically associated with the form control via aria-describedby.
130
+ *
131
+ * @element ds-field-description
132
+ *
133
+ * @slot - Description text content
134
+ *
135
+ * @example
136
+ * ```html
137
+ * <ds-field>
138
+ * <ds-label>Password</ds-label>
139
+ * <ds-input type="password"></ds-input>
140
+ * <ds-field-description>
141
+ * Must be at least 8 characters with one number
142
+ * </ds-field-description>
143
+ * </ds-field>
144
+ * ```
145
+ */
146
+ declare class DsFieldDescription extends DSElement {
147
+ render(): lit.TemplateResult<1>;
148
+ }
149
+ declare global {
150
+ interface HTMLElementTagNameMap {
151
+ "ds-field-description": DsFieldDescription;
152
+ }
153
+ }
154
+
155
+ /**
156
+ * Error message component for form fields.
157
+ *
158
+ * Used within ds-field to display validation error messages that are
159
+ * automatically associated with the form control via aria-describedby.
160
+ * Error messages take precedence over descriptions in the ARIA description.
161
+ *
162
+ * @element ds-field-error
163
+ *
164
+ * @slot - Error message text content
165
+ *
166
+ * @example
167
+ * ```html
168
+ * <ds-field>
169
+ * <ds-label>Email</ds-label>
170
+ * <ds-input type="email" error></ds-input>
171
+ * <ds-field-error>Please enter a valid email address</ds-field-error>
172
+ * </ds-field>
173
+ * ```
174
+ */
175
+ declare class DsFieldError extends DSElement {
176
+ render(): lit.TemplateResult<1>;
177
+ }
178
+ declare global {
179
+ interface HTMLElementTagNameMap {
180
+ "ds-field-error": DsFieldError;
181
+ }
182
+ }
183
+
184
+ /**
185
+ * Field container component for form controls.
186
+ *
187
+ * Provides consistent layout and automatic ARIA attribute composition
188
+ * for form fields. Associates labels, descriptions, and error messages
189
+ * with the form control for accessibility.
190
+ *
191
+ * @element ds-field
192
+ *
193
+ * @slot - Field contents (label, form control, description, error)
194
+ *
195
+ * @csspart container - The field container element
196
+ *
197
+ * @cssprop --ds-field-gap - Gap between field children (default: 0.5rem)
198
+ * @cssprop --ds-field-error-color - Error message color
199
+ *
200
+ * @example
201
+ * ```html
202
+ * <ds-field required>
203
+ * <ds-label>Email address</ds-label>
204
+ * <ds-field-description>We'll never share your email</ds-field-description>
205
+ * <ds-input type="email" name="email"></ds-input>
206
+ * <ds-field-error>Please enter a valid email</ds-field-error>
207
+ * </ds-field>
208
+ * ```
209
+ */
210
+ declare class DsField extends DSElement {
211
+ /** Marks the field as required */
212
+ required: boolean;
213
+ /** Whether the field is disabled */
214
+ disabled: boolean;
215
+ /** Generated unique ID for ARIA associations */
216
+ private fieldId;
217
+ /** Whether an error child is present */
218
+ private hasError;
219
+ /** Whether a description child is present */
220
+ private hasDescription;
221
+ private observer;
222
+ connectedCallback(): void;
223
+ disconnectedCallback(): void;
224
+ /**
225
+ * Updates ARIA attributes on child components based on field structure.
226
+ */
227
+ private updateChildComponents;
228
+ updated(changedProperties: Map<string, unknown>): void;
229
+ render(): lit.TemplateResult<1>;
230
+ }
231
+ declare global {
232
+ interface HTMLElementTagNameMap {
233
+ "ds-field": DsField;
234
+ }
235
+ }
236
+
237
+ /**
238
+ * Individual radio button within a group.
239
+ *
240
+ * @element ds-radio
241
+ *
242
+ * @slot - Radio label
243
+ *
244
+ * @example
245
+ * ```html
246
+ * <ds-radio-group name="size">
247
+ * <ds-radio value="sm">Small</ds-radio>
248
+ * <ds-radio value="md">Medium</ds-radio>
249
+ * <ds-radio value="lg">Large</ds-radio>
250
+ * </ds-radio-group>
251
+ * ```
252
+ */
253
+ declare class DsRadio extends DSElement {
254
+ /** Radio value */
255
+ value: string;
256
+ /** Selected state (managed by group) */
257
+ checked: boolean;
258
+ /** Disabled state */
259
+ disabled: boolean;
260
+ /** Label text captured from slot */
261
+ private labelText;
262
+ /** Unique ID for label association */
263
+ private labelId;
264
+ /** Whether this radio is focusable (managed by group) */
265
+ private _tabIndexValue;
266
+ get tabIndexValue(): number;
267
+ connectedCallback(): void;
268
+ /**
269
+ * Sets the checked state (called by RadioGroup).
270
+ */
271
+ setChecked(checked: boolean): void;
272
+ /**
273
+ * Sets the tabindex (called by RadioGroup for roving focus).
274
+ */
275
+ setTabIndex(index: number): void;
276
+ /**
277
+ * Focus the control element.
278
+ */
279
+ focusControl(): void;
280
+ private handleClick;
281
+ private handleKeyDown;
282
+ render(): lit.TemplateResult<1>;
283
+ }
284
+ declare global {
285
+ interface HTMLElementTagNameMap {
286
+ "ds-radio": DsRadio;
287
+ }
288
+ }
289
+
290
+ type RadioOrientation = "horizontal" | "vertical";
291
+ declare const DsRadioGroup_base: (new (...args: any[]) => FormAssociatedInterface & lit.LitElement) & typeof DSElement & {
292
+ formAssociated: true;
293
+ };
294
+ /**
295
+ * Container for radio button group with roving tabindex and native form participation.
296
+ *
297
+ * Uses ElementInternals for form association - the selected value is submitted with the form
298
+ * and the group participates in constraint validation.
299
+ *
300
+ * @element ds-radio-group
301
+ * @fires ds:change - Fired when selection changes with { value }
302
+ * @fires ds:invalid - Fired when customValidation is true and validation fails
303
+ *
304
+ * @slot - ds-radio children
305
+ *
306
+ * @example
307
+ * ```html
308
+ * <form>
309
+ * <ds-field>
310
+ * <ds-label>Size</ds-label>
311
+ * <ds-radio-group name="size" required>
312
+ * <ds-radio value="sm">Small</ds-radio>
313
+ * <ds-radio value="md">Medium</ds-radio>
314
+ * <ds-radio value="lg">Large</ds-radio>
315
+ * </ds-radio-group>
316
+ * <ds-field-error></ds-field-error>
317
+ * </ds-field>
318
+ * <button type="submit">Submit</button>
319
+ * </form>
320
+ * ```
321
+ */
322
+ declare class DsRadioGroup extends DsRadioGroup_base {
323
+ /** Layout and navigation axis */
324
+ orientation: RadioOrientation;
325
+ /** Default value for form reset */
326
+ private _defaultValue;
327
+ private rovingFocus;
328
+ private childObserver;
329
+ connectedCallback(): void;
330
+ disconnectedCallback(): void;
331
+ /**
332
+ * Sets up the radio items with correct checked state and disabled state.
333
+ */
334
+ private setupRadios;
335
+ /**
336
+ * Updates tabindex values for roving focus.
337
+ */
338
+ private updateTabIndices;
339
+ /**
340
+ * Sets up roving focus for keyboard navigation.
341
+ */
342
+ private setupRovingFocus;
343
+ /**
344
+ * Gets all radio items in the group.
345
+ */
346
+ private getRadioItems;
347
+ /**
348
+ * Handles radio selection from click or keyboard.
349
+ */
350
+ private handleRadioSelect;
351
+ /**
352
+ * Selects a value and updates state.
353
+ */
354
+ private selectValue;
355
+ updated(changedProperties: Map<string, unknown>): void;
356
+ protected getFormValue(): string | null;
357
+ protected getValidationAnchor(): HTMLElement | undefined;
358
+ protected getValidationFlags(): ValidationFlags;
359
+ protected getValidationMessage(flags: ValidationFlags): string;
360
+ protected shouldUpdateFormValue(changedProperties: PropertyValues): boolean;
361
+ protected shouldUpdateValidity(changedProperties: PropertyValues): boolean;
362
+ protected onFormReset(): void;
363
+ protected onFormStateRestore(state: string | File | FormData | null, _mode: "restore" | "autocomplete"): void;
364
+ render(): lit.TemplateResult<1>;
365
+ }
366
+ declare global {
367
+ interface HTMLElementTagNameMap {
368
+ "ds-radio-group": DsRadioGroup;
369
+ }
370
+ }
371
+
372
+ declare const DsSwitch_base: (new (...args: any[]) => FormAssociatedInterface & lit.LitElement) & typeof DSElement & {
373
+ formAssociated: true;
374
+ };
375
+ /**
376
+ * Toggle switch for boolean settings with role="switch" semantics and native form participation.
377
+ *
378
+ * Uses ElementInternals for form association - values are submitted with the form
379
+ * and the switch participates in constraint validation.
380
+ *
381
+ * @element ds-switch
382
+ * @fires ds:change - Fired on state change with { checked }
383
+ * @fires ds:invalid - Fired when customValidation is true and validation fails
384
+ *
385
+ * @slot - Switch label
386
+ *
387
+ * @example
388
+ * ```html
389
+ * <form>
390
+ * <ds-switch name="notifications">Enable notifications</ds-switch>
391
+ * <button type="submit">Submit</button>
392
+ * </form>
393
+ *
394
+ * <ds-field>
395
+ * <ds-label>Dark Mode</ds-label>
396
+ * <ds-switch name="darkMode" custom-validation>Enable dark mode</ds-switch>
397
+ * <ds-field-description>Switch between light and dark themes</ds-field-description>
398
+ * <ds-field-error></ds-field-error>
399
+ * </ds-field>
400
+ * ```
401
+ */
402
+ declare class DsSwitch extends DsSwitch_base {
403
+ /** Checked (on) state */
404
+ checked: boolean;
405
+ /** ARIA describedby - IDs of elements that describe this switch */
406
+ private ariaDescribedBy?;
407
+ /** Label text captured from slot */
408
+ private labelText;
409
+ /** Unique ID for label association */
410
+ private labelId;
411
+ /** Default checked state for form reset */
412
+ private _defaultChecked;
413
+ private attributeObserver;
414
+ connectedCallback(): void;
415
+ disconnectedCallback(): void;
416
+ /**
417
+ * Syncs ARIA attributes from the host element to internal state.
418
+ */
419
+ private syncAriaAttributes;
420
+ /**
421
+ * Toggles the switch state.
422
+ */
423
+ private toggle;
424
+ private handleClick;
425
+ private handleKeyDown;
426
+ protected getFormValue(): string | null;
427
+ protected getValidationAnchor(): HTMLElement | undefined;
428
+ protected getValidationFlags(): ValidationFlags;
429
+ protected getValidationMessage(flags: ValidationFlags): string;
430
+ protected shouldUpdateFormValue(changedProperties: PropertyValues): boolean;
431
+ protected shouldUpdateValidity(changedProperties: PropertyValues): boolean;
432
+ protected onFormReset(): void;
433
+ protected onFormStateRestore(state: string | File | FormData | null, _mode: "restore" | "autocomplete"): void;
434
+ render(): lit.TemplateResult<1>;
435
+ }
436
+ declare global {
437
+ interface HTMLElementTagNameMap {
438
+ "ds-switch": DsSwitch;
439
+ }
440
+ }
441
+
442
+ type SelectContentState = "open" | "closed";
443
+ /**
444
+ * Select content container with role="listbox".
445
+ *
446
+ * @element ds-select-content
447
+ *
448
+ * @slot - Select options (ds-select-option elements)
449
+ *
450
+ * @attr {string} data-state - Animation state ("open" or "closed")
451
+ * @attr {string} data-placement - Current anchor position placement
452
+ *
453
+ * @example
454
+ * ```html
455
+ * <ds-select>
456
+ * <button slot="trigger">Select fruit</button>
457
+ * <ds-select-content>
458
+ * <ds-select-option value="apple">Apple</ds-select-option>
459
+ * <ds-select-option value="banana">Banana</ds-select-option>
460
+ * </ds-select-content>
461
+ * </ds-select>
462
+ * ```
463
+ */
464
+ declare class DsSelectContent extends DSElement {
465
+ /** Unique ID for ARIA association */
466
+ id: string;
467
+ /** Animation state (open or closed) - set by parent ds-select */
468
+ dataState: SelectContentState;
469
+ /** Optional label for the listbox */
470
+ label: string;
471
+ connectedCallback(): void;
472
+ updated(changedProperties: Map<string, unknown>): void;
473
+ render(): lit.TemplateResult<1>;
474
+ }
475
+ declare global {
476
+ interface HTMLElementTagNameMap {
477
+ "ds-select-content": DsSelectContent;
478
+ }
479
+ }
480
+
481
+ /**
482
+ * Select option with role="option".
483
+ *
484
+ * @element ds-select-option
485
+ *
486
+ * @slot - Option content (text, icon, etc.)
487
+ *
488
+ * @example
489
+ * ```html
490
+ * <ds-select-option value="apple">Apple</ds-select-option>
491
+ * <ds-select-option value="banana" disabled>Banana</ds-select-option>
492
+ * ```
493
+ */
494
+ declare class DsSelectOption extends DSElement {
495
+ /** Whether the option is disabled */
496
+ disabled: boolean;
497
+ /** Value associated with this option */
498
+ value: string;
499
+ /** Display label (uses textContent if not specified) */
500
+ label: string;
501
+ connectedCallback(): void;
502
+ /**
503
+ * Gets the display label for this option.
504
+ */
505
+ getLabel(): string;
506
+ private updateAriaDisabled;
507
+ /**
508
+ * Sets the selected state of this option.
509
+ */
510
+ setSelected(selected: boolean): void;
511
+ /**
512
+ * Sets the highlighted state of this option.
513
+ */
514
+ setHighlighted(highlighted: boolean): void;
515
+ updated(changedProperties: Map<string, unknown>): void;
516
+ render(): lit.TemplateResult<1>;
517
+ }
518
+ declare global {
519
+ interface HTMLElementTagNameMap {
520
+ "ds-select-option": DsSelectOption;
521
+ }
522
+ }
523
+
524
+ /**
525
+ * Select trigger button with combobox role.
526
+ *
527
+ * @element ds-select-trigger
528
+ *
529
+ * @slot - Trigger content (button, etc.)
530
+ *
531
+ * @example
532
+ * ```html
533
+ * <ds-select>
534
+ * <ds-select-trigger>
535
+ * <button>Select fruit</button>
536
+ * </ds-select-trigger>
537
+ * <ds-select-content>...</ds-select-content>
538
+ * </ds-select>
539
+ * ```
540
+ */
541
+ declare class DsSelectTrigger extends DSElement {
542
+ /** Whether the parent select is disabled */
543
+ disabled: boolean;
544
+ connectedCallback(): void;
545
+ private setupTriggerAccessibility;
546
+ /**
547
+ * Updates ARIA attributes on the trigger element.
548
+ */
549
+ updateAria(expanded: boolean, activeDescendantId?: string, controlsId?: string): void;
550
+ /**
551
+ * Gets the actual trigger button element.
552
+ */
553
+ getTriggerElement(): HTMLElement | null;
554
+ updated(changedProperties: Map<string, unknown>): void;
555
+ render(): lit.TemplateResult<1>;
556
+ }
557
+ declare global {
558
+ interface HTMLElementTagNameMap {
559
+ "ds-select-trigger": DsSelectTrigger;
560
+ }
561
+ }
562
+
563
+ /**
564
+ * Select option group for organizing options into labeled sections.
565
+ *
566
+ * @element ds-select-group
567
+ *
568
+ * @slot - Group content (ds-select-label and ds-select-option children)
569
+ *
570
+ * @example
571
+ * ```html
572
+ * <ds-select-group>
573
+ * <ds-select-label>Fruits</ds-select-label>
574
+ * <ds-select-option value="apple">Apple</ds-select-option>
575
+ * <ds-select-option value="banana">Banana</ds-select-option>
576
+ * </ds-select-group>
577
+ * ```
578
+ */
579
+ declare class DsSelectGroup extends DSElement {
580
+ /** Optional label for the group (alternative to ds-select-label slot) */
581
+ label: string;
582
+ connectedCallback(): void;
583
+ private setupAriaLabelledBy;
584
+ updated(changedProperties: Map<string, unknown>): void;
585
+ render(): lit.TemplateResult<1>;
586
+ }
587
+ declare global {
588
+ interface HTMLElementTagNameMap {
589
+ "ds-select-group": DsSelectGroup;
590
+ }
591
+ }
592
+
593
+ /**
594
+ * Label for a select option group.
595
+ *
596
+ * @element ds-select-label
597
+ *
598
+ * @slot - Label text content
599
+ *
600
+ * @example
601
+ * ```html
602
+ * <ds-select-group>
603
+ * <ds-select-label>Fruits</ds-select-label>
604
+ * <ds-select-option value="apple">Apple</ds-select-option>
605
+ * </ds-select-group>
606
+ * ```
607
+ */
608
+ declare class DsSelectLabel extends DSElement {
609
+ connectedCallback(): void;
610
+ render(): lit.TemplateResult<1>;
611
+ }
612
+ declare global {
613
+ interface HTMLElementTagNameMap {
614
+ "ds-select-label": DsSelectLabel;
615
+ }
616
+ }
617
+
618
+ declare const DsSelect_base: (new (...args: any[]) => FormAssociatedInterface & lit.LitElement) & typeof DSElement & {
619
+ formAssociated: true;
620
+ };
621
+ /**
622
+ * Select component with keyboard navigation, type-ahead, and native form participation.
623
+ *
624
+ * Uses ElementInternals for form association - the selected value is submitted with the form
625
+ * and the select participates in constraint validation.
626
+ *
627
+ * Implements WAI-ARIA Listbox pattern with:
628
+ * - Arrow key navigation between options
629
+ * - Type-ahead search to jump to options
630
+ * - Enter/Space/Click to select options
631
+ * - Escape to close
632
+ *
633
+ * @element ds-select
634
+ *
635
+ * @slot trigger - Trigger element (ds-select-trigger with button inside)
636
+ * @slot - Select content (ds-select-content with ds-select-option children)
637
+ *
638
+ * @fires ds:open-change - Fired when open state changes (detail: { open, reason })
639
+ * @fires ds:change - Fired when value changes (detail: { value, label })
640
+ * @fires ds:invalid - Fired when customValidation is true and validation fails
641
+ *
642
+ * @example
643
+ * ```html
644
+ * <form>
645
+ * <ds-select name="fruit" required>
646
+ * <ds-select-trigger slot="trigger">
647
+ * <button>Select fruit</button>
648
+ * </ds-select-trigger>
649
+ * <ds-select-content>
650
+ * <ds-select-option value="apple">Apple</ds-select-option>
651
+ * <ds-select-option value="banana">Banana</ds-select-option>
652
+ * </ds-select-content>
653
+ * </ds-select>
654
+ * <button type="submit">Submit</button>
655
+ * </form>
656
+ * ```
657
+ */
658
+ declare class DsSelect extends DsSelect_base {
659
+ /** Whether the select is open */
660
+ open: boolean;
661
+ /** Current selected value */
662
+ value: string;
663
+ /** Placement relative to trigger */
664
+ placement: Placement;
665
+ /** Offset distance from trigger in pixels */
666
+ offset: number;
667
+ /** Whether to flip placement when near viewport edge */
668
+ flip: boolean;
669
+ /** Whether to animate open/close transitions */
670
+ animated: boolean;
671
+ /** Whether the select is disabled */
672
+ disabled: boolean;
673
+ /** Whether the select is read-only */
674
+ readonly: boolean;
675
+ /** Whether to enable type-ahead search */
676
+ searchable: boolean;
677
+ /** Whether to show clear button */
678
+ clearable: boolean;
679
+ /** Enable virtualization for large lists */
680
+ virtualize: boolean;
681
+ /** Virtualization threshold (default: 100) */
682
+ virtualizationThreshold: number;
683
+ /** Whether the select is in a loading state (e.g., fetching options) */
684
+ loading: boolean;
685
+ /** Text to display/announce during loading */
686
+ loadingText: string;
687
+ /**
688
+ * Data-driven options array. Use this for programmatic option rendering.
689
+ * When provided, options will be rendered from this array instead of slots.
690
+ */
691
+ items: Option<string>[];
692
+ /** Visible item IDs for virtualization */
693
+ private visibleItemIds;
694
+ /** Default value for form reset */
695
+ private _defaultValue;
696
+ private behavior;
697
+ private anchorPosition;
698
+ private dismissLayer;
699
+ private presence;
700
+ private rovingFocus;
701
+ private typeAhead;
702
+ private virtualizedList;
703
+ private resizeObserver;
704
+ private scrollHandler;
705
+ private focusFirstOnOpen;
706
+ connectedCallback(): void;
707
+ disconnectedCallback(): void;
708
+ /**
709
+ * Opens the select.
710
+ */
711
+ show(): void;
712
+ /**
713
+ * Closes the select.
714
+ */
715
+ close(): void;
716
+ /**
717
+ * Completes the close after exit animation.
718
+ */
719
+ private completeClose;
720
+ /**
721
+ * Toggles the select open/closed state.
722
+ */
723
+ toggle(): void;
724
+ /**
725
+ * Selects a value programmatically.
726
+ */
727
+ select(value: string): void;
728
+ /**
729
+ * Clears the selection.
730
+ */
731
+ clear(): void;
732
+ private getTriggerElement;
733
+ private getOptions;
734
+ private getEnabledOptions;
735
+ private getOptionByValue;
736
+ private registerOptions;
737
+ private updateOptionStates;
738
+ private handleTriggerClick;
739
+ private handleKeyDown;
740
+ private handleTriggerKeyDown;
741
+ private handleContentKeyDown;
742
+ private selectOption;
743
+ private selectHighlighted;
744
+ private handleDismiss;
745
+ private setupTriggerAccessibility;
746
+ private updateLoadingState;
747
+ private updateTriggerAria;
748
+ private setupPositioning;
749
+ private setupDismissLayer;
750
+ private setupRovingFocus;
751
+ private setupTypeAhead;
752
+ private handleTypeAheadKeyDown;
753
+ private focusInitialItem;
754
+ private cleanup;
755
+ updated(changedProperties: Map<string, unknown>): Promise<void>;
756
+ protected getFormValue(): string | null;
757
+ protected getValidationAnchor(): HTMLElement | undefined;
758
+ protected getValidationFlags(): ValidationFlags;
759
+ protected getValidationMessage(flags: ValidationFlags): string;
760
+ protected shouldUpdateFormValue(changedProperties: PropertyValues): boolean;
761
+ protected shouldUpdateValidity(changedProperties: PropertyValues): boolean;
762
+ protected onFormReset(): void;
763
+ protected onFormStateRestore(state: string | File | FormData | null, _mode: "restore" | "autocomplete"): void;
764
+ /**
765
+ * Returns true if using data-driven rendering.
766
+ */
767
+ private get isDataDriven();
768
+ /**
769
+ * Renders a single option from data.
770
+ */
771
+ private renderDataOption;
772
+ /**
773
+ * Renders data-driven options with optional virtualization.
774
+ */
775
+ private renderDataOptions;
776
+ render(): lit.TemplateResult<1>;
777
+ }
778
+ declare global {
779
+ interface HTMLElementTagNameMap {
780
+ "ds-select": DsSelect;
781
+ }
782
+ }
783
+
784
+ type ComboboxContentState = "open" | "closed";
785
+ /**
786
+ * Combobox content container with role="listbox".
787
+ *
788
+ * @element ds-combobox-content
789
+ *
790
+ * @slot - Combobox options (ds-combobox-option elements)
791
+ *
792
+ * @attr {string} data-state - Animation state ("open" or "closed")
793
+ * @attr {string} data-placement - Current anchor position placement
794
+ *
795
+ * @example
796
+ * ```html
797
+ * <ds-combobox>
798
+ * <input slot="input" placeholder="Search fruits..." />
799
+ * <ds-combobox-content>
800
+ * <ds-combobox-option value="apple">Apple</ds-combobox-option>
801
+ * <ds-combobox-option value="banana">Banana</ds-combobox-option>
802
+ * </ds-combobox-content>
803
+ * </ds-combobox>
804
+ * ```
805
+ */
806
+ declare class DsComboboxContent extends DSElement {
807
+ /** Unique ID for ARIA association */
808
+ id: string;
809
+ /** Animation state (open or closed) - set by parent ds-combobox */
810
+ dataState: ComboboxContentState;
811
+ /** Optional label for the listbox */
812
+ label: string;
813
+ /** Whether to show loading indicator */
814
+ loading: boolean;
815
+ connectedCallback(): void;
816
+ updated(changedProperties: Map<string, unknown>): void;
817
+ render(): lit.TemplateResult<1>;
818
+ }
819
+ declare global {
820
+ interface HTMLElementTagNameMap {
821
+ "ds-combobox-content": DsComboboxContent;
822
+ }
823
+ }
824
+
825
+ /**
826
+ * Combobox input wrapper with combobox role.
827
+ *
828
+ * @element ds-combobox-input
829
+ *
830
+ * @slot - Input element
831
+ *
832
+ * @example
833
+ * ```html
834
+ * <ds-combobox>
835
+ * <ds-combobox-input>
836
+ * <input placeholder="Search..." />
837
+ * </ds-combobox-input>
838
+ * <ds-combobox-content>...</ds-combobox-content>
839
+ * </ds-combobox>
840
+ * ```
841
+ */
842
+ declare class DsComboboxInput extends DSElement {
843
+ /** Whether the parent combobox is disabled */
844
+ disabled: boolean;
845
+ connectedCallback(): void;
846
+ private setupInputAccessibility;
847
+ /**
848
+ * Updates ARIA attributes on the input element.
849
+ */
850
+ updateAria(expanded: boolean, activeDescendantId?: string, controlsId?: string): void;
851
+ /**
852
+ * Sets the loading state on the input.
853
+ */
854
+ setLoading(loading: boolean): void;
855
+ /**
856
+ * Gets the actual input element.
857
+ */
858
+ getInputElement(): HTMLInputElement | null;
859
+ /**
860
+ * Gets the current input value.
861
+ */
862
+ getValue(): string;
863
+ /**
864
+ * Sets the input value.
865
+ */
866
+ setValue(value: string): void;
867
+ updated(changedProperties: Map<string, unknown>): void;
868
+ render(): lit.TemplateResult<1>;
869
+ }
870
+ declare global {
871
+ interface HTMLElementTagNameMap {
872
+ "ds-combobox-input": DsComboboxInput;
873
+ }
874
+ }
875
+
876
+ /**
877
+ * Combobox option with role="option".
878
+ *
879
+ * @element ds-combobox-option
880
+ *
881
+ * @slot - Option content (text, icon, etc.)
882
+ *
883
+ * @example
884
+ * ```html
885
+ * <ds-combobox-option value="apple">Apple</ds-combobox-option>
886
+ * <ds-combobox-option value="banana" disabled>Banana</ds-combobox-option>
887
+ * ```
888
+ */
889
+ declare class DsComboboxOption extends DSElement {
890
+ /** Whether the option is disabled */
891
+ disabled: boolean;
892
+ /** Value associated with this option */
893
+ value: string;
894
+ /** Display label (uses textContent if not specified) */
895
+ label: string;
896
+ connectedCallback(): void;
897
+ /**
898
+ * Gets the display label for this option.
899
+ */
900
+ getLabel(): string;
901
+ private updateAriaDisabled;
902
+ /**
903
+ * Sets the selected state of this option.
904
+ */
905
+ setSelected(selected: boolean): void;
906
+ /**
907
+ * Sets the highlighted state of this option.
908
+ */
909
+ setHighlighted(highlighted: boolean): void;
910
+ updated(changedProperties: Map<string, unknown>): void;
911
+ render(): lit.TemplateResult<1>;
912
+ }
913
+ declare global {
914
+ interface HTMLElementTagNameMap {
915
+ "ds-combobox-option": DsComboboxOption;
916
+ }
917
+ }
918
+
919
+ /**
920
+ * Combobox tag for multi-select mode.
921
+ *
922
+ * @element ds-combobox-tag
923
+ *
924
+ * @slot - Tag content
925
+ *
926
+ * @fires ds:remove - Fired when tag remove button is clicked
927
+ *
928
+ * @example
929
+ * ```html
930
+ * <ds-combobox-tag value="apple">
931
+ * Apple
932
+ * <button slot="remove" aria-label="Remove Apple">×</button>
933
+ * </ds-combobox-tag>
934
+ * ```
935
+ */
936
+ declare class DsComboboxTag extends DSElement {
937
+ /** Value associated with this tag */
938
+ value: string;
939
+ /** Display label */
940
+ label: string;
941
+ /** Whether the tag is disabled (can't be removed) */
942
+ disabled: boolean;
943
+ connectedCallback(): void;
944
+ disconnectedCallback(): void;
945
+ private handleClick;
946
+ private handleKeyDown;
947
+ /**
948
+ * Triggers removal of this tag.
949
+ */
950
+ remove_(): void;
951
+ /**
952
+ * Gets the display label for this tag.
953
+ */
954
+ getLabel(): string;
955
+ render(): lit.TemplateResult<1>;
956
+ }
957
+ declare global {
958
+ interface HTMLElementTagNameMap {
959
+ "ds-combobox-tag": DsComboboxTag;
960
+ }
961
+ }
962
+
963
+ declare const DsCombobox_base: (new (...args: any[]) => FormAssociatedInterface & lit.LitElement) & typeof DSElement & {
964
+ formAssociated: true;
965
+ };
966
+ /**
967
+ * Combobox component with async loading, multi-select, keyboard navigation, and native form participation.
968
+ *
969
+ * Uses ElementInternals for form association - the selected value(s) are submitted with the form
970
+ * and the combobox participates in constraint validation.
971
+ *
972
+ * Implements WAI-ARIA Combobox pattern with:
973
+ * - Text input with autocomplete suggestions
974
+ * - Arrow key navigation between options
975
+ * - Async loading with debounce
976
+ * - Multi-select with tag display
977
+ * - Enter to select, Escape to close
978
+ *
979
+ * @element ds-combobox
980
+ *
981
+ * @slot input - Input element (ds-combobox-input with input inside)
982
+ * @slot tags - Selected value tags (for multi-select)
983
+ * @slot - Combobox content (ds-combobox-content with ds-combobox-option children)
984
+ *
985
+ * @fires ds:open - Fired when combobox opens
986
+ * @fires ds:close - Fired when combobox closes
987
+ * @fires ds:change - Fired when value changes (detail: { value, label } or { values, labels })
988
+ * @fires ds:input - Fired when input value changes (detail: { value })
989
+ * @fires ds:invalid - Fired when customValidation is true and validation fails
990
+ *
991
+ * @example
992
+ * ```html
993
+ * <form>
994
+ * <ds-combobox name="fruit" required>
995
+ * <ds-combobox-input slot="input">
996
+ * <input placeholder="Search fruits..." />
997
+ * </ds-combobox-input>
998
+ * <ds-combobox-content>
999
+ * <ds-combobox-option value="apple">Apple</ds-combobox-option>
1000
+ * <ds-combobox-option value="banana">Banana</ds-combobox-option>
1001
+ * </ds-combobox-content>
1002
+ * </ds-combobox>
1003
+ * <button type="submit">Submit</button>
1004
+ * </form>
1005
+ * ```
1006
+ */
1007
+ declare class DsCombobox extends DsCombobox_base {
1008
+ /** Whether the combobox is open */
1009
+ open: boolean;
1010
+ /** Current selected value (single-select mode) */
1011
+ value: string;
1012
+ /** Current selected values (multi-select mode) */
1013
+ values: string[];
1014
+ /** Placement relative to input */
1015
+ placement: Placement;
1016
+ /** Offset distance from input in pixels */
1017
+ offset: number;
1018
+ /** Whether to flip placement when near viewport edge */
1019
+ flip: boolean;
1020
+ /** Whether to animate open/close transitions */
1021
+ animated: boolean;
1022
+ /** Whether the combobox is disabled */
1023
+ disabled: boolean;
1024
+ /** Enable multi-select mode */
1025
+ multiple: boolean;
1026
+ /** Allow creating new values */
1027
+ creatable: boolean;
1028
+ /** Debounce delay for async loading in milliseconds */
1029
+ debounce: number;
1030
+ /** Virtualization threshold (default: 100) */
1031
+ virtualizationThreshold: number;
1032
+ /** Enable virtualization for large lists */
1033
+ virtualize: boolean;
1034
+ /**
1035
+ * Async loading function. Called when input changes (after debounce).
1036
+ * Return an array of Option objects: { value: string, label: string, disabled?: boolean }
1037
+ */
1038
+ loadItems?: (query: string, signal: AbortSignal) => Promise<Option<string>[]>;
1039
+ /**
1040
+ * Data-driven options array. Use this for programmatic option rendering.
1041
+ * When provided, options will be rendered from this array instead of slots.
1042
+ */
1043
+ items: Option<string>[];
1044
+ /** Whether async loading is in progress (read-only) */
1045
+ loading: boolean;
1046
+ /** Error message from async loading (read-only) */
1047
+ loadError: string | null;
1048
+ /** Filtered items for display */
1049
+ private filteredItems;
1050
+ /** Visible item IDs for virtualization */
1051
+ private visibleItemIds;
1052
+ /** Default value for form reset (single-select) */
1053
+ private _defaultValue;
1054
+ /** Default values for form reset (multi-select) */
1055
+ private _defaultValues;
1056
+ private behavior;
1057
+ private anchorPosition;
1058
+ private dismissLayer;
1059
+ private presence;
1060
+ private rovingFocus;
1061
+ private virtualizedList;
1062
+ private resizeObserver;
1063
+ private scrollHandler;
1064
+ private loadAbortController;
1065
+ private debounceTimeout;
1066
+ connectedCallback(): void;
1067
+ disconnectedCallback(): void;
1068
+ private initBehavior;
1069
+ /**
1070
+ * Opens the combobox.
1071
+ */
1072
+ show(): void;
1073
+ /**
1074
+ * Closes the combobox.
1075
+ */
1076
+ close(): void;
1077
+ private completeClose;
1078
+ /**
1079
+ * Selects a value programmatically.
1080
+ */
1081
+ select(value: string): void;
1082
+ /**
1083
+ * Removes a value (multi-select mode).
1084
+ */
1085
+ removeValue(value: string): void;
1086
+ /**
1087
+ * Clears all selections.
1088
+ */
1089
+ clear(): void;
1090
+ /**
1091
+ * Creates a new value (creatable mode).
1092
+ */
1093
+ create(value: string): void;
1094
+ private getInputWrapper;
1095
+ private getInputElement;
1096
+ private getOptions;
1097
+ private getEnabledOptions;
1098
+ private getOptionByValue;
1099
+ private registerOptions;
1100
+ private filterOptions;
1101
+ private updateOptionStates;
1102
+ private handleInput;
1103
+ /**
1104
+ * Schedules async loading with debounce.
1105
+ */
1106
+ private scheduleAsyncLoad;
1107
+ /**
1108
+ * Executes the async load.
1109
+ */
1110
+ private executeAsyncLoad;
1111
+ /**
1112
+ * Manually trigger async loading (useful for initial load).
1113
+ */
1114
+ load(query?: string): Promise<void>;
1115
+ private handleClick;
1116
+ private handleKeyDown;
1117
+ private handleTagRemove;
1118
+ private scrollHighlightedIntoView;
1119
+ private handleDismiss;
1120
+ private setupInputAccessibility;
1121
+ private updateInputAria;
1122
+ private setupPositioning;
1123
+ private setupDismissLayer;
1124
+ private setupRovingFocus;
1125
+ private cleanup;
1126
+ updated(changedProperties: Map<string, unknown>): Promise<void>;
1127
+ /**
1128
+ * Returns true if using data-driven rendering.
1129
+ */
1130
+ private get isDataDriven();
1131
+ /**
1132
+ * Renders a single option from data.
1133
+ */
1134
+ private renderDataOption;
1135
+ /**
1136
+ * Renders loading state.
1137
+ */
1138
+ private renderLoading;
1139
+ /**
1140
+ * Renders error state.
1141
+ */
1142
+ private renderError;
1143
+ /**
1144
+ * Renders empty state.
1145
+ */
1146
+ private renderEmpty;
1147
+ protected getFormValue(): FormData | string | null;
1148
+ protected getValidationAnchor(): HTMLElement | undefined;
1149
+ protected getValidationFlags(): ValidationFlags;
1150
+ protected getValidationMessage(flags: ValidationFlags): string;
1151
+ protected shouldUpdateFormValue(changedProperties: PropertyValues): boolean;
1152
+ protected shouldUpdateValidity(changedProperties: PropertyValues): boolean;
1153
+ protected onFormReset(): void;
1154
+ protected onFormStateRestore(state: string | File | FormData | null, _mode: "restore" | "autocomplete"): void;
1155
+ /**
1156
+ * Renders data-driven options.
1157
+ */
1158
+ private renderDataOptions;
1159
+ render(): lit.TemplateResult<1>;
1160
+ }
1161
+ declare global {
1162
+ interface HTMLElementTagNameMap {
1163
+ "ds-combobox": DsCombobox;
1164
+ }
1165
+ }
1166
+
1167
+ type CalendarState = "open" | "closed";
1168
+ /**
1169
+ * DatePicker calendar grid with navigation.
1170
+ *
1171
+ * @element ds-date-picker-calendar
1172
+ *
1173
+ * @slot header - Custom header content
1174
+ *
1175
+ * @fires ds:date-select - Fired when a date is selected
1176
+ * @fires ds:navigate - Fired when month/year navigation occurs
1177
+ *
1178
+ * @example
1179
+ * ```html
1180
+ * <ds-date-picker-calendar
1181
+ * viewing-month="2026-01"
1182
+ * selected-date="2026-01-15"
1183
+ * min-date="2026-01-01"
1184
+ * ></ds-date-picker-calendar>
1185
+ * ```
1186
+ */
1187
+ declare class DsDatePickerCalendar extends DSElement {
1188
+ /** Current viewing month (YYYY-MM format) */
1189
+ viewingMonth: string;
1190
+ /** Selected date (ISO format) */
1191
+ selectedDate: string;
1192
+ /** Selected range start (ISO format) */
1193
+ rangeStart: string;
1194
+ /** Selected range end (ISO format) */
1195
+ rangeEnd: string;
1196
+ /** Minimum selectable date (ISO format) */
1197
+ minDate: string;
1198
+ /** Maximum selectable date (ISO format) */
1199
+ maxDate: string;
1200
+ /** Locale for formatting */
1201
+ locale: string;
1202
+ /** First day of week (0=Sunday, 1=Monday, etc.) */
1203
+ firstDayOfWeek: 0 | 1 | 2 | 3 | 4 | 5 | 6;
1204
+ /** Animation state */
1205
+ dataState: CalendarState;
1206
+ /** Whether in range selection mode */
1207
+ range: boolean;
1208
+ private focusedDate;
1209
+ private monthFormatter;
1210
+ private weekdayFormatter;
1211
+ connectedCallback(): void;
1212
+ disconnectedCallback(): void;
1213
+ private updateFormatters;
1214
+ private getTodayIso;
1215
+ private parseDate;
1216
+ private formatIso;
1217
+ private getViewingDate;
1218
+ private getWeekdayNames;
1219
+ private getMonthDays;
1220
+ private isDateDisabled;
1221
+ private isDateSelected;
1222
+ private isDateInRange;
1223
+ private isDateToday;
1224
+ private isDateInCurrentMonth;
1225
+ private handleDateClick;
1226
+ private handleKeyDown;
1227
+ /**
1228
+ * Navigate to previous/next month.
1229
+ */
1230
+ navigateMonth(delta: number): void;
1231
+ /**
1232
+ * Navigate to previous/next year.
1233
+ */
1234
+ navigateYear(delta: number): void;
1235
+ updated(changedProperties: Map<string, unknown>): void;
1236
+ render(): lit.TemplateResult<1>;
1237
+ private renderWeeks;
1238
+ private renderDay;
1239
+ }
1240
+ declare global {
1241
+ interface HTMLElementTagNameMap {
1242
+ "ds-date-picker-calendar": DsDatePickerCalendar;
1243
+ }
1244
+ }
1245
+
1246
+ /**
1247
+ * Result of parsing a typed date input.
1248
+ */
1249
+ interface DateParseResult {
1250
+ /** Whether the input was successfully parsed */
1251
+ valid: boolean;
1252
+ /** The parsed date in ISO format (YYYY-MM-DD), if valid */
1253
+ date: string | null;
1254
+ /** Error message if invalid */
1255
+ error: string | null;
1256
+ }
1257
+
1258
+ type DatePickerMode = "single" | "range";
1259
+ /**
1260
+ * DatePicker component with calendar dropdown.
1261
+ *
1262
+ * Implements WAI-ARIA DatePicker pattern with:
1263
+ * - Arrow key navigation within calendar grid
1264
+ * - Page Up/Down for month navigation
1265
+ * - Enter/Space to select date
1266
+ * - Escape to close
1267
+ *
1268
+ * @element ds-date-picker
1269
+ *
1270
+ * @slot trigger - Trigger element (button or input)
1271
+ * @slot - Calendar content (ds-date-picker-calendar)
1272
+ *
1273
+ * @fires ds:open - Fired when calendar opens
1274
+ * @fires ds:close - Fired when calendar closes
1275
+ * @fires ds:change - Fired when date changes (detail: { date } or { start, end })
1276
+ *
1277
+ * @example
1278
+ * ```html
1279
+ * <ds-date-picker value="2026-01-15">
1280
+ * <button slot="trigger">Select date</button>
1281
+ * <ds-date-picker-calendar></ds-date-picker-calendar>
1282
+ * </ds-date-picker>
1283
+ * ```
1284
+ */
1285
+ declare class DsDatePicker extends DSElement {
1286
+ /** Whether the calendar is open */
1287
+ open: boolean;
1288
+ /** Selection mode: single date or date range */
1289
+ mode: DatePickerMode;
1290
+ /** Selected date in ISO format (YYYY-MM-DD) */
1291
+ value: string;
1292
+ /** Range start date in ISO format */
1293
+ rangeStart: string;
1294
+ /** Range end date in ISO format */
1295
+ rangeEnd: string;
1296
+ /** Minimum selectable date in ISO format */
1297
+ minDate: string;
1298
+ /** Maximum selectable date in ISO format */
1299
+ maxDate: string;
1300
+ /** Locale for date formatting */
1301
+ locale: string;
1302
+ /** First day of week (0=Sunday, 1=Monday) */
1303
+ firstDayOfWeek: 0 | 1 | 2 | 3 | 4 | 5 | 6;
1304
+ /** Placement relative to trigger */
1305
+ placement: Placement;
1306
+ /** Offset distance from trigger in pixels */
1307
+ offset: number;
1308
+ /** Whether to flip placement when near viewport edge */
1309
+ flip: boolean;
1310
+ /** Whether to animate open/close transitions */
1311
+ animated: boolean;
1312
+ /** Whether the date picker is disabled */
1313
+ disabled: boolean;
1314
+ /** Whether the date picker is read-only */
1315
+ readonly: boolean;
1316
+ /** Whether to allow typed date input (when using input trigger) */
1317
+ typedInput: boolean;
1318
+ /** Current text value of the input (for typed input mode) */
1319
+ inputValue: string;
1320
+ /** Current validation error message */
1321
+ inputError: string | null;
1322
+ private anchorPosition;
1323
+ private dismissLayer;
1324
+ private presence;
1325
+ private resizeObserver;
1326
+ private scrollHandler;
1327
+ private isSelectingRange;
1328
+ connectedCallback(): void;
1329
+ disconnectedCallback(): void;
1330
+ /**
1331
+ * Opens the calendar.
1332
+ */
1333
+ show(): void;
1334
+ /**
1335
+ * Closes the calendar.
1336
+ */
1337
+ close(): void;
1338
+ private completeClose;
1339
+ /**
1340
+ * Toggles the calendar.
1341
+ */
1342
+ toggle(): void;
1343
+ /**
1344
+ * Sets the selected date programmatically.
1345
+ */
1346
+ setDate(date: string): void;
1347
+ /**
1348
+ * Sets the date range programmatically.
1349
+ */
1350
+ setRange(start: string, end: string): void;
1351
+ /**
1352
+ * Clears the selected date(s).
1353
+ */
1354
+ clear(): void;
1355
+ private getTriggerElement;
1356
+ private handleTriggerClick;
1357
+ private handleTriggerKeyDown;
1358
+ private handleDateSelect;
1359
+ private handleDismiss;
1360
+ /**
1361
+ * Handles typed input events.
1362
+ */
1363
+ private handleTypedInput;
1364
+ /**
1365
+ * Handles input blur to finalize typed input.
1366
+ */
1367
+ private handleInputBlur;
1368
+ /**
1369
+ * Commits the typed input value as the selected date.
1370
+ */
1371
+ private commitTypedInput;
1372
+ /**
1373
+ * Gets the expected input format placeholder.
1374
+ */
1375
+ getFormatPlaceholder(): string;
1376
+ /**
1377
+ * Gets the current validation error.
1378
+ */
1379
+ getValidationError(): string | null;
1380
+ /**
1381
+ * Parses a typed date string and returns the validation result.
1382
+ */
1383
+ parseInput(input: string): DateParseResult;
1384
+ private setupPositioning;
1385
+ private setupDismissLayer;
1386
+ private cleanup;
1387
+ updated(changedProperties: Map<string, unknown>): Promise<void>;
1388
+ render(): lit.TemplateResult<1>;
1389
+ }
1390
+ declare global {
1391
+ interface HTMLElementTagNameMap {
1392
+ "ds-date-picker": DsDatePicker;
1393
+ }
1394
+ }
1395
+
1396
+ declare class DsSlider extends DSElement {
1397
+ /** Minimum allowed value */
1398
+ min: number;
1399
+ /** Maximum allowed value */
1400
+ max: number;
1401
+ /** Step increment */
1402
+ step: number;
1403
+ /** Current value (single mode) */
1404
+ value: number;
1405
+ /** Range mode (two thumbs) */
1406
+ range: boolean;
1407
+ /** Minimum value in range mode */
1408
+ rangeMin: number;
1409
+ /** Maximum value in range mode */
1410
+ rangeMax: number;
1411
+ /** Orientation */
1412
+ orientation: "horizontal" | "vertical";
1413
+ /** Disabled state */
1414
+ disabled: boolean;
1415
+ /** Optional label */
1416
+ label: string;
1417
+ /** ARIA label */
1418
+ ariaLabel: string | null;
1419
+ /** Value text formatter for screen readers */
1420
+ formatValueText?: (value: number) => string;
1421
+ /** Show tick marks */
1422
+ showTicks: boolean;
1423
+ /** Show value tooltip on focus/drag */
1424
+ showTooltip: boolean;
1425
+ /** Number of tick marks (defaults to (max-min)/step if step > 1) */
1426
+ tickCount?: number;
1427
+ private behavior;
1428
+ private focusedThumb;
1429
+ private dragging;
1430
+ private trackRef;
1431
+ private boundHandlePointerMove;
1432
+ private boundHandlePointerUp;
1433
+ connectedCallback(): void;
1434
+ disconnectedCallback(): void;
1435
+ updated(changedProperties: Map<string, unknown>): void;
1436
+ private initBehavior;
1437
+ private handleThumbPointerDown;
1438
+ private handlePointerMove;
1439
+ private handlePointerUp;
1440
+ private handleTrackClick;
1441
+ private getClosestThumb;
1442
+ private handleThumbKeyDown;
1443
+ private addGlobalListeners;
1444
+ private removeGlobalListeners;
1445
+ private getValueText;
1446
+ private handleThumbFocus;
1447
+ private handleThumbBlur;
1448
+ private getTickPositions;
1449
+ private renderTicks;
1450
+ private renderTooltip;
1451
+ render(): typeof nothing | lit.TemplateResult<1>;
1452
+ }
1453
+ declare global {
1454
+ interface HTMLElementTagNameMap {
1455
+ "ds-slider": DsSlider;
1456
+ }
1457
+ }
1458
+
1459
+ type NumberInputFormat = "decimal" | "currency" | "percent";
1460
+ declare class DsNumberInput extends DSElement {
1461
+ /** Minimum allowed value */
1462
+ min: number | undefined;
1463
+ /** Maximum allowed value */
1464
+ max: number | undefined;
1465
+ /** Step increment */
1466
+ step: number;
1467
+ /** Current value */
1468
+ value: number | undefined;
1469
+ /** Decimal precision */
1470
+ precision: number;
1471
+ /** Format type */
1472
+ format: NumberInputFormat;
1473
+ /** Currency code (for currency format) */
1474
+ currency: string;
1475
+ /** Locale for formatting */
1476
+ locale: string;
1477
+ /** Disabled state */
1478
+ disabled: boolean;
1479
+ /** Placeholder text */
1480
+ placeholder: string;
1481
+ /** Form field name */
1482
+ name: string;
1483
+ /** ARIA label */
1484
+ ariaLabel: string | null;
1485
+ /** Allow empty input */
1486
+ allowEmpty: boolean;
1487
+ /** Show increment/decrement buttons */
1488
+ showButtons: boolean;
1489
+ /** Prefix text (displayed before input) */
1490
+ prefix: string;
1491
+ /** Suffix text (displayed after input) */
1492
+ suffix: string;
1493
+ private behavior;
1494
+ private inputValue;
1495
+ private isFocused;
1496
+ connectedCallback(): void;
1497
+ disconnectedCallback(): void;
1498
+ updated(changedProperties: Map<string, unknown>): void;
1499
+ private initBehavior;
1500
+ private handleInput;
1501
+ private handleBlur;
1502
+ private handleFocus;
1503
+ private handleKeyDown;
1504
+ private handleIncrement;
1505
+ private handleDecrement;
1506
+ render(): typeof nothing | lit.TemplateResult<1>;
1507
+ }
1508
+ declare global {
1509
+ interface HTMLElementTagNameMap {
1510
+ "ds-number-input": DsNumberInput;
1511
+ }
1512
+ }
1513
+
1514
+ declare class DsFileUpload extends DSElement {
1515
+ /** Accepted file types (MIME types or extensions) */
1516
+ accept: string;
1517
+ /** Maximum number of files */
1518
+ maxFiles: number;
1519
+ /** Maximum file size in bytes */
1520
+ maxSize: number | undefined;
1521
+ /** Minimum file size in bytes */
1522
+ minSize: number | undefined;
1523
+ /** Allow multiple files */
1524
+ multiple: boolean;
1525
+ /** Disabled state */
1526
+ disabled: boolean;
1527
+ /** Show file list */
1528
+ showFileList: boolean;
1529
+ /** Show remove buttons in file list */
1530
+ showRemove: boolean;
1531
+ /** ARIA label */
1532
+ ariaLabel: string | null;
1533
+ private behavior;
1534
+ private files;
1535
+ private isDragging;
1536
+ private announcement;
1537
+ private inputRef;
1538
+ private announcementTimeout;
1539
+ connectedCallback(): void;
1540
+ disconnectedCallback(): void;
1541
+ private announce;
1542
+ updated(changedProperties: Map<string, unknown>): void;
1543
+ private initBehavior;
1544
+ /** Public method to get current files */
1545
+ getFiles(): FileInfo[];
1546
+ /** Public method to clear all files */
1547
+ clearFiles(): void;
1548
+ /** Public method to remove a file */
1549
+ removeFile(id: string): void;
1550
+ private handleClick;
1551
+ private handleInputChange;
1552
+ private handleKeyDown;
1553
+ private handleDragEnter;
1554
+ private handleDragLeave;
1555
+ private handleDragOver;
1556
+ private handleDrop;
1557
+ private handleRemoveFile;
1558
+ private renderFileItem;
1559
+ render(): typeof nothing | lit.TemplateResult<1>;
1560
+ }
1561
+ declare global {
1562
+ interface HTMLElementTagNameMap {
1563
+ "ds-file-upload": DsFileUpload;
1564
+ }
1565
+ }
1566
+
1567
+ declare class DsTimePicker extends DSElement {
1568
+ /** 12-hour or 24-hour format */
1569
+ hourFormat: 12 | 24;
1570
+ /** Show seconds segment */
1571
+ showSeconds: boolean;
1572
+ /** Time value as HH:MM or HH:MM:SS string */
1573
+ value: string;
1574
+ /** Minute step */
1575
+ minuteStep: number;
1576
+ /** Second step */
1577
+ secondStep: number;
1578
+ /** Disabled state */
1579
+ disabled: boolean;
1580
+ /** ARIA label */
1581
+ ariaLabel: string | null;
1582
+ private behavior;
1583
+ private focusedSegment;
1584
+ connectedCallback(): void;
1585
+ disconnectedCallback(): void;
1586
+ updated(changedProperties: Map<string, unknown>): void;
1587
+ private initBehavior;
1588
+ private parseTimeString;
1589
+ private handleSegmentFocus;
1590
+ private handleSegmentBlur;
1591
+ private handleSegmentKeyDown;
1592
+ private renderSegment;
1593
+ render(): typeof nothing | lit.TemplateResult<1>;
1594
+ }
1595
+ declare global {
1596
+ interface HTMLElementTagNameMap {
1597
+ "ds-time-picker": DsTimePicker;
1598
+ }
1599
+ }
1600
+
1601
+ declare class DsPinInput extends DSElement {
1602
+ /** Number of input fields */
1603
+ length: number;
1604
+ /** Current value */
1605
+ value: string;
1606
+ /** Allow alphanumeric characters */
1607
+ alphanumeric: boolean;
1608
+ /** Disabled state */
1609
+ disabled: boolean;
1610
+ /** Mask input (like password) */
1611
+ mask: boolean;
1612
+ /** ARIA label */
1613
+ ariaLabel: string | null;
1614
+ private behavior;
1615
+ private focusedIndex;
1616
+ private inputRefs;
1617
+ connectedCallback(): void;
1618
+ disconnectedCallback(): void;
1619
+ updated(changedProperties: Map<string, unknown>): void;
1620
+ private initBehavior;
1621
+ /** Public method to clear the input */
1622
+ clear(): void;
1623
+ /** Public method to set value programmatically */
1624
+ setValue(value: string): void;
1625
+ private focusInput;
1626
+ private handleInput;
1627
+ private handleKeyDown;
1628
+ private handlePaste;
1629
+ private handleFocus;
1630
+ private handleBlur;
1631
+ render(): typeof nothing | lit.TemplateResult<1>;
1632
+ }
1633
+ declare global {
1634
+ interface HTMLElementTagNameMap {
1635
+ "ds-pin-input": DsPinInput;
1636
+ }
1637
+ }
1638
+
1639
+ declare const DsCheckbox_base: (new (...args: any[]) => FormAssociatedInterface & lit.LitElement) & typeof DSElement & {
1640
+ formAssociated: true;
1641
+ };
1642
+ /**
1643
+ * Checkbox input with tri-state support and native form participation.
1644
+ *
1645
+ * Uses ElementInternals for form association - values are submitted with the form
1646
+ * and the checkbox participates in constraint validation.
1647
+ *
1648
+ * @element ds-checkbox
1649
+ * @fires ds:change - Fired on state change with { checked, indeterminate }
1650
+ * @fires ds:invalid - Fired when customValidation is true and validation fails
1651
+ *
1652
+ * @slot - Checkbox label
1653
+ *
1654
+ * @example
1655
+ * ```html
1656
+ * <form>
1657
+ * <ds-checkbox name="accept" required>Accept terms and conditions</ds-checkbox>
1658
+ * <button type="submit">Submit</button>
1659
+ * </form>
1660
+ *
1661
+ * <ds-field>
1662
+ * <ds-checkbox name="newsletter" custom-validation>Subscribe to newsletter</ds-checkbox>
1663
+ * <ds-field-error></ds-field-error>
1664
+ * </ds-field>
1665
+ * ```
1666
+ */
1667
+ declare class DsCheckbox extends DsCheckbox_base {
1668
+ /** Checked state */
1669
+ checked: boolean;
1670
+ /** Indeterminate (mixed) state */
1671
+ indeterminate: boolean;
1672
+ /** ARIA describedby - IDs of elements that describe this checkbox */
1673
+ private ariaDescribedBy?;
1674
+ /** Label text captured from slot */
1675
+ private labelText;
1676
+ /** Unique ID for label association */
1677
+ private labelId;
1678
+ /** Default checked state for form reset */
1679
+ private _defaultChecked;
1680
+ private attributeObserver;
1681
+ connectedCallback(): void;
1682
+ disconnectedCallback(): void;
1683
+ /**
1684
+ * Syncs ARIA attributes from the host element to internal state.
1685
+ */
1686
+ private syncAriaAttributes;
1687
+ /**
1688
+ * Returns the aria-checked value based on state.
1689
+ */
1690
+ private getAriaChecked;
1691
+ /**
1692
+ * Toggles the checkbox state.
1693
+ */
1694
+ private toggle;
1695
+ private handleClick;
1696
+ private handleKeyDown;
1697
+ protected getFormValue(): string | null;
1698
+ protected getValidationAnchor(): HTMLElement | undefined;
1699
+ protected getValidationFlags(): ValidationFlags;
1700
+ protected getValidationMessage(flags: ValidationFlags): string;
1701
+ protected shouldUpdateFormValue(changedProperties: PropertyValues): boolean;
1702
+ protected shouldUpdateValidity(changedProperties: PropertyValues): boolean;
1703
+ protected onFormReset(): void;
1704
+ protected onFormStateRestore(state: string | File | FormData | null, _mode: "restore" | "autocomplete"): void;
1705
+ render(): lit.TemplateResult<1>;
1706
+ }
1707
+ declare global {
1708
+ interface HTMLElementTagNameMap {
1709
+ "ds-checkbox": DsCheckbox;
1710
+ }
1711
+ }
1712
+
1713
+ export { type CalendarState, type ComboboxContentState, type DatePickerMode, DsCheckbox, DsCombobox, DsComboboxContent, DsComboboxInput, DsComboboxOption, DsComboboxTag, DsDatePicker, DsDatePickerCalendar, DsField, DsFieldDescription, DsFieldError, DsFileUpload, DsLabel, DsNumberInput, DsPinInput, DsRadio, DsRadioGroup, DsSelect, DsSelectContent, DsSelectOption, DsSelectTrigger, DsSlider, DsSwitch, DsTextarea, DsTimePicker, type NumberInputFormat, type RadioOrientation, type SelectContentState, type TextareaSize };