ui_bibz 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +49 -49
  3. data/app/assets/javascripts/input-connected.coffee +2 -1
  4. data/app/assets/javascripts/ui_bibz.coffee +9 -2
  5. data/app/assets/stylesheets/fix-bootstrap-4.sass +4 -0
  6. data/app/assets/stylesheets/fix_addon.sass +6 -6
  7. data/app/assets/stylesheets/notifications.sass +7 -0
  8. data/app/assets/stylesheets/ui_bibz.sass +4 -1
  9. data/lib/ui_bibz.rb +1 -0
  10. data/lib/ui_bibz/helpers/ui/core/icons_helper.rb +9 -0
  11. data/lib/ui_bibz/infos.rb +2 -2
  12. data/lib/ui_bibz/rails/engine.rb +5 -1
  13. data/lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_header.rb +1 -1
  14. data/lib/ui_bibz/ui/core/forms/textareas/markdown_editor_field.rb +1 -1
  15. data/lib/ui_bibz/ui/core/icons/glyph.rb +1 -1
  16. data/lib/ui_bibz/ui/core/notifications/components/bar.rb +11 -2
  17. data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +4 -12
  18. data/lib/ui_bibz/utils/glyph_changer.rb +54 -0
  19. data/vendor/assets/fonts/fa-brands-400.eot +0 -0
  20. data/vendor/assets/fonts/fa-brands-400.svg +1154 -0
  21. data/vendor/assets/fonts/fa-brands-400.ttf +0 -0
  22. data/vendor/assets/fonts/fa-brands-400.woff +0 -0
  23. data/vendor/assets/fonts/fa-brands-400.woff2 +0 -0
  24. data/vendor/assets/fonts/fa-regular-400.eot +0 -0
  25. data/vendor/assets/fonts/fa-regular-400.svg +467 -0
  26. data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
  27. data/vendor/assets/fonts/fa-regular-400.woff +0 -0
  28. data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
  29. data/vendor/assets/fonts/fa-solid-900.eot +0 -0
  30. data/vendor/assets/fonts/fa-solid-900.svg +2444 -0
  31. data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
  32. data/vendor/assets/fonts/fa-solid-900.woff +0 -0
  33. data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
  34. data/vendor/assets/javascripts/all.js +3685 -0
  35. data/vendor/assets/javascripts/bootstrap-markdown.js +159 -56
  36. data/vendor/assets/stylesheets/all.min.css +5 -0
  37. data/vendor/assets/stylesheets/svg-with-js.css +5 -0
  38. metadata +21 -4
  39. data/vendor/assets/javascripts/fontawesome-all.min.js +0 -5
  40. data/vendor/assets/stylesheets/fa-svg-with-js.css +0 -345
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac6bda28fb28808097770576deaf8da191ff02ed
4
- data.tar.gz: a5a89547ecacc14ab25fc1aeca348a41851ea270
3
+ metadata.gz: fc6697a288b5f33cdb42cdc4bde064c676970215
4
+ data.tar.gz: 5240648669c08ce050622b5461367a3a38b18306
5
5
  SHA512:
6
- metadata.gz: cb4a8307bf01f9a7414c65d80fe327f14caf1c6e754e31102ae8f918fdb922231d132e6e4693bd62d5c9ec3d1f66a251843552c0659b24a30722d693ec3bfd54
7
- data.tar.gz: f309563596304fe7f7086340f82e0706e370ae7ae60f6f7eb274fd5e431b3ee2300c08bc92605c86be9737b6ca7e64dd5de08ce610c3a37bbb25cb49d5114e6f
6
+ metadata.gz: 91bdbdbe73050136b89dc3c4dea7fb6258bd7dedb74e6770a51e0a934ffd60c84d62ae174d50bc5fa976878f401a7dc0ae1a8fa284ec0bf759ccc11e538c3614
7
+ data.tar.gz: 3d3c066f7b454582fdfc61d20073e1ae740acd9a43e026dd0c84c24035baac839bd40c870a85b0742815aa8080d022205226aac8740e3c41933a5e8cfc73e1b3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (2.1.0)
4
+ ui_bibz (2.1.1)
5
5
  bootstrap (= 4.1.1)
6
6
  haml
7
7
  haml-rails
@@ -15,49 +15,49 @@ PATH
15
15
  GEM
16
16
  remote: https://rubygems.org/
17
17
  specs:
18
- actioncable (5.2.0)
19
- actionpack (= 5.2.0)
18
+ actioncable (5.2.1)
19
+ actionpack (= 5.2.1)
20
20
  nio4r (~> 2.0)
21
21
  websocket-driver (>= 0.6.1)
22
- actionmailer (5.2.0)
23
- actionpack (= 5.2.0)
24
- actionview (= 5.2.0)
25
- activejob (= 5.2.0)
22
+ actionmailer (5.2.1)
23
+ actionpack (= 5.2.1)
24
+ actionview (= 5.2.1)
25
+ activejob (= 5.2.1)
26
26
  mail (~> 2.5, >= 2.5.4)
27
27
  rails-dom-testing (~> 2.0)
28
- actionpack (5.2.0)
29
- actionview (= 5.2.0)
30
- activesupport (= 5.2.0)
28
+ actionpack (5.2.1)
29
+ actionview (= 5.2.1)
30
+ activesupport (= 5.2.1)
31
31
  rack (~> 2.0)
32
32
  rack-test (>= 0.6.3)
33
33
  rails-dom-testing (~> 2.0)
34
34
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
35
- actionview (5.2.0)
36
- activesupport (= 5.2.0)
35
+ actionview (5.2.1)
36
+ activesupport (= 5.2.1)
37
37
  builder (~> 3.1)
38
38
  erubi (~> 1.4)
39
39
  rails-dom-testing (~> 2.0)
40
40
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
41
- activejob (5.2.0)
42
- activesupport (= 5.2.0)
41
+ activejob (5.2.1)
42
+ activesupport (= 5.2.1)
43
43
  globalid (>= 0.3.6)
44
- activemodel (5.2.0)
45
- activesupport (= 5.2.0)
46
- activerecord (5.2.0)
47
- activemodel (= 5.2.0)
48
- activesupport (= 5.2.0)
44
+ activemodel (5.2.1)
45
+ activesupport (= 5.2.1)
46
+ activerecord (5.2.1)
47
+ activemodel (= 5.2.1)
48
+ activesupport (= 5.2.1)
49
49
  arel (>= 9.0)
50
- activestorage (5.2.0)
51
- actionpack (= 5.2.0)
52
- activerecord (= 5.2.0)
50
+ activestorage (5.2.1)
51
+ actionpack (= 5.2.1)
52
+ activerecord (= 5.2.1)
53
53
  marcel (~> 0.3.1)
54
- activesupport (5.2.0)
54
+ activesupport (5.2.1)
55
55
  concurrent-ruby (~> 1.0, >= 1.0.2)
56
56
  i18n (>= 0.7, < 2)
57
57
  minitest (~> 5.1)
58
58
  tzinfo (~> 1.1)
59
59
  arel (9.0.0)
60
- autoprefixer-rails (8.6.3)
60
+ autoprefixer-rails (9.1.4)
61
61
  execjs
62
62
  awesome_print (1.8.0)
63
63
  bootstrap (4.1.1)
@@ -74,10 +74,10 @@ GEM
74
74
  erubi (1.7.1)
75
75
  erubis (2.7.0)
76
76
  execjs (2.7.0)
77
- factory_bot (4.10.0)
77
+ factory_bot (4.11.1)
78
78
  activesupport (>= 3.0.0)
79
- factory_bot_rails (4.10.0)
80
- factory_bot (~> 4.10.0)
79
+ factory_bot_rails (4.11.1)
80
+ factory_bot (~> 4.11.1)
81
81
  railties (>= 3.0.0)
82
82
  ffi (1.9.25)
83
83
  globalid (0.4.1)
@@ -96,7 +96,7 @@ GEM
96
96
  haml (>= 4.0, < 6)
97
97
  nokogiri (>= 1.6.0)
98
98
  ruby_parser (~> 3.5)
99
- i18n (1.0.1)
99
+ i18n (1.1.0)
100
100
  concurrent-ruby (~> 1.0)
101
101
  jquery-rails (4.3.3)
102
102
  rails-dom-testing (>= 1, < 3)
@@ -108,51 +108,51 @@ GEM
108
108
  nokogiri (>= 1.5.9)
109
109
  mail (2.7.0)
110
110
  mini_mime (>= 0.1.1)
