playbook_ui 13.8.0.pre.alpha.play845allkitsbytypes1255 → 13.8.0.pre.alpha.play845allkitsbytypes1257

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60b1c622bab5811e437d84be4b5aa3269f2b7a3fc4cf11bf8ef325cda4fdbc14
4
- data.tar.gz: 06f4962b4e93e9abf883550181307db371d904c440f821a0b389d0d64bb3aa24
3
+ metadata.gz: fca3285826a75f3b9d44a0e5726d24854e107cce2b3f7a894eec629c6f397a6c
4
+ data.tar.gz: cd5b05f22467153ea63f45b7f4cfa7abea00b2c3b5122dfdcaf182d9d2eea403
5
5
  SHA512:
6
- metadata.gz: cd24107b067f2632eb1dd6d39cea6bcd61867ed69f2ba82803d08b2a1c7ee4bc4894cd7a6cfeb08073524f26901421c13cd4993507053d29f9b226aeb4fd22e0
7
- data.tar.gz: 34aa5ca2497e3e0c09df4ab50aecabac49ad6f46971f0bcca44be15d9126595e4c7054436f19c3b7ecde0ddd1a65ea345e1c57b77123d03223571754c7238687
6
+ metadata.gz: 6235ebd6e4f39f1a17832e24bd5d281accd57d0d277131a16d8007bcae0fc6e6a22a3c03dd0a0348e6162e312cbe6d1e282af7dc0ca16c0dce3e845459cf73c9
7
+ data.tar.gz: d51721b0949f7604806a15a5b8d41a8f107a702570586292580325cf5ea844d99e99a149cb80119a50b671df20b83fc7514063d5e9261224c106131de4edca6b
@@ -39,7 +39,7 @@ module Playbook
39
39
  kits = YAML.load_file(Playbook::Engine.root.join("dist/menu.yml")) || []
40
40
 
41
41
  # Filter kits that have at least one component compatible with the type
42
- kits.select do |kit|
42
+ kits["kits"].select do |kit|
43
43
  kit["components"].any? { |component| component["platforms"].include?(type) }
44
44
  end
45
45
  end
@@ -47,7 +47,7 @@ module Playbook
47
47
  def aggregate_kits
48
48
  all_kits = []
49
49
 
50
- YAML.load_file(Playbook::Engine.root.join("dist/menu.yml")).each do |kit|
50
+ YAML.load_file(Playbook::Engine.root.join("dist/menu.yml"))["kits"].each do |kit|
51
51
  kit_name = kit["name"]
52
52
  components = kit["components"].map { |c| c["name"] }
53
53
 
@@ -63,18 +63,13 @@ module Playbook
63
63
 
64
64
  # rubocop:disable Style/OptionalBooleanParameter
65
65
  def render_pb_doc_kit(kit_name, type, limit_examples, code = true, dark_mode = false)
66
- parent_kit = YAML.load_file(Playbook::Engine.root.join("dist/menu.yml")).find { |kit| kit["name"] == kit_name }
66
+ parent_kit = YAML.load_file(Playbook::Engine.root.join("dist/menu.yml"))["kits"].find { |kit| kit["name"] == kit_name }
67
67
 
68
68
  # Initialize component_content as an empty string
69
69
  component_content = ""
70
- title = ""
71
70
 
72
- # Check if parent_kit is nil
73
- if parent_kit.nil?
74
- title = pb_doc_render_clickable_title(kit_name, type)
75
- component_content = raw("<div class='pb--docItem-ui'>
76
- #{pb_kit(kit: kit_name, type: type, show_code: code, limit_examples: limit_examples, dark_mode: dark_mode)}</div>")
77
- else
71
+ # Check if parent_kit is not nil
72
+ if parent_kit
78
73
  # Filter components based on the specified type
79
74
  components = parent_kit["components"].select { |component| component["platforms"].include?(type) }
80
75
 
@@ -86,8 +81,8 @@ module Playbook
86
81
 
87
82
  # Render the component UI content with the same styles/tags as the parent
88
83
  component_ui = raw("<div class='pb--docItem-ui'>
89
- #{pb_kit(kit: component_name, type: type, show_code: code, limit_examples: limit_examples, dark_mode: dark_mode)}
90
- </div>")
84
+ #{pb_kit(kit: component_name, type: type, show_code: code, limit_examples: limit_examples, dark_mode: dark_mode)}
85
+ </div>")
91
86
 
92
87
  # Combine the component name and component UI content
93
88
  "#{title}#{component_ui}"
@@ -96,11 +91,7 @@ module Playbook
96
91
  end
97
92
 
98
93
  # Combine the component content and UI content for the parent kit
99
- if parent_kit.nil?
100
- "#{title}#{component_content}".to_s
101
- else
102
- component_content.to_s.to_s
103
- end
94
+ component_content.to_s.to_s
104
95
  end
105
96
  # rubocop:enable Style/OptionalBooleanParameter
106
97
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "13.8.0"
5
- VERSION = "13.8.0.pre.alpha.play845allkitsbytypes1255"
5
+ VERSION = "13.8.0.pre.alpha.play845allkitsbytypes1257"
6
6
  end
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.8.0.pre.alpha.play845allkitsbytypes1255
4
+ version: 13.8.0.pre.alpha.play845allkitsbytypes1257
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX