ui_bibz 3.0.0.alpha5 → 3.0.0.alpha11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +9 -9
  3. data/README.md +4 -0
  4. data/lib/ui_bibz/concerns/models/searchable.rb +1 -1
  5. data/lib/ui_bibz/infos.rb +4 -4
  6. data/lib/ui_bibz/inputs/ui_bibz_inputs/ui_checkbox_field_input.rb +1 -1
  7. data/lib/ui_bibz/inputs/ui_bibz_inputs/ui_text_field_input.rb +1 -1
  8. data/lib/ui_bibz/ui/concerns/html_concern.rb +3 -3
  9. data/lib/ui_bibz/ui/core/boxes/components/card_image.rb +5 -1
  10. data/lib/ui_bibz/ui/core/forms/buttons/button.rb +3 -12
  11. data/lib/ui_bibz/ui/core/forms/buttons/button_link.rb +1 -2
  12. data/lib/ui_bibz/ui/core/forms/buttons/button_refresh.rb +0 -1
  13. data/lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb +7 -1
  14. data/lib/ui_bibz/ui/core/forms/choices/radio_field.rb +7 -1
  15. data/lib/ui_bibz/ui/core/forms/choices/switch_field.rb +4 -0
  16. data/lib/ui_bibz/ui/core/forms/dropdowns/dropdown.rb +6 -6
  17. data/lib/ui_bibz/ui/core/forms/dropdowns/split_dropdown.rb +1 -1
  18. data/lib/ui_bibz/ui/core/forms/numbers/formula_field.rb +2 -0
  19. data/lib/ui_bibz/ui/core/forms/numbers/range_field.rb +19 -1
  20. data/lib/ui_bibz/ui/core/forms/numbers/slider_field.rb +13 -1
  21. data/lib/ui_bibz/ui/core/forms/numbers/slider_header.rb +2 -2
  22. data/lib/ui_bibz/ui/core/forms/selects/dropdown_select_field.rb +29 -5
  23. data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button.rb +1 -9
  24. data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button_link.rb +1 -9
  25. data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_dropdown.rb +5 -4
  26. data/lib/ui_bibz/ui/core/forms/surrounds/surround_field.rb +3 -8
  27. data/lib/ui_bibz/ui/core/icons/glyph.rb +9 -1
  28. data/lib/ui_bibz/ui/core/navigations/components/nav_dropdown.rb +1 -1
  29. data/lib/ui_bibz/ui/core/navigations/components/nav_link_link.rb +1 -1
  30. data/lib/ui_bibz/ui/core/navigations/nav.rb +3 -3
  31. data/lib/ui_bibz/ui/core/navigations/navbar.rb +6 -4
  32. data/lib/ui_bibz/ui/core/navigations/tab_group.rb +5 -1
  33. data/lib/ui_bibz/ui/core/notifications/components/toast_header.rb +15 -1
  34. data/lib/ui_bibz/ui/core/windows/modal.rb +6 -2
  35. data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +11 -24
  36. data/lib/ui_bibz/ui/extensions/core/component/popover_extension.rb +1 -1
  37. data/lib/ui_bibz/ui/extensions/core/forms/surround_extension.rb +1 -1
  38. data/lib/ui_bibz/ui/ux/containers/components/panel_header.rb +3 -2
  39. data/lib/ui_bibz/ui/ux/containers/components/panel_header_title.rb +47 -0
  40. data/lib/ui_bibz/ui/ux/tables/table_pagination_per_page.rb +3 -3
  41. data/lib/ui_bibz/ui/ux/tables/table_search_field.rb +4 -4
  42. data/lib/ui_bibz/utils/breakdown_class_name_generator.rb +14 -6
  43. data/lib/ui_bibz/utils/internationalization.rb +1 -1
  44. data/test/simple_form_test.rb +4 -4
  45. data/test/ui/core/boxes/card_test.rb +2 -2
  46. data/test/ui/core/component_test.rb +2 -2
  47. data/test/ui/core/forms/buttons/button_group_test.rb +1 -1
  48. data/test/ui/core/forms/buttons/button_link_test.rb +1 -8
  49. data/test/ui/core/forms/buttons/button_refresh_test.rb +1 -1
  50. data/test/ui/core/forms/buttons/button_test.rb +2 -9
  51. data/test/ui/core/forms/choices/checkbox_field_test.rb +2 -2
  52. data/test/ui/core/forms/choices/choice_group_test.rb +3 -3
  53. data/test/ui/core/forms/choices/radio_field_test.rb +1 -1
  54. data/test/ui/core/forms/dropdowns/dropdown_test.rb +2 -2
  55. data/test/ui/core/forms/numbers/range_field_test.rb +14 -0
  56. data/test/ui/core/forms/numbers/slider_field_test.rb +2 -2
  57. data/test/ui/core/forms/selects/multi_select_field_test.rb +3 -3
  58. data/test/ui/core/forms/selects/select_field_test.rb +1 -1
  59. data/test/ui/core/forms/surrounds/surround_field_test.rb +27 -3
  60. data/test/ui/core/forms/texts/auto_complete_field_test.rb +2 -2
  61. data/test/ui/core/navigations/breadcrumb_test.rb +1 -1
  62. data/test/ui/core/navigations/link_test.rb +1 -1
  63. data/test/ui/core/navigations/nav_test.rb +2 -2
  64. data/test/ui/core/navigations/navbar_test.rb +2 -4
  65. data/test/ui/core/navigations/tab_group_test.rb +5 -5
  66. data/test/ui/core/notifications/alert_test.rb +1 -1
  67. data/test/ui/core/notifications/badge_test.rb +2 -2
  68. data/test/ui/utils/breakdown_class_name_generator_test.rb +14 -0
  69. data/test/ui/ux/containers/panel_test.rb +1 -1
  70. data/test/ui/ux/tables/table_test.rb +2 -2
  71. data/ui_bibz.gemspec +1 -1
  72. metadata +7 -6
