ui_bibz 2.0.0.alpha24 → 2.0.0.alpha26

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 (96) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTORS.md +19 -0
  3. data/Gemfile +1 -0
  4. data/Gemfile.lock +60 -55
  5. data/app/assets/javascripts/interface.coffee +11 -0
  6. data/app/assets/javascripts/ui_bibz.coffee +3 -1
  7. data/app/assets/stylesheets/table.sass +1 -2
  8. data/app/assets/stylesheets/ui_bibz.sass +2 -0
  9. data/app/inputs/custom_inputs/autocomplete_input.rb +3 -2
  10. data/app/inputs/custom_inputs/date_picker_input.rb +2 -2
  11. data/app/inputs/custom_inputs/dropdown_select_input.rb +2 -2
  12. data/app/inputs/custom_inputs/formula_input.rb +2 -2
  13. data/app/inputs/custom_inputs/markdown_editor_input.rb +2 -2
  14. data/app/inputs/custom_inputs/multi_column_input.rb +2 -2
  15. data/app/inputs/custom_inputs/multi_select_input.rb +2 -2
  16. data/app/inputs/custom_inputs/radios_input.rb +20 -0
  17. data/app/inputs/custom_inputs/surround_input.rb +2 -2
  18. data/app/inputs/custom_inputs/switch_input.rb +2 -2
  19. data/config/initializers/will_paginate.rb +79 -0
  20. data/lib/ui_bibz.rb +56 -30
  21. data/lib/ui_bibz/helpers/ui_core_helper.rb +45 -37
  22. data/lib/ui_bibz/ui/core/alert.rb +1 -2
  23. data/lib/ui_bibz/ui/core/{breadcrumb/breadcrumb.rb → breadcrumb.rb} +5 -5
  24. data/lib/ui_bibz/ui/core/cards/card.rb +6 -6
  25. data/lib/ui_bibz/ui/core/cards/components/block/card_block_link.rb +1 -1
  26. data/lib/ui_bibz/ui/core/cards/components/block/card_block_text.rb +1 -1
  27. data/lib/ui_bibz/ui/core/cards/components/block/card_block_title.rb +1 -1
  28. data/lib/ui_bibz/ui/core/cards/components/card_block.rb +4 -4
  29. data/lib/ui_bibz/ui/core/cards/components/card_footer.rb +1 -1
  30. data/lib/ui_bibz/ui/core/cards/components/card_header.rb +1 -1
  31. data/lib/ui_bibz/ui/core/cards/components/card_image.rb +1 -1
  32. data/lib/ui_bibz/ui/core/cards/components/card_list_group.rb +2 -2
  33. data/lib/ui_bibz/ui/core/component.rb +4 -51
  34. data/lib/ui_bibz/ui/core/component/glyph_extension.rb +19 -0
  35. data/lib/ui_bibz/ui/core/component/klass_extension.rb +38 -0
  36. data/lib/ui_bibz/ui/core/{dropdown → dropdowns}/components/dropdown_divider.rb +1 -1
  37. data/lib/ui_bibz/ui/core/{dropdown → dropdowns}/components/dropdown_header.rb +2 -2
  38. data/lib/ui_bibz/ui/core/{dropdown → dropdowns}/components/dropdown_link.rb +2 -2
  39. data/lib/ui_bibz/ui/core/{dropdown → dropdowns}/dropdown.rb +11 -12
  40. data/lib/ui_bibz/ui/core/{buttons/button_split_dropdown.rb → dropdowns/split_dropdown.rb} +6 -10
  41. data/lib/ui_bibz/ui/core/{buttons → forms/buttons}/button.rb +5 -5
  42. data/lib/ui_bibz/ui/core/{buttons → forms/buttons}/button_choice.rb +8 -8
  43. data/lib/ui_bibz/ui/core/{buttons → forms/buttons}/button_group.rb +5 -5
  44. data/lib/ui_bibz/ui/core/{buttons → forms/buttons}/button_link.rb +13 -9
  45. data/lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb +98 -0
  46. data/lib/ui_bibz/ui/core/forms/choices/radio_field.rb +98 -0
  47. data/lib/ui_bibz/ui/core/{inputs → forms/choices}/switch_field.rb +3 -3
  48. data/lib/ui_bibz/ui/core/{inputs → forms/dates}/date_picker_field.rb +6 -6
  49. data/lib/ui_bibz/ui/core/{inputs → forms/numbers}/formula_field.rb +5 -5
  50. data/lib/ui_bibz/ui/core/{inputs → forms/selects}/dropdown_select_field.rb +5 -5
  51. data/lib/ui_bibz/ui/core/{inputs → forms/selects}/multi_column_field.rb +5 -5
  52. data/lib/ui_bibz/ui/core/{inputs → forms/selects}/multi_select_field.rb +8 -8
  53. data/lib/ui_bibz/ui/core/{inputs → forms/textareas}/markdown_editor_field.rb +5 -5
  54. data/lib/ui_bibz/ui/core/{inputs → forms/texts}/autocomplete_field.rb +5 -5
  55. data/lib/ui_bibz/ui/core/{inputs → forms/texts}/surround_field.rb +5 -5
  56. data/lib/ui_bibz/ui/core/glyph.rb +2 -1
  57. data/lib/ui_bibz/ui/core/{list → lists}/components/list.rb +11 -11
  58. data/lib/ui_bibz/ui/core/{list/components → lists/components/list}/list_body.rb +2 -2
  59. data/lib/ui_bibz/ui/core/{list/components → lists/components/list}/list_header.rb +2 -2
  60. data/lib/ui_bibz/ui/core/{list → lists}/list_group.rb +4 -4
  61. data/lib/ui_bibz/ui/core/navs/components/nav_dropdown.rb +1 -1
  62. data/lib/ui_bibz/ui/core/navs/components/navbar_form.rb +3 -1
  63. data/lib/ui_bibz/ui/core/paths/breadcrumb.rb +109 -0
  64. data/lib/ui_bibz/ui/core/{breadcrumb → paths}/components/breadcrumb_link.rb +6 -6
  65. data/lib/ui_bibz/ui/core/{stars.rb → star.rb} +14 -14
  66. data/lib/ui_bibz/ui/core/tag.rb +1 -2
  67. data/lib/ui_bibz/ui/core/{modal → windows}/components/modal_body.rb +2 -2
  68. data/lib/ui_bibz/ui/core/{modal → windows}/components/modal_footer.rb +2 -2
  69. data/lib/ui_bibz/ui/core/{modal → windows}/components/modal_header.rb +2 -2
  70. data/lib/ui_bibz/ui/core/{modal → windows}/modal.rb +8 -8
  71. data/lib/ui_bibz/ui/ux/tables/components/actions.rb +9 -9
  72. data/lib/ui_bibz/ui/ux/tables/extensions/actionable.rb +1 -1
  73. data/lib/ui_bibz/ui/ux/tables/table_pagination.rb +5 -4
  74. data/lib/ui_bibz/version.rb +1 -1
  75. data/test/dummy/app/controllers/users_controller.rb +18 -0
  76. data/test/dummy/app/models/user.rb +1 -0
  77. data/test/dummy/config/application.rb +1 -1
  78. data/test/dummy/config/initializers/simple_form_bootstrap.rb +155 -0
  79. data/test/simple_form_test.rb +123 -0
  80. data/test/test_helper.rb +2 -2
  81. data/test/ui/breadcrumb_test.rb +2 -2
  82. data/test/ui/button_test.rb +13 -39
  83. data/test/ui/dropdown_test.rb +14 -1
  84. data/test/ui/glyph_test.rb +6 -0
  85. data/test/ui/input_dropdown_select_field_test.rb +9 -9
  86. data/test/ui/input_switch_field_test.rb +11 -11
  87. data/test/ui/inputs_test.rb +26 -12
  88. data/test/ui/list_group_test.rb +2 -2
  89. data/test/ui/{stars_test.rb → star_test.rb} +7 -7
  90. data/test/ui/table_test.rb +3 -3
  91. data/test/ui_helper_test.rb +6 -1
  92. data/ui_bibz.gemspec +4 -3
  93. data/vendor/assets/stylesheets/awesome-bootstrap-checkbox.scss +250 -0
  94. metadata +65 -39
  95. data/lib/ui_bibz/helpers/pagination_helper.rb +0 -55
  96. data/lib/ui_bibz/ui/core/buttons/button_dropdown.rb +0 -82
