@m4l/styles 0.0.4 → 0.0.5

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 { styled as yr } 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";
@@ -2340,6 +2341,7 @@ export {
2340
2341
  Y as remToPx,
2341
2342
  p as responsiveFontSizes,
2342
2343
  dr as shadows,
2344
+ yr as styled,
2343
2345
  W as turqui,
2344
2346
  U as typography
2345
2347
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/styles",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
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,108 @@
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 { styled } from '@mui/material/styles';
6
+
7
+ declare module '@mui/material' {
8
+ interface Color {
9
+ 0: string;
10
+ 500_8: string;
11
+ 500_12: string;
12
+ 500_16: string;
13
+ 500_24: string;
14
+ 500_32: string;
15
+ 500_48: string;
16
+ 500_56: string;
17
+ 500_80: string;
18
+ }
19
+ }
20
+
21
+ declare module '@mui/material/styles/createPalette' {
22
+ interface TypeBackground {
23
+ neutral: string;
24
+ autofill: string;
25
+ header: string;
26
+ }
27
+ interface SimplePaletteColorOptions {
28
+ lighter?: string;
29
+ darker?: string;
30
+ LightSelected?: string;
31
+ LightSelectedHover?: string;
32
+ DarkSelected?: string;
33
+ DarkSelectedHover?: string;
34
+ }
35
+ interface PaletteColor {
36
+ lighter?: string;
37
+ darker?: string;
38
+ LightSelected?: string;
39
+ LightSelectedHover?: string;
40
+ DarkSelected?: string;
41
+ DarkSelectedHover?: string;
42
+ opacity?: string;
43
+ }
44
+ interface Palette {
45
+ gradients?: GradientsPaletteOptions;
46
+ chart: ChartPaletteOptions;
47
+ grid?: GridPaletteOptions;
48
+ patronus?: PatronusConstantColors;
49
+ state: ColorStateOptions /* Organizar cada caso con los valores específicos. */;
50
+ /* info: AgumentationInfoOptions; */
51
+ }
52
+ interface PaletteOptions {
53
+ gradients?: GradientsPaletteOptions;
54
+ chart?: ChartPaletteOptions;
55
+ grid?: GridPaletteOptions;
56
+ }
57
+ }
58
+
59
+ // declare module '@mui/core/Typography' {
60
+ // interface TypographyProps {
61
+ // variant?: 'subtitle';
62
+ // }
63
+ // }
64
+
65
+ declare module '@mui/material/styles' {
66
+ interface Theme {
67
+ stretch?: boolean;
68
+ customShadows: CustomShadowOptions;
69
+ }
70
+
71
+ interface ThemeOptions {
72
+ stretch?: boolean;
73
+ customShadows?: CustomShadowOptions;
74
+ }
75
+
76
+ interface TypographyVariants {
77
+ subtitle: Record<string, any>;
78
+ subtitleDens: Record<string, any>;
79
+ paragraph: Record<string, any>;
80
+ paragraphDens: Record<string, any>;
81
+ body: Record<string, any>;
82
+ bodyDens: Record<string, any>;
83
+ action: Record<string, any>;
84
+ }
85
+
86
+ // allow configuration using `createTheme`
87
+ interface TypographyVariantsOptions {
88
+ subtitle: React.CSSProperties;
89
+ subtitleDens: React.CSSProperties;
90
+ paragraph: React.CSSProperties;
91
+ paragraphDens: React.CSSProperties;
92
+ body: React.CSSProperties;
93
+ bodyDens: React.CSSProperties;
94
+ action: React.CSSProperties;
95
+ }
96
+ }
97
+
98
+ declare module '@mui/material/Typography' {
99
+ interface TypographyPropsVariantOverrides {
100
+ subtitle: true;
101
+ subtitleDens: true;
102
+ paragraph: true;
103
+ paragraphDens: true;
104
+ body: true;
105
+ bodyDens: true;
106
+ action: true;
107
+ }
108
+ }
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
- }