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,265 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InputSignal, InputSignalWithTransform, OutputEmitterRef, Signal } from '@angular/core';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ /**
6
+ * Event emitted when the paginator changes page index or page size.
7
+ */
8
+ interface PageEvent {
9
+ /** The current zero-based page index. */
10
+ pageIndex: number;
11
+ /** The previous zero-based page index. */
12
+ previousPageIndex: number;
13
+ /** The current page size. */
14
+ pageSize: number;
15
+ /** The total number of items being paged. */
16
+ length: number;
17
+ }
18
+ /**
19
+ * Function signature for custom range label formatting.
20
+ * Used for i18n and custom label display.
21
+ *
22
+ * @param page Current page index (zero-based)
23
+ * @param pageSize Number of items per page
24
+ * @param length Total number of items
25
+ * @returns Formatted string to display (e.g., "1 – 10 of 100")
26
+ */
27
+ type RangeLabelFn = (page: number, pageSize: number, length: number) => string;
28
+ /**
29
+ * Default range label function.
30
+ * Produces output like "1 – 10 of 100" or "0 of 0" when empty.
31
+ */
32
+ declare function defaultRangeLabel(page: number, pageSize: number, length: number): string;
33
+
34
+ type PaginatorSize = 'sm' | 'md';
35
+ type PaginatorLayout = 'compact' | 'spread';
36
+ /**
37
+ * CVA variants for the paginator container.
38
+ * Controls overall layout and spacing.
39
+ */
40
+ declare const paginatorContainerVariants: (props?: {
41
+ size?: PaginatorSize;
42
+ layout?: PaginatorLayout;
43
+ }) => string;
44
+ /**
45
+ * CVA variants for paginator navigation buttons.
46
+ * Controls button sizing, borders, and interactive states.
47
+ */
48
+ declare const paginatorButtonVariants: (props?: {
49
+ size?: PaginatorSize;
50
+ }) => string;
51
+ /**
52
+ * CVA variants for the range label text.
53
+ * Controls typography and color.
54
+ */
55
+ declare const paginatorRangeLabelVariants: (props?: {
56
+ size?: PaginatorSize;
57
+ }) => string;
58
+ /**
59
+ * CVA variants for the page size select element.
60
+ * Controls sizing and styling of the native select.
61
+ */
62
+ declare const paginatorSelectVariants: (props?: {
63
+ size?: PaginatorSize;
64
+ }) => string;
65
+ /**
66
+ * CVA variants for numbered page buttons.
67
+ * Controls button sizing, active state, and interactive states.
68
+ */
69
+ declare const paginatorPageButtonVariants: (props?: {
70
+ size?: PaginatorSize;
71
+ active?: boolean;
72
+ }) => string;
73
+ /**
74
+ * CVA variants for the ellipsis indicator.
75
+ * Controls sizing and styling of the "..." text.
76
+ */
77
+ declare const paginatorEllipsisVariants: (props?: {
78
+ size?: PaginatorSize;
79
+ }) => string;
80
+ type PaginatorContainerVariants = VariantProps<typeof paginatorContainerVariants>;
81
+ type PaginatorButtonVariants = VariantProps<typeof paginatorButtonVariants>;
82
+ type PaginatorRangeLabelVariants = VariantProps<typeof paginatorRangeLabelVariants>;
83
+ type PaginatorSelectVariants = VariantProps<typeof paginatorSelectVariants>;
84
+ type PaginatorPageButtonVariants = VariantProps<typeof paginatorPageButtonVariants>;
85
+ type PaginatorEllipsisVariants = VariantProps<typeof paginatorEllipsisVariants>;
86
+
87
+ /** Represents a page number or ellipsis marker in the page range. */
88
+ type PageRangeItem = number | 'ellipsis';
89
+ /**
90
+ * Paginator component — provides navigation for paginated content.
91
+ *
92
+ * Displays navigation controls, optional page size selector, and range label
93
+ * showing current position within the data set. Supports numbered page buttons
94
+ * when `showPageNumbers` is enabled.
95
+ *
96
+ * @tokens `--color-foreground`, `--color-muted-foreground`,
97
+ * `--color-border`, `--color-muted`,
98
+ * `--color-disabled`, `--color-disabled-foreground`,
99
+ * `--color-ring`, `--color-primary`, `--color-primary-foreground`
100
+ *
101
+ * @example Basic usage
102
+ * ```html
103
+ * <com-paginator
104
+ * [length]="100"
105
+ * [pageSize]="10"
106
+ * [pageIndex]="0"
107
+ * (page)="onPageChange($event)"
108
+ * />
109
+ * ```
110
+ *
111
+ * @example With page size options
112
+ * ```html
113
+ * <com-paginator
114
+ * [length]="100"
115
+ * [pageSize]="10"
116
+ * [pageIndex]="0"
117
+ * [pageSizeOptions]="[5, 10, 25, 50]"
118
+ * (page)="onPageChange($event)"
119
+ * />
120
+ * ```
121
+ *
122
+ * @example With first/last buttons
123
+ * ```html
124
+ * <com-paginator
125
+ * [length]="100"
126
+ * [pageSize]="10"
127
+ * [pageIndex]="0"
128
+ * [showFirstLastButtons]="true"
129
+ * (page)="onPageChange($event)"
130
+ * />
131
+ * ```
132
+ *
133
+ * @example With numbered page buttons
134
+ * ```html
135
+ * <com-paginator
136
+ * [length]="97"
137
+ * [pageSize]="10"
138
+ * [showPageNumbers]="true"
139
+ * (page)="onPageChange($event)"
140
+ * />
141
+ * ```
142
+ *
143
+ * @example Spread layout (summary left, controls right)
144
+ * ```html
145
+ * <com-paginator
146
+ * [length]="97"
147
+ * [pageSize]="10"
148
+ * [showPageNumbers]="true"
149
+ * layout="spread"
150
+ * (page)="onPageChange($event)"
151
+ * />
152
+ * ```
153
+ *
154
+ * @example Small size
155
+ * ```html
156
+ * <com-paginator
157
+ * [length]="50"
158
+ * [pageSize]="10"
159
+ * size="sm"
160
+ * (page)="onPageChange($event)"
161
+ * />
162
+ * ```
163
+ *
164
+ * @example Custom range label (i18n)
165
+ * ```html
166
+ * <com-paginator
167
+ * [length]="100"
168
+ * [pageSize]="10"
169
+ * [rangeLabel]="customLabel"
170
+ * (page)="onPageChange($event)"
171
+ * />
172
+ * ```
173
+ * ```ts
174
+ * customLabel = (page, pageSize, length) => `Seite ${page + 1} von ${Math.ceil(length / pageSize)}`;
175
+ * ```
176
+ */
177
+ declare class ComPaginator {
178
+ /** Page number buttons for keyboard navigation. */
179
+ private readonly pageButtons;
180
+ /** Total number of items being paged. */
181
+ readonly length: InputSignal<number>;
182
+ /** Number of items to display per page. */
183
+ readonly pageSize: InputSignal<number>;
184
+ /** Current zero-based page index. */
185
+ readonly pageIndex: InputSignal<number>;
186
+ /** Available page size options. Hides selector if empty. */
187
+ readonly pageSizeOptions: InputSignal<number[]>;
188
+ /** Whether to show first/last navigation buttons. */
189
+ readonly showFirstLastButtons: InputSignalWithTransform<boolean, unknown>;
190
+ /** Whether to show numbered page buttons. */
191
+ readonly showPageNumbers: InputSignalWithTransform<boolean, unknown>;
192
+ /** Whether all controls are disabled. */
193
+ readonly disabled: InputSignalWithTransform<boolean, unknown>;
194
+ /** Whether to hide the page size selector. */
195
+ readonly hidePageSize: InputSignalWithTransform<boolean, unknown>;
196
+ /** Size variant. */
197
+ readonly size: InputSignal<PaginatorSize>;
198
+ /** Layout variant. Only applies when showPageNumbers is true. */
199
+ readonly layout: InputSignal<PaginatorLayout>;
200
+ /** Number of pages to show on each side of the current page. */
201
+ readonly siblingCount: InputSignal<number>;
202
+ /** Number of pages to always show at the start and end. */
203
+ readonly boundaryCount: InputSignal<number>;
204
+ /** Accessible label for the nav element. */
205
+ readonly ariaLabel: InputSignal<string>;
206
+ /** Custom function for range label formatting. */
207
+ readonly rangeLabel: InputSignal<RangeLabelFn>;
208
+ /** Emits when page index or page size changes. */
209
+ readonly page: OutputEmitterRef<PageEvent>;
210
+ /** Total number of pages. */
211
+ protected readonly numberOfPages: Signal<number>;
212
+ /** Whether there is a previous page. */
213
+ protected readonly hasPreviousPage: Signal<boolean>;
214
+ /** Whether there is a next page. */
215
+ protected readonly hasNextPage: Signal<boolean>;
216
+ /** The formatted range label text. */
217
+ protected readonly rangeLabelText: Signal<string>;
218
+ /** Icon size based on component size. */
219
+ protected readonly iconSize: Signal<'xs' | 'sm'>;
220
+ /** Unique ID for page size label. */
221
+ protected readonly pageSizeLabelId: Signal<string>;
222
+ /** Classes for the container. */
223
+ protected readonly containerClasses: Signal<string>;
224
+ /** Classes for navigation buttons. */
225
+ protected readonly buttonClasses: Signal<string>;
226
+ /** Classes for the range label. */
227
+ protected readonly rangeLabelClasses: Signal<string>;
228
+ /** Classes for the page size select. */
229
+ protected readonly selectClasses: Signal<string>;
230
+ /** Classes for the ellipsis indicator. */
231
+ protected readonly ellipsisClasses: Signal<string>;
232
+ /** Cached classes for active page button. */
233
+ protected readonly activePageButtonClasses: Signal<string>;
234
+ /** Cached classes for inactive page button. */
235
+ protected readonly inactivePageButtonClasses: Signal<string>;
236
+ /**
237
+ * Computed page range for numbered pagination.
238
+ * Returns array like [0, 'ellipsis', 3, 4, 5, 'ellipsis', 9] (zero-indexed).
239
+ */
240
+ protected readonly pageRange: Signal<PageRangeItem[]>;
241
+ /** Navigate to the first page. */
242
+ firstPage(): void;
243
+ /** Navigate to the previous page. */
244
+ previousPage(): void;
245
+ /** Navigate to the next page. */
246
+ nextPage(): void;
247
+ /** Navigate to the last page. */
248
+ lastPage(): void;
249
+ /** Navigate to a specific page by index (zero-based). */
250
+ goToPage(pageIndex: number): void;
251
+ /** Handle page size selection change. */
252
+ protected onPageSizeChange(event: Event): void;
253
+ /** Handle keyboard navigation within page buttons (roving tabindex). */
254
+ protected onPageButtonsKeydown(event: KeyboardEvent): void;
255
+ /** Track function for page items. */
256
+ protected trackPageItem(index: number, item: PageRangeItem): string;
257
+ private emitPageEvent;
258
+ /** Generate a range of numbers from start to end (inclusive). */
259
+ private range;
260
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComPaginator, never>;
261
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComPaginator, "com-paginator", ["comPaginator"], { "length": { "alias": "length"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageIndex": { "alias": "pageIndex"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "showFirstLastButtons": { "alias": "showFirstLastButtons"; "required": false; "isSignal": true; }; "showPageNumbers": { "alias": "showPageNumbers"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "hidePageSize": { "alias": "hidePageSize"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "siblingCount": { "alias": "siblingCount"; "required": false; "isSignal": true; }; "boundaryCount": { "alias": "boundaryCount"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "rangeLabel": { "alias": "rangeLabel"; "required": false; "isSignal": true; }; }, { "page": "page"; }, never, never, true, never>;
262
+ }
263
+
264
+ export { ComPaginator, defaultRangeLabel, paginatorButtonVariants, paginatorContainerVariants, paginatorEllipsisVariants, paginatorPageButtonVariants, paginatorRangeLabelVariants, paginatorSelectVariants };
265
+ export type { PageEvent, PageRangeItem, PaginatorButtonVariants, PaginatorContainerVariants, PaginatorEllipsisVariants, PaginatorLayout, PaginatorPageButtonVariants, PaginatorRangeLabelVariants, PaginatorSelectVariants, PaginatorSize, RangeLabelFn };
@@ -0,0 +1,309 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InputSignal, TemplateRef, Type, InputSignalWithTransform, ModelSignal, OutputEmitterRef, Signal, InjectionToken } from '@angular/core';
3
+ import { VariantProps, cva } from 'class-variance-authority';
4
+ import { ConnectedPosition, ConnectionPositionPair } from '@angular/cdk/overlay';
5
+
6
+ type PopoverPosition = 'above' | 'below' | 'left' | 'right' | 'auto';
7
+ type PopoverAlignment = 'start' | 'center' | 'end';
8
+ type PopoverTriggerOn = 'click' | 'focus' | 'manual';
9
+ type PopoverVariant = 'default' | 'compact' | 'wide' | 'flush';
10
+ type PopoverBackdrop = 'transparent' | 'dimmed' | 'none';
11
+ type PopoverSide = 'top' | 'bottom' | 'left' | 'right';
12
+ /**
13
+ * Popover panel styling variants.
14
+ *
15
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`, `--shadow-lg`, `--radius-popover`, `--radius-overlay`
16
+ */
17
+ declare const popoverPanelVariants: ReturnType<typeof cva<{
18
+ variant: Record<PopoverVariant, string>;
19
+ }>>;
20
+ type PopoverPanelVariants = VariantProps<typeof popoverPanelVariants>;
21
+ /**
22
+ * Popover arrow positioning variants.
23
+ * The arrow is positioned on the edge of the popover pointing toward the trigger.
24
+ *
25
+ * @tokens `--color-popover`, `--color-border`
26
+ */
27
+ declare const popoverArrowVariants: ReturnType<typeof cva<{
28
+ side: Record<PopoverSide, string>;
29
+ }>>;
30
+ type PopoverArrowVariants = VariantProps<typeof popoverArrowVariants>;
31
+
32
+ /**
33
+ * Popover trigger directive — manages the popover overlay lifecycle.
34
+ * Applied to the trigger element, it handles opening, closing, positioning,
35
+ * and accessibility for floating popover content.
36
+ *
37
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`, `--shadow-lg`, `--color-ring`
38
+ *
39
+ * @example Basic usage with template
40
+ * ```html
41
+ * <button comButton [comPopoverTrigger]="helpContent">Help</button>
42
+ * <ng-template #helpContent>
43
+ * <p>This is help content.</p>
44
+ * </ng-template>
45
+ * ```
46
+ *
47
+ * @example With positioning
48
+ * ```html
49
+ * <button
50
+ * comButton
51
+ * [comPopoverTrigger]="menuContent"
52
+ * popoverPosition="below"
53
+ * popoverAlignment="start"
54
+ * [popoverShowArrow]="false"
55
+ * >
56
+ * Menu
57
+ * </button>
58
+ * ```
59
+ *
60
+ * @example With component content
61
+ * ```html
62
+ * <button
63
+ * comButton
64
+ * [comPopoverTrigger]="UserProfilePopover"
65
+ * [popoverData]="{ userId: user.id }"
66
+ * >
67
+ * Profile
68
+ * </button>
69
+ * ```
70
+ *
71
+ * @example Manual control
72
+ * ```html
73
+ * <button
74
+ * comButton
75
+ * [comPopoverTrigger]="content"
76
+ * popoverTriggerOn="manual"
77
+ * [(popoverOpen)]="isOpen"
78
+ * >
79
+ * Controlled
80
+ * </button>
81
+ * ```
82
+ */
83
+ declare class PopoverTriggerDirective {
84
+ private readonly overlay;
85
+ private readonly elementRef;
86
+ private readonly viewContainerRef;
87
+ private readonly injector;
88
+ private readonly destroyRef;
89
+ private readonly focusTrapFactory;
90
+ private readonly document;
91
+ private overlayRef;
92
+ private focusTrap;
93
+ private scrollCleanup;
94
+ private readonly popoverId;
95
+ /** Content to render: TemplateRef or Component class. */
96
+ readonly comPopoverTrigger: InputSignal<TemplateRef<unknown> | Type<unknown>>;
97
+ /** Preferred position direction. */
98
+ readonly popoverPosition: InputSignal<PopoverPosition>;
99
+ /** Alignment along the cross-axis. */
100
+ readonly popoverAlignment: InputSignal<PopoverAlignment>;
101
+ /** What interaction opens the popover. */
102
+ readonly popoverTriggerOn: InputSignal<PopoverTriggerOn>;
103
+ /** Gap in px between trigger and popover edge. */
104
+ readonly popoverOffset: InputSignal<number>;
105
+ /** Whether to render the connecting arrow. */
106
+ readonly popoverShowArrow: InputSignalWithTransform<boolean, unknown>;
107
+ /** Size/padding preset for the content panel. */
108
+ readonly popoverVariant: InputSignal<PopoverVariant>;
109
+ /** Backdrop behavior. */
110
+ readonly popoverBackdrop: InputSignal<PopoverBackdrop>;
111
+ /** Close when clicking outside the popover. */
112
+ readonly popoverCloseOnOutside: InputSignalWithTransform<boolean, unknown>;
113
+ /** Close on Escape key. */
114
+ readonly popoverCloseOnEscape: InputSignalWithTransform<boolean, unknown>;
115
+ /** Close when ancestor scrollable container scrolls. */
116
+ readonly popoverCloseOnScroll: InputSignalWithTransform<boolean, unknown>;
117
+ /** Prevents opening when true. */
118
+ readonly popoverDisabled: InputSignalWithTransform<boolean, unknown>;
119
+ /** Two-way bindable open state. */
120
+ readonly popoverOpen: ModelSignal<boolean>;
121
+ /** Arbitrary data passed to the content component/template. */
122
+ readonly popoverData: InputSignal<unknown>;
123
+ /** Custom CSS class(es) on the overlay panel. */
124
+ readonly popoverPanelClass: InputSignal<string | string[]>;
125
+ /** Trap focus inside popover. */
126
+ readonly popoverTrapFocus: InputSignalWithTransform<boolean, unknown>;
127
+ /** Optional accessibility label for the popover dialog. */
128
+ readonly popoverAriaLabel: InputSignal<string | undefined>;
129
+ /** Emitted after popup opens and is visible. */
130
+ readonly popoverOpened: OutputEmitterRef<void>;
131
+ /** Emitted after popup closes and is detached. */
132
+ readonly popoverClosed: OutputEmitterRef<void>;
133
+ private readonly activeSide;
134
+ private readonly activeAlignment;
135
+ private readonly animationState;
136
+ private contentComponentRef;
137
+ private readonly hasBackdrop;
138
+ private readonly backdropClass;
139
+ protected readonly ariaControls: Signal<string | null>;
140
+ private readonly panelClassArray;
141
+ constructor();
142
+ /** Programmatically open the popover. */
143
+ open(): void;
144
+ /** Programmatically close the popover. */
145
+ close(): void;
146
+ /** Toggle the popover open/close state. */
147
+ toggle(): void;
148
+ /** Force recalculation of position. */
149
+ reposition(): void;
150
+ protected onTriggerClick(event: MouseEvent): void;
151
+ protected onTriggerFocus(): void;
152
+ protected onTriggerBlur(): void;
153
+ protected onEscapeKey(event: Event): void;
154
+ private openPopover;
155
+ private closePopover;
156
+ private subscribeToScrollEvents;
157
+ private unsubscribeFromScrollEvents;
158
+ private createOverlay;
159
+ private attachContent;
160
+ private updateContentComponentInputs;
161
+ private detachContent;
162
+ private subscribeToCloseEvents;
163
+ private setupFocusTrap;
164
+ private destroyFocusTrap;
165
+ private disposeOverlay;
166
+ static ɵfac: i0.ɵɵFactoryDeclaration<PopoverTriggerDirective, never>;
167
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PopoverTriggerDirective, "[comPopoverTrigger]", ["comPopoverTrigger"], { "comPopoverTrigger": { "alias": "comPopoverTrigger"; "required": true; "isSignal": true; }; "popoverPosition": { "alias": "popoverPosition"; "required": false; "isSignal": true; }; "popoverAlignment": { "alias": "popoverAlignment"; "required": false; "isSignal": true; }; "popoverTriggerOn": { "alias": "popoverTriggerOn"; "required": false; "isSignal": true; }; "popoverOffset": { "alias": "popoverOffset"; "required": false; "isSignal": true; }; "popoverShowArrow": { "alias": "popoverShowArrow"; "required": false; "isSignal": true; }; "popoverVariant": { "alias": "popoverVariant"; "required": false; "isSignal": true; }; "popoverBackdrop": { "alias": "popoverBackdrop"; "required": false; "isSignal": true; }; "popoverCloseOnOutside": { "alias": "popoverCloseOnOutside"; "required": false; "isSignal": true; }; "popoverCloseOnEscape": { "alias": "popoverCloseOnEscape"; "required": false; "isSignal": true; }; "popoverCloseOnScroll": { "alias": "popoverCloseOnScroll"; "required": false; "isSignal": true; }; "popoverDisabled": { "alias": "popoverDisabled"; "required": false; "isSignal": true; }; "popoverOpen": { "alias": "popoverOpen"; "required": false; "isSignal": true; }; "popoverData": { "alias": "popoverData"; "required": false; "isSignal": true; }; "popoverPanelClass": { "alias": "popoverPanelClass"; "required": false; "isSignal": true; }; "popoverTrapFocus": { "alias": "popoverTrapFocus"; "required": false; "isSignal": true; }; "popoverAriaLabel": { "alias": "popoverAriaLabel"; "required": false; "isSignal": true; }; }, { "popoverOpen": "popoverOpenChange"; "popoverOpened": "popoverOpened"; "popoverClosed": "popoverClosed"; }, never, never, true, never>;
168
+ }
169
+
170
+ /**
171
+ * Convenience directive that closes the parent popover when clicked.
172
+ * Applied to elements inside the popover that should dismiss it.
173
+ *
174
+ * @example
175
+ * ```html
176
+ * <ng-template #confirmPop>
177
+ * <div class="space-y-3">
178
+ * <p>Are you sure?</p>
179
+ * <div class="flex gap-2">
180
+ * <button comButton variant="ghost" comPopoverClose>Cancel</button>
181
+ * <button comButton (click)="confirm()" comPopoverClose>Confirm</button>
182
+ * </div>
183
+ * </div>
184
+ * </ng-template>
185
+ * ```
186
+ *
187
+ * @example With a result value
188
+ * ```html
189
+ * <button [comPopoverClose]="'confirmed'" (click)="onConfirm()">Yes</button>
190
+ * <button [comPopoverClose]="'cancelled'">No</button>
191
+ * ```
192
+ */
193
+ declare class PopoverCloseDirective {
194
+ private readonly popoverRef;
195
+ /**
196
+ * Optional result value to pass when closing.
197
+ * This value is emitted via the trigger's close event.
198
+ */
199
+ readonly comPopoverClose: InputSignal<unknown>;
200
+ protected closePopover(): void;
201
+ static ɵfac: i0.ɵɵFactoryDeclaration<PopoverCloseDirective, never>;
202
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PopoverCloseDirective, "[comPopoverClose]", ["comPopoverClose"], { "comPopoverClose": { "alias": "comPopoverClose"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
203
+ }
204
+
205
+ /**
206
+ * Marker directive for lazy popover content templates.
207
+ * Applied to `<ng-template>` to indicate content that should be
208
+ * lazily instantiated when the popover opens.
209
+ *
210
+ * This directive is primarily semantic — it marks the template as popover content
211
+ * and provides access to the TemplateRef for potential content queries.
212
+ *
213
+ * @example
214
+ * ```html
215
+ * <button [comPopoverTrigger]="helpContent">Help</button>
216
+ * <ng-template comPopoverTemplate #helpContent>
217
+ * <p>This is help content.</p>
218
+ * </ng-template>
219
+ * ```
220
+ *
221
+ * Note: You can also pass a template reference directly without this directive:
222
+ * ```html
223
+ * <button [comPopoverTrigger]="helpContent">Help</button>
224
+ * <ng-template #helpContent>
225
+ * <p>This also works.</p>
226
+ * </ng-template>
227
+ * ```
228
+ */
229
+ declare class PopoverTemplateDirective {
230
+ /** Reference to the template for rendering. */
231
+ readonly templateRef: TemplateRef<unknown>;
232
+ static ɵfac: i0.ɵɵFactoryDeclaration<PopoverTemplateDirective, never>;
233
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PopoverTemplateDirective, "[comPopoverTemplate]", ["comPopoverTemplate"], {}, {}, never, never, true, never>;
234
+ }
235
+
236
+ /**
237
+ * Interface for the popover reference injected into content.
238
+ * Provides methods to control the popover from within content.
239
+ */
240
+ interface PopoverRef {
241
+ /** Programmatically open the popover. */
242
+ open(): void;
243
+ /** Programmatically close the popover. */
244
+ close(): void;
245
+ /** Toggle the popover open/close state. */
246
+ toggle(): void;
247
+ /** Force recalculation of position. */
248
+ reposition(): void;
249
+ }
250
+ /**
251
+ * Data passed to a component rendered inside the popover.
252
+ * Inject this token to access the data provided via `popoverData` input.
253
+ *
254
+ * @example
255
+ * ```ts
256
+ * @Component({ ... })
257
+ * export class UserProfilePopover {
258
+ * readonly data = inject(POPOVER_DATA); // { userId: '123' }
259
+ * }
260
+ * ```
261
+ */
262
+ declare const POPOVER_DATA: InjectionToken<unknown>;
263
+ /**
264
+ * Reference to the popover trigger directive for closing from inside the popover.
265
+ * Inject this token to programmatically close the popover from within content.
266
+ *
267
+ * @example
268
+ * ```ts
269
+ * @Component({ ... })
270
+ * export class UserProfilePopover {
271
+ * readonly popoverRef = inject(POPOVER_REF);
272
+ *
273
+ * save(): void {
274
+ * // ... save logic
275
+ * this.popoverRef.close();
276
+ * }
277
+ * }
278
+ * ```
279
+ */
280
+ declare const POPOVER_REF: InjectionToken<PopoverRef>;
281
+
282
+ /**
283
+ * Build an ordered list of position pairs for the CDK overlay.
284
+ * The first position is the preferred position; remaining positions are fallbacks.
285
+ *
286
+ * @param position - Preferred position direction ('above', 'below', 'left', 'right', 'auto')
287
+ * @param alignment - Alignment along the cross-axis ('start', 'center', 'end')
288
+ * @param offset - Gap in pixels between trigger and popover edge (default: 8)
289
+ * @returns Array of ConnectedPosition for FlexibleConnectedPositionStrategy
290
+ */
291
+ declare function buildPopoverPositions(position: PopoverPosition, alignment: PopoverAlignment, offset?: number): ConnectedPosition[];
292
+ /**
293
+ * Derive which side of the trigger the popover is on from a connection pair.
294
+ * Used to position the arrow correctly.
295
+ *
296
+ * The returned side indicates where the popover sits relative to the trigger:
297
+ * - 'bottom': popover is below trigger, arrow at top pointing up
298
+ * - 'top': popover is above trigger, arrow at bottom pointing down
299
+ * - 'right': popover is right of trigger, arrow at left pointing left
300
+ * - 'left': popover is left of trigger, arrow at right pointing right
301
+ */
302
+ declare function deriveSideFromPosition(pair: ConnectionPositionPair): PopoverSide;
303
+ /**
304
+ * Derive alignment from a connection pair.
305
+ */
306
+ declare function deriveAlignmentFromPosition(pair: ConnectionPositionPair): PopoverAlignment;
307
+
308
+ export { POPOVER_DATA, POPOVER_REF, PopoverCloseDirective, PopoverTemplateDirective, PopoverTriggerDirective, buildPopoverPositions, deriveAlignmentFromPosition, deriveSideFromPosition, popoverArrowVariants, popoverPanelVariants };
309
+ export type { PopoverAlignment, PopoverArrowVariants, PopoverBackdrop, PopoverPanelVariants, PopoverPosition, PopoverRef, PopoverSide, PopoverTriggerOn, PopoverVariant };