activeadmin 4.0.0.beta16 → 4.0.0.beta17

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: a62b629c88387b6ce12da060ec6447ab0dd2d0899c7f7cb4b7b8df1081daa11d
4
- data.tar.gz: 2138d2c6d8dabc12f59ef9351ea8f991db845b313d770fc054fdf58768731b2f
3
+ metadata.gz: b1d53a8406a4e9dbe404b083ed90ee235be6620b0f5cf9d41366f64f2dccec89
4
+ data.tar.gz: ab337381ccd99bd305a5a0324102418be8a6fc5466f73053bbb3e0107df630b2
5
5
  SHA512:
6
- metadata.gz: cc3c3ec1e7979f72ae4c93044705d4709a687916a420edbd59a1cf7c3c2b3a857deeeaabb4678787d522c72bf01f893cfbed3468ec6e4043cd8a30fa378afc66
7
- data.tar.gz: 46eec404c3a0d4dfdb5e7c7e15b9e2dd74c9351bad00ed4ad1bcf89fd42e13a6f0bd93ec1cd3b98cba2944381f3766a9490a256e24c02d6b421e46eaa53c819a
6
+ metadata.gz: 29c1dd8f8d79b25e9bda233a6592fd12fdc5a7456482ef819c145ef2c13aff3f9b3220d3d9cb56c397800b558e5e4361e43b3e6e07dd5ebb068a2a0c1a3770c6
7
+ data.tar.gz: 840e5a7548b7d299c61406573f16e44b51cedb4e79157a2ed85731b16118a759db12466cdaa9a35f315a6dc9fc5343652d79a9f55429bbcd44310dcc32925c42
data/README.md CHANGED
@@ -55,7 +55,7 @@ We try not to reinvent the wheel, so Active Admin is built with other open sourc
55
55
  * [Inherited Resources]
56
56
  * [Kaminari]
57
57
  * [Ransack]
