@m4l/graphics 7.2.1 → 7.2.2-BE20260202-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,264 @@
1
+ import { Theme } from '@mui/material/styles';
2
+ /**
3
+ * Genera los estilos globales para el popup del DateRangePicker de rsuite.
4
+ * Estos estilos se aplican globalmente a todos los popups de DateRangePicker.
5
+ * @param theme - Tema de MUI
6
+ * @returns Objeto con los estilos del popup
7
+ */
8
+ export declare function getDateRangePickerPopupGlobalStyles(theme: Theme): {
9
+ '.rs-picker-popup': {
10
+ backgroundColor: string;
11
+ borderRadius: string;
12
+ marginTop: string;
13
+ boxShadow: string;
14
+ color: string;
15
+ '& .rs-picker-daterange-header': {
16
+ fontSize: string;
17
+ lineHeight: string;
18
+ fontWeight: number;
19
+ letterSpacing: string;
20
+ color: string;
21
+ borderColor: string;
22
+ };
23
+ '& .rs-picker-daterange-calendar-group': {
24
+ '& .rs-calendar-header': {
25
+ '& .rs-btn-icon:not([data-with-text])': {
26
+ '&:hover': {
27
+ backgroundColor: string;
28
+ };
29
+ '&:active': {
30
+ backgroundColor: string;
31
+ };
32
+ '& svg': {
33
+ fill: string;
34
+ };
35
+ };
36
+ '& .rs-calendar-header-title': {
37
+ '&:hover': {
38
+ backgroundColor: string;
39
+ };
40
+ '&:active': {
41
+ backgroundColor: string;
42
+ };
43
+ fontSize: string;
44
+ lineHeight: string;
45
+ fontWeight: number;
46
+ letterSpacing: string;
47
+ color: string;
48
+ };
49
+ };
50
+ '& .rs-calendar:first-child': {
51
+ borderColor: string;
52
+ };
53
+ '& .rs-calendar-body': {
54
+ display: string;
55
+ alignItems: string;
56
+ justifyContent: string;
57
+ '& .rs-calendar-table': {
58
+ display: string;
59
+ flexDirection: string;
60
+ alignItems: string;
61
+ justifyContent: string;
62
+ gap: string;
63
+ '& .rs-calendar-table-header-row': {
64
+ display: string;
65
+ justifyContent: string;
66
+ width: string;
67
+ '& .rs-calendar-table-header-cell': {
68
+ width: string;
69
+ height: string;
70
+ '& .rs-calendar-table-header-cell-content': any;
71
+ };
72
+ };
73
+ };
74
+ '& .rs-calendar-table-cell': {
75
+ padding: string;
76
+ width: string;
77
+ height: string;
78
+ borderTop: string;
79
+ borderBottom: string;
80
+ '& .rs-calendar-table-cell-content': any;
81
+ '&.rs-calendar-table-cell-un-same-month': {
82
+ '& .rs-calendar-table-cell-content': {
83
+ '& .rs-calendar-table-cell-day': {
84
+ color: string;
85
+ };
86
+ };
87
+ };
88
+ '&.rs-calendar-table-cell-in-range': {
89
+ borderRadius: number;
90
+ borderTop: string;
91
+ borderBottom: string;
92
+ '&:before': {
93
+ height: string;
94
+ margin: string;
95
+ backgroundColor: string;
96
+ inset: number;
97
+ };
98
+ '& .rs-calendar-table-cell-content': {
99
+ backgroundColor: string;
100
+ };
101
+ };
102
+ '&.rs-calendar-table-cell-selected-start': {
103
+ borderTopLeftRadius: string;
104
+ borderBottomLeftRadius: string;
105
+ '& .rs-calendar-table-cell-content': {
106
+ boxShadow: string;
107
+ backgroundColor: string;
108
+ '&:hover': {
109
+ backgroundColor: string;
110
+ };
111
+ '&:active': {
112
+ backgroundColor: string;
113
+ };
114
+ };
115
+ };
116
+ '&.rs-calendar-table-cell-selected-end': {
117
+ borderTopRightRadius: string;
118
+ borderBottomRightRadius: string;
119
+ '& .rs-calendar-table-cell-content': {
120
+ boxShadow: string;
121
+ backgroundColor: string;
122
+ '&:hover': {
123
+ backgroundColor: string;
124
+ };
125
+ '&:active': {
126
+ backgroundColor: string;
127
+ };
128
+ };
129
+ };
130
+ };
131
+ };
132
+ '& .rs-calendar-month-dropdown': {
133
+ backgroundColor: string;
134
+ borderColor: string;
135
+ '& .rs-calendar-month-dropdown-row': {
136
+ borderColor: string;
137
+ '& .rs-calendar-month-dropdown-list': {
138
+ height: string;
139
+ };
140
+ '& .rs-calendar-month-dropdown-year': {
141
+ '&.rs-calendar-month-dropdown-year-active': {
142
+ color: string;
143
+ };
144
+ fontSize: string;
145
+ lineHeight: string;
146
+ fontWeight: number;
147
+ letterSpacing: string;
148
+ color: string;
149
+ };
150
+ '& .rs-calendar-month-dropdown-cell': {
151
+ display: string;
152
+ alignItems: string;
153
+ justifyContent: string;
154
+ '& .rs-calendar-month-dropdown-cell-content': {
155
+ '&:hover': {
156
+ backgroundColor: string;
157
+ color: string;
158
+ };
159
+ '&:active': {
160
+ backgroundColor: string;
161
+ color: string;
162
+ };
163
+ fontSize: string;
164
+ lineHeight: string;
165
+ fontWeight: number;
166
+ letterSpacing: string;
167
+ color: string;
168
+ };
169
+ '&.rs-calendar-month-dropdown-cell-active .rs-calendar-month-dropdown-cell-content': {
170
+ '&:hover': {
171
+ backgroundColor: string;
172
+ };
173
+ '&:active': {
174
+ backgroundColor: string;
175
+ };
176
+ fontSize: string;
177
+ lineHeight: string;
178
+ fontWeight: number;
179
+ letterSpacing: string;
180
+ backgroundColor: string;
181
+ color: string;
182
+ };
183
+ };
184
+ };
185
+ };
186
+ '& .rs-calendar-time-dropdown': {
187
+ backgroundColor: string;
188
+ borderColor: string;
189
+ '& .rs-calendar-time-dropdown-column-title': {
190
+ fontSize: string;
191
+ lineHeight: string;
192
+ fontWeight: number;
193
+ letterSpacing: string;
194
+ backgroundColor: string;
195
+ color: string;
196
+ };
197
+ '& .rs-scroll-view-custom-scrollbar': {
198
+ '& li': {
199
+ '& .rs-calendar-time-dropdown-cell': {
200
+ '&:hover': {
201
+ backgroundColor: string;
202
+ };
203
+ '&:active': {
204
+ backgroundColor: string;
205
+ };
206
+ '&.rs-calendar-time-dropdown-cell-active': {
207
+ backgroundColor: string;
208
+ color: string;
209
+ '&:hover': {
210
+ backgroundColor: string;
211
+ };
212
+ '&:active': {
213
+ backgroundColor: string;
214
+ };
215
+ };
216
+ fontSize: string;
217
+ lineHeight: string;
218
+ fontWeight: number;
219
+ letterSpacing: string;
220
+ borderRadius: string;
221
+ color: string;
222
+ };
223
+ };
224
+ };
225
+ };
226
+ '& .rs-calendar-btn-close': {
227
+ backgroundColor: string;
228
+ '&:hover': {
229
+ backgroundColor: string;
230
+ borderColor: string;
231
+ color: string;
232
+ };
233
+ '&:active': {
234
+ backgroundColor: string;
235
+ };
236
+ '& svg': {
237
+ fill: string;
238
+ };
239
+ };
240
+ '& .rs-calendar': {
241
+ borderColor: string;
242
+ };
243
+ };
244
+ '& .rs-picker-toolbar': {
245
+ backgroundColor: string;
246
+ borderColor: string;
247
+ display: string;
248
+ alignItems: string;
249
+ justifyContent: string;
250
+ '& .rs-btn': {
251
+ fontSize: string;
252
+ lineHeight: string;
253
+ fontWeight: number;
254
+ letterSpacing: string;
255
+ };
256
+ '& .rs-picker-toolbar-right': {
257
+ display: string;
258
+ alignItems: string;
259
+ justifyContent: string;
260
+ '& .rs-btn': any;
261
+ };
262
+ };
263
+ };
264
+ };
@@ -0,0 +1,319 @@
1
+ import { TYPOGRAPHY_SIZES_MOBILE as c, TYPOGRAPHY_SIZES_DESKTOP as i } from "@m4l/styles";
2
+ function l(r, a, o, e, n = "height") {
3
+ const d = r.vars.size[r.generalSettings.isMobile ? "mobile" : "desktop"][a][o], s = typeof e == "function" ? e(d) : e;
4
+ return {
5
+ [n]: d,
6
+ ...s
7
+ };
8
+ }
9
+ function t(r, a, o) {
10
+ return (r ? c : i)[a][o];
11
+ }
12
+ function b(r) {
13
+ const a = "medium", o = r.generalSettings.isMobile;
14
+ return {
15
+ // Estilos globales para el popup del DateRangePicker de rsuite
16
+ ".rs-picker-popup": {
17
+ backgroundColor: r.vars.palette.background.default,
18
+ borderRadius: r.vars.size.borderRadius.r3,
19
+ marginTop: r.vars.size.baseSpacings.sp1,
20
+ boxShadow: r.vars.customShadows.z4,
21
+ color: r.vars.palette.text.primary,
22
+ // Header
23
+ "& .rs-picker-daterange-header": {
24
+ color: r.vars.palette.text.primary,
25
+ borderColor: r.vars.palette.border.disabled,
26
+ ...t(o, a, "body")
27
+ },
28
+ // Body
29
+ "& .rs-picker-daterange-calendar-group": {
30
+ "& .rs-calendar-header": {
31
+ // arrow buttons
32
+ "& .rs-btn-icon:not([data-with-text])": {
33
+ "&:hover": {
34
+ backgroundColor: r.vars.palette.default.hoverOpacity
35
+ },
36
+ "&:active": {
37
+ backgroundColor: r.vars.palette.default.activeOpacity
38
+ },
39
+ "& svg": {
40
+ fill: r.vars.palette.text.primary
41
+ }
42
+ },
43
+ // button title month
44
+ "& .rs-calendar-header-title": {
45
+ color: r.vars.palette.text.primary,
46
+ ...t(o, a, "body"),
47
+ "&:hover": {
48
+ backgroundColor: r.vars.palette.default.hoverOpacity
49
+ },
50
+ "&:active": {
51
+ backgroundColor: r.vars.palette.default.activeOpacity
52
+ }
53
+ }
54
+ },
55
+ // calendar start
56
+ "& .rs-calendar:first-child": {
57
+ borderColor: r.vars.palette.border.disabled
58
+ },
59
+ // calendar body
60
+ "& .rs-calendar-body": {
61
+ display: "flex",
62
+ alignItems: "center",
63
+ justifyContent: "center",
64
+ "& .rs-calendar-table": {
65
+ display: "flex",
66
+ flexDirection: "column",
67
+ alignItems: "center",
68
+ justifyContent: "center",
69
+ gap: r.vars.size.baseSpacings["sp0-5"],
70
+ // table header
71
+ "& .rs-calendar-table-header-row": {
72
+ display: "flex",
73
+ justifyContent: "space-between",
74
+ width: "100%",
75
+ "& .rs-calendar-table-header-cell": {
76
+ width: "fit-content",
77
+ height: "fit-content",
78
+ "& .rs-calendar-table-header-cell-content": {
79
+ color: r.vars.palette.text.secondary,
80
+ ...t(o, a, "body"),
81
+ ...l(
82
+ r,
83
+ a,
84
+ "action",
85
+ (e) => ({
86
+ minWidth: e,
87
+ maxWidth: e,
88
+ height: "auto"
89
+ })
90
+ )
91
+ }
92
+ }
93
+ }
94
+ },
95
+ // button days
96
+ "& .rs-calendar-table-cell": {
97
+ padding: "1px",
98
+ width: "fit-content",
99
+ height: "fit-content",
100
+ borderTop: "1px dashed transparent",
101
+ borderBottom: "1px dashed transparent",
102
+ "& .rs-calendar-table-cell-content": {
103
+ transition: "all 0.3s ease",
104
+ borderRadius: r.vars.size.borderRadius.r2,
105
+ display: "flex",
106
+ alignItems: "center",
107
+ justifyContent: "center",
108
+ ...l(
109
+ r,
110
+ a,
111
+ "action",
112
+ (e) => ({
113
+ minHeight: e,
114
+ maxHeight: e,
115
+ minWidth: e,
116
+ maxWidth: e
117
+ })
118
+ ),
119
+ "&:hover": {
120
+ backgroundColor: r.vars.palette.default.hoverOpacity
121
+ },
122
+ "&:active": {
123
+ backgroundColor: r.vars.palette.default.activeOpacity
124
+ },
125
+ "& .rs-calendar-table-cell-day": {
126
+ ...t(o, a, "body")
127
+ }
128
+ },
129
+ "&.rs-calendar-table-cell-un-same-month": {
130
+ "& .rs-calendar-table-cell-content": {
131
+ "& .rs-calendar-table-cell-day": {
132
+ color: r.vars.palette.text.secondary
133
+ }
134
+ }
135
+ },
136
+ "&.rs-calendar-table-cell-in-range": {
137
+ borderRadius: 0,
138
+ borderTop: `1px dashed ${r.vars.palette.border.secondary}`,
139
+ borderBottom: `1px dashed ${r.vars.palette.border.secondary}`,
140
+ "&:before": {
141
+ height: "unset",
142
+ margin: "unset",
143
+ backgroundColor: r.vars.palette.default.hoverOpacity,
144
+ inset: 0
145
+ },
146
+ "& .rs-calendar-table-cell-content": {
147
+ backgroundColor: "transparent"
148
+ }
149
+ },
150
+ "&.rs-calendar-table-cell-selected-start": {
151
+ // Radio exterior = radio interior (r2 = 8px) + grosor del borde (1px) = 9px
152
+ // para que el contenido interno no se vea cortado en las esquinas
153
+ borderTopLeftRadius: `calc(${r.vars.size.borderRadius.r2} + 1px)`,
154
+ borderBottomLeftRadius: `calc(${r.vars.size.borderRadius.r2} + 1px)`,
155
+ "& .rs-calendar-table-cell-content": {
156
+ boxShadow: `0 0 0 1px ${r.vars.palette.primary.activeOpacity}`,
157
+ backgroundColor: r.vars.palette.primary.enabled,
158
+ "&:hover": {
159
+ backgroundColor: r.vars.palette.primary.hover
160
+ },
161
+ "&:active": {
162
+ backgroundColor: r.vars.palette.primary.active
163
+ }
164
+ }
165
+ },
166
+ "&.rs-calendar-table-cell-selected-end": {
167
+ // Radio exterior = radio interior (r2 = 8px) + grosor del borde (1px) = 9px
168
+ // para que el contenido interno no se vea cortado en las esquinas
169
+ borderTopRightRadius: `calc(${r.vars.size.borderRadius.r2} + 1px)`,
170
+ borderBottomRightRadius: `calc(${r.vars.size.borderRadius.r2} + 1px)`,
171
+ "& .rs-calendar-table-cell-content": {
172
+ boxShadow: `0 0 0 1px ${r.vars.palette.primary.activeOpacity}`,
173
+ backgroundColor: r.vars.palette.primary.enabled,
174
+ "&:hover": {
175
+ backgroundColor: r.vars.palette.primary.hover
176
+ },
177
+ "&:active": {
178
+ backgroundColor: r.vars.palette.primary.active
179
+ }
180
+ }
181
+ }
182
+ }
183
+ },
184
+ // calendar month dropdown
185
+ "& .rs-calendar-month-dropdown": {
186
+ backgroundColor: r.vars.palette.background.default,
187
+ borderColor: r.vars.palette.border.disabled,
188
+ "& .rs-calendar-month-dropdown-row": {
189
+ borderColor: r.vars.palette.border.disabled,
190
+ "& .rs-calendar-month-dropdown-list": {
191
+ height: "100%"
192
+ },
193
+ // year title
194
+ "& .rs-calendar-month-dropdown-year": {
195
+ color: r.vars.palette.text.primary,
196
+ ...t(o, a, "body"),
197
+ "&.rs-calendar-month-dropdown-year-active": {
198
+ color: r.vars.palette.primary.enabled
199
+ }
200
+ },
201
+ // month title
202
+ "& .rs-calendar-month-dropdown-cell": {
203
+ display: "flex",
204
+ alignItems: "center",
205
+ justifyContent: "center",
206
+ "& .rs-calendar-month-dropdown-cell-content": {
207
+ color: r.vars.palette.text.primary,
208
+ ...t(o, a, "body"),
209
+ "&:hover": {
210
+ backgroundColor: r.vars.palette.default.hoverOpacity,
211
+ color: r.vars.palette.primary.enabled
212
+ },
213
+ "&:active": {
214
+ backgroundColor: r.vars.palette.default.activeOpacity,
215
+ color: r.vars.palette.primary.enabled
216
+ }
217
+ },
218
+ "&.rs-calendar-month-dropdown-cell-active .rs-calendar-month-dropdown-cell-content": {
219
+ backgroundColor: r.vars.palette.primary.enabled,
220
+ color: r.vars.palette.primary.contrastText,
221
+ ...t(o, a, "body"),
222
+ "&:hover": {
223
+ backgroundColor: r.vars.palette.primary.hover
224
+ },
225
+ "&:active": {
226
+ backgroundColor: r.vars.palette.primary.active
227
+ }
228
+ }
229
+ }
230
+ }
231
+ },
232
+ // calendar hours dropdown
233
+ "& .rs-calendar-time-dropdown": {
234
+ backgroundColor: r.vars.palette.background.default,
235
+ borderColor: r.vars.palette.border.disabled,
236
+ "& .rs-calendar-time-dropdown-column-title": {
237
+ backgroundColor: "transparent",
238
+ color: r.vars.palette.text.primary,
239
+ ...t(o, a, "body")
240
+ },
241
+ "& .rs-scroll-view-custom-scrollbar": {
242
+ "& li": {
243
+ "& .rs-calendar-time-dropdown-cell": {
244
+ borderRadius: r.vars.size.borderRadius.r2,
245
+ color: r.vars.palette.text.primary,
246
+ ...t(o, a, "body"),
247
+ "&:hover": {
248
+ backgroundColor: r.vars.palette.default.hoverOpacity
249
+ },
250
+ "&:active": {
251
+ backgroundColor: r.vars.palette.default.activeOpacity
252
+ },
253
+ "&.rs-calendar-time-dropdown-cell-active": {
254
+ backgroundColor: r.vars.palette.primary.enabled,
255
+ color: r.vars.palette.primary.contrastText,
256
+ "&:hover": {
257
+ backgroundColor: r.vars.palette.primary.hover
258
+ },
259
+ "&:active": {
260
+ backgroundColor: r.vars.palette.primary.active
261
+ }
262
+ }
263
+ }
264
+ }
265
+ }
266
+ },
267
+ // calendar close button dropdown
268
+ "& .rs-calendar-btn-close": {
269
+ backgroundColor: r.vars.palette.background.default,
270
+ "&:hover": {
271
+ backgroundColor: r.vars.palette.background.hover,
272
+ borderColor: r.vars.palette.border.disabled,
273
+ color: r.vars.palette.text.primary
274
+ },
275
+ "&:active": {
276
+ backgroundColor: r.vars.palette.background.hover
277
+ },
278
+ "& svg": {
279
+ fill: r.vars.palette.text.primary
280
+ }
281
+ },
282
+ "& .rs-calendar": {
283
+ borderColor: r.vars.palette.border.disabled
284
+ }
285
+ },
286
+ // toolbar
287
+ "& .rs-picker-toolbar": {
288
+ backgroundColor: r.vars.palette.background.default,
289
+ borderColor: r.vars.palette.border.disabled,
290
+ display: "flex",
291
+ alignItems: "center",
292
+ justifyContent: "space-between",
293
+ "& .rs-btn": {
294
+ ...t(o, a, "body")
295
+ },
296
+ "& .rs-picker-toolbar-right": {
297
+ display: "flex",
298
+ alignItems: "center",
299
+ justifyContent: "center",
300
+ "& .rs-btn": {
301
+ backgroundColor: r.vars.palette.primary.enabled,
302
+ borderRadius: r.vars.size.borderRadius["r1-5"],
303
+ color: r.vars.palette.primary.contrastText,
304
+ ...l(r, a, "action"),
305
+ "&:hover": {
306
+ backgroundColor: r.vars.palette.primary.hover
307
+ },
308
+ "&:active": {
309
+ backgroundColor: r.vars.palette.primary.active
310
+ }
311
+ }
312
+ }
313
+ }
314
+ }
315
+ };
316
+ }
317
+ export {
318
+ b as g
319
+ };