playbook_ui 13.9.0.pre.alpha.play845allkitsbytypes1271 → 13.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_docs/kit_example.html.erb +2 -2
- data/dist/menu.yml +110 -281
- data/lib/playbook/pb_doc_helper.rb +45 -60
- data/lib/playbook/version.rb +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3913dffced512fb212f3b0a4e1037abbf10a28420af5f13f666b62ac4b4a385d
|
4
|
+
data.tar.gz: c254328bfcb08db335a4c1a376cfbd83fc7f9eb981749a2041f6fd0394ab3a36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76ad54d6d06215fcc8ed33cf0186f8c6b23d850b21a2f58e99f5761a8eb33dfb9a8e7280692962134b53a0cb475663eba34fe7029394cdfa9e56b6ea905ddf6c
|
7
|
+
data.tar.gz: e897dae13452e396a6efda42c0d2ddeee117413c7bb9c9778fd781a024302c7946f420631c1cd9d01181ed132dc419a949356cc5a9541b6cc540583f4566134b
|
@@ -11,12 +11,12 @@
|
|
11
11
|
<% else %>
|
12
12
|
<div class="pb--kit-example-markdown pt_none markdown <%= dark ? "dark" : "" %>">
|
13
13
|
<%= pb_rails("caption", props: { text: example_title, dark: dark, margin_top: "md" }) %>
|
14
|
-
|
14
|
+
<%= render_markdown(description) %>
|
15
15
|
</div>
|
16
16
|
<% end %>
|
17
17
|
<% if show_code %>
|
18
18
|
<div class="markdown pb--kit-example-markdown markdown <%= dark ? "dark" : "" %>">
|
19
|
-
|
19
|
+
<%= render_markdown(description) %>
|
20
20
|
</div>
|
21
21
|
<div id="code-wrapper">
|
22
22
|
<div class="pb--codeControls">
|
data/dist/menu.yml
CHANGED
@@ -1,282 +1,111 @@
|
|
1
|
-
web: &web ["rails", "react"]
|
2
|
-
all: &all ["rails", "react", "swift"]
|
3
|
-
rails_only: &rails_only ["rails"]
|
4
|
-
react_only: &react_only ["react"]
|
5
|
-
|
6
1
|
kits:
|
7
|
-
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
- name: "icon"
|
118
|
-
components:
|
119
|
-
- name: "icon"
|
120
|
-
platforms: *web
|
121
|
-
- name: "icon_circle"
|
122
|
-
components:
|
123
|
-
- name: "icon_circle"
|
124
|
-
platforms: *web
|
125
|
-
- name: "icon_stat_value"
|
126
|
-
components:
|
127
|
-
- name: "icon_stat_value"
|
128
|
-
platforms: *web
|
129
|
-
- name: "icon_value"
|
130
|
-
components:
|
131
|
-
- name: "icon_value"
|
132
|
-
platforms: *web
|
133
|
-
- name: "image"
|
134
|
-
components:
|
135
|
-
- name: "image"
|
136
|
-
platforms: *web
|
137
|
-
- name: "layouts"
|
138
|
-
components:
|
139
|
-
- name: "flex"
|
140
|
-
platforms: *web
|
141
|
-
- name: "layout"
|
142
|
-
platforms: *web
|
143
|
-
- name: "lightbox"
|
144
|
-
components:
|
145
|
-
- name: "lightbox"
|
146
|
-
platforms: *react_only
|
147
|
-
- name: "list"
|
148
|
-
components:
|
149
|
-
- name: "list"
|
150
|
-
platforms: *web
|
151
|
-
- name: "loading_inline"
|
152
|
-
components:
|
153
|
-
- name: "loading_inline"
|
154
|
-
platforms: *web
|
155
|
-
- name: "map"
|
156
|
-
components:
|
157
|
-
- name: "map"
|
158
|
-
platforms: *react_only
|
159
|
-
- name: "nav"
|
160
|
-
components:
|
161
|
-
- name: "nav"
|
162
|
-
platforms: *web
|
163
|
-
- name: "pagination"
|
164
|
-
components:
|
165
|
-
- name: "pagination"
|
166
|
-
platforms: *rails_only
|
167
|
-
- name: "popover"
|
168
|
-
components:
|
169
|
-
- name: "popover"
|
170
|
-
platforms: *web
|
171
|
-
- name: "progress"
|
172
|
-
components:
|
173
|
-
- name: "progress_pills"
|
174
|
-
platforms: *web
|
175
|
-
- name: "progress_simple"
|
176
|
-
platforms: *web
|
177
|
-
- name: "progress_step"
|
178
|
-
platforms: *web
|
179
|
-
- name: "section_separator"
|
180
|
-
components:
|
181
|
-
- name: "section_separator"
|
182
|
-
platforms: *web
|
183
|
-
- name: "star_rating"
|
184
|
-
components:
|
185
|
-
- name: "star_rating"
|
186
|
-
platforms: *web
|
187
|
-
- name: "table"
|
188
|
-
components:
|
189
|
-
- name: "table"
|
190
|
-
platforms: *web
|
191
|
-
- name: "tags"
|
192
|
-
components:
|
193
|
-
- name: "tags"
|
194
|
-
platforms: *web
|
195
|
-
- name: "badge"
|
196
|
-
platforms: *web
|
197
|
-
- name: "hashtag"
|
198
|
-
platforms: *web
|
199
|
-
- name: "pill"
|
200
|
-
platforms: *all
|
201
|
-
- name: "timeline"
|
202
|
-
components:
|
203
|
-
- name: "timeline"
|
204
|
-
platforms: *web
|
205
|
-
- name: "time_and_date"
|
206
|
-
components:
|
207
|
-
- name: "date"
|
208
|
-
platforms: *web
|
209
|
-
- name: "date_range_inline"
|
210
|
-
platforms: *web
|
211
|
-
- name: "date_range_stacked"
|
212
|
-
platforms: *web
|
213
|
-
- name: "date_stacked"
|
214
|
-
platforms: *web
|
215
|
-
- name: "date_time"
|
216
|
-
platforms: *web
|
217
|
-
- name: "date_time_stacked"
|
218
|
-
platforms: *web
|
219
|
-
- name: "date_year_stacked"
|
220
|
-
platforms: *web
|
221
|
-
- name: "time"
|
222
|
-
platforms: *web
|
223
|
-
- name: "time_range_inline"
|
224
|
-
platforms: *web
|
225
|
-
- name: "time_stacked"
|
226
|
-
platforms: *web
|
227
|
-
- name: "timestamp"
|
228
|
-
platforms: *all
|
229
|
-
- name: "weekday_stacked"
|
230
|
-
platforms: *web
|
231
|
-
- name: "tooltip"
|
232
|
-
components:
|
233
|
-
- name: "tooltip"
|
234
|
-
platforms: *web
|
235
|
-
- name: "typography"
|
236
|
-
components:
|
237
|
-
- name: "body"
|
238
|
-
platforms: *web
|
239
|
-
- name: "caption"
|
240
|
-
platforms: *web
|
241
|
-
- name: "detail"
|
242
|
-
platforms: *web
|
243
|
-
- name: "title"
|
244
|
-
platforms: *web
|
245
|
-
- name: "typography_patterns"
|
246
|
-
components:
|
247
|
-
- name: "contact"
|
248
|
-
platforms: *web
|
249
|
-
- name: "currency"
|
250
|
-
platforms: *web
|
251
|
-
- name: "dashboard_value"
|
252
|
-
platforms: *web
|
253
|
-
- name: "home_address_street"
|
254
|
-
platforms: *web
|
255
|
-
- name: "label_pill"
|
256
|
-
platforms: *web
|
257
|
-
- name: "label_value"
|
258
|
-
platforms: *web
|
259
|
-
- name: "message"
|
260
|
-
platforms: *web
|
261
|
-
- name: "person"
|
262
|
-
platforms: *web
|
263
|
-
- name: "person_contact"
|
264
|
-
platforms: *web
|
265
|
-
- name: "source"
|
266
|
-
platforms: *web
|
267
|
-
- name: "stat_change"
|
268
|
-
platforms: *web
|
269
|
-
- name: "stat_value"
|
270
|
-
platforms: *web
|
271
|
-
- name: "title_count"
|
272
|
-
platforms: *web
|
273
|
-
- name: "title_detail"
|
274
|
-
platforms: *web
|
275
|
-
- name: "user_badge"
|
276
|
-
components:
|
277
|
-
- name: "user_badge"
|
278
|
-
platforms: *web
|
279
|
-
- name: "walkthrough"
|
280
|
-
components:
|
281
|
-
- name: "walkthrough"
|
282
|
-
platforms: *web
|
2
|
+
- avatars:
|
3
|
+
- avatar
|
4
|
+
- avatar_action_button
|
5
|
+
- multiple_users
|
6
|
+
- multiple_users_stacked
|
7
|
+
- user
|
8
|
+
- background
|
9
|
+
- bread_crumbs
|
10
|
+
- buttons:
|
11
|
+
- button
|
12
|
+
- button_toolbar
|
13
|
+
- circle_icon_button
|
14
|
+
- card
|
15
|
+
- collapsible
|
16
|
+
- charts_and_graphs:
|
17
|
+
- bar_graph
|
18
|
+
- circle_chart
|
19
|
+
- distribution_bar
|
20
|
+
- gauge
|
21
|
+
- legend
|
22
|
+
- line_graph
|
23
|
+
- treemap_chart
|
24
|
+
- dialog
|
25
|
+
- filter
|
26
|
+
- fixed_confirmation_toast
|
27
|
+
- forms:
|
28
|
+
- checkbox
|
29
|
+
- date_picker
|
30
|
+
- file_upload
|
31
|
+
- form
|
32
|
+
- form_group
|
33
|
+
- form_pill
|
34
|
+
- multi_level_select
|
35
|
+
- passphrase
|
36
|
+
- phone_number_input
|
37
|
+
- radio
|
38
|
+
- rich_text_editor
|
39
|
+
- select
|
40
|
+
- selectable_card
|
41
|
+
- selectable_card_icon
|
42
|
+
- selectable_icon
|
43
|
+
- selectable_list
|
44
|
+
- text_input
|
45
|
+
- textarea
|
46
|
+
- toggle
|
47
|
+
- typeahead
|
48
|
+
- highlight
|
49
|
+
- icon
|
50
|
+
- icon_circle
|
51
|
+
- icon_stat_value
|
52
|
+
- icon_value
|
53
|
+
- image
|
54
|
+
- layouts:
|
55
|
+
- flex
|
56
|
+
- layout
|
57
|
+
- lightbox
|
58
|
+
- list
|
59
|
+
- loading_inline
|
60
|
+
- map
|
61
|
+
- nav
|
62
|
+
- tags:
|
63
|
+
- badge
|
64
|
+
- hashtag
|
65
|
+
- pill
|
66
|
+
- pagination
|
67
|
+
- popover
|
68
|
+
- progress:
|
69
|
+
- progress_pills
|
70
|
+
- progress_simple
|
71
|
+
- progress_step
|
72
|
+
- section_separator
|
73
|
+
- star_rating
|
74
|
+
- table
|
75
|
+
- timeline
|
76
|
+
- time_and_date:
|
77
|
+
- date
|
78
|
+
- date_range_inline
|
79
|
+
- date_range_stacked
|
80
|
+
- date_stacked
|
81
|
+
- date_time
|
82
|
+
- date_time_stacked
|
83
|
+
- date_year_stacked
|
84
|
+
- time
|
85
|
+
- time_range_inline
|
86
|
+
- time_stacked
|
87
|
+
- timestamp
|
88
|
+
- weekday_stacked
|
89
|
+
- tooltip
|
90
|
+
- typography:
|
91
|
+
- body
|
92
|
+
- caption
|
93
|
+
- detail
|
94
|
+
- title
|
95
|
+
- typography_patterns:
|
96
|
+
- contact
|
97
|
+
- currency
|
98
|
+
- dashboard_value
|
99
|
+
- home_address_street
|
100
|
+
- label_pill
|
101
|
+
- label_value
|
102
|
+
- message
|
103
|
+
- person
|
104
|
+
- person_contact
|
105
|
+
- source
|
106
|
+
- stat_change
|
107
|
+
- stat_value
|
108
|
+
- title_count
|
109
|
+
- title_detail
|
110
|
+
- user_badge
|
111
|
+
- walkthrough
|
@@ -7,75 +7,61 @@ module Playbook
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def pb_kit(kit: "", type: "rails", show_code: true, limit_examples: false, dark_mode: false)
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
end.join.yield_self(&method(:raw))
|
23
|
-
end
|
10
|
+
examples = pb_doc_kit_examples(kit, type)
|
11
|
+
examples = examples.first(1) if limit_examples
|
12
|
+
examples.map do |example|
|
13
|
+
pb_rails "docs/kit_example", props: {
|
14
|
+
kit: kit,
|
15
|
+
example_title: example.values.first,
|
16
|
+
example_key: example.keys.first,
|
17
|
+
show_code: show_code,
|
18
|
+
type: type,
|
19
|
+
dark: dark_mode,
|
20
|
+
}
|
21
|
+
end.join.yield_self(&method(:raw))
|
24
22
|
end
|
25
23
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
# Initialize an empty string to store the rendered HTML
|
31
|
-
rendered_html = ""
|
24
|
+
def nav_hash_array(link)
|
25
|
+
link.first.last
|
26
|
+
end
|
32
27
|
|
33
|
-
|
28
|
+
# Deal with lists of kits, used in Playbook doc and Externally
|
29
|
+
# rubocop:disable Style/StringConcatenation
|
30
|
+
def pb_kits(type: "rails", limit_examples: false, dark_mode: false, method: get_kits)
|
31
|
+
display_kits = []
|
32
|
+
kits = method
|
34
33
|
kits.each do |kit|
|
35
|
-
kit
|
36
|
-
|
37
|
-
|
34
|
+
if kit.is_a?(Hash)
|
35
|
+
nav_hash_array(kit).each do |sub_kit|
|
36
|
+
display_kits << render_pb_doc_kit(sub_kit, type, limit_examples, false, dark_mode)
|
37
|
+
end
|
38
|
+
else
|
39
|
+
display_kits << render_pb_doc_kit(kit, type, limit_examples, false, dark_mode)
|
38
40
|
end
|
39
41
|
end
|
40
|
-
|
41
|
-
# Return the rendered HTML as safe HTML
|
42
|
-
rendered_html.html_safe
|
42
|
+
raw("<div class='pb--docItem'>" + display_kits.join("</div><div class='pb--docItem'>") + "</div>")
|
43
43
|
end
|
44
|
+
# rubocop:enable Style/StringConcatenation
|
44
45
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
kits["kits"].select do |kit|
|
50
|
-
kit["components"].any? { |component| component["platforms"].include?(type) }
|
51
|
-
end
|
46
|
+
# rubocop:disable Naming/AccessorMethodName
|
47
|
+
def get_kits
|
48
|
+
menu = YAML.load_file(Playbook::Engine.root.join("dist/menu.yml"))
|
49
|
+
menu["kits"]
|
52
50
|
end
|
53
51
|
|
54
|
-
def
|
55
|
-
|
56
|
-
|
57
|
-
YAML.load_file(Playbook::Engine.root.join("dist/menu.yml"))["kits"].each do |kit|
|
58
|
-
kit_name = kit["name"]
|
59
|
-
components = kit["components"].map { |c| c["name"] }
|
60
|
-
|
61
|
-
all_kits << if components.size == 1
|
62
|
-
components.first
|
63
|
-
else
|
64
|
-
{ kit_name => components }
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
all_kits
|
52
|
+
def get_kits_pb_website
|
53
|
+
menu = YAML.load_file(Rails.root.join("config/menu.yml"))
|
54
|
+
menu["kits"]
|
69
55
|
end
|
56
|
+
# rubocop:enable Naming/AccessorMethodName
|
70
57
|
|
71
58
|
# rubocop:disable Style/OptionalBooleanParameter
|
72
|
-
def render_pb_doc_kit(
|
73
|
-
title = pb_doc_render_clickable_title(
|
59
|
+
def render_pb_doc_kit(kit, type, limit_examples, code = true, dark_mode = false)
|
60
|
+
title = pb_doc_render_clickable_title(kit, type)
|
74
61
|
ui = raw("<div class='pb--docItem-ui'>
|
75
|
-
#{pb_kit(kit:
|
62
|
+
#{pb_kit(kit: kit, type: type, show_code: code, limit_examples: limit_examples, dark_mode: dark_mode)}</div>")
|
76
63
|
title + ui
|
77
64
|
end
|
78
|
-
|
79
65
|
# rubocop:enable Style/OptionalBooleanParameter
|
80
66
|
|
81
67
|
private
|
@@ -95,24 +81,23 @@ module Playbook
|
|
95
81
|
end
|
96
82
|
end
|
97
83
|
|
98
|
-
|
99
|
-
def pb_doc_render_clickable_title(kit_name, type)
|
84
|
+
def pb_doc_render_clickable_title(kit, type)
|
100
85
|
url = "#"
|
101
86
|
begin
|
102
87
|
url = case type
|
103
88
|
when "react"
|
104
|
-
kit_show_reacts_path(
|
89
|
+
kit_show_reacts_path(kit)
|
105
90
|
when "swift"
|
106
|
-
kit_show_swift_path(
|
91
|
+
kit_show_swift_path(kit)
|
107
92
|
else
|
108
|
-
kit_show_path(
|
93
|
+
kit_show_path(kit)
|
109
94
|
end
|
110
95
|
# FIXME: this is here because this helper generates a link for playbook website,
|
111
96
|
# but shouldn't do anything when used elsewhere
|
112
97
|
rescue
|
113
|
-
puts "Kit Path Not
|
98
|
+
puts "Kit Path Not Avaliable"
|
114
99
|
end
|
115
|
-
render inline: "<a href='#{url}'>#{pb_rails(:title, props: { text: pb_kit_title(
|
100
|
+
render inline: "<a href='#{url}'>#{pb_rails(:title, props: { text: pb_kit_title(kit), tag: 'h3', size: 2 })}</a>"
|
116
101
|
end
|
117
102
|
end
|
118
103
|
end
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.9.0
|
4
|
+
version: 13.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
8
8
|
- Power Devs
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-10-
|
12
|
+
date: 2023-10-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -2639,7 +2639,7 @@ homepage: https://playbook.powerapp.cloud/
|
|
2639
2639
|
licenses:
|
2640
2640
|
- ISC
|
2641
2641
|
metadata: {}
|
2642
|
-
post_install_message:
|
2642
|
+
post_install_message:
|
2643
2643
|
rdoc_options: []
|
2644
2644
|
require_paths:
|
2645
2645
|
- lib
|
@@ -2650,12 +2650,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2650
2650
|
version: '0'
|
2651
2651
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2652
2652
|
requirements:
|
2653
|
-
- - "
|
2653
|
+
- - ">="
|
2654
2654
|
- !ruby/object:Gem::Version
|
2655
|
-
version:
|
2655
|
+
version: '0'
|
2656
2656
|
requirements: []
|
2657
2657
|
rubygems_version: 3.3.7
|
2658
|
-
signing_key:
|
2658
|
+
signing_key:
|
2659
2659
|
specification_version: 4
|
2660
2660
|
summary: Playbook Design System
|
2661
2661
|
test_files: []
|