@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.
Files changed (160) hide show
  1. package/.husky/pre-push +21 -0
  2. package/.storybook/main.ts +11 -0
  3. package/.storybook/preview.tsx +30 -0
  4. package/.vscode/settings.json +12 -0
  5. package/.vscode/tailwind.json +105 -0
  6. package/README.md +136 -0
  7. package/bitbucket-pipelines.yml +52 -0
  8. package/components.json +21 -0
  9. package/eslint.config.js +38 -0
  10. package/package.json +98 -0
  11. package/public/vite.svg +1 -0
  12. package/src/components/accordion.stories.tsx +258 -0
  13. package/src/components/accordion.test.tsx +390 -0
  14. package/src/components/accordion.tsx +64 -0
  15. package/src/components/alert-dialog.stories.tsx +213 -0
  16. package/src/components/alert-dialog.test.tsx +80 -0
  17. package/src/components/alert-dialog.tsx +155 -0
  18. package/src/components/alert.stories.tsx +84 -0
  19. package/src/components/alert.test.tsx +35 -0
  20. package/src/components/alert.tsx +66 -0
  21. package/src/components/aspect-ratio.stories.tsx +97 -0
  22. package/src/components/aspect-ratio.test.tsx +47 -0
  23. package/src/components/aspect-ratio.tsx +11 -0
  24. package/src/components/avatar.stories.tsx +76 -0
  25. package/src/components/avatar.test.tsx +50 -0
  26. package/src/components/avatar.tsx +51 -0
  27. package/src/components/badge.stories.tsx +64 -0
  28. package/src/components/badge.test.tsx +34 -0
  29. package/src/components/badge.tsx +46 -0
  30. package/src/components/breadcrumb.stories.tsx +86 -0
  31. package/src/components/breadcrumb.test.tsx +74 -0
  32. package/src/components/breadcrumb.tsx +109 -0
  33. package/src/components/button-group.stories.tsx +62 -0
  34. package/src/components/button-group.tsx +83 -0
  35. package/src/components/button.stories.tsx +118 -0
  36. package/src/components/button.test.tsx +64 -0
  37. package/src/components/button.tsx +62 -0
  38. package/src/components/calendar.stories.tsx +81 -0
  39. package/src/components/calendar.tsx +220 -0
  40. package/src/components/card.stories.tsx +110 -0
  41. package/src/components/card.test.tsx +56 -0
  42. package/src/components/card.tsx +92 -0
  43. package/src/components/carousel.stories.tsx +90 -0
  44. package/src/components/carousel.tsx +239 -0
  45. package/src/components/chart.tsx +357 -0
  46. package/src/components/checkbox.stories.tsx +108 -0
  47. package/src/components/checkbox.test.tsx +67 -0
  48. package/src/components/checkbox.tsx +32 -0
  49. package/src/components/collapsible.stories.tsx +106 -0
  50. package/src/components/collapsible.test.tsx +92 -0
  51. package/src/components/collapsible.tsx +31 -0
  52. package/src/components/command.stories.tsx +90 -0
  53. package/src/components/command.tsx +182 -0
  54. package/src/components/context-menu.stories.tsx +63 -0
  55. package/src/components/context-menu.tsx +252 -0
  56. package/src/components/dialog.stories.tsx +128 -0
  57. package/src/components/dialog.tsx +141 -0
  58. package/src/components/drawer.stories.tsx +104 -0
  59. package/src/components/drawer.tsx +135 -0
  60. package/src/components/dropdown-menu.stories.tsx +97 -0
  61. package/src/components/dropdown-menu.tsx +255 -0
  62. package/src/components/empty.stories.tsx +90 -0
  63. package/src/components/empty.test.tsx +55 -0
  64. package/src/components/empty.tsx +104 -0
  65. package/src/components/field.tsx +246 -0
  66. package/src/components/form.tsx +168 -0
  67. package/src/components/hover-card.stories.tsx +66 -0
  68. package/src/components/hover-card.tsx +44 -0
  69. package/src/components/input-group.stories.tsx +57 -0
  70. package/src/components/input-group.test.tsx +40 -0
  71. package/src/components/input-group.tsx +170 -0
  72. package/src/components/input-otp.stories.tsx +94 -0
  73. package/src/components/input-otp.test.tsx +60 -0
  74. package/src/components/input-otp.tsx +75 -0
  75. package/src/components/input.stories.tsx +94 -0
  76. package/src/components/input.test.tsx +53 -0
  77. package/src/components/input.tsx +21 -0
  78. package/src/components/item.tsx +193 -0
  79. package/src/components/kbd.stories.tsx +100 -0
  80. package/src/components/kbd.test.tsx +28 -0
  81. package/src/components/kbd.tsx +28 -0
  82. package/src/components/label.stories.tsx +48 -0
  83. package/src/components/label.test.tsx +28 -0
  84. package/src/components/label.tsx +24 -0
  85. package/src/components/menubar.tsx +274 -0
  86. package/src/components/navigation-menu.tsx +168 -0
  87. package/src/components/pagination.stories.tsx +107 -0
  88. package/src/components/pagination.tsx +127 -0
  89. package/src/components/popover.stories.tsx +102 -0
  90. package/src/components/popover.tsx +48 -0
  91. package/src/components/progress.stories.tsx +76 -0
  92. package/src/components/progress.test.tsx +36 -0
  93. package/src/components/progress.tsx +29 -0
  94. package/src/components/radio-group.stories.tsx +73 -0
  95. package/src/components/radio-group.test.tsx +74 -0
  96. package/src/components/radio-group.tsx +45 -0
  97. package/src/components/resizable.stories.tsx +120 -0
  98. package/src/components/resizable.tsx +54 -0
  99. package/src/components/scroll-area.stories.tsx +64 -0
  100. package/src/components/scroll-area.test.tsx +46 -0
  101. package/src/components/scroll-area.tsx +58 -0
  102. package/src/components/select.stories.tsx +111 -0
  103. package/src/components/select.test.tsx +90 -0
  104. package/src/components/select.tsx +188 -0
  105. package/src/components/separator.stories.tsx +76 -0
  106. package/src/components/separator.test.tsx +24 -0
  107. package/src/components/separator.tsx +28 -0
  108. package/src/components/sheet.stories.tsx +122 -0
  109. package/src/components/sheet.tsx +137 -0
  110. package/src/components/sidebar.tsx +726 -0
  111. package/src/components/skeleton.stories.tsx +53 -0
  112. package/src/components/skeleton.test.tsx +24 -0
  113. package/src/components/skeleton.tsx +13 -0
  114. package/src/components/slider.stories.tsx +97 -0
  115. package/src/components/slider.test.tsx +49 -0
  116. package/src/components/slider.tsx +63 -0
  117. package/src/components/sonner.stories.tsx +96 -0
  118. package/src/components/sonner.tsx +38 -0
  119. package/src/components/spinner.stories.tsx +54 -0
  120. package/src/components/spinner.test.tsx +30 -0
  121. package/src/components/spinner.tsx +16 -0
  122. package/src/components/switch.stories.tsx +108 -0
  123. package/src/components/switch.test.tsx +62 -0
  124. package/src/components/switch.tsx +31 -0
  125. package/src/components/table.stories.tsx +139 -0
  126. package/src/components/table.test.tsx +85 -0
  127. package/src/components/table.tsx +114 -0
  128. package/src/components/tabs.stories.tsx +99 -0
  129. package/src/components/tabs.test.tsx +64 -0
  130. package/src/components/tabs.tsx +66 -0
  131. package/src/components/textarea.stories.tsx +89 -0
  132. package/src/components/textarea.test.tsx +53 -0
  133. package/src/components/textarea.tsx +18 -0
  134. package/src/components/toggle-group.stories.tsx +108 -0
  135. package/src/components/toggle-group.test.tsx +66 -0
  136. package/src/components/toggle-group.tsx +81 -0
  137. package/src/components/toggle.stories.tsx +98 -0
  138. package/src/components/toggle.test.tsx +42 -0
  139. package/src/components/toggle.tsx +45 -0
  140. package/src/components/tooltip.stories.tsx +111 -0
  141. package/src/components/tooltip.tsx +61 -0
  142. package/src/foundations/README.md +141 -0
  143. package/src/foundations/ThemeProvider.tsx +77 -0
  144. package/src/foundations/color.css +232 -0
  145. package/src/foundations/color.stories.tsx +719 -0
  146. package/src/foundations/palette.css +249 -0
  147. package/src/foundations/spacing.css +8 -0
  148. package/src/foundations/typography.css +143 -0
  149. package/src/foundations/typography.stories.tsx +17 -0
  150. package/src/hooks/use-mobile.ts +19 -0
  151. package/src/index.css +176 -0
  152. package/src/index.ts +336 -0
  153. package/src/lib/utils.ts +6 -0
  154. package/src/test/setup.ts +8 -0
  155. package/src/vite-env.d.ts +1 -0
  156. package/tsconfig.app.json +33 -0
  157. package/tsconfig.json +13 -0
  158. package/tsconfig.node.json +25 -0
  159. package/vite.config.ts +30 -0
  160. package/vitest.config.ts +25 -0
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+
3
+ echo "Running pre-push checks..."
4
+
5
+ # Run TypeScript compilation
6
+ echo "Running TypeScript compilation..."
7
+ yarn tsc
8
+ if [ $? -ne 0 ]; then
9
+ echo "TypeScript compilation failed. Push aborted."
10
+ exit 1
11
+ fi
12
+
13
+ # Run unit tests
14
+ echo "Running unit tests..."
15
+ yarn test
16
+ if [ $? -ne 0 ]; then
17
+ echo "Unit tests failed. Push aborted."
18
+ exit 1
19
+ fi
20
+
21
+ exit 0
@@ -0,0 +1,11 @@
1
+ import type { StorybookConfig } from "@storybook/react-vite";
2
+
3
+ const config: StorybookConfig = {
4
+ stories: ["../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5
+ addons: [],
6
+ framework: {
7
+ name: "@storybook/react-vite",
8
+ options: {},
9
+ },
10
+ };
11
+ export default config;
@@ -0,0 +1,30 @@
1
+ import type { Preview } from "@storybook/react-vite";
2
+ import { ThemeProvider } from "../src/foundations/ThemeProvider";
3
+ import "../src/index.css";
4
+
5
+ const preview: Preview = {
6
+ parameters: {
7
+ controls: {
8
+ matchers: {
9
+ color: /(background|color)$/i,
10
+ date: /Date$/i,
11
+ },
12
+ },
13
+ options: {
14
+ storySort: {
15
+ order: ["Foundations", "Components"],
16
+ },
17
+ },
18
+ },
19
+ decorators: [
20
+ (Story) => {
21
+ return (
22
+ <ThemeProvider>
23
+ <Story />
24
+ </ThemeProvider>
25
+ );
26
+ },
27
+ ],
28
+ };
29
+
30
+ export default preview;
@@ -0,0 +1,12 @@
1
+ {
2
+ "css.customData": [".vscode/tailwind.json"],
3
+
4
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
5
+ "editor.formatOnSave": true,
6
+ "editor.tabSize": 2,
7
+
8
+ "editor.codeActionsOnSave": {
9
+ "source.fixAll.eslint": "explicit"
10
+ },
11
+ "typescript.tsdk": "node_modules/typescript/lib"
12
+ }
@@ -0,0 +1,105 @@
1
+ {
2
+ "version": 4.0,
3
+ "atDirectives": [
4
+ {
5
+ "name": "@import",
6
+ "description": "Use the `@import` directive to inline import CSS files, including Tailwind itself.",
7
+ "references": [
8
+ {
9
+ "name": "Tailwind Documentation",
10
+ "url": "https://tailwindcss.com/docs/functions-and-directives#import-directive"
11
+ }
12
+ ]
13
+ },
14
+ {
15
+ "name": "@theme",
16
+ "description": "Use the `@theme` directive to define your project's custom design tokens, like fonts, colors, and breakpoints.",
17
+ "references": [
18
+ {
19
+ "name": "Tailwind Documentation",
20
+ "url": "https://tailwindcss.com/docs/functions-and-directives#theme-directive"
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "name": "@source",
26
+ "description": "Use the `@source` directive to explicitly specify source files that aren't picked up by Tailwind's automatic content detection.",
27
+ "references": [
28
+ {
29
+ "name": "Tailwind Documentation",
30
+ "url": "https://tailwindcss.com/docs/functions-and-directives#source-directive"
31
+ }
32
+ ]
33
+ },
34
+ {
35
+ "name": "@utility",
36
+ "description": "Use the `@utility` directive to add custom utilities to your project that work with variants like `hover`, `focus` and `lg`.",
37
+ "references": [
38
+ {
39
+ "name": "Tailwind Documentation",
40
+ "url": "https://tailwindcss.com/docs/functions-and-directives#utility-directive"
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "name": "@variant",
46
+ "description": "Use the `@variant` directive to apply a Tailwind variant to styles in your CSS. If you need to apply multiple variants at the same time, use nesting.",
47
+ "references": [
48
+ {
49
+ "name": "Tailwind Documentation",
50
+ "url": "https://tailwindcss.com/docs/functions-and-directives#variant-directive"
51
+ }
52
+ ]
53
+ },
54
+ {
55
+ "name": "@custom-variant",
56
+ "description": "Use the `@custom-variant` directive to add a custom variant in your project. This lets you write utilities like `pointer-coarse:size-48` and `theme-midnight:bg-slate-900`.",
57
+ "references": [
58
+ {
59
+ "name": "Tailwind Documentation",
60
+ "url": "https://tailwindcss.com/docs/functions-and-directives#custom-variant-directive"
61
+ }
62
+ ]
63
+ },
64
+ {
65
+ "name": "@apply",
66
+ "description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you need to write custom CSS (like to override the styles in a third-party library) but still want to work with your design tokens and use the same syntax you’re used to using in your HTML.",
67
+ "references": [
68
+ {
69
+ "name": "Tailwind Documentation",
70
+ "url": "https://tailwindcss.com/docs/functions-and-directives#apply-directive"
71
+ }
72
+ ]
73
+ },
74
+ {
75
+ "name": "@reference",
76
+ "description": "If you want to use `@apply` or `@variant` in the `<style>` block of a Vue or Svelte component, or within CSS modules, you will need to import your theme variables, custom utilities, and custom variants to make those values available in that context. To do this without duplicating any CSS in your output, use the `@reference` directive to import your main stylesheet for reference without actually including the styles.",
77
+ "references": [
78
+ {
79
+ "name": "Tailwind Documentation",
80
+ "url": "https://tailwindcss.com/docs/functions-and-directives#reference-directive"
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "name": "@config",
86
+ "description": "Use the `@config` directive to load a legacy JavaScript-based configuration file.",
87
+ "references": [
88
+ {
89
+ "name": "Tailwind Documentation",
90
+ "url": "https://tailwindcss.com/docs/functions-and-directives#config-directive"
91
+ }
92
+ ]
93
+ },
94
+ {
95
+ "name": "@plugin",
96
+ "description": "Use the `@plugin` directive to load a Javascript-based plugin. The `@plugin` directive accepts either a package name or a local path.",
97
+ "references": [
98
+ {
99
+ "name": "Tailwind Documentation",
100
+ "url": "https://tailwindcss.com/docs/functions-and-directives#plugin-directive"
101
+ }
102
+ ]
103
+ }
104
+ ]
105
+ }
package/README.md ADDED
@@ -0,0 +1,136 @@
1
+ # MZC Design System
2
+
3
+ MZC 디자인 시스템은 React와 TypeScript로 구축된 재사용 가능한 컴포넌트 라이브러리입니다. Tailwind CSS와 Radix UI를 기반으로 하여 일관성 있고 접근성이 뛰어난 UI 컴포넌트를 제공합니다.
4
+
5
+ ## 🚀 주요 특징
6
+
7
+ - **TypeScript 지원**: 완전한 타입 안정성과 개발자 경험 향상
8
+ - **Tailwind CSS**: 유틸리티 우선의 스타일링 시스템
9
+ - **Radix UI**: 접근성이 뛰어난 헤드리스 UI 컴포넌트
10
+ - **Storybook**: 컴포넌트 문서화 및 개발 환경
11
+ - **다크 모드**: 테마 전환 기능 지원
12
+ - **Variant 기반**: class-variance-authority를 활용한 유연한 컴포넌트 변형
13
+
14
+ ## 📦 설치
15
+
16
+ ```bash
17
+ npm install @mzc-fe/design-system
18
+ # 또는
19
+ yarn add @mzc-fe/design-system
20
+ ```
21
+
22
+ ## 🛠️ 사용법
23
+
24
+ ### 기본 설정
25
+
26
+ ```tsx
27
+ import { ThemeProvider } from "@mzc-fe/design-system";
28
+ import "@mzc-fe/design-system/dist/design-system.css";
29
+
30
+ function App() {
31
+ return (
32
+ <ThemeProvider defaultTheme="light">{/* 앱 컴포넌트들 */}</ThemeProvider>
33
+ );
34
+ }
35
+ ```
36
+
37
+ ### 디자인 토큰 사용
38
+
39
+ ```tsx
40
+ // CSS 클래스로 디자인 토큰 사용
41
+ <div className="bg-main text-main p-2">
42
+ <h1 className="font-h1-700">제목</h1>
43
+ <p className="font-subtitle1-700">부제목</p>
44
+ </div>
45
+
46
+ // CSS 변수로 직접 사용
47
+ <div style={{
48
+ backgroundColor: 'var(--background-color-main)',
49
+ color: 'var(--text-color-main)',
50
+ padding: 'var(--spacing)'
51
+ }}>
52
+ 커스텀 스타일
53
+ </div>
54
+ ```
55
+
56
+ ## 🎯 개발
57
+
58
+ ### 개발 환경 설정
59
+
60
+ ```bash
61
+ # 의존성 설치
62
+ yarn install
63
+
64
+ # 개발 서버 실행
65
+ yarn storybook
66
+
67
+ # 빌드
68
+ yarn build
69
+
70
+ # 린트 검사
71
+ yarn lint
72
+ ```
73
+
74
+ ### 프로젝트 구조
75
+
76
+ ```
77
+ src/
78
+ ├── components/ # 재사용 가능한 컴포넌트
79
+ │ └── Button/ # Button 컴포넌트
80
+ │ └── ... # Button 컴포넌트
81
+ ├── foundations/ # 디자인 토큰 및 테마
82
+ │ ├── color.css # 색상 토큰
83
+ │ ├── spacing.css # 간격 토큰
84
+ │ ├── typography.css # 타이포그래피 토큰
85
+ │ └── ThemeProvider.tsx # 테마 관리
86
+ └── lib/ # 유틸리티 함수
87
+ └── utils.ts # 공통 유틸리티
88
+ ```
89
+
90
+ ## 🎨 디자인 토큰
91
+
92
+ 프로젝트는 `@theme inline`과 CSS 변수를 활용한 디자인 토큰 시스템을 사용합니다:
93
+
94
+ ### 색상 시스템 (`color.css`)
95
+
96
+ - **토큰 매핑**: `@theme inline`을 통해 CSS 변수를 Tailwind 클래스에 매핑
97
+ - **테마 지원**: 라이트/다크 모드 자동 전환
98
+ - **자동 클래스 생성**: `--background-color-*`, `--text-color-*` 패턴으로 `bg-*`, `text-*` 클래스 자동 생성
99
+
100
+ ```css
101
+ /* 사용 예시 */
102
+ .bg-main {
103
+ background-color: var(--background-color-main);
104
+ }
105
+ .text-main {
106
+ color: var(--text-color-main);
107
+ }
108
+ ```
109
+
110
+ ### 간격 시스템 (`spacing.css`)
111
+
112
+ - **기본 단위**: 4px 기준의 일관된 간격 시스템
113
+ - **Tailwind 통합**: `p-2` → `padding: 8px` 자동 변환
114
+
115
+ ### 타이포그래피 (`typography.css`)
116
+
117
+ - **유틸리티 클래스**: `@utility`를 사용한 재사용 가능한 텍스트 스타일
118
+ - **폰트 패밀리**: Pretendard 폰트 사용
119
+ - **일관된 스타일**: `font-h1-700`, `font-subtitle1-700` 등 체계적인 명명 규칙
120
+
121
+ ## 📚 Storybook
122
+
123
+ 컴포넌트 문서화와 개발을 위해 Storybook을 사용합니다:
124
+
125
+ ```bash
126
+ yarn storybook
127
+ ```
128
+
129
+ Storybook을 통해 각 컴포넌트의 다양한 상태와 사용법을 확인할 수 있습니다.
130
+
131
+ ## 🔗 관련 링크
132
+
133
+ - [Tailwind CSS](https://tailwindcss.com/)
134
+ - [Radix UI](https://www.radix-ui.com/)
135
+ - [Storybook](https://storybook.js.org/)
136
+ - [class-variance-authority](https://cva.style/)
@@ -0,0 +1,52 @@
1
+ # Template npm-publish
2
+
3
+ # This template allows you to publish your npm package, as defined in package.json, to npmjs.com or any other npm-like registry.
4
+ # The workflow allows running tests, code linting and security scans on feature branches (as well as master).
5
+ # The npm package will be validated and published after the code is merged to master.
6
+
7
+ # Prerequisites: $NPM_TOKEN setup in the Deployment variables.
8
+ # For advanced cases, please, follow examples from the pipe's README https://bitbucket.org/atlassian/npm-publish/src/master/README.md
9
+
10
+ image: node:18
11
+
12
+ pipelines:
13
+ custom:
14
+ npm_publish:
15
+ - variables:
16
+ - name: Version
17
+ default: patch
18
+ description: Select type of publish
19
+ allowed-values:
20
+ - patch
21
+ - minor
22
+ - major
23
+ - rc
24
+ - step:
25
+ name: Install
26
+ caches:
27
+ - node
28
+ script:
29
+ - yarn install --frozen-lockfile
30
+ - yarn build
31
+ artifacts:
32
+ - dist/**
33
+ - step:
34
+ name: Deploy to npm
35
+ deployment: Production
36
+ script:
37
+ # 1. 버전 분기 처리
38
+ - |
39
+ if [ "$Version" = "rc" ]; then
40
+ npm version prerelease --preid=rc -m "publish v%s"
41
+ pipe: atlassian/npm-publish:0.3.2
42
+ variables:
43
+ ACCESS: 'public'
44
+ NPM_TOKEN: $NPM_TOKEN
45
+ TAG: "rc"
46
+ else
47
+ npm version $Version -m "publish v%s"
48
+ pipe: atlassian/npm-publish:0.3.2
49
+ variables:
50
+ ACCESS: 'public'
51
+ NPM_TOKEN: $NPM_TOKEN
52
+ fi
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": false,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "",
8
+ "css": "src/index.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "iconLibrary": "lucide",
14
+ "aliases": {
15
+ "components": "@/components",
16
+ "utils": "@/lib/utils",
17
+ "lib": "@/lib",
18
+ "hooks": "@/hooks"
19
+ },
20
+ "registries": {}
21
+ }
@@ -0,0 +1,38 @@
1
+ // For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
2
+ import storybook from "eslint-plugin-storybook";
3
+
4
+ import js from "@eslint/js";
5
+ import globals from "globals";
6
+ import reactHooks from "eslint-plugin-react-hooks";
7
+ import reactRefresh from "eslint-plugin-react-refresh";
8
+ import tseslint from "typescript-eslint";
9
+ import { defineConfig, globalIgnores } from "eslint/config";
10
+
11
+ export default defineConfig(
12
+ [
13
+ globalIgnores(["dist"]),
14
+ {
15
+ files: ["**/*.{ts,tsx}"],
16
+ extends: [
17
+ js.configs.recommended,
18
+ tseslint.configs.recommended,
19
+ reactHooks.configs["recommended-latest"],
20
+ reactRefresh.configs.vite,
21
+ ],
22
+ languageOptions: {
23
+ ecmaVersion: 2020,
24
+ globals: globals.browser,
25
+ },
26
+ rules: {
27
+ "react-refresh/only-export-components": "warn",
28
+ "react-hooks/exhaustive-deps": [
29
+ "warn",
30
+ {
31
+ enableDangerousAutofixThisMayCauseInfiniteLoops: true,
32
+ },
33
+ ],
34
+ },
35
+ },
36
+ ],
37
+ storybook.configs["flat/recommended"]
38
+ );
package/package.json ADDED
@@ -0,0 +1,98 @@
1
+ {
2
+ "name": "@mzc-fe/design-system",
3
+ "private": false,
4
+ "version": "0.0.1-rc.0",
5
+ "type": "module",
6
+ "main": "./dist/design-system.umd.js",
7
+ "module": "./dist/design-system.es.js",
8
+ "scripts": {
9
+ "build": "tsc -b && vite build",
10
+ "lint": "eslint .",
11
+ "preview": "vite preview",
12
+ "storybook": "storybook dev -p 6006",
13
+ "build-storybook": "storybook build",
14
+ "test": "vitest run --coverage",
15
+ "test:ui": "vitest --ui",
16
+ "tsc": "tsc -b",
17
+ "prepare": "husky"
18
+ },
19
+ "dependencies": {
20
+ "@hookform/resolvers": "^5.2.2",
21
+ "@radix-ui/react-accordion": "^1.2.12",
22
+ "@radix-ui/react-alert-dialog": "^1.1.15",
23
+ "@radix-ui/react-aspect-ratio": "^1.1.8",
24
+ "@radix-ui/react-avatar": "^1.1.11",
25
+ "@radix-ui/react-checkbox": "^1.3.3",
26
+ "@radix-ui/react-collapsible": "^1.1.12",
27
+ "@radix-ui/react-context-menu": "^2.2.16",
28
+ "@radix-ui/react-dialog": "^1.1.15",
29
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
30
+ "@radix-ui/react-hover-card": "^1.1.15",
31
+ "@radix-ui/react-label": "^2.1.8",
32
+ "@radix-ui/react-menubar": "^1.1.16",
33
+ "@radix-ui/react-navigation-menu": "^1.2.14",
34
+ "@radix-ui/react-popover": "^1.1.15",
35
+ "@radix-ui/react-progress": "^1.1.8",
36
+ "@radix-ui/react-radio-group": "^1.3.8",
37
+ "@radix-ui/react-scroll-area": "^1.2.10",
38
+ "@radix-ui/react-select": "^2.2.6",
39
+ "@radix-ui/react-separator": "^1.1.8",
40
+ "@radix-ui/react-slider": "^1.3.6",
41
+ "@radix-ui/react-slot": "^1.2.4",
42
+ "@radix-ui/react-switch": "^1.2.6",
43
+ "@radix-ui/react-tabs": "^1.1.13",
44
+ "@radix-ui/react-toggle": "^1.1.10",
45
+ "@radix-ui/react-toggle-group": "^1.1.11",
46
+ "@radix-ui/react-tooltip": "^1.2.8",
47
+ "@tailwindcss/vite": "^4.1.13",
48
+ "class-variance-authority": "^0.7.1",
49
+ "clsx": "^2.1.1",
50
+ "cmdk": "^1.1.1",
51
+ "date-fns": "^4.1.0",
52
+ "embla-carousel-react": "^8.6.0",
53
+ "input-otp": "^1.4.2",
54
+ "lucide-react": "^0.561.0",
55
+ "next-themes": "^0.4.6",
56
+ "react": "^19.1.1",
57
+ "react-day-picker": "^9.12.0",
58
+ "react-dom": "^19.1.1",
59
+ "react-hook-form": "^7.68.0",
60
+ "react-resizable-panels": "^3.0.6",
61
+ "recharts": "2.15.4",
62
+ "sonner": "^2.0.7",
63
+ "tailwind-merge": "^3.4.0",
64
+ "tailwindcss": "^4.1.13",
65
+ "vaul": "^1.1.2",
66
+ "zod": "^4.1.13"
67
+ },
68
+ "devDependencies": {
69
+ "@babel/preset-react": "^7.27.1",
70
+ "@eslint/js": "^9.33.0",
71
+ "@locator/babel-jsx": "^0.4.4",
72
+ "@locator/runtime": "^0.4.4",
73
+ "@storybook/react-vite": "^9.1.8",
74
+ "@testing-library/dom": "^10.4.1",
75
+ "@testing-library/jest-dom": "^6.9.1",
76
+ "@testing-library/react": "^16.3.0",
77
+ "@testing-library/user-event": "^14.6.1",
78
+ "@types/node": "^24.3.1",
79
+ "@types/react": "^19.1.10",
80
+ "@types/react-dom": "^19.1.7",
81
+ "@vitejs/plugin-react": "^5.0.0",
82
+ "@vitest/coverage-v8": "^4.0.15",
83
+ "@vitest/ui": "4.0.15",
84
+ "eslint": "^9.33.0",
85
+ "eslint-plugin-react-hooks": "^5.2.0",
86
+ "eslint-plugin-react-refresh": "^0.4.20",
87
+ "eslint-plugin-storybook": "^9.1.8",
88
+ "globals": "^16.3.0",
89
+ "husky": "^9.1.7",
90
+ "jsdom": "^27.3.0",
91
+ "storybook": "^9.1.8",
92
+ "tw-animate-css": "^1.4.0",
93
+ "typescript": "~5.8.3",
94
+ "typescript-eslint": "^8.39.1",
95
+ "vite": "^7.1.2",
96
+ "vitest": "^4.0.15"
97
+ }
98
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>