ui_bibz 2.0.0.beta2.5 → 2.0.0.beta2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/app/assets/javascripts/interface.coffee +1 -1
  4. data/app/inputs/ui_bibz_inputs/{ui_button_choices_input.rb → ui_choice_group_input.rb} +3 -3
  5. data/lib/ui_bibz.rb +28 -29
  6. data/lib/ui_bibz/helpers/ui/core/{cards_helper.rb → boxes_helper.rb} +14 -6
  7. data/lib/ui_bibz/helpers/ui/core/forms_helper.rb +20 -11
  8. data/lib/ui_bibz/helpers/ui/core/icons_helper.rb +24 -0
  9. data/lib/ui_bibz/helpers/ui/core/lists_helper.rb +11 -0
  10. data/lib/ui_bibz/helpers/ui/core/navigations_helper.rb +64 -0
  11. data/lib/ui_bibz/helpers/ui/core/notifications_helper.rb +43 -0
  12. data/lib/ui_bibz/helpers/ui/core_helper.rb +8 -79
  13. data/lib/ui_bibz/ui/core/{cards → boxes}/card.rb +19 -19
  14. data/lib/ui_bibz/ui/core/{cards → boxes}/card_column.rb +6 -6
  15. data/lib/ui_bibz/ui/core/{cards → boxes}/card_deck.rb +6 -6
  16. data/lib/ui_bibz/ui/core/{cards → boxes}/card_group.rb +6 -6
  17. data/lib/ui_bibz/ui/core/{cards → boxes}/components/body/card_body_link.rb +5 -5
  18. data/lib/ui_bibz/ui/core/{cards → boxes}/components/body/card_body_text.rb +5 -5
  19. data/lib/ui_bibz/ui/core/{cards → boxes}/components/body/card_body_title.rb +5 -5
  20. data/lib/ui_bibz/ui/core/{cards → boxes}/components/card_body.rb +11 -11
  21. data/lib/ui_bibz/ui/core/{cards → boxes}/components/card_footer.rb +5 -5
  22. data/lib/ui_bibz/ui/core/{cards → boxes}/components/card_header.rb +5 -5
  23. data/lib/ui_bibz/ui/core/{cards → boxes}/components/card_image.rb +5 -5
  24. data/lib/ui_bibz/ui/core/{cards → boxes}/components/card_list_group.rb +5 -5
  25. data/lib/ui_bibz/ui/core/{jumbotron.rb → boxes/jumbotron.rb} +6 -6
  26. data/lib/ui_bibz/ui/core/forms/buttons/button.rb +8 -3
  27. data/lib/ui_bibz/ui/core/forms/buttons/button_choice.rb +3 -3
  28. data/lib/ui_bibz/ui/core/forms/buttons/button_group.rb +1 -6
  29. data/lib/ui_bibz/ui/core/forms/buttons/components/button_group_dropdown.rb +1 -1
  30. data/lib/ui_bibz/ui/core/forms/choices/choice_group.rb +81 -0
  31. data/lib/ui_bibz/ui/core/forms/{buttons → choices}/components/choice.rb +11 -18
  32. data/lib/ui_bibz/ui/core/{dropdowns → forms/dropdowns}/components/dropdown_divider.rb +1 -1
  33. data/lib/ui_bibz/ui/core/{dropdowns → forms/dropdowns}/components/dropdown_header.rb +5 -5
  34. data/lib/ui_bibz/ui/core/{dropdowns → forms/dropdowns}/components/dropdown_link.rb +5 -5
  35. data/lib/ui_bibz/ui/core/{dropdowns → forms/dropdowns}/dropdown.rb +12 -12
  36. data/lib/ui_bibz/ui/core/{dropdowns → forms/dropdowns}/split_dropdown.rb +6 -6
  37. data/lib/ui_bibz/ui/core/forms/numbers/formula_field.rb +1 -1
  38. data/lib/ui_bibz/ui/core/forms/selects/multi_select_field.rb +8 -3
  39. data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_dropdown.rb +1 -1
  40. data/lib/ui_bibz/ui/core/forms/surrounds/surround_field.rb +1 -1
  41. data/lib/ui_bibz/ui/core/{glyph.rb → icons/glyph.rb} +10 -10
  42. data/lib/ui_bibz/ui/core/{star.rb → icons/star.rb} +6 -6
  43. data/lib/ui_bibz/ui/core/lists/components/list.rb +2 -2
  44. data/lib/ui_bibz/ui/core/{breadcrumb.rb → navigations/breadcrumb.rb} +8 -12
  45. data/lib/ui_bibz/ui/core/{paths → navigations}/components/breadcrumb_link.rb +5 -5
  46. data/lib/ui_bibz/ui/core/{navs → navigations}/components/nav_dropdown.rb +5 -5
  47. data/lib/ui_bibz/ui/core/navigations/components/nav_link.rb +68 -0
  48. data/lib/ui_bibz/ui/core/{navs → navigations}/components/nav_link_link.rb +1 -1
  49. data/lib/ui_bibz/ui/core/{navs → navigations}/components/nav_link_list.rb +1 -1
  50. data/lib/ui_bibz/ui/core/navigations/components/nav_text.rb +50 -0
  51. data/lib/ui_bibz/ui/core/{navs → navigations}/components/navbar_brand.rb +1 -1
  52. data/lib/ui_bibz/ui/core/{navs → navigations}/components/navbar_form.rb +4 -4
  53. data/lib/ui_bibz/ui/core/{navs → navigations}/components/navbar_nav.rb +7 -7
  54. data/lib/ui_bibz/ui/core/{navs → navigations}/components/navbar_text.rb +5 -5
  55. data/lib/ui_bibz/ui/core/{navs → navigations}/components/pagination_link.rb +6 -6
  56. data/lib/ui_bibz/ui/core/navigations/link.rb +54 -0
  57. data/lib/ui_bibz/ui/core/{navs → navigations}/nav.rb +24 -13
  58. data/lib/ui_bibz/ui/core/{navs → navigations}/navbar.rb +9 -9
  59. data/lib/ui_bibz/ui/core/{navs → navigations}/pagination.rb +6 -6
  60. data/lib/ui_bibz/ui/core/navigations/tab_group.rb +82 -0
  61. data/lib/ui_bibz/ui/core/{forms/buttons/button_toolbar.rb → navigations/toolbar.rb} +12 -8
  62. data/lib/ui_bibz/ui/core/{badge.rb → notifications/badge.rb} +8 -9
  63. data/lib/ui_bibz/ui/core/{progresses → notifications}/components/bar.rb +6 -6
  64. data/lib/ui_bibz/ui/core/{progresses → notifications}/progress_bar.rb +11 -11
  65. data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +1 -1
  66. data/lib/ui_bibz/ui/extensions/core/component/klass_extension.rb +18 -2
  67. data/lib/ui_bibz/ui/ux/tables/components/actions.rb +9 -9
  68. data/lib/ui_bibz/ui/ux/tables/components/as.rb +2 -2
  69. data/lib/ui_bibz/ui/ux/tables/extensions/actionable.rb +1 -1
  70. data/lib/ui_bibz/ui/ux/tables/extensions/searchable.rb +1 -1
  71. data/lib/ui_bibz/ui/ux/tables/extensions/sortable.rb +1 -1
  72. data/lib/ui_bibz/ui/ux/tables/table_card.rb +3 -3
  73. data/lib/ui_bibz/ui/ux/tables/table_search_field.rb +4 -4
  74. data/lib/ui_bibz/utils/screwdriver.rb +10 -1
  75. data/lib/ui_bibz/version.rb +1 -1
  76. data/structure.md +64 -0
  77. data/test/ui/core/{cards → boxes}/card_test.rb +0 -0
  78. data/test/ui/core/{jumbotron_test.rb → boxes/jumbotron_test.rb} +0 -0
  79. data/test/ui/core/forms/buttons/button_test.rb +1 -1
  80. data/test/ui/core/forms/choices/choice_group_test.rb +36 -0
  81. data/test/ui/core/{dropdowns → forms/dropdowns}/dropdown_test.rb +5 -5
  82. data/test/ui/core/forms/selects/multi_select_field_test.rb +2 -2
  83. data/test/ui/core/{glyph_test.rb → icons/glyph_test.rb} +0 -0
  84. data/test/ui/core/{star_test.rb → icons/star_test.rb} +0 -0
  85. data/test/ui/core/{paths → navigations}/breadcrumb_test.rb +0 -0
  86. data/test/ui/core/{navs → navigations}/nav_test.rb +0 -0
  87. data/test/ui/core/{navs → navigations}/navbar_test.rb +4 -4
  88. data/test/ui/core/navigations/pagination_test.rb +38 -0
  89. data/test/ui/core/navigations/tab_group_test.rb +49 -0
  90. data/test/ui/core/navigations/toolbar_test.rb +31 -0
  91. data/test/ui/core/{badge_test.rb → notifications/badge_test.rb} +0 -0
  92. data/test/ui/core/{progress_test.rb → notifications/progress_bar_test.rb} +1 -1
  93. metadata +79 -69
  94. data/lib/ui_bibz/helpers/ui/core/dropdowns_helper.rb +0 -21
  95. data/lib/ui_bibz/helpers/ui/core/navs_helper.rb +0 -27
  96. data/lib/ui_bibz/helpers/ui/core/paths_helper.rb +0 -16
  97. data/lib/ui_bibz/ui/core/navs/components/nav_link.rb +0 -60
  98. data/lib/ui_bibz/ui/core/paths/breadcrumb.rb +0 -109
  99. data/test/ui/core/forms/buttons/button_choice_test.rb +0 -36
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f285587ac504028080ecc47c064ed341931e7ce2
4
- data.tar.gz: 32a27f4728cc6af4589822003d9427a51fac331c
3
+ metadata.gz: 3deff1d05d764047639660407938e5debdf7e394
4
+ data.tar.gz: 00705e64fc82f436498c0a3a534966312ef0eb9c
5
5
  SHA512:
