ui_bibz 3.0.0.alpha11 → 3.0.0.beta4

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 (52) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -0
  3. data/.github/workflows/ci.yml +28 -0
  4. data/.github/workflows/linter.yml +16 -0
  5. data/Gemfile.lock +36 -34
  6. data/README.md +9 -9
  7. data/lib/ui_bibz/infos.rb +3 -3
  8. data/lib/ui_bibz/ui/concerns/html_concern.rb +8 -2
  9. data/lib/ui_bibz/ui/core/boxes/components/card_body.rb +1 -1
  10. data/lib/ui_bibz/ui/core/forms/buttons/button.rb +4 -4
  11. data/lib/ui_bibz/ui/core/forms/buttons/button_link.rb +1 -1
  12. data/lib/ui_bibz/ui/core/forms/dropdowns/dropdown.rb +26 -6
  13. data/lib/ui_bibz/ui/core/forms/dropdowns/split_dropdown.rb +1 -1
  14. data/lib/ui_bibz/ui/core/forms/numbers/formula_field.rb +1 -1
  15. data/lib/ui_bibz/ui/core/forms/selects/dropdown_select_field.rb +6 -0
  16. data/lib/ui_bibz/ui/core/lists/list_group.rb +1 -1
  17. data/lib/ui_bibz/ui/core/navigations/components/nav_dropdown.rb +1 -1
  18. data/lib/ui_bibz/ui/core/navigations/components/nav_link_link.rb +1 -1
  19. data/lib/ui_bibz/ui/core/navigations/components/nav_link_span.rb +1 -1
  20. data/lib/ui_bibz/ui/core/navigations/components/nav_text.rb +1 -1
  21. data/lib/ui_bibz/ui/core/navigations/link.rb +1 -1
  22. data/lib/ui_bibz/ui/core/navigations/nav.rb +1 -1
  23. data/lib/ui_bibz/ui/core/navigations/navbar.rb +2 -2
  24. data/lib/ui_bibz/ui/core/navigations/toolbar.rb +1 -1
  25. data/lib/ui_bibz/ui/core/notifications/components/alert_header.rb +1 -1
  26. data/lib/ui_bibz/ui/core/notifications/components/toast_header.rb +5 -5
  27. data/lib/ui_bibz/ui/core/notifications/toast.rb +1 -1
  28. data/lib/ui_bibz/ui/core/windows/components/modal_header.rb +1 -1
  29. data/lib/ui_bibz/ui/core/windows/modal.rb +2 -2
  30. data/lib/ui_bibz/ui/extensions/core/component/popover_extension.rb +6 -6
  31. data/test/simple_form_test.rb +1 -1
  32. data/test/ui/core/boxes/card_test.rb +1 -1
  33. data/test/ui/core/forms/buttons/button_group_test.rb +1 -1
  34. data/test/ui/core/forms/buttons/button_link_test.rb +1 -1
  35. data/test/ui/core/forms/buttons/button_test.rb +6 -6
  36. data/test/ui/core/forms/dropdowns/dropdown_test.rb +5 -5
  37. data/test/ui/core/forms/numbers/formula_field_test.rb +1 -1
  38. data/test/ui/core/forms/surrounds/surround_field_test.rb +1 -1
  39. data/test/ui/core/lists/list_group_test.rb +1 -1
  40. data/test/ui/core/navigations/link_test.rb +1 -1
  41. data/test/ui/core/navigations/nav_test.rb +2 -2
  42. data/test/ui/core/navigations/navbar_test.rb +4 -4
  43. data/test/ui/core/navigations/tab_group_test.rb +5 -5
  44. data/test/ui/core/navigations/toolbar_test.rb +1 -1
  45. data/test/ui/core/notifications/alert_test.rb +1 -1
  46. data/test/ui/core/notifications/spinner_test.rb +1 -1
  47. data/test/ui/core/notifications/toast_test.rb +1 -1
  48. data/test/ui/core/windows/modal_test.rb +2 -2
  49. data/test/ui/ux/containers/panel_test.rb +4 -4
  50. data/ui_bibz.gemspec +3 -3
  51. metadata +23 -22
  52. data/.github/workflows/ruby.yml +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14f3630b3e813fbac60b0a3e5a7651a09a507dd3dee4a0e252288a7baa3728e2
