vident-typed-view_component 0.1.0 → 0.3.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: 8b452999e699b9280843995877688131d0f5340ce7677a2daa255cc205528cde
4
- data.tar.gz: d443df28c20a174dfbd8e49dc1e2bad9494ba5036628bfa9e649baf9f0fe1a24
3
+ metadata.gz: e4f375aebb6538a709d020fdbbcbc155630f8dba3b530c94131f25b1936a1d37
4
+ data.tar.gz: 27655ab98b6f7934f4195b55fa2989e64eeee4c1bc572aa49c494dba6864c4c7
5
5
  SHA512:
6
- metadata.gz: 02f8b2eb878cbdef3c01a55ef39e2b0c67d633d9f5bb0ac8fd80967b1561a6ee75ecb547f79ce9ec11c4d2795da93fe3c4fff08de3a5583edd08b5fe98a6c03c
7
- data.tar.gz: 5806003e62d04293b81a76f3b790bda373dc8dc0bd4fd9669cfb409d2bf6835587703600fe416173ca17c782d1b75c96eabcbdef81add5803cc35aa80718734c
6
+ metadata.gz: c29b1e14e63da63426141c943acdf924168ea1610735699a49ac567ddfddff2b08836f3b654dfb2cf1798df1aba47fb70fbc9bfa9377b1423b049b0ba2ef82b4
7
+ data.tar.gz: c9d19cc030d57a624f22b0c62b98e72eda3bde614657acead29d1ec4d334982deff397ae756feaa24fc626cba458a092d5692e84ad561d7df0fd22241cd191e8
data/README.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Vident::Typed::ViewComponent
2
- Short description and motivation.
3
2
 
3
+ Adds typed attributes to Vident ViewComponent components.
4
+
5
+ ```ruby
6
+ class ApplicationComponent < ::Vident::Typed::ViewComponent::Base
7
+ end
8
+ ```
9
+
10
+ For more details see [vident](https://github.com/stevegeek/vident).
4
11
 
5
12
  # Examples
6
13
 
@@ -29,7 +36,7 @@ It supports numerous sizes and shapes and can optionally have a border. It also
29
36
  ```ruby
30
37
  class AvatarComponent < ::Vident::Typed::ViewComponent::Base
31
38
  include ::Vident::Tailwind
32
- include ::Vident::ViewComponent::Caching
39
+ include ::Vident::Caching
33
40
 
34
41
  no_stimulus_controller
35
42
  with_cache_key :attributes
@@ -168,7 +175,7 @@ used to greet the user. At the same time the button changes to be a 'reset' butt
168
175
  <!-- render the Greeter ViewComponent (that uses Vident) -->
169
176
  <%= render ::GreeterComponent.new(cta: "Hey!", html_options: {class: "my-4"}) do |greeter| %>
170
177
  <%# this component has a slot called `trigger` that renders a `ButtonComponent` (which also uses Vident) %>
171
- <% greeter.trigger(
178
+ <% greeter.with_trigger(
172
179
 
173
180
  # The button component has attributes that are typed
174
181
  before_clicked: "Greet",
@@ -1,14 +1,8 @@
1
1
  module Vident
2
2
  module Typed
3
3
  module ViewComponent
4
- class Base < ::ViewComponent::Base
4
+ class Base < ::Vident::ViewComponent::Core
5
5
  include ::Vident::Typed::Component
6
-
7
- # Helper to create the main element
8
- def parent_element(**options)
9
- @parent_element ||= ::Vident::ViewComponent::RootComponent.new(**parent_element_attributes(options))
10
- end
11
- alias_method :root, :parent_element
12
6
  end
13
7
  end
14
8
  end
@@ -1,7 +1,7 @@
1
1
  module Vident
2
2
  module Typed
3
3
  module ViewComponent
4
- VERSION = "0.1.0"
4
+ VERSION = "0.3.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vident-typed-view_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Ierodiaconou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-01 00:00:00.000000000 Z
11
+ date: 2023-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -56,7 +56,7 @@ dependencies:
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: 0.1.0
59
+ version: 0.3.0
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '1'
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 0.1.0
69
+ version: 0.3.0
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
72
  version: '1'
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  requirements: []
110
- rubygems_version: 3.4.6
110
+ rubygems_version: 3.4.10
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Vident with ViewComponent & typed attributes