teachable-design-system 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/README.md +69 -0
- package/dist/index.cjs.js +3515 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.esm.js +3494 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/src/assets/index.d.ts +2 -0
- package/dist/src/assets/index.d.ts.map +1 -0
- package/dist/src/components/Button/Button.d.ts +4 -0
- package/dist/src/components/Button/Button.d.ts.map +1 -0
- package/dist/src/components/Button/index.d.ts +2 -0
- package/dist/src/components/Button/index.d.ts.map +1 -0
- package/dist/src/components/Button/style.d.ts +13 -0
- package/dist/src/components/Button/style.d.ts.map +1 -0
- package/dist/src/components/CheckBox/CheckBox.d.ts +4 -0
- package/dist/src/components/CheckBox/CheckBox.d.ts.map +1 -0
- package/dist/src/components/CheckBox/index.d.ts +2 -0
- package/dist/src/components/CheckBox/index.d.ts.map +1 -0
- package/dist/src/components/CheckBox/style.d.ts +22 -0
- package/dist/src/components/CheckBox/style.d.ts.map +1 -0
- package/dist/src/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/src/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/src/components/Dropdown/index.d.ts +2 -0
- package/dist/src/components/Dropdown/index.d.ts.map +1 -0
- package/dist/src/components/Dropdown/style.d.ts +35 -0
- package/dist/src/components/Dropdown/style.d.ts.map +1 -0
- package/dist/src/components/Input/Input.d.ts +4 -0
- package/dist/src/components/Input/Input.d.ts.map +1 -0
- package/dist/src/components/Input/index.d.ts +2 -0
- package/dist/src/components/Input/index.d.ts.map +1 -0
- package/dist/src/components/Input/style.d.ts +5 -0
- package/dist/src/components/Input/style.d.ts.map +1 -0
- package/dist/src/components/Sidebar/Sidebar.d.ts +3 -0
- package/dist/src/components/Sidebar/Sidebar.d.ts.map +1 -0
- package/dist/src/components/Sidebar/index.d.ts +2 -0
- package/dist/src/components/Sidebar/index.d.ts.map +1 -0
- package/dist/src/components/Sidebar/style.d.ts +37 -0
- package/dist/src/components/Sidebar/style.d.ts.map +1 -0
- package/dist/src/components/TabBar/TabBar.d.ts +13 -0
- package/dist/src/components/TabBar/TabBar.d.ts.map +1 -0
- package/dist/src/components/TabBar/index.d.ts +2 -0
- package/dist/src/components/TabBar/index.d.ts.map +1 -0
- package/dist/src/components/TabBar/style.d.ts +21 -0
- package/dist/src/components/TabBar/style.d.ts.map +1 -0
- package/dist/src/components/index.d.ts +7 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/foundation/index.d.ts +2 -0
- package/dist/src/foundation/index.d.ts.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/style/index.d.ts +2 -0
- package/dist/src/style/index.d.ts.map +1 -0
- package/dist/src/style/theme/colors.d.ts +474 -0
- package/dist/src/style/theme/colors.d.ts.map +1 -0
- package/dist/src/style/theme/index.d.ts +3 -0
- package/dist/src/style/theme/index.d.ts.map +1 -0
- package/dist/src/style/theme/typography.d.ts +181 -0
- package/dist/src/style/theme/typography.d.ts.map +1 -0
- package/dist/src/type/Dropdown.types.d.ts +8 -0
- package/dist/src/type/Dropdown.types.d.ts.map +1 -0
- package/dist/src/type/Sidebar.types.d.ts +6 -0
- package/dist/src/type/Sidebar.types.d.ts.map +1 -0
- package/dist/src/types/button.types.d.ts +12 -0
- package/dist/src/types/button.types.d.ts.map +1 -0
- package/dist/src/types/checkBox.types.d.ts +7 -0
- package/dist/src/types/checkBox.types.d.ts.map +1 -0
- package/dist/src/types/input.types.d.ts +11 -0
- package/dist/src/types/input.types.d.ts.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +60 -0
- package/src/assets/icons/arrow-down.png +0 -0
- package/src/assets/icons/checked.png +0 -0
- package/src/assets/icons/icon_size.png +0 -0
- package/src/assets/images/.gitkeep +0 -0
- package/src/assets/index.ts +1 -0
- package/src/components/Button/Button.stories.tsx +145 -0
- package/src/components/Button/Button.tsx +27 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Button/style.ts +132 -0
- package/src/components/CheckBox/CheckBox.stories.tsx +203 -0
- package/src/components/CheckBox/CheckBox.tsx +34 -0
- package/src/components/CheckBox/index.ts +1 -0
- package/src/components/CheckBox/style.ts +76 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +91 -0
- package/src/components/Dropdown/Dropdown.tsx +56 -0
- package/src/components/Dropdown/index.ts +1 -0
- package/src/components/Dropdown/style.ts +213 -0
- package/src/components/Input/Input.stories.tsx +152 -0
- package/src/components/Input/Input.tsx +33 -0
- package/src/components/Input/index.ts +1 -0
- package/src/components/Input/style.ts +88 -0
- package/src/components/Sidebar/Sidebar.stories.tsx +60 -0
- package/src/components/Sidebar/Sidebar.tsx +67 -0
- package/src/components/Sidebar/index.ts +1 -0
- package/src/components/Sidebar/index.tsx +1 -0
- package/src/components/Sidebar/style.ts +109 -0
- package/src/components/TabBar/TabBar.stories.tsx +116 -0
- package/src/components/TabBar/TabBar.tsx +47 -0
- package/src/components/TabBar/index.ts +1 -0
- package/src/components/TabBar/style.ts +53 -0
- package/src/components/index.ts +6 -0
- package/src/foundation/index.ts +1 -0
- package/src/index.ts +2 -0
- package/src/style/index.ts +1 -0
- package/src/style/theme/colors.ts +504 -0
- package/src/style/theme/index.ts +2 -0
- package/src/style/theme/typography.ts +194 -0
- package/src/type/Dropdown.types.ts +7 -0
- package/src/type/Sidebar.types.ts +5 -0
- package/src/types/ krds-uiux.d.ts +12 -0
- package/src/types/button.types.ts +12 -0
- package/src/types/checkBox.types.ts +6 -0
- package/src/types/input.types.ts +11 -0
- package/src/vite-env.d.ts +1 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
export const typography = {
|
|
2
|
+
fontFamily: {
|
|
3
|
+
primary: '"Pretendard", -apple-system, BlinkMacSystemFont, sans-serif',
|
|
4
|
+
},
|
|
5
|
+
|
|
6
|
+
// Display
|
|
7
|
+
display: {
|
|
8
|
+
large: {
|
|
9
|
+
fontSize: '60px',
|
|
10
|
+
lineHeight: '150%',
|
|
11
|
+
fontWeight: 700,
|
|
12
|
+
},
|
|
13
|
+
medium: {
|
|
14
|
+
fontSize: '44px',
|
|
15
|
+
lineHeight: '150%',
|
|
16
|
+
fontWeight: 700,
|
|
17
|
+
},
|
|
18
|
+
small: {
|
|
19
|
+
fontSize: '36px',
|
|
20
|
+
lineHeight: '150%',
|
|
21
|
+
fontWeight: 700,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
// Heading
|
|
26
|
+
heading: {
|
|
27
|
+
xlarge: {
|
|
28
|
+
fontSize: '40px',
|
|
29
|
+
lineHeight: '150%',
|
|
30
|
+
fontWeight: 700,
|
|
31
|
+
},
|
|
32
|
+
large: {
|
|
33
|
+
fontSize: '32px',
|
|
34
|
+
lineHeight: '150%',
|
|
35
|
+
fontWeight: 700,
|
|
36
|
+
},
|
|
37
|
+
medium: {
|
|
38
|
+
fontSize: '24px',
|
|
39
|
+
lineHeight: '150%',
|
|
40
|
+
fontWeight: 700,
|
|
41
|
+
},
|
|
42
|
+
small: {
|
|
43
|
+
fontSize: '19px',
|
|
44
|
+
lineHeight: '150%',
|
|
45
|
+
fontWeight: 700,
|
|
46
|
+
},
|
|
47
|
+
xsmall: {
|
|
48
|
+
fontSize: '17px',
|
|
49
|
+
lineHeight: '150%',
|
|
50
|
+
fontWeight: 700,
|
|
51
|
+
},
|
|
52
|
+
xxsmall: {
|
|
53
|
+
fontSize: '15px',
|
|
54
|
+
lineHeight: '150%',
|
|
55
|
+
fontWeight: 700,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
// Body
|
|
60
|
+
body: {
|
|
61
|
+
large: {
|
|
62
|
+
fontSize: '19px',
|
|
63
|
+
lineHeight: '150%',
|
|
64
|
+
fontWeight: 400,
|
|
65
|
+
},
|
|
66
|
+
largeBold: {
|
|
67
|
+
fontSize: '19px',
|
|
68
|
+
lineHeight: '150%',
|
|
69
|
+
fontWeight: 700,
|
|
70
|
+
},
|
|
71
|
+
medium: {
|
|
72
|
+
fontSize: '17px',
|
|
73
|
+
lineHeight: '150%',
|
|
74
|
+
fontWeight: 400,
|
|
75
|
+
},
|
|
76
|
+
mediumBold: {
|
|
77
|
+
fontSize: '17px',
|
|
78
|
+
lineHeight: '150%',
|
|
79
|
+
fontWeight: 700,
|
|
80
|
+
},
|
|
81
|
+
small: {
|
|
82
|
+
fontSize: '15px',
|
|
83
|
+
lineHeight: '150%',
|
|
84
|
+
fontWeight: 400,
|
|
85
|
+
},
|
|
86
|
+
smallBold: {
|
|
87
|
+
fontSize: '15px',
|
|
88
|
+
lineHeight: '150%',
|
|
89
|
+
fontWeight: 700,
|
|
90
|
+
},
|
|
91
|
+
xsmall: {
|
|
92
|
+
fontSize: '13px',
|
|
93
|
+
lineHeight: '150%',
|
|
94
|
+
fontWeight: 400,
|
|
95
|
+
},
|
|
96
|
+
xsmallBold: {
|
|
97
|
+
fontSize: '13px',
|
|
98
|
+
lineHeight: '150%',
|
|
99
|
+
fontWeight: 700,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
// Label
|
|
104
|
+
label: {
|
|
105
|
+
large: {
|
|
106
|
+
fontSize: '19px',
|
|
107
|
+
lineHeight: '150%',
|
|
108
|
+
fontWeight: 400,
|
|
109
|
+
},
|
|
110
|
+
medium: {
|
|
111
|
+
fontSize: '17px',
|
|
112
|
+
lineHeight: '150%',
|
|
113
|
+
fontWeight: 400,
|
|
114
|
+
},
|
|
115
|
+
small: {
|
|
116
|
+
fontSize: '15px',
|
|
117
|
+
lineHeight: '150%',
|
|
118
|
+
fontWeight: 400,
|
|
119
|
+
},
|
|
120
|
+
xsmall: {
|
|
121
|
+
fontSize: '13px',
|
|
122
|
+
lineHeight: '150%',
|
|
123
|
+
fontWeight: 400,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
// Navigation
|
|
128
|
+
navigation: {
|
|
129
|
+
titleMedium: {
|
|
130
|
+
fontSize: '24px',
|
|
131
|
+
lineHeight: '150%',
|
|
132
|
+
fontWeight: 400,
|
|
133
|
+
},
|
|
134
|
+
titleSmall: {
|
|
135
|
+
fontSize: '19px',
|
|
136
|
+
lineHeight: '150%',
|
|
137
|
+
fontWeight: 400,
|
|
138
|
+
},
|
|
139
|
+
depthMediumBold: {
|
|
140
|
+
fontSize: '17px',
|
|
141
|
+
lineHeight: '150%',
|
|
142
|
+
fontWeight: 700,
|
|
143
|
+
},
|
|
144
|
+
depthMedium: {
|
|
145
|
+
fontSize: '17px',
|
|
146
|
+
lineHeight: '150%',
|
|
147
|
+
fontWeight: 400,
|
|
148
|
+
},
|
|
149
|
+
depthSmallBold: {
|
|
150
|
+
fontSize: '15px',
|
|
151
|
+
lineHeight: '150%',
|
|
152
|
+
fontWeight: 700,
|
|
153
|
+
},
|
|
154
|
+
depthSmall: {
|
|
155
|
+
fontSize: '15px',
|
|
156
|
+
lineHeight: '150%',
|
|
157
|
+
fontWeight: 400,
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
// Underline
|
|
162
|
+
underline: {
|
|
163
|
+
large: {
|
|
164
|
+
fontSize: '19px',
|
|
165
|
+
lineHeight: '150%',
|
|
166
|
+
fontWeight: 400,
|
|
167
|
+
textDecoration: 'underline',
|
|
168
|
+
},
|
|
169
|
+
medium: {
|
|
170
|
+
fontSize: '17px',
|
|
171
|
+
lineHeight: '150%',
|
|
172
|
+
fontWeight: 400,
|
|
173
|
+
textDecoration: 'underline',
|
|
174
|
+
},
|
|
175
|
+
small: {
|
|
176
|
+
fontSize: '15px',
|
|
177
|
+
lineHeight: '150%',
|
|
178
|
+
fontWeight: 400,
|
|
179
|
+
textDecoration: 'underline',
|
|
180
|
+
},
|
|
181
|
+
xsmall: {
|
|
182
|
+
fontSize: '13px',
|
|
183
|
+
lineHeight: '150%',
|
|
184
|
+
fontWeight: 400,
|
|
185
|
+
textDecoration: 'underline',
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
|
|
189
|
+
// Font Weight
|
|
190
|
+
fontWeight: {
|
|
191
|
+
regular: 400,
|
|
192
|
+
bold: 700,
|
|
193
|
+
},
|
|
194
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare module 'krds-uiux' {
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
export interface ButtonProps {
|
|
5
|
+
variant?: 'primary' | 'secondary';
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const Button: React.FC<ButtonProps>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ButtonProps {
|
|
2
|
+
width?: string;
|
|
3
|
+
height?: string;
|
|
4
|
+
type?: 'primary' | 'secondary' | 'tertiary';
|
|
5
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
|
+
label: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type ButtonType = 'primary' | 'secondary' | 'tertiary';
|
|
12
|
+
export type ButtonSize = 'small' | 'medium' | 'large';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface InputProps {
|
|
2
|
+
size?: 'small' | 'medium' | 'large';
|
|
3
|
+
label?: boolean;
|
|
4
|
+
labelText?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type InputSize = 'small' | 'medium' | 'large';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|