odt-ui-rails 2.2.4 → 2.2.6
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 +23 -3
- data/app/assets/stylesheets/odt_ui/styles.css +489 -109
- data/app/assets/stylesheets/odt_ui.css +489 -109
- data/lib/generators/odt/install_generator.rb +2 -3
- data/lib/generators/odt/templates/odt_dropdown_controller.js +137 -0
- data/lib/generators/odt/templates/odt_modal_controller.js +24 -0
- data/lib/generators/odt/templates/odt_toast_controller.js +12 -0
- data/lib/generators/odt/templates/odt_toaster_controller.js +195 -0
- data/lib/generators/odt/templates/odt_ui.rbs +119 -61
- data/lib/odt_ui/engine.rb +0 -1
- data/lib/odt_ui/helper.rb +324 -282
- data/lib/odt_ui/version.rb +1 -1
- data/lib/odt_ui.rb +6 -1
- data/sig/odt_ui.rbs +119 -61
- metadata +3 -4
- data/app/assets/stylesheets/odt_ui/theme.css +0 -126
- data/app/javascript/controllers/odt_modal_controller.js +0 -61
- data/app/javascript/controllers/odt_toast_controller.js +0 -40
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab34fa664bc14d7404f1775d69778c07beaa8e02a02986b249f99290cd678a24
|
|
4
|
+
data.tar.gz: acb1f1ec60f3532a9a8f2ab2d873a2cab4d01561afe86836bef75b766f0872bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e2c5806ac69d61d9fe95beba963735de017ae27356d089959d8ecb6c22aeaeace327ca1fcf89cefbd3730d1da9efd15748af951e73d2b628b3214973ddf314ae
|
|
7
|
+
data.tar.gz: 97d5a781fa5532a80c9283f469c6b8f49c2eb3ebebc6e09f3c9c2084eef29b5e3a001ff0bfbd1961933e4a68c96fdba3f74b89ab06ed242e951d1bba7934b9e7
|
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.6"
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
Install dependencies:
|
|
@@ -74,6 +74,7 @@ bin/rails g odt:install
|
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
The generator will:
|
|
77
|
+
|
|
77
78
|
1. Inject `<%= stylesheet_link_tag "odt_ui", "data-turbo-track": "reload" %>` into your `app/views/layouts/application.html.erb`.
|
|
78
79
|
2. Configure Tailwind CSS v4 `@theme` (`odt_theme.css`) if Tailwind is detected.
|
|
79
80
|
3. Copy `sig/odt_ui.rbs` for Ruby LSP IDE autocompletion.
|
|
@@ -104,7 +105,7 @@ If using Tailwind CSS v4 and you want ODT design token utilities (`bg-primary-50
|
|
|
104
105
|
@import "./odt_theme.css";
|
|
105
106
|
```
|
|
106
107
|
|
|
107
|
-
|
|
108
|
+
_(Note: `odt_theme.css` is placed in your tailwind assets folder by `bin/rails g odt:install`)_
|
|
108
109
|
|
|
109
110
|
---
|
|
110
111
|
|
|
@@ -205,6 +206,25 @@ Accessible dialog containers with backdrop overlay, ESC key handling, scroll loc
|
|
|
205
206
|
|
|
206
207
|
---
|
|
207
208
|
|
|
209
|
+
#### Dropdown Menu
|
|
210
|
+
|
|
211
|
+
Interactive floating dropdown menus with keyboard navigation, click-outside dismissal, shortcuts, and destructive styles.
|
|
212
|
+
|
|
213
|
+
```erb
|
|
214
|
+
<%= odt_dropdown_menu do %>
|
|
215
|
+
<%= odt_dropdown_trigger "Actions", size: :md, variant: :outlined %>
|
|
216
|
+
<%= odt_dropdown_content align: :end, radius: :xl do %>
|
|
217
|
+
<%= odt_dropdown_label "Manage" %>
|
|
218
|
+
<%= odt_dropdown_item "Edit Details", left_icon: "fa-solid fa-pen", shortcut: "⌘E" %>
|
|
219
|
+
<%= odt_dropdown_item "Duplicate", left_icon: "fa-solid fa-copy" %>
|
|
220
|
+
<%= odt_dropdown_separator %>
|
|
221
|
+
<%= odt_dropdown_item "Delete", destructive: true, left_icon: "fa-solid fa-trash" %>
|
|
222
|
+
<% end %>
|
|
223
|
+
<% end %>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
208
228
|
#### Alerts
|
|
209
229
|
|
|
210
230
|
Inline banners for status notices, warning messages, and form callouts.
|
|
@@ -292,7 +312,7 @@ Accessible form components complete with labels, helper text, error validations,
|
|
|
292
312
|
helper: "Brief summary for your profile"
|
|
293
313
|
) %>
|
|
294
314
|
|
|
295
|
-
<%#
|
|
315
|
+
<%# Custom Dropdown Select %>
|
|
296
316
|
<%= odt_select(
|
|
297
317
|
label: "Country",
|
|
298
318
|
name: "user[country]",
|