@mzc-fe/design-system 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -0
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/alert-dialog/index.d.ts +1 -0
- package/dist/components/aspect-ratio/index.d.ts +1 -0
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/breadcrumb/index.d.ts +1 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/{button-group.d.ts → button-group/button-group.d.ts} +1 -1
- package/dist/components/button-group/index.d.ts +1 -0
- package/dist/components/{calendar.d.ts → calendar/calendar.d.ts} +1 -1
- package/dist/components/calendar/index.d.ts +1 -0
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/{carousel.d.ts → carousel/carousel.d.ts} +1 -1
- package/dist/components/carousel/index.d.ts +1 -0
- package/dist/components/chart/index.d.ts +1 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/collapsible/index.d.ts +1 -0
- package/dist/components/{command.d.ts → command/command.d.ts} +1 -1
- package/dist/components/command/index.d.ts +1 -0
- package/dist/components/context-menu/index.d.ts +1 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/dropdown-menu/index.d.ts +1 -0
- package/dist/components/empty/index.d.ts +1 -0
- package/dist/components/{field.d.ts → field/field.d.ts} +1 -1
- package/dist/components/field/index.d.ts +1 -0
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/hover-card/index.d.ts +1 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input-group/index.d.ts +1 -0
- package/dist/components/{input-group.d.ts → input-group/input-group.d.ts} +1 -1
- package/dist/components/input-otp/index.d.ts +1 -0
- package/dist/components/item/index.d.ts +1 -0
- package/dist/components/{item.d.ts → item/item.d.ts} +1 -1
- package/dist/components/kbd/index.d.ts +1 -0
- package/dist/components/label/index.d.ts +1 -0
- package/dist/components/menubar/index.d.ts +1 -0
- package/dist/components/navigation-menu/index.d.ts +1 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/{pagination.d.ts → pagination/pagination.d.ts} +1 -1
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/progress/index.d.ts +1 -0
- package/dist/components/radio-group/index.d.ts +1 -0
- package/dist/components/resizable/index.d.ts +1 -0
- package/dist/components/scroll-area/index.d.ts +1 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/separator/index.d.ts +1 -0
- package/dist/components/sheet/index.d.ts +1 -0
- package/dist/components/sidebar/index.d.ts +1 -0
- package/dist/components/{sidebar.d.ts → sidebar/sidebar.d.ts} +4 -4
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/sonner/index.d.ts +2 -0
- package/dist/components/spinner/index.d.ts +1 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/textarea/index.d.ts +1 -0
- package/dist/components/toggle/index.d.ts +1 -0
- package/dist/components/toggle-group/index.d.ts +1 -0
- package/dist/components/{toggle-group.d.ts → toggle-group/toggle-group.d.ts} +1 -1
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/design-system.css +1 -1
- package/dist/design-system.es.js +41 -41
- package/dist/design-system.umd.js +7 -7
- package/dist/index.d.ts +1 -1
- package/package.json +5 -3
- /package/dist/components/{accordion.d.ts → accordion/accordion.d.ts} +0 -0
- /package/dist/components/{alert.d.ts → alert/alert.d.ts} +0 -0
- /package/dist/components/{alert-dialog.d.ts → alert-dialog/alert-dialog.d.ts} +0 -0
- /package/dist/components/{aspect-ratio.d.ts → aspect-ratio/aspect-ratio.d.ts} +0 -0
- /package/dist/components/{avatar.d.ts → avatar/avatar.d.ts} +0 -0
- /package/dist/components/{badge.d.ts → badge/badge.d.ts} +0 -0
- /package/dist/components/{breadcrumb.d.ts → breadcrumb/breadcrumb.d.ts} +0 -0
- /package/dist/components/{button.d.ts → button/button.d.ts} +0 -0
- /package/dist/components/{card.d.ts → card/card.d.ts} +0 -0
- /package/dist/components/{chart.d.ts → chart/chart.d.ts} +0 -0
- /package/dist/components/{checkbox.d.ts → checkbox/checkbox.d.ts} +0 -0
- /package/dist/components/{collapsible.d.ts → collapsible/collapsible.d.ts} +0 -0
- /package/dist/components/{context-menu.d.ts → context-menu/context-menu.d.ts} +0 -0
- /package/dist/components/{dialog.d.ts → dialog/dialog.d.ts} +0 -0
- /package/dist/components/{drawer.d.ts → drawer/drawer.d.ts} +0 -0
- /package/dist/components/{dropdown-menu.d.ts → dropdown-menu/dropdown-menu.d.ts} +0 -0
- /package/dist/components/{empty.d.ts → empty/empty.d.ts} +0 -0
- /package/dist/components/{form.d.ts → form/form.d.ts} +0 -0
- /package/dist/components/{hover-card.d.ts → hover-card/hover-card.d.ts} +0 -0
- /package/dist/components/{input.d.ts → input/input.d.ts} +0 -0
- /package/dist/components/{input-otp.d.ts → input-otp/input-otp.d.ts} +0 -0
- /package/dist/components/{kbd.d.ts → kbd/kbd.d.ts} +0 -0
- /package/dist/components/{label.d.ts → label/label.d.ts} +0 -0
- /package/dist/components/{menubar.d.ts → menubar/menubar.d.ts} +0 -0
- /package/dist/components/{navigation-menu.d.ts → navigation-menu/navigation-menu.d.ts} +0 -0
- /package/dist/components/{popover.d.ts → popover/popover.d.ts} +0 -0
- /package/dist/components/{progress.d.ts → progress/progress.d.ts} +0 -0
- /package/dist/components/{radio-group.d.ts → radio-group/radio-group.d.ts} +0 -0
- /package/dist/components/{resizable.d.ts → resizable/resizable.d.ts} +0 -0
- /package/dist/components/{scroll-area.d.ts → scroll-area/scroll-area.d.ts} +0 -0
- /package/dist/components/{select.d.ts → select/select.d.ts} +0 -0
- /package/dist/components/{separator.d.ts → separator/separator.d.ts} +0 -0
- /package/dist/components/{sheet.d.ts → sheet/sheet.d.ts} +0 -0
- /package/dist/components/{skeleton.d.ts → skeleton/skeleton.d.ts} +0 -0
- /package/dist/components/{slider.d.ts → slider/slider.d.ts} +0 -0
- /package/dist/components/{sonner.d.ts → sonner/sonner.d.ts} +0 -0
- /package/dist/components/{spinner.d.ts → spinner/spinner.d.ts} +0 -0
- /package/dist/components/{switch.d.ts → switch/switch.d.ts} +0 -0
- /package/dist/components/{table.d.ts → table/table.d.ts} +0 -0
- /package/dist/components/{tabs.d.ts → tabs/tabs.d.ts} +0 -0
- /package/dist/components/{textarea.d.ts → textarea/textarea.d.ts} +0 -0
- /package/dist/components/{toggle.d.ts → toggle/toggle.d.ts} +0 -0
- /package/dist/components/{tooltip.d.ts → tooltip/tooltip.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -34,6 +34,20 @@ function App() {
|
|
|
34
34
|
}
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
> **⚠️ Tailwind CSS 사용 시 주의사항**
|
|
38
|
+
>
|
|
39
|
+
> 프로젝트에서 Tailwind CSS를 함께 사용하는 경우, `design-system.css`가 **반드시** `@import 'tailwindcss'`보다 **먼저** import되어야 합니다. 순서가 잘못되면 디자인 시스템의 스타일이 Tailwind에 의해 덮어씌워질 수 있습니다.
|
|
40
|
+
>
|
|
41
|
+
> ```css
|
|
42
|
+
> /* ✅ 올바른 순서 */
|
|
43
|
+
> @import "@mzc-fe/design-system/dist/design-system.css";
|
|
44
|
+
> @import "tailwindcss";
|
|
45
|
+
>
|
|
46
|
+
> /* ❌ 잘못된 순서 */
|
|
47
|
+
> @import "tailwindcss";
|
|
48
|
+
> @import "@mzc-fe/design-system/dist/design-system.css";
|
|
49
|
+
> ```
|
|
50
|
+
|
|
37
51
|
### 디자인 토큰 사용
|
|
38
52
|
|
|
39
53
|
```tsx
|
|
@@ -71,6 +85,40 @@ yarn build
|
|
|
71
85
|
yarn lint
|
|
72
86
|
```
|
|
73
87
|
|
|
88
|
+
### 로컬 테스트 (yalc)
|
|
89
|
+
|
|
90
|
+
다른 프로젝트에서 배포 전 디자인 시스템을 테스트하려면 [yalc](https://github.com/wclr/yalc)를 사용합니다.
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# yalc 전역 설치 (최초 1회)
|
|
94
|
+
npm install -g yalc
|
|
95
|
+
|
|
96
|
+
# 디자인 시스템 빌드 및 로컬 배포
|
|
97
|
+
yarn publish:local
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
테스트할 프로젝트에서:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# 디자인 시스템 로컬 버전 연결
|
|
104
|
+
yalc add @mzc-fe/design-system
|
|
105
|
+
|
|
106
|
+
# 의존성 재설치
|
|
107
|
+
yarn install
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
테스트 완료 후 정리:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# 로컬 버전 연결 해제
|
|
114
|
+
yalc remove @mzc-fe/design-system
|
|
115
|
+
|
|
116
|
+
# 또는 모든 yalc 패키지 제거
|
|
117
|
+
yalc remove --all
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
> **💡 Tip**: 디자인 시스템을 수정할 때마다 `yarn publish:local`을 실행하고, 테스트 프로젝트에서 `yalc update`를 실행하면 변경사항이 반영됩니다.
|
|
121
|
+
|
|
74
122
|
### 프로젝트 구조
|
|
75
123
|
|
|
76
124
|
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './accordion';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './alert';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './alert-dialog';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './aspect-ratio';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './avatar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './badge';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './breadcrumb';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './button';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { Separator } from '
|
|
2
|
+
import { Separator } from '../separator';
|
|
3
3
|
declare const buttonGroupVariants: (props?: ({
|
|
4
4
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './button-group';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DayPicker, DayButton } from 'react-day-picker';
|
|
2
|
-
import { Button } from '
|
|
2
|
+
import { Button } from '../button';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
5
|
buttonVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './calendar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './card';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as useEmblaCarousel, UseEmblaCarouselType } from 'embla-carousel-react';
|
|
2
|
-
import { Button } from '
|
|
2
|
+
import { Button } from '../button';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
type CarouselApi = UseEmblaCarouselType[1];
|
|
5
5
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './carousel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './chart';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './checkbox';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './collapsible';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command as CommandPrimitive } from 'cmdk';
|
|
2
|
-
import { Dialog } from '
|
|
2
|
+
import { Dialog } from '../dialog';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './command';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './context-menu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dialog';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './drawer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dropdown-menu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './empty';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { Label } from '
|
|
2
|
+
import { Label } from '../label';
|
|
3
3
|
declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
|
|
5
5
|
variant?: "legend" | "label";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './field';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './form';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './hover-card';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-group';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { Button } from '
|
|
2
|
+
import { Button } from '../button';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const inputGroupAddonVariants: (props?: ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-otp';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './item';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { Separator } from '
|
|
2
|
+
import { Separator } from '../separator';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './kbd';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './label';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './menubar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './navigation-menu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './pagination';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button } from '
|
|
1
|
+
import { Button } from '../button';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './popover';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './progress';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './radio-group';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './resizable';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './scroll-area';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './select';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './separator';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sheet';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sidebar';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { Button } from '
|
|
3
|
-
import { Input } from '
|
|
4
|
-
import { Separator } from '
|
|
5
|
-
import { TooltipContent } from '
|
|
2
|
+
import { Button } from '../button';
|
|
3
|
+
import { Input } from '../input';
|
|
4
|
+
import { Separator } from '../separator';
|
|
5
|
+
import { TooltipContent } from '../tooltip';
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
type SidebarContextProps = {
|
|
8
8
|
state: "expanded" | "collapsed";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './skeleton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './slider';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './spinner';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './switch';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './table';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tabs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './textarea';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './toggle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './toggle-group';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { toggleVariants } from '
|
|
2
|
+
import { toggleVariants } from '../toggle';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
5
5
|
declare function ToggleGroup({ className, variant, size, spacing, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants> & {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tooltip';
|