@coze-arch/cli 0.0.1-alpha.912cd5 → 0.0.1-alpha.98e280
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/__templates__/expo/.coze +7 -2
- package/lib/__templates__/expo/.cozeproj/scripts/{deploy_build.sh → dev_build.sh} +25 -25
- package/lib/__templates__/expo/.cozeproj/scripts/{deploy_run.sh → dev_run.sh} +35 -57
- package/lib/__templates__/expo/.cozeproj/scripts/prod_build.sh +47 -0
- package/lib/__templates__/expo/.cozeproj/scripts/prod_run.sh +35 -0
- package/lib/__templates__/expo/_npmrc +1 -1
- package/lib/__templates__/expo/babel.config.js +10 -0
- package/lib/__templates__/expo/client/components/ThemedText.tsx +33 -0
- package/lib/__templates__/expo/client/components/ThemedView.tsx +38 -0
- package/lib/__templates__/expo/client/constants/theme.ts +779 -47
- package/lib/__templates__/expo/client/contexts/AuthContext.tsx +14 -107
- package/lib/__templates__/expo/client/hooks/useTheme.ts +1 -1
- package/lib/__templates__/expo/client/screens/home/index.tsx +1 -4
- package/lib/__templates__/expo/client/screens/home/styles.ts +1 -273
- package/lib/__templates__/expo/client/utils/index.ts +1 -2
- package/lib/__templates__/expo/metro.config.js +76 -8
- package/lib/__templates__/expo/package.json +17 -6
- package/lib/__templates__/expo/pnpm-lock.yaml +153 -516
- package/lib/__templates__/expo/src/index.ts +2 -2
- package/lib/__templates__/expo/template.config.js +1 -1
- package/lib/__templates__/nextjs/.coze +3 -3
- package/lib/__templates__/nextjs/_npmrc +1 -1
- package/lib/__templates__/nextjs/package.json +9 -3
- package/lib/__templates__/nextjs/pnpm-lock.yaml +2501 -1120
- package/lib/__templates__/nextjs/scripts/dev.sh +8 -27
- package/lib/__templates__/nextjs/src/app/globals.css +99 -87
- package/lib/__templates__/nextjs/src/app/layout.tsx +18 -22
- package/lib/__templates__/nextjs/template.config.js +1 -1
- package/lib/__templates__/templates.json +7 -0
- package/lib/__templates__/vite/.coze +3 -3
- package/lib/__templates__/vite/README.md +204 -26
- package/lib/__templates__/vite/_npmrc +1 -1
- package/lib/__templates__/vite/package.json +1 -1
- package/lib/__templates__/vite/pnpm-lock.yaml +120 -120
- package/lib/__templates__/vite/scripts/dev.sh +7 -26
- package/lib/__templates__/vite/template.config.js +10 -1
- package/lib/__templates__/vite/vite.config.ts +3 -3
- package/lib/cli.js +408 -248
- package/package.json +7 -3
- package/lib/__templates__/nextjs/.babelrc +0 -15
- package/lib/__templates__/nextjs/server.mjs +0 -50
|
@@ -1,30 +1,59 @@
|
|
|
1
|
-
import { Platform } from "react-native";
|
|
2
|
-
|
|
3
|
-
const tintColorLight = "#007AFF";
|
|
4
|
-
const tintColorDark = "#0A84FF";
|
|
1
|
+
import { Platform, StyleSheet } from "react-native";
|
|
5
2
|
|
|
6
3
|
export const Colors = {
|
|
7
4
|
light: {
|
|
8
|
-
text: "#
|
|
5
|
+
text: "#111827",
|
|
6
|
+
textPrimary: "#111827",
|
|
7
|
+
textSecondary: "#374151",
|
|
8
|
+
textMuted: "#9CA3AF",
|
|
9
|
+
textDisabled: "#D1D5DB",
|
|
10
|
+
placeholder: "#9CA3AF",
|
|
9
11
|
buttonText: "#FFFFFF",
|
|
10
|
-
tabIconDefault: "#
|
|
11
|
-
tabIconSelected:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
tabIconDefault: "#9CA3AF",
|
|
13
|
+
tabIconSelected: "#111827",
|
|
14
|
+
primary: "#111827",
|
|
15
|
+
accent: "#000000",
|
|
16
|
+
link: "#111827",
|
|
17
|
+
success: "#16A34A",
|
|
18
|
+
warning: "#F59E0B",
|
|
19
|
+
error: "#DC2626",
|
|
20
|
+
info: "#2563EB",
|
|
21
|
+
backgroundRoot: "#FFFFFF",
|
|
22
|
+
backgroundDefault: "#F9FAFB",
|
|
23
|
+
backgroundSecondary: "#F3F4F6",
|
|
24
|
+
backgroundTertiary: "#E5E7EB",
|
|
25
|
+
border: "#E5E7EB",
|
|
26
|
+
borderLight: "#F3F4F6",
|
|
27
|
+
divider: "#F3F4F6",
|
|
28
|
+
overlay: "rgba(0, 0, 0, 0.4)",
|
|
29
|
+
chartBackground: "rgba(249, 250, 251, 0.5)",
|
|
17
30
|
},
|
|
18
31
|
dark: {
|
|
19
32
|
text: "#ECEDEE",
|
|
33
|
+
textPrimary: "#ECEDEE",
|
|
34
|
+
textSecondary: "#9BA1A6",
|
|
35
|
+
textMuted: "#6F767E",
|
|
36
|
+
textDisabled: "#4A4D50",
|
|
37
|
+
placeholder: "#6F767E",
|
|
20
38
|
buttonText: "#FFFFFF",
|
|
21
|
-
tabIconDefault: "#
|
|
22
|
-
tabIconSelected:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
39
|
+
tabIconDefault: "#6F767E",
|
|
40
|
+
tabIconSelected: "#ECEDEE",
|
|
41
|
+
primary: "#ECEDEE",
|
|
42
|
+
accent: "#FFFFFF",
|
|
43
|
+
link: "#ECEDEE",
|
|
44
|
+
success: "#30D158",
|
|
45
|
+
warning: "#FF9F0A",
|
|
46
|
+
error: "#FF453A",
|
|
47
|
+
info: "#64D2FF",
|
|
48
|
+
backgroundRoot: "#000000",
|
|
49
|
+
backgroundDefault: "#1C1C1E",
|
|
50
|
+
backgroundSecondary: "#2C2C2E",
|
|
51
|
+
backgroundTertiary: "#3A3A3C",
|
|
52
|
+
border: "#3A3A3C",
|
|
53
|
+
borderLight: "#2C2C2E",
|
|
54
|
+
divider: "#2C2C2E",
|
|
55
|
+
overlay: "rgba(0, 0, 0, 0.6)",
|
|
56
|
+
chartBackground: "rgba(28, 28, 30, 0.5)",
|
|
28
57
|
},
|
|
29
58
|
};
|
|
30
59
|
|
|
@@ -38,22 +67,48 @@ export const Spacing = {
|
|
|
38
67
|
"3xl": 32,
|
|
39
68
|
"4xl": 40,
|
|
40
69
|
"5xl": 48,
|
|
70
|
+
"6xl": 64,
|
|
41
71
|
inputHeight: 48,
|
|
42
|
-
buttonHeight:
|
|
72
|
+
buttonHeight: 48,
|
|
73
|
+
avatarSize: 40,
|
|
74
|
+
iconButtonSize: 32,
|
|
75
|
+
contentPaddingHorizontal: 32,
|
|
76
|
+
sectionGap: 40,
|
|
77
|
+
sectionGapLarge: 48,
|
|
78
|
+
itemGap: 8,
|
|
79
|
+
detailGap: 48,
|
|
80
|
+
chartHeight: 128,
|
|
43
81
|
};
|
|
44
82
|
|
|
45
83
|
export const BorderRadius = {
|
|
46
|
-
xs:
|
|
47
|
-
sm:
|
|
48
|
-
md:
|
|
49
|
-
lg:
|
|
50
|
-
xl:
|
|
51
|
-
"2xl":
|
|
52
|
-
"3xl":
|
|
84
|
+
xs: 4,
|
|
85
|
+
sm: 8,
|
|
86
|
+
md: 12,
|
|
87
|
+
lg: 16,
|
|
88
|
+
xl: 20,
|
|
89
|
+
"2xl": 24,
|
|
90
|
+
"3xl": 40,
|
|
53
91
|
full: 9999,
|
|
54
92
|
};
|
|
55
93
|
|
|
56
94
|
export const Typography = {
|
|
95
|
+
display: {
|
|
96
|
+
fontSize: 112,
|
|
97
|
+
lineHeight: 112,
|
|
98
|
+
fontWeight: "200" as const,
|
|
99
|
+
letterSpacing: -4,
|
|
100
|
+
},
|
|
101
|
+
displayLarge: {
|
|
102
|
+
fontSize: 112,
|
|
103
|
+
lineHeight: 112,
|
|
104
|
+
fontWeight: "200" as const,
|
|
105
|
+
letterSpacing: -2,
|
|
106
|
+
},
|
|
107
|
+
displayMedium: {
|
|
108
|
+
fontSize: 48,
|
|
109
|
+
lineHeight: 56,
|
|
110
|
+
fontWeight: "200" as const,
|
|
111
|
+
},
|
|
57
112
|
h1: {
|
|
58
113
|
fontSize: 32,
|
|
59
114
|
lineHeight: 40,
|
|
@@ -67,52 +122,729 @@ export const Typography = {
|
|
|
67
122
|
h3: {
|
|
68
123
|
fontSize: 24,
|
|
69
124
|
lineHeight: 32,
|
|
70
|
-
fontWeight: "
|
|
125
|
+
fontWeight: "300" as const,
|
|
71
126
|
},
|
|
72
127
|
h4: {
|
|
73
128
|
fontSize: 20,
|
|
74
129
|
lineHeight: 28,
|
|
75
130
|
fontWeight: "600" as const,
|
|
76
131
|
},
|
|
132
|
+
title: {
|
|
133
|
+
fontSize: 18,
|
|
134
|
+
lineHeight: 24,
|
|
135
|
+
fontWeight: "700" as const,
|
|
136
|
+
},
|
|
77
137
|
body: {
|
|
78
138
|
fontSize: 16,
|
|
79
139
|
lineHeight: 24,
|
|
80
140
|
fontWeight: "400" as const,
|
|
81
141
|
},
|
|
142
|
+
bodyMedium: {
|
|
143
|
+
fontSize: 16,
|
|
144
|
+
lineHeight: 24,
|
|
145
|
+
fontWeight: "500" as const,
|
|
146
|
+
},
|
|
82
147
|
small: {
|
|
83
148
|
fontSize: 14,
|
|
84
149
|
lineHeight: 20,
|
|
85
150
|
fontWeight: "400" as const,
|
|
86
151
|
},
|
|
152
|
+
smallMedium: {
|
|
153
|
+
fontSize: 14,
|
|
154
|
+
lineHeight: 20,
|
|
155
|
+
fontWeight: "500" as const,
|
|
156
|
+
},
|
|
157
|
+
caption: {
|
|
158
|
+
fontSize: 12,
|
|
159
|
+
lineHeight: 16,
|
|
160
|
+
fontWeight: "400" as const,
|
|
161
|
+
},
|
|
162
|
+
captionMedium: {
|
|
163
|
+
fontSize: 12,
|
|
164
|
+
lineHeight: 16,
|
|
165
|
+
fontWeight: "500" as const,
|
|
166
|
+
},
|
|
167
|
+
label: {
|
|
168
|
+
fontSize: 14,
|
|
169
|
+
lineHeight: 20,
|
|
170
|
+
fontWeight: "500" as const,
|
|
171
|
+
letterSpacing: 2,
|
|
172
|
+
textTransform: "uppercase" as const,
|
|
173
|
+
},
|
|
174
|
+
labelSmall: {
|
|
175
|
+
fontSize: 12,
|
|
176
|
+
lineHeight: 16,
|
|
177
|
+
fontWeight: "500" as const,
|
|
178
|
+
letterSpacing: 1,
|
|
179
|
+
textTransform: "uppercase" as const,
|
|
180
|
+
},
|
|
181
|
+
labelTitle: {
|
|
182
|
+
fontSize: 14,
|
|
183
|
+
lineHeight: 20,
|
|
184
|
+
fontWeight: "700" as const,
|
|
185
|
+
letterSpacing: 2,
|
|
186
|
+
textTransform: "uppercase" as const,
|
|
187
|
+
},
|
|
87
188
|
link: {
|
|
88
189
|
fontSize: 16,
|
|
89
190
|
lineHeight: 24,
|
|
90
191
|
fontWeight: "400" as const,
|
|
91
192
|
},
|
|
193
|
+
stat: {
|
|
194
|
+
fontSize: 30,
|
|
195
|
+
lineHeight: 36,
|
|
196
|
+
fontWeight: "300" as const,
|
|
197
|
+
},
|
|
198
|
+
tiny: {
|
|
199
|
+
fontSize: 10,
|
|
200
|
+
lineHeight: 14,
|
|
201
|
+
fontWeight: "400" as const,
|
|
202
|
+
},
|
|
203
|
+
navLabel: {
|
|
204
|
+
fontSize: 10,
|
|
205
|
+
lineHeight: 14,
|
|
206
|
+
fontWeight: "500" as const,
|
|
207
|
+
},
|
|
92
208
|
};
|
|
93
209
|
|
|
94
210
|
export const Fonts = Platform.select({
|
|
95
211
|
ios: {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
/** iOS `UIFontDescriptorSystemDesignRounded` */
|
|
101
|
-
rounded: "ui-rounded",
|
|
102
|
-
/** iOS `UIFontDescriptorSystemDesignMonospaced` */
|
|
103
|
-
mono: "ui-monospace",
|
|
212
|
+
sans: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
213
|
+
},
|
|
214
|
+
android: {
|
|
215
|
+
sans: "Roboto, 'Segoe UI', Helvetica, Arial, sans-serif",
|
|
104
216
|
},
|
|
105
217
|
default: {
|
|
106
|
-
sans: "
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
218
|
+
sans: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
219
|
+
},
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
export const Shadow = {
|
|
223
|
+
none: {},
|
|
224
|
+
minimal: Platform.select({
|
|
225
|
+
ios: { shadowColor: "#000", shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.05, shadowRadius: 2 },
|
|
226
|
+
android: { elevation: 1 },
|
|
227
|
+
default: {},
|
|
228
|
+
}),
|
|
229
|
+
sm: Platform.select({
|
|
230
|
+
ios: { shadowColor: "#000", shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.05, shadowRadius: 2 },
|
|
231
|
+
android: { elevation: 1 },
|
|
232
|
+
default: {},
|
|
233
|
+
}),
|
|
234
|
+
md: Platform.select({
|
|
235
|
+
ios: { shadowColor: "#000", shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.1, shadowRadius: 4 },
|
|
236
|
+
android: { elevation: 3 },
|
|
237
|
+
default: {},
|
|
238
|
+
}),
|
|
239
|
+
lg: Platform.select({
|
|
240
|
+
ios: { shadowColor: "#000", shadowOffset: { width: 0, height: 4 }, shadowOpacity: 0.15, shadowRadius: 8 },
|
|
241
|
+
android: { elevation: 6 },
|
|
242
|
+
default: {},
|
|
243
|
+
}),
|
|
244
|
+
island: Platform.select({
|
|
245
|
+
ios: { shadowColor: "#000", shadowOffset: { width: 0, height: 4 }, shadowOpacity: 0.1, shadowRadius: 20 },
|
|
246
|
+
android: { elevation: 8 },
|
|
247
|
+
default: {},
|
|
248
|
+
}),
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export const Duration = {
|
|
252
|
+
fast: 150,
|
|
253
|
+
normal: 250,
|
|
254
|
+
slow: 400,
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
export const ZIndex = {
|
|
258
|
+
base: 0,
|
|
259
|
+
dropdown: 100,
|
|
260
|
+
sticky: 200,
|
|
261
|
+
modal: 300,
|
|
262
|
+
toast: 400,
|
|
263
|
+
overlay: 500,
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
export type Theme = typeof Colors.light;
|
|
267
|
+
|
|
268
|
+
export const CommonStyles = StyleSheet.create({
|
|
269
|
+
container: {
|
|
270
|
+
flex: 1,
|
|
271
|
+
},
|
|
272
|
+
scrollContent: {
|
|
273
|
+
paddingHorizontal: Spacing.contentPaddingHorizontal,
|
|
274
|
+
},
|
|
275
|
+
centerContent: {
|
|
276
|
+
justifyContent: "center",
|
|
277
|
+
alignItems: "center",
|
|
278
|
+
},
|
|
279
|
+
row: {
|
|
280
|
+
flexDirection: "row",
|
|
281
|
+
alignItems: "center",
|
|
282
|
+
},
|
|
283
|
+
rowGap: {
|
|
284
|
+
flexDirection: "row",
|
|
285
|
+
alignItems: "center",
|
|
286
|
+
gap: Spacing.sm,
|
|
287
|
+
},
|
|
288
|
+
rowBetween: {
|
|
289
|
+
flexDirection: "row",
|
|
290
|
+
justifyContent: "space-between",
|
|
291
|
+
alignItems: "center",
|
|
292
|
+
},
|
|
293
|
+
rowBetweenEnd: {
|
|
294
|
+
flexDirection: "row",
|
|
295
|
+
justifyContent: "space-between",
|
|
296
|
+
alignItems: "flex-end",
|
|
297
|
+
},
|
|
298
|
+
rowBetweenStart: {
|
|
299
|
+
flexDirection: "row",
|
|
300
|
+
justifyContent: "space-between",
|
|
301
|
+
alignItems: "flex-start",
|
|
302
|
+
},
|
|
303
|
+
rowCenter: {
|
|
304
|
+
flexDirection: "row",
|
|
305
|
+
justifyContent: "center",
|
|
306
|
+
alignItems: "center",
|
|
307
|
+
},
|
|
308
|
+
rowCenterGap: {
|
|
309
|
+
flexDirection: "row",
|
|
310
|
+
justifyContent: "center",
|
|
311
|
+
alignItems: "center",
|
|
312
|
+
gap: Spacing.detailGap,
|
|
313
|
+
},
|
|
314
|
+
column: {
|
|
315
|
+
flexDirection: "column",
|
|
316
|
+
},
|
|
317
|
+
columnCenter: {
|
|
318
|
+
flexDirection: "column",
|
|
319
|
+
alignItems: "center",
|
|
320
|
+
},
|
|
321
|
+
flex1: {
|
|
322
|
+
flex: 1,
|
|
323
|
+
},
|
|
324
|
+
textCenter: {
|
|
325
|
+
textAlign: "center",
|
|
326
|
+
},
|
|
327
|
+
avatar: {
|
|
328
|
+
width: Spacing.avatarSize,
|
|
329
|
+
height: Spacing.avatarSize,
|
|
330
|
+
borderRadius: Spacing.avatarSize / 2,
|
|
331
|
+
borderWidth: 1,
|
|
332
|
+
justifyContent: "center",
|
|
333
|
+
alignItems: "center",
|
|
334
|
+
},
|
|
335
|
+
iconButton: {
|
|
336
|
+
width: Spacing.iconButtonSize,
|
|
337
|
+
height: Spacing.iconButtonSize,
|
|
338
|
+
borderRadius: Spacing.iconButtonSize / 2,
|
|
339
|
+
justifyContent: "center",
|
|
340
|
+
alignItems: "center",
|
|
341
|
+
},
|
|
342
|
+
button: {
|
|
343
|
+
flexDirection: "row",
|
|
344
|
+
alignItems: "center",
|
|
345
|
+
justifyContent: "center",
|
|
346
|
+
gap: Spacing.sm,
|
|
347
|
+
paddingHorizontal: Spacing.contentPaddingHorizontal,
|
|
348
|
+
paddingVertical: Spacing.md,
|
|
349
|
+
borderWidth: 1,
|
|
350
|
+
borderRadius: BorderRadius.full,
|
|
351
|
+
},
|
|
352
|
+
buttonSmall: {
|
|
353
|
+
flexDirection: "row",
|
|
354
|
+
alignItems: "center",
|
|
355
|
+
justifyContent: "center",
|
|
356
|
+
gap: Spacing.sm,
|
|
357
|
+
paddingHorizontal: Spacing.lg,
|
|
358
|
+
paddingVertical: Spacing.sm,
|
|
359
|
+
borderRadius: BorderRadius.sm,
|
|
360
|
+
},
|
|
361
|
+
card: {
|
|
362
|
+
borderRadius: BorderRadius.xl,
|
|
363
|
+
padding: Spacing.sm,
|
|
364
|
+
},
|
|
365
|
+
chartContainer: {
|
|
366
|
+
height: Spacing.chartHeight,
|
|
367
|
+
borderRadius: BorderRadius.xl,
|
|
368
|
+
padding: Spacing.sm,
|
|
369
|
+
borderWidth: 1,
|
|
370
|
+
position: "relative",
|
|
371
|
+
},
|
|
372
|
+
chartGrid: {
|
|
373
|
+
position: "absolute",
|
|
374
|
+
top: 0,
|
|
375
|
+
left: 0,
|
|
376
|
+
right: 0,
|
|
377
|
+
bottom: 0,
|
|
378
|
+
padding: Spacing.lg,
|
|
379
|
+
justifyContent: "space-between",
|
|
380
|
+
},
|
|
381
|
+
chartEmpty: {
|
|
382
|
+
flex: 1,
|
|
383
|
+
justifyContent: "center",
|
|
384
|
+
alignItems: "center",
|
|
385
|
+
},
|
|
386
|
+
progressBar: {
|
|
387
|
+
width: "100%",
|
|
388
|
+
height: 2,
|
|
389
|
+
borderRadius: 1,
|
|
390
|
+
overflow: "hidden",
|
|
391
|
+
marginTop: Spacing.sm,
|
|
392
|
+
},
|
|
393
|
+
progressFill: {
|
|
394
|
+
height: "100%",
|
|
395
|
+
borderRadius: 1,
|
|
396
|
+
},
|
|
397
|
+
divider: {
|
|
398
|
+
height: 1,
|
|
399
|
+
width: "100%",
|
|
400
|
+
},
|
|
401
|
+
dividerVertical: {
|
|
402
|
+
width: 1,
|
|
403
|
+
height: "100%",
|
|
404
|
+
},
|
|
405
|
+
dot: {
|
|
406
|
+
width: 4,
|
|
407
|
+
height: 4,
|
|
408
|
+
borderRadius: 2,
|
|
409
|
+
},
|
|
410
|
+
absoluteFill: {
|
|
411
|
+
position: "absolute",
|
|
412
|
+
top: 0,
|
|
413
|
+
left: 0,
|
|
414
|
+
right: 0,
|
|
415
|
+
bottom: 0,
|
|
416
|
+
},
|
|
417
|
+
tooltip: {
|
|
418
|
+
paddingHorizontal: Spacing.sm,
|
|
419
|
+
paddingVertical: Spacing.xs,
|
|
420
|
+
borderRadius: BorderRadius.xs,
|
|
421
|
+
},
|
|
422
|
+
emptyState: {
|
|
423
|
+
alignItems: "center",
|
|
424
|
+
paddingVertical: Spacing["2xl"],
|
|
425
|
+
},
|
|
426
|
+
section: {
|
|
427
|
+
marginBottom: Spacing.sectionGap,
|
|
428
|
+
},
|
|
429
|
+
sectionLarge: {
|
|
430
|
+
marginBottom: Spacing.sectionGapLarge,
|
|
431
|
+
},
|
|
432
|
+
sectionHeader: {
|
|
433
|
+
flexDirection: "row",
|
|
434
|
+
justifyContent: "space-between",
|
|
435
|
+
alignItems: "flex-end",
|
|
436
|
+
marginBottom: Spacing["2xl"],
|
|
437
|
+
},
|
|
438
|
+
gridLine: {
|
|
439
|
+
width: "100%",
|
|
440
|
+
height: 1,
|
|
441
|
+
borderTopWidth: 1,
|
|
442
|
+
borderStyle: "dashed",
|
|
443
|
+
},
|
|
444
|
+
statsGrid: {
|
|
445
|
+
flexDirection: "row",
|
|
446
|
+
},
|
|
447
|
+
statsColumn: {
|
|
448
|
+
flex: 1,
|
|
449
|
+
},
|
|
450
|
+
statsColumnLeft: {
|
|
451
|
+
paddingRight: Spacing.lg,
|
|
452
|
+
},
|
|
453
|
+
statsColumnRight: {
|
|
454
|
+
paddingLeft: Spacing.contentPaddingHorizontal,
|
|
455
|
+
borderLeftWidth: 1,
|
|
456
|
+
},
|
|
457
|
+
statsHeader: {
|
|
458
|
+
flexDirection: "row",
|
|
459
|
+
justifyContent: "space-between",
|
|
460
|
+
alignItems: "flex-start",
|
|
461
|
+
marginBottom: Spacing.lg,
|
|
462
|
+
},
|
|
463
|
+
detailItem: {
|
|
464
|
+
alignItems: "center",
|
|
465
|
+
},
|
|
466
|
+
header: {
|
|
467
|
+
flexDirection: "row",
|
|
468
|
+
justifyContent: "space-between",
|
|
469
|
+
alignItems: "flex-end",
|
|
470
|
+
paddingBottom: Spacing.lg,
|
|
471
|
+
},
|
|
472
|
+
loadingContainer: {
|
|
473
|
+
flex: 1,
|
|
474
|
+
justifyContent: "center",
|
|
475
|
+
alignItems: "center",
|
|
476
|
+
},
|
|
477
|
+
glucoseSection: {
|
|
478
|
+
marginTop: Spacing["2xl"],
|
|
479
|
+
marginBottom: Spacing.sectionGap,
|
|
480
|
+
alignItems: "center",
|
|
481
|
+
},
|
|
482
|
+
glucoseHeader: {
|
|
483
|
+
flexDirection: "row",
|
|
484
|
+
alignItems: "center",
|
|
485
|
+
gap: Spacing.sm,
|
|
486
|
+
marginBottom: Spacing.sm,
|
|
487
|
+
},
|
|
488
|
+
glucoseUnit: {
|
|
489
|
+
flexDirection: "row",
|
|
490
|
+
alignItems: "center",
|
|
491
|
+
gap: Spacing.sm,
|
|
492
|
+
marginTop: Spacing.sm,
|
|
493
|
+
},
|
|
494
|
+
glucoseDetails: {
|
|
495
|
+
flexDirection: "row",
|
|
496
|
+
justifyContent: "center",
|
|
497
|
+
gap: Spacing.detailGap,
|
|
498
|
+
marginTop: Spacing["2xl"],
|
|
117
499
|
},
|
|
118
500
|
});
|
|
501
|
+
|
|
502
|
+
export const createThemedStyles = (theme: Theme) => {
|
|
503
|
+
return StyleSheet.create({
|
|
504
|
+
container: {
|
|
505
|
+
...CommonStyles.container,
|
|
506
|
+
backgroundColor: theme.backgroundRoot,
|
|
507
|
+
},
|
|
508
|
+
scrollContent: {
|
|
509
|
+
...CommonStyles.scrollContent,
|
|
510
|
+
},
|
|
511
|
+
text: {
|
|
512
|
+
color: theme.text,
|
|
513
|
+
},
|
|
514
|
+
textPrimary: {
|
|
515
|
+
color: theme.textPrimary,
|
|
516
|
+
},
|
|
517
|
+
textSecondary: {
|
|
518
|
+
color: theme.textSecondary,
|
|
519
|
+
},
|
|
520
|
+
textMuted: {
|
|
521
|
+
color: theme.textMuted,
|
|
522
|
+
},
|
|
523
|
+
textDisabled: {
|
|
524
|
+
color: theme.textDisabled,
|
|
525
|
+
},
|
|
526
|
+
textSuccess: {
|
|
527
|
+
color: theme.success,
|
|
528
|
+
},
|
|
529
|
+
textError: {
|
|
530
|
+
color: theme.error,
|
|
531
|
+
},
|
|
532
|
+
textInfo: {
|
|
533
|
+
color: theme.info,
|
|
534
|
+
},
|
|
535
|
+
textButton: {
|
|
536
|
+
color: theme.buttonText,
|
|
537
|
+
},
|
|
538
|
+
avatar: {
|
|
539
|
+
...CommonStyles.avatar,
|
|
540
|
+
borderColor: theme.border,
|
|
541
|
+
backgroundColor: theme.backgroundRoot,
|
|
542
|
+
},
|
|
543
|
+
avatarText: {
|
|
544
|
+
...Typography.small,
|
|
545
|
+
fontFamily: "serif",
|
|
546
|
+
color: theme.textPrimary,
|
|
547
|
+
},
|
|
548
|
+
iconButton: {
|
|
549
|
+
...CommonStyles.iconButton,
|
|
550
|
+
backgroundColor: theme.backgroundSecondary,
|
|
551
|
+
},
|
|
552
|
+
iconButtonText: {
|
|
553
|
+
...Typography.caption,
|
|
554
|
+
color: theme.textMuted,
|
|
555
|
+
},
|
|
556
|
+
button: {
|
|
557
|
+
...CommonStyles.button,
|
|
558
|
+
borderColor: theme.border,
|
|
559
|
+
backgroundColor: theme.backgroundRoot,
|
|
560
|
+
...Shadow.minimal,
|
|
561
|
+
},
|
|
562
|
+
buttonText: {
|
|
563
|
+
...Typography.smallMedium,
|
|
564
|
+
letterSpacing: 0.5,
|
|
565
|
+
color: theme.textPrimary,
|
|
566
|
+
},
|
|
567
|
+
buttonOutline: {
|
|
568
|
+
...CommonStyles.buttonSmall,
|
|
569
|
+
backgroundColor: theme.backgroundSecondary,
|
|
570
|
+
},
|
|
571
|
+
buttonOutlineText: {
|
|
572
|
+
...Typography.small,
|
|
573
|
+
color: theme.textSecondary,
|
|
574
|
+
},
|
|
575
|
+
buttonSmall: {
|
|
576
|
+
...CommonStyles.buttonSmall,
|
|
577
|
+
backgroundColor: theme.backgroundSecondary,
|
|
578
|
+
},
|
|
579
|
+
buttonSmallText: {
|
|
580
|
+
...Typography.small,
|
|
581
|
+
color: theme.textSecondary,
|
|
582
|
+
},
|
|
583
|
+
card: {
|
|
584
|
+
...CommonStyles.card,
|
|
585
|
+
backgroundColor: theme.backgroundRoot,
|
|
586
|
+
},
|
|
587
|
+
chartContainer: {
|
|
588
|
+
...CommonStyles.chartContainer,
|
|
589
|
+
backgroundColor: theme.chartBackground,
|
|
590
|
+
borderColor: theme.backgroundSecondary,
|
|
591
|
+
},
|
|
592
|
+
chartGrid: {
|
|
593
|
+
...CommonStyles.chartGrid,
|
|
594
|
+
},
|
|
595
|
+
chartEmpty: {
|
|
596
|
+
...CommonStyles.chartEmpty,
|
|
597
|
+
},
|
|
598
|
+
chartEmptyText: {
|
|
599
|
+
...Typography.small,
|
|
600
|
+
color: theme.textMuted,
|
|
601
|
+
},
|
|
602
|
+
chartTooltip: {
|
|
603
|
+
position: "absolute",
|
|
604
|
+
right: 0,
|
|
605
|
+
top: "55%",
|
|
606
|
+
backgroundColor: theme.accent,
|
|
607
|
+
paddingHorizontal: Spacing.sm,
|
|
608
|
+
paddingVertical: Spacing.xs,
|
|
609
|
+
borderRadius: BorderRadius.xs,
|
|
610
|
+
...Shadow.lg,
|
|
611
|
+
},
|
|
612
|
+
chartTooltipText: {
|
|
613
|
+
...Typography.tiny,
|
|
614
|
+
color: theme.backgroundRoot,
|
|
615
|
+
},
|
|
616
|
+
progressBar: {
|
|
617
|
+
...CommonStyles.progressBar,
|
|
618
|
+
backgroundColor: theme.backgroundSecondary,
|
|
619
|
+
},
|
|
620
|
+
progressFill: {
|
|
621
|
+
...CommonStyles.progressFill,
|
|
622
|
+
backgroundColor: theme.accent,
|
|
623
|
+
},
|
|
624
|
+
progressFillMuted: {
|
|
625
|
+
...CommonStyles.progressFill,
|
|
626
|
+
backgroundColor: theme.textMuted,
|
|
627
|
+
},
|
|
628
|
+
divider: {
|
|
629
|
+
...CommonStyles.divider,
|
|
630
|
+
backgroundColor: theme.divider,
|
|
631
|
+
},
|
|
632
|
+
dividerVertical: {
|
|
633
|
+
...CommonStyles.dividerVertical,
|
|
634
|
+
backgroundColor: theme.borderLight,
|
|
635
|
+
},
|
|
636
|
+
dot: {
|
|
637
|
+
...CommonStyles.dot,
|
|
638
|
+
backgroundColor: theme.textDisabled,
|
|
639
|
+
},
|
|
640
|
+
tooltip: {
|
|
641
|
+
...CommonStyles.tooltip,
|
|
642
|
+
backgroundColor: theme.accent,
|
|
643
|
+
...Shadow.lg,
|
|
644
|
+
},
|
|
645
|
+
tooltipText: {
|
|
646
|
+
color: theme.backgroundRoot,
|
|
647
|
+
},
|
|
648
|
+
gridLine: {
|
|
649
|
+
...CommonStyles.gridLine,
|
|
650
|
+
borderTopColor: theme.border,
|
|
651
|
+
},
|
|
652
|
+
emptyState: {
|
|
653
|
+
...CommonStyles.emptyState,
|
|
654
|
+
},
|
|
655
|
+
emptyText: {
|
|
656
|
+
...Typography.small,
|
|
657
|
+
color: theme.textMuted,
|
|
658
|
+
marginBottom: Spacing.lg,
|
|
659
|
+
},
|
|
660
|
+
section: {
|
|
661
|
+
...CommonStyles.section,
|
|
662
|
+
},
|
|
663
|
+
sectionLarge: {
|
|
664
|
+
...CommonStyles.sectionLarge,
|
|
665
|
+
},
|
|
666
|
+
sectionHeader: {
|
|
667
|
+
...CommonStyles.sectionHeader,
|
|
668
|
+
},
|
|
669
|
+
statsGrid: {
|
|
670
|
+
...CommonStyles.statsGrid,
|
|
671
|
+
marginBottom: Spacing.sectionGap,
|
|
672
|
+
},
|
|
673
|
+
statsColumn: {
|
|
674
|
+
...CommonStyles.statsColumn,
|
|
675
|
+
},
|
|
676
|
+
statsColumnLeft: {
|
|
677
|
+
...CommonStyles.statsColumnLeft,
|
|
678
|
+
},
|
|
679
|
+
statsColumnRight: {
|
|
680
|
+
...CommonStyles.statsColumnRight,
|
|
681
|
+
borderLeftColor: theme.borderLight,
|
|
682
|
+
},
|
|
683
|
+
statsHeader: {
|
|
684
|
+
...CommonStyles.statsHeader,
|
|
685
|
+
},
|
|
686
|
+
statsTitle: {
|
|
687
|
+
...Typography.title,
|
|
688
|
+
color: theme.textPrimary,
|
|
689
|
+
},
|
|
690
|
+
statsValue: {
|
|
691
|
+
...Typography.stat,
|
|
692
|
+
color: theme.textPrimary,
|
|
693
|
+
},
|
|
694
|
+
statsUnit: {
|
|
695
|
+
...Typography.caption,
|
|
696
|
+
color: theme.textMuted,
|
|
697
|
+
},
|
|
698
|
+
statsSubtext: {
|
|
699
|
+
...Typography.caption,
|
|
700
|
+
color: theme.textMuted,
|
|
701
|
+
marginTop: Spacing.sm,
|
|
702
|
+
},
|
|
703
|
+
detailItem: {
|
|
704
|
+
...CommonStyles.detailItem,
|
|
705
|
+
},
|
|
706
|
+
detailLabel: {
|
|
707
|
+
...Typography.caption,
|
|
708
|
+
color: theme.textMuted,
|
|
709
|
+
marginBottom: Spacing.xs,
|
|
710
|
+
},
|
|
711
|
+
detailValue: {
|
|
712
|
+
...Typography.bodyMedium,
|
|
713
|
+
color: theme.textPrimary,
|
|
714
|
+
},
|
|
715
|
+
header: {
|
|
716
|
+
...CommonStyles.header,
|
|
717
|
+
},
|
|
718
|
+
dateText: {
|
|
719
|
+
...Typography.captionMedium,
|
|
720
|
+
color: theme.textMuted,
|
|
721
|
+
letterSpacing: 1,
|
|
722
|
+
textTransform: "uppercase",
|
|
723
|
+
marginBottom: Spacing.xs,
|
|
724
|
+
},
|
|
725
|
+
greetingText: {
|
|
726
|
+
...Typography.h3,
|
|
727
|
+
color: theme.textPrimary,
|
|
728
|
+
},
|
|
729
|
+
greetingName: {
|
|
730
|
+
fontWeight: "700",
|
|
731
|
+
},
|
|
732
|
+
label: {
|
|
733
|
+
...Typography.label,
|
|
734
|
+
color: theme.textMuted,
|
|
735
|
+
},
|
|
736
|
+
labelSmall: {
|
|
737
|
+
...Typography.labelSmall,
|
|
738
|
+
color: theme.textMuted,
|
|
739
|
+
},
|
|
740
|
+
labelTitle: {
|
|
741
|
+
...Typography.labelTitle,
|
|
742
|
+
color: theme.textPrimary,
|
|
743
|
+
},
|
|
744
|
+
loadingContainer: {
|
|
745
|
+
...CommonStyles.loadingContainer,
|
|
746
|
+
backgroundColor: theme.backgroundRoot,
|
|
747
|
+
},
|
|
748
|
+
statusNormal: {
|
|
749
|
+
...Typography.smallMedium,
|
|
750
|
+
color: theme.success,
|
|
751
|
+
},
|
|
752
|
+
statusHigh: {
|
|
753
|
+
...Typography.smallMedium,
|
|
754
|
+
color: theme.error,
|
|
755
|
+
},
|
|
756
|
+
statusLow: {
|
|
757
|
+
...Typography.smallMedium,
|
|
758
|
+
color: theme.info,
|
|
759
|
+
},
|
|
760
|
+
unitText: {
|
|
761
|
+
...Typography.smallMedium,
|
|
762
|
+
color: theme.textMuted,
|
|
763
|
+
},
|
|
764
|
+
glucoseSection: {
|
|
765
|
+
...CommonStyles.glucoseSection,
|
|
766
|
+
},
|
|
767
|
+
glucoseHeader: {
|
|
768
|
+
...CommonStyles.glucoseHeader,
|
|
769
|
+
},
|
|
770
|
+
glucoseLabel: {
|
|
771
|
+
...Typography.label,
|
|
772
|
+
color: theme.textMuted,
|
|
773
|
+
},
|
|
774
|
+
glucoseValue: {
|
|
775
|
+
...Typography.displayLarge,
|
|
776
|
+
color: theme.textPrimary,
|
|
777
|
+
},
|
|
778
|
+
glucoseEmptyValue: {
|
|
779
|
+
...Typography.displayMedium,
|
|
780
|
+
color: theme.textMuted,
|
|
781
|
+
},
|
|
782
|
+
glucoseUnit: {
|
|
783
|
+
...CommonStyles.glucoseUnit,
|
|
784
|
+
},
|
|
785
|
+
glucoseDetails: {
|
|
786
|
+
...CommonStyles.glucoseDetails,
|
|
787
|
+
},
|
|
788
|
+
trendLink: {
|
|
789
|
+
flexDirection: "row",
|
|
790
|
+
alignItems: "center",
|
|
791
|
+
gap: Spacing.xs,
|
|
792
|
+
},
|
|
793
|
+
trendLinkText: {
|
|
794
|
+
...Typography.caption,
|
|
795
|
+
color: theme.textMuted,
|
|
796
|
+
},
|
|
797
|
+
refreshButton: {
|
|
798
|
+
...CommonStyles.buttonSmall,
|
|
799
|
+
backgroundColor: theme.backgroundSecondary,
|
|
800
|
+
},
|
|
801
|
+
refreshButtonText: {
|
|
802
|
+
...Typography.small,
|
|
803
|
+
color: theme.textSecondary,
|
|
804
|
+
},
|
|
805
|
+
input: {
|
|
806
|
+
height: Spacing.inputHeight,
|
|
807
|
+
backgroundColor: theme.backgroundRoot,
|
|
808
|
+
borderRadius: BorderRadius.sm,
|
|
809
|
+
borderWidth: 1,
|
|
810
|
+
borderColor: theme.border,
|
|
811
|
+
paddingHorizontal: Spacing.lg,
|
|
812
|
+
...Typography.body,
|
|
813
|
+
color: theme.textPrimary,
|
|
814
|
+
},
|
|
815
|
+
inputPlaceholder: {
|
|
816
|
+
color: theme.placeholder,
|
|
817
|
+
},
|
|
818
|
+
link: {
|
|
819
|
+
...Typography.link,
|
|
820
|
+
color: theme.link,
|
|
821
|
+
},
|
|
822
|
+
navItem: {
|
|
823
|
+
flex: 1,
|
|
824
|
+
alignItems: "center",
|
|
825
|
+
justifyContent: "center",
|
|
826
|
+
paddingVertical: Spacing.sm,
|
|
827
|
+
},
|
|
828
|
+
navIcon: {
|
|
829
|
+
fontSize: 20,
|
|
830
|
+
marginBottom: Spacing.xs,
|
|
831
|
+
},
|
|
832
|
+
navLabel: {
|
|
833
|
+
...Typography.navLabel,
|
|
834
|
+
},
|
|
835
|
+
navActive: {
|
|
836
|
+
color: theme.textPrimary,
|
|
837
|
+
},
|
|
838
|
+
navInactive: {
|
|
839
|
+
color: theme.textMuted,
|
|
840
|
+
},
|
|
841
|
+
navIndicator: {
|
|
842
|
+
width: 4,
|
|
843
|
+
height: 4,
|
|
844
|
+
borderRadius: 2,
|
|
845
|
+
backgroundColor: theme.textPrimary,
|
|
846
|
+
position: "absolute",
|
|
847
|
+
bottom: -8,
|
|
848
|
+
},
|
|
849
|
+
});
|
|
850
|
+
};
|