rails-active-ui 0.3.4 → 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/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,587 @@
|
|
|
1
|
+
# ------------------------------------------------------------------
|
|
2
|
+
# Button
|
|
3
|
+
# ------------------------------------------------------------------
|
|
4
|
+
Header(size: :h3) { text "Button" }
|
|
5
|
+
text "A standard button with color, icon, size, and variant options."
|
|
6
|
+
|
|
7
|
+
Segment {
|
|
8
|
+
HStack(spacing: 8) {
|
|
9
|
+
Button(color: :blue) { text "Primary" }
|
|
10
|
+
Button(color: :green, icon: "check") { text "Approve" }
|
|
11
|
+
Button(variant: :basic) { text "Basic" }
|
|
12
|
+
Button(color: :red, size: :small) { text "Small Red" }
|
|
13
|
+
Button(loading: true, color: :blue) { text "Loading" }
|
|
14
|
+
Button(disabled: true) { text "Disabled" }
|
|
15
|
+
Button(inverted: true, color: :blue) { text "Inverted" }
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
Segment(secondary: true) {
|
|
20
|
+
concat tag.pre { tag.code(
|
|
21
|
+
'HStack(spacing: 8) {
|
|
22
|
+
Button(color: :blue) { text "Primary" }
|
|
23
|
+
Button(color: :green, icon: "check") { text "Approve" }
|
|
24
|
+
Button(variant: :basic) { text "Basic" }
|
|
25
|
+
Button(color: :red, size: :small) { text "Small Red" }
|
|
26
|
+
Button(loading: true, color: :blue) { text "Loading" }
|
|
27
|
+
Button(disabled: true) { text "Disabled" }
|
|
28
|
+
Button(inverted: true, color: :blue) { text "Inverted" }
|
|
29
|
+
}'
|
|
30
|
+
)}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
Divider(hidden: true)
|
|
34
|
+
|
|
35
|
+
# ------------------------------------------------------------------
|
|
36
|
+
# Container
|
|
37
|
+
# ------------------------------------------------------------------
|
|
38
|
+
Header(size: :h3) { text "Container" }
|
|
39
|
+
text "A container constrains content width for readability."
|
|
40
|
+
|
|
41
|
+
Segment {
|
|
42
|
+
Container(text: true) {
|
|
43
|
+
text "This content is inside a text container, which constrains width for optimal reading."
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
Segment(secondary: true) {
|
|
48
|
+
concat tag.pre { tag.code(
|
|
49
|
+
'Container(text: true) {
|
|
50
|
+
text "This content is inside a text container."
|
|
51
|
+
}'
|
|
52
|
+
)}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
Divider(hidden: true)
|
|
56
|
+
|
|
57
|
+
# ------------------------------------------------------------------
|
|
58
|
+
# Divider
|
|
59
|
+
# ------------------------------------------------------------------
|
|
60
|
+
Header(size: :h3) { text "Divider" }
|
|
61
|
+
text "A divider visually separates content sections."
|
|
62
|
+
|
|
63
|
+
Segment {
|
|
64
|
+
text "Content above"
|
|
65
|
+
Divider()
|
|
66
|
+
text "Content below"
|
|
67
|
+
Divider(horizontal: true) { text "OR" }
|
|
68
|
+
text "More content"
|
|
69
|
+
Divider(hidden: true)
|
|
70
|
+
text "After a hidden divider (spacing only)"
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
Segment(secondary: true) {
|
|
74
|
+
concat tag.pre { tag.code(
|
|
75
|
+
'text "Content above"
|
|
76
|
+
Divider()
|
|
77
|
+
text "Content below"
|
|
78
|
+
Divider(horizontal: true) { text "OR" }
|
|
79
|
+
text "More content"
|
|
80
|
+
Divider(hidden: true)
|
|
81
|
+
text "After a hidden divider (spacing only)"'
|
|
82
|
+
)}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
Divider(hidden: true)
|
|
86
|
+
|
|
87
|
+
# ------------------------------------------------------------------
|
|
88
|
+
# Emoji
|
|
89
|
+
# ------------------------------------------------------------------
|
|
90
|
+
Header(size: :h3) { text "Emoji" }
|
|
91
|
+
text "Renders an emoji by name."
|
|
92
|
+
|
|
93
|
+
Segment {
|
|
94
|
+
HStack(spacing: 8) {
|
|
95
|
+
Emoji(name: "smile")
|
|
96
|
+
Emoji(name: "heart")
|
|
97
|
+
Emoji(name: "rocket")
|
|
98
|
+
Emoji(name: "thumbsup")
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
Segment(secondary: true) {
|
|
103
|
+
concat tag.pre { tag.code(
|
|
104
|
+
'Emoji(name: "smile")
|
|
105
|
+
Emoji(name: "heart")
|
|
106
|
+
Emoji(name: "rocket")
|
|
107
|
+
Emoji(name: "thumbsup")'
|
|
108
|
+
)}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
Divider(hidden: true)
|
|
112
|
+
|
|
113
|
+
# ------------------------------------------------------------------
|
|
114
|
+
# Flag
|
|
115
|
+
# ------------------------------------------------------------------
|
|
116
|
+
Header(size: :h3) { text "Flag" }
|
|
117
|
+
text "Renders a country flag icon."
|
|
118
|
+
|
|
119
|
+
Segment {
|
|
120
|
+
HStack(spacing: 8) {
|
|
121
|
+
Flag(country: "us")
|
|
122
|
+
Flag(country: "gb")
|
|
123
|
+
Flag(country: "de")
|
|
124
|
+
Flag(country: "jp")
|
|
125
|
+
Flag(country: "br")
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
Segment(secondary: true) {
|
|
130
|
+
concat tag.pre { tag.code(
|
|
131
|
+
'Flag(country: "us")
|
|
132
|
+
Flag(country: "gb")
|
|
133
|
+
Flag(country: "de")
|
|
134
|
+
Flag(country: "jp")
|
|
135
|
+
Flag(country: "br")'
|
|
136
|
+
)}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
Divider(hidden: true)
|
|
140
|
+
|
|
141
|
+
# ------------------------------------------------------------------
|
|
142
|
+
# Header
|
|
143
|
+
# ------------------------------------------------------------------
|
|
144
|
+
Header(size: :h3) { text "Header" }
|
|
145
|
+
text "Page and section headers with various sizes, icons, and styles."
|
|
146
|
+
|
|
147
|
+
Segment {
|
|
148
|
+
Header(size: :h1) { text "H1 Header" }
|
|
149
|
+
Header(size: :h2, icon: "settings") { text "H2 with Icon" }
|
|
150
|
+
Header(size: :h3, dividing: true) { text "H3 Dividing" }
|
|
151
|
+
Header(size: :h4, sub: true) { text "H4 Sub Header" }
|
|
152
|
+
Header(size: :h3, color: :blue) { text "Colored Header" }
|
|
153
|
+
Header(size: :h3, block_header: true, attached: "top") { text "Block Attached Header" }
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
Segment(secondary: true) {
|
|
157
|
+
concat tag.pre { tag.code(
|
|
158
|
+
'Header(size: :h1) { text "H1 Header" }
|
|
159
|
+
Header(size: :h2, icon: "settings") { text "H2 with Icon" }
|
|
160
|
+
Header(size: :h3, dividing: true) { text "H3 Dividing" }
|
|
161
|
+
Header(size: :h4, sub: true) { text "H4 Sub Header" }
|
|
162
|
+
Header(size: :h3, color: :blue) { text "Colored Header" }
|
|
163
|
+
Header(size: :h3, block_header: true, attached: "top") { text "Block Attached Header" }'
|
|
164
|
+
)}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
Divider(hidden: true)
|
|
168
|
+
|
|
169
|
+
# ------------------------------------------------------------------
|
|
170
|
+
# Icon
|
|
171
|
+
# ------------------------------------------------------------------
|
|
172
|
+
Header(size: :h3) { text "Icon" }
|
|
173
|
+
text "Icons from the Fomantic UI icon set."
|
|
174
|
+
|
|
175
|
+
Segment {
|
|
176
|
+
HStack(spacing: 12) {
|
|
177
|
+
Icon(name: "home")
|
|
178
|
+
Icon(name: "user", color: :blue)
|
|
179
|
+
Icon(name: "heart", color: :red, size: :large)
|
|
180
|
+
Icon(name: "spinner", loading: true)
|
|
181
|
+
Icon(name: "cloud", size: :big, color: :teal)
|
|
182
|
+
Icon(name: "circle", circular: true, inverted: true, color: :green)
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
Segment(secondary: true) {
|
|
187
|
+
concat tag.pre { tag.code(
|
|
188
|
+
'Icon(name: "home")
|
|
189
|
+
Icon(name: "user", color: :blue)
|
|
190
|
+
Icon(name: "heart", color: :red, size: :large)
|
|
191
|
+
Icon(name: "spinner", loading: true)
|
|
192
|
+
Icon(name: "cloud", size: :big, color: :teal)
|
|
193
|
+
Icon(name: "circle", circular: true, inverted: true, color: :green)'
|
|
194
|
+
)}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
Divider(hidden: true)
|
|
198
|
+
|
|
199
|
+
# ------------------------------------------------------------------
|
|
200
|
+
# Image
|
|
201
|
+
# ------------------------------------------------------------------
|
|
202
|
+
Header(size: :h3) { text "Image" }
|
|
203
|
+
text "Styled image element with size, shape, and layout options."
|
|
204
|
+
|
|
205
|
+
Segment {
|
|
206
|
+
HStack(spacing: 12, align: "center") {
|
|
207
|
+
Image(src: "https://fomantic-ui.com/images/wireframe/image.png", size: :small)
|
|
208
|
+
Image(src: "https://fomantic-ui.com/images/avatar/large/elliot.jpg", size: :tiny, circular: true)
|
|
209
|
+
Image(src: "https://fomantic-ui.com/images/avatar/large/stevie.jpg", size: :tiny, bordered: true, rounded: true)
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
Segment(secondary: true) {
|
|
214
|
+
concat tag.pre { tag.code(
|
|
215
|
+
'Image(src: "https://fomantic-ui.com/images/wireframe/image.png", size: :small)
|
|
216
|
+
Image(src: "https://fomantic-ui.com/images/avatar/large/elliot.jpg", size: :tiny, circular: true)
|
|
217
|
+
Image(src: "https://fomantic-ui.com/images/avatar/large/stevie.jpg", size: :tiny, bordered: true, rounded: true)'
|
|
218
|
+
)}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
Divider(hidden: true)
|
|
222
|
+
|
|
223
|
+
# ------------------------------------------------------------------
|
|
224
|
+
# Input
|
|
225
|
+
# ------------------------------------------------------------------
|
|
226
|
+
Header(size: :h3) { text "Input" }
|
|
227
|
+
text "A styled input field with icon, label, action, and state options."
|
|
228
|
+
|
|
229
|
+
Segment {
|
|
230
|
+
VStack(spacing: 12) {
|
|
231
|
+
Input(placeholder: "Search...", icon: "search")
|
|
232
|
+
Input(placeholder: "Loading...", icon: "search", loading: true)
|
|
233
|
+
Input(placeholder: "Enter email", icon: "at", icon_position: "left")
|
|
234
|
+
Input(placeholder: "Disabled input", disabled: true)
|
|
235
|
+
Input(placeholder: "Error state", error: true)
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
Segment(secondary: true) {
|
|
240
|
+
concat tag.pre { tag.code(
|
|
241
|
+
'Input(placeholder: "Search...", icon: "search")
|
|
242
|
+
Input(placeholder: "Loading...", icon: "search", loading: true)
|
|
243
|
+
Input(placeholder: "Enter email", icon: "at", icon_position: "left")
|
|
244
|
+
Input(placeholder: "Disabled input", disabled: true)
|
|
245
|
+
Input(placeholder: "Error state", error: true)'
|
|
246
|
+
)}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
Divider(hidden: true)
|
|
250
|
+
|
|
251
|
+
# ------------------------------------------------------------------
|
|
252
|
+
# Label
|
|
253
|
+
# ------------------------------------------------------------------
|
|
254
|
+
Header(size: :h3) { text "Label" }
|
|
255
|
+
text "Labels highlight content with color, pointing, and style variations."
|
|
256
|
+
|
|
257
|
+
Segment {
|
|
258
|
+
HStack(spacing: 8) {
|
|
259
|
+
Label(color: :blue) { text "Blue" }
|
|
260
|
+
Label(color: :red, icon: "mail") { text "23 Unread" }
|
|
261
|
+
Label(tag_style: true, color: :teal) { text "Tag" }
|
|
262
|
+
Label(circular: true, color: :green) { text "1" }
|
|
263
|
+
Label(basic: true) { text "Basic" }
|
|
264
|
+
Label(ribbon: true, color: :purple) { text "Ribbon" }
|
|
265
|
+
Label(detail: "214") { text "Friends" }
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
Segment(secondary: true) {
|
|
270
|
+
concat tag.pre { tag.code(
|
|
271
|
+
'Label(color: :blue) { text "Blue" }
|
|
272
|
+
Label(color: :red, icon: "mail") { text "23 Unread" }
|
|
273
|
+
Label(tag_style: true, color: :teal) { text "Tag" }
|
|
274
|
+
Label(circular: true, color: :green) { text "1" }
|
|
275
|
+
Label(basic: true) { text "Basic" }
|
|
276
|
+
Label(ribbon: true, color: :purple) { text "Ribbon" }
|
|
277
|
+
Label(detail: "214") { text "Friends" }'
|
|
278
|
+
)}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
Divider(hidden: true)
|
|
282
|
+
|
|
283
|
+
# ------------------------------------------------------------------
|
|
284
|
+
# List
|
|
285
|
+
# ------------------------------------------------------------------
|
|
286
|
+
Header(size: :h3) { text "List" }
|
|
287
|
+
text "Lists display related content in a vertical or horizontal sequence."
|
|
288
|
+
|
|
289
|
+
Segment {
|
|
290
|
+
List(bulleted: true) {
|
|
291
|
+
concat tag.div(class: "item") { "Apples" }
|
|
292
|
+
concat tag.div(class: "item") { "Oranges" }
|
|
293
|
+
concat tag.div(class: "item") { "Bananas" }
|
|
294
|
+
}
|
|
295
|
+
Divider(hidden: true)
|
|
296
|
+
List(ordered: true) {
|
|
297
|
+
concat tag.div(class: "item") { "First step" }
|
|
298
|
+
concat tag.div(class: "item") { "Second step" }
|
|
299
|
+
concat tag.div(class: "item") { "Third step" }
|
|
300
|
+
}
|
|
301
|
+
Divider(hidden: true)
|
|
302
|
+
List(horizontal: true, divided: true) {
|
|
303
|
+
concat tag.div(class: "item") { "About" }
|
|
304
|
+
concat tag.div(class: "item") { "Contact" }
|
|
305
|
+
concat tag.div(class: "item") { "Privacy" }
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
Segment(secondary: true) {
|
|
310
|
+
concat tag.pre { tag.code(
|
|
311
|
+
'List(bulleted: true) {
|
|
312
|
+
concat tag.div(class: "item") { "Apples" }
|
|
313
|
+
concat tag.div(class: "item") { "Oranges" }
|
|
314
|
+
concat tag.div(class: "item") { "Bananas" }
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
List(ordered: true) {
|
|
318
|
+
concat tag.div(class: "item") { "First step" }
|
|
319
|
+
concat tag.div(class: "item") { "Second step" }
|
|
320
|
+
concat tag.div(class: "item") { "Third step" }
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
List(horizontal: true, divided: true) {
|
|
324
|
+
concat tag.div(class: "item") { "About" }
|
|
325
|
+
concat tag.div(class: "item") { "Contact" }
|
|
326
|
+
concat tag.div(class: "item") { "Privacy" }
|
|
327
|
+
}'
|
|
328
|
+
)}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
Divider(hidden: true)
|
|
332
|
+
|
|
333
|
+
# ------------------------------------------------------------------
|
|
334
|
+
# Loader
|
|
335
|
+
# ------------------------------------------------------------------
|
|
336
|
+
Header(size: :h3) { text "Loader" }
|
|
337
|
+
text "A loading spinner indicator."
|
|
338
|
+
|
|
339
|
+
Segment {
|
|
340
|
+
concat tag.div(style: "height: 80px; position: relative;") {
|
|
341
|
+
capture {
|
|
342
|
+
Loader(active: true, inline: true, centered: true)
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
Divider(hidden: true)
|
|
346
|
+
HStack(spacing: 16) {
|
|
347
|
+
Loader(active: true, inline: true, size: :small)
|
|
348
|
+
Loader(active: true, inline: true, size: :medium)
|
|
349
|
+
Loader(active: true, inline: true, size: :large)
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
Segment(secondary: true) {
|
|
354
|
+
concat tag.pre { tag.code(
|
|
355
|
+
'Loader(active: true, inline: true, centered: true)
|
|
356
|
+
Loader(active: true, inline: true, size: :small)
|
|
357
|
+
Loader(active: true, inline: true, size: :medium)
|
|
358
|
+
Loader(active: true, inline: true, size: :large)'
|
|
359
|
+
)}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
Divider(hidden: true)
|
|
363
|
+
|
|
364
|
+
# ------------------------------------------------------------------
|
|
365
|
+
# Placeholder
|
|
366
|
+
# ------------------------------------------------------------------
|
|
367
|
+
Header(size: :h3) { text "Placeholder" }
|
|
368
|
+
text "Placeholder content used as a loading skeleton."
|
|
369
|
+
|
|
370
|
+
Segment {
|
|
371
|
+
Placeholder { |c|
|
|
372
|
+
c.header_slot {
|
|
373
|
+
concat tag.div(class: "line")
|
|
374
|
+
concat tag.div(class: "line")
|
|
375
|
+
}
|
|
376
|
+
c.paragraph {
|
|
377
|
+
concat tag.div(class: "line")
|
|
378
|
+
concat tag.div(class: "line")
|
|
379
|
+
concat tag.div(class: "line")
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
Segment(secondary: true) {
|
|
385
|
+
concat tag.pre { tag.code(
|
|
386
|
+
'Placeholder { |c|
|
|
387
|
+
c.header_slot {
|
|
388
|
+
concat tag.div(class: "line")
|
|
389
|
+
concat tag.div(class: "line")
|
|
390
|
+
}
|
|
391
|
+
c.paragraph {
|
|
392
|
+
concat tag.div(class: "line")
|
|
393
|
+
concat tag.div(class: "line")
|
|
394
|
+
concat tag.div(class: "line")
|
|
395
|
+
}
|
|
396
|
+
}'
|
|
397
|
+
)}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
Divider(hidden: true)
|
|
401
|
+
|
|
402
|
+
# ------------------------------------------------------------------
|
|
403
|
+
# Rail
|
|
404
|
+
# ------------------------------------------------------------------
|
|
405
|
+
Header(size: :h3) { text "Rail" }
|
|
406
|
+
text "Attached content rail, positioned to the left or right of content."
|
|
407
|
+
|
|
408
|
+
Segment {
|
|
409
|
+
concat tag.div(style: "position: relative; min-height: 60px; padding: 0 200px;") {
|
|
410
|
+
capture {
|
|
411
|
+
Rail(position: "left", close: true) {
|
|
412
|
+
Segment { text "Left rail" }
|
|
413
|
+
}
|
|
414
|
+
text "Main content area with rails on each side."
|
|
415
|
+
Rail(position: "right", close: true) {
|
|
416
|
+
Segment { text "Right rail" }
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
Segment(secondary: true) {
|
|
423
|
+
concat tag.pre { tag.code(
|
|
424
|
+
'Rail(position: "left", close: true) {
|
|
425
|
+
Segment { text "Left rail" }
|
|
426
|
+
}
|
|
427
|
+
text "Main content area"
|
|
428
|
+
Rail(position: "right", close: true) {
|
|
429
|
+
Segment { text "Right rail" }
|
|
430
|
+
}'
|
|
431
|
+
)}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
Divider(hidden: true)
|
|
435
|
+
|
|
436
|
+
# ------------------------------------------------------------------
|
|
437
|
+
# Reveal
|
|
438
|
+
# ------------------------------------------------------------------
|
|
439
|
+
Header(size: :h3) { text "Reveal" }
|
|
440
|
+
text "Shows hidden content on hover with a transition effect."
|
|
441
|
+
|
|
442
|
+
Segment {
|
|
443
|
+
Reveal(type: "fade") { |c|
|
|
444
|
+
c.visible {
|
|
445
|
+
Image(src: "https://fomantic-ui.com/images/wireframe/square-image.png", size: :small)
|
|
446
|
+
}
|
|
447
|
+
c.hidden {
|
|
448
|
+
Image(src: "https://fomantic-ui.com/images/avatar/large/elliot.jpg", size: :small)
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
Segment(secondary: true) {
|
|
454
|
+
concat tag.pre { tag.code(
|
|
455
|
+
'Reveal(type: "fade") { |c|
|
|
456
|
+
c.visible {
|
|
457
|
+
Image(src: "https://fomantic-ui.com/images/wireframe/square-image.png", size: :small)
|
|
458
|
+
}
|
|
459
|
+
c.hidden {
|
|
460
|
+
Image(src: "https://fomantic-ui.com/images/avatar/large/elliot.jpg", size: :small)
|
|
461
|
+
}
|
|
462
|
+
}'
|
|
463
|
+
)}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
Divider(hidden: true)
|
|
467
|
+
|
|
468
|
+
# ------------------------------------------------------------------
|
|
469
|
+
# Segment
|
|
470
|
+
# ------------------------------------------------------------------
|
|
471
|
+
Header(size: :h3) { text "Segment" }
|
|
472
|
+
text "A container for grouping related content."
|
|
473
|
+
|
|
474
|
+
Segment {
|
|
475
|
+
VStack(spacing: 12) {
|
|
476
|
+
Segment { text "Default segment" }
|
|
477
|
+
Segment(raised: true) { text "Raised segment" }
|
|
478
|
+
Segment(color: :blue) { text "Blue colored segment" }
|
|
479
|
+
Segment(inverted: true, color: :green) { text "Inverted green segment" }
|
|
480
|
+
Segment(compact: true) { text "Compact segment" }
|
|
481
|
+
Segment(secondary: true) { text "Secondary segment" }
|
|
482
|
+
Segment(tertiary: true) { text "Tertiary segment" }
|
|
483
|
+
Segment(loading: true) { text "Loading segment" }
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
Segment(secondary: true) {
|
|
488
|
+
concat tag.pre { tag.code(
|
|
489
|
+
'Segment { text "Default segment" }
|
|
490
|
+
Segment(raised: true) { text "Raised segment" }
|
|
491
|
+
Segment(color: :blue) { text "Blue colored segment" }
|
|
492
|
+
Segment(inverted: true, color: :green) { text "Inverted green segment" }
|
|
493
|
+
Segment(compact: true) { text "Compact segment" }
|
|
494
|
+
Segment(secondary: true) { text "Secondary segment" }
|
|
495
|
+
Segment(loading: true) { text "Loading segment" }'
|
|
496
|
+
)}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
Divider(hidden: true)
|
|
500
|
+
|
|
501
|
+
# ------------------------------------------------------------------
|
|
502
|
+
# SegmentGroup
|
|
503
|
+
# ------------------------------------------------------------------
|
|
504
|
+
Header(size: :h3) { text "SegmentGroup" }
|
|
505
|
+
text "Groups multiple segments together."
|
|
506
|
+
|
|
507
|
+
Segment {
|
|
508
|
+
SegmentGroup {
|
|
509
|
+
Segment { text "First segment" }
|
|
510
|
+
Segment { text "Second segment" }
|
|
511
|
+
Segment { text "Third segment" }
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
Segment(secondary: true) {
|
|
516
|
+
concat tag.pre { tag.code(
|
|
517
|
+
'SegmentGroup {
|
|
518
|
+
Segment { text "First segment" }
|
|
519
|
+
Segment { text "Second segment" }
|
|
520
|
+
Segment { text "Third segment" }
|
|
521
|
+
}'
|
|
522
|
+
)}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
Divider(hidden: true)
|
|
526
|
+
|
|
527
|
+
# ------------------------------------------------------------------
|
|
528
|
+
# Step
|
|
529
|
+
# ------------------------------------------------------------------
|
|
530
|
+
Header(size: :h3) { text "Step / StepGroup" }
|
|
531
|
+
text "Steps show the completion status of an activity."
|
|
532
|
+
|
|
533
|
+
Segment {
|
|
534
|
+
StepGroup(ordered: true) {
|
|
535
|
+
Step(completed: true, title: "Shipping", description: "Choose delivery method")
|
|
536
|
+
Step(active: true, title: "Billing", description: "Enter billing info")
|
|
537
|
+
Step(disabled: true, title: "Confirm", description: "Verify order details")
|
|
538
|
+
}
|
|
539
|
+
Divider(hidden: true)
|
|
540
|
+
StepGroup {
|
|
541
|
+
Step(icon: "truck", title: "Shipping", description: "Choose your shipping options")
|
|
542
|
+
Step(active: true, icon: "payment", title: "Billing", description: "Enter billing information")
|
|
543
|
+
Step(icon: "info", title: "Confirm Order")
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
Segment(secondary: true) {
|
|
548
|
+
concat tag.pre { tag.code(
|
|
549
|
+
'StepGroup(ordered: true) {
|
|
550
|
+
Step(completed: true, title: "Shipping", description: "Choose delivery method")
|
|
551
|
+
Step(active: true, title: "Billing", description: "Enter billing info")
|
|
552
|
+
Step(disabled: true, title: "Confirm", description: "Verify order details")
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
StepGroup {
|
|
556
|
+
Step(icon: "truck", title: "Shipping", description: "Choose your shipping options")
|
|
557
|
+
Step(active: true, icon: "payment", title: "Billing", description: "Enter billing information")
|
|
558
|
+
Step(icon: "info", title: "Confirm Order")
|
|
559
|
+
}'
|
|
560
|
+
)}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
Divider(hidden: true)
|
|
564
|
+
|
|
565
|
+
# ------------------------------------------------------------------
|
|
566
|
+
# Text
|
|
567
|
+
# ------------------------------------------------------------------
|
|
568
|
+
Header(size: :h3) { text "Text" }
|
|
569
|
+
text "Inline text with style, size, weight, and color options."
|
|
570
|
+
|
|
571
|
+
Segment {
|
|
572
|
+
VStack(spacing: 8) {
|
|
573
|
+
Text(size: :huge, color: :blue) { text "Huge blue text" }
|
|
574
|
+
Text(weight: :bold) { text "Bold text" }
|
|
575
|
+
Text(color: :red, size: :large) { text "Large red text" }
|
|
576
|
+
Text(style: "font-style: italic;") { text "Italic styled text" }
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
Segment(secondary: true) {
|
|
581
|
+
concat tag.pre { tag.code(
|
|
582
|
+
'Text(size: :huge, color: :blue) { text "Huge blue text" }
|
|
583
|
+
Text(weight: :bold) { text "Bold text" }
|
|
584
|
+
Text(color: :red, size: :large) { text "Large red text" }
|
|
585
|
+
Text(style: "font-style: italic;") { text "Italic styled text" }'
|
|
586
|
+
)}
|
|
587
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# ------------------------------------------------------------------
|
|
2
|
+
# Reset
|
|
3
|
+
# ------------------------------------------------------------------
|
|
4
|
+
Header(size: :h3) { text "Reset" }
|
|
5
|
+
text "A no-op marker rendered as an HTML comment. Used for resetting component state."
|
|
6
|
+
|
|
7
|
+
Segment {
|
|
8
|
+
Reset()
|
|
9
|
+
text "(Reset renders an invisible HTML comment)"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
Segment(secondary: true) {
|
|
13
|
+
concat tag.pre { tag.code('Reset()') }
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
Divider(hidden: true)
|
|
17
|
+
|
|
18
|
+
# ------------------------------------------------------------------
|
|
19
|
+
# Site
|
|
20
|
+
# ------------------------------------------------------------------
|
|
21
|
+
Header(size: :h3) { text "Site" }
|
|
22
|
+
text "Wraps content with the fui-site Stimulus controller for global Fomantic UI initialization."
|
|
23
|
+
|
|
24
|
+
Segment {
|
|
25
|
+
Site {
|
|
26
|
+
text "Content inside a Site wrapper"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
Segment(secondary: true) {
|
|
31
|
+
concat tag.pre { tag.code(
|
|
32
|
+
'Site {
|
|
33
|
+
text "Content inside a Site wrapper"
|
|
34
|
+
}'
|
|
35
|
+
)}
|
|
36
|
+
}
|