shadcn-rails 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (315) hide show
  1. checksums.yaml +7 -0
  2. data/.dockerignore +40 -0
  3. data/CHANGELOG.md +54 -0
  4. data/CLAUDE.md +463 -0
  5. data/PROGRESS.md +485 -0
  6. data/README.md +1483 -0
  7. data/Rakefile +29 -0
  8. data/__tests__/controllers/__snapshots__/calendar_controller.test.js.snap +13 -0
  9. data/__tests__/controllers/__snapshots__/popover_controller.test.js.snap +46 -0
  10. data/__tests__/controllers/__snapshots__/sheet_controller.test.js.snap +111 -0
  11. data/__tests__/controllers/__snapshots__/tabs_controller.test.js.snap +27 -0
  12. data/__tests__/controllers/accordion_controller.test.js +904 -0
  13. data/__tests__/controllers/calendar_controller.test.js +1370 -0
  14. data/__tests__/controllers/carousel_controller.test.js +912 -0
  15. data/__tests__/controllers/checkbox_controller.test.js +454 -0
  16. data/__tests__/controllers/collapsible_controller.test.js +407 -0
  17. data/__tests__/controllers/combobox_controller.test.js +966 -0
  18. data/__tests__/controllers/context_menu_controller.test.js +627 -0
  19. data/__tests__/controllers/date_picker_controller.test.js +636 -0
  20. data/__tests__/controllers/dialog_controller.test.js +878 -0
  21. data/__tests__/controllers/drawer_controller.test.js +995 -0
  22. data/__tests__/controllers/menubar_controller.test.js +736 -0
  23. data/__tests__/controllers/navigation_menu_controller.test.js +598 -0
  24. data/__tests__/controllers/popover_controller.test.js +1007 -0
  25. data/__tests__/controllers/radio_group_controller.test.js +640 -0
  26. data/__tests__/controllers/resizable_controller.test.js +680 -0
  27. data/__tests__/controllers/select_controller.test.js +674 -0
  28. data/__tests__/controllers/sheet_controller.test.js +986 -0
  29. data/__tests__/controllers/slider_controller.test.js +1036 -0
  30. data/__tests__/controllers/switch_controller.test.js +424 -0
  31. data/__tests__/controllers/tabs_controller.test.js +907 -0
  32. data/__tests__/controllers/toggle_group_controller.test.js +839 -0
  33. data/__tests__/controllers/tooltip_controller.test.js +808 -0
  34. data/__tests__/helpers/stimulus-test-helper.js +203 -0
  35. data/app/assets/config/manifest.js +1 -0
  36. data/app/assets/javascripts/shadcn/controllers/accordion_controller.d.ts +53 -0
  37. data/app/assets/javascripts/shadcn/controllers/accordion_controller.js +140 -0
  38. data/app/assets/javascripts/shadcn/controllers/avatar_controller.d.ts +22 -0
  39. data/app/assets/javascripts/shadcn/controllers/avatar_controller.js +26 -0
  40. data/app/assets/javascripts/shadcn/controllers/calendar_controller.js +592 -0
  41. data/app/assets/javascripts/shadcn/controllers/carousel_controller.js +263 -0
  42. data/app/assets/javascripts/shadcn/controllers/checkbox_controller.d.ts +31 -0
  43. data/app/assets/javascripts/shadcn/controllers/checkbox_controller.js +48 -0
  44. data/app/assets/javascripts/shadcn/controllers/collapsible_controller.d.ts +43 -0
  45. data/app/assets/javascripts/shadcn/controllers/collapsible_controller.js +73 -0
  46. data/app/assets/javascripts/shadcn/controllers/combobox_controller.js +234 -0
  47. data/app/assets/javascripts/shadcn/controllers/command_controller.js +141 -0
  48. data/app/assets/javascripts/shadcn/controllers/command_dialog_controller.js +162 -0
  49. data/app/assets/javascripts/shadcn/controllers/context_menu_controller.js +202 -0
  50. data/app/assets/javascripts/shadcn/controllers/date_picker_controller.js +282 -0
  51. data/app/assets/javascripts/shadcn/controllers/dialog_controller.d.ts +67 -0
  52. data/app/assets/javascripts/shadcn/controllers/dialog_controller.js +187 -0
  53. data/app/assets/javascripts/shadcn/controllers/drawer_controller.d.ts +58 -0
  54. data/app/assets/javascripts/shadcn/controllers/drawer_controller.js +112 -0
  55. data/app/assets/javascripts/shadcn/controllers/dropdown_controller.d.ts +83 -0
  56. data/app/assets/javascripts/shadcn/controllers/dropdown_controller.js +225 -0
  57. data/app/assets/javascripts/shadcn/controllers/hover_card_controller.d.ts +59 -0
  58. data/app/assets/javascripts/shadcn/controllers/hover_card_controller.js +143 -0
  59. data/app/assets/javascripts/shadcn/controllers/input_otp_controller.d.ts +44 -0
  60. data/app/assets/javascripts/shadcn/controllers/input_otp_controller.js +206 -0
  61. data/app/assets/javascripts/shadcn/controllers/menubar_controller.js +323 -0
  62. data/app/assets/javascripts/shadcn/controllers/navigation_menu_controller.js +251 -0
  63. data/app/assets/javascripts/shadcn/controllers/popover_controller.d.ts +56 -0
  64. data/app/assets/javascripts/shadcn/controllers/popover_controller.js +141 -0
  65. data/app/assets/javascripts/shadcn/controllers/radio_group_controller.d.ts +47 -0
  66. data/app/assets/javascripts/shadcn/controllers/radio_group_controller.js +108 -0
  67. data/app/assets/javascripts/shadcn/controllers/resizable_controller.js +272 -0
  68. data/app/assets/javascripts/shadcn/controllers/scroll_area_controller.d.ts +44 -0
  69. data/app/assets/javascripts/shadcn/controllers/scroll_area_controller.js +74 -0
  70. data/app/assets/javascripts/shadcn/controllers/select_controller.d.ts +84 -0
  71. data/app/assets/javascripts/shadcn/controllers/select_controller.js +222 -0
  72. data/app/assets/javascripts/shadcn/controllers/sheet_controller.d.ts +60 -0
  73. data/app/assets/javascripts/shadcn/controllers/sheet_controller.js +151 -0
  74. data/app/assets/javascripts/shadcn/controllers/sidebar_controller.js +148 -0
  75. data/app/assets/javascripts/shadcn/controllers/slider_controller.d.ts +102 -0
  76. data/app/assets/javascripts/shadcn/controllers/slider_controller.js +364 -0
  77. data/app/assets/javascripts/shadcn/controllers/switch_controller.d.ts +46 -0
  78. data/app/assets/javascripts/shadcn/controllers/switch_controller.js +78 -0
  79. data/app/assets/javascripts/shadcn/controllers/tabs_controller.d.ts +51 -0
  80. data/app/assets/javascripts/shadcn/controllers/tabs_controller.js +126 -0
  81. data/app/assets/javascripts/shadcn/controllers/toast_controller.d.ts +37 -0
  82. data/app/assets/javascripts/shadcn/controllers/toast_controller.js +58 -0
  83. data/app/assets/javascripts/shadcn/controllers/toggle_controller.d.ts +27 -0
  84. data/app/assets/javascripts/shadcn/controllers/toggle_controller.js +42 -0
  85. data/app/assets/javascripts/shadcn/controllers/toggle_group_controller.d.ts +44 -0
  86. data/app/assets/javascripts/shadcn/controllers/toggle_group_controller.js +68 -0
  87. data/app/assets/javascripts/shadcn/controllers/tooltip_controller.d.ts +56 -0
  88. data/app/assets/javascripts/shadcn/controllers/tooltip_controller.js +117 -0
  89. data/app/assets/javascripts/shadcn/index.d.ts +74 -0
  90. data/app/assets/javascripts/shadcn/index.js +133 -0
  91. data/app/assets/stylesheets/.keep +0 -0
  92. data/app/assets/stylesheets/shadcn/base.css +445 -0
  93. data/app/assets/stylesheets/shadcn/components.css +513 -0
  94. data/app/assets/stylesheets/shadcn/index.css +18 -0
  95. data/app/assets/stylesheets/shadcn/themes/gray.css +68 -0
  96. data/app/assets/stylesheets/shadcn/themes/slate.css +68 -0
  97. data/app/assets/stylesheets/shadcn/themes/stone.css +68 -0
  98. data/app/assets/stylesheets/shadcn/themes/zinc.css +68 -0
  99. data/app/components/shadcn/accordion_component.rb +63 -0
  100. data/app/components/shadcn/accordion_content_component.rb +29 -0
  101. data/app/components/shadcn/accordion_item_component.rb +40 -0
  102. data/app/components/shadcn/accordion_trigger_component.rb +49 -0
  103. data/app/components/shadcn/alert_component.rb +75 -0
  104. data/app/components/shadcn/alert_description_component.rb +12 -0
  105. data/app/components/shadcn/alert_dialog_action_component.rb +24 -0
  106. data/app/components/shadcn/alert_dialog_cancel_component.rb +24 -0
  107. data/app/components/shadcn/alert_dialog_component.rb +71 -0
  108. data/app/components/shadcn/alert_dialog_content_component.rb +57 -0
  109. data/app/components/shadcn/alert_dialog_description_component.rb +12 -0
  110. data/app/components/shadcn/alert_dialog_footer_component.rb +19 -0
  111. data/app/components/shadcn/alert_dialog_header_component.rb +19 -0
  112. data/app/components/shadcn/alert_dialog_title_component.rb +12 -0
  113. data/app/components/shadcn/alert_title_component.rb +12 -0
  114. data/app/components/shadcn/aspect_ratio_component.rb +49 -0
  115. data/app/components/shadcn/avatar_component.rb +107 -0
  116. data/app/components/shadcn/avatar_fallback_component.rb +17 -0
  117. data/app/components/shadcn/badge_component.rb +49 -0
  118. data/app/components/shadcn/base_component.rb +100 -0
  119. data/app/components/shadcn/breadcrumb_component.rb +70 -0
  120. data/app/components/shadcn/breadcrumb_item_component.rb +50 -0
  121. data/app/components/shadcn/button_component.rb +141 -0
  122. data/app/components/shadcn/button_group_component.rb +69 -0
  123. data/app/components/shadcn/calendar_component.rb +337 -0
  124. data/app/components/shadcn/card_action_component.rb +10 -0
  125. data/app/components/shadcn/card_component.rb +63 -0
  126. data/app/components/shadcn/card_content_component.rb +19 -0
  127. data/app/components/shadcn/card_description_component.rb +12 -0
  128. data/app/components/shadcn/card_footer_component.rb +12 -0
  129. data/app/components/shadcn/card_header_component.rb +24 -0
  130. data/app/components/shadcn/card_title_component.rb +18 -0
  131. data/app/components/shadcn/carousel_component.rb +275 -0
  132. data/app/components/shadcn/checkbox_component.rb +103 -0
  133. data/app/components/shadcn/collapsible_component.rb +66 -0
  134. data/app/components/shadcn/collapsible_content_component.rb +28 -0
  135. data/app/components/shadcn/combobox_component.rb +322 -0
  136. data/app/components/shadcn/command_component.rb +52 -0
  137. data/app/components/shadcn/command_dialog_component.rb +76 -0
  138. data/app/components/shadcn/command_empty_component.rb +12 -0
  139. data/app/components/shadcn/command_group_component.rb +34 -0
  140. data/app/components/shadcn/command_input_component.rb +59 -0
  141. data/app/components/shadcn/command_item_component.rb +48 -0
  142. data/app/components/shadcn/command_list_component.rb +38 -0
  143. data/app/components/shadcn/command_separator_component.rb +12 -0
  144. data/app/components/shadcn/command_shortcut_component.rb +12 -0
  145. data/app/components/shadcn/context_menu_component.rb +64 -0
  146. data/app/components/shadcn/context_menu_content_component.rb +44 -0
  147. data/app/components/shadcn/context_menu_item_component.rb +63 -0
  148. data/app/components/shadcn/context_menu_label_component.rb +18 -0
  149. data/app/components/shadcn/context_menu_separator_component.rb +12 -0
  150. data/app/components/shadcn/context_menu_shortcut_component.rb +12 -0
  151. data/app/components/shadcn/date_picker_component.rb +368 -0
  152. data/app/components/shadcn/dialog_component.rb +77 -0
  153. data/app/components/shadcn/dialog_content_component.rb +91 -0
  154. data/app/components/shadcn/dialog_description_component.rb +12 -0
  155. data/app/components/shadcn/dialog_footer_component.rb +12 -0
  156. data/app/components/shadcn/dialog_header_component.rb +19 -0
  157. data/app/components/shadcn/dialog_title_component.rb +12 -0
  158. data/app/components/shadcn/drawer_component.rb +72 -0
  159. data/app/components/shadcn/drawer_content_component.rb +76 -0
  160. data/app/components/shadcn/drawer_description_component.rb +12 -0
  161. data/app/components/shadcn/drawer_footer_component.rb +12 -0
  162. data/app/components/shadcn/drawer_header_component.rb +19 -0
  163. data/app/components/shadcn/drawer_title_component.rb +12 -0
  164. data/app/components/shadcn/dropdown_menu_component.rb +75 -0
  165. data/app/components/shadcn/dropdown_menu_content_component.rb +49 -0
  166. data/app/components/shadcn/dropdown_menu_group_component.rb +10 -0
  167. data/app/components/shadcn/dropdown_menu_item_component.rb +63 -0
  168. data/app/components/shadcn/dropdown_menu_label_component.rb +18 -0
  169. data/app/components/shadcn/dropdown_menu_separator_component.rb +12 -0
  170. data/app/components/shadcn/dropdown_menu_shortcut_component.rb +12 -0
  171. data/app/components/shadcn/empty_component.rb +48 -0
  172. data/app/components/shadcn/empty_content_component.rb +12 -0
  173. data/app/components/shadcn/empty_description_component.rb +12 -0
  174. data/app/components/shadcn/empty_header_component.rb +29 -0
  175. data/app/components/shadcn/empty_media_component.rb +21 -0
  176. data/app/components/shadcn/empty_title_component.rb +12 -0
  177. data/app/components/shadcn/field_component.rb +113 -0
  178. data/app/components/shadcn/hover_card_component.rb +64 -0
  179. data/app/components/shadcn/hover_card_content_component.rb +36 -0
  180. data/app/components/shadcn/input_component.rb +108 -0
  181. data/app/components/shadcn/input_group_component.rb +70 -0
  182. data/app/components/shadcn/input_otp_component.rb +183 -0
  183. data/app/components/shadcn/item_actions_component.rb +12 -0
  184. data/app/components/shadcn/item_component.rb +98 -0
  185. data/app/components/shadcn/item_content_component.rb +24 -0
  186. data/app/components/shadcn/item_description_component.rb +12 -0
  187. data/app/components/shadcn/item_footer_component.rb +12 -0
  188. data/app/components/shadcn/item_group_component.rb +24 -0
  189. data/app/components/shadcn/item_header_component.rb +12 -0
  190. data/app/components/shadcn/item_media_component.rb +22 -0
  191. data/app/components/shadcn/item_separator_component.rb +12 -0
  192. data/app/components/shadcn/item_title_component.rb +12 -0
  193. data/app/components/shadcn/kbd_component.rb +36 -0
  194. data/app/components/shadcn/label_component.rb +49 -0
  195. data/app/components/shadcn/menubar_checkbox_item_component.rb +76 -0
  196. data/app/components/shadcn/menubar_component.rb +56 -0
  197. data/app/components/shadcn/menubar_content_component.rb +64 -0
  198. data/app/components/shadcn/menubar_item_component.rb +65 -0
  199. data/app/components/shadcn/menubar_label_component.rb +27 -0
  200. data/app/components/shadcn/menubar_menu_component.rb +34 -0
  201. data/app/components/shadcn/menubar_radio_group_component.rb +42 -0
  202. data/app/components/shadcn/menubar_radio_item_component.rb +76 -0
  203. data/app/components/shadcn/menubar_separator_component.rb +22 -0
  204. data/app/components/shadcn/menubar_shortcut_component.rb +21 -0
  205. data/app/components/shadcn/menubar_sub_component.rb +38 -0
  206. data/app/components/shadcn/menubar_sub_content_component.rb +45 -0
  207. data/app/components/shadcn/menubar_sub_trigger_component.rb +59 -0
  208. data/app/components/shadcn/menubar_trigger_component.rb +31 -0
  209. data/app/components/shadcn/native_select_component.rb +150 -0
  210. data/app/components/shadcn/navigation_menu_component.rb +76 -0
  211. data/app/components/shadcn/navigation_menu_content_component.rb +30 -0
  212. data/app/components/shadcn/navigation_menu_item_component.rb +39 -0
  213. data/app/components/shadcn/navigation_menu_link_component.rb +38 -0
  214. data/app/components/shadcn/navigation_menu_list_component.rb +29 -0
  215. data/app/components/shadcn/navigation_menu_trigger_component.rb +59 -0
  216. data/app/components/shadcn/pagination_component.rb +195 -0
  217. data/app/components/shadcn/pagination_content_component.rb +47 -0
  218. data/app/components/shadcn/pagination_ellipsis_component.rb +30 -0
  219. data/app/components/shadcn/pagination_item_component.rb +53 -0
  220. data/app/components/shadcn/pagination_next_component.rb +48 -0
  221. data/app/components/shadcn/pagination_previous_component.rb +48 -0
  222. data/app/components/shadcn/popover_component.rb +76 -0
  223. data/app/components/shadcn/popover_content_component.rb +25 -0
  224. data/app/components/shadcn/progress_component.rb +77 -0
  225. data/app/components/shadcn/radio_group_component.rb +129 -0
  226. data/app/components/shadcn/radio_group_item_component.rb +109 -0
  227. data/app/components/shadcn/resizable_handle_component.rb +98 -0
  228. data/app/components/shadcn/resizable_panel_component.rb +56 -0
  229. data/app/components/shadcn/resizable_panel_group_component.rb +94 -0
  230. data/app/components/shadcn/scroll_area_component.rb +110 -0
  231. data/app/components/shadcn/select_component.rb +151 -0
  232. data/app/components/shadcn/select_group_component.rb +32 -0
  233. data/app/components/shadcn/select_item_component.rb +59 -0
  234. data/app/components/shadcn/select_separator_component.rb +12 -0
  235. data/app/components/shadcn/separator_component.rb +54 -0
  236. data/app/components/shadcn/sheet_component.rb +82 -0
  237. data/app/components/shadcn/sheet_content_component.rb +95 -0
  238. data/app/components/shadcn/sheet_description_component.rb +12 -0
  239. data/app/components/shadcn/sheet_footer_component.rb +12 -0
  240. data/app/components/shadcn/sheet_header_component.rb +19 -0
  241. data/app/components/shadcn/sheet_title_component.rb +12 -0
  242. data/app/components/shadcn/sidebar_component.rb +180 -0
  243. data/app/components/shadcn/sidebar_content_component.rb +32 -0
  244. data/app/components/shadcn/sidebar_footer_component.rb +24 -0
  245. data/app/components/shadcn/sidebar_group_action_component.rb +26 -0
  246. data/app/components/shadcn/sidebar_group_component.rb +38 -0
  247. data/app/components/shadcn/sidebar_group_content_component.rb +32 -0
  248. data/app/components/shadcn/sidebar_group_label_component.rb +25 -0
  249. data/app/components/shadcn/sidebar_header_component.rb +24 -0
  250. data/app/components/shadcn/sidebar_inset_component.rb +25 -0
  251. data/app/components/shadcn/sidebar_menu_action_component.rb +37 -0
  252. data/app/components/shadcn/sidebar_menu_badge_component.rb +25 -0
  253. data/app/components/shadcn/sidebar_menu_button_component.rb +52 -0
  254. data/app/components/shadcn/sidebar_menu_component.rb +32 -0
  255. data/app/components/shadcn/sidebar_menu_item_component.rb +41 -0
  256. data/app/components/shadcn/sidebar_menu_skeleton_component.rb +46 -0
  257. data/app/components/shadcn/sidebar_menu_sub_button_component.rb +43 -0
  258. data/app/components/shadcn/sidebar_menu_sub_component.rb +33 -0
  259. data/app/components/shadcn/sidebar_menu_sub_item_component.rb +30 -0
  260. data/app/components/shadcn/sidebar_provider_component.rb +57 -0
  261. data/app/components/shadcn/sidebar_rail_component.rb +30 -0
  262. data/app/components/shadcn/sidebar_separator_component.rb +24 -0
  263. data/app/components/shadcn/sidebar_trigger_component.rb +51 -0
  264. data/app/components/shadcn/skeleton_component.rb +29 -0
  265. data/app/components/shadcn/slider_component.rb +76 -0
  266. data/app/components/shadcn/spinner_component.rb +67 -0
  267. data/app/components/shadcn/switch_component.rb +147 -0
  268. data/app/components/shadcn/table_body_component.rb +16 -0
  269. data/app/components/shadcn/table_caption_component.rb +12 -0
  270. data/app/components/shadcn/table_cell_component.rb +12 -0
  271. data/app/components/shadcn/table_component.rb +57 -0
  272. data/app/components/shadcn/table_footer_component.rb +16 -0
  273. data/app/components/shadcn/table_head_component.rb +12 -0
  274. data/app/components/shadcn/table_header_component.rb +16 -0
  275. data/app/components/shadcn/table_row_component.rb +40 -0
  276. data/app/components/shadcn/tabs_component.rb +78 -0
  277. data/app/components/shadcn/tabs_content_component.rb +32 -0
  278. data/app/components/shadcn/tabs_list_component.rb +30 -0
  279. data/app/components/shadcn/tabs_trigger_component.rb +37 -0
  280. data/app/components/shadcn/textarea_component.rb +84 -0
  281. data/app/components/shadcn/toast_action_component.rb +18 -0
  282. data/app/components/shadcn/toast_component.rb +114 -0
  283. data/app/components/shadcn/toast_description_component.rb +12 -0
  284. data/app/components/shadcn/toast_title_component.rb +12 -0
  285. data/app/components/shadcn/toast_viewport_component.rb +12 -0
  286. data/app/components/shadcn/toggle_component.rb +77 -0
  287. data/app/components/shadcn/toggle_group_component.rb +96 -0
  288. data/app/components/shadcn/toggle_group_item_component.rb +62 -0
  289. data/app/components/shadcn/tooltip_component.rb +89 -0
  290. data/app/components/shadcn/typography_component.rb +112 -0
  291. data/babel.config.cjs +5 -0
  292. data/bin/console +11 -0
  293. data/bin/setup +8 -0
  294. data/config/importmap.rb +5 -0
  295. data/fly.toml +26 -0
  296. data/jest.config.js +19 -0
  297. data/jest.setup.js +8 -0
  298. data/lib/generators/shadcn/component/component_generator.rb +188 -0
  299. data/lib/generators/shadcn/install/install_generator.rb +140 -0
  300. data/lib/generators/shadcn/install/templates/initializer.rb.tt +35 -0
  301. data/lib/generators/shadcn/install/templates/shadcn.yml.tt +35 -0
  302. data/lib/generators/shadcn/theme/theme_generator.rb +128 -0
  303. data/lib/shadcn/rails/class_merger.rb +228 -0
  304. data/lib/shadcn/rails/configuration.rb +341 -0
  305. data/lib/shadcn/rails/engine.rb +59 -0
  306. data/lib/shadcn/rails/helpers/class_name_helper.rb +35 -0
  307. data/lib/shadcn/rails/helpers/component_helper.rb +60 -0
  308. data/lib/shadcn/rails/helpers/pagination_helper.rb +187 -0
  309. data/lib/shadcn/rails/version.rb +7 -0
  310. data/lib/shadcn/rails.rb +179 -0
  311. data/package-lock.json +7415 -0
  312. data/package.json +68 -0
  313. data/rollup.config.js +29 -0
  314. data/sig/shadcn/rails.rbs +6 -0
  315. metadata +526 -0
