plutonium 0.53.0 → 0.54.0
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 +29 -0
- data/app/assets/plutonium.css +1 -1
- data/app/assets/plutonium.js +22 -6
- data/app/assets/plutonium.js.map +3 -3
- data/app/assets/plutonium.min.js +8 -8
- data/app/assets/plutonium.min.js.map +3 -3
- data/app/views/plutonium/_flash_alerts.html.erb +8 -17
- data/app/views/plutonium/_flash_toasts.html.erb +9 -18
- data/docs/superpowers/specs/2026-06-01-interaction-repeater-inputs-design.md +178 -0
- data/gemfiles/rails_8.1.gemfile.lock +1 -1
- data/lib/plutonium/engine/validator.rb +11 -4
- data/lib/plutonium/routing/route_set_extensions.rb +24 -7
- data/lib/plutonium/ui/form/resource.rb +11 -4
- data/lib/plutonium/ui/form/theme.rb +14 -3
- data/lib/plutonium/version.rb +1 -1
- data/package.json +1 -1
- data/src/css/components.css +109 -0
- data/src/js/controllers/capture_url_controller.js +20 -7
- data/src/js/controllers/dirty_form_guard_controller.js +28 -4
- data/src/js/controllers/icon_rail_flyout_controller.js +5 -2
- data/src/js/controllers/remote_modal_controller.js +5 -0
- metadata +4 -3
|
@@ -115,13 +115,16 @@ export default class extends Controller {
|
|
|
115
115
|
panel.style.left = `${triggerRect.right + 4}px`
|
|
116
116
|
panel.style.top = `${triggerRect.top}px`
|
|
117
117
|
|
|
118
|
-
// Shift up if the panel would overflow the viewport bottom
|
|
118
|
+
// Shift up if the panel would overflow the viewport bottom, but never
|
|
119
|
+
// past the top edge — the inner panel scrolls (max-height) when the
|
|
120
|
+
// menu is taller than the viewport.
|
|
119
121
|
requestAnimationFrame(() => {
|
|
120
122
|
const panelRect = panel.getBoundingClientRect()
|
|
121
123
|
const viewportH = window.innerHeight
|
|
122
124
|
if (panelRect.bottom > viewportH - 8) {
|
|
123
125
|
const overflow = panelRect.bottom - (viewportH - 8)
|
|
124
|
-
|
|
126
|
+
const top = Math.max(8, parseFloat(panel.style.top) - overflow)
|
|
127
|
+
panel.style.top = `${top}px`
|
|
125
128
|
}
|
|
126
129
|
})
|
|
127
130
|
}
|
|
@@ -47,6 +47,11 @@ export default class extends Controller {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
#onCancel(event) {
|
|
50
|
+
// `cancel` bubbles, so a descendant firing it — most notably an
|
|
51
|
+
// <input type="file"> whose picker was dismissed — reaches this
|
|
52
|
+
// listener. That is not a request to close the modal; only the
|
|
53
|
+
// dialog's own cancel (Escape) targets the dialog element itself.
|
|
54
|
+
if (event.target !== this.element) return;
|
|
50
55
|
// Another listener (typically dirty-form-guard) already handled
|
|
51
56
|
// this — don't double-process.
|
|
52
57
|
if (event.defaultPrevented) return;
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: plutonium
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.54.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stefan Froelich
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
10
|
+
date: 2026-06-01 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: zeitwerk
|
|
@@ -671,6 +671,7 @@ files:
|
|
|
671
671
|
- docs/superpowers/specs/2026-05-13-docs-restructure-design.md
|
|
672
672
|
- docs/superpowers/specs/2026-05-15-public-pages-overhaul-design.md
|
|
673
673
|
- docs/superpowers/specs/2026-05-29-avatar-component-design.md
|
|
674
|
+
- docs/superpowers/specs/2026-06-01-interaction-repeater-inputs-design.md
|
|
674
675
|
- esbuild.config.js
|
|
675
676
|
- exe/pug
|
|
676
677
|
- gemfiles/rails_7.gemfile
|
|
@@ -1229,7 +1230,7 @@ metadata:
|
|
|
1229
1230
|
homepage_uri: https://radioactive-labs.github.io/plutonium-core/
|
|
1230
1231
|
source_code_uri: https://github.com/radioactive-labs/plutonium-core
|
|
1231
1232
|
post_install_message: |
|
|
1232
|
-
⚠️ Plutonium 0.
|
|
1233
|
+
⚠️ Plutonium 0.54.0 — breaking change
|
|
1233
1234
|
|
|
1234
1235
|
Entity-scoped URL helpers and path params have been renamed from
|
|
1235
1236
|
`<entity>_scope_*` to `<entity>_scoped_*`.
|