bullet_train-themes-tailwind_css 1.0.14 → 1.0.15

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: 904e5766002601b5ff740ed4b1faf4e1c9db7f7b63ece2bbe36d66db1068d99e
4
- data.tar.gz: b158457d3283dc0d1653295adfed38cb600e22d7080e67b809f4f374948cd770
3
+ metadata.gz: 77a34836de69d61cdcb6eb598902b695b654a661a1f1e714d13298060820e2d2
4
+ data.tar.gz: 7aa804599eb6abf62c17ed89fff1fb8c656db43d72e69896ec170793ad735d05
5
5
  SHA512:
6
- metadata.gz: 07c6c6393133deb6384491c82e24be41b65e4298e8409427cda244140e33044f6790fed169110292213a1d56ee2c5e134842d0ebd7619fc1ef3fba9b8b11cd24
7
- data.tar.gz: 1fbb9f2f832201d65e2b01832df0e8b96cfb0f6067a192307af5daadd3fb6fe4ae5642a76ef0b19943ebe88527b233408c93f0dfeafaccd3d5bb250290d254cb
6
+ metadata.gz: 2c008535de88c4f05539eb1c436b150604c3b7000a77d16ceccc066daf6d6b9a343f2677b6f97e8cbc1ed1182e63855464d6136f0cbc6ec28b57aeed348b8f4a
7
+ data.tar.gz: 91d860a8ef974a3ce83d27f2c476cc1aea75d8c70272a9b95687aa09812f4304ae09e0c3c46e61506b73b920a6d81b45813fc6ffa0536088fd02f19a51cce4cf
@@ -2,10 +2,9 @@
2
2
 
3
3
  <%
4
4
  stimulus_controller = 'fields--button-toggle'
5
-
6
5
  form ||= current_fields_form
7
6
  html_options ||= {}
8
- html_options[:id] ||= id_for(form, method)
7
+ html_options[:id] ||= form.field_id(method)
9
8
  multiple ||= false
10
9
  other_options ||= {}
11
10
  options ||= options_for(form, method)
@@ -7,7 +7,7 @@ stimulus_controller = 'fields--cloudinary-image'
7
7
 
8
8
  form ||= current_fields_form
9
9
  options ||= {}
10
- options[:id] ||= id_for(form, method)
10
+ options[:id] ||= form.field_id(method)
11
11
  options[:width] ||= 100
12
12
  options[:height] ||= 100
13
13
  options[:cloud_name] ||= Cloudinary.config.cloud_name
@@ -5,7 +5,7 @@ stimulus_controller = 'fields--color-picker'
5
5
 
6
6
  form ||= current_fields_form
7
7
  html_options ||= {}
8
- html_options[:id] ||= id_for(form, method)
8
+ html_options[:id] ||= form.field_id(method)
9
9
  multiple ||= false
10
10
  other_options ||= {}
11
11
  options ||= options_for(form, method)
@@ -3,7 +3,7 @@
3
3
  <%
4
4
  form ||= current_fields_form
5
5
  options ||= {}
6
- options[:id] ||= id_for(form, method)
6
+ options[:id] ||= form.field_id(method)
7
7
  options[:class] = "form-control single-daterange w-full border-gray-300 dark:bg-darkPrimary-800 dark:border-darkPrimary-900 #{options[:class]}".strip
8
8
  options[:value] = form.object.send(method)&.in_time_zone(current_team.time_zone)&.strftime(t('global.formats.date_and_time'))
9
9
  options = options.merge({ data: {'fields--date-target': 'field' }})
@@ -5,7 +5,7 @@ stimulus_controller = 'fields--date'
5
5
 
6
6
  form ||= current_fields_form
7
7
  options ||= {}
8
- options[:id] ||= id_for(form, method)
8
+ options[:id] ||= form.field_id(method)
9
9
  options[:class] = "form-control single-daterange w-full border-gray-300 dark:bg-darkPrimary-800 dark:border-darkPrimary-900 #{options[:class]}".strip
10
10
  options[:value] = form.object.send(method)&.strftime(t('global.formats.date'))
11
11
  options = options.merge({ data: {"#{stimulus_controller}-target": 'field' }})
@@ -5,7 +5,7 @@ form ||= current_fields_form
5
5
  # returns a struct with `label`, `placeholder`, and `help` methods.
6
6
  labels = labels_for(form, method)
7
7
  options ||= {}
8
- options[:id] ||= id_for(form, method)
8
+ options[:id] ||= form.field_id(method)
9
9
  # options[:disabled] ||= !field_editable?(form.object, method) if user_signed_in?
10
10
  options[:placeholder] ||= labels.placeholder if labels.placeholder
11
11
  other_options ||= {}
@@ -3,8 +3,9 @@
3
3
  <%
4
4
  form ||= current_fields_form
5
5
  html_options ||= {}
6
- html_options[:id] ||= id_for(form, method)
6
+ html_options[:id] ||= form.field_id(method)
7
7
  multiple ||= false
8
+ use_columns ||= false
8
9
  other_options ||= {}
9
10
  options ||= options_for(form, method)
10
11
  labels = labels_for(form, method)
@@ -13,15 +14,16 @@ labels = labels_for(form, method)
13
14
  <%= render 'shared/fields/field', form: form, method: method, options: html_options, other_options: other_options do %>
14
15
  <% content_for :field do %>
15
16
  <div class="pt-1.5 pb-1 sm:col-span-2">
16
- <div class="max-w-lg space-y-3">
17
+ <%= tag.div class: ["max-w-lg": !use_columns, "max-w-3xl": use_columns, "columns-[var(--column-width,_15ch)_3]": use_columns] do %>
17
18
 
18
19
  <% options.each do |value, label| %>
19
20
 
20
- <label class="relative flex items-start">
21
+ <label class="relative flex items-start mb-3">
21
22
  <div class="flex items-center h-5">
22
23
 
23
24
  <% if multiple %>
24
- <%= form.check_box method, {multiple: multiple, checked: form.object.send(method).map(&:to_s).include?(value.to_s), class: "focus:ring-blue h-4 w-4 text-blue border-gray-300 rounded"}, value, "" %>
25
+ <% checked_value = form.object.send(method).nil? ? nil : form.object.send(method).map(&:to_s).include?(value.to_s) %>
26
+ <%= form.check_box method, {multiple: multiple, checked: checked_value, class: "focus:ring-blue h-4 w-4 text-blue border-gray-300 rounded"}, value, "" %>
25
27
  <% else %>
26
28
  <%= form.radio_button method, value, {class: "focus:ring-blue h-4 w-4 text-blue border-gray-300"} %>
27
29
  <% end %>
@@ -39,7 +41,7 @@ labels = labels_for(form, method)
39
41
 
40
42
  <% end %>
41
43
 
42
- </div>
44
+ <% end %>
43
45
  </div>
44
46
  <% end %>
45
47
  <% end %>
@@ -1,7 +1,7 @@
1
1
  module BulletTrain
2
2
  module Themes
3
3
  module TailwindCss
4
- VERSION = "1.0.14"
4
+ VERSION = "1.0.15"
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.0.14
4
+ version: 1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-25 00:00:00.000000000 Z
11
+ date: 2022-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard