ultimate_turbo_modal 2.1.2 → 2.2.2

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 (118) hide show
  1. checksums.yaml +4 -4
  2. data/.tool-versions +1 -1
  3. data/CHANGELOG.md +17 -0
  4. data/CLAUDE.md +188 -2
  5. data/Gemfile.lock +1 -1
  6. data/README.md +22 -0
  7. data/VERSION +1 -1
  8. data/javascript/index.js +12 -3
  9. data/javascript/modal_controller.js +16 -4
  10. data/javascript/package.json +2 -1
  11. data/javascript/styles/vanilla.css +86 -0
  12. data/lib/generators/ultimate_turbo_modal/base.rb +117 -0
  13. data/lib/generators/ultimate_turbo_modal/install_generator.rb +46 -95
  14. data/lib/generators/ultimate_turbo_modal/templates/flavors/custom.rb +29 -2
  15. data/lib/generators/ultimate_turbo_modal/templates/flavors/tailwind.rb +30 -3
  16. data/lib/generators/ultimate_turbo_modal/templates/flavors/tailwind3.rb +29 -2
  17. data/lib/generators/ultimate_turbo_modal/templates/flavors/vanilla.rb +31 -3
  18. data/lib/generators/ultimate_turbo_modal/update_generator.rb +109 -0
  19. data/lib/ultimate_turbo_modal/base.rb +35 -14
  20. data/lib/ultimate_turbo_modal.rb +2 -0
  21. data/script/build_and_release.sh +20 -7
  22. metadata +8 -99
  23. data/demo-app/.gitattributes +0 -7
  24. data/demo-app/.gitignore +0 -34
  25. data/demo-app/.ruby-version +0 -1
  26. data/demo-app/.tool-versions +0 -2
  27. data/demo-app/Gemfile +0 -41
  28. data/demo-app/Gemfile.lock +0 -248
  29. data/demo-app/Procfile.dev +0 -3
  30. data/demo-app/README.md +0 -15
  31. data/demo-app/Rakefile +0 -6
  32. data/demo-app/app/assets/builds/.keep +0 -0
  33. data/demo-app/app/assets/images/.keep +0 -0
  34. data/demo-app/app/assets/stylesheets/application.css +0 -42
  35. data/demo-app/app/controllers/application_controller.rb +0 -10
  36. data/demo-app/app/controllers/concerns/.keep +0 -0
  37. data/demo-app/app/controllers/concerns/set_flavor.rb +0 -10
  38. data/demo-app/app/controllers/hide_from_backends_controller.rb +0 -34
  39. data/demo-app/app/controllers/modal_controller.rb +0 -11
  40. data/demo-app/app/controllers/posts_controller.rb +0 -69
  41. data/demo-app/app/controllers/welcome_controller.rb +0 -2
  42. data/demo-app/app/helpers/application_helper.rb +0 -9
  43. data/demo-app/app/javascript/application.js +0 -4
  44. data/demo-app/app/javascript/controllers/application.js +0 -13
  45. data/demo-app/app/javascript/controllers/dark_mode_controller.js +0 -28
  46. data/demo-app/app/javascript/controllers/flash_controller.js +0 -9
  47. data/demo-app/app/javascript/controllers/hello_controller.js +0 -7
  48. data/demo-app/app/javascript/controllers/index.js +0 -15
  49. data/demo-app/app/models/application_record.rb +0 -3
  50. data/demo-app/app/models/concerns/.keep +0 -0
  51. data/demo-app/app/models/post.rb +0 -4
  52. data/demo-app/app/views/hide_from_backends/_notice.html.erb +0 -10
  53. data/demo-app/app/views/hide_from_backends/create.turbo_stream.erb +0 -2
  54. data/demo-app/app/views/hide_from_backends/new.html.erb +0 -30
  55. data/demo-app/app/views/layouts/application.html.erb +0 -40
  56. data/demo-app/app/views/modal/index.html.erb +0 -45
  57. data/demo-app/app/views/modal/show.html.erb +0 -39
  58. data/demo-app/app/views/posts/_form.html.erb +0 -36
  59. data/demo-app/app/views/posts/_post.html.erb +0 -9
  60. data/demo-app/app/views/posts/edit.html.erb +0 -9
  61. data/demo-app/app/views/posts/index.html.erb +0 -14
  62. data/demo-app/app/views/posts/new.html.erb +0 -3
  63. data/demo-app/app/views/posts/show.html.erb +0 -21
  64. data/demo-app/app/views/shared/_flash.html.erb +0 -13
  65. data/demo-app/app/views/welcome/index.html.erb +0 -19
  66. data/demo-app/bin/bundle +0 -109
  67. data/demo-app/bin/dev +0 -18
  68. data/demo-app/bin/rails +0 -4
  69. data/demo-app/bin/rake +0 -4
  70. data/demo-app/bin/setup +0 -34
  71. data/demo-app/config/application.rb +0 -43
  72. data/demo-app/config/boot.rb +0 -3
  73. data/demo-app/config/credentials.yml.enc +0 -1
  74. data/demo-app/config/database.yml +0 -25
  75. data/demo-app/config/environment.rb +0 -14
  76. data/demo-app/config/environments/development.rb +0 -51
  77. data/demo-app/config/environments/production.rb +0 -67
  78. data/demo-app/config/environments/test.rb +0 -42
  79. data/demo-app/config/initializers/assets.rb +0 -7
  80. data/demo-app/config/initializers/content_security_policy.rb +0 -25
  81. data/demo-app/config/initializers/filter_parameter_logging.rb +0 -8
  82. data/demo-app/config/initializers/inflections.rb +0 -14
  83. data/demo-app/config/initializers/new_framework_defaults_8_0.rb +0 -30
  84. data/demo-app/config/initializers/permissions_policy.rb +0 -11
  85. data/demo-app/config/initializers/ultimate_turbo_modal.rb +0 -12
  86. data/demo-app/config/initializers/ultimate_turbo_modal_tailwind.rb +0 -21
  87. data/demo-app/config/initializers/ultimate_turbo_modal_vanilla.rb +0 -21
  88. data/demo-app/config/locales/en.yml +0 -33
  89. data/demo-app/config/puma.rb +0 -41
  90. data/demo-app/config/routes.rb +0 -9
  91. data/demo-app/config.ru +0 -6
  92. data/demo-app/db/migrate/20230331002502_create_posts.rb +0 -10
  93. data/demo-app/db/migrate/20231031012703_add_post.rb +0 -9
  94. data/demo-app/db/migrate/20231128141054_add_publish_on_to_posts.rb +0 -5
  95. data/demo-app/db/schema.rb +0 -22
  96. data/demo-app/lib/assets/.keep +0 -0
  97. data/demo-app/lib/tasks/.keep +0 -0
  98. data/demo-app/log/.keep +0 -0
  99. data/demo-app/package.json +0 -28
  100. data/demo-app/postcss.config.js +0 -7
  101. data/demo-app/public/400.html +0 -114
  102. data/demo-app/public/404.html +0 -114
  103. data/demo-app/public/406-unsupported-browser.html +0 -114
  104. data/demo-app/public/422.html +0 -114
  105. data/demo-app/public/500.html +0 -114
  106. data/demo-app/public/apple-touch-icon-precomposed.png +0 -0
  107. data/demo-app/public/apple-touch-icon.png +0 -0
  108. data/demo-app/public/favicon.ico +0 -0
  109. data/demo-app/public/icon.png +0 -0
  110. data/demo-app/public/icon.svg +0 -3
  111. data/demo-app/public/img/bootstrap-logo-shadow.png +0 -0
  112. data/demo-app/public/img/unicat.jpg +0 -0
  113. data/demo-app/public/img/vanilla.png +0 -0
  114. data/demo-app/public/robots.txt +0 -1
  115. data/demo-app/tmp/.keep +0 -0
  116. data/demo-app/tmp/pids/.keep +0 -0
  117. data/demo-app/vendor/.keep +0 -0
  118. data/demo-app/yarn.lock +0 -1035
