pdm-ui-kit 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +28 -0
  2. package/alert/alert-dialog.component.d.ts +14 -2
  3. package/alert/alert.module.d.ts +2 -1
  4. package/dialog/dialog.component.d.ts +18 -26
  5. package/dialog/dialog.module.d.ts +1 -1
  6. package/esm2020/alert/alert-dialog.component.mjs +101 -11
  7. package/esm2020/alert/alert.module.mjs +5 -4
  8. package/esm2020/dialog/dialog.component.mjs +43 -85
  9. package/esm2020/dialog/dialog.module.mjs +10 -4
  10. package/esm2020/src/alert/alert-dialog.component.mjs +101 -11
  11. package/esm2020/src/alert/alert.module.mjs +5 -4
  12. package/esm2020/src/dialog/dialog.component.mjs +43 -85
  13. package/esm2020/src/dialog/dialog.module.mjs +10 -4
  14. package/esm2020/src/utils/cn.mjs +19 -0
  15. package/esm2020/src/utils/public-api.mjs +2 -1
  16. package/fesm2015/pdm-ui-kit-src-alert.mjs +103 -12
  17. package/fesm2015/pdm-ui-kit-src-alert.mjs.map +1 -1
  18. package/fesm2015/pdm-ui-kit-src-dialog.mjs +50 -85
  19. package/fesm2015/pdm-ui-kit-src-dialog.mjs.map +1 -1
  20. package/fesm2015/pdm-ui-kit-src-utils.mjs +21 -1
  21. package/fesm2015/pdm-ui-kit-src-utils.mjs.map +1 -1
  22. package/fesm2015/pdm-ui-kit.mjs +161 -108
  23. package/fesm2015/pdm-ui-kit.mjs.map +1 -1
  24. package/fesm2020/pdm-ui-kit-src-alert.mjs +103 -12
  25. package/fesm2020/pdm-ui-kit-src-alert.mjs.map +1 -1
  26. package/fesm2020/pdm-ui-kit-src-dialog.mjs +50 -85
  27. package/fesm2020/pdm-ui-kit-src-dialog.mjs.map +1 -1
  28. package/fesm2020/pdm-ui-kit-src-utils.mjs +21 -1
  29. package/fesm2020/pdm-ui-kit-src-utils.mjs.map +1 -1
  30. package/fesm2020/pdm-ui-kit.mjs +161 -108
  31. package/fesm2020/pdm-ui-kit.mjs.map +1 -1
  32. package/package.json +3 -1
  33. package/src/alert/alert-dialog.component.d.ts +14 -2
  34. package/src/alert/alert.module.d.ts +2 -1
  35. package/src/dialog/dialog.component.d.ts +18 -26
  36. package/src/dialog/dialog.module.d.ts +1 -1
  37. package/src/utils/cn.d.ts +15 -0
  38. package/src/utils/public-api.d.ts +1 -0
