madmin 3.2.0 → 3.3.0

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: d296cf7cb6a9354c9592abe179e09f696c1d57d29b180832a89b5cbc40bd0af9
4
- data.tar.gz: 413c7d5f5f4182c623e1e396a8cec662c3ddc6a6b3fa154bdbed42ea85de655a
3
+ metadata.gz: 565609ba87bcf66877e39fc115b8f6fedff6337a3dbc45ca2ea8b045ee52902e
4
+ data.tar.gz: eaf2ef17153d0b50b61ffa19922b34c6f2d810cc28d2b899cc0f45365f4ce501
5
5
  SHA512:
6
- metadata.gz: d8ec5350c6adb616086c148e18323a16bb6ea06049e96c2731b4c2ffe1a23208493265415772833c44ea6684e9909e289a27d6447378fad79682a5ae0f64f017
7
- data.tar.gz: 07a42b02500a2bb14eae9d2817b75f54c7798917b76fdf39aefa6c66d8dcf813cc3553842643db20abf12e5998a7de9c695226eb843966a5430cd40ca5033222
6
+ metadata.gz: f9ef7c90457d5dda3297aa9343273e15d354742538da9d6166a6921d2bd80646ed4ebd388e34fc2cc381e4c5e05fd3f98991ae49aba7eec02668c9e44c2dc823
7
+ data.tar.gz: ea8d222e6ab24dc84a49506d764286ec1636db07ece7cbf7fe965f3b7f7427184063d69af321225c25123453f687914bb799a26a6fd2448ce5ca2d9c015b9a1b
@@ -2,6 +2,12 @@
2
2
  color: var(--danger-color);
3
3
  }
4
4
 
5
+ /* Apps often add .error to invalid fields with a field_error_proc. Outline those fields instead of coloring their text, which would also tint Lexxy's toolbar */
6
+ :is(input, select, textarea, lexxy-editor, trix-editor).error {
7
+ color: inherit;
8
+ border-color: var(--danger-color);
9
+ }
10
+
5
11
  .form-hint {
6
12
  font-size: 0.875rem;
7
13
  margin-top: 0.5rem;
@@ -64,16 +70,14 @@ select {
64
70
  appearance: none;
65
71
  background-color: var(--surface-color);
66
72
 
73
+ border: 1px solid var(--input-border-color);
67
74
  border-radius: 0.375rem;
68
- box-shadow: inset 0 0 0 1px var(--input-border-color);
69
75
  line-height: 1.5rem;
70
- padding-bottom: 0.375rem;
71
- padding-left: 0.75rem;
72
- padding-right: 0.75rem;
73
- padding-top: 0.375rem;
76
+ /* Subtract the border so fields keep their size */
77
+ padding: calc(0.375rem - 1px) calc(0.75rem - 1px);
74
78
 
75
79
  &:focus {
76
- box-shadow: inset 0 0 0 1px var(--primary-color);
80
+ border-color: var(--primary-color);
77
81
  }
78
82
  }
79
83
 
@@ -109,13 +113,13 @@ select:not([multiple]) {
109
113
  align-items: center;
110
114
  gap: 0.25rem;
111
115
  background-color: var(--surface-color);
116
+ border: 1px solid var(--input-border-color);
112
117
  border-radius: 0.375rem;
113
- box-shadow: inset 0 0 0 1px var(--input-border-color);
114
- padding: 0.375rem 0.75rem;
118
+ padding: calc(0.375rem - 1px) calc(0.75rem - 1px);
115
119
  cursor: text;
116
120
 
117
121
  &:focus-within {
118
- box-shadow: inset 0 0 0 1px var(--primary-color);
122
+ border-color: var(--primary-color);
119
123
  }
120
124
  }
121
125
 
@@ -124,7 +128,7 @@ select:not([multiple]) {
124
128
  flex: 1;
125
129
  min-width: 8rem;
126
130
  background: transparent;
127
- box-shadow: none;
131
+ border: none;
128
132
  outline: none;
129
133
  padding: 0;
130
134
  }
@@ -13,7 +13,7 @@
13
13
  <% end %>
14
14
  <% unless resource.readonly? %>
15
15
  <%= link_to t("madmin.actions.edit"), resource.edit_path(@record), class: "btn btn-secondary" %>
16
- <%= button_to t("madmin.actions.delete"), resource.show_path(@record), method: :delete, data: { turbo_confirm: t("madmin.confirmations.delete") }, class: "btn btn-danger" %>
16
+ <%= button_to t("madmin.actions.delete"), resource.show_path(@record), method: :delete, data: { turbo_confirm: t("madmin.confirmations.delete", resource: resource.friendly_name, name: resource.display_name(@record)) }, class: "btn btn-danger" %>
17
17
  <% end %>
18
18
  </div>
19
19
  </header>
@@ -6,6 +6,6 @@
6
6
  <% end %>
7
7
 
8
8
  <% if (remove_path = field.remove_path(attachment)) %>
9
- <%= link_to t("madmin.actions.remove"), remove_path, data: { turbo_method: :delete, turbo_confirm: t("madmin.confirmations.remove_with_changes")} %>
9
+ <%= link_to t("madmin.actions.remove"), remove_path, data: { turbo_method: :delete, turbo_confirm: t("madmin.confirmations.remove_with_changes", name: attachment.filename.to_s) } %>
10
10
  <% end %>
11
11
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module Madmin
2
- VERSION = "3.2.0"
2
+ VERSION = "3.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: madmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Oliver