katalyst-kpop 2.0.3 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4fea6bd4f91a8836cd4638c347bae989d987ae089e4616145c63e5fa2f04c07c
4
- data.tar.gz: dbfbca078875746b8c567cc56b16a9ea9105aaf813a274e156488ae6a72cf8f4
3
+ metadata.gz: 132ccf15922a7201b808f5e05d0ebfa5294a80fb52fbffd9394b17620ef7e841
4
+ data.tar.gz: ab016bd132de1ad7e039e4eca8e0e5aeb5668442a26d08be233625b864d34754
5
5
  SHA512:
6
- metadata.gz: 73bd64094326ecf8e6dc58eeeca5ad0088da4b8ae7198d26262110dcdc7d238222fea1d50949a56633d1b4dd82f3d2ca070f22921f6660753050f754b52a261f
7
- data.tar.gz: 36f36cbbdedcaa7abf2dc4dda39bbcaf0af2d4586efd00d5f940ea5ad28aea5cd842808c27bc89e52e057ef6cf91b7af886663ce7b25cd48ecb6ef62647d262c
6
+ metadata.gz: e46ae5a99a83e236123445f6273a0d5aa44a7e7d42676ed775d2fe523629f6ba7dcde29ceec1a8c650e7ec77d1d6460fa62abdf296e342335270f79aeb2b4a4e
7
+ data.tar.gz: 63e704500714934863e32822335956c3896bea1670ff141ddfb32679369c4087e028077fbb487f24b9639cca30ec89099c44f76b8b4a507c9e3d77bd00332227
data/README.md CHANGED
@@ -96,7 +96,7 @@ frame. The targeted action will need to generate content in a `kpop_frame_tag`,
96
96
  ```
97
97
 
98
98
  Note that, because kpop modals render in a turbo frame, if you want to navigate the parent frame you will need to use
99
- `target: "_top"` on your links and forms.
99
+ `target: "_top"` on your links and forms, or add `target: "_top"` to the `kpop_frame_tag` call in your body.
100
100
 
101
101
  ## Development
102
102
 
@@ -13,10 +13,13 @@ module KpopHelper
13
13
  end
14
14
 
15
15
  # Render a turbo frame tag that can be targeted for rendering kpop modals.
16
- def kpop_frame_tag(&block)
17
- turbo_frame_tag "kpop",
18
- class: "kpop-container",
19
- data: { controller: "kpop", action: "scrim:hide@window->kpop#dismiss" } do
16
+ def kpop_frame_tag(**html_attributes, &block)
17
+ html_attributes[:class] ||= "kpop-container"
18
+ html_attributes[:data] ||= {}
19
+ html_attributes[:data][:controller] = "kpop"
20
+ html_attributes[:data][:action] = "scrim:hide@window->kpop#dismiss"
21
+
22
+ turbo_frame_tag("kpop", **html_attributes) do
20
23
  capture(&block) if block
21
24
  end
22
25
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Katalyst
4
4
  module Kpop
5
- VERSION = "2.0.3"
5
+ VERSION = "2.0.5"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-kpop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-20 00:00:00.000000000 Z
11
+ date: 2023-07-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -38,7 +38,6 @@ files:
38
38
  - lib/katalyst/kpop.rb
39
39
  - lib/katalyst/kpop/engine.rb
40
40
  - lib/katalyst/kpop/version.rb
41
- - lib/tasks/yarn.rake
42
41
  homepage: https://github.com/katalyst/kpop
43
42
  licenses:
44
43
  - MIT
data/lib/tasks/yarn.rake DELETED
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- namespace :yarn do
4
- desc "Install npm packages with yarn"
5
- task install: :environment do
6
- sh "yarn install"
7
- end
8
-
9
- desc "Lint JS/SCSS files using yarn (prettier)"
10
- task lint: :install do
11
- sh "yarn lint"
12
- end
13
-
14
- desc "Autoformat JS/SCSS files using yarn (prettier)"
15
- task format: :install do
16
- sh "yarn format"
17
- end
18
-
19
- desc "Compile js/css"
20
- task build: :install do
21
- sh "yarn build && yarn build:css"
22
- end
23
- end