pdm-ui-kit 0.2.0 → 0.3.1

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 (44) hide show
  1. package/README.md +168 -3
  2. package/esm2020/lib/components/button-group/button-group.component.mjs +211 -182
  3. package/esm2020/lib/components/combobox/combobox.component.mjs +136 -14
  4. package/esm2020/lib/components/context-menu/context-menu.component.mjs +121 -42
  5. package/esm2020/lib/components/data-table/data-table.component.mjs +3 -3
  6. package/esm2020/lib/components/date-picker/date-picker.component.mjs +66 -54
  7. package/esm2020/lib/components/dialog/dialog.component.mjs +111 -94
  8. package/esm2020/lib/components/hover-card/hover-card.component.mjs +185 -24
  9. package/esm2020/lib/components/input/input.component.mjs +15 -15
  10. package/esm2020/lib/components/input-group/input-group.component.mjs +14 -14
  11. package/esm2020/lib/components/menubar/menubar.component.mjs +105 -29
  12. package/esm2020/lib/components/popover/popover.component.mjs +107 -75
  13. package/esm2020/lib/components/select/select.component.mjs +23 -22
  14. package/esm2020/lib/components/table/table.component.mjs +77 -68
  15. package/esm2020/lib/components/tabs/tabs.component.mjs +6 -6
  16. package/esm2020/lib/components/toggle-group/toggle-group.component.mjs +6 -6
  17. package/esm2020/lib/components/tooltip/tooltip.component.mjs +162 -19
  18. package/esm2020/lib/overlay/z-index-helper.mjs +69 -0
  19. package/esm2020/lib/utils/z-index.mjs +25 -28
  20. package/esm2020/public-api.mjs +67 -66
  21. package/fesm2015/pdm-ui-kit.mjs +1379 -654
  22. package/fesm2015/pdm-ui-kit.mjs.map +1 -1
  23. package/fesm2020/pdm-ui-kit.mjs +1383 -654
  24. package/fesm2020/pdm-ui-kit.mjs.map +1 -1
  25. package/lib/components/button-group/button-group.component.d.ts +8 -2
  26. package/lib/components/combobox/combobox.component.d.ts +20 -3
  27. package/lib/components/context-menu/context-menu.component.d.ts +17 -8
  28. package/lib/components/date-picker/date-picker.component.d.ts +5 -6
  29. package/lib/components/dialog/dialog.component.d.ts +5 -5
  30. package/lib/components/hover-card/hover-card.component.d.ts +27 -4
  31. package/lib/components/input/input.component.d.ts +3 -3
  32. package/lib/components/input-group/input-group.component.d.ts +1 -1
  33. package/lib/components/menubar/menubar.component.d.ts +16 -8
  34. package/lib/components/popover/popover.component.d.ts +13 -12
  35. package/lib/components/select/select.component.d.ts +4 -5
  36. package/lib/components/table/table.component.d.ts +2 -2
  37. package/lib/components/tabs/tabs.component.d.ts +1 -1
  38. package/lib/components/toggle-group/toggle-group.component.d.ts +1 -1
  39. package/lib/components/tooltip/tooltip.component.d.ts +21 -3
  40. package/lib/overlay/z-index-helper.d.ts +36 -0
  41. package/lib/utils/z-index.d.ts +14 -18
  42. package/package.json +6 -6
  43. package/public-api.d.ts +66 -65
  44. package/src/lib/styles/tokens.css +182 -0
@@ -1,13 +1,19 @@
1
1
  import * as i0 from "@angular/core";
2
- export declare type PdmButtonGroupVariant = 'default' | 'group' | 'orientation' | 'separator';
3
- export declare type PdmButtonGroupOrientation = 'horizontal' | 'vertical';
2
+ export declare type PdmButtonGroupVariant = "default" | "group" | "orientation" | "separator";
3
+ export declare type PdmButtonGroupOrientation = "horizontal" | "vertical";
4
+ declare type Axis = "horizontal" | "vertical";
4
5
  export declare class PdmButtonGroupComponent {
5
6
  variant: PdmButtonGroupVariant;
6
7
  orientation?: PdmButtonGroupOrientation;
7
8
  direction?: PdmButtonGroupOrientation;
8
9
  separated: boolean;
9
10
  className: string;
11
+ get axis(): Axis;
12
+ get isVertical(): boolean;
13
+ get shouldAttach(): boolean;
14
+ get ariaOrientation(): PdmButtonGroupOrientation;
10
15
  get rootClasses(): string[];
11
16
  static ɵfac: i0.ɵɵFactoryDeclaration<PdmButtonGroupComponent, never>;
12
17
  static ɵcmp: i0.ɵɵComponentDeclaration<PdmButtonGroupComponent, "pdm-button-group", never, { "variant": "variant"; "orientation": "orientation"; "direction": "direction"; "separated": "separated"; "className": "className"; }, {}, never, ["*"], false>;
13
18
  }
