@uniai-fe/uds-foundation 0.0.1
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 +72 -0
- package/dist/data/color.d.ts +10 -0
- package/dist/data/color.js +308 -0
- package/dist/data/layout.d.ts +37 -0
- package/dist/data/layout.js +59 -0
- package/dist/data/spacing.d.ts +6 -0
- package/dist/data/spacing.js +34 -0
- package/dist/data/tokens.d.ts +5 -0
- package/dist/data/tokens.js +23 -0
- package/dist/data/typography.d.ts +5 -0
- package/dist/data/typography.js +123 -0
- package/dist/fonts/inter/InterVariable.woff2 +0 -0
- package/dist/fonts/pretendard-jp/PretendardJPVariable.woff2 +0 -0
- package/dist/helpers/index.d.ts +28 -0
- package/dist/helpers/index.js +70 -0
- package/dist/index.css +773 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/types/theme-tokens.d.ts +36 -0
- package/dist/types/theme-tokens.js +0 -0
- package/dist/typography/fonts/index.d.ts +3 -0
- package/dist/typography/fonts/index.js +3 -0
- package/dist/typography/fonts/inter.d.ts +6 -0
- package/dist/typography/fonts/inter.js +34 -0
- package/dist/typography/fonts/pretendard.d.ts +6 -0
- package/dist/typography/fonts/pretendard.js +36 -0
- package/dist/typography/fonts/types.d.ts +30 -0
- package/dist/typography/fonts/types.js +16 -0
- package/package.json +102 -0
package/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# @uniai-fe/uds-foundation
|
|
2
|
+
|
|
3
|
+
UNIAI 서비스 전반에서 공유하는 디자인 토큰과 폰트 자산을 CSS 변수 형태로 제공하는 패키지입니다. 색상·여백·레이아웃·타이포그래피·폰트 정의를 모두 포함하며, 다른 패키지(`@uniai-fe/uds-primitives`, `@uniai-fe/uds-templates`)의 기초가 됩니다.
|
|
4
|
+
|
|
5
|
+
## 설치
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @uniai-fe/uds-foundation
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 사용법 요약
|
|
12
|
+
|
|
13
|
+
### 1) CSS 변수 주입
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import "@uniai-fe/uds-foundation";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
CSS 파일만 직접 사용하려면:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import "@uniai-fe/uds-foundation/css";
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```css
|
|
26
|
+
.button-primary {
|
|
27
|
+
color: var(--color-primary-default);
|
|
28
|
+
padding: var(--spacing-padding-6);
|
|
29
|
+
border-radius: var(--theme-radius-medium-1);
|
|
30
|
+
font: var(--font-body-medium-weight) var(--font-body-medium-size) /
|
|
31
|
+
var(--font-body-medium-line-height) var(--theme-font-family-pretendard);
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 2) 토큰 데이터(JSON)
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import { themeTokens } from "@uniai-fe/uds-foundation/data/tokens";
|
|
39
|
+
|
|
40
|
+
console.log(themeTokens.color.primitive.blue_55);
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 3) 타입스크립트 헬퍼
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
import {
|
|
47
|
+
colorPrimitiveVar,
|
|
48
|
+
spacingPaddingPx,
|
|
49
|
+
} from "@uniai-fe/uds-foundation/helpers";
|
|
50
|
+
|
|
51
|
+
const primaryBg = colorPrimitiveVar("blue_55");
|
|
52
|
+
const mediumGap = spacingPaddingPx("padding_6");
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 4) Next.js `localFont`
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import localFont from "next/font/local";
|
|
59
|
+
import {
|
|
60
|
+
pretendardLocalFont,
|
|
61
|
+
interLocalFont,
|
|
62
|
+
} from "@uniai-fe/uds-foundation/typography/fonts";
|
|
63
|
+
|
|
64
|
+
export const pretendard = localFont(pretendardLocalFont);
|
|
65
|
+
export const inter = localFont(interLocalFont);
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 5) 패키지 스크립트
|
|
69
|
+
|
|
70
|
+
- `pnpm build`: 타입 검사 + CSS/폰트 산출
|
|
71
|
+
- `pnpm dev`: watch 모드
|
|
72
|
+
- `pnpm tokens:doc`: 토큰 스냅샷 생성
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ThemeColorPrimitive, ThemeColorSemanticSection } from '../types/theme-tokens.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* /_context/** 추출본을 참고해 수동으로 동기화한 컬러 토큰이다.
|
|
5
|
+
* SCSS 값과 어긋나면 이 객체를 함께 수정해 문서/검증에 활용한다.
|
|
6
|
+
*/
|
|
7
|
+
declare const color_primitive: ThemeColorPrimitive;
|
|
8
|
+
declare const color_semantic: ThemeColorSemanticSection;
|
|
9
|
+
|
|
10
|
+
export { color_primitive, color_semantic };
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
const color_common = {
|
|
2
|
+
common_100: "#fff",
|
|
3
|
+
common_0: "#000"
|
|
4
|
+
};
|
|
5
|
+
const color_neutral = {
|
|
6
|
+
neutral_10: "#1a1a1a",
|
|
7
|
+
neutral_20: "#333333",
|
|
8
|
+
neutral_30: "#4d4d4d",
|
|
9
|
+
neutral_40: "#666666",
|
|
10
|
+
neutral_45: "#737373",
|
|
11
|
+
neutral_50: "#808080",
|
|
12
|
+
neutral_55: "#8c8c8c",
|
|
13
|
+
neutral_60: "#999999",
|
|
14
|
+
neutral_70: "#b3b3b3",
|
|
15
|
+
neutral_80: "#cccccc",
|
|
16
|
+
neutral_90: "#e6e6e6",
|
|
17
|
+
neutral_95: "#f2f2f2",
|
|
18
|
+
neutral_99: "#fcfcfc"
|
|
19
|
+
};
|
|
20
|
+
const color_cool_gray = {
|
|
21
|
+
cool_gray_10: "#18191b",
|
|
22
|
+
cool_gray_20: "#313235",
|
|
23
|
+
cool_gray_25: "#3d3f43",
|
|
24
|
+
cool_gray_30: "#494b50",
|
|
25
|
+
cool_gray_35: "#55585e",
|
|
26
|
+
cool_gray_40: "#61656b",
|
|
27
|
+
cool_gray_45: "#6d7178",
|
|
28
|
+
cool_gray_50: "#797e86",
|
|
29
|
+
cool_gray_55: "#878b92",
|
|
30
|
+
cool_gray_60: "#94989e",
|
|
31
|
+
cool_gray_65: "#a1a5aa",
|
|
32
|
+
cool_gray_70: "#afb1b6",
|
|
33
|
+
cool_gray_75: "#bcbec2",
|
|
34
|
+
cool_gray_80: "#cacbce",
|
|
35
|
+
cool_gray_85: "#d7d8db",
|
|
36
|
+
cool_gray_90: "#e4e5e7",
|
|
37
|
+
cool_gray_95: "#f2f2f3",
|
|
38
|
+
cool_gray_99: "#fcfcfd"
|
|
39
|
+
};
|
|
40
|
+
const color_blue = {
|
|
41
|
+
blue_10: "#001233",
|
|
42
|
+
blue_20: "#002466",
|
|
43
|
+
blue_30: "#003699",
|
|
44
|
+
blue_40: "#0047cc",
|
|
45
|
+
blue_45: "#0050e5",
|
|
46
|
+
blue_50: "#0059ff",
|
|
47
|
+
blue_55: "#1a6aff",
|
|
48
|
+
blue_60: "#337aff",
|
|
49
|
+
blue_70: "#669cff",
|
|
50
|
+
blue_80: "#99bdff",
|
|
51
|
+
blue_90: "#ccdeff",
|
|
52
|
+
blue_95: "#e5eeff",
|
|
53
|
+
blue_99: "#fafcff"
|
|
54
|
+
};
|
|
55
|
+
const color_purple = {
|
|
56
|
+
purple_10: "#120033",
|
|
57
|
+
purple_20: "#240066",
|
|
58
|
+
purple_30: "#360099",
|
|
59
|
+
purple_40: "#4800cc",
|
|
60
|
+
purple_45: "#5200e5",
|
|
61
|
+
purple_50: "#5b00ff",
|
|
62
|
+
purple_55: "#6c1bff",
|
|
63
|
+
purple_60: "#7b33ff",
|
|
64
|
+
purple_70: "#9c66ff",
|
|
65
|
+
purple_80: "#bd99ff",
|
|
66
|
+
purple_90: "#deccff",
|
|
67
|
+
purple_95: "#efe5ff",
|
|
68
|
+
purple_99: "#fcfaff"
|
|
69
|
+
};
|
|
70
|
+
const color_magenta = {
|
|
71
|
+
magenta_10: "#32012e",
|
|
72
|
+
magenta_20: "#64025b",
|
|
73
|
+
magenta_30: "#950489",
|
|
74
|
+
magenta_40: "#c705b6",
|
|
75
|
+
magenta_45: "#e005cd",
|
|
76
|
+
magenta_50: "#f906e4",
|
|
77
|
+
magenta_55: "#fa1fe7",
|
|
78
|
+
magenta_60: "#fa38e9",
|
|
79
|
+
magenta_70: "#fb6aef",
|
|
80
|
+
magenta_80: "#fd9bf4",
|
|
81
|
+
magenta_90: "#fecdfa",
|
|
82
|
+
magenta_95: "#fee6fc",
|
|
83
|
+
magenta_99: "#fffafe"
|
|
84
|
+
};
|
|
85
|
+
const color_pink = {
|
|
86
|
+
pink_10: "#320116",
|
|
87
|
+
pink_20: "#63032b",
|
|
88
|
+
pink_30: "#950441",
|
|
89
|
+
pink_40: "#c70556",
|
|
90
|
+
pink_45: "#e00661",
|
|
91
|
+
pink_50: "#f8076c",
|
|
92
|
+
pink_55: "#f91f7a",
|
|
93
|
+
pink_60: "#fa3889",
|
|
94
|
+
pink_70: "#fb6aa7",
|
|
95
|
+
pink_80: "#fc9cc4",
|
|
96
|
+
pink_90: "#fecde2",
|
|
97
|
+
pink_95: "#fee6f0",
|
|
98
|
+
pink_99: "#fffafc"
|
|
99
|
+
};
|
|
100
|
+
const color_red = {
|
|
101
|
+
red_10: "#310602",
|
|
102
|
+
red_20: "#610d05",
|
|
103
|
+
red_30: "#921307",
|
|
104
|
+
red_40: "#c21a0a",
|
|
105
|
+
red_45: "#da1d0b",
|
|
106
|
+
red_50: "#f2200d",
|
|
107
|
+
red_55: "#f43625",
|
|
108
|
+
red_60: "#f54d3d",
|
|
109
|
+
red_70: "#f7796e",
|
|
110
|
+
red_80: "#faa69e",
|
|
111
|
+
red_90: "#fcd2cf",
|
|
112
|
+
red_95: "#fde8e7",
|
|
113
|
+
red_99: "#fffafa"
|
|
114
|
+
};
|
|
115
|
+
const color_orange = {
|
|
116
|
+
orange_10: "#331100",
|
|
117
|
+
orange_20: "#662200",
|
|
118
|
+
orange_30: "#993300",
|
|
119
|
+
orange_40: "#cc4400",
|
|
120
|
+
orange_45: "#e54d00",
|
|
121
|
+
orange_50: "#ff5500",
|
|
122
|
+
orange_55: "#ff661a",
|
|
123
|
+
orange_60: "#ff7733",
|
|
124
|
+
orange_70: "#ff9966",
|
|
125
|
+
orange_80: "#ffbb99",
|
|
126
|
+
orange_90: "#ffddcc",
|
|
127
|
+
orange_95: "#ffeee5",
|
|
128
|
+
orange_99: "#fffcfa"
|
|
129
|
+
};
|
|
130
|
+
const color_yellow = {
|
|
131
|
+
yellow_10: "#302903",
|
|
132
|
+
yellow_20: "#615205",
|
|
133
|
+
yellow_30: "#917a08",
|
|
134
|
+
yellow_40: "#c2a30a",
|
|
135
|
+
yellow_45: "#dab80b",
|
|
136
|
+
yellow_50: "#f2cc0d",
|
|
137
|
+
yellow_55: "#f4d125",
|
|
138
|
+
yellow_60: "#f5d63d",
|
|
139
|
+
yellow_70: "#f7e06e",
|
|
140
|
+
yellow_80: "#faeb9e",
|
|
141
|
+
yellow_90: "#fcf5cf",
|
|
142
|
+
yellow_95: "#fefae7",
|
|
143
|
+
yellow_99: "#fffefa"
|
|
144
|
+
};
|
|
145
|
+
const color_lime = {
|
|
146
|
+
lime_10: "#2b3300",
|
|
147
|
+
lime_20: "#556600",
|
|
148
|
+
lime_30: "#809900",
|
|
149
|
+
lime_40: "#aacc00",
|
|
150
|
+
lime_45: "#bfe500",
|
|
151
|
+
lime_50: "#d5ff00",
|
|
152
|
+
lime_55: "#d9ff1a",
|
|
153
|
+
lime_60: "#ddff33",
|
|
154
|
+
lime_70: "#e6ff66",
|
|
155
|
+
lime_80: "#eeff99",
|
|
156
|
+
lime_90: "#f7ffcc",
|
|
157
|
+
lime_95: "#fbffe5",
|
|
158
|
+
lime_99: "#fefffa"
|
|
159
|
+
};
|
|
160
|
+
const color_green = {
|
|
161
|
+
green_10: "#062d13",
|
|
162
|
+
green_20: "#0d5926",
|
|
163
|
+
green_30: "#138639",
|
|
164
|
+
green_40: "#1ab24d",
|
|
165
|
+
green_45: "#1dc956",
|
|
166
|
+
green_50: "#20df60",
|
|
167
|
+
green_55: "#36e270",
|
|
168
|
+
green_60: "#4de580",
|
|
169
|
+
green_70: "#79ec9f",
|
|
170
|
+
green_80: "#a6f2bf",
|
|
171
|
+
green_90: "#d2f9df",
|
|
172
|
+
green_95: "#e9fcef",
|
|
173
|
+
green_99: "#fbfefc"
|
|
174
|
+
};
|
|
175
|
+
const color_bright_green = {
|
|
176
|
+
bright_green_10: "#213003",
|
|
177
|
+
bright_green_20: "#426105",
|
|
178
|
+
bright_green_30: "#639108",
|
|
179
|
+
bright_green_40: "#84c10b",
|
|
180
|
+
bright_green_45: "#95da0c",
|
|
181
|
+
bright_green_50: "#a5f20d",
|
|
182
|
+
bright_green_55: "#aef325",
|
|
183
|
+
bright_green_60: "#b7f43e",
|
|
184
|
+
bright_green_70: "#c9f76e",
|
|
185
|
+
bright_green_80: "#dbfa9e",
|
|
186
|
+
bright_green_90: "#edfccf",
|
|
187
|
+
bright_green_95: "#f6fee7",
|
|
188
|
+
bright_green_99: "#fdfffa"
|
|
189
|
+
};
|
|
190
|
+
const color_teal = {
|
|
191
|
+
teal_10: "#062d20",
|
|
192
|
+
teal_20: "#0d5940",
|
|
193
|
+
teal_30: "#13865f",
|
|
194
|
+
teal_40: "#1ab27f",
|
|
195
|
+
teal_45: "#1dc98f",
|
|
196
|
+
teal_50: "#20df9f",
|
|
197
|
+
teal_55: "#36e2a9",
|
|
198
|
+
teal_60: "#4de5b2",
|
|
199
|
+
teal_70: "#79ecc5",
|
|
200
|
+
teal_80: "#a6f2d9",
|
|
201
|
+
teal_90: "#d2f9ec",
|
|
202
|
+
teal_95: "#e9fcf5",
|
|
203
|
+
teal_99: "#fbfefd"
|
|
204
|
+
};
|
|
205
|
+
const color_cyan = {
|
|
206
|
+
cyan_10: "#002f33",
|
|
207
|
+
cyan_20: "#005e66",
|
|
208
|
+
cyan_30: "#008c99",
|
|
209
|
+
cyan_40: "#00bbcc",
|
|
210
|
+
cyan_45: "#00d2e5",
|
|
211
|
+
cyan_50: "#00eaff",
|
|
212
|
+
cyan_55: "#1aecff",
|
|
213
|
+
cyan_60: "#33eeff",
|
|
214
|
+
cyan_70: "#66f2ff",
|
|
215
|
+
cyan_80: "#99f7ff",
|
|
216
|
+
cyan_90: "#ccfbff",
|
|
217
|
+
cyan_95: "#e5fdff",
|
|
218
|
+
cyan_99: "#faffff"
|
|
219
|
+
};
|
|
220
|
+
const color_primitive = {
|
|
221
|
+
...color_common,
|
|
222
|
+
...color_neutral,
|
|
223
|
+
...color_cool_gray,
|
|
224
|
+
...color_blue,
|
|
225
|
+
...color_purple,
|
|
226
|
+
...color_magenta,
|
|
227
|
+
...color_pink,
|
|
228
|
+
...color_red,
|
|
229
|
+
...color_orange,
|
|
230
|
+
...color_yellow,
|
|
231
|
+
...color_lime,
|
|
232
|
+
...color_green,
|
|
233
|
+
...color_bright_green,
|
|
234
|
+
...color_teal,
|
|
235
|
+
...color_cyan
|
|
236
|
+
};
|
|
237
|
+
const color_semantic = {
|
|
238
|
+
primary: {
|
|
239
|
+
default: color_primitive.blue_55,
|
|
240
|
+
strong: color_primitive.blue_45,
|
|
241
|
+
heavy: color_primitive.blue_30
|
|
242
|
+
},
|
|
243
|
+
secondary: {
|
|
244
|
+
default: color_primitive.blue_95,
|
|
245
|
+
strong: color_primitive.blue_90,
|
|
246
|
+
heavy: color_primitive.blue_80
|
|
247
|
+
},
|
|
248
|
+
tertiary: {
|
|
249
|
+
default: color_primitive.cool_gray_95,
|
|
250
|
+
strong: color_primitive.cool_gray_90,
|
|
251
|
+
heavy: color_primitive.cool_gray_80
|
|
252
|
+
},
|
|
253
|
+
label: {
|
|
254
|
+
strong: color_primitive.cool_gray_10,
|
|
255
|
+
standard: color_primitive.cool_gray_20,
|
|
256
|
+
neutral: color_primitive.cool_gray_50,
|
|
257
|
+
alternative: color_primitive.cool_gray_70,
|
|
258
|
+
assistive: color_primitive.cool_gray_80,
|
|
259
|
+
disabled: color_primitive.cool_gray_80
|
|
260
|
+
},
|
|
261
|
+
border: {
|
|
262
|
+
standard: {
|
|
263
|
+
cool_gray: color_primitive.cool_gray_90,
|
|
264
|
+
blue: color_primitive.blue_90,
|
|
265
|
+
strong: color_primitive.cool_gray_75,
|
|
266
|
+
heavy: color_primitive.cool_gray_20,
|
|
267
|
+
alternative: color_primitive.cool_gray_80,
|
|
268
|
+
assistive: color_primitive.cool_gray_90
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
background: {
|
|
272
|
+
standard: {
|
|
273
|
+
cool_gray: color_primitive.cool_gray_99,
|
|
274
|
+
neutral: color_primitive.neutral_99
|
|
275
|
+
},
|
|
276
|
+
alternative: {
|
|
277
|
+
cool_gray: color_primitive.cool_gray_95,
|
|
278
|
+
neutral: color_primitive.neutral_95
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
surface: {
|
|
282
|
+
static: {
|
|
283
|
+
white: color_primitive.common_100,
|
|
284
|
+
cool_gray: color_primitive.cool_gray_99,
|
|
285
|
+
blue: color_primitive.blue_95
|
|
286
|
+
},
|
|
287
|
+
neutral: color_primitive.neutral_95,
|
|
288
|
+
standard: color_primitive.cool_gray_95,
|
|
289
|
+
strong: color_primitive.neutral_80,
|
|
290
|
+
heavy: color_primitive.cool_gray_20
|
|
291
|
+
},
|
|
292
|
+
interaction: {
|
|
293
|
+
static: color_primitive.common_100,
|
|
294
|
+
disabled: color_primitive.cool_gray_95
|
|
295
|
+
},
|
|
296
|
+
feedback: {
|
|
297
|
+
danger: color_primitive.red_40,
|
|
298
|
+
error: color_primitive.red_45,
|
|
299
|
+
warning: color_primitive.yellow_50,
|
|
300
|
+
success: color_primitive.green_40,
|
|
301
|
+
information: color_primitive.blue_60,
|
|
302
|
+
new: color_primitive.red_50
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
export {
|
|
306
|
+
color_primitive,
|
|
307
|
+
color_semantic
|
|
308
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ThemeTokens } from '../types/theme-tokens.js';
|
|
2
|
+
|
|
3
|
+
declare const layout_breakpoint: ThemeTokens["layout"]["breakpoint"];
|
|
4
|
+
declare const layout_size: ThemeTokens["layout"]["size"];
|
|
5
|
+
declare const layout_radius: {
|
|
6
|
+
readonly size: {
|
|
7
|
+
readonly size_4x4: 1;
|
|
8
|
+
readonly size_8x8: 2;
|
|
9
|
+
readonly size_12x12: 2;
|
|
10
|
+
readonly size_16x16: 2;
|
|
11
|
+
readonly size_20x20: 4;
|
|
12
|
+
readonly size_24x24: 4;
|
|
13
|
+
readonly size_32x32: 4;
|
|
14
|
+
readonly size_40x40: 6;
|
|
15
|
+
readonly size_48x48: 6;
|
|
16
|
+
readonly size_56x56: 8;
|
|
17
|
+
readonly size_64x64: 10;
|
|
18
|
+
readonly size_72x72: 12;
|
|
19
|
+
readonly size_80x80: 16;
|
|
20
|
+
readonly size_96x96: 16;
|
|
21
|
+
readonly size_120x120: 16;
|
|
22
|
+
};
|
|
23
|
+
readonly level: {
|
|
24
|
+
readonly xxsmall: 1;
|
|
25
|
+
readonly xsmall: 2;
|
|
26
|
+
readonly small: 4;
|
|
27
|
+
readonly medium_1: 6;
|
|
28
|
+
readonly medium_2: 6;
|
|
29
|
+
readonly medium_3: 8;
|
|
30
|
+
readonly medium_4: 10;
|
|
31
|
+
readonly large_1: 12;
|
|
32
|
+
readonly large_2: 16;
|
|
33
|
+
readonly xlarge: 16;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { layout_breakpoint, layout_radius, layout_size };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const layout_breakpoint = {
|
|
2
|
+
xsmall: 0,
|
|
3
|
+
small: 768,
|
|
4
|
+
medium: 992,
|
|
5
|
+
large: 1200
|
|
6
|
+
};
|
|
7
|
+
const layout_size = {
|
|
8
|
+
xxsmall: 4,
|
|
9
|
+
xsmall_1: 8,
|
|
10
|
+
xsmall_2: 12,
|
|
11
|
+
xsmall_3: 16,
|
|
12
|
+
small_1: 20,
|
|
13
|
+
small_2: 24,
|
|
14
|
+
small_3: 32,
|
|
15
|
+
medium_1: 40,
|
|
16
|
+
medium_2: 48,
|
|
17
|
+
medium_3: 56,
|
|
18
|
+
medium_4: 64,
|
|
19
|
+
large_1: 72,
|
|
20
|
+
large_2: 80,
|
|
21
|
+
xlarge_1: 96,
|
|
22
|
+
xlarge_2: 120
|
|
23
|
+
};
|
|
24
|
+
const layout_radius = {
|
|
25
|
+
size: {
|
|
26
|
+
size_4x4: 1,
|
|
27
|
+
size_8x8: 2,
|
|
28
|
+
size_12x12: 2,
|
|
29
|
+
size_16x16: 2,
|
|
30
|
+
size_20x20: 4,
|
|
31
|
+
size_24x24: 4,
|
|
32
|
+
size_32x32: 4,
|
|
33
|
+
size_40x40: 6,
|
|
34
|
+
size_48x48: 6,
|
|
35
|
+
size_56x56: 8,
|
|
36
|
+
size_64x64: 10,
|
|
37
|
+
size_72x72: 12,
|
|
38
|
+
size_80x80: 16,
|
|
39
|
+
size_96x96: 16,
|
|
40
|
+
size_120x120: 16
|
|
41
|
+
},
|
|
42
|
+
level: {
|
|
43
|
+
xxsmall: 1,
|
|
44
|
+
xsmall: 2,
|
|
45
|
+
small: 4,
|
|
46
|
+
medium_1: 6,
|
|
47
|
+
medium_2: 6,
|
|
48
|
+
medium_3: 8,
|
|
49
|
+
medium_4: 10,
|
|
50
|
+
large_1: 12,
|
|
51
|
+
large_2: 16,
|
|
52
|
+
xlarge: 16
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
layout_breakpoint,
|
|
57
|
+
layout_radius,
|
|
58
|
+
layout_size
|
|
59
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const spacing_padding = {
|
|
2
|
+
padding_1: 2,
|
|
3
|
+
padding_2: 4,
|
|
4
|
+
padding_3: 6,
|
|
5
|
+
padding_4: 8,
|
|
6
|
+
padding_5: 12,
|
|
7
|
+
padding_6: 16,
|
|
8
|
+
padding_7: 20,
|
|
9
|
+
padding_8: 24,
|
|
10
|
+
padding_9: 28,
|
|
11
|
+
padding_10: 32,
|
|
12
|
+
padding_11: 40
|
|
13
|
+
};
|
|
14
|
+
const spacing_gap = {
|
|
15
|
+
gap_1: 2,
|
|
16
|
+
gap_2: 4,
|
|
17
|
+
gap_3: 6,
|
|
18
|
+
gap_4: 8,
|
|
19
|
+
gap_5: 12,
|
|
20
|
+
gap_6: 16,
|
|
21
|
+
gap_7: 20,
|
|
22
|
+
gap_8: 24,
|
|
23
|
+
gap_9: 28,
|
|
24
|
+
gap_10: 32,
|
|
25
|
+
gap_11: 36,
|
|
26
|
+
gap_12: 40,
|
|
27
|
+
gap_13: 48,
|
|
28
|
+
gap_14: 64,
|
|
29
|
+
gap_15: 80
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
spacing_gap,
|
|
33
|
+
spacing_padding
|
|
34
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { color_primitive, color_semantic } from "./color.js";
|
|
2
|
+
import { spacing_gap, spacing_padding } from "./spacing.js";
|
|
3
|
+
import { layout_breakpoint, layout_radius, layout_size } from "./layout.js";
|
|
4
|
+
import { typography_tokens } from "./typography.js";
|
|
5
|
+
const themeTokens = {
|
|
6
|
+
color: {
|
|
7
|
+
primitive: color_primitive,
|
|
8
|
+
semantic: color_semantic
|
|
9
|
+
},
|
|
10
|
+
spacing: {
|
|
11
|
+
padding: spacing_padding,
|
|
12
|
+
gap: spacing_gap
|
|
13
|
+
},
|
|
14
|
+
layout: {
|
|
15
|
+
breakpoint: layout_breakpoint,
|
|
16
|
+
size: layout_size,
|
|
17
|
+
radius: layout_radius
|
|
18
|
+
},
|
|
19
|
+
typography: typography_tokens
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
themeTokens
|
|
23
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
const typography_tokens = {
|
|
2
|
+
display: {
|
|
3
|
+
large: {
|
|
4
|
+
size: 60,
|
|
5
|
+
line_height: "1.4em",
|
|
6
|
+
letter_spacing: -0.2,
|
|
7
|
+
font_weight: 700
|
|
8
|
+
},
|
|
9
|
+
medium: {
|
|
10
|
+
size: 44,
|
|
11
|
+
line_height: "1.4em",
|
|
12
|
+
letter_spacing: -0.2,
|
|
13
|
+
font_weight: 700
|
|
14
|
+
},
|
|
15
|
+
small: {
|
|
16
|
+
size: 36,
|
|
17
|
+
line_height: "1.4em",
|
|
18
|
+
letter_spacing: -0.2,
|
|
19
|
+
font_weight: 600
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
heading: {
|
|
23
|
+
xlarge: {
|
|
24
|
+
size: 40,
|
|
25
|
+
line_height: "1.4em",
|
|
26
|
+
letter_spacing: -0.2,
|
|
27
|
+
font_weight: 600
|
|
28
|
+
},
|
|
29
|
+
large: {
|
|
30
|
+
size: 32,
|
|
31
|
+
line_height: "1.4em",
|
|
32
|
+
letter_spacing: -0.2,
|
|
33
|
+
font_weight: 600
|
|
34
|
+
},
|
|
35
|
+
medium: {
|
|
36
|
+
size: 24,
|
|
37
|
+
line_height: "1.4em",
|
|
38
|
+
letter_spacing: 0,
|
|
39
|
+
font_weight: 600
|
|
40
|
+
},
|
|
41
|
+
small: {
|
|
42
|
+
size: 19,
|
|
43
|
+
line_height: "1.4em",
|
|
44
|
+
letter_spacing: 0,
|
|
45
|
+
font_weight: 600
|
|
46
|
+
},
|
|
47
|
+
xsmall: {
|
|
48
|
+
size: 17,
|
|
49
|
+
line_height: "1.5em",
|
|
50
|
+
letter_spacing: 0,
|
|
51
|
+
font_weight: 600
|
|
52
|
+
},
|
|
53
|
+
xxsmall: {
|
|
54
|
+
size: 15,
|
|
55
|
+
line_height: "1.5em",
|
|
56
|
+
letter_spacing: 0,
|
|
57
|
+
font_weight: 600
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
body: {
|
|
61
|
+
large: {
|
|
62
|
+
size: 19,
|
|
63
|
+
line_height: "1.5em",
|
|
64
|
+
letter_spacing: 0,
|
|
65
|
+
font_weight: 600
|
|
66
|
+
},
|
|
67
|
+
medium: {
|
|
68
|
+
size: 17,
|
|
69
|
+
line_height: "1.5em",
|
|
70
|
+
letter_spacing: 0,
|
|
71
|
+
font_weight: 500
|
|
72
|
+
},
|
|
73
|
+
small: {
|
|
74
|
+
size: 15,
|
|
75
|
+
line_height: "1.5em",
|
|
76
|
+
letter_spacing: 0,
|
|
77
|
+
font_weight: 400
|
|
78
|
+
},
|
|
79
|
+
xsmall: {
|
|
80
|
+
size: 13,
|
|
81
|
+
line_height: "1.5em",
|
|
82
|
+
letter_spacing: 0,
|
|
83
|
+
font_weight: 400
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
label: {
|
|
87
|
+
large: {
|
|
88
|
+
size: 16,
|
|
89
|
+
line_height: "1.5em",
|
|
90
|
+
letter_spacing: 0,
|
|
91
|
+
font_weight: 400
|
|
92
|
+
},
|
|
93
|
+
medium: {
|
|
94
|
+
size: 14,
|
|
95
|
+
line_height: "1.5em",
|
|
96
|
+
letter_spacing: 0,
|
|
97
|
+
font_weight: 400
|
|
98
|
+
},
|
|
99
|
+
small: {
|
|
100
|
+
size: 13,
|
|
101
|
+
line_height: "1.5em",
|
|
102
|
+
letter_spacing: 0,
|
|
103
|
+
font_weight: 500
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
caption: {
|
|
107
|
+
large: {
|
|
108
|
+
size: 12,
|
|
109
|
+
line_height: "1.5em",
|
|
110
|
+
letter_spacing: 0,
|
|
111
|
+
font_weight: 600
|
|
112
|
+
},
|
|
113
|
+
medium: {
|
|
114
|
+
size: 11,
|
|
115
|
+
line_height: "1.5em",
|
|
116
|
+
letter_spacing: 0,
|
|
117
|
+
font_weight: 500
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
export {
|
|
122
|
+
typography_tokens
|
|
123
|
+
};
|
|
Binary file
|
|
Binary file
|