ui_bibz 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. checksums.yaml +13 -5
  2. data/.gitignore +1 -1
  3. data/.yardoc/checksums +52 -0
  4. data/.yardoc/object_types +0 -0
  5. data/.yardoc/objects/root.dat +0 -0
  6. data/.yardoc/proxy_types +0 -0
  7. data/Gemfile +1 -1
  8. data/Gemfile.lock +11 -21
  9. data/README.md +359 -239
  10. data/Rakefile +12 -13
  11. data/doc/UiBibz/Concerns/Models/Searchable/ClassMethods.html +174 -0
  12. data/doc/UiBibz/Concerns/Models/Searchable.html +120 -0
  13. data/doc/UiBibz/Helpers/MetaHelper.html +218 -0
  14. data/doc/UiBibz/Helpers/UiCoreHelper.html +1130 -0
  15. data/doc/UiBibz/Helpers/UiUxHelper.html +463 -0
  16. data/doc/UiBibz/Helpers/UtilsHelper.html +187 -0
  17. data/doc/UiBibz/Rails/Engine.html +123 -0
  18. data/doc/UiBibz/Rails.html +115 -0
  19. data/doc/UiBibz/Ui/Base.html +304 -0
  20. data/doc/UiBibz/Ui/Core/Alert.html +367 -0
  21. data/doc/UiBibz/Ui/Core/Bar.html +356 -0
  22. data/doc/UiBibz/Ui/Core/Breadcrumb.html +427 -0
  23. data/doc/UiBibz/Ui/Core/BreadcrumbLink.html +354 -0
  24. data/doc/UiBibz/Ui/Core/Button.html +363 -0
  25. data/doc/UiBibz/Ui/Core/ButtonDropdown.html +385 -0
  26. data/doc/UiBibz/Ui/Core/ButtonGroup.html +356 -0
  27. data/doc/UiBibz/Ui/Core/ButtonLink.html +365 -0
  28. data/doc/UiBibz/Ui/Core/ButtonSplitDropdown.html +387 -0
  29. data/doc/UiBibz/Ui/Core/Col.html +357 -0
  30. data/doc/UiBibz/Ui/Core/Component.html +1144 -0
  31. data/doc/UiBibz/Ui/Core/Dropdown.html +877 -0
  32. data/doc/UiBibz/Ui/Core/DropdownList.html +369 -0
  33. data/doc/UiBibz/Ui/Core/Glyph.html +742 -0
  34. data/doc/UiBibz/Ui/Core/Jumbotron.html +363 -0
  35. data/doc/UiBibz/Ui/Core/Label.html +361 -0
  36. data/doc/UiBibz/Ui/Core/List.html +486 -0
  37. data/doc/UiBibz/Ui/Core/ListGroup.html +446 -0
  38. data/doc/UiBibz/Ui/Core/Nav.html +474 -0
  39. data/doc/UiBibz/Ui/Core/NavDropdown.html +376 -0
  40. data/doc/UiBibz/Ui/Core/NavLink.html +347 -0
  41. data/doc/UiBibz/Ui/Core/Navbar.html +535 -0
  42. data/doc/UiBibz/Ui/Core/NavbarForm.html +341 -0
  43. data/doc/UiBibz/Ui/Core/NavbarNav.html +301 -0
  44. data/doc/UiBibz/Ui/Core/NavbarText.html +341 -0
  45. data/doc/UiBibz/Ui/Core/Panel.html +806 -0
  46. data/doc/UiBibz/Ui/Core/ProgressBar.html +433 -0
  47. data/doc/UiBibz/Ui/Core/Row.html +335 -0
  48. data/doc/UiBibz/Ui/Core.html +117 -0
  49. data/doc/UiBibz/Ui/Ux/Actionable.html +478 -0
  50. data/doc/UiBibz/Ui/Ux/Actions.html +314 -0
  51. data/doc/UiBibz/Ui/Ux/Column.html +1177 -0
  52. data/doc/UiBibz/Ui/Ux/Columns.html +312 -0
  53. data/doc/UiBibz/Ui/Ux/Grid.html +823 -0
  54. data/doc/UiBibz/Ui/Ux/Paginable.html +368 -0
  55. data/doc/UiBibz/Ui/Ux/Searchable.html +363 -0
  56. data/doc/UiBibz/Ui/Ux/Sortable.html +289 -0
  57. data/doc/UiBibz/Ui/Ux/Store.html +968 -0
  58. data/doc/UiBibz/Ui/Ux/Table.html +957 -0
  59. data/doc/UiBibz/Ui/Ux/TableAction.html +309 -0
  60. data/doc/UiBibz/Ui/Ux/TablePagination.html +319 -0
  61. data/doc/UiBibz/Ui/Ux/TablePaginationPerPage.html +331 -0
  62. data/doc/UiBibz/Ui/Ux/TablePanel.html +576 -0
  63. data/doc/UiBibz/Ui/Ux/TableSearchField.html +291 -0
  64. data/doc/UiBibz/Ui/Ux.html +117 -0
  65. data/doc/UiBibz/Ui.html +117 -0
  66. data/doc/UiBibz/Utils/Internationalization.html +262 -0
  67. data/doc/UiBibz/Utils.html +115 -0
  68. data/doc/UiBibz.html +129 -0
  69. data/doc/_index.html +635 -0
  70. data/doc/class_list.html +58 -0
  71. data/doc/css/common.css +1 -0
  72. data/doc/css/full_list.css +57 -0
  73. data/doc/css/style.css +339 -0
  74. data/doc/file.README.html +1022 -0
  75. data/doc/file_list.html +60 -0
  76. data/doc/frames.html +26 -0
  77. data/doc/images/navbar.png +0 -0
  78. data/doc/index.html +1022 -0
  79. data/doc/js/app.js +219 -0
  80. data/doc/js/full_list.js +181 -0
  81. data/doc/js/jquery.js +4 -0
  82. data/doc/method_list.html +1335 -0
  83. data/doc/top-level-namespace.html +112 -0
  84. data/lib/ui_bibz/helpers/ui_core_helper.rb +94 -0
  85. data/lib/ui_bibz/helpers/ui_ux_helper.rb +43 -0
  86. data/lib/ui_bibz/rails/engine.rb +2 -1
  87. data/lib/ui_bibz/ui/{ui.rb → base.rb} +1 -1
  88. data/lib/ui_bibz/ui/{alert.rb → core/alert.rb} +15 -7
  89. data/lib/ui_bibz/ui/core/breadcrumb/breadcrumb.rb +71 -0
  90. data/lib/ui_bibz/ui/{breadcrumb → core/breadcrumb}/components/breadcrumb_link.rb +6 -6
  91. data/lib/ui_bibz/ui/{button → core/button}/button.rb +13 -6
  92. data/lib/ui_bibz/ui/{button → core/button}/button_dropdown.rb +15 -4
  93. data/lib/ui_bibz/ui/{button → core/button}/button_group.rb +14 -6
  94. data/lib/ui_bibz/ui/{button → core/button}/button_link.rb +14 -6
  95. data/lib/ui_bibz/ui/{button → core/button}/button_split_dropdown.rb +15 -4
  96. data/lib/ui_bibz/ui/{grid/components → core}/col.rb +12 -6
  97. data/lib/ui_bibz/ui/{component.rb → core/component.rb} +7 -7
  98. data/lib/ui_bibz/ui/{dropdown → core/dropdown}/components/dropdown_list.rb +7 -7
  99. data/lib/ui_bibz/ui/{dropdown → core/dropdown}/dropdown.rb +18 -7
  100. data/lib/ui_bibz/ui/{glyph.rb → core/glyph.rb} +18 -10
  101. data/lib/ui_bibz/ui/{jumbotron.rb → core/jumbotron.rb} +14 -6
  102. data/lib/ui_bibz/ui/{label.rb → core/label.rb} +14 -6
  103. data/lib/ui_bibz/ui/{list → core/list}/components/list.rb +8 -8
  104. data/lib/ui_bibz/ui/{list → core/list}/list_group.rb +28 -6
  105. data/lib/ui_bibz/ui/core/nav/components/nav_dropdown.rb +64 -0
  106. data/lib/ui_bibz/ui/{nav → core/nav}/components/nav_link.rb +6 -6
  107. data/lib/ui_bibz/ui/core/nav/components/navbar_form.rb +45 -0
  108. data/lib/ui_bibz/ui/core/nav/components/navbar_nav.rb +56 -0
  109. data/lib/ui_bibz/ui/core/nav/components/navbar_text.rb +45 -0
  110. data/lib/ui_bibz/ui/core/nav/nav.rb +90 -0
  111. data/lib/ui_bibz/ui/core/nav/navbar.rb +121 -0
  112. data/lib/ui_bibz/ui/{panel.rb → core/panel.rb} +36 -8
  113. data/lib/ui_bibz/ui/{progress_bar → core/progress_bar}/components/bar.rb +7 -7
  114. data/lib/ui_bibz/ui/{progress_bar → core/progress_bar}/progress_bar.rb +20 -9
  115. data/lib/ui_bibz/ui/{grid/components → core}/row.rb +12 -4
  116. data/lib/ui_bibz/ui/{grid → ux}/grid.rb +17 -8
  117. data/lib/ui_bibz/ui/{table → ux/table}/components/actions.rb +5 -5
  118. data/lib/ui_bibz/ui/ux/table/components/column.rb +34 -0
  119. data/lib/ui_bibz/ui/ux/table/components/columns.rb +16 -0
  120. data/lib/ui_bibz/ui/{table → ux/table}/components/store.rb +4 -4
  121. data/lib/ui_bibz/ui/{table → ux/table}/components/table_action.rb +2 -2
  122. data/lib/ui_bibz/ui/{table/ux → ux/table/extensions}/actionable.rb +3 -3
  123. data/lib/ui_bibz/ui/{table/ux → ux/table/extensions}/paginable.rb +5 -5
  124. data/lib/ui_bibz/ui/{table/ux → ux/table/extensions}/searchable.rb +4 -4
  125. data/lib/ui_bibz/ui/{table/ux → ux/table/extensions}/sortable.rb +3 -3
  126. data/lib/ui_bibz/ui/{table → ux/table}/table.rb +40 -22
  127. data/lib/ui_bibz/ui/ux/table/table_pagination.rb +51 -0
  128. data/lib/ui_bibz/ui/{table → ux/table}/table_pagination_per_page.rb +26 -4
  129. data/lib/ui_bibz/ui/ux/table/table_panel.rb +155 -0
  130. data/lib/ui_bibz/ui/{table → ux/table}/table_search_field.rb +7 -7
  131. data/lib/ui_bibz/version.rb +1 -1
  132. data/lib/ui_bibz.rb +40 -29
  133. data/test/store_test.rb +2 -2
  134. data/test/ui/button_test.rb +6 -6
  135. data/test/ui/component_test.rb +2 -2
  136. data/test/ui/dropdown_test.rb +1 -1
  137. data/test/ui/glyph_test.rb +3 -3
  138. data/test/ui/grid_test.rb +4 -4
  139. data/test/ui/list_group_test.rb +2 -2
  140. data/test/ui/nav_test.rb +3 -4
  141. data/test/ui/panel_test.rb +4 -4
  142. data/test/ui/table_test.rb +32 -32
  143. data/test/ui_helper_test.rb +18 -2
  144. data/ui_bibz.gemspec +1 -0
  145. data/vendor/assets/stylesheets/ui_bibz.sass +3 -0
  146. metadata +166 -132
  147. data/README.rdoc +0 -0
  148. data/lib/ui_bibz/helpers/ui_helper.rb +0 -119
  149. data/lib/ui_bibz/ui/breadcrumb/breadcrumb.rb +0 -54
  150. data/lib/ui_bibz/ui/nav/nav.rb +0 -65
  151. data/lib/ui_bibz/ui/table/components/column.rb +0 -34
  152. data/lib/ui_bibz/ui/table/components/columns.rb +0 -16
  153. data/lib/ui_bibz/ui/table/table_pagination.rb +0 -29
  154. data/lib/ui_bibz/ui/table/table_panel.rb +0 -66
