solrengine-ui 0.3.0 → 0.3.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0ff02121ebeec618fe5a5b9962b9e4e1b0e576fe730f199889dfb1823fc16d85
|
|
4
|
+
data.tar.gz: 8571bceac6b425d252e8c6a8c98292c4a2706f9fe76750944c253c864cf3c507
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d72055fb826074db1f48534cd7e09ea81e6a155b94cc2383ca2cfe1d8329ca17e244b474d4265857910bcd81ef50d6b0334524fca7baa4bdcb24e2c447b8d173
|
|
7
|
+
data.tar.gz: 2b7da4e67ef8ef73086a445764784d5657d9f13b98ff9b9a4cd30a273d9bb91bd558e5d6ba6520b05f1115b77293ac9fd653f0574f770fbc362bde96ef845c3f
|
data/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# SolRengine UI
|
|
2
2
|
|
|
3
|
-
A ViewComponent library for Solana dApps built with Ruby on Rails and [SolRengine](https://github.com/solrengine). Ships
|
|
3
|
+
A ViewComponent library for Solana dApps built with Ruby on Rails and [SolRengine](https://github.com/solrengine). Ships 20 ready-to-use components styled with Tailwind CSS, with built-in dark/light mode support and Lookbook previews for every component.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
Add the gem to your Gemfile:
|
|
8
8
|
|
|
9
9
|
```ruby
|
|
10
|
-
gem "solrengine-ui"
|
|
10
|
+
gem "solrengine-ui"
|
|
11
11
|
|
|
12
12
|
group :development do
|
|
13
13
|
gem "lookbook", ">= 2.0"
|
|
@@ -60,6 +60,17 @@ yarn add @solrengine/ui
|
|
|
60
60
|
| `NotificationComponent` | `message:`, `type: :info`, `dismissible: true`, `explorer_url: nil` | Flash-style notification with icon and optional explorer link |
|
|
61
61
|
| `ThemeToggleComponent` | _(none)_ | Dark/light mode toggle button |
|
|
62
62
|
| `WalletButtonComponent` | `current_user: nil`, `login_path: "/auth/login"`, `logout_path: "/auth/logout"` | Connect/disconnect wallet button with truncated address |
|
|
63
|
+
| `CardComponent` | `padding: true`, slots: `header`, `body`, `footer` | Container card with optional header/footer |
|
|
64
|
+
| `ModalComponent` | `title: nil`, `size: :md`, slots: `body`, `actions` | Modal dialog with backdrop and close button |
|
|
65
|
+
| `DropdownComponent` | `align: :right`, slots: `trigger`, `items` | Dropdown menu with click-outside close |
|
|
66
|
+
| `CollapseComponent` | `expanded: false`, slots: `collapse_header`, `collapse_body` | Collapsible content section |
|
|
67
|
+
| `FooterComponent` | slots: `links`, `powered_by` | Page footer with links and branding |
|
|
68
|
+
| `TokenListComponent` | `tokens:` (array) | List of token rows with empty state |
|
|
69
|
+
| `TokenRowComponent` | `token:` (hash with symbol, name, balance, icon_uri, usd_value) | Single token row with icon and balance |
|
|
70
|
+
| `TokenIconComponent` | `symbol:`, `uri: nil`, `size: :md` | Token icon image or fallback letter |
|
|
71
|
+
| `TransactionStatusComponent` | `status:`, `signature: nil`, `network:` | Status badge (pending/confirmed/failed/processing) with explorer link |
|
|
72
|
+
| `SendTransactionFormComponent` | `wallet_address: nil`, `network:`, `action_url:` | SOL transfer form with recipient and amount |
|
|
73
|
+
| `AirdropButtonComponent` | `address:`, `network:`, `action_url:` | Airdrop button (devnet/testnet only) |
|
|
63
74
|
|
|
64
75
|
## Usage Examples
|
|
65
76
|
|
|
@@ -175,7 +186,7 @@ All components include `dark:` Tailwind variants out of the box. Add the `dark`
|
|
|
175
186
|
|
|
176
187
|
## Lookbook
|
|
177
188
|
|
|
178
|
-
After running the install generator, visit `/lookbook` in development to browse every component with live previews. The gem ships Lookbook preview classes for all
|
|
189
|
+
After running the install generator, visit `/lookbook` in development to browse every component with live previews. The gem ships Lookbook preview classes for all 20 components.
|
|
179
190
|
|
|
180
191
|
To add Lookbook manually (without the generator):
|
|
181
192
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<span class="inline-flex items-center gap-1.5">
|
|
2
2
|
<% if copyable %>
|
|
3
|
-
<button data-controller="sui-clipboard" data-sui-clipboard-text-value="<%= address %>" class="text-gray-400 dark:text-gray-400 text-xs font-mono bg-gray-100 dark:bg-gray-800 px-2.5 py-1.5 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors cursor-pointer">
|
|
4
|
-
|
|
3
|
+
<button data-controller="sui-clipboard" data-sui-clipboard-text-value="<%= address %>" data-action="click->sui-clipboard#copy" class="text-gray-400 dark:text-gray-400 text-xs font-mono bg-gray-100 dark:bg-gray-800 px-2.5 py-1.5 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors cursor-pointer">
|
|
4
|
+
<span data-sui-clipboard-target="label"><%= truncated_address %></span>
|
|
5
5
|
</button>
|
|
6
6
|
<% else %>
|
|
7
7
|
<span class="text-gray-400 dark:text-gray-400 text-xs font-mono bg-gray-100 dark:bg-gray-800 px-2.5 py-1.5 rounded-lg">
|
|
@@ -56,7 +56,7 @@ module Solrengine
|
|
|
56
56
|
layout_path = "app/views/layouts/lookbook_preview.html.erb"
|
|
57
57
|
return if File.exist?(layout_path)
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
template "lookbook_preview.html.erb", layout_path
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
def configure_lookbook_preview_layout
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solrengine-ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jose Ferrer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: view_component
|