@m4l/styles 7.1.29 → 7.1.30

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.
@@ -1,393 +0,0 @@
1
- import { alpha as o } from "@mui/material/styles";
2
- const e = (r) => ({
3
- M4LDataGrid: {
4
- styleOverrides: {
5
- "&.M4LDataGrid-root": {
6
- background: r.vars.palette.background.default,
7
- boxShadow: "unset",
8
- borderRadius: "4px",
9
- border: "1px solid",
10
- borderColor: r.vars.palette?.border.default,
11
- display: "flex",
12
- position: "relative",
13
- flexDirection: "column",
14
- gap: "4px",
15
- height: "100%",
16
- width: "100%",
17
- flexGrow: 1,
18
- "& .rdg .MuiCheckbox-root": {
19
- "& > svg": {
20
- color: r.vars.palette.text.secondary
21
- }
22
- },
23
- // Condicion Breakpoint css Query Container
24
- // Condiciones BreakPoint < sm
25
- "&.M4LDataGrid-xs": {
26
- "& .M4LDataGrid-actions": {
27
- height: "44px",
28
- "& .M4LPager-labelRowsPerPageContainer": {
29
- "& .M4LTypography-root": {
30
- display: "none"
31
- }
32
- },
33
- "& .M4LPager-labelDisplayRows": {
34
- display: "none"
35
- }
36
- }
37
- },
38
- "& .M4LDataGrid-actions": {
39
- ...r.colorSchemes.finalTheme.typography.body,
40
- left: "0px",
41
- right: "0px",
42
- top: "0px",
43
- height: "32px",
44
- minHeight: "32px",
45
- padding: "4px 8px",
46
- display: "flex",
47
- flexDirection: "row",
48
- borderRadius: "4px",
49
- alignItems: "center",
50
- justifyContent: "space-between",
51
- background: r.vars.palette.background.default,
52
- position: "absolute",
53
- gap: "8px",
54
- "@container main (max-width: 600px)": {
55
- height: "44px"
56
- },
57
- /* [theme.breakpoints.down('sm')]: {
58
- height: '44px',
59
- }, */
60
- "& .M4LDataGrid-actionsConfigContainer": {
61
- display: "flex",
62
- flexDirection: "row",
63
- gap: "8px",
64
- marginLeft: "12px",
65
- "& .M4LIconButton-root": {
66
- background: r.vars.palette.background.default
67
- }
68
- },
69
- "& .M4LDataGrid-rowsCount": {
70
- display: "flex",
71
- gap: "8px",
72
- alignItems: "center",
73
- "& .M4LDataGrid-rowsCountLabel": {
74
- ...r.colorSchemes.finalTheme.typography.body,
75
- color: r.vars.palette.text.primary,
76
- height: "100%"
77
- //revisar
78
- },
79
- "& .M4LDataGrid-rowsCountValue": {
80
- paddingTop: "4px",
81
- paddingBottom: "2px",
82
- paddingLeft: "4px",
83
- paddingRight: "6px",
84
- background: r.vars.palette.background.default,
85
- borderRadius: "4px"
86
- }
87
- },
88
- /* Action density se carga en el portal M4LDataGridDensityPopover, no se debe estilar desde aquí. */
89
- "& .M4LDataGrid-actionFilter": {
90
- /* Estilos de iconButton Filter */
91
- },
92
- "& .M4LDataGrid-actionSettings": {
93
- /* Estilos de iconButton Settings */
94
- }
95
- },
96
- "& .M4LDataGrid-tableContaniner:not(.M4LDataGrid-withActions)": {
97
- top: "0!important"
98
- },
99
- "& .M4LDataGrid-tableContaniner": {
100
- display: "flex",
101
- flexDirection: "column",
102
- position: "absolute",
103
- top: "32px",
104
- bottom: "0px",
105
- left: "0px",
106
- right: "0px",
107
- overflow: "hidden",
108
- padding: "0 4px",
109
- borderRadius: "4px",
110
- border: "none",
111
- boxshadow: r.customShadows?.z2,
112
- background: r.vars.palette.background.default,
113
- "@container main (max-width: 600px)": {
114
- top: "44px"
115
- },
116
- "& .M4LDataGrid-wrapperDataGridCss": {
117
- position: "relative",
118
- height: "100%",
119
- overflow: "hidden",
120
- borderRadius: "4px 0px",
121
- "& .rdg ": {
122
- border: "none",
123
- background: r.vars.palette.background.default,
124
- gridColumnGap: "0px",
125
- gridRowGap: "0px",
126
- userSelect: "initial",
127
- height: "100%",
128
- contentVisibility: "unset",
129
- overflow: "auto",
130
- padding: "0px",
131
- "--rdg-grid-inline-size": "0px",
132
- "--rdg-header-background-color": r.vars.palette.primary.opacity,
133
- "--rdg-row-selected-background-color": "#D9E9FC",
134
- "--rdg-row-hover-background-color": "#D9E9FC",
135
- "--rdg-background-color": r.vars.palette.background.default,
136
- "--rdg-selection-color": r.vars.palette.primary.focusVisible,
137
- "--row-selected-hover-background-color": r.vars.palette.primary.toneOpacity,
138
- "--rdg-checkbox-color": r.vars.palette.primary.main,
139
- "--rdg-checkbox-focus-color": o(
140
- r.colorSchemes.finalTheme.palette.primary.main,
141
- r.colorSchemes.finalTheme.palette.action.selectedOpacity
142
- ),
143
- "--rdg-border-color": "none",
144
- // "--rdg-checkbox-disabled-border-color:":theme.vars.palette.divider,
145
- // "--rdg-checkbox-disabled-background-color":theme.vars.palette.,
146
- /* border-bottom-right-radius: 3px; */
147
- "&:last-child .rdg-cell": {
148
- borderTop: "0.5px solid",
149
- borderBottom: "1px solid",
150
- borderLeft: "0.5px solid",
151
- borderRight: "0.5px solid",
152
- borderColor: r.vars.palette?.border.disabled
153
- }
154
- },
155
- '& [role="columnheader"]': {
156
- justifyContent: "center",
157
- alignItems: "center"
158
- },
159
- "& .rdg-row": {
160
- '&[aria-selected="false"] .rdg-cell': {
161
- backgroundColor: r.vars.palette.background.default,
162
- borderLeft: "0.5px solid",
163
- borderColor: r.vars.palette?.border.disabled
164
- },
165
- "&:nth-of-type(odd)": {
166
- "& .rdg-cell": {
167
- backgroundColor: r.vars.palette.background.default
168
- }
169
- },
170
- '&[aria-selected="true"] .rdg-cell': {
171
- backgroundColor: r.vars.palette.primary?.toneOpacity
172
- },
173
- "&:hover": {
174
- "& .rdg-cell": {
175
- backgroundColor: `${r.vars.palette.general.gridHover} !important`,
176
- transition: "background-color 0.1s linear"
177
- }
178
- /* backgroundColor: theme.vars.palette.primary.primaryOpacity, */
179
- },
180
- backgroundColor: "transparent"
181
- },
182
- "& .rdg-cell": {
183
- transition: "background-color 0.1s linear",
184
- borderBottom: "0px solid transparent",
185
- borderRight: "0.5px solid transparent",
186
- borderColor: r.vars.palette.background.neutral,
187
- color: r.vars.palette.text.secondary,
188
- display: "inline",
189
- justifyContent: "center",
190
- alignItems: "center",
191
- textOverflow: "inline",
192
- gridTemplateColumns: "auto",
193
- "& .rdg-text-editor": {
194
- textAlign: "inherit",
195
- color: r.vars.palette.text.secondary,
196
- padding: "0 8px",
197
- lineHeight: "var(--rdg-row-height)!important",
198
- border: "0",
199
- borderTop: "0.5px solid",
200
- borderBottom: "1px solid",
201
- borderLeft: "0.5px solid",
202
- borderRight: "0.5px solid",
203
- borderColor: `${r.vars.palette?.border.disabled} !important`,
204
- ...r.colorSchemes.finalTheme.typography.body
205
- },
206
- "&.rdg-cell-frozen": {
207
- display: "flex",
208
- justifyContent: "center",
209
- alignItems: "center",
210
- boxShadow: "unset"
211
- },
212
- "&:after": {
213
- content: '""',
214
- borderRight: `0px solid ${r.vars.palette.divider}`,
215
- position: "absolute",
216
- right: "0px",
217
- // Por desajuste en chrome en el espaciado
218
- height: "100%"
219
- },
220
- "& .m4l_icon": {
221
- height: "100%"
222
- }
223
- },
224
- '& .rdg-cell[role="gridcell"]': {
225
- ...r.colorSchemes.finalTheme.typography.body,
226
- lineHeight: "var(--rdg-row-height)!important"
227
- },
228
- '& .rdg-cell[role="columnheader"] .rdg-header-sort-name': {
229
- ...r.colorSchemes.finalTheme.typography.bodyDens,
230
- lineHeight: "var(--rdg-row-height)!important",
231
- //ajuste de contenido filtro del DataGrid
232
- height: "28px",
233
- display: "flex",
234
- justifyContent: "center",
235
- alignItems: "center"
236
- },
237
- // Esta condicion para el flujo de cabecera cuando no tiene utilidad sort
238
- '& .rdg-cell[role="columnheader"] [draggable="true"]': {
239
- ...r.colorSchemes.finalTheme.typography.bodyDens,
240
- lineHeight: "var(--rdg-row-height)!important"
241
- },
242
- "& [aria-selected=true]": {
243
- backgroundColor: r.vars.palette.primary?.toneOpacity,
244
- color: r.vars.palette.text.primary,
245
- //cambia el color del contorno de cada celda selecionada
246
- outline: "1px solid",
247
- outlineOffset: "-1px",
248
- outlineColor: r.vars.palette.primary.focusVisible
249
- },
250
- // Alineaciones
251
- "& .rdg-cell.rdg-cell-align-left": {
252
- textAlign: "start",
253
- display: "inline",
254
- justifyContent: "center",
255
- alignItems: "center"
256
- },
257
- "& .rdg-cell.rdg-cell-align-center": {
258
- textAlign: "center",
259
- display: "flex"
260
- },
261
- "& .rdg-cell.rdg-cell-align-right": {
262
- textAlign: "right"
263
- },
264
- // Estilado de la ultima celda congelada
265
- "& .rdg-row .rdg-cell-frozen-last:after": {
266
- borderRight: "0px solid transparent"
267
- },
268
- // Estilado de la ultima celda (Quitar la linea divisora derecha)
269
- "& .rdg-row :last-child:after": {
270
- borderRight: "0px solid",
271
- borderColor: r.vars.palette.background.surface
272
- },
273
- "& .rdg-header-row": {
274
- backgroundColor: r.vars.palette.primary.opacity
275
- },
276
- // Estilado de celdas de la cabecera
277
- "& .rdg-header-row .rdg-cell": {
278
- fontFamily: r.typography.body,
279
- fontWeight: r.typography.body,
280
- fontSize: r.typography.body,
281
- color: r.vars.palette.text.primary,
282
- borderRight: "0.5px solid !important",
283
- boxShadow: "none",
284
- gridTemplateColumns: "auto",
285
- borderBottom: "0.5px solid !important",
286
- borderColor: `${r.vars.palette?.border.disabled} !important`,
287
- '& [draggable="true"]': {
288
- fontSize: r.typography.body
289
- },
290
- // Ultima celda de la cebecera frozen
291
- "&.rdg-cell-frozen-last": {
292
- borderColor: r.vars.palette.background.default,
293
- boxShadow: "var(--rdg-frozen-cell-box-shadow)",
294
- "&:after": {
295
- //borderRight: `1.5px solid`,
296
- //borderColor: theme.vars.palette.background.surface,
297
- }
298
- },
299
- "& .rdg-header-sort-cell": {
300
- "& .rdg-header-sort-name + span": {
301
- position: "absolute",
302
- margin: "auto",
303
- right: "5px",
304
- "& .rdg-sort-arrow": {
305
- width: "8px"
306
- }
307
- }
308
- },
309
- // Modificar el tamaño de la flecha
310
- "& .rdg-sort-arrow": {}
311
- },
312
- // Estilado de la ultima celda Header
313
- "& .rdg-header-row :last-child.rdg-cell": {
314
- borderTopRightRadius: "0",
315
- "&:after": {
316
- borderRight: "0px solid transparent"
317
- }
318
- },
319
- // filter
320
- "& .filter_cell_div": {
321
- paddingLeft: "8px",
322
- paddingRight: "8px"
323
- },
324
- //
325
- "& .rdg-header-sort-cell": {
326
- width: "100%",
327
- flexGrow: "1",
328
- alignItems: "center",
329
- color: r.vars.palette.text.primary
330
- }
331
- /* '& [aria-columnsort="ASC"]': {
332
- borderTop: `2px solid ${theme.vars.palette.primary.main}`,
333
- }, */
334
- /* '& [aria-columnsort="DESC"]': {
335
- borderBottom: `2px solid ${theme.vars.palette.primary.main}`,
336
- }, */
337
- }
338
- },
339
- /* Flujo sin paginador */
340
- "&.M4LDataGrid-withNoPager": {
341
- /* Por definir */
342
- }
343
- }
344
- }
345
- },
346
- M4LDataGridDensityPopover: {
347
- styleOverrides: {
348
- "&.M4LDataGrid-actionDensityPopover": {
349
- test: "root"
350
- }
351
- }
352
- },
353
- M4LDataGridActionsFormatter: {
354
- styleOverrides: {
355
- "&.M4LDataGrid-actionsFormatter": {
356
- test: "root",
357
- "& .MuiPaper-root": {
358
- gap: "4px",
359
- "& .MuiButtonBase-root": {
360
- minHeight: "24px",
361
- padding: "2px 4px",
362
- gap: "12px",
363
- "& .M4LIcon-root": {
364
- minHeight: "20px",
365
- minWidth: "20px"
366
- }
367
- }
368
- },
369
- [r.breakpoints.down("md")]: {
370
- "& .MuiPaper-root": {
371
- padding: "12px",
372
- "& .MuiButtonBase-root": {
373
- minHeight: "36px",
374
- padding: "2px 4px",
375
- gap: "16px",
376
- "& .M4LIcon-root": {
377
- minHeight: "28px",
378
- minWidth: "28px",
379
- "& .M4LIcon-icon": {
380
- minHeight: "20px",
381
- minWidth: "20px"
382
- }
383
- }
384
- }
385
- }
386
- }
387
- }
388
- }
389
- }
390
- });
391
- export {
392
- e as M
393
- };