@gitbutler/design-core 1.0.2
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 +47 -0
- package/fonts/but-head/But-Head-Italic.woff2 +0 -0
- package/fonts/but-head/But-Head-Regular.woff2 +0 -0
- package/fonts/fonts.css +113 -0
- package/fonts/geist-mono/GeistMono-Bold.woff2 +0 -0
- package/fonts/geist-mono/GeistMono-Medium.woff2 +0 -0
- package/fonts/geist-mono/GeistMono-Regular.woff2 +0 -0
- package/fonts/inter/Inter-Bold.woff2 +0 -0
- package/fonts/inter/Inter-BoldItalic.woff2 +0 -0
- package/fonts/inter/Inter-Italic.woff2 +0 -0
- package/fonts/inter/Inter-Medium.woff2 +0 -0
- package/fonts/inter/Inter-MediumItalic.woff2 +0 -0
- package/fonts/inter/Inter-Regular.woff2 +0 -0
- package/fonts/inter/Inter-SemiBold.woff2 +0 -0
- package/fonts/inter/Inter-SemiBoldItalic.woff2 +0 -0
- package/fonts/pp-editorial/PPEditorialNew-Regular.woff2 +0 -0
- package/package.json +43 -0
- package/tokens/tokens.css +619 -0
- package/tokens/tokens.json +3790 -0
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# GitButler Design Tokens
|
|
2
|
+
|
|
3
|
+
The official design tokens repository for GitButler applications.
|
|
4
|
+
We use [Terrazzo](https://terrazzo.app/) to generate CSS custom properties from design tokens.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm install
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
Place your tokens in the root of the project in a file called `design-tokens.json` and run:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm run build
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This will generate a `tokens` folder with the tokens in CSS format.
|
|
21
|
+
|
|
22
|
+
For development with automatic rebuilding:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm run dev
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Output
|
|
29
|
+
|
|
30
|
+
The build process generates:
|
|
31
|
+
- `tokens/design-tokens.css` - CSS custom properties with light and dark mode support
|
|
32
|
+
- Formatted JSON and CSS files with prettier
|
|
33
|
+
|
|
34
|
+
## Integration
|
|
35
|
+
|
|
36
|
+
To use these tokens in your application:
|
|
37
|
+
|
|
38
|
+
1. Import the generated CSS file
|
|
39
|
+
2. Reference the CSS custom properties in your stylesheets
|
|
40
|
+
3. The tokens support both light and dark themes through CSS selectors
|
|
41
|
+
|
|
42
|
+
## Configuration
|
|
43
|
+
|
|
44
|
+
The Terrazzo configuration is in `terrazzo.config.js` and includes:
|
|
45
|
+
- Pixel to rem conversion for dimension tokens
|
|
46
|
+
- Dark mode selector support (`:root.dark`)
|
|
47
|
+
- Custom variable naming (removes `fx.` prefixes)
|
|
Binary file
|
|
Binary file
|
package/fonts/fonts.css
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitButler Font System - Single Source of Truth
|
|
3
|
+
*
|
|
4
|
+
* This file contains all font definitions for GitButler applications.
|
|
5
|
+
*
|
|
6
|
+
* USAGE:
|
|
7
|
+
* Import this file: @import '@gitbutler/design-core/fonts';
|
|
8
|
+
* Or in JS: import '@gitbutler/design-core/fonts';
|
|
9
|
+
*
|
|
10
|
+
* ARCHITECTURE:
|
|
11
|
+
* - Font files: fonts/{family}/
|
|
12
|
+
* - CSS definitions: This file (fonts.css)
|
|
13
|
+
* - Export: Available via @gitbutler/design-core/fonts
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
@font-face {
|
|
17
|
+
src: url("pp-editorial/PPEditorialNew-Regular.woff2") format("woff2");
|
|
18
|
+
font-family: "PP Editorial New";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@font-face {
|
|
22
|
+
font-style: normal;
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
src: url("but-head/But-Head-Regular.woff2") format("woff2");
|
|
25
|
+
font-family: "But Head";
|
|
26
|
+
font-display: swap;
|
|
27
|
+
}
|
|
28
|
+
@font-face {
|
|
29
|
+
font-style: italic;
|
|
30
|
+
font-weight: 400;
|
|
31
|
+
src: url("but-head/But-Head-Italic.woff2") format("woff2");
|
|
32
|
+
font-family: "But Head";
|
|
33
|
+
font-display: swap;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@font-face {
|
|
37
|
+
font-style: normal;
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
src: url("geist-mono/GeistMono-Regular.woff2") format("woff2");
|
|
40
|
+
font-family: "Geist Mono";
|
|
41
|
+
font-display: swap;
|
|
42
|
+
}
|
|
43
|
+
@font-face {
|
|
44
|
+
font-style: normal;
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
src: url("geist-mono/GeistMono-Medium.woff2") format("woff2");
|
|
47
|
+
font-family: "Geist Mono";
|
|
48
|
+
font-display: swap;
|
|
49
|
+
}
|
|
50
|
+
@font-face {
|
|
51
|
+
font-style: normal;
|
|
52
|
+
font-weight: 700;
|
|
53
|
+
src: url("geist-mono/GeistMono-Bold.woff2") format("woff2");
|
|
54
|
+
font-family: "Geist Mono";
|
|
55
|
+
font-display: swap;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@font-face {
|
|
59
|
+
font-style: normal;
|
|
60
|
+
font-weight: 400;
|
|
61
|
+
src: url("inter/Inter-Regular.woff2") format("woff2");
|
|
62
|
+
font-family: "Inter";
|
|
63
|
+
font-display: swap;
|
|
64
|
+
}
|
|
65
|
+
@font-face {
|
|
66
|
+
font-style: italic;
|
|
67
|
+
font-weight: 400;
|
|
68
|
+
src: url("inter/Inter-Italic.woff2") format("woff2");
|
|
69
|
+
font-family: "Inter";
|
|
70
|
+
font-display: swap;
|
|
71
|
+
}
|
|
72
|
+
@font-face {
|
|
73
|
+
font-style: normal;
|
|
74
|
+
font-weight: 500;
|
|
75
|
+
src: url("inter/Inter-Medium.woff2") format("woff2");
|
|
76
|
+
font-family: "Inter";
|
|
77
|
+
font-display: swap;
|
|
78
|
+
}
|
|
79
|
+
@font-face {
|
|
80
|
+
font-style: italic;
|
|
81
|
+
font-weight: 500;
|
|
82
|
+
src: url("inter/Inter-MediumItalic.woff2") format("woff2");
|
|
83
|
+
font-family: "Inter";
|
|
84
|
+
font-display: swap;
|
|
85
|
+
}
|
|
86
|
+
@font-face {
|
|
87
|
+
font-style: normal;
|
|
88
|
+
font-weight: 600;
|
|
89
|
+
src: url("inter/Inter-SemiBold.woff2") format("woff2");
|
|
90
|
+
font-family: "Inter";
|
|
91
|
+
font-display: swap;
|
|
92
|
+
}
|
|
93
|
+
@font-face {
|
|
94
|
+
font-style: italic;
|
|
95
|
+
font-weight: 600;
|
|
96
|
+
src: url("inter/Inter-SemiBoldItalic.woff2") format("woff2");
|
|
97
|
+
font-family: "Inter";
|
|
98
|
+
font-display: swap;
|
|
99
|
+
}
|
|
100
|
+
@font-face {
|
|
101
|
+
font-style: normal;
|
|
102
|
+
font-weight: 700;
|
|
103
|
+
src: url("inter/Inter-Bold.woff2") format("woff2");
|
|
104
|
+
font-family: "Inter";
|
|
105
|
+
font-display: swap;
|
|
106
|
+
}
|
|
107
|
+
@font-face {
|
|
108
|
+
font-style: italic;
|
|
109
|
+
font-weight: 700;
|
|
110
|
+
src: url("inter/Inter-BoldItalic.woff2") format("woff2");
|
|
111
|
+
font-family: "Inter";
|
|
112
|
+
font-display: swap;
|
|
113
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gitbutler/design-core",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Design tokens for GitButler applications",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"design-tokens",
|
|
8
|
+
"css",
|
|
9
|
+
"terrazzo",
|
|
10
|
+
"gitbutler"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/gitbutlerapp/design-tokens",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/gitbutlerapp/design-tokens.git"
|
|
16
|
+
},
|
|
17
|
+
"main": "./tokens/tokens.css",
|
|
18
|
+
"exports": {
|
|
19
|
+
"./tokens": "./tokens/tokens.css",
|
|
20
|
+
"./tokens.json": "./tokens/tokens.json",
|
|
21
|
+
"./fonts": "./fonts/fonts.css",
|
|
22
|
+
"./fonts/*": "./fonts/*"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "npx tz build",
|
|
26
|
+
"dev": "npx tz build --watch",
|
|
27
|
+
"prepublishOnly": "npm run build"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@terrazzo/cli": "0.6.0",
|
|
31
|
+
"@terrazzo/parser": "0.6.0",
|
|
32
|
+
"@terrazzo/plugin-css": "0.6.0",
|
|
33
|
+
"prettier": "^3.0.0"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"tokens/",
|
|
37
|
+
"fonts/",
|
|
38
|
+
"README.md"
|
|
39
|
+
],
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
}
|
|
43
|
+
}
|