gladvn 0.2.22 → 0.2.27

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 (463) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +70 -58
  3. package/bin/cli.js +352 -150
  4. package/llms.txt +7 -5
  5. package/package.json +14 -26
  6. package/src/blocks/auth-card.tsx +104 -0
  7. package/src/blocks/auth-dialog.tsx +116 -0
  8. package/src/blocks/auth-recovery.tsx +61 -0
  9. package/src/blocks/auth-split.tsx +132 -0
  10. package/src/blocks/dashboard.tsx +182 -0
  11. package/src/blocks/settings.tsx +104 -0
  12. package/src/components/macro/accordion-preset.tsx +2 -1
  13. package/src/components/macro/alert-dialog-preset.tsx +3 -2
  14. package/src/components/macro/alert-preset.tsx +2 -1
  15. package/src/components/macro/avatar-preset.tsx +2 -1
  16. package/src/components/macro/breadcrumb-preset.tsx +2 -1
  17. package/src/components/macro/card-preset.tsx +2 -1
  18. package/src/components/macro/carousel-preset.tsx +2 -1
  19. package/src/components/macro/checkbox-preset.tsx +2 -1
  20. package/src/components/macro/combobox-preset.tsx +5 -3
  21. package/src/components/macro/command-preset.tsx +7 -4
  22. package/src/components/macro/date-picker.tsx +3 -2
  23. package/src/components/macro/dialog-preset.tsx +3 -2
  24. package/src/components/macro/empty-preset.tsx +2 -1
  25. package/src/components/macro/field-preset.tsx +2 -1
  26. package/src/components/macro/input-otp-preset.tsx +2 -1
  27. package/src/components/macro/input-preset.tsx +2 -1
  28. package/src/components/macro/pagination-preset.tsx +2 -1
  29. package/src/components/macro/progress-preset.tsx +2 -1
  30. package/src/components/macro/select-preset.tsx +3 -2
  31. package/src/components/macro/slider-preset.tsx +2 -1
  32. package/src/components/macro/switch-preset.tsx +2 -1
  33. package/src/components/macro/tabs-preset.tsx +2 -1
  34. package/src/components/micro/accordion.test.tsx +96 -0
  35. package/src/components/micro/alert-dialog.tsx +1 -1
  36. package/src/components/micro/alert.test.tsx +77 -0
  37. package/src/components/micro/avatar.tsx +1 -1
  38. package/src/components/micro/badge.test.tsx +57 -0
  39. package/src/components/micro/breadcrumb.tsx +1 -1
  40. package/src/components/micro/button.test.tsx +101 -4
  41. package/src/components/micro/card.test.tsx +54 -0
  42. package/src/components/micro/card.tsx +1 -1
  43. package/src/components/micro/carousel.tsx +1 -1
  44. package/src/components/micro/chart.tsx +1 -1
  45. package/src/components/micro/checkbox.test.tsx +92 -0
  46. package/src/components/micro/combobox.tsx +1 -1
  47. package/src/components/micro/command.tsx +1 -1
  48. package/src/components/micro/context-menu.tsx +1 -1
  49. package/src/components/micro/dialog.test.tsx +127 -0
  50. package/src/components/micro/dialog.tsx +1 -1
  51. package/src/components/micro/direction.tsx +1 -1
  52. package/src/components/micro/drawer.tsx +2 -2
  53. package/src/components/micro/dropdown-menu.test.tsx +132 -0
  54. package/src/components/micro/dropdown-menu.tsx +1 -1
  55. package/src/components/micro/empty.tsx +1 -1
  56. package/src/components/micro/field.tsx +1 -1
  57. package/src/components/micro/input-group.tsx +1 -1
  58. package/src/components/micro/input.test.tsx +95 -0
  59. package/src/components/micro/item.tsx +1 -1
  60. package/src/components/micro/menubar.tsx +1 -1
  61. package/src/components/micro/navigation-menu.tsx +1 -1
  62. package/src/components/micro/pagination.tsx +1 -1
  63. package/src/components/micro/popover.test.tsx +83 -0
  64. package/src/components/micro/popover.tsx +1 -1
  65. package/src/components/micro/progress.tsx +1 -1
  66. package/src/components/micro/select.test.tsx +122 -0
  67. package/src/components/micro/select.tsx +1 -1
  68. package/src/components/micro/sheet.test.tsx +122 -0
  69. package/src/components/micro/sheet.tsx +1 -1
  70. package/src/components/micro/sidebar.tsx +1 -1
  71. package/src/components/micro/switch.test.tsx +108 -0
  72. package/src/components/micro/table.tsx +1 -1
  73. package/src/components/micro/tabs.test.tsx +90 -0
  74. package/src/components/micro/tooltip.test.tsx +107 -0
  75. package/src/components/micro/tooltip.tsx +1 -1
  76. package/src/dev/data.ts +8 -0
  77. package/src/dev/main.tsx +4 -0
  78. package/src/dev/showcase/accordion.tsx +4 -2
  79. package/src/dev/showcase/alert-dialog.tsx +7 -4
  80. package/src/dev/showcase/alert.tsx +6 -3
  81. package/src/dev/showcase/aspect-ratio.tsx +2 -1
  82. package/src/dev/showcase/avatar.tsx +6 -3
  83. package/src/dev/showcase/badge.tsx +2 -1
  84. package/src/dev/showcase/breadcrumb.tsx +7 -4
  85. package/src/dev/showcase/button.tsx +2 -1
  86. package/src/dev/showcase/calendar.tsx +2 -1
  87. package/src/dev/showcase/card.tsx +4 -2
  88. package/src/dev/showcase/carousel.tsx +4 -2
  89. package/src/dev/showcase/chart.tsx +4 -2
  90. package/src/dev/showcase/checkbox.tsx +4 -2
  91. package/src/dev/showcase/collapsible.tsx +4 -2
  92. package/src/dev/showcase/combobox.tsx +9 -5
  93. package/src/dev/showcase/command.tsx +6 -3
  94. package/src/dev/showcase/context-menu.tsx +5 -3
  95. package/src/dev/showcase/dialog.tsx +5 -3
  96. package/src/dev/showcase/drawer.tsx +5 -3
  97. package/src/dev/showcase/dropdown-menu.tsx +7 -4
  98. package/src/dev/showcase/empty.tsx +6 -3
  99. package/src/dev/showcase/hover-card.tsx +7 -4
  100. package/src/dev/showcase/input-group.tsx +6 -3
  101. package/src/dev/showcase/input-otp.tsx +6 -3
  102. package/src/dev/showcase/input.tsx +6 -3
  103. package/src/dev/showcase/item.tsx +4 -2
  104. package/src/dev/showcase/kbd.tsx +10 -6
  105. package/src/dev/showcase/label.tsx +2 -1
  106. package/src/dev/showcase/menubar.tsx +5 -3
  107. package/src/dev/showcase/navigation-menu.tsx +5 -3
  108. package/src/dev/showcase/overview.tsx +9 -5
  109. package/src/dev/showcase/pagination.tsx +4 -2
  110. package/src/dev/showcase/popover.tsx +5 -3
  111. package/src/dev/showcase/progress.tsx +4 -2
  112. package/src/dev/showcase/radio-group.tsx +2 -1
  113. package/src/dev/showcase/resizable.tsx +4 -2
  114. package/src/dev/showcase/scroll-area.tsx +2 -1
  115. package/src/dev/showcase/select.tsx +7 -4
  116. package/src/dev/showcase/separator.tsx +2 -1
  117. package/src/dev/showcase/sheet.tsx +5 -3
  118. package/src/dev/showcase/sidebar.tsx +4 -2
  119. package/src/dev/showcase/skeleton.tsx +2 -1
  120. package/src/dev/showcase/slider.tsx +6 -3
  121. package/src/dev/showcase/sonner.tsx +2 -1
  122. package/src/dev/showcase/spinner.tsx +2 -1
  123. package/src/dev/showcase/switch.tsx +2 -1
  124. package/src/dev/showcase/table.tsx +4 -2
  125. package/src/dev/showcase/tabs.tsx +4 -2
  126. package/src/dev/showcase/textarea.tsx +6 -3
  127. package/src/dev/showcase/toast.tsx +2 -1
  128. package/src/dev/showcase/toggle-group.tsx +6 -3
  129. package/src/dev/showcase/toggle.tsx +2 -1
  130. package/src/dev/showcase/tooltip.tsx +5 -3
  131. package/src/dev/showcase/why.tsx +271 -0
  132. package/src/hooks/use-mobile.test.ts +72 -0
  133. package/src/lib/utils.test.ts +26 -10
  134. package/src/styles/gladvn.css +0 -1
  135. package/src/styles/tokens.css +4 -0
  136. package/dist/components/macro/accordion-preset.d.ts +0 -14
  137. package/dist/components/macro/accordion-preset.d.ts.map +0 -1
  138. package/dist/components/macro/alert-dialog-preset.d.ts +0 -26
  139. package/dist/components/macro/alert-dialog-preset.d.ts.map +0 -1
  140. package/dist/components/macro/alert-preset.d.ts +0 -14
  141. package/dist/components/macro/alert-preset.d.ts.map +0 -1
  142. package/dist/components/macro/avatar-preset.d.ts +0 -11
  143. package/dist/components/macro/avatar-preset.d.ts.map +0 -1
  144. package/dist/components/macro/breadcrumb-preset.d.ts +0 -12
  145. package/dist/components/macro/breadcrumb-preset.d.ts.map +0 -1
  146. package/dist/components/macro/card-preset.d.ts +0 -10
  147. package/dist/components/macro/card-preset.d.ts.map +0 -1
  148. package/dist/components/macro/carousel-preset.d.ts +0 -18
  149. package/dist/components/macro/carousel-preset.d.ts.map +0 -1
  150. package/dist/components/macro/checkbox-preset.d.ts +0 -14
  151. package/dist/components/macro/checkbox-preset.d.ts.map +0 -1
  152. package/dist/components/macro/combobox-preset.d.ts +0 -27
  153. package/dist/components/macro/combobox-preset.d.ts.map +0 -1
  154. package/dist/components/macro/command-preset.d.ts +0 -16
  155. package/dist/components/macro/command-preset.d.ts.map +0 -1
  156. package/dist/components/macro/date-picker.d.ts +0 -62
  157. package/dist/components/macro/date-picker.d.ts.map +0 -1
  158. package/dist/components/macro/dialog-preset.d.ts +0 -24
  159. package/dist/components/macro/dialog-preset.d.ts.map +0 -1
  160. package/dist/components/macro/empty-preset.d.ts +0 -15
  161. package/dist/components/macro/empty-preset.d.ts.map +0 -1
  162. package/dist/components/macro/field-preset.d.ts +0 -15
  163. package/dist/components/macro/field-preset.d.ts.map +0 -1
  164. package/dist/components/macro/index.d.ts +0 -22
  165. package/dist/components/macro/index.d.ts.map +0 -1
  166. package/dist/components/macro/input-otp-preset.d.ts +0 -19
  167. package/dist/components/macro/input-otp-preset.d.ts.map +0 -1
  168. package/dist/components/macro/input-preset.d.ts +0 -21
  169. package/dist/components/macro/input-preset.d.ts.map +0 -1
  170. package/dist/components/macro/pagination-preset.d.ts +0 -13
  171. package/dist/components/macro/pagination-preset.d.ts.map +0 -1
  172. package/dist/components/macro/progress-preset.d.ts +0 -10
  173. package/dist/components/macro/progress-preset.d.ts.map +0 -1
  174. package/dist/components/macro/radio-group-preset.d.ts +0 -22
  175. package/dist/components/macro/radio-group-preset.d.ts.map +0 -1
  176. package/dist/components/macro/select-preset.d.ts +0 -42
  177. package/dist/components/macro/select-preset.d.ts.map +0 -1
  178. package/dist/components/macro/slider-preset.d.ts +0 -12
  179. package/dist/components/macro/slider-preset.d.ts.map +0 -1
  180. package/dist/components/macro/switch-preset.d.ts +0 -12
  181. package/dist/components/macro/switch-preset.d.ts.map +0 -1
  182. package/dist/components/macro/tabs-preset.d.ts +0 -17
  183. package/dist/components/macro/tabs-preset.d.ts.map +0 -1
  184. package/dist/components/macro/textarea-preset.d.ts +0 -17
  185. package/dist/components/macro/textarea-preset.d.ts.map +0 -1
  186. package/dist/components/micro/accordion.d.ts +0 -15
  187. package/dist/components/micro/accordion.d.ts.map +0 -1
  188. package/dist/components/micro/alert-dialog.d.ts +0 -33
  189. package/dist/components/micro/alert-dialog.d.ts.map +0 -1
  190. package/dist/components/micro/alert.d.ts +0 -35
  191. package/dist/components/micro/alert.d.ts.map +0 -1
  192. package/dist/components/micro/aspect-ratio.d.ts +0 -20
  193. package/dist/components/micro/aspect-ratio.d.ts.map +0 -1
  194. package/dist/components/micro/avatar.d.ts +0 -23
  195. package/dist/components/micro/avatar.d.ts.map +0 -1
  196. package/dist/components/micro/badge.d.ts +0 -23
  197. package/dist/components/micro/badge.d.ts.map +0 -1
  198. package/dist/components/micro/breadcrumb.d.ts +0 -31
  199. package/dist/components/micro/breadcrumb.d.ts.map +0 -1
  200. package/dist/components/micro/button.d.ts +0 -46
  201. package/dist/components/micro/button.d.ts.map +0 -1
  202. package/dist/components/micro/calendar.d.ts +0 -28
  203. package/dist/components/micro/calendar.d.ts.map +0 -1
  204. package/dist/components/micro/card.d.ts +0 -28
  205. package/dist/components/micro/card.d.ts.map +0 -1
  206. package/dist/components/micro/carousel.d.ts +0 -29
  207. package/dist/components/micro/carousel.d.ts.map +0 -1
  208. package/dist/components/micro/chart.d.ts +0 -49
  209. package/dist/components/micro/chart.d.ts.map +0 -1
  210. package/dist/components/micro/checkbox.d.ts +0 -17
  211. package/dist/components/micro/checkbox.d.ts.map +0 -1
  212. package/dist/components/micro/collapsible.d.ts +0 -15
  213. package/dist/components/micro/collapsible.d.ts.map +0 -1
  214. package/dist/components/micro/combobox.d.ts +0 -34
  215. package/dist/components/micro/combobox.d.ts.map +0 -1
  216. package/dist/components/micro/command.d.ts +0 -79
  217. package/dist/components/micro/command.d.ts.map +0 -1
  218. package/dist/components/micro/context-menu.d.ts +0 -58
  219. package/dist/components/micro/context-menu.d.ts.map +0 -1
  220. package/dist/components/micro/dialog.d.ts +0 -15
  221. package/dist/components/micro/dialog.d.ts.map +0 -1
  222. package/dist/components/micro/direction.d.ts +0 -2
  223. package/dist/components/micro/direction.d.ts.map +0 -1
  224. package/dist/components/micro/drawer.d.ts +0 -18
  225. package/dist/components/micro/drawer.d.ts.map +0 -1
  226. package/dist/components/micro/dropdown-menu.d.ts +0 -40
  227. package/dist/components/micro/dropdown-menu.d.ts.map +0 -1
  228. package/dist/components/micro/empty.d.ts +0 -30
  229. package/dist/components/micro/empty.d.ts.map +0 -1
  230. package/dist/components/micro/field.d.ts +0 -29
  231. package/dist/components/micro/field.d.ts.map +0 -1
  232. package/dist/components/micro/hover-card.d.ts +0 -18
  233. package/dist/components/micro/hover-card.d.ts.map +0 -1
  234. package/dist/components/micro/input-group.d.ts +0 -17
  235. package/dist/components/micro/input-group.d.ts.map +0 -1
  236. package/dist/components/micro/input-otp.d.ts +0 -44
  237. package/dist/components/micro/input-otp.d.ts.map +0 -1
  238. package/dist/components/micro/input.d.ts +0 -29
  239. package/dist/components/micro/input.d.ts.map +0 -1
  240. package/dist/components/micro/item.d.ts +0 -31
  241. package/dist/components/micro/item.d.ts.map +0 -1
  242. package/dist/components/micro/kbd.d.ts +0 -9
  243. package/dist/components/micro/kbd.d.ts.map +0 -1
  244. package/dist/components/micro/label.d.ts +0 -15
  245. package/dist/components/micro/label.d.ts.map +0 -1
  246. package/dist/components/micro/menubar.d.ts +0 -40
  247. package/dist/components/micro/menubar.d.ts.map +0 -1
  248. package/dist/components/micro/navigation-menu.d.ts +0 -26
  249. package/dist/components/micro/navigation-menu.d.ts.map +0 -1
  250. package/dist/components/micro/pagination.d.ts +0 -33
  251. package/dist/components/micro/pagination.d.ts.map +0 -1
  252. package/dist/components/micro/popover.d.ts +0 -24
  253. package/dist/components/micro/popover.d.ts.map +0 -1
  254. package/dist/components/micro/progress.d.ts +0 -19
  255. package/dist/components/micro/progress.d.ts.map +0 -1
  256. package/dist/components/micro/radio-group.d.ts +0 -13
  257. package/dist/components/micro/radio-group.d.ts.map +0 -1
  258. package/dist/components/micro/resizable.d.ts +0 -12
  259. package/dist/components/micro/resizable.d.ts.map +0 -1
  260. package/dist/components/micro/scroll-area.d.ts +0 -12
  261. package/dist/components/micro/scroll-area.d.ts.map +0 -1
  262. package/dist/components/micro/select.d.ts +0 -22
  263. package/dist/components/micro/select.d.ts.map +0 -1
  264. package/dist/components/micro/separator.d.ts +0 -9
  265. package/dist/components/micro/separator.d.ts.map +0 -1
  266. package/dist/components/micro/sheet.d.ts +0 -17
  267. package/dist/components/micro/sheet.d.ts.map +0 -1
  268. package/dist/components/micro/sidebar.d.ts +0 -28
  269. package/dist/components/micro/sidebar.d.ts.map +0 -1
  270. package/dist/components/micro/skeleton.d.ts +0 -16
  271. package/dist/components/micro/skeleton.d.ts.map +0 -1
  272. package/dist/components/micro/slider.d.ts +0 -21
  273. package/dist/components/micro/slider.d.ts.map +0 -1
  274. package/dist/components/micro/sonner.d.ts +0 -5
  275. package/dist/components/micro/sonner.d.ts.map +0 -1
  276. package/dist/components/micro/spinner.d.ts +0 -21
  277. package/dist/components/micro/spinner.d.ts.map +0 -1
  278. package/dist/components/micro/switch.d.ts +0 -13
  279. package/dist/components/micro/switch.d.ts.map +0 -1
  280. package/dist/components/micro/table.d.ts +0 -17
  281. package/dist/components/micro/table.d.ts.map +0 -1
  282. package/dist/components/micro/tabs.d.ts +0 -13
  283. package/dist/components/micro/tabs.d.ts.map +0 -1
  284. package/dist/components/micro/textarea.d.ts +0 -24
  285. package/dist/components/micro/textarea.d.ts.map +0 -1
  286. package/dist/components/micro/theme-provider.d.ts +0 -76
  287. package/dist/components/micro/theme-provider.d.ts.map +0 -1
  288. package/dist/components/micro/toggle-group.d.ts +0 -22
  289. package/dist/components/micro/toggle-group.d.ts.map +0 -1
  290. package/dist/components/micro/toggle.d.ts +0 -16
  291. package/dist/components/micro/toggle.d.ts.map +0 -1
  292. package/dist/components/micro/tooltip.d.ts +0 -21
  293. package/dist/components/micro/tooltip.d.ts.map +0 -1
  294. package/dist/dev/App.d.ts +0 -3
  295. package/dist/dev/App.d.ts.map +0 -1
  296. package/dist/dev/components/GladvnLogo.d.ts +0 -10
  297. package/dist/dev/components/GladvnLogo.d.ts.map +0 -1
  298. package/dist/dev/components/code-highlighter.d.ts +0 -5
  299. package/dist/dev/components/code-highlighter.d.ts.map +0 -1
  300. package/dist/dev/components/dev-context.d.ts +0 -12
  301. package/dist/dev/components/dev-context.d.ts.map +0 -1
  302. package/dist/dev/components/showcase.d.ts +0 -72
  303. package/dist/dev/components/showcase.d.ts.map +0 -1
  304. package/dist/dev/data.d.ts +0 -68
  305. package/dist/dev/data.d.ts.map +0 -1
  306. package/dist/dev/main.d.ts +0 -1
  307. package/dist/dev/main.d.ts.map +0 -1
  308. package/dist/dev/sections/buttons.d.ts +0 -2
  309. package/dist/dev/sections/buttons.d.ts.map +0 -1
  310. package/dist/dev/sections/display.d.ts +0 -2
  311. package/dist/dev/sections/display.d.ts.map +0 -1
  312. package/dist/dev/sections/feedback.d.ts +0 -2
  313. package/dist/dev/sections/feedback.d.ts.map +0 -1
  314. package/dist/dev/sections/forms.d.ts +0 -2
  315. package/dist/dev/sections/forms.d.ts.map +0 -1
  316. package/dist/dev/sections/interactive.d.ts +0 -2
  317. package/dist/dev/sections/interactive.d.ts.map +0 -1
  318. package/dist/dev/sections/overview.d.ts +0 -2
  319. package/dist/dev/sections/overview.d.ts.map +0 -1
  320. package/dist/dev/showcase/accordion.d.ts +0 -2
  321. package/dist/dev/showcase/accordion.d.ts.map +0 -1
  322. package/dist/dev/showcase/alert-dialog.d.ts +0 -2
  323. package/dist/dev/showcase/alert-dialog.d.ts.map +0 -1
  324. package/dist/dev/showcase/alert.d.ts +0 -2
  325. package/dist/dev/showcase/alert.d.ts.map +0 -1
  326. package/dist/dev/showcase/aspect-ratio.d.ts +0 -2
  327. package/dist/dev/showcase/aspect-ratio.d.ts.map +0 -1
  328. package/dist/dev/showcase/avatar.d.ts +0 -2
  329. package/dist/dev/showcase/avatar.d.ts.map +0 -1
  330. package/dist/dev/showcase/badge.d.ts +0 -2
  331. package/dist/dev/showcase/badge.d.ts.map +0 -1
  332. package/dist/dev/showcase/breadcrumb.d.ts +0 -2
  333. package/dist/dev/showcase/breadcrumb.d.ts.map +0 -1
  334. package/dist/dev/showcase/button.d.ts +0 -2
  335. package/dist/dev/showcase/button.d.ts.map +0 -1
  336. package/dist/dev/showcase/calendar.d.ts +0 -2
  337. package/dist/dev/showcase/calendar.d.ts.map +0 -1
  338. package/dist/dev/showcase/card.d.ts +0 -2
  339. package/dist/dev/showcase/card.d.ts.map +0 -1
  340. package/dist/dev/showcase/carousel.d.ts +0 -2
  341. package/dist/dev/showcase/carousel.d.ts.map +0 -1
  342. package/dist/dev/showcase/chart.d.ts +0 -2
  343. package/dist/dev/showcase/chart.d.ts.map +0 -1
  344. package/dist/dev/showcase/checkbox.d.ts +0 -2
  345. package/dist/dev/showcase/checkbox.d.ts.map +0 -1
  346. package/dist/dev/showcase/collapsible.d.ts +0 -3
  347. package/dist/dev/showcase/collapsible.d.ts.map +0 -1
  348. package/dist/dev/showcase/combobox.d.ts +0 -2
  349. package/dist/dev/showcase/combobox.d.ts.map +0 -1
  350. package/dist/dev/showcase/command.d.ts +0 -2
  351. package/dist/dev/showcase/command.d.ts.map +0 -1
  352. package/dist/dev/showcase/context-menu.d.ts +0 -2
  353. package/dist/dev/showcase/context-menu.d.ts.map +0 -1
  354. package/dist/dev/showcase/dialog.d.ts +0 -2
  355. package/dist/dev/showcase/dialog.d.ts.map +0 -1
  356. package/dist/dev/showcase/drawer.d.ts +0 -2
  357. package/dist/dev/showcase/drawer.d.ts.map +0 -1
  358. package/dist/dev/showcase/dropdown-menu.d.ts +0 -2
  359. package/dist/dev/showcase/dropdown-menu.d.ts.map +0 -1
  360. package/dist/dev/showcase/empty.d.ts +0 -2
  361. package/dist/dev/showcase/empty.d.ts.map +0 -1
  362. package/dist/dev/showcase/hover-card.d.ts +0 -2
  363. package/dist/dev/showcase/hover-card.d.ts.map +0 -1
  364. package/dist/dev/showcase/input-group.d.ts +0 -2
  365. package/dist/dev/showcase/input-group.d.ts.map +0 -1
  366. package/dist/dev/showcase/input-otp.d.ts +0 -2
  367. package/dist/dev/showcase/input-otp.d.ts.map +0 -1
  368. package/dist/dev/showcase/input.d.ts +0 -2
  369. package/dist/dev/showcase/input.d.ts.map +0 -1
  370. package/dist/dev/showcase/item.d.ts +0 -2
  371. package/dist/dev/showcase/item.d.ts.map +0 -1
  372. package/dist/dev/showcase/kbd.d.ts +0 -2
  373. package/dist/dev/showcase/kbd.d.ts.map +0 -1
  374. package/dist/dev/showcase/label.d.ts +0 -2
  375. package/dist/dev/showcase/label.d.ts.map +0 -1
  376. package/dist/dev/showcase/menubar.d.ts +0 -2
  377. package/dist/dev/showcase/menubar.d.ts.map +0 -1
  378. package/dist/dev/showcase/navigation-menu.d.ts +0 -3
  379. package/dist/dev/showcase/navigation-menu.d.ts.map +0 -1
  380. package/dist/dev/showcase/overview.d.ts +0 -2
  381. package/dist/dev/showcase/overview.d.ts.map +0 -1
  382. package/dist/dev/showcase/pagination.d.ts +0 -2
  383. package/dist/dev/showcase/pagination.d.ts.map +0 -1
  384. package/dist/dev/showcase/popover.d.ts +0 -2
  385. package/dist/dev/showcase/popover.d.ts.map +0 -1
  386. package/dist/dev/showcase/progress.d.ts +0 -2
  387. package/dist/dev/showcase/progress.d.ts.map +0 -1
  388. package/dist/dev/showcase/radio-group.d.ts +0 -2
  389. package/dist/dev/showcase/radio-group.d.ts.map +0 -1
  390. package/dist/dev/showcase/resizable.d.ts +0 -2
  391. package/dist/dev/showcase/resizable.d.ts.map +0 -1
  392. package/dist/dev/showcase/scroll-area.d.ts +0 -2
  393. package/dist/dev/showcase/scroll-area.d.ts.map +0 -1
  394. package/dist/dev/showcase/select.d.ts +0 -2
  395. package/dist/dev/showcase/select.d.ts.map +0 -1
  396. package/dist/dev/showcase/separator.d.ts +0 -2
  397. package/dist/dev/showcase/separator.d.ts.map +0 -1
  398. package/dist/dev/showcase/sheet.d.ts +0 -2
  399. package/dist/dev/showcase/sheet.d.ts.map +0 -1
  400. package/dist/dev/showcase/sidebar.d.ts +0 -2
  401. package/dist/dev/showcase/sidebar.d.ts.map +0 -1
  402. package/dist/dev/showcase/skeleton.d.ts +0 -2
  403. package/dist/dev/showcase/skeleton.d.ts.map +0 -1
  404. package/dist/dev/showcase/slider.d.ts +0 -2
  405. package/dist/dev/showcase/slider.d.ts.map +0 -1
  406. package/dist/dev/showcase/sonner.d.ts +0 -2
  407. package/dist/dev/showcase/sonner.d.ts.map +0 -1
  408. package/dist/dev/showcase/spinner.d.ts +0 -2
  409. package/dist/dev/showcase/spinner.d.ts.map +0 -1
  410. package/dist/dev/showcase/switch.d.ts +0 -2
  411. package/dist/dev/showcase/switch.d.ts.map +0 -1
  412. package/dist/dev/showcase/table.d.ts +0 -2
  413. package/dist/dev/showcase/table.d.ts.map +0 -1
  414. package/dist/dev/showcase/tabs.d.ts +0 -2
  415. package/dist/dev/showcase/tabs.d.ts.map +0 -1
  416. package/dist/dev/showcase/textarea.d.ts +0 -2
  417. package/dist/dev/showcase/textarea.d.ts.map +0 -1
  418. package/dist/dev/showcase/toast.d.ts +0 -2
  419. package/dist/dev/showcase/toast.d.ts.map +0 -1
  420. package/dist/dev/showcase/toggle-group.d.ts +0 -2
  421. package/dist/dev/showcase/toggle-group.d.ts.map +0 -1
  422. package/dist/dev/showcase/toggle.d.ts +0 -2
  423. package/dist/dev/showcase/toggle.d.ts.map +0 -1
  424. package/dist/dev/showcase/tooltip.d.ts +0 -2
  425. package/dist/dev/showcase/tooltip.d.ts.map +0 -1
  426. package/dist/hooks/use-controllable-state.d.ts +0 -14
  427. package/dist/hooks/use-controllable-state.d.ts.map +0 -1
  428. package/dist/hooks/use-mobile.d.ts +0 -2
  429. package/dist/hooks/use-mobile.d.ts.map +0 -1
  430. package/dist/index.cjs +0 -5099
  431. package/dist/index.cjs.map +0 -1
  432. package/dist/index.d.ts +0 -58
  433. package/dist/index.d.ts.map +0 -1
  434. package/dist/index.js +0 -4753
  435. package/dist/index.js.map +0 -1
  436. package/dist/lib/types.d.ts +0 -4
  437. package/dist/lib/types.d.ts.map +0 -1
  438. package/dist/lib/utils.d.ts +0 -3
  439. package/dist/lib/utils.d.ts.map +0 -1
  440. package/dist/preset.d.ts +0 -18
  441. package/dist/preset.d.ts.map +0 -1
  442. package/dist/test/setup.d.ts +0 -1
  443. package/dist/test/setup.d.ts.map +0 -1
  444. package/scripts/add-icononly-prop.ts +0 -84
  445. package/scripts/audit-best-practices.ts +0 -114
  446. package/scripts/audit-showcase.ts +0 -262
  447. package/scripts/audit-showcases.ts +0 -83
  448. package/scripts/clean-imports.ts +0 -21
  449. package/scripts/count_missing.ts +0 -24
  450. package/scripts/find-css-vars.ts +0 -62
  451. package/scripts/fix-portals.ts +0 -90
  452. package/scripts/format-codestrings.ts +0 -87
  453. package/scripts/full-audit.ts +0 -89
  454. package/scripts/merge-components.cjs +0 -65
  455. package/scripts/merge-components.js +0 -64
  456. package/scripts/optimize-barrel.ts +0 -116
  457. package/scripts/organize-imports.ts +0 -21
  458. package/scripts/refactor_divs.ts +0 -39
  459. package/scripts/regex-format.cjs +0 -67
  460. package/scripts/remove_div_wrappers.ts +0 -17
  461. package/scripts/tmp.tsx +0 -25
  462. package/scripts/update-gaps.ts +0 -83
  463. package/scripts/update_showcase_codestrings.ts +0 -87
