bullet_train-themes-tailwind_css 1.7.18 → 1.7.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1eabb46a10aa96409d7a2f52eae865325685fe63fe0b5a71f2f308b8f8a6454a
4
- data.tar.gz: 1b166ff6e1564ea5329c6ae0d2e44d8f26280dfb4cf9625a5b9364334ba819a9
3
+ metadata.gz: ff33b25261c2829061dc941a130de849a9a76110442b1e194919c4dbd12f51eb
4
+ data.tar.gz: 8b0b08e5778bfea06029d248d298caa2b1754e3217fa56d59db3b2e73cb0a652
5
5
  SHA512:
6
- metadata.gz: 4c5c58dc5b54f38e0e11972c3b63ac015f6922726392acf97096f7c7cef3d8e330720e056e2a9db345a57288effb77799402bbb112d2da8125373392fbfd5985
7
- data.tar.gz: ef90973359fb21e83c7ea8fed0f4bd029d2de5cdbd891877a94f4bbadb0cde57ac2a2089045c80a72eda3f7baab217b17238646b80d541ecbd7ed92d94439813
6
+ metadata.gz: 21d5289351b097a151a75e17934a8756f7e7807861cd44638748cbdd80d6f145fecb91e1714cda98d7587158a82462558344305e814b2ed6bb6b08b6b3050402
7
+ data.tar.gz: a8fb9ed3341da42ed5a64b04364c78d9f6f846200a2c2eae485038d63d0c3c81bb2ddf25edc9e22df46c04a90d02634453b98709979cc808b91a41712a36c34d
@@ -41,6 +41,13 @@ if defined?(multiple)
41
41
  end
42
42
  %>
43
43
 
44
+ <%
45
+ button_classes = "button-alternative mb-1.5 mr-1"
46
+ if options[:disabled]
47
+ button_classes += " bg-slate-200 dark:bg-slate-700 hover:bg-slate-200 hover:dark:bg-slate-700"
48
+ end
49
+ %>
50
+
44
51
  <% content = render 'shared/fields/field', form: form, method: method, options: options, other_options: other_options do %>
45
52
  <% content_for :field do %>
46
53
  <div>
@@ -52,7 +59,7 @@ end
52
59
  <% else %>
53
60
  <%= form.radio_button method, value, options %>
54
61
  <% end %>
55
- <button type="button" class="button-alternative mb-1.5 mr-1" data-action="<%= stimulus_controller %>#clickShadowField">
62
+ <button type="button" class="<%= button_classes %>" data-action="<%= stimulus_controller %>#clickShadowField">
56
63
  <%= label %>
57
64
  </button>
58
65
  </label>
@@ -24,7 +24,7 @@ data_options = data_options.merge({ data: {"#{stimulus_controller}-target": 'fie
24
24
 
25
25
  # localized display options
26
26
  options[:id] ||= "#{form.field_id(method)}_display"
27
- options[:class] = "form-control single-daterange w-full border-slate-300 dark:bg-slate-800 dark:border-slate-900 #{options[:class]}".strip
27
+ options[:class] = "form-control single-daterange w-full border-slate-300 dark:bg-slate-800 dark:border-slate-900 disabled:bg-slate-200 disabled:dark:bg-slate-700 #{options[:class]}".strip
28
28
  raw_value = form.object.send(method)&.in_time_zone(current_user&.time_zone || current_team_time_zone || "UTC")
29
29
  options[:value] = raw_value && I18n.l(raw_value, format: :date_and_time_field)
30
30
  options = options.merge({ data: {"#{stimulus_controller}-target": 'displayField' }})
@@ -15,7 +15,7 @@ data_options = data_options.merge({ data: {"#{stimulus_controller}-target": 'fie
15
15
 
16
16
  # localized display options
17
17
  options[:id] ||= "#{form.field_id(method)}_display"
18
- options[:class] = "form-control single-daterange w-full border-slate-300 dark:bg-slate-800 dark:border-slate-900 #{options[:class]}".strip
18
+ options[:class] = "form-control single-daterange w-full border-slate-300 dark:bg-slate-800 dark:border-slate-900 disabled:bg-slate-200 disabled:dark:bg-slate-700 #{options[:class]}".strip
19
19
  options[:value] = form.object.send(method) && I18n.l(form.object.send(method), format: :date_field)
20
20
  options = options.merge({ data: {"#{stimulus_controller}-target": 'displayField' }})
21
21
  %>
@@ -23,6 +23,7 @@ end
23
23
  #
24
24
  # the `append_class` local can be used to append any other styles desired for the element.
25
25
  options[:class] ||= "focus:ring-primary-500 h-4 w-4 text-primary-500 border-slate-300 dark:bg-slate-800 dark:border-slate-900 #{"rounded" if options[:multiple] || single_check_box}"
26
+ options[:class] += " disabled:bg-slate-200 disabled:dark:bg-slate-700" # classes to give a visual indicator when a field is disabled
26
27
  options[:class] += " #{append_class}"
27
28
  %>
28
29
 
@@ -79,7 +79,7 @@ end
79
79
  <%= check_box_tag "#{options[:id]}-select_all", 'select-all', false, data: {
80
80
  "select-all-target": 'toggleCheckbox',
81
81
  'action': "select-all#selectAllOrNone"
82
- }, class: "focus:ring-primary-500 h-4 w-4 text-primary-500 border-slate-300 rounded" %>
82
+ }, class: "focus:ring-primary-500 h-4 w-4 text-primary-500 border-slate-300 rounded disabled:bg-slate-200 disabled:dark:bg-slate-700" %>
83
83
  </div>
84
84
  <div class="ml-2.5 text-sm pr-4">
85
85
  <%= t("global.bulk_select.all") %>
@@ -1,7 +1,7 @@
1
1
  module BulletTrain
2
2
  module Themes
3
3
  module TailwindCss
4
- VERSION = "1.7.18"
4
+ VERSION = "1.7.19"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-themes-tailwind_css
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.18
4
+ version: 1.7.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-15 00:00:00.000000000 Z
11
+ date: 2024-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard