@nexus-cross/design-system 1.0.6-beta.1 → 1.0.6-beta.2

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 (239) hide show
  1. package/cursor-rules/nexus-project-setup.mdc +167 -145
  2. package/cursor-rules/nexus-ui-api.mdc +683 -312
  3. package/cursor-rules/nexus-ui-components.mdc +179 -91
  4. package/dist/accordion.js +7 -7
  5. package/dist/accordion.mjs +2 -2
  6. package/dist/avatar.js +4 -4
  7. package/dist/avatar.mjs +2 -2
  8. package/dist/button.js +4 -4
  9. package/dist/button.mjs +2 -2
  10. package/dist/carousel.js +8 -8
  11. package/dist/carousel.mjs +2 -2
  12. package/dist/checkbox.js +5 -5
  13. package/dist/checkbox.mjs +2 -2
  14. package/dist/chip.d.mts +1 -1
  15. package/dist/chip.d.ts +1 -1
  16. package/dist/chip.js +4 -4
  17. package/dist/chip.mjs +2 -2
  18. package/dist/chunks/{chunk-UR6JOKVB.mjs → chunk-26BUGBOY.mjs} +13 -21
  19. package/dist/chunks/{chunk-5TBXVD56.js → chunk-2MC7XJSE.js} +16 -6
  20. package/dist/chunks/{chunk-BEA727LO.mjs → chunk-2RPRCWKV.mjs} +57 -26
  21. package/dist/chunks/{chunk-5I2VRWWU.js → chunk-2ZXDXO4I.js} +32 -38
  22. package/dist/chunks/{chunk-RLP3U52D.mjs → chunk-33UFQJIO.mjs} +22 -40
  23. package/dist/chunks/{chunk-AOVU67NI.mjs → chunk-3HHJORN7.mjs} +23 -25
  24. package/dist/chunks/{chunk-TWHDXCKR.js → chunk-3PCNRCTB.js} +8 -8
  25. package/dist/chunks/{chunk-SXLMI7CZ.mjs → chunk-3VFBPFZF.mjs} +160 -232
  26. package/dist/chunks/chunk-4ENXP7WH.js +224 -0
  27. package/dist/chunks/{chunk-YEGPB7A7.js → chunk-5JHJNN2K.js} +4 -4
  28. package/dist/chunks/{chunk-C3E7CSKG.mjs → chunk-6FMDO6TT.mjs} +7 -8
  29. package/dist/chunks/{chunk-76CY4STF.js → chunk-7G65JBTN.js} +34 -66
  30. package/dist/chunks/{chunk-GMIGQ5VP.mjs → chunk-ADO7PDLY.mjs} +15 -35
  31. package/dist/chunks/{chunk-ZINDMFOI.js → chunk-AFSEYJZT.js} +24 -32
  32. package/dist/chunks/{chunk-6FHK6CBR.js → chunk-B6G5TJRO.js} +7 -8
  33. package/dist/chunks/chunk-BBLBTOP4.js +205 -0
  34. package/dist/chunks/{chunk-5XVEYVYA.js → chunk-BLGQHR3M.js} +5 -8
  35. package/dist/chunks/{chunk-LVTD2UQN.mjs → chunk-BPUQ2CO2.mjs} +2 -2
  36. package/dist/chunks/{chunk-AWBGWBFS.js → chunk-BSZ2LN6E.js} +21 -27
  37. package/dist/chunks/{chunk-KWPIEHD2.mjs → chunk-CA3SOLI3.mjs} +1 -1
  38. package/dist/chunks/chunk-CLGH2RTS.js +7 -0
  39. package/dist/chunks/{chunk-MPKRXMCJ.js → chunk-CSJDDREF.js} +7 -10
  40. package/dist/chunks/chunk-CZC76ZD5.js +10 -0
  41. package/dist/chunks/{chunk-TLTEUIBY.js → chunk-DLFV7ZZV.js} +4 -4
  42. package/dist/chunks/chunk-DO6VK2QQ.mjs +108 -0
  43. package/dist/chunks/{chunk-GQP7IXH2.mjs → chunk-ECVAVQUY.mjs} +23 -31
  44. package/dist/chunks/{chunk-3CHRUKSJ.mjs → chunk-EHAUUUWB.mjs} +3 -3
  45. package/dist/chunks/{chunk-G4XJG7XI.js → chunk-EVOOTSY5.js} +3 -10
  46. package/dist/chunks/{chunk-VH5FF6DZ.mjs → chunk-GX6GSWX3.mjs} +7 -7
  47. package/dist/chunks/{chunk-OGUTGD4J.mjs → chunk-HNLI646G.mjs} +71 -39
  48. package/dist/chunks/{chunk-C6H2UNOX.js → chunk-IE4DGLMH.js} +13 -21
  49. package/dist/chunks/{chunk-U76LT5GE.js → chunk-IOSIQLZL.js} +2 -2
  50. package/dist/chunks/{chunk-ZCMKIB5U.js → chunk-J5ZKGPBY.js} +33 -41
  51. package/dist/chunks/{chunk-JUZHWKGS.mjs → chunk-K2TBLM3F.mjs} +6 -12
  52. package/dist/chunks/{chunk-FHPHDK3O.mjs → chunk-LI7SFBUQ.mjs} +4 -4
  53. package/dist/chunks/{chunk-7OEK2KX3.mjs → chunk-LMMON5AU.mjs} +4 -4
  54. package/dist/chunks/{chunk-6DZVNFVY.js → chunk-LOQXCHKL.js} +4 -12
  55. package/dist/chunks/{chunk-377KBJQG.js → chunk-MA2VCCIY.js} +19 -22
  56. package/dist/chunks/chunk-MCKOWMLS.mjs +8 -0
  57. package/dist/chunks/{chunk-TR5JBBEA.mjs → chunk-MRRKW5QN.mjs} +31 -39
  58. package/dist/chunks/{chunk-76K6KXCT.js → chunk-NFIPQZ4O.js} +1 -1
  59. package/dist/chunks/{chunk-I7YJB2F5.js → chunk-OMN5YQCE.js} +3 -3
  60. package/dist/chunks/{chunk-B7UU3FSS.mjs → chunk-P2T72N62.mjs} +4 -7
  61. package/dist/chunks/chunk-P3DZKXG4.js +116 -0
  62. package/dist/chunks/{chunk-RXVYL4AU.js → chunk-PEIEVKD5.js} +7 -13
  63. package/dist/chunks/{chunk-IJG7J2VU.mjs → chunk-QZ4QR3XV.mjs} +30 -36
  64. package/dist/chunks/{chunk-6NTASYZO.js → chunk-RS3SBY3I.js} +61 -30
  65. package/dist/chunks/{chunk-AKIBUO5A.mjs → chunk-RX5UKRYK.mjs} +19 -26
  66. package/dist/chunks/{chunk-WJ2OVQD3.mjs → chunk-SGNRVYYQ.mjs} +19 -25
  67. package/dist/chunks/{chunk-IB5UCYQY.mjs → chunk-SJMCPSVH.mjs} +15 -5
  68. package/dist/chunks/{chunk-DDMZSNTG.js → chunk-U53UA76K.js} +166 -238
  69. package/dist/chunks/chunk-UKRU46PH.mjs +182 -0
  70. package/dist/chunks/{chunk-WNFJ4NJN.mjs → chunk-ULGYTBCT.mjs} +3 -11
  71. package/dist/chunks/chunk-UPCWJWXR.mjs +5 -0
  72. package/dist/chunks/{chunk-TXYYBJBQ.js → chunk-VGO4Z2WH.js} +73 -41
  73. package/dist/chunks/{chunk-LBKBCI2K.mjs → chunk-VIGRCJAE.mjs} +3 -10
  74. package/dist/chunks/chunk-VVXQZ4XH.mjs +93 -0
  75. package/dist/chunks/{chunk-Z7OKV6NW.mjs → chunk-W4GG5A7K.mjs} +12 -20
  76. package/dist/chunks/chunk-WGGBE4ZD.mjs +201 -0
  77. package/dist/chunks/{chunk-WSWD5ZUJ.js → chunk-WKCXACMZ.js} +20 -27
  78. package/dist/chunks/{chunk-Q7GQVAYY.js → chunk-WR55D4ZS.js} +14 -22
  79. package/dist/chunks/{chunk-GSLIY6WW.js → chunk-X2SHTVZQ.js} +17 -37
  80. package/dist/chunks/{chunk-U6KOUYWX.mjs → chunk-XG6QG65W.mjs} +7 -10
  81. package/dist/chunks/chunk-YB5ZKHVB.js +64 -0
  82. package/dist/chunks/{chunk-Q7H6LCNN.js → chunk-YCG4FZC3.js} +23 -25
  83. package/dist/chunks/{chunk-JZ3PWHKS.mjs → chunk-YLO4UKSC.mjs} +18 -21
  84. package/dist/chunks/{chunk-Q2TMXHPK.js → chunk-YZV6FWE7.js} +25 -43
  85. package/dist/chunks/chunk-ZWSIIGA3.mjs +58 -0
  86. package/dist/countdown.js +4 -4
  87. package/dist/countdown.mjs +2 -2
  88. package/dist/counter.js +2 -2
  89. package/dist/counter.mjs +1 -1
  90. package/dist/data-list.js +5 -5
  91. package/dist/data-list.mjs +4 -4
  92. package/dist/divider.js +4 -4
  93. package/dist/divider.mjs +2 -2
  94. package/dist/drawer.d.mts +1 -1
  95. package/dist/drawer.d.ts +1 -1
  96. package/dist/drawer.js +11 -11
  97. package/dist/drawer.mjs +2 -2
  98. package/dist/ellipsis.js +3 -3
  99. package/dist/ellipsis.mjs +2 -2
  100. package/dist/error-boundary.d.mts +1 -1
  101. package/dist/error-boundary.d.ts +1 -1
  102. package/dist/error-boundary.js +2 -2
  103. package/dist/error-boundary.mjs +1 -1
  104. package/dist/index.d.mts +1 -0
  105. package/dist/index.d.ts +1 -0
  106. package/dist/index.js +152 -143
  107. package/dist/index.mjs +34 -33
  108. package/dist/infinite-scroll.js +3 -3
  109. package/dist/infinite-scroll.mjs +2 -2
  110. package/dist/marquee.js +3 -3
  111. package/dist/marquee.mjs +2 -2
  112. package/dist/modal/index.js +11 -11
  113. package/dist/modal/index.mjs +2 -2
  114. package/dist/number-input.d.mts +1 -1
  115. package/dist/number-input.d.ts +1 -1
  116. package/dist/number-input.js +5 -5
  117. package/dist/number-input.mjs +2 -2
  118. package/dist/pagination.d.mts +1 -0
  119. package/dist/pagination.d.ts +1 -0
  120. package/dist/pagination.js +5 -5
  121. package/dist/pagination.mjs +2 -2
  122. package/dist/popover.d.mts +1 -1
  123. package/dist/popover.d.ts +1 -1
  124. package/dist/popover.js +8 -8
  125. package/dist/popover.mjs +2 -2
  126. package/dist/price-input.d.mts +36 -0
  127. package/dist/price-input.d.ts +36 -0
  128. package/dist/price-input.js +16 -0
  129. package/dist/price-input.mjs +3 -0
  130. package/dist/radio-group.js +6 -6
  131. package/dist/radio-group.mjs +2 -2
  132. package/dist/schemas/_all.json +1520 -376
  133. package/dist/schemas/accordion.json +14 -11
  134. package/dist/schemas/avatar.json +13 -7
  135. package/dist/schemas/button.json +27 -9
  136. package/dist/schemas/carousel.json +10 -4
  137. package/dist/schemas/carouselButton.json +20 -0
  138. package/dist/schemas/carouselDots.json +17 -0
  139. package/dist/schemas/carouselSlide.json +20 -0
  140. package/dist/schemas/checkBox.json +33 -8
  141. package/dist/schemas/chip.json +15 -6
  142. package/dist/schemas/clientOnly.json +19 -0
  143. package/dist/schemas/countdown.json +10 -7
  144. package/dist/schemas/counter.json +15 -9
  145. package/dist/schemas/dataList.json +10 -10
  146. package/dist/schemas/divider.json +8 -5
  147. package/dist/schemas/drawer.json +24 -2
  148. package/dist/schemas/drawerClose.json +24 -0
  149. package/dist/schemas/drawerContent.json +9 -6
  150. package/dist/schemas/drawerDescription.json +20 -0
  151. package/dist/schemas/drawerTitle.json +20 -0
  152. package/dist/schemas/drawerTrigger.json +24 -0
  153. package/dist/schemas/ellipsis.json +17 -7
  154. package/dist/schemas/errorBoundary.json +22 -0
  155. package/dist/schemas/infiniteScroll.json +18 -9
  156. package/dist/schemas/marquee.json +12 -6
  157. package/dist/schemas/modalCall.json +81 -3
  158. package/dist/schemas/modalTemplate.json +67 -14
  159. package/dist/schemas/numberInput.json +42 -12
  160. package/dist/schemas/pagination.json +13 -6
  161. package/dist/schemas/popover.json +18 -9
  162. package/dist/schemas/priceInput.json +104 -0
  163. package/dist/schemas/radioGroup.json +19 -9
  164. package/dist/schemas/radioItem.json +12 -5
  165. package/dist/schemas/select.json +15 -9
  166. package/dist/schemas/selectItem.json +7 -4
  167. package/dist/schemas/skeleton.json +12 -6
  168. package/dist/schemas/spinner.json +11 -4
  169. package/dist/schemas/switch.json +23 -5
  170. package/dist/schemas/tab.json +17 -14
  171. package/dist/schemas/table.json +75 -0
  172. package/dist/schemas/tableRow.json +32 -0
  173. package/dist/schemas/tdColumn.json +107 -0
  174. package/dist/schemas/textArea.json +47 -7
  175. package/dist/schemas/textInput.json +72 -10
  176. package/dist/schemas/themeProvider.json +65 -0
  177. package/dist/schemas/toastOptions.json +81 -0
  178. package/dist/schemas/toaster.json +76 -0
  179. package/dist/schemas/tooltip.json +12 -9
  180. package/dist/schemas/virtualGrid.json +22 -11
  181. package/dist/schemas/virtualList.json +14 -8
  182. package/dist/schemas.d.mts +839 -32
  183. package/dist/schemas.d.ts +839 -32
  184. package/dist/schemas.js +561 -273
  185. package/dist/schemas.mjs +546 -273
  186. package/dist/select.js +6 -6
  187. package/dist/select.mjs +2 -2
  188. package/dist/skeleton.js +3 -3
  189. package/dist/skeleton.mjs +2 -2
  190. package/dist/spinner.js +3 -3
  191. package/dist/spinner.mjs +2 -2
  192. package/dist/styles/layer.d.mts +3 -0
  193. package/dist/styles/layer.d.ts +3 -0
  194. package/dist/styles/layer.js +18 -0
  195. package/dist/styles/layer.mjs +16 -0
  196. package/dist/styles.css +2569 -2
  197. package/dist/styles.js +2 -5
  198. package/dist/styles.layered.css +2572 -0
  199. package/dist/styles.mjs +1 -4
  200. package/dist/switch.js +4 -4
  201. package/dist/switch.mjs +2 -2
  202. package/dist/tab.js +5 -5
  203. package/dist/tab.mjs +2 -2
  204. package/dist/table.d.mts +2 -2
  205. package/dist/table.d.ts +2 -2
  206. package/dist/table.js +9 -9
  207. package/dist/table.mjs +3 -3
  208. package/dist/text-area.js +4 -4
  209. package/dist/text-area.mjs +2 -2
  210. package/dist/text-input.d.mts +5 -1
  211. package/dist/text-input.d.ts +5 -1
  212. package/dist/text-input.js +4 -4
  213. package/dist/text-input.mjs +2 -2
  214. package/dist/toast.js +5 -5
  215. package/dist/toast.mjs +2 -2
  216. package/dist/tooltip.js +5 -5
  217. package/dist/tooltip.mjs +2 -2
  218. package/dist/utils/cn.d.mts +0 -10
  219. package/dist/utils/cn.d.ts +0 -10
  220. package/dist/utils/cn.js +2 -2
  221. package/dist/utils/cn.mjs +1 -1
  222. package/dist/virtual-scroll.js +4 -4
  223. package/dist/virtual-scroll.mjs +2 -2
  224. package/package.json +23 -18
  225. package/scripts/setup-cursor-rules.cjs +6 -6
  226. package/dist/chunks/chunk-7MT3QYE6.js +0 -92
  227. package/dist/chunks/chunk-FA2OPP3U.mjs +0 -140
  228. package/dist/chunks/chunk-FKZI2HTI.js +0 -104
  229. package/dist/chunks/chunk-NCQDOPBR.mjs +0 -86
  230. package/dist/chunks/chunk-NTN55ZIX.mjs +0 -113
  231. package/dist/chunks/chunk-QJNQCLMV.js +0 -25
  232. package/dist/chunks/chunk-UDQXLI5Y.mjs +0 -81
  233. package/dist/chunks/chunk-WVIEIRK2.js +0 -136
  234. package/dist/chunks/chunk-XALPBGSC.mjs +0 -23
  235. package/dist/schemas/typography.json +0 -70
  236. package/dist/typography.d.mts +0 -19
  237. package/dist/typography.d.ts +0 -19
  238. package/dist/typography.js +0 -102
  239. package/dist/typography.mjs +0 -79
