@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
package/src/index.ts
ADDED
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import "./index.css";
|
|
2
|
+
|
|
3
|
+
export { ThemeProvider } from "./foundations/ThemeProvider";
|
|
4
|
+
|
|
5
|
+
// UI Components
|
|
6
|
+
export {
|
|
7
|
+
Accordion,
|
|
8
|
+
AccordionItem,
|
|
9
|
+
AccordionTrigger,
|
|
10
|
+
AccordionContent,
|
|
11
|
+
} from "./components/accordion";
|
|
12
|
+
export { Alert, AlertTitle, AlertDescription } from "./components/alert";
|
|
13
|
+
export {
|
|
14
|
+
AlertDialog,
|
|
15
|
+
AlertDialogPortal,
|
|
16
|
+
AlertDialogOverlay,
|
|
17
|
+
AlertDialogTrigger,
|
|
18
|
+
AlertDialogContent,
|
|
19
|
+
AlertDialogHeader,
|
|
20
|
+
AlertDialogFooter,
|
|
21
|
+
AlertDialogTitle,
|
|
22
|
+
AlertDialogDescription,
|
|
23
|
+
AlertDialogAction,
|
|
24
|
+
AlertDialogCancel,
|
|
25
|
+
} from "./components/alert-dialog";
|
|
26
|
+
export { AspectRatio } from "./components/aspect-ratio";
|
|
27
|
+
export { Avatar, AvatarImage, AvatarFallback } from "./components/avatar";
|
|
28
|
+
export { Badge, badgeVariants } from "./components/badge";
|
|
29
|
+
export {
|
|
30
|
+
Breadcrumb,
|
|
31
|
+
BreadcrumbList,
|
|
32
|
+
BreadcrumbItem,
|
|
33
|
+
BreadcrumbLink,
|
|
34
|
+
BreadcrumbPage,
|
|
35
|
+
BreadcrumbSeparator,
|
|
36
|
+
BreadcrumbEllipsis,
|
|
37
|
+
} from "./components/breadcrumb";
|
|
38
|
+
export { Button, buttonVariants } from "./components/button";
|
|
39
|
+
export {
|
|
40
|
+
ButtonGroup,
|
|
41
|
+
ButtonGroupSeparator,
|
|
42
|
+
ButtonGroupText,
|
|
43
|
+
buttonGroupVariants,
|
|
44
|
+
} from "./components/button-group";
|
|
45
|
+
export { Calendar, CalendarDayButton } from "./components/calendar";
|
|
46
|
+
export {
|
|
47
|
+
type CarouselApi,
|
|
48
|
+
Carousel,
|
|
49
|
+
CarouselContent,
|
|
50
|
+
CarouselItem,
|
|
51
|
+
CarouselPrevious,
|
|
52
|
+
CarouselNext,
|
|
53
|
+
} from "./components/carousel";
|
|
54
|
+
export {
|
|
55
|
+
type ChartConfig,
|
|
56
|
+
ChartContainer,
|
|
57
|
+
ChartTooltip,
|
|
58
|
+
ChartTooltipContent,
|
|
59
|
+
ChartLegend,
|
|
60
|
+
ChartLegendContent,
|
|
61
|
+
ChartStyle,
|
|
62
|
+
} from "./components/chart";
|
|
63
|
+
export {
|
|
64
|
+
Card,
|
|
65
|
+
CardHeader,
|
|
66
|
+
CardFooter,
|
|
67
|
+
CardTitle,
|
|
68
|
+
CardAction,
|
|
69
|
+
CardDescription,
|
|
70
|
+
CardContent,
|
|
71
|
+
} from "./components/card";
|
|
72
|
+
export { Checkbox } from "./components/checkbox";
|
|
73
|
+
export {
|
|
74
|
+
Collapsible,
|
|
75
|
+
CollapsibleTrigger,
|
|
76
|
+
CollapsibleContent,
|
|
77
|
+
} from "./components/collapsible";
|
|
78
|
+
export {
|
|
79
|
+
Command,
|
|
80
|
+
CommandDialog,
|
|
81
|
+
CommandInput,
|
|
82
|
+
CommandList,
|
|
83
|
+
CommandEmpty,
|
|
84
|
+
CommandGroup,
|
|
85
|
+
CommandItem,
|
|
86
|
+
CommandShortcut,
|
|
87
|
+
CommandSeparator,
|
|
88
|
+
} from "./components/command";
|
|
89
|
+
export {
|
|
90
|
+
ContextMenu,
|
|
91
|
+
ContextMenuTrigger,
|
|
92
|
+
ContextMenuContent,
|
|
93
|
+
ContextMenuItem,
|
|
94
|
+
ContextMenuCheckboxItem,
|
|
95
|
+
ContextMenuRadioItem,
|
|
96
|
+
ContextMenuLabel,
|
|
97
|
+
ContextMenuSeparator,
|
|
98
|
+
ContextMenuShortcut,
|
|
99
|
+
ContextMenuGroup,
|
|
100
|
+
ContextMenuPortal,
|
|
101
|
+
ContextMenuSub,
|
|
102
|
+
ContextMenuSubContent,
|
|
103
|
+
ContextMenuSubTrigger,
|
|
104
|
+
ContextMenuRadioGroup,
|
|
105
|
+
} from "./components/context-menu";
|
|
106
|
+
export {
|
|
107
|
+
Dialog,
|
|
108
|
+
DialogClose,
|
|
109
|
+
DialogContent,
|
|
110
|
+
DialogDescription,
|
|
111
|
+
DialogFooter,
|
|
112
|
+
DialogHeader,
|
|
113
|
+
DialogOverlay,
|
|
114
|
+
DialogPortal,
|
|
115
|
+
DialogTitle,
|
|
116
|
+
DialogTrigger,
|
|
117
|
+
} from "./components/dialog";
|
|
118
|
+
export {
|
|
119
|
+
Drawer,
|
|
120
|
+
DrawerPortal,
|
|
121
|
+
DrawerOverlay,
|
|
122
|
+
DrawerTrigger,
|
|
123
|
+
DrawerClose,
|
|
124
|
+
DrawerContent,
|
|
125
|
+
DrawerHeader,
|
|
126
|
+
DrawerFooter,
|
|
127
|
+
DrawerTitle,
|
|
128
|
+
DrawerDescription,
|
|
129
|
+
} from "./components/drawer";
|
|
130
|
+
export {
|
|
131
|
+
DropdownMenu,
|
|
132
|
+
DropdownMenuPortal,
|
|
133
|
+
DropdownMenuTrigger,
|
|
134
|
+
DropdownMenuContent,
|
|
135
|
+
DropdownMenuGroup,
|
|
136
|
+
DropdownMenuLabel,
|
|
137
|
+
DropdownMenuItem,
|
|
138
|
+
DropdownMenuCheckboxItem,
|
|
139
|
+
DropdownMenuRadioGroup,
|
|
140
|
+
DropdownMenuRadioItem,
|
|
141
|
+
DropdownMenuSeparator,
|
|
142
|
+
DropdownMenuShortcut,
|
|
143
|
+
DropdownMenuSub,
|
|
144
|
+
DropdownMenuSubTrigger,
|
|
145
|
+
DropdownMenuSubContent,
|
|
146
|
+
} from "./components/dropdown-menu";
|
|
147
|
+
export {
|
|
148
|
+
Empty,
|
|
149
|
+
EmptyHeader,
|
|
150
|
+
EmptyTitle,
|
|
151
|
+
EmptyDescription,
|
|
152
|
+
EmptyContent,
|
|
153
|
+
EmptyMedia,
|
|
154
|
+
} from "./components/empty";
|
|
155
|
+
export {
|
|
156
|
+
Field,
|
|
157
|
+
FieldLabel,
|
|
158
|
+
FieldDescription,
|
|
159
|
+
FieldError,
|
|
160
|
+
FieldGroup,
|
|
161
|
+
FieldLegend,
|
|
162
|
+
FieldSeparator,
|
|
163
|
+
FieldSet,
|
|
164
|
+
FieldContent,
|
|
165
|
+
FieldTitle,
|
|
166
|
+
} from "./components/field";
|
|
167
|
+
export {
|
|
168
|
+
useFormField,
|
|
169
|
+
Form,
|
|
170
|
+
FormItem,
|
|
171
|
+
FormLabel,
|
|
172
|
+
FormControl,
|
|
173
|
+
FormDescription,
|
|
174
|
+
FormMessage,
|
|
175
|
+
FormField,
|
|
176
|
+
} from "./components/form";
|
|
177
|
+
export {
|
|
178
|
+
HoverCard,
|
|
179
|
+
HoverCardTrigger,
|
|
180
|
+
HoverCardContent,
|
|
181
|
+
} from "./components/hover-card";
|
|
182
|
+
export {
|
|
183
|
+
InputGroup,
|
|
184
|
+
InputGroupAddon,
|
|
185
|
+
InputGroupButton,
|
|
186
|
+
InputGroupText,
|
|
187
|
+
InputGroupInput,
|
|
188
|
+
InputGroupTextarea,
|
|
189
|
+
} from "./components/input-group";
|
|
190
|
+
export { Input } from "./components/input";
|
|
191
|
+
export {
|
|
192
|
+
InputOTP,
|
|
193
|
+
InputOTPGroup,
|
|
194
|
+
InputOTPSlot,
|
|
195
|
+
InputOTPSeparator,
|
|
196
|
+
} from "./components/input-otp";
|
|
197
|
+
export {
|
|
198
|
+
Item,
|
|
199
|
+
ItemMedia,
|
|
200
|
+
ItemContent,
|
|
201
|
+
ItemActions,
|
|
202
|
+
ItemGroup,
|
|
203
|
+
ItemSeparator,
|
|
204
|
+
ItemTitle,
|
|
205
|
+
ItemDescription,
|
|
206
|
+
ItemHeader,
|
|
207
|
+
ItemFooter,
|
|
208
|
+
} from "./components/item";
|
|
209
|
+
export { Kbd, KbdGroup } from "./components/kbd";
|
|
210
|
+
export { Label } from "./components/label";
|
|
211
|
+
export {
|
|
212
|
+
Menubar,
|
|
213
|
+
MenubarPortal,
|
|
214
|
+
MenubarMenu,
|
|
215
|
+
MenubarTrigger,
|
|
216
|
+
MenubarContent,
|
|
217
|
+
MenubarGroup,
|
|
218
|
+
MenubarSeparator,
|
|
219
|
+
MenubarLabel,
|
|
220
|
+
MenubarItem,
|
|
221
|
+
MenubarShortcut,
|
|
222
|
+
MenubarCheckboxItem,
|
|
223
|
+
MenubarRadioGroup,
|
|
224
|
+
MenubarRadioItem,
|
|
225
|
+
MenubarSub,
|
|
226
|
+
MenubarSubTrigger,
|
|
227
|
+
MenubarSubContent,
|
|
228
|
+
} from "./components/menubar";
|
|
229
|
+
export {
|
|
230
|
+
NavigationMenu,
|
|
231
|
+
NavigationMenuList,
|
|
232
|
+
NavigationMenuItem,
|
|
233
|
+
NavigationMenuContent,
|
|
234
|
+
NavigationMenuTrigger,
|
|
235
|
+
NavigationMenuLink,
|
|
236
|
+
NavigationMenuIndicator,
|
|
237
|
+
NavigationMenuViewport,
|
|
238
|
+
navigationMenuTriggerStyle,
|
|
239
|
+
} from "./components/navigation-menu";
|
|
240
|
+
export {
|
|
241
|
+
Pagination,
|
|
242
|
+
PaginationContent,
|
|
243
|
+
PaginationLink,
|
|
244
|
+
PaginationItem,
|
|
245
|
+
PaginationPrevious,
|
|
246
|
+
PaginationNext,
|
|
247
|
+
PaginationEllipsis,
|
|
248
|
+
} from "./components/pagination";
|
|
249
|
+
export {
|
|
250
|
+
Popover,
|
|
251
|
+
PopoverTrigger,
|
|
252
|
+
PopoverContent,
|
|
253
|
+
PopoverAnchor,
|
|
254
|
+
} from "./components/popover";
|
|
255
|
+
export { Progress } from "./components/progress";
|
|
256
|
+
export { RadioGroup, RadioGroupItem } from "./components/radio-group";
|
|
257
|
+
export {
|
|
258
|
+
ResizablePanelGroup,
|
|
259
|
+
ResizablePanel,
|
|
260
|
+
ResizableHandle,
|
|
261
|
+
} from "./components/resizable";
|
|
262
|
+
export { ScrollArea, ScrollBar } from "./components/scroll-area";
|
|
263
|
+
export {
|
|
264
|
+
Select,
|
|
265
|
+
SelectContent,
|
|
266
|
+
SelectGroup,
|
|
267
|
+
SelectItem,
|
|
268
|
+
SelectLabel,
|
|
269
|
+
SelectScrollDownButton,
|
|
270
|
+
SelectScrollUpButton,
|
|
271
|
+
SelectSeparator,
|
|
272
|
+
SelectTrigger,
|
|
273
|
+
SelectValue,
|
|
274
|
+
} from "./components/select";
|
|
275
|
+
export { Separator } from "./components/separator";
|
|
276
|
+
export {
|
|
277
|
+
Sheet,
|
|
278
|
+
SheetTrigger,
|
|
279
|
+
SheetClose,
|
|
280
|
+
SheetContent,
|
|
281
|
+
SheetHeader,
|
|
282
|
+
SheetFooter,
|
|
283
|
+
SheetTitle,
|
|
284
|
+
SheetDescription,
|
|
285
|
+
} from "./components/sheet";
|
|
286
|
+
export {
|
|
287
|
+
Sidebar,
|
|
288
|
+
SidebarContent,
|
|
289
|
+
SidebarFooter,
|
|
290
|
+
SidebarGroup,
|
|
291
|
+
SidebarGroupAction,
|
|
292
|
+
SidebarGroupContent,
|
|
293
|
+
SidebarGroupLabel,
|
|
294
|
+
SidebarHeader,
|
|
295
|
+
SidebarInput,
|
|
296
|
+
SidebarInset,
|
|
297
|
+
SidebarMenu,
|
|
298
|
+
SidebarMenuAction,
|
|
299
|
+
SidebarMenuBadge,
|
|
300
|
+
SidebarMenuButton,
|
|
301
|
+
SidebarMenuItem,
|
|
302
|
+
SidebarMenuSkeleton,
|
|
303
|
+
SidebarMenuSub,
|
|
304
|
+
SidebarMenuSubButton,
|
|
305
|
+
SidebarMenuSubItem,
|
|
306
|
+
SidebarProvider,
|
|
307
|
+
SidebarRail,
|
|
308
|
+
SidebarSeparator,
|
|
309
|
+
SidebarTrigger,
|
|
310
|
+
useSidebar,
|
|
311
|
+
} from "./components/sidebar";
|
|
312
|
+
export { Skeleton } from "./components/skeleton";
|
|
313
|
+
export { Slider } from "./components/slider";
|
|
314
|
+
export { Toaster } from "./components/sonner";
|
|
315
|
+
export { Spinner } from "./components/spinner";
|
|
316
|
+
export { Switch } from "./components/switch";
|
|
317
|
+
export {
|
|
318
|
+
Table,
|
|
319
|
+
TableHeader,
|
|
320
|
+
TableBody,
|
|
321
|
+
TableFooter,
|
|
322
|
+
TableHead,
|
|
323
|
+
TableRow,
|
|
324
|
+
TableCell,
|
|
325
|
+
TableCaption,
|
|
326
|
+
} from "./components/table";
|
|
327
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent } from "./components/tabs";
|
|
328
|
+
export { Textarea } from "./components/textarea";
|
|
329
|
+
export { Toggle, toggleVariants } from "./components/toggle";
|
|
330
|
+
export { ToggleGroup, ToggleGroupItem } from "./components/toggle-group";
|
|
331
|
+
export {
|
|
332
|
+
Tooltip,
|
|
333
|
+
TooltipTrigger,
|
|
334
|
+
TooltipContent,
|
|
335
|
+
TooltipProvider,
|
|
336
|
+
} from "./components/tooltip";
|
package/src/lib/utils.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
|
|
10
|
+
/* Bundler mode */
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"allowImportingTsExtensions": true,
|
|
13
|
+
"verbatimModuleSyntax": true,
|
|
14
|
+
"moduleDetection": "force",
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
"jsx": "react-jsx",
|
|
17
|
+
|
|
18
|
+
/* Linting */
|
|
19
|
+
"strict": true,
|
|
20
|
+
"noUnusedLocals": true,
|
|
21
|
+
"noUnusedParameters": true,
|
|
22
|
+
"erasableSyntaxOnly": true,
|
|
23
|
+
"noFallthroughCasesInSwitch": true,
|
|
24
|
+
"noUncheckedSideEffectImports": true,
|
|
25
|
+
|
|
26
|
+
"baseUrl": ".",
|
|
27
|
+
"paths": {
|
|
28
|
+
"@/*": ["./src/*"]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"include": ["src", ".storybook/*.tsx"],
|
|
32
|
+
"exclude": ["node_modules", "dist"]
|
|
33
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
+
"target": "ES2023",
|
|
5
|
+
"lib": ["ES2023"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"verbatimModuleSyntax": true,
|
|
13
|
+
"moduleDetection": "force",
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
|
|
16
|
+
/* Linting */
|
|
17
|
+
"strict": true,
|
|
18
|
+
"noUnusedLocals": true,
|
|
19
|
+
"noUnusedParameters": true,
|
|
20
|
+
"erasableSyntaxOnly": true,
|
|
21
|
+
"noFallthroughCasesInSwitch": true,
|
|
22
|
+
"noUncheckedSideEffectImports": true
|
|
23
|
+
},
|
|
24
|
+
"include": ["vite.config.ts"]
|
|
25
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import react from "@vitejs/plugin-react";
|
|
3
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
4
|
+
import path from "path";
|
|
5
|
+
|
|
6
|
+
// https://vite.dev/config/
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [react(), tailwindcss()],
|
|
9
|
+
resolve: {
|
|
10
|
+
alias: {
|
|
11
|
+
"@": path.resolve(__dirname, "./src"),
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
build: {
|
|
15
|
+
lib: {
|
|
16
|
+
entry: "./src/index.ts",
|
|
17
|
+
name: "MzcDesignSystem",
|
|
18
|
+
fileName: (format) => `design-system.${format}.js`,
|
|
19
|
+
},
|
|
20
|
+
rollupOptions: {
|
|
21
|
+
external: ["react", "react-dom"],
|
|
22
|
+
output: {
|
|
23
|
+
globals: {
|
|
24
|
+
react: "React",
|
|
25
|
+
"react-dom": "ReactDOM",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
});
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineConfig, mergeConfig } from "vitest/config";
|
|
2
|
+
import viteConfig from "./vite.config";
|
|
3
|
+
|
|
4
|
+
export default mergeConfig(
|
|
5
|
+
viteConfig,
|
|
6
|
+
defineConfig({
|
|
7
|
+
test: {
|
|
8
|
+
environment: "jsdom",
|
|
9
|
+
globals: true,
|
|
10
|
+
setupFiles: ["./src/test/setup.ts"],
|
|
11
|
+
coverage: {
|
|
12
|
+
provider: "v8",
|
|
13
|
+
reporter: ["text", "json"],
|
|
14
|
+
exclude: [
|
|
15
|
+
"node_modules/",
|
|
16
|
+
"src/test/",
|
|
17
|
+
"**/*.d.ts",
|
|
18
|
+
"**/*.config.*",
|
|
19
|
+
"**/dist/**",
|
|
20
|
+
"**/*.stories.*",
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
);
|