@recanica/tokens 0.0.0-stage → 0.2.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/LICENSE +9 -0
- package/README.md +21 -2
- package/generated/android/RecanicaTokens.kt +149 -0
- package/generated/css/tailwind-theme.css +47 -0
- package/generated/css/variables.css +151 -0
- package/generated/figma/tokens-studio.json +779 -0
- package/generated/flutter/recanica_tokens.dart +243 -0
- package/generated/ios/RecanicaTokens.swift +96 -0
- package/generated/js/tokens.cjs +225 -0
- package/generated/js/tokens.d.ts +223 -0
- package/generated/js/tokens.mjs +223 -0
- package/generated/json/tokens.json +221 -0
- package/generated/tailwind/preset.cjs +57 -0
- package/package.json +53 -3
- package/scripts/build.mjs +344 -0
- package/theme.css +126 -0
- package/tokens/color.primitive.json +240 -0
- package/tokens/color.semantic.json +332 -0
- package/tokens/dimension.json +199 -0
- package/tokens/effects.json +71 -0
- package/tokens/typography.json +142 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
// GENERATED by @recanica/tokens (scripts/build.mjs) from tokens/*.json. Do not edit.
|
|
2
|
+
// Usage: MaterialApp(theme: recanicaTheme(Brightness.light), darkTheme: recanicaTheme(Brightness.dark))
|
|
3
|
+
import 'package:flutter/material.dart';
|
|
4
|
+
|
|
5
|
+
@immutable
|
|
6
|
+
class RecanicaColors {
|
|
7
|
+
const RecanicaColors({
|
|
8
|
+
required this.background,
|
|
9
|
+
required this.foreground,
|
|
10
|
+
required this.surface,
|
|
11
|
+
required this.panel,
|
|
12
|
+
required this.card,
|
|
13
|
+
required this.cardForeground,
|
|
14
|
+
required this.popover,
|
|
15
|
+
required this.popoverForeground,
|
|
16
|
+
required this.primary,
|
|
17
|
+
required this.primaryForeground,
|
|
18
|
+
required this.secondary,
|
|
19
|
+
required this.secondaryForeground,
|
|
20
|
+
required this.muted,
|
|
21
|
+
required this.mutedForeground,
|
|
22
|
+
required this.accent,
|
|
23
|
+
required this.accentForeground,
|
|
24
|
+
required this.brand,
|
|
25
|
+
required this.brandForeground,
|
|
26
|
+
required this.destructive,
|
|
27
|
+
required this.destructiveForeground,
|
|
28
|
+
required this.success,
|
|
29
|
+
required this.warning,
|
|
30
|
+
required this.border,
|
|
31
|
+
required this.input,
|
|
32
|
+
required this.ring,
|
|
33
|
+
required this.sidebar,
|
|
34
|
+
required this.sidebarForeground,
|
|
35
|
+
required this.sidebarAccent,
|
|
36
|
+
required this.sidebarBorder,
|
|
37
|
+
required this.sidebarPrimary,
|
|
38
|
+
required this.sidebarPrimaryForeground,
|
|
39
|
+
required this.sidebarAccentForeground,
|
|
40
|
+
required this.sidebarRing,
|
|
41
|
+
required this.chart1,
|
|
42
|
+
required this.chart2,
|
|
43
|
+
required this.chart3,
|
|
44
|
+
required this.chart4,
|
|
45
|
+
required this.chart5,
|
|
46
|
+
});
|
|
47
|
+
final Color background;
|
|
48
|
+
final Color foreground;
|
|
49
|
+
final Color surface;
|
|
50
|
+
final Color panel;
|
|
51
|
+
final Color card;
|
|
52
|
+
final Color cardForeground;
|
|
53
|
+
final Color popover;
|
|
54
|
+
final Color popoverForeground;
|
|
55
|
+
final Color primary;
|
|
56
|
+
final Color primaryForeground;
|
|
57
|
+
final Color secondary;
|
|
58
|
+
final Color secondaryForeground;
|
|
59
|
+
final Color muted;
|
|
60
|
+
final Color mutedForeground;
|
|
61
|
+
final Color accent;
|
|
62
|
+
final Color accentForeground;
|
|
63
|
+
final Color brand;
|
|
64
|
+
final Color brandForeground;
|
|
65
|
+
final Color destructive;
|
|
66
|
+
final Color destructiveForeground;
|
|
67
|
+
final Color success;
|
|
68
|
+
final Color warning;
|
|
69
|
+
final Color border;
|
|
70
|
+
final Color input;
|
|
71
|
+
final Color ring;
|
|
72
|
+
final Color sidebar;
|
|
73
|
+
final Color sidebarForeground;
|
|
74
|
+
final Color sidebarAccent;
|
|
75
|
+
final Color sidebarBorder;
|
|
76
|
+
final Color sidebarPrimary;
|
|
77
|
+
final Color sidebarPrimaryForeground;
|
|
78
|
+
final Color sidebarAccentForeground;
|
|
79
|
+
final Color sidebarRing;
|
|
80
|
+
final Color chart1;
|
|
81
|
+
final Color chart2;
|
|
82
|
+
final Color chart3;
|
|
83
|
+
final Color chart4;
|
|
84
|
+
final Color chart5;
|
|
85
|
+
|
|
86
|
+
static const light = RecanicaColors(
|
|
87
|
+
background: Color(0xFFFFFFFF),
|
|
88
|
+
foreground: Color(0xFF0D0D0D),
|
|
89
|
+
surface: Color(0xFFFAFAFA),
|
|
90
|
+
panel: Color(0xFFFFFFFF),
|
|
91
|
+
card: Color(0xFFFFFFFF),
|
|
92
|
+
cardForeground: Color(0xFF0D0D0D),
|
|
93
|
+
popover: Color(0xFFFFFFFF),
|
|
94
|
+
popoverForeground: Color(0xFF0D0D0D),
|
|
95
|
+
primary: Color(0xFF0D0D0D),
|
|
96
|
+
primaryForeground: Color(0xFFFAFAFA),
|
|
97
|
+
secondary: Color(0xFFF4F4F4),
|
|
98
|
+
secondaryForeground: Color(0xFF161616),
|
|
99
|
+
muted: Color(0xFFF4F4F4),
|
|
100
|
+
mutedForeground: Color(0xFF737373),
|
|
101
|
+
accent: Color(0xFFF4F4F4),
|
|
102
|
+
accentForeground: Color(0xFF161616),
|
|
103
|
+
brand: Color(0xFF161616),
|
|
104
|
+
brandForeground: Color(0xFFFFFFFF),
|
|
105
|
+
destructive: Color(0xFFDB4241),
|
|
106
|
+
destructiveForeground: Color(0xFFFFFFFF),
|
|
107
|
+
success: Color(0xFF46A16B),
|
|
108
|
+
warning: Color(0xFFDDA552),
|
|
109
|
+
border: Color(0xFFE5E5E5),
|
|
110
|
+
input: Color(0xFFE5E5E5),
|
|
111
|
+
ring: Color(0xFF737373),
|
|
112
|
+
sidebar: Color(0xFFF4F4F4),
|
|
113
|
+
sidebarForeground: Color(0xFF737373),
|
|
114
|
+
sidebarAccent: Color(0xFFE5E5E5),
|
|
115
|
+
sidebarBorder: Color(0xFFE5E5E5),
|
|
116
|
+
sidebarPrimary: Color(0xFF0D0D0D),
|
|
117
|
+
sidebarPrimaryForeground: Color(0xFFFFFFFF),
|
|
118
|
+
sidebarAccentForeground: Color(0xFF0D0D0D),
|
|
119
|
+
sidebarRing: Color(0xFF737373),
|
|
120
|
+
chart1: Color(0xFF0D0D0D),
|
|
121
|
+
chart2: Color(0xFF404040),
|
|
122
|
+
chart3: Color(0xFF737373),
|
|
123
|
+
chart4: Color(0xFFA1A1A1),
|
|
124
|
+
chart5: Color(0xFFD4D4D4),
|
|
125
|
+
);
|
|
126
|
+
static const dark = RecanicaColors(
|
|
127
|
+
background: Color(0xFF020202),
|
|
128
|
+
foreground: Color(0xFFFAFAFA),
|
|
129
|
+
surface: Color(0xFF0D0D0D),
|
|
130
|
+
panel: Color(0xFF0D0D0D),
|
|
131
|
+
card: Color(0xFF0D0D0D),
|
|
132
|
+
cardForeground: Color(0xFFFAFAFA),
|
|
133
|
+
popover: Color(0xFF161616),
|
|
134
|
+
popoverForeground: Color(0xFFFAFAFA),
|
|
135
|
+
primary: Color(0xFFFAFAFA),
|
|
136
|
+
primaryForeground: Color(0xFF0D0D0D),
|
|
137
|
+
secondary: Color(0xFF161616),
|
|
138
|
+
secondaryForeground: Color(0xFFF4F4F4),
|
|
139
|
+
muted: Color(0xFF161616),
|
|
140
|
+
mutedForeground: Color(0xFF8C8C8C),
|
|
141
|
+
accent: Color(0xFF161616),
|
|
142
|
+
accentForeground: Color(0xFFFAFAFA),
|
|
143
|
+
brand: Color(0xFFCFD1D4),
|
|
144
|
+
brandForeground: Color(0xFF0D0D0D),
|
|
145
|
+
destructive: Color(0xFFEA6A6A),
|
|
146
|
+
destructiveForeground: Color(0xFFFFFFFF),
|
|
147
|
+
success: Color(0xFF46A16B),
|
|
148
|
+
warning: Color(0xFFDDA552),
|
|
149
|
+
border: Color(0xFF1E1E1E),
|
|
150
|
+
input: Color(0xFF262626),
|
|
151
|
+
ring: Color(0xFFAFB1B4),
|
|
152
|
+
sidebar: Color(0xFF020202),
|
|
153
|
+
sidebarForeground: Color(0xFF8C8C8C),
|
|
154
|
+
sidebarAccent: Color(0xFF161616),
|
|
155
|
+
sidebarBorder: Color(0xFF1E1E1E),
|
|
156
|
+
sidebarPrimary: Color(0xFFFAFAFA),
|
|
157
|
+
sidebarPrimaryForeground: Color(0xFF0D0D0D),
|
|
158
|
+
sidebarAccentForeground: Color(0xFFFAFAFA),
|
|
159
|
+
sidebarRing: Color(0xFFAFB1B4),
|
|
160
|
+
chart1: Color(0xFFFAFAFA),
|
|
161
|
+
chart2: Color(0xFFCFD1D4),
|
|
162
|
+
chart3: Color(0xFF8A8C90),
|
|
163
|
+
chart4: Color(0xFF525252),
|
|
164
|
+
chart5: Color(0xFF404040),
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
class RecanicaRadius {
|
|
169
|
+
static const double base = 12;
|
|
170
|
+
static const double sm = 8;
|
|
171
|
+
static const double md = 10;
|
|
172
|
+
static const double lg = 12;
|
|
173
|
+
static const double xl = 16;
|
|
174
|
+
static const double xxl = 20;
|
|
175
|
+
static const double full = 9999;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
class RecanicaSpacing {
|
|
179
|
+
static const double unit = 4; // Base grid. Tailwind p-1 = 4px.
|
|
180
|
+
static const double gutter = 16; // Page side padding
|
|
181
|
+
static const double section = 64; // Landing section rhythm
|
|
182
|
+
static const double sectionSm = 48;
|
|
183
|
+
static const double panel = 28; // Card / stat padding
|
|
184
|
+
static const double stack = 40; // Gap between dashboard blocks
|
|
185
|
+
static const double sidebar = 240;
|
|
186
|
+
static const double flow = 20; // Gap between consecutive blocks in a column (paragraph → table → paragraph). Owned by the .flow container, never by the blocks.
|
|
187
|
+
static const double group = 12; // Within a group: a heading and its content, a label and its field.
|
|
188
|
+
static const double insetSm = 16; // Padding inside compact surfaces (list rows, small cards).
|
|
189
|
+
static const double inset = 20; // Padding inside surfaces (cards, tables' edge inset).
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
class RecanicaText {
|
|
193
|
+
static const String family = 'Geist';
|
|
194
|
+
static const String monoFamily = 'Geist Mono';
|
|
195
|
+
static const TextStyle xs = TextStyle(fontFamily: family, fontSize: 12, height: 1.333, letterSpacing: 0, fontWeight: FontWeight.w400);
|
|
196
|
+
static const TextStyle sm = TextStyle(fontFamily: family, fontSize: 14, height: 1.43, letterSpacing: 0, fontWeight: FontWeight.w400);
|
|
197
|
+
static const TextStyle base = TextStyle(fontFamily: family, fontSize: 16, height: 1.5, letterSpacing: 0, fontWeight: FontWeight.w400);
|
|
198
|
+
static const TextStyle heading = TextStyle(fontFamily: family, fontSize: 24, height: 1.25, letterSpacing: -0.36, fontWeight: FontWeight.w400);
|
|
199
|
+
static const TextStyle title = TextStyle(fontFamily: family, fontSize: 30, height: 1.2, letterSpacing: -0.6, fontWeight: FontWeight.w400);
|
|
200
|
+
static const TextStyle metric = TextStyle(fontFamily: family, fontSize: 40, height: 1, letterSpacing: -1.2, fontWeight: FontWeight.w300);
|
|
201
|
+
static const TextStyle displaySm = TextStyle(fontFamily: family, fontSize: 36, height: 1.1, letterSpacing: 0, fontWeight: FontWeight.w400);
|
|
202
|
+
static const TextStyle displayMd = TextStyle(fontFamily: family, fontSize: 48, height: 1.05, letterSpacing: 0, fontWeight: FontWeight.w400);
|
|
203
|
+
static const TextStyle displayLg = TextStyle(fontFamily: family, fontSize: 64, height: 1, letterSpacing: -2.24, fontWeight: FontWeight.w400);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
class RecanicaMotion {
|
|
207
|
+
static const Duration fast = Duration(milliseconds: 150);
|
|
208
|
+
static const Duration base = Duration(milliseconds: 200);
|
|
209
|
+
static const Duration slow = Duration(milliseconds: 300);
|
|
210
|
+
static const Duration slower = Duration(milliseconds: 700);
|
|
211
|
+
static const Curve outSoft = Cubic(0.22, 1, 0.36, 1);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
ThemeData recanicaTheme(Brightness brightness) {
|
|
215
|
+
final c = brightness == Brightness.dark ? RecanicaColors.dark : RecanicaColors.light;
|
|
216
|
+
final pill = const StadiumBorder();
|
|
217
|
+
return ThemeData(
|
|
218
|
+
useMaterial3: true,
|
|
219
|
+
brightness: brightness,
|
|
220
|
+
fontFamily: RecanicaText.family,
|
|
221
|
+
scaffoldBackgroundColor: c.background,
|
|
222
|
+
dividerColor: c.border,
|
|
223
|
+
colorScheme: ColorScheme(
|
|
224
|
+
brightness: brightness,
|
|
225
|
+
primary: c.primary, onPrimary: c.primaryForeground,
|
|
226
|
+
secondary: c.secondary, onSecondary: c.secondaryForeground,
|
|
227
|
+
error: c.destructive, onError: c.destructiveForeground,
|
|
228
|
+
surface: c.card, onSurface: c.foreground,
|
|
229
|
+
outline: c.border, surfaceContainerHighest: c.muted,
|
|
230
|
+
),
|
|
231
|
+
cardTheme: CardThemeData(
|
|
232
|
+
color: c.card, elevation: 0, margin: EdgeInsets.zero,
|
|
233
|
+
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(RecanicaRadius.xxl), side: BorderSide(color: c.border)),
|
|
234
|
+
),
|
|
235
|
+
filledButtonTheme: FilledButtonThemeData(style: FilledButton.styleFrom(shape: pill, backgroundColor: c.primary, foregroundColor: c.primaryForeground)),
|
|
236
|
+
outlinedButtonTheme: OutlinedButtonThemeData(style: OutlinedButton.styleFrom(shape: pill, side: BorderSide(color: c.border), foregroundColor: c.foreground)),
|
|
237
|
+
inputDecorationTheme: InputDecorationTheme(
|
|
238
|
+
border: OutlineInputBorder(borderRadius: BorderRadius.circular(RecanicaRadius.lg), borderSide: BorderSide(color: c.input)),
|
|
239
|
+
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(RecanicaRadius.lg), borderSide: BorderSide(color: c.input)),
|
|
240
|
+
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(RecanicaRadius.lg), borderSide: BorderSide(color: c.ring, width: 1.5)),
|
|
241
|
+
),
|
|
242
|
+
);
|
|
243
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// GENERATED by @recanica/tokens (scripts/build.mjs) from tokens/*.json. Do not edit.
|
|
2
|
+
// SwiftUI. Colors adapt to light/dark automatically.
|
|
3
|
+
import SwiftUI
|
|
4
|
+
import UIKit
|
|
5
|
+
|
|
6
|
+
public enum Recanica {
|
|
7
|
+
public enum Colors {
|
|
8
|
+
public static let background = Color(light: 0xffffff, dark: 0x020202)
|
|
9
|
+
public static let foreground = Color(light: 0x0d0d0d, dark: 0xfafafa)
|
|
10
|
+
public static let surface = Color(light: 0xfafafa, dark: 0x0d0d0d)
|
|
11
|
+
public static let panel = Color(light: 0xffffff, dark: 0x0d0d0d)
|
|
12
|
+
public static let card = Color(light: 0xffffff, dark: 0x0d0d0d)
|
|
13
|
+
public static let cardForeground = Color(light: 0x0d0d0d, dark: 0xfafafa)
|
|
14
|
+
public static let popover = Color(light: 0xffffff, dark: 0x161616)
|
|
15
|
+
public static let popoverForeground = Color(light: 0x0d0d0d, dark: 0xfafafa)
|
|
16
|
+
public static let primary = Color(light: 0x0d0d0d, dark: 0xfafafa)
|
|
17
|
+
public static let primaryForeground = Color(light: 0xfafafa, dark: 0x0d0d0d)
|
|
18
|
+
public static let secondary = Color(light: 0xf4f4f4, dark: 0x161616)
|
|
19
|
+
public static let secondaryForeground = Color(light: 0x161616, dark: 0xf4f4f4)
|
|
20
|
+
public static let muted = Color(light: 0xf4f4f4, dark: 0x161616)
|
|
21
|
+
public static let mutedForeground = Color(light: 0x737373, dark: 0x8c8c8c)
|
|
22
|
+
public static let accent = Color(light: 0xf4f4f4, dark: 0x161616)
|
|
23
|
+
public static let accentForeground = Color(light: 0x161616, dark: 0xfafafa)
|
|
24
|
+
public static let brand = Color(light: 0x161616, dark: 0xcfd1d4)
|
|
25
|
+
public static let brandForeground = Color(light: 0xffffff, dark: 0x0d0d0d)
|
|
26
|
+
public static let destructive = Color(light: 0xdb4241, dark: 0xea6a6a)
|
|
27
|
+
public static let destructiveForeground = Color(light: 0xffffff, dark: 0xffffff)
|
|
28
|
+
public static let success = Color(light: 0x46a16b, dark: 0x46a16b)
|
|
29
|
+
public static let warning = Color(light: 0xdda552, dark: 0xdda552)
|
|
30
|
+
public static let border = Color(light: 0xe5e5e5, dark: 0x1e1e1e)
|
|
31
|
+
public static let input = Color(light: 0xe5e5e5, dark: 0x262626)
|
|
32
|
+
public static let ring = Color(light: 0x737373, dark: 0xafb1b4)
|
|
33
|
+
public static let sidebar = Color(light: 0xf4f4f4, dark: 0x020202)
|
|
34
|
+
public static let sidebarForeground = Color(light: 0x737373, dark: 0x8c8c8c)
|
|
35
|
+
public static let sidebarAccent = Color(light: 0xe5e5e5, dark: 0x161616)
|
|
36
|
+
public static let sidebarBorder = Color(light: 0xe5e5e5, dark: 0x1e1e1e)
|
|
37
|
+
public static let sidebarPrimary = Color(light: 0x0d0d0d, dark: 0xfafafa)
|
|
38
|
+
public static let sidebarPrimaryForeground = Color(light: 0xffffff, dark: 0x0d0d0d)
|
|
39
|
+
public static let sidebarAccentForeground = Color(light: 0x0d0d0d, dark: 0xfafafa)
|
|
40
|
+
public static let sidebarRing = Color(light: 0x737373, dark: 0xafb1b4)
|
|
41
|
+
public static let chart1 = Color(light: 0x0d0d0d, dark: 0xfafafa)
|
|
42
|
+
public static let chart2 = Color(light: 0x404040, dark: 0xcfd1d4)
|
|
43
|
+
public static let chart3 = Color(light: 0x737373, dark: 0x8a8c90)
|
|
44
|
+
public static let chart4 = Color(light: 0xa1a1a1, dark: 0x525252)
|
|
45
|
+
public static let chart5 = Color(light: 0xd4d4d4, dark: 0x404040)
|
|
46
|
+
}
|
|
47
|
+
public enum Radius {
|
|
48
|
+
public static let base: CGFloat = 12
|
|
49
|
+
public static let sm: CGFloat = 8
|
|
50
|
+
public static let md: CGFloat = 10
|
|
51
|
+
public static let lg: CGFloat = 12
|
|
52
|
+
public static let xl: CGFloat = 16
|
|
53
|
+
public static let xxl: CGFloat = 20
|
|
54
|
+
public static let full: CGFloat = 9999
|
|
55
|
+
}
|
|
56
|
+
public enum Spacing {
|
|
57
|
+
public static let unit: CGFloat = 4
|
|
58
|
+
public static let gutter: CGFloat = 16
|
|
59
|
+
public static let section: CGFloat = 64
|
|
60
|
+
public static let sectionSm: CGFloat = 48
|
|
61
|
+
public static let panel: CGFloat = 28
|
|
62
|
+
public static let stack: CGFloat = 40
|
|
63
|
+
public static let sidebar: CGFloat = 240
|
|
64
|
+
public static let flow: CGFloat = 20
|
|
65
|
+
public static let group: CGFloat = 12
|
|
66
|
+
public static let insetSm: CGFloat = 16
|
|
67
|
+
public static let inset: CGFloat = 20
|
|
68
|
+
}
|
|
69
|
+
public enum Typography {
|
|
70
|
+
public static let xs = Font.custom("Geist", size: 12).weight(.regular)
|
|
71
|
+
public static let sm = Font.custom("Geist", size: 14).weight(.regular)
|
|
72
|
+
public static let base = Font.custom("Geist", size: 16).weight(.regular)
|
|
73
|
+
public static let heading = Font.custom("Geist", size: 24).weight(.regular)
|
|
74
|
+
public static let title = Font.custom("Geist", size: 30).weight(.regular)
|
|
75
|
+
public static let metric = Font.custom("Geist", size: 40).weight(.light)
|
|
76
|
+
public static let displaySm = Font.custom("Geist", size: 36).weight(.regular)
|
|
77
|
+
public static let displayMd = Font.custom("Geist", size: 48).weight(.regular)
|
|
78
|
+
public static let displayLg = Font.custom("Geist", size: 64).weight(.regular)
|
|
79
|
+
}
|
|
80
|
+
public enum Motion {
|
|
81
|
+
public static let fast: Double = 0.15
|
|
82
|
+
public static let base: Double = 0.2
|
|
83
|
+
public static let slow: Double = 0.3
|
|
84
|
+
public static let slower: Double = 0.7
|
|
85
|
+
public static let outSoft = Animation.timingCurve(0.22, 1, 0.36, 1, duration: 0.3)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
extension Color {
|
|
90
|
+
init(light: UInt32, dark: UInt32) {
|
|
91
|
+
func ui(_ hex: UInt32) -> UIColor {
|
|
92
|
+
UIColor(red: CGFloat((hex >> 16) & 0xFF) / 255, green: CGFloat((hex >> 8) & 0xFF) / 255, blue: CGFloat(hex & 0xFF) / 255, alpha: 1)
|
|
93
|
+
}
|
|
94
|
+
self.init(uiColor: UIColor { $0.userInterfaceStyle == .dark ? ui(dark) : ui(light) })
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
// GENERATED by @recanica/tokens (scripts/build.mjs) from tokens/*.json. Do not edit.
|
|
2
|
+
const tokens = {
|
|
3
|
+
"color": {
|
|
4
|
+
"light": {
|
|
5
|
+
"background": "#ffffff",
|
|
6
|
+
"foreground": "#0d0d0d",
|
|
7
|
+
"surface": "#fafafa",
|
|
8
|
+
"panel": "#ffffff",
|
|
9
|
+
"card": "#ffffff",
|
|
10
|
+
"cardForeground": "#0d0d0d",
|
|
11
|
+
"popover": "#ffffff",
|
|
12
|
+
"popoverForeground": "#0d0d0d",
|
|
13
|
+
"primary": "#0d0d0d",
|
|
14
|
+
"primaryForeground": "#fafafa",
|
|
15
|
+
"secondary": "#f4f4f4",
|
|
16
|
+
"secondaryForeground": "#161616",
|
|
17
|
+
"muted": "#f4f4f4",
|
|
18
|
+
"mutedForeground": "#737373",
|
|
19
|
+
"accent": "#f4f4f4",
|
|
20
|
+
"accentForeground": "#161616",
|
|
21
|
+
"brand": "#161616",
|
|
22
|
+
"brandForeground": "#ffffff",
|
|
23
|
+
"destructive": "#db4241",
|
|
24
|
+
"destructiveForeground": "#ffffff",
|
|
25
|
+
"success": "#46a16b",
|
|
26
|
+
"warning": "#dda552",
|
|
27
|
+
"border": "#e5e5e5",
|
|
28
|
+
"input": "#e5e5e5",
|
|
29
|
+
"ring": "#737373",
|
|
30
|
+
"sidebar": "#f4f4f4",
|
|
31
|
+
"sidebarForeground": "#737373",
|
|
32
|
+
"sidebarAccent": "#e5e5e5",
|
|
33
|
+
"sidebarBorder": "#e5e5e5",
|
|
34
|
+
"sidebarPrimary": "#0d0d0d",
|
|
35
|
+
"sidebarPrimaryForeground": "#ffffff",
|
|
36
|
+
"sidebarAccentForeground": "#0d0d0d",
|
|
37
|
+
"sidebarRing": "#737373",
|
|
38
|
+
"chart1": "#0d0d0d",
|
|
39
|
+
"chart2": "#404040",
|
|
40
|
+
"chart3": "#737373",
|
|
41
|
+
"chart4": "#a1a1a1",
|
|
42
|
+
"chart5": "#d4d4d4"
|
|
43
|
+
},
|
|
44
|
+
"dark": {
|
|
45
|
+
"background": "#020202",
|
|
46
|
+
"foreground": "#fafafa",
|
|
47
|
+
"surface": "#0d0d0d",
|
|
48
|
+
"panel": "#0d0d0d",
|
|
49
|
+
"card": "#0d0d0d",
|
|
50
|
+
"cardForeground": "#fafafa",
|
|
51
|
+
"popover": "#161616",
|
|
52
|
+
"popoverForeground": "#fafafa",
|
|
53
|
+
"primary": "#fafafa",
|
|
54
|
+
"primaryForeground": "#0d0d0d",
|
|
55
|
+
"secondary": "#161616",
|
|
56
|
+
"secondaryForeground": "#f4f4f4",
|
|
57
|
+
"muted": "#161616",
|
|
58
|
+
"mutedForeground": "#8c8c8c",
|
|
59
|
+
"accent": "#161616",
|
|
60
|
+
"accentForeground": "#fafafa",
|
|
61
|
+
"brand": "#cfd1d4",
|
|
62
|
+
"brandForeground": "#0d0d0d",
|
|
63
|
+
"destructive": "#ea6a6a",
|
|
64
|
+
"destructiveForeground": "#ffffff",
|
|
65
|
+
"success": "#46a16b",
|
|
66
|
+
"warning": "#dda552",
|
|
67
|
+
"border": "#1e1e1e",
|
|
68
|
+
"input": "#262626",
|
|
69
|
+
"ring": "#afb1b4",
|
|
70
|
+
"sidebar": "#020202",
|
|
71
|
+
"sidebarForeground": "#8c8c8c",
|
|
72
|
+
"sidebarAccent": "#161616",
|
|
73
|
+
"sidebarBorder": "#1e1e1e",
|
|
74
|
+
"sidebarPrimary": "#fafafa",
|
|
75
|
+
"sidebarPrimaryForeground": "#0d0d0d",
|
|
76
|
+
"sidebarAccentForeground": "#fafafa",
|
|
77
|
+
"sidebarRing": "#afb1b4",
|
|
78
|
+
"chart1": "#fafafa",
|
|
79
|
+
"chart2": "#cfd1d4",
|
|
80
|
+
"chart3": "#8a8c90",
|
|
81
|
+
"chart4": "#525252",
|
|
82
|
+
"chart5": "#404040"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"primitive": {
|
|
86
|
+
"gray-0": "#ffffff",
|
|
87
|
+
"gray-50": "#fafafa",
|
|
88
|
+
"gray-100": "#f4f4f4",
|
|
89
|
+
"gray-200": "#e5e5e5",
|
|
90
|
+
"gray-300": "#d4d4d4",
|
|
91
|
+
"gray-400": "#a1a1a1",
|
|
92
|
+
"gray-450": "#8c8c8c",
|
|
93
|
+
"gray-500": "#737373",
|
|
94
|
+
"gray-600": "#525252",
|
|
95
|
+
"gray-700": "#404040",
|
|
96
|
+
"gray-800": "#262626",
|
|
97
|
+
"gray-850": "#1e1e1e",
|
|
98
|
+
"gray-900": "#161616",
|
|
99
|
+
"gray-950": "#0d0d0d",
|
|
100
|
+
"gray-1000": "#020202",
|
|
101
|
+
"silver-50": "#f6f7f8",
|
|
102
|
+
"silver-100": "#e7e8ea",
|
|
103
|
+
"silver-200": "#cfd1d4",
|
|
104
|
+
"silver-300": "#afb1b4",
|
|
105
|
+
"silver-400": "#8a8c90",
|
|
106
|
+
"silver-500": "#67696c",
|
|
107
|
+
"red-400": "#ea6a6a",
|
|
108
|
+
"red-500": "#db4241",
|
|
109
|
+
"green-500": "#46a16b",
|
|
110
|
+
"amber-500": "#dda552"
|
|
111
|
+
},
|
|
112
|
+
"radius": {
|
|
113
|
+
"base": 12,
|
|
114
|
+
"sm": 8,
|
|
115
|
+
"md": 10,
|
|
116
|
+
"lg": 12,
|
|
117
|
+
"xl": 16,
|
|
118
|
+
"2xl": 20,
|
|
119
|
+
"full": 9999
|
|
120
|
+
},
|
|
121
|
+
"spacing": {
|
|
122
|
+
"unit": 4,
|
|
123
|
+
"gutter": 16,
|
|
124
|
+
"section": 64,
|
|
125
|
+
"sectionSm": 48,
|
|
126
|
+
"panel": 28,
|
|
127
|
+
"stack": 40,
|
|
128
|
+
"sidebar": 240,
|
|
129
|
+
"flow": 20,
|
|
130
|
+
"group": 12,
|
|
131
|
+
"insetSm": 16,
|
|
132
|
+
"inset": 20
|
|
133
|
+
},
|
|
134
|
+
"container": {
|
|
135
|
+
"content": 1152,
|
|
136
|
+
"narrow": 768,
|
|
137
|
+
"copy": 640
|
|
138
|
+
},
|
|
139
|
+
"font": {
|
|
140
|
+
"sans": [
|
|
141
|
+
"Geist",
|
|
142
|
+
"ui-sans-serif",
|
|
143
|
+
"system-ui",
|
|
144
|
+
"sans-serif"
|
|
145
|
+
],
|
|
146
|
+
"mono": [
|
|
147
|
+
"Geist Mono",
|
|
148
|
+
"ui-monospace",
|
|
149
|
+
"monospace"
|
|
150
|
+
],
|
|
151
|
+
"weight": {
|
|
152
|
+
"light": 300,
|
|
153
|
+
"regular": 400,
|
|
154
|
+
"medium": 500
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"text": {
|
|
158
|
+
"xs": {
|
|
159
|
+
"fontSize": 12,
|
|
160
|
+
"lineHeight": 1.333,
|
|
161
|
+
"letterSpacing": 0
|
|
162
|
+
},
|
|
163
|
+
"sm": {
|
|
164
|
+
"fontSize": 14,
|
|
165
|
+
"lineHeight": 1.43,
|
|
166
|
+
"letterSpacing": 0
|
|
167
|
+
},
|
|
168
|
+
"base": {
|
|
169
|
+
"fontSize": 16,
|
|
170
|
+
"lineHeight": 1.5,
|
|
171
|
+
"letterSpacing": 0
|
|
172
|
+
},
|
|
173
|
+
"heading": {
|
|
174
|
+
"fontSize": 24,
|
|
175
|
+
"lineHeight": 1.25,
|
|
176
|
+
"letterSpacing": -0.015
|
|
177
|
+
},
|
|
178
|
+
"title": {
|
|
179
|
+
"fontSize": 30,
|
|
180
|
+
"lineHeight": 1.2,
|
|
181
|
+
"letterSpacing": -0.02
|
|
182
|
+
},
|
|
183
|
+
"metric": {
|
|
184
|
+
"fontSize": 40,
|
|
185
|
+
"lineHeight": 1,
|
|
186
|
+
"letterSpacing": -0.03
|
|
187
|
+
},
|
|
188
|
+
"displaySm": {
|
|
189
|
+
"fontSize": 36,
|
|
190
|
+
"lineHeight": 1.1,
|
|
191
|
+
"letterSpacing": 0
|
|
192
|
+
},
|
|
193
|
+
"displayMd": {
|
|
194
|
+
"fontSize": 48,
|
|
195
|
+
"lineHeight": 1.05,
|
|
196
|
+
"letterSpacing": 0
|
|
197
|
+
},
|
|
198
|
+
"displayLg": {
|
|
199
|
+
"fontSize": 64,
|
|
200
|
+
"lineHeight": 1,
|
|
201
|
+
"letterSpacing": -0.035
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"duration": {
|
|
205
|
+
"fast": 150,
|
|
206
|
+
"base": 200,
|
|
207
|
+
"slow": 300,
|
|
208
|
+
"slower": 700
|
|
209
|
+
},
|
|
210
|
+
"easing": {
|
|
211
|
+
"outSoft": [
|
|
212
|
+
0.22,
|
|
213
|
+
1,
|
|
214
|
+
0.36,
|
|
215
|
+
1
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
"shadow": {
|
|
219
|
+
"soft": "0 1px 2px 0 #0000000a, 0 4px 16px -4px #00000014",
|
|
220
|
+
"float": "0 2px 4px 0 #0000000a, 0 16px 40px -8px #00000029"
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
module.exports = tokens;
|
|
224
|
+
module.exports.tokens = tokens;
|
|
225
|
+
module.exports.default = tokens;
|