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.
- package/README.md +28 -0
- package/alert/alert-dialog.component.d.ts +14 -2
- package/alert/alert.module.d.ts +2 -1
- package/dialog/dialog.component.d.ts +18 -26
- package/dialog/dialog.module.d.ts +1 -1
- package/esm2020/alert/alert-dialog.component.mjs +101 -11
- package/esm2020/alert/alert.module.mjs +5 -4
- package/esm2020/dialog/dialog.component.mjs +43 -85
- package/esm2020/dialog/dialog.module.mjs +10 -4
- package/esm2020/src/alert/alert-dialog.component.mjs +101 -11
- package/esm2020/src/alert/alert.module.mjs +5 -4
- package/esm2020/src/dialog/dialog.component.mjs +43 -85
- package/esm2020/src/dialog/dialog.module.mjs +10 -4
- package/esm2020/src/utils/cn.mjs +19 -0
- package/esm2020/src/utils/public-api.mjs +2 -1
- package/fesm2015/pdm-ui-kit-src-alert.mjs +103 -12
- package/fesm2015/pdm-ui-kit-src-alert.mjs.map +1 -1
- package/fesm2015/pdm-ui-kit-src-dialog.mjs +50 -85
- package/fesm2015/pdm-ui-kit-src-dialog.mjs.map +1 -1
- package/fesm2015/pdm-ui-kit-src-utils.mjs +21 -1
- package/fesm2015/pdm-ui-kit-src-utils.mjs.map +1 -1
- package/fesm2015/pdm-ui-kit.mjs +161 -108
- package/fesm2015/pdm-ui-kit.mjs.map +1 -1
- package/fesm2020/pdm-ui-kit-src-alert.mjs +103 -12
- package/fesm2020/pdm-ui-kit-src-alert.mjs.map +1 -1
- package/fesm2020/pdm-ui-kit-src-dialog.mjs +50 -85
- package/fesm2020/pdm-ui-kit-src-dialog.mjs.map +1 -1
- package/fesm2020/pdm-ui-kit-src-utils.mjs +21 -1
- package/fesm2020/pdm-ui-kit-src-utils.mjs.map +1 -1
- package/fesm2020/pdm-ui-kit.mjs +161 -108
- package/fesm2020/pdm-ui-kit.mjs.map +1 -1
- package/package.json +3 -1
- package/src/alert/alert-dialog.component.d.ts +14 -2
- package/src/alert/alert.module.d.ts +2 -1
- package/src/dialog/dialog.component.d.ts +18 -26
- package/src/dialog/dialog.module.d.ts +1 -1
- package/src/utils/cn.d.ts +15 -0
- package/src/utils/public-api.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pdm-ui-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "PDM UI Kit Angular components - Responsive by default",
|
|
5
5
|
"author": "Corelusa",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
"lucide": ">=0.575.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
+
"clsx": "^2.1.1",
|
|
28
29
|
"date-fns": "^2.30.0",
|
|
30
|
+
"tailwind-merge": "^3.6.0",
|
|
29
31
|
"tslib": "^2.3.0"
|
|
30
32
|
},
|
|
31
33
|
"module": "fesm2015/pdm-ui-kit.mjs",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EventEmitter } from
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
declare type PdmAlertDialogSize = "desktop" | "mobile" | "mobile-fullscreen" | "sm" | "md" | "lg" | "xl" | "responsive";
|
|
3
4
|
export declare class PdmAlertDialogComponent {
|
|
4
5
|
open: boolean;
|
|
5
6
|
showTrigger: boolean;
|
|
@@ -8,7 +9,12 @@ export declare class PdmAlertDialogComponent {
|
|
|
8
9
|
description: string;
|
|
9
10
|
confirmText: string;
|
|
10
11
|
cancelText: string;
|
|
12
|
+
size: PdmAlertDialogSize;
|
|
13
|
+
maxWidth: string;
|
|
11
14
|
className: string;
|
|
15
|
+
bodyClassName: string;
|
|
16
|
+
showFooter: boolean;
|
|
17
|
+
closeOnBackdrop: boolean;
|
|
12
18
|
/** Close when the ESC key is pressed. Default: `true`. */
|
|
13
19
|
closeOnEsc: boolean;
|
|
14
20
|
openChange: EventEmitter<boolean>;
|
|
@@ -20,10 +26,16 @@ export declare class PdmAlertDialogComponent {
|
|
|
20
26
|
* - **Uncontrolled** (no observers): we own the `open` state → mutate it locally.
|
|
21
27
|
*/
|
|
22
28
|
private get isControlled();
|
|
29
|
+
get panelClassName(): string;
|
|
30
|
+
get containerClassName(): string;
|
|
31
|
+
get bodyWrapperClassName(): string;
|
|
23
32
|
onTriggerClick(): void;
|
|
24
33
|
onCancel(): void;
|
|
25
34
|
onConfirm(): void;
|
|
35
|
+
onBackdropClick(): void;
|
|
26
36
|
onEsc(): void;
|
|
37
|
+
private buildPanelClasses;
|
|
27
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmAlertDialogComponent, never>;
|
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PdmAlertDialogComponent, "pdm-alert-dialog", never, { "open": "open"; "showTrigger": "showTrigger"; "triggerText": "triggerText"; "title": "title"; "description": "description"; "confirmText": "confirmText"; "cancelText": "cancelText"; "className": "className"; "closeOnEsc": "closeOnEsc"; }, { "openChange": "openChange"; "confirm": "confirm"; "cancel": "cancel"; }, never,
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdmAlertDialogComponent, "pdm-alert-dialog", never, { "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"; }, { "openChange": "openChange"; "confirm": "confirm"; "cancel": "cancel"; }, never, ["*"], false>;
|
|
29
40
|
}
|
|
41
|
+
export {};
|
|
@@ -2,8 +2,9 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import * as i1 from "./alert.component";
|
|
3
3
|
import * as i2 from "./alert-dialog.component";
|
|
4
4
|
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@angular/cdk/a11y";
|
|
5
6
|
export declare class PdmAlertModule {
|
|
6
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmAlertModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PdmAlertModule, [typeof i1.PdmAlertComponent, typeof i2.PdmAlertDialogComponent], [typeof i3.CommonModule], [typeof i1.PdmAlertComponent, typeof i2.PdmAlertDialogComponent]>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PdmAlertModule, [typeof i1.PdmAlertComponent, typeof i2.PdmAlertDialogComponent], [typeof i3.CommonModule, typeof i4.A11yModule], [typeof i1.PdmAlertComponent, typeof i2.PdmAlertDialogComponent]>;
|
|
8
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<PdmAlertModule>;
|
|
9
10
|
}
|
|
@@ -6,39 +6,29 @@ export declare type PdmDialogVariant = "default" | "custom-close";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare type PdmDialogSize = "desktop" | "mobile" | "mobile-fullscreen" | "sm" | "md" | "lg" | "xl" | "responsive";
|
|
8
8
|
export declare type PdmDialogFooterAlign = "right" | "full-width" | "left";
|
|
9
|
+
export declare class PdmDialogHeaderDirective {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PdmDialogHeaderDirective, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PdmDialogHeaderDirective, "[pdmHeader]", never, {}, {}, never, never, false>;
|
|
12
|
+
}
|
|
13
|
+
export declare class PdmDialogFooterDirective {
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PdmDialogFooterDirective, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PdmDialogFooterDirective, "[pdmFooter]", never, {}, {}, never, never, false>;
|
|
16
|
+
}
|
|
9
17
|
/**
|
|
10
|
-
*
|
|
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>
|
|
18
|
+
* Responsive modal/dialog component.
|
|
28
19
|
*/
|
|
29
20
|
export declare class PdmDialogComponent {
|
|
30
21
|
open: boolean;
|
|
31
22
|
variant: PdmDialogVariant;
|
|
32
23
|
/**
|
|
33
|
-
*
|
|
34
|
-
* - responsive: fullscreen mobile, modal desktop (recomendado)
|
|
35
|
-
* - sm: 400px max
|
|
36
|
-
* - md: 500px max
|
|
37
|
-
* - lg: 640px max (default)
|
|
38
|
-
* - xl: 800px max
|
|
39
|
-
* - desktop/mobile/mobile-fullscreen: legacy, deprecado
|
|
24
|
+
* Dialog size. Responsive mode is fullscreen on mobile and a modal on desktop.
|
|
40
25
|
*/
|
|
41
26
|
size: PdmDialogSize;
|
|
27
|
+
/**
|
|
28
|
+
* Custom desktop maximum width, such as `800px` or `min(90vw, 800px)`.
|
|
29
|
+
* Overrides `size` at the `sm` breakpoint; responsive mobile mode remains fullscreen.
|
|
30
|
+
*/
|
|
31
|
+
maxWidth: string;
|
|
42
32
|
title: string;
|
|
43
33
|
description: string;
|
|
44
34
|
closeOnBackdrop: boolean;
|
|
@@ -53,6 +43,8 @@ export declare class PdmDialogComponent {
|
|
|
53
43
|
bodyClassName: string;
|
|
54
44
|
footerClassName: string;
|
|
55
45
|
className: string;
|
|
46
|
+
customHeader?: PdmDialogHeaderDirective;
|
|
47
|
+
customFooter?: PdmDialogFooterDirective;
|
|
56
48
|
openChange: EventEmitter<boolean>;
|
|
57
49
|
primaryAction: EventEmitter<void>;
|
|
58
50
|
secondaryAction: EventEmitter<void>;
|
|
@@ -68,5 +60,5 @@ export declare class PdmDialogComponent {
|
|
|
68
60
|
get footerWrapperClassName(): string;
|
|
69
61
|
get containerClassName(): string;
|
|
70
62
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmDialogComponent, never>;
|
|
71
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PdmDialogComponent, "pdm-dialog", never, { "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"; }, { "openChange": "openChange"; "primaryAction": "primaryAction"; "secondaryAction": "secondaryAction"; },
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdmDialogComponent, "pdm-dialog", never, { "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"; }, { "openChange": "openChange"; "primaryAction": "primaryAction"; "secondaryAction": "secondaryAction"; }, ["customHeader", "customFooter"], ["[pdmHeader]", "*", "[pdmFooter]"], false>;
|
|
72
64
|
}
|
|
@@ -4,6 +4,6 @@ import * as i2 from "@angular/common";
|
|
|
4
4
|
import * as i3 from "@angular/cdk/a11y";
|
|
5
5
|
export declare class PdmDialogModule {
|
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmDialogModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PdmDialogModule, [typeof i1.PdmDialogComponent], [typeof i2.CommonModule, typeof i3.A11yModule], [typeof i1.PdmDialogComponent]>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PdmDialogModule, [typeof i1.PdmDialogComponent, typeof i1.PdmDialogHeaderDirective, typeof i1.PdmDialogFooterDirective], [typeof i2.CommonModule, typeof i3.A11yModule], [typeof i1.PdmDialogComponent, typeof i1.PdmDialogHeaderDirective, typeof i1.PdmDialogFooterDirective]>;
|
|
8
8
|
static ɵinj: i0.ɵɵInjectorDeclaration<PdmDialogModule>;
|
|
9
9
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ClassValue } from "clsx";
|
|
2
|
+
/**
|
|
3
|
+
* Merge Tailwind classes intelligently.
|
|
4
|
+
*
|
|
5
|
+
* Combines `clsx` (conditional/array/object inputs) with `tailwind-merge`
|
|
6
|
+
* (deduplicates conflicting Tailwind utilities, last wins). This is the
|
|
7
|
+
* shadcn/ui `cn()` pattern. Use it wherever the library composes a
|
|
8
|
+
* user-supplied `className` override with internal base classes, so the
|
|
9
|
+
* override reliably wins regardless of generated CSS order.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* cn("max-w-[640px]", "max-w-[800px]") // => "max-w-[800px]"
|
|
13
|
+
* cn("p-4", condition && "p-6") // => "p-6" when condition is true
|
|
14
|
+
*/
|
|
15
|
+
export declare function cn(...inputs: ClassValue[]): string;
|