@signozhq/design-tokens 0.0.10 → 1.0.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/README.md CHANGED
@@ -1,181 +1 @@
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).
1
+ # `design-tokens`
@@ -122,4 +122,5 @@ export declare const Color: {
122
122
  TEXT_FOREST_500: string;
123
123
  TEXT_FOREST_600: string;
124
124
  };
125
- export type Color = (typeof Color)[keyof typeof Color];
125
+ export type ColorKeys = keyof typeof Color;
126
+ //# sourceMappingURL=Color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Color.d.ts","sourceRoot":"","sources":["../src/Color.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgIjB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,KAAK,CAAC"}
@@ -36,4 +36,5 @@ export declare const Spacing: {
36
36
  MARGIN_56: string;
37
37
  MARGIN_64: string;
38
38
  };
39
- export type Spacing = (typeof Spacing)[keyof typeof Spacing];
39
+ export type SpacingKeys = keyof typeof Spacing;
40
+ //# sourceMappingURL=Spacing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spacing.d.ts","sourceRoot":"","sources":["../src/Spacing.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,OAAO,CAAC"}
@@ -21,4 +21,5 @@ export declare const Typography: {
21
21
  FONTWEIGHT_EXTRABOLD: string;
22
22
  FONTWEIGHT_BLACK: string;
23
23
  };
