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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 376efa6f5ae5db474e06c0ddc60400790155ac73
4
- data.tar.gz: 8a5f2563fd2e2257148e144b49bdb5397430423d
3
+ metadata.gz: 755e639fd4cabed316f27fbcb79d176678223aa9
4
+ data.tar.gz: 59225f92407b012d5eec7af32971723ff48438db
5
5
  SHA512:
6
- metadata.gz: 3b37bd2f78f10a524bf4365af5439d2c1543b5d20196b8c71dfd43148a75875067dd42427b5243357942cf5ffc6656b85ee5d0632693337edc6f9a9a3fc57294
7
- data.tar.gz: bf5fb06d604297f5ef30ef22f068f8f02015e3404ef2a38d011709f0e361f900de0dbd101075003ea3d1784eec3db50d8cb194994eb953dbd06a3185fb790959
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.3)
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.0)
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.6.6)
109
- mime-types (>= 1.16, < 4)
108
+ mail (2.7.0)
109
+ mini_mime (>= 0.1.1)
110
110
  method_source (0.9.0)
111
- mime-types (3.1)
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,6 @@ module UiBibzInputs
16
16
 
17
17
  def new_options
18
18
  label_method, value_method = detect_collection_methods
19
- new_value =
20
19
 
21
20
  if options[:grouped] == true
22
21
  options.merge({ option_tags: option_groups_from_collection_for_select(
@@ -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
- # (+:default+, +:primary+, +:info+, +:warning+, +:danger+)
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
@@ -1,3 +1,3 @@
1
1
  module UiBibz
2
- VERSION = "2.0.0.beta2.3"
2
+ VERSION = "2.0.0.beta2.4"
3
3
  end
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.3
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-10-31 00:00:00.000000000 Z
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