@@ -1,108 +1,130 @@
1
1
  ---
2
- description: "NEXUS Design System 프로젝트 설정 프로젝트의 기술 스택과 필수 규칙"
2
+ description: "NEXUS Design System project setuptech stack and mandatory rules for this project"
3
3
  alwaysApply: true
4
4
  ---
5
5
 
6
- # NEXUS Design System 프로젝트 설정
6
+ # NEXUS Design System Project Setup
7
7
 
8
- 프로젝트는 NEXUS Design System 사용한다. 코드를 생성할 반드시 아래를 따른다.
8
+ This project uses NEXUS Design System. All generated code MUST follow the rules below.
9
9
 
10
- ## 기술 스택
10
+ ## Tech Stack
11
11
 
12
- - **디자인 토큰**: `@nexus-cross/tokens` (CSS 변수 기반)
13
- - **UI 컴포넌트**: `@nexus-cross/design-system` (React, CVA + Tailwind)
14
- - **스타일링**: Tailwind CSS v4 + NEXUS 시맨틱 토큰
12
+ - **Design Tokens**: `@nexus-cross/tokens` (CSS variable based)
13
+ - **UI Components**: `@nexus-cross/design-system` (React, CVA + Plain CSS)
14
+ - **Styling**: Tailwind CSS v4 + NEXUS semantic tokens
15
15
 
