bullet_train-themes-tailwind_css 1.2.27 → 1.3.0
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 +4 -4
- data/app/views/themes/tailwind_css/attributes/_code.html.erb +2 -2
- data/app/views/themes/tailwind_css/attributes/_file.erb +3 -3
- data/app/views/themes/tailwind_css/fields/_buttons.html.erb +0 -2
- data/app/views/themes/tailwind_css/fields/_cloudinary_image.html.erb +0 -2
- data/app/views/themes/tailwind_css/fields/_color_picker.html.erb +0 -2
- data/app/views/themes/tailwind_css/fields/_date_and_time_field.html.erb +0 -2
- data/app/views/themes/tailwind_css/fields/_date_field.html.erb +0 -2
- data/app/views/themes/tailwind_css/fields/_field.html.erb +17 -17
- data/app/views/themes/tailwind_css/fields/_file_field.html.erb +9 -6
- data/app/views/themes/tailwind_css/fields/_option.html.erb +0 -2
- data/app/views/themes/tailwind_css/fields/_options.html.erb +13 -10
- data/config/locales/en/fields.en.yml +5 -0
- data/lib/bullet_train/themes/tailwind_css/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d48e006fc00a8c1378d3ecff2ec43583addd63c802b99a9ac33bfd6477aa61b4
|
4
|
+
data.tar.gz: 48550a93c75322d1c37770056abc980b1fd3f31b9c01b4842bde39639ef400d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 102dcf8cf3b79b18f0f844ad3747a8a3ea44e259669b44abffe91ec77452b06add0a38897f32dd3439a4a8c26ad9564fa761d746a344c6fd6567bf581ae4b969
|
7
|
+
data.tar.gz: f985f35e4ee27b6e7a5b077d8027a4ec8334a1acfc177a52fbe7cf40c79d97f729ffa7a697d314ae070f6a137f214c13b795091dd994582a8c04921e2f0d5714
|
@@ -3,10 +3,10 @@
|
|
3
3
|
<% source ||= nil %>
|
4
4
|
<% url ||= nil %>
|
5
5
|
<% secret ||= false %>
|
6
|
-
<% if object.
|
6
|
+
<% if object.public_send(attribute).present? %>
|
7
7
|
<%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
|
8
8
|
<% if secret && source.nil? %>
|
9
|
-
<% attribute = object.
|
9
|
+
<% attribute = object.public_send(attribute) %>
|
10
10
|
<% attribute_short = attribute[0..4] %>
|
11
11
|
<div class="flex flex-row">
|
12
12
|
<details class="group peer order-2">
|
@@ -2,11 +2,11 @@
|
|
2
2
|
<% strategy ||= current_attributes_strategy || :none %>
|
3
3
|
<% url ||= nil %>
|
4
4
|
|
5
|
-
<% if object.
|
5
|
+
<% if object.public_send(attribute).attached? %>
|
6
6
|
<%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %>
|
7
|
-
<%= link_to url_for(object.
|
7
|
+
<%= link_to url_for(object.public_send(attribute)), class: 'button download-file' do %>
|
8
8
|
<i class="leading-none mr-2 text-base ti ti-download"></i>
|
9
|
-
<span
|
9
|
+
<span><%= t("global.file_fields.download") %></span>
|
10
10
|
<% end %>
|
11
11
|
<% end %>
|
12
12
|
<% end %>
|
@@ -1,4 +1,11 @@
|
|
1
|
-
<%
|
1
|
+
<%
|
2
|
+
%i[label field error help after_help].each do |key|
|
3
|
+
if (content = content_for(key).presence)
|
4
|
+
flush_content_for key
|
5
|
+
partial.section key, content
|
6
|
+
end
|
7
|
+
end
|
8
|
+
%>
|
2
9
|
|
3
10
|
<%
|
4
11
|
form ||= current_fields_form
|
@@ -12,7 +19,7 @@ other_options ||= {}
|
|
12
19
|
other_options[:help] = [other_options[:help], labels.help].compact.join(" ")
|
13
20
|
|
14
21
|
errors = [method, method.to_s.gsub(/_id$/, '').to_sym].uniq.map { |attribute| form.object.errors.full_messages_for(attribute) }.flatten
|
15
|
-
has_errors = errors.any? ||
|
22
|
+
has_errors = errors.any? || partial.error? || other_options[:error].present?
|
16
23
|
|
17
24
|
options[:class] = "#{options[:class]} block w-full rounded-md shadow-sm font-light text-base md:text-sm"
|
18
25
|
|
@@ -28,9 +35,8 @@ end
|
|
28
35
|
|
29
36
|
<% # the label. %>
|
30
37
|
<% unless other_options[:hide_label] == true %>
|
31
|
-
<% if
|
32
|
-
<%=
|
33
|
-
<% flush_content_for :label %>
|
38
|
+
<% if partial.label? %>
|
39
|
+
<%= partial.label %>
|
34
40
|
<% else %>
|
35
41
|
<% # allow the label to be defined via an inline option or else one of the locale yaml definitions. %>
|
36
42
|
<% label = (other_options[:label].presence || labels.label || legacy_label_for(form, method)) %>
|
@@ -39,36 +45,30 @@ end
|
|
39
45
|
<% end %>
|
40
46
|
|
41
47
|
<div class="mt-1.5">
|
42
|
-
|
43
48
|
<% # the actual field. %>
|
44
|
-
<% if
|
45
|
-
<%=
|
46
|
-
<% flush_content_for :field %>
|
49
|
+
<% if partial.field? %>
|
50
|
+
<%= partial.field %>
|
47
51
|
<% else %>
|
48
52
|
<% # e.g. form.text_field(method, options) %>
|
49
53
|
<%= form.send(helper, method, options) %>
|
50
54
|
<% end %>
|
51
|
-
|
52
55
|
</div>
|
53
56
|
|
54
57
|
<% # any error messages. %>
|
55
58
|
<% if has_errors %>
|
56
59
|
<p class="mt-1.5 text-xs text-red">
|
57
60
|
<%= errors.map { |error| error + ". " }.join %>
|
58
|
-
<%=
|
59
|
-
<% flush_content_for :error %>
|
61
|
+
<%= partial.error %>
|
60
62
|
<%= other_options[:error]&.html_safe %>
|
61
63
|
</p>
|
62
64
|
<% end %>
|
63
65
|
|
64
66
|
<% # any help text. %>
|
65
|
-
<% if
|
67
|
+
<% if partial.help? || other_options[:help] || partial.after_help? %>
|
66
68
|
<p class="mt-1.5 text-xs text-slate-500">
|
67
|
-
<%=
|
68
|
-
<% flush_content_for :help %>
|
69
|
+
<%= partial.help %>
|
69
70
|
<%= other_options[:help]&.html_safe %>
|
70
|
-
<%=
|
71
|
-
<% flush_content_for :after_help %>
|
71
|
+
<%= partial.after_help %>
|
72
72
|
</p>
|
73
73
|
<% end %>
|
74
74
|
|
@@ -1,5 +1,3 @@
|
|
1
|
-
<% yield %>
|
2
|
-
|
3
1
|
<%
|
4
2
|
form ||= current_fields_form
|
5
3
|
options ||= {}
|
@@ -15,20 +13,25 @@ other_options ||= {}
|
|
15
13
|
<% if form.object.send(method).attached? %>
|
16
14
|
<%= link_to url_for(form.object.send(method)), class: 'button download-file mr-3', data: {'fields--file-field-target': 'downloadFileButton'} do %>
|
17
15
|
<i class="leading-none mr-2 text-base ti ti-download"></i>
|
18
|
-
<span
|
16
|
+
<span><%= t('fields.download_document') %></span>
|
19
17
|
<% end %>
|
20
18
|
<% end %>
|
21
19
|
<% if form.object.send(method).attached? %>
|
22
|
-
|
20
|
+
<% if form.object.send(method).representable? %>
|
21
|
+
<div class="mt-2">
|
22
|
+
<%= image_tag(form.object.send(method).representation(resize_to_limit: [200, 200])) %>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
25
|
+
<div class="mt-2 button-alternative cursor-pointer mr-3" data-action="click->fields--file-field#removeFile" data-fields--file-field-target="removeFileButton">
|
23
26
|
<i class="leading-none mr-2 text-base ti ti-trash"></i>
|
24
|
-
<span
|
27
|
+
<span><%= t('fields.remove_document') %></span>
|
25
28
|
</div>
|
26
29
|
<% end %>
|
27
30
|
</div>
|
28
31
|
<div class="mt-2">
|
29
32
|
<div class="button-alternative cursor-pointer" data-action="click->fields--file-field#uploadFile" data-fields--file-field-target="selectFileButton">
|
30
33
|
<i class="leading-none mr-2 text-base ti ti-upload dark:text-white"></i>
|
31
|
-
<span class="dark:text-white"
|
34
|
+
<span class="dark:text-white"><%= t('fields.upload_document') %></span>
|
32
35
|
</div>
|
33
36
|
<div class="mt-2 hidden overflow-hidden text-xs rounded bg-slate-100 shadow-inner relative">
|
34
37
|
<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-slate-800 rounded" role="progressbar" style="width: 0%;"> </div>
|
@@ -1,4 +1,11 @@
|
|
1
|
-
<%
|
1
|
+
<%
|
2
|
+
%i[actions_on_multiple].each do |key|
|
3
|
+
if (content = content_for(key).presence)
|
4
|
+
flush_content_for key
|
5
|
+
partial.section key, content
|
6
|
+
end
|
7
|
+
end
|
8
|
+
%>
|
2
9
|
|
3
10
|
<%
|
4
11
|
form ||= current_fields_form
|
@@ -44,21 +51,17 @@ end
|
|
44
51
|
} do %>
|
45
52
|
<label class="relative flex items-start">
|
46
53
|
<div class="flex items-center h-5">
|
47
|
-
<%= check_box_tag "#{html_options[:id]}-select_all", 'select-all', false, data: {
|
54
|
+
<%= check_box_tag "#{html_options[:id]}-select_all", 'select-all', false, data: {
|
48
55
|
"select-all-target": 'toggleCheckbox',
|
49
56
|
'action': "select-all#selectAllOrNone"
|
50
57
|
}, class: "focus:ring-blue h-4 w-4 text-blue border-slate-300 rounded" %>
|
51
58
|
</div>
|
52
59
|
<div class="ml-2.5 text-sm pr-4">
|
53
|
-
|
54
|
-
All
|
60
|
+
<%= t("global.bulk_select.all") %>
|
55
61
|
</div>
|
56
62
|
</label>
|
57
63
|
<% end %>
|
58
|
-
|
59
|
-
<%= yield :actions_on_multiple %>
|
60
|
-
<% flush_content_for :actions_on_multiple %>
|
61
|
-
<% end %>
|
64
|
+
<%= partial.actions_on_multiple %>
|
62
65
|
</div>
|
63
66
|
<% end %>
|
64
67
|
<% end %>
|
@@ -69,11 +72,11 @@ end
|
|
69
72
|
controller: "select-all",
|
70
73
|
"select-all-unavailable-class": "hidden"
|
71
74
|
} do %>
|
72
|
-
|
75
|
+
|
73
76
|
<% if multiple && show_select_all_top && !show_select_all_bottom %>
|
74
77
|
<%= select_all %>
|
75
78
|
<% end %>
|
76
|
-
|
79
|
+
|
77
80
|
<%= tag.div class: ["max-w-lg": !use_columns, "max-w-3xl": use_columns, "columns-[var(--column-width,_15ch)_3]": use_columns] do %>
|
78
81
|
<%= render 'shared/fields/option', method: method, form: form, option_field_options: option_field_options, multiple: multiple, options: options %>
|
79
82
|
<% 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.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -92,17 +92,18 @@ files:
|
|
92
92
|
- app/views/themes/tailwind_css/fields/_options.html.erb
|
93
93
|
- app/views/themes/tailwind_css/limits/_form.html.erb
|
94
94
|
- app/views/themes/tailwind_css/limits/_index.html.erb
|
95
|
+
- config/locales/en/fields.en.yml
|
95
96
|
- config/routes.rb
|
96
97
|
- lib/bullet_train/themes/tailwind_css.rb
|
97
98
|
- lib/bullet_train/themes/tailwind_css/engine.rb
|
98
99
|
- lib/bullet_train/themes/tailwind_css/version.rb
|
99
100
|
- lib/tasks/bullet_train/themes/tailwind_css_tasks.rake
|
100
|
-
homepage: https://github.com/bullet-train-co/bullet_train-themes-tailwind_css
|
101
|
+
homepage: https://github.com/bullet-train-co/bullet_train-core/tree/main/bullet_train-themes-tailwind_css
|
101
102
|
licenses:
|
102
103
|
- MIT
|
103
104
|
metadata:
|
104
|
-
homepage_uri: https://github.com/bullet-train-co/bullet_train-themes-tailwind_css
|
105
|
-
source_code_uri: https://github.com/bullet-train-co/bullet_train-themes-tailwind_css
|
105
|
+
homepage_uri: https://github.com/bullet-train-co/bullet_train-core/tree/main/bullet_train-themes-tailwind_css
|
106
|
+
source_code_uri: https://github.com/bullet-train-co/bullet_train-core/tree/main/bullet_train-themes-tailwind_css
|
106
107
|
post_install_message:
|
107
108
|
rdoc_options: []
|
108
109
|
require_paths:
|
@@ -118,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
119
|
- !ruby/object:Gem::Version
|
119
120
|
version: '0'
|
120
121
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
122
|
+
rubygems_version: 3.3.7
|
122
123
|
signing_key:
|
123
124
|
specification_version: 4
|
124
125
|
summary: Bullet Train Themes Tailwind CSS Base
|