siesa-ui-kit 1.0.119 → 1.0.121
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/dist/components/Card/Card.d.ts +99 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/Card.types.d.ts +66 -0
- package/dist/components/Card/Card.types.d.ts.map +1 -0
- package/dist/components/Card/cn.d.ts +3 -0
- package/dist/components/Card/cn.d.ts.map +1 -0
- package/dist/components/Card/index.d.ts +3 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/MasterCrud/index.d.ts +1 -0
- package/dist/components/MasterCrud/index.d.ts.map +1 -1
- package/dist/components/MasterPatternUI/MasterPatternUI.d.ts +48 -0
- package/dist/components/MasterPatternUI/MasterPatternUI.d.ts.map +1 -0
- package/dist/components/MasterPatternUI/MasterPatternUI.types.d.ts +231 -0
- package/dist/components/MasterPatternUI/MasterPatternUI.types.d.ts.map +1 -0
- package/dist/components/MasterPatternUI/icons.d.ts +5 -0
- package/dist/components/MasterPatternUI/icons.d.ts.map +1 -0
- package/dist/components/MasterPatternUI/index.d.ts +4 -0
- package/dist/components/MasterPatternUI/index.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/InternalToastContainer.d.ts +17 -0
- package/dist/components/MasterPatternView/components/InternalToastContainer.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/MasterPatternView.d.ts +32 -0
- package/dist/components/MasterPatternView/components/MasterPatternView.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/form/BasicDataTab.d.ts +16 -0
- package/dist/components/MasterPatternView/components/form/BasicDataTab.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/form/ContentTab.d.ts +15 -0
- package/dist/components/MasterPatternView/components/form/ContentTab.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/form/DetailTab.d.ts +25 -0
- package/dist/components/MasterPatternView/components/form/DetailTab.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/form/FormActionBar.d.ts +33 -0
- package/dist/components/MasterPatternView/components/form/FormActionBar.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/form/MasterPatternViewForm.d.ts +36 -0
- package/dist/components/MasterPatternView/components/form/MasterPatternViewForm.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/form/ModalPanel.d.ts +20 -0
- package/dist/components/MasterPatternView/components/form/ModalPanel.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/form/PagePanel.d.ts +13 -0
- package/dist/components/MasterPatternView/components/form/PagePanel.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/form/SidebarPanel.d.ts +15 -0
- package/dist/components/MasterPatternView/components/form/SidebarPanel.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/form/TabBar.d.ts +16 -0
- package/dist/components/MasterPatternView/components/form/TabBar.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/form/TabSection.d.ts +14 -0
- package/dist/components/MasterPatternView/components/form/TabSection.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/form/fields/FieldRenderer.d.ts +11 -0
- package/dist/components/MasterPatternView/components/form/fields/FieldRenderer.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/form/fields/OverridableFieldWrapper.d.ts +36 -0
- package/dist/components/MasterPatternView/components/form/fields/OverridableFieldWrapper.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/list/AssignmentBadge.d.ts +16 -0
- package/dist/components/MasterPatternView/components/list/AssignmentBadge.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/list/BatchBar.d.ts +15 -0
- package/dist/components/MasterPatternView/components/list/BatchBar.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/list/EmptyState.d.ts +10 -0
- package/dist/components/MasterPatternView/components/list/EmptyState.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/list/ListTable.d.ts +37 -0
- package/dist/components/MasterPatternView/components/list/ListTable.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/list/PaginationBar.d.ts +11 -0
- package/dist/components/MasterPatternView/components/list/PaginationBar.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/list/RowActions.d.ts +26 -0
- package/dist/components/MasterPatternView/components/list/RowActions.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/list/TreeView.d.ts +36 -0
- package/dist/components/MasterPatternView/components/list/TreeView.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/modals/ChangeStatusModal.d.ts +11 -0
- package/dist/components/MasterPatternView/components/modals/ChangeStatusModal.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/modals/CompanyEnableModal.d.ts +26 -0
- package/dist/components/MasterPatternView/components/modals/CompanyEnableModal.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/modals/ConflictDialog.d.ts +5 -0
- package/dist/components/MasterPatternView/components/modals/ConflictDialog.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/modals/DirtyStateDialog.d.ts +7 -0
- package/dist/components/MasterPatternView/components/modals/DirtyStateDialog.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/modals/ImportModal.d.ts +23 -0
- package/dist/components/MasterPatternView/components/modals/ImportModal.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/modals/NotEnabledModal.d.ts +32 -0
- package/dist/components/MasterPatternView/components/modals/NotEnabledModal.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/CompanySelector.d.ts +12 -0
- package/dist/components/MasterPatternView/components/toolbar/CompanySelector.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/FilterPanel.d.ts +10 -0
- package/dist/components/MasterPatternView/components/toolbar/FilterPanel.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/GlobalContextSelector.d.ts +21 -0
- package/dist/components/MasterPatternView/components/toolbar/GlobalContextSelector.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/MasterPatternViewToolbar.d.ts +33 -0
- package/dist/components/MasterPatternView/components/toolbar/MasterPatternViewToolbar.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/QuickFilters.d.ts +12 -0
- package/dist/components/MasterPatternView/components/toolbar/QuickFilters.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/SearchBar.d.ts +16 -0
- package/dist/components/MasterPatternView/components/toolbar/SearchBar.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/SortDropdown.d.ts +9 -0
- package/dist/components/MasterPatternView/components/toolbar/SortDropdown.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/ToolbarActions.d.ts +19 -0
- package/dist/components/MasterPatternView/components/toolbar/ToolbarActions.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/filters/BooleanFilterControl.d.ts +8 -0
- package/dist/components/MasterPatternView/components/toolbar/filters/BooleanFilterControl.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/filters/DateRangeFilterControl.d.ts +10 -0
- package/dist/components/MasterPatternView/components/toolbar/filters/DateRangeFilterControl.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/filters/LookupFilterControl.d.ts +10 -0
- package/dist/components/MasterPatternView/components/toolbar/filters/LookupFilterControl.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/filters/NumberFilterControl.d.ts +13 -0
- package/dist/components/MasterPatternView/components/toolbar/filters/NumberFilterControl.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/filters/SelectFilterControl.d.ts +11 -0
- package/dist/components/MasterPatternView/components/toolbar/filters/SelectFilterControl.d.ts.map +1 -0
- package/dist/components/MasterPatternView/components/toolbar/filters/TextFilterControl.d.ts +11 -0
- package/dist/components/MasterPatternView/components/toolbar/filters/TextFilterControl.d.ts.map +1 -0
- package/dist/components/MasterPatternView/constants.d.ts +11 -0
- package/dist/components/MasterPatternView/constants.d.ts.map +1 -0
- package/dist/components/MasterPatternView/engine/exportEngine.d.ts +9 -0
- package/dist/components/MasterPatternView/engine/exportEngine.d.ts.map +1 -0
- package/dist/components/MasterPatternView/engine/fieldEngine.d.ts +93 -0
- package/dist/components/MasterPatternView/engine/fieldEngine.d.ts.map +1 -0
- package/dist/components/MasterPatternView/engine/filterEngine.d.ts +28 -0
- package/dist/components/MasterPatternView/engine/filterEngine.d.ts.map +1 -0
- package/dist/components/MasterPatternView/engine/index.d.ts +15 -0
- package/dist/components/MasterPatternView/engine/index.d.ts.map +1 -0
- package/dist/components/MasterPatternView/engine/overrideEngine.d.ts +55 -0
- package/dist/components/MasterPatternView/engine/overrideEngine.d.ts.map +1 -0
- package/dist/components/MasterPatternView/engine/permissionEngine.d.ts +30 -0
- package/dist/components/MasterPatternView/engine/permissionEngine.d.ts.map +1 -0
- package/dist/components/MasterPatternView/engine/treeEngine.d.ts +13 -0
- package/dist/components/MasterPatternView/engine/treeEngine.d.ts.map +1 -0
- package/dist/components/MasterPatternView/engine/validationEngine.d.ts +23 -0
- package/dist/components/MasterPatternView/engine/validationEngine.d.ts.map +1 -0
- package/dist/components/MasterPatternView/hooks/useChangeStatus.d.ts +13 -0
- package/dist/components/MasterPatternView/hooks/useChangeStatus.d.ts.map +1 -0
- package/dist/components/MasterPatternView/hooks/useDebounce.d.ts +13 -0
- package/dist/components/MasterPatternView/hooks/useDebounce.d.ts.map +1 -0
- package/dist/components/MasterPatternView/hooks/useDirtyState.d.ts +2 -0
- package/dist/components/MasterPatternView/hooks/useDirtyState.d.ts.map +1 -0
- package/dist/components/MasterPatternView/hooks/useFieldEngine.d.ts +19 -0
- package/dist/components/MasterPatternView/hooks/useFieldEngine.d.ts.map +1 -0
- package/dist/components/MasterPatternView/hooks/useFilterPanelState.d.ts +17 -0
- package/dist/components/MasterPatternView/hooks/useFilterPanelState.d.ts.map +1 -0
- package/dist/components/MasterPatternView/hooks/useMasterForm.d.ts +18 -0
- package/dist/components/MasterPatternView/hooks/useMasterForm.d.ts.map +1 -0
- package/dist/components/MasterPatternView/hooks/useMasterList.d.ts +19 -0
- package/dist/components/MasterPatternView/hooks/useMasterList.d.ts.map +1 -0
- package/dist/components/MasterPatternView/hooks/usePermissionGuard.d.ts +17 -0
- package/dist/components/MasterPatternView/hooks/usePermissionGuard.d.ts.map +1 -0
- package/dist/components/MasterPatternView/hooks/useSortState.d.ts +12 -0
- package/dist/components/MasterPatternView/hooks/useSortState.d.ts.map +1 -0
- package/dist/components/MasterPatternView/hooks/useToast.d.ts +17 -0
- package/dist/components/MasterPatternView/hooks/useToast.d.ts.map +1 -0
- package/dist/components/MasterPatternView/hooks/useUniqueValidation.d.ts +9 -0
- package/dist/components/MasterPatternView/hooks/useUniqueValidation.d.ts.map +1 -0
- package/dist/components/MasterPatternView/hooks/useValidationSchema.d.ts +11 -0
- package/dist/components/MasterPatternView/hooks/useValidationSchema.d.ts.map +1 -0
- package/dist/components/MasterPatternView/index.d.ts +3 -0
- package/dist/components/MasterPatternView/index.d.ts.map +1 -0
- package/dist/components/MasterPatternView/store/MasterViewContext.d.ts +32 -0
- package/dist/components/MasterPatternView/store/MasterViewContext.d.ts.map +1 -0
- package/dist/components/MasterPatternView/store/createMasterViewStore.d.ts +13 -0
- package/dist/components/MasterPatternView/store/createMasterViewStore.d.ts.map +1 -0
- package/dist/components/MasterPatternView/store/selectors.d.ts +38 -0
- package/dist/components/MasterPatternView/store/selectors.d.ts.map +1 -0
- package/dist/components/MasterPatternView/store/slices/filterSlice.d.ts +13 -0
- package/dist/components/MasterPatternView/store/slices/filterSlice.d.ts.map +1 -0
- package/dist/components/MasterPatternView/store/slices/formSlice.d.ts +14 -0
- package/dist/components/MasterPatternView/store/slices/formSlice.d.ts.map +1 -0
- package/dist/components/MasterPatternView/store/slices/listSlice.d.ts +14 -0
- package/dist/components/MasterPatternView/store/slices/listSlice.d.ts.map +1 -0
- package/dist/components/MasterPatternView/store/slices/overrideSlice.d.ts +15 -0
- package/dist/components/MasterPatternView/store/slices/overrideSlice.d.ts.map +1 -0
- package/dist/components/MasterPatternView/store/slices/uiSlice.d.ts +13 -0
- package/dist/components/MasterPatternView/store/slices/uiSlice.d.ts.map +1 -0
- package/dist/components/MasterPatternView/store/types.d.ts +103 -0
- package/dist/components/MasterPatternView/store/types.d.ts.map +1 -0
- package/dist/components/MasterPatternView/types/definition.types.d.ts +175 -0
- package/dist/components/MasterPatternView/types/definition.types.d.ts.map +1 -0
- package/dist/components/MasterPatternView/types/detail.types.d.ts +23 -0
- package/dist/components/MasterPatternView/types/detail.types.d.ts.map +1 -0
- package/dist/components/MasterPatternView/types/index.d.ts +11 -0
- package/dist/components/MasterPatternView/types/index.d.ts.map +1 -0
- package/dist/components/MasterPatternView/types/internal.types.d.ts +32 -0
- package/dist/components/MasterPatternView/types/internal.types.d.ts.map +1 -0
- package/dist/components/MasterPatternView/types/permissions.types.d.ts +44 -0
- package/dist/components/MasterPatternView/types/permissions.types.d.ts.map +1 -0
- package/dist/components/MasterPatternView/types/props.types.d.ts +202 -0
- package/dist/components/MasterPatternView/types/props.types.d.ts.map +1 -0
- package/dist/components/MasterPatternView/types/service.types.d.ts +181 -0
- package/dist/components/MasterPatternView/types/service.types.d.ts.map +1 -0
- package/dist/components/MasterPatternView/types/tree.types.d.ts +19 -0
- package/dist/components/MasterPatternView/types/tree.types.d.ts.map +1 -0
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/siesa-ui-kit.cjs +246 -244
- package/dist/siesa-ui-kit.cjs.map +1 -1
- package/dist/siesa-ui-kit.mjs +20392 -14075
- package/dist/siesa-ui-kit.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { CardProps, CardHeaderProps, CardTitleProps, CardDescriptionProps, CardActionProps, CardContentProps, CardFooterProps } from './Card.types';
|
|
2
|
+
/**
|
|
3
|
+
* Componente Card del sistema de diseño Siesa
|
|
4
|
+
*
|
|
5
|
+
* Contenedor versátil tipo tarjeta compuesto por 7 sub-componentes:
|
|
6
|
+
* `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardAction`,
|
|
7
|
+
* `CardContent` y `CardFooter`.
|
|
8
|
+
*
|
|
9
|
+
* **Estructura típica:**
|
|
10
|
+
* ```
|
|
11
|
+
* Card
|
|
12
|
+
* ├── CardHeader
|
|
13
|
+
* │ ├── CardTitle
|
|
14
|
+
* │ ├── CardDescription
|
|
15
|
+
* │ └── CardAction (opcional)
|
|
16
|
+
* ├── CardContent
|
|
17
|
+
* └── CardFooter (opcional)
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* **Tokens de color Siesa utilizados:**
|
|
21
|
+
* - Fondo: `bg-bg-primary` / `dark:bg-dark-bg-secondary`
|
|
22
|
+
* - Texto: `text-content-primary` / `dark:text-dark-content-primary`
|
|
23
|
+
* - Texto secundario: `text-content-secondary` / `dark:text-dark-content-secondary`
|
|
24
|
+
* - Borde: `border-border-primary` / `dark:border-dark-border-primary`
|
|
25
|
+
*
|
|
26
|
+
* **Dark Mode:**
|
|
27
|
+
* Soporte completo mediante las clases `dark:` del sistema de diseño Siesa.
|
|
28
|
+
* Activar añadiendo la clase `dark` al elemento `<html>`.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* // Tarjeta básica
|
|
33
|
+
* <Card>
|
|
34
|
+
* <CardHeader>
|
|
35
|
+
* <CardTitle>Título de la tarjeta</CardTitle>
|
|
36
|
+
* <CardDescription>Descripción opcional del contenido</CardDescription>
|
|
37
|
+
* </CardHeader>
|
|
38
|
+
* <CardContent>
|
|
39
|
+
* <p>Contenido principal de la tarjeta.</p>
|
|
40
|
+
* </CardContent>
|
|
41
|
+
* <CardFooter>
|
|
42
|
+
* <Button type="default" size="base">Guardar</Button>
|
|
43
|
+
* </CardFooter>
|
|
44
|
+
* </Card>
|
|
45
|
+
*
|
|
46
|
+
* // Tarjeta con acción en el header
|
|
47
|
+
* <Card>
|
|
48
|
+
* <CardHeader>
|
|
49
|
+
* <CardTitle>Resumen</CardTitle>
|
|
50
|
+
* <CardAction>
|
|
51
|
+
* <Button type="plain" size="sm" iconOnly leftIcon={<EditIcon />} ariaLabel="Editar" />
|
|
52
|
+
* </CardAction>
|
|
53
|
+
* </CardHeader>
|
|
54
|
+
* <CardContent>Contenido</CardContent>
|
|
55
|
+
* </Card>
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare function Card({ className, ...props }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
/**
|
|
60
|
+
* Cabecera de la tarjeta con grid layout.
|
|
61
|
+
*
|
|
62
|
+
* Cuando contiene un `CardAction`, el grid cambia automáticamente a 2 columnas
|
|
63
|
+
* para posicionar la acción en la esquina superior derecha.
|
|
64
|
+
* Soporta container queries (`@container/card-header`).
|
|
65
|
+
*/
|
|
66
|
+
export declare function CardHeader({ className, ...props }: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
/**
|
|
68
|
+
* Título principal de la tarjeta.
|
|
69
|
+
*
|
|
70
|
+
* Usa tipografía semibold con `leading-none` para alineación precisa.
|
|
71
|
+
*/
|
|
72
|
+
export declare function CardTitle({ className, ...props }: CardTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
/**
|
|
74
|
+
* Descripción secundaria de la tarjeta.
|
|
75
|
+
*
|
|
76
|
+
* Renderizada con color de texto secundario del sistema de diseño Siesa.
|
|
77
|
+
*/
|
|
78
|
+
export declare function CardDescription({ className, ...props }: CardDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
/**
|
|
80
|
+
* Acción posicionada en la esquina superior derecha del `CardHeader`.
|
|
81
|
+
*
|
|
82
|
+
* Debe ser hijo directo de `CardHeader` para que el posicionamiento grid funcione.
|
|
83
|
+
* Ocupa las 2 filas del grid (título + descripción) en la columna derecha.
|
|
84
|
+
*/
|
|
85
|
+
export declare function CardAction({ className, ...props }: CardActionProps): import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
/**
|
|
87
|
+
* Área de contenido principal de la tarjeta.
|
|
88
|
+
*
|
|
89
|
+
* Aplica padding horizontal estándar de 24px (px-6) consistente con el header.
|
|
90
|
+
*/
|
|
91
|
+
export declare function CardContent({ className, ...props }: CardContentProps): import("react/jsx-runtime").JSX.Element;
|
|
92
|
+
/**
|
|
93
|
+
* Pie de la tarjeta con layout flex horizontal.
|
|
94
|
+
*
|
|
95
|
+
* Cuando tiene borde superior (`border-t`), aplica padding vertical automático (pt-6).
|
|
96
|
+
* Ideal para agrupar acciones o información de estado.
|
|
97
|
+
*/
|
|
98
|
+
export declare function CardFooter({ className, ...props }: CardFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
99
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAYtD;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAYlE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,2CAQhE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,2CAW5E;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAWlE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAQpE;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAQlE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props del componente Card
|
|
4
|
+
*
|
|
5
|
+
* Contenedor principal de la tarjeta. Acepta todos los atributos HTML de un `<div>`.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <Card className="max-w-sm">
|
|
10
|
+
* <CardContent>Contenido</CardContent>
|
|
11
|
+
* </Card>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export type CardProps = React.ComponentProps<'div'>;
|
|
15
|
+
/**
|
|
16
|
+
* Props del componente CardHeader
|
|
17
|
+
*
|
|
18
|
+
* Cabecera de la tarjeta con grid layout. Cuando contiene un `CardAction`,
|
|
19
|
+
* el grid se convierte en 2 columnas posicionando la acción a la derecha.
|
|
20
|
+
*/
|
|
21
|
+
export type CardHeaderProps = React.ComponentProps<'div'>;
|
|
22
|
+
/**
|
|
23
|
+
* Props del componente CardTitle
|
|
24
|
+
*
|
|
25
|
+
* Título principal de la tarjeta. Renderizado como un `<div>` con
|
|
26
|
+
* tipografía semibold y leading ajustado.
|
|
27
|
+
*/
|
|
28
|
+
export type CardTitleProps = React.ComponentProps<'div'>;
|
|
29
|
+
/**
|
|
30
|
+
* Props del componente CardDescription
|
|
31
|
+
*
|
|
32
|
+
* Descripción secundaria de la tarjeta. Renderizado con color de texto
|
|
33
|
+
* secundario del sistema de diseño.
|
|
34
|
+
*/
|
|
35
|
+
export type CardDescriptionProps = React.ComponentProps<'div'>;
|
|
36
|
+
/**
|
|
37
|
+
* Props del componente CardAction
|
|
38
|
+
*
|
|
39
|
+
* Elemento de acción posicionado en la esquina superior derecha del `CardHeader`.
|
|
40
|
+
* Debe ubicarse dentro de un `CardHeader` para que el posicionamiento funcione correctamente.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* <CardHeader>
|
|
45
|
+
* <CardTitle>Título</CardTitle>
|
|
46
|
+
* <CardAction>
|
|
47
|
+
* <Button type="plain" size="sm">Editar</Button>
|
|
48
|
+
* </CardAction>
|
|
49
|
+
* </CardHeader>
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export type CardActionProps = React.ComponentProps<'div'>;
|
|
53
|
+
/**
|
|
54
|
+
* Props del componente CardContent
|
|
55
|
+
*
|
|
56
|
+
* Área de contenido principal de la tarjeta con padding horizontal estándar.
|
|
57
|
+
*/
|
|
58
|
+
export type CardContentProps = React.ComponentProps<'div'>;
|
|
59
|
+
/**
|
|
60
|
+
* Props del componente CardFooter
|
|
61
|
+
*
|
|
62
|
+
* Pie de la tarjeta con layout flex horizontal y padding estándar.
|
|
63
|
+
* Cuando tiene borde superior (`border-t`), aplica padding vertical automático.
|
|
64
|
+
*/
|
|
65
|
+
export type CardFooterProps = React.ComponentProps<'div'>;
|
|
66
|
+
//# sourceMappingURL=Card.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.types.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../src/components/Card/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAElD"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter } from './Card';
|
|
2
|
+
export type { CardProps, CardHeaderProps, CardTitleProps, CardDescriptionProps, CardActionProps, CardContentProps, CardFooterProps, } from './Card.types';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC3G,YAAY,EACV,SAAS,EACT,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,cAAc,CAAC"}
|
|
@@ -3,6 +3,7 @@ export { MasterCrudTable } from './MasterCrudTable';
|
|
|
3
3
|
export { MasterCrudForm } from './MasterCrudForm';
|
|
4
4
|
export { MasterCrudToolbar } from './MasterCrudToolbar';
|
|
5
5
|
export { MasterCRUDCard } from './MasterCRUDCard';
|
|
6
|
+
export { LinkModal } from './LinkModal';
|
|
6
7
|
export { MasterCrudDynamicEntities } from './MasterCrudDynamicEntities';
|
|
7
8
|
export type { FieldType, ViewState, SelectFieldOption, FieldConfig, MasterCrudField, LookupConfig, GetAllParams, GetAllResponse, CrudService, MasterCrudProps, MasterCrudTableProps, MasterCrudFormProps, MasterCrudAction, MatchResult, MasterCrudToolbarProps, ToolbarViewType, SortOption, FilterOption, FormState, } from './MasterCrud.types';
|
|
8
9
|
export { PencilIcon, TrashIcon, PlusIcon, SearchIcon, CloseIcon, BackIcon, FilterIcon, ChevronDownIcon, GridIcon, ListIcon, CalendarIcon, EllipsisHorizontalIcon, Bars3Icon, SortAscIcon, SortDescIcon, } from './icons';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MasterCrud/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAMxE,YAAY,EAEV,SAAS,EACT,SAAS,EAGT,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,YAAY,EAGZ,YAAY,EACZ,cAAc,EACd,WAAW,EAGX,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EAGnB,gBAAgB,EAGhB,WAAW,EAGX,sBAAsB,EACtB,eAAe,EACf,UAAU,EACV,YAAY,EAGZ,SAAS,GACV,MAAM,oBAAoB,CAAC;AAM5B,OAAO,EACL,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAAU,EACV,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,sBAAsB,EACtB,SAAS,EACT,WAAW,EACX,YAAY,GACb,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MasterCrud/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAMxE,YAAY,EAEV,SAAS,EACT,SAAS,EAGT,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,YAAY,EAGZ,YAAY,EACZ,cAAc,EACd,WAAW,EAGX,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EAGnB,gBAAgB,EAGhB,WAAW,EAGX,sBAAsB,EACtB,eAAe,EACf,UAAU,EACV,YAAY,EAGZ,SAAS,GACV,MAAM,oBAAoB,CAAC;AAM5B,OAAO,EACL,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAAU,EACV,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,sBAAsB,EACtB,SAAS,EACT,WAAW,EACX,YAAY,GACb,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { MasterPatternUIProps } from './MasterPatternUI.types';
|
|
2
|
+
/**
|
|
3
|
+
* MasterPatternUI — Vista hub de navegación para módulos de negocio
|
|
4
|
+
*
|
|
5
|
+
* Componente que implementa el patrón de vista maestra para un área de negocio.
|
|
6
|
+
* Renderiza una cuadrícula de tarjetas interactivas, donde cada tarjeta representa
|
|
7
|
+
* un sub-módulo o funcionalidad navegable (facturas, pagos, reportes, etc.).
|
|
8
|
+
*
|
|
9
|
+
* Diseñado para usarse como página de entrada de un módulo en el ecosistema Siesa.
|
|
10
|
+
*
|
|
11
|
+
* **Características:**
|
|
12
|
+
* - Cuadrícula responsive configurable (1–4 columnas)
|
|
13
|
+
* - Búsqueda local o controlada externamente
|
|
14
|
+
* - Estado de carga con esqueleto animado
|
|
15
|
+
* - Estado vacío personalizable
|
|
16
|
+
* - Badges de notificación por ítem (número o texto)
|
|
17
|
+
* - Control de visibilidad y estado deshabilitado por ítem
|
|
18
|
+
* - Acciones en la cabecera (slots)
|
|
19
|
+
* - Soporte completo para dark mode
|
|
20
|
+
* - Accesibilidad: navegación por teclado (Enter / Space)
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* // Uso básico
|
|
25
|
+
* <MasterPatternUI
|
|
26
|
+
* title="Módulo Financiero"
|
|
27
|
+
* description="Gestione facturas, pagos y cartera desde un solo lugar."
|
|
28
|
+
* items={moduleItems}
|
|
29
|
+
* columns={3}
|
|
30
|
+
* showSearch
|
|
31
|
+
* />
|
|
32
|
+
*
|
|
33
|
+
* // Con búsqueda externa y acciones en header
|
|
34
|
+
* <MasterPatternUI
|
|
35
|
+
* title="Configuración"
|
|
36
|
+
* items={configItems}
|
|
37
|
+
* columns={4}
|
|
38
|
+
* showSearch
|
|
39
|
+
* onSearch={handleSearch}
|
|
40
|
+
* searchValue={searchQuery}
|
|
41
|
+
* headerActions={<Button type="plain" size="sm">Actualizar</Button>}
|
|
42
|
+
* />
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @see MasterPatternUIProps para la especificación completa de props
|
|
46
|
+
*/
|
|
47
|
+
export declare function MasterPatternUI({ title, description, items, columns, showSearch, searchPlaceholder, onSearch, searchValue, loading, emptyState, headerActions, className, itemClassName, }: MasterPatternUIProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
//# sourceMappingURL=MasterPatternUI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MasterPatternUI.d.ts","sourceRoot":"","sources":["../../../src/components/MasterPatternUI/MasterPatternUI.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,oBAAoB,EAIrB,MAAM,yBAAyB,CAAC;AA4OjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,WAAW,EACX,KAAK,EACL,OAAW,EACX,UAAkB,EAClB,iBAAsC,EACtC,QAAQ,EACR,WAAW,EACX,OAAe,EACf,UAAU,EACV,aAAa,EACb,SAAS,EACT,aAAa,GACd,EAAE,oBAAoB,2CAkHtB"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Colores disponibles para el badge de un ítem.
|
|
4
|
+
*
|
|
5
|
+
* Mapeados a los tokens de color del sistema de diseño Siesa.
|
|
6
|
+
*/
|
|
7
|
+
export type MasterPatternItemBadgeColor = 'blue' | 'green' | 'red' | 'yellow' | 'purple' | 'orange' | 'gray';
|
|
8
|
+
/**
|
|
9
|
+
* Definición de un ítem de navegación dentro de `MasterPatternUI`.
|
|
10
|
+
*
|
|
11
|
+
* Cada ítem se renderiza como una tarjeta interactiva en la cuadrícula.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const item: MasterPatternItem = {
|
|
16
|
+
* id: 'facturas',
|
|
17
|
+
* label: 'Facturas',
|
|
18
|
+
* description: 'Gestión de facturas de venta y compra',
|
|
19
|
+
* icon: <InvoiceIcon />,
|
|
20
|
+
* badge: 12,
|
|
21
|
+
* badgeColor: 'blue',
|
|
22
|
+
* onClick: () => navigate('/finance/invoices'),
|
|
23
|
+
* };
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export interface MasterPatternItem {
|
|
27
|
+
/**
|
|
28
|
+
* Identificador único del ítem.
|
|
29
|
+
* Usado como `key` en el renderizado del grid.
|
|
30
|
+
*/
|
|
31
|
+
id: string;
|
|
32
|
+
/**
|
|
33
|
+
* Título principal de la tarjeta.
|
|
34
|
+
* Se muestra en negrita como nombre del módulo o funcionalidad.
|
|
35
|
+
*/
|
|
36
|
+
label: string;
|
|
37
|
+
/**
|
|
38
|
+
* Descripción secundaria de la tarjeta.
|
|
39
|
+
* Texto corto que explica el propósito del módulo.
|
|
40
|
+
*/
|
|
41
|
+
description?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Ícono del ítem, renderizado en la esquina superior izquierda de la tarjeta.
|
|
44
|
+
* Se recomienda usar íconos de 20x20px o 24x24px.
|
|
45
|
+
*/
|
|
46
|
+
icon?: ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* Contenido del badge de notificación.
|
|
49
|
+
* Acepta un número (ej: cantidad de registros pendientes) o un string (ej: "Nuevo").
|
|
50
|
+
*/
|
|
51
|
+
badge?: string | number;
|
|
52
|
+
/**
|
|
53
|
+
* Color del badge de notificación.
|
|
54
|
+
*
|
|
55
|
+
* @default 'blue'
|
|
56
|
+
*/
|
|
57
|
+
badgeColor?: MasterPatternItemBadgeColor;
|
|
58
|
+
/**
|
|
59
|
+
* Si `true`, el ítem no es interactivo y aparece con opacidad reducida.
|
|
60
|
+
*
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Si `false`, el ítem no se renderiza en la cuadrícula.
|
|
66
|
+
* Útil para controlar visibilidad según permisos del usuario.
|
|
67
|
+
*
|
|
68
|
+
* @default true
|
|
69
|
+
*/
|
|
70
|
+
visible?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Función ejecutada al hacer click en la tarjeta.
|
|
73
|
+
* Si está definida junto con `href`, `onClick` tiene prioridad.
|
|
74
|
+
*/
|
|
75
|
+
onClick?: () => void;
|
|
76
|
+
/**
|
|
77
|
+
* Clases CSS adicionales aplicadas a la tarjeta del ítem.
|
|
78
|
+
*/
|
|
79
|
+
className?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Configuración del estado vacío del componente.
|
|
83
|
+
*
|
|
84
|
+
* Se muestra cuando no hay ítems visibles (sin ítems definidos
|
|
85
|
+
* o cuando la búsqueda no arroja resultados).
|
|
86
|
+
*/
|
|
87
|
+
export interface MasterPatternEmptyState {
|
|
88
|
+
/**
|
|
89
|
+
* Título del estado vacío.
|
|
90
|
+
*
|
|
91
|
+
* @default 'Sin módulos disponibles'
|
|
92
|
+
*/
|
|
93
|
+
title?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Descripción del estado vacío.
|
|
96
|
+
*
|
|
97
|
+
* @default 'No hay módulos configurados para mostrar.'
|
|
98
|
+
*/
|
|
99
|
+
description?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Ícono ilustrativo del estado vacío.
|
|
102
|
+
* Si no se provee, se usa un ícono genérico de cuadrícula.
|
|
103
|
+
*/
|
|
104
|
+
icon?: ReactNode;
|
|
105
|
+
/**
|
|
106
|
+
* Elemento de acción opcional (ej: botón para crear un módulo o limpiar el filtro).
|
|
107
|
+
*/
|
|
108
|
+
action?: ReactNode;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Número de columnas de la cuadrícula de ítems en pantallas grandes (≥ lg).
|
|
112
|
+
* En pantallas medianas (sm) se usa la mitad (mínimo 1), en móvil siempre 1 columna.
|
|
113
|
+
*
|
|
114
|
+
* | columns | lg grid | sm grid | xs grid |
|
|
115
|
+
* |---------|-----------|---------|---------|
|
|
116
|
+
* | 1 | 1 col | 1 col | 1 col |
|
|
117
|
+
* | 2 | 2 cols | 1 col | 1 col |
|
|
118
|
+
* | 3 | 3 cols | 2 cols | 1 col |
|
|
119
|
+
* | 4 | 4 cols | 2 cols | 1 col |
|
|
120
|
+
*
|
|
121
|
+
* @default 3
|
|
122
|
+
*/
|
|
123
|
+
export type MasterPatternColumns = 1 | 2 | 3 | 4;
|
|
124
|
+
/**
|
|
125
|
+
* Props del componente `MasterPatternUI`.
|
|
126
|
+
*
|
|
127
|
+
* Componente de vista para el hub de navegación de un módulo de negocio.
|
|
128
|
+
* Renderiza una cuadrícula de tarjetas interactivas, cada una representando
|
|
129
|
+
* un sub-módulo o funcionalidad del área de negocio.
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```tsx
|
|
133
|
+
* <MasterPatternUI
|
|
134
|
+
* title="Módulo Financiero"
|
|
135
|
+
* description="Acceda a las funcionalidades del área financiera."
|
|
136
|
+
* items={[
|
|
137
|
+
* {
|
|
138
|
+
* id: 'facturas',
|
|
139
|
+
* label: 'Facturas',
|
|
140
|
+
* description: 'Registro y consulta de facturas',
|
|
141
|
+
* icon: <FileTextIcon />,
|
|
142
|
+
* badge: 5,
|
|
143
|
+
* badgeColor: 'blue',
|
|
144
|
+
* onClick: () => navigate('/finance/facturas'),
|
|
145
|
+
* },
|
|
146
|
+
* {
|
|
147
|
+
* id: 'pagos',
|
|
148
|
+
* label: 'Pagos',
|
|
149
|
+
* description: 'Control de pagos y cartera',
|
|
150
|
+
* icon: <CreditCardIcon />,
|
|
151
|
+
* onClick: () => navigate('/finance/pagos'),
|
|
152
|
+
* },
|
|
153
|
+
* ]}
|
|
154
|
+
* showSearch
|
|
155
|
+
* columns={3}
|
|
156
|
+
* />
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
export interface MasterPatternUIProps {
|
|
160
|
+
/**
|
|
161
|
+
* Título del módulo o área de negocio.
|
|
162
|
+
* Se muestra en la cabecera del componente como encabezado principal.
|
|
163
|
+
*/
|
|
164
|
+
title: string;
|
|
165
|
+
/**
|
|
166
|
+
* Descripción breve del módulo.
|
|
167
|
+
* Se muestra debajo del título con estilo de texto secundario.
|
|
168
|
+
*/
|
|
169
|
+
description?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Lista de ítems de navegación a mostrar en la cuadrícula.
|
|
172
|
+
* Los ítems con `visible: false` son omitidos del renderizado.
|
|
173
|
+
*/
|
|
174
|
+
items: MasterPatternItem[];
|
|
175
|
+
/**
|
|
176
|
+
* Número de columnas de la cuadrícula en pantallas grandes.
|
|
177
|
+
*
|
|
178
|
+
* @default 3
|
|
179
|
+
*/
|
|
180
|
+
columns?: MasterPatternColumns;
|
|
181
|
+
/**
|
|
182
|
+
* Si `true`, muestra un campo de búsqueda en la cabecera.
|
|
183
|
+
* La búsqueda filtra ítems por `label` y `description` de forma local.
|
|
184
|
+
* Para búsqueda externa (asíncrona), use `onSearch`.
|
|
185
|
+
*
|
|
186
|
+
* @default false
|
|
187
|
+
*/
|
|
188
|
+
showSearch?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Placeholder del campo de búsqueda.
|
|
191
|
+
*
|
|
192
|
+
* @default 'Buscar módulo...'
|
|
193
|
+
*/
|
|
194
|
+
searchPlaceholder?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Callback ejecutado al cambiar el valor del campo de búsqueda.
|
|
197
|
+
* Si se provee, desactiva el filtrado interno y delega la lógica al padre.
|
|
198
|
+
* Si no se provee, el componente filtra los ítems localmente.
|
|
199
|
+
*/
|
|
200
|
+
onSearch?: (query: string) => void;
|
|
201
|
+
/**
|
|
202
|
+
* Valor actual del campo de búsqueda (modo controlado).
|
|
203
|
+
* Úselo junto con `onSearch` para controlar externamente el estado de búsqueda.
|
|
204
|
+
*/
|
|
205
|
+
searchValue?: string;
|
|
206
|
+
/**
|
|
207
|
+
* Si `true`, muestra un esqueleto de carga en lugar de la cuadrícula.
|
|
208
|
+
*
|
|
209
|
+
* @default false
|
|
210
|
+
*/
|
|
211
|
+
loading?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Configuración del estado vacío mostrado cuando no hay ítems.
|
|
214
|
+
*/
|
|
215
|
+
emptyState?: MasterPatternEmptyState;
|
|
216
|
+
/**
|
|
217
|
+
* Elementos adicionales renderizados en la esquina derecha de la cabecera.
|
|
218
|
+
* Úselos para acciones globales (ej: botón de configuración, refresh).
|
|
219
|
+
*/
|
|
220
|
+
headerActions?: ReactNode;
|
|
221
|
+
/**
|
|
222
|
+
* Clases CSS adicionales aplicadas al contenedor raíz del componente.
|
|
223
|
+
*/
|
|
224
|
+
className?: string;
|
|
225
|
+
/**
|
|
226
|
+
* Clases CSS adicionales aplicadas a cada tarjeta de ítem.
|
|
227
|
+
* Complementa (no reemplaza) las clases base.
|
|
228
|
+
*/
|
|
229
|
+
itemClassName?: string;
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=MasterPatternUI.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MasterPatternUI.types.d.ts","sourceRoot":"","sources":["../../../src/components/MasterPatternUI/MasterPatternUI.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GACnC,MAAM,GACN,OAAO,GACP,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,MAAM,CAAC;AAEX;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;;;OAIG;IACH,UAAU,CAAC,EAAE,2BAA2B,CAAC;IAEzC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAMD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAMjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,WAAW,oBAAoB;IAGnC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB;;;OAGG;IACH,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAI3B;;;;OAIG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAI/B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,uBAAuB,CAAC;IAIrC;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAI1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function SearchIcon(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function ArrowRightIcon(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function GridEmptyIcon(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function SearchEmptyIcon(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/MasterPatternUI/icons.tsx"],"names":[],"mappings":"AACA,wBAAgB,UAAU,4CAkBzB;AAGD,wBAAgB,cAAc,4CAkB7B;AAGD,wBAAgB,aAAa,4CAoB5B;AAGD,wBAAgB,eAAe,4CAmB9B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { MasterPatternUI } from './MasterPatternUI';
|
|
2
|
+
export type { MasterPatternUIProps, MasterPatternItem, MasterPatternColumns, MasterPatternItemBadgeColor, MasterPatternEmptyState, } from './MasterPatternUI.types';
|
|
3
|
+
export { SearchIcon, ArrowRightIcon, GridEmptyIcon, SearchEmptyIcon } from './icons';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MasterPatternUI/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EACV,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InternalToastContainer — self-contained toast system for master-pattern-ui.
|
|
3
|
+
*
|
|
4
|
+
* Uses a DOM CustomEvent bus so `useToast` can fire toasts without requiring
|
|
5
|
+
* the consumer to provide a `toast` prop or mount a ToastManager.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* - `fireInternalToast(type, message)` — fire from anywhere in the package
|
|
9
|
+
* - `<InternalToastContainer />` — mount once inside MasterPatternView
|
|
10
|
+
*
|
|
11
|
+
* @module components/InternalToastContainer
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import type { ToastType } from '../hooks/useToast';
|
|
15
|
+
export declare function fireInternalToast(type: ToastType, message: string): void;
|
|
16
|
+
export declare function InternalToastContainer(): React.ReactElement | null;
|
|
17
|
+
//# sourceMappingURL=InternalToastContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InternalToastContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/MasterPatternView/components/InternalToastContainer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAiBnD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAKxE;AAED,wBAAgB,sBAAsB,IAAI,KAAK,CAAC,YAAY,GAAG,IAAI,CAmClE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MasterPatternView — root component for master data management.
|
|
3
|
+
*
|
|
4
|
+
* Composes all sub-systems: store context, toolbar, list, form panel,
|
|
5
|
+
* and modals. Exposes imperative ref API via MasterPatternViewRef.
|
|
6
|
+
*
|
|
7
|
+
* @module components/MasterPatternView
|
|
8
|
+
* @see FMPV-MVWC-E003-S006 I-001
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import type { MasterPatternViewEntity } from '../types';
|
|
12
|
+
import type { MasterPatternViewProps, MasterPatternViewRef } from '../types';
|
|
13
|
+
/**
|
|
14
|
+
* MasterPatternView — complete master data management component.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* const ref = useRef<MasterPatternViewRef>(null);
|
|
19
|
+
*
|
|
20
|
+
* <MasterPatternView
|
|
21
|
+
* ref={ref}
|
|
22
|
+
* definition={currencyDefinition}
|
|
23
|
+
* service={currencyService}
|
|
24
|
+
* title="Monedas"
|
|
25
|
+
* entityName="Moneda"
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const MasterPatternView: <T extends MasterPatternViewEntity>(props: MasterPatternViewProps<T> & {
|
|
30
|
+
ref?: React.ForwardedRef<MasterPatternViewRef>;
|
|
31
|
+
}) => React.ReactElement | null;
|
|
32
|
+
//# sourceMappingURL=MasterPatternView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MasterPatternView.d.ts","sourceRoot":"","sources":["../../../../src/components/MasterPatternView/components/MasterPatternView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAqG,MAAM,OAAO,CAAC;AAG1H,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAw+B7E;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB,EAWxB,CAAC,CAAC,SAAS,uBAAuB,EACtC,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAA;CAAE,KAClF,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { MasterPatternViewDefinition } from '../../types/definition.types';
|
|
2
|
+
export interface BasicDataTabProps {
|
|
3
|
+
definition: MasterPatternViewDefinition;
|
|
4
|
+
values: Record<string, unknown>;
|
|
5
|
+
errors: Record<string, string>;
|
|
6
|
+
onChange: (field: string, value: unknown) => void;
|
|
7
|
+
headerFields?: string[];
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
/** 'company' when a specific company is selected; 'global' otherwise */
|
|
10
|
+
fieldContext?: 'global' | 'company';
|
|
11
|
+
isShowGlobalValuesEnabled?: boolean;
|
|
12
|
+
globalValues?: Record<string, unknown>;
|
|
13
|
+
onFieldRevert?: (fieldName: string, globalValue: unknown) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function BasicDataTab({ definition, values, errors, onChange, headerFields, readOnly, fieldContext, isShowGlobalValuesEnabled, globalValues, onFieldRevert, }: BasicDataTabProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=BasicDataTab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicDataTab.d.ts","sourceRoot":"","sources":["../../../../../src/components/MasterPatternView/components/form/BasicDataTab.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAKhF,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,2BAA2B,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,YAAY,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;CACnE;AAID,wBAAgB,YAAY,CAAC,EAC3B,UAAU,EACV,MAAM,EACN,MAAM,EACN,QAAQ,EACR,YAAoC,EACpC,QAAgB,EAChB,YAAY,EACZ,yBAAiC,EACjC,YAAiB,EACjB,aAAa,GACd,EAAE,iBAAiB,2CAqEnB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MasterPatternViewDefinition, MasterPatternViewTabConfig } from '../../types/definition.types';
|
|
2
|
+
export interface ContentTabProps {
|
|
3
|
+
definition: MasterPatternViewDefinition;
|
|
4
|
+
tabConfig: MasterPatternViewTabConfig;
|
|
5
|
+
values: Record<string, unknown>;
|
|
6
|
+
errors: Record<string, string>;
|
|
7
|
+
onChange: (field: string, value: unknown) => void;
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
fieldContext?: 'global' | 'company';
|
|
10
|
+
isShowGlobalValuesEnabled?: boolean;
|
|
11
|
+
globalValues?: Record<string, unknown>;
|
|
12
|
+
onFieldRevert?: (fieldName: string, globalValue: unknown) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function ContentTab({ definition, tabConfig, values, errors, onChange, readOnly, fieldContext, isShowGlobalValuesEnabled, globalValues, onFieldRevert, }: ContentTabProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=ContentTab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentTab.d.ts","sourceRoot":"","sources":["../../../../../src/components/MasterPatternView/components/form/ContentTab.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAM5G,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,2BAA2B,CAAC;IACxC,SAAS,EAAE,0BAA0B,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;CACnE;AAED,wBAAgB,UAAU,CAAC,EACzB,UAAU,EACV,SAAS,EACT,MAAM,EACN,MAAM,EACN,QAAQ,EACR,QAAgB,EAChB,YAAY,EACZ,yBAAiC,EACjC,YAAiB,EACjB,aAAa,GACd,EAAE,eAAe,2CAmEjB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DetailTab — master-detail sub-entity mini-table with lazy loading.
|
|
3
|
+
*
|
|
4
|
+
* Features:
|
|
5
|
+
* - Lazy loads on first activation via TanStack Query (enabled=isActive)
|
|
6
|
+
* - Mini-table with showInList columns from config.fields
|
|
7
|
+
* - "+ Agregar {entityName}" button opens an inline modal
|
|
8
|
+
* - Row "Editar" opens the same modal pre-filled
|
|
9
|
+
* - Row "Eliminar" inline confirmation (row transforms — no modal-on-modal)
|
|
10
|
+
* - Validates via config.validate before each save
|
|
11
|
+
*
|
|
12
|
+
* @module components/form/DetailTab
|
|
13
|
+
* @see FMPV-MVWC-E005-S001
|
|
14
|
+
*/
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import type { MasterDetailTabConfig } from '../../types/detail.types';
|
|
17
|
+
import type { MasterPatternViewEntity } from '../../types/service.types';
|
|
18
|
+
export interface DetailTabProps<D extends MasterPatternViewEntity> {
|
|
19
|
+
config: MasterDetailTabConfig<D>;
|
|
20
|
+
masterId: string;
|
|
21
|
+
companyId?: string;
|
|
22
|
+
isActive: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function DetailTab<D extends MasterPatternViewEntity>({ config, masterId, companyId, isActive, }: DetailTabProps<D>): React.ReactElement | null;
|
|
25
|
+
//# sourceMappingURL=DetailTab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailTab.d.ts","sourceRoot":"","sources":["../../../../../src/components/MasterPatternView/components/form/DetailTab.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGzE,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,uBAAuB;IAC/D,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAsCD,wBAAgB,SAAS,CAAC,CAAC,SAAS,uBAAuB,EAAE,EAC3D,MAAM,EACN,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAuO/C"}
|