plutonium 0.25.0 → 0.25.1

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.
@@ -1,7 +1,7 @@
1
1
  module Plutonium
2
2
  module Helpers
3
3
  module TurboStreamActionsHelper
4
- def redirect(url)
4
+ def turbo_stream_redirect(url)
5
5
  turbo_stream_action_tag :redirect, url:
6
6
  end
7
7
  end
@@ -59,7 +59,7 @@ module Plutonium
59
59
  if helpers.current_turbo_frame == "remote_modal"
60
60
  format.turbo_stream do
61
61
  render turbo_stream: [
62
- turbo_stream.redirect(return_url)
62
+ helpers.turbo_stream_redirect(return_url)
63
63
  ]
64
64
  end
65
65
  end
@@ -73,13 +73,6 @@ module Plutonium
73
73
  render "errors", status: :unprocessable_entity
74
74
  end
75
75
 
76
- if helpers.current_turbo_frame == "remote_modal"
77
- format.turbo_stream do
78
- render turbo_stream: [
79
- turbo_stream.replace(:remote_modal, partial: "interactive_action_form")
80
- ]
81
- end
82
- end
83
76
  end
84
77
  end
85
78
  end
@@ -123,7 +116,7 @@ module Plutonium
123
116
  if helpers.current_turbo_frame == "remote_modal"
124
117
  format.turbo_stream do
125
118
  render turbo_stream: [
126
- turbo_stream.redirect(return_url)
119
+ helpers.turbo_stream_redirect(return_url)
127
120
  ]
128
121
  end
129
122
  end
@@ -137,13 +130,6 @@ module Plutonium
137
130
  render "errors", status: :unprocessable_entity
138
131
  end
139
132
 
140
- if helpers.current_turbo_frame == "remote_modal"
141
- format.turbo_stream do
142
- render turbo_stream: [
143
- turbo_stream.replace(:remote_modal, partial: "interactive_action_form")
144
- ]
145
- end
146
- end
147
133
  end
148
134
  end
149
135
  end
@@ -179,7 +165,7 @@ module Plutonium
179
165
  # if helpers.current_turbo_frame == "remote_modal"
180
166
  # format.turbo_stream do
181
167
  # render turbo_stream: [
182
- # turbo_stream.redirect(resource_url_for(resource_class))
168
+ # helpers.turbo_stream_redirect(resource_url_for(resource_class))
183
169
  # ]
184
170
  # end
185
171
  # end
@@ -191,12 +177,6 @@ module Plutonium
191
177
  # @errors = @interaction.errors
192
178
  # render "errors", status: :unprocessable_entity
193
179
  # end
194
-
195
- # if helpers.current_turbo_frame == "remote_modal"
196
- # format.turbo_stream do
197
- # render turbo_stream: turbo_stream.replace(:remote_modal, partial: "interactive_bulk_action_form")
198
- # end
199
- # end
200
180
  # end
201
181
  # end
202
182
  end
@@ -20,14 +20,16 @@ module Plutonium
20
20
  if helpers.current_turbo_frame == "remote_modal"
21
21
  dialog(
22
22
  closedby: "any",
23
- class:
24
- "rounded-md w-full max-w-3xl
25
- backdrop:bg-black/60 backdrop:backdrop-blur-sm
26
- top-auto md:top-1/2 md:-translate-y-1/2 left-1/2 -translate-x-1/2
27
- max-h-[80%] p-6
28
- hidden open:flex flex-col
29
- relative opacity-0 open:opacity-100
30
- transition-opacity duration-300 ease-in-out",
23
+ class: "rounded-md w-full max-w-3xl
24
+ bg-white dark:bg-gray-800
25
+ border border-gray-200 dark:border-gray-700
26
+ shadow-lg dark:shadow-gray-900/20
27
+ backdrop:bg-black/60 backdrop:backdrop-blur-sm
28
+ top-auto md:top-1/2 md:-translate-y-1/2 left-1/2 -translate-x-1/2
29
+ max-h-[80%] p-6
30
+ hidden open:flex flex-col
31
+ relative opacity-0 open:opacity-100
32
+ transition-opacity duration-300 ease-in-out",
31
33
  data: {controller: "remote-modal"}
32
34
  ) do
33
35
  render_page_header
@@ -1,5 +1,5 @@
1
1
  module Plutonium
2
- VERSION = "0.25.0"
2
+ VERSION = "0.25.1"
3
3
  NEXT_MAJOR_VERSION = VERSION.split(".").tap { |v|
4
4
  v[1] = v[1].to_i + 1
5
5
  v[2] = 0
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radioactive-labs/plutonium",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Core assets for the Plutonium gem",
5
5
  "type": "module",
6
6
  "main": "src/js/core.js",
@@ -1,5 +1,3 @@
1
- import * as Turbo from "@hotwired/turbo"
2
-
3
- import "./turbo_debug"
4
- // import "./turbo_actions"
1
+ import "./turbo_actions"
2
+ // import "./turbo_debug"
5
3
  // import "./turbo_frame_monkey_patch"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.25.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich