ui_bibz 2.0.0.alpha10 → 2.0.0.alpha11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +9 -7
  3. data/app/assets/stylesheets/table.sass +2 -0
  4. data/app/assets/stylesheets/ui_bibz.sass +0 -2
  5. data/lib/ui_bibz/ui/core/alert.rb +4 -4
  6. data/lib/ui_bibz/ui/core/breadcrumb/breadcrumb.rb +2 -2
  7. data/lib/ui_bibz/ui/core/breadcrumb/components/breadcrumb_link.rb +2 -2
  8. data/lib/ui_bibz/ui/core/button/button.rb +10 -10
  9. data/lib/ui_bibz/ui/core/button/button_choice.rb +5 -5
  10. data/lib/ui_bibz/ui/core/button/button_dropdown.rb +3 -3
  11. data/lib/ui_bibz/ui/core/button/button_group.rb +5 -1
  12. data/lib/ui_bibz/ui/core/button/button_link.rb +2 -2
  13. data/lib/ui_bibz/ui/core/button/button_split_dropdown.rb +5 -5
  14. data/lib/ui_bibz/ui/core/card/card.rb +4 -4
  15. data/lib/ui_bibz/ui/core/card/components/block/card_block_text.rb +1 -1
  16. data/lib/ui_bibz/ui/core/component.rb +7 -7
  17. data/lib/ui_bibz/ui/core/dropdown/components/dropdown_link.rb +2 -2
  18. data/lib/ui_bibz/ui/core/dropdown/dropdown.rb +6 -6
  19. data/lib/ui_bibz/ui/core/glyph.rb +3 -3
  20. data/lib/ui_bibz/ui/core/input/autocomplete_field.rb +7 -1
  21. data/lib/ui_bibz/ui/core/input/dropdown_select_field.rb +2 -2
  22. data/lib/ui_bibz/ui/core/input/formula_field.rb +1 -1
  23. data/lib/ui_bibz/ui/core/input/multi_select_field.rb +2 -2
  24. data/lib/ui_bibz/ui/core/input/surround_field.rb +9 -1
  25. data/lib/ui_bibz/ui/core/input/switch_field.rb +4 -4
  26. data/lib/ui_bibz/ui/core/label.rb +4 -4
  27. data/lib/ui_bibz/ui/core/list/components/list.rb +7 -7
  28. data/lib/ui_bibz/ui/core/list/list_group.rb +5 -5
  29. data/lib/ui_bibz/ui/core/nav/components/nav_dropdown.rb +2 -2
  30. data/lib/ui_bibz/ui/core/nav/components/nav_link.rb +3 -3
  31. data/lib/ui_bibz/ui/core/nav/components/nav_link_link.rb +1 -1
  32. data/lib/ui_bibz/ui/core/nav/components/navbar_nav.rb +1 -1
  33. data/lib/ui_bibz/ui/core/nav/nav.rb +1 -1
  34. data/lib/ui_bibz/ui/core/nav/navbar.rb +3 -3
  35. data/lib/ui_bibz/ui/core/progress.rb +5 -5
  36. data/lib/ui_bibz/ui/core/stars.rb +3 -3
  37. data/lib/ui_bibz/ui/ux/table/components/actions.rb +4 -0
  38. data/lib/ui_bibz/ui/ux/table/components/as.rb +8 -4
  39. data/lib/ui_bibz/ui/ux/table/components/column.rb +17 -16
  40. data/lib/ui_bibz/ui/ux/table/components/thead.rb +4 -4
  41. data/lib/ui_bibz/ui/ux/table/table.rb +8 -8
  42. data/lib/ui_bibz/ui/ux/table/table_card.rb +4 -4
  43. data/lib/ui_bibz/version.rb +1 -1
  44. data/test/dummy/db/schema.rb +1 -1
  45. data/test/ui/breadcrumb_test.rb +2 -2
  46. data/test/ui/button_test.rb +24 -24
  47. data/test/ui/card_test.rb +5 -5
  48. data/test/ui/component_test.rb +2 -2
  49. data/test/ui/dropdown_test.rb +1 -1
  50. data/test/ui/input_switch_field_test.rb +3 -3
  51. data/test/ui/inputs_test.rb +5 -5
  52. data/test/ui/list_group_test.rb +5 -5
  53. data/test/ui/nav_test.rb +3 -3
  54. data/test/ui/stars_test.rb +2 -2
  55. data/test/ui/table_test.rb +7 -7
  56. data/test/ui_helper_test.rb +16 -16
  57. data/ui_bibz.gemspec +2 -2
  58. metadata +5 -109
  59. data/doc/UiBibz.html +0 -129
  60. data/doc/UiBibz/Concerns.html +0 -115
  61. data/doc/UiBibz/Concerns/Models.html +0 -115
  62. data/doc/UiBibz/Concerns/Models/Searchable.html +0 -120
  63. data/doc/UiBibz/Concerns/Models/Searchable/ClassMethods.html +0 -174
  64. data/doc/UiBibz/Helpers.html +0 -115
  65. data/doc/UiBibz/Helpers/MetaHelper.html +0 -273
  66. data/doc/UiBibz/Helpers/UiCoreHelper.html +0 -1234
  67. data/doc/UiBibz/Helpers/UiUxHelper.html +0 -463
  68. data/doc/UiBibz/Helpers/UtilsHelper.html +0 -187
  69. data/doc/UiBibz/Rails.html +0 -115
  70. data/doc/UiBibz/Rails/Engine.html +0 -123
  71. data/doc/UiBibz/Ui.html +0 -119
  72. data/doc/UiBibz/Ui/Base.html +0 -304
  73. data/doc/UiBibz/Ui/Core.html +0 -128
  74. data/doc/UiBibz/Ui/Core/Alert.html +0 -383
  75. data/doc/UiBibz/Ui/Core/Bar.html +0 -372
  76. data/doc/UiBibz/Ui/Core/Breadcrumb.html +0 -442
  77. data/doc/UiBibz/Ui/Core/BreadcrumbLink.html +0 -369
  78. data/doc/UiBibz/Ui/Core/Button.html +0 -380
  79. data/doc/UiBibz/Ui/Core/ButtonDropdown.html +0 -401
  80. data/doc/UiBibz/Ui/Core/ButtonGroup.html +0 -372
  81. data/doc/UiBibz/Ui/Core/ButtonLink.html +0 -382
  82. data/doc/UiBibz/Ui/Core/ButtonSplitDropdown.html +0 -403
  83. data/doc/UiBibz/Ui/Core/Col.html +0 -373
  84. data/doc/UiBibz/Ui/Core/Component.html +0 -1087
  85. data/doc/UiBibz/Ui/Core/Dropdown.html +0 -663
  86. data/doc/UiBibz/Ui/Core/DropdownDivider.html +0 -301
  87. data/doc/UiBibz/Ui/Core/DropdownHeader.html +0 -355
  88. data/doc/UiBibz/Ui/Core/DropdownLink.html +0 -376
  89. data/doc/UiBibz/Ui/Core/DropdownList.html +0 -382
  90. data/doc/UiBibz/Ui/Core/Glyph.html +0 -385
  91. data/doc/UiBibz/Ui/Core/Jumbotron.html +0 -379
  92. data/doc/UiBibz/Ui/Core/Label.html +0 -379
  93. data/doc/UiBibz/Ui/Core/List.html +0 -528
  94. data/doc/UiBibz/Ui/Core/ListGroup.html +0 -474
  95. data/doc/UiBibz/Ui/Core/Modal.html +0 -543
  96. data/doc/UiBibz/Ui/Core/ModalBody.html +0 -353
  97. data/doc/UiBibz/Ui/Core/ModalFooter.html +0 -353
  98. data/doc/UiBibz/Ui/Core/ModalHeader.html +0 -359
  99. data/doc/UiBibz/Ui/Core/Nav.html +0 -515
  100. data/doc/UiBibz/Ui/Core/NavDropdown.html +0 -391
  101. data/doc/UiBibz/Ui/Core/NavLink.html +0 -364
  102. data/doc/UiBibz/Ui/Core/Navbar.html +0 -646
  103. data/doc/UiBibz/Ui/Core/NavbarForm.html +0 -364
  104. data/doc/UiBibz/Ui/Core/NavbarNav.html +0 -302
  105. data/doc/UiBibz/Ui/Core/NavbarText.html +0 -355
  106. data/doc/UiBibz/Ui/Core/Panel.html +0 -617
  107. data/doc/UiBibz/Ui/Core/ProgressBar.html +0 -462
  108. data/doc/UiBibz/Ui/Core/Row.html +0 -350
  109. data/doc/UiBibz/Ui/Core/Stars.html +0 -371
  110. data/doc/UiBibz/Ui/Ux.html +0 -128
  111. data/doc/UiBibz/Ui/Ux/Actionable.html +0 -478
  112. data/doc/UiBibz/Ui/Ux/Actions.html +0 -602
  113. data/doc/UiBibz/Ui/Ux/Column.html +0 -1249
  114. data/doc/UiBibz/Ui/Ux/Columns.html +0 -338
  115. data/doc/UiBibz/Ui/Ux/Grid.html +0 -485
  116. data/doc/UiBibz/Ui/Ux/Paginable.html +0 -381
  117. data/doc/UiBibz/Ui/Ux/Searchable.html +0 -376
  118. data/doc/UiBibz/Ui/Ux/Sortable.html +0 -300
  119. data/doc/UiBibz/Ui/Ux/Store.html +0 -1176
  120. data/doc/UiBibz/Ui/Ux/Table.html +0 -694
  121. data/doc/UiBibz/Ui/Ux/TableAction.html +0 -309
  122. data/doc/UiBibz/Ui/Ux/TablePagination.html +0 -342
  123. data/doc/UiBibz/Ui/Ux/TablePaginationPerPage.html +0 -348
  124. data/doc/UiBibz/Ui/Ux/TablePanel.html +0 -680
  125. data/doc/UiBibz/Ui/Ux/TableSearchField.html +0 -304
  126. data/doc/UiBibz/Utils.html +0 -115
  127. data/doc/UiBibz/Utils/Internationalization.html +0 -262
  128. data/doc/_index.html +0 -706
  129. data/doc/class_list.html +0 -58
  130. data/doc/css/common.css +0 -1
  131. data/doc/css/full_list.css +0 -57
  132. data/doc/css/style.css +0 -339
  133. data/doc/file.README.html +0 -1261
  134. data/doc/file_list.html +0 -60
  135. data/doc/frames.html +0 -26
  136. data/doc/images/alert.png +0 -0
  137. data/doc/images/breadcrumb.png +0 -0
  138. data/doc/images/button.png +0 -0
  139. data/doc/images/button_dropdown.png +0 -0
  140. data/doc/images/button_group.png +0 -0
  141. data/doc/images/button_link.png +0 -0
  142. data/doc/images/button_split_dropdown.png +0 -0
  143. data/doc/images/etiquette.png +0 -0
  144. data/doc/images/glyph.png +0 -0
  145. data/doc/images/list.png +0 -0
  146. data/doc/images/modal.png +0 -0
  147. data/doc/images/nav.png +0 -0
  148. data/doc/images/navbar.png +0 -0
  149. data/doc/images/panel.png +0 -0
  150. data/doc/images/progress_bar.png +0 -0
  151. data/doc/images/stars.png +0 -0
  152. data/doc/images/table.png +0 -0
  153. data/doc/images/table_pagination_per_page.png +0 -0
  154. data/doc/images/table_panel.png +0 -0
  155. data/doc/images/table_search_field.png +0 -0
  156. data/doc/images/ui-bibz-logo-without-border.gif +0 -0
  157. data/doc/images/ui-bibz-logo.gif +0 -0
  158. data/doc/index.html +0 -1261
  159. data/doc/js/app.js +0 -219
  160. data/doc/js/full_list.js +0 -181
  161. data/doc/js/jquery.js +0 -4
  162. data/doc/method_list.html +0 -1329
  163. data/doc/top-level-namespace.html +0 -112
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73f9d08290d752493ee25449548d8cc6c13a1c30
4
- data.tar.gz: 5f25f0c03cefb84170338449d7fec59d2bf2f73f
3
+ metadata.gz: 4fa135177f9f3c62b1e509bd24aa4519c55d34b5
4
+ data.tar.gz: 32fbf70278b20464d0685bc19cd024b8d48fc3f6
5
5
  SHA512:
