@frosted-ui/react-native 0.0.1-canary.97 → 0.0.1-canary.99
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/dist/lib/theme.d.ts +24 -1
- package/dist/lib/theme.d.ts.map +1 -1
- package/dist/lib/theme.js +83 -1
- package/dist/lib/theme.js.map +1 -1
- package/package.json +2 -3
package/dist/lib/theme.d.ts
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
type FontWeight = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
2
|
+
type FontStyle = {
|
|
3
|
+
fontFamily: string;
|
|
4
|
+
fontWeight: FontWeight;
|
|
5
|
+
};
|
|
6
|
+
interface Theme {
|
|
7
|
+
dark: boolean;
|
|
8
|
+
colors: {
|
|
9
|
+
primary: string;
|
|
10
|
+
background: string;
|
|
11
|
+
card: string;
|
|
12
|
+
text: string;
|
|
13
|
+
border: string;
|
|
14
|
+
notification: string;
|
|
15
|
+
};
|
|
16
|
+
fonts: {
|
|
17
|
+
regular: FontStyle;
|
|
18
|
+
medium: FontStyle;
|
|
19
|
+
bold: FontStyle;
|
|
20
|
+
heavy: FontStyle;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare const fonts: Theme['fonts'];
|
|
2
24
|
/**
|
|
3
25
|
* Hook to get navigation theme using Frosted UI design system colors.
|
|
4
26
|
* Reacts to the accent color from ThemeProvider.
|
|
@@ -14,4 +36,5 @@ export declare function useNavTheme(): Record<'light' | 'dark', Theme>;
|
|
|
14
36
|
* Static navigation theme with hardcoded blue accent.
|
|
15
37
|
*/
|
|
16
38
|
export declare const NAV_THEME: Record<'light' | 'dark', Theme>;
|
|
39
|
+
export {};
|
|
17
40
|
//# sourceMappingURL=theme.d.ts.map
|
package/dist/lib/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/lib/theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/lib/theme.ts"],"names":[],"mappings":"AASA,KAAK,UAAU,GACX,QAAQ,GACR,MAAM,GACN,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,CAAC;AAEV,KAAK,SAAS,GAAG;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,UAAU,KAAK;IACb,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,KAAK,EAAE;QACL,OAAO,EAAE,SAAS,CAAC;QACnB,MAAM,EAAE,SAAS,CAAC;QAClB,IAAI,EAAE,SAAS,CAAC;QAChB,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;CACH;AA8DD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,OAAO,CAC4B,CAAC;AA6B9D;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAAC,OAAO,GAAG,MAAM,EAAE,KAAK,CAAC,CA+E7D;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,EAAE,KAAK,CAuBrD,CAAC"}
|
package/dist/lib/theme.js
CHANGED
|
@@ -1,9 +1,91 @@
|
|
|
1
|
-
import { DarkTheme, DefaultTheme } from '@react-navigation/native';
|
|
2
1
|
import { useMemo } from 'react';
|
|
3
2
|
import { useSemanticColors } from './theme-context';
|
|
4
3
|
import { themeTokens } from './theme-tokens';
|
|
5
4
|
const light = themeTokens.colors.light;
|
|
6
5
|
const dark = themeTokens.colors.dark;
|
|
6
|
+
import { Platform } from 'react-native';
|
|
7
|
+
const WEB_FONT_STACK = 'system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';
|
|
8
|
+
const fontsByPlatform = {
|
|
9
|
+
web: {
|
|
10
|
+
regular: {
|
|
11
|
+
fontFamily: WEB_FONT_STACK,
|
|
12
|
+
fontWeight: '400',
|
|
13
|
+
},
|
|
14
|
+
medium: {
|
|
15
|
+
fontFamily: WEB_FONT_STACK,
|
|
16
|
+
fontWeight: '500',
|
|
17
|
+
},
|
|
18
|
+
bold: {
|
|
19
|
+
fontFamily: WEB_FONT_STACK,
|
|
20
|
+
fontWeight: '600',
|
|
21
|
+
},
|
|
22
|
+
heavy: {
|
|
23
|
+
fontFamily: WEB_FONT_STACK,
|
|
24
|
+
fontWeight: '700',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
ios: {
|
|
28
|
+
regular: {
|
|
29
|
+
fontFamily: 'System',
|
|
30
|
+
fontWeight: '400',
|
|
31
|
+
},
|
|
32
|
+
medium: {
|
|
33
|
+
fontFamily: 'System',
|
|
34
|
+
fontWeight: '500',
|
|
35
|
+
},
|
|
36
|
+
bold: {
|
|
37
|
+
fontFamily: 'System',
|
|
38
|
+
fontWeight: '600',
|
|
39
|
+
},
|
|
40
|
+
heavy: {
|
|
41
|
+
fontFamily: 'System',
|
|
42
|
+
fontWeight: '700',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
default: {
|
|
46
|
+
regular: {
|
|
47
|
+
fontFamily: 'sans-serif',
|
|
48
|
+
fontWeight: 'normal',
|
|
49
|
+
},
|
|
50
|
+
medium: {
|
|
51
|
+
fontFamily: 'sans-serif-medium',
|
|
52
|
+
fontWeight: 'normal',
|
|
53
|
+
},
|
|
54
|
+
bold: {
|
|
55
|
+
fontFamily: 'sans-serif',
|
|
56
|
+
fontWeight: '600',
|
|
57
|
+
},
|
|
58
|
+
heavy: {
|
|
59
|
+
fontFamily: 'sans-serif',
|
|
60
|
+
fontWeight: '700',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
export const fonts = Platform.select(fontsByPlatform) ?? fontsByPlatform.default;
|
|
65
|
+
const DefaultTheme = {
|
|
66
|
+
dark: false,
|
|
67
|
+
colors: {
|
|
68
|
+
primary: 'rgb(0, 122, 255)',
|
|
69
|
+
background: 'rgb(242, 242, 242)',
|
|
70
|
+
card: 'rgb(255, 255, 255)',
|
|
71
|
+
text: 'rgb(28, 28, 30)',
|
|
72
|
+
border: 'rgb(216, 216, 216)',
|
|
73
|
+
notification: 'rgb(255, 59, 48)',
|
|
74
|
+
},
|
|
75
|
+
fonts,
|
|
76
|
+
};
|
|
77
|
+
const DarkTheme = {
|
|
78
|
+
dark: true,
|
|
79
|
+
colors: {
|
|
80
|
+
primary: 'rgb(10, 132, 255)',
|
|
81
|
+
background: 'rgb(1, 1, 1)',
|
|
82
|
+
card: 'rgb(18, 18, 18)',
|
|
83
|
+
text: 'rgb(229, 229, 231)',
|
|
84
|
+
border: 'rgb(39, 39, 41)',
|
|
85
|
+
notification: 'rgb(255, 69, 58)',
|
|
86
|
+
},
|
|
87
|
+
fonts,
|
|
88
|
+
};
|
|
7
89
|
/**
|
|
8
90
|
* Hook to get navigation theme using Frosted UI design system colors.
|
|
9
91
|
* Reacts to the accent color from ThemeProvider.
|
package/dist/lib/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/lib/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/lib/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,M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;QACZ,MAAM,EAAE;YACN,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,UAAU;YACrB,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC;YACpC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;YAClC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;SAC/B;KACF;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frosted-ui/react-native",
|
|
3
|
-
"version": "0.0.1-canary.
|
|
3
|
+
"version": "0.0.1-canary.99",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "expo-router/entry",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@frosted-ui/colors": "0.0.1-canary.61",
|
|
44
|
-
"@rn-primitives/slider": "^1.2.0",
|
|
45
44
|
"@rn-primitives/accordion": "^1.2.0",
|
|
46
45
|
"@rn-primitives/alert-dialog": "^1.2.0",
|
|
47
46
|
"@rn-primitives/aspect-ratio": "^1.2.0",
|
|
@@ -60,6 +59,7 @@
|
|
|
60
59
|
"@rn-primitives/radio-group": "^1.2.0",
|
|
61
60
|
"@rn-primitives/select": "^1.2.0",
|
|
62
61
|
"@rn-primitives/separator": "^1.2.0",
|
|
62
|
+
"@rn-primitives/slider": "^1.2.0",
|
|
63
63
|
"@rn-primitives/slot": "^1.2.0",
|
|
64
64
|
"@rn-primitives/switch": "^1.2.0",
|
|
65
65
|
"@rn-primitives/tabs": "^1.2.0",
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@babel/core": "^7.26.0",
|
|
72
|
-
"@react-navigation/native": "^7.0.0",
|
|
73
72
|
"@types/react": "~19.1.10",
|
|
74
73
|
"@whop/turbo-module": "^0.1.0-canary.3",
|
|
75
74
|
"expo": "^54.0.26",
|