playbook_ui 13.6.0.pre.alpha.tiptapreacthookformbug1210 → 13.7.0.pre.alpha.play845allkitsbytypes1231
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_body/docs/_body_truncate.html.erb +12 -0
- data/app/pb_kits/playbook/pb_body/docs/_body_truncate.jsx +50 -0
- data/app/pb_kits/playbook/pb_body/docs/_body_truncate.md +4 -0
- data/app/pb_kits/playbook/pb_body/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_body/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_collapsible/_helper_functions.ts +26 -22
- data/app/pb_kits/playbook/pb_collapsible/index.js +4 -0
- data/app/pb_kits/playbook/pb_title/_title.scss +15 -14
- data/app/pb_kits/playbook/pb_title/_title.tsx +3 -3
- data/app/pb_kits/playbook/pb_title/_title_mixin.scss +6 -6
- data/app/pb_kits/playbook/pb_title/docs/_title_truncate.html.erb +12 -0
- data/app/pb_kits/playbook/pb_title/docs/_title_truncate.jsx +53 -0
- data/app/pb_kits/playbook/pb_title/docs/_title_truncate.md +4 -0
- data/app/pb_kits/playbook/pb_title/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_title/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_title/title.rb +1 -1
- data/dist/menu.yml +235 -110
- data/dist/playbook-rails.js +5 -5
- data/lib/playbook/pb_doc_helper.rb +40 -17
- data/lib/playbook/version.rb +2 -2
- metadata +8 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module
|
3
|
+
module PlaybookWebsite
|
4
4
|
module PbDocHelper
|
5
5
|
def pb_kit_title(title)
|
6
6
|
title.remove("pb_").titleize.tr("_", " ")
|
@@ -27,33 +27,56 @@ module Playbook
|
|
27
27
|
|
28
28
|
# Deal with lists of kits, used in Playbook doc and Externally
|
29
29
|
# rubocop:disable Style/StringConcatenation
|
30
|
-
def pb_kits(type: "rails", limit_examples: false, dark_mode: false
|
30
|
+
def pb_kits(type: "rails", limit_examples: false, dark_mode: false)
|
31
31
|
display_kits = []
|
32
|
-
kits =
|
32
|
+
kits = get_kits(type)
|
33
33
|
kits.each do |kit|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
display_kits << render_pb_doc_kit(kit, type, limit_examples, false, dark_mode)
|
34
|
+
nav_array = nav_hash_array(kit)
|
35
|
+
next unless nav_array.is_a?(Array)
|
36
|
+
|
37
|
+
nav_array.each do |sub_kit|
|
38
|
+
display_kits << render_pb_doc_kit(sub_kit, type, limit_examples, false, dark_mode)
|
40
39
|
end
|
41
40
|
end
|
42
41
|
raw("<div class='pb--docItem'>" + display_kits.join("</div><div class='pb--docItem'>") + "</div>")
|
43
42
|
end
|
44
43
|
# rubocop:enable Style/StringConcatenation
|
45
44
|
|
46
|
-
|
47
|
-
|
48
|
-
menu = YAML.load_file(Playbook::Engine.root.join("dist/menu.yml"))
|
49
|
-
menu["kits"]
|
45
|
+
def get_kits(type = "rails")
|
46
|
+
MENU["kits"][type]
|
50
47
|
end
|
51
48
|
|
52
|
-
def
|
53
|
-
|
54
|
-
|
49
|
+
def aggregate_kits
|
50
|
+
all_kits = []
|
51
|
+
|
52
|
+
# Loop over each type (rails, react, swift, etc.)
|
53
|
+
MENU["kits"].each do |_type, kits|
|
54
|
+
kits.each do |kit|
|
55
|
+
case kit
|
56
|
+
when Hash
|
57
|
+
kit_name = kit.keys.first
|
58
|
+
existing_kit = all_kits.find { |k| k.is_a?(Hash) && k.keys.first == kit_name }
|
59
|
+
|
60
|
+
if existing_kit
|
61
|
+
existing_kit[kit_name] += kit[kit_name] unless kit[kit_name].nil?
|
62
|
+
existing_kit[kit_name].uniq!
|
63
|
+
existing_kit[kit_name].sort!
|
64
|
+
else
|
65
|
+
all_kits << { kit_name => kit[kit_name] }
|
66
|
+
end
|
67
|
+
when String
|
68
|
+
all_kits << kit unless all_kits.include?(kit)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# Sort the top-level entries
|
74
|
+
all_kits.sort_by! do |kit|
|
75
|
+
kit.is_a?(Hash) ? kit.keys.first : kit
|
76
|
+
end
|
77
|
+
|
78
|
+
all_kits
|
55
79
|
end
|
56
|
-
# rubocop:enable Naming/AccessorMethodName
|
57
80
|
|
58
81
|
# rubocop:disable Style/OptionalBooleanParameter
|
59
82
|
def render_pb_doc_kit(kit, type, limit_examples, code = true, dark_mode = false)
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.
|
4
|
+
version: 13.7.0.pre.alpha.play845allkitsbytypes1231
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-09-
|
12
|
+
date: 2023-09-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -398,6 +398,9 @@ files:
|
|
398
398
|
- app/pb_kits/playbook/pb_body/docs/_body_styled.html.erb
|
399
399
|
- app/pb_kits/playbook/pb_body/docs/_body_styled.jsx
|
400
400
|
- app/pb_kits/playbook/pb_body/docs/_body_styled.md
|
401
|
+
- app/pb_kits/playbook/pb_body/docs/_body_truncate.html.erb
|
402
|
+
- app/pb_kits/playbook/pb_body/docs/_body_truncate.jsx
|
403
|
+
- app/pb_kits/playbook/pb_body/docs/_body_truncate.md
|
401
404
|
- app/pb_kits/playbook/pb_body/docs/_description.md
|
402
405
|
- app/pb_kits/playbook/pb_body/docs/_footer.md
|
403
406
|
- app/pb_kits/playbook/pb_body/docs/example.yml
|
@@ -2281,6 +2284,9 @@ files:
|
|
2281
2284
|
- app/pb_kits/playbook/pb_title/docs/_title_responsive.html.erb
|
2282
2285
|
- app/pb_kits/playbook/pb_title/docs/_title_responsive.jsx
|
2283
2286
|
- app/pb_kits/playbook/pb_title/docs/_title_responsive.md
|
2287
|
+
- app/pb_kits/playbook/pb_title/docs/_title_truncate.html.erb
|
2288
|
+
- app/pb_kits/playbook/pb_title/docs/_title_truncate.jsx
|
2289
|
+
- app/pb_kits/playbook/pb_title/docs/_title_truncate.md
|
2284
2290
|
- app/pb_kits/playbook/pb_title/docs/example.yml
|
2285
2291
|
- app/pb_kits/playbook/pb_title/docs/index.js
|
2286
2292
|
- app/pb_kits/playbook/pb_title/title.html.erb
|