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
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Boxes
2
2
 
3
3
  # Create a jumbotron
4
4
  #
@@ -18,17 +18,17 @@ module UiBibz::Ui::Core
18
18
  #
19
19
  # ==== Signatures
20
20
  #
21
- # UiBibz::Ui::Core::Jumbotron.new(content, options = nil, html_options = nil)
21
+ # UiBibz::Ui::Core::Boxes::Jumbotron.new(content, options = nil, html_options = nil)
22
22
  #
23
- # UiBibz::Ui::Core::Jumbotron.new(options = nil, html_options = nil) do
23
+ # UiBibz::Ui::Core::Boxes::Jumbotron.new(options = nil, html_options = nil) do
24
24
  # content
25
25
  # end
26
26
  #
27
27
  # ==== Examples
28
28
  #
29
- # UiBibz::Ui::Core::Jumbotron.new(content, full_width: true).render
29
+ # UiBibz::Ui::Core::Boxes::Jumbotron.new(content, full_width: true).render
30
30
  #
31
- # UiBibz::Ui::Core::Jumbotron.new() do
31
+ # UiBibz::Ui::Core::Boxes::Jumbotron.new() do
32
32
  # #content
33
33
  # end.render
34
34
  #
@@ -42,7 +42,7 @@ module UiBibz::Ui::Core
42
42
  #
43
43
  class Jumbotron < UiBibz::Ui::Core::Component
44
44
 
45
- # See UiBibz::Ui::Core::Component.initialize
45
+ # See UiBibz::Ui::Core::Boxes::Component.initialize
46
46
  def initialize content = nil, options = nil, html_options = nil, &block
47
47
  super
48
48
  end
@@ -78,6 +78,7 @@ module UiBibz::Ui::Core::Forms::Buttons
78
78
  opts = super
79
79
  opts = opts.merge(toggle) unless options[:toggle].nil?
80
80
  opts = opts.merge(active_html_options) if options[:state] == :active
81
+ opts = opts.merge(html_title) if options[:text] == false
81
82
  opts = opts.merge({ disabled: 'disabled' }) if options[:state] == :disabled
82
83
  opts
83
84
  end
@@ -90,6 +91,10 @@ module UiBibz::Ui::Core::Forms::Buttons
90
91
  "outline" unless options[:outline].nil?
91
92
  end
92
93
 
94
+ def html_title
95
+ { title: content }
96
+ end
97
+
93
98
  def toggle
94
99
  { "data-toggle" => 'button', "aria-pressed" => false, "autocomplete" => "off" }
95
100
  end
@@ -108,11 +113,11 @@ module UiBibz::Ui::Core::Forms::Buttons
108
113
 
109
114
  def badge_html
110
115
  if options[:badge].kind_of? Hash
111
- options[:badge][:status] = options[:status] || :secondary
112
- UiBibz::Ui::Core::Badge.new(options[:badge].delete(:content), options[:badge]).render
116
+ options[:badge][:status] = options[:badge][:status] || options[:status] || :secondary
117
+ UiBibz::Ui::Core::Notifications::Badge.new(options[:badge].delete(:content), options[:badge]).render
113
118
 
114
119
  else
115
- UiBibz::Ui::Core::Badge.new(options[:badge], status: (options[:status] || :secondary)).render
120
+ UiBibz::Ui::Core::Notifications::Badge.new(options[:badge], status: (options[:status] || :secondary)).render
116
121
  end
117
122
  end
118
123
 
@@ -63,14 +63,14 @@ module UiBibz::Ui::Core::Forms::Buttons
63
63
  super
64
64
  end
65
65
 
66
- def button content = nil, options = nil, html_options = nil, &block
66
+ def button content = nil, opts = nil, html_options = nil, &block
67
67
  if block.nil?
68
- options = @options.merge(options || {})
68
+ opts = @options.merge(opts || {})
69
69
  else
70
70
  content = @options.merge(content || {})
71
71
  end
72
72
 
73
- @items << Choice.new(content, options, html_options, &block).render
73
+ @items << Choice.new(content, opts, html_options, &block).render
74
74
  end
