@m4l/styles 7.1.15 → 7.1.19

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/index.js CHANGED
@@ -1,39 +1,52 @@
1
- import { D as r, g as s, m as t } from "./config.js";
1
+ import { D as e, g as s, m as t } from "./config.js";
2
2
  import { c as p, s as m } from "./theme/shadows.js";
3
- import { f as x } from "./theme/overrides/index.js";
4
- import { B as O } from "./theme/palette/baseColors.js";
5
- import { B as S } from "./theme/palette/baseOpacityColors.js";
6
- import { C as n } from "./theme/palette/commonColors.js";
7
- import { G as l } from "./theme/palette/greyPalette.js";
8
- import { p as P } from "./theme/palette/presetColors.js";
9
- import { t as _ } from "./theme/typography.js";
10
- import { u as A } from "./utils/useResponsive.js";
11
- import { D as L, d, g as h } from "./utils/getColorPresets.js";
12
- import { p as v, r as y, a as F } from "./utils/getFontValue.js";
13
- import { g as U } from "./utils/getColorState.js";
14
- import { g as w } from "./utils/getPaletteByPreset.js";
15
- import { g as G } from "./utils/getUserThemeOptions.js";
3
+ import { f as E } from "./theme/overrides/index.js";
4
+ import { B as S } from "./theme/palette/baseColors.js";
5
+ import { B as O } from "./theme/palette/baseOpacityColors.js";
6
+ import { C as P } from "./theme/palette/commonColors.js";
7
+ import { G as A } from "./theme/palette/greyPalette.js";
8
+ import { p as R } from "./theme/palette/presetColors.js";
9
+ import { B as i } from "./theme/typography/baseFontSize.js";
10
+ import { B as n } from "./theme/typography/baseLetterSpacing.js";
11
+ import { B as L } from "./theme/typography/baseLineHeight.js";
12
+ import { B as Y } from "./theme/typography/baseWeight.js";
13
+ import { T as u } from "./theme/typography/typography.js";
14
+ import { a as D, T as h } from "./theme/typography/typographySizes.js";
15
+ import { t as M } from "./theme/typographyOld.js";
16
+ import { u as Z } from "./utils/useResponsive.js";
17
+ import { D as y, d as U, g as c } from "./utils/getColorPresets.js";
18
+ import { p as z, r as b, a as k } from "./utils/getFontValue.js";
19
+ import { g as V } from "./utils/getColorState.js";
20
+ import { g as j } from "./utils/getPaletteByPreset.js";
21
+ import { g as J } from "./utils/getUserThemeOptions.js";
16
22
  export {
17
- O as BASE_COLORS,
18
- S as BASE_OPACITY_COLORS,
19
- n as COMMON_COLORS,
20
- L as DEFAULT_PRESET,
21
- r as DEFAULT_SIZE,
22
- l as GREY_PALETTE,
23
+ S as BASE_COLORS,
24
+ i as BASE_FONT_SIZE,
25
+ n as BASE_LETTER_SPACING,
26
+ L as BASE_LINE_HEIGHT,
27
+ O as BASE_OPACITY_COLORS,
28
+ Y as BASE_WEIGHT,
29
+ P as COMMON_COLORS,
30
+ y as DEFAULT_PRESET,
31
+ e as DEFAULT_SIZE,
32
+ A as GREY_PALETTE,
33
+ u as TYPOGRAPHY,
34
+ D as TYPOGRAPHY_SIZES_DESKTOP,
35
+ h as TYPOGRAPHY_SIZES_MOBILE,
23
36
  p as createCustomShadows,
24
- d as defaultPresetColors,
25
- x as fnComponentsOverrides,
26
- h as getColorPresets,
27
- U as getColorState,
28
- w as getPaletteByPreset,
29
- G as getUserThemeOptions,
37
+ U as defaultPresetColors,
38
+ E as fnComponentsOverrides,
39
+ c as getColorPresets,
40
+ V as getColorState,
41
+ j as getPaletteByPreset,
42
+ J as getUserThemeOptions,
30
43
  s as globalRemSize,
31
44
  t as muiBreakpointsValues,
32
- P as presetsOptionsMainColor,
33
- v as pxToRem,
34
- y as remToPx,
35
- F as responsiveFontSizes,
45
+ R as presetsOptionsMainColor,
46
+ z as pxToRem,
47
+ b as remToPx,
48
+ k as responsiveFontSizes,
36
49
  m as shadows,
37
- _ as typography,
38
- A as useResponsive
50
+ M as typographyOld,
51
+ Z as useResponsive
39
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/styles",
3
- "version": "7.1.15",
3
+ "version": "7.1.19",
4
4
  "license": "UNLICENSED",
5
5
  "author": "m4l team",
6
6
  "publishConfig": {
package/theme/index.d.ts CHANGED
@@ -2,6 +2,6 @@ export type { CustomShadowOptions } from './shadows';
2
2
  export { shadows, createCustomShadows } from './shadows';
3
3
  export * from './palette';
4
4
  export * from './typography';
5
- export type { M4LTypographyVariants } from './typography';
5
+ export * from './typographyOld';
6
6
  export * from './sizes';
7
7
  export { fnComponentsOverrides } from './overrides';
@@ -15,6 +15,7 @@ export interface CustomShadowOptions {
15
15
  dropdown: string;
16
16
  innerShadowContainer: string;
17
17
  innerShadowOutlinedText: string;
18
+ innerShadowText: string;
18
19
  }
19
20
  /**
20
21
  * Create custom shadows for the theme
package/theme/shadows.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import { alpha as x } from "@mui/material/styles";
2
2
  import { G as r } from "./palette/greyPalette.js";
3
- import { B as e } from "./palette/baseColors.js";
4
- import { C as o } from "./palette/commonColors.js";
5
- const s = r[500], i = "#000000", a = (t) => {
3
+ import { B as o } from "./palette/baseColors.js";
4
+ import { C as s } from "./palette/commonColors.js";
5
+ import { B as e } from "./palette/baseOpacityColors.js";
6
+ const i = r[500], d = "#000000", a = (t) => {
6
7
  const p = x(t, 0.2), $ = x(t, 0.14), n = x(t, 0.12);
7
8
  return [
8
9
  "none",
@@ -31,19 +32,19 @@ const s = r[500], i = "#000000", a = (t) => {
31
32
  `0px 11px 14px -7px ${p},0px 23px 36px 3px ${$},0px 9px 44px 8px ${n}`,
32
33
  `0px 11px 15px -7px ${p},0px 24px 38px 3px ${$},0px 9px 46px 8px ${n}`
33
34
  ];
34
- }, O = (t) => {
35
+ }, h = (t) => {
35
36
  const p = {
36
- info: `0px 2px 8px 0px ${x(e.patronusBlue[50], 0.2)}`,
37
- secondary: `0px 2px 8px 0px ${x(e.patronusBlue[50], 0.24)}`,
38
- success: `0px 2px 8px 0px ${x(e.acidGreen[50], 0.2)}`,
39
- warning: `0px 2px 8px 0px ${x(e.middleYellow[50], 0.2)}`,
40
- error: `0px 2px 8px 0px ${x(e.flameRed[50], 0.2)}`,
37
+ info: `0px 2px 8px 0px ${x(o.patronusBlue[50], 0.2)}`,
38
+ secondary: `0px 2px 8px 0px ${x(o.patronusBlue[50], 0.24)}`,
39
+ success: `0px 2px 8px 0px ${x(o.acidGreen[50], 0.2)}`,
40
+ warning: `0px 2px 8px 0px ${x(o.middleYellow[50], 0.2)}`,
41
+ error: `0px 2px 8px 0px ${x(o.flameRed[50], 0.2)}`,
41
42
  //
42
43
  card: `0 0 2px 0 ${x(r[500], 0.2)}, 0 12px 24px -4px ${x(
43
44
  r[500],
44
45
  0.12
45
46
  )}`,
46
- dialog: `-40px 40px 80px -8px ${x(o.black, 0.24)}`,
47
+ dialog: `-40px 40px 80px -8px ${x(s.black, 0.24)}`,
47
48
  dropdown: `0 0 2px 0 ${x(r[500], 0.24)}, -20px 20px 40px -4px ${x(
48
49
  r[500],
49
50
  0.24
@@ -58,8 +59,9 @@ const s = r[500], i = "#000000", a = (t) => {
58
59
  // todo: solicitar a diseño crear token en base porque está quemado
59
60
  z4: `0px 12px 32px 4px ${x("#243B46", 0.12)}`,
60
61
  // todo: solicitar a diseño crear token en base porque está quemado
61
- innerShadowContainer: `2px 2px 4px 1px ${x("#1C2121", 0.7)} inset`,
62
- innerShadowOutlinedText: `2px 2px 4px 1px ${x("#1C2121", 0.4)} inset`,
62
+ innerShadowContainer: `2px 2px 4px 1px ${x(e.onyx[80] || "#1C2121", 0.6)} inset`,
63
+ innerShadowOutlinedText: `2px 2px 6px 2px ${x(e.onyx[80] || "#1C2121", 0.48)} inset`,
64
+ innerShadowText: `2px 2px 4px 2px ${x(e.onyx[80] || "#1C2121", 0.16)} inset`,
63
65
  ...p
64
66
  } : {
65
67
  z1: `0px 2px 2px 2px ${x("#000000", 0.16)}`,
@@ -70,15 +72,16 @@ const s = r[500], i = "#000000", a = (t) => {
70
72
  // todo: solicitar a diseño crear token en base porque está quemado
71
73
  z4: `0px 12px 32px 4px ${x("#09090A", 0.35)}`,
72
74
  // todo: solicitar a diseño crear token en base porque está quemado
73
- innerShadowContainer: `2px 2px 4px 1px ${x("#1C2121", 0.9)} inset`,
74
- innerShadowOutlinedText: `2px 2px 4px 1px ${x("#1C2121", 0.4)} inset`,
75
+ innerShadowContainer: `3px 3px 4px 1px ${x(e.onyx[80] || "#1C2121", 0.72)} inset`,
76
+ innerShadowOutlinedText: `3px 3px 6px 2px ${x(e.onyx[80] || "#1C2121", 0.72)} inset`,
77
+ innerShadowText: `2px 2px 4px 2px ${x(e.onyx[80] || "#1C2121", 0.72)} inset`,
75
78
  ...p
76
79
  };
77
- }, m = {
78
- light: a(s),
79
- dark: a(i)
80
+ }, l = {
81
+ light: a(i),
82
+ dark: a(d)
80
83
  };
81
84
  export {
82
- O as c,
83
- m as s
85
+ h as c,
86
+ l as s
84
87
  };
@@ -0,0 +1,7 @@
1
+ export * from './baseFontSize';
2
+ export * from './baseLetterSpacing';
3
+ export * from './baseLineHeight';
4
+ export * from './baseWeight';
5
+ export * from './types';
6
+ export * from './typography';
7
+ export * from './typographySizes';
@@ -0,0 +1 @@
1
+
@@ -112,3 +112,9 @@ export interface Typography {
112
112
  weight: BaseWeight;
113
113
  letterSpacing: string;
114
114
  }
115
+ export type FontProps = {
116
+ fontSize: string;
117
+ fontWeight: number;
118
+ lineHeight: string;
119
+ letterSpacing: string;
120
+ };
@@ -0,0 +1 @@
1
+
@@ -1,27 +1,12 @@
1
- export type FontProps = {
2
- fontSize: string;
3
- fontWeight: number;
4
- lineHeight: string;
5
- letterSpacing: string;
6
- };
7
- /**
8
- * Listas de variantes de tipografía disponibles para la aplicación web.
9
- */
10
- export type M4LTypographyVariants = 'h1' | 'h2' | 'h3' | 'h5' | 'subtitle' | 'subtitleDens' | 'paragraph' | 'paragraphDens' | 'body' | 'bodyDens';
11
- export interface TypographyVariants {
12
- subtitle: FontProps;
13
- subtitleDens: FontProps;
14
- paragraph: FontProps;
15
- paragraphDens: FontProps;
16
- body: FontProps;
17
- bodyDens: FontProps;
18
- action: FontProps;
19
- }
20
- export declare const typography: {
1
+ export declare const typographyOld: {
21
2
  readonly fontFamily: "Inter, Segoe UI, Poppins, sans-serif";
22
3
  readonly fontWeightRegular: 400;
23
4
  readonly fontWeightMedium: 600;
24
5
  readonly fontWeightBold: 700;
6
+ readonly fontSize: 14;
7
+ readonly fontWeightLight: 300;
8
+ readonly htmlFontSize: 16;
9
+ readonly pxToRem: (size: number) => string;
25
10
  readonly h1: {
26
11
  readonly '@media (min-width:0px)': {
27
12
  fontSize: string;
@@ -1,11 +1,15 @@
1
1
  import { a as e, p as t } from "../utils/getFontValue.js";
2
- const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
2
+ const n = "Inter, Segoe UI, Poppins, sans-serif", o = {
3
3
  // ...baseTheme.typography,
4
- fontFamily: i,
4
+ fontFamily: n,
5
5
  fontWeightRegular: 400,
6
6
  fontWeightMedium: 600,
7
7
  fontWeightBold: 700,
8
- /* Definindo en Patronus */
8
+ fontSize: 14,
9
+ fontWeightLight: 300,
10
+ htmlFontSize: 16,
11
+ pxToRem: (i) => `${i / 16}rem`,
12
+ // Definindo en Patronus
9
13
  h1: {
10
14
  fontWeight: 600,
11
15
  lineHeight: 1.5,
@@ -16,7 +20,7 @@ const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
16
20
  lineHeight: 1,
17
21
  ...e({ sm: 40, md: 40, lg: 40 })
18
22
  },
19
- /* Definindo en Patronus */
23
+ // Definindo en Patronus
20
24
  h3: {
21
25
  fontWeight: 600,
22
26
  lineHeight: 1.5,
@@ -27,7 +31,7 @@ const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
27
31
  lineHeight: 1.5,
28
32
  ...e({ sm: 20, md: 20, lg: 20 })
29
33
  },
30
- /* Definindo en Patronus */
34
+ // Definindo en Patronus
31
35
  h5: {
32
36
  fontWeight: 500,
33
37
  lineHeight: "28px",
@@ -40,28 +44,28 @@ const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
40
44
  letterSpacing: "-0.08em",
41
45
  ...e({ sm: 18, md: 18, lg: 18 })
42
46
  },
43
- /* Definindo en Patronus */
47
+ // Definindo en Patronus
44
48
  subtitle: {
45
49
  fontWeight: 400,
46
50
  lineHeight: "20px",
47
51
  letterSpacing: "-0.006em",
48
52
  ...e({ sm: 15, md: 15, lg: 15 })
49
53
  },
50
- /* Definindo en Patronus */
54
+ // Definindo en Patronus
51
55
  subtitleDens: {
52
56
  fontWeight: 600,
53
57
  lineHeight: "24px",
54
58
  letterSpacing: "-0.006em",
55
59
  ...e({ sm: 15, md: 15, lg: 15 })
56
60
  },
57
- /* Definindo en Patronus */
61
+ // Definindo en Patronus
58
62
  paragraph: {
59
63
  fontWeight: 400,
60
64
  lineHeight: "16px",
61
65
  letterSpacing: "-0.003em",
62
66
  ...e({ sm: 13, md: 13, lg: 13 })
63
67
  },
64
- /* Definindo en Patronus */
68
+ // Definindo en Patronus
65
69
  paragraphDens: {
66
70
  fontWeight: 600,
67
71
  lineHeight: "20px",
@@ -78,13 +82,13 @@ const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
78
82
  lineHeight: 1.5,
79
83
  fontSize: t(12)
80
84
  },
81
- /* Definindo en Patronus */
85
+ // Definindo en Patronus
82
86
  body: {
83
87
  fontWeight: 400,
84
88
  lineHeight: "16px",
85
89
  ...e({ sm: 11, md: 11, lg: 11 })
86
90
  },
87
- /* Definindo en Patronus */
91
+ // Definindo en Patronus
88
92
  bodyDens: {
89
93
  fontWeight: 600,
90
94
  lineHeight: "16px",
@@ -121,7 +125,7 @@ const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
121
125
  fontSize: t(14),
122
126
  textTransform: "capitalize"
123
127
  },
124
- /* Definindo en Patronus */
128
+ // Definindo en Patronus
125
129
  action: {
126
130
  fontWeight: 600,
127
131
  lineHeight: "16px",
@@ -129,5 +133,5 @@ const i = "Inter, Segoe UI, Poppins, sans-serif", g = {
129
133
  }
130
134
  };
131
135
  export {
132
- g as t
136
+ o as t
133
137
  };
@@ -35,7 +35,7 @@ const l = {
35
35
  text: {
36
36
  primary: s.onyx[20],
37
37
  secondary: s.coolGrey[50],
38
- disabled: s.oxford[30]
38
+ disabled: s.coolGrey[10]
39
39
  },
40
40
  background: {
41
41
  default: s.marbleLight[10],
@@ -1,5 +1,5 @@
1
1
  import { createTheme as p, alpha as s } from "@mui/material";
2
- import { t as o } from "../theme/typography.js";
2
+ import { t as o } from "../theme/typographyOld.js";
3
3
  import { s as e, c as m } from "../theme/shadows.js";
4
4
  import { S as i } from "../theme/sizes/size.js";
5
5
  import { g } from "./getColorPresets.js";