4
- data.tar.gz: b9baafb65a65cc12b9e1d57c4fec819f01a6b36cd1e6865c9d26a4a8a5fac155
3
+ metadata.gz: 5300f28d5fdd1d204c7adfed1207777aa8f83c67fb32203e6001dfdb2f9a3002
4
+ data.tar.gz: a4affc8a269893054ce90c95cba723d1218f7d499b96d622863805508401829d
5
5
  SHA512:
6
- metadata.gz: 890d5d75f44d9e31753f5928ffac99386adbf43ed95ad0cc452edf6b492aa3e6cc5de07186c62923ac091de30b759c191872b62d76eebffbf50c5630f7317297
7
- data.tar.gz: 41bf57292c76239790786809649dd5d8bb83220b20789976b1af1c4d5332f210335448de36dce170d3610c86c93529af3816c352b57ba9f9ec73d7de95afa561
6
+ metadata.gz: d9cb54b958e0d5aa9c2b40f563bc928f849929aca5699e68fed6ad3f0fef3196b55a55e3ab5c016333c1ad0a6c5459de17937073e41110dbeccb750f9741c632
7
+ data.tar.gz: 7812ada57679fdac3aea525df95e72fa6b4a3cdde631cfacb2d3a21b646999fac8dae7c16c8d560664c75fb5bda317e35a9415edb7cf614ed39bd52c54846f04
@@ -2,3 +2,4 @@
2
2
 
3
3
  github: thooams
4
4
  patreon: user?u=8672183
5
+ liberapay: thooams
@@ -0,0 +1,28 @@
1
+ name: CI
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v2
12
+
13
+ - name: Set up Ruby with .ruby-version file
14
+ uses: ruby/setup-ruby@v1
15
+ with:
16
+ bundler-cache: true
17
+
18
+ - name: Install gems
19
+ run: |
20
+ gem install bundler
21
+ bundle install --jobs 4 --retry 3
22
+
23
+ - name: Test with Rake
24
+ uses: paambaati/codeclimate-action@v2.7.5
25
+ env:
26
+ CC_TEST_REPORTER_ID: 7e50558afc7a861280e3194a765a159e9ea5bdd22d2ebe6c13e5e23fe914c66b
27
+ with:
28
+ coverageCommand: bundle exec rake
@@ -0,0 +1,16 @@
1
+ name: Linter
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v2
12
+
13
+ - name: Rubocop linter
14
+ uses: thooams/rubocop-action@v1
15
+ env:
16
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,10 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (3.0.0.alpha11)
5
- rails (~> 6.0.3, >= 6.0.3.2)
4
+ ui_bibz (3.0.0.beta4)
6
5
  will-paginate-i18n
7
- will_paginate (~> 3.1.0)
6
+ will_paginate (~> 3.3.0)
8
7
  will_paginate-bootstrap4
9
8
 
10
9
  GEM
@@ -70,11 +69,9 @@ GEM
70
69
  builder (3.2.4)
71
70
  byebug (11.1.3)
72
71
  childprocess (4.0.0)
73
- codeclimate-test-reporter (1.0.7)
74
- simplecov
75
72
  concurrent-ruby (1.1.7)
76
73
  crass (1.0.6)
77
- docile (1.3.2)
74
+ docile (1.3.4)
78
75
  erubi (1.10.0)
79
76
  erubis (2.7.0)
80
77
  factory_bot (4.11.1)
@@ -84,7 +81,7 @@ GEM
84
81
  railties (>= 3.0.0)
85
82
  globalid (0.4.2)
86
83
  activesupport (>= 4.2.0)