19
+ export {};
@@ -1,6 +1,11 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, ViewContainerRef } from "@angular/core";
2
+ import { Overlay } from "@angular/cdk/overlay";
2
3
  import * as i0 from "@angular/core";
3
- export declare class PdmComboboxComponent {
4
+ export declare class PdmComboboxComponent implements OnDestroy {
5
+ private readonly overlay;
6
+ private readonly viewContainerRef;
7
+ private readonly elementRef;
8
+ private readonly cdr;
4
9
  open: boolean;
5
10
  placeholder: string;
6
11
  searchPlaceholder: string;
@@ -8,11 +13,23 @@ export declare class PdmComboboxComponent {
8
13
  options: string[];
9
14
  value: string;
10
15
  width: number;
16
+ panelClassName: string;
11
17
  openChange: EventEmitter<boolean>;
12
18
  valueChange: EventEmitter<string>;
19
+ triggerRef?: ElementRef<HTMLElement>;
20
+ panelTemplateRef: any;
21
+ private overlayRef;
22
+ private outsideClickSub;
23
+ constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
24
+ ngOnDestroy(): void;
13
25
  get selectedLabel(): string;
14
26
  toggle(): void;
15
27
  select(option: string): void;
28
+ onEscape(): void;
29
+ private openPanel;
30
+ private close;
31
+ private destroyOverlay;
32
+ private getPositionConfigs;
16
33
  static ɵfac: i0.ɵɵFactoryDeclaration<PdmComboboxComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<PdmComboboxComponent, "pdm-combobox", never, { "open": "open"; "placeholder": "placeholder"; "searchPlaceholder": "searchPlaceholder"; "className": "className"; "options": "options"; "value": "value"; "width": "width"; }, { "openChange": "openChange"; "valueChange": "valueChange"; }, never, never, false>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<PdmComboboxComponent, "pdm-combobox", never, { "open": "open"; "placeholder": "placeholder"; "searchPlaceholder": "searchPlaceholder"; "className": "className"; "options": "options"; "value": "value"; "width": "width"; "panelClassName": "panelClassName"; }, { "openChange": "openChange"; "valueChange": "valueChange"; }, never, never, false>;
18
35
  }
@@ -1,29 +1,38 @@
1
- import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
- import { PdmMenuItem } from '../dropdown-menu/dropdown-menu.component';
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, ViewContainerRef } from "@angular/core";
2
+ import { Overlay } from "@angular/cdk/overlay";
3
+ import { PdmMenuItem } from "../dropdown-menu/dropdown-menu.component";
3
4
  import * as i0 from "@angular/core";
4
5
  export interface PdmContextMenuItem extends PdmMenuItem {
5
6
  checked?: boolean;
6
7
  selectedDot?: boolean;
7
8
  }
8
9
  export declare class PdmContextMenuComponent implements OnInit, OnDestroy {
9
- private readonly elementRef;
10
+ private readonly overlay;
11
+ private readonly viewContainerRef;
12
+ private readonly _elementRef;
13
+ private readonly cdr;
10
14
  items: PdmContextMenuItem[];
11
15
  className: string;
12
16
  triggerLabel: string;
13
17
  width: number;
14
18
  height: number;
19
+ panelClassName: string;
15
20
  itemSelect: EventEmitter<string>;
16
21
  open: boolean;
17
22
  x: number;
18
23
  y: number;
19
- private boundPointerDown;
20
- constructor(elementRef: ElementRef<HTMLElement>);
24
+ menuTemplateRef: any;
25
+ private overlayRef;
26
+ private outsideClickSub;
27
+ constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, _elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
21
28
  ngOnInit(): void;
22
29
  ngOnDestroy(): void;
23
30
  onContextMenu(event: MouseEvent): void;
24
31
  select(item: PdmContextMenuItem): void;
25
- onEsc(): void;
26
- private onDocumentPointerDown;
32
+ onDocumentClick(event: MouseEvent): void;
33
+ private createOverlay;
34
+ private close;
35
+ private destroyOverlay;
27
36
  static ɵfac: i0.ɵɵFactoryDeclaration<PdmContextMenuComponent, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<PdmContextMenuComponent, "pdm-context-menu", never, { "items": "items"; "className": "className"; "triggerLabel": "triggerLabel"; "width": "width"; "height": "height"; }, { "itemSelect": "itemSelect"; }, never, never, false>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<PdmContextMenuComponent, "pdm-context-menu", never, { "items": "items"; "className": "className"; "triggerLabel": "triggerLabel"; "width": "width"; "height": "height"; "panelClassName": "panelClassName"; }, { "itemSelect": "itemSelect"; }, never, never, false>;
29
38
  }
@@ -1,10 +1,9 @@
1
- import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, ViewContainerRef } from '@angular/core';
2
- import { Overlay } from '@angular/cdk/overlay';
3
- import { PdmCalendarRange, PdmCalendarVariant } from '../calendar/calendar.component';
4
- import { PdmOverlayOptions } from '../../overlay/pdm-overlay-options';
1
+ import { ChangeDetectorRef, EventEmitter, OnDestroy, ViewContainerRef } from "@angular/core";
2
+ import { Overlay } from "@angular/cdk/overlay";
3
+ import { PdmCalendarRange, PdmCalendarVariant } from "../calendar/calendar.component";
4
+ import { PdmOverlayOptions } from "../../overlay/pdm-overlay-options";
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class PdmDatePickerComponent implements OnDestroy {
7
- private readonly elementRef;
8
7
  private readonly cdr;
9
8
  private readonly overlay;
10
9
  private readonly viewContainerRef;
@@ -17,7 +16,7 @@ export declare class PdmDatePickerComponent implements OnDestroy {
17
16
  private backdropSub;
18
17
  private triggerRef?;
19
18
  private panelTemplateRef;
20
- constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, overlay: Overlay, viewContainerRef: ViewContainerRef);
19
+ constructor(cdr: ChangeDetectorRef, overlay: Overlay, viewContainerRef: ViewContainerRef);
21
20
  id: string;
22
21
  variant: PdmCalendarVariant | string;
23
22
  label: string;
@@ -1,11 +1,11 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter } from "@angular/core";
2
2
  import * as i0 from "@angular/core";
