rails_modal_manager 1.0.6 → 1.0.9

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: 0725e8d17ce5169b19c2f37ee399a214d79f4a8b7100b6ef21f57f43b17491bb
4
- data.tar.gz: a843fe209ad313a64ec6221b3909dbc09e6066facbd84c14c22f0e344ad0fb82
3
+ metadata.gz: 2e9713f9fdbf22102fe25d256b8f63a9bc67f9bb9d72580a9299e6ea4288d39e
4
+ data.tar.gz: 8b5f42ba84a0e0c3afe0bbbbf6ccdebe026b8b0b17f466e3566e134aead82273
5
5
  SHA512:
6
- metadata.gz: 9b30aad93209f7069f017bde3ce88a97caa690dfc9a4be49da13e4d5d72370a1fe80fd325aac2fbc347a623dd2a64f668b333c2f5ba2d321193bcf58cf22e962
7
- data.tar.gz: eaf415db4876d87a2d179183d499b0a18f7d1e106e8250392e2cacefc00431db72dccdbdb01e0e1a5b95d38a4beb64da33f1d5a83201035373ef884ec120f88c
6
+ metadata.gz: 933aad7d32e4ed154a72462879794128cfc93a517221165e64a7fdd91a7ffb49954dd64844088fe2ea27d2fd96a908a1a8c6dd536e6e3ec2c4a987c7cbba7fa1
7
+ data.tar.gz: c89c896fff7e3f584d304f6e803ab0a7cf7abec70709a39ca23869689b67ac7a6ae49d9c561d0389d3ea5f47be7b9b53fb6e8a5b1dad4a24a50df4ae8a95db1a
@@ -430,6 +430,42 @@
430
430
  color: var(--rmm-btn-primary-hover);
431
431
  }
432
432
 
433
+ /* Text buttons in header */
434
+ .rmm-header-btn-text {
435
+ width: auto;
436
+ padding: 0 12px;
437
+ gap: 6px;
438
+ font-size: 13px;
439
+ font-weight: 500;
440
+ }
441
+
442
+ .rmm-header-btn-text.rmm-header-btn-primary {
443
+ background: var(--rmm-btn-primary-bg);
444
+ color: white;
445
+ border-radius: 6px;
446
+ margin: 0 4px;
447
+ }
448
+
449
+ .rmm-header-btn-text.rmm-header-btn-primary:hover {
450
+ background: var(--rmm-btn-primary-hover);
451
+ }
452
+
453
+ .rmm-header-btn-text.rmm-header-btn-secondary {
454
+ background: var(--rmm-btn-ghost-bg);
455
+ color: var(--rmm-text-secondary);
456
+ border-radius: 6px;
457
+ margin: 0 4px;
458
+ }
459
+
460
+ .rmm-header-btn-text.rmm-header-btn-secondary:hover {
461
+ background: var(--rmm-btn-ghost-hover);
462
+ color: var(--rmm-text-primary);
463
+ }
464
+
465
+ .rmm-header-btn-label {
466
+ white-space: nowrap;
467
+ }
468
+
433
469
  /* Size controls dropdown */
434
470
  .rmm-size-controls {
435
471
  position: relative;
@@ -77,29 +77,6 @@
77
77
  </div>
78
78
 
79
79
  <div class="rmm-header-controls">
80
- <% if show_size_controls %>
81
- <div class="rmm-size-controls">
82
- <button type="button" class="rmm-header-btn" title="Change Size">
83
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
84
- <polyline points="15 3 21 3 21 9"></polyline>
85
- <polyline points="9 21 3 21 3 15"></polyline>
86
- <line x1="21" y1="3" x2="14" y2="10"></line>
87
- <line x1="3" y1="21" x2="10" y2="14"></line>
88
- </svg>
89
- </button>
90
- <div class="rmm-size-dropdown">
91
- <% %w[xs sm md lg xl full].each do |size| %>
92
- <button type="button"
93
- class="rmm-size-option <%= 'rmm-active' if size == current_size %>"
94
- data-action="click->rmm-header#changeSize"
95
- data-size="<%= size %>">
96
- <%= size.upcase %>
97
- </button>
98
- <% end %>
99
- </div>
100
- </div>
101
- <% end %>
102
-
103
80
  <% if show_size_controls %>
104
81
  <%# Default size button - restores to original size %>
105
82
  <button type="button"
@@ -149,20 +126,27 @@
149
126
  btn_id = btn[:id]
150
127
  btn_icon = btn[:icon]
151
128
  btn_icon_svg = btn[:icon_svg] || (btn_icon && header_button_icons[btn_icon])
129
+ btn_label = btn[:label]
152
130
  btn_title = btn[:title] || ""
153
131
  btn_variant = btn[:variant] || "default"
154
132
  btn_onclick = btn[:onclick]
133
+ btn_data_action = btn[:data_action]
155
134
  btn_class = "rmm-header-btn rmm-header-btn-custom"
156
135
  btn_class += " rmm-header-btn-#{btn_variant}" if btn_variant != "default"
136
+ btn_class += " rmm-header-btn-text" if btn_label.present?
157
137
  %>
158
138
  <button type="button"
159
139
  <% if btn_id.present? %>id="<%= btn_id %>"<% end %>
160
140
  class="<%= btn_class %>"
161
141
  <% if btn_onclick.present? %>onclick="<%= btn_onclick %>"<% end %>
142
+ <% if btn_data_action.present? %>data-action="<%= btn_data_action %>"<% end %>
162
143
  title="<%= btn_title %>">
163
144
  <% if btn_icon_svg.present? %>
164
145
  <%= btn_icon_svg.html_safe %>
165
146
  <% end %>
147
+ <% if btn_label.present? %>
148
+ <span class="rmm-header-btn-label"><%= btn_label %></span>
149
+ <% end %>
166
150
  </button>
167
151
  <% end %>
168
152
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsModalManager
4
- VERSION = "1.0.6"
4
+ VERSION = "1.0.9"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_modal_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - reshacs