anchor_view_components 0.47.0 → 0.48.0

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: f701f39d7fa774ffb3175e88d5d81fa961807f92a37bbc4072fd11a085092f01
4
- data.tar.gz: 64c92e9bca0bad24e38f276233cde81a53b1343c175c77d76907a905c61d5358
3
+ metadata.gz: da98942975137fa343cc58ad7fb08de5d92470a8f6a287924dda11562d7d6ebf
4
+ data.tar.gz: e4d301b64276b42c52732ee10aba4f4c6a54e53495c24920ec8341e73d52b0fc
5
5
  SHA512:
6
- metadata.gz: 1344766f080f5c8f1fab3c923ee39ba89b5f397aa8dcf62214014a780523976c23d5383f7f77f649e5dac45748024aad8d5ae664b16e05ecea24c414d2d9edfa
7
- data.tar.gz: 85f9f0d2a6f0114be1955f88a37d41be771baf35b870f6c44e3381e267e4f1104a2fc9256e9b69f864a492a285ece4a58a475ee5b647398df25aa61e7b08e10d
6
+ metadata.gz: 1614e7d9ee23d0c32a56d7fa3c2e4d396045de15e4cedc8f2ea19f23b70877d9009a59c8709e1471220b35c11101816d86d2f7e851160c713e74c1aae5fb9e66
7
+ data.tar.gz: 1bebc7268fde9116e11a2684ea58b0cda6d9d6a44de32ca9b51e7284eb816584cb064eff682e0b299321c808624e6135b661dc8cc26cd4864e0c0ae2caa12835
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.48.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 49a05e0: added data testids to banner component
8
+ - d9925cb: Added a test ID to the panel component (`panel-component`) with the option to pass in a custom ID.
9
+ - f55a733: Add open-new-window icon
10
+
3
11
  ## 0.47.0
4
12
 
5
13
  ### Minor Changes
@@ -0,0 +1,5 @@
1
+ <!-- Source: Iconoir, added via `bin/add_icon` -->
2
+ <svg width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M21 3L15 3M21 3L12 12M21 3V9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M21 13V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H11" stroke="currentColor" stroke-linecap="round"/>
5
+ </svg>
@@ -1,5 +1,6 @@
1
1
  <%= tag.div(**merge_options(wrapper_options, {
2
2
  class: "flex gap-2 p-4 rounded",
3
+ data: { testid: }
3
4
  })) do %>
4
5
  <%= anchor_icon(
5
6
  icon:,
@@ -48,5 +48,9 @@ module Anchor
48
48
  def render?
49
49
  title? || body?
50
50
  end
51
+
52
+ def testid
53
+ "banner-component"
54
+ end
51
55
  end
52
56
  end
@@ -8,7 +8,7 @@
8
8
  "btn-with-ending-icon" => ending_icon?,
9
9
  "btn-full-width" => full_width,
10
10
  ),
11
- data: { testid: test_id },
11
+ data: { testid: },
12
12
  disabled: disabled,
13
13
  href: href,
14
14
  type: type,
@@ -76,14 +76,14 @@ module Anchor
76
76
  element == :a ? nil : @disabled
77
77
  end
78
78
 
79
- def test_id
79
+ def testid
80
80
  wrapper_options.dig(
81
81
  :data,
82
82
  :testid
83
- ) || generated_test_id
83
+ ) || generated_testid
84
84
  end
85
85
 
86
- def generated_test_id
86
+ def generated_testid
87
87
  "#{strip_tags(content).to_s.parameterize}-button"
88
88
  end
89
89
  end
@@ -5,7 +5,7 @@
5
5
  type: :button,
6
6
  **popover.popover_trigger_attributes(
7
7
  popovertarget: popover_id,
8
- data: { testid: test_id(:description) }
8
+ data: { testid: testid(:description) }
9
9
  )
10
10
  ) do %>
11
11
  <span class="font-semibold uppercase mr-2"><%= label %>:</span>
@@ -52,7 +52,7 @@ module Anchor
52
52
  end
53
53
  end
54
54
 
55
- def test_id(action = nil)
55
+ def testid(action = nil)
56
56
  ["filter", action, param_key.to_s.dasherize].compact.join("-")
57
57
  end
58
58
 
@@ -1,5 +1,6 @@
1
1
  <%= tag.div(**merge_options(wrapper_options,
2
2
  class: "border border-subdued",
3
+ data: { testid: }
3
4
  )) do %>
4
5
  <%= header %>
5
6
 
@@ -16,5 +16,9 @@ module Anchor
16
16
  def active?
17
17
  @active == true
18
18
  end
19
+
20
+ def testid
21
+ wrapper_options.dig(:data, :testid) || "panel-component"
22
+ end
19
23
  end
20
24
  end
@@ -4,7 +4,7 @@
4
4
  data: {
5
5
  controller: "toast",
6
6
  toast_assistive_tech_notification_value: assistive_tech_notification,
7
- testid: test_id,
7
+ testid:,
8
8
  },
9
9
  popover: "manual",
10
10
  })
@@ -29,7 +29,7 @@ module Anchor
29
29
  strip_tags(content)
30
30
  end
31
31
 
32
- def test_id
32
+ def testid
33
33
  wrapper_options.dig(:data, :testid) || "toast"
34
34
  end
35
35
  end
@@ -1,5 +1,5 @@
1
1
  module Anchor
2
2
  module ViewComponents
3
- VERSION = "0.47.0".freeze
3
+ VERSION = "0.48.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anchor_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.47.0
4
+ version: 0.48.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Buoy Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-05 00:00:00.000000000 Z
11
+ date: 2024-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -67,6 +67,7 @@ files:
67
67
  - app/assets/images/icons/nav-arrow-down.svg
68
68
  - app/assets/images/icons/nav-arrow-left.svg
69
69
  - app/assets/images/icons/nav-arrow-right.svg
70
+ - app/assets/images/icons/open-new-window.svg
70
71
  - app/assets/images/icons/paste-clipboard.svg
71
72
  - app/assets/images/icons/percentage.svg
72
73
  - app/assets/images/icons/plus.svg