@uniai-fe/uds-foundation 0.4.2 → 0.4.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/dist/data/color.d.ts +285 -4
- package/dist/data/layout.d.ts +50 -31
- package/dist/data/spacing.d.ts +30 -4
- package/dist/data/tokens.d.ts +497 -3
- package/dist/data/typography.d.ts +126 -3
- package/dist/helpers/index.d.ts +15 -11
- package/dist/index.d.ts +6 -1
- package/dist/index.js +5 -0
- package/dist/types/theme-tokens.d.ts +45 -56
- package/package.json +8 -8
- package/src/data/color.ts +34 -38
- package/src/data/layout.ts +8 -7
- package/src/data/spacing.ts +4 -6
- package/src/data/tokens.ts +3 -3
- package/src/data/typography.ts +1 -3
- package/src/helpers/index.ts +20 -9
- package/src/index.ts +6 -0
- package/src/types/theme-tokens.ts +60 -58
|
@@ -1,81 +1,83 @@
|
|
|
1
|
+
import type { color_primitive, color_semantic } from "../data/color";
|
|
2
|
+
import type {
|
|
3
|
+
layout_breakpoint,
|
|
4
|
+
layout_radius,
|
|
5
|
+
layout_size,
|
|
6
|
+
} from "../data/layout";
|
|
7
|
+
import type { spacing_gap, spacing_padding } from "../data/spacing";
|
|
8
|
+
import type { themeTokens } from "../data/tokens";
|
|
9
|
+
import type { typography_tokens } from "../data/typography";
|
|
10
|
+
|
|
1
11
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @property {number} size font-size px 값
|
|
4
|
-
* @property {string} line_height line-height 값
|
|
5
|
-
* @property {number} letter_spacing letter-spacing 값
|
|
6
|
-
* @property {number} font_weight font-weight 값
|
|
12
|
+
* ThemeColorPrimitive; primitive color token snapshot 타입
|
|
7
13
|
*/
|
|
8
|
-
export
|
|
9
|
-
/**
|
|
10
|
-
* font-size px 값
|
|
11
|
-
*/
|
|
12
|
-
readonly size: number;
|
|
13
|
-
/**
|
|
14
|
-
* line-height 값
|
|
15
|
-
*/
|
|
16
|
-
readonly line_height: string;
|
|
17
|
-
/**
|
|
18
|
-
* letter-spacing 값
|
|
19
|
-
*/
|
|
20
|
-
readonly letter_spacing: number;
|
|
21
|
-
/**
|
|
22
|
-
* font-weight 값
|
|
23
|
-
*/
|
|
24
|
-
readonly font_weight: number;
|
|
25
|
-
}
|
|
14
|
+
export type ThemeColorPrimitive = typeof color_primitive;
|
|
26
15
|
|
|
27
16
|
/**
|
|
28
|
-
*
|
|
17
|
+
* ThemeColorSemantic; semantic color token snapshot 타입
|
|
29
18
|
*/
|
|
30
|
-
export type
|
|
19
|
+
export type ThemeColorSemantic = typeof color_semantic;
|
|
20
|
+
|
|
31
21
|
/**
|
|
32
|
-
* ThemeColorSemanticSection; semantic color nested token map
|
|
22
|
+
* ThemeColorSemanticSection; semantic color nested token map 호환 타입
|
|
33
23
|
* @property {string | ThemeColorSemanticSection} [token] semantic color value 또는 하위 section
|
|
34
24
|
*/
|
|
35
25
|
export interface ThemeColorSemanticSection {
|
|
36
26
|
readonly [token: string]: string | ThemeColorSemanticSection;
|
|
37
27
|
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* ThemeSpacingPadding; spacing padding token snapshot 타입
|
|
31
|
+
*/
|
|
32
|
+
export type ThemeSpacingPadding = typeof spacing_padding;
|
|
33
|
+
|
|
38
34
|
/**
|
|
39
|
-
*
|
|
35
|
+
* ThemeSpacingGap; spacing gap token snapshot 타입
|
|
36
|
+
*/
|
|
37
|
+
export type ThemeSpacingGap = typeof spacing_gap;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* ThemeSpacingScale; spacing scale token map 호환 타입
|
|
40
41
|
*/
|
|
41
42
|
export type ThemeSpacingScale = Record<string, number>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* ThemeLayoutBreakpoint; layout breakpoint token snapshot 타입
|
|
46
|
+
*/
|
|
47
|
+
export type ThemeLayoutBreakpoint = typeof layout_breakpoint;
|
|
48
|
+
|
|
42
49
|
/**
|
|
43
|
-
*
|
|
50
|
+
* ThemeLayoutSize; layout size token snapshot 타입
|
|
51
|
+
*/
|
|
52
|
+
export type ThemeLayoutSize = typeof layout_size;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* ThemeLayoutRadius; layout radius token snapshot 타입
|
|
56
|
+
*/
|
|
57
|
+
export type ThemeLayoutRadius = typeof layout_radius;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* ThemeLayoutSizes; layout size token map 호환 타입
|
|
44
61
|
*/
|
|
45
62
|
export type ThemeLayoutSizes = Record<string, number>;
|
|
63
|
+
|
|
46
64
|
/**
|
|
47
|
-
*
|
|
65
|
+
* ThemeTypography; typography token snapshot 타입
|
|
48
66
|
*/
|
|
49
|
-
export type
|
|
67
|
+
export type ThemeTypography = typeof typography_tokens;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* ThemeTypographyCategory; typography category token map 타입
|
|
71
|
+
*/
|
|
72
|
+
export type ThemeTypographyCategory = ThemeTypography[keyof ThemeTypography];
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* ThemeTypographyVariant; typography variant token 구조
|
|
76
|
+
*/
|
|
77
|
+
export type ThemeTypographyVariant =
|
|
78
|
+
ThemeTypographyCategory[keyof ThemeTypographyCategory];
|
|
50
79
|
|
|
51
80
|
/**
|
|
52
81
|
* ThemeTokens; foundation token snapshot 전체 구조
|
|
53
|
-
* @property {{ primitive: ThemeColorPrimitive; semantic: ThemeColorSemanticSection }} color color token 집합
|
|
54
|
-
* @property {{ padding: ThemeSpacingScale; gap: ThemeSpacingScale }} spacing spacing token 집합
|
|
55
|
-
* @property {{ breakpoint: Record<"xsmall" | "small" | "medium" | "large", number>; size: ThemeLayoutSizes; radius: { size: ThemeLayoutSizes; level: ThemeLayoutSizes } }} layout layout token 집합
|
|
56
|
-
* @property {{ [category: string]: ThemeTypographyCategory }} typography typography token 집합
|
|
57
82
|
*/
|
|
58
|
-
export
|
|
59
|
-
readonly color: {
|
|
60
|
-
readonly primitive: ThemeColorPrimitive;
|
|
61
|
-
readonly semantic: ThemeColorSemanticSection;
|
|
62
|
-
};
|
|
63
|
-
readonly spacing: {
|
|
64
|
-
readonly padding: ThemeSpacingScale;
|
|
65
|
-
readonly gap: ThemeSpacingScale;
|
|
66
|
-
};
|
|
67
|
-
readonly layout: {
|
|
68
|
-
readonly breakpoint: Record<
|
|
69
|
-
"xsmall" | "small" | "medium" | "large",
|
|
70
|
-
number
|
|
71
|
-
>;
|
|
72
|
-
readonly size: ThemeLayoutSizes;
|
|
73
|
-
readonly radius: {
|
|
74
|
-
readonly size: ThemeLayoutSizes;
|
|
75
|
-
readonly level: ThemeLayoutSizes;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
readonly typography: {
|
|
79
|
-
readonly [category: string]: ThemeTypographyCategory;
|
|
80
|
-
};
|
|
81
|
-
}
|
|
83
|
+
export type ThemeTokens = typeof themeTokens;
|