75
75
 
76
76
  private
@@ -89,7 +89,7 @@ module UiBibz::Ui::Core::Forms::Buttons
89
89
  private
90
90
 
91
91
  def component_html_classes
92
- super << [class_name, size, position, space]
92
+ super << [class_name, size, position]
93
93
  end
94
94
 
95
95
  def component_html_options
@@ -116,10 +116,5 @@ module UiBibz::Ui::Core::Forms::Buttons
116
116
  "btn-group-#{ options[:position] }" if options[:position]
117
117
  end
118
118
 
119
- # 1 to 5
120
- def space
121
- "mr-#{ options[:space] }" if options[:space]
122
- end
123
-
124
119
  end
125
120
  end
@@ -55,7 +55,7 @@ module UiBibz::Ui::Core::Forms::Buttons
55
55
  # content
56
56
  # end
57
57
  #
58
- class ButtonGroupDropdown < UiBibz::Ui::Core::Dropdowns::Dropdown
58
+ class ButtonGroupDropdown < UiBibz::Ui::Core::Forms::Dropdowns::Dropdown
59
59
 
60
60
  # See UiBibz::Ui::Core::Forms::Buttons::Button.initialize
61
61
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -0,0 +1,81 @@
1
+ require 'ui_bibz/ui/core/forms/choices/components/choice'
2
+ module UiBibz::Ui::Core::Forms::Choices
3
+
4
+ # Create a choice group
5
+ #
6
+ # This element is an extend of UiBibz::Ui::Core::Forms::Choices::ButtonGroup
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
+ # * +type+ - Symbol (+:checkbox+, +:radio+)
19
+ # * +status+ - status of élement with symbol value:
20
+ # (+:primary+, +:secondary+, +:info+, +:warning+, +:danger+)
21
+ # * +size+
22
+ # (+:xs+, +:sm+, +:lg+)
23
+ # * +outline+ - Boolean
24
+ # * +state+ - Symbol (+:active+, +:disabled)
25
+ #
26
+ # ==== Signatures
27
+ #
28
+ # UiBibz::Ui::Core::Forms::Choices::ChoiceGroup.new(content, options = nil, html_options = nil)
29
+ #
30
+ # UiBibz::Ui::Core::Forms::Choices::ChoiceGroup.new(options = nil, html_options = nil) do
31
+ # content
32
+ # end
33
+ #
34
+ # ==== Examples
35
+ #
36
+ # UiBibz::Ui::Core::Forms::Choices::ChoiceGroup.new({ status: primary }, { class: 'lable-class'}) do |cg|
37
+ # cg.choice 'Choice 1'
38
+ # cg.choice 'Choice 2'
39
+ # end.render
40
+ #
41
+ # ==== Helper
42
+ #
43
+ # ui_choice_group(options = {}, html_options = {}) do |cg|
44
+ # cg.choice content, options, html_options
45
+ # cg.choice content, options, html_options
46
+ # end
47
+ #
48
+ class ChoiceGroup < UiBibz::Ui::Core::Forms::Buttons::ButtonGroup
49
+
50
+ # See UiBibz::Ui::Core::Forms::Choices::Button.initialize
51
+ def initialize content = nil, options = nil, html_options = nil, &block
52
+ super
53
+ end
54
+
55
+ def choice content = nil, opts = nil, html_options = nil, &block
56
+ if block.nil?
57
+ opts = @options.merge(opts || {})
58
+ else
59
+ content = @options.merge(content || {})
60
+ end
61
+
62
+ @items << Choice.new(content, opts, html_options, &block).render
63
+ end
64
+
65
+ private
66
+
67
+ def component_html_classes
68
+ super << ['button-choice']
69
+ end
70
+
71
+ def component_html_options
72
+ {}
73
+ end
74
+
75
+ def component_html_data
76
+ super
77
+ add_html_data "toggle", "buttons"
78
+ end
79
+
80
+ end
81
+ end
@@ -1,8 +1,8 @@
1
- module UiBibz::Ui::Core::Forms::Buttons
1
+ module UiBibz::Ui::Core::Forms::Choices
2
2
 
