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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { Platform } from 'react-native';
|
|
3
4
|
import { attachFunctions } from "./functions/attach-functions.js";
|
|
4
5
|
export const DEFAULT_COLORS = {
|
|
5
|
-
dark: ['#
|
|
6
|
-
gray: ['#
|
|
7
|
-
|
|
8
|
-
red: ['#ffeaea', '#fcd4d4', '#f3a8a8', '#eb7877', '#e4504f', '#e13735', '#e02928', '#c71c1c', '#b21518', '#9c0711'],
|
|
6
|
+
dark: ['#C1C2C5', '#A6A7AB', '#909296', '#5c5f66', '#373A40', '#2C2E33', '#25262b', '#1A1B1E', '#141517', '#101113'],
|
|
7
|
+
gray: ['#f8f9fa', '#f1f3f5', '#e9ecef', '#dee2e6', '#ced4da', '#adb5bd', '#868e96', '#495057', '#343a40', '#212529'],
|
|
8
|
+
red: ['#fff5f5', '#ffe3e3', '#ffc9c9', '#ffa8a8', '#ff8787', '#ff6b6b', '#fa5252', '#f03e3e', '#e03131', '#c92a2a'],
|
|
9
9
|
pink: ['#fff0f6', '#ffdeeb', '#fcc2d7', '#faa2c1', '#f783ac', '#f06595', '#e64980', '#d6336c', '#c2255c', '#a61e4d'],
|
|
10
10
|
grape: ['#f8f0fc', '#f3d9fa', '#eebefa', '#e599f7', '#da77f2', '#cc5de8', '#be4bdb', '#ae3ec9', '#9c36b5', '#862e9c'],
|
|
11
11
|
violet: ['#f3f0ff', '#e5dbff', '#d0bfff', '#b197fc', '#9775fa', '#845ef7', '#7950f2', '#7048e8', '#6741d9', '#5f3dc4'],
|
|
@@ -13,27 +13,82 @@ export const DEFAULT_COLORS = {
|
|
|
13
13
|
blue: ['#e7f5ff', '#d0ebff', '#a5d8ff', '#74c0fc', '#4dabf7', '#339af0', '#228be6', '#1c7ed6', '#1971c2', '#1864ab'],
|
|
14
14
|
cyan: ['#e3fafc', '#c5f6fa', '#99e9f2', '#66d9e8', '#3bc9db', '#22b8cf', '#15aabf', '#1098ad', '#0c8599', '#0b7285'],
|
|
15
15
|
teal: ['#e6fcf5', '#c3fae8', '#96f2d7', '#63e6be', '#38d9a9', '#20c997', '#12b886', '#0ca678', '#099268', '#087f5b'],
|
|
16
|
-
green: ['#
|
|
16
|
+
green: ['#ebfbee', '#d3f9d8', '#b2f2bb', '#8ce99a', '#69db7c', '#51cf66', '#40c057', '#37b24d', '#2f9e44', '#2b8a3e'],
|
|
17
17
|
lime: ['#f4fce3', '#e9fac8', '#d8f5a2', '#c0eb75', '#a9e34b', '#94d82d', '#82c91e', '#74b816', '#66a80f', '#5c940d'],
|
|
18
18
|
yellow: ['#fff9db', '#fff3bf', '#ffec99', '#ffe066', '#ffd43b', '#fcc419', '#fab005', '#f59f00', '#f08c00', '#e67700'],
|
|
19
|
-
orange: ['#
|
|
20
|
-
secondary: ['#f4f4f5', '#e7e7e7', '#cccccc', '#afafaf', '#989898', '#898989', '#818181', '#6f6f6f', '#616164', '#545459']
|
|
19
|
+
orange: ['#fff4e6', '#ffe8cc', '#ffd8a8', '#ffc078', '#ffa94d', '#ff922b', '#fd7e14', '#f76707', '#e8590c', '#d9480f']
|
|
21
20
|
};
|
|
22
21
|
const tintColorLight = '#2f95dc';
|
|
23
22
|
const tintColorDark = '#fff';
|
|
24
23
|
export const _DEFAULT_THEME = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
// Font configuration matches Mantine web as closely as possible
|
|
25
|
+
// Web: '-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji'
|
|
26
|
+
// React Native maps to platform-specific system fonts
|
|
27
|
+
fontFamily: Platform.select({
|
|
28
|
+
ios: 'System',
|
|
29
|
+
// San Francisco (equivalent to -apple-system)
|
|
30
|
+
android: 'Roboto',
|
|
31
|
+
// Android system font
|
|
32
|
+
default: 'System'
|
|
33
|
+
}),
|
|
34
|
+
// Bold font family - iOS/Android don't always render fontWeight properly
|
|
35
|
+
// so we need separate font families for different weights
|
|
36
|
+
fontFamilyBold: Platform.select({
|
|
37
|
+
ios: 'System',
|
|
38
|
+
// iOS handles bold via fontWeight with System font
|
|
39
|
+
android: 'Roboto-Bold',
|
|
40
|
+
// Android needs explicit bold font family
|
|
41
|
+
default: 'System'
|
|
42
|
+
}),
|
|
43
|
+
// SemiBold font family
|
|
44
|
+
fontFamilySemiBold: Platform.select({
|
|
45
|
+
ios: 'System',
|
|
46
|
+
// iOS handles semibold via fontWeight with System font
|
|
47
|
+
android: 'Roboto-Medium',
|
|
48
|
+
// Android medium is equivalent to semibold
|
|
49
|
+
default: 'System'
|
|
50
|
+
}),
|
|
51
|
+
// Input font family - separate for form inputs
|
|
52
|
+
fontFamilyInput: Platform.select({
|
|
53
|
+
ios: 'System',
|
|
54
|
+
android: 'Roboto',
|
|
55
|
+
default: 'System'
|
|
56
|
+
}),
|
|
57
|
+
// Web: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace'
|
|
58
|
+
fontFamilyMonospace: Platform.select({
|
|
59
|
+
ios: 'Menlo',
|
|
60
|
+
// iOS monospace font
|
|
61
|
+
android: 'monospace',
|
|
62
|
+
// Android monospace font
|
|
63
|
+
default: 'monospace'
|
|
64
|
+
}),
|
|
65
|
+
fontWeights: {
|
|
66
|
+
thin: '100',
|
|
67
|
+
extralight: '200',
|
|
68
|
+
light: '300',
|
|
69
|
+
normal: '400',
|
|
70
|
+
medium: '500',
|
|
71
|
+
semibold: '600',
|
|
72
|
+
bold: '700',
|
|
73
|
+
extrabold: '800',
|
|
74
|
+
black: '900'
|
|
75
|
+
},
|
|
29
76
|
localColor: '#1F2863',
|
|
30
|
-
primaryShade:
|
|
77
|
+
primaryShade: {
|
|
78
|
+
light: 6,
|
|
79
|
+
dark: 8
|
|
80
|
+
},
|
|
31
81
|
colors: DEFAULT_COLORS,
|
|
32
82
|
primaryColor: 'blue',
|
|
33
83
|
secondaryColor: 'black',
|
|
34
84
|
secondaryBgColor: 'white',
|
|
35
85
|
white: '#ffffff',
|
|
36
86
|
black: '#000000',
|
|
87
|
+
defaultGradient: {
|
|
88
|
+
from: 'blue',
|
|
89
|
+
to: 'cyan',
|
|
90
|
+
deg: 45
|
|
91
|
+
},
|
|
37
92
|
light: {
|
|
38
93
|
text: '#000',
|
|
39
94
|
background: '#fdfdfd',
|
|
@@ -54,13 +109,89 @@ export const _DEFAULT_THEME = {
|
|
|
54
109
|
},
|
|
55
110
|
components: {},
|
|
56
111
|
other: {},
|
|
57
|
-
shadows: {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
112
|
+
shadows: Platform.select({
|
|
113
|
+
ios: {
|
|
114
|
+
xs: {
|
|
115
|
+
shadowColor: '#000',
|
|
116
|
+
shadowOffset: {
|
|
117
|
+
width: 0,
|
|
118
|
+
height: 1
|
|
119
|
+
},
|
|
120
|
+
shadowOpacity: 0.05,
|
|
121
|
+
shadowRadius: 1
|
|
122
|
+
},
|
|
123
|
+
sm: {
|
|
124
|
+
shadowColor: '#000',
|
|
125
|
+
shadowOffset: {
|
|
126
|
+
width: 0,
|
|
127
|
+
height: 1
|
|
128
|
+
},
|
|
129
|
+
shadowOpacity: 0.1,
|
|
130
|
+
shadowRadius: 2
|
|
131
|
+
},
|
|
132
|
+
md: {
|
|
133
|
+
shadowColor: '#000',
|
|
134
|
+
shadowOffset: {
|
|
135
|
+
width: 0,
|
|
136
|
+
height: 2
|
|
137
|
+
},
|
|
138
|
+
shadowOpacity: 0.15,
|
|
139
|
+
shadowRadius: 4
|
|
140
|
+
},
|
|
141
|
+
lg: {
|
|
142
|
+
shadowColor: '#000',
|
|
143
|
+
shadowOffset: {
|
|
144
|
+
width: 0,
|
|
145
|
+
height: 4
|
|
146
|
+
},
|
|
147
|
+
shadowOpacity: 0.2,
|
|
148
|
+
shadowRadius: 8
|
|
149
|
+
},
|
|
150
|
+
xl: {
|
|
151
|
+
shadowColor: '#000',
|
|
152
|
+
shadowOffset: {
|
|
153
|
+
width: 0,
|
|
154
|
+
height: 8
|
|
155
|
+
},
|
|
156
|
+
shadowOpacity: 0.25,
|
|
157
|
+
shadowRadius: 16
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
android: {
|
|
161
|
+
xs: {
|
|
162
|
+
elevation: 1
|
|
163
|
+
},
|
|
164
|
+
sm: {
|
|
165
|
+
elevation: 2
|
|
166
|
+
},
|
|
167
|
+
md: {
|
|
168
|
+
elevation: 4
|
|
169
|
+
},
|
|
170
|
+
lg: {
|
|
171
|
+
elevation: 8
|
|
172
|
+
},
|
|
173
|
+
xl: {
|
|
174
|
+
elevation: 12
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
default: {
|
|
178
|
+
xs: {
|
|
179
|
+
elevation: 1
|
|
180
|
+
},
|
|
181
|
+
sm: {
|
|
182
|
+
elevation: 2
|
|
183
|
+
},
|
|
184
|
+
md: {
|
|
185
|
+
elevation: 4
|
|
186
|
+
},
|
|
187
|
+
lg: {
|
|
188
|
+
elevation: 8
|
|
189
|
+
},
|
|
190
|
+
xl: {
|
|
191
|
+
elevation: 12
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}),
|
|
64
195
|
fontSizes: {
|
|
65
196
|
xs: 12,
|
|
66
197
|
sm: 14,
|
|
@@ -83,9 +214,25 @@ export const _DEFAULT_THEME = {
|
|
|
83
214
|
lg: 20,
|
|
84
215
|
xl: 24
|
|
85
216
|
},
|
|
217
|
+
breakpoints: {
|
|
218
|
+
xs: 576,
|
|
219
|
+
sm: 768,
|
|
220
|
+
md: 992,
|
|
221
|
+
lg: 1200,
|
|
222
|
+
xl: 1408
|
|
223
|
+
},
|
|
86
224
|
headings: {
|
|
87
|
-
|
|
88
|
-
|
|
225
|
+
// Headings use bold font family for proper weight rendering on iOS/Android
|
|
226
|
+
// On Android, using Roboto-Bold ensures proper bold rendering
|
|
227
|
+
fontFamily: Platform.select({
|
|
228
|
+
ios: 'System',
|
|
229
|
+
// San Francisco (equivalent to -apple-system)
|
|
230
|
+
android: 'Roboto-Bold',
|
|
231
|
+
// Android needs explicit bold font family
|
|
232
|
+
default: 'System'
|
|
233
|
+
}),
|
|
234
|
+
fontWeight: '700',
|
|
235
|
+
// Matches Mantine web heading weight
|
|
89
236
|
sizes: {
|
|
90
237
|
h1: {
|
|
91
238
|
fontSize: 34,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["attachFunctions","DEFAULT_COLORS","dark","gray","
|
|
1
|
+
{"version":3,"names":["Platform","attachFunctions","DEFAULT_COLORS","dark","gray","red","pink","grape","violet","indigo","blue","cyan","teal","green","lime","yellow","orange","tintColorLight","tintColorDark","_DEFAULT_THEME","fontFamily","select","ios","android","default","fontFamilyBold","fontFamilySemiBold","fontFamilyInput","fontFamilyMonospace","fontWeights","thin","extralight","light","normal","medium","semibold","bold","extrabold","black","localColor","primaryShade","colors","primaryColor","secondaryColor","secondaryBgColor","white","defaultGradient","from","to","deg","text","background","backgroundSecondary","backgroundThird","tint","tabIconDefault","tabIconSelected","components","other","shadows","xs","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","sm","md","lg","xl","elevation","fontSizes","defaultRadius","radius","spacing","breakpoints","headings","fontWeight","sizes","h1","fontSize","lineHeight","undefined","h2","h3","h4","h5","h6","window","primaryBgColor","primaryTextColor","DEFAULT_THEME"],"sourceRoot":"../../../src","sources":["theme/default-theme.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,eAAe,QAAQ,iCAA8B;AAG9D,OAAO,MAAMC,cAEZ,GAAG;EACFC,IAAI,EAAE,CACJ,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,E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;MAC5DC,EAAE,EAAE;QAAEH,QAAQ,EAAE,EAAE;QAAEC,UAAU,EAAE,IAAI;QAAEJ,UAAU,EAAEK;MAAU,CAAC;MAC7DE,EAAE,EAAE;QAAEJ,QAAQ,EAAE,EAAE;QAAEC,UAAU,EAAE,GAAG;QAAEJ,UAAU,EAAEK;MAAU,CAAC;MAC5DG,EAAE,EAAE;QAAEL,QAAQ,EAAE,EAAE;QAAEC,UAAU,EAAE,IAAI;QAAEJ,UAAU,EAAEK;MAAU,CAAC;MAC7DI,EAAE,EAAE;QAAEN,QAAQ,EAAE,EAAE;QAAEC,UAAU,EAAE,GAAG;QAAEJ,UAAU,EAAEK;MAAU,CAAC;MAC5DK,EAAE,EAAE;QAAEP,QAAQ,EAAE,EAAE;QAAEC,UAAU,EAAE,GAAG;QAAEJ,UAAU,EAAEK;MAAU;IAC7D;EACF,CAAC;EACDM,MAAM,EAAE;IACN1B,KAAK,EAAE,GAAG;IACVC,MAAM,EAAE;EACV,CAAC;EACD0B,cAAc,EAAE,OAAO;EACvBC,gBAAgB,EAAE;AACpB,CAAC;AAED,OAAO,MAAMC,aAAa,GAAG3F,eAAe,CAACkB,cAAc,CAAC","ignoreList":[]}
|
|
@@ -14,12 +14,18 @@ export function attachFunctions(themeBase) {
|
|
|
14
14
|
color,
|
|
15
15
|
shade
|
|
16
16
|
}),
|
|
17
|
+
shadow: fns.shadow,
|
|
17
18
|
fontStyles: fns.fontStyles(themeBase),
|
|
18
19
|
inputFontStyles: fns.inputFontStyles(themeBase),
|
|
19
20
|
focusStyles: fns.focusStyles(themeBase),
|
|
20
21
|
placeholderStyles: fns.placeholderStyles(themeBase),
|
|
21
22
|
cover: fns.cover(themeBase),
|
|
22
|
-
hover: fns.hover(themeBase)
|
|
23
|
+
hover: fns.hover(themeBase),
|
|
24
|
+
lighten: fns.lighten,
|
|
25
|
+
darken: fns.darken,
|
|
26
|
+
dimmed: fns.dimmed(themeBase),
|
|
27
|
+
largerThan: fns.largerThan(themeBase),
|
|
28
|
+
smallerThan: fns.smallerThan(themeBase)
|
|
23
29
|
},
|
|
24
30
|
activeStyles: fns.activeStyles(themeBase)
|
|
25
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fns","attachFunctions","themeBase","fn","radius","rgba","size","variant","themeColor","color","shade","theme","fontStyles","inputFontStyles","focusStyles","placeholderStyles","cover","hover","activeStyles"],"sourceRoot":"../../../../src","sources":["theme/functions/attach-functions.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,gBAAO;AAE3B,OAAO,SAASC,eAAeA,CAACC,SAAc,EAAO;EACnD,OAAO;IACL,GAAGA,SAAS;IACZC,EAAE,EAAE;MACFC,MAAM,EAAEJ,GAAG,CAACI,MAAM,CAACF,SAAS,CAAC;MAC7BG,IAAI,EAAEL,GAAG,CAACK,IAAI,CAACH,SAAS,CAAC;MACzBI,IAAI,EAAEN,GAAG,CAACM,IAAI,CAACJ,SAAS,CAAC;MACzBK,OAAO,EAAEP,GAAG,CAACO,OAAO,CAACL,SAAS,CAAC;MAC/BM,UAAU,EAAEA,CAACC,KAAa,EAAEC,KAAc,KACxCV,GAAG,CAACQ,UAAU,CAAC;QAAEG,KAAK,EAAET,SAAS;QAAEO,KAAK;QAAEC;MAAM,CAAC,CAAC;MACpDE,
|
|
1
|
+
{"version":3,"names":["fns","attachFunctions","themeBase","fn","radius","rgba","size","variant","themeColor","color","shade","theme","shadow","fontStyles","inputFontStyles","focusStyles","placeholderStyles","cover","hover","lighten","darken","dimmed","largerThan","smallerThan","activeStyles"],"sourceRoot":"../../../../src","sources":["theme/functions/attach-functions.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,gBAAO;AAE3B,OAAO,SAASC,eAAeA,CAACC,SAAc,EAAO;EACnD,OAAO;IACL,GAAGA,SAAS;IACZC,EAAE,EAAE;MACFC,MAAM,EAAEJ,GAAG,CAACI,MAAM,CAACF,SAAS,CAAC;MAC7BG,IAAI,EAAEL,GAAG,CAACK,IAAI,CAACH,SAAS,CAAC;MACzBI,IAAI,EAAEN,GAAG,CAACM,IAAI,CAACJ,SAAS,CAAC;MACzBK,OAAO,EAAEP,GAAG,CAACO,OAAO,CAACL,SAAS,CAAC;MAC/BM,UAAU,EAAEA,CAACC,KAAa,EAAEC,KAAc,KACxCV,GAAG,CAACQ,UAAU,CAAC;QAAEG,KAAK,EAAET,SAAS;QAAEO,KAAK;QAAEC;MAAM,CAAC,CAAC;MACpDE,MAAM,EAAEZ,GAAG,CAACY,MAAM;MAClBC,UAAU,EAAEb,GAAG,CAACa,UAAU,CAACX,SAAS,CAAC;MACrCY,eAAe,EAAEd,GAAG,CAACc,eAAe,CAACZ,SAAS,CAAC;MAC/Ca,WAAW,EAAEf,GAAG,CAACe,WAAW,CAACb,SAAS,CAAC;MACvCc,iBAAiB,EAAEhB,GAAG,CAACgB,iBAAiB,CAACd,SAAS,CAAC;MACnDe,KAAK,EAAEjB,GAAG,CAACiB,KAAK,CAACf,SAAS,CAAC;MAC3BgB,KAAK,EAAElB,GAAG,CAACkB,KAAK,CAAChB,SAAS,CAAC;MAC3BiB,OAAO,EAAEnB,GAAG,CAACmB,OAAO;MACpBC,MAAM,EAAEpB,GAAG,CAACoB,MAAM;MAClBC,MAAM,EAAErB,GAAG,CAACqB,MAAM,CAACnB,SAAS,CAAC;MAC7BoB,UAAU,EAAEtB,GAAG,CAACsB,UAAU,CAACpB,SAAS,CAAC;MACrCqB,WAAW,EAAEvB,GAAG,CAACuB,WAAW,CAACrB,SAAS;IACxC,CAAC;IACDsB,YAAY,EAAExB,GAAG,CAACwB,YAAY,CAACtB,SAAS;EAC1C,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Dimensions } from 'react-native';
|
|
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,
|
|
10
|
+
// 36em * 16
|
|
11
|
+
sm: 768,
|
|
12
|
+
// 48em * 16
|
|
13
|
+
md: 992,
|
|
14
|
+
// 62em * 16
|
|
15
|
+
lg: 1200,
|
|
16
|
+
// 75em * 16
|
|
17
|
+
xl: 1408 // 88em * 16
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Get breakpoint value from theme or default
|
|
21
|
+
*/
|
|
22
|
+
function getBreakpointValue(breakpoint, theme) {
|
|
23
|
+
if (typeof breakpoint === 'number') {
|
|
24
|
+
return breakpoint;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Check if theme has breakpoints defined
|
|
28
|
+
if (theme.breakpoints && theme.breakpoints[breakpoint]) {
|
|
29
|
+
const value = theme.breakpoints[breakpoint];
|
|
30
|
+
return typeof value === 'number' ? value : Number(value);
|
|
31
|
+
}
|
|
32
|
+
return DEFAULT_BREAKPOINTS[breakpoint];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Returns true if current screen width is larger than the specified breakpoint
|
|
37
|
+
* @param theme - The Mantine theme
|
|
38
|
+
* @returns A function that takes a breakpoint and returns a boolean
|
|
39
|
+
*/
|
|
40
|
+
export function largerThan(theme) {
|
|
41
|
+
return breakpoint => {
|
|
42
|
+
const {
|
|
43
|
+
width
|
|
44
|
+
} = Dimensions.get('window');
|
|
45
|
+
const breakpointValue = getBreakpointValue(breakpoint, theme);
|
|
46
|
+
return width >= breakpointValue;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Returns true if current screen width is smaller than the specified breakpoint
|
|
52
|
+
* @param theme - The Mantine theme
|
|
53
|
+
* @returns A function that takes a breakpoint and returns a boolean
|
|
54
|
+
*/
|
|
55
|
+
export function smallerThan(theme) {
|
|
56
|
+
return breakpoint => {
|
|
57
|
+
const {
|
|
58
|
+
width
|
|
59
|
+
} = Dimensions.get('window');
|
|
60
|
+
const breakpointValue = getBreakpointValue(breakpoint, theme);
|
|
61
|
+
return width < breakpointValue;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=breakpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Dimensions","DEFAULT_BREAKPOINTS","xs","sm","md","lg","xl","getBreakpointValue","breakpoint","theme","breakpoints","value","Number","largerThan","width","get","breakpointValue","smallerThan"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/breakpoints.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AAGzC;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAG;EAC1BC,EAAE,EAAE,GAAG;EAAE;EACTC,EAAE,EAAE,GAAG;EAAE;EACTC,EAAE,EAAE,GAAG;EAAE;EACTC,EAAE,EAAE,IAAI;EAAE;EACVC,EAAE,EAAE,IAAI,CAAE;AACZ,CAAC;AAID;AACA;AACA;AACA,SAASC,kBAAkBA,CACzBC,UAA6B,EAC7BC,KAAmB,EACX;EACR,IAAI,OAAOD,UAAU,KAAK,QAAQ,EAAE;IAClC,OAAOA,UAAU;EACnB;;EAEA;EACA,IAAIC,KAAK,CAACC,WAAW,IAAID,KAAK,CAACC,WAAW,CAACF,UAAU,CAAC,EAAE;IACtD,MAAMG,KAAK,GAAGF,KAAK,CAACC,WAAW,CAACF,UAAU,CAAC;IAC3C,OAAO,OAAOG,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGC,MAAM,CAACD,KAAK,CAAC;EAC1D;EAEA,OAAOV,mBAAmB,CAACO,UAAU,CAAqC;AAC5E;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,UAAUA,CAACJ,KAAmB,EAAE;EAC9C,OAAQD,UAA6B,IAAc;IACjD,MAAM;MAAEM;IAAM,CAAC,GAAGd,UAAU,CAACe,GAAG,CAAC,QAAQ,CAAC;IAC1C,MAAMC,eAAe,GAAGT,kBAAkB,CAACC,UAAU,EAAEC,KAAK,CAAC;IAC7D,OAAOK,KAAK,IAAIE,eAAe;EACjC,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAACR,KAAmB,EAAE;EAC/C,OAAQD,UAA6B,IAAc;IACjD,MAAM;MAAEM;IAAM,CAAC,GAAGd,UAAU,CAACe,GAAG,CAAC,QAAQ,CAAC;IAC1C,MAAMC,eAAe,GAAGT,kBAAkB,CAACC,UAAU,EAAEC,KAAK,CAAC;IAC7D,OAAOK,KAAK,GAAGE,eAAe;EAChC,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { toRgba } from "../../utils/to-rgba.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Darkens a color by reducing its RGB values
|
|
7
|
+
* @param color - The color to darken (hex or rgb/rgba string)
|
|
8
|
+
* @param alpha - The amount to darken (0-1, where 1 is completely black)
|
|
9
|
+
* @returns rgba color string
|
|
10
|
+
*/
|
|
11
|
+
export function darken(color, alpha) {
|
|
12
|
+
const {
|
|
13
|
+
r,
|
|
14
|
+
g,
|
|
15
|
+
b,
|
|
16
|
+
a
|
|
17
|
+
} = toRgba(color);
|
|
18
|
+
const f = 1 - alpha;
|
|
19
|
+
const dark = input => Math.round(input * f);
|
|
20
|
+
return `rgba(${dark(r)}, ${dark(g)}, ${dark(b)}, ${a})`;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=darken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["toRgba","darken","color","alpha","r","g","b","a","f","dark","input","Math","round"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/darken.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,wBAAqB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAACC,KAAa,EAAEC,KAAa,EAAU;EAC3D,MAAM;IAAEC,CAAC;IAAEC,CAAC;IAAEC,CAAC;IAAEC;EAAE,CAAC,GAAGP,MAAM,CAACE,KAAK,CAAC;EACpC,MAAMM,CAAC,GAAG,CAAC,GAAGL,KAAK;EAEnB,MAAMM,IAAI,GAAIC,KAAa,IAAKC,IAAI,CAACC,KAAK,CAACF,KAAK,GAAGF,CAAC,CAAC;EAErD,OAAO,QAAQC,IAAI,CAACL,CAAC,CAAC,KAAKK,IAAI,CAACJ,CAAC,CAAC,KAAKI,IAAI,CAACH,CAAC,CAAC,KAAKC,CAAC,GAAG;AACzD","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
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) {
|
|
10
|
+
return () => {
|
|
11
|
+
const colorScheme = theme.currentMode || 'light';
|
|
12
|
+
return colorScheme === 'dark' ? theme.colors.dark?.[2] || '#909296' : theme.colors.gray?.[6] || '#868e96';
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=dimmed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["dimmed","theme","colorScheme","currentMode","colors","dark","gray"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/dimmed.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,MAAMA,CAACC,KAAmB,EAAE;EAC1C,OAAO,MAAM;IACX,MAAMC,WAAW,GAAGD,KAAK,CAACE,WAAW,IAAI,OAAO;IAChD,OAAOD,WAAW,KAAK,MAAM,GACzBD,KAAK,CAACG,MAAM,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,SAAS,GACnCJ,KAAK,CAACG,MAAM,CAACE,IAAI,GAAG,CAAC,CAAC,IAAI,SAAS;EACzC,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { themeColor } from "../theme-color/theme-color.js";
|
|
4
|
+
import { getPrimaryShade } from "../primary-shade.js";
|
|
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) {
|
|
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
|
+
return {
|
|
28
|
+
start,
|
|
29
|
+
end
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Creates a gradient configuration for use with expo-linear-gradient
|
|
35
|
+
* Returns gradient colors and coordinates based on theme gradient settings
|
|
36
|
+
*/
|
|
37
|
+
export function gradient(theme) {
|
|
38
|
+
return payload => {
|
|
39
|
+
const merged = {
|
|
40
|
+
from: payload?.from || theme.defaultGradient?.from || theme.primaryColor,
|
|
41
|
+
to: payload?.to || theme.defaultGradient?.to || theme.primaryColor,
|
|
42
|
+
deg: payload?.deg ?? theme.defaultGradient?.deg ?? 45
|
|
43
|
+
};
|
|
44
|
+
const primaryShade = getPrimaryShade(theme);
|
|
45
|
+
const fromColor = themeColor({
|
|
46
|
+
theme,
|
|
47
|
+
color: merged.from,
|
|
48
|
+
shade: primaryShade
|
|
49
|
+
});
|
|
50
|
+
const toColor = themeColor({
|
|
51
|
+
theme,
|
|
52
|
+
color: merged.to,
|
|
53
|
+
shade: primaryShade
|
|
54
|
+
});
|
|
55
|
+
const {
|
|
56
|
+
start,
|
|
57
|
+
end
|
|
58
|
+
} = degToCoordinates(merged.deg);
|
|
59
|
+
return {
|
|
60
|
+
colors: [fromColor, toColor],
|
|
61
|
+
start,
|
|
62
|
+
end
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Legacy function for web compatibility - returns CSS gradient string
|
|
69
|
+
* Not used in React Native but kept for API compatibility
|
|
70
|
+
*/
|
|
71
|
+
export function linearGradientCSS(deg, ...colors) {
|
|
72
|
+
return `linear-gradient(${deg}deg, ${colors.join(', ')})`;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=gradient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["themeColor","getPrimaryShade","degToCoordinates","deg","angle","radians","Math","PI","endX","cos","endY","sin","start","x","y","end","gradient","theme","payload","merged","from","defaultGradient","primaryColor","to","primaryShade","fromColor","color","shade","toColor","colors","linearGradientCSS","join"],"sourceRoot":"../../../../../../src","sources":["theme/functions/fns/gradient/gradient.ts"],"mappings":";;AAEA,SAASA,UAAU,QAAQ,+BAA4B;AACvD,SAASC,eAAe,QAAQ,qBAAkB;;AAElD;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CAACC,GAAW,EAAsE;EACzG,MAAMC,KAAK,GAAG,CAAED,GAAG,GAAG,GAAG,GAAI,GAAG,IAAI,GAAG,CAAC,CAAC;EACzC,MAAME,OAAO,GAAID,KAAK,GAAGE,IAAI,CAACC,EAAE,GAAI,GAA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AEP,MAAM,CAACI,EAAE;MAAEI,KAAK,EAAEH;IAAa,CAAC,CAAC;IAE5E,MAAM;MAAEZ,KAAK;MAAEG;IAAI,CAAC,GAAGb,gBAAgB,CAACiB,MAAM,CAAChB,GAAG,CAAC;IAEnD,OAAO;MACL0B,MAAM,EAAE,CAACJ,SAAS,EAAEG,OAAO,CAAC;MAC5BhB,KAAK;MACLG;IACF,CAAC;EACH,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASe,iBAAiBA,CAAC3B,GAAW,EAAE,GAAG0B,MAAgB,EAAE;EAClE,OAAO,mBAAmB1B,GAAG,QAAQ0B,MAAM,CAACE,IAAI,CAAC,IAAI,CAAC,GAAG;AAC3D","ignoreList":[]}
|
|
@@ -6,11 +6,10 @@ export const fontStyles = theme => () => ({
|
|
|
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 => () => {
|
|
12
11
|
return {
|
|
13
|
-
fontFamily: theme.
|
|
12
|
+
fontFamily: theme.fontFamily
|
|
14
13
|
};
|
|
15
14
|
};
|
|
16
15
|
export const focusStyles = _theme => () => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fontStyles","theme","fontFamily","inputFontStyles","
|
|
1
|
+
{"version":3,"names":["fontStyles","theme","fontFamily","inputFontStyles","focusStyles","_theme","placeholderStyles","opacity","cover","offset","position","top","right","bottom","left","hover","styles","activeStyles","transform","scale"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/helpers.ts"],"mappings":";;AAEA,OAAO,MAAMA,UAAU,GAAIC,KAAmB,IAAK,OAAO;EACxDC,UAAU,EAAED,KAAK,CAACC;AACpB,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAIF,KAAmB,IAAK,MAAM;EAC5D,OAAO;IACLC,UAAU,EAAED,KAAK,CAACC;EACpB,CAAC;AACH,CAAC;AAED,OAAO,MAAME,WAAW,GAAIC,MAAoB,IAAK,OAAO;EAC1D;EACA;EACA;AAAA,CACD,CAAC;AAEF,OAAO,MAAMC,iBAAiB,GAAID,MAAoB,IAAK,OAAO;EAChE;EACAE,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,OAAO,MAAMC,KAAK,GACfH,MAAoB,IACrB,CAACI,MAAc,GAAG,CAAC,MAAM;EACvBC,QAAQ,EAAE,UAAmB;EAC7BC,GAAG,EAAEF,MAAM;EACXG,KAAK,EAAEH,MAAM;EACbI,MAAM,EAAEJ,MAAM;EACdK,IAAI,EAAEL;AACR,CAAC,CAAC;AAEJ,OAAO,MAAMM,KAAK,GAAIV,MAAoB,IAAMW,MAAW,KAAM;EAC/D;EACA;EACA,GAAGA;AACL,CAAC,CAAC;AAEF,OAAO,MAAMC,YAAY,GAAIZ,MAAoB,KAAM;EACrD;EACAE,OAAO,EAAE,GAAG;EACZW,SAAS,EAAE,CAAC;IAAEC,KAAK,EAAE;EAAK,CAAC;AAC7B,CAAC,CAAC","ignoreList":[]}
|
|
@@ -5,6 +5,13 @@ import { rgba } from "./rgba.js";
|
|
|
5
5
|
import { size } from "./size.js";
|
|
6
6
|
import { themeColor } from "./theme-color/theme-color.js";
|
|
7
7
|
import { variant } from "./variant.js";
|
|
8
|
+
import { getPrimaryShade } from "./primary-shade.js";
|
|
9
|
+
import { shadow } from "./shadow.js";
|
|
10
|
+
import { gradient } from "./gradient/gradient.js";
|
|
11
|
+
import { lighten } from "./lighten.js";
|
|
12
|
+
import { darken } from "./darken.js";
|
|
13
|
+
import { dimmed } from "./dimmed.js";
|
|
14
|
+
import { largerThan, smallerThan } from "./breakpoints.js";
|
|
8
15
|
import * as helpers from "./helpers.js";
|
|
9
16
|
export const fns = {
|
|
10
17
|
radius,
|
|
@@ -12,6 +19,14 @@ export const fns = {
|
|
|
12
19
|
size,
|
|
13
20
|
variant,
|
|
14
21
|
themeColor,
|
|
22
|
+
getPrimaryShade,
|
|
23
|
+
shadow,
|
|
24
|
+
gradient,
|
|
25
|
+
lighten,
|
|
26
|
+
darken,
|
|
27
|
+
dimmed,
|
|
28
|
+
largerThan,
|
|
29
|
+
smallerThan,
|
|
15
30
|
...helpers
|
|
16
31
|
};
|
|
17
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["radius","rgba","size","themeColor","variant","helpers","fns"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/index.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,aAAU;AACjC,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,UAAU,QAAQ,8BAA2B;AACtD,SAASC,OAAO,QAAQ,cAAW;AACnC,OAAO,KAAKC,OAAO,MAAM,cAAW;AAEpC,OAAO,MAAMC,GAAG,GAAG;
|
|
1
|
+
{"version":3,"names":["radius","rgba","size","themeColor","variant","getPrimaryShade","shadow","gradient","lighten","darken","dimmed","largerThan","smallerThan","helpers","fns"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/index.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,aAAU;AACjC,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,UAAU,QAAQ,8BAA2B;AACtD,SAASC,OAAO,QAAQ,cAAW;AACnC,SAASC,eAAe,QAAQ,oBAAiB;AACjD,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,QAAQ,QAAQ,wBAAqB;AAC9C,SAASC,OAAO,QAAQ,cAAW;AACnC,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,UAAU,EAAEC,WAAW,QAAQ,kBAAe;AACvD,OAAO,KAAKC,OAAO,MAAM,cAAW;AAEpC,OAAO,MAAMC,GAAG,GAAG;EACjBd,MAAM;EACNC,IAAI;EACJC,IAAI;EACJE,OAAO;EACPD,UAAU;EACVE,eAAe;EACfC,MAAM;EACNC,QAAQ;EACRC,OAAO;EACPC,MAAM;EACNC,MAAM;EACNC,UAAU;EACVC,WAAW;EACX,GAAGC;AACL,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { toRgba } from "../../utils/to-rgba.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Lightens a color by mixing it with white
|
|
7
|
+
* @param color - The color to lighten (hex or rgb/rgba string)
|
|
8
|
+
* @param alpha - The amount to lighten (0-1, where 1 is completely white)
|
|
9
|
+
* @returns rgba color string
|
|
10
|
+
*/
|
|
11
|
+
export function lighten(color, alpha) {
|
|
12
|
+
const {
|
|
13
|
+
r,
|
|
14
|
+
g,
|
|
15
|
+
b,
|
|
16
|
+
a
|
|
17
|
+
} = toRgba(color);
|
|
18
|
+
const light = input => Math.round(input + (255 - input) * alpha);
|
|
19
|
+
return `rgba(${light(r)}, ${light(g)}, ${light(b)}, ${a})`;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=lighten.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["toRgba","lighten","color","alpha","r","g","b","a","light","input","Math","round"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/lighten.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,wBAAqB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,OAAOA,CAACC,KAAa,EAAEC,KAAa,EAAU;EAC5D,MAAM;IAAEC,CAAC;IAAEC,CAAC;IAAEC,CAAC;IAAEC;EAAE,CAAC,GAAGP,MAAM,CAACE,KAAK,CAAC;EAEpC,MAAMM,KAAK,GAAIC,KAAa,IAAKC,IAAI,CAACC,KAAK,CAACF,KAAK,GAAG,CAAC,GAAG,GAAGA,KAAK,IAAIN,KAAK,CAAC;EAE1E,OAAO,QAAQK,KAAK,CAACJ,CAAC,CAAC,KAAKI,KAAK,CAACH,CAAC,CAAC,KAAKG,KAAK,CAACF,CAAC,CAAC,KAAKC,CAAC,GAAG;AAC5D","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns the appropriate primary shade based on the current color scheme
|
|
5
|
+
* Matches Mantine web implementation
|
|
6
|
+
*/
|
|
7
|
+
export function getPrimaryShade(theme, colorScheme) {
|
|
8
|
+
if (typeof theme.primaryShade === 'number') {
|
|
9
|
+
return theme.primaryShade;
|
|
10
|
+
}
|
|
11
|
+
const scheme = colorScheme || theme.currentMode || 'light';
|
|
12
|
+
return theme.primaryShade[scheme];
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=primary-shade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getPrimaryShade","theme","colorScheme","primaryShade","scheme","currentMode"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/primary-shade.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASA,eAAeA,CAC7BC,KAAmB,EACnBC,WAA8B,EACtB;EACR,IAAI,OAAOD,KAAK,CAACE,YAAY,KAAK,QAAQ,EAAE;IAC1C,OAAOF,KAAK,CAACE,YAAY;EAC3B;EAEA,MAAMC,MAAM,GAAGF,WAAW,IAAID,KAAK,CAACI,WAAW,IAAI,OAAO;EAC1D,OAAOJ,KAAK,CAACE,YAAY,CAACC,MAAM,CAAC;AACnC","ignoreList":[]}
|