rails-active-ui 0.3.4 → 0.3.6
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/lib/component.rb +4 -2
- 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,180 @@
|
|
|
1
|
+
# ------------------------------------------------------------------
|
|
2
|
+
# VStack
|
|
3
|
+
# ------------------------------------------------------------------
|
|
4
|
+
Header(size: :h3) { text "VStack" }
|
|
5
|
+
text "Vertical stack layout using flexbox column."
|
|
6
|
+
|
|
7
|
+
Segment {
|
|
8
|
+
VStack(spacing: 8) {
|
|
9
|
+
Button(color: :blue) { text "First" }
|
|
10
|
+
Button(color: :green) { text "Second" }
|
|
11
|
+
Button(color: :orange) { text "Third" }
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
Segment(secondary: true) {
|
|
16
|
+
concat tag.pre { tag.code(
|
|
17
|
+
'VStack(spacing: 8) {
|
|
18
|
+
Button(color: :blue) { text "First" }
|
|
19
|
+
Button(color: :green) { text "Second" }
|
|
20
|
+
Button(color: :orange) { text "Third" }
|
|
21
|
+
}'
|
|
22
|
+
)}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Divider(hidden: true)
|
|
26
|
+
|
|
27
|
+
# ------------------------------------------------------------------
|
|
28
|
+
# HStack
|
|
29
|
+
# ------------------------------------------------------------------
|
|
30
|
+
Header(size: :h3) { text "HStack" }
|
|
31
|
+
text "Horizontal stack layout using flexbox row."
|
|
32
|
+
|
|
33
|
+
Segment {
|
|
34
|
+
HStack(spacing: 8, align: "center") {
|
|
35
|
+
Button(color: :blue) { text "Left" }
|
|
36
|
+
Button(color: :green) { text "Center" }
|
|
37
|
+
Button(color: :orange) { text "Right" }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
Segment(secondary: true) {
|
|
42
|
+
concat tag.pre { tag.code(
|
|
43
|
+
'HStack(spacing: 8, align: "center") {
|
|
44
|
+
Button(color: :blue) { text "Left" }
|
|
45
|
+
Button(color: :green) { text "Center" }
|
|
46
|
+
Button(color: :orange) { text "Right" }
|
|
47
|
+
}'
|
|
48
|
+
)}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
Divider(hidden: true)
|
|
52
|
+
|
|
53
|
+
# ------------------------------------------------------------------
|
|
54
|
+
# Grid, Row, Column
|
|
55
|
+
# ------------------------------------------------------------------
|
|
56
|
+
Header(size: :h3) { text "Grid / Row / Column" }
|
|
57
|
+
text "Responsive grid system with rows and columns."
|
|
58
|
+
|
|
59
|
+
Segment {
|
|
60
|
+
Grid(columns: 3, stackable: true, divided: "vertically") {
|
|
61
|
+
Row {
|
|
62
|
+
Column(width: 4) {
|
|
63
|
+
Segment(color: :blue) { text "4 wide" }
|
|
64
|
+
}
|
|
65
|
+
Column(width: 8) {
|
|
66
|
+
Segment(color: :green) { text "8 wide" }
|
|
67
|
+
}
|
|
68
|
+
Column(width: 4) {
|
|
69
|
+
Segment(color: :orange) { text "4 wide" }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
Segment(secondary: true) {
|
|
76
|
+
concat tag.pre { tag.code(
|
|
77
|
+
'Grid(columns: 3, stackable: true, divided: "vertically") {
|
|
78
|
+
Row {
|
|
79
|
+
Column(width: 4) {
|
|
80
|
+
Segment(color: :blue) { text "4 wide" }
|
|
81
|
+
}
|
|
82
|
+
Column(width: 8) {
|
|
83
|
+
Segment(color: :green) { text "8 wide" }
|
|
84
|
+
}
|
|
85
|
+
Column(width: 4) {
|
|
86
|
+
Segment(color: :orange) { text "4 wide" }
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}'
|
|
90
|
+
)}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
Divider(hidden: true)
|
|
94
|
+
|
|
95
|
+
# ------------------------------------------------------------------
|
|
96
|
+
# Pusher
|
|
97
|
+
# ------------------------------------------------------------------
|
|
98
|
+
Header(size: :h3) { text "Pusher" }
|
|
99
|
+
text "A content wrapper typically used with Sidebar to push page content."
|
|
100
|
+
|
|
101
|
+
Segment {
|
|
102
|
+
Pusher {
|
|
103
|
+
Segment { text "Content inside a Pusher" }
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
Segment(secondary: true) {
|
|
108
|
+
concat tag.pre { tag.code(
|
|
109
|
+
'Pusher {
|
|
110
|
+
Segment { text "Content inside a Pusher" }
|
|
111
|
+
}'
|
|
112
|
+
)}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
Divider(hidden: true)
|
|
116
|
+
|
|
117
|
+
# ------------------------------------------------------------------
|
|
118
|
+
# Overlay
|
|
119
|
+
# ------------------------------------------------------------------
|
|
120
|
+
Header(size: :h3) { text "Overlay" }
|
|
121
|
+
text "An overlay div typically used as a dimmer backdrop."
|
|
122
|
+
|
|
123
|
+
Segment {
|
|
124
|
+
Overlay {
|
|
125
|
+
text "Overlay content"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
Segment(secondary: true) {
|
|
130
|
+
concat tag.pre { tag.code(
|
|
131
|
+
'Overlay {
|
|
132
|
+
text "Overlay content"
|
|
133
|
+
}'
|
|
134
|
+
)}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
Divider(hidden: true)
|
|
138
|
+
|
|
139
|
+
# ------------------------------------------------------------------
|
|
140
|
+
# Link
|
|
141
|
+
# ------------------------------------------------------------------
|
|
142
|
+
Header(size: :h3) { text "Link" }
|
|
143
|
+
text "A styled anchor element."
|
|
144
|
+
|
|
145
|
+
Segment {
|
|
146
|
+
LinkTo(href: "#", css_class: "ui") { text "Click this link" }
|
|
147
|
+
text " | "
|
|
148
|
+
LinkTo(href: "https://example.com", target: "_blank", rel: "noopener") { text "External link" }
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
Segment(secondary: true) {
|
|
152
|
+
concat tag.pre { tag.code(
|
|
153
|
+
'LinkTo(href: "#", css_class: "ui") { text "Click this link" }
|
|
154
|
+
LinkTo(href: "https://example.com", target: "_blank", rel: "noopener") { text "External link" }'
|
|
155
|
+
)}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
Divider(hidden: true)
|
|
159
|
+
|
|
160
|
+
# ------------------------------------------------------------------
|
|
161
|
+
# SubHeader
|
|
162
|
+
# ------------------------------------------------------------------
|
|
163
|
+
Header(size: :h3) { text "SubHeader" }
|
|
164
|
+
text "A sub header element used within headers."
|
|
165
|
+
|
|
166
|
+
Segment {
|
|
167
|
+
Header(size: :h2) {
|
|
168
|
+
text "Account Settings"
|
|
169
|
+
SubHeader { text "Manage your preferences" }
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
Segment(secondary: true) {
|
|
174
|
+
concat tag.pre { tag.code(
|
|
175
|
+
'Header(size: :h2) {
|
|
176
|
+
text "Account Settings"
|
|
177
|
+
SubHeader { text "Manage your preferences" }
|
|
178
|
+
}'
|
|
179
|
+
)}
|
|
180
|
+
}
|