@m4l/styles 7.1.5 → 7.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/styles",
3
- "version": "7.1.5",
3
+ "version": "7.1.6",
4
4
  "license": "UNLICENSED",
5
5
  "author": "m4l team",
6
6
  "publishConfig": {
@@ -0,0 +1,9 @@
1
+ import { BaseChipColors } from '../../types';
2
+ /**
3
+ * Lista de colores definidos para pintar los tags en modo light
4
+ */
5
+ export declare const BASE_TAG_OBJECT_COLORS_LIGHT: BaseChipColors;
6
+ /**
7
+ * Lista de colores definidos para pintar los tags en modo light
8
+ */
9
+ export declare const BASE_TAG_OBJECT_COLORS_DARK: BaseChipColors;
@@ -0,0 +1,117 @@
1
+ import { B as o } from "./baseColors.js";
2
+ import { B as r } from "./baseOpacityColors.js";
3
+ const e = {
4
+ default: {
5
+ contrastText: o.marbleLight[10],
6
+ backgroundColor: o.oxford[40],
7
+ backgroundHover: o.oxford[60],
8
+ backgroundActive: o.oxford[70]
9
+ },
10
+ warning: {
11
+ contrastText: o.onyx[20],
12
+ backgroundColor: o.middleYellow[40],
13
+ backgroundHover: o.middleYellow[60],
14
+ backgroundActive: o.middleYellow[70]
15
+ },
16
+ warningOpacity: {
17
+ contrastText: o.onyx[20],
18
+ backgroundColor: r.middle[40],
19
+ backgroundHover: r.middle[60],
20
+ backgroundActive: r.middle[70]
21
+ },
22
+ error: {
23
+ contrastText: o.marbleLight[30],
24
+ backgroundColor: o.flameRed[50],
25
+ backgroundHover: o.flameRed[60],
26
+ backgroundActive: o.flameRed[70]
27
+ },
28
+ errorOpacity: {
29
+ contrastText: o.onyx[20],
30
+ backgroundColor: r.flame[30],
31
+ backgroundHover: r.flame[50],
32
+ backgroundActive: r.flame[70]
33
+ },
34
+ success: {
35
+ contrastText: o.marbleLight[30],
36
+ backgroundColor: o.acidGreen[50],
37
+ backgroundHover: o.acidGreen[60],
38
+ backgroundActive: o.acidGreen[70]
39
+ },
40
+ successOpacity: {
41
+ contrastText: o.onyx[20],
42
+ backgroundColor: r.acid[20],
43
+ backgroundHover: r.acid[40],
44
+ backgroundActive: r.acid[70]
45
+ },
46
+ info: {
47
+ contrastText: o.marbleLight[30],
48
+ backgroundColor: o.crayonBlue[50],
49
+ backgroundHover: o.crayonBlue[60],
50
+ backgroundActive: o.crayonBlue[70]
51
+ },
52
+ infoOpacity: {
53
+ contrastText: o.onyx[20],
54
+ backgroundColor: r.crayon[20],
55
+ backgroundHover: r.crayon[40],
56
+ backgroundActive: r.crayon[60]
57
+ }
58
+ }, n = {
59
+ default: {
60
+ contrastText: o.marbleLight[10],
61
+ backgroundColor: o.oxford[40],
62
+ backgroundHover: o.oxford[60],
63
+ backgroundActive: o.oxford[70]
64
+ },
65
+ warning: {
66
+ contrastText: o.onyx[20],
67
+ backgroundColor: o.middleYellow[40],
68
+ backgroundHover: o.middleYellow[60],
69
+ backgroundActive: o.middleYellow[70]
70
+ },
71
+ warningOpacity: {
72
+ contrastText: o.marbleLight[30],
73
+ backgroundColor: r.middle[40],
74
+ backgroundHover: r.middle[60],
75
+ backgroundActive: r.middle[70]
76
+ },
77
+ error: {
78
+ contrastText: o.marbleLight[30],
79
+ backgroundColor: o.flameRed[50],
80
+ backgroundHover: o.flameRed[60],
81
+ backgroundActive: o.flameRed[70]
82
+ },
83
+ errorOpacity: {
84
+ contrastText: o.marbleLight[30],
85
+ backgroundColor: r.flame[30],
86
+ backgroundHover: r.flame[60],
87
+ backgroundActive: r.flame[70]
88
+ },
89
+ success: {
90
+ contrastText: o.marbleLight[30],
91
+ backgroundColor: o.acidGreen[50],
92
+ backgroundHover: o.acidGreen[60],
93
+ backgroundActive: o.acidGreen[70]
94
+ },
95
+ successOpacity: {
96
+ contrastText: o.marbleLight[30],
97
+ backgroundColor: r.acid[20],
98
+ backgroundHover: r.acid[40],
99
+ backgroundActive: r.acid[70]
100
+ },
101
+ info: {
102
+ contrastText: o.marbleLight[30],
103
+ backgroundColor: o.crayonBlue[50],
104
+ backgroundHover: o.crayonBlue[60],
105
+ backgroundActive: o.crayonBlue[70]
106
+ },
107
+ infoOpacity: {
108
+ contrastText: o.marbleLight[20],
109
+ backgroundColor: r.crayon[30],
110
+ backgroundHover: r.crayon[50],
111
+ backgroundActive: r.crayon[70]
112
+ }
113
+ };
114
+ export {
115
+ e as B,
116
+ n as a
117
+ };
@@ -21,7 +21,7 @@ const i = {
21
21
  opacityActiveDark: a.crayon[40]
22
22
  },
23
23
  warning: {
24
- main: t.middleYellow[50],
24
+ main: t.middleYellow[60],
25
25
  lighter: t.middleYellow[90],
26
26
  light: t.middleYellow[70],
27
27
  dark: t.middleYellow[30],
@@ -13,6 +13,8 @@ export interface CustomShadowOptions {
13
13
  card: string;
14
14
  dialog: string;
15
15
  dropdown: string;
16
+ innerShadowContainer: string;
17
+ innerShadowOutlinedText: string;
16
18
  }
17
19
  /**
18
20
  * Create custom shadows for the theme
package/theme/shadows.js CHANGED
@@ -1,80 +1,84 @@
1
- import { alpha as r } from "@mui/material/styles";
2
- import { G as a } from "./palette/greyPalette.js";
3
- import { B as s } from "./palette/baseColors.js";
1
+ import { alpha as x } from "@mui/material/styles";
2
+ import { G as r } from "./palette/greyPalette.js";
3
+ import { B as e } from "./palette/baseColors.js";
4
4
  import { C as o } from "./palette/commonColors.js";
5
- const e = a[500], c = "#000000", n = (t) => {
6
- const p = r(t, 0.2), x = r(t, 0.14), $ = r(t, 0.12);
5
+ const s = r[500], i = "#000000", a = (t) => {
6
+ const p = x(t, 0.2), $ = x(t, 0.14), n = x(t, 0.12);
7
7
  return [
8
8
  "none",
9
- `0px 2px 1px -1px ${p},0px 1px 1px 0px ${x},0px 1px 3px 0px ${$}`,
10
- `0px 3px 1px -2px ${p},0px 2px 2px 0px ${x},0px 1px 5px 0px ${$}`,
11
- `0px 3px 3px -2px ${p},0px 3px 4px 0px ${x},0px 1px 8px 0px ${$}`,
12
- `0px 2px 4px -1px ${p},0px 4px 5px 0px ${x},0px 1px 10px 0px ${$}`,
13
- `0px 3px 5px -1px ${p},0px 5px 8px 0px ${x},0px 1px 14px 0px ${$}`,
14
- `0px 3px 5px -1px ${p},0px 6px 10px 0px ${x},0px 1px 18px 0px ${$}`,
15
- `0px 4px 5px -2px ${p},0px 7px 10px 1px ${x},0px 2px 16px 1px ${$}`,
16
- `0px 5px 5px -3px ${p},0px 8px 10px 1px ${x},0px 3px 14px 2px ${$}`,
17
- `0px 5px 6px -3px ${p},0px 9px 12px 1px ${x},0px 3px 16px 2px ${$}`,
18
- `0px 6px 6px -3px ${p},0px 10px 14px 1px ${x},0px 4px 18px 3px ${$}`,
19
- `0px 6px 7px -4px ${p},0px 11px 15px 1px ${x},0px 4px 20px 3px ${$}`,
20
- `0px 7px 8px -4px ${p},0px 12px 17px 2px ${x},0px 5px 22px 4px ${$}`,
21
- `0px 7px 8px -4px ${p},0px 13px 19px 2px ${x},0px 5px 24px 4px ${$}`,
22
- `0px 7px 9px -4px ${p},0px 14px 21px 2px ${x},0px 5px 26px 4px ${$}`,
23
- `0px 8px 9px -5px ${p},0px 15px 22px 2px ${x},0px 6px 28px 5px ${$}`,
24
- `0px 8px 10px -5px ${p},0px 16px 24px 2px ${x},0px 6px 30px 5px ${$}`,
25
- `0px 8px 11px -5px ${p},0px 17px 26px 2px ${x},0px 6px 32px 5px ${$}`,
26
- `0px 9px 11px -5px ${p},0px 18px 28px 2px ${x},0px 7px 34px 6px ${$}`,
27
- `0px 9px 12px -6px ${p},0px 19px 29px 2px ${x},0px 7px 36px 6px ${$}`,
28
- `0px 10px 13px -6px ${p},0px 20px 31px 3px ${x},0px 8px 38px 7px ${$}`,
29
- `0px 10px 13px -6px ${p},0px 21px 33px 3px ${x},0px 8px 40px 7px ${$}`,
30
- `0px 10px 14px -6px ${p},0px 22px 35px 3px ${x},0px 8px 42px 7px ${$}`,
31
- `0px 11px 14px -7px ${p},0px 23px 36px 3px ${x},0px 9px 44px 8px ${$}`,
32
- `0px 11px 15px -7px ${p},0px 24px 38px 3px ${x},0px 9px 46px 8px ${$}`
9
+ `0px 2px 1px -1px ${p},0px 1px 1px 0px ${$},0px 1px 3px 0px ${n}`,
10
+ `0px 3px 1px -2px ${p},0px 2px 2px 0px ${$},0px 1px 5px 0px ${n}`,
11
+ `0px 3px 3px -2px ${p},0px 3px 4px 0px ${$},0px 1px 8px 0px ${n}`,
12
+ `0px 2px 4px -1px ${p},0px 4px 5px 0px ${$},0px 1px 10px 0px ${n}`,
13
+ `0px 3px 5px -1px ${p},0px 5px 8px 0px ${$},0px 1px 14px 0px ${n}`,
14
+ `0px 3px 5px -1px ${p},0px 6px 10px 0px ${$},0px 1px 18px 0px ${n}`,
15
+ `0px 4px 5px -2px ${p},0px 7px 10px 1px ${$},0px 2px 16px 1px ${n}`,
16
+ `0px 5px 5px -3px ${p},0px 8px 10px 1px ${$},0px 3px 14px 2px ${n}`,
17
+ `0px 5px 6px -3px ${p},0px 9px 12px 1px ${$},0px 3px 16px 2px ${n}`,
18
+ `0px 6px 6px -3px ${p},0px 10px 14px 1px ${$},0px 4px 18px 3px ${n}`,
19
+ `0px 6px 7px -4px ${p},0px 11px 15px 1px ${$},0px 4px 20px 3px ${n}`,
20
+ `0px 7px 8px -4px ${p},0px 12px 17px 2px ${$},0px 5px 22px 4px ${n}`,
21
+ `0px 7px 8px -4px ${p},0px 13px 19px 2px ${$},0px 5px 24px 4px ${n}`,
22
+ `0px 7px 9px -4px ${p},0px 14px 21px 2px ${$},0px 5px 26px 4px ${n}`,
23
+ `0px 8px 9px -5px ${p},0px 15px 22px 2px ${$},0px 6px 28px 5px ${n}`,
24
+ `0px 8px 10px -5px ${p},0px 16px 24px 2px ${$},0px 6px 30px 5px ${n}`,
25
+ `0px 8px 11px -5px ${p},0px 17px 26px 2px ${$},0px 6px 32px 5px ${n}`,
26
+ `0px 9px 11px -5px ${p},0px 18px 28px 2px ${$},0px 7px 34px 6px ${n}`,
27
+ `0px 9px 12px -6px ${p},0px 19px 29px 2px ${$},0px 7px 36px 6px ${n}`,
28
+ `0px 10px 13px -6px ${p},0px 20px 31px 3px ${$},0px 8px 38px 7px ${n}`,
29
+ `0px 10px 13px -6px ${p},0px 21px 33px 3px ${$},0px 8px 40px 7px ${n}`,
30
+ `0px 10px 14px -6px ${p},0px 22px 35px 3px ${$},0px 8px 42px 7px ${n}`,
31
+ `0px 11px 14px -7px ${p},0px 23px 36px 3px ${$},0px 9px 44px 8px ${n}`,
32
+ `0px 11px 15px -7px ${p},0px 24px 38px 3px ${$},0px 9px 46px 8px ${n}`
33
33
  ];
34
34
  }, O = (t) => {
35
35
  const p = {
36
- info: `0px 2px 8px 0px ${r(s.patronusBlue[50], 0.2)}`,
37
- secondary: `0px 2px 8px 0px ${r(s.patronusBlue[50], 0.24)}`,
38
- success: `0px 2px 8px 0px ${r(s.acidGreen[50], 0.2)}`,
39
- warning: `0px 2px 8px 0px ${r(s.middleYellow[50], 0.2)}`,
40
- error: `0px 2px 8px 0px ${r(s.flameRed[50], 0.2)}`,
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)}`,
41
41
  //
42
- card: `0 0 2px 0 ${r(a[500], 0.2)}, 0 12px 24px -4px ${r(
43
- a[500],
42
+ card: `0 0 2px 0 ${x(r[500], 0.2)}, 0 12px 24px -4px ${x(
43
+ r[500],
44
44
  0.12
45
45
  )}`,
46
- dialog: `-40px 40px 80px -8px ${r(o.black, 0.24)}`,
47
- dropdown: `0 0 2px 0 ${r(a[500], 0.24)}, -20px 20px 40px -4px ${r(
48
- a[500],
46
+ dialog: `-40px 40px 80px -8px ${x(o.black, 0.24)}`,
47
+ dropdown: `0 0 2px 0 ${x(r[500], 0.24)}, -20px 20px 40px -4px ${x(
48
+ r[500],
49
49
  0.24
50
50
  )}`
51
51
  };
52
52
  return t === "light" ? {
53
- z1: `0px 2px 2px 2px ${r("#091E42", 0.8)}`,
53
+ z1: `0px 2px 2px 2px ${x("#091E42", 0.8)}`,
54
54
  // todo: solicitar a diseño crear token en base porque está quemado
55
- z2: `0px 0px ${r("#495859", 0.14)}`,
55
+ z2: `0px 0px ${x("#495859", 0.14)}`,
56
56
  // todo: solicitar a diseño crear token en base porque está quemado
57
- z3: `0px 4px 12px 1px ${r("#243B46", 0.14)}`,
57
+ z3: `0px 4px 12px 1px ${x("#243B46", 0.14)}`,
58
58
  // todo: solicitar a diseño crear token en base porque está quemado
59
- z4: `0px 12px 32px 4px ${r("#243B46", 0.12)}`,
59
+ z4: `0px 12px 32px 4px ${x("#243B46", 0.12)}`,
60
60
  // 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`,
61
63
  ...p
62
64
  } : {
63
- z1: `0px 2px 2px 2px ${r("#000000", 0.16)}`,
65
+ z1: `0px 2px 2px 2px ${x("#000000", 0.16)}`,
64
66
  // todo: solicitar a diseño crear token en base porque está quemado
65
- z2: `0px 0px ${r("#111414", 0.5)}`,
67
+ z2: `0px 0px ${x("#111414", 0.5)}`,
66
68
  // todo: solicitar a diseño crear token en base porque está quemado
67
- z3: `0px 4px 12px 1px ${r("#09090A", 0.6)}`,
69
+ z3: `0px 4px 12px 1px ${x("#09090A", 0.6)}`,
68
70
  // todo: solicitar a diseño crear token en base porque está quemado
69
- z4: `0px 12px 32px 4px ${r("#09090A", 0.35)}`,
71
+ z4: `0px 12px 32px 4px ${x("#09090A", 0.35)}`,
70
72
  // 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`,
71
75
  ...p
72
76
  };
73
- }, u = {
74
- light: n(e),
75
- dark: n(c)
77
+ }, m = {
78
+ light: a(s),
79
+ dark: a(i)
76
80
  };
77
81
  export {
78
82
  O as c,
79
- u as s
83
+ m as s
80
84
  };
@@ -50,6 +50,7 @@ declare module '@mui/material/styles' {
50
50
  disabled: string;
51
51
  error: string;
52
52
  };
53
+ chips: BaseChipColors;
53
54
  general: {
54
55
  scrollBar: string;
55
56
  gridHover: string;
@@ -72,6 +73,7 @@ declare module '@mui/material/styles' {
72
73
  disabled: string;
73
74
  error: string;
74
75
  };
76
+ chips: BaseChipColors;
75
77
  default: PaletteColor;
76
78
  general: {
77
79
  scrollBar: string;
package/types/types.d.ts CHANGED
@@ -106,3 +106,20 @@ export type PresetsOptionsColorMain = Array<{
106
106
  value: string;
107
107
  }>;
108
108
  export type ColorState = 'warning' | 'delete' | 'info' | 'success';
109
+ /**
110
+ * Opciones de colores para pinta los chips
111
+ */
112
+ export interface ChipColor {
113
+ contrastText: string;
114
+ backgroundColor: string;
115
+ backgroundHover: string;
116
+ backgroundActive: string;
117
+ }
118
+ /**
119
+ * Lista de opciones de colores para pintar los chips
120
+ */
121
+ export type ChipColorOptions = 'default' | 'warning' | 'warningOpacity' | 'error' | 'errorOpacity' | 'success' | 'successOpacity' | 'info' | 'infoOpacity';
122
+ /**
123
+ * Representa la definición de la lista de colores para usarse en los chips. Son los colores con los que se van a pintar el componente chip.
124
+ */
125
+ export type BaseChipColors = Record<ChipColorOptions, ChipColor>;
@@ -51,6 +51,7 @@ export declare const getPaletteByPreset: (themeUserColor: ThemeUserColor) => {
51
51
  readonly hover: string;
52
52
  readonly paper: "#00000000";
53
53
  };
54
+ readonly chips: import('../types').BaseChipColors;
54
55
  readonly border: {
55
56
  readonly main: string;
56
57
  readonly default: string;
@@ -169,6 +170,7 @@ export declare const getPaletteByPreset: (themeUserColor: ThemeUserColor) => {
169
170
  readonly hover: string;
170
171
  readonly paper: "#00000000";
171
172
  };
173
+ readonly chips: import('../types').BaseChipColors;
172
174
  readonly border: {
173
175
  readonly main: string;
174
176
  readonly default: string;
@@ -1,10 +1,11 @@
1
- import { P as n, a as m, b } from "../theme/palette/presetColors.js";
1
+ import { P as c, a as u, b } from "../theme/palette/presetColors.js";
2
2
  import { B as r } from "../theme/palette/baseColors.js";
3
- import { C as c } from "../theme/palette/commonColors.js";
3
+ import { C as n } from "../theme/palette/commonColors.js";
4
4
  import { G as d } from "../theme/palette/greyPalette.js";
5
5
  import { S as s, a } from "../theme/palette/semanticColors.js";
6
6
  import { B as o } from "../theme/palette/baseOpacityColors.js";
7
- import { B as f, a as u } from "../theme/palette/defaultColors.js";
7
+ import { B as f, a as m } from "../theme/palette/defaultColors.js";
8
+ import { B as g, a as O } from "../theme/palette/baseChipsPalette.js";
8
9
  const t = {
9
10
  light: {
10
11
  scrollBar: "#5663763D",
@@ -14,12 +15,12 @@ const t = {
14
15
  scrollBar: "#5663765D",
15
16
  gridHover: "#282E2E"
16
17
  }
17
- }, p = (l) => {
18
- const i = m?.[l], e = b?.[l];
18
+ }, V = (l) => {
19
+ const i = u?.[l], e = b?.[l];
19
20
  return {
20
21
  light: {
21
22
  mode: "light",
22
- common: c,
23
+ common: n,
23
24
  primary: {
24
25
  ...i
25
26
  },
@@ -42,8 +43,9 @@ const t = {
42
43
  //por compatibilidad de mui
43
44
  paper: "#00000000"
44
45
  },
46
+ chips: g,
45
47
  border: {
46
- main: n[l]?.borderMainLight,
48
+ main: c[l]?.borderMainLight,
47
49
  default: o.oxford[40],
48
50
  secondary: o.oxford[30],
49
51
  dens: o.oxford[60],
@@ -78,13 +80,13 @@ const t = {
78
80
  },
79
81
  dark: {
80
82
  mode: "dark",
81
- common: c,
83
+ common: n,
82
84
  // no definido en figma
83
85
  primary: {
84
86
  ...e
85
87
  },
86
88
  default: {
87
- ...u,
89
+ ...m,
88
90
  focusVisible: e?.focusVisible,
89
91
  contrastText: r.marbleLight[30]
90
92
  },
@@ -98,12 +100,13 @@ const t = {
98
100
  default: r.onyx[40],
99
101
  neutral: r.onyx[50],
100
102
  surface: r.onyx[60],
101
- hover: u.hover,
103
+ hover: m.hover,
102
104
  //por compatibilidad de mui
103
105
  paper: "#00000000"
104
106
  },
107
+ chips: O,
105
108
  border: {
106
- main: n[l]?.borderMainDark,
109
+ main: c[l]?.borderMainDark,
107
110
  default: o.mint[50],
108
111
  secondary: o.mint[40],
109
112
  dens: o.mint[60],
@@ -141,5 +144,5 @@ const t = {
141
144
  };
142
145
  };
143
146
  export {
144
- p as g
147
+ V as g
145
148
  };
@@ -1,13 +0,0 @@
1
- export interface TagColor {
2
- contrastText: string;
3
- backgroundColor: string;
4
- }
5
- export type TagColorOptions = 'default' | 'warning' | 'warningOpacity' | 'error' | 'errorOpacity' | 'success' | 'successOpacity' | 'info' | 'infoOpacity';
6
- /**
7
- * Lista de colores definidos para pintar los tags en modo light
8
- */
9
- export declare const BASE_TAG_OBJECT_COLORS_LIGHT: Record<TagColorOptions, TagColor>;
10
- /**
11
- * Lista de colores definidos para pintar los tags en modo light
12
- */
13
- export declare const BASE_TAG_OBJECT_COLORS_DARK: Record<TagColorOptions, TagColor>;