58
- * [TailwindCSS](https://tailwindcss.com)
58
+ * [Tailwind CSS](https://tailwindcss.com)
59
59
 
60
60
  ## Security contact information
61
61
 
data/UPGRADING.md CHANGED
@@ -2,20 +2,19 @@
2
2
 
3
3
  ## From v3 to v4 (beta)
4
4
 
5
- ActiveAdmin v4 uses TailwindCSS. It has **mobile web, dark mode and RTL support** with a default theme that can be customized through partials and CSS. This release assumes `cssbundling-rails` and `importmap-rails` is installed and configured in the host app. Partials can be modified to include a different asset library, e.g. shakapacker.
6
-
5
+ ActiveAdmin v4 uses Tailwind CSS v3 (with an upgrade to v4 coming soon). It has **mobile web, dark mode and RTL support** with a default theme that can be customized through partials and CSS. This release assumes `cssbundling-rails` and `importmap-rails` is installed and configured in the host app. Partials can be modified to include a different asset library, e.g. shakapacker.
7
6
  **IMPORTANT**: there is **no sortable functionality for has-many forms** in this release so if needed, **do not upgrade**. We are [open to community proposals](https://github.com/activeadmin/activeadmin/discussions/new?category=ideas). The add/remove functionality for has-many forms remains supported.
8
7
 
9
8
  These instructions assume the `cssbundling-rails` and `importmap-rails` gems are already installed and you have run their install commands in your app. If you haven't done so, please do before continuing.
10
9
 
11
- Update your `Gemfile` with `gem "activeadmin", "4.0.0.beta16"` and then run `gem install activeadmin --pre`.
10
+ Update your `Gemfile` with `gem "activeadmin", "4.0.0.beta17"` and then run `gem install activeadmin --pre`.
12
11
 
13
12
  Now, run `rails generate active_admin:assets` to replace the old assets with the new files.
14
13
 
15
14
  Then add the npm package and update the `build:css` script.
16
15
 
17
16
  ```
18
- yarn add @activeadmin/activeadmin@4.0.0-beta16
17
+ yarn add @activeadmin/activeadmin@4.0.0-beta17
19
18
  npm pkg set scripts.build:css="tailwindcss -i ./app/assets/stylesheets/active_admin.css -o ./app/assets/builds/active_admin.css --minify -c tailwind-active_admin.config.js"
20
19
  ```
21
20
 
@@ -47,6 +46,13 @@ Note that the templates can and will change across releases. There are additiona
47
46
 
48
47
  With the setup complete, please review the Breaking Changes section and resolve any that may or may not impact your integration.
49
48
 
49
+ **Important template change in 4.0.0.beta16:**
50
+
51
+ - The `_site_header.html.erb` partial has changed its main container class from `sticky` to `fixed`.
52
+ - The main layout for `active_admin.html.erb` now includes the `pt-16` utility class.
53
+
54
+ See [PR #8727](https://github.com/activeadmin/activeadmin/pull/8727) for more details.
55
+
50
56
  ### Breaking Changes
51
57
  - jQuery and jQuery UI have been removed.
52
58
  - The `columns` component has been removed. Use `div`'s with Tailwind classes for modern, responsive layout.
@@ -152,6 +158,7 @@ With the setup complete, please review the Breaking Changes section and resolve
152
158
  end
153
159
  ```
154
160
  </details>
161
+ - Using `row 'name'` in an `attributes_table` block, now prints the header text as is. For a localized lookup of the header with titlized fallback, use `row :name` instead. This matches the `column 'name'` behavior of index tables (`TableFor`).
155
162
 
156
163
  #### Resource named methods
157
164
 
@@ -31,7 +31,7 @@ module ActiveAdmin
31
31
  end
32
32
 
33
33
  def csv_filename
34
- "#{resource_collection_name.to_s.tr('_', '-')}-#{Time.zone.now.to_date.to_s}.csv"
34
+ "#{resource_collection_name.to_s.tr('_', '-')}-#{Time.zone.now.to_date}.csv"
35
35
  end
36
36
 
37
37
  def stream_csv
@@ -3,17 +3,17 @@
3
3
  <% flash_messages.each do |type, message| %>
4
4
  <% if type == "error" %>
5
5
  <div class="flex items-center gap-3 p-4 mb-2 rounded-lg bg-red-50 text-red-800 dark:bg-red-800 dark:text-red-300">
6
- <svg class="w-5 h-5 shrink-0" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"/></svg>
6
+ <svg class="w-5 h-5 shrink-0 text-red-400 dark:text-red-300" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"/></svg>
7
7
  <%= message %>
8
8
  </div>
9
9
  <% elsif type == "alert" %>
10
10
  <div class="flex items-center gap-3 p-4 mb-2 rounded-lg bg-yellow-50 text-yellow-800 dark:bg-yellow-800 dark:text-yellow-300">
11
- <svg class="w-5 h-5 shrink-0 rtl:-scale-x-100" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"/></svg>
11
+ <svg class="w-5 h-5 shrink-0 rtl:-scale-x-100 text-yellow-400 dark:text-yellow-300" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"/></svg>
12
12
  <%= message %>
13
13
  </div>
14
14
  <% elsif type == "notice" %>
15
- <div class="flex items-center gap-3 p-4 mb-2 rounded-lg bg-green-50 text-green-800 dark:bg-green-800 dark:text-green-400">
16
- <svg class="w-5 h-5 shrink-0 rtl:-scale-x-100" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"/></svg>
15
+ <div class="flex items-center gap-3 p-4 mb-2 rounded-lg bg-green-50 text-green-800 dark:bg-green-800 dark:text-green-300">
16
+ <svg class="w-5 h-5 shrink-0 rtl:-scale-x-100 text-green-400 dark:text-green-300" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"/></svg>
17
17
  <%= message %>
18
18
  </div>
19
19
  <% end %>
@@ -18,11 +18,11 @@
18
18
  <svg class="w-7 h-7" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20"><path d="M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"/></svg>
19
19
  </button>
20
20
 
21
- <div id="user-menu" class="z-50 hidden min-w-max bg-white rounded shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-gray-700 py-1 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="user-menu-button">
21
+ <div id="user-menu" class="z-50 hidden min-w-max rounded shadow-lg outline outline-1 outline-black/5 dark:-outline-offset-1 dark:outline-white/10 focus:outline-none py-1 text-sm bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300" aria-labelledby="user-menu-button">
22
22
  <ul>
23
23
  <% if current_active_admin_user? %>
24
- <li><%= auto_link current_active_admin_user, class: "block px-2.5 py-2 no-underline text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-white dark:hover:bg-gray-600 dark:hover:text-white" %></li>
25
- <li><%= link_to I18n.t("active_admin.logout"), auto_logout_link_path, class: "block px-2.5 py-2 no-underline text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-white dark:hover:bg-gray-600 dark:hover:text-white", data: { method: :delete } %></li>
24
+ <li><%= auto_link current_active_admin_user, class: "block px-2.5 py-2 no-underline text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-white/5 dark:hover:text-white" %></li>
25
+ <li><%= link_to I18n.t("active_admin.logout"), auto_logout_link_path, class: "block px-2.5 py-2 no-underline text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-white/5 dark:hover:text-white", data: { method: :delete } %></li>
26
26
  <% end %>
27
27
  </ul>
28
28
  </div>
@@ -1,4 +1,4 @@
1
- <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800 dark:border-gray-700">
1
+ <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
2
2
  <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white">
3
3
  <%= active_admin_application.site_title(self) %> <%= set_page_title t('active_admin.devise.resend_confirmation_instructions.title') %>
4
4
  </h2>
@@ -1,4 +1,4 @@
1
- <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800 dark:border-gray-700">
1
+ <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
2
2
  <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white">
3
3
  <%= active_admin_application.site_title(self) %> <%= set_page_title t('active_admin.devise.change_password.title') %>
4
4
  </h2>
@@ -1,4 +1,4 @@
1
- <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800 dark:border-gray-700">
1
+ <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
2
2
  <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white">
3
3
  <%= active_admin_application.site_title(self) %> <%= set_page_title t('active_admin.devise.reset_password.title') %>
4
4
  </h2>
@@ -1,4 +1,4 @@
1
- <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800 dark:border-gray-700">
1
+ <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
2
2
  <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white">
3
3
  <%= active_admin_application.site_title(self) %> <%= set_page_title t('active_admin.devise.sign_up.title') %>
4
4
  </h2>
@@ -1,4 +1,4 @@
1
- <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800 dark:border-gray-700">
1
+ <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
2
2
  <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white">
3
3
  <%= site_title %> <%= set_page_title t('active_admin.devise.login.title') %>
4
4
  </h2>
@@ -1,4 +1,4 @@
1
- <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800 dark:border-gray-700">
1
+ <div class="p-6 sm:p-8 space-y-4 md:space-y-6 w-full sm:max-w-md bg-white sm:rounded-md shadow dark:border dark:bg-gray-800/50 dark:border-gray-800">
2
2
  <h2 class="text-xl font-bold text-gray-900 md:text-2xl dark:text-white">
3
3
  <%= site_title %> <%= set_page_title t('active_admin.devise.unlock.title') %>
4
4
  </h2>
@@ -25,7 +25,7 @@
25
25
  <span class="font-semibold">
26
26
  <%= comment.author ? auto_link(comment.author) : I18n.t("active_admin.comments.author_missing") %>
27
27
  </span>
28
- <span class="text-xs text-gray-400">
28
+ <span class="text-xs text-gray-500 dark:text-gray-400">
29
29
  <%= pretty_format comment.created_at %>
30
30
  </span>
31
31
  </div>
@@ -59,6 +59,8 @@ fr:
59
59
  title: Connexion
60
60
  password:
61
61
  title: Mot de passe
62
+ password_confirmation:
63
+ title: Confirmer le mot de passe
62
64
  resend_confirmation_instructions:
63
65
  submit: Renvoyer les instructions de confirmation
64
66
  title: Renvoyer les instructions de confirmation
@@ -92,6 +94,7 @@ fr:
92
94
  index_list:
93
95
  table: Tableau
94
96
  logout: Déconnexion
97
+ move: Déplacer
95
98
  new_model: Créer %{model}
96
99
  next: Suivant
97
100
  pagination:
@@ -106,8 +109,11 @@ fr:
106
109
  one_page: Affichage de <b>tous les %{n}</b>
107
110
  per_page: 'Par page '
108
111
  previous: Précédent
112
+ truncate: "&hellip;"
109
113
  powered_by: Propulsé par %{active_admin} %{version}
110
114
  previous: Précédent
115
+ scopes:
116
+ all: Tout
111
117
  search_status:
112
118
  no_current_filters: Aucun filtre appliqué
113
119
  title: Recherche active
@@ -119,6 +125,10 @@ fr:
119
125
  'no': Non
120
126
  unset: Inconnu
121
127
  'yes': Oui
128
+ toggle_dark_mode: Bascule de mode sombre
129
+ toggle_main_navigation_menu: Bascule de menu principal
130
+ toggle_section: Bascule de section
131
+ toggle_user_menu: Bascule de menu utilisateur
122
132
  view: Voir
123
133
  activerecord:
124
134
  attributes:
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ActiveAdmin
3
- VERSION = "4.0.0.beta16"
3
+ VERSION = "4.0.0.beta17"
4
4
  end
@@ -61,10 +61,15 @@ module ActiveAdmin
61
61
  end
62
62
 
63
63
  def header_content_for(attr)
64
- if @resource_class.respond_to?(:human_attribute_name)
65
- @resource_class.human_attribute_name(attr, default: attr.to_s.titleize)
64
+ if attr.is_a?(Symbol)
65
+ default = attr.to_s.titleize
66
+ if @resource_class.respond_to?(:human_attribute_name)
67
+ @resource_class.human_attribute_name(attr, default: default)
68
+ else
69
+ default
70
+ end
66
71
  else
67
- attr.to_s.titleize
72
+ attr.to_s
68
73
  end
69
74
  end
70
75
 
data/plugin.js CHANGED
@@ -47,15 +47,8 @@ export default plugin(
47
47
  'textarea',
48
48
  'select',
49
49
  ]]: {
50
- appearance: 'none',
51
- 'background-color': '#fff',
52
- 'border-color': theme('colors.gray.500', colors.gray[500]),
53
- 'border-width': borderWidth['DEFAULT'],
54
- 'border-radius': borderRadius.none,
55
- 'padding-top': spacing[2],
56
- 'padding-right': spacing[3],
57
- 'padding-bottom': spacing[2],
58
- 'padding-left': spacing[3],
50
+ 'appearance': 'none',
51
+ 'padding': `${spacing[2]} ${spacing[3]}`,
59
52
  '--tw-shadow': '0 0 #0000',
60
53
  '&:focus': {
61
54
  outline: '2px solid transparent',
@@ -73,10 +66,6 @@ export default plugin(
73
66
  'border-color': theme('colors.blue.600', colors.blue[600]),
74
67
  },
75
68
  },
76
- [['input::placeholder', 'textarea::placeholder']]: {
77
- color: theme('colors.gray.500', colors.gray[500]),
78
- opacity: '1',
79
- },
80
69
  ['::-webkit-datetime-edit']: {
81
70
  display: 'inline-flex',
82
71
  },
@@ -123,27 +112,15 @@ export default plugin(
123
112
  },
124
113
  [[`[type='checkbox']`, `[type='radio']`]]: {
125
114
  appearance: 'none',
126
- padding: '0',
127
- 'print-color-adjust': 'exact',
128
- display: 'inline-block',
129
- 'vertical-align': 'middle',
130
115
  'background-origin': 'border-box',
131
- 'user-select': 'none',
132
- 'flex-shrink': '0',
133
- height: spacing[4],
134
- width: spacing[4],
135
116
  color: theme('colors.blue.600', colors.blue[600]),
136
- 'background-color': '#fff',
137
- 'border-color': theme('colors.gray.500', colors.gray[500]),
138
- 'border-width': borderWidth['DEFAULT'],
117
+ display: 'inline-block',
118
+ 'flex-shrink': '0',
119
+ 'print-color-adjust': 'exact',
120
+ 'user-select': 'none',
121
+ 'vertical-align': 'middle',
139
122
  '--tw-shadow': '0 0 #0000',
140
123
  },
141
- [`[type='checkbox']`]: {
142
- 'border-radius': borderRadius['none'],
143
- },
144
- [`[type='radio']`]: {
145
- 'border-radius': '100%',
146
- },
147
124
  [[`[type='checkbox']:focus`, `[type='radio']:focus`]]: {
148
125
  outline: '2px solid transparent',
149
126
  'outline-offset': '2px',
@@ -157,171 +134,68 @@ export default plugin(
157
134
  },
158
135
  [[
159
136
  `[type='checkbox']:checked`,
137
+ `[type='checkbox']:indeterminate`,
160
138
  `[type='radio']:checked`,
161
- `.dark [type='checkbox']:checked`,
162
- `.dark [type='checkbox']:indeterminate`,
163
- `.dark [type='radio']:checked`,
164
139
  ]]: {
165
- 'border-color': `transparent`,
166
140
  'background-color': `currentColor`,
167
- 'background-size': `0.65rem 0.65rem`,
168
141
  'background-position': `center`,
169
142
  'background-repeat': `no-repeat`,
143
+ 'background-size': `100% 100%`,
144
+ 'border-color': `transparent`,
170
145
  },
171
146
  [`[type='checkbox']:checked`]: {
172
147
  'background-image': `url("${svgToTinyDataUri(
173
- `<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 12">
174
- <path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M1 5.917 5.724 10.5 15 1.5"/>
148
+ `<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
149
+ <path d="M4 8 L7 11 L12 5" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" />
175
150
  </svg>`
176
151
  )}")`,
177
- 'background-repeat': `no-repeat`,
178
- 'background-size': `0.65rem 0.65rem`,
179
152
  'print-color-adjust': `exact`,
180
153
  },
181
154
  [`[type='radio']:checked`]: {
182
155
  'background-image': `url("${svgToTinyDataUri(
183
156
  `<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>`
184
157
  )}")`,
185
- 'background-size': `1rem 1rem`,
186
- },
187
- [`.dark [type='radio']:checked`]: {
188
- 'background-image': `url("${svgToTinyDataUri(
189
- `<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>`
190
- )}")`,
191
- 'background-size': `1rem 1rem`,
192
158
  },
193
159
  [`[type='checkbox']:indeterminate`]: {
194
160
  'background-image': `url("${svgToTinyDataUri(
195
- `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M2 8h12"/></svg>`
161
+ `<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
162
+ <path d="M4 8 L12 8" stroke="white" stroke-linecap="round" stroke-width="2.5" />
163
+ </svg>`
196
164
  )}")`,
197
- 'background-color': `currentColor`,
198
- 'border-color': `transparent`,
199
- 'background-position': `center`,
200
- 'background-repeat': `no-repeat`,
201
- 'background-size': `.65rem .65rem`,
202
165
  'print-color-adjust': `exact`,
203
166
  },
204
- [[
205
- `[type='checkbox']:indeterminate:hover`,
206
- `[type='checkbox']:indeterminate:focus`,
207
- ]]: {
208
- 'border-color': 'transparent',
209
- 'background-color': 'currentColor',
210
- },
211
167
  [`[type='file']`]: {
212
- background: 'unset',
213
- 'border-color': 'inherit',
214
- 'border-width': '0',
215
- 'border-radius': '0',
216
- padding: '0',
217
- 'font-size': 'unset',
218
- 'line-height': 'inherit',
219
- },
220
- [`[type='file']:focus`]: {
221
- outline: `1px auto inherit`,
222
- },
223
- [[`input[type=file]::file-selector-button`]]: {
224
- color: 'white',
225
- background: theme('colors.gray.800', colors.gray[800]),
226
- border: 0,
227
- 'font-weight': theme('fontWeight.medium'),
228
- 'font-size': theme('fontSize.sm'),
229
168
  cursor: 'pointer',
230
- 'padding-top': spacing[2.5],
231
- 'padding-bottom': spacing[2.5],
232
- 'padding-inline-start': spacing[8],
233
- 'padding-inline-end': spacing[4],
234
- 'margin-inline-start': '-1rem',
235
- 'margin-inline-end': '1rem',
236
- '&:hover': {
237
- background: theme('colors.gray.700', colors.gray[700]),
238
- },
239
169
  },
240
- [[`.dark input[type=file]::file-selector-button`]]: {
241
- color: 'white',
242
- background: theme('colors.gray.600', colors.gray[600]),
170
+ [`[type=file]::file-selector-button`]: {
171
+ 'background-color': theme('colors.gray.100', colors.gray[100]),
172
+ 'border': `${borderWidth['DEFAULT']} solid ${theme('colors.gray.200', colors.gray[200])}`,
173
+ 'border-radius': borderRadius['DEFAULT'],
174
+ cursor: 'pointer',
175
+ 'padding': `${spacing[2]} ${spacing[3]}`,
243
176
  '&:hover': {
244
- background: theme('colors.gray.500', colors.gray[500]),
177
+ 'background-color': theme('colors.gray.200', colors.gray[200]),
245
178
  },
246
179
  },
247
- [['.tooltip-arrow', '.tooltip-arrow:before']]: {
248
- position: 'absolute',
249
- width: '8px',
250
- height: '8px',
251
- background: 'inherit',
252
- },
253
- ['.tooltip-arrow']: {
254
- visibility: 'hidden',
255
- },
256
- ['.tooltip-arrow:before']: {
257
- content: '""',
258
- visibility: 'visible',
259
- transform: 'rotate(45deg)',
260
- },
261
- [`.tooltip[data-popper-placement^='top'] > .tooltip-arrow`]: {
262
- bottom: '-4px',
263
- },
264
- [`.tooltip[data-popper-placement^='bottom'] > .tooltip-arrow`]: {
265
- top: '-4px',
266
- },
267
- [`.tooltip[data-popper-placement^='left'] > .tooltip-arrow`]: {
268
- right: '-4px',
269
- },
270
- [`.tooltip[data-popper-placement^='right'] > .tooltip-arrow`]: {
271
- left: '-4px',
272
- },
273
- ['.tooltip.invisible > .tooltip-arrow:before']: {
274
- visibility: 'hidden',
275
- },
276
- [['[data-popper-arrow]', '[data-popper-arrow]:before']]: {
277
- position: 'absolute',
278
- width: '8px',
279
- height: '8px',
280
- background: 'inherit',
281
- },
282
- ['[data-popper-arrow]']: {
283
- visibility: 'hidden',
284
- },
285
- ['[data-popper-arrow]:before']: {
286
- content: '""',
287
- visibility: 'visible',
288
- transform: 'rotate(45deg)',
289
- },
290
- [`[data-popover][role="tooltip"][data-popper-placement^='top'] > [data-popper-arrow]`]:
291
- {
292
- bottom: '-5px',
293
- },
294
- [`[data-popover][role="tooltip"][data-popper-placement^='bottom'] > [data-popper-arrow]`]:
295
- {
296
- top: '-5px',
297
- },
298
- [`[data-popover][role="tooltip"][data-popper-placement^='left'] > [data-popper-arrow]`]:
299
- {
300
- right: '-5px',
301
- },
302
- [`[data-popover][role="tooltip"][data-popper-placement^='right'] > [data-popper-arrow]`]:
303
- {
304
- left: '-5px',
305
- },
306
- ['[role="tooltip"].invisible > [data-popper-arrow]:before']: {
307
- visibility: 'hidden',
180
+ [`.dark [type=file]::file-selector-button`]: {
181
+ '@apply bg-white/5 border-white/5 text-white hover:bg-white/10': {}
308
182
  },
309
183
  '[type=checkbox]': {
310
- '@apply w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600': {}
184
+ '@apply w-4 h-4 bg-gray-100 border border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-white/5 dark:border-white/10': {}
311
185
  },
312
186
  '[type=radio]': {
313
- '@apply w-4 h-4 border-gray-300 focus:ring-2 focus:ring-blue-300 dark:focus:ring-blue-600 dark:focus:bg-blue-600 dark:bg-gray-700 dark:border-gray-600': {}
187
+ '@apply w-4 h-4 bg-gray-100 border border-gray-300 rounded-full focus:ring-2 focus:ring-blue-300 dark:focus:ring-blue-600 dark:focus:bg-blue-600 dark:bg-white/5 dark:border-white/10': {}
314
188
  },
315
189
  [['[type=datetime-local]', '[type=month]', '[type=week]', '[type=search]', '[type=date]', '[type=email]', '[type=number]', '[type=password]', '[type=tel]', '[type=text]', '[type=time]', '[type=url]', 'select', 'textarea']]: {
316
- '@apply bg-gray-50 border border-gray-300 text-gray-900 rounded-md focus:ring-blue-500 focus:border-blue-500 w-full dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500': {}
190
+ '@apply bg-gray-50 border border-gray-300 text-gray-900 placeholder:text-gray-400 rounded-md focus:ring-blue-500 focus:border-blue-500 w-full dark:bg-white/5 dark:border-white/10 dark:text-white dark:placeholder:text-gray-500 dark:focus:ring-blue-500 dark:focus:border-blue-500': {}
317
191
  },
318
192
  'a': {
319
- '@apply text-blue-600 underline underline-offset-[.2rem]': {}
193
+ '@apply text-blue-600 dark:text-blue-500 underline underline-offset-[.2rem]': {}
320
194
  },
321
195
  });
322
196
  addComponents({
323
197
  '.action-item-button': {
324
- '@apply py-2 px-3 text-sm font-medium no-underline text-gray-900 focus:outline-none bg-white rounded-md border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700': {}
198
+ '@apply py-2 px-3 text-sm font-medium no-underline text-gray-900 focus:outline-none bg-white rounded-md border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-700 dark:hover:text-white dark:hover:bg-gray-700': {}
325
199
  },
326
200
  '.index-data-table-toolbar': {
327
201
  '@apply flex flex-col lg:flex-row gap-4 mb-4': {}
@@ -343,7 +217,7 @@ export default plugin(
343
217
  '@apply bg-gray-100 hover:bg-gray-100 dark:bg-gray-800 dark:hover:bg-gray-800': {}
344
218
  },
345
219
  '.scopes-count': {
346
- '@apply inline-flex items-center justify-center rounded-full bg-indigo-200/80 text-indigo-800 dark:bg-indigo-800 dark:text-indigo-200 px-1.5 py-1 text-xs font-normal ms-2 leading-none': {}
220
+ '@apply inline-flex items-center justify-center rounded-full bg-indigo-100 text-indigo-700 dark:bg-indigo-800/60 dark:text-indigo-400 px-1.5 py-1 text-xs font-normal ms-2 leading-none': {}
347
221
  },
348
222
  '.paginated-collection': {
349
223
  '@apply border border-gray-200 dark:border-gray-800 rounded-md shadow-sm overflow-hidden': {}
@@ -427,22 +301,22 @@ export default plugin(
427
301
  '@apply relative': {}
428
302
  },
429
303
  '.batch-actions-dropdown-toggle': {
430
- '@apply transition-opacity rounded-md inline-flex items-center justify-center gap-2 px-3 py-2 text-sm font-medium text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-blue-500 dark:focus:text-white disabled:text-gray-400 disabled:border-gray-200/70 dark:disabled:bg-gray-900 dark:disabled:text-gray-700 dark:disabled:border-gray-800 disabled:pointer-events-none': {}
304
+ '@apply transition-opacity rounded-md inline-flex items-center justify-center gap-2 px-3 py-2 text-sm font-medium text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-blue-500 dark:focus:text-white disabled:text-gray-400 disabled:border-gray-200/70 dark:disabled:bg-gray-900 dark:disabled:text-gray-700 dark:disabled:border-gray-800 disabled:pointer-events-none': {}
431
305
  },
432
306
  '.batch-actions-dropdown-arrow': {
433
307
  '@apply w-2.5 h-2.5': {}
434
308
  },
435
309
  '.batch-actions-dropdown-menu': {
436
- '@apply z-10 hidden min-w-[7rem] bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-gray-700 py-1 text-sm text-gray-700 dark:text-gray-200': {}
310
+ '@apply z-10 hidden min-w-[7rem] bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-gray-800 py-1 text-sm text-gray-700 dark:text-gray-200': {}
437
311
  },
438
312
  '.batch-actions-dropdown-menu :where(li > a)': {
439
- '@apply block px-2.5 py-2 no-underline text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-white dark:hover:bg-gray-600 dark:hover:text-white': {}
313
+ '@apply block px-2.5 py-2 no-underline text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:text-white dark:hover:bg-gray-700 dark:hover:text-white': {}
440
314
  },
441
315
  '.panel': {
442
316
  '@apply mb-6 border border-gray-200 rounded-md shadow-sm dark:border-gray-800': {}
443
317
  },
444
318
  '.panel-title': {
445
- '@apply font-bold bg-gray-100 dark:bg-gray-900 rounded-t-md p-3': {}
319
+ '@apply font-bold bg-gray-100 dark:bg-gray-950/50 rounded-t-md p-3': {}
446
320
  },
447
321
  '.panel-body': {
448
322
  '@apply py-5 px-3': {}
@@ -454,22 +328,22 @@ export default plugin(
454
328
  '@apply w-full text-sm text-gray-800 dark:text-gray-300': {}
455
329
  },
456
330
  '.attributes-table :where(tbody > tr)': {
457
- '@apply border-b dark:border-gray-800 last:border-b-0': {}
331
+ '@apply border-b dark:border-gray-800 last:border-b-0 align-baseline': {}
458
332
  },
459
333
  '.attributes-table :where(tbody > tr > th)': {
460
- '@apply w-32 sm:w-40 text-start text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-800/60 dark:text-gray-300': {}
334
+ '@apply w-32 sm:w-40 text-start text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-950/50 dark:text-gray-300': {}
461
335
  },
462
336
  '.attributes-table :where(tbody > tr > th, tbody > tr > td)': {
463
337
  '@apply p-3': {}
464
338
  },
465
339
  '.attributes-table-empty-value': {
466
- '@apply text-gray-400/50 dark:text-gray-700/60 text-xs uppercase font-semibold': {}
340
+ '@apply text-gray-400/50 dark:text-gray-600/50 text-xs uppercase font-semibold': {}
467
341
  },
468
342
  '.status-tag': {
469
- '@apply bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-400 inline-flex items-center rounded-full text-sm font-medium px-2.5 py-0.5 whitespace-nowrap': {}
343
+ '@apply bg-gray-200 text-gray-600 dark:bg-gray-400/20 dark:text-gray-400 inline-flex items-center rounded-full text-sm font-medium px-2.5 py-0.5 whitespace-nowrap': {}
470
344
  },
471
345
  '.status-tag:where([data-status=yes])': {
472
- '@apply bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300': {}
346
+ '@apply bg-green-100 text-green-700 dark:bg-green-400/20 dark:text-green-400': {}
473
347
  },
474
348
  // Forms
475
349
  '.formtastic': {
@@ -500,19 +374,19 @@ export default plugin(
500
374
  '@apply sr-only': {}
501
375
  },
502
376
  '.formtastic :where(.inline-hints)': {
503
- '@apply text-gray-500 mt-2': {}
377
+ '@apply text-gray-500 dark:text-gray-400 mt-2': {}
504
378
  },
505
379
  '.formtastic :where(.errors)': {
506
- '@apply p-4 mb-6 rounded-md space-y-2 bg-red-50 text-red-800 dark:bg-red-800 dark:text-red-300': {}
380
+ '@apply p-4 mb-6 rounded-md space-y-2 bg-red-50 text-red-800 dark:bg-red-500/15 dark:text-red-200': {}
507
381
  },
508
382
  '.formtastic :where(.errors > li)': {
509
383
  '@apply list-disc ms-4': {}
510
384
  },
511
385
  '.formtastic :where(.inline-errors)': {
512
- '@apply font-bold mt-2 text-red-600 dark:text-red-300': {}
386
+ '@apply font-bold mt-2 text-red-600 dark:text-red-400': {}
513
387
  },
514
- '.formtastic :where(.error [type=email], .error [type=number], .error [type=password], .error [type=tel], .error [type=text], .error [type=url], .error textarea)': {
515
- '@apply border-red-500': {}
388
+ '.formtastic :where(.error [type=email], .error [type=number], .error [type=password], .error [type=tel], .error [type=text], .error [type=url], .error select, .error textarea)': {
389
+ '@apply border-red-500/50': {}
516
390
  },
517
391
  '.formtastic :where(.buttons, .actions)': {
518
392
  '@apply mt-3': {}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.beta16
4
+ version: 4.0.0.beta17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Maresh
@@ -403,7 +403,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
403
403
  - !ruby/object:Gem::Version
404
404
  version: '0'
405
405
  requirements: []
406
- rubygems_version: 3.7.0
406
+ rubygems_version: 3.7.2
407
407
  specification_version: 4
408
408
  summary: Active Admin is a Ruby on Rails plugin for generating administration style
409
409
  interfaces. It abstracts common business application patterns to make it simple