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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10a40fe0221350427b615884ee7f7fb35fd430bd22f85d19753df3fc39ac5778
4
- data.tar.gz: 61ba7e66ad20a6c4d14e269c77dce8e5ee937219b1cce0ae7097d1f36039e757
3
+ metadata.gz: 36b0700ab981a9bbfc6fd75a8e9982b17a8b0c58275789b95ba82d254f653ef0
4
+ data.tar.gz: 67a05552d491c92f2efe7f0f3102a347612dea367261ac08f903c55099dc94ab
5
5
  SHA512:
6
- metadata.gz: 6c7bb314b4fd02fc10f6ccf7cd29d832d3fae2d4f4a0b0af09f91d1534f38fe3c105d7e11ca933c0ceb55a30ecb2d20b679a5d0b61670d08331a15d3083d8fa9
7
- data.tar.gz: 0c14d0ff154e8da78825bbe5178722a9b2ebae2fefcd9861bdade3319338efbc09aa6b0d89f3535fdcfba562c4cca87205dc7453ea97e10a1b0edbc2c4fb5e1b
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.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
- 1. Detect your asset pipeline (Tailwind CSS v4, Propshaft, or Sprockets) and safely configure the required `@import` statements.
79
- 2. Copy `sig/odt_ui.rbs` for Ruby LSP IDE autocompletion.
80
- 3. Copy Stimulus controllers (`odt_toast_controller.js`, `odt_modal_controller.js`) to `app/javascript/controllers/` if Stimulus is present.
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
- If configuring stylesheets manually, use the configuration below:
86
+ ### 1. Application Layout (Propshaft / Sprockets / Standard Rails)
87
87
 
88
- ### Option A: Tailwind CSS v4 (`app/assets/tailwind/application.css`)
88
+ In `app/views/layouts/application.html.erb`, include the ODT stylesheet:
89
89
 
90
- ```css
91
- @import "tailwindcss";
92
- @import "odt_ui/tokens.css";
93
- @import "odt_ui/styles.css";
94
- @import "odt_ui/theme.css";
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
- ### Option B: Propshaft / Sprockets / Standard Rails (`app/assets/stylesheets/application.css`)
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 "odt_ui/tokens.css";
101
- @import "odt_ui/styles.css";
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