@m4l/styles 0.0.3 → 0.0.4

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.
Files changed (33) hide show
  1. package/config.d.ts +13 -0
  2. package/index.d.ts +2 -0
  3. package/index.js +947 -437
  4. package/package.json +1 -1
  5. package/theme/defaultThemeOptions.d.ts +1 -2
  6. package/theme/index.d.ts +4 -5
  7. package/theme/overrides/M4LExtendedComponents/M4LButton.d.ts +1 -8
  8. package/theme/overrides/M4LExtendedComponents/M4LIconButton.d.ts +0 -3
  9. package/theme/overrides/M4LExtendedComponents/M4LImageButton.d.ts +35 -1
  10. package/theme/overrides/M4LExtendedComponents/M4LNavLink.d.ts +10 -0
  11. package/theme/overrides/M4LExtendedComponents/M4LPopover.d.ts +5 -1
  12. package/theme/overrides/M4LExtendedComponents/M4LTypography.d.ts +5 -2
  13. package/theme/overrides/M4LExtendedComponents/M4LanguagePopover.d.ts +1 -4
  14. package/theme/overrides/M4LExtendedComponents/M4LoadingButton.d.ts +6 -0
  15. package/theme/overrides/M4LRHFComponents/M4LRHFAutocomplete.d.ts +10 -0
  16. package/theme/overrides/M4LRHFComponents/M4LRHFAutocompleteAsync.d.ts +10 -0
  17. package/theme/overrides/M4LRHFComponents/M4LRHFCheckbox.d.ts +46 -1
  18. package/theme/overrides/M4LRHFComponents/M4LRHFTextField.d.ts +1 -11
  19. package/theme/overrides/M4LRHFComponents/M4LRHFTextFieldPassword.d.ts +4 -4
  20. package/theme/overrides/MUIComponents/Autocomplete.d.ts +0 -3
  21. package/theme/overrides/MUIComponents/ButtonGroup.d.ts +8 -0
  22. package/theme/overrides/MUIComponents/Fab.d.ts +1 -1
  23. package/theme/overrides/MUIComponents/Paper.d.ts +35 -0
  24. package/theme/overrides/MUIComponents/Typography.d.ts +5 -0
  25. package/theme/palette.d.ts +167 -93
  26. package/theme/shadows.d.ts +5 -50
  27. package/theme/typography.d.ts +146 -18
  28. package/types/index.d.ts +1 -1
  29. package/types/types.d.ts +151 -0
  30. package/utils/getColorPresets.d.ts +9 -105
  31. package/utils/getColorState.d.ts +15 -0
  32. package/utils/getFontValue.d.ts +1 -1
  33. package/utils/index.d.ts +1 -0
@@ -0,0 +1,151 @@
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
+ export declare type ThemeColorPresets = 'patronus' | 'turqui' | 'grass' | 'candy' | 'blaze';
9
+
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
+ export interface GridPaletteOptions {
61
+ sectionHeader: string;
62
+ rowHover: string;
63
+ divider: string;
64
+ }
65
+
66
+ export interface ChartPaletteOptions {
67
+ violet: string[];
68
+ blue: string[];
69
+ green: string[];
70
+ yellow: string[];
71
+ red: string[];
72
+ }
73
+
74
+ export interface GradientsPaletteOptions {
75
+ primary: string;
76
+ info: string;
77
+ success: string;
78
+ warning: string;
79
+ error: string;
80
+ }
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
+ }
@@ -1,17 +1,5 @@
1
1
  import { ThemeColorPresets } from '../types';
