@stylhero/native 0.0.0-stage → 0.1.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/LICENSE +21 -0
  3. package/README.md +85 -2
  4. package/dist/components/Badge.d.ts +11 -0
  5. package/dist/components/Badge.js +31 -0
  6. package/dist/components/Badge.js.map +1 -0
  7. package/dist/components/Button.d.ts +24 -0
  8. package/dist/components/Button.js +59 -0
  9. package/dist/components/Button.js.map +1 -0
  10. package/dist/components/Card.d.ts +17 -0
  11. package/dist/components/Card.js +22 -0
  12. package/dist/components/Card.js.map +1 -0
  13. package/dist/components/IconButton.d.ts +13 -0
  14. package/dist/components/IconButton.js +28 -0
  15. package/dist/components/IconButton.js.map +1 -0
  16. package/dist/components/ListItem.d.ts +24 -0
  17. package/dist/components/ListItem.js +34 -0
  18. package/dist/components/ListItem.js.map +1 -0
  19. package/dist/components/Stack.d.ts +14 -0
  20. package/dist/components/Stack.js +19 -0
  21. package/dist/components/Stack.js.map +1 -0
  22. package/dist/components/Text.d.ts +15 -0
  23. package/dist/components/Text.js +28 -0
  24. package/dist/components/Text.js.map +1 -0
  25. package/dist/components/TextField.d.ts +24 -0
  26. package/dist/components/TextField.js +40 -0
  27. package/dist/components/TextField.js.map +1 -0
  28. package/dist/index.d.ts +10 -0
  29. package/dist/index.js +11 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/theme/ThemeProvider.d.ts +33 -0
  32. package/dist/theme/ThemeProvider.js +45 -0
  33. package/dist/theme/ThemeProvider.js.map +1 -0
  34. package/dist/theme/tokens.d.ts +152 -0
  35. package/dist/theme/tokens.js +150 -0
  36. package/dist/theme/tokens.js.map +1 -0
  37. package/package.json +63 -4
  38. package/src/components/Badge.tsx +54 -0
  39. package/src/components/Button.tsx +128 -0
  40. package/src/components/Card.tsx +72 -0
  41. package/src/components/IconButton.tsx +59 -0
  42. package/src/components/ListItem.tsx +104 -0
  43. package/src/components/Stack.tsx +35 -0
  44. package/src/components/Text.tsx +46 -0
  45. package/src/components/TextField.tsx +123 -0
  46. package/src/index.ts +18 -0
  47. package/src/theme/ThemeProvider.tsx +87 -0
  48. package/src/theme/tokens.ts +163 -0
