solrengine-ui 0.2.2 → 0.3.0

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: 3564aea452f55ee6744322d81aa5550d9317a16080123c3524008457dff6271e
4
- data.tar.gz: f5af6ae7616484da6e824d1e394778dc9aeffa77679d0edbc096e272a7bd8761
3
+ metadata.gz: 40d6862af5f3d7e2de41af4a22869bee41980a29b41fbc379236c382bb6edba0
4
+ data.tar.gz: 6f15fcb3346415498c6a92097b7f3075dea9f85fcd71fef8ab56853a7e699f57
5
5
  SHA512:
6
- metadata.gz: f41f46a12ef331346b04cb8dcff92827727d77a0589afd4c9026d522448f63d342d5d839ae39f1fdcdb79b96b37b8a8717506ccd35e57a64c2a4aabf9e076d34
7
- data.tar.gz: cc02c2c5cd9bfb324195a96e89e5bab17b22e119251e7078a7d12658b48e9b5f3296c9b784daa6b8c4dff1cb0fc0acffe35367da643613f8c23f61ed77b81a18
6
+ metadata.gz: c5ddc1dd79116f4e73dadec1dc16999080da5caad99f650cf28534ef4e5a9ee22f6b0764a44dbff432b1f937894fd62206490300210f59416a60fbf259f76ea5
7
+ data.tar.gz: a07e6b55a7a3c4c35fe424044354603cfa0ec72de7ba68d55e9b66243b67b67777da6b5b74a11e749773c7751d4c300b7e99462295189c5ff78f25efd132f6c1
@@ -1,3 +1,3 @@
1
- <span class="px-2 py-0.5 rounded-full text-xs font-medium border <%= variant_classes %>">
1
+ <span class="px-3.5 py-1 rounded-full text-xs font-medium border <%= variant_classes %>">
2
2
  <%= text %>
3
3
  </span>
@@ -4,11 +4,11 @@ module Solrengine
4
4
  module Ui
5
5
  class BadgeComponent < ViewComponent::Base
6
6
  VARIANTS = {
7
- success: "bg-green-100 dark:bg-green-900/50 text-green-700 dark:text-green-400 border-green-200 dark:border-green-800",
8
- warning: "bg-yellow-100 dark:bg-yellow-900/50 text-yellow-700 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800",
9
- error: "bg-red-100 dark:bg-red-900/50 text-red-700 dark:text-red-400 border-red-200 dark:border-red-800",
10
- info: "bg-blue-100 dark:bg-blue-900/50 text-blue-700 dark:text-blue-400 border-blue-200 dark:border-blue-800",
11
- purple: "bg-purple-100 dark:bg-purple-900/50 text-purple-700 dark:text-purple-400 border-purple-200 dark:border-purple-800"
7
+ success: "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 border-green-200 dark:border-green-700/50",
8
+ warning: "bg-yellow-100 dark:bg-yellow-900/30 text-yellow-700 dark:text-yellow-400 border-yellow-200 dark:border-yellow-700/50",
9
+ error: "bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-400 border-red-200 dark:border-red-700/50",
10
+ info: "bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400 border-blue-200 dark:border-blue-700/50",
11
+ purple: "bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-400 border-purple-200 dark:border-purple-700/50"
12
12
  }.freeze
13
13
 
14
14
  attr_reader :text, :variant
@@ -6,8 +6,8 @@
6
6
  <%= link_to "Disconnect", logout_path, data: { turbo_method: :delete }, class: "text-gray-500 dark:text-gray-400 text-xs hover:text-red-500 dark:hover:text-red-400 transition-colors" %>
7
7
  </span>
8
8
  <% else %>
9
- <%= link_to login_path, class: "bg-gradient-to-r from-purple-600 to-blue-600 hover:from-purple-500 hover:to-blue-500 text-white font-semibold py-2.5 px-5 rounded-xl transition-all duration-200 inline-flex items-center gap-2 text-sm" do %>
10
- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
9
+ <%= link_to login_path, class: "bg-gradient-to-r from-purple-600 to-blue-600 hover:from-purple-500 hover:to-blue-500 text-white font-semibold py-3 px-6 rounded-full transition-all duration-200 inline-flex items-center gap-2 whitespace-nowrap" do %>
10
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
11
11
  <path stroke-linecap="round" stroke-linejoin="round" d="M17 9V7a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2m2 4h10a2 2 0 002-2v-6a2 2 0 00-2-2H9a2 2 0 00-2 2v6a2 2 0 002 2zm7-5a2 2 0 11-4 0 2 2 0 014 0z" />
12
12
  </svg>
13
13
  Connect Wallet
@@ -18,6 +18,16 @@ module Solrengine
18
18
  append_to_file css_file, "\n/* SolRengine UI components */\n@source \"#{gem_path}/app\";\n"
19
19
  end
20
20
 
21
+ def add_dark_mode_variant
22
+ css_file = "app/assets/stylesheets/application.tailwind.css"
23
+ return unless File.exist?(css_file)
24
+
25
+ content = File.read(css_file)
26
+ return if content.include?("@custom-variant dark")
27
+
28
+ append_to_file css_file, "\n/* Class-based dark mode for SolRengine UI */\n@custom-variant dark (&:where(.dark, .dark *));\n"
29
+ end
30
+
21
31
  def add_lookbook_route
22
32
  route_file = "config/routes.rb"
23
33
  content = File.read(route_file)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Solrengine
4
4
  module Ui
5
- VERSION = "0.2.2"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solrengine-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Ferrer