24
- export type Typography = (typeof Typography)[keyof typeof Typography];
24
+ export type TypographyKeys = keyof typeof Typography;
25
+ //# sourceMappingURL=Typography.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../src/Typography.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;CAsBtB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,UAAU,CAAC"}
@@ -1,5 +1,4 @@
1
- import "./index.css";
2
- const C = {
1
+ const F = {
3
2
  BG_ROBIN_100: "#CAD5FD",
4
3
  BG_ROBIN_200: "#B8C7FC",
5
4
  BG_ROBIN_300: "#95ACFB",
@@ -122,7 +121,7 @@ const C = {
122
121
  TEXT_FOREST_400: "#51E7A8",
123
122
  TEXT_FOREST_500: "#25E192",
124
123
  TEXT_FOREST_600: "#1EB475"
125
- }, X = {
124
+ }, B = {
126
125
  PADDING_1: "0.25rem",
127
126
  PADDING_2: "0.5rem",
128
127
  PADDING_3: "0.75rem",
@@ -159,7 +158,7 @@ const C = {
159
158
  MARGIN_48: "12rem",
160
159
  MARGIN_56: "14rem",
161
160
  MARGIN_64: "16rem"
162
- }, S = {
161
+ }, N = {
163
162
  FONTSIZE_XS: "0.75rem",
164
163
  FONTSIZE_SM: "0.875rem",
165
164
  FONTSIZE_LG: "1.125rem",
@@ -181,42 +180,21 @@ const C = {
181
180
  FONTWEIGHT_BOLD: "700",
182
181
  FONTWEIGHT_EXTRABOLD: "800",
183
182
  FONTWEIGHT_BLACK: "900"
184
- }, I = "_main_1taid_5", F = {
185
- main: I
186
- }, G = ["color"];
187
- function D(A) {
188
- return A && typeof A == "object" && A.constructor === Object;
189
- }
190
- function t(A, ...T) {
191
- const _ = new Set(T);
192
- return _.add(F.main), _.add(A.className || ""), Object.keys(A).forEach((E) => {
193
- if (!G.includes(E))
194
- return;
195
- _.add(F[E]);
196
- const B = A[E];
197
- Array.isArray(B) ? B.forEach((N) => _.add(F[`${E}-${N}`])) : D(B) ? Object.entries(B).forEach(([N, e]) => {
198
- _.add(F[`${E}-${N}`]), _.add(F[`${E}-${N}-${e}`]);
199
- }) : _.add(F[`${E}-${B}`]);
200
- }), Array.from(_).filter((E) => !!E).join(" ");
201
- }
202
- function R(A, T) {
203
- const _ = {};
204
- return A.width && (_.width = A.width), A.height && (_.height = A.height), _.width || _.height ? Object.assign(T || {}, _) : T;
205
- }
206
- function i(A, ...T) {
207
- return Object.keys(A).filter(
208
- (_) => A[_] !== void 0 && !G.includes(_) && !T.includes(_)
209
- ).reduce(
210
- (_, E) => (_[E] = A[E], _),
211
- {
212
- style: R(A, A.style)
213
- }
214
- );
183
+ };
184
+ function D() {
185
+ const _ = (A) => Object.entries(A).map(([E, T]) => `${`--${E.toLowerCase().replace(/_/g, "-")}`}: ${T};`);
186
+ return `:root {
187
+ ${[
188
+ ..._(F),
189
+ ..._(N),
190
+ ..._(B)
191
+ ].join(`
192
+ `)}
193
+ }`;
215
194
  }
216
195
  export {
217
- C as Color,
218
- X as Spacing,
219
- S as Typography,
220
- i as omitStyledProps,
221
- t as styledClasses
196
+ F as Color,
197
+ B as Spacing,
198
+ N as Typography,
199
+ D as generateCSSVariables
222
200
  };
@@ -0,0 +1,4 @@
1
+ (function(_,A){typeof exports=="object"&&typeof module<"u"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(_=typeof globalThis<"u"?globalThis:_||self,A(_.designTokens={}))})(this,function(_){"use strict";const A={BG_ROBIN_100:"#CAD5FD",BG_ROBIN_200:"#B8C7FC",BG_ROBIN_300:"#95ACFB",BG_ROBIN_400:"#7190F9",BG_ROBIN_500:"#4E74F8",BG_ROBIN_600:"#3F5ECC",BG_SIENNA_100:"#E6D9CD",BG_SIENNA_200:"#DECCBC",BG_SIENNA_300:"#CEB29B",BG_SIENNA_400:"#BD9979",BG_SIENNA_500:"#AD7F58",BG_SIENNA_600:"#8A6646",BG_CHERRY_100:"#FADADB",BG_CHERRY_200:"#F7C8CA",BG_CHERRY_300:"#F5B6B8",BG_CHERRY_400:"#EA6D71",BG_CHERRY_500:"#E5484D",BG_CHERRY_600:"#B83A3E",BG_AQUA_100:"#C1EEFD",BG_AQUA_200:"#9AE4FC",BG_AQUA_300:"#72D9FB",BG_AQUA_400:"#4BCFF9",BG_AQUA_500:"#23C4F8",BG_AQUA_600:"#07AFE6",BG_SAKURA_100:"#FBC8D2",BG_SAKURA_200:"#FAB5C3",BG_SAKURA_300:"#F791A5",BG_SAKURA_400:"#F56C87",BG_SAKURA_500:"#F24769",BG_SAKURA_600:"#C53955",BG_AMBER_100:"#FFF0CC",BG_AMBER_200:"#FFEBBB",BG_AMBER_300:"#FFE19A",BG_AMBER_400:"#FFD778",BG_AMBER_500:"#FFCD56",BG_AMBER_600:"#D5AA45",BG_INK_100:"#2A2E37",BG_INK_200:"#23262E",BG_INK_300:"#16181D",BG_INK_400:"#121317",BG_INK_500:"#0B0C0E",BG_VANILLA_100:"#FFFFFF",BG_VANILLA_200:"#F5F5F5",BG_VANILLA_300:"#E9E9E9",BG_VANILLA_400:"#C0C1C3",BG_SLATE_50:"#62687C",BG_SLATE_100:"#3C4152",BG_SLATE_200:"#2C3140",BG_SLATE_300:"#242834",BG_SLATE_400:"#1D212D",BG_SLATE_500:"#161922",BG_GRADIENT_CORAL:"linear-gradient(114deg, #ED6D68 14.99%, #FCA083 77.27%)","BG_GRADIENT_DARK-SHADOW":"linear-gradient(139deg, rgba(18, 19, 23, 0.80) 0%, rgba(18, 19, 23, 0.90) 98.68%)",BG_GRADIENT_DAWN:"linear-gradient(99deg, #7A97FA 4.42%, #F977FF 96.6%)",BG_GRADIENT_OCEAN:"linear-gradient(99deg, #48F8CF 4.42%, #28CBF3 96.6%)",BG_GRADIENT_SPLASH:"linear-gradient(99deg, #4568DC 4.42%, #324DAA 96.6%)",BG_GRADIENT_FLAMINGO:"linear-gradient(92deg, #CA9CD0 1.36%, #D38972 68.48%, #A1B1E7 98.99%)",BG_FOREST_200:"#A8F3D3",BG_FOREST_300:"#7CEDBE",BG_FOREST_400:"#51E7A8",BG_FOREST_500:"#25E192",BG_FOREST_600:"#1EB475",TEXT_ROBIN_100:"#CAD5FD",TEXT_ROBIN_200:"#B8C7FC",TEXT_ROBIN_300:"#95ACFB",TEXT_ROBIN_400:"#7190F9",TEXT_ROBIN_500:"#4E74F8",TEXT_ROBIN_600:"#3F5ECC",TEXT_SIENNA_100:"#E6D9CD",TEXT_SIENNA_200:"#DECCBC",TEXT_SIENNA_300:"#CEB29B",TEXT_SIENNA_400:"#BD9979",TEXT_SIENNA_500:"#AD7F58",TEXT_SIENNA_600:"#8A6646",TEXT_CHERRY_100:"#FADADB",TEXT_CHERRY_200:"#F7C8CA",TEXT_CHERRY_300:"#F5B6B8",TEXT_CHERRY_400:"#EA6D71",TEXT_CHERRY_500:"#E5484D",TEXT_CHERRY_600:"#B83A3E",TEXT_AQUA_100:"#C1EEFD",TEXT_AQUA_200:"#9AE4FC",TEXT_AQUA_300:"#72D9FB",TEXT_AQUA_400:"#4BCFF9",TEXT_AQUA_500:"#23C4F8",TEXT_AQUA_600:"#07AFE6",TEXT_SAKURA_100:"#FBC8D2",TEXT_SAKURA_200:"#FAB5C3",TEXT_SAKURA_300:"#F791A5",TEXT_SAKURA_400:"#F56C87",TEXT_SAKURA_500:"#F24769",TEXT_SAKURA_600:"#C53955",TEXT_AMBER_100:"#FFF0CC",TEXT_AMBER_200:"#FFEBBB",TEXT_AMBER_300:"#FFE19A",TEXT_AMBER_400:"#FFD778",TEXT_AMBER_500:"#FFCD56",TEXT_AMBER_600:"#D5AA45",TEXT_INK_100:"#2A2E37",TEXT_INK_200:"#23262E",TEXT_INK_300:"#16181D",TEXT_INK_400:"#121317",TEXT_INK_500:"#0B0C0E",TEXT_VANILLA_100:"#FFFFFF",TEXT_VANILLA_200:"#F5F5F5",TEXT_VANILLA_300:"#E9E9E9",TEXT_VANILLA_400:"#C0C1C3",TEXT_SLATE_200:"#2C3140",TEXT_SLATE_300:"#242834",TEXT_SLATE_400:"#1D212D",TEXT_SLATE_500:"#161922",TEXT_GRADIENT_CORAL:"linear-gradient(114deg, #ED6D68 14.99%, #FCA083 77.27%)","TEXT_GRADIENT_DARK-SHADOW":"linear-gradient(139deg, rgba(18, 19, 23, 0.80) 0%, rgba(18, 19, 23, 0.90) 98.68%)",TEXT_GRADIENT_DAWN:"linear-gradient(99deg, #7A97FA 4.42%, #F977FF 96.6%)",TEXT_GRADIENT_OCEAN:"linear-gradient(99deg, #48F8CF 4.42%, #28CBF3 96.6%)",TEXT_GRADIENT_SPLASH:"linear-gradient(99deg, #4568DC 4.42%, #324DAA 96.6%)",TEXT_GRADIENT_FLAMINGO:"linear-gradient(92deg, #CA9CD0 1.36%, #D38972 68.48%, #A1B1E7 98.99%)",TEXT_FOREST_200:"#A8F3D3",TEXT_FOREST_300:"#7CEDBE",TEXT_FOREST_400:"#51E7A8",TEXT_FOREST_500:"#25E192",TEXT_FOREST_600:"#1EB475"},T={PADDING_1:"0.25rem",PADDING_2:"0.5rem",PADDING_3:"0.75rem",PADDING_4:"1rem",PADDING_5:"1.25rem",PADDING_6:"1.5rem",PADDING_7:"1.75rem",PADDING_8:"2rem",PADDING_10:"2.5rem",PADDING_12:"3rem",PADDING_16:"4rem",PADDING_20:"5rem",PADDING_24:"6rem",PADDING_32:"8rem",PADDING_40:"10rem",PADDING_48:"12rem",PADDING_56:"14rem",PADDING_64:"16rem",MARGIN_1:"0.25rem",MARGIN_2:"0.5rem",MARGIN_3:"0.75rem",MARGIN_4:"1rem",MARGIN_5:"1.25rem",MARGIN_6:"1.5rem",MARGIN_7:"1.75rem",MARGIN_8:"2rem",MARGIN_10:"2.5rem",MARGIN_12:"3rem",MARGIN_16:"4rem",MARGIN_20:"5rem",MARGIN_24:"6rem",MARGIN_32:"8rem",MARGIN_40:"10rem",MARGIN_48:"12rem",MARGIN_56:"14rem",MARGIN_64:"16rem"},F={FONTSIZE_XS:"0.75rem",FONTSIZE_SM:"0.875rem",FONTSIZE_LG:"1.125rem",FONTSIZE_XL:"1.25rem",FONTSIZE_2XL:"1.5rem",FONTSIZE_3XL:"1.875rem",FONTSIZE_4XL:"2.25rem",FONTSIZE_5XL:"3rem",FONTSIZE_6XL:"3.75rem",FONTSIZE_7XL:"4.5rem",FONTSIZE_8XL:"6rem",FONTSIZE_9XL:"8rem",FONTWEIGHT_THIN:"100",FONTWEIGHT_EXTRALIGHT:"200",FONTWEIGHT_LIGHT:"300",FONTWEIGHT_NORMAL:"400",FONTWEIGHT_MEDIUM:"500",FONTWEIGHT_SEMIBOLD:"600",FONTWEIGHT_BOLD:"700",FONTWEIGHT_EXTRABOLD:"800",FONTWEIGHT_BLACK:"900"};function B(){const E=N=>Object.entries(N).map(([e,G])=>`${`--${e.toLowerCase().replace(/_/g,"-")}`}: ${G};`);return`:root {
2
+ ${[...E(A),...E(F),...E(T)].join(`
3
+ `)}
4
+ }`}_.Color=A,_.Spacing=T,_.Typography=F,_.generateCSSVariables=B,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
package/dist/index.d.ts CHANGED
@@ -1,4 +1,7 @@
1
- export * from './Colors/Colors';
2
- export * from './Spacing/Spacing';
3
- export * from './Typography/Typography';
4
- export * from './utils';
1
+ import { Color } from './Color';
2
+ import { Spacing } from './Spacing';
3
+ import { Typography } from './Typography';
4
+
5
+ export { Color, Spacing, Typography };
6
+ export declare function generateCSSVariables(): string;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtC,wBAAgB,oBAAoB,IAAI,MAAM,CAc7C"}
package/package.json CHANGED
@@ -1,34 +1,28 @@
1
1
  {
2
2
  "name": "@signozhq/design-tokens",
3
- "version": "0.0.10",
4
- "module": "./dist/design-tokens.js",
5
- "private": false,
3
+ "version": "1.0.0",
6
4
  "type": "module",
7
- "publishConfig": {
8
- "access": "public"
9
- },
10
- "exports": {
11
- ".": "./dist/design-tokens.js",
12
- "./dist/style.css": "./dist/index.css"
13
- },
5
+ "main": "./dist/design-tokens.js",
6
+ "module": "./dist/design-tokens.js",
14
7
  "types": "./dist/index.d.ts",
15
- "scripts": {
16
- "build": "vite build",
17
- "build-style-dictionary": "style-dictionary build",
18
- "generate-tokens": "node ./scripts/generate-types-from-json.mjs"
19
- },
20
8
  "files": [
21
9
  "dist"
22
10
  ],
23
- "author": "",
24
- "license": "ISC",
25
- "dependencies": {
26
- "style-dictionary": "3.8.0",
27
- "vite-plugin-dts": "^3.6.4"
28
- },
29
- "gitHead": "dd9c59b3fa68b5b363aa74e56de9445a0f1433ca",
30
11
  "devDependencies": {
31
- "vite": "^5.0.8",
32
- "vite-plugin-lib-inject-css": "^1.3.0"
12
+ "@changesets/cli": "^2.27.8",
13
+ "@types/node": "^22.5.5",
14
+ "typescript": "^5.3.3",
15
+ "vite": "^5.0.0",
16
+ "vite-plugin-dts": "^3.0.0"
17
+ },
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "scripts": {
22
+ "build": "vite build",
23
+ "dev": "vite build --watch",
24
+ "clean": "rm -rf dist node_modules",
25
+ "update-version": "changeset && changeset version",
26
+ "release": "pnpm build && changeset publish"
33
27
  }
34
- }
28
+ }
package/dist/index.css DELETED
@@ -1 +0,0 @@
1
- :root{--bg-robin-100: #CAD5FD;--bg-robin-200: #B8C7FC;--bg-robin-300: #95ACFB;--bg-robin-400: #7190F9;--bg-robin-500: #4E74F8;--bg-robin-600: #3F5ECC;--bg-sienna-100: #E6D9CD;--bg-sienna-200: #DECCBC;--bg-sienna-300: #CEB29B;--bg-sienna-400: #BD9979;--bg-sienna-500: #AD7F58;--bg-sienna-600: #8A6646;--bg-cherry-100: #FADADB;--bg-cherry-200: #F7C8CA;--bg-cherry-300: #F5B6B8;--bg-cherry-400: #EA6D71;--bg-cherry-500: #E5484D;--bg-cherry-600: #B83A3E;--bg-aqua-100: #C1EEFD;--bg-aqua-200: #9AE4FC;--bg-aqua-300: #72D9FB;--bg-aqua-400: #4BCFF9;--bg-aqua-500: #23C4F8;--bg-aqua-600: #07AFE6;--bg-sakura-100: #FBC8D2;--bg-sakura-200: #FAB5C3;--bg-sakura-300: #F791A5;--bg-sakura-400: #F56C87;--bg-sakura-500: #F24769;--bg-sakura-600: #C53955;--bg-amber-100: #FFF0CC;--bg-amber-200: #FFEBBB;--bg-amber-300: #FFE19A;--bg-amber-400: #FFD778;--bg-amber-500: #FFCD56;--bg-amber-600: #D5AA45;--bg-ink-100: #2A2E37;--bg-ink-200: #23262E;--bg-ink-300: #16181D;--bg-ink-400: #121317;--bg-ink-500: #0B0C0E;--bg-vanilla-100: #FFFFFF;--bg-vanilla-200: #F5F5F5;--bg-vanilla-300: #E9E9E9;--bg-vanilla-400: #C0C1C3;--bg-slate-50: #62687C;--bg-slate-100: #3C4152;--bg-slate-200: #2C3140;--bg-slate-300: #242834;--bg-slate-400: #1D212D;--bg-slate-500: #161922;--bg-gradient-coral: linear-gradient(114deg, #ED6D68 14.99%, #FCA083 77.27%);--bg-gradient-dark-shadow: linear-gradient(139deg, rgba(18, 19, 23, .8) 0%, rgba(18, 19, 23, .9) 98.68%);--bg-gradient-dawn: linear-gradient(99deg, #7A97FA 4.42%, #F977FF 96.6%);--bg-gradient-ocean: linear-gradient(99deg, #48F8CF 4.42%, #28CBF3 96.6%);--bg-gradient-splash: linear-gradient(99deg, #4568DC 4.42%, #324DAA 96.6%);--bg-gradient-flamingo: linear-gradient(92deg, #CA9CD0 1.36%, #D38972 68.48%, #A1B1E7 98.99%);--bg-forest-200: #A8F3D3;--bg-forest-300: #7CEDBE;--bg-forest-400: #51E7A8;--bg-forest-500: #25E192;--bg-forest-600: #1EB475;--text-robin-100: #CAD5FD;--text-robin-200: #B8C7FC;--text-robin-300: #95ACFB;--text-robin-400: #7190F9;--text-robin-500: #4E74F8;--text-robin-600: #3F5ECC;--text-sienna-100: #E6D9CD;--text-sienna-200: #DECCBC;--text-sienna-300: #CEB29B;--text-sienna-400: #BD9979;--text-sienna-500: #AD7F58;--text-sienna-600: #8A6646;--text-cherry-100: #FADADB;--text-cherry-200: #F7C8CA;--text-cherry-300: #F5B6B8;--text-cherry-400: #EA6D71;--text-cherry-500: #E5484D;--text-cherry-600: #B83A3E;--text-aqua-100: #C1EEFD;--text-aqua-200: #9AE4FC;--text-aqua-300: #72D9FB;--text-aqua-400: #4BCFF9;--text-aqua-500: #23C4F8;--text-aqua-600: #07AFE6;--text-sakura-100: #FBC8D2;--text-sakura-200: #FAB5C3;--text-sakura-300: #F791A5;--text-sakura-400: #F56C87;--text-sakura-500: #F24769;--text-sakura-600: #C53955;--text-amber-100: #FFF0CC;--text-amber-200: #FFEBBB;--text-amber-300: #FFE19A;--text-amber-400: #FFD778;--text-amber-500: #FFCD56;--text-amber-600: #D5AA45;--text-ink-100: #2A2E37;--text-ink-200: #23262E;--text-ink-300: #16181D;--text-ink-400: #121317;--text-ink-500: #0B0C0E;--text-vanilla-100: #FFFFFF;--text-vanilla-200: #F5F5F5;--text-vanilla-300: #E9E9E9;--text-vanilla-400: #C0C1C3;--text-slate-200: #2C3140;--text-slate-300: #242834;--text-slate-400: #1D212D;--text-slate-500: #161922;--text-gradient-coral: linear-gradient(114deg, #ED6D68 14.99%, #FCA083 77.27%);--text-gradient-dark-shadow: linear-gradient(139deg, rgba(18, 19, 23, .8) 0%, rgba(18, 19, 23, .9) 98.68%);--text-gradient-dawn: linear-gradient(99deg, #7A97FA 4.42%, #F977FF 96.6%);--text-gradient-ocean: linear-gradient(99deg, #48F8CF 4.42%, #28CBF3 96.6%);--text-gradient-splash: linear-gradient(99deg, #4568DC 4.42%, #324DAA 96.6%);--text-gradient-flamingo: linear-gradient(92deg, #CA9CD0 1.36%, #D38972 68.48%, #A1B1E7 98.99%);--text-forest-200: #A8F3D3;--text-forest-300: #7CEDBE;--text-forest-400: #51E7A8;--text-forest-500: #25E192;--text-forest-600: #1EB475}:root{--padding-1: .25rem;--padding-2: .5rem;--padding-3: .75rem;--padding-4: 1rem;--padding-5: 1.25rem;--padding-6: 1.5rem;--padding-7: 1.75rem;--padding-8: 2rem;--padding-10: 2.5rem;--padding-12: 3rem;--padding-16: 4rem;--padding-20: 5rem;--padding-24: 6rem;--padding-32: 8rem;--padding-40: 10rem;--padding-48: 12rem;--padding-56: 14rem;--padding-64: 16rem;--margin-1: .25rem;--margin-2: .5rem;--margin-3: .75rem;--margin-4: 1rem;--margin-5: 1.25rem;--margin-6: 1.5rem;--margin-7: 1.75rem;--margin-8: 2rem;--margin-10: 2.5rem;--margin-12: 3rem;--margin-16: 4rem;--margin-20: 5rem;--margin-24: 6rem;--margin-32: 8rem;--margin-40: 10rem;--margin-48: 12rem;--margin-56: 14rem;--margin-64: 16rem}:root{--font-size-xs: .75rem;--font-size-sm: .875rem;--font-size-lg: 1.125rem;--font-size-xl: 1.25rem;--font-size-2xl: 1.5rem;--font-size-3xl: 1.875rem;--font-size-4xl: 2.25rem;--font-size-5xl: 3rem;--font-size-6xl: 3.75rem;--font-size-7xl: 4.5rem;--font-size-8xl: 6rem;--font-size-9xl: 8rem;--font-weight-thin: 100;--font-weight-extralight: 200;--font-weight-light: 300;--font-weight-normal: 400;--font-weight-medium: 500;--font-weight-semibold: 600;--font-weight-bold: 700;--font-weight-extrabold: 800;--font-weight-black: 900}._main_1taid_5{border:0;margin:0;color:#fff}
package/dist/utils.d.ts DELETED
@@ -1,15 +0,0 @@
1
- import { Color } from './Colors/Colors';
2
-
3
- export interface KVO<T = any> {
4
- [key: string]: T;
5
- }
6
- export interface StyledProps {
7
- /** Text Color */
8
- color: Color;
9
- /** Optional class name */
10
- className?: string;
11
- }
12
- /** Generate classes from styled props */
13
- export declare function styledClasses(props: StyledProps, ...classes: string[]): string;
14
- /** Return all props that are not styled props */
15
- export declare function omitStyledProps(props: KVO, ...ignoredProps: string[]): KVO;