@@ -16,7 +16,7 @@ class AlertTest < ActionView::TestCase
16
16
  a.header 'Information'
17
17
  a.body 'Body text'
18
18
  end
19
- expected = "<div class=\"alert-success alert alert-dismissible\" role=\"alert\"><h4 class=\"alert-header\"><i class=\"glyph fas fa-thumbs-o-up\"></i> Information<button type=\"button\" class=\"btn-close\" data-dismiss=\"alert\" aria-label=\"Close\"></button></h4><hr /><p class=\"alert-body mb-0\">Body text</p></div>"
19
+ expected = "<div class=\"alert-success alert alert-dismissible\" role=\"alert\"><h4 class=\"alert-header\"><i class=\"glyph fas fa-thumbs-o-up\"></i> Information<button type=\"button\" class=\"btn-close\" data-dismiss=\"alert\" aria-label=\"Close\"></button></h4><hr /><p class=\"alert-body mb-0\">Body text</p></div>"
20
20
 
21
21
  assert_equal expected, actual
22
22
  end
@@ -6,7 +6,7 @@ class BadgeTest < ActionView::TestCase
6
6
 
7
7
  test 'badge' do
8
8
  actual = ui_badge 'state', status: :success, glyph: 'pencil'
9
- expected = '<span class="bg-success badge"><i class="glyph fas fa-pencil"></i> state</span>'
9
+ expected = "<span class=\"bg-success badge\"><i class=\"glyph fas fa-pencil\"></i> state</span>"
10
10
 
11
11
  assert_equal expected, actual
12
12
  end
@@ -20,7 +20,7 @@ class BadgeTest < ActionView::TestCase
20
20
 
21
21
  test 'badge pill' do
22
22
  actual = ui_badge 'state', status: :success, type: :pill, glyph: 'pencil'
23
- expected = '<span class="bg-success badge rounded-pill"><i class="glyph fas fa-pencil"></i> state</span>'
23
+ expected = "<span class=\"bg-success badge rounded-pill\"><i class=\"glyph fas fa-pencil\"></i> state</span>"
24
24
 
25
25
  assert_equal expected, actual
26
26
  end
@@ -57,4 +57,18 @@ class BreakdownClassNameGeneratorTest < ActionView::TestCase
57
57
 