87
- haml (5.2.0)
84
+ haml (5.2.1)
88
85
  temple (>= 0.8.0)
89
86
  tilt
90
87
  haml-rails (2.0.1)
@@ -98,14 +95,14 @@ GEM
98
95
  haml (>= 4.0, < 6)
99
96
  nokogiri (>= 1.6.0)
100
97
  ruby_parser (~> 3.5)
101
- i18n (1.8.5)
98
+ i18n (1.8.7)
102
99
  concurrent-ruby (~> 1.0)
103
100
  iniparse (1.5.0)
104
101
  jquery-rails (4.4.0)
105
102
  rails-dom-testing (>= 1, < 3)
106
103
  railties (>= 4.2.0)
107
104
  thor (>= 0.14, < 2.0)
108
- loofah (2.7.0)
105
+ loofah (2.8.0)
109
106
  crass (~> 1.0.2)
110
107
  nokogiri (>= 1.5.9)
111
108
  mail (2.7.1)
@@ -115,17 +112,19 @@ GEM
115
112
  method_source (1.0.0)
116
113
  mimemagic (0.3.5)
117
114
  mini_mime (1.0.2)
118
- mini_portile2 (2.4.0)
119
- minitest (5.14.2)
115
+ mini_portile2 (2.5.0)
116
+ minitest (5.14.3)
120
117
  nio4r (2.5.4)
121
- nokogiri (1.10.10)
122
- mini_portile2 (~> 2.4.0)
118
+ nokogiri (1.11.1)
119
+ mini_portile2 (~> 2.5.0)
120
+ racc (~> 1.4)
123
121
  overcommit (0.57.0)
124
122
  childprocess (>= 0.6.3, < 5)
125
123
  iniparse (~> 1.4)
126
124
  parallel (1.20.1)
127
- parser (2.7.2.0)
125
+ parser (3.0.0.0)
128
126
  ast (~> 2.4.1)
127
+ racc (1.5.2)
129
128
  rack (2.2.3)
130
129
  rack-test (1.1.0)
131
130
  rack (>= 1.0, < 3)
@@ -156,40 +155,42 @@ GEM
156
155
  rake (>= 0.8.7)
157
156
  thor (>= 0.20.3, < 2.0)
158
157
  rainbow (3.0.0)
159
- rake (13.0.1)
160
- regexp_parser (1.8.2)
158
+ rake (13.0.3)
159
+ regexp_parser (2.0.3)
161
160
  rexml (3.2.4)
162
- rubocop (1.4.2)
161
+ rubocop (1.8.0)
163
162
  parallel (~> 1.10)
164
- parser (>= 2.7.1.5)
163
+ parser (>= 3.0.0.0)
165
164
  rainbow (>= 2.2.2, < 4.0)
166
- regexp_parser (>= 1.8)
165
+ regexp_parser (>= 1.8, < 3.0)
167
166
  rexml
168
- rubocop-ast (>= 1.1.1)
167
+ rubocop-ast (>= 1.2.0, < 2.0)
169
168
  ruby-progressbar (~> 1.7)
170
- unicode-display_width (>= 1.4.0, < 2.0)
171
- rubocop-ast (1.2.0)
169
+ unicode-display_width (>= 1.4.0, < 3.0)
170
+ rubocop-ast (1.4.0)
172
171
  parser (>= 2.7.1.5)
173
- rubocop-minitest (0.10.1)
174
- rubocop (>= 0.87)
175
- rubocop-performance (1.9.0)
172
+ rubocop-minitest (0.10.2)
173
+ rubocop (>= 0.87, < 2.0)
174
+ rubocop-performance (1.9.2)
176
175
  rubocop (>= 0.90.0, < 2.0)
177
176
  rubocop-ast (>= 0.4.0)
178
- rubocop-rails (2.8.1)
177
+ rubocop-rails (2.9.1)
179
178
  activesupport (>= 4.2.0)
180
179
  rack (>= 1.1)
