@nexus-cross/design-system 1.0.14 → 1.1.1

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 (284) hide show
  1. package/claude-rules/nexus/CLAUDE.md +85 -0
  2. package/claude-rules/nexus/commands/nexus-audit.md +79 -0
  3. package/claude-rules/nexus/commands/nexus-component-map.md +85 -0
  4. package/claude-rules/nexus/commands/nexus-token-check.md +68 -0
  5. package/claude-rules/nexus/skills/nexus-design-system/SKILL.md +92 -0
  6. package/cursor-rules/nexus-ui-api.mdc +910 -41
  7. package/cursor-rules/nexus-ui-decisions.mdc +263 -0
  8. package/dist/accordion.js +0 -1
  9. package/dist/accordion.mjs +0 -1
  10. package/dist/alert.js +0 -1
  11. package/dist/alert.mjs +0 -1
  12. package/dist/avatar.js +0 -1
  13. package/dist/avatar.mjs +0 -1
  14. package/dist/badge.js +0 -1
  15. package/dist/badge.mjs +0 -1
  16. package/dist/breadcrumb.js +0 -1
  17. package/dist/breadcrumb.mjs +0 -1
  18. package/dist/button.js +0 -1
  19. package/dist/button.mjs +0 -1
  20. package/dist/carousel.js +0 -1
  21. package/dist/carousel.mjs +0 -1
  22. package/dist/checkbox.js +0 -1
  23. package/dist/checkbox.mjs +0 -1
  24. package/dist/chip.js +0 -1
  25. package/dist/chip.mjs +0 -1
  26. package/dist/chunks/chunk-2Z52NPWB.js +78 -0
  27. package/dist/chunks/chunk-3SCSND6S.js +7 -0
  28. package/dist/chunks/chunk-46P52MFM.mjs +56 -0
  29. package/dist/chunks/chunk-AG2UJPFX.mjs +621 -0
  30. package/dist/chunks/{chunk-33UFQJIO.mjs → chunk-BJMXZJWO.mjs} +16 -5
  31. package/dist/chunks/{chunk-YZV6FWE7.js → chunk-JLDQNDFT.js} +16 -5
  32. package/dist/chunks/{chunk-K574BYHQ.js → chunk-K3CK7NTP.js} +22 -4
  33. package/dist/chunks/{chunk-Z4YM7LU3.mjs → chunk-PIGHBDK5.mjs} +22 -4
  34. package/dist/chunks/chunk-QWK4CLS2.mjs +5 -0
  35. package/dist/chunks/chunk-RC2Y4UH7.js +648 -0
  36. package/dist/chunks/{chunk-PEIEVKD5.js → chunk-RCIBLLSF.js} +11 -12
  37. package/dist/chunks/{chunk-K2TBLM3F.mjs → chunk-THBE27U3.mjs} +11 -12
  38. package/dist/client-only.js +0 -1
  39. package/dist/client-only.mjs +0 -1
  40. package/dist/combobox.js +28 -0
  41. package/dist/combobox.mjs +3 -0
  42. package/dist/components/Combobox.d.ts +93 -0
  43. package/dist/components/Combobox.d.ts.map +1 -0
  44. package/dist/components/DataGrid.d.ts +44 -0
  45. package/dist/components/DataGrid.d.ts.map +1 -0
  46. package/dist/components/DataList.d.ts +3 -1
  47. package/dist/components/DataList.d.ts.map +1 -1
  48. package/dist/components/RadioGroup.d.ts +4 -0
  49. package/dist/components/RadioGroup.d.ts.map +1 -1
  50. package/dist/components/ToggleGroup.d.ts +2 -1
  51. package/dist/components/ToggleGroup.d.ts.map +1 -1
  52. package/dist/countdown.js +0 -1
  53. package/dist/countdown.mjs +0 -1
  54. package/dist/counter.js +0 -1
  55. package/dist/counter.mjs +0 -1
  56. package/dist/data-grid.js +14 -0
  57. package/dist/data-grid.mjs +5 -0
  58. package/dist/data-list.js +2 -3
  59. package/dist/data-list.mjs +1 -2
  60. package/dist/date-picker.js +0 -1
  61. package/dist/date-picker.mjs +0 -1
  62. package/dist/divider.js +0 -1
  63. package/dist/divider.mjs +0 -1
  64. package/dist/drawer.js +0 -1
  65. package/dist/drawer.mjs +0 -1
  66. package/dist/dropdown-menu.js +0 -1
  67. package/dist/dropdown-menu.mjs +0 -1
  68. package/dist/ellipsis.js +0 -1
  69. package/dist/ellipsis.mjs +0 -1
  70. package/dist/empty-state.js +0 -1
  71. package/dist/empty-state.mjs +0 -1
  72. package/dist/error-boundary.js +0 -1
  73. package/dist/error-boundary.mjs +0 -1
  74. package/dist/hooks/useCheckDevice.js +0 -1
  75. package/dist/hooks/useCheckDevice.mjs +0 -1
  76. package/dist/hooks/useClickOutside.js +0 -1
  77. package/dist/hooks/useClickOutside.mjs +0 -1
  78. package/dist/hooks/useDraggableBottomSheet.js +0 -1
  79. package/dist/hooks/useDraggableBottomSheet.mjs +0 -1
  80. package/dist/hooks/useDraggableWindow.js +0 -1
  81. package/dist/hooks/useDraggableWindow.mjs +0 -1
  82. package/dist/hooks/useInView.js +0 -1
  83. package/dist/hooks/useInView.mjs +0 -1
  84. package/dist/hooks/useModal.js +0 -1
  85. package/dist/hooks/useModal.mjs +0 -1
  86. package/dist/image-upload.js +0 -1
  87. package/dist/image-upload.mjs +0 -1
  88. package/dist/index.d.ts +4 -2
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.js +101 -85
  91. package/dist/index.mjs +11 -11
  92. package/dist/infinite-scroll.js +0 -1
  93. package/dist/infinite-scroll.mjs +0 -1
  94. package/dist/marquee.js +0 -1
  95. package/dist/marquee.mjs +0 -1
  96. package/dist/modal/index.js +11 -12
  97. package/dist/modal/index.mjs +2 -3
  98. package/dist/number-input.js +0 -1
  99. package/dist/number-input.mjs +0 -1
  100. package/dist/nx-image.js +0 -1
  101. package/dist/nx-image.mjs +0 -1
  102. package/dist/pagination.js +0 -1
  103. package/dist/pagination.mjs +0 -1
  104. package/dist/popover.js +0 -1
  105. package/dist/popover.mjs +0 -1
  106. package/dist/price-input.js +0 -1
  107. package/dist/price-input.mjs +0 -1
  108. package/dist/progress.js +0 -1
  109. package/dist/progress.mjs +0 -1
  110. package/dist/radio-group.js +5 -6
  111. package/dist/radio-group.mjs +1 -2
  112. package/dist/schemas/_all.json +353 -117
  113. package/dist/schemas/accordion.d.ts.map +1 -1
  114. package/dist/schemas/accordion.json +1 -1
  115. package/dist/schemas/alert.d.ts.map +1 -1
  116. package/dist/schemas/alert.json +1 -1
  117. package/dist/schemas/avatar.d.ts.map +1 -1
  118. package/dist/schemas/avatar.json +1 -1
  119. package/dist/schemas/badge.d.ts.map +1 -1
  120. package/dist/schemas/badge.json +1 -1
  121. package/dist/schemas/breadcrumb.d.ts.map +1 -1
  122. package/dist/schemas/breadcrumb.json +1 -1
  123. package/dist/schemas/button.d.ts.map +1 -1
  124. package/dist/schemas/button.json +1 -1
  125. package/dist/schemas/carousel.d.ts.map +1 -1
  126. package/dist/schemas/carousel.json +1 -1
  127. package/dist/schemas/checkBox.json +1 -1
  128. package/dist/schemas/checkbox.d.ts.map +1 -1
  129. package/dist/schemas/chip.d.ts.map +1 -1
  130. package/dist/schemas/chip.json +1 -1
  131. package/dist/schemas/client-only.d.ts.map +1 -1
  132. package/dist/schemas/clientOnly.json +1 -1
  133. package/dist/schemas/combobox.d.ts +108 -0
  134. package/dist/schemas/combobox.d.ts.map +1 -0
  135. package/dist/schemas/combobox.json +98 -0
  136. package/dist/schemas/comboboxOption.json +35 -0
  137. package/dist/schemas/comboboxOptionDescription.json +20 -0
  138. package/dist/schemas/comboboxOptionMeta.json +20 -0
  139. package/dist/schemas/countdown.d.ts.map +1 -1
  140. package/dist/schemas/countdown.json +1 -1
  141. package/dist/schemas/counter.d.ts.map +1 -1
  142. package/dist/schemas/counter.json +1 -1
  143. package/dist/schemas/data-grid.d.ts +74 -0
  144. package/dist/schemas/data-grid.d.ts.map +1 -0
  145. package/dist/schemas/data-list.d.ts.map +1 -1
  146. package/dist/schemas/dataGrid.json +102 -0
  147. package/dist/schemas/dataList.json +1 -1
  148. package/dist/schemas/date-picker.d.ts.map +1 -1
  149. package/dist/schemas/datePicker.json +1 -1
  150. package/dist/schemas/divider.d.ts.map +1 -1
  151. package/dist/schemas/divider.json +1 -1
  152. package/dist/schemas/drawer.d.ts.map +1 -1
  153. package/dist/schemas/drawer.json +1 -1
  154. package/dist/schemas/dropdown-menu.d.ts.map +1 -1
  155. package/dist/schemas/dropdownMenu.json +1 -1
  156. package/dist/schemas/ellipsis.d.ts.map +1 -1
  157. package/dist/schemas/ellipsis.json +1 -1
  158. package/dist/schemas/empty-state.d.ts.map +1 -1
  159. package/dist/schemas/emptyState.json +1 -1
  160. package/dist/schemas/error-boundary.d.ts.map +1 -1
  161. package/dist/schemas/errorBoundary.json +1 -1
  162. package/dist/schemas/image-upload.d.ts.map +1 -1
  163. package/dist/schemas/imageUpload.json +1 -1
  164. package/dist/schemas/index.d.ts +2 -1
  165. package/dist/schemas/index.d.ts.map +1 -1
  166. package/dist/schemas/infinite-scroll.d.ts.map +1 -1
  167. package/dist/schemas/infiniteScroll.json +1 -1
  168. package/dist/schemas/marquee.d.ts.map +1 -1
  169. package/dist/schemas/marquee.json +1 -1
  170. package/dist/schemas/modal.d.ts.map +1 -1
  171. package/dist/schemas/modalTemplate.json +1 -1
  172. package/dist/schemas/number-input.d.ts.map +1 -1
  173. package/dist/schemas/numberInput.json +1 -1
  174. package/dist/schemas/nx-image.d.ts.map +1 -1
  175. package/dist/schemas/nxImage.json +1 -1
  176. package/dist/schemas/pagination.d.ts.map +1 -1
  177. package/dist/schemas/pagination.json +1 -1
  178. package/dist/schemas/popover.d.ts.map +1 -1
  179. package/dist/schemas/popover.json +1 -1
  180. package/dist/schemas/price-input.d.ts.map +1 -1
  181. package/dist/schemas/priceInput.json +1 -1
  182. package/dist/schemas/progress.d.ts.map +1 -1
  183. package/dist/schemas/progress.json +1 -1
  184. package/dist/schemas/radio-group.d.ts +9 -0
  185. package/dist/schemas/radio-group.d.ts.map +1 -1
  186. package/dist/schemas/radioGroup.json +10 -1
  187. package/dist/schemas/radioItem.json +11 -0
  188. package/dist/schemas/select.d.ts.map +1 -1
  189. package/dist/schemas/select.json +1 -1
  190. package/dist/schemas/skeleton.d.ts.map +1 -1
  191. package/dist/schemas/skeleton.json +1 -1
  192. package/dist/schemas/slider.d.ts.map +1 -1
  193. package/dist/schemas/slider.json +1 -1
  194. package/dist/schemas/spinner.d.ts.map +1 -1
  195. package/dist/schemas/spinner.json +1 -1
  196. package/dist/schemas/stepper.d.ts.map +1 -1
  197. package/dist/schemas/stepper.json +1 -1
  198. package/dist/schemas/switch.d.ts.map +1 -1
  199. package/dist/schemas/switch.json +1 -1
  200. package/dist/schemas/tab.d.ts.map +1 -1
  201. package/dist/schemas/tab.json +1 -1
  202. package/dist/schemas/table.d.ts.map +1 -1
  203. package/dist/schemas/table.json +1 -1
  204. package/dist/schemas/tableRow.json +1 -1
  205. package/dist/schemas/tag-input.d.ts.map +1 -1
  206. package/dist/schemas/tagInput.json +1 -1
  207. package/dist/schemas/tdColumn.json +1 -1
  208. package/dist/schemas/text-area.d.ts.map +1 -1
  209. package/dist/schemas/text-input.d.ts +2 -2
  210. package/dist/schemas/text-input.d.ts.map +1 -1
  211. package/dist/schemas/textArea.json +1 -1
  212. package/dist/schemas/textInput.json +1 -1
  213. package/dist/schemas/toast.d.ts.map +1 -1
  214. package/dist/schemas/toastOptions.json +1 -1
  215. package/dist/schemas/toaster.json +1 -1
  216. package/dist/schemas/toggle-group.d.ts +6 -3
  217. package/dist/schemas/toggle-group.d.ts.map +1 -1
  218. package/dist/schemas/toggleGroup.json +9 -3
  219. package/dist/schemas/tooltip.d.ts.map +1 -1
  220. package/dist/schemas/tooltip.json +1 -1
  221. package/dist/schemas/virtual-scroll.d.ts.map +1 -1
  222. package/dist/schemas/virtualGrid.json +1 -1
  223. package/dist/schemas/virtualList.json +1 -1
  224. package/dist/schemas.js +928 -66
  225. package/dist/schemas.mjs +924 -66
  226. package/dist/select.js +0 -1
  227. package/dist/select.mjs +0 -1
  228. package/dist/skeleton.js +0 -1
  229. package/dist/skeleton.mjs +0 -1
  230. package/dist/slider.js +0 -1
  231. package/dist/slider.mjs +0 -1
  232. package/dist/spinner.js +0 -1
  233. package/dist/spinner.mjs +0 -1
  234. package/dist/stepper.js +0 -1
  235. package/dist/stepper.mjs +0 -1
  236. package/dist/styles/.generated/built.d.ts +1 -1
  237. package/dist/styles/.generated/built.d.ts.map +1 -1
  238. package/dist/styles/layer.js +2 -3
  239. package/dist/styles/layer.mjs +1 -2
  240. package/dist/styles.css +484 -13
  241. package/dist/styles.js +2 -3
  242. package/dist/styles.layered.css +484 -13
  243. package/dist/styles.mjs +1 -2
  244. package/dist/switch.js +0 -1
  245. package/dist/switch.mjs +0 -1
  246. package/dist/tab.js +0 -1
  247. package/dist/tab.mjs +0 -1
  248. package/dist/table.js +0 -1
  249. package/dist/table.mjs +0 -1
  250. package/dist/tag-input.js +0 -1
  251. package/dist/tag-input.mjs +0 -1
  252. package/dist/text-area.js +0 -1
  253. package/dist/text-area.mjs +0 -1
  254. package/dist/text-input.js +0 -1
  255. package/dist/text-input.mjs +0 -1
  256. package/dist/toast.js +0 -1
  257. package/dist/toast.mjs +0 -1
  258. package/dist/toggle-group.js +3 -4
  259. package/dist/toggle-group.mjs +1 -2
  260. package/dist/tooltip.js +0 -1
  261. package/dist/tooltip.mjs +0 -1
  262. package/dist/utils/cn.js +0 -1
  263. package/dist/utils/cn.mjs +0 -1
  264. package/dist/utils/scroll.js +0 -1
  265. package/dist/utils/scroll.mjs +0 -1
  266. package/dist/virtual-scroll.js +0 -1
  267. package/dist/virtual-scroll.mjs +0 -1
  268. package/package.json +14 -8
  269. package/scripts/setup-cursor-rules.cjs +164 -27
  270. package/dist/chunks/chunk-22ULI3BF.js +0 -21
  271. package/dist/chunks/chunk-CVYXRSXT.mjs +0 -8
  272. package/dist/chunks/chunk-I252NERB.mjs +0 -21
  273. package/dist/chunks/chunk-JNMCYWGY.js +0 -10
  274. package/dist/chunks/chunk-LAOQRXCE.js +0 -7
  275. package/dist/chunks/chunk-S6ODYMFP.mjs +0 -5
  276. package/dist/components/ThemeProvider.d.ts +0 -25
  277. package/dist/components/ThemeProvider.d.ts.map +0 -1
  278. package/dist/schemas/theme-provider.d.ts +0 -36
  279. package/dist/schemas/theme-provider.d.ts.map +0 -1
  280. package/dist/schemas/themeProvider.json +0 -65
  281. package/dist/theme-provider.js +0 -15
  282. package/dist/theme-provider.mjs +0 -2
  283. package/dist/chunks/{chunk-CWMLTXOH.mjs → chunk-5ZVPTIL3.mjs} +1 -1
  284. package/dist/chunks/{chunk-HFBTS42N.js → chunk-7F4SOLAC.js} +1 -1
