railsui 3.1.4 → 3.2.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 (535) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/settings.local.json +10 -0
  3. data/Gemfile.lock +29 -27
  4. data/README.md +1 -1
  5. data/app/assets/images/tailwind-corgie-thumbnail.jpg +0 -0
  6. data/app/assets/stylesheets/railsui/railsui.css +18 -0
  7. data/app/helpers/railsui/application_helper.rb +22 -17
  8. data/app/helpers/railsui/host_route_fallback_helper.rb +18 -0
  9. data/app/javascript/controllers/alert_controller.js +0 -0
  10. data/app/models/railsui/default.rb +28 -109
  11. data/app/views/railsui/admin/fields/_color.html.erb +6 -1
  12. data/app/views/railsui/admin/fields/_theme.html.erb +16 -8
  13. data/app/views/railsui/default/_launchpad.html.erb +1 -1
  14. data/app/views/railsui/shared/_flash_messages.html.erb +2 -2
  15. data/app/views/railsui/shared/_full_access_cta.html.erb +27 -0
  16. data/app/views/railsui/shared/_global_nav.html.erb +2 -2
  17. data/app/views/railsui/shared/_preview.html.erb +1 -1
  18. data/app/views/railsui/shared/_rui_email_preview.html.erb +60 -3
  19. data/app/views/railsui/systems/forms/form_builder.html.erb +171 -0
  20. data/app/views/railsui/themes/corgie/_components.html.erb +7 -0
  21. data/app/views/railsui/themes/corgie/_content.html.erb +9 -0
  22. data/app/views/railsui/themes/corgie/_fonts.html.erb +0 -0
  23. data/app/views/railsui/themes/corgie/_forms.html.erb +19 -0
  24. data/app/views/railsui/themes/corgie/_icons.html.erb +125 -0
  25. data/app/views/railsui/themes/corgie/_nav.html.erb +166 -0
  26. data/app/views/railsui/themes/corgie/_scaffolds.html.erb +42 -0
  27. data/app/views/railsui/themes/corgie/authentication/_overview.html.erb +5 -0
  28. data/app/views/railsui/themes/corgie/authentication/devise/_change_password.html.erb +74 -0
  29. data/app/views/railsui/themes/corgie/authentication/devise/_confirmation.html.erb +63 -0
  30. data/app/views/railsui/themes/corgie/authentication/devise/_edit.html.erb +103 -0
  31. data/app/views/railsui/themes/corgie/authentication/devise/_overview.html.erb +225 -0
  32. data/app/views/railsui/themes/corgie/authentication/devise/_reset_password.html.erb +60 -0
  33. data/app/views/railsui/themes/corgie/authentication/devise/_signin.html.erb +93 -0
  34. data/app/views/railsui/themes/corgie/authentication/devise/_signup.html.erb +98 -0
  35. data/app/views/railsui/themes/corgie/authentication/devise/_unlocks.html.erb +60 -0
  36. data/app/views/railsui/themes/corgie/authentication/static/_change_password.html.erb +67 -0
  37. data/app/views/railsui/themes/corgie/authentication/static/_confirmation.html.erb +58 -0
  38. data/app/views/railsui/themes/corgie/authentication/static/_overview.html.erb +204 -0
  39. data/app/views/railsui/themes/corgie/authentication/static/_reset_password.html.erb +59 -0
  40. data/app/views/railsui/themes/corgie/authentication/static/_signin.html.erb +102 -0
  41. data/app/views/railsui/themes/corgie/authentication/static/_signup.html.erb +108 -0
  42. data/app/views/railsui/themes/corgie/authentication/static/_unlocks.html.erb +60 -0
  43. data/app/views/railsui/themes/corgie/components/_accordion.html.erb +17 -0
  44. data/app/views/railsui/themes/corgie/components/_alert.html.erb +23 -0
  45. data/app/views/railsui/themes/corgie/components/_avatar.html.erb +13 -0
  46. data/app/views/railsui/themes/corgie/components/_badge.html.erb +20 -0
  47. data/app/views/railsui/themes/corgie/components/_breadcrumb.html.erb +14 -0
  48. data/app/views/railsui/themes/corgie/components/_button.html.erb +16 -0
  49. data/app/views/railsui/themes/corgie/components/_card.html.erb +23 -0
  50. data/app/views/railsui/themes/corgie/components/_combobox.html.erb +11 -0
  51. data/app/views/railsui/themes/corgie/components/_dropdown.html.erb +22 -0
  52. data/app/views/railsui/themes/corgie/components/_flash.html.erb +17 -0
  53. data/app/views/railsui/themes/corgie/components/_modal.html.erb +27 -0
  54. data/app/views/railsui/themes/corgie/components/_navigation.html.erb +7 -0
  55. data/app/views/railsui/themes/corgie/components/_pagination.html.erb +15 -0
  56. data/app/views/railsui/themes/corgie/components/_tab.html.erb +23 -0
  57. data/app/views/railsui/themes/corgie/components/_toast.html.erb +75 -0
  58. data/app/views/railsui/themes/corgie/components/_tooltip.html.erb +77 -0
  59. data/app/views/railsui/themes/corgie/components/accordion/_contained.html.erb +90 -0
  60. data/app/views/railsui/themes/corgie/components/accordion/_flush.html.erb +92 -0
  61. data/app/views/railsui/themes/corgie/components/alert/_dismissable.html.erb +45 -0
  62. data/app/views/railsui/themes/corgie/components/alert/_with_accent_border.html.erb +32 -0
  63. data/app/views/railsui/themes/corgie/components/alert/_with_actions.html.erb +57 -0
  64. data/app/views/railsui/themes/corgie/components/alert/_with_description.html.erb +41 -0
  65. data/app/views/railsui/themes/corgie/components/alert/_with_list.html.erb +46 -0
  66. data/app/views/railsui/themes/corgie/components/avatar/_circle.html.erb +53 -0
  67. data/app/views/railsui/themes/corgie/components/avatar/_rounded.html.erb +53 -0
  68. data/app/views/railsui/themes/corgie/components/badge/_basic.html.erb +70 -0
  69. data/app/views/railsui/themes/corgie/components/badge/_outline.html.erb +67 -0
  70. data/app/views/railsui/themes/corgie/components/badge/_pill.html.erb +67 -0
  71. data/app/views/railsui/themes/corgie/components/badge/_tag.html.erb +277 -0
  72. data/app/views/railsui/themes/corgie/components/breadcrumb/_article.html.erb +88 -0
  73. data/app/views/railsui/themes/corgie/components/breadcrumb/_base.html.erb +77 -0
  74. data/app/views/railsui/themes/corgie/components/button/_base.html.erb +38 -0
  75. data/app/views/railsui/themes/corgie/components/button/_expanded.html.erb +24 -0
  76. data/app/views/railsui/themes/corgie/components/button/_sizes.html.erb +31 -0
  77. data/app/views/railsui/themes/corgie/components/card/_article.html.erb +119 -0
  78. data/app/views/railsui/themes/corgie/components/card/_base.html.erb +34 -0
  79. data/app/views/railsui/themes/corgie/components/card/_feature.html.erb +54 -0
  80. data/app/views/railsui/themes/corgie/components/card/_team_member.html.erb +60 -0
  81. data/app/views/railsui/themes/corgie/components/card/_value.html.erb +54 -0
  82. data/app/views/railsui/themes/corgie/components/combobox/_base.html.erb +250 -0
  83. data/app/views/railsui/themes/corgie/components/dropdown/_base.html.erb +61 -0
  84. data/app/views/railsui/themes/corgie/components/dropdown/_dropdown.html.erb +24 -0
  85. data/app/views/railsui/themes/corgie/components/dropdown/_dropdown_w_icon.html.erb +27 -0
  86. data/app/views/railsui/themes/corgie/components/dropdown/_right_aligned.html.erb +82 -0
  87. data/app/views/railsui/themes/corgie/components/dropdown/_with_dividers.html.erb +93 -0
  88. data/app/views/railsui/themes/corgie/components/dropdown/_with_icons.html.erb +85 -0
  89. data/app/views/railsui/themes/corgie/components/dropdown/tutorial/_1.html.erb +44 -0
  90. data/app/views/railsui/themes/corgie/components/dropdown/tutorial/_2.html.erb +16 -0
  91. data/app/views/railsui/themes/corgie/components/dropdown/tutorial/_3.html.erb +16 -0
  92. data/app/views/railsui/themes/corgie/components/dropdown/tutorial/_4.html.erb +27 -0
  93. data/app/views/railsui/themes/corgie/components/dropdown/tutorial/_dependencies.html.erb +3 -0
  94. data/app/views/railsui/themes/corgie/components/dropdown/tutorial/_tutorial.html.erb +25 -0
  95. data/app/views/railsui/themes/corgie/components/flash/_alert.html.erb +29 -0
  96. data/app/views/railsui/themes/corgie/components/flash/_dynamic.html.erb +46 -0
  97. data/app/views/railsui/themes/corgie/components/flash/_notice.html.erb +29 -0
  98. data/app/views/railsui/themes/corgie/components/modal/_base.html.erb +110 -0
  99. data/app/views/railsui/themes/corgie/components/modal/_centered_dual_action.html.erb +124 -0
  100. data/app/views/railsui/themes/corgie/components/modal/_dismiss_icon.html.erb +124 -0
  101. data/app/views/railsui/themes/corgie/components/modal/_settings.html.erb +201 -0
  102. data/app/views/railsui/themes/corgie/components/modal/_single_action.html.erb +119 -0
  103. data/app/views/railsui/themes/corgie/components/modal/_with_form.html.erb +148 -0
  104. data/app/views/railsui/themes/corgie/components/navigation/_base.html.erb +215 -0
  105. data/app/views/railsui/themes/corgie/components/navigation/_chat.html.erb +194 -0
  106. data/app/views/railsui/themes/corgie/components/navigation/_nav_preview.html.erb +9 -0
  107. data/app/views/railsui/themes/corgie/components/pagination/_contained.html.erb +131 -0
  108. data/app/views/railsui/themes/corgie/components/pagination/_pagy.html.erb +97 -0
  109. data/app/views/railsui/themes/corgie/components/pagination/_simple.html.erb +114 -0
  110. data/app/views/railsui/themes/corgie/components/tab/_base.html.erb +101 -0
  111. data/app/views/railsui/themes/corgie/components/tab/_pills.html.erb +102 -0
  112. data/app/views/railsui/themes/corgie/components/tab/_rounded.html.erb +104 -0
  113. data/app/views/railsui/themes/corgie/components/tab/_vertical.html.erb +145 -0
  114. data/app/views/railsui/themes/corgie/components/tab/_with_icons.html.erb +138 -0
  115. data/app/views/railsui/themes/corgie/components/toast/_base.html.erb +98 -0
  116. data/app/views/railsui/themes/corgie/components/tooltip/_base.html.erb +51 -0
  117. data/app/views/railsui/themes/corgie/content/_image.html.erb +31 -0
  118. data/app/views/railsui/themes/corgie/content/_table.html.erb +21 -0
  119. data/app/views/railsui/themes/corgie/content/_typography.html.erb +47 -0
  120. data/app/views/railsui/themes/corgie/content/image/_object_contain.html.erb +31 -0
  121. data/app/views/railsui/themes/corgie/content/image/_object_cover.html.erb +32 -0
  122. data/app/views/railsui/themes/corgie/content/image/_object_fill.html.erb +32 -0
  123. data/app/views/railsui/themes/corgie/content/image/_object_scale_down.html.erb +34 -0
  124. data/app/views/railsui/themes/corgie/content/image/_responsive.html.erb +24 -0
  125. data/app/views/railsui/themes/corgie/content/table/_bordered.html.erb +93 -0
  126. data/app/views/railsui/themes/corgie/content/table/_borderless.html.erb +92 -0
  127. data/app/views/railsui/themes/corgie/content/table/_comparison.html.erb +494 -0
  128. data/app/views/railsui/themes/corgie/content/typography/_blockquote.html.erb +41 -0
  129. data/app/views/railsui/themes/corgie/content/typography/_display_headings.html.erb +70 -0
  130. data/app/views/railsui/themes/corgie/content/typography/_fonts.html.erb +30 -0
  131. data/app/views/railsui/themes/corgie/content/typography/_headings.html.erb +88 -0
  132. data/app/views/railsui/themes/corgie/content/typography/_inline_formatting.html.erb +44 -0
  133. data/app/views/railsui/themes/corgie/content/typography/_lead_paragraph.html.erb +26 -0
  134. data/app/views/railsui/themes/corgie/content/typography/_lists.html.erb +82 -0
  135. data/app/views/railsui/themes/corgie/content/typography/_paragraphs.html.erb +33 -0
  136. data/app/views/railsui/themes/corgie/forms/_action_text.html.erb +54 -0
  137. data/app/views/railsui/themes/corgie/forms/_checkbox.html.erb +60 -0
  138. data/app/views/railsui/themes/corgie/forms/_form_builder.html.erb +487 -0
  139. data/app/views/railsui/themes/corgie/forms/_input.html.erb +378 -0
  140. data/app/views/railsui/themes/corgie/forms/_input_group.html.erb +485 -0
  141. data/app/views/railsui/themes/corgie/forms/_radio.html.erb +92 -0
  142. data/app/views/railsui/themes/corgie/forms/_select.html.erb +118 -0
  143. data/app/views/railsui/themes/corgie/forms/_switch.html.erb +60 -0
  144. data/app/views/railsui/themes/corgie/forms/_validation.html.erb +52 -0
  145. data/app/views/railsui/themes/corgie/mailers/_devise.html.erb +44 -0
  146. data/app/views/railsui/themes/corgie/mailers/_layout.html.erb +536 -0
  147. data/app/views/railsui/themes/corgie/mailers/_mailer_preview.html.erb +523 -0
  148. data/app/views/railsui/themes/corgie/mailers/_minimal.html.erb +63 -0
  149. data/app/views/railsui/themes/corgie/mailers/_promotion.html.erb +62 -0
  150. data/app/views/railsui/themes/corgie/mailers/_transactional.html.erb +133 -0
  151. data/app/views/railsui/themes/corgie/mailers/devise/_confirmation_instructions.html.erb +34 -0
  152. data/app/views/railsui/themes/corgie/mailers/devise/_email_changed.html.erb +32 -0
  153. data/app/views/railsui/themes/corgie/mailers/devise/_password_changed.html.erb +25 -0
  154. data/app/views/railsui/themes/corgie/mailers/devise/_reset_password_instructions.html.erb +33 -0
  155. data/app/views/railsui/themes/corgie/mailers/devise/_unlock_instructions.html.erb +32 -0
  156. data/app/views/railsui/themes/corgie/scaffolds/_edit.html.erb +88 -0
  157. data/app/views/railsui/themes/corgie/scaffolds/_index.html.erb +88 -0
  158. data/app/views/railsui/themes/corgie/scaffolds/_new.html.erb +80 -0
  159. data/app/views/railsui/themes/corgie/scaffolds/_partial.html.erb +56 -0
  160. data/app/views/railsui/themes/corgie/scaffolds/_show.html.erb +85 -0
  161. data/app/views/railsui/themes/hound/_forms.html.erb +2 -0
  162. data/app/views/railsui/themes/hound/_nav.html.erb +2 -0
  163. data/app/views/railsui/themes/hound/authentication/devise/_change_password.html.erb +1 -27
  164. data/app/views/railsui/themes/hound/authentication/devise/_confirmation.html.erb +1 -20
  165. data/app/views/railsui/themes/hound/authentication/devise/_edit.html.erb +1 -44
  166. data/app/views/railsui/themes/hound/authentication/devise/_overview.html.erb +3 -51
  167. data/app/views/railsui/themes/hound/authentication/devise/_reset_password.html.erb +1 -17
  168. data/app/views/railsui/themes/hound/authentication/devise/_signin.html.erb +1 -30
  169. data/app/views/railsui/themes/hound/authentication/devise/_signup.html.erb +1 -31
  170. data/app/views/railsui/themes/hound/authentication/devise/_unlocks.html.erb +1 -17
  171. data/app/views/railsui/themes/hound/authentication/static/_change_password.html.erb +1 -32
  172. data/app/views/railsui/themes/hound/authentication/static/_confirmation.html.erb +1 -23
  173. data/app/views/railsui/themes/hound/authentication/static/_edit.html.erb +1 -39
  174. data/app/views/railsui/themes/hound/authentication/static/_overview.html.erb +2 -40
  175. data/app/views/railsui/themes/hound/authentication/static/_reset_password.html.erb +1 -22
  176. data/app/views/railsui/themes/hound/authentication/static/_signin.html.erb +1 -35
  177. data/app/views/railsui/themes/hound/authentication/static/_signup.html.erb +1 -31
  178. data/app/views/railsui/themes/hound/authentication/static/_unlocks.html.erb +1 -20
  179. data/app/views/railsui/themes/hound/components/_toast.html.erb +0 -3
  180. data/app/views/railsui/themes/hound/components/accordion/_contained.html.erb +0 -27
  181. data/app/views/railsui/themes/hound/components/accordion/_flush.html.erb +0 -27
  182. data/app/views/railsui/themes/hound/components/alert/_dismissable.html.erb +0 -8
  183. data/app/views/railsui/themes/hound/components/alert/_with_accent_border.html.erb +0 -7
  184. data/app/views/railsui/themes/hound/components/alert/_with_actions.html.erb +0 -11
  185. data/app/views/railsui/themes/hound/components/alert/_with_description.html.erb +0 -7
  186. data/app/views/railsui/themes/hound/components/alert/_with_list.html.erb +0 -8
  187. data/app/views/railsui/themes/hound/components/avatar/_circle.html.erb +0 -12
  188. data/app/views/railsui/themes/hound/components/avatar/_rounded.html.erb +0 -12
  189. data/app/views/railsui/themes/hound/components/badge/_basic.html.erb +0 -22
  190. data/app/views/railsui/themes/hound/components/badge/_outline.html.erb +0 -22
  191. data/app/views/railsui/themes/hound/components/badge/_pill.html.erb +0 -22
  192. data/app/views/railsui/themes/hound/components/badge/_tag.html.erb +0 -52
  193. data/app/views/railsui/themes/hound/components/breadcrumb/_base.html.erb +0 -14
  194. data/app/views/railsui/themes/hound/components/breadcrumb/_contained.html.erb +0 -14
  195. data/app/views/railsui/themes/hound/components/button/_base.html.erb +0 -10
  196. data/app/views/railsui/themes/hound/components/button/_expanded.html.erb +0 -3
  197. data/app/views/railsui/themes/hound/components/button/_sizes.html.erb +0 -5
  198. data/app/views/railsui/themes/hound/components/card/_base.html.erb +0 -6
  199. data/app/views/railsui/themes/hound/components/card/_user_card.html.erb +0 -13
  200. data/app/views/railsui/themes/hound/components/card/_user_card_dropdown.html.erb +0 -20
  201. data/app/views/railsui/themes/hound/components/card/_user_card_with_actions.html.erb +0 -18
  202. data/app/views/railsui/themes/hound/components/card/_with_action.html.erb +0 -13
  203. data/app/views/railsui/themes/hound/components/card/_with_header.html.erb +0 -43
  204. data/app/views/railsui/themes/hound/components/combobox/_base.html.erb +0 -40
  205. data/app/views/railsui/themes/hound/components/dropdown/_base.html.erb +0 -10
  206. data/app/views/railsui/themes/hound/components/dropdown/_right_aligned.html.erb +0 -14
  207. data/app/views/railsui/themes/hound/components/dropdown/_with_dividers.html.erb +0 -14
  208. data/app/views/railsui/themes/hound/components/dropdown/_with_icons.html.erb +0 -20
  209. data/app/views/railsui/themes/hound/components/flash/_alert.html.erb +0 -5
  210. data/app/views/railsui/themes/hound/components/flash/_dynamic.html.erb +0 -5
  211. data/app/views/railsui/themes/hound/components/flash/_notice.html.erb +0 -5
  212. data/app/views/railsui/themes/hound/components/modal/_base.html.erb +0 -13
  213. data/app/views/railsui/themes/hound/components/modal/_centered_dual_action.html.erb +0 -16
  214. data/app/views/railsui/themes/hound/components/modal/_dismiss_icon.html.erb +0 -20
  215. data/app/views/railsui/themes/hound/components/modal/_single_action.html.erb +0 -15
  216. data/app/views/railsui/themes/hound/components/modal/_with_form.html.erb +0 -23
  217. data/app/views/railsui/themes/hound/components/navigation/_base.html.erb +1 -41
  218. data/app/views/railsui/themes/hound/components/navigation/_with_action.html.erb +1 -38
  219. data/app/views/railsui/themes/hound/components/navigation/_with_dropdowns.html.erb +1 -105
  220. data/app/views/railsui/themes/hound/components/navigation/_with_search.html.erb +1 -41
  221. data/app/views/railsui/themes/hound/components/pagination/_contained.html.erb +0 -31
  222. data/app/views/railsui/themes/hound/components/pagination/_minimal.html.erb +0 -27
  223. data/app/views/railsui/themes/hound/components/pagination/_pagy.html.erb +47 -72
  224. data/app/views/railsui/themes/hound/components/tab/_base.html.erb +1 -18
  225. data/app/views/railsui/themes/hound/components/tab/_pills.html.erb +1 -18
  226. data/app/views/railsui/themes/hound/components/tab/_rounded.html.erb +1 -18
  227. data/app/views/railsui/themes/hound/components/tab/_with_icons.html.erb +1 -26
  228. data/app/views/railsui/themes/hound/components/toast/_base.html.erb +0 -16
  229. data/app/views/railsui/themes/hound/components/tooltip/_base.html.erb +0 -3
  230. data/app/views/railsui/themes/hound/content/image/_object_contain.html.erb +0 -5
  231. data/app/views/railsui/themes/hound/content/image/_object_cover.html.erb +0 -5
  232. data/app/views/railsui/themes/hound/content/image/_object_fill.html.erb +0 -5
  233. data/app/views/railsui/themes/hound/content/image/_object_scale_down.html.erb +0 -5
  234. data/app/views/railsui/themes/hound/content/image/_responsive.html.erb +0 -4
  235. data/app/views/railsui/themes/hound/content/table/_bordered.html.erb +0 -21
  236. data/app/views/railsui/themes/hound/content/table/_borderless.html.erb +0 -21
  237. data/app/views/railsui/themes/hound/content/typography/_blockquote.html.erb +0 -9
  238. data/app/views/railsui/themes/hound/content/typography/_display_headings.html.erb +0 -9
  239. data/app/views/railsui/themes/hound/content/typography/_headings.html.erb +0 -12
  240. data/app/views/railsui/themes/hound/content/typography/_inline_formatting.html.erb +0 -20
  241. data/app/views/railsui/themes/hound/content/typography/_lead_paragraph.html.erb +0 -5
  242. data/app/views/railsui/themes/hound/content/typography/_lists.html.erb +0 -17
  243. data/app/views/railsui/themes/hound/content/typography/_paragraphs.html.erb +0 -4
  244. data/app/views/railsui/themes/hound/forms/_action_text.html.erb +0 -6
  245. data/app/views/railsui/themes/hound/forms/_checkbox.html.erb +0 -9
  246. data/app/views/railsui/themes/hound/forms/_form_builder.html.erb +487 -0
  247. data/app/views/railsui/themes/hound/forms/_input.html.erb +0 -93
  248. data/app/views/railsui/themes/hound/forms/_input_group.html.erb +0 -83
  249. data/app/views/railsui/themes/hound/forms/_radio.html.erb +0 -13
  250. data/app/views/railsui/themes/hound/forms/_select.html.erb +0 -16
  251. data/app/views/railsui/themes/hound/forms/_switch.html.erb +0 -9
  252. data/app/views/railsui/themes/hound/forms/_validation.html.erb +0 -15
  253. data/app/views/railsui/themes/hound/mailers/_layout.html.erb +1 -432
  254. data/app/views/railsui/themes/hound/mailers/_minimal.html.erb +1 -16
  255. data/app/views/railsui/themes/hound/mailers/_promotion.html.erb +1 -20
  256. data/app/views/railsui/themes/hound/mailers/_transactional.html.erb +1 -43
  257. data/app/views/railsui/themes/hound/mailers/devise/_confirmation_instructions.html.erb +1 -9
  258. data/app/views/railsui/themes/hound/mailers/devise/_email_changed.html.erb +1 -13
  259. data/app/views/railsui/themes/hound/mailers/devise/_password_changed.html.erb +1 -7
  260. data/app/views/railsui/themes/hound/mailers/devise/_reset_password_instructions.html.erb +1 -9
  261. data/app/views/railsui/themes/hound/mailers/devise/_unlock_instructions.html.erb +1 -9
  262. data/app/views/railsui/themes/hound/scaffolds/_edit.html.erb +1 -19
  263. data/app/views/railsui/themes/hound/scaffolds/_index.html.erb +1 -14
  264. data/app/views/railsui/themes/hound/scaffolds/_new.html.erb +1 -17
  265. data/app/views/railsui/themes/hound/scaffolds/_partial.html.erb +1 -17
  266. data/app/views/railsui/themes/hound/scaffolds/_show.html.erb +1 -20
  267. data/app/views/railsui/themes/shepherd/_forms.html.erb +5 -3
  268. data/app/views/railsui/themes/shepherd/_nav.html.erb +2 -0
  269. data/app/views/railsui/themes/shepherd/authentication/devise/_change_password.html.erb +1 -23
  270. data/app/views/railsui/themes/shepherd/authentication/devise/_confirmation.html.erb +1 -12
  271. data/app/views/railsui/themes/shepherd/authentication/devise/_edit.html.erb +1 -74
  272. data/app/views/railsui/themes/shepherd/authentication/devise/_overview.html.erb +2 -57
  273. data/app/views/railsui/themes/shepherd/authentication/devise/_reset_password.html.erb +1 -12
  274. data/app/views/railsui/themes/shepherd/authentication/devise/_signin.html.erb +1 -25
  275. data/app/views/railsui/themes/shepherd/authentication/devise/_signup.html.erb +1 -26
  276. data/app/views/railsui/themes/shepherd/authentication/devise/_unlocks.html.erb +1 -12
  277. data/app/views/railsui/themes/shepherd/authentication/static/_change_password.html.erb +1 -23
  278. data/app/views/railsui/themes/shepherd/authentication/static/_confirmation.html.erb +1 -12
  279. data/app/views/railsui/themes/shepherd/authentication/static/_edit.html.erb +1 -67
  280. data/app/views/railsui/themes/shepherd/authentication/static/_overview.html.erb +1 -56
  281. data/app/views/railsui/themes/shepherd/authentication/static/_reset_password.html.erb +1 -12
  282. data/app/views/railsui/themes/shepherd/authentication/static/_signin.html.erb +1 -24
  283. data/app/views/railsui/themes/shepherd/authentication/static/_signup.html.erb +1 -26
  284. data/app/views/railsui/themes/shepherd/authentication/static/_unlocks.html.erb +1 -16
  285. data/app/views/railsui/themes/shepherd/components/_toast.html.erb +0 -3
  286. data/app/views/railsui/themes/shepherd/components/accordion/_contained.html.erb +0 -28
  287. data/app/views/railsui/themes/shepherd/components/accordion/_flush.html.erb +0 -27
  288. data/app/views/railsui/themes/shepherd/components/alert/_dismissable.html.erb +0 -8
  289. data/app/views/railsui/themes/shepherd/components/alert/_with_accent_border.html.erb +0 -6
  290. data/app/views/railsui/themes/shepherd/components/alert/_with_actions.html.erb +0 -11
  291. data/app/views/railsui/themes/shepherd/components/alert/_with_description.html.erb +0 -7
  292. data/app/views/railsui/themes/shepherd/components/alert/_with_list.html.erb +0 -8
  293. data/app/views/railsui/themes/shepherd/components/avatar/_circle.html.erb +0 -12
  294. data/app/views/railsui/themes/shepherd/components/avatar/_rounded.html.erb +0 -12
  295. data/app/views/railsui/themes/shepherd/components/badge/_basic.html.erb +0 -22
  296. data/app/views/railsui/themes/shepherd/components/badge/_outline.html.erb +0 -22
  297. data/app/views/railsui/themes/shepherd/components/badge/_pill.html.erb +0 -22
  298. data/app/views/railsui/themes/shepherd/components/badge/_tag.html.erb +0 -52
  299. data/app/views/railsui/themes/shepherd/components/breadcrumb/_base.html.erb +0 -14
  300. data/app/views/railsui/themes/shepherd/components/breadcrumb/_contained.html.erb +0 -14
  301. data/app/views/railsui/themes/shepherd/components/button/_base.html.erb +0 -17
  302. data/app/views/railsui/themes/shepherd/components/button/_expanded.html.erb +0 -3
  303. data/app/views/railsui/themes/shepherd/components/button/_sizes.html.erb +0 -5
  304. data/app/views/railsui/themes/shepherd/components/card/_base.html.erb +0 -6
  305. data/app/views/railsui/themes/shepherd/components/card/_property_card.html.erb +0 -28
  306. data/app/views/railsui/themes/shepherd/components/card/_property_user_card.html.erb +0 -14
  307. data/app/views/railsui/themes/shepherd/components/card/_user_card_with_actions.html.erb +0 -12
  308. data/app/views/railsui/themes/shepherd/components/card/_with_action.html.erb +0 -7
  309. data/app/views/railsui/themes/shepherd/components/card/_with_header.html.erb +0 -7
  310. data/app/views/railsui/themes/shepherd/components/combobox/_base.html.erb +0 -40
  311. data/app/views/railsui/themes/shepherd/components/datalist/_booking_list.html.erb +0 -45
  312. data/app/views/railsui/themes/shepherd/components/datalist/_property_list.html.erb +0 -47
  313. data/app/views/railsui/themes/shepherd/components/dropdown/_base.html.erb +0 -10
  314. data/app/views/railsui/themes/shepherd/components/dropdown/_right_aligned.html.erb +0 -13
  315. data/app/views/railsui/themes/shepherd/components/dropdown/_with_dividers.html.erb +0 -14
  316. data/app/views/railsui/themes/shepherd/components/dropdown/_with_menu_icons.html.erb +0 -16
  317. data/app/views/railsui/themes/shepherd/components/flash/_alert.html.erb +0 -5
  318. data/app/views/railsui/themes/shepherd/components/flash/_dynamic.html.erb +0 -5
  319. data/app/views/railsui/themes/shepherd/components/flash/_notice.html.erb +0 -5
  320. data/app/views/railsui/themes/shepherd/components/modal/_base.html.erb +0 -12
  321. data/app/views/railsui/themes/shepherd/components/modal/_centered_dual_action.html.erb +0 -16
  322. data/app/views/railsui/themes/shepherd/components/modal/_dismiss_icon.html.erb +0 -23
  323. data/app/views/railsui/themes/shepherd/components/modal/_single_action.html.erb +0 -14
  324. data/app/views/railsui/themes/shepherd/components/modal/_with_form.html.erb +0 -23
  325. data/app/views/railsui/themes/shepherd/components/navigation/_base.html.erb +0 -81
  326. data/app/views/railsui/themes/shepherd/components/navigation/_logged_out.html.erb +0 -22
  327. data/app/views/railsui/themes/shepherd/components/navigation/_with_dropdowns.html.erb +0 -88
  328. data/app/views/railsui/themes/shepherd/components/navigation/_with_search.html.erb +1 -83
  329. data/app/views/railsui/themes/shepherd/components/pagination/_contained.html.erb +0 -31
  330. data/app/views/railsui/themes/shepherd/components/pagination/_dark.html.erb +0 -31
  331. data/app/views/railsui/themes/shepherd/components/pagination/_pagy.html.erb +53 -98
  332. data/app/views/railsui/themes/shepherd/components/pagination/_simple.html.erb +0 -27
  333. data/app/views/railsui/themes/shepherd/components/tab/_base.html.erb +1 -18
  334. data/app/views/railsui/themes/shepherd/components/tab/_pills.html.erb +1 -18
  335. data/app/views/railsui/themes/shepherd/components/tab/_rounded.html.erb +1 -18
  336. data/app/views/railsui/themes/shepherd/components/tab/_with_icons.html.erb +1 -26
  337. data/app/views/railsui/themes/shepherd/components/toast/_base.html.erb +0 -16
  338. data/app/views/railsui/themes/shepherd/components/tooltip/_base.html.erb +0 -3
  339. data/app/views/railsui/themes/shepherd/content/_image_old.html.erb +0 -20
  340. data/app/views/railsui/themes/shepherd/content/image/_object_contain.html.erb +0 -5
  341. data/app/views/railsui/themes/shepherd/content/image/_object_cover.html.erb +0 -5
  342. data/app/views/railsui/themes/shepherd/content/image/_object_fill.html.erb +0 -5
  343. data/app/views/railsui/themes/shepherd/content/image/_object_scale_down.html.erb +0 -5
  344. data/app/views/railsui/themes/shepherd/content/image/_responsive.html.erb +0 -4
  345. data/app/views/railsui/themes/shepherd/content/table/_bordered.html.erb +0 -21
  346. data/app/views/railsui/themes/shepherd/content/table/_borderless.html.erb +0 -21
  347. data/app/views/railsui/themes/shepherd/content/typography/_blockquote.html.erb +0 -9
  348. data/app/views/railsui/themes/shepherd/content/typography/_display_headings.html.erb +0 -9
  349. data/app/views/railsui/themes/shepherd/content/typography/_headings.html.erb +0 -15
  350. data/app/views/railsui/themes/shepherd/content/typography/_inline_formatting.html.erb +0 -21
  351. data/app/views/railsui/themes/shepherd/content/typography/_lead_paragraph.html.erb +0 -5
  352. data/app/views/railsui/themes/shepherd/content/typography/_lists.html.erb +0 -17
  353. data/app/views/railsui/themes/shepherd/content/typography/_paragraphs.html.erb +0 -4
  354. data/app/views/railsui/themes/shepherd/forms/_action_text.html.erb +0 -6
  355. data/app/views/railsui/themes/shepherd/forms/_checkbox.html.erb +0 -9
  356. data/app/views/railsui/themes/shepherd/forms/_form_builder.html.erb +487 -0
  357. data/app/views/railsui/themes/shepherd/forms/_input.html.erb +0 -119
  358. data/app/views/railsui/themes/shepherd/forms/_input_group.html.erb +0 -81
  359. data/app/views/railsui/themes/shepherd/forms/_radio.html.erb +0 -13
  360. data/app/views/railsui/themes/shepherd/forms/_select.html.erb +0 -16
  361. data/app/views/railsui/themes/shepherd/forms/_switch.html.erb +0 -9
  362. data/app/views/railsui/themes/shepherd/forms/_validation.html.erb +0 -11
  363. data/app/views/railsui/themes/shepherd/mailers/_layout.html.erb +1 -493
  364. data/app/views/railsui/themes/shepherd/mailers/_minimal.html.erb +1 -16
  365. data/app/views/railsui/themes/shepherd/mailers/_promotion.html.erb +1 -20
  366. data/app/views/railsui/themes/shepherd/mailers/_transactional.html.erb +1 -43
  367. data/app/views/railsui/themes/shepherd/mailers/devise/_confirmation_instructions.html.erb +1 -9
  368. data/app/views/railsui/themes/shepherd/mailers/devise/_email_changed.html.erb +1 -12
  369. data/app/views/railsui/themes/shepherd/mailers/devise/_password_changed.html.erb +1 -7
  370. data/app/views/railsui/themes/shepherd/mailers/devise/_reset_password_instructions.html.erb +1 -9
  371. data/app/views/railsui/themes/shepherd/mailers/devise/_unlock_instructions.html.erb +1 -9
  372. data/app/views/railsui/themes/shepherd/scaffolds/_edit.html.erb +1 -19
  373. data/app/views/railsui/themes/shepherd/scaffolds/_index.html.erb +1 -11
  374. data/app/views/railsui/themes/shepherd/scaffolds/_new.html.erb +1 -17
  375. data/app/views/railsui/themes/shepherd/scaffolds/_partial.html.erb +1 -17
  376. data/app/views/railsui/themes/shepherd/scaffolds/_show.html.erb +1 -18
  377. data/config/pages.yml +103 -0
  378. data/config/routes.rb +6 -5
  379. data/config/theme.yml +2 -0
  380. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/auth-bg.jpg +0 -0
  381. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog-feature.jpg +0 -0
  382. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog1.jpg +0 -0
  383. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog2.jpg +0 -0
  384. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog3.jpg +0 -0
  385. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog4.jpg +0 -0
  386. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog5.jpg +0 -0
  387. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog6.jpg +0 -0
  388. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog7.jpg +0 -0
  389. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog8.jpg +0 -0
  390. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog9.jpg +0 -0
  391. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/copy.svg +6 -0
  392. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/pencil.svg +1 -0
  393. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/scroll-text.svg +9 -0
  394. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/facebook.svg +1 -0
  395. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/github.svg +1 -0
  396. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/google.svg +1 -0
  397. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/instagram.svg +1 -0
  398. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/linkedin.svg +1 -0
  399. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/twitter.svg +1 -0
  400. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/x.svg +1 -0
  401. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/youtube.svg +1 -0
  402. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/stethoscope.svg +8 -0
  403. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/test-tubes.svg +11 -0
  404. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/logo.svg +10 -0
  405. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/android-chrome-192x192.png +0 -0
  406. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/android-chrome-512x512.png +0 -0
  407. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/apple-touch-icon.png +0 -0
  408. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/favicon-16x16.png +0 -0
  409. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/favicon-32x32.png +0 -0
  410. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/favicon.ico +0 -0
  411. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/favicon.svg +20 -0
  412. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/opengraph-mark.jpg +0 -0
  413. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/opengraph.jpg +0 -0
  414. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/site.webmanifest +19 -0
  415. data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/railsui.svg +3 -0
  416. data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/character_count_controller.js +134 -0
  417. data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/chat_controller.js +45 -0
  418. data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/help_search_controller.js +333 -0
  419. data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/highlight_controller.js +13 -0
  420. data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/markdown_controller.js +106 -0
  421. data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/search_controller.js +311 -0
  422. data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/sidebar_controller.js +105 -0
  423. data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/snippet_controller.js +223 -0
  424. data/lib/generators/railsui/install/templates/themes/corgie/mail/railsui_mailer/minimal.html.erb +21 -0
  425. data/lib/generators/railsui/install/templates/themes/corgie/mail/railsui_mailer/minimal.text.erb +9 -0
  426. data/lib/generators/railsui/install/templates/themes/corgie/mail/railsui_mailer/promotion.html.erb +23 -0
  427. data/lib/generators/railsui/install/templates/themes/corgie/mail/railsui_mailer/promotion.text.erb +9 -0
  428. data/lib/generators/railsui/install/templates/themes/corgie/mail/railsui_mailer/transactional.html.erb +55 -0
  429. data/lib/generators/railsui/install/templates/themes/corgie/mail/railsui_mailer/transactional.text.erb +22 -0
  430. data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/actiontext.css +173 -0
  431. data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/blog.css +29 -0
  432. data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/buttons.css +49 -0
  433. data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/card.css +9 -0
  434. data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/chat.css +27 -0
  435. data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/code.css +233 -0
  436. data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/dropdown.css +9 -0
  437. data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/forms.css +321 -0
  438. data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/sidebar.css +15 -0
  439. data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/tailwind.config.js +24 -0
  440. data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/theme.css +77 -0
  441. data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/typography.css +47 -0
  442. data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui.html.erb +31 -0
  443. data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui_admin.html.erb +30 -0
  444. data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui_auth.html.erb +50 -0
  445. data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui_mailer.html.erb +503 -0
  446. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/about.html.erb +278 -0
  447. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/blog.html.erb +258 -0
  448. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/blog_category.html.erb +261 -0
  449. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/blog_show.html.erb +429 -0
  450. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/chat_new.html.erb +68 -0
  451. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/chat_show.html.erb +152 -0
  452. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/features.html.erb +356 -0
  453. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/help.html.erb +123 -0
  454. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/home.html.erb +252 -0
  455. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/pricing.html.erb +397 -0
  456. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/privacy.html.erb +140 -0
  457. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/signin.html.erb +38 -0
  458. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/signup.html.erb +48 -0
  459. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/terms.html.erb +182 -0
  460. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_account_dropdown.html.erb +46 -0
  461. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_email_action.html.erb +15 -0
  462. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_email_callout.html.erb +7 -0
  463. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_email_spacer.html.erb +7 -0
  464. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_error_messages.html.erb +10 -0
  465. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_faq.html.erb +9 -0
  466. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_flash.html.erb +11 -0
  467. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_fonts.html.erb +7 -0
  468. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_footer.html.erb +72 -0
  469. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_header.html.erb +15 -0
  470. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_meta.html.erb +90 -0
  471. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_nav.html.erb +3 -0
  472. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_railsui_head.html.erb +4 -0
  473. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_search.html.erb +32 -0
  474. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_sidebar.html.erb +7 -0
  475. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_waves.html.erb +47 -0
  476. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/blog/_article.html.erb +39 -0
  477. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/blog/_pagination.html.erb +21 -0
  478. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_disclaimer.html.erb +4 -0
  479. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_form.html.erb +62 -0
  480. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_header.html.erb +47 -0
  481. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_history.html.erb +36 -0
  482. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_key_legend.html.erb +11 -0
  483. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_link.html.erb +17 -0
  484. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_message.html.erb +69 -0
  485. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_model_select.html.erb +55 -0
  486. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/common/_cta_section.html.erb +16 -0
  487. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/common/_feature_card.html.erb +23 -0
  488. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/common/_feature_check_item.html.erb +6 -0
  489. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/common/_social_auth_buttons.html.erb +22 -0
  490. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/help/_categories.html.erb +82 -0
  491. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/help/_faq.html.erb +45 -0
  492. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/help/_quick_actions.html.erb +46 -0
  493. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/marketing/_career.html.erb +9 -0
  494. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/marketing/_nav.html.erb +57 -0
  495. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/marketing/_team_member_card.html.erb +16 -0
  496. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/_modal.html.erb +84 -0
  497. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/_nav_item.html.erb +14 -0
  498. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_billing.html.erb +120 -0
  499. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_data_controls.html.erb +69 -0
  500. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_general.html.erb +92 -0
  501. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_notifications.html.erb +102 -0
  502. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_personalization.html.erb +100 -0
  503. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_security.html.erb +98 -0
  504. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_title.html.erb +5 -0
  505. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/sidebar/_actions.html.erb +39 -0
  506. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/sidebar/_header.html.erb +40 -0
  507. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/sidebar/_history.html.erb +36 -0
  508. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/sidebar/_link.html.erb +23 -0
  509. data/lib/generators/railsui/install/templates/themes/hound/stylesheets/railsui/forms.css +18 -4
  510. data/lib/generators/railsui/install/templates/themes/hound/stylesheets/railsui/theme.css +3 -2
  511. data/lib/generators/railsui/install/templates/themes/shepherd/stylesheets/railsui/forms.css +12 -2
  512. data/lib/generators/railsui/scaffold/templates/themes/corgie/views/_form.html.erb.tt +52 -0
  513. data/lib/generators/railsui/scaffold/templates/themes/corgie/views/edit.html.erb.tt +25 -0
  514. data/lib/generators/railsui/scaffold/templates/themes/corgie/views/index.html.erb.tt +12 -0
  515. data/lib/generators/railsui/scaffold/templates/themes/corgie/views/new.html.erb.tt +22 -0
  516. data/lib/generators/railsui/scaffold/templates/themes/corgie/views/partial.html.erb.tt +22 -0
  517. data/lib/generators/railsui/scaffold/templates/themes/corgie/views/show.html.erb.tt +24 -0
  518. data/lib/generators/railsui/scaffold/templates/themes/hound/views/_form.html.erb.tt +29 -24
  519. data/lib/generators/railsui/scaffold/templates/themes/shepherd/views/_form.html.erb.tt +28 -26
  520. data/lib/railsui/configuration.rb +22 -21
  521. data/lib/railsui/engine.rb +26 -20
  522. data/lib/railsui/form_builder.rb +307 -0
  523. data/lib/railsui/pages.rb +14 -3
  524. data/lib/railsui/theme_helper.rb +8 -8
  525. data/lib/railsui/theme_setup.rb +83 -49
  526. data/lib/railsui/themes.rb +3 -4
  527. data/lib/railsui/version.rb +1 -1
  528. data/lib/railsui.rb +9 -6
  529. data/lib/tasks/install.rake +1 -1
  530. data/lib/tasks/pages.rake +1 -1
  531. data/lib/tasks/stimulus.rake +1 -1
  532. metadata +287 -5
  533. data/.standard.yml +0 -3
  534. data/CHANGELOG.md +0 -9
  535. data/config/colors.yml +0 -50