6
- metadata.gz: 1749c0c0708ba76ad15da4da2451f2c45834780d0fc3c757880fce2d877d0ff658d58cd99e13a0075a647e7e2fcf00658ad238f4cd1c7f352da3c17e516cd44d
7
- data.tar.gz: f02583945a643fa0550eded0b7207b7a2bfbe1bbfb97e7c7a2e8b26d3552b79adbd98eb32fb8f935f2ff4b25e98e280d35fdcf37d1ea32a50ac35435f534516a
6
+ metadata.gz: 2fc9cff6cf4588bfbec3725c83fb7715853fbffc2bc8dc83e9d8de202ebc863f8738834ba805092d433f81705bb3a0139b6d4c0c06bf6e1d3073b5ccad831336
7
+ data.tar.gz: beeddee71faecd9265656ba83ff6f77751885966e470b602b4e861c1f652b358ff67c99f83019a7b8a7544ec11d86669152e66162cd15b7f22baa237a9091e33
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (2.0.0.beta2.5)
4
+ ui_bibz (2.0.0.beta2.6)
5
5
  bootstrap (= 4.0.0.beta2)
6
6
  font-awesome-sass
7
7
  haml
@@ -116,7 +116,7 @@ GEM
116
116
  mini_portile2 (~> 2.3.0)
