@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
package/dist/docs.json ADDED
@@ -0,0 +1,253 @@
1
+ {
2
+ "id": 0,
3
+ "name": "@xyo-network/react-theme",
4
+ "kind": 1,
5
+ "kindString": "Project",
6
+ "flags": {},
7
+ "originalName": "",
8
+ "children": [
9
+ {
10
+ "id": 1,
11
+ "name": "appThemeOptions",
12
+ "kind": 32,
13
+ "kindString": "Variable",
14
+ "flags": {
15
+ "isConst": true
16
+ },
17
+ "sources": [
18
+ {
19
+ "fileName": "appThemeOptions.tsx",
20
+ "line": 29,
21
+ "character": 13
22
+ }
23
+ ],
24
+ "type": {
25
+ "type": "reference",
26
+ "qualifiedName": "ThemeOptions",
27
+ "package": "@mui/material",
28
+ "name": "ThemeOptions"
29
+ },
30
+ "defaultValue": "..."
31
+ },
32
+ {
33
+ "id": 7,
34
+ "name": "baseThemeOptions",
35
+ "kind": 32,
36
+ "kindString": "Variable",
37
+ "flags": {
38
+ "isConst": true
39
+ },
40
+ "sources": [
41
+ {
42
+ "fileName": "themeOptions.ts",
43
+ "line": 96,
44
+ "character": 13
45
+ }
46
+ ],
47
+ "type": {
48
+ "type": "reference",
49
+ "qualifiedName": "ThemeOptions",
50
+ "package": "@mui/material",
51
+ "name": "ThemeOptions"
52
+ },
53
+ "defaultValue": "..."
54
+ },
55
+ {
56
+ "id": 5,
57
+ "name": "components",
58
+ "kind": 32,
59
+ "kindString": "Variable",
60
+ "flags": {
61
+ "isConst": true
62
+ },
63
+ "sources": [
64
+ {
65
+ "fileName": "themeOptions.ts",
66
+ "line": 7,
67
+ "character": 13
68
+ }
69
+ ],
70
+ "type": {
71
+ "type": "indexedAccess",
72
+ "indexType": {
73
+ "type": "literal",
74
+ "value": "components"
75
+ },
76
+ "objectType": {
77
+ "type": "reference",
78
+ "qualifiedName": "ThemeOptions",
79
+ "package": "@mui/material",
80
+ "name": "ThemeOptions"
81
+ }
82
+ },
83
+ "defaultValue": "..."
84
+ },
85
+ {
86
+ "id": 2,
87
+ "name": "fontFamilyPrimary",
88
+ "kind": 32,
89
+ "kindString": "Variable",
90
+ "flags": {
91
+ "isConst": true
92
+ },
93
+ "sources": [
94
+ {
95
+ "fileName": "fontFamily.ts",
96
+ "line": 1,
97
+ "character": 13
98
+ }
99
+ ],
100
+ "type": {
101
+ "type": "intrinsic",
102
+ "name": "string"
103
+ },
104
+ "defaultValue": "..."
105
+ },
106
+ {
107
+ "id": 3,
108
+ "name": "partialDarkThemeOptions",
109
+ "kind": 32,
110
+ "kindString": "Variable",
111
+ "flags": {
112
+ "isConst": true
113
+ },
114
+ "sources": [
115
+ {
116
+ "fileName": "partialDarkThemeOptions.tsx",
117
+ "line": 3,
118
+ "character": 13
119
+ }
120
+ ],
121
+ "type": {
122
+ "type": "reference",
123
+ "qualifiedName": "ThemeOptions",
124
+ "package": "@mui/material",
125
+ "name": "ThemeOptions"
126
+ },
127
+ "defaultValue": "..."
128
+ },
129
+ {
130
+ "id": 4,
131
+ "name": "partialLightThemeOptions",
132
+ "kind": 32,
133
+ "kindString": "Variable",
134
+ "flags": {
135
+ "isConst": true
136
+ },
137
+ "sources": [
138
+ {
139
+ "fileName": "partialLightThemeOptions.tsx",
140
+ "line": 3,
141
+ "character": 13
142
+ }
143
+ ],
144
+ "type": {
145
+ "type": "reference",
146
+ "qualifiedName": "ThemeOptions",
147
+ "package": "@mui/material",
148
+ "name": "ThemeOptions"
149
+ },
150
+ "defaultValue": "..."
151
+ },
152
+ {
153
+ "id": 8,
154
+ "name": "themeOptions",
155
+ "kind": 32,
156
+ "kindString": "Variable",
157
+ "flags": {
158
+ "isConst": true
159
+ },
160
+ "sources": [
161
+ {
162
+ "fileName": "themeOptions.ts",
163
+ "line": 105,
164
+ "character": 13
165
+ }
166
+ ],
167
+ "type": {
168
+ "type": "reference",
169
+ "qualifiedName": "ThemeOptions",
170
+ "package": "@mui/material",
171
+ "name": "ThemeOptions"
172
+ },
173
+ "defaultValue": "..."
174
+ },
175
+ {
176
+ "id": 6,
177
+ "name": "typography",
178
+ "kind": 32,
179
+ "kindString": "Variable",
180
+ "flags": {
181
+ "isConst": true
182
+ },
183
+ "sources": [
184
+ {
185
+ "fileName": "themeOptions.ts",
186
+ "line": 42,
187
+ "character": 13
188
+ }
189
+ ],
190
+ "type": {
191
+ "type": "indexedAccess",
192
+ "indexType": {
193
+ "type": "literal",
194
+ "value": "typography"
195
+ },
196
+ "objectType": {
197
+ "type": "reference",
198
+ "qualifiedName": "ThemeOptions",
199
+ "package": "@mui/material",
200
+ "name": "ThemeOptions"
201
+ }
202
+ },
203
+ "defaultValue": "..."
204
+ },
205
+ {
206
+ "id": 9,
207
+ "name": "webThemeOptions",
208
+ "kind": 32,
209
+ "kindString": "Variable",
210
+ "flags": {
211
+ "isConst": true
212
+ },
213
+ "sources": [
214
+ {
215
+ "fileName": "webThemeOptions.tsx",
216
+ "line": 8,
217
+ "character": 13
218
+ }
219
+ ],
220
+ "type": {
221
+ "type": "reference",
222
+ "qualifiedName": "ThemeOptions",
223
+ "package": "@mui/material",
224
+ "name": "ThemeOptions"
225
+ },
226
+ "defaultValue": "..."
227
+ }
228
+ ],
229
+ "groups": [
230
+ {
231
+ "title": "Variables",
232
+ "kind": 32,
233
+ "children": [
234
+ 1,
235
+ 7,
236
+ 5,
237
+ 2,
238
+ 3,
239
+ 4,
240
+ 8,
241
+ 6,
242
+ 9
243
+ ]
244
+ }
245
+ ],
246
+ "sources": [
247
+ {
248
+ "fileName": "index.ts",
249
+ "line": 1,
250
+ "character": 0
251
+ }
252
+ ]
253
+ }
@@ -0,0 +1,2 @@
1
+ import { ThemeOptions } from '@mui/material';
2
+ export declare const appThemeOptions: ThemeOptions;
@@ -0,0 +1,24 @@
1
+ import merge from 'lodash/merge';
2
+ import { themeOptions } from './themeOptions';
3
+ const partialAppThemeOptions = {
4
+ components: {
5
+ MuiTypography: {
6
+ styleOverrides: {
7
+ root: ({ ownerState }) => {
8
+ const { clamped } = ownerState;
9
+ if (clamped) {
10
+ const maxWidth = parseInt(clamped, 10);
11
+ return {
12
+ overflow: 'hidden',
13
+ textOverflow: 'ellipsis',
14
+ whiteSpace: 'nowrap',
15
+ width: `clamp(1%, 100%, ${maxWidth}px)`,
16
+ };
17
+ }
18
+ },
19
+ },
20
+ },
21
+ },
22
+ };
23
+ export const appThemeOptions = merge({}, themeOptions, partialAppThemeOptions);
24
+ //# sourceMappingURL=appThemeOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appThemeOptions.js","sourceRoot":"","sources":["../../src/appThemeOptions.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,cAAc,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,MAAM,sBAAsB,GAAiB;IAC3C,UAAU,EAAE;QACV,aAAa,EAAE;YACb,cAAc,EAAE;gBACd,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE;oBACvB,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAA;oBAE9B,IAAI,OAAO,EAAE;wBACX,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAiB,EAAE,EAAE,CAAC,CAAA;wBAEhD,OAAO;4BACL,QAAQ,EAAE,QAAQ;4BAClB,YAAY,EAAE,UAAU;4BACxB,UAAU,EAAE,QAAQ;4BACpB,KAAK,EAAE,mBAAmB,QAAQ,KAAK;yBACxC,CAAA;qBACF;gBACH,CAAC;aACF;SACF;KACF;CACF,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,EAAE,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export declare const fontFamilyPrimary: string;
@@ -0,0 +1,2 @@
1
+ export const fontFamilyPrimary = ['Lexend Deca', 'Helvetica', 'sans-serif'].join(',');
2
+ //# sourceMappingURL=fontFamily.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fontFamily.js","sourceRoot":"","sources":["../../src/fontFamily.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,aAAa,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from './appThemeOptions';
2
+ export * from './fontFamily';
3
+ export * from './partialDarkThemeOptions';
4
+ export * from './partialLightThemeOptions';
5
+ export * from './themeOptions';
6
+ export * from './webThemeOptions';
@@ -0,0 +1,7 @@
1
+ export * from './appThemeOptions';
2
+ export * from './fontFamily';
3
+ export * from './partialDarkThemeOptions';
4
+ export * from './partialLightThemeOptions';
5
+ export * from './themeOptions';
6
+ export * from './webThemeOptions';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { ThemeOptions } from '@mui/material';
2
+ export declare const partialDarkThemeOptions: ThemeOptions;
@@ -0,0 +1,12 @@
1
+ export const partialDarkThemeOptions = {
2
+ palette: {
3
+ mode: 'dark',
4
+ primary: {
5
+ main: '#db8dfa',
6
+ },
7
+ secondary: {
8
+ main: '#5898dd',
9
+ },
10
+ },
11
+ };
12
+ //# sourceMappingURL=partialDarkThemeOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partialDarkThemeOptions.js","sourceRoot":"","sources":["../../src/partialDarkThemeOptions.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,uBAAuB,GAAiB;IACnD,OAAO,EAAE;QACP,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;SAChB;QACD,SAAS,EAAE;YACT,IAAI,EAAE,SAAS;SAChB;KACF;CACF,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { ThemeOptions } from '@mui/material';
2
+ export declare const partialLightThemeOptions: ThemeOptions;
@@ -0,0 +1,12 @@
1
+ export const partialLightThemeOptions = {
2
+ palette: {
3
+ mode: 'light',
4
+ primary: {
5
+ main: '#1f1a66',
6
+ },
7
+ secondary: {
8
+ main: '#0f68c9',
9
+ },
10
+ },
11
+ };
12
+ //# sourceMappingURL=partialLightThemeOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partialLightThemeOptions.js","sourceRoot":"","sources":["../../src/partialLightThemeOptions.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,wBAAwB,GAAiB;IACpD,OAAO,EAAE;QACP,IAAI,EAAE,OAAO;QACb,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;SAChB;QACD,SAAS,EAAE;YACT,IAAI,EAAE,SAAS;SAChB;KACF;CACF,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { ThemeOptions } from '@mui/material';
2
+ export declare const components: ThemeOptions['components'];
3
+ export declare const typography: ThemeOptions['typography'];
4
+ export declare const baseThemeOptions: ThemeOptions;
5
+ export declare const themeOptions: ThemeOptions;
@@ -0,0 +1,99 @@
1
+ import merge from 'lodash/merge';
2
+ import { fontFamilyPrimary } from './fontFamily';
3
+ import { partialLightThemeOptions } from './partialLightThemeOptions';
4
+ export const components = {
5
+ MuiCard: {
6
+ styleOverrides: {
7
+ root: {
8
+ display: 'flex',
9
+ flexDirection: 'column',
10
+ justifyContent: 'space-between',
11
+ },
12
+ },
13
+ },
14
+ MuiCardHeader: {
15
+ styleOverrides: {
16
+ content: {
17
+ display: 'flex',
18
+ flexDirection: 'column',
19
+ overflow: 'hidden',
20
+ },
21
+ },
22
+ },
23
+ MuiLink: {
24
+ defaultProps: {
25
+ underline: 'none',
26
+ },
27
+ styleOverrides: {
28
+ root: {
29
+ '&:hover': {
30
+ filter: 'brightness(75%)',
31
+ },
32
+ },
33
+ },
34
+ },
35
+ };
36
+ const lowerFontWeight = 400;
37
+ export const typography = {
38
+ body1: {
39
+ fontWeight: 400,
40
+ lineHeight: 1.57,
41
+ },
42
+ body2: {
43
+ lineHeight: 1.57,
44
+ },
45
+ button: {
46
+ fontSize: '1rem',
47
+ fontWeight: 500,
48
+ textTransform: 'inherit',
49
+ },
50
+ fontFamily: fontFamilyPrimary,
51
+ fontWeightBold: 700,
52
+ fontWeightLight: 200,
53
+ fontWeightMedium: 600,
54
+ fontWeightRegular: 400,
55
+ h1: {
56
+ fontFamily: fontFamilyPrimary,
57
+ fontSize: '4rem',
58
+ fontWeight: 200,
59
+ },
60
+ h2: {
61
+ fontFamily: fontFamilyPrimary,
62
+ fontSize: '2.4rem',
63
+ fontWeight: lowerFontWeight,
64
+ },
65
+ h3: {
66
+ fontFamily: fontFamilyPrimary,
67
+ fontSize: '2.24rem',
68
+ fontWeight: lowerFontWeight,
69
+ },
70
+ h4: {
71
+ fontSize: '2rem',
72
+ fontWeight: lowerFontWeight,
73
+ },
74
+ h5: {
75
+ fontSize: '1.5rem',
76
+ fontWeight: lowerFontWeight,
77
+ },
78
+ h6: {
79
+ fontSize: '1.25rem',
80
+ fontWeight: lowerFontWeight,
81
+ },
82
+ subtitle1: {
83
+ opacity: '50%',
84
+ textTransform: 'uppercase',
85
+ },
86
+ subtitle2: {
87
+ opacity: '50%',
88
+ },
89
+ };
90
+ export const baseThemeOptions = {
91
+ components,
92
+ shape: {
93
+ borderRadius: 4,
94
+ },
95
+ spacing: 12,
96
+ typography,
97
+ };
98
+ export const themeOptions = merge({}, baseThemeOptions, partialLightThemeOptions);
99
+ //# sourceMappingURL=themeOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themeOptions.js","sourceRoot":"","sources":["../../src/themeOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,cAAc,CAAA;AAEhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAErE,MAAM,CAAC,MAAM,UAAU,GAA+B;IACpD,OAAO,EAAE;QACP,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,OAAO,EAAE,MAAM;gBACf,aAAa,EAAE,QAAQ;gBACvB,cAAc,EAAE,eAAe;aAChC;SACF;KACF;IACD,aAAa,EAAE;QACb,cAAc,EAAE;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,MAAM;gBACf,aAAa,EAAE,QAAQ;gBACvB,QAAQ,EAAE,QAAQ;aACnB;SACF;KACF;IACD,OAAO,EAAE;QACP,YAAY,EAAE;YACZ,SAAS,EAAE,MAAM;SAClB;QACD,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,SAAS,EAAE;oBACT,MAAM,EAAE,iBAAiB;iBAC1B;aACF;SACF;KACF;CACF,CAAA;AAED,MAAM,eAAe,GAAG,GAAG,CAAA;AAE3B,MAAM,CAAC,MAAM,UAAU,GAA+B;IACpD,KAAK,EAAE;QACL,UAAU,EAAE,GAAG;QACf,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,UAAU,EAAE,IAAI;KACjB;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,GAAG;QACf,aAAa,EAAE,SAAS;KACzB;IACD,UAAU,EAAE,iBAAiB;IAC7B,cAAc,EAAE,GAAG;IACnB,eAAe,EAAE,GAAG;IACpB,gBAAgB,EAAE,GAAG;IACrB,iBAAiB,EAAE,GAAG;IACtB,EAAE,EAAE;QACF,UAAU,EAAE,iBAAiB;QAC7B,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,GAAG;KAChB;IACD,EAAE,EAAE;QACF,UAAU,EAAE,iBAAiB;QAC7B,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,eAAe;KAC5B;IACD,EAAE,EAAE;QACF,UAAU,EAAE,iBAAiB;QAC7B,QAAQ,EAAE,SAAS;QACnB,UAAU,EAAE,eAAe;KAC5B;IACD,EAAE,EAAE;QACF,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,eAAe;KAC5B;IACD,EAAE,EAAE;QACF,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,eAAe;KAC5B;IACD,EAAE,EAAE;QACF,QAAQ,EAAE,SAAS;QACnB,UAAU,EAAE,eAAe;KAC5B;IACD,SAAS,EAAE;QACT,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,WAAW;KAC3B;IACD,SAAS,EAAE;QACT,OAAO,EAAE,KAAK;KACf;CACF,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC5C,UAAU;IACV,KAAK,EAAE;QACL,YAAY,EAAE,CAAC;KAChB;IACD,OAAO,EAAE,EAAE;IACX,UAAU;CACX,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,EAAE,EAAE,gBAAgB,EAAE,wBAAwB,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { ThemeOptions } from '@mui/material';
2
+ export declare const webThemeOptions: ThemeOptions;
@@ -0,0 +1,5 @@
1
+ import merge from 'lodash/merge';
2
+ import { themeOptions } from './themeOptions';
3
+ const partialWebThemeOptions = {};
4
+ export const webThemeOptions = merge({}, themeOptions, partialWebThemeOptions);
5
+ //# sourceMappingURL=webThemeOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webThemeOptions.js","sourceRoot":"","sources":["../../src/webThemeOptions.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,cAAc,CAAA;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,MAAM,sBAAsB,GAAiB,EAAE,CAAA;AAE/C,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,EAAE,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,135 @@
1
+ {
2
+ "name": "@xyo-network/react-theme",
3
+ "author": {
4
+ "email": "support@xyo.network",
5
+ "name": "XYO Development Team",
6
+ "url": "https://xyo.network"
7
+ },
8
+ "bugs": {
9
+ "email": "support@xyo.network",
10
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
11
+ },
12
+ "workspaces": [
13
+ "packages/*"
14
+ ],
15
+ "dependencies": {
16
+ "@emotion/react": "^11.9.0",
17
+ "@emotion/styled": "^11.8.1",
18
+ "@mui/icons-material": "^5.8.0",
19
+ "@mui/lab": "^5.0.0-alpha.83",
20
+ "@mui/material": "^5.8.1",
21
+ "@xylabs/pixel": "^1.3.7",
22
+ "@xylabs/sdk-js": "^2.5.5",
23
+ "@xylabs/sdk-react": "^2.12.7",
24
+ "@xyo-network/api": "^2.20.33",
25
+ "@xyo-network/core": "^2.20.33",
26
+ "@xyo-network/network": "^2.20.33",
27
+ "@xyo-network/panel": "^2.20.33",
28
+ "@xyo-network/systeminfo-witness": "^2.20.33",
29
+ "@xyo-network/utils": "^2.20.33",
30
+ "lodash": "^4.17.21",
31
+ "luxon": "^2.4.0",
32
+ "react": "^18.1.0",
33
+ "react-dom": "^18.1.0",
34
+ "react-icons": "^4.3.1",
35
+ "react-json-view": "^1.21.3",
36
+ "react-router-dom": "^6.3.0",
37
+ "rollbar": "^2.25.0",
38
+ "typedoc": "^0.22.15"
39
+ },
40
+ "description": "Common React library for all XYO projects that use React",
41
+ "devDependencies": {
42
+ "@babel/core": "^7.18.0",
43
+ "@babel/preset-env": "^7.18.0",
44
+ "@storybook/addon-actions": "^6.5.4",
45
+ "@storybook/addon-docs": "^6.5.4",
46
+ "@storybook/addon-essentials": "^6.5.4",
47
+ "@storybook/addon-interactions": "^6.5.4",
48
+ "@storybook/addon-links": "^6.5.4",
49
+ "@storybook/addons": "^6.5.4",
50
+ "@storybook/api": "^6.5.4",
51
+ "@storybook/builder-webpack5": "^6.5.4",
52
+ "@storybook/components": "^6.5.4",
53
+ "@storybook/core-events": "^6.5.4",
54
+ "@storybook/manager-webpack5": "^6.5.4",
55
+ "@storybook/react": "^6.5.4",
56
+ "@storybook/testing-library": "^0.0.11",
57
+ "@storybook/theming": "^6.5.4",
58
+ "@types/lodash": "^4.14.182",
59
+ "@types/luxon": "^2.3.2",
60
+ "@xylabs/eslint-config-react": "^2.1.5",
61
+ "@xylabs/pixel": "^1.3.7",
62
+ "@xylabs/rollup-config": "^1.1.17",
63
+ "@xylabs/sdk-js": "^2.5.5",
64
+ "@xylabs/sdk-react": "^2.12.7",
65
+ "@xylabs/ts-scripts": "^1.0.66",
66
+ "@xylabs/tsconfig": "^1.0.13",
67
+ "assert": "^2.0.0",
68
+ "axios": "^0.27.2",
69
+ "storybook-dark-mode": "^1.1.0",
70
+ "typescript": "^4.6.4"
71
+ },
72
+ "browser": "dist/esm/index.js",
73
+ "docs": "dist/docs.json",
74
+ "exports": {
75
+ ".": {
76
+ "node": {
77
+ "import": "./dist/esm/index.js",
78
+ "require": "./dist/cjs/index.js"
79
+ },
80
+ "browser": {
81
+ "import": "./dist/esm/index.js",
82
+ "require": "./dist/cjs/index.js"
83
+ },
84
+ "default": "./dist/esm/index.js"
85
+ },
86
+ "./dist/docs.json": {
87
+ "default": "./dist/docs.json"
88
+ },
89
+ "./package.json": "./package.json"
90
+ },
91
+ "main": "dist/cjs/index.js",
92
+ "module": "dist/esm/index.js",
93
+ "homepage": "https://xyo.network",
94
+ "keywords": [
95
+ "xyo",
96
+ "utility",
97
+ "typescript",
98
+ "react"
99
+ ],
100
+ "license": "LGPL-3.0",
101
+ "peerDependencies": {
102
+ "axios": ">0.26",
103
+ "typedoc": "^0.22.13"
104
+ },
105
+ "peerDependenciesMeta": {
106
+ "typedoc": {
107
+ "optional": true
108
+ }
109
+ },
110
+ "resolutions": {
111
+ "@storybook/react/webpack": "^5",
112
+ "bn.js": "^5.2.0",
113
+ "react": "^18.1.0",
114
+ "react-dom": "^18.1.0",
115
+ "webpack": "^5"
116
+ },
117
+ "publishConfig": {
118
+ "access": "public"
119
+ },
120
+ "repository": {
121
+ "type": "git",
122
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
123
+ },
124
+ "scripts": {
125
+ "deploy": "yarn deploy3",
126
+ "lint-pkg": "npmPkgJsonLint .",
127
+ "build": "yarn clean && tsc -p tsconfig.build.cjs.json && tsc -p tsconfig.build.esm.json && yarn gen:docs",
128
+ "gen:docs": "typedoc ./src/index.ts --json ./dist/docs.json --tsconfig ./tsconfig.json",
129
+ "license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\""
130
+ },
131
+ "sideEffects": false,
132
+ "types": "dist/esm/index.d.ts",
133
+ "version": "2.23.7",
134
+ "packageManager": "yarn@3.1.1"
135
+ }
@@ -0,0 +1,29 @@
1
+ import { ThemeOptions } from '@mui/material'
2
+ import merge from 'lodash/merge'
3
+
4
+ import { themeOptions } from './themeOptions'
5
+
6
+ const partialAppThemeOptions: ThemeOptions = {
7
+ components: {
8
+ MuiTypography: {
9
+ styleOverrides: {
10
+ root: ({ ownerState }) => {
11
+ const { clamped } = ownerState
12
+
13
+ if (clamped) {
14
+ const maxWidth = parseInt(clamped as string, 10)
15
+
16
+ return {
17
+ overflow: 'hidden',
18
+ textOverflow: 'ellipsis',
19
+ whiteSpace: 'nowrap',
20
+ width: `clamp(1%, 100%, ${maxWidth}px)`,
21
+ }
22
+ }
23
+ },
24
+ },
25
+ },
26
+ },
27
+ }
28
+
29
+ export const appThemeOptions = merge({}, themeOptions, partialAppThemeOptions)
@@ -0,0 +1 @@
1
+ export const fontFamilyPrimary = ['Lexend Deca', 'Helvetica', 'sans-serif'].join(',')
package/src/index.ts ADDED
@@ -0,0 +1,6 @@
1
+ export * from './appThemeOptions'
2
+ export * from './fontFamily'
3
+ export * from './partialDarkThemeOptions'
4
+ export * from './partialLightThemeOptions'
5
+ export * from './themeOptions'
6
+ export * from './webThemeOptions'
@@ -0,0 +1,13 @@
1
+ import { ThemeOptions } from '@mui/material'
2
+
3
+ export const partialDarkThemeOptions: ThemeOptions = {
4
+ palette: {
5
+ mode: 'dark',
6
+ primary: {
7
+ main: '#db8dfa',
8
+ },
9
+ secondary: {
10
+ main: '#5898dd',
11
+ },
12
+ },
13
+ }