bullet_train-themes-tailwind_css 1.0.14 → 1.0.16

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: 65708a84e9d1a826988f78fd208613c052f98d3e2fb13d361682f6646a7b55b9
4
+ data.tar.gz: 35fa6c1277a50dde8542cc4d089cd7811cc7b28a8fd6a6b90ddce59df33768bb
5
5
  SHA512:
6
- metadata.gz: 07c6c6393133deb6384491c82e24be41b65e4298e8409427cda244140e33044f6790fed169110292213a1d56ee2c5e134842d0ebd7619fc1ef3fba9b8b11cd24
7
- data.tar.gz: 1fbb9f2f832201d65e2b01832df0e8b96cfb0f6067a192307af5daadd3fb6fe4ae5642a76ef0b19943ebe88527b233408c93f0dfeafaccd3d5bb250290d254cb
6
+ metadata.gz: b9a8d76316a06e849697378df0970dc194d6a7f3646da5b98ea9a611d452c13ff9999374e287625438936e6ce3c241603f969161984e971ce1bb5585de3a6e9d
7
+ data.tar.gz: 80b46ba2045cebd8dd5ceb001934ee95060d074eeec43d78bfed2db847b4752062cd6c3d82ef474bb3ec9967981a95f126cd670535673c86d5088bd0f5b55a9c
@@ -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 %>
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -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.16"
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.16
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-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -88,6 +88,8 @@ files:
88
88
  - app/views/themes/tailwind_css/fields/_field.html.erb
89
89
  - app/views/themes/tailwind_css/fields/_file_field.html.erb
90
90
  - app/views/themes/tailwind_css/fields/_options.html.erb
91
+ - app/views/themes/tailwind_css/limits/_form.html.erb
92
+ - app/views/themes/tailwind_css/limits/_index.html.erb
91
93
  - config/routes.rb
92
94
  - lib/bullet_train/themes/tailwind_css.rb
93
95
  - lib/bullet_train/themes/tailwind_css/engine.rb