ngx-com 0.0.1 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/fesm2022/ngx-com-components-avatar.mjs +772 -0
  2. package/fesm2022/ngx-com-components-avatar.mjs.map +1 -0
  3. package/fesm2022/ngx-com-components-badge.mjs +138 -0
  4. package/fesm2022/ngx-com-components-badge.mjs.map +1 -0
  5. package/fesm2022/ngx-com-components-button.mjs +146 -0
  6. package/fesm2022/ngx-com-components-button.mjs.map +1 -0
  7. package/fesm2022/ngx-com-components-calendar.mjs +5046 -0
  8. package/fesm2022/ngx-com-components-calendar.mjs.map +1 -0
  9. package/fesm2022/ngx-com-components-card.mjs +590 -0
  10. package/fesm2022/ngx-com-components-card.mjs.map +1 -0
  11. package/fesm2022/ngx-com-components-checkbox.mjs +344 -0
  12. package/fesm2022/ngx-com-components-checkbox.mjs.map +1 -0
  13. package/fesm2022/ngx-com-components-collapsible.mjs +612 -0
  14. package/fesm2022/ngx-com-components-collapsible.mjs.map +1 -0
  15. package/fesm2022/ngx-com-components-confirm.mjs +562 -0
  16. package/fesm2022/ngx-com-components-confirm.mjs.map +1 -0
  17. package/fesm2022/ngx-com-components-dropdown-testing.mjs +255 -0
  18. package/fesm2022/ngx-com-components-dropdown-testing.mjs.map +1 -0
  19. package/fesm2022/ngx-com-components-dropdown.mjs +2692 -0
  20. package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -0
  21. package/fesm2022/ngx-com-components-empty-state.mjs +382 -0
  22. package/fesm2022/ngx-com-components-empty-state.mjs.map +1 -0
  23. package/fesm2022/ngx-com-components-form-field.mjs +924 -0
  24. package/fesm2022/ngx-com-components-form-field.mjs.map +1 -0
  25. package/fesm2022/ngx-com-components-icon.mjs +183 -0
  26. package/fesm2022/ngx-com-components-icon.mjs.map +1 -0
  27. package/fesm2022/ngx-com-components-item.mjs +578 -0
  28. package/fesm2022/ngx-com-components-item.mjs.map +1 -0
  29. package/fesm2022/ngx-com-components-menu.mjs +1200 -0
  30. package/fesm2022/ngx-com-components-menu.mjs.map +1 -0
  31. package/fesm2022/ngx-com-components-paginator.mjs +823 -0
  32. package/fesm2022/ngx-com-components-paginator.mjs.map +1 -0
  33. package/fesm2022/ngx-com-components-popover.mjs +901 -0
  34. package/fesm2022/ngx-com-components-popover.mjs.map +1 -0
  35. package/fesm2022/ngx-com-components-radio.mjs +621 -0
  36. package/fesm2022/ngx-com-components-radio.mjs.map +1 -0
  37. package/fesm2022/ngx-com-components-segmented-control.mjs +538 -0
  38. package/fesm2022/ngx-com-components-segmented-control.mjs.map +1 -0
  39. package/fesm2022/ngx-com-components-sort.mjs +368 -0
  40. package/fesm2022/ngx-com-components-sort.mjs.map +1 -0
  41. package/fesm2022/ngx-com-components-spinner.mjs +189 -0
  42. package/fesm2022/ngx-com-components-spinner.mjs.map +1 -0
  43. package/fesm2022/ngx-com-components-tabs.mjs +1522 -0
  44. package/fesm2022/ngx-com-components-tabs.mjs.map +1 -0
  45. package/fesm2022/ngx-com-components-tooltip.mjs +625 -0
  46. package/fesm2022/ngx-com-components-tooltip.mjs.map +1 -0
  47. package/fesm2022/ngx-com-components.mjs +17 -0
  48. package/fesm2022/ngx-com-components.mjs.map +1 -0
  49. package/fesm2022/ngx-com-tokens.mjs +12 -0
  50. package/fesm2022/ngx-com-tokens.mjs.map +1 -0
  51. package/fesm2022/ngx-com-utils.mjs +601 -0
  52. package/fesm2022/ngx-com-utils.mjs.map +1 -0
  53. package/fesm2022/ngx-com.mjs +9 -23
  54. package/fesm2022/ngx-com.mjs.map +1 -1
  55. package/package.json +105 -1
  56. package/types/ngx-com-components-avatar.d.ts +409 -0
  57. package/types/ngx-com-components-badge.d.ts +97 -0
  58. package/types/ngx-com-components-button.d.ts +69 -0
  59. package/types/ngx-com-components-calendar.d.ts +1665 -0
  60. package/types/ngx-com-components-card.d.ts +373 -0
  61. package/types/ngx-com-components-checkbox.d.ts +116 -0
  62. package/types/ngx-com-components-collapsible.d.ts +379 -0
  63. package/types/ngx-com-components-confirm.d.ts +160 -0
  64. package/types/ngx-com-components-dropdown-testing.d.ts +116 -0
  65. package/types/ngx-com-components-dropdown.d.ts +938 -0
  66. package/types/ngx-com-components-empty-state.d.ts +269 -0
  67. package/types/ngx-com-components-form-field.d.ts +531 -0
  68. package/types/ngx-com-components-icon.d.ts +94 -0
  69. package/types/ngx-com-components-item.d.ts +336 -0
  70. package/types/ngx-com-components-menu.d.ts +479 -0
  71. package/types/ngx-com-components-paginator.d.ts +265 -0
  72. package/types/ngx-com-components-popover.d.ts +309 -0
  73. package/types/ngx-com-components-radio.d.ts +258 -0
  74. package/types/ngx-com-components-segmented-control.d.ts +274 -0
  75. package/types/ngx-com-components-sort.d.ts +133 -0
  76. package/types/ngx-com-components-spinner.d.ts +120 -0
  77. package/types/ngx-com-components-tabs.d.ts +396 -0
  78. package/types/ngx-com-components-tooltip.d.ts +200 -0
  79. package/types/ngx-com-components.d.ts +12 -0
  80. package/types/ngx-com-tokens.d.ts +7 -0
  81. package/types/ngx-com-utils.d.ts +424 -0
  82. package/types/ngx-com.d.ts +10 -7