3
- export declare type PdmDialogVariant = 'default' | 'custom-close';
3
+ export declare type PdmDialogVariant = "default" | "custom-close";
4
4
  /**
5
5
  * @deprecated Use 'responsive' mode instead. Will be removed in v0.3.0
6
6
  */
7
- export declare type PdmDialogSize = 'desktop' | 'mobile' | 'mobile-fullscreen' | 'sm' | 'md' | 'lg' | 'xl' | 'responsive';
8
- export declare type PdmDialogFooterAlign = 'right' | 'full-width' | 'left';
7
+ export declare type PdmDialogSize = "desktop" | "mobile" | "mobile-fullscreen" | "sm" | "md" | "lg" | "xl" | "responsive";
8
+ export declare type PdmDialogFooterAlign = "right" | "full-width" | "left";
9
9
  /**
10
10
  * Modal/Dialog component con soporte responsive
11
11
  *
@@ -62,7 +62,7 @@ export declare class PdmDialogComponent {
62
62
  onSecondaryAction(): void;
63
63
  onBackdropClick(): void;
64
64
  get panelClassName(): string;
65
- private buildClasses;
65
+ private buildPanelClasses;
66
66
  get bodyWrapperClassName(): string;
67
67
  get headerWrapperClassName(): string;
68
68
  get footerWrapperClassName(): string;
@@ -1,14 +1,37 @@
1
+ import { ChangeDetectorRef, ElementRef, OnDestroy, ViewContainerRef } from "@angular/core";
2
+ import { Overlay } from "@angular/cdk/overlay";
1
3
  import * as i0 from "@angular/core";
2
- export declare type PdmHoverCardSide = 'top' | 'right' | 'bottom' | 'left';
3
- export declare type PdmHoverCardAlign = 'start' | 'center' | 'end';
4
- export declare class PdmHoverCardComponent {
4
+ export declare type PdmHoverCardSide = "top" | "right" | "bottom" | "left";
5
+ export declare type PdmHoverCardAlign = "start" | "center" | "end";
6
+ export declare class PdmHoverCardComponent implements OnDestroy {
7
+ private readonly overlay;
8
+ private readonly viewContainerRef;
9
+ private readonly elementRef;
10
+ private readonly cdr;
5
11
  className: string;
6
12
  panelClassName: string;
7
13
  side: PdmHoverCardSide;
8
14
  align: PdmHoverCardAlign;
9
15
  panelWidth: number;
10
16
  open: boolean;
11
- get positionClass(): string;
17
+ private overlayRef;
18
+ private showTimeout;
19
+ private hideTimeout;
20
+ panelTemplateRef: any;
21
+ constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
22
+ ngOnDestroy(): void;
23
+ onMouseEnter(): void;
24
+ onMouseLeave(): void;
25
+ onFocusIn(): void;
26
+ onFocusOut(): void;
27
+ private clearTimeouts;
28
+ private show;
29
+ private hide;
30
+ private createOverlay;
31
+ private destroyOverlay;
32
+ private getPositionConfigs;
33
+ private getAlignX;
34
+ private getAlignY;
12
35
  static ɵfac: i0.ɵɵFactoryDeclaration<PdmHoverCardComponent, never>;
13
36
  static ɵcmp: i0.ɵɵComponentDeclaration<PdmHoverCardComponent, "pdm-hover-card", never, { "className": "className"; "panelClassName": "panelClassName"; "side": "side"; "align": "align"; "panelWidth": "panelWidth"; }, {}, never, ["[pdmHoverTrigger]", "[pdmHoverContent]"], false>;
14
37
  }
@@ -1,7 +1,7 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter } from "@angular/core";
2
2
  import * as i0 from "@angular/core";
3
- export declare type PdmInputSize = 'mini' | 'small' | 'regular' | 'large';
4
- export declare type PdmInputRoundness = 'default' | 'round';
3
+ export declare type PdmInputSize = "mini" | "small" | "regular" | "large";
4
+ export declare type PdmInputRoundness = "default" | "round";
5
5
  export declare class PdmInputComponent {
6
6
  id: string;
7
7
  type: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter } from "@angular/core";
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class PdmInputGroupComponent {
4
4
  id: string;
@@ -1,26 +1,34 @@
1
- import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
- import { PdmMenuItem } from '../dropdown-menu/dropdown-menu.component';
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, ViewContainerRef } from "@angular/core";
2
+ import { Overlay } from "@angular/cdk/overlay";
3
+ import { PdmMenuItem } from "../dropdown-menu/dropdown-menu.component";
3
4
  import * as i0 from "@angular/core";
4
5
  export interface PdmMenubarItem {
5
6
  label: string;
6
7
  items: PdmMenuItem[];
7
8
  }
8
9
  export declare class PdmMenubarComponent implements OnInit, OnDestroy {
10
+ private readonly overlay;
11
+ private readonly viewContainerRef;
9
12
  private readonly elementRef;
10
13
  private readonly cdr;
11
14
  menus: PdmMenubarItem[];
12
15
  className: string;
16
+ panelClassName: string;
13
17
  itemSelect: EventEmitter<string>;
14
18
  openIndex: number;
15
- private boundPointerDown;
16
- constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
19
+ menuTemplateRef: any;
20
+ private overlayRef;
21
+ private outsideClickSub;
22
+ constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
17
23
  ngOnInit(): void;
18
24
  ngOnDestroy(): void;
19
- onEsc(): void;
20
- toggle(index: number): void;
25
+ onDocumentClickOrEsc(event: MouseEvent | KeyboardEvent): void;
26
+ toggle(index: number, event: MouseEvent): void;
21
27
  select(value: string): void;
22
28
  selectItem(item: PdmMenuItem): void;
23
- private onDocumentPointerDown;
29
+ private createOverlay;
30
+ private destroyOverlay;
31
+ private getPositionConfigs;
24
32
  static ɵfac: i0.ɵɵFactoryDeclaration<PdmMenubarComponent, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<PdmMenubarComponent, "pdm-menubar", never, { "menus": "menus"; "className": "className"; }, { "itemSelect": "itemSelect"; }, never, never, false>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<PdmMenubarComponent, "pdm-menubar", never, { "menus": "menus"; "className": "className"; "panelClassName": "panelClassName"; }, { "itemSelect": "itemSelect"; }, never, never, false>;
26
34
  }
@@ -1,6 +1,9 @@
1
- import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, ViewContainerRef } from "@angular/core";
2
+ import { Overlay } from "@angular/cdk/overlay";
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class PdmPopoverComponent implements OnInit, OnDestroy {
5
+ private readonly overlay;
6
+ private readonly viewContainerRef;
4
7
  private readonly elementRef;
5
8
  private readonly cdr;
6
9
  private _open;
@@ -9,23 +12,21 @@ export declare class PdmPopoverComponent implements OnInit, OnDestroy {
9
12
  panelClassName: string;
10
13
  showTrigger: boolean;
11
14
  openChange: EventEmitter<boolean>;
12
- panelPlacement: 'top' | 'bottom';
13
- private anchorRef?;
14
15
  private triggerRef?;
15
- private panelRef?;
16
- private boundPointerDown;
17
- constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
16
+ private panelTemplateRef;
17
+ private overlayRef;
18
+ private outsideClickSub;
19
+ constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
18
20
  ngOnInit(): void;
19
21
  ngOnDestroy(): void;
20
22
  set open(value: boolean);
21
23
  get open(): boolean;
22
- get panelClasses(): string[];
23
24
  toggle(): void;
24
25
  onEsc(): void;
25
- onViewportChange(): void;
26
- private onDocumentPointerDown;
27
- private schedulePanelPlacementUpdate;
28
- private updatePanelPlacement;
26
+ private openPanel;
27
+ private closePanel;
28
+ private destroyOverlay;
29
+ private getPositionConfigs;
29
30
  static ɵfac: i0.ɵɵFactoryDeclaration<PdmPopoverComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<PdmPopoverComponent, "pdm-popover", never, { "triggerText": "triggerText"; "className": "className"; "panelClassName": "panelClassName"; "showTrigger": "showTrigger"; "open": "open"; }, { "openChange": "openChange"; }, never, ["*"], false>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<PdmPopoverComponent, "pdm-popover", never, { "triggerText": "triggerText"; "className": "className"; "panelClassName": "panelClassName"; "showTrigger": "showTrigger"; "open": "open"; }, { "openChange": "openChange"; }, never, ["[pdmPopoverTrigger]", "*"], false>;
31
32
  }
@@ -1,6 +1,6 @@
1
- import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, ViewContainerRef } from '@angular/core';
2
- import { Overlay } from '@angular/cdk/overlay';
3
- import { PdmOverlayOptions } from '../../overlay/pdm-overlay-options';
1
+ import { AfterContentInit, ChangeDetectorRef, EventEmitter, OnDestroy, ViewContainerRef } from "@angular/core";
2
+ import { Overlay } from "@angular/cdk/overlay";
3
+ import { PdmOverlayOptions } from "../../overlay/pdm-overlay-options";
4
4
  import * as i0 from "@angular/core";
5
5
  export interface PdmSelectOption {
6
6
  label: string;
@@ -8,7 +8,6 @@ export interface PdmSelectOption {
8
8
  disabled?: boolean;
9
9
  }
10
10
  export declare class PdmSelectComponent implements AfterContentInit, OnDestroy {
11
- private readonly elementRef;
12
11
  private readonly cdr;
13
12
  private readonly overlay;
14
13
  private readonly viewContainerRef;
@@ -33,7 +32,7 @@ export declare class PdmSelectComponent implements AfterContentInit, OnDestroy {
33
32
  private projectedOptions;
34
33
  private overlayRef;
35
34
  private backdropSub;
36
- constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, overlay: Overlay, viewContainerRef: ViewContainerRef);
35
+ constructor(cdr: ChangeDetectorRef, overlay: Overlay, viewContainerRef: ViewContainerRef);
37
36
  ngAfterContentInit(): void;
38
37
  ngOnDestroy(): void;
39
38
  /**
@@ -1,6 +1,6 @@
1
- import { TableResponsiveStrategy } from '../../utils/responsive';
1
+ import { type TableResponsiveStrategy } from "../../utils/responsive";
2
2
  import * as i0 from "@angular/core";
3
- export declare type PdmTableVariant = 'default' | 'data' | 'interactive';
3
+ export declare type PdmTableVariant = "default" | "data" | "interactive";
4
4
  /**
5
5
  * Componente base de tabla con soporte responsive
6
6
  *
@@ -1,4 +1,4 @@
1
- import { ChangeDetectorRef, EventEmitter } from '@angular/core';
1
+ import { ChangeDetectorRef, EventEmitter } from "@angular/core";
2
2
  import * as i0 from "@angular/core";
3
3
  export interface PdmTabItem {
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter } from "@angular/core";
2
2
  import * as i0 from "@angular/core";
3
3
  export interface PdmToggleGroupItem {
4
4
  label: string;
@@ -1,10 +1,28 @@
1
+ import { ChangeDetectorRef, ElementRef, OnDestroy, ViewContainerRef } from "@angular/core";
2
+ import { Overlay } from "@angular/cdk/overlay";
1
3
  import * as i0 from "@angular/core";
2
- export declare class PdmTooltipComponent {
4
+ export declare class PdmTooltipComponent implements OnDestroy {
5
+ private readonly overlay;
6
+ private readonly viewContainerRef;
7
+ private readonly elementRef;
8
+ private readonly cdr;
3
9
  text: string;
4
- side: 'top' | 'right' | 'bottom' | 'left';
10
+ side: "top" | "right" | "bottom" | "left";
5
11
  className: string;
12
+ tooltipTemplate: any;
6
13
  open: boolean;
7
- get positionClass(): string;
14
+ private overlayRef;
15
+ constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
16
+ ngOnDestroy(): void;
17
+ onMouseEnter(): void;
18
+ onMouseLeave(): void;
19
+ onFocusIn(): void;
20
+ onFocusOut(): void;
21
+ private show;
22
+ private hide;
23
+ private createOverlay;
24
+ private destroyOverlay;
25
+ private getPositionConfigs;
8
26
  static ɵfac: i0.ɵɵFactoryDeclaration<PdmTooltipComponent, never>;
9
27
  static ɵcmp: i0.ɵɵComponentDeclaration<PdmTooltipComponent, "pdm-tooltip", never, { "text": "text"; "side": "side"; "className": "className"; }, {}, never, ["*"], false>;
10
28
  }
@@ -0,0 +1,36 @@
1
+ export interface OverlayConfig {
2
+ panelClass?: string | string[];
3
+ }
4
+ /**
5
+ * Z-Index helper for overlay components.
6
+ *
7
+ * CRITICAL: Consumer custom panelClass MUST NOT replace the base z-index.
8
+ * This helper ensures z-index is preserved when merging custom classes.
9
+ */
10
+ /**
11
+ * Base z-index class for overlays - MUST be included in any overlay panel.
12
+ * This ensures overlays appear above modals (z-50) and drawers (z-40).
13
+ */
14
+ export declare const OVERLAY_BASE_Z_INDEX = "z-[70]";
15
+ /**
16
+ * Merge consumer's panelClass with our base z-index.
17
+ * Consumer classes are APPENDED, not replacing our z-index guarantee.
18
+ *
19
+ * @param baseZIndex - Base z-index class to enforce (default: OVERLAY_BASE_Z_INDEX)
20
+ * @param consumerClasses - Optional additional classes from consumer
21
+ * @returns Array of classes safe for CDK Overlay panelClass
22
+ */
23
+ export declare function mergeOverlayPanelClass(baseZIndex?: string, consumerClasses?: string | string[]): string[];
24
+ /**
25
+ * Create OverlayConfig with guaranteed z-index.
26
+ * Use this instead of direct OverlayConfig to ensure z-index enforcement.
27
+ *
28
+ * @param baseConfig - Base overlay configuration
29
+ * @param consumerPanelClass - Optional consumer panelClass to merge
30
+ * @returns OverlayConfig with z-index guarantee
31
+ */
32
+ export declare function createZIndexEnforcedOverlay(baseConfig: OverlayConfig, consumerPanelClass?: string | string[]): OverlayConfig;
33
+ /**
34
+ * Helper to extract z-index from a class string for debugging.
35
+ */
36
+ export declare function extractZIndex(classes: string | string[]): string | null;
@@ -5,15 +5,15 @@
5
5
  * 1. base (z-0) - Elementos normales del DOM
