ui_bibz 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/app/assets/stylesheets/fix_addon.sass +0 -16
- data/app/assets/stylesheets/forms.sass +8 -0
- data/app/assets/stylesheets/notifications.sass +1 -1
- data/app/assets/stylesheets/ui_bibz.sass +4 -2
- data/lib/ui_bibz/infos.rb +1 -1
- data/lib/ui_bibz/ui/core/component.rb +1 -1
- data/lib/ui_bibz/ui/core/layouts/col.rb +3 -3
- data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +13 -3
- data/test/simple_form_test.rb +1 -1
- data/test/ui/core/forms/textareas/markdown_editor_field_test.rb +1 -1
- data/test/ui/core/notifications/progress_bar_test.rb +6 -6
- data/vendor/assets/stylesheets/fontawesome/_animated.scss +20 -0
- data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +20 -0
- data/vendor/assets/stylesheets/fontawesome/_core.scss +20 -0
- data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +6 -0
- data/vendor/assets/stylesheets/fontawesome/_icons.scss +1194 -0
- data/vendor/assets/stylesheets/fontawesome/_larger.scss +23 -0
- data/vendor/assets/stylesheets/fontawesome/_list.scss +18 -0
- data/vendor/assets/stylesheets/fontawesome/_mixins.scss +57 -0
- data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +23 -0
- data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +5 -0
- data/vendor/assets/stylesheets/fontawesome/_shims.scss +2066 -0
- data/vendor/assets/stylesheets/fontawesome/_stacked.scss +31 -0
- data/vendor/assets/stylesheets/fontawesome/_variables.scss +1207 -0
- data/vendor/assets/stylesheets/fontawesome/brands.scss +21 -0
- data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +16 -0
- data/vendor/assets/stylesheets/fontawesome/regular.scss +22 -0
- data/vendor/assets/stylesheets/fontawesome/solid.scss +23 -0
- data/vendor/assets/stylesheets/fontawesome/v4-shims.scss +6 -0
- metadata +20 -3
- data/vendor/assets/stylesheets/all.min.css +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8e5cc80794cc21d792fa246f74909176423e213
|
4
|
+
data.tar.gz: bc903615fd2bb0eb6e1fb921302dea8489353887
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01e1525f051b376f294449d02c49b1d35f26c37ab0de6e0262046dba3b95f960bf7f60b0a27d4140ce33249d6807dbb932359a092f51dabd3d3825d00ebb5a53
|
7
|
+
data.tar.gz: f838abaffe37a46c3649328163c995b55305a3cc02807a00bc237ef2c996764323c467c56a803973568b47f3b077f6732d3607389ded84c104758c664da20186
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ui_bibz (2.1.
|
4
|
+
ui_bibz (2.1.2)
|
5
5
|
bootstrap (= 4.1.1)
|
6
6
|
haml
|
7
7
|
haml-rails
|
@@ -116,7 +116,7 @@ GEM
|
|
116
116
|
mini_portile2 (2.3.0)
|
117
117
|
minitest (5.11.3)
|
118
118
|
nio4r (2.3.1)
|
119
|
-
nokogiri (1.8.
|
119
|
+
nokogiri (1.8.5)
|
120
120
|
mini_portile2 (~> 2.3.0)
|
121
121
|
popper_js (1.14.3)
|
122
122
|
rack (2.0.5)
|
@@ -152,7 +152,7 @@ GEM
|
|
152
152
|
ffi (>= 0.5.0, < 2)
|
153
153
|
ruby_parser (3.11.0)
|
154
154
|
sexp_processor (~> 4.9)
|
155
|
-
sass (3.
|
155
|
+
sass (3.6.0)
|
156
156
|
sass-listen (~> 4.0.0)
|
157
157
|
sass-listen (4.0.0)
|
158
158
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
@@ -183,19 +183,3 @@ $input-group-btn-border-color: $input-border-color
|
|
183
183
|
// Because specificity
|
184
184
|
@include hover-focus-active
|
185
185
|
z-index: 3
|
186
|
-
|
187
|
-
.input-group-addon .glyph, .input-group-btn .btn i.glyph
|
188
|
-
padding: 0.41rem 0
|
189
|
-
|
190
|
-
.input-group-sm
|
191
|
-
.input-group-addon i.glyph,
|
192
|
-
.input-group-btn .btn i.glyph
|
193
|
-
padding: 0.352rem 0 !important
|
194
|
-
|
195
|
-
.input-group-lg
|
196
|
-
.input-group-addon i.glyph,
|
197
|
-
.input-group-btn .btn i.glyph
|
198
|
-
padding: 0.5rem 0 !important
|
199
|
-
|
200
|
-
.input-group-lg .input-group-addon i.glyph
|
201
|
-
padding: 0.5rem 0 !important
|
@@ -44,6 +44,7 @@
|
|
44
44
|
min-width: 104px
|
45
45
|
|
46
46
|
.ui_surround_field
|
47
|
+
flex-wrap: nowrap
|
47
48
|
.mr-sm-2
|
48
49
|
margin-right: 0px !important
|
49
50
|
input:not(:first-child):not(:last-child)
|
@@ -56,3 +57,10 @@
|
|
56
57
|
|
57
58
|
//.btn.without-text
|
58
59
|
padding-right: 3px
|
60
|
+
|
61
|
+
.multiselect-container
|
62
|
+
padding: 10px
|
63
|
+
.multiselect-container > li > a > label
|
64
|
+
padding: 3px 20px 3px 10px
|
65
|
+
> input[type=checkbox]
|
66
|
+
margin-bottom: 0px
|
data/lib/ui_bibz/infos.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module UiBibz
|
2
2
|
NAME = "Ui Bibz"
|
3
|
-
VERSION = "2.1.
|
3
|
+
VERSION = "2.1.2"
|
4
4
|
DESCRIPTION = "A Rails Interface Framework using Bootstrap."
|
5
5
|
SUMMARY = "Create your project with Ui Bibz. Over a thirty reusable components built to provide iconography, dropdowns, input groups, navigation, alerts, and much more."
|
6
6
|
LICENSE = "MIT"
|
@@ -68,7 +68,7 @@ module UiBibz::Ui::Core::Layouts
|
|
68
68
|
def col_classes
|
69
69
|
kl = []
|
70
70
|
@options.each do |ke,va|
|
71
|
-
kl << write_classes(ke, va) if %
|
71
|
+
kl << write_classes(ke, va) if %w(xs sm md lg xl).include?(ke)
|
72
72
|
end
|
73
73
|
if not_col_options?
|
74
74
|
kl = "col"
|
@@ -79,11 +79,11 @@ module UiBibz::Ui::Core::Layouts
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def not_col_options?
|
82
|
-
(@options.keys & %
|
82
|
+
(@options.keys & %w(xs sm md lg xl num offset push pull)).empty?
|
83
83
|
end
|
84
84
|
|
85
85
|
def write_classes size, opts
|
86
|
-
opts.map{ |k, v| send(k, size.to_sym, v) if %
|
86
|
+
opts.map{ |k, v| send(k, size.to_sym, v) if %w(num offset push pull).include?(k) }.join(' ')
|
87
87
|
end
|
88
88
|
|
89
89
|
# col-md-9
|
@@ -21,9 +21,19 @@ module GlyphExtension
|
|
21
21
|
# Render glyph html
|
22
22
|
def glyph
|
23
23
|
options[:content] = content if options[:text] == false
|
24
|
-
|
25
|
-
options.
|
26
|
-
|
24
|
+
|
25
|
+
glyph_options = if options[:glyph].kind_of?(Hash)
|
26
|
+
options[:glyph]
|
27
|
+
elsif options[:glyph].kind_of?(String)
|
28
|
+
{ name: options[:glyph] }
|
29
|
+
else
|
30
|
+
{}
|
31
|
+
end
|
32
|
+
|
33
|
+
glyph_options[:text] = options[:text] unless options[:text].nil?
|
34
|
+
glyph_options[:content] = options[:content] unless options[:content].nil?
|
35
|
+
|
36
|
+
UiBibz::Utils::GlyphChanger.new(glyph_options[:name], glyph_options).render unless glyph_options[:name].nil?
|
27
37
|
end
|
28
38
|
|
29
39
|
end
|
data/test/simple_form_test.rb
CHANGED
@@ -83,7 +83,7 @@ class SimpleFormTest < ActionView::TestCase
|
|
83
83
|
f.input :name_fr, as: :ui_markdown_editor_field
|
84
84
|
end
|
85
85
|
|
86
|
-
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input name=\"utf8\" type=\"hidden\" value=\"✓\" /><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_markdown_editor_field optional user_name_fr\"><label class=\"control-label ui_markdown_editor_field optional\" for=\"user_name_fr\">Name fr</label><textarea name=\"user[name_fr]\" id=\"user_name_fr\" class=\"ui_markdown_editor_field optional\" data-provide=\"markdown\" data-iconlibrary=\"fa\">
|
86
|
+
expected = "<form class=\"simple_form edit_user\" id=\"edit_user_1\" action=\"/users/1\" accept-charset=\"UTF-8\" method=\"post\"><input name=\"utf8\" type=\"hidden\" value=\"✓\" /><input type=\"hidden\" name=\"_method\" value=\"patch\" /><div class=\"form-group ui_markdown_editor_field optional user_name_fr\"><label class=\"control-label ui_markdown_editor_field optional\" for=\"user_name_fr\">Name fr</label><textarea name=\"user[name_fr]\" id=\"user_name_fr\" class=\"ui_markdown_editor_field optional\" data-provide=\"markdown\" data-iconlibrary=\"fa-5\">
|
87
87
|
</textarea></div></form>"
|
88
88
|
|
89
89
|
assert_equal expected, actual
|
@@ -4,7 +4,7 @@ class MarkdownEditorFieldTest < ActionView::TestCase
|
|
4
4
|
|
5
5
|
test 'markdown_editor' do
|
6
6
|
actual = UiBibz::Ui::Core::Forms::Textareas::MarkdownEditorField.new('comments').render
|
7
|
-
expected = "<textarea name=\"comments\" id=\"comments\" data-provide=\"markdown\" data-iconlibrary=\"fa\">
|
7
|
+
expected = "<textarea name=\"comments\" id=\"comments\" data-provide=\"markdown\" data-iconlibrary=\"fa-5\">
|
8
8
|
</textarea>"
|
9
9
|
|
10
10
|
assert_equal expected, actual
|
@@ -6,35 +6,35 @@ class ProgressBarTest < ActionView::TestCase
|
|
6
6
|
|
7
7
|
test 'progress bar' do
|
8
8
|
actual = ui_progress_bar(20)
|
9
|
-
expected = "<div class=\"progress\"><div class=\"progress-bar\" aria-valuenow=\"20.0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 20.0%\" role=\"progressbar\"
|
9
|
+
expected = "<div class=\"progress\"><div class=\"progress-bar\" aria-valuenow=\"20.0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 20.0%\" role=\"progressbar\">20.0%</div></div>"
|
10
10
|
|
11
11
|
assert_equal expected, actual
|
12
12
|
end
|
13
13
|
|
14
14
|
test 'progress bar status' do
|
15
15
|
actual = ui_progress_bar(70, status: :danger)
|
16
|
-
expected = "<div class=\"progress\"><div class=\"bg-danger progress-bar\" aria-valuenow=\"70.0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 70.0%\" role=\"progressbar\"
|
16
|
+
expected = "<div class=\"progress\"><div class=\"bg-danger progress-bar\" aria-valuenow=\"70.0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 70.0%\" role=\"progressbar\">70.0%</div></div>"
|
17
17
|
|
18
18
|
assert_equal expected, actual
|
19
19
|
end
|
20
20
|
|
21
21
|
test 'progress bar striped' do
|
22
22
|
actual = ui_progress_bar(70, striped: true)
|
23
|
-
expected = "<div class=\"progress\"><div class=\"progress-bar progress-bar-striped\" aria-valuenow=\"70.0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 70.0%\" role=\"progressbar\"
|
23
|
+
expected = "<div class=\"progress\"><div class=\"progress-bar progress-bar-striped\" aria-valuenow=\"70.0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 70.0%\" role=\"progressbar\">70.0%</div></div>"
|
24
24
|
|
25
25
|
assert_equal expected, actual
|
26
26
|
end
|
27
27
|
|
28
28
|
test 'progress bar animated' do
|
29
29
|
actual = ui_progress_bar(70, animated: true)
|
30
|
-
expected = "<div class=\"progress\"><div class=\"progress-bar progress-bar-animated\" aria-valuenow=\"70.0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 70.0%\" role=\"progressbar\"
|
30
|
+
expected = "<div class=\"progress\"><div class=\"progress-bar progress-bar-animated\" aria-valuenow=\"70.0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 70.0%\" role=\"progressbar\">70.0%</div></div>"
|
31
31
|
|
32
32
|
assert_equal expected, actual
|
33
33
|
end
|
34
34
|
|
35
35
|
test 'progress bar stacked' do
|
36
36
|
actual = ui_progress_bar(76, animated: true)
|
37
|
-
expected = "<div class=\"progress\"><div class=\"progress-bar progress-bar-animated\" aria-valuenow=\"76.0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 76.0%\" role=\"progressbar\"
|
37
|
+
expected = "<div class=\"progress\"><div class=\"progress-bar progress-bar-animated\" aria-valuenow=\"76.0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 76.0%\" role=\"progressbar\">76.0%</div></div>"
|
38
38
|
|
39
39
|
assert_equal expected, actual
|
40
40
|
end
|
@@ -44,7 +44,7 @@ class ProgressBarTest < ActionView::TestCase
|
|
44
44
|
pb.bar 25, status: :warning, striped: true
|
45
45
|
pb.bar 65, status: :danger
|
46
46
|
end
|
47
|
-
expected = "<div class=\"progress\"><div class=\"bg-warning progress-bar progress-bar-striped\" aria-valuenow=\"25.0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 25.0%\" role=\"progressbar\"
|
47
|
+
expected = "<div class=\"progress\"><div class=\"bg-warning progress-bar progress-bar-striped\" aria-valuenow=\"25.0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 25.0%\" role=\"progressbar\">25.0%</div><div class=\"bg-danger progress-bar\" aria-valuenow=\"65.0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 65.0%\" role=\"progressbar\">65.0%</div></div>"
|
48
48
|
|
49
49
|
assert_equal expected, actual
|
50
50
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
// Animated Icons
|
2
|
+
// --------------------------
|
3
|
+
|
4
|
+
.#{$fa-css-prefix}-spin {
|
5
|
+
animation: fa-spin 2s infinite linear;
|
6
|
+
}
|
7
|
+
|
8
|
+
.#{$fa-css-prefix}-pulse {
|
9
|
+
animation: fa-spin 1s infinite steps(8);
|
10
|
+
}
|
11
|
+
|
12
|
+
@keyframes fa-spin {
|
13
|
+
0% {
|
14
|
+
transform: rotate(0deg);
|
15
|
+
}
|
16
|
+
|
17
|
+
100% {
|
18
|
+
transform: rotate(360deg);
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
// Bordered & Pulled
|
2
|
+
// -------------------------
|
3
|
+
|
4
|
+
.#{$fa-css-prefix}-border {
|
5
|
+
border: solid .08em $fa-border-color;
|
6
|
+
border-radius: .1em;
|
7
|
+
padding: .2em .25em .15em;
|
8
|
+
}
|
9
|
+
|
10
|
+
.#{$fa-css-prefix}-pull-left { float: left; }
|
11
|
+
.#{$fa-css-prefix}-pull-right { float: right; }
|
12
|
+
|
13
|
+
.#{$fa-css-prefix},
|
14
|
+
.fas,
|
15
|
+
.far,
|
16
|
+
.fal,
|
17
|
+
.fab {
|
18
|
+
&.#{$fa-css-prefix}-pull-left { margin-right: .3em; }
|
19
|
+
&.#{$fa-css-prefix}-pull-right { margin-left: .3em; }
|
20
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
// Base Class Definition
|
2
|
+
// -------------------------
|
3
|
+
|
4
|
+
.#{$fa-css-prefix},
|
5
|
+
.fas,
|
6
|
+
.far,
|
7
|
+
.fal,
|
8
|
+
.fab {
|
9
|
+
-moz-osx-font-smoothing: grayscale;
|
10
|
+
-webkit-font-smoothing: antialiased;
|
11
|
+
display: inline-block;
|
12
|
+
font-style: normal;
|
13
|
+
font-variant: normal;
|
14
|
+
text-rendering: auto;
|
15
|
+
line-height: 1;
|
16
|
+
}
|
17
|
+
|
18
|
+
%fa-icon {
|
19
|
+
@include fa-icon;
|
20
|
+
}
|