shoelace-rails 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +11 -61
- data/.gitignore +1 -6
- data/Appraisals +6 -0
- data/CHANGELOG.md +16 -5
- data/Gemfile +0 -3
- data/Rakefile +2 -17
- data/app/helpers/shoelace/form_helper.rb +38 -2
- data/gemfiles/rails_60.gemfile +0 -1
- data/gemfiles/rails_61.gemfile +0 -1
- data/gemfiles/rails_70.gemfile +0 -1
- data/gemfiles/rails_71.gemfile +10 -0
- data/gemfiles/rails_edge.gemfile +0 -1
- data/lib/shoelace/rails/version.rb +1 -1
- data/shoelace-rails.gemspec +1 -1
- data/test/helpers/form_helper_test.rb +39 -10
- metadata +6 -58
- data/dist/.keep +0 -0
- data/dist/types/.keep +0 -0
- data/package.json +0 -50
- data/rollup.config.js +0 -49
- data/src/index.ts +0 -2
- data/src/turbo/index.ts +0 -6
- data/src/turbo/polyfills/formdata-event.js +0 -27
- data/src/turbo/sl-turbo-form.ts +0 -110
- data/src/turbolinks/features/confirm.ts +0 -42
- data/src/turbolinks/features/disable.ts +0 -94
- data/src/turbolinks/features/remote.ts +0 -107
- data/src/turbolinks/index.ts +0 -6
- data/src/turbolinks/selectors.ts +0 -38
- data/src/turbolinks/start.ts +0 -38
- data/src/turbolinks/turbolinks.ts +0 -78
- data/src/turbolinks/utils/ajax.ts +0 -146
- data/src/turbolinks/utils/csp.ts +0 -20
- data/src/turbolinks/utils/csrf.ts +0 -33
- data/src/turbolinks/utils/dom.ts +0 -40
- data/src/turbolinks/utils/event.ts +0 -57
- data/src/turbolinks/utils/form.ts +0 -58
- data/test/dummy_app/Gemfile +0 -19
- data/test/dummy_app/Rakefile +0 -6
- data/test/dummy_app/app/controllers/hotwire_forms_controller.rb +0 -46
- data/test/dummy_app/app/controllers/turbolinks_forms_controller.rb +0 -37
- data/test/dummy_app/app/models/user.rb +0 -16
- data/test/dummy_app/app/packs/entrypoints/hotwire.js +0 -1
- data/test/dummy_app/app/packs/entrypoints/turbolinks.js +0 -5
- data/test/dummy_app/app/views/hotwire_forms/form.html.erb +0 -45
- data/test/dummy_app/app/views/hotwire_forms/show.html.erb +0 -5
- data/test/dummy_app/app/views/layouts/application.html.erb +0 -39
- data/test/dummy_app/app/views/turbolinks_forms/form.html.erb +0 -44
- data/test/dummy_app/app/views/turbolinks_forms/show.html.erb +0 -5
- data/test/dummy_app/bin/rails +0 -5
- data/test/dummy_app/bin/webpack +0 -18
- data/test/dummy_app/bin/yarn +0 -18
- data/test/dummy_app/config/application.rb +0 -16
- data/test/dummy_app/config/boot.rb +0 -4
- data/test/dummy_app/config/environment.rb +0 -2
- data/test/dummy_app/config/environments/development.rb +0 -10
- data/test/dummy_app/config/environments/test.rb +0 -18
- data/test/dummy_app/config/routes.rb +0 -4
- data/test/dummy_app/config/webpack/development.js +0 -5
- data/test/dummy_app/config/webpack/production.js +0 -1
- data/test/dummy_app/config/webpack/test.js +0 -5
- data/test/dummy_app/config/webpacker.yml +0 -33
- data/test/dummy_app/config.ru +0 -6
- data/test/dummy_app/package.json +0 -24
- data/test/dummy_app/test/system/hotwire_form_test.rb +0 -63
- data/test/dummy_app/test/system/turbolinks_form_test.rb +0 -38
- data/test/dummy_app/test/test_helper.rb +0 -68
- data/tsconfig.json +0 -19
- data/yarn.lock +0 -249
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e0b7daab9653d58867634fed2dffbf3455c06cd47f084271650507b68128cdb
|
4
|
+
data.tar.gz: d92ddd6a16d38a0dad1eecfc193534365fb1da246c0ad9a54d09e39d28f7f073
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb8b38ff8c3d03f12ebc72eb85cfe24fe108ba0838054e8878a439fc63083c1fc53be4d507b090da7d67daba440ae09a5cc855e4dcb008382930b0d11d15275c
|
7
|
+
data.tar.gz: 62faa8f43c33c0c2f5d7690368b4b4694de05d8e7c3f68467f1716757d6f08b26bdd4da8ce252087c68e5b79500ef5016866cacb459f28468148e73e4b0ea3da
|
data/.github/workflows/main.yml
CHANGED
@@ -9,6 +9,7 @@ jobs:
|
|
9
9
|
strategy:
|
10
10
|
matrix:
|
11
11
|
ruby_version:
|
12
|
+
- '3.3'
|
12
13
|
- '3.2'
|
13
14
|
- '3.1'
|
14
15
|
- '3.0'
|
@@ -16,17 +17,20 @@ jobs:
|
|
16
17
|
- 'jruby-9.3'
|
17
18
|
- 'jruby-9.4'
|
18
19
|
gemfile:
|
20
|
+
- gemfiles/rails_71.gemfile
|
19
21
|
- gemfiles/rails_70.gemfile
|
20
22
|
- gemfiles/rails_61.gemfile
|
21
23
|
- gemfiles/rails_60.gemfile
|
22
24
|
exclude:
|
25
|
+
- ruby_version: 'jruby-9.3'
|
26
|
+
gemfile: gemfiles/rails_71.gemfile
|
23
27
|
- ruby_version: 'jruby-9.3'
|
24
28
|
gemfile: gemfiles/rails_70.gemfile
|
25
29
|
runs-on: ubuntu-22.04
|
26
30
|
env:
|
27
31
|
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
28
32
|
steps:
|
29
|
-
- uses: actions/checkout@
|
33
|
+
- uses: actions/checkout@v4
|
30
34
|
- name: Set up Ruby
|
31
35
|
uses: ruby/setup-ruby@v1
|
32
36
|
with:
|
@@ -34,89 +38,35 @@ jobs:
|
|
34
38
|
bundler-cache: true
|
35
39
|
- run: bundle exec rake test
|
36
40
|
|
37
|
-
system:
|
38
|
-
needs: unit
|
39
|
-
runs-on: ubuntu-22.04
|
40
|
-
steps:
|
41
|
-
- uses: actions/checkout@v3
|
42
|
-
- name: Set up Ruby
|
43
|
-
uses: ruby/setup-ruby@v1
|
44
|
-
with:
|
45
|
-
ruby-version: 3.2.0
|
46
|
-
bundler-cache: true
|
47
|
-
- name: Install dependencies
|
48
|
-
run: |
|
49
|
-
rm -rf node_modules &&
|
50
|
-
yarn install &&
|
51
|
-
yarn add tslib &&
|
52
|
-
bundle
|
53
|
-
- name: Run the system test in the dummy app
|
54
|
-
run: rake test:system
|
55
|
-
|
56
41
|
rails_edge:
|
57
|
-
needs:
|
42
|
+
needs: unit
|
58
43
|
runs-on: ubuntu-22.04
|
59
44
|
env:
|
60
45
|
BUNDLE_GEMFILE: gemfiles/rails_edge.gemfile
|
61
46
|
steps:
|
62
|
-
- uses: actions/checkout@
|
47
|
+
- uses: actions/checkout@v4
|
63
48
|
- name: Set up Ruby
|
64
49
|
uses: ruby/setup-ruby@v1
|
65
50
|
with:
|
66
|
-
ruby-version: 3.
|
51
|
+
ruby-version: 3.3
|
67
52
|
bundler-cache: true
|
68
53
|
- run: bundle exec rake test || echo "Rails edge test is done."
|
69
54
|
|
70
55
|
ruby_edge:
|
71
|
-
needs:
|
56
|
+
needs: unit
|
72
57
|
strategy:
|
73
58
|
matrix:
|
74
59
|
gemfile:
|
75
60
|
- gemfiles/rails_edge.gemfile
|
76
|
-
- gemfiles/
|
61
|
+
- gemfiles/rails_71.gemfile
|
77
62
|
runs-on: ubuntu-22.04
|
78
63
|
env:
|
79
64
|
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
80
65
|
steps:
|
81
|
-
- uses: actions/checkout@
|
66
|
+
- uses: actions/checkout@v4
|
82
67
|
- name: Set up Ruby
|
83
68
|
uses: ruby/setup-ruby@v1
|
84
69
|
with:
|
85
70
|
ruby-version: 'ruby-head'
|
86
71
|
bundler-cache: true
|
87
72
|
- run: bundle exec rake || echo "Ruby edge test is done."
|
88
|
-
|
89
|
-
# browser_tests:
|
90
|
-
# runs-on: ubuntu-22.04
|
91
|
-
# steps:
|
92
|
-
# - uses: actions/checkout@v3
|
93
|
-
# - name: Set up Ruby
|
94
|
-
# uses: ruby/setup-ruby@v1
|
95
|
-
# with:
|
96
|
-
# ruby-version: 3.2.0
|
97
|
-
# bundler-cache: true
|
98
|
-
# - name: Install dependencies
|
99
|
-
# run: |
|
100
|
-
# rm -rf node_modules &&
|
101
|
-
# yarn install &&
|
102
|
-
# yarn add tslib &&
|
103
|
-
# bundle
|
104
|
-
# - name: 'BrowserStack Env Setup'
|
105
|
-
# uses: 'browserstack/github-actions/setup-env@master'
|
106
|
-
# with:
|
107
|
-
# username: ${{ secrets.BROWSERSTACK_USERNAME }}
|
108
|
-
# access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
|
109
|
-
# - name: 'Start BrowserStackLocal Tunnel'
|
110
|
-
# uses: 'browserstack/github-actions/setup-local@master'
|
111
|
-
# with:
|
112
|
-
# local-testing: 'start'
|
113
|
-
# local-logging-level: 'all-logs'
|
114
|
-
# local-identifier: 'random'
|
115
|
-
# - name: Run the system test in the dummy app
|
116
|
-
# run: rake test:system
|
117
|
-
# env:
|
118
|
-
# BROWSERSTACK_URL: ${{ secrets.BROWSERSTACK_URL }}
|
119
|
-
# - name: 'Stop BrowserStackLocal'
|
120
|
-
# uses: 'browserstack/github-actions/setup-local@master'
|
121
|
-
# with:
|
122
|
-
# local-testing: 'stop'
|
data/.gitignore
CHANGED
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,22 @@
|
|
1
|
-
## v0.
|
1
|
+
## v0.5.0
|
2
2
|
|
3
|
-
_<sup>released at 2023-03-21
|
3
|
+
_<sup>released at 2023-03-21 04:03:27 UTC</sup>_
|
4
|
+
|
5
|
+
#### ⭐️ Features
|
6
|
+
|
7
|
+
- Add support for Ruby 3.3 (`399f25567f964d0ea2e250eba6db28a2bcd038a3`)
|
8
|
+
- Add support for Rails 7.1 (#4)
|
9
|
+
- Add `#grouped_collection_select` (`2b91023d51e1d0a218f2102232241afa82aaf872`)
|
10
|
+
- Make the `<sl-radio>` form helpers compatible with Shoelace [2.0.0-beta.80](https://shoelace.style/resources/changelog#id_2_0_0-beta_80) and above (`ef9a8345f2c5c921847aef15e19cf64a471d6473`)
|
11
|
+
|
12
|
+
## [v0.4.1](https://github.com/yuki24/shoelace-rails/tree/v0.4.1)
|
13
|
+
|
14
|
+
_<sup>released at 2023-03-21 04:03:27 UTC</sup>_
|
4
15
|
|
5
16
|
#### 🐞Bug Fixes
|
6
17
|
|
7
|
-
- Fixes a bug where `FormHelper` may not be defined when someone loads `ActionView` too early (d91ed3b595c01ce2dfc471b12b14311e0660d3d7)
|
8
|
-
- Fixes a bug where the Shoelace rake tasks blow up when the project does not depend on Sprockets or Propshaft (0e64cd6dc38a037171be04eaf1d3f59c3c8529eb, 75adf831b1faa7f5d1faeed26e672d4bc89b9513)
|
18
|
+
- Fixes a bug where `FormHelper` may not be defined when someone loads `ActionView` too early ([<tt>d91ed3b</tt>](https://github.com/yuki24/shoelace-rails/commit/d91ed3b595c01ce2dfc471b12b14311e0660d3d7))
|
19
|
+
- Fixes a bug where the Shoelace rake tasks blow up when the project does not depend on Sprockets or Propshaft ([<tt>0e64cd6</tt>](https://github.com/yuki24/shoelace-rails/commit/0e64cd6dc38a037171be04eaf1d3f59c3c8529eb), [<tt>75adf83</tt>](https://github.com/yuki24/shoelace-rails/commit/75adf831b1faa7f5d1faeed26e672d4bc89b9513))
|
9
20
|
|
10
21
|
## [v0.4.0](https://github.com/yuki24/shoelace-rails/tree/v0.4.0)
|
11
22
|
|
@@ -13,7 +24,7 @@ _<sup>released at 2023-01-07 07:23:50 UTC</sup>_
|
|
13
24
|
|
14
25
|
#### 🚨 Breaking Changes
|
15
26
|
|
16
|
-
- No longer works with `2.0.0-beta.
|
27
|
+
- No longer works with `2.0.0-beta.87` and below.
|
17
28
|
|
18
29
|
#### ⭐️ Features
|
19
30
|
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -6,22 +6,7 @@ require "rake/testtask"
|
|
6
6
|
Rake::TestTask.new(:test) do |t|
|
7
7
|
t.libs << "test"
|
8
8
|
t.libs << "lib"
|
9
|
-
t.test_files = FileList["test/**/*_test.rb"]
|
9
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
task :system do
|
14
|
-
Bundler.with_original_env do
|
15
|
-
sh <<~CMD
|
16
|
-
yarn build &&
|
17
|
-
cd test/dummy_app &&
|
18
|
-
yarn &&
|
19
|
-
bundle &&
|
20
|
-
RAILS_ENV=test rails webpacker:compile
|
21
|
-
rails test:system
|
22
|
-
CMD
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
task default: [:test, :'test:system']
|
12
|
+
task default: [:test]
|
@@ -104,6 +104,20 @@ module Shoelace
|
|
104
104
|
end
|
105
105
|
end
|
106
106
|
|
107
|
+
class ShoelaceGroupedCollectionSelect < ActionView::Helpers::Tags::GroupedCollectionSelect #:nodoc:
|
108
|
+
def option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = nil)
|
109
|
+
@template_object.sl_option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key)
|
110
|
+
end
|
111
|
+
|
112
|
+
def select_content_tag(option_tags, _options, html_options)
|
113
|
+
html_options = html_options.stringify_keys
|
114
|
+
html_options['value'] ||= value
|
115
|
+
add_default_name_and_id(html_options)
|
116
|
+
|
117
|
+
@template_object.content_tag("sl-select", option_tags, html_options)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
107
121
|
class ShoelaceCheckBox < ActionView::Helpers::Tags::CheckBox #:nodoc:
|
108
122
|
def render(&block)
|
109
123
|
options = @options.stringify_keys
|
@@ -137,8 +151,8 @@ module Shoelace
|
|
137
151
|
def render(&block)
|
138
152
|
options = @options.stringify_keys
|
139
153
|
options["value"] = @tag_value
|
140
|
-
options["checked"] = "checked" if input_checked?(options)
|
141
154
|
add_default_name_and_id_for_value(@tag_value, options)
|
155
|
+
options.delete("name")
|
142
156
|
|
143
157
|
@template_object.content_tag('sl-radio', '', options.except("type"), &block)
|
144
158
|
end
|
@@ -164,7 +178,11 @@ module Shoelace
|
|
164
178
|
private
|
165
179
|
|
166
180
|
def render_collection(&block)
|
167
|
-
|
181
|
+
html_options = @html_options.stringify_keys
|
182
|
+
html_options["value"] = value
|
183
|
+
add_default_name_and_id(html_options)
|
184
|
+
|
185
|
+
@template_object.content_tag('sl-radio-group', html_options.with_defaults(label: @method_name.humanize)) { super(&block) }
|
168
186
|
end
|
169
187
|
|
170
188
|
def hidden_field
|
@@ -228,6 +246,10 @@ module Shoelace
|
|
228
246
|
ShoelaceCollectionSelect.new(object_name, method, @template, collection, value_method, text_method, options.with_defaults(object: @object), html_options.with_defaults(label: method.to_s.humanize), &block).render
|
229
247
|
end
|
230
248
|
|
249
|
+
def grouped_collection_select(method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {})
|
250
|
+
ShoelaceGroupedCollectionSelect.new(object_name, method, @template, collection, group_method, group_label_method, option_key_method, option_value_method, options.with_defaults(object: @object), html_options.with_defaults(label: method.to_s.humanize)).render
|
251
|
+
end
|
252
|
+
|
231
253
|
def collection_radio_buttons(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
|
232
254
|
ShoelaceCollectionRadioButtons.new(object_name, method, @template, collection, value_method, text_method, options.with_defaults(object: @object), html_options).render(&block)
|
233
255
|
end
|
@@ -307,6 +329,20 @@ module Shoelace
|
|
307
329
|
end.join("\n").html_safe
|
308
330
|
end
|
309
331
|
|
332
|
+
def sl_option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = nil)
|
333
|
+
body = "".html_safe
|
334
|
+
|
335
|
+
collection.each_with_index do |group, index|
|
336
|
+
option_tags = sl_options_from_collection_for_select(value_for_collection(group, group_method), option_key_method, option_value_method, selected_key)
|
337
|
+
|
338
|
+
body.safe_concat(DIVIDER_TAG) if index > 0
|
339
|
+
body.safe_concat(content_tag("small", value_for_collection(group, group_label_method)))
|
340
|
+
body.safe_concat(option_tags)
|
341
|
+
end
|
342
|
+
|
343
|
+
body
|
344
|
+
end
|
345
|
+
|
310
346
|
# Returns a string of +<sl-option>+ tags compiled by iterating over the collection and assigning the result of
|
311
347
|
# a call to the +value_method+ as the option value and the +text_method+ as the option text.
|
312
348
|
def sl_options_from_collection_for_select(collection, value_method, text_method, selected = nil)
|
data/gemfiles/rails_60.gemfile
CHANGED
data/gemfiles/rails_61.gemfile
CHANGED
data/gemfiles/rails_70.gemfile
CHANGED
data/gemfiles/rails_edge.gemfile
CHANGED
data/shoelace-rails.gemspec
CHANGED
@@ -31,5 +31,5 @@ Gem::Specification.new do |spec|
|
|
31
31
|
|
32
32
|
spec.add_development_dependency "appraisal"
|
33
33
|
spec.add_development_dependency "minitest", ">= 5.14.4"
|
34
|
-
spec.add_development_dependency "rails-dom-testing", ">= 2.0
|
34
|
+
spec.add_development_dependency "rails-dom-testing", ">= 2.2.0"
|
35
35
|
end
|
@@ -46,7 +46,7 @@ class FormHelperTest < ActionView::TestCase
|
|
46
46
|
|
47
47
|
test "#sl_radio_button" do
|
48
48
|
assert_dom_equal(<<~HTML, sl_radio_button(:user, :name, 'userid-314', checked: true) { "Yuki Nishijima" })
|
49
|
-
<sl-radio value="userid-314" checked="checked"
|
49
|
+
<sl-radio value="userid-314" checked="checked" id="user_name_userid-314">Yuki Nishijima</sl-radio>
|
50
50
|
HTML
|
51
51
|
end
|
52
52
|
|
@@ -412,7 +412,7 @@ class FormHelperTest < ActionView::TestCase
|
|
412
412
|
end
|
413
413
|
end
|
414
414
|
|
415
|
-
test "#collection_select with a
|
415
|
+
test "#collection_select with a default value" do
|
416
416
|
users = {
|
417
417
|
1 => "Yuki Nishijima",
|
418
418
|
2 => "Matz",
|
@@ -430,6 +430,35 @@ class FormHelperTest < ActionView::TestCase
|
|
430
430
|
end
|
431
431
|
end
|
432
432
|
|
433
|
+
test "#grouped_collection_select" do
|
434
|
+
users = [
|
435
|
+
OpenStruct.new(
|
436
|
+
group_name: "Main maintainers",
|
437
|
+
members: [
|
438
|
+
OpenStruct.new(id: 1, name: "Matz"),
|
439
|
+
OpenStruct.new(id: 2, name: "Koichi Sasada"),
|
440
|
+
]
|
441
|
+
),
|
442
|
+
OpenStruct.new(
|
443
|
+
group_name: "Default gem maintainers",
|
444
|
+
members: [OpenStruct.new(id: 3, name: "Yuki Nishijima")]
|
445
|
+
),
|
446
|
+
]
|
447
|
+
|
448
|
+
sl_form_for(User.new(name: "2"), url: "/") do |form|
|
449
|
+
assert_dom_equal <<~HTML, form.grouped_collection_select(:name, users, :members, :group_name, :id, :name)
|
450
|
+
<sl-select label="Name" name="user[name]" id="user_name" value="2">
|
451
|
+
<small>Main maintainers</small>
|
452
|
+
<sl-option value="1">Matz</sl-option>
|
453
|
+
<sl-option value="2" checked="checked">Koichi Sasada</sl-option>
|
454
|
+
<sl-divider></sl-divider>
|
455
|
+
<small>Default gem maintainers</small>
|
456
|
+
<sl-option value="3">Yuki Nishijima</sl-option>
|
457
|
+
</sl-select>
|
458
|
+
HTML
|
459
|
+
end
|
460
|
+
end
|
461
|
+
|
433
462
|
test "#collection_radio_buttons" do
|
434
463
|
users = {
|
435
464
|
1 => "Yuki Nishijima",
|
@@ -439,10 +468,10 @@ class FormHelperTest < ActionView::TestCase
|
|
439
468
|
|
440
469
|
sl_form_for(User.new, url: "/") do |form|
|
441
470
|
assert_dom_equal <<~HTML, form.collection_radio_buttons(:name, users, :first, :last)
|
442
|
-
<sl-radio-group label="Name">
|
443
|
-
<sl-radio
|
444
|
-
<sl-radio
|
445
|
-
<sl-radio
|
471
|
+
<sl-radio-group label="Name" name="user[name]" id="user_name">
|
472
|
+
<sl-radio value="1" id="user_name_1">Yuki Nishijima</sl-radio>
|
473
|
+
<sl-radio value="2" id="user_name_2">Matz</sl-radio>
|
474
|
+
<sl-radio value="3" id="user_name_3">Koichi Sasada</sl-radio>
|
446
475
|
</sl-radio-group>
|
447
476
|
HTML
|
448
477
|
end
|
@@ -457,10 +486,10 @@ class FormHelperTest < ActionView::TestCase
|
|
457
486
|
|
458
487
|
sl_form_for(User.new(name: 1), url: "/") do |form|
|
459
488
|
assert_dom_equal <<~HTML, form.collection_radio_buttons(:name, users, :first, :last)
|
460
|
-
<sl-radio-group label="Name">
|
461
|
-
<sl-radio
|
462
|
-
<sl-radio
|
463
|
-
<sl-radio
|
489
|
+
<sl-radio-group label="Name" name="user[name]" value="1" id="user_name">
|
490
|
+
<sl-radio value="1" id="user_name_1">Yuki Nishijima</sl-radio>
|
491
|
+
<sl-radio value="2" id="user_name_2">Matz</sl-radio>
|
492
|
+
<sl-radio value="3" id="user_name_3">Koichi Sasada</sl-radio>
|
464
493
|
</sl-radio-group>
|
465
494
|
HTML
|
466
495
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shoelace-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuki Nishijima
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 2.0
|
75
|
+
version: 2.2.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 2.0
|
82
|
+
version: 2.2.0
|
83
83
|
description: The shoelace-rails gem adds useful view helper methods for using Shoalace
|
84
84
|
Web Components.
|
85
85
|
email:
|
@@ -101,14 +101,13 @@ files:
|
|
101
101
|
- app/helpers/shoelace/tag_helper.rb
|
102
102
|
- bin/console
|
103
103
|
- bin/setup
|
104
|
-
- dist/.keep
|
105
|
-
- dist/types/.keep
|
106
104
|
- gemfiles/rails_50.gemfile
|
107
105
|
- gemfiles/rails_51.gemfile
|
108
106
|
- gemfiles/rails_52.gemfile
|
109
107
|
- gemfiles/rails_60.gemfile
|
110
108
|
- gemfiles/rails_61.gemfile
|
111
109
|
- gemfiles/rails_70.gemfile
|
110
|
+
- gemfiles/rails_71.gemfile
|
112
111
|
- gemfiles/rails_edge.gemfile
|
113
112
|
- lib/shoelace/engine.rb
|
114
113
|
- lib/shoelace/rails.rb
|
@@ -116,61 +115,10 @@ files:
|
|
116
115
|
- lib/shoelace/railtie.rb
|
117
116
|
- lib/shoelace/testing.rb
|
118
117
|
- lib/tasks/shoelace.rake
|
119
|
-
- package.json
|
120
|
-
- rollup.config.js
|
121
118
|
- shoelace-rails.gemspec
|
122
|
-
- src/index.ts
|
123
|
-
- src/turbo/index.ts
|
124
|
-
- src/turbo/polyfills/formdata-event.js
|
125
|
-
- src/turbo/sl-turbo-form.ts
|
126
|
-
- src/turbolinks/features/confirm.ts
|
127
|
-
- src/turbolinks/features/disable.ts
|
128
|
-
- src/turbolinks/features/remote.ts
|
129
|
-
- src/turbolinks/index.ts
|
130
|
-
- src/turbolinks/selectors.ts
|
131
|
-
- src/turbolinks/start.ts
|
132
|
-
- src/turbolinks/turbolinks.ts
|
133
|
-
- src/turbolinks/utils/ajax.ts
|
134
|
-
- src/turbolinks/utils/csp.ts
|
135
|
-
- src/turbolinks/utils/csrf.ts
|
136
|
-
- src/turbolinks/utils/dom.ts
|
137
|
-
- src/turbolinks/utils/event.ts
|
138
|
-
- src/turbolinks/utils/form.ts
|
139
|
-
- test/dummy_app/Gemfile
|
140
|
-
- test/dummy_app/Rakefile
|
141
|
-
- test/dummy_app/app/controllers/hotwire_forms_controller.rb
|
142
|
-
- test/dummy_app/app/controllers/turbolinks_forms_controller.rb
|
143
|
-
- test/dummy_app/app/models/user.rb
|
144
|
-
- test/dummy_app/app/packs/entrypoints/hotwire.js
|
145
|
-
- test/dummy_app/app/packs/entrypoints/turbolinks.js
|
146
|
-
- test/dummy_app/app/views/hotwire_forms/form.html.erb
|
147
|
-
- test/dummy_app/app/views/hotwire_forms/show.html.erb
|
148
|
-
- test/dummy_app/app/views/layouts/application.html.erb
|
149
|
-
- test/dummy_app/app/views/turbolinks_forms/form.html.erb
|
150
|
-
- test/dummy_app/app/views/turbolinks_forms/show.html.erb
|
151
|
-
- test/dummy_app/bin/rails
|
152
|
-
- test/dummy_app/bin/webpack
|
153
|
-
- test/dummy_app/bin/yarn
|
154
|
-
- test/dummy_app/config.ru
|
155
|
-
- test/dummy_app/config/application.rb
|
156
|
-
- test/dummy_app/config/boot.rb
|
157
|
-
- test/dummy_app/config/environment.rb
|
158
|
-
- test/dummy_app/config/environments/development.rb
|
159
|
-
- test/dummy_app/config/environments/test.rb
|
160
|
-
- test/dummy_app/config/routes.rb
|
161
|
-
- test/dummy_app/config/webpack/development.js
|
162
|
-
- test/dummy_app/config/webpack/production.js
|
163
|
-
- test/dummy_app/config/webpack/test.js
|
164
|
-
- test/dummy_app/config/webpacker.yml
|
165
|
-
- test/dummy_app/package.json
|
166
|
-
- test/dummy_app/test/system/hotwire_form_test.rb
|
167
|
-
- test/dummy_app/test/system/turbolinks_form_test.rb
|
168
|
-
- test/dummy_app/test/test_helper.rb
|
169
119
|
- test/helpers/form_helper_test.rb
|
170
120
|
- test/helpers/tag_helper_test.rb
|
171
121
|
- test/test_helper.rb
|
172
|
-
- tsconfig.json
|
173
|
-
- yarn.lock
|
174
122
|
homepage: https://github.com/yuki24/shoelace-rails
|
175
123
|
licenses:
|
176
124
|
- MIT
|
@@ -193,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
193
141
|
- !ruby/object:Gem::Version
|
194
142
|
version: '0'
|
195
143
|
requirements: []
|
196
|
-
rubygems_version: 3.
|
144
|
+
rubygems_version: 3.5.3
|
197
145
|
signing_key:
|
198
146
|
specification_version: 4
|
199
147
|
summary: Rails view helpers Shoelace.style, the design system.
|
data/dist/.keep
DELETED
File without changes
|
data/dist/types/.keep
DELETED
File without changes
|
data/package.json
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "@yuki24/shoelace-rails",
|
3
|
-
"version": "0.1.0-beta.5",
|
4
|
-
"author": "Yuki Nishijima <yuki24@hey.com>",
|
5
|
-
"license": "MIT",
|
6
|
-
"description": "Unobtrusive Javascript and Turbolinks support for shoelace.style",
|
7
|
-
"homepage": "https://github.com/yuki24/shoelace-rails",
|
8
|
-
"module": "dist/shoelace-rails.es2017-esm.js",
|
9
|
-
"main": "dist/shoelace-rails.es2017-umd.js",
|
10
|
-
"types": "dist/types/index.d.ts",
|
11
|
-
"files": [
|
12
|
-
"dist/*.js",
|
13
|
-
"dist/*.js.map",
|
14
|
-
"dist/types/**/*"
|
15
|
-
],
|
16
|
-
"repository": {
|
17
|
-
"type": "git",
|
18
|
-
"url": "git+https://github.com/yuki24/shoelace-rails.git"
|
19
|
-
},
|
20
|
-
"bugs": {
|
21
|
-
"url": "https://github.com/yuki24/shoelace-rails"
|
22
|
-
},
|
23
|
-
"scripts": {
|
24
|
-
"build": "yarn types && rollup -c",
|
25
|
-
"clean": "rm -fr dist",
|
26
|
-
"prettier-project": "yarn run prettier-write 'src/**/*.{ts,tsx,js,jsx}'",
|
27
|
-
"prettier-write": "yarn run prettier --write",
|
28
|
-
"release": "yarn clean && yarn build && npm publish --access public",
|
29
|
-
"types": "tsc --noEmit false --emitDeclarationOnly true --outDir dist/types"
|
30
|
-
},
|
31
|
-
"devDependencies": {
|
32
|
-
"@hotwired/turbo": "^7.0.1",
|
33
|
-
"@rollup/plugin-node-resolve": "^13.0.4",
|
34
|
-
"@rollup/plugin-typescript": "^8.2.5",
|
35
|
-
"@shoelace-style/shoelace": "^2.0.0-beta.52",
|
36
|
-
"prettier": "^2.3.2",
|
37
|
-
"rollup": "^2.56.2",
|
38
|
-
"tslib": "^2.3.1",
|
39
|
-
"turbolinks": "5.x",
|
40
|
-
"typescript": "^4.3.5"
|
41
|
-
},
|
42
|
-
"peerDependencies": {
|
43
|
-
"@hotwired/turbo": "7.x",
|
44
|
-
"turbolinks": "5.x"
|
45
|
-
},
|
46
|
-
"prettier": {
|
47
|
-
"printWidth": 120,
|
48
|
-
"semi": false
|
49
|
-
}
|
50
|
-
}
|