3
- # Create a button choice
3
+ # Create a choice
4
4
  #
5
- # This element is an extend of UiBibz::Ui::Core::Forms::Buttons::Button
5
+ # This element is an extend of UiBibz::Ui::Core::Forms::Choices::Button
6
6
  #
7
7
  # ==== Attributes
8
8
  #
@@ -14,12 +14,8 @@ module UiBibz::Ui::Core::Forms::Buttons
14
14
  #
15
15
  # You can add HTML attributes using the +html_options+.
16
16
  # You can pass arguments in options attribute:
17
- # * +type+ - Symbol (+:checkbox+, +:radio+)
18
17
  # * +status+ - status of élement with symbol value:
19
18
  # (+:primary+, +:secondary+, +:info+, +:warning+, +:danger+)
20
- # * +size+
21
- # (+:xs+, +:sm+, +:lg+)
22
- # * +url+ - String url
23
19
  # * +outline+ - Boolean
24
20
  # * +state+ - Symbol (+:active+, +:disabled)
25
21
  # * +type+ - Symbol (+:block)
@@ -33,17 +29,17 @@ module UiBibz::Ui::Core::Forms::Buttons
33
29
  #
34
30
  # ==== Signatures
35
31
  #
36
- # UiBibz::Ui::Core::Forms::Buttons::Choice.new(content, options = nil, html_options = nil)
32
+ # UiBibz::Ui::Core::Forms::Choices::Choice.new(content, options = nil, html_options = nil)
37
33
  #
38
- # UiBibz::Ui::Core::Forms::Buttons::Choice.new(options = nil, html_options = nil) do
34
+ # UiBibz::Ui::Core::Forms::Choices::Choice.new(options = nil, html_options = nil) do
39
35
  # content
40
36
  # end
41
37
  #
42
38
  # ==== Examples
43
39
  #
44
- # UiBibz::Ui::Core::Forms::Buttons::Choice.new('test', state: :active)
40
+ # UiBibz::Ui::Core::Forms::Choices::Choice.new('test', state: :active)
45
41
  #
46
- # UiBibz::Ui::Core::Forms::Buttons::Choice.new({id: 'state', input_html_options: { class: 'state'}}, { class: 'lable-class'}) do
42
+ # UiBibz::Ui::Core::Forms::Choices::Choice.new({id: 'state', input_html_options: { class: 'state'}}, { class: 'lable-class'}) do
47
43
  # test
48
44
  # end.render
49
45
  #
@@ -57,7 +53,7 @@ module UiBibz::Ui::Core::Forms::Buttons
57
53
  #
58
54
  class Choice < UiBibz::Ui::Core::Forms::Buttons::Button
59
55
 
60
- # See UiBibz::Ui::Core::Forms::Buttons::Button.initialize
56
+ # See UiBibz::Ui::Core::Forms::Choices::Button.initialize
61
57
  def initialize content = nil, options = nil, html_options = nil, &block
62
58
  super
63
59
  end
@@ -72,14 +68,11 @@ module UiBibz::Ui::Core::Forms::Buttons
72
68
  def button_choice_html_tag
73
69
  content_tag :label, html_options do
74
70
  concat tag(:input, input_options)
75
- concat glyph_and_content_html
71
+ concat glyph_and_content_html(options[:text].nil? ? @content : ' ')
72
+ concat badge_html unless options[:badge].nil?
76
73
  end
77
74
  end
78
75
 
79
- def component_html_classes
80
- ['btn', size]
81
- end
82
-
83
76
  def input_options
84
77
  { type: type, autocomplete: :off }.merge(checked).merge(value).merge(name).merge(id).merge(input_html_options)
85
78
  end
@@ -109,7 +102,7 @@ module UiBibz::Ui::Core::Forms::Buttons
109
102
  end
110
103
 
111
104
  def status
112
- "btn-#{ @options[:status] || :secondary }"
105
+ ["btn", outline, options[:status] || :secondary].compact.join('-')
113
106
  end
114
107
 