58
58
  assert_equal expected, actual
59
59
  end
60
+
61
+ test "name generator with order" do
62
+ actual = UiBibz::Utils::BreakdownClassNameGenerator.new(md: { num: 2 }, order: 2).class_names
63
+ expected = %w[col-md-2 order-2]
64
+
65
+ assert_equal expected, actual
66
+ end
67
+
68
+ test "name generator with md: 8" do
69
+ actual = UiBibz::Utils::BreakdownClassNameGenerator.new(md: 8).class_names
70
+ expected = ["col-md-8"]
71
+
72
+ assert_equal expected, actual
73
+ end
60
74
  end
@@ -35,7 +35,7 @@ class CardTest < ActionView::TestCase
35
35
  end
36
36
  p.footer 'Footer'
37
37
  end
38
- expected = "<div class=\"panel\"><div class=\"panel-header justify-content-between\"><div class=\"panel-title\">My header</div><div class=\"btn-group btn-group-sm\" role=\"group\"><button class=\"btn-outline-secondary btn btn-sm without-text\"><i class=\"glyph fas fa-caret-up\"></i><span class=\"empty-space\"> </span></button><button class=\"btn-outline-secondary btn btn-sm without-text\"><i class=\"glyph fas fa-cog\"></i><span class=\"empty-space\"> </span></button><button class=\"btn-outline-secondary btn btn-sm without-text\"><i class=\"glyph fas fa-Close\"></i><span class=\"empty-space\"> </span></button></div></div><div class=\"btn-toolbar justify-content-between panel-toolbar\" role=\"toolbar\"><div role=\"group\" class=\"btn-group btn-group-sm mr-2\"><button class=\"btn-secondary btn btn-sm\">Copy</button><button class=\"btn-secondary btn btn-sm\">Cut</button><button class=\"btn-secondary btn btn-sm\">Paste</button></div><div class=\"btn-group btn-group-sm\" role=\"group\"><button class=\"btn-secondary btn btn-sm\">Delete</button></div></div><div class=\"panel-body\">Body</div><div class=\"btn-toolbar panel-toolbar\" role=\"toolbar\"><div class=\"btn-group btn-group-sm\" role=\"group\"><button class=\"btn-success btn btn-sm without-text\"><i class=\"glyph fas fa-plus-circle\"></i><span class=\"empty-space\"> </span></button><button class=\"btn-danger btn btn-sm without-text\"><i class=\"glyph fas fa-minus-circle\"></i><span class=\"empty-space\"> </span></button></div></div><div class=\"panel-footer\">Footer</div></div>"
38
+ expected = "<div class=\"panel\"><div class=\"panel-header justify-content-between\"><div class=\"panel-title\">My header</div><div class=\"btn-group btn-group-sm\" role=\"group\"><button class=\"btn-outline-secondary btn btn-sm\"><i class=\"glyph fas fa-caret-up\"></i> <span class=\"visually-hidden\">Minimize</span></button><button class=\"btn-outline-secondary btn btn-sm\"><i class=\"glyph fas fa-cog\"></i> <span class=\"visually-hidden\">Options</span></button><button class=\"btn-outline-secondary btn btn-sm\"><i class=\"glyph fas fa-Close\"></i> <span class=\"visually-hidden\">Close</span></button></div></div><div class=\"btn-toolbar justify-content-between panel-toolbar\" role=\"toolbar\"><div role=\"group\" class=\"btn-group btn-group-sm mr-2\"><button class=\"btn-secondary btn btn-sm\">Copy</button><button class=\"btn-secondary btn btn-sm\">Cut</button><button class=\"btn-secondary btn btn-sm\">Paste</button></div><div class=\"btn-group btn-group-sm\" role=\"group\"><button class=\"btn-secondary btn btn-sm\">Delete</button></div></div><div class=\"panel-body\">Body</div><div class=\"btn-toolbar panel-toolbar\" role=\"toolbar\"><div class=\"btn-group btn-group-sm\" role=\"group\"><button class=\"btn-success btn btn-sm\"><i class=\"glyph fas fa-plus-circle\"></i> <span class=\"visually-hidden\">Add</span></button><button class=\"btn-danger btn btn-sm\"><i class=\"glyph fas fa-minus-circle\"></i> <span class=\"visually-hidden\">Remove</span></button></div></div><div class=\"panel-footer\">Footer</div></div>"
39
39
 
