ui_bibz 1.2.5.3 → 2.0.0.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +10 -7
- data/README.md +8 -1042
- data/app/assets/javascripts/multi_column.coffee +45 -0
- data/app/assets/javascripts/{ui_bibz.js.coffee → ui_bibz.coffee} +16 -3
- data/app/assets/stylesheets/fix-bootstrap-4.sass +2 -0
- data/app/assets/stylesheets/ui_bibz.sass +22 -9
- data/app/inputs/custom_inputs/date_picker_input.rb +10 -0
- data/app/inputs/custom_inputs/date_picker_input_old.rb +61 -0
- data/app/inputs/custom_inputs/multi_column_input.rb +18 -0
- data/app/inputs/custom_inputs/multi_select_input.rb +15 -0
- data/app/inputs/custom_inputs/surround_input.rb +10 -0
- data/doc/UiBibz.html +2 -2
- data/doc/UiBibz/Concerns.html +1 -1
- data/doc/UiBibz/Concerns/Models.html +1 -1
- data/doc/UiBibz/Concerns/Models/Searchable.html +1 -1
- data/doc/UiBibz/Concerns/Models/Searchable/ClassMethods.html +5 -5
- data/doc/UiBibz/Helpers.html +1 -1
- data/doc/UiBibz/Helpers/MetaHelper.html +1 -1
- data/doc/UiBibz/Helpers/UiCoreHelper.html +1 -1
- data/doc/UiBibz/Helpers/UiUxHelper.html +1 -1
- data/doc/UiBibz/Helpers/UtilsHelper.html +1 -1
- data/doc/UiBibz/Rails.html +1 -1
- data/doc/UiBibz/Rails/Engine.html +1 -1
- data/doc/UiBibz/Ui.html +1 -1
- data/doc/UiBibz/Ui/Base.html +1 -1
- data/doc/UiBibz/Ui/Core.html +1 -1
- data/doc/UiBibz/Ui/Core/Alert.html +1 -1
- data/doc/UiBibz/Ui/Core/Bar.html +1 -1
- data/doc/UiBibz/Ui/Core/Breadcrumb.html +1 -1
- data/doc/UiBibz/Ui/Core/BreadcrumbLink.html +1 -1
- data/doc/UiBibz/Ui/Core/Button.html +1 -1
- data/doc/UiBibz/Ui/Core/ButtonDropdown.html +1 -1
- data/doc/UiBibz/Ui/Core/ButtonGroup.html +1 -1
- data/doc/UiBibz/Ui/Core/ButtonLink.html +1 -1
- data/doc/UiBibz/Ui/Core/ButtonSplitDropdown.html +1 -1
- data/doc/UiBibz/Ui/Core/Col.html +1 -1
- data/doc/UiBibz/Ui/Core/Component.html +1 -1
- data/doc/UiBibz/Ui/Core/Dropdown.html +1 -1
- data/doc/UiBibz/Ui/Core/DropdownDivider.html +1 -1
- data/doc/UiBibz/Ui/Core/DropdownHeader.html +1 -1
- data/doc/UiBibz/Ui/Core/DropdownLink.html +1 -1
- data/doc/UiBibz/Ui/Core/Glyph.html +1 -1
- data/doc/UiBibz/Ui/Core/Jumbotron.html +1 -1
- data/doc/UiBibz/Ui/Core/Label.html +1 -1
- data/doc/UiBibz/Ui/Core/List.html +1 -1
- data/doc/UiBibz/Ui/Core/ListGroup.html +1 -1
- data/doc/UiBibz/Ui/Core/Modal.html +1 -1
- data/doc/UiBibz/Ui/Core/ModalBody.html +1 -1
- data/doc/UiBibz/Ui/Core/ModalFooter.html +1 -1
- data/doc/UiBibz/Ui/Core/ModalHeader.html +1 -1
- data/doc/UiBibz/Ui/Core/Nav.html +1 -1
- data/doc/UiBibz/Ui/Core/NavDropdown.html +1 -1
- data/doc/UiBibz/Ui/Core/NavLink.html +1 -1
- data/doc/UiBibz/Ui/Core/Navbar.html +1 -1
- data/doc/UiBibz/Ui/Core/NavbarForm.html +1 -1
- data/doc/UiBibz/Ui/Core/NavbarNav.html +1 -1
- data/doc/UiBibz/Ui/Core/NavbarText.html +1 -1
- data/doc/UiBibz/Ui/Core/Panel.html +1 -1
- data/doc/UiBibz/Ui/Core/ProgressBar.html +1 -1
- data/doc/UiBibz/Ui/Core/Row.html +1 -1
- data/doc/UiBibz/Ui/Core/Stars.html +1 -1
- data/doc/UiBibz/Ui/Ux.html +1 -1
- data/doc/UiBibz/Ui/Ux/Actionable.html +1 -1
- data/doc/UiBibz/Ui/Ux/Actions.html +1 -1
- data/doc/UiBibz/Ui/Ux/Column.html +1 -1
- data/doc/UiBibz/Ui/Ux/Columns.html +1 -1
- data/doc/UiBibz/Ui/Ux/Grid.html +1 -1
- data/doc/UiBibz/Ui/Ux/Paginable.html +1 -1
- data/doc/UiBibz/Ui/Ux/Searchable.html +1 -1
- data/doc/UiBibz/Ui/Ux/Sortable.html +1 -1
- data/doc/UiBibz/Ui/Ux/Store.html +18 -70
- data/doc/UiBibz/Ui/Ux/Table.html +1 -1
- data/doc/UiBibz/Ui/Ux/TablePagination.html +1 -1
- data/doc/UiBibz/Ui/Ux/TablePaginationPerPage.html +1 -1
- data/doc/UiBibz/Ui/Ux/TablePanel.html +1 -1
- data/doc/UiBibz/Ui/Ux/TableSearchField.html +1 -1
- data/doc/UiBibz/Utils.html +1 -1
- data/doc/UiBibz/Utils/Internationalization.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +47 -51
- data/doc/index.html +47 -51
- data/doc/method_list.html +69 -75
- data/doc/top-level-namespace.html +1 -1
- data/lib/ui_bibz.rb +14 -7
- data/lib/ui_bibz/helpers/ui_core_helper.rb +46 -11
- data/lib/ui_bibz/helpers/ui_ux_helper.rb +7 -3
- data/lib/ui_bibz/rails/engine.rb +2 -2
- data/lib/ui_bibz/ui/base.rb +5 -0
- data/lib/ui_bibz/ui/core/alert.rb +15 -6
- data/lib/ui_bibz/ui/core/breadcrumb/breadcrumb.rb +37 -2
- data/lib/ui_bibz/ui/core/breadcrumb/components/breadcrumb_link.rb +3 -3
- data/lib/ui_bibz/ui/core/button/button.rb +39 -6
- data/lib/ui_bibz/ui/core/button/button_choice.rb +104 -0
- data/lib/ui_bibz/ui/core/button/button_dropdown.rb +15 -2
- data/lib/ui_bibz/ui/core/button/button_group.rb +17 -5
- data/lib/ui_bibz/ui/core/button/button_link.rb +8 -11
- data/lib/ui_bibz/ui/core/button/button_split_dropdown.rb +15 -5
- data/lib/ui_bibz/ui/core/card/card.rb +158 -0
- data/lib/ui_bibz/ui/core/card/card_column.rb +60 -0
- data/lib/ui_bibz/ui/core/card/card_deck.rb +62 -0
- data/lib/ui_bibz/ui/core/card/card_group.rb +60 -0
- data/lib/ui_bibz/ui/core/card/components/block/card_block_link.rb +51 -0
- data/lib/ui_bibz/ui/core/card/components/block/card_block_text.rb +51 -0
- data/lib/ui_bibz/ui/core/card/components/block/card_block_title.rb +51 -0
- data/lib/ui_bibz/ui/core/card/components/card_block.rb +67 -0
- data/lib/ui_bibz/ui/core/card/components/card_footer.rb +55 -0
- data/lib/ui_bibz/ui/core/card/components/card_header.rb +51 -0
- data/lib/ui_bibz/ui/core/card/components/card_image.rb +57 -0
- data/lib/ui_bibz/ui/core/card/components/card_list_group.rb +47 -0
- data/lib/ui_bibz/ui/core/component.rb +78 -32
- data/lib/ui_bibz/ui/core/dropdown/components/dropdown_divider.rb +1 -1
- data/lib/ui_bibz/ui/core/dropdown/components/dropdown_header.rb +11 -1
- data/lib/ui_bibz/ui/core/dropdown/components/dropdown_link.rb +11 -4
- data/lib/ui_bibz/ui/core/dropdown/dropdown.rb +14 -6
- data/lib/ui_bibz/ui/core/glyph.rb +22 -4
- data/lib/ui_bibz/ui/core/input/date_picker_field.rb +125 -0
- data/lib/ui_bibz/ui/core/input/multi_column_field.rb +77 -0
- data/lib/ui_bibz/ui/core/input/multi_select_field.rb +89 -0
- data/lib/ui_bibz/ui/core/input/surround_field.rb +74 -0
- data/lib/ui_bibz/ui/core/jumbotron.rb +10 -6
- data/lib/ui_bibz/ui/core/label.rb +13 -3
- data/lib/ui_bibz/ui/core/{col.rb → layout/col.rb} +38 -18
- data/lib/ui_bibz/ui/core/layout/container.rb +65 -0
- data/lib/ui_bibz/ui/core/{row.rb → layout/row.rb} +7 -1
- data/lib/ui_bibz/ui/core/list/components/list.rb +26 -11
- data/lib/ui_bibz/ui/core/list/components/list_body.rb +36 -0
- data/lib/ui_bibz/ui/core/list/components/list_header.rb +36 -0
- data/lib/ui_bibz/ui/core/list/list_group.rb +7 -3
- data/lib/ui_bibz/ui/core/modal/components/modal_body.rb +7 -1
- data/lib/ui_bibz/ui/core/modal/components/modal_footer.rb +7 -1
- data/lib/ui_bibz/ui/core/modal/components/modal_header.rb +5 -2
- data/lib/ui_bibz/ui/core/modal/modal.rb +13 -2
- data/lib/ui_bibz/ui/core/nav/components/nav_dropdown.rb +6 -2
- data/lib/ui_bibz/ui/core/nav/components/nav_link.rb +7 -18
- data/lib/ui_bibz/ui/core/nav/components/nav_link_link.rb +45 -0
- data/lib/ui_bibz/ui/core/nav/components/nav_link_list.rb +35 -0
- data/lib/ui_bibz/ui/core/nav/components/navbar_brand.rb +40 -0
- data/lib/ui_bibz/ui/core/nav/components/navbar_form.rb +2 -2
- data/lib/ui_bibz/ui/core/nav/components/navbar_nav.rb +1 -1
- data/lib/ui_bibz/ui/core/nav/components/navbar_text.rb +6 -2
- data/lib/ui_bibz/ui/core/nav/nav.rb +22 -4
- data/lib/ui_bibz/ui/core/nav/navbar.rb +26 -17
- data/lib/ui_bibz/ui/core/progress.rb +98 -0
- data/lib/ui_bibz/ui/core/stars.rb +13 -5
- data/lib/ui_bibz/ui/ux/table/components/actions.rb +4 -0
- data/lib/ui_bibz/ui/ux/table/components/store.rb +4 -4
- data/lib/ui_bibz/ui/ux/table/extensions/actionable.rb +15 -13
- data/lib/ui_bibz/ui/ux/table/extensions/paginable.rb +7 -6
- data/lib/ui_bibz/ui/ux/table/extensions/searchable.rb +6 -5
- data/lib/ui_bibz/ui/ux/table/table.rb +14 -7
- data/lib/ui_bibz/ui/ux/table/{table_panel.rb → table_card.rb} +34 -36
- data/lib/ui_bibz/ui/ux/table/table_search_field.rb +19 -11
- data/lib/ui_bibz/version.rb +1 -1
- data/test/ui/breadcrumb_test.rb +25 -0
- data/test/ui/button_test.rb +44 -4
- data/test/ui/card_test.rb +106 -0
- data/test/ui/col_test.rb +22 -0
- data/test/ui/dropdown_test.rb +1 -1
- data/test/ui/inputs_test.rb +81 -0
- data/test/ui/list_group_test.rb +1 -1
- data/test/ui/nav_test.rb +4 -5
- data/test/ui/table_test.rb +11 -11
- data/test/ui_helper_test.rb +29 -18
- data/ui_bibz.gemspec +3 -3
- data/vendor/assets/images/switch.png +0 -0
- data/vendor/assets/javascripts/bootstrap-4.0.0-alpha.min.js +7 -0
- data/vendor/assets/javascripts/bootstrap-multiselect.min.js +1180 -0
- data/vendor/assets/javascripts/jquery.multi-select.min.js +1 -0
- data/vendor/assets/javascripts/jquery.quicksearch.min.js +1 -0
- data/vendor/assets/stylesheets/bootstrap-4.0.0-alpha.min.css +6 -0
- data/vendor/assets/stylesheets/bootstrap-datepicker3.min.css +1 -1
- data/vendor/assets/stylesheets/bootstrap-multiselect.min.css +1 -0
- data/vendor/assets/stylesheets/multi-select.min.css +1 -0
- metadata +70 -24
- data/.yardoc/checksums +0 -59
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/lib/ui_bibz/helpers/meta_helper.rb +0 -32
- data/lib/ui_bibz/ui/core/panel.rb +0 -138
- data/lib/ui_bibz/ui/core/progress_bar/components/bar.rb +0 -105
- data/lib/ui_bibz/ui/core/progress_bar/progress_bar.rb +0 -94
- data/lib/ui_bibz/ui/ux/grid.rb +0 -121
- data/test/ui/grid_test.rb +0 -46
- data/test/ui/panel_test.rb +0 -52
@@ -0,0 +1,60 @@
|
|
1
|
+
module UiBibz::Ui::Core
|
2
|
+
|
3
|
+
# Create a card group
|
4
|
+
#
|
5
|
+
# ==== Attributes
|
6
|
+
#
|
7
|
+
# * +content+ - Content of element
|
8
|
+
# * +options+ - Options of element
|
9
|
+
# * +html_options+ - Html Options of element
|
10
|
+
#
|
11
|
+
# ==== Options
|
12
|
+
#
|
13
|
+
# You can add HTML attributes using the +html_options+.
|
14
|
+
# You can pass arguments in options attribute:
|
15
|
+
#
|
16
|
+
# ==== Signatures
|
17
|
+
#
|
18
|
+
# UiBibz::Ui::Core::CardGroup.new(content, options = nil, html_options = nil)
|
19
|
+
#
|
20
|
+
# UiBibz::Ui::Core::CardGroup.new(options = nil, html_options = nil) do
|
21
|
+
# cg.card content, options, html_options, &block
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# ==== Examples
|
25
|
+
#
|
26
|
+
# UiBibz::Ui::Core::CardGroup.new do |cg|
|
27
|
+
# cg.card 'Exemple 1'
|
28
|
+
# cg.card 'Exemple 2'
|
29
|
+
# cg.card 'Exemple 3'
|
30
|
+
# end.render
|
31
|
+
#
|
32
|
+
class CardGroup < Component
|
33
|
+
|
34
|
+
# See UiBibz::Ui::Core::Component.initialize
|
35
|
+
def initialize content = nil, options = nil, html_options = nil, &block
|
36
|
+
super
|
37
|
+
@items = []
|
38
|
+
end
|
39
|
+
|
40
|
+
# Render html tag
|
41
|
+
def render
|
42
|
+
content_tag :div, @items.join.html_safe, html_options
|
43
|
+
end
|
44
|
+
|
45
|
+
def card content = nil, options = nil, html_options = nil, &block
|
46
|
+
if is_tap content, options
|
47
|
+
@items << UiBibz::Ui::Core::Card.new(content, options, html_options).tap(&block).render
|
48
|
+
else
|
49
|
+
@items << UiBibz::Ui::Core::Card.new(content, options, html_options, &block).render
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
private
|
54
|
+
|
55
|
+
def component_html_classes
|
56
|
+
"card-group"
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module UiBibz::Ui::Core
|
2
|
+
|
3
|
+
# Create a card block title
|
4
|
+
#
|
5
|
+
# ==== Attributes
|
6
|
+
#
|
7
|
+
# * +content+ - Content of element
|
8
|
+
# * +options+ - Options of element
|
9
|
+
# * +html_options+ - Html Options of element
|
10
|
+
#
|
11
|
+
# ==== Options
|
12
|
+
#
|
13
|
+
# You can add HTML attributes using the +html_options+.
|
14
|
+
# You can pass arguments in options attribute:
|
15
|
+
#
|
16
|
+
# ==== Signatures
|
17
|
+
#
|
18
|
+
# UiBibz::Ui::Core::CardBlockLink.new(content, options = nil, html_options = nil)
|
19
|
+
#
|
20
|
+
# UiBibz::Ui::Core::CardBlockLink.new(options = nil, html_options = nil) do
|
21
|
+
# content
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# ==== Examples
|
25
|
+
#
|
26
|
+
# UiBibz::Ui::Core::CardBlockLink.new.render
|
27
|
+
#
|
28
|
+
# UiBibz::Ui::Core::CardBlockLink.new do
|
29
|
+
# 'Exemple'
|
30
|
+
# end.render
|
31
|
+
#
|
32
|
+
class CardBlockLink < Component
|
33
|
+
|
34
|
+
# See UiBibz::Ui::Core::Component.initialize
|
35
|
+
def initialize content = nil, options = nil, html_options = nil, &block
|
36
|
+
super
|
37
|
+
end
|
38
|
+
|
39
|
+
# Render html tag
|
40
|
+
def render
|
41
|
+
content_tag :a, content, html_options
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def component_html_classes
|
47
|
+
"card-title"
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module UiBibz::Ui::Core
|
2
|
+
|
3
|
+
# Create a card block title
|
4
|
+
#
|
5
|
+
# ==== Attributes
|
6
|
+
#
|
7
|
+
# * +content+ - Content of element
|
8
|
+
# * +options+ - Options of element
|
9
|
+
# * +html_options+ - Html Options of element
|
10
|
+
#
|
11
|
+
# ==== Options
|
12
|
+
#
|
13
|
+
# You can add HTML attributes using the +html_options+.
|
14
|
+
# You can pass arguments in options attribute:
|
15
|
+
#
|
16
|
+
# ==== Signatures
|
17
|
+
#
|
18
|
+
# UiBibz::Ui::Core::CardBlockText.new(content, options = nil, html_options = nil)
|
19
|
+
#
|
20
|
+
# UiBibz::Ui::Core::CardBlockText.new(options = nil, html_options = nil) do
|
21
|
+
# content
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# ==== Examples
|
25
|
+
#
|
26
|
+
# UiBibz::Ui::Core::CardBlockText.new.render
|
27
|
+
#
|
28
|
+
# UiBibz::Ui::Core::CardBlockText.new do
|
29
|
+
# 'Exemple'
|
30
|
+
# end.render
|
31
|
+
#
|
32
|
+
class CardBlockText < Component
|
33
|
+
|
34
|
+
# See UiBibz::Ui::Core::Component.initialize
|
35
|
+
def initialize content = nil, options = nil, html_options = nil, &block
|
36
|
+
super
|
37
|
+
end
|
38
|
+
|
39
|
+
# Render html tag
|
40
|
+
def render
|
41
|
+
content_tag :p, content, html_options
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def component_html_classes
|
47
|
+
"card-text"
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module UiBibz::Ui::Core
|
2
|
+
|
3
|
+
# Create a card block title
|
4
|
+
#
|
5
|
+
# ==== Attributes
|
6
|
+
#
|
7
|
+
# * +content+ - Content of element
|
8
|
+
# * +options+ - Options of element
|
9
|
+
# * +html_options+ - Html Options of element
|
10
|
+
#
|
11
|
+
# ==== Options
|
12
|
+
#
|
13
|
+
# You can add HTML attributes using the +html_options+.
|
14
|
+
# You can pass arguments in options attribute:
|
15
|
+
#
|
16
|
+
# ==== Signatures
|
17
|
+
#
|
18
|
+
# UiBibz::Ui::Core::CardBlockTitle.new(content, options = nil, html_options = nil)
|
19
|
+
#
|
20
|
+
# UiBibz::Ui::Core::CardBlockTitle.new(options = nil, html_options = nil) do
|
21
|
+
# content
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# ==== Examples
|
25
|
+
#
|
26
|
+
# UiBibz::Ui::Core::CardBlockTitle.new.render
|
27
|
+
#
|
28
|
+
# UiBibz::Ui::Core::CardBlockTitle.new do
|
29
|
+
# 'Exemple'
|
30
|
+
# end.render
|
31
|
+
#
|
32
|
+
class CardBlockTitle < Component
|
33
|
+
|
34
|
+
# See UiBibz::Ui::Core::Component.initialize
|
35
|
+
def initialize content = nil, options = nil, html_options = nil, &block
|
36
|
+
super
|
37
|
+
end
|
38
|
+
|
39
|
+
# Render html tag
|
40
|
+
def render
|
41
|
+
content_tag :h4, content, html_options
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def component_html_classes
|
47
|
+
"card-title"
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require 'ui_bibz/ui/core/card/components/block/card_block_text'
|
2
|
+
require 'ui_bibz/ui/core/card/components/block/card_block_title'
|
3
|
+
require 'ui_bibz/ui/core/card/components/block/card_block_link'
|
4
|
+
module UiBibz::Ui::Core
|
5
|
+
|
6
|
+
# Create a card block
|
7
|
+
#
|
8
|
+
# ==== Attributes
|
9
|
+
#
|
10
|
+
# * +content+ - Content of element
|
11
|
+
# * +options+ - Options of element
|
12
|
+
# * +html_options+ - Html Options of element
|
13
|
+
#
|
14
|
+
# ==== Options
|
15
|
+
#
|
16
|
+
# You can add HTML attributes using the +html_options+.
|
17
|
+
# You can pass arguments in options attribute:
|
18
|
+
#
|
19
|
+
# ==== Signatures
|
20
|
+
#
|
21
|
+
# UiBibz::Ui::Core::CardBlock.new(content, options = nil, html_options = nil)
|
22
|
+
#
|
23
|
+
# UiBibz::Ui::Core::CardBlock.new(options = nil, html_options = nil) do
|
24
|
+
# content
|
25
|
+
# end
|
26
|
+
#
|
27
|
+
# ==== Examples
|
28
|
+
#
|
29
|
+
# UiBibz::Ui::Core::CardBlock.new.render
|
30
|
+
#
|
31
|
+
# UiBibz::Ui::Core::CardBlock.new do
|
32
|
+
# 'Exemple'
|
33
|
+
# end.render
|
34
|
+
#
|
35
|
+
class CardBlock < Component
|
36
|
+
|
37
|
+
# See UiBibz::Ui::Core::Component.initialize
|
38
|
+
def initialize content = nil, options = nil, html_options = nil, &block
|
39
|
+
super
|
40
|
+
@items = [@content]
|
41
|
+
end
|
42
|
+
|
43
|
+
# Render html tag
|
44
|
+
def render
|
45
|
+
content_tag :div, @items.join.html_safe, html_options
|
46
|
+
end
|
47
|
+
|
48
|
+
def title content = nil, options = nil, html_options = nil, &block
|
49
|
+
@items << CardBlockTitle.new(content, options, html_options, &block).render
|
50
|
+
end
|
51
|
+
|
52
|
+
def link content = nil, options = nil, html_options = nil, &block
|
53
|
+
@items << CardBlockLink.new(content, options, html_options, &block).render
|
54
|
+
end
|
55
|
+
|
56
|
+
def text content = nil, options = nil, html_options = nil, &block
|
57
|
+
@items << CardBlockText.new(content, options, html_options, &block).render
|
58
|
+
end
|
59
|
+
|
60
|
+
private
|
61
|
+
|
62
|
+
def component_html_classes
|
63
|
+
"card-block"
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module UiBibz::Ui::Core
|
2
|
+
|
3
|
+
# Create a card footer
|
4
|
+
#
|
5
|
+
# ==== Attributes
|
6
|
+
#
|
7
|
+
# * +content+ - Content of element
|
8
|
+
# * +options+ - Options of element
|
9
|
+
# * +html_options+ - Html Options of element
|
10
|
+
#
|
11
|
+
# ==== Options
|
12
|
+
#
|
13
|
+
# You can add HTML attributes using the +html_options+.
|
14
|
+
# You can pass arguments in options attribute:
|
15
|
+
#
|
16
|
+
# ==== Signatures
|
17
|
+
#
|
18
|
+
# UiBibz::Ui::Core::CardFooter.new(content, options = nil, html_options = nil)
|
19
|
+
#
|
20
|
+
# UiBibz::Ui::Core::CardFooter.new(options = nil, html_options = nil) do
|
21
|
+
# content
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# ==== Examples
|
25
|
+
#
|
26
|
+
# UiBibz::Ui::Core::CardFooter.new.render
|
27
|
+
#
|
28
|
+
# UiBibz::Ui::Core::CardFooter.new do
|
29
|
+
# 'Exemple'
|
30
|
+
# end.render
|
31
|
+
#
|
32
|
+
class CardFooter < Component
|
33
|
+
|
34
|
+
# See UiBibz::Ui::Core::Component.initialize
|
35
|
+
def initialize content = nil, options = nil, html_options = nil, &block
|
36
|
+
super
|
37
|
+
end
|
38
|
+
|
39
|
+
# Render html tag
|
40
|
+
def render
|
41
|
+
content_tag :div, glyph_and_content_html, html_options
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def muted
|
47
|
+
"text-muted" unless @options[:muted].nil?
|
48
|
+
end
|
49
|
+
|
50
|
+
def component_html_classes
|
51
|
+
["card-footer", muted]
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module UiBibz::Ui::Core
|
2
|
+
|
3
|
+
# Create a card header
|
4
|
+
#
|
5
|
+
# ==== Attributes
|
6
|
+
#
|
7
|
+
# * +content+ - Content of element
|
8
|
+
# * +options+ - Options of element
|
9
|
+
# * +html_options+ - Html Options of element
|
10
|
+
#
|
11
|
+
# ==== Options
|
12
|
+
#
|
13
|
+
# You can add HTML attributes using the +html_options+.
|
14
|
+
# You can pass arguments in options attribute:
|
15
|
+
#
|
16
|
+
# ==== Signatures
|
17
|
+
#
|
18
|
+
# UiBibz::Ui::Core::CardHeader.new(content, options = nil, html_options = nil)
|
19
|
+
#
|
20
|
+
# UiBibz::Ui::Core::CarHeader.new(options = nil, html_options = nil) do
|
21
|
+
# content
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# ==== Examples
|
25
|
+
#
|
26
|
+
# UiBibz::Ui::Core::CardHeader.new.render
|
27
|
+
#
|
28
|
+
# UiBibz::Ui::Core::CardHeader.new do
|
29
|
+
# 'Exemple'
|
30
|
+
# end.render
|
31
|
+
#
|
32
|
+
class CardHeader < Component
|
33
|
+
|
34
|
+
# See UiBibz::Ui::Core::Component.initialize
|
35
|
+
def initialize content = nil, options = nil, html_options = nil, &block
|
36
|
+
super
|
37
|
+
end
|
38
|
+
|
39
|
+
# Render html tag
|
40
|
+
def render
|
41
|
+
content_tag :div, glyph_and_content_html, html_options
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def component_html_classes
|
47
|
+
"card-header"
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module UiBibz::Ui::Core
|
2
|
+
|
3
|
+
# Create a card image
|
4
|
+
#
|
5
|
+
# ==== Attributes
|
6
|
+
#
|
7
|
+
# * +content+ - Content of element
|
8
|
+
# * +options+ - Options of element
|
9
|
+
# * +html_options+ - Html Options of element
|
10
|
+
#
|
11
|
+
# ==== Options
|
12
|
+
#
|
13
|
+
# You can add HTML attributes using the +html_options+.
|
14
|
+
# You can pass arguments in options attribute:
|
15
|
+
# * +position+ - Symbol
|
16
|
+
# (+top+, +bottom+)
|
17
|
+
#
|
18
|
+
# ==== Signatures
|
19
|
+
#
|
20
|
+
# UiBibz::Ui::Core::CardImage.new(content, options = nil, html_options = nil)
|
21
|
+
#
|
22
|
+
# UiBibz::Ui::Core::CardImage.new(options = nil, html_options = nil) do
|
23
|
+
# content
|
24
|
+
# end
|
25
|
+
#
|
26
|
+
# ==== Examples
|
27
|
+
#
|
28
|
+
# UiBibz::Ui::Core::CardImage.new.render
|
29
|
+
#
|
30
|
+
# UiBibz::Ui::Core::CardImage.new do
|
31
|
+
# "/assets/images/test.png"
|
32
|
+
# end.render
|
33
|
+
#
|
34
|
+
class CardImage < Component
|
35
|
+
|
36
|
+
# See UiBibz::Ui::Core::Component.initialize
|
37
|
+
def initialize content = nil, options = nil, html_options = nil, &block
|
38
|
+
super
|
39
|
+
end
|
40
|
+
|
41
|
+
# Render html tag
|
42
|
+
def render
|
43
|
+
image_tag content, html_options
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def component_html_classes
|
49
|
+
position
|
50
|
+
end
|
51
|
+
|
52
|
+
def position
|
53
|
+
"card-img-#{ @options[:position] }" unless @options[:position].nil?
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|