bs5 0.0.19 → 0.0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/bs5_manifest.js +1 -0
- data/app/assets/javascripts/bs5/application.js +13 -0
- data/app/components/bs5/alert_component.rb +5 -5
- data/app/components/bs5/badge_component.rb +6 -6
- data/app/components/bs5/button_tag_component.rb +8 -8
- data/app/components/bs5/button_to_component.rb +8 -8
- data/app/components/bs5/example_component.html.erb +2 -1
- data/app/components/bs5/list_group_component.rb +5 -5
- data/app/components/bs5/spinner_component.html.erb +5 -0
- data/app/components/bs5/spinner_component.rb +65 -0
- data/app/helpers/bs5/components_helper.rb +1 -1
- data/app/views/bs5/examples/alert/additional_content/snippet.html.erb +1 -1
- data/app/views/bs5/examples/alert/color/_example.html.erb +1 -0
- data/app/views/bs5/examples/alert/{style → color}/snippet.html.erb +8 -8
- data/app/views/bs5/examples/alert/dismissable/snippet.html.erb +1 -1
- data/app/views/bs5/examples/badge/color/_example.html.erb +2 -0
- data/app/views/bs5/examples/badge/color/snippet.html.erb +8 -0
- data/app/views/bs5/examples/badge/default/button.html.erb +1 -1
- data/app/views/bs5/examples/badge/pill/snippet.html.erb +8 -8
- data/app/views/bs5/examples/button_group/button_toolbar/snippet.html.erb +4 -4
- data/app/views/bs5/examples/button_group/button_toolbar/snippet2.html.erb +8 -8
- data/app/views/bs5/examples/button_group/sizing/snippet.html.erb +9 -9
- data/app/views/bs5/examples/button_group/vertical/snippet.html.erb +6 -6
- data/app/views/bs5/examples/buttons/button_tag/outline/snippet.html.erb +9 -9
- data/app/views/bs5/examples/buttons/button_tag/size/large.html.erb +2 -2
- data/app/views/bs5/examples/buttons/button_tag/size/small.html.erb +2 -2
- data/app/views/bs5/examples/buttons/button_tag/style/snippet.html.erb +9 -9
- data/app/views/bs5/examples/buttons/button_to/default/snippet.html.erb +3 -3
- data/app/views/bs5/examples/list_group/style/actionable.html.erb +8 -8
- data/app/views/bs5/examples/list_group/style/default.html.erb +8 -8
- data/app/views/bs5/examples/list_group/with_badges/default.html.erb +3 -3
- data/app/views/bs5/examples/popovers/default/snippet.html.erb +1 -1
- data/app/views/bs5/examples/popovers/four_directions/snippet.html.erb +4 -4
- data/app/views/bs5/examples/spinners/border/_example.html.erb +2 -0
- data/app/views/bs5/examples/spinners/border/snippet.html.erb +1 -0
- data/app/views/bs5/examples/spinners/buttons/_example.html.erb +2 -0
- data/app/views/bs5/examples/spinners/buttons/snippet.html.erb +15 -0
- data/app/views/bs5/examples/spinners/colors/_example.html.erb +2 -0
- data/app/views/bs5/examples/spinners/colors/snippet.html.erb +16 -0
- data/app/views/bs5/examples/spinners/growing/_example.html.erb +3 -0
- data/app/views/bs5/examples/spinners/growing/colors.html.erb +16 -0
- data/app/views/bs5/examples/spinners/growing/snippet.html.erb +1 -0
- data/app/views/bs5/examples/spinners/options/_example.html.erb +10 -0
- data/app/views/bs5/examples/spinners/options/floats.html.erb +3 -0
- data/app/views/bs5/examples/spinners/options/margin.html.erb +1 -0
- data/app/views/bs5/examples/spinners/options/placement_flex1.html.erb +3 -0
- data/app/views/bs5/examples/spinners/options/placement_flex2.html.erb +4 -0
- data/app/views/bs5/examples/spinners/options/text_align.html.erb +3 -0
- data/app/views/bs5/examples/spinners/size/_example.html.erb +3 -0
- data/app/views/bs5/examples/spinners/size/size1.html.erb +7 -0
- data/app/views/bs5/examples/spinners/size/size2.html.erb +3 -0
- data/app/views/bs5/examples/tooltips/default/buttons.html.erb +5 -5
- data/app/views/bs5/pages/alert.html.erb +1 -1
- data/app/views/bs5/pages/badge.html.erb +1 -1
- data/app/views/bs5/pages/spinners.html.erb +7 -0
- data/app/views/layouts/bs5/pages.html.erb +2 -0
- data/lib/bs5/engine.rb +6 -0
- data/lib/bs5/version.rb +1 -1
- data/lib/tasks/rubocop.rake +2 -0
- metadata +28 -20
- data/app/views/bs5/examples/alert/style/_example.html.erb +0 -2
- data/app/views/bs5/examples/badge/style/_example.html.erb +0 -2
- data/app/views/bs5/examples/badge/style/snippet.html.erb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51b17209ffd99eeedda9730125b19b56bd290f47c89196bf78787050b0061e7c
|
4
|
+
data.tar.gz: c691c88a51fc0e6aa4a02b9c31dceefb0c98824d454c755503cce7cc0b4f6a78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10243bc1176cbc6e480f39515bf171ce8f67caab6b75b435d6adb703eacc0da923e515fbe8eb1b36fab9e4e3096a379f596c801b2e378f935f24ae033166bdde
|
7
|
+
data.tar.gz: bc080841996dbd305b98df94b84b1d814be5656dcf6ee6954a98653a97919b2a080dd641dc02d3c9bbeaf818acc38cd4d32013deac6c3a2d11b440d0d009f821
|
@@ -0,0 +1,13 @@
|
|
1
|
+
window.addEventListener("load", initBs5);
|
2
|
+
window.addEventListener("turbolinks:load", initBs5);
|
3
|
+
|
4
|
+
function initBs5(event) {
|
5
|
+
document.querySelectorAll('[data-bs5="copy"]').forEach(function (item) {
|
6
|
+
item.addEventListener("click", handleBs5CopyButtonClick);
|
7
|
+
});
|
8
|
+
}
|
9
|
+
|
10
|
+
function handleBs5CopyButtonClick(event) {
|
11
|
+
var code = event.target.closest("div").querySelector("code").innerText;
|
12
|
+
navigator.clipboard.writeText(code);
|
13
|
+
}
|
@@ -4,13 +4,13 @@ module Bs5
|
|
4
4
|
class AlertComponent < ViewComponent::Base
|
5
5
|
STYLES = %i[primary secondary success danger warning info light dark].freeze
|
6
6
|
|
7
|
-
attr_reader :
|
7
|
+
attr_reader :color, :is_dismissable
|
8
8
|
|
9
9
|
include ActiveModel::Validations
|
10
|
-
validates :
|
10
|
+
validates :color, style: true
|
11
11
|
|
12
|
-
def initialize(
|
13
|
-
@
|
12
|
+
def initialize(color: :primary, is_dismissable: false)
|
13
|
+
@color = color.to_sym
|
14
14
|
@is_dismissable = is_dismissable
|
15
15
|
end
|
16
16
|
|
@@ -31,7 +31,7 @@ module Bs5
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def contextual_class
|
34
|
-
"alert-#{@
|
34
|
+
"alert-#{@color}"
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -4,14 +4,14 @@ module Bs5
|
|
4
4
|
class BadgeComponent < ViewComponent::Base
|
5
5
|
STYLES = %i[primary secondary success danger warning info light dark].freeze
|
6
6
|
|
7
|
-
attr_reader :text, :
|
7
|
+
attr_reader :text, :color
|
8
8
|
|
9
9
|
include ActiveModel::Validations
|
10
|
-
validates :
|
10
|
+
validates :color, style: true
|
11
11
|
|
12
|
-
def initialize(text:,
|
12
|
+
def initialize(text:, color: :secondary, pill: false)
|
13
13
|
@text = text
|
14
|
-
@
|
14
|
+
@color = color.to_sym
|
15
15
|
@pill = pill
|
16
16
|
end
|
17
17
|
|
@@ -32,8 +32,8 @@ module Bs5
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def contextual_class
|
35
|
-
class_names = ["bg-#{@
|
36
|
-
class_names << %w[text-dark] if
|
35
|
+
class_names = ["bg-#{@color}"]
|
36
|
+
class_names << %w[text-dark] if color.in?(%i[warning info light])
|
37
37
|
class_names.join(' ')
|
38
38
|
end
|
39
39
|
end
|
@@ -3,14 +3,14 @@
|
|
3
3
|
module Bs5
|
4
4
|
class ButtonTagComponent < ViewComponent::Base
|
5
5
|
STYLES = %i[primary secondary success danger warning info light dark link].freeze
|
6
|
-
|
6
|
+
DEFAULT_COLOR = :primary
|
7
7
|
SIZES = { small: :sm, large: :lg }.freeze
|
8
8
|
CLASS_PREFIX = 'btn'
|
9
9
|
|
10
10
|
attr_reader :content_or_options, :size
|
11
11
|
|
12
12
|
include ActiveModel::Validations
|
13
|
-
validates :
|
13
|
+
validates :color, style: true
|
14
14
|
validates :size, inclusion: { in: SIZES.keys, valid_sizes: SIZES.keys.to_sentence, allow_nil: true }
|
15
15
|
|
16
16
|
def initialize(content_or_options = nil, options = nil)
|
@@ -44,13 +44,13 @@ module Bs5
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def extract_custom_options
|
47
|
-
|
47
|
+
extract_color
|
48
48
|
extract_outline
|
49
49
|
extract_size
|
50
50
|
end
|
51
51
|
|
52
|
-
def
|
53
|
-
@
|
52
|
+
def extract_color
|
53
|
+
@color = @options.delete(:color)
|
54
54
|
end
|
55
55
|
|
56
56
|
def extract_outline
|
@@ -76,7 +76,7 @@ module Bs5
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def contextual_class
|
79
|
-
[CLASS_PREFIX, outline? ? 'outline' : nil,
|
79
|
+
[CLASS_PREFIX, outline? ? 'outline' : nil, color].compact.join('-')
|
80
80
|
end
|
81
81
|
|
82
82
|
def size_class
|
@@ -85,8 +85,8 @@ module Bs5
|
|
85
85
|
[CLASS_PREFIX, SIZES[size]].join('-')
|
86
86
|
end
|
87
87
|
|
88
|
-
def
|
89
|
-
(@
|
88
|
+
def color
|
89
|
+
(@color || DEFAULT_COLOR).to_sym
|
90
90
|
end
|
91
91
|
|
92
92
|
def outline?
|
@@ -3,14 +3,14 @@
|
|
3
3
|
module Bs5
|
4
4
|
class ButtonToComponent < ViewComponent::Base
|
5
5
|
STYLES = %i[primary secondary success danger warning info light dark link].freeze
|
6
|
-
|
6
|
+
DEFAULT_COLOR = :primary
|
7
7
|
SIZES = { small: :sm, large: :lg }.freeze
|
8
8
|
CLASS_PREFIX = 'btn'
|
9
9
|
|
10
10
|
attr_reader :size
|
11
11
|
|
12
12
|
include ActiveModel::Validations
|
13
|
-
validates :
|
13
|
+
validates :color, style: true
|
14
14
|
validates :size, inclusion: { in: SIZES.keys, valid_sizes: SIZES.keys.to_sentence, allow_nil: true }
|
15
15
|
|
16
16
|
def initialize(name = nil, options = nil, html_options = nil)
|
@@ -53,13 +53,13 @@ module Bs5
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def extract_custom_options
|
56
|
-
|
56
|
+
extract_color
|
57
57
|
extract_outline
|
58
58
|
extract_size
|
59
59
|
end
|
60
60
|
|
61
|
-
def
|
62
|
-
@
|
61
|
+
def extract_color
|
62
|
+
@color = @button_to_options.delete(:color)
|
63
63
|
end
|
64
64
|
|
65
65
|
def extract_outline
|
@@ -85,7 +85,7 @@ module Bs5
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def contextual_class
|
88
|
-
[CLASS_PREFIX, outline? ? 'outline' : nil,
|
88
|
+
[CLASS_PREFIX, outline? ? 'outline' : nil, color].compact.join('-')
|
89
89
|
end
|
90
90
|
|
91
91
|
def size_class
|
@@ -94,8 +94,8 @@ module Bs5
|
|
94
94
|
[CLASS_PREFIX, SIZES[size]].join('-')
|
95
95
|
end
|
96
96
|
|
97
|
-
def
|
98
|
-
(@
|
97
|
+
def color
|
98
|
+
(@color || DEFAULT_COLOR).to_sym
|
99
99
|
end
|
100
100
|
|
101
101
|
def outline?
|
@@ -2,7 +2,8 @@
|
|
2
2
|
<div class="border rounded-2 p-4">
|
3
3
|
<%= render template: snippet %>
|
4
4
|
</div>
|
5
|
-
<div class="highlight p-4">
|
5
|
+
<div class="highlight p-4 position-relative">
|
6
|
+
<%= bs5_button_tag('Copy', color: :primary, outline: true, size: :small, class: 'position-absolute top-0 end-0 mt-2 me-2', data: { bs5: 'copy' }) %>
|
6
7
|
<pre class='mb-0'><code><%= highlight %></code></pre>
|
7
8
|
</div>
|
8
9
|
</div>
|
@@ -62,7 +62,7 @@ module Bs5
|
|
62
62
|
|
63
63
|
@active = @options.delete(:active) || false
|
64
64
|
@disabled = @options.delete(:disabled) || false
|
65
|
-
@
|
65
|
+
@color = @options.delete(:color)
|
66
66
|
|
67
67
|
set_attributes
|
68
68
|
end
|
@@ -125,7 +125,7 @@ module Bs5
|
|
125
125
|
class_names = [CLASS_NAME_BASE]
|
126
126
|
class_names << 'active' if active?
|
127
127
|
class_names << 'disabled' if disabled?
|
128
|
-
class_names << contextual_class if
|
128
|
+
class_names << contextual_class if color?
|
129
129
|
|
130
130
|
class_names
|
131
131
|
end
|
@@ -138,12 +138,12 @@ module Bs5
|
|
138
138
|
!!@disabled
|
139
139
|
end
|
140
140
|
|
141
|
-
def
|
142
|
-
!!@
|
141
|
+
def color?
|
142
|
+
!!@color
|
143
143
|
end
|
144
144
|
|
145
145
|
def contextual_class
|
146
|
-
[CLASS_NAME_BASE, @
|
146
|
+
[CLASS_NAME_BASE, @color].join('-')
|
147
147
|
end
|
148
148
|
end
|
149
149
|
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bs5
|
4
|
+
class SpinnerComponent < ViewComponent::Base
|
5
|
+
STYLES = %i[primary secondary success danger warning info light dark].freeze
|
6
|
+
SIZES = { small: :sm, large: :lg }.freeze
|
7
|
+
|
8
|
+
attr_reader :text, :color, :size, :options
|
9
|
+
|
10
|
+
include ActiveModel::Validations
|
11
|
+
validates :color, style: true, if: -> { color }
|
12
|
+
|
13
|
+
def initialize(options = {})
|
14
|
+
@options = options.symbolize_keys
|
15
|
+
|
16
|
+
@text = @options.delete(:text)
|
17
|
+
@color = @options.delete(:color)&.to_sym
|
18
|
+
@grow = @options.delete(:grow)
|
19
|
+
@size = @options.delete(:size)&.to_sym
|
20
|
+
end
|
21
|
+
|
22
|
+
def before_render
|
23
|
+
raise errors.full_messages.to_sentence if invalid?
|
24
|
+
end
|
25
|
+
|
26
|
+
def component_attributes
|
27
|
+
options[:class] = component_class
|
28
|
+
options[:role] = 'status'
|
29
|
+
options
|
30
|
+
end
|
31
|
+
|
32
|
+
def component_class
|
33
|
+
class_names = Array(options[:class])
|
34
|
+
class_names << shape_class
|
35
|
+
class_names << contextual_class
|
36
|
+
class_names << size_class
|
37
|
+
|
38
|
+
class_names.compact.join(' ')
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def shape_class
|
44
|
+
grow? ? 'spinner-grow' : 'spinner-border'
|
45
|
+
end
|
46
|
+
|
47
|
+
def contextual_class
|
48
|
+
"text-#{@color}" if color
|
49
|
+
end
|
50
|
+
|
51
|
+
def size_class
|
52
|
+
return unless size?
|
53
|
+
|
54
|
+
[shape_class, SIZES[size]].join('-')
|
55
|
+
end
|
56
|
+
|
57
|
+
def grow?
|
58
|
+
!!@grow
|
59
|
+
end
|
60
|
+
|
61
|
+
def size?
|
62
|
+
!!size
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Bs5
|
4
4
|
module ComponentsHelper
|
5
5
|
COMPONENTS = %w[accordion alert badge close_button breadcrumb button_group button_tag button_to button_toolbar
|
6
|
-
list_group].freeze
|
6
|
+
list_group spinner].freeze
|
7
7
|
|
8
8
|
COMPONENTS.each do |name|
|
9
9
|
define_method("bs5_#{name}") do |*args, &block|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= bs5_alert(
|
1
|
+
<%= bs5_alert(color: :success) do %>
|
2
2
|
<h4 class="alert-heading">Well done!</h4>
|
3
3
|
<p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p>
|
4
4
|
<hr>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= bs5_example(snippet: 'alert/color/snippet') %>
|
@@ -1,31 +1,31 @@
|
|
1
|
-
<%= bs5_alert(
|
1
|
+
<%= bs5_alert(color: :primary) do %>
|
2
2
|
A simple primary alert—check it out!
|
3
3
|
<%- end %>
|
4
4
|
|
5
|
-
<%= bs5_alert(
|
5
|
+
<%= bs5_alert(color: :secondary) do %>
|
6
6
|
A simple secondary alert—check it out!
|
7
7
|
<%- end %>
|
8
8
|
|
9
|
-
<%= bs5_alert(
|
9
|
+
<%= bs5_alert(color: :success) do %>
|
10
10
|
A simple success alert—check it out!
|
11
11
|
<%- end %>
|
12
12
|
|
13
|
-
<%= bs5_alert(
|
13
|
+
<%= bs5_alert(color: :danger) do %>
|
14
14
|
A simple danger alert—check it out!
|
15
15
|
<%- end %>
|
16
16
|
|
17
|
-
<%= bs5_alert(
|
17
|
+
<%= bs5_alert(color: :warning) do %>
|
18
18
|
A simple warning alert—check it out!
|
19
19
|
<%- end %>
|
20
20
|
|
21
|
-
<%= bs5_alert(
|
21
|
+
<%= bs5_alert(color: :info) do %>
|
22
22
|
A simple info alert—check it out!
|
23
23
|
<%- end %>
|
24
24
|
|
25
|
-
<%= bs5_alert(
|
25
|
+
<%= bs5_alert(color: :light) do %>
|
26
26
|
A simple light alert—check it out!
|
27
27
|
<%- end %>
|
28
28
|
|
29
|
-
<%= bs5_alert(
|
29
|
+
<%= bs5_alert(color: :dark) do %>
|
30
30
|
A simple dark alert—check it out!
|
31
31
|
<%- end %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%= bs5_badge(text: 'Primary', color: :primary) %>
|
2
|
+
<%= bs5_badge(text: 'Secondary', color: :secondary) %>
|
3
|
+
<%= bs5_badge(text: 'Success', color: :success) %>
|
4
|
+
<%= bs5_badge(text: 'Danger', color: :danger) %>
|
5
|
+
<%= bs5_badge(text: 'Warning', color: :warning) %>
|
6
|
+
<%= bs5_badge(text: 'Info', color: :info) %>
|
7
|
+
<%= bs5_badge(text: 'Light', color: :light) %>
|
8
|
+
<%= bs5_badge(text: 'Dark', color: :dark) %>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<%= bs5_badge(text: 'Primary',
|
2
|
-
<%= bs5_badge(text: 'Secondary',
|
3
|
-
<%= bs5_badge(text: 'Sucess',
|
4
|
-
<%= bs5_badge(text: 'Danger',
|
5
|
-
<%= bs5_badge(text: 'Warning',
|
6
|
-
<%= bs5_badge(text: 'Info',
|
7
|
-
<%= bs5_badge(text: 'Light',
|
8
|
-
<%= bs5_badge(text: 'Dark',
|
1
|
+
<%= bs5_badge(text: 'Primary', color: :primary, pill: true) %>
|
2
|
+
<%= bs5_badge(text: 'Secondary', color: :secondary, pill: true) %>
|
3
|
+
<%= bs5_badge(text: 'Sucess', color: :success, pill: true) %>
|
4
|
+
<%= bs5_badge(text: 'Danger', color: :danger, pill: true) %>
|
5
|
+
<%= bs5_badge(text: 'Warning', color: :warning, pill: true) %>
|
6
|
+
<%= bs5_badge(text: 'Info', color: :info, pill: true) %>
|
7
|
+
<%= bs5_badge(text: 'Light', color: :light, pill: true) %>
|
8
|
+
<%= bs5_badge(text: 'Dark', color: :dark, pill: true) %>
|
@@ -7,12 +7,12 @@
|
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<%= bs5_button_group(class: 'me-2', aria: { label: 'Second group' }) do %>
|
10
|
-
<%= bs5_button_tag('5', type: 'button',
|
11
|
-
<%= bs5_button_tag('6', type: 'button',
|
12
|
-
<%= bs5_button_tag('7', type: 'button',
|
10
|
+
<%= bs5_button_tag('5', type: 'button', color: :secondary) %>
|
11
|
+
<%= bs5_button_tag('6', type: 'button', color: :secondary) %>
|
12
|
+
<%= bs5_button_tag('7', type: 'button', color: :secondary) %>
|
13
13
|
<% end %>
|
14
14
|
|
15
15
|
<%= bs5_button_group(aria: { label: 'Third group' }) do %>
|
16
|
-
<%= bs5_button_tag('8', type: 'button',
|
16
|
+
<%= bs5_button_tag('8', type: 'button', color: :info) %>
|
17
17
|
<% end %>
|
18
18
|
<% end %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<%= bs5_button_toolbar(class: 'mb-3', aria: { label: 'Toolbar with button groups' }) do %>
|
2
2
|
<%= bs5_button_group(class: 'me-2', aria: { label: 'First group' }) do %>
|
3
|
-
<%= bs5_button_tag('1', type: 'button', outline: true,
|
4
|
-
<%= bs5_button_tag('2', type: 'button', outline: true,
|
5
|
-
<%= bs5_button_tag('3', type: 'button', outline: true,
|
6
|
-
<%= bs5_button_tag('4', type: 'button', outline: true,
|
3
|
+
<%= bs5_button_tag('1', type: 'button', outline: true, color: :secondary) %>
|
4
|
+
<%= bs5_button_tag('2', type: 'button', outline: true, color: :secondary) %>
|
5
|
+
<%= bs5_button_tag('3', type: 'button', outline: true, color: :secondary) %>
|
6
|
+
<%= bs5_button_tag('4', type: 'button', outline: true, color: :secondary) %>
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<div class="input-group">
|
@@ -14,10 +14,10 @@
|
|
14
14
|
|
15
15
|
<%= bs5_button_toolbar(class: 'justify-content-between', aria: { label: 'Toolbar with button groups' }) do %>
|
16
16
|
<%= bs5_button_group(aria: { label: 'First group' }) do %>
|
17
|
-
<%= bs5_button_tag('1', type: 'button', outline: true,
|
18
|
-
<%= bs5_button_tag('2', type: 'button', outline: true,
|
19
|
-
<%= bs5_button_tag('3', type: 'button', outline: true,
|
20
|
-
<%= bs5_button_tag('4', type: 'button', outline: true,
|
17
|
+
<%= bs5_button_tag('1', type: 'button', outline: true, color: :secondary) %>
|
18
|
+
<%= bs5_button_tag('2', type: 'button', outline: true, color: :secondary) %>
|
19
|
+
<%= bs5_button_tag('3', type: 'button', outline: true, color: :secondary) %>
|
20
|
+
<%= bs5_button_tag('4', type: 'button', outline: true, color: :secondary) %>
|
21
21
|
<% end %>
|
22
22
|
|
23
23
|
<div class="input-group">
|
@@ -1,17 +1,17 @@
|
|
1
1
|
<%= bs5_button_group(size: 'large', class: 'mb-2', aria: { label: 'Large button group' }) do %>
|
2
|
-
<%= bs5_button_tag('Left', type: 'button',
|
3
|
-
<%= bs5_button_tag('Middle', type: 'button',
|
4
|
-
<%= bs5_button_tag('Right', type: 'button',
|
2
|
+
<%= bs5_button_tag('Left', type: 'button', color: :dark, outline: true) %>
|
3
|
+
<%= bs5_button_tag('Middle', type: 'button', color: :dark, outline: true) %>
|
4
|
+
<%= bs5_button_tag('Right', type: 'button', color: :dark, outline: true) %>
|
5
5
|
<% end %>
|
6
6
|
<br/>
|
7
7
|
<%= bs5_button_group(class: 'mb-2', aria: { label: 'Default button group' }) do %>
|
8
|
-
<%= bs5_button_tag('Left', type: 'button',
|
9
|
-
<%= bs5_button_tag('Middle', type: 'button',
|
10
|
-
<%= bs5_button_tag('Right', type: 'button',
|
8
|
+
<%= bs5_button_tag('Left', type: 'button', color: :dark, outline: true) %>
|
9
|
+
<%= bs5_button_tag('Middle', type: 'button', color: :dark, outline: true) %>
|
10
|
+
<%= bs5_button_tag('Right', type: 'button', color: :dark, outline: true) %>
|
11
11
|
<% end %>
|
12
12
|
<br/>
|
13
13
|
<%= bs5_button_group(size: :small, aria: { label: 'Small button group' }) do %>
|
14
|
-
<%= bs5_button_tag('Left', type: 'button',
|
15
|
-
<%= bs5_button_tag('Middle', type: 'button',
|
16
|
-
<%= bs5_button_tag('Right', type: 'button',
|
14
|
+
<%= bs5_button_tag('Left', type: 'button', color: :dark, outline: true) %>
|
15
|
+
<%= bs5_button_tag('Middle', type: 'button', color: :dark, outline: true) %>
|
16
|
+
<%= bs5_button_tag('Right', type: 'button', color: :dark, outline: true) %>
|
17
17
|
<% end %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%= bs5_button_group(vertical: :true, aria: { label: 'Vertical button group' }) do %>
|
2
|
-
<%= bs5_button_tag('Button', type: 'button',
|
3
|
-
<%= bs5_button_tag('Button', type: 'button',
|
4
|
-
<%= bs5_button_tag('Button', type: 'button',
|
5
|
-
<%= bs5_button_tag('Button', type: 'button',
|
6
|
-
<%= bs5_button_tag('Button', type: 'button',
|
7
|
-
<%= bs5_button_tag('Button', type: 'button',
|
2
|
+
<%= bs5_button_tag('Button', type: 'button', color: :dark) %>
|
3
|
+
<%= bs5_button_tag('Button', type: 'button', color: :dark) %>
|
4
|
+
<%= bs5_button_tag('Button', type: 'button', color: :dark) %>
|
5
|
+
<%= bs5_button_tag('Button', type: 'button', color: :dark) %>
|
6
|
+
<%= bs5_button_tag('Button', type: 'button', color: :dark) %>
|
7
|
+
<%= bs5_button_tag('Button', type: 'button', color: :dark) %>
|
8
8
|
<% end %>
|
@@ -1,19 +1,19 @@
|
|
1
|
-
<%= bs5_button_tag('Primary',
|
1
|
+
<%= bs5_button_tag('Primary', color: :primary, outline: true) %>
|
2
2
|
|
3
|
-
<%= bs5_button_tag('Secondary',
|
3
|
+
<%= bs5_button_tag('Secondary', color: :secondary, outline: true) %>
|
4
4
|
|
5
|
-
<%= bs5_button_tag('Success',
|
5
|
+
<%= bs5_button_tag('Success', color: :success, outline: true) %>
|
6
6
|
|
7
|
-
<%= bs5_button_tag('Danger',
|
7
|
+
<%= bs5_button_tag('Danger', color: :danger, outline: true) %>
|
8
8
|
|
9
|
-
<%= bs5_button_tag(
|
9
|
+
<%= bs5_button_tag(color: :warning, outline: true, type: 'button') do %>
|
10
10
|
<%= tag.strong('Warning') %>
|
11
11
|
<% end %>
|
12
12
|
|
13
|
-
<%= bs5_button_tag('Info',
|
13
|
+
<%= bs5_button_tag('Info', color: :info, outline: true) %>
|
14
14
|
|
15
|
-
<%= bs5_button_tag('Light',
|
15
|
+
<%= bs5_button_tag('Light', color: :light, outline: true) %>
|
16
16
|
|
17
|
-
<%= bs5_button_tag('Dark',
|
17
|
+
<%= bs5_button_tag('Dark', color: :dark, outline: true) %>
|
18
18
|
|
19
|
-
<%= bs5_button_tag('Link',
|
19
|
+
<%= bs5_button_tag('Link', color: :link, outline: true) %>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<%= bs5_button_tag('Large button',
|
1
|
+
<%= bs5_button_tag('Large button', color: :primary, size: :large) %>
|
2
2
|
|
3
|
-
<%= bs5_button_tag('Large button',
|
3
|
+
<%= bs5_button_tag('Large button', color: :secondary, size: :large) %>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<%= bs5_button_tag('Small button',
|
1
|
+
<%= bs5_button_tag('Small button', color: :primary, size: :small) %>
|
2
2
|
|
3
|
-
<%= bs5_button_tag('Small button',
|
3
|
+
<%= bs5_button_tag('Small button', color: :secondary, size: :small) %>
|
@@ -1,19 +1,19 @@
|
|
1
|
-
<%= bs5_button_tag('Primary',
|
1
|
+
<%= bs5_button_tag('Primary', color: :primary) %>
|
2
2
|
|
3
|
-
<%= bs5_button_tag('Secondary',
|
3
|
+
<%= bs5_button_tag('Secondary', color: :secondary) %>
|
4
4
|
|
5
|
-
<%= bs5_button_tag('Success',
|
5
|
+
<%= bs5_button_tag('Success', color: :success) %>
|
6
6
|
|
7
|
-
<%= bs5_button_tag('Danger',
|
7
|
+
<%= bs5_button_tag('Danger', color: :danger) %>
|
8
8
|
|
9
|
-
<%= bs5_button_tag(
|
9
|
+
<%= bs5_button_tag(color: :warning, type: 'button') do %>
|
10
10
|
<%= tag.strong('Warning') %>
|
11
11
|
<% end %>
|
12
12
|
|
13
|
-
<%= bs5_button_tag('Info',
|
13
|
+
<%= bs5_button_tag('Info', color: :info) %>
|
14
14
|
|
15
|
-
<%= bs5_button_tag('Light',
|
15
|
+
<%= bs5_button_tag('Light', color: :light) %>
|
16
16
|
|
17
|
-
<%= bs5_button_tag('Dark',
|
17
|
+
<%= bs5_button_tag('Dark', color: :dark) %>
|
18
18
|
|
19
|
-
<%= bs5_button_tag('Link',
|
19
|
+
<%= bs5_button_tag('Link', color: :link) %>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<div class="d-grid gap-2 d-md-flex">
|
2
2
|
<%= bs5_button_to('New', 'http://www.example.com') %>
|
3
3
|
|
4
|
-
<%= bs5_button_to('http://www.example.com',
|
4
|
+
<%= bs5_button_to('http://www.example.com', color: :success) do %>
|
5
5
|
Make happy <strong>John Doe</strong>
|
6
6
|
<%- end %>
|
7
7
|
|
8
|
-
<%= bs5_button_to('New', 'http://www.example.com',
|
8
|
+
<%= bs5_button_to('New', 'http://www.example.com', color: :dark, outline: true, size: :large, form_class: 'new-thing') %>
|
9
9
|
|
10
|
-
<%= bs5_button_to('Destroy', 'http://www.example.com',
|
10
|
+
<%= bs5_button_to('Destroy', 'http://www.example.com', color: :danger, method: "delete", remote: true, data: { confirm: 'Are you sure?', disable_with: 'loading...' }) %>
|
11
11
|
</div>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<%= bs5_list_group do |lg| %>
|
2
2
|
<% lg.item do %><%= link_to 'Dapibus ac facilisis in', '#' %><% end %>
|
3
|
-
<% lg.item(
|
4
|
-
<% lg.item(
|
5
|
-
<% lg.item(
|
6
|
-
<% lg.item(
|
7
|
-
<% lg.item(
|
8
|
-
<% lg.item(
|
9
|
-
<% lg.item(
|
10
|
-
<% lg.item(
|
3
|
+
<% lg.item(color: :primary) do %><%= link_to 'A simple primary list group item', '#' %><% end %>
|
4
|
+
<% lg.item(color: :secondary) do %><%= link_to 'A simple secondary list group item', '#' %><% end %>
|
5
|
+
<% lg.item(color: :success) do %><%= link_to 'A simple success list group item', '#' %><% end %>
|
6
|
+
<% lg.item(color: :danger) do %><%= link_to 'A simple danger list group item', '#' %><% end %>
|
7
|
+
<% lg.item(color: :warning) do %><%= link_to 'A simple warning list group item', '#' %><% end %>
|
8
|
+
<% lg.item(color: :info) do %><%= link_to 'A simple info list group item', '#' %><% end %>
|
9
|
+
<% lg.item(color: :light) do %><%= link_to 'A simple light list group item', '#' %><% end %>
|
10
|
+
<% lg.item(color: :dark) do %><%= link_to 'A simple dark list group item', '#' %><% end %>
|
11
11
|
<%- end %>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<%= bs5_list_group do |lg| %>
|
2
2
|
<% lg.item do %>Dapibus ac facilisis in<% end %>
|
3
|
-
<% lg.item(
|
4
|
-
<% lg.item(
|
5
|
-
<% lg.item(
|
6
|
-
<% lg.item(
|
7
|
-
<% lg.item(
|
8
|
-
<% lg.item(
|
9
|
-
<% lg.item(
|
10
|
-
<% lg.item(
|
3
|
+
<% lg.item(color: :primary) do %>A simple primary list group item<% end %>
|
4
|
+
<% lg.item(color: :secondary) do %>A simple secondary list group item<% end %>
|
5
|
+
<% lg.item(color: :success) do %>A simple success list group item<% end %>
|
6
|
+
<% lg.item(color: :danger) do %>A simple danger list group item<% end %>
|
7
|
+
<% lg.item(color: :warning) do %>A simple warning list group item<% end %>
|
8
|
+
<% lg.item(color: :info) do %>A simple info list group item<% end %>
|
9
|
+
<% lg.item(color: :light) do %>A simple light list group item<% end %>
|
10
|
+
<% lg.item(color: :dark) do %>A simple dark list group item<% end %>
|
11
11
|
<%- end %>
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<%= bs5_list_group do |lg| %>
|
2
2
|
<% lg.item(class: 'd-flex justify-content-between align-items-center') do %>
|
3
3
|
Cras justo odio
|
4
|
-
<%= bs5_badge(text: 14,
|
4
|
+
<%= bs5_badge(text: 14, color: :primary, pill: true) %>
|
5
5
|
<% end %>
|
6
6
|
<% lg.item(class: 'd-flex justify-content-between align-items-center') do %>
|
7
7
|
Dapibus ac facilisis in
|
8
|
-
<%= bs5_badge(text: 2,
|
8
|
+
<%= bs5_badge(text: 2, color: :primary, pill: true) %>
|
9
9
|
<% end %>
|
10
10
|
<% lg.item(class: 'd-flex justify-content-between align-items-center') do %>
|
11
11
|
Morbi leo risus
|
12
|
-
<%= bs5_badge(text: 1,
|
12
|
+
<%= bs5_badge(text: 1, color: :primary, pill: true) %>
|
13
13
|
<% end %>
|
14
14
|
<%- end %>
|
@@ -1 +1 @@
|
|
1
|
-
<%= bs5_button_tag('Click to toggle popover', bs5_popover(title: 'Popover title', content: "And here's some amazing content. It's very engaging. Right?").merge(type: 'button',
|
1
|
+
<%= bs5_button_tag('Click to toggle popover', bs5_popover(title: 'Popover title', content: "And here's some amazing content. It's very engaging. Right?").merge(type: 'button', color: :danger, size: :large)) %>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<%= bs5_button_tag('Popover on top', bs5_popover(content: "Vivamus sagittis lacus vel augue laoreet rutrum faucibus.", container: :body, placement: :top).merge(type: 'button',
|
1
|
+
<%= bs5_button_tag('Popover on top', bs5_popover(content: "Vivamus sagittis lacus vel augue laoreet rutrum faucibus.", container: :body, placement: :top).merge(type: 'button', color: :secondary)) %>
|
2
2
|
|
3
|
-
<%= bs5_button_tag('Popover on right', bs5_popover(content: "Vivamus sagittis lacus vel augue laoreet rutrum faucibus.", container: :body, placement: :right).merge(type: 'button',
|
3
|
+
<%= bs5_button_tag('Popover on right', bs5_popover(content: "Vivamus sagittis lacus vel augue laoreet rutrum faucibus.", container: :body, placement: :right).merge(type: 'button', color: :secondary)) %>
|
4
4
|
|
5
|
-
<%= bs5_button_tag('Popover on bottom', bs5_popover(content: "Vivamus sagittis lacus vel augue laoreet rutrum faucibus.", container: :body, placement: :bottom).merge(type: 'button',
|
5
|
+
<%= bs5_button_tag('Popover on bottom', bs5_popover(content: "Vivamus sagittis lacus vel augue laoreet rutrum faucibus.", container: :body, placement: :bottom).merge(type: 'button', color: :secondary)) %>
|
6
6
|
|
7
|
-
<%= bs5_button_tag('Popover on left', bs5_popover(content: "Vivamus sagittis lacus vel augue laoreet rutrum faucibus.", container: :body, placement: :left).merge(type: 'button',
|
7
|
+
<%= bs5_button_tag('Popover on left', bs5_popover(content: "Vivamus sagittis lacus vel augue laoreet rutrum faucibus.", container: :body, placement: :left).merge(type: 'button', color: :secondary)) %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= bs5_spinner(text: 'Loading...') %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= bs5_button_tag(disabled: true) do %>
|
2
|
+
<%= bs5_spinner(text: 'Loading...', size: :small) %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<%= bs5_button_tag(disabled: true) do %>
|
6
|
+
<%= bs5_spinner(size: :small) %> Loading...
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<%= bs5_button_tag(disabled: true) do %>
|
10
|
+
<%= bs5_spinner(text: 'Loading...', grow: true, size: :small) %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= bs5_button_tag(disabled: true) do %>
|
14
|
+
<%= bs5_spinner(grow: true, size: :small) %> Loading...
|
15
|
+
<% end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%= bs5_spinner(text: 'Loading...', color: :primary) %>
|
2
|
+
|
3
|
+
<%= bs5_spinner(text: 'Loading...', color: :secondary) %>
|
4
|
+
|
5
|
+
<%= bs5_spinner(text: 'Loading...', color: :success) %>
|
6
|
+
|
7
|
+
<%= bs5_spinner(text: 'Loading...', color: :danger) %>
|
8
|
+
|
9
|
+
<%= bs5_spinner(text: 'Loading...', color: :warning) %>
|
10
|
+
|
11
|
+
<%= bs5_spinner(text: 'Loading...', color: :info) %>
|
12
|
+
|
13
|
+
<%= bs5_spinner(text: 'Loading...', color: :light) %>
|
14
|
+
|
15
|
+
<%= bs5_spinner(text: 'Loading...', color: :dark) %>
|
16
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%= bs5_spinner(text: 'Loading...', color: :primary, grow: true) %>
|
2
|
+
|
3
|
+
<%= bs5_spinner(text: 'Loading...', color: :secondary, grow: true) %>
|
4
|
+
|
5
|
+
<%= bs5_spinner(text: 'Loading...', color: :success, grow: true) %>
|
6
|
+
|
7
|
+
<%= bs5_spinner(text: 'Loading...', color: :danger, grow: true) %>
|
8
|
+
|
9
|
+
<%= bs5_spinner(text: 'Loading...', color: :warning, grow: true) %>
|
10
|
+
|
11
|
+
<%= bs5_spinner(text: 'Loading...', color: :info, grow: true) %>
|
12
|
+
|
13
|
+
<%= bs5_spinner(text: 'Loading...', color: :light, grow: true) %>
|
14
|
+
|
15
|
+
<%= bs5_spinner(text: 'Loading...', color: :dark, grow: true) %>
|
16
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= bs5_spinner(text: 'Loading...', grow: true) %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<h2>Alignment</h2>
|
2
|
+
<h3>Margin</h3>
|
3
|
+
<%= bs5_example(snippet: 'spinners/options/margin') %>
|
4
|
+
<h3>Placement</h3>
|
5
|
+
<h4>Flex</h4>
|
6
|
+
<%= bs5_example(snippet: 'spinners/options/placement_flex1') %>
|
7
|
+
<%= bs5_example(snippet: 'spinners/options/placement_flex2') %>
|
8
|
+
<h4>Floats</h4>
|
9
|
+
<%= bs5_example(snippet: 'spinners/options/floats') %>
|
10
|
+
<%= bs5_example(snippet: 'spinners/options/text_align') %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= bs5_spinner(text: 'Loading...', class: 'm-5') %>
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<%= bs5_button_tag('Tooltip on top', bs5_tooltip('Tooltip on top', placement: :top).merge(
|
1
|
+
<%= bs5_button_tag('Tooltip on top', bs5_tooltip('Tooltip on top', placement: :top).merge(color: :secondary)) %>
|
2
2
|
|
3
|
-
<%= bs5_button_tag('Tooltip on right', bs5_tooltip('Tooltip on right', placement: :right).merge(
|
3
|
+
<%= bs5_button_tag('Tooltip on right', bs5_tooltip('Tooltip on right', placement: :right).merge(color: :secondary)) %>
|
4
4
|
|
5
|
-
<%= bs5_button_tag('Tooltip on bottom', bs5_tooltip('Tooltip on bottom', placement: :bottom).merge(
|
5
|
+
<%= bs5_button_tag('Tooltip on bottom', bs5_tooltip('Tooltip on bottom', placement: :bottom).merge(color: :secondary)) %>
|
6
6
|
|
7
|
-
<%= bs5_button_tag('Tooltip on left', bs5_tooltip('Tooltip on left', placement: :left).merge(
|
7
|
+
<%= bs5_button_tag('Tooltip on left', bs5_tooltip('Tooltip on left', placement: :left).merge(color: :secondary)) %>
|
8
8
|
|
9
|
-
<%= bs5_button_tag('Tooltip with HTML', bs5_tooltip('<em>Tooltip</em> <u>with</u> <b>HTML</b>', html: :true).merge(
|
9
|
+
<%= bs5_button_tag('Tooltip with HTML', bs5_tooltip('<em>Tooltip</em> <u>with</u> <b>HTML</b>', html: :true).merge(color: :secondary)) %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<h1 id='alert'>Alert</h1>
|
2
2
|
<%= render 'bs5/examples/alert/default/example' %>
|
3
|
-
<%= render 'bs5/examples/alert/
|
3
|
+
<%= render 'bs5/examples/alert/color/example' %>
|
4
4
|
<%= render 'bs5/examples/alert/additional_content/example' %>
|
5
5
|
<%= render 'bs5/examples/alert/dismissable/example' %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<h1>Spinners</h1>
|
2
|
+
<%= render 'bs5/examples/spinners/border/example' %>
|
3
|
+
<%= render 'bs5/examples/spinners/colors/example' %>
|
4
|
+
<%= render 'bs5/examples/spinners/growing/example' %>
|
5
|
+
<%= render 'bs5/examples/spinners/options/example' %>
|
6
|
+
<%= render 'bs5/examples/spinners/size/example' %>
|
7
|
+
<%= render 'bs5/examples/spinners/buttons/example' %>
|
@@ -4,6 +4,7 @@
|
|
4
4
|
<title>Bs5</title>
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
6
6
|
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
7
|
+
<%= javascript_include_tag 'bs5/application', 'data-turbolinks-track': 'reload' %>
|
7
8
|
<%= stylesheet_pack_tag 'styles', media: 'all', 'data-turbolinks-track': 'reload' %>
|
8
9
|
<style><%= Rouge::Themes::Github.render(scope: '.highlight') %></style>
|
9
10
|
</head>
|
@@ -23,6 +24,7 @@
|
|
23
24
|
<% lg.item(active: current_page?(pages_path('collapse'))) do %><%= link_to 'Collapse', pages_path('collapse') %><% end %>
|
24
25
|
<% lg.item(active: current_page?(pages_path('list_group'))) do %><%= link_to 'List group', pages_path('list_group') %><% end %>
|
25
26
|
<% lg.item(active: current_page?(pages_path('popovers'))) do %><%= link_to 'Popovers', pages_path('popovers') %><% end %>
|
27
|
+
<% lg.item(active: current_page?(pages_path('spinners'))) do %><%= link_to 'Spinners', pages_path('spinners') %><% end %>
|
26
28
|
<% lg.item(active: current_page?(pages_path('tooltips'))) do %><%= link_to 'Tooltips', pages_path('tooltips') %><% end %>
|
27
29
|
<%- end %>
|
28
30
|
</div>
|
data/lib/bs5/engine.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'view_component/engine'
|
4
|
+
require 'sprockets/railtie'
|
4
5
|
module Bs5
|
5
6
|
class Engine < ::Rails::Engine
|
6
7
|
isolate_namespace Bs5
|
@@ -9,5 +10,10 @@ module Bs5
|
|
9
10
|
config.before_configuration do |app|
|
10
11
|
app.config.view_component.preview_paths << "#{Bs5::Engine.root}/spec/components/previews"
|
11
12
|
end
|
13
|
+
|
14
|
+
initializer 'bs5.assets.precompile' do |app|
|
15
|
+
app.config.assets.paths << Rails.root.join('app/assets/javascripts')
|
16
|
+
app.config.assets.precompile << 'bs5/application.js'
|
17
|
+
end
|
12
18
|
end
|
13
19
|
end
|
data/lib/bs5/version.rb
CHANGED
data/lib/tasks/rubocop.rake
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bs5
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Baselier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -100,20 +100,6 @@ dependencies:
|
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: 4.0.1
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: rubocop-rails
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '2.8'
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - "~>"
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '2.8'
|
117
103
|
- !ruby/object:Gem::Dependency
|
118
104
|
name: sqlite3
|
119
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,6 +125,7 @@ files:
|
|
139
125
|
- README.md
|
140
126
|
- Rakefile
|
141
127
|
- app/assets/config/bs5_manifest.js
|
128
|
+
- app/assets/javascripts/bs5/application.js
|
142
129
|
- app/assets/stylesheets/bs5/application.css
|
143
130
|
- app/components/bs5/accordion_component.html.erb
|
144
131
|
- app/components/bs5/accordion_component.rb
|
@@ -160,6 +147,8 @@ files:
|
|
160
147
|
- app/components/bs5/example_component.rb
|
161
148
|
- app/components/bs5/list_group_component.html.erb
|
162
149
|
- app/components/bs5/list_group_component.rb
|
150
|
+
- app/components/bs5/spinner_component.html.erb
|
151
|
+
- app/components/bs5/spinner_component.rb
|
163
152
|
- app/controllers/bs5/application_controller.rb
|
164
153
|
- app/controllers/bs5/pages_controller.rb
|
165
154
|
- app/helpers/bs5/application_helper.rb
|
@@ -176,19 +165,19 @@ files:
|
|
176
165
|
- app/views/bs5/examples/accordion/flush/snippet.html.erb
|
177
166
|
- app/views/bs5/examples/alert/additional_content/_example.html.erb
|
178
167
|
- app/views/bs5/examples/alert/additional_content/snippet.html.erb
|
168
|
+
- app/views/bs5/examples/alert/color/_example.html.erb
|
169
|
+
- app/views/bs5/examples/alert/color/snippet.html.erb
|
179
170
|
- app/views/bs5/examples/alert/default/_example.html.erb
|
180
171
|
- app/views/bs5/examples/alert/default/snippet.html.erb
|
181
172
|
- app/views/bs5/examples/alert/dismissable/_example.html.erb
|
182
173
|
- app/views/bs5/examples/alert/dismissable/snippet.html.erb
|
183
|
-
- app/views/bs5/examples/
|
184
|
-
- app/views/bs5/examples/
|
174
|
+
- app/views/bs5/examples/badge/color/_example.html.erb
|
175
|
+
- app/views/bs5/examples/badge/color/snippet.html.erb
|
185
176
|
- app/views/bs5/examples/badge/default/_example.html.erb
|
186
177
|
- app/views/bs5/examples/badge/default/button.html.erb
|
187
178
|
- app/views/bs5/examples/badge/default/snippet.html.erb
|
188
179
|
- app/views/bs5/examples/badge/pill/_example.html.erb
|
189
180
|
- app/views/bs5/examples/badge/pill/snippet.html.erb
|
190
|
-
- app/views/bs5/examples/badge/style/_example.html.erb
|
191
|
-
- app/views/bs5/examples/badge/style/snippet.html.erb
|
192
181
|
- app/views/bs5/examples/breadcrumb/default/_example.html.erb
|
193
182
|
- app/views/bs5/examples/breadcrumb/default/snippet.html.erb
|
194
183
|
- app/views/bs5/examples/button_group/button_toolbar/_example.html.erb
|
@@ -258,6 +247,24 @@ files:
|
|
258
247
|
- app/views/bs5/examples/popovers/dismissable_on_next_click/snippet.html.erb
|
259
248
|
- app/views/bs5/examples/popovers/four_directions/_example.html.erb
|
260
249
|
- app/views/bs5/examples/popovers/four_directions/snippet.html.erb
|
250
|
+
- app/views/bs5/examples/spinners/border/_example.html.erb
|
251
|
+
- app/views/bs5/examples/spinners/border/snippet.html.erb
|
252
|
+
- app/views/bs5/examples/spinners/buttons/_example.html.erb
|
253
|
+
- app/views/bs5/examples/spinners/buttons/snippet.html.erb
|
254
|
+
- app/views/bs5/examples/spinners/colors/_example.html.erb
|
255
|
+
- app/views/bs5/examples/spinners/colors/snippet.html.erb
|
256
|
+
- app/views/bs5/examples/spinners/growing/_example.html.erb
|
257
|
+
- app/views/bs5/examples/spinners/growing/colors.html.erb
|
258
|
+
- app/views/bs5/examples/spinners/growing/snippet.html.erb
|
259
|
+
- app/views/bs5/examples/spinners/options/_example.html.erb
|
260
|
+
- app/views/bs5/examples/spinners/options/floats.html.erb
|
261
|
+
- app/views/bs5/examples/spinners/options/margin.html.erb
|
262
|
+
- app/views/bs5/examples/spinners/options/placement_flex1.html.erb
|
263
|
+
- app/views/bs5/examples/spinners/options/placement_flex2.html.erb
|
264
|
+
- app/views/bs5/examples/spinners/options/text_align.html.erb
|
265
|
+
- app/views/bs5/examples/spinners/size/_example.html.erb
|
266
|
+
- app/views/bs5/examples/spinners/size/size1.html.erb
|
267
|
+
- app/views/bs5/examples/spinners/size/size2.html.erb
|
261
268
|
- app/views/bs5/examples/tooltips/default/_example.html.erb
|
262
269
|
- app/views/bs5/examples/tooltips/default/buttons.html.erb
|
263
270
|
- app/views/bs5/examples/tooltips/default/disabled_elements.html.erb
|
@@ -272,6 +279,7 @@ files:
|
|
272
279
|
- app/views/bs5/pages/collapse.html.erb
|
273
280
|
- app/views/bs5/pages/list_group.html.erb
|
274
281
|
- app/views/bs5/pages/popovers.html.erb
|
282
|
+
- app/views/bs5/pages/spinners.html.erb
|
275
283
|
- app/views/bs5/pages/tooltips.html.erb
|
276
284
|
- app/views/layouts/bs5/application.html.erb
|
277
285
|
- app/views/layouts/bs5/pages.html.erb
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<%= bs5_badge(text: 'Primary', style: :primary) %>
|
2
|
-
<%= bs5_badge(text: 'Secondary', style: :secondary) %>
|
3
|
-
<%= bs5_badge(text: 'Success', style: :success) %>
|
4
|
-
<%= bs5_badge(text: 'Danger', style: :danger) %>
|
5
|
-
<%= bs5_badge(text: 'Warning', style: :warning) %>
|
6
|
-
<%= bs5_badge(text: 'Info', style: :info) %>
|
7
|
-
<%= bs5_badge(text: 'Light', style: :light) %>
|
8
|
-
<%= bs5_badge(text: 'Dark', style: :dark) %>
|