ngx-com 0.1.10 → 0.1.11
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.
- package/fesm2022/ngx-com-components-card.mjs +56 -29
- package/fesm2022/ngx-com-components-card.mjs.map +1 -1
- package/fesm2022/ngx-com-components-dialog.mjs +58 -15
- package/fesm2022/ngx-com-components-dialog.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngx-com-components-card.d.ts +30 -13
- package/types/ngx-com-components-dialog.d.ts +49 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, booleanAttribute, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, output, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
|
|
3
3
|
import { mergeClasses } from 'ngx-com/utils';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
|
|
@@ -14,7 +14,7 @@ const cardVariants = cva('relative flex flex-col overflow-hidden', {
|
|
|
14
14
|
variant: {
|
|
15
15
|
elevated: 'bg-card text-card-foreground shadow-card',
|
|
16
16
|
outlined: 'bg-card text-card-foreground border border-border',
|
|
17
|
-
filled: 'bg-muted text-foreground',
|
|
17
|
+
filled: 'bg-muted text-muted-foreground',
|
|
18
18
|
ghost: 'bg-transparent text-foreground',
|
|
19
19
|
},
|
|
20
20
|
padding: {
|
|
@@ -31,7 +31,7 @@ const cardVariants = cva('relative flex flex-col overflow-hidden', {
|
|
|
31
31
|
xl: 'rounded-[var(--radius-xl)]',
|
|
32
32
|
},
|
|
33
33
|
interactive: {
|
|
34
|
-
true: 'cursor-pointer focus-visible:outline-[1px] focus-visible:outline-offset-2 focus-visible:outline-ring',
|
|
34
|
+
true: 'cursor-pointer outline-none focus-visible:outline-[1px] focus-visible:outline-offset-2 focus-visible:outline-ring',
|
|
35
35
|
false: '',
|
|
36
36
|
},
|
|
37
37
|
},
|
|
@@ -159,8 +159,8 @@ const cardBadgeVariants = cva('absolute z-10 inline-flex items-center rounded-pi
|
|
|
159
159
|
* The card is a pure container with no imposed structure.
|
|
160
160
|
* Use card directives (comCardHeader, comCardContent, etc.) to compose layouts.
|
|
161
161
|
*
|
|
162
|
-
* @tokens `--color-
|
|
163
|
-
* `--color-
|
|
162
|
+
* @tokens `--color-card`, `--color-card-foreground`, `--color-muted`, `--color-muted-foreground`,
|
|
163
|
+
* `--color-muted-hover`, `--color-border`, `--color-primary`, `--color-ring`, `--shadow-card`
|
|
164
164
|
*
|
|
165
165
|
* @example Basic card
|
|
166
166
|
* ```html
|
|
@@ -194,14 +194,23 @@ class ComCard {
|
|
|
194
194
|
interactive = input(false, { ...(ngDevMode ? { debugName: "interactive" } : {}), transform: booleanAttribute });
|
|
195
195
|
/** Consumer CSS classes - merged with variant classes. */
|
|
196
196
|
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : {}), alias: 'class' });
|
|
197
|
+
/** Emitted when an interactive card is activated via keyboard (Enter or Space). */
|
|
198
|
+
cardActivated = output();
|
|
197
199
|
computedClass = computed(() => mergeClasses(cardVariants({
|
|
198
200
|
variant: this.variant(),
|
|
199
201
|
padding: this.padding(),
|
|
200
202
|
radius: this.radius(),
|
|
201
203
|
interactive: this.interactive(),
|
|
202
204
|
}), this.userClass()), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
|
|
205
|
+
// SSR-safe: only called from user interaction handlers
|
|
206
|
+
onKeyActivate(event) {
|
|
207
|
+
if (!this.interactive())
|
|
208
|
+
return;
|
|
209
|
+
event.preventDefault();
|
|
210
|
+
this.cardActivated.emit();
|
|
211
|
+
}
|
|
203
212
|
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 });
|
|
213
|
+
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 } }, outputs: { cardActivated: "cardActivated" }, host: { listeners: { "keydown.enter": "onKeyActivate($event)", "keydown.space": "onKeyActivate($event)" }, properties: { "class": "computedClass()", "attr.tabindex": "interactive() ? 0 : null", "attr.role": "interactive() ? \"button\" : null" } }, exportAs: ["comCard"], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
205
214
|
}
|
|
206
215
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCard, decorators: [{
|
|
207
216
|
type: Component,
|
|
@@ -213,24 +222,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
213
222
|
encapsulation: ViewEncapsulation.None,
|
|
214
223
|
host: {
|
|
215
224
|
'[class]': 'computedClass()',
|
|
225
|
+
'[attr.tabindex]': 'interactive() ? 0 : null',
|
|
226
|
+
'[attr.role]': 'interactive() ? "button" : null',
|
|
227
|
+
'(keydown.enter)': 'onKeyActivate($event)',
|
|
228
|
+
'(keydown.space)': 'onKeyActivate($event)',
|
|
216
229
|
},
|
|
217
230
|
}]
|
|
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 }] }] } });
|
|
231
|
+
}], 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 }] }], cardActivated: [{ type: i0.Output, args: ["cardActivated"] }] } });
|
|
219
232
|
|
|
220
233
|
/**
|
|
221
234
|
* Card header directive - top section for title and actions.
|
|
222
235
|
*
|
|
223
|
-
* Uses justify-between so it naturally supports a title group
|
|
224
|
-
* and an action element (icon button, menu trigger) on the right.
|
|
236
|
+
* Uses `flex` with `justify-between` so it naturally supports a title group
|
|
237
|
+
* on the left and an action element (icon button, menu trigger) on the right.
|
|
225
238
|
*
|
|
226
|
-
*
|
|
239
|
+
* **Important:** When using both `comCardTitle` and `comCardSubtitle`,
|
|
240
|
+
* wrap them in a container `<div>` so they stack vertically as a single
|
|
241
|
+
* flex child. Without the wrapper, `justify-between` will push them apart.
|
|
242
|
+
*
|
|
243
|
+
* @example Header with title only
|
|
227
244
|
* ```html
|
|
228
245
|
* <div comCardHeader>
|
|
229
246
|
* <h3 comCardTitle>Card Title</h3>
|
|
230
247
|
* </div>
|
|
231
248
|
* ```
|
|
232
249
|
*
|
|
233
|
-
* @example Header with title and action
|
|
250
|
+
* @example Header with title, subtitle, and action
|
|
234
251
|
* ```html
|
|
235
252
|
* <div comCardHeader>
|
|
236
253
|
* <div>
|
|
@@ -353,9 +370,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
353
370
|
class ComCardFooter {
|
|
354
371
|
/** Horizontal alignment of footer content. */
|
|
355
372
|
align = input('end', ...(ngDevMode ? [{ debugName: "align" }] : []));
|
|
356
|
-
|
|
373
|
+
/** Consumer CSS classes - merged with variant classes. */
|
|
374
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : {}), alias: 'class' });
|
|
375
|
+
computedClass = computed(() => mergeClasses(cardFooterVariants({ align: this.align() }), this.userClass()), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
|
|
357
376
|
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 });
|
|
377
|
+
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 }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClass()" } }, exportAs: ["comCardFooter"], ngImport: i0 });
|
|
359
378
|
}
|
|
360
379
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardFooter, decorators: [{
|
|
361
380
|
type: Directive,
|
|
@@ -366,7 +385,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
366
385
|
'[class]': 'computedClass()',
|
|
367
386
|
},
|
|
368
387
|
}]
|
|
369
|
-
}], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }] } });
|
|
388
|
+
}], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
370
389
|
|
|
371
390
|
/**
|
|
372
391
|
* Card actions directive - dedicated button row for primary card actions.
|
|
@@ -396,12 +415,14 @@ class ComCardActions {
|
|
|
396
415
|
align = input('end', ...(ngDevMode ? [{ debugName: "align" }] : []));
|
|
397
416
|
/** Layout direction - row or column. */
|
|
398
417
|
direction = input('row', ...(ngDevMode ? [{ debugName: "direction" }] : []));
|
|
399
|
-
|
|
418
|
+
/** Consumer CSS classes - merged with variant classes. */
|
|
419
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : {}), alias: 'class' });
|
|
420
|
+
computedClass = computed(() => mergeClasses(cardActionsVariants({
|
|
400
421
|
align: this.align(),
|
|
401
422
|
direction: this.direction(),
|
|
402
|
-
}), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
|
|
423
|
+
}), this.userClass()), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
|
|
403
424
|
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 });
|
|
425
|
+
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 }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClass()" } }, exportAs: ["comCardActions"], ngImport: i0 });
|
|
405
426
|
}
|
|
406
427
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardActions, decorators: [{
|
|
407
428
|
type: Directive,
|
|
@@ -412,7 +433,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
412
433
|
'[class]': 'computedClass()',
|
|
413
434
|
},
|
|
414
435
|
}]
|
|
415
|
-
}], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }] } });
|
|
436
|
+
}], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
416
437
|
|
|
417
438
|
/**
|
|
418
439
|
* Card media directive - image/video slot with aspect ratio handling.
|
|
@@ -434,9 +455,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
434
455
|
class ComCardMedia {
|
|
435
456
|
/** Media positioning within the card. */
|
|
436
457
|
position = input('top', ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
437
|
-
|
|
458
|
+
/** Consumer CSS classes - merged with variant classes. */
|
|
459
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : {}), alias: 'class' });
|
|
460
|
+
computedClass = computed(() => mergeClasses(cardMediaVariants({ position: this.position() }), this.userClass()), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
|
|
438
461
|
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 });
|
|
462
|
+
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 }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClass()" } }, exportAs: ["comCardMedia"], ngImport: i0 });
|
|
440
463
|
}
|
|
441
464
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardMedia, decorators: [{
|
|
442
465
|
type: Directive,
|
|
@@ -447,7 +470,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
447
470
|
'[class]': 'computedClass()',
|
|
448
471
|
},
|
|
449
472
|
}]
|
|
450
|
-
}], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }] } });
|
|
473
|
+
}], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
451
474
|
|
|
452
475
|
/**
|
|
453
476
|
* Card divider directive - horizontal rule between card sections.
|
|
@@ -513,12 +536,14 @@ class ComCardAccent {
|
|
|
513
536
|
color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
514
537
|
/** Position of the accent strip. */
|
|
515
538
|
position = input('top', ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
516
|
-
|
|
539
|
+
/** Consumer CSS classes - merged with variant classes. */
|
|
540
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : {}), alias: 'class' });
|
|
541
|
+
computedClass = computed(() => mergeClasses(cardAccentVariants({
|
|
517
542
|
color: this.color(),
|
|
518
543
|
position: this.position(),
|
|
519
|
-
}), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
|
|
544
|
+
}), this.userClass()), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
|
|
520
545
|
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 });
|
|
546
|
+
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 }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClass()" } }, exportAs: ["comCardAccent"], ngImport: i0 });
|
|
522
547
|
}
|
|
523
548
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardAccent, decorators: [{
|
|
524
549
|
type: Directive,
|
|
@@ -529,7 +554,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
529
554
|
'[class]': 'computedClass()',
|
|
530
555
|
},
|
|
531
556
|
}]
|
|
532
|
-
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }] } });
|
|
557
|
+
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
533
558
|
|
|
534
559
|
/**
|
|
535
560
|
* Card badge directive - positioned overlay for labels, tags, or status indicators.
|
|
@@ -561,12 +586,14 @@ class ComCardBadge {
|
|
|
561
586
|
position = input('top-right', ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
562
587
|
/** Badge color. */
|
|
563
588
|
color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
564
|
-
|
|
589
|
+
/** Consumer CSS classes - merged with variant classes. */
|
|
590
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : {}), alias: 'class' });
|
|
591
|
+
computedClass = computed(() => mergeClasses(cardBadgeVariants({
|
|
565
592
|
position: this.position(),
|
|
566
593
|
color: this.color(),
|
|
567
|
-
}), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
|
|
594
|
+
}), this.userClass()), ...(ngDevMode ? [{ debugName: "computedClass" }] : []));
|
|
568
595
|
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 });
|
|
596
|
+
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 }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClass()" } }, exportAs: ["comCardBadge"], ngImport: i0 });
|
|
570
597
|
}
|
|
571
598
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComCardBadge, decorators: [{
|
|
572
599
|
type: Directive,
|
|
@@ -577,7 +604,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
577
604
|
'[class]': 'computedClass()',
|
|
578
605
|
},
|
|
579
606
|
}]
|
|
580
|
-
}], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
|
|
607
|
+
}], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
581
608
|
|
|
582
609
|
// Public API for the card component system
|
|
583
610
|
// Main component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-com-components-card.mjs","sources":["../../../projects/com/components/card/card.variants.ts","../../../projects/com/components/card/card.component.ts","../../../projects/com/components/card/card-header.directive.ts","../../../projects/com/components/card/card-title.directive.ts","../../../projects/com/components/card/card-subtitle.directive.ts","../../../projects/com/components/card/card-content.directive.ts","../../../projects/com/components/card/card-footer.directive.ts","../../../projects/com/components/card/card-actions.directive.ts","../../../projects/com/components/card/card-media.directive.ts","../../../projects/com/components/card/card-divider.directive.ts","../../../projects/com/components/card/card-accent.directive.ts","../../../projects/com/components/card/card-badge.directive.ts","../../../projects/com/components/card/index.ts","../../../projects/com/components/card/ngx-com-components-card.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\n// Card container types\nexport type CardVariant = 'elevated' | 'outlined' | 'filled' | 'ghost';\nexport type CardPadding = 'none' | 'sm' | 'md' | 'lg';\nexport type CardRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl';\n\n// Card footer / actions alignment\nexport type CardAlign = 'start' | 'end' | 'center' | 'between';\n\n// Card actions direction\nexport type CardActionsDirection = 'row' | 'column';\n\n// Card media position\nexport type CardMediaPosition = 'top' | 'bottom' | 'inset';\n\n// Card accent types\nexport type CardAccentColor = 'primary' | 'accent' | 'warn' | 'success' | 'muted';\nexport type CardAccentPosition = 'top' | 'left';\n\n// Card badge types\nexport type CardBadgeColor = 'primary' | 'accent' | 'warn' | 'success' | 'muted';\nexport type CardBadgePosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n\n/**\n * CVA variants for the card container.\n *\n * @tokens `--color-card`, `--color-card-foreground`, `--color-muted`, `--color-muted-hover`,\n * `--color-foreground`, `--color-border`, `--color-primary`, `--color-ring`, `--shadow-card`\n */\nexport const cardVariants: (props?: {\n variant?: CardVariant;\n padding?: CardPadding;\n radius?: CardRadius;\n interactive?: boolean;\n}) => string = cva('relative flex flex-col overflow-hidden', {\n variants: {\n variant: {\n elevated: 'bg-card text-card-foreground shadow-card',\n outlined: 'bg-card text-card-foreground border border-border',\n filled: 'bg-muted text-foreground',\n ghost: 'bg-transparent text-foreground',\n },\n padding: {\n none: '',\n sm: 'p-3',\n md: 'p-5',\n lg: 'p-7',\n },\n radius: {\n none: 'rounded-none',\n sm: 'rounded-[var(--radius-sm)]',\n md: 'rounded-[var(--radius-md)]',\n lg: 'rounded-card',\n xl: 'rounded-[var(--radius-xl)]',\n },\n interactive: {\n true: 'cursor-pointer focus-visible:outline-[1px] focus-visible:outline-offset-2 focus-visible:outline-ring',\n false: '',\n },\n },\n compoundVariants: [\n { interactive: true, variant: 'elevated', class: 'hover:shadow-lg active:shadow-sm transition-shadow duration-normal' },\n { interactive: true, variant: 'outlined', class: 'hover:border-primary hover:shadow-sm transition-all duration-normal' },\n { interactive: true, variant: 'filled', class: 'hover:bg-muted-hover transition-colors duration-normal' },\n { interactive: true, variant: 'ghost', class: 'hover:bg-muted transition-colors duration-normal' },\n ],\n defaultVariants: {\n variant: 'elevated',\n padding: 'none',\n radius: 'lg',\n interactive: false,\n },\n});\n\nexport type CardVariants = VariantProps<typeof cardVariants>;\n\n/**\n * CVA variants for card footer alignment.\n */\nexport const cardFooterVariants: (props?: {\n align?: CardAlign;\n}) => string = cva('flex items-center gap-2 px-5 pt-0 pb-5', {\n variants: {\n align: {\n start: 'justify-start',\n end: 'justify-end',\n center: 'justify-center',\n between: 'justify-between',\n },\n },\n defaultVariants: {\n align: 'end',\n },\n});\n\nexport type CardFooterVariants = VariantProps<typeof cardFooterVariants>;\n\n/**\n * CVA variants for card actions.\n */\nexport const cardActionsVariants: (props?: {\n align?: CardAlign;\n direction?: CardActionsDirection;\n}) => string = cva('flex gap-2 px-5 py-3', {\n variants: {\n align: {\n start: 'justify-start',\n end: 'justify-end',\n center: 'justify-center',\n between: 'justify-between',\n },\n direction: {\n row: 'flex-row items-center',\n column: 'flex-col items-stretch',\n },\n },\n defaultVariants: {\n align: 'end',\n direction: 'row',\n },\n});\n\nexport type CardActionsVariants = VariantProps<typeof cardActionsVariants>;\n\n/**\n * CVA variants for card media positioning.\n */\nexport const cardMediaVariants: (props?: {\n position?: CardMediaPosition;\n}) => string = cva('block w-full overflow-hidden object-cover', {\n variants: {\n position: {\n top: '',\n bottom: '',\n inset: 'mx-5 mt-5 rounded-media',\n },\n },\n defaultVariants: {\n position: 'top',\n },\n});\n\nexport type CardMediaVariants = VariantProps<typeof cardMediaVariants>;\n\n/**\n * CVA variants for card accent strip.\n *\n * @tokens `--color-primary`, `--color-accent`, `--color-warn`, `--color-success`, `--color-muted`\n */\nexport const cardAccentVariants: (props?: {\n color?: CardAccentColor;\n position?: CardAccentPosition;\n}) => string = cva('block shrink-0', {\n variants: {\n color: {\n primary: 'bg-primary',\n accent: 'bg-accent',\n warn: 'bg-warn',\n success: 'bg-success',\n muted: 'bg-muted',\n },\n position: {\n top: 'h-1 w-full',\n left: 'w-1 h-full absolute left-0 top-0',\n },\n },\n defaultVariants: {\n color: 'primary',\n position: 'top',\n },\n});\n\nexport type CardAccentVariants = VariantProps<typeof cardAccentVariants>;\n\n/**\n * CVA variants for card badge overlay.\n *\n * @tokens `--color-primary`, `--color-primary-foreground`, `--color-accent`, `--color-accent-foreground`,\n * `--color-warn`, `--color-warn-foreground`, `--color-success`, `--color-success-foreground`,\n * `--color-muted`, `--color-muted-foreground`, `--radius-card`, `--radius-media`, `--radius-pill`\n */\nexport const cardBadgeVariants: (props?: {\n position?: CardBadgePosition;\n color?: CardBadgeColor;\n}) => string = cva(\n 'absolute z-10 inline-flex items-center rounded-pill px-2.5 py-0.5 text-xs font-semibold',\n {\n variants: {\n position: {\n 'top-left': 'top-3 left-3',\n 'top-right': 'top-3 right-3',\n 'bottom-left': 'bottom-3 left-3',\n 'bottom-right': 'bottom-3 right-3',\n },\n color: {\n primary: 'bg-primary text-primary-foreground',\n accent: 'bg-accent text-accent-foreground',\n warn: 'bg-warn text-warn-foreground',\n success: 'bg-success text-success-foreground',\n muted: 'bg-muted text-muted-foreground',\n },\n },\n defaultVariants: {\n position: 'top-right',\n color: 'primary',\n },\n }\n);\n\nexport type CardBadgeVariants = VariantProps<typeof cardBadgeVariants>;\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { InputSignal, InputSignalWithTransform, Signal } from '@angular/core';\nimport { mergeClasses } from './card.utils';\nimport { cardVariants } from './card.variants';\nimport type { CardVariant, CardPadding, CardRadius } from './card.variants';\n\n/**\n * Card container component - a styled surface for content.\n *\n * The card is a pure container with no imposed structure.\n * Use card directives (comCardHeader, comCardContent, etc.) to compose layouts.\n *\n * @tokens `--color-popover`, `--color-popover-foreground`, `--color-muted`, `--color-muted-hover`,\n * `--color-foreground`, `--color-border`, `--color-primary`, `--color-ring`\n *\n * @example Basic card\n * ```html\n * <com-card>\n * <div comCardContent>Simple content</div>\n * </com-card>\n * ```\n *\n * @example Interactive card\n * ```html\n * <com-card [interactive]=\"true\" (click)=\"onCardClick()\">\n * <div comCardContent>Clickable card</div>\n * </com-card>\n * ```\n *\n * @example Outlined variant with custom padding\n * ```html\n * <com-card variant=\"outlined\" padding=\"md\">\n * <p>Outlined card with medium padding</p>\n * </com-card>\n * ```\n */\n@Component({\n selector: 'com-card',\n exportAs: 'comCard',\n template: `<ng-content />`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'computedClass()',\n },\n})\nexport class ComCard {\n /** Visual treatment of the card surface. */\n readonly variant: InputSignal<CardVariant> = input<CardVariant>('elevated');\n\n /** Inner spacing. Default 'none' - sub-parts manage their own padding. */\n readonly padding: InputSignal<CardPadding> = input<CardPadding>('none');\n\n /** Border radius. */\n readonly radius: InputSignal<CardRadius> = input<CardRadius>('lg');\n\n /** When true, adds hover/active states and cursor-pointer. */\n readonly interactive: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n /** Consumer CSS classes - merged with variant classes. */\n readonly userClass: InputSignal<string> = input<string>('', { alias: 'class' });\n\n protected readonly computedClass: Signal<string> = computed(() =>\n mergeClasses(\n cardVariants({\n variant: this.variant(),\n padding: this.padding(),\n radius: this.radius(),\n interactive: this.interactive(),\n }),\n this.userClass()\n )\n );\n}\n","import { Directive } from '@angular/core';\n\n/**\n * Card header directive - top section for title and actions.\n *\n * Uses justify-between so it naturally supports a title group on the left\n * and an action element (icon button, menu trigger) on the right.\n *\n * @example Header with title\n * ```html\n * <div comCardHeader>\n * <h3 comCardTitle>Card Title</h3>\n * </div>\n * ```\n *\n * @example Header with title and action\n * ```html\n * <div comCardHeader>\n * <div>\n * <h3 comCardTitle>Title</h3>\n * <p comCardSubtitle>Subtitle</p>\n * </div>\n * <button comButton variant=\"ghost\" size=\"icon\" aria-label=\"More\">...</button>\n * </div>\n * ```\n *\n * @tokens None - uses only layout utilities\n */\n@Directive({\n selector: '[comCardHeader]',\n exportAs: 'comCardHeader',\n host: {\n class: 'flex items-start justify-between gap-3 px-5 pt-5 pb-0',\n },\n})\nexport class ComCardHeader {}\n","import { Directive } from '@angular/core';\n\n/**\n * Card title directive - styled heading text.\n *\n * Apply to any heading element. Consumer picks the semantic level (h2, h3, etc.).\n *\n * @example\n * ```html\n * <h3 comCardTitle>Project Alpha</h3>\n * ```\n *\n * @tokens `--color-foreground`\n */\n@Directive({\n selector: '[comCardTitle]',\n exportAs: 'comCardTitle',\n host: {\n class: 'font-heading text-lg font-semibold tracking-tight text-foreground',\n },\n})\nexport class ComCardTitle {}\n","import { Directive } from '@angular/core';\n\n/**\n * Card subtitle directive - secondary text styling.\n *\n * @example\n * ```html\n * <p comCardSubtitle>Last updated 2 hours ago</p>\n * ```\n *\n * @tokens `--color-muted-foreground`\n */\n@Directive({\n selector: '[comCardSubtitle]',\n exportAs: 'comCardSubtitle',\n host: {\n class: 'text-sm text-muted-foreground',\n },\n})\nexport class ComCardSubtitle {}\n","import { Directive } from '@angular/core';\n\n/**\n * Card content directive - main body area with consistent padding.\n *\n * @example\n * ```html\n * <div comCardContent>\n * <p>Card body content goes here.</p>\n * </div>\n * ```\n *\n * @tokens None - uses only layout utilities\n */\n@Directive({\n selector: '[comCardContent]',\n exportAs: 'comCardContent',\n host: {\n class: 'flex-1 px-5 py-4 text-sm',\n },\n})\nexport class ComCardContent {}\n","import { computed, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { cardFooterVariants } from './card.variants';\nimport type { CardAlign } from './card.variants';\n\n/**\n * Card footer directive - bottom section for metadata or secondary actions.\n *\n * @example Footer with alignment\n * ```html\n * <div comCardFooter align=\"between\">\n * <span class=\"text-sm text-muted-foreground\">Updated 3m ago</span>\n * <a comButton variant=\"link\" size=\"sm\">View details</a>\n * </div>\n * ```\n *\n * @tokens None - uses only layout utilities\n */\n@Directive({\n selector: '[comCardFooter]',\n exportAs: 'comCardFooter',\n host: {\n '[class]': 'computedClass()',\n },\n})\nexport class ComCardFooter {\n /** Horizontal alignment of footer content. */\n readonly align: InputSignal<CardAlign> = input<CardAlign>('end');\n\n protected readonly computedClass: Signal<string> = computed(() =>\n cardFooterVariants({ align: this.align() })\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { cardActionsVariants } from './card.variants';\nimport type { CardAlign, CardActionsDirection } from './card.variants';\n\n/**\n * Card actions directive - dedicated button row for primary card actions.\n *\n * Separate from footer because actions and footer metadata serve different purposes.\n *\n * @example Actions with alignment\n * ```html\n * <div comCardActions>\n * <button comButton variant=\"ghost\" size=\"sm\">Cancel</button>\n * <button comButton size=\"sm\">Confirm</button>\n * </div>\n * ```\n *\n * @example Stacked column layout\n * ```html\n * <div comCardActions direction=\"column\" align=\"start\">\n * <button comButton fullWidth>Primary Action</button>\n * <button comButton variant=\"outline\" fullWidth>Secondary</button>\n * </div>\n * ```\n *\n * @tokens None - uses only layout utilities\n */\n@Directive({\n selector: '[comCardActions]',\n exportAs: 'comCardActions',\n host: {\n '[class]': 'computedClass()',\n },\n})\nexport class ComCardActions {\n /** Horizontal alignment of actions. */\n readonly align: InputSignal<CardAlign> = input<CardAlign>('end');\n\n /** Layout direction - row or column. */\n readonly direction: InputSignal<CardActionsDirection> = input<CardActionsDirection>('row');\n\n protected readonly computedClass: Signal<string> = computed(() =>\n cardActionsVariants({\n align: this.align(),\n direction: this.direction(),\n })\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { cardMediaVariants } from './card.variants';\nimport type { CardMediaPosition } from './card.variants';\n\n/**\n * Card media directive - image/video slot with aspect ratio handling.\n *\n * Apply to <img>, <video>, <picture>, or a wrapper <div>.\n *\n * @example Top media (bleeds to edge)\n * ```html\n * <img comCardMedia src=\"/hero.jpg\" alt=\"Hero image\" />\n * ```\n *\n * @example Inset media (padded with rounded corners)\n * ```html\n * <img comCardMedia position=\"inset\" src=\"/preview.jpg\" alt=\"Preview\" />\n * ```\n *\n * @tokens None - uses only layout utilities\n */\n@Directive({\n selector: '[comCardMedia]',\n exportAs: 'comCardMedia',\n host: {\n '[class]': 'computedClass()',\n },\n})\nexport class ComCardMedia {\n /** Media positioning within the card. */\n readonly position: InputSignal<CardMediaPosition> = input<CardMediaPosition>('top');\n\n protected readonly computedClass: Signal<string> = computed(() =>\n cardMediaVariants({ position: this.position() })\n );\n}\n","import { booleanAttribute, computed, Directive, input } from '@angular/core';\nimport type { InputSignal, InputSignalWithTransform, Signal } from '@angular/core';\nimport { mergeClasses } from './card.utils';\n\n/**\n * Card divider directive - horizontal rule between card sections.\n *\n * @example Standard divider (with side margins)\n * ```html\n * <hr comCardDivider />\n * ```\n *\n * @example Full-width divider (edge to edge)\n * ```html\n * <hr comCardDivider [inset]=\"true\" />\n * ```\n *\n * @tokens `--color-border`\n */\n@Directive({\n selector: '[comCardDivider]',\n exportAs: 'comCardDivider',\n host: {\n '[class]': 'computedClass()',\n },\n})\nexport class ComCardDivider {\n /** When true, divider spans full card width (no horizontal margin). */\n readonly inset: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n /** Consumer CSS classes. */\n readonly userClass: InputSignal<string> = input<string>('', { alias: 'class' });\n\n protected readonly computedClass: Signal<string> = computed(() =>\n mergeClasses(\n 'block border-t border-border',\n this.inset() ? 'mx-0' : 'mx-5',\n this.userClass()\n )\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { cardAccentVariants } from './card.variants';\nimport type { CardAccentColor, CardAccentPosition } from './card.variants';\n\n/**\n * Card accent directive - colored strip for status or category indication.\n *\n * Place as the first child of the card for top accent, or use position=\"left\"\n * for a left-edge strip (requires adding left padding to content).\n *\n * @tokens `--color-primary`, `--color-accent`, `--color-warn`, `--color-success`, `--color-muted`\n *\n * @example Top accent strip\n * ```html\n * <com-card>\n * <div comCardAccent color=\"warn\"></div>\n * <div comCardContent>Warning content</div>\n * </com-card>\n * ```\n *\n * @example Left accent strip\n * ```html\n * <com-card>\n * <div comCardAccent color=\"success\" position=\"left\"></div>\n * <div comCardContent class=\"pl-5\">Content with left padding</div>\n * </com-card>\n * ```\n */\n@Directive({\n selector: '[comCardAccent]',\n exportAs: 'comCardAccent',\n host: {\n '[class]': 'computedClass()',\n },\n})\nexport class ComCardAccent {\n /** Accent color. */\n readonly color: InputSignal<CardAccentColor> = input<CardAccentColor>('primary');\n\n /** Position of the accent strip. */\n readonly position: InputSignal<CardAccentPosition> = input<CardAccentPosition>('top');\n\n protected readonly computedClass: Signal<string> = computed(() =>\n cardAccentVariants({\n color: this.color(),\n position: this.position(),\n })\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { cardBadgeVariants } from './card.variants';\nimport type { CardBadgeColor, CardBadgePosition } from './card.variants';\n\n/**\n * Card badge directive - positioned overlay for labels, tags, or status indicators.\n *\n * Floats over the card content (e.g., \"NEW\", \"SALE\", \"Featured\").\n *\n * @tokens `--color-primary`, `--color-primary-foreground`, `--color-accent`, `--color-accent-foreground`,\n * `--color-warn`, `--color-warn-foreground`, `--color-success`, `--color-success-foreground`,\n * `--color-muted`, `--color-muted-foreground`, `--radius-pill`\n *\n * @example Badge in top-right corner\n * ```html\n * <com-card>\n * <span comCardBadge>NEW</span>\n * <img comCardMedia src=\"/product.jpg\" alt=\"Product\" />\n * </com-card>\n * ```\n *\n * @example Badge with custom position and color\n * ```html\n * <com-card>\n * <span comCardBadge position=\"top-left\" color=\"warn\">SALE</span>\n * <div comCardContent>Product details</div>\n * </com-card>\n * ```\n */\n@Directive({\n selector: '[comCardBadge]',\n exportAs: 'comCardBadge',\n host: {\n '[class]': 'computedClass()',\n },\n})\nexport class ComCardBadge {\n /** Badge position within the card. */\n readonly position: InputSignal<CardBadgePosition> = input<CardBadgePosition>('top-right');\n\n /** Badge color. */\n readonly color: InputSignal<CardBadgeColor> = input<CardBadgeColor>('primary');\n\n protected readonly computedClass: Signal<string> = computed(() =>\n cardBadgeVariants({\n position: this.position(),\n color: this.color(),\n })\n );\n}\n","// Public API for the card component system\n\n// Main component\nexport { ComCard } from './card.component';\n\n// Directives\nexport { ComCardHeader } from './card-header.directive';\nexport { ComCardTitle } from './card-title.directive';\nexport { ComCardSubtitle } from './card-subtitle.directive';\nexport { ComCardContent } from './card-content.directive';\nexport { ComCardFooter } from './card-footer.directive';\nexport { ComCardActions } from './card-actions.directive';\nexport { ComCardMedia } from './card-media.directive';\nexport { ComCardDivider } from './card-divider.directive';\nexport { ComCardAccent } from './card-accent.directive';\nexport { ComCardBadge } from './card-badge.directive';\n\n// Variants (for advanced customization)\nexport {\n cardVariants,\n cardFooterVariants,\n cardActionsVariants,\n cardMediaVariants,\n cardAccentVariants,\n cardBadgeVariants,\n} from './card.variants';\n\nexport type {\n CardVariant,\n CardPadding,\n CardRadius,\n CardAlign,\n CardActionsDirection,\n CardMediaPosition,\n CardAccentColor,\n CardAccentPosition,\n CardBadgeColor,\n CardBadgePosition,\n CardVariants,\n CardFooterVariants,\n CardActionsVariants,\n CardMediaVariants,\n CardAccentVariants,\n CardBadgeVariants,\n} from './card.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAwBA;;;;;AAKG;AACI,MAAM,YAAY,GAKV,GAAG,CAAC,wCAAwC,EAAE;AAC3D,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,QAAQ,EAAE,0CAA0C;AACpD,YAAA,QAAQ,EAAE,mDAAmD;AAC7D,YAAA,MAAM,EAAE,0BAA0B;AAClC,YAAA,KAAK,EAAE,gCAAgC;AACxC,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,EAAE;AACR,YAAA,EAAE,EAAE,KAAK;AACT,YAAA,EAAE,EAAE,KAAK;AACT,YAAA,EAAE,EAAE,KAAK;AACV,SAAA;AACD,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,cAAc;AACpB,YAAA,EAAE,EAAE,4BAA4B;AAChC,YAAA,EAAE,EAAE,4BAA4B;AAChC,YAAA,EAAE,EAAE,cAAc;AAClB,YAAA,EAAE,EAAE,4BAA4B;AACjC,SAAA;AACD,QAAA,WAAW,EAAE;AACX,YAAA,IAAI,EAAE,sGAAsG;AAC5G,YAAA,KAAK,EAAE,EAAE;AACV,SAAA;AACF,KAAA;AACD,IAAA,gBAAgB,EAAE;QAChB,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,UA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CAAA,SAAA,EAAA,CAAA;2FAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,iBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAPxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,iBAAiB;AAC7B,qBAAA;AACF,iBAAA;;;ACpCD;AAEA;;ACFA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-com-components-card.mjs","sources":["../../../projects/com/components/card/card.variants.ts","../../../projects/com/components/card/card.component.ts","../../../projects/com/components/card/card-header.directive.ts","../../../projects/com/components/card/card-title.directive.ts","../../../projects/com/components/card/card-subtitle.directive.ts","../../../projects/com/components/card/card-content.directive.ts","../../../projects/com/components/card/card-footer.directive.ts","../../../projects/com/components/card/card-actions.directive.ts","../../../projects/com/components/card/card-media.directive.ts","../../../projects/com/components/card/card-divider.directive.ts","../../../projects/com/components/card/card-accent.directive.ts","../../../projects/com/components/card/card-badge.directive.ts","../../../projects/com/components/card/index.ts","../../../projects/com/components/card/ngx-com-components-card.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\n// Card container types\nexport type CardVariant = 'elevated' | 'outlined' | 'filled' | 'ghost';\nexport type CardPadding = 'none' | 'sm' | 'md' | 'lg';\nexport type CardRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl';\n\n// Card footer / actions alignment\nexport type CardAlign = 'start' | 'end' | 'center' | 'between';\n\n// Card actions direction\nexport type CardActionsDirection = 'row' | 'column';\n\n// Card media position\nexport type CardMediaPosition = 'top' | 'bottom' | 'inset';\n\n// Card accent types\nexport type CardAccentColor = 'primary' | 'accent' | 'warn' | 'success' | 'muted';\nexport type CardAccentPosition = 'top' | 'left';\n\n// Card badge types\nexport type CardBadgeColor = 'primary' | 'accent' | 'warn' | 'success' | 'muted';\nexport type CardBadgePosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n\n/**\n * CVA variants for the card container.\n *\n * @tokens `--color-card`, `--color-card-foreground`, `--color-muted`, `--color-muted-hover`,\n * `--color-foreground`, `--color-border`, `--color-primary`, `--color-ring`, `--shadow-card`\n */\nexport const cardVariants: (props?: {\n variant?: CardVariant;\n padding?: CardPadding;\n radius?: CardRadius;\n interactive?: boolean;\n}) => string = cva('relative flex flex-col overflow-hidden', {\n variants: {\n variant: {\n elevated: 'bg-card text-card-foreground shadow-card',\n outlined: 'bg-card text-card-foreground border border-border',\n filled: 'bg-muted text-muted-foreground',\n ghost: 'bg-transparent text-foreground',\n },\n padding: {\n none: '',\n sm: 'p-3',\n md: 'p-5',\n lg: 'p-7',\n },\n radius: {\n none: 'rounded-none',\n sm: 'rounded-[var(--radius-sm)]',\n md: 'rounded-[var(--radius-md)]',\n lg: 'rounded-card',\n xl: 'rounded-[var(--radius-xl)]',\n },\n interactive: {\n true: 'cursor-pointer outline-none focus-visible:outline-[1px] focus-visible:outline-offset-2 focus-visible:outline-ring',\n false: '',\n },\n },\n compoundVariants: [\n { interactive: true, variant: 'elevated', class: 'hover:shadow-lg active:shadow-sm transition-shadow duration-normal' },\n { interactive: true, variant: 'outlined', class: 'hover:border-primary hover:shadow-sm transition-all duration-normal' },\n { interactive: true, variant: 'filled', class: 'hover:bg-muted-hover transition-colors duration-normal' },\n { interactive: true, variant: 'ghost', class: 'hover:bg-muted transition-colors duration-normal' },\n ],\n defaultVariants: {\n variant: 'elevated',\n padding: 'none',\n radius: 'lg',\n interactive: false,\n },\n});\n\nexport type CardVariants = VariantProps<typeof cardVariants>;\n\n/**\n * CVA variants for card footer alignment.\n */\nexport const cardFooterVariants: (props?: {\n align?: CardAlign;\n}) => string = cva('flex items-center gap-2 px-5 pt-0 pb-5', {\n variants: {\n align: {\n start: 'justify-start',\n end: 'justify-end',\n center: 'justify-center',\n between: 'justify-between',\n },\n },\n defaultVariants: {\n align: 'end',\n },\n});\n\nexport type CardFooterVariants = VariantProps<typeof cardFooterVariants>;\n\n/**\n * CVA variants for card actions.\n */\nexport const cardActionsVariants: (props?: {\n align?: CardAlign;\n direction?: CardActionsDirection;\n}) => string = cva('flex gap-2 px-5 py-3', {\n variants: {\n align: {\n start: 'justify-start',\n end: 'justify-end',\n center: 'justify-center',\n between: 'justify-between',\n },\n direction: {\n row: 'flex-row items-center',\n column: 'flex-col items-stretch',\n },\n },\n defaultVariants: {\n align: 'end',\n direction: 'row',\n },\n});\n\nexport type CardActionsVariants = VariantProps<typeof cardActionsVariants>;\n\n/**\n * CVA variants for card media positioning.\n */\nexport const cardMediaVariants: (props?: {\n position?: CardMediaPosition;\n}) => string = cva('block w-full overflow-hidden object-cover', {\n variants: {\n position: {\n top: '',\n bottom: '',\n inset: 'mx-5 mt-5 rounded-media',\n },\n },\n defaultVariants: {\n position: 'top',\n },\n});\n\nexport type CardMediaVariants = VariantProps<typeof cardMediaVariants>;\n\n/**\n * CVA variants for card accent strip.\n *\n * @tokens `--color-primary`, `--color-accent`, `--color-warn`, `--color-success`, `--color-muted`\n */\nexport const cardAccentVariants: (props?: {\n color?: CardAccentColor;\n position?: CardAccentPosition;\n}) => string = cva('block shrink-0', {\n variants: {\n color: {\n primary: 'bg-primary',\n accent: 'bg-accent',\n warn: 'bg-warn',\n success: 'bg-success',\n muted: 'bg-muted',\n },\n position: {\n top: 'h-1 w-full',\n left: 'w-1 h-full absolute left-0 top-0',\n },\n },\n defaultVariants: {\n color: 'primary',\n position: 'top',\n },\n});\n\nexport type CardAccentVariants = VariantProps<typeof cardAccentVariants>;\n\n/**\n * CVA variants for card badge overlay.\n *\n * @tokens `--color-primary`, `--color-primary-foreground`, `--color-accent`, `--color-accent-foreground`,\n * `--color-warn`, `--color-warn-foreground`, `--color-success`, `--color-success-foreground`,\n * `--color-muted`, `--color-muted-foreground`, `--radius-card`, `--radius-media`, `--radius-pill`\n */\nexport const cardBadgeVariants: (props?: {\n position?: CardBadgePosition;\n color?: CardBadgeColor;\n}) => string = cva(\n 'absolute z-10 inline-flex items-center rounded-pill px-2.5 py-0.5 text-xs font-semibold',\n {\n variants: {\n position: {\n 'top-left': 'top-3 left-3',\n 'top-right': 'top-3 right-3',\n 'bottom-left': 'bottom-3 left-3',\n 'bottom-right': 'bottom-3 right-3',\n },\n color: {\n primary: 'bg-primary text-primary-foreground',\n accent: 'bg-accent text-accent-foreground',\n warn: 'bg-warn text-warn-foreground',\n success: 'bg-success text-success-foreground',\n muted: 'bg-muted text-muted-foreground',\n },\n },\n defaultVariants: {\n position: 'top-right',\n color: 'primary',\n },\n }\n);\n\nexport type CardBadgeVariants = VariantProps<typeof cardBadgeVariants>;\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n output,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { InputSignal, InputSignalWithTransform, OutputEmitterRef, Signal } from '@angular/core';\nimport { mergeClasses } from './card.utils';\nimport { cardVariants } from './card.variants';\nimport type { CardVariant, CardPadding, CardRadius } from './card.variants';\n\n/**\n * Card container component - a styled surface for content.\n *\n * The card is a pure container with no imposed structure.\n * Use card directives (comCardHeader, comCardContent, etc.) to compose layouts.\n *\n * @tokens `--color-card`, `--color-card-foreground`, `--color-muted`, `--color-muted-foreground`,\n * `--color-muted-hover`, `--color-border`, `--color-primary`, `--color-ring`, `--shadow-card`\n *\n * @example Basic card\n * ```html\n * <com-card>\n * <div comCardContent>Simple content</div>\n * </com-card>\n * ```\n *\n * @example Interactive card\n * ```html\n * <com-card [interactive]=\"true\" (click)=\"onCardClick()\">\n * <div comCardContent>Clickable card</div>\n * </com-card>\n * ```\n *\n * @example Outlined variant with custom padding\n * ```html\n * <com-card variant=\"outlined\" padding=\"md\">\n * <p>Outlined card with medium padding</p>\n * </com-card>\n * ```\n */\n@Component({\n selector: 'com-card',\n exportAs: 'comCard',\n template: `<ng-content />`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'computedClass()',\n '[attr.tabindex]': 'interactive() ? 0 : null',\n '[attr.role]': 'interactive() ? \"button\" : null',\n '(keydown.enter)': 'onKeyActivate($event)',\n '(keydown.space)': 'onKeyActivate($event)',\n },\n})\nexport class ComCard {\n /** Visual treatment of the card surface. */\n readonly variant: InputSignal<CardVariant> = input<CardVariant>('elevated');\n\n /** Inner spacing. Default 'none' - sub-parts manage their own padding. */\n readonly padding: InputSignal<CardPadding> = input<CardPadding>('none');\n\n /** Border radius. */\n readonly radius: InputSignal<CardRadius> = input<CardRadius>('lg');\n\n /** When true, adds hover/active states and cursor-pointer. */\n readonly interactive: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n /** Consumer CSS classes - merged with variant classes. */\n readonly userClass: InputSignal<string> = input<string>('', { alias: 'class' });\n\n /** Emitted when an interactive card is activated via keyboard (Enter or Space). */\n readonly cardActivated: OutputEmitterRef<void> = output<void>();\n\n protected readonly computedClass: Signal<string> = computed(() =>\n mergeClasses(\n cardVariants({\n variant: this.variant(),\n padding: this.padding(),\n radius: this.radius(),\n interactive: this.interactive(),\n }),\n this.userClass()\n )\n );\n\n // SSR-safe: only called from user interaction handlers\n protected onKeyActivate(event: Event): void {\n if (!this.interactive()) return;\n event.preventDefault();\n this.cardActivated.emit();\n }\n}\n","import { Directive } from '@angular/core';\n\n/**\n * Card header directive - top section for title and actions.\n *\n * Uses `flex` with `justify-between` so it naturally supports a title group\n * on the left and an action element (icon button, menu trigger) on the right.\n *\n * **Important:** When using both `comCardTitle` and `comCardSubtitle`,\n * wrap them in a container `<div>` so they stack vertically as a single\n * flex child. Without the wrapper, `justify-between` will push them apart.\n *\n * @example Header with title only\n * ```html\n * <div comCardHeader>\n * <h3 comCardTitle>Card Title</h3>\n * </div>\n * ```\n *\n * @example Header with title, subtitle, and action\n * ```html\n * <div comCardHeader>\n * <div>\n * <h3 comCardTitle>Title</h3>\n * <p comCardSubtitle>Subtitle</p>\n * </div>\n * <button comButton variant=\"ghost\" size=\"icon\" aria-label=\"More\">...</button>\n * </div>\n * ```\n *\n * @tokens None - uses only layout utilities\n */\n@Directive({\n selector: '[comCardHeader]',\n exportAs: 'comCardHeader',\n host: {\n class: 'flex items-start justify-between gap-3 px-5 pt-5 pb-0',\n },\n})\nexport class ComCardHeader {}\n","import { Directive } from '@angular/core';\n\n/**\n * Card title directive - styled heading text.\n *\n * Apply to any heading element. Consumer picks the semantic level (h2, h3, etc.).\n *\n * @example\n * ```html\n * <h3 comCardTitle>Project Alpha</h3>\n * ```\n *\n * @tokens `--color-foreground`\n */\n@Directive({\n selector: '[comCardTitle]',\n exportAs: 'comCardTitle',\n host: {\n class: 'font-heading text-lg font-semibold tracking-tight text-foreground',\n },\n})\nexport class ComCardTitle {}\n","import { Directive } from '@angular/core';\n\n/**\n * Card subtitle directive - secondary text styling.\n *\n * @example\n * ```html\n * <p comCardSubtitle>Last updated 2 hours ago</p>\n * ```\n *\n * @tokens `--color-muted-foreground`\n */\n@Directive({\n selector: '[comCardSubtitle]',\n exportAs: 'comCardSubtitle',\n host: {\n class: 'text-sm text-muted-foreground',\n },\n})\nexport class ComCardSubtitle {}\n","import { Directive } from '@angular/core';\n\n/**\n * Card content directive - main body area with consistent padding.\n *\n * @example\n * ```html\n * <div comCardContent>\n * <p>Card body content goes here.</p>\n * </div>\n * ```\n *\n * @tokens None - uses only layout utilities\n */\n@Directive({\n selector: '[comCardContent]',\n exportAs: 'comCardContent',\n host: {\n class: 'flex-1 px-5 py-4 text-sm',\n },\n})\nexport class ComCardContent {}\n","import { computed, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { mergeClasses } from './card.utils';\nimport { cardFooterVariants } from './card.variants';\nimport type { CardAlign } from './card.variants';\n\n/**\n * Card footer directive - bottom section for metadata or secondary actions.\n *\n * @example Footer with alignment\n * ```html\n * <div comCardFooter align=\"between\">\n * <span class=\"text-sm text-muted-foreground\">Updated 3m ago</span>\n * <a comButton variant=\"link\" size=\"sm\">View details</a>\n * </div>\n * ```\n *\n * @tokens None - uses only layout utilities\n */\n@Directive({\n selector: '[comCardFooter]',\n exportAs: 'comCardFooter',\n host: {\n '[class]': 'computedClass()',\n },\n})\nexport class ComCardFooter {\n /** Horizontal alignment of footer content. */\n readonly align: InputSignal<CardAlign> = input<CardAlign>('end');\n\n /** Consumer CSS classes - merged with variant classes. */\n readonly userClass: InputSignal<string> = input<string>('', { alias: 'class' });\n\n protected readonly computedClass: Signal<string> = computed(() =>\n mergeClasses(cardFooterVariants({ align: this.align() }), this.userClass())\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { mergeClasses } from './card.utils';\nimport { cardActionsVariants } from './card.variants';\nimport type { CardAlign, CardActionsDirection } from './card.variants';\n\n/**\n * Card actions directive - dedicated button row for primary card actions.\n *\n * Separate from footer because actions and footer metadata serve different purposes.\n *\n * @example Actions with alignment\n * ```html\n * <div comCardActions>\n * <button comButton variant=\"ghost\" size=\"sm\">Cancel</button>\n * <button comButton size=\"sm\">Confirm</button>\n * </div>\n * ```\n *\n * @example Stacked column layout\n * ```html\n * <div comCardActions direction=\"column\" align=\"start\">\n * <button comButton fullWidth>Primary Action</button>\n * <button comButton variant=\"outline\" fullWidth>Secondary</button>\n * </div>\n * ```\n *\n * @tokens None - uses only layout utilities\n */\n@Directive({\n selector: '[comCardActions]',\n exportAs: 'comCardActions',\n host: {\n '[class]': 'computedClass()',\n },\n})\nexport class ComCardActions {\n /** Horizontal alignment of actions. */\n readonly align: InputSignal<CardAlign> = input<CardAlign>('end');\n\n /** Layout direction - row or column. */\n readonly direction: InputSignal<CardActionsDirection> = input<CardActionsDirection>('row');\n\n /** Consumer CSS classes - merged with variant classes. */\n readonly userClass: InputSignal<string> = input<string>('', { alias: 'class' });\n\n protected readonly computedClass: Signal<string> = computed(() =>\n mergeClasses(\n cardActionsVariants({\n align: this.align(),\n direction: this.direction(),\n }),\n this.userClass()\n )\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { mergeClasses } from './card.utils';\nimport { cardMediaVariants } from './card.variants';\nimport type { CardMediaPosition } from './card.variants';\n\n/**\n * Card media directive - image/video slot with aspect ratio handling.\n *\n * Apply to <img>, <video>, <picture>, or a wrapper <div>.\n *\n * @example Top media (bleeds to edge)\n * ```html\n * <img comCardMedia src=\"/hero.jpg\" alt=\"Hero image\" />\n * ```\n *\n * @example Inset media (padded with rounded corners)\n * ```html\n * <img comCardMedia position=\"inset\" src=\"/preview.jpg\" alt=\"Preview\" />\n * ```\n *\n * @tokens None - uses only layout utilities\n */\n@Directive({\n selector: '[comCardMedia]',\n exportAs: 'comCardMedia',\n host: {\n '[class]': 'computedClass()',\n },\n})\nexport class ComCardMedia {\n /** Media positioning within the card. */\n readonly position: InputSignal<CardMediaPosition> = input<CardMediaPosition>('top');\n\n /** Consumer CSS classes - merged with variant classes. */\n readonly userClass: InputSignal<string> = input<string>('', { alias: 'class' });\n\n protected readonly computedClass: Signal<string> = computed(() =>\n mergeClasses(cardMediaVariants({ position: this.position() }), this.userClass())\n );\n}\n","import { booleanAttribute, computed, Directive, input } from '@angular/core';\nimport type { InputSignal, InputSignalWithTransform, Signal } from '@angular/core';\nimport { mergeClasses } from './card.utils';\n\n/**\n * Card divider directive - horizontal rule between card sections.\n *\n * @example Standard divider (with side margins)\n * ```html\n * <hr comCardDivider />\n * ```\n *\n * @example Full-width divider (edge to edge)\n * ```html\n * <hr comCardDivider [inset]=\"true\" />\n * ```\n *\n * @tokens `--color-border`\n */\n@Directive({\n selector: '[comCardDivider]',\n exportAs: 'comCardDivider',\n host: {\n '[class]': 'computedClass()',\n },\n})\nexport class ComCardDivider {\n /** When true, divider spans full card width (no horizontal margin). */\n readonly inset: InputSignalWithTransform<boolean, unknown> = input(false, {\n transform: booleanAttribute,\n });\n\n /** Consumer CSS classes. */\n readonly userClass: InputSignal<string> = input<string>('', { alias: 'class' });\n\n protected readonly computedClass: Signal<string> = computed(() =>\n mergeClasses(\n 'block border-t border-border',\n this.inset() ? 'mx-0' : 'mx-5',\n this.userClass()\n )\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { mergeClasses } from './card.utils';\nimport { cardAccentVariants } from './card.variants';\nimport type { CardAccentColor, CardAccentPosition } from './card.variants';\n\n/**\n * Card accent directive - colored strip for status or category indication.\n *\n * Place as the first child of the card for top accent, or use position=\"left\"\n * for a left-edge strip (requires adding left padding to content).\n *\n * @tokens `--color-primary`, `--color-accent`, `--color-warn`, `--color-success`, `--color-muted`\n *\n * @example Top accent strip\n * ```html\n * <com-card>\n * <div comCardAccent color=\"warn\"></div>\n * <div comCardContent>Warning content</div>\n * </com-card>\n * ```\n *\n * @example Left accent strip\n * ```html\n * <com-card>\n * <div comCardAccent color=\"success\" position=\"left\"></div>\n * <div comCardContent class=\"pl-5\">Content with left padding</div>\n * </com-card>\n * ```\n */\n@Directive({\n selector: '[comCardAccent]',\n exportAs: 'comCardAccent',\n host: {\n '[class]': 'computedClass()',\n },\n})\nexport class ComCardAccent {\n /** Accent color. */\n readonly color: InputSignal<CardAccentColor> = input<CardAccentColor>('primary');\n\n /** Position of the accent strip. */\n readonly position: InputSignal<CardAccentPosition> = input<CardAccentPosition>('top');\n\n /** Consumer CSS classes - merged with variant classes. */\n readonly userClass: InputSignal<string> = input<string>('', { alias: 'class' });\n\n protected readonly computedClass: Signal<string> = computed(() =>\n mergeClasses(\n cardAccentVariants({\n color: this.color(),\n position: this.position(),\n }),\n this.userClass()\n )\n );\n}\n","import { computed, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { mergeClasses } from './card.utils';\nimport { cardBadgeVariants } from './card.variants';\nimport type { CardBadgeColor, CardBadgePosition } from './card.variants';\n\n/**\n * Card badge directive - positioned overlay for labels, tags, or status indicators.\n *\n * Floats over the card content (e.g., \"NEW\", \"SALE\", \"Featured\").\n *\n * @tokens `--color-primary`, `--color-primary-foreground`, `--color-accent`, `--color-accent-foreground`,\n * `--color-warn`, `--color-warn-foreground`, `--color-success`, `--color-success-foreground`,\n * `--color-muted`, `--color-muted-foreground`, `--radius-pill`\n *\n * @example Badge in top-right corner\n * ```html\n * <com-card>\n * <span comCardBadge>NEW</span>\n * <img comCardMedia src=\"/product.jpg\" alt=\"Product\" />\n * </com-card>\n * ```\n *\n * @example Badge with custom position and color\n * ```html\n * <com-card>\n * <span comCardBadge position=\"top-left\" color=\"warn\">SALE</span>\n * <div comCardContent>Product details</div>\n * </com-card>\n * ```\n */\n@Directive({\n selector: '[comCardBadge]',\n exportAs: 'comCardBadge',\n host: {\n '[class]': 'computedClass()',\n },\n})\nexport class ComCardBadge {\n /** Badge position within the card. */\n readonly position: InputSignal<CardBadgePosition> = input<CardBadgePosition>('top-right');\n\n /** Badge color. */\n readonly color: InputSignal<CardBadgeColor> = input<CardBadgeColor>('primary');\n\n /** Consumer CSS classes - merged with variant classes. */\n readonly userClass: InputSignal<string> = input<string>('', { alias: 'class' });\n\n protected readonly computedClass: Signal<string> = computed(() =>\n mergeClasses(\n cardBadgeVariants({\n position: this.position(),\n color: this.color(),\n }),\n this.userClass()\n )\n );\n}\n","// Public API for the card component system\n\n// Main component\nexport { ComCard } from './card.component';\n\n// Directives\nexport { ComCardHeader } from './card-header.directive';\nexport { ComCardTitle } from './card-title.directive';\nexport { ComCardSubtitle } from './card-subtitle.directive';\nexport { ComCardContent } from './card-content.directive';\nexport { ComCardFooter } from './card-footer.directive';\nexport { ComCardActions } from './card-actions.directive';\nexport { ComCardMedia } from './card-media.directive';\nexport { ComCardDivider } from './card-divider.directive';\nexport { ComCardAccent } from './card-accent.directive';\nexport { ComCardBadge } from './card-badge.directive';\n\n// Variants (for advanced customization)\nexport {\n cardVariants,\n cardFooterVariants,\n cardActionsVariants,\n cardMediaVariants,\n cardAccentVariants,\n cardBadgeVariants,\n} from './card.variants';\n\nexport type {\n CardVariant,\n CardPadding,\n CardRadius,\n CardAlign,\n CardActionsDirection,\n CardMediaPosition,\n CardAccentColor,\n CardAccentPosition,\n CardBadgeColor,\n CardBadgePosition,\n CardVariants,\n CardFooterVariants,\n CardActionsVariants,\n CardMediaVariants,\n CardAccentVariants,\n CardBadgeVariants,\n} from './card.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAwBA;;;;;AAKG;AACI,MAAM,YAAY,GAKV,GAAG,CAAC,wCAAwC,EAAE;AAC3D,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,QAAQ,EAAE,0CAA0C;AACpD,YAAA,QAAQ,EAAE,mDAAmD;AAC7D,YAAA,MAAM,EAAE,gCAAgC;AACxC,YAAA,KAAK,EAAE,gCAAgC;AACxC,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,EAAE;AACR,YAAA,EAAE,EAAE,KAAK;AACT,YAAA,EAAE,EAAE,KAAK;AACT,YAAA,EAAE,EAAE,KAAK;AACV,SAAA;AACD,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,cAAc;AACpB,YAAA,EAAE,E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AAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,iBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAPxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,iBAAiB;AAC7B,qBAAA;AACF,iBAAA;;;ACrCD;AAEA;;ACFA;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, viewChild, signal, computed, ChangeDetectionStrategy, Component, InjectionToken, Injector, PLATFORM_ID, TemplateRef, Injectable, Directive, input } from '@angular/core';
|
|
3
|
-
import { NgTemplateOutlet, NgComponentOutlet, DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
3
|
+
import { NgTemplateOutlet, NgComponentOutlet, NgStyle, DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
4
4
|
import { Overlay } from '@angular/cdk/overlay';
|
|
5
5
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
6
6
|
import { filter, takeUntil } from 'rxjs/operators';
|
|
@@ -174,6 +174,10 @@ function generateDialogContentId() {
|
|
|
174
174
|
|
|
175
175
|
/** Fallback timeout for exit animation when animationend doesn't fire. */
|
|
176
176
|
const ANIMATION_FALLBACK_MS = 200;
|
|
177
|
+
/** Convert a dimension value to a CSS string. Numbers default to pixels. */
|
|
178
|
+
function toCssValue(value) {
|
|
179
|
+
return typeof value === 'number' ? `${value}px` : value;
|
|
180
|
+
}
|
|
177
181
|
/**
|
|
178
182
|
* Internal dialog container component rendered inside the CDK overlay.
|
|
179
183
|
* Hosts the user's component or template and manages focus trap, animation, and ARIA.
|
|
@@ -182,7 +186,7 @@ const ANIMATION_FALLBACK_MS = 200;
|
|
|
182
186
|
*
|
|
183
187
|
* @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`,
|
|
184
188
|
* `--color-foreground`, `--color-muted-foreground`, `--color-backdrop`,
|
|
185
|
-
* `--shadow-dialog`, `--radius-overlay`, `--
|
|
189
|
+
* `--shadow-dialog`, `--radius-overlay`, `--font-heading`
|
|
186
190
|
*/
|
|
187
191
|
class ComDialogContainerComponent {
|
|
188
192
|
focusTrapFactory = inject(FocusTrapFactory);
|
|
@@ -221,11 +225,34 @@ class ComDialogContainerComponent {
|
|
|
221
225
|
this.contentId.set(id);
|
|
222
226
|
}
|
|
223
227
|
// ─── Computed classes ───
|
|
224
|
-
backdropClasses = computed(() => mergeClasses(dialogBackdropVariants({ visible: this.visible() })), ...(ngDevMode ? [{ debugName: "backdropClasses" }] : []));
|
|
228
|
+
backdropClasses = computed(() => mergeClasses(dialogBackdropVariants({ visible: this.visible() }), this.config()?.backdropClass ?? ''), ...(ngDevMode ? [{ debugName: "backdropClasses" }] : []));
|
|
225
229
|
panelClasses = computed(() => mergeClasses(dialogPanelVariants({
|
|
226
230
|
size: this.config()?.size ?? 'md',
|
|
227
231
|
visible: this.visible(),
|
|
228
232
|
}), this.config()?.panelClass ?? ''), ...(ngDevMode ? [{ debugName: "panelClasses" }] : []));
|
|
233
|
+
/**
|
|
234
|
+
* Inline styles for dimension overrides on the panel element.
|
|
235
|
+
* When set, these override CVA size variant dimensions via CSS specificity.
|
|
236
|
+
*/
|
|
237
|
+
panelStyles = computed(() => {
|
|
238
|
+
const c = this.config();
|
|
239
|
+
if (!c)
|
|
240
|
+
return null;
|
|
241
|
+
const styles = {};
|
|
242
|
+
if (c.width != null)
|
|
243
|
+
styles['width'] = c.width;
|
|
244
|
+
if (c.height != null)
|
|
245
|
+
styles['height'] = c.height;
|
|
246
|
+
if (c.minWidth != null)
|
|
247
|
+
styles['min-width'] = toCssValue(c.minWidth);
|
|
248
|
+
if (c.minHeight != null)
|
|
249
|
+
styles['min-height'] = toCssValue(c.minHeight);
|
|
250
|
+
if (c.maxWidth != null)
|
|
251
|
+
styles['max-width'] = toCssValue(c.maxWidth);
|
|
252
|
+
if (c.maxHeight != null)
|
|
253
|
+
styles['max-height'] = toCssValue(c.maxHeight);
|
|
254
|
+
return Object.keys(styles).length > 0 ? styles : null;
|
|
255
|
+
}, ...(ngDevMode ? [{ debugName: "panelStyles" }] : []));
|
|
229
256
|
/** Template context for TemplateRef-based dialogs. */
|
|
230
257
|
templateContext = computed(() => ({
|
|
231
258
|
$implicit: this.dialogRef(),
|
|
@@ -300,7 +327,8 @@ class ComDialogContainerComponent {
|
|
|
300
327
|
<div
|
|
301
328
|
#panelElement
|
|
302
329
|
[class]="panelClasses()"
|
|
303
|
-
|
|
330
|
+
[ngStyle]="panelStyles()"
|
|
331
|
+
[attr.role]="config()?.role ?? 'dialog'"
|
|
304
332
|
aria-modal="true"
|
|
305
333
|
[attr.aria-labelledby]="titleId() || null"
|
|
306
334
|
[attr.aria-describedby]="contentId() || null"
|
|
@@ -322,7 +350,7 @@ class ComDialogContainerComponent {
|
|
|
322
350
|
}
|
|
323
351
|
}
|
|
324
352
|
</div>
|
|
325
|
-
`, isInline: true, styles: [":host{display:contents}[data-state=open]{--tw-enter-opacity: 0;--tw-enter-scale: .95}[data-state=closed]{--tw-exit-opacity: 0;--tw-exit-scale: .95}@media(prefers-reduced-motion:reduce){[data-state=open],[data-state=closed]{animation:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
353
|
+
`, isInline: true, styles: [":host{display:contents}[data-state=open]{--tw-enter-opacity: 0;--tw-enter-scale: .95}[data-state=closed]{--tw-exit-opacity: 0;--tw-exit-scale: .95}@media(prefers-reduced-motion:reduce){[data-state=open],[data-state=closed]{animation:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
326
354
|
}
|
|
327
355
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComDialogContainerComponent, decorators: [{
|
|
328
356
|
type: Component,
|
|
@@ -338,7 +366,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
338
366
|
<div
|
|
339
367
|
#panelElement
|
|
340
368
|
[class]="panelClasses()"
|
|
341
|
-
|
|
369
|
+
[ngStyle]="panelStyles()"
|
|
370
|
+
[attr.role]="config()?.role ?? 'dialog'"
|
|
342
371
|
aria-modal="true"
|
|
343
372
|
[attr.aria-labelledby]="titleId() || null"
|
|
344
373
|
[attr.aria-describedby]="contentId() || null"
|
|
@@ -360,7 +389,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
360
389
|
}
|
|
361
390
|
}
|
|
362
391
|
</div>
|
|
363
|
-
`, imports: [NgTemplateOutlet, NgComponentOutlet], changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}[data-state=open]{--tw-enter-opacity: 0;--tw-enter-scale: .95}[data-state=closed]{--tw-exit-opacity: 0;--tw-exit-scale: .95}@media(prefers-reduced-motion:reduce){[data-state=open],[data-state=closed]{animation:none}}\n"] }]
|
|
392
|
+
`, imports: [NgTemplateOutlet, NgComponentOutlet, NgStyle], changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}[data-state=open]{--tw-enter-opacity: 0;--tw-enter-scale: .95}[data-state=closed]{--tw-exit-opacity: 0;--tw-exit-scale: .95}@media(prefers-reduced-motion:reduce){[data-state=open],[data-state=closed]{animation:none}}\n"] }]
|
|
364
393
|
}], propDecorators: { panelElement: [{ type: i0.ViewChild, args: ['panelElement', { isSignal: true }] }] } });
|
|
365
394
|
|
|
366
395
|
/**
|
|
@@ -411,6 +440,7 @@ const COM_DIALOG_DEFAULTS = {
|
|
|
411
440
|
autoFocus: 'first-tabbable',
|
|
412
441
|
restoreFocus: true,
|
|
413
442
|
ariaLabel: '',
|
|
443
|
+
role: 'dialog',
|
|
414
444
|
};
|
|
415
445
|
|
|
416
446
|
/**
|
|
@@ -459,23 +489,29 @@ class ComDialog {
|
|
|
459
489
|
registerTitleId: () => { },
|
|
460
490
|
registerContentId: () => { },
|
|
461
491
|
};
|
|
492
|
+
// Resolve parent injector: config.injector > config.viewContainerRef.injector > service injector
|
|
493
|
+
const parentInjector = resolvedConfig.injector ??
|
|
494
|
+
resolvedConfig.viewContainerRef?.injector ??
|
|
495
|
+
this.injector;
|
|
462
496
|
const contentInjector = Injector.create({
|
|
463
497
|
providers: [
|
|
498
|
+
...(resolvedConfig.providers ?? []),
|
|
464
499
|
{ provide: ComDialogRef, useValue: dialogRef },
|
|
465
500
|
{ provide: COM_DIALOG_DATA, useValue: resolvedConfig.data },
|
|
466
501
|
{ provide: COM_DIALOG_CONTAINER_REF, useValue: containerRef },
|
|
467
502
|
],
|
|
468
|
-
parent:
|
|
503
|
+
parent: parentInjector,
|
|
469
504
|
});
|
|
470
505
|
// Create CDK overlay
|
|
471
|
-
const positionStrategy =
|
|
472
|
-
.
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
506
|
+
const positionStrategy = resolvedConfig.positionStrategy ??
|
|
507
|
+
this.overlay
|
|
508
|
+
.position()
|
|
509
|
+
.global()
|
|
510
|
+
.centerHorizontally()
|
|
511
|
+
.centerVertically();
|
|
476
512
|
const overlayRef = this.overlay.create({
|
|
477
513
|
positionStrategy,
|
|
478
|
-
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
514
|
+
scrollStrategy: resolvedConfig.scrollStrategy ?? this.overlay.scrollStrategies.block(),
|
|
479
515
|
hasBackdrop: false, // We handle backdrop ourselves for animation control
|
|
480
516
|
panelClass: 'com-dialog-overlay',
|
|
481
517
|
disposeOnNavigation: false,
|
|
@@ -524,9 +560,16 @@ class ComDialog {
|
|
|
524
560
|
}
|
|
525
561
|
overlayRef.dispose();
|
|
526
562
|
// Restore focus
|
|
527
|
-
|
|
563
|
+
const { restoreFocus } = resolvedConfig;
|
|
564
|
+
if (restoreFocus === true && previouslyFocused) {
|
|
528
565
|
previouslyFocused.focus();
|
|
529
566
|
}
|
|
567
|
+
else if (typeof restoreFocus === 'string') {
|
|
568
|
+
this.document.querySelector(restoreFocus)?.focus();
|
|
569
|
+
}
|
|
570
|
+
else if (restoreFocus instanceof HTMLElement) {
|
|
571
|
+
restoreFocus.focus();
|
|
572
|
+
}
|
|
530
573
|
});
|
|
531
574
|
// Show panel after a microtask to allow initial styles to apply
|
|
532
575
|
requestAnimationFrame(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-com-components-dialog.mjs","sources":["../../../projects/com/components/dialog/dialog-ref.ts","../../../projects/com/components/dialog/dialog.variants.ts","../../../projects/com/components/dialog/dialog.utils.ts","../../../projects/com/components/dialog/dialog-container.component.ts","../../../projects/com/components/dialog/dialog-container-ref.token.ts","../../../projects/com/components/dialog/dialog.providers.ts","../../../projects/com/components/dialog/dialog.models.ts","../../../projects/com/components/dialog/dialog.service.ts","../../../projects/com/components/dialog/dialog-title.directive.ts","../../../projects/com/components/dialog/dialog-content.directive.ts","../../../projects/com/components/dialog/dialog-actions.directive.ts","../../../projects/com/components/dialog/dialog-close.directive.ts","../../../projects/com/components/dialog/index.ts","../../../projects/com/components/dialog/ngx-com-components-dialog.ts"],"sourcesContent":["import { Observable, Subject } from 'rxjs';\nimport type { OverlayRef } from '@angular/cdk/overlay';\n\n/**\n * Reference to an open dialog instance.\n * Returned by `ComDialog.open()` for programmatic control.\n */\nexport class ComDialogRef<R = unknown> {\n private readonly afterClosedSubject = new Subject<R | undefined>();\n private readonly backdropClickSubject = new Subject<MouseEvent>();\n private closed = false;\n\n /** @internal */\n _overlayRef: OverlayRef | null = null;\n\n /** @internal */\n _closeFn: ((result?: R) => void) | null = null;\n\n /**\n * Close the dialog, optionally passing a result value.\n */\n close(result?: R): void {\n if (this.closed) return;\n this._closeFn?.(result);\n }\n\n /**\n * Emits the result once after the dialog is fully closed and disposed.\n */\n afterClosed(): Observable<R | undefined> {\n return this.afterClosedSubject.asObservable();\n }\n\n /**\n * Emits each time the backdrop is clicked.\n */\n backdropClick(): Observable<MouseEvent> {\n return this.backdropClickSubject.asObservable();\n }\n\n /**\n * Proxies keydown events from the overlay.\n */\n keydownEvents(): Observable<KeyboardEvent> {\n return this._overlayRef?.keydownEvents() ?? new Observable();\n }\n\n /** @internal Called by the service after exit animation completes. */\n _notifyClosed(result?: R): void {\n if (this.closed) return;\n this.closed = true;\n this.afterClosedSubject.next(result);\n this.afterClosedSubject.complete();\n this.backdropClickSubject.complete();\n }\n\n /** @internal Forward backdrop click from overlay. */\n _notifyBackdropClick(event: MouseEvent): void {\n this.backdropClickSubject.next(event);\n }\n}\n","import { cva } from 'class-variance-authority';\nimport type { VariantProps } from 'class-variance-authority';\n\n/**\n * CVA variants for the dialog backdrop.\n *\n * @tokens `--color-backdrop`\n */\nexport const dialogBackdropVariants: (props?: {\n visible?: boolean;\n}) => string = cva(\n [\n 'fixed',\n 'inset-0',\n 'z-50',\n 'bg-backdrop',\n 'backdrop-blur-sm',\n ],\n {\n variants: {\n visible: {\n true: 'animate-in fade-in-0',\n false: 'animate-out fade-out-0',\n },\n },\n defaultVariants: {\n visible: true,\n },\n },\n);\n\n/**\n * CVA variants for the dialog panel container.\n *\n * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`,\n * `--shadow-dialog`, `--radius-overlay`\n */\nexport const dialogPanelVariants: (props?: {\n size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';\n visible?: boolean;\n}) => string = cva(\n [\n 'com-dialog-panel',\n 'fixed',\n 'left-1/2',\n 'top-1/2',\n '-translate-x-1/2',\n '-translate-y-1/2',\n 'z-50',\n 'flex',\n 'flex-col',\n 'border',\n 'border-border',\n 'bg-popover',\n 'text-popover-foreground',\n 'shadow-dialog',\n 'rounded-overlay',\n 'outline-none',\n ],\n {\n variants: {\n size: {\n sm: 'w-full max-w-sm max-h-[85vh] p-6',\n md: 'w-full max-w-lg max-h-[85vh] p-6',\n lg: 'w-full max-w-2xl max-h-[85vh] p-6',\n xl: 'w-full max-w-4xl max-h-[85vh] p-6',\n full: 'w-screen h-screen max-w-none max-h-none rounded-none border-none p-6',\n },\n visible: {\n true: 'animate-in fade-in-0 zoom-in-95',\n false: 'animate-out fade-out-0 zoom-out-95',\n },\n },\n defaultVariants: {\n size: 'md',\n visible: true,\n },\n },\n);\n\n/** Type helper for dialog panel variant props. */\nexport type DialogPanelVariantProps = VariantProps<typeof dialogPanelVariants>;\n\n/**\n * CVA variants for the dialog title.\n *\n * @tokens `--color-foreground`\n */\nexport const dialogTitleVariants: () => string = cva([\n 'font-heading',\n 'text-lg',\n 'font-semibold',\n 'tracking-tight',\n 'text-foreground',\n]);\n\n/**\n * CVA variants for the dialog content area.\n *\n * @tokens `--color-muted-foreground`\n */\nexport const dialogContentVariants: () => string = cva([\n 'flex-1',\n 'overflow-y-auto',\n 'py-4',\n 'text-sm',\n 'text-muted-foreground',\n]);\n\n/**\n * CVA variants for the dialog actions area.\n */\nexport const dialogActionsVariants: () => string = cva([\n 'flex',\n 'flex-col-reverse',\n 'sm:flex-row',\n 'sm:justify-end',\n 'gap-2',\n 'pt-4',\n]);\n","export { mergeClasses } from 'ngx-com/utils';\n\nlet dialogIdCounter = 0;\n\n/** Generate a unique ID for a dialog title element. */\nexport function generateDialogTitleId(): string {\n return `com-dialog-title-${++dialogIdCounter}`;\n}\n\n/** Generate a unique ID for a dialog content element. */\nexport function generateDialogContentId(): string {\n return `com-dialog-content-${++dialogIdCounter}`;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n Injector,\n signal,\n viewChild,\n} from '@angular/core';\nimport type { AfterViewInit, Signal, TemplateRef, WritableSignal } from '@angular/core';\nimport { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport { FocusTrap, FocusTrapFactory } from '@angular/cdk/a11y';\nimport type { ComponentType } from '@angular/cdk/portal';\nimport { ComDialogRef } from './dialog-ref';\n\nimport type { DialogContainerRef } from './dialog-container-ref.token';\nimport { dialogBackdropVariants, dialogPanelVariants } from './dialog.variants';\nimport { mergeClasses } from './dialog.utils';\nimport type {\n ComDialogResolvedConfig,\n ComDialogTemplateContext,\n} from './dialog.models';\n\n/** Fallback timeout for exit animation when animationend doesn't fire. */\nconst ANIMATION_FALLBACK_MS = 200;\n\n/**\n * Internal dialog container component rendered inside the CDK overlay.\n * Hosts the user's component or template and manages focus trap, animation, and ARIA.\n *\n * @internal Not exported in public API\n *\n * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`,\n * `--color-foreground`, `--color-muted-foreground`, `--color-backdrop`,\n * `--shadow-dialog`, `--radius-overlay`, `--color-ring`\n */\n@Component({\n selector: 'com-dialog-container',\n template: `\n @if (config()?.hasBackdrop) {\n <div\n [class]=\"backdropClasses()\"\n [attr.data-state]=\"visible() ? 'open' : 'closed'\"\n aria-hidden=\"true\"\n (click)=\"onBackdropClick($event)\"\n ></div>\n }\n <div\n #panelElement\n [class]=\"panelClasses()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"titleId() || null\"\n [attr.aria-describedby]=\"contentId() || null\"\n [attr.aria-label]=\"!titleId() && config()?.ariaLabel ? config()!.ariaLabel : null\"\n [attr.data-state]=\"visible() ? 'open' : 'closed'\"\n tabindex=\"-1\"\n (animationend)=\"onAnimationEnd()\"\n >\n @if (isTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"templateContent()!\"\n [ngTemplateOutletContext]=\"templateContext()\"\n />\n } @else if (componentContent(); as comp) {\n @if (contentInjector(); as inj) {\n <ng-container\n *ngComponentOutlet=\"comp; injector: inj\"\n />\n }\n }\n </div>\n `,\n styles: `\n :host {\n display: contents;\n }\n\n [data-state='open'] {\n --tw-enter-opacity: 0;\n --tw-enter-scale: 0.95;\n }\n\n [data-state='closed'] {\n --tw-exit-opacity: 0;\n --tw-exit-scale: 0.95;\n }\n\n @media (prefers-reduced-motion: reduce) {\n [data-state='open'],\n [data-state='closed'] {\n animation: none;\n }\n }\n `,\n imports: [NgTemplateOutlet, NgComponentOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComDialogContainerComponent implements AfterViewInit, DialogContainerRef {\n private readonly focusTrapFactory = inject(FocusTrapFactory);\n private focusTrap: FocusTrap | null = null;\n private animationFallback: ReturnType<typeof setTimeout> | null = null;\n private closing = false;\n private pendingResult: unknown = undefined;\n\n private readonly panelElement = viewChild<ElementRef<HTMLElement>>('panelElement');\n\n /** Resolved dialog configuration, set by the service. */\n readonly config: WritableSignal<ComDialogResolvedConfig | null> = signal(null);\n\n /** Whether the panel is visible (for animation state). */\n readonly visible: WritableSignal<boolean> = signal(false);\n\n /** The dialog ref for this instance, set by the service. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly dialogRef: WritableSignal<ComDialogRef<any> | null> = signal(null);\n\n /** Injector for content component, set by the service. */\n readonly contentInjector: WritableSignal<Injector | null> = signal(null);\n\n // ─── Content signals (set by service) ───\n\n /** Whether the content is a TemplateRef. */\n readonly isTemplate: WritableSignal<boolean> = signal(false);\n\n /** Template ref content (when isTemplate is true). */\n readonly templateContent: WritableSignal<TemplateRef<unknown> | null> = signal(null);\n\n /** Component type content (when isTemplate is false). */\n readonly componentContent: WritableSignal<ComponentType<unknown> | null> = signal(null);\n\n // ─── ARIA ID registration ───\n\n /** ID of the title directive for aria-labelledby. */\n readonly titleId: WritableSignal<string> = signal('');\n\n /** ID of the content directive for aria-describedby. */\n readonly contentId: WritableSignal<string> = signal('');\n\n /** Register a title element ID (called by ComDialogTitle directive). */\n registerTitleId(id: string): void {\n this.titleId.set(id);\n }\n\n /** Register a content element ID (called by ComDialogContent directive). */\n registerContentId(id: string): void {\n this.contentId.set(id);\n }\n\n // ─── Computed classes ───\n\n protected readonly backdropClasses: Signal<string> = computed(() =>\n mergeClasses(dialogBackdropVariants({ visible: this.visible() })),\n );\n\n protected readonly panelClasses: Signal<string> = computed(() =>\n mergeClasses(\n dialogPanelVariants({\n size: this.config()?.size ?? 'md',\n visible: this.visible(),\n }),\n this.config()?.panelClass ?? '',\n ),\n );\n\n /** Template context for TemplateRef-based dialogs. */\n protected readonly templateContext: Signal<ComDialogTemplateContext> = computed(() => ({\n $implicit: this.dialogRef()!,\n data: this.config()?.data,\n }));\n\n ngAfterViewInit(): void {\n this.setupFocusTrap();\n }\n\n /** Handle backdrop click. */\n protected onBackdropClick(event: MouseEvent): void {\n const ref = this.dialogRef();\n if (ref) {\n ref._notifyBackdropClick(event);\n }\n if (!this.config()?.disableClose) {\n this.dialogRef()?.close();\n }\n }\n\n /** Start the close animation sequence. */\n startClose(result?: unknown): void {\n if (this.closing) return;\n this.closing = true;\n this.pendingResult = result;\n this.visible.set(false);\n\n // Fallback in case animationend doesn't fire\n this.animationFallback = setTimeout(() => this.finishClose(), ANIMATION_FALLBACK_MS);\n }\n\n /** Handle animation end on the panel. */\n protected onAnimationEnd(): void {\n if (this.closing) {\n this.finishClose();\n }\n }\n\n /** Clean up focus trap. */\n destroyFocusTrap(): void {\n this.focusTrap?.destroy();\n this.focusTrap = null;\n }\n\n private finishClose(): void {\n if (this.animationFallback !== null) {\n clearTimeout(this.animationFallback);\n this.animationFallback = null;\n }\n this.destroyFocusTrap();\n this.dialogRef()?._notifyClosed(this.pendingResult);\n }\n\n private setupFocusTrap(): void {\n const panelEl = this.panelElement()?.nativeElement;\n if (!panelEl) return;\n\n this.focusTrap = this.focusTrapFactory.create(panelEl);\n\n const autoFocus = this.config()?.autoFocus ?? 'first-tabbable';\n if (autoFocus === 'first-tabbable') {\n this.focusTrap.focusInitialElementWhenReady();\n } else if (autoFocus === 'dialog') {\n panelEl.focus();\n }\n // autoFocus === false: don't move focus\n }\n}\n","import { InjectionToken } from '@angular/core';\n\n/** Interface for the dialog container that directives can register with. */\nexport interface DialogContainerRef {\n registerTitleId(id: string): void;\n registerContentId(id: string): void;\n}\n\n/**\n * Injection token allowing dialog directives to register their element IDs\n * with the container for ARIA binding.\n * @internal\n */\nexport const COM_DIALOG_CONTAINER_REF: InjectionToken<DialogContainerRef> =\n new InjectionToken<DialogContainerRef>('COM_DIALOG_CONTAINER_REF');\n","import { InjectionToken } from '@angular/core';\nimport type { Provider } from '@angular/core';\nimport type { ComDialogConfig } from './dialog.models';\n\n/**\n * Injection token for data passed to a dialog component.\n *\n * @example\n * ```typescript\n * readonly data = inject<MyData>(COM_DIALOG_DATA);\n * ```\n */\nexport const COM_DIALOG_DATA: InjectionToken<unknown> =\n new InjectionToken<unknown>('COM_DIALOG_DATA');\n\n/**\n * Injection token for global dialog configuration defaults.\n * @internal\n */\nexport const COM_DIALOG_CONFIG: InjectionToken<ComDialogConfig> =\n new InjectionToken<ComDialogConfig>('COM_DIALOG_CONFIG');\n\n/**\n * Provides global dialog configuration defaults.\n *\n * @example\n * ```typescript\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideComDialogConfig({ size: 'lg', hasBackdrop: true }),\n * ],\n * });\n * ```\n */\nexport function provideComDialogConfig(config: ComDialogConfig): Provider {\n return { provide: COM_DIALOG_CONFIG, useValue: config };\n}\n","import type { TemplateRef } from '@angular/core';\nimport type { ComponentType } from '@angular/cdk/portal';\n\n/** Available dialog size variants. */\nexport type ComDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';\n\n/** Configuration for opening a dialog. */\nexport interface ComDialogConfig<D = unknown> {\n /** Data to inject via COM_DIALOG_DATA. */\n data?: D;\n /** Dialog panel width variant. */\n size?: ComDialogSize;\n /** Prevent Escape and backdrop click from closing. */\n disableClose?: boolean;\n /** Show backdrop overlay. */\n hasBackdrop?: boolean;\n /** Additional CSS class on the backdrop. */\n backdropClass?: string;\n /** Additional CSS class on the container panel. */\n panelClass?: string;\n /** Where to send focus on open. */\n autoFocus?: 'first-tabbable' | 'dialog' | false;\n /** Return focus to trigger element on close. */\n restoreFocus?: boolean;\n /** Fallback aria-label if no comDialogTitle is projected. */\n ariaLabel?: string;\n}\n\n/** Resolved config with all defaults applied. */\nexport type ComDialogResolvedConfig<D = unknown> = Required<ComDialogConfig<D>>;\n\n/** Default dialog configuration values. */\nexport const COM_DIALOG_DEFAULTS: ComDialogResolvedConfig = {\n data: undefined,\n size: 'md',\n disableClose: false,\n hasBackdrop: true,\n backdropClass: '',\n panelClass: '',\n autoFocus: 'first-tabbable',\n restoreFocus: true,\n ariaLabel: '',\n};\n\n/** Content that can be opened in a dialog. */\nexport type ComDialogContent<T = unknown> = ComponentType<T> | TemplateRef<T>;\n\n/** Template context when opening a TemplateRef dialog. */\nexport interface ComDialogTemplateContext<R = unknown, D = unknown> {\n $implicit: import('./dialog-ref').ComDialogRef<R>;\n data: D;\n}\n\n/** @internal Data passed to the dialog container. */\nexport interface ComDialogContainerData<D = unknown> {\n content: ComDialogContent;\n config: ComDialogResolvedConfig<D>;\n isTemplate: boolean;\n}\n","import {\n inject,\n Injectable,\n Injector,\n PLATFORM_ID,\n TemplateRef,\n} from '@angular/core';\nimport type { ComponentType } from '@angular/cdk/portal';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { Overlay } from '@angular/cdk/overlay';\n\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { filter, takeUntil } from 'rxjs/operators';\nimport { ComDialogRef } from './dialog-ref';\nimport { ComDialogContainerComponent } from './dialog-container.component';\nimport { COM_DIALOG_CONTAINER_REF } from './dialog-container-ref.token';\nimport { COM_DIALOG_CONFIG, COM_DIALOG_DATA } from './dialog.providers';\nimport { COM_DIALOG_DEFAULTS } from './dialog.models';\nimport type {\n ComDialogConfig,\n ComDialogContent,\n ComDialogResolvedConfig,\n} from './dialog.models';\n\n/**\n * Service for opening dialog modals imperatively.\n *\n * @example\n * ```typescript\n * const dialog = inject(ComDialog);\n *\n * // Open a component\n * const ref = dialog.open<boolean>(ConfirmComponent, { data: { id: 123 } });\n * ref.afterClosed().subscribe(result => {\n * if (result) performAction();\n * });\n *\n * // Open a template\n * dialog.open(templateRef, { size: 'sm' });\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class ComDialog {\n private readonly overlay = inject(Overlay);\n private readonly injector = inject(Injector);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly document = inject(DOCUMENT);\n private readonly globalConfig = inject(COM_DIALOG_CONFIG, { optional: true });\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly openDialogs: ComDialogRef<any>[] = [];\n\n /**\n * Open a dialog with the given component or template.\n *\n * @param content - The component class or TemplateRef to render inside the dialog.\n * @param config - Optional dialog configuration.\n * @returns A reference to the opened dialog.\n */\n open<R = unknown, D = unknown>(\n content: ComDialogContent,\n config?: ComDialogConfig<D>,\n ): ComDialogRef<R> {\n if (!isPlatformBrowser(this.platformId)) {\n return new ComDialogRef<R>();\n }\n\n const resolvedConfig = this.resolveConfig(config);\n const previouslyFocused = this.document.activeElement as HTMLElement | null;\n\n // Create the dialog ref\n const dialogRef = new ComDialogRef<R>();\n\n // Create a child injector with dialog-specific providers\n const isTemplate = content instanceof TemplateRef;\n const containerRef: { registerTitleId: (id: string) => void; registerContentId: (id: string) => void } = {\n registerTitleId: () => {},\n registerContentId: () => {},\n };\n const contentInjector = Injector.create({\n providers: [\n { provide: ComDialogRef, useValue: dialogRef },\n { provide: COM_DIALOG_DATA, useValue: resolvedConfig.data },\n { provide: COM_DIALOG_CONTAINER_REF, useValue: containerRef },\n ],\n parent: this.injector,\n });\n\n // Create CDK overlay\n const positionStrategy = this.overlay\n .position()\n .global()\n .centerHorizontally()\n .centerVertically();\n\n const overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.block(),\n hasBackdrop: false, // We handle backdrop ourselves for animation control\n panelClass: 'com-dialog-overlay',\n disposeOnNavigation: false,\n });\n\n dialogRef._overlayRef = overlayRef;\n\n // Attach the container component\n const portal = new ComponentPortal(\n ComDialogContainerComponent,\n null,\n contentInjector,\n );\n const containerComponentRef = overlayRef.attach(portal);\n const container = containerComponentRef.instance;\n\n // Wire up the container ref for ARIA registration\n containerRef.registerTitleId = (id: string) => container.registerTitleId(id);\n containerRef.registerContentId = (id: string) => container.registerContentId(id);\n\n // Configure the container\n container.config.set(resolvedConfig);\n container.dialogRef.set(dialogRef);\n container.isTemplate.set(isTemplate);\n\n if (isTemplate) {\n container.templateContent.set(content as TemplateRef<unknown>);\n } else {\n container.componentContent.set(content as ComponentType<unknown>);\n container.contentInjector.set(contentInjector);\n }\n\n // Wire up the close function\n dialogRef._closeFn = (result?: R) => {\n container.startClose(result);\n };\n\n // Subscribe to Escape key\n overlayRef\n .keydownEvents()\n .pipe(\n filter((event) => event.key === 'Escape'),\n takeUntil(dialogRef.afterClosed()),\n )\n .subscribe((event) => {\n if (!resolvedConfig.disableClose) {\n event.preventDefault();\n event.stopPropagation();\n dialogRef.close();\n }\n });\n\n // Track open dialog\n this.openDialogs.push(dialogRef);\n\n // Clean up after close\n dialogRef.afterClosed().subscribe(() => {\n const idx = this.openDialogs.indexOf(dialogRef);\n if (idx !== -1) {\n this.openDialogs.splice(idx, 1);\n }\n overlayRef.dispose();\n\n // Restore focus\n if (resolvedConfig.restoreFocus && previouslyFocused) {\n previouslyFocused.focus();\n }\n });\n\n // Show panel after a microtask to allow initial styles to apply\n requestAnimationFrame(() => {\n container.visible.set(true);\n });\n\n return dialogRef;\n }\n\n /** Close all open dialogs. */\n closeAll(): void {\n for (const ref of [...this.openDialogs]) {\n ref.close();\n }\n }\n\n /** Number of currently open dialogs. */\n get openDialogCount(): number {\n return this.openDialogs.length;\n }\n\n private resolveConfig<D>(config?: ComDialogConfig<D>): ComDialogResolvedConfig<D> {\n return {\n ...COM_DIALOG_DEFAULTS,\n ...this.globalConfig,\n ...config,\n } as ComDialogResolvedConfig<D>;\n }\n}\n","import { Directive, inject, signal } from '@angular/core';\nimport type { OnInit, WritableSignal } from '@angular/core';\nimport { generateDialogTitleId } from './dialog.utils';\nimport { COM_DIALOG_CONTAINER_REF } from './dialog-container-ref.token';\nimport { dialogTitleVariants } from './dialog.variants';\nimport { mergeClasses } from './dialog.utils';\n\n/**\n * Marks an element as the dialog title. Sets up aria-labelledby\n * binding on the dialog container.\n *\n * @example\n * ```html\n * <h2 comDialogTitle>Delete item</h2>\n * ```\n *\n * @tokens `--color-foreground`\n */\n@Directive({\n selector: '[comDialogTitle]',\n exportAs: 'comDialogTitle',\n host: {\n '[id]': 'id()',\n '[class]': 'classes()',\n },\n})\nexport class ComDialogTitle implements OnInit {\n private readonly containerRef = inject(COM_DIALOG_CONTAINER_REF, { optional: true });\n\n /** Unique ID for aria-labelledby binding. */\n readonly id: WritableSignal<string> = signal(generateDialogTitleId());\n\n /** Computed CSS classes. */\n readonly classes: WritableSignal<string> = signal(mergeClasses(dialogTitleVariants()));\n\n ngOnInit(): void {\n this.containerRef?.registerTitleId(this.id());\n }\n}\n","import { Directive, inject, signal } from '@angular/core';\nimport type { OnInit, WritableSignal } from '@angular/core';\nimport { generateDialogContentId } from './dialog.utils';\nimport { COM_DIALOG_CONTAINER_REF } from './dialog-container-ref.token';\nimport { dialogContentVariants } from './dialog.variants';\nimport { mergeClasses } from './dialog.utils';\n\n/**\n * Marks an element as the dialog content area. Sets up aria-describedby\n * binding on the dialog container.\n *\n * @example\n * ```html\n * <div comDialogContent>\n * <p>Are you sure you want to delete this item?</p>\n * </div>\n * ```\n *\n * @tokens `--color-muted-foreground`\n */\n@Directive({\n selector: '[comDialogContent]',\n exportAs: 'comDialogContent',\n host: {\n '[id]': 'id()',\n '[class]': 'classes()',\n },\n})\nexport class ComDialogContent implements OnInit {\n private readonly containerRef = inject(COM_DIALOG_CONTAINER_REF, { optional: true });\n\n /** Unique ID for aria-describedby binding. */\n readonly id: WritableSignal<string> = signal(generateDialogContentId());\n\n /** Computed CSS classes. */\n readonly classes: WritableSignal<string> = signal(mergeClasses(dialogContentVariants()));\n\n ngOnInit(): void {\n this.containerRef?.registerContentId(this.id());\n }\n}\n","import { Directive, signal } from '@angular/core';\nimport type { WritableSignal } from '@angular/core';\nimport { dialogActionsVariants } from './dialog.variants';\nimport { mergeClasses } from './dialog.utils';\n\n/**\n * Marks an element as the dialog actions area (footer with buttons).\n *\n * @tokens none\n *\n * @example\n * ```html\n * <div comDialogActions>\n * <button comButton variant=\"outline\" [comDialogClose]=\"false\">Cancel</button>\n * <button comButton [comDialogClose]=\"true\">Confirm</button>\n * </div>\n * ```\n */\n@Directive({\n selector: '[comDialogActions]',\n exportAs: 'comDialogActions',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class ComDialogActions {\n /** Computed CSS classes. */\n readonly classes: WritableSignal<string> = signal(mergeClasses(dialogActionsVariants()));\n}\n","import { Directive, inject, input } from '@angular/core';\nimport type { InputSignal } from '@angular/core';\nimport { ComDialogRef } from './dialog-ref';\n\n/**\n * Closes the nearest dialog when the host element is clicked.\n * Optionally passes a result value.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <button comButton [comDialogClose]=\"false\">Cancel</button>\n * <button comButton [comDialogClose]=\"true\">Confirm</button>\n * ```\n */\n@Directive({\n selector: '[comDialogClose]',\n exportAs: 'comDialogClose',\n host: {\n '(click)': 'onClick()',\n },\n})\nexport class ComDialogClose {\n private readonly dialogRef = inject(ComDialogRef);\n\n /** The result value to pass when closing the dialog. */\n readonly comDialogClose: InputSignal<unknown> = input<unknown>(undefined);\n\n protected onClick(): void {\n this.dialogRef.close(this.comDialogClose());\n }\n}\n","// Public API for the dialog system\n\n// Service\nexport { ComDialog } from './dialog.service';\n\n// Ref\nexport { ComDialogRef } from './dialog-ref';\n\n// Directives\nexport { ComDialogTitle } from './dialog-title.directive';\nexport { ComDialogContent } from './dialog-content.directive';\nexport { ComDialogActions } from './dialog-actions.directive';\nexport { ComDialogClose } from './dialog-close.directive';\n\n// Types\nexport type {\n ComDialogConfig,\n ComDialogSize,\n ComDialogTemplateContext,\n} from './dialog.models';\n\n// Providers\nexport { COM_DIALOG_DATA, COM_DIALOG_CONFIG, provideComDialogConfig } from './dialog.providers';\n\n// Variants (for advanced customization)\nexport {\n dialogBackdropVariants,\n dialogPanelVariants,\n dialogTitleVariants,\n dialogContentVariants,\n dialogActionsVariants,\n} from './dialog.variants';\nexport type { DialogPanelVariantProps } from './dialog.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAGA;;;AAGG;MACU,YAAY,CAAA;AACN,IAAA,kBAAkB,GAAG,IAAI,OAAO,EAAiB;AACjD,IAAA,oBAAoB,GAAG,IAAI,OAAO,EAAc;IACzD,MAAM,GAAG,KAAK;;IAGtB,WAAW,GAAsB,IAAI;;IAGrC,QAAQ,GAAkC,IAAI;AAE9C;;AAEG;AACH,IAAA,KAAK,CAAC,MAAU,EAAA;QACd,IAAI,IAAI,CAAC,MAAM;YAAE;AACjB,QAAA,IAAI,CAAC,QAAQ,G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,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACvB,qBAAA;AACF,iBAAA;;;ACpBD;;;;;;;;;;;AAWG;MAQU,cAAc,CAAA;AACR,IAAA,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;;AAGxC,IAAA,cAAc,GAAyB,KAAK,CAAU,SAAS,0DAAC;IAE/D,OAAO,GAAA;QACf,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;IAC7C;uGARW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAd,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACvB,qBAAA;AACF,iBAAA;;;ACtBD;AAEA;;ACFA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-com-components-dialog.mjs","sources":["../../../projects/com/components/dialog/dialog-ref.ts","../../../projects/com/components/dialog/dialog.variants.ts","../../../projects/com/components/dialog/dialog.utils.ts","../../../projects/com/components/dialog/dialog-container.component.ts","../../../projects/com/components/dialog/dialog-container-ref.token.ts","../../../projects/com/components/dialog/dialog.providers.ts","../../../projects/com/components/dialog/dialog.models.ts","../../../projects/com/components/dialog/dialog.service.ts","../../../projects/com/components/dialog/dialog-title.directive.ts","../../../projects/com/components/dialog/dialog-content.directive.ts","../../../projects/com/components/dialog/dialog-actions.directive.ts","../../../projects/com/components/dialog/dialog-close.directive.ts","../../../projects/com/components/dialog/index.ts","../../../projects/com/components/dialog/ngx-com-components-dialog.ts"],"sourcesContent":["import { Observable, Subject } from 'rxjs';\nimport type { OverlayRef } from '@angular/cdk/overlay';\n\n/**\n * Reference to an open dialog instance.\n * Returned by `ComDialog.open()` for programmatic control.\n */\nexport class ComDialogRef<R = unknown> {\n private readonly afterClosedSubject = new Subject<R | undefined>();\n private readonly backdropClickSubject = new Subject<MouseEvent>();\n private closed = false;\n\n /** @internal */\n _overlayRef: OverlayRef | null = null;\n\n /** @internal */\n _closeFn: ((result?: R) => void) | null = null;\n\n /**\n * Close the dialog, optionally passing a result value.\n */\n close(result?: R): void {\n if (this.closed) return;\n this._closeFn?.(result);\n }\n\n /**\n * Emits the result once after the dialog is fully closed and disposed.\n */\n afterClosed(): Observable<R | undefined> {\n return this.afterClosedSubject.asObservable();\n }\n\n /**\n * Emits each time the backdrop is clicked.\n */\n backdropClick(): Observable<MouseEvent> {\n return this.backdropClickSubject.asObservable();\n }\n\n /**\n * Proxies keydown events from the overlay.\n */\n keydownEvents(): Observable<KeyboardEvent> {\n return this._overlayRef?.keydownEvents() ?? new Observable();\n }\n\n /** @internal Called by the service after exit animation completes. */\n _notifyClosed(result?: R): void {\n if (this.closed) return;\n this.closed = true;\n this.afterClosedSubject.next(result);\n this.afterClosedSubject.complete();\n this.backdropClickSubject.complete();\n }\n\n /** @internal Forward backdrop click from overlay. */\n _notifyBackdropClick(event: MouseEvent): void {\n this.backdropClickSubject.next(event);\n }\n}\n","import { cva } from 'class-variance-authority';\nimport type { VariantProps } from 'class-variance-authority';\n\n/**\n * CVA variants for the dialog backdrop.\n *\n * @tokens `--color-backdrop`\n */\nexport const dialogBackdropVariants: (props?: {\n visible?: boolean;\n}) => string = cva(\n [\n 'fixed',\n 'inset-0',\n 'z-50',\n 'bg-backdrop',\n 'backdrop-blur-sm',\n ],\n {\n variants: {\n visible: {\n true: 'animate-in fade-in-0',\n false: 'animate-out fade-out-0',\n },\n },\n defaultVariants: {\n visible: true,\n },\n },\n);\n\n/**\n * CVA variants for the dialog panel container.\n *\n * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`,\n * `--shadow-dialog`, `--radius-overlay`\n */\nexport const dialogPanelVariants: (props?: {\n size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';\n visible?: boolean;\n}) => string = cva(\n [\n 'com-dialog-panel',\n 'fixed',\n 'left-1/2',\n 'top-1/2',\n '-translate-x-1/2',\n '-translate-y-1/2',\n 'z-50',\n 'flex',\n 'flex-col',\n 'border',\n 'border-border',\n 'bg-popover',\n 'text-popover-foreground',\n 'shadow-dialog',\n 'rounded-overlay',\n 'outline-none',\n ],\n {\n variants: {\n size: {\n sm: 'w-full max-w-sm max-h-[85vh] p-6',\n md: 'w-full max-w-lg max-h-[85vh] p-6',\n lg: 'w-full max-w-2xl max-h-[85vh] p-6',\n xl: 'w-full max-w-4xl max-h-[85vh] p-6',\n full: 'w-screen h-screen max-w-none max-h-none rounded-none border-none p-6',\n },\n visible: {\n true: 'animate-in fade-in-0 zoom-in-95',\n false: 'animate-out fade-out-0 zoom-out-95',\n },\n },\n defaultVariants: {\n size: 'md',\n visible: true,\n },\n },\n);\n\n/** Type helper for dialog panel variant props. */\nexport type DialogPanelVariantProps = VariantProps<typeof dialogPanelVariants>;\n\n/**\n * CVA variants for the dialog title.\n *\n * @tokens `--color-foreground`\n */\nexport const dialogTitleVariants: () => string = cva([\n 'font-heading',\n 'text-lg',\n 'font-semibold',\n 'tracking-tight',\n 'text-foreground',\n]);\n\n/**\n * CVA variants for the dialog content area.\n *\n * @tokens `--color-muted-foreground`\n */\nexport const dialogContentVariants: () => string = cva([\n 'flex-1',\n 'overflow-y-auto',\n 'py-4',\n 'text-sm',\n 'text-muted-foreground',\n]);\n\n/**\n * CVA variants for the dialog actions area.\n */\nexport const dialogActionsVariants: () => string = cva([\n 'flex',\n 'flex-col-reverse',\n 'sm:flex-row',\n 'sm:justify-end',\n 'gap-2',\n 'pt-4',\n]);\n","export { mergeClasses } from 'ngx-com/utils';\n\nlet dialogIdCounter = 0;\n\n/** Generate a unique ID for a dialog title element. */\nexport function generateDialogTitleId(): string {\n return `com-dialog-title-${++dialogIdCounter}`;\n}\n\n/** Generate a unique ID for a dialog content element. */\nexport function generateDialogContentId(): string {\n return `com-dialog-content-${++dialogIdCounter}`;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n Injector,\n signal,\n viewChild,\n} from '@angular/core';\nimport type { AfterViewInit, Signal, TemplateRef, WritableSignal } from '@angular/core';\nimport { NgComponentOutlet, NgStyle, NgTemplateOutlet } from '@angular/common';\nimport { FocusTrap, FocusTrapFactory } from '@angular/cdk/a11y';\nimport type { ComponentType } from '@angular/cdk/portal';\nimport { ComDialogRef } from './dialog-ref';\n\nimport type { DialogContainerRef } from './dialog-container-ref.token';\nimport { dialogBackdropVariants, dialogPanelVariants } from './dialog.variants';\nimport { mergeClasses } from './dialog.utils';\nimport type {\n ComDialogResolvedConfig,\n ComDialogTemplateContext,\n} from './dialog.models';\n\n/** Fallback timeout for exit animation when animationend doesn't fire. */\nconst ANIMATION_FALLBACK_MS = 200;\n\n/** Convert a dimension value to a CSS string. Numbers default to pixels. */\nfunction toCssValue(value: string | number): string {\n return typeof value === 'number' ? `${value}px` : value;\n}\n\n/**\n * Internal dialog container component rendered inside the CDK overlay.\n * Hosts the user's component or template and manages focus trap, animation, and ARIA.\n *\n * @internal Not exported in public API\n *\n * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`,\n * `--color-foreground`, `--color-muted-foreground`, `--color-backdrop`,\n * `--shadow-dialog`, `--radius-overlay`, `--font-heading`\n */\n@Component({\n selector: 'com-dialog-container',\n template: `\n @if (config()?.hasBackdrop) {\n <div\n [class]=\"backdropClasses()\"\n [attr.data-state]=\"visible() ? 'open' : 'closed'\"\n aria-hidden=\"true\"\n (click)=\"onBackdropClick($event)\"\n ></div>\n }\n <div\n #panelElement\n [class]=\"panelClasses()\"\n [ngStyle]=\"panelStyles()\"\n [attr.role]=\"config()?.role ?? 'dialog'\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"titleId() || null\"\n [attr.aria-describedby]=\"contentId() || null\"\n [attr.aria-label]=\"!titleId() && config()?.ariaLabel ? config()!.ariaLabel : null\"\n [attr.data-state]=\"visible() ? 'open' : 'closed'\"\n tabindex=\"-1\"\n (animationend)=\"onAnimationEnd()\"\n >\n @if (isTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"templateContent()!\"\n [ngTemplateOutletContext]=\"templateContext()\"\n />\n } @else if (componentContent(); as comp) {\n @if (contentInjector(); as inj) {\n <ng-container\n *ngComponentOutlet=\"comp; injector: inj\"\n />\n }\n }\n </div>\n `,\n styles: `\n :host {\n display: contents;\n }\n\n [data-state='open'] {\n --tw-enter-opacity: 0;\n --tw-enter-scale: 0.95;\n }\n\n [data-state='closed'] {\n --tw-exit-opacity: 0;\n --tw-exit-scale: 0.95;\n }\n\n @media (prefers-reduced-motion: reduce) {\n [data-state='open'],\n [data-state='closed'] {\n animation: none;\n }\n }\n `,\n imports: [NgTemplateOutlet, NgComponentOutlet, NgStyle],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ComDialogContainerComponent implements AfterViewInit, DialogContainerRef {\n private readonly focusTrapFactory = inject(FocusTrapFactory);\n private focusTrap: FocusTrap | null = null;\n private animationFallback: ReturnType<typeof setTimeout> | null = null;\n private closing = false;\n private pendingResult: unknown = undefined;\n\n private readonly panelElement = viewChild<ElementRef<HTMLElement>>('panelElement');\n\n /** Resolved dialog configuration, set by the service. */\n readonly config: WritableSignal<ComDialogResolvedConfig | null> = signal(null);\n\n /** Whether the panel is visible (for animation state). */\n readonly visible: WritableSignal<boolean> = signal(false);\n\n /** The dialog ref for this instance, set by the service. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly dialogRef: WritableSignal<ComDialogRef<any> | null> = signal(null);\n\n /** Injector for content component, set by the service. */\n readonly contentInjector: WritableSignal<Injector | null> = signal(null);\n\n // ─── Content signals (set by service) ───\n\n /** Whether the content is a TemplateRef. */\n readonly isTemplate: WritableSignal<boolean> = signal(false);\n\n /** Template ref content (when isTemplate is true). */\n readonly templateContent: WritableSignal<TemplateRef<unknown> | null> = signal(null);\n\n /** Component type content (when isTemplate is false). */\n readonly componentContent: WritableSignal<ComponentType<unknown> | null> = signal(null);\n\n // ─── ARIA ID registration ───\n\n /** ID of the title directive for aria-labelledby. */\n readonly titleId: WritableSignal<string> = signal('');\n\n /** ID of the content directive for aria-describedby. */\n readonly contentId: WritableSignal<string> = signal('');\n\n /** Register a title element ID (called by ComDialogTitle directive). */\n registerTitleId(id: string): void {\n this.titleId.set(id);\n }\n\n /** Register a content element ID (called by ComDialogContent directive). */\n registerContentId(id: string): void {\n this.contentId.set(id);\n }\n\n // ─── Computed classes ───\n\n protected readonly backdropClasses: Signal<string> = computed(() =>\n mergeClasses(\n dialogBackdropVariants({ visible: this.visible() }),\n this.config()?.backdropClass ?? '',\n ),\n );\n\n protected readonly panelClasses: Signal<string> = computed(() =>\n mergeClasses(\n dialogPanelVariants({\n size: this.config()?.size ?? 'md',\n visible: this.visible(),\n }),\n this.config()?.panelClass ?? '',\n ),\n );\n\n /**\n * Inline styles for dimension overrides on the panel element.\n * When set, these override CVA size variant dimensions via CSS specificity.\n */\n protected readonly panelStyles: Signal<Record<string, string> | null> = computed(() => {\n const c = this.config();\n if (!c) return null;\n const styles: Record<string, string> = {};\n if (c.width != null) styles['width'] = c.width;\n if (c.height != null) styles['height'] = c.height;\n if (c.minWidth != null) styles['min-width'] = toCssValue(c.minWidth);\n if (c.minHeight != null) styles['min-height'] = toCssValue(c.minHeight);\n if (c.maxWidth != null) styles['max-width'] = toCssValue(c.maxWidth);\n if (c.maxHeight != null) styles['max-height'] = toCssValue(c.maxHeight);\n return Object.keys(styles).length > 0 ? styles : null;\n });\n\n /** Template context for TemplateRef-based dialogs. */\n protected readonly templateContext: Signal<ComDialogTemplateContext> = computed(() => ({\n $implicit: this.dialogRef()!,\n data: this.config()?.data,\n }));\n\n ngAfterViewInit(): void {\n this.setupFocusTrap();\n }\n\n /** Handle backdrop click. */\n protected onBackdropClick(event: MouseEvent): void {\n const ref = this.dialogRef();\n if (ref) {\n ref._notifyBackdropClick(event);\n }\n if (!this.config()?.disableClose) {\n this.dialogRef()?.close();\n }\n }\n\n /** Start the close animation sequence. */\n startClose(result?: unknown): void {\n if (this.closing) return;\n this.closing = true;\n this.pendingResult = result;\n this.visible.set(false);\n\n // Fallback in case animationend doesn't fire\n this.animationFallback = setTimeout(() => this.finishClose(), ANIMATION_FALLBACK_MS);\n }\n\n /** Handle animation end on the panel. */\n protected onAnimationEnd(): void {\n if (this.closing) {\n this.finishClose();\n }\n }\n\n /** Clean up focus trap. */\n destroyFocusTrap(): void {\n this.focusTrap?.destroy();\n this.focusTrap = null;\n }\n\n private finishClose(): void {\n if (this.animationFallback !== null) {\n clearTimeout(this.animationFallback);\n this.animationFallback = null;\n }\n this.destroyFocusTrap();\n this.dialogRef()?._notifyClosed(this.pendingResult);\n }\n\n private setupFocusTrap(): void {\n const panelEl = this.panelElement()?.nativeElement;\n if (!panelEl) return;\n\n this.focusTrap = this.focusTrapFactory.create(panelEl);\n\n const autoFocus = this.config()?.autoFocus ?? 'first-tabbable';\n if (autoFocus === 'first-tabbable') {\n this.focusTrap.focusInitialElementWhenReady();\n } else if (autoFocus === 'dialog') {\n panelEl.focus();\n }\n // autoFocus === false: don't move focus\n }\n}\n","import { InjectionToken } from '@angular/core';\n\n/** Interface for the dialog container that directives can register with. */\nexport interface DialogContainerRef {\n registerTitleId(id: string): void;\n registerContentId(id: string): void;\n}\n\n/**\n * Injection token allowing dialog directives to register their element IDs\n * with the container for ARIA binding.\n * @internal\n */\nexport const COM_DIALOG_CONTAINER_REF: InjectionToken<DialogContainerRef> =\n new InjectionToken<DialogContainerRef>('COM_DIALOG_CONTAINER_REF');\n","import { InjectionToken } from '@angular/core';\nimport type { Provider } from '@angular/core';\nimport type { ComDialogConfig } from './dialog.models';\n\n/**\n * Injection token for data passed to a dialog component.\n *\n * @example\n * ```typescript\n * readonly data = inject<MyData>(COM_DIALOG_DATA);\n * ```\n */\nexport const COM_DIALOG_DATA: InjectionToken<unknown> =\n new InjectionToken<unknown>('COM_DIALOG_DATA');\n\n/**\n * Injection token for global dialog configuration defaults.\n * @internal\n */\nexport const COM_DIALOG_CONFIG: InjectionToken<ComDialogConfig> =\n new InjectionToken<ComDialogConfig>('COM_DIALOG_CONFIG');\n\n/**\n * Provides global dialog configuration defaults.\n *\n * @example\n * ```typescript\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideComDialogConfig({ size: 'lg', hasBackdrop: true }),\n * ],\n * });\n * ```\n */\nexport function provideComDialogConfig(config: ComDialogConfig): Provider {\n return { provide: COM_DIALOG_CONFIG, useValue: config };\n}\n","import type { Injector, StaticProvider, TemplateRef, ViewContainerRef } from '@angular/core';\nimport type { PositionStrategy, ScrollStrategy } from '@angular/cdk/overlay';\nimport type { ComponentType } from '@angular/cdk/portal';\n\n/** Available dialog size variants. */\nexport type ComDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';\n\n/** ARIA role for the dialog panel. */\nexport type ComDialogRole = 'dialog' | 'alertdialog';\n\n/** Where to restore focus after the dialog closes. */\nexport type ComRestoreFocusTarget = boolean | string | HTMLElement;\n\n/** Configuration for opening a dialog. */\nexport interface ComDialogConfig<D = unknown> {\n /** Data to inject via COM_DIALOG_DATA. */\n data?: D;\n /** Dialog panel width variant. */\n size?: ComDialogSize;\n /** Prevent Escape and backdrop click from closing. */\n disableClose?: boolean;\n /** Show backdrop overlay. */\n hasBackdrop?: boolean;\n /** Additional CSS class(es) on the backdrop. */\n backdropClass?: string | string[];\n /** Additional CSS class(es) on the container panel. */\n panelClass?: string | string[];\n /** Where to send focus on open. */\n autoFocus?: 'first-tabbable' | 'dialog' | false;\n /**\n * Controls focus restoration after the dialog closes.\n * - `true`: restore focus to the previously focused element (default).\n * - `false`: do not restore focus.\n * - `string`: CSS selector — the first matching element receives focus.\n * - `HTMLElement`: the specific element receives focus.\n */\n restoreFocus?: ComRestoreFocusTarget;\n /** Fallback aria-label if no comDialogTitle is projected. */\n ariaLabel?: string;\n /** ARIA role on the dialog panel. Use `'alertdialog'` for confirmations/destructive actions. */\n role?: ComDialogRole;\n /**\n * Custom parent injector for dialog content.\n * Takes precedence over `viewContainerRef` injector.\n */\n injector?: Injector;\n /**\n * Determines logical Angular tree placement for DI resolution.\n * Its injector is used as parent when `injector` is not set.\n */\n viewContainerRef?: ViewContainerRef;\n /** Additional providers injected into the dialog content's injector. */\n providers?: StaticProvider[];\n /** Custom CDK position strategy. Defaults to globally centered. */\n positionStrategy?: PositionStrategy;\n /** Custom CDK scroll strategy. Defaults to block scroll. */\n scrollStrategy?: ScrollStrategy;\n /** Explicit CSS width on the panel (e.g. `'600px'`, `'80vw'`). Overrides size variant width. */\n width?: string;\n /** Explicit CSS height on the panel. */\n height?: string;\n /** CSS min-width on the panel. Numbers are treated as pixels. */\n minWidth?: string | number;\n /** CSS min-height on the panel. Numbers are treated as pixels. */\n minHeight?: string | number;\n /** CSS max-width on the panel. Numbers are treated as pixels. Overrides size variant max-width. */\n maxWidth?: string | number;\n /** CSS max-height on the panel. Numbers are treated as pixels. Overrides size variant max-height. */\n maxHeight?: string | number;\n}\n\n/** Resolved config with defaults applied. Strategy/injector/dimension fields remain optional. */\nexport interface ComDialogResolvedConfig<D = unknown> {\n data: D | undefined;\n size: ComDialogSize;\n disableClose: boolean;\n hasBackdrop: boolean;\n backdropClass: string | string[];\n panelClass: string | string[];\n autoFocus: 'first-tabbable' | 'dialog' | false;\n restoreFocus: ComRestoreFocusTarget;\n ariaLabel: string;\n role: ComDialogRole;\n injector?: Injector;\n viewContainerRef?: ViewContainerRef;\n providers?: StaticProvider[];\n positionStrategy?: PositionStrategy;\n scrollStrategy?: ScrollStrategy;\n width?: string;\n height?: string;\n minWidth?: string | number;\n minHeight?: string | number;\n maxWidth?: string | number;\n maxHeight?: string | number;\n}\n\n/** Default dialog configuration values. */\nexport const COM_DIALOG_DEFAULTS: ComDialogResolvedConfig = {\n data: undefined,\n size: 'md',\n disableClose: false,\n hasBackdrop: true,\n backdropClass: '',\n panelClass: '',\n autoFocus: 'first-tabbable',\n restoreFocus: true,\n ariaLabel: '',\n role: 'dialog',\n};\n\n/** Content that can be opened in a dialog. */\nexport type ComDialogContent<T = unknown> = ComponentType<T> | TemplateRef<T>;\n\n/** Template context when opening a TemplateRef dialog. */\nexport interface ComDialogTemplateContext<R = unknown, D = unknown> {\n $implicit: import('./dialog-ref').ComDialogRef<R>;\n data: D;\n}\n\n/** @internal Data passed to the dialog container. */\nexport interface ComDialogContainerData<D = unknown> {\n content: ComDialogContent;\n config: ComDialogResolvedConfig<D>;\n isTemplate: boolean;\n}\n","import {\n inject,\n Injectable,\n Injector,\n PLATFORM_ID,\n TemplateRef,\n} from '@angular/core';\nimport type { ComponentType } from '@angular/cdk/portal';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { Overlay } from '@angular/cdk/overlay';\n\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { filter, takeUntil } from 'rxjs/operators';\nimport { ComDialogRef } from './dialog-ref';\nimport { ComDialogContainerComponent } from './dialog-container.component';\nimport { COM_DIALOG_CONTAINER_REF } from './dialog-container-ref.token';\nimport { COM_DIALOG_CONFIG, COM_DIALOG_DATA } from './dialog.providers';\nimport { COM_DIALOG_DEFAULTS } from './dialog.models';\nimport type {\n ComDialogConfig,\n ComDialogContent,\n ComDialogResolvedConfig,\n} from './dialog.models';\n\n/**\n * Service for opening dialog modals imperatively.\n *\n * @example\n * ```typescript\n * const dialog = inject(ComDialog);\n *\n * // Open a component\n * const ref = dialog.open<boolean>(ConfirmComponent, { data: { id: 123 } });\n * ref.afterClosed().subscribe(result => {\n * if (result) performAction();\n * });\n *\n * // Open a template\n * dialog.open(templateRef, { size: 'sm' });\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class ComDialog {\n private readonly overlay = inject(Overlay);\n private readonly injector = inject(Injector);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly document = inject(DOCUMENT);\n private readonly globalConfig = inject(COM_DIALOG_CONFIG, { optional: true });\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly openDialogs: ComDialogRef<any>[] = [];\n\n /**\n * Open a dialog with the given component or template.\n *\n * @param content - The component class or TemplateRef to render inside the dialog.\n * @param config - Optional dialog configuration.\n * @returns A reference to the opened dialog.\n */\n open<R = unknown, D = unknown>(\n content: ComDialogContent,\n config?: ComDialogConfig<D>,\n ): ComDialogRef<R> {\n if (!isPlatformBrowser(this.platformId)) {\n return new ComDialogRef<R>();\n }\n\n const resolvedConfig = this.resolveConfig(config);\n const previouslyFocused = this.document.activeElement as HTMLElement | null;\n\n // Create the dialog ref\n const dialogRef = new ComDialogRef<R>();\n\n // Create a child injector with dialog-specific providers\n const isTemplate = content instanceof TemplateRef;\n const containerRef: { registerTitleId: (id: string) => void; registerContentId: (id: string) => void } = {\n registerTitleId: () => {},\n registerContentId: () => {},\n };\n\n // Resolve parent injector: config.injector > config.viewContainerRef.injector > service injector\n const parentInjector =\n resolvedConfig.injector ??\n resolvedConfig.viewContainerRef?.injector ??\n this.injector;\n\n const contentInjector = Injector.create({\n providers: [\n ...(resolvedConfig.providers ?? []),\n { provide: ComDialogRef, useValue: dialogRef },\n { provide: COM_DIALOG_DATA, useValue: resolvedConfig.data },\n { provide: COM_DIALOG_CONTAINER_REF, useValue: containerRef },\n ],\n parent: parentInjector,\n });\n\n // Create CDK overlay\n const positionStrategy = resolvedConfig.positionStrategy ??\n this.overlay\n .position()\n .global()\n .centerHorizontally()\n .centerVertically();\n\n const overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: resolvedConfig.scrollStrategy ?? this.overlay.scrollStrategies.block(),\n hasBackdrop: false, // We handle backdrop ourselves for animation control\n panelClass: 'com-dialog-overlay',\n disposeOnNavigation: false,\n });\n\n dialogRef._overlayRef = overlayRef;\n\n // Attach the container component\n const portal = new ComponentPortal(\n ComDialogContainerComponent,\n null,\n contentInjector,\n );\n const containerComponentRef = overlayRef.attach(portal);\n const container = containerComponentRef.instance;\n\n // Wire up the container ref for ARIA registration\n containerRef.registerTitleId = (id: string) => container.registerTitleId(id);\n containerRef.registerContentId = (id: string) => container.registerContentId(id);\n\n // Configure the container\n container.config.set(resolvedConfig);\n container.dialogRef.set(dialogRef);\n container.isTemplate.set(isTemplate);\n\n if (isTemplate) {\n container.templateContent.set(content as TemplateRef<unknown>);\n } else {\n container.componentContent.set(content as ComponentType<unknown>);\n container.contentInjector.set(contentInjector);\n }\n\n // Wire up the close function\n dialogRef._closeFn = (result?: R) => {\n container.startClose(result);\n };\n\n // Subscribe to Escape key\n overlayRef\n .keydownEvents()\n .pipe(\n filter((event) => event.key === 'Escape'),\n takeUntil(dialogRef.afterClosed()),\n )\n .subscribe((event) => {\n if (!resolvedConfig.disableClose) {\n event.preventDefault();\n event.stopPropagation();\n dialogRef.close();\n }\n });\n\n // Track open dialog\n this.openDialogs.push(dialogRef);\n\n // Clean up after close\n dialogRef.afterClosed().subscribe(() => {\n const idx = this.openDialogs.indexOf(dialogRef);\n if (idx !== -1) {\n this.openDialogs.splice(idx, 1);\n }\n overlayRef.dispose();\n\n // Restore focus\n const { restoreFocus } = resolvedConfig;\n if (restoreFocus === true && previouslyFocused) {\n previouslyFocused.focus();\n } else if (typeof restoreFocus === 'string') {\n (this.document.querySelector(restoreFocus) as HTMLElement | null)?.focus();\n } else if (restoreFocus instanceof HTMLElement) {\n restoreFocus.focus();\n }\n });\n\n // Show panel after a microtask to allow initial styles to apply\n requestAnimationFrame(() => {\n container.visible.set(true);\n });\n\n return dialogRef;\n }\n\n /** Close all open dialogs. */\n closeAll(): void {\n for (const ref of [...this.openDialogs]) {\n ref.close();\n }\n }\n\n /** Number of currently open dialogs. */\n get openDialogCount(): number {\n return this.openDialogs.length;\n }\n\n private resolveConfig<D>(config?: ComDialogConfig<D>): ComDialogResolvedConfig<D> {\n return {\n ...COM_DIALOG_DEFAULTS,\n ...this.globalConfig,\n ...config,\n } as ComDialogResolvedConfig<D>;\n }\n}\n","import { Directive, inject, signal } from '@angular/core';\nimport type { OnInit, WritableSignal } from '@angular/core';\nimport { generateDialogTitleId } from './dialog.utils';\nimport { COM_DIALOG_CONTAINER_REF } from './dialog-container-ref.token';\nimport { dialogTitleVariants } from './dialog.variants';\nimport { mergeClasses } from './dialog.utils';\n\n/**\n * Marks an element as the dialog title. Sets up aria-labelledby\n * binding on the dialog container.\n *\n * @example\n * ```html\n * <h2 comDialogTitle>Delete item</h2>\n * ```\n *\n * @tokens `--color-foreground`\n */\n@Directive({\n selector: '[comDialogTitle]',\n exportAs: 'comDialogTitle',\n host: {\n '[id]': 'id()',\n '[class]': 'classes()',\n },\n})\nexport class ComDialogTitle implements OnInit {\n private readonly containerRef = inject(COM_DIALOG_CONTAINER_REF, { optional: true });\n\n /** Unique ID for aria-labelledby binding. */\n readonly id: WritableSignal<string> = signal(generateDialogTitleId());\n\n /** Computed CSS classes. */\n readonly classes: WritableSignal<string> = signal(mergeClasses(dialogTitleVariants()));\n\n ngOnInit(): void {\n this.containerRef?.registerTitleId(this.id());\n }\n}\n","import { Directive, inject, signal } from '@angular/core';\nimport type { OnInit, WritableSignal } from '@angular/core';\nimport { generateDialogContentId } from './dialog.utils';\nimport { COM_DIALOG_CONTAINER_REF } from './dialog-container-ref.token';\nimport { dialogContentVariants } from './dialog.variants';\nimport { mergeClasses } from './dialog.utils';\n\n/**\n * Marks an element as the dialog content area. Sets up aria-describedby\n * binding on the dialog container.\n *\n * @example\n * ```html\n * <div comDialogContent>\n * <p>Are you sure you want to delete this item?</p>\n * </div>\n * ```\n *\n * @tokens `--color-muted-foreground`\n */\n@Directive({\n selector: '[comDialogContent]',\n exportAs: 'comDialogContent',\n host: {\n '[id]': 'id()',\n '[class]': 'classes()',\n },\n})\nexport class ComDialogContent implements OnInit {\n private readonly containerRef = inject(COM_DIALOG_CONTAINER_REF, { optional: true });\n\n /** Unique ID for aria-describedby binding. */\n readonly id: WritableSignal<string> = signal(generateDialogContentId());\n\n /** Computed CSS classes. */\n readonly classes: WritableSignal<string> = signal(mergeClasses(dialogContentVariants()));\n\n ngOnInit(): void {\n this.containerRef?.registerContentId(this.id());\n }\n}\n","import { Directive, signal } from '@angular/core';\nimport type { WritableSignal } from '@angular/core';\nimport { dialogActionsVariants } from './dialog.variants';\nimport { mergeClasses } from './dialog.utils';\n\n/**\n * Marks an element as the dialog actions area (footer with buttons).\n *\n * @tokens none\n *\n * @example\n * ```html\n * <div comDialogActions>\n * <button comButton variant=\"outline\" [comDialogClose]=\"false\">Cancel</button>\n * <button comButton [comDialogClose]=\"true\">Confirm</button>\n * </div>\n * ```\n */\n@Directive({\n selector: '[comDialogActions]',\n exportAs: 'comDialogActions',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class ComDialogActions {\n /** Computed CSS classes. */\n readonly classes: WritableSignal<string> = signal(mergeClasses(dialogActionsVariants()));\n}\n","import { Directive, inject, input } from '@angular/core';\nimport type { InputSignal } from '@angular/core';\nimport { ComDialogRef } from './dialog-ref';\n\n/**\n * Closes the nearest dialog when the host element is clicked.\n * Optionally passes a result value.\n *\n * @tokens none\n *\n * @example\n * ```html\n * <button comButton [comDialogClose]=\"false\">Cancel</button>\n * <button comButton [comDialogClose]=\"true\">Confirm</button>\n * ```\n */\n@Directive({\n selector: '[comDialogClose]',\n exportAs: 'comDialogClose',\n host: {\n '(click)': 'onClick()',\n },\n})\nexport class ComDialogClose {\n private readonly dialogRef = inject(ComDialogRef);\n\n /** The result value to pass when closing the dialog. */\n readonly comDialogClose: InputSignal<unknown> = input<unknown>(undefined);\n\n protected onClick(): void {\n this.dialogRef.close(this.comDialogClose());\n }\n}\n","// Public API for the dialog system\n\n// Service\nexport { ComDialog } from './dialog.service';\n\n// Ref\nexport { ComDialogRef } from './dialog-ref';\n\n// Directives\nexport { ComDialogTitle } from './dialog-title.directive';\nexport { ComDialogContent } from './dialog-content.directive';\nexport { ComDialogActions } from './dialog-actions.directive';\nexport { ComDialogClose } from './dialog-close.directive';\n\n// Types\nexport type {\n ComDialogConfig,\n ComDialogSize,\n ComDialogRole,\n ComRestoreFocusTarget,\n ComDialogTemplateContext,\n} from './dialog.models';\n\n// Providers\nexport { COM_DIALOG_DATA, COM_DIALOG_CONFIG, provideComDialogConfig } from './dialog.providers';\n\n// Variants (for advanced customization)\nexport {\n dialogBackdropVariants,\n dialogPanelVariants,\n dialogTitleVariants,\n dialogContentVariants,\n dialogActionsVariants,\n} from './dialog.variants';\nexport type { DialogPanelVariantProps } from './dialog.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAGA;;;AAGG;MACU,YAAY,CAAA;AACN,IAAA,kBAAkB,GAAG,IAAI,OAAO,EAAiB;AACjD,IAAA,oBAAoB,GAAG,IAAI,OAAO,EAAc;IACzD,MAAM,GAAG,KAAK;;IAGtB,WAAW,GAAsB,IAAI;;IAGrC,QAAQ,GAAkC,IAAI;AAE9C;;AAEG;AACH,IAAA,KAAK,CAAC,MAAU,EAAA;QACd,IAAI,IAAI,CAAC,MAAM;YAAE;AACjB,QAAA,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC;IACzB;AAEA;;AAEG;IACH,WAAW,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,kBAAkB,CAAC,YAAY,EAAE;IAC/C;AAEA;;AAEG;IACH,aAAa,GAAA;AACX,QAAA,OAAO,IAAI,CAAC,oBAAoB,CA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AA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACvB,qBAAA;AACF,iBAAA;;;ACtBD;AAEA;;ACFA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InputSignal, InputSignalWithTransform, Signal } from '@angular/core';
|
|
2
|
+
import { InputSignal, InputSignalWithTransform, OutputEmitterRef, Signal } from '@angular/core';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
type CardVariant = 'elevated' | 'outlined' | 'filled' | 'ghost';
|
|
@@ -76,8 +76,8 @@ type CardBadgeVariants = VariantProps<typeof cardBadgeVariants>;
|
|
|
76
76
|
* The card is a pure container with no imposed structure.
|
|
77
77
|
* Use card directives (comCardHeader, comCardContent, etc.) to compose layouts.
|
|
78
78
|
*
|
|
79
|
-
* @tokens `--color-
|
|
80
|
-
* `--color-
|
|
79
|
+
* @tokens `--color-card`, `--color-card-foreground`, `--color-muted`, `--color-muted-foreground`,
|
|
80
|
+
* `--color-muted-hover`, `--color-border`, `--color-primary`, `--color-ring`, `--shadow-card`
|
|
81
81
|
*
|
|
82
82
|
* @example Basic card
|
|
83
83
|
* ```html
|
|
@@ -111,25 +111,32 @@ declare class ComCard {
|
|
|
111
111
|
readonly interactive: InputSignalWithTransform<boolean, unknown>;
|
|
112
112
|
/** Consumer CSS classes - merged with variant classes. */
|
|
113
113
|
readonly userClass: InputSignal<string>;
|
|
114
|
+
/** Emitted when an interactive card is activated via keyboard (Enter or Space). */
|
|
115
|
+
readonly cardActivated: OutputEmitterRef<void>;
|
|
114
116
|
protected readonly computedClass: Signal<string>;
|
|
117
|
+
protected onKeyActivate(event: Event): void;
|
|
115
118
|
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>;
|
|
119
|
+
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; }; }, { "cardActivated": "cardActivated"; }, never, ["*"], true, never>;
|
|
117
120
|
}
|
|
118
121
|
|
|
119
122
|
/**
|
|
120
123
|
* Card header directive - top section for title and actions.
|
|
121
124
|
*
|
|
122
|
-
* Uses justify-between so it naturally supports a title group
|
|
123
|
-
* and an action element (icon button, menu trigger) on the right.
|
|
125
|
+
* Uses `flex` with `justify-between` so it naturally supports a title group
|
|
126
|
+
* on the left and an action element (icon button, menu trigger) on the right.
|
|
124
127
|
*
|
|
125
|
-
*
|
|
128
|
+
* **Important:** When using both `comCardTitle` and `comCardSubtitle`,
|
|
129
|
+
* wrap them in a container `<div>` so they stack vertically as a single
|
|
130
|
+
* flex child. Without the wrapper, `justify-between` will push them apart.
|
|
131
|
+
*
|
|
132
|
+
* @example Header with title only
|
|
126
133
|
* ```html
|
|
127
134
|
* <div comCardHeader>
|
|
128
135
|
* <h3 comCardTitle>Card Title</h3>
|
|
129
136
|
* </div>
|
|
130
137
|
* ```
|
|
131
138
|
*
|
|
132
|
-
* @example Header with title and action
|
|
139
|
+
* @example Header with title, subtitle, and action
|
|
133
140
|
* ```html
|
|
134
141
|
* <div comCardHeader>
|
|
135
142
|
* <div>
|
|
@@ -212,9 +219,11 @@ declare class ComCardContent {
|
|
|
212
219
|
declare class ComCardFooter {
|
|
213
220
|
/** Horizontal alignment of footer content. */
|
|
214
221
|
readonly align: InputSignal<CardAlign>;
|
|
222
|
+
/** Consumer CSS classes - merged with variant classes. */
|
|
223
|
+
readonly userClass: InputSignal<string>;
|
|
215
224
|
protected readonly computedClass: Signal<string>;
|
|
216
225
|
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>;
|
|
226
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardFooter, "[comCardFooter]", ["comCardFooter"], { "align": { "alias": "align"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
218
227
|
}
|
|
219
228
|
|
|
220
229
|
/**
|
|
@@ -245,9 +254,11 @@ declare class ComCardActions {
|
|
|
245
254
|
readonly align: InputSignal<CardAlign>;
|
|
246
255
|
/** Layout direction - row or column. */
|
|
247
256
|
readonly direction: InputSignal<CardActionsDirection>;
|
|
257
|
+
/** Consumer CSS classes - merged with variant classes. */
|
|
258
|
+
readonly userClass: InputSignal<string>;
|
|
248
259
|
protected readonly computedClass: Signal<string>;
|
|
249
260
|
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>;
|
|
261
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardActions, "[comCardActions]", ["comCardActions"], { "align": { "alias": "align"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
251
262
|
}
|
|
252
263
|
|
|
253
264
|
/**
|
|
@@ -270,9 +281,11 @@ declare class ComCardActions {
|
|
|
270
281
|
declare class ComCardMedia {
|
|
271
282
|
/** Media positioning within the card. */
|
|
272
283
|
readonly position: InputSignal<CardMediaPosition>;
|
|
284
|
+
/** Consumer CSS classes - merged with variant classes. */
|
|
285
|
+
readonly userClass: InputSignal<string>;
|
|
273
286
|
protected readonly computedClass: Signal<string>;
|
|
274
287
|
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>;
|
|
288
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardMedia, "[comCardMedia]", ["comCardMedia"], { "position": { "alias": "position"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
276
289
|
}
|
|
277
290
|
|
|
278
291
|
/**
|
|
@@ -329,9 +342,11 @@ declare class ComCardAccent {
|
|
|
329
342
|
readonly color: InputSignal<CardAccentColor>;
|
|
330
343
|
/** Position of the accent strip. */
|
|
331
344
|
readonly position: InputSignal<CardAccentPosition>;
|
|
345
|
+
/** Consumer CSS classes - merged with variant classes. */
|
|
346
|
+
readonly userClass: InputSignal<string>;
|
|
332
347
|
protected readonly computedClass: Signal<string>;
|
|
333
348
|
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>;
|
|
349
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardAccent, "[comCardAccent]", ["comCardAccent"], { "color": { "alias": "color"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
335
350
|
}
|
|
336
351
|
|
|
337
352
|
/**
|
|
@@ -364,9 +379,11 @@ declare class ComCardBadge {
|
|
|
364
379
|
readonly position: InputSignal<CardBadgePosition>;
|
|
365
380
|
/** Badge color. */
|
|
366
381
|
readonly color: InputSignal<CardBadgeColor>;
|
|
382
|
+
/** Consumer CSS classes - merged with variant classes. */
|
|
383
|
+
readonly userClass: InputSignal<string>;
|
|
367
384
|
protected readonly computedClass: Signal<string>;
|
|
368
385
|
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>;
|
|
386
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComCardBadge, "[comCardBadge]", ["comCardBadge"], { "position": { "alias": "position"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
370
387
|
}
|
|
371
388
|
|
|
372
389
|
export { ComCard, ComCardAccent, ComCardActions, ComCardBadge, ComCardContent, ComCardDivider, ComCardFooter, ComCardHeader, ComCardMedia, ComCardSubtitle, ComCardTitle, cardAccentVariants, cardActionsVariants, cardBadgeVariants, cardFooterVariants, cardMediaVariants, cardVariants };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { OverlayRef } from '@angular/cdk/overlay';
|
|
2
|
+
import { OverlayRef, PositionStrategy, ScrollStrategy } from '@angular/cdk/overlay';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { TemplateRef, OnInit, WritableSignal, InputSignal, InjectionToken, Provider } from '@angular/core';
|
|
4
|
+
import { Injector, ViewContainerRef, StaticProvider, TemplateRef, OnInit, WritableSignal, InputSignal, InjectionToken, Provider } from '@angular/core';
|
|
5
5
|
import { ComponentType } from '@angular/cdk/portal';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
|
|
@@ -41,6 +41,10 @@ declare class ComDialogRef<R = unknown> {
|
|
|
41
41
|
|
|
42
42
|
/** Available dialog size variants. */
|
|
43
43
|
type ComDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
44
|
+
/** ARIA role for the dialog panel. */
|
|
45
|
+
type ComDialogRole = 'dialog' | 'alertdialog';
|
|
46
|
+
/** Where to restore focus after the dialog closes. */
|
|
47
|
+
type ComRestoreFocusTarget = boolean | string | HTMLElement;
|
|
44
48
|
/** Configuration for opening a dialog. */
|
|
45
49
|
interface ComDialogConfig<D = unknown> {
|
|
46
50
|
/** Data to inject via COM_DIALOG_DATA. */
|
|
@@ -51,16 +55,52 @@ interface ComDialogConfig<D = unknown> {
|
|
|
51
55
|
disableClose?: boolean;
|
|
52
56
|
/** Show backdrop overlay. */
|
|
53
57
|
hasBackdrop?: boolean;
|
|
54
|
-
/** Additional CSS class on the backdrop. */
|
|
55
|
-
backdropClass?: string;
|
|
56
|
-
/** Additional CSS class on the container panel. */
|
|
57
|
-
panelClass?: string;
|
|
58
|
+
/** Additional CSS class(es) on the backdrop. */
|
|
59
|
+
backdropClass?: string | string[];
|
|
60
|
+
/** Additional CSS class(es) on the container panel. */
|
|
61
|
+
panelClass?: string | string[];
|
|
58
62
|
/** Where to send focus on open. */
|
|
59
63
|
autoFocus?: 'first-tabbable' | 'dialog' | false;
|
|
60
|
-
/**
|
|
61
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Controls focus restoration after the dialog closes.
|
|
66
|
+
* - `true`: restore focus to the previously focused element (default).
|
|
67
|
+
* - `false`: do not restore focus.
|
|
68
|
+
* - `string`: CSS selector — the first matching element receives focus.
|
|
69
|
+
* - `HTMLElement`: the specific element receives focus.
|
|
70
|
+
*/
|
|
71
|
+
restoreFocus?: ComRestoreFocusTarget;
|
|
62
72
|
/** Fallback aria-label if no comDialogTitle is projected. */
|
|
63
73
|
ariaLabel?: string;
|
|
74
|
+
/** ARIA role on the dialog panel. Use `'alertdialog'` for confirmations/destructive actions. */
|
|
75
|
+
role?: ComDialogRole;
|
|
76
|
+
/**
|
|
77
|
+
* Custom parent injector for dialog content.
|
|
78
|
+
* Takes precedence over `viewContainerRef` injector.
|
|
79
|
+
*/
|
|
80
|
+
injector?: Injector;
|
|
81
|
+
/**
|
|
82
|
+
* Determines logical Angular tree placement for DI resolution.
|
|
83
|
+
* Its injector is used as parent when `injector` is not set.
|
|
84
|
+
*/
|
|
85
|
+
viewContainerRef?: ViewContainerRef;
|
|
86
|
+
/** Additional providers injected into the dialog content's injector. */
|
|
87
|
+
providers?: StaticProvider[];
|
|
88
|
+
/** Custom CDK position strategy. Defaults to globally centered. */
|
|
89
|
+
positionStrategy?: PositionStrategy;
|
|
90
|
+
/** Custom CDK scroll strategy. Defaults to block scroll. */
|
|
91
|
+
scrollStrategy?: ScrollStrategy;
|
|
92
|
+
/** Explicit CSS width on the panel (e.g. `'600px'`, `'80vw'`). Overrides size variant width. */
|
|
93
|
+
width?: string;
|
|
94
|
+
/** Explicit CSS height on the panel. */
|
|
95
|
+
height?: string;
|
|
96
|
+
/** CSS min-width on the panel. Numbers are treated as pixels. */
|
|
97
|
+
minWidth?: string | number;
|
|
98
|
+
/** CSS min-height on the panel. Numbers are treated as pixels. */
|
|
99
|
+
minHeight?: string | number;
|
|
100
|
+
/** CSS max-width on the panel. Numbers are treated as pixels. Overrides size variant max-width. */
|
|
101
|
+
maxWidth?: string | number;
|
|
102
|
+
/** CSS max-height on the panel. Numbers are treated as pixels. Overrides size variant max-height. */
|
|
103
|
+
maxHeight?: string | number;
|
|
64
104
|
}
|
|
65
105
|
/** Content that can be opened in a dialog. */
|
|
66
106
|
type ComDialogContent$1<T = unknown> = ComponentType<T> | TemplateRef<T>;
|
|
@@ -264,4 +304,4 @@ declare const dialogContentVariants: () => string;
|
|
|
264
304
|
declare const dialogActionsVariants: () => string;
|
|
265
305
|
|
|
266
306
|
export { COM_DIALOG_CONFIG, COM_DIALOG_DATA, ComDialog, ComDialogActions, ComDialogClose, ComDialogContent, ComDialogRef, ComDialogTitle, dialogActionsVariants, dialogBackdropVariants, dialogContentVariants, dialogPanelVariants, dialogTitleVariants, provideComDialogConfig };
|
|
267
|
-
export type { ComDialogConfig, ComDialogSize, ComDialogTemplateContext, DialogPanelVariantProps };
|
|
307
|
+
export type { ComDialogConfig, ComDialogRole, ComDialogSize, ComDialogTemplateContext, ComRestoreFocusTarget, DialogPanelVariantProps };
|