@@ -0,0 +1,112 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Top Level Namespace
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!top-level-namespace.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index</a> &raquo;
35
+
36
+
37
+ <span class="title">Top Level Namespace</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Top Level Namespace
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ </dl>
82
+ <div class="clear"></div>
83
+
84
+ <h2>Defined Under Namespace</h2>
85
+ <p class="children">
86
+
87
+
88
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="UiBibz.html" title="UiBibz (module)">UiBibz</a></span>
89
+
90
+
91
+
92
+
93
+ </p>
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+ </div>
104
+
105
+ <div id="footer">
106
+ Generated on Wed Jul 8 15:00:15 2015 by
107
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
+ 0.8.7.6 (ruby-1.9.3).
109
+ </div>
110
+
111
+ </body>
112
+ </html>
@@ -0,0 +1,94 @@
1
+ module UiBibz::Helpers::UiCoreHelper
2
+
3
+ def panel content = nil, options = nil, html_options = nil, &block
4
+ if is_tap(content, options)
5
+ UiBibz::Ui::Core::Panel.new(content, options, html_options).tap(&block).render
6
+ else
7
+ UiBibz::Ui::Core::Panel.new(content, options, html_options, &block).render
8
+ end
9
+ end
10
+
11
+ # Use "notify" instead of "alert" : due to "actionview (4.2.0) lib/action_view/helpers/form_helper.rb" conflict
12
+ def notify content = nil, options = nil, html_options = nil, &block
13
+ UiBibz::Ui::Core::Alert.new(content, options, html_options, &block).render
14
+ end
15
+
16
+ # Use "etiquette" instead of "label" : due to "actionview (4.2.0) lib/action_view/helpers/form_helper.rb" conflict
17
+ def etiquette content = nil, options = nil, html_options = nil, &block
18
+ UiBibz::Ui::Core::Label.new(content, options, html_options, &block).render
19
+ end
20
+
21
+ def jumbotron content = nil, options = nil, html_options = nil, &block
22
+ UiBibz::Ui::Core::Jumbotron.new(content, options, html_options, &block).render
23
+ end
24
+
25
+ def nav content = nil, options = nil, html_options = nil, &block
26
+ UiBibz::Ui::Core::Nav.new(content, options, html_options).tap(&block).render
27
+ end
28
+
29
+ def navbar content = nil, options = nil, html_options = nil, &block
30
+ UiBibz::Ui::Core::Navbar.new(content, options, html_options).tap(&block).render
31
+ end
32
+
33
+ def list_group content = nil, options = nil, html_options = nil, &block
34
+ UiBibz::Ui::Core::ListGroup.new(content, options, html_options).tap(&block).render
35
+ end
36
+
37
+
38
+ # Button section begin ----------------------------------------------------
39
+ def button_link content = nil, options = nil, html_options = nil, &block
40
+ UiBibz::Ui::Core::ButtonLink.new(content, options, html_options, &block).render
41
+ end
42
+
43
+ def button_group content = nil, options = nil, html_options = nil, &block
44
+ UiBibz::Ui::Core::ButtonGroup.new(content, options, html_options, &block).render
45
+ end
46
+
47
+ def button content = nil, options = nil, html_options = nil, &block
48
+ UiBibz::Ui::Core::Button.new(content, options, html_options, &block).render
49
+ end
50
+
51
+ def button_dropdown name, options = nil, html_options = nil, &block
52
+ UiBibz::Ui::Core::ButtonDropdown.new(name, options, html_options).tap(&block).render
53
+ end
54
+
55
+ def button_split_dropdown name, options = nil, html_options = nil, &block
56
+ UiBibz::Ui::Core::ButtonSplitDropdown.new(name, options, html_options).tap(&block).render
57
+ end
58
+ # Button section end ----------------------------------------------------
59
+
60
+ def breadcrumb content = nil, options = nil, html_options = nil, &block
61
+ UiBibz::Ui::Core::Breadcrumb.new(content, options, html_options).tap(&block).render
62
+ end
63
+
64
+ def dropdown name, options = nil, html_options = nil, &block
65
+ UiBibz::Ui::Core::Dropdown.new(name, options, html_options).tap(&block).render
66
+ end
67
+
68
+ def glyph content, options = nil, html_options = nil, &block
69
+ UiBibz::Ui::Core::Glyph.new(content, options, html_options, &block).render
70
+ end
71
+
72
+ def progress_bar percentage = nil, options = nil, html_options = nil, &block
73
+ if is_tap(percentage, options)
74
+ UiBibz::Ui::Core::ProgressBar.new(percentage, options, html_options).tap(&block).render
75
+ else
76
+ UiBibz::Ui::Core::ProgressBar.new(percentage, options, html_options, &block).render
77
+ end
78
+ end
79
+
80
+ def row content = nil, options = nil, html_options = nil, &block
81
+ UiBibz::Ui::Core::Row.new(content, options, html_options, &block).render
82
+ end
83
+
84
+ def col content = nil, options = nil, html_options = nil, &block
85
+ UiBibz::Ui::Core::Col.new(content, options, html_options, &block).render
86
+ end
87
+
88
+ private
89
+
90
+ def is_tap content, options
91
+ (content[:tap] if content.kind_of?(Hash)) || (options[:tap] unless options.nil?)
92
+ end
93
+
94
+ end
@@ -0,0 +1,43 @@
1
+ module UiBibz::Helpers::UiUxHelper
2
+
3
+ def grid options = nil, html_options = nil, &block
4
+ UiBibz::Ui::Ux::Grid.new(options, html_options).tap(&block).render
5
+ end
6
+
7
+ # Table section begin ------------------------------------------------------
8
+ def table content = nil, options = nil, html_options = nil, &block
9
+ if is_tap(content, options)
10
+ UiBibz::Ui::Ux::Table.new(content, options, html_options).tap(&block).render
11
+ else
12
+ UiBibz::Ui::Ux::Table.new(content, options, html_options, &block).render
13
+ end
14
+ end
15
+
16
+ def table_search_field options, html_options = nil
17
+ UiBibz::Ui::Ux::TableSearchField.new(options, html_options).render
18
+ end
19
+
20
+ def table_pagination_per_page options, html_options = nil
21
+ UiBibz::Ui::Ux::TablePaginationPerPage.new(options, html_options).render
22
+ end
23
+
24
+ def table_pagination options, html_options = nil
25
+ UiBibz::Ui::Ux::TablePagination.new(options, html_options).render
26
+ end
27
+
28
+ def table_panel content = nil, options = nil, html_options = nil, &block
29
+ if is_tap(content, options)
30
+ UiBibz::Ui::Ux::TablePanel.new(content, options, html_options).tap(&block).render
31
+ else
32
+ UiBibz::Ui::Ux::TablePanel.new(content, options, html_options, &block).render
33
+ end
34
+ end
35
+ # Table section end -------------------------------------------------------
36
+
37
+ private
38
+
39
+ def is_tap content, options
40
+ (content[:tap] if content.kind_of?(Hash)) || (options[:tap] unless options.nil?)
41
+ end
42
+
43
+ end
@@ -6,7 +6,8 @@ module UiBibz
6
6
  class Engine < ::Rails::Engine
7
7
 
8
8
  initializer "ui_bibz.helpers" do
9
- ActionView::Base.send :include, UiBibz::Helpers::UiHelper
9
+ ActionView::Base.send :include, UiBibz::Helpers::UiCoreHelper
10
+ ActionView::Base.send :include, UiBibz::Helpers::UiUxHelper
10
11
  ActionView::Base.send :include, UiBibz::Helpers::UtilsHelper
11
12
  ActionView::Base.send :include, UiBibz::Helpers::MetaHelper
12
13
  end
@@ -1,6 +1,6 @@
1
1
  require 'ui_bibz/utils/internationalization'
2
2
  module UiBibz::Ui
3
- class Ui
3
+ class Base
4
4
  include ActionView::Helpers
5
5
  include Rails.application.routes.url_helpers
6
6
 
@@ -1,8 +1,8 @@
1
- module UiBibz::Ui
1
+ module UiBibz::Ui::Core
2
2
 
3
3
  # Create an alert
4
4
  #
5
- # This element is an extend of UiBibz::Ui::Component.
5
+ # This element is an extend of UiBibz::Ui::Core::Component.
6
6
  #
7
7
  # ==== Attributes
8
8
  #
@@ -23,20 +23,28 @@ module UiBibz::Ui
23
23
  #
24
24
  # ==== Signatures
25
25
  #
26
- # UiBibz::Ui::Alert.new(content, options = nil, html_options = nil)
26
+ # UiBibz::Ui::Core::Alert.new(content, options = nil, html_options = nil)
27
27
  #
28
- # UiBibz::Ui::Alert.new(options = nil, html_options = nil) do
28
+ # UiBibz::Ui::Core::Alert.new(options = nil, html_options = nil) do
29
29
  # content
30
30
  # end
31
31
  #
32
32
  # ==== Examples
33
33
  #
34
- # UiBibz::Ui::Alert.new(content, { type: :success, glyph: 'eye' },{ class: 'test' }).render
35
- # # or
36
- # UiBibz::Ui::Alert.new({glyph: { name: 'eye', size: 3}, { class: 'test' }) do
34
+ # UiBibz::Ui::Core::Alert.new(content, { type: :success, glyph: 'eye' },{ class: 'test' }).render
35
+ #
36
+ # UiBibz::Ui::Core::Alert.new({glyph: { name: 'eye', size: 3}, { class: 'test' }) do
37
37
  # content
38
38
  # end.render
39
39
  #
40
+ # ==== Helper
41
+ #
42
+ # notify(content, options = {}, html_options = {})
43
+ #
44
+ # notify(options = {}, html_options = {}) do
45
+ # content
46
+ # end
47
+ #
40
48
  class Alert < Component
