pdm-ui-kit 1.4.0 → 1.6.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 (46) 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/input/input.component.mjs +10 -3
  11. package/esm2020/src/alert/alert-dialog.component.mjs +101 -11
  12. package/esm2020/src/alert/alert.module.mjs +5 -4
  13. package/esm2020/src/dialog/dialog.component.mjs +43 -85
  14. package/esm2020/src/dialog/dialog.module.mjs +10 -4
  15. package/esm2020/src/input/input.component.mjs +10 -3
  16. package/esm2020/src/utils/cn.mjs +19 -0
  17. package/esm2020/src/utils/public-api.mjs +2 -1
  18. package/fesm2015/pdm-ui-kit-src-alert.mjs +103 -12
  19. package/fesm2015/pdm-ui-kit-src-alert.mjs.map +1 -1
  20. package/fesm2015/pdm-ui-kit-src-dialog.mjs +50 -85
  21. package/fesm2015/pdm-ui-kit-src-dialog.mjs.map +1 -1
  22. package/fesm2015/pdm-ui-kit-src-input.mjs +8 -2
  23. package/fesm2015/pdm-ui-kit-src-input.mjs.map +1 -1
  24. package/fesm2015/pdm-ui-kit-src-utils.mjs +21 -1
  25. package/fesm2015/pdm-ui-kit-src-utils.mjs.map +1 -1
  26. package/fesm2015/pdm-ui-kit.mjs +169 -110
  27. package/fesm2015/pdm-ui-kit.mjs.map +1 -1
  28. package/fesm2020/pdm-ui-kit-src-alert.mjs +103 -12
  29. package/fesm2020/pdm-ui-kit-src-alert.mjs.map +1 -1
  30. package/fesm2020/pdm-ui-kit-src-dialog.mjs +50 -85
  31. package/fesm2020/pdm-ui-kit-src-dialog.mjs.map +1 -1
  32. package/fesm2020/pdm-ui-kit-src-input.mjs +8 -2
  33. package/fesm2020/pdm-ui-kit-src-input.mjs.map +1 -1
  34. package/fesm2020/pdm-ui-kit-src-utils.mjs +21 -1
  35. package/fesm2020/pdm-ui-kit-src-utils.mjs.map +1 -1
  36. package/fesm2020/pdm-ui-kit.mjs +169 -110
  37. package/fesm2020/pdm-ui-kit.mjs.map +1 -1
  38. package/input/input.component.d.ts +4 -1
  39. package/package.json +3 -1
  40. package/src/alert/alert-dialog.component.d.ts +14 -2
  41. package/src/alert/alert.module.d.ts +2 -1
  42. package/src/dialog/dialog.component.d.ts +18 -26
  43. package/src/dialog/dialog.module.d.ts +1 -1
  44. package/src/input/input.component.d.ts +4 -1
  45. package/src/utils/cn.d.ts +15 -0
  46. package/src/utils/public-api.d.ts +1 -0
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"pdm-ui-kit-src-dialog.mjs","sources":["../../../src/dialog/dialog.component.ts","../../../src/dialog/dialog.component.html","../../../src/dialog/dialog.module.ts","../../../src/dialog/pdm-ui-kit-src-dialog.ts"],"sourcesContent":["import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tEventEmitter,\n\tHostListener,\n\tInput,\n\tOutput,\n} from \"@angular/core\";\nimport { responsive } from \"pdm-ui-kit/src/utils\";\nimport { Z_INDEX } from \"pdm-ui-kit/src/utils\";\n\nexport type PdmDialogVariant = \"default\" | \"custom-close\";\n\n/**\n * @deprecated Use 'responsive' mode instead. Will be removed in v0.3.0\n */\nexport type PdmDialogSize =\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\nexport type PdmDialogFooterAlign = \"right\" | \"full-width\" | \"left\";\n\n/**\n * Modal/Dialog component con soporte responsive\n *\n * MEJORADO en v0.2.0:\n * - Modo 'responsive' (default): fullscreen en mobile, modal en desktop\n * - Tamaños predefinidos: sm, md, lg, xl\n * - Mejor manejo de scroll en mobile\n *\n * @example\n * // Responsive (recomendado)\n * <pdm-dialog [open]=\"isOpen\" size=\"responsive\">\n * <p>Content</p>\n * </pdm-dialog>\n *\n * @example\n * // Tamaño fijo\n * <pdm-dialog [open]=\"isOpen\" size=\"lg\">\n * <p>Content</p>\n * </pdm-dialog>\n */\n@Component({\n\tselector: \"pdm-dialog\",\n\ttemplateUrl: \"./dialog.component.html\",\n\tstyles: [\n\t\t`\n :host {\n display: block;\n }\n `,\n\t],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PdmDialogComponent {\n\t@Input() open = false;\n\t@Input() variant: PdmDialogVariant = \"default\";\n\n\t/**\n\t * Tamaño del dialog\n\t * - responsive: fullscreen mobile, modal desktop (recomendado)\n\t * - sm: 400px max\n\t * - md: 500px max\n\t * - lg: 640px max (default)\n\t * - xl: 800px max\n\t * - desktop/mobile/mobile-fullscreen: legacy, deprecado\n\t */\n\t@Input() size: PdmDialogSize = \"responsive\";\n\n\t@Input() title = \"\";\n\t@Input() description = \"\";\n\t@Input() closeOnBackdrop = true;\n\t@Input() closeOnEsc = true;\n\t@Input() showCloseButton = true;\n\t@Input() showHeader = true;\n\t@Input() showFooter = true;\n\t@Input() primaryActionText = \"Save changes\";\n\t@Input() secondaryActionText = \"Cancel\";\n\t@Input() alignFooter: PdmDialogFooterAlign = \"right\";\n\t@Input() headerClassName = \"\";\n\t@Input() bodyClassName = \"\";\n\t@Input() footerClassName = \"\";\n\t@Input() className = \"\";\n\n\t@Output() openChange = new EventEmitter<boolean>();\n\t@Output() primaryAction = new EventEmitter<void>();\n\t@Output() secondaryAction = new EventEmitter<void>();\n\n\t@HostListener(\"document:keydown.escape\")\n\tonEsc(): void {\n\t\tif (this.open && this.closeOnEsc) {\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\tclose(): void {\n\t\tthis.openChange.emit(false);\n\t}\n\n\tonPrimaryAction(): void {\n\t\tthis.primaryAction.emit();\n\t}\n\n\tonSecondaryAction(): void {\n\t\tthis.secondaryAction.emit();\n\t}\n\n\tonBackdropClick(): void {\n\t\tif (this.closeOnBackdrop) {\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\tget panelClassName(): string {\n\t\t// Legacy sizes (backward compatibility)\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\t// New responsive mode (recomendado)\n\t\tif (this.size === \"responsive\") {\n\t\t\treturn this.buildPanelClasses([\n\t\t\t\t// Mobile: fullscreen con bordes redondeados solo arriba\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// Desktop: modal centrado\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\t// New size options\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\n\t\tconst maxWidth = sizeMap[this.size as keyof typeof sizeMap] || sizeMap.lg;\n\n\t\treturn this.buildPanelClasses([\n\t\t\t// Mobile: fullscreen\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// Desktop: modal\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\tprivate buildPanelClasses(sizeClasses: string[]): string {\n\t\tconst base = [\n\t\t\t\"relative\",\n\t\t\tZ_INDEX.modal, // z-50 - debe estar sobre backdrop (z-40)\n\t\t\t\"flex\",\n\t\t\t\"flex-col\",\n\t\t\t\"border border-solid\",\n\t\t\t\"border-border\",\n\t\t\t\"bg-background\",\n\t\t\t\"text-foreground\",\n\t\t\t\"shadow-lg\",\n\t\t\t\"overflow-hidden\",\n\t\t\t...sizeClasses,\n\t\t\tthis.className,\n\t\t];\n\n\t\treturn base.filter(Boolean).join(\" \");\n\t}\n\n\tget bodyWrapperClassName(): string {\n\t\t// min-h-0 is CRITICAL for flex child to shrink and allow internal scroll\n\t\tconst base = [\n\t\t\t\"flex-1\",\n\t\t\t\"min-h-0\",\n\t\t\t\"overflow-y-auto\",\n\t\t\t\"px-4\",\n\t\t\t\"py-6\",\n\t\t\t\"sm:px-6\",\n\t\t\tthis.bodyClassName,\n\t\t];\n\n\t\treturn base.filter(Boolean).join(\" \");\n\t}\n\n\tget headerWrapperClassName(): string {\n\t\tconst base = [\n\t\t\t\"flex\",\n\t\t\t\"items-start\",\n\t\t\t\"justify-between\",\n\t\t\t\"gap-3\",\n\t\t\t\"p-4\",\n\t\t\t\"sm:p-6\",\n\t\t\t\"border-b\",\n\t\t\t\"border-border\",\n\t\t\tthis.headerClassName,\n\t\t];\n\n\t\treturn base.filter(Boolean).join(\" \");\n\t}\n\n\tget footerWrapperClassName(): string {\n\t\tconst effectiveAlign =\n\t\t\tthis.alignFooter === \"right\" && this.variant === \"custom-close\"\n\t\t\t\t? \"left\"\n\t\t\t\t: this.alignFooter;\n\n\t\tconst base = [\n\t\t\t\"p-4\",\n\t\t\t\"sm:p-6\",\n\t\t\t\"border-t\",\n\t\t\t\"border-border\",\n\t\t\t// Mobile: siempre full-width\n\t\t\t\"flex\",\n\t\t\t\"flex-col\",\n\t\t\t\"gap-2\",\n\t\t\t// Desktop: según alignFooter\n\t\t\teffectiveAlign === \"full-width\"\n\t\t\t\t? \"sm:flex-col\"\n\t\t\t\t: \"sm:flex-row sm:items-center\",\n\t\t\teffectiveAlign === \"left\" ? \"sm:justify-start\" : \"\",\n\t\t\teffectiveAlign === \"right\" ? \"sm:justify-end\" : \"\",\n\t\t\tthis.footerClassName,\n\t\t];\n\n\t\treturn base.filter(Boolean).join(\" \");\n\t}\n\n\tget containerClassName(): string {\n\t\t// Container con backdrop z-40\n\t\t// Mobile: fullscreen desde el bottom\n\t\t// Desktop: centrado\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","<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","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { PdmDialogComponent } from './dialog.component';\n\nconst COMPONENTS = [\n PdmDialogComponent,\n];\n\n@NgModule({\n imports: [CommonModule, A11yModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class PdmDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AA4BA;;;;;;;;;;;;;;;;;;;AAmBG;MAaU,kBAAkB,CAAA;AAZ/B,IAAA,WAAA,GAAA;AAaU,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;AACb,QAAA,IAAO,CAAA,OAAA,GAAqB,SAAS,CAAC;AAE/C;;;;;;;;AAQG;AACM,QAAA,IAAI,CAAA,IAAA,GAAkB,YAAY,CAAC;AAEnC,QAAA,IAAK,CAAA,KAAA,GAAG,EAAE,CAAC;AACX,QAAA,IAAW,CAAA,WAAA,GAAG,EAAE,CAAC;AACjB,QAAA,IAAe,CAAA,eAAA,GAAG,IAAI,CAAC;AACvB,QAAA,IAAU,CAAA,UAAA,GAAG,IAAI,CAAC;AAClB,QAAA,IAAe,CAAA,eAAA,GAAG,IAAI,CAAC;AACvB,QAAA,IAAU,CAAA,UAAA,GAAG,IAAI,CAAC;AAClB,QAAA,IAAU,CAAA,UAAA,GAAG,IAAI,CAAC;AAClB,QAAA,IAAiB,CAAA,iBAAA,GAAG,cAAc,CAAC;AACnC,QAAA,IAAmB,CAAA,mBAAA,GAAG,QAAQ,CAAC;AAC/B,QAAA,IAAW,CAAA,WAAA,GAAyB,OAAO,CAAC;AAC5C,QAAA,IAAe,CAAA,eAAA,GAAG,EAAE,CAAC;AACrB,QAAA,IAAa,CAAA,aAAA,GAAG,EAAE,CAAC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GAQP,eAAe,EAAA,OAAA,EAAA,CAJhB,YAAY,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAIvB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,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;iBACpB,CAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"pdm-ui-kit-src-dialog.mjs","sources":["../../../src/dialog/dialog.component.ts","../../../src/dialog/dialog.component.html","../../../src/dialog/dialog.module.ts","../../../src/dialog/pdm-ui-kit-src-dialog.ts"],"sourcesContent":["import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tContentChild,\n\tDirective,\n\tEventEmitter,\n\tHostListener,\n\tInput,\n\tOutput,\n} from \"@angular/core\";\nimport { cn, responsive, Z_INDEX } from \"pdm-ui-kit/src/utils\";\n\nexport type PdmDialogVariant = \"default\" | \"custom-close\";\n\n/**\n * @deprecated Use 'responsive' mode instead. Will be removed in v0.3.0\n */\nexport type PdmDialogSize =\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\nexport type PdmDialogFooterAlign = \"right\" | \"full-width\" | \"left\";\n\n@Directive({ selector: \"[pdmHeader]\" })\nexport class PdmDialogHeaderDirective {}\n\n@Directive({ selector: \"[pdmFooter]\" })\nexport class PdmDialogFooterDirective {}\n\n/**\n * Responsive modal/dialog component.\n */\n@Component({\n\tselector: \"pdm-dialog\",\n\ttemplateUrl: \"./dialog.component.html\",\n\tstyles: [\n\t\t`\n :host {\n display: block;\n }\n `,\n\t],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PdmDialogComponent {\n\t@Input() open = false;\n\t@Input() variant: PdmDialogVariant = \"default\";\n\n\t/**\n\t * Dialog size. Responsive mode is fullscreen on mobile and a modal on desktop.\n\t */\n\t@Input() size: PdmDialogSize = \"responsive\";\n\n\t/**\n\t * Custom desktop maximum width, such as `800px` or `min(90vw, 800px)`.\n\t * Overrides `size` at the `sm` breakpoint; responsive mobile mode remains fullscreen.\n\t */\n\t@Input() maxWidth = \"\";\n\n\t@Input() title = \"\";\n\t@Input() description = \"\";\n\t@Input() closeOnBackdrop = true;\n\t@Input() closeOnEsc = true;\n\t@Input() showCloseButton = true;\n\t@Input() showHeader = true;\n\t@Input() showFooter = true;\n\t@Input() primaryActionText = \"Save changes\";\n\t@Input() secondaryActionText = \"Cancel\";\n\t@Input() alignFooter: PdmDialogFooterAlign = \"right\";\n\t@Input() headerClassName = \"\";\n\t@Input() bodyClassName = \"\";\n\t@Input() footerClassName = \"\";\n\t@Input() className = \"\";\n\n\t@ContentChild(PdmDialogHeaderDirective) customHeader?: PdmDialogHeaderDirective;\n\t@ContentChild(PdmDialogFooterDirective) customFooter?: PdmDialogFooterDirective;\n\n\t@Output() openChange = new EventEmitter<boolean>();\n\t@Output() primaryAction = new EventEmitter<void>();\n\t@Output() secondaryAction = new EventEmitter<void>();\n\n\t@HostListener(\"document:keydown.escape\")\n\tonEsc(): void {\n\t\tif (this.open && this.closeOnEsc) {\n\t\t\tthis.close();\n\t\t}\n\t}\n\n\tclose(): void {\n\t\tthis.openChange.emit(false);\n\t}\n\n\tonPrimaryAction(): void {\n\t\tthis.primaryAction.emit();\n\t}\n\n\tonSecondaryAction(): void {\n\t\tthis.secondaryAction.emit();\n\t}\n\n\tonBackdropClick(): void {\n\t\tif (this.closeOnBackdrop) {\n\t\t\tthis.close();\n\t\t}\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\tprivate buildPanelClasses(sizeClasses: string[]): string {\n\t\tconst base = [\n\t\t\t\"relative\",\n\t\t\tZ_INDEX.modal,\n\t\t\t\"flex\",\n\t\t\t\"flex-col\",\n\t\t\t\"border border-solid\",\n\t\t\t\"border-border\",\n\t\t\t\"bg-background\",\n\t\t\t\"text-foreground\",\n\t\t\t\"shadow-lg\",\n\t\t\t\"overflow-hidden\",\n\t\t];\n\t\tconst maxWidthClass = this.maxWidth ? `sm:max-w-[${this.maxWidth}]` : \"\";\n\n\t\treturn cn(...base, ...sizeClasses, maxWidthClass, this.className);\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-6 sm:px-6\",\n\t\t\tthis.bodyClassName,\n\t\t);\n\t}\n\n\tget headerWrapperClassName(): string {\n\t\treturn cn(\n\t\t\t\"flex items-start justify-between gap-3 p-4 sm:p-6 border-b border-border\",\n\t\t\tthis.headerClassName,\n\t\t);\n\t}\n\n\tget footerWrapperClassName(): string {\n\t\tconst effectiveAlign =\n\t\t\tthis.alignFooter === \"right\" && this.variant === \"custom-close\"\n\t\t\t\t? \"left\"\n\t\t\t\t: this.alignFooter;\n\n\t\treturn cn(\n\t\t\t\"p-4 sm:p-6 border-t border-border flex flex-col gap-2\",\n\t\t\teffectiveAlign === \"full-width\"\n\t\t\t\t? \"sm:flex-col\"\n\t\t\t\t: \"sm:flex-row sm:items-center\",\n\t\t\teffectiveAlign === \"left\" ? \"sm:justify-start\" : \"\",\n\t\t\teffectiveAlign === \"right\" ? \"sm:justify-end\" : \"\",\n\t\t\tthis.footerClassName,\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","<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","import { CommonModule } from '@angular/common';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { NgModule } from '@angular/core';\nimport {\n PdmDialogComponent,\n PdmDialogFooterDirective,\n PdmDialogHeaderDirective,\n} from './dialog.component';\n\nconst COMPONENTS = [\n PdmDialogComponent,\n PdmDialogHeaderDirective,\n PdmDialogFooterDirective,\n];\n\n@NgModule({\n imports: [CommonModule, A11yModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class PdmDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MA8Ba,wBAAwB,CAAA;;qHAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;yGAAxB,wBAAwB,EAAA,QAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,SAAS;mBAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAA;;MAIzB,wBAAwB,CAAA;;qHAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,S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B,CAAA;;;AE9ExC,MAAM,UAAU,GAAG;IACjB,kBAAkB;IAClB,wBAAwB;IACxB,wBAAwB;CACzB,CAAC;MAOW,eAAe,CAAA;;4GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,iBAV1B,kBAAkB;QAClB,wBAAwB;AACxB,QAAA,wBAAwB,CAId,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,UAAU,aANlC,kBAAkB;QAClB,wBAAwB;QACxB,wBAAwB,CAAA,EAAA,CAAA,CAAA;6GAQb,eAAe,EAAA,OAAA,EAAA,CAJhB,YAAY,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAIvB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,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;iBACpB,CAAA;;;ACnBD;;AAEG;;;;"}
@@ -17,6 +17,8 @@ class PdmInputComponent {
17
17
  this.invalid = false;
18
18
  this.size = "regular";
19
19
  this.roundness = "default";
20
+ this.icon = "";
21
+ this.iconPosition = "left";
20
22
  this.className = "";
21
23
  this.inputClassName = "";
22
24
  this.label = "";
@@ -45,10 +47,10 @@ class PdmInputComponent {
45
47
  }
46
48
  }