@@ -0,0 +1,307 @@
1
+ require "action_view"
2
+
3
+ module Railsui
4
+ class FormBuilder < ActionView::Helpers::FormBuilder
5
+ delegate :content_tag, :tag, :safe_join, :capture, to: :@template
6
+
7
+ def text_field(method, options = {})
8
+ field_wrapper(method, options) do
9
+ add_default_class!(options, "form-input")
10
+ add_error_class!(options) if has_error?(method)
11
+ super(method, options)
12
+ end
13
+ end
14
+
15
+ def email_field(method, options = {})
16
+ field_wrapper(method, options) do
17
+ add_default_class!(options, "form-input")
18
+ add_error_class!(options) if has_error?(method)
19
+ super(method, options)
20
+ end
21
+ end
22
+
23
+ def password_field(method, options = {})
24
+ field_wrapper(method, options) do
25
+ add_default_class!(options, "form-input")
26
+ add_error_class!(options) if has_error?(method)
27
+ super(method, options)
28
+ end
29
+ end
30
+
31
+ def number_field(method, options = {})
32
+ field_wrapper(method, options) do
33
+ add_default_class!(options, "form-input")
34
+ add_error_class!(options) if has_error?(method)
35
+ super(method, options)
36
+ end
37
+ end
38
+
39
+ def telephone_field(method, options = {})
40
+ field_wrapper(method, options) do
41
+ add_default_class!(options, "form-input")
42
+ add_error_class!(options) if has_error?(method)
43
+ super(method, options)
44
+ end
45
+ end
46
+ alias phone_field telephone_field
47
+
48
+ def url_field(method, options = {})
49
+ field_wrapper(method, options) do
50
+ add_default_class!(options, "form-input")
51
+ add_error_class!(options) if has_error?(method)
52
+ super(method, options)
53
+ end
54
+ end
55
+
56
+ def date_field(method, options = {})
57
+ field_wrapper(method, options) do
58
+ add_default_class!(options, "form-input")
59
+ add_error_class!(options) if has_error?(method)
60
+ super(method, options)
61
+ end
62
+ end
63
+
64
+ def datetime_field(method, options = {})
65
+ field_wrapper(method, options) do
66
+ add_default_class!(options, "form-input")
67
+ add_error_class!(options) if has_error?(method)
68
+ super(method, options)
69
+ end
70
+ end
71
+
72
+ def time_field(method, options = {})
73
+ field_wrapper(method, options) do
74
+ add_default_class!(options, "form-input")
75
+ add_error_class!(options) if has_error?(method)
76
+ super(method, options)
77
+ end
78
+ end
79
+
80
+ def color_field(method, options = {})
81
+ field_wrapper(method, options) do
82
+ add_default_class!(options, "form-input-color")
83
+ add_error_class!(options) if has_error?(method)
84
+ super(method, options)
85
+ end
86
+ end
87
+
88
+ def search_field(method, options = {})
89
+ field_wrapper(method, options) do
90
+ add_default_class!(options, "form-input")
91
+ add_error_class!(options) if has_error?(method)
92
+ super(method, options)
93
+ end
94
+ end
95
+
96
+ def text_area(method, options = {})
97
+ field_wrapper(method, options) do
98
+ add_default_class!(options, "form-textarea")
99
+ add_error_class!(options) if has_error?(method)
100
+ super(method, options)
101
+ end
102
+ end
103
+
104
+ def select(method, choices = nil, options = {}, html_options = {})
105
+ field_wrapper(method, html_options) do
106
+ add_default_class!(html_options, "form-select")
107
+ add_error_class!(html_options) if has_error?(method)
108
+ super(method, choices, options, html_options)
109
+ end
110
+ end
111
+
112
+ def check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
113
+ wrapper_options = options.delete(:wrapper) || {}
114
+ label_text = options.delete(:label)
115
+ label_class = options.delete(:label_class) || "form-label"
116
+ is_required = options.delete(:required) || false
117
+
118
+ # Set default flex layout for the wrapper
119
+ wrapper_class = "flex items-center justify-start gap-2"
120
+ wrapper_options[:class] = [wrapper_class, wrapper_options[:class]].compact.join(" ")
121
+
122
+ content_tag(:div, wrapper_options) do
123
+ add_default_class!(options, "form-input-checkbox")
124
+ add_error_class!(options) if has_error?(method)
125
+
126
+ if label_text
127
+ check_box_html = super(method, options, checked_value, unchecked_value)
128
+ label_options = { class: label_class }
129
+ label_options[:required] = true if is_required
130
+ label_html = label(method, label_text, label_options)
131
+ safe_join([check_box_html, label_html])
132
+ else
133
+ super(method, options, checked_value, unchecked_value)
134
+ end
135
+ end
136
+ end
137
+
138
+ def radio_button(method, tag_value, options = {})
139
+ wrapper_options = options.delete(:wrapper) || {}
140
+ label_text = options.delete(:label)
141
+
142
+ # Set default flex layout for the wrapper
143
+ wrapper_class = "flex items-center justify-start gap-2"
144
+ wrapper_options[:class] = [wrapper_class, wrapper_options[:class]].compact.join(" ")
145
+
146
+ content_tag(:div, wrapper_options) do
147
+ add_default_class!(options, "form-input-radio")
148
+ add_error_class!(options) if has_error?(method)
149
+
150
+ if label_text
151
+ radio_html = super(method, tag_value, options)
152
+ label_html = label(method, label_text, value: tag_value, class: "form-label")
153
+ safe_join([radio_html, label_html])
154
+ else
155
+ super(method, tag_value, options)
156
+ end
157
+ end
158
+ end
159
+
160
+ def file_field(method, options = {})
161
+ field_wrapper(method, options) do
162
+ add_default_class!(options, "form-file")
163
+ add_error_class!(options) if has_error?(method)
164
+ super(method, options)
165
+ end
166
+ end
167
+
168
+ def rich_text_area(method, options = {})
169
+ field_wrapper(method, options) do
170
+ add_default_class!(options, "trix-content")
171
+ add_error_class!(options) if has_error?(method)
172
+ super(method, options)
173
+ end
174
+ end
175
+
176
+ def range_field(method, options = {})
177
+ # Extract wrapper options and add stimulus controller to the form group
178
+ wrapper_options = options.delete(:wrapper) || {}
179
+ wrapper_options["data-controller"] = "railsui-range"
180
+
181
+ field_wrapper(method, options.merge(wrapper: wrapper_options)) do
182
+ add_default_class!(options, "form-input-range")
183
+ add_error_class!(options) if has_error?(method)
184
+
185
+ # Add stimulus target and action data attributes to the input
186
+ options["data-railsui-range-target"] = "range"
187
+ options["data-action"] = "input->railsui-range#onInput"
188
+
189
+ super(method, options)
190
+ end
191
+ end
192
+
193
+
194
+ def switch_field(method, options = {})
195
+ label_text = options.delete(:label) || method.to_s.humanize
196
+
197
+ field_wrapper(method, options.merge(label: false)) do
198
+ add_default_class!(options, "form-input-switch")
199
+ add_error_class!(options) if has_error?(method)
200
+
201
+ # Create switch input without hidden field
202
+ switch_html = @template.check_box(@object_name, method, objectify_options(options.merge(include_hidden: false)), "1", "0")
203
+ label_html = label(method, label_text)
204
+ safe_join([switch_html, label_html])
205
+ end
206
+ end
207
+
208
+ def button_toggle(method, tag_value, options = {})
209
+ label_text = options.delete(:label) || tag_value.to_s.humanize
210
+ variant = options.delete(:variant) # sm, lg, ghost, muted
211
+
212
+ field_wrapper(method, options.merge(label: label_text)) do
213
+ base_class = "form-input-button-toggle"
214
+ base_class += "-#{variant}" if variant
215
+ add_default_class!(options, base_class)
216
+
217
+ # Call ActionView radio_button helper directly to avoid flex wrapper
218
+ @template.radio_button(@object_name, method, tag_value, objectify_options(options))
219
+ end
220
+ end
221
+
222
+ def label(method, text = nil, options = {})
223
+ add_default_class!(options, "form-label")
224
+ # Check both the required option and model validators
225
+ is_required = options.delete(:required) || required_field?(method)
226
+ options[:class] += " form-label-required" if is_required
227
+ super(method, text, options)
228
+ end
229
+
230
+ def error_message(method)
231
+ return unless has_error?(method)
232
+
233
+ content_tag(:p, class: "mt-1 text-sm text-red-600 dark:text-red-400") do
234
+ @object.errors[method].join(", ")
235
+ end
236
+ end
237
+
238
+ def form_group(method = nil, options = {}, &block)
239
+ content_tag(:div, class: "form-group #{options[:class]}", &block)
240
+ end
241
+
242
+ def form_help(text, options = {})
243
+ add_default_class!(options, "form-help text-xs")
244
+ content_tag(:p, text, options)
245
+ end
246
+
247
+ def submit(value = nil, options = {})
248
+ add_default_class!(options, "btn btn-primary")
249
+ super(value, options)
250
+ end
251
+
252
+ private
253
+
254
+ def field_wrapper(method, options = {}, &block)
255
+ wrapper_options = options.delete(:wrapper) || {}
256
+ label_text = options.delete(:label)
257
+ help_text = options.delete(:help)
258
+ skip_label = options.delete(:skip_label) || false
259
+ is_required = options[:required] || false
260
+
261
+ form_group(method, wrapper_options) do
262
+ elements = []
263
+
264
+ # Add label unless skipped
265
+ unless skip_label
266
+ label_options = options.delete(:label_options) || {}
267
+ # Pass the required flag to the label
268
+ label_options[:required] = is_required if is_required
269
+ elements << label(method, label_text, label_options) if label_text != false
270
+ end
271
+
272
+ # Add the field
273
+ elements << capture(&block)
274
+
275
+ # Add error message
276
+ elements << error_message(method) if has_error?(method)
277
+
278
+ # Add help text
279
+ if help_text
280
+ elements << content_tag(:p, help_text, class: "form-help")
281
+ end
282
+
283
+ safe_join(elements)
284
+ end
285
+ end
286
+
287
+ def add_default_class!(options, css_class)
288
+ options[:class] = [css_class, options[:class]].compact.join(" ")
289
+ end
290
+
291
+ def add_error_class!(options)
292
+ options[:class] = [options[:class], "form-input-error"].compact.join(" ")
293
+ end
294
+
295
+ def has_error?(method)
296
+ @object.respond_to?(:errors) && @object.errors[method].present?
297
+ end
298
+
299
+ def required_field?(method)
300
+ return false unless @object.class.respond_to?(:validators_on)
301
+
302
+ @object.class.validators_on(method).any? do |validator|
303
+ validator.is_a?(ActiveModel::Validations::PresenceValidator)
304
+ end
305
+ end
306
+ end
307
+ end
data/lib/railsui/pages.rb CHANGED
@@ -1,14 +1,20 @@
1
1
  module Railsui