117
117
  popper_js (1.12.5)
118
118
  rack (2.0.3)
119
- rack-test (0.7.0)
119
+ rack-test (0.8.2)
120
120
  rack (>= 1.0, < 3)
121
121
  rails (5.1.4)
122
122
  actioncable (= 5.1.4)
@@ -141,7 +141,7 @@ GEM
141
141
  method_source
142
142
  rake (>= 0.8.7)
143
143
  thor (>= 0.18.1, < 2.0)
144
- rake (12.2.1)
144
+ rake (12.3.0)
145
145
  rb-fsevent (0.10.2)
146
146
  rb-inotify (0.9.10)
147
147
  ffi (>= 0.5.0, < 2)
@@ -152,7 +152,7 @@ GEM
152
152
  sass-listen (4.0.0)
153
153
  rb-fsevent (~> 0.9, >= 0.9.4)
154
154
  rb-inotify (~> 0.9, >= 0.9.7)
155
- sass-rails (5.0.6)
155
+ sass-rails (5.0.7)
156
156
  railties (>= 4.0.0, < 6)
157
157
  sass (~> 3.1)
158
158
  sprockets (>= 2.8, < 4.0)
@@ -12,7 +12,7 @@
12
12
  $(this).tab('show')
13
13
 
14
14
  tooltip: ->
15
- $('[data-toggle="tooltip"]').tooltip()
15
+ $('[data-toggle="tooltip"], [title]').tooltip()
16
16
 
17
17
  dropdown: ->
18
18
  $('.dropdown-toggle').dropdown()
@@ -1,13 +1,13 @@
1
1
  module UiBibzInputs
2
- class UiButtonChoicesInput < CollectionInput#::Inputs::CollectionRadioButtonsInput
3
- include UiBibz::Ui::Core::Forms::Buttons
2
+ class UiChoiceGroupInput < CollectionInput#::Inputs::CollectionRadioButtonsInput
3
+ include UiBibz::Ui::Core::Forms::Choices
4
4
 
5
5
  def input(wrapper_options = nil)
6
6
  label_method, value_method = detect_collection_methods
7
7
 
8
8
  merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)
9
9
 
10
- UiBibz::Ui::Core::Forms::Buttons::ButtonChoice.new(input_options).tap do |bc|
10
+ UiBibz::Ui::Core::Forms::Choices::ChoiceGroup.new(input_options).tap do |bc|
11
11
  collection.each do |item|
12
12
  opts = { name: "#{ @builder.object.class.name.underscore }[#{ attribute_name }]", value: item[1] }
13
13
  opts = opts.merge({ state: :active }) if @builder.object.send(attribute_name).to_s == item[1].to_s
data/lib/ui_bibz.rb CHANGED
@@ -17,20 +17,21 @@ module UiBibz
17
17
  # Core
18
18
  module Core
19
19
 
20
- module Cards
21
- autoload :Card, "ui_bibz/ui/core/cards/card"
22
- autoload :CardColumn, "ui_bibz/ui/core/cards/card_column"
23
- autoload :CardDeck, "ui_bibz/ui/core/cards/card_deck"
24
- autoload :CardGroup, "ui_bibz/ui/core/cards/card_group"
25
- end
26
-
27
- module Dropdowns
28
- autoload :Dropdown, "ui_bibz/ui/core/dropdowns/dropdown"
29
- autoload :SplitDropdown, "ui_bibz/ui/core/dropdowns/split_dropdown"
20
+ module Boxes
21
+ autoload :Card, "ui_bibz/ui/core/boxes/card"
22
+ autoload :CardColumn, "ui_bibz/ui/core/boxes/card_column"
23
+ autoload :CardDeck, "ui_bibz/ui/core/boxes/card_deck"
24
+ autoload :CardGroup, "ui_bibz/ui/core/boxes/card_group"
25
+ autoload :Jumbotron, "ui_bibz/ui/core/boxes/jumbotron"
30
26
  end
31
27
 
32
28
  module Forms
33
29
 
30
+ module Dropdowns
31
+ autoload :Dropdown, "ui_bibz/ui/core/forms/dropdowns/dropdown"
32
+ autoload :SplitDropdown, "ui_bibz/ui/core/forms/dropdowns/split_dropdown"
33
+ end
34
+
34
35
  module Dates
35
36
  autoload :DatePickerField, "ui_bibz/ui/core/forms/dates/date_picker_field"
36
37
  end
@@ -39,6 +40,7 @@ module UiBibz
39
40
  autoload :SwitchField, "ui_bibz/ui/core/forms/choices/switch_field"
40
41
  autoload :CheckboxField, "ui_bibz/ui/core/forms/choices/checkbox_field"
41
42
  autoload :RadioField, "ui_bibz/ui/core/forms/choices/radio_field"
43
+ autoload :ChoiceGroup, "ui_bibz/ui/core/forms/choices/choice_group"
42
44
  end
43
45
 
44
46
  module Numbers
@@ -55,11 +57,9 @@ module UiBibz
55
57
 
56
58
  module Buttons
57
59
  autoload :Button, "ui_bibz/ui/core/forms/buttons/button"
58
- autoload :ButtonChoice, "ui_bibz/ui/core/forms/buttons/button_choice"
59
60
  autoload :ButtonGroup, "ui_bibz/ui/core/forms/buttons/button_group"
60
61
  autoload :ButtonLink, "ui_bibz/ui/core/forms/buttons/button_link"
61
62
  autoload :ButtonRefresh, "ui_bibz/ui/core/forms/buttons/button_refresh"
62
- autoload :ButtonToolbar, "ui_bibz/ui/core/forms/buttons/button_toolbar"
63
63
  end
64
64
 
65
65
  module Surrounds
@@ -77,6 +77,11 @@ module UiBibz
77
77
 
78
78
  end
79
79
 
80
+ module Icons
81
+ autoload :Glyph, "ui_bibz/ui/core/icons/glyph"
82
+ autoload :Star, "ui_bibz/ui/core/icons/star"
83
+ end
84
+
80
85
  module Layouts
81
86
  autoload :Row, "ui_bibz/ui/core/layouts/row"
82
87
  autoload :Col, "ui_bibz/ui/core/layouts/col"
@@ -85,24 +90,23 @@ module UiBibz
85
90
 
86
91
  module Lists
87
92
  autoload :ListGroup, "ui_bibz/ui/core/lists/list_group"
93
+ autoload :List, "ui_bibz/ui/core/lists/components/list"
88
94
  end
89
95
 
