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,590 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, booleanAttribute, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
3
+ import { mergeClasses } from 'ngx-com/utils';
4
+ import { cva } from 'class-variance-authority';
5
+
6
+ /**
7
+ * CVA variants for the card container.
8
+ *
9
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-muted`, `--color-muted-hover`,
10
+ * `--color-foreground`, `--color-border`, `--color-primary`, `--color-ring`
11
+ */
12
+ const cardVariants = cva('relative flex flex-col overflow-hidden', {
13
+ variants: {
14
+ variant: {
15
+ elevated: 'bg-popover text-popover-foreground shadow-md',
16
+ outlined: 'bg-popover text-popover-foreground border border-border',
17
+ filled: 'bg-muted text-foreground',
18
+ ghost: 'bg-transparent text-foreground',
19
+ },
20
+ padding: {
21
+ none: '',
22
+ sm: 'p-3',
23
+ md: 'p-5',
24
+ lg: 'p-7',
25
+ },
26
+ radius: {
27
+ none: 'rounded-none',
28
+ sm: 'rounded-[var(--radius-sm)]',
29
+ md: 'rounded-[var(--radius-md)]',
30
+ lg: 'rounded-card',
31
+ xl: 'rounded-[var(--radius-xl)]',
32
+ },
33
+ interactive: {
34
+ true: 'cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',
35
+ false: '',
36
+ },
37
+ },
38
+ compoundVariants: [
39
+ { interactive: true, variant: 'elevated', class: 'hover:shadow-lg active:shadow-sm transition-shadow duration-150' },
40
+ { interactive: true, variant: 'outlined', class: 'hover:border-primary hover:shadow-sm transition-all duration-150' },
41
+ { interactive: true, variant: 'filled', class: 'hover:bg-muted-hover transition-colors duration-150' },
42
+ { interactive: true, variant: 'ghost', class: 'hover:bg-muted transition-colors duration-150' },
43
+ ],
44
+ defaultVariants: {
45
+ variant: 'elevated',
46
+ padding: 'none',
47
+ radius: 'lg',
48
+ interactive: false,
49
+ },
50
+ });
51
+ /**
52
+ * CVA variants for card footer alignment.
53
+ */
54
+ const cardFooterVariants = cva('flex items-center gap-2 px-5 pt-0 pb-5', {
55
+ variants: {
56
+ align: {
57
+ start: 'justify-start',
58
+ end: 'justify-end',
59
+ center: 'justify-center',
60
+ between: 'justify-between',
61
+ },
62
+ },
63
+ defaultVariants: {
64
+ align: 'end',
65
+ },
66
+ });
67
+ /**
68
+ * CVA variants for card actions.
69
+ */
70
+ const cardActionsVariants = cva('flex gap-2 px-5 py-3', {
71
+ variants: {
72
+ align: {
73
+ start: 'justify-start',
74
+ end: 'justify-end',
75
+ center: 'justify-center',
76
+ between: 'justify-between',
77
+ },
78
+ direction: {
79
+ row: 'flex-row items-center',
80
+ column: 'flex-col items-stretch',
81
+ },
82
+ },
83
+ defaultVariants: {
84
+ align: 'end',
85
+ direction: 'row',
86
+ },
87
+ });
88
+ /**
89
+ * CVA variants for card media positioning.
90
+ */
91
+ const cardMediaVariants = cva('block w-full overflow-hidden object-cover', {
92
+ variants: {
93
+ position: {
94
+ top: '',
95
+ bottom: '',
96
+ inset: 'mx-5 mt-5 rounded-media',
97
+ },
98
+ },
99
+ defaultVariants: {
100
+ position: 'top',
101
+ },
102
+ });
103
+ /**
104
+ * CVA variants for card accent strip.
105
+ *
106
+ * @tokens `--color-primary`, `--color-accent`, `--color-warn`, `--color-success`, `--color-muted`
107
+ */
108
+ const cardAccentVariants = cva('block shrink-0', {
109
+ variants: {
110
+ color: {
111
+ primary: 'bg-primary',
112
+ accent: 'bg-accent',
113
+ warn: 'bg-warn',
114
+ success: 'bg-success',
115
+ muted: 'bg-muted',
116
+ },
117
+ position: {
118
+ top: 'h-1 w-full',
119
+ left: 'w-1 h-full absolute left-0 top-0',
120
+ },
121
+ },
122
+ defaultVariants: {
123
+ color: 'primary',
124
+ position: 'top',
125
+ },
126
+ });
127
+ /**
128
+ * CVA variants for card badge overlay.
129
+ *
130
+ * @tokens `--color-primary`, `--color-primary-foreground`, `--color-accent`, `--color-accent-foreground`,
131
+ * `--color-warn`, `--color-warn-foreground`, `--color-success`, `--color-success-foreground`,
132
+ * `--color-muted`, `--color-muted-foreground`, `--radius-card`, `--radius-media`, `--radius-pill`
133
+ */
134
+ const cardBadgeVariants = cva('absolute z-10 inline-flex items-center rounded-pill px-2.5 py-0.5 text-xs font-semibold', {
135
+ variants: {
136
+ position: {
137
+ 'top-left': 'top-3 left-3',
138
+ 'top-right': 'top-3 right-3',
139
+ 'bottom-left': 'bottom-3 left-3',
140
+ 'bottom-right': 'bottom-3 right-3',
141
+ },
142
+ color: {
143
+ primary: 'bg-primary text-primary-foreground',
144
+ accent: 'bg-accent text-accent-foreground',
145
+ warn: 'bg-warn text-warn-foreground',
146
+ success: 'bg-success text-success-foreground',
147
+ muted: 'bg-muted text-muted-foreground',
148
+ },
149
+ },
150
+ defaultVariants: {
151
+ position: 'top-right',
152
+ color: 'primary',
153
+ },
154
+ });
155
+
156
+ /**
157
+ * Card container component - a styled surface for content.
158
+ *
159
+ * The card is a pure container with no imposed structure.
160
+ * Use card directives (comCardHeader, comCardContent, etc.) to compose layouts.
161
+ *
162
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-muted`, `--color-muted-hover`,
163
+ * `--color-foreground`, `--color-border`, `--color-primary`, `--color-ring`
164
+ *
165
+ * @example Basic card
166
+ * ```html
167
+ * <com-card>
168
+ * <div comCardContent>Simple content</div>
169
+ * </com-card>
170
+ * ```
171
+ *
172
+ * @example Interactive card
173
+ * ```html
174
+ * <com-card [interactive]="true" (click)="onCardClick()">
175
+ * <div comCardContent>Clickable card</div>
176
+ * </com-card>
177
+ * ```
178
+ *
179
+ * @example Outlined variant with custom padding
180
+ * ```html
181
+ * <com-card variant="outlined" padding="md">
182
+ * <p>Outlined card with medium padding</p>
183
+ * </com-card>
184
+ * ```
185
+ */
186
+ class ComCard {
187
+ /** Visual treatment of the card surface. */
188
+ variant = input('elevated', ...(ngDevMode ? [{ debugName: "variant" }] : []));
189
+ /** Inner spacing. Default 'none' - sub-parts manage their own padding. */
190
+ padding = input('none', ...(ngDevMode ? [{ debugName: "padding" }] : []));
191
+ /** Border radius. */
192
+ radius = input('lg', ...(ngDevMode ? [{ debugName: "radius" }] : []));
193
+ /** When true, adds hover/active states and cursor-pointer. */
194
+ interactive = input(false, { ...(ngDevMode ? { debugName: "interactive" } : {}), transform: booleanAttribute });
195
+ /** Consumer CSS classes - merged with variant classes. */
196
+ userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : {}), alias: 'class' });
197
+ computedClass = computed(() => mergeClasses(cardVariants({
198
+ variant: this.variant(),
199
+ padding: this.padding(),
200
+ radius: this.radius(),
201
+ interactive: this.interactive(),
202
+ }), this.userClass()), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
203
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
204
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.0", type: ComCard, isStandalone: true, selector: "com-card", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, radius: { classPropertyName: "radius", publicName: "radius", isSignal: true, isRequired: false, transformFunction: null }, interactive: { classPropertyName: "interactive", publicName: "interactive", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClass()" } }, exportAs: ["comCard"], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
205
+ }
206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCard, decorators: [{
207
+ type: Component,
208
+ args: [{
209
+ selector: 'com-card',
210
+ exportAs: 'comCard',
211
+ template: `<ng-content />`,
212
+ changeDetection: ChangeDetectionStrategy.OnPush,
213
+ encapsulation: ViewEncapsulation.None,
214
+ host: {
215
+ '[class]': 'computedClass()',
216
+ },
217
+ }]
218
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], radius: [{ type: i0.Input, args: [{ isSignal: true, alias: "radius", required: false }] }], interactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "interactive", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
219
+
220
+ /**
221
+ * Card header directive - top section for title and actions.
222
+ *
223
+ * Uses justify-between so it naturally supports a title group on the left
224
+ * and an action element (icon button, menu trigger) on the right.
225
+ *
226
+ * @example Header with title
227
+ * ```html
228
+ * <div comCardHeader>
229
+ * <h3 comCardTitle>Card Title</h3>
230
+ * </div>
231
+ * ```
232
+ *
233
+ * @example Header with title and action
234
+ * ```html
235
+ * <div comCardHeader>
236
+ * <div>
237
+ * <h3 comCardTitle>Title</h3>
238
+ * <p comCardSubtitle>Subtitle</p>
239
+ * </div>
240
+ * <button comButton variant="ghost" size="icon" aria-label="More">...</button>
241
+ * </div>
242
+ * ```
243
+ *
244
+ * @tokens None - uses only layout utilities
245
+ */
246
+ class ComCardHeader {
247
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
248
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.0", type: ComCardHeader, isStandalone: true, selector: "[comCardHeader]", host: { classAttribute: "flex items-start justify-between gap-3 px-5 pt-5 pb-0" }, exportAs: ["comCardHeader"], ngImport: i0 });
249
+ }
250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardHeader, decorators: [{
251
+ type: Directive,
252
+ args: [{
253
+ selector: '[comCardHeader]',
254
+ exportAs: 'comCardHeader',
255
+ host: {
256
+ class: 'flex items-start justify-between gap-3 px-5 pt-5 pb-0',
257
+ },
258
+ }]
259
+ }] });
260
+
261
+ /**
262
+ * Card title directive - styled heading text.
263
+ *
264
+ * Apply to any heading element. Consumer picks the semantic level (h2, h3, etc.).
265
+ *
266
+ * @example
267
+ * ```html
268
+ * <h3 comCardTitle>Project Alpha</h3>
269
+ * ```
270
+ *
271
+ * @tokens `--color-foreground`
272
+ */
273
+ class ComCardTitle {
274
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
275
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.0", type: ComCardTitle, isStandalone: true, selector: "[comCardTitle]", host: { classAttribute: "font-heading text-lg font-semibold tracking-tight text-foreground" }, exportAs: ["comCardTitle"], ngImport: i0 });
276
+ }
277
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardTitle, decorators: [{
278
+ type: Directive,
279
+ args: [{
280
+ selector: '[comCardTitle]',
281
+ exportAs: 'comCardTitle',
282
+ host: {
283
+ class: 'font-heading text-lg font-semibold tracking-tight text-foreground',
284
+ },
285
+ }]
286
+ }] });
287
+
288
+ /**
289
+ * Card subtitle directive - secondary text styling.
290
+ *
291
+ * @example
292
+ * ```html
293
+ * <p comCardSubtitle>Last updated 2 hours ago</p>
294
+ * ```
295
+ *
296
+ * @tokens `--color-muted-foreground`
297
+ */
298
+ class ComCardSubtitle {
299
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardSubtitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
300
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.0", type: ComCardSubtitle, isStandalone: true, selector: "[comCardSubtitle]", host: { classAttribute: "text-sm text-muted-foreground" }, exportAs: ["comCardSubtitle"], ngImport: i0 });
301
+ }
302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardSubtitle, decorators: [{
303
+ type: Directive,
304
+ args: [{
305
+ selector: '[comCardSubtitle]',
306
+ exportAs: 'comCardSubtitle',
307
+ host: {
308
+ class: 'text-sm text-muted-foreground',
309
+ },
310
+ }]
311
+ }] });
312
+
313
+ /**
314
+ * Card content directive - main body area with consistent padding.
315
+ *
316
+ * @example
317
+ * ```html
318
+ * <div comCardContent>
319
+ * <p>Card body content goes here.</p>
320
+ * </div>
321
+ * ```
322
+ *
323
+ * @tokens None - uses only layout utilities
324
+ */
325
+ class ComCardContent {
326
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
327
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.0", type: ComCardContent, isStandalone: true, selector: "[comCardContent]", host: { classAttribute: "flex-1 px-5 py-4 text-sm" }, exportAs: ["comCardContent"], ngImport: i0 });
328
+ }
329
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardContent, decorators: [{
330
+ type: Directive,
331
+ args: [{
332
+ selector: '[comCardContent]',
333
+ exportAs: 'comCardContent',
334
+ host: {
335
+ class: 'flex-1 px-5 py-4 text-sm',
336
+ },
337
+ }]
338
+ }] });
339
+
340
+ /**
341
+ * Card footer directive - bottom section for metadata or secondary actions.
342
+ *
343
+ * @example Footer with alignment
344
+ * ```html
345
+ * <div comCardFooter align="between">
346
+ * <span class="text-sm text-muted-foreground">Updated 3m ago</span>
347
+ * <a comButton variant="link" size="sm">View details</a>
348
+ * </div>
349
+ * ```
350
+ *
351
+ * @tokens None - uses only layout utilities
352
+ */
353
+ class ComCardFooter {
354
+ /** Horizontal alignment of footer content. */
355
+ align = input('end', ...(ngDevMode ? [{ debugName: "align" }] : []));
356
+ computedClass = computed(() => cardFooterVariants({ align: this.align() }), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
357
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
358
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComCardFooter, isStandalone: true, selector: "[comCardFooter]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClass()" } }, exportAs: ["comCardFooter"], ngImport: i0 });
359
+ }
360
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardFooter, decorators: [{
361
+ type: Directive,
362
+ args: [{
363
+ selector: '[comCardFooter]',
364
+ exportAs: 'comCardFooter',
365
+ host: {
366
+ '[class]': 'computedClass()',
367
+ },
368
+ }]
369
+ }], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }] } });
370
+
371
+ /**
372
+ * Card actions directive - dedicated button row for primary card actions.
373
+ *
374
+ * Separate from footer because actions and footer metadata serve different purposes.
375
+ *
376
+ * @example Actions with alignment
377
+ * ```html
378
+ * <div comCardActions>
379
+ * <button comButton variant="ghost" size="sm">Cancel</button>
380
+ * <button comButton size="sm">Confirm</button>
381
+ * </div>
382
+ * ```
383
+ *
384
+ * @example Stacked column layout
385
+ * ```html
386
+ * <div comCardActions direction="column" align="start">
387
+ * <button comButton fullWidth>Primary Action</button>
388
+ * <button comButton variant="outline" fullWidth>Secondary</button>
389
+ * </div>
390
+ * ```
391
+ *
392
+ * @tokens None - uses only layout utilities
393
+ */
394
+ class ComCardActions {
395
+ /** Horizontal alignment of actions. */
396
+ align = input('end', ...(ngDevMode ? [{ debugName: "align" }] : []));
397
+ /** Layout direction - row or column. */
398
+ direction = input('row', ...(ngDevMode ? [{ debugName: "direction" }] : []));
399
+ computedClass = computed(() => cardActionsVariants({
400
+ align: this.align(),
401
+ direction: this.direction(),
402
+ }), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
403
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });
404
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComCardActions, isStandalone: true, selector: "[comCardActions]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClass()" } }, exportAs: ["comCardActions"], ngImport: i0 });
405
+ }
406
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardActions, decorators: [{
407
+ type: Directive,
408
+ args: [{
409
+ selector: '[comCardActions]',
410
+ exportAs: 'comCardActions',
411
+ host: {
412
+ '[class]': 'computedClass()',
413
+ },
414
+ }]
415
+ }], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }] } });
416
+
417
+ /**
418
+ * Card media directive - image/video slot with aspect ratio handling.
419
+ *
420
+ * Apply to <img>, <video>, <picture>, or a wrapper <div>.
421
+ *
422
+ * @example Top media (bleeds to edge)
423
+ * ```html
424
+ * <img comCardMedia src="/hero.jpg" alt="Hero image" />
425
+ * ```
426
+ *
427
+ * @example Inset media (padded with rounded corners)
428
+ * ```html
429
+ * <img comCardMedia position="inset" src="/preview.jpg" alt="Preview" />
430
+ * ```
431
+ *
432
+ * @tokens None - uses only layout utilities
433
+ */
434
+ class ComCardMedia {
435
+ /** Media positioning within the card. */
436
+ position = input('top', ...(ngDevMode ? [{ debugName: "position" }] : []));
437
+ computedClass = computed(() => cardMediaVariants({ position: this.position() }), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
438
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardMedia, deps: [], target: i0.ɵɵFactoryTarget.Directive });
439
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComCardMedia, isStandalone: true, selector: "[comCardMedia]", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClass()" } }, exportAs: ["comCardMedia"], ngImport: i0 });
440
+ }
441
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardMedia, decorators: [{
442
+ type: Directive,
443
+ args: [{
444
+ selector: '[comCardMedia]',
445
+ exportAs: 'comCardMedia',
446
+ host: {
447
+ '[class]': 'computedClass()',
448
+ },
449
+ }]
450
+ }], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }] } });
451
+
452
+ /**
453
+ * Card divider directive - horizontal rule between card sections.
454
+ *
455
+ * @example Standard divider (with side margins)
456
+ * ```html
457
+ * <hr comCardDivider />
458
+ * ```
459
+ *
460
+ * @example Full-width divider (edge to edge)
461
+ * ```html
462
+ * <hr comCardDivider [inset]="true" />
463
+ * ```
464
+ *
465
+ * @tokens `--color-border`
466
+ */
467
+ class ComCardDivider {
468
+ /** When true, divider spans full card width (no horizontal margin). */
469
+ inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : {}), transform: booleanAttribute });
470
+ /** Consumer CSS classes. */
471
+ userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : {}), alias: 'class' });
472
+ computedClass = computed(() => mergeClasses('block border-t border-border', this.inset() ? 'mx-0' : 'mx-5', this.userClass()), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
473
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardDivider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
474
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComCardDivider, isStandalone: true, selector: "[comCardDivider]", inputs: { inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClass()" } }, exportAs: ["comCardDivider"], ngImport: i0 });
475
+ }
476
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardDivider, decorators: [{
477
+ type: Directive,
478
+ args: [{
479
+ selector: '[comCardDivider]',
480
+ exportAs: 'comCardDivider',
481
+ host: {
482
+ '[class]': 'computedClass()',
483
+ },
484
+ }]
485
+ }], propDecorators: { inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
486
+
487
+ /**
488
+ * Card accent directive - colored strip for status or category indication.
489
+ *
490
+ * Place as the first child of the card for top accent, or use position="left"
491
+ * for a left-edge strip (requires adding left padding to content).
492
+ *
493
+ * @tokens `--color-primary`, `--color-accent`, `--color-warn`, `--color-success`, `--color-muted`
494
+ *
495
+ * @example Top accent strip
496
+ * ```html
497
+ * <com-card>
498
+ * <div comCardAccent color="warn"></div>
499
+ * <div comCardContent>Warning content</div>
500
+ * </com-card>
501
+ * ```
502
+ *
503
+ * @example Left accent strip
504
+ * ```html
505
+ * <com-card>
506
+ * <div comCardAccent color="success" position="left"></div>
507
+ * <div comCardContent class="pl-5">Content with left padding</div>
508
+ * </com-card>
509
+ * ```
510
+ */
511
+ class ComCardAccent {
512
+ /** Accent color. */
513
+ color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : []));
514
+ /** Position of the accent strip. */
515
+ position = input('top', ...(ngDevMode ? [{ debugName: "position" }] : []));
516
+ computedClass = computed(() => cardAccentVariants({
517
+ color: this.color(),
518
+ position: this.position(),
519
+ }), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
520
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardAccent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
521
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComCardAccent, isStandalone: true, selector: "[comCardAccent]", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClass()" } }, exportAs: ["comCardAccent"], ngImport: i0 });
522
+ }
523
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardAccent, decorators: [{
524
+ type: Directive,
525
+ args: [{
526
+ selector: '[comCardAccent]',
527
+ exportAs: 'comCardAccent',
528
+ host: {
529
+ '[class]': 'computedClass()',
530
+ },
531
+ }]
532
+ }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }] } });
533
+
534
+ /**
535
+ * Card badge directive - positioned overlay for labels, tags, or status indicators.
536
+ *
537
+ * Floats over the card content (e.g., "NEW", "SALE", "Featured").
538
+ *
539
+ * @tokens `--color-primary`, `--color-primary-foreground`, `--color-accent`, `--color-accent-foreground`,
540
+ * `--color-warn`, `--color-warn-foreground`, `--color-success`, `--color-success-foreground`,
541
+ * `--color-muted`, `--color-muted-foreground`, `--radius-pill`
542
+ *
543
+ * @example Badge in top-right corner
544
+ * ```html
545
+ * <com-card>
546
+ * <span comCardBadge>NEW</span>
547
+ * <img comCardMedia src="/product.jpg" alt="Product" />
548
+ * </com-card>
549
+ * ```
550
+ *
551
+ * @example Badge with custom position and color
552
+ * ```html
553
+ * <com-card>
554
+ * <span comCardBadge position="top-left" color="warn">SALE</span>
555
+ * <div comCardContent>Product details</div>
556
+ * </com-card>
557
+ * ```
558
+ */
559
+ class ComCardBadge {
560
+ /** Badge position within the card. */
561
+ position = input('top-right', ...(ngDevMode ? [{ debugName: "position" }] : []));
562
+ /** Badge color. */
563
+ color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : []));
564
+ computedClass = computed(() => cardBadgeVariants({
565
+ position: this.position(),
566
+ color: this.color(),
567
+ }), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
568
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardBadge, deps: [], target: i0.ɵɵFactoryTarget.Directive });
569
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComCardBadge, isStandalone: true, selector: "[comCardBadge]", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClass()" } }, exportAs: ["comCardBadge"], ngImport: i0 });
570
+ }
571
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardBadge, decorators: [{
572
+ type: Directive,
573
+ args: [{
574
+ selector: '[comCardBadge]',
575
+ exportAs: 'comCardBadge',
576
+ host: {
577
+ '[class]': 'computedClass()',
578
+ },
579
+ }]
580
+ }], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
581
+
582
+ // Public API for the card component system
583
+ // Main component
584
+
585
+ /**
586
+ * Generated bundle index. Do not edit.
587
+ */
588
+
589
+ export { ComCard, ComCardAccent, ComCardActions, ComCardBadge, ComCardContent, ComCardDivider, ComCardFooter, ComCardHeader, ComCardMedia, ComCardSubtitle, ComCardTitle, cardAccentVariants, cardActionsVariants, cardBadgeVariants, cardFooterVariants, cardMediaVariants, cardVariants };
590
+ //# sourceMappingURL=ngx-com-components-card.mjs.map