playbook_ui 5.2.0.pre.alpha2 → 5.2.0.pre.alpha3
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/pb_kits/playbook/config/_kit_example.html.erb +9 -0
- data/app/pb_kits/playbook/config/_kit_samples_list.html.erb +3 -0
- data/app/pb_kits/playbook/config/_kit_ui.html.erb +40 -0
- data/app/pb_kits/playbook/config/_pb_kit_api.html.erb +18 -0
- data/lib/playbook/version.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46fbb73c865819abbac500998ae22cc4c167f86a767793b5cab1681715054411
|
4
|
+
data.tar.gz: 963e188bc22b619fab3b1897048e64f5a4fa4991a9e7f428063f78e431ba15f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5ae25d38566bd35e0dda147096df19966529ea907c205b19ff7237ff01b0a05784db7c3299d3fd53612539d2ed4ccf95f83090c0ffb1048218f30bea45fc5fa
|
7
|
+
data.tar.gz: 64e849267b0c41ccfaef96dc9b8839506499eb657b5433a37d1e5c6198cac427a3b958544840253bae0ecb870de0f9653877c23b314cafdab12016f95f936226
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%if !@kit_examples[:examples].nil? %>
|
2
|
+
<% @kit_examples[:examples].each do |kit_example| %>
|
3
|
+
<% kit_example.each do |key, item| %>
|
4
|
+
<div class="pb--doc <%=key.include?('_dark') ? 'dark_ui' : 'light_ui'%>">
|
5
|
+
<%= render partial: "config/kit_ui", locals: { key: key, type: @type, item: item, show_code: @show_code } %>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
8
|
+
<% end %>
|
9
|
+
<% end %>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
|
2
|
+
<% type ||= "rails" %>
|
3
|
+
|
4
|
+
<% if type == "react" %>
|
5
|
+
<% contents = File.read("#{Playbook::Engine.root}/app/pb_kits/playbook/pb_#{@kit_examples[:kit]}/docs/_#{key}.jsx") %>
|
6
|
+
<% else %>
|
7
|
+
<% contents = File.read("#{Playbook::Engine.root}/app/pb_kits/playbook/pb_#{@kit_examples[:kit]}/docs/_#{key}.html.erb") %>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<div class="pb--kit-example">
|
11
|
+
<%= pb_rails("caption", props: { text: item }) %>
|
12
|
+
<br>
|
13
|
+
<% if type == "rails" %>
|
14
|
+
<%= render partial: "pb_#{@kit_examples[:kit]}/docs/#{key}" %>
|
15
|
+
<% elsif type == "react" %>
|
16
|
+
<%= pb_react(key.camelize) %>
|
17
|
+
<% end %>
|
18
|
+
<br>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<% if @show_code%>
|
22
|
+
<div class="markdown pb--kit-example-markdown">
|
23
|
+
<%= markdown(get_per_sample_descriptions(@kit_examples[:kit], key)) %>
|
24
|
+
</div>
|
25
|
+
<div class="pb--codeControls">
|
26
|
+
<ul>
|
27
|
+
<li>
|
28
|
+
<a href="#" data-toggle="code_example">Code Example</a>
|
29
|
+
</li>
|
30
|
+
</ul>
|
31
|
+
</div>
|
32
|
+
<div class="pb--codeCopy" data-action="toggle" data-togglable="code_example" style="display: none" >
|
33
|
+
<a href="#" data-toggle="false" class="pb--close-toggle">Close</a>
|
34
|
+
<% if type == "rails" %>
|
35
|
+
<pre class="highlight"><%= raw rouge(contents, "erb") %></pre>
|
36
|
+
<% elsif type == "react" %>
|
37
|
+
<pre class="highlight"><%= raw rouge(contents, "react")%></pre>
|
38
|
+
<% end %>
|
39
|
+
</div>
|
40
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if defined?(@kit_api) && @kit_api.present? %>
|
2
|
+
<div data-action="toggle" data-togglable="prop_example" class="pb--propsTable">
|
3
|
+
<table class="pb--propsTable--table">
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<th>Available Props</th>
|
7
|
+
</tr>
|
8
|
+
</thead>
|
9
|
+
<tbody>
|
10
|
+
<% @kit_api.each_with_index do |(key,value),index| %>
|
11
|
+
<tr>
|
12
|
+
<td><%= key %></td>
|
13
|
+
</tr>
|
14
|
+
<% end %>
|
15
|
+
</tbody>
|
16
|
+
</table>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
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: 5.2.0.pre.
|
4
|
+
version: 5.2.0.pre.alpha3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -388,6 +388,10 @@ files:
|
|
388
388
|
- app/helpers/playbook/pb_sample_helper.rb
|
389
389
|
- app/helpers/playbook/redcarpet_helper.rb
|
390
390
|
- app/pb_kits/playbook/_playbook.scss
|
391
|
+
- app/pb_kits/playbook/config/_kit_example.html.erb
|
392
|
+
- app/pb_kits/playbook/config/_kit_samples_list.html.erb
|
393
|
+
- app/pb_kits/playbook/config/_kit_ui.html.erb
|
394
|
+
- app/pb_kits/playbook/config/_pb_kit_api.html.erb
|
391
395
|
- app/pb_kits/playbook/data/menu.yml
|
392
396
|
- app/pb_kits/playbook/index.js
|
393
397
|
- app/pb_kits/playbook/pb_avatar/_avatar.html.erb
|