@@ -96,31 +96,31 @@ module UiBibz::Ui::Core::Cards
96
96
 
97
97
  # Add Header which is a component
98
98
  def header content = nil, options = nil, html_options = nil, &block
99
- @items << CardHeader.new(content, options, html_options, &block).render
99
+ @items << UiBibz::Ui::Core::Cards::Components::CardHeader.new(content, options, html_options, &block).render
100
100
  end
101
101
 
102
102
  # Add Block div which is a component
103
103
  def block content = nil, options = nil, html_options = nil, &block
104
104
  if is_tap(content, options)
105
- @items << CardBlock.new(content, options, html_options).tap(&block).render
105
+ @items << UiBibz::Ui::Core::Cards::Components::CardBlock.new(content, options, html_options).tap(&block).render
106
106
  else
107
- @items << CardBlock.new(content, options, html_options, &block).render
107
+ @items << UiBibz::Ui::Core::Cards::Components::CardBlock.new(content, options, html_options, &block).render
108
108
  end
109
109
  end
110
110
 
111
111
  # Add Footer which is a component
112
112
  def footer content = nil, options = nil, html_options = nil, &block
113
- @items << CardFooter.new(content, options, html_options, &block).render
113
+ @items << UiBibz::Ui::Core::Cards::Components::CardFooter.new(content, options, html_options, &block).render
114
114
  end
