odt-ui-rails 2.2.2 → 2.2.4
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/README.md +20 -15
- data/app/assets/stylesheets/odt_ui.css +2048 -2
- data/lib/generators/odt/install_generator.rb +27 -39
- data/lib/generators/odt/templates/odt_theme.css +119 -0
- data/lib/odt_ui/engine.rb +2 -1
- data/lib/odt_ui/version.rb +1 -1
- data/lib/odt_ui.rb +3 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 36b0700ab981a9bbfc6fd75a8e9982b17a8b0c58275789b95ba82d254f653ef0
|
|
4
|
+
data.tar.gz: 67a05552d491c92f2efe7f0f3102a347612dea367261ac08f903c55099dc94ab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 941b198c9f193f2ca19f322a05e693d59915f140465186fafe0c597152427a51a112181bbc06a737821eb208c8ebd085dc2da28ab683a493a9b58061021274db
|
|
7
|
+
data.tar.gz: aaaad8b84b9f13aea5a64e86ab7066a6c9eff6c41486af2606da034bc8a70498de654b7c0a28f1fa77594400d86d7d297a3a1a614ae7eab09f9f1e02a1b8a5c9
|
data/README.md
CHANGED
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
Add the gem to your application's `Gemfile`:
|
|
59
59
|
|
|
60
60
|
```ruby
|
|
61
|
-
gem "odt-ui-rails", "~> 2.2.
|
|
61
|
+
gem "odt-ui-rails", "~> 2.2.4"
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
Install dependencies:
|
|
@@ -74,33 +74,38 @@ bin/rails g odt:install
|
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
The generator will:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
1. Inject `<%= stylesheet_link_tag "odt_ui", "data-turbo-track": "reload" %>` into your `app/views/layouts/application.html.erb`.
|
|
78
|
+
2. Configure Tailwind CSS v4 `@theme` (`odt_theme.css`) if Tailwind is detected.
|
|
79
|
+
3. Copy `sig/odt_ui.rbs` for Ruby LSP IDE autocompletion.
|
|
80
|
+
4. Copy Stimulus controllers (`odt_toast_controller.js`, `odt_modal_controller.js`) to `app/javascript/controllers/` if Stimulus is present.
|
|
81
81
|
|
|
82
82
|
---
|
|
83
83
|
|
|
84
84
|
## Asset Pipeline Configuration
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
### 1. Application Layout (Propshaft / Sprockets / Standard Rails)
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
In `app/views/layouts/application.html.erb`, include the ODT stylesheet:
|
|
89
89
|
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
```erb
|
|
91
|
+
<head>
|
|
92
|
+
<%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
|
|
93
|
+
<%= stylesheet_link_tag "odt_ui", "data-turbo-track": "reload" %>
|
|
94
|
+
<%= javascript_importmap_tags %>
|
|
95
|
+
</head>
|
|
95
96
|
```
|
|
96
97
|
|
|
97
|
-
###
|
|
98
|
+
### 2. Tailwind CSS v4 Theme Interop (`app/assets/tailwind/application.css`)
|
|
99
|
+
|
|
100
|
+
If using Tailwind CSS v4 and you want ODT design token utilities (`bg-primary-500`, `text-fg-strong`, etc.) in custom HTML:
|
|
98
101
|
|
|
99
102
|
```css
|
|
100
|
-
@import "
|
|
101
|
-
@import "
|
|
103
|
+
@import "tailwindcss";
|
|
104
|
+
@import "./odt_theme.css";
|
|
102
105
|
```
|
|
103
106
|
|
|
107
|
+
*(Note: `odt_theme.css` is placed in your tailwind assets folder by `bin/rails g odt:install`)*
|
|
108
|
+
|
|
104
109
|
---
|
|
105
110
|
|
|
106
111
|
## Component Reference
|