@m4l/styles 6.1.1 → 6.2.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,260 @@
1
+ import { createTheme as i } from "@mui/material";
2
+ import { r as p, p as e } from "../utils/getFontValue-BEO-XID9.js";
3
+ const h = "Segoe UI, Poppins, sans-serif", n = i(), m = {
4
+ ...n.typography,
5
+ fontFamily: h,
6
+ fontWeightRegular: 400,
7
+ fontWeightMedium: 600,
8
+ fontWeightBold: 700,
9
+ /* Definindo en Patronus */
10
+ h1: {
11
+ fontWeight: 600,
12
+ lineHeight: 1.5,
13
+ ...p({ sm: 38, md: 38, lg: 38 })
14
+ },
15
+ h2: {
16
+ fontWeight: 600,
17
+ lineHeight: 1,
18
+ ...p({ sm: 40, md: 40, lg: 40 })
19
+ },
20
+ /* Definindo en Patronus */
21
+ h3: {
22
+ fontWeight: 600,
23
+ lineHeight: 1.5,
24
+ ...p({ sm: 30, md: 30, lg: 30 })
25
+ },
26
+ h4: {
27
+ fontWeight: 600,
28
+ lineHeight: 1.5,
29
+ ...p({ sm: 20, md: 20, lg: 20 })
30
+ },
31
+ /* Definindo en Patronus */
32
+ h5: {
33
+ fontWeight: 500,
34
+ lineHeight: "28px",
35
+ letterSpacing: "-0.01em",
36
+ ...p({ sm: 22, md: 22, lg: 22 })
37
+ },
38
+ h6: {
39
+ fontWeight: 500,
40
+ lineHeight: "24px",
41
+ letterSpacing: "-0.08em",
42
+ ...p({ sm: 18, md: 18, lg: 18 })
43
+ },
44
+ /* Definindo en Patronus */
45
+ subtitle: {
46
+ fontWeight: 400,
47
+ lineHeight: "20px",
48
+ letterSpacing: "-0.006em",
49
+ ...p({ sm: 15, md: 15, lg: 15 })
50
+ },
51
+ /* Definindo en Patronus */
52
+ subtitleDens: {
53
+ fontWeight: 600,
54
+ lineHeight: "24px",
55
+ letterSpacing: "-0.006em",
56
+ ...p({ sm: 15, md: 15, lg: 15 })
57
+ },
58
+ /* Definindo en Patronus */
59
+ paragraph: {
60
+ fontWeight: 400,
61
+ lineHeight: "16px",
62
+ letterSpacing: "-0.003em",
63
+ ...p({ sm: 13, md: 13, lg: 13 })
64
+ },
65
+ /* Definindo en Patronus */
66
+ paragraphDens: {
67
+ fontWeight: 600,
68
+ lineHeight: "20px",
69
+ letterSpacing: "-0.003em",
70
+ ...p({ sm: 13, md: 13, lg: 13 })
71
+ },
72
+ subtitle1: {
73
+ fontWeight: 600,
74
+ lineHeight: 1.5,
75
+ fontSize: e(14)
76
+ },
77
+ subtitle2: {
78
+ fontWeight: 600,
79
+ lineHeight: 1.5,
80
+ fontSize: e(12)
81
+ },
82
+ /* Definindo en Patronus */
83
+ body: {
84
+ fontWeight: 400,
85
+ lineHeight: "16px",
86
+ ...p({ sm: 11, md: 11, lg: 11 })
87
+ },
88
+ /* Definindo en Patronus */
89
+ bodyDens: {
90
+ fontWeight: 600,
91
+ lineHeight: "16px",
92
+ ...p({ sm: 11, md: 11, lg: 11 })
93
+ },
94
+ body0: {
95
+ lineHeight: 1.5,
96
+ fontWeight: 400,
97
+ fontSize: e(16)
98
+ },
99
+ body1: {
100
+ lineHeight: 1.5,
101
+ fontWeight: 400,
102
+ fontSize: e(14)
103
+ },
104
+ body2: {
105
+ lineHeight: 1.5,
106
+ fontWeight: 400,
107
+ fontSize: e(12)
108
+ },
109
+ caption: {
110
+ lineHeight: 1.5,
111
+ fontSize: e(11)
112
+ },
113
+ overline: {
114
+ fontWeight: 700,
115
+ lineHeight: 1.5,
116
+ fontSize: e(12),
117
+ textTransform: "uppercase"
118
+ },
119
+ button: {
120
+ fontWeight: 700,
121
+ lineHeight: 24 / 14,
122
+ fontSize: e(14),
123
+ textTransform: "capitalize"
124
+ },
125
+ /* Definindo en Patronus */
126
+ action: {
127
+ fontWeight: 600,
128
+ lineHeight: "16px",
129
+ ...p({ sm: 12, md: 12, lg: 12 })
130
+ }
131
+ }, g = {
132
+ lh1: "14px",
133
+ lh2: "16px",
134
+ lh3: "20px",
135
+ lh4: "24px",
136
+ lh5: "28px",
137
+ lh6: "32px"
138
+ }, o = {
139
+ regular: 500,
140
+ dens: 700,
141
+ number: 0
142
+ }, t = {
143
+ pt10: "10px",
144
+ pt11: "11px",
145
+ pt12: "12px",
146
+ pt13: "13px",
147
+ pt14: "14px",
148
+ pt15: "15px",
149
+ pt16: "16px",
150
+ pt17: "17px",
151
+ pt18: "18px",
152
+ pt19: "19px",
153
+ pt20: "20px",
154
+ pt21: "21px",
155
+ pt22: "22px",
156
+ pt23: "23px",
157
+ pt24: "24px",
158
+ pt25: "25px",
159
+ pt26: "26px",
160
+ pt27: "27px",
161
+ pt28: "28px",
162
+ pt29: "29px",
163
+ pt30: "30px",
164
+ pt31: "31px",
165
+ pt32: "32px",
166
+ pt33: "33px",
167
+ pt34: "34px",
168
+ pt35: "35px",
169
+ pt36: "36px",
170
+ pt37: "37px",
171
+ pt38: "38px",
172
+ pt39: "39px",
173
+ pt40: "40px",
174
+ pt41: "41px",
175
+ pt42: "42px",
176
+ pt43: "43px",
177
+ pt44: "44px",
178
+ pt45: "45px",
179
+ pt46: "46px",
180
+ pt47: "47px",
181
+ pt48: "48px",
182
+ pt49: "49px",
183
+ pt50: "50px",
184
+ pt51: "51px",
185
+ pt52: "52px",
186
+ pt53: "53px",
187
+ pt54: "54px",
188
+ pt55: "55px",
189
+ pt56: "56px",
190
+ pt57: "57px",
191
+ pt58: "58px",
192
+ pt59: "59px",
193
+ pt60: "60px"
194
+ }, l = {
195
+ small: {
196
+ h1: t.pt42,
197
+ h2: t.pt32,
198
+ h3: t.pt26,
199
+ h5: t.pt20,
200
+ subtitle: t.pt17,
201
+ paragraph: t.pt15,
202
+ body: t.pt13
203
+ },
204
+ medium: {
205
+ h1: t.pt44,
206
+ h2: t.pt32,
207
+ h3: t.pt28,
208
+ h5: t.pt20,
209
+ subtitle: t.pt18,
210
+ paragraph: t.pt15,
211
+ body: t.pt14
212
+ },
213
+ large: {
214
+ h1: t.pt45,
215
+ h2: t.pt33,
216
+ h3: t.pt29,
217
+ h5: t.pt21,
218
+ subtitle: t.pt19,
219
+ paragraph: t.pt16,
220
+ body: t.pt14
221
+ }
222
+ }, x = {
223
+ small: {
224
+ h1: t.pt54,
225
+ h2: t.pt42,
226
+ h3: t.pt30,
227
+ h5: t.pt26,
228
+ subtitle: t.pt14,
229
+ paragraph: t.pt12,
230
+ body: t.pt10
231
+ },
232
+ medium: {
233
+ h1: t.pt56,
234
+ h2: t.pt44,
235
+ h3: t.pt32,
236
+ h5: t.pt28,
237
+ subtitle: t.pt15,
238
+ paragraph: t.pt13,
239
+ body: t.pt11
240
+ },
241
+ large: {
242
+ h1: t.pt57,
243
+ h2: t.pt45,
244
+ h3: t.pt33,
245
+ h5: t.pt29,
246
+ subtitle: t.pt16,
247
+ paragraph: t.pt14,
248
+ body: t.pt12
249
+ }
250
+ }, r = {
251
+ mobile: l,
252
+ desktop: x,
253
+ lineHeight: g,
254
+ weight: o,
255
+ letterSpacing: 0.5
256
+ };
257
+ export {
258
+ r as T,
259
+ m as t
260
+ };
@@ -2,6 +2,7 @@ import { Breakpoints } from '@mui/material';
2
2
 
