stimulus_plumbers 0.2.2 → 0.2.8
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/CHANGELOG.md +38 -0
- data/README.md +57 -41
- data/app/assets/javascripts/stimulus-plumbers/stimulus-plumbers-controllers.es.js +1628 -0
- data/app/assets/javascripts/stimulus-plumbers/stimulus-plumbers-controllers.umd.js +1 -0
- data/lib/stimulus_plumbers/components/combobox/autocomplete.rb +57 -0
- data/lib/stimulus_plumbers/components/combobox/date.rb +52 -0
- data/lib/stimulus_plumbers/components/combobox/dropdown.rb +41 -0
- data/lib/stimulus_plumbers/components/combobox/option.rb +27 -0
- data/lib/stimulus_plumbers/components/combobox/option_group.rb +52 -0
- data/lib/stimulus_plumbers/components/combobox/renderer.rb +78 -0
- data/lib/stimulus_plumbers/components/combobox/time.rb +103 -0
- data/lib/stimulus_plumbers/components/date_picker/navigation.rb +1 -1
- data/lib/stimulus_plumbers/components/plumber/html_options.rb +22 -3
- data/lib/stimulus_plumbers/components/time_picker/renderer.rb +38 -0
- data/lib/stimulus_plumbers/form/builder.rb +57 -12
- data/lib/stimulus_plumbers/form/field_component.rb +12 -10
- data/lib/stimulus_plumbers/form/fields/combobox.rb +41 -0
- data/lib/stimulus_plumbers/form/fields/password.rb +55 -0
- data/lib/stimulus_plumbers/form/fields/renderer.rb +1 -2
- data/lib/stimulus_plumbers/form/fields/search.rb +40 -0
- data/lib/stimulus_plumbers/form/fields/select.rb +8 -2
- data/lib/stimulus_plumbers/form/fields/text.rb +12 -4
- data/lib/stimulus_plumbers/helpers/combobox_helper.rb +74 -0
- data/lib/stimulus_plumbers/helpers.rb +2 -2
- data/lib/stimulus_plumbers/themes/{form.rb → base/form.rb} +6 -2
- data/lib/stimulus_plumbers/themes/base.rb +7 -7
- data/lib/stimulus_plumbers/themes/tailwind/form.rb +10 -6
- data/lib/stimulus_plumbers/version.rb +1 -1
- data/lib/stimulus_plumbers.rb +18 -1
- metadata +25 -15
- data/lib/stimulus_plumbers/components/date_picker/renderer.rb +0 -82
- data/lib/stimulus_plumbers/helpers/date_picker_helper.rb +0 -17
- /data/lib/stimulus_plumbers/themes/{action_list.rb → base/action_list.rb} +0 -0
- /data/lib/stimulus_plumbers/themes/{avatar.rb → base/avatar.rb} +0 -0
- /data/lib/stimulus_plumbers/themes/{button.rb → base/button.rb} +0 -0
- /data/lib/stimulus_plumbers/themes/{calendar.rb → base/calendar.rb} +0 -0
- /data/lib/stimulus_plumbers/themes/{card.rb → base/card.rb} +0 -0
- /data/lib/stimulus_plumbers/themes/{layout.rb → base/layout.rb} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 876f74ed0fa1cd369bf07b4e9aae7ab22c8aa8b7002ef2fdf73e5d629970a989
|
|
4
|
+
data.tar.gz: 4e450baaa66973e5bace682594b37098951358f9fa365b96baaae236b1ce57f3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9d1d75ed7a6e9e2a11e438e35fb58be3648b8c3f6f7641f74b6bb311ef96e7604397b6af8ce49c12fd65d90c79998b9a12c4dbab1ae5d082c066a3663b51f28a
|
|
7
|
+
data.tar.gz: c9f34a4dbe3ab3cb1ce08a391b34696ccb5b11a2e761d5902171e8395023949e25fdb10c423e9617505f97dc7586e15fce39d4da40de2f9d871af40dce10aba5
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
## [0.2.8](https://github.com/ryancyq/stimulus-plumbers/compare/stimulus-plumbers-rails/v0.2.7..stimulus-plumbers-rails/v0.2.8) - 2026-05-10
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- input group ([#46](https://github.com/ryancyq/stimulus-plumbers/issues/46)) - ([a5e24f6](https://github.com/ryancyq/stimulus-plumbers/commit/a5e24f6dbc8b740822333164ceeefd7d20367f1b)) - Ryan Chang
|
|
11
|
+
|
|
12
|
+
### Tests
|
|
13
|
+
|
|
14
|
+
- theme coverage ([#45](https://github.com/ryancyq/stimulus-plumbers/issues/45)) - ([cc86565](https://github.com/ryancyq/stimulus-plumbers/commit/cc86565fd65a5b9dc390e838d379de75576d60ba)) - Ryan Chang
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
## [0.2.2] - 2026-04-14
|
|
18
|
+
|
|
19
|
+
### Dependencies
|
|
20
|
+
|
|
21
|
+
- migrate from rspec to minitest ([#16](https://github.com/ryancyq/stimulus-plumbers/issues/16)) - ([b183919](https://github.com/ryancyq/stimulus-plumbers/commit/b1839196235a7462d58bb2d3f9532388ffd916c2)) - Ryan Chang
|
|
22
|
+
|
|
23
|
+
### Documentation
|
|
24
|
+
|
|
25
|
+
- update claude.md - ([2b36f6d](https://github.com/ryancyq/stimulus-plumbers/commit/2b36f6dcf7ce7c9154c187b011c2f8cf4cc5b9f9)) - Ryan Chang
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
- stimulus plumbers rails gem ([#4](https://github.com/ryancyq/stimulus-plumbers/issues/4)) - ([e492e0f](https://github.com/ryancyq/stimulus-plumbers/commit/e492e0f910a6331328d52725f1931d9cd86c9563)) - Ryan Chang
|
|
30
|
+
- stimulus-rails UI components ([#15](https://github.com/ryancyq/stimulus-plumbers/issues/15)) - ([8e8b58c](https://github.com/ryancyq/stimulus-plumbers/commit/8e8b58c661a7cd8c79d7e65b729e3ea077e596b9)) - Ryan Chang
|
|
31
|
+
- form builder ([#21](https://github.com/ryancyq/stimulus-plumbers/issues/21)) - ([21aa9a6](https://github.com/ryancyq/stimulus-plumbers/commit/21aa9a634eca340e712f922f43ceb7383b56daee)) - Ryan Chang
|
|
32
|
+
|
|
33
|
+
### Tests
|
|
34
|
+
|
|
35
|
+
- a11y ([#17](https://github.com/ryancyq/stimulus-plumbers/issues/17)) - ([4109a8a](https://github.com/ryancyq/stimulus-plumbers/commit/4109a8af8be8aab06ddbcff35e870556a6205852)) - Ryan Chang
|
|
36
|
+
- update rake test task to include system test - ([aa215b0](https://github.com/ryancyq/stimulus-plumbers/commit/aa215b0a84a36f32083327b4e7f03a646187cee9)) - Ryan Chang
|
|
37
|
+
|
|
38
|
+
<!-- generated by git-cliff -->
|
data/README.md
CHANGED
|
@@ -1,75 +1,91 @@
|
|
|
1
|
-
#
|
|
1
|
+
# stimulus-plumbers-rails
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[![Version][rubygems_badge]][rubygems]
|
|
4
|
+
[![CI][ci_badge]][ci]
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Rails helpers for accessible, WCAG 2.1 AA compliant UI components built on [Stimulus](https://stimulus.hotwired.dev/). Pairs with the [`@stimulus-plumbers/controllers`](../stimulus-plumbers) npm package.
|
|
7
|
+
|
|
8
|
+
## Requirements
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
- Ruby >= 3.0
|
|
11
|
+
- Rails >= 6.1
|
|
12
|
+
- `@stimulus-plumbers/controllers` registered in your Stimulus app
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
8
15
|
|
|
9
16
|
```ruby
|
|
10
|
-
|
|
17
|
+
# Gemfile
|
|
18
|
+
gem "stimulus_plumbers"
|
|
11
19
|
```
|
|
12
20
|
|
|
13
|
-
And then execute:
|
|
14
|
-
|
|
15
21
|
```bash
|
|
16
22
|
bundle install
|
|
17
23
|
```
|
|
18
24
|
|
|
19
|
-
|
|
25
|
+
Include the helpers in your `ApplicationHelper`:
|
|
20
26
|
|
|
21
|
-
|
|
27
|
+
```ruby
|
|
28
|
+
module ApplicationHelper
|
|
29
|
+
include StimulusPlumbers::Helpers::ComboboxHelper
|
|
30
|
+
include StimulusPlumbers::Helpers::PopoverHelper
|
|
31
|
+
include StimulusPlumbers::Helpers::CalendarHelper
|
|
32
|
+
end
|
|
33
|
+
```
|
|
22
34
|
|
|
23
|
-
|
|
35
|
+
Or use the form builder globally:
|
|
24
36
|
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Click me
|
|
29
|
-
<% end %>
|
|
37
|
+
```ruby
|
|
38
|
+
# config/application.rb
|
|
39
|
+
config.action_view.default_form_builder = StimulusPlumbers::Form::Builder
|
|
30
40
|
```
|
|
31
41
|
|
|
32
|
-
|
|
42
|
+
## Components
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- **Popover**: Accessible popover component
|
|
44
|
+
| Component | Helper(s) | Docs |
|
|
45
|
+
|-----------|-----------|------|
|
|
46
|
+
| Combobox — date | `sp_combobox_date` | [docs/component/combobox.md](docs/component/combobox.md#sp_combobox_date) |
|
|
47
|
+
| Combobox — dropdown | `sp_combobox_dropdown` | [docs/component/combobox.md](docs/component/combobox.md#sp_combobox_dropdown) |
|
|
48
|
+
| Combobox — autocomplete | `sp_combobox_autocomplete` | [docs/component/combobox.md](docs/component/combobox.md#sp_combobox_autocomplete) |
|
|
49
|
+
| Combobox — time | `sp_combobox_time` | [docs/component/combobox.md](docs/component/combobox.md#sp_combobox_time) |
|
|
50
|
+
| Calendar | `sp_calendar_month` | [docs/component/calendar.md](docs/component/calendar.md) |
|
|
51
|
+
| Popover | `sp_popover` | [docs/component/popover.md](docs/component/popover.md) |
|
|
52
|
+
| Modal | — (JS only) | [docs/component/modal.md](docs/component/modal.md) |
|
|
44
53
|
|
|
45
|
-
##
|
|
54
|
+
## Form Builder
|
|
46
55
|
|
|
47
|
-
|
|
56
|
+
`StimulusPlumbers::Form::Builder` wraps all components as model-aware form fields with automatic label, name/id, error, and ARIA wiring.
|
|
48
57
|
|
|
49
|
-
|
|
50
|
-
2. **Semantic HTML**: Use native elements before ARIA
|
|
51
|
-
3. **Keyboard Navigation**: Full keyboard support
|
|
52
|
-
4. **Screen Reader Friendly**: Proper announcements and labels
|
|
53
|
-
5. **Focus Management**: Visible focus indicators and logical tab order
|
|
58
|
+
→ [docs/component/form_builder.md](docs/component/form_builder.md)
|
|
54
59
|
|
|
55
|
-
##
|
|
60
|
+
## Theming
|
|
61
|
+
|
|
62
|
+
Includes a Tailwind CSS theme out of the box. Supports custom themes by subclassing `Themes::Base`.
|
|
56
63
|
|
|
57
|
-
|
|
64
|
+
→ [docs/component/theme.md](docs/component/theme.md)
|
|
65
|
+
|
|
66
|
+
## Development
|
|
58
67
|
|
|
59
68
|
```bash
|
|
60
69
|
bundle install
|
|
70
|
+
|
|
71
|
+
bundle exec rake test:unit # unit tests
|
|
72
|
+
bundle exec rake test:system # accessibility system tests
|
|
73
|
+
bundle exec rake rubocop # lint
|
|
61
74
|
```
|
|
62
75
|
|
|
63
|
-
|
|
76
|
+
Test against a specific Rails version:
|
|
64
77
|
|
|
65
78
|
```bash
|
|
66
|
-
bundle exec
|
|
79
|
+
BUNDLE_GEMFILE=gemfiles/rails_8.0.gemfile bundle exec rake test:unit
|
|
67
80
|
```
|
|
68
81
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/ryancyq/stimulus-plumbers.
|
|
82
|
+
Available appraisals: `rails_6.1`, `rails_7.0`, `rails_7.1`, `rails_7.2`, `rails_8.0`, `rails_8.1`, `rails_edge`.
|
|
72
83
|
|
|
73
84
|
## License
|
|
74
85
|
|
|
75
|
-
|
|
86
|
+
[MIT](https://opensource.org/licenses/MIT)
|
|
87
|
+
|
|
88
|
+
[rubygems_badge]: https://img.shields.io/gem/v/stimulus_plumbers.svg
|
|
89
|
+
[rubygems]: https://rubygems.org/gems/stimulus_plumbers
|
|
90
|
+
[ci_badge]: https://github.com/ryancyq/stimulus-plumbers/actions/workflows/ci-rails.yml/badge.svg
|
|
91
|
+
[ci]: https://github.com/ryancyq/stimulus-plumbers/actions/workflows/ci-rails.yml
|