6
- metadata.gz: 6aeec81aac06870dc1e103d7874969c408c373682dfba8dd167424dc9d3525bbf05f1d1377a8aeefed7c5d75c8c954676b5dbeac15b49b872bf16633245ad6aa
7
- data.tar.gz: e35fcdb606f939287a1cc2dc47f8228a93878e3700488d9900e391f950061c835358fca4e32a6a15c1ed8a8e7d3cf4127b0dc516ff4bdea6580dbd0e52851150
6
+ metadata.gz: 19a161dfa48babb9b7464ff51a8fa6ff8979e35acb69ab46c48188e10101c20ce6fec2c3c1eb1a45ff1f443dac1ca44e50f5385f34ce725cffac7295226cefa0
7
+ data.tar.gz: 72ddddbff681482f9079d1d8465233289bb1fa9618a88607cef1b0cc60f62ff8e24c164e2b3fc55d0a52596b448b732b3a6205b36daa9e08edd0261ac33c12a3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (2.0.0.alpha10)
4
+ ui_bibz (2.0.0.alpha11)
5
5
  bootstrap (< 4.0.0.alpha3)
6
6
  bundler (>= 1.8.4)
7
7
  font-awesome-sass
@@ -54,12 +54,12 @@ GEM
54
54
  arel (6.0.3)
