ui_bibz 2.0.0.alpha14 → 2.0.0.alpha15

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 (81) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/app/inputs/custom_inputs/autocomplete_input.rb +2 -2
  4. data/app/inputs/custom_inputs/date_picker_input.rb +2 -2
  5. data/app/inputs/custom_inputs/dropdown_select_input.rb +2 -2
  6. data/app/inputs/custom_inputs/formula_input.rb +2 -2
  7. data/app/inputs/custom_inputs/markdown_editor_input.rb +2 -2
  8. data/app/inputs/custom_inputs/multi_column_input.rb +2 -2
  9. data/app/inputs/custom_inputs/multi_select_input.rb +2 -2
  10. data/app/inputs/custom_inputs/surround_input.rb +2 -2
  11. data/app/inputs/custom_inputs/switch_input.rb +2 -2
  12. data/lib/ui_bibz/helpers/ui_core_helper.rb +189 -25
  13. data/lib/ui_bibz/helpers/ui_ux_helper.rb +38 -11
  14. data/lib/ui_bibz/ui/core/{button → buttons}/button.rb +6 -17
  15. data/lib/ui_bibz/ui/core/{button → buttons}/button_choice.rb +8 -8
  16. data/lib/ui_bibz/ui/core/{button → buttons}/button_dropdown.rb +6 -6
  17. data/lib/ui_bibz/ui/core/{button → buttons}/button_group.rb +6 -6
  18. data/lib/ui_bibz/ui/core/{button → buttons}/button_link.rb +8 -8
  19. data/lib/ui_bibz/ui/core/{button → buttons}/button_split_dropdown.rb +5 -5
  20. data/lib/ui_bibz/ui/core/{card → cards}/card.rb +13 -13
  21. data/lib/ui_bibz/ui/core/{card → cards}/card_column.rb +7 -7
  22. data/lib/ui_bibz/ui/core/{card → cards}/card_deck.rb +7 -7
  23. data/lib/ui_bibz/ui/core/{card → cards}/card_group.rb +7 -7
  24. data/lib/ui_bibz/ui/core/{card → cards}/components/block/card_block_link.rb +6 -6
  25. data/lib/ui_bibz/ui/core/{card → cards}/components/block/card_block_text.rb +6 -6
  26. data/lib/ui_bibz/ui/core/{card → cards}/components/block/card_block_title.rb +6 -6
  27. data/lib/ui_bibz/ui/core/{card → cards}/components/card_block.rb +9 -9
  28. data/lib/ui_bibz/ui/core/{card → cards}/components/card_footer.rb +6 -6
  29. data/lib/ui_bibz/ui/core/{card → cards}/components/card_header.rb +6 -6
  30. data/lib/ui_bibz/ui/core/{card → cards}/components/card_image.rb +6 -6
  31. data/lib/ui_bibz/ui/core/{card → cards}/components/card_list_group.rb +5 -5
  32. data/lib/ui_bibz/ui/core/{input → inputs}/autocomplete_field.rb +6 -6
  33. data/lib/ui_bibz/ui/core/{input → inputs}/date_picker_field.rb +20 -19
  34. data/lib/ui_bibz/ui/core/{input → inputs}/dropdown_select_field.rb +5 -5
  35. data/lib/ui_bibz/ui/core/{input → inputs}/formula_field.rb +6 -6
  36. data/lib/ui_bibz/ui/core/{input → inputs}/markdown_editor_field.rb +6 -6
  37. data/lib/ui_bibz/ui/core/{input → inputs}/multi_column_field.rb +6 -6
  38. data/lib/ui_bibz/ui/core/{input → inputs}/multi_select_field.rb +8 -8
  39. data/lib/ui_bibz/ui/core/{input → inputs}/surround_field.rb +6 -6
  40. data/lib/ui_bibz/ui/core/{input → inputs}/switch_field.rb +4 -4
  41. data/lib/ui_bibz/ui/core/jumbotron.rb +2 -2
  42. data/lib/ui_bibz/ui/core/{layout → layouts}/col.rb +6 -6
  43. data/lib/ui_bibz/ui/core/{layout → layouts}/container.rb +6 -6
  44. data/lib/ui_bibz/ui/core/{layout → layouts}/row.rb +4 -4
  45. data/lib/ui_bibz/ui/core/list/list_group.rb +1 -1
  46. data/lib/ui_bibz/ui/core/{nav → navs}/components/nav_dropdown.rb +6 -6
  47. data/lib/ui_bibz/ui/core/{nav → navs}/components/nav_link.rb +11 -11
  48. data/lib/ui_bibz/ui/core/{nav → navs}/components/nav_link_link.rb +3 -2
  49. data/lib/ui_bibz/ui/core/{nav → navs}/components/nav_link_list.rb +2 -2
  50. data/lib/ui_bibz/ui/core/{nav → navs}/components/navbar_brand.rb +2 -2
  51. data/lib/ui_bibz/ui/core/{nav → navs}/components/navbar_form.rb +4 -5
  52. data/lib/ui_bibz/ui/core/{nav → navs}/components/navbar_nav.rb +7 -7
  53. data/lib/ui_bibz/ui/core/{nav → navs}/components/navbar_text.rb +6 -6
  54. data/lib/ui_bibz/ui/core/{nav → navs}/nav.rb +9 -9
  55. data/lib/ui_bibz/ui/core/{nav → navs}/navbar.rb +9 -9
  56. data/lib/ui_bibz/ui/ux/{table → tables}/components/actions.rb +1 -1
  57. data/lib/ui_bibz/ui/ux/{table → tables}/components/as.rb +1 -1
  58. data/lib/ui_bibz/ui/ux/{table → tables}/components/column.rb +1 -1
  59. data/lib/ui_bibz/ui/ux/{table → tables}/components/columns.rb +1 -1
  60. data/lib/ui_bibz/ui/ux/{table → tables}/components/store.rb +3 -3
  61. data/lib/ui_bibz/ui/ux/{table → tables}/components/thead.rb +1 -1
  62. data/lib/ui_bibz/ui/ux/{table → tables}/extensions/actionable.rb +2 -2
  63. data/lib/ui_bibz/ui/ux/{table → tables}/extensions/paginable.rb +3 -3
  64. data/lib/ui_bibz/ui/ux/{table → tables}/extensions/searchable.rb +1 -1
  65. data/lib/ui_bibz/ui/ux/{table → tables}/extensions/sortable.rb +1 -1
  66. data/lib/ui_bibz/ui/ux/{table → tables}/table.rb +17 -17
  67. data/lib/ui_bibz/ui/ux/{table → tables}/table_card.rb +10 -10
  68. data/lib/ui_bibz/ui/ux/{table → tables}/table_pagination.rb +3 -3
  69. data/lib/ui_bibz/ui/ux/{table → tables}/table_pagination_per_page.rb +3 -3
  70. data/lib/ui_bibz/ui/ux/{table → tables}/table_search_field.rb +3 -2
  71. data/lib/ui_bibz/version.rb +1 -1
  72. data/lib/ui_bibz.rb +45 -29
  73. data/test/store_test.rb +2 -2
  74. data/test/ui/button_test.rb +15 -15
  75. data/test/ui/grid_test.rb +3 -3
  76. data/test/ui/input_dropdown_select_field_test.rb +9 -9
  77. data/test/ui/input_switch_field_test.rb +10 -10
  78. data/test/ui/inputs_test.rb +13 -13
  79. data/test/ui/nav_test.rb +2 -2
  80. data/test/ui/table_test.rb +26 -26
  81. metadata +57 -57
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Inputs
2
2
 