181
- rubocop (>= 0.87.0)
182
- ruby-progressbar (1.10.1)
180
+ rubocop (>= 0.90.0, < 2.0)
181
+ ruby-progressbar (1.11.0)
183
182
  ruby_parser (3.15.0)
184
183
  sexp_processor (~> 4.9)
185
184
  sexp_processor (4.15.1)
186
185
  simple_form (5.0.3)
187
186
  actionpack (>= 5.0)
188
187
  activemodel (>= 5.0)
189
- simplecov (0.19.1)
188
+ simplecov (0.21.1)
190
189
  docile (~> 1.1)
191
190
  simplecov-html (~> 0.11)
191
+ simplecov_json_formatter (~> 0.1)
192
192
  simplecov-html (0.12.3)
193
+ simplecov_json_formatter (0.1.2)
193
194
  sprockets (4.0.2)
194
195
  concurrent-ruby (~> 1.0)
195
196
  rack (> 1, < 3)
@@ -202,17 +203,17 @@ GEM
202
203
  thor (1.0.1)
203
204
  thread_safe (0.3.6)
204
205
  tilt (2.0.10)
205
- tzinfo (1.2.8)
206
+ tzinfo (1.2.9)
206
207
  thread_safe (~> 0.1)
207
- unicode-display_width (1.7.0)
208
+ unicode-display_width (2.0.0)
208
209
  websocket-driver (0.7.3)
209
210
  websocket-extensions (>= 0.1.0)
210
211
  websocket-extensions (0.1.5)
211
212
  will-paginate-i18n (0.1.15)
212
- will_paginate (3.1.8)
213
+ will_paginate (3.3.0)
213
214
  will_paginate-bootstrap4 (0.2.2)
214
215
  will_paginate (~> 3.0, >= 3.0.0)
215
- zeitwerk (2.4.1)
216
+ zeitwerk (2.4.2)
216
217
 
217
218
  PLATFORMS
218
219
  ruby
@@ -220,13 +221,14 @@ PLATFORMS
220
221
  DEPENDENCIES
221
222
  awesome_print
222
223
  byebug
223
- codeclimate-test-reporter
224
224
  factory_bot_rails (~> 4.0)
225
225
  haml-rails
226
226
  jquery-rails (>= 3.1.0)
227
227
  minitest
228
228
  overcommit
229
+ rails (~> 6.0.3, >= 6.0.3.2)
229
230
  rubocop
231
+ rubocop-ast
230
232
  rubocop-minitest
231
233
  rubocop-performance
