@xaui/core 0.1.6 → 0.1.7

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.
@@ -322,43 +322,36 @@ var colors = {
322
322
  var themeColors = {
323
323
  primary: {
324
324
  main: colors.purple[800],
325
- accent: colors.purple[950],
326
325
  foreground: colors.white,
327
326
  background: colors.purple[200]
328
327
  },
329
328
  secondary: {
330
329
  main: colors.zinc[500],
331
- accent: colors.neutral[800],
332
330
  foreground: colors.white,
333
331
  background: colors.purple[200]
334
332
  },
335
333
  tertiary: {
336
334
  main: colors.stone[500],
337
- accent: colors.orange[950],
338
335
  foreground: colors.white,
339
336
  background: colors.red[100]
340
337
  },
341
338
  danger: {
342
339
  main: colors.red[700],
343
- accent: colors.red[950],
344
340
  foreground: colors.white,
345
341
  background: colors.rose[200]
346
342
  },
347
343
  warning: {
348
344
  main: colors.amber[600],
349
- accent: colors.amber[900],
350
345
  foreground: colors.gray[900],
351
346
  background: colors.amber[100]
352
347
  },
353
348
  success: {
354
349
  main: colors.green[600],
355
- accent: colors.green[900],
356
350
  foreground: colors.white,
357
351
  background: colors.green[100]
358
352
  },
359
353
  default: {
360
354
  main: colors.white,
361
- accent: colors.zinc[700],
362
355
  foreground: colors.zinc[900],
363
356
  background: colors.zinc[200]
364
357
  },
@@ -368,43 +361,36 @@ var themeColors = {
368
361
  var darkThemeColors = {
369
362
  primary: {
370
363
  main: colors.purple[300],
371
- accent: colors.purple[200],
372
364
  foreground: colors.purple[950],
373
365
  background: colors.purple[900]
374
366
  },
375
367
  secondary: {
376
368
  main: colors.zinc[300],
377
- accent: colors.purple[200],
378
369
  foreground: colors.zinc[700],
379
370
  background: colors.zinc[600]
380
371
  },
381
372
  tertiary: {
382
373
  main: colors.red[200],
383
- accent: colors.red[100],
384
374
  foreground: colors.pink[950],
385
375
  background: colors.stone[600]
386
376
  },
387
377
  danger: {
388
378
  main: colors.red[300],
389
- accent: colors.red[300],
390
379
  foreground: colors.rose[950],
391
380
  background: colors.red[800]
392
381
  },
393
382
  warning: {
394
383
  main: colors.amber[400],
395
- accent: colors.amber[100],
396
384
  foreground: colors.gray[50],
397
385
  background: colors.amber[900]
398
386
  },
399
387
  success: {
400
388
  main: colors.green[400],
401
- accent: colors.green[200],
402
389
  foreground: colors.gray[50],
403
390
  background: colors.green[900]
404
391
  },
405
392
  default: {
406
393
  main: colors.zinc[900],
407
- accent: colors.stone[300],
408
394
  foreground: colors.stone[200],
409
395
  background: colors.zinc[700]
410
396
  },
@@ -496,11 +482,15 @@ var baseTheme = {
496
482
  }
497
483
  };
498
484
  var theme = {
485
+ palette: colors,
499
486
  colors: themeColors,
487
+ mode: "light",
500
488
  ...baseTheme
501
489
  };
502
490
  var darkTheme = {
491
+ palette: colors,
503
492
  colors: darkThemeColors,
493
+ mode: "dark",
504
494
  ...baseTheme
505
495
  };
506
496
  var defaultTheme = theme;
@@ -1,6 +1,7 @@
1
+ import { colors } from '../tokens/index.cjs';
2
+
1
3
  type ColorScheme = {
2
4
  main: string;
3
- accent: string;
4
5
  foreground: string;
5
6
  background: string;
6
7
  };
@@ -109,6 +110,8 @@ interface ThemeShadows {
109
110
  };
110
111
  }
111
112
  interface XUITheme {
113
+ mode: 'light' | 'dark';
114
+ palette: typeof colors;
112
115
  colors: ThemeColors;
113
116
  spacing: ThemeSpacing;
114
117
  borderRadius: ThemeBorderRadius;
@@ -1,6 +1,7 @@
1
+ import { colors } from '../tokens/index.js';
2
+
1
3
  type ColorScheme = {
2
4
  main: string;
3
- accent: string;
4
5
  foreground: string;
5
6
  background: string;
6
7
  };
@@ -109,6 +110,8 @@ interface ThemeShadows {
109
110
  };
110
111
  }
111
112
  interface XUITheme {
113
+ mode: 'light' | 'dark';
114
+ palette: typeof colors;
112
115
  colors: ThemeColors;
113
116
  spacing: ThemeSpacing;
114
117
  borderRadius: ThemeBorderRadius;
@@ -6,43 +6,36 @@ import {
6
6
  var themeColors = {
7
7
  primary: {
8
8
  main: colors.purple[800],
9
- accent: colors.purple[950],
10
9
  foreground: colors.white,
11
10
  background: colors.purple[200]
12
11
  },
13
12
  secondary: {
14
13
  main: colors.zinc[500],
15
- accent: colors.neutral[800],
16
14
  foreground: colors.white,
17
15
  background: colors.purple[200]
18
16
  },
19
17
  tertiary: {
20
18
  main: colors.stone[500],
21
- accent: colors.orange[950],
22
19
  foreground: colors.white,
23
20
  background: colors.red[100]
24
21
  },
25
22
  danger: {
26
23
  main: colors.red[700],
27
- accent: colors.red[950],
28
24
  foreground: colors.white,
29
25
  background: colors.rose[200]
30
26
  },
31
27
  warning: {
32
28
  main: colors.amber[600],
33
- accent: colors.amber[900],
34
29
  foreground: colors.gray[900],
35
30
  background: colors.amber[100]
36
31
  },
37
32
  success: {
38
33
  main: colors.green[600],
39
- accent: colors.green[900],
40
34
  foreground: colors.white,
41
35
  background: colors.green[100]
42
36
  },
43
37
  default: {
44
38
  main: colors.white,
45
- accent: colors.zinc[700],
46
39
  foreground: colors.zinc[900],
47
40
  background: colors.zinc[200]
48
41
  },
@@ -52,43 +45,36 @@ var themeColors = {
52
45
  var darkThemeColors = {
53
46
  primary: {
54
47
  main: colors.purple[300],
55
- accent: colors.purple[200],
56
48
  foreground: colors.purple[950],
57
49
  background: colors.purple[900]
58
50
  },
59
51
  secondary: {
60
52
  main: colors.zinc[300],
61
- accent: colors.purple[200],
62
53
  foreground: colors.zinc[700],
63
54
  background: colors.zinc[600]
64
55
  },
65
56
  tertiary: {
66
57
  main: colors.red[200],
67
- accent: colors.red[100],
68
58
  foreground: colors.pink[950],
69
59
  background: colors.stone[600]
70
60
  },
71
61
  danger: {
72
62
  main: colors.red[300],
73
- accent: colors.red[300],
74
63
  foreground: colors.rose[950],
75
64
  background: colors.red[800]
76
65
  },
77
66
  warning: {
78
67
  main: colors.amber[400],
79
- accent: colors.amber[100],
80
68
  foreground: colors.gray[50],
81
69
  background: colors.amber[900]
82
70
  },
83
71
  success: {
84
72
  main: colors.green[400],
85
- accent: colors.green[200],
86
73
  foreground: colors.gray[50],
87
74
  background: colors.green[900]
88
75
  },
89
76
  default: {
90
77
  main: colors.zinc[900],
91
- accent: colors.stone[300],
92
78
  foreground: colors.stone[200],
93
79
  background: colors.zinc[700]
94
80
  },
@@ -180,11 +166,15 @@ var baseTheme = {
180
166
  }
181
167
  };
182
168
  var theme = {
169
+ palette: colors,
183
170
  colors: themeColors,
171
+ mode: "light",
184
172
  ...baseTheme
185
173
  };
186
174
  var darkTheme = {
175
+ palette: colors,
187
176
  colors: darkThemeColors,
177
+ mode: "dark",
188
178
  ...baseTheme
189
179
  };
190
180
  var defaultTheme = theme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaui/core",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "A modern React Native UI library with Flutter-inspired API, smooth animations, and comprehensive design system",
5
5
  "keywords": [
6
6
  "react-native",