6
6
  * 2. dropdown (z-10) - Selects, combobox, date-pickers
7
7
  * 3. sticky (z-20) - Headers, navigation bars
8
- * 4. overlay (z-30) - Popovers, hover cards, context menus
8
+ * 4. drawerBackdrop (z-30) - Backdrop de drawers
9
9
  * 5. drawer (z-40) - Sidebar drawer, sheets laterales
10
- * 6. modal (z-50) - Dialogs, alert-dialogs
11
- * 7. modal-backdrop (z-40) - Backdrop de modals
12
- * 8. popover (z-60) - Tooltips, dropdowns DENTRO de modals
10
+ * 6. modalBackdrop (z-40) - Backdrop de modals ( mismo nivel que drawer)
11
+ * 7. modal (z-50) - Dialogs, alert-dialogs
12
+ * 8. popover (z-[70]) - Tooltips, dropdowns DENTRO de modals
13
13
  * 9. toast (z-[100]) - Notificaciones que deben estar sobre TODO
14
14
  *
15
15
  * REGLA CRÍTICA:
16
- * - Componentes overlay (select options, dropdown menu, tooltip) SIEMPRE z-60 o mayor
16
+ * - Componentes overlay (select options, dropdown menu, tooltip) SIEMPRE z-[70] o mayor
17
17
  * - Esto permite que funcionen DENTRO de modals (z-50)