90
- module Navs
91
- autoload :Nav, "ui_bibz/ui/core/navs/nav"
92
- autoload :Navbar, "ui_bibz/ui/core/navs/navbar"
93
- autoload :Pagination, "ui_bibz/ui/core/navs/pagination"
96
+ module Navigations
97
+ autoload :Breadcrumb, "ui_bibz/ui/core/navigations/breadcrumb"
98
+ autoload :Link, "ui_bibz/ui/core/navigations/link"
99
+ autoload :Nav, "ui_bibz/ui/core/navigations/nav"
100
+ autoload :Navbar, "ui_bibz/ui/core/navigations/navbar"
101
+ autoload :Pagination, "ui_bibz/ui/core/navigations/pagination"
102
+ autoload :TabGroup, "ui_bibz/ui/core/navigations/tab_group"
103
+ autoload :Toolbar, "ui_bibz/ui/core/navigations/toolbar"
94
104
  end
95
105
 
96
106
  module Notifications
97
107
  autoload :Alert, "ui_bibz/ui/core/notifications/alert"
98
- end
99
-
100
- module Paths
101
- autoload :Breadcrumb, "ui_bibz/ui/core/paths/breadcrumb"
102
- end
103
-
104
- module Progresses
105
- autoload :ProgressBar, "ui_bibz/ui/core/progresses/progress_bar"
108
+ autoload :Badge, "ui_bibz/ui/core/notifications/badge"
109
+ autoload :ProgressBar, "ui_bibz/ui/core/notifications/progress_bar"
106
110
  end
107
111
 
108
112
  module Windows
@@ -111,11 +115,6 @@ module UiBibz
111
115
 
112
116
  # Other section
113
117
  autoload :Component, "ui_bibz/ui/core/component"
114
- autoload :Glyph, "ui_bibz/ui/core/glyph"
115
- autoload :Jumbotron, "ui_bibz/ui/core/jumbotron"
116
- autoload :Badge, "ui_bibz/ui/core/badge"
117
- autoload :Progress, "ui_bibz/ui/core/progress"
118
- autoload :Star, "ui_bibz/ui/core/star"
119
118
  end
120
119
 
121
120
  # Ux
@@ -1,4 +1,4 @@
1
- module UiBibz::Helpers::Ui::Core::CardsHelper
1
+ module UiBibz::Helpers::Ui::Core::BoxesHelper
2
2
 
3
3
  # Card Component
4
4
  #
@@ -9,9 +9,9 @@ module UiBibz::Helpers::Ui::Core::CardsHelper
9
9
  # +footer+.
10
10
  def ui_card content = nil, options = nil, html_options = nil, &block
11
11
  if is_tap(content, options)
12
- UiBibz::Ui::Core::Cards::Card.new(content, options, html_options).tap(&block).render
12
+ UiBibz::Ui::Core::Boxes::Card.new(content, options, html_options).tap(&block).render
13
13
  else
14
- UiBibz::Ui::Core::Cards::Card.new(content, options, html_options, &block).render
14
+ UiBibz::Ui::Core::Boxes::Card.new(content, options, html_options, &block).render
15
15
  end
16
16
  end
17
17
 
@@ -20,7 +20,7 @@ module UiBibz::Helpers::Ui::Core::CardsHelper
20
20
  # +options+ (Hash)
21
21
  # +html_options+ (Hash)
22
22
  def ui_card_group content = nil, options = nil, html_options = nil, &block
23
- UiBibz::Ui::Core::Cards::CardGroup.new(content, options, html_options).tap(&block).render
23
+ UiBibz::Ui::Core::Boxes::CardGroup.new(content, options, html_options).tap(&block).render
24
24
  end
25
25
 
26
26
  # Card Deck Component
@@ -28,7 +28,7 @@ module UiBibz::Helpers::Ui::Core::CardsHelper
28
28
  # +options+ (Hash)
29
29
  # +html_options+ (Hash)
30
30
  def ui_card_deck content = nil, options = nil, html_options = nil, &block
31
- UiBibz::Ui::Core::Cards::CardDeck.new(content, options, html_options).tap(&block).render
31
+ UiBibz::Ui::Core::Boxes::CardDeck.new(content, options, html_options).tap(&block).render
32
32
  end
33
33
 
34
34
  # Card Column Component
@@ -36,7 +36,15 @@ module UiBibz::Helpers::Ui::Core::CardsHelper
36
36
  # +options+ (Hash)
37
37
  # +html_options+ (Hash)
38
38
  def ui_card_column content = nil, options = nil, html_options = nil, &block
39
- UiBibz::Ui::Core::Cards::CardColumn.new(content, options, html_options).tap(&block).render
39
+ UiBibz::Ui::Core::Boxes::CardColumn.new(content, options, html_options).tap(&block).render
40
+ end
41
+
42
+ # Jumbotron Component
43
+ #
44
+ # +options+ (Hash)
45
+ # +html_options+ (Hash)
46
+ def ui_jumbotron content = nil, options = nil, html_options = nil, &block
47
+ UiBibz::Ui::Core::Boxes::Jumbotron.new(content, options, html_options, &block).render
40
48
  end
