rails_accordion 0.1.9.pre.beta → 0.1.11.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +13 -0
- data/Gemfile.lock +126 -0
- data/README.md +57 -0
- data/Rakefile +12 -0
- data/app/assets/builds/rails_accordion.css +527 -0
- data/app/assets/builds/rails_accordion.js +19707 -0
- data/app/assets/builds/rails_accordion.js.map +7 -0
- data/app/assets/stylesheets/rails_accordion.css +11 -0
- data/app/components/accordion_component.rb +20 -0
- data/app/components/item_component.rb +38 -0
- data/app/javascript/controllers/accordion_controller.js +43 -0
- data/app/javascript/rails_accordion.js +11 -0
- data/bin/console +15 -0
- data/bin/rails +13 -0
- data/bin/setup +8 -0
- data/lib/generators/rails_accordion/install_generator.rb +17 -0
- data/lib/generators/rails_accordion/templates/accordion_controller.js.tt +38 -0
- data/lib/rails_accordion/version.rb +5 -0
- data/lib/rails_accordion.rb +37 -0
- data/lib/tasks/rails_accordion_tasks.rake +4 -0
- data/rails_accordion.gemspec +26 -0
- data/vendor/assets/javascripts/rails_accordion.js +19707 -0
- data/vendor/assets/javascripts/rails_accordion.js.map +7 -0
- data/vendor/assets/stylesheets/rails_accordion.css +527 -0
- metadata +27 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 284d8cf2918779c43bc9ad68ee5d7e34d0a6b88b518f1477afd8b1d8311f2b81
|
4
|
+
data.tar.gz: c00f66ee4f7017135e24604d363bb9bfa02f3173d2f0bd7cc6eac60327b0afe2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0a1cbbc177318dbfbfcfdc8e196c02a49467288406c5ba9a38e338b0dffd33fa1e98a0c75235a997df031818779b65a8d811979e1f07335f0f4f63266651ef3
|
7
|
+
data.tar.gz: 216f76b79299ac8e6f5a899db55420cbee4743f1fdafa7872ccacd6ae762d85080978a48b8cdc030c0e7a0ddccc4360545f5d8438ed86fab73afef6498d2c49a
|
data/Gemfile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in rails_accordion.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem "rake", "~> 13.0"
|
9
|
+
gem "rspec", "~> 3.0"
|
10
|
+
gem "rubocop", "~> 1.21"
|
11
|
+
gem "stimulus-rails", "~> 1.2"
|
12
|
+
gem "view_component", "~> 2.52"
|
13
|
+
gem "zeitwerk", "~> 2.6"
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rails_accordion (0.1.11.pre.beta)
|
5
|
+
stimulus-rails (~> 1.2)
|
6
|
+
view_component (~> 2.52)
|
7
|
+
zeitwerk (~> 2.6)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actionpack (6.1.7.3)
|
13
|
+
actionview (= 6.1.7.3)
|
14
|
+
activesupport (= 6.1.7.3)
|
15
|
+
rack (~> 2.0, >= 2.0.9)
|
16
|
+
rack-test (>= 0.6.3)
|
17
|
+
rails-dom-testing (~> 2.0)
|
18
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
19
|
+
actionview (6.1.7.3)
|
20
|
+
activesupport (= 6.1.7.3)
|
21
|
+
builder (~> 3.1)
|
22
|
+
erubi (~> 1.4)
|
23
|
+
rails-dom-testing (~> 2.0)
|
24
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
25
|
+
activesupport (6.1.7.3)
|
26
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
27
|
+
i18n (>= 1.6, < 2)
|
28
|
+
minitest (>= 5.1)
|
29
|
+
tzinfo (~> 2.0)
|
30
|
+
zeitwerk (~> 2.3)
|
31
|
+
ast (2.4.2)
|
32
|
+
builder (3.2.4)
|
33
|
+
concurrent-ruby (1.2.2)
|
34
|
+
crass (1.0.6)
|
35
|
+
diff-lcs (1.5.0)
|
36
|
+
erubi (1.12.0)
|
37
|
+
i18n (1.13.0)
|
38
|
+
concurrent-ruby (~> 1.0)
|
39
|
+
json (2.6.3)
|
40
|
+
loofah (2.21.2)
|
41
|
+
crass (~> 1.0.2)
|
42
|
+
nokogiri (>= 1.12.0)
|
43
|
+
method_source (1.0.0)
|
44
|
+
minitest (5.18.0)
|
45
|
+
nokogiri (1.13.10-arm64-darwin)
|
46
|
+
racc (~> 1.4)
|
47
|
+
nokogiri (1.13.10-x86_64-darwin)
|
48
|
+
racc (~> 1.4)
|
49
|
+
nokogiri (1.13.10-x86_64-linux)
|
50
|
+
racc (~> 1.4)
|
51
|
+
parallel (1.23.0)
|
52
|
+
parser (3.2.2.1)
|
53
|
+
ast (~> 2.4.1)
|
54
|
+
racc (1.6.2)
|
55
|
+
rack (2.2.7)
|
56
|
+
rack-test (2.1.0)
|
57
|
+
rack (>= 1.3)
|
58
|
+
rails-dom-testing (2.0.3)
|
59
|
+
activesupport (>= 4.2.0)
|
60
|
+
nokogiri (>= 1.6)
|
61
|
+
rails-html-sanitizer (1.5.0)
|
62
|
+
loofah (~> 2.19, >= 2.19.1)
|
63
|
+
railties (6.1.7.3)
|
64
|
+
actionpack (= 6.1.7.3)
|
65
|
+
activesupport (= 6.1.7.3)
|
66
|
+
method_source
|
67
|
+
rake (>= 12.2)
|
68
|
+
thor (~> 1.0)
|
69
|
+
rainbow (3.1.1)
|
70
|
+
rake (13.0.6)
|
71
|
+
regexp_parser (2.8.0)
|
72
|
+
rexml (3.2.5)
|
73
|
+
rspec (3.12.0)
|
74
|
+
rspec-core (~> 3.12.0)
|
75
|
+
rspec-expectations (~> 3.12.0)
|
76
|
+
rspec-mocks (~> 3.12.0)
|
77
|
+
rspec-core (3.12.2)
|
78
|
+
rspec-support (~> 3.12.0)
|
79
|
+
rspec-expectations (3.12.3)
|
80
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
81
|
+
rspec-support (~> 3.12.0)
|
82
|
+
rspec-mocks (3.12.5)
|
83
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
84
|
+
rspec-support (~> 3.12.0)
|
85
|
+
rspec-support (3.12.0)
|
86
|
+
rubocop (1.50.2)
|
87
|
+
json (~> 2.3)
|
88
|
+
parallel (~> 1.10)
|
89
|
+
parser (>= 3.2.0.0)
|
90
|
+
rainbow (>= 2.2.2, < 4.0)
|
91
|
+
regexp_parser (>= 1.8, < 3.0)
|
92
|
+
rexml (>= 3.2.5, < 4.0)
|
93
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
94
|
+
ruby-progressbar (~> 1.7)
|
95
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
96
|
+
rubocop-ast (1.28.1)
|
97
|
+
parser (>= 3.2.1.0)
|
98
|
+
ruby-progressbar (1.13.0)
|
99
|
+
stimulus-rails (1.2.1)
|
100
|
+
railties (>= 6.0.0)
|
101
|
+
thor (1.2.2)
|
102
|
+
tzinfo (2.0.6)
|
103
|
+
concurrent-ruby (~> 1.0)
|
104
|
+
unicode-display_width (2.4.2)
|
105
|
+
view_component (2.82.0)
|
106
|
+
activesupport (>= 5.2.0, < 8.0)
|
107
|
+
concurrent-ruby (~> 1.0)
|
108
|
+
method_source (~> 1.0)
|
109
|
+
zeitwerk (2.6.8)
|
110
|
+
|
111
|
+
PLATFORMS
|
112
|
+
arm64-darwin-22
|
113
|
+
x86_64-darwin-20
|
114
|
+
x86_64-linux
|
115
|
+
|
116
|
+
DEPENDENCIES
|
117
|
+
rails_accordion!
|
118
|
+
rake (~> 13.0)
|
119
|
+
rspec (~> 3.0)
|
120
|
+
rubocop (~> 1.21)
|
121
|
+
stimulus-rails (~> 1.2)
|
122
|
+
view_component (~> 2.52)
|
123
|
+
zeitwerk (~> 2.6)
|
124
|
+
|
125
|
+
BUNDLED WITH
|
126
|
+
2.4.13
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# RailsAccordion
|
2
|
+
|
3
|
+
rails_accordion is a Ruby gem that provides an easy-to-use accordion component for use in Rails web applications. With this gem, developers can create collapsible sections of content that can be expanded or collapsed with a single click. The accordion is a great way to improve the user experience of your web application, by providing a clean and intuitive way to display complex information.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
```rb
|
8
|
+
gem 'rails_accordion', '~> 0.1.10.pre.beta'
|
9
|
+
```
|
10
|
+
|
11
|
+
```shell
|
12
|
+
bundle install
|
13
|
+
```
|
14
|
+
|
15
|
+
In config/importmap.rb, add:
|
16
|
+
|
17
|
+
```rb
|
18
|
+
pin "rails_accordion", to: "rails_accordion.js"
|
19
|
+
```
|
20
|
+
|
21
|
+
And in app/javascript/application.js, add:
|
22
|
+
```js
|
23
|
+
import 'rails_accordion'
|
24
|
+
```
|
25
|
+
|
26
|
+
## Usage
|
27
|
+
|
28
|
+
```erb
|
29
|
+
<%= accordion class: "bg-white rounded-xl overflow-auto", data: {controller: "tooltip"} do %>
|
30
|
+
<%= accordion_item do |item| %>
|
31
|
+
<% item.header do %>
|
32
|
+
Hello world
|
33
|
+
<% end %>
|
34
|
+
<% item.body do %>
|
35
|
+
Hello accordion body
|
36
|
+
<% end %>
|
37
|
+
<% end %>
|
38
|
+
<% end %>
|
39
|
+
```
|
40
|
+
|
41
|
+
## Development
|
42
|
+
|
43
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
44
|
+
|
45
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
46
|
+
|
47
|
+
## Contributing
|
48
|
+
|
49
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rails_accordion. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/rails_accordion/blob/master/CODE_OF_CONDUCT.md).
|
50
|
+
|
51
|
+
## License
|
52
|
+
|
53
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
54
|
+
|
55
|
+
## Code of Conduct
|
56
|
+
|
57
|
+
Everyone interacting in the RailsAccordion project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/rails_accordion/blob/master/CODE_OF_CONDUCT.md).
|