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 +4 -4
- data/lib/vident/root_component.rb +13 -0
- data/lib/vident/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e6343a4c8fe0649f5a225af8c2e04286c62bf028eb08a2551ebea16277079e9
|
4
|
+
data.tar.gz: a34ac9f41c3e3d0170e0a61d9ce8bab70cba396aba733f34327fb38cfae878de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
data/lib/vident/version.rb
CHANGED
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.
|
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:
|
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.
|
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.
|