administrate-bootstrap-theme 0.1.8 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +72 -31
- data/app/assets/javascripts/administrate-bootstrap-theme/bootstrap.bundle.js +6780 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/_base.scss +2 -10
- data/app/assets/stylesheets/administrate-bootstrap-theme/_variables.scss +8 -1
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_accordion.scss +4 -2
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_alert.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_badge.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_breadcrumb.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_button-group.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_buttons.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_card.scss +7 -6
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_carousel.scss +2 -2
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_close.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_containers.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_dropdown.scss +11 -17
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_forms.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_functions.scss +94 -3
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_grid.scss +33 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_helpers.scss +2 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_images.scss +1 -1
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_list-group.scss +5 -5
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_mixins.scss +2 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_modal.scss +7 -35
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_nav.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_navbar.scss +30 -1
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_offcanvas.scss +19 -13
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_pagination.scss +0 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_placeholders.scss +51 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_popover.scss +10 -10
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_progress.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_reboot.scss +12 -8
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_root.scss +53 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_spinners.scss +2 -2
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_tables.scss +1 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_toasts.scss +3 -3
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_tooltip.scss +4 -4
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_transitions.scss +6 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_type.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_utilities.scss +44 -8
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/_variables.scss +193 -28
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/bootstrap-grid.scss +1 -1
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/bootstrap-reboot.scss +1 -1
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/bootstrap-utilities.scss +1 -1
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/bootstrap.scss +2 -1
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_floating-labels.scss +3 -1
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_form-check.scss +1 -1
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_form-control.scss +1 -1
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_form-range.scss +1 -1
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_form-select.scss +3 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_form-text.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_input-group.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_labels.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/forms/_validation.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_clearfix.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_colored-links.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_position.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_ratio.scss +0 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_stacks.scss +15 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_stretched-link.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_text-truncation.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/helpers/_visually-hidden.scss +0 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_vr.scss +8 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_alert.scss +0 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_backdrop.scss +14 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_border-radius.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_box-shadow.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_breakpoints.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_buttons.scss +1 -1
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_caret.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_clearfix.scss +0 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_color-scheme.scss +7 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_container.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_deprecate.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_forms.scss +15 -5
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_gradients.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_grid.scss +40 -10
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_image.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_list-group.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_lists.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_pagination.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_reset-text.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_resize.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_table-variants.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_text-truncate.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_transition.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_utilities.scss +27 -6
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/mixins/_visually-hidden.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/utilities/_api.scss +0 -0
- data/{node_modules/bootstrap/scss → app/assets/stylesheets/administrate-bootstrap-theme/bootstrap}/vendor/_rfs.scss +55 -13
- data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_autumn.scss +8 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_default.scss +8 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_forest.scss +9 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_industrial.scss +8 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_water.scss +8 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_body.scss +21 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_header.scss +1 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/components/_form.scss +2 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/components/_navigation.scss +22 -3
- data/app/assets/stylesheets/administrate-bootstrap-theme/components/_pagination.scss +1 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_lato.scss +5 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_montserrat.scss +5 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_open_sans.scss +5 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_roboto.scss +5 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_source_sans_pro.scss +5 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/theme.scss +10 -51
- data/lib/administrate-bootstrap-theme/engine.rb +0 -2
- data/lib/administrate-bootstrap-theme/version.rb +2 -1
- data/lib/generators/administrate_bootstrap_theme/install/USAGE +10 -0
- data/lib/generators/administrate_bootstrap_theme/install/install_generator.rb +33 -0
- data/package.json +10 -0
- metadata +113 -199
- data/Rakefile +0 -16
- data/app/assets/javascripts/administrate-bootstrap-theme/theme.js +0 -2
- data/node_modules/bootstrap/js/src/alert.js +0 -141
- data/node_modules/bootstrap/js/src/base-component.js +0 -46
- data/node_modules/bootstrap/js/src/button.js +0 -95
- data/node_modules/bootstrap/js/src/carousel.js +0 -624
- data/node_modules/bootstrap/js/src/collapse.js +0 -410
- data/node_modules/bootstrap/js/src/dom/data.js +0 -57
- data/node_modules/bootstrap/js/src/dom/event-handler.js +0 -331
- data/node_modules/bootstrap/js/src/dom/manipulator.js +0 -80
- data/node_modules/bootstrap/js/src/dom/selector-engine.js +0 -75
- data/node_modules/bootstrap/js/src/dropdown.js +0 -543
- data/node_modules/bootstrap/js/src/modal.js +0 -582
- data/node_modules/bootstrap/js/src/offcanvas.js +0 -279
- data/node_modules/bootstrap/js/src/popover.js +0 -171
- data/node_modules/bootstrap/js/src/scrollspy.js +0 -319
- data/node_modules/bootstrap/js/src/tab.js +0 -220
- data/node_modules/bootstrap/js/src/toast.js +0 -219
- data/node_modules/bootstrap/js/src/tooltip.js +0 -802
- data/node_modules/bootstrap/js/src/util/index.js +0 -253
- data/node_modules/bootstrap/js/src/util/sanitizer.js +0 -127
- data/node_modules/bootstrap/js/src/util/scrollbar.js +0 -70
- data/node_modules/bootstrap/scss/_grid.scss +0 -22
- data/node_modules/bootstrap/scss/_root.scss +0 -16
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module AdministrateBootstrapTheme
|
4
|
+
class InstallGenerator < Rails::Generators::Base
|
5
|
+
source_root File.expand_path('templates', __dir__)
|
6
|
+
|
7
|
+
def append_assets
|
8
|
+
append_file 'config/initializers/assets.rb', <<~FILE
|
9
|
+
Rails.application.config.assets.precompile += %w[
|
10
|
+
administrate-bootstrap-theme.scss
|
11
|
+
administrate-bootstrap-theme/theme.css
|
12
|
+
administrate-bootstrap-theme/bootstrap.bundle.js
|
13
|
+
]
|
14
|
+
FILE
|
15
|
+
end
|
16
|
+
|
17
|
+
def create_stylesheets_assets
|
18
|
+
create_file 'app/assets/stylesheets/administrate-bootstrap-theme.scss', <<~FILE
|
19
|
+
@import 'administrate-bootstrap-theme/colors/default';
|
20
|
+
@import 'administrate-bootstrap-theme/fonts/source_sans_pro';
|
21
|
+
@import 'administrate-bootstrap-theme/theme';
|
22
|
+
FILE
|
23
|
+
end
|
24
|
+
|
25
|
+
def create_initializer
|
26
|
+
initializer 'administrate_bootstrap_theme.rb', <<~FILE
|
27
|
+
Administrate::Engine.stylesheets.clear # required to remove Administrate base styles
|
28
|
+
Administrate::Engine.add_stylesheet('administrate-bootstrap-theme')
|
29
|
+
Administrate::Engine.add_javascript('administrate-bootstrap-theme/bootstrap.bundle.js')
|
30
|
+
FILE
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/package.json
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: administrate-bootstrap-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattia Roccoberton
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04
|
11
|
+
date: 2021-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: administrate
|
@@ -25,104 +25,20 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.14'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: sassc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
34
|
-
type: :
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '6.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: capybara
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '3.33'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '3.33'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: puma
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '4.3'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '4.3'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rspec-rails
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '4.0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '4.0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rubocop
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0.90'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0.90'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: selenium-webdriver
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '3.142'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '3.142'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: sqlite3
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '1.4'
|
118
|
-
type: :development
|
33
|
+
version: 2.3.0
|
34
|
+
type: :runtime
|
119
35
|
prerelease: false
|
120
36
|
version_requirements: !ruby/object:Gem::Requirement
|
121
37
|
requirements:
|
122
38
|
- - "~>"
|
123
39
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
125
|
-
description: A Bootstrap theme for Administrate
|
40
|
+
version: 2.3.0
|
41
|
+
description: 'A Bootstrap theme for Administrate: clean design, easy to install, customizable'
|
126
42
|
email:
|
127
43
|
- mat@blocknot.es
|
128
44
|
executables: []
|
@@ -131,127 +47,125 @@ extra_rdoc_files: []
|
|
131
47
|
files:
|
132
48
|
- MIT-LICENSE
|
133
49
|
- README.md
|
134
|
-
- Rakefile
|
135
50
|
- app/assets/config/administrate-bootstrap-theme_manifest.js
|
136
|
-
- app/assets/javascripts/administrate-bootstrap-theme/
|
51
|
+
- app/assets/javascripts/administrate-bootstrap-theme/bootstrap.bundle.js
|
137
52
|
- app/assets/stylesheets/administrate-bootstrap-theme/_base.scss
|
138
53
|
- app/assets/stylesheets/administrate-bootstrap-theme/_variables.scss
|
54
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_accordion.scss
|
55
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_alert.scss
|
56
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_badge.scss
|
57
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_breadcrumb.scss
|
58
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_button-group.scss
|
59
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_buttons.scss
|
60
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_card.scss
|
61
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_carousel.scss
|
62
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_close.scss
|
63
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_containers.scss
|
64
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_dropdown.scss
|
65
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_forms.scss
|
66
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_functions.scss
|
67
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_grid.scss
|
68
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_helpers.scss
|
69
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_images.scss
|
70
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_list-group.scss
|
71
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_mixins.scss
|
72
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_modal.scss
|
73
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_nav.scss
|
74
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_navbar.scss
|
75
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_offcanvas.scss
|
76
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_pagination.scss
|
77
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_placeholders.scss
|
78
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_popover.scss
|
79
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_progress.scss
|
80
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_reboot.scss
|
81
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_root.scss
|
82
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_spinners.scss
|
83
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_tables.scss
|
84
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_toasts.scss
|
85
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_tooltip.scss
|
86
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_transitions.scss
|
87
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_type.scss
|
88
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_utilities.scss
|
89
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_variables.scss
|
90
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-grid.scss
|
91
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-reboot.scss
|
92
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-utilities.scss
|
93
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap.scss
|
94
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_floating-labels.scss
|
95
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-check.scss
|
96
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-control.scss
|
97
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-range.scss
|
98
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-select.scss
|
99
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-text.scss
|
100
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_input-group.scss
|
101
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_labels.scss
|
102
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_validation.scss
|
103
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_clearfix.scss
|
104
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_colored-links.scss
|
105
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_position.scss
|
106
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_ratio.scss
|
107
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_stacks.scss
|
108
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_stretched-link.scss
|
109
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_text-truncation.scss
|
110
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_visually-hidden.scss
|
111
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_vr.scss
|
112
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_alert.scss
|
113
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_backdrop.scss
|
114
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_border-radius.scss
|
115
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_box-shadow.scss
|
116
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_breakpoints.scss
|
117
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_buttons.scss
|
118
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_caret.scss
|
119
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_clearfix.scss
|
120
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_color-scheme.scss
|
121
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_container.scss
|
122
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_deprecate.scss
|
123
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_forms.scss
|
124
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_gradients.scss
|
125
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_grid.scss
|
126
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_image.scss
|
127
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_list-group.scss
|
128
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_lists.scss
|
129
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_pagination.scss
|
130
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_reset-text.scss
|
131
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_resize.scss
|
132
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_table-variants.scss
|
133
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_text-truncate.scss
|
134
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_transition.scss
|
135
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_utilities.scss
|
136
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_visually-hidden.scss
|
137
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/utilities/_api.scss
|
138
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/vendor/_rfs.scss
|
139
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/colors/_autumn.scss
|
140
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/colors/_default.scss
|
141
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/colors/_forest.scss
|
142
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/colors/_industrial.scss
|
143
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/colors/_water.scss
|
139
144
|
- app/assets/stylesheets/administrate-bootstrap-theme/components/_content_body.scss
|
140
145
|
- app/assets/stylesheets/administrate-bootstrap-theme/components/_content_header.scss
|
141
146
|
- app/assets/stylesheets/administrate-bootstrap-theme/components/_form.scss
|
142
147
|
- app/assets/stylesheets/administrate-bootstrap-theme/components/_navigation.scss
|
143
148
|
- app/assets/stylesheets/administrate-bootstrap-theme/components/_pagination.scss
|
149
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/fonts/_lato.scss
|
150
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/fonts/_montserrat.scss
|
151
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/fonts/_open_sans.scss
|
152
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/fonts/_roboto.scss
|
153
|
+
- app/assets/stylesheets/administrate-bootstrap-theme/fonts/_source_sans_pro.scss
|
144
154
|
- app/assets/stylesheets/administrate-bootstrap-theme/theme.scss
|
145
155
|
- lib/administrate-bootstrap-theme.rb
|
146
156
|
- lib/administrate-bootstrap-theme/engine.rb
|
147
157
|
- lib/administrate-bootstrap-theme/version.rb
|
148
|
-
-
|
149
|
-
-
|
150
|
-
-
|
151
|
-
- node_modules/bootstrap/js/src/carousel.js
|
152
|
-
- node_modules/bootstrap/js/src/collapse.js
|
153
|
-
- node_modules/bootstrap/js/src/dom/data.js
|
154
|
-
- node_modules/bootstrap/js/src/dom/event-handler.js
|
155
|
-
- node_modules/bootstrap/js/src/dom/manipulator.js
|
156
|
-
- node_modules/bootstrap/js/src/dom/selector-engine.js
|
157
|
-
- node_modules/bootstrap/js/src/dropdown.js
|
158
|
-
- node_modules/bootstrap/js/src/modal.js
|
159
|
-
- node_modules/bootstrap/js/src/offcanvas.js
|
160
|
-
- node_modules/bootstrap/js/src/popover.js
|
161
|
-
- node_modules/bootstrap/js/src/scrollspy.js
|
162
|
-
- node_modules/bootstrap/js/src/tab.js
|
163
|
-
- node_modules/bootstrap/js/src/toast.js
|
164
|
-
- node_modules/bootstrap/js/src/tooltip.js
|
165
|
-
- node_modules/bootstrap/js/src/util/index.js
|
166
|
-
- node_modules/bootstrap/js/src/util/sanitizer.js
|
167
|
-
- node_modules/bootstrap/js/src/util/scrollbar.js
|
168
|
-
- node_modules/bootstrap/scss/_accordion.scss
|
169
|
-
- node_modules/bootstrap/scss/_alert.scss
|
170
|
-
- node_modules/bootstrap/scss/_badge.scss
|
171
|
-
- node_modules/bootstrap/scss/_breadcrumb.scss
|
172
|
-
- node_modules/bootstrap/scss/_button-group.scss
|
173
|
-
- node_modules/bootstrap/scss/_buttons.scss
|
174
|
-
- node_modules/bootstrap/scss/_card.scss
|
175
|
-
- node_modules/bootstrap/scss/_carousel.scss
|
176
|
-
- node_modules/bootstrap/scss/_close.scss
|
177
|
-
- node_modules/bootstrap/scss/_containers.scss
|
178
|
-
- node_modules/bootstrap/scss/_dropdown.scss
|
179
|
-
- node_modules/bootstrap/scss/_forms.scss
|
180
|
-
- node_modules/bootstrap/scss/_functions.scss
|
181
|
-
- node_modules/bootstrap/scss/_grid.scss
|
182
|
-
- node_modules/bootstrap/scss/_helpers.scss
|
183
|
-
- node_modules/bootstrap/scss/_images.scss
|
184
|
-
- node_modules/bootstrap/scss/_list-group.scss
|
185
|
-
- node_modules/bootstrap/scss/_mixins.scss
|
186
|
-
- node_modules/bootstrap/scss/_modal.scss
|
187
|
-
- node_modules/bootstrap/scss/_nav.scss
|
188
|
-
- node_modules/bootstrap/scss/_navbar.scss
|
189
|
-
- node_modules/bootstrap/scss/_offcanvas.scss
|
190
|
-
- node_modules/bootstrap/scss/_pagination.scss
|
191
|
-
- node_modules/bootstrap/scss/_popover.scss
|
192
|
-
- node_modules/bootstrap/scss/_progress.scss
|
193
|
-
- node_modules/bootstrap/scss/_reboot.scss
|
194
|
-
- node_modules/bootstrap/scss/_root.scss
|
195
|
-
- node_modules/bootstrap/scss/_spinners.scss
|
196
|
-
- node_modules/bootstrap/scss/_tables.scss
|
197
|
-
- node_modules/bootstrap/scss/_toasts.scss
|
198
|
-
- node_modules/bootstrap/scss/_tooltip.scss
|
199
|
-
- node_modules/bootstrap/scss/_transitions.scss
|
200
|
-
- node_modules/bootstrap/scss/_type.scss
|
201
|
-
- node_modules/bootstrap/scss/_utilities.scss
|
202
|
-
- node_modules/bootstrap/scss/_variables.scss
|
203
|
-
- node_modules/bootstrap/scss/bootstrap-grid.scss
|
204
|
-
- node_modules/bootstrap/scss/bootstrap-reboot.scss
|
205
|
-
- node_modules/bootstrap/scss/bootstrap-utilities.scss
|
206
|
-
- node_modules/bootstrap/scss/bootstrap.scss
|
207
|
-
- node_modules/bootstrap/scss/forms/_floating-labels.scss
|
208
|
-
- node_modules/bootstrap/scss/forms/_form-check.scss
|
209
|
-
- node_modules/bootstrap/scss/forms/_form-control.scss
|
210
|
-
- node_modules/bootstrap/scss/forms/_form-range.scss
|
211
|
-
- node_modules/bootstrap/scss/forms/_form-select.scss
|
212
|
-
- node_modules/bootstrap/scss/forms/_form-text.scss
|
213
|
-
- node_modules/bootstrap/scss/forms/_input-group.scss
|
214
|
-
- node_modules/bootstrap/scss/forms/_labels.scss
|
215
|
-
- node_modules/bootstrap/scss/forms/_validation.scss
|
216
|
-
- node_modules/bootstrap/scss/helpers/_clearfix.scss
|
217
|
-
- node_modules/bootstrap/scss/helpers/_colored-links.scss
|
218
|
-
- node_modules/bootstrap/scss/helpers/_position.scss
|
219
|
-
- node_modules/bootstrap/scss/helpers/_ratio.scss
|
220
|
-
- node_modules/bootstrap/scss/helpers/_stretched-link.scss
|
221
|
-
- node_modules/bootstrap/scss/helpers/_text-truncation.scss
|
222
|
-
- node_modules/bootstrap/scss/helpers/_visually-hidden.scss
|
223
|
-
- node_modules/bootstrap/scss/mixins/_alert.scss
|
224
|
-
- node_modules/bootstrap/scss/mixins/_border-radius.scss
|
225
|
-
- node_modules/bootstrap/scss/mixins/_box-shadow.scss
|
226
|
-
- node_modules/bootstrap/scss/mixins/_breakpoints.scss
|
227
|
-
- node_modules/bootstrap/scss/mixins/_buttons.scss
|
228
|
-
- node_modules/bootstrap/scss/mixins/_caret.scss
|
229
|
-
- node_modules/bootstrap/scss/mixins/_clearfix.scss
|
230
|
-
- node_modules/bootstrap/scss/mixins/_container.scss
|
231
|
-
- node_modules/bootstrap/scss/mixins/_deprecate.scss
|
232
|
-
- node_modules/bootstrap/scss/mixins/_forms.scss
|
233
|
-
- node_modules/bootstrap/scss/mixins/_gradients.scss
|
234
|
-
- node_modules/bootstrap/scss/mixins/_grid.scss
|
235
|
-
- node_modules/bootstrap/scss/mixins/_image.scss
|
236
|
-
- node_modules/bootstrap/scss/mixins/_list-group.scss
|
237
|
-
- node_modules/bootstrap/scss/mixins/_lists.scss
|
238
|
-
- node_modules/bootstrap/scss/mixins/_pagination.scss
|
239
|
-
- node_modules/bootstrap/scss/mixins/_reset-text.scss
|
240
|
-
- node_modules/bootstrap/scss/mixins/_resize.scss
|
241
|
-
- node_modules/bootstrap/scss/mixins/_table-variants.scss
|
242
|
-
- node_modules/bootstrap/scss/mixins/_text-truncate.scss
|
243
|
-
- node_modules/bootstrap/scss/mixins/_transition.scss
|
244
|
-
- node_modules/bootstrap/scss/mixins/_utilities.scss
|
245
|
-
- node_modules/bootstrap/scss/mixins/_visually-hidden.scss
|
246
|
-
- node_modules/bootstrap/scss/utilities/_api.scss
|
247
|
-
- node_modules/bootstrap/scss/vendor/_rfs.scss
|
158
|
+
- lib/generators/administrate_bootstrap_theme/install/USAGE
|
159
|
+
- lib/generators/administrate_bootstrap_theme/install/install_generator.rb
|
160
|
+
- package.json
|
248
161
|
homepage: https://github.com/blocknotes/administrate-bootstrap-theme
|
249
162
|
licenses:
|
250
163
|
- MIT
|
251
164
|
metadata:
|
252
165
|
homepage_uri: https://github.com/blocknotes/administrate-bootstrap-theme
|
253
166
|
source_code_uri: https://github.com/blocknotes/administrate-bootstrap-theme
|
254
|
-
|
167
|
+
rubygems_mfa_required: 'true'
|
168
|
+
post_install_message:
|
255
169
|
rdoc_options: []
|
256
170
|
require_paths:
|
257
171
|
- lib
|
@@ -259,15 +173,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
259
173
|
requirements:
|
260
174
|
- - ">="
|
261
175
|
- !ruby/object:Gem::Version
|
262
|
-
version:
|
176
|
+
version: 2.5.0
|
263
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
178
|
requirements:
|
265
179
|
- - ">="
|
266
180
|
- !ruby/object:Gem::Version
|
267
181
|
version: '0'
|
268
182
|
requirements: []
|
269
|
-
rubygems_version: 3.0.3
|
270
|
-
signing_key:
|
183
|
+
rubygems_version: 3.0.3.1
|
184
|
+
signing_key:
|
271
185
|
specification_version: 4
|
272
|
-
summary: Bootstrap
|
186
|
+
summary: Administrate Bootstrap Theme
|
273
187
|
test_files: []
|
data/Rakefile
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'bundler/gem_tasks'
|
4
|
-
|
5
|
-
begin
|
6
|
-
require 'rspec/core/rake_task'
|
7
|
-
|
8
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
9
|
-
# t.ruby_opts = %w[-w]
|
10
|
-
t.rspec_opts = ['--color', '--format documentation']
|
11
|
-
end
|
12
|
-
|
13
|
-
task default: :spec
|
14
|
-
rescue LoadError
|
15
|
-
puts '! LoadError: no RSpec available'
|
16
|
-
end
|
@@ -1,141 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* --------------------------------------------------------------------------
|
3
|
-
* Bootstrap (v5.0.0-beta3): alert.js
|
4
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
|
-
* --------------------------------------------------------------------------
|
6
|
-
*/
|
7
|
-
|
8
|
-
import {
|
9
|
-
defineJQueryPlugin,
|
10
|
-
emulateTransitionEnd,
|
11
|
-
getElementFromSelector,
|
12
|
-
getTransitionDurationFromElement
|
13
|
-
} from './util/index'
|
14
|
-
import Data from './dom/data'
|
15
|
-
import EventHandler from './dom/event-handler'
|
16
|
-
import BaseComponent from './base-component'
|
17
|
-
|
18
|
-
/**
|
19
|
-
* ------------------------------------------------------------------------
|
20
|
-
* Constants
|
21
|
-
* ------------------------------------------------------------------------
|
22
|
-
*/
|
23
|
-
|
24
|
-
const NAME = 'alert'
|
25
|
-
const DATA_KEY = 'bs.alert'
|
26
|
-
const EVENT_KEY = `.${DATA_KEY}`
|
27
|
-
const DATA_API_KEY = '.data-api'
|
28
|
-
|
29
|
-
const SELECTOR_DISMISS = '[data-bs-dismiss="alert"]'
|
30
|
-
|
31
|
-
const EVENT_CLOSE = `close${EVENT_KEY}`
|
32
|
-
const EVENT_CLOSED = `closed${EVENT_KEY}`
|
33
|
-
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
|
34
|
-
|
35
|
-
const CLASS_NAME_ALERT = 'alert'
|
36
|
-
const CLASS_NAME_FADE = 'fade'
|
37
|
-
const CLASS_NAME_SHOW = 'show'
|
38
|
-
|
39
|
-
/**
|
40
|
-
* ------------------------------------------------------------------------
|
41
|
-
* Class Definition
|
42
|
-
* ------------------------------------------------------------------------
|
43
|
-
*/
|
44
|
-
|
45
|
-
class Alert extends BaseComponent {
|
46
|
-
// Getters
|
47
|
-
|
48
|
-
static get DATA_KEY() {
|
49
|
-
return DATA_KEY
|
50
|
-
}
|
51
|
-
|
52
|
-
// Public
|
53
|
-
|
54
|
-
close(element) {
|
55
|
-
const rootElement = element ? this._getRootElement(element) : this._element
|
56
|
-
const customEvent = this._triggerCloseEvent(rootElement)
|
57
|
-
|
58
|
-
if (customEvent === null || customEvent.defaultPrevented) {
|
59
|
-
return
|
60
|
-
}
|
61
|
-
|
62
|
-
this._removeElement(rootElement)
|
63
|
-
}
|
64
|
-
|
65
|
-
// Private
|
66
|
-
|
67
|
-
_getRootElement(element) {
|
68
|
-
return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`)
|
69
|
-
}
|
70
|
-
|
71
|
-
_triggerCloseEvent(element) {
|
72
|
-
return EventHandler.trigger(element, EVENT_CLOSE)
|
73
|
-
}
|
74
|
-
|
75
|
-
_removeElement(element) {
|
76
|
-
element.classList.remove(CLASS_NAME_SHOW)
|
77
|
-
|
78
|
-
if (!element.classList.contains(CLASS_NAME_FADE)) {
|
79
|
-
this._destroyElement(element)
|
80
|
-
return
|
81
|
-
}
|
82
|
-
|
83
|
-
const transitionDuration = getTransitionDurationFromElement(element)
|
84
|
-
|
85
|
-
EventHandler.one(element, 'transitionend', () => this._destroyElement(element))
|
86
|
-
emulateTransitionEnd(element, transitionDuration)
|
87
|
-
}
|
88
|
-
|
89
|
-
_destroyElement(element) {
|
90
|
-
if (element.parentNode) {
|
91
|
-
element.parentNode.removeChild(element)
|
92
|
-
}
|
93
|
-
|
94
|
-
EventHandler.trigger(element, EVENT_CLOSED)
|
95
|
-
}
|
96
|
-
|
97
|
-
// Static
|
98
|
-
|
99
|
-
static jQueryInterface(config) {
|
100
|
-
return this.each(function () {
|
101
|
-
let data = Data.get(this, DATA_KEY)
|
102
|
-
|
103
|
-
if (!data) {
|
104
|
-
data = new Alert(this)
|
105
|
-
}
|
106
|
-
|
107
|
-
if (config === 'close') {
|
108
|
-
data[config](this)
|
109
|
-
}
|
110
|
-
})
|
111
|
-
}
|
112
|
-
|
113
|
-
static handleDismiss(alertInstance) {
|
114
|
-
return function (event) {
|
115
|
-
if (event) {
|
116
|
-
event.preventDefault()
|
117
|
-
}
|
118
|
-
|
119
|
-
alertInstance.close(this)
|
120
|
-
}
|
121
|
-
}
|
122
|
-
}
|
123
|
-
|
124
|
-
/**
|
125
|
-
* ------------------------------------------------------------------------
|
126
|
-
* Data Api implementation
|
127
|
-
* ------------------------------------------------------------------------
|
128
|
-
*/
|
129
|
-
|
130
|
-
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()))
|
131
|
-
|
132
|
-
/**
|
133
|
-
* ------------------------------------------------------------------------
|
134
|
-
* jQuery
|
135
|
-
* ------------------------------------------------------------------------
|
136
|
-
* add .Alert to jQuery only if jQuery is present
|
137
|
-
*/
|
138
|
-
|
139
|
-
defineJQueryPlugin(NAME, Alert)
|
140
|
-
|
141
|
-
export default Alert
|
@@ -1,46 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* --------------------------------------------------------------------------
|
3
|
-
* Bootstrap (v5.0.0-beta3): base-component.js
|
4
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
|
-
* --------------------------------------------------------------------------
|
6
|
-
*/
|
7
|
-
|
8
|
-
import Data from './dom/data'
|
9
|
-
|
10
|
-
/**
|
11
|
-
* ------------------------------------------------------------------------
|
12
|
-
* Constants
|
13
|
-
* ------------------------------------------------------------------------
|
14
|
-
*/
|
15
|
-
|
16
|
-
const VERSION = '5.0.0-beta3'
|
17
|
-
|
18
|
-
class BaseComponent {
|
19
|
-
constructor(element) {
|
20
|
-
element = typeof element === 'string' ? document.querySelector(element) : element
|
21
|
-
|
22
|
-
if (!element) {
|
23
|
-
return
|
24
|
-
}
|
25
|
-
|
26
|
-
this._element = element
|
27
|
-
Data.set(this._element, this.constructor.DATA_KEY, this)
|
28
|
-
}
|
29
|
-
|
30
|
-
dispose() {
|
31
|
-
Data.remove(this._element, this.constructor.DATA_KEY)
|
32
|
-
this._element = null
|
33
|
-
}
|
34
|
-
|
35
|
-
/** Static */
|
36
|
-
|
37
|
-
static getInstance(element) {
|
38
|
-
return Data.get(element, this.DATA_KEY)
|
39
|
-
}
|
40
|
-
|
41
|
-
static get VERSION() {
|
42
|
-
return VERSION
|
43
|
-
}
|
44
|
-
}
|
45
|
-
|
46
|
-
export default BaseComponent
|