115
115
 
116
116
  # Add List group which is a component
117
117
  def list_group content = nil, options = nil, html_options = nil, &block
118
- @items << CardListGroup.new(content, options, html_options).tap(&block).render
118
+ @items << UiBibz::Ui::Core::Cards::Components::CardListGroup.new(content, options, html_options).tap(&block).render
119
119
  end
120
120
 
121
121
  # Add Image which is a component
122
122
  def image content = nil, options = nil, html_options = nil, &block
123
- @items << CardImage.new(content, options, html_options, &block).render
123
+ @items << UiBibz::Ui::Core::Cards::Components::CardImage.new(content, options, html_options, &block).render
124
124
  end
125
125
 
126
126
  # Render html tag
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core::Cards
1
+ module UiBibz::Ui::Core::Cards::Components::Block
2
2
 
3
3
  # Create a card block title
4
4
  #
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core::Cards
1
+ module UiBibz::Ui::Core::Cards::Components::Block
2
2
 
3
3
  # Create a card block title
4
4
  #
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core::Cards
1
+ module UiBibz::Ui::Core::Cards::Components::Block
2
2
 
3
3
  # Create a card block title
4
4
  #
@@ -1,7 +1,7 @@
1
1
  require 'ui_bibz/ui/core/cards/components/block/card_block_text'
2
2
  require 'ui_bibz/ui/core/cards/components/block/card_block_title'
3
3
  require 'ui_bibz/ui/core/cards/components/block/card_block_link'
4
- module UiBibz::Ui::Core::Cards
4
+ module UiBibz::Ui::Core::Cards::Components
5
5
 
6
6
  # Create a card block
7
7
  #
@@ -46,15 +46,15 @@ module UiBibz::Ui::Core::Cards
46
46
  end
47
47
 
48
48
  def title content = nil, options = nil, html_options = nil, &block
49
- @items << CardBlockTitle.new(content, options, html_options, &block).render
49
+ @items << UiBibz::Ui::Core::Cards::Components::Block::CardBlockTitle.new(content, options, html_options, &block).render
50
50
  end
51
51
 
52
52
  def link content = nil, options = nil, html_options = nil, &block
53
- @items << CardBlockLink.new(content, options, html_options, &block).render
53
+ @items << UiBibz::Ui::Core::Cards::Components::Block::CardBlockLink.new(content, options, html_options, &block).render
54
54
  end
55
55
 
56
56
  def text content = nil, options = nil, html_options = nil, &block
57
- @items << CardBlockText.new(content, options, html_options, &block).render
57
+ @items << UiBibz::Ui::Core::Cards::Components::Block::CardBlockText.new(content, options, html_options, &block).render
58
58
  end
59
59
 
60
60
  private
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core::Cards
1
+ module UiBibz::Ui::Core::Cards::Components
2
2
 
3
3
  # Create a card footer
4
4
  #
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core::Cards
1
+ module UiBibz::Ui::Core::Cards::Components
2
2
 
3
3
  # Create a card header
4
4
  #
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core::Cards
1
+ module UiBibz::Ui::Core::Cards::Components
2
2
 