2
2
  module Pages
3
- CONFIG_FILE = Railsui::Engine.root.join("config", "pages.yml")
4
- VIEWS_FOLDER = Rails.root.join("app/views/rui/pages")
3
+ CONFIG_FILE = Railsui::Engine.root.join('config', 'pages.yml')
4
+ VIEWS_FOLDER = Rails.root.join('app/views/rui/pages')
5
5
 
6
6
  def self.all_pages
7
7
  @all_pages ||= load_pages_config
8
8
  end
9
9
 
10
10
  def self.theme_pages
11
- all_pages[Railsui.config.theme]
11
+ theme = Railsui.config.theme
12
+ return {} if theme.nil?
13
+
14
+ pages = all_pages[theme]
15
+ return {} if pages.nil?
16
+
17
+ pages
12
18
  end
13
19
 
14
20
  def self.get_pages(theme)
@@ -24,10 +30,14 @@ module Railsui
24
30
  end
25
31
 
26
32
  def self.all_pages_installed?
33
+ return false if theme_pages.nil? || theme_pages.empty?
34
+
27
35
  theme_pages.keys.all? { |page| page_exists?(page) }
28
36
  end
29
37
 
30
38
  def self.installed_pages
39
+ return {} if theme_pages.nil?
40
+
31
41
  theme_pages.select { |page, details| page_enabled?(page) && page_exists?(page) }