data/PROGRESS.md ADDED
@@ -0,0 +1,485 @@
1
+ # shadcn-rails Documentation Progress
2
+
3
+ ---
4
+
5
+ ## Component Parity Audit (vs shadcn/ui)
6
+
7
+ Reference: https://ui.shadcn.com/docs/components
8
+
9
+ ### ✅ Implemented Components (47/59)
10
+
11
+ | Component | shadcn/ui Docs | Status |
12
+ |-----------|----------------|--------|
13
+ | Accordion | [docs](https://ui.shadcn.com/docs/components/accordion) | ✅ Complete |
14
+ | Alert | [docs](https://ui.shadcn.com/docs/components/alert) | ✅ Complete |
15
+ | Alert Dialog | [docs](https://ui.shadcn.com/docs/components/alert-dialog) | ✅ Complete |
16
+ | Aspect Ratio | [docs](https://ui.shadcn.com/docs/components/aspect-ratio) | ✅ Complete |
17
+ | Avatar | [docs](https://ui.shadcn.com/docs/components/avatar) | ✅ Complete |
18
+ | Badge | [docs](https://ui.shadcn.com/docs/components/badge) | ✅ Complete |
19
+ | Breadcrumb | [docs](https://ui.shadcn.com/docs/components/breadcrumb) | ✅ Complete |
20
+ | Button | [docs](https://ui.shadcn.com/docs/components/button) | ✅ Complete |
21
+ | Button Group | N/A | ✅ Complete |
22
+ | Card | [docs](https://ui.shadcn.com/docs/components/card) | ✅ Complete |
23
+ | Command | [docs](https://ui.shadcn.com/docs/components/command) | ✅ Complete |
24
+ | Checkbox | [docs](https://ui.shadcn.com/docs/components/checkbox) | ✅ Complete |
25
+ | Collapsible | [docs](https://ui.shadcn.com/docs/components/collapsible) | ✅ Complete |
26
+ | Dialog | [docs](https://ui.shadcn.com/docs/components/dialog) | ✅ Complete |
27
+ | Drawer | [docs](https://ui.shadcn.com/docs/components/drawer) | ✅ Complete (animations added) |
28
+ | Dropdown Menu | [docs](https://ui.shadcn.com/docs/components/dropdown-menu) | ✅ Complete |
29
+ | Field | N/A | ✅ Complete |
30
+ | Hover Card | [docs](https://ui.shadcn.com/docs/components/hover-card) | ✅ Complete |
31
+ | Input | [docs](https://ui.shadcn.com/docs/components/input) | ✅ Complete |
32
+ | Input Group | N/A | ✅ Complete |
33
+ | Input OTP | [docs](https://ui.shadcn.com/docs/components/input-otp) | ✅ Complete |
34
+ | Kbd | N/A | ✅ Complete |
35
+ | Label | [docs](https://ui.shadcn.com/docs/components/label) | ✅ Complete |
36
+ | Native Select | N/A | ✅ Complete |
37
+ | Pagination | [docs](https://ui.shadcn.com/docs/components/pagination) | ✅ Complete |
38
+ | Popover | [docs](https://ui.shadcn.com/docs/components/popover) | ✅ Complete |
39
+ | Progress | [docs](https://ui.shadcn.com/docs/components/progress) | ✅ Complete |
40
+ | Radio Group | [docs](https://ui.shadcn.com/docs/components/radio-group) | ✅ Complete |
41
+ | Scroll Area | [docs](https://ui.shadcn.com/docs/components/scroll-area) | ✅ Complete |
42
+ | Select | [docs](https://ui.shadcn.com/docs/components/select) | ✅ Complete |
43
+ | Separator | [docs](https://ui.shadcn.com/docs/components/separator) | ✅ Complete |
44
+ | Sheet | [docs](https://ui.shadcn.com/docs/components/sheet) | ✅ Complete |
45
+ | Skeleton | [docs](https://ui.shadcn.com/docs/components/skeleton) | ✅ Complete |
46
+ | Slider | [docs](https://ui.shadcn.com/docs/components/slider) | ✅ Complete |
47
+ | Spinner | N/A | ✅ Complete |
48
+ | Switch | [docs](https://ui.shadcn.com/docs/components/switch) | ✅ Complete |
49
+ | Table | [docs](https://ui.shadcn.com/docs/components/table) | ✅ Complete |
50
+ | Tabs | [docs](https://ui.shadcn.com/docs/components/tabs) | ✅ Complete |
51
+ | Textarea | [docs](https://ui.shadcn.com/docs/components/textarea) | ✅ Complete |
52
+ | Toast | [docs](https://ui.shadcn.com/docs/components/toast) | ✅ Complete |
53
+ | Toggle | [docs](https://ui.shadcn.com/docs/components/toggle) | ✅ Complete |
54
+ | Toggle Group | [docs](https://ui.shadcn.com/docs/components/toggle-group) | ✅ Complete |
55
+ | Tooltip | [docs](https://ui.shadcn.com/docs/components/tooltip) | ✅ Complete |
56
+ | Typography | N/A | ✅ Complete |
57
+
58
+ ### ❌ Missing Components (12/59)
59
+
60
+ | Component | shadcn/ui Docs | Priority | Complexity | Notes |
61
+ |-----------|----------------|----------|------------|-------|
62
+ | **High Priority** |
63
+ | Calendar | [docs](https://ui.shadcn.com/docs/components/calendar) | High | High | Date selection, requires date library integration |
64
+ | Data Table | [docs](https://ui.shadcn.com/docs/components/data-table) | High | High | Sortable, filterable data grid |
65
+ | Date Picker | [docs](https://ui.shadcn.com/docs/components/date-picker) | High | High | Calendar + Popover composition |
66
+ | Form | [docs](https://ui.shadcn.com/docs/components/form) | High | Medium | Form builder integration with Rails |
67
+ | Navigation Menu | [docs](https://ui.shadcn.com/docs/components/navigation-menu) | High | Medium | Site navigation with dropdowns |
68
+ | Sidebar | [docs](https://ui.shadcn.com/docs/components/sidebar) | High | Medium | App sidebar layout pattern |
69
+ | **Medium Priority** |
70
+ | Carousel | [docs](https://ui.shadcn.com/docs/components/carousel) | Medium | Medium | Image/content slider |
71
+ | Context Menu | [docs](https://ui.shadcn.com/docs/components/context-menu) | Medium | Medium | Right-click menu |
72
+ | Menubar | [docs](https://ui.shadcn.com/docs/components/menubar) | Medium | Medium | Desktop menu bar |
73
+ | Resizable | [docs](https://ui.shadcn.com/docs/components/resizable) | Medium | Medium | Resizable panels |
74
+ | Sonner | [docs](https://ui.shadcn.com/docs/components/sonner) | Medium | Low | Toast alternative (we have Toast) |
75
+ | **Low Priority** |
76
+ | Chart | [docs](https://ui.shadcn.com/docs/components/chart) | Low | High | Requires charting library |
77
+
78
+ ### ✅ Recently Implemented
79
+ | Component | Status | Notes |
80
+ |-----------|--------|-------|
81
+ | Empty | ✅ Complete | Empty state placeholder with media, title, description, and content slots |
82
+ | Item | ✅ Complete | Flexible flex container with variants and subcomponents |
83
+ | Command | ✅ Complete | Command palette with search, keyboard navigation, dialog variant |
84
+ | Combobox | ✅ Complete | Autocomplete input with searchable dropdown, form integration, keyboard navigation |
85
+
86
+ ### Priority Roadmap
87
+
88
+ #### Phase 1: Quick Wins (Low complexity, high value) ✅ COMPLETED
89
+ These can be implemented quickly and provide immediate value:
90
+ 1. ~~**Button Group** - Simple wrapper component~~ ✅
91
+ 2. ~~**Field** - Form field wrapper (label + input + error)~~ ✅
92
+ 3. ~~**Input Group** - Input with prefix/suffix icons~~ ✅
93
+ 4. ~~**Kbd** - Keyboard shortcut display~~ ✅
94
+ 5. ~~**Spinner** - Loading animation~~ ✅
95
+ 6. ~~**Typography** - Prose/text styles~~ ✅
96
+
97
+ #### Phase 2: Form Ecosystem ✅ COMPLETED
98
+ Build out form-related components:
99
+ 1. ~~**Form** - Rails form builder integration~~ (using Field component)
100
+ 2. ~~**Native Select** - Styled native select~~ ✅
101
+ 3. ~~**Input OTP** - One-time password input~~ ✅
102
+
103
+ #### Phase 3: Navigation & Layout
104
+ Essential for app-like experiences:
105
+ 1. **Navigation Menu** - Site navigation with dropdowns
106
+ 2. **Sidebar** - App sidebar layout
107
+ 3. **Menubar** - Desktop menu bar
108
+ 4. **Context Menu** - Right-click menus
109
+
110
+ #### Phase 4: Advanced Interactive Components
111
+ Complex components requiring significant Stimulus work:
112
+ 1. **Combobox** - Autocomplete/searchable select
113
+ 2. **Command** - Command palette (cmd+k pattern)
114
+ 3. **Calendar** - Date selection grid
115
+ 4. **Date Picker** - Calendar + Popover composition
116
+ 5. **Resizable** - Draggable panel resizing
117
+ 6. **Carousel** - Image/content slider
118
+
119
+ #### Phase 5: Data & Visualization
120
+ Components for displaying data:
121
+ 1. **Data Table** - Sortable, filterable tables
122
+ 2. **Chart** - Data visualization (may skip, Rails apps often use Chartkick/etc)
123
+
124
+ #### Likely to Skip
125
+ - **Empty** - Easy to build custom, low standardization value
126
+ - **Item** - Very generic, apps will customize heavily
127
+ - **Sonner** - We already have Toast component
128
+
129
+ ---
130
+
131
+ ## Feature Parity Analysis (Implemented Components)
132
+
133
+ Detailed comparison of our implementations vs shadcn/ui features.
134
+
135
+ ### ✅ Full Parity (No Action Needed)
136
+
137
+ | Component | Notes |
138
+ |-----------|-------|
139
+ | **Button** | All 6 variants, 6 sizes, loading state, href support ✅ |
140
+ | **Dialog** | All slots (trigger, content, header, title, description, footer, close) ✅ |
141
+ | **Accordion** | Single/multiple types, collapsible, default_value ✅ |
142
+ | **Tabs** | TabsList, TabsTrigger, TabsContent, defaultValue ✅ |
143
+ | **Alert** | default/destructive variants, title/description/icon slots ✅ |
144
+ | **Badge** | All 4 variants (default, secondary, destructive, outline) ✅ |
145
+ | **Toggle** | default/outline variants, sm/default/lg sizes, disabled ✅ |
146
+ | **Toggle Group** | Single/multiple types, variants, sizes ✅ |
147
+ | **Checkbox** | checked, disabled, indeterminate, form integration ✅ |
148
+ | **Switch** | Basic toggle with label support ✅ |
149
+ | **Slider** | value, min, max, step, disabled ✅ |
150
+ | **Progress** | value prop, styling ✅ |
151
+ | **Tooltip** | side, align, delay_duration, skip_delay_duration ✅ |
152
+ | **Sheet** | All 4 sides (top, right, bottom, left), all slots ✅ |
153
+ | **Card** | header, title, description, content, footer slots ✅ |
154
+ | **Input** | type, placeholder, disabled, required ✅ |
155
+ | **Textarea** | placeholder, disabled, rows ✅ |
156
+ | **Label** | for attribute, styling ✅ |
157
+ | **Separator** | horizontal/vertical orientation ✅ |
158
+ | **Skeleton** | Basic skeleton loading ✅ |
159
+ | **Avatar** | src, alt, fallback ✅ |
160
+ | **Aspect Ratio** | ratio prop ✅ |
161
+ | **Scroll Area** | Custom scrollbar styling ✅ |
162
+ | **Table** | header, body, footer, row, cell, caption ✅ |
163
+ | **Breadcrumb** | items, separator ✅ |
164
+ | **Collapsible** | open, trigger, content ✅ |
165
+ | **Alert Dialog** | All slots, cancel/action buttons ✅ |
166
+ | **Hover Card** | trigger, content, positioning ✅ |
167
+ | **Popover** | trigger, content, positioning ✅ |
168
+ | **Radio Group** | items, disabled, default value ✅ |
169
+ | **Select** | trigger, content, items, groups, separators ✅ |
170
+ | **Pagination** | items, previous, next, ellipsis ✅ |
171
+
172
+ ### ⚠️ Partial Parity (Features Missing)
173
+
174
+ | Component | Our Implementation | Missing from shadcn/ui |
175
+ |-----------|-------------------|------------------------|
176
+ | **Dropdown Menu** | Basic items, labels, separators, groups | ❌ Checkbox items, ❌ Radio items, ❌ Submenus, ❌ Keyboard shortcut display |
177
+ | **Drawer** | Full drawer with 4 directions and CSS animations | ❌ Swipe/gesture support (like Vaul) - planned future enhancement |
178
+ | **Toast** | Basic toast with variants | Note: shadcn/ui deprecated Toast in favor of Sonner (React-specific). Our implementation is appropriate for Rails. |
179
+
180
+ ### 📋 Feature Gap TODOs
181
+
182
+ **Dropdown Menu Enhancements:**
183
+ - [ ] Add `DropdownMenuCheckboxItem` - checkbox items within menu
184
+ - [ ] Add `DropdownMenuRadioGroup` and `DropdownMenuRadioItem` - radio selection
185
+ - [ ] Add `DropdownMenuSub`, `DropdownMenuSubTrigger`, `DropdownMenuSubContent` - nested submenus
186
+ - [ ] Add keyboard shortcut display in menu items
187
+ - Reference: https://ui.shadcn.com/docs/components/dropdown-menu
188
+
189
+ **Drawer Enhancements:**
190
+ - [ ] Add swipe/gesture support for mobile (slide to close)
191
+ - [ ] Add responsive pattern example (Drawer on mobile, Dialog on desktop using media queries)
192
+ - [ ] Consider snap points for partial drawer states
193
+ - Reference: https://ui.shadcn.com/docs/components/drawer
194
+
195
+ ---
196
+
197
+ ## Completed Phases
198
+
199
+ ### Phase 1: Docs Layout & Partials ✅
200
+ - Created `docs_controller.rb` with component metadata
201
+ - Created docs layout with sidebar navigation
202
+ - Created reusable partials: `_code_example`, `_props_table`, `_demo_card`, `_stimulus_docs`
203
+
204
+ ### Phase 2: Key Component Templates ✅
205
+ - Button, Dialog, Tabs, Pagination documentation pages
206
+
207
+ ### Phase 2b: File-based Code Examples ✅
208
+ - Created `erb_example` helper for loading code examples from files
209
+ - Solved ERB escaping issues
210
+
211
+ ### Phase 2c: Convert Pages to File-based Examples ✅
212
+ - All pages now use file-based code examples
213
+
214
+ ### Phase 3: All Component Documentation Pages ✅
215
+ Generated 35 component documentation pages:
216
+ - Accordion, Alert, Alert Dialog, Aspect Ratio, Avatar
217
+ - Badge, Breadcrumb, Button, Card, Checkbox
218
+ - Collapsible, Dialog, Drawer, Dropdown Menu, Hover Card
219
+ - Input, Label, Pagination, Popover, Progress
220
+ - Radio Group, Scroll Area, Select, Separator, Sheet
221
+ - Skeleton, Slider, Switch, Table, Tabs
222
+ - Textarea, Toast, Toggle, Toggle Group, Tooltip
223
+
224
+ ### Bug Fixes ✅
225
+ - Fixed Pagination component ordering bug (ellipses rendering after items)
226
+ - Added regression tests for pagination ordering
227
+ - Fixed CardComponent `with_content` method alias (was `with_content_slot`)
228
+
229
+ ### Testing (Playwright) ✅
230
+ - Verified all 35 component documentation pages load correctly
231
+ - Tested interactive components:
232
+ - Dialog: Opens with form fields, close button works
233
+ - Accordion: Expands/collapses items correctly
234
+ - Checkbox: Toggles checked state
235
+ - All sidebar navigation links work
236
+
237
+ ### Phase 5: Pagination Gem Integration ✅
238
+ - Added Kaminari integration examples with controller and view code
239
+ - Added will_paginate integration examples
240
+ - Added Pagy integration examples
241
+ - Added documentation for URL builder pattern
242
+ - Added examples for window sizes and disabled states
243
+
244
+ ### Phase 6: README Updates ✅
245
+ - Documented JavaScript bundler setup (esbuild, importmap, webpack, Vite)
246
+ - Added TypeScript configuration guide
247
+ - Updated installation instructions
248
+ - Added comprehensive component documentation with API references
249
+
250
+ ### Phase 7: Documentation Site Evaluation ✅
251
+ - Evaluated Bridgetown approach vs current Rails dummy app
252
+ - **Decision**: Continue with Rails dummy app approach
253
+ - Already functional and deployed locally
254
+ - Renders actual shadcn-rails components
255
+ - No separate build/deployment pipeline needed
256
+ - Can be deployed to any Rails hosting (Heroku, Render, Fly.io)
257
+ - Deferred Bridgetown as optional future enhancement for static SEO-friendly site
258
+
259
+ ---
260
+
261
+ ### Phase 4: Lookbook Previews ✅
262
+ All 35 components now have Lookbook previews:
263
+ - Accordion, Alert, Alert Dialog, Aspect Ratio, Avatar
264
+ - Badge, Breadcrumb, Button, Card, Checkbox
265
+ - Collapsible, Dialog, Drawer, Dropdown Menu, Hover Card
266
+ - Input, Label, Pagination, Popover, Progress
267
+ - Radio Group, Scroll Area, Select, Separator, Sheet
268
+ - Skeleton, Slider, Switch, Table, Tabs
269
+ - Textarea, Toast, Toggle, Toggle Group, Tooltip
270
+
271
+ ---
272
+
273
+ ## Pending Phases
274
+
275
+ ### Phase 8: Documentation Website Deployment
276
+ - Deploy documentation site to production URL
277
+ - Set up CI/CD for docs
278
+ - Configure custom domain (optional)
279
+
280
+ ---
281
+
282
+ ## Known Issues & TODOs
283
+
284
+ ### Dropdown Menu Component
285
+ - [ ] **TODO**: Add checkbox items (`DropdownMenuCheckboxItem`)
286
+ - [ ] **TODO**: Add radio items (`DropdownMenuRadioGroup`, `DropdownMenuRadioItem`)
287
+ - [ ] **TODO**: Add submenus (`DropdownMenuSub`, `DropdownMenuSubTrigger`, `DropdownMenuSubContent`)
288
+ - [ ] **TODO**: Add keyboard shortcut display in menu items
289
+ - Reference: https://ui.shadcn.com/docs/components/dropdown-menu
290
+
291
+ ### Toast Component
292
+ - [x] **BUG FIXED**: Toasts are now auto-closing/dismissing
293
+ - [x] Close button functionality verified and working
294
+ - [x] Auto-dismiss timer working (default 5000ms)
295
+ - Note: Library exports ToastController in `index.js`. Docs layout uses inline controllers for CDN demo only.
296
+ - Reference: https://ui.shadcn.com/docs/components/toast
297
+
298
+ ### Drawer Component
299
+ - [ ] **TODO**: Add mobile gesture support (slide/swipe to close)
300
+ - [ ] Add responsive drawer example (drawer on mobile, dialog on desktop)
301
+ - [ ] Consider snap points for partial drawer states
302
+ - Reference: https://ui.shadcn.com/docs/components/drawer
303
+
304
+ ### Stimulus Controllers (Library)
305
+ **Status**: All 20 interactive components have controllers in `app/assets/javascripts/shadcn/controllers/`
306
+
307
+ | Controller | File | Exported in index.js |
308
+ |------------|------|---------------------|
309
+ | Accordion | accordion_controller.js | ✅ |
310
+ | Avatar | avatar_controller.js | ✅ |
311
+ | Checkbox | checkbox_controller.js | ✅ |
312
+ | Collapsible | collapsible_controller.js | ✅ |
313
+ | Dialog | dialog_controller.js | ✅ |
314
+ | Drawer | drawer_controller.js | ✅ |
315
+ | Dropdown | dropdown_controller.js | ✅ |
316
+ | HoverCard | hover_card_controller.js | ✅ |
317
+ | Popover | popover_controller.js | ✅ |
318
+ | RadioGroup | radio_group_controller.js | ✅ |
319
+ | ScrollArea | scroll_area_controller.js | ✅ |
320
+ | Select | select_controller.js | ✅ |
321
+ | Sheet | sheet_controller.js | ✅ |
322
+ | Slider | slider_controller.js | ✅ |
323
+ | Switch | switch_controller.js | ✅ |
324
+ | Tabs | tabs_controller.js | ✅ |
325
+ | Toast | toast_controller.js | ✅ |
326
+ | Toggle | toggle_controller.js | ✅ |
327
+ | ToggleGroup | toggle_group_controller.js | ✅ |
328
+ | Tooltip | tooltip_controller.js | ✅ |
329
+
330
+ **User Installation**: Users must call `registerShadcnControllers(application)` to register all controllers.
331
+
332
+ **Controller Verification (COMPLETED)**:
333
+ - [x] All 20 controllers exist and match their components
334
+ - [x] Targets, values, and actions verified for: accordion, checkbox, dialog, toast, tooltip
335
+ - [x] Engine exposes JavaScript assets via asset paths
336
+ - [x] Importmap configuration in gem (`config/importmap.rb`)
337
+ - [x] Install generator sets up both importmap and bundler approaches
338
+ - [ ] TODO: Create integration test that verifies all controllers load in fresh Rails app
339
+
340
+ ### Testing Notes
341
+ - All interactive components use Stimulus controllers
342
+ - Test keyboard navigation for accessibility
343
+ - Test disabled states render correctly
344
+ - Test mobile responsiveness
345
+
346
+ ---
347
+
348
+ ## Lookbook Previews Status ✅
349
+
350
+ **All 35 Components Have Previews:**
351
+ - Accordion, Alert, Alert Dialog, Aspect Ratio, Avatar
352
+ - Badge, Breadcrumb, Button, Card, Checkbox
353
+ - Collapsible, Dialog, Drawer, Dropdown Menu, Hover Card
354
+ - Input, Label, Pagination, Popover, Progress
355
+ - Radio Group, Scroll Area, Select, Separator, Sheet
356
+ - Skeleton, Slider, Switch, Table, Tabs
357
+ - Textarea, Toast, Toggle, Toggle Group, Tooltip
358
+
359
+ ---
360
+
361
+ ## Documentation Site Research
362
+
363
+ **Recommendation**: Two-phase approach
364
+
365
+ **Phase 1 (Immediate)**: Expand Lookbook + dummy app
366
+ - Already installed, minimal effort
367
+ - Great for developer reference
368
+ - Deploy dummy app to accessible URL
369
+
370
+ **Phase 2 (Medium-term)**: Bridgetown static site
371
+ - Ruby-native, ViewComponent plugin available
372
+ - Static output, SEO-friendly
373
+ - Can render actual shadcn-rails components
374
+ - Better for public-facing documentation
375
+
376
+ ---
377
+
378
+ ## Component Testing Checklist
379
+
380
+ When testing documentation pages:
381
+ 1. Page loads without errors
382
+ 2. Demo cards render components correctly
383
+ 3. Interactive components (buttons, toggles, etc.) work
384
+ 4. Code examples display properly
385
+ 5. Navigation links work
386
+ 6. Responsive layout works
387
+
388
+ ---
389
+
390
+ ## File Locations
391
+
392
+ - Documentation pages: `test/dummy/app/views/docs/`
393
+ - Code examples: `test/dummy/app/code_examples/`
394
+ - Components: `app/components/shadcn/`
395
+ - Stimulus controllers: `app/assets/javascripts/shadcn/controllers/`
396
+ - Stylesheets: `app/assets/stylesheets/shadcn/`
397
+ - `base.css` - CSS variables, theme colors, animations
398
+ - `components.css` - Component-specific styles (data-state, sliders, etc.)
399
+ - `index.css` - Combined import for both files
400
+ - `themes/*.css` - Theme presets (slate, stone, zinc, gray)
401
+ - Lookbook previews: `test/components/previews/`
402
+
403
+ ---
404
+
405
+ ## TypeScript Discussion
406
+
407
+ ### Current State
408
+ All Stimulus controllers are written in plain JavaScript. This matches the Rails ecosystem's general approach.
409
+
410
+ ### Should We Port to TypeScript?
411
+
412
+ **Arguments FOR TypeScript:**
413
+ - Better IDE support with autocomplete for targets, values, actions
414
+ - Catch type errors at compile time
415
+ - Self-documenting code with explicit types
416
+ - Modern JS ecosystem trend
417
+ - Easier for TypeScript-heavy teams to contribute
418
+
419
+ **Arguments AGAINST TypeScript:**
420
+ - Rails ecosystem predominantly uses plain JavaScript
421
+ - Adds build complexity for consumers
422
+ - Stimulus controllers are small and well-tested
423
+ - Most Rails projects use importmaps (no build step) or simple bundlers
424
+ - Would require shipping both .ts source and compiled .js
425
+
426
+ **Recommendation: Provide TypeScript Definitions Only**
427
+ - Keep source in JavaScript for maximum compatibility
428
+ - Ship `.d.ts` type definition files alongside JavaScript
429
+ - Users get IDE support without requiring TypeScript compilation
430
+ - Follow the pattern of many npm packages
431
+
432
+ **Type Definition Locations:**
433
+ ```
434
+ app/assets/javascripts/shadcn/
435
+ ├── index.js
436
+ ├── index.d.ts # Main type definitions
437
+ ├── controllers/
438
+ │ ├── dialog_controller.js
439
+ │ ├── dialog_controller.d.ts
440
+ │ ├── tabs_controller.js
441
+ │ ├── tabs_controller.d.ts
442
+ │ └── ...
443
+ ```
444
+
445
+ **Example Type Definition (dialog_controller.d.ts):**
446
+ ```typescript
447
+ import { Controller } from "@hotwired/stimulus"
448
+
449
+ export default class DialogController extends Controller {
450
+ static targets: ["trigger", "overlay", "content", "close"]
451
+ static values: { open: { type: "Boolean", default: false } }
452
+
453
+ triggerTarget: HTMLElement
454
+ overlayTarget: HTMLElement
455
+ contentTarget: HTMLElement
456
+ closeTarget: HTMLElement
457
+ openValue: boolean
458
+
459
+ open(): void
460
+ close(): void
461
+ toggle(): void
462
+ }
463
+ ```
464
+
465
+ ### TODO: Type Definitions ✅
466
+ - [x] Create index.d.ts with registerShadcnControllers type
467
+ - [x] Create .d.ts files for all 20 controllers
468
+ - [x] Document TypeScript setup in README
469
+
470
+ **Created type definition files:**
471
+ - `app/assets/javascripts/shadcn/index.d.ts` - Main entry point types
472
+ - `app/assets/javascripts/shadcn/controllers/*.d.ts` - Individual controller types (20 files)
473
+
474
+ ---
475
+
476
+ ## Future Improvements
477
+
478
+ - [ ] Add more complex components: Command, Combobox, Date Picker
479
+ - [ ] Form builder integration
480
+ - [ ] Hotwire/Turbo integration helpers
481
+ - [ ] Animation system (CSS transitions)
482
+ - [ ] RTL support
483
+ - [x] TypeScript definitions for Stimulus controllers (completed)
484
+ - [ ] Visual regression tests with Percy or similar
485
+ - [ ] Documentation site deployment (Fly.io in progress)