ngx-com 0.0.3 → 0.0.5

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 (33) 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-calendar.mjs +33 -130
  4. package/fesm2022/ngx-com-components-calendar.mjs.map +1 -1
  5. package/fesm2022/ngx-com-components-confirm.mjs +562 -0
  6. package/fesm2022/ngx-com-components-confirm.mjs.map +1 -0
  7. package/fesm2022/ngx-com-components-dropdown.mjs +119 -25
  8. package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -1
  9. package/fesm2022/ngx-com-components-empty-state.mjs +382 -0
  10. package/fesm2022/ngx-com-components-empty-state.mjs.map +1 -0
  11. package/fesm2022/ngx-com-components-form-field.mjs +16 -15
  12. package/fesm2022/ngx-com-components-form-field.mjs.map +1 -1
  13. package/fesm2022/ngx-com-components-item.mjs +578 -0
  14. package/fesm2022/ngx-com-components-item.mjs.map +1 -0
  15. package/fesm2022/ngx-com-components-paginator.mjs +823 -0
  16. package/fesm2022/ngx-com-components-paginator.mjs.map +1 -0
  17. package/fesm2022/ngx-com-components-segmented-control.mjs +538 -0
  18. package/fesm2022/ngx-com-components-segmented-control.mjs.map +1 -0
  19. package/fesm2022/ngx-com-components-spinner.mjs +189 -0
  20. package/fesm2022/ngx-com-components-spinner.mjs.map +1 -0
  21. package/fesm2022/ngx-com-components-tooltip.mjs +625 -0
  22. package/fesm2022/ngx-com-components-tooltip.mjs.map +1 -0
  23. package/package.json +33 -1
  24. package/types/ngx-com-components-avatar.d.ts +409 -0
  25. package/types/ngx-com-components-calendar.d.ts +5 -0
  26. package/types/ngx-com-components-confirm.d.ts +160 -0
  27. package/types/ngx-com-components-dropdown.d.ts +52 -28
  28. package/types/ngx-com-components-empty-state.d.ts +269 -0
  29. package/types/ngx-com-components-item.d.ts +336 -0
  30. package/types/ngx-com-components-paginator.d.ts +265 -0
  31. package/types/ngx-com-components-segmented-control.d.ts +274 -0
  32. package/types/ngx-com-components-spinner.d.ts +120 -0
  33. package/types/ngx-com-components-tooltip.d.ts +200 -0