55
55
  autoprefixer-rails (6.3.6.2)
56
56
  execjs
57
- awesome_print (1.6.1)
57
+ awesome_print (1.7.0)
58
58
  bootstrap (4.0.0.alpha2)
59
59
  autoprefixer-rails (>= 6.0.3)
60
60
  sass (>= 3.4.19)
61
61
  builder (3.2.2)
62
- codeclimate-test-reporter (0.5.0)
62
+ codeclimate-test-reporter (0.5.2)
63
63
  simplecov (>= 0.7.1, < 1.0.0)
64
64
  concurrent-ruby (1.0.2)
65
65
  docile (1.1.5)
@@ -96,10 +96,12 @@ GEM
96
96
  mime-types (3.1)
97
97
  mime-types-data (~> 3.2015)
98
98
  mime-types-data (3.2016.0521)
99
- mini_portile2 (2.0.0)
99
+ mini_portile2 (2.1.0)
100
100
  minitest (5.9.0)
101
- nokogiri (1.6.7.2)
102
- mini_portile2 (~> 2.0.0.rc2)
101
+ nokogiri (1.6.8)
102
+ mini_portile2 (~> 2.1.0)
103
+ pkg-config (~> 1.1.7)
104
+ pkg-config (1.1.7)
103
105
  rack (1.6.4)
