bullet_train-themes-tailwind_css 1.0.12 → 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: fd6be9eb43e01d85afebd6bea397737747636af8535560a95505b23b043ca758
4
- data.tar.gz: e10a4b03026608bbe7967d7bff8a1c405c141fe7ee6323323894365ca24dc014
3
+ metadata.gz: 77a34836de69d61cdcb6eb598902b695b654a661a1f1e714d13298060820e2d2
4
+ data.tar.gz: 7aa804599eb6abf62c17ed89fff1fb8c656db43d72e69896ec170793ad735d05
5
5
  SHA512:
6
- metadata.gz: 6ac6216bb8a943ca8cdb99e6d7108f6ea0be8210a8efb2f633e94d45f535f2244d21f5f4e7112f7a27ad586b633f28c191a7d0ffab3bc27c068287b0247d73a8
7
- data.tar.gz: 48af2a849b1c09311fd31f8d970bb85141074a52baf641f6d7e202cf7b94b09853b998bfe5a620e85392d000a34017295dbf2b926f429f5cdbeedee5305989d8
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,26 +5,32 @@ 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)
12
12
  value = form.object.send(method)
13
+
14
+ color_selected_classes = "ring-2 ring-offset-2"
13
15
  %>
14
16
 
15
17
  <% content = render 'shared/fields/field', form: form, method: method, options: html_options, other_options: other_options do %>
16
18
  <% content_for :field do %>
17
- <div class="space-x-1" data-controller="<%= stimulus_controller %>" data-<%= stimulus_controller %>-initial-color-value="<%= value %>">
19
+ <div class="space-x-1"
20
+ data-controller="<%= stimulus_controller %>"
21
+ data-<%= stimulus_controller %>-initial-color-value="<%= value %>"
22
+ data-<%= stimulus_controller %>-color-selected-class="<%= color_selected_classes %>"
23
+ >
18
24
  <%= form.hidden_field method, value: value, data: {"#{stimulus_controller}-target": "colorPickerValue"} %>
19
25
  <div class="inline space-x-1" data-<%= stimulus_controller %>-target="colorOptions">
20
26
  <% options[:color_picker_options].each do |color| %>
21
27
  <label class="btn-toggle btn-color-picker">
22
- <button type="button" class="button-color mb-1.5 dark:ring-offset-darkPrimary-700 <%= color == value ? 'ring-2 ring-offset-2' : '' %>" style="background-color: <%= color %>; --tw-ring-color: <%= color %>" data-action="<%= stimulus_controller %>#pickColor" data-color="<%= color %>">&nbsp;</button>
28
+ <button type="button" class="button-color mb-1.5 dark:ring-offset-darkPrimary-700 <%= color == value ? color_selected_classes : '' %>" style="background-color: <%= color %>; --tw-ring-color: <%= color %>" data-action="<%= stimulus_controller %>#pickColor" data-<%= stimulus_controller %>-target="colorButton" data-color="<%= color %>">&nbsp;</button>
23
29
  </label>
24
30
  <% end %>
25
31
  </div>
26
32
  <label class="btn-toggle btn-color-picker">
27
- <button type="button" class="button-color mr-1 dark:ring-offset-darkPrimary-700 <%= value.blank? || options.include?(value) ? 'hidden' : 'ring-2 ring-offset-2' %>" data-action="<%= stimulus_controller %>#pickColor" data-<%= stimulus_controller %>-target="userSelectedColor" data-color="<%= value %>" style="background-color: <%= value %>; --tw-ring-color: <%= value %>">&nbsp;</button>
33
+ <button type="button" class="button-color mr-1 dark:ring-offset-darkPrimary-700 <%= value.blank? || options.include?(value) ? 'hidden' : color_selected_classes %>" data-action="<%= stimulus_controller %>#pickColor" data-<%= stimulus_controller %>-target="userSelectedColor colorButton" data-color="<%= value %>" style="background-color: <%= value %>; --tw-ring-color: <%= value %>">&nbsp;</button>
28
34
  </label>
29
35
  <span class="relative">
30
36
  <input type="text" disabled="disabled" class="rounded-md shadow-sm font-light font-mono text-sm focus:ring-blue focus:border-blue border-gray-300 w-48 dark:bg-darkPrimary-800 dark:border-darkPrimary-900" value="<%= value %>" data-<%= stimulus_controller %>-target="colorInput"/>
@@ -32,9 +38,14 @@ value = form.object.send(method)
32
38
  <button type="button" class="py-2 px-1 border border-transparent inline-flex items-center whitespace-nowrap rounded-md text-lg" data-action="<%= stimulus_controller %>#pickRandomColor">
33
39
  <i class="leading-5 ti ti-reload dark:text-blue-500"></i>
34
40
  </button>
35
- <button type="button" class="py-2 px-1 border border-transparent inline-flex items-center whitespace-nowrap rounded-md btn-pickr text-lg" data-action="<%= stimulus_controller %>#togglePickr">
41
+ <button type="button" class="py-2 px-1 border border-transparent inline-flex items-center whitespace-nowrap rounded-md btn-pickr text-lg"
42
+ data-<%= stimulus_controller %>-target="togglePickerButton" data-action="<%= stimulus_controller %>#togglePickr">
36
43
  <i class="leading-5 ti ti-pencil dark:text-blue-500"></i>
37
44
  </button>
45
+ <span
46
+ data-<%= stimulus_controller %>-target="pickerContainer"
47
+ data-action="keydown-><%= stimulus_controller %>#handleKeydown"
48
+ ></span>
38
49
  <button type="button" class="py-2 px-1 pr-3.5 border border-transparent inline-flex items-center whitespace-nowrap rounded-md text-lg" data-action="<%= stimulus_controller %>#unpickColor">
39
50
  <i class="leading-5 ti ti-trash dark:text-blue-500"></i>
40
51
  </button>
@@ -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 ||= {}
@@ -30,8 +30,9 @@ other_options ||= {}
30
30
  <i class="leading-none mr-2 text-base ti ti-upload dark:text-white"></i>
31
31
  <span class="dark:text-white">Upload New Document</span>
32
32
  </div>
33
- <div class="mt-2 hidden flex overflow-hidden text-xs rounded bg-black-400">
34
- <div data-fields--file-field-target="progressBar" aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" class="flex flex-col justify-center text-white text-center whitespace-nowrap overflow-hidden dark:bg-darkPrimary-800" role="progressbar" style="width: 0%;"> 0%</div>
33
+ <div class="mt-2 hidden overflow-hidden text-xs rounded bg-gray-100 shadow-inner relative">
34
+ <div data-fields--file-field-target="progressBar" aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" class="absolute top-0 left-0 whitespace-nowrap overflow-hidden animate-pulse bg-primary-500 dark:bg-darkPrimary-800 rounded" role="progressbar" style="width: 0%;">&nbsp;</div>
35
+ <div class="text-black text-center" data-fields--file-field-target="progressLabel">0%</div>
35
36
  </div>
36
37
  </div>
37
38
  </div>
@@ -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.12"
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.12
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-15 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
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubygems_version: 3.2.22
117
+ rubygems_version: 3.3.7
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Bullet Train Themes Tailwind CSS Base