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.
Files changed (113) hide show
  1. package/README.md +69 -0
  2. package/dist/index.cjs.js +3515 -0
  3. package/dist/index.cjs.js.map +1 -0
  4. package/dist/index.esm.js +3494 -0
  5. package/dist/index.esm.js.map +1 -0
  6. package/dist/src/assets/index.d.ts +2 -0
  7. package/dist/src/assets/index.d.ts.map +1 -0
  8. package/dist/src/components/Button/Button.d.ts +4 -0
  9. package/dist/src/components/Button/Button.d.ts.map +1 -0
  10. package/dist/src/components/Button/index.d.ts +2 -0
  11. package/dist/src/components/Button/index.d.ts.map +1 -0
  12. package/dist/src/components/Button/style.d.ts +13 -0
  13. package/dist/src/components/Button/style.d.ts.map +1 -0
  14. package/dist/src/components/CheckBox/CheckBox.d.ts +4 -0
  15. package/dist/src/components/CheckBox/CheckBox.d.ts.map +1 -0
  16. package/dist/src/components/CheckBox/index.d.ts +2 -0
  17. package/dist/src/components/CheckBox/index.d.ts.map +1 -0
  18. package/dist/src/components/CheckBox/style.d.ts +22 -0
  19. package/dist/src/components/CheckBox/style.d.ts.map +1 -0
  20. package/dist/src/components/Dropdown/Dropdown.d.ts +3 -0
  21. package/dist/src/components/Dropdown/Dropdown.d.ts.map +1 -0
  22. package/dist/src/components/Dropdown/index.d.ts +2 -0
  23. package/dist/src/components/Dropdown/index.d.ts.map +1 -0
  24. package/dist/src/components/Dropdown/style.d.ts +35 -0
  25. package/dist/src/components/Dropdown/style.d.ts.map +1 -0
  26. package/dist/src/components/Input/Input.d.ts +4 -0
  27. package/dist/src/components/Input/Input.d.ts.map +1 -0
  28. package/dist/src/components/Input/index.d.ts +2 -0
  29. package/dist/src/components/Input/index.d.ts.map +1 -0
  30. package/dist/src/components/Input/style.d.ts +5 -0
  31. package/dist/src/components/Input/style.d.ts.map +1 -0
  32. package/dist/src/components/Sidebar/Sidebar.d.ts +3 -0
  33. package/dist/src/components/Sidebar/Sidebar.d.ts.map +1 -0
  34. package/dist/src/components/Sidebar/index.d.ts +2 -0
  35. package/dist/src/components/Sidebar/index.d.ts.map +1 -0
  36. package/dist/src/components/Sidebar/style.d.ts +37 -0
  37. package/dist/src/components/Sidebar/style.d.ts.map +1 -0
  38. package/dist/src/components/TabBar/TabBar.d.ts +13 -0
  39. package/dist/src/components/TabBar/TabBar.d.ts.map +1 -0
  40. package/dist/src/components/TabBar/index.d.ts +2 -0
  41. package/dist/src/components/TabBar/index.d.ts.map +1 -0
  42. package/dist/src/components/TabBar/style.d.ts +21 -0
  43. package/dist/src/components/TabBar/style.d.ts.map +1 -0
  44. package/dist/src/components/index.d.ts +7 -0
  45. package/dist/src/components/index.d.ts.map +1 -0
  46. package/dist/src/foundation/index.d.ts +2 -0
  47. package/dist/src/foundation/index.d.ts.map +1 -0
  48. package/dist/src/index.d.ts +3 -0
  49. package/dist/src/index.d.ts.map +1 -0
  50. package/dist/src/style/index.d.ts +2 -0
  51. package/dist/src/style/index.d.ts.map +1 -0
  52. package/dist/src/style/theme/colors.d.ts +474 -0
  53. package/dist/src/style/theme/colors.d.ts.map +1 -0
  54. package/dist/src/style/theme/index.d.ts +3 -0
  55. package/dist/src/style/theme/index.d.ts.map +1 -0
  56. package/dist/src/style/theme/typography.d.ts +181 -0
  57. package/dist/src/style/theme/typography.d.ts.map +1 -0
  58. package/dist/src/type/Dropdown.types.d.ts +8 -0
  59. package/dist/src/type/Dropdown.types.d.ts.map +1 -0
  60. package/dist/src/type/Sidebar.types.d.ts +6 -0
  61. package/dist/src/type/Sidebar.types.d.ts.map +1 -0
  62. package/dist/src/types/button.types.d.ts +12 -0
  63. package/dist/src/types/button.types.d.ts.map +1 -0
  64. package/dist/src/types/checkBox.types.d.ts +7 -0
  65. package/dist/src/types/checkBox.types.d.ts.map +1 -0
  66. package/dist/src/types/input.types.d.ts +11 -0
  67. package/dist/src/types/input.types.d.ts.map +1 -0
  68. package/dist/tsconfig.build.tsbuildinfo +1 -0
  69. package/package.json +60 -0
  70. package/src/assets/icons/arrow-down.png +0 -0
  71. package/src/assets/icons/checked.png +0 -0
  72. package/src/assets/icons/icon_size.png +0 -0
  73. package/src/assets/images/.gitkeep +0 -0
  74. package/src/assets/index.ts +1 -0
  75. package/src/components/Button/Button.stories.tsx +145 -0
  76. package/src/components/Button/Button.tsx +27 -0
  77. package/src/components/Button/index.ts +1 -0
  78. package/src/components/Button/style.ts +132 -0
  79. package/src/components/CheckBox/CheckBox.stories.tsx +203 -0
  80. package/src/components/CheckBox/CheckBox.tsx +34 -0
  81. package/src/components/CheckBox/index.ts +1 -0
  82. package/src/components/CheckBox/style.ts +76 -0
  83. package/src/components/Dropdown/Dropdown.stories.tsx +91 -0
  84. package/src/components/Dropdown/Dropdown.tsx +56 -0
  85. package/src/components/Dropdown/index.ts +1 -0
  86. package/src/components/Dropdown/style.ts +213 -0
  87. package/src/components/Input/Input.stories.tsx +152 -0
  88. package/src/components/Input/Input.tsx +33 -0
  89. package/src/components/Input/index.ts +1 -0
  90. package/src/components/Input/style.ts +88 -0
  91. package/src/components/Sidebar/Sidebar.stories.tsx +60 -0
  92. package/src/components/Sidebar/Sidebar.tsx +67 -0
  93. package/src/components/Sidebar/index.ts +1 -0
  94. package/src/components/Sidebar/index.tsx +1 -0
  95. package/src/components/Sidebar/style.ts +109 -0
  96. package/src/components/TabBar/TabBar.stories.tsx +116 -0
  97. package/src/components/TabBar/TabBar.tsx +47 -0
  98. package/src/components/TabBar/index.ts +1 -0
  99. package/src/components/TabBar/style.ts +53 -0
  100. package/src/components/index.ts +6 -0
  101. package/src/foundation/index.ts +1 -0
  102. package/src/index.ts +2 -0
  103. package/src/style/index.ts +1 -0
  104. package/src/style/theme/colors.ts +504 -0
  105. package/src/style/theme/index.ts +2 -0
  106. package/src/style/theme/typography.ts +194 -0
  107. package/src/type/Dropdown.types.ts +7 -0
  108. package/src/type/Sidebar.types.ts +5 -0
  109. package/src/types/ krds-uiux.d.ts +12 -0
  110. package/src/types/button.types.ts +12 -0
  111. package/src/types/checkBox.types.ts +6 -0
  112. package/src/types/input.types.ts +11 -0
  113. 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,7 @@
1
+ export interface DropdownProps {
2
+ size?: "small" | "medium" | "large";
3
+ onSelect?: (option: string) => void;
4
+ options: string[];
5
+ label?: string;
6
+ placeholder?: string;
7
+ }
@@ -0,0 +1,5 @@
1
+ export interface SidebarProps {
2
+ buttonStyle?: 'one' | 'two' ;
3
+ title: string[],
4
+ description: string[] []
5
+ }
@@ -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,6 @@
1
+ export interface CheckBoxProps {
2
+ size: "medium" | "large";
3
+ select: "off" | "on" | "indeterminate";
4
+ state: "default" | "disabled";
5
+ onClick?: () => void;
6
+ }
@@ -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" />