playbook_ui 12.23.0.pre.alpha.play698responsivespacingglobalprop703 → 12.24.0.pre.alpha.alphatestforselfhostfak720
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_avatar/docs/_avatar_swift.md +1 -0
- data/app/pb_kits/playbook/pb_avatar/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_card/_card.tsx +1 -0
- data/app/pb_kits/playbook/pb_docs/kit_example.html.erb +6 -1
- data/app/pb_kits/playbook/pb_docs/kit_example.rb +13 -2
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon/icon.rb +1 -1
- data/app/pb_kits/playbook/pb_title/_title.scss +1 -0
- data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.html.erb +1 -0
- data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.jsx +11 -6
- data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.md +2 -2
- data/lib/playbook/pb_doc_helper.rb +4 -1
- data/lib/playbook/version.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3b13169f586e341df32591e1f4eb45be130542c63cd46fe75eb5531c4bbf24f
|
4
|
+
data.tar.gz: 83c4990a0869cc25b21de2b66fc9a9e75c795c0c0059dc74b36c2ce4120610e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60b9622512359115f3de5947c595579c1b017f2796602cbc2bf4fd70fc8f3289290edb4689db5fbdb41d9d00c9949824f75842f6815b4fefaaa3ad8e29b64e9b
|
7
|
+
data.tar.gz: 44815fdcd43a9648420d85d9bebee3a167f7b22841ced941637c4f989d7b6c0d18f06f1398ca8083e5f0e81093ee8d01342782b6d19e618a85818ab7fa2be71b
|
@@ -0,0 +1 @@
|
|
1
|
+
![image for avatar](https://images.unsplash.com/photo-1684237276530-a562fa8338b1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=580&q=80)
|
@@ -7,7 +7,12 @@
|
|
7
7
|
<%= example %>
|
8
8
|
<br>
|
9
9
|
</div>
|
10
|
-
|
10
|
+
|
11
|
+
<% if (action_name == "kit_show_swift") %>
|
12
|
+
<div class="pb--kit-example-markdown pt_none <%= dark ? "dark" : "" %>">
|
13
|
+
<%= render_markdown(description) %>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
11
16
|
<% if show_code %>
|
12
17
|
<div class="markdown pb--kit-example-markdown <%= dark ? "dark" : "" %>">
|
13
18
|
<%= render_markdown(description) %>
|
@@ -11,7 +11,7 @@ module Playbook
|
|
11
11
|
prop :example_title, type: Playbook::Props::String, required: true
|
12
12
|
prop :example_key, type: Playbook::Props::String, required: true
|
13
13
|
prop :show_code, type: Playbook::Props::Boolean, default: true
|
14
|
-
prop :type, type: Playbook::Props::Enum, values: %w[rails react], default: "rails"
|
14
|
+
prop :type, type: Playbook::Props::Enum, values: %w[rails react swift], default: "rails"
|
15
15
|
prop :dark, type: Playbook::Props::Boolean, default: false
|
16
16
|
|
17
17
|
def example
|
@@ -19,6 +19,9 @@ module Playbook
|
|
19
19
|
render inline: source
|
20
20
|
elsif type == "react"
|
21
21
|
react_component example_key.camelize, { dark: dark }
|
22
|
+
elsif type == "swift"
|
23
|
+
## render the markdown file
|
24
|
+
render inline: source
|
22
25
|
end
|
23
26
|
end
|
24
27
|
|
@@ -32,7 +35,11 @@ module Playbook
|
|
32
35
|
|
33
36
|
def source
|
34
37
|
@source ||= begin
|
35
|
-
extension = type == "
|
38
|
+
extension = if type == "rails"
|
39
|
+
"html.erb"
|
40
|
+
else
|
41
|
+
type == "swift" ? "swift" : "jsx"
|
42
|
+
end
|
36
43
|
stringified_code = read_kit_file("docs", "_#{example_key}.#{extension}")
|
37
44
|
sanitize_code(stringified_code)
|
38
45
|
end
|
@@ -42,6 +49,10 @@ module Playbook
|
|
42
49
|
read_kit_file("", "_#{example_key}.tsx")
|
43
50
|
end
|
44
51
|
|
52
|
+
def swift_source
|
53
|
+
read_kit_file("", "_#{example_key}.swift")
|
54
|
+
end
|
55
|
+
|
45
56
|
private
|
46
57
|
|
47
58
|
def sanitize_code(stringified_code)
|
@@ -33,7 +33,7 @@ module Playbook
|
|
33
33
|
values: ["lg", "xs", "sm", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x", nil],
|
34
34
|
default: nil
|
35
35
|
prop :font_style, type: Playbook::Props::Enum,
|
36
|
-
values: %w[far fas fab],
|
36
|
+
values: %w[far fas fab fak],
|
37
37
|
default: "far"
|
38
38
|
prop :spin, type: Playbook::Props::Boolean,
|
39
39
|
default: false
|
@@ -1,15 +1,20 @@
|
|
1
|
-
import React from
|
1
|
+
import React from "react"
|
2
2
|
|
3
|
-
import Title from
|
3
|
+
import Title from "../_title"
|
4
4
|
|
5
5
|
const TitleLightWeight = (props) => {
|
6
6
|
return (
|
7
7
|
<div>
|
8
|
-
<Title
|
9
|
-
bold={false}
|
8
|
+
<Title bold={false}
|
10
9
|
size={1}
|
11
|
-
tag=
|
12
|
-
text=
|
10
|
+
tag='h1'
|
11
|
+
text='Title 1'
|
12
|
+
{...props}
|
13
|
+
/>
|
14
|
+
<Title bold={false}
|
15
|
+
size={2}
|
16
|
+
tag='h2'
|
17
|
+
text='Title 2'
|
13
18
|
{...props}
|
14
19
|
/>
|
15
20
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
##### Prop
|
2
|
-
Title `size 1` will use `font-weight: 700` by default, if you want a lighter font weight, use the `bold` prop set to `false`.
|
3
|
-
Title `size
|
2
|
+
Title `size 1` & `size 2` will use `font-weight: 700` by default, if you want a lighter font weight, use the `bold` prop set to `false`.
|
3
|
+
Title `size 3` uses a light font weight by default and will not accept a bold font weight.
|
4
4
|
Title `size 4` uses a heavy font weight by default and will not accept a lighter font weight.
|
@@ -84,8 +84,11 @@ module Playbook
|
|
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
|
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: 12.
|
4
|
+
version: 12.24.0.pre.alpha.alphatestforselfhostfak720
|
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-
|
12
|
+
date: 2023-06-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -311,6 +311,7 @@ files:
|
|
311
311
|
- app/pb_kits/playbook/pb_avatar/docs/_avatar_status.html.erb
|
312
312
|
- app/pb_kits/playbook/pb_avatar/docs/_avatar_status.jsx
|
313
313
|
- app/pb_kits/playbook/pb_avatar/docs/_avatar_status.md
|
314
|
+
- app/pb_kits/playbook/pb_avatar/docs/_avatar_swift.md
|
314
315
|
- app/pb_kits/playbook/pb_avatar/docs/_description.md
|
315
316
|
- app/pb_kits/playbook/pb_avatar/docs/_footer.md
|
316
317
|
- app/pb_kits/playbook/pb_avatar/docs/example.yml
|