41
49
 
42
50
  end
@@ -8,12 +8,12 @@ module UiBibz::Helpers::Ui::Core::FormsHelper
8
8
  UiBibz::Ui::Core::Forms::Buttons::Button.new(content, options, html_options, &block).render
9
9
  end
10
10
 
11
- # Button Choice Component
11
+ # Choice group Component
12
12
  #
13
13
  # +options+ (Hash)
14
14
  # +html_options+ (Hash)
15
- def ui_button_choice content = nil, options = nil, html_options = nil, &block
16
- UiBibz::Ui::Core::Forms::Buttons::ButtonChoice.new(content, options, html_options).tap(&block).render
15
+ def ui_choice_group content = nil, options = nil, html_options = nil, &block
16
+ UiBibz::Ui::Core::Forms::Choices::ChoiceGroup.new(content, options, html_options).tap(&block).render
17
17
  end
18
18
 
19
19
  # Button Group Component
@@ -32,14 +32,6 @@ module UiBibz::Helpers::Ui::Core::FormsHelper
32
32
  UiBibz::Ui::Core::Forms::Buttons::ButtonLink.new(content, options, html_options, &block).render
33
33
  end
34
34
 
35
- # Button Toolbar Component
36
- #
37
- # +options+ (Hash)
38
- # +html_options+ (Hash)
39
- def ui_button_toolbar content = nil, options = nil, html_options = nil, &block
40
- UiBibz::Ui::Core::Forms::Buttons::ButtonToolbar.new(content, options, html_options).tap(&block).render
41
- end
42
-
43
35
  # Date Picker Field Component
44
36
  #
45
37
  # +options+ (Hash)
@@ -144,5 +136,22 @@ module UiBibz::Helpers::Ui::Core::FormsHelper
144
136
  UiBibz::Ui::Core::Forms::Surrounds::SurroundField.new(content, options, html_options).tap(&block).render
145
137
  end
146
138
 
139
+ # Dropdown Component
140
+ #
141
+ # +name+ (String) [Required]
142
+ # +options+ (Hash)
143
+ # +html_options+ (Hash)
144
+ def ui_dropdown name, options = nil, html_options = nil, &block
145
+ UiBibz::Ui::Core::Forms::Dropdowns::Dropdown.new(name, options, html_options).tap(&block).render
146
+ end
147
+
148
+ # Split Dropdown Component
149
+ #
150
+ # +name+ (String) [Required]
151
+ # +options+ (Hash)
152
+ # +html_options+ (Hash)
153
+ def ui_split_dropdown name, options = nil, html_options = nil, &block
154
+ UiBibz::Ui::Core::Forms::Dropdowns::SplitDropdown.new(name, options, html_options).tap(&block).render
155
+ end
147
156
  end
148
157
 
@@ -0,0 +1,24 @@
1
+ module UiBibz::Helpers::Ui::Core::IconsHelper
2
+
3
+ # Glyph Component
4
+ #
5
+ # + content+ (String || Hash) [Required]
6
+ # +options+ (Hash)
7
+ # +html_options+ (Hash)
8
+ #
9
+ # Glyph component with some exeption, it can be written
10
+ # => glyph 'calendar', size: :xs
11
+ # or
12
+ # => glyph { name: 'calendar', size: :xs }
13
+ def ui_glyph content, options = nil, html_options = nil, &block
14
+ UiBibz::Ui::Core::Icons::Glyph.new(content, options, html_options, &block).render
15
+ end
16
+
17
+ # Stars Component
18
+ #
19
+ # +options+ (Hash)
20
+ # +html_options+ (Hash)
21
+ def ui_star content = nil, options = nil, html_options = nil, &block
22
+ UiBibz::Ui::Core::Icons::Star.new(content, options, html_options, &block).render
23
+ end
24
+ end
@@ -8,4 +8,15 @@ module UiBibz::Helpers::Ui::Core::ListsHelper
8
8
  UiBibz::Ui::Core::Lists::ListGroup.new(content, options, html_options).tap(&block).render
9
9
  end
10
10
 
11
+ # List Component
12
+ #
13
+ # +options+ (Hash)
14
+ # +html_options+ (Hash)
15
+ def ui_list content = nil, options = nil, html_options = nil, &block
16
+ if is_tap(content, options)
17
+ UiBibz::Ui::Core::Lists::Components::List.new(content, options, html_options).tap(&block).render
18
+ else
19
+ UiBibz::Ui::Core::Lists::Components::List.new(content, options, html_options, &block).render
20
+ end
21
+ end
11
22
  end
