bulma_form_rails 0.9.1

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 (94) hide show
  1. checksums.yaml +7 -0
  2. data/.idea/.gitignore +8 -0
  3. data/.idea/bulma_form_rails.iml +82 -0
  4. data/.idea/inspectionProfiles/Project_Default.xml +6 -0
  5. data/.idea/misc.xml +7 -0
  6. data/.idea/modules.xml +8 -0
  7. data/.idea/vcs.xml +6 -0
  8. data/.rbenv-gemsets +3 -0
  9. data/.ruby-version +1 -0
  10. data/Gemfile +14 -0
  11. data/Gemfile.lock +203 -0
  12. data/LICENSE +29 -0
  13. data/README.md +163 -0
  14. data/Rakefile +11 -0
  15. data/doc/BulmaFormRails/Helpers.html +698 -0
  16. data/doc/BulmaFormRails.html +93 -0
  17. data/doc/created.rid +2 -0
  18. data/doc/css/fonts.css +167 -0
  19. data/doc/css/rdoc.css +639 -0
  20. data/doc/fonts/Lato-Light.ttf +0 -0
  21. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  22. data/doc/fonts/Lato-Regular.ttf +0 -0
  23. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  24. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  25. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  26. data/doc/images/add.png +0 -0
  27. data/doc/images/arrow_up.png +0 -0
  28. data/doc/images/brick.png +0 -0
  29. data/doc/images/brick_link.png +0 -0
  30. data/doc/images/bug.png +0 -0
  31. data/doc/images/bullet_black.png +0 -0
  32. data/doc/images/bullet_toggle_minus.png +0 -0
  33. data/doc/images/bullet_toggle_plus.png +0 -0
  34. data/doc/images/date.png +0 -0
  35. data/doc/images/delete.png +0 -0
  36. data/doc/images/find.png +0 -0
  37. data/doc/images/loadingAnimation.gif +0 -0
  38. data/doc/images/macFFBgHack.png +0 -0
  39. data/doc/images/moderngeosystems_logo.png +0 -0
  40. data/doc/images/package.png +0 -0
  41. data/doc/images/page_green.png +0 -0
  42. data/doc/images/page_white_text.png +0 -0
  43. data/doc/images/page_white_width.png +0 -0
  44. data/doc/images/plugin.png +0 -0
  45. data/doc/images/ruby.png +0 -0
  46. data/doc/images/tag_blue.png +0 -0
  47. data/doc/images/tag_green.png +0 -0
  48. data/doc/images/transparent.png +0 -0
  49. data/doc/images/wrench.png +0 -0
  50. data/doc/images/wrench_orange.png +0 -0
  51. data/doc/images/zoom.png +0 -0
  52. data/doc/index.html +82 -0
  53. data/doc/js/darkfish.js +84 -0
  54. data/doc/js/navigation.js +105 -0
  55. data/doc/js/navigation.js.gz +0 -0
  56. data/doc/js/search.js +110 -0
  57. data/doc/js/search_index.js +1 -0
  58. data/doc/js/search_index.js.gz +0 -0
  59. data/doc/js/searcher.js +229 -0
  60. data/doc/js/searcher.js.gz +0 -0
  61. data/doc/table_of_contents.html +125 -0
  62. data/lib/bulma_form_rails/field_helpers.rb +239 -0
  63. data/lib/bulma_form_rails/form_page_helpers.rb +36 -0
  64. data/lib/bulma_form_rails/header_and_footer_helpers.rb +36 -0
  65. data/lib/bulma_form_rails/javascript/controllers/child_objects_controller.js +66 -0
  66. data/lib/bulma_form_rails/message_box_helpers.rb +25 -0
  67. data/lib/bulma_form_rails/railtie.rb +62 -0
  68. data/lib/bulma_form_rails/subform_helpers.rb +33 -0
  69. data/lib/bulma_form_rails/version.rb +3 -0
  70. data/lib/bulma_form_rails.rb +3 -0
  71. data/lib/generators/bulma_form_rails/pagy_config_generator.rb +15 -0
  72. data/lib/generators/bulma_form_rails/views_generator.rb +19 -0
  73. data/lib/install/bulma_form_rails.rb +13 -0
  74. data/lib/tasks/bulma_form_rails_tasks.rake +30 -0
  75. data/lib/templates/app/views/_form.html.erb +0 -0
  76. data/lib/templates/app/views/bulma_form_rails/_child.html.erb +61 -0
  77. data/lib/templates/app/views/bulma_form_rails/_children.html.erb +61 -0
  78. data/lib/templates/app/views/bulma_form_rails/_datetime_select.html.erb +10 -0
  79. data/lib/templates/app/views/bulma_form_rails/_edit_form_page.html.erb +15 -0
  80. data/lib/templates/app/views/bulma_form_rails/_field.html.erb +10 -0
  81. data/lib/templates/app/views/bulma_form_rails/_form_footer.html.erb +17 -0
  82. data/lib/templates/app/views/bulma_form_rails/_index_header.html.erb +16 -0
  83. data/lib/templates/app/views/bulma_form_rails/_message_box.html.erb +35 -0
  84. data/lib/templates/app/views/bulma_form_rails/_new_form_page.html.erb +15 -0
  85. data/lib/templates/app/views/bulma_form_rails/_radio_group.html.erb +6 -0
  86. data/lib/templates/app/views/bulma_form_rails/_select.html.erb +7 -0
  87. data/lib/templates/app/views/bulma_form_rails/_time_select.html.erb +10 -0
  88. data/lib/templates/app/views/bulma_form_rails/_validation_box.html.erb +15 -0
  89. data/lib/templates/app/views/bulma_form_rails/_value.html.erb +6 -0
  90. data/lib/templates/config/initializers/pagy.rb +211 -0
  91. data/package.json +45 -0
  92. data/sig/bulma_form_helper.rbs +68 -0
  93. data/yarn.lock +53 -0
  94. metadata +291 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 18da3d1acf25892fb6dba3efb8b10fc49159fe15703362568c661b83b7caa38b
