maquina-components 0.7.3 → 0.7.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/app/assets/stylesheets/drawer.css +8 -8
- data/app/assets/stylesheets/form.css +58 -4
- data/app/assets/stylesheets/separator.css +6 -1
- data/app/assets/tailwind/maquina_components_engine/tokens.css +1 -0
- data/app/helpers/maquina_components/calendar_helper.rb +32 -0
- data/app/helpers/maquina_components/drawer_helper.rb +3 -5
- data/app/helpers/maquina_components/dropdown_menu_helper.rb +22 -5
- data/app/helpers/maquina_components/empty_helper.rb +3 -3
- data/app/helpers/maquina_components/icons_helper.rb +9 -5
- data/app/helpers/maquina_components/pagination_helper.rb +27 -5
- data/app/javascript/controllers/calendar_controller.js +28 -25
- data/app/javascript/controllers/combobox_controller.js +17 -2
- data/app/javascript/controllers/date_picker_controller.js +57 -21
- data/app/javascript/controllers/drawer_controller.js +66 -44
- data/app/javascript/controllers/drawer_trigger_controller.js +13 -0
- data/app/javascript/controllers/sidebar_controller.js +84 -42
- data/app/javascript/controllers/sidebar_trigger_controller.js +13 -0
- data/app/javascript/controllers/toast_controller.js +2 -3
- data/app/javascript/controllers/toaster_controller.js +23 -1
- data/app/javascript/controllers/toggle_group_controller.js +17 -6
- data/app/views/components/_badge.html.erb +1 -1
- data/app/views/components/_breadcrumbs.html.erb +7 -7
- data/app/views/components/_calendar.html.erb +13 -28
- data/app/views/components/_combobox.html.erb +2 -0
- data/app/views/components/_date_picker.html.erb +19 -33
- data/app/views/components/_drawer.html.erb +1 -1
- data/app/views/components/_menu_button.html.erb +1 -1
- data/app/views/components/_sidebar.html.erb +1 -1
- data/app/views/components/breadcrumbs/_ellipsis.html.erb +1 -1
- data/app/views/components/breadcrumbs/_item.html.erb +1 -1
- data/app/views/components/breadcrumbs/_link.html.erb +1 -1
- data/app/views/components/breadcrumbs/_list.html.erb +1 -1
- data/app/views/components/breadcrumbs/_page.html.erb +1 -1
- data/app/views/components/breadcrumbs/_separator.html.erb +1 -2
- data/app/views/components/calendar/_week.html.erb +7 -4
- data/app/views/components/card/_content.html.erb +1 -1
- data/app/views/components/card/_footer.html.erb +3 -10
- data/app/views/components/card/_header.html.erb +1 -1
- data/app/views/components/card/_title.html.erb +1 -1
- data/app/views/components/combobox/_option.html.erb +2 -2
- data/app/views/components/drawer/_close.html.erb +11 -5
- data/app/views/components/drawer/_content.html.erb +1 -1
- data/app/views/components/drawer/_footer.html.erb +1 -1
- data/app/views/components/drawer/_header.html.erb +1 -1
- data/app/views/components/drawer/_provider.html.erb +1 -1
- data/app/views/components/drawer/_trigger.html.erb +4 -2
- data/app/views/components/pagination/_ellipsis.html.erb +5 -8
- data/app/views/components/pagination/_link.html.erb +1 -1
- data/app/views/components/pagination/_next.html.erb +6 -7
- data/app/views/components/pagination/_previous.html.erb +6 -7
- data/app/views/components/sidebar/_content.html.erb +1 -1
- data/app/views/components/sidebar/_footer.html.erb +1 -1
- data/app/views/components/sidebar/_group.html.erb +1 -1
- data/app/views/components/sidebar/_header.html.erb +1 -1
- data/app/views/components/sidebar/_inset.html.erb +1 -1
- data/app/views/components/sidebar/_menu.html.erb +1 -1
- data/app/views/components/sidebar/_menu_button.html.erb +1 -1
- data/app/views/components/sidebar/_menu_item.html.erb +1 -1
- data/app/views/components/sidebar/_menu_link.html.erb +3 -3
- data/app/views/components/sidebar/_provider.html.erb +1 -1
- data/app/views/components/sidebar/_trigger.html.erb +1 -1
- data/app/views/components/stats/_stats_card.html.erb +7 -6
- data/app/views/components/toast/_action.html.erb +2 -1
- data/lib/generators/maquina_components/install/templates/theme.css.tt +11 -0
- data/lib/maquina_components/version.rb +1 -1
- metadata +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
active: (active ? true : nil)
|
|
6
6
|
) %>
|
|
7
7
|
|
|
8
|
-
<%= link_to url, class: css_classes, data: merged_data,
|
|
8
|
+
<%= link_to url, class: css_classes.presence, data: merged_data,
|
|
9
9
|
"aria-current": (active ? "page" : nil), **html_options do %>
|
|
10
10
|
<% if icon_name.present? %>
|
|
11
11
|
<%= icon_for(icon_name) %>
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
<% merged_data =
|
|
3
3
|
merge_component_data(html_options, sidebar_part: "menu-item") %>
|
|
4
4
|
|
|
5
|
-
<%= content_tag :li, class: "group/menu-item
|
|
5
|
+
<%= content_tag :li, class: class_names("group/menu-item", css_classes), data: merged_data, **html_options do %>
|
|
6
6
|
<%= yield %>
|
|
7
7
|
<% end %>
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
active: (active ? true : nil)
|
|
5
5
|
) %>
|
|
6
6
|
|
|
7
|
-
<%= link_to url, class: css_classes, data: merged_data,
|
|
7
|
+
<%= link_to url, class: css_classes.presence, data: merged_data,
|
|
8
8
|
"aria-current": (active ? "page" : nil), **html_options do %>
|
|
9
9
|
<% if icon.present? || text_icon.present? %>
|
|
10
10
|
<div data-sidebar-part="menu-avatar">
|
|
11
11
|
<% if icon.present? %>
|
|
12
|
-
<%= image_tag icon, class: icon_classes %>
|
|
12
|
+
<%= image_tag icon, class: icon_classes.presence %>
|
|
13
13
|
<% elsif text_icon.present? %>
|
|
14
|
-
|
|
14
|
+
<%= tag.span text_icon, class: icon_classes.presence %>
|
|
15
15
|
<% end %>
|
|
16
16
|
</div>
|
|
17
17
|
<% end %>
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
action: "keydown.meta+#{keyboard_shortcut}@window->sidebar#toggleWithKeyboard keydown.ctrl+#{keyboard_shortcut}@window->sidebar#toggleWithKeyboard"
|
|
12
12
|
) %>
|
|
13
13
|
|
|
14
|
-
<%= content_tag :div, id: id || "sidebar-provider", class: css_classes, data: merged_data, **html_options do %>
|
|
14
|
+
<%= content_tag :div, id: id || "sidebar-provider", class: css_classes.presence, data: merged_data, **html_options do %>
|
|
15
15
|
<%= yield %>
|
|
16
16
|
<% end %>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
sidebar_trigger_sidebar_outlet: "[data-outlet='sidebar']"
|
|
7
7
|
) %>
|
|
8
8
|
|
|
9
|
-
<%= button_tag type: :button, class: css_classes, data: merged_data, **html_options do %>
|
|
9
|
+
<%= button_tag type: :button, class: css_classes.presence, data: merged_data, **html_options do %>
|
|
10
10
|
<%= icon_for(icon_name) %>
|
|
11
11
|
<span class="sr-only">Toggle Sidebar</span>
|
|
12
12
|
<% end %>
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
icon_classes = icon_classes.presence || icon_class
|
|
6
6
|
value_classes = value_classes.presence || value_class
|
|
7
7
|
|
|
8
|
-
#
|
|
9
|
-
#
|
|
8
|
+
# Symbols resolve through icon_for (app icons first, then built-ins);
|
|
9
|
+
# legacy kebab-case strings map to built-in names; anything else renders
|
|
10
|
+
# as custom icon markup.
|
|
10
11
|
legacy_icons = {
|
|
11
12
|
"message-square" => :message_square,
|
|
12
13
|
"arrow-up" => :arrow_up,
|
|
@@ -25,16 +26,16 @@
|
|
|
25
26
|
<div data-stats-part="body">
|
|
26
27
|
<div data-stats-part="text">
|
|
27
28
|
<p data-stats-part="title"><%= title %></p>
|
|
28
|
-
|
|
29
|
+
<%= tag.p value, class: value_classes.presence, data: {stats_part: "value"} %>
|
|
29
30
|
<% if subtitle.present? %>
|
|
30
31
|
<p data-stats-part="subtitle"><%= subtitle %></p>
|
|
31
32
|
<% end %>
|
|
32
33
|
</div>
|
|
33
34
|
|
|
34
35
|
<% if icon.present? %>
|
|
35
|
-
|
|
36
|
-
<%= icon_name ?
|
|
37
|
-
|
|
36
|
+
<%= tag.div class: icon_classes.presence, data: {stats_part: "icon"} do %>
|
|
37
|
+
<%= icon_name ? icon_for(icon_name, class: "size-8") : icon %>
|
|
38
|
+
<% end %>
|
|
38
39
|
<% end %>
|
|
39
40
|
</div>
|
|
40
41
|
<% end %>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<%# locals: (label:, href: nil, method: nil, css_classes: "", **html_options) %>
|
|
2
2
|
<% merged_data = merge_component_data(html_options,
|
|
3
|
-
toast_part: "action"
|
|
3
|
+
toast_part: "action",
|
|
4
|
+
action: ("toast#handleAction" if href.blank?)
|
|
4
5
|
) %>
|
|
5
6
|
|
|
6
7
|
<% merged_data["turbo-method"] = method if method.present? %>
|
|
@@ -155,6 +155,17 @@
|
|
|
155
155
|
--color-destructive: var(--destructive);
|
|
156
156
|
--color-destructive-foreground: var(--destructive-foreground);
|
|
157
157
|
|
|
158
|
+
--color-success: var(--success);
|
|
159
|
+
--color-success-foreground: var(--success-foreground);
|
|
160
|
+
|
|
161
|
+
--color-warning: var(--warning);
|
|
162
|
+
--color-warning-foreground: var(--warning-foreground);
|
|
163
|
+
|
|
164
|
+
/* --info and --info-foreground are declared in the shape/state token block
|
|
165
|
+
the installer appends below this palette. */
|
|
166
|
+
--color-info: var(--info);
|
|
167
|
+
--color-info-foreground: var(--info-foreground);
|
|
168
|
+
|
|
158
169
|
--color-input: var(--input);
|
|
159
170
|
--color-border: var(--border);
|
|
160
171
|
--color-ring: var(--ring);
|