@@ -0,0 +1,64 @@
1
+ module UiBibz::Helpers::Ui::Core::NavigationsHelper
2
+
3
+ # Nav Component
4
+ #
5
+ # +options+ (Hash)
6
+ # +html_options+ (Hash)
7
+ def ui_nav content = nil, options = nil, html_options = nil, &block
8
+ UiBibz::Ui::Core::Navigations::Nav.new(content, options, html_options).tap(&block).render
9
+ end
10
+
11
+ # TabGroup Component
12
+ #
13
+ # +options+ (Hash)
14
+ # +html_options+ (Hash)
15
+ def ui_tab_group content = nil, options = nil, html_options = nil, &block
16
+ UiBibz::Ui::Core::Navigations::TabGroup.new(content, options, html_options).tap(&block).render
17
+ end
18
+
19
+ # Navbar Component
20
+ #
21
+ # +options+ (Hash)
22
+ # +html_options+ (Hash)
23
+ def ui_navbar content = nil, options = nil, html_options = nil, &block
24
+ UiBibz::Ui::Core::Navigations::Navbar.new(content, options, html_options).tap(&block).render
25
+ end
26
+
27
+ # Pagination Component
28
+ #
29
+ # +options+ (Hash)
30
+ # +html_options+ (Hash)
31
+ def ui_pagination content = nil, options = nil, html_options = nil, &block
32
+ UiBibz::Ui::Core::Navigations::Pagination.new(content, options, html_options).tap(&block).render
33
+ end
34
+
35
+ # Toolbar Component
36
+ #
37
+ # +options+ (Hash)
38
+ # +html_options+ (Hash)
39
+ def ui_toolbar content = nil, options = nil, html_options = nil, &block
40
+ UiBibz::Ui::Core::Navigations::Toolbar.new(content, options, html_options).tap(&block).render
41
+ end
42
+
43
+ # Link Component
44
+ #
45
+ # +options+ (Hash)
46
+ # +html_options+ (Hash)
47
+ def ui_link content = nil, options = nil, html_options = nil, &block
48
+ UiBibz::Ui::Core::Navigations::Link.new(content, options, html_options, &block).render
49
+ end
50
+
51
+ # Breadcrumb Component
52
+ #
53
+ # +options+ (Hash)
54
+ # +html_options+ (Hash)
55
+ #
56
+ def ui_breadcrumb content = nil, options = nil, html_options = nil, &block
57
+ if block.nil?
58
+ UiBibz::Ui::Core::Navigations::Breadcrumb.new(content, options, html_options, &block).render
59
+ else
60
+ UiBibz::Ui::Core::Navigations::Breadcrumb.new(content, options, html_options).tap(&block).render
61
+ end
62
+ end
63
+
64
+ end
@@ -0,0 +1,43 @@
1
+ module UiBibz::Helpers::Ui::Core::NotificationsHelper
2
+
3
+ # Alert Component
4
+ #
5
+ # +options+ (Hash)
6
+ # +html_options+ (Hash)
7
+ #
8
+ def ui_alert content = nil, options = nil, html_options = nil, &block
9
+ if is_tap(content, options)
10
+ UiBibz::Ui::Core::Notifications::Alert.new(content, options, html_options).tap(&block).render
11
+ else
12
+ UiBibz::Ui::Core::Notifications::Alert.new(content, options, html_options, &block).render
13
+ end
14
+ end
15
+
16
+ # Badge (Label) Component
17
+ #
18
+ # +options+ (Hash)
19
+ # +html_options+ (Hash)
20
+ #
21
+ def ui_badge content = nil, options = nil, html_options = nil, &block
22
+ UiBibz::Ui::Core::Notifications::Badge.new(content, options, html_options, &block).render
23
+ end
24
+
25
+ # ProgressBar Component
26
+ #
27
+ # +options+ (Hash)
28
+ # +html_options+ (Hash)
29
+ def ui_progress_bar percentage = nil, options = nil, html_options = nil, &block
30
+ if is_tap(percentage, options)
31
+ UiBibz::Ui::Core::Notifications::ProgressBar.new(percentage, options, html_options).tap(&block).render
32
+ else
33
+ UiBibz::Ui::Core::Notifications::ProgressBar.new(percentage, options, html_options, &block).render
34
+ end
35
+ 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
@@ -1,89 +1,18 @@
1
- require 'ui_bibz/helpers/ui/core/cards_helper'
2
- require 'ui_bibz/helpers/ui/core/dropdowns_helper'
1
+ require 'ui_bibz/helpers/ui/core/boxes_helper'
3
2
  require 'ui_bibz/helpers/ui/core/forms_helper'