@@ -2,6 +2,9 @@ import * as i0 from '@angular/core';
2
2
  import { Component, ChangeDetectionStrategy, Input, EventEmitter, Output, HostListener, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
+ import { responsive, Z_INDEX, cn } from 'pdm-ui-kit/src/utils';
6
+ import * as i2 from '@angular/cdk/a11y';
7
+ import { A11yModule } from '@angular/cdk/a11y';
5
8
 
6
9
  class PdmAlertComponent {
7
10
  constructor() {
@@ -39,12 +42,17 @@ class PdmAlertDialogComponent {
39
42
  constructor() {
40
43
  this.open = false;
41
44
  this.showTrigger = false;
42
- this.triggerText = 'Show dialog';
43
- this.title = 'Are you absolutely sure?';
44
- this.description = '';
45
- this.confirmText = 'Continue';
46
- this.cancelText = 'Cancel';
47
- this.className = '';
45
+ this.triggerText = "Show dialog";
46
+ this.title = "Are you absolutely sure?";
47
+ this.description = "";
48
+ this.confirmText = "Continue";
49
+ this.cancelText = "Cancel";
50
+ this.size = "responsive";
51
+ this.maxWidth = "";
52
+ this.className = "";
53
+ this.bodyClassName = "";
54
+ this.showFooter = true;
55
+ this.closeOnBackdrop = true;
48
56
  /** Close when the ESC key is pressed. Default: `true`. */
49
57
  this.closeOnEsc = true;
50
58
  this.openChange = new EventEmitter();
@@ -59,6 +67,70 @@ class PdmAlertDialogComponent {
59
67
  get isControlled() {
60
68
  return this.openChange.observed;
61
69
  }
70
+ get panelClassName() {
71
+ if (this.size === "desktop") {
72
+ return this.buildPanelClasses([
73
+ "max-w-[640px]",
74
+ "max-h-[calc(100vh-2rem)]",
75
+ "rounded-[10px]",
76
+ ]);
77
+ }
78
+ if (this.size === "mobile") {
79
+ return this.buildPanelClasses([
80
+ "max-w-[320px]",
81
+ "min-h-[240px]",
82
+ "rounded-[10px]",
83
+ ]);
84
+ }
85
+ if (this.size === "mobile-fullscreen") {
86
+ return this.buildPanelClasses([
87
+ "max-w-[320px]",
88
+ "h-[min(100dvh,640px)]",
89
+ "rounded-none",
90
+ "sm:rounded-[10px]",
91
+ ]);
92
+ }
93
+ if (this.size === "responsive") {
94
+ return this.buildPanelClasses([
95
+ "w-full",
96
+ "h-full",
97
+ "max-h-[100dvh]",
98
+ "rounded-t-[10px]",
99
+ "sm:rounded-[10px]",
100
+ "sm:w-auto",
101
+ "sm:h-auto",
102
+ "sm:max-w-[640px]",
103
+ "sm:max-h-[calc(100vh-4rem)]",
104
+ ]);
105
+ }
106
+ const sizeMap = {
107
+ sm: "sm:max-w-[400px]",
108
+ md: "sm:max-w-[500px]",
109
+ lg: "sm:max-w-[640px]",
110
+ xl: "sm:max-w-[800px]",
111
+ };
112
+ const maxWidth = sizeMap[this.size] || sizeMap.lg;
113
+ return this.buildPanelClasses([
114
+ "w-full",
115
+ "h-full",
116
+ "max-h-[100dvh]",
117
+ "rounded-t-[10px]",
118
+ "sm:rounded-[10px]",
119
+ "sm:w-auto",
120
+ "sm:h-auto",
121
+ maxWidth,
122
+ "sm:max-h-[calc(100vh-4rem)]",
123
+ ]);
124
+ }
125
+ get containerClassName() {
126
+ return responsive({
127
+ default: `fixed inset-x-0 bottom-0 ${Z_INDEX.modalBackdrop} flex items-end justify-center`,
128
+ sm: `fixed inset-0 ${Z_INDEX.modalBackdrop} flex items-center justify-center p-4`,
129
+ });
130
+ }
131
+ get bodyWrapperClassName() {
132
+ return cn("flex-1 min-h-0 overflow-y-auto px-4 py-4 sm:px-6", this.bodyClassName);
133
+ }
62
134
  onTriggerClick() {
63
135
  if (!this.isControlled) {
64
136
  this.open = true;
@@ -79,17 +151,26 @@ class PdmAlertDialogComponent {
79
151
  }
80
152
  this.openChange.emit(false);
81
153
  }
154
+ onBackdropClick() {
155
+ if (this.closeOnBackdrop) {
156
+ this.onCancel();
157
+ }
158
+ }
82
159
  onEsc() {
83
160
  if (this.open && this.closeOnEsc) {
84
161
  this.onCancel();
85
162
  }
86
163
  }
164
+ buildPanelClasses(sizeClasses) {
165
+ const maxWidthClass = this.maxWidth ? `sm:max-w-[${this.maxWidth}]` : "";
166
+ return cn("relative", Z_INDEX.modal, "flex flex-col border border-solid border-border bg-background text-foreground shadow-lg overflow-hidden", ...sizeClasses, maxWidthClass, this.className);
167
+ }
87
168
  }
88
169
  PdmAlertDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAlertDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
89
- PdmAlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmAlertDialogComponent, selector: "pdm-alert-dialog", inputs: { open: "open", showTrigger: "showTrigger", triggerText: "triggerText", title: "title", description: "description", confirmText: "confirmText", cancelText: "cancelText", className: "className", closeOnEsc: "closeOnEsc" }, outputs: { openChange: "openChange", confirm: "confirm", cancel: "cancel" }, host: { listeners: { "document:keydown.escape": "onEsc()" } }, ngImport: i0, template: "<button\n *ngIf=\"showTrigger && !open\"\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n (click)=\"onTriggerClick()\"\n>\n {{ triggerText }}\n</button>\n\n<div *ngIf=\"open\" class=\"fixed inset-0 z-50 flex items-center justify-center p-5\">\n <div class=\"absolute inset-0 bg-foreground/30\" (click)=\"onCancel()\"></div>\n <section\n role=\"alertdialog\"\n aria-modal=\"true\"\n [ngClass]=\"[\n 'relative z-[60] w-full max-w-lg rounded-lg border border-solid border-border bg-background p-6 text-foreground shadow-lg',\n className\n ]\"\n >\n <div class=\"flex flex-col gap-2\">\n <h2 class=\"m-0 text-lg font-semibold leading-none tracking-tight\">{{ title }}</h2>\n <p *ngIf=\"description\" class=\"m-0 text-sm text-muted-foreground\">{{ description }}</p>\n </div>\n <div class=\"mt-4 flex items-center justify-end gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n (click)=\"onCancel()\"\n >\n {{ cancelText }}\n </button>\n <button\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm\"\n (click)=\"onConfirm()\"\n >\n {{ confirmText }}\n </button>\n </div>\n </section>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
170
+ PdmAlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmAlertDialogComponent, selector: "pdm-alert-dialog", inputs: { open: "open", showTrigger: "showTrigger", triggerText: "triggerText", title: "title", description: "description", confirmText: "confirmText", cancelText: "cancelText", size: "size", maxWidth: "maxWidth", className: "className", bodyClassName: "bodyClassName", showFooter: "showFooter", closeOnBackdrop: "closeOnBackdrop", closeOnEsc: "closeOnEsc" }, outputs: { openChange: "openChange", confirm: "confirm", cancel: "cancel" }, host: { listeners: { "document:keydown.escape": "onEsc()" } }, ngImport: i0, template: "<button\n *ngIf=\"showTrigger && !open\"\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n (click)=\"onTriggerClick()\"\n>\n {{ triggerText }}\n</button>\n\n<div *ngIf=\"open\" [ngClass]=\"containerClassName\">\n <div class=\"absolute inset-0 bg-foreground/30 backdrop-blur-sm\" (click)=\"onBackdropClick()\"></div>\n <section role=\"alertdialog\" aria-modal=\"true\" cdkTrapFocus [ngClass]=\"panelClassName\">\n <div class=\"flex flex-col gap-2 p-4 sm:p-6\">\n <h2 class=\"m-0 text-lg font-semibold leading-none tracking-tight text-foreground\">{{ title }}</h2>\n <p *ngIf=\"description\" class=\"m-0 text-sm text-muted-foreground\">{{ description }}</p>\n </div>\n <div [ngClass]=\"bodyWrapperClassName\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"showFooter\" class=\"flex flex-col gap-2 p-4 sm:p-6 border-t border-border sm:flex-row sm:justify-end\">\n <button type=\"button\" class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm sm:w-auto\" (click)=\"onCancel()\">{{ cancelText }}</button>\n <button type=\"button\" class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm sm:w-auto\" (click)=\"onConfirm()\">{{ confirmText }}</button>\n </div>\n </section>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
90
171
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAlertDialogComponent, decorators: [{
91
172
  type: Component,
92
- args: [{ selector: 'pdm-alert-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n *ngIf=\"showTrigger && !open\"\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n (click)=\"onTriggerClick()\"\n>\n {{ triggerText }}\n</button>\n\n<div *ngIf=\"open\" class=\"fixed inset-0 z-50 flex items-center justify-center p-5\">\n <div class=\"absolute inset-0 bg-foreground/30\" (click)=\"onCancel()\"></div>\n <section\n role=\"alertdialog\"\n aria-modal=\"true\"\n [ngClass]=\"[\n 'relative z-[60] w-full max-w-lg rounded-lg border border-solid border-border bg-background p-6 text-foreground shadow-lg',\n className\n ]\"\n >\n <div class=\"flex flex-col gap-2\">\n <h2 class=\"m-0 text-lg font-semibold leading-none tracking-tight\">{{ title }}</h2>\n <p *ngIf=\"description\" class=\"m-0 text-sm text-muted-foreground\">{{ description }}</p>\n </div>\n <div class=\"mt-4 flex items-center justify-end gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n (click)=\"onCancel()\"\n >\n {{ cancelText }}\n </button>\n <button\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm\"\n (click)=\"onConfirm()\"\n >\n {{ confirmText }}\n </button>\n </div>\n </section>\n</div>\n" }]
173
+ args: [{ selector: "pdm-alert-dialog", changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n *ngIf=\"showTrigger && !open\"\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n (click)=\"onTriggerClick()\"\n>\n {{ triggerText }}\n</button>\n\n<div *ngIf=\"open\" [ngClass]=\"containerClassName\">\n <div class=\"absolute inset-0 bg-foreground/30 backdrop-blur-sm\" (click)=\"onBackdropClick()\"></div>\n <section role=\"alertdialog\" aria-modal=\"true\" cdkTrapFocus [ngClass]=\"panelClassName\">\n <div class=\"flex flex-col gap-2 p-4 sm:p-6\">\n <h2 class=\"m-0 text-lg font-semibold leading-none tracking-tight text-foreground\">{{ title }}</h2>\n <p *ngIf=\"description\" class=\"m-0 text-sm text-muted-foreground\">{{ description }}</p>\n </div>\n <div [ngClass]=\"bodyWrapperClassName\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"showFooter\" class=\"flex flex-col gap-2 p-4 sm:p-6 border-t border-border sm:flex-row sm:justify-end\">\n <button type=\"button\" class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm sm:w-auto\" (click)=\"onCancel()\">{{ cancelText }}</button>\n <button type=\"button\" class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm sm:w-auto\" (click)=\"onConfirm()\">{{ confirmText }}</button>\n </div>\n </section>\n</div>\n" }]
93
174
  }], propDecorators: { open: [{
94
175
  type: Input
95
176
  }], showTrigger: [{
@@ -104,8 +185,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
104
185
  type: Input
105
186
  }], cancelText: [{
106
187
  type: Input
188
+ }], size: [{
189
+ type: Input
190
+ }], maxWidth: [{
191
+ type: Input
107
192
  }], className: [{
108
193
  type: Input
194
+ }], bodyClassName: [{
195
+ type: Input
196
+ }], showFooter: [{
197
+ type: Input
198
+ }], closeOnBackdrop: [{
199
+ type: Input
109
200
  }], closeOnEsc: [{
110
201
  type: Input
111
202
  }], openChange: [{
@@ -116,7 +207,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
116
207
  type: Output
117
208
  }], onEsc: [{
118
209
  type: HostListener,
119
- args: ['document:keydown.escape']
210
+ args: ["document:keydown.escape"]
120
211
  }] } });
121
212
 
122
213
  const COMPONENTS = [
@@ -127,13 +218,13 @@ class PdmAlertModule {
127
218
  }
128
219
  PdmAlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
129
220
  PdmAlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: PdmAlertModule, declarations: [PdmAlertComponent,
130
- PdmAlertDialogComponent], imports: [CommonModule], exports: [PdmAlertComponent,
221
+ PdmAlertDialogComponent], imports: [CommonModule, A11yModule], exports: [PdmAlertComponent,
131
222
  PdmAlertDialogComponent] });
132
- PdmAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAlertModule, imports: [CommonModule] });
223
+ PdmAlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAlertModule, imports: [CommonModule, A11yModule] });
133
224
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmAlertModule, decorators: [{
134
225
  type: NgModule,
135
226
  args: [{
136
- imports: [CommonModule],
227
+ imports: [CommonModule, A11yModule],
137
228
  declarations: COMPONENTS,
138
229
  exports: COMPONENTS
139
230
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"pdm-ui-kit-src-alert.mjs","sources":["../../../src/alert/alert.component.ts","../../../src/alert/alert.component.html","../../../src/alert/alert-dialog.component.ts","../../../src/alert/alert-dialog.component.html","../../../src/alert/alert.module.ts","../../../src/alert/pdm-ui-kit-src-alert.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nexport type PdmAlertVariant = 'default' | 'title-only' | 'destructive';\n\n@Component({\n selector: 'pdm-alert',\n templateUrl: './alert.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PdmAlertComponent {\n @Input() variant: PdmAlertVariant = 'default';\n @Input() title = 'Success! Your changes have been saved';\n @Input() description = 'This is an alert with icon, title and description.';\n @Input() details: string[] = [];\n @Input() className = '';\n\n get isDestructive(): boolean {\n return this.variant === 'destructive';\n }\n\n get isTitleOnly(): boolean {\n return this.variant === 'title-only';\n }\n}\n\n","<section\n role=\"alert\"\n [ngClass]=\"[\n 'w-full rounded-lg border border-solid border-border bg-background p-4',\n className\n ]\"\n>\n <div [ngClass]=\"['flex gap-3', isDestructive ? 'items-start' : 'items-center']\">\n <span class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center\">\n <svg *ngIf=\"!isDestructive && !isTitleOnly\" aria-label=\"Success\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <svg *ngIf=\"isTitleOnly\" aria-label=\"Info\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 8H19\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M9 8V6.5C9 5.67 9.67 5 10.5 5H13.5C14.33 5 15 5.67 15 6.5V8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M7 8L8 18.5C8.07 19.33 8.77 20 9.6 20H14.4C15.23 20 15.93 19.33 16 18.5L17 8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n </svg>\n <svg *ngIf=\"isDestructive\" aria-label=\"Error\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-destructive\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M12 8V12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <circle cx=\"12\" cy=\"16\" r=\"1\" fill=\"currentColor\"></circle>\n </svg>\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <h4\n [ngClass]=\"[\n 'm-0 text-sm font-medium',\n isDestructive ? 'text-destructive' : 'text-foreground'\n ]\"\n >\n {{ title }}\n </h4>\n\n <p\n *ngIf=\"!isTitleOnly && description\"\n [ngClass]=\"[\n 'm-0 mt-0.5 text-sm',\n isDestructive ? 'text-destructive' : 'text-muted-foreground'\n ]\"\n >\n {{ description }}\n </p>\n\n <ul *ngIf=\"isDestructive && details.length\" class=\"m-0 mt-1 pl-5 text-sm text-destructive\">\n <li *ngFor=\"let item of details\">{{ item }}</li>\n </ul>\n </div>\n </div>\n</section>\n","import { ChangeDetectionStrategy, Component, EventEmitter, HostListener, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'pdm-alert-dialog',\n templateUrl: './alert-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PdmAlertDialogComponent {\n @Input() open = false;\n @Input() showTrigger = false;\n @Input() triggerText = 'Show dialog';\n @Input() title = 'Are you absolutely sure?';\n @Input() description = '';\n @Input() confirmText = 'Continue';\n @Input() cancelText = 'Cancel';\n @Input() className = '';\n\n /** Close when the ESC key is pressed. Default: `true`. */\n @Input() closeOnEsc = true;\n\n @Output() openChange = new EventEmitter<boolean>();\n @Output() confirm = new EventEmitter<void>();\n @Output() cancel = new EventEmitter<void>();\n\n /**\n * Returns `true` when at least one consumer listens to `openChange`.\n * - **Controlled** (has observers): parent manages `open` via two-way binding → only emit.\n * - **Uncontrolled** (no observers): we own the `open` state → mutate it locally.\n */\n private get isControlled(): boolean {\n return this.openChange.observed;\n }\n\n onTriggerClick(): void {\n if (!this.isControlled) {\n this.open = true;\n }\n this.openChange.emit(true);\n }\n\n onCancel(): void {\n this.cancel.emit();\n if (!this.isControlled) {\n this.open = false;\n }\n this.openChange.emit(false);\n }\n\n onConfirm(): void {\n this.confirm.emit();\n if (!this.isControlled) {\n this.open = false;\n }\n this.openChange.emit(false);\n }\n\n @HostListener('document:keydown.escape')\n onEsc(): void {\n if (this.open && this.closeOnEsc) {\n this.onCancel();\n }\n }\n}\n","<button\n *ngIf=\"showTrigger && !open\"\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n (click)=\"onTriggerClick()\"\n>\n {{ triggerText }}\n</button>\n\n<div *ngIf=\"open\" class=\"fixed inset-0 z-50 flex items-center justify-center p-5\">\n <div class=\"absolute inset-0 bg-foreground/30\" (click)=\"onCancel()\"></div>\n <section\n role=\"alertdialog\"\n aria-modal=\"true\"\n [ngClass]=\"[\n 'relative z-[60] w-full max-w-lg rounded-lg border border-solid border-border bg-background p-6 text-foreground shadow-lg',\n className\n ]\"\n >\n <div class=\"flex flex-col gap-2\">\n <h2 class=\"m-0 text-lg font-semibold leading-none tracking-tight\">{{ title }}</h2>\n <p *ngIf=\"description\" class=\"m-0 text-sm text-muted-foreground\">{{ description }}</p>\n </div>\n <div class=\"mt-4 flex items-center justify-end gap-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n (click)=\"onCancel()\"\n >\n {{ cancelText }}\n </button>\n <button\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm\"\n (click)=\"onConfirm()\"\n >\n {{ confirmText }}\n </button>\n </div>\n </section>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { PdmAlertComponent } from './alert.component';\nimport { PdmAlertDialogComponent } from './alert-dialog.component';\n\nconst COMPONENTS = [\n PdmAlertComponent,\n PdmAlertDialogComponent,\n];\n\n@NgModule({\n imports: [CommonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class PdmAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MASa,iBAAiB,CAAA;AAL9B,IAAA,WAAA,GAAA;QAMW,IAAO,CAAA,OAAA,GAAoB,SAAS,CAAC;QACrC,IAAK,CAAA,KAAA,GAAG,uCAAuC,CAAC;QAChD,IAAW,CAAA,WAAA,GAAG,oDAAoD,CAAC;QACnE,IAAO,CAAA,OAAA,GAAa,EAAE,CAAC;QACvB,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;AASzB,KAAA;AAPC,IAAA,IAAI,aAAa,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,OAAO,KAAK,aAAa,CAAC;KACvC;AAED,IAAA,IAAI,WAAW,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,OAAO,KAAK,YAAY,CAAC;KACtC;;8GAbU,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,yKCT9B,2/EAmDA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAA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;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,iBATzB,iBAAiB;QACjB,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAIb,YAAY,CAAA,EAAA,OAAA,EAAA,CALtB,iBAAiB;QACjB,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAQZ,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAJf,YAAY,CAAA,EAAA,CAAA,CAAA;2FAIX,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,YAAY,EAAE,UAAU;AACxB,oBAAA,OAAO,EAAE,UAAU;AACpB,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"pdm-ui-kit-src-alert.mjs","sources":["../../../src/alert/alert.component.ts","../../../src/alert/alert.component.html","../../../src/alert/alert-dialog.component.ts","../../../src/alert/alert-dialog.component.html","../../../src/alert/alert.module.ts","../../../src/alert/pdm-ui-kit-src-alert.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nexport type PdmAlertVariant = 'default' | 'title-only' | 'destructive';\n\n@Component({\n selector: 'pdm-alert',\n templateUrl: './alert.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PdmAlertComponent {\n @Input() variant: PdmAlertVariant = 'default';\n @Input() title = 'Success! Your changes have been saved';\n @Input() description = 'This is an alert with icon, title and description.';\n @Input() details: string[] = [];\n @Input() className = '';\n\n get isDestructive(): boolean {\n return this.variant === 'destructive';\n }\n\n get isTitleOnly(): boolean {\n return this.variant === 'title-only';\n }\n}\n\n","<section\n role=\"alert\"\n [ngClass]=\"[\n 'w-full rounded-lg border border-solid border-border bg-background p-4',\n className\n ]\"\n>\n <div [ngClass]=\"['flex gap-3', isDestructive ? 'items-start' : 'items-center']\">\n <span class=\"inline-flex h-6 w-6 shrink-0 items-center justify-center\">\n <svg *ngIf=\"!isDestructive && !isTitleOnly\" aria-label=\"Success\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M8.5 12.5L10.8 14.8L15.8 9.8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </svg>\n <svg *ngIf=\"isTitleOnly\" aria-label=\"Info\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-foreground\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 8H19\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M9 8V6.5C9 5.67 9.67 5 10.5 5H13.5C14.33 5 15 5.67 15 6.5V8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <path d=\"M7 8L8 18.5C8.07 19.33 8.77 20 9.6 20H14.4C15.23 20 15.93 19.33 16 18.5L17 8\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n </svg>\n <svg *ngIf=\"isDestructive\" aria-label=\"Error\" viewBox=\"0 0 24 24\" class=\"h-5 w-5 text-destructive\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" stroke-width=\"1.5\"></circle>\n <path d=\"M12 8V12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n <circle cx=\"12\" cy=\"16\" r=\"1\" fill=\"currentColor\"></circle>\n </svg>\n </span>\n\n <div class=\"min-w-0 flex-1\">\n <h4\n [ngClass]=\"[\n 'm-0 text-sm font-medium',\n isDestructive ? 'text-destructive' : 'text-foreground'\n ]\"\n >\n {{ title }}\n </h4>\n\n <p\n *ngIf=\"!isTitleOnly && description\"\n [ngClass]=\"[\n 'm-0 mt-0.5 text-sm',\n isDestructive ? 'text-destructive' : 'text-muted-foreground'\n ]\"\n >\n {{ description }}\n </p>\n\n <ul *ngIf=\"isDestructive && details.length\" class=\"m-0 mt-1 pl-5 text-sm text-destructive\">\n <li *ngFor=\"let item of details\">{{ item }}</li>\n </ul>\n </div>\n </div>\n</section>\n","import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tEventEmitter,\n\tHostListener,\n\tInput,\n\tOutput,\n} from \"@angular/core\";\nimport { cn, responsive, Z_INDEX } from \"pdm-ui-kit/src/utils\";\n\ntype PdmAlertDialogSize =\n\t| \"desktop\"\n\t| \"mobile\"\n\t| \"mobile-fullscreen\"\n\t| \"sm\"\n\t| \"md\"\n\t| \"lg\"\n\t| \"xl\"\n\t| \"responsive\";\n\n@Component({\n\tselector: \"pdm-alert-dialog\",\n\ttemplateUrl: \"./alert-dialog.component.html\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PdmAlertDialogComponent {\n\t@Input() open = false;\n\t@Input() showTrigger = false;\n\t@Input() triggerText = \"Show dialog\";\n\t@Input() title = \"Are you absolutely sure?\";\n\t@Input() description = \"\";\n\t@Input() confirmText = \"Continue\";\n\t@Input() cancelText = \"Cancel\";\n\t@Input() size: PdmAlertDialogSize = \"responsive\";\n\t@Input() maxWidth = \"\";\n\t@Input() className = \"\";\n\t@Input() bodyClassName = \"\";\n\t@Input() showFooter = true;\n\t@Input() closeOnBackdrop = true;\n\n\t/** Close when the ESC key is pressed. Default: `true`. */\n\t@Input() closeOnEsc = true;\n\n\t@Output() openChange = new EventEmitter<boolean>();\n\t@Output() confirm = new EventEmitter<void>();\n\t@Output() cancel = new EventEmitter<void>();\n\n\t/**\n\t * Returns `true` when at least one consumer listens to `openChange`.\n\t * - **Controlled** (has observers): parent manages `open` via two-way binding → only emit.\n\t * - **Uncontrolled** (no observers): we own the `open` state → mutate it locally.\n\t */\n\tprivate get isControlled(): boolean {\n\t\treturn this.openChange.observed;\n\t}\n\n\tget panelClassName(): string {\n\t\tif (this.size === \"desktop\") {\n\t\t\treturn this.buildPanelClasses([\n\t\t\t\t\"max-w-[640px]\",\n\t\t\t\t\"max-h-[calc(100vh-2rem)]\",\n\t\t\t\t\"rounded-[10px]\",\n\t\t\t]);\n\t\t}\n\n\t\tif (this.size === \"mobile\") {\n\t\t\treturn this.buildPanelClasses([\n\t\t\t\t\"max-w-[320px]\",\n\t\t\t\t\"min-h-[240px]\",\n\t\t\t\t\"rounded-[10px]\",\n\t\t\t]);\n\t\t}\n\n\t\tif (this.size === \"mobile-fullscreen\") {\n\t\t\treturn this.buildPanelClasses([\n\t\t\t\t\"max-w-[320px]\",\n\t\t\t\t\"h-[min(100dvh,640px)]\",\n\t\t\t\t\"rounded-none\",\n\t\t\t\t\"sm:rounded-[10px]\",\n\t\t\t]);\n\t\t}\n\n\t\tif (this.size === \"responsive\") {\n\t\t\treturn this.buildPanelClasses([\n\t\t\t\t\"w-full\",\n\t\t\t\t\"h-full\",\n\t\t\t\t\"max-h-[100dvh]\",\n\t\t\t\t\"rounded-t-[10px]\",\n\t\t\t\t\"sm:rounded-[10px]\",\n\t\t\t\t\"sm:w-auto\",\n\t\t\t\t\"sm:h-auto\",\n\t\t\t\t\"sm:max-w-[640px]\",\n\t\t\t\t\"sm:max-h-[calc(100vh-4rem)]\",\n\t\t\t]);\n\t\t}\n\n\t\tconst sizeMap = {\n\t\t\tsm: \"sm:max-w-[400px]\",\n\t\t\tmd: \"sm:max-w-[500px]\",\n\t\t\tlg: \"sm:max-w-[640px]\",\n\t\t\txl: \"sm:max-w-[800px]\",\n\t\t};\n\t\tconst maxWidth = sizeMap[this.size as keyof typeof sizeMap] || sizeMap.lg;\n\n\t\treturn this.buildPanelClasses([\n\t\t\t\"w-full\",\n\t\t\t\"h-full\",\n\t\t\t\"max-h-[100dvh]\",\n\t\t\t\"rounded-t-[10px]\",\n\t\t\t\"sm:rounded-[10px]\",\n\t\t\t\"sm:w-auto\",\n\t\t\t\"sm:h-auto\",\n\t\t\tmaxWidth,\n\t\t\t\"sm:max-h-[calc(100vh-4rem)]\",\n\t\t]);\n\t}\n\n\tget containerClassName(): string {\n\t\treturn responsive({\n\t\t\tdefault: `fixed inset-x-0 bottom-0 ${Z_INDEX.modalBackdrop} flex items-end justify-center`,\n\t\t\tsm: `fixed inset-0 ${Z_INDEX.modalBackdrop} flex items-center justify-center p-4`,\n\t\t});\n\t}\n\n\tget bodyWrapperClassName(): string {\n\t\treturn cn(\n\t\t\t\"flex-1 min-h-0 overflow-y-auto px-4 py-4 sm:px-6\",\n\t\t\tthis.bodyClassName,\n\t\t);\n\t}\n\n\tonTriggerClick(): void {\n\t\tif (!this.isControlled) {\n\t\t\tthis.open = true;\n\t\t}\n\t\tthis.openChange.emit(true);\n\t}\n\n\tonCancel(): void {\n\t\tthis.cancel.emit();\n\t\tif (!this.isControlled) {\n\t\t\tthis.open = false;\n\t\t}\n\t\tthis.openChange.emit(false);\n\t}\n\n\tonConfirm(): void {\n\t\tthis.confirm.emit();\n\t\tif (!this.isControlled) {\n\t\t\tthis.open = false;\n\t\t}\n\t\tthis.openChange.emit(false);\n\t}\n\n\tonBackdropClick(): void {\n\t\tif (this.closeOnBackdrop) {\n\t\t\tthis.onCancel();\n\t\t}\n\t}\n\n\t@HostListener(\"document:keydown.escape\")\n\tonEsc(): void {\n\t\tif (this.open && this.closeOnEsc) {\n\t\t\tthis.onCancel();\n\t\t}\n\t}\n\n\tprivate buildPanelClasses(sizeClasses: string[]): string {\n\t\tconst maxWidthClass = this.maxWidth ? `sm:max-w-[${this.maxWidth}]` : \"\";\n\n\t\treturn cn(\n\t\t\t\"relative\",\n\t\t\tZ_INDEX.modal,\n\t\t\t\"flex flex-col border border-solid border-border bg-background text-foreground shadow-lg overflow-hidden\",\n\t\t\t...sizeClasses,\n\t\t\tmaxWidthClass,\n\t\t\tthis.className,\n\t\t);\n\t}\n}\n","<button\n *ngIf=\"showTrigger && !open\"\n type=\"button\"\n class=\"inline-flex h-9 appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n (click)=\"onTriggerClick()\"\n>\n {{ triggerText }}\n</button>\n\n<div *ngIf=\"open\" [ngClass]=\"containerClassName\">\n <div class=\"absolute inset-0 bg-foreground/30 backdrop-blur-sm\" (click)=\"onBackdropClick()\"></div>\n <section role=\"alertdialog\" aria-modal=\"true\" cdkTrapFocus [ngClass]=\"panelClassName\">\n <div class=\"flex flex-col gap-2 p-4 sm:p-6\">\n <h2 class=\"m-0 text-lg font-semibold leading-none tracking-tight text-foreground\">{{ title }}</h2>\n <p *ngIf=\"description\" class=\"m-0 text-sm text-muted-foreground\">{{ description }}</p>\n </div>\n <div [ngClass]=\"bodyWrapperClassName\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"showFooter\" class=\"flex flex-col gap-2 p-4 sm:p-6 border-t border-border sm:flex-row sm:justify-end\">\n <button type=\"button\" class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm sm:w-auto\" (click)=\"onCancel()\">{{ cancelText }}</button>\n <button type=\"button\" class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm sm:w-auto\" (click)=\"onConfirm()\">{{ confirmText }}</button>\n </div>\n </section>\n</div>\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { PdmAlertComponent } from './alert.component';\nimport { PdmAlertDialogComponent } from './alert-dialog.component';\n\nconst COMPONENTS = [\n PdmAlertComponent,\n PdmAlertDialogComponent,\n];\n\n@NgModule({\n imports: [CommonModule, A11yModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class PdmAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MASa,iBAAiB,CAAA;AAL9B,IAAA,WAAA,GAAA;QAMW,IAAO,CAAA,OAAA,GAAoB,SAAS,CAAC;QACrC,IAAK,CAAA,KAAA,GAAG,uCAAuC,CAAC;QAChD,IAAW,CAAA,WAAA,GAAG,oDAAoD,CAAC;QACnE,IAAO,CAAA,OAAA,GAAa,EAAE,CAAC;QACvB,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;AASzB,KAAA;AAPC,IAAA,IAAI,aAAa,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,OAAO,KAAK,aAAa,CAAC;KACvC;AAED,IAAA,IAAI,WAAW,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,OAAO,KAAK,YAAY,CAAC;KACtC;;8GAbU,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,yKCT9B,2/EAmDA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,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jB,iBAAiB;IACjB,uBAAuB;CACxB,CAAC;MAOW,cAAc,CAAA;;2GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,iBATzB,iBAAiB;AACjB,QAAA,uBAAuB,CAIb,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,UAAU,aALlC,iBAAiB;QACjB,uBAAuB,CAAA,EAAA,CAAA,CAAA;4GAQZ,cAAc,EAAA,OAAA,EAAA,CAJf,YAAY,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAIvB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACnC,oBAAA,YAAY,EAAE,UAAU;AACxB,oBAAA,OAAO,EAAE,UAAU;AACpB,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
@@ -1,45 +1,43 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, HostListener, NgModule } from '@angular/core';
3
- import { Z_INDEX, responsive } from 'pdm-ui-kit/src/utils';
2
+ import { Directive, EventEmitter, Component, ChangeDetectionStrategy, Input, ContentChild, Output, HostListener, NgModule } from '@angular/core';
3
+ import { Z_INDEX, cn, responsive } from 'pdm-ui-kit/src/utils';
4
4
  import * as i1 from '@angular/common';
5
5
  import { CommonModule } from '@angular/common';
6
6
  import * as i2 from '@angular/cdk/a11y';
7
7
  import { A11yModule } from '@angular/cdk/a11y';
8
8
 
9
+ class PdmDialogHeaderDirective {
10
+ }
11
+ PdmDialogHeaderDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDialogHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
12
+ PdmDialogHeaderDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: PdmDialogHeaderDirective, selector: "[pdmHeader]", ngImport: i0 });
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDialogHeaderDirective, decorators: [{
14
+ type: Directive,
15
+ args: [{ selector: "[pdmHeader]" }]
16
+ }] });
17
+ class PdmDialogFooterDirective {
18
+ }
19
+ PdmDialogFooterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDialogFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
20
+ PdmDialogFooterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: PdmDialogFooterDirective, selector: "[pdmFooter]", ngImport: i0 });
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDialogFooterDirective, decorators: [{
22
+ type: Directive,
23
+ args: [{ selector: "[pdmFooter]" }]
24
+ }] });
9
25
  /**
10
- * Modal/Dialog component con soporte responsive
11
- *
12
- * MEJORADO en v0.2.0:
13
- * - Modo 'responsive' (default): fullscreen en mobile, modal en desktop
14
- * - Tamaños predefinidos: sm, md, lg, xl
15
- * - Mejor manejo de scroll en mobile
16
- *
17
- * @example
18
- * // Responsive (recomendado)
19
- * <pdm-dialog [open]="isOpen" size="responsive">
20
- * <p>Content</p>
21
- * </pdm-dialog>
22
- *
23
- * @example
24
- * // Tamaño fijo
25
- * <pdm-dialog [open]="isOpen" size="lg">
26
- * <p>Content</p>
27
- * </pdm-dialog>
26
+ * Responsive modal/dialog component.
28
27
  */