@@ -0,0 +1,160 @@
1
+ import * as i0 from '@angular/core';
2
+ import { WritableSignal, InputSignal, InputSignalWithTransform, TemplateRef, OutputEmitterRef } from '@angular/core';
3
+
4
+ /**
5
+ * Color variant for the confirm button styling.
6
+ */
7
+ type ConfirmColor = 'primary' | 'warn';
8
+ /**
9
+ * Context provided to custom confirmation templates.
10
+ */
11
+ interface ConfirmTemplateContext {
12
+ /** The confirmation message. */
13
+ $implicit: string;
14
+ /** The dialog title, if provided. */
15
+ title: string | undefined;
16
+ /** Function to confirm the action. */
17
+ confirm: () => void;
18
+ /** Function to cancel the action. */
19
+ cancel: () => void;
20
+ /** Whether an async operation is in progress. */
21
+ loading: boolean;
22
+ /** Function to set the loading state. */
23
+ setLoading: (value: boolean) => void;
24
+ }
25
+
26
+ /**
27
+ * Confirmation directive — intercepts clicks and displays a confirmation panel
28
+ * before allowing the action to proceed.
29
+ *
30
+ * The directive acts as an output gate: it captures clicks, shows confirmation UI,
31
+ * and emits `true` (confirmed) or `false` (cancelled) through its output.
32
+ *
33
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`,
34
+ * `--color-foreground`, `--color-muted-foreground`, `--color-background`,
35
+ * `--shadow-lg`, `--radius-popover`
36
+ *
37
+ * @example Basic confirmation
38
+ * ```html
39
+ * <button comButton (comConfirm)="onDelete($event)" confirmMessage="Delete this item?">
40
+ * Delete
41
+ * </button>
42
+ * ```
43
+ *
44
+ * @example Destructive action with warn styling
45
+ * ```html
46
+ * <button comButton color="warn"
47
+ * (comConfirm)="onPermanentDelete($event)"
48
+ * confirmTitle="Permanent Deletion"
49
+ * confirmMessage="This action cannot be undone."
50
+ * confirmLabel="Delete Forever"
51
+ * confirmColor="warn">
52
+ * Delete Permanently
53
+ * </button>
54
+ * ```
55
+ *
56
+ * @example Custom template
57
+ * ```html
58
+ * <button comButton (comConfirm)="onAction($event)" [confirmTpl]="customTpl">
59
+ * Action
60
+ * </button>
61
+ *
62
+ * <ng-template #customTpl let-message let-confirm="confirm" let-cancel="cancel">
63
+ * <div class="flex flex-col gap-4">
64
+ * <p>{{ message }}</p>
65
+ * <div class="flex justify-end gap-2">
66
+ * <button comButton variant="ghost" (click)="cancel()">Cancel</button>
67
+ * <button comButton (click)="confirm()">Confirm</button>
68
+ * </div>
69
+ * </div>
70
+ * </ng-template>
71
+ * ```
72
+ */
73
+ declare class ComConfirm {
74
+ private readonly overlay;
75
+ private readonly elementRef;
76
+ private readonly viewContainerRef;
77
+ private readonly injector;
78
+ private readonly destroyRef;
79
+ private readonly platformId;
80
+ private overlayRef;
81
+ private panelInstance;
82
+ private readonly titleId;
83
+ private readonly descriptionId;
84
+ /** Whether the confirmation panel is currently open. */
85
+ protected readonly isOpen: WritableSignal<boolean>;
86
+ /** The confirmation message to display. */
87
+ readonly confirmMessage: InputSignal<string>;
88
+ /** Optional title for the confirmation dialog. */
89
+ readonly confirmTitle: InputSignal<string | undefined>;
90
+ /** Label for the confirm button. */
91
+ readonly confirmLabel: InputSignal<string>;
92
+ /** Label for the cancel button. */
93
+ readonly cancelLabel: InputSignal<string>;
94
+ /** Color variant for the confirm button. */
95
+ readonly confirmColor: InputSignal<ConfirmColor>;
96
+ /** When true, clicks pass through without showing confirmation. */
97
+ readonly confirmDisabled: InputSignalWithTransform<boolean, unknown>;
98
+ /** Whether to show a backdrop behind the panel. */
99
+ readonly confirmBackdrop: InputSignalWithTransform<boolean, unknown>;
100
+ /** Custom template for the panel content. */
101
+ readonly confirmTpl: InputSignal<TemplateRef<ConfirmTemplateContext> | undefined>;
102
+ /**
103
+ * Emits `true` when confirmed, `false` when cancelled or navigated away.
104
+ * This is the main directive output — acts as an output gate for the action.
105
+ */
106
+ readonly comConfirm: OutputEmitterRef<boolean>;
107
+ private readonly panelConfig;
108
+ constructor();
109
+ /** Programmatically open the confirmation dialog. */
110
+ open(): void;
111
+ /** Programmatically close the confirmation dialog (emits false). */
112
+ close(): void;
113
+ protected onTriggerClick(event: Event): void;
114
+ private createOverlay;
115
+ private attachPanel;
116
+ private handleConfirm;
117
+ private handleCancel;
118
+ private closePanel;
119
+ private handleDetachment;
120
+ private disposeOverlay;
121
+ private returnFocusToTrigger;
122
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComConfirm, never>;
123
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComConfirm, "[comConfirm]", ["comConfirm"], { "confirmMessage": { "alias": "confirmMessage"; "required": false; "isSignal": true; }; "confirmTitle": { "alias": "confirmTitle"; "required": false; "isSignal": true; }; "confirmLabel": { "alias": "confirmLabel"; "required": false; "isSignal": true; }; "cancelLabel": { "alias": "cancelLabel"; "required": false; "isSignal": true; }; "confirmColor": { "alias": "confirmColor"; "required": false; "isSignal": true; }; "confirmDisabled": { "alias": "confirmDisabled"; "required": false; "isSignal": true; }; "confirmBackdrop": { "alias": "confirmBackdrop"; "required": false; "isSignal": true; }; "confirmTpl": { "alias": "confirmTpl"; "required": false; "isSignal": true; }; }, { "comConfirm": "comConfirm"; }, never, never, true, never>;
124
+ }
125
+
126
+ /**
127
+ * CVA variants for the confirmation panel backdrop.
128
+ *
129
+ * @tokens `--color-background`
130
+ */
131
+ declare const confirmBackdropVariants: (props?: {
132
+ visible?: boolean;
133
+ }) => string;
134
+ /**
135
+ * CVA variants for the confirmation panel container.
136
+ *
137
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`, `--shadow-lg`, `--radius-popover`
138
+ */
139
+ declare const confirmPanelVariants: (props?: {
140
+ visible?: boolean;
141
+ }) => string;
142
+ /**
143
+ * CVA variants for the confirmation panel title.
144
+ *
145
+ * @tokens `--color-foreground`
146
+ */
147
+ declare const confirmTitleVariants: () => string;
148
+ /**
149
+ * CVA variants for the confirmation panel message.
150
+ *
151
+ * @tokens `--color-muted-foreground`
152
+ */
153
+ declare const confirmMessageVariants: () => string;
154
+ /**
155
+ * CVA variants for the confirmation panel footer.
156
+ */
157
+ declare const confirmFooterVariants: () => string;
158
+
159
+ export { ComConfirm, confirmBackdropVariants, confirmFooterVariants, confirmMessageVariants, confirmPanelVariants, confirmTitleVariants };
160
+ export type { ConfirmColor, ConfirmTemplateContext };
@@ -1,6 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { TemplateRef, OnInit, Signal, InputSignal, OutputEmitterRef, WritableSignal } from '@angular/core';
3
- import { ControlValueAccessor } from '@angular/forms';
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';
4
5
  import { VariantProps } from 'class-variance-authority';
