ui_bibz 3.0.0.alpha6 → 3.0.0.alpha12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/Gemfile.lock +17 -14
- data/README.md +5 -1
- data/lib/ui_bibz/concerns/models/searchable.rb +1 -1
- data/lib/ui_bibz/infos.rb +4 -4
- data/lib/ui_bibz/inputs/ui_bibz_inputs/ui_text_field_input.rb +1 -1
- data/lib/ui_bibz/ui/concerns/html_concern.rb +10 -4
- data/lib/ui_bibz/ui/core/boxes/components/card_image.rb +5 -1
- data/lib/ui_bibz/ui/core/forms/buttons/button.rb +2 -11
- data/lib/ui_bibz/ui/core/forms/buttons/button_link.rb +1 -2
- data/lib/ui_bibz/ui/core/forms/buttons/button_refresh.rb +0 -1
- data/lib/ui_bibz/ui/core/forms/dropdowns/dropdown.rb +3 -1
- data/lib/ui_bibz/ui/core/forms/numbers/formula_field.rb +2 -0
- data/lib/ui_bibz/ui/core/forms/numbers/slider_header.rb +2 -2
- data/lib/ui_bibz/ui/core/forms/selects/dropdown_select_field.rb +35 -5
- data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button.rb +1 -9
- data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button_link.rb +1 -9
- data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_dropdown.rb +5 -4
- data/lib/ui_bibz/ui/core/icons/glyph.rb +9 -1
- data/lib/ui_bibz/ui/core/lists/list_group.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/components/nav_dropdown.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/components/nav_link_link.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/nav.rb +3 -3
- data/lib/ui_bibz/ui/core/navigations/navbar.rb +6 -4
- data/lib/ui_bibz/ui/core/navigations/tab_group.rb +5 -1
- data/lib/ui_bibz/ui/core/notifications/components/toast_header.rb +15 -1
- data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +9 -24
- data/lib/ui_bibz/ui/extensions/core/component/popover_extension.rb +1 -1
- data/lib/ui_bibz/ui/extensions/core/forms/surround_extension.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/table_pagination_per_page.rb +3 -3
- data/lib/ui_bibz/ui/ux/tables/table_search_field.rb +4 -4
- data/test/simple_form_test.rb +4 -4
- data/test/ui/core/boxes/card_test.rb +2 -2
- data/test/ui/core/component_test.rb +2 -2
- data/test/ui/core/forms/buttons/button_group_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_link_test.rb +1 -8
- data/test/ui/core/forms/buttons/button_refresh_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_test.rb +2 -9
- data/test/ui/core/forms/choices/choice_group_test.rb +3 -3
- data/test/ui/core/forms/dropdowns/dropdown_test.rb +1 -1
- data/test/ui/core/forms/selects/multi_select_field_test.rb +3 -3
- data/test/ui/core/forms/selects/select_field_test.rb +1 -1
- data/test/ui/core/forms/surrounds/surround_field_test.rb +4 -4
- data/test/ui/core/forms/texts/auto_complete_field_test.rb +2 -2
- data/test/ui/core/lists/list_group_test.rb +1 -1
- data/test/ui/core/navigations/breadcrumb_test.rb +1 -1
- data/test/ui/core/navigations/link_test.rb +1 -1
- data/test/ui/core/navigations/nav_test.rb +2 -2
- data/test/ui/core/navigations/tab_group_test.rb +5 -5
- data/test/ui/core/notifications/alert_test.rb +1 -1
- data/test/ui/core/notifications/badge_test.rb +2 -2
- data/test/ui/ux/containers/panel_test.rb +1 -1
- data/test/ui/ux/tables/table_test.rb +2 -2
- data/ui_bibz.gemspec +2 -1
- metadata +20 -6
@@ -39,7 +39,7 @@ class DropdownTest < ActionView::TestCase
|
|
39
39
|
d.divider
|
40
40
|
d.link 'Link3', url: '#link3'
|
41
41
|
end
|
42
|
-
expected = "<div class=\"dropup btn-group\"><button class=\"btn btn-success dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\" id=\"#{actual.id}\"><i class=\"glyph fas fa-diamond\"></i>
|
42
|
+
expected = "<div class=\"dropup btn-group\"><button class=\"btn btn-success dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\" id=\"#{actual.id}\"><i class=\"glyph fas fa-diamond\"></i> Dropdown</button><div class=\"dropdown-menu dropdown-menu-right\" arial-labelledby=\"#{actual.id}\"><a class=\"dropdown-item\" href=\"#link1\"><i class=\"glyph fas fa-eye\"></i> Link 1</a><h6 class=\"dropdown-header\" role=\"presentation\">header</h6><a class=\"dropdown-item\" href=\"#link2\">Link 2</a><div class=\"dropdown-divider\"></div><a class=\"dropdown-item\" href=\"#link3\">Link3</a></div></div>"
|
43
43
|
|
44
44
|
assert_equal expected, actual.render
|
45
45
|
end
|
@@ -6,7 +6,7 @@ class DropdownSelectFieldTest < ActionView::TestCase
|
|
6
6
|
test 'Multi Select Field' do
|
7
7
|
options = options_for_select(Array.new(2) { |i| "option #{i}" })
|
8
8
|
actual = UiBibz::Ui::Core::Forms::Selects::DropdownSelectField.new('example', multiple: true, option_tags: options).render
|
9
|
-
expected = "<select name=\"example[]\" id=\"example\" class=\"btn-secondary multi-select-field\" multiple=\"multiple\"><option value=\"option 0\">option 0</option>
|
9
|
+
expected = "<select name=\"example[]\" id=\"example\" data-dropdown-classes=\"dropdown\" class=\"btn-secondary multi-select-field\" multiple=\"multiple\"><option value=\"option 0\">option 0</option>
|
10
10
|
<option value=\"option 1\">option 1</option></select>"
|
11
11
|
|
12
12
|
assert_equal expected, actual
|
@@ -15,7 +15,7 @@ class DropdownSelectFieldTest < ActionView::TestCase
|
|
15
15
|
test 'Multi Select Field data html options' do
|
16
16
|
grouped_options = { 'North America' => [['United statuss', 'US'], 'Canada'], 'Europe' => %w[Denmark Germany France] }
|
17
17
|
actual = UiBibz::Ui::Core::Forms::Selects::DropdownSelectField.new('example', { multiple: true, option_tags: grouped_options_for_select(grouped_options), clickable_opt_group: true, collapsible_opt_group: true, searchable: true, select_all_options: true, number_displayed: 2, status: :danger }).render
|
18
|
-
expected = "<select name=\"example[]\" id=\"example\" data-enable-clickable-opt-groups=\"true\" data-enable-collapsible-opt-groups=\"true\" data-enable-filtering=\"true\" data-include-select-all-option=\"true\" data-number-displayed=\"true\" class=\"btn-danger multi-select-field\" multiple=\"multiple\"><optgroup label=\"North America\"><option value=\"US\">United statuss</option>
|
18
|
+
expected = "<select name=\"example[]\" id=\"example\" data-enable-clickable-opt-groups=\"true\" data-enable-collapsible-opt-groups=\"true\" data-enable-filtering=\"true\" data-include-select-all-option=\"true\" data-number-displayed=\"true\" data-dropdown-classes=\"dropdown\" class=\"btn-danger multi-select-field\" multiple=\"multiple\"><optgroup label=\"North America\"><option value=\"US\">United statuss</option>
|
19
19
|
<option value=\"Canada\">Canada</option></optgroup><optgroup label=\"Europe\"><option value=\"Denmark\">Denmark</option>
|
20
20
|
<option value=\"Germany\">Germany</option>
|
21
21
|
<option value=\"France\">France</option></optgroup></select>"
|
@@ -25,7 +25,7 @@ class DropdownSelectFieldTest < ActionView::TestCase
|
|
25
25
|
|
26
26
|
test 'Multi select Field refresh option' do
|
27
27
|
actual = UiBibz::Ui::Core::Forms::Selects::DropdownSelectField.new('test', { multiple: true, refresh: { target: { url: '/' } } }).render
|
28
|
-
expected =
|
28
|
+
expected = "<div class=\"field-refresh input-group ui_surround_field\"><select name=\"test[]\" id=\"test\" data-dropdown-classes=\"dropdown\" class=\"btn-secondary multi-select-field\" multiple=\"multiple\"></select><span data-connect=\"{"events":"click","mode":"remote","target":{"selector":"#test","url":"/","data":[]}}\" class=\"btn-secondary ui-bibz-connect btn input-refresh-button\"><i class=\"glyph fas fa-sync-alt\"></i></span></div>"
|
29
29
|
|
30
30
|
assert_equal expected, actual
|
31
31
|
end
|
@@ -14,7 +14,7 @@ class SelectFieldTest < ActionView::TestCase
|
|
14
14
|
|
15
15
|
test 'Select Field refresh' do
|
16
16
|
actual = UiBibz::Ui::Core::Forms::Selects::SelectField.new('example', refresh: { target: { url: '/' } }).render
|
17
|
-
expected =
|
17
|
+
expected = "<div class=\"field-refresh input-group ui_surround_field\"><select name=\"example\" id=\"example\" class=\"select-field form-control form-select\"></select><span data-connect=\"{"events":"click","mode":"remote","target":{"selector":"#example","url":"/","data":[]}}\" class=\"btn-secondary ui-bibz-connect btn input-refresh-button\"><i class=\"glyph fas fa-sync-alt\"></i></span></div>"
|
18
18
|
|
19
19
|
assert_equal expected, actual
|
20
20
|
end
|
@@ -31,7 +31,7 @@ class SurroundFieldTest < ActionView::TestCase
|
|
31
31
|
d.link 'Link3', url: '#link3'
|
32
32
|
end
|
33
33
|
end.render
|
34
|
-
expected =
|
34
|
+
expected = "<div class=\"input-group ui_surround_field\"><button class=\"btn btn-secondary dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\" id=\"dropdown-test\">Dropdown</button><div class=\"dropdown-menu\" arial-labelledby=\"dropdown-test\"><a class=\"dropdown-item\" href=\"#link1\"><i class=\"glyph fas fa-eye\"></i> Link 1</a><h6 class=\"dropdown-header\" role=\"presentation\">header</h6><a class=\"dropdown-item\" href=\"#link2\">Link 2</a><div class=\"dropdown-divider\"></div><a class=\"dropdown-item\" href=\"#link3\">Link3</a></div></div>"
|
35
35
|
|
36
36
|
assert_equal expected, actual
|
37
37
|
end
|
@@ -40,7 +40,7 @@ class SurroundFieldTest < ActionView::TestCase
|
|
40
40
|
actual = UiBibz::Ui::Core::Forms::Surrounds::SurroundField.new.tap do |sf|
|
41
41
|
sf.button 'Submit'
|
42
42
|
end.render
|
43
|
-
expected =
|
43
|
+
expected = "<div class=\"input-group ui_surround_field\"><button class=\"btn-secondary btn\">Submit</button></div>"
|
44
44
|
|
45
45
|
assert_equal expected, actual
|
46
46
|
end
|
@@ -51,7 +51,7 @@ class SurroundFieldTest < ActionView::TestCase
|
|
51
51
|
sf.addon '€'
|
52
52
|
sf.glyph 'pencil'
|
53
53
|
end.render
|
54
|
-
expected =
|
54
|
+
expected = "<div class=\"input-group ui_surround_field\"><button class=\"btn-secondary btn\">Submit</button><span class=\"input-group-text\">€</span><span class=\"input-group-text\"><i class=\"glyph fas fa-pencil\"></i></span></div>"
|
55
55
|
|
56
56
|
assert_equal expected, actual
|
57
57
|
end
|
@@ -87,7 +87,7 @@ class SurroundFieldTest < ActionView::TestCase
|
|
87
87
|
sf.button_refresh
|
88
88
|
end.render
|
89
89
|
|
90
|
-
expected = "<div class=\"input-group ui_surround_field\"><span class=\"input-group-text\"><i class=\"glyph fas fa-gem\"></i></span><span class=\"input-group-text\">test</span><
|
90
|
+
expected = "<div class=\"input-group ui_surround_field\"><span class=\"input-group-text\"><i class=\"glyph fas fa-gem\"></i></span><span class=\"input-group-text\">test</span><button class=\"btn-secondary btn\">button</button><div class=\"input-group-btn\" role=\"group\"><button class=\"btn-secondary btn\">test</button></div><a class=\"btn-secondary btn\" role=\"button\" href=\"#\">link</a><div class=\"input-group-text\" label=\"false\"><input type=\"checkbox\" name=\"check\" id=\"check\" value=\"1\" class=\"form-check-input\" /><label class=\"form-check-label\" for=\"check\">check</label></div><div class=\"input-group-text\" label=\"false\"><input type=\"radio\" name=\"radio\" id=\"radio_\" class=\"form-check-input\" /><label class=\"form-check-label\" for=\"radio_\">radio</label></div><input type=\"text\" name=\"text\" id=\"text\" class=\"form-control\" /><input type=\"text\" name=\"date\" id=\"date\" data-date-locale=\"en\" data-provide=\"datepicker\" data-date-format=\"yyyy-mm-dd\" data-date-today-btn=\"linked\" data-date-toggle-active=\"true\" class=\"date_picker form-control\" /><select name=\"dropdown_select\" id=\"dropdown_select\" data-wrapper-classes=\"input-group-btn\" data-dropdown-classes=\"dropdown\" class=\"btn-secondary multi-select-field\"></select><select name=\"select\" id=\"select\" class=\"select-field form-control form-select\"></select><input type=\"text\" name=\"auto\" id=\"auto\" class=\"form-control auto-complete-field\" autocomplete=\"true\" list=\"auto-datalist\" /><datalist id=\"auto-datalist\"></datalist><span data-connect=\"{"events":"click","mode":"remote","target":{"selector":"","url":"","data":[]}}\" class=\"btn-secondary ui-bibz-connect btn input-refresh-button\"><i class=\"glyph fas fa-sync-alt\"></i></span></div>"
|
91
91
|
|
92
92
|
assert_equal expected, actual
|
93
93
|
end
|
@@ -16,7 +16,7 @@ class AutoCompleteFieldTest < ActionView::TestCase
|
|
16
16
|
options = options_for_select(Array.new(2) { |i| "option #{i}" })
|
17
17
|
actual = UiBibz::Ui::Core::Forms::Texts::AutoCompleteField.new('test', { option_tags: options, refresh: { target: { url: '/' } } }, { id: 'test' }).render
|
18
18
|
expected = "<div class=\"field-refresh input-group ui_surround_field\"><input type=\"text\" name=\"test\" id=\"test\" class=\"form-control auto-complete-field\" autocomplete=\"true\" list=\"test-datalist\" /><datalist id=\"test-datalist\"><option value=\"option 0\">option 0</option>
|
19
|
-
<option value=\"option 1\">option 1</option></datalist><span data-connect=\"{"events":"click","mode":"remote","target":{"selector":"#test-datalist","url":"/","data":[]}}\" class=\"btn-secondary ui-bibz-connect btn input-refresh-button\"><i class=\"glyph fas fa-sync-alt\"></i
|
19
|
+
<option value=\"option 1\">option 1</option></datalist><span data-connect=\"{"events":"click","mode":"remote","target":{"selector":"#test-datalist","url":"/","data":[]}}\" class=\"btn-secondary ui-bibz-connect btn input-refresh-button\"><i class=\"glyph fas fa-sync-alt\"></i></span></div>"
|
20
20
|
|
21
21
|
assert_equal expected, actual
|
22
22
|
end
|
@@ -25,7 +25,7 @@ class AutoCompleteFieldTest < ActionView::TestCase
|
|
25
25
|
options = options_for_select(Array.new(2) { |i| "option #{i}" })
|
26
26
|
actual = UiBibz::Ui::Core::Forms::Texts::AutoCompleteField.new('test', { option_tags: options, append: 'Append content', refresh: { target: { url: '/' } } }, { id: 'test' }).render
|
27
27
|
expected = "<div class=\"field-refresh input-group ui_surround_field\"><span class=\"input-group-text\">Append content</span><input type=\"text\" name=\"test\" id=\"test\" class=\"form-control auto-complete-field\" autocomplete=\"true\" list=\"test-datalist\" /><datalist id=\"test-datalist\"><option value=\"option 0\">option 0</option>
|
28
|
-
<option value=\"option 1\">option 1</option></datalist><span data-connect=\"{"events":"click","mode":"remote","target":{"selector":"#test-datalist","url":"/","data":[]}}\" class=\"btn-secondary ui-bibz-connect btn input-refresh-button\"><i class=\"glyph fas fa-sync-alt\"></i
|
28
|
+
<option value=\"option 1\">option 1</option></datalist><span data-connect=\"{"events":"click","mode":"remote","target":{"selector":"#test-datalist","url":"/","data":[]}}\" class=\"btn-secondary ui-bibz-connect btn input-refresh-button\"><i class=\"glyph fas fa-sync-alt\"></i></span></div>"
|
29
29
|
|
30
30
|
assert_equal expected, actual
|
31
31
|
end
|
@@ -13,7 +13,7 @@ class ListGroupTest < ActionView::TestCase
|
|
13
13
|
l.body 'My body'
|
14
14
|
end
|
15
15
|
end
|
16
|
-
expected =
|
16
|
+
expected = "<div class=\"list-group\"><a href=\"#momo\" class=\"list-group-item-success list-group-item list-group-item-action\">Momo</a><a href=\"#state\" class=\"list-group-item list-group-item-action\"><div class=\"d-flex w-100 justify-content-between\"><h5 class=\"mb-1\">My title</h5><small></small></div><p class=\"mb-1\">My body</p><small></small></a></div>"
|
17
17
|
|
18
18
|
assert_equal expected, actual
|
19
19
|
end
|
@@ -10,7 +10,7 @@ class BreadcrumbTest < ActionView::TestCase
|
|
10
10
|
b.link 'Home', url: '#home', glyph: 'home'
|
11
11
|
b.link 'state', { url: '#state', state: :active }
|
12
12
|
end
|
13
|
-
expected =
|
13
|
+
expected = "<nav arial-label=\"breadcrumb\"><ol class=\"breadcrumb\"><li class=\"breadcrumb-item\"><a href=\"#home\"><i class=\"glyph fas fa-home\"></i> Home</a></li><li class=\"active breadcrumb-item\"><a href=\"#state\">state</a></li></ol></nav>"
|
14
14
|
|
15
15
|
assert_equal expected, actual
|
16
16
|
end
|
@@ -13,7 +13,7 @@ class LinkTest < ActionView::TestCase
|
|
13
13
|
|
14
14
|
test 'Link without text' do
|
15
15
|
actual = ui_link 'My link', glyph: 'gem', text: false, url: '#link'
|
16
|
-
expected =
|
16
|
+
expected = "<a href=\"#link\"><i class=\"glyph fas fa-gem\"></i> <span class=\"visually-hidden\">My link</span></a>"
|
17
17
|
|
18
18
|
assert_equal expected, actual
|
19
19
|
end
|
@@ -10,7 +10,7 @@ class NavTest < ActionView::TestCase
|
|
10
10
|
n.link 'Profile', url: '#profile', selector: 'profile'
|
11
11
|
n.link 'Messages', url: '#messages', selector: 'messages'
|
12
12
|
end
|
13
|
-
expected = "<ul class=\"nav nav-tabs\"><li class=\"nav-item\"><a href=\"#Home\" class=\"active nav-link\" data-toggle=\"tab\" role=\"tab\">Home</a></li><li class=\"nav-item\"><a href=\"#profile\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Profile</a></li><li class=\"nav-item\"><a href=\"#messages\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Messages</a></li></ul>"
|
13
|
+
expected = "<ul class=\"nav nav-tabs\" role=\"tablist\"><li class=\"nav-item\"><a href=\"#Home\" class=\"active nav-link\" data-toggle=\"tab\" role=\"tab\">Home</a></li><li class=\"nav-item\"><a href=\"#profile\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Profile</a></li><li class=\"nav-item\"><a href=\"#messages\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Messages</a></li></ul>"
|
14
14
|
|
15
15
|
assert_equal expected, actual
|
16
16
|
end
|
@@ -65,7 +65,7 @@ class NavTest < ActionView::TestCase
|
|
65
65
|
n.link 'Profile', url: '#profile', selector: 'profile', label: 16
|
66
66
|
n.link 'Messages', url: '#messages', selector: 'messages', state: :disabled
|
67
67
|
end
|
68
|
-
expected = "<div class=\"list-group\" role=\"tablist\"><a href=\"#Home\" class=\"active list-group-item list-group-item-action\" data-toggle=\"tab\" role=\"tab\" aria-controls=\"
|
68
|
+
expected = "<div class=\"list-group\" role=\"tablist\"><a href=\"#Home\" class=\"active list-group-item list-group-item-action\" data-toggle=\"tab\" role=\"tab\" aria-controls=\"home\">Home</a><a href=\"#profile\" class=\"list-group-item list-group-item-action\" data-toggle=\"tab\" role=\"tab\" aria-controls=\"profile\">Profile</a><a href=\"#messages\" class=\"disabled list-group-item list-group-item-action\" data-toggle=\"tab\" role=\"tab\" aria-controls=\"messages\">Messages</a></div>"
|
69
69
|
|
70
70
|
assert_equal expected, actual
|
71
71
|
end
|
@@ -10,7 +10,7 @@ class TabGroupTest < ActionView::TestCase
|
|
10
10
|
n.tab 'Profile', url: '#profile', selector: 'profile'
|
11
11
|
n.tab 'Messages', url: '#messages', selector: 'messages'
|
12
12
|
end
|
13
|
-
expected = "<ul class=\"nav nav-tabs\"><li class=\"nav-item\"><a href=\"#Home\" class=\"active nav-link\" data-toggle=\"tab\" role=\"tab\">Home</a></li><li class=\"nav-item\"><a href=\"#profile\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Profile</a></li><li class=\"nav-item\"><a href=\"#messages\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Messages</a></li></ul>"
|
13
|
+
expected = "<ul class=\"nav nav-tabs\" role=\"tablist\"><li class=\"nav-item\"><a href=\"#Home\" class=\"active nav-link\" data-toggle=\"tab\" role=\"tab\">Home</a></li><li class=\"nav-item\"><a href=\"#profile\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Profile</a></li><li class=\"nav-item\"><a href=\"#messages\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Messages</a></li></ul>"
|
14
14
|
|
15
15
|
assert_equal expected, actual
|
16
16
|
end
|
@@ -21,7 +21,7 @@ class TabGroupTest < ActionView::TestCase
|
|
21
21
|
n.tab 'Profile', url: '#profile', selector: 'profile'
|
22
22
|
n.tab 'Messages', url: '#messages', selector: 'messages'
|
23
23
|
end
|
24
|
-
expected = "<ul class=\"nav nav-tabs\"><li class=\"nav-item\"><a href=\"#Home\" class=\"active nav-link\" data-toggle=\"tab\" role=\"tab\">Home</a></li><li class=\"nav-item\"><a href=\"#profile\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Profile</a></li><li class=\"nav-item\"><a href=\"#messages\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Messages</a></li></ul>"
|
24
|
+
expected = "<ul class=\"nav nav-tabs\" role=\"tablist\"><li class=\"nav-item\"><a href=\"#Home\" class=\"active nav-link\" data-toggle=\"tab\" role=\"tab\">Home</a></li><li class=\"nav-item\"><a href=\"#profile\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Profile</a></li><li class=\"nav-item\"><a href=\"#messages\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Messages</a></li></ul>"
|
25
25
|
|
26
26
|
assert_equal expected, actual
|
27
27
|
end
|
@@ -32,7 +32,7 @@ class TabGroupTest < ActionView::TestCase
|
|
32
32
|
n.tab 'Profile', url: '#profile', selector: 'profile'
|
33
33
|
n.tab 'Messages', url: '#messages', selector: 'messages'
|
34
34
|
end
|
35
|
-
expected =
|
35
|
+
expected = "<ul class=\"nav nav-tabs\" role=\"tablist\"><li class=\"nav-item\"><span class=\"active nav-link\" data-toggle=\"tab\" role=\"tab\">Home</span></li><li class=\"nav-item\"><span class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Profile</span></li><li class=\"nav-item\"><span class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Messages</span></li></ul>"
|
36
36
|
|
37
37
|
assert_equal expected, actual
|
38
38
|
end
|
@@ -43,7 +43,7 @@ class TabGroupTest < ActionView::TestCase
|
|
43
43
|
n.tab 'Profile', url: '#profile', selector: 'profile', label: 16
|
44
44
|
n.tab 'Messages', url: '#messages', selector: 'messages', state: :disabled
|
45
45
|
end
|
46
|
-
expected = "<ul class=\"nav nav-tabs justify-content-end\"><li class=\"nav-item\"><a href=\"#Home\" class=\"active nav-link\" data-toggle=\"tab\" role=\"tab\">Home</a></li><li class=\"nav-item\"><a href=\"#profile\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Profile</a></li><li class=\"nav-item\"><a href=\"#messages\" class=\"disabled nav-link\" data-toggle=\"tab\" role=\"tab\">Messages</a></li></ul>"
|
46
|
+
expected = "<ul class=\"nav nav-tabs justify-content-end\" role=\"tablist\"><li class=\"nav-item\"><a href=\"#Home\" class=\"active nav-link\" data-toggle=\"tab\" role=\"tab\">Home</a></li><li class=\"nav-item\"><a href=\"#profile\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Profile</a></li><li class=\"nav-item\"><a href=\"#messages\" class=\"disabled nav-link\" data-toggle=\"tab\" role=\"tab\">Messages</a></li></ul>"
|
47
47
|
|
48
48
|
assert_equal expected, actual
|
49
49
|
end
|
@@ -54,7 +54,7 @@ class TabGroupTest < ActionView::TestCase
|
|
54
54
|
n.tab 'Profile', url: '#profile', selector: 'profile', label: 16
|
55
55
|
n.tab 'Messages', url: '#messages', selector: 'messages', state: :disabled
|
56
56
|
end
|
57
|
-
expected = "<ul class=\"nav nav-tabs\"><li class=\"nav-item\"><a href=\"#Home\" class=\"active nav-link\" data-toggle=\"tab\" role=\"tab\">Home</a></li><li class=\"nav-item\"><a href=\"#profile\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Profile</a></li><li class=\"nav-item\"><a href=\"#messages\" class=\"disabled nav-link\" data-toggle=\"tab\" role=\"tab\">Messages</a></li></ul>"
|
57
|
+
expected = "<ul class=\"nav nav-tabs\" role=\"tablist\"><li class=\"nav-item\"><a href=\"#Home\" class=\"active nav-link\" data-toggle=\"tab\" role=\"tab\">Home</a></li><li class=\"nav-item\"><a href=\"#profile\" class=\"nav-link\" data-toggle=\"tab\" role=\"tab\">Profile</a></li><li class=\"nav-item\"><a href=\"#messages\" class=\"disabled nav-link\" data-toggle=\"tab\" role=\"tab\">Messages</a></li></ul>"
|
58
58
|
|
59
59
|
assert_equal expected, actual
|
60
60
|
end
|
@@ -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>
|
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 =
|
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 =
|
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
|
@@ -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
|
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&page=1&per_page=2&search=Name+fr&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&page=1&per_page=2&search=Name+fr&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&page=1&per_page=2&search=Name+fr&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&page=1&per_page=2&search=Name+fr&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
|
data/ui_bibz.gemspec
CHANGED
@@ -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.
|
15
|
+
s.author = UiBibz::AUTHOR
|
16
16
|
s.email = UiBibz::EMAIL
|
17
17
|
s.homepage = UiBibz::HOMEPAGE
|
18
18
|
s.summary = UiBibz::SUMMARY
|
@@ -41,6 +41,7 @@ Gem::Specification.new do |s|
|
|
41
41
|
s.add_development_dependency 'minitest'
|
42
42
|
s.add_development_dependency 'overcommit'
|
43
43
|
s.add_development_dependency 'rubocop'
|
44
|
+
s.add_development_dependency 'rubocop-ast'
|
44
45
|
s.add_development_dependency 'rubocop-minitest'
|
45
46
|
s.add_development_dependency 'rubocop-performance'
|
46
47
|
s.add_development_dependency 'rubocop-rails'
|
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.
|
4
|
+
version: 3.0.0.alpha12
|
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-
|
11
|
+
date: 2020-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -156,6 +156,20 @@ dependencies:
|
|
156
156
|
- - ">="
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '0'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: rubocop-ast
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
159
173
|
- !ruby/object:Gem::Dependency
|
160
174
|
name: rubocop-minitest
|
161
175
|
requirement: !ruby/object:Gem::Requirement
|
@@ -240,7 +254,7 @@ dependencies:
|
|
240
254
|
- - ">="
|
241
255
|
- !ruby/object:Gem::Version
|
242
256
|
version: '0'
|
243
|
-
description: A Rails Interface Framework using Bootstrap 5.0.0.
|
257
|
+
description: A Rails Interface Framework using Bootstrap 5.0.0.alpha3.
|
244
258
|
email: thomas@hummel.link
|
245
259
|
executables:
|
246
260
|
- test
|
@@ -635,7 +649,7 @@ files:
|
|
635
649
|
- vendor/assets/stylesheets/jquery.multi-select.min.css
|
636
650
|
- vendor/assets/stylesheets/svg-with-js.css
|
637
651
|
- vendor/assets/stylesheets/tether.min.css
|
638
|
-
homepage:
|
652
|
+
homepage: https://hummel.link/ui-bibz/
|
639
653
|
licenses:
|
640
654
|
- MIT
|
641
655
|
metadata: {}
|
@@ -659,7 +673,7 @@ rubygems_version: 3.1.2
|
|
659
673
|
signing_key:
|
660
674
|
specification_version: 4
|
661
675
|
summary: Ui Bibz is an Ui Framework that allows you to build an interface very quickly
|
662
|
-
and simply using Bootstrap 5.0.0.
|
676
|
+
and simply using Bootstrap 5.0.0.alpha3.
|
663
677
|
test_files:
|
664
678
|
- test/dummy/README.rdoc
|
665
679
|
- test/dummy/Rakefile
|