pdm-ui-kit 0.1.50 → 0.2.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 +189 -2
- package/esm2020/lib/components/alert-dialog/alert-dialog.component.mjs +3 -3
- package/esm2020/lib/components/breadcrumb/breadcrumb.component.mjs +37 -4
- package/esm2020/lib/components/calendar/calendar.component.mjs +3 -3
- package/esm2020/lib/components/card/card.component.mjs +36 -53
- package/esm2020/lib/components/command/command.component.mjs +3 -3
- package/esm2020/lib/components/context-menu/context-menu.component.mjs +3 -3
- package/esm2020/lib/components/data-table/data-table.component.mjs +214 -16
- package/esm2020/lib/components/dialog/dialog.component.mjs +133 -17
- package/esm2020/lib/components/draggable-table/draggable-table.component.mjs +300 -0
- package/esm2020/lib/components/drawer/drawer.component.mjs +123 -16
- package/esm2020/lib/components/dropdown-menu/dropdown-menu.component.mjs +3 -2
- package/esm2020/lib/components/hover-card/hover-card.component.mjs +3 -3
- package/esm2020/lib/components/menubar/menubar.component.mjs +3 -3
- package/esm2020/lib/components/navigation-menu/navigation-menu.component.mjs +25 -3
- package/esm2020/lib/components/pagination/pagination.component.mjs +3 -3
- package/esm2020/lib/components/popover/popover.component.mjs +5 -3
- package/esm2020/lib/components/select/select.component.mjs +5 -3
- package/esm2020/lib/components/sheet/sheet.component.mjs +68 -12
- package/esm2020/lib/components/sidebar/sidebar.component.mjs +52 -5
- package/esm2020/lib/components/table/table.component.mjs +152 -188
- package/esm2020/lib/components/tabs/tabs.component.mjs +3 -3
- package/esm2020/lib/components/tooltip/tooltip.component.mjs +3 -3
- package/esm2020/lib/pdm-ui-kit.module.mjs +5 -1
- package/esm2020/lib/utils/responsive.mjs +143 -0
- package/esm2020/lib/utils/z-index.mjs +93 -0
- package/esm2020/public-api.mjs +4 -1
- package/fesm2015/pdm-ui-kit.mjs +1430 -371
- package/fesm2015/pdm-ui-kit.mjs.map +1 -1
- package/fesm2020/pdm-ui-kit.mjs +1428 -369
- package/fesm2020/pdm-ui-kit.mjs.map +1 -1
- package/lib/components/breadcrumb/breadcrumb.component.d.ts +23 -1
- package/lib/components/card/card.component.d.ts +32 -19
- package/lib/components/data-table/data-table.component.d.ts +172 -14
- package/lib/components/dialog/dialog.component.d.ts +35 -1
- package/lib/components/draggable-table/draggable-table.component.d.ts +74 -0
- package/lib/components/drawer/drawer.component.d.ts +65 -7
- package/lib/components/navigation-menu/navigation-menu.component.d.ts +22 -1
- package/lib/components/sheet/sheet.component.d.ts +30 -3
- package/lib/components/sidebar/sidebar.component.d.ts +39 -1
- package/lib/components/table/table.component.d.ts +46 -25
- package/lib/pdm-ui-kit.module.d.ts +42 -41
- package/lib/utils/responsive.d.ts +107 -0
- package/lib/utils/z-index.d.ts +73 -0
- package/package.json +5 -3
- package/public-api.d.ts +3 -0
|
@@ -1,34 +1,55 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TableResponsiveStrategy } from '../../utils/responsive';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare type PdmTableVariant = 'default' | 'data' | 'interactive';
|
|
4
|
+
/**
|
|
5
|
+
* Componente base de tabla con soporte responsive
|
|
6
|
+
*
|
|
7
|
+
* SIMPLIFICADO: Ya no incluye drag & drop (usar pdm-draggable-table para eso)
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // Tabla simple con scroll horizontal
|
|
11
|
+
* <pdm-table variant="default">
|
|
12
|
+
* <thead><tr><th>Name</th><th>Email</th></tr></thead>
|
|
13
|
+
* <tbody><tr><td>John</td><td>john@example.com</td></tr></tbody>
|
|
14
|
+
* </pdm-table>
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Tabla interactiva con wrap en mobile
|
|
18
|
+
* <pdm-table variant="interactive" responsiveStrategy="wrap">
|
|
19
|
+
* ...
|
|
20
|
+
* </pdm-table>
|
|
21
|
+
*/
|
|
4
22
|
export declare class PdmTableComponent {
|
|
5
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Variante visual de la tabla
|
|
25
|
+
* - default: tabla básica sin estilos extra
|
|
26
|
+
* - data: tabla con bordes y espaciado para data
|
|
27
|
+
* - interactive: tabla con hover, sticky header y estilos interactivos
|
|
28
|
+
*/
|
|
6
29
|
variant: PdmTableVariant;
|
|
7
|
-
|
|
8
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Estrategia responsive para la tabla
|
|
32
|
+
* - scroll: scroll horizontal en mobile (default, más simple)
|
|
33
|
+
* - wrap: permite que el contenido haga wrap
|
|
34
|
+
* - stack: convierte filas en cards en mobile (requiere data-label en celdas)
|
|
35
|
+
* - collapse: oculta columnas menos importantes en mobile
|
|
36
|
+
*/
|
|
37
|
+
responsiveStrategy: TableResponsiveStrategy;
|
|
38
|
+
/**
|
|
39
|
+
* Clases CSS adicionales para el wrapper
|
|
40
|
+
*/
|
|
9
41
|
className: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
constructor(renderer: Renderer2);
|
|
16
|
-
ngAfterViewInit(): void;
|
|
17
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
18
|
-
ngOnDestroy(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Si es true, aplica padding negativo en mobile para scroll edge-to-edge
|
|
44
|
+
* Útil cuando la tabla está dentro de un container con padding
|
|
45
|
+
*/
|
|
46
|
+
fullBleed: boolean;
|
|
19
47
|
get wrapperClasses(): string[];
|
|
20
48
|
get tableClasses(): string[];
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
private
|
|
25
|
-
private setRowsDraggable;
|
|
26
|
-
private syncAutoDragHandle;
|
|
27
|
-
private onDragStart;
|
|
28
|
-
private onDragOver;
|
|
29
|
-
private onDrop;
|
|
30
|
-
private onDragEnd;
|
|
31
|
-
private armDragFromHandle;
|
|
49
|
+
private getResponsiveStrategyClasses;
|
|
50
|
+
private getVariantWrapperClasses;
|
|
51
|
+
private getVariantTableClasses;
|
|
52
|
+
private getCellClasses;
|
|
32
53
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmTableComponent, never>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PdmTableComponent, "pdm-table", never, { "variant": "variant"; "
|
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PdmTableComponent, "pdm-table", never, { "variant": "variant"; "responsiveStrategy": "responsiveStrategy"; "className": "className"; "fullBleed": "fullBleed"; }, {}, never, ["*"], false>;
|
|
34
55
|
}
|
|
@@ -20,48 +20,49 @@ import * as i18 from "./components/context-menu/context-menu.component";
|
|
|
20
20
|
import * as i19 from "./components/data-table/data-table.component";
|
|
21
21
|
import * as i20 from "./components/date-picker/date-picker.component";
|
|
22
22
|
import * as i21 from "./components/dialog/dialog.component";
|
|
23
|
-
import * as i22 from "./components/
|
|
24
|
-
import * as i23 from "./components/
|
|
25
|
-
import * as i24 from "./components/
|
|
26
|
-
import * as i25 from "./components/
|
|
27
|
-
import * as i26 from "./components/
|
|
28
|
-
import * as i27 from "./components/
|
|
29
|
-
import * as i28 from "./components/
|
|
30
|
-
import * as i29 from "./components/
|
|
31
|
-
import * as i30 from "./components/input
|
|
32
|
-
import * as i31 from "./components/input-
|
|
33
|
-
import * as i32 from "./components/input-
|
|
34
|
-
import * as i33 from "./components/
|
|
35
|
-
import * as i34 from "./components/
|
|
36
|
-
import * as i35 from "./components/
|
|
37
|
-
import * as i36 from "./components/
|
|
38
|
-
import * as i37 from "./components/
|
|
39
|
-
import * as i38 from "./
|
|
40
|
-
import * as i39 from "./
|
|
41
|
-
import * as i40 from "./components/
|
|
42
|
-
import * as i41 from "./components/
|
|
43
|
-
import * as i42 from "./components/
|
|
44
|
-
import * as i43 from "./components/
|
|
45
|
-
import * as i44 from "./components/
|
|
46
|
-
import * as i45 from "./components/select/select
|
|
47
|
-
import * as i46 from "./components/
|
|
48
|
-
import * as i47 from "./components/
|
|
49
|
-
import * as i48 from "./components/
|
|
50
|
-
import * as i49 from "./components/
|
|
51
|
-
import * as i50 from "./components/
|
|
52
|
-
import * as i51 from "./components/
|
|
53
|
-
import * as i52 from "./components/
|
|
54
|
-
import * as i53 from "./components/
|
|
55
|
-
import * as i54 from "./components/
|
|
56
|
-
import * as i55 from "./components/
|
|
57
|
-
import * as i56 from "./components/
|
|
58
|
-
import * as i57 from "./components/
|
|
59
|
-
import * as i58 from "./components/toggle
|
|
60
|
-
import * as i59 from "./components/
|
|
61
|
-
import * as i60 from "
|
|
62
|
-
import * as i61 from "@angular/
|
|
23
|
+
import * as i22 from "./components/draggable-table/draggable-table.component";
|
|
24
|
+
import * as i23 from "./components/dropdown-menu/dropdown-menu.component";
|
|
25
|
+
import * as i24 from "./components/drawer/drawer.component";
|
|
26
|
+
import * as i25 from "./components/empty/empty.component";
|
|
27
|
+
import * as i26 from "./components/field/field.component";
|
|
28
|
+
import * as i27 from "./components/hover-card/hover-card.component";
|
|
29
|
+
import * as i28 from "./components/icon/icon.component";
|
|
30
|
+
import * as i29 from "./components/item/item.component";
|
|
31
|
+
import * as i30 from "./components/input/input.component";
|
|
32
|
+
import * as i31 from "./components/input-password/input-password.component";
|
|
33
|
+
import * as i32 from "./components/input-group/input-group.component";
|
|
34
|
+
import * as i33 from "./components/input-otp/input-otp.component";
|
|
35
|
+
import * as i34 from "./components/kbd/kbd.component";
|
|
36
|
+
import * as i35 from "./components/label/label.component";
|
|
37
|
+
import * as i36 from "./components/menubar/menubar.component";
|
|
38
|
+
import * as i37 from "./components/native-select/native-select.component";
|
|
39
|
+
import * as i38 from "./components/navigation-menu/navigation-menu.component";
|
|
40
|
+
import * as i39 from "./overlay/pdm-outside-click.directive";
|
|
41
|
+
import * as i40 from "./components/pagination/pagination.component";
|
|
42
|
+
import * as i41 from "./components/popover/popover.component";
|
|
43
|
+
import * as i42 from "./components/progress/progress.component";
|
|
44
|
+
import * as i43 from "./components/radio-group/radio-group.component";
|
|
45
|
+
import * as i44 from "./components/scroll-area/scroll-area.component";
|
|
46
|
+
import * as i45 from "./components/select/select.component";
|
|
47
|
+
import * as i46 from "./components/select/select-option.directive";
|
|
48
|
+
import * as i47 from "./components/separator/separator.component";
|
|
49
|
+
import * as i48 from "./components/sheet/sheet.component";
|
|
50
|
+
import * as i49 from "./components/sidebar/sidebar.component";
|
|
51
|
+
import * as i50 from "./components/skeleton/skeleton.component";
|
|
52
|
+
import * as i51 from "./components/slider/slider.component";
|
|
53
|
+
import * as i52 from "./components/sonner/sonner.component";
|
|
54
|
+
import * as i53 from "./components/spinner/spinner.component";
|
|
55
|
+
import * as i54 from "./components/switch/switch.component";
|
|
56
|
+
import * as i55 from "./components/table/table.component";
|
|
57
|
+
import * as i56 from "./components/tabs/tabs.component";
|
|
58
|
+
import * as i57 from "./components/textarea/textarea.component";
|
|
59
|
+
import * as i58 from "./components/toggle/toggle.component";
|
|
60
|
+
import * as i59 from "./components/toggle-group/toggle-group.component";
|
|
61
|
+
import * as i60 from "./components/tooltip/tooltip.component";
|
|
62
|
+
import * as i61 from "@angular/common";
|
|
63
|
+
import * as i62 from "@angular/cdk/overlay";
|
|
63
64
|
export declare class PdmUiKitModule {
|
|
64
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<PdmUiKitModule, never>;
|
|
65
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PdmUiKitModule, [typeof i1.PdmAccordionComponent, typeof i2.PdmAlertComponent, typeof i3.PdmAlertDialogComponent, typeof i4.PdmAspectRatioComponent, typeof i5.PdmAvatarComponent, typeof i6.PdmBadgeComponent, typeof i7.PdmBreadcrumbComponent, typeof i8.PdmButtonGroupComponent, typeof i9.PdmButtonComponent, typeof i10.PdmCalendarComponent, typeof i11.PdmCarouselComponent, typeof i12.PdmCardComponent, typeof i13.PdmChartComponent, typeof i14.PdmCheckboxComponent, typeof i15.PdmCollapsibleComponent, typeof i16.PdmComboboxComponent, typeof i17.PdmCommandComponent, typeof i18.PdmContextMenuComponent, typeof i19.PdmDataTableComponent, typeof i20.PdmDatePickerComponent, typeof i21.PdmDialogComponent, typeof i22.
|
|
66
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PdmUiKitModule, [typeof i1.PdmAccordionComponent, typeof i2.PdmAlertComponent, typeof i3.PdmAlertDialogComponent, typeof i4.PdmAspectRatioComponent, typeof i5.PdmAvatarComponent, typeof i6.PdmBadgeComponent, typeof i7.PdmBreadcrumbComponent, typeof i8.PdmButtonGroupComponent, typeof i9.PdmButtonComponent, typeof i10.PdmCalendarComponent, typeof i11.PdmCarouselComponent, typeof i12.PdmCardComponent, typeof i13.PdmChartComponent, typeof i14.PdmCheckboxComponent, typeof i15.PdmCollapsibleComponent, typeof i16.PdmComboboxComponent, typeof i17.PdmCommandComponent, typeof i18.PdmContextMenuComponent, typeof i19.PdmDataTableComponent, typeof i20.PdmDatePickerComponent, typeof i21.PdmDialogComponent, typeof i22.PdmDraggableTableComponent, typeof i23.PdmDropdownMenuComponent, typeof i24.PdmDrawerComponent, typeof i25.PdmEmptyComponent, typeof i26.PdmFieldComponent, typeof i27.PdmHoverCardComponent, typeof i28.PdmIconComponent, typeof i29.PdmItemComponent, typeof i30.PdmInputComponent, typeof i31.PdmInputPasswordComponent, typeof i32.PdmInputGroupComponent, typeof i33.PdmInputOtpComponent, typeof i34.PdmKbdComponent, typeof i35.PdmLabelComponent, typeof i36.PdmMenubarComponent, typeof i37.PdmNativeSelectComponent, typeof i38.PdmNavigationMenuComponent, typeof i39.PdmOutsideClickDirective, typeof i40.PdmPaginationComponent, typeof i41.PdmPopoverComponent, typeof i42.PdmProgressComponent, typeof i43.PdmRadioGroupComponent, typeof i44.PdmScrollAreaComponent, typeof i45.PdmSelectComponent, typeof i46.PdmSelectOptionDirective, typeof i47.PdmSeparatorComponent, typeof i48.PdmSheetComponent, typeof i49.PdmSidebarComponent, typeof i50.PdmSkeletonComponent, typeof i51.PdmSliderComponent, typeof i52.PdmSonnerComponent, typeof i53.PdmSpinnerComponent, typeof i54.PdmSwitchComponent, typeof i55.PdmTableComponent, typeof i56.PdmTabsComponent, typeof i57.PdmTextareaComponent, typeof i58.PdmToggleComponent, typeof i59.PdmToggleGroupComponent, typeof i60.PdmTooltipComponent], [typeof i61.CommonModule, typeof i62.OverlayModule], [typeof i1.PdmAccordionComponent, typeof i2.PdmAlertComponent, typeof i3.PdmAlertDialogComponent, typeof i4.PdmAspectRatioComponent, typeof i5.PdmAvatarComponent, typeof i6.PdmBadgeComponent, typeof i7.PdmBreadcrumbComponent, typeof i8.PdmButtonGroupComponent, typeof i9.PdmButtonComponent, typeof i10.PdmCalendarComponent, typeof i11.PdmCarouselComponent, typeof i12.PdmCardComponent, typeof i13.PdmChartComponent, typeof i14.PdmCheckboxComponent, typeof i15.PdmCollapsibleComponent, typeof i16.PdmComboboxComponent, typeof i17.PdmCommandComponent, typeof i18.PdmContextMenuComponent, typeof i19.PdmDataTableComponent, typeof i20.PdmDatePickerComponent, typeof i21.PdmDialogComponent, typeof i22.PdmDraggableTableComponent, typeof i23.PdmDropdownMenuComponent, typeof i24.PdmDrawerComponent, typeof i25.PdmEmptyComponent, typeof i26.PdmFieldComponent, typeof i27.PdmHoverCardComponent, typeof i28.PdmIconComponent, typeof i29.PdmItemComponent, typeof i30.PdmInputComponent, typeof i31.PdmInputPasswordComponent, typeof i32.PdmInputGroupComponent, typeof i33.PdmInputOtpComponent, typeof i34.PdmKbdComponent, typeof i35.PdmLabelComponent, typeof i36.PdmMenubarComponent, typeof i37.PdmNativeSelectComponent, typeof i38.PdmNavigationMenuComponent, typeof i39.PdmOutsideClickDirective, typeof i40.PdmPaginationComponent, typeof i41.PdmPopoverComponent, typeof i42.PdmProgressComponent, typeof i43.PdmRadioGroupComponent, typeof i44.PdmScrollAreaComponent, typeof i45.PdmSelectComponent, typeof i46.PdmSelectOptionDirective, typeof i47.PdmSeparatorComponent, typeof i48.PdmSheetComponent, typeof i49.PdmSidebarComponent, typeof i50.PdmSkeletonComponent, typeof i51.PdmSliderComponent, typeof i52.PdmSonnerComponent, typeof i53.PdmSpinnerComponent, typeof i54.PdmSwitchComponent, typeof i55.PdmTableComponent, typeof i56.PdmTabsComponent, typeof i57.PdmTextareaComponent, typeof i58.PdmToggleComponent, typeof i59.PdmToggleGroupComponent, typeof i60.PdmTooltipComponent]>;
|
|
66
67
|
static ɵinj: i0.ɵɵInjectorDeclaration<PdmUiKitModule>;
|
|
67
68
|
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sistema de responsive utilities para PDM UI Kit
|
|
3
|
+
*
|
|
4
|
+
* Proporciona constantes, tipos y helpers para manejar responsive design
|
|
5
|
+
* de forma consistente en todos los componentes.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Breakpoints estándar de Tailwind CSS
|
|
9
|
+
* Mobile-first approach: los estilos base son para mobile, los breakpoints son MIN-WIDTH
|
|
10
|
+
*/
|
|
11
|
+
export declare const BREAKPOINTS: {
|
|
12
|
+
readonly sm: "640px";
|
|
13
|
+
readonly md: "768px";
|
|
14
|
+
readonly lg: "1024px";
|
|
15
|
+
readonly xl: "1280px";
|
|
16
|
+
readonly '2xl': "1536px";
|
|
17
|
+
};
|
|
18
|
+
export declare type Breakpoint = keyof typeof BREAKPOINTS;
|
|
19
|
+
/**
|
|
20
|
+
* Estrategias de overflow para componentes que pueden desbordar
|
|
21
|
+
*/
|
|
22
|
+
export declare type OverflowStrategy = 'auto' | 'scroll' | 'hidden' | 'visible';
|
|
23
|
+
/**
|
|
24
|
+
* Estrategias responsive para tablas
|
|
25
|
+
*/
|
|
26
|
+
export declare type TableResponsiveStrategy = 'scroll' | 'stack' | 'wrap' | 'collapse';
|
|
27
|
+
/**
|
|
28
|
+
* Helper para generar clases responsive de forma programática
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* responsive({ default: 'block', sm: 'flex', lg: 'grid' })
|
|
32
|
+
* // Returns: 'block sm:flex lg:grid'
|
|
33
|
+
*/
|
|
34
|
+
export declare function responsive<T extends string>(config: Partial<Record<Breakpoint | 'default', T>>): string;
|
|
35
|
+
/**
|
|
36
|
+
* Helper para overflow responsive
|
|
37
|
+
* Maneja el caso común de scroll en mobile, auto en desktop
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* overflowResponsive('x', 'scroll', 'auto')
|
|
41
|
+
* // Returns: 'overflow-x-scroll sm:overflow-x-auto'
|
|
42
|
+
*/
|
|
43
|
+
export declare function overflowResponsive(axis: 'x' | 'y' | 'both', mobile: OverflowStrategy, desktop?: OverflowStrategy): string;
|
|
44
|
+
/**
|
|
45
|
+
* Helper para spacing responsive
|
|
46
|
+
* Útil para padding/margin que necesita ajustarse por breakpoint
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* spacingResponsive('px', { default: '4', sm: '6', lg: '8' })
|
|
50
|
+
* // Returns: 'px-4 sm:px-6 lg:px-8'
|
|
51
|
+
*/
|
|
52
|
+
export declare function spacingResponsive(property: 'p' | 'px' | 'py' | 'pt' | 'pr' | 'pb' | 'pl' | 'm' | 'mx' | 'my' | 'mt' | 'mr' | 'mb' | 'ml', values: Partial<Record<Breakpoint | 'default', string>>): string;
|
|
53
|
+
/**
|
|
54
|
+
* Helper para width responsive
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* widthResponsive({ default: 'full', sm: 'auto', lg: '1/2' })
|
|
58
|
+
* // Returns: 'w-full sm:w-auto lg:w-1/2'
|
|
59
|
+
*/
|
|
60
|
+
export declare function widthResponsive(values: Partial<Record<Breakpoint | 'default', string>>): string;
|
|
61
|
+
/**
|
|
62
|
+
* Clases comunes para containers responsive
|
|
63
|
+
* Pensadas para wrappers que contienen contenido que puede desbordar
|
|
64
|
+
*/
|
|
65
|
+
export declare const RESPONSIVE_CONTAINER: {
|
|
66
|
+
readonly tableWrapper: "relative w-full overflow-x-auto sm:overflow-x-visible";
|
|
67
|
+
readonly tableWrapperFullBleed: "relative w-full -mx-4 px-4 overflow-x-auto sm:mx-0 sm:px-0 sm:overflow-x-visible";
|
|
68
|
+
readonly contentWrapper: "w-full mx-auto px-4 sm:px-6 lg:px-8 max-w-screen-2xl";
|
|
69
|
+
readonly modalWrapper: "w-full max-w-lg mx-auto px-4 sm:px-0";
|
|
70
|
+
readonly formWrapper: "w-full max-w-md mx-auto space-y-4";
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Clases comunes para display responsive
|
|
74
|
+
*/
|
|
75
|
+
export declare const RESPONSIVE_DISPLAY: {
|
|
76
|
+
readonly hideOnMobile: "hidden sm:block";
|
|
77
|
+
readonly showOnMobile: "block sm:hidden";
|
|
78
|
+
readonly stackToFlex: "flex flex-col sm:flex-row";
|
|
79
|
+
readonly stackToGrid: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3";
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Clases para table responsive strategies
|
|
83
|
+
*/
|
|
84
|
+
export declare const TABLE_RESPONSIVE: {
|
|
85
|
+
readonly scroll: {
|
|
86
|
+
readonly wrapper: "relative w-full overflow-x-auto";
|
|
87
|
+
readonly table: "w-full min-w-full";
|
|
88
|
+
readonly cell: "whitespace-nowrap";
|
|
89
|
+
};
|
|
90
|
+
readonly wrap: {
|
|
91
|
+
readonly wrapper: "relative w-full overflow-x-auto";
|
|
92
|
+
readonly table: "w-full";
|
|
93
|
+
readonly cell: "whitespace-normal break-words";
|
|
94
|
+
};
|
|
95
|
+
readonly stack: {
|
|
96
|
+
readonly wrapper: "relative w-full";
|
|
97
|
+
readonly table: "w-full";
|
|
98
|
+
readonly row: "block sm:table-row border-b sm:border-b-0";
|
|
99
|
+
readonly cell: "block sm:table-cell py-2 sm:py-0 before:content-[attr(data-label)] before:font-medium before:inline-block before:w-32 sm:before:content-none";
|
|
100
|
+
};
|
|
101
|
+
readonly collapse: {
|
|
102
|
+
readonly wrapper: "relative w-full overflow-x-auto";
|
|
103
|
+
readonly table: "w-full";
|
|
104
|
+
readonly cell: "whitespace-nowrap";
|
|
105
|
+
readonly optionalColumn: "hidden md:table-cell";
|
|
106
|
+
};
|
|
107
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Z-Index Scale - Sistema centralizado de z-index
|
|
3
|
+
*
|
|
4
|
+
* JERARQUÍA (de menor a mayor):
|
|
5
|
+
* 1. base (z-0) - Elementos normales del DOM
|
|
6
|
+
* 2. dropdown (z-10) - Selects, combobox, date-pickers
|
|
7
|
+
* 3. sticky (z-20) - Headers, navigation bars
|
|
8
|
+
* 4. overlay (z-30) - Popovers, hover cards, context menus
|
|
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
|
|
13
|
+
* 9. toast (z-[100]) - Notificaciones que deben estar sobre TODO
|
|
14
|
+
*
|
|
15
|
+
* REGLA CRÍTICA:
|
|
16
|
+
* - Componentes overlay (select options, dropdown menu, tooltip) SIEMPRE z-60 o mayor
|
|
17
|
+
* - Esto permite que funcionen DENTRO de modals (z-50)
|
|
18
|
+
* - Backdrop de modal debe ser z-40 para estar DEBAJO del contenido del modal (z-50)
|
|
19
|
+
*/
|
|
20
|
+
export declare const Z_INDEX: {
|
|
21
|
+
/**
|
|
22
|
+
* Base - contenido normal del DOM
|
|
23
|
+
*/
|
|
24
|
+
readonly base: "z-0";
|
|
25
|
+
/**
|
|
26
|
+
* Dropdown - Selects, combobox, date-pickers
|
|
27
|
+
* Debe estar SOBRE contenido normal pero BAJO modals
|
|
28
|
+
*/
|
|
29
|
+
readonly dropdown: "z-10";
|
|
30
|
+
/**
|
|
31
|
+
* Sticky - Headers, navigation fija
|
|
32
|
+
*/
|
|
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
|
+
/**
|
|
40
|
+
* Drawer backdrop - Backdrop de sidebar drawer
|
|
41
|
+
* Debe estar DEBAJO del drawer panel
|
|
42
|
+
*/
|
|
43
|
+
readonly drawerBackdrop: "z-40";
|
|
44
|
+
/**
|
|
45
|
+
* Drawer - Sidebar drawer, sheets laterales
|
|
46
|
+
* Debe estar SOBRE su backdrop pero BAJO modals
|
|
47
|
+
*/
|
|
48
|
+
readonly drawer: "z-50";
|
|
49
|
+
/**
|
|
50
|
+
* Modal backdrop - Backdrop de dialogs
|
|
51
|
+
* Debe estar SOBRE drawers pero DEBAJO del contenido del modal
|
|
52
|
+
*/
|
|
53
|
+
readonly modalBackdrop: "z-50";
|
|
54
|
+
/**
|
|
55
|
+
* Modal - Dialogs, alert-dialogs, sheets
|
|
56
|
+
* Debe estar SOBRE su backdrop
|
|
57
|
+
*/
|
|
58
|
+
readonly modal: "z-[60]";
|
|
59
|
+
/**
|
|
60
|
+
* Popover - Tooltips, dropdowns, selects options DENTRO de modals
|
|
61
|
+
* CRÍTICO: Debe ser MAYOR que modal (z-50) para aparecer sobre modals
|
|
62
|
+
*/
|
|
63
|
+
readonly popover: "z-[70]";
|
|
64
|
+
/**
|
|
65
|
+
* Toast - Notificaciones globales
|
|
66
|
+
* Debe estar sobre TODO
|
|
67
|
+
*/
|
|
68
|
+
readonly toast: "z-[100]";
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Helper para debugging z-index issues
|
|
72
|
+
*/
|
|
73
|
+
export declare function logZIndexStack(element: HTMLElement): void;
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pdm-ui-kit",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "PDM UI Kit Angular components",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "PDM UI Kit Angular components - Responsive by default",
|
|
5
5
|
"author": "Corelusa",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"angular",
|
|
9
9
|
"ui",
|
|
10
10
|
"components",
|
|
11
|
-
"design-system"
|
|
11
|
+
"design-system",
|
|
12
|
+
"responsive",
|
|
13
|
+
"shadcn"
|
|
12
14
|
],
|
|
13
15
|
"repository": {
|
|
14
16
|
"type": "git",
|
package/public-api.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export * from './lib/pdm-ui-kit.module';
|
|
|
2
2
|
export * from './lib/overlay/pdm-overlay-options';
|
|
3
3
|
export * from './lib/overlay/create-flexible-position-strategy';
|
|
4
4
|
export * from './lib/overlay/pdm-outside-click.directive';
|
|
5
|
+
export * from './lib/utils/responsive';
|
|
6
|
+
export * from './lib/utils/z-index';
|
|
5
7
|
export * from './lib/components/accordion/accordion.component';
|
|
6
8
|
export * from './lib/components/alert/alert.component';
|
|
7
9
|
export * from './lib/components/alert-dialog/alert-dialog.component';
|
|
@@ -23,6 +25,7 @@ export * from './lib/components/context-menu/context-menu.component';
|
|
|
23
25
|
export * from './lib/components/data-table/data-table.component';
|
|
24
26
|
export * from './lib/components/date-picker/date-picker.component';
|
|
25
27
|
export * from './lib/components/dialog/dialog.component';
|
|
28
|
+
export * from './lib/components/draggable-table/draggable-table.component';
|
|
26
29
|
export * from './lib/components/dropdown-menu/dropdown-menu.component';
|
|
27
30
|
export * from './lib/components/drawer/drawer.component';
|
|
28
31
|
export * from './lib/components/empty/empty.component';
|