@m4l/styles 0.0.4 → 0.0.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/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { alpha as t, useTheme as m } from "@mui/material/styles";
2
+ import { StyledEngineProvider as yr, Theme as fr, ThemeOptions as hr, ThemeProvider as Mr, createTheme as vr, styled as Br } from "@mui/material/styles";
2
3
  import { alpha as n } from "@mui/system";
3
4
  import { alpha as F } from "@mui/material";
4
5
  import { useResponsive as w } from "@m4l/graphics";
@@ -2322,10 +2323,15 @@ const cr = {
2322
2323
  };
2323
2324
  export {
2324
2325
  r as PATRONUSCOLORS,
2326
+ yr as StyledEngineProvider,
2327
+ fr as Theme,
2328
+ hr as ThemeOptions,
2329
+ Mr as ThemeProvider,
2325
2330
  N as blaze,
2326
2331
  _ as candy,
2327
2332
  g as colorPresets,
2328
2333
  sr as createCustomShadows,
2334
+ vr as createTheme,
2329
2335
  P as defaultPreset,
2330
2336
  lr as defaultThemeOptions,
2331
2337
  ur as fnComponentsOverrides,
@@ -2340,6 +2346,7 @@ export {
2340
2346
  Y as remToPx,
2341
2347
  p as responsiveFontSizes,
2342
2348
  dr as shadows,
2349
+ Br as styled,
2343
2350
  W as turqui,
2344
2351
  U as typography
2345
2352
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/styles",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "license": "UNLICENSED",
5
5
  "dependencies": {
6
6
  "@m4l/graphics": "*",
@@ -5,11 +5,15 @@ export declare const M4LRHFCheckbox: (theme: Theme) => {
5
5
  "&.M4LRHFCheckbox-root": {
6
6
  test: string;
7
7
  '.M4LRHFCheckbox-checkTypography': {
8
- [x: string]: any;
8
+ [x: string]: string | {
9
+ gap: string;
10
+ };
9
11
  display: string;
10
12
  gap: string;
11
13
  };
12
- '& .MuiTypography-root': any;
14
+ '& .MuiTypography-root': {
15
+ color: string;
16
+ };
13
17
  '.M4LRHFCheckbox-small .MuiButtonBase-root': {
14
18
  width: string;
15
19
  height: string;
@@ -39,7 +43,9 @@ export declare const M4LRHFCheckbox: (theme: Theme) => {
39
43
  '.MuiButtonBase-root:hover .MuiSvgIcon-root': {
40
44
  fill: string;
41
45
  };
42
- '.M4LRHFCheckbox-checkTypography .MuiTypography-root': any;
46
+ '.M4LRHFCheckbox-checkTypography .MuiTypography-root': {
47
+ [x: string]: any;
48
+ };
43
49
  '.M4LRHFCheckbox-stateDisabled .MuiSvgIcon-root': {
44
50
  fill: string;
45
51
  };
@@ -17,7 +17,11 @@ export default function Paper(theme: Theme): {
17
17
  backgroundImage: string;
18
18
  backgroundColor: string;
19
19
  borderRadius: string;
20
- '& .MuiStack-root .MuiMenuItem-root': any;
20
+ '& .MuiStack-root .MuiMenuItem-root': {
21
+ color: string;
22
+ transition: string;
23
+ borderRadius: string;
24
+ };
21
25
  '& .MuiStack-root .MuiMenuItem-root:hover': {
22
26
  color: string;
23
27
  transition: string;
@@ -34,7 +38,11 @@ export default function Paper(theme: Theme): {
34
38
  backgroundColor: string;
35
39
  boxShadow: string;
36
40
  };
37
- '& .MuiAutocomplete-listbox .MuiAutocomplete-option': any;
41
+ '& .MuiAutocomplete-listbox .MuiAutocomplete-option': {
42
+ color: string;
43
+ transition: string;
44
+ borderRadius: string;
45
+ };
38
46
  '& .MuiAutocomplete-listbox .MuiAutocomplete-option:hover': {
39
47
  color: string;
40
48
  transition: string;
@@ -1,46 +1,17 @@
1
+ export declare type FontProps = {
2
+ fontSize: string;
3
+ fontWeight: number;
4
+ lineHeight: string;
5
+ letterSpacing: string;
6
+ };
1
7
  export interface TypographyVariants {
2
- subtitle: {
3
- fontSize: string;
4
- fontWeight: number;
5
- lineHeight: string;
6
- letterSpacing: string;
7
- };
8
- subtitleDens: {
9
- fontSize: string;
10
- fontWeight: number;
11
- lineHeight: string;
12
- letterSpacing: string;
13
- };
14
- paragraph: {
15
- fontSize: string;
16
- fontWeight: number;
17
- lineHeight: string;
18
- letterSpacing: string;
19
- };
20
- paragraphDens: {
21
- fontSize: string;
22
- fontWeight: number;
23
- lineHeight: string;
24
- letterSpacing: string;
25
- };
26
- body: {
27
- fontSize: string;
28
- fontWeight: number;
29
- lineHeight: string;
30
- letterSpacing: string;
31
- };
32
- bodyDens: {
33
- fontSize: string;
34
- fontWeight: number;
35
- lineHeight: string;
36
- letterSpacing: string;
37
- };
38
- action: {
39
- fontSize: string;
40
- fontWeight: number;
41
- lineHeight: string;
42
- letterSpacing: string;
43
- };
8
+ subtitle: FontProps;
9
+ subtitleDens: FontProps;
10
+ paragraph: FontProps;
11
+ paragraphDens: FontProps;
12
+ body: FontProps;
13
+ bodyDens: FontProps;
14
+ action: FontProps;
44
15
  }
45
16
  export declare const typography: {
46
17
  readonly fontFamily: "Poppins, sans-serif";
@@ -0,0 +1,115 @@
1
+ import { PatronusConstantColors } from '../theme/palette';
2
+ import { CustomShadowOptions } from '../theme';
3
+ import { ChartPaletteOptions, GradientsPaletteOptions, GridPaletteOptions } from './types';
4
+ import { ColorStateOptions } from '../utils/getColorState';
5
+ export {
6
+ styled,
7
+ Theme,
8
+ ThemeOptions,
9
+ createTheme,
10
+ ThemeProvider,
11
+ StyledEngineProvider,
12
+ } from '@mui/material/styles';
13
+
14
+ declare module '@mui/material' {
15
+ interface Color {
16
+ 0: string;
17
+ 500_8: string;
18
+ 500_12: string;
19
+ 500_16: string;
20
+ 500_24: string;
21
+ 500_32: string;
22
+ 500_48: string;
23
+ 500_56: string;
24
+ 500_80: string;
25
+ }
26
+ }
27
+
28
+ declare module '@mui/material/styles/createPalette' {
29
+ interface TypeBackground {
30
+ neutral: string;
31
+ autofill: string;
32
+ header: string;
33
+ }
34
+ interface SimplePaletteColorOptions {
35
+ lighter?: string;
36
+ darker?: string;
37
+ LightSelected?: string;
38
+ LightSelectedHover?: string;
39
+ DarkSelected?: string;
40
+ DarkSelectedHover?: string;
41
+ }
42
+ interface PaletteColor {
43
+ lighter?: string;
44
+ darker?: string;
45
+ LightSelected?: string;
46
+ LightSelectedHover?: string;
47
+ DarkSelected?: string;
48
+ DarkSelectedHover?: string;
49
+ opacity?: string;
50
+ }
51
+ interface Palette {
52
+ gradients?: GradientsPaletteOptions;
53
+ chart: ChartPaletteOptions;
54
+ grid?: GridPaletteOptions;
55
+ patronus?: PatronusConstantColors;
56
+ state: ColorStateOptions /* Organizar cada caso con los valores específicos. */;
57
+ /* info: AgumentationInfoOptions; */
58
+ }
59
+ interface PaletteOptions {
60
+ gradients?: GradientsPaletteOptions;
61
+ chart?: ChartPaletteOptions;
62
+ grid?: GridPaletteOptions;
63
+ }
64
+ }
65
+
66
+ // declare module '@mui/core/Typography' {
67
+ // interface TypographyProps {
68
+ // variant?: 'subtitle';
69
+ // }
70
+ // }
71
+
72
+ declare module '@mui/material/styles' {
73
+ interface Theme {
74
+ stretch?: boolean;
75
+ customShadows: CustomShadowOptions;
76
+ }
77
+
78
+ interface ThemeOptions {
79
+ stretch?: boolean;
80
+ customShadows?: CustomShadowOptions;
81
+ }
82
+
83
+ interface TypographyVariants {
84
+ subtitle: Record<string, any>;
85
+ subtitleDens: Record<string, any>;
86
+ paragraph: Record<string, any>;
87
+ paragraphDens: Record<string, any>;
88
+ body: Record<string, any>;
89
+ bodyDens: Record<string, any>;
90
+ action: Record<string, any>;
91
+ }
92
+
93
+ // allow configuration using `createTheme`
94
+ interface TypographyVariantsOptions {
95
+ subtitle: React.CSSProperties;
96
+ subtitleDens: React.CSSProperties;
97
+ paragraph: React.CSSProperties;
98
+ paragraphDens: React.CSSProperties;
99
+ body: React.CSSProperties;
100
+ bodyDens: React.CSSProperties;
101
+ action: React.CSSProperties;
102
+ }
103
+ }
104
+
105
+ declare module '@mui/material/Typography' {
106
+ interface TypographyPropsVariantOverrides {
107
+ subtitle: true;
108
+ subtitleDens: true;
109
+ paragraph: true;
110
+ paragraphDens: true;
111
+ body: true;
112
+ bodyDens: true;
113
+ action: true;
114
+ }
115
+ }
package/types/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './types.d';
2
+ export * from './augmentations.d';
package/types/types.d.ts CHANGED
@@ -1,62 +1,5 @@
1
- import { Patronus, PatronusConstantColors } from '../theme/palette';
2
- import {CustomShadowOptions } from '../theme'
3
- import { ColorStateOptions } from '../utils/getColorState';
4
- import { TypographyVariants } from '../theme/typography';
5
-
6
- export {};
7
-
8
1
  export declare type ThemeColorPresets = 'patronus' | 'turqui' | 'grass' | 'candy' | 'blaze';
9
2
 
10
- declare module '@mui/material/styles' {
11
- interface Theme {
12
- stretch?: boolean;
13
- customShadows: CustomShadowOptions;
14
- }
15
-
16
- interface ThemeOptions {
17
- stretch?: boolean;
18
- customShadows?: CustomShadowOptions;
19
- }
20
-
21
- interface TypographyVariants {
22
- subtitle: Record<any>;
23
- subtitleDens: Record<any>;
24
- paragraph: Record<any>;
25
- paragraphDens: Record<any>;
26
- body: Record<any>;
27
- bodyDens: Record<any>;
28
- action: Record<any>;
29
- }
30
-
31
-
32
-
33
- // allow configuration using `createTheme`
34
- interface TypographyVariantsOptions {
35
- subtitle: React.CSSProperties;
36
- subtitleDens: React.CSSProperties;
37
- paragraph: React.CSSProperties;
38
- paragraphDens: React.CSSProperties;
39
- body: React.CSSProperties;
40
- bodyDens: React.CSSProperties;
41
- action: React.CSSProperties;
42
- }
43
-
44
-
45
-
46
- }
47
-
48
- declare module '@mui/material/Typography' {
49
- interface TypographyPropsVariantOverrides {
50
- subtitle: true;
51
- subtitleDens: true;
52
- paragraph: true;
53
- paragraphDens: true;
54
- body: true;
55
- bodyDens: true;
56
- action: true;
57
- }
58
- }
59
-
60
3
  export interface GridPaletteOptions {
61
4
  sectionHeader: string;
62
5
  rowHover: string;
@@ -78,74 +21,3 @@ export interface GradientsPaletteOptions {
78
21
  warning: string;
79
22
  error: string;
80
23
  }
81
-
82
- /* interface AgumentationInfoOptions extends Pick<PaletteColor, 'lighter' | 'light' | 'main' | 'dark' | 'darker' >{
83
- opacity: string
84
- }
85
- */
86
- declare module '@mui/material/styles/createPalette' {
87
- interface TypeBackground {
88
- neutral: string;
89
- autofill: string;
90
- header: string;
91
- }
92
- interface SimplePaletteColorOptions {
93
- lighter?: string;
94
- darker?: string;
95
- LightSelected?: string;
96
- LightSelectedHover?: string;
97
- DarkSelected?: string;
98
- DarkSelectedHover?: string;
99
- }
100
- interface PaletteColor {
101
- lighter?: string;
102
- darker?: string;
103
- LightSelected?: string;
104
- LightSelectedHover?: string;
105
- DarkSelected?: string;
106
- DarkSelectedHover?: string;
107
- opacity?: string;
108
- }
109
- interface Palette {
110
- gradients?: GradientsPaletteOptions;
111
- chart: ChartPaletteOptions;
112
- grid?: GridPaletteOptions;
113
- patronus?: PatronusConstantColors;
114
- state: ColorStateOptions;
115
- /* info: AgumentationInfoOptions; */ /* Organizar cada caso con los valores específicos. */
116
- }
117
- interface PaletteOptions {
118
- gradients?: GradientsPaletteOptions;
119
- chart?: ChartPaletteOptions;
120
- grid?: GridPaletteOptions;
121
- }
122
- }
123
-
124
- /* declare module '@material-ui/core/styles/createTypography' {
125
- interface TypographyOptions extends TypographyVariants {}
126
- }
127
- */
128
-
129
-
130
- declare module '@mui/material' {
131
- interface Color {
132
- 0: string;
133
- 500_8: string;
134
- 500_12: string;
135
- 500_16: string;
136
- 500_24: string;
137
- 500_32: string;
138
- 500_48: string;
139
- 500_56: string;
140
- 500_80: string;
141
- }
142
- }
143
-
144
-
145
- /* import { TypographyProps } from '@material-ui/core/Typography'; */
146
-
147
- declare module '@material-ui/core/Typography' {
148
- interface TypographyProps {
149
- variant?: 'subtitle';
150
- }
151
- }