3
3
  import type { CustomShadowOptions } from '../theme';
4
4
  import type { BaseBorderRadius, Size } from '../theme/sizes/types';
5
+ import type { Typography } from '../theme/typography/types';
5
6
 
6
7
  declare module '@mui/material' {
7
8
  interface Color {
@@ -72,7 +73,7 @@ declare module '@mui/material/styles' {
72
73
  disabled: string;
73
74
  error: string;
74
75
  };
75
- default: PaletteColor;
76
+ default: PaletteColor;
76
77
  general: {
77
78
  scrollBar: string;
78
79
  gridHover: string;
package/types/types.d.ts CHANGED
@@ -79,7 +79,7 @@ export declare type ThemePaletteColors = Record<ThemeColorOptionsType, PaletteCo
79
79
  /**
80
80
  * Son las opcines de paleta de colores semánticos en formato PaletteColor
81
81
  */
82
- export declare type SemanticsPaletteColors = Record<SemanticColorOptionsType, PaletteColor>;
82
+ export declare type SemanticsPaletteColors = Record<SemanticColorOptionsType, Omit<PaletteColor, 'focusVisible'>>;
83
83
  /**
84
84
  * Es la configuración de color que se usa fabricar la paleta "default", se encuentra en formato PaletteColor.
85
85
  */
@@ -92,4 +92,4 @@ export declare type PresetsOptions = Array<{
92
92
  value: string;
93
93
  }>;
94
94
  export declare type ColorState = 'warning' | 'delete' | 'info' | 'success';
95
- export declare type OurTheme = Pick<Theme, 'palette' | 'typography' | 'customShadows' | 'stretch' | 'size'>;
95
+ export declare type OurTheme = Pick<Theme, 'palette' | 'typography' | 'customShadows' | 'stretch' | 'size' | 'typography'>;
@@ -1,4 +1,4 @@
1
- import { P as r } from "../theme/palette-voCQl3kP.js";
1
+ import { P as r } from "../theme/palette-C5yYre7Z.js";
2
2
  const o = "patronus", s = r[o];
3
3
  function n(t) {
4
4
  try {
@@ -1,10 +1,6 @@
1
1
  import type { ThemeColorOptionsType } from '../types';
2
2
  export declare const getPaletteByPreset: (presetColor: ThemeColorOptionsType) => {
3
3
  readonly light: {
4
- readonly info: import("@mui/material").PaletteColor;
5
- readonly success: import("@mui/material").PaletteColor;
6
- readonly warning: import("@mui/material").PaletteColor;
7
- readonly error: import("@mui/material").PaletteColor;
8
4
  readonly mode: "light";
9
5
  readonly common: import("@mui/material").CommonColors;
10
6
  readonly primary: {
@@ -61,12 +57,56 @@ export declare const getPaletteByPreset: (presetColor: ThemeColorOptionsType) =>
61
57
  readonly default: string;
62
58
  readonly transition: string;
63
59
  };
60
+ readonly info: {
61
+ readonly focusVisible: string;
62
+ readonly light: string;
63
+ readonly contrastText: string;
64
+ readonly main: string;
65
+ readonly dark: string;
66
+ readonly focusActive: string;
67
+ readonly hover: string;
68
+ readonly hoverOpacity: string;
69
+ readonly opacity: string;
70
+ readonly toneOpacity: string;
71
+ };
72
+ readonly success: {
73
+ readonly focusVisible: string;
74
+ readonly light: string;
75
+ readonly contrastText: string;
76
+ readonly main: string;
77
+ readonly dark: string;
78
+ readonly focusActive: string;
79
+ readonly hover: string;
80
+ readonly hoverOpacity: string;
81
+ readonly opacity: string;
82
+ readonly toneOpacity: string;
83
+ };
84
+ readonly warning: {
85
+ readonly focusVisible: string;
86
+ readonly light: string;
87
+ readonly contrastText: string;
88
+ readonly main: string;
89
+ readonly dark: string;
90
+ readonly focusActive: string;
91
+ readonly hover: string;
92
+ readonly hoverOpacity: string;
93
+ readonly opacity: string;
94
+ readonly toneOpacity: string;
95
+ };
96
+ readonly error: {
97
+ readonly focusVisible: string;
98
+ readonly light: string;
99
+ readonly contrastText: string;
100
+ readonly main: string;
101
+ readonly dark: string;
102
+ readonly focusActive: string;
103
+ readonly hover: string;
104
+ readonly hoverOpacity: string;
105
+ readonly opacity: string;
106
+ readonly toneOpacity: string;
107
+ };
64
108
  };
65
109
  readonly dark: {
66
- readonly info: import("@mui/material").PaletteColor;
67
- readonly success: import("@mui/material").PaletteColor;
68
- readonly warning: import("@mui/material").PaletteColor;
69
- readonly error: import("@mui/material").PaletteColor;
70
110
  readonly mode: "dark";
71
111
  readonly common: import("@mui/material").CommonColors;
72
112
  readonly primary: {
@@ -123,5 +163,53 @@ export declare const getPaletteByPreset: (presetColor: ThemeColorOptionsType) =>
123
163
  readonly default: string;
124
164
  readonly transition: string;
125
165
  };
166
+ readonly info: {
167
+ readonly focusVisible: string;
168
+ readonly light: string;
169
+ readonly contrastText: string;
170
+ readonly main: string;
171
+ readonly dark: string;
172
+ readonly focusActive: string;
173
+ readonly hover: string;
174
+ readonly hoverOpacity: string;
175
+ readonly opacity: string;
176
+ readonly toneOpacity: string;
177
+ };
178
+ readonly success: {
179
+ readonly focusVisible: string;
180
+ readonly light: string;
181
+ readonly contrastText: string;
182
+ readonly main: string;
183
+ readonly dark: string;
184
+ readonly focusActive: string;
185
+ readonly hover: string;
186
+ readonly hoverOpacity: string;
187
+ readonly opacity: string;
188
+ readonly toneOpacity: string;
189
+ };
190
+ readonly warning: {
191
+ readonly focusVisible: string;
192
+ readonly light: string;
193
+ readonly contrastText: string;
194
+ readonly main: string;
195
+ readonly dark: string;
196
+ readonly focusActive: string;
197
+ readonly hover: string;
198
+ readonly hoverOpacity: string;
199
+ readonly opacity: string;
200
+ readonly toneOpacity: string;
201
+ };
202
+ readonly error: {
203
+ readonly focusVisible: string;
204
+ readonly light: string;
205
+ readonly contrastText: string;
206
+ readonly main: string;
207
+ readonly dark: string;
208
+ readonly focusActive: string;
209
+ readonly hover: string;
210
+ readonly hoverOpacity: string;
211
+ readonly opacity: string;
212
+ readonly toneOpacity: string;
213
+ };
126
214
  };
127
215
  };
@@ -1,196 +0,0 @@
1
- import { createTheme as h, alpha as O } from "@mui/material/styles";
2
- import { t as p } from "./typography-BsOO459U.js";
3
- import { s as R, c as _ } from "./shadows-Cek_1mpN.js";
4
- import { C as i, D as l, B as s, P as m, a as e, S as d, G as n, b as c, c as x, d as b, e as f } from "./palette-voCQl3kP.js";
5
- import { g as S } from "../utils/getColorPresets-DgmrCj5l.js";
6
- const o = {
7
- light: {
8
- scrollBar: "#5663763D",
9
- gridHover: "#FCFCFC"
10
- },
11
- dark: {
12
- scrollBar: "#5663765D",
13
- gridHover: "#282E2E"
14
- }
15
- }, L = (a) => {
16
- const t = b?.[a], u = f?.[a];
17
- return {
18
- light: {
19
- mode: "light",
20
- common: i,
21
- primary: {
22
- ...t
23
- },
24
- default: {
25
- ...l,
26
- focusVisible: t.focusVisible,
27
- contrastText: s.onyx[20]
28
- },
29
- divider: s.coolGrey[20],
30
- text: {
31
- primary: s.onyx[20],
32
- secondary: s.coolGrey[50],
33
- disabled: s.oxford[30]
34
- },
35
- background: {
36
- default: s.marbleLight[10],
37
- neutral: s.marbleLight[30],
38
- surface: s.marbleLight[50],
39
- hover: l.hover,
40
- //por compatibilidad de mui
41
- paper: ""
42
- },
43
- border: {
44
- main: m[a]?.borderMainLight,
45
- default: e.oxford[40],
46
- secondary: e.oxford[30],
47
- dens: e.oxford[60],
48
- disabled: e.oxford[10],
49
- error: d.error.main
50
- },
51
- general: {
52
- scrollBar: o.light.scrollBar,
53
- gridHover: o.light.gridHover
54
- },
55
- grey: n,
56
- skeleton: {
57
- default: e.oxford[10],
58
- transition: e.oxford[20]
59
- },
60
- ...d
61
- },
62
- dark: {
63
- mode: "dark",
64
- common: i,
65
- primary: {
66
- ...t
67
- },
68
- default: {
69
- ...c,
70
- focusVisible: u?.focusVisible,
71
- contrastText: s.marbleLight[30]
72
- },
73
- text: {
74
- primary: s.marbleLight[30],
75
- secondary: s.coolGrey[20],
76
- disabled: s.coolGrey[50]
77
- },
78
- divider: s.coolGrey[80],
79
- background: {
80
- default: s.onyx[40],
81
- neutral: s.marbleLight[50],
82
- surface: s.marbleLight[60],
83
- hover: c.hover,
84
- //por compatibilidad de mui
85
- paper: ""
86
- },
87
- border: {
88
- main: m[a]?.borderMainDark,
89
- default: e.mint[50],
90
- secondary: e.mint[40],
91
- dens: e.mint[60],
92
- disabled: e.mint[20],
93
- error: x.error.main
94
- },
95
- general: {
96
- scrollBar: o.light.scrollBar,
97
- gridHover: o.light.gridHover
98
- },
99
- grey: n,
100
- skeleton: {
101
- default: e.mint[20],
102
- transition: e.mint[40]
103
- },
104
- ...x
105
- }
106
- };
107
- }, E = {
108
- r0: "0px",
109
- "r0.5": "2px",
110
- r1: "4px",
111
- "r1.5": "6px",
112
- r2: "8px",
113
- r3: "12px",
114
- r4: "16px"
115
- }, r = {
116
- sp0: "0px",
117
- "sp0.5": "2px",
118
- sp1: "4px",
119
- sp2: "8px",
120
- sp3: "12px",
121
- "sp3.5": "14px",
122
- sp4: "16px",
123
- sp5: "20px",
124
- sp6: "24px",
125
- sp7: "28px",
126
- sp8: "32px",
127
- sp9: "36px",
128
- sp10: "40px",
129
- "sp10.5": "42px",
130
- sp11: "44px",
131
- sp12: "48px",
132
- sp13: "52px",
133
- sp14: "56px",
134
- "sp14.5": "58px"
135
- }, y = {
136
- base: {
137
- small: r["sp3.5"],
138
- medium: r.sp4,
139
- large: r.sp5
140
- },
141
- action: {
142
- small: r.sp5,
143
- medium: r.sp6,
144
- large: r.sp8
145
- },
146
- container: {
147
- small: r.sp7,
148
- medium: r.sp8,
149
- large: r.sp9
150
- }
151
- }, C = {
152
- base: {
153
- small: r.sp5,
154
- medium: r.sp6,
155
- large: r.sp7
156
- },
157
- action: {
158
- small: r.sp7,
159
- medium: r.sp8,
160
- large: r.sp9
161
- },
162
- container: {
163
- small: r.sp9,
164
- medium: r.sp10,
165
- large: r.sp11
166
- }
167
- }, T = {
168
- desktop: {
169
- ...y
170
- },
171
- mobile: {
172
- ...C
173
- },
174
- borderRadius: {
175
- ...E
176
- }
177
- }, A = h(), g = L("patronus"), G = {
178
- ...p,
179
- ...R.light,
180
- ...g,
181
- customShadows: {
182
- primary: `0 8px 16px 0 ${O(S("patronus").main, 0.2)}`,
183
- ..._("light")
184
- },
185
- stretch: !0,
186
- palette: {
187
- ...A.palette,
188
- ...g.light
189
- },
190
- typography: p,
191
- size: T
192
- };
193
- export {
194
- G as O,
195
- L as g
196
- };