16
- ## 절대 규칙
16
+ ## Design System CSS Setup
17
17
 
18
- 1. **색상은 반드시 NEXUS 토큰을 사용한다.** 하드코딩 금지.
19
- - `bg-bg-default`, `text-text-primary`, `border-border-default` 등
20
- - `#ffffff`, `#000000`, `rgb()` 등 직접 색상값 사용 금지
21
- - 참고: `.cursor/rules/nexus-tokens.mdc`
18
+ Choose one of two CSS entry points depending on the project environment:
22
19
 
23
- 2. **UI 컴포넌트는 반드시 `@nexus-cross/design-system`에서 import한다.** 직접 구현 금지.
24
- - `<Button>`, `<TextInput>`, `<Modal>`, `<Toast>` 등
25
- - Radix UI, Headless UI 등을 직접 import하여 동일 기능 컴포넌트를 만들지 않는다
26
- - 참고: `.cursor/rules/nexus-ui-components.mdc`, `.cursor/rules/nexus-ui-api.mdc`
20
+ | Environment | import | Description |
21
+ |---|---|---|
22
+ | Tailwind v3 / Plain CSS / CSS Modules | `@nexus-cross/design-system/styles` | unlayered CSS |
23
+ | Tailwind v4 | `@nexus-cross/design-system/styles/layer` | wrapped in `@layer nexus` |
27
24
 
