@tide-tds/foundation 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/dist/color.d.ts +95 -0
- package/dist/color.js +96 -0
- package/dist/contrast.d.ts +25 -0
- package/dist/contrast.js +90 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +9 -0
- package/dist/internal.d.ts +12 -0
- package/dist/internal.js +7 -0
- package/dist/motion.d.ts +20 -0
- package/dist/motion.js +17 -0
- package/dist/semantic.d.ts +328 -0
- package/dist/semantic.js +318 -0
- package/dist/shape.d.ts +89 -0
- package/dist/shape.js +93 -0
- package/dist/stacking.d.ts +17 -0
- package/dist/stacking.js +18 -0
- package/dist/tailwind-merge.d.ts +5 -0
- package/dist/tailwind-merge.js +387 -0
- package/dist/tailwind.css +234 -0
- package/dist/tokens.css +281 -0
- package/dist/typography.d.ts +132 -0
- package/dist/typography.js +145 -0
- package/package.json +53 -3
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 chane81
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/color.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export declare const color: {
|
|
2
|
+
readonly white: "#ffffff";
|
|
3
|
+
readonly black: "#000000";
|
|
4
|
+
readonly blue: {
|
|
5
|
+
readonly 50: "#f0f6fe";
|
|
6
|
+
readonly 100: "#ddeafc";
|
|
7
|
+
readonly 200: "#c3dafb";
|
|
8
|
+
readonly 300: "#9bc3fd";
|
|
9
|
+
readonly 400: "#65a1f9";
|
|
10
|
+
readonly 500: "#3183f5";
|
|
11
|
+
readonly 600: "#006ae2";
|
|
12
|
+
readonly 700: "#005ac2";
|
|
13
|
+
readonly 800: "#0049a1";
|
|
14
|
+
readonly 900: "#093f85";
|
|
15
|
+
readonly 950: "#0d2850";
|
|
16
|
+
};
|
|
17
|
+
readonly gray: {
|
|
18
|
+
readonly 50: "#f5f5f6";
|
|
19
|
+
readonly 100: "#e8e8ea";
|
|
20
|
+
readonly 200: "#d7d8da";
|
|
21
|
+
readonly 300: "#bec1c4";
|
|
22
|
+
readonly 400: "#9da1a6";
|
|
23
|
+
readonly 500: "#82878e";
|
|
24
|
+
readonly 600: "#6b7179";
|
|
25
|
+
readonly 700: "#5b6068";
|
|
26
|
+
readonly 800: "#4a4e54";
|
|
27
|
+
readonly 900: "#3f4247";
|
|
28
|
+
readonly 950: "#28292c";
|
|
29
|
+
};
|
|
30
|
+
readonly green: {
|
|
31
|
+
readonly 50: "#f0f7f1";
|
|
32
|
+
readonly 100: "#deeee0";
|
|
33
|
+
readonly 200: "#c4e1c9";
|
|
34
|
+
readonly 300: "#9bd0a5";
|
|
35
|
+
readonly 400: "#60b775";
|
|
36
|
+
readonly 500: "#15a14c";
|
|
37
|
+
readonly 600: "#00873d";
|
|
38
|
+
readonly 700: "#007433";
|
|
39
|
+
readonly 800: "#005f28";
|
|
40
|
+
readonly 900: "#005121";
|
|
41
|
+
readonly 950: "#073315";
|
|
42
|
+
};
|
|
43
|
+
readonly amber: {
|
|
44
|
+
readonly 50: "#faf4ed";
|
|
45
|
+
readonly 100: "#f3e7d7";
|
|
46
|
+
readonly 200: "#ead5b8";
|
|
47
|
+
readonly 300: "#e0ba85";
|
|
48
|
+
readonly 400: "#ce9437";
|
|
49
|
+
readonly 500: "#b47900";
|
|
50
|
+
readonly 600: "#976500";
|
|
51
|
+
readonly 700: "#815600";
|
|
52
|
+
readonly 800: "#6a4600";
|
|
53
|
+
readonly 900: "#5b3b00";
|
|
54
|
+
readonly 950: "#3a2400";
|
|
55
|
+
};
|
|
56
|
+
readonly red: {
|
|
57
|
+
readonly 50: "#fff2f0";
|
|
58
|
+
readonly 100: "#fde1dd";
|
|
59
|
+
readonly 200: "#fccac4";
|
|
60
|
+
readonly 300: "#fca79d";
|
|
61
|
+
readonly 400: "#f47368";
|
|
62
|
+
readonly 500: "#ea3e39";
|
|
63
|
+
readonly 600: "#d30016";
|
|
64
|
+
readonly 700: "#b60011";
|
|
65
|
+
readonly 800: "#96000c";
|
|
66
|
+
readonly 900: "#7d0e10";
|
|
67
|
+
readonly 950: "#4c120f";
|
|
68
|
+
};
|
|
69
|
+
readonly cyan: {
|
|
70
|
+
readonly 50: "#eff7fa";
|
|
71
|
+
readonly 100: "#dcecf2";
|
|
72
|
+
readonly 200: "#c0deea";
|
|
73
|
+
readonly 300: "#93cae0";
|
|
74
|
+
readonly 400: "#51aed0";
|
|
75
|
+
readonly 500: "#0094bc";
|
|
76
|
+
readonly 600: "#007c9e";
|
|
77
|
+
readonly 700: "#006a87";
|
|
78
|
+
readonly 800: "#00576f";
|
|
79
|
+
readonly 900: "#004a5f";
|
|
80
|
+
readonly 950: "#002f3d";
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
type Color = typeof color;
|
|
84
|
+
/** 11단계 스케일을 가진 계열 이름. 예: `blue` */
|
|
85
|
+
export type ColorFamily = { [Key in keyof Color]: Color[Key] extends string ? never : Key; }[keyof Color];
|
|
86
|
+
/** 스케일 단계. 50~950의 11단계 */
|
|
87
|
+
export type ColorStep = keyof Color["blue"];
|
|
88
|
+
/** Primitive 이름. 예: `blue-600`, `white` */
|
|
89
|
+
export type PrimitiveColorName = { [Key in keyof Color]: Color[Key] extends string ? Key : never; }[keyof Color] | { [Family in ColorFamily]: `${Family}-${ColorStep}`; }[ColorFamily];
|
|
90
|
+
/**
|
|
91
|
+
* Primitive 이름을 정본 hex로 바꾼다.
|
|
92
|
+
* @internal `@tide-tds/foundation/internal` 전용. 앱 개발자용 공개 계약이 아니다(문서 앱·빌드 스크립트·테스트용).
|
|
93
|
+
*/
|
|
94
|
+
export declare function primitiveHex(name: PrimitiveColorName): string;
|
|
95
|
+
export {};
|
package/dist/color.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// src/color.ts
|
|
2
|
+
const color = {
|
|
3
|
+
white: "#ffffff",
|
|
4
|
+
black: "#000000",
|
|
5
|
+
blue: {
|
|
6
|
+
50: "#f0f6fe",
|
|
7
|
+
100: "#ddeafc",
|
|
8
|
+
200: "#c3dafb",
|
|
9
|
+
300: "#9bc3fd",
|
|
10
|
+
400: "#65a1f9",
|
|
11
|
+
500: "#3183f5",
|
|
12
|
+
600: "#006ae2",
|
|
13
|
+
700: "#005ac2",
|
|
14
|
+
800: "#0049a1",
|
|
15
|
+
900: "#093f85",
|
|
16
|
+
950: "#0d2850"
|
|
17
|
+
},
|
|
18
|
+
gray: {
|
|
19
|
+
50: "#f5f5f6",
|
|
20
|
+
100: "#e8e8ea",
|
|
21
|
+
200: "#d7d8da",
|
|
22
|
+
300: "#bec1c4",
|
|
23
|
+
400: "#9da1a6",
|
|
24
|
+
500: "#82878e",
|
|
25
|
+
600: "#6b7179",
|
|
26
|
+
700: "#5b6068",
|
|
27
|
+
800: "#4a4e54",
|
|
28
|
+
900: "#3f4247",
|
|
29
|
+
950: "#28292c"
|
|
30
|
+
},
|
|
31
|
+
green: {
|
|
32
|
+
50: "#f0f7f1",
|
|
33
|
+
100: "#deeee0",
|
|
34
|
+
200: "#c4e1c9",
|
|
35
|
+
300: "#9bd0a5",
|
|
36
|
+
400: "#60b775",
|
|
37
|
+
500: "#15a14c",
|
|
38
|
+
600: "#00873d",
|
|
39
|
+
700: "#007433",
|
|
40
|
+
800: "#005f28",
|
|
41
|
+
900: "#005121",
|
|
42
|
+
950: "#073315"
|
|
43
|
+
},
|
|
44
|
+
amber: {
|
|
45
|
+
50: "#faf4ed",
|
|
46
|
+
100: "#f3e7d7",
|
|
47
|
+
200: "#ead5b8",
|
|
48
|
+
300: "#e0ba85",
|
|
49
|
+
400: "#ce9437",
|
|
50
|
+
500: "#b47900",
|
|
51
|
+
600: "#976500",
|
|
52
|
+
700: "#815600",
|
|
53
|
+
800: "#6a4600",
|
|
54
|
+
900: "#5b3b00",
|
|
55
|
+
950: "#3a2400"
|
|
56
|
+
},
|
|
57
|
+
red: {
|
|
58
|
+
50: "#fff2f0",
|
|
59
|
+
100: "#fde1dd",
|
|
60
|
+
200: "#fccac4",
|
|
61
|
+
300: "#fca79d",
|
|
62
|
+
400: "#f47368",
|
|
63
|
+
500: "#ea3e39",
|
|
64
|
+
600: "#d30016",
|
|
65
|
+
700: "#b60011",
|
|
66
|
+
800: "#96000c",
|
|
67
|
+
900: "#7d0e10",
|
|
68
|
+
950: "#4c120f"
|
|
69
|
+
},
|
|
70
|
+
cyan: {
|
|
71
|
+
50: "#eff7fa",
|
|
72
|
+
100: "#dcecf2",
|
|
73
|
+
200: "#c0deea",
|
|
74
|
+
300: "#93cae0",
|
|
75
|
+
400: "#51aed0",
|
|
76
|
+
500: "#0094bc",
|
|
77
|
+
600: "#007c9e",
|
|
78
|
+
700: "#006a87",
|
|
79
|
+
800: "#00576f",
|
|
80
|
+
900: "#004a5f",
|
|
81
|
+
950: "#002f3d"
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Primitive 이름을 정본 hex로 바꾼다.
|
|
86
|
+
* @internal `@tide-tds/foundation/internal` 전용. 앱 개발자용 공개 계약이 아니다(문서 앱·빌드 스크립트·테스트용).
|
|
87
|
+
*/
|
|
88
|
+
function primitiveHex(name) {
|
|
89
|
+
if (name === "white" || name === "black") return color[name];
|
|
90
|
+
const index = name.lastIndexOf("-");
|
|
91
|
+
const family = name.slice(0, index);
|
|
92
|
+
const step = Number(name.slice(index + 1));
|
|
93
|
+
return color[family][step];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export { color, primitiveHex };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SemanticColorName } from "./semantic.js";
|
|
2
|
+
/** 함께 쓰이는 글자(또는 경계)와 배경의 짝. Utility class 이름으로 적는다. */
|
|
3
|
+
export interface ContrastPair {
|
|
4
|
+
readonly foreground: SemanticColorName;
|
|
5
|
+
readonly background: SemanticColorName;
|
|
6
|
+
/** 텍스트는 4.5, UI 경계와 포커스는 3 */
|
|
7
|
+
readonly minRatio: 4.5 | 3;
|
|
8
|
+
}
|
|
9
|
+
/** 대비 검사에서 빼는 Semantic Token과 그 이유 */
|
|
10
|
+
export interface ContrastExclusion {
|
|
11
|
+
readonly token: SemanticColorName;
|
|
12
|
+
readonly reason: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const contrastPairs: readonly ContrastPair[];
|
|
15
|
+
/**
|
|
16
|
+
* 대비 검사에서 뺀 Semantic Token과 이유.
|
|
17
|
+
* @internal `@tide-tds/foundation/internal` 전용. 앱 개발자용 공개 계약이 아니다(문서 앱·빌드 스크립트·테스트용).
|
|
18
|
+
*/
|
|
19
|
+
export declare const contrastExclusions: readonly ContrastExclusion[];
|
|
20
|
+
/**
|
|
21
|
+
* 두 색의 WCAG 2.x 대비비(1~21). 순서는 상관없다.
|
|
22
|
+
* 반투명 색(8자리 hex)은 받지 않는다. 대비 검사에서 overlay와 shadow는 제외한다.
|
|
23
|
+
* @internal `@tide-tds/foundation/internal` 전용. 앱 개발자용 공개 계약이 아니다(문서 앱·빌드 스크립트·테스트용).
|
|
24
|
+
*/
|
|
25
|
+
export declare function contrastRatio(foreground: string, background: string): number;
|
package/dist/contrast.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// src/contrast.ts
|
|
2
|
+
const surfaces = [
|
|
3
|
+
"bg-canvas",
|
|
4
|
+
"bg-surface",
|
|
5
|
+
"bg-raised"
|
|
6
|
+
];
|
|
7
|
+
const roles = [
|
|
8
|
+
"primary",
|
|
9
|
+
"success",
|
|
10
|
+
"warning",
|
|
11
|
+
"danger",
|
|
12
|
+
"info"
|
|
13
|
+
];
|
|
14
|
+
const allRoles = ["neutral", ...roles];
|
|
15
|
+
const subtleStates = [
|
|
16
|
+
"subtle",
|
|
17
|
+
"subtle-hover",
|
|
18
|
+
"subtle-active"
|
|
19
|
+
];
|
|
20
|
+
const solidStates = [
|
|
21
|
+
"solid",
|
|
22
|
+
"solid-hover",
|
|
23
|
+
"solid-active"
|
|
24
|
+
];
|
|
25
|
+
function pairs(foregrounds, backgrounds, minRatio) {
|
|
26
|
+
return foregrounds.flatMap((foreground) => backgrounds.map((background) => ({
|
|
27
|
+
foreground,
|
|
28
|
+
background,
|
|
29
|
+
minRatio
|
|
30
|
+
})));
|
|
31
|
+
}
|
|
32
|
+
const contrastPairs = [
|
|
33
|
+
...pairs(["text-default", "text-muted"], surfaces, 4.5),
|
|
34
|
+
...pairs(["text-default"], subtleStates.map((state) => `bg-neutral-${state}`), 4.5),
|
|
35
|
+
...roles.flatMap((role) => pairs([`text-${role}`], [...surfaces, ...subtleStates.map((state) => `bg-${role}-${state}`)], 4.5)),
|
|
36
|
+
...pairs(["text-on-solid"], allRoles.flatMap((role) => solidStates.map((state) => `bg-${role}-${state}`)), 4.5),
|
|
37
|
+
...pairs([
|
|
38
|
+
"border-strong",
|
|
39
|
+
...roles.map((role) => `border-${role}`),
|
|
40
|
+
"outline-focus"
|
|
41
|
+
], surfaces, 3)
|
|
42
|
+
];
|
|
43
|
+
/**
|
|
44
|
+
* 대비 검사에서 뺀 Semantic Token과 이유.
|
|
45
|
+
* @internal `@tide-tds/foundation/internal` 전용. 앱 개발자용 공개 계약이 아니다(문서 앱·빌드 스크립트·테스트용).
|
|
46
|
+
*/
|
|
47
|
+
const contrastExclusions = [
|
|
48
|
+
{
|
|
49
|
+
token: "border-default",
|
|
50
|
+
reason: "장식용 구분선이다. 경계 식별에 쓰지 않는다."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
token: "border-raised",
|
|
54
|
+
reason: "raised 표면의 장식용 경계다(light 투명, dark gray-800). 표면 구분은 그림자와 배경 밝기가 맡고, 대비 의무가 없다."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
token: "bg-disabled",
|
|
58
|
+
reason: "비활성 상태는 WCAG 대비 요건 밖이다. Component가 속성과 cursor로도 표현한다."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
token: "text-disabled",
|
|
62
|
+
reason: "비활성 상태는 WCAG 대비 요건 밖이다. Component가 속성과 cursor로도 표현한다."
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
token: "bg-overlay",
|
|
66
|
+
reason: "modal 뒤를 가리는 반투명 막이다. 위에 글자를 두지 않는다."
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
/** WCAG 2.x 상대 휘도. `#rrggbb`만 받는다. */
|
|
70
|
+
function relativeLuminance(hex) {
|
|
71
|
+
const match = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(hex);
|
|
72
|
+
if (!match) throw new Error(`불투명한 6자리 hex가 아니다: ${hex}`);
|
|
73
|
+
const [r, g, b] = match.slice(1).map((channel) => {
|
|
74
|
+
const value = Number.parseInt(channel, 16) / 255;
|
|
75
|
+
return value <= .04045 ? value / 12.92 : ((value + .055) / 1.055) ** 2.4;
|
|
76
|
+
});
|
|
77
|
+
return .2126 * r + .7152 * g + .0722 * b;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* 두 색의 WCAG 2.x 대비비(1~21). 순서는 상관없다.
|
|
81
|
+
* 반투명 색(8자리 hex)은 받지 않는다. 대비 검사에서 overlay와 shadow는 제외한다.
|
|
82
|
+
* @internal `@tide-tds/foundation/internal` 전용. 앱 개발자용 공개 계약이 아니다(문서 앱·빌드 스크립트·테스트용).
|
|
83
|
+
*/
|
|
84
|
+
function contrastRatio(foreground, background) {
|
|
85
|
+
const a = relativeLuminance(foreground);
|
|
86
|
+
const b = relativeLuminance(background);
|
|
87
|
+
return (Math.max(a, b) + .05) / (Math.min(a, b) + .05);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export { contrastExclusions, contrastPairs, contrastRatio };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ColorFamily, ColorStep, PrimitiveColorName, color } from "./color.js";
|
|
2
|
+
import { AlphaColor, Role, SemanticColorName, SemanticColorValue, SemanticNamespace, ThemeName, ThemedColor, semantic, semanticPrefix } from "./semantic.js";
|
|
3
|
+
import { ContrastExclusion, ContrastPair, contrastPairs } from "./contrast.js";
|
|
4
|
+
import { FontFamilyName, FontSizeStep, FontWeightName, TextStyleName, TextStyleValue, fontFamily, fontSize, fontWeight, textStyle } from "./typography.js";
|
|
5
|
+
import { RadiusName, ShadowLayer, ShadowName, focusRing, radius, shadow } from "./shape.js";
|
|
6
|
+
import { DurationName, EasingName, duration, easing } from "./motion.js";
|
|
7
|
+
import { ZIndexName, zIndex } from "./stacking.js";
|
|
8
|
+
export { type AlphaColor, type ColorFamily, type ColorStep, type ContrastExclusion, type ContrastPair, type DurationName, type EasingName, type FontFamilyName, type FontSizeStep, type FontWeightName, type PrimitiveColorName, type RadiusName, type Role, type SemanticColorName, type SemanticColorValue, type SemanticNamespace, type ShadowLayer, type ShadowName, type TextStyleName, type TextStyleValue, type ThemeName, type ThemedColor, type ZIndexName, color, contrastPairs, duration, easing, focusRing, fontFamily, fontSize, fontWeight, radius, semantic, semanticPrefix, shadow, textStyle, zIndex };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { color } from "./color.js";
|
|
2
|
+
import { semantic, semanticPrefix } from "./semantic.js";
|
|
3
|
+
import { contrastPairs } from "./contrast.js";
|
|
4
|
+
import { fontFamily, fontSize, fontWeight, textStyle } from "./typography.js";
|
|
5
|
+
import { focusRing, radius, shadow } from "./shape.js";
|
|
6
|
+
import { duration, easing } from "./motion.js";
|
|
7
|
+
import { zIndex } from "./stacking.js";
|
|
8
|
+
|
|
9
|
+
export { color, contrastPairs, duration, easing, focusRing, fontFamily, fontSize, fontWeight, radius, semantic, semanticPrefix, shadow, textStyle, zIndex };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@tide-tds/foundation/internal`: 문서 앱(Token 블록), 빌드 스크립트, 테스트가 쓰는 내부 도우미.
|
|
3
|
+
*
|
|
4
|
+
* @internal 앱 개발자용 공개 계약이 아니다. 문서에 싣지 않고, 예고 없이 바뀌거나 사라질 수 있다.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import { primitiveHex } from "./color.js";
|
|
8
|
+
import { colorValueHex, roleFamily, semanticEntries, semanticHex, shadowColor } from "./semantic.js";
|
|
9
|
+
import { contrastExclusions, contrastRatio } from "./contrast.js";
|
|
10
|
+
import { fontFamilyCss } from "./typography.js";
|
|
11
|
+
import { shadowCss } from "./shape.js";
|
|
12
|
+
export { colorValueHex, contrastExclusions, contrastRatio, fontFamilyCss, primitiveHex, roleFamily, semanticEntries, semanticHex, shadowColor, shadowCss };
|
package/dist/internal.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { primitiveHex } from "./color.js";
|
|
2
|
+
import { colorValueHex, roleFamily, semanticEntries, semanticHex, shadowColor } from "./semantic.js";
|
|
3
|
+
import { contrastExclusions, contrastRatio } from "./contrast.js";
|
|
4
|
+
import { fontFamilyCss } from "./typography.js";
|
|
5
|
+
import { shadowCss } from "./shape.js";
|
|
6
|
+
|
|
7
|
+
export { colorValueHex, contrastExclusions, contrastRatio, fontFamilyCss, primitiveHex, roleFamily, semanticEntries, semanticHex, shadowColor, shadowCss };
|
package/dist/motion.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* duration 2단계. `duration-<이름>` class와 공개 계약 `--tide-duration-<이름>`이 쓴다.
|
|
3
|
+
* - fast: hover·press, 색 전환, Switch thumb, 오버레이가 사라질 때. 시간을 적지 않은 transition의 기본값이다.
|
|
4
|
+
* - normal: 가끔 쓰는 오버레이(Popover, Toast, Dialog류)가 나타날 때
|
|
5
|
+
*/
|
|
6
|
+
export declare const duration: {
|
|
7
|
+
readonly fast: "150ms";
|
|
8
|
+
readonly normal: "300ms";
|
|
9
|
+
};
|
|
10
|
+
/** duration 단계 이름 */
|
|
11
|
+
export type DurationName = keyof typeof duration;
|
|
12
|
+
/**
|
|
13
|
+
* easing. `ease-<이름>` class와 공개 계약 `--tide-ease-<이름>`이 쓴다.
|
|
14
|
+
* - out: Tide Component 전부. 나타날 때와 사라질 때 모두. 시간을 적지 않은 transition의 기본값이다.
|
|
15
|
+
*/
|
|
16
|
+
export declare const easing: {
|
|
17
|
+
readonly out: "cubic-bezier(0, 0, 0.2, 1)";
|
|
18
|
+
};
|
|
19
|
+
/** easing 이름 */
|
|
20
|
+
export type EasingName = keyof typeof easing;
|
package/dist/motion.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/motion.ts
|
|
2
|
+
/**
|
|
3
|
+
* duration 2단계. `duration-<이름>` class와 공개 계약 `--tide-duration-<이름>`이 쓴다.
|
|
4
|
+
* - fast: hover·press, 색 전환, Switch thumb, 오버레이가 사라질 때. 시간을 적지 않은 transition의 기본값이다.
|
|
5
|
+
* - normal: 가끔 쓰는 오버레이(Popover, Toast, Dialog류)가 나타날 때
|
|
6
|
+
*/
|
|
7
|
+
const duration = {
|
|
8
|
+
fast: "150ms",
|
|
9
|
+
normal: "300ms"
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* easing. `ease-<이름>` class와 공개 계약 `--tide-ease-<이름>`이 쓴다.
|
|
13
|
+
* - out: Tide Component 전부. 나타날 때와 사라질 때 모두. 시간을 적지 않은 transition의 기본값이다.
|
|
14
|
+
*/
|
|
15
|
+
const easing = { out: "cubic-bezier(0, 0, 0.2, 1)" };
|
|
16
|
+
|
|
17
|
+
export { duration, easing };
|