32
42
  end
33
43
 
@@ -35,6 +45,7 @@ module Railsui
35
45
 
36
46
  def self.load_pages_config
37
47
  return {} unless File.exist?(CONFIG_FILE)
48
+
38
49
  YAML.safe_load_file(CONFIG_FILE)
39
50
  end
40
51
  end
@@ -16,10 +16,10 @@ module Railsui
16
16
  inactive_class = html_options.delete(:inactive_class) || ""
17
17
 
18
18
  active = if (paths = Array.wrap(starts_with)) && paths.present?
19
- paths.any? { |path| request.path.start_with?(path) }
20
- else
21
- request.path == url
22
- end
19
+ paths.any? { |path| request.path.start_with?(path) }
20
+ else
21
+ request.path == url
22
+ end
23
23
 
24
24
  classes = active ? active_class : inactive_class
25
25
  html_options[:class] << classes unless classes.empty?
@@ -42,11 +42,11 @@ module Railsui
42
42
  "https://randomuser.me/api/portraits/#{variant}/#{id}.jpg"
43
43
  end
44
44
 
45
- def conditional_link_to(route_helper, options = {}, &block)
45
+ def conditional_link_to(route_helper, options = {}, &)
46
46
  if Rails.application.routes.url_helpers.method_defined?(route_helper)
