vident 0.14.0 → 0.14.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5bbf8a17cf2662f0e91b3e72b0ca8bb61e07f50ef75ad3421a119bef7f23fe7d
4
- data.tar.gz: 6c2b86480b402391e2e23db4dd70b4102bbf97017f7ebe5eae63d177dccebee0
3
+ metadata.gz: 3e6343a4c8fe0649f5a225af8c2e04286c62bf028eb08a2551ebea16277079e9
4
+ data.tar.gz: a34ac9f41c3e3d0170e0a61d9ce8bab70cba396aba733f34327fb38cfae878de
5
5
  SHA512:
6
- metadata.gz: 97cc88454a75aa281018ec1552dfad36d933ccbbca5748f804eb584ae881b17bca1cfe62d15e367f772e5469c896f5ac9f48cf7196dcc0e1142426a9e56a1875
7
- data.tar.gz: ef559ca8f0972b77d5f2c2cd3803f5ff09e2ad935e9f3896880cdc7ae95041446cb889ce0fa40bc9eed649918dd2e3ca89b76a440860752e2483fb33440979e4
6
+ metadata.gz: d42bfa75ffb48fea91ac3932b0a55907747586172d37a1848c4018ed4477c1091a1eef2fd0abe2b111d95c79a10accb7738d560115b9b8f801c47918a2d77719
7
+ data.tar.gz: 6e19345c2a9702d02c3a62fbc627a2829ccc06beee98c9a79afff4a300fd048eefe1a2cd1bc857a5846da06fd5bf9d11c8d517a613cabe1f3e70098d2980b62a
@@ -34,6 +34,19 @@ module Vident
34
34
 
35
35
  # The view component's helpers for setting stimulus data-* attributes on this component.
36
36
 
37
+ def controller_attribute(*controllers_to_set)
38
+ {"data-controller" => controller_list(controllers_to_set)&.html_safe}
39
+ end
40
+
41
+ def target_attributes(*targets)
42
+ attrs = build_target_data_attributes(parse_targets(targets))
43
+ attrs.transform_keys { |dt| "data-#{dt}" }
44
+ end
45
+
46
+ def action_attribute(*actions_to_set)
47
+ {"data-action" => parse_actions(actions_to_set).join(" ").html_safe}
48
+ end
49
+
37
50
  # TODO: rename
38
51
  # Create a Stimulus action string, and returns it
39
52
  # examples:
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vident
4
- VERSION = "0.14.0"
4
+ VERSION = "0.14.1"
5
5
 
6
6
  # Shared version for all vident gems
7
7
  def self.version
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vident
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Ierodiaconou
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
10
+ date: 2025-09-17 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: railties
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  requirements: []
95
- rubygems_version: 3.6.7
95
+ rubygems_version: 3.6.2
96
96
  specification_version: 4
97
97
  summary: Vident is the base of your design system implementation, which provides helpers
98
98
  for working with Stimulus. For component libraries with ViewComponent or Phlex.