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 +4 -4
- data/app/components/solrengine/ui/badge_component.html.erb +1 -1
- data/app/components/solrengine/ui/badge_component.rb +5 -5
- data/app/components/solrengine/ui/wallet_button_component.html.erb +2 -2
- data/lib/generators/solrengine/ui/install_generator.rb +10 -0
- data/lib/solrengine/ui/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 40d6862af5f3d7e2de41af4a22869bee41980a29b41fbc379236c382bb6edba0
|
|
4
|
+
data.tar.gz: 6f15fcb3346415498c6a92097b7f3075dea9f85fcd71fef8ab56853a7e699f57
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c5ddc1dd79116f4e73dadec1dc16999080da5caad99f650cf28534ef4e5a9ee22f6b0764a44dbff432b1f937894fd62206490300210f59416a60fbf259f76ea5
|
|
7
|
+
data.tar.gz: a07e6b55a7a3c4c35fe424044354603cfa0ec72de7ba68d55e9b66243b67b67777da6b5b74a11e749773c7751d4c300b7e99462295189c5ff78f25efd132f6c1
|
|
@@ -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/
|
|
8
|
-
warning: "bg-yellow-100 dark:bg-yellow-900/
|
|
9
|
-
error: "bg-red-100 dark:bg-red-900/
|
|
10
|
-
info: "bg-blue-100 dark:bg-blue-900/
|
|
11
|
-
purple: "bg-purple-100 dark:bg-purple-900/
|
|
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-
|
|
10
|
-
<svg xmlns="http://www.w3.org/2000/svg" class="h-
|
|
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)
|