@@ -0,0 +1,938 @@
1
+ import * as i0 from '@angular/core';
2
+ import { TemplateRef, Signal, InputSignal, OutputEmitterRef, WritableSignal, OnInit } from '@angular/core';
3
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
4
+ import { FormFieldControl, ErrorStateMatcher, FormFieldAppearance } from 'ngx-com/components/form-field';
5
+ import { VariantProps } from 'class-variance-authority';
6
+ import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
7
+
8
+ /**
9
+ * Context provided to the custom option template.
10
+ * @template T The type of the option value.
11
+ */
12
+ interface ComDropdownOptionContext<T> {
13
+ /** The option value (available as implicit $implicit). */
14
+ $implicit: T;
15
+ /** The index of this option in the filtered list. */
16
+ index: number;
17
+ /** Whether this option is currently selected. */
18
+ selected: boolean;
19
+ /** Whether this option is currently active (focused via keyboard). */
20
+ active: boolean;
21
+ /** Whether this option is disabled. */
22
+ disabled: boolean;
23
+ }
24
+ /**
25
+ * Context provided to the custom selected value template.
26
+ * @template T The type of the option value.
27
+ */
28
+ interface ComDropdownSelectedContext<T> {
29
+ /** The selected value(s) (available as implicit $implicit). */
30
+ $implicit: T | T[] | null;
31
+ /** The placeholder text when no value is selected. */
32
+ placeholder: string;
33
+ /** Whether multiple selection is enabled. */
34
+ multiple: boolean;
35
+ }
36
+ /**
37
+ * Context provided to the custom empty state template.
38
+ */
39
+ interface ComDropdownEmptyContext {
40
+ /** The current search query (available as implicit $implicit). */
41
+ $implicit: string;
42
+ }
43
+ /**
44
+ * Context provided to the custom group header template.
45
+ */
46
+ interface ComDropdownGroupContext {
47
+ /** The group key/label (available as implicit $implicit). */
48
+ $implicit: string;
49
+ /** Whether the group is expanded. */
50
+ expanded: boolean;
51
+ /** The number of options in this group. */
52
+ count: number;
53
+ }
54
+ /**
55
+ * Context provided to the custom tag template (multi-select mode).
56
+ * @template T The type of the option value.
57
+ */
58
+ interface ComDropdownTagContext<T> {
59
+ /** The tag value (available as implicit $implicit). */
60
+ $implicit: T;
61
+ /** The index of this tag. */
62
+ index: number;
63
+ /** Function to remove this tag. */
64
+ remove: () => void;
65
+ }
66
+ /**
67
+ * Represents a grouped collection of options.
68
+ * @template T The type of the option value.
69
+ */
70
+ interface ComDropdownGroup$1<T> {
71
+ /** The group key/label. */
72
+ key: string;
73
+ /** The options belonging to this group. */
74
+ options: T[];
75
+ /** Whether the group is expanded (for collapsible groups). */
76
+ expanded: boolean;
77
+ }
78
+ /**
79
+ * Internal representation of a processed option.
80
+ * @template T The type of the option value.
81
+ */
82
+ interface ComDropdownProcessedOption<T> {
83
+ /** The original option value. */
84
+ value: T;
85
+ /** The display text for this option. */
86
+ displayText: string;
87
+ /** Whether this option is disabled. */
88
+ disabled: boolean;
89
+ /** The group this option belongs to (if grouped). */
90
+ group?: string;
91
+ /** Unique identifier for tracking. */
92
+ id: string;
93
+ }
94
+ /**
95
+ * Configuration for dropdown positioning.
96
+ */
97
+ interface ComDropdownPosition {
98
+ /** The origin X position. */
99
+ originX: 'start' | 'center' | 'end';
100
+ /** The origin Y position. */
101
+ originY: 'top' | 'center' | 'bottom';
102
+ /** The overlay X position. */
103
+ overlayX: 'start' | 'center' | 'end';
104
+ /** The overlay Y position. */
105
+ overlayY: 'top' | 'center' | 'bottom';
106
+ /** Offset along the X axis. */
107
+ offsetX?: number;
108
+ /** Offset along the Y axis. */
109
+ offsetY?: number;
110
+ }
111
+ /**
112
+ * Panel width configuration.
113
+ */
114
+ type ComDropdownPanelWidth = 'trigger' | 'auto' | string;
115
+ /**
116
+ * Default compare function for primitive values.
117
+ * @param a First value.
118
+ * @param b Second value.
119
+ * @returns Whether the values are equal.
120
+ */
121
+ declare function defaultCompareWith<T>(a: T, b: T): boolean;
122
+ /**
123
+ * Default display function for converting values to strings.
124
+ * @param value The value to display.
125
+ * @returns The string representation.
126
+ */
127
+ declare function defaultDisplayWith<T>(value: T): string;
128
+ /**
129
+ * Default filter function for search.
130
+ * @param option The option to test.
131
+ * @param query The search query.
132
+ * @param displayWith The display function to get the searchable text.
133
+ * @returns Whether the option matches the query.
134
+ */
135
+ declare function defaultFilterWith<T>(option: T, query: string, displayWith: (value: T) => string): boolean;
136
+ /**
137
+ * Generates a unique ID for dropdown options.
138
+ * @param prefix Optional prefix for the ID.
139
+ * @returns A unique ID string.
140
+ */
141
+ declare function generateDropdownId(prefix?: string): string;
142
+
143
+ /**
144
+ * Directive to mark a template as the custom option template.
145
+ *
146
+ * @example
147
+ * ```html
148
+ * <com-dropdown [options]="users()">
149
+ * <ng-template comDropdownOption let-user let-selected="selected">
150
+ * <div class="flex items-center gap-2">
151
+ * <span>{{ user.name }}</span>
152
+ * @if (selected) {
153
+ * <svg class="h-4 w-4"><!-- check --></svg>
154
+ * }
155
+ * </div>
156
+ * </ng-template>
157
+ * </com-dropdown>
158
+ * ```
159
+ */
160
+ declare class ComDropdownOptionTpl<T> {
161
+ /** Reference to the template. */
162
+ readonly templateRef: TemplateRef<ComDropdownOptionContext<T>>;
163
+ /**
164
+ * Static type guard for template type checking.
165
+ * Enables type-safe access to context properties in templates.
166
+ */
167
+ static ngTemplateContextGuard<T>(_dir: ComDropdownOptionTpl<T>, ctx: unknown): ctx is ComDropdownOptionContext<T>;
168
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComDropdownOptionTpl<any>, never>;
169
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComDropdownOptionTpl<any>, "ng-template[comDropdownOption]", never, {}, {}, never, never, true, never>;
170
+ }
171
+
172
+ /**
173
+ * Directive to mark a template as the custom selected value template.
174
+ *
175
+ * @example
176
+ * ```html
177
+ * <com-dropdown [options]="users()">
178
+ * <ng-template comDropdownSelected let-user>
179
+ * @if (user) {
180
+ * <div class="flex items-center gap-2">
181
+ * <img [src]="user.avatar" class="h-5 w-5 rounded-full" />
182
+ * {{ user.name }}
183
+ * </div>
184
+ * } @else {
185
+ * <span class="text-input-placeholder">Select user...</span>
186
+ * }
187
+ * </ng-template>
188
+ * </com-dropdown>
189
+ * ```
190
+ */
191
+ declare class ComDropdownSelectedTpl<T> {
192
+ /** Reference to the template. */
193
+ readonly templateRef: TemplateRef<ComDropdownSelectedContext<T>>;
194
+ /**
195
+ * Static type guard for template type checking.
196
+ * Enables type-safe access to context properties in templates.
197
+ */
198
+ static ngTemplateContextGuard<T>(_dir: ComDropdownSelectedTpl<T>, ctx: unknown): ctx is ComDropdownSelectedContext<T>;
199
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComDropdownSelectedTpl<any>, never>;
200
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComDropdownSelectedTpl<any>, "ng-template[comDropdownSelected]", never, {}, {}, never, never, true, never>;
201
+ }
202
+
203
+ /**
204
+ * Directive to mark a template as the custom empty state template.
205
+ *
206
+ * @example
207
+ * ```html
208
+ * <com-dropdown [options]="users()" [searchable]="true">
209
+ * <ng-template comDropdownEmpty let-query>
210
+ * <div class="flex flex-col items-center gap-2 py-6">
211
+ * <svg class="h-8 w-8 text-muted-foreground"><!-- search icon --></svg>
212
+ * <span>No results for "{{ query }}"</span>
213
+ * </div>
214
+ * </ng-template>
215
+ * </com-dropdown>
216
+ * ```
217
+ */
218
+ declare class ComDropdownEmptyTpl {
219
+ /** Reference to the template. */
220
+ readonly templateRef: TemplateRef<ComDropdownEmptyContext>;
221
+ /**
222
+ * Static type guard for template type checking.
223
+ * Enables type-safe access to context properties in templates.
224
+ */
225
+ static ngTemplateContextGuard(_dir: ComDropdownEmptyTpl, ctx: unknown): ctx is ComDropdownEmptyContext;
226
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComDropdownEmptyTpl, never>;
227
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComDropdownEmptyTpl, "ng-template[comDropdownEmpty]", never, {}, {}, never, never, true, never>;
228
+ }
229
+
230
+ /**
231
+ * Directive to mark a template as the custom group header template.
232
+ *
233
+ * @example
234
+ * ```html
235
+ * <com-dropdown [options]="users()" [groupBy]="groupByDepartment">
236
+ * <ng-template comDropdownGroup let-group let-count="count">
237
+ * <div class="flex items-center justify-between">
238
+ * <span class="font-semibold">{{ group }}</span>
239
+ * <span class="text-xs text-muted-foreground">({{ count }})</span>
240
+ * </div>
241
+ * </ng-template>
242
+ * </com-dropdown>
243
+ * ```
244
+ */
245
+ declare class ComDropdownGroupTpl {
246
+ /** Reference to the template. */
247
+ readonly templateRef: TemplateRef<ComDropdownGroupContext>;
248
+ /**
249
+ * Static type guard for template type checking.
250
+ * Enables type-safe access to context properties in templates.
251
+ */
252
+ static ngTemplateContextGuard(_dir: ComDropdownGroupTpl, ctx: unknown): ctx is ComDropdownGroupContext;
253
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComDropdownGroupTpl, never>;
254
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComDropdownGroupTpl, "ng-template[comDropdownGroup]", never, {}, {}, never, never, true, never>;
255
+ }
256
+
257
+ /**
258
+ * Directive to mark a template as the custom tag template (multi-select mode).
259
+ *
260
+ * @example
261
+ * ```html
262
+ * <com-dropdown [options]="users()" [multiple]="true">
263
+ * <ng-template comDropdownTag let-user let-remove="remove">
264
+ * <div class="flex items-center gap-1 rounded bg-primary-subtle px-2 py-0.5 text-primary-subtle-foreground">
265
+ * <img [src]="user.avatar" class="h-4 w-4 rounded-full" />
266
+ * <span>{{ user.name }}</span>
267
+ * <button type="button" (click)="remove()" class="ml-1">
268
+ * <svg class="h-3 w-3"><!-- x icon --></svg>
269
+ * </button>
270
+ * </div>
271
+ * </ng-template>
272
+ * </com-dropdown>
273
+ * ```
274
+ */
275
+ declare class ComDropdownTagTpl<T> {
276
+ /** Reference to the template. */
277
+ readonly templateRef: TemplateRef<ComDropdownTagContext<T>>;
278
+ /**
279
+ * Static type guard for template type checking.
280
+ * Enables type-safe access to context properties in templates.
281
+ */
282
+ static ngTemplateContextGuard<T>(_dir: ComDropdownTagTpl<T>, ctx: unknown): ctx is ComDropdownTagContext<T>;
283
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComDropdownTagTpl<any>, never>;
284
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComDropdownTagTpl<any>, "ng-template[comDropdownTag]", never, {}, {}, never, never, true, never>;
285
+ }
286
+
287
+ /**
288
+ * Variant type for dropdown trigger appearance.
289
+ */
290
+ type DropdownVariant = 'default' | 'outline' | 'ghost' | 'filled' | 'naked';
291
+ /**
292
+ * Size type for dropdown components.
293
+ */
294
+ type DropdownSize = 'sm' | 'default' | 'lg';
295
+ /**
296
+ * State type for validation states.
297
+ */
298
+ type DropdownState = 'default' | 'error' | 'success';
299
+ /**
300
+ * Option state for styling.
301
+ */
302
+ type OptionState = 'default' | 'active' | 'selected' | 'selected-active' | 'disabled';
303
+ /**
304
+ * Tag variant type.
305
+ */
306
+ type TagVariant = 'default' | 'primary';
307
+ /**
308
+ * CVA variants for the dropdown trigger button.
309
+ * Uses semantic theme tokens for consistent cross-theme styling.
310
+ *
311
+ * @tokens `--color-input-background`, `--color-input-foreground`, `--color-input-border`,
312
+ * `--color-input-placeholder`, `--color-ring`, `--color-muted`, `--color-muted-hover`,
313
+ * `--color-warn`, `--color-success`, `--color-primary`, `--color-border`, `--radius-input`
314
+ */
315
+ declare const dropdownTriggerVariants: (props?: {
316
+ variant?: DropdownVariant;
317
+ size?: DropdownSize;
318
+ state?: DropdownState;
319
+ open?: boolean;
320
+ }) => string;
321
+ type DropdownTriggerVariants = VariantProps<typeof dropdownTriggerVariants>;
322
+ /**
323
+ * CVA variants for the dropdown panel (overlay).
324
+ *
325
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border-subtle`, `--radius-overlay`
326
+ */
327
+ declare const dropdownPanelVariants: (props?: {
328
+ size?: DropdownSize;
329
+ }) => string;
330
+ type DropdownPanelVariants = VariantProps<typeof dropdownPanelVariants>;
331
+ /**
332
+ * CVA variants for individual dropdown options.
333
+ *
334
+ * @tokens `--color-popover-foreground`, `--color-muted`, `--color-primary-subtle`,
335
+ * `--color-primary-subtle-foreground`, `--color-disabled-foreground`
336
+ */
337
+ declare const dropdownOptionVariants: (props?: {
338
+ size?: DropdownSize;
339
+ state?: OptionState;
340
+ }) => string;
341
+ type DropdownOptionVariants = VariantProps<typeof dropdownOptionVariants>;
342
+ /**
343
+ * CVA variants for the search input.
344
+ *
345
+ * @tokens `--color-border-subtle`, `--color-input-placeholder`, `--color-disabled-foreground`
346
+ */
347
+ declare const dropdownSearchVariants: (props?: {
348
+ size?: DropdownSize;
349
+ }) => string;
350
+ type DropdownSearchVariants = VariantProps<typeof dropdownSearchVariants>;
351
+ /**
352
+ * CVA variants for multi-select tags.
353
+ *
354
+ * @tokens `--color-muted`, `--color-muted-foreground`, `--color-muted-hover`,
355
+ * `--color-primary-subtle`, `--color-primary-subtle-foreground`, `--radius-tag`
356
+ */
357
+ declare const dropdownTagVariants: (props?: {
358
+ size?: DropdownSize;
359
+ variant?: TagVariant;
360
+ }) => string;
361
+ type DropdownTagVariants = VariantProps<typeof dropdownTagVariants>;
362
+ /**
363
+ * CVA variants for the tag remove button.
364
+ *
365
+ * @tokens `--color-ring`, `--radius-interactive-sm`
366
+ */
367
+ declare const dropdownTagRemoveVariants: (props?: {
368
+ size?: DropdownSize;
369
+ }) => string;
370
+ type DropdownTagRemoveVariants = VariantProps<typeof dropdownTagRemoveVariants>;
371
+ /**
372
+ * CVA variants for the overflow badge (+N indicator).
373
+ *
374
+ * @tokens `--color-muted`, `--color-muted-foreground`, `--radius-tag`
375
+ */
376
+ declare const dropdownOverflowBadgeVariants: (props?: {
377
+ size?: DropdownSize;
378
+ }) => string;
379
+ type DropdownOverflowBadgeVariants = VariantProps<typeof dropdownOverflowBadgeVariants>;
380
+ /**
381
+ * CVA variants for group headers.
382
+ *
383
+ * @tokens `--color-muted-foreground`
384
+ */
385
+ declare const dropdownGroupVariants: (props?: {
386
+ size?: DropdownSize;
387
+ }) => string;
388
+ type DropdownGroupVariants = VariantProps<typeof dropdownGroupVariants>;
389
+ /**
390
+ * CVA variants for the empty state.
391
+ *
392
+ * @tokens `--color-muted-foreground`
393
+ */
394
+ declare const dropdownEmptyVariants: (props?: {
395
+ size?: DropdownSize;
396
+ }) => string;
397
+ type DropdownEmptyVariants = VariantProps<typeof dropdownEmptyVariants>;
398
+ /**
399
+ * CVA variants for the clear button.
400
+ *
401
+ * @tokens `--color-ring`, `--radius-interactive-sm`
402
+ */
403
+ declare const dropdownClearVariants: (props?: {
404
+ size?: DropdownSize;
405
+ }) => string;
406
+ type DropdownClearVariants = VariantProps<typeof dropdownClearVariants>;
407
+ /**
408
+ * CVA variants for the chevron icon.
409
+ */
410
+ declare const dropdownChevronVariants: (props?: {
411
+ size?: DropdownSize;
412
+ open?: boolean;
413
+ }) => string;
414
+ type DropdownChevronVariants = VariantProps<typeof dropdownChevronVariants>;
415
+
416
+ /**
417
+ * Reusable dropdown/select component with full accessibility support.
418
+ * Implements ControlValueAccessor for Reactive Forms integration.
419
+ *
420
+ * @tokens `--color-input-background`, `--color-input-foreground`, `--color-input-border`,
421
+ * `--color-input-placeholder`, `--color-ring`, `--color-muted`, `--color-muted-foreground`,
422
+ * `--color-popover`, `--color-popover-foreground`, `--color-border-subtle`,
423
+ * `--color-primary`, `--color-primary-subtle`, `--color-primary-subtle-foreground`,
424
+ * `--color-warn`, `--color-success`, `--color-disabled`, `--color-disabled-foreground`,
425
+ * `--color-placeholder`
426
+ *
427
+ * @example
428
+ * ```html
429
+ * <com-dropdown
430
+ * [options]="users()"
431
+ * [compareWith]="compareById"
432
+ * formControlName="assignee"
433
+ * placeholder="Select user..."
434
+ * [searchable]="true"
435
+ * >
436
+ * <ng-template comDropdownOption let-user let-selected="selected">
437
+ * <span>{{ user.name }}</span>
438
+ * </ng-template>
439
+ * </com-dropdown>
440
+ * ```
441
+ */
442
+ declare class ComDropdown<T> implements ControlValueAccessor, FormFieldControl<T | T[] | null> {
443
+ private readonly elementRef;
444
+ private readonly destroyRef;
445
+ private readonly overlay;
446
+ private readonly viewContainerRef;
447
+ private readonly liveAnnouncer;
448
+ private readonly defaultErrorStateMatcher;
449
+ private readonly parentForm;
450
+ private readonly parentFormGroup;
451
+ /** NgControl bound to this dropdown (if using reactive forms). */
452
+ readonly ngControl: NgControl | null;
453
+ /** Reference to the trigger button element. */
454
+ private readonly triggerRef;
455
+ /** Reference to the panel template. */
456
+ private readonly panelTemplateRef;
457
+ /** Content query for custom option template. */
458
+ protected readonly optionTemplate: Signal<ComDropdownOptionTpl<T> | undefined>;
459
+ /** Content query for custom selected template. */
460
+ protected readonly selectedTemplate: Signal<ComDropdownSelectedTpl<T> | undefined>;
461
+ /** Content query for custom empty template. */
462
+ protected readonly emptyTemplate: Signal<ComDropdownEmptyTpl | undefined>;
463
+ /** Content query for custom group template. */
464
+ protected readonly groupTemplate: Signal<ComDropdownGroupTpl | undefined>;
465
+ /** Content query for custom tag template. */
466
+ protected readonly tagTemplate: Signal<ComDropdownTagTpl<T> | undefined>;
467
+ /** Overlay reference. */
468
+ private overlayRef;
469
+ /** Unique ID for the dropdown. */
470
+ private readonly dropdownId;
471
+ /** Array of options to display. */
472
+ readonly options: InputSignal<T[]>;
473
+ /** Current value (single or array for multiple). */
474
+ readonly value: InputSignal<T | T[] | null>;
475
+ /** Placeholder text when no value is selected. */
476
+ readonly placeholder: InputSignal<string>;
477
+ /** Enable multi-select mode. */
478
+ readonly multiple: InputSignal<boolean>;
479
+ /** Enable search/filter input. */
480
+ readonly searchable: InputSignal<boolean>;
481
+ /** Search input placeholder. */
482
+ readonly searchPlaceholder: InputSignal<string>;
483
+ /** Disable the dropdown. */
484
+ readonly disabled: InputSignal<boolean>;
485
+ /** Mark as required. */
486
+ readonly required: InputSignal<boolean>;
487
+ /** Show clear button. */
488
+ readonly clearable: InputSignal<boolean>;
489
+ /** Custom equality function for comparing values. */
490
+ readonly compareWith: InputSignal<(a: T, b: T) => boolean>;
491
+ /** Function to get display text from a value. */
492
+ readonly displayWith: InputSignal<(value: T) => string>;
493
+ /** Custom filter function for search. */
494
+ readonly filterWith: InputSignal<((option: T, query: string) => boolean) | null>;
495
+ /** Function to group options by a key. */
496
+ readonly groupBy: InputSignal<((option: T) => string) | null>;
497
+ /** CVA variant for trigger styling. */
498
+ readonly variant: InputSignal<DropdownVariant>;
499
+ /** Size variant. */
500
+ readonly size: InputSignal<DropdownSize>;
501
+ /** Validation state. */
502
+ readonly state: InputSignal<DropdownState>;
503
+ /** Additional CSS classes for the trigger. */
504
+ readonly userClass: InputSignal<string>;
505
+ /** Additional CSS classes for the panel. */
506
+ readonly panelClass: InputSignal<string>;
507
+ /** Maximum height of the panel. */
508
+ readonly maxHeight: InputSignal<string>;
509
+ /** Panel width strategy. */
510
+ readonly panelWidth: InputSignal<ComDropdownPanelWidth>;
511
+ /** Debounce time for search (ms). */
512
+ readonly searchDebounceMs: InputSignal<number>;
513
+ /** Virtual scroll threshold. */
514
+ readonly virtualScrollThreshold: InputSignal<number>;
515
+ /** Maximum number of tags to display in multi-select mode. Set to null for no limit. */
516
+ readonly maxVisibleTags: InputSignal<number | null>;
517
+ /** Custom error state matcher for determining when to show errors. */
518
+ readonly errorStateMatcher: InputSignal<ErrorStateMatcher | undefined>;
519
+ /** Emitted when the value changes. */
520
+ readonly valueChange: OutputEmitterRef<T | T[] | null>;
521
+ /** Emitted when search query changes. */
522
+ readonly searchChange: OutputEmitterRef<string>;
523
+ /** Emitted when panel opens. */
524
+ readonly opened: OutputEmitterRef<void>;
525
+ /** Emitted when panel closes. */
526
+ readonly closed: OutputEmitterRef<void>;
527
+ /** Whether the panel is open. */
528
+ readonly isOpen: WritableSignal<boolean>;
529
+ /** Whether the trigger button is focused. */
530
+ private readonly _triggerFocused;
531
+ /** Current search query. */
532
+ readonly searchQuery: WritableSignal<string>;
533
+ /** Currently active (keyboard focused) option ID. */
534
+ readonly activeOptionId: WritableSignal<string | null>;
535
+ /** Internal value state (managed by CVA or input). */
536
+ readonly internalValue: WritableSignal<T | T[] | null>;
537
+ /** Live announcements for screen readers. */
538
+ readonly liveAnnouncement: WritableSignal<string>;
539
+ /** IDs for aria-describedby (set by form-field). */
540
+ private readonly _describedByIds;
541
+ /** Form field appearance (set by form-field). */
542
+ private readonly _appearance;
543
+ /** Trigger element ID. */
544
+ readonly triggerId: Signal<string>;
545
+ /** Panel element ID. */
546
+ readonly panelId: Signal<string>;
547
+ /** Currently active descendant ID (for ARIA). */
548
+ readonly activeDescendant: Signal<string | null>;
549
+ /** Whether the dropdown has a value. */
550
+ readonly hasValue: Signal<boolean>;
551
+ /** Whether the dropdown is focused (trigger focused or panel open). Implements FormFieldControl. */
552
+ readonly focused: Signal<boolean>;
553
+ /** Whether the label should float. Label floats when focused or has a value. */
554
+ readonly shouldLabelFloat: Signal<boolean>;
555
+ /** Whether the control is in an error state. Implements FormFieldControl. */
556
+ readonly errorState: Signal<boolean>;
557
+ /** Unique ID for the control. Implements FormFieldControl. */
558
+ readonly id: Signal<string>;
559
+ /**
560
+ * Effective state combining manual state with automatic error detection.
561
+ * Manual state takes precedence over auto-detected error state.
562
+ */
563
+ readonly effectiveState: Signal<DropdownState>;
564
+ /** Combined aria-describedby from form-field. */
565
+ readonly ariaDescribedBy: Signal<string | null>;
566
+ /** Selected value (single mode). */
567
+ readonly selectedValue: Signal<T | null>;
568
+ /** Selected values (multiple mode). */
569
+ readonly selectedValues: Signal<T[]>;
570
+ /** Tags visible in the trigger (limited by maxVisibleTags). */
571
+ readonly visibleTags: Signal<T[]>;
572
+ /** Count of hidden tags (for +N badge). */
573
+ readonly hiddenTagsCount: Signal<number>;
574
+ /** Processed options with display text and IDs. */
575
+ readonly processedOptions: Signal<ComDropdownProcessedOption<T>[]>;
576
+ /** Filtered options based on search query. */
577
+ readonly filteredOptions: Signal<ComDropdownProcessedOption<T>[]>;
578
+ /** Grouped options (when groupBy is provided). */
579
+ readonly groupedOptions: Signal<ComDropdownGroup$1<ComDropdownProcessedOption<T>>[]>;
580
+ /** Whether virtual scrolling should be enabled. */
581
+ readonly virtualScrollEnabled: Signal<boolean>;
582
+ /** Context for selected template. */
583
+ readonly selectedContext: Signal<ComDropdownSelectedContext<T>>;
584
+ /** Context for empty template. */
585
+ readonly emptyContext: Signal<ComDropdownEmptyContext>;
586
+ /** Computed trigger classes. */
587
+ readonly triggerClasses: Signal<string>;
588
+ /** Computed panel classes. */
589
+ readonly panelClasses: Signal<string>;
590
+ /** Computed chevron classes. */
591
+ readonly chevronClasses: Signal<string>;
592
+ /** Computed clear button classes. */
593
+ readonly clearClasses: Signal<string>;
594
+ /** Computed overflow badge classes. */
595
+ readonly overflowBadgeClasses: Signal<string>;
596
+ private onChange;
597
+ private onTouched;
598
+ constructor();
599
+ writeValue(value: T | T[] | null): void;
600
+ registerOnChange(fn: (value: T | T[] | null) => void): void;
601
+ registerOnTouched(fn: () => void): void;
602
+ setDisabledState(isDisabled: boolean): void;
603
+ /**
604
+ * Called when the form field container is clicked.
605
+ * Implements FormFieldControl.
606
+ */
607
+ onContainerClick(event: MouseEvent): void;
608
+ /**
609
+ * Sets the describedBy IDs from the form field.
610
+ * Called by the parent form field component.
611
+ */
612
+ setDescribedByIds(ids: string): void;
613
+ /**
614
+ * Sets the appearance for styling.
615
+ * Called by the parent form field component.
616
+ */
617
+ setAppearance(appearance: FormFieldAppearance): void;
618
+ /** Opens the dropdown panel. */
619
+ open(): void;
620
+ /** Closes the dropdown panel. */
621
+ close(): void;
622
+ /** Toggles the dropdown panel. */
623
+ toggle(): void;
624
+ /** Clears the selection. */
625
+ clear(event?: Event): void;
626
+ /** Checks if a value is selected. */
627
+ isSelected(value: T): boolean;
628
+ /** Checks if an option ID is the active one. */
629
+ isActive(optionId: string): boolean;
630
+ protected onTriggerKeydown(event: KeyboardEvent): void;
631
+ protected onPanelKeydown(event: KeyboardEvent): void;
632
+ protected onSearchChange(query: string): void;
633
+ protected onSearchKeyNav(event: KeyboardEvent): void;
634
+ protected onTriggerFocus(): void;
635
+ protected onTriggerBlur(): void;
636
+ protected onOptionHover(optionId: string): void;
637
+ protected selectOption(value: T): void;
638
+ protected removeValue(value: T): void;
639
+ protected trackByValue(item: T, _index: number): unknown;
640
+ protected getGlobalIndex(groupKey: string, localIndex: number): number;
641
+ private createOverlay;
642
+ private destroyOverlay;
643
+ /**
644
+ * Returns overlay width configuration based on panelWidth setting.
645
+ * - 'trigger': min-width equals host, can grow wider
646
+ * - 'auto': no width constraint
647
+ * - specific value: exact width
648
+ */
649
+ private getPanelWidthConfig;
650
+ private updateValue;
651
+ private toggleMultipleValue;
652
+ private navigateOptions;
653
+ private navigateToFirst;
654
+ private navigateToLast;
655
+ private selectActiveOption;
656
+ private flattenGroupedOptions;
657
+ private typeAhead;
658
+ private announce;
659
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComDropdown<any>, never>;
660
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComDropdown<any>, "com-dropdown", ["comDropdown"], { "options": { "alias": "options"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "displayWith": { "alias": "displayWith"; "required": false; "isSignal": true; }; "filterWith": { "alias": "filterWith"; "required": false; "isSignal": true; }; "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "required": false; "isSignal": true; }; "searchDebounceMs": { "alias": "searchDebounceMs"; "required": false; "isSignal": true; }; "virtualScrollThreshold": { "alias": "virtualScrollThreshold"; "required": false; "isSignal": true; }; "maxVisibleTags": { "alias": "maxVisibleTags"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "searchChange": "searchChange"; "opened": "opened"; "closed": "closed"; }, ["optionTemplate", "selectedTemplate", "emptyTemplate", "groupTemplate", "tagTemplate"], never, true, never>;
661
+ }
662
+
663
+ /**
664
+ * A single option in the dropdown list.
665
+ * Implements CDK's Highlightable interface for keyboard navigation.
666
+ *
667
+ * @example
668
+ * ```html
669
+ * <com-dropdown-option
670
+ * [value]="user"
671
+ * [selected]="isSelected(user)"
672
+ * [disabled]="user.inactive"
673
+ * (select)="onSelect(user)"
674
+ * />
675
+ * ```
676
+ *
677
+ * @tokens `--color-popover-foreground`, `--color-muted`, `--color-primary-subtle`,
678
+ * `--color-primary-subtle-foreground`, `--color-disabled-foreground`
679
+ */
680
+ declare class ComDropdownOption<T> {
681
+ /** Reference to the option element for focus management. */
682
+ private readonly optionRef;
683
+ /** The value this option represents. */
684
+ readonly value: InputSignal<T>;
685
+ /** Display text for this option (when no template is provided). */
686
+ readonly displayText: InputSignal<string>;
687
+ /** Unique identifier for this option. */
688
+ readonly id: InputSignal<string>;
689
+ /** Index of this option in the list. */
690
+ readonly index: InputSignal<number>;
691
+ /** Whether this option is currently selected. */
692
+ readonly selected: InputSignal<boolean>;
693
+ /** Whether this option is currently active (keyboard focused). */
694
+ readonly active: InputSignal<boolean>;
695
+ /** Whether this option is disabled. */
696
+ readonly disabled: InputSignal<boolean>;
697
+ /** Size variant for styling. */
698
+ readonly size: InputSignal<DropdownSize>;
699
+ /** Custom template for rendering the option content. */
700
+ readonly optionTemplate: InputSignal<TemplateRef<ComDropdownOptionContext<T>> | null>;
701
+ /** Additional CSS classes to apply. */
702
+ readonly userClass: InputSignal<string>;
703
+ /** Emitted when the option is selected. */
704
+ readonly select: OutputEmitterRef<T>;
705
+ /** Emitted when the mouse enters the option. */
706
+ readonly hover: OutputEmitterRef<T>;
707
+ /** Computed option state for CVA styling. */
708
+ protected readonly optionState: Signal<'default' | 'active' | 'selected' | 'selected-active' | 'disabled'>;
709
+ /** Computed CSS classes for the option. */
710
+ protected readonly optionClasses: Signal<string>;
711
+ /** Template context for custom option templates. */
712
+ protected readonly templateContext: Signal<ComDropdownOptionContext<T>>;
713
+ protected onOptionClick(event: MouseEvent): void;
714
+ protected onMouseEnter(): void;
715
+ /** Scrolls this option into view. */
716
+ scrollIntoView(): void;
717
+ /** Focuses this option element. */
718
+ focus(): void;
719
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComDropdownOption<any>, never>;
720
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComDropdownOption<any>, "com-dropdown-option", ["comDropdownOption"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "displayText": { "alias": "displayText"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": true; "isSignal": true; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "optionTemplate": { "alias": "optionTemplate"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "select": "select"; "hover": "hover"; }, never, never, true, never>;
721
+ }
722
+
723
+ /**
724
+ * The overlay panel containing the dropdown options.
725
+ * Supports virtual scrolling for large lists.
726
+ *
727
+ * @example
728
+ * ```html
729
+ * <com-dropdown-panel
730
+ * [options]="filteredOptions()"
731
+ * [maxHeight]="'300px'"
732
+ * [virtualScrollEnabled]="true"
733
+ * >
734
+ * <ng-content />
735
+ * </com-dropdown-panel>
736
+ * ```
737
+ *
738
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border-subtle`,
739
+ * `--color-muted-foreground`, `--radius-overlay`
740
+ */
741
+ declare class ComDropdownPanel<T> {
742
+ /** Reference to the panel element. */
743
+ private readonly panelRef;
744
+ /** Reference to the virtual scroll viewport (when enabled). */
745
+ readonly viewport: Signal<CdkVirtualScrollViewport | undefined>;
746
+ /** Unique identifier for the panel. */
747
+ readonly panelId: InputSignal<string>;
748
+ /** The processed options to display. */
749
+ readonly options: InputSignal<ComDropdownProcessedOption<T>[]>;
750
+ /** Maximum height of the panel. */
751
+ readonly maxHeight: InputSignal<string>;
752
+ /** Whether multiple selection is enabled. */
753
+ readonly multiselectable: InputSignal<boolean>;
754
+ /** Size variant for styling. */
755
+ readonly size: InputSignal<DropdownSize>;
756
+ /** Additional CSS classes to apply to the panel. */
757
+ readonly panelClass: InputSignal<string>;
758
+ /** Whether virtual scrolling is enabled. */
759
+ readonly virtualScrollEnabled: InputSignal<boolean>;
760
+ /** Item size for virtual scrolling (in pixels). */
761
+ readonly itemSize: InputSignal<number>;
762
+ /** The current search query (for empty state context). */
763
+ readonly searchQuery: InputSignal<string>;
764
+ /** Custom empty state text. */
765
+ readonly emptyText: InputSignal<string>;
766
+ /** Template for rendering each option. */
767
+ readonly optionTemplate: InputSignal<TemplateRef<{
768
+ $implicit: ComDropdownProcessedOption<T>;
769
+ index: number;
770
+ }>>;
771
+ /** Custom template for the empty state. */
772
+ readonly emptyTemplate: InputSignal<TemplateRef<ComDropdownEmptyContext> | null>;
773
+ /** Emitted when the panel is scrolled. */
774
+ readonly scrolled: OutputEmitterRef<void>;
775
+ /** Whether to show the empty state. */
776
+ protected readonly showEmpty: Signal<boolean>;
777
+ /** Computed CSS classes for the panel. */
778
+ protected readonly panelClasses: Signal<string>;
779
+ /** Computed CSS classes for the empty state. */
780
+ protected readonly emptyClasses: Signal<string>;
781
+ /** Template context for the empty state. */
782
+ protected readonly emptyContext: Signal<ComDropdownEmptyContext>;
783
+ /** Track function for options. */
784
+ protected trackByFn(_index: number, option: ComDropdownProcessedOption<T>): string;
785
+ /** Scrolls to a specific index. */
786
+ scrollToIndex(index: number): void;
787
+ /** Scrolls an option into view. */
788
+ scrollOptionIntoView(optionElement: HTMLElement): void;
789
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComDropdownPanel<any>, never>;
790
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComDropdownPanel<any>, "com-dropdown-panel", ["comDropdownPanel"], { "panelId": { "alias": "panelId"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "multiselectable": { "alias": "multiselectable"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "virtualScrollEnabled": { "alias": "virtualScrollEnabled"; "required": false; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; "searchQuery": { "alias": "searchQuery"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "optionTemplate": { "alias": "optionTemplate"; "required": true; "isSignal": true; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; "isSignal": true; }; }, { "scrolled": "scrolled"; }, never, ["[comDropdownSearch]"], true, never>;
791
+ }
792
+
793
+ /**
794
+ * Search input component for filtering dropdown options.
795
+ * Includes debouncing for better performance.
796
+ *
797
+ * @example
798
+ * ```html
799
+ * <com-dropdown-search
800
+ * [placeholder]="'Search...'"
801
+ * [debounceTime]="300"
802
+ * (searchChange)="onSearch($event)"
803
+ * />
804
+ * ```
805
+ *
806
+ * @tokens `--color-border-subtle`, `--color-input-placeholder`, `--color-disabled-foreground`,
807
+ * `--color-ring`, `--radius-interactive-sm`
808
+ */
809
+ declare class ComDropdownSearch implements OnInit {
810
+ private readonly destroyRef;
811
+ /** Reference to the input element. */
812
+ private readonly inputRef;
813
+ /** Subject for debounced search. */
814
+ private readonly searchSubject;
815
+ /** Current internal search value. */
816
+ private readonly internalValue;
817
+ /** Placeholder text for the search input. */
818
+ readonly placeholder: InputSignal<string>;
819
+ /** Aria label for accessibility. */
820
+ readonly ariaLabel: InputSignal<string>;
821
+ /** Whether the search input is disabled. */
822
+ readonly disabled: InputSignal<boolean>;
823
+ /** Debounce time in milliseconds. */
824
+ readonly debounceMs: InputSignal<number>;
825
+ /** Size variant for styling. */
826
+ readonly size: InputSignal<DropdownSize>;
827
+ /** Additional CSS classes to apply. */
828
+ readonly userClass: InputSignal<string>;
829
+ /** Emitted when the search value changes (after debounce). */
830
+ readonly searchChange: OutputEmitterRef<string>;
831
+ /** Emitted when a navigation key is pressed (for focus management). */
832
+ readonly keyNav: OutputEmitterRef<KeyboardEvent>;
833
+ /** Whether to show the clear button. */
834
+ protected readonly showClear: Signal<boolean>;
835
+ /** Computed CSS classes for the search input. */
836
+ protected readonly searchClasses: Signal<string>;
837
+ ngOnInit(): void;
838
+ protected onInput(event: Event): void;
839
+ protected onKeydown(event: KeyboardEvent): void;
840
+ protected clearSearch(): void;
841
+ /** Focuses the search input. */
842
+ focus(): void;
843
+ /** Gets the current search value. */
844
+ getValue(): string;
845
+ /** Sets the search value programmatically. */
846
+ setValue(value: string): void;
847
+ /** Clears the search input. */
848
+ clear(): void;
849
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComDropdownSearch, never>;
850
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComDropdownSearch, "com-dropdown-search", ["comDropdownSearch"], { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "debounceMs": { "alias": "debounceMs"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "searchChange": "searchChange"; "keyNav": "keyNav"; }, never, never, true, never>;
851
+ }
852
+
853
+ /**
854
+ * Tag component for displaying selected items in multi-select mode.
855
+ * Includes a remove button for deselection.
856
+ *
857
+ * @example
858
+ * ```html
859
+ * <com-dropdown-tag
860
+ * [value]="user"
861
+ * [displayText]="user.name"
862
+ * (remove)="onRemove(user)"
863
+ * />
864
+ * ```
865
+ *
866
+ * @tokens `--color-muted`, `--color-muted-foreground`, `--color-muted-hover`,
867
+ * `--color-primary-subtle`, `--color-primary-subtle-foreground`,
868
+ * `--color-ring`, `--radius-tag`, `--radius-interactive-sm`
869
+ */
870
+ declare class ComDropdownTag<T> {
871
+ /** The value this tag represents. */
872
+ readonly value: InputSignal<T>;
873
+ /** Display text for this tag. */
874
+ readonly displayText: InputSignal<string>;
875
+ /** Index of this tag in the list. */
876
+ readonly index: InputSignal<number>;
877
+ /** Whether the tag (and its remove button) is disabled. */
878
+ readonly disabled: InputSignal<boolean>;
879
+ /** Size variant for styling. */
880
+ readonly size: InputSignal<DropdownSize>;
881
+ /** Tag variant for styling. */
882
+ readonly variant: InputSignal<'default' | 'primary'>;
883
+ /** Additional CSS classes for the tag. */
884
+ readonly userClass: InputSignal<string>;
885
+ /** Custom template for rendering the tag. */
886
+ readonly tagTemplate: InputSignal<TemplateRef<ComDropdownTagContext<T>> | null>;
887
+ /** Emitted when the remove button is clicked. */
888
+ readonly remove: OutputEmitterRef<T>;
889
+ /** Computed CSS classes for the tag. */
890
+ protected readonly tagClasses: Signal<string>;
891
+ /** Computed CSS classes for the remove button. */
892
+ protected readonly removeClasses: Signal<string>;
893
+ /** Template context for custom tag templates. */
894
+ protected readonly templateContext: Signal<ComDropdownTagContext<T>>;
895
+ protected onRemove(event: Event): void;
896
+ private emitRemove;
897
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComDropdownTag<any>, never>;
898
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComDropdownTag<any>, "com-dropdown-tag", ["comDropdownTag"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "displayText": { "alias": "displayText"; "required": false; "isSignal": true; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "tagTemplate": { "alias": "tagTemplate"; "required": false; "isSignal": true; }; }, { "remove": "remove"; }, never, never, true, never>;
899
+ }
900
+
901
+ /**
902
+ * Group header component for categorized dropdown options.
903
+ *
904
+ * @example
905
+ * ```html
906
+ * <com-dropdown-group
907
+ * [label]="'Fruits'"
908
+ * [count]="5"
909
+ * />
910
+ * ```
911
+ *
912
+ * @tokens `--color-muted-foreground`
913
+ */
914
+ declare class ComDropdownGroup {
915
+ /** The group label/key. */
916
+ readonly label: InputSignal<string>;
917
+ /** The number of options in this group. */
918
+ readonly count: InputSignal<number>;
919
+ /** Whether the group is expanded (for collapsible groups). */
920
+ readonly expanded: InputSignal<boolean>;
921
+ /** Whether to show the count badge. */
922
+ readonly showCount: InputSignal<boolean>;
923
+ /** Size variant for styling. */
924
+ readonly size: InputSignal<DropdownSize>;
925
+ /** Additional CSS classes for the group header. */
926
+ readonly userClass: InputSignal<string>;
927
+ /** Custom template for rendering the group header. */
928
+ readonly groupTemplate: InputSignal<TemplateRef<ComDropdownGroupContext> | null>;
929
+ /** Computed CSS classes for the group header. */
930
+ protected readonly groupClasses: Signal<string>;
931
+ /** Template context for custom group templates. */
932
+ protected readonly templateContext: Signal<ComDropdownGroupContext>;
933
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComDropdownGroup, never>;
934
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComDropdownGroup, "com-dropdown-group", ["comDropdownGroup"], { "label": { "alias": "label"; "required": true; "isSignal": true; }; "count": { "alias": "count"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "showCount": { "alias": "showCount"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "groupTemplate": { "alias": "groupTemplate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
935
+ }
936
+
937
+ export { ComDropdown, ComDropdownEmptyTpl, ComDropdownGroup, ComDropdownGroupTpl, ComDropdownOption, ComDropdownOptionTpl, ComDropdownPanel, ComDropdownSearch, ComDropdownSelectedTpl, ComDropdownTag, ComDropdownTagTpl, defaultCompareWith, defaultDisplayWith, defaultFilterWith, dropdownChevronVariants, dropdownClearVariants, dropdownEmptyVariants, dropdownGroupVariants, dropdownOptionVariants, dropdownOverflowBadgeVariants, dropdownPanelVariants, dropdownSearchVariants, dropdownTagRemoveVariants, dropdownTagVariants, dropdownTriggerVariants, generateDropdownId };
938
+ export type { ComDropdownEmptyContext, ComDropdownGroupContext, ComDropdownGroup$1 as ComDropdownGroupData, ComDropdownOptionContext, ComDropdownPanelWidth, ComDropdownPosition, ComDropdownProcessedOption, ComDropdownSelectedContext, ComDropdownTagContext, DropdownChevronVariants, DropdownClearVariants, DropdownEmptyVariants, DropdownGroupVariants, DropdownOptionVariants, DropdownOverflowBadgeVariants, DropdownPanelVariants, DropdownSearchVariants, DropdownSize, DropdownState, DropdownTagRemoveVariants, DropdownTagVariants, DropdownTriggerVariants, DropdownVariant };