111
- marcel (0.3.2)
111
+ marcel (0.3.3)
112
112
  mimemagic (~> 0.3.2)
113
113
  method_source (0.9.0)
114
114
  mimemagic (0.3.2)
115
- mini_mime (1.0.0)
115
+ mini_mime (1.0.1)
116
116
  mini_portile2 (2.3.0)
117
117
  minitest (5.11.3)
118
118
  nio4r (2.3.1)
119
- nokogiri (1.8.3)
119
+ nokogiri (1.8.4)
120
120
  mini_portile2 (~> 2.3.0)
121
- popper_js (1.12.9)
121
+ popper_js (1.14.3)
122
122
  rack (2.0.5)
123
- rack-test (1.0.0)
123
+ rack-test (1.1.0)
124
124
  rack (>= 1.0, < 3)
125
- rails (5.2.0)
126
- actioncable (= 5.2.0)
127
- actionmailer (= 5.2.0)
128
- actionpack (= 5.2.0)
129
- actionview (= 5.2.0)
130
- activejob (= 5.2.0)
131
- activemodel (= 5.2.0)
132
- activerecord (= 5.2.0)
133
- activestorage (= 5.2.0)
134
- activesupport (= 5.2.0)
125
+ rails (5.2.1)
126
+ actioncable (= 5.2.1)
127
+ actionmailer (= 5.2.1)
128
+ actionpack (= 5.2.1)
129
+ actionview (= 5.2.1)
130
+ activejob (= 5.2.1)
131
+ activemodel (= 5.2.1)
132
+ activerecord (= 5.2.1)
133
+ activestorage (= 5.2.1)
134
+ activesupport (= 5.2.1)
135
135
  bundler (>= 1.3.0)
136
- railties (= 5.2.0)
136
+ railties (= 5.2.1)
137
137
  sprockets-rails (>= 2.0.0)
138
138
  rails-dom-testing (2.0.3)
139
139
  activesupport (>= 4.2.0)
140
140
  nokogiri (>= 1.6)
141
141
  rails-html-sanitizer (1.0.4)
142
142
  loofah (~> 2.2, >= 2.2.2)
143
- railties (5.2.0)
144
- actionpack (= 5.2.0)
145
- activesupport (= 5.2.0)
143
+ railties (5.2.1)
144
+ actionpack (= 5.2.1)
145
+ activesupport (= 5.2.1)
146
146
  method_source
147
147
  rake (>= 0.8.7)
148
- thor (>= 0.18.1, < 2.0)
148
+ thor (>= 0.19.0, < 2.0)
149
149
  rake (12.3.1)
150
150
  rb-fsevent (0.10.3)
151
151
  rb-inotify (0.9.10)
152
152
  ffi (>= 0.5.0, < 2)
153
153
  ruby_parser (3.11.0)
154
154
  sexp_processor (~> 4.9)
155
- sass (3.5.6)
155
+ sass (3.5.7)
156
156
  sass-listen (~> 4.0.0)
157
157
  sass-listen (4.0.0)
158
158
  rb-fsevent (~> 0.9, >= 0.9.4)
