@m4l/components 9.1.43 → 9.1.44
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.
|
@@ -4,6 +4,10 @@ import { AppBarProps } from './types';
|
|
|
4
4
|
* Por lo general, contiene elementos de navegación, como botones para ir hacia atrás o hacia adelante, un botón de menú para
|
|
5
5
|
* acceder a opciones adicionales y un campo de búsqueda.
|
|
6
6
|
* También puede mostrar información relevante, como el título de la página actual o el nombre del usuario conectado.
|
|
7
|
+
* ### Dependencias:
|
|
8
|
+
* - **`useEnviroment:`** Hook que permite acceder a los recursos de archivos del cliente.
|
|
9
|
+
* - **`useModuleDictionary:`** Hook que permite acceder a las etiquetas de los módulos para el i18n
|
|
10
|
+
* - **`useIsMobile:`** Hook que permite saber si el dispositivo es móvil.
|
|
7
11
|
* @param {AppBarProps} props - Propiedades del componente.
|
|
8
12
|
* @returns {JSX.Element} Elemento que se retorna.
|
|
9
13
|
* @example
|
|
@@ -16,7 +20,7 @@ import { AppBarProps } from './types';
|
|
|
16
20
|
* >
|
|
17
21
|
* @author Andrés Quintero - automatic
|
|
18
22
|
* @createdAt 2024-11-29 14:26:18 - automatic
|
|
19
|
-
* @updatedAt 2024-
|
|
23
|
+
* @updatedAt 2024-12-27 23:20:48 - automatic
|
|
20
24
|
* @updatedUser Andrés Quintero - automatic
|
|
21
25
|
*/
|
|
22
26
|
export declare const AppBar: (props: AppBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,15 +5,16 @@ const appBarStyles = {
|
|
|
5
5
|
* ****************************************************
|
|
6
6
|
* @author Andrés Quintero - automatic
|
|
7
7
|
* @createdAt 2024-11-30 00:04:06 - automatic
|
|
8
|
-
* @updatedAt 2024-
|
|
8
|
+
* @updatedAt 2024-12-30 16:27:27 - automatic
|
|
9
9
|
* @updatedUser Andrés Quintero - automatic
|
|
10
10
|
*/
|
|
11
11
|
appBarRoot: ({ theme }) => ({
|
|
12
12
|
display: "flex",
|
|
13
13
|
flexDirection: "row",
|
|
14
14
|
flexWrap: "nowrap",
|
|
15
|
+
alignItems: theme.generalSettings.isMobile ? "center" : "initial",
|
|
15
16
|
height: theme.vars.size.baseSpacings.sp12,
|
|
16
|
-
padding: `0 ${theme.vars.size.baseSpacings.sp4}`,
|
|
17
|
+
padding: `0 ${theme.generalSettings.isMobile ? theme.vars.size.baseSpacings.sp2 : theme.vars.size.baseSpacings.sp4}`,
|
|
17
18
|
borderBottom: `1px solid ${theme.vars.palette.border.default}`,
|
|
18
19
|
gap: theme.vars.size.baseSpacings.sp3
|
|
19
20
|
}),
|
|
@@ -23,7 +24,7 @@ const appBarStyles = {
|
|
|
23
24
|
* ****************************************************
|
|
24
25
|
* @author Andrés Quintero - automatic
|
|
25
26
|
* @createdAt 2024-11-30 00:04:06 - automatic
|
|
26
|
-
* @updatedAt 2024-
|
|
27
|
+
* @updatedAt 2024-12-30 16:27:27 - automatic
|
|
27
28
|
* @updatedUser Andrés Quintero - automatic
|
|
28
29
|
*/
|
|
29
30
|
containerIsotypeName: ({ theme }) => ({
|
|
@@ -35,6 +36,7 @@ const appBarStyles = {
|
|
|
35
36
|
padding: `${theme.vars.size.baseSpacings.sp3} 0`,
|
|
36
37
|
/**
|
|
37
38
|
* Se pone los px directamente porque no existe un token con este valor
|
|
39
|
+
* @createdAt 2024-12-30 16:27:25 - automatic
|
|
38
40
|
*/
|
|
39
41
|
width: "204px",
|
|
40
42
|
minWidth: "204px"
|
|
@@ -45,7 +47,7 @@ const appBarStyles = {
|
|
|
45
47
|
* ****************************************************
|
|
46
48
|
* @author Andrés Quintero - automatic
|
|
47
49
|
* @createdAt 2024-11-30 00:04:06 - automatic
|
|
48
|
-
* @updatedAt 2024-
|
|
50
|
+
* @updatedAt 2024-12-30 16:27:27 - automatic
|
|
49
51
|
* @updatedUser Andrés Quintero - automatic
|
|
50
52
|
*/
|
|
51
53
|
imageIsotype: ({ theme }) => ({
|
|
@@ -59,7 +61,7 @@ const appBarStyles = {
|
|
|
59
61
|
* ****************************************************
|
|
60
62
|
* @author Andrés Quintero - automatic
|
|
61
63
|
* @createdAt 2024-11-30 00:04:06 - automatic
|
|
62
|
-
* @updatedAt 2024-
|
|
64
|
+
* @updatedAt 2024-12-30 16:27:27 - automatic
|
|
63
65
|
* @updatedUser Andrés Quintero - automatic
|
|
64
66
|
*/
|
|
65
67
|
companyName: ({ theme }) => ({
|
|
@@ -74,7 +76,7 @@ const appBarStyles = {
|
|
|
74
76
|
* ****************************************************
|
|
75
77
|
* @author Andrés Quintero - automatic
|
|
76
78
|
* @createdAt 2024-11-30 00:04:06 - automatic
|
|
77
|
-
* @updatedAt 2024-
|
|
79
|
+
* @updatedAt 2024-12-30 16:27:27 - automatic
|
|
78
80
|
* @updatedUser Andrés Quintero - automatic
|
|
79
81
|
*/
|
|
80
82
|
menuIconButton: ({ theme }) => ({
|
|
@@ -87,7 +89,7 @@ const appBarStyles = {
|
|
|
87
89
|
* **************************************************************
|
|
88
90
|
* @author Andrés Quintero - automatic
|
|
89
91
|
* @createdAt 2024-11-30 00:04:06 - automatic
|
|
90
|
-
* @updatedAt 2024-
|
|
92
|
+
* @updatedAt 2024-12-30 16:27:27 - automatic
|
|
91
93
|
* @updatedUser Andrés Quintero - automatic
|
|
92
94
|
*/
|
|
93
95
|
content: ({ theme }) => ({
|
|
@@ -103,6 +105,10 @@ const appBarStyles = {
|
|
|
103
105
|
* **************************************************************
|
|
104
106
|
* Estilos para el contenedor del contenido del logotipo y nombre
|
|
105
107
|
* **************************************************************
|
|
108
|
+
* @author Andrés Quintero - automatic
|
|
109
|
+
* @createdAt 2024-12-30 16:27:25 - automatic
|
|
110
|
+
* @updatedAt 2024-12-30 16:27:27 - automatic
|
|
111
|
+
* @updatedUser Andrés Quintero - automatic
|
|
106
112
|
*/
|
|
107
113
|
contentIsoType: ({ theme }) => ({
|
|
108
114
|
display: "flex",
|
|
@@ -115,6 +121,10 @@ const appBarStyles = {
|
|
|
115
121
|
* **************************************************************
|
|
116
122
|
* Estilos para el divisor entre el logotipo y el contenido
|
|
117
123
|
* **************************************************************
|
|
124
|
+
* @author Andrés Quintero - automatic
|
|
125
|
+
* @createdAt 2024-12-30 16:27:25 - automatic
|
|
126
|
+
* @updatedAt 2024-12-30 16:27:27 - automatic
|
|
127
|
+
* @updatedUser Andrés Quintero - automatic
|
|
118
128
|
*/
|
|
119
129
|
divider: ({ theme, ownerState }) => ({
|
|
120
130
|
height: "100%",
|
|
@@ -6,23 +6,52 @@ import { Theme } from '@mui/material/styles';
|
|
|
6
6
|
import { ComponentPalletColor, Sizes } from '@m4l/styles';
|
|
7
7
|
/**
|
|
8
8
|
* Propiedades de estilo para el componente raíz de la barra de aplicaciones.
|
|
9
|
+
* @createdAt 2024-12-27 23:20:47 - automatic
|
|
9
10
|
*/
|
|
10
11
|
export type RootStyleProps = {
|
|
11
|
-
/** Indica si la barra de aplicaciones está colapsada. */
|
|
12
12
|
isCollapse: boolean;
|
|
13
|
-
/** Indica si hay un desplazamiento (offset) aplicado a la barra de aplicaciones. */
|
|
14
13
|
isOffset: boolean;
|
|
15
|
-
/** Indica si la barra lateral está visible.*/
|
|
16
14
|
isSideBarVisible: boolean;
|
|
17
15
|
};
|
|
18
16
|
export interface AppBarProps {
|
|
17
|
+
/**
|
|
18
|
+
* Color de la barra de aplicaciones.
|
|
19
|
+
* @createdAt 2024-12-27 23:20:47 - automatic
|
|
20
|
+
*/
|
|
19
21
|
color?: Extract<ComponentPalletColor, 'default'>;
|
|
22
|
+
/**
|
|
23
|
+
* Opción de tamaño de la barra de aplicaciones.
|
|
24
|
+
* @createdAt 2024-12-27 23:20:47 - automatic
|
|
25
|
+
*/
|
|
20
26
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
27
|
+
/**
|
|
28
|
+
* Opción de aparición de la barra de aplicaciones.
|
|
29
|
+
* @createdAt 2024-12-27 23:20:47 - automatic
|
|
30
|
+
*/
|
|
21
31
|
variant?: 'standard';
|
|
22
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Función que activa la visualización del menú de la aplicación en la vista móvil.
|
|
34
|
+
* @author Andrés Quintero - automatic
|
|
35
|
+
* @createdAt 2024-12-31 08:24:48 - automatic
|
|
36
|
+
* @updatedAt 2024-12-31 08:24:49 - automatic
|
|
37
|
+
* @updatedUser Andrés Quintero - automatic
|
|
38
|
+
*/
|
|
39
|
+
onToggleVisible: () => void;
|
|
40
|
+
/**
|
|
41
|
+
* Elementos secundarios de la barra de aplicaciones.
|
|
42
|
+
*/
|
|
23
43
|
children: ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* URL de la imagen del logotipo de la compañía.
|
|
46
|
+
*/
|
|
24
47
|
companyLogo?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Nombre de la compañía.
|
|
50
|
+
*/
|
|
25
51
|
companyName?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Identificador de prueba.
|
|
54
|
+
*/
|
|
26
55
|
dataTestid?: string;
|
|
27
56
|
}
|
|
28
57
|
export type AppBarOwnerState = Pick<AppBarProps, 'size'> & {
|