@signozhq/design-tokens 0.0.4
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 +181 -0
- package/build/scss/_variables.scss +133 -0
- package/build.js +92 -0
- package/config.json +16 -0
- package/package.json +18 -0
- package/src/colors.json +410 -0
- package/src/spacing.json +24 -0
- package/src/typography.json +13 -0
package/README.md
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Basic Style Dictionary
|
|
2
|
+
|
|
3
|
+
This example code is bare-bones to show you what this framework can do. If you have the style-dictionary module installed globally, you can `cd` into this directory and run:
|
|
4
|
+
```bash
|
|
5
|
+
style-dictionary build
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
You should see something like this output:
|
|
9
|
+
```
|
|
10
|
+
Copying starter files...
|
|
11
|
+
|
|
12
|
+
Source style dictionary starter files created!
|
|
13
|
+
|
|
14
|
+
Running `style-dictionary build` for the first time to generate build artifacts.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
scss
|
|
18
|
+
✔︎ build/scss/_variables.scss
|
|
19
|
+
|
|
20
|
+
android
|
|
21
|
+
✔︎ build/android/font_dimens.xml
|
|
22
|
+
✔︎ build/android/colors.xml
|
|
23
|
+
|
|
24
|
+
compose
|
|
25
|
+
✔︎ build/compose/StyleDictionaryColor.kt
|
|
26
|
+
✔︎ build/compose/StyleDictionarySize.kt
|
|
27
|
+
|
|
28
|
+
ios
|
|
29
|
+
✔︎ build/ios/StyleDictionaryColor.h
|
|
30
|
+
✔︎ build/ios/StyleDictionaryColor.m
|
|
31
|
+
✔︎ build/ios/StyleDictionarySize.h
|
|
32
|
+
✔︎ build/ios/StyleDictionarySize.m
|
|
33
|
+
|
|
34
|
+
ios-swift
|
|
35
|
+
✔︎ build/ios-swift/StyleDictionary.swift
|
|
36
|
+
|
|
37
|
+
ios-swift-separate-enums
|
|
38
|
+
✔︎ build/ios-swift/StyleDictionaryColor.swift
|
|
39
|
+
✔︎ build/ios-swift/StyleDictionarySize.swift
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Good for you! You have now built your first style dictionary! Moving on, take a look at what we have built. This should have created a build directory and it should look like this:
|
|
43
|
+
```
|
|
44
|
+
├── README.md
|
|
45
|
+
├── config.json
|
|
46
|
+
├── tokens/
|
|
47
|
+
│ ├── color/
|
|
48
|
+
│ ├── base.json
|
|
49
|
+
│ ├── font.json
|
|
50
|
+
│ ├── size/
|
|
51
|
+
│ ├── font.json
|
|
52
|
+
├── build/
|
|
53
|
+
│ ├── android/
|
|
54
|
+
│ ├── font_dimens.xml
|
|
55
|
+
│ ├── colors.xml
|
|
56
|
+
│ ├── compose/
|
|
57
|
+
│ ├── StyleDictionaryColor.kt
|
|
58
|
+
│ ├── StyleDictionarySize.kt
|
|
59
|
+
│ ├── scss/
|
|
60
|
+
│ ├── _variables.scss
|
|
61
|
+
│ ├── ios/
|
|
62
|
+
│ ├── StyleDictionaryColor.h
|
|
63
|
+
│ ├── StyleDictionaryColor.m
|
|
64
|
+
│ ├── StyleDictionarySize.h
|
|
65
|
+
│ ├── StyleDictionarySize.m
|
|
66
|
+
│ ├── ios-swift/
|
|
67
|
+
│ ├── StyleDictionary.swift
|
|
68
|
+
│ ├── StyleDictionaryColor.swift
|
|
69
|
+
│ ├── StyleDictionarySize.swift
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
If you open `config.json` you will see there are 5 platforms defined: scss, android, compose, ios, and ios-swift. Each platform has a transformGroup, buildPath, and files. The buildPath and files of the platform should match up to the files what were built. The files built should look like these:
|
|
73
|
+
|
|
74
|
+
**Android**
|
|
75
|
+
```xml
|
|
76
|
+
<!-- font_dimens.xml -->
|
|
77
|
+
<resources>
|
|
78
|
+
<dimen name="size_font_small">12.00sp</dimen>
|
|
79
|
+
<dimen name="size_font_medium">16.00sp</dimen>
|
|
80
|
+
<dimen name="size_font_large">32.00sp</dimen>
|
|
81
|
+
<dimen name="size_font_base">16.00sp</dimen>
|
|
82
|
+
</resources>
|
|
83
|
+
|
|
84
|
+
<!-- colors.xml -->
|
|
85
|
+
<resources>
|
|
86
|
+
<color name="color_base_gray_light">#ffcccccc</color>
|
|
87
|
+
<color name="color_base_gray_medium">#ff999999</color>
|
|
88
|
+
<color name="color_base_gray_dark">#ff111111</color>
|
|
89
|
+
<color name="color_base_red">#ffff0000</color>
|
|
90
|
+
<color name="color_base_green">#ff00ff00</color>
|
|
91
|
+
<color name="color_font_base">#ffff0000</color>
|
|
92
|
+
<color name="color_font_secondary">#ff00ff00</color>
|
|
93
|
+
<color name="color_font_tertiary">#ffcccccc</color>
|
|
94
|
+
</resources>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Compose**
|
|
98
|
+
```kotlin
|
|
99
|
+
object StyleDictionaryColor {
|
|
100
|
+
val colorBaseGrayDark = Color(0xff111111)
|
|
101
|
+
val colorBaseGrayLight = Color(0xffcccccc)
|
|
102
|
+
val colorBaseGrayMedium = Color(0xff999999)
|
|
103
|
+
val colorBaseGreen = Color(0xff00ff00)
|
|
104
|
+
val colorBaseRed = Color(0xffff0000)
|
|
105
|
+
val colorFontBase = Color(0xffff0000)
|
|
106
|
+
val colorFontSecondary = Color(0xff00ff00)
|
|
107
|
+
val colorFontTertiary = Color(0xffcccccc)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
object StyleDictionarySize {
|
|
111
|
+
/** the base size of the font */
|
|
112
|
+
val sizeFontBase = 16.00.sp
|
|
113
|
+
/** the large size of the font */
|
|
114
|
+
val sizeFontLarge = 32.00.sp
|
|
115
|
+
/** the medium size of the font */
|
|
116
|
+
val sizeFontMedium = 16.00.sp
|
|
117
|
+
/** the small size of the font */
|
|
118
|
+
val sizeFontSmall = 12.00.sp
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**SCSS**
|
|
123
|
+
```scss
|
|
124
|
+
// variables.scss
|
|
125
|
+
$color-base-gray-light: #cccccc;
|
|
126
|
+
$color-base-gray-medium: #999999;
|
|
127
|
+
$color-base-gray-dark: #111111;
|
|
128
|
+
$color-base-red: #ff0000;
|
|
129
|
+
$color-base-green: #00ff00;
|
|
130
|
+
$color-font-base: #ff0000;
|
|
131
|
+
$color-font-secondary: #00ff00;
|
|
132
|
+
$color-font-tertiary: #cccccc;
|
|
133
|
+
$size-font-small: 0.75rem;
|
|
134
|
+
$size-font-medium: 1rem;
|
|
135
|
+
$size-font-large: 2rem;
|
|
136
|
+
$size-font-base: 1rem;
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**iOS**
|
|
140
|
+
```objc
|
|
141
|
+
#import "StyleDictionaryColor.h"
|
|
142
|
+
|
|
143
|
+
@implementation StyleDictionaryColor
|
|
144
|
+
|
|
145
|
+
+ (UIColor *)color:(StyleDictionaryColorName)colorEnum{
|
|
146
|
+
return [[self values] objectAtIndex:colorEnum];
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
+ (NSArray *)values {
|
|
150
|
+
static NSArray* colorArray;
|
|
151
|
+
static dispatch_once_t onceToken;
|
|
152
|
+
|
|
153
|
+
dispatch_once(&onceToken, ^{
|
|
154
|
+
colorArray = @[
|
|
155
|
+
[UIColor colorWithRed:0.800f green:0.800f blue:0.800f alpha:1.000f],
|
|
156
|
+
[UIColor colorWithRed:0.600f green:0.600f blue:0.600f alpha:1.000f],
|
|
157
|
+
[UIColor colorWithRed:0.067f green:0.067f blue:0.067f alpha:1.000f],
|
|
158
|
+
[UIColor colorWithRed:1.000f green:0.000f blue:0.000f alpha:1.000f],
|
|
159
|
+
[UIColor colorWithRed:0.000f green:1.000f blue:0.000f alpha:1.000f],
|
|
160
|
+
[UIColor colorWithRed:1.000f green:0.000f blue:0.000f alpha:1.000f],
|
|
161
|
+
[UIColor colorWithRed:0.000f green:1.000f blue:0.000f alpha:1.000f],
|
|
162
|
+
[UIColor colorWithRed:0.800f green:0.800f blue:0.800f alpha:1.000f]
|
|
163
|
+
];
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
return colorArray;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@end
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Pretty nifty! This shows a few things happening:
|
|
173
|
+
1. The build system does a deep merge of all the token JSON files defined in the `source` attribute of `config.json`. This allows you to split up the token JSON files however you want. There are 2 JSON files with `color` as the top level key, but they get merged properly.
|
|
174
|
+
1. The build system resolves references to other design tokens. `{size.font.medium.value}` gets resolved properly.
|
|
175
|
+
1. The build system handles references to token values in other files as well as you can see in `tokens/color/font.json`.
|
|
176
|
+
|
|
177
|
+
Now let's make a change and see how that affects things. Open up `tokens/color/base.json` and change `"#111111"` to `"#000000"`. After you make that change, save the file and re-run the build command `style-dictionary build`. Open up the build files and take a look.
|
|
178
|
+
|
|
179
|
+
**Huzzah!**
|
|
180
|
+
|
|
181
|
+
Now go forth and create! Take a look at all the built-in [transforms](https://amzn.github.io/style-dictionary/#/transforms?id=pre-defined-transforms) and [formats](https://amzn.github.io/style-dictionary/#/formats?id=pre-defined-formats).
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
|
|
2
|
+
// Do not edit directly
|
|
3
|
+
// Generated on Tue, 19 Dec 2023 12:28:05 GMT
|
|
4
|
+
|
|
5
|
+
$bg-robin-100: #CAD5FD;
|
|
6
|
+
$bg-robin-200: #B8C7FC;
|
|
7
|
+
$bg-robin-300: #95ACFB;
|
|
8
|
+
$bg-robin-400: #7190F9;
|
|
9
|
+
$bg-robin-500: #4E74F8;
|
|
10
|
+
$bg-robin-600: #3F5ECC;
|
|
11
|
+
$bg-sienna-100: #E6D9CD;
|
|
12
|
+
$bg-sienna-200: #DECCBC;
|
|
13
|
+
$bg-sienna-300: #CEB29B;
|
|
14
|
+
$bg-sienna-400: #BD9979;
|
|
15
|
+
$bg-sienna-500: #AD7F58;
|
|
16
|
+
$bg-sienna-600: #8A6646;
|
|
17
|
+
$bg-cherry-100: #FADADB;
|
|
18
|
+
$bg-cherry-200: #F7C8CA;
|
|
19
|
+
$bg-cherry-300: #F5B6B8;
|
|
20
|
+
$bg-cherry-400: #EA6D71;
|
|
21
|
+
$bg-cherry-500: #E5484D;
|
|
22
|
+
$bg-cherry-600: #B83A3E;
|
|
23
|
+
$bg-aqua-100: #C1EEFD;
|
|
24
|
+
$bg-aqua-200: #9AE4FC;
|
|
25
|
+
$bg-aqua-300: #72D9FB;
|
|
26
|
+
$bg-aqua-400: #4BCFF9;
|
|
27
|
+
$bg-aqua-500: #23C4F8;
|
|
28
|
+
$bg-aqua-600: #07AFE6;
|
|
29
|
+
$bg-sakura-100: #FBC8D2;
|
|
30
|
+
$bg-sakura-200: #FAB5C3;
|
|
31
|
+
$bg-sakura-300: #F791A5;
|
|
32
|
+
$bg-sakura-400: #F56C87;
|
|
33
|
+
$bg-sakura-500: #F24769;
|
|
34
|
+
$bg-sakura-600: #C53955;
|
|
35
|
+
$bg-amber-100: #FFF0CC;
|
|
36
|
+
$bg-amber-200: #FFEBBB;
|
|
37
|
+
$bg-amber-300: #FFE19A;
|
|
38
|
+
$bg-amber-400: #FFD778;
|
|
39
|
+
$bg-amber-500: #FFCD56;
|
|
40
|
+
$bg-amber-600: #D5AA45;
|
|
41
|
+
$bg-ink-100: #2A2E37;
|
|
42
|
+
$bg-ink-200: #23262E;
|
|
43
|
+
$bg-ink-300: #16181D;
|
|
44
|
+
$bg-ink-400: #121317;
|
|
45
|
+
$bg-ink-500: #0B0C0E;
|
|
46
|
+
$bg-vanilla-100: #FFFFFF;
|
|
47
|
+
$bg-vanilla-200: #F5F5F5;
|
|
48
|
+
$bg-vanilla-300: #E9E9E9;
|
|
49
|
+
$bg-vanilla-400: #C0C1C3;
|
|
50
|
+
$bg-slate-200: #2C3140;
|
|
51
|
+
$bg-slate-300: #242834;
|
|
52
|
+
$bg-slate-400: #1D212D;
|
|
53
|
+
$bg-slate-500: #161922;
|
|
54
|
+
$bg-gradient-coral: linear-gradient(114deg, #ED6D68 14.99%, #FCA083 77.27%);
|
|
55
|
+
$bg-gradient-dark-shadow: linear-gradient(139deg, rgba(18, 19, 23, 0.80) 0%, rgba(18, 19, 23, 0.90) 98.68%);
|
|
56
|
+
$bg-gradient-dawn: linear-gradient(99deg, #7A97FA 4.42%, #F977FF 96.6%);
|
|
57
|
+
$bg-gradient-ocean: linear-gradient(99deg, #48F8CF 4.42%, #28CBF3 96.6%);
|
|
58
|
+
$bg-gradient-splash: linear-gradient(99deg, #4568DC 4.42%, #324DAA 96.6%);
|
|
59
|
+
$bg-gradient-flamingo: linear-gradient(92deg, #CA9CD0 1.36%, #D38972 68.48%, #A1B1E7 98.99%);
|
|
60
|
+
$bg-forest-200: #A8F3D3;
|
|
61
|
+
$bg-forest-300: #7CEDBE;
|
|
62
|
+
$bg-forest-400: #51E7A8;
|
|
63
|
+
$bg-forest-500: #25E192;
|
|
64
|
+
$bg-forest-600: #1EB475;
|
|
65
|
+
$text-robin-100: #CAD5FD;
|
|
66
|
+
$text-robin-200: #B8C7FC;
|
|
67
|
+
$text-robin-300: #95ACFB;
|
|
68
|
+
$text-robin-400: #7190F9;
|
|
69
|
+
$text-robin-500: #4E74F8;
|
|
70
|
+
$text-robin-600: #3F5ECC;
|
|
71
|
+
$text-sienna-100: #E6D9CD;
|
|
72
|
+
$text-sienna-200: #DECCBC;
|
|
73
|
+
$text-sienna-300: #CEB29B;
|
|
74
|
+
$text-sienna-400: #BD9979;
|
|
75
|
+
$text-sienna-500: #AD7F58;
|
|
76
|
+
$text-sienna-600: #8A6646;
|
|
77
|
+
$text-cherry-100: #FADADB;
|
|
78
|
+
$text-cherry-200: #F7C8CA;
|
|
79
|
+
$text-cherry-300: #F5B6B8;
|
|
80
|
+
$text-cherry-400: #EA6D71;
|
|
81
|
+
$text-cherry-500: #E5484D;
|
|
82
|
+
$text-cherry-600: #B83A3E;
|
|
83
|
+
$text-aqua-100: #C1EEFD;
|
|
84
|
+
$text-aqua-200: #9AE4FC;
|
|
85
|
+
$text-aqua-300: #72D9FB;
|
|
86
|
+
$text-aqua-400: #4BCFF9;
|
|
87
|
+
$text-aqua-500: #23C4F8;
|
|
88
|
+
$text-aqua-600: #07AFE6;
|
|
89
|
+
$text-sakura-100: #FBC8D2;
|
|
90
|
+
$text-sakura-200: #FAB5C3;
|
|
91
|
+
$text-sakura-300: #F791A5;
|
|
92
|
+
$text-sakura-400: #F56C87;
|
|
93
|
+
$text-sakura-500: #F24769;
|
|
94
|
+
$text-sakura-600: #C53955;
|
|
95
|
+
$text-amber-100: #FFF0CC;
|
|
96
|
+
$text-amber-200: #FFEBBB;
|
|
97
|
+
$text-amber-300: #FFE19A;
|
|
98
|
+
$text-amber-400: #FFD778;
|
|
99
|
+
$text-amber-500: #FFCD56;
|
|
100
|
+
$text-amber-600: #D5AA45;
|
|
101
|
+
$text-ink-100: #2A2E37;
|
|
102
|
+
$text-ink-200: #23262E;
|
|
103
|
+
$text-ink-300: #16181D;
|
|
104
|
+
$text-ink-400: #121317;
|
|
105
|
+
$text-ink-500: #0B0C0E;
|
|
106
|
+
$text-vanilla-100: #FFFFFF;
|
|
107
|
+
$text-vanilla-200: #F5F5F5;
|
|
108
|
+
$text-vanilla-300: #E9E9E9;
|
|
109
|
+
$text-vanilla-400: #C0C1C3;
|
|
110
|
+
$text-slate-200: #2C3140;
|
|
111
|
+
$text-slate-300: #242834;
|
|
112
|
+
$text-slate-400: #1D212D;
|
|
113
|
+
$text-slate-500: #161922;
|
|
114
|
+
$text-gradient-coral: linear-gradient(114deg, #ED6D68 14.99%, #FCA083 77.27%);
|
|
115
|
+
$text-gradient-dark-shadow: linear-gradient(139deg, rgba(18, 19, 23, 0.80) 0%, rgba(18, 19, 23, 0.90) 98.68%);
|
|
116
|
+
$text-gradient-dawn: linear-gradient(99deg, #7A97FA 4.42%, #F977FF 96.6%);
|
|
117
|
+
$text-gradient-ocean: linear-gradient(99deg, #48F8CF 4.42%, #28CBF3 96.6%);
|
|
118
|
+
$text-gradient-splash: linear-gradient(99deg, #4568DC 4.42%, #324DAA 96.6%);
|
|
119
|
+
$text-gradient-flamingo: linear-gradient(92deg, #CA9CD0 1.36%, #D38972 68.48%, #A1B1E7 98.99%);
|
|
120
|
+
$text-forest-200: #A8F3D3;
|
|
121
|
+
$text-forest-300: #7CEDBE;
|
|
122
|
+
$text-forest-400: #51E7A8;
|
|
123
|
+
$text-forest-500: #25E192;
|
|
124
|
+
$text-forest-600: #1EB475;
|
|
125
|
+
$padding-lg: 24px;
|
|
126
|
+
$padding-md: 16px;
|
|
127
|
+
$padding-sm: 12px;
|
|
128
|
+
$margin-lg: 24px;
|
|
129
|
+
$margin-md: 16px;
|
|
130
|
+
$margin-sm: 12px;
|
|
131
|
+
$font-lg: 24px;
|
|
132
|
+
$font-md: 16px;
|
|
133
|
+
$font-sm: 12px;
|
package/build.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
const StyleDictionary = require('style-dictionary');
|
|
2
|
+
const fs = require('fs-extra');
|
|
3
|
+
const webPath = `build/tokens/`;
|
|
4
|
+
fs.removeSync(webPath);
|
|
5
|
+
|
|
6
|
+
function removeTitle(dictionary) {
|
|
7
|
+
dictionary.allTokens = dictionary.allTokens.map(token => {
|
|
8
|
+
token.name = token.name.substring(token.name.indexOf("-") + 1);
|
|
9
|
+
return token;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This function will wrap a built-in format and replace `.value` with `.darkValue`
|
|
15
|
+
* if a token has a `.darkValue`.
|
|
16
|
+
* @param {String} format - the name of the built-in format
|
|
17
|
+
* @returns {Function}
|
|
18
|
+
*/
|
|
19
|
+
function darkFormatWrapper(format) {
|
|
20
|
+
return function (args) {
|
|
21
|
+
const dictionary = Object.assign({}, args.dictionary);
|
|
22
|
+
dictionary.allProperties = dictionary.allProperties.map(token => {
|
|
23
|
+
const { darkValue } = token;
|
|
24
|
+
if (darkValue) {
|
|
25
|
+
const returnToken = Object.assign({}, token, {
|
|
26
|
+
value: token.darkValue
|
|
27
|
+
});
|
|
28
|
+
return returnToken;
|
|
29
|
+
} else {
|
|
30
|
+
return token;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
dictionary.allTokens = dictionary.allTokens.map(token => {
|
|
34
|
+
const { darkValue } = token;
|
|
35
|
+
if (darkValue) {
|
|
36
|
+
const returnToken = Object.assign({}, token, {
|
|
37
|
+
value: token.darkValue
|
|
38
|
+
});
|
|
39
|
+
return returnToken;
|
|
40
|
+
} else {
|
|
41
|
+
return token;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
removeTitle(dictionary);
|
|
46
|
+
args.dictionary = dictionary;
|
|
47
|
+
// Use the built-in format but with our customized dictionary object
|
|
48
|
+
// so it will output the darkValue instead of the value
|
|
49
|
+
return StyleDictionary.format[format]({ ...args, dictionary })
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function lightFormatWrapper(format) {
|
|
54
|
+
return function (args) {
|
|
55
|
+
const dictionary = Object.assign({}, args.dictionary);
|
|
56
|
+
removeTitle(dictionary);
|
|
57
|
+
args.dictionary = dictionary;
|
|
58
|
+
return StyleDictionary.format[format]({ ...args, dictionary })
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
StyleDictionary.extend({
|
|
65
|
+
// custom formats
|
|
66
|
+
format: {
|
|
67
|
+
scssDark: darkFormatWrapper(`scss/variables`),
|
|
68
|
+
scssLight: lightFormatWrapper(`scss/variables`),
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
source: [
|
|
72
|
+
`tokens/**/*.json`
|
|
73
|
+
],
|
|
74
|
+
|
|
75
|
+
platforms: {
|
|
76
|
+
css: {
|
|
77
|
+
transformGroup: `scss`,
|
|
78
|
+
buildPath: webPath,
|
|
79
|
+
files: [{
|
|
80
|
+
destination: `variables.scss`,
|
|
81
|
+
format: `scssLight`,
|
|
82
|
+
options: {
|
|
83
|
+
outputReferences: true
|
|
84
|
+
}
|
|
85
|
+
}, {
|
|
86
|
+
destination: `variables-dark.scss`,
|
|
87
|
+
format: `scssDark`,
|
|
88
|
+
filter: (token) => token.darkValue && token.attributes.category === `color`
|
|
89
|
+
}]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}).buildAllPlatforms();
|
package/config.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@signozhq/design-tokens",
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"main": "build/scss/_variables.scss",
|
|
5
|
+
"private": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "style-dictionary build"
|
|
11
|
+
},
|
|
12
|
+
"author": "",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"style-dictionary": "3.8.0"
|
|
16
|
+
},
|
|
17
|
+
"gitHead": "8cad5e6ea30db1b54f16e80fa18ba880decabf58"
|
|
18
|
+
}
|
package/src/colors.json
ADDED
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
{
|
|
2
|
+
"bg": {
|
|
3
|
+
"Robin": {
|
|
4
|
+
"600": {
|
|
5
|
+
"value": "#3F5ECC"
|
|
6
|
+
},
|
|
7
|
+
"500": {
|
|
8
|
+
"value": "#4E74F8"
|
|
9
|
+
},
|
|
10
|
+
"400": {
|
|
11
|
+
"value": "#7190F9"
|
|
12
|
+
},
|
|
13
|
+
"300": {
|
|
14
|
+
"value": "#95ACFB"
|
|
15
|
+
},
|
|
16
|
+
"200": {
|
|
17
|
+
"value": "#B8C7FC"
|
|
18
|
+
},
|
|
19
|
+
"100": {
|
|
20
|
+
"value": "#CAD5FD"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"Sienna": {
|
|
24
|
+
"600": {
|
|
25
|
+
"value": "#8A6646"
|
|
26
|
+
},
|
|
27
|
+
"500": {
|
|
28
|
+
"value": "#AD7F58"
|
|
29
|
+
},
|
|
30
|
+
"400": {
|
|
31
|
+
"value": "#BD9979"
|
|
32
|
+
},
|
|
33
|
+
"300": {
|
|
34
|
+
"value": "#CEB29B"
|
|
35
|
+
},
|
|
36
|
+
"200": {
|
|
37
|
+
"value": "#DECCBC"
|
|
38
|
+
},
|
|
39
|
+
"100": {
|
|
40
|
+
"value": "#E6D9CD"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"Cherry": {
|
|
44
|
+
"600": {
|
|
45
|
+
"value": "#B83A3E"
|
|
46
|
+
},
|
|
47
|
+
"500": {
|
|
48
|
+
"value": "#E5484D"
|
|
49
|
+
},
|
|
50
|
+
"400": {
|
|
51
|
+
"value": "#EA6D71"
|
|
52
|
+
},
|
|
53
|
+
"300": {
|
|
54
|
+
"value": "#F5B6B8"
|
|
55
|
+
},
|
|
56
|
+
"200": {
|
|
57
|
+
"value": "#F7C8CA"
|
|
58
|
+
},
|
|
59
|
+
"100": {
|
|
60
|
+
"value": "#FADADB"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"Aqua": {
|
|
64
|
+
"600": {
|
|
65
|
+
"value": "#07AFE6"
|
|
66
|
+
},
|
|
67
|
+
"500": {
|
|
68
|
+
"value": "#23C4F8"
|
|
69
|
+
},
|
|
70
|
+
"400": {
|
|
71
|
+
"value": "#4BCFF9"
|
|
72
|
+
},
|
|
73
|
+
"300": {
|
|
74
|
+
"value": "#72D9FB"
|
|
75
|
+
},
|
|
76
|
+
"200": {
|
|
77
|
+
"value": "#9AE4FC"
|
|
78
|
+
},
|
|
79
|
+
"100": {
|
|
80
|
+
"value": "#C1EEFD"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"Sakura": {
|
|
84
|
+
"600": {
|
|
85
|
+
"value": "#C53955"
|
|
86
|
+
},
|
|
87
|
+
"500": {
|
|
88
|
+
"value": "#F24769"
|
|
89
|
+
},
|
|
90
|
+
"400": {
|
|
91
|
+
"value": "#F56C87"
|
|
92
|
+
},
|
|
93
|
+
"300": {
|
|
94
|
+
"value": "#F791A5"
|
|
95
|
+
},
|
|
96
|
+
"200": {
|
|
97
|
+
"value": "#FAB5C3"
|
|
98
|
+
},
|
|
99
|
+
"100": {
|
|
100
|
+
"value": "#FBC8D2"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"Amber": {
|
|
104
|
+
"600": {
|
|
105
|
+
"value": "#D5AA45"
|
|
106
|
+
},
|
|
107
|
+
"500": {
|
|
108
|
+
"value": "#FFCD56"
|
|
109
|
+
},
|
|
110
|
+
"400": {
|
|
111
|
+
"value": "#FFD778"
|
|
112
|
+
},
|
|
113
|
+
"300": {
|
|
114
|
+
"value": "#FFE19A"
|
|
115
|
+
},
|
|
116
|
+
"200": {
|
|
117
|
+
"value": "#FFEBBB"
|
|
118
|
+
},
|
|
119
|
+
"100": {
|
|
120
|
+
"value": "#FFF0CC"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"Ink": {
|
|
124
|
+
"500": {
|
|
125
|
+
"value": "#0B0C0E"
|
|
126
|
+
},
|
|
127
|
+
"400": {
|
|
128
|
+
"value": "#121317"
|
|
129
|
+
},
|
|
130
|
+
"300": {
|
|
131
|
+
"value": "#16181D"
|
|
132
|
+
},
|
|
133
|
+
"200": {
|
|
134
|
+
"value": "#23262E"
|
|
135
|
+
},
|
|
136
|
+
"100": {
|
|
137
|
+
"value": "#2A2E37"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"Vanilla": {
|
|
141
|
+
"400": {
|
|
142
|
+
"value": "#C0C1C3"
|
|
143
|
+
},
|
|
144
|
+
"300": {
|
|
145
|
+
"value": "#E9E9E9"
|
|
146
|
+
},
|
|
147
|
+
"200": {
|
|
148
|
+
"value": "#F5F5F5"
|
|
149
|
+
},
|
|
150
|
+
"100": {
|
|
151
|
+
"value": "#FFFFFF"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"Slate": {
|
|
155
|
+
"500": {
|
|
156
|
+
"value": "#161922"
|
|
157
|
+
},
|
|
158
|
+
"400": {
|
|
159
|
+
"value": "#1D212D"
|
|
160
|
+
},
|
|
161
|
+
"300": {
|
|
162
|
+
"value": "#242834"
|
|
163
|
+
},
|
|
164
|
+
"200": {
|
|
165
|
+
"value": "#2C3140"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"Gradient": {
|
|
169
|
+
"Coral": {
|
|
170
|
+
"value": "linear-gradient(114deg, #ED6D68 14.99%, #FCA083 77.27%)"
|
|
171
|
+
},
|
|
172
|
+
"Dark-Shadow": {
|
|
173
|
+
"value": "linear-gradient(139deg, rgba(18, 19, 23, 0.80) 0%, rgba(18, 19, 23, 0.90) 98.68%)"
|
|
174
|
+
},
|
|
175
|
+
"Dawn": {
|
|
176
|
+
"value": "linear-gradient(99deg, #7A97FA 4.42%, #F977FF 96.6%)"
|
|
177
|
+
},
|
|
178
|
+
"Ocean": {
|
|
179
|
+
"value": "linear-gradient(99deg, #48F8CF 4.42%, #28CBF3 96.6%)"
|
|
180
|
+
},
|
|
181
|
+
"Splash": {
|
|
182
|
+
"value": "linear-gradient(99deg, #4568DC 4.42%, #324DAA 96.6%)"
|
|
183
|
+
},
|
|
184
|
+
"Flamingo": {
|
|
185
|
+
"value": "linear-gradient(92deg, #CA9CD0 1.36%, #D38972 68.48%, #A1B1E7 98.99%)"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"Forest": {
|
|
189
|
+
"600": {
|
|
190
|
+
"value": "#1EB475"
|
|
191
|
+
},
|
|
192
|
+
"500": {
|
|
193
|
+
"value": "#25E192"
|
|
194
|
+
},
|
|
195
|
+
"400": {
|
|
196
|
+
"value": "#51E7A8"
|
|
197
|
+
},
|
|
198
|
+
"300": {
|
|
199
|
+
"value": "#7CEDBE"
|
|
200
|
+
},
|
|
201
|
+
"200": {
|
|
202
|
+
"value": "#A8F3D3"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"text": {
|
|
207
|
+
"Robin": {
|
|
208
|
+
"600": {
|
|
209
|
+
"value": "#3F5ECC"
|
|
210
|
+
},
|
|
211
|
+
"500": {
|
|
212
|
+
"value": "#4E74F8"
|
|
213
|
+
},
|
|
214
|
+
"400": {
|
|
215
|
+
"value": "#7190F9"
|
|
216
|
+
},
|
|
217
|
+
"300": {
|
|
218
|
+
"value": "#95ACFB"
|
|
219
|
+
},
|
|
220
|
+
"200": {
|
|
221
|
+
"value": "#B8C7FC"
|
|
222
|
+
},
|
|
223
|
+
"100": {
|
|
224
|
+
"value": "#CAD5FD"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"Sienna": {
|
|
228
|
+
"600": {
|
|
229
|
+
"value": "#8A6646"
|
|
230
|
+
},
|
|
231
|
+
"500": {
|
|
232
|
+
"value": "#AD7F58"
|
|
233
|
+
},
|
|
234
|
+
"400": {
|
|
235
|
+
"value": "#BD9979"
|
|
236
|
+
},
|
|
237
|
+
"300": {
|
|
238
|
+
"value": "#CEB29B"
|
|
239
|
+
},
|
|
240
|
+
"200": {
|
|
241
|
+
"value": "#DECCBC"
|
|
242
|
+
},
|
|
243
|
+
"100": {
|
|
244
|
+
"value": "#E6D9CD"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"Cherry": {
|
|
248
|
+
"600": {
|
|
249
|
+
"value": "#B83A3E"
|
|
250
|
+
},
|
|
251
|
+
"500": {
|
|
252
|
+
"value": "#E5484D"
|
|
253
|
+
},
|
|
254
|
+
"400": {
|
|
255
|
+
"value": "#EA6D71"
|
|
256
|
+
},
|
|
257
|
+
"300": {
|
|
258
|
+
"value": "#F5B6B8"
|
|
259
|
+
},
|
|
260
|
+
"200": {
|
|
261
|
+
"value": "#F7C8CA"
|
|
262
|
+
},
|
|
263
|
+
"100": {
|
|
264
|
+
"value": "#FADADB"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"Aqua": {
|
|
268
|
+
"600": {
|
|
269
|
+
"value": "#07AFE6"
|
|
270
|
+
},
|
|
271
|
+
"500": {
|
|
272
|
+
"value": "#23C4F8"
|
|
273
|
+
},
|
|
274
|
+
"400": {
|
|
275
|
+
"value": "#4BCFF9"
|
|
276
|
+
},
|
|
277
|
+
"300": {
|
|
278
|
+
"value": "#72D9FB"
|
|
279
|
+
},
|
|
280
|
+
"200": {
|
|
281
|
+
"value": "#9AE4FC"
|
|
282
|
+
},
|
|
283
|
+
"100": {
|
|
284
|
+
"value": "#C1EEFD"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"Sakura": {
|
|
288
|
+
"600": {
|
|
289
|
+
"value": "#C53955"
|
|
290
|
+
},
|
|
291
|
+
"500": {
|
|
292
|
+
"value": "#F24769"
|
|
293
|
+
},
|
|
294
|
+
"400": {
|
|
295
|
+
"value": "#F56C87"
|
|
296
|
+
},
|
|
297
|
+
"300": {
|
|
298
|
+
"value": "#F791A5"
|
|
299
|
+
},
|
|
300
|
+
"200": {
|
|
301
|
+
"value": "#FAB5C3"
|
|
302
|
+
},
|
|
303
|
+
"100": {
|
|
304
|
+
"value": "#FBC8D2"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"Amber": {
|
|
308
|
+
"600": {
|
|
309
|
+
"value": "#D5AA45"
|
|
310
|
+
},
|
|
311
|
+
"500": {
|
|
312
|
+
"value": "#FFCD56"
|
|
313
|
+
},
|
|
314
|
+
"400": {
|
|
315
|
+
"value": "#FFD778"
|
|
316
|
+
},
|
|
317
|
+
"300": {
|
|
318
|
+
"value": "#FFE19A"
|
|
319
|
+
},
|
|
320
|
+
"200": {
|
|
321
|
+
"value": "#FFEBBB"
|
|
322
|
+
},
|
|
323
|
+
"100": {
|
|
324
|
+
"value": "#FFF0CC"
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"Ink": {
|
|
328
|
+
"500": {
|
|
329
|
+
"value": "#0B0C0E"
|
|
330
|
+
},
|
|
331
|
+
"400": {
|
|
332
|
+
"value": "#121317"
|
|
333
|
+
},
|
|
334
|
+
"300": {
|
|
335
|
+
"value": "#16181D"
|
|
336
|
+
},
|
|
337
|
+
"200": {
|
|
338
|
+
"value": "#23262E"
|
|
339
|
+
},
|
|
340
|
+
"100": {
|
|
341
|
+
"value": "#2A2E37"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
"Vanilla": {
|
|
345
|
+
"400": {
|
|
346
|
+
"value": "#C0C1C3"
|
|
347
|
+
},
|
|
348
|
+
"300": {
|
|
349
|
+
"value": "#E9E9E9"
|
|
350
|
+
},
|
|
351
|
+
"200": {
|
|
352
|
+
"value": "#F5F5F5"
|
|
353
|
+
},
|
|
354
|
+
"100": {
|
|
355
|
+
"value": "#FFFFFF"
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"Slate": {
|
|
359
|
+
"500": {
|
|
360
|
+
"value": "#161922"
|
|
361
|
+
},
|
|
362
|
+
"400": {
|
|
363
|
+
"value": "#1D212D"
|
|
364
|
+
},
|
|
365
|
+
"300": {
|
|
366
|
+
"value": "#242834"
|
|
367
|
+
},
|
|
368
|
+
"200": {
|
|
369
|
+
"value": "#2C3140"
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"Gradient": {
|
|
373
|
+
"Coral": {
|
|
374
|
+
"value": "linear-gradient(114deg, #ED6D68 14.99%, #FCA083 77.27%)"
|
|
375
|
+
},
|
|
376
|
+
"Dark-Shadow": {
|
|
377
|
+
"value": "linear-gradient(139deg, rgba(18, 19, 23, 0.80) 0%, rgba(18, 19, 23, 0.90) 98.68%)"
|
|
378
|
+
},
|
|
379
|
+
"Dawn": {
|
|
380
|
+
"value": "linear-gradient(99deg, #7A97FA 4.42%, #F977FF 96.6%)"
|
|
381
|
+
},
|
|
382
|
+
"Ocean": {
|
|
383
|
+
"value": "linear-gradient(99deg, #48F8CF 4.42%, #28CBF3 96.6%)"
|
|
384
|
+
},
|
|
385
|
+
"Splash": {
|
|
386
|
+
"value": "linear-gradient(99deg, #4568DC 4.42%, #324DAA 96.6%)"
|
|
387
|
+
},
|
|
388
|
+
"Flamingo": {
|
|
389
|
+
"value": "linear-gradient(92deg, #CA9CD0 1.36%, #D38972 68.48%, #A1B1E7 98.99%)"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"Forest": {
|
|
393
|
+
"600": {
|
|
394
|
+
"value": "#1EB475"
|
|
395
|
+
},
|
|
396
|
+
"500": {
|
|
397
|
+
"value": "#25E192"
|
|
398
|
+
},
|
|
399
|
+
"400": {
|
|
400
|
+
"value": "#51E7A8"
|
|
401
|
+
},
|
|
402
|
+
"300": {
|
|
403
|
+
"value": "#7CEDBE"
|
|
404
|
+
},
|
|
405
|
+
"200": {
|
|
406
|
+
"value": "#A8F3D3"
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
package/src/spacing.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"padding": {
|
|
3
|
+
"lg": {
|
|
4
|
+
"value": "24px"
|
|
5
|
+
},
|
|
6
|
+
"md": {
|
|
7
|
+
"value": "16px"
|
|
8
|
+
},
|
|
9
|
+
"sm": {
|
|
10
|
+
"value": "12px"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"margin": {
|
|
14
|
+
"lg": {
|
|
15
|
+
"value": "24px"
|
|
16
|
+
},
|
|
17
|
+
"md": {
|
|
18
|
+
"value": "16px"
|
|
19
|
+
},
|
|
20
|
+
"sm": {
|
|
21
|
+
"value": "12px"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|