@@ -1,6 +1,7 @@
1
1
  (($) ->
2
2
 
3
3
  updateOptionsHtml = (data, componentTarget) ->
4
+ console.log data
4
5
  componentTarget.children('option:not([value=""])').remove()
5
6
 
6
7
  if Array.isArray(data)
@@ -14,7 +15,7 @@
14
15
 
15
16
  appendToElement = (data, element) ->
16
17
  data.forEach (opt) ->
17
- element.append($("<option></option>").attr("value", opt.value).text(opt.text))
18
+ element.append($("<option></option>").attr("value", opt.value || opt[1]).text(opt.text || opt[0]))
18
19
 
19
20
  updateTargetComponent = (data, componentTarget, component) ->
20
21
  updateOptionsHtml(data, componentTarget)
@@ -1,6 +1,6 @@
1
1
  #= require jquery2
2
2
  #= require jquery-ui.min
3
- #= require fontawesome-all.min
3
+ #= require all
4
4
 
5
5
  # multi_column_field component
6
6
  #= require jquery.quicksearch.min
@@ -41,10 +41,16 @@
41
41
  @UiBibz = class UiBibz
42
42
 
43
43
  constructor: (args = {}) ->
44
- @turbolinks = args.turbolinks
44
+ @turbolinks = args.turbolinks
45
+ @fontawesomejs = args.fontawesomejs || true
45
46
  return this
46
47
 
47
48
  load: ->
49
+ # https://github.com/tomkra/font_awesome5_rails/issues/17
50
+ FontAwesome.config =
51
+ observeMutations: false
52
+ FontAwesome.dom.i2svg()
53
+
48
54
  new window.UiBibzTable()
49
55
  new window.UiBibzForm()
50
56
  new window.UiBibzInterface()
@@ -58,3 +64,4 @@
58
64
  $(document).on('turbolinks:load', me.load) # catch event for turbolinks and fix in ready() function
59
65
  else
60
66
  $(document).on('ready', me.load)
67
+
@@ -13,3 +13,7 @@
13
13
  // Fix bootstrap-select
14
14
  .bootstrap-select.btn-group .dropdown-toggle .filter-option
15
15
  display: inline-grid !important
16
+
17
+ .dropdown-item
18
+ svg
19
+ float: left
@@ -184,18 +184,18 @@ $input-group-btn-border-color: $input-border-color
184
184
  @include hover-focus-active
185
185
  z-index: 3
186
186
 
187
- .input-group-addon .glyph, .input-group-btn .btn .glyph
187
+ .input-group-addon .glyph, .input-group-btn .btn i.glyph
188
188
  padding: 0.41rem 0
189
189
 
190
190
  .input-group-sm
191
- .input-group-addon .glyph,
192
- .input-group-btn .btn .glyph
191
+ .input-group-addon i.glyph,
192
+ .input-group-btn .btn i.glyph
193
193
  padding: 0.352rem 0 !important
194
194
 
195
195
  .input-group-lg
196
- .input-group-addon .glyph,
197
- .input-group-btn .btn .glyph
196
+ .input-group-addon i.glyph,
197
+ .input-group-btn .btn i.glyph
198
198
  padding: 0.5rem 0 !important
199
199
 
200
- .input-group-lg .input-group-addon .glyph
200
+ .input-group-lg .input-group-addon i.glyph
201
201
  padding: 0.5rem 0 !important
@@ -9,6 +9,13 @@
9
9
  .alert .glyph
10
10
  padding: .25rem 0
11
11
 
12
+ .glyph
13
+ vertical-align: middle
14
+
15
+ .dropdown-item
16
+ .glyph
17
+ margin-right: 1rem
18
+
12
19
  .fa,
13
20
  .fas,
14
21
  .far,
@@ -1,5 +1,8 @@
1
1
  // Awesome Font
2
- @import fa-svg-with-js
2
+ //@import font-awesome-sprockets
3
+
4
+ @import all.min
5
+
3
6
 
4
7
  // Bootstrap
5
8
  $enable-flex: true
data/lib/ui_bibz.rb CHANGED
@@ -35,6 +35,7 @@ module UiBibz
35
35
 
36
36
  module Utils
37
37
  autoload :Screwdriver, "ui_bibz/utils/screwdriver"
38
+ autoload :GlyphChanger, "ui_bibz/utils/glyph_changer"
38
39
  end
39
40
 
40
41
  module Ui
@@ -24,6 +24,14 @@ module UiBibz::Helpers::Ui::Core::IconsHelper
24
24
  UiBibz::Ui::Core::Icons::GlyphGroup.new(content, options, html_options).tap(&block).render
25
25
  end
26
26
 
27
+ # Glyph Changer
28
+ #
29
+ # +options+ (Hash)
30
+ #
31
+ def ui_glyph_or_glyph_group glyph_options, options = {}
32
+ UiBibz::Utils::GlyphChanger.new(glyph_options, options).render
33
+ end
34
+
27
35
  # Stars Component
28
36
  #
29
37
  # +options+ (Hash)
@@ -31,4 +39,5 @@ module UiBibz::Helpers::Ui::Core::IconsHelper
31
39
  def ui_star content = nil, options = nil, html_options = nil, &block
32
40
  UiBibz::Ui::Core::Icons::Star.new(content, options, html_options, &block).render
33
41
  end
42
+
34
43
  end
data/lib/ui_bibz/infos.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  module UiBibz
2
2
  NAME = "Ui Bibz"
3
- VERSION = "2.1.0"
3
+ VERSION = "2.1.1"
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"
7
- FONTAWESOME_VERSION = "5.0.13"
7
+ FONTAWESOME_VERSION = "5.3.1"
8
8
  BOOTSTRAP_VERSION = "4.1.1"
9
9
  end
@@ -3,7 +3,7 @@ require 'will_paginate'
3
3
  require 'jquery-rails'
4
4
  require 'popper_js'
5
5
  require 'bootstrap'
6
- require 'simple_form' if system('gem list -i simple_form')
6
+ require 'simple_form' if system('gem list -i simple_form', :out => File::NULL)
7
7
 
8
8
  module UiBibz
9
9
  module Rails
@@ -24,6 +24,10 @@ module UiBibz
24
24
  ActionView::Base.send :include, UiBibzForm
25
25
  end
26
26
 
27
+ initializer 'font-awesome-sass.assets.precompile', group: :all do |app|
28
+ config.assets.precompile << /\.(?:svg|eot|woff|woff2|ttf)\z/
29
+ end
30
+
27
31
  end
28
32
  end
29
33
  end
@@ -40,7 +40,7 @@ module UiBibz::Ui::Core::Forms::Dropdowns::Components
40
40
 
41
41
  # Render html tag
42
42
  def pre_render
43
- content_tag :h6, content, html_options
43
+ content_tag :h6, glyph_and_content_html, html_options
44
44
  end
45
45
 
46
46
  private
@@ -86,7 +86,7 @@ module UiBibz::Ui::Core::Forms::Textareas
86
86
  end
87
87
 
88
88
  def icon_library
89
- add_html_data('iconlibrary', 'fa')
89
+ add_html_data('iconlibrary', 'fa-5')
90
90
  end
91
91
 
92
92
  def hidden_buttons
@@ -79,7 +79,7 @@ module UiBibz::Ui::Core::Icons
79
79
  end
80
80
 
81
81
  def classes
82
- cls = ["glyph", style, "fa-#{ content }"]
82
+ cls = ["glyph", style, "fa-#{ content }"]#, "fa-fw"]
83
83
  cls << "fa-#{ size }x" unless size.nil?
84
84
  cls << "fa-rotate-#{ rotate }" unless rotate.nil?
85
85
  cls << "fa-flip-#{ flip }" unless flip.nil?
@@ -49,7 +49,7 @@ module UiBibz::Ui::Core::Notifications::Components
49
49
 
50
50
  # Render html tag
51
51
  def pre_render
52
- content_tag :div, '', html_options
52
+ content_tag :div, text, html_options
53
53
  end
54
54
 
55
55
  private
@@ -70,7 +70,6 @@ module UiBibz::Ui::Core::Notifications::Components
70
70
  'progress-bar-animated' unless options[:animated].nil?
71
71
  end
72
72
 
73
-
74
73
  def min
75
74
  options[:min] || 0
76
75
  end
@@ -87,5 +86,15 @@ module UiBibz::Ui::Core::Notifications::Components
87
86
  "bg-#{ options[:status] }" unless options[:status].nil?
88
87
  end
89
88
 
89
+ def text
90
+ if options[:label].nil?
91
+ "#{ value }%"
92
+ elsif options[:label] == false
93
+ ""
94
+ else
95
+ options[:label]
96
+ end
97
+ end
98
+
90
99
  end
91
100
  end
@@ -20,18 +20,10 @@ module GlyphExtension
20
20
 
21
21
  # Render glyph html
22
22
  def glyph
23
- if options.kind_of?(Hash)
24
- if options[:glyph].kind_of?(Hash)
25
- glyph_name = options[:glyph].try(:[], :name)
26
- glyph_opts = options[:glyph]
27
- else
28
- glyph_name = options[:glyph]
29
- glyph_opts = {}
30
- end
31
- glyph_html_opts = options[:text].nil? ? {} : (options[:text] ? {} : { title: content })
32
- end
33
-
34
- UiBibz::Ui::Core::Icons::Glyph.new(glyph_name, glyph_opts, glyph_html_opts).render unless glyph_name.nil?
23
+ options[:content] = content if options[:text] == false
24
+ options.delete(:status)
25
+ options.delete(:class)
26
+ UiBibz::Utils::GlyphChanger.new(options[:glyph], options).render
35
27
  end
36
28
 
37
29
  end