41
49
 
42
50
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -0,0 +1,71 @@
1
+ require 'ui_bibz/ui/core/breadcrumb/components/breadcrumb_link'
2
+ module UiBibz::Ui::Core
3
+
4
+ # Breadcrumb
5
+ #
6
+ # Indicate the current page's location within a navigational hierarchy.
7
+ # Separators are automatically added in CSS through +:before+ and +content+.
8
+ #
9
+ # This element is an extend of UiBibz::Ui::Core::Component.
10
+ # You can use tap method to add link items.
11
+ #
12
+ # ==== Attributes
13
+ #
14
+ # * +content+ - Content of element
15
+ # * +options+ - Options of element
16
+ # * +html_options+ - Html Options of element
17
+ #
18
+ # ==== Components
19
+ #
20
+ # +link+ is UiBibz::Ui::Core::BreadcrumbLink component
21
+ #
22
+ # ==== Signatures
23
+ #
24
+ # UiBibz::Ui::Core::Breadcrumb.new().tap do |b|
25
+ # b.link content = nil, options = nil, html_options = nil, &block
26
+ # b.link content = nil, options = nil, html_options = nil, &block
27
+ # b.link content = nil, options = nil, html_options = nil, &block
28
+ # ...
29
+ # end
30
+ #
31
+ # UiBibz::Ui::Core::Alert.new(options = nil, html_options = nil) do
32
+ # content
33
+ # end
34
+ #
35
+ # ==== Examples
36
+ #
37
+ # UiBibz::Ui::Core::Breadcrumb.new().tap do |b|
38
+ # b.link 'Home', url: '#home'
39
+ # b.link url: '#level-1' do
40
+ # 'Level 1'
41
+ # end
42
+ # b.link 'Level 2', status: :active
43
+ # end.render
44
+ #
45
+ # ==== Helper
46
+ #
47
+ # breadcrumb do |b|
48
+ # b.link(content, options = {}, html_options = {})
49
+ # b.link(options = {}, html_options = {}) do
50
+ # content
51
+ # end
52
+ # end
53
+ #
54
+ class Breadcrumb < Component
55
+
56
+ def initialize content = nil, options = nil, html_options = nil, &block
57
+ super
58
+ @links = []
59
+ end
60
+
61
+ def render
62
+ content_tag :ol, @links.join.html_safe, class_and_html_options("breadcrumb")
63
+ end
64
+
65
+ # See UiBibz::Ui::Core::BreadcrumbLink
66
+ def link content = nil, options = nil, html_options = nil, &block
67
+ @links << BreadcrumbLink.new(content, options, html_options, &block).render
68
+ end
69
+
70
+ end
71
+ end
@@ -1,8 +1,8 @@
1
- module UiBibz::Ui
1
+ module UiBibz::Ui::Core
2
2
 