18
18
  * - Backdrop de modal debe ser z-40 para estar DEBAJO del contenido del modal (z-50)
19
19
  */
@@ -24,41 +24,37 @@ export declare const Z_INDEX: {
24
24
  readonly base: "z-0";
25
25
  /**
26
26
  * Dropdown - Selects, combobox, date-pickers
27
- * Debe estar SOBRE contenido normal pero BAJO modals
27
+ * Debe estar SOBRE contenido normal pero BAJO overlays
28
28
  */
29
29
  readonly dropdown: "z-10";
30
30
  /**
31
31
  * Sticky - Headers, navigation fija
32
32
  */
33
33
  readonly sticky: "z-20";
34
- /**
35
- * Overlay - Popovers, hover cards, context menus
36
- * Debe estar SOBRE sticky pero BAJO modals
37
- */
38
- readonly overlay: "z-30";
39
34
  /**
40
35
  * Drawer backdrop - Backdrop de sidebar drawer
41
- * Debe estar DEBAJO del drawer panel
36
+ * Debe estar DEBAJO del drawer panel y DEBAJO de modals
42
37
  */
43
- readonly drawerBackdrop: "z-40";
38
+ readonly drawerBackdrop: "z-30";
44
39
  /**
45
40
  * Drawer - Sidebar drawer, sheets laterales
46
41
  * Debe estar SOBRE su backdrop pero BAJO modals
47
42
  */
48
- readonly drawer: "z-50";
43
+ readonly drawer: "z-40";
49
44
  /**
50
45
  * Modal backdrop - Backdrop de dialogs
51
- * Debe estar SOBRE drawers pero DEBAJO del contenido del modal
46
+ * Mismo nivel que drawer backdrop (z-40)
52
47
  */
53
- readonly modalBackdrop: "z-50";
48
+ readonly modalBackdrop: "z-40";
54
49
  /**
55
- * Modal - Dialogs, alert-dialogs, sheets
50
+ * Modal - Dialogs, alert-dialogs
56
51
  * Debe estar SOBRE su backdrop
57
52
  */
58
- readonly modal: "z-[60]";
53
+ readonly modal: "z-50";
59
54
  /**
60
55
  * Popover - Tooltips, dropdowns, selects options DENTRO de modals
61
56
  * CRÍTICO: Debe ser MAYOR que modal (z-50) para aparecer sobre modals
57
+ * USAR SIEMPRE mergeOverlayPanelClass() para asegurar este valor
62
58
  */
63
59
  readonly popover: "z-[70]";
64
60
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pdm-ui-kit",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "PDM UI Kit Angular components - Responsive by default",
5
5
  "author": "Corelusa",
6
6
  "license": "MIT",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "sideEffects": false,
20
20
  "peerDependencies": {
21
- "@angular/common": ">=14.0.0 <16.0.0",
22
- "@angular/core": ">=14.0.0 <16.0.0",
23
- "@angular/platform-browser": ">=14.0.0 <16.0.0",
24
- "lucide": ">=0.575.0",
25
- "@angular/cdk": ">=14.2.7 <16.0.0"
21
+ "@angular/cdk": ">=15.0.0",
22
+ "@angular/common": ">=15.0.0",
23
+ "@angular/core": ">=15.0.0",
24
+ "@angular/platform-browser": ">=15.0.0",
25
+ "lucide": ">=0.575.0"
26
26
  },
27
27
  "dependencies": {
28
28
  "date-fns": "^2.30.0",