115
108
  end
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core::Dropdowns::Components
1
+ module UiBibz::Ui::Core::Forms::Dropdowns::Components
2
2
 
3
3
  # Create DropdownDivider
4
4
  #
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core::Dropdowns::Components
1
+ module UiBibz::Ui::Core::Forms::Dropdowns::Components
2
2
 
3
3
  # Create DropdownHeader
4
4
  #
@@ -17,17 +17,17 @@ module UiBibz::Ui::Core::Dropdowns::Components
17
17
  #
18
18
  # ==== Signatures
19
19
  #
20
- # UiBibz::Ui::Core::DropdownHeader.new(content, options = nil, html_options = nil)
20
+ # UiBibz::Ui::Core::Forms::DropdownHeader.new(content, options = nil, html_options = nil)
21
21
  #
22
- # UiBibz::Ui::Core::DropdownHeader.new(options = nil, html_options = nil) do
22
+ # UiBibz::Ui::Core::Forms::DropdownHeader.new(options = nil, html_options = nil) do
23
23
  # content
24
24
  # end
25
25
  #
26
26
  # ==== Examples
27
27
  #
28
- # UiBibz::Ui::Core::DropdownHeader.new('Home',{ class: 'test' }).render
28
+ # UiBibz::Ui::Core::Forms::DropdownHeader.new('Home',{ class: 'test' }).render
29
29
  #
30
- # UiBibz::Ui::Core::DropdownHeader.new({ class: 'test' }) do
30
+ # UiBibz::Ui::Core::Forms::DropdownHeader.new({ class: 'test' }) do
31
31
  # 'Home'
32
32
  # end.render
33
33
  #
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core::Dropdowns::Components
1
+ module UiBibz::Ui::Core::Forms::Dropdowns::Components
2
2
 
3
3
  # Create DropdownLink
4
4
  #
@@ -25,17 +25,17 @@ module UiBibz::Ui::Core::Dropdowns::Components
25
25
  #
26
26
  # ==== Signatures
27
27
  #
28
- # UiBibz::Ui::Core::DropdownLink.new(content, options = nil, html_options = nil)
28
+ # UiBibz::Ui::Core::Forms::DropdownLink.new(content, options = nil, html_options = nil)
29
29
  #
30
- # UiBibz::Ui::Core::DropdownLink.new(options = nil, html_options = nil) do
30
+ # UiBibz::Ui::Core::Forms::DropdownLink.new(options = nil, html_options = nil) do
31
31
  # content
32
32
  # end
33
33
  #
34
34
  # ==== Examples
35
35
  #
36
- # UiBibz::Ui::Core::DropdownLink.new('Home', { glyph: 'home', state: :active, url: '#home', link_html_options: { class: 'link1' }},{ class: 'test' }).render
36
+ # UiBibz::Ui::Core::Forms::DropdownLink.new('Home', { glyph: 'home', state: :active, url: '#home', link_html_options: { class: 'link1' }},{ class: 'test' }).render
37
37
  #
38
- # UiBibz::Ui::Core::DropdownLink.new({ glyph: { name: 'eye', size: 3 }, url: '#home' }, { class: 'test' }) do
38
+ # UiBibz::Ui::Core::Forms::DropdownLink.new({ glyph: { name: 'eye', size: 3 }, url: '#home' }, { class: 'test' }) do
39
39
  # 'Home'
40
40
  # end.render
41
41
  #
@@ -1,7 +1,7 @@
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
1
+ require 'ui_bibz/ui/core/forms/dropdowns/components/dropdown_header'
2
+ require 'ui_bibz/ui/core/forms/dropdowns/components/dropdown_divider'
3
+ require 'ui_bibz/ui/core/forms/dropdowns/components/dropdown_link'
4
+ module UiBibz::Ui::Core::Forms::Dropdowns
5
5
 
6
6
  # Create a dropdown
7
7
  #
@@ -29,7 +29,7 @@ module UiBibz::Ui::Core::Dropdowns
29
29
  #
30
30
  # ==== Signatures
31
31
  #
