react-native-atomic-ui 1.0.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/CHANGELOG.md +145 -0
- package/README.md +485 -0
- package/dist/advanced/date-picker/index.d.ts +22 -0
- package/dist/advanced/date-picker/index.d.ts.map +1 -0
- package/dist/advanced/date-picker/index.js +31 -0
- package/dist/advanced/date-picker/index.js.map +7 -0
- package/dist/advanced/date-picker/index.mjs +10 -0
- package/dist/advanced/date-picker/index.mjs.map +7 -0
- package/dist/advanced/file-picker/index.d.ts +21 -0
- package/dist/advanced/file-picker/index.d.ts.map +1 -0
- package/dist/advanced/file-picker/index.js +31 -0
- package/dist/advanced/file-picker/index.js.map +7 -0
- package/dist/advanced/file-picker/index.mjs +10 -0
- package/dist/advanced/file-picker/index.mjs.map +7 -0
- package/dist/advanced/picker/index.d.ts +27 -0
- package/dist/advanced/picker/index.d.ts.map +1 -0
- package/dist/advanced/picker/index.js +37 -0
- package/dist/advanced/picker/index.js.map +7 -0
- package/dist/advanced/picker/index.mjs +16 -0
- package/dist/advanced/picker/index.mjs.map +7 -0
- package/dist/advanced/rich-text/index.d.ts +29 -0
- package/dist/advanced/rich-text/index.d.ts.map +1 -0
- package/dist/advanced/rich-text/index.js +37 -0
- package/dist/advanced/rich-text/index.js.map +7 -0
- package/dist/advanced/rich-text/index.mjs +16 -0
- package/dist/advanced/rich-text/index.mjs.map +7 -0
- package/dist/chunk-IOIXIQ2F.mjs +177 -0
- package/dist/chunk-IOIXIQ2F.mjs.map +7 -0
- package/dist/chunk-NUUZYCND.mjs +318 -0
- package/dist/chunk-NUUZYCND.mjs.map +7 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +485 -0
- package/dist/components/index.js.map +7 -0
- package/dist/components/index.mjs +48 -0
- package/dist/components/index.mjs.map +7 -0
- package/dist/components/inputs/Button.d.ts +7 -0
- package/dist/components/inputs/Button.d.ts.map +1 -0
- package/dist/components/inputs/Button.js +105 -0
- package/dist/components/inputs/Button.js.map +1 -0
- package/dist/components/layouts/Box.d.ts +18 -0
- package/dist/components/layouts/Box.d.ts.map +1 -0
- package/dist/components/layouts/Box.js +72 -0
- package/dist/components/layouts/Box.js.map +1 -0
- package/dist/components/typography/Text.d.ts +26 -0
- package/dist/components/typography/Text.d.ts.map +1 -0
- package/dist/components/typography/Text.js +70 -0
- package/dist/components/typography/Text.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +515 -0
- package/dist/index.js.map +7 -0
- package/dist/index.mjs +57 -0
- package/dist/index.mjs.map +7 -0
- package/dist/theme/index.d.ts +19 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +207 -0
- package/dist/theme/index.js.map +7 -0
- package/dist/theme/index.mjs +13 -0
- package/dist/theme/index.mjs.map +7 -0
- package/dist/theme/themes.d.ts +4 -0
- package/dist/theme/themes.d.ts.map +1 -0
- package/dist/theme/themes.js +127 -0
- package/dist/theme/themes.js.map +1 -0
- package/dist/types/index.d.ts +117 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utilities/math.d.ts +13 -0
- package/dist/utilities/math.d.ts.map +1 -0
- package/dist/utilities/math.js +27 -0
- package/dist/utilities/math.js.map +1 -0
- package/package.json +132 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/theme/index.tsx
|
|
31
|
+
var theme_exports = {};
|
|
32
|
+
__export(theme_exports, {
|
|
33
|
+
ThemeProvider: () => ThemeProvider,
|
|
34
|
+
darkTheme: () => darkTheme,
|
|
35
|
+
lightTheme: () => lightTheme,
|
|
36
|
+
useTheme: () => useTheme
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(theme_exports);
|
|
39
|
+
var import_react = __toESM(require("react"));
|
|
40
|
+
var import_react_native = require("react-native");
|
|
41
|
+
|
|
42
|
+
// src/theme/themes.ts
|
|
43
|
+
var baseTheme = {
|
|
44
|
+
spacing: {
|
|
45
|
+
xs: 4,
|
|
46
|
+
sm: 8,
|
|
47
|
+
md: 16,
|
|
48
|
+
lg: 24,
|
|
49
|
+
xl: 32,
|
|
50
|
+
xxl: 48
|
|
51
|
+
},
|
|
52
|
+
borderRadius: {
|
|
53
|
+
xs: 2,
|
|
54
|
+
sm: 4,
|
|
55
|
+
md: 8,
|
|
56
|
+
lg: 12,
|
|
57
|
+
full: 9999
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
var lightTheme = {
|
|
61
|
+
colors: {
|
|
62
|
+
primary: "#007AFF",
|
|
63
|
+
secondary: "#5AC8FA",
|
|
64
|
+
background: "#FFFFFF",
|
|
65
|
+
surface: "#F5F5F5",
|
|
66
|
+
text: "#000000",
|
|
67
|
+
textSecondary: "#666666",
|
|
68
|
+
textTertiary: "#999999",
|
|
69
|
+
border: "#CCCCCC",
|
|
70
|
+
borderLight: "#E8E8E8",
|
|
71
|
+
error: "#FF3B30",
|
|
72
|
+
success: "#34C759",
|
|
73
|
+
warning: "#FF9500",
|
|
74
|
+
info: "#5AC8FA",
|
|
75
|
+
transparent: "transparent",
|
|
76
|
+
white: "#FFFFFF",
|
|
77
|
+
black: "#000000",
|
|
78
|
+
disabled: "#D0D0D0"
|
|
79
|
+
},
|
|
80
|
+
typography: {
|
|
81
|
+
h1: { fontSize: 48, fontWeight: "700", lineHeight: 56 },
|
|
82
|
+
h2: { fontSize: 40, fontWeight: "700", lineHeight: 48 },
|
|
83
|
+
h3: { fontSize: 34, fontWeight: "700", lineHeight: 41 },
|
|
84
|
+
h4: { fontSize: 28, fontWeight: "700", lineHeight: 34 },
|
|
85
|
+
h5: { fontSize: 22, fontWeight: "600", lineHeight: 28 },
|
|
86
|
+
h6: { fontSize: 18, fontWeight: "600", lineHeight: 24 },
|
|
87
|
+
body1: { fontSize: 16, fontWeight: "400", lineHeight: 24 },
|
|
88
|
+
body2: { fontSize: 15, fontWeight: "400", lineHeight: 22 },
|
|
89
|
+
body3: { fontSize: 14, fontWeight: "400", lineHeight: 20 },
|
|
90
|
+
body4: { fontSize: 13, fontWeight: "400", lineHeight: 18 },
|
|
91
|
+
body5: { fontSize: 12, fontWeight: "400", lineHeight: 16 },
|
|
92
|
+
body6: { fontSize: 11, fontWeight: "400", lineHeight: 15 },
|
|
93
|
+
subtitle1: { fontSize: 14, fontWeight: "600", lineHeight: 20 },
|
|
94
|
+
subtitle2: { fontSize: 12, fontWeight: "600", lineHeight: 16 },
|
|
95
|
+
caption: { fontSize: 12, fontWeight: "400", lineHeight: 16 },
|
|
96
|
+
overline: { fontSize: 10, fontWeight: "600", lineHeight: 14 }
|
|
97
|
+
},
|
|
98
|
+
...baseTheme,
|
|
99
|
+
shadows: {
|
|
100
|
+
light: {
|
|
101
|
+
shadowColor: "#000",
|
|
102
|
+
shadowOffset: { width: 0, height: 1 },
|
|
103
|
+
shadowOpacity: 0.1,
|
|
104
|
+
shadowRadius: 2,
|
|
105
|
+
elevation: 2
|
|
106
|
+
},
|
|
107
|
+
medium: {
|
|
108
|
+
shadowColor: "#000",
|
|
109
|
+
shadowOffset: { width: 0, height: 4 },
|
|
110
|
+
shadowOpacity: 0.15,
|
|
111
|
+
shadowRadius: 8,
|
|
112
|
+
elevation: 4
|
|
113
|
+
},
|
|
114
|
+
heavy: {
|
|
115
|
+
shadowColor: "#000",
|
|
116
|
+
shadowOffset: { width: 0, height: 8 },
|
|
117
|
+
shadowOpacity: 0.2,
|
|
118
|
+
shadowRadius: 16,
|
|
119
|
+
elevation: 8
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
var darkTheme = {
|
|
124
|
+
colors: {
|
|
125
|
+
primary: "#0A84FF",
|
|
126
|
+
secondary: "#30B0C5",
|
|
127
|
+
background: "#1C1C1E",
|
|
128
|
+
surface: "#2C2C2E",
|
|
129
|
+
text: "#FFFFFF",
|
|
130
|
+
textSecondary: "#A0A0A0",
|
|
131
|
+
textTertiary: "#808080",
|
|
132
|
+
border: "#454546",
|
|
133
|
+
borderLight: "#3A3A3C",
|
|
134
|
+
error: "#FF453A",
|
|
135
|
+
success: "#30C759",
|
|
136
|
+
warning: "#FF9500",
|
|
137
|
+
info: "#30B0C5",
|
|
138
|
+
transparent: "transparent",
|
|
139
|
+
white: "#FFFFFF",
|
|
140
|
+
black: "#000000",
|
|
141
|
+
disabled: "#636366"
|
|
142
|
+
},
|
|
143
|
+
typography: lightTheme.typography,
|
|
144
|
+
...baseTheme,
|
|
145
|
+
shadows: {
|
|
146
|
+
light: {
|
|
147
|
+
shadowColor: "#000",
|
|
148
|
+
shadowOffset: { width: 0, height: 1 },
|
|
149
|
+
shadowOpacity: 0.3,
|
|
150
|
+
shadowRadius: 2,
|
|
151
|
+
elevation: 2
|
|
152
|
+
},
|
|
153
|
+
medium: {
|
|
154
|
+
shadowColor: "#000",
|
|
155
|
+
shadowOffset: { width: 0, height: 4 },
|
|
156
|
+
shadowOpacity: 0.4,
|
|
157
|
+
shadowRadius: 8,
|
|
158
|
+
elevation: 4
|
|
159
|
+
},
|
|
160
|
+
heavy: {
|
|
161
|
+
shadowColor: "#000",
|
|
162
|
+
shadowOffset: { width: 0, height: 8 },
|
|
163
|
+
shadowOpacity: 0.5,
|
|
164
|
+
shadowRadius: 16,
|
|
165
|
+
elevation: 8
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
// src/theme/index.tsx
|
|
171
|
+
var ThemeContext = (0, import_react.createContext)(null);
|
|
172
|
+
function ThemeProvider({
|
|
173
|
+
children,
|
|
174
|
+
defaultTheme = "system"
|
|
175
|
+
}) {
|
|
176
|
+
const systemColorScheme = (0, import_react_native.useColorScheme)();
|
|
177
|
+
const isSystemDark = systemColorScheme === "dark";
|
|
178
|
+
const [isDark, setIsDark] = (0, import_react.useState)(() => {
|
|
179
|
+
if (defaultTheme === "system") {
|
|
180
|
+
return isSystemDark;
|
|
181
|
+
}
|
|
182
|
+
return defaultTheme === "dark";
|
|
183
|
+
});
|
|
184
|
+
(0, import_react.useEffect)(() => {
|
|
185
|
+
if (defaultTheme === "system") {
|
|
186
|
+
setIsDark(isSystemDark);
|
|
187
|
+
}
|
|
188
|
+
}, [isSystemDark, defaultTheme]);
|
|
189
|
+
const theme = isDark ? darkTheme : lightTheme;
|
|
190
|
+
const toggleTheme = () => {
|
|
191
|
+
setIsDark((prev) => !prev);
|
|
192
|
+
};
|
|
193
|
+
const value = {
|
|
194
|
+
isDark,
|
|
195
|
+
theme,
|
|
196
|
+
toggleTheme
|
|
197
|
+
};
|
|
198
|
+
return /* @__PURE__ */ import_react.default.createElement(ThemeContext.Provider, { value }, children);
|
|
199
|
+
}
|
|
200
|
+
function useTheme() {
|
|
201
|
+
const context = (0, import_react.useContext)(ThemeContext);
|
|
202
|
+
if (!context) {
|
|
203
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
204
|
+
}
|
|
205
|
+
return context;
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/theme/index.tsx", "../../src/theme/themes.ts"],
|
|
4
|
+
"sourcesContent": ["import React, { createContext, useState, useContext, useEffect } from 'react';\nimport { useColorScheme } from 'react-native';\nimport type { ThemeContextValue } from '../types/index';\nimport { lightTheme, darkTheme } from './themes';\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null);\n\nexport interface ThemeProviderProps {\n children: React.ReactNode;\n defaultTheme?: 'light' | 'dark' | 'system';\n}\n\n/**\n * Context-based Theme Provider\n * Provides theme context without requiring Redux\n */\nexport function ThemeProvider({\n children,\n defaultTheme = 'system',\n}: ThemeProviderProps) {\n const systemColorScheme = useColorScheme();\n const isSystemDark = systemColorScheme === 'dark';\n\n const [isDark, setIsDark] = useState<boolean>(() => {\n if (defaultTheme === 'system') {\n return isSystemDark;\n }\n return defaultTheme === 'dark';\n });\n\n // Update when system preference changes\n useEffect(() => {\n if (defaultTheme === 'system') {\n setIsDark(isSystemDark);\n }\n }, [isSystemDark, defaultTheme]);\n\n const theme = isDark ? darkTheme : lightTheme;\n\n const toggleTheme = () => {\n setIsDark((prev) => !prev);\n };\n\n const value: ThemeContextValue = {\n isDark,\n theme,\n toggleTheme,\n };\n\n return (\n <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>\n );\n}\n\n/**\n * Hook to access theme context in components\n * Must be used within ThemeProvider\n */\nexport function useTheme(): ThemeContextValue {\n const context = useContext(ThemeContext);\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n return context;\n}\n\nexport { lightTheme, darkTheme } from './themes';\nexport type { Theme, ThemeContextValue } from '../types/index';\n", "import type { Theme } from '../types/index';\n\nconst baseTheme = {\n spacing: {\n xs: 4,\n sm: 8,\n md: 16,\n lg: 24,\n xl: 32,\n xxl: 48,\n },\n borderRadius: {\n xs: 2,\n sm: 4,\n md: 8,\n lg: 12,\n full: 9999,\n },\n};\n\nexport const lightTheme: Theme = {\n colors: {\n primary: '#007AFF',\n secondary: '#5AC8FA',\n background: '#FFFFFF',\n surface: '#F5F5F5',\n text: '#000000',\n textSecondary: '#666666',\n textTertiary: '#999999',\n border: '#CCCCCC',\n borderLight: '#E8E8E8',\n error: '#FF3B30',\n success: '#34C759',\n warning: '#FF9500',\n info: '#5AC8FA',\n transparent: 'transparent',\n white: '#FFFFFF',\n black: '#000000',\n disabled: '#D0D0D0',\n },\n typography: {\n h1: { fontSize: 48, fontWeight: '700', lineHeight: 56 },\n h2: { fontSize: 40, fontWeight: '700', lineHeight: 48 },\n h3: { fontSize: 34, fontWeight: '700', lineHeight: 41 },\n h4: { fontSize: 28, fontWeight: '700', lineHeight: 34 },\n h5: { fontSize: 22, fontWeight: '600', lineHeight: 28 },\n h6: { fontSize: 18, fontWeight: '600', lineHeight: 24 },\n body1: { fontSize: 16, fontWeight: '400', lineHeight: 24 },\n body2: { fontSize: 15, fontWeight: '400', lineHeight: 22 },\n body3: { fontSize: 14, fontWeight: '400', lineHeight: 20 },\n body4: { fontSize: 13, fontWeight: '400', lineHeight: 18 },\n body5: { fontSize: 12, fontWeight: '400', lineHeight: 16 },\n body6: { fontSize: 11, fontWeight: '400', lineHeight: 15 },\n subtitle1: { fontSize: 14, fontWeight: '600', lineHeight: 20 },\n subtitle2: { fontSize: 12, fontWeight: '600', lineHeight: 16 },\n caption: { fontSize: 12, fontWeight: '400', lineHeight: 16 },\n overline: { fontSize: 10, fontWeight: '600', lineHeight: 14 },\n },\n ...baseTheme,\n shadows: {\n light: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 1 },\n shadowOpacity: 0.1,\n shadowRadius: 2,\n elevation: 2,\n },\n medium: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.15,\n shadowRadius: 8,\n elevation: 4,\n },\n heavy: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 8 },\n shadowOpacity: 0.2,\n shadowRadius: 16,\n elevation: 8,\n },\n },\n};\n\nexport const darkTheme: Theme = {\n colors: {\n primary: '#0A84FF',\n secondary: '#30B0C5',\n background: '#1C1C1E',\n surface: '#2C2C2E',\n text: '#FFFFFF',\n textSecondary: '#A0A0A0',\n textTertiary: '#808080',\n border: '#454546',\n borderLight: '#3A3A3C',\n error: '#FF453A',\n success: '#30C759',\n warning: '#FF9500',\n info: '#30B0C5',\n transparent: 'transparent',\n white: '#FFFFFF',\n black: '#000000',\n disabled: '#636366',\n },\n typography: lightTheme.typography,\n ...baseTheme,\n shadows: {\n light: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 1 },\n shadowOpacity: 0.3,\n shadowRadius: 2,\n elevation: 2,\n },\n medium: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.4,\n shadowRadius: 8,\n elevation: 4,\n },\n heavy: {\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 8 },\n shadowOpacity: 0.5,\n shadowRadius: 16,\n elevation: 8,\n },\n },\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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I,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,8CAA8C;AAAA,EAChE;AACA,SAAO;AACT;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/theme/themes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAoB5C,eAAO,MAAM,UAAU,EAAE,KA8DxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KA6CvB,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
const baseTheme = {
|
|
2
|
+
spacing: {
|
|
3
|
+
xs: 4,
|
|
4
|
+
sm: 8,
|
|
5
|
+
md: 16,
|
|
6
|
+
lg: 24,
|
|
7
|
+
xl: 32,
|
|
8
|
+
xxl: 48,
|
|
9
|
+
},
|
|
10
|
+
borderRadius: {
|
|
11
|
+
xs: 2,
|
|
12
|
+
sm: 4,
|
|
13
|
+
md: 8,
|
|
14
|
+
lg: 12,
|
|
15
|
+
full: 9999,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export const lightTheme = {
|
|
19
|
+
colors: {
|
|
20
|
+
primary: '#007AFF',
|
|
21
|
+
secondary: '#5AC8FA',
|
|
22
|
+
background: '#FFFFFF',
|
|
23
|
+
surface: '#F5F5F5',
|
|
24
|
+
text: '#000000',
|
|
25
|
+
textSecondary: '#666666',
|
|
26
|
+
textTertiary: '#999999',
|
|
27
|
+
border: '#CCCCCC',
|
|
28
|
+
borderLight: '#E8E8E8',
|
|
29
|
+
error: '#FF3B30',
|
|
30
|
+
success: '#34C759',
|
|
31
|
+
warning: '#FF9500',
|
|
32
|
+
info: '#5AC8FA',
|
|
33
|
+
transparent: 'transparent',
|
|
34
|
+
white: '#FFFFFF',
|
|
35
|
+
black: '#000000',
|
|
36
|
+
disabled: '#D0D0D0',
|
|
37
|
+
},
|
|
38
|
+
typography: {
|
|
39
|
+
h1: { fontSize: 48, fontWeight: '700', lineHeight: 56 },
|
|
40
|
+
h2: { fontSize: 40, fontWeight: '700', lineHeight: 48 },
|
|
41
|
+
h3: { fontSize: 34, fontWeight: '700', lineHeight: 41 },
|
|
42
|
+
h4: { fontSize: 28, fontWeight: '700', lineHeight: 34 },
|
|
43
|
+
h5: { fontSize: 22, fontWeight: '600', lineHeight: 28 },
|
|
44
|
+
h6: { fontSize: 18, fontWeight: '600', lineHeight: 24 },
|
|
45
|
+
body1: { fontSize: 16, fontWeight: '400', lineHeight: 24 },
|
|
46
|
+
body2: { fontSize: 15, fontWeight: '400', lineHeight: 22 },
|
|
47
|
+
body3: { fontSize: 14, fontWeight: '400', lineHeight: 20 },
|
|
48
|
+
body4: { fontSize: 13, fontWeight: '400', lineHeight: 18 },
|
|
49
|
+
body5: { fontSize: 12, fontWeight: '400', lineHeight: 16 },
|
|
50
|
+
body6: { fontSize: 11, fontWeight: '400', lineHeight: 15 },
|
|
51
|
+
subtitle1: { fontSize: 14, fontWeight: '600', lineHeight: 20 },
|
|
52
|
+
subtitle2: { fontSize: 12, fontWeight: '600', lineHeight: 16 },
|
|
53
|
+
caption: { fontSize: 12, fontWeight: '400', lineHeight: 16 },
|
|
54
|
+
overline: { fontSize: 10, fontWeight: '600', lineHeight: 14 },
|
|
55
|
+
},
|
|
56
|
+
...baseTheme,
|
|
57
|
+
shadows: {
|
|
58
|
+
light: {
|
|
59
|
+
shadowColor: '#000',
|
|
60
|
+
shadowOffset: { width: 0, height: 1 },
|
|
61
|
+
shadowOpacity: 0.1,
|
|
62
|
+
shadowRadius: 2,
|
|
63
|
+
elevation: 2,
|
|
64
|
+
},
|
|
65
|
+
medium: {
|
|
66
|
+
shadowColor: '#000',
|
|
67
|
+
shadowOffset: { width: 0, height: 4 },
|
|
68
|
+
shadowOpacity: 0.15,
|
|
69
|
+
shadowRadius: 8,
|
|
70
|
+
elevation: 4,
|
|
71
|
+
},
|
|
72
|
+
heavy: {
|
|
73
|
+
shadowColor: '#000',
|
|
74
|
+
shadowOffset: { width: 0, height: 8 },
|
|
75
|
+
shadowOpacity: 0.2,
|
|
76
|
+
shadowRadius: 16,
|
|
77
|
+
elevation: 8,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
export const darkTheme = {
|
|
82
|
+
colors: {
|
|
83
|
+
primary: '#0A84FF',
|
|
84
|
+
secondary: '#30B0C5',
|
|
85
|
+
background: '#1C1C1E',
|
|
86
|
+
surface: '#2C2C2E',
|
|
87
|
+
text: '#FFFFFF',
|
|
88
|
+
textSecondary: '#A0A0A0',
|
|
89
|
+
textTertiary: '#808080',
|
|
90
|
+
border: '#454546',
|
|
91
|
+
borderLight: '#3A3A3C',
|
|
92
|
+
error: '#FF453A',
|
|
93
|
+
success: '#30C759',
|
|
94
|
+
warning: '#FF9500',
|
|
95
|
+
info: '#30B0C5',
|
|
96
|
+
transparent: 'transparent',
|
|
97
|
+
white: '#FFFFFF',
|
|
98
|
+
black: '#000000',
|
|
99
|
+
disabled: '#636366',
|
|
100
|
+
},
|
|
101
|
+
typography: lightTheme.typography,
|
|
102
|
+
...baseTheme,
|
|
103
|
+
shadows: {
|
|
104
|
+
light: {
|
|
105
|
+
shadowColor: '#000',
|
|
106
|
+
shadowOffset: { width: 0, height: 1 },
|
|
107
|
+
shadowOpacity: 0.3,
|
|
108
|
+
shadowRadius: 2,
|
|
109
|
+
elevation: 2,
|
|
110
|
+
},
|
|
111
|
+
medium: {
|
|
112
|
+
shadowColor: '#000',
|
|
113
|
+
shadowOffset: { width: 0, height: 4 },
|
|
114
|
+
shadowOpacity: 0.4,
|
|
115
|
+
shadowRadius: 8,
|
|
116
|
+
elevation: 4,
|
|
117
|
+
},
|
|
118
|
+
heavy: {
|
|
119
|
+
shadowColor: '#000',
|
|
120
|
+
shadowOffset: { width: 0, height: 8 },
|
|
121
|
+
shadowOpacity: 0.5,
|
|
122
|
+
shadowRadius: 16,
|
|
123
|
+
elevation: 8,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=themes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../src/theme/themes.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG;IAChB,OAAO,EAAE;QACP,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,GAAG,EAAE,EAAE;KACR;IACD,YAAY,EAAE;QACZ,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,EAAE;QACN,IAAI,EAAE,IAAI;KACX;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,MAAM,EAAE;QACN,OAAO,EAAE,SAAS;QAClB,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,SAAS;QACrB,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;QACf,aAAa,EAAE,SAAS;QACxB,YAAY,EAAE,SAAS;QACvB,MAAM,EAAE,SAAS;QACjB,WAAW,EAAE,SAAS;QACtB,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,aAAa;QAC1B,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;KACpB;IACD,UAAU,EAAE;QACV,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE;QACvD,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE;QACvD,EAAE,EAAE,EAAE,QAAQ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C,UAAU;IACjC,GAAG,SAAS;IACZ,OAAO,EAAE;QACP,KAAK,EAAE;YACL,WAAW,EAAE,MAAM;YACnB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;YACrC,aAAa,EAAE,GAAG;YAClB,YAAY,EAAE,CAAC;YACf,SAAS,EAAE,CAAC;SACb;QACD,MAAM,EAAE;YACN,WAAW,EAAE,MAAM;YACnB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;YACrC,aAAa,EAAE,GAAG;YAClB,YAAY,EAAE,CAAC;YACf,SAAS,EAAE,CAAC;SACb;QACD,KAAK,EAAE;YACL,WAAW,EAAE,MAAM;YACnB,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;YACrC,aAAa,EAAE,GAAG;YAClB,YAAY,EAAE,EAAE;YAChB,SAAS,EAAE,CAAC;SACb;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
export interface ColorBank {
|
|
2
|
+
primary: string;
|
|
3
|
+
secondary: string;
|
|
4
|
+
background: string;
|
|
5
|
+
surface: string;
|
|
6
|
+
text: string;
|
|
7
|
+
textSecondary: string;
|
|
8
|
+
textTertiary: string;
|
|
9
|
+
border: string;
|
|
10
|
+
borderLight: string;
|
|
11
|
+
error: string;
|
|
12
|
+
success: string;
|
|
13
|
+
warning: string;
|
|
14
|
+
info: string;
|
|
15
|
+
transparent: string;
|
|
16
|
+
white: string;
|
|
17
|
+
black: string;
|
|
18
|
+
disabled: string;
|
|
19
|
+
}
|
|
20
|
+
export interface TypographyConfig {
|
|
21
|
+
fontSize: number;
|
|
22
|
+
fontWeight: '400' | '500' | '600' | '700' | '800' | '900';
|
|
23
|
+
lineHeight: number;
|
|
24
|
+
letterSpacing?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface TypographySystem {
|
|
27
|
+
h1: TypographyConfig;
|
|
28
|
+
h2: TypographyConfig;
|
|
29
|
+
h3: TypographyConfig;
|
|
30
|
+
h4: TypographyConfig;
|
|
31
|
+
h5: TypographyConfig;
|
|
32
|
+
h6: TypographyConfig;
|
|
33
|
+
body1: TypographyConfig;
|
|
34
|
+
body2: TypographyConfig;
|
|
35
|
+
body3: TypographyConfig;
|
|
36
|
+
body4: TypographyConfig;
|
|
37
|
+
body5: TypographyConfig;
|
|
38
|
+
body6: TypographyConfig;
|
|
39
|
+
subtitle1: TypographyConfig;
|
|
40
|
+
subtitle2: TypographyConfig;
|
|
41
|
+
caption: TypographyConfig;
|
|
42
|
+
overline: TypographyConfig;
|
|
43
|
+
}
|
|
44
|
+
export interface Theme {
|
|
45
|
+
colors: ColorBank;
|
|
46
|
+
typography: TypographySystem;
|
|
47
|
+
spacing: {
|
|
48
|
+
xs: number;
|
|
49
|
+
sm: number;
|
|
50
|
+
md: number;
|
|
51
|
+
lg: number;
|
|
52
|
+
xl: number;
|
|
53
|
+
xxl: number;
|
|
54
|
+
};
|
|
55
|
+
borderRadius: {
|
|
56
|
+
xs: number;
|
|
57
|
+
sm: number;
|
|
58
|
+
md: number;
|
|
59
|
+
lg: number;
|
|
60
|
+
full: number;
|
|
61
|
+
};
|
|
62
|
+
shadows: {
|
|
63
|
+
light: any;
|
|
64
|
+
medium: any;
|
|
65
|
+
heavy: any;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export interface ThemeContextValue {
|
|
69
|
+
isDark: boolean;
|
|
70
|
+
theme: Theme;
|
|
71
|
+
toggleTheme: () => void;
|
|
72
|
+
}
|
|
73
|
+
export interface BoxProps {
|
|
74
|
+
children?: React.ReactNode;
|
|
75
|
+
padding?: keyof Theme['spacing'];
|
|
76
|
+
paddingHorizontal?: keyof Theme['spacing'];
|
|
77
|
+
paddingVertical?: keyof Theme['spacing'];
|
|
78
|
+
margin?: keyof Theme['spacing'];
|
|
79
|
+
marginHorizontal?: keyof Theme['spacing'];
|
|
80
|
+
marginVertical?: keyof Theme['spacing'];
|
|
81
|
+
gap?: keyof Theme['spacing'];
|
|
82
|
+
backgroundColor?: string;
|
|
83
|
+
borderRadius?: keyof Theme['borderRadius'];
|
|
84
|
+
style?: any;
|
|
85
|
+
testID?: string;
|
|
86
|
+
}
|
|
87
|
+
export interface ButtonProps {
|
|
88
|
+
label: string;
|
|
89
|
+
onPress: () => void;
|
|
90
|
+
variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
91
|
+
size?: 'small' | 'medium' | 'large';
|
|
92
|
+
disabled?: boolean;
|
|
93
|
+
loading?: boolean;
|
|
94
|
+
icon?: React.ReactNode;
|
|
95
|
+
style?: any;
|
|
96
|
+
testID?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface InputProps {
|
|
99
|
+
value: string;
|
|
100
|
+
onChangeText: (text: string) => void;
|
|
101
|
+
placeholder?: string;
|
|
102
|
+
label?: string;
|
|
103
|
+
editable?: boolean;
|
|
104
|
+
secureTextEntry?: boolean;
|
|
105
|
+
keyboardType?: 'default' | 'numeric' | 'email-address' | 'phone-pad';
|
|
106
|
+
style?: any;
|
|
107
|
+
testID?: string;
|
|
108
|
+
}
|
|
109
|
+
export interface TextProps {
|
|
110
|
+
children?: React.ReactNode;
|
|
111
|
+
variant?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body1' | 'body2' | 'body3' | 'body4' | 'body5' | 'body6' | 'subtitle1' | 'subtitle2' | 'caption' | 'overline';
|
|
112
|
+
color?: string;
|
|
113
|
+
textAlign?: 'auto' | 'left' | 'right' | 'center' | 'justify';
|
|
114
|
+
style?: any;
|
|
115
|
+
testID?: string;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IACh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,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC;IACnK,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC7D,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a value to integer or return 0 if parsing fails
|
|
3
|
+
*/
|
|
4
|
+
export declare function parseIntOrZero(value: string | number | undefined): number;
|
|
5
|
+
/**
|
|
6
|
+
* Parse a value to float or return 0 if parsing fails
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseFloatOrZero(value: string | number | undefined): number;
|
|
9
|
+
/**
|
|
10
|
+
* Clamp a value between min and max
|
|
11
|
+
*/
|
|
12
|
+
export declare function clamp(value: number, min: number, max: number): number;
|
|
13
|
+
//# sourceMappingURL=math.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/utilities/math.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAMzE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAM3E;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAErE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a value to integer or return 0 if parsing fails
|
|
3
|
+
*/
|
|
4
|
+
export function parseIntOrZero(value) {
|
|
5
|
+
if (value === undefined || value === null) {
|
|
6
|
+
return 0;
|
|
7
|
+
}
|
|
8
|
+
const parsed = parseInt(String(value), 10);
|
|
9
|
+
return isNaN(parsed) ? 0 : parsed;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Parse a value to float or return 0 if parsing fails
|
|
13
|
+
*/
|
|
14
|
+
export function parseFloatOrZero(value) {
|
|
15
|
+
if (value === undefined || value === null) {
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
18
|
+
const parsed = parseFloat(String(value));
|
|
19
|
+
return isNaN(parsed) ? 0 : parsed;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Clamp a value between min and max
|
|
23
|
+
*/
|
|
24
|
+
export function clamp(value, min, max) {
|
|
25
|
+
return Math.min(Math.max(value, min), max);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=math.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.js","sourceRoot":"","sources":["../../src/utilities/math.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAkC;IAC/D,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAC1C,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3C,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAkC;IACjE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAC1C,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACzC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW;IAC3D,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AAC7C,CAAC"}
|