3
3
  # Create a BreadcrumbLink
4
4
  #
5
- # This element is an extend of UiBibz::Ui::Component.
5
+ # This element is an extend of UiBibz::Ui::Core::Component.
6
6
  #
7
7
  # ==== Attributes
8
8
  #
@@ -24,17 +24,17 @@ module UiBibz::Ui
24
24
  #
25
25
  # ==== Signatures
26
26
  #
27
- # UiBibz::Ui::BreadcrumbLink.new(content, options = nil, html_options = nil)
27
+ # UiBibz::Ui::Core::BreadcrumbLink.new(content, options = nil, html_options = nil)
28
28
  #
29
- # UiBibz::Ui::BreadcrumbLink.new(options = nil, html_options = nil) do
29
+ # UiBibz::Ui::Core::BreadcrumbLink.new(options = nil, html_options = nil) do
30
30
  # content
31
31
  # end
32
32
  #
33
33
  # ==== Examples
34
34
  #
35
- # UiBibz::Ui::BreadcrumbLink.new('Home', { glyph: 'home', status: :active },{ class: 'test' }).render
35
+ # UiBibz::Ui::Core::BreadcrumbLink.new('Home', { glyph: 'home', status: :active },{ class: 'test' }).render
36
36
  #
37
- # UiBibz::Ui::BreadcrumbLink.new({glyph: { name: 'eye', size: 3}, { class: 'test' }) do
37
+ # UiBibz::Ui::Core::BreadcrumbLink.new({glyph: { name: 'eye', size: 3}, { class: 'test' }) do
38
38
  # 'Home'
39
39
  # end.render
40
40
  #
@@ -1,8 +1,8 @@
1
- module UiBibz::Ui
1
+ module UiBibz::Ui::Core
2
2
 
3
3
  # Create a button
4
4
  #
5
- # This element is an extend of UiBibz::Ui::Component.
5
+ # This element is an extend of UiBibz::Ui::Core::Component.
6
6
  #
7
7
  # ==== Attributes
8
8
  #
@@ -25,20 +25,27 @@ module UiBibz::Ui
25
25
  #
26
26
  # ==== Signatures
27
27
  #
28
- # UiBibz::Ui::Button.new(content, options = nil, html_options = nil)
28
+ # UiBibz::Ui::Core::Button.new(content, options = nil, html_options = nil)
29
29
  #
30
- # UiBibz::Ui::Button.new(options = nil, html_options = nil) do
30
+ # UiBibz::Ui::Core::Button.new(options = nil, html_options = nil) do
31
31
  # content
32
32
  # end
33
33
  #
34
34
  # ==== Examples
35
35
  #
36
- # UiBibz::Ui::Button.new('test', type: :primary, size: :xs).render
36
+ # UiBibz::Ui::Core::Button.new('test', type: :primary, size: :xs).render
37
37
  #
38
- # UiBibz::Ui::Button.new(type: :primary) do
38
+ # UiBibz::Ui::Core::Button.new(type: :primary) do
39
39
  # test
40
40
  # end.render
41
41
  #
42
+ # ==== Helper
43
+ #
44
+ # button(content, options = {}, html_options = {})
45
+ #
46
+ # button(options = {}, html_options = {}) do
47
+ # content
48
+ # end
42
49
  class Button < Component
