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.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/Gemfile +1 -0
  4. data/Gemfile.lock +10 -7
  5. data/README.md +8 -1042
  6. data/app/assets/javascripts/multi_column.coffee +45 -0
  7. data/app/assets/javascripts/{ui_bibz.js.coffee → ui_bibz.coffee} +16 -3
  8. data/app/assets/stylesheets/fix-bootstrap-4.sass +2 -0
  9. data/app/assets/stylesheets/ui_bibz.sass +22 -9
  10. data/app/inputs/custom_inputs/date_picker_input.rb +10 -0
  11. data/app/inputs/custom_inputs/date_picker_input_old.rb +61 -0
  12. data/app/inputs/custom_inputs/multi_column_input.rb +18 -0
  13. data/app/inputs/custom_inputs/multi_select_input.rb +15 -0
  14. data/app/inputs/custom_inputs/surround_input.rb +10 -0
  15. data/doc/UiBibz.html +2 -2
  16. data/doc/UiBibz/Concerns.html +1 -1
  17. data/doc/UiBibz/Concerns/Models.html +1 -1
  18. data/doc/UiBibz/Concerns/Models/Searchable.html +1 -1
  19. data/doc/UiBibz/Concerns/Models/Searchable/ClassMethods.html +5 -5
  20. data/doc/UiBibz/Helpers.html +1 -1
  21. data/doc/UiBibz/Helpers/MetaHelper.html +1 -1
  22. data/doc/UiBibz/Helpers/UiCoreHelper.html +1 -1
  23. data/doc/UiBibz/Helpers/UiUxHelper.html +1 -1
  24. data/doc/UiBibz/Helpers/UtilsHelper.html +1 -1
  25. data/doc/UiBibz/Rails.html +1 -1
  26. data/doc/UiBibz/Rails/Engine.html +1 -1
  27. data/doc/UiBibz/Ui.html +1 -1
  28. data/doc/UiBibz/Ui/Base.html +1 -1
  29. data/doc/UiBibz/Ui/Core.html +1 -1
  30. data/doc/UiBibz/Ui/Core/Alert.html +1 -1
  31. data/doc/UiBibz/Ui/Core/Bar.html +1 -1
  32. data/doc/UiBibz/Ui/Core/Breadcrumb.html +1 -1
  33. data/doc/UiBibz/Ui/Core/BreadcrumbLink.html +1 -1
  34. data/doc/UiBibz/Ui/Core/Button.html +1 -1
  35. data/doc/UiBibz/Ui/Core/ButtonDropdown.html +1 -1
  36. data/doc/UiBibz/Ui/Core/ButtonGroup.html +1 -1
  37. data/doc/UiBibz/Ui/Core/ButtonLink.html +1 -1
  38. data/doc/UiBibz/Ui/Core/ButtonSplitDropdown.html +1 -1
  39. data/doc/UiBibz/Ui/Core/Col.html +1 -1
  40. data/doc/UiBibz/Ui/Core/Component.html +1 -1
  41. data/doc/UiBibz/Ui/Core/Dropdown.html +1 -1
  42. data/doc/UiBibz/Ui/Core/DropdownDivider.html +1 -1
  43. data/doc/UiBibz/Ui/Core/DropdownHeader.html +1 -1
  44. data/doc/UiBibz/Ui/Core/DropdownLink.html +1 -1
  45. data/doc/UiBibz/Ui/Core/Glyph.html +1 -1
  46. data/doc/UiBibz/Ui/Core/Jumbotron.html +1 -1
  47. data/doc/UiBibz/Ui/Core/Label.html +1 -1
  48. data/doc/UiBibz/Ui/Core/List.html +1 -1
  49. data/doc/UiBibz/Ui/Core/ListGroup.html +1 -1
  50. data/doc/UiBibz/Ui/Core/Modal.html +1 -1
  51. data/doc/UiBibz/Ui/Core/ModalBody.html +1 -1
  52. data/doc/UiBibz/Ui/Core/ModalFooter.html +1 -1
  53. data/doc/UiBibz/Ui/Core/ModalHeader.html +1 -1
  54. data/doc/UiBibz/Ui/Core/Nav.html +1 -1
  55. data/doc/UiBibz/Ui/Core/NavDropdown.html +1 -1
  56. data/doc/UiBibz/Ui/Core/NavLink.html +1 -1
  57. data/doc/UiBibz/Ui/Core/Navbar.html +1 -1
  58. data/doc/UiBibz/Ui/Core/NavbarForm.html +1 -1
  59. data/doc/UiBibz/Ui/Core/NavbarNav.html +1 -1
  60. data/doc/UiBibz/Ui/Core/NavbarText.html +1 -1
  61. data/doc/UiBibz/Ui/Core/Panel.html +1 -1
  62. data/doc/UiBibz/Ui/Core/ProgressBar.html +1 -1
  63. data/doc/UiBibz/Ui/Core/Row.html +1 -1
  64. data/doc/UiBibz/Ui/Core/Stars.html +1 -1
  65. data/doc/UiBibz/Ui/Ux.html +1 -1
  66. data/doc/UiBibz/Ui/Ux/Actionable.html +1 -1
  67. data/doc/UiBibz/Ui/Ux/Actions.html +1 -1
  68. data/doc/UiBibz/Ui/Ux/Column.html +1 -1
  69. data/doc/UiBibz/Ui/Ux/Columns.html +1 -1
  70. data/doc/UiBibz/Ui/Ux/Grid.html +1 -1
  71. data/doc/UiBibz/Ui/Ux/Paginable.html +1 -1
  72. data/doc/UiBibz/Ui/Ux/Searchable.html +1 -1
  73. data/doc/UiBibz/Ui/Ux/Sortable.html +1 -1
  74. data/doc/UiBibz/Ui/Ux/Store.html +18 -70
  75. data/doc/UiBibz/Ui/Ux/Table.html +1 -1
  76. data/doc/UiBibz/Ui/Ux/TablePagination.html +1 -1
  77. data/doc/UiBibz/Ui/Ux/TablePaginationPerPage.html +1 -1
  78. data/doc/UiBibz/Ui/Ux/TablePanel.html +1 -1
  79. data/doc/UiBibz/Ui/Ux/TableSearchField.html +1 -1
  80. data/doc/UiBibz/Utils.html +1 -1
  81. data/doc/UiBibz/Utils/Internationalization.html +1 -1
  82. data/doc/_index.html +1 -1
  83. data/doc/file.README.html +47 -51
  84. data/doc/index.html +47 -51
  85. data/doc/method_list.html +69 -75
  86. data/doc/top-level-namespace.html +1 -1
  87. data/lib/ui_bibz.rb +14 -7
  88. data/lib/ui_bibz/helpers/ui_core_helper.rb +46 -11
  89. data/lib/ui_bibz/helpers/ui_ux_helper.rb +7 -3
  90. data/lib/ui_bibz/rails/engine.rb +2 -2
  91. data/lib/ui_bibz/ui/base.rb +5 -0
  92. data/lib/ui_bibz/ui/core/alert.rb +15 -6
  93. data/lib/ui_bibz/ui/core/breadcrumb/breadcrumb.rb +37 -2
  94. data/lib/ui_bibz/ui/core/breadcrumb/components/breadcrumb_link.rb +3 -3
  95. data/lib/ui_bibz/ui/core/button/button.rb +39 -6
  96. data/lib/ui_bibz/ui/core/button/button_choice.rb +104 -0
  97. data/lib/ui_bibz/ui/core/button/button_dropdown.rb +15 -2
  98. data/lib/ui_bibz/ui/core/button/button_group.rb +17 -5
  99. data/lib/ui_bibz/ui/core/button/button_link.rb +8 -11
  100. data/lib/ui_bibz/ui/core/button/button_split_dropdown.rb +15 -5
  101. data/lib/ui_bibz/ui/core/card/card.rb +158 -0
  102. data/lib/ui_bibz/ui/core/card/card_column.rb +60 -0
  103. data/lib/ui_bibz/ui/core/card/card_deck.rb +62 -0
  104. data/lib/ui_bibz/ui/core/card/card_group.rb +60 -0
  105. data/lib/ui_bibz/ui/core/card/components/block/card_block_link.rb +51 -0
  106. data/lib/ui_bibz/ui/core/card/components/block/card_block_text.rb +51 -0
  107. data/lib/ui_bibz/ui/core/card/components/block/card_block_title.rb +51 -0
  108. data/lib/ui_bibz/ui/core/card/components/card_block.rb +67 -0
  109. data/lib/ui_bibz/ui/core/card/components/card_footer.rb +55 -0
  110. data/lib/ui_bibz/ui/core/card/components/card_header.rb +51 -0
  111. data/lib/ui_bibz/ui/core/card/components/card_image.rb +57 -0
  112. data/lib/ui_bibz/ui/core/card/components/card_list_group.rb +47 -0
  113. data/lib/ui_bibz/ui/core/component.rb +78 -32
  114. data/lib/ui_bibz/ui/core/dropdown/components/dropdown_divider.rb +1 -1
  115. data/lib/ui_bibz/ui/core/dropdown/components/dropdown_header.rb +11 -1
  116. data/lib/ui_bibz/ui/core/dropdown/components/dropdown_link.rb +11 -4
  117. data/lib/ui_bibz/ui/core/dropdown/dropdown.rb +14 -6
  118. data/lib/ui_bibz/ui/core/glyph.rb +22 -4
  119. data/lib/ui_bibz/ui/core/input/date_picker_field.rb +125 -0
  120. data/lib/ui_bibz/ui/core/input/multi_column_field.rb +77 -0
  121. data/lib/ui_bibz/ui/core/input/multi_select_field.rb +89 -0
  122. data/lib/ui_bibz/ui/core/input/surround_field.rb +74 -0
  123. data/lib/ui_bibz/ui/core/jumbotron.rb +10 -6
  124. data/lib/ui_bibz/ui/core/label.rb +13 -3
  125. data/lib/ui_bibz/ui/core/{col.rb → layout/col.rb} +38 -18
  126. data/lib/ui_bibz/ui/core/layout/container.rb +65 -0
  127. data/lib/ui_bibz/ui/core/{row.rb → layout/row.rb} +7 -1
  128. data/lib/ui_bibz/ui/core/list/components/list.rb +26 -11
  129. data/lib/ui_bibz/ui/core/list/components/list_body.rb +36 -0
  130. data/lib/ui_bibz/ui/core/list/components/list_header.rb +36 -0
  131. data/lib/ui_bibz/ui/core/list/list_group.rb +7 -3
  132. data/lib/ui_bibz/ui/core/modal/components/modal_body.rb +7 -1
  133. data/lib/ui_bibz/ui/core/modal/components/modal_footer.rb +7 -1
  134. data/lib/ui_bibz/ui/core/modal/components/modal_header.rb +5 -2
  135. data/lib/ui_bibz/ui/core/modal/modal.rb +13 -2
  136. data/lib/ui_bibz/ui/core/nav/components/nav_dropdown.rb +6 -2
  137. data/lib/ui_bibz/ui/core/nav/components/nav_link.rb +7 -18
  138. data/lib/ui_bibz/ui/core/nav/components/nav_link_link.rb +45 -0
  139. data/lib/ui_bibz/ui/core/nav/components/nav_link_list.rb +35 -0
  140. data/lib/ui_bibz/ui/core/nav/components/navbar_brand.rb +40 -0
  141. data/lib/ui_bibz/ui/core/nav/components/navbar_form.rb +2 -2
  142. data/lib/ui_bibz/ui/core/nav/components/navbar_nav.rb +1 -1
  143. data/lib/ui_bibz/ui/core/nav/components/navbar_text.rb +6 -2
  144. data/lib/ui_bibz/ui/core/nav/nav.rb +22 -4
  145. data/lib/ui_bibz/ui/core/nav/navbar.rb +26 -17
  146. data/lib/ui_bibz/ui/core/progress.rb +98 -0
  147. data/lib/ui_bibz/ui/core/stars.rb +13 -5
  148. data/lib/ui_bibz/ui/ux/table/components/actions.rb +4 -0
  149. data/lib/ui_bibz/ui/ux/table/components/store.rb +4 -4
  150. data/lib/ui_bibz/ui/ux/table/extensions/actionable.rb +15 -13
  151. data/lib/ui_bibz/ui/ux/table/extensions/paginable.rb +7 -6
  152. data/lib/ui_bibz/ui/ux/table/extensions/searchable.rb +6 -5
  153. data/lib/ui_bibz/ui/ux/table/table.rb +14 -7
  154. data/lib/ui_bibz/ui/ux/table/{table_panel.rb → table_card.rb} +34 -36
  155. data/lib/ui_bibz/ui/ux/table/table_search_field.rb +19 -11
  156. data/lib/ui_bibz/version.rb +1 -1
  157. data/test/ui/breadcrumb_test.rb +25 -0
  158. data/test/ui/button_test.rb +44 -4
  159. data/test/ui/card_test.rb +106 -0
  160. data/test/ui/col_test.rb +22 -0
  161. data/test/ui/dropdown_test.rb +1 -1
  162. data/test/ui/inputs_test.rb +81 -0
  163. data/test/ui/list_group_test.rb +1 -1
  164. data/test/ui/nav_test.rb +4 -5
  165. data/test/ui/table_test.rb +11 -11
  166. data/test/ui_helper_test.rb +29 -18
  167. data/ui_bibz.gemspec +3 -3
  168. data/vendor/assets/images/switch.png +0 -0
  169. data/vendor/assets/javascripts/bootstrap-4.0.0-alpha.min.js +7 -0
  170. data/vendor/assets/javascripts/bootstrap-multiselect.min.js +1180 -0
  171. data/vendor/assets/javascripts/jquery.multi-select.min.js +1 -0
  172. data/vendor/assets/javascripts/jquery.quicksearch.min.js +1 -0
  173. data/vendor/assets/stylesheets/bootstrap-4.0.0-alpha.min.css +6 -0
  174. data/vendor/assets/stylesheets/bootstrap-datepicker3.min.css +1 -1
  175. data/vendor/assets/stylesheets/bootstrap-multiselect.min.css +1 -0
  176. data/vendor/assets/stylesheets/multi-select.min.css +1 -0
  177. metadata +70 -24
  178. data/.yardoc/checksums +0 -59
  179. data/.yardoc/object_types +0 -0
  180. data/.yardoc/objects/root.dat +0 -0
  181. data/.yardoc/proxy_types +0 -0
  182. data/lib/ui_bibz/helpers/meta_helper.rb +0 -32
  183. data/lib/ui_bibz/ui/core/panel.rb +0 -138
  184. data/lib/ui_bibz/ui/core/progress_bar/components/bar.rb +0 -105
  185. data/lib/ui_bibz/ui/core/progress_bar/progress_bar.rb +0 -94
  186. data/lib/ui_bibz/ui/ux/grid.rb +0 -121
  187. data/test/ui/grid_test.rb +0 -46
  188. 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