@autonomys/design-tokens 1.4.18
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/README.md +97 -0
- package/dist/css/utilities.css +1919 -0
- package/dist/css/variables.css +244 -0
- package/dist/index.css +2164 -0
- package/dist/index.d.ts +452 -0
- package/dist/index.esm.js +557 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +565 -0
- package/dist/index.js.map +1 -0
- package/dist/tokens/colors.d.ts +307 -0
- package/dist/tokens/colors.js +192 -0
- package/dist/tokens/shadows.d.ts +66 -0
- package/dist/tokens/shadows.js +40 -0
- package/dist/tokens/spacing.d.ts +159 -0
- package/dist/tokens/spacing.js +100 -0
- package/dist/tokens/typography.d.ts +361 -0
- package/dist/tokens/typography.js +205 -0
- package/package.json +48 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto Design Typography Tokens
|
|
3
|
+
*
|
|
4
|
+
* These typography tokens are derived from the application's design system
|
|
5
|
+
* and match the font styles used throughout the codebase.
|
|
6
|
+
*/
|
|
7
|
+
// Font families
|
|
8
|
+
export const fontFamilies = {
|
|
9
|
+
sans: 'var(--font-geist-sans), system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
10
|
+
mono: 'var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
|
11
|
+
display: "var(--font-roboto-serif), serif",
|
|
12
|
+
body: "var(--font-libre-franklin), sans-serif",
|
|
13
|
+
};
|
|
14
|
+
// Font sizes - following a modular scale
|
|
15
|
+
export const fontSizes = {
|
|
16
|
+
xs: "0.75rem", // 12px
|
|
17
|
+
sm: "0.875rem", // 14px
|
|
18
|
+
base: "1rem", // 16px
|
|
19
|
+
lg: "1.125rem", // 18px
|
|
20
|
+
xl: "1.25rem", // 20px
|
|
21
|
+
"2xl": "1.5rem", // 24px
|
|
22
|
+
"3xl": "1.875rem", // 30px
|
|
23
|
+
"4xl": "2.25rem", // 36px
|
|
24
|
+
"5xl": "3rem", // 48px
|
|
25
|
+
// Title sizes
|
|
26
|
+
title1: "3.313rem", // 53px
|
|
27
|
+
title2: "2.938rem", // 47px
|
|
28
|
+
title3: "2.5rem", // 40px
|
|
29
|
+
// Body sizes
|
|
30
|
+
bodyLg: "2rem", // 32px
|
|
31
|
+
bodyMd: "1.688rem", // 27px
|
|
32
|
+
bodySm: "1.313rem", // 21px
|
|
33
|
+
// Button sizes
|
|
34
|
+
buttonLg: "1.188rem", // 19px
|
|
35
|
+
buttonMd: "1rem", // 16px
|
|
36
|
+
// Other sizes
|
|
37
|
+
preTitle: "1.188rem", // 19px
|
|
38
|
+
detail: "1.188rem", // 19px
|
|
39
|
+
};
|
|
40
|
+
// Font weights
|
|
41
|
+
export const fontWeights = {
|
|
42
|
+
extralight: 200,
|
|
43
|
+
light: 300,
|
|
44
|
+
normal: 400,
|
|
45
|
+
medium: 500,
|
|
46
|
+
semibold: 600,
|
|
47
|
+
bold: 700,
|
|
48
|
+
extrabold: 800,
|
|
49
|
+
};
|
|
50
|
+
// Line heights
|
|
51
|
+
export const lineHeights = {
|
|
52
|
+
none: 1,
|
|
53
|
+
tight: 1.25,
|
|
54
|
+
snug: 1.375,
|
|
55
|
+
normal: 1.5,
|
|
56
|
+
relaxed: 1.625,
|
|
57
|
+
loose: 2,
|
|
58
|
+
};
|
|
59
|
+
// Letter spacings
|
|
60
|
+
export const letterSpacings = {
|
|
61
|
+
tighter: "-0.05em",
|
|
62
|
+
tight: "-0.025em",
|
|
63
|
+
normal: "0",
|
|
64
|
+
wide: "0.025em",
|
|
65
|
+
wider: "0.05em",
|
|
66
|
+
widest: "0.1em",
|
|
67
|
+
};
|
|
68
|
+
// Font styles for specific text elements
|
|
69
|
+
export const textStyles = {
|
|
70
|
+
// Headings
|
|
71
|
+
h1: {
|
|
72
|
+
fontFamily: fontFamilies.sans,
|
|
73
|
+
fontSize: fontSizes["4xl"],
|
|
74
|
+
fontWeight: fontWeights.bold,
|
|
75
|
+
lineHeight: lineHeights.tight,
|
|
76
|
+
letterSpacing: letterSpacings.tight,
|
|
77
|
+
},
|
|
78
|
+
h2: {
|
|
79
|
+
fontFamily: fontFamilies.sans,
|
|
80
|
+
fontSize: fontSizes["2xl"],
|
|
81
|
+
fontWeight: fontWeights.bold,
|
|
82
|
+
lineHeight: lineHeights.tight,
|
|
83
|
+
letterSpacing: letterSpacings.tight,
|
|
84
|
+
},
|
|
85
|
+
h3: {
|
|
86
|
+
fontFamily: fontFamilies.sans,
|
|
87
|
+
fontSize: fontSizes.xl,
|
|
88
|
+
fontWeight: fontWeights.semibold,
|
|
89
|
+
lineHeight: lineHeights.tight,
|
|
90
|
+
letterSpacing: letterSpacings.normal,
|
|
91
|
+
},
|
|
92
|
+
h4: {
|
|
93
|
+
fontFamily: fontFamilies.sans,
|
|
94
|
+
fontSize: fontSizes.lg,
|
|
95
|
+
fontWeight: fontWeights.medium,
|
|
96
|
+
lineHeight: lineHeights.tight,
|
|
97
|
+
letterSpacing: letterSpacings.normal,
|
|
98
|
+
},
|
|
99
|
+
// Body text
|
|
100
|
+
bodyLarge: {
|
|
101
|
+
fontFamily: fontFamilies.sans,
|
|
102
|
+
fontSize: fontSizes.lg,
|
|
103
|
+
fontWeight: fontWeights.normal,
|
|
104
|
+
lineHeight: lineHeights.relaxed,
|
|
105
|
+
letterSpacing: letterSpacings.normal,
|
|
106
|
+
},
|
|
107
|
+
bodyDefault: {
|
|
108
|
+
fontFamily: fontFamilies.sans,
|
|
109
|
+
fontSize: fontSizes.base,
|
|
110
|
+
fontWeight: fontWeights.normal,
|
|
111
|
+
lineHeight: lineHeights.relaxed,
|
|
112
|
+
letterSpacing: letterSpacings.normal,
|
|
113
|
+
},
|
|
114
|
+
bodySmall: {
|
|
115
|
+
fontFamily: fontFamilies.sans,
|
|
116
|
+
fontSize: fontSizes.sm,
|
|
117
|
+
fontWeight: fontWeights.normal,
|
|
118
|
+
lineHeight: lineHeights.relaxed,
|
|
119
|
+
letterSpacing: letterSpacings.normal,
|
|
120
|
+
},
|
|
121
|
+
bodyXSmall: {
|
|
122
|
+
fontFamily: fontFamilies.sans,
|
|
123
|
+
fontSize: fontSizes.xs,
|
|
124
|
+
fontWeight: fontWeights.normal,
|
|
125
|
+
lineHeight: lineHeights.relaxed,
|
|
126
|
+
letterSpacing: letterSpacings.normal,
|
|
127
|
+
},
|
|
128
|
+
// UI elements
|
|
129
|
+
buttonLarge: {
|
|
130
|
+
fontFamily: fontFamilies.sans,
|
|
131
|
+
fontSize: fontSizes.base,
|
|
132
|
+
fontWeight: fontWeights.medium,
|
|
133
|
+
lineHeight: lineHeights.none,
|
|
134
|
+
letterSpacing: letterSpacings.wide,
|
|
135
|
+
textTransform: "none",
|
|
136
|
+
},
|
|
137
|
+
buttonDefault: {
|
|
138
|
+
fontFamily: fontFamilies.sans,
|
|
139
|
+
fontSize: fontSizes.sm,
|
|
140
|
+
fontWeight: fontWeights.medium,
|
|
141
|
+
lineHeight: lineHeights.none,
|
|
142
|
+
letterSpacing: letterSpacings.wide,
|
|
143
|
+
textTransform: "none",
|
|
144
|
+
},
|
|
145
|
+
buttonSmall: {
|
|
146
|
+
fontFamily: fontFamilies.sans,
|
|
147
|
+
fontSize: fontSizes.xs,
|
|
148
|
+
fontWeight: fontWeights.medium,
|
|
149
|
+
lineHeight: lineHeights.none,
|
|
150
|
+
letterSpacing: letterSpacings.wide,
|
|
151
|
+
textTransform: "none",
|
|
152
|
+
},
|
|
153
|
+
// Special elements
|
|
154
|
+
label: {
|
|
155
|
+
fontFamily: fontFamilies.sans,
|
|
156
|
+
fontSize: fontSizes.sm,
|
|
157
|
+
fontWeight: fontWeights.medium,
|
|
158
|
+
lineHeight: lineHeights.normal,
|
|
159
|
+
letterSpacing: letterSpacings.normal,
|
|
160
|
+
},
|
|
161
|
+
caption: {
|
|
162
|
+
fontFamily: fontFamilies.sans,
|
|
163
|
+
fontSize: fontSizes.xs,
|
|
164
|
+
fontWeight: fontWeights.normal,
|
|
165
|
+
lineHeight: lineHeights.normal,
|
|
166
|
+
letterSpacing: letterSpacings.normal,
|
|
167
|
+
},
|
|
168
|
+
code: {
|
|
169
|
+
fontFamily: fontFamilies.mono,
|
|
170
|
+
fontSize: fontSizes.sm,
|
|
171
|
+
fontWeight: fontWeights.normal,
|
|
172
|
+
lineHeight: lineHeights.normal,
|
|
173
|
+
letterSpacing: letterSpacings.normal,
|
|
174
|
+
},
|
|
175
|
+
// Title styles
|
|
176
|
+
title1: {
|
|
177
|
+
fontFamily: fontFamilies.display,
|
|
178
|
+
fontSize: fontSizes.title1,
|
|
179
|
+
fontWeight: fontWeights.bold,
|
|
180
|
+
lineHeight: lineHeights.tight,
|
|
181
|
+
letterSpacing: letterSpacings.tight,
|
|
182
|
+
},
|
|
183
|
+
title2: {
|
|
184
|
+
fontFamily: fontFamilies.display,
|
|
185
|
+
fontSize: fontSizes.title2,
|
|
186
|
+
fontWeight: fontWeights.bold,
|
|
187
|
+
lineHeight: lineHeights.tight,
|
|
188
|
+
letterSpacing: letterSpacings.tight,
|
|
189
|
+
},
|
|
190
|
+
title3: {
|
|
191
|
+
fontFamily: fontFamilies.display,
|
|
192
|
+
fontSize: fontSizes.title3,
|
|
193
|
+
fontWeight: fontWeights.bold,
|
|
194
|
+
lineHeight: lineHeights.tight,
|
|
195
|
+
letterSpacing: letterSpacings.tight,
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
export default {
|
|
199
|
+
fontFamilies,
|
|
200
|
+
fontSizes,
|
|
201
|
+
fontWeights,
|
|
202
|
+
lineHeights,
|
|
203
|
+
letterSpacings,
|
|
204
|
+
textStyles,
|
|
205
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@autonomys/design-tokens",
|
|
3
|
+
"version": "1.4.18",
|
|
4
|
+
"description": "Auto Design Tokens",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"module": "dist/index.esm.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/autonomys/auto-sdk"
|
|
13
|
+
},
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "Autonomys",
|
|
16
|
+
"url": "https://www.autonomys.xyz"
|
|
17
|
+
},
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/autonomys/auto-sdk/issues"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "node build-tokens.js && rollup -c",
|
|
27
|
+
"prebuild": "rm -rf dist",
|
|
28
|
+
"dev": "npm run build -- --watch",
|
|
29
|
+
"tsc": "tsc"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@tailwindcss/forms": "^0.5.7",
|
|
33
|
+
"tailwindcss": "^3.3.5"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@rollup/plugin-commonjs": "^25.0.4",
|
|
37
|
+
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
38
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
|
39
|
+
"autoprefixer": "^10.4.16",
|
|
40
|
+
"cssnano": "^6.0.1",
|
|
41
|
+
"fs-extra": "^11.1.1",
|
|
42
|
+
"postcss": "^8.4.31",
|
|
43
|
+
"postcss-import": "^15.1.0",
|
|
44
|
+
"rollup": "^4.1.4",
|
|
45
|
+
"typescript": "^5.3.3"
|
|
46
|
+
},
|
|
47
|
+
"packageManager": "yarn@4.7.0"
|
|
48
|
+
}
|