3
3
  # Create a DatePickerField
4
4
  #
@@ -17,23 +17,24 @@ module UiBibz::Ui::Core
17
17
  # * +prepend+ - String
18
18
  # * +append+ - String
19
19
  # * +range+ - String
20
- # * +date_today_highlight+ - Boolean
20
+ # * +autoclose+ - Boolean
21
+ # * +today_highlight+ - Boolean
21
22
  # * +calendar_weeks+ - Boolean
22
- # * +date_disabled+ - Array, String
23
+ # * +dates_disabled+ - Array, String
23
24
  #
24
25
  # ==== Signatures
25
26
  #
26
- # UiBibz::Ui::Core::DatePickerField.new(content, options = {}, html_options = {}).render
27
+ # UiBibz::Ui::Core::Inputs::DatePickerField.new(content, options = {}, html_options = {}).render
27
28
  #
28
- # UiBibz::Ui::Core::DatePickerField.new(options = {}, html_options = {}) do
29
+ # UiBibz::Ui::Core::Inputs::DatePickerField.new(options = {}, html_options = {}) do
29
30
  # content
30
31
  # end.render
31
32
  #
32
33
  # ==== Examples
33
34
  #
34
- # UiBibz::Ui::Core::DatePickerField.new('date', { prepend: 'Prepend content', append: 'Append content' }, { class: 'test' })
35
+ # UiBibz::Ui::Core::Inputs::DatePickerField.new('date', { prepend: 'Prepend content', append: 'Append content' }, { class: 'test' })
35
36
  #
36
- # UiBibz::Ui::Core::DatePickerField.new({ date_today_highlight: true, calendar_weeks: true, range: 'to' }, { class: 'test' }) do
37
+ # UiBibz::Ui::Core::Inputs::DatePickerField.new({ date_today_highlight: true, calendar_weeks: true, range: 'to' }, { class: 'test' }) do
37
38
  # 'date'