@@ -0,0 +1,163 @@
1
+ // GENERATED by scripts/build-tokens.mjs from tokens.json. Do not edit by hand.
2
+ // Run `npm run tokens` after changing tokens.json.
3
+
4
+ export const colorSchemes = [
5
+ "light",
6
+ "dark"
7
+ ] as const;
8
+ export type ColorScheme = (typeof colorSchemes)[number];
9
+
10
+ export const colors = {
11
+ "light": {
12
+ "surface": "#f7f9fc",
13
+ "surfaceRaised": "#ffffff",
14
+ "surfaceSunken": "#edf2f8",
15
+ "ink": "#0b1b33",
16
+ "inkMuted": "#4b5b73",
17
+ "line": "#d6dfeb",
18
+ "lineStrong": "#76869e",
19
+ "primary": "#173a7a",
20
+ "primaryHover": "#112c5e",
21
+ "onPrimary": "#ffffff",
22
+ "primarySoft": "#e3ebf8",
23
+ "sky": "#3ba3e6",
24
+ "skySoft": "#e0f1fc",
25
+ "accent": "#f5d23d",
26
+ "onAccent": "#0b1b33",
27
+ "accentSoft": "#fdf6d3",
28
+ "accentInk": "#7a5c00",
29
+ "success": "#1f7a3d",
30
+ "successSoft": "#dff2e5",
31
+ "danger": "#b3261e",
32
+ "dangerSoft": "#fbe3e1",
33
+ "chart1": "#2a78d6",
34
+ "chart2": "#eb6834",
35
+ "chart3": "#1baf7a",
36
+ "chart4": "#eda100",
37
+ "chart5": "#e87ba4",
38
+ "chart6": "#008300",
39
+ "chart7": "#6250d6",
40
+ "chart8": "#e34948"
41
+ },
42
+ "dark": {
43
+ "surface": "#0a1220",
44
+ "surfaceRaised": "#111b2e",
45
+ "surfaceSunken": "#070d18",
46
+ "ink": "#e8eef7",
47
+ "inkMuted": "#9fb0c8",
48
+ "line": "#24324a",
49
+ "lineStrong": "#5b6d8f",
50
+ "primary": "#7fb2ff",
51
+ "primaryHover": "#a3c8ff",
52
+ "onPrimary": "#0a1a36",
53
+ "primarySoft": "#16264a",
54
+ "sky": "#5cb8f0",
55
+ "skySoft": "#0f2a3d",
56
+ "accent": "#f7dc5c",
57
+ "onAccent": "#1a1600",
58
+ "accentSoft": "#332b0a",
59
+ "accentInk": "#f7dc5c",
60
+ "success": "#5bc67f",
61
+ "successSoft": "#13301d",
62
+ "danger": "#f2867e",
63
+ "dangerSoft": "#3a1715",
64
+ "chart1": "#3987e5",
65
+ "chart2": "#d95926",
66
+ "chart3": "#199e70",
67
+ "chart4": "#c98500",
68
+ "chart5": "#d55181",
69
+ "chart6": "#008300",
70
+ "chart7": "#9085e9",
71
+ "chart8": "#e66767"
72
+ }
73
+ } as const;
74
+ export type ColorToken = keyof (typeof colors)["light"];
75
+ export type Colors = Record<ColorToken, string>;
76
+
77
+ export const spacing = {
78
+ 1: 4,
79
+ 2: 8,
80
+ 3: 12,
81
+ 4: 16,
82
+ 6: 24,
83
+ 8: 32,
84
+ 12: 48
85
+ } as const;
86
+ export type SpacingToken = keyof typeof spacing;
87
+
88
+ export const radius = {
89
+ "sm": 6,
90
+ "md": 10,
91
+ "lg": 16,
92
+ "full": 9999
93
+ } as const;
94
+ export type RadiusToken = keyof typeof radius;
95
+
96
+ export const typography = {
97
+ "display": {
98
+ "family": "display",
99
+ "fontSize": 48,
100
+ "lineHeight": 52,
101
+ "fontWeight": "800",
102
+ "letterSpacing": -1.44
103
+ },
104
+ "h1": {
105
+ "family": "display",
106
+ "fontSize": 32,
107
+ "lineHeight": 38,
108
+ "fontWeight": "800",
109
+ "letterSpacing": -0.64
110
+ },
111
+ "h2": {
112
+ "family": "display",
113
+ "fontSize": 24,
114
+ "lineHeight": 30,
115
+ "fontWeight": "700",
116
+ "letterSpacing": -0.24
117
+ },
118
+ "h3": {
119
+ "family": "sans",
120
+ "fontSize": 18,
121
+ "lineHeight": 24,
122
+ "fontWeight": "700"
123
+ },
124
+ "body": {
125
+ "family": "sans",
126
+ "fontSize": 16,
127
+ "lineHeight": 24,
128
+ "fontWeight": "400"
129
+ },
130
+ "small": {
131
+ "family": "sans",
132
+ "fontSize": 14,
133
+ "lineHeight": 20,
134
+ "fontWeight": "400"
135
+ },
136
+ "label": {
137
+ "family": "sans",
138
+ "fontSize": 12,
139
+ "lineHeight": 16,
140
+ "fontWeight": "700",
141
+ "letterSpacing": 0.72
142
+ },
143
+ "mono": {
144
+ "family": "mono",
145
+ "fontSize": 14,
146
+ "lineHeight": 20,
147
+ "fontWeight": "400"
148
+ }
149
+ } as const;
150
+ export type TypographyToken = keyof typeof typography;
151
+ export type FontFamilyToken = (typeof typography)[TypographyToken]["family"];
152
+
153
+ export const shadows = {
154
+ "light": {
155
+ "card": "0 1px 2px #0b1b330f, 0 4px 12px #0b1b330d",
156
+ "dialog": "0 16px 40px #0b1b3333"
157
+ },
158
+ "dark": {
159
+ "card": "0 1px 2px #00000066",
160
+ "dialog": "0 16px 40px #000000a6"
161
+ }
162
+ } as const;
163
+ export type ShadowToken = keyof (typeof shadows)["light"];