47
- link_to send(route_helper), options, &block
47
+ link_to(send(route_helper), options, &)
48
48
  else
49
- content_tag(:div, options, &block)
49
+ content_tag(:div, options, &)
50
50
  end
51
51
  end
52
52
 
@@ -68,7 +68,7 @@ module Railsui
68
68
  content_classes = content_for(:body_classes).to_s.strip
69
69
 
70
70
  # Combine existing Railsui config classes with any additional classes
71
- combined_classes = [Railsui.config.body_classes.to_s.strip, content_classes].reject(&:empty?).join(' ')
71
+ combined_classes = [Railsui.config.body_classes.to_s.strip, content_classes].reject(&:empty?).join(" ")
72
72
 
73
73
  # Return the combined classes or an empty string if none
74
74
  combined_classes.presence || ""
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'fileutils'
3
+ require "fileutils"
4
4
 
5
5
  module Railsui
6
6
  module ThemeSetup
@@ -36,7 +36,8 @@ module Railsui
36
36
  controller_name = File.basename(file, ".js").sub("_controller", "")
37
37
  import_name = controller_name.camelize
38
38
  registration_name = controller_name.dasherize
39
- "import #{import_name}Controller from \"./#{File.basename(file, '.js')}\";\napplication.register(\"#{registration_name}\", #{import_name}Controller);"
39
+ "import #{import_name}Controller from \"./#{File.basename(file,
40
+ ".js")}\";\napplication.register(\"#{registration_name}\", #{import_name}Controller);"
40
41
  end.join("\n")