38
39
  # end
39
40
  #
@@ -41,7 +42,7 @@ module UiBibz::Ui::Core
41
42
  #
42
43
  # date_picker_field(content, options = {}, html_options = {})
43
44
  #
44
- class DatePickerField < Component
45
+ class DatePickerField < UiBibz::Ui::Core::Component
45
46
 
46
47
  # See UiBibz::Ui::Core::Component.initialize
47
48
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -59,7 +60,7 @@ module UiBibz::Ui::Core
59
60
  concat content_tag :span, options[:prepend], class: 'input-group-addon' unless @options[:prepend].nil?
60
61
  end
61
62
  else
62
- UiBibz::Ui::Core::SurroundField.new(content, options, html_options).render
63
+ UiBibz::Ui::Core::Inputs::SurroundField.new(content, options, html_options).render
63
64
  end
64
65
  end
65
66
 
@@ -76,9 +77,9 @@ module UiBibz::Ui::Core
76
77
  def component_html_data
77
78
  date_locale
78
79
  provide
79
- date_format
80
- date_today_btn
81
- date_today_highlight
80
+ format
81
+ today_btn
82
+ today_highlight
82
83
  calendar_weeks
83
84
  autoclose
84
85
  dates_disabled
@@ -100,28 +101,28 @@ module UiBibz::Ui::Core
100
101
  add_html_data "provide", 'datepicker'
101
102
  end
102
103
 
103
- def date_format
104
+ def format
104
105
  add_html_data "date_format", picker_pattern
105
106
  end
106
107
 
107
108
  def picker_pattern
108
- I18n.t('datepicker.pformat', default: 'dd/mm/yyyy')
109
+ options[:format] || I18n.t('datepicker.pformat', default: 'dd/mm/yyyy')
109
110
  end
110
111
 
111
- def date_today_btn
112
+ def today_btn
112
113
  add_html_data 'date_today_btn', 'linked'
113
114
  end
114
115
 
115
- def date_today_highlight
116
- add_html_data('date_today_highlight') if options[:date_today_highlight]
116
+ def today_highlight
117
+ add_html_data('date_today_highlight') if options[:today_highlight]
117
118
  end
118
119
 
119
120
  def calendar_weeks
120
- add_html_data("calendar_weeks") if options[:calendar_weeks]
121
+ add_html_data("date_calendar_weeks") if options[:calendar_weeks]
121
122
  end
122
123
 
123
124
  def autoclose
124
- add_html_data("autoclose") if options[:autoclose]
125
+ add_html_data("date_autoclose") if options[:autoclose]
125
126
  end
126
127
 
127
128
  def dates_disabled
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Inputs
2
2
 
3
3
  # Create a DropdownSelectField
4
4
  #
@@ -30,17 +30,17 @@ module UiBibz::Ui::Core
30
30
  #
31
31
  # ==== Signatures
32
32
  #
33
- # UiBibz::Ui::Core::DropdownSelectField.new(content, options = {}, html_options = {}).render
33
+ # UiBibz::Ui::Core::Inputs::DropdownSelectField.new(content, options = {}, html_options = {}).render
34
34
  #
35
- # UiBibz::Ui::Core::DropdownSelectField.new(options = {}, html_options = {}) do
35
+ # UiBibz::Ui::Core::Inputs::DropdownSelectField.new(options = {}, html_options = {}) do
36
36
  # content
37
37
  # end.render
38
38
  #
39
39
  # ==== Examples
40
40
  #
41
- # UiBibz::Ui::Core::DropdownSelectField.new('fruits', { option_tags: list_of_fruits, searchable: true }, { class: 'test' })
41
+ # UiBibz::Ui::Core::Inputs::DropdownSelectField.new('fruits', { option_tags: list_of_fruits, searchable: true }, { class: 'test' })
42
42
  #
43
- # UiBibz::Ui::Core::DropdownSelectField.new({ option_tags: list_of_fruits, actions_box: true }, { class: 'test' }) do
43
+ # UiBibz::Ui::Core::Inputs::DropdownSelectField.new({ option_tags: list_of_fruits, actions_box: true }, { class: 'test' }) do
44
44
  # 'fruits'
45
45
  # end
46
46
  #
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Inputs
2
2
 
3
3
  # Create a FormulaField
4
4
  #
@@ -18,17 +18,17 @@ module UiBibz::Ui::Core
18
18
  #
19
19
  # ==== Signatures
20
20
  #
21
- # UiBibz::Ui::Core::FormulaField.new(content, options = {}, html_options = {}).render
21
+ # UiBibz::Ui::Core::Inputs::FormulaField.new(content, options = {}, html_options = {}).render
22
22
  #
