vident-tailwind 0.1.0 → 0.2.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: 1192f90217b3a947eebfeecc9d3f0b6fe8d76d4d48584e124abf93ad5ffa9490
4
- data.tar.gz: 3b57634555e09bde6f2d4f6b8def9fa723702924af6c5a33cf2e071a098e696d
3
+ metadata.gz: 8b6e849454d232820979000bfb2bd9ef123690081b174d5cda421804646a7427
4
+ data.tar.gz: fd213fa9f3d82fc31f738cd7e23534b5d22424c2b95ddd0e7e8b7be5c2ea94cd
5
5
  SHA512:
6
- metadata.gz: 595dc5bb7493fcce65f4b549aef363783628ea79aa521530b2796b1dc0fabe333672c3cec0cf66f1e2350d30e06d83e62d1d85981f67ef59b6d043e7145e2d06
7
- data.tar.gz: 250688a8f828bc415a9b2d29cf0a8dee08611f1455b99a79660c689b0d9542836e4529361e375e29745ba12a5599f9b6be8b7e687bb84a6eaa5eebabbe4283e1
6
+ metadata.gz: 6b9cadbdc8e57d6e0c79d1e118de00c1be6ab6b7384bfbb54af1263125ac25ff3ee395b471250b06c7b219f0bda32c836c38774e328553a04e4fa36c6e70eb1e
7
+ data.tar.gz: 1200e10b897bdbde3354b5cde3fd0ef005b74ef928c231821b11583278ec749dd5ea86a012d63cb6980240163fe541c87cffb35103067e21ba7d42a6417e5c4d
@@ -1,5 +1,5 @@
1
1
  module Vident
2
2
  module Tailwind
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -4,11 +4,20 @@ require "vident/tailwind/railtie"
4
4
  require "tailwind_merge"
5
5
 
6
6
  module Vident
7
+ # Adds a utility class merge specifically for Tailwind, allowing you to more easily specify class overrides
8
+ # without having to worry about the specificity of the classes.
7
9
  module Tailwind
8
- # Adds a utility class merge specifically for Tailwind, allowing you to more easily specify class overrides
9
- # without having to worry about the specificity of the classes.
10
10
  def produce_style_classes(class_names)
11
- ::TailwindMerge::Merger.new.merge(dedupe_view_component_classes(class_names))
11
+ to_merge = dedupe_view_component_classes(class_names)
12
+ tailwind_class_merger.merge(to_merge) if to_merge.present?
13
+ end
14
+
15
+ private
16
+
17
+ # If needed this can be overridden in your component to provide options for the merger.
18
+ def tailwind_class_merger
19
+ return @tailwind_class_merger if defined? @tailwind_class_merger
20
+ @tailwind_class_merger= (Thread.current[:tailwind_class_merger] ||= ::TailwindMerge::Merger.new)
12
21
  end
13
22
  end
14
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vident-tailwind
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.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-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
- rubygems_version: 3.4.6
107
+ rubygems_version: 3.4.10
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Vident with Tailwind class deduplication to allow easy overriding