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.
- checksums.yaml +4 -4
- data/.claude/settings.local.json +10 -0
- data/Gemfile.lock +29 -27
- data/README.md +1 -1
- data/app/assets/images/tailwind-corgie-thumbnail.jpg +0 -0
- data/app/assets/stylesheets/railsui/railsui.css +18 -0
- data/app/helpers/railsui/application_helper.rb +22 -17
- data/app/helpers/railsui/host_route_fallback_helper.rb +18 -0
- data/app/javascript/controllers/alert_controller.js +0 -0
- data/app/models/railsui/default.rb +28 -109
- data/app/views/railsui/admin/fields/_color.html.erb +6 -1
- data/app/views/railsui/admin/fields/_theme.html.erb +16 -8
- data/app/views/railsui/default/_launchpad.html.erb +1 -1
- data/app/views/railsui/shared/_flash_messages.html.erb +2 -2
- data/app/views/railsui/shared/_full_access_cta.html.erb +27 -0
- data/app/views/railsui/shared/_global_nav.html.erb +2 -2
- data/app/views/railsui/shared/_preview.html.erb +1 -1
- data/app/views/railsui/shared/_rui_email_preview.html.erb +60 -3
- data/app/views/railsui/systems/forms/form_builder.html.erb +171 -0
- data/app/views/railsui/themes/corgie/_components.html.erb +7 -0
- data/app/views/railsui/themes/corgie/_content.html.erb +9 -0
- data/app/views/railsui/themes/corgie/_fonts.html.erb +0 -0
- data/app/views/railsui/themes/corgie/_forms.html.erb +19 -0
- data/app/views/railsui/themes/corgie/_icons.html.erb +125 -0
- data/app/views/railsui/themes/corgie/_nav.html.erb +166 -0
- data/app/views/railsui/themes/corgie/_scaffolds.html.erb +42 -0
- data/app/views/railsui/themes/corgie/authentication/_overview.html.erb +5 -0
- data/app/views/railsui/themes/corgie/authentication/devise/_change_password.html.erb +74 -0
- data/app/views/railsui/themes/corgie/authentication/devise/_confirmation.html.erb +63 -0
- data/app/views/railsui/themes/corgie/authentication/devise/_edit.html.erb +103 -0
- data/app/views/railsui/themes/corgie/authentication/devise/_overview.html.erb +225 -0
- data/app/views/railsui/themes/corgie/authentication/devise/_reset_password.html.erb +60 -0
- data/app/views/railsui/themes/corgie/authentication/devise/_signin.html.erb +93 -0
- data/app/views/railsui/themes/corgie/authentication/devise/_signup.html.erb +98 -0
- data/app/views/railsui/themes/corgie/authentication/devise/_unlocks.html.erb +60 -0
- data/app/views/railsui/themes/corgie/authentication/static/_change_password.html.erb +67 -0
- data/app/views/railsui/themes/corgie/authentication/static/_confirmation.html.erb +58 -0
- data/app/views/railsui/themes/corgie/authentication/static/_overview.html.erb +204 -0
- data/app/views/railsui/themes/corgie/authentication/static/_reset_password.html.erb +59 -0
- data/app/views/railsui/themes/corgie/authentication/static/_signin.html.erb +102 -0
- data/app/views/railsui/themes/corgie/authentication/static/_signup.html.erb +108 -0
- data/app/views/railsui/themes/corgie/authentication/static/_unlocks.html.erb +60 -0
- data/app/views/railsui/themes/corgie/components/_accordion.html.erb +17 -0
- data/app/views/railsui/themes/corgie/components/_alert.html.erb +23 -0
- data/app/views/railsui/themes/corgie/components/_avatar.html.erb +13 -0
- data/app/views/railsui/themes/corgie/components/_badge.html.erb +20 -0
- data/app/views/railsui/themes/corgie/components/_breadcrumb.html.erb +14 -0
- data/app/views/railsui/themes/corgie/components/_button.html.erb +16 -0
- data/app/views/railsui/themes/corgie/components/_card.html.erb +23 -0
- data/app/views/railsui/themes/corgie/components/_combobox.html.erb +11 -0
- data/app/views/railsui/themes/corgie/components/_dropdown.html.erb +22 -0
- data/app/views/railsui/themes/corgie/components/_flash.html.erb +17 -0
- data/app/views/railsui/themes/corgie/components/_modal.html.erb +27 -0
- data/app/views/railsui/themes/corgie/components/_navigation.html.erb +7 -0
- data/app/views/railsui/themes/corgie/components/_pagination.html.erb +15 -0
- data/app/views/railsui/themes/corgie/components/_tab.html.erb +23 -0
- data/app/views/railsui/themes/corgie/components/_toast.html.erb +75 -0
- data/app/views/railsui/themes/corgie/components/_tooltip.html.erb +77 -0
- data/app/views/railsui/themes/corgie/components/accordion/_contained.html.erb +90 -0
- data/app/views/railsui/themes/corgie/components/accordion/_flush.html.erb +92 -0
- data/app/views/railsui/themes/corgie/components/alert/_dismissable.html.erb +45 -0
- data/app/views/railsui/themes/corgie/components/alert/_with_accent_border.html.erb +32 -0
- data/app/views/railsui/themes/corgie/components/alert/_with_actions.html.erb +57 -0
- data/app/views/railsui/themes/corgie/components/alert/_with_description.html.erb +41 -0
- data/app/views/railsui/themes/corgie/components/alert/_with_list.html.erb +46 -0
- data/app/views/railsui/themes/corgie/components/avatar/_circle.html.erb +53 -0
- data/app/views/railsui/themes/corgie/components/avatar/_rounded.html.erb +53 -0
- data/app/views/railsui/themes/corgie/components/badge/_basic.html.erb +70 -0
- data/app/views/railsui/themes/corgie/components/badge/_outline.html.erb +67 -0
- data/app/views/railsui/themes/corgie/components/badge/_pill.html.erb +67 -0
- data/app/views/railsui/themes/corgie/components/badge/_tag.html.erb +277 -0
- data/app/views/railsui/themes/corgie/components/breadcrumb/_article.html.erb +88 -0
- data/app/views/railsui/themes/corgie/components/breadcrumb/_base.html.erb +77 -0
- data/app/views/railsui/themes/corgie/components/button/_base.html.erb +38 -0
- data/app/views/railsui/themes/corgie/components/button/_expanded.html.erb +24 -0
- data/app/views/railsui/themes/corgie/components/button/_sizes.html.erb +31 -0
- data/app/views/railsui/themes/corgie/components/card/_article.html.erb +119 -0
- data/app/views/railsui/themes/corgie/components/card/_base.html.erb +34 -0
- data/app/views/railsui/themes/corgie/components/card/_feature.html.erb +54 -0
- data/app/views/railsui/themes/corgie/components/card/_team_member.html.erb +60 -0
- data/app/views/railsui/themes/corgie/components/card/_value.html.erb +54 -0
- data/app/views/railsui/themes/corgie/components/combobox/_base.html.erb +250 -0
- data/app/views/railsui/themes/corgie/components/dropdown/_base.html.erb +61 -0
- data/app/views/railsui/themes/corgie/components/dropdown/_dropdown.html.erb +24 -0
- data/app/views/railsui/themes/corgie/components/dropdown/_dropdown_w_icon.html.erb +27 -0
- data/app/views/railsui/themes/corgie/components/dropdown/_right_aligned.html.erb +82 -0
- data/app/views/railsui/themes/corgie/components/dropdown/_with_dividers.html.erb +93 -0
- data/app/views/railsui/themes/corgie/components/dropdown/_with_icons.html.erb +85 -0
- data/app/views/railsui/themes/corgie/components/dropdown/tutorial/_1.html.erb +44 -0
- data/app/views/railsui/themes/corgie/components/dropdown/tutorial/_2.html.erb +16 -0
- data/app/views/railsui/themes/corgie/components/dropdown/tutorial/_3.html.erb +16 -0
- data/app/views/railsui/themes/corgie/components/dropdown/tutorial/_4.html.erb +27 -0
- data/app/views/railsui/themes/corgie/components/dropdown/tutorial/_dependencies.html.erb +3 -0
- data/app/views/railsui/themes/corgie/components/dropdown/tutorial/_tutorial.html.erb +25 -0
- data/app/views/railsui/themes/corgie/components/flash/_alert.html.erb +29 -0
- data/app/views/railsui/themes/corgie/components/flash/_dynamic.html.erb +46 -0
- data/app/views/railsui/themes/corgie/components/flash/_notice.html.erb +29 -0
- data/app/views/railsui/themes/corgie/components/modal/_base.html.erb +110 -0
- data/app/views/railsui/themes/corgie/components/modal/_centered_dual_action.html.erb +124 -0
- data/app/views/railsui/themes/corgie/components/modal/_dismiss_icon.html.erb +124 -0
- data/app/views/railsui/themes/corgie/components/modal/_settings.html.erb +201 -0
- data/app/views/railsui/themes/corgie/components/modal/_single_action.html.erb +119 -0
- data/app/views/railsui/themes/corgie/components/modal/_with_form.html.erb +148 -0
- data/app/views/railsui/themes/corgie/components/navigation/_base.html.erb +215 -0
- data/app/views/railsui/themes/corgie/components/navigation/_chat.html.erb +194 -0
- data/app/views/railsui/themes/corgie/components/navigation/_nav_preview.html.erb +9 -0
- data/app/views/railsui/themes/corgie/components/pagination/_contained.html.erb +131 -0
- data/app/views/railsui/themes/corgie/components/pagination/_pagy.html.erb +97 -0
- data/app/views/railsui/themes/corgie/components/pagination/_simple.html.erb +114 -0
- data/app/views/railsui/themes/corgie/components/tab/_base.html.erb +101 -0
- data/app/views/railsui/themes/corgie/components/tab/_pills.html.erb +102 -0
- data/app/views/railsui/themes/corgie/components/tab/_rounded.html.erb +104 -0
- data/app/views/railsui/themes/corgie/components/tab/_vertical.html.erb +145 -0
- data/app/views/railsui/themes/corgie/components/tab/_with_icons.html.erb +138 -0
- data/app/views/railsui/themes/corgie/components/toast/_base.html.erb +98 -0
- data/app/views/railsui/themes/corgie/components/tooltip/_base.html.erb +51 -0
- data/app/views/railsui/themes/corgie/content/_image.html.erb +31 -0
- data/app/views/railsui/themes/corgie/content/_table.html.erb +21 -0
- data/app/views/railsui/themes/corgie/content/_typography.html.erb +47 -0
- data/app/views/railsui/themes/corgie/content/image/_object_contain.html.erb +31 -0
- data/app/views/railsui/themes/corgie/content/image/_object_cover.html.erb +32 -0
- data/app/views/railsui/themes/corgie/content/image/_object_fill.html.erb +32 -0
- data/app/views/railsui/themes/corgie/content/image/_object_scale_down.html.erb +34 -0
- data/app/views/railsui/themes/corgie/content/image/_responsive.html.erb +24 -0
- data/app/views/railsui/themes/corgie/content/table/_bordered.html.erb +93 -0
- data/app/views/railsui/themes/corgie/content/table/_borderless.html.erb +92 -0
- data/app/views/railsui/themes/corgie/content/table/_comparison.html.erb +494 -0
- data/app/views/railsui/themes/corgie/content/typography/_blockquote.html.erb +41 -0
- data/app/views/railsui/themes/corgie/content/typography/_display_headings.html.erb +70 -0
- data/app/views/railsui/themes/corgie/content/typography/_fonts.html.erb +30 -0
- data/app/views/railsui/themes/corgie/content/typography/_headings.html.erb +88 -0
- data/app/views/railsui/themes/corgie/content/typography/_inline_formatting.html.erb +44 -0
- data/app/views/railsui/themes/corgie/content/typography/_lead_paragraph.html.erb +26 -0
- data/app/views/railsui/themes/corgie/content/typography/_lists.html.erb +82 -0
- data/app/views/railsui/themes/corgie/content/typography/_paragraphs.html.erb +33 -0
- data/app/views/railsui/themes/corgie/forms/_action_text.html.erb +54 -0
- data/app/views/railsui/themes/corgie/forms/_checkbox.html.erb +60 -0
- data/app/views/railsui/themes/corgie/forms/_form_builder.html.erb +487 -0
- data/app/views/railsui/themes/corgie/forms/_input.html.erb +378 -0
- data/app/views/railsui/themes/corgie/forms/_input_group.html.erb +485 -0
- data/app/views/railsui/themes/corgie/forms/_radio.html.erb +92 -0
- data/app/views/railsui/themes/corgie/forms/_select.html.erb +118 -0
- data/app/views/railsui/themes/corgie/forms/_switch.html.erb +60 -0
- data/app/views/railsui/themes/corgie/forms/_validation.html.erb +52 -0
- data/app/views/railsui/themes/corgie/mailers/_devise.html.erb +44 -0
- data/app/views/railsui/themes/corgie/mailers/_layout.html.erb +536 -0
- data/app/views/railsui/themes/corgie/mailers/_mailer_preview.html.erb +523 -0
- data/app/views/railsui/themes/corgie/mailers/_minimal.html.erb +63 -0
- data/app/views/railsui/themes/corgie/mailers/_promotion.html.erb +62 -0
- data/app/views/railsui/themes/corgie/mailers/_transactional.html.erb +133 -0
- data/app/views/railsui/themes/corgie/mailers/devise/_confirmation_instructions.html.erb +34 -0
- data/app/views/railsui/themes/corgie/mailers/devise/_email_changed.html.erb +32 -0
- data/app/views/railsui/themes/corgie/mailers/devise/_password_changed.html.erb +25 -0
- data/app/views/railsui/themes/corgie/mailers/devise/_reset_password_instructions.html.erb +33 -0
- data/app/views/railsui/themes/corgie/mailers/devise/_unlock_instructions.html.erb +32 -0
- data/app/views/railsui/themes/corgie/scaffolds/_edit.html.erb +88 -0
- data/app/views/railsui/themes/corgie/scaffolds/_index.html.erb +88 -0
- data/app/views/railsui/themes/corgie/scaffolds/_new.html.erb +80 -0
- data/app/views/railsui/themes/corgie/scaffolds/_partial.html.erb +56 -0
- data/app/views/railsui/themes/corgie/scaffolds/_show.html.erb +85 -0
- data/app/views/railsui/themes/hound/_forms.html.erb +2 -0
- data/app/views/railsui/themes/hound/_nav.html.erb +2 -0
- data/app/views/railsui/themes/hound/authentication/devise/_change_password.html.erb +1 -27
- data/app/views/railsui/themes/hound/authentication/devise/_confirmation.html.erb +1 -20
- data/app/views/railsui/themes/hound/authentication/devise/_edit.html.erb +1 -44
- data/app/views/railsui/themes/hound/authentication/devise/_overview.html.erb +3 -51
- data/app/views/railsui/themes/hound/authentication/devise/_reset_password.html.erb +1 -17
- data/app/views/railsui/themes/hound/authentication/devise/_signin.html.erb +1 -30
- data/app/views/railsui/themes/hound/authentication/devise/_signup.html.erb +1 -31
- data/app/views/railsui/themes/hound/authentication/devise/_unlocks.html.erb +1 -17
- data/app/views/railsui/themes/hound/authentication/static/_change_password.html.erb +1 -32
- data/app/views/railsui/themes/hound/authentication/static/_confirmation.html.erb +1 -23
- data/app/views/railsui/themes/hound/authentication/static/_edit.html.erb +1 -39
- data/app/views/railsui/themes/hound/authentication/static/_overview.html.erb +2 -40
- data/app/views/railsui/themes/hound/authentication/static/_reset_password.html.erb +1 -22
- data/app/views/railsui/themes/hound/authentication/static/_signin.html.erb +1 -35
- data/app/views/railsui/themes/hound/authentication/static/_signup.html.erb +1 -31
- data/app/views/railsui/themes/hound/authentication/static/_unlocks.html.erb +1 -20
- data/app/views/railsui/themes/hound/components/_toast.html.erb +0 -3
- data/app/views/railsui/themes/hound/components/accordion/_contained.html.erb +0 -27
- data/app/views/railsui/themes/hound/components/accordion/_flush.html.erb +0 -27
- data/app/views/railsui/themes/hound/components/alert/_dismissable.html.erb +0 -8
- data/app/views/railsui/themes/hound/components/alert/_with_accent_border.html.erb +0 -7
- data/app/views/railsui/themes/hound/components/alert/_with_actions.html.erb +0 -11
- data/app/views/railsui/themes/hound/components/alert/_with_description.html.erb +0 -7
- data/app/views/railsui/themes/hound/components/alert/_with_list.html.erb +0 -8
- data/app/views/railsui/themes/hound/components/avatar/_circle.html.erb +0 -12
- data/app/views/railsui/themes/hound/components/avatar/_rounded.html.erb +0 -12
- data/app/views/railsui/themes/hound/components/badge/_basic.html.erb +0 -22
- data/app/views/railsui/themes/hound/components/badge/_outline.html.erb +0 -22
- data/app/views/railsui/themes/hound/components/badge/_pill.html.erb +0 -22
- data/app/views/railsui/themes/hound/components/badge/_tag.html.erb +0 -52
- data/app/views/railsui/themes/hound/components/breadcrumb/_base.html.erb +0 -14
- data/app/views/railsui/themes/hound/components/breadcrumb/_contained.html.erb +0 -14
- data/app/views/railsui/themes/hound/components/button/_base.html.erb +0 -10
- data/app/views/railsui/themes/hound/components/button/_expanded.html.erb +0 -3
- data/app/views/railsui/themes/hound/components/button/_sizes.html.erb +0 -5
- data/app/views/railsui/themes/hound/components/card/_base.html.erb +0 -6
- data/app/views/railsui/themes/hound/components/card/_user_card.html.erb +0 -13
- data/app/views/railsui/themes/hound/components/card/_user_card_dropdown.html.erb +0 -20
- data/app/views/railsui/themes/hound/components/card/_user_card_with_actions.html.erb +0 -18
- data/app/views/railsui/themes/hound/components/card/_with_action.html.erb +0 -13
- data/app/views/railsui/themes/hound/components/card/_with_header.html.erb +0 -43
- data/app/views/railsui/themes/hound/components/combobox/_base.html.erb +0 -40
- data/app/views/railsui/themes/hound/components/dropdown/_base.html.erb +0 -10
- data/app/views/railsui/themes/hound/components/dropdown/_right_aligned.html.erb +0 -14
- data/app/views/railsui/themes/hound/components/dropdown/_with_dividers.html.erb +0 -14
- data/app/views/railsui/themes/hound/components/dropdown/_with_icons.html.erb +0 -20
- data/app/views/railsui/themes/hound/components/flash/_alert.html.erb +0 -5
- data/app/views/railsui/themes/hound/components/flash/_dynamic.html.erb +0 -5
- data/app/views/railsui/themes/hound/components/flash/_notice.html.erb +0 -5
- data/app/views/railsui/themes/hound/components/modal/_base.html.erb +0 -13
- data/app/views/railsui/themes/hound/components/modal/_centered_dual_action.html.erb +0 -16
- data/app/views/railsui/themes/hound/components/modal/_dismiss_icon.html.erb +0 -20
- data/app/views/railsui/themes/hound/components/modal/_single_action.html.erb +0 -15
- data/app/views/railsui/themes/hound/components/modal/_with_form.html.erb +0 -23
- data/app/views/railsui/themes/hound/components/navigation/_base.html.erb +1 -41
- data/app/views/railsui/themes/hound/components/navigation/_with_action.html.erb +1 -38
- data/app/views/railsui/themes/hound/components/navigation/_with_dropdowns.html.erb +1 -105
- data/app/views/railsui/themes/hound/components/navigation/_with_search.html.erb +1 -41
- data/app/views/railsui/themes/hound/components/pagination/_contained.html.erb +0 -31
- data/app/views/railsui/themes/hound/components/pagination/_minimal.html.erb +0 -27
- data/app/views/railsui/themes/hound/components/pagination/_pagy.html.erb +47 -72
- data/app/views/railsui/themes/hound/components/tab/_base.html.erb +1 -18
- data/app/views/railsui/themes/hound/components/tab/_pills.html.erb +1 -18
- data/app/views/railsui/themes/hound/components/tab/_rounded.html.erb +1 -18
- data/app/views/railsui/themes/hound/components/tab/_with_icons.html.erb +1 -26
- data/app/views/railsui/themes/hound/components/toast/_base.html.erb +0 -16
- data/app/views/railsui/themes/hound/components/tooltip/_base.html.erb +0 -3
- data/app/views/railsui/themes/hound/content/image/_object_contain.html.erb +0 -5
- data/app/views/railsui/themes/hound/content/image/_object_cover.html.erb +0 -5
- data/app/views/railsui/themes/hound/content/image/_object_fill.html.erb +0 -5
- data/app/views/railsui/themes/hound/content/image/_object_scale_down.html.erb +0 -5
- data/app/views/railsui/themes/hound/content/image/_responsive.html.erb +0 -4
- data/app/views/railsui/themes/hound/content/table/_bordered.html.erb +0 -21
- data/app/views/railsui/themes/hound/content/table/_borderless.html.erb +0 -21
- data/app/views/railsui/themes/hound/content/typography/_blockquote.html.erb +0 -9
- data/app/views/railsui/themes/hound/content/typography/_display_headings.html.erb +0 -9
- data/app/views/railsui/themes/hound/content/typography/_headings.html.erb +0 -12
- data/app/views/railsui/themes/hound/content/typography/_inline_formatting.html.erb +0 -20
- data/app/views/railsui/themes/hound/content/typography/_lead_paragraph.html.erb +0 -5
- data/app/views/railsui/themes/hound/content/typography/_lists.html.erb +0 -17
- data/app/views/railsui/themes/hound/content/typography/_paragraphs.html.erb +0 -4
- data/app/views/railsui/themes/hound/forms/_action_text.html.erb +0 -6
- data/app/views/railsui/themes/hound/forms/_checkbox.html.erb +0 -9
- data/app/views/railsui/themes/hound/forms/_form_builder.html.erb +487 -0
- data/app/views/railsui/themes/hound/forms/_input.html.erb +0 -93
- data/app/views/railsui/themes/hound/forms/_input_group.html.erb +0 -83
- data/app/views/railsui/themes/hound/forms/_radio.html.erb +0 -13
- data/app/views/railsui/themes/hound/forms/_select.html.erb +0 -16
- data/app/views/railsui/themes/hound/forms/_switch.html.erb +0 -9
- data/app/views/railsui/themes/hound/forms/_validation.html.erb +0 -15
- data/app/views/railsui/themes/hound/mailers/_layout.html.erb +1 -432
- data/app/views/railsui/themes/hound/mailers/_minimal.html.erb +1 -16
- data/app/views/railsui/themes/hound/mailers/_promotion.html.erb +1 -20
- data/app/views/railsui/themes/hound/mailers/_transactional.html.erb +1 -43
- data/app/views/railsui/themes/hound/mailers/devise/_confirmation_instructions.html.erb +1 -9
- data/app/views/railsui/themes/hound/mailers/devise/_email_changed.html.erb +1 -13
- data/app/views/railsui/themes/hound/mailers/devise/_password_changed.html.erb +1 -7
- data/app/views/railsui/themes/hound/mailers/devise/_reset_password_instructions.html.erb +1 -9
- data/app/views/railsui/themes/hound/mailers/devise/_unlock_instructions.html.erb +1 -9
- data/app/views/railsui/themes/hound/scaffolds/_edit.html.erb +1 -19
- data/app/views/railsui/themes/hound/scaffolds/_index.html.erb +1 -14
- data/app/views/railsui/themes/hound/scaffolds/_new.html.erb +1 -17
- data/app/views/railsui/themes/hound/scaffolds/_partial.html.erb +1 -17
- data/app/views/railsui/themes/hound/scaffolds/_show.html.erb +1 -20
- data/app/views/railsui/themes/shepherd/_forms.html.erb +5 -3
- data/app/views/railsui/themes/shepherd/_nav.html.erb +2 -0
- data/app/views/railsui/themes/shepherd/authentication/devise/_change_password.html.erb +1 -23
- data/app/views/railsui/themes/shepherd/authentication/devise/_confirmation.html.erb +1 -12
- data/app/views/railsui/themes/shepherd/authentication/devise/_edit.html.erb +1 -74
- data/app/views/railsui/themes/shepherd/authentication/devise/_overview.html.erb +2 -57
- data/app/views/railsui/themes/shepherd/authentication/devise/_reset_password.html.erb +1 -12
- data/app/views/railsui/themes/shepherd/authentication/devise/_signin.html.erb +1 -25
- data/app/views/railsui/themes/shepherd/authentication/devise/_signup.html.erb +1 -26
- data/app/views/railsui/themes/shepherd/authentication/devise/_unlocks.html.erb +1 -12
- data/app/views/railsui/themes/shepherd/authentication/static/_change_password.html.erb +1 -23
- data/app/views/railsui/themes/shepherd/authentication/static/_confirmation.html.erb +1 -12
- data/app/views/railsui/themes/shepherd/authentication/static/_edit.html.erb +1 -67
- data/app/views/railsui/themes/shepherd/authentication/static/_overview.html.erb +1 -56
- data/app/views/railsui/themes/shepherd/authentication/static/_reset_password.html.erb +1 -12
- data/app/views/railsui/themes/shepherd/authentication/static/_signin.html.erb +1 -24
- data/app/views/railsui/themes/shepherd/authentication/static/_signup.html.erb +1 -26
- data/app/views/railsui/themes/shepherd/authentication/static/_unlocks.html.erb +1 -16
- data/app/views/railsui/themes/shepherd/components/_toast.html.erb +0 -3
- data/app/views/railsui/themes/shepherd/components/accordion/_contained.html.erb +0 -28
- data/app/views/railsui/themes/shepherd/components/accordion/_flush.html.erb +0 -27
- data/app/views/railsui/themes/shepherd/components/alert/_dismissable.html.erb +0 -8
- data/app/views/railsui/themes/shepherd/components/alert/_with_accent_border.html.erb +0 -6
- data/app/views/railsui/themes/shepherd/components/alert/_with_actions.html.erb +0 -11
- data/app/views/railsui/themes/shepherd/components/alert/_with_description.html.erb +0 -7
- data/app/views/railsui/themes/shepherd/components/alert/_with_list.html.erb +0 -8
- data/app/views/railsui/themes/shepherd/components/avatar/_circle.html.erb +0 -12
- data/app/views/railsui/themes/shepherd/components/avatar/_rounded.html.erb +0 -12
- data/app/views/railsui/themes/shepherd/components/badge/_basic.html.erb +0 -22
- data/app/views/railsui/themes/shepherd/components/badge/_outline.html.erb +0 -22
- data/app/views/railsui/themes/shepherd/components/badge/_pill.html.erb +0 -22
- data/app/views/railsui/themes/shepherd/components/badge/_tag.html.erb +0 -52
- data/app/views/railsui/themes/shepherd/components/breadcrumb/_base.html.erb +0 -14
- data/app/views/railsui/themes/shepherd/components/breadcrumb/_contained.html.erb +0 -14
- data/app/views/railsui/themes/shepherd/components/button/_base.html.erb +0 -17
- data/app/views/railsui/themes/shepherd/components/button/_expanded.html.erb +0 -3
- data/app/views/railsui/themes/shepherd/components/button/_sizes.html.erb +0 -5
- data/app/views/railsui/themes/shepherd/components/card/_base.html.erb +0 -6
- data/app/views/railsui/themes/shepherd/components/card/_property_card.html.erb +0 -28
- data/app/views/railsui/themes/shepherd/components/card/_property_user_card.html.erb +0 -14
- data/app/views/railsui/themes/shepherd/components/card/_user_card_with_actions.html.erb +0 -12
- data/app/views/railsui/themes/shepherd/components/card/_with_action.html.erb +0 -7
- data/app/views/railsui/themes/shepherd/components/card/_with_header.html.erb +0 -7
- data/app/views/railsui/themes/shepherd/components/combobox/_base.html.erb +0 -40
- data/app/views/railsui/themes/shepherd/components/datalist/_booking_list.html.erb +0 -45
- data/app/views/railsui/themes/shepherd/components/datalist/_property_list.html.erb +0 -47
- data/app/views/railsui/themes/shepherd/components/dropdown/_base.html.erb +0 -10
- data/app/views/railsui/themes/shepherd/components/dropdown/_right_aligned.html.erb +0 -13
- data/app/views/railsui/themes/shepherd/components/dropdown/_with_dividers.html.erb +0 -14
- data/app/views/railsui/themes/shepherd/components/dropdown/_with_menu_icons.html.erb +0 -16
- data/app/views/railsui/themes/shepherd/components/flash/_alert.html.erb +0 -5
- data/app/views/railsui/themes/shepherd/components/flash/_dynamic.html.erb +0 -5
- data/app/views/railsui/themes/shepherd/components/flash/_notice.html.erb +0 -5
- data/app/views/railsui/themes/shepherd/components/modal/_base.html.erb +0 -12
- data/app/views/railsui/themes/shepherd/components/modal/_centered_dual_action.html.erb +0 -16
- data/app/views/railsui/themes/shepherd/components/modal/_dismiss_icon.html.erb +0 -23
- data/app/views/railsui/themes/shepherd/components/modal/_single_action.html.erb +0 -14
- data/app/views/railsui/themes/shepherd/components/modal/_with_form.html.erb +0 -23
- data/app/views/railsui/themes/shepherd/components/navigation/_base.html.erb +0 -81
- data/app/views/railsui/themes/shepherd/components/navigation/_logged_out.html.erb +0 -22
- data/app/views/railsui/themes/shepherd/components/navigation/_with_dropdowns.html.erb +0 -88
- data/app/views/railsui/themes/shepherd/components/navigation/_with_search.html.erb +1 -83
- data/app/views/railsui/themes/shepherd/components/pagination/_contained.html.erb +0 -31
- data/app/views/railsui/themes/shepherd/components/pagination/_dark.html.erb +0 -31
- data/app/views/railsui/themes/shepherd/components/pagination/_pagy.html.erb +53 -98
- data/app/views/railsui/themes/shepherd/components/pagination/_simple.html.erb +0 -27
- data/app/views/railsui/themes/shepherd/components/tab/_base.html.erb +1 -18
- data/app/views/railsui/themes/shepherd/components/tab/_pills.html.erb +1 -18
- data/app/views/railsui/themes/shepherd/components/tab/_rounded.html.erb +1 -18
- data/app/views/railsui/themes/shepherd/components/tab/_with_icons.html.erb +1 -26
- data/app/views/railsui/themes/shepherd/components/toast/_base.html.erb +0 -16
- data/app/views/railsui/themes/shepherd/components/tooltip/_base.html.erb +0 -3
- data/app/views/railsui/themes/shepherd/content/_image_old.html.erb +0 -20
- data/app/views/railsui/themes/shepherd/content/image/_object_contain.html.erb +0 -5
- data/app/views/railsui/themes/shepherd/content/image/_object_cover.html.erb +0 -5
- data/app/views/railsui/themes/shepherd/content/image/_object_fill.html.erb +0 -5
- data/app/views/railsui/themes/shepherd/content/image/_object_scale_down.html.erb +0 -5
- data/app/views/railsui/themes/shepherd/content/image/_responsive.html.erb +0 -4
- data/app/views/railsui/themes/shepherd/content/table/_bordered.html.erb +0 -21
- data/app/views/railsui/themes/shepherd/content/table/_borderless.html.erb +0 -21
- data/app/views/railsui/themes/shepherd/content/typography/_blockquote.html.erb +0 -9
- data/app/views/railsui/themes/shepherd/content/typography/_display_headings.html.erb +0 -9
- data/app/views/railsui/themes/shepherd/content/typography/_headings.html.erb +0 -15
- data/app/views/railsui/themes/shepherd/content/typography/_inline_formatting.html.erb +0 -21
- data/app/views/railsui/themes/shepherd/content/typography/_lead_paragraph.html.erb +0 -5
- data/app/views/railsui/themes/shepherd/content/typography/_lists.html.erb +0 -17
- data/app/views/railsui/themes/shepherd/content/typography/_paragraphs.html.erb +0 -4
- data/app/views/railsui/themes/shepherd/forms/_action_text.html.erb +0 -6
- data/app/views/railsui/themes/shepherd/forms/_checkbox.html.erb +0 -9
- data/app/views/railsui/themes/shepherd/forms/_form_builder.html.erb +487 -0
- data/app/views/railsui/themes/shepherd/forms/_input.html.erb +0 -119
- data/app/views/railsui/themes/shepherd/forms/_input_group.html.erb +0 -81
- data/app/views/railsui/themes/shepherd/forms/_radio.html.erb +0 -13
- data/app/views/railsui/themes/shepherd/forms/_select.html.erb +0 -16
- data/app/views/railsui/themes/shepherd/forms/_switch.html.erb +0 -9
- data/app/views/railsui/themes/shepherd/forms/_validation.html.erb +0 -11
- data/app/views/railsui/themes/shepherd/mailers/_layout.html.erb +1 -493
- data/app/views/railsui/themes/shepherd/mailers/_minimal.html.erb +1 -16
- data/app/views/railsui/themes/shepherd/mailers/_promotion.html.erb +1 -20
- data/app/views/railsui/themes/shepherd/mailers/_transactional.html.erb +1 -43
- data/app/views/railsui/themes/shepherd/mailers/devise/_confirmation_instructions.html.erb +1 -9
- data/app/views/railsui/themes/shepherd/mailers/devise/_email_changed.html.erb +1 -12
- data/app/views/railsui/themes/shepherd/mailers/devise/_password_changed.html.erb +1 -7
- data/app/views/railsui/themes/shepherd/mailers/devise/_reset_password_instructions.html.erb +1 -9
- data/app/views/railsui/themes/shepherd/mailers/devise/_unlock_instructions.html.erb +1 -9
- data/app/views/railsui/themes/shepherd/scaffolds/_edit.html.erb +1 -19
- data/app/views/railsui/themes/shepherd/scaffolds/_index.html.erb +1 -11
- data/app/views/railsui/themes/shepherd/scaffolds/_new.html.erb +1 -17
- data/app/views/railsui/themes/shepherd/scaffolds/_partial.html.erb +1 -17
- data/app/views/railsui/themes/shepherd/scaffolds/_show.html.erb +1 -18
- data/config/pages.yml +103 -0
- data/config/routes.rb +6 -5
- data/config/theme.yml +2 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/auth-bg.jpg +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog-feature.jpg +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog1.jpg +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog2.jpg +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog3.jpg +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog4.jpg +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog5.jpg +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog6.jpg +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog7.jpg +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog8.jpg +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/blog9.jpg +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/copy.svg +6 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/pencil.svg +1 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/scroll-text.svg +9 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/facebook.svg +1 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/github.svg +1 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/google.svg +1 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/instagram.svg +1 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/linkedin.svg +1 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/twitter.svg +1 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/x.svg +1 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/social/youtube.svg +1 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/stethoscope.svg +8 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/icons/test-tubes.svg +11 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/logo.svg +10 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/android-chrome-192x192.png +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/android-chrome-512x512.png +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/apple-touch-icon.png +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/favicon-16x16.png +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/favicon-32x32.png +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/favicon.ico +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/favicon.svg +20 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/opengraph-mark.jpg +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/opengraph.jpg +0 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/meta/site.webmanifest +19 -0
- data/lib/generators/railsui/install/templates/themes/corgie/images/railsui/railsui.svg +3 -0
- data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/character_count_controller.js +134 -0
- data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/chat_controller.js +45 -0
- data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/help_search_controller.js +333 -0
- data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/highlight_controller.js +13 -0
- data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/markdown_controller.js +106 -0
- data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/search_controller.js +311 -0
- data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/sidebar_controller.js +105 -0
- data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/snippet_controller.js +223 -0
- data/lib/generators/railsui/install/templates/themes/corgie/mail/railsui_mailer/minimal.html.erb +21 -0
- data/lib/generators/railsui/install/templates/themes/corgie/mail/railsui_mailer/minimal.text.erb +9 -0
- data/lib/generators/railsui/install/templates/themes/corgie/mail/railsui_mailer/promotion.html.erb +23 -0
- data/lib/generators/railsui/install/templates/themes/corgie/mail/railsui_mailer/promotion.text.erb +9 -0
- data/lib/generators/railsui/install/templates/themes/corgie/mail/railsui_mailer/transactional.html.erb +55 -0
- data/lib/generators/railsui/install/templates/themes/corgie/mail/railsui_mailer/transactional.text.erb +22 -0
- data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/actiontext.css +173 -0
- data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/blog.css +29 -0
- data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/buttons.css +49 -0
- data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/card.css +9 -0
- data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/chat.css +27 -0
- data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/code.css +233 -0
- data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/dropdown.css +9 -0
- data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/forms.css +321 -0
- data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/sidebar.css +15 -0
- data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/tailwind.config.js +24 -0
- data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/theme.css +77 -0
- data/lib/generators/railsui/install/templates/themes/corgie/stylesheets/railsui/typography.css +47 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui.html.erb +31 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui_admin.html.erb +30 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui_auth.html.erb +50 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui_mailer.html.erb +503 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/about.html.erb +278 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/blog.html.erb +258 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/blog_category.html.erb +261 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/blog_show.html.erb +429 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/chat_new.html.erb +68 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/chat_show.html.erb +152 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/features.html.erb +356 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/help.html.erb +123 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/home.html.erb +252 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/pricing.html.erb +397 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/privacy.html.erb +140 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/signin.html.erb +38 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/signup.html.erb +48 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/terms.html.erb +182 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_account_dropdown.html.erb +46 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_email_action.html.erb +15 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_email_callout.html.erb +7 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_email_spacer.html.erb +7 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_error_messages.html.erb +10 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_faq.html.erb +9 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_flash.html.erb +11 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_fonts.html.erb +7 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_footer.html.erb +72 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_header.html.erb +15 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_meta.html.erb +90 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_nav.html.erb +3 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_railsui_head.html.erb +4 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_search.html.erb +32 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_sidebar.html.erb +7 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/_waves.html.erb +47 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/blog/_article.html.erb +39 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/blog/_pagination.html.erb +21 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_disclaimer.html.erb +4 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_form.html.erb +62 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_header.html.erb +47 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_history.html.erb +36 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_key_legend.html.erb +11 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_link.html.erb +17 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_message.html.erb +69 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_model_select.html.erb +55 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/common/_cta_section.html.erb +16 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/common/_feature_card.html.erb +23 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/common/_feature_check_item.html.erb +6 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/common/_social_auth_buttons.html.erb +22 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/help/_categories.html.erb +82 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/help/_faq.html.erb +45 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/help/_quick_actions.html.erb +46 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/marketing/_career.html.erb +9 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/marketing/_nav.html.erb +57 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/marketing/_team_member_card.html.erb +16 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/_modal.html.erb +84 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/_nav_item.html.erb +14 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_billing.html.erb +120 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_data_controls.html.erb +69 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_general.html.erb +92 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_notifications.html.erb +102 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_personalization.html.erb +100 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_security.html.erb +98 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/settings/panels/_title.html.erb +5 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/sidebar/_actions.html.erb +39 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/sidebar/_header.html.erb +40 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/sidebar/_history.html.erb +36 -0
- data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/sidebar/_link.html.erb +23 -0
- data/lib/generators/railsui/install/templates/themes/hound/stylesheets/railsui/forms.css +18 -4
- data/lib/generators/railsui/install/templates/themes/hound/stylesheets/railsui/theme.css +3 -2
- data/lib/generators/railsui/install/templates/themes/shepherd/stylesheets/railsui/forms.css +12 -2
- data/lib/generators/railsui/scaffold/templates/themes/corgie/views/_form.html.erb.tt +52 -0
- data/lib/generators/railsui/scaffold/templates/themes/corgie/views/edit.html.erb.tt +25 -0
- data/lib/generators/railsui/scaffold/templates/themes/corgie/views/index.html.erb.tt +12 -0
- data/lib/generators/railsui/scaffold/templates/themes/corgie/views/new.html.erb.tt +22 -0
- data/lib/generators/railsui/scaffold/templates/themes/corgie/views/partial.html.erb.tt +22 -0
- data/lib/generators/railsui/scaffold/templates/themes/corgie/views/show.html.erb.tt +24 -0
- data/lib/generators/railsui/scaffold/templates/themes/hound/views/_form.html.erb.tt +29 -24
- data/lib/generators/railsui/scaffold/templates/themes/shepherd/views/_form.html.erb.tt +28 -26
- data/lib/railsui/configuration.rb +22 -21
- data/lib/railsui/engine.rb +26 -20
- data/lib/railsui/form_builder.rb +307 -0
- data/lib/railsui/pages.rb +14 -3
- data/lib/railsui/theme_helper.rb +8 -8
- data/lib/railsui/theme_setup.rb +83 -49
- data/lib/railsui/themes.rb +3 -4
- data/lib/railsui/version.rb +1 -1
- data/lib/railsui.rb +9 -6
- data/lib/tasks/install.rake +1 -1
- data/lib/tasks/pages.rake +1 -1
- data/lib/tasks/stimulus.rake +1 -1
- metadata +287 -5
- data/.standard.yml +0 -3
- data/CHANGELOG.md +0 -9
- 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(
|
4
|
-
VIEWS_FOLDER = Rails.root.join(
|
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
|
-
|
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
|
data/lib/railsui/theme_helper.rb
CHANGED
@@ -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
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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 = {}, &
|
45
|
+
def conditional_link_to(route_helper, options = {}, &)
|
46
46
|
if Rails.application.routes.url_helpers.method_defined?(route_helper)
|
47
|
-
link_to
|
47
|
+
link_to(send(route_helper), options, &)
|
48
48
|
else
|
49
|
-
content_tag(:div, options, &
|
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 || ""
|
data/lib/railsui/theme_setup.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
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,
|
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}",
|
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(
|
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(
|
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
|
-
|
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,
|
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(
|
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,
|
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",
|
148
|
-
|
149
|
-
|
150
|
-
|
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",
|
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
|
-
|
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,
|
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(
|
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(
|
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.
|
296
|
+
File.write(routes_file, updated_content)
|
263
297
|
end
|
264
298
|
|
265
299
|
# Pages
|
266
|
-
def copy_railsui_page_controller(
|
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(
|
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
|
-
|
283
|
-
|
316
|
+
return if File.read(layout_file).include?("<%= railsui_head %>")
|
317
|
+
|
318
|
+
content = <<-ERB
|
284
319
|
<%= railsui_head %>
|
285
|
-
|
286
|
-
|
287
|
-
end
|
320
|
+
ERB
|
321
|
+
insert_into_file layout_file, "\n#{content}", before: "</head>"
|
288
322
|
end
|
289
323
|
|
290
|
-
def copy_railsui_launcher(
|
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
|
-
|
295
|
-
|
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
|
-
|
298
|
-
|
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!(
|
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.
|
367
|
+
File.write(file, route_content)
|
334
368
|
end
|
335
369
|
end
|
336
370
|
end
|