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,373 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InputSignal, InputSignalWithTransform, Signal } from '@angular/core';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ type CardVariant = 'elevated' | 'outlined' | 'filled' | 'ghost';
6
+ type CardPadding = 'none' | 'sm' | 'md' | 'lg';
7
+ type CardRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl';
8
+ type CardAlign = 'start' | 'end' | 'center' | 'between';
9
+ type CardActionsDirection = 'row' | 'column';
10
+ type CardMediaPosition = 'top' | 'bottom' | 'inset';
11
+ type CardAccentColor = 'primary' | 'accent' | 'warn' | 'success' | 'muted';
12
+ type CardAccentPosition = 'top' | 'left';
13
+ type CardBadgeColor = 'primary' | 'accent' | 'warn' | 'success' | 'muted';
14
+ type CardBadgePosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
15
+ /**
16
+ * CVA variants for the card container.
17
+ *
18
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-muted`, `--color-muted-hover`,
19
+ * `--color-foreground`, `--color-border`, `--color-primary`, `--color-ring`
20
+ */
21
+ declare const cardVariants: (props?: {
22
+ variant?: CardVariant;
23
+ padding?: CardPadding;
24
+ radius?: CardRadius;
25
+ interactive?: boolean;
26
+ }) => string;
27
+ type CardVariants = VariantProps<typeof cardVariants>;
28
+ /**
29
+ * CVA variants for card footer alignment.
30
+ */
31
+ declare const cardFooterVariants: (props?: {
32
+ align?: CardAlign;
33
+ }) => string;
34
+ type CardFooterVariants = VariantProps<typeof cardFooterVariants>;
35
+ /**
36
+ * CVA variants for card actions.
37
+ */
38
+ declare const cardActionsVariants: (props?: {
39
+ align?: CardAlign;
40
+ direction?: CardActionsDirection;
41
+ }) => string;
42
+ type CardActionsVariants = VariantProps<typeof cardActionsVariants>;
43
+ /**
44
+ * CVA variants for card media positioning.
45
+ */
46
+ declare const cardMediaVariants: (props?: {
47
+ position?: CardMediaPosition;
48
+ }) => string;
49
+ type CardMediaVariants = VariantProps<typeof cardMediaVariants>;
50
+ /**
51
+ * CVA variants for card accent strip.
52
+ *
53
+ * @tokens `--color-primary`, `--color-accent`, `--color-warn`, `--color-success`, `--color-muted`
54
+ */
55
+ declare const cardAccentVariants: (props?: {
56
+ color?: CardAccentColor;
57
+ position?: CardAccentPosition;
58
+ }) => string;
59
+ type CardAccentVariants = VariantProps<typeof cardAccentVariants>;
60
+ /**
61
+ * CVA variants for card badge overlay.
62
+ *
63
+ * @tokens `--color-primary`, `--color-primary-foreground`, `--color-accent`, `--color-accent-foreground`,
64
+ * `--color-warn`, `--color-warn-foreground`, `--color-success`, `--color-success-foreground`,
65
+ * `--color-muted`, `--color-muted-foreground`, `--radius-card`, `--radius-media`, `--radius-pill`
66
+ */
67
+ declare const cardBadgeVariants: (props?: {
68
+ position?: CardBadgePosition;
69
+ color?: CardBadgeColor;
70
+ }) => string;
71
+ type CardBadgeVariants = VariantProps<typeof cardBadgeVariants>;
72
+
73
+ /**
74
+ * Card container component - a styled surface for content.
75
+ *
76
+ * The card is a pure container with no imposed structure.
77
+ * Use card directives (comCardHeader, comCardContent, etc.) to compose layouts.
78
+ *
79
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-muted`, `--color-muted-hover`,
80
+ * `--color-foreground`, `--color-border`, `--color-primary`, `--color-ring`
81
+ *
82
+ * @example Basic card
83
+ * ```html
84
+ * <com-card>
85
+ * <div comCardContent>Simple content</div>
86
+ * </com-card>
87
+ * ```
88
+ *
89
+ * @example Interactive card
90
+ * ```html
91
+ * <com-card [interactive]="true" (click)="onCardClick()">
92
+ * <div comCardContent>Clickable card</div>
93
+ * </com-card>
94
+ * ```
95
+ *
96
+ * @example Outlined variant with custom padding
97
+ * ```html
98
+ * <com-card variant="outlined" padding="md">
99
+ * <p>Outlined card with medium padding</p>
100
+ * </com-card>
101
+ * ```
102
+ */
103
+ declare class ComCard {
104
+ /** Visual treatment of the card surface. */
105
+ readonly variant: InputSignal<CardVariant>;
106
+ /** Inner spacing. Default 'none' - sub-parts manage their own padding. */
107
+ readonly padding: InputSignal<CardPadding>;
108
+ /** Border radius. */
109
+ readonly radius: InputSignal<CardRadius>;
110
+ /** When true, adds hover/active states and cursor-pointer. */
111
+ readonly interactive: InputSignalWithTransform<boolean, unknown>;
112
+ /** Consumer CSS classes - merged with variant classes. */
113
+ readonly userClass: InputSignal<string>;
114
+ protected readonly computedClass: Signal<string>;
115
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCard, never>;
116
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComCard, "com-card", ["comCard"], { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "padding": { "alias": "padding"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
117
+ }
118
+
119
+ /**
120
+ * Card header directive - top section for title and actions.
121
+ *
122
+ * Uses justify-between so it naturally supports a title group on the left
123
+ * and an action element (icon button, menu trigger) on the right.
124
+ *
125
+ * @example Header with title
126
+ * ```html
127
+ * <div comCardHeader>
128
+ * <h3 comCardTitle>Card Title</h3>
129
+ * </div>
130
+ * ```
131
+ *
132
+ * @example Header with title and action
133
+ * ```html
134
+ * <div comCardHeader>
135
+ * <div>
136
+ * <h3 comCardTitle>Title</h3>
137
+ * <p comCardSubtitle>Subtitle</p>
138
+ * </div>
139
+ * <button comButton variant="ghost" size="icon" aria-label="More">...</button>
140
+ * </div>
141
+ * ```
142
+ *
143
+ * @tokens None - uses only layout utilities
144
+ */
145
+ declare class ComCardHeader {
146
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCardHeader, never>;
147
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardHeader, "[comCardHeader]", ["comCardHeader"], {}, {}, never, never, true, never>;
148
+ }
149
+
150
+ /**
151
+ * Card title directive - styled heading text.
152
+ *
153
+ * Apply to any heading element. Consumer picks the semantic level (h2, h3, etc.).
154
+ *
155
+ * @example
156
+ * ```html
157
+ * <h3 comCardTitle>Project Alpha</h3>
158
+ * ```
159
+ *
160
+ * @tokens `--color-foreground`
161
+ */
162
+ declare class ComCardTitle {
163
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCardTitle, never>;
164
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardTitle, "[comCardTitle]", ["comCardTitle"], {}, {}, never, never, true, never>;
165
+ }
166
+
167
+ /**
168
+ * Card subtitle directive - secondary text styling.
169
+ *
170
+ * @example
171
+ * ```html
172
+ * <p comCardSubtitle>Last updated 2 hours ago</p>
173
+ * ```
174
+ *
175
+ * @tokens `--color-muted-foreground`
176
+ */
177
+ declare class ComCardSubtitle {
178
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCardSubtitle, never>;
179
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardSubtitle, "[comCardSubtitle]", ["comCardSubtitle"], {}, {}, never, never, true, never>;
180
+ }
181
+
182
+ /**
183
+ * Card content directive - main body area with consistent padding.
184
+ *
185
+ * @example
186
+ * ```html
187
+ * <div comCardContent>
188
+ * <p>Card body content goes here.</p>
189
+ * </div>
190
+ * ```
191
+ *
192
+ * @tokens None - uses only layout utilities
193
+ */
194
+ declare class ComCardContent {
195
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCardContent, never>;
196
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardContent, "[comCardContent]", ["comCardContent"], {}, {}, never, never, true, never>;
197
+ }
198
+
199
+ /**
200
+ * Card footer directive - bottom section for metadata or secondary actions.
201
+ *
202
+ * @example Footer with alignment
203
+ * ```html
204
+ * <div comCardFooter align="between">
205
+ * <span class="text-sm text-muted-foreground">Updated 3m ago</span>
206
+ * <a comButton variant="link" size="sm">View details</a>
207
+ * </div>
208
+ * ```
209
+ *
210
+ * @tokens None - uses only layout utilities
211
+ */
212
+ declare class ComCardFooter {
213
+ /** Horizontal alignment of footer content. */
214
+ readonly align: InputSignal<CardAlign>;
215
+ protected readonly computedClass: Signal<string>;
216
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCardFooter, never>;
217
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardFooter, "[comCardFooter]", ["comCardFooter"], { "align": { "alias": "align"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
218
+ }
219
+
220
+ /**
221
+ * Card actions directive - dedicated button row for primary card actions.
222
+ *
223
+ * Separate from footer because actions and footer metadata serve different purposes.
224
+ *
225
+ * @example Actions with alignment
226
+ * ```html
227
+ * <div comCardActions>
228
+ * <button comButton variant="ghost" size="sm">Cancel</button>
229
+ * <button comButton size="sm">Confirm</button>
230
+ * </div>
231
+ * ```
232
+ *
233
+ * @example Stacked column layout
234
+ * ```html
235
+ * <div comCardActions direction="column" align="start">
236
+ * <button comButton fullWidth>Primary Action</button>
237
+ * <button comButton variant="outline" fullWidth>Secondary</button>
238
+ * </div>
239
+ * ```
240
+ *
241
+ * @tokens None - uses only layout utilities
242
+ */
243
+ declare class ComCardActions {
244
+ /** Horizontal alignment of actions. */
245
+ readonly align: InputSignal<CardAlign>;
246
+ /** Layout direction - row or column. */
247
+ readonly direction: InputSignal<CardActionsDirection>;
248
+ protected readonly computedClass: Signal<string>;
249
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCardActions, never>;
250
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardActions, "[comCardActions]", ["comCardActions"], { "align": { "alias": "align"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
251
+ }
252
+
253
+ /**
254
+ * Card media directive - image/video slot with aspect ratio handling.
255
+ *
256
+ * Apply to <img>, <video>, <picture>, or a wrapper <div>.
257
+ *
258
+ * @example Top media (bleeds to edge)
259
+ * ```html
260
+ * <img comCardMedia src="/hero.jpg" alt="Hero image" />
261
+ * ```
262
+ *
263
+ * @example Inset media (padded with rounded corners)
264
+ * ```html
265
+ * <img comCardMedia position="inset" src="/preview.jpg" alt="Preview" />
266
+ * ```
267
+ *
268
+ * @tokens None - uses only layout utilities
269
+ */
270
+ declare class ComCardMedia {
271
+ /** Media positioning within the card. */
272
+ readonly position: InputSignal<CardMediaPosition>;
273
+ protected readonly computedClass: Signal<string>;
274
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCardMedia, never>;
275
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardMedia, "[comCardMedia]", ["comCardMedia"], { "position": { "alias": "position"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
276
+ }
277
+
278
+ /**
279
+ * Card divider directive - horizontal rule between card sections.
280
+ *
281
+ * @example Standard divider (with side margins)
282
+ * ```html
283
+ * <hr comCardDivider />
284
+ * ```
285
+ *
286
+ * @example Full-width divider (edge to edge)
287
+ * ```html
288
+ * <hr comCardDivider [inset]="true" />
289
+ * ```
290
+ *
291
+ * @tokens `--color-border`
292
+ */
293
+ declare class ComCardDivider {
294
+ /** When true, divider spans full card width (no horizontal margin). */
295
+ readonly inset: InputSignalWithTransform<boolean, unknown>;
296
+ /** Consumer CSS classes. */
297
+ readonly userClass: InputSignal<string>;
298
+ protected readonly computedClass: Signal<string>;
299
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCardDivider, never>;
300
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardDivider, "[comCardDivider]", ["comCardDivider"], { "inset": { "alias": "inset"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
301
+ }
302
+
303
+ /**
304
+ * Card accent directive - colored strip for status or category indication.
305
+ *
306
+ * Place as the first child of the card for top accent, or use position="left"
307
+ * for a left-edge strip (requires adding left padding to content).
308
+ *
309
+ * @tokens `--color-primary`, `--color-accent`, `--color-warn`, `--color-success`, `--color-muted`
310
+ *
311
+ * @example Top accent strip
312
+ * ```html
313
+ * <com-card>
314
+ * <div comCardAccent color="warn"></div>
315
+ * <div comCardContent>Warning content</div>
316
+ * </com-card>
317
+ * ```
318
+ *
319
+ * @example Left accent strip
320
+ * ```html
321
+ * <com-card>
322
+ * <div comCardAccent color="success" position="left"></div>
323
+ * <div comCardContent class="pl-5">Content with left padding</div>
324
+ * </com-card>
325
+ * ```
326
+ */
327
+ declare class ComCardAccent {
328
+ /** Accent color. */
329
+ readonly color: InputSignal<CardAccentColor>;
330
+ /** Position of the accent strip. */
331
+ readonly position: InputSignal<CardAccentPosition>;
332
+ protected readonly computedClass: Signal<string>;
333
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCardAccent, never>;
334
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardAccent, "[comCardAccent]", ["comCardAccent"], { "color": { "alias": "color"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
335
+ }
336
+
337
+ /**
338
+ * Card badge directive - positioned overlay for labels, tags, or status indicators.
339
+ *
340
+ * Floats over the card content (e.g., "NEW", "SALE", "Featured").
341
+ *
342
+ * @tokens `--color-primary`, `--color-primary-foreground`, `--color-accent`, `--color-accent-foreground`,
343
+ * `--color-warn`, `--color-warn-foreground`, `--color-success`, `--color-success-foreground`,
344
+ * `--color-muted`, `--color-muted-foreground`, `--radius-pill`
345
+ *
346
+ * @example Badge in top-right corner
347
+ * ```html
348
+ * <com-card>
349
+ * <span comCardBadge>NEW</span>
350
+ * <img comCardMedia src="/product.jpg" alt="Product" />
351
+ * </com-card>
352
+ * ```
353
+ *
354
+ * @example Badge with custom position and color
355
+ * ```html
356
+ * <com-card>
357
+ * <span comCardBadge position="top-left" color="warn">SALE</span>
358
+ * <div comCardContent>Product details</div>
359
+ * </com-card>
360
+ * ```
361
+ */
362
+ declare class ComCardBadge {
363
+ /** Badge position within the card. */
364
+ readonly position: InputSignal<CardBadgePosition>;
365
+ /** Badge color. */
366
+ readonly color: InputSignal<CardBadgeColor>;
367
+ protected readonly computedClass: Signal<string>;
368
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCardBadge, never>;
369
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardBadge, "[comCardBadge]", ["comCardBadge"], { "position": { "alias": "position"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
370
+ }
371
+
372
+ export { ComCard, ComCardAccent, ComCardActions, ComCardBadge, ComCardContent, ComCardDivider, ComCardFooter, ComCardHeader, ComCardMedia, ComCardSubtitle, ComCardTitle, cardAccentVariants, cardActionsVariants, cardBadgeVariants, cardFooterVariants, cardMediaVariants, cardVariants };
373
+ export type { CardAccentColor, CardAccentPosition, CardAccentVariants, CardActionsDirection, CardActionsVariants, CardAlign, CardBadgeColor, CardBadgePosition, CardBadgeVariants, CardFooterVariants, CardMediaPosition, CardMediaVariants, CardPadding, CardRadius, CardVariant, CardVariants };
@@ -0,0 +1,116 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Signal, ElementRef, InputSignal, ModelSignal, OutputEmitterRef } from '@angular/core';
3
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
4
+
5
+ /** Checkbox size variants. */
6
+ type CheckboxSize = 'sm' | 'md' | 'lg';
7
+ /** Checkbox color variants. */
8
+ type CheckboxVariant = 'primary' | 'accent' | 'warn';
9
+ /**
10
+ * CVA variants for the visual checkbox box.
11
+ *
12
+ * Uses `peer` selectors to style based on native input state:
13
+ * - `peer-checked:` for checked state
14
+ * - `peer-indeterminate:` for indeterminate state
15
+ * - `peer-focus-visible:` for keyboard focus
16
+ * - `peer-disabled:` for disabled state
17
+ *
18
+ * @tokens `--color-border`, `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
19
+ * `--color-accent`, `--color-accent-foreground`, `--color-accent-hover`,
20
+ * `--color-warn`, `--color-warn-foreground`, `--color-warn-hover`,
21
+ * `--color-disabled`, `--color-disabled-foreground`, `--color-ring`, `--radius-interactive-sm`
22
+ */
23
+ declare const checkboxBoxVariants: (props?: {
24
+ variant?: CheckboxVariant;
25
+ size?: CheckboxSize;
26
+ }) => string;
27
+ /** Size-based classes for the checkmark SVG icon. */
28
+ declare const CHECKBOX_ICON_SIZES: Record<CheckboxSize, string>;
29
+ /** Size-based classes for the label content. */
30
+ declare const CHECKBOX_LABEL_SIZES: Record<CheckboxSize, string>;
31
+
32
+ /** Event emitted when checkbox state changes. */
33
+ interface CheckboxChange {
34
+ checked: boolean;
35
+ source: ComCheckbox;
36
+ }
37
+ /**
38
+ * Production-grade checkbox component with full accessibility support.
39
+ *
40
+ * Uses a native `<input type="checkbox">` for built-in keyboard handling,
41
+ * `:checked` and `:indeterminate` pseudo-classes, and screen reader support.
42
+ *
43
+ * Implements `ControlValueAccessor` for Reactive Forms integration via
44
+ * `NgControl` injection pattern (no `NG_VALUE_ACCESSOR` provider).
45
+ *
46
+ * @tokens `--color-border`, `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
47
+ * `--color-accent`, `--color-accent-foreground`, `--color-accent-hover`,
48
+ * `--color-warn`, `--color-warn-foreground`, `--color-warn-hover`,
49
+ * `--color-disabled`, `--color-disabled-foreground`, `--color-ring`
50
+ *
51
+ * @example Basic usage
52
+ * ```html
53
+ * <com-checkbox [(checked)]="isActive">Enable feature</com-checkbox>
54
+ * ```
55
+ *
56
+ * @example With reactive forms
57
+ * ```html
58
+ * <com-checkbox formControlName="acceptTerms">
59
+ * I accept the <a href="/terms">terms and conditions</a>
60
+ * </com-checkbox>
61
+ * ```
62
+ *
63
+ * @example Indeterminate state
64
+ * ```html
65
+ * <com-checkbox [(indeterminate)]="hasPartialSelection" (changed)="onSelectAll($event)">
66
+ * Select all
67
+ * </com-checkbox>
68
+ * ```
69
+ *
70
+ * @example Variants and sizes
71
+ * ```html
72
+ * <com-checkbox variant="accent" size="lg">Large accent checkbox</com-checkbox>
73
+ * <com-checkbox variant="warn" size="sm">Small warning checkbox</com-checkbox>
74
+ * ```
75
+ */
76
+ declare class ComCheckbox implements ControlValueAccessor {
77
+ /** Optional NgControl for reactive forms integration. */
78
+ readonly ngControl: NgControl | null;
79
+ /** Reference to the native input element. */
80
+ readonly inputRef: Signal<ElementRef<HTMLInputElement> | undefined>;
81
+ /** Unique ID for this checkbox instance. */
82
+ private readonly uniqueId;
83
+ readonly size: InputSignal<CheckboxSize>;
84
+ readonly variant: InputSignal<CheckboxVariant>;
85
+ readonly checked: ModelSignal<boolean>;
86
+ readonly indeterminate: ModelSignal<boolean>;
87
+ readonly disabled: ModelSignal<boolean>;
88
+ readonly value: InputSignal<string | undefined>;
89
+ readonly name: InputSignal<string | undefined>;
90
+ readonly id: InputSignal<string | undefined>;
91
+ readonly ariaLabel: InputSignal<string | null>;
92
+ readonly ariaLabelledby: InputSignal<string | null>;
93
+ readonly ariaDescribedby: InputSignal<string | null>;
94
+ readonly changed: OutputEmitterRef<CheckboxChange>;
95
+ readonly inputId: Signal<string>;
96
+ protected readonly boxClasses: Signal<string>;
97
+ protected readonly iconSizeClass: Signal<string>;
98
+ protected readonly labelSizeClass: Signal<string>;
99
+ private onChange;
100
+ protected onTouched: () => void;
101
+ constructor();
102
+ writeValue(value: boolean): void;
103
+ registerOnChange(fn: (value: boolean) => void): void;
104
+ registerOnTouched(fn: () => void): void;
105
+ setDisabledState(isDisabled: boolean): void;
106
+ protected onInputChange(event: Event): void;
107
+ /** Focuses this checkbox's input element. */
108
+ focus(): void;
109
+ /** Toggles the checkbox state programmatically. */
110
+ toggle(): void;
111
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCheckbox, never>;
112
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComCheckbox, "com-checkbox", ["comCheckbox"], { "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "indeterminate": "indeterminateChange"; "disabled": "disabledChange"; "changed": "changed"; }, never, ["*"], true, never>;
113
+ }
114
+
115
+ export { CHECKBOX_ICON_SIZES, CHECKBOX_LABEL_SIZES, ComCheckbox, checkboxBoxVariants };
116
+ export type { CheckboxChange, CheckboxSize, CheckboxVariant };