40
40
  assert_equal expected, actual
41
41
  end
@@ -26,7 +26,7 @@ class TableTest < ActionView::TestCase
26
26
 
27
27
  test 'table search field' do
28
28
  actual = UiBibz::Ui::Ux::Tables::TableSearchField.new({ store: @users }).render
29
- expected = "<form class=\"form-table-search-field\" action=\"/users?direction=asc&amp;page=1&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\" accept-charset=\"UTF-8\" method=\"get\"><div class=\"input-group input-group-sm table-search-field\"><span class=\"input-group-text\"><i class=\"glyph fas fa-search\"></i></span><input type=\"hidden\" name=\"sort\" value=\"users.name_fr\" /><input type=\"hidden\" name=\"direction\" value=\"asc\" /><input type=\"hidden\" name=\"per_page\" value=\"2\" /><input type=\"hidden\" name=\"page\" value=\"1\" /><input type=\"hidden\" name=\"only_path\" value=\"true\" /><input type=\"hidden\" name=\"link_type\" value=\"search\" /><input type=\"search\" value=\"Name fr\" name=\"search\" class=\"form-control\" placeholder=\"Search by Name fr and Name en...\" /><button type=\"button\" class=\"btn btn-secondary input-group-btn clear-search-btn\"><i class=\"glyph fas fa-times-circle\"></i></button></div></form>"
29
+ expected = "<form class=\"form-table-search-field\" action=\"/users?direction=asc&amp;page=1&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\" accept-charset=\"UTF-8\" method=\"get\"><div class=\"input-group input-group-sm table-search-field\"><span class=\"input-group-text\"><i class=\"glyph fas fa-search\"></i></span><input type=\"hidden\" name=\"sort\" value=\"users.name_fr\" /><input type=\"hidden\" name=\"direction\" value=\"asc\" /><input type=\"hidden\" name=\"per_page\" value=\"2\" /><input type=\"hidden\" name=\"page\" value=\"1\" /><input type=\"hidden\" name=\"only_path\" value=\"true\" /><input type=\"hidden\" name=\"link_type\" value=\"search\" /><input type=\"search\" value=\"Name fr\" name=\"search\" class=\"form-control\" placeholder=\"Search by Name fr and Name en...\" /><button type=\"button\" class=\"btn btn-secondary input-group-btn clear-search-btn\"><i class=\"glyph fas fa-times-circle\"></i> <span class=\"visually-hidden\">Clear Search</span></button></div></form>"
30
30
 
31
31
  assert_equal expected, actual
32
32
  end
@@ -97,7 +97,7 @@ class TableTest < ActionView::TestCase
97
97
  test 'table searchable' do
98
98
  options = { searchable: true }
99
99
  actual = UiBibz::Ui::Ux::Tables::Searchable.new(@store, options).render
