ui_bibz 3.0.0.alpha8 → 3.0.0.beta1
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/.github/FUNDING.yml +1 -0
- data/Gemfile.lock +19 -16
- data/README.md +5 -1
- data/lib/ui_bibz/concerns/models/searchable.rb +1 -1
- data/lib/ui_bibz/infos.rb +4 -4
- data/lib/ui_bibz/inputs/ui_bibz_inputs/ui_text_field_input.rb +1 -1
- data/lib/ui_bibz/ui/concerns/html_concern.rb +8 -2
- data/lib/ui_bibz/ui/core/boxes/components/card_body.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/card_image.rb +5 -1
- data/lib/ui_bibz/ui/core/forms/buttons/button.rb +5 -14
- data/lib/ui_bibz/ui/core/forms/buttons/button_link.rb +2 -3
- data/lib/ui_bibz/ui/core/forms/buttons/button_refresh.rb +0 -1
- data/lib/ui_bibz/ui/core/forms/dropdowns/dropdown.rb +5 -3
- data/lib/ui_bibz/ui/core/forms/dropdowns/split_dropdown.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/numbers/formula_field.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/numbers/slider_header.rb +2 -2
- data/lib/ui_bibz/ui/core/forms/selects/dropdown_select_field.rb +35 -5
- data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button.rb +1 -7
- data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_button_link.rb +1 -7
- data/lib/ui_bibz/ui/core/forms/surrounds/components/surround_dropdown.rb +5 -4
- data/lib/ui_bibz/ui/core/icons/glyph.rb +9 -1
- data/lib/ui_bibz/ui/core/lists/list_group.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/components/nav_dropdown.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/components/nav_link_link.rb +2 -2
- data/lib/ui_bibz/ui/core/navigations/components/nav_link_span.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/components/nav_text.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/link.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/nav.rb +3 -3
- data/lib/ui_bibz/ui/core/navigations/navbar.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/tab_group.rb +5 -1
- data/lib/ui_bibz/ui/core/notifications/components/alert_header.rb +1 -1
- data/lib/ui_bibz/ui/core/notifications/components/toast_header.rb +16 -2
- data/lib/ui_bibz/ui/core/notifications/toast.rb +1 -1
- data/lib/ui_bibz/ui/core/windows/components/modal_header.rb +1 -1
- data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +9 -24
- data/lib/ui_bibz/ui/extensions/core/component/popover_extension.rb +7 -7
- data/lib/ui_bibz/ui/ux/tables/table_search_field.rb +1 -1
- data/test/simple_form_test.rb +5 -5
- data/test/ui/core/boxes/card_test.rb +2 -2
- data/test/ui/core/component_test.rb +2 -2
- data/test/ui/core/forms/buttons/button_group_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_link_test.rb +2 -9
- data/test/ui/core/forms/buttons/button_refresh_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_test.rb +8 -15
- data/test/ui/core/forms/choices/choice_group_test.rb +3 -3
- data/test/ui/core/forms/dropdowns/dropdown_test.rb +5 -5
- data/test/ui/core/forms/numbers/formula_field_test.rb +1 -1
- data/test/ui/core/forms/selects/multi_select_field_test.rb +3 -3
- data/test/ui/core/forms/selects/select_field_test.rb +1 -1
- data/test/ui/core/forms/surrounds/surround_field_test.rb +2 -2
- data/test/ui/core/forms/texts/auto_complete_field_test.rb +2 -2
- data/test/ui/core/lists/list_group_test.rb +1 -1
- data/test/ui/core/navigations/breadcrumb_test.rb +1 -1
- data/test/ui/core/navigations/link_test.rb +2 -2
- data/test/ui/core/navigations/nav_test.rb +2 -2
- data/test/ui/core/navigations/navbar_test.rb +4 -4
- data/test/ui/core/navigations/tab_group_test.rb +5 -5
- data/test/ui/core/notifications/alert_test.rb +1 -1
- data/test/ui/core/notifications/badge_test.rb +2 -2
- data/test/ui/core/notifications/toast_test.rb +1 -1
- data/test/ui/core/windows/modal_test.rb +2 -2
- data/test/ui/ux/containers/panel_test.rb +1 -1
- data/test/ui/ux/tables/table_test.rb +2 -2
- data/ui_bibz.gemspec +2 -1
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3544e60743d8648b2a8de333dd96a07634b3f1fb9bbfccaba952de84d9ca6994
|
4
|
+
data.tar.gz: a2947ca18e876de943ddb9e2fbf0c10974675e9616544009a3c70387461780bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6212a007d91b4148e41c12675495b2ec319891372dfd295dfe05dda8dbceb54a6a2f12d2e40f6217230979a9496efeed70dd40593e1f7fad15e803be71f3ed7d
|
7
|
+
data.tar.gz: 3824dba1200411dbe45fa2503c351ea4f101dd1385bdb5ebf72c5c583ff9044b9a61093f4c471cb94a0e5e5d1075ff6a35796933232c5710fd7c10dc06136ca3
|
data/.github/FUNDING.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ui_bibz (3.0.0.
|
4
|
+
ui_bibz (3.0.0.beta1)
|
5
5
|
rails (~> 6.0.3, >= 6.0.3.2)
|
6
6
|
will-paginate-i18n
|
7
7
|
will_paginate (~> 3.1.0)
|
@@ -75,7 +75,7 @@ GEM
|
|
75
75
|
concurrent-ruby (1.1.7)
|
76
76
|
crass (1.0.6)
|
77
77
|
docile (1.3.2)
|
78
|
-
erubi (1.
|
78
|
+
erubi (1.10.0)
|
79
79
|
erubis (2.7.0)
|
80
80
|
factory_bot (4.11.1)
|
81
81
|
activesupport (>= 3.0.0)
|
@@ -84,7 +84,7 @@ GEM
|
|
84
84
|
railties (>= 3.0.0)
|
85
85
|
globalid (0.4.2)
|
86
86
|
activesupport (>= 4.2.0)
|
87
|
-
haml (5.2.
|
87
|
+
haml (5.2.1)
|
88
88
|
temple (>= 0.8.0)
|
89
89
|
tilt
|
90
90
|
haml-rails (2.0.1)
|
@@ -105,7 +105,7 @@ GEM
|
|
105
105
|
rails-dom-testing (>= 1, < 3)
|
106
106
|
railties (>= 4.2.0)
|
107
107
|
thor (>= 0.14, < 2.0)
|
108
|
-
loofah (2.
|
108
|
+
loofah (2.8.0)
|
109
109
|
crass (~> 1.0.2)
|
110
110
|
nokogiri (>= 1.5.9)
|
111
111
|
mail (2.7.1)
|
@@ -123,7 +123,7 @@ GEM
|
|
123
123
|
overcommit (0.57.0)
|
124
124
|
childprocess (>= 0.6.3, < 5)
|
125
125
|
iniparse (~> 1.4)
|
126
|
-
parallel (1.20.
|
126
|
+
parallel (1.20.1)
|
127
127
|
parser (2.7.2.0)
|
128
128
|
ast (~> 2.4.1)
|
129
129
|
rack (2.2.3)
|
@@ -157,28 +157,28 @@ GEM
|
|
157
157
|
thor (>= 0.20.3, < 2.0)
|
158
158
|
rainbow (3.0.0)
|
159
159
|
rake (13.0.1)
|
160
|
-
regexp_parser (
|
160
|
+
regexp_parser (2.0.0)
|
161
161
|
rexml (3.2.4)
|
162
|
-
rubocop (1.
|
162
|
+
rubocop (1.6.1)
|
163
163
|
parallel (~> 1.10)
|
164
164
|
parser (>= 2.7.1.5)
|
165
165
|
rainbow (>= 2.2.2, < 4.0)
|
166
|
-
regexp_parser (>= 1.8)
|
166
|
+
regexp_parser (>= 1.8, < 3.0)
|
167
167
|
rexml
|
168
|
-
rubocop-ast (>= 1.
|
168
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
169
169
|
ruby-progressbar (~> 1.7)
|
170
170
|
unicode-display_width (>= 1.4.0, < 2.0)
|
171
|
-
rubocop-ast (1.
|
171
|
+
rubocop-ast (1.3.0)
|
172
172
|
parser (>= 2.7.1.5)
|
173
173
|
rubocop-minitest (0.10.1)
|
174
174
|
rubocop (>= 0.87)
|
175
|
-
rubocop-performance (1.
|
176
|
-
rubocop (>= 0.
|
175
|
+
rubocop-performance (1.9.1)
|
176
|
+
rubocop (>= 0.90.0, < 2.0)
|
177
177
|
rubocop-ast (>= 0.4.0)
|
178
|
-
rubocop-rails (2.
|
178
|
+
rubocop-rails (2.9.0)
|
179
179
|
activesupport (>= 4.2.0)
|
180
180
|
rack (>= 1.1)
|
181
|
-
rubocop (>= 0.
|
181
|
+
rubocop (>= 0.90.0, < 2.0)
|
182
182
|
ruby-progressbar (1.10.1)
|
183
183
|
ruby_parser (3.15.0)
|
184
184
|
sexp_processor (~> 4.9)
|
@@ -186,10 +186,12 @@ GEM
|
|
186
186
|
simple_form (5.0.3)
|
187
187
|
actionpack (>= 5.0)
|
188
188
|
activemodel (>= 5.0)
|
189
|
-
simplecov (0.
|
189
|
+
simplecov (0.20.0)
|
190
190
|
docile (~> 1.1)
|
191
191
|
simplecov-html (~> 0.11)
|
192
|
+
simplecov_json_formatter (~> 0.1)
|
192
193
|
simplecov-html (0.12.3)
|
194
|
+
simplecov_json_formatter (0.1.2)
|
193
195
|
sprockets (4.0.2)
|
194
196
|
concurrent-ruby (~> 1.0)
|
195
197
|
rack (> 1, < 3)
|
@@ -212,7 +214,7 @@ GEM
|
|
212
214
|
will_paginate (3.1.8)
|
213
215
|
will_paginate-bootstrap4 (0.2.2)
|
214
216
|
will_paginate (~> 3.0, >= 3.0.0)
|
215
|
-
zeitwerk (2.4.
|
217
|
+
zeitwerk (2.4.2)
|
216
218
|
|
217
219
|
PLATFORMS
|
218
220
|
ruby
|
@@ -227,6 +229,7 @@ DEPENDENCIES
|
|
227
229
|
minitest
|
228
230
|
overcommit
|
229
231
|
rubocop
|
232
|
+
rubocop-ast
|
230
233
|
rubocop-minitest
|
231
234
|
rubocop-performance
|
232
235
|
rubocop-rails
|
data/README.md
CHANGED
@@ -19,7 +19,11 @@ 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/
|
22
|
+
[Ui Bibz v3](http://hummel.link/ui-bibz/)
|
23
23
|
|
24
24
|
Older documentation is here with bootstrap 4:
|
25
25
|
[Ui Bibz v2.5](http://hummel.link/Ui-Bibz/docs/v2.5/)
|
26
|
+
|
27
|
+
|
28
|
+
## Donate
|
29
|
+

|
@@ -110,7 +110,7 @@ module UiBibz::Concerns::Models::Searchable
|
|
110
110
|
search_patterns = @tmp_params[:search].strip.gsub(/(?<=[\\s])\\s*|^\\s+|\\s+$/, '').downcase
|
111
111
|
|
112
112
|
search_patterns_tmp = search_patterns.scan(/"(.*?)"/).flatten
|
113
|
-
search_patterns = search_patterns.gsub(/"(.*?)"/, '').split
|
113
|
+
search_patterns = search_patterns.gsub(/"(.*?)"/, '').split
|
114
114
|
search_patterns << search_patterns_tmp
|
115
115
|
|
116
116
|
search_patterns.flatten.each_with_index do |pattern, i|
|
data/lib/ui_bibz/infos.rb
CHANGED
@@ -3,15 +3,15 @@
|
|
3
3
|
module UiBibz
|
4
4
|
NAME = 'Ui Bibz'
|
5
5
|
SLUG = 'ui_bibz'
|
6
|
-
BOOTSTRAP_VERSION = '5.0.0.
|
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
|
-
HOMEPAGE = '
|
11
|
+
HOMEPAGE = 'https://hummel.link/ui-bibz/'
|
12
12
|
REPO = 'git+https://github.com/thooams/Ui-Bibz.git'
|
13
13
|
EMAIL = 'thomas@hummel.link'
|
14
|
-
AUTHOR = 'Thooams'
|
15
|
-
VERSION = '3.0.0.
|
14
|
+
AUTHOR = 'Thooams [Thomas HUMMEL]'
|
15
|
+
VERSION = '3.0.0.beta1'
|
16
16
|
AUTHORS = ['Thooams'].freeze
|
17
17
|
end
|
@@ -7,7 +7,7 @@ module UiBibzInputs
|
|
7
7
|
def input(wrapper_options)
|
8
8
|
unless string?
|
9
9
|
input_html_classes.unshift('string')
|
10
|
-
input_html_options[:type] ||= input_type if html5?
|
10
|
+
# input_html_options[:type] ||= input_type if html5?
|
11
11
|
end
|
12
12
|
|
13
13
|
merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)
|
@@ -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
|
@@ -38,7 +38,11 @@ module UiBibz::Ui::Core::Boxes::Components
|
|
38
38
|
# Render html tag
|
39
39
|
def pre_render
|
40
40
|
# image_tag content, html_options
|
41
|
-
|
41
|
+
if options[:pack]
|
42
|
+
image_pack_tag content, html_options
|
43
|
+
else
|
44
|
+
image_tag content, html_options
|
45
|
+
end
|
42
46
|
end
|
43
47
|
|
44
48
|
private
|
@@ -21,7 +21,6 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
21
21
|
# (+:xs+, +:sm+, +:lg+)
|
22
22
|
# * +outline+ - Boolean
|
23
23
|
# * +state+ - Symbol (+:active+, +:disabled)
|
24
|
-
# * +type+ - Symbol (+:outline)
|
25
24
|
# * +collapse+ - String
|
26
25
|
# * +expand_collaspe+ - Boolean
|
27
26
|
# * +glyph+ - Add glyph with name or hash options
|
@@ -63,13 +62,13 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
63
62
|
def button_html_tag
|
64
63
|
content_tag :button, html_options do
|
65
64
|
concat spinner_html unless options[:spinner].nil?
|
66
|
-
concat glyph_and_content_html(
|
65
|
+
concat glyph_and_content_html(@content)
|
67
66
|
concat badge_html unless options[:badge].nil?
|
68
67
|
end
|
69
68
|
end
|
70
69
|
|
71
70
|
def component_html_classes
|
72
|
-
super << ['btn', size
|
71
|
+
super << ['btn', size]
|
73
72
|
end
|
74
73
|
|
75
74
|
def component_html_options
|
@@ -84,8 +83,8 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
84
83
|
def collapse
|
85
84
|
# Must be flat hash not deep hash
|
86
85
|
{
|
87
|
-
"data-toggle": :collapse,
|
88
|
-
"data-target": "##{options[:collapse]}",
|
86
|
+
"data-bs-toggle": :collapse,
|
87
|
+
"data-bs-target": "##{options[:collapse]}",
|
89
88
|
"aria-controls": options[:collapse],
|
90
89
|
"aria-expanded": options[:expand_collapse].nil? ? false : options[:expand_collapse]
|
91
90
|
}
|
@@ -100,21 +99,13 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
100
99
|
end
|
101
100
|
|
102
101
|
def toggle
|
103
|
-
{ 'data-toggle' => 'button', 'aria-pressed' => false, 'autocomplete' => 'off' }
|
102
|
+
{ 'data-bs-toggle' => 'button', 'aria-pressed' => false, 'autocomplete' => 'off' }
|
104
103
|
end
|
105
104
|
|
106
105
|
def active_html_options
|
107
106
|
{ 'aria-pressed' => true }
|
108
107
|
end
|
109
108
|
|
110
|
-
def type
|
111
|
-
'btn-block' if options[:type] == :block
|
112
|
-
end
|
113
|
-
|
114
|
-
def without_text
|
115
|
-
'without-text' unless options[:text].nil?
|
116
|
-
end
|
117
|
-
|
118
109
|
def action
|
119
110
|
add_html_data('action', value: options[:action]) unless options[:action].nil?
|
120
111
|
end
|
@@ -22,7 +22,6 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
22
22
|
# * +url+ - String url
|
23
23
|
# * +outline+ - Boolean
|
24
24
|
# * +state+ - Symbol (+:active+, +:disabled)
|
25
|
-
# * +type+ - Symbol (+:block)
|
26
25
|
# * +glyph+ - Add glyph with name or hash options
|
27
26
|
# * +name+ - String
|
28
27
|
# * +size+ - Integer
|
@@ -63,7 +62,7 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
63
62
|
def button_link_html_tag
|
64
63
|
link_to link_url, html_options do
|
65
64
|
concat spinner_html unless options[:spinner].nil?
|
66
|
-
concat glyph_and_content_html(
|
65
|
+
concat glyph_and_content_html(@content)
|
67
66
|
concat badge_html unless options[:badge].nil?
|
68
67
|
end
|
69
68
|
end
|
@@ -79,7 +78,7 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
79
78
|
def collapse
|
80
79
|
# Must be flat hash not deep hash
|
81
80
|
{
|
82
|
-
"data-toggle": :collapse,
|
81
|
+
"data-bs-toggle": :collapse,
|
83
82
|
"aria-controls": options[:collapse],
|
84
83
|
"aria-expanded": options[:expand_collaspe].nil? ? false : options[:expand_collaspe]
|
85
84
|
}
|
@@ -20,7 +20,6 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
20
20
|
# (+:xs+, +:sm+, +:lg+)
|
21
21
|
# * +outline+ - Boolean
|
22
22
|
# * +state+ - Symbol (+:active+, +:disabled)
|
23
|
-
# * +type+ - Symbol (+:outline)
|
24
23
|
# * +glyph+ - Add glyph with name or hash options
|
25
24
|
# * +name+ - String
|
26
25
|
# * +size+ - Integer
|
@@ -21,12 +21,14 @@ 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
34
|
# * +alignment+ - Symbol
|
@@ -111,15 +113,15 @@ module UiBibz::Ui::Core::Forms::Dropdowns
|
|
111
113
|
end
|
112
114
|
|
113
115
|
def button_content
|
114
|
-
glyph_and_content_html(
|
116
|
+
glyph_and_content_html(@content)
|
115
117
|
end
|
116
118
|
|
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-haspopup' => true, '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-haspopup' => true, 'aria-expanded' => false, 'id' => id }.merge(html_button)
|
123
125
|
end
|
124
126
|
end
|
125
127
|
|
@@ -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
|
@@ -52,14 +52,14 @@ module UiBibz::Ui::Core::Forms::Numbers
|
|
52
52
|
|
53
53
|
def header_min
|
54
54
|
content_tag :div, class: 'slider-header-min' do
|
55
|
-
concat content_tag :label, options[:label_min] || 'Min: '
|
55
|
+
concat content_tag :label, options[:label_min] || 'Min: ', for: options[:label_for_min]
|
56
56
|
concat content_tag :span, options[:thumb_min], "data-unit": options[:unit] || options[:unit_min]
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
60
|
def header_max
|
61
61
|
content_tag :div, class: 'slider-header-max' do
|
62
|
-
concat content_tag :label, options[:label_max] || 'Max: '
|
62
|
+
concat content_tag :label, options[:label_max] || 'Max: ', for: options[:label_for_max]
|
63
63
|
concat content_tag :span, options[:thumb_max], "data-unit": options[:unit] || options[:unit_max]
|
64
64
|
end
|
65
65
|
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
|
@@ -69,7 +75,7 @@ module UiBibz::Ui::Core::Forms::Selects
|
|
69
75
|
end
|
70
76
|
|
71
77
|
def component_html_classes
|
72
|
-
[size, type, button_status, 'multi-select-field']
|
78
|
+
[open, size, type, button_status, 'multi-select-field']
|
73
79
|
end
|
74
80
|
|
75
81
|
def component_html_data
|
@@ -79,6 +85,8 @@ module UiBibz::Ui::Core::Forms::Selects
|
|
79
85
|
searchable
|
80
86
|
select_all_options
|
81
87
|
number_displayed
|
88
|
+
dropdown_menu_classes
|
89
|
+
dropdown_classes
|
82
90
|
end
|
83
91
|
|
84
92
|
def clickable_opt_group
|
@@ -101,6 +109,32 @@ module UiBibz::Ui::Core::Forms::Selects
|
|
101
109
|
add_html_data('include_select_all_option') if options[:select_all_options]
|
102
110
|
end
|
103
111
|
|
112
|
+
def dropdown_menu_classes
|
113
|
+
classes = join_classes(theme, alignment, open)
|
114
|
+
add_html_data('dropdown_menu_classes', value: classes.nil? ? nil : classes.join(' '))
|
115
|
+
end
|
116
|
+
|
117
|
+
def dropdown_classes
|
118
|
+
classes = join_classes(position, open)
|
119
|
+
add_html_data('dropdown_classes', value: classes.nil? ? nil : classes.join(' '))
|
120
|
+
end
|
121
|
+
|
122
|
+
def position
|
123
|
+
"drop#{@options[:position] || 'down'}"
|
124
|
+
end
|
125
|
+
|
126
|
+
def theme
|
127
|
+
'dropdown-menu-dark' if @options[:theme]
|
128
|
+
end
|
129
|
+
|
130
|
+
def open
|
131
|
+
'show' if @options[:open]
|
132
|
+
end
|
133
|
+
|
134
|
+
def alignment
|
135
|
+
"dropdown-menu-#{@options[:alignment]}" unless @options[:alignment].nil?
|
136
|
+
end
|
137
|
+
|
104
138
|
def type
|
105
139
|
'btn-block' if options[:type] == :block
|
106
140
|
end
|
@@ -117,9 +151,5 @@ module UiBibz::Ui::Core::Forms::Selects
|
|
117
151
|
def outline
|
118
152
|
'outline' if options[:outline]
|
119
153
|
end
|
120
|
-
|
121
|
-
def theme
|
122
|
-
'dropdown-menu-dark' if @options[:theme]
|
123
|
-
end
|
124
154
|
end
|
125
155
|
end
|