bs5 0.0.9 → 0.0.14
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/app/components/bs5/accordion_component.html.erb +3 -10
- data/app/components/bs5/accordion_component.rb +1 -0
- data/app/components/bs5/button_tag_component.rb +31 -52
- data/app/components/bs5/button_to_component.rb +109 -0
- data/app/components/bs5/list_group_component.html.erb +17 -0
- data/app/components/bs5/list_group_component.rb +143 -0
- data/app/controllers/bs5/pages_controller.rb +11 -0
- data/app/helpers/bs5/components_helper.rb +14 -1
- data/app/service/bs5/collapse_service.rb +47 -0
- data/app/views/bs5/examples/accordion/default/_example.html.erb +1 -1
- data/app/views/bs5/examples/accordion/flush/_example.html.erb +1 -1
- data/app/views/bs5/examples/alert/additional_content/_example.html.erb +1 -1
- data/app/views/bs5/examples/alert/default/_example.html.erb +1 -1
- data/app/views/bs5/examples/alert/dismissable/_example.html.erb +1 -1
- data/app/views/bs5/examples/alert/style/_example.html.erb +1 -1
- data/app/views/bs5/examples/badge/default/_example.html.erb +1 -1
- data/app/views/bs5/examples/badge/pill/_example.html.erb +1 -1
- data/app/views/bs5/examples/badge/style/_example.html.erb +1 -1
- data/app/views/bs5/examples/breadcrumb/default/_example.html.erb +1 -1
- data/app/views/bs5/examples/buttons/button_tag/block_buttons/_example.html.erb +5 -0
- data/app/views/bs5/examples/buttons/{block_buttons → button_tag/block_buttons}/block_buttons.html.erb +0 -0
- data/app/views/bs5/examples/buttons/{block_buttons → button_tag/block_buttons}/responsive_block_buttons_1.html.erb +0 -0
- data/app/views/bs5/examples/buttons/{block_buttons → button_tag/block_buttons}/responsive_block_buttons_2.html.erb +0 -0
- data/app/views/bs5/examples/buttons/{block_buttons → button_tag/block_buttons}/responsive_block_buttons_3.html.erb +0 -0
- data/app/views/bs5/examples/buttons/button_tag/default/_example.html.erb +2 -0
- data/app/views/bs5/examples/buttons/button_tag/default/snippet.html.erb +15 -0
- data/app/views/bs5/examples/buttons/button_tag/outline/_example.html.erb +2 -0
- data/app/views/bs5/examples/buttons/button_tag/outline/snippet.html.erb +19 -0
- data/app/views/bs5/examples/buttons/button_tag/size/_example.html.erb +3 -0
- data/app/views/bs5/examples/buttons/button_tag/size/large.html.erb +3 -0
- data/app/views/bs5/examples/buttons/button_tag/size/small.html.erb +3 -0
- data/app/views/bs5/examples/buttons/button_tag/style/_example.html.erb +2 -0
- data/app/views/bs5/examples/buttons/button_tag/style/snippet.html.erb +19 -0
- data/app/views/bs5/examples/buttons/button_tag/toggle_states/_example.html.erb +2 -0
- data/app/views/bs5/examples/buttons/{toggle_states → button_tag/toggle_states}/snippet.html.erb +0 -0
- data/app/views/bs5/examples/buttons/button_to/default/_example.html.erb +2 -0
- data/app/views/bs5/examples/buttons/button_to/default/snippet.html.erb +11 -0
- data/app/views/bs5/examples/close_button/default/_example.html.erb +1 -1
- data/app/views/bs5/examples/close_button/disabled/_example.html.erb +1 -1
- data/app/views/bs5/examples/close_button/white/_example.html.erb +1 -1
- data/app/views/bs5/examples/collapse/default/_example.html.erb +4 -0
- data/app/views/bs5/examples/collapse/default/multiple_targets.html.erb +21 -0
- data/app/views/bs5/examples/collapse/default/snippet.html.erb +9 -0
- data/app/views/bs5/examples/list_group/actionable/_example.html.erb +3 -0
- data/app/views/bs5/examples/list_group/actionable/button.html.erb +7 -0
- data/app/views/bs5/examples/list_group/actionable/snippet.html.erb +7 -0
- data/app/views/bs5/examples/list_group/active/_example.html.erb +2 -0
- data/app/views/bs5/examples/list_group/active/snippet.html.erb +7 -0
- data/app/views/bs5/examples/list_group/checkboxes_and_radios/_example.html.erb +3 -0
- data/app/views/bs5/examples/list_group/checkboxes_and_radios/default.html.erb +22 -0
- data/app/views/bs5/examples/list_group/checkboxes_and_radios/with_labels.html.erb +32 -0
- data/app/views/bs5/examples/list_group/custom_content/_example.html.erb +2 -0
- data/app/views/bs5/examples/list_group/custom_content/default.html.erb +32 -0
- data/app/views/bs5/examples/list_group/default/_example.html.erb +2 -0
- data/app/views/bs5/examples/list_group/default/snippet.html.erb +7 -0
- data/app/views/bs5/examples/list_group/disabled/_example.html.erb +2 -0
- data/app/views/bs5/examples/list_group/disabled/snippet.html.erb +7 -0
- data/app/views/bs5/examples/list_group/flush/_example.html.erb +2 -0
- data/app/views/bs5/examples/list_group/flush/snippet.html.erb +7 -0
- data/app/views/bs5/examples/list_group/horizontal/_example.html.erb +2 -0
- data/app/views/bs5/examples/list_group/horizontal/snippet.html.erb +30 -0
- data/app/views/bs5/examples/list_group/style/_example.html.erb +3 -0
- data/app/views/bs5/examples/list_group/style/actionable.html.erb +11 -0
- data/app/views/bs5/examples/list_group/style/default.html.erb +11 -0
- data/app/views/bs5/examples/list_group/with_badges/_example.html.erb +2 -0
- data/app/views/bs5/examples/list_group/with_badges/default.html.erb +14 -0
- data/app/views/bs5/examples/tooltips/default/_example.html.erb +4 -0
- data/app/views/bs5/examples/tooltips/default/buttons.html.erb +9 -0
- data/app/views/bs5/examples/tooltips/default/disabled_elements.html.erb +3 -0
- data/app/views/bs5/examples/tooltips/default/snippet.html.erb +7 -0
- data/app/views/bs5/pages/accordion.html.erb +3 -0
- data/app/views/bs5/{examples/_alert.html.erb → pages/alert.html.erb} +1 -1
- data/app/views/bs5/{examples/_badge.html.erb → pages/badge.html.erb} +1 -1
- data/app/views/bs5/pages/breadcrumb.html.erb +2 -0
- data/app/views/bs5/pages/buttons.html.erb +11 -0
- data/app/views/bs5/{examples/_close_button.html.erb → pages/close_button.html.erb} +1 -1
- data/app/views/bs5/pages/collapse.html.erb +2 -0
- data/app/views/bs5/pages/list_group.html.erb +11 -0
- data/app/views/bs5/pages/tooltips.html.erb +2 -0
- data/app/views/layouts/bs5/pages.html.erb +33 -0
- data/config/locales/en.yml +6 -0
- data/config/routes.rb +2 -2
- data/lib/bs5/version.rb +1 -1
- data/lib/generators/bs5/install/install_generator.rb +12 -4
- data/lib/generators/bs5/install/templates/bs5.js +14 -0
- metadata +80 -26
- data/app/controllers/bs5/examples_controller.rb +0 -9
- data/app/views/bs5/examples/_accordion.html.erb +0 -3
- data/app/views/bs5/examples/_breadcrumb.html.erb +0 -2
- data/app/views/bs5/examples/_buttons.html.erb +0 -7
- data/app/views/bs5/examples/buttons/block_buttons/_example.html.erb +0 -5
- data/app/views/bs5/examples/buttons/default/_example.html.erb +0 -2
- data/app/views/bs5/examples/buttons/default/snippet.html.erb +0 -15
- data/app/views/bs5/examples/buttons/outline/_example.html.erb +0 -2
- data/app/views/bs5/examples/buttons/outline/snippet.html.erb +0 -19
- data/app/views/bs5/examples/buttons/size/_example.html.erb +0 -3
- data/app/views/bs5/examples/buttons/size/large.html.erb +0 -3
- data/app/views/bs5/examples/buttons/size/small.html.erb +0 -3
- data/app/views/bs5/examples/buttons/style/_example.html.erb +0 -2
- data/app/views/bs5/examples/buttons/style/snippet.html.erb +0 -19
- data/app/views/bs5/examples/buttons/toggle_states/_example.html.erb +0 -2
- data/app/views/bs5/examples/index.html.erb +0 -23
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= bs5_list_group do |lg| %>
|
2
|
+
<% lg.slot(:item) do %>Cras justo odio<% end %>
|
3
|
+
<% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
|
4
|
+
<% lg.slot(:item) do %>Morbi leo risus<% end %>
|
5
|
+
<% lg.slot(:item) do %>Porta ac consectetur ac<% end %>
|
6
|
+
<% lg.slot(:item) do %>Vestibulum at eros<% end %>
|
7
|
+
<%- end %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= bs5_list_group do |lg| %>
|
2
|
+
<% lg.slot(:item, disabled: true) do %>Cras justo odio<% end %>
|
3
|
+
<% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
|
4
|
+
<% lg.slot(:item) do %>Morbi leo risus<% end %>
|
5
|
+
<% lg.slot(:item) do %>Porta ac consectetur ac<% end %>
|
6
|
+
<% lg.slot(:item) do %>Vestibulum at eros<% end %>
|
7
|
+
<%- end %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= bs5_list_group(flush: true) do |lg| %>
|
2
|
+
<% lg.slot(:item) do %>Cras justo odio<% end %>
|
3
|
+
<% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
|
4
|
+
<% lg.slot(:item) do %>Morbi leo risus<% end %>
|
5
|
+
<% lg.slot(:item) do %>Porta ac consectetur ac<% end %>
|
6
|
+
<% lg.slot(:item) do %>Vestibulum at eros<% end %>
|
7
|
+
<%- end %>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<%= bs5_list_group(horizontal: true) do |lg| %>
|
2
|
+
<% lg.slot(:item) do %>Cras justo odio<% end %>
|
3
|
+
<% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
|
4
|
+
<% lg.slot(:item) do %>Morbi leo risus<% end %>
|
5
|
+
<%- end %>
|
6
|
+
<%= bs5_list_group(horizontal: :sm) do |lg| %>
|
7
|
+
<% lg.slot(:item) do %>Cras justo odio<% end %>
|
8
|
+
<% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
|
9
|
+
<% lg.slot(:item) do %>Morbi leo risus<% end %>
|
10
|
+
<%- end %>
|
11
|
+
<%= bs5_list_group(horizontal: :md) do |lg| %>
|
12
|
+
<% lg.slot(:item) do %>Cras justo odio<% end %>
|
13
|
+
<% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
|
14
|
+
<% lg.slot(:item) do %>Morbi leo risus<% end %>
|
15
|
+
<%- end %>
|
16
|
+
<%= bs5_list_group(horizontal: :lg) do |lg| %>
|
17
|
+
<% lg.slot(:item) do %>Cras justo odio<% end %>
|
18
|
+
<% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
|
19
|
+
<% lg.slot(:item) do %>Morbi leo risus<% end %>
|
20
|
+
<%- end %>
|
21
|
+
<%= bs5_list_group(horizontal: :xl) do |lg| %>
|
22
|
+
<% lg.slot(:item) do %>Cras justo odio<% end %>
|
23
|
+
<% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
|
24
|
+
<% lg.slot(:item) do %>Morbi leo risus<% end %>
|
25
|
+
<%- end %>
|
26
|
+
<%= bs5_list_group(horizontal: :xxl) do |lg| %>
|
27
|
+
<% lg.slot(:item) do %>Cras justo odio<% end %>
|
28
|
+
<% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
|
29
|
+
<% lg.slot(:item) do %>Morbi leo risus<% end %>
|
30
|
+
<%- end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%= bs5_list_group do |lg| %>
|
2
|
+
<% lg.slot(:item) do %><%= link_to 'Dapibus ac facilisis in', '#' %><% end %>
|
3
|
+
<% lg.slot(:item, style: :primary) do %><%= link_to 'A simple primary list group item', '#' %><% end %>
|
4
|
+
<% lg.slot(:item, style: :secondary) do %><%= link_to 'A simple secondary list group item', '#' %><% end %>
|
5
|
+
<% lg.slot(:item, style: :success) do %><%= link_to 'A simple success list group item', '#' %><% end %>
|
6
|
+
<% lg.slot(:item, style: :danger) do %><%= link_to 'A simple danger list group item', '#' %><% end %>
|
7
|
+
<% lg.slot(:item, style: :warning) do %><%= link_to 'A simple warning list group item', '#' %><% end %>
|
8
|
+
<% lg.slot(:item, style: :info) do %><%= link_to 'A simple info list group item', '#' %><% end %>
|
9
|
+
<% lg.slot(:item, style: :light) do %><%= link_to 'A simple light list group item', '#' %><% end %>
|
10
|
+
<% lg.slot(:item, style: :dark) do %><%= link_to 'A simple dark list group item', '#' %><% end %>
|
11
|
+
<%- end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%= bs5_list_group do |lg| %>
|
2
|
+
<% lg.slot(:item) do %>Dapibus ac facilisis in<% end %>
|
3
|
+
<% lg.slot(:item, style: :primary) do %>A simple primary list group item<% end %>
|
4
|
+
<% lg.slot(:item, style: :secondary) do %>A simple secondary list group item<% end %>
|
5
|
+
<% lg.slot(:item, style: :success) do %>A simple success list group item<% end %>
|
6
|
+
<% lg.slot(:item, style: :danger) do %>A simple danger list group item<% end %>
|
7
|
+
<% lg.slot(:item, style: :warning) do %>A simple warning list group item<% end %>
|
8
|
+
<% lg.slot(:item, style: :info) do %>A simple info list group item<% end %>
|
9
|
+
<% lg.slot(:item, style: :light) do %>A simple light list group item<% end %>
|
10
|
+
<% lg.slot(:item, style: :dark) do %>A simple dark list group item<% end %>
|
11
|
+
<%- end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<%= bs5_list_group do |lg| %>
|
2
|
+
<% lg.slot(:item, class: 'd-flex justify-content-between align-items-center') do %>
|
3
|
+
Cras justo odio
|
4
|
+
<%= bs5_badge(text: 14, style: :primary, pill: true) %>
|
5
|
+
<% end %>
|
6
|
+
<% lg.slot(:item, class: 'd-flex justify-content-between align-items-center') do %>
|
7
|
+
Dapibus ac facilisis in
|
8
|
+
<%= bs5_badge(text: 2, style: :primary, pill: true) %>
|
9
|
+
<% end %>
|
10
|
+
<% lg.slot(:item, class: 'd-flex justify-content-between align-items-center') do %>
|
11
|
+
Morbi leo risus
|
12
|
+
<%= bs5_badge(text: 1, style: :primary, pill: true) %>
|
13
|
+
<% end %>
|
14
|
+
<%- end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= bs5_button_tag('Tooltip on top', bs5_tooltip('Tooltip on top', placement: :top).merge(style: :secondary)) %>
|
2
|
+
|
3
|
+
<%= bs5_button_tag('Tooltip on right', bs5_tooltip('Tooltip on right', placement: :right).merge(style: :secondary)) %>
|
4
|
+
|
5
|
+
<%= bs5_button_tag('Tooltip on bottom', bs5_tooltip('Tooltip on bottom', placement: :bottom).merge(style: :secondary)) %>
|
6
|
+
|
7
|
+
<%= bs5_button_tag('Tooltip on left', bs5_tooltip('Tooltip on left', placement: :left).merge(style: :secondary)) %>
|
8
|
+
|
9
|
+
<%= bs5_button_tag('Tooltip with HTML', bs5_tooltip('<em>Tooltip</em> <u>with</u> <b>HTML</b>', html: :true).merge(style: :secondary)) %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<p class="muted">
|
2
|
+
Tight pants next level keffiyeh <%= link_to('you probably', '#', bs5_tooltip('Default tooltip')) %> haven't heard of them.
|
3
|
+
Photo booth beard raw denim letterpress vegan messenger bag stumptown.
|
4
|
+
Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <%= link_to('have a', '#', bs5_tooltip('Another tooltip')) %> terry richardson vinyl chambray.
|
5
|
+
Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray.
|
6
|
+
A really ironic artisan <%= link_to('whatever keytar', '#', bs5_tooltip('Another one here too')) %>, scenester farm-to-table banksy Austin <%= link_to('twitter handle', '#', bs5_tooltip('The last tip!')) %> freegan cred raw denim single-origin coffee viral.
|
7
|
+
</p>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<h1 id='buttons'>Buttons</h1>
|
2
|
+
<h2>Decorating Rails' <code>button_tag</code></h2>
|
3
|
+
<%= render 'bs5/examples/buttons/button_tag/default/example' %>
|
4
|
+
<%= render 'bs5/examples/buttons/button_tag/style/example' %>
|
5
|
+
<%= render 'bs5/examples/buttons/button_tag/outline/example' %>
|
6
|
+
<%= render 'bs5/examples/buttons/button_tag/size/example' %>
|
7
|
+
<%= render 'bs5/examples/buttons/button_tag/block_buttons/example' %>
|
8
|
+
<%= render 'bs5/examples/buttons/button_tag/toggle_states/example' %>
|
9
|
+
|
10
|
+
<h2>Decorating Rails' <code>button_to</code></h2>
|
11
|
+
<%= render 'bs5/examples/buttons/button_to/default/example' %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<h1 id='list_group'>List group</h1>
|
2
|
+
<%= render 'bs5/examples/list_group/default/example' %>
|
3
|
+
<%= render 'bs5/examples/list_group/active/example' %>
|
4
|
+
<%= render 'bs5/examples/list_group/disabled/example' %>
|
5
|
+
<%= render 'bs5/examples/list_group/actionable/example' %>
|
6
|
+
<%= render 'bs5/examples/list_group/flush/example' %>
|
7
|
+
<%= render 'bs5/examples/list_group/horizontal/example' %>
|
8
|
+
<%= render 'bs5/examples/list_group/style/example' %>
|
9
|
+
<%= render 'bs5/examples/list_group/with_badges/example' %>
|
10
|
+
<%= render 'bs5/examples/list_group/custom_content/example' %>
|
11
|
+
<%= render 'bs5/examples/list_group/checkboxes_and_radios/example' %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Bs5</title>
|
5
|
+
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
6
|
+
<%= stylesheet_pack_tag 'styles', media: 'all', 'data-turbolinks-track': 'reload' %>
|
7
|
+
<style><%= Rouge::Themes::Github.render(scope: '.highlight') %></style>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<div class="container">
|
11
|
+
<div class="row">
|
12
|
+
<div class="col">
|
13
|
+
<div class="sticky-top">
|
14
|
+
<%= bs5_list_group(flush: true) do |lg| %>
|
15
|
+
<% lg.slot(:item, active: current_page?(pages_path('accordion'))) do %><%= link_to 'Accordion', pages_path('accordion') %><% end %>
|
16
|
+
<% lg.slot(:item, active: current_page?(pages_path('alert'))) do %><%= link_to 'Alert', pages_path('alert') %><% end %>
|
17
|
+
<% lg.slot(:item, active: current_page?(pages_path('badge'))) do %><%= link_to 'Badge', pages_path('badge') %><% end %>
|
18
|
+
<% lg.slot(:item, active: current_page?(pages_path('breadcrumb'))) do %><%= link_to 'Breadcrumb', pages_path('breadcrumb') %><% end %>
|
19
|
+
<% lg.slot(:item, active: current_page?(pages_path('buttons'))) do %><%= link_to 'Buttons', pages_path('buttons') %><% end %>
|
20
|
+
<% lg.slot(:item, active: current_page?(pages_path('close_button'))) do %><%= link_to 'Close button', pages_path('close_button') %><% end %>
|
21
|
+
<% lg.slot(:item, active: current_page?(pages_path('collapse'))) do %><%= link_to 'Collapse', pages_path('collapse') %><% end %>
|
22
|
+
<% lg.slot(:item, active: current_page?(pages_path('list_group'))) do %><%= link_to 'List group', pages_path('list_group') %><% end %>
|
23
|
+
<% lg.slot(:item, active: current_page?(pages_path('tooltips'))) do %><%= link_to 'Tooltips', pages_path('tooltips') %><% end %>
|
24
|
+
<%- end %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<div class="col-10">
|
28
|
+
<%= yield %>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
</body>
|
33
|
+
</html>
|
data/config/locales/en.yml
CHANGED
@@ -12,3 +12,9 @@ en:
|
|
12
12
|
inclusion: "is not included in the list: %{valid_styles}."
|
13
13
|
size:
|
14
14
|
inclusion: "is not included in the list: %{valid_sizes}."
|
15
|
+
bs5/button_to_component:
|
16
|
+
attributes:
|
17
|
+
style:
|
18
|
+
inclusion: "is not included in the list: %{valid_styles}."
|
19
|
+
size:
|
20
|
+
inclusion: "is not included in the list: %{valid_sizes}."
|
data/config/routes.rb
CHANGED
data/lib/bs5/version.rb
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
module Bs5
|
4
4
|
class InstallGenerator < Rails::Generators::Base
|
5
|
+
source_root File.expand_path('templates', __dir__)
|
6
|
+
|
5
7
|
def add_bootstrap # rubocop:disable Metrics/MethodLength
|
6
8
|
run 'yarn add bootstrap@next popper.js'
|
7
9
|
|
@@ -9,6 +11,16 @@ module Bs5
|
|
9
11
|
@import "~bootstrap/scss/bootstrap";
|
10
12
|
HEREDOC
|
11
13
|
|
14
|
+
copy_file 'bs5.js', 'app/javascript/bs5.js'
|
15
|
+
|
16
|
+
append_file 'app/javascript/packs/application.js', <<~HEREDOC
|
17
|
+
import * as bs5 from "bs5";
|
18
|
+
|
19
|
+
document.addEventListener("turbolinks:load", function () {
|
20
|
+
bs5.start();
|
21
|
+
});
|
22
|
+
HEREDOC
|
23
|
+
|
12
24
|
inject_into_file 'app/views/layouts/application.html.erb', before: '</head>' do
|
13
25
|
<<~HEREDOC
|
14
26
|
<%= stylesheet_pack_tag 'styles', media: 'all', 'data-turbolinks-track': 'reload' %>
|
@@ -27,10 +39,6 @@ module Bs5
|
|
27
39
|
HEREDOC
|
28
40
|
end
|
29
41
|
|
30
|
-
append_file 'app/javascript/packs/application.js', <<~HEREDOC
|
31
|
-
import "bootstrap";
|
32
|
-
HEREDOC
|
33
|
-
|
34
42
|
gsub_file 'config/webpacker.yml', 'extract_css: false', 'extract_css: true'
|
35
43
|
end
|
36
44
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import * as bootstrap from "bootstrap";
|
2
|
+
|
3
|
+
function tooltipify() {
|
4
|
+
const tooltipTriggerList = [].slice.call(
|
5
|
+
document.querySelectorAll('[data-toggle="tooltip"]')
|
6
|
+
);
|
7
|
+
tooltipTriggerList.map(function (tooltipTriggerEl) {
|
8
|
+
return new bootstrap.Tooltip(tooltipTriggerEl);
|
9
|
+
});
|
10
|
+
}
|
11
|
+
|
12
|
+
export function start() {
|
13
|
+
tooltipify();
|
14
|
+
}
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
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.14
|
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-
|
11
|
+
date: 2020-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: nokogiri
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.10.10
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.10.10
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rails
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,23 +149,21 @@ files:
|
|
135
149
|
- app/components/bs5/breadcrumb_component.html.erb
|
136
150
|
- app/components/bs5/breadcrumb_component.rb
|
137
151
|
- app/components/bs5/button_tag_component.rb
|
152
|
+
- app/components/bs5/button_to_component.rb
|
138
153
|
- app/components/bs5/close_button_component.html.erb
|
139
154
|
- app/components/bs5/close_button_component.rb
|
140
155
|
- app/components/bs5/example_component.html.erb
|
141
156
|
- app/components/bs5/example_component.rb
|
157
|
+
- app/components/bs5/list_group_component.html.erb
|
158
|
+
- app/components/bs5/list_group_component.rb
|
142
159
|
- app/controllers/bs5/application_controller.rb
|
143
|
-
- app/controllers/bs5/
|
160
|
+
- app/controllers/bs5/pages_controller.rb
|
144
161
|
- app/helpers/bs5/application_helper.rb
|
145
162
|
- app/helpers/bs5/components_helper.rb
|
146
163
|
- app/helpers/bs5/examples_helper.rb
|
147
164
|
- app/models/bs5/application_record.rb
|
165
|
+
- app/service/bs5/collapse_service.rb
|
148
166
|
- app/validators/style_validator.rb
|
149
|
-
- app/views/bs5/examples/_accordion.html.erb
|
150
|
-
- app/views/bs5/examples/_alert.html.erb
|
151
|
-
- app/views/bs5/examples/_badge.html.erb
|
152
|
-
- app/views/bs5/examples/_breadcrumb.html.erb
|
153
|
-
- app/views/bs5/examples/_buttons.html.erb
|
154
|
-
- app/views/bs5/examples/_close_button.html.erb
|
155
167
|
- app/views/bs5/examples/accordion/default/_example.html.erb
|
156
168
|
- app/views/bs5/examples/accordion/default/snippet.html.erb
|
157
169
|
- app/views/bs5/examples/accordion/flush/_example.html.erb
|
@@ -172,30 +184,71 @@ files:
|
|
172
184
|
- app/views/bs5/examples/badge/style/snippet.html.erb
|
173
185
|
- app/views/bs5/examples/breadcrumb/default/_example.html.erb
|
174
186
|
- app/views/bs5/examples/breadcrumb/default/snippet.html.erb
|
175
|
-
- app/views/bs5/examples/buttons/block_buttons/_example.html.erb
|
176
|
-
- app/views/bs5/examples/buttons/block_buttons/block_buttons.html.erb
|
177
|
-
- app/views/bs5/examples/buttons/block_buttons/responsive_block_buttons_1.html.erb
|
178
|
-
- app/views/bs5/examples/buttons/block_buttons/responsive_block_buttons_2.html.erb
|
179
|
-
- app/views/bs5/examples/buttons/block_buttons/responsive_block_buttons_3.html.erb
|
180
|
-
- app/views/bs5/examples/buttons/default/_example.html.erb
|
181
|
-
- app/views/bs5/examples/buttons/default/snippet.html.erb
|
182
|
-
- app/views/bs5/examples/buttons/outline/_example.html.erb
|
183
|
-
- app/views/bs5/examples/buttons/outline/snippet.html.erb
|
184
|
-
- app/views/bs5/examples/buttons/size/_example.html.erb
|
185
|
-
- app/views/bs5/examples/buttons/size/large.html.erb
|
186
|
-
- app/views/bs5/examples/buttons/size/small.html.erb
|
187
|
-
- app/views/bs5/examples/buttons/style/_example.html.erb
|
188
|
-
- app/views/bs5/examples/buttons/style/snippet.html.erb
|
189
|
-
- app/views/bs5/examples/buttons/toggle_states/_example.html.erb
|
190
|
-
- app/views/bs5/examples/buttons/toggle_states/snippet.html.erb
|
187
|
+
- app/views/bs5/examples/buttons/button_tag/block_buttons/_example.html.erb
|
188
|
+
- app/views/bs5/examples/buttons/button_tag/block_buttons/block_buttons.html.erb
|
189
|
+
- app/views/bs5/examples/buttons/button_tag/block_buttons/responsive_block_buttons_1.html.erb
|
190
|
+
- app/views/bs5/examples/buttons/button_tag/block_buttons/responsive_block_buttons_2.html.erb
|
191
|
+
- app/views/bs5/examples/buttons/button_tag/block_buttons/responsive_block_buttons_3.html.erb
|
192
|
+
- app/views/bs5/examples/buttons/button_tag/default/_example.html.erb
|
193
|
+
- app/views/bs5/examples/buttons/button_tag/default/snippet.html.erb
|
194
|
+
- app/views/bs5/examples/buttons/button_tag/outline/_example.html.erb
|
195
|
+
- app/views/bs5/examples/buttons/button_tag/outline/snippet.html.erb
|
196
|
+
- app/views/bs5/examples/buttons/button_tag/size/_example.html.erb
|
197
|
+
- app/views/bs5/examples/buttons/button_tag/size/large.html.erb
|
198
|
+
- app/views/bs5/examples/buttons/button_tag/size/small.html.erb
|
199
|
+
- app/views/bs5/examples/buttons/button_tag/style/_example.html.erb
|
200
|
+
- app/views/bs5/examples/buttons/button_tag/style/snippet.html.erb
|
201
|
+
- app/views/bs5/examples/buttons/button_tag/toggle_states/_example.html.erb
|
202
|
+
- app/views/bs5/examples/buttons/button_tag/toggle_states/snippet.html.erb
|
203
|
+
- app/views/bs5/examples/buttons/button_to/default/_example.html.erb
|
204
|
+
- app/views/bs5/examples/buttons/button_to/default/snippet.html.erb
|
191
205
|
- app/views/bs5/examples/close_button/default/_example.html.erb
|
192
206
|
- app/views/bs5/examples/close_button/default/snippet.html.erb
|
193
207
|
- app/views/bs5/examples/close_button/disabled/_example.html.erb
|
194
208
|
- app/views/bs5/examples/close_button/disabled/snippet.html.erb
|
195
209
|
- app/views/bs5/examples/close_button/white/_example.html.erb
|
196
210
|
- app/views/bs5/examples/close_button/white/snippet.html.erb
|
197
|
-
- app/views/bs5/examples/
|
211
|
+
- app/views/bs5/examples/collapse/default/_example.html.erb
|
212
|
+
- app/views/bs5/examples/collapse/default/multiple_targets.html.erb
|
213
|
+
- app/views/bs5/examples/collapse/default/snippet.html.erb
|
214
|
+
- app/views/bs5/examples/list_group/actionable/_example.html.erb
|
215
|
+
- app/views/bs5/examples/list_group/actionable/button.html.erb
|
216
|
+
- app/views/bs5/examples/list_group/actionable/snippet.html.erb
|
217
|
+
- app/views/bs5/examples/list_group/active/_example.html.erb
|
218
|
+
- app/views/bs5/examples/list_group/active/snippet.html.erb
|
219
|
+
- app/views/bs5/examples/list_group/checkboxes_and_radios/_example.html.erb
|
220
|
+
- app/views/bs5/examples/list_group/checkboxes_and_radios/default.html.erb
|
221
|
+
- app/views/bs5/examples/list_group/checkboxes_and_radios/with_labels.html.erb
|
222
|
+
- app/views/bs5/examples/list_group/custom_content/_example.html.erb
|
223
|
+
- app/views/bs5/examples/list_group/custom_content/default.html.erb
|
224
|
+
- app/views/bs5/examples/list_group/default/_example.html.erb
|
225
|
+
- app/views/bs5/examples/list_group/default/snippet.html.erb
|
226
|
+
- app/views/bs5/examples/list_group/disabled/_example.html.erb
|
227
|
+
- app/views/bs5/examples/list_group/disabled/snippet.html.erb
|
228
|
+
- app/views/bs5/examples/list_group/flush/_example.html.erb
|
229
|
+
- app/views/bs5/examples/list_group/flush/snippet.html.erb
|
230
|
+
- app/views/bs5/examples/list_group/horizontal/_example.html.erb
|
231
|
+
- app/views/bs5/examples/list_group/horizontal/snippet.html.erb
|
232
|
+
- app/views/bs5/examples/list_group/style/_example.html.erb
|
233
|
+
- app/views/bs5/examples/list_group/style/actionable.html.erb
|
234
|
+
- app/views/bs5/examples/list_group/style/default.html.erb
|
235
|
+
- app/views/bs5/examples/list_group/with_badges/_example.html.erb
|
236
|
+
- app/views/bs5/examples/list_group/with_badges/default.html.erb
|
237
|
+
- app/views/bs5/examples/tooltips/default/_example.html.erb
|
238
|
+
- app/views/bs5/examples/tooltips/default/buttons.html.erb
|
239
|
+
- app/views/bs5/examples/tooltips/default/disabled_elements.html.erb
|
240
|
+
- app/views/bs5/examples/tooltips/default/snippet.html.erb
|
241
|
+
- app/views/bs5/pages/accordion.html.erb
|
242
|
+
- app/views/bs5/pages/alert.html.erb
|
243
|
+
- app/views/bs5/pages/badge.html.erb
|
244
|
+
- app/views/bs5/pages/breadcrumb.html.erb
|
245
|
+
- app/views/bs5/pages/buttons.html.erb
|
246
|
+
- app/views/bs5/pages/close_button.html.erb
|
247
|
+
- app/views/bs5/pages/collapse.html.erb
|
248
|
+
- app/views/bs5/pages/list_group.html.erb
|
249
|
+
- app/views/bs5/pages/tooltips.html.erb
|
198
250
|
- app/views/layouts/bs5/application.html.erb
|
251
|
+
- app/views/layouts/bs5/pages.html.erb
|
199
252
|
- config/definitions.rb
|
200
253
|
- config/locales/en.yml
|
201
254
|
- config/routes.rb
|
@@ -204,6 +257,7 @@ files:
|
|
204
257
|
- lib/bs5/version.rb
|
205
258
|
- lib/generators/bs5/install/USAGE
|
206
259
|
- lib/generators/bs5/install/install_generator.rb
|
260
|
+
- lib/generators/bs5/install/templates/bs5.js
|
207
261
|
- lib/tasks/bs5_tasks.rake
|
208
262
|
- lib/tasks/ci.rake
|
209
263
|
- lib/tasks/rubocop.rake
|