playbook-ui 12.25.0 → 12.26.0
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/CHANGELOG.md +7 -3
- package/dist/app/components/playbook/pb_docs/kit_api.html.erb +1 -1
- package/dist/app/components/playbook/pb_docs/kit_example.html.erb +14 -8
- package/dist/app/components/playbook/pb_docs/kit_example.rb +9 -2
- package/dist/menu.yml +1 -0
- package/dist/pb_doc_helper.rb +4 -1
- package/dist/playbook-doc.js +10 -10
- package/dist/playbook-rails.js +7 -7
- package/dist/playbook.css +1 -1
- package/dist/playbook.js +15 -15
- package/package.json +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
# Styling typography just got easier!
|
|
1
2
|
|
|
3
|
+

|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
Sometimes you don't need all the styles that ship with the Date kit.
|
|
6
|
+
We have added a simple boolean prop called "unstyled" that puts control in your hands.
|
|
7
|
+
You can now wrap our Date kit with any of our typography kits (Title, Body, Caption, etc) and the date kit will inherit that component's styles! 🎉
|
|
4
8
|
|
|
5
|
-
[
|
|
9
|
+
[12.25.0](https://github.com/powerhome/playbook/tree/12.25.0) full list of changes:
|
|
6
10
|
|
|
7
11
|
**Kit Enhancements:**
|
|
8
12
|
|
|
@@ -12,7 +16,7 @@
|
|
|
12
16
|
**Improvements:**
|
|
13
17
|
|
|
14
18
|
- Changelog Improvements [\#2591](https://github.com/powerhome/playbook/pull/2591) ([jasoncypret](https://github.com/jasoncypret))
|
|
15
|
-
- Separation of Markdown & PBDocs Dependencies from Playbook
|
|
19
|
+
- Separation of Markdown & PBDocs Dependencies from Playbook Library [\#2527](https://github.com/powerhome/playbook/pull/2527) ([jasoncypret](https://github.com/jasoncypret))
|
|
16
20
|
|
|
17
21
|
# Responsive Components in Rapid Time: Introducing Global Responsive Spacing Props for React and Rails Components.
|
|
18
22
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<%= pb_rails("nav/item", props: { text: "Global Props", link: "#", active: true, dark: dark }) %>
|
|
8
8
|
<% end %>
|
|
9
9
|
<% end %>
|
|
10
|
-
<%= pb_rails("section_separator", dark: dark) %>
|
|
10
|
+
<%= pb_rails("section_separator", props:{ dark: dark }) %>
|
|
11
11
|
<%= pb_rails("card/card_body", props: {}) do %>
|
|
12
12
|
<%= pb_rails("table", props: {container: false, disable_hover: true, dark: dark }) do %>
|
|
13
13
|
<thead>
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
<% example_html = ERB.new(example).result %>
|
|
2
2
|
|
|
3
3
|
<%= pb_rails("card", props: { classname: "pb--doc", padding: "none", dark: dark }) do %>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
<% unless (action_name == "kit_show_swift") %>
|
|
5
|
+
<div class="pb--kit-example">
|
|
6
|
+
<%= pb_rails("caption", props: { text: example_title, dark: dark }) %>
|
|
7
|
+
<br />
|
|
8
|
+
<%= example %>
|
|
9
|
+
<br>
|
|
10
|
+
</div>
|
|
11
|
+
<% else %>
|
|
12
|
+
<div class="pb--kit-example-markdown pt_none markdown <%= dark ? "dark" : "" %>">
|
|
13
|
+
<%= pb_rails("caption", props: { text: example_title, dark: dark, margin_top: "md" }) %>
|
|
14
|
+
<%= render_markdown(description) %>
|
|
15
|
+
</div>
|
|
16
|
+
<% end %>
|
|
11
17
|
<% if show_code %>
|
|
12
|
-
<div class="markdown pb--kit-example-markdown <%= dark ? "dark" : "" %>">
|
|
18
|
+
<div class="markdown pb--kit-example-markdown markdown <%= dark ? "dark" : "" %>">
|
|
13
19
|
<%= render_markdown(description) %>
|
|
14
20
|
</div>
|
|
15
21
|
<div id="code-wrapper">
|
|
@@ -8,7 +8,7 @@ module Playbook
|
|
|
8
8
|
prop :example_title, type: Playbook::Props::String, required: true
|
|
9
9
|
prop :example_key, type: Playbook::Props::String, required: true
|
|
10
10
|
prop :show_code, type: Playbook::Props::Boolean, default: true
|
|
11
|
-
prop :type, type: Playbook::Props::Enum, values: %w[rails react], default: "rails"
|
|
11
|
+
prop :type, type: Playbook::Props::Enum, values: %w[rails react swift], default: "rails"
|
|
12
12
|
prop :dark, type: Playbook::Props::Boolean, default: false
|
|
13
13
|
|
|
14
14
|
include PlaybookWebsite::Markdown::Helper
|
|
@@ -18,6 +18,9 @@ module Playbook
|
|
|
18
18
|
render inline: source
|
|
19
19
|
elsif type == "react"
|
|
20
20
|
react_component example_key.camelize, { dark: dark }
|
|
21
|
+
elsif type == "swift"
|
|
22
|
+
## render the markdown file
|
|
23
|
+
render inline: source
|
|
21
24
|
end
|
|
22
25
|
end
|
|
23
26
|
|
|
@@ -31,7 +34,11 @@ module Playbook
|
|
|
31
34
|
|
|
32
35
|
def source
|
|
33
36
|
@source ||= begin
|
|
34
|
-
extension = type == "
|
|
37
|
+
extension = if type == "rails"
|
|
38
|
+
"html.erb"
|
|
39
|
+
else
|
|
40
|
+
type == "swift" ? "swift" : "jsx"
|
|
41
|
+
end
|
|
35
42
|
stringified_code = read_kit_file("docs", "_#{example_key}.#{extension}")
|
|
36
43
|
sanitize_code(stringified_code)
|
|
37
44
|
end
|
package/dist/menu.yml
CHANGED
package/dist/pb_doc_helper.rb
CHANGED
|
@@ -84,8 +84,11 @@ module PlaybookWebsite
|
|
|
84
84
|
def pb_doc_render_clickable_title(kit, type)
|
|
85
85
|
url = "#"
|
|
86
86
|
begin
|
|
87
|
-
url =
|
|
87
|
+
url = case type
|
|
88
|
+
when "react"
|
|
88
89
|
kit_show_reacts_path(kit)
|
|
90
|
+
when "swift"
|
|
91
|
+
kit_show_swift_path(kit)
|
|
89
92
|
else
|
|
90
93
|
kit_show_path(kit)
|
|
91
94
|
end
|