avo 3.17.0 → 3.17.1.tw4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +1 -0
  4. data/app/assets/stylesheets/avo.base.css +6 -14
  5. data/app/assets/stylesheets/css/fields/progress.css +4 -4
  6. data/app/assets/stylesheets/css/fields/tiptap.css +4 -4
  7. data/app/assets/stylesheets/css/pagination.css +2 -2
  8. data/app/assets/stylesheets/css/search.css +4 -4
  9. data/app/assets/stylesheets/css/tooltips.css +1 -1
  10. data/app/components/avo/actions_component.html.erb +3 -3
  11. data/app/components/avo/alert_component.html.erb +2 -2
  12. data/app/components/avo/alert_component.rb +1 -1
  13. data/app/components/avo/backtrace_alert_component.html.erb +3 -3
  14. data/app/components/avo/button_component.rb +3 -3
  15. data/app/components/avo/divider_component.html.erb +2 -2
  16. data/app/components/avo/empty_state_component.html.erb +1 -1
  17. data/app/components/avo/field_wrapper_component.html.erb +1 -1
  18. data/app/components/avo/fields/belongs_to_field/edit_component.html.erb +1 -1
  19. data/app/components/avo/fields/boolean_field/edit_component.html.erb +1 -1
  20. data/app/components/avo/fields/boolean_group_field/edit_component.rb +1 -1
  21. data/app/components/avo/fields/common/files/view_type/list_item_component.html.erb +3 -3
  22. data/app/components/avo/fields/common/key_value_component.html.erb +3 -3
  23. data/app/components/avo/fields/common/status_viewer_component.html.erb +6 -5
  24. data/app/components/avo/fields/date_field/edit_component.html.erb +1 -1
  25. data/app/components/avo/fields/date_time_field/edit_component.html.erb +1 -1
  26. data/app/components/avo/fields/tags_field/edit_component.html.erb +1 -1
  27. data/app/components/avo/fields/tags_field/tag_component.html.erb +1 -1
  28. data/app/components/avo/fields/tiptap_field/edit_component.html.erb +1 -1
  29. data/app/components/avo/fields/trix_field/edit_component.html.erb +1 -1
  30. data/app/components/avo/filters_component.html.erb +3 -3
  31. data/app/components/avo/index/grid_item_component.html.erb +2 -2
  32. data/app/components/avo/index/grid_item_component.rb +1 -1
  33. data/app/components/avo/index/resource_grid_component.html.erb +1 -1
  34. data/app/components/avo/index/resource_map_component.html.erb +1 -1
  35. data/app/components/avo/index/resource_table_component.html.erb +1 -1
  36. data/app/components/avo/index/table_row_component.html.erb +3 -3
  37. data/app/components/avo/items/panel_component.html.erb +1 -1
  38. data/app/components/avo/media_library/item_details_component.html.erb +1 -1
  39. data/app/components/avo/modal_component.html.erb +1 -1
  40. data/app/components/avo/paginator_component.html.erb +1 -2
  41. data/app/components/avo/panel_component.html.erb +2 -2
  42. data/app/components/avo/profile_item_component.rb +1 -1
  43. data/app/components/avo/resource_sidebar_component.html.erb +1 -1
  44. data/app/components/avo/row_selector_component.html.erb +1 -1
  45. data/app/components/avo/sidebar/link_component.rb +1 -1
  46. data/app/components/avo/sidebar_component.html.erb +3 -3
  47. data/app/components/avo/sidebar_profile_component.html.erb +4 -4
  48. data/app/components/avo/tab_group_component.html.erb +1 -1
  49. data/app/helpers/avo/application_helper.rb +4 -4
  50. data/app/javascript/js/controllers/fields/key_value_controller.js +1 -1
  51. data/app/javascript/js/controllers/fields/tags_field_helpers.js +1 -1
  52. data/app/javascript/js/controllers/search_controller.js +2 -2
  53. data/app/views/avo/base/preview.html.erb +1 -1
  54. data/app/views/avo/debug/report.html.erb +1 -1
  55. data/app/views/avo/debug/status.html.erb +19 -14
  56. data/app/views/avo/home/_actions.html.erb +1 -1
  57. data/app/views/avo/home/_dashboards.html.erb +1 -1
  58. data/app/views/avo/home/_filters.html.erb +1 -1
  59. data/app/views/avo/home/_resources.html.erb +2 -2
  60. data/app/views/avo/home/failed_to_load.html.erb +1 -1
  61. data/app/views/avo/partials/_confirm_dialog.html.erb +4 -4
  62. data/app/views/avo/partials/_custom_tools_alert.html.erb +6 -6
  63. data/app/views/avo/partials/_navbar.html.erb +3 -3
  64. data/app/views/avo/partials/_resource_search.html.erb +1 -1
  65. data/app/views/avo/partials/_table_header.html.erb +2 -2
  66. data/app/views/avo/sidebar/_license_warning.html.erb +1 -1
  67. data/lib/avo/concerns/row_controls_configuration.rb +16 -15
  68. data/lib/avo/resources/items/holder.rb +1 -1
  69. data/lib/avo/version.rb +1 -1
  70. data/lib/generators/avo/resource_tool_generator.rb +1 -1
  71. data/lib/generators/avo/templates/cards/partial_card_partial.tt +1 -1
  72. data/lib/generators/avo/tool_generator.rb +2 -2
  73. data/lib/tasks/avo_tasks.rake +1 -1
  74. data/public/avo-assets/avo.base.css +7892 -9538
  75. data/public/avo-assets/avo.base.js +3 -3
  76. data/public/avo-assets/avo.base.js.map +2 -2
  77. metadata +3 -6
  78. data/app/assets/stylesheets/css/tailwindcss/base.css +0 -1
  79. data/app/assets/stylesheets/css/tailwindcss/components.css +0 -1
  80. data/app/assets/stylesheets/css/tailwindcss/utilities.css +0 -1