2
- export declare const colorPresets: ({
3
- LightSelected: string;
4
- LightSelectedHover: string;
5
- DarkSelected: string;
6
- DarkSelectedHover: string;
7
- contrastText: string;
8
- lighter: string;
9
- light: string;
10
- main: string;
11
- dark: string;
12
- darker: string;
13
- name: string;
14
- } | {
2
+ export declare type ColorVariants = {
15
3
  name: string;
16
4
  lighter: string;
17
5
  light: string;
@@ -19,20 +7,8 @@ export declare const colorPresets: ({
19
7
  dark: string;
20
8
  darker: string;
21
9
  contrastText: string;
22
- })[];
23
- export declare const defaultPreset: {
24
- LightSelected: string;
25
- LightSelectedHover: string;
26
- DarkSelected: string;
27
- DarkSelectedHover: string;
28
- contrastText: string;
29
- lighter: string;
30
- light: string;
31
- main: string;
32
- dark: string;
33
- darker: string;
34
- name: string;
35
- } | {
10
+ };
11
+ export declare const colorPresets: {
36
12
  name: string;
37
13
  lighter: string;
38
14
  light: string;
@@ -40,20 +16,8 @@ export declare const defaultPreset: {
40
16
  dark: string;
41
17
  darker: string;
42
18
  contrastText: string;
43
- };
44
- export declare const purplePreset: {
45
- LightSelected: string;
46
- LightSelectedHover: string;
47
- DarkSelected: string;
48
- DarkSelectedHover: string;
49
- contrastText: string;
50
- lighter: string;
51
- light: string;
52
- main: string;
53
- dark: string;
54
- darker: string;
55
- name: string;
56
- } | {
19
+ }[];
20
+ export declare const defaultPreset: {
57
21
  name: string;
58
22
  lighter: string;
59
23
  light: string;
@@ -62,19 +26,7 @@ export declare const purplePreset: {
62
26
  darker: string;
63
27
  contrastText: string;
64
28
  };
65
- export declare const cyanPreset: {
66
- LightSelected: string;
67
- LightSelectedHover: string;
68
- DarkSelected: string;
69
- DarkSelectedHover: string;
70
- contrastText: string;
71
- lighter: string;
72
- light: string;
73
- main: string;
74
- dark: string;
75
- darker: string;
76
- name: string;
77
- } | {
29
+ export declare const turqui: {
78
30
  name: string;
79
31
  lighter: string;
80
32
  light: string;
@@ -83,19 +35,7 @@ export declare const cyanPreset: {
83
35
  darker: string;
84
36
  contrastText: string;
85
37
  };
86
- export declare const bluePreset: {
87
- LightSelected: string;
88
- LightSelectedHover: string;
89
- DarkSelected: string;
90
- DarkSelectedHover: string;
91
- contrastText: string;
92
- lighter: string;
93
- light: string;
94
- main: string;
95
- dark: string;
96
- darker: string;
97
- name: string;
98
- } | {
38
+ export declare const grass: {
99
39
  name: string;
100
40
  lighter: string;
101
41
  light: string;
@@ -104,19 +44,7 @@ export declare const bluePreset: {
104
44
  darker: string;
105
45
  contrastText: string;
106
46
  };
107
- export declare const orangePreset: {
108
- LightSelected: string;
109
- LightSelectedHover: string;
110
- DarkSelected: string;
111
- DarkSelectedHover: string;
112
- contrastText: string;
113
- lighter: string;
114
- light: string;
115
- main: string;
116
- dark: string;
117
- darker: string;
118
- name: string;
119
- } | {
47
+ export declare const candy: {
120
48
  name: string;
121
49
  lighter: string;
122
50
  light: string;
@@ -125,19 +53,7 @@ export declare const orangePreset: {
125
53
  darker: string;
126
54
  contrastText: string;
127
55
  };
128
- export declare const redPreset: {
129
- LightSelected: string;
130
- LightSelectedHover: string;
131
- DarkSelected: string;
132
- DarkSelectedHover: string;
133
- contrastText: string;
134
- lighter: string;
135
- light: string;
136
- main: string;
137
- dark: string;
138
- darker: string;
139
- name: string;
140
- } | {
56
+ export declare const blaze: {
141
57
  name: string;
142
58
  lighter: string;
143
59
  light: string;
@@ -147,18 +63,6 @@ export declare const redPreset: {
147
63
  contrastText: string;
148
64
  };
149
65
  export declare function getColorPresets(presetsKey: ThemeColorPresets): {
150
- LightSelected: string;
151
- LightSelectedHover: string;
152
- DarkSelected: string;
153
- DarkSelectedHover: string;
154
- contrastText: string;
155
- lighter: string;
156
- light: string;
157
- main: string;
158
- dark: string;
159
- darker: string;
160
- name: string;
161
- } | {
162
66
  name: string;
163
67
  lighter: string;
164
68
  light: string;
@@ -0,0 +1,15 @@
1
+ import { StateDefault, StateSkeleton } from "../theme";
2
+ import { ThemeColorPresets } from "../types";
3
+ export interface ColorStateOptions {
4
+ active12: string;
5
+ active: string;
6
+ focus: string;
7
+ hover: string;
8
+ default: string;
9
+ info: StateDefault;
10
+ success: StateDefault;
11
+ warning: StateDefault;
12
+ error: StateDefault;
13
+ skeleton: StateSkeleton;
14
+ }
15
+ export declare const getColorState: (presetsKey: ThemeColorPresets, mode: 'light' | 'dark') => ColorStateOptions;
@@ -6,7 +6,7 @@ export declare function responsiveFontSizes({ sm, md, lg }: {
6
6
  md: number;
7
7
  lg: number;
8
8
  }): {
9
- '@media (min-width:600px)': {
9
+ '@media (min-width:0px)': {
10
10
  fontSize: string;
11
11
  };
12
12
  '@media (min-width:900px)': {
package/utils/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './getColorPresets';
2
+ export { getColorState } from './getColorState';
2
3
  export * from './getFontValue';