package/dist/schemas.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import './chunks/chunk-CVYXRSXT.mjs';
2
1
  import { z } from 'zod';
3
2
 
3
+ // src/schemas/breadcrumb.ts
4
4
  z.object({
5
5
  children: z.any().describe("Content to render inside the breadcrumb item (ReactNode). Can be plain text, Link, Select, or any ReactElement."),
6
6
  className: z.string().optional().describe("Additional CSS class")
@@ -11,7 +11,21 @@ var breadcrumbPropsSchema = z.object({
11
11
  maxItems: z.number().optional().describe('Max visible items. When exceeded, middle items collapse with "\u2026"'),
12
12
  className: z.string().optional().describe("Style override for the root nav element")
13
13
  }).describe(
14
- "Breadcrumb navigation (compound component pattern). Use <Breadcrumb.Item> children instead of items array. Each Item can wrap arbitrary ReactNode (Link, Select, plain text, etc.)."
14
+ `Breadcrumb \u2014 hierarchical location navigation (Home > Settings > Profile).
15
+
16
+ WHEN TO USE:
17
+ \u2022 Multi-level information architecture (>=3 levels deep)
18
+ \u2022 Hierarchical category drill-down (file system, taxonomy)
19
+ \u2022 Step-based linear flow \u2192 Stepper (not Breadcrumb)
20
+ \u2022 Tab switching \u2192 Tab
21
+ \u2022 Single-level navigation \u2192 page title alone
22
+
23
+ Compound pattern: use <Breadcrumb.Item> children. Each Item wraps any ReactNode (Link, Select, plain text). Use maxItems for long paths (auto-collapse with "\u2026").
24
+
25
+ ANTI-PATTERNS:
26
+ \u2717 Breadcrumb with 1 level \u2014 just show page title
27
+ \u2717 Breadcrumb with > 6 visible items \u2192 set maxItems
28
+ \u2717 Last item as a link (it's the current page; should be plain text)`
15
29
  );
16
30
  var buttonPropsSchema = z.object({
17
31
  semantic: z.enum(["primary", "secondary", "normal", "danger"]).default("primary").describe(
@@ -31,7 +45,17 @@ var buttonPropsSchema = z.object({
31
45
  style: z.any().optional().describe("Inline style (CSSProperties)"),
32
46
  className: z.string().optional().describe("Style override")
33
47
  }).describe(
34
- "Interactive button. semantic(color) x variant(style) 2-axis system. Rendering element changeable via asChild."
48
+ `Interactive button (always prefer over native <button>).
49
+
50
+ WHEN TO USE: any clickable action \u2014 submit, navigate (with asChild), open modal, trigger menu.
51
+ 2-axis: semantic (color intent) \xD7 variant (visual weight). Use semantic="primary" for the page's main CTA, "danger" for destructive actions, "secondary" for sub actions, "normal" for neutral.
52
+
53
+ ANTI-PATTERNS:
54
+ \u2717 <button className="bg-blue-500"> \u2192 <Button semantic="primary">
55
+ \u2717 <a className="..."> styled as button \u2192 <Button asChild><a href="..."/></Button>
56
+ \u2717 Mixing variants randomly within one row \u2014 pick one per visual hierarchy level
57
+ \u2717 Using primary + contained for every button \u2192 only ONE primary CTA per view
58
+ \u2717 <Button className="!bg-red-500"> \u2192 <Button semantic="danger"> (no !important)`
35
59
  );
36
60
  var textInputPropsSchema = z.object({
37
61
  size: z.enum(["md", "lg", "xl"]).default("md").describe("Size"),
@@ -58,7 +82,20 @@ var textInputPropsSchema = z.object({
58
82
  onBlur: z.any().optional().describe("Blur callback"),
59
83
  onFocus: z.any().optional().describe("Focus callback"),
60
84
  className: z.string().optional().describe("Style override")
61
- }).describe("Text input field. Supports label, description, prefix/suffix icons, clearable, character counter.");
85
+ }).describe(
86
+ `Single-line text input (always prefer over native <input type="text">).
87
+
88
+ WHEN TO USE: any short text \u2014 name, email, search, URL, password.
89
+ Use the built-in label/description props instead of wrapping with your own <label>/<p> tags (auto-binds htmlFor/aria-describedby for accessibility).
90
+ For numeric input use NumberInput; for currency PriceInput; for long text TextArea; for date DatePicker.
91
+
92
+ ANTI-PATTERNS:
93
+ \u2717 <TextInput type="number"> \u2192 <NumberInput> (gives unit, step, \u2191\u2193 keys)
94
+ \u2717 <label>Email <input ...></label> + <p>helper</p> \u2192 <TextInput label="Email" description="helper">
95
+ \u2717 Custom red border for error \u2192 use error prop (auto aria-invalid + token color)
96
+ \u2717 Manual character counter \u2192 use showCount + maxLength
97
+ \u2717 Manual clear X button \u2192 use clearable prop`
98
+ );
62
99
  var textAreaPropsSchema = z.object({
63
100
  label: z.string().optional().describe("Label text above the textarea"),
64
101
  description: z.string().optional().describe("Helper/error description below the textarea"),
@@ -81,7 +118,21 @@ var textAreaPropsSchema = z.object({
81
118
  onBlur: z.any().optional().describe("Blur callback"),
82
119
  onFocus: z.any().optional().describe("Focus callback"),
83
120
  className: z.string().optional().describe("Style override")
84
- }).describe("Multi-line text input with label, description, character counter, and resize modes.");
121
+ }).describe(
122
+ `Multi-line text input. Always prefer over native <textarea>.
123
+
124
+ WHEN TO USE:
125
+ \u2022 Long-form text \u2014 comments, descriptions, memos, bios
126
+ \u2022 Single-line input \u2192 TextInput
127
+ \u2022 Numeric \u2192 NumberInput
128
+
129
+ resize="auto" auto-grows with content (great for chat input). resize="none" locks size for fixed UI.
130
+
131
+ ANTI-PATTERNS:
132
+ \u2717 Native <textarea> + custom counter \u2192 showCount + maxLength
133
+ \u2717 <TextArea> for short labels \u2014 use TextInput (smaller affordance)
134
+ \u2717 Wrapping with custom <label>/<p> \u2192 use built-in label/description props (auto a11y binding)`
135
+ );
85
136
  var selectPropsSchema = z.object({
86
137
  value: z.string().optional().describe("Selected value"),
87
138
  placeholder: z.string().optional().describe("Placeholder"),
@@ -93,13 +144,134 @@ var selectPropsSchema = z.object({
93
144
  children: z.any().describe("SelectItem list (ReactNode, required)"),
94
145
  className: z.string().optional().describe("Wrapper style"),
95
146
  triggerClassName: z.string().optional().describe("Trigger style override")
96
- }).describe("Dropdown select. Based on Radix Select. Used with SelectItem.");
147
+ }).describe(
148
+ `Dropdown select for short option lists. Based on Radix Select. Used with SelectItem.
149
+
150
+ WHEN TO USE:
151
+ \u2022 Options \u2264 7, no search needed \u2192 Select
152
+ \u2022 Options \u2265 7 OR search needed OR async \u2192 Combobox instead
153
+ \u2022 Need multi-select \u2192 Combobox (multiple)
154
+ \u2022 Action menu (save/delete/share) \u2192 DropdownMenu (not Select; values vs actions)
155
+
156
+ ANTI-PATTERNS:
157
+ \u2717 Select with 20+ options \u2192 Combobox
158
+ \u2717 Using Select for menu items that trigger functions \u2192 DropdownMenu
159
+ \u2717 Manual <select> styling \u2192 Select gives consistent token styling
160
+ \u2717 Wrapping each SelectItem with Tooltip \u2014 instead put hint in item label`
161
+ );
97
162
  var selectItemPropsSchema = z.object({
98
163
  value: z.string().describe("Item value"),
99
164
  children: z.any().describe("Item content (ReactNode, required)"),
100
165
  disabled: z.boolean().optional().describe("Disabled"),
101
166
  className: z.string().optional().describe("Style override")
102
167
  }).describe("Individual option within Select.");
168
+ var comboboxOptionPropsSchema = z.object({
169
+ value: z.string().describe(
170
+ "Unique value (string, required). Duplicate values within one Combobox produce a dev-mode console.error and the duplicate option is dropped."
171
+ ),
172
+ disabled: z.boolean().optional().describe(
173
+ "Disable selection. Skipped by keyboard navigation (Arrow Up/Down, Home/End)."
174
+ ),
175
+ textValue: z.string().optional().describe(
176
+ 'Text used for client-side filtering and the input display when this option is selected. If omitted, derived from `children` (string nodes only; OptionDescription / OptionMeta are excluded). Set this when label contains icons or non-text nodes you still want searchable (e.g. textValue="apple \uC0AC\uACFC fruit").'
177
+ ),
178
+ className: z.string().optional().describe('Class merged onto the rendered <div role="option">.'),
179
+ children: z.any().optional().describe(
180
+ "Label content + optional <Combobox.OptionDescription> / <Combobox.OptionMeta> slots."
181
+ )
182
+ }).describe(
183
+ `Single Combobox option. Direct child of <Combobox> only.
184
+
185
+ WHEN TO USE:
186
+ \u2022 One per selectable item; \`value\` MUST be unique within the Combobox
187
+ \u2022 Wrap rich content (icons, badges) directly as children \u2014 no escape hatch needed
188
+ \u2022 Use textValue when label is non-text (e.g. <Combobox.Option value="apple" textValue="\uC0AC\uACFC apple">\u{1F34E}</Combobox.Option>)
189
+
190
+ ANTI-PATTERNS:
191
+ \u2717 <Combobox><div><Combobox.Option/></div></Combobox> \u2014 Option must be a direct child
192
+ \u2717 Same value on two options \u2192 dev warning + silent drop; pick unique values
193
+ \u2717 Putting label text inside <Combobox.OptionDescription> \u2014 that slot is the secondary line below the label`
194
+ );
195
+ var comboboxOptionDescriptionPropsSchema = z.object({
196
+ children: z.any().optional().describe("Secondary text below the label (ReactNode)."),
197
+ className: z.string().optional().describe("Class for the description node.")
198
+ }).describe(
199
+ 'Secondary text shown below an option label. Use for hints like "Republic of Korea" beneath "\uD55C\uAD6D". Excluded from textValue-based search.'
200
+ );
201
+ var comboboxOptionMetaPropsSchema = z.object({
202
+ children: z.any().optional().describe("Right-aligned meta content (price, badge, shortcut, etc.)."),
203
+ className: z.string().optional().describe("Class for the meta slot.")
204
+ }).describe(
205
+ "Right-aligned slot inside an option. Use for prices, keyboard shortcuts, version tags, status badges. Excluded from textValue-based search."
206
+ );
207
+ var comboboxPropsSchema = z.object({
208
+ children: z.any().describe(
209
+ "<Combobox.Option> elements (required). Other children are ignored with a dev-mode warning. Async-search consumers swap this list as `onSearch` results arrive."
210
+ ),
211
+ value: z.any().optional().describe("Selected value. string for single, string[] for multiple"),
212
+ defaultValue: z.any().optional().describe("Initial value (uncontrolled)"),
213
+ onValueChange: z.any().optional().describe("Value change callback. (value: string | string[]) => void"),
214
+ multiple: z.boolean().default(false).describe("Multi-select mode. Selected values shown as chips inside input"),
215
+ onSearch: z.any().optional().describe("Async search callback. (query: string) => void. Triggers external data fetching with debounce. When set, the built-in client filter is disabled \u2014 render whatever <Combobox.Option> children match the latest results."),
216
+ searchDebounce: z.number().default(250).describe("Debounce delay (ms) before onSearch fires"),
217
+ loading: z.boolean().default(false).describe("Externally-controlled loading state. Shows spinner in input suffix and a status row inside the popover."),
218
+ filter: z.any().optional().describe("Custom client-side filter. (option: { value, textValue, disabled }, query: string) => boolean. Default: case-insensitive textValue includes match. Ignored when onSearch is set."),
219
+ placeholder: z.string().optional().describe("Input placeholder"),
220
+ emptyMessage: z.any().optional().describe('Message when no options match (string | ReactNode). Default: "\uAC80\uC0C9 \uACB0\uACFC \uC5C6\uC74C"'),
221
+ loadingMessage: z.any().optional().describe('Message during loading state inside popover (string | ReactNode). Default: "\uAC80\uC0C9 \uC911\u2026"'),
222
+ size: z.enum(["md", "lg", "xl"]).default("md").describe("Input size (matches TextInput tokens)"),
223
+ disabled: z.boolean().optional().describe("Disabled"),
224
+ error: z.boolean().optional().describe("Error state"),
225
+ clearable: z.boolean().default(true).describe("Show clear button when value(s) exist"),
226
+ autoOpenOnFocus: z.boolean().default(true).describe("Open popover automatically when input gains focus"),
227
+ label: z.any().optional().describe("Field label (ReactNode)"),
228
+ description: z.any().optional().describe("Helper text below input (ReactNode)"),
229
+ className: z.string().optional().describe("Wrapper className"),
230
+ popoverClassName: z.string().optional().describe("Popover content className")
231
+ }).describe(
232
+ `Searchable select with compound option API. Text input + popover listbox. Single/multi-select. Sync (auto-filter) or async (onSearch + loading) modes.
233
+
234
+ WHEN TO USE:
235
+ \u2022 Options \u2265 7, OR labels are long, OR search/filter is needed \u2192 Combobox (not Select)
236
+ \u2022 Multi-select form field \u2192 Combobox with multiple (chips render inside input)
237
+ \u2022 Async data from server \u2192 set onSearch + loading
238
+ For \u22647 simple options use Select. For free-text tags use TagInput.
239
+
240
+ COMPOUND API:
241
+ <Combobox value={v} onValueChange={setV} placeholder="\u2026">
242
+ <Combobox.Option value="kr">\uD55C\uAD6D</Combobox.Option>
243
+ <Combobox.Option value="jp" disabled>
244
+ \uC77C\uBCF8
245
+ <Combobox.OptionDescription>\uD488\uC808</Combobox.OptionDescription>
246
+ <Combobox.OptionMeta>JP</Combobox.OptionMeta>
247
+ </Combobox.Option>
248
+ </Combobox>
249
+
250
+ \u2022 <Combobox.Option> requires unique \`value\` (dev mode warns on duplicates and drops the duplicate)
251
+ \u2022 <Combobox.OptionDescription> = secondary line under label
252
+ \u2022 <Combobox.OptionMeta> = right-aligned slot (price, shortcut, badge)
253
+ \u2022 Both slots are excluded from textValue-based search
254
+
255
+ ASYNC PATTERN:
256
+ <Combobox loading={isFetching} onSearch={(q) => mutate(q)}>
257
+ {results.map((u) => (
258
+ <Combobox.Option key={u.id} value={u.id}>{u.name}
259
+ <Combobox.OptionDescription>{u.email}</Combobox.OptionDescription>
260
+ </Combobox.Option>
261
+ ))}
262
+ </Combobox>
263
+ \u2014 onSearch fires after searchDebounce (default 250ms). Do NOT clear input on result update; component preserves user's typing.
264
+
265
+ IME (Korean/Japanese/Chinese): Enter during composition is ignored automatically \u2014 do not add custom keydown handlers.
266
+
267
+ ANTI-PATTERNS:
268
+ \u2717 <Select> with 20 options \u2192 <Combobox>
269
+ \u2717 Manual <input> + dropdown div + filter logic \u2192 <Combobox>
270
+ \u2717 Passing options through a prop array (legacy API removed) \u2192 use <Combobox.Option> children
271
+ \u2717 Wrapping options in extra elements (<div><Combobox.Option/></div>) \u2192 keep them as direct children
272
+ \u2717 Same \`value\` on two <Combobox.Option> \u2014 duplicates are warned + dropped in dev mode
273
+ \u2717 Setting value externally to clear input mid-typing \u2192 use onValueChange instead`
274
+ );
103
275
  var dropdownMenuItemSchema = z.object({
104
276
  label: z.any().describe("Menu item text (ReactNode)"),
105
277
  value: z.string().optional().describe("Item identifier"),
@@ -116,7 +288,24 @@ var dropdownMenuPropsSchema = z.object({
116
288
  side: z.enum(["top", "right", "bottom", "left"]).default("bottom").describe("Position"),
117
289
  className: z.string().optional().describe("Trigger wrapper style"),
118
290
  contentClassName: z.string().optional().describe("Content panel style")
119
- }).describe("Dropdown menu. Based on Radix DropdownMenu. Action menu for context/more menus.");
291
+ }).describe(
292
+ `Dropdown menu \u2014 list of actions/commands triggered by a button. Based on Radix DropdownMenu (role="menu" + keyboard nav).
293
+
294
+ WHEN TO USE:
295
+ \u2022 "More" / context menu (\u2022\u2022\u2022, \u22EE)
296
+ \u2022 Action lists where each item triggers a function (save, share, delete)
297
+ \u2022 Selecting a value (form field) \u2192 Select / Combobox (not DropdownMenu)
298
+ \u2022 Multi-select toggles \u2192 ToggleGroup or CheckBox group
299
+ \u2022 Anchored info panel \u2192 Popover
300
+
301
+ Use danger=true on destructive items (Delete) for visual + semantic emphasis.
302
+ Use separator=true to group related actions.
303
+
304
+ ANTI-PATTERNS:
305
+ \u2717 DropdownMenu for value selection submitted later \u2192 Select / Combobox
306
+ \u2717 Custom <div onClick> with isOpen state \u2192 DropdownMenu
307
+ \u2717 Long form inputs inside menu items \u2192 Popover instead`
308
+ );
120
309
  var toggleGroupItemSchema = z.object({
121
310
  value: z.string().describe("Item value"),
122
311
  label: z.any().describe("Display label (ReactNode)"),
@@ -130,12 +319,37 @@ var toggleGroupPropsSchema = z.object({
130
319
  value: z.any().optional().describe("Controlled value (string | string[])"),
131
320
  defaultValue: z.any().optional().describe("Default value"),
132
321
  onValueChange: z.any().optional().describe("Value change callback"),
133
- variant: z.enum(["default", "primary", "secondary"]).default("default").describe("Style variant (default=slider, primary=accent filled, secondary=accent filled)"),
322
+ variant: z.enum(["default", "primary", "secondary", "outline"]).default("default").describe(
323
+ "Style variant (default=slider, primary/secondary=accent filled, outline=bordered buttons with no background)"
324
+ ),
134
325
  size: z.enum(["sm", "md", "lg"]).default("md").describe("Size"),
326
+ fullWidth: z.boolean().default(false).describe("Stretch the group to parent width and split items equally"),
135
327
  disabled: z.boolean().optional().describe("Disable all items"),
136
328
  required: z.boolean().default(true).describe("Prevent deselection (at least one must be selected)"),
137
329
  className: z.string().optional().describe("Style override")
138
- }).describe("Toggle group / Segment control. Based on Radix ToggleGroup.");
330
+ }).describe(
331
+ `Toggle group / Segment control for immediate-effect option selection. Based on Radix ToggleGroup.
332
+
333
+ WHEN TO USE:
334
+ \u2022 Sort order, view mode (grid/list), filter chips \u2014 selection takes effect immediately
335
+ \u2022 Visual comparison important (icons or short labels)
336
+ \u2022 Form field that submits later \u2192 RadioGroup or CheckBox instead
337
+ \u2022 Page area switching (settings tabs) \u2192 Tab instead
338
+
339
+ VARIANTS:
340
+ \u2022 default \u2014 slider-style background (sleek)
341
+ \u2022 primary / secondary \u2014 accent-filled selected state
342
+ \u2022 outline \u2014 bordered buttons with no background (button-style toolbar)
343
+
344
+ fullWidth=true distributes items equally across parent width (use with outline variant for button-row look).
345
+
346
+ type="single" requires at least one selection by default (required=true). Set required=false to allow deselection.
347
+
348
+ ANTI-PATTERNS:
349
+ \u2717 Using ToggleGroup for content tabs \u2192 Tab
350
+ \u2717 Using ToggleGroup as form field submitted later \u2192 RadioGroup (semantics + a11y)
351
+ \u2717 Mixing icons and text labels of different sizes \u2014 keep visual rhythm consistent`
352
+ );
139
353
  var sliderPropsSchema = z.object({
140
354
  value: z.array(z.number()).optional().describe("Controlled value (number[]). Use [50] for single, [20, 80] for range"),
141
355
  defaultValue: z.array(z.number()).optional().describe("Default value"),
@@ -150,7 +364,23 @@ var sliderPropsSchema = z.object({
150
364
  onValueChange: z.any().optional().describe("Value change callback (value: number[]) => void"),
151
365
  onValueCommit: z.any().optional().describe("Committed value callback (on pointer up)"),
152
366
  className: z.string().optional().describe("Style override")
153
- }).describe("Slider / Range input. Based on Radix Slider. Supports single and range mode.");
367
+ }).describe(
368
+ `Slider \u2014 numeric range selector. Based on Radix Slider. Single thumb or range (two thumbs).
369
+
370
+ WHEN TO USE:
371
+ \u2022 Continuous range with visual feedback: volume, brightness, price filter
372
+ \u2022 Range filter (min-max) \u2192 defaultValue=[20, 80]
373
+ \u2022 Precise number entry \u2192 NumberInput
374
+ \u2022 Discrete few options \u2192 ToggleGroup or RadioGroup
375
+ \u2022 Boolean \u2192 Switch
376
+
377
+ step controls increments. onValueCommit fires only after pointer release (good for expensive recomputations).
378
+
379
+ ANTI-PATTERNS:
380
+ \u2717 Slider for required precise input (typing 47 is faster than dragging)
381
+ \u2717 Long step count without showValue / labels (users have no reference)
382
+ \u2717 Calling expensive API on every onValueChange tick \u2192 use onValueCommit`
383
+ );
154
384
  var checkBoxPropsSchema = z.object({
155
385
  size: z.enum(["sm", "md"]).default("md").describe("Size"),
156
386
  shape: z.enum(["square", "round"]).default("square").describe("Shape"),
@@ -166,12 +396,30 @@ var checkBoxPropsSchema = z.object({
166
396
  onCheckedChange: z.any().optional().describe("Checked state change callback (checked: boolean) => void"),
167
397
  onChange: z.any().optional().describe("Native change event handler"),
168
398
  className: z.string().optional().describe("Style override")
169
- }).describe("Checkbox. Native input-based, supports square/round shapes.");
399
+ }).describe(
400
+ `Checkbox for multi-select form fields. Native input-based, supports square/round shapes.
401
+
402
+ WHEN TO USE:
403
+ \u2022 Form field with multiple independent options (T&C agreements, multi-select filters submitted later)
404
+ \u2022 Tri-state (parent-child selection) \u2014 use indeterminate prop
405
+ \u2022 Single binary that takes effect immediately \u2192 Switch instead
406
+ \u2022 Many options with search \u2192 Combobox (multiple)
407
+
408
+ INDETERMINATE: set indeterminate=true when some children are checked, others not. aria-checked becomes "mixed" automatically.
409
+
410
+ ANTI-PATTERNS:
411
+ \u2717 <CheckBox> for "Enable dark mode" toggle \u2192 <Switch>
412
+ \u2717 Native <input type="checkbox"> + manual styling \u2192 <CheckBox>
413
+ \u2717 Forgetting indeterminate for "select all" parent`
414
+ );
170
415
  var radioGroupPropsSchema = z.object({
171
416
  name: z.string().describe("Form name (required)"),
172
417
  value: z.string().optional().describe("Selected value (controlled)"),
173
418
  defaultValue: z.string().optional().describe("Initial value (uncontrolled)"),
174
419
  size: z.enum(["sm", "md"]).default("md").describe("Size"),
420
+ variant: z.enum(["default", "ring"]).default("default").describe(
421
+ "Visual style. default=outline circle with inner dot, ring=thick border replaces dot when checked"
422
+ ),
175
423
  orientation: z.enum(["horizontal", "vertical"]).default("vertical").describe("Layout direction"),
176
424
  disabled: z.boolean().optional().describe("Disabled"),
177
425
  children: z.any().describe("RadioItem list (ReactNode, required)"),
@@ -179,11 +427,32 @@ var radioGroupPropsSchema = z.object({
179
427
  "aria-labelledby": z.string().optional().describe("Accessibility label reference ID"),
180
428
  onValueChange: z.any().optional().describe("Value change callback (value: string) => void"),
181
429
  className: z.string().optional().describe("Style override")
182
- }).describe("Radio group. Used with RadioItem.");
430
+ }).describe(
431
+ `Radio group for single-choice form fields. Used with RadioItem.
432
+
433
+ WHEN TO USE:
434
+ \u2022 Form field where user picks ONE of small set (\u22644-7) and submits later \u2192 RadioGroup
435
+ \u2022 All options should be visible at once for comparison \u2192 RadioGroup (not Select)
436
+ \u2022 Immediate effect on selection (no submit) \u2192 ToggleGroup instead
437
+ \u2022 Page area switching (tabs) \u2192 Tab (not RadioGroup)
438
+ \u2022 Many options \u2192 Select / Combobox
439
+
440
+ VARIANTS:
441
+ \u2022 variant="default" \u2014 outline circle with inner dot when checked (classic)
442
+ \u2022 variant="ring" \u2014 thick border replaces inner dot when checked (modern, Figma "ring" style)
443
+
444
+ ANTI-PATTERNS:
445
+ \u2717 Using RadioGroup for tab-like content switching \u2192 Tab
446
+ \u2717 Using RadioGroup for immediate filters \u2192 ToggleGroup
447
+ \u2717 Mixing RadioGroup and ToggleGroup in same form \u2192 pick one pattern
448
+ \u2717 Native <input type="radio"> \u2192 RadioItem (gets a11y, focus ring, tokens)`
449
+ );
183
450
  var radioItemPropsSchema = z.object({
184
451
  value: z.string().describe("Item value (required)"),
185
452
  size: z.enum(["sm", "md"]).optional().describe("Size (overrides group)"),
453
+ variant: z.enum(["default", "ring"]).optional().describe("Visual style (overrides group)"),
186
454
  label: z.any().optional().describe("Label text (ReactNode)"),
455
+ description: z.any().optional().describe("Help text shown beneath the label (ReactNode)"),
187
456
  children: z.any().optional().describe("Label alternative content (ReactNode)"),
188
457
  disabled: z.boolean().optional().describe("Disabled"),
189
458
  className: z.string().optional().describe("Style override")
@@ -198,7 +467,20 @@ var switchPropsSchema = z.object({
198
467
  onCheckedChange: z.any().optional().describe("Toggle state change callback (checked: boolean) => void"),
199
468
  onChange: z.any().optional().describe("Native change event handler (ChangeEvent)"),
200
469
  className: z.string().optional().describe("Style override")
201
- }).describe('Toggle switch. Native checkbox-based, role="switch".');
470
+ }).describe(
471
+ `Toggle switch for immediate on/off binary state. Native checkbox-based, role="switch".
472
+
473
+ WHEN TO USE:
474
+ \u2022 Setting that takes effect immediately (notifications on/off, dark mode)
475
+ \u2022 Binary state with no submit step
476
+ \u2022 Form field submitted later \u2192 CheckBox instead (semantics: checkbox is form data)
477
+ \u2022 Multiple related options \u2192 CheckBox group or ToggleGroup (multiple)
478
+
479
+ ANTI-PATTERNS:
480
+ \u2717 <CheckBox> for "Enable notifications" toggle \u2192 <Switch>
481
+ \u2717 <Switch> inside form requiring submit \u2192 <CheckBox>
482
+ \u2717 Wrapping Switch in <label onClick> manually \u2192 use label prop or htmlFor pattern`
483
+ );
202
484
  var chipPropsSchema = z.object({
203
485
  variant: z.enum(["default", "filled", "outline", "accent"]).default("default").describe("Style"),
204
486
  size: z.enum(["sm", "md", "lg"]).default("md").describe("Size"),
@@ -208,7 +490,21 @@ var chipPropsSchema = z.object({
208
490
  onClose: z.any().optional().describe("Close button click callback (e: MouseEvent) => void. Shows X button when provided"),
209
491
  onClick: z.any().optional().describe("Click event handler"),
210
492
  className: z.string().optional().describe("Style override")
211
- }).describe("Chip/tag/badge. Close button displayed via onClose prop.");
493
+ }).describe(
494
+ `Chip \u2014 small interactive token for filters, tags, removable selections, status labels.
495
+
496
+ WHEN TO USE:
497
+ \u2022 Filter token / removable selection (set onClose for X button)
498
+ \u2022 Tag/category indicator
499
+ \u2022 Status indicator with color (variant="accent")
500
+ \u2022 Pure count badge \u2192 Badge instead
501
+ \u2022 Toggleable filter \u2192 ToggleGroup or Chip with onClick + active state
502
+
503
+ ANTI-PATTERNS:
504
+ \u2717 Building dismiss UI manually with custom div + X icon \u2192 use onClose prop
505
+ \u2717 Using Chip as a primary CTA \u2192 Button
506
+ \u2717 Using Chip for hover-only labels \u2192 Tooltip`
507
+ );
212
508
  var badgePropsSchema = z.object({
213
509
  count: z.number().optional().describe("Badge count number"),
214
510
  max: z.number().default(99).describe('Max count (shows "99+" when exceeded)'),
@@ -219,7 +515,23 @@ var badgePropsSchema = z.object({
219
515
  offset: z.tuple([z.number(), z.number()]).optional().describe("Position offset [x, y] in px"),
220
516
  children: z.any().optional().describe("Anchor element to attach badge to (ReactNode)"),
221
517
  className: z.string().optional().describe("Style override")
222
- }).describe("Badge indicator. Dot or count display. Wraps children when provided.");
518
+ }).describe(
519
+ `Badge \u2014 small status / count indicator overlaid on an anchor (icon, avatar, button).
520
+
521
+ WHEN TO USE:
522
+ \u2022 Notification count on bell icon
523
+ \u2022 Unread message count on inbox tab
524
+ \u2022 Status dot (online/offline) \u2192 dot=true
525
+ \u2022 Status label with text (e.g. "PRO", "NEW") \u2192 Chip variant="accent"
526
+ \u2022 Removable filter token \u2192 Chip with onClose
527
+
528
+ count={0} hides badge by default; pass showZero=true to keep visible.
529
+
530
+ ANTI-PATTERNS:
531
+ \u2717 Using Badge as standalone label without anchor \u2192 Chip
532
+ \u2717 count > 999 without max \u2192 ugly layout; default max=99 ("99+")
533
+ \u2717 Multiple badges on same anchor (visual noise)`
534
+ );
223
535
  var progressPropsSchema = z.object({
224
536
  value: z.number().default(0).describe("Current progress value"),
225
537
  max: z.number().default(100).describe("Maximum value"),
@@ -229,7 +541,23 @@ var progressPropsSchema = z.object({
229
541
  indeterminate: z.boolean().default(false).describe("Indeterminate loading animation"),
230
542
  label: z.string().optional().describe("Label text above the bar"),
231
543
  className: z.string().optional().describe("Style override")
232
- }).describe("Progress bar. Linear progress indicator with percentage display.");
544
+ }).describe(
545
+ `Progress \u2014 linear progress bar (file upload, multi-step form, loading with known %).
546
+
547
+ WHEN TO USE:
548
+ \u2022 Quantifiable progress (% complete, X of Y)
549
+ \u2022 Unknown duration spinner \u2192 Spinner
550
+ \u2022 Stable component shape during load \u2192 Skeleton
551
+ \u2022 Step-based navigation \u2192 Stepper
552
+ \u2022 Indeterminate (loading without %) \u2192 set indeterminate=true
553
+
554
+ variant follows semantic colors (success when complete, danger on error).
555
+
556
+ ANTI-PATTERNS:
557
+ \u2717 Indeterminate Progress for short loads (<1s) \u2014 Spinner is lighter
558
+ \u2717 Custom <div style={{ width: x% }}> \u2192 Progress (a11y, tokens)
559
+ \u2717 Progress without label/showValue when % is critical info`
560
+ );
233
561
  var alertPropsSchema = z.object({
234
562
  variant: z.enum(["info", "success", "warning", "danger"]).default("info").describe("Alert type / color"),
235
563
  title: z.string().optional().describe("Alert title (bold)"),
@@ -239,14 +567,42 @@ var alertPropsSchema = z.object({
239
567
  onClose: z.any().optional().describe("Close callback () => void"),
240
568
  action: z.any().optional().describe("Action area (ReactNode, e.g. Button)"),
241
569
  className: z.string().optional().describe("Style override")
242
- }).describe("Alert / Banner. Inline notification with icon, title, description.");
570
+ }).describe(
571
+ `Alert \u2014 persistent inline notification (banner). Auto icon by variant.
572
+
573
+ WHEN TO USE:
574
+ \u2022 In-page status: form errors, server warnings, info banners, success confirmation
575
+ \u2022 Transient toast/snackbar \u2192 use a toast library, NOT Alert
576
+ \u2022 Modal-blocking error \u2192 Modal with semantic="danger"
577
+ \u2022 Inline form field error \u2192 use error/description prop on TextInput / Select / etc.
578
+
579
+ variant maps to semantic colors. closable=true gives users dismiss control. action prop reserved for inline buttons (e.g. "Retry").
580
+
581
+ ANTI-PATTERNS:
582
+ \u2717 Stacking 5 alerts at top of page (use one with summary)
583
+ \u2717 Critical destructive action confirmation in Alert \u2192 Modal
584
+ \u2717 Wrapping <div className="bg-red-100"> manually \u2192 Alert (a11y role + tokens)`
585
+ );
243
586
  var spinnerPropsSchema = z.object({
244
587
  size: z.number().default(20).describe("Size in px"),
245
588
  color: z.string().optional().describe("Color (CSS color value, default currentColor)"),
246
589
  "aria-label": z.string().default("Loading").describe("Accessibility label"),
247
590
  style: z.any().optional().describe("Inline style (CSSProperties)"),
248
591
  className: z.string().optional().describe("Color override etc.")
249
- }).describe('Loading indicator. SVG-based. Built-in role="status".');
592
+ }).describe(
593
+ `Loading indicator (spinner). SVG-based. role="status" + aria-label built-in.
594
+
595
+ WHEN TO USE:
596
+ \u2022 Short loads (<1s), inline indicator (button content while submitting)
597
+ \u2022 Long loads with known structure \u2192 Skeleton (better perceived performance)
598
+ \u2022 Quantifiable progress \u2192 Progress
599
+ \u2022 Page-level loading boundary inside DataList/DataGrid \u2192 use their loading prop instead
600
+
601
+ ANTI-PATTERNS:
602
+ \u2717 Custom CSS spinning div \u2192 Spinner (a11y + tokens)
603
+ \u2717 Using Spinner where Skeleton fits (long loads with stable layout)
604
+ \u2717 Forgetting aria-label override when meaning differs from "Loading"`
605
+ );
250
606
  var stepItemSchema = z.object({
251
607
  label: z.string().describe("Step title"),
252
608
  description: z.string().optional().describe("Step description")
@@ -258,7 +614,23 @@ var stepperPropsSchema = z.object({
258
614
  orientation: z.enum(["horizontal", "vertical"]).default("horizontal").describe("Layout direction"),
259
615
  size: z.enum(["sm", "md"]).default("md").describe("Size"),
260
616
  className: z.string().optional().describe("Style override")
261
- }).describe("Stepper. Step-by-step progress indicator.");
617
+ }).describe(
618
+ `Stepper \u2014 multi-step linear flow indicator (checkout, onboarding, wizard).
619
+
620
+ WHEN TO USE:
621
+ \u2022 Sequential workflow with finite steps (3-7)
622
+ \u2022 Show user's current position in flow + completed/upcoming steps
623
+ \u2022 Independent navigation between unrelated sections \u2192 Tab
624
+ \u2022 Continuous % progress \u2192 Progress
625
+ \u2022 Hierarchy / location \u2192 Breadcrumb
626
+
627
+ status="error" highlights the current step with danger color when validation fails.
628
+
629
+ ANTI-PATTERNS:
630
+ \u2717 Stepper with 2 steps (use Progress or just navigation)
631
+ \u2717 Stepper with 10+ steps (overwhelming) \u2014 chunk into sub-flows
632
+ \u2717 Letting users skip ahead by clicking future steps (only mark completed \u2192 current is allowed)`
633
+ );
262
634
  var skeletonPropsSchema = z.object({
263
635
  as: z.enum(["div", "span"]).default("div").describe("Rendered tag"),
264
636
  circle: z.boolean().default(false).describe("Circle skeleton (rounded-full)"),
@@ -268,7 +640,21 @@ var skeletonPropsSchema = z.object({
268
640
  style: z.any().optional().describe("Inline style (CSSProperties)"),
269
641
  className: z.string().optional().describe("Style override")
270
642
  }).describe(
271
- "Skeleton loading placeholder. Size/shape via className. With children, wraps transparently to maintain actual size."
643
+ `Skeleton loading placeholder. Size/shape via className. With children, wraps transparently to maintain actual size.
644
+
645
+ WHEN TO USE:
646
+ \u2022 Long load with known component shape (cards, lists, profile headers)
647
+ \u2022 Reduces perceived wait time when layout is predictable
648
+ \u2022 Short loads (<1s) \u2192 Spinner
649
+ \u2022 Quantifiable progress \u2192 Progress
650
+ \u2022 DataList/DataGrid loading \u2192 set list={null} (uses skeletonElement prop automatically)
651
+
652
+ GOLDEN RULE: Skeleton must match the real component's shape and size. Mismatch causes layout shift.
653
+
654
+ ANTI-PATTERNS:
655
+ \u2717 Generic gray rectangle for everything \u2192 match real component shape
656
+ \u2717 Skeleton for instant loads (causes flash)
657
+ \u2717 Many skeletons of different shapes when component is uniform \u2192 use a single skeleton in DataList`
272
658
  );
273
659
  var dividerPropsSchema = z.object({
274
660
  orientation: z.enum(["horizontal", "vertical"]).default("horizontal").describe("Direction"),
@@ -276,7 +662,21 @@ var dividerPropsSchema = z.object({
276
662
  color: z.string().optional().describe("Custom color (CSS value)"),
277
663
  style: z.any().optional().describe("Inline style (CSSProperties)"),
278
664
  className: z.string().optional().describe("Style override")
279
- }).describe("Divider. Supports horizontal/vertical, solid/dashed/dotted.");
665
+ }).describe(
666
+ `Divider \u2014 visual separator (horizontal/vertical line).
667
+
668
+ WHEN TO USE:
669
+ \u2022 Separating sections within a card / list
670
+ \u2022 Vertical separator between inline items (orientation="vertical")
671
+ \u2022 Use color prop sparingly \u2014 defaults to border-default token
672
+ \u2022 For grouping form sections, prefer larger spacing over Divider
673
+ \u2022 Tab/Accordion already provide visual separation \u2014 don't add Divider
674
+
675
+ ANTI-PATTERNS:
676
+ \u2717 Stacking many Dividers \u2014 increase spacing instead
677
+ \u2717 Using Divider as decorative line with bright color \u2192 use Tailwind border utility on container
678
+ \u2717 Inline <hr> with custom CSS \u2192 Divider (consistent token)`
679
+ );
280
680
  var tooltipPropsSchema = z.object({
281
681
  children: z.any().describe("Trigger element (ReactNode, required)"),
282
682
  content: z.any().describe("Tooltip content (ReactNode, required)"),
@@ -287,7 +687,22 @@ var tooltipPropsSchema = z.object({
287
687
  disabled: z.boolean().default(false).describe("Disabled"),
288
688
  className: z.string().optional().describe("Content style"),
289
689
  triggerClassName: z.string().optional().describe("Trigger style")
290
- }).describe("Tooltip. Based on Radix Tooltip. Built-in Provider.");
690
+ }).describe(
691
+ `Tooltip \u2014 short text hint shown on hover/focus. Based on Radix Tooltip. Provider built-in.
692
+
693
+ WHEN TO USE:
694
+ \u2022 Brief explanation of an icon button or truncated label
695
+ \u2022 Hover-only, non-interactive content (text only)
696
+ \u2022 Need clickable content inside \u2192 Popover (not Tooltip)
697
+ \u2022 Action menu \u2192 DropdownMenu
698
+ \u2022 Force user attention \u2192 Modal
699
+
700
+ ANTI-PATTERNS:
701
+ \u2717 Buttons/links inside content \u2192 use Popover (Tooltip not focusable)
702
+ \u2717 Long paragraphs in tooltip \u2192 consider Popover or Drawer
703
+ \u2717 Tooltip on disabled buttons (won't show in some browsers) \u2014 wrap in span instead
704
+ \u2717 Critical info only in tooltip \u2014 duplicate visible elsewhere for mobile/touch`
705
+ );
291
706
  var popoverPropsSchema = z.object({
292
707
  trigger: z.any().describe("Trigger element (ReactNode, required)"),
293
708
  side: z.enum(["top", "right", "bottom", "left"]).default("bottom").describe("Position"),
@@ -300,7 +715,21 @@ var popoverPropsSchema = z.object({
300
715
  children: z.any().optional().describe("Popover body (ReactNode)"),
301
716
  className: z.string().optional().describe("Content style"),
302
717
  arrowClassName: z.string().optional().describe("Arrow style")
303
- }).describe("Popover. Based on Radix Popover.");
718
+ }).describe(
719
+ `Popover \u2014 anchor-positioned panel with interactive content. Based on Radix Popover.
720
+
721
+ WHEN TO USE:
722
+ \u2022 Trigger-anchored UI with buttons, inputs, or rich content
723
+ \u2022 Filter/option panel near a button (not a full sidebar)
724
+ \u2022 Hover-only text hint \u2192 Tooltip (lighter)
725
+ \u2022 Action menu list \u2192 DropdownMenu (gives role=menu, keyboard nav)
726
+ \u2022 Decision dialog \u2192 Modal
727
+
728
+ ANTI-PATTERNS:
729
+ \u2717 Action lists with onClick handlers \u2192 DropdownMenu (a11y semantics)
730
+ \u2717 Implementing dropdown manually with Popover + custom buttons \u2192 DropdownMenu
731
+ \u2717 Long forms inside Popover \u2192 Drawer or Modal`
732
+ );
304
733
  var accordionItemData = z.object({
305
734
  id: z.string().describe("Unique ID"),
306
735
  trigger: z.any().describe("Trigger content (ReactNode)"),
@@ -318,7 +747,23 @@ var accordionPropsSchema = z.object({
318
747
  defaultValue: z.union([z.string(), z.array(z.string())]).optional().describe("Uncontrolled initial value"),
319
748
  onValueChange: z.any().optional().describe("Open item change callback (value: string | string[]) => void"),
320
749
  className: z.string().optional().describe("Root style")
321
- }).describe("Accordion. Supports both items array and composable patterns.");
750
+ }).describe(
751
+ `Accordion \u2014 collapsible content sections (FAQ, settings groups).
752
+
753
+ WHEN TO USE:
754
+ \u2022 FAQ, help docs, settings groups
755
+ \u2022 Long page where each section is independently scannable
756
+ \u2022 Hidden critical info \u2014 DO NOT bury what users always need
757
+ \u2022 Tab-like content switching \u2192 Tab (Accordion is for stacked, not exclusive)
758
+
759
+ type="single" + collapsible=true \u2192 all-closed allowed (recommended for FAQ).
760
+ type="multiple" \u2192 multiple sections open at once.
761
+
762
+ ANTI-PATTERNS:
763
+ \u2717 Hiding the page's primary content inside collapsed Accordion
764
+ \u2717 Single-section Accordion (just show the content)
765
+ \u2717 Custom toggle div + state \u2014 use Accordion (gets a11y, keyboard nav)`
766
+ );
322
767
  var drawerDirection = z.enum(["bottom", "top", "left", "right"]).default("bottom");
323
768
  var drawerPropsSchema = z.object({
324
769
  direction: drawerDirection.describe("Direction"),
@@ -328,7 +773,23 @@ var drawerPropsSchema = z.object({
328
773
  modal: z.boolean().optional().describe("Modal mode (default true). If false, background is interactive"),
329
774
  shouldScaleBackground: z.boolean().optional().describe("Background scale effect (default false)"),
330
775
  children: z.any().describe("Drawer sub-components (ReactNode, required)")
331
- }).describe("Drawer/bottom sheet. Based on Vaul. Compound component pattern.");
776
+ }).describe(
777
+ `Drawer / bottom sheet. Based on Vaul. Compound component pattern.
778
+
779
+ WHEN TO USE:
780
+ \u2022 Side panel for secondary action while user can still see main content (filter panel, item details)
781
+ \u2022 Mobile bottom sheet (direction="bottom")
782
+ \u2022 Force decision blocking main flow \u2192 Modal instead
783
+ \u2022 Inline anchor-positioned UI \u2192 Popover instead
784
+
785
+ DIRECTION: bottom (default, mobile-friendly), top, left, right.
786
+ dismissible=true (default) allows swipe/outside-click close. Set false for blocking flows.
787
+
788
+ ANTI-PATTERNS:
789
+ \u2717 Drawer for confirmation dialogs \u2192 Modal (decision-forcing)
790
+ \u2717 Always shouldScaleBackground \u2192 only enable for true mobile bottom-sheets
791
+ \u2717 Forgetting Drawer.Title \u2192 required for screen readers (a11y)`
792
+ );
332
793
  var drawerContentPropsSchema = z.object({
333
794
  direction: drawerDirection.optional().describe("Direction (Context takes priority)"),
334
795
  blur: z.enum(["none", "sm", "md"]).default("none").describe("Overlay blur"),
@@ -372,7 +833,24 @@ var tabPropsSchema = z.object({
372
833
  className: z.string().optional().describe("Root style"),
373
834
  tabListClassName: z.string().optional().describe("Tab list style"),
374
835
  tabPanelClassName: z.string().optional().describe("Tab panel style")
375
- }).describe("Tab navigation. line/pill variants.");
836
+ }).describe(
837
+ `Tab navigation \u2014 switch between content panels (settings sections, profile views).
838
+
839
+ WHEN TO USE:
840
+ \u2022 Page area swap where only one panel is visible at a time
841
+ \u2022 Mutually exclusive content with stable section labels
842
+ \u2022 Form field selection \u2192 RadioGroup (semantics: not navigation)
843
+ \u2022 Immediate filter/option toggle \u2192 ToggleGroup
844
+ \u2022 Stacked collapsible sections \u2192 Accordion
845
+
846
+ destroyInactive=true unmounts hidden panels (saves memory but loses state).
847
+
848
+ ANTI-PATTERNS:
849
+ \u2717 Tab with 1 item \u2014 just render the panel
850
+ \u2717 Tab with 8+ items \u2014 consider sub-routing or DropdownMenu
851
+ \u2717 Using Tab for form value selection \u2192 RadioGroup
852
+ \u2717 Custom <button> + onClick + state \u2192 Tab (a11y, keyboard, focus management)`
853
+ );
376
854
  var carouselPropsSchema = z.object({
377
855
  opts: z.record(z.any()).optional().describe("Embla options (loop, align, etc.)"),
378
856
  plugins: z.array(z.any()).optional().describe("Embla plugins"),
@@ -380,7 +858,20 @@ var carouselPropsSchema = z.object({
380
858
  children: z.any().optional().describe("Carousel slides and sub-components (ReactNode)"),
381
859
  className: z.string().optional().describe("Style override")
382
860
  }).describe(
383
- "Carousel. Based on Embla Carousel. Sub-components: CarouselSlide, CarouselPrev, CarouselNext, CarouselDots."
861
+ `Carousel \u2014 horizontal slide gallery. Based on Embla Carousel. Compound: CarouselSlide, CarouselPrev/Next, CarouselDots.
862
+
863
+ WHEN TO USE:
864
+ \u2022 Hero banners, image gallery, product showcase
865
+ \u2022 Multi-card horizontal scroll with snap behavior
866
+ \u2022 Vertical scrolling list \u2192 Marquee or VirtualList (not Carousel)
867
+ \u2022 Critical content that must always be visible \u2014 Carousel hides slides
868
+
869
+ opts={{ loop: true, align: 'start' }} for endless loop. Add Embla autoplay plugin for auto-advance.
870
+
871
+ ANTI-PATTERNS:
872
+ \u2717 Critical CTA inside non-first slide (users might never scroll)
873
+ \u2717 Auto-advance without pause-on-hover (a11y)
874
+ \u2717 Manual scroll-snap div \u2192 Carousel (gets keyboard nav, indicators)`
384
875
  );
385
876
  var carouselSlidePropsSchema = z.object({
386
877
  className: z.string().optional().describe("Slide style (use basis-1/3 etc. for multi-slide view)"),
@@ -401,7 +892,21 @@ var paginationPropsSchema = z.object({
401
892
  size: z.enum(["sm", "md"]).default("md").describe("Size"),
402
893
  onPageChange: z.any().describe("Page change callback (page: number) => void, required"),
403
894
  className: z.string().optional().describe("<nav> style")
404
- }).describe("Pagination. Previous/next + page number buttons.");
895
+ }).describe(
896
+ `Pagination \u2014 page-by-page navigation for long datasets.
897
+
898
+ WHEN TO USE:
899
+ \u2022 User needs to jump to specific pages (search results, blog archives)
900
+ \u2022 Total count is known and stable
901
+ \u2022 Continuous browsing \u2192 InfiniteScroll instead
902
+ \u2022 Real-time stream \u2192 InfiniteScroll
903
+ \u2022 Both fit \u2192 Pagination is more accessible (keyboard, deep-linkable URL)
904
+
905
+ ANTI-PATTERNS:
906
+ \u2717 Pagination with totalPages=1 \u2014 hide it
907
+ \u2717 Mixing Pagination + InfiniteScroll on same list (confusing)
908
+ \u2717 Custom page button divs \u2192 Pagination (a11y, edge cases like ellipsis)`
909
+ );
405
910
  var avatarPropsSchema = z.object({
406
911
  src: z.string().optional().describe("Image URL"),
407
912
  alt: z.string().optional().describe("Alt text"),
@@ -411,7 +916,22 @@ var avatarPropsSchema = z.object({
411
916
  children: z.any().optional().describe("Custom image element (e.g. Next.js Image)"),
412
917
  onImageError: z.any().optional().describe("Image load error callback () => void"),
413
918
  className: z.string().optional().describe("Style override")
414
- }).describe("Avatar. Supports image, fallback text, and children.");
919
+ }).describe(
920
+ `Avatar \u2014 user/entity profile image with text fallback.
921
+
922
+ WHEN TO USE:
923
+ \u2022 User profiles, comment authors, team member lists, message sender icons
924
+ \u2022 Image fails / not provided \u2192 fallback (initials or icon) shown automatically
925
+ \u2022 Need optimized image (Next.js) \u2192 pass <Image> via children, omit src
926
+ \u2022 Larger illustration / logo \u2192 use NxImage instead
927
+
928
+ shape="square" for organization/team logos; "circle" for people (default).
929
+
930
+ ANTI-PATTERNS:
931
+ \u2717 <img> + manual fallback handling \u2192 Avatar (handles error)
932
+ \u2717 Avatar without alt for screen readers (always set alt or aria-label)
933
+ \u2717 Mixing avatar sizes inconsistently in a list \u2014 pick one size`
934
+ );
415
935
  var counterPropsSchema = z.object({
416
936
  endValue: z.number().describe("Target value (required)"),
417
937
  startValue: z.number().default(0).describe("Start value"),
@@ -423,7 +943,22 @@ var counterPropsSchema = z.object({
423
943
  onEnd: z.any().optional().describe("Count complete callback () => void"),
424
944
  style: z.any().optional().describe("Inline style (CSSProperties)"),
425
945
  className: z.string().optional().describe("Style override")
426
- }).describe("Number count animation.");
946
+ }).describe(
947
+ `Counter \u2014 animated number tick from startValue to endValue.
948
+
949
+ WHEN TO USE:
950
+ \u2022 Marketing landing \u2014 "10,000+ users" KPI displays
951
+ \u2022 Stat dashboards (animate when value changes)
952
+ \u2022 Live tickers / real-time data \u2014 re-render plain text instead (Counter is one-shot animation)
953
+ \u2022 Currency input / editable number \u2192 NumberInput / PriceInput
954
+
955
+ triggerOnView=true delays animation until element scrolls into view (good for landing pages).
956
+
957
+ ANTI-PATTERNS:
958
+ \u2717 Counter for values that update frequently \u2014 animation queue conflicts
959
+ \u2717 Long duration on critical numbers (users wait to read)
960
+ \u2717 Counter without separator for large numbers (hard to read)`
961
+ );
427
962
  var countdownPropsSchema = z.object({
428
963
  endTimestamp: z.number().describe("End time (Unix ms, required)"),
429
964
  separator: z.any().default(":").describe("Separator (ReactNode)"),
@@ -437,7 +972,22 @@ var countdownPropsSchema = z.object({
437
972
  render: z.any().optional().describe("Custom render function"),
438
973
  onEnd: z.any().optional().describe("Countdown end callback () => void"),
439
974
  className: z.string().optional().describe("Style override")
440
- }).describe("Countdown timer.");
975
+ }).describe(
976
+ `Countdown \u2014 live timer counting down to endTimestamp (Unix ms).
977
+
978
+ WHEN TO USE:
979
+ \u2022 Sale ends in / event starts in / token claim window
980
+ \u2022 OTP / verification code expiry
981
+ \u2022 Counting up (since X) \u2192 not Countdown; use Counter or custom interval
982
+ \u2022 Persistent server time \u2192 pass server-synced endTimestamp (not Date.now offset)
983
+
984
+ showDays=false for short timers (<24h) to declutter. Use render prop for fully custom layouts.
985
+
986
+ ANTI-PATTERNS:
987
+ \u2717 Countdown without onEnd handler \u2014 UI stuck at 0
988
+ \u2717 Countdown across SSR without hydration safety \u2014 pass endTimestamp from server
989
+ \u2717 Updating endTimestamp every render \u2014 causes jitter`
990
+ );
441
991
  var marqueePropsSchema = z.object({
442
992
  direction: z.enum(["left", "right", "up", "down"]).default("left").describe("Direction"),
443
993
  speed: z.number().default(40).describe("Animation speed (seconds)"),
@@ -446,7 +996,22 @@ var marqueePropsSchema = z.object({
446
996
  children: z.any().describe("Content to repeat (ReactNode, required)"),
447
997
  style: z.any().optional().describe("Inline style (CSSProperties)"),
448
998
  className: z.string().optional().describe("Style override")
449
- }).describe("Marquee (scrolling text/elements).");
999
+ }).describe(
1000
+ `Marquee \u2014 endless scrolling content (logo strip, promo banner, news ticker).
1001
+
1002
+ WHEN TO USE:
1003
+ \u2022 Logo cloud, partner brands strip, social proof
1004
+ \u2022 Critical info that must be read \u2192 not Marquee (auto-scroll hurts a11y)
1005
+ \u2022 Long static list \u2192 VirtualList
1006
+ \u2022 User-paced gallery \u2192 Carousel
1007
+
1008
+ pauseOnHover=true is recommended whenever content is readable text.
1009
+
1010
+ ANTI-PATTERNS:
1011
+ \u2717 Marquee with action buttons inside (hard to click)
1012
+ \u2717 Fast-speed marquee on important text (unreadable, a11y violation)
1013
+ \u2717 Multiple Marquees on same page in different directions (visual chaos)`
1014
+ );
450
1015
  var virtualListPropsSchema = z.object({
451
1016
  items: z.array(z.any()).describe("Data array (required)"),
452
1017
  estimateSize: z.union([z.number(), z.any()]).describe("Estimated item height (number or (index) => number, required)"),
@@ -457,7 +1022,23 @@ var virtualListPropsSchema = z.object({
457
1022
  style: z.any().optional().describe("Inline style (CSSProperties)"),
458
1023
  endReachedThreshold: z.number().default(200).describe("End detection threshold (px)"),
459
1024
  onEndReached: z.any().optional().describe("End reached callback () => void")
460
- }).describe("Virtual scroll list. Based on @tanstack/react-virtual.");
1025
+ }).describe(
1026
+ `VirtualList \u2014 performant rendering of huge lists (1000+ items). Based on @tanstack/react-virtual.
1027
+
1028
+ WHEN TO USE:
1029
+ \u2022 Large datasets (>200 rows): chat history, transactions, logs, leaderboard
1030
+ \u2022 Stable item height (or measurable per-item via estimateSize fn)
1031
+ \u2022 Small list (<100 items) \u2192 DataList (much simpler API)
1032
+ \u2022 Grid layout \u2192 VirtualGrid
1033
+ \u2022 Server-side pagination \u2192 InfiniteScroll wrapping plain list
1034
+
1035
+ estimateSize is critical \u2014 wrong values cause scroll jumps. Pair with onEndReached for server pagination.
1036
+
1037
+ ANTI-PATTERNS:
1038
+ \u2717 VirtualList for short lists (DataList is simpler and renders faster)
1039
+ \u2717 Variable estimateSize for uniform items \u2014 use a single number
1040
+ \u2717 Putting interactive overlays inside virtual rows (mounted/unmounted on scroll)`
1041
+ );
461
1042
  var virtualGridPropsSchema = z.object({
462
1043
  items: z.array(z.any()).describe("Data array (required)"),
463
1044
  columns: z.number().describe("Column count (required)"),
@@ -469,7 +1050,20 @@ var virtualGridPropsSchema = z.object({
469
1050
  style: z.any().optional().describe("Inline style (CSSProperties)"),
470
1051
  endReachedThreshold: z.number().default(200).describe("End detection threshold (px)"),
471
1052
  onEndReached: z.any().optional().describe("End reached callback () => void")
472
- }).describe("Virtual scroll grid. Based on @tanstack/react-virtual.");
1053
+ }).describe(
1054
+ `VirtualGrid \u2014 performant grid for huge lists. Based on @tanstack/react-virtual.
1055
+
1056
+ WHEN TO USE:
1057
+ \u2022 Image gallery / card grid with 200+ items
1058
+ \u2022 Fixed column count (responsive via JS \u2014 recompute columns on breakpoint)
1059
+ \u2022 Small grid \u2192 DataGrid (no virtualization, simpler API)
1060
+ \u2022 Single-column list \u2192 VirtualList
1061
+
1062
+ ANTI-PATTERNS:
1063
+ \u2717 VirtualGrid with <50 items \u2014 DataGrid is simpler
1064
+ \u2717 Cards with hover-expanding height (breaks virtualization)
1065
+ \u2717 Forgetting to recompute columns on resize \u2192 visible empty space`
1066
+ );
473
1067
  var infiniteScrollPropsSchema = z.object({
474
1068
  list: z.array(z.any()).nullable().describe("Current data array (required)"),
475
1069
  totalCount: z.number().optional().describe("Total count (mutually exclusive with hasMore)"),
@@ -482,7 +1076,23 @@ var infiniteScrollPropsSchema = z.object({
482
1076
  scrollTarget: z.any().optional().describe("Scroll target element (HTMLElement | Document | MutableRefObject)"),
483
1077
  children: z.any().describe("List item rendering (ReactNode, required)"),
484
1078
  className: z.string().optional().describe("Style override")
485
- }).describe("Infinite scroll. Based on IntersectionObserver.");
1079
+ }).describe(
1080
+ `InfiniteScroll \u2014 auto-load more when sentinel enters viewport. Based on IntersectionObserver.
1081
+
1082
+ WHEN TO USE:
1083
+ \u2022 Feeds, social timelines, search-as-you-scroll
1084
+ \u2022 Continuous browsing where total isn't critical
1085
+ \u2022 Need jump-to-page \u2192 Pagination (not InfiniteScroll)
1086
+ \u2022 Need to render 1000s of already-loaded items efficiently \u2192 VirtualList
1087
+ \u2022 Combine with VirtualList for huge + paginated data
1088
+
1089
+ Pass either totalCount or hasMore (not both). handleLoadMore is required.
1090
+
1091
+ ANTI-PATTERNS:
1092
+ \u2717 InfiniteScroll without footer/loading element (looks broken at the bottom)
1093
+ \u2717 InfiniteScroll without debouncing handleLoadMore \u2014 duplicate fetches
1094
+ \u2717 Auto-loading critical actions in footer (links, contact) \u2014 they become unreachable`
1095
+ );
486
1096
  var ellipsisPropsSchema = z.object({
487
1097
  content: z.any().default("").describe("Body text (ReactNode)"),
488
1098
  lineClamp: z.number().default(2).describe("Line clamp limit"),
@@ -492,7 +1102,22 @@ var ellipsisPropsSchema = z.object({
492
1102
  observingEnvs: z.array(z.boolean()).optional().describe("Re-measure on external condition change"),
493
1103
  onShowMoreLessClick: z.any().optional().describe("Show more/less click callback () => void"),
494
1104
  className: z.string().optional().describe("Style override")
495
- }).describe("Text ellipsis. Built-in show more/less toggle.");
1105
+ }).describe(
1106
+ `Ellipsis \u2014 clamp long text to N lines with "show more / less" toggle.
1107
+
1108
+ WHEN TO USE:
1109
+ \u2022 Long descriptions in cards, comments, post previews
1110
+ \u2022 Single-line truncation only \u2192 CSS line-clamp utility (lighter)
1111
+ \u2022 Tooltip on hover for full text \u2192 Tooltip + truncate utility
1112
+ \u2022 Critical content that must be fully readable \u2014 don't truncate
1113
+
1114
+ triggerMore/triggerLess accept ReactNode for icons or styled buttons.
1115
+
1116
+ ANTI-PATTERNS:
1117
+ \u2717 Ellipsis on titles / labels \u2014 confusing UX
1118
+ \u2717 Always-collapsed (defaultShortened=true) for short text \u2014 measurement waste
1119
+ \u2717 Overriding triggerMore/Less with HTML that breaks accessibility (use button-like)`
1120
+ );
496
1121
  var emptyStatePropsSchema = z.object({
497
1122
  icon: z.any().optional().describe("Custom icon (ReactNode). Default inbox icon"),
498
1123
  title: z.string().optional().describe("Title text"),
@@ -501,7 +1126,22 @@ var emptyStatePropsSchema = z.object({
501
1126
  size: z.enum(["sm", "md", "lg"]).default("md").describe("Overall size"),
502
1127
  children: z.any().optional().describe("Additional content (ReactNode)"),
503
1128
  className: z.string().optional().describe("Style override")
504
- }).describe("Empty state placeholder. Shown when data is empty or unavailable.");
1129
+ }).describe(
1130
+ `EmptyState \u2014 friendly placeholder for empty lists, no search results, first-time setup.
1131
+
1132
+ WHEN TO USE:
1133
+ \u2022 Empty inbox / list / search results
1134
+ \u2022 First-time use (onboarding nudge with action button)
1135
+ \u2022 Loading \u2192 Skeleton/Spinner (NOT EmptyState)
1136
+ \u2022 Error \u2192 Alert (or pass icon + title to EmptyState only when conceptually "nothing here")
1137
+
1138
+ DataList/DataGrid have built-in noDataMessage that wraps EmptyState \u2014 use that prop instead of conditional rendering.
1139
+
1140
+ ANTI-PATTERNS:
1141
+ \u2717 Showing EmptyState during loading (confuses users into thinking data is missing)
1142
+ \u2717 EmptyState without action when user can fix it ("Create your first X" button)
1143
+ \u2717 Cluttered EmptyState (too much text/multiple CTAs) \u2014 keep one primary action`
1144
+ );
505
1145
  var numberInputPropsSchema = z.object({
506
1146
  variant: z.enum(["basic", "bind"]).default("basic").describe("Variant: basic (right chevron arrows) or bind (left/right +/- buttons)"),
507
1147
  value: z.union([z.number(), z.string()]).optional().describe("Current value"),
@@ -528,7 +1168,17 @@ var numberInputPropsSchema = z.object({
528
1168
  onFocus: z.any().optional().describe("Focus callback"),
529
1169
  className: z.string().optional().describe("Style override")
530
1170
  }).describe(
531
- "Number input with two variants: basic (chevron arrows) and bind (+/- buttons). Supports label, description, max display (click to fill), accelerated increment on long press. numberInputBind(ref, direction) binds acceleration to external buttons."
1171
+ `Number input with two variants: basic (chevron arrows) and bind (+/- buttons). Supports label, description, max display (click to fill), accelerated increment on long press. numberInputBind(ref, direction) binds acceleration to external buttons.
1172
+
1173
+ WHEN TO USE:
1174
+ \u2022 Any numeric field \u2014 quantity, score, age, count
1175
+ \u2022 Currency with thousand separators \u2192 PriceInput instead
1176
+ \u2022 Date / time \u2192 DatePicker instead
1177
+
1178
+ ANTI-PATTERNS:
1179
+ \u2717 <TextInput type="number"> \u2192 <NumberInput> (loses keyboard \u2191\u2193, step, accelerated long-press, max click)
1180
+ \u2717 Custom +/- buttons + <input> \u2192 variant="bind" (or numberInputBind for external)
1181
+ \u2717 Manual thousand separators for currency \u2192 PriceInput`
532
1182
  );
533
1183
  var priceInputPropsSchema = z.object({
534
1184
  size: z.enum(["md", "lg", "xl"]).default("md").describe("Size"),
@@ -551,7 +1201,20 @@ var priceInputPropsSchema = z.object({
551
1201
  onBalanceClick: z.any().optional().describe("Balance click callback (balance: string | number) => void"),
552
1202
  className: z.string().optional().describe("Style override")
553
1203
  }).describe(
554
- "Price/amount input field with prefix, suffix, balance display, and auto-fill on balance click."
1204
+ `PriceInput \u2014 currency / amount input with prefix, suffix, balance display, click-to-fill.
1205
+
1206
+ WHEN TO USE:
1207
+ \u2022 Money / token amounts: payment, transfer, swap, withdraw
1208
+ \u2022 Need balance hint with auto-fill UX (set balance + onBalanceClick)
1209
+ \u2022 Pure number (count, age, score) \u2192 NumberInput
1210
+ \u2022 Generic text \u2192 TextInput
1211
+
1212
+ separator=true displays commas; onValueChange always returns raw value (no commas). maxBalance auto-applies error styling on overflow.
1213
+
1214
+ ANTI-PATTERNS:
1215
+ \u2717 <TextInput type="number"> + manual currency formatting \u2192 PriceInput
1216
+ \u2717 NumberInput for currency (loses prefix/suffix/balance UX)
1217
+ \u2717 Using string input for amounts then parseFloat \u2014 lose precision; use this component`
555
1218
  );
556
1219
  var dataListPropsSchema = z.object({
557
1220
  list: z.array(z.any()).nullable().describe("Data array to render. null = loading state (required)"),
@@ -564,7 +1227,58 @@ var dataListPropsSchema = z.object({
564
1227
  children: z.any().describe("Item render function: ({ item, index }) => ReactNode (required)"),
565
1228
  className: z.string().optional().describe("Root element style")
566
1229
  }).describe(
567
- "Data list. Automatically handles loading/skeleton/empty/data states based on list. Built-in ErrorBoundary."
1230
+ `DataList \u2014 render-prop list that handles loading / skeleton / empty / error / data in one component. Built-in ErrorBoundary.
1231
+
1232
+ WHEN TO USE:
1233
+ \u2022 Any async list (<200 items) \u2014 feed, comments, dashboard rows
1234
+ \u2022 Pass list={null} during loading (auto-shows skeleton/spinner)
1235
+ \u2022 Pass list=[] for empty state (auto-shows noDataMessage)
1236
+ \u2022 Card grid \u2192 DataGrid (same API + columns prop)
1237
+ \u2022 Huge dataset \u2192 VirtualList
1238
+
1239
+ children is render fn: ({ item, index }) => ReactNode.
1240
+
1241
+ ANTI-PATTERNS:
1242
+ \u2717 Manual if (loading) {...} else if (!data.length) {...} chains \u2192 DataList handles all
1243
+ \u2717 DataList without skeletonElement when component shape is known (use Skeleton)
1244
+ \u2717 list=undefined (treated as data, not loading) \u2014 use null for loading`
1245
+ );
1246
+ var responsiveColumnsSchema = z.object({
1247
+ base: z.number().optional().describe("Default column count (mobile-first)"),
1248
+ sm: z.number().optional().describe(">= 640px"),
1249
+ md: z.number().optional().describe(">= 768px"),
1250
+ lg: z.number().optional().describe(">= 1024px"),
1251
+ xl: z.number().optional().describe(">= 1280px"),
1252
+ "2xl": z.number().optional().describe(">= 1536px")
1253
+ });
1254
+ var dataGridPropsSchema = z.object({
1255
+ list: z.array(z.any()).nullable().describe("Data array to render. null = loading state (required)"),
1256
+ columns: z.union([z.number(), responsiveColumnsSchema]).describe(
1257
+ "Column count. number = fixed | { base, sm, md, lg, xl, 2xl } = responsive (required)"
1258
+ ),
1259
+ gap: z.union([z.number(), z.string()]).optional().describe("Item gap. number = px | string = CSS value"),
1260
+ noDataMessage: z.any().optional().describe("Message for empty array (string | ReactElement)"),
1261
+ errorFallback: z.any().optional().describe("Fallback on error (ReactNode)"),
1262
+ loadingElement: z.any().optional().describe("Custom loading element (default: Spinner)"),
1263
+ skeletonElement: z.any().optional().describe("Skeleton element during loading (ReactElement)"),
1264
+ skeletonCount: z.number().default(3).describe("Skeleton repeat count"),
1265
+ loading: z.boolean().default(false).describe("Force loading state"),
1266
+ children: z.any().describe("Item render function: ({ item, index }) => ReactNode (required)"),
1267
+ className: z.string().optional().describe("Root element style")
1268
+ }).describe(
1269
+ `DataGrid \u2014 card grid version of DataList with responsive columns. Built-in ErrorBoundary, loading/skeleton/empty/error states.
1270
+
1271
+ WHEN TO USE:
1272
+ \u2022 Card grids: products, gallery, team members, posts
1273
+ \u2022 Need responsive column count \u2192 pass { base: 1, sm: 2, lg: 3, xl: 4 }
1274
+ \u2022 Single column / row layout \u2192 DataList
1275
+ \u2022 Tabular data \u2192 table component (not DataGrid)
1276
+ \u2022 Huge dataset \u2192 VirtualGrid
1277
+
1278
+ ANTI-PATTERNS:
1279
+ \u2717 Tabular data forced into card grid (use a table)
1280
+ \u2717 Hardcoded column count for responsive layouts \u2192 use responsive object
1281
+ \u2717 Manual loading/empty handling \u2192 DataGrid does it`
568
1282
  );
569
1283
  var animationOptionsSchema = z.object({
570
1284
  name: z.string().optional().describe("Animation name"),
@@ -603,7 +1317,22 @@ var modalTemplatePropsSchema = z.object({
603
1317
  dimClassName: z.string().optional().describe("Dim overlay style"),
604
1318
  headerClassName: z.string().optional().describe("Header area style")
605
1319
  }).describe(
606
- "Modal template. All modal components must be wrapped with ModalTemplate."
1320
+ `Modal template. All modal components must be wrapped with ModalTemplate.
1321
+
1322
+ WHEN TO USE:
1323
+ \u2022 Force user decision (delete confirm, submit confirm, blocking dialog)
1324
+ \u2022 Long form/flow that needs full attention
1325
+ \u2022 Side panel that doesn't block main flow \u2192 Drawer instead
1326
+ \u2022 Inline contextual UI \u2192 Popover instead
1327
+ \u2022 Short hint \u2192 Tooltip instead
1328
+
1329
+ PREFERRED API: use modal() / useModal() imperative API rather than mounting <ModalTemplate> directly. modal() handles stacking, focus return, ESC, and background scroll automatically.
1330
+
1331
+ ANTI-PATTERNS:
1332
+ \u2717 Custom <div className="fixed inset-0"> \u2192 modal() (loses focus trap, a11y)
1333
+ \u2717 Direct <ModalTemplate> mount in render tree \u2192 wrap with modal()
1334
+ \u2717 Modal with no title for screen readers \u2192 always pass title prop
1335
+ \u2717 Multiple modals stacking confusingly \u2192 use isAlone:true to close prior modals`
607
1336
  );
608
1337
  var modalCallSchema = z.object({
609
1338
  component: z.any().describe("Modal component (required). Automatically receives close/resolve as props"),
@@ -634,24 +1363,39 @@ var errorBoundaryPropsSchema = z.object({
634
1363
  children: z.any().describe("Child elements to wrap (ReactNode, required)"),
635
1364
  fallback: z.any().optional().describe("Fallback UI on error (ReactNode)"),
636
1365
  onError: z.any().optional().describe("Error callback (error: Error, errorInfo: ErrorInfo) => void")
637
- }).describe("Error boundary. Catches child component render errors and displays fallback UI.");
1366
+ }).describe(
1367
+ `ErrorBoundary \u2014 catches render-time errors in subtree and shows fallback UI.
1368
+
1369
+ WHEN TO USE:
1370
+ \u2022 Wrap risky areas: third-party widgets, dynamic imports, untrusted content rendering
1371
+ \u2022 Async errors / promise rejections \u2192 NOT caught (use try/catch in handlers)
1372
+ \u2022 Per-route error wrapping \u2192 use framework's error.tsx (Next.js) where possible
1373
+
1374
+ DataList / DataGrid have ErrorBoundary built-in \u2014 don't double-wrap.
1375
+
1376
+ ANTI-PATTERNS:
1377
+ \u2717 ErrorBoundary at app root only \u2014 granular boundaries give better UX (one widget fails, page survives)
1378
+ \u2717 Showing raw Error.message in production (leak risk) \u2014 use friendly fallback
1379
+ \u2717 Forgetting onError logging \u2192 silent failures in production`
1380
+ );
638
1381
  var clientOnlyPropsSchema = z.object({
639
1382
  children: z.any().describe("Element to render only on client (ReactNode, required)"),
640
1383
  fallback: z.any().optional().describe("Fallback UI during SSR (ReactNode, default: null)")
641
- }).describe("Client-only rendering. Prevents hydration mismatch in SSR environments.");
642
- var themeProviderPropsSchema = z.object({
643
- children: z.any().describe("App root element (ReactNode, required)"),
644
- defaultTheme: z.string().optional().describe('Default theme (e.g. "dark", "light")'),
645
- storageKey: z.string().optional().describe('localStorage storage key (default: "theme")'),
646
- themes: z.array(z.string()).optional().describe('Available theme list (default: ["light", "dark"])'),
647
- attribute: z.union([z.string(), z.array(z.string())]).optional().describe('Theme HTML attribute (default: "data-theme")'),
648
- enableSystem: z.boolean().optional().describe("Enable system theme detection"),
649
- disableTransitionOnChange: z.boolean().optional().describe("Disable transitions on theme change"),
650
- forcedTheme: z.string().optional().describe("Forced theme (user cannot change)"),
651
- enableColorScheme: z.boolean().optional().describe("Auto-set color-scheme CSS property"),
652
- nonce: z.string().optional().describe("CSP nonce")
653
- }).describe(
654
- "Theme provider. Based on next-themes. Access theme state via useTheme() hook."
1384
+ }).describe(
1385
+ `ClientOnly \u2014 defers children to client-side render, preventing SSR hydration mismatch.
1386
+
1387
+ WHEN TO USE:
1388
+ \u2022 Wrap components that read window/document/localStorage at render time
1389
+ \u2022 Components depending on browser-only APIs (IntersectionObserver eager init, geolocation)
1390
+ \u2022 Server-renderable content \u2192 DON'T wrap (loses SEO/SSR perf benefits)
1391
+ \u2022 Conditional based on data \u2192 use proper SSR-safe state instead
1392
+
1393
+ Pass fallback to avoid layout shift during hydration.
1394
+
1395
+ ANTI-PATTERNS:
1396
+ \u2717 Wrapping the entire page in ClientOnly (defeats SSR)
1397
+ \u2717 ClientOnly without fallback for above-the-fold UI (CLS)
1398
+ \u2717 Using ClientOnly to "fix" any hydration warning \u2014 root-cause the mismatch first`
655
1399
  );
656
1400
  var tablePropsSchema = z.object({
657
1401
  list: z.array(z.any()).nullable().describe("Data array. null/undefined = loading state (required)"),
@@ -668,14 +1412,35 @@ var tablePropsSchema = z.object({
668
1412
  className: z.string().optional().describe("Table wrapper style"),
669
1413
  theadClassName: z.string().optional().describe("Header row style")
670
1414
  }).describe(
671
- "Table. Column definitions via TdColumn, row wrapping via TableRow. Built-in sorting/skeleton loading."
1415
+ `Table \u2014 tabular data with sortable columns, skeleton/loading/empty states. Compound: TableRow + TdColumn.
1416
+
1417
+ WHEN TO USE:
1418
+ \u2022 Comparable structured data (financial reports, transaction history, leaderboard)
1419
+ \u2022 Sortable per-column \u2192 enableSorting on TdColumn
1420
+ \u2022 Card-style entities \u2192 DataGrid
1421
+ \u2022 Single-column read-only list \u2192 DataList
1422
+ \u2022 Huge dataset (>500 rows) \u2192 wrap with VirtualList logic or paginate
1423
+
1424
+ list={null} \u2192 loading state. list=[] \u2192 noDataMsg. children: ({ item, index }) => <TableRow>...</TableRow>.
1425
+
1426
+ ANTI-PATTERNS:
1427
+ \u2717 Native <table> + manual loading/empty handling \u2192 Table component
1428
+ \u2717 Forcing card-style data into Table (use DataGrid)
1429
+ \u2717 Sorting in client when server pagination is in use \u2192 server-side sort`
672
1430
  );
673
1431
  var tableRowPropsSchema = z.object({
674
1432
  variant: z.enum(["default", "accent"]).default("default").describe("Row style"),
675
1433
  className: z.string().optional().describe("Style override"),
676
1434
  children: z.any().describe("TdColumn list (ReactNode, required)"),
677
1435
  onClick: z.any().optional().describe("Row click callback (e: MouseEvent) => void")
678
- }).describe("Table row. Used inside Table.");
1436
+ }).describe(
1437
+ `TableRow \u2014 a single row inside Table. Wraps TdColumn cells.
1438
+
1439
+ WHEN TO USE:
1440
+ \u2022 variant="accent" highlights selected/current row
1441
+ \u2022 onClick for row-level navigation (e.g. open detail page)
1442
+ \u2022 Per-row checkbox/action \u2192 place inside a TdColumn child`
1443
+ );
679
1444
  var tdColumnPropsSchema = z.object({
680
1445
  label: z.any().optional().describe("Header label (ReactElement | string)"),
681
1446
  fieldId: z.string().nullable().describe("Column identifier (sort key, required)"),
@@ -693,7 +1458,20 @@ var tdColumnPropsSchema = z.object({
693
1458
  handleClickSort: z.any().optional().describe("Sort click callback ({ index, fieldId, order }) => void"),
694
1459
  children: z.any().describe("Cell content (ReactNode, required)"),
695
1460
  className: z.string().optional().describe("Style override")
696
- }).describe("Table cell/column definition. Used inside TableRow.");
1461
+ }).describe(
1462
+ `TdColumn \u2014 table cell. Drives both <th> and <td> for the column. Provides sorting, alignment, overflow handling.
1463
+
1464
+ WHEN TO USE:
1465
+ \u2022 textOverflow="truncate" (default) for fixed-width columns; "wrap" for narrative
1466
+ \u2022 align="right" for numeric/currency columns (a11y readability)
1467
+ \u2022 enableSorting=true when column is sortable; supply order + handleClickSort for controlled sort
1468
+ \u2022 highlightKey to group columns that highlight together on hover
1469
+
1470
+ ANTI-PATTERNS:
1471
+ \u2717 enableSorting without handleClickSort \u2192 sort indicator is dead
1472
+ \u2717 align="left" for currency/number columns
1473
+ \u2717 Mixing text and numeric in one column without consistent align`
1474
+ );
697
1475
  var toastOptionsSchema = z.object({
698
1476
  description: z.any().optional().describe("Toast subtitle (ReactNode)"),
699
1477
  duration: z.number().optional().describe("Auto-dismiss duration (ms). Default 4000"),
@@ -719,7 +1497,20 @@ var toastOptionsSchema = z.object({
719
1497
  unstyled: z.boolean().optional().describe("Remove default styles (for custom styling)"),
720
1498
  id: z.union([z.string(), z.number()]).optional().describe("Toast ID (for deduplication or updates)")
721
1499
  }).describe(
722
- "toast() call options. Used as toast(message, options). Fully customizable via toast.custom(jsx)."
1500
+ `toast() options. Used as toast(message, options) / toast.success / .error / .warning / .info / .promise / .custom(jsx).
1501
+
1502
+ WHEN TO USE TOAST:
1503
+ \u2022 Transient feedback after user action: "Saved", "Copied", "Network error"
1504
+ \u2022 Persistent in-page banner \u2192 Alert
1505
+ \u2022 Critical destructive confirmation \u2192 Modal (toast can be missed)
1506
+ \u2022 Form field error \u2192 use error/description prop on the input
1507
+
1508
+ richColors=true gives strong success/error/warning/info colors. Use action for "Undo" patterns.
1509
+
1510
+ ANTI-PATTERNS:
1511
+ \u2717 Toast for confirmation that user MUST acknowledge \u2192 Modal
1512
+ \u2717 Stacking many toasts \u2192 set visibleToasts on Toaster
1513
+ \u2717 Long-form content in toast (toast is for short messages)`
723
1514
  );
724
1515
  var toasterPropsSchema = z.object({
725
1516
  position: z.enum([
@@ -741,7 +1532,17 @@ var toasterPropsSchema = z.object({
741
1532
  offset: z.any().optional().describe("Offset from screen edge. string | number | { top, right, bottom, left }"),
742
1533
  dir: z.enum(["ltr", "rtl", "auto"]).optional().describe("Text direction")
743
1534
  }).describe(
744
- "Toaster config. Place once at app root. Display notifications via toast(). Based on sonner."
1535
+ `Toaster \u2014 toast container. Mount ONCE at app root. Then call toast() anywhere. Based on sonner.
1536
+
1537
+ WHEN TO USE:
1538
+ \u2022 Mount in app shell (layout.tsx / _app.tsx) \u2014 exactly one instance globally
1539
+ \u2022 Set position once here; per-toast position only when needed
1540
+ \u2022 Provide visibleToasts cap to avoid stacking
1541
+
1542
+ ANTI-PATTERNS:
1543
+ \u2717 Multiple Toasters across pages \u2014 only one global Toaster
1544
+ \u2717 Mounting Toaster inside conditional render \u2014 toasts vanish on remount
1545
+ \u2717 Forgetting Toaster mount \u2014 toast() calls do nothing`
745
1546
  );
746
1547
  var tagInputPropsSchema = z.object({
747
1548
  value: z.array(z.string()).optional().describe("Controlled tags array"),
@@ -755,7 +1556,22 @@ var tagInputPropsSchema = z.object({
755
1556
  description: z.string().optional().describe("Helper text below input"),
756
1557
  size: z.enum(["sm", "md", "lg"]).default("md").describe("Size"),
757
1558
  className: z.string().optional().describe("Style override")
758
- }).describe("Tag input. Enter key to add, Backspace to delete last tag.");
1559
+ }).describe(
1560
+ `TagInput \u2014 free-form multi-value entry (Enter to add, Backspace to remove last).
1561
+
1562
+ WHEN TO USE:
1563
+ \u2022 Free-form labels: skills, hashtags, email recipients, keywords
1564
+ \u2022 Predefined options \u2192 Combobox with multi-select (NOT TagInput)
1565
+ \u2022 Single value \u2192 TextInput
1566
+ \u2022 Limited options \u2192 Select / RadioGroup / Checkbox
1567
+
1568
+ allowDuplicates=false (default) prevents repeats. Use max to cap count.
1569
+
1570
+ ANTI-PATTERNS:
1571
+ \u2717 TagInput for predefined taxonomy \u2192 Combobox (controlled options)
1572
+ \u2717 TagInput without max for spam-prone fields
1573
+ \u2717 Custom comma-split string field \u2192 TagInput (proper UX + a11y)`
1574
+ );
759
1575
  var nxImagePropsSchema = z.object({
760
1576
  src: z.string().optional().describe("Image source URL"),
761
1577
  alt: z.string().optional().describe("Alt text"),
@@ -766,7 +1582,22 @@ var nxImagePropsSchema = z.object({
766
1582
  lazy: z.boolean().default(true).describe('Enable lazy loading (loading="lazy")'),
767
1583
  wrapperClassName: z.string().optional().describe("Wrapper div style"),
768
1584
  className: z.string().optional().describe("Image element style")
769
- }).describe("Enhanced image. Lazy loading, fallback, aspect-ratio support.");
1585
+ }).describe(
1586
+ `NxImage \u2014 lazy-loaded <img> with fallback, fixed aspect-ratio, object-fit. Always prefer over native <img>.
1587
+
1588
+ WHEN TO USE:
1589
+ \u2022 Content images: covers, banners, illustrations, hero images
1590
+ \u2022 Profile/user avatar (with text fallback) \u2192 Avatar
1591
+ \u2022 Background image / decorative \u2192 CSS bg-image
1592
+ \u2022 Need Next.js optimization \u2192 use next/image directly (NxImage doesn't optimize)
1593
+
1594
+ aspectRatio reserves space, preventing CLS (layout shift).
1595
+
1596
+ ANTI-PATTERNS:
1597
+ \u2717 <img> with manual onError handling \u2192 NxImage (built-in fallback)
1598
+ \u2717 NxImage without alt for content images (a11y violation)
1599
+ \u2717 NxImage without aspectRatio in fluid layouts \u2192 CLS jank`
1600
+ );
770
1601
  var datePickerPropsSchema = z.object({
771
1602
  value: z.any().optional().describe("Controlled date value (Date)"),
772
1603
  defaultValue: z.any().optional().describe("Default date (Date)"),
@@ -778,7 +1609,22 @@ var datePickerPropsSchema = z.object({
778
1609
  locale: z.enum(["ko", "en"]).default("ko").describe("Calendar locale"),
779
1610
  formatStr: z.string().default("yyyy-MM-dd").describe("Date format string (date-fns format)"),
780
1611
  className: z.string().optional().describe("Style override")
781
- }).describe("DatePicker. Calendar popup for date selection. Based on react-day-picker.");
1612
+ }).describe(
1613
+ `DatePicker \u2014 calendar popup for date selection. Based on react-day-picker.
1614
+
1615
+ WHEN TO USE:
1616
+ \u2022 Single date selection: birthday, due date, appointment
1617
+ \u2022 Date range \u2192 use two DatePickers with minDate/maxDate cross-bound
1618
+ \u2022 Time selection \u2192 not yet supported; use TextInput with type="time" + DatePicker combo
1619
+ \u2022 Quick relative ranges (Today/Last 7 days) \u2192 DropdownMenu of preset Buttons + DatePicker for "Custom"
1620
+
1621
+ minDate/maxDate disable out-of-range dates. locale="ko" for Korean labels.
1622
+
1623
+ ANTI-PATTERNS:
1624
+ \u2717 Native <input type="date"> for branded UI (inconsistent across browsers) \u2192 DatePicker
1625
+ \u2717 Free-text date with parsing \u2192 DatePicker (consistent UX)
1626
+ \u2717 DatePicker without minDate for past-date-invalid fields (e.g. booking)`
1627
+ );
782
1628
  var imageUploadPropsSchema = z.object({
783
1629
  value: z.string().nullable().optional().describe("Controlled image URL (string | null)"),
784
1630
  defaultValue: z.string().optional().describe("Default image URL"),
@@ -794,7 +1640,19 @@ var imageUploadPropsSchema = z.object({
794
1640
  size: z.enum(["sm", "md", "lg"]).default("md").describe("Upload area size"),
795
1641
  className: z.string().optional().describe("Style override")
796
1642
  }).describe(
797
- "ImageUpload. Drag-and-drop image upload with preview, file validation, and field label/description support."
1643
+ `ImageUpload \u2014 drag-and-drop image upload with preview, file-type/size validation, label/description.
1644
+
1645
+ WHEN TO USE:
1646
+ \u2022 Single image upload: avatar, cover, KYC document, post thumbnail
1647
+ \u2022 Multiple files / non-image \u2192 not yet supported; build custom or use a file dropzone
1648
+ \u2022 Inline image picker without preview \u2192 custom <input type="file">
1649
+
1650
+ accept whitelist + maxSize together cover validation. onError fires with i18n-ready string.
1651
+
1652
+ ANTI-PATTERNS:
1653
+ \u2717 <input type="file"> + manual preview \u2192 ImageUpload (handles drag, validation, preview)
1654
+ \u2717 ImageUpload without onError handler \u2192 silent failure on validation reject
1655
+ \u2717 Storing image as data-URL value (use File via onChange and upload to server)`
798
1656
  );
799
1657
 
800
- export { accordionPropsSchema, alertPropsSchema, avatarPropsSchema, badgePropsSchema, breadcrumbPropsSchema, buttonPropsSchema, carouselButtonPropsSchema, carouselDotsPropsSchema, carouselPropsSchema, carouselSlidePropsSchema, checkBoxPropsSchema, chipPropsSchema, clientOnlyPropsSchema, countdownPropsSchema, counterPropsSchema, dataListPropsSchema, datePickerPropsSchema, dividerPropsSchema, drawerClosePropsSchema, drawerContentPropsSchema, drawerDescriptionPropsSchema, drawerPropsSchema, drawerTitlePropsSchema, drawerTriggerPropsSchema, dropdownMenuPropsSchema, ellipsisPropsSchema, emptyStatePropsSchema, errorBoundaryPropsSchema, imageUploadPropsSchema, infiniteScrollPropsSchema, marqueePropsSchema, modalCallSchema, modalTemplatePropsSchema, numberInputPropsSchema, nxImagePropsSchema, paginationPropsSchema, popoverPropsSchema, priceInputPropsSchema, progressPropsSchema, radioGroupPropsSchema, radioItemPropsSchema, selectItemPropsSchema, selectPropsSchema, skeletonPropsSchema, sliderPropsSchema, spinnerPropsSchema, stepperPropsSchema, switchPropsSchema, tabPropsSchema, tablePropsSchema, tableRowPropsSchema, tagInputPropsSchema, tdColumnPropsSchema, textAreaPropsSchema, textInputPropsSchema, themeProviderPropsSchema, toastOptionsSchema, toasterPropsSchema, toggleGroupPropsSchema, tooltipPropsSchema, virtualGridPropsSchema, virtualListPropsSchema };
1658
+ export { accordionPropsSchema, alertPropsSchema, avatarPropsSchema, badgePropsSchema, breadcrumbPropsSchema, buttonPropsSchema, carouselButtonPropsSchema, carouselDotsPropsSchema, carouselPropsSchema, carouselSlidePropsSchema, checkBoxPropsSchema, chipPropsSchema, clientOnlyPropsSchema, comboboxOptionDescriptionPropsSchema, comboboxOptionMetaPropsSchema, comboboxOptionPropsSchema, comboboxPropsSchema, countdownPropsSchema, counterPropsSchema, dataGridPropsSchema, dataListPropsSchema, datePickerPropsSchema, dividerPropsSchema, drawerClosePropsSchema, drawerContentPropsSchema, drawerDescriptionPropsSchema, drawerPropsSchema, drawerTitlePropsSchema, drawerTriggerPropsSchema, dropdownMenuPropsSchema, ellipsisPropsSchema, emptyStatePropsSchema, errorBoundaryPropsSchema, imageUploadPropsSchema, infiniteScrollPropsSchema, marqueePropsSchema, modalCallSchema, modalTemplatePropsSchema, numberInputPropsSchema, nxImagePropsSchema, paginationPropsSchema, popoverPropsSchema, priceInputPropsSchema, progressPropsSchema, radioGroupPropsSchema, radioItemPropsSchema, selectItemPropsSchema, selectPropsSchema, skeletonPropsSchema, sliderPropsSchema, spinnerPropsSchema, stepperPropsSchema, switchPropsSchema, tabPropsSchema, tablePropsSchema, tableRowPropsSchema, tagInputPropsSchema, tdColumnPropsSchema, textAreaPropsSchema, textInputPropsSchema, toastOptionsSchema, toasterPropsSchema, toggleGroupPropsSchema, tooltipPropsSchema, virtualGridPropsSchema, virtualListPropsSchema };