ui_bibz 2.0.0.beta2.3 → 2.0.0.beta2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -7
- data/app/inputs/ui_bibz_inputs/collection_input.rb +0 -1
- data/lib/ui_bibz/ui/core/badge.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/buttons/button_group.rb +2 -2
- data/lib/ui_bibz/ui/core/forms/buttons/components/button_group_dropdown.rb +72 -0
- data/lib/ui_bibz/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 755e639fd4cabed316f27fbcb79d176678223aa9
|
4
|
+
data.tar.gz: 59225f92407b012d5eec7af32971723ff48438db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76507aea4ac856f7d447dfbd008eb3fb294b822b38dc21e29c483fb072498db20c5af09bd5713ea0d45e2a467c74d9067bcb1c7881c44f16706c8007851bdce2
|
7
|
+
data.tar.gz: a87bb9bee6acb7645cf218c6724f60e1058130b75b2e5aa0e117b5787a8d4ec81ccfc740b1655097f7122435fd2ab5e0c135e4466e011c55cff9ae80ae8c07a2
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ui_bibz (2.0.0.beta2.
|
4
|
+
ui_bibz (2.0.0.beta2.4)
|
5
5
|
bootstrap (= 4.0.0.beta2)
|
6
6
|
font-awesome-sass
|
7
7
|
haml
|
@@ -95,7 +95,7 @@ GEM
|
|
95
95
|
haml (>= 4.0, < 6)
|
96
96
|
nokogiri (>= 1.6.0)
|
97
97
|
ruby_parser (~> 3.5)
|
98
|
-
i18n (0.9.
|
98
|
+
i18n (0.9.1)
|
99
99
|
concurrent-ruby (~> 1.0)
|
100
100
|
jquery-rails (4.3.1)
|
101
101
|
rails-dom-testing (>= 1, < 3)
|
@@ -105,12 +105,10 @@ GEM
|
|
105
105
|
loofah (2.1.1)
|
106
106
|
crass (~> 1.0.2)
|
107
107
|
nokogiri (>= 1.5.9)
|
108
|
-
mail (2.
|
109
|
-
|
108
|
+
mail (2.7.0)
|
109
|
+
mini_mime (>= 0.1.1)
|
110
110
|
method_source (0.9.0)
|
111
|
-
|
112
|
-
mime-types-data (~> 3.2015)
|
113
|
-
mime-types-data (3.2016.0521)
|
111
|
+
mini_mime (1.0.0)
|
114
112
|
mini_portile2 (2.3.0)
|
115
113
|
minitest (5.10.3)
|
116
114
|
nio4r (2.1.0)
|
@@ -16,7 +16,7 @@ module UiBibz::Ui::Core
|
|
16
16
|
# You can add HTML attributes using the +html_options+.
|
17
17
|
# You can pass arguments in options attribute:
|
18
18
|
# * +status+ - status of élement with symbol value:
|
19
|
-
# (+:
|
19
|
+
# (+:primary+, +:secondary+, +:success+, +:danger+, +:warning+, +:info+, +:light+, +:dark+)
|
20
20
|
# * +glyph+ - Add glyph with name or hash options
|
21
21
|
# * +name+ - String
|
22
22
|
# * +size+ - Integer
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'ui_bibz/ui/core/forms/buttons/components/button_group_dropdown'
|
1
2
|
module UiBibz::Ui::Core::Forms::Buttons
|
2
3
|
|
3
4
|
# Create a button group
|
@@ -76,8 +77,7 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
76
77
|
|
77
78
|
def dropdown content, options = {}, html_options = nil, &block
|
78
79
|
options = @options.merge(options)
|
79
|
-
|
80
|
-
@items << UiBibz::Ui::Core::Dropdowns::Dropdown.new(content, options, html_options).tap(&block).render
|
80
|
+
@items << ButtonGroupDropdown.new(content, options, html_options).tap(&block).render
|
81
81
|
end
|
82
82
|
|
83
83
|
def input attribute_name, options = {}, &block
|
@@ -0,0 +1,72 @@
|
|
1
|
+
module UiBibz::Ui::Core::Forms::Buttons
|
2
|
+
|
3
|
+
# Create a button choice
|
4
|
+
#
|
5
|
+
# This element is an extend of UiBibz::Ui::Core::Forms::Buttons::Button
|
6
|
+
#
|
7
|
+
# ==== Attributes
|
8
|
+
#
|
9
|
+
# * +content+ - Content of element
|
10
|
+
# * +options+ - Options of element
|
11
|
+
# * +html_options+ - Html Options of element
|
12
|
+
#
|
13
|
+
# ==== Options
|
14
|
+
#
|
15
|
+
# You can add HTML attributes using the +html_options+.
|
16
|
+
# You can pass arguments in options attribute:
|
17
|
+
# * +type+ - Symbol (+:checkbox+, +:radio+)
|
18
|
+
# * +status+ - status of élement with symbol value:
|
19
|
+
# (+:primary+, +:secondary+, +:info+, +:warning+, +:danger+)
|
20
|
+
# * +size+
|
21
|
+
# (+:xs+, +:sm+, +:lg+)
|
22
|
+
# * +url+ - String url
|
23
|
+
# * +outline+ - Boolean
|
24
|
+
# * +state+ - Symbol (+:active+, +:disabled)
|
25
|
+
# * +type+ - Symbol (+:block)
|
26
|
+
# * +name+ - String name of input checkbox
|
27
|
+
# * +id+ - String id of input checkbox
|
28
|
+
# * +input_html_options+ - Hash of input html options
|
29
|
+
# * +glyph+ - Add glyph with name or hash options
|
30
|
+
# * +name+ - String
|
31
|
+
# * +size+ - Integer
|
32
|
+
# * +type+ - Symbol
|
33
|
+
#
|
34
|
+
# ==== Signatures
|
35
|
+
#
|
36
|
+
# UiBibz::Ui::Core::Forms::Buttons::Choice.new(content, options = nil, html_options = nil)
|
37
|
+
#
|
38
|
+
# UiBibz::Ui::Core::Forms::Buttons::Choice.new(options = nil, html_options = nil) do
|
39
|
+
# content
|
40
|
+
# end
|
41
|
+
#
|
42
|
+
# ==== Examples
|
43
|
+
#
|
44
|
+
# UiBibz::Ui::Core::Forms::Buttons::Choice.new('test', state: :active)
|
45
|
+
#
|
46
|
+
# UiBibz::Ui::Core::Forms::Buttons::Choice.new({id: 'state', input_html_options: { class: 'state'}}, { class: 'lable-class'}) do
|
47
|
+
# test
|
48
|
+
# end.render
|
49
|
+
#
|
50
|
+
# ==== Helper
|
51
|
+
#
|
52
|
+
# choice(content, options = {}, html_options = {})
|
53
|
+
#
|
54
|
+
# choice(options = {}, html_options = {}) do
|
55
|
+
# content
|
56
|
+
# end
|
57
|
+
#
|
58
|
+
class ButtonGroupDropdown < UiBibz::Ui::Core::Dropdowns::Dropdown
|
59
|
+
|
60
|
+
# See UiBibz::Ui::Core::Forms::Buttons::Button.initialize
|
61
|
+
def initialize content = nil, options = nil, html_options = nil, &block
|
62
|
+
super
|
63
|
+
end
|
64
|
+
|
65
|
+
private
|
66
|
+
|
67
|
+
def component_html_classes
|
68
|
+
super << "btn-group"
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
end
|
data/lib/ui_bibz/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ui_bibz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.beta2.
|
4
|
+
version: 2.0.0.beta2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thooams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -310,6 +310,7 @@ files:
|
|
310
310
|
- lib/ui_bibz/ui/core/forms/buttons/button_link.rb
|
311
311
|
- lib/ui_bibz/ui/core/forms/buttons/button_refresh.rb
|
312
312
|
- lib/ui_bibz/ui/core/forms/buttons/button_toolbar.rb
|
313
|
+
- lib/ui_bibz/ui/core/forms/buttons/components/button_group_dropdown.rb
|
313
314
|
- lib/ui_bibz/ui/core/forms/buttons/components/choice.rb
|
314
315
|
- lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb
|
315
316
|
- lib/ui_bibz/ui/core/forms/choices/radio_field.rb
|