@mzc-fe/design-system 0.0.5 → 0.0.7-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/components/accordion/accordion.tsx +114 -0
- package/components/accordion/index.ts +1 -0
- package/components/alert/alert.tsx +97 -0
- package/components/alert/index.ts +1 -0
- package/components/alert-dialog/alert-dialog.tsx +190 -0
- package/components/alert-dialog/index.ts +1 -0
- package/components/aspect-ratio/aspect-ratio.tsx +23 -0
- package/components/aspect-ratio/index.ts +1 -0
- package/components/avatar/avatar.tsx +62 -0
- package/components/avatar/index.ts +1 -0
- package/components/badge/badge.tsx +58 -0
- package/components/badge/index.ts +1 -0
- package/components/breadcrumb/breadcrumb.tsx +132 -0
- package/components/breadcrumb/index.ts +1 -0
- package/components/button/button.tsx +77 -0
- package/components/button/index.ts +1 -0
- package/components/button-group/button-group.tsx +99 -0
- package/components/button-group/index.ts +1 -0
- package/components/calendar/calendar.tsx +235 -0
- package/components/calendar/index.ts +1 -0
- package/components/card/card.tsx +107 -0
- package/components/card/index.ts +1 -0
- package/components/carousel/carousel.tsx +263 -0
- package/components/carousel/index.ts +1 -0
- package/components/chart/chart.tsx +377 -0
- package/components/chart/index.ts +1 -0
- package/components/checkbox/checkbox.tsx +41 -0
- package/components/checkbox/index.ts +1 -0
- package/components/collapsible/collapsible.tsx +44 -0
- package/components/collapsible/index.ts +1 -0
- package/components/command/command.tsx +201 -0
- package/components/command/index.ts +1 -0
- package/components/context-menu/context-menu.tsx +270 -0
- package/components/context-menu/index.ts +1 -0
- package/components/dialog/dialog.tsx +166 -0
- package/components/dialog/index.ts +1 -0
- package/components/drawer/drawer.tsx +154 -0
- package/components/drawer/index.ts +1 -0
- package/components/dropdown-menu/dropdown-menu.tsx +276 -0
- package/components/dropdown-menu/index.ts +1 -0
- package/components/empty/empty.tsx +129 -0
- package/components/empty/index.ts +1 -0
- package/components/field/field.tsx +272 -0
- package/components/field/index.ts +1 -0
- package/components/form/form.tsx +197 -0
- package/components/form/index.ts +1 -0
- package/components/hover-card/hover-card.tsx +57 -0
- package/components/hover-card/index.ts +1 -0
- package/components/input/index.ts +1 -0
- package/components/input/input.tsx +31 -0
- package/components/input-group/index.ts +1 -0
- package/components/input-group/input-group.tsx +189 -0
- package/components/input-otp/index.ts +1 -0
- package/components/input-otp/input-otp.tsx +99 -0
- package/components/item/index.ts +1 -0
- package/components/item/item.tsx +225 -0
- package/components/kbd/index.ts +1 -0
- package/components/kbd/kbd.tsx +38 -0
- package/components/label/index.ts +1 -0
- package/components/label/label.tsx +33 -0
- package/components/menubar/index.ts +1 -0
- package/components/menubar/menubar.tsx +299 -0
- package/components/navigation-menu/index.ts +1 -0
- package/components/navigation-menu/navigation-menu.tsx +194 -0
- package/components/pagination/index.ts +1 -0
- package/components/pagination/pagination.tsx +153 -0
- package/components/popover/index.ts +1 -0
- package/components/popover/popover.tsx +106 -0
- package/components/progress/index.ts +1 -0
- package/components/progress/progress.tsx +39 -0
- package/components/radio-group/index.ts +1 -0
- package/components/radio-group/radio-group.tsx +57 -0
- package/components/resizable/index.ts +1 -0
- package/components/resizable/resizable.tsx +73 -0
- package/components/scroll-area/index.ts +1 -0
- package/components/scroll-area/scroll-area.tsx +72 -0
- package/components/select/index.ts +1 -0
- package/components/select/select.tsx +213 -0
- package/components/separator/index.ts +1 -0
- package/components/separator/separator.tsx +39 -0
- package/components/sheet/index.ts +1 -0
- package/components/sheet/sheet.tsx +160 -0
- package/components/sidebar/index.ts +1 -0
- package/components/sidebar/sidebar.tsx +776 -0
- package/components/skeleton/index.ts +1 -0
- package/components/skeleton/skeleton.tsx +21 -0
- package/components/slider/index.ts +1 -0
- package/components/slider/slider.tsx +75 -0
- package/components/sonner/index.ts +2 -0
- package/components/sonner/sonner.tsx +52 -0
- package/components/spinner/index.ts +1 -0
- package/components/spinner/spinner.tsx +26 -0
- package/components/switch/index.ts +1 -0
- package/components/switch/switch.tsx +39 -0
- package/components/table/index.ts +1 -0
- package/components/table/table.tsx +140 -0
- package/components/tabs/index.ts +1 -0
- package/components/tabs/tabs.tsx +94 -0
- package/components/textarea/index.ts +1 -0
- package/components/textarea/textarea.tsx +26 -0
- package/components/toggle/index.ts +1 -0
- package/components/toggle/toggle.tsx +58 -0
- package/components/toggle-group/index.ts +1 -0
- package/components/toggle-group/toggle-group.tsx +97 -0
- package/components/tooltip/index.ts +1 -0
- package/components/tooltip/tooltip.tsx +82 -0
- package/dist/components/accordion/accordion.d.ts +50 -0
- package/dist/components/alert/alert.d.ts +31 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +35 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +12 -0
- package/dist/components/avatar/avatar.d.ts +11 -0
- package/dist/components/badge/badge.d.ts +12 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +23 -0
- package/dist/components/button/button.d.ts +15 -0
- package/dist/components/button-group/button-group.d.ts +16 -0
- package/dist/components/calendar/calendar.d.ts +15 -0
- package/dist/components/card/card.d.ts +15 -0
- package/dist/components/carousel/carousel.d.ts +24 -0
- package/dist/components/chart/chart.d.ts +20 -0
- package/dist/components/checkbox/checkbox.d.ts +9 -0
- package/dist/components/collapsible/collapsible.d.ts +13 -0
- package/dist/components/command/command.d.ts +18 -0
- package/dist/components/context-menu/context-menu.d.ts +18 -0
- package/dist/components/dialog/dialog.d.ts +25 -0
- package/dist/components/drawer/drawer.d.ts +18 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +21 -0
- package/dist/components/empty/empty.d.ts +25 -0
- package/dist/components/field/field.d.ts +26 -0
- package/dist/components/form/form.d.ts +30 -1
- package/dist/components/hover-card/hover-card.d.ts +13 -0
- package/dist/components/input/input.d.ts +10 -0
- package/dist/components/input-group/input-group.d.ts +19 -0
- package/dist/components/input-otp/input-otp.d.ts +23 -0
- package/dist/components/item/item.d.ts +33 -1
- package/dist/components/kbd/kbd.d.ts +10 -0
- package/dist/components/label/label.d.ts +9 -0
- package/dist/components/menubar/menubar.d.ts +25 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +26 -0
- package/dist/components/pagination/pagination.d.ts +26 -0
- package/dist/components/popover/popover.d.ts +17 -0
- package/dist/components/progress/progress.d.ts +10 -0
- package/dist/components/radio-group/radio-group.d.ts +12 -0
- package/dist/components/resizable/resizable.d.ts +19 -0
- package/dist/components/scroll-area/scroll-area.d.ts +14 -0
- package/dist/components/select/select.d.ts +25 -0
- package/dist/components/separator/separator.d.ts +11 -0
- package/dist/components/sheet/sheet.d.ts +23 -0
- package/dist/components/sidebar/sidebar.d.ts +50 -0
- package/dist/components/skeleton/skeleton.d.ts +8 -0
- package/dist/components/slider/slider.d.ts +12 -0
- package/dist/components/sonner/sonner.d.ts +14 -0
- package/dist/components/spinner/spinner.d.ts +9 -0
- package/dist/components/switch/switch.d.ts +8 -0
- package/dist/components/table/table.d.ts +26 -0
- package/dist/components/tabs/tabs.d.ts +16 -6
- package/dist/components/textarea/textarea.d.ts +8 -0
- package/dist/components/toggle/toggle.d.ts +13 -0
- package/dist/components/toggle-group/toggle-group.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +21 -0
- package/dist/design-system.css +1 -1
- package/dist/design-system.es.js +3493 -28470
- package/dist/design-system.umd.js +4 -257
- package/dist/index.d.ts +1 -1
- package/foundations/ThemeProvider.tsx +77 -0
- package/foundations/color.css +232 -0
- package/foundations/palette.css +249 -0
- package/foundations/spacing.css +8 -0
- package/foundations/typography.css +143 -0
- package/hooks/use-mobile.ts +19 -0
- package/index.css +173 -0
- package/index.ts +339 -0
- package/lib/utils.ts +6 -0
- package/package.json +40 -19
- package/README.md +0 -184
|
@@ -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/index.css
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
|
|
4
|
+
@custom-variant dark (&:is(.dark *));
|
|
5
|
+
|
|
6
|
+
@theme inline {
|
|
7
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
8
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
9
|
+
--radius-lg: var(--radius);
|
|
10
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
11
|
+
--color-background: var(--background);
|
|
12
|
+
--color-foreground: var(--foreground);
|
|
13
|
+
--color-card: var(--card);
|
|
14
|
+
--color-card-foreground: var(--card-foreground);
|
|
15
|
+
--color-popover: var(--popover);
|
|
16
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
17
|
+
--color-primary: var(--primary);
|
|
18
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
19
|
+
--color-secondary: var(--secondary);
|
|
20
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
21
|
+
--color-muted: var(--muted);
|
|
22
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
23
|
+
--color-accent: var(--accent);
|
|
24
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
25
|
+
--color-destructive: var(--destructive);
|
|
26
|
+
--color-border: var(--border);
|
|
27
|
+
--color-input: var(--input);
|
|
28
|
+
--color-ring: var(--ring);
|
|
29
|
+
--color-chart-1: var(--chart-1);
|
|
30
|
+
--color-chart-2: var(--chart-2);
|
|
31
|
+
--color-chart-3: var(--chart-3);
|
|
32
|
+
--color-chart-4: var(--chart-4);
|
|
33
|
+
--color-chart-5: var(--chart-5);
|
|
34
|
+
--color-sidebar: var(--sidebar);
|
|
35
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
36
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
37
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
38
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
39
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
40
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
41
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
42
|
+
--radius-2xl: calc(var(--radius) + 8px);
|
|
43
|
+
--radius-3xl: calc(var(--radius) + 12px);
|
|
44
|
+
--radius-4xl: calc(var(--radius) + 16px);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:root {
|
|
48
|
+
--radius: 0.625rem;
|
|
49
|
+
--background: oklch(1 0 0);
|
|
50
|
+
--foreground: oklch(0.145 0 0);
|
|
51
|
+
--card: oklch(1 0 0);
|
|
52
|
+
--card-foreground: oklch(0.145 0 0);
|
|
53
|
+
--popover: oklch(1 0 0);
|
|
54
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
55
|
+
--primary: oklch(0.205 0 0);
|
|
56
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
57
|
+
--secondary: oklch(0.97 0 0);
|
|
58
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
59
|
+
--muted: oklch(0.97 0 0);
|
|
60
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
61
|
+
--accent: oklch(0.97 0 0);
|
|
62
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
63
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
64
|
+
--border: oklch(0.922 0 0);
|
|
65
|
+
--input: oklch(0.922 0 0);
|
|
66
|
+
--ring: oklch(0.708 0 0);
|
|
67
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
68
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
69
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
70
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
71
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
72
|
+
--sidebar: oklch(0.985 0 0);
|
|
73
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
74
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
75
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
76
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
77
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
78
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
79
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.dark {
|
|
83
|
+
--background: oklch(0.145 0 0);
|
|
84
|
+
--foreground: oklch(0.985 0 0);
|
|
85
|
+
--card: oklch(0.205 0 0);
|
|
86
|
+
--card-foreground: oklch(0.985 0 0);
|
|
87
|
+
--popover: oklch(0.205 0 0);
|
|
88
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
89
|
+
--primary: oklch(0.922 0 0);
|
|
90
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
91
|
+
--secondary: oklch(0.269 0 0);
|
|
92
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
93
|
+
--muted: oklch(0.269 0 0);
|
|
94
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
95
|
+
--accent: oklch(0.269 0 0);
|
|
96
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
97
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
98
|
+
--border: oklch(1 0 0 / 10%);
|
|
99
|
+
--input: oklch(1 0 0 / 15%);
|
|
100
|
+
--ring: oklch(0.556 0 0);
|
|
101
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
102
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
103
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
104
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
105
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
106
|
+
--sidebar: oklch(0.205 0 0);
|
|
107
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
108
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
109
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
110
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
111
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
112
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
113
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.test {
|
|
117
|
+
--background: oklch(0.9721 0.0158 110.5501);
|
|
118
|
+
--foreground: oklch(0.5066 0.2501 271.8903);
|
|
119
|
+
--card: oklch(0.9721 0.0158 110.5501);
|
|
120
|
+
--card-foreground: oklch(0.5066 0.2501 271.8903);
|
|
121
|
+
--popover: oklch(0.9721 0.0158 110.5501);
|
|
122
|
+
--popover-foreground: oklch(0.5066 0.2501 271.8903);
|
|
123
|
+
--primary: oklch(0.5066 0.2501 271.8903);
|
|
124
|
+
--primary-foreground: oklch(1 0 0);
|
|
125
|
+
--secondary: oklch(1 0 0);
|
|
126
|
+
--secondary-foreground: oklch(0.5066 0.2501 271.8903);
|
|
127
|
+
--muted: oklch(0.9189 0.0147 106.6853);
|
|
128
|
+
--muted-foreground: oklch(0.5066 0.2501 271.8903);
|
|
129
|
+
--accent: oklch(0.9168 0.0214 109.7161);
|
|
130
|
+
--accent-foreground: oklch(0.4486 0.2266 271.5512);
|
|
131
|
+
--destructive: oklch(0.63 0.19 23.03);
|
|
132
|
+
--destructive-foreground: oklch(1 0 0);
|
|
133
|
+
--border: oklch(0.5066 0.2501 271.8903);
|
|
134
|
+
--input: oklch(0.5066 0.2501 271.8903);
|
|
135
|
+
--ring: oklch(0.468 0.2721 279.6007);
|
|
136
|
+
--chart-1: oklch(0.5066 0.2501 271.8903);
|
|
137
|
+
--chart-2: oklch(0.55 0.22 264.53);
|
|
138
|
+
--chart-3: oklch(0.72 0 0);
|
|
139
|
+
--chart-4: oklch(0.92 0 0);
|
|
140
|
+
--chart-5: oklch(0.56 0 0);
|
|
141
|
+
--sidebar: oklch(0.9721 0.0158 110.5501);
|
|
142
|
+
--sidebar-foreground: oklch(0.5066 0.2501 271.8903);
|
|
143
|
+
--sidebar-primary: oklch(0.5066 0.2501 271.8903);
|
|
144
|
+
--sidebar-primary-foreground: oklch(1 0 0);
|
|
145
|
+
--sidebar-accent: oklch(0.9168 0.0214 109.7161);
|
|
146
|
+
--sidebar-accent-foreground: oklch(0.4486 0.2266 271.5512);
|
|
147
|
+
--sidebar-border: oklch(0.4486 0.2266 271.5512);
|
|
148
|
+
--sidebar-ring: oklch(0.4486 0.2266 271.5512);
|
|
149
|
+
--font-sans: Geist Mono, sans-serif;
|
|
150
|
+
--radius: 0rem;
|
|
151
|
+
--shadow-2xs: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.07);
|
|
152
|
+
--shadow-xs: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.07);
|
|
153
|
+
--shadow-sm: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.15),
|
|
154
|
+
4px 1px 2px -1px hsl(238.3146 85.5769% 59.2157% / 0.15);
|
|
155
|
+
--shadow: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.15),
|
|
156
|
+
4px 1px 2px -1px hsl(238.3146 85.5769% 59.2157% / 0.15);
|
|
157
|
+
--shadow-md: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.15),
|
|
158
|
+
4px 2px 4px -1px hsl(238.3146 85.5769% 59.2157% / 0.15);
|
|
159
|
+
--shadow-lg: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.15),
|
|
160
|
+
4px 4px 6px -1px hsl(238.3146 85.5769% 59.2157% / 0.15);
|
|
161
|
+
--shadow-xl: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.15),
|
|
162
|
+
4px 8px 10px -1px hsl(238.3146 85.5769% 59.2157% / 0.15);
|
|
163
|
+
--shadow-2xl: 4px 4px 0px 0px hsl(238.3146 85.5769% 59.2157% / 0.38);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@layer base {
|
|
167
|
+
* {
|
|
168
|
+
@apply border-border outline-ring/50;
|
|
169
|
+
}
|
|
170
|
+
body {
|
|
171
|
+
@apply bg-background text-foreground;
|
|
172
|
+
}
|
|
173
|
+
}
|
package/index.ts
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
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
|
+
PopoverHeader,
|
|
255
|
+
PopoverTitle,
|
|
256
|
+
PopoverDescription,
|
|
257
|
+
} from "./components/popover";
|
|
258
|
+
export { Progress } from "./components/progress";
|
|
259
|
+
export { RadioGroup, RadioGroupItem } from "./components/radio-group";
|
|
260
|
+
export {
|
|
261
|
+
ResizablePanelGroup,
|
|
262
|
+
ResizablePanel,
|
|
263
|
+
ResizableHandle,
|
|
264
|
+
} from "./components/resizable";
|
|
265
|
+
export { ScrollArea, ScrollBar } from "./components/scroll-area";
|
|
266
|
+
export {
|
|
267
|
+
Select,
|
|
268
|
+
SelectContent,
|
|
269
|
+
SelectGroup,
|
|
270
|
+
SelectItem,
|
|
271
|
+
SelectLabel,
|
|
272
|
+
SelectScrollDownButton,
|
|
273
|
+
SelectScrollUpButton,
|
|
274
|
+
SelectSeparator,
|
|
275
|
+
SelectTrigger,
|
|
276
|
+
SelectValue,
|
|
277
|
+
} from "./components/select";
|
|
278
|
+
export { Separator } from "./components/separator";
|
|
279
|
+
export {
|
|
280
|
+
Sheet,
|
|
281
|
+
SheetTrigger,
|
|
282
|
+
SheetClose,
|
|
283
|
+
SheetContent,
|
|
284
|
+
SheetHeader,
|
|
285
|
+
SheetFooter,
|
|
286
|
+
SheetTitle,
|
|
287
|
+
SheetDescription,
|
|
288
|
+
} from "./components/sheet";
|
|
289
|
+
export {
|
|
290
|
+
Sidebar,
|
|
291
|
+
SidebarContent,
|
|
292
|
+
SidebarFooter,
|
|
293
|
+
SidebarGroup,
|
|
294
|
+
SidebarGroupAction,
|
|
295
|
+
SidebarGroupContent,
|
|
296
|
+
SidebarGroupLabel,
|
|
297
|
+
SidebarHeader,
|
|
298
|
+
SidebarInput,
|
|
299
|
+
SidebarInset,
|
|
300
|
+
SidebarMenu,
|
|
301
|
+
SidebarMenuAction,
|
|
302
|
+
SidebarMenuBadge,
|
|
303
|
+
SidebarMenuButton,
|
|
304
|
+
SidebarMenuItem,
|
|
305
|
+
SidebarMenuSkeleton,
|
|
306
|
+
SidebarMenuSub,
|
|
307
|
+
SidebarMenuSubButton,
|
|
308
|
+
SidebarMenuSubItem,
|
|
309
|
+
SidebarProvider,
|
|
310
|
+
SidebarRail,
|
|
311
|
+
SidebarSeparator,
|
|
312
|
+
SidebarTrigger,
|
|
313
|
+
useSidebar,
|
|
314
|
+
} from "./components/sidebar";
|
|
315
|
+
export { Skeleton } from "./components/skeleton";
|
|
316
|
+
export { Slider } from "./components/slider";
|
|
317
|
+
export { Toaster, toast } from "./components/sonner";
|
|
318
|
+
export { Spinner } from "./components/spinner";
|
|
319
|
+
export { Switch } from "./components/switch";
|
|
320
|
+
export {
|
|
321
|
+
Table,
|
|
322
|
+
TableHeader,
|
|
323
|
+
TableBody,
|
|
324
|
+
TableFooter,
|
|
325
|
+
TableHead,
|
|
326
|
+
TableRow,
|
|
327
|
+
TableCell,
|
|
328
|
+
TableCaption,
|
|
329
|
+
} from "./components/table";
|
|
330
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent } from "./components/tabs";
|
|
331
|
+
export { Textarea } from "./components/textarea";
|
|
332
|
+
export { Toggle, toggleVariants } from "./components/toggle";
|
|
333
|
+
export { ToggleGroup, ToggleGroupItem } from "./components/toggle-group";
|
|
334
|
+
export {
|
|
335
|
+
Tooltip,
|
|
336
|
+
TooltipTrigger,
|
|
337
|
+
TooltipContent,
|
|
338
|
+
TooltipProvider,
|
|
339
|
+
} from "./components/tooltip";
|
package/lib/utils.ts
ADDED
package/package.json
CHANGED
|
@@ -1,34 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mzc-fe/design-system",
|
|
3
|
+
"version": "0.0.7-rc.0",
|
|
3
4
|
"private": false,
|
|
4
|
-
"version": "0.0.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/design-system.umd.js",
|
|
7
7
|
"module": "./dist/design-system.es.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
8
9
|
"files": [
|
|
9
|
-
"dist/"
|
|
10
|
+
"dist/",
|
|
11
|
+
"index.css",
|
|
12
|
+
"components/**/*.ts",
|
|
13
|
+
"components/**/*.tsx",
|
|
14
|
+
"!components/**/*.stories.*",
|
|
15
|
+
"!components/**/*.test.*",
|
|
16
|
+
"foundations/**/*.ts",
|
|
17
|
+
"foundations/**/*.tsx",
|
|
18
|
+
"foundations/**/*.css",
|
|
19
|
+
"!foundations/**/*.stories.*",
|
|
20
|
+
"hooks/**/*.ts",
|
|
21
|
+
"lib/**/*.ts",
|
|
22
|
+
"index.ts"
|
|
10
23
|
],
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
24
|
"exports": {
|
|
13
25
|
".": {
|
|
26
|
+
"development": "./index.ts",
|
|
14
27
|
"types": "./dist/index.d.ts",
|
|
15
28
|
"import": "./dist/design-system.es.js",
|
|
16
29
|
"require": "./dist/design-system.umd.js"
|
|
17
30
|
},
|
|
31
|
+
"./index.css": "./index.css",
|
|
18
32
|
"./dist/design-system.css": "./dist/design-system.css"
|
|
19
33
|
},
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"preview": "vite preview",
|
|
24
|
-
"storybook": "storybook dev -p 6006",
|
|
25
|
-
"build-storybook": "storybook build",
|
|
26
|
-
"test": "vitest run --coverage",
|
|
27
|
-
"test:ui": "vitest --ui",
|
|
28
|
-
"tsc": "tsc -b",
|
|
29
|
-
"prepare": "husky",
|
|
30
|
-
"postversion": "git push && git push --tags",
|
|
31
|
-
"publish:local": "yarn build && npx yalc publish"
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"react": ">=18.0.0",
|
|
36
|
+
"react-dom": ">=18.0.0"
|
|
32
37
|
},
|
|
33
38
|
"dependencies": {
|
|
34
39
|
"@hookform/resolvers": "^5.2.2",
|
|
@@ -68,9 +73,7 @@
|
|
|
68
73
|
"lucide-react": "^0.561.0",
|
|
69
74
|
"next-themes": "^0.4.6",
|
|
70
75
|
"radix-ui": "^1.4.3",
|
|
71
|
-
"react": "^19.1.1",
|
|
72
76
|
"react-day-picker": "^9.12.0",
|
|
73
|
-
"react-dom": "^19.1.1",
|
|
74
77
|
"react-hook-form": "^7.68.0",
|
|
75
78
|
"react-resizable-panels": "^3.0.6",
|
|
76
79
|
"recharts": "2.15.4",
|
|
@@ -85,6 +88,7 @@
|
|
|
85
88
|
"@eslint/js": "^9.33.0",
|
|
86
89
|
"@locator/babel-jsx": "^0.4.4",
|
|
87
90
|
"@locator/runtime": "^0.4.4",
|
|
91
|
+
"@storybook/addon-docs": "^9.1.8",
|
|
88
92
|
"@storybook/react-vite": "^9.1.8",
|
|
89
93
|
"@testing-library/dom": "^10.4.1",
|
|
90
94
|
"@testing-library/jest-dom": "^6.9.1",
|
|
@@ -103,6 +107,8 @@
|
|
|
103
107
|
"globals": "^16.3.0",
|
|
104
108
|
"husky": "^9.1.7",
|
|
105
109
|
"jsdom": "^27.3.0",
|
|
110
|
+
"react": "^19.1.1",
|
|
111
|
+
"react-dom": "^19.1.1",
|
|
106
112
|
"storybook": "^9.1.8",
|
|
107
113
|
"tw-animate-css": "^1.4.0",
|
|
108
114
|
"typescript": "~5.8.3",
|
|
@@ -111,5 +117,20 @@
|
|
|
111
117
|
"vite-plugin-dts": "^4.5.4",
|
|
112
118
|
"vitest": "^4.0.15"
|
|
113
119
|
},
|
|
114
|
-
"
|
|
115
|
-
|
|
120
|
+
"comments": {
|
|
121
|
+
"peerDependencies": "React 18+를 지원. 실제 버전은 사용하는 앱에서 결정",
|
|
122
|
+
"devDependencies": "개발/테스트는 React 19로 수행하지만 18+와 호환"
|
|
123
|
+
},
|
|
124
|
+
"scripts": {
|
|
125
|
+
"build": "vite build",
|
|
126
|
+
"tsc": "tsc --noEmit --skipLibCheck",
|
|
127
|
+
"lint": "eslint .",
|
|
128
|
+
"preview": "vite preview",
|
|
129
|
+
"test": "vitest run --coverage",
|
|
130
|
+
"test:ui": "vitest --ui",
|
|
131
|
+
"storybook": "storybook dev -p 6006",
|
|
132
|
+
"build-storybook": "storybook build",
|
|
133
|
+
"clean": "rm -rf dist node_modules .turbo",
|
|
134
|
+
"publish:local": "pnpm build && pnpm exec yalc publish"
|
|
135
|
+
}
|
|
136
|
+
}
|