tramway 2.2.5 → 2.2.5.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: edc7135e1000add90876e8d8a8c528c075295cb7e17d107cc01f975cd09b71b2
|
|
4
|
+
data.tar.gz: b4e893c3d6f8ea6c772f390988f845098c822e7e358a95c389d569c8f50db0c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d82d49d6660dac61c77aa545f918f7ef28631b79dcff239994c9cf6f7aba6b4b9c8ab106326627332772b65ffe3daf50a2b6fc8b9dffbdfb395a0ee8400010b8
|
|
7
|
+
data.tar.gz: 940347103f243095eac60fa9ae0bf16030a3b6ebc92fd661e8407e80ce383cc3945f8a68e33d7f7500f421054469e06b2954ac70168675fc7d15cf0c774e0349
|
|
@@ -4,10 +4,11 @@ module Tailwinds
|
|
|
4
4
|
# Title component
|
|
5
5
|
class TitleComponent < Tramway::BaseComponent
|
|
6
6
|
option :text
|
|
7
|
+
option :options, optional: true, default: -> { {} }
|
|
7
8
|
|
|
8
9
|
def title_classes
|
|
9
10
|
theme_classes(
|
|
10
|
-
classic:
|
|
11
|
+
classic: "font-semibold text-2xl md:text-4xl text-gray-100 #{options[:class]}"
|
|
11
12
|
)
|
|
12
13
|
end
|
|
13
14
|
end
|
|
@@ -7,6 +7,7 @@ require 'net/http'
|
|
|
7
7
|
module Tramway
|
|
8
8
|
module Generators
|
|
9
9
|
# nodoc
|
|
10
|
+
# rubocop:disable Metrics/ModuleLength
|
|
10
11
|
module InstallGeneratorHelpers
|
|
11
12
|
private
|
|
12
13
|
|
|
@@ -46,6 +47,14 @@ module Tramway
|
|
|
46
47
|
'@import "tailwindcss";'
|
|
47
48
|
end
|
|
48
49
|
|
|
50
|
+
def importmap_path
|
|
51
|
+
@importmap_path ||= File.join(destination_root, 'config/importmap.rb')
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def importmap_multiselect_pin
|
|
55
|
+
'pin "@tramway/multiselect", to: "tramway/multiselect_controller.js"'
|
|
56
|
+
end
|
|
57
|
+
|
|
49
58
|
def agents_file_path
|
|
50
59
|
@agents_file_path ||= File.join(destination_root, 'AGENTS.md')
|
|
51
60
|
end
|
|
@@ -138,6 +147,7 @@ module Tramway
|
|
|
138
147
|
)
|
|
139
148
|
end
|
|
140
149
|
end
|
|
150
|
+
# rubocop:enable Metrics/ModuleLength
|
|
141
151
|
|
|
142
152
|
# Running `rails generate tramway:install` will invoke this generator
|
|
143
153
|
#
|
|
@@ -214,6 +224,18 @@ module Tramway
|
|
|
214
224
|
file.write("#{tailwind_css_import_line}\n")
|
|
215
225
|
end
|
|
216
226
|
end
|
|
227
|
+
|
|
228
|
+
def ensure_importmap_pin
|
|
229
|
+
return unless File.exist?(importmap_path)
|
|
230
|
+
|
|
231
|
+
content = File.read(importmap_path)
|
|
232
|
+
return if content.include?(importmap_multiselect_pin)
|
|
233
|
+
|
|
234
|
+
File.open(importmap_path, 'a') do |file|
|
|
235
|
+
file.write("\n") unless content.empty? || content.end_with?("\n")
|
|
236
|
+
file.write("#{importmap_multiselect_pin}\n")
|
|
237
|
+
end
|
|
238
|
+
end
|
|
217
239
|
end
|
|
218
240
|
end
|
|
219
241
|
end
|
|
@@ -69,8 +69,8 @@ module Tramway
|
|
|
69
69
|
color:
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
-
def tramway_title(text: nil, &)
|
|
73
|
-
component 'tailwinds/title', text:, &
|
|
72
|
+
def tramway_title(text: nil, **options, &)
|
|
73
|
+
component 'tailwinds/title', text:, options:, &
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
def tramway_flash(text:, type:, **options)
|
data/lib/tramway/version.rb
CHANGED