avo 4.0.0.beta.24 → 4.0.0.beta.25

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: 858d89b5eee9acd085d144cfbe352504a73070665ba7894fb74899389a94e76e
4
- data.tar.gz: 979d5e1533b6861febe27ba26575212d1aa7179de2854a907ea33a8318771fd6
3
+ metadata.gz: a6b665112ab80fbc0f5b2f8ed14cafb1ce6ca767975e349b645882c94e559ad7
4
+ data.tar.gz: e17bb67497bdd0e0972fe90e5a007d83d76153bb0776539a2bac39c8e5537bbe
5
5
  SHA512:
6
- metadata.gz: 364d550fa50bec359e6cd1de909f0a707fd063cd97f39d01f39c0bf470393dd464172ee460e2ef5eb229c1269a349f7ecdd1f39c7a19e450bc9e986a70b3ec37
7
- data.tar.gz: 33deab334360ac6b4e684e5368fe423f28d32fc21c60ddf8ae47d135261578ec6aeda13f316f2b57f5388d9a787bb7fa48d7d9c211b016f09b33ec821c5131f9
6
+ metadata.gz: 5c58ca46f77393b6382fba5075303b9bb0ef1481ab69012ba9fdca10f297f38c19244df8c14d4dd7adb417af656454b17378ce7eca83bb67215c74f38a355ca6
7
+ data.tar.gz: b261d3cc4e8535d09be07826a242ad3edcb523bb76b8fc1547240bdab7f8542421b1dc435f060c2a325509ebe55e1f5a067c7e9e68f0f536c66904fb30c6aa00
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (4.0.0.beta.24)
4
+ avo (4.0.0.beta.25)
5
5
  actionview (>= 6.1)
6
6
  active_link_to
7
7
  activerecord (>= 6.1)
@@ -301,7 +301,11 @@
301
301
  --color-primary-800: rgb(var(--avo-color-primary-800));
302
302
  --color-primary-850: rgb(var(--avo-color-primary-850));
303
303
  --color-primary-900: rgb(var(--avo-color-primary-900));
304
+ --aspect-media-library-item: 4 / 3;
305
+ --shadow-panel: "0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06), 0px 0px 1px rgba(0, 0, 0, 0.04)";
304
306
  --shadow-modal: " 0px 24px 32px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04)";
307
+ --breakpoint-xs: 30rem;
308
+ --container-8xl: 96rem;
305
309
  --text-tiny: 0.625rem;
306
310
  --color-table-row-selected: var(--color-secondary);
307
311
  --color-table-row-hover: color-mix(in srgb, oklch(97.31% 0.0000 89.88), oklch(20.46% 0.0000 89.88) 2%);
@@ -746,6 +750,9 @@
746
750
  .my-auto {
747
751
  margin-block: auto;
748
752
  }
753
+ .ms-0 {
754
+ margin-inline-start: calc(var(--spacing) * 0);
755
+ }
749
756
  .ms-1 {
750
757
  margin-inline-start: calc(var(--spacing) * 1);
751
758
  }
@@ -954,6 +961,9 @@
954
961
  .h-10 {
955
962
  height: calc(var(--spacing) * 10);
956
963
  }
964
+ .h-12 {
965
+ height: calc(var(--spacing) * 12);
966
+ }
957
967
  .h-16 {
958
968
  height: calc(var(--spacing) * 16);
959
969
  }
@@ -2561,6 +2571,10 @@
2561
2571
  .underline-offset-2 {
2562
2572
  text-underline-offset: 2px;
2563
2573
  }
2574
+ .antialiased {
2575
+ -webkit-font-smoothing: antialiased;
2576
+ -moz-osx-font-smoothing: grayscale;
2577
+ }
2564
2578
  .scheme-dark {
2565
2579
  color-scheme: dark;
2566
2580
  }
@@ -2638,6 +2652,9 @@
2638
2652
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
2639
2653
  transition-duration: var(--tw-duration, var(--default-transition-duration));
2640
2654
  }
2655
+ .delay-150 {
2656
+ transition-delay: 150ms;
2657
+ }
2641
2658
  .duration-100 {
2642
2659
  --tw-duration: 100ms;
2643
2660
  transition-duration: 100ms;
@@ -2666,6 +2683,9 @@
2666
2683
  --tw-ease: var(--ease-out);
2667
2684
  transition-timing-function: var(--ease-out);
2668
2685
  }