data/demo-app/bin/setup DELETED
@@ -1,34 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require "fileutils"
3
-
4
- APP_ROOT = File.expand_path("..", __dir__)
5
-
6
- def system!(*args)
7
- system(*args, exception: true)
8
- end
9
-
10
- FileUtils.chdir APP_ROOT do
11
- # This script is a way to set up or update your development environment automatically.
12
- # This script is idempotent, so that you can run it at any time and get an expectable outcome.
13
- # Add necessary setup steps to this file.
14
-
15
- puts "== Installing dependencies =="
16
- system("bundle check") || system!("bundle install")
17
-
18
- # puts "\n== Copying sample files =="
19
- # unless File.exist?("config/database.yml")
20
- # FileUtils.cp "config/database.yml.sample", "config/database.yml"
21
- # end
22
-
23
- puts "\n== Preparing database =="
24
- system! "bin/rails db:prepare"
25
-
26
- puts "\n== Removing old logs and tempfiles =="
27
- system! "bin/rails log:clear tmp:clear"
28
-
29
- unless ARGV.include?("--skip-server")
30
- puts "\n== Starting development server =="
31
- STDOUT.flush # flush the output before exec(2) so that it displays
32
- exec "bin/dev"
33
- end
34
- end
@@ -1,43 +0,0 @@
1
- require_relative "boot"
2
-
3
- require "rails"
4
- # Pick the frameworks you want:
5
- require "active_model/railtie"
6
- # require "active_job/railtie"
7
- require "active_record/railtie"
8
- # require "active_storage/engine"
9
- require "action_controller/railtie"
10
- # require "action_mailer/railtie"
11
- # require "action_mailbox/engine"
12
- # require "action_text/engine"
13
- require "action_view/railtie"
14
- # require "action_cable/engine"
15
- # require "rails/test_unit/railtie"
16
-
17
- # Require the gems listed in Gemfile, including any gems
18
- # you've limited to :test, :development, or :production.
19
- Bundler.require(*Rails.groups)
20
-
21
- module UltimateTurboModal
22
- class Application < Rails::Application
23
- config.autoload_paths << Rails.root.join("app", "views", "components")
24
- # Initialize configuration defaults for originally generated Rails version.
25
- config.load_defaults 7.0
26
-
27
- # Please, add to the `ignore` list any other `lib` subdirectories that do
28
- # not contain `.rb` files, or that should not be reloaded or eager loaded.
29
- # Common ones are `templates`, `generators`, or `middleware`, for example.
30
- config.autoload_lib(ignore: %w[assets tasks])
31
-
32
- # Configuration for the application, engines, and railties goes here.
33
- #
34
- # These settings can be overridden in specific environments using the files
35
- # in config/environments, which are processed later.
36
- #
37
- # config.time_zone = "Central Time (US & Canada)"
38
- # config.eager_load_paths << Rails.root.join("extras")
39
-
40
- # Don't generate system test files.
41
- config.generators.system_tests = nil
42
- end
43
- end
@@ -1,3 +0,0 @@
1
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
2
-
3
- require "bundler/setup" # Set up gems listed in the Gemfile.
@@ -1 +0,0 @@
1
- a5bdfDeJOIdOPg9vQawREE40DSR+QV0uJ08GB8VeEzc1lxUuV4q8V0kkjJyVIyjreqrt7U3J4c0K1B0n1Au/Z/K2b1t3tfOlQJe1WdMdg7UNrPCrXEaXorEj6N95D1fiMWmqf16pRwbzKASHXCt8JSq1kT1UQnUpkk70mHKVaugRjYNKKYEpyFopSCnP26rOWtixmD0R0w6UUheb0hdmfP3wyiKmXnSxUsvGl04bWvFqFz85A4jRnj+Ou7UFFprtvC0fO/yVpkjFWh6otqZVd9a0WW1O6bAbFwJ57PWA3k5OBsbkv+o08LfWNpgykOSSyL3ha+fSirdGyMWhI9pIU+s5zYKjn+puRvy0F9KUbFzxsdyD60BxkkLxhS8y4LFEO4ilB4GuzLqixh5EZ0MT4YXVgARv89VGQIc+--pKR/h8Ok35Flu/uI--4gHuVGG4C07WVcLYRE71iA==
@@ -1,25 +0,0 @@
1
- # SQLite. Versions 3.8.0 and up are supported.
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem "sqlite3"
6
- #
7
- default: &default
8
- adapter: sqlite3
9
- pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
- timeout: 5000
11
-
12
- development:
13
- <<: *default
14
- database: db/development.sqlite3
15
-
16
- # Warning: The database defined as "test" will be erased and
17
- # re-generated from your development database when you run "rake".
18
- # Do not set this db to the same as development or production.
19
- test:
20
- <<: *default
21
- database: db/test.sqlite3
22
-
23
- production:
24
- <<: *default
25
- database: db/production.sqlite3
@@ -1,14 +0,0 @@
1
- # Load the Rails application.
2
- require_relative "application"
3
-
4
- # Initialize the Rails application.
5
- Rails.application.initialize!
6
-
7
- begin
8
- # Load seeds on bootup
9
- unless Post.any?
10
- puts "Seeding database..."
11
- Rails.application.load_seed
12
- end
13
- rescue ActiveRecord::StatementInvalid
14
- end
@@ -1,51 +0,0 @@
1
- require "active_support/core_ext/integer/time"
2
-
3
- Rails.application.configure do
4
- # Settings specified here will take precedence over those in config/application.rb.
5
-
6
- # Make code changes take effect immediately without server restart.
7
- config.enable_reloading = true
8
-
9
- # Do not eager load code on boot.
10
- config.eager_load = false
11
-
12
- # Show full error reports.
13
- config.consider_all_requests_local = true
14
-
15
- # Enable server timing.
16
- config.server_timing = true
17
-
18
- # Enable/disable Action Controller caching. By default Action Controller caching is disabled.
19
- # Run rails dev:cache to toggle Action Controller caching.
20
- if Rails.root.join("tmp/caching-dev.txt").exist?
21
- config.action_controller.perform_caching = true
22
- config.action_controller.enable_fragment_cache_logging = true
23
- config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
24
- else
25
- config.action_controller.perform_caching = false
26
- end
27
-
28
- # Change to :null_store to avoid any caching.
29
- config.cache_store = :memory_store
30
-
31
- # Print deprecation notices to the Rails logger.
32
- config.active_support.deprecation = :log
33
-
34
- # Raise an error on page load if there are pending migrations.
35
- config.active_record.migration_error = :page_load
36
-
37
- # Highlight code that triggered database queries in logs.
38
- config.active_record.verbose_query_logs = true
39
-
40
- # Append comments with runtime information tags to SQL queries in logs.
41
- config.active_record.query_log_tags_enabled = true
42
-
43
- # Raises error for missing translations.
44
- # config.i18n.raise_on_missing_translations = true
45
-
46
- # Annotate rendered view with file names.
47
- config.action_view.annotate_rendered_view_with_filenames = true
48
-
49
- # Raise error when a before_action's only/except options reference missing actions.
50
- config.action_controller.raise_on_missing_callback_actions = true
51
- end
@@ -1,67 +0,0 @@
1
- require "active_support/core_ext/integer/time"
2
-
3
- Rails.application.configure do
4
- # Settings specified here will take precedence over those in config/application.rb.
5
-
6
- # Code is not reloaded between requests.
7
- config.enable_reloading = false
8
-
9
- # Eager load code on boot for better performance and memory savings (ignored by Rake tasks).
10
- config.eager_load = true
11
-
12
- # Full error reports are disabled.
13
- config.consider_all_requests_local = false
14
-
15
- # Turn on fragment caching in view templates.
16
- config.action_controller.perform_caching = true
17
-
18
- # Cache assets for far-future expiry since they are all digest stamped.
19
- config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }
20
-
21
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
22
- # config.asset_host = "http://assets.example.com"
23
-
24
- # Assume all access to the app is happening through a SSL-terminating reverse proxy.
25
- config.assume_ssl = true
26
-
27
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
28
- config.force_ssl = true
29
-
30
- # Skip http-to-https redirect for the default health check endpoint.
31
- # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
32
-
33
- # Log to STDOUT with the current request id as a default log tag.
34
- config.log_tags = [ :request_id ]
35
- config.logger = ActiveSupport::TaggedLogging.logger(STDOUT)
36
-
37
- # Change to "debug" to log everything (including potentially personally-identifiable information!)
38
- config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
39
-
40
- # Prevent health checks from clogging up the logs.
41
- config.silence_healthcheck_path = "/up"
42
-
43
- # Don't log any deprecations.
44
- config.active_support.report_deprecations = false
45
-
46
- # Replace the default in-process memory cache store with a durable alternative.
47
- # config.cache_store = :mem_cache_store
48
-
49
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
50
- # the I18n.default_locale when a translation cannot be found).
51
- config.i18n.fallbacks = true
52
-
53
- # Do not dump schema after migrations.
54
- config.active_record.dump_schema_after_migration = false
55
-
56
- # Only use :id for inspections in production.
57
- config.active_record.attributes_for_inspect = [ :id ]
58
-
59
- # Enable DNS rebinding protection and other `Host` header attacks.
60
- # config.hosts = [
61
- # "example.com", # Allow requests from example.com
62
- # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
63
- # ]
64
- #
65
- # Skip DNS rebinding protection for the default health check endpoint.
66
- # config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
67
- end
@@ -1,42 +0,0 @@
1
- # The test environment is used exclusively to run your application's
2
- # test suite. You never need to work with it otherwise. Remember that
3
- # your test database is "scratch space" for the test suite and is wiped
4
- # and recreated between test runs. Don't rely on the data there!
5
-
6
- Rails.application.configure do
7
- # Settings specified here will take precedence over those in config/application.rb.
8
-
9
- # While tests run files are not watched, reloading is not necessary.
10
- config.enable_reloading = false
11
-
12
- # Eager loading loads your entire application. When running a single test locally,
13
- # this is usually not necessary, and can slow down your test suite. However, it's
14
- # recommended that you enable it in continuous integration systems to ensure eager
15
- # loading is working properly before deploying your code.
16
- config.eager_load = ENV["CI"].present?
17
-
18
- # Configure public file server for tests with cache-control for performance.
19
- config.public_file_server.headers = { "cache-control" => "public, max-age=3600" }
20
-
21
- # Show full error reports.
22
- config.consider_all_requests_local = true
23
- config.cache_store = :null_store
24
-
25
- # Render exception templates for rescuable exceptions and raise for other exceptions.
26
- config.action_dispatch.show_exceptions = :rescuable
27
-
28
- # Disable request forgery protection in test environment.
29
- config.action_controller.allow_forgery_protection = false
30
-
31
- # Print deprecation notices to the stderr.
32
- config.active_support.deprecation = :stderr
33
-
34
- # Raises error for missing translations.
35
- # config.i18n.raise_on_missing_translations = true
36
-
37
- # Annotate rendered view with file names.
38
- # config.action_view.annotate_rendered_view_with_filenames = true
39
-
40
- # Raise error when a before_action's only/except options reference missing actions.
41
- config.action_controller.raise_on_missing_callback_actions = true
42
- end
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Version of your assets, change this if you want to expire all your assets.
4
- Rails.application.config.assets.version = "1.0"
5
-
6
- # Add additional assets to the asset load path.
7
- # Rails.application.config.assets.paths << Emoji.images_path
@@ -1,25 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Define an application-wide content security policy.
4
- # See the Securing Rails Applications Guide for more information:
5
- # https://guides.rubyonrails.org/security.html#content-security-policy-header
6
-
7
- # Rails.application.configure do
8
- # config.content_security_policy do |policy|
9
- # policy.default_src :self, :https
10
- # policy.font_src :self, :https, :data
11
- # policy.img_src :self, :https, :data
12
- # policy.object_src :none
13
- # policy.script_src :self, :https
14
- # policy.style_src :self, :https
15
- # # Specify URI for violation reports
16
- # # policy.report_uri "/csp-violation-report-endpoint"
17
- # end
18
- #
19
- # # Generate session nonces for permitted importmap, inline scripts, and inline styles.
20
- # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21
- # config.content_security_policy_nonce_directives = %w(script-src style-src)
22
- #
23
- # # Report violations without enforcing the policy.
24
- # # config.content_security_policy_report_only = true
25
- # end
@@ -1,8 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
4
- # Use this to limit dissemination of sensitive information.
5
- # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
6
- Rails.application.config.filter_parameters += [
7
- :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc
8
- ]
@@ -1,14 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format. Inflections
4
- # are locale specific, and you may define rules for as many different
5
- # locales as you wish. All of these examples are active by default:
6
- # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
- # inflect.plural /^(ox)$/i, "\\1en"
8
- # inflect.singular /^(ox)en/i, "\\1"
9
- # inflect.irregular "person", "people"
10
- # inflect.uncountable %w( fish sheep )
11
- # end
12
-
13
- # These inflection rules are supported but not enabled by default:
14
- ActiveSupport::Inflector.inflections(:en) { |inflect| inflect.acronym "UI" }
@@ -1,30 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
- #
3
- # This file eases your Rails 8.0 framework defaults upgrade.
4
- #
5
- # Uncomment each configuration one by one to switch to the new default.
6
- # Once your application is ready to run with all new defaults, you can remove
7
- # this file and set the `config.load_defaults` to `8.0`.
8
- #
9
- # Read the Guide for Upgrading Ruby on Rails for more info on each option.
10
- # https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
11
-
12
- ###
13
- # Specifies whether `to_time` methods preserve the UTC offset of their receivers or preserves the timezone.
14
- # If set to `:zone`, `to_time` methods will use the timezone of their receivers.
15
- # If set to `:offset`, `to_time` methods will use the UTC offset.
16
- # If `false`, `to_time` methods will convert to the local system UTC offset instead.
17
- #++
18
- # Rails.application.config.active_support.to_time_preserves_timezone = :zone
19
-
20
- ###
21
- # When both `If-Modified-Since` and `If-None-Match` are provided by the client
22
- # only consider `If-None-Match` as specified by RFC 7232 Section 6.
23
- # If set to `false` both conditions need to be satisfied.
24
- #++
25
- # Rails.application.config.action_dispatch.strict_freshness = true
26
-
27
- ###
28
- # Set `Regexp.timeout` to `1`s by default to improve security over Regexp Denial-of-Service attacks.
29
- #++
30
- # Regexp.timeout = 1
@@ -1,11 +0,0 @@
1
- # Define an application-wide HTTP permissions policy. For further
2
- # information see https://developers.google.com/web/updates/2018/06/feature-policy
3
- #
4
- # Rails.application.config.permissions_policy do |f|
5
- # f.camera :none
6
- # f.gyroscope :none
7
- # f.microphone :none
8
- # f.usb :none
9
- # f.fullscreen :self
10
- # f.payment :self, "https://secure.example.com"
11
- # end
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- UltimateTurboModal.configure do |config|
4
- config.flavor = :tailwind
5
- # config.close_button = true
6
- # config.advance = true
7
- # config.padding = true
8
- # config.header = true
9
- # config.header_divider = true
10
- # config.footer_divider = true
11
- # config.allowed_click_outside_selector = []
12
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Tailwind CSS v4
4
- module UltimateTurboModal::Flavors
5
- class Tailwind < UltimateTurboModal::Base
6
- DIV_DIALOG_CLASSES = "relative group z-50"
7
- DIV_OVERLAY_CLASSES = "fixed inset-0 bg-gray-900/70 transition-opacity dark:bg-gray-900/80"
8
- DIV_OUTER_CLASSES = "fixed inset-0 overflow-y-auto sm:max-w-[80%] md:max-w-3xl sm:mx-auto m-4"
9
- DIV_INNER_CLASSES = "flex min-h-full items-start justify-center pt-[10vh] sm:p-4"
10
- DIV_CONTENT_CLASSES = "relative transform max-h-screen overflow-hidden rounded-lg bg-white text-left shadow-lg transition-all sm:my-8 sm:max-w-3xl dark:bg-gray-800 dark:text-white"
11
- DIV_MAIN_CLASSES = "group-data-[padding=true]:p-4 group-data-[padding=true]:pt-2 overflow-y-auto max-h-[75vh]"
12
- DIV_HEADER_CLASSES = "flex justify-between items-center w-full py-4 rounded-t dark:border-gray-600 group-data-[header-divider=true]:border-b group-data-[header=false]:absolute"
13
- DIV_TITLE_CLASSES = "pl-4"
14
- DIV_TITLE_H_CLASSES = "group-data-[title=false]:hidden text-lg font-semibold text-gray-900 dark:text-white"
15
- DIV_FOOTER_CLASSES = "flex p-4 rounded-b dark:border-gray-600 group-data-[footer-divider=true]:border-t"
16
- BUTTON_CLOSE_CLASSES = "mr-4 group-data-[close-button=false]:hidden"
17
- BUTTON_CLOSE_SR_ONLY_CLASSES = "sr-only"
18
- CLOSE_BUTTON_TAG_CLASSES = "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white"
19
- ICON_CLOSE_CLASSES = "w-5 h-5"
20
- end
21
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Vanilla CSS
4
- module UltimateTurboModal::Flavors
5
- class Vanilla < UltimateTurboModal::Base
6
- DIV_DIALOG_CLASSES = "modal-container"
7
- DIV_OVERLAY_CLASSES = "modal-overlay"
8
- DIV_OUTER_CLASSES = "modal-outer"
9
- DIV_INNER_CLASSES = "modal-inner"
10
- DIV_CONTENT_CLASSES = "modal-content"
11
- DIV_MAIN_CLASSES = "modal-main"
12
- DIV_HEADER_CLASSES = "modal-header"
13
- DIV_TITLE_CLASSES = "modal-title"
14
- DIV_TITLE_H_CLASSES = "modal-title-h"
15
- DIV_FOOTER_CLASSES = "modal-footer"
16
- BUTTON_CLOSE_CLASSES = "modal-close"
17
- BUTTON_CLOSE_SR_ONLY_CLASSES = "sr-only"
18
- CLOSE_BUTTON_TAG_CLASSES = "modal-close-button"
19
- ICON_CLOSE_CLASSES = "modal-close-icon"
20
- end
21
- end
@@ -1,33 +0,0 @@
1
- # Files in the config/locales directory are used for internationalization
2
- # and are automatically loaded by Rails. If you want to use locales other
3
- # than English, add the necessary files in this directory.
4
- #
5
- # To use the locales, use `I18n.t`:
6
- #
7
- # I18n.t "hello"
8
- #
9
- # In views, this is aliased to just `t`:
10
- #
11
- # <%= t("hello") %>
12
- #
13
- # To use a different locale, set it with `I18n.locale`:
14
- #
15
- # I18n.locale = :es
16
- #
17
- # This would use the information in config/locales/es.yml.
18
- #
19
- # The following keys must be escaped otherwise they will not be retrieved by
20
- # the default I18n backend:
21
- #
22
- # true, false, on, off, yes, no
23
- #
24
- # Instead, surround them with single quotes.
25
- #
26
- # en:
27
- # "true": "foo"
28
- #
29
- # To learn more, please read the Rails Internationalization guide
30
- # available at https://guides.rubyonrails.org/i18n.html.
31
-
32
- en:
33
- hello: "Hello world"
@@ -1,41 +0,0 @@
1
- # This configuration file will be evaluated by Puma. The top-level methods that
2
- # are invoked here are part of Puma's configuration DSL. For more information
3
- # about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
4
- #
5
- # Puma starts a configurable number of processes (workers) and each process
6
- # serves each request in a thread from an internal thread pool.
7
- #
8
- # You can control the number of workers using ENV["WEB_CONCURRENCY"]. You
9
- # should only set this value when you want to run 2 or more workers. The
10
- # default is already 1.
11
- #
12
- # The ideal number of threads per worker depends both on how much time the
13
- # application spends waiting for IO operations and on how much you wish to
14
- # prioritize throughput over latency.
15
- #
16
- # As a rule of thumb, increasing the number of threads will increase how much
17
- # traffic a given process can handle (throughput), but due to CRuby's
18
- # Global VM Lock (GVL) it has diminishing returns and will degrade the
19
- # response time (latency) of the application.
20
- #
21
- # The default is set to 3 threads as it's deemed a decent compromise between
22
- # throughput and latency for the average Rails application.
23
- #
24
- # Any libraries that use a connection pool or another resource pool should
25
- # be configured to provide at least as many connections as the number of
26
- # threads. This includes Active Record's `pool` parameter in `database.yml`.
27
- threads_count = ENV.fetch("RAILS_MAX_THREADS", 3)
28
- threads threads_count, threads_count
29
-
30
- # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
31
- port ENV.fetch("PORT", 3000)
32
-
33
- # Allow puma to be restarted by `bin/rails restart` command.
34
- plugin :tmp_restart
35
-
36
- # Run the Solid Queue supervisor inside of Puma for single-server deployments
37
- plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"]
38
-
39
- # Specify the PID file. Defaults to tmp/pids/server.pid in development.
40
- # In other environments, only set the PID file if requested.
41
- pidfile ENV["PIDFILE"] if ENV["PIDFILE"]
@@ -1,9 +0,0 @@
1
- Rails.application.routes.draw do
2
- resources :modal
3
- resources :posts
4
- resource :hide_from_backend, only: [:new, :create]
5
- # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
6
-
7
- # Defines the root path route ("/")
8
- root to: "welcome#index"
9
- end
data/demo-app/config.ru DELETED
@@ -1,6 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require_relative "config/environment"
4
-
5
- run Rails.application
6
- Rails.application.load_server
@@ -1,10 +0,0 @@
1
- class CreatePosts < ActiveRecord::Migration[7.0]
2
- def change
3
- create_table :posts do |t|
4
- t.string :title
5
- t.string :body
6
-
7
- t.timestamps
8
- end
9
- end
10
- end
@@ -1,9 +0,0 @@
1
- class AddPost < ActiveRecord::Migration[7.0]
2
- def up
3
- Post.create(title: "Hello, world!", body: "This is my first post.")
4
- end
5
-
6
- def down
7
- raise ActiveRecord::IrreversibleMigration
8
- end
9
- end
@@ -1,5 +0,0 @@
1
- class AddPublishOnToPosts < ActiveRecord::Migration[7.0]
2
- def change
3
- add_column :posts, :publish_on, :date
4
- end
5
- end
@@ -1,22 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema[7.0].define(version: 2023_11_28_141054) do
14
- create_table "posts", force: :cascade do |t|
15
- t.string "title"
16
- t.string "body"
17
- t.datetime "created_at", null: false
18
- t.datetime "updated_at", null: false
19
- t.date "publish_on"
20
- end
21
-
22
- end
File without changes
File without changes
data/demo-app/log/.keep DELETED
File without changes
@@ -1,28 +0,0 @@
1
- {
2
- "name": "app",
3
- "private": "true",
4
- "dependencies": {
5
- "@hotwired/stimulus": "^3.2.2",
6
- "@hotwired/turbo-rails": "^8.0.0",
7
- "@tailwindcss/aspect-ratio": "^0.4.2",
8
- "@tailwindcss/forms": "^0.5.6",
9
- "@tailwindcss/postcss": "^4.1.3",
10
- "@tailwindcss/typography": "^0.5.10",
11
- "autoprefixer": "^10.4.16",
12
- "el-transition": "^0.0.7",
13
- "esbuild": "^0.19.5",
14
- "flatpickr": "^4.6.13",
15
- "idiomorph": "^0.7.3",
16
- "postcss": "^8.4.31",
17
- "postcss-cli": "^10.1.0",
18
- "postcss-import": "^15.1.0",
19
- "stimulus-flatpickr": "^3.0.0-0",
20
- "tailwindcss": "^4.1.3",
21
- "ultimate_turbo_modal": "file:../javascript"
22
- },
23
- "scripts": {
24
- "build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=/assets",
25
- "build:css": "postcss ./app/assets/stylesheets/application.css -o ./app/assets/builds/application.css"
26
- },
27
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
28
- }
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- plugins: [
3
- require('postcss-import'),
4
- require('autoprefixer'),
5
- require('@tailwindcss/postcss')
6
- ],
7
- }