23
- # UiBibz::Ui::Core::FormulaField.new(options = {}, html_options = {}) do
23
+ # UiBibz::Ui::Core::Inputs::FormulaField.new(options = {}, html_options = {}) do
24
24
  # content
25
25
  # end.render
26
26
  #
27
27
  # ==== Examples
28
28
  #
29
- # UiBibz::Ui::Core::FormulaField.new('value', { formula_field_name: :formula }, { class: 'test' })
29
+ # UiBibz::Ui::Core::Inputs::FormulaField.new('value', { formula_field_name: :formula }, { class: 'test' })
30
30
  #
31
- # UiBibz::Ui::Core::FormulaField.new do
31
+ # UiBibz::Ui::Core::Inputs::FormulaField.new do
32
32
  # 'value'
33
33
  # end
34
34
  #
@@ -36,7 +36,7 @@ module UiBibz::Ui::Core
36
36
  #
37
37
  # formula_field(value, options = {}, html_options = {})
38
38
  #
39
- class FormulaField < Component
39
+ class FormulaField < UiBibz::Ui::Core::Component
40
40
 
41
41
  # See UiBibz::Ui::Core::Component.initialize
42
42
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Inputs
2
2
 
3
3
  # Create a MarkdownEditorField
4
4
  #
@@ -24,17 +24,17 @@ module UiBibz::Ui::Core
24
24
  #
25
25
  # ==== Signatures
26
26
  #
27
- # UiBibz::Ui::Core::MarkdownEditorField.new(content, options = {}, html_options = {}).render
27
+ # UiBibz::Ui::Core::Inputs::MarkdownEditorField.new(content, options = {}, html_options = {}).render
28
28
  #
29
- # UiBibz::Ui::Core::MarkdownEditorField.new(options = {}, html_options = {}) do
29
+ # UiBibz::Ui::Core::Inputs::MarkdownEditorField.new(options = {}, html_options = {}) do
30
30
  # content
31
31
  # end.render
32
32
  #
33
33
  # ==== Examples
34
34
  #
35
- # UiBibz::Ui::Core::MarkdownEditorField.new('search', prepend: 'Prepend content', append: 'Append content', class: 'test')
35
+ # UiBibz::Ui::Core::Inputs::MarkdownEditorField.new('search', prepend: 'Prepend content', append: 'Append content', class: 'test')
36
36
  #
37
- # UiBibz::Ui::Core::MarkdownEditorField.new(prepend: glyph('pencil'), append: glyph('camera-retro')) do
37
+ # UiBibz::Ui::Core::Inputs::MarkdownEditorField.new(prepend: glyph('pencil'), append: glyph('camera-retro')) do
38
38
  # #content
39
39
  # end
40
40
  #
@@ -44,7 +44,7 @@ module UiBibz::Ui::Core
44
44
  # # content
45
45
  # end
46
46
  #
47
- class MarkdownEditorField < Component
47
+ class MarkdownEditorField < UiBibz::Ui::Core::Component
48
48
 
49
49
  # See UiBibz::Ui::Core::Component.initialize
50
50
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Inputs
2
2
 
3
3
  # Create a MultiColumnField
4
4
  #
@@ -20,17 +20,17 @@ module UiBibz::Ui::Core
20
20
  #
21
21
  # ==== Signatures
22
22
  #
23
- # UiBibz::Ui::Core::MultiColumnField.new(content, options = {}, html_options = {}).render
23
+ # UiBibz::Ui::Core::Inputs::MultiColumnField.new(content, options = {}, html_options = {}).render
24
24
  #
25
- # UiBibz::Ui::Core::MultiColumnField.new(options = {}, html_options = {}) do
25
+ # UiBibz::Ui::Core::Inputs::MultiColumnField.new(options = {}, html_options = {}) do
26
26
  # content
27
27
  # end.render
28
28
  #
29
29
  # ==== Examples
30
30
  #
31
- # UiBibz::Ui::Core::MultiColumnField.new('fruits', { option_tags: list_of_fruits, searchable: true }, { class: 'test' })
31
+ # UiBibz::Ui::Core::Inputs::MultiColumnField.new('fruits', { option_tags: list_of_fruits, searchable: true }, { class: 'test' })
32
32
  #
33
- # UiBibz::Ui::Core::MultiColumnField.new({ option_tags: list_of_fruits, selectable_opt_group: true }, { class: 'test' }) do
33
+ # UiBibz::Ui::Core::Inputs::MultiColumnField.new({ option_tags: list_of_fruits, selectable_opt_group: true }, { class: 'test' }) do
34
34
  # 'fruits'
35
35
  # end
36
36
  #
@@ -38,7 +38,7 @@ module UiBibz::Ui::Core
38
38
  #