4
+ data.tar.gz: '0885e6bb8ded4fc23aebe69b58902d597803a0c29d4d5b10c1195541703b1ca5'
5
+ SHA512:
6
+ metadata.gz: 34390e4cc66aeffb14f31ebda89bb396f3f177048fa810ada065fb027a2573e1ffca04dc196fc45469dbf2aa93d8e1cddf44e2743b8ee9ce38fe71a8d57d6f81
7
+ data.tar.gz: 148d17f21dadba06133709aee9cdfeaa05b0d29a7e828583584b8d422361830265e60ff7a94e308741443f36267ed091ac763a46b596551c5f5f0c82c6e221f6
data/.idea/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
@@ -0,0 +1,82 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
+ </content>
12
+ <orderEntry type="jdk" jdkName="rbenv: 3.1.2" jdkType="RUBY_SDK" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ <orderEntry type="library" scope="PROVIDED" name="actioncable (v7.0.4, rbenv: 3.1.2, bfr) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="actionmailbox (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="actionmailer (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="actionpack (v7.0.4, rbenv: 3.1.2, bfr) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="actiontext (v7.0.4, rbenv: 3.1.2, bfr) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="actionview (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="activejob (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="activemodel (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="activerecord (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="activestorage (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="activesupport (v7.0.4, rbenv: 3.1.2, bfr) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, rbenv: 3.1.2, lgd2) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, rbenv: 3.1.2, bfr) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.3.13, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.10, rbenv: 3.1.2, lgd2) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="crass (v1.0.6, rbenv: 3.1.2, bfr) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="debug (v1.6.2, rbenv: 3.1.2, bfr) [gem]" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="digest (v3.1.0, rbenv: 3.1.2, lgd2) [gem]" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="erubi (v1.11.0, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
33
+ <orderEntry type="library" scope="PROVIDED" name="globalid (v1.0.0, rbenv: 3.1.2, lgd2) [gem]" level="application" />
34
+ <orderEntry type="library" scope="PROVIDED" name="i18n (v1.12.0, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
35
+ <orderEntry type="library" scope="PROVIDED" name="io-console (v0.5.11, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
36
+ <orderEntry type="library" scope="PROVIDED" name="irb (v1.4.1, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
37
+ <orderEntry type="library" scope="PROVIDED" name="jsbundling-rails (v1.0.3, rbenv: 3.1.2, bfr) [gem]" level="application" />
38
+ <orderEntry type="library" scope="PROVIDED" name="loofah (v2.18.0, rbenv: 3.1.2, lgd2) [gem]" level="application" />
39
+ <orderEntry type="library" scope="PROVIDED" name="mail (v2.7.1, rbenv: 3.1.2, lgd2) [gem]" level="application" />
40
+ <orderEntry type="library" scope="PROVIDED" name="marcel (v1.0.2, rbenv: 3.1.2, lgd2) [gem]" level="application" />
41
+ <orderEntry type="library" scope="PROVIDED" name="method_source (v1.0.0, rbenv: 3.1.2, lgd2) [gem]" level="application" />
42
+ <orderEntry type="library" scope="PROVIDED" name="mini_mime (v1.1.2, rbenv: 3.1.2, bfr) [gem]" level="application" />
43
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.16.3, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
44
+ <orderEntry type="library" scope="PROVIDED" name="net-imap (v0.2.3, rbenv: 3.1.2, bfr) [gem]" level="application" />
45
+ <orderEntry type="library" scope="PROVIDED" name="net-pop (v0.1.1, rbenv: 3.1.2, lgd2) [gem]" level="application" />
46
+ <orderEntry type="library" scope="PROVIDED" name="net-protocol (v0.1.3, rbenv: 3.1.2, lgd2) [gem]" level="application" />
47
+ <orderEntry type="library" scope="PROVIDED" name="net-smtp (v0.3.1, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
48
+ <orderEntry type="library" scope="PROVIDED" name="nio4r (v2.5.8, rbenv: 3.1.2, bfr) [gem]" level="application" />
49
+ <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.13.8, rbenv: 3.1.2, bfr) [gem]" level="application" />
50
+ <orderEntry type="library" scope="PROVIDED" name="pagy (v5.10.1, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
51
+ <orderEntry type="library" scope="PROVIDED" name="parser (v3.1.2.1, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
52
+ <orderEntry type="library" scope="PROVIDED" name="psych (v4.0.5, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
53
+ <orderEntry type="library" scope="PROVIDED" name="racc (v1.6.0, rbenv: 3.1.2, bfr) [gem]" level="application" />
54
+ <orderEntry type="library" scope="PROVIDED" name="rack (v2.2.4, rbenv: 3.1.2, bfr) [gem]" level="application" />
55
+ <orderEntry type="library" scope="PROVIDED" name="rack-test (v2.0.2, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
56
+ <orderEntry type="library" scope="PROVIDED" name="rails (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
57
+ <orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.3, rbenv: 3.1.2, lgd2) [gem]" level="application" />
58
+ <orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.4.3, rbenv: 3.1.2, bfr) [gem]" level="application" />
59
+ <orderEntry type="library" scope="PROVIDED" name="railties (v7.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
60
+ <orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, rbenv: 3.1.2, bfr) [gem]" level="application" />
61
+ <orderEntry type="library" scope="PROVIDED" name="rbs (v2.6.0, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
62
+ <orderEntry type="library" scope="PROVIDED" name="rbs_rails (v0.11.0, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
63
+ <orderEntry type="library" scope="PROVIDED" name="rdoc (v6.4.0, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
64
+ <orderEntry type="library" scope="PROVIDED" name="reline (v0.3.1, rbenv: 3.1.2, lgd2) [gem]" level="application" />
65
+ <orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, rbenv: 3.1.2, lgd2) [gem]" level="application" />
66
+ <orderEntry type="library" scope="PROVIDED" name="stimulus-rails (v1.1.0, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
67
+ <orderEntry type="library" scope="PROVIDED" name="stringio (v3.0.2, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
68
+ <orderEntry type="library" scope="PROVIDED" name="strscan (v3.0.4, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
69
+ <orderEntry type="library" scope="PROVIDED" name="thor (v1.2.1, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
70
+ <orderEntry type="library" scope="PROVIDED" name="timeout (v0.3.0, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
71
+ <orderEntry type="library" scope="PROVIDED" name="turbo-rails (v1.1.1, rbenv: 3.1.2, bfr) [gem]" level="application" />
72
+ <orderEntry type="library" scope="PROVIDED" name="tzinfo (v2.0.5, rbenv: 3.1.2, bfr) [gem]" level="application" />
73
+ <orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.7.5, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
74
+ <orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.5, rbenv: 3.1.2, lgd2) [gem]" level="application" />
75
+ <orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.6.0, rbenv: 3.1.2, bulma_form_rails) [gem]" level="application" />
76
+ </component>
77
+ <component name="RakeTasksCache">
78
+ <option name="myRootTask">
79
+ <RakeTaskImpl id="rake" />
80
+ </option>
81
+ </component>
82
+ </module>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Rubocop" enabled="false" level="WARNING" enabled_by_default="false" />
5
+ </profile>
6
+ </component>
data/.idea/misc.xml ADDED
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 2.6.5" project-jdk-type="RUBY_SDK" />
4
+ <component name="RbsRubysigsRootManager">
5
+ <isRbsGemPresent>true</isRbsGemPresent>
6
+ </component>
7
+ </project>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/bulma_form_rails.iml" filepath="$PROJECT_DIR$/.idea/bulma_form_rails.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
data/.rbenv-gemsets ADDED
@@ -0,0 +1,3 @@
1
+ bfr
2
+ bulma_form_rails
3
+ lgd2
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.1.2
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "https://rubygems.org"
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
+
4
+ ruby "~> 3.1.2"
5
+
6
+ # Declare your gem's dependencies in bulma_form_rails.gemspec.
7
+ # Bundler will treat runtime dependencies like base dependencies, and
8
+ # development dependencies will be added by default to the :development group.
9
+ gemspec
10
+
11
+ # Declare any dependencies that are still in development here instead of in
12
+ # your gemspec. These might include edge Rails or gems from your path or
13
+ # Git. Remember to move these dependencies to your gemspec before releasing
14
+ # your gem to rubygems.org.
data/Gemfile.lock ADDED
@@ -0,0 +1,203 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bulma_form_rails (0.9.1)
5
+ pagy (~> 5.10)
6
+ rails (~> 7.0.4)
7
+ rake (~> 13.0.6)
8
+ rexml (~> 3.2.5)
9
+ stimulus-rails (~> 1.1.0)
10
+ turbo-rails (~> 1.1.1)
11
+
12
+ GEM
13
+ remote: https://rubygems.org/
14
+ specs:
15
+ actioncable (7.0.4)
16
+ actionpack (= 7.0.4)
17
+ activesupport (= 7.0.4)
18
+ nio4r (~> 2.0)
19
+ websocket-driver (>= 0.6.1)
20
+ actionmailbox (7.0.4)
21
+ actionpack (= 7.0.4)
22
+ activejob (= 7.0.4)
23
+ activerecord (= 7.0.4)
24
+ activestorage (= 7.0.4)
25
+ activesupport (= 7.0.4)
26
+ mail (>= 2.7.1)
27
+ net-imap
28
+ net-pop
29
+ net-smtp
30
+ actionmailer (7.0.4)
31
+ actionpack (= 7.0.4)
32
+ actionview (= 7.0.4)
33
+ activejob (= 7.0.4)
34
+ activesupport (= 7.0.4)
35
+ mail (~> 2.5, >= 2.5.4)
36
+ net-imap
37
+ net-pop
38
+ net-smtp
39
+ rails-dom-testing (~> 2.0)
40
+ actionpack (7.0.4)
41
+ actionview (= 7.0.4)
42
+ activesupport (= 7.0.4)
43
+ rack (~> 2.0, >= 2.2.0)
44
+ rack-test (>= 0.6.3)
45
+ rails-dom-testing (~> 2.0)
46
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
47
+ actiontext (7.0.4)
48
+ actionpack (= 7.0.4)
49
+ activerecord (= 7.0.4)
50
+ activestorage (= 7.0.4)
51
+ activesupport (= 7.0.4)
52
+ globalid (>= 0.6.0)
53
+ nokogiri (>= 1.8.5)
54
+ actionview (7.0.4)
55
+ activesupport (= 7.0.4)
56
+ builder (~> 3.1)
57
+ erubi (~> 1.4)
58
+ rails-dom-testing (~> 2.0)
59
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
60
+ activejob (7.0.4)
61
+ activesupport (= 7.0.4)
62
+ globalid (>= 0.3.6)
63
+ activemodel (7.0.4)
64
+ activesupport (= 7.0.4)
65
+ activerecord (7.0.4)
66
+ activemodel (= 7.0.4)
67
+ activesupport (= 7.0.4)
68
+ activestorage (7.0.4)
69
+ actionpack (= 7.0.4)
70
+ activejob (= 7.0.4)
71
+ activerecord (= 7.0.4)
72
+ activesupport (= 7.0.4)
73
+ marcel (~> 1.0)
74
+ mini_mime (>= 1.1.0)
75
+ activesupport (7.0.4)
76
+ concurrent-ruby (~> 1.0, >= 1.0.2)
77
+ i18n (>= 1.6, < 2)
78
+ minitest (>= 5.1)
79
+ tzinfo (~> 2.0)
80
+ ast (2.4.2)
81
+ builder (3.2.4)
82
+ concurrent-ruby (1.1.10)
83
+ crass (1.0.6)
84
+ debug (1.6.2)
85
+ irb (>= 1.3.6)
86
+ reline (>= 0.3.1)
87
+ digest (3.1.0)
88
+ erubi (1.11.0)
89
+ globalid (1.0.0)
90
+ activesupport (>= 5.0)
91
+ i18n (1.12.0)
92
+ concurrent-ruby (~> 1.0)
93
+ io-console (0.5.11)
94
+ irb (1.4.1)
95
+ reline (>= 0.3.0)
96
+ jsbundling-rails (1.0.3)
97
+ railties (>= 6.0.0)
98
+ loofah (2.18.0)
99
+ crass (~> 1.0.2)
100
+ nokogiri (>= 1.5.9)
101
+ mail (2.7.1)
102
+ mini_mime (>= 0.1.1)
103
+ marcel (1.0.2)
104
+ method_source (1.0.0)
105
+ mini_mime (1.1.2)
106
+ minitest (5.16.3)
107
+ net-imap (0.2.3)
108
+ digest
109
+ net-protocol
110
+ strscan
111
+ net-pop (0.1.1)
112
+ digest
113
+ net-protocol
114
+ timeout
115
+ net-protocol (0.1.3)
116
+ timeout
117
+ net-smtp (0.3.1)
118
+ digest
119
+ net-protocol
120
+ timeout
121
+ nio4r (2.5.8)
122
+ nokogiri (1.13.8-x86_64-linux)
123
+ racc (~> 1.4)
124
+ pagy (5.10.1)
125
+ activesupport
126
+ parser (3.1.2.1)
127
+ ast (~> 2.4.1)
128
+ psych (4.0.5)
129
+ stringio
130
+ racc (1.6.0)
131
+ rack (2.2.4)
132
+ rack-test (2.0.2)
133
+ rack (>= 1.3)
134
+ rails (7.0.4)
135
+ actioncable (= 7.0.4)
136
+ actionmailbox (= 7.0.4)
137
+ actionmailer (= 7.0.4)
138
+ actionpack (= 7.0.4)
139
+ actiontext (= 7.0.4)
140
+ actionview (= 7.0.4)
141
+ activejob (= 7.0.4)
142
+ activemodel (= 7.0.4)
143
+ activerecord (= 7.0.4)
144
+ activestorage (= 7.0.4)
145
+ activesupport (= 7.0.4)
146
+ bundler (>= 1.15.0)
147
+ railties (= 7.0.4)
148
+ rails-dom-testing (2.0.3)
149
+ activesupport (>= 4.2.0)
150
+ nokogiri (>= 1.6)
151
+ rails-html-sanitizer (1.4.3)
152
+ loofah (~> 2.3)
153
+ railties (7.0.4)
154
+ actionpack (= 7.0.4)
155
+ activesupport (= 7.0.4)
156
+ method_source
157
+ rake (>= 12.2)
158
+ thor (~> 1.0)
159
+ zeitwerk (~> 2.5)
160
+ rake (13.0.6)
161
+ rbs (2.6.0)
162
+ rbs_rails (0.11.0)
163
+ parser
164
+ rbs (>= 1)
165
+ rdoc (6.4.0)
166
+ psych (>= 4.0.0)
167
+ reline (0.3.1)
168
+ io-console (~> 0.5)
169
+ rexml (3.2.5)
170
+ stimulus-rails (1.1.0)
171
+ railties (>= 6.0.0)
172
+ stringio (3.0.2)
173
+ strscan (3.0.4)
174
+ thor (1.2.1)
175
+ timeout (0.3.0)
176
+ turbo-rails (1.1.1)
177
+ actionpack (>= 6.0.0)
178
+ activejob (>= 6.0.0)
179
+ railties (>= 6.0.0)
180
+ tzinfo (2.0.5)
181
+ concurrent-ruby (~> 1.0)
182
+ websocket-driver (0.7.5)
183
+ websocket-extensions (>= 0.1.0)
184
+ websocket-extensions (0.1.5)
185
+ zeitwerk (2.6.0)
186
+
187
+ PLATFORMS
188
+ x86_64-linux
189
+
190
+ DEPENDENCIES
191
+ bulma_form_rails!
192
+ debug (~> 1.6.2)
193
+ jsbundling-rails (~> 1.0.3)
194
+ minitest (~> 5.0)
195
+ rake (~> 13.0)
196
+ rbs_rails (~> 0.11.0)
197
+ rdoc (~> 6.4.0)
198
+
199
+ RUBY VERSION
200
+ ruby 3.1.2p20
201
+
202
+ BUNDLED WITH
203
+ 2.3.13
data/LICENSE ADDED
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2022, Kevin Weller
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md ADDED
@@ -0,0 +1,163 @@
1
+ ![Modern geoSystems logo](https://github.com/modgeosys/bulma_form_rails/blob/8fde36bf59e86254cfe9e792f395caba6f60a2a4/doc/images/moderngeosystems_logo.png?raw=true)
2
+ # bulma_form_rails
3
+ `bulma_form_rails` provides Rails helpers for efficiently building forms using the Bulma CSS library.
4
+
5
+ ## Features
6
+
7
+ ### Standard fields with default or custom labels, standard and optional CSS classes
8
+ * `bulma_input` with all `type` options
9
+ * `bulma_text_area`
10
+ * `bulma_checkbox`
11
+ * `bulma_radio_group` defines *all* radio options with a single call
12
+ * `bulma_select`
13
+ * `bulma_date_select`
14
+ * `bulma_time_select`
15
+ * `bulma_datetime_select`
16
+
17
+ ### Custom and aggregate fields
18
+ * `bulma_custom_field` with a standard field label and custom markup passed in a block
19
+ * `bulma_child_objects` creates a "field" with a label and an editable subform for a collection of objects, including options for column totals and row add/delete buttons
20
+
21
+ ### Message boxes
22
+ * `bulma_message_box` renders a standard flash messages box
23
+ * `bulma_validation_box` renders a standard model validation messages box
24
+
25
+ ### Headers and footers
26
+ * `bulma_index_header` renders a header for a standard index page
27
+ * `bulma_form_footer` renders a footer for a standard model form page
28
+
29
+ ### Form page template helpers
30
+ * `bulma_new_form_page`
31
+ * `bulma_edit_form_page`
32
+
33
+ ## Prerequisites
34
+ You should have generated your application using something similar to the following command:
35
+ ```bash
36
+ $ rails new -c bulma app_name
37
+ ```
38
+ Or for an existing application, you should install Bulma as the Rails application generator would have. Something like this might be enough:
39
+ ```bash
40
+ $ yarn add bulma
41
+ ```
42
+
43
+ ## Installation
44
+ Install the gem and add to the application's Gemfile by executing:
45
+ ```bash
46
+ $ bundle add bulma_form_rails
47
+ ```
48
+ Or install it yourself as:
49
+ ```bash
50
+ $ gem install bulma_form_rails
51
+ ```
52
+ Continue your installation by executing:
53
+ ```bash
54
+ $ bin/rails bulma_form_rails:install
55
+ $ bin/rails generate bulma_form_rails:pagy_config
56
+ $ bin/rails generate bulma_form_rails:views
57
+ ```
58
+ `rails bulma_form_rails:install` will add required resources to your application.
59
+ The Rails generators will create your initial implementation view and configuration templates. If you modify the generated files, you might not want to to run these generators again.
60
+
61
+ The final installation step is to manually `include Pagy::Backend` in your ApplicationController definition and `include Pagy::Frontend` in your ApplicationHelper module definition.
62
+
63
+ ## Examples
64
+ (for a hypothetical user management UI)
65
+
66
+ ### Sample `index.html.erb` page
67
+ ```html
68
+ <section class="section">
69
+ <%= bulma_index_header :user, new_user_path(page: params[:page]) %>
70
+ <!-- Your index action content goes here. -->
71
+ <%= pagy_bulma_nav(@pagy) %>
72
+ </section>
73
+ ```
74
+
75
+ ### Sample `new.html.erb` page
76
+ ```html
77
+ <%= bulma_new_form_page :user, @user, users_path(page: params[:page]) %>
78
+ ```
79
+
80
+ ### Sample `edit.html.erb` page
81
+ ```html
82
+ <%= bulma_edit_form_page :user, @user, users_path(page: params[:page]), user_path(page: params[:page]) %>
83
+ ```
84
+
85
+ ### Sample `_form.html.erb` partial
86
+ ```html
87
+ <%= form_with model: user, url: url do |form| %>
88
+ <%= bulma_validation_box user %>
89
+
90
+ <fieldset id="basic_fields" class="box">
91
+ <legend>Basic User Information</legend>
92
+
93
+ <%= bulma_input form, :username, :text, class: 'is-danger' %>
94
+
95
+ <%= bulma_custom_field(form, :password) do %>
96
+ <div class="field">
97
+ <div class="control">
98
+ <%= password_field_tag 'user[password]', user.password, class: 'input is-danger' %>
99
+ </div>
100
+ </div>
101
+ <% end %>
102
+
103
+ <%= bulma_custom_field(form, :confirmed_password) do %>
104
+ <div class="field">
105
+ <div class="control">
106
+ <%= password_field_tag 'user[confirmed_password]', user.confirmed_password, class: 'input is-danger' %>
107
+ </div>
108
+ </div>
109
+ <% end %>
110
+
111
+ <%= bulma_check_box form, :login_allowed, label: 'Login allowed?' %>
112
+ <%= bulma_select form, :role_id, selectable_roles(@session_role), class: 'is-danger' %>
113
+ <%= bulma_radio_group form, :role, [['Administrator', :admin], ['Regular user', :regular]], class: 'has-text-danger' %>
114
+
115
+ </fieldset>
116
+
117
+ <fieldset id="person_fields" class="box">
118
+ <legend>Personal Information</legend>
119
+
120
+ <%= form.fields_for :person do |person_subform| %>
121
+ <%= bulma_input person_subform, :first_name, :text, class: 'is-danger' %>
122
+ <%= bulma_input person_subform, :middle_name %>
123
+ <%= bulma_input person_subform, :last_name, :text, class: 'is-danger' %>
124
+ <%= bulma_input person_subform, :home_phone, :phone %>
125
+ <%= bulma_input person_subform, :work_phone, :phone %>
126
+ <%= bulma_input person_subform, :work_extension %>
127
+ <%= bulma_input person_subform, :mobile_phone, :phone %>
128
+ <%= bulma_input person_subform, :email_address, :email %>
129
+ <%= bulma_child_objects(relatives || [], 'relatives', :relative, users_add_child_path, total_columns: [3, 4]) %>
130
+
131
+ <fieldset id="address_fields" class="box">
132
+ <legend>Address</legend>
133
+
134
+ <%= person_subform.fields_for :address do |address_subform| %>
135
+ <%= bulma_text_area address_subform, :street_address, cols: 40, rows: 5 %>
136
+ <%= bulma_input address_subform, :city %>
137
+ <%= bulma_select address_subform, :state_id, State.all.order(:name).collect {|state| [state.name, state.id]}, include_blank: true %>
138
+ <%= bulma_input address_subform, :zip_or_postal_code %>
139
+ <%= bulma_select address_subform, :country, ["United States"] %>
140
+ <% end %>
141
+
142
+ </fieldset>
143
+
144
+ <% end %>
145
+
146
+ </fieldset>
147
+
148
+ <%= bulma_form_footer form, users_path(page: params[:page]) %>
149
+ <% end %>
150
+ ```
151
+
152
+ ## Development
153
+
154
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
155
+
156
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
157
+
158
+ ## Contributing
159
+
160
+ Bug reports and pull requests are welcome on GitHub at https://github.com/modgeosys/bulma_form_rails.
161
+
162
+ ## License
163
+ The gem is available as open source under the terms of the [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause).
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ require "bundler/setup"
2
+ require "bundler/gem_tasks"
3
+ require "rake/testtask"
4
+
5
+ Rake::TestTask.new(:test) do |t|
6
+ t.libs << "test"
7
+ t.libs << "lib"
8
+ t.test_files = FileList["test/**/*_test.rb"]
9
+ end
10
+
11
+ task default: :test