32
- # UiBibz::Ui::Core::Dropdowns::Dropdown.new(options = nil, html_options = nil).tap do |d|
32
+ # UiBibz::Ui::Core::Forms::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::Dropdowns
39
39
  #
40
40
  # ==== Examples
41
41
  #
42
- # UiBibz::Ui::Core::Dropdowns::Dropdown.new(name, status: :success).tap do |d|
42
+ # UiBibz::Ui::Core::Forms::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'
@@ -77,21 +77,21 @@ module UiBibz::Ui::Core::Dropdowns
77
77
  end
78
78
 
79
79
  # Add dropdown header
80
- # See UiBibz::Ui::Core::DropdownHeader
80
+ # See UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownHeader
81
81
  def header content = nil, options = nil, html_options = nil, &block
82
- @items << UiBibz::Ui::Core::Dropdowns::Components::DropdownHeader.new(content, options, html_options, &block).render
82
+ @items << UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownHeader.new(content, options, html_options, &block).render
83
83
  end
84
84
 
85
85
  # Add dropdown Separator
86
- # See UiBibz::Ui::Core::DropdownDivider
86
+ # See UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownDivider
87
87
  def divider
88
- @items << UiBibz::Ui::Core::Dropdowns::Components::DropdownDivider.new.render
88
+ @items << UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownDivider.new.render
89
89
  end
90
90
 
91
91
  # Add dropdown link in list
92
- # See UiBibz::Ui::Core::DropdownLink
92
+ # See UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownLink
93
93
  def link content = nil, options = nil, html_options = nil, &block
94
- @items << UiBibz::Ui::Core::Dropdowns::Components::DropdownLink.new(content, options, html_options, &block).render
94
+ @items << UiBibz::Ui::Core::Forms::Dropdowns::Components::DropdownLink.new(content, options, html_options, &block).render
95
95
  end
96
96
 
97
97
  # Add html component
@@ -1,8 +1,8 @@
1
- module UiBibz::Ui::Core::Dropdowns
1
+ module UiBibz::Ui::Core::Forms::Dropdowns
2
2
 
3
3
  # Create a button dropdown
4
4
  #
5
- # This element is an extend of UiBibz::Ui::Core::Dropdowns::Dropdown.
5
+ # This element is an extend of UiBibz::Ui::Core::Forms::Dropdowns::Dropdown.
6
6
  #
7
7
  # ==== Attributes
8
8
  #
@@ -28,7 +28,7 @@ module UiBibz::Ui::Core::Dropdowns
28
28
  #
29
29
  # ==== Signatures
30
30
  #
31
- # UiBibz::Ui::Core::Dropdowns::SplitDropdown.new(options = nil, html_options = nil).tap do |d|
31
+ # UiBibz::Ui::Core::Forms::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::Dropdowns
37
37
  #
38
38
  # ==== Examples
39
39
  #
40
- # UiBibz::Ui::Core::Dropdowns::SplitDropdown.new(name, status: :success).tap do |d|
40
+ # UiBibz::Ui::Core::Forms::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 })
@@ -53,9 +53,9 @@ module UiBibz::Ui::Core::Dropdowns
53
53
  # end
54
54
  # end
55
55
  #
56
- class SplitDropdown < UiBibz::Ui::Core::Dropdowns::Dropdown
56
+ class SplitDropdown < UiBibz::Ui::Core::Forms::Dropdowns::Dropdown
57
57
 
58
- # See UiBibz::Ui::Core::Dropdown.initialize
58
+ # See UiBibz::Ui::Core::Forms::Dropdowns::Dropdown.initialize
59
59
  def initialize name, options = nil, html_options = nil, &block
60
60
  super
61
61
  end
@@ -79,7 +79,7 @@ module UiBibz::Ui::Core::Forms::Numbers
79
79
  end
80
80
 
81
81
  def formula_field_alert_glyph
82
- UiBibz::Ui::Core::Glyph.new('exclamation-triangle', status: :danger ).render
82
+ UiBibz::Ui::Core::Icons::Glyph.new('exclamation-triangle', status: :danger ).render
83
83
  end
84
84
 
85
85
  def formula_field_name