avo 3.17.6.tw4 → 3.17.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +0 -1
- data/app/assets/stylesheets/avo.base.css +101 -101
- 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 +12260 -10320
- data/public/avo-assets/avo.base.js +3 -3
- data/public/avo-assets/avo.base.js.map +2 -2
- data/tailwind.preset.js +20 -0
- 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: 71276c99e3ea12d67d45edc52b5c1347b583ac0b3b096e987c76f4440709ed57
|
4
|
+
data.tar.gz: c26e580e8500dbcb6e92ad254fb3bbf10c0013519b8a229db7861773dce89b06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f9d486f4ebb654478c0329e539ec7b1b1c6d4383b9efbb66795ac8198a025ab839a50d993165cad55a00b04f65bfaf4db3b0d3acf9c64a5c4b77f8afd467944
|
7
|
+
data.tar.gz: c2a985268364a85b7c116541558c3e944cd830e1a59683f5b78d20036e684e2a4b2b6f3a902da998c3ae6930c223c073a0f7a5456304b997d28d07b6fd6d3959
|
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,124 +1,124 @@
|
|
1
|
-
@import
|
2
|
-
|
3
|
-
|
4
|
-
@
|
5
|
-
@
|
6
|
-
@
|
7
|
-
|
8
|
-
@
|
9
|
-
|
10
|
-
|
11
|
-
@
|
12
|
-
|
13
|
-
@
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
@
|
37
|
-
|
38
|
-
@import './css/fields/tags.css';
|
39
|
-
@import './css/fields/tiptap.css';
|
40
|
-
|
41
|
-
html,
|
42
|
-
body {
|
43
|
-
@apply antialiased relative h-full;
|
44
|
-
}
|
1
|
+
@import './../../../node_modules/easymde/dist/easymde.min.css';
|
2
|
+
@import './../../../node_modules/tippy.js/dist/tippy.css';
|
3
|
+
@import './../../../node_modules/tippy.js/themes/light.css';
|
4
|
+
@import './../../../node_modules/flatpickr/dist/flatpickr.css';
|
5
|
+
@import './../../../node_modules/@algolia/autocomplete-theme-classic/dist/theme.css';
|
6
|
+
@import './../../../node_modules/@yaireo/tagify/dist/tagify.css';
|
7
|
+
|
8
|
+
@import 'tailwindcss/base';
|
9
|
+
|
10
|
+
@import './css/fonts.css';
|
11
|
+
@import './css/buttons.css';
|
12
|
+
@import './css/typography.css';
|
13
|
+
@import './css/tooltips.css';
|
14
|
+
@import './css/loader.css';
|
15
|
+
@import './css/pagination.css';
|
16
|
+
@import './css/breadcrumbs.css';
|
17
|
+
@import './css/search.css';
|
18
|
+
@import './css/active-storage.css';
|
19
|
+
@import './css/scrollbar.css';
|
20
|
+
@import './css/sidebar.css';
|
21
|
+
@import './css/spinner.css';
|
22
|
+
|
23
|
+
@import './css/fields/status.css';
|
24
|
+
@import './css/fields/code.css';
|
25
|
+
@import './css/fields/progress.css';
|
26
|
+
@import './css/fields/trix.css';
|
27
|
+
@import './css/fields/tags.css';
|
28
|
+
@import './css/fields/tiptap.css';
|
29
|
+
|
30
|
+
@import 'tailwindcss/components';
|
31
|
+
|
32
|
+
@import 'tailwindcss/utilities';
|
33
|
+
|
34
|
+
html,
|
35
|
+
body {
|
36
|
+
@apply antialiased relative h-full;
|
37
|
+
}
|
45
38
|
|
46
|
-
|
47
|
-
|
48
|
-
|
39
|
+
.will-change-transform {
|
40
|
+
will-change: transform;
|
41
|
+
}
|
49
42
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
43
|
+
.fade-enter-active,
|
44
|
+
.fade-leave-active {
|
45
|
+
will-change: opacity;
|
46
|
+
will-change: transform;
|
54
47
|
|
55
|
-
|
56
|
-
|
48
|
+
@apply transition transform duration-150;
|
49
|
+
}
|
57
50
|
|
58
|
-
|
59
|
-
|
60
|
-
|
51
|
+
.fade-enter-active {
|
52
|
+
@apply relative ease-out delay-150;
|
53
|
+
}
|
61
54
|
|
62
|
-
|
63
|
-
|
64
|
-
|
55
|
+
.fade-leave-active {
|
56
|
+
@apply relative ease-in;
|
57
|
+
}
|
65
58
|
|
66
|
-
|
67
|
-
|
68
|
-
|
59
|
+
.fade-enter {
|
60
|
+
@apply delay-150 opacity-0 -translate-y-1;
|
61
|
+
}
|
69
62
|
|
70
|
-
|
71
|
-
|
72
|
-
|
63
|
+
.fade-enter-to {
|
64
|
+
@apply delay-150 opacity-100 translate-y-0;
|
65
|
+
}
|
73
66
|
|
74
|
-
|
75
|
-
|
76
|
-
|
67
|
+
.fade-leave {
|
68
|
+
@apply opacity-100 translate-y-0;
|
69
|
+
}
|
77
70
|
|
78
|
-
|
79
|
-
|
80
|
-
|
71
|
+
.fade-leave-to {
|
72
|
+
@apply opacity-0 translate-y-1;
|
73
|
+
}
|
81
74
|
|
82
|
-
|
83
|
-
|
84
|
-
|
75
|
+
.turbo-progress-bar {
|
76
|
+
@apply bg-primary-400;
|
77
|
+
}
|
85
78
|
|
86
|
-
|
87
|
-
|
88
|
-
|
79
|
+
body.os-mac .mac\:hidden {
|
80
|
+
display: none;
|
81
|
+
}
|
89
82
|
|
90
|
-
|
91
|
-
|
92
|
-
|
83
|
+
body.os-pc .pc\:hidden {
|
84
|
+
display: none;
|
85
|
+
}
|
93
86
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
87
|
+
trix-editor {
|
88
|
+
max-height: 320px !important;
|
89
|
+
overflow-y: auto;
|
90
|
+
}
|
98
91
|
|
99
|
-
|
100
|
-
|
101
|
-
|
92
|
+
dialog#turbo-confirm {
|
93
|
+
@apply bg-transparent;
|
94
|
+
}
|
102
95
|
|
103
|
-
|
104
|
-
|
96
|
+
dl {
|
97
|
+
@apply text-sm;
|
105
98
|
|
106
|
-
|
107
|
-
|
108
|
-
|
99
|
+
dt {
|
100
|
+
@apply font-bold inline-block mt-1;
|
101
|
+
}
|
109
102
|
|
110
|
-
|
111
|
-
|
112
|
-
}
|
103
|
+
dd {
|
104
|
+
@apply inline-block ml-0;
|
113
105
|
}
|
106
|
+
}
|
114
107
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
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;
|
119
113
|
}
|
114
|
+
}
|
120
115
|
|
121
|
-
|
122
|
-
|
116
|
+
.shift-pressed {
|
117
|
+
& .highlighted-row {
|
118
|
+
@apply !bg-neutral-200;
|
123
119
|
}
|
124
120
|
}
|
121
|
+
|
122
|
+
.selected-row {
|
123
|
+
@apply !bg-neutral-100;
|
124
|
+
}
|
@@ -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
|
},
|