playbook-ui 13.25.0 → 13.26.0-alpha.jasoncypretpatch12816
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.
- package/dist/app/components/playbook/pb_docs/advanced_table_mock_data.json +278 -0
- package/dist/app/components/playbook/pb_docs/kit_api.html.erb +321 -0
- package/dist/app/components/playbook/pb_docs/kit_api.rb +150 -0
- package/dist/app/components/playbook/pb_docs/kit_example.html.erb +80 -0
- package/dist/app/components/playbook/pb_docs/kit_example.rb +78 -0
- package/dist/menu.yml +1 -1
- package/dist/pb_avatar/Utilities/GetPlacementPropsHelper.d.ts +1 -0
- package/dist/pb_avatar/_avatar.d.ts +8 -0
- package/dist/pb_body/_body.d.ts +1 -1
- package/dist/pb_checkbox/_checkbox.d.ts +1 -0
- package/dist/pb_dialog/_dialog.d.ts +1 -1
- package/dist/pb_doc_helper.rb +102 -0
- package/dist/pb_dropdown/_dropdown.d.ts +28 -7
- package/dist/pb_dropdown/subcomponents/DropdownContainer.d.ts +5 -1
- package/dist/pb_dropdown/subcomponents/DropdownOption.d.ts +9 -3
- package/dist/pb_dropdown/subcomponents/DropdownTrigger.d.ts +5 -0
- package/dist/pb_dropdown/utilities/clickOutsideHelper.d.ts +10 -0
- package/dist/pb_dropdown/utilities/index.d.ts +2 -0
- package/dist/pb_dropdown/utilities/subComponentHelper.d.ts +5 -4
- package/dist/pb_loading_inline/_loading_inline.d.ts +1 -0
- package/dist/pb_radio/_radio.d.ts +100 -96
- package/dist/pb_select/_select.d.ts +96 -96
- package/dist/pb_text_input/_text_input.d.ts +100 -100
- package/dist/pb_textarea/_textarea.d.ts +100 -100
- package/dist/pb_timeline/_timeline.d.ts +1 -1
- package/dist/pb_tooltip/_tooltip.d.ts +96 -96
- package/dist/playbook-doc.js +9 -9
- package/dist/playbook-rails.js +6 -6
- package/dist/playbook.css +1 -1
- package/dist/playbook.js +8 -8
- package/package.json +1 -1
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"year": "2021",
|
|
4
|
+
"quarter": null,
|
|
5
|
+
"month": null,
|
|
6
|
+
"day": null,
|
|
7
|
+
"newEnrollments": "20",
|
|
8
|
+
"scheduledMeetings": "10",
|
|
9
|
+
"attendanceRate": "51%",
|
|
10
|
+
"completedClasses": "3",
|
|
11
|
+
"classCompletionRate": "33%",
|
|
12
|
+
"graduatedStudents": "19",
|
|
13
|
+
"children": [
|
|
14
|
+
{
|
|
15
|
+
"year": "2021",
|
|
16
|
+
"quarter": "Q1",
|
|
17
|
+
"month": null,
|
|
18
|
+
"day": null,
|
|
19
|
+
"newEnrollments": "2",
|
|
20
|
+
"scheduledMeetings": "35",
|
|
21
|
+
"attendanceRate": "32%",
|
|
22
|
+
"completedClasses": "15",
|
|
23
|
+
"classCompletionRate": "52%",
|
|
24
|
+
"graduatedStudents": "36",
|
|
25
|
+
"children": [
|
|
26
|
+
{
|
|
27
|
+
"year": "2021",
|
|
28
|
+
"quarter": "Q1",
|
|
29
|
+
"month": "January",
|
|
30
|
+
"day": null,
|
|
31
|
+
"newEnrollments": "16",
|
|
32
|
+
"scheduledMeetings": "20",
|
|
33
|
+
"attendanceRate": "11%",
|
|
34
|
+
"completedClasses": "13",
|
|
35
|
+
"classCompletionRate": "47%",
|
|
36
|
+
"graduatedStudents": "28",
|
|
37
|
+
"children": [
|
|
38
|
+
{
|
|
39
|
+
"year": "2021",
|
|
40
|
+
"quarter": "Q1",
|
|
41
|
+
"month": "January",
|
|
42
|
+
"day": "10",
|
|
43
|
+
"newEnrollments": "34",
|
|
44
|
+
"scheduledMeetings": "28",
|
|
45
|
+
"attendanceRate": "97%",
|
|
46
|
+
"completedClasses": "20",
|
|
47
|
+
"classCompletionRate": "15%",
|
|
48
|
+
"graduatedStudents": "17"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"year": "2021",
|
|
52
|
+
"quarter": "Q1",
|
|
53
|
+
"month": "January",
|
|
54
|
+
"day": "20",
|
|
55
|
+
"newEnrollments": "43",
|
|
56
|
+
"scheduledMeetings": "23",
|
|
57
|
+
"attendanceRate": "66%",
|
|
58
|
+
"completedClasses": "26",
|
|
59
|
+
"classCompletionRate": "47%",
|
|
60
|
+
"graduatedStudents": "9"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"year": "2021",
|
|
66
|
+
"quarter": "Q1",
|
|
67
|
+
"month": "February",
|
|
68
|
+
"day": null,
|
|
69
|
+
"newEnrollments": "20",
|
|
70
|
+
"scheduledMeetings": "41",
|
|
71
|
+
"attendanceRate": "95%",
|
|
72
|
+
"completedClasses": "26",
|
|
73
|
+
"classCompletionRate": "83%",
|
|
74
|
+
"graduatedStudents": "43",
|
|
75
|
+
"children": [
|
|
76
|
+
{
|
|
77
|
+
"year": "2021",
|
|
78
|
+
"quarter": "Q1",
|
|
79
|
+
"month": "February",
|
|
80
|
+
"day": "15",
|
|
81
|
+
"newEnrollments": "19",
|
|
82
|
+
"scheduledMeetings": "35",
|
|
83
|
+
"attendanceRate": "69%",
|
|
84
|
+
"completedClasses": "8",
|
|
85
|
+
"classCompletionRate": "75%",
|
|
86
|
+
"graduatedStudents": "23"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"year": "2022",
|
|
96
|
+
"quarter": null,
|
|
97
|
+
"month": null,
|
|
98
|
+
"day": null,
|
|
99
|
+
"newEnrollments": "25",
|
|
100
|
+
"scheduledMeetings": "17",
|
|
101
|
+
"attendanceRate": "75%",
|
|
102
|
+
"completedClasses": "5",
|
|
103
|
+
"classCompletionRate": "45%",
|
|
104
|
+
"graduatedStudents": "32",
|
|
105
|
+
"children": [
|
|
106
|
+
{
|
|
107
|
+
"year": "2022",
|
|
108
|
+
"quarter": "Q1",
|
|
109
|
+
"month": null,
|
|
110
|
+
"day": null,
|
|
111
|
+
"newEnrollments": "2",
|
|
112
|
+
"scheduledMeetings": "35",
|
|
113
|
+
"attendanceRate": "32%",
|
|
114
|
+
"completedClasses": "15",
|
|
115
|
+
"classCompletionRate": "52%",
|
|
116
|
+
"graduatedStudents": "36",
|
|
117
|
+
"children": [
|
|
118
|
+
{
|
|
119
|
+
"year": "2022",
|
|
120
|
+
"quarter": "Q1",
|
|
121
|
+
"month": "January",
|
|
122
|
+
"day": null,
|
|
123
|
+
"newEnrollments": "16",
|
|
124
|
+
"scheduledMeetings": "20",
|
|
125
|
+
"attendanceRate": "11%",
|
|
126
|
+
"completedClasses": "13",
|
|
127
|
+
"classCompletionRate": "47%",
|
|
128
|
+
"graduatedStudents": "28",
|
|
129
|
+
"children": [
|
|
130
|
+
{
|
|
131
|
+
"year": "2022",
|
|
132
|
+
"quarter": "Q1",
|
|
133
|
+
"month": "January",
|
|
134
|
+
"day": "15",
|
|
135
|
+
"newEnrollments": "34",
|
|
136
|
+
"scheduledMeetings": "28",
|
|
137
|
+
"attendanceRate": "97%",
|
|
138
|
+
"completedClasses": "20",
|
|
139
|
+
"classCompletionRate": "15%",
|
|
140
|
+
"graduatedStudents": "17"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"year": "2022",
|
|
144
|
+
"quarter": "Q1",
|
|
145
|
+
"month": "January",
|
|
146
|
+
"day": "25",
|
|
147
|
+
"newEnrollments": "43",
|
|
148
|
+
"scheduledMeetings": "23",
|
|
149
|
+
"attendanceRate": "66%",
|
|
150
|
+
"completedClasses": "26",
|
|
151
|
+
"classCompletionRate": "47%",
|
|
152
|
+
"graduatedStudents": "9"
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"year": "2022",
|
|
158
|
+
"quarter": "Q1",
|
|
159
|
+
"month": "May",
|
|
160
|
+
"day": null,
|
|
161
|
+
"newEnrollments": "20",
|
|
162
|
+
"scheduledMeetings": "41",
|
|
163
|
+
"attendanceRate": "95%",
|
|
164
|
+
"completedClasses": "26",
|
|
165
|
+
"classCompletionRate": "83%",
|
|
166
|
+
"graduatedStudents": "43",
|
|
167
|
+
"children": [
|
|
168
|
+
{
|
|
169
|
+
"year": "2022",
|
|
170
|
+
"quarter": "Q1",
|
|
171
|
+
"month": "May",
|
|
172
|
+
"day": "2",
|
|
173
|
+
"newEnrollments": "19",
|
|
174
|
+
"scheduledMeetings": "35",
|
|
175
|
+
"attendanceRate": "69%",
|
|
176
|
+
"completedClasses": "8",
|
|
177
|
+
"classCompletionRate": "75%",
|
|
178
|
+
"graduatedStudents": "23"
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"year": "2023",
|
|
188
|
+
"quarter": null,
|
|
189
|
+
"month": null,
|
|
190
|
+
"day": null,
|
|
191
|
+
"newEnrollments": "10",
|
|
192
|
+
"scheduledMeetings": "15",
|
|
193
|
+
"attendanceRate": "65%",
|
|
194
|
+
"completedClasses": "4",
|
|
195
|
+
"classCompletionRate": "49%",
|
|
196
|
+
"graduatedStudents": "29",
|
|
197
|
+
"children": [
|
|
198
|
+
{
|
|
199
|
+
"year": "2023",
|
|
200
|
+
"quarter": "Q1",
|
|
201
|
+
"month": null,
|
|
202
|
+
"day": null,
|
|
203
|
+
"newEnrollments": "2",
|
|
204
|
+
"scheduledMeetings": "35",
|
|
205
|
+
"attendanceRate": "32%",
|
|
206
|
+
"completedClasses": "15",
|
|
207
|
+
"classCompletionRate": "52%",
|
|
208
|
+
"graduatedStudents": "36",
|
|
209
|
+
"children": [
|
|
210
|
+
{
|
|
211
|
+
"year": "2023",
|
|
212
|
+
"quarter": "Q1",
|
|
213
|
+
"month": "March",
|
|
214
|
+
"day": null,
|
|
215
|
+
"newEnrollments": "16",
|
|
216
|
+
"scheduledMeetings": "20",
|
|
217
|
+
"attendanceRate": "11%",
|
|
218
|
+
"completedClasses": "13",
|
|
219
|
+
"classCompletionRate": "47%",
|
|
220
|
+
"graduatedStudents": "28",
|
|
221
|
+
"children": [
|
|
222
|
+
{
|
|
223
|
+
"year": "2023",
|
|
224
|
+
"quarter": "Q1",
|
|
225
|
+
"month": "March",
|
|
226
|
+
"day": "10",
|
|
227
|
+
"newEnrollments": "34",
|
|
228
|
+
"scheduledMeetings": "28",
|
|
229
|
+
"attendanceRate": "97%",
|
|
230
|
+
"completedClasses": "20",
|
|
231
|
+
"classCompletionRate": "15%",
|
|
232
|
+
"graduatedStudents": "17"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"year": "2023",
|
|
236
|
+
"quarter": "Q1",
|
|
237
|
+
"month": "March",
|
|
238
|
+
"day": "11",
|
|
239
|
+
"newEnrollments": "43",
|
|
240
|
+
"scheduledMeetings": "23",
|
|
241
|
+
"attendanceRate": "66%",
|
|
242
|
+
"completedClasses": "26",
|
|
243
|
+
"classCompletionRate": "47%",
|
|
244
|
+
"graduatedStudents": "9"
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"year": "2023",
|
|
250
|
+
"quarter": "Q1",
|
|
251
|
+
"month": "April",
|
|
252
|
+
"day": null,
|
|
253
|
+
"newEnrollments": "20",
|
|
254
|
+
"scheduledMeetings": "41",
|
|
255
|
+
"attendanceRate": "95%",
|
|
256
|
+
"completedClasses": "26",
|
|
257
|
+
"classCompletionRate": "83%",
|
|
258
|
+
"graduatedStudents": "43",
|
|
259
|
+
"children": [
|
|
260
|
+
{
|
|
261
|
+
"year": "2023",
|
|
262
|
+
"quarter": "Q1",
|
|
263
|
+
"month": "April",
|
|
264
|
+
"day": "15",
|
|
265
|
+
"newEnrollments": "19",
|
|
266
|
+
"scheduledMeetings": "35",
|
|
267
|
+
"attendanceRate": "69%",
|
|
268
|
+
"completedClasses": "8",
|
|
269
|
+
"classCompletionRate": "75%",
|
|
270
|
+
"graduatedStudents": "23"
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
]
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
<% if !local_prop_data.present? %>
|
|
2
|
+
<div data-action="toggle" data-togglable="prop_example" class="pb--propsTable">
|
|
3
|
+
<%= pb_rails("title", props: { text: "Available Props", size: 3, margin_bottom: "sm", dark: dark }) %>
|
|
4
|
+
<%= pb_rails("card", props: { padding: "none", dark: dark }) do %>
|
|
5
|
+
<%= pb_rails("card/card_body", props: { padding: "sm" }) do %>
|
|
6
|
+
<%= pb_rails("nav", props: { orientation: "horizontal", variant: "subtle", dark: dark }) do %>
|
|
7
|
+
<%= pb_rails("nav/item", props: { text: "Global Props", link: "#", active: true, dark: dark }) %>
|
|
8
|
+
<% end %>
|
|
9
|
+
<% end %>
|
|
10
|
+
<%= pb_rails("section_separator", props:{ dark: dark }) %>
|
|
11
|
+
<%= pb_rails("card/card_body", props: {}) do %>
|
|
12
|
+
<%= pb_rails("table", props: {container: false, disable_hover: true, dark: dark }) do %>
|
|
13
|
+
<thead>
|
|
14
|
+
<tr>
|
|
15
|
+
<th>Props</th>
|
|
16
|
+
<th>Type</th>
|
|
17
|
+
<th>Values</th>
|
|
18
|
+
</tr>
|
|
19
|
+
</thead>
|
|
20
|
+
<tbody>
|
|
21
|
+
<% global_prop_data.each do |key, value|%>
|
|
22
|
+
<tr>
|
|
23
|
+
<td>
|
|
24
|
+
<%= pb_rails("title", props: { text: key, tag: "h4", size: 4, dark: dark }) %>
|
|
25
|
+
</td>
|
|
26
|
+
<td>
|
|
27
|
+
<%= pb_rails("card", props: {
|
|
28
|
+
classname: "card",
|
|
29
|
+
padding: "xxs",
|
|
30
|
+
background: dark ? "dark" : "light",
|
|
31
|
+
border_none: true,
|
|
32
|
+
border_radius: "sm"
|
|
33
|
+
}) do %>
|
|
34
|
+
<%= pb_rails("body", props: {
|
|
35
|
+
classname: "kearning",
|
|
36
|
+
dark: dark
|
|
37
|
+
}) do %>
|
|
38
|
+
<% if key =~ /^padding|^margin/ %>
|
|
39
|
+
<%= "array" %>
|
|
40
|
+
<% else %>
|
|
41
|
+
<%= value[:type].to_s.downcase %>
|
|
42
|
+
<% end %>
|
|
43
|
+
<% end %>
|
|
44
|
+
<% end %>
|
|
45
|
+
</td>
|
|
46
|
+
<td>
|
|
47
|
+
<% if key =~ /^padding|^margin/ %>
|
|
48
|
+
<% padding_margin_values.each do |item| %>
|
|
49
|
+
<%= pb_rails("card", props: {
|
|
50
|
+
flex_direction: "row",
|
|
51
|
+
classname: "card",
|
|
52
|
+
padding: "xxs",
|
|
53
|
+
background: dark ? "dark" : "light",
|
|
54
|
+
border_none: true,
|
|
55
|
+
border_radius: "sm",
|
|
56
|
+
margin: "xxs"
|
|
57
|
+
}) do %>
|
|
58
|
+
<%= pb_rails("body", props: {
|
|
59
|
+
classname: "kearning",
|
|
60
|
+
dark: dark
|
|
61
|
+
}) do %>
|
|
62
|
+
<%= item %>
|
|
63
|
+
<% end %>
|
|
64
|
+
<% end %>
|
|
65
|
+
<% end %>
|
|
66
|
+
<% else %>
|
|
67
|
+
<% if value[:values].present? %>
|
|
68
|
+
<% value[:values].each do |item| %>
|
|
69
|
+
<% if item != nil %>
|
|
70
|
+
<%= pb_rails("card", props: {
|
|
71
|
+
flex_direction: "row",
|
|
72
|
+
classname: "card",
|
|
73
|
+
padding: "xxs",
|
|
74
|
+
background: dark ? "dark" : "light",
|
|
75
|
+
border_none: true,
|
|
76
|
+
border_radius: "sm",
|
|
77
|
+
margin: "xxs"
|
|
78
|
+
}) do %>
|
|
79
|
+
<%= pb_rails("body", props: {
|
|
80
|
+
classname: "kearning",
|
|
81
|
+
dark: dark
|
|
82
|
+
}) do %>
|
|
83
|
+
<%= item %>
|
|
84
|
+
<% end %>
|
|
85
|
+
<% end %>
|
|
86
|
+
<% end %>
|
|
87
|
+
<% end %>
|
|
88
|
+
<% end %>
|
|
89
|
+
<% end %>
|
|
90
|
+
</td>
|
|
91
|
+
</tr>
|
|
92
|
+
<% end %>
|
|
93
|
+
</tbody>
|
|
94
|
+
<% end %>
|
|
95
|
+
<% end %>
|
|
96
|
+
<% end %>
|
|
97
|
+
</div>
|
|
98
|
+
<% else %>
|
|
99
|
+
<div data-action="toggle" data-togglable="prop_example" class="pb--propsTable">
|
|
100
|
+
<%= pb_rails("title", props: { text: "Available Props", size: 3, margin_bottom: "sm", dark: dark }) %>
|
|
101
|
+
<%= pb_rails("card", props: { padding: "none", dark: dark }) do %>
|
|
102
|
+
<%= pb_rails("card/card_body", props: { padding: "sm" }) do %>
|
|
103
|
+
<%= pb_rails("nav", props: { orientation: "horizontal", variant: "subtle", dark: dark }) do %>
|
|
104
|
+
<% if local_prop_data.present? %>
|
|
105
|
+
<%= pb_rails("nav/item", props: { text: "Kit Props", link: "#", active: true, id: "local-button-active", classname: "local-active", dark: dark }) %>
|
|
106
|
+
<% end %>
|
|
107
|
+
<% if local_prop_data.present? %>
|
|
108
|
+
<%= pb_rails("nav/item", props: { text: "Kit Props", link: "#", id: "local-button", classname: "global-active", dark: dark }) %>
|
|
109
|
+
<% end %>
|
|
110
|
+
<%= pb_rails("nav/item", props: { text: "Global Props", link: "#", active: true, id: "global-button-active", classname: "global-active", dark: dark }) %>
|
|
111
|
+
<%= pb_rails("nav/item", props: { text: "Global Props", link: "#", id: "global-button", classname: "local-active", dark: dark }) %>
|
|
112
|
+
<% end %>
|
|
113
|
+
<% end %>
|
|
114
|
+
<%= pb_rails("section_separator", props: { dark: dark }) %>
|
|
115
|
+
<%= pb_rails("card/card_body", props: { dark: dark }) do %>
|
|
116
|
+
<%= pb_rails("table", props: {container: false, disable_hover: true, id: "global-prop-table", classname: "global-active", dark: dark}) do %>
|
|
117
|
+
<thead>
|
|
118
|
+
<tr>
|
|
119
|
+
<th>Props</th>
|
|
120
|
+
<th>Type</th>
|
|
121
|
+
<th>Values</th>
|
|
122
|
+
</tr>
|
|
123
|
+
</thead>
|
|
124
|
+
<tbody>
|
|
125
|
+
<% global_prop_data.each do |key, value|%>
|
|
126
|
+
<tr>
|
|
127
|
+
<td>
|
|
128
|
+
<%= pb_rails("title", props: { text: key, tag: "h4", size: 4, dark: dark }) %>
|
|
129
|
+
</td>
|
|
130
|
+
<td>
|
|
131
|
+
<%= pb_rails("card", props: {
|
|
132
|
+
classname: "card",
|
|
133
|
+
padding: "xxs",
|
|
134
|
+
background: dark ? "dark" : "light",
|
|
135
|
+
border_none: true,
|
|
136
|
+
border_radius: "sm"
|
|
137
|
+
}) do %>
|
|
138
|
+
<%= pb_rails("body", props: {
|
|
139
|
+
classname: "kearning",
|
|
140
|
+
dark: dark
|
|
141
|
+
}) do %>
|
|
142
|
+
<% if key =~ /^padding|^margin/ %>
|
|
143
|
+
<%= "array" %>
|
|
144
|
+
<% else %>
|
|
145
|
+
<%= value[:type].to_s.downcase %>
|
|
146
|
+
<% end %>
|
|
147
|
+
<% end %>
|
|
148
|
+
<% end %>
|
|
149
|
+
</td>
|
|
150
|
+
<td>
|
|
151
|
+
<% if key =~ /^padding|^margin/ %>
|
|
152
|
+
<% padding_margin_values.each do |item| %>
|
|
153
|
+
<%= pb_rails("card", props: {
|
|
154
|
+
flex_direction: "row",
|
|
155
|
+
classname: "card",
|
|
156
|
+
padding: "xxs",
|
|
157
|
+
background: dark ? "dark" : "light",
|
|
158
|
+
border_none: true,
|
|
159
|
+
border_radius: "sm",
|
|
160
|
+
margin: "xxs"
|
|
161
|
+
}) do %>
|
|
162
|
+
<%= pb_rails("body", props: {
|
|
163
|
+
classname: "kearning",
|
|
164
|
+
dark: dark
|
|
165
|
+
}) do %>
|
|
166
|
+
<%= item %>
|
|
167
|
+
<% end %>
|
|
168
|
+
<% end %>
|
|
169
|
+
<% end %>
|
|
170
|
+
<% else %>
|
|
171
|
+
<% if value[:values].present? %>
|
|
172
|
+
<% value[:values].each do |item| %>
|
|
173
|
+
<% if item != nil %>
|
|
174
|
+
<%= pb_rails("card", props: {
|
|
175
|
+
flex_direction: "row",
|
|
176
|
+
classname: "card",
|
|
177
|
+
padding: "xxs",
|
|
178
|
+
background: dark ? "dark" : "light",
|
|
179
|
+
border_none: true,
|
|
180
|
+
border_radius: "sm",
|
|
181
|
+
margin: "xxs"
|
|
182
|
+
}) do %>
|
|
183
|
+
<%= pb_rails("body", props: {
|
|
184
|
+
classname: "kearning",
|
|
185
|
+
dark: dark
|
|
186
|
+
}) do %>
|
|
187
|
+
<%= item %>
|
|
188
|
+
<% end %>
|
|
189
|
+
<% end %>
|
|
190
|
+
<% end %>
|
|
191
|
+
<% end %>
|
|
192
|
+
<% end %>
|
|
193
|
+
<% end %>
|
|
194
|
+
</td>
|
|
195
|
+
</tr>
|
|
196
|
+
<% end %>
|
|
197
|
+
</tbody>
|
|
198
|
+
<% end %>
|
|
199
|
+
<%= pb_rails("table", props: {container: false, disable_hover: true, id: "local-prop-table", classname: "local-active", dark: dark }) do %>
|
|
200
|
+
<thead>
|
|
201
|
+
<tr>
|
|
202
|
+
<th>Props</th>
|
|
203
|
+
<th>Type</th>
|
|
204
|
+
<th>Values</th>
|
|
205
|
+
<th>Default</th>
|
|
206
|
+
</tr>
|
|
207
|
+
</thead>
|
|
208
|
+
<tbody>
|
|
209
|
+
<% local_prop_data.each do |key, value|%>
|
|
210
|
+
<tr>
|
|
211
|
+
<td>
|
|
212
|
+
<%= pb_rails("title", props: { text: key, tag: "h4", size: 4, dark: dark }) %>
|
|
213
|
+
</td>
|
|
214
|
+
<td>
|
|
215
|
+
<%= pb_rails("card", props: {
|
|
216
|
+
classname: "card",
|
|
217
|
+
dark: dark,
|
|
218
|
+
padding: "xxs",
|
|
219
|
+
background: dark ? "dark" : "light",
|
|
220
|
+
border_none: true,
|
|
221
|
+
border_radius: "sm"
|
|
222
|
+
}) do %>
|
|
223
|
+
<%= pb_rails("body", props: {
|
|
224
|
+
classname: "kearning",
|
|
225
|
+
dark: dark
|
|
226
|
+
}) do %>
|
|
227
|
+
<%= value[:type].downcase %>
|
|
228
|
+
<% end %>
|
|
229
|
+
<% end %>
|
|
230
|
+
</td>
|
|
231
|
+
<td>
|
|
232
|
+
<% if value[:values].present? %>
|
|
233
|
+
<% value[:values].each do |item| %>
|
|
234
|
+
<% if item != nil %>
|
|
235
|
+
<%= pb_rails("card", props: {
|
|
236
|
+
flex_direction: "row",
|
|
237
|
+
classname: "card",
|
|
238
|
+
padding: "xxs",
|
|
239
|
+
background: dark ? "dark" : "light",
|
|
240
|
+
border_none: true,
|
|
241
|
+
border_radius: "sm",
|
|
242
|
+
margin: "xxs"
|
|
243
|
+
}) do %>
|
|
244
|
+
<%= pb_rails("body", props: {
|
|
245
|
+
classname: "kearning",
|
|
246
|
+
dark: dark,
|
|
247
|
+
}) do %>
|
|
248
|
+
<%= item %>
|
|
249
|
+
<% end %>
|
|
250
|
+
<% end %>
|
|
251
|
+
<% end %>
|
|
252
|
+
<% end %>
|
|
253
|
+
<% end %>
|
|
254
|
+
</td>
|
|
255
|
+
<td>
|
|
256
|
+
<% if value[:default].present? || value[:default].is_a?(TrueClass) || value[:default].is_a?(FalseClass) %>
|
|
257
|
+
<%= pb_rails("card", props: {
|
|
258
|
+
classname: "card",
|
|
259
|
+
padding: "xxs",
|
|
260
|
+
background: dark ? "dark" : "light",
|
|
261
|
+
border_none: true,
|
|
262
|
+
border_radius: "sm"
|
|
263
|
+
}) do %>
|
|
264
|
+
<%= pb_rails("body", props: {
|
|
265
|
+
classname: "kearning",
|
|
266
|
+
dark: dark,
|
|
267
|
+
}) do %>
|
|
268
|
+
<%= value[:default] %>
|
|
269
|
+
<% end %>
|
|
270
|
+
<% end %>
|
|
271
|
+
<% end %>
|
|
272
|
+
</td>
|
|
273
|
+
</tr>
|
|
274
|
+
<% end %>
|
|
275
|
+
</tbody>
|
|
276
|
+
<% end %>
|
|
277
|
+
<% end %>
|
|
278
|
+
<% end %>
|
|
279
|
+
</div>
|
|
280
|
+
<% end %>
|
|
281
|
+
|
|
282
|
+
<script>
|
|
283
|
+
|
|
284
|
+
const globalNavAndTable = document.querySelectorAll('.global-active');
|
|
285
|
+
const localNavAndTable = document.querySelectorAll('.local-active');
|
|
286
|
+
|
|
287
|
+
globalNavAndTable.forEach(element => {
|
|
288
|
+
element.style.display = 'none';
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
const globalButton = document.getElementById("global-button");
|
|
292
|
+
if (globalButton) {
|
|
293
|
+
globalButton.addEventListener("click", showGlobal);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
const localButton = document.getElementById("local-button");
|
|
297
|
+
if (localButton) {
|
|
298
|
+
localButton.addEventListener("click", showLocal);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function showGlobal() {
|
|
302
|
+
localNavAndTable.forEach(element => {
|
|
303
|
+
element.style.display = 'none';
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
globalNavAndTable.forEach(element => {
|
|
307
|
+
element.style.display = 'table';
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
function showLocal() {
|
|
312
|
+
localNavAndTable.forEach(element => {
|
|
313
|
+
element.style.display = 'table';
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
globalNavAndTable.forEach(element => {
|
|
317
|
+
element.style.display = 'none';
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
</script>
|