232
234
  rubocop-rails
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  ![Ui Bibz logo](https://repository-images.githubusercontent.com/29547689/e29b2180-0d59-11eb-89f3-4541571d7c67)
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/ui_bibz.svg)](http://badge.fury.io/rb/ui_bibz)
4
- [![Build Status](https://travis-ci.org/thooams/Ui-Bibz.svg)](https://travis-ci.org/thooams/Ui-Bibz)
5
- [![Code Climate](https://codeclimate.com/github/thooams/Ui-Bibz/badges/gpa.svg)](https://codeclimate.com/github/thooams/Ui-Bibz)
6
- [![Test Coverage](https://codeclimate.com/github/thooams/Ui-Bibz/badges/coverage.svg)](https://codeclimate.com/github/thooams/Ui-Bibz)
7
- [![Inline docs](http://inch-ci.org/github/thooams/Ui-Bibz.svg?branch=master)](http://inch-ci.org/github/thooams/Ui-Bibz)
8
- [![security](https://hakiri.io/github/thooams/Ui-Bibz/master.svg)](https://hakiri.io/github/thooams/Ui-Bibz/master)
9
- ![Ruby](https://github.com/thooams/Ui-Bibz/workflows/Ruby/badge.svg)
3
+ [![Gem Version](https://badge.fury.io/rb/ui_bibz.svg)](https://badge.fury.io/rb/ui_bibz)
4
+ [![Maintainability](https://api.codeclimate.com/v1/badges/cfbe9828c32d69581534/maintainability)](https://codeclimate.com/github/thooams/ui_bibz/maintainability)
5
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/cfbe9828c32d69581534/test_coverage)](https://codeclimate.com/github/thooams/ui_bibz/test_coverage)
6
+ [![security](https://hakiri.io/github/thooams/ui_bibz/main.svg)](https://hakiri.io/github/thooams/ui_bibz/main)
7
+ [![Ci](https://github.com/thooams/ui_bibz/workflows/CI/badge.svg)](https://github.com/thooams/ui_bibz/actions)
8
+ [![Linter](https://github.com/thooams/chart_bibz/workflows/Linter/badge.svg)](https://github.com/thooams/chart_bibz/actions)
9
+ [![Inline docs](http://inch-ci.org/github/thooams/ui_bibz.svg?branch=main)](http://inch-ci.org/github/thooams/ui_bibz)
10
10
 
11
11
  This project rocks and uses MIT-LICENSE.
12
12
 
@@ -19,10 +19,10 @@ Ui Bibz load [Bootstrap](http://getbootstrap.com/) and [Font Awesome](http://fon
19
19
 
20
20
  ## Documentation
21
21
  Full documentation is here with bootstrap 5:
22
- [Ui Bibz v3](http://hummel.link/Ui-Bibz/)
22
+ [Ui Bibz v3](http://hummel.link/ui-bibz/)
23
23
 
24
24
  Older documentation is here with bootstrap 4:
25
- [Ui Bibz v2.5](http://hummel.link/Ui-Bibz/docs/v2.5/)
25
+ [Ui Bibz v2.5](http://hummel.link/ui-bibz/docs/v2.5/)
26
26
 
27
27
 
28
28
  ## Donate
@@ -3,15 +3,15 @@
3
3
  module UiBibz
4
4
  NAME = 'Ui Bibz'
5
5
  SLUG = 'ui_bibz'
6
- BOOTSTRAP_VERSION = '5.0.0.alpha3'
6
+ BOOTSTRAP_VERSION = '5.0.0.beta1'
7
7
  DESCRIPTION = "A Rails Interface Framework using Bootstrap #{BOOTSTRAP_VERSION}."
8
8
  SUMMARY = "Ui Bibz is an Ui Framework that allows you to build an interface very quickly and simply using Bootstrap #{BOOTSTRAP_VERSION}."
9
9
  LICENSE = 'MIT'
10
10
  FONTAWESOME_VERSION = '5.15.1'
11
11
  HOMEPAGE = 'https://hummel.link/ui-bibz/'
12
- REPO = 'git+https://github.com/thooams/Ui-Bibz.git'
12
+ REPO = 'git+https://github.com/thooams/ui_bibz.git'
13
13
  EMAIL = 'thomas@hummel.link'
14
14
  AUTHOR = 'Thooams [Thomas HUMMEL]'
15
- VERSION = '3.0.0.alpha11'
15
+ VERSION = '3.0.0.beta4'
16
16
  AUTHORS = ['Thooams'].freeze
17
17
  end
@@ -6,11 +6,17 @@ module UiBibz::Ui::Concerns::HtmlConcern #:nodoc:
6
6
  included do
7
7
  def html(content = nil, &block)
8
8
  if block.nil?
9
- @items << content
9
+ @items << RenderString.new(content)
10
10
  else
11
11
  context = eval('self', block.binding) # rubocop:disable Style/EvalWithLocation
12
- @items << context.capture(&block)
12
+ @items << RenderString.new(context.capture(&block))
13
13
  end
14
14
  end
15
15
  end
16
16
  end
17
+
18
+ class RenderString < SimpleDelegator
19
+ def render
20
+ self
21
+ end
22
+ end
@@ -46,7 +46,7 @@ module UiBibz::Ui::Core::Boxes::Components
46
46
  # Render html tag
47
47
  def pre_render
48
48
  if options[:collapse]
49
- content_tag :div, class: join_classes('collapse', show), id: options[:collapse], "data-parent": "##{options[:parent_collapse]}" do
49
+ content_tag :div, class: join_classes('collapse', show), id: options[:collapse], "data-bs-parent": "##{options[:parent_collapse]}" do
50
50
  content_tag :div, @items.join.html_safe, html_options
51
51
  end
52
52
  else
@@ -83,8 +83,8 @@ module UiBibz::Ui::Core::Forms::Buttons
83
83
  def collapse
84
84
  # Must be flat hash not deep hash
85
85
  {
86
- "data-toggle": :collapse,
87
- "data-target": "##{options[:collapse]}",
86
+ "data-bs-toggle": :collapse,
87
+ "data-bs-target": "##{options[:collapse]}",
88
88
  "aria-controls": options[:collapse],
89
89
  "aria-expanded": options[:expand_collapse].nil? ? false : options[:expand_collapse]
90
90
  }
@@ -99,7 +99,7 @@ module UiBibz::Ui::Core::Forms::Buttons
99
99
  end
100
100
 
101
101
  def toggle
102
- { 'data-toggle' => 'button', 'aria-pressed' => false, 'autocomplete' => 'off' }
102
+ { 'data-bs-toggle' => 'button', 'aria-pressed' => false, 'autocomplete' => 'off' }
103
103
  end
104
104
 
105
105
  def active_html_options
@@ -121,7 +121,7 @@ module UiBibz::Ui::Core::Forms::Buttons
121
121
  end
122
122
 
123
123
  def spinner_html
124
- opts = { size: :sm, tag: :span, class: options[:text] == false ? nil : 'mr-2' }
124
+ opts = { size: :sm, tag: :span, class: options[:text] == false ? nil : 'me-2' }
125
125
  opts = opts.merge(options[:spinner]) if options[:spinner].is_a? Hash
126
126
 
127
127
  UiBibz::Ui::Core::Notifications::Spinner.new(nil, opts).render
@@ -78,7 +78,7 @@ module UiBibz::Ui::Core::Forms::Buttons
78
78
  def collapse
79
79
  # Must be flat hash not deep hash
80
80
  {
81
- "data-toggle": :collapse,
81
+ "data-bs-toggle": :collapse,
82
82
  "aria-controls": options[:collapse],
83
83
  "aria-expanded": options[:expand_collaspe].nil? ? false : options[:expand_collaspe]
84
84
  }
@@ -21,16 +21,18 @@ module UiBibz::Ui::Core::Forms::Dropdowns
21
21
  # * +status+ - status of element with symbol value:
22
22
  # (+:primary+, +:secondary+, +:info+, +:warning+, +:danger+)
23
23
  # * +size+
24
+ # * +open+ - Boolean
24
25
  # (+:xs+, +:sm+, +:lg+)
25
26
  # * +glyph+ - Add glyph with name or hash options
26
27
  # * +name+ - String
27
28
  # * +size+ - Integer
28
29
  # * +type+ - Symbol
29
30
  # * +html_button+ - Hash
31
+ # * +theme+ - Symbol, defaut: +:dark+
30
32
  # * +position+ - Symbol
31
33
  # (+:up+, +:right+, +:down+, +:left+)
32
- # * +alignment+ - Symbol
33
- # (+:right)
34
+ # * +alignment+ - Symbol/Hash - eq. { direction: :start, size: :lg }
35
+ # (+:left+, +:right+, +:start+, +:end+)
34
36
  #
35
37
  # ==== Signatures
36
38
  #
@@ -117,9 +119,9 @@ module UiBibz::Ui::Core::Forms::Dropdowns
117
119
  def button_html
118
120
  html_button = options[:html_button] || {}
119
121
  if options[:tag] == :a
120
- content_tag dropdown_tag, button_content, { class: join_classes('btn', button_status, state, size, 'dropdown-toggle'), role: 'button', 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false, 'id' => id }.merge(html_button)
122
+ content_tag dropdown_tag, button_content, { class: join_classes('btn', button_status, state, size, 'dropdown-toggle'), role: 'button', 'data-bs-toggle' => 'dropdown', 'aria-expanded' => false, 'id' => id }.merge(html_button)
121
123
  else
122
- content_tag dropdown_tag, button_content, { class: join_classes('btn', button_status, state, size, 'dropdown-toggle'), type: 'button', 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false, 'id' => id }.merge(html_button)
124
+ content_tag dropdown_tag, button_content, { class: join_classes('btn', button_status, state, size, 'dropdown-toggle'), type: 'button', 'data-bs-toggle' => 'dropdown', 'aria-expanded' => false, 'id' => id }.merge(html_button)
123
125
  end
124
126
  end
125
127
 
@@ -132,11 +134,17 @@ module UiBibz::Ui::Core::Forms::Dropdowns
132
134
  end
133
135
 
134
136
  def alignment
135
- "dropdown-menu-#{@options[:alignment]}" unless @options[:alignment].nil?
137
+ return nil if @options[:alignment].nil?
138
+
139
+ if @options[:alignment].is_a? Hash
140
+ ['dropdown-menu', @options[:alignment][:size], match_direction[@options[:alignment][:direction]]].join('-')
141
+ else
142
+ "dropdown-menu-#{match_direction[@options[:alignment]]}"
143
+ end
136
144
  end
137
145
 
138
146
  def position
139
- "drop#{@options[:position] || 'down'}"
147
+ "drop#{match_direction[@options[:position] || :down]}"
140
148
  end
141
149
 
142
150
  def open
@@ -171,5 +179,17 @@ module UiBibz::Ui::Core::Forms::Dropdowns
171
179
  def theme
172
180
  'dropdown-menu-dark' if @options[:theme]
173
181
  end
182
+
183
+ # Match end and start directions
184
+ def match_direction
185
+ {
186
+ up: 'up',
187
+ right: 'end',
188
+ down: 'down',
189
+ left: 'start',
190
+ start: 'start',
191
+ end: 'end'
192
+ }.with_indifferent_access
193
+ end
174
194
  end
175
195
  end
@@ -78,7 +78,7 @@ module UiBibz::Ui::Core::Forms::Dropdowns
78
78
 
79
79
  def split_html
80
80
  content_tag :button, split_content, class: split_classes, type: 'button',
81
- 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false
81
+ 'data-bs-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false
82
82
  end
83
83
 
84
84
  def split_content
@@ -53,7 +53,7 @@ module UiBibz::Ui::Core::Forms::Numbers
53
53
  sf.text_field formula_field_name, nil, text_field_formula_html_options
54
54
  sf.addon '=', class: 'formula-field-sign'
55
55
  sf.text_field content, nil, text_field_input_html_options
56
- sf.addon formula_field_alert_glyph, { class: 'formula-field-alert' }, { data: { toggle: 'tooltip' } }
56
+ sf.addon formula_field_alert_glyph, { class: 'formula-field-alert' }, { data: { "bs-toggle": 'tooltip' } }
57
57
  sf.addon @options[:prepend] unless @options[:prepend].nil?
58
58
  end.render
59
59
  end
@@ -25,7 +25,13 @@ module UiBibz::Ui::Core::Forms::Selects
25
25
  # * +searchable+ - Boolean
26
26
  # * +select_all_option+ - Boolean
27
27
  # * +append+ - String, Html
28
+ # * +open+ - Boolean
29
+ # * +theme+ - Symbol, defaut: +:dark+
28
30
  # * +prepend+ - String, Html
31
+ # * +position+ - Symbol
32
+ # (+:up+, +:right+, +:down+, +:left+)
33
+ # * +alignment+ - Symbol
34
+ # (+:right)
29
35
  # * +connect+ - Hash
30
36
  # * +event+ - String
31
37
  # * +mode+ - String