@m4l/styles 3.0.0 → 3.1.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.
@@ -9,8 +9,9 @@ const s = {
9
9
  }, e = {
10
10
  mobile: 16,
11
11
  desktop: 16
12
- };
12
+ }, m = "medium";
13
13
  export {
14
+ m as D,
14
15
  e as g,
15
16
  s as m
16
17
  };
package/config.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Sizes } from './types';
1
2
  export declare const muiBreakpointsValues: {
2
3
  values: {
3
4
  xs: number;
@@ -11,3 +12,7 @@ export declare const globalRemSize: {
11
12
  mobile: number;
12
13
  desktop: number;
13
14
  };
15
+ /**
16
+ * Constante con el valor por defecto para las props sizes usadas en los componentes o sus derivaciones
17
+ */
18
+ export declare const DEFAULT_SIZE: Sizes;
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './theme';
2
2
  export * from './utils';
3
3
  export * from './types';
4
- export { muiBreakpointsValues, globalRemSize } from './config';
4
+ export { muiBreakpointsValues, globalRemSize, DEFAULT_SIZE } from './config';
package/index.js CHANGED
@@ -1,32 +1,33 @@
1
- import { g as o, m as a } from "./config-CoeBxEZB.js";
2
- import { d as t } from "./theme/defaultThemeOptions-BlJvKCE6.js";
3
- import { c as m, s as f } from "./theme/shadows-GTYqExFA.js";
4
- import { t as x } from "./theme/typography-BsOO459U.js";
5
- import { f as C } from "./theme/overrides/index-DrDgOdnk.js";
6
- import { B as i, a as l, C as S, G as u, g as E, p as P } from "./theme/palette-DM0gXxA2.js";
7
- import { u as T } from "./utils/useResponsive-DaeQVwlH.js";
8
- import { D as _, d as A, g as B } from "./utils/getColorPresets-CXZaM9oS.js";
9
- import { g as h, p as v, a as y, r as F } from "./utils/getFontValue-BEO-XID9.js";
1
+ import { D as o, g as a, m as r } from "./config-B8bZIPuH.js";
2
+ import { d as p } from "./theme/defaultThemeOptions-BayzDRnS.js";
3
+ import { c as f, s as O } from "./theme/shadows-GTYqExFA.js";
4
+ import { t as n } from "./theme/typography-BsOO459U.js";
5
+ import { f as E } from "./theme/overrides/index-DrDgOdnk.js";
6
+ import { B as g, a as i, C as l, G as T, g as u, p as P } from "./theme/palette-DM0gXxA2.js";
7
+ import { u as d } from "./utils/useResponsive-DaeQVwlH.js";
8
+ import { D as A, d as L, g as B } from "./utils/getColorPresets-CXZaM9oS.js";
9
+ import { g as D, p as F, a as v, r as y } from "./utils/getFontValue-BEO-XID9.js";
10
10
  export {
11
- i as BASE_COLORS,
12
- l as BASE_OPACITY_COLORS,
13
- S as COMMON_COLORS,
14
- _ as DEFAULT_PRESET,
15
- u as GREY_PALETTE,
16
- m as createCustomShadows,
17
- A as defaultPresetColors,
18
- t as defaultThemeOptions,
19
- C as fnComponentsOverrides,
11
+ g as BASE_COLORS,
12
+ i as BASE_OPACITY_COLORS,
13
+ l as COMMON_COLORS,
14
+ A as DEFAULT_PRESET,
15
+ o as DEFAULT_SIZE,
16
+ T as GREY_PALETTE,
17
+ f as createCustomShadows,
18
+ L as defaultPresetColors,
19
+ p as defaultThemeOptions,
20
+ E as fnComponentsOverrides,
20
21
  B as getColorPresets,
21
- h as getFontValue,
22
- E as getPaletteByPreset,
23
- o as globalRemSize,
24
- a as muiBreakpointsValues,
22
+ D as getFontValue,
23
+ u as getPaletteByPreset,
24
+ a as globalRemSize,
25
+ r as muiBreakpointsValues,
25
26
  P as presetsOptions,
26
- v as pxToRem,
27
- y as remToPx,
28
- F as responsiveFontSizes,
29
- f as shadows,
30
- x as typography,
31
- T as useResponsive
27
+ F as pxToRem,
28
+ v as remToPx,
29
+ y as responsiveFontSizes,
30
+ O as shadows,
31
+ n as typography,
32
+ d as useResponsive
32
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/styles",
3
- "version": "3.0.0",
3
+ "version": "3.1.1",
4
4
  "license": "UNLICENSED",
5
5
  "author": "m4l team",
6
6
  "dependencies": {
@@ -2,19 +2,22 @@ import { createTheme as a, alpha as s } from "@mui/material/styles";
2
2
  import { t as o } from "./typography-BsOO459U.js";
3
3
  import { s as r, c as m } from "./shadows-GTYqExFA.js";
4
4
  import { g as p } from "./palette-DM0gXxA2.js";
5
- import { g as h, D as t } from "../utils/getColorPresets-CXZaM9oS.js";
6
- const e = a(), f = {
7
- ...e,
5
+ import { g as i, D as e } from "../utils/getColorPresets-CXZaM9oS.js";
6
+ const t = a(), f = {
7
+ ...t,
8
8
  typography: o,
9
+ generalSettings: {
10
+ isMobile: !1
11
+ },
9
12
  palette: {
10
- ...e.palette,
11
- ...p(t).light,
13
+ ...t.palette,
14
+ ...p(e).light,
12
15
  mode: "light"
13
16
  },
14
17
  shape: { borderRadius: 8 },
15
18
  shadows: r.dark,
16
19
  customShadows: {
17
- primary: `0 8px 16px 0 ${s(h(t).main, 0.2)}`,
20
+ primary: `0 8px 16px 0 ${s(i(e).main, 0.2)}`,
18
21
  ...m("dark")
19
22
  },
20
23
  stretch: !0
@@ -1,144 +1,147 @@
1
- import { Breakpoints } from '@mui/material';
2
- import { CssVarsTheme } from '@mui/material/styles';
3
-
4
- import type { CustomShadowOptions } from '../theme';
5
-
6
- declare module '@mui/material' {
7
- interface Color {
8
- 0: string;
9
- 500_8: string;
10
- 500_12: string;
11
- 500_16: string;
12
- 500_24: string;
13
- 500_32: string;
14
- 500_48: string;
15
- 500_56: string;
16
- 500_80: string;
17
- }
18
- }
19
-
20
- declare module '@mui/material/styles' {
21
- interface PaletteColor {
22
- lighter?: string;
23
- darker?: string;
24
- active: string;
25
- activeOpacity: string;
26
- hover: string;
27
- focus: string;
28
- selected: string;
29
- toneOpacity: string;
30
- }
31
-
32
- interface SimplePaletteColorOptions {
33
- lighter?: string;
34
- darker?: string;
35
- active: string;
36
- activeOpacity: string;
37
- hover: string;
38
- focus: string;
39
- selected: string;
40
- toneOpacity: string;
41
- }
42
-
43
- interface Palette {
44
- mode: 'light' | 'dark';
45
- secondary: never;
46
- skeleton: { default: string; transition: string };
47
- border: {
48
- active: string;
49
- selected: string;
50
- default: string;
51
- primary: string;
52
- secondary: string;
53
- disabled: string;
54
- dense: string;
55
- line: string;
56
- };
57
- general: {
58
- scrollBar: string;
59
- gridHover: string;
60
- };
61
- }
62
-
63
- interface PaletteOptions {
64
- mode: 'light' | 'dark';
65
- secondary: never;
66
- skeleton: { default: string; transition: string };
67
- border: {
68
- active: string;
69
- selected: string;
70
- default: string;
71
- primary: string;
72
- secondary: string;
73
- disabled: string;
74
- dense: string;
75
- line: string;
76
- };
77
- general: {
78
- scrollBar: string;
79
- gridHover: string;
80
- };
81
- }
82
-
83
- interface ColorSchemeOverrides {
84
- finalTheme?: true;
85
- }
86
-
87
- interface Theme extends CssVarsTheme {
88
- stretch: boolean;
89
- customShadows: CustomShadowOptions;
90
- breakpoints: Breakpoints;
91
- }
92
-
93
- interface ThemeVars {
94
- customShadows: CustomShadowOptions;
95
- }
96
-
97
- interface ColorSystem {
98
- typography: TypographyVariants;
99
- }
100
-
101
- interface TypeBackground {
102
- default: string;
103
- hover: string;
104
- surface: string;
105
- subtle: string;
106
- main: string;
107
- bold: string;
108
- backdrop: string;
109
- reverse: string;
110
- header: string;
111
- }
112
-
113
- interface TypographyVariants {
114
- subtitle: Record<string, any>;
115
- subtitleDens: Record<string, any>;
116
- paragraph: Record<string, any>;
117
- paragraphDens: Record<string, any>;
118
- body: Record<string, any>;
119
- bodyDens: Record<string, any>;
120
- action: Record<string, any>;
121
- }
122
-
123
- interface TypographyVariantsOptions {
124
- subtitle: React.CSSProperties;
125
- subtitleDens: React.CSSProperties;
126
- paragraph: React.CSSProperties;
127
- paragraphDens: React.CSSProperties;
128
- body: React.CSSProperties;
129
- bodyDens: React.CSSProperties;
130
- action: React.CSSProperties;
131
- }
132
- }
133
-
134
- declare module '@mui/material/Typography' {
135
- interface TypographyPropsVariantOverrides {
136
- subtitle: true;
137
- subtitleDens: true;
138
- paragraph: true;
139
- paragraphDens: true;
140
- body: true;
141
- bodyDens: true;
142
- action: true;
143
- }
144
- }
1
+ import { Breakpoints } from '@mui/material';
2
+ import { CssVarsTheme } from '@mui/material/styles';
3
+
4
+ import type { CustomShadowOptions } from '../theme';
5
+
6
+ declare module '@mui/material' {
7
+ interface Color {
8
+ 0: string;
9
+ 500_8: string;
10
+ 500_12: string;
11
+ 500_16: string;
12
+ 500_24: string;
13
+ 500_32: string;
14
+ 500_48: string;
15
+ 500_56: string;
16
+ 500_80: string;
17
+ }
18
+ }
19
+
20
+ declare module '@mui/material/styles' {
21
+ interface PaletteColor {
22
+ lighter?: string;
23
+ darker?: string;
24
+ active: string;
25
+ activeOpacity: string;
26
+ hover: string;
27
+ focus: string;
28
+ selected: string;
29
+ toneOpacity: string;
30
+ }
31
+
32
+ interface SimplePaletteColorOptions {
33
+ lighter?: string;
34
+ darker?: string;
35
+ active: string;
36
+ activeOpacity: string;
37
+ hover: string;
38
+ focus: string;
39
+ selected: string;
40
+ toneOpacity: string;
41
+ }
42
+
43
+ interface Palette {
44
+ mode: 'light' | 'dark';
45
+ secondary: never;
46
+ skeleton: { default: string; transition: string };
47
+ border: {
48
+ active: string;
49
+ selected: string;
50
+ default: string;
51
+ primary: string;
52
+ secondary: string;
53
+ disabled: string;
54
+ dense: string;
55
+ line: string;
56
+ };
57
+ general: {
58
+ scrollBar: string;
59
+ gridHover: string;
60
+ };
61
+ }
62
+
63
+ interface PaletteOptions {
64
+ mode: 'light' | 'dark';
65
+ secondary: never;
66
+ skeleton: { default: string; transition: string };
67
+ border: {
68
+ active: string;
69
+ selected: string;
70
+ default: string;
71
+ primary: string;
72
+ secondary: string;
73
+ disabled: string;
74
+ dense: string;
75
+ line: string;
76
+ };
77
+ general: {
78
+ scrollBar: string;
79
+ gridHover: string;
80
+ };
81
+ }
82
+
83
+ interface ColorSchemeOverrides {
84
+ finalTheme?: true;
85
+ }
86
+
87
+ interface Theme extends CssVarsTheme {
88
+ stretch: boolean;
89
+ customShadows: CustomShadowOptions;
90
+ breakpoints: Breakpoints;
91
+ generalSettings: {
92
+ isMobile: boolean;
93
+ }
94
+ }
95
+
96
+ interface ThemeVars {
97
+ customShadows: CustomShadowOptions;
98
+ }
99
+
100
+ interface ColorSystem {
101
+ typography: TypographyVariants;
102
+ }
103
+
104
+ interface TypeBackground {
105
+ default: string;
106
+ hover: string;
107
+ surface: string;
108
+ subtle: string;
109
+ main: string;
110
+ bold: string;
111
+ backdrop: string;
112
+ reverse: string;
113
+ header: string;
114
+ }
115
+
116
+ interface TypographyVariants {
117
+ subtitle: Record<string, any>;
118
+ subtitleDens: Record<string, any>;
119
+ paragraph: Record<string, any>;
120
+ paragraphDens: Record<string, any>;
121
+ body: Record<string, any>;
122
+ bodyDens: Record<string, any>;
123
+ action: Record<string, any>;
124
+ }
125
+
126
+ interface TypographyVariantsOptions {
127
+ subtitle: React.CSSProperties;
128
+ subtitleDens: React.CSSProperties;
129
+ paragraph: React.CSSProperties;
130
+ paragraphDens: React.CSSProperties;
131
+ body: React.CSSProperties;
132
+ bodyDens: React.CSSProperties;
133
+ action: React.CSSProperties;
134
+ }
135
+ }
136
+
137
+ declare module '@mui/material/Typography' {
138
+ interface TypographyPropsVariantOverrides {
139
+ subtitle: true;
140
+ subtitleDens: true;
141
+ paragraph: true;
142
+ paragraphDens: true;
143
+ body: true;
144
+ bodyDens: true;
145
+ action: true;
146
+ }
147
+ }
package/types/types.d.ts CHANGED
@@ -1,4 +1,8 @@
1
1
  import { PaletteColor } from '@mui/material/styles';
2
+ /**
3
+ * type usado para tipar las props sizes de los componentes o sus derivaciones
4
+ */
5
+ export declare type Sizes = 'small' | 'medium' | 'large';
2
6
  export declare type ThemeColorPresets = 'patronus' | 'turqui' | 'grass' | 'brown' | 'blaze';
3
7
  export declare type StateColorSchema = 'info' | 'success' | 'warning' | 'error';
4
8
  export declare type ColorSchema = 'primary' | 'secondary' | StateColorSchema;
package/vite-env.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- /// <reference types="vite/client" />
2
- /// <reference types="vitest" />
3
- /// <reference types="vitest/importMeta" />
1
+ /// <reference types="vite/client" />
2
+ /// <reference types="vitest" />
3
+ /// <reference types="vitest/importMeta" />