rails-active-ui 0.3.3 → 0.3.5
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/components/input_component.rb +1 -0
- data/app/controllers/ui/examples_controller.rb +7 -0
- data/app/views/ui/examples/_behaviors.html.ruby +65 -0
- data/app/views/ui/examples/_collections.html.ruby +303 -0
- data/app/views/ui/examples/_elements.html.ruby +587 -0
- data/app/views/ui/examples/_globals.html.ruby +36 -0
- data/app/views/ui/examples/_layout_primitives.html.ruby +180 -0
- data/app/views/ui/examples/_modules_components.html.ruby +666 -0
- data/app/views/ui/examples/_views_components.html.ruby +301 -0
- data/app/views/ui/examples/index.html.ruby +61 -0
- data/config/routes.rb +2 -1
- data/lib/ui/version.rb +1 -1
- data/lib/ui/version.rb.erb +3 -0
- metadata +11 -1
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
# ------------------------------------------------------------------
|
|
2
|
+
# Ad
|
|
3
|
+
# ------------------------------------------------------------------
|
|
4
|
+
Header(size: :h3) { text "Ad" }
|
|
5
|
+
text "An advertisement placeholder with standard ad unit sizes."
|
|
6
|
+
|
|
7
|
+
Segment {
|
|
8
|
+
Ad(unit: "banner", test: "Banner Ad")
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
Segment(secondary: true) {
|
|
12
|
+
concat tag.pre { tag.code(
|
|
13
|
+
'Ad(unit: "banner", test: "Banner Ad")'
|
|
14
|
+
)}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
Divider(hidden: true)
|
|
18
|
+
|
|
19
|
+
# ------------------------------------------------------------------
|
|
20
|
+
# Card
|
|
21
|
+
# ------------------------------------------------------------------
|
|
22
|
+
Header(size: :h3) { text "Card" }
|
|
23
|
+
text "A card displays content with image, header, description, and extra sections."
|
|
24
|
+
|
|
25
|
+
Segment {
|
|
26
|
+
HStack(spacing: 16) {
|
|
27
|
+
Card { |c|
|
|
28
|
+
c.image {
|
|
29
|
+
Image(src: "https://fomantic-ui.com/images/avatar/large/elliot.jpg", fluid: true)
|
|
30
|
+
}
|
|
31
|
+
c.header { text "Elliot Fu" }
|
|
32
|
+
c.meta { text "Friend" }
|
|
33
|
+
c.description { text "Elliot is a sound engineer living in Nashville who enjoys playing guitar." }
|
|
34
|
+
c.extra {
|
|
35
|
+
Icon(name: "user")
|
|
36
|
+
text "22 Friends"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
Card(raised: true, color: :blue) { |c|
|
|
41
|
+
c.header { text "Project Alpha" }
|
|
42
|
+
c.meta { text "Started Jan 2025" }
|
|
43
|
+
c.description { text "A revolutionary new approach to distributed computing." }
|
|
44
|
+
c.extra {
|
|
45
|
+
HStack(spacing: 8) {
|
|
46
|
+
Label(color: :blue, size: :mini) { text "Active" }
|
|
47
|
+
Label(basic: true, size: :mini) { text "v2.1" }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
Segment(secondary: true) {
|
|
55
|
+
concat tag.pre { tag.code(
|
|
56
|
+
'Card { |c|
|
|
57
|
+
c.image {
|
|
58
|
+
Image(src: "https://fomantic-ui.com/images/avatar/large/elliot.jpg", fluid: true)
|
|
59
|
+
}
|
|
60
|
+
c.header { text "Elliot Fu" }
|
|
61
|
+
c.meta { text "Friend" }
|
|
62
|
+
c.description { text "Elliot is a sound engineer living in Nashville." }
|
|
63
|
+
c.extra {
|
|
64
|
+
Icon(name: "user")
|
|
65
|
+
text "22 Friends"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
Card(raised: true, color: :blue) { |c|
|
|
70
|
+
c.header { text "Project Alpha" }
|
|
71
|
+
c.meta { text "Started Jan 2025" }
|
|
72
|
+
c.description { text "A revolutionary new approach to distributed computing." }
|
|
73
|
+
c.extra {
|
|
74
|
+
Label(color: :blue, size: :mini) { text "Active" }
|
|
75
|
+
}
|
|
76
|
+
}'
|
|
77
|
+
)}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
Divider(hidden: true)
|
|
81
|
+
|
|
82
|
+
# ------------------------------------------------------------------
|
|
83
|
+
# Comment
|
|
84
|
+
# ------------------------------------------------------------------
|
|
85
|
+
Header(size: :h3) { text "Comment" }
|
|
86
|
+
text "A comment displays user-generated content with avatar, author, and actions."
|
|
87
|
+
|
|
88
|
+
Segment {
|
|
89
|
+
concat tag.div(class: "ui comments") {
|
|
90
|
+
capture {
|
|
91
|
+
Comment { |c|
|
|
92
|
+
c.avatar {
|
|
93
|
+
Image(src: "https://fomantic-ui.com/images/avatar/small/matt.jpg")
|
|
94
|
+
}
|
|
95
|
+
c.author { text "Matt" }
|
|
96
|
+
c.metadata { text "Today at 5:42PM" }
|
|
97
|
+
c.text_slot { text "How artistic!" }
|
|
98
|
+
c.actions {
|
|
99
|
+
concat tag.a(class: "reply", href: "#") { "Reply" }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
Comment { |c|
|
|
104
|
+
c.avatar {
|
|
105
|
+
Image(src: "https://fomantic-ui.com/images/avatar/small/elliot.jpg")
|
|
106
|
+
}
|
|
107
|
+
c.author { text "Elliot Fu" }
|
|
108
|
+
c.metadata { text "Yesterday at 12:30AM" }
|
|
109
|
+
c.text_slot { text "This has been very useful for my research. Thanks!" }
|
|
110
|
+
c.actions {
|
|
111
|
+
concat tag.a(class: "reply", href: "#") { "Reply" }
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
Segment(secondary: true) {
|
|
119
|
+
concat tag.pre { tag.code(
|
|
120
|
+
'Comment { |c|
|
|
121
|
+
c.avatar {
|
|
122
|
+
Image(src: "https://fomantic-ui.com/images/avatar/small/matt.jpg")
|
|
123
|
+
}
|
|
124
|
+
c.author { text "Matt" }
|
|
125
|
+
c.metadata { text "Today at 5:42PM" }
|
|
126
|
+
c.text_slot { text "How artistic!" }
|
|
127
|
+
c.actions {
|
|
128
|
+
concat tag.a(class: "reply", href: "#") { "Reply" }
|
|
129
|
+
}
|
|
130
|
+
}'
|
|
131
|
+
)}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
Divider(hidden: true)
|
|
135
|
+
|
|
136
|
+
# ------------------------------------------------------------------
|
|
137
|
+
# Feed
|
|
138
|
+
# ------------------------------------------------------------------
|
|
139
|
+
Header(size: :h3) { text "Feed" }
|
|
140
|
+
text "A feed displays a timeline of user activity events."
|
|
141
|
+
|
|
142
|
+
Segment {
|
|
143
|
+
Feed(size: :large) {
|
|
144
|
+
concat tag.div(class: "event") {
|
|
145
|
+
safe_join([
|
|
146
|
+
tag.div(class: "label") {
|
|
147
|
+
tag.img(src: "https://fomantic-ui.com/images/avatar/small/elliot.jpg")
|
|
148
|
+
},
|
|
149
|
+
tag.div(class: "content") {
|
|
150
|
+
safe_join([
|
|
151
|
+
tag.div(class: "summary") {
|
|
152
|
+
safe_join([
|
|
153
|
+
tag.a("Elliot Fu", href: "#"),
|
|
154
|
+
" added you as a friend",
|
|
155
|
+
tag.div(class: "date") { "1 Hour Ago" }
|
|
156
|
+
])
|
|
157
|
+
}
|
|
158
|
+
])
|
|
159
|
+
}
|
|
160
|
+
])
|
|
161
|
+
}
|
|
162
|
+
concat tag.div(class: "event") {
|
|
163
|
+
safe_join([
|
|
164
|
+
tag.div(class: "label") {
|
|
165
|
+
tag.i(class: "pencil icon")
|
|
166
|
+
},
|
|
167
|
+
tag.div(class: "content") {
|
|
168
|
+
safe_join([
|
|
169
|
+
tag.div(class: "summary") { "You submitted a new post" },
|
|
170
|
+
tag.div(class: "extra text") { "My first blog post about components!" }
|
|
171
|
+
])
|
|
172
|
+
}
|
|
173
|
+
])
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
Segment(secondary: true) {
|
|
179
|
+
concat tag.pre { tag.code(
|
|
180
|
+
'Feed(size: :large) {
|
|
181
|
+
concat tag.div(class: "event") {
|
|
182
|
+
safe_join([
|
|
183
|
+
tag.div(class: "label") {
|
|
184
|
+
tag.img(src: ".../avatar/small/elliot.jpg")
|
|
185
|
+
},
|
|
186
|
+
tag.div(class: "content") {
|
|
187
|
+
tag.div(class: "summary") {
|
|
188
|
+
safe_join([tag.a("Elliot Fu", href: "#"), " added you as a friend"])
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
])
|
|
192
|
+
}
|
|
193
|
+
}'
|
|
194
|
+
)}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
Divider(hidden: true)
|
|
198
|
+
|
|
199
|
+
# ------------------------------------------------------------------
|
|
200
|
+
# Item / ItemGroup
|
|
201
|
+
# ------------------------------------------------------------------
|
|
202
|
+
Header(size: :h3) { text "Item / ItemGroup" }
|
|
203
|
+
text "Items present related content with image, header, description, and metadata."
|
|
204
|
+
|
|
205
|
+
Segment {
|
|
206
|
+
ItemGroup(divided: true, relaxed: true) {
|
|
207
|
+
Item { |c|
|
|
208
|
+
c.image {
|
|
209
|
+
Image(src: "https://fomantic-ui.com/images/wireframe/image.png", size: :tiny)
|
|
210
|
+
}
|
|
211
|
+
c.header { text "Project Report" }
|
|
212
|
+
c.meta { text "Last updated 3 days ago" }
|
|
213
|
+
c.description { text "A detailed quarterly report for the engineering team." }
|
|
214
|
+
c.extra {
|
|
215
|
+
Label(color: :green, size: :mini) { text "Published" }
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
Item { |c|
|
|
220
|
+
c.image {
|
|
221
|
+
Image(src: "https://fomantic-ui.com/images/wireframe/image.png", size: :tiny)
|
|
222
|
+
}
|
|
223
|
+
c.header { text "Design System" }
|
|
224
|
+
c.meta { text "Created 1 week ago" }
|
|
225
|
+
c.description { text "Component library documentation and usage guidelines." }
|
|
226
|
+
c.extra {
|
|
227
|
+
Label(color: :blue, size: :mini) { text "Draft" }
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
Segment(secondary: true) {
|
|
234
|
+
concat tag.pre { tag.code(
|
|
235
|
+
'ItemGroup(divided: true, relaxed: true) {
|
|
236
|
+
Item { |c|
|
|
237
|
+
c.image {
|
|
238
|
+
Image(src: ".../wireframe/image.png", size: :tiny)
|
|
239
|
+
}
|
|
240
|
+
c.header { text "Project Report" }
|
|
241
|
+
c.meta { text "Last updated 3 days ago" }
|
|
242
|
+
c.description { text "A detailed quarterly report." }
|
|
243
|
+
c.extra {
|
|
244
|
+
Label(color: :green, size: :mini) { text "Published" }
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}'
|
|
248
|
+
)}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
Divider(hidden: true)
|
|
252
|
+
|
|
253
|
+
# ------------------------------------------------------------------
|
|
254
|
+
# Statistic
|
|
255
|
+
# ------------------------------------------------------------------
|
|
256
|
+
Header(size: :h3) { text "Statistic" }
|
|
257
|
+
text "A statistic displays a value with a label."
|
|
258
|
+
|
|
259
|
+
Segment {
|
|
260
|
+
HStack(spacing: 24) {
|
|
261
|
+
Statistic { |c|
|
|
262
|
+
c.value { text "5,550" }
|
|
263
|
+
c.label { text "Downloads" }
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
Statistic(color: :blue) { |c|
|
|
267
|
+
c.value {
|
|
268
|
+
Icon(name: "world")
|
|
269
|
+
text "22"
|
|
270
|
+
}
|
|
271
|
+
c.label { text "Countries" }
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
Statistic(horizontal: true, color: :green) { |c|
|
|
275
|
+
c.value { text "89%" }
|
|
276
|
+
c.label { text "Uptime" }
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
Segment(secondary: true) {
|
|
282
|
+
concat tag.pre { tag.code(
|
|
283
|
+
'Statistic { |c|
|
|
284
|
+
c.value { text "5,550" }
|
|
285
|
+
c.label { text "Downloads" }
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
Statistic(color: :blue) { |c|
|
|
289
|
+
c.value {
|
|
290
|
+
Icon(name: "world")
|
|
291
|
+
text "22"
|
|
292
|
+
}
|
|
293
|
+
c.label { text "Countries" }
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
Statistic(horizontal: true, color: :green) { |c|
|
|
297
|
+
c.value { text "89%" }
|
|
298
|
+
c.label { text "Uptime" }
|
|
299
|
+
}'
|
|
300
|
+
)}
|
|
301
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Header(size: :h1, icon: "puzzle piece") { text "Component Examples" }
|
|
2
|
+
|
|
3
|
+
text "A comprehensive showcase of every rails-active-ui component with live examples and code snippets."
|
|
4
|
+
|
|
5
|
+
Divider(section: true)
|
|
6
|
+
|
|
7
|
+
# Table of contents
|
|
8
|
+
Segment(raised: true) {
|
|
9
|
+
Header(size: :h3, icon: "list") { text "Categories" }
|
|
10
|
+
List(bulleted: true, size: "large") {
|
|
11
|
+
concat tag.div(class: "item") { tag.a("Layout Primitives", href: "#layout-primitives") }
|
|
12
|
+
concat tag.div(class: "item") { tag.a("Globals", href: "#globals") }
|
|
13
|
+
concat tag.div(class: "item") { tag.a("Elements", href: "#elements") }
|
|
14
|
+
concat tag.div(class: "item") { tag.a("Collections", href: "#collections") }
|
|
15
|
+
concat tag.div(class: "item") { tag.a("Views", href: "#views") }
|
|
16
|
+
concat tag.div(class: "item") { tag.a("Modules", href: "#modules") }
|
|
17
|
+
concat tag.div(class: "item") { tag.a("Behaviors", href: "#behaviors") }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
Divider(section: true)
|
|
22
|
+
|
|
23
|
+
concat tag.div(id: "layout-primitives") { "" }
|
|
24
|
+
Header(size: :h2, dividing: true, icon: "columns") { text "Layout Primitives" }
|
|
25
|
+
output_buffer << render("ui/examples/layout_primitives")
|
|
26
|
+
|
|
27
|
+
Divider(section: true)
|
|
28
|
+
|
|
29
|
+
concat tag.div(id: "globals") { "" }
|
|
30
|
+
Header(size: :h2, dividing: true, icon: "globe") { text "Globals" }
|
|
31
|
+
output_buffer << render("ui/examples/globals")
|
|
32
|
+
|
|
33
|
+
Divider(section: true)
|
|
34
|
+
|
|
35
|
+
concat tag.div(id: "elements") { "" }
|
|
36
|
+
Header(size: :h2, dividing: true, icon: "cube") { text "Elements" }
|
|
37
|
+
output_buffer << render("ui/examples/elements")
|
|
38
|
+
|
|
39
|
+
Divider(section: true)
|
|
40
|
+
|
|
41
|
+
concat tag.div(id: "collections") { "" }
|
|
42
|
+
Header(size: :h2, dividing: true, icon: "th") { text "Collections" }
|
|
43
|
+
output_buffer << render("ui/examples/collections")
|
|
44
|
+
|
|
45
|
+
Divider(section: true)
|
|
46
|
+
|
|
47
|
+
concat tag.div(id: "views") { "" }
|
|
48
|
+
Header(size: :h2, dividing: true, icon: "eye") { text "Views" }
|
|
49
|
+
output_buffer << render("ui/examples/views_components")
|
|
50
|
+
|
|
51
|
+
Divider(section: true)
|
|
52
|
+
|
|
53
|
+
concat tag.div(id: "modules") { "" }
|
|
54
|
+
Header(size: :h2, dividing: true, icon: "plug") { text "Modules" }
|
|
55
|
+
output_buffer << render("ui/examples/modules_components")
|
|
56
|
+
|
|
57
|
+
Divider(section: true)
|
|
58
|
+
|
|
59
|
+
concat tag.div(id: "behaviors") { "" }
|
|
60
|
+
Header(size: :h2, dividing: true, icon: "cogs") { text "Behaviors" }
|
|
61
|
+
output_buffer << render("ui/examples/behaviors")
|
data/config/routes.rb
CHANGED
data/lib/ui/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails-active-ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- nathan
|
|
@@ -122,6 +122,7 @@ files:
|
|
|
122
122
|
- app/components/v_stack_component.rb
|
|
123
123
|
- app/components/visibility_component.rb
|
|
124
124
|
- app/components/wrapper_component.rb
|
|
125
|
+
- app/controllers/ui/examples_controller.rb
|
|
125
126
|
- app/helpers/component_helper.rb
|
|
126
127
|
- app/helpers/fui_helper.rb
|
|
127
128
|
- app/javascript/accordion.js
|
|
@@ -209,6 +210,14 @@ files:
|
|
|
209
210
|
- app/javascript/visibility.js
|
|
210
211
|
- app/javascript/visibility.min.js
|
|
211
212
|
- app/lib/component.rb
|
|
213
|
+
- app/views/ui/examples/_behaviors.html.ruby
|
|
214
|
+
- app/views/ui/examples/_collections.html.ruby
|
|
215
|
+
- app/views/ui/examples/_elements.html.ruby
|
|
216
|
+
- app/views/ui/examples/_globals.html.ruby
|
|
217
|
+
- app/views/ui/examples/_layout_primitives.html.ruby
|
|
218
|
+
- app/views/ui/examples/_modules_components.html.ruby
|
|
219
|
+
- app/views/ui/examples/_views_components.html.ruby
|
|
220
|
+
- app/views/ui/examples/index.html.ruby
|
|
212
221
|
- config/importmap.rb
|
|
213
222
|
- config/initializers/ruby_template_handler.rb
|
|
214
223
|
- config/routes.rb
|
|
@@ -410,6 +419,7 @@ files:
|
|
|
410
419
|
- lib/ui.rb
|
|
411
420
|
- lib/ui/engine.rb
|
|
412
421
|
- lib/ui/version.rb
|
|
422
|
+
- lib/ui/version.rb.erb
|
|
413
423
|
homepage: https://github.com/n-at-han-k/rails-active-ui
|
|
414
424
|
licenses:
|
|
415
425
|
- MIT
|