package/dist/index.js DELETED
@@ -1,4753 +0,0 @@
1
- import { clsx } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
- import * as React from "react";
4
- import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
5
- import { AlertCircleIcon, CheckIcon, ChevronDown, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUp, ChevronUpIcon, CircleCheckIcon, CircleIcon, InfoIcon, Loader2Icon, MoreHorizontalIcon, OctagonXIcon, SearchIcon, TriangleAlertIcon, XIcon } from "lucide-react";
6
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
- import { mergeProps } from "@base-ui/react/merge-props";
8
- import { useRender } from "@base-ui/react/use-render";
9
- import { cva } from "class-variance-authority";
10
- import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
11
- import { Button as Button$1 } from "@base-ui/react/button";
12
- import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
13
- import { DayPicker, getDefaultClassNames } from "react-day-picker";
14
- import { Select as Select$1 } from "@base-ui/react/select";
15
- import useEmblaCarousel from "embla-carousel-react";
16
- import * as RechartsPrimitive from "recharts";
17
- import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
18
- import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
19
- import { Combobox as Combobox$1 } from "@base-ui/react";
20
- import { Command as Command$1 } from "cmdk";
21
- import { ContextMenu as ContextMenu$1 } from "@base-ui/react/context-menu";
22
- import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
23
- import { DirectionProvider, useDirection } from "@base-ui/react/direction-provider";
24
- import { Drawer as Drawer$1 } from "vaul";
25
- import { Menu } from "@base-ui/react/menu";
26
- import { Separator as Separator$1 } from "@base-ui/react/separator";
27
- import { PreviewCard } from "@base-ui/react/preview-card";
28
- import { Input as Input$1 } from "@base-ui/react/input";
29
- import { OTPInput, OTPInputContext } from "input-otp";
30
- import { Menubar as Menubar$1 } from "@base-ui/react/menubar";
31
- import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
32
- import { Popover as Popover$1 } from "@base-ui/react/popover";
33
- import { Progress as Progress$1 } from "@base-ui/react/progress";
34
- import { Radio } from "@base-ui/react/radio";
35
- import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
36
- import * as ResizablePrimitive from "react-resizable-panels";
37
- import { ScrollArea as ScrollArea$1 } from "@base-ui/react/scroll-area";
38
- import { Slider as Slider$1 } from "@base-ui/react/slider";
39
- import { Toaster as Toaster$1 } from "sonner";
40
- import { Switch as Switch$1 } from "@base-ui/react/switch";
41
- import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
42
- import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
43
- import { ToggleGroup as ToggleGroup$1 } from "@base-ui/react/toggle-group";
44
- import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
45
- //#region src/lib/utils.ts
46
- function cn(...inputs) {
47
- return twMerge(clsx(inputs));
48
- }
49
- //#endregion
50
- //#region src/hooks/use-mobile.ts
51
- var MOBILE_BREAKPOINT = 768;
52
- function useIsMobile() {
53
- const [isMobile, setIsMobile] = React.useState(void 0);
54
- React.useEffect(() => {
55
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
56
- const onChange = () => {
57
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
58
- };
59
- mql.addEventListener("change", onChange);
60
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
61
- return () => mql.removeEventListener("change", onChange);
62
- }, []);
63
- return !!isMobile;
64
- }
65
- //#endregion
66
- //#region src/components/micro/accordion.tsx
67
- /**
68
- * ✅ AUDITED & REFACTORED
69
- * - Design System Compliant (20 Commandments)
70
- * - WCAG AAA/AA
71
- * - Form Control Parity
72
- * - CSS Delegated Logic
73
- */
74
- var Accordion = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Accordion$1.Root, {
75
- ref,
76
- "data-slot": "accordion",
77
- className: cn("flex flex-col", className),
78
- ...props
79
- }));
80
- Accordion.displayName = "Accordion";
81
- var AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Accordion$1.Item, {
82
- ref,
83
- "data-slot": "accordion-item",
84
- className: cn("not-last:border-b not-last:border-border", className),
85
- ...props
86
- }));
87
- AccordionItem.displayName = "AccordionItem";
88
- var AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(Accordion$1.Header, {
89
- className: cn("flex", className),
90
- children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, {
91
- ref,
92
- "data-slot": "accordion-trigger",
93
- className: "group/accordion-trigger relative flex flex-1 items-start justify-between gap-4 rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-colors outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50",
94
- ...props,
95
- children: [children, /* @__PURE__ */ jsx(ChevronDownIcon, {
96
- "data-slot": "accordion-trigger-icon",
97
- className: "size-4 text-muted-foreground pointer-events-none shrink-0 transition-[rotate] duration-200 group-data-panel-open/accordion-trigger:rotate-180"
98
- })]
99
- })
100
- }));
101
- AccordionTrigger.displayName = "AccordionTrigger";
102
- var AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(Accordion$1.Panel, {
103
- ref,
104
- "data-slot": "accordion-content",
105
- className: "overflow-hidden text-sm h-(--accordion-panel-height) transition-[height] duration-200 ease-out data-starting-style:h-0 data-ending-style:h-0",
106
- ...props,
107
- children: /* @__PURE__ */ jsx("div", {
108
- className: cn("pb-4 pt-0", className),
109
- children
110
- })
111
- }));
112
- AccordionContent.displayName = "AccordionContent";
113
- //#endregion
114
- //#region src/components/micro/alert.tsx
115
- /**
116
- * ✅ AUDITED & REFACTORED
117
- * - Design System Compliant (22 Commandments)
118
- * - WCAG AAA/AA
119
- * - Form Control Parity
120
- * - CSS Delegated Logic
121
- */
122
- var alertVariants = cva("group/alert relative rounded-lg border border-border text-left bg-card text-card-foreground", { variants: {
123
- color: {
124
- info: "border-info/15 bg-info/5 text-info",
125
- destructive: "border-destructive/15 bg-destructive/5 text-destructive",
126
- success: "border-success/15 bg-success/5 text-success",
127
- warning: "border-warning/15 bg-warning/5 text-warning"
128
- },
129
- size: {
130
- sm: "px-2 py-1.5 text-xs gap-x-1.5",
131
- md: "px-2.5 py-2 text-sm gap-x-2",
132
- lg: "px-3 py-2.5 text-base gap-x-2.5"
133
- }
134
- } });
135
- var Alert = React.forwardRef(function Alert({ className, color = "info", size = "md", ...props }, ref) {
136
- return /* @__PURE__ */ jsx("div", {
137
- ref,
138
- "data-slot": "alert",
139
- "data-size": size,
140
- "data-color": color,
141
- role: "alert",
142
- className: cn(alertVariants({
143
- color,
144
- size
145
- }), className),
146
- ...props
147
- });
148
- });
149
- Alert.displayName = "Alert";
150
- var AlertTitle = React.forwardRef(function AlertTitle({ className, ...props }, ref) {
151
- return /* @__PURE__ */ jsx("div", {
152
- ref,
153
- "data-slot": "alert-title",
154
- className: cn("font-medium", className),
155
- ...props
156
- });
157
- });
158
- AlertTitle.displayName = "AlertTitle";
159
- var AlertDescription = React.forwardRef(function AlertDescription({ className, ...props }, ref) {
160
- return /* @__PURE__ */ jsx("div", {
161
- ref,
162
- "data-slot": "alert-description",
163
- className: cn("text-balance text-muted-foreground md:text-pretty leading-relaxed", "group-data-[color=info]/alert:text-info/90", "group-data-[color=destructive]/alert:text-destructive/90", "group-data-[color=success]/alert:text-success/90", "group-data-[color=warning]/alert:text-warning/90", className),
164
- ...props
165
- });
166
- });
167
- AlertDescription.displayName = "AlertDescription";
168
- var AlertAction = React.forwardRef(function AlertAction({ className, ...props }, ref) {
169
- return /* @__PURE__ */ jsx("div", {
170
- ref,
171
- "data-slot": "alert-action",
172
- className: cn(className),
173
- ...props
174
- });
175
- });
176
- AlertAction.displayName = "AlertAction";
177
- var AlertIcon = React.forwardRef(function AlertIcon({ className, render, ...props }, ref) {
178
- return useRender({
179
- render,
180
- defaultTagName: "div",
181
- props: mergeProps({
182
- ref,
183
- className: cn("text-current", "size-4 group-data-[size=sm]/alert:size-3.5 group-data-[size=lg]/alert:size-5", className),
184
- "data-slot": "alert-icon"
185
- }, props)
186
- });
187
- });
188
- AlertIcon.displayName = "AlertIcon";
189
- //#endregion
190
- //#region src/components/micro/button.tsx
191
- /**
192
- * ✅ AUDITED & REFACTORED
193
- * - Design System Compliant (20 Commandments)
194
- * - WCAG AAA/AA
195
- * - Form Control Parity
196
- * - CSS Delegated Logic
197
- */
198
- /**
199
- * variant = visual style (HOW it looks)
200
- * solid → filled background (opaque)
201
- * outline → border only, transparent bg
202
- * ghost → no border, transparent bg
203
- * soft → low-opacity tinted background
204
- * link → looks like a hyperlink
205
- *
206
- * color = semantic color token (WHAT it means)
207
- * primary → primary action
208
- * secondary → alternative / neutral
209
- * destructive → danger / delete
210
- * warning → caution
211
- * success → confirm / done
212
- * info → information
213
- * tertiary → extra / beta
214
- */
215
- var buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-border text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:ring-3 focus-visible:ring-offset-1 focus-visible:ring-offset-background active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:ring-3 aria-invalid:focus-visible:ring-destructive/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:focus-visible:ring-destructive/50 data-[icon=true]:aspect-square data-[icon=true]:px-0", {
216
- variants: {
217
- variant: {
218
- solid: "border-transparent",
219
- outline: "bg-transparent",
220
- ghost: "border-transparent bg-transparent",
221
- soft: "border-transparent",
222
- link: "border-transparent bg-transparent underline-offset-4 hover:underline"
223
- },
224
- color: {
225
- primary: "",
226
- secondary: "",
227
- destructive: "",
228
- warning: "",
229
- success: "",
230
- info: "",
231
- tertiary: "",
232
- muted: "",
233
- accent: ""
234
- },
235
- size: {
236
- sm: "h-7 gap-1 px-3 text-xs",
237
- md: "h-8 gap-1.5 px-3.5",
238
- lg: "h-9 gap-2 px-4"
239
- }
240
- },
241
- compoundVariants: [
242
- {
243
- variant: "solid",
244
- color: "primary",
245
- className: "bg-primary text-primary-foreground hover:bg-primary/85"
246
- },
247
- {
248
- variant: "solid",
249
- color: "secondary",
250
- className: "bg-secondary text-secondary-foreground hover:bg-secondary/85"
251
- },
252
- {
253
- variant: "solid",
254
- color: "destructive",
255
- className: "bg-destructive text-destructive-foreground hover:bg-destructive/85"
256
- },
257
- {
258
- variant: "solid",
259
- color: "warning",
260
- className: "bg-warning text-warning-foreground hover:bg-warning/85"
261
- },
262
- {
263
- variant: "solid",
264
- color: "success",
265
- className: "bg-success text-success-foreground hover:bg-success/85"
266
- },
267
- {
268
- variant: "solid",
269
- color: "info",
270
- className: "bg-info text-info-foreground hover:bg-info/85"
271
- },
272
- {
273
- variant: "solid",
274
- color: "tertiary",
275
- className: "bg-tertiary text-tertiary-foreground hover:bg-tertiary/85"
276
- },
277
- {
278
- variant: "solid",
279
- color: "muted",
280
- className: "bg-muted text-muted-foreground hover:bg-muted/85"
281
- },
282
- {
283
- variant: "solid",
284
- color: "accent",
285
- className: "bg-accent text-accent-foreground hover:bg-accent/85"
286
- },
287
- {
288
- variant: "outline",
289
- color: "primary",
290
- className: "border-primary text-primary hover:bg-primary/10"
291
- },
292
- {
293
- variant: "outline",
294
- color: "secondary",
295
- className: "border-secondary text-secondary hover:bg-secondary/10"
296
- },
297
- {
298
- variant: "outline",
299
- color: "destructive",
300
- className: "border-destructive text-destructive hover:bg-destructive/10"
301
- },
302
- {
303
- variant: "outline",
304
- color: "warning",
305
- className: "border-warning text-warning hover:bg-warning/10"
306
- },
307
- {
308
- variant: "outline",
309
- color: "success",
310
- className: "border-success text-success hover:bg-success/10"
311
- },
312
- {
313
- variant: "outline",
314
- color: "info",
315
- className: "border-info text-info hover:bg-info/10"
316
- },
317
- {
318
- variant: "outline",
319
- color: "tertiary",
320
- className: "border-tertiary text-tertiary hover:bg-tertiary/10"
321
- },
322
- {
323
- variant: "outline",
324
- color: "muted",
325
- className: "border-muted text-muted-foreground hover:bg-muted/10"
326
- },
327
- {
328
- variant: "outline",
329
- color: "accent",
330
- className: "border-accent text-accent-foreground hover:bg-accent/10"
331
- },
332
- {
333
- variant: "soft",
334
- color: "primary",
335
- className: "bg-primary/15 text-primary hover:bg-primary/25"
336
- },
337
- {
338
- variant: "soft",
339
- color: "secondary",
340
- className: "bg-secondary/15 text-secondary hover:bg-secondary/25"
341
- },
342
- {
343
- variant: "soft",
344
- color: "destructive",
345
- className: "bg-destructive/15 text-destructive hover:bg-destructive/25"
346
- },
347
- {
348
- variant: "soft",
349
- color: "warning",
350
- className: "bg-warning/15 text-warning hover:bg-warning/25"
351
- },
352
- {
353
- variant: "soft",
354
- color: "success",
355
- className: "bg-success/15 text-success hover:bg-success/25"
356
- },
357
- {
358
- variant: "soft",
359
- color: "info",
360
- className: "bg-info/15 text-info hover:bg-info/25"
361
- },
362
- {
363
- variant: "soft",
364
- color: "tertiary",
365
- className: "bg-tertiary/15 text-tertiary hover:bg-tertiary/25"
366
- },
367
- {
368
- variant: "soft",
369
- color: "muted",
370
- className: "bg-muted/50 text-muted-foreground hover:bg-muted/80"
371
- },
372
- {
373
- variant: "soft",
374
- color: "accent",
375
- className: "bg-accent/50 text-accent-foreground hover:bg-accent/80"
376
- },
377
- {
378
- variant: "ghost",
379
- color: "primary",
380
- className: "text-primary hover:bg-primary/10"
381
- },
382
- {
383
- variant: "ghost",
384
- color: "secondary",
385
- className: "text-secondary hover:bg-secondary/10"
386
- },
387
- {
388
- variant: "ghost",
389
- color: "destructive",
390
- className: "text-destructive hover:bg-destructive/10"
391
- },
392
- {
393
- variant: "ghost",
394
- color: "warning",
395
- className: "text-warning hover:bg-warning/10"
396
- },
397
- {
398
- variant: "ghost",
399
- color: "success",
400
- className: "text-success hover:bg-success/10"
401
- },
402
- {
403
- variant: "ghost",
404
- color: "info",
405
- className: "text-info hover:bg-info/10"
406
- },
407
- {
408
- variant: "ghost",
409
- color: "tertiary",
410
- className: "text-tertiary hover:bg-tertiary/10"
411
- },
412
- {
413
- variant: "ghost",
414
- color: "muted",
415
- className: "text-muted-foreground hover:bg-muted/10"
416
- },
417
- {
418
- variant: "ghost",
419
- color: "accent",
420
- className: "text-accent-foreground hover:bg-accent/10"
421
- },
422
- {
423
- variant: "link",
424
- color: "primary",
425
- className: "text-primary"
426
- },
427
- {
428
- variant: "link",
429
- color: "secondary",
430
- className: "text-secondary"
431
- },
432
- {
433
- variant: "link",
434
- color: "destructive",
435
- className: "text-destructive"
436
- },
437
- {
438
- variant: "link",
439
- color: "warning",
440
- className: "text-warning"
441
- },
442
- {
443
- variant: "link",
444
- color: "success",
445
- className: "text-success"
446
- },
447
- {
448
- variant: "link",
449
- color: "info",
450
- className: "text-info"
451
- },
452
- {
453
- variant: "link",
454
- color: "tertiary",
455
- className: "text-tertiary"
456
- },
457
- {
458
- variant: "link",
459
- color: "muted",
460
- className: "text-muted-foreground"
461
- },
462
- {
463
- variant: "link",
464
- color: "accent",
465
- className: "text-accent-foreground"
466
- },
467
- {
468
- color: "primary",
469
- className: "focus-visible:ring-primary/50"
470
- },
471
- {
472
- color: "secondary",
473
- className: "focus-visible:ring-secondary/50"
474
- },
475
- {
476
- color: "destructive",
477
- className: "focus-visible:ring-destructive/50"
478
- },
479
- {
480
- color: "warning",
481
- className: "focus-visible:ring-warning/50"
482
- },
483
- {
484
- color: "success",
485
- className: "focus-visible:ring-success/50"
486
- },
487
- {
488
- color: "info",
489
- className: "focus-visible:ring-info/50"
490
- },
491
- {
492
- color: "tertiary",
493
- className: "focus-visible:ring-tertiary/50"
494
- },
495
- {
496
- color: "muted",
497
- className: "focus-visible:ring-muted/50"
498
- },
499
- {
500
- color: "accent",
501
- className: "focus-visible:ring-accent/50"
502
- }
503
- ]
504
- });
505
- var Button = React.forwardRef(({ className, variant = "solid", color = "primary", size = "md", iconOnly, children, ...props }, ref) => {
506
- return /* @__PURE__ */ jsx(Button$1, {
507
- ref,
508
- "data-slot": "button",
509
- "data-color": color,
510
- "data-variant": variant,
511
- ...iconOnly && { "data-icon": "true" },
512
- className: cn(buttonVariants({
513
- variant,
514
- color,
515
- size,
516
- className
517
- })),
518
- ...props,
519
- children
520
- });
521
- });
522
- Button.displayName = "Button";
523
- var ButtonIcon = React.forwardRef(function ButtonIcon({ className, render, ...props }, ref) {
524
- return useRender({
525
- render,
526
- defaultTagName: "span",
527
- props: mergeProps({
528
- ref,
529
- className: cn("inline-flex items-center justify-center shrink-0 transition-transform", "size-4 group-data-[size=sm]/button:size-3.5 group-data-[size=lg]/button:size-5", "[&>svg]:size-full [&>svg]:pointer-events-none", className),
530
- "data-slot": "button-icon"
531
- }, props)
532
- });
533
- });
534
- ButtonIcon.displayName = "ButtonIcon";
535
- //#endregion
536
- //#region src/components/micro/theme-provider.tsx
537
- /**
538
- * ThemeProvider — Micro primitive.
539
- *
540
- * Supports both **uncontrolled** and **controlled** modes:
541
- *
542
- * - **Uncontrolled**: pass `defaultMode` (optional). Internal state manages
543
- * the current mode. Children call `setMode()` via `useTheme()`.
544
- * - **Controlled**: pass `mode` + `onModeChange`. The caller owns the state;
545
- * `setMode()` inside the context delegates to `onModeChange`.
546
- *
547
- * Does NOT read localStorage, system preference, or sync to <html>.
548
- * All of that belongs to Macro layer (e.g. a ThemeManager preset).
549
- */
550
- var ThemeContext = React.createContext(void 0);
551
- /**
552
- * Read and control the nearest ThemeProvider.
553
- * Returns `undefined` when no provider is found in the tree.
554
- *
555
- * @example
556
- * ```tsx
557
- * const theme = useTheme();
558
- * theme?.setMode("dark");
559
- * console.log(theme?.mode); // "light" | "dark"
560
- * ```
561
- */
562
- function useTheme() {
563
- return React.useContext(ThemeContext);
564
- }
565
- /**
566
- * ThemeProvider — wraps children in a `display: contents` div with the
567
- * `.dark` or `.light` class applied, enabling CSS variable cascade without
568
- * affecting layout.
569
- *
570
- * @example Uncontrolled
571
- * ```tsx
572
- * <ThemeProvider defaultMode="dark">
573
- * <App />
574
- * </ThemeProvider>
575
- * ```
576
- *
577
- * @example Controlled
578
- * ```tsx
579
- * const [mode, setMode] = useState<ThemeMode>("light");
580
- *
581
- * <ThemeProvider mode={mode} onModeChange={setMode}>
582
- * <App />
583
- * </ThemeProvider>
584
- * ```
585
- */
586
- function ThemeProvider({ children, defaultMode, mode: controlledMode, onModeChange }) {
587
- const isControlled = controlledMode !== void 0;
588
- const [internalMode, setInternalMode] = React.useState(defaultMode ?? "light");
589
- const mode = isControlled ? controlledMode : internalMode;
590
- const setMode = React.useCallback((next) => {
591
- if (isControlled) onModeChange(next);
592
- else setInternalMode(next);
593
- }, [isControlled, onModeChange]);
594
- const value = React.useMemo(() => ({
595
- mode,
596
- setMode
597
- }), [mode, setMode]);
598
- return /* @__PURE__ */ jsx(ThemeContext.Provider, {
599
- value,
600
- children: /* @__PURE__ */ jsx("div", {
601
- className: mode,
602
- style: { display: "contents" },
603
- children
604
- })
605
- });
606
- }
607
- ThemeProvider.displayName = "ThemeProvider";
608
- /**
609
- * ThemeWrapper — re-applies the current theme class inside a Portal.
610
- * Used internally by Dialog, Tooltip, Popover, etc. to tunnel the theme
611
- * across the Portal boundary.
612
- *
613
- * Falls back gracefully (renders children as-is) when no ThemeProvider
614
- * is found in the tree.
615
- */
616
- function ThemeWrapper({ children }) {
617
- const theme = useTheme();
618
- if (!theme) return /* @__PURE__ */ jsx(Fragment, { children });
619
- return /* @__PURE__ */ jsx("div", {
620
- className: theme.mode,
621
- style: { display: "contents" },
622
- children
623
- });
624
- }
625
- ThemeWrapper.displayName = "ThemeWrapper";
626
- //#endregion
627
- //#region src/components/micro/alert-dialog.tsx
628
- /**
629
- * @description A modal dialog that interrupts the user with important content and expects a response.
630
- * @requires AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter
631
- * @example
632
- * <AlertDialog>
633
- * <AlertDialogTrigger>Open</AlertDialogTrigger>
634
- * <AlertDialogContent>
635
- * <AlertDialogHeader><AlertDialogTitle>Are you sure?</AlertDialogTitle></AlertDialogHeader>
636
- * <AlertDialogFooter><AlertDialogCancel>Cancel</AlertDialogCancel><AlertDialogAction>Continue</AlertDialogAction></AlertDialogFooter>
637
- * </AlertDialogContent>
638
- * </AlertDialog>
639
- */
640
- function AlertDialog({ ...props }) {
641
- return /* @__PURE__ */ jsx(AlertDialog$1.Root, {
642
- "data-slot": "alert-dialog",
643
- ...props
644
- });
645
- }
646
- function AlertDialogTrigger({ ...props }) {
647
- return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, {
648
- "data-slot": "alert-dialog-trigger",
649
- ...props
650
- });
651
- }
652
- function AlertDialogClose({ ...props }) {
653
- return /* @__PURE__ */ jsx(AlertDialog$1.Close, {
654
- "data-slot": "alert-dialog-close",
655
- ...props
656
- });
657
- }
658
- function AlertDialogOverlay({ className, ...props }) {
659
- return /* @__PURE__ */ jsx(AlertDialog$1.Backdrop, {
660
- "data-slot": "alert-dialog-overlay",
661
- className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
662
- ...props
663
- });
664
- }
665
- var AlertDialogContent = React.forwardRef(({ className, container, size = "md", ...props }, ref) => /* @__PURE__ */ jsx(AlertDialog$1.Portal, {
666
- container,
667
- children: /* @__PURE__ */ jsxs(ThemeWrapper, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Popup, {
668
- ref,
669
- "data-slot": "alert-dialog-content",
670
- "data-size": size,
671
- className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none", "data-[size=sm]:max-w-xs", "data-[size=md]:max-w-xs data-[size=md]:sm:max-w-sm", "data-[size=lg]:max-w-sm data-[size=lg]:sm:max-w-md", "data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
672
- ...props
673
- })] })
674
- }));
675
- AlertDialogContent.displayName = "AlertDialogContent";
676
- function AlertDialogHeader({ className, ...props }) {
677
- return /* @__PURE__ */ jsx("div", {
678
- "data-slot": "alert-dialog-header",
679
- className: cn("flex flex-col gap-2 text-center sm:text-left", className),
680
- ...props
681
- });
682
- }
683
- function AlertDialogFooter({ className, ...props }) {
684
- return /* @__PURE__ */ jsx("div", {
685
- "data-slot": "alert-dialog-footer",
686
- className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t border-t-border bg-muted/50 p-4 sm:flex-row sm:justify-end", className),
687
- ...props
688
- });
689
- }
690
- function AlertDialogMedia({ className, ...props }) {
691
- return /* @__PURE__ */ jsx("div", {
692
- "data-slot": "alert-dialog-media",
693
- className: cn("inline-flex size-10 items-center justify-center [&>svg:not([class*='size-'])]:size-6", "group-data-[size=lg]/alert-dialog-content:size-12", className),
694
- ...props
695
- });
696
- }
697
- function AlertDialogTitle({ className, ...props }) {
698
- return /* @__PURE__ */ jsx(AlertDialog$1.Title, {
699
- "data-slot": "alert-dialog-title",
700
- className: cn("font-heading text-base font-medium", "group-data-[size=lg]/alert-dialog-content:text-lg", className),
701
- ...props
702
- });
703
- }
704
- function AlertDialogDescription({ className, ...props }) {
705
- return /* @__PURE__ */ jsx(AlertDialog$1.Description, {
706
- "data-slot": "alert-dialog-description",
707
- className: cn("text-sm text-balance text-muted-foreground md:text-pretty [&_p]:leading-relaxed", "group-data-[size=lg]/alert-dialog-content:text-base", className),
708
- ...props
709
- });
710
- }
711
- function AlertDialogAction({ className, variant, color, size = "md", ...props }) {
712
- return /* @__PURE__ */ jsx(AlertDialog$1.Close, {
713
- "data-slot": "alert-dialog-action",
714
- className: cn(className),
715
- render: /* @__PURE__ */ jsx(Button, {
716
- variant,
717
- color,
718
- size
719
- }),
720
- ...props
721
- });
722
- }
723
- function AlertDialogCancel({ className, variant = "outline", color, size = "md", ...props }) {
724
- return /* @__PURE__ */ jsx(AlertDialog$1.Close, {
725
- "data-slot": "alert-dialog-cancel",
726
- className: cn(className),
727
- render: /* @__PURE__ */ jsx(Button, {
728
- variant,
729
- color,
730
- size
731
- }),
732
- ...props
733
- });
734
- }
735
- //#endregion
736
- //#region src/components/micro/aspect-ratio.tsx
737
- /**
738
- * ✅ AUDITED & REFACTORED
739
- * - Design System Compliant (22 Commandments)
740
- * - WCAG AAA/AA
741
- * - Form Control Parity
742
- * - CSS Delegated Logic
743
- */
744
- /**
745
- * @description Displays content within a desired ratio.
746
- * @example
747
- * <AspectRatio ratio={16 / 9}>
748
- * <img src="..." alt="..." />
749
- * </AspectRatio>
750
- */
751
- var AspectRatio = React.forwardRef(({ ratio, className, ...props }, ref) => {
752
- return /* @__PURE__ */ jsx("div", {
753
- ref,
754
- "data-slot": "aspect-ratio",
755
- style: { "--ratio": ratio },
756
- className: cn("relative aspect-(--ratio)", className),
757
- ...props
758
- });
759
- });
760
- AspectRatio.displayName = "AspectRatio";
761
- //#endregion
762
- //#region src/components/micro/avatar.tsx
763
- /**
764
- * ✅ AUDITED & REFACTORED
765
- * - Design System Compliant (20 Commandments)
766
- * - WCAG AAA/AA
767
- * - Form Control Parity
768
- * - CSS Delegated Logic
769
- */
770
- /**
771
- * @description An image element with a fallback for representing the user.
772
- * @requires AvatarImage, AvatarFallback
773
- * @example
774
- * <Avatar>
775
- * <AvatarImage src="https://github.com/shadcn.png" />
776
- * <AvatarFallback>CN</AvatarFallback>
777
- * </Avatar>
778
- */
779
- var Avatar = React.forwardRef(({ className, size = "md", ...props }, ref) => {
780
- return /* @__PURE__ */ jsx(Avatar$1.Root, {
781
- ref,
782
- "data-slot": "avatar",
783
- "data-size": size,
784
- className: cn("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten", "group-data-[slot=avatar-group]/avatar-group:ring-2 group-data-[slot=avatar-group]/avatar-group:ring-background", className),
785
- ...props
786
- });
787
- });
788
- Avatar.displayName = "Avatar";
789
- var AvatarImage = React.forwardRef(({ className, ...props }, ref) => {
790
- return /* @__PURE__ */ jsx(Avatar$1.Image, {
791
- ref,
792
- "data-slot": "avatar-image",
793
- className: cn("aspect-square size-full rounded-full object-cover", className),
794
- ...props
795
- });
796
- });
797
- AvatarImage.displayName = "AvatarImage";
798
- var AvatarFallback = React.forwardRef(({ className, ...props }, ref) => {
799
- return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
800
- ref,
801
- "data-slot": "avatar-fallback",
802
- className: cn("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs group-data-[size=lg]/avatar:text-base", className),
803
- ...props
804
- });
805
- });
806
- AvatarFallback.displayName = "AvatarFallback";
807
- var AvatarBadge = React.forwardRef(({ className, ...props }, ref) => {
808
- return /* @__PURE__ */ jsx("span", {
809
- ref,
810
- "data-slot": "avatar-badge",
811
- className: cn("rounded-full bg-primary ring-2 ring-background", "group-data-[size=sm]/avatar:size-2", "group-data-[size=md]/avatar:size-2.5", "group-data-[size=lg]/avatar:size-3", className),
812
- ...props
813
- });
814
- });
815
- AvatarBadge.displayName = "AvatarBadge";
816
- var AvatarGroup = React.forwardRef(({ className, ...props }, ref) => {
817
- return /* @__PURE__ */ jsx("div", {
818
- ref,
819
- "data-slot": "avatar-group",
820
- className: cn("group/avatar-group flex -space-x-2", className),
821
- ...props
822
- });
823
- });
824
- AvatarGroup.displayName = "AvatarGroup";
825
- var AvatarGroupCount = React.forwardRef(({ className, size = "md", ...props }, ref) => {
826
- return /* @__PURE__ */ jsx("div", {
827
- ref,
828
- "data-slot": "avatar-group-count",
829
- "data-size": size,
830
- className: cn("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background data-[size=lg]:size-10 data-[size=sm]:size-6", className),
831
- ...props
832
- });
833
- });
834
- AvatarGroupCount.displayName = "AvatarGroupCount";
835
- //#endregion
836
- //#region src/components/micro/badge.tsx
837
- /**
838
- * ✅ AUDITED & REFACTORED
839
- * - Design System Compliant (20 Commandments)
840
- * - WCAG AAA/AA
841
- * - Form Control Parity
842
- * - CSS Delegated Logic
843
- */
844
- var badgeVariants = cva("group/badge inline-flex h-6 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2.5 py-0.5 text-xs font-medium whitespace-nowrap transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background", {
845
- variants: {
846
- variant: {
847
- solid: "border-transparent",
848
- outline: "bg-transparent",
849
- soft: "border-transparent"
850
- },
851
- color: {
852
- primary: "",
853
- secondary: "",
854
- destructive: "",
855
- warning: "",
856
- success: "",
857
- info: "",
858
- tertiary: "",
859
- muted: "",
860
- accent: ""
861
- }
862
- },
863
- compoundVariants: [
864
- {
865
- variant: "solid",
866
- color: "primary",
867
- className: "bg-primary text-primary-foreground"
868
- },
869
- {
870
- variant: "solid",
871
- color: "secondary",
872
- className: "bg-secondary text-secondary-foreground"
873
- },
874
- {
875
- variant: "solid",
876
- color: "destructive",
877
- className: "bg-destructive text-destructive-foreground"
878
- },
879
- {
880
- variant: "solid",
881
- color: "warning",
882
- className: "bg-warning text-warning-foreground"
883
- },
884
- {
885
- variant: "solid",
886
- color: "success",
887
- className: "bg-success text-success-foreground"
888
- },
889
- {
890
- variant: "solid",
891
- color: "info",
892
- className: "bg-info text-info-foreground"
893
- },
894
- {
895
- variant: "solid",
896
- color: "tertiary",
897
- className: "bg-tertiary text-tertiary-foreground"
898
- },
899
- {
900
- variant: "solid",
901
- color: "muted",
902
- className: "bg-muted text-muted-foreground"
903
- },
904
- {
905
- variant: "solid",
906
- color: "accent",
907
- className: "bg-accent text-accent-foreground"
908
- },
909
- {
910
- variant: "outline",
911
- color: "primary",
912
- className: "border-primary text-primary"
913
- },
914
- {
915
- variant: "outline",
916
- color: "secondary",
917
- className: "border-secondary text-secondary"
918
- },
919
- {
920
- variant: "outline",
921
- color: "destructive",
922
- className: "border-destructive text-destructive"
923
- },
924
- {
925
- variant: "outline",
926
- color: "warning",
927
- className: "border-warning text-warning"
928
- },
929
- {
930
- variant: "outline",
931
- color: "success",
932
- className: "border-success text-success"
933
- },
934
- {
935
- variant: "outline",
936
- color: "info",
937
- className: "border-info text-info"
938
- },
939
- {
940
- variant: "outline",
941
- color: "tertiary",
942
- className: "border-tertiary text-tertiary"
943
- },
944
- {
945
- variant: "outline",
946
- color: "muted",
947
- className: "border-muted text-muted-foreground"
948
- },
949
- {
950
- variant: "outline",
951
- color: "accent",
952
- className: "border-accent text-accent-foreground"
953
- },
954
- {
955
- variant: "soft",
956
- color: "primary",
957
- className: "bg-primary/15 text-primary"
958
- },
959
- {
960
- variant: "soft",
961
- color: "secondary",
962
- className: "bg-secondary/15 text-secondary"
963
- },
964
- {
965
- variant: "soft",
966
- color: "destructive",
967
- className: "bg-destructive/15 text-destructive"
968
- },
969
- {
970
- variant: "soft",
971
- color: "warning",
972
- className: "bg-warning/15 text-warning"
973
- },
974
- {
975
- variant: "soft",
976
- color: "success",
977
- className: "bg-success/15 text-success"
978
- },
979
- {
980
- variant: "soft",
981
- color: "info",
982
- className: "bg-info/15 text-info"
983
- },
984
- {
985
- variant: "soft",
986
- color: "tertiary",
987
- className: "bg-tertiary/15 text-tertiary"
988
- },
989
- {
990
- variant: "soft",
991
- color: "muted",
992
- className: "bg-muted/50 text-muted-foreground"
993
- },
994
- {
995
- variant: "soft",
996
- color: "accent",
997
- className: "bg-accent/50 text-accent-foreground"
998
- }
999
- ]
1000
- });
1001
- var Badge = React.forwardRef(({ className, variant = "solid", color = "primary", render, ...props }, ref) => {
1002
- return useRender({
1003
- defaultTagName: "span",
1004
- props: mergeProps({
1005
- ref,
1006
- className: cn(badgeVariants({
1007
- variant,
1008
- color
1009
- }), className)
1010
- }, props),
1011
- render,
1012
- state: {
1013
- slot: "badge",
1014
- variant,
1015
- color
1016
- }
1017
- });
1018
- });
1019
- Badge.displayName = "Badge";
1020
- //#endregion
1021
- //#region src/components/micro/breadcrumb.tsx
1022
- /**
1023
- * ✅ AUDITED & REFACTORED
1024
- * - Design System Compliant (22 Commandments)
1025
- * - WCAG AAA/AA
1026
- * - Form Control Parity
1027
- * - CSS Delegated Logic
1028
- */
1029
- /**
1030
- * @description Displays the path to the current resource using a hierarchy of links.
1031
- * @requires BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbSeparator, BreadcrumbPage
1032
- * @example
1033
- * <Breadcrumb>
1034
- * <BreadcrumbList>
1035
- * <BreadcrumbItem><BreadcrumbLink href="/">Home</BreadcrumbLink></BreadcrumbItem>
1036
- * <BreadcrumbSeparator />
1037
- * <BreadcrumbItem><BreadcrumbPage>Current</BreadcrumbPage></BreadcrumbItem>
1038
- * </BreadcrumbList>
1039
- * </Breadcrumb>
1040
- */
1041
- var Breadcrumb = React.forwardRef(({ className, ...props }, ref) => {
1042
- return /* @__PURE__ */ jsx("nav", {
1043
- ref,
1044
- "aria-label": "breadcrumb",
1045
- "data-slot": "breadcrumb",
1046
- className: cn(className),
1047
- ...props
1048
- });
1049
- });
1050
- Breadcrumb.displayName = "Breadcrumb";
1051
- var BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => {
1052
- return /* @__PURE__ */ jsx("ol", {
1053
- ref,
1054
- "data-slot": "breadcrumb-list",
1055
- className: cn("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground", className),
1056
- ...props
1057
- });
1058
- });
1059
- BreadcrumbList.displayName = "BreadcrumbList";
1060
- var BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => {
1061
- return /* @__PURE__ */ jsx("li", {
1062
- ref,
1063
- "data-slot": "breadcrumb-item",
1064
- className: cn("inline-flex items-center gap-1", className),
1065
- ...props
1066
- });
1067
- });
1068
- BreadcrumbItem.displayName = "BreadcrumbItem";
1069
- var BreadcrumbLink = React.forwardRef(({ className, render, ...props }, ref) => {
1070
- return useRender({
1071
- defaultTagName: "a",
1072
- props: mergeProps({
1073
- ref,
1074
- className: cn("transition-colors hover:text-foreground", className)
1075
- }, props),
1076
- render,
1077
- state: { slot: "breadcrumb-link" }
1078
- });
1079
- });
1080
- BreadcrumbLink.displayName = "BreadcrumbLink";
1081
- var BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => {
1082
- return /* @__PURE__ */ jsx("span", {
1083
- ref,
1084
- "data-slot": "breadcrumb-page",
1085
- role: "link",
1086
- "aria-disabled": "true",
1087
- "aria-current": "page",
1088
- className: cn("font-normal text-foreground", className),
1089
- ...props
1090
- });
1091
- });
1092
- BreadcrumbPage.displayName = "BreadcrumbPage";
1093
- var BreadcrumbSeparator = React.forwardRef(({ children, className, ...props }, ref) => {
1094
- return /* @__PURE__ */ jsx("li", {
1095
- ref,
1096
- "data-slot": "breadcrumb-separator",
1097
- role: "presentation",
1098
- "aria-hidden": "true",
1099
- className: cn(className),
1100
- ...props,
1101
- children: children ?? /* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-3.5" })
1102
- });
1103
- });
1104
- BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
1105
- var BreadcrumbEllipsis = React.forwardRef(({ className, ...props }, ref) => {
1106
- return /* @__PURE__ */ jsxs("span", {
1107
- ref,
1108
- "data-slot": "breadcrumb-ellipsis",
1109
- role: "presentation",
1110
- "aria-hidden": "true",
1111
- className: cn("flex size-5 items-center justify-center", className),
1112
- ...props,
1113
- children: [/* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
1114
- className: "sr-only",
1115
- children: "More"
1116
- })]
1117
- });
1118
- });
1119
- BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
1120
- //#endregion
1121
- //#region src/components/micro/select.tsx
1122
- /**
1123
- * ✅ AUDITED & REFACTORED
1124
- * - Design System Compliant (22 Commandments)
1125
- * - WCAG AAA/AA
1126
- * - Form Control Parity
1127
- * - CSS Delegated Logic
1128
- */
1129
- var Select = Select$1.Root;
1130
- var SelectGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Select$1.Group, {
1131
- ref,
1132
- "data-slot": "select-group",
1133
- className: cn("scroll-my-1", className),
1134
- ...props
1135
- }));
1136
- SelectGroup.displayName = "SelectGroup";
1137
- var SelectValue = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Select$1.Value, {
1138
- ref,
1139
- "data-slot": "select-value",
1140
- className: cn("flex flex-1 text-left", className),
1141
- ...props
1142
- }));
1143
- SelectValue.displayName = "SelectValue";
1144
- var selectTriggerVariants = cva("inline-flex items-center justify-between rounded-lg border border-input bg-transparent text-foreground text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:ring-3 aria-invalid:focus-visible:ring-destructive/50 data-placeholder:text-muted-foreground [&_[data-slot=select-value]]:line-clamp-1 [&_[data-slot=select-value]]:flex [&_[data-slot=select-value]]:items-center [&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg:not([class*='size-'])]:size-4 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:focus-visible:ring-destructive/50", { variants: { size: {
1145
- sm: "h-7 gap-1 px-2 py-0.5 text-xs [&_[data-slot=select-value]]:gap-1",
1146
- md: "h-8 gap-1.5 px-2.5 py-1 text-sm [&_[data-slot=select-value]]:gap-1.5",
1147
- lg: "h-9 gap-2 px-3 py-1.5 [&_[data-slot=select-value]]:gap-2"
1148
- } } });
1149
- var SelectTrigger = React.forwardRef(({ className, size = "md", children, ...props }, ref) => /* @__PURE__ */ jsxs(Select$1.Trigger, {
1150
- ref,
1151
- "data-slot": "select-trigger",
1152
- className: cn(selectTriggerVariants({
1153
- size,
1154
- className
1155
- })),
1156
- ...props,
1157
- children: [children, /* @__PURE__ */ jsx(Select$1.Icon, { render: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })]
1158
- }));
1159
- SelectTrigger.displayName = "SelectTrigger";
1160
- var SelectContent = React.forwardRef(({ className, children, side = "bottom", sideOffset = 4, align = "center", alignOffset = 0, alignItemWithTrigger = false, container, ...props }, ref) => /* @__PURE__ */ jsx(Select$1.Portal, {
1161
- container,
1162
- children: /* @__PURE__ */ jsx(ThemeWrapper, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
1163
- side,
1164
- sideOffset,
1165
- align,
1166
- alignOffset,
1167
- alignItemWithTrigger,
1168
- className: "isolate z-50",
1169
- children: /* @__PURE__ */ jsxs(Select$1.Popup, {
1170
- ref,
1171
- "data-slot": "select-content",
1172
- "data-align-trigger": alignItemWithTrigger,
1173
- className: cn("relative isolate z-50 max-h-(--available-height) w-[calc(var(--anchor-width)+8px)] overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", alignItemWithTrigger ? "origin-(--transform-origin) data-[align-trigger=true]:animate-none" : "", className),
1174
- ...props,
1175
- children: [
1176
- /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
1177
- /* @__PURE__ */ jsx(Select$1.List, { children }),
1178
- /* @__PURE__ */ jsx(SelectScrollDownButton, {})
1179
- ]
1180
- })
1181
- }) })
1182
- }));
1183
- SelectContent.displayName = "SelectContent";
1184
- var SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Select$1.GroupLabel, {
1185
- ref,
1186
- "data-slot": "select-label",
1187
- className: cn("px-1.5 py-1 text-xs text-muted-foreground", className),
1188
- ...props
1189
- }));
1190
- SelectLabel.displayName = "SelectLabel";
1191
- var SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(Select$1.Item, {
1192
- ref,
1193
- "data-slot": "select-item",
1194
- className: cn("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg:not([class*='size-'])]:size-4 [&>[data-slot=select-item-indicator]]:flex [&>[data-slot=select-item-indicator]]:items-center [&>[data-slot=select-item-indicator]]:gap-2", className),
1195
- ...props,
1196
- children: [/* @__PURE__ */ jsx(Select$1.ItemText, {
1197
- className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
1198
- children
1199
- }), /* @__PURE__ */ jsx(Select$1.ItemIndicator, {
1200
- render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
1201
- children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" })
1202
- })]
1203
- }));
1204
- SelectItem.displayName = "SelectItem";
1205
- var SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Select$1.Separator, {
1206
- ref,
1207
- "data-slot": "select-separator",
1208
- className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className),
1209
- ...props
1210
- }));
1211
- SelectSeparator.displayName = "SelectSeparator";
1212
- var SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Select$1.ScrollUpArrow, {
1213
- ref,
1214
- "data-slot": "select-scroll-up-button",
1215
- className: cn("top-0 z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
1216
- ...props,
1217
- children: /* @__PURE__ */ jsx(ChevronUpIcon, {})
1218
- }));
1219
- SelectScrollUpButton.displayName = "SelectScrollUpButton";
1220
- var SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Select$1.ScrollDownArrow, {
1221
- ref,
1222
- "data-slot": "select-scroll-down-button",
1223
- className: cn("bottom-0 z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
1224
- ...props,
1225
- children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
1226
- }));
1227
- SelectScrollDownButton.displayName = "SelectScrollDownButton";
1228
- //#endregion
1229
- //#region src/components/micro/calendar.tsx
1230
- /**
1231
- * ✅ AUDITED
1232
- * - Design System Compliant (22 Commandments)
1233
- * - WCAG AAA/AA
1234
- * - Form Control Parity
1235
- * - CSS Delegated Logic
1236
- */
1237
- function getDropdownLabel(options, value, locale) {
1238
- const valueStr = Array.isArray(value) ? value[0] : value?.toString();
1239
- const selected = options?.find((o) => o.value.toString() === valueStr);
1240
- if (!selected) return "";
1241
- if (options?.length === 12 && selected.value !== void 0) return new Date(2e3, Number(selected.value), 1).toLocaleString(locale?.code ?? "en-US", { month: "short" });
1242
- return selected.label;
1243
- }
1244
- var calendarVariants = cva("group/calendar bg-background p-2 in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", { variants: { size: {
1245
- sm: "calendar-sm",
1246
- md: "calendar-md",
1247
- lg: "calendar-lg"
1248
- } } });
1249
- /**
1250
- * @description A date field component that allows users to enter and edit date.
1251
- * @example
1252
- * <Calendar mode="single" selected={date} onSelect={setDate} />
1253
- */
1254
- function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", locale, formatters, components, size = "md", ...props }) {
1255
- const defaultClassNames = getDefaultClassNames();
1256
- return /* @__PURE__ */ jsx(DayPicker, {
1257
- showOutsideDays,
1258
- className: cn(calendarVariants({ size }), className),
1259
- captionLayout,
1260
- locale,
1261
- formatters: {
1262
- formatMonthDropdown: (month) => month.toLocaleString(locale?.code ?? "en-US", { month: "long" }),
1263
- ...formatters
1264
- },
1265
- classNames: {
1266
- root: cn("w-fit", defaultClassNames.root),
1267
- months: cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
1268
- month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
1269
- nav: cn("absolute inset-x-0 top-0 flex items-center justify-between pointer-events-none", "h-8 group-[.calendar-sm]/calendar:h-7 group-[.calendar-lg]/calendar:h-9", defaultClassNames.nav),
1270
- button_previous: cn(buttonVariants({
1271
- variant: buttonVariant,
1272
- color: "secondary",
1273
- size
1274
- }), "p-0 aspect-square select-none pointer-events-auto aria-disabled:opacity-50", defaultClassNames.button_previous),
1275
- button_next: cn(buttonVariants({
1276
- variant: buttonVariant,
1277
- color: "secondary",
1278
- size
1279
- }), "p-0 aspect-square select-none pointer-events-auto aria-disabled:opacity-50", defaultClassNames.button_next),
1280
- month_caption: cn("flex w-full items-center justify-center", "h-8 px-8 group-[.calendar-sm]/calendar:h-7 group-[.calendar-sm]/calendar:px-7 group-[.calendar-lg]/calendar:h-9 group-[.calendar-lg]/calendar:px-9", defaultClassNames.month_caption),
1281
- dropdowns: cn("flex h-7 group-[.calendar-sm]/calendar:h-6 group-[.calendar-lg]/calendar:h-8 items-center justify-center gap-0", defaultClassNames.dropdowns),
1282
- dropdown_root: cn("relative flex items-center justify-center", defaultClassNames.dropdown_root),
1283
- dropdown: cn(defaultClassNames.dropdown),
1284
- caption_label: cn("px-2 font-bold select-none", {
1285
- "text-sm group-[.calendar-sm]/calendar:text-xs group-[.calendar-lg]/calendar:text-base": captionLayout === "label",
1286
- "flex items-center gap-1 rounded-md text-sm group-[.calendar-sm]/calendar:text-xs group-[.calendar-lg]/calendar:text-base [&>svg]:size-3.5 [&>svg]:text-muted-foreground": captionLayout !== "label"
1287
- }, defaultClassNames.caption_label),
1288
- month_grid: cn("w-full border-collapse", defaultClassNames.month_grid),
1289
- weekdays: cn("flex gap-1", defaultClassNames.weekdays),
1290
- weekday: cn("flex-1 rounded-md text-xs font-medium text-muted-foreground select-none group-[.calendar-sm]/calendar:text-[10px] group-[.calendar-lg]/calendar:text-sm", defaultClassNames.weekday),
1291
- week: cn("mt-2 flex w-full gap-1", defaultClassNames.week),
1292
- week_number_header: cn("w-7 group-[.calendar-sm]/calendar:w-6 group-[.calendar-lg]/calendar:w-8 select-none", defaultClassNames.week_number_header),
1293
- week_number: cn("text-xs text-muted-foreground select-none group-[.calendar-sm]/calendar:text-[10px] group-[.calendar-lg]/calendar:text-sm", defaultClassNames.week_number),
1294
- day: cn("group/day relative aspect-square h-full w-full rounded-md p-0 text-center select-none", defaultClassNames.day),
1295
- day_button: cn(defaultClassNames.day_button),
1296
- range_start: cn("relative isolate z-0 rounded-md bg-muted", defaultClassNames.range_start),
1297
- range_middle: cn("rounded-md bg-muted", defaultClassNames.range_middle),
1298
- range_end: cn("relative isolate z-0 rounded-md bg-muted", defaultClassNames.range_end),
1299
- today: cn("rounded-md bg-muted text-foreground", defaultClassNames.today),
1300
- outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
1301
- disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
1302
- hidden: cn("invisible", defaultClassNames.hidden),
1303
- ...classNames
1304
- },
1305
- components: {
1306
- Root: ({ className, rootRef, ...props }) => {
1307
- return /* @__PURE__ */ jsx("div", {
1308
- "data-slot": "calendar",
1309
- ref: rootRef,
1310
- className: cn(className),
1311
- ...props
1312
- });
1313
- },
1314
- Dropdown: ({ value, onChange, options, disabled, "aria-label": ariaLabel, name }) => {
1315
- return /* @__PURE__ */ jsxs(Select, {
1316
- value: value?.toString(),
1317
- disabled,
1318
- onValueChange: (newVal) => {
1319
- onChange?.({ target: {
1320
- value: newVal,
1321
- name
1322
- } });
1323
- },
1324
- children: [/* @__PURE__ */ jsx(SelectTrigger, {
1325
- size,
1326
- "aria-label": ariaLabel,
1327
- className: "w-fit min-w-0 px-1 border-none bg-transparent font-medium shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 [&_[data-slot=select-value]]:w-auto",
1328
- children: /* @__PURE__ */ jsx("span", {
1329
- "data-slot": "select-value",
1330
- className: "flex flex-1 text-left",
1331
- children: getDropdownLabel(options, value, locale)
1332
- })
1333
- }), /* @__PURE__ */ jsx(SelectContent, { children: options?.map((option) => {
1334
- const isMonth = options?.length === 12;
1335
- let shortLabel = option.label;
1336
- if (isMonth && option.value !== void 0) shortLabel = new Date(2e3, Number(option.value), 1).toLocaleString(locale?.code ?? "en-US", { month: "short" });
1337
- return /* @__PURE__ */ jsx(SelectItem, {
1338
- value: option.value.toString(),
1339
- disabled: option.disabled,
1340
- children: shortLabel
1341
- }, option.value);
1342
- }) })]
1343
- });
1344
- },
1345
- Chevron: ({ className, orientation, ...props }) => {
1346
- const sizeClasses = "size-4 group-[.calendar-sm]/calendar:size-3.5 group-[.calendar-lg]/calendar:size-5";
1347
- if (orientation === "left") return /* @__PURE__ */ jsx(ChevronLeftIcon, {
1348
- className: cn("size-5 group-[.calendar-sm]/calendar:size-4 group-[.calendar-lg]/calendar:size-6 rtl:rotate-180", className),
1349
- strokeWidth: 3,
1350
- ...props
1351
- });
1352
- if (orientation === "right") return /* @__PURE__ */ jsx(ChevronRightIcon, {
1353
- className: cn("size-5 group-[.calendar-sm]/calendar:size-4 group-[.calendar-lg]/calendar:size-6 rtl:rotate-180", className),
1354
- strokeWidth: 3,
1355
- ...props
1356
- });
1357
- return /* @__PURE__ */ jsx(ChevronDownIcon, {
1358
- className: cn(sizeClasses, className),
1359
- strokeWidth: 2.5,
1360
- ...props
1361
- });
1362
- },
1363
- DayButton: ({ ...props }) => /* @__PURE__ */ jsx(CalendarDayButton, {
1364
- locale,
1365
- ...props
1366
- }),
1367
- WeekNumber: ({ children, ...props }) => {
1368
- return /* @__PURE__ */ jsx("td", {
1369
- ...props,
1370
- children: /* @__PURE__ */ jsx("div", {
1371
- className: "flex size-7 group-[.calendar-sm]/calendar:size-6 group-[.calendar-lg]/calendar:size-8 items-center justify-center text-center",
1372
- children
1373
- })
1374
- });
1375
- },
1376
- ...components
1377
- },
1378
- ...props
1379
- });
1380
- }
1381
- function CalendarDayButton({ className, day, modifiers, locale, ...props }) {
1382
- getDefaultClassNames();
1383
- const ref = React.useRef(null);
1384
- React.useEffect(() => {
1385
- if (modifiers.focused) ref.current?.focus();
1386
- }, [modifiers.focused]);
1387
- return /* @__PURE__ */ jsx("button", {
1388
- ref,
1389
- type: "button",
1390
- "data-slot": "calendar-day-button",
1391
- "data-day": day.date.toLocaleDateString(locale?.code),
1392
- "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
1393
- "data-range-start": modifiers.range_start,
1394
- "data-range-end": modifiers.range_end,
1395
- "data-range-middle": modifiers.range_middle,
1396
- className: cn("relative isolate z-10 flex aspect-square size-7 flex-col items-center justify-center gap-1 rounded-md font-normal leading-none transition-colors outline-none select-none", "group-[.calendar-sm]/calendar:size-6 group-[.calendar-lg]/calendar:size-8", "text-sm group-[.calendar-sm]/calendar:text-xs", "hover:bg-accent hover:text-accent-foreground", "focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background", "active:translate-y-px", "disabled:pointer-events-none disabled:opacity-50", "group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-3 group-data-[focused=true]/day:ring-ring/50", "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[selected-single=true]:hover:bg-primary/90", "data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground", "data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground", "data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground", "dark:hover:text-foreground", className),
1397
- ...props
1398
- });
1399
- }
1400
- Calendar.displayName = "Calendar";
1401
- CalendarDayButton.displayName = "CalendarDayButton";
1402
- //#endregion
1403
- //#region src/components/micro/card.tsx
1404
- /**
1405
- * ✅ AUDITED & REFACTORED
1406
- * - Design System Compliant (22 Commandments)
1407
- * - WCAG AAA/AA
1408
- * - Form Control Parity
1409
- * - CSS Delegated Logic
1410
- */
1411
- /**
1412
- * @description Displays a card with header, content, and footer.
1413
- * @requires CardHeader, CardTitle, CardDescription, CardContent, CardFooter
1414
- * @example
1415
- * <Card>
1416
- * <CardHeader><CardTitle>Title</CardTitle></CardHeader>
1417
- * <CardContent>Content here</CardContent>
1418
- * </Card>
1419
- */
1420
- var Card = React.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ jsx("div", {
1421
- ref,
1422
- "data-slot": "card",
1423
- "data-size": size,
1424
- className: cn("group/card flex flex-col overflow-hidden rounded-xl bg-card text-sm text-card-foreground ring-1 ring-foreground/10", "p-6 gap-5 data-[size=sm]:p-4 data-[size=sm]:gap-4 data-[size=lg]:p-8 data-[size=lg]:gap-6", className),
1425
- ...props
1426
- }));
1427
- Card.displayName = "Card";
1428
- var CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
1429
- ref,
1430
- "data-slot": "card-header",
1431
- className: cn("flex flex-col gap-1.5", className),
1432
- ...props
1433
- }));
1434
- CardHeader.displayName = "CardHeader";
1435
- var CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
1436
- ref,
1437
- "data-slot": "card-title",
1438
- className: cn("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm group-data-[size=lg]/card:text-lg", className),
1439
- ...props
1440
- }));
1441
- CardTitle.displayName = "CardTitle";
1442
- var CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
1443
- ref,
1444
- "data-slot": "card-description",
1445
- className: cn("text-sm text-muted-foreground group-data-[size=sm]/card:text-xs group-data-[size=lg]/card:text-base", className),
1446
- ...props
1447
- }));
1448
- CardDescription.displayName = "CardDescription";
1449
- var CardContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
1450
- ref,
1451
- "data-slot": "card-content",
1452
- className,
1453
- ...props
1454
- }));
1455
- CardContent.displayName = "CardContent";
1456
- var CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
1457
- ref,
1458
- "data-slot": "card-footer",
1459
- className: cn("flex items-center", className),
1460
- ...props
1461
- }));
1462
- CardFooter.displayName = "CardFooter";
1463
- //#endregion
1464
- //#region src/components/micro/carousel.tsx
1465
- /**
1466
- * ✅ AUDITED & REFACTORED
1467
- * - Design System Compliant (22 Commandments)
1468
- * - WCAG AAA/AA
1469
- * - Form Control Parity
1470
- * - CSS Delegated Logic
1471
- */
1472
- var CarouselContext = React.createContext(null);
1473
- function useCarousel() {
1474
- const context = React.useContext(CarouselContext);
1475
- if (!context) throw new Error("useCarousel must be used within a <Carousel />");
1476
- return context;
1477
- }
1478
- var Carousel = React.forwardRef(({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }, ref) => {
1479
- const [carouselRef, api] = useEmblaCarousel({
1480
- ...opts,
1481
- axis: orientation === "horizontal" ? "x" : "y"
1482
- }, plugins);
1483
- const [canScrollPrev, setCanScrollPrev] = React.useState(false);
1484
- const [canScrollNext, setCanScrollNext] = React.useState(false);
1485
- const onSelect = React.useCallback((api) => {
1486
- if (!api) return;
1487
- setCanScrollPrev(api.canScrollPrev());
1488
- setCanScrollNext(api.canScrollNext());
1489
- }, []);
1490
- const scrollPrev = React.useCallback(() => {
1491
- api?.scrollPrev();
1492
- }, [api]);
1493
- const scrollNext = React.useCallback(() => {
1494
- api?.scrollNext();
1495
- }, [api]);
1496
- const handleKeyDown = React.useCallback((event) => {
1497
- if (orientation === "horizontal") switch (event.key) {
1498
- case "ArrowLeft":
1499
- event.preventDefault();
1500
- scrollPrev();
1501
- break;
1502
- case "ArrowRight":
1503
- event.preventDefault();
1504
- scrollNext();
1505
- break;
1506
- }
1507
- else switch (event.key) {
1508
- case "ArrowUp":
1509
- event.preventDefault();
1510
- scrollPrev();
1511
- break;
1512
- case "ArrowDown":
1513
- event.preventDefault();
1514
- scrollNext();
1515
- break;
1516
- }
1517
- }, [
1518
- scrollPrev,
1519
- scrollNext,
1520
- orientation
1521
- ]);
1522
- React.useEffect(() => {
1523
- if (!api || !setApi) return;
1524
- setApi(api);
1525
- }, [api, setApi]);
1526
- React.useEffect(() => {
1527
- if (!api) return;
1528
- onSelect(api);
1529
- api.on("reInit", onSelect);
1530
- api.on("select", onSelect);
1531
- return () => {
1532
- api?.off("reInit", onSelect);
1533
- api?.off("select", onSelect);
1534
- };
1535
- }, [api, onSelect]);
1536
- return /* @__PURE__ */ jsx(CarouselContext.Provider, {
1537
- value: {
1538
- carouselRef,
1539
- api,
1540
- opts,
1541
- orientation,
1542
- scrollPrev,
1543
- scrollNext,
1544
- canScrollPrev,
1545
- canScrollNext
1546
- },
1547
- children: /* @__PURE__ */ jsx("div", {
1548
- ref,
1549
- onKeyDownCapture: handleKeyDown,
1550
- className: cn("group/carousel relative", className),
1551
- role: "region",
1552
- "aria-roledescription": "carousel",
1553
- "data-slot": "carousel",
1554
- "data-orientation": orientation,
1555
- ...props,
1556
- children
1557
- })
1558
- });
1559
- });
1560
- Carousel.displayName = "Carousel";
1561
- var CarouselContent = React.forwardRef(({ className, ...props }, ref) => {
1562
- const { carouselRef } = useCarousel();
1563
- return /* @__PURE__ */ jsx("div", {
1564
- ref: React.useCallback((node) => {
1565
- carouselRef(node);
1566
- if (typeof ref === "function") ref(node);
1567
- else if (ref) ref.current = node;
1568
- }, [carouselRef, ref]),
1569
- className: "overflow-hidden",
1570
- "data-slot": "carousel-content",
1571
- children: /* @__PURE__ */ jsx("div", {
1572
- className: cn("flex group-data-[orientation=vertical]/carousel:flex-col", className),
1573
- ...props
1574
- })
1575
- });
1576
- });
1577
- CarouselContent.displayName = "CarouselContent";
1578
- var CarouselItem = React.forwardRef(({ className, ...props }, ref) => {
1579
- return /* @__PURE__ */ jsx("div", {
1580
- ref,
1581
- role: "group",
1582
- "aria-roledescription": "slide",
1583
- "data-slot": "carousel-item",
1584
- className: cn("min-w-0 shrink-0 grow-0 basis-full", className),
1585
- ...props
1586
- });
1587
- });
1588
- CarouselItem.displayName = "CarouselItem";
1589
- var carouselButtonClasses = "inline-flex size-8 shrink-0 items-center justify-center rounded-full border border-border bg-background touch-manipulation transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";
1590
- var CarouselPrevious = React.forwardRef(({ className, ...props }, ref) => {
1591
- const { scrollPrev, canScrollPrev } = useCarousel();
1592
- return /* @__PURE__ */ jsxs("button", {
1593
- ref,
1594
- type: "button",
1595
- "data-slot": "carousel-previous",
1596
- className: cn(carouselButtonClasses, className),
1597
- disabled: !canScrollPrev,
1598
- onClick: scrollPrev,
1599
- ...props,
1600
- children: [/* @__PURE__ */ jsx(ChevronLeftIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
1601
- className: "sr-only",
1602
- children: "Previous slide"
1603
- })]
1604
- });
1605
- });
1606
- CarouselPrevious.displayName = "CarouselPrevious";
1607
- var CarouselNext = React.forwardRef(({ className, ...props }, ref) => {
1608
- const { scrollNext, canScrollNext } = useCarousel();
1609
- return /* @__PURE__ */ jsxs("button", {
1610
- ref,
1611
- type: "button",
1612
- "data-slot": "carousel-next",
1613
- className: cn(carouselButtonClasses, className),
1614
- disabled: !canScrollNext,
1615
- onClick: scrollNext,
1616
- ...props,
1617
- children: [/* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
1618
- className: "sr-only",
1619
- children: "Next slide"
1620
- })]
1621
- });
1622
- });
1623
- CarouselNext.displayName = "CarouselNext";
1624
- var CarouselDots = React.forwardRef(({ className, ...props }, ref) => {
1625
- const { api } = useCarousel();
1626
- const [selectedIndex, setSelectedIndex] = React.useState(0);
1627
- const [scrollSnaps, setScrollSnaps] = React.useState([]);
1628
- const onInit = React.useCallback((api) => {
1629
- if (!api) return;
1630
- setScrollSnaps(api.scrollSnapList());
1631
- }, []);
1632
- const onSelect = React.useCallback((api) => {
1633
- if (!api) return;
1634
- setSelectedIndex(api.selectedScrollSnap());
1635
- }, []);
1636
- React.useEffect(() => {
1637
- if (!api) return;
1638
- onInit(api);
1639
- onSelect(api);
1640
- api.on("reInit", onInit);
1641
- api.on("reInit", onSelect);
1642
- api.on("select", onSelect);
1643
- return () => {
1644
- api.off("reInit", onInit);
1645
- api.off("reInit", onSelect);
1646
- api.off("select", onSelect);
1647
- };
1648
- }, [
1649
- api,
1650
- onInit,
1651
- onSelect
1652
- ]);
1653
- if (scrollSnaps.length === 0) return null;
1654
- return /* @__PURE__ */ jsx("div", {
1655
- ref,
1656
- "data-slot": "carousel-dots",
1657
- className: cn("flex items-center justify-center gap-2", className),
1658
- ...props,
1659
- children: scrollSnaps.map((_, index) => /* @__PURE__ */ jsx("button", {
1660
- type: "button",
1661
- "data-slot": "carousel-dot",
1662
- "data-active": index === selectedIndex ? "" : void 0,
1663
- "aria-label": `Go to slide ${index + 1}`,
1664
- "aria-current": index === selectedIndex ? "true" : "false",
1665
- className: cn("size-2 rounded-full transition-all duration-300", "bg-primary/20 hover:bg-primary/40 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-offset-2 focus-visible:ring-offset-background", "data-active:w-6 data-active:bg-primary"),
1666
- onClick: () => api?.scrollTo(index)
1667
- }, index))
1668
- });
1669
- });
1670
- CarouselDots.displayName = "CarouselDots";
1671
- //#endregion
1672
- //#region src/components/micro/chart.tsx
1673
- /**
1674
- * ✅ AUDITED & REFACTORED
1675
- * - Design System Compliant (22 Commandments)
1676
- * - WCAG AAA/AA
1677
- * - Form Control Parity
1678
- * - CSS Delegated Logic
1679
- */
1680
- var THEMES = {
1681
- light: "",
1682
- dark: ".dark"
1683
- };
1684
- var INITIAL_DIMENSION = {
1685
- width: 320,
1686
- height: 200
1687
- };
1688
- var ChartContext = React.createContext(null);
1689
- function useChart() {
1690
- const context = React.useContext(ChartContext);
1691
- if (!context) throw new Error("useChart must be used within a <ChartContainer />");
1692
- return context;
1693
- }
1694
- /**
1695
- * @description Recharts wrapper for theming and tooltips.
1696
- * @requires ChartTooltip, ChartTooltipContent
1697
- */
1698
- var ChartContainer = React.forwardRef(function ChartContainer({ id, className, children, config, initialDimension = INITIAL_DIMENSION, ...props }, ref) {
1699
- const uniqueId = React.useId();
1700
- const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
1701
- return /* @__PURE__ */ jsx(ChartContext.Provider, {
1702
- value: { config },
1703
- children: /* @__PURE__ */ jsxs("div", {
1704
- ref,
1705
- "data-slot": "chart",
1706
- "data-chart": chartId,
1707
- className: cn("group/chart flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
1708
- ...props,
1709
- children: [/* @__PURE__ */ jsx(ChartStyle, {
1710
- id: chartId,
1711
- config
1712
- }), /* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, {
1713
- initialDimension,
1714
- children
1715
- })]
1716
- })
1717
- });
1718
- });
1719
- ChartContainer.displayName = "ChartContainer";
1720
- var ChartStyle = ({ id, config }) => {
1721
- const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);
1722
- if (!colorConfig.length) return null;
1723
- return /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: Object.entries(THEMES).map(([theme, prefix]) => `
1724
- ${prefix} [data-chart=${id}] {
1725
- ${colorConfig.map(([key, itemConfig]) => {
1726
- const color = itemConfig.theme?.[theme] ?? itemConfig.color;
1727
- return color ? ` --color-${key}: ${color};` : null;
1728
- }).join("\n")}
1729
- }
1730
- `).join("\n") } });
1731
- };
1732
- var ChartTooltip = RechartsPrimitive.Tooltip;
1733
- function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }) {
1734
- const { config } = useChart();
1735
- const tooltipLabel = React.useMemo(() => {
1736
- if (hideLabel || !payload?.length) return null;
1737
- const [item] = payload;
1738
- const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
1739
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
1740
- const value = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
1741
- if (labelFormatter) return /* @__PURE__ */ jsx("div", {
1742
- className: cn("font-medium", labelClassName),
1743
- children: labelFormatter(value, payload)
1744
- });
1745
- if (!value) return null;
1746
- return /* @__PURE__ */ jsx("div", {
1747
- className: cn("font-medium", labelClassName),
1748
- children: value
1749
- });
1750
- }, [
1751
- label,
1752
- labelFormatter,
1753
- payload,
1754
- hideLabel,
1755
- labelClassName,
1756
- config,
1757
- labelKey
1758
- ]);
1759
- if (!active || !payload?.length) return null;
1760
- const nestLabel = payload.length === 1 && indicator !== "dot";
1761
- return /* @__PURE__ */ jsxs("div", {
1762
- className: cn("grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className),
1763
- children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("div", {
1764
- className: "grid gap-1.5",
1765
- children: payload.filter((item) => item.type !== "none").map((item, index) => {
1766
- const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
1767
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
1768
- const indicatorColor = color ?? item.payload?.fill ?? item.color;
1769
- return /* @__PURE__ */ jsx("div", {
1770
- className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"),
1771
- children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx("div", {
1772
- className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
1773
- "h-2.5 w-2.5": indicator === "dot",
1774
- "w-1": indicator === "line",
1775
- "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
1776
- "my-0.5": nestLabel && indicator === "dashed"
1777
- }),
1778
- style: {
1779
- "--color-bg": indicatorColor,
1780
- "--color-border": indicatorColor
1781
- }
1782
- }), /* @__PURE__ */ jsxs("div", {
1783
- className: cn("flex flex-1 justify-between leading-none", {
1784
- "items-end": nestLabel,
1785
- "items-center": !nestLabel
1786
- }),
1787
- children: [/* @__PURE__ */ jsxs("div", {
1788
- className: "grid gap-1.5",
1789
- children: [nestLabel ? tooltipLabel : null, /* @__PURE__ */ jsx("span", {
1790
- className: "text-muted-foreground",
1791
- children: itemConfig?.label ?? item.name
1792
- })]
1793
- }), item.value != null && /* @__PURE__ */ jsx("span", {
1794
- className: "font-mono font-medium text-foreground tabular-nums",
1795
- children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value)
1796
- })]
1797
- })] })
1798
- }, index);
1799
- })
1800
- })]
1801
- });
1802
- }
1803
- var ChartLegend = RechartsPrimitive.Legend;
1804
- function ChartLegendContent({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }) {
1805
- const { config } = useChart();
1806
- if (!payload?.length) return null;
1807
- return /* @__PURE__ */ jsx("div", {
1808
- className: cn("flex items-center justify-center gap-4", {
1809
- "pb-3": verticalAlign === "top",
1810
- "pt-3": verticalAlign !== "top"
1811
- }, className),
1812
- children: payload.filter((item) => item.type !== "none").map((item, index) => {
1813
- const key = `${nameKey ?? item.dataKey ?? "value"}`;
1814
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
1815
- return /* @__PURE__ */ jsxs("div", {
1816
- className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),
1817
- children: [itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx("div", {
1818
- className: "h-2 w-2 shrink-0 rounded-[2px]",
1819
- style: { backgroundColor: item.color }
1820
- }), itemConfig?.label]
1821
- }, index);
1822
- })
1823
- });
1824
- }
1825
- function getPayloadConfigFromPayload(config, payload, key) {
1826
- if (typeof payload !== "object" || payload === null) return;
1827
- const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
1828
- let configLabelKey = key;
1829
- if (key in payload && typeof payload[key] === "string") configLabelKey = payload[key];
1830
- else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") configLabelKey = payloadPayload[key];
1831
- return configLabelKey in config ? config[configLabelKey] : config[key];
1832
- }
1833
- //#endregion
1834
- //#region src/components/micro/checkbox.tsx
1835
- /**
1836
- * ✅ AUDITED & REFACTORED
1837
- * - Design System Compliant (20 Commandments)
1838
- * - WCAG AAA/AA
1839
- * - Form Control Parity
1840
- * - CSS Delegated Logic
1841
- */
1842
- var checkboxVariants = cva("group/checkbox peer relative flex shrink-0 items-center justify-center rounded-sm border border-input after:absolute after:content-[''] transition-colors outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:border-destructive aria-invalid:focus-visible:ring-3 aria-invalid:focus-visible:ring-destructive/50 aria-invalid:data-checked:border-destructive aria-invalid:data-checked:bg-destructive aria-invalid:data-checked:text-destructive-foreground dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:focus-visible:ring-destructive/50 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", { variants: { size: {
1843
- sm: "size-3.5 after:-inset-x-2.5 after:-inset-y-2.5",
1844
- md: "size-4 after:-inset-x-3 after:-inset-y-2",
1845
- lg: "size-5 after:-inset-x-4 after:-inset-y-3"
1846
- } } });
1847
- /**
1848
- * @description A control that allows the user to toggle between checked and not checked.
1849
- * @example
1850
- * <Checkbox id="terms" />
1851
- * <label htmlFor="terms">Accept terms</label>
1852
- */
1853
- var Checkbox = React.forwardRef(function Checkbox({ className, size = "md", ...props }, ref) {
1854
- return /* @__PURE__ */ jsx(Checkbox$1.Root, {
1855
- ref,
1856
- "data-slot": "checkbox",
1857
- "data-size": size,
1858
- className: cn(checkboxVariants({ size }), className),
1859
- ...props
1860
- });
1861
- });
1862
- Checkbox.displayName = "Checkbox";
1863
- var CheckboxIndicator = React.forwardRef(function CheckboxIndicator({ className, ...props }, ref) {
1864
- return /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
1865
- ref,
1866
- "data-slot": "checkbox-indicator",
1867
- className: cn("grid place-content-center text-current transition-none [&>svg]:size-3.5 group-data-[size=sm]/checkbox:[&>svg]:size-3 group-data-[size=lg]/checkbox:[&>svg]:size-4", className),
1868
- ...props
1869
- });
1870
- });
1871
- CheckboxIndicator.displayName = "CheckboxIndicator";
1872
- //#endregion
1873
- //#region src/components/micro/collapsible.tsx
1874
- /**
1875
- * ✅ AUDITED & REFACTORED
1876
- * - Design System Compliant (22 Commandments)
1877
- * - WCAG AAA/AA
1878
- * - Form Control Parity
1879
- * - CSS Delegated Logic
1880
- */
1881
- /**
1882
- * @description An interactive component which expands/collapses a panel.
1883
- * @requires CollapsibleTrigger, CollapsibleContent
1884
- * @example
1885
- * <Collapsible>
1886
- * <CollapsibleTrigger>Toggle</CollapsibleTrigger>
1887
- * <CollapsibleContent>Content</CollapsibleContent>
1888
- * </Collapsible>
1889
- */
1890
- var Collapsible = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Collapsible$1.Root, {
1891
- ref,
1892
- "data-slot": "collapsible",
1893
- className,
1894
- ...props
1895
- }));
1896
- Collapsible.displayName = "Collapsible";
1897
- var CollapsibleTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Collapsible$1.Trigger, {
1898
- ref,
1899
- "data-slot": "collapsible-trigger",
1900
- className,
1901
- ...props
1902
- }));
1903
- CollapsibleTrigger.displayName = "CollapsibleTrigger";
1904
- var CollapsibleContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Collapsible$1.Panel, {
1905
- ref,
1906
- "data-slot": "collapsible-content",
1907
- className: cn("flex flex-col justify-end overflow-hidden h-(--collapsible-panel-height) transition-[height] duration-200 ease-out data-starting-style:h-0 data-ending-style:h-0 [&[hidden]:not([hidden='until-found'])]:hidden", className),
1908
- ...props
1909
- }));
1910
- CollapsibleContent.displayName = "CollapsibleContent";
1911
- //#endregion
1912
- //#region src/components/micro/input-group.tsx
1913
- /**
1914
- * ✅ AUDITED & REFACTORED
1915
- * - Self-contained: no imports from @/components/micro/*
1916
- * - InputGroupButton, InputGroupInput, InputGroupTextarea render native HTML
1917
- * - Size is always inherited from InputGroup wrapper via CSS group modifiers
1918
- * - InputGroupButton placed directly in InputGroup (not inside InputGroupAddon)
1919
- */
1920
- var inputGroupVariants = cva([
1921
- "group/input-group relative flex min-w-0 items-center overflow-hidden rounded-lg border border-input transition-colors outline-none",
1922
- "has-disabled:bg-input/50 has-disabled:opacity-50 has-disabled:cursor-not-allowed dark:has-disabled:bg-input/80",
1923
- "has-[[data-slot=input-group-control]:focus-visible]:border-ring",
1924
- "has-[[data-slot=input-group-control]:focus-visible]:ring-3",
1925
- "has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50",
1926
- "has-[[data-slot=input-group-control]:focus-visible]:ring-offset-1",
1927
- "has-[[data-slot=input-group-control]:focus-visible]:ring-offset-background",
1928
- "has-[[data-slot][aria-invalid=true]]:border-destructive",
1929
- "has-[[data-slot][aria-invalid=true]:focus-visible]:ring-3",
1930
- "has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/50",
1931
- "has-[[data-slot][aria-invalid=true]:focus-visible]:border-destructive",
1932
- "dark:bg-input/30"
1933
- ], { variants: { size: {
1934
- sm: "min-h-7 text-xs",
1935
- md: "min-h-8 text-sm",
1936
- lg: "min-h-9 text-sm"
1937
- } } });
1938
- var InputGroup = React.forwardRef(function InputGroup({ className, size = "md", ...props }, ref) {
1939
- return /* @__PURE__ */ jsx("div", {
1940
- ref,
1941
- "data-slot": "input-group",
1942
- "data-size": size,
1943
- role: "group",
1944
- className: cn(inputGroupVariants({ size }), className),
1945
- ...props
1946
- });
1947
- });
1948
- InputGroup.displayName = "InputGroup";
1949
- var inputGroupAddonVariants = cva([
1950
- "flex h-auto cursor-text items-center justify-center gap-2 font-medium text-muted-foreground select-none",
1951
- "group-has-[[data-slot][aria-invalid=true]]/input-group:text-destructive",
1952
- "group-data-[size=sm]/input-group:py-0.5",
1953
- "group-data-[size=md]/input-group:py-1.5",
1954
- "group-data-[size=lg]/input-group:py-1.5",
1955
- "[&>svg:not([class*='size-'])]:size-4",
1956
- "group-data-[size=sm]/input-group:[&>svg:not([class*='size-'])]:size-3.5"
1957
- ], { variants: { align: {
1958
- start: "order-first pl-2 pr-1",
1959
- end: "order-last pl-1 pr-2"
1960
- } } });
1961
- var InputGroupAddon = React.forwardRef(function InputGroupAddon({ className, align = "start", ...props }, ref) {
1962
- return /* @__PURE__ */ jsx("div", {
1963
- ref,
1964
- "data-slot": "input-group-addon",
1965
- "data-align": align,
1966
- className: cn(inputGroupAddonVariants({ align }), className),
1967
- onClick: (e) => {
1968
- if (e.target.closest("button")) return;
1969
- e.currentTarget.parentElement?.querySelector("input, textarea")?.focus();
1970
- },
1971
- ...props
1972
- });
1973
- });
1974
- InputGroupAddon.displayName = "InputGroupAddon";
1975
- var InputGroupText = React.forwardRef(function InputGroupText({ className, ...props }, ref) {
1976
- return /* @__PURE__ */ jsx("span", {
1977
- ref,
1978
- className: cn("flex items-center gap-2 text-muted-foreground", "[&>svg]:pointer-events-none [&>svg:not([class*='size-'])]:size-4", "group-data-[size=sm]/input-group:[&>svg:not([class*='size-'])]:size-3.5", className),
1979
- ...props
1980
- });
1981
- });
1982
- InputGroupText.displayName = "InputGroupText";
1983
- var inputGroupButtonVariants = cva([
1984
- "inline-flex shrink-0 self-stretch cursor-pointer items-center justify-center gap-1.5 font-medium whitespace-nowrap transition-colors duration-150 select-none",
1985
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background",
1986
- "disabled:pointer-events-none disabled:opacity-50",
1987
- "[&:not(:first-child)]:border-l [&:not(:last-child)]:border-r border-border",
1988
- "[&>svg:not([class*='size-'])]:size-4",
1989
- "group-data-[size=sm]/input-group:[&>svg:not([class*='size-'])]:size-3.5"
1990
- ], { variants: {
1991
- variant: {
1992
- ghost: "bg-transparent text-muted-foreground hover:bg-muted hover:text-foreground",
1993
- solid: "bg-primary text-primary-foreground hover:bg-primary/90",
1994
- soft: "bg-muted text-foreground hover:bg-muted/80",
1995
- outline: "border border-input bg-transparent text-foreground hover:bg-muted/50"
1996
- },
1997
- icon: {
1998
- true: [
1999
- "group-data-[size=sm]/input-group:w-7",
2000
- "group-data-[size=md]/input-group:w-8",
2001
- "group-data-[size=lg]/input-group:w-9"
2002
- ],
2003
- false: [
2004
- "group-data-[size=sm]/input-group:px-2 group-data-[size=sm]/input-group:text-xs",
2005
- "group-data-[size=md]/input-group:px-2.5 group-data-[size=md]/input-group:text-sm",
2006
- "group-data-[size=lg]/input-group:px-3 group-data-[size=lg]/input-group:text-sm"
2007
- ]
2008
- }
2009
- } });
2010
- var InputGroupButton = React.forwardRef(function InputGroupButton({ className, type = "button", variant = "ghost", icon = false, ...props }, ref) {
2011
- return /* @__PURE__ */ jsx("button", {
2012
- ref,
2013
- type,
2014
- "data-slot": "input-group-button",
2015
- className: cn(inputGroupButtonVariants({
2016
- variant,
2017
- icon
2018
- }), className),
2019
- ...props
2020
- });
2021
- });
2022
- InputGroupButton.displayName = "InputGroupButton";
2023
- var InputGroupInput = React.forwardRef(function InputGroupInput({ className, ...props }, ref) {
2024
- return /* @__PURE__ */ jsx("input", {
2025
- ref,
2026
- "data-slot": "input-group-control",
2027
- className: cn("min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed", "group-data-[size=sm]/input-group:px-2 group-data-[size=sm]/input-group:py-0.5 group-data-[size=sm]/input-group:text-xs", "group-data-[size=md]/input-group:px-2.5 group-data-[size=md]/input-group:py-1 group-data-[size=md]/input-group:text-sm", "group-data-[size=lg]/input-group:px-3 group-data-[size=lg]/input-group:py-1.5 group-data-[size=lg]/input-group:text-sm", className),
2028
- ...props
2029
- });
2030
- });
2031
- InputGroupInput.displayName = "InputGroupInput";
2032
- var InputGroupTextarea = React.forwardRef(function InputGroupTextarea({ className, ...props }, ref) {
2033
- return /* @__PURE__ */ jsx("textarea", {
2034
- ref,
2035
- "data-slot": "input-group-control",
2036
- className: cn("min-w-0 flex-1 resize-none bg-transparent py-2 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed", "group-data-[size=sm]/input-group:px-2 group-data-[size=sm]/input-group:text-xs", "group-data-[size=md]/input-group:px-2.5 group-data-[size=md]/input-group:text-sm", "group-data-[size=lg]/input-group:px-3 group-data-[size=lg]/input-group:text-sm", className),
2037
- ...props
2038
- });
2039
- });
2040
- InputGroupTextarea.displayName = "InputGroupTextarea";
2041
- //#endregion
2042
- //#region src/components/micro/combobox.tsx
2043
- /**
2044
- * ✅ AUDITED & REFACTORED
2045
- * - Design System Compliant (20 Commandments)
2046
- * - WCAG AAA/AA
2047
- * - Form Control Parity
2048
- * - CSS Delegated Logic
2049
- *
2050
- * 🚨 CRITICAL RULE FOR AI:
2051
- * When using <Combobox>, YOU MUST pass the `items` prop (an array of data).
2052
- * Headless UI libraries rely on this prop to build a stable internal item registry.
2053
- * If omitted, the library is forced to scan the DOM on every render to discover items,
2054
- * which causes full list re-renders, layout recalculations, and severe "content jumping" bugs.
2055
- * DO NOT rely purely on static children mapping for Base UI collection components.
2056
- */
2057
- var ComboboxContext = React.createContext({
2058
- anchor: null,
2059
- setAnchor: () => {}
2060
- });
2061
- function Combobox(props) {
2062
- const [anchor, setAnchor] = React.useState(null);
2063
- return /* @__PURE__ */ jsx(ComboboxContext.Provider, {
2064
- value: {
2065
- anchor,
2066
- setAnchor
2067
- },
2068
- children: /* @__PURE__ */ jsx(Combobox$1.Root, { ...props })
2069
- });
2070
- }
2071
- function ComboboxValue({ ...props }) {
2072
- return /* @__PURE__ */ jsx(Combobox$1.Value, {
2073
- "data-slot": "combobox-value",
2074
- ...props
2075
- });
2076
- }
2077
- function ComboboxTrigger({ className, children, ...props }) {
2078
- return /* @__PURE__ */ jsxs(Combobox$1.Trigger, {
2079
- "data-slot": "combobox-trigger",
2080
- className: cn("[&>svg:not([class*='size-'])]:size-4", className),
2081
- ...props,
2082
- children: [children, /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" })]
2083
- });
2084
- }
2085
- function ComboboxClear({ className, ...props }) {
2086
- return /* @__PURE__ */ jsx(Combobox$1.Clear, {
2087
- "data-slot": "combobox-clear",
2088
- render: /* @__PURE__ */ jsx(InputGroupButton, {
2089
- variant: "ghost",
2090
- icon: true
2091
- }),
2092
- className: cn(className),
2093
- ...props,
2094
- children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
2095
- });
2096
- }
2097
- function ComboboxInput({ className, ...props }) {
2098
- return /* @__PURE__ */ jsx(Combobox$1.Input, {
2099
- "data-slot": "combobox-input",
2100
- className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50", "group-data-[slot=input-group]/input-group:border-0", "group-data-[slot=input-group]/input-group:shadow-none", "group-data-[slot=input-group]/input-group:h-auto", "group-data-[slot=input-group]/input-group:rounded-none", "group-data-[slot=input-group]/input-group:focus-visible:ring-0", className),
2101
- ...props
2102
- });
2103
- }
2104
- var ComboboxContent = React.forwardRef(({ className, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, anchor, container, ...props }, ref) => {
2105
- const { anchor: contextAnchor } = React.useContext(ComboboxContext);
2106
- return /* @__PURE__ */ jsx(Combobox$1.Portal, {
2107
- container,
2108
- children: /* @__PURE__ */ jsx(ThemeWrapper, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
2109
- side,
2110
- sideOffset,
2111
- align,
2112
- alignOffset,
2113
- anchor: anchor || contextAnchor,
2114
- className: "isolate z-50",
2115
- children: /* @__PURE__ */ jsx(Combobox$1.Popup, {
2116
- ref,
2117
- "data-slot": "combobox-content",
2118
- className: cn("group/combobox-content relative max-h-(--available-height) min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 p-1 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 [&_[data-slot=input-group]]:mb-1 [&_[data-slot=input-group]]:w-full [&_[data-slot=input-group]]:border-input/30 [&_[data-slot=input-group]]:bg-input/30 [&_[data-slot=input-group]]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
2119
- ...props
2120
- })
2121
- }) })
2122
- });
2123
- });
2124
- ComboboxContent.displayName = "ComboboxContent";
2125
- function ComboboxList({ className, ...props }) {
2126
- return /* @__PURE__ */ jsx(Combobox$1.List, {
2127
- "data-slot": "combobox-list",
2128
- className: cn("no-scrollbar max-h-[min(calc(--spacing(72)-(--spacing(9))),calc(var(--available-height)-(--spacing(9))))] scroll-py-1 overflow-y-auto overscroll-contain data-empty:hidden", className),
2129
- ...props
2130
- });
2131
- }
2132
- function ComboboxItem({ className, children, ...props }) {
2133
- return /* @__PURE__ */ jsxs(Combobox$1.Item, {
2134
- "data-slot": "combobox-item",
2135
- className: cn("relative flex w-full cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:[&>svg]:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg:not([class*='size-'])]:size-4", className),
2136
- ...props,
2137
- children: [children, /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, {
2138
- render: /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
2139
- children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" })
2140
- })]
2141
- });
2142
- }
2143
- function ComboboxGroup({ className, ...props }) {
2144
- return /* @__PURE__ */ jsx(Combobox$1.Group, {
2145
- "data-slot": "combobox-group",
2146
- className: cn(className),
2147
- ...props
2148
- });
2149
- }
2150
- function ComboboxLabel({ className, ...props }) {
2151
- return /* @__PURE__ */ jsx(Combobox$1.GroupLabel, {
2152
- "data-slot": "combobox-label",
2153
- className: cn("px-2 py-1.5 text-xs text-muted-foreground", className),
2154
- ...props
2155
- });
2156
- }
2157
- function ComboboxCollection({ ...props }) {
2158
- return /* @__PURE__ */ jsx(Combobox$1.Collection, {
2159
- "data-slot": "combobox-collection",
2160
- ...props
2161
- });
2162
- }
2163
- function ComboboxEmpty({ className, ...props }) {
2164
- return /* @__PURE__ */ jsx(Combobox$1.Empty, {
2165
- "data-slot": "combobox-empty",
2166
- className: cn("hidden justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex", className),
2167
- ...props
2168
- });
2169
- }
2170
- function ComboboxSeparator({ className, ...props }) {
2171
- return /* @__PURE__ */ jsx(Combobox$1.Separator, {
2172
- "data-slot": "combobox-separator",
2173
- className: cn("my-1 h-px bg-border", className),
2174
- ...props
2175
- });
2176
- }
2177
- var comboboxChipsVariants = cva("group/combobox-chips flex flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:focus-within:ring-3 has-aria-invalid:focus-within:ring-destructive/20 has-[[data-slot=combobox-chip]]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:focus-within:ring-destructive/40 has-disabled:opacity-50 has-disabled:cursor-not-allowed has-disabled:pointer-events-none", { variants: { size: {
2178
- sm: "chips-sm min-h-7 px-2 py-0.5 text-xs",
2179
- md: "chips-md min-h-8 px-2.5 py-1 text-sm",
2180
- lg: "chips-lg min-h-9 px-3 py-1.5 text-sm"
2181
- } } });
2182
- function ComboboxChips({ className, size = "md", ...props }) {
2183
- return /* @__PURE__ */ jsx(Combobox$1.Chips, {
2184
- "data-slot": "combobox-chips",
2185
- className: cn(comboboxChipsVariants({ size }), className),
2186
- ...props
2187
- });
2188
- }
2189
- function ComboboxChip({ className, children, showRemove = true, ...props }) {
2190
- return /* @__PURE__ */ jsxs(Combobox$1.Chip, {
2191
- "data-slot": "combobox-chip",
2192
- className: cn("flex w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", "h-5 text-xs", "group-[.chips-sm]/combobox-chips:h-4 group-[.chips-sm]/combobox-chips:text-[10px]", "group-[.chips-lg]/combobox-chips:h-6 group-[.chips-lg]/combobox-chips:text-sm", className),
2193
- ...props,
2194
- children: [children, showRemove && /* @__PURE__ */ jsx(Combobox$1.ChipRemove, {
2195
- className: "-ml-1 flex size-4 items-center justify-center rounded-sm opacity-50 transition-opacity outline-none hover:opacity-100 hover:bg-foreground/10 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background",
2196
- "data-slot": "combobox-chip-remove",
2197
- children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none size-3" })
2198
- })]
2199
- });
2200
- }
2201
- function ComboboxChipsInput({ className, ...props }) {
2202
- return /* @__PURE__ */ jsx(Combobox$1.Input, {
2203
- "data-slot": "combobox-chip-input",
2204
- className: cn("min-w-16 flex-1 outline-none bg-transparent disabled:opacity-100 disabled:cursor-not-allowed disabled:pointer-events-none", "h-5", "group-[.chips-sm]/combobox-chips:h-4", "group-[.chips-lg]/combobox-chips:h-6", className),
2205
- ...props
2206
- });
2207
- }
2208
- function useComboboxContext() {
2209
- const context = React.useContext(ComboboxContext);
2210
- if (!context) throw new Error("useComboboxContext must be used within a Combobox");
2211
- return context;
2212
- }
2213
- var ComboboxAnchor = React.forwardRef(({ className, ...props }, ref) => {
2214
- const { setAnchor } = useComboboxContext();
2215
- return /* @__PURE__ */ jsx("div", {
2216
- ref: (node) => {
2217
- setAnchor(node);
2218
- if (typeof ref === "function") ref(node);
2219
- else if (ref) ref.current = node;
2220
- },
2221
- "data-slot": "combobox-anchor",
2222
- className,
2223
- ...props
2224
- });
2225
- });
2226
- ComboboxAnchor.displayName = "ComboboxAnchor";
2227
- //#endregion
2228
- //#region src/components/micro/command.tsx
2229
- /**
2230
- * ✅ AUDITED & REFACTORED
2231
- * - Design System Compliant (22 Commandments)
2232
- * - WCAG AAA/AA
2233
- * - Form Control Parity
2234
- * - CSS Delegated Logic
2235
- */
2236
- var CommandContext = React.createContext({ size: "md" });
2237
- var Command = React.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ jsx(CommandContext.Provider, {
2238
- value: { size },
2239
- children: /* @__PURE__ */ jsx(Command$1, {
2240
- ref,
2241
- "data-slot": "command",
2242
- className: cn("flex size-full flex-col overflow-hidden rounded-xl bg-popover text-popover-foreground", className),
2243
- ...props
2244
- })
2245
- }));
2246
- Command.displayName = "Command";
2247
- var commandInputVariants = cva("w-full outline-hidden disabled:cursor-not-allowed disabled:opacity-50", {
2248
- variants: { size: {
2249
- sm: "text-sm",
2250
- md: "text-sm",
2251
- lg: "text-base"
2252
- } },
2253
- defaultVariants: { size: "md" }
2254
- });
2255
- var CommandInput = React.forwardRef(({ className, ...props }, ref) => {
2256
- const { size } = React.useContext(CommandContext);
2257
- return /* @__PURE__ */ jsx("div", {
2258
- "data-slot": "command-input-wrapper",
2259
- className: cn("pb-0", size === "sm" && "p-1", size === "md" && "p-2", size === "lg" && "p-3"),
2260
- children: /* @__PURE__ */ jsxs(InputGroup, {
2261
- className: cn("rounded-lg border-input/30 bg-input/30 shadow-none", size === "sm" && "h-8", size === "md" && "h-10", size === "lg" && "h-11"),
2262
- children: [/* @__PURE__ */ jsx(Command$1.Input, {
2263
- ref,
2264
- "data-slot": "command-input",
2265
- className: cn(commandInputVariants({ size }), className),
2266
- ...props
2267
- }), /* @__PURE__ */ jsx(InputGroupAddon, {
2268
- className: cn("shrink-0", size === "lg" ? "pl-3" : "pl-2"),
2269
- children: /* @__PURE__ */ jsx(SearchIcon, { className: cn("opacity-50", size === "lg" ? "size-5" : "size-4") })
2270
- })]
2271
- })
2272
- });
2273
- });
2274
- CommandInput.displayName = "CommandInput";
2275
- var CommandList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1.List, {
2276
- ref,
2277
- "data-slot": "command-list",
2278
- className: cn("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", className),
2279
- ...props
2280
- }));
2281
- CommandList.displayName = "CommandList";
2282
- var CommandEmpty = React.forwardRef(({ className, ...props }, ref) => {
2283
- const { size } = React.useContext(CommandContext);
2284
- return /* @__PURE__ */ jsx(Command$1.Empty, {
2285
- ref,
2286
- "data-slot": "command-empty",
2287
- className: cn("text-center", size === "sm" && "py-4 text-xs", size === "md" && "py-6 text-sm", size === "lg" && "py-8 text-base", className),
2288
- ...props
2289
- });
2290
- });
2291
- CommandEmpty.displayName = "CommandEmpty";
2292
- var commandGroupVariants = cva("overflow-hidden text-foreground **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground **:[[cmdk-group-items]]:flex **:[[cmdk-group-items]]:flex-col", {
2293
- variants: { size: {
2294
- sm: "p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-items]]:gap-0.5",
2295
- md: "p-2 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-items]]:gap-1",
2296
- lg: "p-3 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-2 **:[[cmdk-group-heading]]:text-sm **:[[cmdk-group-items]]:gap-1"
2297
- } },
2298
- defaultVariants: { size: "md" }
2299
- });
2300
- var CommandGroup = React.forwardRef(({ className, ...props }, ref) => {
2301
- const { size } = React.useContext(CommandContext);
2302
- return /* @__PURE__ */ jsx(Command$1.Group, {
2303
- ref,
2304
- "data-slot": "command-group",
2305
- className: cn(commandGroupVariants({ size }), className),
2306
- ...props
2307
- });
2308
- });
2309
- CommandGroup.displayName = "CommandGroup";
2310
- var CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1.Separator, {
2311
- ref,
2312
- "data-slot": "command-separator",
2313
- className: cn("-mx-1 h-px bg-border", className),
2314
- ...props
2315
- }));
2316
- CommandSeparator.displayName = "CommandSeparator";
2317
- var commandItemVariants = cva("group/command-item relative flex cursor-default items-center outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 hover:bg-accent hover:text-accent-foreground data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground *:pointer-events-none *:shrink-0 hover:*:text-accent-foreground data-[selected=true]:*:text-accent-foreground aria-selected:*:text-accent-foreground", {
2318
- variants: { size: {
2319
- sm: "gap-2 rounded-sm px-2 py-1 text-xs **:[svg:not([class*='size-'])]:size-3.5",
2320
- md: "gap-2 rounded-sm px-2 py-1.5 text-sm **:[svg:not([class*='size-'])]:size-4",
2321
- lg: "gap-3 rounded-md px-3 py-2.5 text-base **:[svg:not([class*='size-'])]:size-5"
2322
- } },
2323
- defaultVariants: { size: "md" }
2324
- });
2325
- var CommandItem = React.forwardRef(({ className, children, ...props }, ref) => {
2326
- const { size } = React.useContext(CommandContext);
2327
- return /* @__PURE__ */ jsx(Command$1.Item, {
2328
- ref,
2329
- "data-slot": "command-item",
2330
- className: cn(commandItemVariants({ size }), className),
2331
- ...props,
2332
- children
2333
- });
2334
- });
2335
- CommandItem.displayName = "CommandItem";
2336
- var CommandShortcut = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("span", {
2337
- ref,
2338
- "data-slot": "command-shortcut",
2339
- className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", className),
2340
- ...props
2341
- }));
2342
- CommandShortcut.displayName = "CommandShortcut";
2343
- //#endregion
2344
- //#region src/components/micro/context-menu.tsx
2345
- /**
2346
- * ✅ AUDITED & REFACTORED
2347
- * - Design System Compliant (22 Commandments)
2348
- * - WCAG AAA/AA
2349
- * - Form Control Parity
2350
- * - CSS Delegated Logic
2351
- */
2352
- /**
2353
- * @description Displays a menu to the user — triggered by a right-click.
2354
- * @requires ContextMenuTrigger, ContextMenuContent, ContextMenuItem
2355
- * @example
2356
- * <ContextMenu>
2357
- * <ContextMenuTrigger>Right click here</ContextMenuTrigger>
2358
- * <ContextMenuContent>
2359
- * <ContextMenuItem>Profile</ContextMenuItem>
2360
- * </ContextMenuContent>
2361
- * </ContextMenu>
2362
- */
2363
- function ContextMenu({ ...props }) {
2364
- return /* @__PURE__ */ jsx(ContextMenu$1.Root, {
2365
- "data-slot": "context-menu",
2366
- ...props
2367
- });
2368
- }
2369
- ContextMenu.displayName = "ContextMenu";
2370
- var ContextMenuTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenu$1.Trigger, {
2371
- ref,
2372
- "data-slot": "context-menu-trigger",
2373
- className: cn("select-none", className),
2374
- ...props
2375
- }));
2376
- ContextMenuTrigger.displayName = "ContextMenuTrigger";
2377
- var ContextMenuContent = React.forwardRef(({ className, align = "start", alignOffset = 0, side = "right", sideOffset = 4, container, children, ...props }, ref) => {
2378
- return /* @__PURE__ */ jsx(ContextMenu$1.Portal, {
2379
- container,
2380
- children: /* @__PURE__ */ jsx(ThemeWrapper, { children: /* @__PURE__ */ jsx(ContextMenu$1.Positioner, {
2381
- align,
2382
- alignOffset,
2383
- side,
2384
- sideOffset,
2385
- className: "isolate z-50 outline-none",
2386
- children: /* @__PURE__ */ jsx(ContextMenu$1.Popup, {
2387
- ref,
2388
- "data-slot": "context-menu-content",
2389
- className: cn("z-50 min-w-[8rem] origin-(--transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-md duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
2390
- ...props,
2391
- children
2392
- })
2393
- }) })
2394
- });
2395
- });
2396
- ContextMenuContent.displayName = "ContextMenuContent";
2397
- function ContextMenuGroup({ ...props }) {
2398
- return /* @__PURE__ */ jsx(ContextMenu$1.Group, {
2399
- "data-slot": "context-menu-group",
2400
- ...props
2401
- });
2402
- }
2403
- ContextMenuGroup.displayName = "ContextMenuGroup";
2404
- var ContextMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenu$1.GroupLabel, {
2405
- ref,
2406
- "data-slot": "context-menu-label",
2407
- "data-inset": inset,
2408
- className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", className),
2409
- ...props
2410
- }));
2411
- ContextMenuLabel.displayName = "ContextMenuLabel";
2412
- var ContextMenuItem = React.forwardRef(({ className, inset, variant, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenu$1.Item, {
2413
- ref,
2414
- "data-slot": "context-menu-item",
2415
- "data-inset": inset,
2416
- "data-variant": variant,
2417
- className: cn("group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 *:pointer-events-none *:shrink-0 **:[svg:not([class*='size-'])]:size-4 focus:*:text-accent-foreground data-[variant=destructive]:*:text-destructive", className),
2418
- ...props
2419
- }));
2420
- ContextMenuItem.displayName = "ContextMenuItem";
2421
- function ContextMenuSub({ ...props }) {
2422
- return /* @__PURE__ */ jsx(ContextMenu$1.SubmenuRoot, {
2423
- "data-slot": "context-menu-sub",
2424
- ...props
2425
- });
2426
- }
2427
- ContextMenuSub.displayName = "ContextMenuSub";
2428
- var ContextMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenu$1.SubmenuTrigger, {
2429
- ref,
2430
- "data-slot": "context-menu-sub-trigger",
2431
- "data-inset": inset,
2432
- className: cn("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground", className),
2433
- ...props,
2434
- children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4 shrink-0" })]
2435
- }));
2436
- ContextMenuSubTrigger.displayName = "ContextMenuSubTrigger";
2437
- function ContextMenuSubContent({ ...props }) {
2438
- return /* @__PURE__ */ jsx(ContextMenuContent, {
2439
- "data-slot": "context-menu-sub-content",
2440
- className: "shadow-lg",
2441
- side: "right",
2442
- ...props
2443
- });
2444
- }
2445
- ContextMenuSubContent.displayName = "ContextMenuSubContent";
2446
- var ContextMenuCheckboxItem = React.forwardRef(({ className, children, checked, inset, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenu$1.CheckboxItem, {
2447
- ref,
2448
- "data-slot": "context-menu-checkbox-item",
2449
- "data-inset": inset,
2450
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50", className),
2451
- checked,
2452
- ...props,
2453
- children: [/* @__PURE__ */ jsx("span", {
2454
- className: "pointer-events-none absolute right-2",
2455
- children: /* @__PURE__ */ jsx(ContextMenu$1.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
2456
- }), children]
2457
- }));
2458
- ContextMenuCheckboxItem.displayName = "ContextMenuCheckboxItem";
2459
- function ContextMenuRadioGroup({ ...props }) {
2460
- return /* @__PURE__ */ jsx(ContextMenu$1.RadioGroup, {
2461
- "data-slot": "context-menu-radio-group",
2462
- ...props
2463
- });
2464
- }
2465
- ContextMenuRadioGroup.displayName = "ContextMenuRadioGroup";
2466
- var ContextMenuRadioItem = React.forwardRef(({ className, children, inset, ...props }, ref) => /* @__PURE__ */ jsxs(ContextMenu$1.RadioItem, {
2467
- ref,
2468
- "data-slot": "context-menu-radio-item",
2469
- "data-inset": inset,
2470
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50", className),
2471
- ...props,
2472
- children: [/* @__PURE__ */ jsx("span", {
2473
- className: "pointer-events-none absolute right-2",
2474
- children: /* @__PURE__ */ jsx(ContextMenu$1.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) })
2475
- }), children]
2476
- }));
2477
- ContextMenuRadioItem.displayName = "ContextMenuRadioItem";
2478
- var ContextMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenu$1.Separator, {
2479
- ref,
2480
- "data-slot": "context-menu-separator",
2481
- className: cn("-mx-1 my-1 h-px bg-border", className),
2482
- ...props
2483
- }));
2484
- ContextMenuSeparator.displayName = "ContextMenuSeparator";
2485
- var ContextMenuShortcut = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("span", {
2486
- ref,
2487
- "data-slot": "context-menu-shortcut",
2488
- className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground", className),
2489
- ...props
2490
- }));
2491
- ContextMenuShortcut.displayName = "ContextMenuShortcut";
2492
- //#endregion
2493
- //#region src/components/micro/dialog.tsx
2494
- /**
2495
- * ✅ AUDITED & REFACTORED
2496
- * - Design System Compliant (22 Commandments)
2497
- * - WCAG AAA/AA
2498
- * - Form Control Parity
2499
- * - CSS Delegated Logic
2500
- */
2501
- function Dialog({ ...props }) {
2502
- return /* @__PURE__ */ jsx(Dialog$1.Root, {
2503
- "data-slot": "dialog",
2504
- ...props
2505
- });
2506
- }
2507
- var DialogTrigger = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(Dialog$1.Trigger, {
2508
- ref,
2509
- "data-slot": "dialog-trigger",
2510
- ...props
2511
- }));
2512
- DialogTrigger.displayName = "DialogTrigger";
2513
- var DialogClose = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(Dialog$1.Close, {
2514
- ref,
2515
- "data-slot": "dialog-close",
2516
- ...props
2517
- }));
2518
- DialogClose.displayName = "DialogClose";
2519
- var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
2520
- ref,
2521
- "data-slot": "dialog-overlay",
2522
- className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
2523
- ...props
2524
- }));
2525
- DialogOverlay.displayName = "DialogOverlay";
2526
- var DialogContent = React.forwardRef(({ className, children, container, ...props }, ref) => /* @__PURE__ */ jsx(Dialog$1.Portal, {
2527
- container,
2528
- children: /* @__PURE__ */ jsxs(ThemeWrapper, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsx(Dialog$1.Popup, {
2529
- ref,
2530
- "data-slot": "dialog-content",
2531
- className: cn("group/dialog-content fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none max-h-[calc(100dvh-2rem)] sm:max-h-[calc(100dvh-4rem)] overflow-y-auto", "data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
2532
- ...props,
2533
- children
2534
- })] })
2535
- }));
2536
- DialogContent.displayName = "DialogContent";
2537
- var DialogHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
2538
- ref,
2539
- "data-slot": "dialog-header",
2540
- className: cn("flex flex-col gap-2", className),
2541
- ...props
2542
- }));
2543
- DialogHeader.displayName = "DialogHeader";
2544
- var DialogFooter = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx("div", {
2545
- ref,
2546
- "data-slot": "dialog-footer",
2547
- className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
2548
- ...props,
2549
- children
2550
- }));
2551
- DialogFooter.displayName = "DialogFooter";
2552
- var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Dialog$1.Title, {
2553
- ref,
2554
- "data-slot": "dialog-title",
2555
- className: cn("font-heading text-base leading-none font-medium", className),
2556
- ...props
2557
- }));
2558
- DialogTitle.displayName = "DialogTitle";
2559
- var DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Dialog$1.Description, {
2560
- ref,
2561
- "data-slot": "dialog-description",
2562
- className: cn("text-sm text-muted-foreground", className),
2563
- ...props
2564
- }));
2565
- DialogDescription.displayName = "DialogDescription";
2566
- //#endregion
2567
- //#region src/components/micro/direction.tsx
2568
- /**
2569
- * ✅ AUDITED & REFACTORED
2570
- * - Design System Compliant (22 Commandments)
2571
- * - WCAG AAA/AA
2572
- * - Form Control Parity
2573
- * - CSS Delegated Logic
2574
- */
2575
- //#endregion
2576
- //#region src/components/micro/drawer.tsx
2577
- /**
2578
- * ✅ AUDITED & REFACTORED
2579
- * - Design System Compliant (22 Commandments)
2580
- * - WCAG AAA/AA
2581
- * - Form Control Parity
2582
- * - CSS Delegated Logic
2583
- */
2584
- function Drawer({ ...props }) {
2585
- return /* @__PURE__ */ jsx(Drawer$1.Root, {
2586
- "data-slot": "drawer",
2587
- ...props
2588
- });
2589
- }
2590
- Drawer.displayName = "Drawer";
2591
- var DrawerTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Drawer$1.Trigger, {
2592
- ref,
2593
- "data-slot": "drawer-trigger",
2594
- ...props
2595
- }));
2596
- DrawerTrigger.displayName = "DrawerTrigger";
2597
- var DrawerClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Drawer$1.Close, {
2598
- ref,
2599
- "data-slot": "drawer-close",
2600
- ...props
2601
- }));
2602
- DrawerClose.displayName = "DrawerClose";
2603
- var DrawerOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Drawer$1.Overlay, {
2604
- ref,
2605
- "data-slot": "drawer-overlay",
2606
- className: cn("fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
2607
- ...props
2608
- }));
2609
- DrawerOverlay.displayName = "DrawerOverlay";
2610
- var DrawerContent = React.forwardRef(({ className, children, container, ...props }, ref) => /* @__PURE__ */ jsx(Drawer$1.Portal, {
2611
- container,
2612
- children: /* @__PURE__ */ jsxs(ThemeWrapper, { children: [/* @__PURE__ */ jsx(DrawerOverlay, {}), /* @__PURE__ */ jsxs(Drawer$1.Content, {
2613
- ref,
2614
- "data-slot": "drawer-content",
2615
- className: cn("group/drawer-content fixed z-50 flex h-auto flex-col bg-popover text-sm text-popover-foreground data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm", className),
2616
- ...props,
2617
- children: [/* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children]
2618
- })] })
2619
- }));
2620
- DrawerContent.displayName = "DrawerContent";
2621
- var DrawerHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
2622
- ref,
2623
- "data-slot": "drawer-header",
2624
- className: cn("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-left", className),
2625
- ...props
2626
- }));
2627
- DrawerHeader.displayName = "DrawerHeader";
2628
- var DrawerFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
2629
- ref,
2630
- "data-slot": "drawer-footer",
2631
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
2632
- ...props
2633
- }));
2634
- DrawerFooter.displayName = "DrawerFooter";
2635
- var DrawerTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Drawer$1.Title, {
2636
- ref,
2637
- "data-slot": "drawer-title",
2638
- className: cn("font-heading text-base font-medium text-foreground", className),
2639
- ...props
2640
- }));
2641
- DrawerTitle.displayName = "DrawerTitle";
2642
- var DrawerDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Drawer$1.Description, {
2643
- ref,
2644
- "data-slot": "drawer-description",
2645
- className: cn("text-sm text-muted-foreground", className),
2646
- ...props
2647
- }));
2648
- DrawerDescription.displayName = "DrawerDescription";
2649
- //#endregion
2650
- //#region src/components/micro/dropdown-menu.tsx
2651
- /**
2652
- * ✅ AUDITED & REFACTORED
2653
- * - Design System Compliant (22 Commandments)
2654
- * - WCAG AAA/AA
2655
- * - Form Control Parity
2656
- * - CSS Delegated Logic
2657
- */
2658
- function DropdownMenu({ ...props }) {
2659
- return /* @__PURE__ */ jsx(Menu.Root, {
2660
- "data-slot": "dropdown-menu",
2661
- ...props
2662
- });
2663
- }
2664
- DropdownMenu.displayName = "DropdownMenu";
2665
- var DropdownMenuTrigger = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(Menu.Trigger, {
2666
- ref,
2667
- "data-slot": "dropdown-menu-trigger",
2668
- ...props
2669
- }));
2670
- DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
2671
- var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, side = "bottom", align = "start", alignOffset = 0, container, children, ...props }, ref) => /* @__PURE__ */ jsx(Menu.Portal, {
2672
- container,
2673
- children: /* @__PURE__ */ jsx(ThemeWrapper, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
2674
- align,
2675
- alignOffset,
2676
- side,
2677
- sideOffset,
2678
- className: "isolate z-50 outline-none",
2679
- children: /* @__PURE__ */ jsx(Menu.Popup, {
2680
- ref,
2681
- "data-slot": "dropdown-menu-content",
2682
- className: cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className),
2683
- ...props,
2684
- children
2685
- })
2686
- }) })
2687
- }));
2688
- DropdownMenuContent.displayName = "DropdownMenuContent";
2689
- var DropdownMenuGroup = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(Menu.Group, {
2690
- ref,
2691
- "data-slot": "dropdown-menu-group",
2692
- ...props
2693
- }));
2694
- DropdownMenuGroup.displayName = "DropdownMenuGroup";
2695
- var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(Menu.GroupLabel, {
2696
- ref,
2697
- "data-slot": "dropdown-menu-label",
2698
- "data-inset": inset,
2699
- className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", className),
2700
- ...props
2701
- }));
2702
- DropdownMenuLabel.displayName = "DropdownMenuLabel";
2703
- var DropdownMenuItem = React.forwardRef(({ className, inset, variant, ...props }, ref) => /* @__PURE__ */ jsx(Menu.Item, {
2704
- ref,
2705
- "data-slot": "dropdown-menu-item",
2706
- "data-inset": inset,
2707
- "data-variant": variant,
2708
- className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:*:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 *:pointer-events-none *:shrink-0 **:[svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:text-destructive", className),
2709
- ...props
2710
- }));
2711
- DropdownMenuItem.displayName = "DropdownMenuItem";
2712
- function DropdownMenuSub({ ...props }) {
2713
- return /* @__PURE__ */ jsx(Menu.SubmenuRoot, {
2714
- "data-slot": "dropdown-menu-sub",
2715
- ...props
2716
- });
2717
- }
2718
- DropdownMenuSub.displayName = "DropdownMenuSub";
2719
- var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
2720
- ref,
2721
- "data-slot": "dropdown-menu-sub-trigger",
2722
- "data-inset": inset,
2723
- className: cn("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:*:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground *:pointer-events-none *:shrink-0 **:[svg:not([class*='size-'])]:size-4", className),
2724
- ...props,
2725
- children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
2726
- }));
2727
- DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
2728
- var DropdownMenuSubContent = React.forwardRef(({ align = "start", alignOffset = -3, side = "right", sideOffset = 0, className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuContent, {
2729
- ref,
2730
- "data-slot": "dropdown-menu-sub-content",
2731
- className: cn("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
2732
- align,
2733
- alignOffset,
2734
- side,
2735
- sideOffset,
2736
- ...props
2737
- }));
2738
- DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
2739
- var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, inset, ...props }, ref) => /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
2740
- ref,
2741
- "data-slot": "dropdown-menu-checkbox-item",
2742
- "data-inset": inset,
2743
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:*:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 *:pointer-events-none *:shrink-0 **:[svg:not([class*='size-'])]:size-4", className),
2744
- checked,
2745
- ...props,
2746
- children: [/* @__PURE__ */ jsx("span", {
2747
- className: "pointer-events-none absolute right-2 flex items-center justify-center",
2748
- "data-slot": "dropdown-menu-checkbox-item-indicator",
2749
- children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
2750
- }), children]
2751
- }));
2752
- DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
2753
- var DropdownMenuRadioGroup = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(Menu.RadioGroup, {
2754
- ref,
2755
- "data-slot": "dropdown-menu-radio-group",
2756
- ...props
2757
- }));
2758
- DropdownMenuRadioGroup.displayName = "DropdownMenuRadioGroup";
2759
- var DropdownMenuRadioItem = React.forwardRef(({ className, children, inset, ...props }, ref) => /* @__PURE__ */ jsxs(Menu.RadioItem, {
2760
- ref,
2761
- "data-slot": "dropdown-menu-radio-item",
2762
- "data-inset": inset,
2763
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:*:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 *:pointer-events-none *:shrink-0 **:[svg:not([class*='size-'])]:size-4", className),
2764
- ...props,
2765
- children: [/* @__PURE__ */ jsx("span", {
2766
- className: "pointer-events-none absolute right-2 flex items-center justify-center",
2767
- "data-slot": "dropdown-menu-radio-item-indicator",
2768
- children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) })
2769
- }), children]
2770
- }));
2771
- DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
2772
- var DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Menu.Separator, {
2773
- ref,
2774
- "data-slot": "dropdown-menu-separator",
2775
- className: cn("-mx-1 my-1 h-px bg-border", className),
2776
- ...props
2777
- }));
2778
- DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
2779
- var DropdownMenuShortcut = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("span", {
2780
- ref,
2781
- "data-slot": "dropdown-menu-shortcut",
2782
- className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", className),
2783
- ...props
2784
- }));
2785
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
2786
- //#endregion
2787
- //#region src/components/micro/empty.tsx
2788
- /**
2789
- * ✅ AUDITED & REFACTORED
2790
- * - Design System Compliant (22 Commandments)
2791
- * - WCAG AAA/AA
2792
- * - Form Control Parity
2793
- * - CSS Delegated Logic
2794
- */
2795
- /**
2796
- * @description A placeholder state component for empty data.
2797
- * @requires EmptyHeader, EmptyTitle, EmptyDescription, EmptyMedia, EmptyContent, EmptyAction
2798
- * @example
2799
- * <Empty>
2800
- * <EmptyHeader>
2801
- * <EmptyTitle>No data</EmptyTitle>
2802
- * </EmptyHeader>
2803
- * </Empty>
2804
- */
2805
- var Empty = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
2806
- ref,
2807
- "data-slot": "empty",
2808
- className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance", className),
2809
- ...props
2810
- }));
2811
- Empty.displayName = "Empty";
2812
- var EmptyHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
2813
- ref,
2814
- "data-slot": "empty-header",
2815
- className: cn("flex max-w-sm flex-col items-center gap-2", className),
2816
- ...props
2817
- }));
2818
- EmptyHeader.displayName = "EmptyHeader";
2819
- var emptyMediaVariants = cva("flex shrink-0 items-center justify-center *:pointer-events-none *:shrink-0", { variants: { variant: { icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground **:[svg:not([class*='size-'])]:size-4" } } });
2820
- var EmptyMedia = React.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx("div", {
2821
- ref,
2822
- "data-slot": "empty-icon",
2823
- "data-variant": variant,
2824
- className: cn(emptyMediaVariants({
2825
- variant,
2826
- className
2827
- })),
2828
- ...props
2829
- }));
2830
- EmptyMedia.displayName = "EmptyMedia";
2831
- var EmptyTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("h3", {
2832
- ref,
2833
- "data-slot": "empty-title",
2834
- className: cn("font-heading text-sm font-medium tracking-tight", className),
2835
- ...props
2836
- }));
2837
- EmptyTitle.displayName = "EmptyTitle";
2838
- var EmptyDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", {
2839
- ref,
2840
- "data-slot": "empty-description",
2841
- className: cn("text-sm/relaxed text-muted-foreground [&_a]:underline [&_a]:underline-offset-4 [&_a:hover]:text-primary", className),
2842
- ...props
2843
- }));
2844
- EmptyDescription.displayName = "EmptyDescription";
2845
- var EmptyContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
2846
- ref,
2847
- "data-slot": "empty-content",
2848
- className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance", className),
2849
- ...props
2850
- }));
2851
- EmptyContent.displayName = "EmptyContent";
2852
- var EmptyAction = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
2853
- ref,
2854
- "data-slot": "empty-action",
2855
- className: cn("flex flex-col items-center gap-2", className),
2856
- ...props
2857
- }));
2858
- EmptyAction.displayName = "EmptyAction";
2859
- //#endregion
2860
- //#region src/components/micro/label.tsx
2861
- /**
2862
- * ✅ AUDITED & REFACTORED
2863
- * - Design System Compliant (22 Commandments)
2864
- * - WCAG AAA/AA
2865
- * - Form Control Parity
2866
- * - CSS Delegated Logic
2867
- */
2868
- var labelVariants = cva("flex items-center gap-2 leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[invalid=true]:text-destructive", { variants: { size: {
2869
- sm: "text-xs",
2870
- md: "text-sm",
2871
- lg: "text-sm"
2872
- } } });
2873
- /**
2874
- * @description Renders an accessible label associated with controls.
2875
- * @example
2876
- * <Label htmlFor="email">Email</Label>
2877
- */
2878
- var Label = React.forwardRef(({ className, size = "md", ...props }, ref) => {
2879
- return /* @__PURE__ */ jsx("label", {
2880
- ref,
2881
- "data-slot": "label",
2882
- className: cn(labelVariants({
2883
- size,
2884
- className
2885
- })),
2886
- ...props
2887
- });
2888
- });
2889
- Label.displayName = "Label";
2890
- //#endregion
2891
- //#region src/components/micro/separator.tsx
2892
- /**
2893
- * ✅ AUDITED & REFACTORED
2894
- * - Design System Compliant (22 Commandments)
2895
- * - WCAG AAA/AA
2896
- * - Form Control Parity
2897
- * - CSS Delegated Logic
2898
- */
2899
- /**
2900
- * @description Visually or semantically separates content.
2901
- * @example
2902
- * <Separator orientation="vertical" />
2903
- */
2904
- function Separator({ className, orientation = "horizontal", ...props }) {
2905
- return /* @__PURE__ */ jsx(Separator$1, {
2906
- "data-slot": "separator",
2907
- orientation,
2908
- className: cn("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", className),
2909
- ...props
2910
- });
2911
- }
2912
- //#endregion
2913
- //#region src/components/micro/field.tsx
2914
- /**
2915
- * ✅ AUDITED & REFACTORED
2916
- * - Design System Compliant (22 Commandments)
2917
- * - WCAG AAA/AA
2918
- * - Form Control Parity
2919
- * - CSS Delegated Logic
2920
- */
2921
- var FieldSet = React.forwardRef(({ className, ...props }, ref) => {
2922
- return /* @__PURE__ */ jsx("fieldset", {
2923
- ref,
2924
- "data-slot": "field-set",
2925
- className: cn("flex flex-col gap-4", className),
2926
- ...props
2927
- });
2928
- });
2929
- FieldSet.displayName = "FieldSet";
2930
- var FieldLegend = React.forwardRef(({ className, variant = "legend", ...props }, ref) => {
2931
- return /* @__PURE__ */ jsx("legend", {
2932
- ref,
2933
- "data-slot": "field-legend",
2934
- "data-variant": variant,
2935
- className: cn("mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base", className),
2936
- ...props
2937
- });
2938
- });
2939
- FieldLegend.displayName = "FieldLegend";
2940
- var FieldGroup = React.forwardRef(({ className, ...props }, ref) => {
2941
- return /* @__PURE__ */ jsx("div", {
2942
- ref,
2943
- "data-slot": "field-group",
2944
- className: cn("group/field-group flex flex-col gap-5 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4", className),
2945
- ...props
2946
- });
2947
- });
2948
- FieldGroup.displayName = "FieldGroup";
2949
- var fieldVariants = cva("group/field flex min-w-fit", {
2950
- variants: {
2951
- orientation: {
2952
- vertical: "flex-col [&>.sr-only]:w-auto",
2953
- horizontal: "flex-row items-center [&>[data-slot=field-label]]:flex-auto",
2954
- responsive: "flex-col @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>[data-slot=field-label]]:flex-auto [&>.sr-only]:w-auto"
2955
- },
2956
- size: {
2957
- sm: "",
2958
- md: "",
2959
- lg: ""
2960
- }
2961
- },
2962
- compoundVariants: [
2963
- {
2964
- orientation: "vertical",
2965
- size: "sm",
2966
- className: "gap-0.5"
2967
- },
2968
- {
2969
- orientation: "vertical",
2970
- size: "md",
2971
- className: "gap-0.5"
2972
- },
2973
- {
2974
- orientation: "vertical",
2975
- size: "lg",
2976
- className: "gap-0.5"
2977
- },
2978
- {
2979
- orientation: "horizontal",
2980
- size: "sm",
2981
- className: "gap-1"
2982
- },
2983
- {
2984
- orientation: "horizontal",
2985
- size: "md",
2986
- className: "gap-1.5"
2987
- },
2988
- {
2989
- orientation: "horizontal",
2990
- size: "lg",
2991
- className: "gap-2"
2992
- },
2993
- {
2994
- orientation: "responsive",
2995
- size: "sm",
2996
- className: "gap-0.5 @md/field-group:gap-1"
2997
- },
2998
- {
2999
- orientation: "responsive",
3000
- size: "md",
3001
- className: "gap-0.5 @md/field-group:gap-1.5"
3002
- },
3003
- {
3004
- orientation: "responsive",
3005
- size: "lg",
3006
- className: "gap-0.5 @md/field-group:gap-2"
3007
- }
3008
- ]
3009
- });
3010
- var Field = React.forwardRef(({ className, orientation = "vertical", size = "md", error, ...props }, ref) => {
3011
- return /* @__PURE__ */ jsx("div", {
3012
- ref,
3013
- role: "group",
3014
- "data-slot": "field",
3015
- "data-orientation": orientation,
3016
- "data-size": size,
3017
- "data-invalid": !!error,
3018
- className: cn(fieldVariants({
3019
- orientation,
3020
- size
3021
- }), className),
3022
- ...props
3023
- });
3024
- });
3025
- Field.displayName = "Field";
3026
- var FieldContent = React.forwardRef(({ className, ...props }, ref) => {
3027
- return /* @__PURE__ */ jsx("div", {
3028
- ref,
3029
- "data-slot": "field-content",
3030
- className: cn("group/field-content flex flex-1 flex-col gap-0.5 leading-snug", className),
3031
- ...props
3032
- });
3033
- });
3034
- FieldContent.displayName = "FieldContent";
3035
- var FieldLabel = React.forwardRef(({ className, ...props }, ref) => {
3036
- return /* @__PURE__ */ jsx(Label, {
3037
- ref,
3038
- "data-slot": "field-label",
3039
- className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50", "text-sm group-data-[size=sm]/field:text-xs", className),
3040
- ...props
3041
- });
3042
- });
3043
- FieldLabel.displayName = "FieldLabel";
3044
- var FieldTitle = React.forwardRef(({ className, ...props }, ref) => {
3045
- return /* @__PURE__ */ jsx("div", {
3046
- ref,
3047
- "data-slot": "field-title",
3048
- className: cn("flex w-fit items-center gap-2 font-medium group-data-[disabled=true]/field:opacity-50", "text-sm group-data-[size=sm]/field:text-xs", className),
3049
- ...props
3050
- });
3051
- });
3052
- FieldTitle.displayName = "FieldTitle";
3053
- var FieldDescription = React.forwardRef(({ className, ...props }, ref) => {
3054
- return /* @__PURE__ */ jsx("p", {
3055
- ref,
3056
- "data-slot": "field-description",
3057
- className: cn("text-left leading-normal font-normal text-muted-foreground group-data-[orientation=horizontal]/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", "text-sm group-data-[size=sm]/field:text-xs", className),
3058
- ...props
3059
- });
3060
- });
3061
- FieldDescription.displayName = "FieldDescription";
3062
- var FieldSeparator = React.forwardRef(({ children, className, ...props }, ref) => {
3063
- return /* @__PURE__ */ jsxs("div", {
3064
- ref,
3065
- "data-slot": "field-separator",
3066
- "data-content": !!children,
3067
- className: cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
3068
- ...props,
3069
- children: [/* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }), children && /* @__PURE__ */ jsx("span", {
3070
- className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
3071
- "data-slot": "field-separator-content",
3072
- children
3073
- })]
3074
- });
3075
- });
3076
- FieldSeparator.displayName = "FieldSeparator";
3077
- var FieldError = React.forwardRef(({ className, children, errors, ...props }, ref) => {
3078
- const content = React.useMemo(() => {
3079
- if (children) return children;
3080
- if (!errors?.length) return null;
3081
- const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
3082
- if (uniqueErrors?.length == 1) return uniqueErrors[0]?.message;
3083
- return /* @__PURE__ */ jsx("ul", {
3084
- className: "ml-4 flex list-disc flex-col gap-1",
3085
- children: uniqueErrors.map((error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index))
3086
- });
3087
- }, [children, errors]);
3088
- if (!content) return null;
3089
- return /* @__PURE__ */ jsxs("div", {
3090
- ref,
3091
- role: "alert",
3092
- "data-slot": "field-error",
3093
- className: cn("text-sm font-medium text-destructive flex items-start gap-1.5 animate-in fade-in-0 slide-in-from-top-1", className),
3094
- ...props,
3095
- children: [/* @__PURE__ */ jsx(AlertCircleIcon, { className: "size-4 shrink-0 mt-0.5" }), /* @__PURE__ */ jsx("div", {
3096
- className: "flex-1",
3097
- children: content
3098
- })]
3099
- });
3100
- });
3101
- FieldError.displayName = "FieldError";
3102
- //#endregion
3103
- //#region src/components/micro/hover-card.tsx
3104
- /**
3105
- * ✅ AUDITED & REFACTORED
3106
- * - Design System Compliant (22 Commandments)
3107
- * - WCAG AAA/AA
3108
- * - Form Control Parity
3109
- * - CSS Delegated Logic
3110
- */
3111
- /**
3112
- * @description For sighted users to preview content available behind a link.
3113
- * @requires HoverCardTrigger, HoverCardContent
3114
- * @example
3115
- * <HoverCard>
3116
- * <HoverCardTrigger>Hover me</HoverCardTrigger>
3117
- * <HoverCardContent>Details</HoverCardContent>
3118
- * </HoverCard>
3119
- */
3120
- function HoverCard({ ...props }) {
3121
- return /* @__PURE__ */ jsx(PreviewCard.Root, {
3122
- "data-slot": "hover-card",
3123
- ...props
3124
- });
3125
- }
3126
- var HoverCardTrigger = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx(PreviewCard.Trigger, {
3127
- ref,
3128
- "data-slot": "hover-card-trigger",
3129
- ...props
3130
- }));
3131
- HoverCardTrigger.displayName = "HoverCardTrigger";
3132
- var HoverCardContent = React.forwardRef(({ className, side = "bottom", sideOffset = 4, align = "center", alignOffset = 4, container, ...props }, ref) => {
3133
- return /* @__PURE__ */ jsx(PreviewCard.Portal, {
3134
- container,
3135
- children: /* @__PURE__ */ jsx(ThemeWrapper, { children: /* @__PURE__ */ jsx(PreviewCard.Positioner, {
3136
- align,
3137
- alignOffset,
3138
- side,
3139
- sideOffset,
3140
- className: "isolate",
3141
- children: /* @__PURE__ */ jsx(PreviewCard.Popup, {
3142
- ref,
3143
- "data-slot": "hover-card-content",
3144
- className: cn("z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100", "data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", className),
3145
- ...props
3146
- })
3147
- }) })
3148
- });
3149
- });
3150
- HoverCardContent.displayName = "HoverCardContent";
3151
- //#endregion
3152
- //#region src/components/micro/input.tsx
3153
- /**
3154
- * ✅ AUDITED & REFACTORED
3155
- * - Design System Compliant (20 Commandments)
3156
- * - WCAG AAA/AA
3157
- * - Form Control Parity
3158
- * - CSS Delegated Logic
3159
- */
3160
- var inputVariants = cva("min-w-0 rounded-lg border border-input bg-transparent text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:ring-3 aria-invalid:focus-visible:ring-destructive/50 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:focus-visible:ring-destructive/50", { variants: { size: {
3161
- sm: "h-7 px-2 py-0.5 text-xs",
3162
- md: "h-8 px-2.5 py-1 text-sm",
3163
- lg: "h-9 px-3 py-1.5 text-sm"
3164
- } } });
3165
- /**
3166
- * @description Displays a form input field or a component that looks like an input field.
3167
- * @example
3168
- * <Input type="email" placeholder="Email" />
3169
- */
3170
- var Input = React.forwardRef(function Input({ className, size = "md", ...props }, ref) {
3171
- return /* @__PURE__ */ jsx(Input$1, {
3172
- ref,
3173
- "data-slot": "input",
3174
- className: cn(inputVariants({
3175
- size,
3176
- className
3177
- })),
3178
- ...props
3179
- });
3180
- });
3181
- Input.displayName = "Input";
3182
- //#endregion
3183
- //#region src/components/micro/input-otp.tsx
3184
- /**
3185
- * ✅ AUDITED & REFACTORED
3186
- * - Design System Compliant (20 Commandments)
3187
- * - WCAG AAA/AA
3188
- * - Form Control Parity
3189
- * - CSS Delegated Logic
3190
- */
3191
- var inputOTPVariants = cva("cn-input-otp group/otp inline-flex items-center has-disabled:opacity-50 has-disabled:cursor-not-allowed has-disabled:pointer-events-none", { variants: { size: {
3192
- sm: "min-h-7 text-xs",
3193
- md: "min-h-8 text-sm",
3194
- lg: "min-h-9 text-sm"
3195
- } } });
3196
- var InputOTP = React.forwardRef(({ className, containerClassName, size = "md", ...props }, ref) => {
3197
- return /* @__PURE__ */ jsx("div", {
3198
- "data-slot": "input-otp",
3199
- "data-size": size,
3200
- className: cn(inputOTPVariants({ size })),
3201
- children: /* @__PURE__ */ jsx(OTPInput, {
3202
- ...ref ? { ref } : {},
3203
- containerClassName: cn("flex items-center", containerClassName),
3204
- spellCheck: false,
3205
- className: cn("disabled:cursor-not-allowed disabled:opacity-100", className),
3206
- ...props
3207
- })
3208
- });
3209
- });
3210
- InputOTP.displayName = "InputOTP";
3211
- var InputOTPGroup = React.forwardRef(({ className, ...props }, ref) => {
3212
- return /* @__PURE__ */ jsx("div", {
3213
- ref,
3214
- "data-slot": "input-otp-group",
3215
- className: cn("flex items-center gap-2", className),
3216
- ...props
3217
- });
3218
- });
3219
- InputOTPGroup.displayName = "InputOTPGroup";
3220
- var InputOTPSlot = React.forwardRef(({ index, className, ...props }, ref) => {
3221
- const { char, hasFakeCaret, isActive } = React.useContext(OTPInputContext)?.slots[index] ?? {};
3222
- return /* @__PURE__ */ jsxs("div", {
3223
- ref,
3224
- "data-slot": "input-otp-slot",
3225
- "data-active": isActive ? "" : void 0,
3226
- className: cn("relative flex size-8 group-data-[size=sm]/otp:size-7 group-data-[size=lg]/otp:size-9 items-center justify-center border border-input rounded-lg bg-transparent transition-colors outline-none", "aria-invalid:border-destructive dark:aria-invalid:border-destructive/50", "data-active:z-10 data-active:border-ring data-active:ring-3 data-active:ring-ring/50 data-active:ring-offset-1 data-active:ring-offset-background", "data-active:aria-invalid:border-destructive data-active:aria-invalid:ring-3 data-active:aria-invalid:ring-destructive/50", "dark:bg-input/30 dark:data-active:aria-invalid:ring-destructive/50", className),
3227
- ...props,
3228
- children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
3229
- className: "pointer-events-none absolute inset-0 flex items-center justify-center",
3230
- children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" })
3231
- })]
3232
- });
3233
- });
3234
- InputOTPSlot.displayName = "InputOTPSlot";
3235
- var InputOTPSeparator = React.forwardRef(({ className, children, ...props }, ref) => {
3236
- return /* @__PURE__ */ jsx("div", {
3237
- ref,
3238
- "data-slot": "input-otp-separator",
3239
- className: cn("flex items-center text-muted-foreground [&>svg:not([class*='size-'])]:size-4 group-data-[size=sm]/otp:[&>svg:not([class*='size-'])]:size-3.5", className),
3240
- role: "separator",
3241
- ...props,
3242
- children
3243
- });
3244
- });
3245
- InputOTPSeparator.displayName = "InputOTPSeparator";
3246
- //#endregion
3247
- //#region src/components/micro/item.tsx
3248
- /**
3249
- * @description Base flex container for listing items consistently.
3250
- */
3251
- function ItemGroup({ className, ...props }) {
3252
- return /* @__PURE__ */ jsx("div", {
3253
- role: "list",
3254
- "data-slot": "item-group",
3255
- className: cn("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", className),
3256
- ...props
3257
- });
3258
- }
3259
- function ItemSeparator({ className, ...props }) {
3260
- return /* @__PURE__ */ jsx(Separator, {
3261
- "data-slot": "item-separator",
3262
- orientation: "horizontal",
3263
- className: cn("my-2", className),
3264
- ...props
3265
- });
3266
- }
3267
- var itemVariants = cva("group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background [&_a]:transition-colors [&_a]:hover:bg-muted border-transparent", { variants: {
3268
- variant: {
3269
- outline: "border-border",
3270
- muted: "border-transparent bg-muted/50"
3271
- },
3272
- size: {
3273
- sm: "gap-1 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0",
3274
- md: "gap-1.5 px-3 py-2.5",
3275
- lg: "gap-2 px-3.5 py-2.5"
3276
- }
3277
- } });
3278
- function Item({ className, variant, size = "md", render, ...props }) {
3279
- return useRender({
3280
- defaultTagName: "div",
3281
- props: mergeProps({ className: cn(itemVariants({
3282
- variant,
3283
- size,
3284
- className
3285
- })) }, props),
3286
- render,
3287
- state: {
3288
- slot: "item",
3289
- variant,
3290
- size
3291
- }
3292
- });
3293
- }
3294
- var itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&>svg]:pointer-events-none bg-transparent", { variants: { variant: {
3295
- icon: "[&_svg:not([class*='size-'])]:size-4",
3296
- image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&>img]:size-full [&>img]:object-cover"
3297
- } } });
3298
- function ItemMedia({ className, variant, ...props }) {
3299
- return /* @__PURE__ */ jsx("div", {
3300
- "data-slot": "item-media",
3301
- "data-variant": variant,
3302
- className: cn(itemMediaVariants({
3303
- variant,
3304
- className
3305
- })),
3306
- ...props
3307
- });
3308
- }
3309
- function ItemContent({ className, ...props }) {
3310
- return /* @__PURE__ */ jsx("div", {
3311
- "data-slot": "item-content",
3312
- className: cn("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
3313
- ...props
3314
- });
3315
- }
3316
- function ItemTitle({ className, ...props }) {
3317
- return /* @__PURE__ */ jsx("div", {
3318
- "data-slot": "item-title",
3319
- className: cn("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
3320
- ...props
3321
- });
3322
- }
3323
- function ItemDescription({ className, ...props }) {
3324
- return /* @__PURE__ */ jsx("p", {
3325
- "data-slot": "item-description",
3326
- className: cn("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
3327
- ...props
3328
- });
3329
- }
3330
- function ItemActions({ className, ...props }) {
3331
- return /* @__PURE__ */ jsx("div", {
3332
- "data-slot": "item-actions",
3333
- className: cn("flex items-center gap-2", className),
3334
- ...props
3335
- });
3336
- }
3337
- function ItemHeader({ className, ...props }) {
3338
- return /* @__PURE__ */ jsx("div", {
3339
- "data-slot": "item-header",
3340
- className: cn("flex basis-full items-center justify-between gap-2", className),
3341
- ...props
3342
- });
3343
- }
3344
- function ItemFooter({ className, ...props }) {
3345
- return /* @__PURE__ */ jsx("div", {
3346
- "data-slot": "item-footer",
3347
- className: cn("flex basis-full items-center justify-between gap-2", className),
3348
- ...props
3349
- });
3350
- }
3351
- //#endregion
3352
- //#region src/components/micro/kbd.tsx
3353
- /**
3354
- * ✅ AUDITED & REFACTORED
3355
- * - Design System Compliant (22 Commandments)
3356
- * - WCAG AAA/AA
3357
- * - Form Control Parity
3358
- * - CSS Delegated Logic
3359
- */
3360
- /**
3361
- * @description Displays a keyboard shortcut.
3362
- * @example
3363
- * <Kbd>⌘K</Kbd>
3364
- */
3365
- function Kbd({ className, ...props }) {
3366
- return /* @__PURE__ */ jsx("kbd", {
3367
- "data-slot": "kbd",
3368
- className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&>svg:not([class*='size-'])]:size-3", className),
3369
- ...props
3370
- });
3371
- }
3372
- function KbdGroup({ className, ...props }) {
3373
- return /* @__PURE__ */ jsx("kbd", {
3374
- "data-slot": "kbd-group",
3375
- className: cn("inline-flex items-center gap-1", className),
3376
- ...props
3377
- });
3378
- }
3379
- //#endregion
3380
- //#region src/components/micro/menubar.tsx
3381
- /**
3382
- * ✅ AUDITED & REFACTORED
3383
- * - Design System Compliant (22 Commandments)
3384
- * - WCAG AAA/AA
3385
- * - Form Control Parity
3386
- * - CSS Delegated Logic
3387
- */
3388
- /**
3389
- * @description A visually persistent menu common in desktop applications.
3390
- * @requires MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem
3391
- * @example
3392
- * <Menubar>
3393
- * <MenubarMenu>
3394
- * <MenubarTrigger>File</MenubarTrigger>
3395
- * <MenubarContent><MenubarItem>New</MenubarItem></MenubarContent>
3396
- * </MenubarMenu>
3397
- * </Menubar>
3398
- */
3399
- function Menubar({ className, ...props }) {
3400
- return /* @__PURE__ */ jsx(Menubar$1, {
3401
- "data-slot": "menubar",
3402
- className: cn("flex h-8 items-center gap-0.5 rounded-lg border border-border p-[3px]", className),
3403
- ...props
3404
- });
3405
- }
3406
- function MenubarMenu({ ...props }) {
3407
- return /* @__PURE__ */ jsx(DropdownMenu, {
3408
- "data-slot": "menubar-menu",
3409
- ...props
3410
- });
3411
- }
3412
- function MenubarGroup({ ...props }) {
3413
- return /* @__PURE__ */ jsx(DropdownMenuGroup, {
3414
- "data-slot": "menubar-group",
3415
- ...props
3416
- });
3417
- }
3418
- function MenubarTrigger({ className, ...props }) {
3419
- return /* @__PURE__ */ jsx(DropdownMenuTrigger, {
3420
- "data-slot": "menubar-trigger",
3421
- className: cn("flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted", className),
3422
- ...props
3423
- });
3424
- }
3425
- function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) {
3426
- return /* @__PURE__ */ jsx(DropdownMenuContent, {
3427
- "data-slot": "menubar-content",
3428
- align,
3429
- alignOffset,
3430
- sideOffset,
3431
- className: cn("min-w-36 rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", className),
3432
- ...props
3433
- });
3434
- }
3435
- function MenubarItem({ className, inset, variant, ...props }) {
3436
- return /* @__PURE__ */ jsx(DropdownMenuItem, {
3437
- "data-slot": "menubar-item",
3438
- "data-inset": inset,
3439
- "data-variant": variant,
3440
- className: cn("group/menubar-item gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:[&>svg]:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:opacity-50 [&>svg:not([class*='size-'])]:size-4 data-[variant=destructive]:[&>svg]:text-destructive", className),
3441
- ...props
3442
- });
3443
- }
3444
- function MenubarCheckboxItem({ className, children, checked, inset, ...props }) {
3445
- return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
3446
- "data-slot": "menubar-checkbox-item",
3447
- "data-inset": inset,
3448
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:[&>svg]:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&>svg]:pointer-events-none [&>svg]:shrink-0", className),
3449
- checked,
3450
- ...props,
3451
- children: [/* @__PURE__ */ jsx("span", {
3452
- className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
3453
- children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }) })
3454
- }), children]
3455
- });
3456
- }
3457
- function MenubarRadioGroup({ ...props }) {
3458
- return /* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
3459
- "data-slot": "menubar-radio-group",
3460
- ...props
3461
- });
3462
- }
3463
- function MenubarRadioItem({ className, children, inset, ...props }) {
3464
- return /* @__PURE__ */ jsxs(Menu.RadioItem, {
3465
- "data-slot": "menubar-radio-item",
3466
- "data-inset": inset,
3467
- className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:[&>svg]:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg:not([class*='size-'])]:size-4", className),
3468
- ...props,
3469
- children: [/* @__PURE__ */ jsx("span", {
3470
- className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
3471
- children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }) })
3472
- }), children]
3473
- });
3474
- }
3475
- function MenubarLabel({ className, inset, ...props }) {
3476
- return /* @__PURE__ */ jsx(DropdownMenuLabel, {
3477
- "data-slot": "menubar-label",
3478
- "data-inset": inset,
3479
- className: cn("px-1.5 py-1 text-sm font-medium data-inset:pl-7", className),
3480
- ...props
3481
- });
3482
- }
3483
- function MenubarSeparator({ className, ...props }) {
3484
- return /* @__PURE__ */ jsx(DropdownMenuSeparator, {
3485
- "data-slot": "menubar-separator",
3486
- className: cn("-mx-1 my-1 h-px bg-border", className),
3487
- ...props
3488
- });
3489
- }
3490
- function MenubarShortcut({ className, ...props }) {
3491
- return /* @__PURE__ */ jsx(DropdownMenuShortcut, {
3492
- "data-slot": "menubar-shortcut",
3493
- className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground", className),
3494
- ...props
3495
- });
3496
- }
3497
- function MenubarSub({ ...props }) {
3498
- return /* @__PURE__ */ jsx(DropdownMenuSub, {
3499
- "data-slot": "menubar-sub",
3500
- ...props
3501
- });
3502
- }
3503
- function MenubarSubTrigger({ className, inset, ...props }) {
3504
- return /* @__PURE__ */ jsx(DropdownMenuSubTrigger, {
3505
- "data-slot": "menubar-sub-trigger",
3506
- "data-inset": inset,
3507
- className: cn("gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4", className),
3508
- ...props
3509
- });
3510
- }
3511
- function MenubarSubContent({ className, ...props }) {
3512
- return /* @__PURE__ */ jsx(DropdownMenuSubContent, {
3513
- "data-slot": "menubar-sub-content",
3514
- className: cn("min-w-32 rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
3515
- ...props
3516
- });
3517
- }
3518
- //#endregion
3519
- //#region src/components/micro/navigation-menu.tsx
3520
- /**
3521
- * ✅ AUDITED & REFACTORED
3522
- * - Design System Compliant (22 Commandments)
3523
- * - WCAG AAA/AA
3524
- * - Form Control Parity
3525
- * - CSS Delegated Logic
3526
- */
3527
- /**
3528
- * @description A collection of links for navigating websites.
3529
- * @requires NavigationMenuList, NavigationMenuItem, NavigationMenuTrigger, NavigationMenuContent
3530
- */
3531
- var NavigationMenu = React.forwardRef(({ className, children, ...props }, ref) => {
3532
- return /* @__PURE__ */ jsx(NavigationMenu$1.Root, {
3533
- ref,
3534
- "data-slot": "navigation-menu",
3535
- className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className),
3536
- ...props,
3537
- children
3538
- });
3539
- });
3540
- NavigationMenu.displayName = "NavigationMenu";
3541
- var NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => {
3542
- return /* @__PURE__ */ jsx(NavigationMenu$1.List, {
3543
- ref,
3544
- "data-slot": "navigation-menu-list",
3545
- className: cn("group flex flex-1 list-none items-center justify-center gap-0", className),
3546
- ...props
3547
- });
3548
- });
3549
- NavigationMenuList.displayName = "NavigationMenuList";
3550
- var NavigationMenuItem = React.forwardRef(({ className, ...props }, ref) => {
3551
- return /* @__PURE__ */ jsx(NavigationMenu$1.Item, {
3552
- ref,
3553
- "data-slot": "navigation-menu-item",
3554
- className: cn("relative", className),
3555
- ...props
3556
- });
3557
- });
3558
- NavigationMenuItem.displayName = "NavigationMenuItem";
3559
- function navigationMenuTriggerStyle(className) {
3560
- return cn("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted", className);
3561
- }
3562
- var NavigationMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => {
3563
- return /* @__PURE__ */ jsxs(NavigationMenu$1.Trigger, {
3564
- ref,
3565
- "data-slot": "navigation-menu-trigger",
3566
- className: cn(navigationMenuTriggerStyle("group"), className),
3567
- ...props,
3568
- children: [
3569
- children,
3570
- " ",
3571
- /* @__PURE__ */ jsx(ChevronDownIcon, {
3572
- className: "relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180",
3573
- "aria-hidden": "true"
3574
- })
3575
- ]
3576
- });
3577
- });
3578
- NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
3579
- var NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => {
3580
- return /* @__PURE__ */ jsx(NavigationMenu$1.Content, {
3581
- ref,
3582
- "data-slot": "navigation-menu-content",
3583
- className: cn("data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95", className),
3584
- ...props
3585
- });
3586
- });
3587
- NavigationMenuContent.displayName = "NavigationMenuContent";
3588
- var NavigationMenuPositioner = React.forwardRef(({ className, side = "bottom", sideOffset = 8, align = "start", alignOffset = 0, container, ...props }, ref) => {
3589
- return /* @__PURE__ */ jsx(NavigationMenu$1.Portal, {
3590
- container,
3591
- children: /* @__PURE__ */ jsx(ThemeWrapper, { children: /* @__PURE__ */ jsx(NavigationMenu$1.Positioner, {
3592
- ref,
3593
- side,
3594
- sideOffset,
3595
- align,
3596
- alignOffset,
3597
- className: cn("isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0", className),
3598
- ...props,
3599
- children: /* @__PURE__ */ jsx(NavigationMenu$1.Popup, {
3600
- className: "data-ending-style:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0",
3601
- children: /* @__PURE__ */ jsx(NavigationMenuViewport, {})
3602
- })
3603
- }) })
3604
- });
3605
- });
3606
- NavigationMenuPositioner.displayName = "NavigationMenuPositioner";
3607
- var NavigationMenuViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(NavigationMenu$1.Viewport, {
3608
- ref,
3609
- className: cn("relative size-full overflow-hidden", className),
3610
- ...props
3611
- }));
3612
- NavigationMenuViewport.displayName = "NavigationMenuViewport";
3613
- var NavigationMenuLink = React.forwardRef(({ className, ...props }, ref) => {
3614
- return /* @__PURE__ */ jsx(NavigationMenu$1.Link, {
3615
- ref,
3616
- "data-slot": "navigation-menu-link",
3617
- className: cn("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background in-data-[slot=navigation-menu-content]:rounded-md in-data-[slot=navigation-menu-content]:focus:ring-0 in-data-[slot=navigation-menu-content]:focus:outline-none data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&>svg:not([class*='size-'])]:size-4", className),
3618
- ...props
3619
- });
3620
- });
3621
- NavigationMenuLink.displayName = "NavigationMenuLink";
3622
- //#endregion
3623
- //#region src/components/micro/pagination.tsx
3624
- var ellipsisSizeMap = {
3625
- sm: {
3626
- container: "size-7",
3627
- icon: "[&>svg:not([class*='size-'])]:size-3"
3628
- },
3629
- md: {
3630
- container: "size-9",
3631
- icon: "[&>svg:not([class*='size-'])]:size-4"
3632
- },
3633
- lg: {
3634
- container: "size-11",
3635
- icon: "[&>svg:not([class*='size-'])]:size-5"
3636
- }
3637
- };
3638
- /**
3639
- * @description Pagination with page navigation, next and previous links.
3640
- * @requires PaginationContent, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious
3641
- */
3642
- function Pagination({ className, ...props }) {
3643
- return /* @__PURE__ */ jsx("nav", {
3644
- role: "navigation",
3645
- "aria-label": "pagination",
3646
- "data-slot": "pagination",
3647
- className: cn("group/pagination mx-auto flex w-full justify-center", className),
3648
- ...props
3649
- });
3650
- }
3651
- function PaginationContent({ className, ...props }) {
3652
- return /* @__PURE__ */ jsx("ul", {
3653
- "data-slot": "pagination-content",
3654
- className: cn("flex items-center gap-0.5", className),
3655
- ...props
3656
- });
3657
- }
3658
- function PaginationItem({ ...props }) {
3659
- return /* @__PURE__ */ jsx("li", {
3660
- "data-slot": "pagination-item",
3661
- ...props
3662
- });
3663
- }
3664
- function PaginationLink({ className, isActive, size = "md", ...props }) {
3665
- return /* @__PURE__ */ jsx(Button, {
3666
- variant: isActive ? "outline" : "ghost",
3667
- size,
3668
- className,
3669
- nativeButton: false,
3670
- render: /* @__PURE__ */ jsx("a", {
3671
- "aria-current": isActive ? "page" : void 0,
3672
- "data-slot": "pagination-link",
3673
- "data-active": isActive ? "" : void 0,
3674
- ...props
3675
- })
3676
- });
3677
- }
3678
- function PaginationPrevious({ className, text = "Previous", size = "md", ...props }) {
3679
- return /* @__PURE__ */ jsxs(PaginationLink, {
3680
- "aria-label": "Go to previous page",
3681
- size,
3682
- className: cn("pl-2.5", className),
3683
- ...props,
3684
- children: [/* @__PURE__ */ jsx(ChevronLeftIcon, {
3685
- "aria-hidden": "true",
3686
- "data-icon": "inline-start"
3687
- }), /* @__PURE__ */ jsx("span", {
3688
- className: "hidden sm:block",
3689
- children: text
3690
- })]
3691
- });
3692
- }
3693
- function PaginationNext({ className, text = "Next", size = "md", ...props }) {
3694
- return /* @__PURE__ */ jsxs(PaginationLink, {
3695
- "aria-label": "Go to next page",
3696
- size,
3697
- className: cn("pr-2.5", className),
3698
- ...props,
3699
- children: [/* @__PURE__ */ jsx("span", {
3700
- className: "hidden sm:block",
3701
- children: text
3702
- }), /* @__PURE__ */ jsx(ChevronRightIcon, {
3703
- "aria-hidden": "true",
3704
- "data-icon": "inline-end"
3705
- })]
3706
- });
3707
- }
3708
- function PaginationEllipsis({ className, size = "md", ...props }) {
3709
- const { container, icon } = ellipsisSizeMap[size];
3710
- return /* @__PURE__ */ jsxs("span", {
3711
- "aria-hidden": true,
3712
- "data-slot": "pagination-ellipsis",
3713
- className: cn("flex items-center justify-center", container, icon, className),
3714
- ...props,
3715
- children: [/* @__PURE__ */ jsx(MoreHorizontalIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", {
3716
- className: "sr-only",
3717
- children: "More pages"
3718
- })]
3719
- });
3720
- }
3721
- //#endregion
3722
- //#region src/components/micro/popover.tsx
3723
- /**
3724
- * ✅ AUDITED & REFACTORED
3725
- * - Design System Compliant (22 Commandments)
3726
- * - WCAG AAA/AA
3727
- * - Form Control Parity
3728
- * - CSS Delegated Logic
3729
- * - No Hardcoded Dimensions
3730
- */
3731
- function Popover(props) {
3732
- return /* @__PURE__ */ jsx(Popover$1.Root, { ...props });
3733
- }
3734
- var PopoverTrigger = React.forwardRef((props, ref) => {
3735
- return /* @__PURE__ */ jsx(Popover$1.Trigger, {
3736
- ref,
3737
- "data-slot": "popover-trigger",
3738
- ...props
3739
- });
3740
- });
3741
- PopoverTrigger.displayName = "PopoverTrigger";
3742
- var PopoverContent = React.forwardRef(({ className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, container, children, ...props }, ref) => /* @__PURE__ */ jsx(Popover$1.Portal, {
3743
- container,
3744
- children: /* @__PURE__ */ jsx(ThemeWrapper, { children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
3745
- align,
3746
- alignOffset,
3747
- side,
3748
- sideOffset,
3749
- className: "isolate z-50",
3750
- children: /* @__PURE__ */ jsx(Popover$1.Popup, {
3751
- ref,
3752
- "data-slot": "popover-content",
3753
- className: cn("flex origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
3754
- ...props,
3755
- children
3756
- })
3757
- }) })
3758
- }));
3759
- PopoverContent.displayName = "PopoverContent";
3760
- var PopoverHeader = React.forwardRef(({ className, ...props }, ref) => {
3761
- return /* @__PURE__ */ jsx("div", {
3762
- ref,
3763
- "data-slot": "popover-header",
3764
- className: cn("flex flex-col gap-0.5 text-sm", className),
3765
- ...props
3766
- });
3767
- });
3768
- PopoverHeader.displayName = "PopoverHeader";
3769
- var PopoverTitle = React.forwardRef(({ className, ...props }, ref) => {
3770
- return /* @__PURE__ */ jsx(Popover$1.Title, {
3771
- ref,
3772
- "data-slot": "popover-title",
3773
- className: cn("font-medium", className),
3774
- ...props
3775
- });
3776
- });
3777
- PopoverTitle.displayName = "PopoverTitle";
3778
- var PopoverDescription = React.forwardRef(({ className, ...props }, ref) => {
3779
- return /* @__PURE__ */ jsx(Popover$1.Description, {
3780
- ref,
3781
- "data-slot": "popover-description",
3782
- className: cn("text-muted-foreground", className),
3783
- ...props
3784
- });
3785
- });
3786
- PopoverDescription.displayName = "PopoverDescription";
3787
- //#endregion
3788
- //#region src/components/micro/progress.tsx
3789
- /**
3790
- * ✅ AUDITED & REFACTORED
3791
- * - Design System Compliant (22 Commandments)
3792
- * - WCAG AAA/AA
3793
- * - Form Control Parity
3794
- * - CSS Delegated Logic
3795
- */
3796
- var ProgressContext = React.createContext({
3797
- size: "md",
3798
- color: "primary"
3799
- });
3800
- /**
3801
- * @description Displays an indicator showing the completion progress of a task.
3802
- * @example
3803
- * <Progress value={33} />
3804
- */
3805
- function Progress({ className, children, size = "md", color = "primary", ...props }) {
3806
- return /* @__PURE__ */ jsx(ProgressContext.Provider, {
3807
- value: {
3808
- size,
3809
- color
3810
- },
3811
- children: /* @__PURE__ */ jsx(Progress$1.Root, {
3812
- "data-slot": "progress",
3813
- className: cn("flex flex-wrap gap-x-3 gap-y-1.5", className),
3814
- ...props,
3815
- children
3816
- })
3817
- });
3818
- }
3819
- function ProgressTrack({ className, ...props }) {
3820
- const { size } = React.useContext(ProgressContext);
3821
- return /* @__PURE__ */ jsx(Progress$1.Track, {
3822
- className: cn("relative flex w-full items-center overflow-x-hidden rounded-full bg-muted", size ? {
3823
- sm: "h-1",
3824
- md: "h-1.5",
3825
- lg: "h-2"
3826
- }[size] : "", className),
3827
- "data-slot": "progress-track",
3828
- ...props
3829
- });
3830
- }
3831
- function ProgressIndicator({ className, ...props }) {
3832
- const { color } = React.useContext(ProgressContext);
3833
- return /* @__PURE__ */ jsx(Progress$1.Indicator, {
3834
- "data-slot": "progress-indicator",
3835
- className: cn("h-full transition-all", {
3836
- primary: "bg-primary",
3837
- secondary: "bg-secondary",
3838
- destructive: "bg-destructive",
3839
- success: "bg-success",
3840
- warning: "bg-warning",
3841
- info: "bg-info",
3842
- tertiary: "bg-tertiary",
3843
- muted: "bg-muted",
3844
- accent: "bg-accent"
3845
- }[color], className),
3846
- ...props
3847
- });
3848
- }
3849
- function ProgressLabel({ className, ...props }) {
3850
- const { size } = React.useContext(ProgressContext);
3851
- return /* @__PURE__ */ jsx(Progress$1.Label, {
3852
- className: cn({
3853
- sm: "text-xs",
3854
- md: "text-sm",
3855
- lg: "text-base"
3856
- }[size], "font-medium", className),
3857
- "data-slot": "progress-label",
3858
- ...props
3859
- });
3860
- }
3861
- function ProgressValue({ className, ...props }) {
3862
- const { size } = React.useContext(ProgressContext);
3863
- return /* @__PURE__ */ jsx(Progress$1.Value, {
3864
- className: cn("ml-auto text-muted-foreground tabular-nums", {
3865
- sm: "text-xs",
3866
- md: "text-sm",
3867
- lg: "text-base"
3868
- }[size], className),
3869
- "data-slot": "progress-value",
3870
- ...props
3871
- });
3872
- }
3873
- //#endregion
3874
- //#region src/components/micro/radio-group.tsx
3875
- /**
3876
- * ✅ AUDITED & REFACTORED
3877
- * - Design System Compliant (22 Commandments)
3878
- * - WCAG AAA/AA
3879
- * - Form Control Parity
3880
- * - CSS Delegated Logic
3881
- */
3882
- var RadioGroup = React.forwardRef(function RadioGroup({ className, ...props }, ref) {
3883
- return /* @__PURE__ */ jsx(RadioGroup$1, {
3884
- ref,
3885
- "data-slot": "radio-group",
3886
- className: cn("grid gap-2", className),
3887
- ...props
3888
- });
3889
- });
3890
- RadioGroup.displayName = "RadioGroup";
3891
- var radioGroupItemVariants = cva("group/radio peer relative flex aspect-square shrink-0 rounded-full border border-input after:absolute after:content-[''] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:border-destructive aria-invalid:focus-visible:ring-3 aria-invalid:focus-visible:ring-destructive/50 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:focus-visible:ring-destructive/50 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", { variants: { size: {
3892
- sm: "size-3.5 after:-inset-x-2.5 after:-inset-y-2.5",
3893
- md: "size-4 after:-inset-x-3 after:-inset-y-2",
3894
- lg: "size-5 after:-inset-x-4 after:-inset-y-3"
3895
- } } });
3896
- var RadioGroupItem = React.forwardRef(function RadioGroupItem({ className, size = "md", ...props }, ref) {
3897
- return /* @__PURE__ */ jsx(Radio.Root, {
3898
- ref,
3899
- "data-slot": "radio-group-item",
3900
- "data-size": size,
3901
- className: cn(radioGroupItemVariants({
3902
- size,
3903
- className
3904
- })),
3905
- ...props,
3906
- children: /* @__PURE__ */ jsx(Radio.Indicator, {
3907
- "data-slot": "radio-group-indicator",
3908
- className: "flex items-center justify-center size-4 group-data-[size=sm]/radio:size-3.5 group-data-[size=lg]/radio:size-5",
3909
- children: /* @__PURE__ */ jsx("span", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground size-2 group-data-[size=sm]/radio:size-1.5 group-data-[size=lg]/radio:size-2.5" })
3910
- })
3911
- });
3912
- });
3913
- RadioGroupItem.displayName = "RadioGroupItem";
3914
- //#endregion
3915
- //#region src/components/micro/resizable.tsx
3916
- /**
3917
- * ✅ AUDITED & REFACTORED
3918
- * - Design System Compliant (22 Commandments)
3919
- * - WCAG AAA/AA
3920
- * - Form Control Parity
3921
- * - CSS Delegated Logic
3922
- */
3923
- /**
3924
- * @description Accessible resizable panel groups and layouts.
3925
- * @requires ResizablePanel, ResizableHandle
3926
- */
3927
- function ResizablePanelGroup({ className, ...props }) {
3928
- return /* @__PURE__ */ jsx(ResizablePrimitive.Group, {
3929
- "data-slot": "resizable-panel-group",
3930
- className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className),
3931
- ...props
3932
- });
3933
- }
3934
- function ResizablePanel({ ...props }) {
3935
- return /* @__PURE__ */ jsx(ResizablePrimitive.Panel, {
3936
- "data-slot": "resizable-panel",
3937
- ...props
3938
- });
3939
- }
3940
- function ResizableHandle({ withHandle, className, ...props }) {
3941
- return /* @__PURE__ */ jsx(ResizablePrimitive.Separator, {
3942
- "data-slot": "resizable-handle",
3943
- className: cn("relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]_[data-slot=resizable-handle-bar]]:rotate-90", className),
3944
- ...props,
3945
- children: withHandle && /* @__PURE__ */ jsx("div", {
3946
- "data-slot": "resizable-handle-bar",
3947
- className: "z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border"
3948
- })
3949
- });
3950
- }
3951
- //#endregion
3952
- //#region src/components/micro/scroll-area.tsx
3953
- /**
3954
- * ✅ AUDITED & REFACTORED
3955
- * - Design System Compliant (22 Commandments)
3956
- * - WCAG AAA/AA
3957
- * - Form Control Parity
3958
- * - CSS Delegated Logic
3959
- */
3960
- /**
3961
- * @description Augments native scroll functionality for custom, cross-browser styling.
3962
- * @example
3963
- * <ScrollArea className="h-[200px] w-[350px]">
3964
- * Jokester began sneaking into the castle in the middle of the night.
3965
- * </ScrollArea>
3966
- */
3967
- function ScrollArea({ className, children, ...props }) {
3968
- return /* @__PURE__ */ jsxs(ScrollArea$1.Root, {
3969
- "data-slot": "scroll-area",
3970
- className: cn("relative", className),
3971
- ...props,
3972
- children: [
3973
- /* @__PURE__ */ jsx(ScrollArea$1.Viewport, {
3974
- "data-slot": "scroll-area-viewport",
3975
- className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background",
3976
- children
3977
- }),
3978
- /* @__PURE__ */ jsx(ScrollBar, {}),
3979
- /* @__PURE__ */ jsx(ScrollArea$1.Corner, {})
3980
- ]
3981
- });
3982
- }
3983
- function ScrollBar({ className, orientation = "vertical", ...props }) {
3984
- return /* @__PURE__ */ jsx(ScrollArea$1.Scrollbar, {
3985
- "data-slot": "scroll-area-scrollbar",
3986
- "data-orientation": orientation,
3987
- orientation,
3988
- className: cn("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-border data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-border data-vertical:border-l-transparent", className),
3989
- ...props,
3990
- children: /* @__PURE__ */ jsx(ScrollArea$1.Thumb, {
3991
- "data-slot": "scroll-area-thumb",
3992
- className: "relative flex-1 rounded-full bg-border"
3993
- })
3994
- });
3995
- }
3996
- //#endregion
3997
- //#region src/components/micro/sheet.tsx
3998
- /**
3999
- * ✅ AUDITED & REFACTORED
4000
- * - Design System Compliant (22 Commandments)
4001
- * - WCAG AAA/AA
4002
- * - Form Control Parity
4003
- * - CSS Delegated Logic
4004
- */
4005
- function Sheet({ ...props }) {
4006
- return /* @__PURE__ */ jsx(Dialog$1.Root, {
4007
- "data-slot": "sheet",
4008
- ...props
4009
- });
4010
- }
4011
- function SheetTrigger({ ...props }) {
4012
- return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
4013
- "data-slot": "sheet-trigger",
4014
- ...props
4015
- });
4016
- }
4017
- function SheetClose({ ...props }) {
4018
- return /* @__PURE__ */ jsx(Dialog$1.Close, {
4019
- "data-slot": "sheet-close",
4020
- ...props
4021
- });
4022
- }
4023
- function SheetOverlay({ className, ...props }) {
4024
- return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
4025
- "data-slot": "sheet-overlay",
4026
- className: cn("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs motion-reduce:transition-none", className),
4027
- ...props
4028
- });
4029
- }
4030
- function SheetContent({ className, children, side = "right", showCloseButton = true, container, ...props }) {
4031
- return /* @__PURE__ */ jsx(Dialog$1.Portal, {
4032
- container,
4033
- children: /* @__PURE__ */ jsxs(ThemeWrapper, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
4034
- "data-slot": "sheet-content",
4035
- "data-side": side,
4036
- className: cn("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm motion-reduce:transition-none", className),
4037
- ...props,
4038
- children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
4039
- "data-slot": "sheet-close",
4040
- render: /* @__PURE__ */ jsx(Button, {
4041
- variant: "ghost",
4042
- className: "absolute top-4 right-4",
4043
- size: "sm",
4044
- iconOnly: true
4045
- }),
4046
- children: [/* @__PURE__ */ jsx(XIcon, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", {
4047
- className: "sr-only",
4048
- children: "Close"
4049
- })]
4050
- })]
4051
- })] })
4052
- });
4053
- }
4054
- function SheetHeader({ className, ...props }) {
4055
- return /* @__PURE__ */ jsx("div", {
4056
- "data-slot": "sheet-header",
4057
- className: cn("flex flex-col gap-0.5 p-4", className),
4058
- ...props
4059
- });
4060
- }
4061
- function SheetFooter({ className, ...props }) {
4062
- return /* @__PURE__ */ jsx("div", {
4063
- "data-slot": "sheet-footer",
4064
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
4065
- ...props
4066
- });
4067
- }
4068
- function SheetTitle({ className, ...props }) {
4069
- return /* @__PURE__ */ jsx(Dialog$1.Title, {
4070
- "data-slot": "sheet-title",
4071
- className: cn("font-heading text-base font-medium text-foreground", className),
4072
- ...props
4073
- });
4074
- }
4075
- function SheetDescription({ className, ...props }) {
4076
- return /* @__PURE__ */ jsx(Dialog$1.Description, {
4077
- "data-slot": "sheet-description",
4078
- className: cn("text-sm text-muted-foreground", className),
4079
- ...props
4080
- });
4081
- }
4082
- //#endregion
4083
- //#region src/components/micro/sidebar.tsx
4084
- var Sidebar = React.forwardRef(({ className, defaultState = "expanded", expandedWidth = 256, collapsedWidth = 72, ...props }, ref) => {
4085
- const handleTransitionStart = (e) => {
4086
- if (e.propertyName === "width") e.currentTarget.style.willChange = "width";
4087
- };
4088
- const handleTransitionEnd = (e) => {
4089
- if (e.propertyName === "width") e.currentTarget.style.willChange = "auto";
4090
- };
4091
- return /* @__PURE__ */ jsx("div", {
4092
- ref,
4093
- role: "navigation",
4094
- "aria-expanded": defaultState === "expanded",
4095
- style: {
4096
- "--sb-expanded": `${expandedWidth}px`,
4097
- "--sb-collapsed": `${collapsedWidth}px`
4098
- },
4099
- className: cn("group shrink-0 h-full overflow-hidden border-r border-r-border bg-sidebar text-sidebar-foreground", "transition-[width,border-width] duration-[400ms]", "data-[state=expanded]:w-[var(--sb-expanded)]", "data-[state=collapsed]:w-[var(--sb-collapsed)]", collapsedWidth === 0 && "data-[state=collapsed]:border-r-0", className),
4100
- "data-state": defaultState,
4101
- onTransitionStart: handleTransitionStart,
4102
- onTransitionEnd: handleTransitionEnd,
4103
- children: /* @__PURE__ */ jsx("div", {
4104
- className: "flex h-full flex-col p-2",
4105
- style: { width: `${expandedWidth}px` },
4106
- ...props
4107
- })
4108
- });
4109
- });
4110
- Sidebar.displayName = "Sidebar";
4111
- var SidebarLogo = React.forwardRef(({ className, icon, text, ...props }, ref) => {
4112
- return /* @__PURE__ */ jsxs("div", {
4113
- ref,
4114
- className: cn("flex h-12 items-center overflow-hidden text-sidebar-foreground", className),
4115
- ...props,
4116
- children: [/* @__PURE__ */ jsx("div", {
4117
- className: "flex shrink-0 items-center justify-center",
4118
- style: { width: "calc(var(--sb-collapsed) - 16px)" },
4119
- children: icon
4120
- }), /* @__PURE__ */ jsx("span", {
4121
- className: "whitespace-nowrap font-semibold transition-opacity group-data-[state=collapsed]:opacity-0 group-data-[state=collapsed]:duration-[80ms] group-data-[state=expanded]:duration-[200ms] group-data-[state=expanded]:delay-[300ms]",
4122
- children: text
4123
- })]
4124
- });
4125
- });
4126
- SidebarLogo.displayName = "SidebarLogo";
4127
- var SidebarLabel = React.forwardRef(({ className, icon, text, ...props }, ref) => {
4128
- return /* @__PURE__ */ jsxs("div", {
4129
- ref,
4130
- className: cn("flex h-10 items-center overflow-hidden text-sm text-sidebar-foreground", "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground cursor-pointer rounded-md", className),
4131
- ...props,
4132
- children: [/* @__PURE__ */ jsx("div", {
4133
- className: "flex shrink-0 items-center justify-center [&>svg]:size-4",
4134
- style: { width: "calc(var(--sb-collapsed) - 16px)" },
4135
- children: icon
4136
- }), /* @__PURE__ */ jsx("span", {
4137
- className: "whitespace-nowrap transition-opacity group-data-[state=collapsed]:opacity-0 group-data-[state=collapsed]:duration-[80ms] group-data-[state=expanded]:duration-[200ms] group-data-[state=expanded]:delay-[300ms]",
4138
- children: text
4139
- })]
4140
- });
4141
- });
4142
- SidebarLabel.displayName = "SidebarLabel";
4143
- var SidebarMenuItemList = React.forwardRef(({ className, ...props }, ref) => {
4144
- return /* @__PURE__ */ jsx("div", {
4145
- ref,
4146
- className: cn("flex flex-col gap-1", className),
4147
- ...props
4148
- });
4149
- });
4150
- SidebarMenuItemList.displayName = "SidebarMenuItemList";
4151
- var SidebarMenuItem = React.forwardRef(({ className, text, ...props }, ref) => {
4152
- return /* @__PURE__ */ jsx("div", {
4153
- ref,
4154
- className: cn("flex h-8 items-center pr-4 text-sm text-sidebar-foreground/70", "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground cursor-pointer rounded-md", className),
4155
- style: { paddingLeft: "calc(var(--sb-collapsed) - 16px)" },
4156
- ...props,
4157
- children: /* @__PURE__ */ jsx("span", {
4158
- className: "whitespace-nowrap transition-opacity group-data-[state=collapsed]:opacity-0 group-data-[state=collapsed]:duration-[80ms] group-data-[state=expanded]:duration-[200ms] group-data-[state=expanded]:delay-[300ms]",
4159
- children: text
4160
- })
4161
- });
4162
- });
4163
- SidebarMenuItem.displayName = "SidebarMenuItem";
4164
- function useSidebarToggle(initialState = "expanded", onStateChange) {
4165
- const sidebarRef = React.useRef(null);
4166
- const onStateChangeRef = React.useRef(onStateChange);
4167
- React.useEffect(() => {
4168
- onStateChangeRef.current = onStateChange;
4169
- }, [onStateChange]);
4170
- const setSidebarState = React.useCallback((state) => {
4171
- if (sidebarRef.current) {
4172
- sidebarRef.current.setAttribute("data-state", state);
4173
- sidebarRef.current.setAttribute("aria-expanded", String(state === "expanded"));
4174
- onStateChangeRef.current?.(state);
4175
- }
4176
- }, []);
4177
- return {
4178
- sidebarRef,
4179
- toggleSidebar: React.useCallback(() => {
4180
- if (sidebarRef.current) {
4181
- const current = sidebarRef.current.getAttribute("data-state");
4182
- setSidebarState(current === "expanded" ? "collapsed" : "expanded");
4183
- }
4184
- }, [setSidebarState]),
4185
- setSidebarState,
4186
- defaultState: initialState
4187
- };
4188
- }
4189
- //#endregion
4190
- //#region src/components/micro/skeleton.tsx
4191
- /**
4192
- * ✅ AUDITED & REFACTORED
4193
- * - Design System Compliant (22 Commandments)
4194
- * - WCAG AAA/AA
4195
- * - Form Control Parity
4196
- * - CSS Delegated Logic
4197
- */
4198
- /**
4199
- * @description Use to show a placeholder while content is loading.
4200
- * @example
4201
- * <Skeleton className="w-[100px] h-[20px] rounded-full" />
4202
- */
4203
- var Skeleton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
4204
- ref,
4205
- "data-slot": "skeleton",
4206
- className: cn("animate-pulse rounded-lg bg-muted", className),
4207
- ...props
4208
- }));
4209
- Skeleton.displayName = "Skeleton";
4210
- //#endregion
4211
- //#region src/components/micro/slider.tsx
4212
- /**
4213
- * ✅ AUDITED & REFACTORED
4214
- * - Design System Compliant (22 Commandments)
4215
- * - WCAG AAA/AA
4216
- * - Form Control Parity
4217
- * - CSS Delegated Logic
4218
- */
4219
- var sliderVariants = cva("peer group/slider data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full");
4220
- var trackVariants = cva("relative grow overflow-hidden rounded-full bg-muted select-none data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full", { variants: { size: {
4221
- sm: "data-[orientation=horizontal]:h-1 data-[orientation=vertical]:w-1",
4222
- md: "data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5",
4223
- lg: "data-[orientation=horizontal]:h-2 data-[orientation=vertical]:w-2"
4224
- } } });
4225
- var thumbVariants = cva("relative block shrink-0 rounded-full border border-ring bg-background ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 focus-visible:ring-3 focus-visible:ring-offset-1 focus-visible:ring-offset-background has-[:focus-visible]:ring-3 has-[:focus-visible]:ring-offset-1 has-[:focus-visible]:ring-offset-background focus-visible:outline-none has-[:focus-visible]:outline-none disabled:pointer-events-none group-aria-invalid/slider:border-destructive group-aria-invalid/slider:focus-visible:border-destructive group-aria-invalid/slider:has-[:focus-visible]:border-destructive group-aria-invalid/slider:focus-visible:ring-destructive/50 group-aria-invalid/slider:has-[:focus-visible]:ring-destructive/50 dark:group-aria-invalid/slider:focus-visible:ring-destructive/50 dark:group-aria-invalid/slider:has-[:focus-visible]:ring-destructive/50", { variants: { size: {
4226
- sm: "size-3",
4227
- md: "size-4",
4228
- lg: "size-5"
4229
- } } });
4230
- var SliderContext = React.createContext({ size: "md" });
4231
- var Slider = React.forwardRef(function Slider({ className, size = "md", ...props }, ref) {
4232
- return /* @__PURE__ */ jsx(SliderContext.Provider, {
4233
- value: { size },
4234
- children: /* @__PURE__ */ jsx(Slider$1.Root, {
4235
- ref,
4236
- className: cn(sliderVariants({ className })),
4237
- "data-slot": "slider",
4238
- thumbAlignment: "edge",
4239
- ...props
4240
- })
4241
- });
4242
- });
4243
- Slider.displayName = "Slider";
4244
- var SliderControl = React.forwardRef(function SliderControl({ className, ...props }, ref) {
4245
- return /* @__PURE__ */ jsx(Slider$1.Control, {
4246
- ref,
4247
- "data-slot": "slider-control",
4248
- className: cn("relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-disabled:cursor-not-allowed data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className),
4249
- ...props
4250
- });
4251
- });
4252
- SliderControl.displayName = "SliderControl";
4253
- var SliderTrack = React.forwardRef(function SliderTrack({ className, ...props }, ref) {
4254
- const { size } = React.useContext(SliderContext);
4255
- return /* @__PURE__ */ jsx(Slider$1.Track, {
4256
- ref,
4257
- "data-slot": "slider-track",
4258
- className: cn(trackVariants({ size }), className),
4259
- ...props
4260
- });
4261
- });
4262
- SliderTrack.displayName = "SliderTrack";
4263
- var SliderIndicator = React.forwardRef(function SliderIndicator({ className, ...props }, ref) {
4264
- return /* @__PURE__ */ jsx(Slider$1.Indicator, {
4265
- ref,
4266
- "data-slot": "slider-indicator",
4267
- className: cn("group-aria-invalid/slider:bg-destructive bg-primary select-none data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full", className),
4268
- ...props
4269
- });
4270
- });
4271
- SliderIndicator.displayName = "SliderIndicator";
4272
- var SliderThumb = React.forwardRef(function SliderThumb({ className, ...props }, ref) {
4273
- const { size } = React.useContext(SliderContext);
4274
- return /* @__PURE__ */ jsx(Slider$1.Thumb, {
4275
- ref,
4276
- "data-slot": "slider-thumb",
4277
- className: cn(thumbVariants({ size }), className),
4278
- ...props
4279
- });
4280
- });
4281
- SliderThumb.displayName = "SliderThumb";
4282
- //#endregion
4283
- //#region src/components/micro/spinner.tsx
4284
- var spinnerVariants = cva("animate-spin motion-reduce:animate-none", { variants: { size: {
4285
- sm: "size-3.5",
4286
- md: "size-4",
4287
- lg: "size-5"
4288
- } } });
4289
- /**
4290
- * @description A loading indicator component.
4291
- * @example
4292
- * <Spinner size="md" />
4293
- */
4294
- function Spinner({ className, size = "md", ...props }) {
4295
- return /* @__PURE__ */ jsx(Loader2Icon, {
4296
- "data-slot": "spinner",
4297
- role: "status",
4298
- "aria-label": "Loading",
4299
- className: spinnerVariants({
4300
- size,
4301
- className
4302
- }),
4303
- ...props
4304
- });
4305
- }
4306
- //#endregion
4307
- //#region src/components/micro/sonner.tsx
4308
- /**
4309
- * ✅ AUDITED & REFACTORED
4310
- * - Design System Compliant (22 Commandments)
4311
- * - WCAG AAA/AA
4312
- * - Form Control Parity
4313
- * - CSS Delegated Logic
4314
- */
4315
- function Toaster({ ...props }) {
4316
- const theme = useTheme()?.mode;
4317
- return /* @__PURE__ */ jsx(Toaster$1, {
4318
- theme,
4319
- className: "toaster group",
4320
- icons: {
4321
- success: /* @__PURE__ */ jsx(CircleCheckIcon, {
4322
- "aria-hidden": "true",
4323
- className: "size-4"
4324
- }),
4325
- info: /* @__PURE__ */ jsx(InfoIcon, {
4326
- "aria-hidden": "true",
4327
- className: "size-4"
4328
- }),
4329
- warning: /* @__PURE__ */ jsx(TriangleAlertIcon, {
4330
- "aria-hidden": "true",
4331
- className: "size-4"
4332
- }),
4333
- error: /* @__PURE__ */ jsx(OctagonXIcon, {
4334
- "aria-hidden": "true",
4335
- className: "size-4"
4336
- }),
4337
- loading: /* @__PURE__ */ jsx(Spinner, { size: "md" })
4338
- },
4339
- richColors: true,
4340
- style: {
4341
- "--normal-bg": "var(--popover)",
4342
- "--normal-text": "var(--popover-foreground)",
4343
- "--normal-border": "var(--border)",
4344
- "--border-radius": "var(--radius)",
4345
- "--success-bg": "color-mix(in srgb, var(--success) 10%, var(--popover))",
4346
- "--success-text": "var(--success)",
4347
- "--success-border": "color-mix(in srgb, var(--success) 20%, var(--popover))",
4348
- "--error-bg": "color-mix(in srgb, var(--destructive) 10%, var(--popover))",
4349
- "--error-text": "var(--destructive)",
4350
- "--error-border": "color-mix(in srgb, var(--destructive) 20%, var(--popover))",
4351
- "--warning-bg": "color-mix(in srgb, var(--warning) 10%, var(--popover))",
4352
- "--warning-text": "var(--warning)",
4353
- "--warning-border": "color-mix(in srgb, var(--warning) 20%, var(--popover))",
4354
- "--info-bg": "color-mix(in srgb, var(--info) 10%, var(--popover))",
4355
- "--info-text": "var(--info)",
4356
- "--info-border": "color-mix(in srgb, var(--info) 20%, var(--popover))"
4357
- },
4358
- toastOptions: { classNames: {
4359
- toast: "group toast",
4360
- description: "group-[.toast]:text-muted-foreground",
4361
- actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
4362
- cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
4363
- } },
4364
- ...props
4365
- });
4366
- }
4367
- //#endregion
4368
- //#region src/components/micro/switch.tsx
4369
- /**
4370
- * ✅ AUDITED & REFACTORED
4371
- * - Design System Compliant (22 Commandments)
4372
- * - WCAG AAA/AA
4373
- * - Form Control Parity
4374
- * - CSS Delegated Logic
4375
- */
4376
- var switchVariants = cva("group/switch peer relative inline-flex shrink-0 items-center rounded-full border border-transparent p-px after:absolute after:content-[''] transition-all outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background aria-invalid:focus-visible:ring-destructive/50 dark:aria-invalid:focus-visible:ring-destructive/50 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-secondary data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50", { variants: { size: {
4377
- sm: "switch-sm h-4 w-7 after:-inset-x-2.5 after:-inset-y-2.5",
4378
- md: "switch-md h-5 w-9 after:-inset-x-3 after:-inset-y-2",
4379
- lg: "switch-lg h-6 w-11 after:-inset-x-4 after:-inset-y-3"
4380
- } } });
4381
- /**
4382
- * @description A control that allows the user to toggle between checked and not checked.
4383
- * @example
4384
- * <Switch id="airplane-mode" />
4385
- */
4386
- var Switch = React.forwardRef(function Switch({ className, size = "md", ...props }, ref) {
4387
- return /* @__PURE__ */ jsx(Switch$1.Root, {
4388
- ref,
4389
- "data-slot": "switch",
4390
- className: cn(switchVariants({
4391
- size,
4392
- className
4393
- })),
4394
- ...props
4395
- });
4396
- });
4397
- Switch.displayName = "Switch";
4398
- var SwitchThumb = React.forwardRef(function SwitchThumb({ className, ...props }, ref) {
4399
- return /* @__PURE__ */ jsx(Switch$1.Thumb, {
4400
- ref,
4401
- "data-slot": "switch-thumb",
4402
- className: cn("pointer-events-none block rounded-full bg-background shadow-sm shadow-black/10 ring-0 transition-transform data-unchecked:translate-x-0 dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground size-4 data-checked:translate-x-4 group-[.switch-sm]/switch:size-3 group-[.switch-sm]/switch:data-checked:translate-x-3 group-[.switch-lg]/switch:size-5 group-[.switch-lg]/switch:data-checked:translate-x-5", className),
4403
- ...props
4404
- });
4405
- });
4406
- SwitchThumb.displayName = "SwitchThumb";
4407
- //#endregion
4408
- //#region src/components/micro/table.tsx
4409
- /**
4410
- * ✅ AUDITED & REFACTORED
4411
- * - Design System Compliant (22 Commandments)
4412
- * - WCAG AAA/AA
4413
- * - Form Control Parity
4414
- * - CSS Delegated Logic
4415
- */
4416
- var Table = React.forwardRef(({ className, children, ...props }, ref) => {
4417
- return /* @__PURE__ */ jsx("div", {
4418
- ref,
4419
- "data-slot": "table-container",
4420
- className: cn("group/table relative w-full overflow-auto", className),
4421
- ...props,
4422
- children: /* @__PURE__ */ jsx("table", {
4423
- "data-slot": "table",
4424
- className: "w-full caption-bottom text-sm",
4425
- children
4426
- })
4427
- });
4428
- });
4429
- Table.displayName = "Table";
4430
- var TableHeader = React.forwardRef(({ className, ...props }, ref) => {
4431
- return /* @__PURE__ */ jsx("thead", {
4432
- ref,
4433
- "data-slot": "table-header",
4434
- className: cn("[&>tr]:border-b", className),
4435
- ...props
4436
- });
4437
- });
4438
- TableHeader.displayName = "TableHeader";
4439
- var TableBody = React.forwardRef(({ className, ...props }, ref) => {
4440
- return /* @__PURE__ */ jsx("tbody", {
4441
- ref,
4442
- "data-slot": "table-body",
4443
- className: cn("[&>tr:last-child]:border-0", className),
4444
- ...props
4445
- });
4446
- });
4447
- TableBody.displayName = "TableBody";
4448
- var TableFooter = React.forwardRef(({ className, ...props }, ref) => {
4449
- return /* @__PURE__ */ jsx("tfoot", {
4450
- ref,
4451
- "data-slot": "table-footer",
4452
- className: cn("border-t border-t-border bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
4453
- ...props
4454
- });
4455
- });
4456
- TableFooter.displayName = "TableFooter";
4457
- var TableRow = React.forwardRef(({ className, ...props }, ref) => {
4458
- return /* @__PURE__ */ jsx("tr", {
4459
- ref,
4460
- "data-slot": "table-row",
4461
- className: cn("border-b border-b-border transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className),
4462
- ...props
4463
- });
4464
- });
4465
- TableRow.displayName = "TableRow";
4466
- var TableHead = React.forwardRef(({ className, sortDirection, sortOptions = [
4467
- "asc",
4468
- "desc",
4469
- "none"
4470
- ], onSort, children, ...props }, ref) => {
4471
- const handleSortClick = () => {
4472
- if (!onSort || !sortDirection || sortOptions.length === 0) return;
4473
- const currentIndex = sortOptions.indexOf(sortDirection);
4474
- onSort(sortOptions[currentIndex === -1 ? 0 : (currentIndex + 1) % sortOptions.length]);
4475
- };
4476
- return /* @__PURE__ */ jsx("th", {
4477
- ref,
4478
- "data-slot": "table-head",
4479
- className: cn("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground has-[[role=checkbox]]:pr-0", className),
4480
- ...props,
4481
- children: onSort && sortDirection ? /* @__PURE__ */ jsxs("button", {
4482
- type: "button",
4483
- onClick: handleSortClick,
4484
- className: "-ml-1 flex items-center gap-1.5 rounded-sm px-1 py-0.5 text-inherit hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
4485
- children: [children, /* @__PURE__ */ jsxs("div", {
4486
- className: "flex flex-col",
4487
- children: [/* @__PURE__ */ jsx(ChevronUp, { className: cn("size-[14px] -mb-1.5 opacity-30", { "opacity-100": sortDirection === "asc" }) }), /* @__PURE__ */ jsx(ChevronDown, { className: cn("size-[14px] opacity-30", { "opacity-100": sortDirection === "desc" }) })]
4488
- })]
4489
- }) : children
4490
- });
4491
- });
4492
- TableHead.displayName = "TableHead";
4493
- var TableCell = React.forwardRef(({ className, ...props }, ref) => {
4494
- return /* @__PURE__ */ jsx("td", {
4495
- ref,
4496
- "data-slot": "table-cell",
4497
- className: cn("p-2 align-middle whitespace-nowrap has-[[role=checkbox]]:pr-0", className),
4498
- ...props
4499
- });
4500
- });
4501
- TableCell.displayName = "TableCell";
4502
- var TableCaption = React.forwardRef(({ className, ...props }, ref) => {
4503
- return /* @__PURE__ */ jsx("caption", {
4504
- ref,
4505
- "data-slot": "table-caption",
4506
- className: cn("mt-4 text-sm text-muted-foreground", className),
4507
- ...props
4508
- });
4509
- });
4510
- TableCaption.displayName = "TableCaption";
4511
- //#endregion
4512
- //#region src/components/micro/tabs.tsx
4513
- /**
4514
- * ✅ AUDITED & REFACTORED
4515
- * - Design System Compliant (22 Commandments)
4516
- * - WCAG AAA/AA
4517
- * - Form Control Parity
4518
- * - CSS Delegated Logic
4519
- */
4520
- var Tabs = React.forwardRef(({ className, orientation = "horizontal", ...props }, ref) => {
4521
- return /* @__PURE__ */ jsx(Tabs$1.Root, {
4522
- ref,
4523
- "data-slot": "tabs",
4524
- "data-orientation": orientation,
4525
- "data-horizontal": orientation === "horizontal" ? "" : void 0,
4526
- "data-vertical": orientation === "vertical" ? "" : void 0,
4527
- className: cn("group/tabs flex gap-2 data-horizontal:flex-col", className),
4528
- ...props
4529
- });
4530
- });
4531
- Tabs.displayName = "Tabs";
4532
- var tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none bg-muted", { variants: { variant: { line: "gap-1 bg-transparent" } } });
4533
- var TabsList = React.forwardRef(({ className, variant, ...props }, ref) => {
4534
- return /* @__PURE__ */ jsx(Tabs$1.List, {
4535
- ref,
4536
- "data-slot": "tabs-list",
4537
- "data-variant": variant,
4538
- className: cn(tabsListVariants({ variant }), className),
4539
- ...props
4540
- });
4541
- });
4542
- TabsList.displayName = "TabsList";
4543
- var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => {
4544
- return /* @__PURE__ */ jsx(Tabs$1.Tab, {
4545
- ref,
4546
- "data-slot": "tabs-trigger",
4547
- className: cn("relative inline-flex flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2.5 py-1.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 has-[[data-icon=inline-end]]:pr-1 has-[[data-icon=inline-start]]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className),
4548
- ...props
4549
- });
4550
- });
4551
- TabsTrigger.displayName = "TabsTrigger";
4552
- var TabsContent = React.forwardRef(({ className, ...props }, ref) => {
4553
- return /* @__PURE__ */ jsx(Tabs$1.Panel, {
4554
- ref,
4555
- "data-slot": "tabs-content",
4556
- className: cn("flex-1 text-sm outline-none", className),
4557
- ...props
4558
- });
4559
- });
4560
- TabsContent.displayName = "TabsContent";
4561
- //#endregion
4562
- //#region src/components/micro/textarea.tsx
4563
- /**
4564
- * ✅ AUDITED & REFACTORED
4565
- * - Design System Compliant (22 Commandments)
4566
- * - WCAG AAA/AA
4567
- * - Form Control Parity
4568
- * - CSS Delegated Logic
4569
- */
4570
- var textareaVariants = cva("flex field-sizing-content min-h-16 min-w-0 rounded-lg border border-input bg-transparent text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:ring-3 aria-invalid:focus-visible:ring-destructive/50 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:focus-visible:ring-destructive/50", { variants: { size: {
4571
- sm: "px-2 py-1.5 text-xs",
4572
- md: "px-2.5 py-2",
4573
- lg: "px-3 py-2.5"
4574
- } } });
4575
- /**
4576
- * @description Displays a form textarea.
4577
- * @example
4578
- * <Textarea placeholder="Type your message here." />
4579
- */
4580
- var Textarea = React.forwardRef(function Textarea({ className, size = "md", ...props }, ref) {
4581
- return /* @__PURE__ */ jsx("textarea", {
4582
- ref,
4583
- "data-slot": "textarea",
4584
- className: cn(textareaVariants({
4585
- size,
4586
- className
4587
- })),
4588
- ...props
4589
- });
4590
- });
4591
- Textarea.displayName = "Textarea";
4592
- //#endregion
4593
- //#region src/components/micro/toggle.tsx
4594
- /**
4595
- * ✅ AUDITED & REFACTORED
4596
- * - Design System Compliant (22 Commandments)
4597
- * - WCAG AAA/AA
4598
- * - Form Control Parity
4599
- * - CSS Delegated Logic
4600
- */
4601
- var toggleVariants = cva("group/toggle inline-flex items-center justify-center rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:border-destructive aria-invalid:focus-visible:ring-3 aria-invalid:focus-visible:ring-destructive/50 dark:aria-invalid:focus-visible:ring-destructive/50 aria-pressed:bg-muted aria-pressed:text-foreground data-[state=on]:bg-muted data-[state=on]:text-foreground [&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg:not([class*='size-'])]:size-4 bg-transparent", { variants: {
4602
- variant: {
4603
- default: "",
4604
- outline: "border border-input bg-transparent hover:bg-muted hover:text-foreground"
4605
- },
4606
- size: {
4607
- sm: "h-7 min-w-7 gap-1 px-2.5 text-xs [&>svg:not([class*='size-'])]:size-3.5",
4608
- md: "h-8 min-w-8 gap-1.5 px-3 text-sm",
4609
- lg: "h-9 min-w-9 gap-2 px-3.5 text-sm"
4610
- }
4611
- } });
4612
- /**
4613
- * @description A two-state button that can be either on or off.
4614
- * @example
4615
- * <Toggle aria-label="Toggle italic">
4616
- * <ItalicIcon />
4617
- * </Toggle>
4618
- */
4619
- function Toggle({ className, variant = "default", size = "md", ...props }) {
4620
- return /* @__PURE__ */ jsx(Toggle$1, {
4621
- "data-slot": "toggle",
4622
- className: toggleVariants({
4623
- variant,
4624
- size,
4625
- className
4626
- }),
4627
- ...props
4628
- });
4629
- }
4630
- //#endregion
4631
- //#region src/components/micro/toggle-group.tsx
4632
- /**
4633
- * ✅ AUDITED & REFACTORED
4634
- * - Design System Compliant (22 Commandments)
4635
- * - WCAG AAA/AA
4636
- * - Form Control Parity
4637
- * - CSS Delegated Logic
4638
- */
4639
- var ToggleGroupContext = React.createContext({
4640
- variant: "default",
4641
- size: "md",
4642
- spacing: 2,
4643
- orientation: "horizontal"
4644
- });
4645
- /**
4646
- * @description A set of two-state buttons that can be toggled on or off.
4647
- * @requires ToggleGroupItem
4648
- * @example
4649
- * <ToggleGroup>
4650
- * <ToggleGroupItem value="a">A</ToggleGroupItem>
4651
- * </ToggleGroup>
4652
- */
4653
- function ToggleGroup({ className, variant, size, spacing = 2, orientation = "horizontal", children, ...props }) {
4654
- return /* @__PURE__ */ jsx(ToggleGroup$1, {
4655
- "data-slot": "toggle-group",
4656
- "data-variant": variant,
4657
- "data-size": size,
4658
- "data-spacing": spacing,
4659
- "data-orientation": orientation,
4660
- style: { "--gap": spacing },
4661
- className: cn("group/toggle-group flex w-fit items-center rounded-lg data-[size=sm]:rounded-md data-vertical:flex-col data-vertical:items-stretch", className),
4662
- ...props,
4663
- children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, {
4664
- value: {
4665
- variant,
4666
- size,
4667
- spacing,
4668
- orientation
4669
- },
4670
- children
4671
- })
4672
- });
4673
- }
4674
- function ToggleGroupItem({ className, children, variant, size = "md", ...props }) {
4675
- const context = React.useContext(ToggleGroupContext);
4676
- return /* @__PURE__ */ jsx(Toggle$1, {
4677
- "data-slot": "toggle-group-item",
4678
- "data-variant": context.variant ?? variant,
4679
- "data-size": context.size ?? size,
4680
- "data-spacing": context.spacing,
4681
- className: cn("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", toggleVariants({
4682
- variant: context.variant ?? variant,
4683
- size: context.size ?? size
4684
- }), className),
4685
- ...props,
4686
- children
4687
- });
4688
- }
4689
- //#endregion
4690
- //#region src/components/micro/tooltip.tsx
4691
- /**
4692
- * ✅ AUDITED & REFACTORED
4693
- * - Design System Compliant (22 Commandments)
4694
- * - WCAG AAA/AA
4695
- * - Form Control Parity
4696
- * - CSS Delegated Logic
4697
- */
4698
- /**
4699
- * @description A popup that displays information related to an element.
4700
- * @requires TooltipTrigger, TooltipContent, TooltipProvider
4701
- * @example
4702
- * <TooltipProvider>
4703
- * <Tooltip>
4704
- * <TooltipTrigger>Hover</TooltipTrigger>
4705
- * <TooltipContent>Add to library</TooltipContent>
4706
- * </Tooltip>
4707
- * </TooltipProvider>
4708
- */
4709
- function TooltipProvider({ delay = 0, ...props }) {
4710
- return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
4711
- "data-slot": "tooltip-provider",
4712
- delay,
4713
- ...props
4714
- });
4715
- }
4716
- function Tooltip({ ...props }) {
4717
- return /* @__PURE__ */ jsx(Tooltip$1.Root, {
4718
- "data-slot": "tooltip",
4719
- ...props
4720
- });
4721
- }
4722
- var TooltipTrigger = React.forwardRef((props, ref) => {
4723
- return /* @__PURE__ */ jsx(Tooltip$1.Trigger, {
4724
- ref,
4725
- "data-slot": "tooltip-trigger",
4726
- ...props
4727
- });
4728
- });
4729
- TooltipTrigger.displayName = "TooltipTrigger";
4730
- var TooltipContent = React.forwardRef(({ className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, container, children, ...props }, ref) => {
4731
- return /* @__PURE__ */ jsx(Tooltip$1.Portal, {
4732
- container,
4733
- children: /* @__PURE__ */ jsx(ThemeWrapper, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
4734
- align,
4735
- alignOffset,
4736
- side,
4737
- sideOffset,
4738
- className: "isolate z-50",
4739
- children: /* @__PURE__ */ jsx(Tooltip$1.Popup, {
4740
- ref,
4741
- "data-slot": "tooltip-content",
4742
- className: cn("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
4743
- ...props,
4744
- children
4745
- })
4746
- }) })
4747
- });
4748
- });
4749
- TooltipContent.displayName = "TooltipContent";
4750
- //#endregion
4751
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogTitle, AlertDialogTrigger, AlertIcon, AlertTitle, AspectRatio, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonIcon, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, CheckboxIndicator, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxAnchor, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyAction, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, Sidebar, SidebarLabel, SidebarLogo, SidebarMenuItem, SidebarMenuItemList, Skeleton, Slider, SliderControl, SliderIndicator, SliderThumb, SliderTrack, Spinner, Switch, SwitchThumb, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, ThemeWrapper, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, labelVariants, navigationMenuTriggerStyle, selectTriggerVariants, tabsListVariants, toggleVariants, useCarousel, useComboboxContext, useDirection, useIsMobile, useSidebarToggle, useTheme };
4752
-
4753
- //# sourceMappingURL=index.js.map