@zimyo/ui 1.1.2 → 1.1.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.
@@ -1,137 +0,0 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { createTheme, ThemeProvider } from '@mui/material/styles';
3
- import { CssBaseline } from '@mui/material';
4
-
5
- const designTokens = {
6
- colors: {
7
- primary: {
8
- 50: '#e3f2fd',
9
- 100: '#bbdefb',
10
- 500: '#2196f3',
11
- 900: '#0d47a1',
12
- },
13
- secondary: {
14
- 50: '#fce4ec',
15
- 100: '#f8bbd9',
16
- 500: '#e91e63',
17
- 900: '#880e4f',
18
- },
19
- neutral: {
20
- 50: '#fafafa',
21
- 100: '#f5f5f5',
22
- 200: '#eeeeee',
23
- 500: '#9e9e9e',
24
- 900: '#212121',
25
- },
26
- },
27
- spacing: {
28
- xs: '4px',
29
- sm: '8px',
30
- md: '16px',
31
- lg: '24px',
32
- xl: '32px',
33
- },
34
- radius: {
35
- xs: "2px",
36
- sm: '4px',
37
- md: '8px',
38
- lg: '12px',
39
- xl: '16px',
40
- full: '9999px',
41
- },
42
- typography: {
43
- fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif',
44
- fontSize: {
45
- xs: '0.75rem',
46
- sm: '0.875rem',
47
- md: '1rem',
48
- lg: '1.25rem',
49
- xl: '1.5rem',
50
- },
51
- },
52
- };
53
-
54
- const createCustomTheme = (config = {}) => {
55
- const { primaryColor = designTokens.colors.primary[500], secondaryColor = designTokens.colors.secondary[500], } = config;
56
- return createTheme({
57
- palette: {
58
- primary: {
59
- main: primaryColor,
60
- },
61
- secondary: {
62
- main: secondaryColor,
63
- },
64
- },
65
- typography: {
66
- fontFamily: designTokens.typography.fontFamily,
67
- h1: { fontWeight: 600 },
68
- h2: { fontWeight: 600 },
69
- h3: { fontWeight: 600 },
70
- h4: { fontWeight: 600 },
71
- h5: { fontWeight: 600 },
72
- h6: { fontWeight: 600 },
73
- },
74
- spacing: 8,
75
- shape: {
76
- borderRadius: 8,
77
- },
78
- radius: designTokens.radius,
79
- components: {
80
- MuiButton: {
81
- styleOverrides: {
82
- root: {
83
- textTransform: 'none',
84
- borderRadius: '4px',
85
- // fontWeight: 600,
86
- letterSpacing: '0.5px',
87
- padding: '8px 16px',
88
- },
89
- sizeSmall: {
90
- padding: '4px 12px',
91
- fontSize: '0.875rem',
92
- },
93
- sizeLarge: {
94
- padding: '12px 24px',
95
- fontSize: '1rem',
96
- },
97
- },
98
- defaultProps: {
99
- disableElevation: true
100
- }
101
- },
102
- MuiCard: {
103
- styleOverrides: {
104
- root: {
105
- borderRadius: '12px',
106
- boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)',
107
- },
108
- },
109
- },
110
- MuiTextField: {
111
- styleOverrides: {
112
- root: {
113
- '& .MuiOutlinedInput-root': {
114
- borderRadius: '8px',
115
- },
116
- },
117
- },
118
- },
119
- },
120
- });
121
- };
122
- // Default theme
123
- const theme = createCustomTheme();
124
-
125
- const UILibraryThemeProvider = ({ children, primaryColor, secondaryColor, enableCssBaseline = true, }) => {
126
- const themeConfig = {};
127
- if (primaryColor) {
128
- themeConfig.primaryColor = primaryColor;
129
- }
130
- if (secondaryColor) {
131
- themeConfig.secondaryColor = secondaryColor;
132
- }
133
- const theme = createCustomTheme(themeConfig);
134
- return (jsxs(ThemeProvider, { theme: theme, children: [enableCssBaseline && jsx(CssBaseline, {}), children] }));
135
- };
136
-
137
- export { UILibraryThemeProvider, createCustomTheme, designTokens, theme };
@@ -1,142 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var styles = require('@mui/material/styles');
5
- var material = require('@mui/material');
6
-
7
- const designTokens = {
8
- colors: {
9
- primary: {
10
- 50: '#e3f2fd',
11
- 100: '#bbdefb',
12
- 500: '#2196f3',
13
- 900: '#0d47a1',
14
- },
15
- secondary: {
16
- 50: '#fce4ec',
17
- 100: '#f8bbd9',
18
- 500: '#e91e63',
19
- 900: '#880e4f',
20
- },
21
- neutral: {
22
- 50: '#fafafa',
23
- 100: '#f5f5f5',
24
- 200: '#eeeeee',
25
- 500: '#9e9e9e',
26
- 900: '#212121',
27
- },
28
- },
29
- spacing: {
30
- xs: '4px',
31
- sm: '8px',
32
- md: '16px',
33
- lg: '24px',
34
- xl: '32px',
35
- },
36
- radius: {
37
- xs: "2px",
38
- sm: '4px',
39
- md: '8px',
40
- lg: '12px',
41
- xl: '16px',
42
- full: '9999px',
43
- },
44
- typography: {
45
- fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif',
46
- fontSize: {
47
- xs: '0.75rem',
48
- sm: '0.875rem',
49
- md: '1rem',
50
- lg: '1.25rem',
51
- xl: '1.5rem',
52
- },
53
- },
54
- };
55
-
56
- const createCustomTheme = (config = {}) => {
57
- const { primaryColor = designTokens.colors.primary[500], secondaryColor = designTokens.colors.secondary[500], } = config;
58
- return styles.createTheme({
59
- palette: {
60
- primary: {
61
- main: primaryColor,
62
- },
63
- secondary: {
64
- main: secondaryColor,
65
- },
66
- },
67
- typography: {
68
- fontFamily: designTokens.typography.fontFamily,
69
- h1: { fontWeight: 600 },
70
- h2: { fontWeight: 600 },
71
- h3: { fontWeight: 600 },
72
- h4: { fontWeight: 600 },
73
- h5: { fontWeight: 600 },
74
- h6: { fontWeight: 600 },
75
- },
76
- spacing: 8,
77
- shape: {
78
- borderRadius: 8,
79
- },
80
- radius: designTokens.radius,
81
- components: {
82
- MuiButton: {
83
- styleOverrides: {
84
- root: {
85
- textTransform: 'none',
86
- borderRadius: '4px',
87
- // fontWeight: 600,
88
- letterSpacing: '0.5px',
89
- padding: '8px 16px',
90
- },
91
- sizeSmall: {
92
- padding: '4px 12px',
93
- fontSize: '0.875rem',
94
- },
95
- sizeLarge: {
96
- padding: '12px 24px',
97
- fontSize: '1rem',
98
- },
99
- },
100
- defaultProps: {
101
- disableElevation: true
102
- }
103
- },
104
- MuiCard: {
105
- styleOverrides: {
106
- root: {
107
- borderRadius: '12px',
108
- boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)',
109
- },
110
- },
111
- },
112
- MuiTextField: {
113
- styleOverrides: {
114
- root: {
115
- '& .MuiOutlinedInput-root': {
116
- borderRadius: '8px',
117
- },
118
- },
119
- },
120
- },
121
- },
122
- });
123
- };
124
- // Default theme
125
- const theme = createCustomTheme();
126
-
127
- const UILibraryThemeProvider = ({ children, primaryColor, secondaryColor, enableCssBaseline = true, }) => {
128
- const themeConfig = {};
129
- if (primaryColor) {
130
- themeConfig.primaryColor = primaryColor;
131
- }
132
- if (secondaryColor) {
133
- themeConfig.secondaryColor = secondaryColor;
134
- }
135
- const theme = createCustomTheme(themeConfig);
136
- return (jsxRuntime.jsxs(styles.ThemeProvider, { theme: theme, children: [enableCssBaseline && jsxRuntime.jsx(material.CssBaseline, {}), children] }));
137
- };
138
-
139
- exports.UILibraryThemeProvider = UILibraryThemeProvider;
140
- exports.createCustomTheme = createCustomTheme;
141
- exports.designTokens = designTokens;
142
- exports.theme = theme;