avo 3.17.1.tw4 → 3.17.2
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/Gemfile.lock +1 -1
- data/README.md +0 -1
- data/app/assets/stylesheets/avo.base.css +14 -6
- data/app/assets/stylesheets/css/fields/progress.css +4 -4
- data/app/assets/stylesheets/css/fields/tiptap.css +4 -4
- data/app/assets/stylesheets/css/pagination.css +2 -2
- data/app/assets/stylesheets/css/search.css +4 -4
- data/app/assets/stylesheets/css/tailwindcss/base.css +1 -0
- data/app/assets/stylesheets/css/tailwindcss/components.css +1 -0
- data/app/assets/stylesheets/css/tailwindcss/utilities.css +1 -0
- data/app/assets/stylesheets/css/tooltips.css +1 -1
- data/app/components/avo/actions_component.html.erb +3 -3
- data/app/components/avo/alert_component.html.erb +2 -2
- data/app/components/avo/alert_component.rb +1 -1
- data/app/components/avo/backtrace_alert_component.html.erb +3 -3
- data/app/components/avo/button_component.rb +3 -3
- data/app/components/avo/divider_component.html.erb +2 -2
- data/app/components/avo/empty_state_component.html.erb +1 -1
- data/app/components/avo/field_wrapper_component.html.erb +1 -1
- data/app/components/avo/fields/belongs_to_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/boolean_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/boolean_group_field/edit_component.rb +1 -1
- data/app/components/avo/fields/common/files/view_type/list_item_component.html.erb +3 -3
- data/app/components/avo/fields/common/key_value_component.html.erb +3 -3
- data/app/components/avo/fields/common/status_viewer_component.html.erb +5 -6
- data/app/components/avo/fields/date_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/date_time_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/tags_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/tags_field/tag_component.html.erb +1 -1
- data/app/components/avo/fields/tiptap_field/edit_component.html.erb +1 -1
- data/app/components/avo/fields/trix_field/edit_component.html.erb +1 -1
- data/app/components/avo/filters_component.html.erb +3 -3
- data/app/components/avo/index/grid_item_component.html.erb +2 -2
- data/app/components/avo/index/grid_item_component.rb +1 -1
- data/app/components/avo/index/resource_grid_component.html.erb +1 -1
- data/app/components/avo/index/resource_map_component.html.erb +1 -1
- data/app/components/avo/index/resource_table_component.html.erb +1 -1
- data/app/components/avo/index/table_row_component.html.erb +3 -3
- data/app/components/avo/items/panel_component.html.erb +1 -1
- data/app/components/avo/media_library/item_details_component.html.erb +1 -1
- data/app/components/avo/modal_component.html.erb +1 -1
- data/app/components/avo/paginator_component.html.erb +2 -1
- data/app/components/avo/panel_component.html.erb +2 -2
- data/app/components/avo/profile_item_component.rb +1 -1
- data/app/components/avo/resource_sidebar_component.html.erb +1 -1
- data/app/components/avo/row_selector_component.html.erb +1 -1
- data/app/components/avo/sidebar/link_component.rb +1 -1
- data/app/components/avo/sidebar_component.html.erb +3 -3
- data/app/components/avo/sidebar_profile_component.html.erb +4 -4
- data/app/components/avo/tab_group_component.html.erb +1 -1
- data/app/helpers/avo/application_helper.rb +4 -4
- data/app/javascript/js/controllers/fields/key_value_controller.js +1 -1
- data/app/javascript/js/controllers/fields/tags_field_helpers.js +1 -1
- data/app/javascript/js/controllers/search_controller.js +2 -2
- data/app/views/avo/base/preview.html.erb +1 -1
- data/app/views/avo/debug/report.html.erb +1 -1
- data/app/views/avo/debug/status.html.erb +14 -19
- data/app/views/avo/home/_actions.html.erb +1 -1
- data/app/views/avo/home/_dashboards.html.erb +1 -1
- data/app/views/avo/home/_filters.html.erb +1 -1
- data/app/views/avo/home/_resources.html.erb +2 -2
- data/app/views/avo/home/failed_to_load.html.erb +1 -1
- data/app/views/avo/partials/_confirm_dialog.html.erb +4 -4
- data/app/views/avo/partials/_custom_tools_alert.html.erb +6 -6
- data/app/views/avo/partials/_navbar.html.erb +3 -3
- data/app/views/avo/partials/_resource_search.html.erb +1 -1
- data/app/views/avo/partials/_table_header.html.erb +2 -2
- data/app/views/avo/sidebar/_license_warning.html.erb +1 -1
- data/lib/avo/concerns/row_controls_configuration.rb +15 -16
- data/lib/avo/resources/items/holder.rb +1 -1
- data/lib/avo/version.rb +1 -1
- data/lib/generators/avo/resource_tool_generator.rb +1 -1
- data/lib/generators/avo/templates/cards/partial_card_partial.tt +1 -1
- data/lib/generators/avo/tool_generator.rb +2 -2
- data/lib/tasks/avo_tasks.rake +1 -1
- data/public/avo-assets/avo.base.css +9537 -7891
- data/public/avo-assets/avo.base.js +3 -3
- data/public/avo-assets/avo.base.js.map +2 -2
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 606e0e2ac7285877078a8c8069d5957082c2b1827e85f59e116dc6d335034c80
|
4
|
+
data.tar.gz: b9e25a71a0a8daac3c4df9e1dd95754f852dce561b6e3330b329f26e32c37447
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be69d7f64aa6a717a5528d8c53828b2479cab507d18e6a9da850542b5a8139db42e577182a89440aca057c093acfcfd145e08a0b742ef366b275637f1dcb986a
|
7
|
+
data.tar.gz: 8485876046e0387637930a450b81b27a423efc39966057f0bf9461429c200ab30026c87467f3aa77c64e27c1f3be2fc6e174555ca2e2a91888e9c285e88aad6f
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -125,6 +125,5 @@ Please read the [RELEASE.MD](./RELEASE.MD)
|
|
125
125
|
|
126
126
|
- [`active_storage-blurhash`](https://github.com/avo-hq/active_storage-blurhash) - A plug-n-play [blurhash](https://blurha.sh/) integration for images stored in ActiveStorage
|
127
127
|
- [`class_variants`](https://github.com/avo-hq/class_variants) - Easily configure styles and apply them as classes. Very useful when you're implementing Tailwind CSS components and call them with different states.
|
128
|
-
- [`marksmith`](https://github.com/avo-hq/marksmith) - GitHub-style markdown editor for Ruby on Rails with ActiveStorage support.
|
129
128
|
- [`prop_initializer`](https://github.com/avo-hq/prop_initializer) - A flexible tool for defining properties on Ruby classes.
|
130
129
|
- [`stimulus-confetti`](https://github.com/avo-hq/stimulus-confetti) - The easiest way to add confetti to your StimulusJS app
|
@@ -1,9 +1,3 @@
|
|
1
|
-
@import "tailwindcss";
|
2
|
-
|
3
|
-
@config "../../../tailwind.config.js";
|
4
|
-
|
5
|
-
|
6
|
-
|
7
1
|
@import './../../../node_modules/easymde/dist/easymde.min.css';
|
8
2
|
@import './../../../node_modules/tippy.js/dist/tippy.css';
|
9
3
|
@import './../../../node_modules/tippy.js/themes/light.css';
|
@@ -11,6 +5,8 @@
|
|
11
5
|
@import './../../../node_modules/@algolia/autocomplete-theme-classic/dist/theme.css';
|
12
6
|
@import './../../../node_modules/@yaireo/tagify/dist/tagify.css';
|
13
7
|
|
8
|
+
@import 'tailwindcss/base';
|
9
|
+
|
14
10
|
@import './css/fonts.css';
|
15
11
|
@import './css/buttons.css';
|
16
12
|
@import './css/typography.css';
|
@@ -31,6 +27,10 @@
|
|
31
27
|
@import './css/fields/tags.css';
|
32
28
|
@import './css/fields/tiptap.css';
|
33
29
|
|
30
|
+
@import 'tailwindcss/components';
|
31
|
+
|
32
|
+
@import 'tailwindcss/utilities';
|
33
|
+
|
34
34
|
html,
|
35
35
|
body {
|
36
36
|
@apply antialiased relative h-full;
|
@@ -105,6 +105,14 @@ dl {
|
|
105
105
|
}
|
106
106
|
}
|
107
107
|
|
108
|
+
/* TODO: make content like tailwindcss */
|
109
|
+
.floating-row-controls {
|
110
|
+
&:before {
|
111
|
+
content: "";
|
112
|
+
@apply absolute z-10 inset-auto left-0 top-0 mt-0 -translate-x-full w-3 h-full bg-gradient-to-l from-white to-transparent group-hover:from-gray-50;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
108
116
|
.shift-pressed {
|
109
117
|
& .highlighted-row {
|
110
118
|
@apply !bg-neutral-200;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
progress {
|
2
|
-
@apply h-2 bg-white border border-slate-400 rounded
|
2
|
+
@apply h-2 bg-white border border-slate-400 rounded shadow-inner;
|
3
3
|
}
|
4
4
|
progress[value]::-webkit-progress-bar {
|
5
|
-
@apply bg-white border border-gray-500 rounded
|
5
|
+
@apply bg-white border border-gray-500 rounded shadow-inner;
|
6
6
|
}
|
7
7
|
progress[value]::-webkit-progress-value{
|
8
|
-
@apply bg-primary-500 rounded
|
8
|
+
@apply bg-primary-500 rounded;
|
9
9
|
|
10
10
|
}
|
11
11
|
progress[value]::-moz-progress-bar {
|
12
|
-
@apply bg-primary-500 rounded
|
12
|
+
@apply bg-primary-500 rounded appearance-none;
|
13
13
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/* EDIT STYLES */
|
2
2
|
|
3
3
|
.tiptap {
|
4
|
-
@apply m-0 p-4 outline-
|
4
|
+
@apply m-0 p-4 outline-none min-h-44;
|
5
5
|
|
6
6
|
>*+* {
|
7
7
|
@apply mt-4;
|
@@ -22,7 +22,7 @@
|
|
22
22
|
}
|
23
23
|
|
24
24
|
.tiptap__field {
|
25
|
-
@apply w-full mb-4 border border-gray-200 rounded
|
25
|
+
@apply w-full mb-4 border border-gray-200 rounded;
|
26
26
|
}
|
27
27
|
|
28
28
|
.tiptap__editor {
|
@@ -54,7 +54,7 @@
|
|
54
54
|
}
|
55
55
|
|
56
56
|
.tiptap__button {
|
57
|
-
@apply p-1 text-gray-500 rounded
|
57
|
+
@apply p-1 text-gray-500 rounded cursor-pointer;
|
58
58
|
|
59
59
|
&:hover:enabled {
|
60
60
|
@apply bg-gray-100;
|
@@ -94,7 +94,7 @@
|
|
94
94
|
}
|
95
95
|
|
96
96
|
.tiptap__link-field {
|
97
|
-
@apply text-sm mr-2 py-1 border border-gray-200 rounded
|
97
|
+
@apply text-sm mr-2 py-1 border border-gray-200 rounded;
|
98
98
|
}
|
99
99
|
|
100
100
|
/* SHOW STYLES */
|
@@ -22,7 +22,7 @@
|
|
22
22
|
.pagy-nav-js .page a,
|
23
23
|
.pagy-combo-nav-js .page a,
|
24
24
|
.pagy-combo-nav-js .pagy-combo-input a {
|
25
|
-
@apply rounded
|
25
|
+
@apply rounded px-3 py-1 text-sm text-gray-500 font-semibold bg-white shadow-md border border-gray-300;
|
26
26
|
|
27
27
|
&:hover{
|
28
28
|
@apply bg-gray-150;
|
@@ -73,7 +73,7 @@
|
|
73
73
|
}
|
74
74
|
|
75
75
|
& a:not(.gap) {
|
76
|
-
@apply block rounded
|
76
|
+
@apply block rounded px-3 py-1 text-sm text-gray-500 font-semibold bg-white shadow-md border border-gray-300;
|
77
77
|
|
78
78
|
&:hover{
|
79
79
|
@apply bg-gray-150;
|
@@ -22,7 +22,7 @@
|
|
22
22
|
}
|
23
23
|
|
24
24
|
.aa-DetachedSearchButton {
|
25
|
-
@apply rounded
|
25
|
+
@apply rounded border-gray-300 h-[34px];
|
26
26
|
}
|
27
27
|
}
|
28
28
|
|
@@ -37,11 +37,11 @@
|
|
37
37
|
|
38
38
|
.aa-Form {
|
39
39
|
&:focus-within {
|
40
|
-
@apply ring-0;
|
40
|
+
@apply ring-0 !important;
|
41
41
|
}
|
42
42
|
|
43
43
|
input {
|
44
|
-
@apply focus:ring-0;
|
44
|
+
@apply focus:ring-0 !important;
|
45
45
|
}
|
46
46
|
&:focus-within {
|
47
47
|
.aa-InputWrapperPrefix{
|
@@ -71,7 +71,7 @@ button.aa-DetachedCancelButton {
|
|
71
71
|
@apply space-y-2;
|
72
72
|
|
73
73
|
.aa-Item {
|
74
|
-
@apply bg-white rounded
|
74
|
+
@apply bg-white rounded px-3 py-4 shadow font-medium;
|
75
75
|
|
76
76
|
.aa-ItemDescription {
|
77
77
|
@apply text-gray-500 text-sm font-normal mt-1;
|
@@ -0,0 +1 @@
|
|
1
|
+
@tailwind base;
|
@@ -0,0 +1 @@
|
|
1
|
+
@tailwind components;
|
@@ -0,0 +1 @@
|
|
1
|
+
@tailwind utilities;
|
@@ -10,7 +10,7 @@
|
|
10
10
|
type: :button,
|
11
11
|
color: @color,
|
12
12
|
size: @size,
|
13
|
-
class: "focus:outline-
|
13
|
+
class: "focus:outline-none",
|
14
14
|
icon: @icon,
|
15
15
|
data: {
|
16
16
|
action: "click->toggle#togglePanel",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<%= @label %>
|
22
22
|
<% end %>
|
23
23
|
<div
|
24
|
-
class="absolute flex inset-auto xl:right-0 top-full bg-white w-full sm:w-auto sm:min-w-[300px] mt-2 z-40 shadow-modal rounded
|
24
|
+
class="absolute flex inset-auto xl:right-0 top-full bg-white w-full sm:w-auto sm:min-w-[300px] mt-2 z-40 shadow-modal rounded overflow-hidden hidden"
|
25
25
|
data-toggle-target="panel"
|
26
26
|
data-controller="actions-overflow"
|
27
27
|
data-actions-overflow-panel-list-value="<%= !@as_row_control %>"
|
@@ -33,7 +33,7 @@
|
|
33
33
|
data-transition-leave-start="transform opacity-100 translate-y-0"
|
34
34
|
data-transition-leave-end="transform opacity-0 -translate-y-1"
|
35
35
|
>
|
36
|
-
<div data-target="actions-list" class="w-full space divide-y
|
36
|
+
<div data-target="actions-list" class="w-full space divide-y">
|
37
37
|
<% @actions.each do |action| %>
|
38
38
|
<%= render_item(action)%>
|
39
39
|
<% end %>
|
@@ -13,8 +13,8 @@
|
|
13
13
|
<%= sanitize @message.to_s %>
|
14
14
|
</p>
|
15
15
|
</div>
|
16
|
-
<div class="ml-4 shrink-0 flex items-center">
|
17
|
-
<button data-action="alert#close" class="inline-flex text-white focus:outline-
|
16
|
+
<div class="ml-4 flex-shrink-0 flex items-center">
|
17
|
+
<button data-action="alert#close" class="inline-flex text-white focus:outline-none focus:text-gray-300 transition ease-in-out duration-150">
|
18
18
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
19
19
|
<path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"/>
|
20
20
|
</svg>
|
@@ -18,7 +18,7 @@ class Avo::AlertComponent < Avo::BaseComponent
|
|
18
18
|
def classes
|
19
19
|
return "hidden" if is_empty?
|
20
20
|
|
21
|
-
result = "max-w-lg w-full shadow-lg px-4 py-3 rounded
|
21
|
+
result = "max-w-lg w-full shadow-lg rounded px-4 py-3 rounded relative border text-white pointer-events-auto"
|
22
22
|
|
23
23
|
result += if is_error?
|
24
24
|
" bg-red-400 border-red-600"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div data-controller="alert"
|
2
2
|
data-alert-dismiss-after-value="<%= Avo.configuration.alert_dismiss_time %>"
|
3
3
|
data-alert-remove-delay-value="0"
|
4
|
-
class="w-full shadow-lg px-4 py-3 rounded
|
4
|
+
class="w-full shadow-lg px-4 py-3 rounded relative border text-white pointer-events-auto bg-red-400 border-red-600"
|
5
5
|
>
|
6
6
|
<div class="px-2">
|
7
7
|
<div class="flex h-full">
|
@@ -14,8 +14,8 @@
|
|
14
14
|
<pre class='overflow-y-scroll max-h-64 whitespace-pre-wrap text-xs'><%= @backtrace.join("\n") %></pre>
|
15
15
|
</p>
|
16
16
|
</div>
|
17
|
-
<div class="ml-4 shrink-0 flex items-center">
|
18
|
-
<button data-action="alert#close" class="inline-flex text-white focus:outline-
|
17
|
+
<div class="ml-4 flex-shrink-0 flex items-center">
|
18
|
+
<button data-action="alert#close" class="inline-flex text-white focus:outline-none focus:text-gray-300 transition ease-in-out duration-150">
|
19
19
|
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
20
20
|
<path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"/>
|
21
21
|
</svg>
|
@@ -34,12 +34,12 @@ class Avo::ButtonComponent < Avo::BaseComponent
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def button_classes
|
37
|
-
classes = "button-component inline-flex grow-0 items-center font-semibold leading-6 fill-current whitespace-nowrap transition duration-100 transform transition duration-100 cursor-pointer disabled:cursor-not-allowed disabled:opacity-60 data-[disabled='true']:opacity-60 justify-center #{@class}"
|
37
|
+
classes = "button-component inline-flex flex-grow-0 items-center font-semibold leading-6 fill-current whitespace-nowrap transition duration-100 transform transition duration-100 cursor-pointer disabled:cursor-not-allowed disabled:opacity-60 data-[disabled='true']:opacity-60 justify-center #{@class}"
|
38
38
|
|
39
39
|
# For non-icon-styled buttons we should not add borders.
|
40
|
-
classes += " border
|
40
|
+
classes += " border active:outline active:outline-1" unless is_icon?
|
41
41
|
|
42
|
-
classes += " rounded
|
42
|
+
classes += " rounded" if @rounded.present?
|
43
43
|
classes += style_classes
|
44
44
|
classes += horizontal_padding_classes
|
45
45
|
classes += vertical_padding_classes
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<div class="relative flex justify-center items-center w-full !border-b border-gray-200 border-solid" data-component-name="<%= self.class.to_s.underscore %>">
|
1
|
+
<div class="relative flex justify-center items-center w-full !border-b-2 border-gray-200 border-solid" data-component-name="<%= self.class.to_s.underscore %>">
|
2
2
|
<% if @label.present? %>
|
3
|
-
<div class="absolute inset-auto z-20 text-
|
3
|
+
<div class="absolute inset-auto z-20 text-xs font-semibold uppercase leading-none text-gray-500 bg-white px-2 border py-1 rounded">
|
4
4
|
<%= @label %>
|
5
5
|
</div>
|
6
6
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if @add_background %>
|
2
|
-
<div class="bg-white rounded
|
2
|
+
<div class="bg-white rounded shadow-panel">
|
3
3
|
<% end %>
|
4
4
|
<div class="relative flex-1 flex flex-col items-center justify-center space-y-12 py-24">
|
5
5
|
<%= helpers.svg view_type_svg, class: 'h-[250px]' %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
class: classes,
|
3
3
|
style: style,
|
4
4
|
data: data do %>
|
5
|
-
<%= content_tag :div, class: class_names("pt-4 flex self-start items-center shrink-0 w-48 px-6 uppercase font-semibold text-gray-500 text-sm", @field.get_html(:classes, view: @view, element: :label), {
|
5
|
+
<%= content_tag :div, class: class_names("pt-4 flex self-start items-center flex-shrink-0 w-48 px-6 uppercase font-semibold text-gray-500 text-sm", @field.get_html(:classes, view: @view, element: :label), {
|
6
6
|
"md:pt-4 md:w-full": stacked?,
|
7
7
|
"h-full md:pt-0": !stacked?,
|
8
8
|
"md:h-10 ": !stacked? && short?,
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<%= @form.check_box @field.id,
|
4
4
|
value: @field.value,
|
5
5
|
checked: @field.value,
|
6
|
-
class: "text-lg h-4 w-4 checked:bg-primary-400 focus:checked:!bg-primary-400 rounded
|
6
|
+
class: "text-lg h-4 w-4 checked:bg-primary-400 focus:checked:!bg-primary-400 rounded #{@field.get_html(:classes, view: view, element: :input)}",
|
7
7
|
data: @field.get_html(:data, view: view, element: :input),
|
8
8
|
disabled: disabled?,
|
9
9
|
autofocus: @autofocus,
|
@@ -5,7 +5,7 @@ class Avo::Fields::BooleanGroupField::EditComponent < Avo::Fields::EditComponent
|
|
5
5
|
super(...)
|
6
6
|
|
7
7
|
# Initialize here to avoid multiple calls to @field.get_html for each option.
|
8
|
-
@classes = "w-4 h-4 rounded
|
8
|
+
@classes = "w-4 h-4 rounded checked:bg-primary-400 focus:checked:!bg-primary-400" \
|
9
9
|
"#{@field.get_html(:classes, view: view, element: :input)}"
|
10
10
|
@data = @field.get_html(:data, view: view, element: :input)
|
11
11
|
@style = @field.get_html(:style, view: view, element: :input)
|
@@ -5,14 +5,14 @@
|
|
5
5
|
<div class="rounded-full bg-slate-100 border border-gray-500 p-1.5 flex items-center justify-center">
|
6
6
|
<%= helpers.svg icon_for_file, class: "h-5 text-gray-600" %>
|
7
7
|
</div>
|
8
|
-
<p class="items-center h-full p-2 shrink-0">
|
8
|
+
<p class="items-center h-full p-2 flex-shrink-0">
|
9
9
|
<%= file.filename %>
|
10
10
|
</p>
|
11
11
|
</div>
|
12
|
-
<div class="text-gray-700 shrink-0 text-sm">
|
12
|
+
<div class="text-gray-700 flex-shrink-0 text-sm">
|
13
13
|
<%= helpers.number_to_human_size(file.byte_size) %>
|
14
14
|
</div>
|
15
|
-
<div class="flex space-x-2 justify-end col-span-1 shrink-0">
|
15
|
+
<div class="flex space-x-2 justify-end col-span-1 flex-shrink-0">
|
16
16
|
<%= render Avo::Fields::Common::Files::ControlsComponent.new(field: @field, file: file, resource: @resource) %>
|
17
17
|
</div>
|
18
18
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="w-full shadow-lg rounded
|
1
|
+
<div class="w-full shadow-lg rounded overflow-hidden"
|
2
2
|
data-controller="key-value"
|
3
3
|
data-key-value-target="controller"
|
4
4
|
data-options="<%= @field.options.to_json %>"
|
@@ -7,8 +7,8 @@
|
|
7
7
|
>
|
8
8
|
<div class="w-full flex flex-col">
|
9
9
|
<div class="flex w-full">
|
10
|
-
<div class="flex w-full bg-gray-700 shadow
|
11
|
-
<div class="w-1/2 py-3 px-3 uppercase font-semibold text-xs text-white border-gray-600 border-r
|
10
|
+
<div class="flex w-full bg-gray-700 shadow overflow-hidden">
|
11
|
+
<div class="w-1/2 py-3 px-3 uppercase font-semibold text-xs text-white border-gray-600 border-r">
|
12
12
|
<%= @field.key_label %>
|
13
13
|
</div>
|
14
14
|
<div class="w-1/2 py-3 px-3 uppercase font-semibold text-xs text-white">
|
@@ -1,11 +1,10 @@
|
|
1
1
|
<%
|
2
|
-
classes =
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
)
|
2
|
+
classes = "inline-block"
|
3
|
+
classes += " text-red-600" if @status == 'failed'
|
4
|
+
classes += " text-green-600" if @status == 'success'
|
5
|
+
classes += " text-gray-600" if @status == 'neutral'
|
7
6
|
%>
|
8
|
-
<div class="flex shrink-0 <%= classes %> items-center">
|
7
|
+
<div class="flex flex-shrink-0 <%= classes %> items-center">
|
9
8
|
<% if @status == 'success' %>
|
10
9
|
<%= helpers.svg 'heroicons/solid/check-circle', class: 'h-4' %>
|
11
10
|
<% elsif @status == 'failed' %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
} do %>
|
13
13
|
<%= @form.text_field @field.id,
|
14
14
|
value: @field.edit_formatted_value,
|
15
|
-
class: classes("w-full #{"
|
15
|
+
class: classes("w-full #{"hidden" unless params[:avo_show_hidden_inputs]}"),
|
16
16
|
data: {
|
17
17
|
'date-field-target': 'input',
|
18
18
|
placeholder: @field.placeholder,
|
@@ -14,7 +14,7 @@
|
|
14
14
|
} do %>
|
15
15
|
<%= @form.text_field @field.id,
|
16
16
|
value: @field.edit_formatted_value,
|
17
|
-
class: classes("w-full #{"
|
17
|
+
class: classes("w-full #{"hidden" unless params[:avo_show_hidden_inputs]}"),
|
18
18
|
data: {
|
19
19
|
date_field_target: :input,
|
20
20
|
placeholder: @field.placeholder,
|
@@ -23,7 +23,7 @@
|
|
23
23
|
%>
|
24
24
|
<%# real field %>
|
25
25
|
<%= @form.text_field @field.id,
|
26
|
-
class: classes("
|
26
|
+
class: classes("hidden w-full !py-0 min-h-10 items-center border-primary-500 focus-within:border-primary-500"),
|
27
27
|
data: {
|
28
28
|
tags_field_target: :input,
|
29
29
|
},
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<% end %>
|
15
15
|
<%= @form.text_area @field.id,
|
16
16
|
value: @field.value.try(:to_trix_html) || @field.value,
|
17
|
-
class: classes("w-full
|
17
|
+
class: classes("w-full hidden"),
|
18
18
|
data: @field.get_html(:data, view: view, element: :input),
|
19
19
|
disabled: disabled?,
|
20
20
|
id: @input_id,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div data-controller="toggle" data-component-name="<%= self.class.to_s.underscore %>">
|
2
2
|
<div class="relative w-full flex justify-between">
|
3
|
-
<%= a_button class: 'focus:outline-
|
3
|
+
<%= a_button class: 'focus:outline-none',
|
4
4
|
color: :primary,
|
5
5
|
size: :sm,
|
6
6
|
icon: "avo/filter",
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<% end %>
|
15
15
|
<% end %>
|
16
16
|
<div
|
17
|
-
class="absolute block inset-auto sm:right-0 top-full bg-white min-w-[300px] mt-2 z-40 shadow-modal rounded
|
17
|
+
class="absolute block inset-auto sm:right-0 top-full bg-white min-w-[300px] mt-2 z-40 shadow-modal rounded divide-y divide-gray-300 <%= 'hidden' unless params[:keep_filters_panel_open] == '1' %>"
|
18
18
|
data-toggle-target="panel"
|
19
19
|
data-transition-enter="transition ease-out duration-100"
|
20
20
|
data-transition-enter-start="transform opacity-0 -translate-y-1"
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<% @filters.each do |filter| %>
|
27
27
|
<%= render partial: filter.class.template, locals: {filter: filter} %>
|
28
28
|
<% end %>
|
29
|
-
<div class="p-4 border-gray-
|
29
|
+
<div class="p-4 border-gray-300 border-t">
|
30
30
|
<% if @applied_filters.present? %>
|
31
31
|
<%= a_link reset_path, data: {turbo_frame: params[:turbo_frame]}, color: :gray, size: :sm, class: 'w-full justify-center' do %>
|
32
32
|
<%= t('avo.reset_filters') %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= content_tag :div,
|
2
|
-
class: "relative bg-white rounded
|
2
|
+
class: "relative bg-white rounded shadow-modal flex flex-col group",
|
3
3
|
data: {
|
4
4
|
component_name: self.class.to_s.underscore,
|
5
5
|
resource_name: @resource.class.to_s,
|
@@ -8,7 +8,7 @@
|
|
8
8
|
**(try(:drag_reorder_item_data_attributes) || {}),
|
9
9
|
} do %>
|
10
10
|
<%= content_tag :div,
|
11
|
-
class: class_names("relative w-full pb-3/4 rounded-t
|
11
|
+
class: class_names("relative w-full pb-3/4 rounded-t overflow-hidden", html(:cover, :classes)),
|
12
12
|
style: html(:cover, :style) do %>
|
13
13
|
<%= render Avo::RowSelectorComponent.new(floating: true, size: :lg) if @resource.record_selector%>
|
14
14
|
<%= render_cover %>
|
@@ -70,7 +70,7 @@ class Avo::Index::GridItemComponent < Avo::BaseComponent
|
|
70
70
|
return if @card[:badge_label].blank?
|
71
71
|
|
72
72
|
content_tag :div,
|
73
|
-
class: class_names("absolute block inset-auto top-0 right-0 mt-2 mr-2 text-sm font-semibold bg-#{badge_color}-50 border border-#{badge_color}-300 text-#{badge_color}-700 rounded
|
73
|
+
class: class_names("absolute block inset-auto top-0 right-0 mt-2 mr-2 text-sm font-semibold bg-#{badge_color}-50 border border-#{badge_color}-300 text-#{badge_color}-700 rounded shadow-lg px-2 py-px z-10", html(:badge, :classes)),
|
74
74
|
title: @card[:badge_title],
|
75
75
|
style: html(:badge, :style),
|
76
76
|
data: {target: :badge, tippy: :tooltip, **(html(:badge, :data).presence || {})} do
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<% end %>
|
17
17
|
</turbo-frame>
|
18
18
|
<% else %>
|
19
|
-
<div class="bg-white rounded
|
19
|
+
<div class="bg-white rounded shadow-panel"
|
20
20
|
data-component-name="<%= self.class.to_s.underscore %>">
|
21
21
|
<%= helpers.empty_state by_association: params[:related_name].present?, view_type: :grid %>
|
22
22
|
</div>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<% end %>
|
40
40
|
<table class="w-full px-4 bg-white">
|
41
41
|
<%= render partial: 'avo/partials/table_header', locals: {fields: @header_fields} %>
|
42
|
-
<%= content_tag :tbody, class: "divide-y
|
42
|
+
<%= content_tag :tbody, class: "divide-y",
|
43
43
|
data: {
|
44
44
|
**(try(:drag_reorder_data_attributes) || {}),
|
45
45
|
} do %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<%= content_tag :tr,
|
4
4
|
id: "#{self.class.to_s.underscore}_#{@resource.record.to_param}",
|
5
|
-
class: class_names("group bg-white hover:bg-gray-50 z-21 border-b
|
5
|
+
class: class_names("group bg-white hover:bg-gray-50 z-21 border-b", {"cursor-pointer": click_row_to_view_record}),
|
6
6
|
data: {
|
7
7
|
index: @index,
|
8
8
|
component_name: self.class.to_s.underscore,
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<% end %>
|
25
25
|
<% if @resource.render_row_controls_on_the_left? %>
|
26
26
|
<td class="<%= @resource.row_controls_classes %>" data-control="resource-controls">
|
27
|
-
<div class="flex items-center justify-end grow-0 h-full">
|
27
|
+
<div class="flex items-center justify-end flex-grow-0 h-full">
|
28
28
|
<%= render resource_controls_component %>
|
29
29
|
</div>
|
30
30
|
</td>
|
@@ -46,7 +46,7 @@
|
|
46
46
|
<% end %>
|
47
47
|
<% if @resource.render_row_controls_on_the_right? %>
|
48
48
|
<td class="<%= @resource.row_controls_classes %>" data-control="resource-controls">
|
49
|
-
<div class="flex items-center justify-end grow-0 h-full">
|
49
|
+
<div class="flex items-center justify-end flex-grow-0 h-full">
|
50
50
|
<%= render resource_controls_component %>
|
51
51
|
</div>
|
52
52
|
</td>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% end %>
|
8
8
|
<% end %>
|
9
9
|
<% c.with_body do %>
|
10
|
-
<% content_tag :div, class: "divide-y
|
10
|
+
<% content_tag :div, class: "divide-y overflow-auto" do %>
|
11
11
|
<%= render Avo::Items::VisibleItemsComponent.new resource: @resource, item: @item, view: @view, form: @form %>
|
12
12
|
<% end %>
|
13
13
|
<% end %>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<%= link_to "Delete", helpers.avo.media_library_path(@blob), class: "text-red-500", data: {turbo_confirm: "Are you sure you want to destroy this attachment?", turbo_method: :delete} %>
|
25
25
|
</div>
|
26
26
|
</div>
|
27
|
-
<div class="flex flex-col w-1/2 @3xl/details:w-1/3 border-l
|
27
|
+
<div class="flex flex-col w-1/2 @3xl/details:w-1/3 border-l">
|
28
28
|
<%= render partial: "avo/media_library/information", locals: {blob: @blob} %>
|
29
29
|
<%= render partial: "avo/media_library/form", locals: {blob: @blob} %>
|
30
30
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
data-modal-target="modal"
|
4
4
|
data-modal-close-modal-on-backdrop-click-value="<%= close_modal_on_backdrop_click %>"
|
5
5
|
>
|
6
|
-
<div aria-expanded="true" class="modal-overlay absolute w-full h-full bg-gray-800
|
6
|
+
<div aria-expanded="true" class="modal-overlay absolute w-full h-full bg-opacity-25 bg-gray-800 flex justify-center items-center" data-modal-target="backdrop" data-action="click->modal#close" ></div>
|
7
7
|
<div aria-expanded="true" role="dialog" aria-modal="true" class="modal-body rounded-lg inset-auto bg-white flex z-50 relative shadow-modal <%= overflow_classes %> <%= width_classes %> <%= height_classes %>">
|
8
8
|
<div class="flex-1 flex flex-col justify-between">
|
9
9
|
<div>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<%= content_tag :label, name: t('avo.per_page').downcase do %>
|
8
8
|
<%= select_tag 'per_page',
|
9
9
|
options_for_select(per_page_options, @index_params[:per_page]),
|
10
|
-
class: 'appearance-none inline-flex bg-white-100 disabled:bg-white-400 disabled:cursor-not-allowed focus:bg-white text-slate-700 disabled:text-slate-600 rounded-md py-1 px-2 leading-tight border border-slate-300 outline-
|
10
|
+
class: 'appearance-none inline-flex bg-white-100 disabled:bg-white-400 disabled:cursor-not-allowed focus:bg-white text-slate-700 disabled:text-slate-600 rounded-md py-1 px-2 leading-tight border border-slate-300 outline-none focus:border-slate-400 outline w-16 mr-1 text-sm',
|
11
11
|
data: {
|
12
12
|
'turbo-frame': @turbo_frame,
|
13
13
|
'per-page-target': 'selector',
|
@@ -30,6 +30,7 @@
|
|
30
30
|
<% end %>
|
31
31
|
|
32
32
|
<% if @pagy.pages > 1 %>
|
33
|
+
<%# @todo: add first & last page. make the first and last buttons rounded %>
|
33
34
|
<%== helpers.pagy_nav @pagy, anchor_string: "data-turbo-frame=\"#{@turbo_frame}\"" %>
|
34
35
|
<% end %>
|
35
36
|
</div>
|