@@ -23,6 +23,6 @@ class Avo::ProfileItemComponent < Avo::BaseComponent
23
23
  private
24
24
 
25
25
  def button_classes
26
- "flex-1 flex items-center justify-center bg-white text-left cursor-pointer text-gray-800 font-semibold hover:bg-primary-100 block px-4 py-1 w-full py-3 text-center rounded w-full"
26
+ "flex-1 flex items-center justify-center bg-white text-left cursor-pointer text-gray-800 font-semibold hover:bg-primary-100 block px-4 py-1 w-full py-3 text-center rounded-sm w-full"
27
27
  end
28
28
  end
@@ -1,4 +1,4 @@
1
- <div class="resource-sidebar-component divide-y"
1
+ <div class="resource-sidebar-component divide-y divide-gray-200"
2
2
  data-component-name="<%= self.class.to_s.underscore %>"
3
3
  data-component-index="<%= @index %>"
4
4
  data-resource-name="<%= @resource.class.to_s %>"
@@ -5,7 +5,7 @@
5
5
  name: t("avo.select_item"),
6
6
  title: t("avo.select_item"),
7
7
  autocomplete: :off,
8
- class: class_names("mx-3 rounded checked:bg-primary-400 focus:checked:!bg-primary-400", {
8
+ class: class_names("mx-3 rounded-sm checked:bg-primary-400 focus:checked:!bg-primary-400", {
9
9
  "absolute inset-auto left-0 mt-3 z-10 hidden group-hover:block checked:block": @floating,
10
10
  "w-5 h-5": @size.to_sym == :lg,
11
11
  "w-4 h-4": @size.to_sym != :lg,
@@ -26,6 +26,6 @@ class Avo::Sidebar::LinkComponent < Avo::BaseComponent
26
26
  end
27
27
 
28
28
  def classes
29
- "px-4 pr-0 flex-1 flex mx-6 leading-none py-2 text-black rounded font-medium hover:bg-gray-100 gap-1"
29
+ "px-4 pr-0 flex-1 flex mx-6 leading-none py-2 text-black rounded-sm font-medium hover:bg-gray-100 gap-1"
30
30
  end
31
31
  end
@@ -1,6 +1,6 @@
1
1
  <%= content_tag :div,
2
2
  class: class_names(
3
- "avo-sidebar fixed z-[60] t-0 application-sidebar w-64 flex-1 border-r lg:border-none bg-none xh-dvh h-[calc(100dvh-4rem)] bg-application lg:bg-transparent",
3
+ "avo-sidebar fixed z-[60] t-0 application-sidebar w-64 flex-1 border-r border-gray-200 lg:border-none bg-none xh-dvh h-[calc(100dvh-4rem)] bg-application lg:bg-transparent",
4
4
  "print:hidden": Avo.configuration.hide_layout_when_printing,
5
5
  "hidden": !@sidebar_open,
6
6
  ),
@@ -61,8 +61,8 @@
61
61
  </div>
62
62
  </div>
63
63
  <% if Rails.env.development? %>
64
- <div class="p-4 border-t group">
65
- <%= link_to helpers.avo.avo_private_status_path, class: "block px-4 py-2 border rounded flex justify-between items-center w-full text-black text-sm" do %>
64
+ <div class="p-4 border-t border-gray-200 group">
65
+ <%= link_to helpers.avo.avo_private_status_path, class: "block px-4 py-2 border border-gray-200 rounded-sm flex justify-between items-center w-full text-black text-sm" do %>
66
66
  <span>Avo Status</span> <span><div class="rounded-full w-4 h-4 <%= Avo.app_status ? "bg-green-400" : "bg-orange-400" %>"></div></span>
67
67
  <% end %>
68
68
  <div class="absolute text-xs text-gray-700 group-hover:block hidden text-center w-full -ml-4">👆Visible only in development👆</div>
@@ -1,7 +1,7 @@
1
- <div class="text-black border-gray-150 p-4 flex border-t">
1
+ <div class="text-black border-gray-150 p-4 flex border-t border-gray-200">
2
2
  <div class="flex-1 flex space-x-4 w-full">
3
3
  <% if avatar.present? %>
4
- <div class="relative aspect-square w-10 h-10 overflow-hidden rounded shrink-0">
4
+ <div class="relative aspect-square w-10 h-10 overflow-hidden rounded-sm shrink-0">
5
5
  <%= image_tag helpers.main_app.url_for(avatar), class: "object-cover min-w-full min-h-full h-full" %>
6
6
  </div>
7
7
  <% end %>
@@ -21,7 +21,7 @@
21
21
  <%= helpers.svg "avo/three-dots", class: 'h-4' %>
22
22
  </a>
23
23
  <div
24
- class="hidden absolute flex flex-col inset-auto right-0 bottom-0 mb-8 bg-white rounded min-w-[200px] shadow-context z-40"
24
+ class="hidden absolute flex flex-col inset-auto right-0 bottom-0 mb-8 bg-white rounded-sm min-w-[200px] shadow-context z-40"
25
25
  data-toggle-target="panel"
26
26
  data-transition-enter="transition ease-in-out duration-100"
27
27
  data-transition-enter-start="transform opacity-0 translate-y-3"
@@ -49,7 +49,7 @@
49
49
  action: "submit->sign-out#handle",
50
50
  },
51
51
  class: 'flex-1' do |form| %>
52
- <%= form.button turbo_confirm: t('avo.are_you_sure'), class: "flex-1 flex items-center justify-center bg-white text-left cursor-pointer text-red-600 font-semibold hover:bg-red-100 block px-4 py-1 w-full py-3 text-center rounded w-full" do %>
52
+ <%= form.button turbo_confirm: t('avo.are_you_sure'), class: "flex-1 flex items-center justify-center bg-white text-left cursor-pointer text-red-600 font-semibold hover:bg-red-100 block px-4 py-1 w-full py-3 text-center rounded-sm w-full" do %>
53
53
  <%= helpers.svg "avo/logout", class: 'h-4 mr-1' %> <%= t('avo.sign_out') %>
54
54
  <% end %>
55
55
  <% end %>
@@ -11,7 +11,7 @@
11
11
  <% visible_tabs.each_with_index do |tab, index| %>
12
12
  <%= content_tag :div, **args(tab) do %>
13
13
  <%= render Avo::PanelHeaderComponent.new name: group.title, description: group.description %>
14
- <div class="border rounded-lg p-2 -mx-2 -my-2 lg:p-4 lg:-mx-4 lg:-my-3 space-y-4">
14
+ <div class="border border-gray-200 rounded-lg p-2 -mx-2 -my-2 lg:p-4 lg:-mx-4 lg:-my-3 space-y-4">
15
15
  <%= render Avo::TabSwitcherComponent.new resource: resource, current_tab: visible_tabs.first, group: group, active_tab_name: tab.name, view: view %>
16
16
  <% if !tab.is_empty? %>
17
17
  <% if tab.lazy_load && view.display? %>
@@ -28,7 +28,7 @@ module Avo
28
28
  end
29
29
 
30
30
  def button_classes(extra_classes = nil, color: nil, variant: nil, size: :md, active: false)
31
- classes = "inline-flex flex-grow-0 items-center text-sm font-semibold leading-6 fill-current whitespace-nowrap transition duration-100 rounded transform transition duration-100 active:translate-x-px active:translate-y-px cursor-pointer disabled:cursor-not-allowed #{extra_classes}"
31
+ classes = "inline-flex grow-0 items-center text-sm font-semibold leading-6 fill-current whitespace-nowrap transition duration-100 rounded-sm transform transition duration-100 active:translate-x-px active:translate-y-px cursor-pointer disabled:cursor-not-allowed #{extra_classes}"
32
32
 
33
33
  if color.present?
34
34
  if variant.present? && (variant.to_sym == :outlined)
@@ -71,7 +71,7 @@ module Avo
71
71
  end
72
72
 
73
73
  def input_classes(extra_classes = "", has_error: false)
74
- classes = "appearance-none inline-flex bg-gray-25 disabled:cursor-not-allowed text-gray-600 disabled:opacity-50 rounded py-2 px-3 leading-tight border focus:border-gray-600 focus-visible:ring-0 focus:text-gray-700 placeholder:text-gray-300"
74
+ classes = "appearance-none inline-flex bg-gray-25 disabled:cursor-not-allowed text-gray-600 disabled:opacity-50 rounded-sm py-2 px-3 leading-tight border focus:border-gray-600 focus-visible:ring-0 focus:text-gray-700 placeholder:text-gray-300"
75
75
 
76
76
  classes += if has_error
77
77
  " border-red-600"
@@ -85,11 +85,11 @@ module Avo
85
85
  end
86
86
 
87
87
  def white_panel_classes
88
- "bg-white rounded shadow-md"
88
+ "bg-white rounded-sm shadow-md"
89
89
  end
90
90
 
91
91
  def card_classes
92
- "bg-white rounded shadow-panel"
92
+ "bg-white rounded-sm shadow-panel"
93
93
  end
94
94
 
95
95
  def get_model_class(model)
@@ -145,7 +145,7 @@ export default class extends Controller {
145
145
  const inputValue = id === 'key' ? key : value
146
146
 
147
147
  return `<input
148
- class="${this.options.inputClasses} focus:bg-gray-100 !rounded-none border-gray-600 border-r border-l-0 border-b-0 border-t-0 focus:border-gray-300 w-1/2 focus:outline-none outline-none key-value-input-${id}"
148
+ class="${this.options.inputClasses} focus:bg-gray-100 !rounded-none border-gray-600 border-r border-l-0 border-b-0 border-t-0 focus:border-gray-300 w-1/2 focus:outline-hidden outline-hidden key-value-input-${id}"
149
149
  data-action="input->key-value#${id}FieldUpdated"
150
150
  placeholder="${this.options[`${id}_label`]}"
151
151
  data-index="${index}"
@@ -36,7 +36,7 @@ export function suggestionItemTemplate(tagData) {
36
36
  ${
37
37
  tagData.avatar
38
38
  ? `
39
- <div class='rounded w-8 h-8 block mr-2'>
39
+ <div class='rounded-sm w-8 h-8 block mr-2'>
40
40
  <img onerror="this.style.visibility='hidden'" class="w-full" src="${tagData.avatar}">
41
41
  </div>`
42
42
  : ''
@@ -152,7 +152,7 @@ export default class extends Controller {
152
152
  classes = 'rounded-full'
153
153
  break
154
154
  case 'rounded':
155
- classes = 'rounded'
155
+ classes = 'rounded-sm'
156
156
  break
157
157
  case 'square':
158
158
  classes = 'rounded-none'
@@ -163,7 +163,7 @@ export default class extends Controller {
163
163
  createElement('img', {
164
164
  src: item._avatar,
165
165
  alt: item._label,
166
- class: `flex-shrink-0 w-8 h-8 my-[2px] inline mr-2 ${classes}`,
166
+ class: `shrink-0 w-8 h-8 my-[2px] inline mr-2 ${classes}`,
167
167
  }),
168
168
  )
169
169
  }
@@ -5,7 +5,7 @@
5
5
  <% end %>
6
6
 
7
7
  <% if @preview_fields.present? %>
8
- <div class="mt-0 divide-y border-t">
8
+ <div class="mt-0 divide-y divide-gray-200 border-t border-gray-200">
9
9
  <% @preview_fields.each_with_index do |field, index| %>
10
10
  <%= render field
11
11
  .hydrate(
@@ -12,7 +12,7 @@
12
12
  <div class="sm:col-span-6 mt-4">
13
13
  <label for="about" class="block text-sm font-medium text-gray-700">Details</label>
14
14
  <div class="mt-1">
15
- <%= f.text_area :body, rows: 3, class: "block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm disabled:bg-gray-100", disabled: !Avo::Current.license.pro? %>
15
+ <%= f.text_area :body, rows: 3, class: "block w-full rounded-md border-gray-300 shadow-xs focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm disabled:bg-gray-100", disabled: !Avo::Current.license.pro? %>
16
16
  </div>
17
17
  </div>
18
18
  <%= f.hidden_field :license_key, value: Avo::Services::DebugService.debug_report(request)[:license_response]["license_key"] %>
@@ -19,7 +19,7 @@
19
19
  <% end %>
20
20
  <% c.with_bare_content do %>
21
21
  <div class="grid gap-4 grid-cols-2">
22
- <div class="relative flex flex-col bg-white rounded shadow-panel p-4 space-y-4 h-full">
22
+ <div class="relative flex flex-col bg-white rounded-sm shadow-panel p-4 space-y-4 h-full">
23
23
  <div class="flex justify-between w-full">
24
24
  <div class="font-semibold">License info</div>
25
25
  <div class="flex justify-self-end">
@@ -52,26 +52,31 @@
52
52
  </dl>
53
53
  <% end %>
54
54
  <div class="mt-4">
55
- <dl>
55
+ <dl class="flex flex-col">
56
56
  <% information_items.each do |item| %>
57
- <dt class="font-semibold text-sm"><%= item.humanize %></dt>
58
- <dd><%= license.response[item] %></dd>
59
- <% end %>
60
- <dt class="font-semibold text-sm">Last fetched at</dt>
61
- <dd><%= license.response['fetched_at'] %> <br>
62
- <% if license.response['fetched_at'].present? %>
63
- (<%= time_ago_in_words license.response['fetched_at'] %> ago)</dd>
57
+ <div>
58
+ <dt class="font-semibold text-sm"><%= item.humanize %></dt>
59
+ <dd><%= license.response[item] %></dd>
60
+ </div>
64
61
  <% end %>
65
- <dt class="font-semibold text-sm">Cache store</dt>
66
- <dd>
67
- <%= Avo.cache_store.class %>
68
- </dd>
62
+ <dt class="font-semibold text-sm">Last fetched at</dt>
63
+ <dd><%= license.response['fetched_at'] %> <br>
64
+ <% if license.response['fetched_at'].present? %>
65
+ (<%= time_ago_in_words license.response['fetched_at'] %> ago)
66
+ <% end %>
67
+ </dd>
68
+ <div>
69
+ <dt class="font-semibold text-sm">Cache store</dt>
70
+ <dd>
71
+ <%= Avo.cache_store.class %>
72
+ </dd>
73
+ </div>
69
74
  </dl>
70
75
  </div>
71
76
  </div>
72
77
  </div>
73
78
  </div>
74
- <div class="relative flex flex-col bg-white rounded shadow-panel p-4 space-y-4 h-full">
79
+ <div class="relative flex flex-col bg-white rounded-sm shadow-panel p-4 space-y-4 h-full">
75
80
  <div class="flex justify-between w-full">
76
81
  <div class="font-semibold">Plugins</div>
77
82
  </div>
@@ -7,7 +7,7 @@
7
7
  <div class="mt-2">
8
8
  <code class="text-lg">Toggle published</code>
9
9
  <div class="mt-1">
10
- <code class="p-1 rounded bg-sky-500 text-white">bin/rails generate avo:action toggle_published</code>
10
+ <code class="p-1 rounded-sm bg-sky-500 text-white">bin/rails generate avo:action toggle_published</code>
11
11
  </div>
12
12
  </div>
13
13
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  <div class="mt-2">
10
10
  <div class="mt-1">
11
- <code class="p-1 rounded bg-sky-500 text-white">bin/rails generate avo:dashboard dashy</code>
11
+ <code class="p-1 rounded-sm bg-sky-500 text-white">bin/rails generate avo:dashboard dashy</code>
12
12
  </div>
13
13
  </div>
14
14
 
@@ -7,7 +7,7 @@
7
7
  <div class="mt-2">
8
8
  <code class="text-lg">Published filter</code>
9
9
  <div class="mt-1">
10
- <code class="p-1 rounded bg-sky-500 text-white">bin/rails generate avo:filter published_filter</code>
10
+ <code class="p-1 rounded-sm bg-sky-500 text-white">bin/rails generate avo:filter published_filter</code>
11
11
  </div>
12
12
  </div>
13
13
 
@@ -20,7 +20,7 @@
20
20
  <% models.each do |model| %>
21
21
  <code class="text-lg"><%= model.to_s %></code>
22
22
  <div>
23
- <code class="p-1 rounded bg-sky-500 text-white">bin/rails generate avo:resource <%= model.to_s %></code>
23
+ <code class="p-1 rounded-sm bg-sky-500 text-white">bin/rails generate avo:resource <%= model.to_s %></code>
24
24
  </div>
25
25
  <% end %>
26
26
  </div>
@@ -30,7 +30,7 @@
30
30
  You may generate a resource using the following command:
31
31
  <br>
32
32
 
33
- <code class="p-1 rounded bg-sky-500 text-white">bin/rails generate avo:resource post</code>
33
+ <code class="p-1 rounded-sm bg-sky-500 text-white">bin/rails generate avo:resource post</code>
34
34
  </div>
35
35
  <% end %>
36
36
 
@@ -8,7 +8,7 @@
8
8
  <div class="relative block text-gray-300 h-64 w-full">
9
9
  <%= svg "avo/failed_to_load", class: "#{classes} h-52 text-gray-400" %>
10
10
  </div>
11
- <div class="relative block text-center text-lg text-gray-400 font-semibold pb-6"><%= label %> <span class="border-b-2 border-dashed"><%= params[:turbo_frame].to_s.humanize.downcase if params[:turbo_frame].present? %></span> frame</div>
11
+ <div class="relative block text-center text-lg text-gray-400 font-semibold pb-6"><%= label %> <span class="border-b-2 border-gray-200 border-dashed"><%= params[:turbo_frame].to_s.humanize.downcase if params[:turbo_frame].present? %></span> frame</div>
12
12
  <% if Rails.env.development? && src_url %>
13
13
  <div class="text-center text-sm w-full pb-3">
14
14
  This is not an issue with Avo. Use <%= link_to 'this page', src_url, target: :_blank %> to see why this frame failed to load.
@@ -1,7 +1,7 @@
1
- <dialog id="turbo-confirm" class="w-72">
1
+ <dialog id="turbo-confirm" class="mx-auto my-auto w-72">
2
2
  <form method="dialog">
3
3
  <div class="relative w-full max-w-xl max-h-full">
4
- <div class="relative bg-white rounded-lg shadow">
4
+ <div class="relative bg-white rounded-lg shadow-sm">
5
5
  <button value="cancel" class="absolute top-3 end-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center" data-modal-hide="popup-modal" tabindex="3">
6
6
  <%= svg "x-mark", class: "size-6" %>
7
7
  <span class="sr-only"><%= t "avo.close_modal" %></span>
@@ -14,10 +14,10 @@
14
14
  <%= t "avo.are_you_sure" %>
15
15
  </p>
16
16
  <div class="mt-12 w-full flex flex-col justify-center gap-2">
17
- <button value="confirm" class="text-red-600 border border-red-600 hover:bg-red-50 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-lg text-sm items-center px-4 py-2 text-center" tabindex="1" autofocus>
17
+ <button value="confirm" class="text-red-600 border border-red-600 hover:bg-red-50 focus:ring-4 focus:outline-hidden focus:ring-red-300 font-medium rounded-lg text-sm items-center px-4 py-2 text-center cursor-pointer" tabindex="1" autofocus>
18
18
  <%= t "avo.yes_confirm" %>
19
19
  </button>
20
- <button value="cancel" class="px-4 py-2 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100" tabindex="2">
20
+ <button value="cancel" class="px-4 py-2 text-sm font-medium text-gray-900 focus:outline-hidden bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 cursor-pointer" tabindex="2">
21
21
  <%= t "avo.no_cancel" %>
22
22
  </button>
23
23
  </div>
@@ -1,7 +1,7 @@
1
1
  <% if @custom_tools_alert_visible %>
2
2
  <div class="w-full inset-auto bottom-0 z-50 mb-4 opacity-75 hover:opacity-100 transition-opacity duration-150">
3
- <a href="https://avohq.io/pricing" target="_blank" class="rounded bg-orange-700 text-white py-2 px-4 text-sm block items-center flex leading-tight">
4
- <%= svg "avo/exclamation", class: "h-6 inline mr-2 text-bold flex-shrink-0 mr-1" %> Warning. <%= @custom_tools_alert_visible %> This page will not be visible in a production environment.
3
+ <a href="https://avohq.io/pricing" target="_blank" class="rounded-sm bg-orange-700 text-white py-2 px-4 text-sm block items-center flex leading-tight">
4
+ <%= svg "avo/exclamation", class: "h-6 inline mr-2 text-bold shrink-0 mr-1" %> Warning. <%= @custom_tools_alert_visible %> This page will not be visible in a production environment.
5
5
  </a>
6
6
  </div>
7
7
  <% end %>
@@ -12,8 +12,8 @@
12
12
  url, message, target = error.values_at :url, :message, :target
13
13
  %>
14
14
  <div class="w-full inset-auto bottom-0 z-50 mb-4 opacity-75 hover:opacity-100 transition-opacity duration-150">
15
- <a href="<%= url %>" target="<%= target %>" class="rounded bg-orange-700 text-white py-2 px-4 text-sm items-center flex leading-tight space-x-2">
16
- <%= svg "avo/exclamation", class: "h-6 inline mr-2 text-bold flex-shrink-0 mr-1" %>
15
+ <a href="<%= url %>" target="<%= target %>" class="rounded-sm bg-orange-700 text-white py-2 px-4 text-sm items-center flex leading-tight space-x-2">
16
+ <%= svg "avo/exclamation", class: "h-6 inline mr-2 text-bold shrink-0 mr-1" %>
17
17
  <div>
18
18
  <%= simple_format message %>
19
19
  </div>
@@ -21,8 +21,8 @@
21
21
  </div>
22
22
  <% elsif error.is_a? String %>
23
23
  <div class="w-full inset-auto bottom-0 z-50 mb-4 opacity-75 hover:opacity-100 transition-opacity duration-150">
24
- <div class="rounded bg-orange-700 text-white py-2 px-4 text-sm items-center flex leading-tight space-x-2">
25
- <%= svg "avo/exclamation", class: "h-6 inline mr-2 text-bold flex-shrink-0 mr-1" %>
24
+ <div class="rounded-sm bg-orange-700 text-white py-2 px-4 text-sm items-center flex leading-tight space-x-2">
25
+ <%= svg "avo/exclamation", class: "h-6 inline mr-2 text-bold shrink-0 mr-1" %>
26
26
  <div><%= simple_format error %></div>
27
27
  </div>
28
28
  </div>
@@ -1,8 +1,8 @@
1
- <%= content_tag :div, class: class_names("fixed bg-white p-2 w-full flex flex-shrink-0 items-center z-[100] px-4 lg:px-4 border-b space-x-4 lg:space-x-0 h-16", {"print:hidden": Avo.configuration.hide_layout_when_printing}) do %>
2
- <div class="flex items-center space-x-2 w-auto lg:w-64 flex-shrink-0 h-full">
1
+ <%= content_tag :div, class: class_names("fixed bg-white p-2 w-full flex shrink-0 items-center z-[100] px-4 lg:px-4 border-b border-gray-200 space-x-4 lg:space-x-0 h-16", {"print:hidden": Avo.configuration.hide_layout_when_printing}) do %>
2
+ <div class="flex items-center space-x-2 w-auto lg:w-64 shrink-0 h-full">
3
3
  <div>
4
4
  <%= a_button class: 'lg:hidden', icon: 'avo/menu', size: :xs, compact: true, style: :text, data: { action: 'click->sidebar#toggleSidebarOnMobile' }, aria: {label: "Toggle sidebar"} %>
5
- <%= a_button class: 'hidden lg:block', icon: 'avo/menu', size: :xs, compact: true, style: :text, data: { action: 'click->sidebar#toggleSidebar' }, aria: {label: "Toggle sidebar"} %>
5
+ <%= a_button class: '!hidden lg:!inline-flex', icon: 'avo/menu', size: :xs, compact: true, style: :text, data: { action: 'click->sidebar#toggleSidebar' }, aria: {label: "Toggle sidebar"} %>
6
6
  </div>
7
7
  <%= render partial: "avo/partials/logo" %>
8
8
  </div>
@@ -12,5 +12,5 @@
12
12
  <% end %>
13
13
  >
14
14
  </div>
15
- <div class="hidden relative inline-flex text-gray-400 text-sm border border-gray-300 rounded cursor-pointer" data-search-target="button"></div>
15
+ <div class="hidden relative inline-flex text-gray-400 text-sm border border-gray-300 rounded-sm cursor-pointer" data-search-target="button"></div>
16
16
  </div>
@@ -10,7 +10,7 @@
10
10
  name: t("avo.select_all"),
11
11
  title: t("avo.select_all"),
12
12
  autocomplete: :off,
13
- class: "mx-3 rounded w-4 h-4 checked:bg-primary-400 focus:checked:!bg-primary-400",
13
+ class: "mx-3 rounded-sm w-4 h-4 checked:bg-primary-400 focus:checked:!bg-primary-400",
14
14
  data: {
15
15
  action: "input->item-select-all#toggle",
16
16
  item_select_all_target: "checkbox",
@@ -97,7 +97,7 @@
97
97
  association_name: @field&.for_attribute || @field&.id
98
98
  }.compact
99
99
  ) %>"
100
- class="absolute inset-auto bg-white w-full sm:w-[400px] top-0 mt-6 p-4 z-40 shadow-modal rounded overflow-hidden hidden border border-gray-50"
100
+ class="absolute inset-auto bg-white w-full sm:w-[400px] top-0 mt-6 p-4 z-40 shadow-modal rounded-sm overflow-hidden hidden border border-gray-50"
101
101
  data-toggle-target="panel"
102
102
  >
103
103
  <%= render Avo::LoadingComponent.new %>
@@ -1,5 +1,5 @@
1
1
  <div class="w-10/12 ml-1/12 inset-auto bottom-0 z-50 my-4 opacity-50 hover:opacity-100 transition-opacity duration-150 group">
2
- <a href="https://avohq.io/pricing" target="_blank" class="rounded bg-green-700 text-white py-2 px-4 text-sm block group-hover:pt-4">
2
+ <a href="https://avohq.io/pricing" target="_blank" class="rounded-sm bg-green-700 text-white py-2 px-4 text-sm block group-hover:pt-4">
3
3
  <%= svg "avo/exclamation", class: 'h-6 inline mr-1 text-bold' %> <%= title %>
4
4
  <div class="group-hover:block hidden py-2">
5
5
  <%= message %> <%= svg "avo/arrow-circle-right", class: "h-6 inline float-right" %>
@@ -26,21 +26,22 @@ module Avo
26
26
  end
27
27
 
28
28
  def row_controls_classes
29
- classes = "text-right whitespace-nowrap px-3"
30
-
31
- if render_row_controls_on_the_left?
32
- classes += " w-px"
33
- end
34
-
35
- if row_controls_configurations[:show_on_hover]
36
- classes += " opacity-0 group-hover:opacity-100"
37
- end
38
-
39
- if row_controls_configurations[:float]
40
- classes += " floating-row-controls sticky group-hover:bg-gray-50 bg-white inset-auto right-0"
41
- end
42
-
43
- classes
29
+ float_classes = "bg-white
30
+ group-hover:bg-gray-50
31
+ sticky inset-auto right-0
32
+
33
+ before:content-[''] before:absolute before:z-10 before:inset-auto before:left-0 before:top-0 before:mt-0 before:-translate-x-full before:w-3 before:h-full
34
+ before:bg-gradient-to-r
35
+ before:from-transparent before:to-white
36
+ group-hover:before:from-transparent group-hover:before:to-gray-50
37
+ "
38
+
39
+ class_names(
40
+ "text-right whitespace-nowrap px-3",
41
+ "w-px": render_row_controls_on_the_left?,
42
+ "opacity-0 group-hover:opacity-100": row_controls_configurations[:show_on_hover],
43
+ "#{float_classes}": row_controls_configurations[:float]
44
+ )
44
45
  end
45
46
  end
46
47
  end
@@ -25,7 +25,7 @@ class Avo::Resources::Items::Holder
25
25
  as = args.fetch(:as, nil)
26
26
 
27
27
  alert_type = :error
28
- message = "There's an invalid field configuration for this resource. <br/> <code class='px-1 py-px rounded bg-red-600'>field :#{field_name}, as: :#{as}</code>"
28
+ message = "There's an invalid field configuration for this resource. <br/> <code class='px-1 py-px rounded-sm bg-red-600'>field :#{field_name}, as: :#{as}</code>"
29
29
 
30
30
  if as == :markdown
31
31
  alert_type = :warning
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "3.17.0" unless const_defined?(:VERSION)
2
+ VERSION = "3.17.1.tw4" unless const_defined?(:VERSION)
3
3
  end
@@ -32,7 +32,7 @@ module Generators
32
32
  end
33
33
 
34
34
  def in_code(text)
35
- "<code class='p-1 rounded bg-gray-500 text-white text-sm'>#{text}</code>"
35
+ "<code class='p-1 rounded-sm bg-gray-500 text-white text-sm'>#{text}</code>"
36
36
  end
37
37
  end
38
38
  end
@@ -3,6 +3,6 @@
3
3
  Dashboard ID: <%%= @dashboard.id %>
4
4
  <br />
5
5
  <br />
6
- Customize this partial under <code class='p-1 rounded bg-gray-500 text-white text-sm'>app/views/avo/cards/_<%= name.underscore %>.html.erb</code>
6
+ Customize this partial under <code class='p-1 rounded-sm bg-gray-500 text-white text-sm'>app/views/avo/cards/_<%= name.underscore %>.html.erb</code>
7
7
  </div>
8
8
  </div>
@@ -41,7 +41,7 @@ module Generators
41
41
  # will generate the avo.lolo_path helper
42
42
  # THe fact that it will always generate the definded? and Avo::Engine.routes.draw wraps is unfortunate. We'd love a PR to fix that.
43
43
  route_contents = <<~ROUTE
44
-
44
+
45
45
  if defined? ::Avo
46
46
  Avo::Engine.routes.draw do
47
47
  # This route is not protected, secure it with authentication if needed.
@@ -69,7 +69,7 @@ module Generators
69
69
  end
70
70
 
71
71
  def in_code(text)
72
- "<code class='p-1 rounded bg-gray-500 text-white text-sm'>#{text}</code>"
72
+ "<code class='p-1 rounded-sm bg-gray-500 text-white text-sm'>#{text}</code>"
73
73
  end
74
74
  end
75
75
  end
@@ -135,5 +135,5 @@ task "avo:yarn_install" do
135
135
  # tailwind.preset.js needs this dependencies in order to be required
136
136
  # Ensure that versions remain updated and synchronized with those specified in package.json.
137
137
  puts "[Avo->] Adding yarn dependencies"
138
- `yarn add tailwindcss@^3.4.17 @tailwindcss/forms@^0.5.10 @tailwindcss/typography@^0.5.16 @tailwindcss/container-queries@^0.1.1 --cwd #{Avo::Engine.root}`
138
+ `yarn add tailwindcss@^4.0.0 @tailwindcss/forms@^0.5.10 @tailwindcss/typography@^0.5.16 @tailwindcss/container-queries@^0.1.1 --cwd #{Avo::Engine.root}`
139
139
  end