47
49
  PdmInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
48
- PdmInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmInputComponent, selector: "pdm-input", inputs: { id: "id", type: "type", value: "value", placeholder: "placeholder", disabled: "disabled", readonly: "readonly", required: "required", invalid: "invalid", size: "size", roundness: "roundness", className: "className", inputClassName: "inputClassName", label: "label", helperText: "helperText", errorText: "errorText" }, outputs: { valueChange: "valueChange", blurred: "blurred" }, ngImport: i0, template: "<div [ngClass]=\"['grid w-full gap-3', className]\">\n <label\n *ngIf=\"label\"\n [attr.for]=\"id\"\n [ngClass]=\"[\n 'text-sm font-medium leading-none',\n invalid ? 'text-destructive' : 'text-foreground',\n ]\"\n >{{ label }}</label\n >\n <input\n [id]=\"id\"\n [type]=\"type\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [attr.aria-invalid]=\"invalid\"\n [attr.aria-describedby]=\"descriptionAttrId\"\n [ngClass]=\"[\n 'border-input focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 aria-invalid:ring-2 aria-invalid:ring-destructive aria-invalid:border-destructive aria-invalid:placeholder:text-destructive/70 placeholder:text-muted-foreground w-full min-w-0 appearance-none box-border rounded-lg border border-solid bg-transparent px-3 py-1 text-sm shadow-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n size === 'large' ? 'h-10 px-4 text-sm' : '',\n size === 'regular' ? 'h-9 px-3 text-sm' : '',\n size === 'small' ? 'h-8 px-2 text-sm' : '',\n size === 'mini' ? 'h-6 px-1.5 text-xs' : '',\n roundness === 'round' ? 'rounded-full' : 'rounded-lg',\n type === 'file' ? 'text-sm' : 'text-foreground',\n inputClassName,\n ]\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <p *ngIf=\"!invalid && helperText\" [id]=\"helperAttrId\" class=\"m-0 text-sm text-muted-foreground\">\n {{ helperText }}\n </p>\n <p *ngIf=\"invalid && errorText\" [id]=\"errorAttrId\" class=\"m-0 text-sm text-destructive\">\n {{ errorText }}\n </p>\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
50
+ PdmInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PdmInputComponent, selector: "pdm-input", inputs: { id: "id", type: "type", value: "value", placeholder: "placeholder", disabled: "disabled", readonly: "readonly", required: "required", invalid: "invalid", size: "size", roundness: "roundness", icon: "icon", iconPosition: "iconPosition", className: "className", inputClassName: "inputClassName", label: "label", helperText: "helperText", errorText: "errorText" }, outputs: { valueChange: "valueChange", blurred: "blurred" }, ngImport: i0, template: "<div [ngClass]=\"['grid w-full gap-3', className]\">\n <label\n *ngIf=\"label\"\n [attr.for]=\"id\"\n [ngClass]=\"[\n 'text-sm font-medium leading-none',\n invalid ? 'text-destructive' : 'text-foreground',\n ]\"\n >{{ label }}</label\n >\n <div [ngClass]=\"icon ? 'relative' : ''\">\n <pdm-icon\n *ngIf=\"icon\"\n [name]=\"icon\"\n [size]=\"16\"\n aria-hidden=\"true\"\n [ngClass]=\"[\n 'pointer-events-none absolute top-1/2 -translate-y-1/2 text-muted-foreground',\n iconPosition === 'right' ? 'right-3' : 'left-3',\n ]\"\n ></pdm-icon>\n <input\n [id]=\"id\"\n [type]=\"type\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [attr.aria-invalid]=\"invalid\"\n [attr.aria-describedby]=\"descriptionAttrId\"\n [ngClass]=\"[\n 'border-input focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 aria-invalid:ring-2 aria-invalid:ring-destructive aria-invalid:border-destructive aria-invalid:placeholder:text-destructive/70 placeholder:text-muted-foreground w-full min-w-0 appearance-none box-border rounded-lg border border-solid bg-transparent px-3 py-1 text-sm shadow-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n size === 'large' ? 'h-10 px-4 text-sm' : '',\n size === 'regular' ? 'h-9 px-3 text-sm' : '',\n size === 'small' ? 'h-8 px-2 text-sm' : '',\n size === 'mini' ? 'h-6 px-1.5 text-xs' : '',\n icon && iconPosition === 'left' ? 'pl-9' : '',\n icon && iconPosition === 'right' ? 'pr-9' : '',\n roundness === 'round' ? 'rounded-full' : 'rounded-lg',\n type === 'file' ? 'text-sm' : 'text-foreground',\n inputClassName,\n ]\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n <p *ngIf=\"!invalid && helperText\" [id]=\"helperAttrId\" class=\"m-0 text-sm text-muted-foreground\">\n {{ helperText }}\n </p>\n <p *ngIf=\"invalid && errorText\" [id]=\"errorAttrId\" class=\"m-0 text-sm text-destructive\">\n {{ errorText }}\n </p>\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: "component", type: i2.PdmIconComponent, selector: "pdm-icon", inputs: ["name", "library", "assetUrl", "size", "strokeWidth", "className", "ariaLabel", "decorative"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
49
51
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PdmInputComponent, decorators: [{
50
52
  type: Component,
51
- args: [{ selector: "pdm-input", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"['grid w-full gap-3', className]\">\n <label\n *ngIf=\"label\"\n [attr.for]=\"id\"\n [ngClass]=\"[\n 'text-sm font-medium leading-none',\n invalid ? 'text-destructive' : 'text-foreground',\n ]\"\n >{{ label }}</label\n >\n <input\n [id]=\"id\"\n [type]=\"type\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [attr.aria-invalid]=\"invalid\"\n [attr.aria-describedby]=\"descriptionAttrId\"\n [ngClass]=\"[\n 'border-input focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 aria-invalid:ring-2 aria-invalid:ring-destructive aria-invalid:border-destructive aria-invalid:placeholder:text-destructive/70 placeholder:text-muted-foreground w-full min-w-0 appearance-none box-border rounded-lg border border-solid bg-transparent px-3 py-1 text-sm shadow-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n size === 'large' ? 'h-10 px-4 text-sm' : '',\n size === 'regular' ? 'h-9 px-3 text-sm' : '',\n size === 'small' ? 'h-8 px-2 text-sm' : '',\n size === 'mini' ? 'h-6 px-1.5 text-xs' : '',\n roundness === 'round' ? 'rounded-full' : 'rounded-lg',\n type === 'file' ? 'text-sm' : 'text-foreground',\n inputClassName,\n ]\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <p *ngIf=\"!invalid && helperText\" [id]=\"helperAttrId\" class=\"m-0 text-sm text-muted-foreground\">\n {{ helperText }}\n </p>\n <p *ngIf=\"invalid && errorText\" [id]=\"errorAttrId\" class=\"m-0 text-sm text-destructive\">\n {{ errorText }}\n </p>\n</div>\n", styles: [":host{display:block}\n"] }]
53
+ args: [{ selector: "pdm-input", changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"['grid w-full gap-3', className]\">\n <label\n *ngIf=\"label\"\n [attr.for]=\"id\"\n [ngClass]=\"[\n 'text-sm font-medium leading-none',\n invalid ? 'text-destructive' : 'text-foreground',\n ]\"\n >{{ label }}</label\n >\n <div [ngClass]=\"icon ? 'relative' : ''\">\n <pdm-icon\n *ngIf=\"icon\"\n [name]=\"icon\"\n [size]=\"16\"\n aria-hidden=\"true\"\n [ngClass]=\"[\n 'pointer-events-none absolute top-1/2 -translate-y-1/2 text-muted-foreground',\n iconPosition === 'right' ? 'right-3' : 'left-3',\n ]\"\n ></pdm-icon>\n <input\n [id]=\"id\"\n [type]=\"type\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [attr.aria-invalid]=\"invalid\"\n [attr.aria-describedby]=\"descriptionAttrId\"\n [ngClass]=\"[\n 'border-input focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 aria-invalid:ring-2 aria-invalid:ring-destructive aria-invalid:border-destructive aria-invalid:placeholder:text-destructive/70 placeholder:text-muted-foreground w-full min-w-0 appearance-none box-border rounded-lg border border-solid bg-transparent px-3 py-1 text-sm shadow-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50',\n size === 'large' ? 'h-10 px-4 text-sm' : '',\n size === 'regular' ? 'h-9 px-3 text-sm' : '',\n size === 'small' ? 'h-8 px-2 text-sm' : '',\n size === 'mini' ? 'h-6 px-1.5 text-xs' : '',\n icon && iconPosition === 'left' ? 'pl-9' : '',\n icon && iconPosition === 'right' ? 'pr-9' : '',\n roundness === 'round' ? 'rounded-full' : 'rounded-lg',\n type === 'file' ? 'text-sm' : 'text-foreground',\n inputClassName,\n ]\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n <p *ngIf=\"!invalid && helperText\" [id]=\"helperAttrId\" class=\"m-0 text-sm text-muted-foreground\">\n {{ helperText }}\n </p>\n <p *ngIf=\"invalid && errorText\" [id]=\"errorAttrId\" class=\"m-0 text-sm text-destructive\">\n {{ errorText }}\n </p>\n</div>\n", styles: [":host{display:block}\n"] }]
52
54
  }], ctorParameters: function () { return []; }, propDecorators: { id: [{
53
55
  type: Input
54
56
  }], type: [{
@@ -69,6 +71,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
69
71
  type: Input
70
72
  }], roundness: [{
71
73
  type: Input
74
+ }], icon: [{
75
+ type: Input
76
+ }], iconPosition: [{
77
+ type: Input
72
78
  }], className: [{
73
79
  type: Input
74
80
  }], inputClassName: [{