plutonium 0.24.6 → 0.25.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/app/assets/plutonium.css +2 -2
- data/app/assets/plutonium.js +16 -0
- data/app/assets/plutonium.js.map +3 -3
- data/app/assets/plutonium.min.js +28 -28
- data/app/assets/plutonium.min.js.map +4 -4
- data/lib/plutonium/action/interactive.rb +1 -0
- data/lib/plutonium/helpers/turbo_helper.rb +2 -2
- data/lib/plutonium/resource/controllers/interactive_actions.rb +13 -13
- data/lib/plutonium/ui/action_button.rb +7 -1
- data/lib/plutonium/ui/form/base.rb +1 -1
- data/lib/plutonium/ui/layout/base.rb +2 -0
- data/lib/plutonium/ui/page/interactive_action.rb +21 -1
- data/lib/plutonium/version.rb +1 -1
- data/package.json +1 -1
- data/src/js/controllers/register_controllers.js +2 -0
- data/src/js/controllers/remote_modal_controller.js +24 -0
- metadata +3 -2
data/app/assets/plutonium.js
CHANGED
@@ -24278,6 +24278,21 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
24278
24278
|
}
|
24279
24279
|
};
|
24280
24280
|
|
24281
|
+
// src/js/controllers/remote_modal_controller.js
|
24282
|
+
var remote_modal_controller_default = class extends Controller {
|
24283
|
+
connect() {
|
24284
|
+
this.originalScrollPosition = window.scrollY;
|
24285
|
+
this.element.showModal();
|
24286
|
+
this.element.addEventListener("close", this.handleClose.bind(this));
|
24287
|
+
}
|
24288
|
+
disconnect() {
|
24289
|
+
this.element.removeEventListener("close", this.handleClose);
|
24290
|
+
}
|
24291
|
+
handleClose() {
|
24292
|
+
window.scrollTo(0, this.originalScrollPosition);
|
24293
|
+
}
|
24294
|
+
};
|
24295
|
+
|
24281
24296
|
// src/js/controllers/register_controllers.js
|
24282
24297
|
function register_controllers_default(application2) {
|
24283
24298
|
application2.register("password-visibility", password_visibility_controller_default);
|
@@ -24299,6 +24314,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e4.byteLength}`), e4.tif
|
|
24299
24314
|
application2.register("attachment-input", attachment_input_controller_default);
|
24300
24315
|
application2.register("attachment-preview", attachment_preview_controller_default);
|
24301
24316
|
application2.register("attachment-preview-container", attachment_preview_container_controller_default);
|
24317
|
+
application2.register("remote-modal", remote_modal_controller_default);
|
24302
24318
|
}
|
24303
24319
|
|
24304
24320
|
// node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js
|