28
- 3. **Figma 디자인 구현 시:**
29
- - NEXUS 토큰과 공용 UI를 적극 활용하되, **Figma 디자인에 충실하게** 구현한다
30
- - Figma의 색상값을 보고 가장 가까운 NEXUS 토큰으로 매핑한다
31
- - Figma의 UI 요소(버튼, 입력필드 등)는 `@nexus-cross/design-system` 컴포넌트로 구현한다
32
- - Figma 디자인과 공용 UI의 스타일이 다를 경우, `className`으로 Figma에 맞게 오버라이드한다
33
- - Figma에 없는 커스텀 스타일만 Tailwind 유틸리티로 작성한다
25
+ ```tsx
26
+ // Tailwind v3, Plain CSS, CSS Modules
27
+ import '@nexus-cross/design-system/styles'
28
+
29
+ // Tailwind v4
30
+ import '@nexus-cross/design-system/styles/layer'
31
+ ```
32
+
33
+ For Tailwind v4 projects, also declare layer order in `globals.css`:
34
+ ```css
35
+ @layer base, nexus, components, utilities;
36
+ ```
37
+
38
+ ## Absolute Rules
39
+
40
+ 1. **Always use NEXUS tokens for colors.** Hardcoding is prohibited.
41
+ - `bg-bg-default`, `text-text-primary`, `border-border-default`, etc.
42
+ - Direct color values like `#ffffff`, `#000000`, `rgb()` are prohibited
43
+ - Reference: `.cursor/rules/nexus-tokens.mdc`
44
+
45
+ 2. **Always import UI components from `@nexus-cross/design-system`.** Direct implementation is prohibited.
46
+ - `<Button>`, `<TextInput>`, `<Modal>`, `<Toast>`, etc.
47
+ - Do NOT import Radix UI, Headless UI, etc. to build equivalent components
48
+ - Reference: `.cursor/rules/nexus-ui-components.mdc`, `.cursor/rules/nexus-ui-api.mdc`
49
+
50
+ 3. **When implementing Figma designs:**
51
+ - Actively use NEXUS tokens and shared UI, while **faithfully** implementing the Figma design
52
+ - Map Figma color values to the closest NEXUS token
53
+ - Implement Figma UI elements (buttons, inputs, etc.) using `@nexus-cross/design-system` components
54
+ - If shared UI style differs from Figma, override with `className` to match Figma
55
+ - Only use Tailwind utilities for custom styles not present in Figma
34
56
 