3
3
  # Create a card image
4
4
  #
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core::Cards
1
+ module UiBibz::Ui::Core::Cards::Components
2
2
 
3
3
  # Create a card list_group
4
4
  #
@@ -29,7 +29,7 @@ module UiBibz::Ui::Core::Cards
29
29
  # 'Exemple'
30
30
  # end.render
31
31
  #
32
- class CardListGroup < UiBibz::Ui::Core::ListGroup
32
+ class CardListGroup < UiBibz::Ui::Core::Lists::ListGroup
33
33
 
34
34
  # See UiBibz::Ui::Core::Component.initialize
35
35
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -1,4 +1,6 @@
1
1
  require 'haml'
2
+ require 'ui_bibz/ui/core/component/klass_extension'
3
+ require 'ui_bibz/ui/core/component/glyph_extension'
2
4
  module UiBibz::Ui::Core
3
5
 
4
6
  # Creates a component of the given +name+ using options created by the set of +options+.
@@ -37,6 +39,8 @@ module UiBibz::Ui::Core
37
39
  # end
38
40
  #
39
41
  class Component < UiBibz::Ui::Base
42
+ include UiBibz::Ui::Core::Component::KlassExtension
43
+ include Component::GlyphExtension
40
44
 
41
45
  attr_accessor :content, :html_options, :options
42
46
 
@@ -68,22 +72,6 @@ module UiBibz::Ui::Core
68
72
  glyph_and_content_html
69
73
  end
70
74
 
71
- # Render glyph and content html
72
- def glyph_and_content_html
73
- [glyph_with_space, content].compact.join.html_safe
74
- end
75
-
76
- # Render glyph with space html
77
- def glyph_with_space
78
- "#{ glyph } " unless glyph.nil?
79
- end
80
-
81
- # Render glyph html
82
- def glyph
83
- glyph_info = options[:glyph] if options.kind_of?(Hash)
84
- Glyph.new(glyph_info).render unless glyph_info.nil?
85
- end
86
-
87
75
  def tag_html
88
76
  UiBibz::Ui::Core::Tag.new(options[:tag], class: 'pull-right', type: :pill, status: (options[:tag_status] || :default)).render
89
77
  end
@@ -116,16 +104,6 @@ module UiBibz::Ui::Core
116
104
  {}
117
105
  end
118
106
 
119
- # Override this method to add a status class
120
- def status
121
- end
122
-
123
- # Join classes
124
- def join_classes *classes
125
- klasses = [*classes].flatten.compact.uniq.reject(&:blank?)
126
- klasses.empty? ? nil : klasses
127
- end
128
-
129
107
  # Add html data arguments
130
108
  def add_html_data name, value = true
131
109
  html_options[:data] = {} if html_options[:data].nil?
@@ -135,31 +113,10 @@ module UiBibz::Ui::Core
135
113
 
136
114
  private
137
115
 
138
- def initialize_component_html_classes
139
- cls = [
140
- html_options[:class],
141
- state,
142
- status,
143
- effect,
144
- options_classes,
145
- component_html_classes
146
- ]
147
- html_options[:class] = join_classes(cls)
148
- end
149
-
150
116
  def init_options
151
117
  @options = component_options.merge(@options)
152
118
  end
153
119
 
154
- # Set effect class
155
- def effect
156
- options[:effect]
157
- end
158
-
159
- def options_classes
160
- options[:class] if options.kind_of?(Hash)
161
- end
162
-
163
120
  def initialize_component_html_data
164
121
  component_html_data
165
122
  end
@@ -174,9 +131,5 @@ module UiBibz::Ui::Core
174
131
  initialize_component_html_options
175
132
  end
176
133
 
177
- def state
178
- options[:state] unless options[:state].nil?
179
- end
180
-
181
134
  end
182
135
  end