43
50
 
44
51
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -1,8 +1,8 @@
1
- module UiBibz::Ui
1
+ module UiBibz::Ui::Core
2
2
 
3
3
  # Create a button dropdown
4
4
  #
5
- # This element is an extend of UiBibz::Ui::Dropdown.
5
+ # This element is an extend of UiBibz::Ui::Core::Dropdown.
6
6
  #
7
7
  # ==== Attributes
8
8
  #
@@ -25,7 +25,7 @@ module UiBibz::Ui
25
25
  #
26
26
  # ==== Signatures
27
27
  #
28
- # UiBibz::Ui::ButtonDropdown.new(options = nil, html_options = nil).tap do |d|
28
+ # UiBibz::Ui::Core::ButtonDropdown.new(options = nil, html_options = nil).tap do |d|
29
29
  # d.list content = nil, options = nil, html_options = nil, &block
30
30
  # d.list content = nil, options = nil, html_options = nil, &block
31
31
  # d.list content = nil, options = nil, html_options = nil, &block
@@ -34,11 +34,22 @@ module UiBibz::Ui
34
34
  #
35
35
  # ==== Examples
36
36
  #
37
- # UiBibz::Ui::ButtonDropdown.new(name, state: :success).tap do |d|
37
+ # UiBibz::Ui::Core::ButtonDropdown.new(name, state: :success).tap do |d|
38
38
  # d.list link_to('test', '#')
39
+ # d.list('---')
40
+ # d.list('Header 1', { type: :header })
39
41
  # d.list link_to('test2', '#')
40
42
  # end.render
41
43
  #
44
+ # ==== Helper
45
+ #
46
+ # button_dropdown(name, options = { tap: true }, html_options = {}) do |d|
47
+ # d.list(content, options = {}, html_options = {})
48
+ # d.list(options = {}, html_options = {}) do
49
+ # content
50
+ # end
51
+ # end
52
+ #
42
53
  class ButtonDropdown < Dropdown
43
54
 
44
55
  def initialize name, options = nil, html_options = nil, &block
@@ -1,8 +1,8 @@
1
- module UiBibz::Ui
1
+ module UiBibz::Ui::Core
2
2
 
3
3
  # Create a button group
4
4
  #
5
- # This element is an extend of UiBibz::Ui::Component.
5
+ # This element is an extend of UiBibz::Ui::Core::Component.
6
6
  #
7
7
  # ==== Attributes
8
8
  #
@@ -23,17 +23,25 @@ module UiBibz::Ui
23
23
  #
24
24
  # ==== Signatures
25
25
  #
26
- # UiBibz::Ui::ButtonGroup.new(options = nil, html_options = nil) do
26
+ # UiBibz::Ui::Core::ButtonGroup.new(options = nil, html_options = nil) do
27
27
  # ...
28
28
  # end
29
29
  #
30
30
  # ==== Examples
31
31
  #
32
- # UiBibz::Ui::ButtonGroup.new(position: :vertical, size: :xs) do
33
- # UiBibz::Ui.Button.new('test').render
34
- # UiBibz::Ui.Button.new('test2').render
32
+ # UiBibz::Ui::Core::ButtonGroup.new(position: :vertical, size: :xs) do
33
+ # UiBibz::Ui::Core.Button.new('test').render
34
+ # UiBibz::Ui::Core.Button.new('test2').render
35
35
  # end.render
36
36
  #
37
+ # ==== Helper
38
+ #
39
+ # button_group(content, options = {}, html_options = {})
40
+ #
41
+ # button_group(options = {}, html_options = {}) do
42
+ # content
43
+ # end
44
+ #
37
45
  class ButtonGroup < Component
38
46
 
39
47
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -1,8 +1,8 @@
1
- module UiBibz::Ui
1
+ module UiBibz::Ui::Core
2
2
 
3
3
  # Create a button link
4
4
  #
5
- # This element is an extend of UiBibz::Ui::Component.
5
+ # This element is an extend of UiBibz::Ui::Core::Component.
6
6
  #
7
7
  # ==== Attributes
8
8
  #
@@ -26,20 +26,28 @@ module UiBibz::Ui
26
26
  #
27
27
  # ==== Signatures
28
28
  #
29
- # UiBibz::Ui::ButtonLink.new(content, options = nil, html_options = nil)
29
+ # UiBibz::Ui::Core::ButtonLink.new(content, options = nil, html_options = nil)
30
30
  #
31
- # UiBibz::Ui::ButtonLink.new(options = nil, html_options = nil) do
31
+ # UiBibz::Ui::Core::ButtonLink.new(options = nil, html_options = nil) do
32
32
  # content
33
33
  # end
34
34
  #
35
35
  # ==== Examples