41
42
 
42
43
  js_content = <<-JAVASCRIPT.strip_heredoc
@@ -61,25 +62,26 @@ module Railsui
61
62
  railsui_index_content += "\n\n#{js_content}"
62
63
 
63
64
  # Write the railsui/index.js file
64
- create_file railsui_index_js_path, "import { application } from \"../application\"\n\n#{railsui_index_content}", force: true
65
+ create_file railsui_index_js_path, "import { application } from \"../application\"\n\n#{railsui_index_content}",
66
+ force: true
65
67
 
66
68
  # Read the existing main index.js content
67
69
  index_js_content = File.exist?(index_js_path) ? File.read(index_js_path) : ""
68
70
 
69
71
  # Remove old import statements for railsui controllers
70
- new_index_js_content = index_js_content.gsub(/import .* from "\.\/railsui\/.*";\n*/, "")
72
+ new_index_js_content = index_js_content.gsub(%r{import .* from "\./railsui/.*";\n*}, "")
71
73
 
72
74
  # Add the new import statement for railsui/index.js if not already present
73
- unless new_index_js_content.include?('import "./railsui"')
74
- new_index_js_content += "import \"./railsui\"\n"
75
- end
75
+ new_index_js_content += "import \"./railsui\"\n" unless new_index_js_content.include?('import "./railsui"')
76
76
 