@@ -0,0 +1,19 @@
1
+ module GlyphExtension
2
+
3
+ # Render glyph and content html
4
+ def glyph_and_content_html
5
+ [glyph_with_space, content].compact.join.html_safe
6
+ end
7
+
8
+ # Render glyph with space html
9
+ def glyph_with_space
10
+ "#{ glyph } " unless glyph.nil?
11
+ end
12
+
13
+ # Render glyph html
14
+ def glyph
15
+ glyph_info = options[:glyph] if options.kind_of?(Hash)
16
+ UiBibz::Ui::Core::Glyph.new(glyph_info).render unless glyph_info.nil?
17
+ end
18
+
19
+ end
@@ -0,0 +1,38 @@
1
+ module KlassExtension
2
+
3
+ def join_classes *classes
4
+ klasses = [*classes].flatten.compact.uniq.reject(&:blank?)
5
+ klasses.empty? ? nil : klasses
6
+ end
7
+
8
+ # Override this method to add a status class
9
+ def status
10
+ end
11
+
12
+ private
13
+
14
+ def initialize_component_html_classes
15
+ cls = [
16
+ html_options[:class],
17
+ state,
18
+ status,
19
+ effect,
20
+ options_classes,
21
+ component_html_classes
22
+ ]
23
+ html_options[:class] = join_classes(cls)
24
+ end
25
+
26
+ def effect
27
+ options[:effect]
28
+ end
29
+
30
+ def options_classes
31
+ options[:class] if options.kind_of?(Hash)
32
+ end
33
+
34
+ def state
35
+ options[:state] unless options[:state].nil?
36
+ end
37
+
38
+ end
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Dropdowns::Components
2
2
 
3
3
  # Create DropdownDivider
4
4
  #
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Dropdowns::Components
2
2
 
3
3
  # Create DropdownHeader
4
4
  #
@@ -31,7 +31,7 @@ module UiBibz::Ui::Core
31
31
  # 'Home'
32
32
  # end.render
33
33
  #
34
- class DropdownHeader < Component
34
+ class DropdownHeader < UiBibz::Ui::Core::Component
35
35
 
36
36
  # See UiBibz::Ui::Core::Component.initialize
37
37
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Dropdowns::Components
2
2
 
3
3
  # Create DropdownLink
4
4
  #
@@ -39,7 +39,7 @@ module UiBibz::Ui::Core
39
39
  # 'Home'
40
40
  # end.render
41
41
  #
42
- class DropdownLink < Component
42
+ class DropdownLink < UiBibz::Ui::Core::Component
43
43
 
44
44
  # See UiBibz::Ui::Core::Component.initialize
45
45
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -1,7 +1,7 @@
1
- require 'ui_bibz/ui/core/dropdown/components/dropdown_header'
2
- require 'ui_bibz/ui/core/dropdown/components/dropdown_divider'
3
- require 'ui_bibz/ui/core/dropdown/components/dropdown_link'
4
- module UiBibz::Ui::Core
1
+ require 'ui_bibz/ui/core/dropdowns/components/dropdown_header'
2
+ require 'ui_bibz/ui/core/dropdowns/components/dropdown_divider'
3
+ require 'ui_bibz/ui/core/dropdowns/components/dropdown_link'
4
+ module UiBibz::Ui::Core::Dropdowns
5
5
 
6
6
  # Create a dropdown
7
7
  #
@@ -29,7 +29,7 @@ module UiBibz::Ui::Core
29
29
  #
30
30
  # ==== Signatures
31
31
  #
32
- # UiBibz::Ui::Core::Dropdown.new(options = nil, html_options = nil).tap do |d|
32
+ # UiBibz::Ui::Core::Dropdowns::Dropdown.new(options = nil, html_options = nil).tap do |d|
33
33
  # ...
34
34
  # d.header content = nil, options = nil, html_options = nil, &block
35
35
  # d.divider
@@ -39,7 +39,7 @@ module UiBibz::Ui::Core
39
39
  #
40
40
  # ==== Examples
41
41
  #
42
- # UiBibz::Ui::Core::Dropdown.new(name, status: :success).tap do |d|
42
+ # UiBibz::Ui::Core::Dropdowns::Dropdown.new(name, status: :success).tap do |d|
43
43
  # d.link 'test', { url: '#' }
44
44
  # d.divider
45
45
  # d.header 'Header 1'
@@ -60,7 +60,7 @@ module UiBibz::Ui::Core
60
60
  # end
61
61
  # end
62
62
  #
63
- class Dropdown < Component
63
+ class Dropdown < UiBibz::Ui::Core::Component
64
64
 
65
65
  def initialize content, options = nil, html_options = nil, &block
66
66
  super
@@ -79,19 +79,19 @@ module UiBibz::Ui::Core
79
79
  # Add dropdown header