35
- ## Figma MCP → NEXUS 변환 워크플로우
57
+ ## Figma MCP → NEXUS Conversion Workflow
36
58
 
37
- **Figma MCP 도구(get_design_context, get_code ) 출력을 절대 그대로 사용하지 않는다.**
38
- Figma MCP 바닐라 HTML + Tailwind 출력하지만, 프로젝트는 `@nexus-cross/design-system`을 사용한다.
39
- **MCP 출력은 "디자인 의도를 파악하는 참고 자료" 뿐, 최종 코드가 아니다.**
59
+ **NEVER use Figma MCP tool output (get_design_context, get_code, etc.) as-is.**
60
+ Figma MCP outputs vanilla HTML + Tailwind, but this project uses `@nexus-cross/design-system`.
61
+ **MCP output is only a "reference for understanding design intent", not final code.**
40
62
 
41
- ### 필수 3단계 워크플로우
63
+ ### Mandatory 3-Step Workflow
42
64
 
43
- **1단계: 디자인 분석 (MCP 호출)**
44
- - `get_design_context`로 구조와 레이아웃 파악
45
- - `get_screenshot`으로 시각적 참조 확인
46
- - 단계에서 MCP 출력하는 코드는 **읽기만 하고 사용하지 않는다**
65
+ **Step 1: Design Analysis (MCP call)**
66
+ - Use `get_design_context` to understand structure and layout
67
+ - Use `get_screenshot` for visual reference
68
+ - Code output from MCP at this stage is **read-only — do not use it**
47
69
 
48
- **2단계: 컴포넌트 매핑 (코드 작성 전에 반드시 수행)**
49
- MCP 출력의 요소를 NEXUS 컴포넌트로 매핑한다. **코드를 줄이라도 쓰기 전에** 매핑을 먼저 완료한다.
70
+ **Step 2: Component Mapping (MUST be done before writing code)**
71
+ Map each element from MCP output to a NEXUS component. **Complete this mapping before writing a single line of code.**
50
72
 
51
73
  ```
52
- MCP 출력 분석:
53
- - <button> 2개 발견 → Button (primary, ghost)
54
- - <input type="text"> 1개 → TextInput
55
- - <select> 1개 → Select + SelectItem
56
- - 색상 #09B498 → bg-accent-primary (NEXUS 토큰)
57
- - 색상 #1E232E → text-text-primary (NEXUS 토큰)
58
- - 간격 16px → var(--spacing-padding-md)
74
+ MCP Output Analysis:
75
+ - 2 <button> found → Button (primary, ghost)
76
+ - 1 <input type="text"> → TextInput
77
+ - 1 <select> → Select + SelectItem
78
+ - Color #09B498 → bg-accent-primary (NEXUS token)
79
+ - Color #1E232E → text-text-primary (NEXUS token)
80
+ - Spacing 16px → var(--spacing-padding-md)
59
81
  ```
60
82
 
61
- **3단계: NEXUS 코드 생성**
62
- 매핑을 기반으로 코드를 작성한다. 단계에서는 MCP 출력 코드를 참조하지 않는다.
83
+ **Step 3: NEXUS Code Generation**
84
+ Write code based on the mapping. Do NOT reference MCP output code at this stage.
63
85
 
64
- ### 컴포넌트 변환 테이블
86
+ ### Component Conversion Table
65
87
 
66
- | MCP 출력 (네이티브 HTML) | → NEXUS 컴포넌트 |
88
+ | MCP Output (Native HTML) | → NEXUS Component |
67
89
  |---|---|
68
- | `<button>`, `<a>` 버튼 스타일 | `<Button>` (variant, size 지정) |
69
- | `<input type="text">` | `<TextInput>` (prefixIcon, suffixIcon 지원) |
70
- | `<textarea>` | `<TextArea>` (showCount, maxLength 지원) |
90
+ | `<button>`, `<a>` button style | `<Button>` (specify variant, size) |
91
+ | `<input type="text">` | `<TextInput>` (prefixIcon, suffixIcon supported) |
92
+ | `<textarea>` | `<TextArea>` (showCount, maxLength supported) |
71
93
  | `<input type="number">` | `<NumberInput>` |