77
77
  # Write the updated content back to main index.js
78
78
  create_file index_js_path, new_index_js_content, force: true
79
- say("Updated app/javascript/controllers/index.js and created app/javascript/controllers/railsui/index.js successfully.", :green)
79
+ say(
80
+ "Updated app/javascript/controllers/index.js and created app/javascript/controllers/railsui/index.js successfully.", :green
81
+ )
80
82
  end
81
83
 
82
- def copy_theme_stylesheets(theme)
84
+ def copy_theme_stylesheets(theme)
83
85
  say("Copying theme-specific stylesheets", :yellow)
84
86
 
85
87
  # Define paths
@@ -99,7 +101,7 @@ module Railsui
99
101
 
100
102
  # Generate import statements for stylesheets
101
103
  import_statements = stylesheet_files.map do |file|
102
- "@import \"../stylesheets/railsui/#{File.basename(file, '.css')}\";"
104
+ "@import \"../stylesheets/railsui/#{File.basename(file, ".css")}\";"
103
105
  end.join("\n")
104
106
 
105
107
  # Read the existing application.tailwind.css content
@@ -108,12 +110,12 @@ module Railsui
108
110
  # Remove old @tailwind directives and import statements for tailwindcss and railsui stylesheets
109
111
  cleaned_css_content = application_css_content
110
112
  cleaned_css_content = cleaned_css_content.gsub(/@import "tailwindcss";\n*/, "")
111
- cleaned_css_content = cleaned_css_content.gsub(/@import "\.\.\/stylesheets\/railsui\/.*";\n*/, "")
113
+ cleaned_css_content = cleaned_css_content.gsub(%r{@import "\.\./stylesheets/railsui/.*";\n*}, "")
112
114
 
113
115
  # Add the new import statements in the correct order
114
116
  new_application_css_content = [
115
117
  '@import "tailwindcss";',
116
- cleaned_css_content.strip, # Preserving existing content
118
+ cleaned_css_content.strip, # Preserving existing content
117
119
  import_statements
118
120
  ].join("\n")
119
121
 
@@ -127,7 +129,6 @@ module Railsui
127
129
  add_yarn_packages(theme_dependencies(theme))
128
130
  end
129
131
 
130
-
131
132
  def remove_action_text_defaults
132
133
  say "Remove default ActionText CSS"
133
134
  # remove import from application.tailwind.css if present as we add it to another imported css file.
@@ -142,20 +143,54 @@ module Railsui
142
143
  def theme_dependencies(theme)
143
144
  case theme
144
145
  when "hound"
145
- ["@tailwindcss/typography", "apexcharts", "railsui-stimulus", "stimulus-use","tailwindcss@latest", "@tailwindcss/cli@latest", "tippy.js"]
146
+ ["@tailwindcss/typography", "apexcharts", "railsui-stimulus", "stimulus-use", "tailwindcss@latest", "@tailwindcss/cli@latest", "tippy.js"]
146
147
  when "shepherd"