80
80
  # See UiBibz::Ui::Core::DropdownHeader
81
81
  def header content = nil, options = nil, html_options = nil, &block
82
- @items << DropdownHeader.new(content, options, html_options, &block).render
82
+ @items << UiBibz::Ui::Core::Dropdowns::Components::DropdownHeader.new(content, options, html_options, &block).render
83
83
  end
84
84
 
85
85
  # Add dropdown Separator
86
86
  # See UiBibz::Ui::Core::DropdownDivider
87
87
  def divider
88
- @items << DropdownDivider.new.render
88
+ @items << UiBibz::Ui::Core::Dropdowns::Components::DropdownDivider.new.render
89
89
  end
90
90
 
91
91
  # Add dropdown link in list
92
92
  # See UiBibz::Ui::Core::DropdownLink
93
93
  def link content = nil, options = nil, html_options = nil, &block
94
- @items << DropdownLink.new(content, options, html_options, &block).render
94
+ @items << UiBibz::Ui::Core::Dropdowns::Components::DropdownLink.new(content, options, html_options, &block).render
95
95
  end
96
96
 
97
97
  # Add html component
@@ -134,8 +134,7 @@ module UiBibz::Ui::Core
134
134
  end
135
135
 
136
136
  def button_status
137
- sym = @status || :primary
138
- "btn-#{ sym }"
137
+ "btn-#{ @status || :primary }"
139
138
  end
140
139
 
141
140
  # :lg, :sm or :xs
@@ -1,8 +1,8 @@
1
- module UiBibz::Ui::Core::Buttons
1
+ module UiBibz::Ui::Core::Dropdowns
2
2
 
3
3
  # Create a button dropdown
4
4
  #
5
- # This element is an extend of UiBibz::Ui::Core::Dropdown.
5
+ # This element is an extend of UiBibz::Ui::Core::Dropdowns::Dropdown.
6
6
  #
7
7
  # ==== Attributes
8
8
  #
@@ -28,7 +28,7 @@ module UiBibz::Ui::Core::Buttons
28
28
  #
29
29
  # ==== Signatures
30
30
  #
31
- # UiBibz::Ui::Core::Buttons::ButtonSplitDropdown.new(options = nil, html_options = nil).tap do |d|
31
+ # UiBibz::Ui::Core::Dropdowns::SplitDropdown.new(options = nil, html_options = nil).tap do |d|
32
32
  # d.list content = nil, options = nil, html_options = nil, &block
33
33
  # d.list content = nil, options = nil, html_options = nil, &block
34
34
  # d.list content = nil, options = nil, html_options = nil, &block
@@ -37,7 +37,7 @@ module UiBibz::Ui::Core::Buttons
37
37
  #
38
38
  # ==== Examples
39
39
  #
40
- # UiBibz::Ui::Core::Buttons::ButtonSplitDropdown.new(name, status: :success).tap do |d|
40
+ # UiBibz::Ui::Core::Dropdowns::SplitDropdown.new(name, status: :success).tap do |d|
41
41
  # d.list link_to('test', '#')
42
42
  # d.list('---')
43
43
  # d.list('Header 1', { type: :header })
@@ -46,14 +46,14 @@ module UiBibz::Ui::Core::Buttons
46
46
  #
47
47
  # ==== Helper
48
48
  #
49
- # button_split_dropdown(name, options = {}, html_options = {}) do |b|
49
+ # split_dropdown(name, options = {}, html_options = {}) do |b|
50
50
  # d.list(content, options = {}, html_options = {})
51
51
  # d.list(options = {}, html_options = {}) do
52
52
  # content
53
53
  # end
54
54
  # end
55
55
  #
56
- class ButtonSplitDropdown < UiBibz::Ui::Core::Dropdown
56
+ class SplitDropdown < UiBibz::Ui::Core::Dropdowns::Dropdown
57
57
 
58
58
  # See UiBibz::Ui::Core::Dropdown.initialize
59
59
  def initialize name, options = nil, html_options = nil, &block
@@ -75,10 +75,6 @@ module UiBibz::Ui::Core::Buttons
75
75
  ['btn-group', type]
76
76
  end
77
77
 
78
- def component_html_options
79
- { role: 'group' }
80
- end
81
-
82
78
  def button_html
83
79
  content_tag :button, button_content, class: join_classes("btn", button_status, size)
84
80
  end