72
94
  | `<select>` | `<Select>` + `<SelectItem>` |
73
95
  | `<input type="checkbox">` | `<CheckBox>` |
74
96
  | `<input type="radio">` | `<RadioGroup>` + `<RadioItem>` |
75
- | 토글/스위치 UI | `<Switch>` |
76
- | UI | `<Tab>` (items 배열로 구성) |
77
- | 칩/태그/필터/뱃지 | `<Chip>` (variant, onClose 지원) |
78
- | 아바타/프로필 이미지 | `<Avatar>` (fallback, shape 지원) |
79
- | 구분선/`<hr>` | `<Divider>` (orientation, variant 지정) |
80
- | 드롭다운 메뉴 | `<Select>` 또는 `<Popover>` |
81
- | 툴팁 | `<Tooltip>` |
82
- | 아코디언/접기 | `<Accordion>` |
83
- | 캐러셀/슬라이더 | `<Carousel>` + `<CarouselSlide>` |
84
- | 페이지네이션 | `<Pagination>` |
85
- | 모달/다이얼로그 | `modal()` + `<ModalTemplate>` |
86
- | 토스트/알림 | `toast()` |
87
- | 드로어/바텀시트 | `<Drawer>` |
88
- | 로딩 스피너 | `<Spinner>` |
89
- | 스켈레톤 로딩 | `<Skeleton>` |
90
- | 데이터 리스트 | `<DataList>` |
91
- | 테이블 | `<Table>` + `<TableRow>` + `<TdColumn>` |
92
- | 숫자 카운트 애니메이션 | `<Counter>` |
93
- | 카운트다운 타이머 | `<Countdown>` |
94
- | 텍스트 말줄임 | `<Ellipsis>` |
95
- | 흐르는 텍스트 | `<Marquee>` |
96
- | 무한 스크롤 리스트 | `<InfiniteScroll>` |
97
- | 대량 리스트 (가상 스크롤) | `<VirtualList>` / `<VirtualGrid>` |
98
-
99
- **위 교체를 하지 않고 네이티브 HTML을 사용하면 규칙 위반이다.**
100
-
101
- ### 색상 변환 테이블
102
-
103
- MCP 출력하는 색상값을 NEXUS 토큰으로 변환한다:
104
-
105
- | MCP 출력 색상 | → NEXUS 토큰 |
97
+ | Toggle/Switch UI | `<Switch>` |
98
+ | Tab UI | `<Tab>` (configured via items array) |
99
+ | Chip/Tag/Filter/Badge | `<Chip>` (variant, onClose supported) |
100
+ | Avatar/Profile image | `<Avatar>` (fallback, shape supported) |
101
+ | Divider/`<hr>` | `<Divider>` (specify orientation, variant) |
102
+ | Dropdown menu | `<Select>` or `<Popover>` |
103
+ | Tooltip | `<Tooltip>` |
104
+ | Accordion/Collapsible | `<Accordion>` |
105
+ | Carousel/Slider | `<Carousel>` + `<CarouselSlide>` |
106
+ | Pagination | `<Pagination>` |
107
+ | Modal/Dialog | `modal()` + `<ModalTemplate>` |
108
+ | Toast/Notification | `toast()` |
109
+ | Drawer/Bottom sheet | `<Drawer>` |
110
+ | Loading spinner | `<Spinner>` |
111
+ | Skeleton loader | `<Skeleton>` |
112
+ | Data list | `<DataList>` |
113
+ | Table | `<Table>` + `<TableRow>` + `<TdColumn>` |
114
+ | Number count animation | `<Counter>` |
115
+ | Countdown timer | `<Countdown>` |
116
+ | Text ellipsis | `<Ellipsis>` |
117
+ | Scrolling text | `<Marquee>` |
118
+ | Infinite scroll list | `<InfiniteScroll>` |
119
+ | Large list (virtual scroll) | `<VirtualList>` / `<VirtualGrid>` |
120
+
121
+ **Using native HTML instead of the replacements above is a rule violation.**
122
+
123
+ ### Color Conversion Table
124
+
125
+ Convert MCP output colors to NEXUS tokens:
126
+
127
+ | MCP Output Color | → NEXUS Token |
106
128
  |---|---|
107
129
  | `#FFFFFF`, `bg-white` | `bg-bg-default` |
108
130
  | `#F3F6F8`, `bg-gray-50` | `bg-bg-subtle` |
@@ -117,59 +139,59 @@ MCP가 출력하는 색상값을 NEXUS 토큰으로 변환한다:
117
139
  | `#FF9D00`, `bg-amber-*` | `bg-status-warning` |
118
140
  | `#0095FF`, `bg-blue-*` | `bg-status-info` |
119
141
 
120
- 위에 정확히 매칭되지 않는 색상은 가장 가까운 NEXUS 토큰을 선택한다.
121
- **어떤 경우에도 hex 값이나 Tailwind 기본 색상(bg-blue-500 )을 사용하지 않는다.**
142
+ For colors not exactly matching above, choose the closest NEXUS token.
143
+ **Under no circumstances use hex values or default Tailwind colors (bg-blue-500, etc.).**
122
144
 
