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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/inputs/custom_inputs/autocomplete_input.rb +2 -2
- data/app/inputs/custom_inputs/date_picker_input.rb +2 -2
- data/app/inputs/custom_inputs/dropdown_select_input.rb +2 -2
- data/app/inputs/custom_inputs/formula_input.rb +2 -2
- data/app/inputs/custom_inputs/markdown_editor_input.rb +2 -2
- data/app/inputs/custom_inputs/multi_column_input.rb +2 -2
- data/app/inputs/custom_inputs/multi_select_input.rb +2 -2
- data/app/inputs/custom_inputs/surround_input.rb +2 -2
- data/app/inputs/custom_inputs/switch_input.rb +2 -2
- data/lib/ui_bibz/helpers/ui_core_helper.rb +189 -25
- data/lib/ui_bibz/helpers/ui_ux_helper.rb +38 -11
- data/lib/ui_bibz/ui/core/{button → buttons}/button.rb +6 -17
- data/lib/ui_bibz/ui/core/{button → buttons}/button_choice.rb +8 -8
- data/lib/ui_bibz/ui/core/{button → buttons}/button_dropdown.rb +6 -6
- data/lib/ui_bibz/ui/core/{button → buttons}/button_group.rb +6 -6
- data/lib/ui_bibz/ui/core/{button → buttons}/button_link.rb +8 -8
- data/lib/ui_bibz/ui/core/{button → buttons}/button_split_dropdown.rb +5 -5
- data/lib/ui_bibz/ui/core/{card → cards}/card.rb +13 -13
- data/lib/ui_bibz/ui/core/{card → cards}/card_column.rb +7 -7
- data/lib/ui_bibz/ui/core/{card → cards}/card_deck.rb +7 -7
- data/lib/ui_bibz/ui/core/{card → cards}/card_group.rb +7 -7
- data/lib/ui_bibz/ui/core/{card → cards}/components/block/card_block_link.rb +6 -6
- data/lib/ui_bibz/ui/core/{card → cards}/components/block/card_block_text.rb +6 -6
- data/lib/ui_bibz/ui/core/{card → cards}/components/block/card_block_title.rb +6 -6
- data/lib/ui_bibz/ui/core/{card → cards}/components/card_block.rb +9 -9
- data/lib/ui_bibz/ui/core/{card → cards}/components/card_footer.rb +6 -6
- data/lib/ui_bibz/ui/core/{card → cards}/components/card_header.rb +6 -6
- data/lib/ui_bibz/ui/core/{card → cards}/components/card_image.rb +6 -6
- data/lib/ui_bibz/ui/core/{card → cards}/components/card_list_group.rb +5 -5
- data/lib/ui_bibz/ui/core/{input → inputs}/autocomplete_field.rb +6 -6
- data/lib/ui_bibz/ui/core/{input → inputs}/date_picker_field.rb +20 -19
- data/lib/ui_bibz/ui/core/{input → inputs}/dropdown_select_field.rb +5 -5
- data/lib/ui_bibz/ui/core/{input → inputs}/formula_field.rb +6 -6
- data/lib/ui_bibz/ui/core/{input → inputs}/markdown_editor_field.rb +6 -6
- data/lib/ui_bibz/ui/core/{input → inputs}/multi_column_field.rb +6 -6
- data/lib/ui_bibz/ui/core/{input → inputs}/multi_select_field.rb +8 -8
- data/lib/ui_bibz/ui/core/{input → inputs}/surround_field.rb +6 -6
- data/lib/ui_bibz/ui/core/{input → inputs}/switch_field.rb +4 -4
- data/lib/ui_bibz/ui/core/jumbotron.rb +2 -2
- data/lib/ui_bibz/ui/core/{layout → layouts}/col.rb +6 -6
- data/lib/ui_bibz/ui/core/{layout → layouts}/container.rb +6 -6
- data/lib/ui_bibz/ui/core/{layout → layouts}/row.rb +4 -4
- data/lib/ui_bibz/ui/core/list/list_group.rb +1 -1
- data/lib/ui_bibz/ui/core/{nav → navs}/components/nav_dropdown.rb +6 -6
- data/lib/ui_bibz/ui/core/{nav → navs}/components/nav_link.rb +11 -11
- data/lib/ui_bibz/ui/core/{nav → navs}/components/nav_link_link.rb +3 -2
- data/lib/ui_bibz/ui/core/{nav → navs}/components/nav_link_list.rb +2 -2
- data/lib/ui_bibz/ui/core/{nav → navs}/components/navbar_brand.rb +2 -2
- data/lib/ui_bibz/ui/core/{nav → navs}/components/navbar_form.rb +4 -5
- data/lib/ui_bibz/ui/core/{nav → navs}/components/navbar_nav.rb +7 -7
- data/lib/ui_bibz/ui/core/{nav → navs}/components/navbar_text.rb +6 -6
- data/lib/ui_bibz/ui/core/{nav → navs}/nav.rb +9 -9
- data/lib/ui_bibz/ui/core/{nav → navs}/navbar.rb +9 -9
- data/lib/ui_bibz/ui/ux/{table → tables}/components/actions.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/components/as.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/components/column.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/components/columns.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/components/store.rb +3 -3
- data/lib/ui_bibz/ui/ux/{table → tables}/components/thead.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/extensions/actionable.rb +2 -2
- data/lib/ui_bibz/ui/ux/{table → tables}/extensions/paginable.rb +3 -3
- data/lib/ui_bibz/ui/ux/{table → tables}/extensions/searchable.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/extensions/sortable.rb +1 -1
- data/lib/ui_bibz/ui/ux/{table → tables}/table.rb +17 -17
- data/lib/ui_bibz/ui/ux/{table → tables}/table_card.rb +10 -10
- data/lib/ui_bibz/ui/ux/{table → tables}/table_pagination.rb +3 -3
- data/lib/ui_bibz/ui/ux/{table → tables}/table_pagination_per_page.rb +3 -3
- data/lib/ui_bibz/ui/ux/{table → tables}/table_search_field.rb +3 -2
- data/lib/ui_bibz/version.rb +1 -1
- data/lib/ui_bibz.rb +45 -29
- data/test/store_test.rb +2 -2
- data/test/ui/button_test.rb +15 -15
- data/test/ui/grid_test.rb +3 -3
- data/test/ui/input_dropdown_select_field_test.rb +9 -9
- data/test/ui/input_switch_field_test.rb +10 -10
- data/test/ui/inputs_test.rb +13 -13
- data/test/ui/nav_test.rb +2 -2
- data/test/ui/table_test.rb +26 -26
- metadata +57 -57
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0ede8dc0e762a814f347dd2ba98b0181f8102b3
|
4
|
+
data.tar.gz: 03e5d01e2e437de866b64f225483ce02800ce288
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75efefa6635fef5bf8d93a7191e7588802014236005ebe546e18dcf2e245cfeb8265adfcddd077c8de977c346caf705bd0ab081b285e34a3704c5430ef5dfa45
|
7
|
+
data.tar.gz: 7d2ffc7b1474f20922313349483b151945f0ca4639a1f27bfd2e06701cd4669e609d01673432d197aa75793dce83ba378530d312b92f96d81e67657631f37073
|
data/Gemfile.lock
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module CustomInputs
|
2
2
|
class AutocompleteInput < SimpleForm::Inputs::CollectionInput
|
3
|
-
include UiBibz::Ui::Core
|
3
|
+
include UiBibz::Ui::Core::Inputs
|
4
4
|
include ActionView::Helpers::FormOptionsHelper
|
5
5
|
|
6
6
|
def input(wrapper_options)
|
@@ -8,7 +8,7 @@ module CustomInputs
|
|
8
8
|
options = options || {}
|
9
9
|
options = options.merge({ builder: @builder })
|
10
10
|
options = options.merge(option_tags: options_from_collection_for_select(collection, label_method, label_method))
|
11
|
-
UiBibz::Ui::Core::AutocompleteField.new(attribute_name, options, input_html_options).render
|
11
|
+
UiBibz::Ui::Core::Inputs::AutocompleteField.new(attribute_name, options, input_html_options).render
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module CustomInputs
|
2
2
|
class DatePickerInput < SimpleForm::Inputs::StringInput
|
3
|
-
include UiBibz::Ui::Core
|
3
|
+
include UiBibz::Ui::Core::Inputs
|
4
4
|
|
5
5
|
def input(wrapper_options)
|
6
6
|
options = @options.merge({ builder: @builder })
|
7
|
-
UiBibz::Ui::Core::DatePickerField.new(attribute_name, options, input_html_options).render
|
7
|
+
UiBibz::Ui::Core::Inputs::DatePickerField.new(attribute_name, options, input_html_options).render
|
8
8
|
end
|
9
9
|
|
10
10
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module CustomInputs
|
2
2
|
class DropdownSelectInput < SimpleForm::Inputs::CollectionInput
|
3
|
-
include UiBibz::Ui::Core
|
3
|
+
include UiBibz::Ui::Core::Inputs
|
4
4
|
|
5
5
|
def input(wrapper_options)
|
6
6
|
label_method, value_method = detect_collection_methods
|
7
|
-
i = UiBibz::Ui::Core::DropdownSelectField.new(attribute_name, options, input_html_options)
|
7
|
+
i = UiBibz::Ui::Core::Inputs::DropdownSelectField.new(attribute_name, options, input_html_options)
|
8
8
|
|
9
9
|
if options[:grouped] == true
|
10
10
|
@builder.grouped_collection_select(
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module CustomInputs
|
2
2
|
class FormulaInput < SimpleForm::Inputs::StringInput
|
3
|
-
include UiBibz::Ui::Core
|
3
|
+
include UiBibz::Ui::Core::Inputs
|
4
4
|
|
5
5
|
def input(wrapper_options)
|
6
6
|
options = @options.merge({ builder: @builder })
|
7
|
-
UiBibz::Ui::Core::FormulaField.new(attribute_name, options, input_html_options).render
|
7
|
+
UiBibz::Ui::Core::Inputs::FormulaField.new(attribute_name, options, input_html_options).render
|
8
8
|
end
|
9
9
|
|
10
10
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module CustomInputs
|
2
2
|
class MarkdownEditorInput < SimpleForm::Inputs::StringInput
|
3
|
-
include UiBibz::Ui::Core
|
3
|
+
include UiBibz::Ui::Core::Inputs
|
4
4
|
|
5
5
|
def input(wrapper_options)
|
6
6
|
options = @options.merge({ builder: @builder })
|
7
|
-
UiBibz::Ui::Core::MarkdownEditorField.new(attribute_name, options, input_html_options).render
|
7
|
+
UiBibz::Ui::Core::Inputs::MarkdownEditorField.new(attribute_name, options, input_html_options).render
|
8
8
|
end
|
9
9
|
|
10
10
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module CustomInputs
|
2
2
|
# multi_column_input manages collection and grouped_collection
|
3
3
|
class MultiColumnInput < SimpleForm::Inputs::CollectionInput
|
4
|
-
include UiBibz::Ui::Core
|
4
|
+
include UiBibz::Ui::Core::Inputs
|
5
5
|
|
6
6
|
def input(wrapper_options)
|
7
7
|
label_method, value_method = detect_collection_methods
|
8
|
-
i = UiBibz::Ui::Core::MultiColumnField.new(attribute_name, options, input_html_options)
|
8
|
+
i = UiBibz::Ui::Core::Inputs::MultiColumnField.new(attribute_name, options, input_html_options)
|
9
9
|
|
10
10
|
input_options.delete(:prompt)
|
11
11
|
input_options.merge!({include_blank: false})
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module CustomInputs
|
2
2
|
class MultiSelectInput < SimpleForm::Inputs::CollectionInput
|
3
|
-
include UiBibz::Ui::Core
|
3
|
+
include UiBibz::Ui::Core::Inputs
|
4
4
|
|
5
5
|
def input(wrapper_options)
|
6
6
|
label_method, value_method = detect_collection_methods
|
7
|
-
i = UiBibz::Ui::Core::MultiSelectField.new(attribute_name, options, input_html_options)
|
7
|
+
i = UiBibz::Ui::Core::Inputs::MultiSelectField.new(attribute_name, options, input_html_options)
|
8
8
|
|
9
9
|
@builder.collection_select(
|
10
10
|
attribute_name, collection, value_method, label_method,
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module CustomInputs
|
2
2
|
class SurroundInput < SimpleForm::Inputs::StringInput
|
3
|
-
include UiBibz::Ui::Core
|
3
|
+
include UiBibz::Ui::Core::Inputs
|
4
4
|
|
5
5
|
def input(wrapper_options)
|
6
6
|
options = @options.merge({ builder: @builder })
|
7
|
-
UiBibz::Ui::Core::SurroundField.new(attribute_name, options, input_html_options).render
|
7
|
+
UiBibz::Ui::Core::Inputs::SurroundField.new(attribute_name, options, input_html_options).render
|
8
8
|
end
|
9
9
|
|
10
10
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module CustomInputs
|
2
2
|
class SwitchInput < SimpleForm::Inputs::Base
|
3
|
-
include UiBibz::Ui::Core
|
3
|
+
include UiBibz::Ui::Core::Inputs
|
4
4
|
|
5
5
|
def input(wrapper_options)
|
6
6
|
options = @options.merge({ builder: @builder })
|
7
|
-
UiBibz::Ui::Core::SwitchField.new(attribute_name, options, input_html_options).render
|
7
|
+
UiBibz::Ui::Core::Inputs::SwitchField.new(attribute_name, options, input_html_options).render
|
8
8
|
end
|
9
9
|
|
10
10
|
end
|
@@ -1,121 +1,244 @@
|
|
1
1
|
module UiBibz::Helpers::UiCoreHelper
|
2
2
|
|
3
3
|
# Button section begin ----------------------------------------------------
|
4
|
+
|
5
|
+
# Button Component
|
6
|
+
#
|
7
|
+
# +options+ (Hash)
|
8
|
+
# +html_options+ (Hash)
|
4
9
|
def button content = nil, options = nil, html_options = nil, &block
|
5
|
-
UiBibz::Ui::Core::Button.new(content, options, html_options, &block).render
|
10
|
+
UiBibz::Ui::Core::Buttons::Button.new(content, options, html_options, &block).render
|
6
11
|
end
|
7
12
|
|
13
|
+
# Button Choice Component
|
14
|
+
#
|
15
|
+
# +options+ (Hash)
|
16
|
+
# +html_options+ (Hash)
|
8
17
|
def button_choice content = nil, options = nil, html_options = nil, &block
|
9
|
-
UiBibz::Ui::Core::ButtonChoice.new(content, options, html_options, &block).render
|
18
|
+
UiBibz::Ui::Core::Buttons::ButtonChoice.new(content, options, html_options, &block).render
|
10
19
|
end
|
11
20
|
|
21
|
+
# Button Dropdown Component
|
22
|
+
#
|
23
|
+
# +name+ (String) [Required]
|
24
|
+
# +options+ (Hash)
|
25
|
+
# +html_options+ (Hash)
|
12
26
|
def button_dropdown name, options = nil, html_options = nil, &block
|
13
|
-
UiBibz::Ui::Core::ButtonDropdown.new(name, options, html_options).tap(&block).render
|
27
|
+
UiBibz::Ui::Core::Buttons::ButtonDropdown.new(name, options, html_options).tap(&block).render
|
14
28
|
end
|
15
29
|
|
30
|
+
# Button Group Component
|
31
|
+
#
|
32
|
+
# +options+ (Hash)
|
33
|
+
# +html_options+ (Hash)
|
16
34
|
def button_group content = nil, options = nil, html_options = nil, &block
|
17
|
-
UiBibz::Ui::Core::ButtonGroup.new(content, options, html_options, &block).render
|
35
|
+
UiBibz::Ui::Core::Buttons::ButtonGroup.new(content, options, html_options, &block).render
|
18
36
|
end
|
19
37
|
|
38
|
+
# Button Link Component
|
39
|
+
#
|
40
|
+
# +options+ (Hash)
|
41
|
+
# +html_options+ (Hash)
|
20
42
|
def button_link content = nil, options = nil, html_options = nil, &block
|
21
|
-
UiBibz::Ui::Core::ButtonLink.new(content, options, html_options, &block).render
|
43
|
+
UiBibz::Ui::Core::Buttons::ButtonLink.new(content, options, html_options, &block).render
|
22
44
|
end
|
23
45
|
|
46
|
+
# Button Split Dropdown Component
|
47
|
+
#
|
48
|
+
# +name+ (String) [Required]
|
49
|
+
# +options+ (Hash)
|
50
|
+
# +html_options+ (Hash)
|
24
51
|
def button_split_dropdown name, options = nil, html_options = nil, &block
|
25
|
-
UiBibz::Ui::Core::ButtonSplitDropdown.new(name, options, html_options).tap(&block).render
|
52
|
+
UiBibz::Ui::Core::Buttons::ButtonSplitDropdown.new(name, options, html_options).tap(&block).render
|
26
53
|
end
|
54
|
+
|
27
55
|
# Button section end ----------------------------------------------------
|
28
56
|
|
29
57
|
# Card section begin ----------------------------------------------------
|
58
|
+
|
59
|
+
# Card Component
|
60
|
+
#
|
61
|
+
# +options+ (Hash)
|
62
|
+
# +html_options+ (Hash)
|
63
|
+
#
|
64
|
+
# Option +tap: true+ is required if you want add +header+, +block+ or
|
65
|
+
# +footer+.
|
30
66
|
def card content = nil, options = nil, html_options = nil, &block
|
31
67
|
if is_tap(content, options)
|
32
|
-
UiBibz::Ui::Core::Card.new(content, options, html_options).tap(&block).render
|
68
|
+
UiBibz::Ui::Core::Cards::Card.new(content, options, html_options).tap(&block).render
|
33
69
|
else
|
34
|
-
UiBibz::Ui::Core::Card.new(content, options, html_options, &block).render
|
70
|
+
UiBibz::Ui::Core::Cards::Card.new(content, options, html_options, &block).render
|
35
71
|
end
|
36
72
|
end
|
37
73
|
|
74
|
+
# Card Group Component
|
75
|
+
#
|
76
|
+
# +options+ (Hash)
|
77
|
+
# +html_options+ (Hash)
|
38
78
|
def card_group content = nil, options = nil, html_options = nil, &block
|
39
|
-
UiBibz::Ui::Core::CardGroup.new(content, options, html_options).tap(&block).render
|
79
|
+
UiBibz::Ui::Core::Cards::CardGroup.new(content, options, html_options).tap(&block).render
|
40
80
|
end
|
41
81
|
|
82
|
+
# Card Deck Component
|
83
|
+
#
|
84
|
+
# +options+ (Hash)
|
85
|
+
# +html_options+ (Hash)
|
42
86
|
def card_deck content = nil, options = nil, html_options = nil, &block
|
43
|
-
UiBibz::Ui::Core::CardDeck.new(content, options, html_options).tap(&block).render
|
87
|
+
UiBibz::Ui::Core::Cards::CardDeck.new(content, options, html_options).tap(&block).render
|
44
88
|
end
|
45
89
|
|
90
|
+
# Card Column Component
|
91
|
+
#
|
92
|
+
# +options+ (Hash)
|
93
|
+
# +html_options+ (Hash)
|
46
94
|
def card_column content = nil, options = nil, html_options = nil, &block
|
47
|
-
UiBibz::Ui::Core::CardColumn.new(content, options, html_options).tap(&block).render
|
95
|
+
UiBibz::Ui::Core::Cards::CardColumn.new(content, options, html_options).tap(&block).render
|
48
96
|
end
|
97
|
+
|
49
98
|
# Card section end ----------------------------------------------------
|
50
99
|
|
51
100
|
# Input section begin ----------------------------------------------------
|
101
|
+
|
102
|
+
# Date Picker Field Component
|
103
|
+
#
|
104
|
+
# +options+ (Hash)
|
105
|
+
# +html_options+ (Hash)
|
52
106
|
def date_picker_field content = nil, options = nil, html_options = nil, &block
|
53
|
-
UiBibz::Ui::Core::DatePickerField.new(content, options, html_options, &block).render
|
107
|
+
UiBibz::Ui::Core::Inputs::DatePickerField.new(content, options, html_options, &block).render
|
54
108
|
end
|
55
109
|
|
110
|
+
# Markdown Editor Field Component
|
111
|
+
#
|
112
|
+
# +options+ (Hash)
|
113
|
+
# +html_options+ (Hash)
|
56
114
|
def markdown_editor_field content = nil, options = nil, html_options = nil, &block
|
57
|
-
UiBibz::Ui::Core::MarkdownEditorField.new(content, options, html_options, &block).render
|
115
|
+
UiBibz::Ui::Core::Inputs::MarkdownEditorField.new(content, options, html_options, &block).render
|
58
116
|
end
|
59
117
|
|
118
|
+
# Multi Column Field Component
|
119
|
+
#
|
120
|
+
# +options+ (Hash)
|
121
|
+
# +html_options+ (Hash)
|
60
122
|
def multi_column_field content = nil, options = nil, html_options = nil, &block
|
61
|
-
UiBibz::Ui::Core::MultiColumnField.new(content, options, html_options, &block).render
|
123
|
+
UiBibz::Ui::Core::Inputs::MultiColumnField.new(content, options, html_options, &block).render
|
62
124
|
end
|
63
125
|
|
126
|
+
# Multi Select Field Component
|
127
|
+
#
|
128
|
+
# +options+ (Hash)
|
129
|
+
# +html_options+ (Hash)
|
64
130
|
def multi_select_field content = nil, options = nil, html_options = nil, &block
|
65
|
-
UiBibz::Ui::Core::MultiSelectField.new(content, options, html_options, &block).render
|
131
|
+
UiBibz::Ui::Core::Inputs::MultiSelectField.new(content, options, html_options, &block).render
|
66
132
|
end
|
67
133
|
|
134
|
+
# Formula Field Component
|
135
|
+
#
|
136
|
+
# +options+ (Hash)
|
137
|
+
# +html_options+ (Hash)
|
68
138
|
def formula_field content = nil, options = nil, html_options = nil, &block
|
69
|
-
UiBibz::Ui::Core::FormulaField.new(content, options, html_options, &block).render
|
139
|
+
UiBibz::Ui::Core::Inputs::FormulaField.new(content, options, html_options, &block).render
|
70
140
|
end
|
71
141
|
|
142
|
+
# Surround Field Component
|
143
|
+
#
|
144
|
+
# +options+ (Hash)
|
145
|
+
# +html_options+ (Hash)
|
72
146
|
def surround_field content = nil, options = nil, html_options = nil, &block
|
73
|
-
UiBibz::Ui::Core::SurroundField.new(content, options, html_options, &block).render
|
147
|
+
UiBibz::Ui::Core::Inputs::SurroundField.new(content, options, html_options, &block).render
|
74
148
|
end
|
75
149
|
|
150
|
+
# Switch Field Component
|
151
|
+
#
|
152
|
+
# +options+ (Hash)
|
153
|
+
# +html_options+ (Hash)
|
76
154
|
def switch_field content = nil, options = nil, html_options = nil, &block
|
77
|
-
UiBibz::Ui::Core::SwitchField.new(content, options, html_options, &block).render
|
155
|
+
UiBibz::Ui::Core::Inputs::SwitchField.new(content, options, html_options, &block).render
|
78
156
|
end
|
79
157
|
|
158
|
+
# Dropdown Select Field Component
|
159
|
+
#
|
160
|
+
# +options+ (Hash)
|
161
|
+
# +html_options+ (Hash)
|
80
162
|
def dropdown_select_field content = nil, options = nil, html_options = nil, &block
|
81
|
-
UiBibz::Ui::Core::DropdownSelectField.new(content, options, html_options, &block).render
|
163
|
+
UiBibz::Ui::Core::Inputs::DropdownSelectField.new(content, options, html_options, &block).render
|
82
164
|
end
|
83
165
|
|
166
|
+
# Autocomplete Field Component
|
167
|
+
#
|
168
|
+
# +options+ (Hash)
|
169
|
+
# +html_options+ (Hash)
|
84
170
|
def autocomplete_field content = nil, options = nil, html_options = nil, &block
|
85
|
-
UiBibz::Ui::Core::AutocompleteField.new(content, options, html_options, &block).render
|
171
|
+
UiBibz::Ui::Core::Inputs::AutocompleteField.new(content, options, html_options, &block).render
|
86
172
|
end
|
173
|
+
|
87
174
|
# Input section end ----------------------------------------------------
|
88
175
|
|
89
176
|
# Nav section begin ----------------------------------------------------
|
177
|
+
|
178
|
+
|
179
|
+
# Nav Component
|
180
|
+
#
|
181
|
+
# +options+ (Hash)
|
182
|
+
# +html_options+ (Hash)
|
90
183
|
def nav content = nil, options = nil, html_options = nil, &block
|
91
|
-
UiBibz::Ui::Core::Nav.new(content, options, html_options).tap(&block).render
|
184
|
+
UiBibz::Ui::Core::Navs::Nav.new(content, options, html_options).tap(&block).render
|
92
185
|
end
|
93
186
|
|
187
|
+
# Navbar Component
|
188
|
+
#
|
189
|
+
# +options+ (Hash)
|
190
|
+
# +html_options+ (Hash)
|
94
191
|
def navbar content = nil, options = nil, html_options = nil, &block
|
95
|
-
UiBibz::Ui::Core::Navbar.new(content, options, html_options).tap(&block).render
|
192
|
+
UiBibz::Ui::Core::Navs::Navbar.new(content, options, html_options).tap(&block).render
|
96
193
|
end
|
194
|
+
|
97
195
|
# Nav section end ----------------------------------------------------
|
98
196
|
|
99
197
|
# Layout section begin ----------------------------------------------------
|
198
|
+
|
199
|
+
# Row Component
|
200
|
+
#
|
201
|
+
# +options+ (Hash)
|
202
|
+
# +html_options+ (Hash)
|
100
203
|
def row content = nil, options = nil, html_options = nil, &block
|
101
|
-
UiBibz::Ui::Core::Row.new(content, options, html_options, &block).render
|
204
|
+
UiBibz::Ui::Core::Layouts::Row.new(content, options, html_options, &block).render
|
102
205
|
end
|
103
206
|
|
207
|
+
# Col Component
|
208
|
+
#
|
209
|
+
# +options+ (Hash)
|
210
|
+
# +html_options+ (Hash)
|
104
211
|
def col content = nil, options = nil, html_options = nil, &block
|
105
|
-
UiBibz::Ui::Core::Col.new(content, options, html_options, &block).render
|
212
|
+
UiBibz::Ui::Core::Layouts::Col.new(content, options, html_options, &block).render
|
106
213
|
end
|
107
214
|
|
215
|
+
# Container Component
|
216
|
+
#
|
217
|
+
# +options+ (Hash)
|
218
|
+
# +html_options+ (Hash)
|
108
219
|
def container content = nil, options = nil, html_options = nil, &block
|
109
|
-
UiBibz::Ui::Core::Container.new(content, options, html_options, &block).render
|
220
|
+
UiBibz::Ui::Core::Layouts::Container.new(content, options, html_options, &block).render
|
110
221
|
end
|
222
|
+
|
111
223
|
# Layout section end ----------------------------------------------------
|
112
224
|
|
113
225
|
# Other section begin ----------------------------------------------------
|
226
|
+
|
227
|
+
# Notify (Alert) Component
|
228
|
+
#
|
229
|
+
# +options+ (Hash)
|
230
|
+
# +html_options+ (Hash)
|
231
|
+
#
|
114
232
|
# Use "notify" instead of "alert" : due to "actionview (4.2.0) lib/action_view/helpers/form_helper.rb" conflict
|
115
233
|
def notify content = nil, options = nil, html_options = nil, &block
|
116
234
|
UiBibz::Ui::Core::Alert.new(content, options, html_options, &block).render
|
117
235
|
end
|
118
236
|
|
237
|
+
# Breadcrumb Component
|
238
|
+
#
|
239
|
+
# +options+ (Hash)
|
240
|
+
# +html_options+ (Hash)
|
241
|
+
#
|
119
242
|
def breadcrumb content = nil, options = nil, html_options = nil, &block
|
120
243
|
if is_tap(content, options)
|
121
244
|
UiBibz::Ui::Core::Breadcrumb.new(content, options, html_options).tap(&block).render
|
@@ -124,38 +247,79 @@ module UiBibz::Helpers::UiCoreHelper
|
|
124
247
|
end
|
125
248
|
end
|
126
249
|
|
250
|
+
# Dropdown Component
|
251
|
+
#
|
252
|
+
# +name+ (String) [Required]
|
253
|
+
# +options+ (Hash)
|
254
|
+
# +html_options+ (Hash)
|
127
255
|
def dropdown name, options = nil, html_options = nil, &block
|
128
256
|
UiBibz::Ui::Core::Dropdown.new(name, options, html_options).tap(&block).render
|
129
257
|
end
|
130
258
|
|
259
|
+
# Glyph Component
|
260
|
+
#
|
261
|
+
# + content+ (String || Hash) [Required]
|
262
|
+
# +options+ (Hash)
|
263
|
+
# +html_options+ (Hash)
|
264
|
+
#
|
265
|
+
# Glyph component with some exeption, it can be written
|
266
|
+
# => glyph 'calendar', size: :xs
|
267
|
+
# or
|
268
|
+
# => glyph { name: 'calendar', size: :xs }
|
131
269
|
def glyph content, options = nil, html_options = nil, &block
|
132
270
|
UiBibz::Ui::Core::Glyph.new(content, options, html_options, &block).render
|
133
271
|
end
|
134
272
|
|
273
|
+
# Jumbotron Component
|
274
|
+
#
|
275
|
+
# +options+ (Hash)
|
276
|
+
# +html_options+ (Hash)
|
135
277
|
def jumbotron content = nil, options = nil, html_options = nil, &block
|
136
278
|
UiBibz::Ui::Core::Jumbotron.new(content, options, html_options, &block).render
|
137
279
|
end
|
138
280
|
|
281
|
+
# Etiquette (Label) Component
|
282
|
+
#
|
283
|
+
# +options+ (Hash)
|
284
|
+
# +html_options+ (Hash)
|
285
|
+
#
|
139
286
|
# Use "etiquette" instead of "label" : due to "actionview (4.2.0) lib/action_view/helpers/form_helper.rb" conflict
|
140
287
|
def etiquette content = nil, options = nil, html_options = nil, &block
|
141
288
|
UiBibz::Ui::Core::Label.new(content, options, html_options, &block).render
|
142
289
|
end
|
143
290
|
|
291
|
+
# List Group Component
|
292
|
+
#
|
293
|
+
# +options+ (Hash)
|
294
|
+
# +html_options+ (Hash)
|
144
295
|
def list_group content = nil, options = nil, html_options = nil, &block
|
145
296
|
UiBibz::Ui::Core::ListGroup.new(content, options, html_options).tap(&block).render
|
146
297
|
end
|
147
298
|
|
299
|
+
# Modal Component
|
300
|
+
#
|
301
|
+
# +options+ (Hash)
|
302
|
+
# +html_options+ (Hash)
|
148
303
|
def modal content = nil, options = nil, html_options = nil, &block
|
149
304
|
UiBibz::Ui::Core::Modal.new(content, options, html_options).tap(&block).render
|
150
305
|
end
|
151
306
|
|
307
|
+
# Progress Component
|
308
|
+
#
|
309
|
+
# +options+ (Hash)
|
310
|
+
# +html_options+ (Hash)
|
152
311
|
def progress percentage = nil, options = nil, html_options = nil, &block
|
153
312
|
UiBibz::Ui::Core::Progress.new(percentage, options, html_options, &block).render
|
154
313
|
end
|
155
314
|
|
315
|
+
# Stars Component
|
316
|
+
#
|
317
|
+
# +options+ (Hash)
|
318
|
+
# +html_options+ (Hash)
|
156
319
|
def stars content = nil, options = nil, html_options = nil, &block
|
157
320
|
UiBibz::Ui::Core::Stars.new(content, options, html_options, &block).render
|
158
321
|
end
|
322
|
+
|
159
323
|
# Other section end ----------------------------------------------------
|
160
324
|
|
161
325
|
private
|
@@ -1,41 +1,68 @@
|
|
1
1
|
module UiBibz::Helpers::UiUxHelper
|
2
2
|
|
3
|
-
def grid options = nil, html_options = nil, &block
|
4
|
-
UiBibz::Ui::Ux::Grid.new(options, html_options).tap(&block).render
|
5
|
-
end
|
6
|
-
|
7
3
|
# Table section begin ------------------------------------------------------
|
4
|
+
|
5
|
+
# Table Component
|
6
|
+
#
|
7
|
+
# +options+ (Hash)
|
8
|
+
# +html_options+ (Hash)
|
9
|
+
#
|
10
|
+
# Option +tap: true+ is required if you want add +header+, +block+ or
|
11
|
+
# +footer+.
|
8
12
|
def table content = nil, options = nil, html_options = nil, &block
|
9
13
|
if is_tap(content, options)
|
10
|
-
UiBibz::Ui::Ux::Table.new(content, options, html_options).tap(&block).render
|
14
|
+
UiBibz::Ui::Ux::Tables::Table.new(content, options, html_options).tap(&block).render
|
11
15
|
else
|
12
|
-
UiBibz::Ui::Ux::Table.new(content, options, html_options, &block).render
|
16
|
+
UiBibz::Ui::Ux::Tables::Table.new(content, options, html_options, &block).render
|
13
17
|
end
|
14
18
|
end
|
15
19
|
|
20
|
+
# Table Search Field Component
|
21
|
+
#
|
22
|
+
# +options+ (Hash) [Required]
|
23
|
+
# +html_options+ (Hash)
|
16
24
|
def table_search_field options, html_options = nil
|
17
|
-
UiBibz::Ui::Ux::TableSearchField.new(options, html_options).render
|
25
|
+
UiBibz::Ui::Ux::Tables::TableSearchField.new(options, html_options).render
|
18
26
|
end
|
19
27
|
|
28
|
+
# Table Pagination Per Page Component
|
29
|
+
#
|
30
|
+
# +options+ (Hash) [Required]
|
31
|
+
# +html_options+ (Hash)
|
20
32
|
def table_pagination_per_page options, html_options = nil
|
21
|
-
UiBibz::Ui::Ux::TablePaginationPerPage.new(options, html_options).render
|
33
|
+
UiBibz::Ui::Ux::Tables::TablePaginationPerPage.new(options, html_options).render
|
22
34
|
end
|
23
35
|
|
36
|
+
# Table Pagination Component
|
37
|
+
#
|
38
|
+
# +options+ (Hash) [Required]
|
39
|
+
# +html_options+ (Hash)
|
24
40
|
def table_pagination options, html_options = nil
|
25
|
-
UiBibz::Ui::Ux::TablePagination.new(options, html_options).render
|
41
|
+
UiBibz::Ui::Ux::Tables::TablePagination.new(options, html_options).render
|
26
42
|
end
|
27
43
|
|
44
|
+
# Glyph and Text method
|
45
|
+
#
|
46
|
+
# Merge glyph and text with html_safe
|
28
47
|
def glyph_and_text glyph_args, text
|
29
48
|
"#{ glyph glyph_args } #{ text }".html_safe
|
30
49
|
end
|
31
50
|
|
51
|
+
# Table Pagination Component
|
52
|
+
#
|
53
|
+
# +options+ (Hash) [Required]
|
54
|
+
# +html_options+ (Hash)
|
55
|
+
#
|
56
|
+
# Option +tap: true+ is required if you want add +header+, +block+ or
|
57
|
+
# +footer+.
|
32
58
|
def table_card content = nil, options = nil, html_options = nil, &block
|
33
59
|
if is_tap(content, options)
|
34
|
-
UiBibz::Ui::Ux::TableCard.new(content, options, html_options).tap(&block).render
|
60
|
+
UiBibz::Ui::Ux::Tables::TableCard.new(content, options, html_options).tap(&block).render
|
35
61
|
else
|
36
|
-
UiBibz::Ui::Ux::TableCard.new(content, options, html_options, &block).render
|
62
|
+
UiBibz::Ui::Ux::Tables::TableCard.new(content, options, html_options, &block).render
|
37
63
|
end
|
38
64
|
end
|
65
|
+
|
39
66
|
# Table section end -------------------------------------------------------
|
40
67
|
|
41
68
|
private
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module UiBibz::Ui::Core
|
1
|
+
module UiBibz::Ui::Core::Buttons
|
2
2
|
|
3
3
|
# Create a button
|
4
4
|
#
|
@@ -28,17 +28,17 @@ module UiBibz::Ui::Core
|
|
28
28
|
#
|
29
29
|
# ==== Signatures
|
30
30
|
#
|
31
|
-
# UiBibz::Ui::Core::Button.new(content, options = nil, html_options = nil)
|
31
|
+
# UiBibz::Ui::Core::Buttons::Button.new(content, options = nil, html_options = nil)
|
32
32
|
#
|
33
|
-
# UiBibz::Ui::Core::Button.new(options = nil, html_options = nil) do
|
33
|
+
# UiBibz::Ui::Core::Buttons::Button.new(options = nil, html_options = nil) do
|
34
34
|
# content
|
35
35
|
# end
|
36
36
|
#
|
37
37
|
# ==== Examples
|
38
38
|
#
|
39
|
-
# UiBibz::Ui::Core::Button.new('test', type: :primary, size: :xs).render
|
39
|
+
# UiBibz::Ui::Core::Buttons::Button.new('test', type: :primary, size: :xs).render
|
40
40
|
#
|
41
|
-
# UiBibz::Ui::Core::Button.new(type: :primary) do
|
41
|
+
# UiBibz::Ui::Core::Buttons::Button.new(type: :primary) do
|
42
42
|
# test
|
43
43
|
# end.render
|
44
44
|
#
|
@@ -49,7 +49,7 @@ module UiBibz::Ui::Core
|
|
49
49
|
# button(options = {}, html_options = {}) do
|
50
50
|
# content
|
51
51
|
# end
|
52
|
-
class Button < Component
|
52
|
+
class Button < UiBibz::Ui::Core::Component
|
53
53
|
|
54
54
|
# See UiBibz::Ui::Core::Component.initialize
|
55
55
|
def initialize content = nil, options = nil, html_options = nil, &block
|
@@ -92,16 +92,5 @@ module UiBibz::Ui::Core
|
|
92
92
|
"btn-#{ options[:size] }" if options[:size]
|
93
93
|
end
|
94
94
|
|
95
|
-
#def statuss
|
96
|
-
#if @statuss.nil?
|
97
|
-
#statuss = {}
|
98
|
-
#%w(success primary secondary info warning danger link).each do |s|
|
99
|
-
#statuss = statuss.merge(Hash[s.to_sym, s])
|
100
|
-
#end
|
101
|
-
#@statuss = statuss
|
102
|
-
#end
|
103
|
-
#@statuss
|
104
|
-
#end
|
105
|
-
|
106
95
|
end
|
107
96
|
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
module UiBibz::Ui::Core
|
1
|
+
module UiBibz::Ui::Core::Buttons
|
2
2
|
|
3
3
|
# Create a button choice
|
4
4
|
#
|
5
|
-
# This element is an extend of UiBibz::Ui::Core::
|
5
|
+
# This element is an extend of UiBibz::Ui::Core::Buttons::Button
|
6
6
|
#
|
7
7
|
# ==== Attributes
|
8
8
|
#
|
@@ -33,17 +33,17 @@ module UiBibz::Ui::Core
|
|
33
33
|
#
|
34
34
|
# ==== Signatures
|
35
35
|
#
|
36
|
-
# UiBibz::Ui::Core::ButtonChoice.new(content, options = nil, html_options = nil)
|
36
|
+
# UiBibz::Ui::Core::Buttons::ButtonChoice.new(content, options = nil, html_options = nil)
|
37
37
|
#
|
38
|
-
# UiBibz::Ui::Core::ButtonChoice.new(options = nil, html_options = nil) do
|
38
|
+
# UiBibz::Ui::Core::Buttons::ButtonChoice.new(options = nil, html_options = nil) do
|
39
39
|
# content
|
40
40
|
# end
|
41
41
|
#
|
42
42
|
# ==== Examples
|
43
43
|
#
|
44
|
-
# UiBibz::Ui::Core::ButtonChoice.new('test', state: :active)
|
44
|
+
# UiBibz::Ui::Core::Buttons::ButtonChoice.new('test', state: :active)
|
45
45
|
#
|
46
|
-
# UiBibz::Ui::Core::ButtonChoice.new({id: 'state', input_html_options: { class: 'state'}}, { class: 'lable-class'}) do
|
46
|
+
# UiBibz::Ui::Core::Buttons::ButtonChoice.new({id: 'state', input_html_options: { class: 'state'}}, { class: 'lable-class'}) do
|
47
47
|
# test
|
48
48
|
# end.render
|
49
49
|
#
|
@@ -55,9 +55,9 @@ module UiBibz::Ui::Core
|
|
55
55
|
# content
|
56
56
|
# end
|
57
57
|
#
|
58
|
-
class ButtonChoice < UiBibz::Ui::Core::Button
|
58
|
+
class ButtonChoice < UiBibz::Ui::Core::Buttons::Button
|
59
59
|
|
60
|
-
# See UiBibz::Ui::Core::
|
60
|
+
# See UiBibz::Ui::Core::Buttons::Button.initialize
|
61
61
|
def initialize content = nil, options = nil, html_options = nil, &block
|
62
62
|
super
|
63
63
|
end
|