29
28
  class PdmDialogComponent {
30
29
  constructor() {
31
30
  this.open = false;
32
31
  this.variant = "default";
33
32
  /**
34
- * Tamaño del dialog
35
- * - responsive: fullscreen mobile, modal desktop (recomendado)
36
- * - sm: 400px max
37
- * - md: 500px max
38
- * - lg: 640px max (default)
39
- * - xl: 800px max
40
- * - desktop/mobile/mobile-fullscreen: legacy, deprecado
33
+ * Dialog size. Responsive mode is fullscreen on mobile and a modal on desktop.
41
34
  */
42
35
  this.size = "responsive";
36
+ /**
37
+ * Custom desktop maximum width, such as `800px` or `min(90vw, 800px)`.
38
+ * Overrides `size` at the `sm` breakpoint; responsive mobile mode remains fullscreen.
39
+ */
40
+ this.maxWidth = "";
43
41
  this.title = "";
44
42
  this.description = "";
45
43
  this.closeOnBackdrop = true;
@@ -78,7 +76,6 @@ class PdmDialogComponent {
78
76
  }
79
77
  }
80
78
  get panelClassName() {
81
- // Legacy sizes (backward compatibility)
82
79
  if (this.size === "desktop") {
83
80
  return this.buildPanelClasses([
84
81
  "max-w-[640px]",
@@ -101,23 +98,19 @@ class PdmDialogComponent {
101
98
  "sm:rounded-[10px]",
102
99
  ]);
103
100
  }
104
- // New responsive mode (recomendado)
105
101
  if (this.size === "responsive") {
106
102
  return this.buildPanelClasses([
107
- // Mobile: fullscreen con bordes redondeados solo arriba
108
103
  "w-full",
109
104
  "h-full",
110
105
  "max-h-[100dvh]",
111
106
  "rounded-t-[10px]",
112
107
  "sm:rounded-[10px]",
113
- // Desktop: modal centrado
114
108
  "sm:w-auto",
115
109
  "sm:h-auto",
116
110
  "sm:max-w-[640px]",
117
111
  "sm:max-h-[calc(100vh-4rem)]",
118
112
  ]);
119
113
  }
120
- // New size options
121
114
  const sizeMap = {
122
115
  sm: "sm:max-w-[400px]",
123
116
  md: "sm:max-w-[500px]",
@@ -126,12 +119,10 @@ class PdmDialogComponent {
126
119
  };
127
120
  const maxWidth = sizeMap[this.size] || sizeMap.lg;
128
121
  return this.buildPanelClasses([
129
- // Mobile: fullscreen
130
122
  "w-full",
131
123
  "h-full",
132
124
  "max-h-[100dvh]",
133
125
  "rounded-t-[10px]",
134
- // Desktop: modal
135
126
  "sm:rounded-[10px]",
136
127
  "sm:w-auto",
137
128
  "sm:h-auto",
@@ -151,65 +142,25 @@ class PdmDialogComponent {
151
142
  "text-foreground",
152
143
  "shadow-lg",
153
144
  "overflow-hidden",
154
- ...sizeClasses,
155
- this.className,
156
145
  ];
157
- return base.filter(Boolean).join(" ");
146
+ const maxWidthClass = this.maxWidth ? `sm:max-w-[${this.maxWidth}]` : "";
147
+ return cn(...base, ...sizeClasses, maxWidthClass, this.className);
158
148
  }
159
149
  get bodyWrapperClassName() {
160
- // min-h-0 is CRITICAL for flex child to shrink and allow internal scroll
161
- const base = [
162
- "flex-1",
163
- "min-h-0",
164
- "overflow-y-auto",
165
- "px-4",
166
- "py-6",
167
- "sm:px-6",
168
- this.bodyClassName,
169
- ];
170
- return base.filter(Boolean).join(" ");
150
+ return cn("flex-1 min-h-0 overflow-y-auto px-4 py-6 sm:px-6", this.bodyClassName);
171
151
  }
172
152
  get headerWrapperClassName() {
173
- const base = [
174
- "flex",
175
- "items-start",
176
- "justify-between",
177
- "gap-3",
178
- "p-4",
179
- "sm:p-6",
180
- "border-b",
181
- "border-border",
182
- this.headerClassName,
183
- ];
184
- return base.filter(Boolean).join(" ");
153
+ return cn("flex items-start justify-between gap-3 p-4 sm:p-6 border-b border-border", this.headerClassName);
185
154
  }
186
155
  get footerWrapperClassName() {
187
156
  const effectiveAlign = this.alignFooter === "right" && this.variant === "custom-close"
188
157
  ? "left"
189
158
  : this.alignFooter;
190
- const base = [
191
- "p-4",
192
- "sm:p-6",
193
- "border-t",
194
- "border-border",
195
- // Mobile: siempre full-width
196
- "flex",
197
- "flex-col",
198
- "gap-2",
199
- // Desktop: según alignFooter
200
- effectiveAlign === "full-width"
201
- ? "sm:flex-col"
202
- : "sm:flex-row sm:items-center",
203
- effectiveAlign === "left" ? "sm:justify-start" : "",
204
- effectiveAlign === "right" ? "sm:justify-end" : "",
205
- this.footerClassName,
206
- ];
207
- return base.filter(Boolean).join(" ");
159
+ return cn("p-4 sm:p-6 border-t border-border flex flex-col gap-2", effectiveAlign === "full-width"
160
+ ? "sm:flex-col"
161
+ : "sm:flex-row sm:items-center", effectiveAlign === "left" ? "sm:justify-start" : "", effectiveAlign === "right" ? "sm:justify-end" : "", this.footerClassName);
208
162
  }
209
163
  get containerClassName() {
210
- // Container con backdrop z-40
211
- // Mobile: fullscreen desde el bottom
212
- // Desktop: centrado
213
164
  return responsive({
214
165
  default: `fixed inset-x-0 bottom-0 ${Z_INDEX.modalBackdrop} flex items-end justify-center`,
215
166
  sm: `fixed inset-0 ${Z_INDEX.modalBackdrop} flex items-center justify-center p-4`,
@@ -217,16 +168,18 @@ class PdmDialogComponent {
217
168
  }
218
169
  }
219
170
  PdmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
220
- PdmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmDialogComponent, selector: "pdm-dialog", inputs: { open: "open", variant: "variant", size: "size", title: "title", description: "description", closeOnBackdrop: "closeOnBackdrop", closeOnEsc: "closeOnEsc", showCloseButton: "showCloseButton", showHeader: "showHeader", showFooter: "showFooter", primaryActionText: "primaryActionText", secondaryActionText: "secondaryActionText", alignFooter: "alignFooter", headerClassName: "headerClassName", bodyClassName: "bodyClassName", footerClassName: "footerClassName", className: "className" }, outputs: { openChange: "openChange", primaryAction: "primaryAction", secondaryAction: "secondaryAction" }, host: { listeners: { "document:keydown.escape": "onEsc()" } }, ngImport: i0, template: "<div *ngIf=\"open\" [ngClass]=\"containerClassName\">\n <!-- Backdrop -->\n <div class=\"absolute inset-0 bg-foreground/30 backdrop-blur-sm\" (click)=\"onBackdropClick()\"></div>\n \n <!-- Dialog Panel -->\n <section role=\"dialog\" aria-modal=\"true\" cdkTrapFocus [ngClass]=\"panelClassName\">\n <!-- Header -->\n <div *ngIf=\"showHeader\" [ngClass]=\"headerWrapperClassName\">\n <div class=\"min-w-0 flex-1\">\n <h2 class=\"m-0 text-lg font-semibold leading-none tracking-tight text-foreground\">{{ title }}</h2>\n <p *ngIf=\"description\" class=\"m-0 mt-2 text-sm text-muted-foreground\">{{ description }}</p>\n </div>\n <button\n *ngIf=\"showCloseButton\"\n type=\"button\"\n class=\"inline-flex h-6 w-6 flex-shrink-0 appearance-none box-border items-center justify-center rounded-sm border-0 bg-transparent p-0 text-foreground opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none\"\n (click)=\"close()\"\n aria-label=\"Close dialog\"\n >\n <svg viewBox=\"0 0 24 24\" class=\"h-4 w-4\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6 6L18 18M18 6L6 18\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n </svg>\n </button>\n </div>\n\n <!-- Body -->\n <div [ngClass]=\"bodyWrapperClassName\">\n <ng-content></ng-content>\n </div>\n\n <!-- Footer -->\n <div *ngIf=\"showFooter\" [ngClass]=\"footerWrapperClassName\">\n <ng-container *ngIf=\"variant === 'custom-close'; else defaultActions\">\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm sm:w-auto\"\n (click)=\"onSecondaryAction()\"\n >\n {{ secondaryActionText }}\n </button>\n </ng-container>\n\n <ng-template #defaultActions>\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm sm:w-auto\"\n (click)=\"onSecondaryAction()\"\n >\n {{ secondaryActionText }}\n </button>\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm sm:w-auto\"\n (click)=\"onPrimaryAction()\"\n >\n {{ primaryActionText }}\n </button>\n </ng-template>\n </div>\n </section>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
171
+ PdmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmDialogComponent, selector: "pdm-dialog", inputs: { open: "open", variant: "variant", size: "size", maxWidth: "maxWidth", title: "title", description: "description", closeOnBackdrop: "closeOnBackdrop", closeOnEsc: "closeOnEsc", showCloseButton: "showCloseButton", showHeader: "showHeader", showFooter: "showFooter", primaryActionText: "primaryActionText", secondaryActionText: "secondaryActionText", alignFooter: "alignFooter", headerClassName: "headerClassName", bodyClassName: "bodyClassName", footerClassName: "footerClassName", className: "className" }, outputs: { openChange: "openChange", primaryAction: "primaryAction", secondaryAction: "secondaryAction" }, host: { listeners: { "document:keydown.escape": "onEsc()" } }, queries: [{ propertyName: "customHeader", first: true, predicate: PdmDialogHeaderDirective, descendants: true }, { propertyName: "customFooter", first: true, predicate: PdmDialogFooterDirective, descendants: true }], ngImport: i0, template: "<div *ngIf=\"open\" [ngClass]=\"containerClassName\">\n <!-- Backdrop -->\n <div class=\"absolute inset-0 bg-foreground/30 backdrop-blur-sm\" (click)=\"onBackdropClick()\"></div>\n\n <!-- Dialog Panel -->\n <section role=\"dialog\" aria-modal=\"true\" cdkTrapFocus [ngClass]=\"panelClassName\">\n <!-- Header -->\n <div *ngIf=\"showHeader\" [ngClass]=\"headerWrapperClassName\">\n <ng-container *ngIf=\"customHeader; else defaultHeader\">\n <ng-content select=\"[pdmHeader]\"></ng-content>\n </ng-container>\n <ng-template #defaultHeader>\n <div class=\"min-w-0 flex-1\">\n <h2 class=\"m-0 text-lg font-semibold leading-none tracking-tight text-foreground\">{{ title }}</h2>\n <p *ngIf=\"description\" class=\"m-0 mt-2 text-sm text-muted-foreground\">{{ description }}</p>\n </div>\n <button\n *ngIf=\"showCloseButton\"\n type=\"button\"\n class=\"inline-flex h-6 w-6 flex-shrink-0 appearance-none box-border items-center justify-center rounded-sm border-0 bg-transparent p-0 text-foreground opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none\"\n (click)=\"close()\"\n aria-label=\"Close dialog\"\n >\n <svg viewBox=\"0 0 24 24\" class=\"h-4 w-4\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6 6L18 18M18 6L6 18\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n </svg>\n </button>\n </ng-template>\n </div>\n\n <!-- Body -->\n <div [ngClass]=\"bodyWrapperClassName\">\n <ng-content></ng-content>\n </div>\n\n <!-- Footer -->\n <div *ngIf=\"showFooter\" [ngClass]=\"footerWrapperClassName\">\n <ng-container *ngIf=\"customFooter; else defaultFooter\">\n <ng-content select=\"[pdmFooter]\"></ng-content>\n </ng-container>\n <ng-template #defaultFooter>\n <ng-container *ngIf=\"variant === 'custom-close'; else defaultActions\">\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm sm:w-auto\"\n (click)=\"onSecondaryAction()\"\n >\n {{ secondaryActionText }}\n </button>\n </ng-container>\n\n <ng-template #defaultActions>\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm sm:w-auto\"\n (click)=\"onSecondaryAction()\"\n >\n {{ secondaryActionText }}\n </button>\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm sm:w-auto\"\n (click)=\"onPrimaryAction()\"\n >\n {{ primaryActionText }}\n </button>\n </ng-template>\n </ng-template>\n </div>\n </section>\n</div>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
221
172
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDialogComponent, decorators: [{
222
173
  type: Component,
223
- args: [{ selector: "pdm-dialog", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"open\" [ngClass]=\"containerClassName\">\n <!-- Backdrop -->\n <div class=\"absolute inset-0 bg-foreground/30 backdrop-blur-sm\" (click)=\"onBackdropClick()\"></div>\n \n <!-- Dialog Panel -->\n <section role=\"dialog\" aria-modal=\"true\" cdkTrapFocus [ngClass]=\"panelClassName\">\n <!-- Header -->\n <div *ngIf=\"showHeader\" [ngClass]=\"headerWrapperClassName\">\n <div class=\"min-w-0 flex-1\">\n <h2 class=\"m-0 text-lg font-semibold leading-none tracking-tight text-foreground\">{{ title }}</h2>\n <p *ngIf=\"description\" class=\"m-0 mt-2 text-sm text-muted-foreground\">{{ description }}</p>\n </div>\n <button\n *ngIf=\"showCloseButton\"\n type=\"button\"\n class=\"inline-flex h-6 w-6 flex-shrink-0 appearance-none box-border items-center justify-center rounded-sm border-0 bg-transparent p-0 text-foreground opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none\"\n (click)=\"close()\"\n aria-label=\"Close dialog\"\n >\n <svg viewBox=\"0 0 24 24\" class=\"h-4 w-4\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6 6L18 18M18 6L6 18\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n </svg>\n </button>\n </div>\n\n <!-- Body -->\n <div [ngClass]=\"bodyWrapperClassName\">\n <ng-content></ng-content>\n </div>\n\n <!-- Footer -->\n <div *ngIf=\"showFooter\" [ngClass]=\"footerWrapperClassName\">\n <ng-container *ngIf=\"variant === 'custom-close'; else defaultActions\">\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm sm:w-auto\"\n (click)=\"onSecondaryAction()\"\n >\n {{ secondaryActionText }}\n </button>\n </ng-container>\n\n <ng-template #defaultActions>\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm sm:w-auto\"\n (click)=\"onSecondaryAction()\"\n >\n {{ secondaryActionText }}\n </button>\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm sm:w-auto\"\n (click)=\"onPrimaryAction()\"\n >\n {{ primaryActionText }}\n </button>\n </ng-template>\n </div>\n </section>\n</div>\n", styles: [":host{display:block}\n"] }]
174
+ args: [{ selector: "pdm-dialog", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"open\" [ngClass]=\"containerClassName\">\n <!-- Backdrop -->\n <div class=\"absolute inset-0 bg-foreground/30 backdrop-blur-sm\" (click)=\"onBackdropClick()\"></div>\n\n <!-- Dialog Panel -->\n <section role=\"dialog\" aria-modal=\"true\" cdkTrapFocus [ngClass]=\"panelClassName\">\n <!-- Header -->\n <div *ngIf=\"showHeader\" [ngClass]=\"headerWrapperClassName\">\n <ng-container *ngIf=\"customHeader; else defaultHeader\">\n <ng-content select=\"[pdmHeader]\"></ng-content>\n </ng-container>\n <ng-template #defaultHeader>\n <div class=\"min-w-0 flex-1\">\n <h2 class=\"m-0 text-lg font-semibold leading-none tracking-tight text-foreground\">{{ title }}</h2>\n <p *ngIf=\"description\" class=\"m-0 mt-2 text-sm text-muted-foreground\">{{ description }}</p>\n </div>\n <button\n *ngIf=\"showCloseButton\"\n type=\"button\"\n class=\"inline-flex h-6 w-6 flex-shrink-0 appearance-none box-border items-center justify-center rounded-sm border-0 bg-transparent p-0 text-foreground opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none\"\n (click)=\"close()\"\n aria-label=\"Close dialog\"\n >\n <svg viewBox=\"0 0 24 24\" class=\"h-4 w-4\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6 6L18 18M18 6L6 18\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\"></path>\n </svg>\n </button>\n </ng-template>\n </div>\n\n <!-- Body -->\n <div [ngClass]=\"bodyWrapperClassName\">\n <ng-content></ng-content>\n </div>\n\n <!-- Footer -->\n <div *ngIf=\"showFooter\" [ngClass]=\"footerWrapperClassName\">\n <ng-container *ngIf=\"customFooter; else defaultFooter\">\n <ng-content select=\"[pdmFooter]\"></ng-content>\n </ng-container>\n <ng-template #defaultFooter>\n <ng-container *ngIf=\"variant === 'custom-close'; else defaultActions\">\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm sm:w-auto\"\n (click)=\"onSecondaryAction()\"\n >\n {{ secondaryActionText }}\n </button>\n </ng-container>\n\n <ng-template #defaultActions>\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md border border-solid border-input bg-background px-4 py-2 text-sm font-medium text-foreground shadow-sm sm:w-auto\"\n (click)=\"onSecondaryAction()\"\n >\n {{ secondaryActionText }}\n </button>\n <button\n type=\"button\"\n class=\"inline-flex h-9 w-full appearance-none box-border items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow-sm sm:w-auto\"\n (click)=\"onPrimaryAction()\"\n >\n {{ primaryActionText }}\n </button>\n </ng-template>\n </ng-template>\n </div>\n </section>\n</div>\n", styles: [":host{display:block}\n"] }]
224
175
  }], propDecorators: { open: [{
225
176
  type: Input
226
177
  }], variant: [{
227
178
  type: Input
228
179
  }], size: [{
229
180
  type: Input
181
+ }], maxWidth: [{
182
+ type: Input
230
183
  }], title: [{
231
184
  type: Input
232
185
  }], description: [{
@@ -255,6 +208,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
255
208
  type: Input
256
209
  }], className: [{
257
210
  type: Input
211
+ }], customHeader: [{
212
+ type: ContentChild,
213
+ args: [PdmDialogHeaderDirective]
214
+ }], customFooter: [{
215
+ type: ContentChild,
216
+ args: [PdmDialogFooterDirective]
258
217
  }], openChange: [{
259
218
  type: Output
260
219
  }], primaryAction: [{
@@ -268,11 +227,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
268
227
 
269
228
  const COMPONENTS = [
270
229
  PdmDialogComponent,
230
+ PdmDialogHeaderDirective,
231
+ PdmDialogFooterDirective,
271
232
  ];
272
233
  class PdmDialogModule {
273
234
  }
274
235
  PdmDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
275
- PdmDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: PdmDialogModule, declarations: [PdmDialogComponent], imports: [CommonModule, A11yModule], exports: [PdmDialogComponent] });
236
+ PdmDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: PdmDialogModule, declarations: [PdmDialogComponent,
237
+ PdmDialogHeaderDirective,
238
+ PdmDialogFooterDirective], imports: [CommonModule, A11yModule], exports: [PdmDialogComponent,
239
+ PdmDialogHeaderDirective,
240
+ PdmDialogFooterDirective] });
276
241
  PdmDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDialogModule, imports: [CommonModule, A11yModule] });
277
242
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmDialogModule, decorators: [{
278
243
  type: NgModule,
@@ -287,5 +252,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
287
252
  * Generated bundle index. Do not edit.
288
253
  */
289
254
 
290
- export { PdmDialogComponent, PdmDialogModule };
255
+ export { PdmDialogComponent, PdmDialogFooterDirective, PdmDialogHeaderDirective, PdmDialogModule };
291
256
  //# sourceMappingURL=pdm-ui-kit-src-dialog.mjs.map