2686
+ .will-change-transform {
2687
+ will-change: transform;
2688
+ }
2669
2689
  .select-none {
2670
2690
  -webkit-user-select: none;
2671
2691
  user-select: none;
@@ -29,6 +29,12 @@
29
29
  </div>
30
30
  <% end %>
31
31
 
32
+ <% if pre_bodies? %>
33
+ <% pre_bodies.each do |pre_body| %>
34
+ <div class="panel__pre-body"><%= pre_body %></div>
35
+ <% end %>
36
+ <% end %>
37
+
32
38
  <div class="panel__content">
33
39
  <div class="panel__body">
34
40
  <% if card? %>
@@ -15,6 +15,7 @@ class Avo::UI::PanelComponent < Avo::BaseComponent
15
15
  renders_one :controls
16
16
  renders_one :cover
17
17
  renders_one :sidebar
18
+ renders_many :pre_bodies
18
19
  renders_one :body
19
20
  renders_one :card, "Avo::UI::CardComponent" # wraps content into a card automatically
20
21
  renders_one :footer
@@ -115,9 +115,7 @@ module Avo
115
115
  def action_class
116
116
  @resource.hydrate(view: action_params[:resource_view].presence, user: _current_user, params: params)
117
117
 
118
- registered_action = @resource.get_actions.find do |action|
119
- action[:class].to_s == params[:action_id]
120
- end
118
+ registered_action = @resource.find_action(params[:action_id])
121
119
 
122
120
  if registered_action.nil?
123
121
  if Rails.env.development?
@@ -393,6 +393,14 @@ module Avo
393
393
  end
394
394
  end
395
395
 
396
+ def find_action(action_id)
397
+ actions = get_actions + Array(safe_call(:get_actions_from_custom_controls))
398
+
399
+ actions
400
+ .uniq { |action| action[:class].to_s }
401
+ .find { |action| action[:class].to_s == action_id.to_s }
402
+ end
403
+
396
404
  def hydrate(...)
397
405
  super
398
406
 
@@ -230,7 +230,7 @@ module Avo
230
230
  end
231
231
 
232
232
  # Click on the action from the panel (index and show above the table)
233
- # Pass list: nil to run an action outside of the list
233
+ # Pass list: nil to run a standalone action (found by data-action-name / action name, not link text)
234
234
  # Pass list: "List name" if list is not the default "Actions"
235
235
  # Example usage:
236
236
  # open_panel_action(action_name: "Dummy action")
@@ -241,7 +241,7 @@ module Avo
241
241
  end
242
242
 
243
243
  # Open the action from the record_id row
244
- # Pass list: nil to run an action outside of the list
244
+ # Pass list: nil to run a standalone row action (matched by action name, not visible label)
245
245
  # Pass list: "List name" if list is not the default "Actions"
246
246
  # Example usage:
247
247
  # open_row_action(action_name: "Dummy action")
@@ -377,17 +377,33 @@ module Avo
377
377
  find('[data-sidebar-target="sidebar"]')
378
378
  end
379
379
 
380
- # Opens an action. If a list is provided, it will click on the list first
381
- # and then find the specified action name within the panel.
382
- # If no list is present, it will directly click on the action link.
380
+ # Opens an action. If a list is provided, it will click the list trigger (Actions, etc.),
381
+ # then finds the action link inside the native popover panel referenced by popovertarget.
382
+ # If no list is present, it will directly click the action anchor (matched by
383
+ # data-action-name, i.e. the action's name), not the visible label — row controls
384
+ # often override the label while keeping the same action name.
383
385
  def open_action(action_name:, list:, context:, &block)
386
+ list_popover_id = nil
387
+
384
388
  within(context) do
385
389
  if list.present?
386
390
  sleep 0.1
387
- click_on list
388
- find("a[data-action-name='#{action_name}']", visible: :all).click
391
+ list_trigger = find(:link_or_button, text: list)
392
+ list_popover_id = list_trigger["popovertarget"].presence
393
+ list_trigger.click
389
394
  else
390
- click_link(action_name)
395
+ # Prefer visible matches only: the same action can appear again inside closed popovers/lists.
396
+ find("a[data-action-name='#{action_name}']", match: :first).click
397
+ end
398
+ end
399
+
400
+ if list.present? && list_popover_id.present?
401
+ within(page.find(:id, list_popover_id)) do
402
+ find("a[data-action-name='#{action_name}']", visible: :all, match: :first).click
403
+ end
404
+ elsif list.present?
405
+ within(context) do
406
+ find("a[data-action-name='#{action_name}']", visible: :all, match: :first).click
391
407
  end
392
408
  end
393
409
 
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "4.0.0.beta.24" unless const_defined?(:VERSION)
2
+ VERSION = "4.0.0.beta.25" unless const_defined?(:VERSION)
3
3
  end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.beta.24
4
+ version: 4.0.0.beta.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin
8
8
  - Mihai Marin
9
9
  - Paul Bob
10
+ autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 1980-01-02 00:00:00.000000000 Z
13
+ date: 2026-04-23 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: activerecord
@@ -1159,7 +1160,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1159
1160
  - !ruby/object:Gem::Version
1160
1161
  version: '0'
1161
1162
  requirements: []
1162
- rubygems_version: 4.0.9
1163
+ rubygems_version: 3.5.22
1164
+ signing_key:
1163
1165
  specification_version: 4
1164
1166
  summary: Admin panel framework and Content Management System for Ruby on Rails.
1165
1167
  test_files: []