39
39
  # multi_column_field(content, options = {}, html_options = {})
40
40
  #
41
- class MultiColumnField < Component
41
+ class MultiColumnField < UiBibz::Ui::Core::Component
42
42
 
43
43
  # See UiBibz::Ui::Core::Component.initialize
44
44
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -1,8 +1,8 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Inputs
2
2
 
3
3
  # Create a MultiSelectField
4
4
  #
5
- # This element is an extend of UiBibz::Ui::Core::Component.
5
+ # This element is an extend of UiBibz::Ui::Core::Buttons::Button
6
6
  # source : http://loudev.com/
7
7
  #
8
8
  # ==== Attributes
@@ -23,17 +23,17 @@ module UiBibz::Ui::Core
23
23
  #
24
24
  # ==== Signatures
25
25
  #
26
- # UiBibz::Ui::Core::MultiSelectField.new(content, options = {}, html_options = {}).render
26
+ # UiBibz::Ui::Core::Inputs::MultiSelectField.new(content, options = {}, html_options = {}).render
27
27
  #
28
- # UiBibz::Ui::Core::MultiSelectField.new(options = {}, html_options = {}) do
28
+ # UiBibz::Ui::Core::Inputs::MultiSelectField.new(options = {}, html_options = {}) do
29
29
  # content
30
30
  # end.render
31
31
  #
32
32
  # ==== Examples
33
33
  #
34
- # UiBibz::Ui::Core::MultiSelectField.new('fruits', { option_tags: list_of_fruits, searchable: true }, { class: 'test' })
34
+ # UiBibz::Ui::Core::Inputs::MultiSelectField.new('fruits', { option_tags: list_of_fruits, searchable: true }, { class: 'test' })
35
35
  #
36
- # UiBibz::Ui::Core::MultiSelectField.new({ option_tags: list_of_fruits, select_all_option: true }, { class: 'test' }) do
36
+ # UiBibz::Ui::Core::Inputs::MultiSelectField.new({ option_tags: list_of_fruits, select_all_option: true }, { class: 'test' }) do
37
37
  # 'fruits'
38
38
  # end
39
39
  #
@@ -41,9 +41,9 @@ module UiBibz::Ui::Core
41
41
  #
42
42
  # multi_select_field(content, options = {}, html_options = {})
43
43
  #
44
- class MultiSelectField < UiBibz::Ui::Core::Button
44
+ class MultiSelectField < UiBibz::Ui::Core::Buttons::Button
45
45
 
46
- # See UiBibz::Ui::Core::Component.initialize
46
+ # See UiBibz::Ui::Core::Buttons::Button.initialize
47
47
  def initialize content = nil, options = nil, html_options = nil, &block
48
48
  super
49
49
  end
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Inputs
2
2
 
3
3
  # Create a SurroundField
4
4
  #
@@ -19,17 +19,17 @@ module UiBibz::Ui::Core
19
19
  #
20
20
  # ==== Signatures
21
21
  #
22
- # UiBibz::Ui::Core::SurroundField.new(content, options = {}, html_options = {}).render
22
+ # UiBibz::Ui::Core::Inputs::SurroundField.new(content, options = {}, html_options = {}).render
23
23
  #
24
- # UiBibz::Ui::Core::SurroundField.new(options = {}, html_options = {}) do
24
+ # UiBibz::Ui::Core::Inputs::SurroundField.new(options = {}, html_options = {}) do
25
25
  # content
26
26
  # end.render
27
27
  #
28
28
  # ==== Examples
29
29
  #
30
- # UiBibz::Ui::Core::SurroundField.new('search', prepend: 'Prepend content', append: 'Append content', class: 'test')
30
+ # UiBibz::Ui::Core::Inputs::SurroundField.new('search', prepend: 'Prepend content', append: 'Append content', class: 'test')
31
31
  #
32
- # UiBibz::Ui::Core::SurroundField.new(prepend: glyph('pencil'), append: glyph('camera-retro')) do
32
+ # UiBibz::Ui::Core::Inputs::SurroundField.new(prepend: glyph('pencil'), append: glyph('camera-retro')) do
33
33
  # #content
34
34
  # end
35
35
  #
@@ -39,7 +39,7 @@ module UiBibz::Ui::Core
39
39
  # # content
40
40
  # end
41
41
  #
42
- class SurroundField < Component
42
+ class SurroundField < 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,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Inputs
2
2
 
3
3
  # Create a SurroundField
4
4
  #
@@ -26,9 +26,9 @@ module UiBibz::Ui::Core
26
26
  #
27
27
  # ==== Signatures
28
28
  #