147
- ["@tailwindcss/typography", "apexcharts", "flatpickr", "hotkeys-js", "photoswipe", "railsui-stimulus", "stimulus-use", "tippy.js", "tailwindcss@latest", "@tailwindcss/cli@latest"]
148
- when "retriever"
149
- ["@tailwindcss/typography", "apexcharts", "autoprefixer", "flatpickr","railsui-stimulus", "stimulus-use", "tailwindcss@latest", "@tailwindcss/cli@latest", "tippy.js"]
150
- when "setter"
151
- ["@tailwindcss/typography", "railsui-stimulus", "stimulus-use", "tailwindcss@latest", "@tailwindcss/cli@latest", "tippy.js"]
148
+ ["@tailwindcss/typography", "apexcharts", "flatpickr", "hotkeys-js", "photoswipe", "railsui-stimulus",
149
+ "stimulus-use", "tippy.js", "tailwindcss@latest", "@tailwindcss/cli@latest"]
150
+ when "corgie"
151
+ ["@tailwindcss/typography", "railsui-stimulus", "stimulus-use", "tailwindcss@latest", "@tailwindcss/cli@latest", "tippy.js", "marked", "highlight.js", "sanitize-html"]
152
152
  else
153
- ["@tailwindcss/typography", "railsui-stimulus", "stimulus-use", "tailwindcss@latest", "@tailwindcss/cli@latest" "tippy.js"]
153
+ ["@tailwindcss/typography", "railsui-stimulus", "stimulus-use", "tailwindcss@latest",
154
+ "@tailwindcss/cli@latest", "tippy.js"]
154
155
  end
155
156
  end
156
157
 
157
158
  def add_yarn_packages(packages)
158
- run "yarn add #{packages.join(' ')} --latest"
159
+ package_manager = detect_package_manager
160
+ say "Using #{package_manager} to install packages...", :green
161
+
162
+ case package_manager
163
+ when "yarn"
164
+ run "yarn add #{packages.join(" ")}"
165
+ when "npm"
166
+ run "npm install #{packages.join(" ")}"
167
+ when "pnpm"
168
+ run "pnpm add #{packages.join(" ")}"
169
+ when "bun"
170
+ run "bun add #{packages.join(" ")}"
171
+ else
172
+ # Fallback to yarn if no package manager detected
173
+ say "No package manager detected, falling back to yarn", :yellow
174
+ run "yarn add #{packages.join(" ")}"
175
+ end
176
+ end
177
+
178
+ def detect_package_manager
179
+ # Check for lock files in order of preference
180
+ if File.exist?(Rails.root.join("yarn.lock"))
181
+ "yarn"
182
+ elsif File.exist?(Rails.root.join("package-lock.json"))
183
+ "npm"
184
+ elsif File.exist?(Rails.root.join("pnpm-lock.yaml"))
185
+ "pnpm"
186
+ elsif File.exist?(Rails.root.join("bun.lockb"))
187
+ "bun"
188
+ elsif File.exist?(Rails.root.join("package.json"))
189
+ # Check for package.json to determine if we should use npm as default
190
+ "npm" # Default to npm if package.json exists but no lock file
191
+ else
192
+ "yarn" # Fallback to yarn
193
+ end
159
194
  end
160
195
 
161
196
  # Mailers
@@ -164,12 +199,13 @@ module Railsui
164
199
 
165
200
  rails_command "generate mailer Railsui minimal promotion transactional"
166
201
 
167
- combined_mailer_setup = <<-RUBY
202
+ combined_mailer_setup = <<-RUBY
168
203
  layout "rui/railsui_mailer"
169
204
  helper :application
170
- RUBY
205
+ RUBY
171
206
 
172
- insert_into_file Rails.root.join("app/mailers/railsui_mailer.rb").to_s, combined_mailer_setup, after: "class RailsuiMailer < ApplicationMailer\n"
207
+ insert_into_file Rails.root.join("app/mailers/railsui_mailer.rb").to_s, combined_mailer_setup,
208
+ after: "class RailsuiMailer < ApplicationMailer\n"
173
209
 
174
210
  copy_sample_mailers(theme)
175
211
  end
@@ -181,16 +217,14 @@ RUBY
181
217
  end
182
218
 
183
219
  def update_railsui_mailer_layout(theme)
184
- source_file = Rails.root.join('app/views/layouts/rui/railsui_mailer.html.erb')
185
- if File.exist?(source_file)
186
- remove_file source_file
187
- end
220
+ source_file = Rails.root.join("app/views/layouts/rui/railsui_mailer.html.erb")
221
+ remove_file source_file if File.exist?(source_file)
188
222
 
189
223
  copy_file "themes/#{theme}/views/layouts/rui/railsui_mailer.html.erb", source_file, force: true
190
224
  end
191
225
 
192
226
  def update_application_helper
193
- content = <<-RUBY
227
+ content = <<-RUBY
194
228
  def spacer(amount = 16)
195
229
  render "rui/shared/email_spacer", amount: amount
196
230
  end
@@ -205,7 +239,7 @@ content = <<-RUBY
205
239
  def email_callout(&block)
206
240
  render "rui/shared/email_callout", block: block
207
241
  end
208
- RUBY
242
+ RUBY
209
243
 
210
244
  insert_into_file "#{Rails.root}/app/helpers/application_helper.rb", content, after: "module ApplicationHelper\n"
211
245
  end
@@ -236,7 +270,7 @@ RUBY
236
270
  end
237
271
 
238
272
  def copy_railsui_pages_routes
239
- routes_file = Rails.root.join('config/routes.rb')
273
+ routes_file = Rails.root.join("config/routes.rb")
240
274
 
241
275
  # Define the regex pattern for the `rui` namespace block
242
276
  namespace_pattern = /^\s*namespace :rui do.*?end\n/m
@@ -253,17 +287,17 @@ RUBY
253
287
  route_content = File.read(routes_file)
254
288
 
255
289
  # Remove the existing `rui` namespace block if present
256
- updated_content = route_content.gsub(namespace_pattern, '')
290
+ updated_content = route_content.gsub(namespace_pattern, "")
257
291
 
258
292
  # Append the new routes block after the initial `Rails.application.routes.draw do` line
259
293
  updated_content.sub!("Rails.application.routes.draw do\n", "Rails.application.routes.draw do\n#{routes_block}")
260
294
 
261
295
  # Write the updated content back to the routes file
262
- File.open(routes_file, 'w') { |file| file.write(updated_content) }
296
+ File.write(routes_file, updated_content)
263
297
  end
264
298
 
265
299
  # Pages
266
- def copy_railsui_page_controller(theme)
300
+ def copy_railsui_page_controller(_theme)
267
301
  copy_file "controllers/pages_controller.rb", "app/controllers/rui/pages_controller.rb", force: true
268
302
  end
269
303
 
@@ -275,28 +309,28 @@ RUBY
275
309
  directory "themes/#{theme}/views/layouts/rui", "app/views/layouts/rui", force: true
276
310
  end
277
311
 
278
- def copy_railsui_head(theme)
312
+ def copy_railsui_head(_theme)
279
313
  layout_file = "app/views/layouts/application.html.erb"
280
314
  return unless File.exist?(layout_file)
281
315
 
282
- unless File.read(layout_file).include?('<%= railsui_head %>')
283
- content = <<-ERB
316
+ return if File.read(layout_file).include?("<%= railsui_head %>")
317
+
318
+ content = <<-ERB
284
319
  <%= railsui_head %>
285
- ERB
286
- insert_into_file layout_file, "\n#{content}", before: '</head>'
287
- end
320
+ ERB
321
+ insert_into_file layout_file, "\n#{content}", before: "</head>"
288
322
  end
289
323
 
290
- def copy_railsui_launcher(theme)
324
+ def copy_railsui_launcher(_theme)
291
325
  layout_file = "app/views/layouts/application.html.erb"
292
326
  return unless File.exist?(layout_file)
293
327
 
294
- unless File.read(layout_file).include?('<%= railsui_launcher if Rails.env.development? %>')
295
- content = <<-ERB
328
+ return if File.read(layout_file).include?("<%= railsui_launcher if Rails.env.development? %>")
329
+
330
+ content = <<-ERB
296
331
  <%= railsui_launcher if Rails.env.development? %>
297
- ERB
298
- insert_into_file layout_file, "\n#{content}", before: '</body>'
299
- end
332
+ ERB
333
+ insert_into_file layout_file, "\n#{content}", before: "</body>"
300
334
  end
301
335
 
302
336
  def copy_railsui_images(theme)
@@ -317,7 +351,7 @@ RUBY
317
351
  FileUtils.rm_rf(directory_path)
318
352
  say("Removed existing #{thing} in #{directory_path}")
319
353
  end
320
- rescue => e
354
+ rescue StandardError => e
321
355
  say("Error removing directory #{directory_path}: #{e.message}", :red)
322
356
  raise e
323
357
  end
@@ -327,10 +361,10 @@ RUBY
327
361
  route_content = File.read(file)
328
362
 
329
363
  # Remove route associated with railsui/pages#<page>
330
- route_content.gsub!(/^\s*get\s+'#{page}',\s+to:\s+'railsui\/pages##{page}'\s*$/, '')
364
+ route_content.gsub!(%r{^\s*get\s+'#{page}',\s+to:\s+'railsui/pages##{page}'\s*$}, "")
331
365
 
332
366
  # Write the updated content back to the file
333
- File.open(file, 'w') { |f| f.write(route_content) }
367
+ File.write(file, route_content)
334
368
  end
335
369
  end
336
370
  end