@mzc-fe/design-system 0.0.1-rc.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/.husky/pre-push +21 -0
- package/.storybook/main.ts +11 -0
- package/.storybook/preview.tsx +30 -0
- package/.vscode/settings.json +12 -0
- package/.vscode/tailwind.json +105 -0
- package/README.md +136 -0
- package/bitbucket-pipelines.yml +52 -0
- package/components.json +21 -0
- package/eslint.config.js +38 -0
- package/package.json +98 -0
- package/public/vite.svg +1 -0
- package/src/components/accordion.stories.tsx +258 -0
- package/src/components/accordion.test.tsx +390 -0
- package/src/components/accordion.tsx +64 -0
- package/src/components/alert-dialog.stories.tsx +213 -0
- package/src/components/alert-dialog.test.tsx +80 -0
- package/src/components/alert-dialog.tsx +155 -0
- package/src/components/alert.stories.tsx +84 -0
- package/src/components/alert.test.tsx +35 -0
- package/src/components/alert.tsx +66 -0
- package/src/components/aspect-ratio.stories.tsx +97 -0
- package/src/components/aspect-ratio.test.tsx +47 -0
- package/src/components/aspect-ratio.tsx +11 -0
- package/src/components/avatar.stories.tsx +76 -0
- package/src/components/avatar.test.tsx +50 -0
- package/src/components/avatar.tsx +51 -0
- package/src/components/badge.stories.tsx +64 -0
- package/src/components/badge.test.tsx +34 -0
- package/src/components/badge.tsx +46 -0
- package/src/components/breadcrumb.stories.tsx +86 -0
- package/src/components/breadcrumb.test.tsx +74 -0
- package/src/components/breadcrumb.tsx +109 -0
- package/src/components/button-group.stories.tsx +62 -0
- package/src/components/button-group.tsx +83 -0
- package/src/components/button.stories.tsx +118 -0
- package/src/components/button.test.tsx +64 -0
- package/src/components/button.tsx +62 -0
- package/src/components/calendar.stories.tsx +81 -0
- package/src/components/calendar.tsx +220 -0
- package/src/components/card.stories.tsx +110 -0
- package/src/components/card.test.tsx +56 -0
- package/src/components/card.tsx +92 -0
- package/src/components/carousel.stories.tsx +90 -0
- package/src/components/carousel.tsx +239 -0
- package/src/components/chart.tsx +357 -0
- package/src/components/checkbox.stories.tsx +108 -0
- package/src/components/checkbox.test.tsx +67 -0
- package/src/components/checkbox.tsx +32 -0
- package/src/components/collapsible.stories.tsx +106 -0
- package/src/components/collapsible.test.tsx +92 -0
- package/src/components/collapsible.tsx +31 -0
- package/src/components/command.stories.tsx +90 -0
- package/src/components/command.tsx +182 -0
- package/src/components/context-menu.stories.tsx +63 -0
- package/src/components/context-menu.tsx +252 -0
- package/src/components/dialog.stories.tsx +128 -0
- package/src/components/dialog.tsx +141 -0
- package/src/components/drawer.stories.tsx +104 -0
- package/src/components/drawer.tsx +135 -0
- package/src/components/dropdown-menu.stories.tsx +97 -0
- package/src/components/dropdown-menu.tsx +255 -0
- package/src/components/empty.stories.tsx +90 -0
- package/src/components/empty.test.tsx +55 -0
- package/src/components/empty.tsx +104 -0
- package/src/components/field.tsx +246 -0
- package/src/components/form.tsx +168 -0
- package/src/components/hover-card.stories.tsx +66 -0
- package/src/components/hover-card.tsx +44 -0
- package/src/components/input-group.stories.tsx +57 -0
- package/src/components/input-group.test.tsx +40 -0
- package/src/components/input-group.tsx +170 -0
- package/src/components/input-otp.stories.tsx +94 -0
- package/src/components/input-otp.test.tsx +60 -0
- package/src/components/input-otp.tsx +75 -0
- package/src/components/input.stories.tsx +94 -0
- package/src/components/input.test.tsx +53 -0
- package/src/components/input.tsx +21 -0
- package/src/components/item.tsx +193 -0
- package/src/components/kbd.stories.tsx +100 -0
- package/src/components/kbd.test.tsx +28 -0
- package/src/components/kbd.tsx +28 -0
- package/src/components/label.stories.tsx +48 -0
- package/src/components/label.test.tsx +28 -0
- package/src/components/label.tsx +24 -0
- package/src/components/menubar.tsx +274 -0
- package/src/components/navigation-menu.tsx +168 -0
- package/src/components/pagination.stories.tsx +107 -0
- package/src/components/pagination.tsx +127 -0
- package/src/components/popover.stories.tsx +102 -0
- package/src/components/popover.tsx +48 -0
- package/src/components/progress.stories.tsx +76 -0
- package/src/components/progress.test.tsx +36 -0
- package/src/components/progress.tsx +29 -0
- package/src/components/radio-group.stories.tsx +73 -0
- package/src/components/radio-group.test.tsx +74 -0
- package/src/components/radio-group.tsx +45 -0
- package/src/components/resizable.stories.tsx +120 -0
- package/src/components/resizable.tsx +54 -0
- package/src/components/scroll-area.stories.tsx +64 -0
- package/src/components/scroll-area.test.tsx +46 -0
- package/src/components/scroll-area.tsx +58 -0
- package/src/components/select.stories.tsx +111 -0
- package/src/components/select.test.tsx +90 -0
- package/src/components/select.tsx +188 -0
- package/src/components/separator.stories.tsx +76 -0
- package/src/components/separator.test.tsx +24 -0
- package/src/components/separator.tsx +28 -0
- package/src/components/sheet.stories.tsx +122 -0
- package/src/components/sheet.tsx +137 -0
- package/src/components/sidebar.tsx +726 -0
- package/src/components/skeleton.stories.tsx +53 -0
- package/src/components/skeleton.test.tsx +24 -0
- package/src/components/skeleton.tsx +13 -0
- package/src/components/slider.stories.tsx +97 -0
- package/src/components/slider.test.tsx +49 -0
- package/src/components/slider.tsx +63 -0
- package/src/components/sonner.stories.tsx +96 -0
- package/src/components/sonner.tsx +38 -0
- package/src/components/spinner.stories.tsx +54 -0
- package/src/components/spinner.test.tsx +30 -0
- package/src/components/spinner.tsx +16 -0
- package/src/components/switch.stories.tsx +108 -0
- package/src/components/switch.test.tsx +62 -0
- package/src/components/switch.tsx +31 -0
- package/src/components/table.stories.tsx +139 -0
- package/src/components/table.test.tsx +85 -0
- package/src/components/table.tsx +114 -0
- package/src/components/tabs.stories.tsx +99 -0
- package/src/components/tabs.test.tsx +64 -0
- package/src/components/tabs.tsx +66 -0
- package/src/components/textarea.stories.tsx +89 -0
- package/src/components/textarea.test.tsx +53 -0
- package/src/components/textarea.tsx +18 -0
- package/src/components/toggle-group.stories.tsx +108 -0
- package/src/components/toggle-group.test.tsx +66 -0
- package/src/components/toggle-group.tsx +81 -0
- package/src/components/toggle.stories.tsx +98 -0
- package/src/components/toggle.test.tsx +42 -0
- package/src/components/toggle.tsx +45 -0
- package/src/components/tooltip.stories.tsx +111 -0
- package/src/components/tooltip.tsx +61 -0
- package/src/foundations/README.md +141 -0
- package/src/foundations/ThemeProvider.tsx +77 -0
- package/src/foundations/color.css +232 -0
- package/src/foundations/color.stories.tsx +719 -0
- package/src/foundations/palette.css +249 -0
- package/src/foundations/spacing.css +8 -0
- package/src/foundations/typography.css +143 -0
- package/src/foundations/typography.stories.tsx +17 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/index.css +176 -0
- package/src/index.ts +336 -0
- package/src/lib/utils.ts +6 -0
- package/src/test/setup.ts +8 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.app.json +33 -0
- package/tsconfig.json +13 -0
- package/tsconfig.node.json +25 -0
- package/vite.config.ts +30 -0
- package/vitest.config.ts +25 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/**
|
|
3
|
+
* 1. Static
|
|
4
|
+
*/
|
|
5
|
+
--white-100: #ffffff;
|
|
6
|
+
--black-100: #000000;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 2. Neutral
|
|
10
|
+
*/
|
|
11
|
+
--neutral-0: #fafafa;
|
|
12
|
+
--neutral-5: #f2f2f2;
|
|
13
|
+
--neutral-10: #e5e5e5;
|
|
14
|
+
--neutral-20: #d4d4d4;
|
|
15
|
+
--neutral-30: #b5b5b5;
|
|
16
|
+
--neutral-40: #989898;
|
|
17
|
+
--neutral-50: #737373;
|
|
18
|
+
--neutral-60: #525252;
|
|
19
|
+
--neutral-70: #404040;
|
|
20
|
+
--neutral-80: #282828;
|
|
21
|
+
--neutral-90: #171717;
|
|
22
|
+
--neutral-95: #0a0a0a;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 3. Cool Neutral
|
|
26
|
+
*/
|
|
27
|
+
--cool-neutral-0: #f8f9fa;
|
|
28
|
+
--cool-neutral-5: #f1f3f5;
|
|
29
|
+
--cool-neutral-10: #e5e7ed;
|
|
30
|
+
--cool-neutral-20: #d3d7df;
|
|
31
|
+
--cool-neutral-30: #b9bdc6;
|
|
32
|
+
--cool-neutral-40: #9ea1aa;
|
|
33
|
+
--cool-neutral-50: #7e818b;
|
|
34
|
+
--cool-neutral-60: #5e626e;
|
|
35
|
+
--cool-neutral-70: #40424a;
|
|
36
|
+
--cool-neutral-80: #2d2f34;
|
|
37
|
+
--cool-neutral-90: #17181c;
|
|
38
|
+
--cool-neutral-95: #0c0a09;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 4. Navy
|
|
42
|
+
*/
|
|
43
|
+
--navy-5: #f1f5f9;
|
|
44
|
+
--navy-10: #e2e8f0;
|
|
45
|
+
--navy-20: #d0d9e5;
|
|
46
|
+
--navy-30: #b6c2d1;
|
|
47
|
+
--navy-40: #94a3b8;
|
|
48
|
+
--navy-50: #72849e;
|
|
49
|
+
--navy-60: #51637e;
|
|
50
|
+
--navy-70: #3d4e66;
|
|
51
|
+
--navy-80: #2d3c52;
|
|
52
|
+
--navy-90: #1e293b;
|
|
53
|
+
--navy-95: #0f172a;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 5. Blue
|
|
57
|
+
*/
|
|
58
|
+
--blue-5: #eff6ff;
|
|
59
|
+
--blue-10: #dbeafe;
|
|
60
|
+
--blue-20: #bfdbfe;
|
|
61
|
+
--blue-30: #93c5fd;
|
|
62
|
+
--blue-40: #60a5fa;
|
|
63
|
+
--blue-50: #3b82f6;
|
|
64
|
+
--blue-60: #2563eb;
|
|
65
|
+
--blue-70: #1d4ed8;
|
|
66
|
+
--blue-80: #1e40af;
|
|
67
|
+
--blue-90: #1e3a8a;
|
|
68
|
+
--blue-95: #172554;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 6. Red
|
|
72
|
+
*/
|
|
73
|
+
--red-5: #fef2f2;
|
|
74
|
+
--red-10: #ffe2e2;
|
|
75
|
+
--red-20: #fecaca;
|
|
76
|
+
--red-30: #fca5a5;
|
|
77
|
+
--red-40: #f87171;
|
|
78
|
+
--red-50: #ef4444;
|
|
79
|
+
--red-60: #dc2626;
|
|
80
|
+
--red-70: #b91c1c;
|
|
81
|
+
--red-80: #991b1b;
|
|
82
|
+
--red-90: #7f1d1d;
|
|
83
|
+
--red-95: #450a0a;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 7. Orange
|
|
87
|
+
*/
|
|
88
|
+
--orange-5: #fff7ed;
|
|
89
|
+
--orange-10: #ffedd5;
|
|
90
|
+
--orange-20: #fed7aa;
|
|
91
|
+
--orange-30: #fdba74;
|
|
92
|
+
--orange-40: #fb923c;
|
|
93
|
+
--orange-50: #f97316;
|
|
94
|
+
--orange-60: #ea580c;
|
|
95
|
+
--orange-70: #c2410c;
|
|
96
|
+
--orange-80: #9a3412;
|
|
97
|
+
--orange-90: #7c2d12;
|
|
98
|
+
--orange-95: #431407;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* 8. Yellow
|
|
102
|
+
*/
|
|
103
|
+
--yellow-5: #fefce8;
|
|
104
|
+
--yellow-10: #fef9c3;
|
|
105
|
+
--yellow-20: #fef08a;
|
|
106
|
+
--yellow-30: #fde047;
|
|
107
|
+
--yellow-40: #facc15;
|
|
108
|
+
--yellow-50: #eab308;
|
|
109
|
+
--yellow-60: #ca8a04;
|
|
110
|
+
--yellow-70: #a16207;
|
|
111
|
+
--yellow-80: #854d0e;
|
|
112
|
+
--yellow-90: #6c3c10;
|
|
113
|
+
--yellow-95: #422006;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 9. Lime
|
|
117
|
+
*/
|
|
118
|
+
--lime-5: #f7fee7;
|
|
119
|
+
--lime-10: #ecfccb;
|
|
120
|
+
--lime-20: #d9f99d;
|
|
121
|
+
--lime-30: #bef264;
|
|
122
|
+
--lime-40: #a3e635;
|
|
123
|
+
--lime-50: #84cc16;
|
|
124
|
+
--lime-60: #65a30d;
|
|
125
|
+
--lime-70: #4d7c0f;
|
|
126
|
+
--lime-80: #3f6212;
|
|
127
|
+
--lime-90: #314e0f;
|
|
128
|
+
--lime-95: #1a2e05;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 10. Green
|
|
132
|
+
*/
|
|
133
|
+
--green-5: #f0fdf4;
|
|
134
|
+
--green-10: #dcfce7;
|
|
135
|
+
--green-20: #bbf7d0;
|
|
136
|
+
--green-30: #86efac;
|
|
137
|
+
--green-40: #4ade80;
|
|
138
|
+
--green-50: #22c55e;
|
|
139
|
+
--green-60: #16a34a;
|
|
140
|
+
--green-70: #15803d;
|
|
141
|
+
--green-80: #166534;
|
|
142
|
+
--green-90: #104826;
|
|
143
|
+
--green-95: #052e16;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* 11. Teal
|
|
147
|
+
*/
|
|
148
|
+
--teal-5: #f0fdfa;
|
|
149
|
+
--teal-10: #ccfbf1;
|
|
150
|
+
--teal-20: #99f6e4;
|
|
151
|
+
--teal-30: #5eead4;
|
|
152
|
+
--teal-40: #2dd4bf;
|
|
153
|
+
--teal-50: #14b8a6;
|
|
154
|
+
--teal-60: #0d9488;
|
|
155
|
+
--teal-70: #0f766e;
|
|
156
|
+
--teal-80: #115e59;
|
|
157
|
+
--teal-90: #104440;
|
|
158
|
+
--teal-95: #042f2e;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* 12. Cyan
|
|
162
|
+
*/
|
|
163
|
+
--cyan-5: #ecfeff;
|
|
164
|
+
--cyan-10: #cffafe;
|
|
165
|
+
--cyan-20: #a5f3fc;
|
|
166
|
+
--cyan-30: #67e8f9;
|
|
167
|
+
--cyan-40: #22d3ee;
|
|
168
|
+
--cyan-50: #06b6d4;
|
|
169
|
+
--cyan-60: #0891b2;
|
|
170
|
+
--cyan-70: #0e7490;
|
|
171
|
+
--cyan-80: #155e75;
|
|
172
|
+
--cyan-90: #104154;
|
|
173
|
+
--cyan-95: #072f3e;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* 13. Sky
|
|
177
|
+
*/
|
|
178
|
+
--sky-5: #f0f9ff;
|
|
179
|
+
--sky-10: #e0f2fe;
|
|
180
|
+
--sky-20: #bae6fd;
|
|
181
|
+
--sky-30: #7dd3fc;
|
|
182
|
+
--sky-40: #38bdf8;
|
|
183
|
+
--sky-50: #0ea5e9;
|
|
184
|
+
--sky-60: #0284c7;
|
|
185
|
+
--sky-70: #0369a1;
|
|
186
|
+
--sky-80: #075985;
|
|
187
|
+
--sky-90: #0c4465;
|
|
188
|
+
--sky-95: #082f49;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* 14. Indigo
|
|
192
|
+
*/
|
|
193
|
+
--indigo-5: #eef2ff;
|
|
194
|
+
--indigo-10: #e0e7ff;
|
|
195
|
+
--indigo-20: #c7d2fe;
|
|
196
|
+
--indigo-30: #a5b4fc;
|
|
197
|
+
--indigo-40: #818cf8;
|
|
198
|
+
--indigo-50: #6366f1;
|
|
199
|
+
--indigo-60: #4f46e5;
|
|
200
|
+
--indigo-70: #4338ca;
|
|
201
|
+
--indigo-80: #3730a3;
|
|
202
|
+
--indigo-90: #2d2888;
|
|
203
|
+
--indigo-95: #1f1b59;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* 15. Violet
|
|
207
|
+
*/
|
|
208
|
+
--violet-5: #f5f3ff;
|
|
209
|
+
--violet-10: #ede9fe;
|
|
210
|
+
--violet-20: #ddd6fe;
|
|
211
|
+
--violet-30: #c4b5fd;
|
|
212
|
+
--violet-40: #a78bfa;
|
|
213
|
+
--violet-50: #8b5cf6;
|
|
214
|
+
--violet-60: #7c3aed;
|
|
215
|
+
--violet-70: #6d28d9;
|
|
216
|
+
--violet-80: #5b21b6;
|
|
217
|
+
--violet-90: #4c1d95;
|
|
218
|
+
--violet-95: #2d0964;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* 16. Purple
|
|
222
|
+
*/
|
|
223
|
+
--purple-5: #faf5ff;
|
|
224
|
+
--purple-10: #f9edff;
|
|
225
|
+
--purple-20: #f2d6ff;
|
|
226
|
+
--purple-30: #e9baff;
|
|
227
|
+
--purple-40: #db8cff;
|
|
228
|
+
--purple-50: #ce64ff;
|
|
229
|
+
--purple-60: #c042fa;
|
|
230
|
+
--purple-70: #a633db;
|
|
231
|
+
--purple-80: #861cb8;
|
|
232
|
+
--purple-90: #580a7d;
|
|
233
|
+
--purple-95: #290247;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* 17. Pink
|
|
237
|
+
*/
|
|
238
|
+
--pink-5: #fdf2f8;
|
|
239
|
+
--pink-10: #fce7f3;
|
|
240
|
+
--pink-20: #fbcfe8;
|
|
241
|
+
--pink-30: #f9a8d4;
|
|
242
|
+
--pink-40: #f472b6;
|
|
243
|
+
--pink-50: #ec4899;
|
|
244
|
+
--pink-60: #db2777;
|
|
245
|
+
--pink-70: #be185d;
|
|
246
|
+
--pink-80: #9b144a;
|
|
247
|
+
--pink-90: #76133b;
|
|
248
|
+
--pink-95: #3c061b;
|
|
249
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typography 값을 Utility Class로 정의합니다.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@utility font-h1-800 {
|
|
6
|
+
font-size: calc(var(--spacing) * 9);
|
|
7
|
+
font-weight: 800;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@utility font-h1-700 {
|
|
11
|
+
font-size: calc(var(--spacing) * 9);
|
|
12
|
+
font-weight: 700;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@utility font-h2-800 {
|
|
16
|
+
font-size: calc(var(--spacing) * 8);
|
|
17
|
+
font-weight: 800;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@utility font-h2-700 {
|
|
21
|
+
font-size: calc(var(--spacing) * 8);
|
|
22
|
+
font-weight: 700;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@utility font-h3-800 {
|
|
26
|
+
font-size: calc(var(--spacing) * 7);
|
|
27
|
+
font-weight: 800;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@utility font-h3-700 {
|
|
31
|
+
font-size: calc(var(--spacing) * 7);
|
|
32
|
+
font-weight: 700;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@utility font-h4-800 {
|
|
36
|
+
font-size: calc(var(--spacing) * 6);
|
|
37
|
+
font-weight: 800;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@utility font-h4-700 {
|
|
41
|
+
font-size: calc(var(--spacing) * 6);
|
|
42
|
+
font-weight: 700;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@utility font-h5-800 {
|
|
46
|
+
font-size: calc(var(--spacing) * 5);
|
|
47
|
+
font-weight: 800;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@utility font-h5-700 {
|
|
51
|
+
font-size: calc(var(--spacing) * 5);
|
|
52
|
+
font-weight: 700;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@utility font-subtitle1-700 {
|
|
56
|
+
font-size: calc(var(--spacing) * 4.5);
|
|
57
|
+
font-weight: 700;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@utility font-subtitle1-500 {
|
|
61
|
+
font-size: calc(var(--spacing) * 4.5);
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@utility font-subtitle2-700 {
|
|
66
|
+
font-size: calc(var(--spacing) * 4);
|
|
67
|
+
font-weight: 700;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@utility font-subtitle2-500 {
|
|
71
|
+
font-size: calc(var(--spacing) * 4);
|
|
72
|
+
font-weight: 500;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@utility font-subtitle3-700 {
|
|
76
|
+
font-size: calc(var(--spacing) * 3.75);
|
|
77
|
+
font-weight: 700;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@utility font-subtitle3-500 {
|
|
81
|
+
font-size: calc(var(--spacing) * 3.75);
|
|
82
|
+
font-weight: 500;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@utility font-body1-700 {
|
|
86
|
+
font-size: calc(var(--spacing) * 3.5);
|
|
87
|
+
font-weight: 700;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@utility font-body1-500 {
|
|
91
|
+
font-size: calc(var(--spacing) * 3.5);
|
|
92
|
+
font-weight: 500;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@utility font-body1-400 {
|
|
96
|
+
font-size: calc(var(--spacing) * 3.5);
|
|
97
|
+
font-weight: 400;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@utility font-body2-700 {
|
|
101
|
+
font-size: calc(var(--spacing) * 3.25);
|
|
102
|
+
font-weight: 700;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@utility font-body2-500 {
|
|
106
|
+
font-size: calc(var(--spacing) * 3.25);
|
|
107
|
+
font-weight: 500;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@utility font-body2-400 {
|
|
111
|
+
font-size: calc(var(--spacing) * 3.25);
|
|
112
|
+
font-weight: 400;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@utility font-body3-700 {
|
|
116
|
+
font-size: calc(var(--spacing) * 3);
|
|
117
|
+
font-weight: 700;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@utility font-body3-500 {
|
|
121
|
+
font-size: calc(var(--spacing) * 3);
|
|
122
|
+
font-weight: 500;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@utility font-body3-400 {
|
|
126
|
+
font-size: calc(var(--spacing) * 3);
|
|
127
|
+
font-weight: 400;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@utility font-body4-700 {
|
|
131
|
+
font-size: calc(var(--spacing) * 2.75);
|
|
132
|
+
font-weight: 700;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@utility font-body4-500 {
|
|
136
|
+
font-size: calc(var(--spacing) * 2.75);
|
|
137
|
+
font-weight: 500;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@utility font-body4-400 {
|
|
141
|
+
font-size: calc(var(--spacing) * 2.75);
|
|
142
|
+
font-weight: 400;
|
|
143
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "Foundations",
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: "padded",
|
|
7
|
+
},
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
} satisfies Meta;
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
|
|
14
|
+
// Background colors story
|
|
15
|
+
export const Typography: Story = {
|
|
16
|
+
render: () => <p className="font-h1-800">font-h1-800</p>,
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
const MOBILE_BREAKPOINT = 768
|
|
4
|
+
|
|
5
|
+
export function useIsMobile() {
|
|
6
|
+
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
|
|
7
|
+
|
|
8
|
+
React.useEffect(() => {
|
|
9
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
|
|
10
|
+
const onChange = () => {
|
|
11
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
|
12
|
+
}
|
|
13
|
+
mql.addEventListener("change", onChange)
|
|
14
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
|
15
|
+
return () => mql.removeEventListener("change", onChange)
|
|
16
|
+
}, [])
|
|
17
|
+
|
|
18
|
+
return !!isMobile
|
|
19
|
+
}
|
package/src/index.css
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
@import "./foundations/color.css";
|
|
4
|
+
@import "./foundations/spacing.css";
|
|
5
|
+
@import "./foundations/typography.css";
|
|
6
|
+
|
|
7
|
+
@custom-variant dark (&:is(.dark *));
|
|
8
|
+
|
|
9
|
+
@theme inline {
|
|
10
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
11
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
12
|
+
--radius-lg: var(--radius);
|
|
13
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
14
|
+
--color-background: var(--background);
|
|
15
|
+
--color-foreground: var(--foreground);
|
|
16
|
+
--color-card: var(--card);
|
|
17
|
+
--color-card-foreground: var(--card-foreground);
|
|
18
|
+
--color-popover: var(--popover);
|
|
19
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
20
|
+
--color-primary: var(--primary);
|
|
21
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
22
|
+
--color-secondary: var(--secondary);
|
|
23
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
24
|
+
--color-muted: var(--muted);
|
|
25
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
26
|
+
--color-accent: var(--accent);
|
|
27
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
28
|
+
--color-destructive: var(--destructive);
|
|
29
|
+
--color-border: var(--border);
|
|
30
|
+
--color-input: var(--input);
|
|
31
|
+
--color-ring: var(--ring);
|
|
32
|
+
--color-chart-1: var(--chart-1);
|
|
33
|
+
--color-chart-2: var(--chart-2);
|
|
34
|
+
--color-chart-3: var(--chart-3);
|
|
35
|
+
--color-chart-4: var(--chart-4);
|
|
36
|
+
--color-chart-5: var(--chart-5);
|
|
37
|
+
--color-sidebar: var(--sidebar);
|
|
38
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
39
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
40
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
41
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
42
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
43
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
44
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
45
|
+
--radius-2xl: calc(var(--radius) + 8px);
|
|
46
|
+
--radius-3xl: calc(var(--radius) + 12px);
|
|
47
|
+
--radius-4xl: calc(var(--radius) + 16px);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:root {
|
|
51
|
+
--radius: 0.625rem;
|
|
52
|
+
--background: oklch(1 0 0);
|
|
53
|
+
--foreground: oklch(0.145 0 0);
|
|
54
|
+
--card: oklch(1 0 0);
|
|
55
|
+
--card-foreground: oklch(0.145 0 0);
|
|
56
|
+
--popover: oklch(1 0 0);
|
|
57
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
58
|
+
--primary: oklch(0.205 0 0);
|
|
59
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
60
|
+
--secondary: oklch(0.97 0 0);
|
|
61
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
62
|
+
--muted: oklch(0.97 0 0);
|
|
63
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
64
|
+
--accent: oklch(0.97 0 0);
|
|
65
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
66
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
67
|
+
--border: oklch(0.922 0 0);
|
|
68
|
+
--input: oklch(0.922 0 0);
|
|
69
|
+
--ring: oklch(0.708 0 0);
|
|
70
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
71
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
72
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
73
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
74
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
75
|
+
--sidebar: oklch(0.985 0 0);
|
|
76
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
77
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
78
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
79
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
80
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
81
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
82
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.dark {
|
|
86
|
+
--background: oklch(0.145 0 0);
|
|
87
|
+
--foreground: oklch(0.985 0 0);
|
|
88
|
+
--card: oklch(0.205 0 0);
|
|
89
|
+
--card-foreground: oklch(0.985 0 0);
|
|
90
|
+
--popover: oklch(0.205 0 0);
|
|
91
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
92
|
+
--primary: oklch(0.922 0 0);
|
|
93
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
94
|
+
--secondary: oklch(0.269 0 0);
|
|
95
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
96
|
+
--muted: oklch(0.269 0 0);
|
|
97
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
98
|
+
--accent: oklch(0.269 0 0);
|
|
99
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
100
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
101
|
+
--border: oklch(1 0 0 / 10%);
|
|
102
|
+
--input: oklch(1 0 0 / 15%);
|
|
103
|
+
--ring: oklch(0.556 0 0);
|
|
104
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
105
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
106
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
107
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
108
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
109
|
+
--sidebar: oklch(0.205 0 0);
|
|
110
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
111
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
112
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
113
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
114
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
115
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
116
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.test {
|
|
120
|
+
--background: oklch(0.9721 0.0158 110.5501);
|
|
121
|
+
--foreground: oklch(0.5066 0.2501 271.8903);
|
|
122
|
+
--card: oklch(0.9721 0.0158 110.5501);
|
|
123
|
+
--card-foreground: oklch(0.5066 0.2501 271.8903);
|
|
124
|
+
--popover: oklch(0.9721 0.0158 110.5501);
|
|
125
|
+
--popover-foreground: oklch(0.5066 0.2501 271.8903);
|
|
126
|
+
--primary: oklch(0.5066 0.2501 271.8903);
|
|
127
|
+
--primary-foreground: oklch(1 0 0);
|
|
128
|
+
--secondary: oklch(1 0 0);
|
|
129
|
+
--secondary-foreground: oklch(0.5066 0.2501 271.8903);
|
|
130
|
+
--muted: oklch(0.9189 0.0147 106.6853);
|
|
131
|
+
--muted-foreground: oklch(0.5066 0.2501 271.8903);
|
|
132
|
+
--accent: oklch(0.9168 0.0214 109.7161);
|
|
133
|
+
--accent-foreground: oklch(0.4486 0.2266 271.5512);
|
|
134
|
+
--destructive: oklch(0.63 0.19 23.03);
|
|
135
|
+
--destructive-foreground: oklch(1 0 0);
|
|
136
|
+
--border: oklch(0.5066 0.2501 271.8903);
|
|
137
|
+
--input: oklch(0.5066 0.2501 271.8903);
|
|
138
|
+
--ring: oklch(0.468 0.2721 279.6007);
|
|
139
|
+
--chart-1: oklch(0.5066 0.2501 271.8903);
|
|
140
|
+
--chart-2: oklch(0.55 0.22 264.53);
|
|
141
|
+
--chart-3: oklch(0.72 0 0);
|
|
142
|
+
--chart-4: oklch(0.92 0 0);
|
|
143
|
+
--chart-5: oklch(0.56 0 0);
|
|
144
|
+
--sidebar: oklch(0.9721 0.0158 110.5501);
|
|
145
|
+
--sidebar-foreground: oklch(0.5066 0.2501 271.8903);
|
|
146
|
+
--sidebar-primary: oklch(0.5066 0.2501 271.8903);
|
|
147
|
+
--sidebar-primary-foreground: oklch(1 0 0);
|
|
148
|
+
--sidebar-accent: oklch(0.9168 0.0214 109.7161);
|
|
149
|
+
--sidebar-accent-foreground: oklch(0.4486 0.2266 271.5512);
|
|
150
|
+
--sidebar-border: oklch(0.4486 0.2266 271.5512);
|
|
151
|
+
--sidebar-ring: oklch(0.4486 0.2266 271.5512);
|
|
152
|
+
--font-sans: Geist Mono, sans-serif;
|
|
153
|
+
--radius: 0rem;
|
|
154
|
+
--shadow-2xs: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.07);
|
|
155
|
+
--shadow-xs: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.07);
|
|
156
|
+
--shadow-sm: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.15),
|
|
157
|
+
4px 1px 2px -1px hsl(238.3146 85.5769% 59.2157% / 0.15);
|
|
158
|
+
--shadow: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.15),
|
|
159
|
+
4px 1px 2px -1px hsl(238.3146 85.5769% 59.2157% / 0.15);
|
|
160
|
+
--shadow-md: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.15),
|
|
161
|
+
4px 2px 4px -1px hsl(238.3146 85.5769% 59.2157% / 0.15);
|
|
162
|
+
--shadow-lg: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.15),
|
|
163
|
+
4px 4px 6px -1px hsl(238.3146 85.5769% 59.2157% / 0.15);
|
|
164
|
+
--shadow-xl: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.15),
|
|
165
|
+
4px 8px 10px -1px hsl(238.3146 85.5769% 59.2157% / 0.15);
|
|
166
|
+
--shadow-2xl: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.38);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@layer base {
|
|
170
|
+
* {
|
|
171
|
+
@apply border-border outline-ring/50;
|
|
172
|
+
}
|
|
173
|
+
body {
|
|
174
|
+
@apply bg-background text-foreground;
|
|
175
|
+
}
|
|
176
|
+
}
|