29
- # UiBibz::Ui::Core::SwitchField.new(content, options = {}, html_options = {}).render
29
+ # UiBibz::Ui::Core::Inputs::SwitchField.new(content, options = {}, html_options = {}).render
30
30
  #
31
- # UiBibz::Ui::Core::SwitchField.new(options = {}, html_options = {}) do
31
+ # UiBibz::Ui::Core::Inputs::SwitchField.new(options = {}, html_options = {}) do
32
32
  # content
33
33
  # end.render
34
34
  #
@@ -42,7 +42,7 @@ module UiBibz::Ui::Core
42
42
  # # content
43
43
  # end
44
44
  #
45
- class SwitchField < Component
45
+ class SwitchField < UiBibz::Ui::Core::Component
46
46
 
47
47
  # See UiBibz::Ui::Core::Component.initialize
48
48
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -40,7 +40,7 @@ module UiBibz::Ui::Core
40
40
  # content
41
41
  # end
42
42
  #
43
- class Jumbotron < Component
43
+ class Jumbotron < UiBibz::Ui::Core::Component
44
44
 
45
45
  # See UiBibz::Ui::Core::Component.initialize
46
46
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -51,7 +51,7 @@ module UiBibz::Ui::Core
51
51
  def render
52
52
  content_tag :div, html_options do
53
53
  if fluid
54
- Container.new(content).render
54
+ UiBibz::Ui::Core::Layouts::Container.new(content).render
55
55
  else
56
56
  content
57
57
  end
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Layouts
2
2
 
3
3
  # Create a col
4
4
  #
@@ -27,17 +27,17 @@ module UiBibz::Ui::Core
27
27
  #
28
28
  # ==== Signatures
29
29
  #
30
- # UiBibz::Ui::Core::Col.new(content, options = {}, html_options = {}).render
30
+ # UiBibz::Ui::Core::Layouts::Col.new(content, options = {}, html_options = {}).render
31
31
  #
32
- # UiBibz::Ui::Core::Col.new(options = {}, html_options = {}) do
32
+ # UiBibz::Ui::Core::Layouts::Col.new(options = {}, html_options = {}) do
33
33
  # content
34
34
  # end.render
35
35
  #
36
36
  # ==== Examples
37
37
  #
38
- # UiBibz::Ui::Core::Col.new('content', { num: 2, offset: 1 }, { class: 'test' })
38
+ # UiBibz::Ui::Core::Layouts::Col.new('content', { num: 2, offset: 1 }, { class: 'test' })
39
39
  #
40
- # UiBibz::Ui::Core::Col.new(xs: { num: 2, pull: 1, push: 1}, md: { num: 3 }, { class: 'test' }) do
40
+ # UiBibz::Ui::Core::Layouts::Col.new(xs: { num: 2, pull: 1, push: 1}, md: { num: 3 }, { class: 'test' }) do
41
41
  # #content
42
42
  # end
43
43
  #
@@ -47,7 +47,7 @@ module UiBibz::Ui::Core
47
47
  # # content
48
48
  # end
49
49
  #
50
- class Col < Component
50
+ class Col < UiBibz::Ui::Core::Component
51
51
 
52
52
  # See UiBibz::Ui::Core::Component.initialize
53
53
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Layouts
2
2
 
3
3
  # Create a Container
4
4
  #
@@ -17,17 +17,17 @@ module UiBibz::Ui::Core
17
17
  #
18
18
  # ==== Signatures
19
19
  #
20
- # UiBibz::Ui::Core::Container.new(content, options = nil, html_options = nil)
20
+ # UiBibz::Ui::Core::Layouts::Container.new(content, options = nil, html_options = nil)
21
21
  #
22
- # UiBibz::Ui::Core::Container.new(options = nil, html_options = nil) do
22
+ # UiBibz::Ui::Core::Layouts::Container.new(options = nil, html_options = nil) do
23
23
  # content
24
24
  # end
25
25
  #
26
26
  # ==== Examples
27
27
  #
28
- # UiBibz::Ui::Core::Container.new(content, { type: :fluid },{ class: 'test' }).render
28
+ # UiBibz::Ui::Core::Layouts::Container.new(content, { type: :fluid },{ class: 'test' }).render
29
29
  #
30
- # UiBibz::Ui::Core::Container.new({ class: 'test' }) do
30
+ # UiBibz::Ui::Core::Layouts::Container.new({ class: 'test' }) do
31
31
  # content
32
32
  # end.render
33
33
  #
@@ -39,7 +39,7 @@ module UiBibz::Ui::Core
39
39
  # content
40
40
  # end
41
41
  #
42
- class Container < Component
42
+ class Container < 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,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Layouts
2
2
 
3
3
  # Create a row
4
4
  #
@@ -12,9 +12,9 @@ module UiBibz::Ui::Core
12
12
  #
13
13
  # ==== Signatures
