ariadne_view_components 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -6
- data/app/assets/config/manifest.js +2 -0
- data/app/assets/javascripts/ariadne_view_components.js +1 -1
- data/app/assets/javascripts/ariadne_view_components.js.map +1 -1
- data/app/assets/stylesheets/{application.tailwind.css → application.ariadne_view_components.css} +0 -0
- data/app/components/ariadne/ariadne.ts +5 -9
- data/app/components/ariadne/base_button.rb +1 -0
- data/app/components/ariadne/blankslate_component.html.erb +26 -0
- data/app/components/ariadne/blankslate_component.rb +151 -0
- data/app/components/ariadne/button_component.html.erb +1 -1
- data/app/components/ariadne/button_component.rb +4 -1
- data/app/components/ariadne/{clipboard_copy_component.ts → clipboard-copy-component.ts} +0 -0
- data/app/components/ariadne/clipboard_copy_component.rb +5 -3
- data/app/components/ariadne/component.rb +5 -1
- data/app/components/ariadne/container_component.html.erb +3 -0
- data/app/components/ariadne/container_component.rb +25 -0
- data/app/components/ariadne/flash_component.rb +8 -8
- data/app/components/ariadne/footer_component.html.erb +7 -0
- data/app/components/ariadne/footer_component.rb +23 -0
- data/app/components/ariadne/grid_component.html.erb +17 -0
- data/app/components/ariadne/grid_component.rb +55 -0
- data/app/components/ariadne/header_component.html.erb +29 -0
- data/app/components/ariadne/header_component.rb +114 -0
- data/app/components/ariadne/heading_component.rb +1 -1
- data/app/components/ariadne/heroicon_component.html.erb +4 -5
- data/app/components/ariadne/heroicon_component.rb +5 -3
- data/app/components/ariadne/image_component.rb +5 -3
- data/app/components/ariadne/inline_flex_component.html.erb +5 -0
- data/app/components/ariadne/inline_flex_component.rb +63 -0
- data/app/components/ariadne/link_component.rb +60 -0
- data/app/components/ariadne/list_component.html.erb +17 -0
- data/app/components/ariadne/list_component.rb +97 -0
- data/app/components/ariadne/pill_component.html.erb +3 -0
- data/app/components/ariadne/pill_component.rb +30 -0
- data/app/components/ariadne/slideover-component.ts +26 -0
- data/app/components/ariadne/slideover_component.html.erb +14 -0
- data/app/components/ariadne/slideover_component.rb +77 -0
- data/app/components/ariadne/time_ago_component.rb +56 -0
- data/app/components/ariadne/time_ago_component.ts +1 -0
- data/app/components/ariadne/timeline_component.html.erb +19 -0
- data/app/components/ariadne/timeline_component.rb +34 -0
- data/app/lib/ariadne/action_view_extensions/form_helper.rb +23 -0
- data/app/lib/ariadne/form_builder.rb +71 -0
- data/lib/ariadne/classify.rb +9 -1
- data/lib/ariadne/view_components/engine.rb +6 -0
- data/lib/ariadne/view_components/version.rb +1 -1
- data/lib/rubocop/cop/ariadne/ariadne_heroicon.rb +2 -2
- data/lib/tasks/docs.rake +48 -58
- data/static/arguments.yml +204 -7
- data/static/audited_at.json +14 -0
- data/static/classes.yml +157 -1
- data/static/constants.json +171 -10
- data/static/statuses.json +14 -0
- metadata +31 -5
- data/lib/tasks/tailwind.rake +0 -31
data/lib/ariadne/classify.rb
CHANGED
@@ -140,6 +140,9 @@ module Ariadne
|
|
140
140
|
TEXT_PREFIX = /^text-/.freeze
|
141
141
|
TEXT_PSEUDO_PREFIX = /^\S+:text-/.freeze
|
142
142
|
|
143
|
+
BORDER_STATE_PREFIX = /^border-state-/.freeze
|
144
|
+
BORDER_SIDE_PREFIX = /^border-.(?:-)?/.freeze
|
145
|
+
|
143
146
|
# TODO: TEST!
|
144
147
|
private def correct_classes(classes)
|
145
148
|
matched_bg = ""
|
@@ -169,6 +172,11 @@ module Ariadne
|
|
169
172
|
elsif class_name.match(BORDER_PREFIX)
|
170
173
|
next if matched_border.present?
|
171
174
|
|
175
|
+
if class_name.match(BORDER_STATE_PREFIX) || class_name.match(BORDER_SIDE_PREFIX)
|
176
|
+
memo << class_name
|
177
|
+
next
|
178
|
+
end
|
179
|
+
|
172
180
|
memo << matched_border = class_name
|
173
181
|
elsif class_name.match(BORDER_PSEUDO_PREFIX)
|
174
182
|
next if matched_border_pseudo.keys.any? { |m| m.start_with?(class_name.split(":").first) }
|
@@ -199,7 +207,7 @@ module Ariadne
|
|
199
207
|
else
|
200
208
|
memo << class_name
|
201
209
|
end
|
202
|
-
end.uniq
|
210
|
+
end.uniq.reverse
|
203
211
|
end
|
204
212
|
|
205
213
|
private def raise_on_invalid_options?
|
@@ -22,6 +22,12 @@ module Ariadne
|
|
22
22
|
app.config.assets.precompile += ["ariadne_view_components"] if app.config.respond_to?(:assets)
|
23
23
|
end
|
24
24
|
|
25
|
+
initializer "ariadne_view_components.importmap", before: "importmap" do |app|
|
26
|
+
if Rails.application.respond_to?(:importmap)
|
27
|
+
app.config.importmap.paths << Engine.root.join("config/importmap.rb")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
25
31
|
config.after_initialize do |app|
|
26
32
|
::Ariadne::Classify::Utilities.validate_class_names = app.config.ariadne_view_components.delete(:validate_class_names)
|
27
33
|
end
|
@@ -113,7 +113,7 @@ module RuboCop
|
|
113
113
|
if size.between?(10, 16)
|
114
114
|
""
|
115
115
|
elsif size.between?(22, 26)
|
116
|
-
":
|
116
|
+
":m"
|
117
117
|
else
|
118
118
|
size
|
119
119
|
end
|
@@ -209,7 +209,7 @@ module RuboCop
|
|
209
209
|
# No arguments if they map to the default size
|
210
210
|
return if size_attributes.blank? || size_attributes.values.all?(&:blank?)
|
211
211
|
# Return mapped argument to `size`
|
212
|
-
return "size: :
|
212
|
+
return "size: :m" if size_attributes.values.any?(":m")
|
213
213
|
|
214
214
|
size_attributes.map do |key, value|
|
215
215
|
"#{key}: #{value}"
|
data/lib/tasks/docs.rake
CHANGED
@@ -32,6 +32,12 @@ namespace :docs do
|
|
32
32
|
sleep
|
33
33
|
end
|
34
34
|
|
35
|
+
# for classes in hashes
|
36
|
+
CLASS_MAPPINGS = '(?:\\S+|:\\"[\\S-]+\\"): \\"([\\S -]+)\\"'
|
37
|
+
# for classes in constants
|
38
|
+
CLASS_CONSTANT = '[A-Z_]+ = \\"([\\S -]+)\\"'
|
39
|
+
CLASS_REGEX = Regexp.new("(?:#{CLASS_MAPPINGS}|#{CLASS_CONSTANT})")
|
40
|
+
|
35
41
|
desc "Generate the documentation."
|
36
42
|
task :build do
|
37
43
|
registry = generate_yard_registry
|
@@ -41,76 +47,33 @@ namespace :docs do
|
|
41
47
|
# Rails controller for rendering arbitrary ERB
|
42
48
|
view_context = ApplicationController.new.tap { |c| c.request = ActionDispatch::TestRequest.create }.view_context
|
43
49
|
components = [
|
44
|
-
|
50
|
+
Ariadne::BlankslateComponent,
|
45
51
|
Ariadne::BaseButton,
|
46
52
|
Ariadne::ButtonComponent,
|
47
|
-
|
48
|
-
# Ariadne::HellipButton,
|
49
|
-
# Ariadne::BorderBox::Header,
|
50
|
-
# Ariadne::IconButton,
|
51
|
-
# Ariadne::Beta::AutoComplete,
|
52
|
-
# Ariadne::Beta::AutoComplete::Item,
|
53
|
-
# Ariadne::Beta::Avatar,
|
54
|
-
# Ariadne::Beta::AvatarStack,
|
55
|
-
# Ariadne::Beta::Blankslate,
|
56
|
-
# Ariadne::BorderBoxComponent,
|
57
|
-
# Ariadne::BoxComponent,
|
58
|
-
# Ariadne::Beta::Breadcrumbs,
|
59
|
-
# Ariadne::ButtonGroup,
|
60
|
-
# Ariadne::Alpha::ButtonMarketing,
|
53
|
+
Ariadne::ContainerComponent,
|
61
54
|
Ariadne::ClipboardCopyComponent,
|
62
|
-
# Ariadne::CloseButton,
|
63
55
|
Ariadne::CounterComponent,
|
64
|
-
|
65
|
-
# Ariadne::Dropdown,
|
66
|
-
# Ariadne::DropdownMenuComponent,
|
56
|
+
Ariadne::GridComponent,
|
67
57
|
Ariadne::FlashComponent,
|
68
|
-
|
69
|
-
|
58
|
+
Ariadne::FooterComponent,
|
59
|
+
Ariadne::HeaderComponent,
|
70
60
|
Ariadne::HeadingComponent,
|
71
|
-
# Ariadne::HiddenTextExpander,
|
72
|
-
# Ariadne::LabelComponent,
|
73
|
-
# Ariadne::LayoutComponent,
|
74
|
-
# Ariadne::LinkComponent,
|
75
|
-
# Ariadne::Markdown,
|
76
|
-
# Ariadne::MenuComponent,
|
77
|
-
# Ariadne::Navigation::TabComponent,
|
78
61
|
Ariadne::HeroiconComponent,
|
79
|
-
# Ariadne::LocalTime,
|
80
62
|
Ariadne::ImageComponent,
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
# Ariadne::SubheadComponent,
|
87
|
-
# Ariadne::TabContainerComponent,
|
63
|
+
Ariadne::InlineFlexComponent,
|
64
|
+
Ariadne::LinkComponent,
|
65
|
+
Ariadne::ListComponent,
|
66
|
+
Ariadne::PillComponent,
|
67
|
+
Ariadne::SlideoverComponent,
|
88
68
|
Ariadne::Text,
|
89
|
-
|
90
|
-
|
91
|
-
# Ariadne::TooltipComponent,
|
92
|
-
# Ariadne::Truncate,
|
93
|
-
# Ariadne::Beta::Truncate,
|
94
|
-
# Ariadne::Alpha::UnderlineNav,
|
95
|
-
# Ariadne::Alpha::UnderlinePanels,
|
96
|
-
# Ariadne::Alpha::TabNav,
|
97
|
-
# Ariadne::Alpha::TabPanels,
|
69
|
+
Ariadne::TimeAgoComponent,
|
70
|
+
Ariadne::TimelineComponent,
|
98
71
|
Ariadne::TooltipComponent,
|
99
72
|
]
|
100
73
|
|
101
74
|
js_components = [
|
102
|
-
# Ariadne::Dropdown,
|
103
|
-
# Ariadne::LocalTime,
|
104
|
-
# Ariadne::ImageCrop,
|
105
|
-
# Ariadne::Beta::AutoComplete,
|
106
75
|
Ariadne::ClipboardCopyComponent,
|
107
|
-
|
108
|
-
# Ariadne::TimeAgoComponent,
|
109
|
-
# Ariadne::Alpha::UnderlinePanels,
|
110
|
-
# Ariadne::Alpha::TabPanels,
|
111
|
-
# Ariadne::TooltipComponent,
|
112
|
-
# Ariadne::ButtonComponent,
|
113
|
-
# Ariadne::LinkComponent,
|
76
|
+
Ariadne::TimeAgoComponent,
|
114
77
|
]
|
115
78
|
|
116
79
|
all_components = Ariadne::Component.descendants - [Ariadne::BaseComponent, Ariadne::Content] # TODO: why is `Ariadne::Content` not picked up?
|
@@ -263,7 +226,7 @@ namespace :docs do
|
|
263
226
|
f.puts
|
264
227
|
html = view_context.render(inline: code)
|
265
228
|
html.scan(/class="([^"]*)"/) do |classnames|
|
266
|
-
classes_found_in_examples.concat(classnames[0].split.reject { |c| c.starts_with?("heroicon", "js"
|
229
|
+
classes_found_in_examples.concat(classnames[0].split.reject { |c| c.starts_with?("heroicon", "js") }.map { ".#{_1}" })
|
267
230
|
end
|
268
231
|
f.puts("<Example src=\"#{html.tr('"', "\'").delete("\n")}\" />")
|
269
232
|
f.puts
|
@@ -286,8 +249,35 @@ namespace :docs do
|
|
286
249
|
raise
|
287
250
|
end
|
288
251
|
|
252
|
+
additional_classes = []
|
253
|
+
|
254
|
+
tailwind_utility_prefixes = ["bg-", "border-", "fill-", "stroke-", "text-"]
|
255
|
+
|
256
|
+
additional_color_classes = [
|
257
|
+
"billy-purple",
|
258
|
+
"state-closed",
|
259
|
+
"state-open",
|
260
|
+
]
|
261
|
+
|
262
|
+
additional_color_classes.each do |color_class|
|
263
|
+
tailwind_utility_prefixes.each do |prefix|
|
264
|
+
additional_classes.concat([".#{prefix}#{color_class}"])
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
Dir.glob("./app/components/**/*.rb") do |rb_filename|
|
269
|
+
content = File.read(rb_filename)
|
270
|
+
matches = content.scan(CLASS_REGEX)
|
271
|
+
|
272
|
+
if matches.present?
|
273
|
+
result = matches.flatten.compact.map { |c| c.split(" ") }.flatten.select { |r| r =~ /\A[0-9a-z:\-]+\z/ }.uniq
|
274
|
+
additional_classes.concat(result.map { |r| ".#{r}" }) if result.present?
|
275
|
+
end
|
276
|
+
end
|
277
|
+
|
278
|
+
final_list_of_classes = classes_found_in_examples.concat(additional_classes).uniq.sort
|
289
279
|
File.open("static/classes.yml", "w") do |f|
|
290
|
-
f.puts YAML.dump(
|
280
|
+
f.puts YAML.dump(final_list_of_classes)
|
291
281
|
end
|
292
282
|
|
293
283
|
File.open("static/arguments.yml", "w") do |f|
|
data/static/arguments.yml
CHANGED
@@ -22,6 +22,21 @@
|
|
22
22
|
type: Hash
|
23
23
|
default: "`{}`"
|
24
24
|
description: "[Classes and attributes](/classes-attributes)"
|
25
|
+
- component: Blankslate
|
26
|
+
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/blankslate_component.rb
|
27
|
+
parameters:
|
28
|
+
- name: tag
|
29
|
+
type: Symbol, String
|
30
|
+
default: "`:div`"
|
31
|
+
description: The rendered tag name
|
32
|
+
- name: classes
|
33
|
+
type: String
|
34
|
+
default: '`""`'
|
35
|
+
description: "[Classes and attributes](/classes-attributes)"
|
36
|
+
- name: attributes
|
37
|
+
type: Hash
|
38
|
+
default: "`{}`"
|
39
|
+
description: "[Classes and attributes](/classes-attributes)"
|
25
40
|
- component: Button
|
26
41
|
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/button_component.rb
|
27
42
|
parameters:
|
@@ -29,6 +44,10 @@
|
|
29
44
|
type: Symbol
|
30
45
|
default: "`:button`"
|
31
46
|
description: One of `:a`, `:button`, or `:summary`.
|
47
|
+
- name: type
|
48
|
+
type: Symbol
|
49
|
+
default: "`:button`"
|
50
|
+
description: One of `:button`, `:reset`, or `:submit`.
|
32
51
|
- name: scheme
|
33
52
|
type: Symbol
|
34
53
|
default: "`:default`"
|
@@ -39,7 +58,7 @@
|
|
39
58
|
description: One of `:l`, `:m`, `:s`, `:xl`, or `:xs`.
|
40
59
|
- name: type
|
41
60
|
type: Symbol
|
42
|
-
default:
|
61
|
+
default: "`:button`"
|
43
62
|
description: One of `:button`, `:reset`, or `:submit`.
|
44
63
|
- name: classes
|
45
64
|
type: String
|
@@ -73,6 +92,17 @@
|
|
73
92
|
type: Hash
|
74
93
|
default: "`{}`"
|
75
94
|
description: "[Classes and attributes](/classes-attributes)"
|
95
|
+
- component: Container
|
96
|
+
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/container_component.rb
|
97
|
+
parameters:
|
98
|
+
- name: classes
|
99
|
+
type: String
|
100
|
+
default: '`""`'
|
101
|
+
description: "[Classes and attributes](/classes-attributes)"
|
102
|
+
- name: attributes
|
103
|
+
type: Hash
|
104
|
+
default: "`{}`"
|
105
|
+
description: "[Classes and attributes](/classes-attributes)"
|
76
106
|
- component: Counter
|
77
107
|
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/counter_component.rb
|
78
108
|
parameters:
|
@@ -137,6 +167,39 @@
|
|
137
167
|
type: Hash
|
138
168
|
default: "`{}`"
|
139
169
|
description: "[Classes and attributes](/classes-attributes)"
|
170
|
+
- component: Footer
|
171
|
+
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/footer_component.rb
|
172
|
+
parameters:
|
173
|
+
- name: classes
|
174
|
+
type: String
|
175
|
+
default: '`""`'
|
176
|
+
description: "[Classes and attributes](/classes-attributes)"
|
177
|
+
- name: attributes
|
178
|
+
type: Hash
|
179
|
+
default: "`{}`"
|
180
|
+
description: "[Classes and attributes](/classes-attributes)"
|
181
|
+
- component: Grid
|
182
|
+
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/grid_component.rb
|
183
|
+
parameters:
|
184
|
+
- name: classes
|
185
|
+
type: String
|
186
|
+
default: '`""`'
|
187
|
+
description: "[Classes and attributes](/classes-attributes)"
|
188
|
+
- name: attributes
|
189
|
+
type: Hash
|
190
|
+
default: "`{}`"
|
191
|
+
description: "[Classes and attributes](/classes-attributes)"
|
192
|
+
- component: Header
|
193
|
+
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/header_component.rb
|
194
|
+
parameters:
|
195
|
+
- name: classes
|
196
|
+
type: String
|
197
|
+
default: '`""`'
|
198
|
+
description: "[Classes and attributes](/classes-attributes)"
|
199
|
+
- name: attributes
|
200
|
+
type: Hash
|
201
|
+
default: "`{}`"
|
202
|
+
description: "[Classes and attributes](/classes-attributes)"
|
140
203
|
- component: Heading
|
141
204
|
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/heading_component.rb
|
142
205
|
parameters:
|
@@ -173,8 +236,8 @@
|
|
173
236
|
description: One of `outline` and `solid`.
|
174
237
|
- name: size
|
175
238
|
type: Symbol
|
176
|
-
default: "`:
|
177
|
-
description: One of `:
|
239
|
+
default: "`:s`"
|
240
|
+
description: One of `:s` (`16`) and `:m` (`24`).
|
178
241
|
- name: attributes
|
179
242
|
type: Hash
|
180
243
|
default: "`{}`"
|
@@ -186,10 +249,6 @@
|
|
186
249
|
type: Symbol, String
|
187
250
|
default: "`:img`"
|
188
251
|
description: The rendered tag name
|
189
|
-
- name: classes
|
190
|
-
type: String
|
191
|
-
default: '`""`'
|
192
|
-
description: "[Classes and attributes](/classes-attributes)"
|
193
252
|
- name: src
|
194
253
|
type: String
|
195
254
|
default: N/A
|
@@ -202,6 +261,105 @@
|
|
202
261
|
type: Boolean
|
203
262
|
default: "`false`"
|
204
263
|
description: Whether or not to lazily load the image.
|
264
|
+
- name: classes
|
265
|
+
type: String
|
266
|
+
default: '`""`'
|
267
|
+
description: "[Classes and attributes](/classes-attributes)"
|
268
|
+
- name: attributes
|
269
|
+
type: Hash
|
270
|
+
default: "`{}`"
|
271
|
+
description: "[Classes and attributes](/classes-attributes)"
|
272
|
+
- component: InlineFlex
|
273
|
+
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/inline_flex_component.rb
|
274
|
+
parameters:
|
275
|
+
- name: tag
|
276
|
+
type: Symbol, String
|
277
|
+
default: "`:span`"
|
278
|
+
description: The rendered tag name
|
279
|
+
- name: classes
|
280
|
+
type: String
|
281
|
+
default: '`""`'
|
282
|
+
description: "[Classes and attributes](/classes-attributes)"
|
283
|
+
- name: attributes
|
284
|
+
type: Hash
|
285
|
+
default: "`{}`"
|
286
|
+
description: "[Classes and attributes](/classes-attributes)"
|
287
|
+
- component: Link
|
288
|
+
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/link_component.rb
|
289
|
+
parameters:
|
290
|
+
- name: tag
|
291
|
+
type: String
|
292
|
+
default: "`:a`"
|
293
|
+
description: One of `:a` and `:span`.
|
294
|
+
- name: href
|
295
|
+
type: String
|
296
|
+
default: N/A
|
297
|
+
description: URL to be used for the link.
|
298
|
+
- name: classes
|
299
|
+
type: String
|
300
|
+
default: '`""`'
|
301
|
+
description: "[Classes and attributes](/classes-attributes)"
|
302
|
+
- name: attributes
|
303
|
+
type: Hash
|
304
|
+
default: "`{}`"
|
305
|
+
description: "[Classes and attributes](/classes-attributes)"
|
306
|
+
- component: List
|
307
|
+
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/list_component.rb
|
308
|
+
parameters:
|
309
|
+
- name: classes
|
310
|
+
type: String
|
311
|
+
default: '`""`'
|
312
|
+
description: "[Classes and attributes](/classes-attributes)"
|
313
|
+
- name: attributes
|
314
|
+
type: Hash
|
315
|
+
default: "`{}`"
|
316
|
+
description: "[Classes and attributes](/classes-attributes)"
|
317
|
+
- component: Pill
|
318
|
+
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/pill_component.rb
|
319
|
+
parameters:
|
320
|
+
- name: tag
|
321
|
+
type: Symbol, String
|
322
|
+
default: "`:span`"
|
323
|
+
description: The rendered tag name.
|
324
|
+
- name: color
|
325
|
+
type: String
|
326
|
+
default: N/A
|
327
|
+
description: The hex color of the pill.
|
328
|
+
- name: classes
|
329
|
+
type: String
|
330
|
+
default: '`""`'
|
331
|
+
description: "[Classes and attributes](/classes-attributes)"
|
332
|
+
- name: attributes
|
333
|
+
type: Hash
|
334
|
+
default: "`{}`"
|
335
|
+
description: "[Classes and attributes](/classes-attributes)"
|
336
|
+
- component: Slideover
|
337
|
+
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/slideover_component.rb
|
338
|
+
parameters:
|
339
|
+
- name: tag
|
340
|
+
type: Symbol, String
|
341
|
+
default: "`:div`"
|
342
|
+
description: The rendered tag name.
|
343
|
+
- name: direction
|
344
|
+
type: Symbol
|
345
|
+
default: N/A
|
346
|
+
description: One of `:x` and `:y`.
|
347
|
+
- name: form_id
|
348
|
+
type: String
|
349
|
+
default: "`nil`"
|
350
|
+
description: The ID of any <form> tag to submit when the button is clicked.
|
351
|
+
- name: open_text
|
352
|
+
type: String
|
353
|
+
default: '`"Open"`'
|
354
|
+
description: The text to use to open the slideover.
|
355
|
+
- name: close_text
|
356
|
+
type: String
|
357
|
+
default: '`"Close"`'
|
358
|
+
description: The text to use to close the slideover.
|
359
|
+
- name: classes
|
360
|
+
type: String
|
361
|
+
default: '`""`'
|
362
|
+
description: "[Classes and attributes](/classes-attributes)"
|
205
363
|
- name: attributes
|
206
364
|
type: Hash
|
207
365
|
default: "`{}`"
|
@@ -221,6 +379,45 @@
|
|
221
379
|
type: Hash
|
222
380
|
default: "`{}`"
|
223
381
|
description: "[Classes and attributes](/classes-attributes)"
|
382
|
+
- component: TimeAgo
|
383
|
+
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/time_ago_component.rb
|
384
|
+
parameters:
|
385
|
+
- name: tag
|
386
|
+
type: Symbol, String
|
387
|
+
default: "`:time-ago`"
|
388
|
+
description: The rendered tag name.
|
389
|
+
- name: time
|
390
|
+
type: Time
|
391
|
+
default: N/A
|
392
|
+
description: The time to be formatted
|
393
|
+
- name: micro
|
394
|
+
type: Boolean
|
395
|
+
default: "`false`"
|
396
|
+
description: If true then the text will be formatted in "micro" mode, using as
|
397
|
+
few characters as possible
|
398
|
+
- name: classes
|
399
|
+
type: String
|
400
|
+
default: '`""`'
|
401
|
+
description: "<%= link_to_classes_docs %>"
|
402
|
+
- name: attributes
|
403
|
+
type: Hash
|
404
|
+
default: "`{}`"
|
405
|
+
description: "[Classes and attributes](/classes-attributes)"
|
406
|
+
- component: Timeline
|
407
|
+
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/timeline_component.rb
|
408
|
+
parameters:
|
409
|
+
- name: tag
|
410
|
+
type: Symbol, String
|
411
|
+
default: "`:div`"
|
412
|
+
description: The rendered tag name
|
413
|
+
- name: classes
|
414
|
+
type: String
|
415
|
+
default: '`""`'
|
416
|
+
description: "[Classes and attributes](/classes-attributes)"
|
417
|
+
- name: attributes
|
418
|
+
type: Hash
|
419
|
+
default: "`{}`"
|
420
|
+
description: "[Classes and attributes](/classes-attributes)"
|
224
421
|
- component: Tooltip
|
225
422
|
source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/tooltip_component.rb
|
226
423
|
parameters:
|
data/static/audited_at.json
CHANGED
@@ -1,14 +1,28 @@
|
|
1
1
|
{
|
2
2
|
"Ariadne::BaseButton": "",
|
3
3
|
"Ariadne::BaseComponent": "",
|
4
|
+
"Ariadne::BlankslateComponent": "",
|
4
5
|
"Ariadne::ButtonComponent": "",
|
5
6
|
"Ariadne::ClipboardCopyComponent": "",
|
7
|
+
"Ariadne::ContainerComponent": "",
|
6
8
|
"Ariadne::Content": "",
|
7
9
|
"Ariadne::CounterComponent": "",
|
8
10
|
"Ariadne::FlashComponent": "",
|
11
|
+
"Ariadne::FooterComponent": "",
|
12
|
+
"Ariadne::GridComponent": "",
|
13
|
+
"Ariadne::GridComponent::Item": "",
|
14
|
+
"Ariadne::HeaderComponent": "",
|
9
15
|
"Ariadne::HeadingComponent": "",
|
10
16
|
"Ariadne::HeroiconComponent": "",
|
11
17
|
"Ariadne::ImageComponent": "",
|
18
|
+
"Ariadne::InlineFlexComponent": "",
|
19
|
+
"Ariadne::LinkComponent": "",
|
20
|
+
"Ariadne::ListComponent": "",
|
21
|
+
"Ariadne::ListComponent::Item": "",
|
22
|
+
"Ariadne::PillComponent": "",
|
23
|
+
"Ariadne::SlideoverComponent": "",
|
12
24
|
"Ariadne::Text": "",
|
25
|
+
"Ariadne::TimeAgoComponent": "",
|
26
|
+
"Ariadne::TimelineComponent": "",
|
13
27
|
"Ariadne::TooltipComponent": ""
|
14
28
|
}
|