ui_bibz 3.0.0.alpha9 → 3.0.0.alpha10
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/Gemfile.lock +3 -3
- data/README.md +4 -0
- data/lib/ui_bibz/infos.rb +3 -3
- data/lib/ui_bibz/ui/core/forms/buttons/button_link.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dropdowns/dropdown.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/numbers/slider_header.rb +2 -2
- 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/navigations/nav.rb +2 -2
- data/lib/ui_bibz/ui/core/navigations/tab_group.rb +1 -1
- data/lib/ui_bibz/ui/core/notifications/components/toast_header.rb +15 -1
- data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +0 -1
- data/lib/ui_bibz/ui/extensions/core/component/popover_extension.rb +1 -1
- data/test/ui/core/forms/surrounds/surround_field_test.rb +1 -1
- data/ui_bibz.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63c95abb3d6e510f893aaa054080dc4e4b3012fd0a071cd0828a8d2333a0d20d
|
4
|
+
data.tar.gz: 5c13dccaeea9254bd66d0c0a778b3ee18764973438a0668b74f9a56b9b093f10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a138d91759572dec4f047dd5fb7dacd4ea517fffefaca70e73c92aba4fc96a1e799c4e11c8c4ad9420f19e6d9ca0d32a714a9d4ced4ddacac0e8c3368ccafe8c
|
7
|
+
data.tar.gz: 380361211a36fbf4cccfff82512233dcd05e84f20949bdf28e5808a53ea16626a1fafd5e8c020d8130307e3ecc3937e0c1e375ac5d91d58acf07cb0d66baaf4b
|
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.alpha10)
|
5
5
|
rails (~> 6.0.3, >= 6.0.3.2)
|
6
6
|
will-paginate-i18n
|
7
7
|
will_paginate (~> 3.1.0)
|
@@ -172,8 +172,8 @@ GEM
|
|
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.0)
|
176
|
+
rubocop (>= 0.90.0, < 2.0)
|
177
177
|
rubocop-ast (>= 0.4.0)
|
178
178
|
rubocop-rails (2.8.1)
|
179
179
|
activesupport (>= 4.2.0)
|
data/README.md
CHANGED
data/lib/ui_bibz/infos.rb
CHANGED
@@ -8,10 +8,10 @@ module UiBibz
|
|
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.alpha10'
|
16
16
|
AUTHORS = ['Thooams'].freeze
|
17
17
|
end
|
@@ -62,7 +62,7 @@ module UiBibz::Ui::Core::Forms::Buttons
|
|
62
62
|
def button_link_html_tag
|
63
63
|
link_to link_url, html_options do
|
64
64
|
concat spinner_html unless options[:spinner].nil?
|
65
|
-
concat glyph_and_content_html(
|
65
|
+
concat glyph_and_content_html(@content)
|
66
66
|
concat badge_html unless options[:badge].nil?
|
67
67
|
end
|
68
68
|
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
|
@@ -1,11 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module UiBibz::Ui::Core::Forms::Surrounds
|
4
|
-
class SurroundButton < UiBibz::Ui::Core::Forms::Buttons::Button
|
5
|
-
# See UiBibz::Ui::Core::Dropdown.initialize
|
6
|
-
|
7
|
-
def pre_render
|
8
|
-
button_html_tag
|
9
|
-
end
|
10
|
-
end
|
4
|
+
class SurroundButton < UiBibz::Ui::Core::Forms::Buttons::Button; end
|
11
5
|
end
|
@@ -1,11 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module UiBibz::Ui::Core::Forms::Surrounds
|
4
|
-
class SurroundButtonLink < UiBibz::Ui::Core::Forms::Buttons::ButtonLink
|
5
|
-
# See UiBibz::Ui::Core::Dropdown.initialize
|
6
|
-
|
7
|
-
def pre_render
|
8
|
-
button_link_html_tag
|
9
|
-
end
|
10
|
-
end
|
4
|
+
class SurroundButtonLink < UiBibz::Ui::Core::Forms::Buttons::ButtonLink; end
|
11
5
|
end
|
@@ -4,10 +4,11 @@ module UiBibz::Ui::Core::Forms::Surrounds
|
|
4
4
|
class SurroundDropdown < UiBibz::Ui::Core::Forms::Dropdowns::Dropdown
|
5
5
|
# See UiBibz::Ui::Core::Dropdown.initialize
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
def pre_render
|
8
|
+
capture do
|
9
|
+
concat button_html
|
10
|
+
concat ul_html
|
11
|
+
end
|
11
12
|
end
|
12
13
|
end
|
13
14
|
end
|
@@ -82,7 +82,7 @@ module UiBibz::Ui::Core::Navigations
|
|
82
82
|
# Add nav link items
|
83
83
|
# See UiBibz::Ui::Core::Navigations::NavLink
|
84
84
|
def link(content = nil, options = {}, html_options = nil, &block)
|
85
|
-
if
|
85
|
+
if block
|
86
86
|
content[:nav_type] = type
|
87
87
|
content[:nav_tags] = nav_tags
|
88
88
|
else
|
@@ -93,7 +93,7 @@ module UiBibz::Ui::Core::Navigations
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def text(content = nil, options = {}, html_options = nil, &block)
|
96
|
-
|
96
|
+
block ? content[:nav_type] = type : options[:nav_type] = type
|
97
97
|
@items << NavText.new(content, options, html_options, &block)
|
98
98
|
end
|
99
99
|
|
@@ -67,7 +67,7 @@ module UiBibz::Ui::Core::Navigations
|
|
67
67
|
# Add nav link items
|
68
68
|
# See UiBibz::Ui::Core::Navigations::NavLink
|
69
69
|
def tab(content = nil, options = {}, html_options = nil, &block)
|
70
|
-
if
|
70
|
+
if block
|
71
71
|
content[:nav_type] = type
|
72
72
|
content[:tag_type] = @options[:tag_type]
|
73
73
|
else
|
@@ -31,12 +31,13 @@ module UiBibz::Ui::Core::Notifications::Components
|
|
31
31
|
# end.render
|
32
32
|
#
|
33
33
|
class ToastHeader < UiBibz::Ui::Core::Component
|
34
|
+
include Webpacker::Helper if defined?(Webpacker)
|
34
35
|
# See UiBibz::Ui::Core::Component.initialize
|
35
36
|
|
36
37
|
def pre_render
|
37
38
|
content_tag :div, html_options do
|
38
39
|
concat UiBibz::Ui::Core::Icons::Glyph.new(options[:glyph], class: 'mr-2').render unless options[:glyph].nil?
|
39
|
-
concat
|
40
|
+
concat image unless options[:image].nil?
|
40
41
|
concat content_tag(:strong, content, class: 'mr-auto')
|
41
42
|
concat content_tag(:small, options[:time], class: 'text-muted') unless options[:time].nil?
|
42
43
|
concat close_button
|
@@ -45,6 +46,19 @@ module UiBibz::Ui::Core::Notifications::Components
|
|
45
46
|
|
46
47
|
private
|
47
48
|
|
49
|
+
def image
|
50
|
+
if options[:image].is_a?(String)
|
51
|
+
image_tag(options[:image], class: 'rounded mr-2', alt: sanitize_text(options[:image])) unless options[:image].nil?
|
52
|
+
else
|
53
|
+
options[:image][:class] = UiBibz::Utils::Screwdriver.join_classes(options[:image][:class], 'rounded mr-2')
|
54
|
+
if options[:image].delete(:pack)
|
55
|
+
image_pack_tag(options[:image].delete(:href), **options[:image])
|
56
|
+
else
|
57
|
+
image_tag(options[:image].delete(:href), **options[:image])
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
48
62
|
def close_button
|
49
63
|
content_tag :button, '', class: 'ml-2 mb-1 btn-close', "data-dismiss": 'toast', "aria-label": 'Close'
|
50
64
|
end
|
@@ -20,7 +20,6 @@ module GlyphExtension
|
|
20
20
|
h[:text] = options[:text]
|
21
21
|
h[:label] = options[:label] || content_html || content
|
22
22
|
h[:shortcut] = options[:shortcut] unless options[:shortcut].nil?
|
23
|
-
h[:html_options] = options[:html_options] unless options[:html_options].nil?
|
24
23
|
end
|
25
24
|
|
26
25
|
# UiBibz::Utils::GlyphChanger.new(glyph_options[:name], glyph_options).render unless glyph_options[:name].nil?
|
@@ -28,7 +28,7 @@ module PopoverExtension
|
|
28
28
|
TOOLTIP_METHODS.each { |mth| add_html_data(mth, value: options[:tooltip].try(:[], mth)) unless options[:tooltip].try(:[], mth).nil? }
|
29
29
|
add_html_data :placement, value: options[:tooltip].try(:[], :position) unless options[:tooltip].try(:[], :position).nil?
|
30
30
|
else
|
31
|
-
add_html_data :title, value: options[:tooltip]
|
31
|
+
add_html_data :title, value: options[:tooltip] == true ? sanitize_text(content) : options[:tooltip]
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -31,7 +31,7 @@ class SurroundFieldTest < ActionView::TestCase
|
|
31
31
|
d.link 'Link3', url: '#link3'
|
32
32
|
end
|
33
33
|
end.render
|
34
|
-
expected = "<div class=\"input-group ui_surround_field\"><
|
34
|
+
expected = "<div class=\"input-group ui_surround_field\"><button class=\"btn btn-secondary dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\" id=\"dropdown-test\">Dropdown</button><div class=\"dropdown-menu\" arial-labelledby=\"dropdown-test\"><a class=\"dropdown-item\" href=\"#link1\"><i class=\"glyph fas fa-eye\"></i> Link 1</a><h6 class=\"dropdown-header\" role=\"presentation\">header</h6><a class=\"dropdown-item\" href=\"#link2\">Link 2</a><div class=\"dropdown-divider\"></div><a class=\"dropdown-item\" href=\"#link3\">Link3</a></div></div>"
|
35
35
|
|
36
36
|
assert_equal expected, actual
|
37
37
|
end
|
data/ui_bibz.gemspec
CHANGED
@@ -12,7 +12,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
12
12
|
Gem::Specification.new do |s|
|
13
13
|
s.name = UiBibz::SLUG
|
14
14
|
s.version = UiBibz::VERSION
|
15
|
-
s.
|
15
|
+
s.author = UiBibz::AUTHOR
|
16
16
|
s.email = UiBibz::EMAIL
|
17
17
|
s.homepage = UiBibz::HOMEPAGE
|
18
18
|
s.summary = UiBibz::SUMMARY
|
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: 3.0.0.
|
4
|
+
version: 3.0.0.alpha10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Thooams
|
7
|
+
- Thooams [Thomas HUMMEL]
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -635,7 +635,7 @@ files:
|
|
635
635
|
- vendor/assets/stylesheets/jquery.multi-select.min.css
|
636
636
|
- vendor/assets/stylesheets/svg-with-js.css
|
637
637
|
- vendor/assets/stylesheets/tether.min.css
|
638
|
-
homepage:
|
638
|
+
homepage: https://hummel.link/ui-bibz/
|
639
639
|
licenses:
|
640
640
|
- MIT
|
641
641
|
metadata: {}
|