123
- ### Button variant 판단 기준
145
+ ### Button Variant Decision Criteria
124
146
 
125
- Figma에서 버튼의 시각적 스타일을 보고 variant를 결정한다:
147
+ Determine the variant based on visual style in Figma:
126
148
 
127
- | Figma 시각적 특징 | → variant |
149
+ | Figma Visual Characteristic | → variant |
128
150
  |---|---|
129
- | 채워진 accent 색상 배경 (초록/틸) | `variant="primary"` |
130
- | 채워진 회색/중립 배경 | `variant="secondary"` |
131
- | 테두리만 있고 배경 투명 | `variant="outline"` |
132
- | 배경/테두리 없이 텍스트만 | `variant="ghost"` |
133
- | 빨간색/위험 표시 | `variant="danger"` |
151
+ | Filled accent color background (green/teal) | `variant="primary"` |
152
+ | Filled gray/neutral background | `variant="secondary"` |
153
+ | Border only, transparent background | `variant="outline"` |
154
+ | No background/border, text only | `variant="ghost"` |
155
+ | Red/danger indicator | `variant="danger"` |
134
156
 
135
- ### 자기 검증 체크리스트
157
+ ### Self-Verification Checklist
136
158
 
137
- 코드를 출력하기 전에 아래를 확인한다:
159
+ Verify the following before outputting code:
138
160
 
139
- - [ ] `<button>`, `<input>`, `<select>`, `<textarea>` 등 네이티브 HTML 폼 요소가 없는가?
140
- - [ ] hex 색상값(`#...`)이 없는가?
141
- - [ ] Tailwind 기본 색상(`bg-blue-500`, `text-gray-900` )이 없는가?
142
- - [ ] 모든 import가 `@nexus-cross/design-system`에서 오는가?
143
- - [ ] 모달은 `ModalTemplate`으로 감쌌는가?
144
- - [ ] 간격/크기에 하드코딩 px 없는가?
161
+ - [ ] No native HTML form elements (`<button>`, `<input>`, `<select>`, `<textarea>`, etc.)?
162
+ - [ ] No hex color values (`#...`)?
163
+ - [ ] No default Tailwind colors (`bg-blue-500`, `text-gray-900`, etc.)?
164
+ - [ ] All imports from `@nexus-cross/design-system`?
165
+ - [ ] Modals wrapped with `ModalTemplate`?
166
+ - [ ] No hardcoded px values for spacing/sizing?
145
167
 
146
- **하나라도 실패하면 코드를 수정한 출력한다.**
168
+ **If any check fails, fix the code before outputting.**
147
169
 
148
170
  ```tsx
149
- // Figma MCP 코드 그대로 사용 (금지)
150
- <button className="bg-[#09B498] text-white px-4 py-2 rounded-lg">확인</button>
151
- <input className="border border-[#C6D0DA] px-3 py-2 rounded" placeholder="검색" />
152
- <div className="w-8 h-8 rounded-full bg-gray-200" /> {/* 아바타 */}
153
- <hr className="border-[#ECF0F2]" /> {/* 구분선 */}
154
-
155
- // NEXUS 컴포넌트로 교체 (필수)
156
- <Button variant="primary">확인</Button>
157
- <TextInput placeholder="검색" prefixIcon={<SearchIcon />} />
171
+ // WRONG — Using Figma MCP code as-is (prohibited)
172
+ <button className="bg-[#09B498] text-white px-4 py-2 rounded-lg">Confirm</button>
173
+ <input className="border border-[#C6D0DA] px-3 py-2 rounded" placeholder="Search" />
174
+ <div className="w-8 h-8 rounded-full bg-gray-200" /> {/* avatar */}
175
+ <hr className="border-[#ECF0F2]" /> {/* divider */}
176
+
177
+ // CORRECT — Replace with NEXUS components (required)
178
+ <Button variant="primary">Confirm</Button>
179
+ <TextInput placeholder="Search" prefixIcon={<SearchIcon />} />
158
180
  <Avatar fallback="JD" size="sm" />
159
181
  <Divider />
160
182
  ```
161
183
 
162
- ## 전역 설정 ( 루트에 필수)
184
+ ## Global Setup (Required at App Root)
163
185
 
164
- 아래 컴포넌트를 루트(layout.tsx 또는 App.tsx)에 **반드시** 배치한다.
186
+ The following components MUST be placed at the app root (layout.tsx or App.tsx).
165
187
 
166
- | 컴포넌트 | import | 필수 조건 | 설명 |
167
- |----------|--------|----------|------|
168
- | `<ModalContainer />` | `@nexus-cross/design-system/modal` | `modal()` 또는 `useModal()` 사용 시 | 모달 렌더링 컨테이너 |
169
- | `<Toaster />` | `@nexus-cross/design-system` | `toast()` 사용 시 | 토스트 알림 렌더링 |
188
+ | Component | import | Required When | Description |
189
+ |---|---|---|---|
190
+ | `<ModalContainer />` | `@nexus-cross/design-system/modal` | Using `modal()` or `useModal()` | Modal rendering container |
191
+ | `<Toaster />` | `@nexus-cross/design-system` | Using `toast()` | Toast notification renderer |
170
192
 
