react-native-mantine 0.8.0 → 0.10.0
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/lib/commonjs/components/Button/index.js +52 -17
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Code/index.js +3 -1
- package/lib/commonjs/components/Code/index.js.map +1 -1
- package/lib/commonjs/components/Gradient/Gradient.js +70 -0
- package/lib/commonjs/components/Gradient/Gradient.js.map +1 -0
- package/lib/commonjs/components/Gradient/index.js +19 -0
- package/lib/commonjs/components/Gradient/index.js.map +1 -0
- package/lib/commonjs/components/Modal/index.js +33 -3
- package/lib/commonjs/components/Modal/index.js.map +1 -1
- package/lib/commonjs/components/Paper/index.js +1 -76
- package/lib/commonjs/components/Paper/index.js.map +1 -1
- package/lib/commonjs/components/Switch/index.js +6 -2
- package/lib/commonjs/components/Switch/index.js.map +1 -1
- package/lib/commonjs/components/Text/index.js +27 -8
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/ThemeIcon/index.js +6 -4
- package/lib/commonjs/components/ThemeIcon/index.js.map +1 -1
- package/lib/commonjs/components/Title/index.js +7 -3
- package/lib/commonjs/components/Title/index.js.map +1 -1
- package/lib/commonjs/components/index.js +33 -22
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/theme/create-theme.js +3 -5
- package/lib/commonjs/theme/create-theme.js.map +1 -1
- package/lib/commonjs/theme/default-theme.js +168 -21
- package/lib/commonjs/theme/default-theme.js.map +1 -1
- package/lib/commonjs/theme/functions/attach-functions.js +7 -1
- package/lib/commonjs/theme/functions/attach-functions.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/breakpoints.js +69 -0
- package/lib/commonjs/theme/functions/fns/breakpoints.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/darken.js +25 -0
- package/lib/commonjs/theme/functions/fns/darken.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/dimmed.js +19 -0
- package/lib/commonjs/theme/functions/fns/dimmed.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/gradient/gradient.js +78 -0
- package/lib/commonjs/theme/functions/fns/gradient/gradient.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/helpers.js +1 -2
- package/lib/commonjs/theme/functions/fns/helpers.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/index.js +15 -0
- package/lib/commonjs/theme/functions/fns/index.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/lighten.js +24 -0
- package/lib/commonjs/theme/functions/fns/lighten.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/primary-shade.js +18 -0
- package/lib/commonjs/theme/functions/fns/primary-shade.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/shadow.js +107 -0
- package/lib/commonjs/theme/functions/fns/shadow.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js +3 -2
- package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/variant.js +7 -6
- package/lib/commonjs/theme/functions/fns/variant.js.map +1 -1
- package/lib/commonjs/theme/index.js +14 -0
- package/lib/commonjs/theme/index.js.map +1 -1
- package/lib/commonjs/theme/theme-provider.js +10 -3
- package/lib/commonjs/theme/theme-provider.js.map +1 -1
- package/lib/commonjs/theme/utils/to-rgba.js +57 -0
- package/lib/commonjs/theme/utils/to-rgba.js.map +1 -0
- package/lib/module/components/Button/index.js +53 -18
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Code/index.js +3 -1
- package/lib/module/components/Code/index.js.map +1 -1
- package/lib/module/components/Gradient/Gradient.js +64 -0
- package/lib/module/components/Gradient/Gradient.js.map +1 -0
- package/lib/module/components/Gradient/index.js +4 -0
- package/lib/module/components/Gradient/index.js.map +1 -0
- package/lib/module/components/Modal/index.js +35 -5
- package/lib/module/components/Modal/index.js.map +1 -1
- package/lib/module/components/Paper/index.js +1 -76
- package/lib/module/components/Paper/index.js.map +1 -1
- package/lib/module/components/Switch/index.js +6 -2
- package/lib/module/components/Switch/index.js.map +1 -1
- package/lib/module/components/Text/index.js +27 -8
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/ThemeIcon/index.js +6 -4
- package/lib/module/components/ThemeIcon/index.js.map +1 -1
- package/lib/module/components/Title/index.js +7 -3
- package/lib/module/components/Title/index.js.map +1 -1
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/theme/create-theme.js +3 -5
- package/lib/module/theme/create-theme.js.map +1 -1
- package/lib/module/theme/default-theme.js +168 -21
- package/lib/module/theme/default-theme.js.map +1 -1
- package/lib/module/theme/functions/attach-functions.js +7 -1
- package/lib/module/theme/functions/attach-functions.js.map +1 -1
- package/lib/module/theme/functions/fns/breakpoints.js +64 -0
- package/lib/module/theme/functions/fns/breakpoints.js.map +1 -0
- package/lib/module/theme/functions/fns/darken.js +22 -0
- package/lib/module/theme/functions/fns/darken.js.map +1 -0
- package/lib/module/theme/functions/fns/dimmed.js +15 -0
- package/lib/module/theme/functions/fns/dimmed.js.map +1 -0
- package/lib/module/theme/functions/fns/gradient/gradient.js +74 -0
- package/lib/module/theme/functions/fns/gradient/gradient.js.map +1 -0
- package/lib/module/theme/functions/fns/helpers.js +1 -2
- package/lib/module/theme/functions/fns/helpers.js.map +1 -1
- package/lib/module/theme/functions/fns/index.js +15 -0
- package/lib/module/theme/functions/fns/index.js.map +1 -1
- package/lib/module/theme/functions/fns/lighten.js +21 -0
- package/lib/module/theme/functions/fns/lighten.js.map +1 -0
- package/lib/module/theme/functions/fns/primary-shade.js +14 -0
- package/lib/module/theme/functions/fns/primary-shade.js.map +1 -0
- package/lib/module/theme/functions/fns/shadow.js +103 -0
- package/lib/module/theme/functions/fns/shadow.js.map +1 -0
- package/lib/module/theme/functions/fns/theme-color/theme-color.js +3 -2
- package/lib/module/theme/functions/fns/theme-color/theme-color.js.map +1 -1
- package/lib/module/theme/functions/fns/variant.js +7 -6
- package/lib/module/theme/functions/fns/variant.js.map +1 -1
- package/lib/module/theme/index.js +2 -0
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/theme-provider.js +10 -3
- package/lib/module/theme/theme-provider.js.map +1 -1
- package/lib/module/theme/utils/to-rgba.js +53 -0
- package/lib/module/theme/utils/to-rgba.js.map +1 -0
- package/lib/typescript/commonjs/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Code/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Gradient/Gradient.d.ts +32 -0
- package/lib/typescript/commonjs/src/components/Gradient/Gradient.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Gradient/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/components/Gradient/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Modal/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Paper/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Switch/index.d.ts +3 -3
- package/lib/typescript/commonjs/src/components/Switch/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/ThemeIcon/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Title/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/create-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/default-theme.d.ts +34 -3
- package/lib/typescript/commonjs/src/theme/default-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/breakpoints.d.ts +15 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/breakpoints.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/darken.d.ts +8 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/darken.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/dimmed.d.ts +9 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/dimmed.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/gradient/gradient.d.ts +13 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/gradient/gradient.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts +1 -2
- package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts +16 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/lighten.d.ts +8 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/lighten.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/primary-shade.d.ts +7 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/primary-shade.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/shadow.d.ts +24 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/shadow.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/theme-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/utils/to-rgba.d.ts +9 -0
- package/lib/typescript/commonjs/src/theme/utils/to-rgba.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Code/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Gradient/Gradient.d.ts +32 -0
- package/lib/typescript/module/src/components/Gradient/Gradient.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Gradient/index.d.ts +3 -0
- package/lib/typescript/module/src/components/Gradient/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Modal/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Paper/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Switch/index.d.ts +3 -3
- package/lib/typescript/module/src/components/Switch/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/ThemeIcon/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Title/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/index.d.ts +1 -0
- package/lib/typescript/module/src/components/index.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/create-theme.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/default-theme.d.ts +34 -3
- package/lib/typescript/module/src/theme/default-theme.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/attach-functions.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/breakpoints.d.ts +15 -0
- package/lib/typescript/module/src/theme/functions/fns/breakpoints.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/darken.d.ts +8 -0
- package/lib/typescript/module/src/theme/functions/fns/darken.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/dimmed.d.ts +9 -0
- package/lib/typescript/module/src/theme/functions/fns/dimmed.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/gradient/gradient.d.ts +13 -0
- package/lib/typescript/module/src/theme/functions/fns/gradient/gradient.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts +1 -2
- package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/index.d.ts +16 -1
- package/lib/typescript/module/src/theme/functions/fns/index.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/lighten.d.ts +8 -0
- package/lib/typescript/module/src/theme/functions/fns/lighten.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/primary-shade.d.ts +7 -0
- package/lib/typescript/module/src/theme/functions/fns/primary-shade.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/shadow.d.ts +24 -0
- package/lib/typescript/module/src/theme/functions/fns/shadow.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/variant.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/index.d.ts +4 -0
- package/lib/typescript/module/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/theme-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/utils/to-rgba.d.ts +9 -0
- package/lib/typescript/module/src/theme/utils/to-rgba.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/Button/index.tsx +61 -21
- package/src/components/Code/index.tsx +3 -1
- package/src/components/Gradient/Gradient.tsx +71 -0
- package/src/components/Gradient/index.tsx +2 -0
- package/src/components/Modal/index.tsx +33 -3
- package/src/components/Paper/index.tsx +1 -63
- package/src/components/Switch/index.tsx +10 -6
- package/src/components/Text/index.tsx +28 -16
- package/src/components/ThemeIcon/index.tsx +6 -4
- package/src/components/Title/index.tsx +7 -3
- package/src/components/index.tsx +1 -0
- package/src/theme/create-theme.ts +3 -5
- package/src/theme/default-theme.ts +179 -91
- package/src/theme/functions/attach-functions.ts +6 -0
- package/src/theme/functions/fns/breakpoints.ts +62 -0
- package/src/theme/functions/fns/darken.ts +16 -0
- package/src/theme/functions/fns/dimmed.ts +16 -0
- package/src/theme/functions/fns/gradient/gradient.ts +63 -0
- package/src/theme/functions/fns/helpers.ts +1 -2
- package/src/theme/functions/fns/index.ts +15 -0
- package/src/theme/functions/fns/lighten.ts +15 -0
- package/src/theme/functions/fns/primary-shade.ts +17 -0
- package/src/theme/functions/fns/shadow.ts +100 -0
- package/src/theme/functions/fns/theme-color/theme-color.ts +3 -2
- package/src/theme/functions/fns/variant.ts +6 -5
- package/src/theme/index.tsx +4 -0
- package/src/theme/theme-provider.tsx +8 -3
- package/src/theme/theme.d.ts +11 -1
- package/src/theme/utils/to-rgba.ts +69 -0
|
@@ -2,16 +2,14 @@ import { DEFAULT_COLORS, DEFAULT_THEME } from './default-theme';
|
|
|
2
2
|
import type { MantineTheme } from './default-theme';
|
|
3
3
|
|
|
4
4
|
export const createTheme = (theme?: Partial<MantineTheme>): MantineTheme => {
|
|
5
|
-
const { primaryShade
|
|
5
|
+
const { primaryShade, other = {}, components = {} } = theme || {};
|
|
6
6
|
return {
|
|
7
7
|
...DEFAULT_THEME,
|
|
8
|
-
primaryShade
|
|
8
|
+
// Use provided primaryShade or fall back to DEFAULT_THEME's value
|
|
9
|
+
primaryShade: primaryShade !== undefined ? primaryShade : DEFAULT_THEME.primaryShade,
|
|
9
10
|
other: other,
|
|
10
11
|
components: components,
|
|
11
12
|
fontFamily: 'Nunito',
|
|
12
|
-
fontFamilyBold: 'Nunito Bold',
|
|
13
|
-
fontFamilySemiBold: 'Nunito SemiBold',
|
|
14
|
-
fontFamilyInput: 'Nunito',
|
|
15
13
|
primaryColor: 'blue',
|
|
16
14
|
secondaryColor: 'cyan',
|
|
17
15
|
headings: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
1
2
|
import { attachFunctions } from './functions/attach-functions';
|
|
2
3
|
import type { Palette } from './theme';
|
|
3
4
|
|
|
@@ -5,54 +6,42 @@ export const DEFAULT_COLORS: {
|
|
|
5
6
|
[key: string]: Palette;
|
|
6
7
|
} = {
|
|
7
8
|
dark: [
|
|
8
|
-
'#
|
|
9
|
-
'#
|
|
10
|
-
'#
|
|
11
|
-
'#
|
|
12
|
-
'#
|
|
13
|
-
'#
|
|
14
|
-
'#
|
|
15
|
-
'#
|
|
16
|
-
'#
|
|
17
|
-
'#
|
|
9
|
+
'#C1C2C5',
|
|
10
|
+
'#A6A7AB',
|
|
11
|
+
'#909296',
|
|
12
|
+
'#5c5f66',
|
|
13
|
+
'#373A40',
|
|
14
|
+
'#2C2E33',
|
|
15
|
+
'#25262b',
|
|
16
|
+
'#1A1B1E',
|
|
17
|
+
'#141517',
|
|
18
|
+
'#101113',
|
|
18
19
|
],
|
|
19
20
|
|
|
20
21
|
gray: [
|
|
21
|
-
'#
|
|
22
|
-
'#
|
|
23
|
-
'#
|
|
24
|
-
'#
|
|
25
|
-
'#
|
|
26
|
-
'#
|
|
27
|
-
'#
|
|
28
|
-
'#
|
|
29
|
-
'#
|
|
30
|
-
'#
|
|
31
|
-
],
|
|
32
|
-
gray2: [
|
|
33
|
-
'#A3A3A3',
|
|
34
|
-
'#949494',
|
|
35
|
-
'#878787',
|
|
36
|
-
'#7A7A7A',
|
|
37
|
-
'#6F6F6F',
|
|
38
|
-
'#656565',
|
|
39
|
-
'#5C5C5C',
|
|
40
|
-
'#535353',
|
|
41
|
-
'#4B4B4B',
|
|
42
|
-
'#434343',
|
|
22
|
+
'#f8f9fa',
|
|
23
|
+
'#f1f3f5',
|
|
24
|
+
'#e9ecef',
|
|
25
|
+
'#dee2e6',
|
|
26
|
+
'#ced4da',
|
|
27
|
+
'#adb5bd',
|
|
28
|
+
'#868e96',
|
|
29
|
+
'#495057',
|
|
30
|
+
'#343a40',
|
|
31
|
+
'#212529',
|
|
43
32
|
],
|
|
44
33
|
|
|
45
34
|
red: [
|
|
46
|
-
'#
|
|
47
|
-
'#
|
|
48
|
-
'#
|
|
49
|
-
'#
|
|
50
|
-
'#
|
|
51
|
-
'#
|
|
52
|
-
'#
|
|
53
|
-
'#
|
|
54
|
-
'#
|
|
55
|
-
'#
|
|
35
|
+
'#fff5f5',
|
|
36
|
+
'#ffe3e3',
|
|
37
|
+
'#ffc9c9',
|
|
38
|
+
'#ffa8a8',
|
|
39
|
+
'#ff8787',
|
|
40
|
+
'#ff6b6b',
|
|
41
|
+
'#fa5252',
|
|
42
|
+
'#f03e3e',
|
|
43
|
+
'#e03131',
|
|
44
|
+
'#c92a2a',
|
|
56
45
|
],
|
|
57
46
|
|
|
58
47
|
pink: [
|
|
@@ -147,16 +136,16 @@ export const DEFAULT_COLORS: {
|
|
|
147
136
|
],
|
|
148
137
|
|
|
149
138
|
green: [
|
|
150
|
-
'#
|
|
151
|
-
'#
|
|
152
|
-
'#
|
|
153
|
-
'#
|
|
154
|
-
'#
|
|
155
|
-
'#
|
|
156
|
-
'#
|
|
157
|
-
'#
|
|
158
|
-
'#
|
|
159
|
-
'#
|
|
139
|
+
'#ebfbee',
|
|
140
|
+
'#d3f9d8',
|
|
141
|
+
'#b2f2bb',
|
|
142
|
+
'#8ce99a',
|
|
143
|
+
'#69db7c',
|
|
144
|
+
'#51cf66',
|
|
145
|
+
'#40c057',
|
|
146
|
+
'#37b24d',
|
|
147
|
+
'#2f9e44',
|
|
148
|
+
'#2b8a3e',
|
|
160
149
|
],
|
|
161
150
|
|
|
162
151
|
lime: [
|
|
@@ -186,28 +175,16 @@ export const DEFAULT_COLORS: {
|
|
|
186
175
|
],
|
|
187
176
|
|
|
188
177
|
orange: [
|
|
189
|
-
'#
|
|
190
|
-
'#
|
|
191
|
-
'#
|
|
192
|
-
'#
|
|
193
|
-
'#
|
|
194
|
-
'#
|
|
195
|
-
'#
|
|
196
|
-
'#
|
|
197
|
-
'#
|
|
198
|
-
'#
|
|
199
|
-
],
|
|
200
|
-
secondary: [
|
|
201
|
-
'#f4f4f5',
|
|
202
|
-
'#e7e7e7',
|
|
203
|
-
'#cccccc',
|
|
204
|
-
'#afafaf',
|
|
205
|
-
'#989898',
|
|
206
|
-
'#898989',
|
|
207
|
-
'#818181',
|
|
208
|
-
'#6f6f6f',
|
|
209
|
-
'#616164',
|
|
210
|
-
'#545459',
|
|
178
|
+
'#fff4e6',
|
|
179
|
+
'#ffe8cc',
|
|
180
|
+
'#ffd8a8',
|
|
181
|
+
'#ffc078',
|
|
182
|
+
'#ffa94d',
|
|
183
|
+
'#ff922b',
|
|
184
|
+
'#fd7e14',
|
|
185
|
+
'#f76707',
|
|
186
|
+
'#e8590c',
|
|
187
|
+
'#d9480f',
|
|
211
188
|
],
|
|
212
189
|
};
|
|
213
190
|
|
|
@@ -215,18 +192,66 @@ const tintColorLight = '#2f95dc';
|
|
|
215
192
|
const tintColorDark = '#fff';
|
|
216
193
|
|
|
217
194
|
export const _DEFAULT_THEME: MantineTheme = {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
195
|
+
// Font configuration matches Mantine web as closely as possible
|
|
196
|
+
// Web: '-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji'
|
|
197
|
+
// React Native maps to platform-specific system fonts
|
|
198
|
+
fontFamily: Platform.select({
|
|
199
|
+
ios: 'System', // San Francisco (equivalent to -apple-system)
|
|
200
|
+
android: 'Roboto', // Android system font
|
|
201
|
+
default: 'System',
|
|
202
|
+
}),
|
|
203
|
+
// Bold font family - iOS/Android don't always render fontWeight properly
|
|
204
|
+
// so we need separate font families for different weights
|
|
205
|
+
fontFamilyBold: Platform.select({
|
|
206
|
+
ios: 'System', // iOS handles bold via fontWeight with System font
|
|
207
|
+
android: 'Roboto-Bold', // Android needs explicit bold font family
|
|
208
|
+
default: 'System',
|
|
209
|
+
}),
|
|
210
|
+
// SemiBold font family
|
|
211
|
+
fontFamilySemiBold: Platform.select({
|
|
212
|
+
ios: 'System', // iOS handles semibold via fontWeight with System font
|
|
213
|
+
android: 'Roboto-Medium', // Android medium is equivalent to semibold
|
|
214
|
+
default: 'System',
|
|
215
|
+
}),
|
|
216
|
+
// Input font family - separate for form inputs
|
|
217
|
+
fontFamilyInput: Platform.select({
|
|
218
|
+
ios: 'System',
|
|
219
|
+
android: 'Roboto',
|
|
220
|
+
default: 'System',
|
|
221
|
+
}),
|
|
222
|
+
// Web: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace'
|
|
223
|
+
fontFamilyMonospace: Platform.select({
|
|
224
|
+
ios: 'Menlo', // iOS monospace font
|
|
225
|
+
android: 'monospace', // Android monospace font
|
|
226
|
+
default: 'monospace',
|
|
227
|
+
}),
|
|
228
|
+
fontWeights: {
|
|
229
|
+
thin: '100',
|
|
230
|
+
extralight: '200',
|
|
231
|
+
light: '300',
|
|
232
|
+
normal: '400',
|
|
233
|
+
medium: '500',
|
|
234
|
+
semibold: '600',
|
|
235
|
+
bold: '700',
|
|
236
|
+
extrabold: '800',
|
|
237
|
+
black: '900',
|
|
238
|
+
},
|
|
222
239
|
localColor: '#1F2863',
|
|
223
|
-
primaryShade:
|
|
240
|
+
primaryShade: {
|
|
241
|
+
light: 6,
|
|
242
|
+
dark: 8,
|
|
243
|
+
},
|
|
224
244
|
colors: DEFAULT_COLORS,
|
|
225
245
|
primaryColor: 'blue',
|
|
226
246
|
secondaryColor: 'black',
|
|
227
247
|
secondaryBgColor: 'white',
|
|
228
248
|
white: '#ffffff',
|
|
229
249
|
black: '#000000',
|
|
250
|
+
defaultGradient: {
|
|
251
|
+
from: 'blue',
|
|
252
|
+
to: 'cyan',
|
|
253
|
+
deg: 45,
|
|
254
|
+
},
|
|
230
255
|
light: {
|
|
231
256
|
text: '#000',
|
|
232
257
|
background: '#fdfdfd',
|
|
@@ -247,13 +272,29 @@ export const _DEFAULT_THEME: MantineTheme = {
|
|
|
247
272
|
},
|
|
248
273
|
components: {},
|
|
249
274
|
other: {},
|
|
250
|
-
shadows: {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
275
|
+
shadows: Platform.select({
|
|
276
|
+
ios: {
|
|
277
|
+
xs: { shadowColor: '#000', shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.05, shadowRadius: 1 },
|
|
278
|
+
sm: { shadowColor: '#000', shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.1, shadowRadius: 2 },
|
|
279
|
+
md: { shadowColor: '#000', shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.15, shadowRadius: 4 },
|
|
280
|
+
lg: { shadowColor: '#000', shadowOffset: { width: 0, height: 4 }, shadowOpacity: 0.2, shadowRadius: 8 },
|
|
281
|
+
xl: { shadowColor: '#000', shadowOffset: { width: 0, height: 8 }, shadowOpacity: 0.25, shadowRadius: 16 },
|
|
282
|
+
},
|
|
283
|
+
android: {
|
|
284
|
+
xs: { elevation: 1 },
|
|
285
|
+
sm: { elevation: 2 },
|
|
286
|
+
md: { elevation: 4 },
|
|
287
|
+
lg: { elevation: 8 },
|
|
288
|
+
xl: { elevation: 12 },
|
|
289
|
+
},
|
|
290
|
+
default: {
|
|
291
|
+
xs: { elevation: 1 },
|
|
292
|
+
sm: { elevation: 2 },
|
|
293
|
+
md: { elevation: 4 },
|
|
294
|
+
lg: { elevation: 8 },
|
|
295
|
+
xl: { elevation: 12 },
|
|
296
|
+
},
|
|
297
|
+
}),
|
|
257
298
|
|
|
258
299
|
fontSizes: {
|
|
259
300
|
xs: 12,
|
|
@@ -279,9 +320,22 @@ export const _DEFAULT_THEME: MantineTheme = {
|
|
|
279
320
|
lg: 20,
|
|
280
321
|
xl: 24,
|
|
281
322
|
},
|
|
323
|
+
breakpoints: {
|
|
324
|
+
xs: 576,
|
|
325
|
+
sm: 768,
|
|
326
|
+
md: 992,
|
|
327
|
+
lg: 1200,
|
|
328
|
+
xl: 1408,
|
|
329
|
+
},
|
|
282
330
|
headings: {
|
|
283
|
-
|
|
284
|
-
|
|
331
|
+
// Headings use bold font family for proper weight rendering on iOS/Android
|
|
332
|
+
// On Android, using Roboto-Bold ensures proper bold rendering
|
|
333
|
+
fontFamily: Platform.select({
|
|
334
|
+
ios: 'System', // San Francisco (equivalent to -apple-system)
|
|
335
|
+
android: 'Roboto-Bold', // Android needs explicit bold font family
|
|
336
|
+
default: 'System',
|
|
337
|
+
}),
|
|
338
|
+
fontWeight: '700', // Matches Mantine web heading weight
|
|
285
339
|
sizes: {
|
|
286
340
|
h1: { fontSize: 34, lineHeight: 1.3, fontWeight: undefined },
|
|
287
341
|
h2: { fontSize: 26, lineHeight: 1.35, fontWeight: undefined },
|
|
@@ -327,7 +381,7 @@ export type HeadingStyle = {
|
|
|
327
381
|
|
|
328
382
|
export type MantineHeadings = {
|
|
329
383
|
fontFamily?: string;
|
|
330
|
-
fontWeight?:
|
|
384
|
+
fontWeight?: string;
|
|
331
385
|
sizes: {
|
|
332
386
|
h1: HeadingStyle;
|
|
333
387
|
h2: HeadingStyle;
|
|
@@ -338,23 +392,51 @@ export type MantineHeadings = {
|
|
|
338
392
|
};
|
|
339
393
|
};
|
|
340
394
|
|
|
395
|
+
export type FontWeights = {
|
|
396
|
+
thin: string;
|
|
397
|
+
extralight: string;
|
|
398
|
+
light: string;
|
|
399
|
+
normal: string;
|
|
400
|
+
medium: string;
|
|
401
|
+
semibold: string;
|
|
402
|
+
bold: string;
|
|
403
|
+
extrabold: string;
|
|
404
|
+
black: string;
|
|
405
|
+
};
|
|
406
|
+
|
|
341
407
|
export type themeMode = 'dark' | 'light';
|
|
342
408
|
|
|
409
|
+
type Shade = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
410
|
+
|
|
411
|
+
export interface MantinePrimaryShade {
|
|
412
|
+
light: Shade;
|
|
413
|
+
dark: Shade;
|
|
414
|
+
}
|
|
415
|
+
|
|
343
416
|
export type MantineTheme = {
|
|
344
417
|
fontFamily: string;
|
|
345
418
|
fontFamilyBold: string;
|
|
419
|
+
fontFamilySemiBold: string;
|
|
420
|
+
fontFamilyInput: string;
|
|
421
|
+
fontFamilyMonospace: string;
|
|
422
|
+
fontWeights: FontWeights;
|
|
346
423
|
|
|
347
424
|
localColor: string;
|
|
348
425
|
|
|
349
426
|
currentMode?: themeMode;
|
|
350
427
|
toggleMode?: () => void;
|
|
351
|
-
primaryShade:
|
|
428
|
+
primaryShade: Shade | MantinePrimaryShade;
|
|
352
429
|
colors: { [key: string]: Palette };
|
|
353
430
|
primaryColor: string;
|
|
354
431
|
secondaryColor: string;
|
|
355
432
|
secondaryBgColor: string;
|
|
356
433
|
white: string;
|
|
357
434
|
black: string;
|
|
435
|
+
defaultGradient?: {
|
|
436
|
+
from: string;
|
|
437
|
+
to: string;
|
|
438
|
+
deg: number;
|
|
439
|
+
};
|
|
358
440
|
|
|
359
441
|
light: ColorScheme;
|
|
360
442
|
dark: ColorScheme;
|
|
@@ -363,10 +445,16 @@ export type MantineTheme = {
|
|
|
363
445
|
[key: string]: any;
|
|
364
446
|
};
|
|
365
447
|
shadows: {
|
|
366
|
-
|
|
448
|
+
xs: any;
|
|
449
|
+
sm: any;
|
|
450
|
+
md: any;
|
|
451
|
+
lg: any;
|
|
452
|
+
xl: any;
|
|
453
|
+
[key: string]: any;
|
|
367
454
|
};
|
|
368
455
|
radius: ThemeSize;
|
|
369
456
|
fontSizes: ThemeSize;
|
|
457
|
+
breakpoints: ThemeSize;
|
|
370
458
|
headings: MantineHeadings;
|
|
371
459
|
window: {
|
|
372
460
|
width: number;
|
|
@@ -10,12 +10,18 @@ export function attachFunctions(themeBase: any): any {
|
|
|
10
10
|
variant: fns.variant(themeBase),
|
|
11
11
|
themeColor: (color: string, shade?: number) =>
|
|
12
12
|
fns.themeColor({ theme: themeBase, color, shade }),
|
|
13
|
+
shadow: fns.shadow,
|
|
13
14
|
fontStyles: fns.fontStyles(themeBase),
|
|
14
15
|
inputFontStyles: fns.inputFontStyles(themeBase),
|
|
15
16
|
focusStyles: fns.focusStyles(themeBase),
|
|
16
17
|
placeholderStyles: fns.placeholderStyles(themeBase),
|
|
17
18
|
cover: fns.cover(themeBase),
|
|
18
19
|
hover: fns.hover(themeBase),
|
|
20
|
+
lighten: fns.lighten,
|
|
21
|
+
darken: fns.darken,
|
|
22
|
+
dimmed: fns.dimmed(themeBase),
|
|
23
|
+
largerThan: fns.largerThan(themeBase),
|
|
24
|
+
smallerThan: fns.smallerThan(themeBase),
|
|
19
25
|
},
|
|
20
26
|
activeStyles: fns.activeStyles(themeBase),
|
|
21
27
|
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Dimensions } from 'react-native';
|
|
2
|
+
import type { MantineTheme } from '../../default-theme';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Default breakpoint values in pixels
|
|
6
|
+
* These match Mantine web but converted to pixels (1em = 16px)
|
|
7
|
+
*/
|
|
8
|
+
const DEFAULT_BREAKPOINTS = {
|
|
9
|
+
xs: 576, // 36em * 16
|
|
10
|
+
sm: 768, // 48em * 16
|
|
11
|
+
md: 992, // 62em * 16
|
|
12
|
+
lg: 1200, // 75em * 16
|
|
13
|
+
xl: 1408, // 88em * 16
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type MantineNumberSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Get breakpoint value from theme or default
|
|
20
|
+
*/
|
|
21
|
+
function getBreakpointValue(
|
|
22
|
+
breakpoint: MantineNumberSize,
|
|
23
|
+
theme: MantineTheme
|
|
24
|
+
): number {
|
|
25
|
+
if (typeof breakpoint === 'number') {
|
|
26
|
+
return breakpoint;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Check if theme has breakpoints defined
|
|
30
|
+
if (theme.breakpoints && theme.breakpoints[breakpoint]) {
|
|
31
|
+
const value = theme.breakpoints[breakpoint];
|
|
32
|
+
return typeof value === 'number' ? value : Number(value);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return DEFAULT_BREAKPOINTS[breakpoint as keyof typeof DEFAULT_BREAKPOINTS];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Returns true if current screen width is larger than the specified breakpoint
|
|
40
|
+
* @param theme - The Mantine theme
|
|
41
|
+
* @returns A function that takes a breakpoint and returns a boolean
|
|
42
|
+
*/
|
|
43
|
+
export function largerThan(theme: MantineTheme) {
|
|
44
|
+
return (breakpoint: MantineNumberSize): boolean => {
|
|
45
|
+
const { width } = Dimensions.get('window');
|
|
46
|
+
const breakpointValue = getBreakpointValue(breakpoint, theme);
|
|
47
|
+
return width >= breakpointValue;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Returns true if current screen width is smaller than the specified breakpoint
|
|
53
|
+
* @param theme - The Mantine theme
|
|
54
|
+
* @returns A function that takes a breakpoint and returns a boolean
|
|
55
|
+
*/
|
|
56
|
+
export function smallerThan(theme: MantineTheme) {
|
|
57
|
+
return (breakpoint: MantineNumberSize): boolean => {
|
|
58
|
+
const { width } = Dimensions.get('window');
|
|
59
|
+
const breakpointValue = getBreakpointValue(breakpoint, theme);
|
|
60
|
+
return width < breakpointValue;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { toRgba } from '../../utils/to-rgba';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Darkens a color by reducing its RGB values
|
|
5
|
+
* @param color - The color to darken (hex or rgb/rgba string)
|
|
6
|
+
* @param alpha - The amount to darken (0-1, where 1 is completely black)
|
|
7
|
+
* @returns rgba color string
|
|
8
|
+
*/
|
|
9
|
+
export function darken(color: string, alpha: number): string {
|
|
10
|
+
const { r, g, b, a } = toRgba(color);
|
|
11
|
+
const f = 1 - alpha;
|
|
12
|
+
|
|
13
|
+
const dark = (input: number) => Math.round(input * f);
|
|
14
|
+
|
|
15
|
+
return `rgba(${dark(r)}, ${dark(g)}, ${dark(b)}, ${a})`;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { MantineTheme } from '../../default-theme';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns a dimmed text color based on the current color scheme
|
|
5
|
+
* Used for secondary text and less prominent UI elements
|
|
6
|
+
* @param theme - The Mantine theme
|
|
7
|
+
* @returns A function that returns the dimmed color
|
|
8
|
+
*/
|
|
9
|
+
export function dimmed(theme: MantineTheme) {
|
|
10
|
+
return () => {
|
|
11
|
+
const colorScheme = theme.currentMode || 'light';
|
|
12
|
+
return colorScheme === 'dark'
|
|
13
|
+
? theme.colors.dark?.[2] || '#909296'
|
|
14
|
+
: theme.colors.gray?.[6] || '#868e96';
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { MantineTheme } from '../../../default-theme';
|
|
2
|
+
import type { MantineGradient, GradientConfig } from '../../../theme.d';
|
|
3
|
+
import { themeColor } from '../theme-color/theme-color';
|
|
4
|
+
import { getPrimaryShade } from '../primary-shade';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Converts degrees to start/end coordinates for LinearGradient
|
|
8
|
+
* 0deg = bottom to top, 90deg = left to right, 180deg = top to bottom, 270deg = right to left
|
|
9
|
+
*/
|
|
10
|
+
function degToCoordinates(deg: number): { start: { x: number; y: number }; end: { x: number; y: number } } {
|
|
11
|
+
const angle = ((deg % 360) + 360) % 360; // Normalize to 0-360
|
|
12
|
+
const radians = (angle * Math.PI) / 180;
|
|
13
|
+
|
|
14
|
+
// Calculate end point on unit circle
|
|
15
|
+
const endX = Math.cos(radians - Math.PI / 2);
|
|
16
|
+
const endY = Math.sin(radians - Math.PI / 2);
|
|
17
|
+
|
|
18
|
+
// Normalize to 0-1 range
|
|
19
|
+
const start = {
|
|
20
|
+
x: (1 - endX) / 2,
|
|
21
|
+
y: (1 - endY) / 2,
|
|
22
|
+
};
|
|
23
|
+
const end = {
|
|
24
|
+
x: (1 + endX) / 2,
|
|
25
|
+
y: (1 + endY) / 2,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return { start, end };
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Creates a gradient configuration for use with expo-linear-gradient
|
|
33
|
+
* Returns gradient colors and coordinates based on theme gradient settings
|
|
34
|
+
*/
|
|
35
|
+
export function gradient(theme: MantineTheme) {
|
|
36
|
+
return (payload?: MantineGradient): GradientConfig => {
|
|
37
|
+
const merged = {
|
|
38
|
+
from: payload?.from || theme.defaultGradient?.from || theme.primaryColor,
|
|
39
|
+
to: payload?.to || theme.defaultGradient?.to || theme.primaryColor,
|
|
40
|
+
deg: payload?.deg ?? theme.defaultGradient?.deg ?? 45,
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const primaryShade = getPrimaryShade(theme);
|
|
44
|
+
const fromColor = themeColor({ theme, color: merged.from, shade: primaryShade });
|
|
45
|
+
const toColor = themeColor({ theme, color: merged.to, shade: primaryShade });
|
|
46
|
+
|
|
47
|
+
const { start, end } = degToCoordinates(merged.deg);
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
colors: [fromColor, toColor],
|
|
51
|
+
start,
|
|
52
|
+
end,
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Legacy function for web compatibility - returns CSS gradient string
|
|
59
|
+
* Not used in React Native but kept for API compatibility
|
|
60
|
+
*/
|
|
61
|
+
export function linearGradientCSS(deg: number, ...colors: string[]) {
|
|
62
|
+
return `linear-gradient(${deg}deg, ${colors.join(', ')})`;
|
|
63
|
+
}
|
|
@@ -6,11 +6,10 @@ export const fontStyles = (theme: MantineTheme) => () => ({
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Returns font styles specifically for input components
|
|
9
|
-
* Uses fontFamilyInput if available, otherwise falls back to fontFamily
|
|
10
9
|
*/
|
|
11
10
|
export const inputFontStyles = (theme: MantineTheme) => () => {
|
|
12
11
|
return {
|
|
13
|
-
fontFamily: theme.
|
|
12
|
+
fontFamily: theme.fontFamily,
|
|
14
13
|
};
|
|
15
14
|
};
|
|
16
15
|
|
|
@@ -3,6 +3,13 @@ import { rgba } from './rgba';
|
|
|
3
3
|
import { size } from './size';
|
|
4
4
|
import { themeColor } from './theme-color/theme-color';
|
|
5
5
|
import { variant } from './variant';
|
|
6
|
+
import { getPrimaryShade } from './primary-shade';
|
|
7
|
+
import { shadow } from './shadow';
|
|
8
|
+
import { gradient } from './gradient/gradient';
|
|
9
|
+
import { lighten } from './lighten';
|
|
10
|
+
import { darken } from './darken';
|
|
11
|
+
import { dimmed } from './dimmed';
|
|
12
|
+
import { largerThan, smallerThan } from './breakpoints';
|
|
6
13
|
import * as helpers from './helpers';
|
|
7
14
|
|
|
8
15
|
export const fns = {
|
|
@@ -11,5 +18,13 @@ export const fns = {
|
|
|
11
18
|
size,
|
|
12
19
|
variant,
|
|
13
20
|
themeColor,
|
|
21
|
+
getPrimaryShade,
|
|
22
|
+
shadow,
|
|
23
|
+
gradient,
|
|
24
|
+
lighten,
|
|
25
|
+
darken,
|
|
26
|
+
dimmed,
|
|
27
|
+
largerThan,
|
|
28
|
+
smallerThan,
|
|
14
29
|
...helpers,
|
|
15
30
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { toRgba } from '../../utils/to-rgba';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Lightens a color by mixing it with white
|
|
5
|
+
* @param color - The color to lighten (hex or rgb/rgba string)
|
|
6
|
+
* @param alpha - The amount to lighten (0-1, where 1 is completely white)
|
|
7
|
+
* @returns rgba color string
|
|
8
|
+
*/
|
|
9
|
+
export function lighten(color: string, alpha: number): string {
|
|
10
|
+
const { r, g, b, a } = toRgba(color);
|
|
11
|
+
|
|
12
|
+
const light = (input: number) => Math.round(input + (255 - input) * alpha);
|
|
13
|
+
|
|
14
|
+
return `rgba(${light(r)}, ${light(g)}, ${light(b)}, ${a})`;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MantineTheme } from '../../default-theme';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns the appropriate primary shade based on the current color scheme
|
|
5
|
+
* Matches Mantine web implementation
|
|
6
|
+
*/
|
|
7
|
+
export function getPrimaryShade(
|
|
8
|
+
theme: MantineTheme,
|
|
9
|
+
colorScheme?: 'light' | 'dark'
|
|
10
|
+
): number {
|
|
11
|
+
if (typeof theme.primaryShade === 'number') {
|
|
12
|
+
return theme.primaryShade;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const scheme = colorScheme || theme.currentMode || 'light';
|
|
16
|
+
return theme.primaryShade[scheme];
|
|
17
|
+
}
|