4
3
  require 'ui_bibz/helpers/ui/core/layouts_helper'
4
+ require 'ui_bibz/helpers/ui/core/icons_helper'
5
5
  require 'ui_bibz/helpers/ui/core/lists_helper'
6
- require 'ui_bibz/helpers/ui/core/navs_helper'
7
- require 'ui_bibz/helpers/ui/core/paths_helper'
6
+ require 'ui_bibz/helpers/ui/core/notifications_helper'
7
+ require 'ui_bibz/helpers/ui/core/navigations_helper'
8
8
  require 'ui_bibz/helpers/ui/core/windows_helper'
9
9
  module UiBibz::Helpers::Ui::CoreHelper
10
- include UiBibz::Helpers::Ui::Core::CardsHelper
11
- include UiBibz::Helpers::Ui::Core::DropdownsHelper
10
+ include UiBibz::Helpers::Ui::Core::BoxesHelper
12
11
  include UiBibz::Helpers::Ui::Core::FormsHelper
13
12
  include UiBibz::Helpers::Ui::Core::LayoutsHelper
13
+ include UiBibz::Helpers::Ui::Core::IconsHelper
14
14
  include UiBibz::Helpers::Ui::Core::ListsHelper
15
- include UiBibz::Helpers::Ui::Core::NavsHelper
16
- include UiBibz::Helpers::Ui::Core::PathsHelper
15
+ include UiBibz::Helpers::Ui::Core::NavigationsHelper
16
+ include UiBibz::Helpers::Ui::Core::NotificationsHelper
17
17
  include UiBibz::Helpers::Ui::Core::WindowsHelper
18
-
19
- # Alert Component
20
- #
21
- # +options+ (Hash)
22
- # +html_options+ (Hash)
23
- #
24
- def ui_alert content = nil, options = nil, html_options = nil, &block
25
- if is_tap(content, options)
26
- UiBibz::Ui::Core::Notifications::Alert.new(content, options, html_options).tap(&block).render
27
- else
28
- UiBibz::Ui::Core::Notifications::Alert.new(content, options, html_options, &block).render
29
- end
30
- end
31
-
32
- # Glyph Component
33
- #
34
- # + content+ (String || Hash) [Required]
35
- # +options+ (Hash)
36
- # +html_options+ (Hash)
37
- #
38
- # Glyph component with some exeption, it can be written
39
- # => glyph 'calendar', size: :xs
40
- # or
41
- # => glyph { name: 'calendar', size: :xs }
42
- def ui_glyph content, options = nil, html_options = nil, &block
43
- UiBibz::Ui::Core::Glyph.new(content, options, html_options, &block).render
44
- end
45
-
46
- # Jumbotron Component
47
- #
48
- # +options+ (Hash)
49
- # +html_options+ (Hash)
50
- def ui_jumbotron content = nil, options = nil, html_options = nil, &block
51
- UiBibz::Ui::Core::Jumbotron.new(content, options, html_options, &block).render
52
- end
53
-
54
- # Badge (Label) Component
55
- #
56
- # +options+ (Hash)
57
- # +html_options+ (Hash)
58
- #
59
- def ui_badge content = nil, options = nil, html_options = nil, &block
60
- UiBibz::Ui::Core::Badge.new(content, options, html_options, &block).render
61
- end
62
-
63
- # ProgressBar Component
64
- #
65
- # +options+ (Hash)
66
- # +html_options+ (Hash)
67
- def ui_progress_bar percentage = nil, options = nil, html_options = nil, &block
68
- if is_tap(percentage, options)
69
- UiBibz::Ui::Core::Progresses::ProgressBar.new(percentage, options, html_options).tap(&block).render
70
- else
71
- UiBibz::Ui::Core::Progresses::ProgressBar.new(percentage, options, html_options, &block).render
72
- end
73
- end
74
-
75
- # Stars Component
76
- #
77
- # +options+ (Hash)
78
- # +html_options+ (Hash)
79
- def ui_star content = nil, options = nil, html_options = nil, &block
80
- UiBibz::Ui::Core::Star.new(content, options, html_options, &block).render
81
- end
82
-
83
- private
84
-
85
- def is_tap content, options
86
- (content[:tap] if content.kind_of?(Hash)) || (options[:tap] unless options.nil?)
87
- end
88
-
89
18
  end