14
14
  #
15
- # UiBibz::Ui::Core::Row.new(content, options = {}, html_options = {})
15
+ # UiBibz::Ui::Core::Layouts::Row.new(content, options = {}, html_options = {})
16
16
  #
17
- # UiBibz::Ui::Core::Row.new(options = {}, html_options = {}) do
17
+ # UiBibz::Ui::Core::Layouts::Row.new(options = {}, html_options = {}) do
18
18
  # #content
19
19
  # end
20
20
  #
@@ -26,7 +26,7 @@ module UiBibz::Ui::Core
26
26
  # content
27
27
  # end
28
28
  #
29
- class Row < Component
29
+ class Row < UiBibz::Ui::Core::Component
30
30
 
31
31
  # See UiBibz::Ui::Core::Component.initialize
32
32
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -68,7 +68,7 @@ module UiBibz::Ui::Core
68
68
  # end
69
69
  # end
70
70
  #
71
- class ListGroup < Component
71
+ class ListGroup < UiBibz::Ui::Core::Component
72
72
 
73
73
  # See UiBibz::Ui::Core::Component.initialize
74
74
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -1,8 +1,8 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Navs
2
2
 
3
3
  # Create a dropdown
4
4
  #
5
- # This element is an extend of UiBibz::Ui::Core::Component.
5
+ # This element is an extend of UiBibz::Ui::Core::Navs::Component.
6
6
  # You can use tap method to add list items.
7
7
  #
8
8
  # ==== Attributes
@@ -26,7 +26,7 @@ module UiBibz::Ui::Core
26
26
  #
27
27
  # ==== Signatures
28
28
  #
29
- # UiBibz::Ui::Core::NavDropdown.new(options = nil, html_options = nil).tap do |d|
29
+ # UiBibz::Ui::Core::Navs::NavDropdown.new(options = nil, html_options = nil).tap do |d|
30
30
  # ...
31
31
  # d.list content = nil, options = nil, html_options = nil, &block
32
32
  # d.list content = nil, options = nil, html_options = nil, &block
@@ -36,14 +36,14 @@ module UiBibz::Ui::Core
36
36
  #
37
37
  # ==== Examples
38
38
  #
39
- # UiBibz::Ui::Core::NavDropdown.new(name, status: :success).tap do |d|
39
+ # UiBibz::Ui::Core::Navs::NavDropdown.new(name, status: :success).tap do |d|
40
40
  # d.list link_to('test', '#')
41
41
  # d.list link_to('test2', '#')
42
42
  # end.render
43
43
  #
44
- class NavDropdown < Dropdown
44
+ class NavDropdown < UiBibz::Ui::Core::Dropdown
45
45
 
46
- # See UiBibz::Ui::Core::Component.initialize
46
+ # See UiBibz::Ui::Core::Dropdown.initialize
47
47
  def initialize content, options = nil, html_options = nil, &block
48
48
  super
49
49
  end
@@ -1,10 +1,10 @@
1
- require 'ui_bibz/ui/core/nav/components/nav_link_link'
2
- require 'ui_bibz/ui/core/nav/components/nav_link_list'
3
- module UiBibz::Ui::Core
1
+ require 'ui_bibz/ui/core/navs/components/nav_link_link'
2
+ require 'ui_bibz/ui/core/navs/components/nav_link_list'
3
+ module UiBibz::Ui::Core::Navs
4
4
 
5
5
  # Create a NavLink
6
6
  #
7
- # This element is an extend of UiBibz::Ui::Core::Component.
7
+ # This element is an extend of UiBibz::Ui::Core::Navs::Component.
8
8
  #
9
9
  # ==== Attributes
10
10
  #
@@ -24,21 +24,21 @@ module UiBibz::Ui::Core
24
24
  #
25
25
  # ==== Signatures
26
26
  #
27
- # UiBibz::Ui::Core::NavLink.new(content, options = nil, html_options = nil)
27
+ # UiBibz::Ui::Core::Navs::NavLink.new(content, options = nil, html_options = nil)
28
28
  #
29
- # UiBibz::Ui::Core::NavLink.new(options = nil, html_options = nil) do
29
+ # UiBibz::Ui::Core::Navs::NavLink.new(options = nil, html_options = nil) do
30
30
  # content
31
31
  # end
32
32
  #
33
33
  # ==== Examples
34
34
  #
35
- # UiBibz::Ui::Core::NavLink.new(content, { badge: 15, url: '/', state: :active, link_html_options: { class: 'link1' }},{ class: 'test' }).render
35
+ # UiBibz::Ui::Core::Navs::NavLink.new(content, { badge: 15, url: '/', state: :active, link_html_options: { class: 'link1' }},{ class: 'test' }).render
36
36
  #