36
36
  #
37
- # UiBibz::Ui::ButtonLink.new('test', type: :primary, url: '#')
37
+ # UiBibz::Ui::Core::ButtonLink.new('test', type: :primary, url: '#')
38
38
  #
39
- # UiBibz::Ui::ButtonLink.new(type: :primary, url: '#') do
39
+ # UiBibz::Ui::Core::ButtonLink.new(type: :primary, url: '#') do
40
40
  # test
41
41
  # end.render
42
42
  #
43
+ # ==== Helper
44
+ #
45
+ # button_link(content, options = {}, html_options = {})
46
+ #
47
+ # button_link(options = {}, html_options = {}) do
48
+ # content
49
+ # end
50
+ #
43
51
  class ButtonLink < Component
44
52
 
45
53
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -1,8 +1,8 @@
1
- module UiBibz::Ui
1
+ module UiBibz::Ui::Core
2
2
 
3
3
  # Create a button dropdown
4
4
  #
5
- # This element is an extend of UiBibz::Ui::Dropdown.
5
+ # This element is an extend of UiBibz::Ui::Core::Dropdown.
6
6
  #
7
7
  # ==== Attributes
8
8
  #
@@ -25,7 +25,7 @@ module UiBibz::Ui
25
25
  #
26
26
  # ==== Signatures
27
27
  #
28
- # UiBibz::Ui::ButtonSplitDropdown.new(options = nil, html_options = nil).tap do |d|
28
+ # UiBibz::Ui::Core::ButtonSplitDropdown.new(options = nil, html_options = nil).tap do |d|
29
29
  # d.list content = nil, options = nil, html_options = nil, &block
30
30
  # d.list content = nil, options = nil, html_options = nil, &block
31
31
  # d.list content = nil, options = nil, html_options = nil, &block
@@ -34,11 +34,22 @@ module UiBibz::Ui
34
34
  #
35
35
  # ==== Examples
36
36
  #
37
- # UiBibz::Ui::ButtonSplitDropdown.new(name, state: :success).tap do |d|
37
+ # UiBibz::Ui::Core::ButtonSplitDropdown.new(name, state: :success).tap do |d|
38
38
  # d.list link_to('test', '#')
39
+ # d.list('---')
40
+ # d.list('Header 1', { type: :header })
39
41
  # d.list link_to('test2', '#')
40
42
  # end.render
41
43
  #
44
+ # ==== Helper
45
+ #
46
+ # button_split_dropdown(name, options = {}, html_options = {}) do |b|
47
+ # d.list(content, options = {}, html_options = {})
48
+ # d.list(options = {}, html_options = {}) do
49
+ # content
50
+ # end
51
+ # end
52
+ #
42
53
  class ButtonSplitDropdown < Dropdown
43
54
 
44
55
  def initialize name, options = nil, html_options = nil, &block
@@ -1,8 +1,8 @@
1
- module UiBibz::Ui
1
+ module UiBibz::Ui::Core
2
2
 
3
3
  # Create a col
4
4
  #
5
- # This element is an extend of UiBibz::Ui::Component.
5
+ # This element is an extend of UiBibz::Ui::Core::Component.
6
6
  #
7
7
  # ==== Attributes
8
8
  #
@@ -20,22 +20,28 @@ module UiBibz::Ui
20
20
  #
21
21
  # ==== Signatures
22
22
  #
23
- # UiBibz::Ui::Col.new(content, options = {}, html_options = {}).render
23
+ # UiBibz::Ui::Core::Col.new(content, options = {}, html_options = {}).render
24
24
  #
25
- # UiBibz::Ui::Col.new(options = {}, html_options = {}) do
25
+ # UiBibz::Ui::Core::Col.new(options = {}, html_options = {}) do
26
26
  # content
27
27
  # end.render
28
28
  #
29
29
  # ==== Examples
30
30
  #
31
- # UiBibz::Ui::Col.new({num: 2, offset: 1, size: 3}, class: 'test') do
31
+ # UiBibz::Ui::Core::Col.new({num: 2, offset: 1, size: 3}, class: 'test') do
32
32
  # #content
33
33
  # end
34
34
  #
35
- # UiBibz::Ui::Col.new([{num: 2, offset: 1, size: 3}, { num: 3}], class: 'test') do
35
+ # UiBibz::Ui::Core::Col.new([{num: 2, offset: 1, size: 3}, { num: 3}], class: 'test') do
36
36
  # #content
37
37
  # end
38
38
  #
39
+ # ==== Helper
40
+ #
41
+ # col(options = {}, html_options = {}) do
42
+ # # content
43
+ # end
44
+ #
39
45
  class Col < Component
40
46
 
41
47
  def initialize content = nil, options = nil, html_options = nil, &block