@xyo-network/react-theme 2.23.7

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 (54) hide show
  1. package/LICENSE +165 -0
  2. package/README.md +69 -0
  3. package/babel.config.json +5 -0
  4. package/dist/cjs/appThemeOptions.d.ts +2 -0
  5. package/dist/cjs/appThemeOptions.js +28 -0
  6. package/dist/cjs/appThemeOptions.js.map +1 -0
  7. package/dist/cjs/fontFamily.d.ts +1 -0
  8. package/dist/cjs/fontFamily.js +5 -0
  9. package/dist/cjs/fontFamily.js.map +1 -0
  10. package/dist/cjs/index.d.ts +6 -0
  11. package/dist/cjs/index.js +10 -0
  12. package/dist/cjs/index.js.map +1 -0
  13. package/dist/cjs/partialDarkThemeOptions.d.ts +2 -0
  14. package/dist/cjs/partialDarkThemeOptions.js +15 -0
  15. package/dist/cjs/partialDarkThemeOptions.js.map +1 -0
  16. package/dist/cjs/partialLightThemeOptions.d.ts +2 -0
  17. package/dist/cjs/partialLightThemeOptions.js +15 -0
  18. package/dist/cjs/partialLightThemeOptions.js.map +1 -0
  19. package/dist/cjs/themeOptions.d.ts +5 -0
  20. package/dist/cjs/themeOptions.js +103 -0
  21. package/dist/cjs/themeOptions.js.map +1 -0
  22. package/dist/cjs/webThemeOptions.d.ts +2 -0
  23. package/dist/cjs/webThemeOptions.js +9 -0
  24. package/dist/cjs/webThemeOptions.js.map +1 -0
  25. package/dist/docs.json +253 -0
  26. package/dist/esm/appThemeOptions.d.ts +2 -0
  27. package/dist/esm/appThemeOptions.js +24 -0
  28. package/dist/esm/appThemeOptions.js.map +1 -0
  29. package/dist/esm/fontFamily.d.ts +1 -0
  30. package/dist/esm/fontFamily.js +2 -0
  31. package/dist/esm/fontFamily.js.map +1 -0
  32. package/dist/esm/index.d.ts +6 -0
  33. package/dist/esm/index.js +7 -0
  34. package/dist/esm/index.js.map +1 -0
  35. package/dist/esm/partialDarkThemeOptions.d.ts +2 -0
  36. package/dist/esm/partialDarkThemeOptions.js +12 -0
  37. package/dist/esm/partialDarkThemeOptions.js.map +1 -0
  38. package/dist/esm/partialLightThemeOptions.d.ts +2 -0
  39. package/dist/esm/partialLightThemeOptions.js +12 -0
  40. package/dist/esm/partialLightThemeOptions.js.map +1 -0
  41. package/dist/esm/themeOptions.d.ts +5 -0
  42. package/dist/esm/themeOptions.js +99 -0
  43. package/dist/esm/themeOptions.js.map +1 -0
  44. package/dist/esm/webThemeOptions.d.ts +2 -0
  45. package/dist/esm/webThemeOptions.js +5 -0
  46. package/dist/esm/webThemeOptions.js.map +1 -0
  47. package/package.json +135 -0
  48. package/src/appThemeOptions.tsx +29 -0
  49. package/src/fontFamily.ts +1 -0
  50. package/src/index.ts +6 -0
  51. package/src/partialDarkThemeOptions.tsx +13 -0
  52. package/src/partialLightThemeOptions.tsx +13 -0
  53. package/src/themeOptions.ts +105 -0
  54. package/src/webThemeOptions.tsx +8 -0
@@ -0,0 +1,13 @@
1
+ import { ThemeOptions } from '@mui/material'
2
+
3
+ export const partialLightThemeOptions: ThemeOptions = {
4
+ palette: {
5
+ mode: 'light',
6
+ primary: {
7
+ main: '#1f1a66',
8
+ },
9
+ secondary: {
10
+ main: '#0f68c9',
11
+ },
12
+ },
13
+ }
@@ -0,0 +1,105 @@
1
+ import { ThemeOptions } from '@mui/material'
2
+ import merge from 'lodash/merge'
3
+
4
+ import { fontFamilyPrimary } from './fontFamily'
5
+ import { partialLightThemeOptions } from './partialLightThemeOptions'
6
+
7
+ export const components: ThemeOptions['components'] = {
8
+ MuiCard: {
9
+ styleOverrides: {
10
+ root: {
11
+ display: 'flex',
12
+ flexDirection: 'column',
13
+ justifyContent: 'space-between',
14
+ },
15
+ },
16
+ },
17
+ MuiCardHeader: {
18
+ styleOverrides: {
19
+ content: {
20
+ display: 'flex',
21
+ flexDirection: 'column',
22
+ overflow: 'hidden',
23
+ },
24
+ },
25
+ },
26
+ MuiLink: {
27
+ defaultProps: {
28
+ underline: 'none',
29
+ },
30
+ styleOverrides: {
31
+ root: {
32
+ '&:hover': {
33
+ filter: 'brightness(75%)',
34
+ },
35
+ },
36
+ },
37
+ },
38
+ }
39
+
40
+ const lowerFontWeight = 400
41
+
42
+ export const typography: ThemeOptions['typography'] = {
43
+ body1: {
44
+ fontWeight: 400,
45
+ lineHeight: 1.57,
46
+ },
47
+ body2: {
48
+ lineHeight: 1.57,
49
+ },
50
+ button: {
51
+ fontSize: '1rem',
52
+ fontWeight: 500,
53
+ textTransform: 'inherit',
54
+ },
55
+ fontFamily: fontFamilyPrimary,
56
+ fontWeightBold: 700,
57
+ fontWeightLight: 200,
58
+ fontWeightMedium: 600,
59
+ fontWeightRegular: 400,
60
+ h1: {
61
+ fontFamily: fontFamilyPrimary,
62
+ fontSize: '4rem',
63
+ fontWeight: 200,
64
+ },
65
+ h2: {
66
+ fontFamily: fontFamilyPrimary,
67
+ fontSize: '2.4rem',
68
+ fontWeight: lowerFontWeight,
69
+ },
70
+ h3: {
71
+ fontFamily: fontFamilyPrimary,
72
+ fontSize: '2.24rem',
73
+ fontWeight: lowerFontWeight,
74
+ },
75
+ h4: {
76
+ fontSize: '2rem',
77
+ fontWeight: lowerFontWeight,
78
+ },
79
+ h5: {
80
+ fontSize: '1.5rem',
81
+ fontWeight: lowerFontWeight,
82
+ },
83
+ h6: {
84
+ fontSize: '1.25rem',
85
+ fontWeight: lowerFontWeight,
86
+ },
87
+ subtitle1: {
88
+ opacity: '50%',
89
+ textTransform: 'uppercase',
90
+ },
91
+ subtitle2: {
92
+ opacity: '50%',
93
+ },
94
+ }
95
+
96
+ export const baseThemeOptions: ThemeOptions = {
97
+ components,
98
+ shape: {
99
+ borderRadius: 4,
100
+ },
101
+ spacing: 12,
102
+ typography,
103
+ }
104
+
105
+ export const themeOptions = merge({}, baseThemeOptions, partialLightThemeOptions)
@@ -0,0 +1,8 @@
1
+ import { ThemeOptions } from '@mui/material'
2
+ import merge from 'lodash/merge'
3
+
4
+ import { themeOptions } from './themeOptions'
5
+
6
+ const partialWebThemeOptions: ThemeOptions = {}
7
+
8
+ export const webThemeOptions = merge({}, themeOptions, partialWebThemeOptions)