171
193
  ```tsx
172
- // layout.tsx 또는 App.tsx
194
+ // layout.tsx or App.tsx
173
195
  import { ModalContainer } from '@nexus-cross/design-system/modal';
174
196
  import { Toaster } from '@nexus-cross/design-system';
175
197
 
@@ -184,87 +206,87 @@ export default function RootLayout({ children }) {
184
206
  }
185
207
  ```
186
208
 
187
- **전역 설정이 필요 없는 컴포넌트** (별도 Provider 없이 바로 사용 가능):
188
- - Tooltip (내부에 Provider 내장)
189
- - Popover, Drawer, Select, Accordion 모든 나머지 컴포넌트
209
+ **Components that do NOT need global setup** (usable directly without Provider):
210
+ - Tooltip (Provider built-in)
211
+ - Popover, Drawer, Select, Accordion, and all other components
190
212
 
191
- ## Import 패턴
213
+ ## Import Patterns
192
214
 
193
215
  ```tsx
194
- // 일반 컴포넌트
216
+ // General components
195
217
  import { Button, TextInput, TextArea, Select, Switch, Chip, Spinner, Divider } from '@nexus-cross/design-system';
196
218
 
197
- // 오버레이 컴포넌트
219
+ // Overlay components
198
220
  import { Tooltip, Popover, Drawer, Accordion } from '@nexus-cross/design-system';
199
221
 
200
- // 토스트
222
+ // Toast
201
223
  import { toast, Toaster } from '@nexus-cross/design-system';
202
224
 
203
- // 모달 시스템 (별도 서브패스)
225
+ // Modal system (separate subpath)
204
226
  import { modal, useModal, ModalTemplate, ModalContainer } from '@nexus-cross/design-system/modal';
205
227
 
206
- // 토큰 (JS API 필요한 경우만)
228
+ // Tokens (only when JS API is needed)
207
229
  import { getTheme } from '@nexus-cross/tokens';
208
230
  ```
209
231
 
210
- ## 모달 작성 규칙
232
+ ## Modal Writing Rules
211
233
 
212
- 모달 컴포넌트는 **반드시 `ModalTemplate`으로 감싸야 한다.** `<div>`만으로 모달을 만들지 않는다.
234
+ Modal components **MUST be wrapped with `ModalTemplate`.** Do NOT create modals with plain `<div>`.
213
235
 
214
236
  ```tsx
215
- // 올바른 모달
237
+ // CORRECT modal
216
238
  import { ModalTemplate } from '@nexus-cross/design-system/modal';
217
239
 
218
240
  function MyModal({ close, resolve }: { close: () => void; resolve: (value: any) => void }) {
219
241
  return (
220
- <ModalTemplate title="제목" close={close}>
221
- <p className="text-text-secondary">내용</p>
222
- <Button onClick={() => resolve({ confirmed: true })}>확인</Button>
242
+ <ModalTemplate title="Title" close={close}>
243
+ <p className="text-text-secondary">Content</p>
244
+ <Button onClick={() => resolve({ confirmed: true })}>Confirm</Button>
223
245
  </ModalTemplate>
224
246
  );
225
247
  }
226
248
 
227
- // 호출
249
+ // Call
228
250
  const result = await modal({ component: MyModal });
229
251
  ```
230
252
 
231
253
  ```tsx
232
- // 잘못된 모달 ModalTemplate 없이 div 사용
254
+ // WRONG modalusing div without ModalTemplate
233
255
  function MyModal({ close }: { close: () => void }) {
234
256
  return (
235
257
  <div className="p-6 bg-white rounded-lg">
236
- <h2>제목</h2>
237
- <p>내용</p>
258
+ <h2>Title</h2>
259
+ <p>Content</p>
238
260
  </div>
239
261
  );
240
262
  }
241
263
  ```
242
264
 
243
- ## 토스트 사용 규칙
265
+ ## Toast Usage Rules
244
266
 
245
267
  ```tsx
246
268
  import { toast } from '@nexus-cross/design-system';
247
269
 
248
- toast('기본 메시지');
249
- toast.success('성공!');
250
- toast.error('오류가 발생했습니다');
251
- toast.loading('처리 중...');
270
+ toast('Default message');
271
+ toast.success('Success!');
272
+ toast.error('An error occurred');
273
+ toast.loading('Processing...');
252
274
  ```
253
275
 
254
- 루트에 `<Toaster />` 없이 `toast()`를 호출하면 아무것도 표시되지 않는다.
276
+ Calling `toast()` without `<Toaster />` at the root will display nothing.
255
277
 
256
- ## 토큰 사용 예시
278
+ ## Token Usage Examples
257
279
 
258
280
  ```tsx
259
- // 올바른 사용
281
+ // CORRECT usage
260
282
  <div className="bg-bg-default text-text-primary border border-border-default">
261
- <Button variant="primary">확인</Button>
262
- <TextInput placeholder="검색..." />
283
+ <Button variant="primary">Confirm</Button>
284
+ <TextInput placeholder="Search..." />
263
285
  </div>
264
286
 
265
- // 잘못된 사용
287
+ // WRONG usage
266
288
  <div className="bg-white text-gray-900 border border-gray-200">
267
- <button className="bg-green-500 text-white px-4 py-2 rounded">확인</button>
268
- <input className="border border-gray-300 px-3 py-2" placeholder="검색..." />
289
+ <button className="bg-green-500 text-white px-4 py-2 rounded">Confirm</button>
290
+ <input className="border border-gray-300 px-3 py-2" placeholder="Search..." />
269
291
  </div>
270
292
  ```