baldur 0.2.5 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -0
  3. data/TODO.md +27 -7
  4. data/app/assets/javascripts/baldur/controllers/segmented_tabs_controller.js +53 -2
  5. data/app/assets/javascripts/baldur/controllers/theme_controller.js +4 -3
  6. data/app/assets/stylesheets/baldur/application/components/auth-page.css +5 -6
  7. data/app/assets/stylesheets/baldur/application/components/table.css +17 -7
  8. data/app/helpers/baldur/ui_helper.rb +11 -2
  9. data/app/helpers/baldur/ui_helper_feedback.rb +19 -2
  10. data/app/views/baldur/components/_button.html.erb +4 -0
  11. data/app/views/baldur/components/_segmented_buttons.html.erb +14 -7
  12. data/app/views/baldur/components/_snackbar_stack.html.erb +10 -6
  13. data/app/views/baldur/components/_table.html.erb +6 -4
  14. data/app/views/baldur/optional/_auth_page.html.erb +2 -2
  15. data/baldur.gemspec +4 -1
  16. data/context7.json +17 -0
  17. data/docs/alerts-and-snackbars.md +72 -0
  18. data/docs/auth.md +66 -0
  19. data/docs/forms.md +267 -0
  20. data/docs/installation.md +63 -0
  21. data/docs/marketing.md +77 -0
  22. data/docs/modals-and-panels.md +55 -0
  23. data/docs/security.md +11 -0
  24. data/docs/sidebar.md +105 -0
  25. data/docs/styling.md +34 -0
  26. data/docs/tables.md +173 -0
  27. data/docs/tabs-and-segmented-controls.md +509 -0
  28. data/docs/theme.md +118 -0
  29. data/lib/baldur/version.rb +1 -1
  30. data/llms-full.txt +179 -0
  31. data/llms.txt +35 -0
  32. data/test/hidden_field_helper_test.rb +23 -0
  33. data/test/segmented_buttons_helper_test.rb +85 -0
  34. data/test/snackbar_stack_helper_test.rb +121 -0
  35. data/test/table_helper_test.rb +118 -0
  36. data/test/text_field_helper_test.rb +40 -0
  37. data/test/theme_toggle_helper_test.rb +2 -0
  38. metadata +22 -2
@@ -0,0 +1,40 @@
1
+ require_relative 'test_helper'
2
+
3
+ require 'action_controller'
4
+
5
+ class BaldurTextFieldHelperTest < Minitest::Test
6
+ class TestController < ActionController::Base
7
+ append_view_path File.expand_path('../app/views', __dir__)
8
+ helper Baldur::UiHelper
9
+ end
10
+
11
+ def test_ui_text_field_tag_passes_html5_input_attributes_through_input_options
12
+ html = TestController.render(
13
+ inline: <<~ERB,
14
+ <%= ui_text_field_tag(
15
+ :price,
16
+ 12.5,
17
+ label: "Price",
18
+ type: :number,
19
+ input_options: {
20
+ step: :any,
21
+ min: 0,
22
+ max: 100,
23
+ inputmode: "decimal",
24
+ autocomplete: "off"
25
+ }
26
+ ) %>
27
+ ERB
28
+ formats: [:html]
29
+ )
30
+
31
+ assert_includes html, 'type="number"'
32
+ assert_includes html, 'name="price"'
33
+ assert_includes html, 'value="12.5"'
34
+ assert_includes html, 'step="any"'
35
+ assert_includes html, 'min="0"'
36
+ assert_includes html, 'max="100"'
37
+ assert_includes html, 'inputmode="decimal"'
38
+ assert_includes html, 'autocomplete="off"'
39
+ end
40
+ end
@@ -86,6 +86,8 @@ class BaldurAuthPageTopRailTest < Minitest::Test
86
86
  )
87
87
 
88
88
  refute_includes html, 'auth-page__top-rail'
89
+ assert_includes html, 'auth-page min-h-screen flex items-center justify-center p-6 bg-base-200'
90
+ assert_includes html, 'auth-page__container w-full max-w-lg mx-auto'
89
91
  end
90
92
 
91
93
  def test_auth_page_with_top_rail_renders_slot
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baldur
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Varun Murkar
@@ -195,6 +195,19 @@ files:
195
195
  - app/views/baldur/optional/_panel_secondary.html.erb
196
196
  - baldur.gemspec
197
197
  - config/importmap.rb
198
+ - context7.json
199
+ - docs/alerts-and-snackbars.md
200
+ - docs/auth.md
201
+ - docs/forms.md
202
+ - docs/installation.md
203
+ - docs/marketing.md
204
+ - docs/modals-and-panels.md
205
+ - docs/security.md
206
+ - docs/sidebar.md
207
+ - docs/styling.md
208
+ - docs/tables.md
209
+ - docs/tabs-and-segmented-controls.md
210
+ - docs/theme.md
198
211
  - lib/baldur.rb
199
212
  - lib/baldur/configuration.rb
200
213
  - lib/baldur/engine.rb
@@ -207,19 +220,26 @@ files:
207
220
  - lib/generators/baldur/install_google_auth/install_google_auth_generator.rb
208
221
  - lib/generators/baldur/install_panel_right/install_panel_right_generator.rb
209
222
  - lib/generators/baldur/install_panel_secondary/install_panel_secondary_generator.rb
223
+ - llms-full.txt
224
+ - llms.txt
210
225
  - script/verify_host_install
211
226
  - test/confirmation_modal_helper_test.rb
212
227
  - test/csp_rendering_test.rb
213
228
  - test/engine_css_test.rb
214
229
  - test/fixtures/shared/_brand_lockup.html.erb
215
230
  - test/gemspec_test.rb
231
+ - test/hidden_field_helper_test.rb
216
232
  - test/install_generator_test.rb
217
233
  - test/install_panel_secondary_generator_test.rb
218
234
  - test/marketing_helper_test.rb
219
235
  - test/run_all.rb
236
+ - test/segmented_buttons_helper_test.rb
220
237
  - test/sidebar_helper_test.rb
221
238
  - test/snackbar_flash_helper_test.rb
239
+ - test/snackbar_stack_helper_test.rb
240
+ - test/table_helper_test.rb
222
241
  - test/test_helper.rb
242
+ - test/text_field_helper_test.rb
223
243
  - test/theme_toggle_helper_test.rb
224
244
  - test/tmp/install_generator/app/assets/stylesheets/fonts.css
225
245
  - test/tmp/install_generator/app/assets/stylesheets/theme.css
@@ -274,7 +294,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
274
294
  - !ruby/object:Gem::Version
275
295
  version: '0'
276
296
  requirements: []
277
- rubygems_version: 4.0.6
297
+ rubygems_version: 4.0.14
278
298
  specification_version: 4
279
299
  summary: Batteries-included Rails UI engine for the importmap, Stimulus, Tailwind
280
300
  stack