5
6
  import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
6
7
 
@@ -111,18 +112,6 @@ interface ComDropdownPosition {
111
112
  * Panel width configuration.
112
113
  */
113
114
  type ComDropdownPanelWidth = 'trigger' | 'auto' | string;
114
- /**
115
- * Variant types for the dropdown trigger.
116
- */
117
- type ComDropdownVariant = 'default' | 'outline' | 'ghost' | 'filled';
118
- /**
119
- * Size types for the dropdown.
120
- */
121
- type ComDropdownSize = 'sm' | 'default' | 'lg';
122
- /**
123
- * State types for the dropdown (validation states).
124
- */
125
- type ComDropdownState = 'default' | 'error' | 'success';
126
115
  /**
127
116
  * Default compare function for primitive values.
128
117
  * @param a First value.
@@ -298,7 +287,7 @@ declare class ComDropdownTagTpl<T> {
298
287
  /**
299
288
  * Variant type for dropdown trigger appearance.
300
289
  */
301
- type DropdownVariant = 'default' | 'outline' | 'ghost' | 'filled';
290
+ type DropdownVariant = 'default' | 'outline' | 'ghost' | 'filled' | 'naked';
302
291
  /**
303
292
  * Size type for dropdown components.
304
293
  */
@@ -450,15 +439,17 @@ type DropdownChevronVariants = VariantProps<typeof dropdownChevronVariants>;
450
439
  * </com-dropdown>
451
440
  * ```
452
441
  */
453
- declare class ComDropdown<T> implements ControlValueAccessor, OnInit {
442
+ declare class ComDropdown<T> implements ControlValueAccessor, FormFieldControl<T | T[] | null> {
454
443
  private readonly elementRef;
455
444
  private readonly destroyRef;
456
445
  private readonly overlay;
457
446
  private readonly viewContainerRef;
458
447
  private readonly liveAnnouncer;
459
- private readonly document;
460
- /** Optional NgControl for form integration. */
461
- private readonly ngControl;
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;
462
453
  /** Reference to the trigger button element. */
463
454
  private readonly triggerRef;
464
455
  /** Reference to the panel template. */
@@ -523,6 +514,8 @@ declare class ComDropdown<T> implements ControlValueAccessor, OnInit {
523
514
  readonly virtualScrollThreshold: InputSignal<number>;
524
515
  /** Maximum number of tags to display in multi-select mode. Set to null for no limit. */
525
516
  readonly maxVisibleTags: InputSignal<number | null>;
517
+ /** Custom error state matcher for determining when to show errors. */
518
+ readonly errorStateMatcher: InputSignal<ErrorStateMatcher | undefined>;
526
519
  /** Emitted when the value changes. */
527
520
  readonly valueChange: OutputEmitterRef<T | T[] | null>;
528
521
  /** Emitted when search query changes. */
@@ -533,6 +526,8 @@ declare class ComDropdown<T> implements ControlValueAccessor, OnInit {
533
526
  readonly closed: OutputEmitterRef<void>;
534
527
  /** Whether the panel is open. */
535
528
  readonly isOpen: WritableSignal<boolean>;
529
+ /** Whether the trigger button is focused. */
530
+ private readonly _triggerFocused;
536
531
  /** Current search query. */
537
532
  readonly searchQuery: WritableSignal<string>;
538
533
  /** Currently active (keyboard focused) option ID. */
@@ -541,6 +536,10 @@ declare class ComDropdown<T> implements ControlValueAccessor, OnInit {
541
536
  readonly internalValue: WritableSignal<T | T[] | null>;
542
537
  /** Live announcements for screen readers. */
543
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;
544
543
  /** Trigger element ID. */
545
544
  readonly triggerId: Signal<string>;
546
545
  /** Panel element ID. */
@@ -549,6 +548,21 @@ declare class ComDropdown<T> implements ControlValueAccessor, OnInit {
549
548
  readonly activeDescendant: Signal<string | null>;
550
549
  /** Whether the dropdown has a value. */
551
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>;
552
566
  /** Selected value (single mode). */
553
567
  readonly selectedValue: Signal<T | null>;
554
568
  /** Selected values (multiple mode). */
@@ -582,11 +596,25 @@ declare class ComDropdown<T> implements ControlValueAccessor, OnInit {
582
596
  private onChange;
583
597
  private onTouched;
584
598
  constructor();
585
- ngOnInit(): void;
586
599
  writeValue(value: T | T[] | null): void;
587
600
  registerOnChange(fn: (value: T | T[] | null) => void): void;
588
601
  registerOnTouched(fn: () => void): void;
589
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;
590
618
  /** Opens the dropdown panel. */
591
619
  open(): void;
592
620
  /** Closes the dropdown panel. */
@@ -603,6 +631,8 @@ declare class ComDropdown<T> implements ControlValueAccessor, OnInit {
603
631
  protected onPanelKeydown(event: KeyboardEvent): void;
604
632
  protected onSearchChange(query: string): void;
605
633
  protected onSearchKeyNav(event: KeyboardEvent): void;
634
+ protected onTriggerFocus(): void;
635
+ protected onTriggerBlur(): void;
606
636
  protected onOptionHover(optionId: string): void;
607
637
  protected selectOption(value: T): void;
608
638
  protected removeValue(value: T): void;
@@ -627,7 +657,7 @@ declare class ComDropdown<T> implements ControlValueAccessor, OnInit {
627
657
  private typeAhead;
628
658
  private announce;
629
659
  static ɵfac: i0.ɵɵFactoryDeclaration<ComDropdown<any>, never>;
630
- 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; }; }, { "valueChange": "valueChange"; "searchChange": "searchChange"; "opened": "opened"; "closed": "closed"; }, ["optionTemplate", "selectedTemplate", "emptyTemplate", "groupTemplate", "tagTemplate"], never, true, 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>;
631
661
  }
632
662
 
633
663
  /**
@@ -648,7 +678,6 @@ declare class ComDropdown<T> implements ControlValueAccessor, OnInit {
648
678
  * `--color-primary-subtle-foreground`, `--color-disabled-foreground`
649
679
  */
650
680
  declare class ComDropdownOption<T> {
651
- private readonly elementRef;
652
681
  /** Reference to the option element for focus management. */
653
682
  private readonly optionRef;
654
683
  /** The value this option represents. */
@@ -683,8 +712,6 @@ declare class ComDropdownOption<T> {
683
712
  protected readonly templateContext: Signal<ComDropdownOptionContext<T>>;
684
713
  protected onOptionClick(event: MouseEvent): void;
685
714
  protected onMouseEnter(): void;
686
- /** Gets the host element. */
687
- getHostElement(): HTMLElement;
688
715
  /** Scrolls this option into view. */
689
716
  scrollIntoView(): void;
690
717
  /** Focuses this option element. */
@@ -712,7 +739,6 @@ declare class ComDropdownOption<T> {
712
739
  * `--color-muted-foreground`, `--radius-overlay`
713
740
  */
714
741
  declare class ComDropdownPanel<T> {
715
- private readonly elementRef;
716
742
  /** Reference to the panel element. */
717
743
  private readonly panelRef;
718
744
  /** Reference to the virtual scroll viewport (when enabled). */
@@ -756,8 +782,6 @@ declare class ComDropdownPanel<T> {
756
782
  protected readonly emptyContext: Signal<ComDropdownEmptyContext>;
757
783
  /** Track function for options. */
758
784
  protected trackByFn(_index: number, option: ComDropdownProcessedOption<T>): string;
759
- /** Gets the host element. */
760
- getHostElement(): HTMLElement;
761
785
  /** Scrolls to a specific index. */
762
786
  scrollToIndex(index: number): void;
763
787
  /** Scrolls an option into view. */
@@ -911,4 +935,4 @@ declare class ComDropdownGroup {
911
935
  }
912
936
 
913
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 };
914
- export type { ComDropdownEmptyContext, ComDropdownGroupContext, ComDropdownGroup$1 as ComDropdownGroupData, ComDropdownOptionContext, ComDropdownPanelWidth, ComDropdownPosition, ComDropdownProcessedOption, ComDropdownSelectedContext, ComDropdownSize, ComDropdownState, ComDropdownTagContext, ComDropdownVariant, DropdownChevronVariants, DropdownClearVariants, DropdownEmptyVariants, DropdownGroupVariants, DropdownOptionVariants, DropdownOverflowBadgeVariants, DropdownPanelVariants, DropdownSearchVariants, DropdownSize, DropdownState, DropdownTagRemoveVariants, DropdownTagVariants, DropdownTriggerVariants, DropdownVariant };
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 };
@@ -0,0 +1,269 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InputSignal, Signal } from '@angular/core';
3
+
4
+ type EmptyStateSize = 'sm' | 'md' | 'lg';
5
+ type EmptyStateAlign = 'start' | 'center';
6
+ type EmptyStateOrientation = 'vertical' | 'horizontal';
7
+ /**
8
+ * CVA variants for the empty state container.
9
+ *
10
+ * @tokens `--color-foreground`, `--color-muted`, `--color-muted-foreground`
11
+ */
12
+ declare const emptyStateVariants: (props?: {
13
+ size?: EmptyStateSize;
14
+ align?: EmptyStateAlign;
15
+ orientation?: EmptyStateOrientation;
16
+ }) => string;
17
+ /**
18
+ * CVA variants for the empty state icon container.
19
+ *
20
+ * @tokens `--color-muted`, `--color-muted-foreground`
21
+ */
22
+ declare const emptyStateIconVariants: (props?: {
23
+ size?: EmptyStateSize;
24
+ }) => string;
25
+ /**
26
+ * CVA variants for the empty state title.
27
+ *
28
+ * @tokens `--color-foreground`
29
+ */
30
+ declare const emptyStateTitleVariants: (props?: {
31
+ size?: EmptyStateSize;
32
+ }) => string;
33
+ /**
34
+ * CVA variants for the empty state description.
35
+ *
36
+ * @tokens `--color-muted-foreground`
37
+ */
38
+ declare const emptyStateDescriptionVariants: (props?: {
39
+ size?: EmptyStateSize;
40
+ }) => string;
41
+ /**
42
+ * CVA variants for the empty state actions container.
43
+ */
44
+ declare const emptyStateActionsVariants: (props?: {
45
+ size?: EmptyStateSize;
46
+ }) => string;
47
+
48
+ /**
49
+ * Empty state component - a placeholder surface for when there is no data to display.
50
+ *
51
+ * Common use cases include:
52
+ * - Empty lists or tables ("No results found")
53
+ * - Initial states before user action ("Create your first project")
54
+ * - Search results with no matches ("No items match your search")
55
+ * - Error recovery states ("Something went wrong. Try again.")
56
+ *
57
+ * The component is a pure layout container that accepts projected content through attribute directives.
58
+ *
59
+ * @tokens `--color-muted`, `--color-muted-foreground`, `--color-foreground`
60
+ *
61
+ * @example Minimal empty state
62
+ * ```html
63
+ * <com-empty-state>
64
+ * <div comEmptyStateIcon>
65
+ * <com-icon name="inbox" size="xl" />
66
+ * </div>
67
+ * <h3 comEmptyStateTitle>No messages</h3>
68
+ * </com-empty-state>
69
+ * ```
70
+ *
71
+ * @example Full empty state with description and action
72
+ * ```html
73
+ * <com-empty-state>
74
+ * <div comEmptyStateIcon>
75
+ * <com-icon name="folder-open" size="xl" />
76
+ * </div>
77
+ * <h3 comEmptyStateTitle>No projects yet</h3>
78
+ * <p comEmptyStateDescription>
79
+ * Create your first project to get started organizing your work.
80
+ * </p>
81
+ * <div comEmptyStateActions>
82
+ * <button comButton>Create Project</button>
83
+ * </div>
84
+ * </com-empty-state>
85
+ * ```
86
+ *
87
+ * @example Search empty state with secondary action
88
+ * ```html
89
+ * <com-empty-state>
90
+ * <div comEmptyStateIcon>
91
+ * <com-icon name="search-x" size="xl" />
92
+ * </div>
93
+ * <h3 comEmptyStateTitle>No results found</h3>
94
+ * <p comEmptyStateDescription>
95
+ * Try adjusting your search terms or filters.
96
+ * </p>
97
+ * <div comEmptyStateActions>
98
+ * <button comButton variant="outline">Clear Filters</button>
99
+ * <button comButton>New Search</button>
100
+ * </div>
101
+ * </com-empty-state>
102
+ * ```
103
+ *
104
+ * @example Small size for inline contexts
105
+ * ```html
106
+ * <com-empty-state size="sm">
107
+ * <div comEmptyStateIcon>
108
+ * <com-icon name="list" size="lg" />
109
+ * </div>
110
+ * <h4 comEmptyStateTitle>No items</h4>
111
+ * </com-empty-state>
112
+ * ```
113
+ *
114
+ * @example Large size for full-page empty states
115
+ * ```html
116
+ * <com-empty-state size="lg">
117
+ * <div comEmptyStateIcon>
118
+ * <com-icon name="rocket" size="2xl" />
119
+ * </div>
120
+ * <h2 comEmptyStateTitle>Welcome to Acme</h2>
121
+ * <p comEmptyStateDescription>
122
+ * Your dashboard is ready. Start by creating your first resource.
123
+ * </p>
124
+ * <div comEmptyStateActions>
125
+ * <button comButton size="lg">Get Started</button>
126
+ * </div>
127
+ * </com-empty-state>
128
+ * ```
129
+ *
130
+ * @example Horizontal orientation
131
+ * ```html
132
+ * <com-empty-state orientation="horizontal" align="start">
133
+ * <div comEmptyStateIcon>
134
+ * <com-icon name="alert-circle" size="lg" />
135
+ * </div>
136
+ * <h4 comEmptyStateTitle>No notifications</h4>
137
+ * <p comEmptyStateDescription>You're all caught up!</p>
138
+ * </com-empty-state>
139
+ * ```
140
+ *
141
+ * @example Left-aligned for sidebar contexts
142
+ * ```html
143
+ * <com-empty-state align="start">
144
+ * <div comEmptyStateIcon>
145
+ * <com-icon name="users" size="lg" />
146
+ * </div>
147
+ * <h4 comEmptyStateTitle>No team members</h4>
148
+ * <p comEmptyStateDescription>Invite people to collaborate.</p>
149
+ * <div comEmptyStateActions>
150
+ * <button comButton size="sm">Invite</button>
151
+ * </div>
152
+ * </com-empty-state>
153
+ * ```
154
+ */
155
+ declare class ComEmptyState {
156
+ /** Controls overall scale: icon container size, text sizes, spacing. */
157
+ readonly size: InputSignal<EmptyStateSize>;
158
+ /** Horizontal alignment of content. */
159
+ readonly align: InputSignal<EmptyStateAlign>;
160
+ /** Layout direction: vertical stacks content, horizontal places icon beside text. */
161
+ readonly orientation: InputSignal<EmptyStateOrientation>;
162
+ /** Consumer CSS classes - merged with variant classes. */
163
+ readonly userClass: InputSignal<string>;
164
+ protected readonly computedClass: Signal<string>;
165
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComEmptyState, never>;
166
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComEmptyState, "com-empty-state", ["comEmptyState"], { "size": { "alias": "size"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
167
+ }
168
+
169
+ /**
170
+ * Empty state icon container directive - styled circular background for icon/illustration.
171
+ *
172
+ * Apply to a container element. Place any content inside (typically `com-icon`).
173
+ * Styling automatically adapts to the parent's `size` input.
174
+ *
175
+ * @example
176
+ * ```html
177
+ * <div comEmptyStateIcon>
178
+ * <com-icon name="inbox" size="xl" />
179
+ * </div>
180
+ * ```
181
+ *
182
+ * @example With custom illustration
183
+ * ```html
184
+ * <div comEmptyStateIcon>
185
+ * <img src="/assets/empty-mailbox.svg" alt="" class="size-8" />
186
+ * </div>
187
+ * ```
188
+ *
189
+ * @tokens `--color-muted`, `--color-muted-foreground`
190
+ */
191
+ declare class ComEmptyStateIcon {
192
+ private readonly emptyState;
193
+ protected readonly computedClass: Signal<string>;
194
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComEmptyStateIcon, never>;
195
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComEmptyStateIcon, "[comEmptyStateIcon]", never, {}, {}, never, never, true, never>;
196
+ }
197
+
198
+ /**
199
+ * Empty state title directive - styled heading text.
200
+ *
201
+ * Apply to any heading element. Consumer picks the semantic level (h2, h3, etc.).
202
+ * Styling automatically adapts to the parent's `size` input.
203
+ *
204
+ * @example
205
+ * ```html
206
+ * <h3 comEmptyStateTitle>No projects yet</h3>
207
+ * ```
208
+ *
209
+ * @tokens `--color-foreground`
210
+ */
211
+ declare class ComEmptyStateTitle {
212
+ private readonly emptyState;
213
+ protected readonly computedClass: Signal<string>;
214
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComEmptyStateTitle, never>;
215
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComEmptyStateTitle, "[comEmptyStateTitle]", never, {}, {}, never, never, true, never>;
216
+ }
217
+
218
+ /**
219
+ * Empty state description directive - supporting text.
220
+ *
221
+ * Apply to a paragraph or text element.
222
+ * Styling automatically adapts to the parent's `size` input.
223
+ *
224
+ * @example
225
+ * ```html
226
+ * <p comEmptyStateDescription>
227
+ * Create your first project to get started organizing your work.
228
+ * </p>
229
+ * ```
230
+ *
231
+ * @tokens `--color-muted-foreground`
232
+ */
233
+ declare class ComEmptyStateDescription {
234
+ private readonly emptyState;
235
+ protected readonly computedClass: Signal<string>;
236
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComEmptyStateDescription, never>;
237
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComEmptyStateDescription, "[comEmptyStateDescription]", never, {}, {}, never, never, true, never>;
238
+ }
239
+
240
+ /**
241
+ * Empty state actions directive - container for action buttons.
242
+ *
243
+ * Apply to a container element. Place buttons inside.
244
+ * Styling automatically adapts to the parent's `size` input.
245
+ *
246
+ * @example Single action
247
+ * ```html
248
+ * <div comEmptyStateActions>
249
+ * <button comButton>Create Project</button>
250
+ * </div>
251
+ * ```
252
+ *
253
+ * @example Multiple actions
254
+ * ```html
255
+ * <div comEmptyStateActions>
256
+ * <button comButton variant="outline">Clear Filters</button>
257
+ * <button comButton>New Search</button>
258
+ * </div>
259
+ * ```
260
+ */
261
+ declare class ComEmptyStateActions {
262
+ private readonly emptyState;
263
+ protected readonly computedClass: Signal<string>;
264
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComEmptyStateActions, never>;
265
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComEmptyStateActions, "[comEmptyStateActions]", never, {}, {}, never, never, true, never>;
266
+ }
267
+
268
+ export { ComEmptyState, ComEmptyStateActions, ComEmptyStateDescription, ComEmptyStateIcon, ComEmptyStateTitle, emptyStateActionsVariants, emptyStateDescriptionVariants, emptyStateIconVariants, emptyStateTitleVariants, emptyStateVariants };
269
+ export type { EmptyStateAlign, EmptyStateOrientation, EmptyStateSize };