104
106
  rack-test (0.6.3)
105
107
  rack (>= 1.0)
@@ -127,7 +129,7 @@ GEM
127
129
  activesupport (= 4.2.6)
128
130
  rake (>= 0.8.7)
129
131
  thor (>= 0.18.1, < 2.0)
130
- rake (11.1.2)
132
+ rake (11.2.2)
131
133
  rdoc (4.2.2)
132
134
  json (~> 1.4)
133
135
  ruby_parser (3.8.2)
@@ -63,4 +63,6 @@
63
63
  .table
64
64
  .action
65
65
  width: 135px
66
+ .dropdown_select
67
+ margin-bottom: 0px !important
66
68
 
@@ -29,11 +29,9 @@ $states_colors: (success: $brand-success, primary: $brand-primary, secondary: $b
29
29
  @import fix-bootstrap-4
30
30
  @import fix-dropdown-select
31
31
 
32
-
33
32
  // Components
34
33
  @import table
35
34
 
36
-
37
35
  // Custom css
38
36
  @each $key, $value in $states_colors
39
37
  .card-#{$key}
@@ -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
- # * +state+ - State of élement with symbol value:
17
+ # * +status+ - status of élement with symbol value:
18
18
  # (+:default+, +:primary+, +:info+, +:warning+, +:danger+)
19
19
  # * +glyph+ - Add glyph with name or hash options
20
20
  # * +name+ - String
@@ -31,7 +31,7 @@ module UiBibz::Ui::Core
31
31
  #
32
32
  # ==== Examples
33
33
  #
34
- # UiBibz::Ui::Core::Alert.new(content, { state: :success, glyph: 'eye' },{ class: 'test' }).render
34
+ # UiBibz::Ui::Core::Alert.new(content, { status: :success, glyph: 'eye' },{ class: 'test' }).render
35
35
  #
36
36
  # UiBibz::Ui::Core::Alert.new({glyph: { name: 'eye', size: 3}, { class: 'test' }) do
37
37
  # content
@@ -77,8 +77,8 @@ module UiBibz::Ui::Core
77
77
  end
78
78
  end
79
79
 
80
- def state
81
- sym = options[:state] || :info
80
+ def status
81
+ sym = options[:status] || :info
82
82
  "alert-#{ sym }"
83
83
  end
84
84
 
@@ -39,7 +39,7 @@ module UiBibz::Ui::Core
39
39
  # b.link url: '#level-1' do
40
40
  # 'Level 1'
41
41
  # end
42
- # b.link 'Level 2', status: :active
42
+ # b.link 'Level 2', state: :active
43
43
  # end.render
44
44
  #
45
45
  # ==== Helper
@@ -98,7 +98,7 @@ module UiBibz::Ui::Core
98
98
  def generate_links
99
99
  @options[:store].each do |item|
100
100
  if item == @options[:store].last
101
- @links << BreadcrumbLink.new(item.send(link_label), state: :disabled).render
101
+ @links << BreadcrumbLink.new(item.send(link_label), status: :disabled).render
102
102
  else
103
103
  @links << BreadcrumbLink.new(item.send(link_label), url: inject_url(link_url, item)).render
104
104
  end
@@ -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
- # * +status+ - State of élement with symbol value:
17
+ # * +state+ - status of élement with symbol value:
18
18
  # (+:active+)
19
19
  # * +url+ - String
20
20
  # * +glyph+ - Add glyph with name or hash options
@@ -32,7 +32,7 @@ module UiBibz::Ui::Core
32
32
  #
33
33
  # ==== Examples
34
34
  #
35
- # UiBibz::Ui::Core::BreadcrumbLink.new('Home', { glyph: 'home', status: :active },{ class: 'test' }).render
35
+ # UiBibz::Ui::Core::BreadcrumbLink.new('Home', { glyph: 'home', state: :active },{ class: 'test' }).render
36
36
  #
37
37
  # UiBibz::Ui::Core::BreadcrumbLink.new({glyph: { name: 'eye', size: 3}, { class: 'test' }) do
38
38
  # 'Home'
@@ -14,12 +14,12 @@ 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
- # * +state+ - State of élement with symbol value:
17
+ # * +status+ - status of élement with symbol value:
18
18
  # (+:primary+, +:secondary+, +:info+, +:warning+, +:danger+, +:link+)
19
19
  # * +size+
20
20
  # (+:xs+, +:sm+, +:lg+)
21
21
  # * +outline+ - Boolean
22
- # * +status+ - Symbol (+:active+, +:disabled)
22
+ # * +state+ - Symbol (+:active+, +:disabled)
23
23
  # * +type+ - Symbol (+:outline)
24
24
  # * +glyph+ - Add glyph with name or hash options
25
25
  # * +name+ - String
@@ -71,8 +71,8 @@ module UiBibz::Ui::Core
71
71
  options[:toggle].nil? ? {} : { "data-toggle" => 'button', "aria-pressed" => false, "autocomplete" => "off" }
72
72
  end
73
73
 
74
- def state
75
- s = options[:state] || :primary
74
+ def status
75
+ s = options[:status] || :primary
76
76
  "btn-#{ s }#{ outline }"
77
77
  end
78
78
 
@@ -92,15 +92,15 @@ module UiBibz::Ui::Core
92
92
  "btn-#{ options[:size] }" if options[:size]
93
93
  end
94
94
 
95
- #def states
96
- #if @states.nil?
97
- #states = {}
95
+ #def statuss
96
+ #if @statuss.nil?
97
+ #statuss = {}
98
98
  #%w(success primary secondary info warning danger link).each do |s|
99
- #states = states.merge(Hash[s.to_sym, s])
99
+ #statuss = statuss.merge(Hash[s.to_sym, s])
100
100
  #end
101
- #@states = states
101
+ #@statuss = statuss
102
102
  #end
103
- #@states
103
+ #@statuss
104
104
  #end
105
105
 
106
106
  end
@@ -15,13 +15,13 @@ module UiBibz::Ui::Core
15
15
  # You can add HTML attributes using the +html_options+.
16
16
  # You can pass arguments in options attribute:
17
17
  # * +type+ - Symbol (+:checkbox+, +:radio+)
18
- # * +state+ - State of élement with symbol value:
18
+ # * +status+ - status of élement with symbol value:
19
19
  # (+:primary+, +:secondary+, +:info+, +:warning+, +:danger+)
20
20
  # * +size+
21
21
  # (+:xs+, +:sm+, +:lg+)
22
22
  # * +url+ - String url
23
23
  # * +outline+ - Boolean
24
- # * +status+ - Symbol (+:active+, +:disabled)
24
+ # * +state+ - Symbol (+:active+, +:disabled)
25
25
  # * +type+ - Symbol (+:block)
26
26
  # * +name+ - String name of input checkbox
27
27
  # * +id+ - String id of input checkbox
@@ -41,9 +41,9 @@ module UiBibz::Ui::Core
41
41
  #
42
42
  # ==== Examples
43
43
  #
44
- # UiBibz::Ui::Core::ButtonChoice.new('test', status: :active)
44
+ # UiBibz::Ui::Core::ButtonChoice.new('test', state: :active)
45
45
  #
46
- # UiBibz::Ui::Core::ButtonChoice.new({id: 'toto', input_html_options: { class: 'toto'}}, { class: 'lable-class'}) do
46
+ # UiBibz::Ui::Core::ButtonChoice.new({id: 'state', input_html_options: { class: 'state'}}, { class: 'lable-class'}) do
47
47
  # test
48
48
  # end.render
49
49
  #
@@ -81,7 +81,7 @@ module UiBibz::Ui::Core
81
81
  end
82
82
 
83
83
  def checked
84
- @options[:status] == :active ? { checked: :checked } : {}
84
+ @options[:state] == :active ? { checked: :checked } : {}
85
85
  end
86
86
 
87
87
  def name
@@ -14,12 +14,12 @@ 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
- # * +state+ - State of élement with symbol value:
17
+ # * +status+ - status of élement with symbol value:
18
18
  # (+:primary+, +:secondary+, +:info+, +:warning+, +:danger+)
19
19
  # * +size+
20
20
  # (+:xs+, +:sm+, +:lg+)
21
21
  # * +outline+ - Boolean
22
- # * +status+ - Symbol (+:active+, +:disabled)
22
+ # * +state+ - Symbol (+:active+, +:disabled)
23
23
  # * +type+ - Symbol (+:block)
24
24
  # * +glyph+ - Add glyph with name or hash options
25
25
  # * +name+ - String
@@ -37,7 +37,7 @@ module UiBibz::Ui::Core
37
37
  #
38
38
  # ==== Examples
39
39
  #
40
- # UiBibz::Ui::Core::ButtonDropdown.new(name, state: :success).tap do |d|
40
+ # UiBibz::Ui::Core::ButtonDropdown.new(name, status: :success).tap do |d|
41
41
  # d.link 'test', { url: '#Test1' }
42
42
  # d.list('---')
43
43
  # d.list('Header 1', { type: :header })
@@ -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
- # * +state+ - State of element with +symbol+ value:
17
+ # * +status+ - status of element with +symbol+ value:
18
18
  # (+:primary+, +:secondary+, +:info+, +:warning+, +:danger+)
19
19
  # * +size+ - Size of element with +symbol+ value:
20
20
  # (+:xs+, +:sm+, +:lg+)
@@ -68,6 +68,10 @@ module UiBibz::Ui::Core
68
68
  options[:type] || :group
69
69
  end
70
70
 
71
+ def component_html_data
72
+ add_html_data "toggle", "buttons"
73
+ end
74
+
71
75
  def size
72
76
  "btn-group-#{ options[:size] }" if options[:size]
73
77
  end
@@ -14,13 +14,13 @@ 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
- # * +state+ - State of élement with symbol value:
17
+ # * +status+ - status of élement with symbol value:
18
18
  # (+:primary+, +:secondary+, +:info+, +:warning+, +:danger+)
19
19
  # * +size+
20
20
  # (+:xs+, +:sm+, +:lg+)
21
21
  # * +url+ - String url
22
22
  # * +outline+ - Boolean
23
- # * +status+ - Symbol (+:active+, +:disabled)
23
+ # * +state+ - Symbol (+:active+, +:disabled)
24
24
  # * +type+ - Symbol (+:block)
25
25
  # * +glyph+ - Add glyph with name or hash options
26
26
  # * +name+ - String
@@ -14,12 +14,12 @@ 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
- # * +state+ - State of élement with symbol value:
17
+ # * +status+ - status of élement with symbol value:
18
18
  # (+:primary+, +:secondary+, +:info+, +:warning+, +:danger+)
19
19
  # * +size+
20
20
  # (+:xs+, +:sm+, +:lg+)
21
21
  # * +outline+ - Boolean
22
- # * +status+ - Symbol (+:active+, +:disabled)
22
+ # * +state+ - Symbol (+:active+, +:disabled)
23
23
  # * +type+ - Symbol (+:block)
24
24
  # * +glyph+ - Add glyph with name or hash options
25
25
  # * +name+ - String
@@ -37,7 +37,7 @@ module UiBibz::Ui::Core
37
37
  #
38
38
  # ==== Examples
39
39
  #
40
- # UiBibz::Ui::Core::ButtonSplitDropdown.new(name, state: :success).tap do |d|
40
+ # UiBibz::Ui::Core::ButtonSplitDropdown.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 })
@@ -80,11 +80,11 @@ module UiBibz::Ui::Core
80
80
  end
81
81
 
82
82
  def button_html
83
- content_tag :button, button_content, class: join_classes("btn", button_state, size)
83
+ content_tag :button, button_content, class: join_classes("btn", button_status, size)
84
84
  end
85
85
 
86
86
  def split_html
87
- content_tag :button, split_content, class: join_classes("btn", button_state, size, "dropdown-toggle"), type: 'button', "data-toggle" => 'dropdown', "aria-haspopup" => true, "aria-expanded" => false
87
+ content_tag :button, split_content, class: join_classes("btn", button_status, size, "dropdown-toggle"), type: 'button', "data-toggle" => 'dropdown', "aria-haspopup" => true, "aria-expanded" => false
88
88
  end
89
89
 
90
90
  def split_content
@@ -20,7 +20,7 @@ module UiBibz::Ui::Core
20
20
  #
21
21
  # You can add HTML attributes using the +html_options+.
22
22
  # You can pass arguments in options attribute:
23
- # * +state+ - State of élement with symbol value:
23
+ # * +status+ - status of élement with symbol value:
24
24
  # (+:primary+, +:secondary+, +:info+, +:warning+, +:danger+)
25
25
  # * text_position - Symbole
26
26
  # (+:left+, +:right+, +:center+)
@@ -46,7 +46,7 @@ module UiBibz::Ui::Core
46
46
  #
47
47
  # UiBibz::Ui::Core::Card('test').render
48
48
  #
49
- # UiBibz::Ui::Core::Card(state: :primary) do |d|
49
+ # UiBibz::Ui::Core::Card(status: :primary) do |d|
50
50
  # 'test'
51
51
  # end.render
52
52
  #
@@ -134,8 +134,8 @@ module UiBibz::Ui::Core
134
134
  ["card", text_position, card_block, type, tab_pane]
135
135
  end
136
136
 
137
- def state
138
- "card-#{ @options[:state] }" unless @options[:state].nil?
137
+ def status
138
+ "card-#{ @options[:status] }" unless @options[:status].nil?
139
139
  end
140
140
 
141
141
  def text_position
@@ -38,7 +38,7 @@ module UiBibz::Ui::Core
38
38
 
39
39
  # Render html tag
40
40
  def render
41
- content_tag :p, content, html_options
41
+ content_tag :p, content.html_safe, html_options
42
42
  end
43
43
 
44
44
  private
@@ -13,7 +13,7 @@ module UiBibz::Ui::Core
13
13
  #
14
14
  # You can add HTML attributes using the +html_options+.
15
15
  # You can pass arguments in options attribute:
16
- # * +state+ - State of élement with symbol value:
16
+ # * +status+ - status of élement with symbol value:
17
17
  # (+:default+, +:primary+, +:info+, +:warning+, +:danger+)
18
18
  # * +glyph+ - Add glyph with name or hash options
19
19
  # * +name+ - String
@@ -85,7 +85,7 @@ module UiBibz::Ui::Core
85
85
  end
86
86
 
87
87
  def label_html
88
- UiBibz::Ui::Core::Label.new(options[:label], class: 'pull-right', type: :pill, state: (options[:label_state] || :default)).render
88
+ UiBibz::Ui::Core::Label.new(options[:label], class: 'pull-right', type: :pill, status: (options[:label_status] || :default)).render
89
89
  end
90
90
 
91
91
  # Know if component is tapped or not
@@ -116,8 +116,8 @@ module UiBibz::Ui::Core
116
116
  {}
117
117
  end
118
118
 
119
- # Override this method to add a state class
120
- def state
119
+ # Override this method to add a status class
120
+ def status
121
121
  end
122
122
 
123
123
  # Join classes
@@ -138,8 +138,8 @@ module UiBibz::Ui::Core
138
138
  def initialize_component_html_classes
139
139
  cls = [
140
140
  html_options[:class],
141
- status,
142
141
  state,
142
+ status,
143
143
  effect,
144
144
  options_classes,
145
145
  component_html_classes
@@ -174,8 +174,8 @@ module UiBibz::Ui::Core
174
174
  initialize_component_html_options
175
175
  end
176
176
 
177
- def status
178
- options[:status] unless options[:status].nil?
177
+ def state
178
+ options[:state] unless options[:state].nil?
179
179
  end
180
180
 
181
181
  end
@@ -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
- # * +status+ - State of élement with symbol value:
17
+ # * +state+ - status of élement with symbol value:
18
18
  # (+:active+)
19
19
  # * +url+ - String
20
20
  # * +glyph+ - Add glyph with name or hash options
@@ -33,7 +33,7 @@ module UiBibz::Ui::Core
33
33
  #
34
34
  # ==== Examples
35
35
  #
36
- # UiBibz::Ui::Core::DropdownLink.new('Home', { glyph: 'home', status: :active, url: '#home', link_html_options: { class: 'link1' }},{ class: 'test' }).render
36
+ # UiBibz::Ui::Core::DropdownLink.new('Home', { glyph: 'home', state: :active, url: '#home', link_html_options: { class: 'link1' }},{ class: 'test' }).render
37
37
  #
38
38
  # UiBibz::Ui::Core::DropdownLink.new({ glyph: { name: 'eye', size: 3 }, url: '#home' }, { class: 'test' }) do
39
39
  # 'Home'
@@ -18,7 +18,7 @@ module UiBibz::Ui::Core
18
18
  #
19
19
  # You can add HTML attributes using the +html_options+.
20
20
  # You can pass arguments in options attribute:
21
- # * +state+ - State of élement with symbol value:
21
+ # * +status+ - status of élement with symbol value:
22
22
  # (+:primary+, +:secondary+, +:info+, +:warning+, +:danger+)
23
23
  # * +size+
24
24
  # (+:xs+, +:sm+, +:lg+)
@@ -39,7 +39,7 @@ module UiBibz::Ui::Core
39
39
  #
40
40
  # ==== Examples
41
41
  #
42
- # UiBibz::Ui::Core::Dropdown.new(name, state: :success).tap do |d|
42
+ # UiBibz::Ui::Core::Dropdown.new(name, status: :success).tap do |d|
43
43
  # d.link 'test', { url: '#' }
44
44
  # d.divider
45
45
  # d.header 'Header 1'
@@ -65,7 +65,7 @@ module UiBibz::Ui::Core
65
65
  def initialize content, options = nil, html_options = nil, &block
66
66
  super
67
67
  @items = []
68
- @state = @options.delete(:state)
68
+ @status = @options.delete(:status)
69
69
  end
70
70
 
71
71
  # Render html tag
@@ -110,7 +110,7 @@ module UiBibz::Ui::Core
110
110
  end
111
111
 
112
112
  def button_html
113
- content_tag :button, button_content, class: join_classes("btn", button_state, size, "dropdown-toggle"), type: 'button', "data-toggle" => 'dropdown', "aria-haspopup" => true, "aria-expanded" => false
113
+ content_tag :button, button_content, class: join_classes("btn", button_status, size, "dropdown-toggle"), type: 'button', "data-toggle" => 'dropdown', "aria-haspopup" => true, "aria-expanded" => false
114
114
  end
115
115
 
116
116
  def ul_html
@@ -133,8 +133,8 @@ module UiBibz::Ui::Core
133
133
  "open" if @options[:open]
134
134
  end
135
135
 
136
- def button_state
137
- sym = @state || :primary
136
+ def button_status
137
+ sym = @status || :primary
138
138
  "btn-#{ sym }"
139
139
  end
140
140