100
- expected = "<div><div class=\"title\">Users list</div><form class=\"form-table-search-field\" action=\"/users?direction=asc&amp;page=1&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\" accept-charset=\"UTF-8\" method=\"get\"><div class=\"input-group input-group-sm table-search-field\"><span class=\"input-group-text\"><i class=\"glyph fas fa-search\"></i></span><input type=\"hidden\" name=\"sort\" value=\"users.name_fr\" /><input type=\"hidden\" name=\"direction\" value=\"asc\" /><input type=\"hidden\" name=\"per_page\" value=\"2\" /><input type=\"hidden\" name=\"page\" value=\"1\" /><input type=\"hidden\" name=\"only_path\" value=\"true\" /><input type=\"hidden\" name=\"link_type\" value=\"search\" /><input type=\"search\" value=\"Name fr\" name=\"search\" class=\"form-control\" placeholder=\"Search by Name fr and Name en...\" /><button type=\"button\" class=\"btn btn-secondary input-group-btn clear-search-btn\"><i class=\"glyph fas fa-times-circle\"></i></button></div></form><br class=\"ui-bibz-clear\" /></div>"
100
+ expected = "<div><div class=\"title\">Users list</div><form class=\"form-table-search-field\" action=\"/users?direction=asc&amp;page=1&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\" accept-charset=\"UTF-8\" method=\"get\"><div class=\"input-group input-group-sm table-search-field\"><span class=\"input-group-text\"><i class=\"glyph fas fa-search\"></i></span><input type=\"hidden\" name=\"sort\" value=\"users.name_fr\" /><input type=\"hidden\" name=\"direction\" value=\"asc\" /><input type=\"hidden\" name=\"per_page\" value=\"2\" /><input type=\"hidden\" name=\"page\" value=\"1\" /><input type=\"hidden\" name=\"only_path\" value=\"true\" /><input type=\"hidden\" name=\"link_type\" value=\"search\" /><input type=\"search\" value=\"Name fr\" name=\"search\" class=\"form-control\" placeholder=\"Search by Name fr and Name en...\" /><button type=\"button\" class=\"btn btn-secondary input-group-btn clear-search-btn\"><i class=\"glyph fas fa-times-circle\"></i> <span class=\"visually-hidden\">Clear Search</span></button></div></form><br class=\"ui-bibz-clear\" /></div>"
101
101
 
102
102
  assert_equal expected, actual
103
103
  end
@@ -12,7 +12,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
12
12
  Gem::Specification.new do |s|
13
13
  s.name = UiBibz::SLUG
14
14
  s.version = UiBibz::VERSION
15
- s.authors = UiBibz::AUTHORS
15
+ s.author = UiBibz::AUTHOR
16
16
  s.email = UiBibz::EMAIL
17
17
  s.homepage = UiBibz::HOMEPAGE
18
18
  s.summary = UiBibz::SUMMARY
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ui_bibz
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.alpha5
4
+ version: 3.0.0.alpha11
5
5
  platform: ruby
6
6
  authors:
7
- - Thooams
7
+ - Thooams [Thomas HUMMEL]
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-29 00:00:00.000000000 Z
11
+ date: 2020-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -240,7 +240,7 @@ dependencies:
240
240
  - - ">="
241
241
  - !ruby/object:Gem::Version
242
242
  version: '0'
243
- description: A Rails Interface Framework using Bootstrap 5.0.0.alpha2.
243
+ description: A Rails Interface Framework using Bootstrap 5.0.0.alpha3.
244
244
  email: thomas@hummel.link
245
245
  executables:
246
246
  - test
@@ -427,6 +427,7 @@ files:
427
427
  - lib/ui_bibz/ui/ux/containers/components/panel_footer.rb
428
428
  - lib/ui_bibz/ui/ux/containers/components/panel_group.rb
429
429
  - lib/ui_bibz/ui/ux/containers/components/panel_header.rb
430
+ - lib/ui_bibz/ui/ux/containers/components/panel_header_title.rb
430
431
  - lib/ui_bibz/ui/ux/containers/components/panel_tab_group.rb
431
432
  - lib/ui_bibz/ui/ux/containers/components/panel_toolbar.rb
432
433
  - lib/ui_bibz/ui/ux/containers/panel.rb
@@ -634,7 +635,7 @@ files:
634
635
  - vendor/assets/stylesheets/jquery.multi-select.min.css
635
636
  - vendor/assets/stylesheets/svg-with-js.css
636
637
  - vendor/assets/stylesheets/tether.min.css
637
- homepage: http://thooams.github.io/Ui-Bibz/
638
+ homepage: https://hummel.link/ui-bibz/
638
639
  licenses:
639
640
  - MIT
640
641
  metadata: {}
@@ -658,7 +659,7 @@ rubygems_version: 3.1.2
658
659
  signing_key:
659
660
  specification_version: 4
660
661
  summary: Ui Bibz is an Ui Framework that allows you to build an interface very quickly
661
- and simply using Bootstrap 5.0.0.alpha2.
662
+ and simply using Bootstrap 5.0.0.alpha3.
662
663
  test_files:
663
664
  - test/dummy/README.rdoc
664
665
  - test/dummy/Rakefile