37
- # UiBibz::Ui::Core::NavLink.new({glyph: { name: 'eye', size: 3 }, { class: 'test' }) do
37
+ # UiBibz::Ui::Core::Navs::NavLink.new({glyph: { name: 'eye', size: 3 }, { class: 'test' }) do
38
38
  # 'Home'
39
39
  # end.render
40
40
  #
41
- class NavLink < Component
41
+ class NavLink < UiBibz::Ui::Core::Component
42
42
 
43
43
  # See UiBibz::Ui::Core::Component.initialize
44
44
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -47,12 +47,12 @@ module UiBibz::Ui::Core
47
47
 
48
48
  # Render html tag
49
49
  def render
50
- content_htm = UiBibz::Ui::Core::NavLinkLink.new(content, options, html_options).render
50
+ content_htm = UiBibz::Ui::Core::Navs::NavLinkLink.new(content, options, html_options).render
51
51
  if options[:nav_type] == "nav-links"
52
52
  content_htm
53
53
  else
54
54
  options.delete(:state)
55
- UiBibz::Ui::Core::NavLinkList.new(content_htm, options).render
55
+ UiBibz::Ui::Core::Navs::NavLinkList.new(content_htm, options).render
56
56
  end
57
57
  end
58
58
 
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Navs
2
2
 
3
3
  # Create a NavLinkLink
4
4
  #
@@ -17,8 +17,9 @@ module UiBibz::Ui::Core
17
17
  # * +state+ - status of élement with symbol value:
18
18
  # (+:active+)
19
19
  #
20
- class NavLinkLink < Component
20
+ class NavLinkLink < UiBibz::Ui::Core::Component
21
21
 
22
+ # UiBibz::Ui::Core::Component.initialize
22
23
  def initialize content = nil, options = nil, html_options = nil, &block
23
24
  super
24
25
  end
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Navs
2
2
 
3
3
  # Create a NavLinkList
4
4
  #
@@ -14,7 +14,7 @@ module UiBibz::Ui::Core
14
14
  #
15
15
  # You can add HTML attributes using the +html_options+.
16
16
  # You can pass arguments in options attribute:
17
- class NavLinkList < Component
17
+ class NavLinkList < UiBibz::Ui::Core::Component
18
18
 
19
19
  def initialize content = nil, options = nil, html_options = nil, &block
20
20
  super
@@ -1,4 +1,4 @@
1
- module UiBibz::Ui::Core
1
+ module UiBibz::Ui::Core::Navs
2
2
 
3
3
  # Create a Navbar
4
4
  #
@@ -14,7 +14,7 @@ module UiBibz::Ui::Core
14
14
  #
15
15
  # You can add HTML attributes using the +html_options+.
16
16
  # You can pass arguments in options attribute:
17
- class NavbarBrand < Component
17
+ class NavbarBrand < UiBibz::Ui::Core::Component
18
18
 
19
19
  # See UiBibz::Ui::Core::Component.initialize
20
20
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -1,5 +1,5 @@
1
1
  require 'haml'
2
- module UiBibz::Ui::Core
2
+ module UiBibz::Ui::Core::Navs
3
3
 
4
4
  # Create a NavbarForm
5
5
  #
@@ -22,19 +22,19 @@ module UiBibz::Ui::Core
22
22
  #
23
23
  # ==== Signatures
24
24
  #
25
- # UiBibz::Ui::Core::NavbarForm.new(options = nil, html_options = nil) do |f|
25
+ # UiBibz::Ui::Core::Navs::NavbarForm.new(options = nil, html_options = nil) do |f|
26
26
  # f.text_field :field
27
27
  # f.submit 'Submit'
28
28
  # end
29
29
  #
30
30
  # ==== Examples
31
31
  #
32
- # UiBibz::Ui::Core::NavbarForm.new(position: :right) do |f|
32
+ # UiBibz::Ui::Core::Navs::NavbarForm.new(position: :right) do |f|
33
33
  # f.text_field :field
34
34
  # f.submit 'Submit'
35
35
  # end.render
36
36
  #
37
- # UiBibz::Ui::Core::NavbarForm.new('/search', type: :form_tag) do
37
+ # UiBibz::Ui::Core::Navs::NavbarForm.new('/search', type: :form_tag) do
38
38
  # text_field_tag :field
39
39
  # submit_tag 'Submit'
40
40
  # end.render
@@ -43,7 +43,6 @@ module UiBibz::Ui::Core
43
43
  include Haml::Helpers
44
44
  include ActionView::Helpers#::FormHelper
45
45
 
46
- # See UiBibz::Ui::Core::Component.initialize
47
46
  def initialize model_or_url, options = {}, &block
48
47
  init_haml_helpers
49
48
  @options = options