playbook_ui_docs 12.34.0 → 12.35.0.pre.alpha.iconpocwebfonts1023

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default.jsx +1 -1
  3. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_icons.html.erb +10 -0
  4. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_icons.jsx +19 -0
  5. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_icons.md +2 -0
  6. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_size.md +1 -1
  7. data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +3 -1
  8. data/app/pb_kits/playbook/pb_collapsible/docs/index.js +1 -0
  9. data/app/pb_kits/playbook/pb_highlight/docs/_highlight_default.html.erb +6 -16
  10. data/app/pb_kits/playbook/pb_highlight/docs/_highlight_default.jsx +2 -2
  11. data/app/pb_kits/playbook/pb_highlight/docs/example.yml +0 -2
  12. data/app/pb_kits/playbook/pb_icon/docs/_icon_font.html.erb +11 -0
  13. data/app/pb_kits/playbook/pb_icon/docs/example.yml +1 -0
  14. data/app/pb_kits/playbook/pb_message/docs/_message_mentions.html.erb +24 -0
  15. data/app/pb_kits/playbook/pb_message/docs/_message_mentions.jsx +31 -0
  16. data/app/pb_kits/playbook/pb_message/docs/_message_mentions.md +1 -0
  17. data/app/pb_kits/playbook/pb_message/docs/example.yml +2 -2
  18. data/app/pb_kits/playbook/pb_message/docs/index.js +1 -1
  19. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.html.erb +24 -0
  20. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.jsx +83 -0
  21. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_custom_icons.jsx +86 -0
  22. data/app/pb_kits/playbook/pb_nav/docs/example.yml +3 -0
  23. data/app/pb_kits/playbook/pb_nav/docs/index.js +2 -0
  24. data/dist/playbook-doc.js +9 -9
  25. metadata +17 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8227516eec172b5cf02f90d1099fa5b6f00923d90b87b6d59f4daafd03d48969
4
- data.tar.gz: 3468130c34d95d2f006963b2c3c9b839cc5181fd6ee781675279099eb655488e
3
+ metadata.gz: b133254c95cf68ea3698e8b308425ec3b85a1042755417363c36a519560a268f
4
+ data.tar.gz: 694a2bc4f639a1fde0d03032d711bd3519e3c149abfd47c46d1fa06392331338
5
5
  SHA512:
6
- metadata.gz: c59ca650353c827e8be9e022f8eb2747f381afe21122e3245c3a1e75affe246ad362729679af6fed3018b4b052dcc052fed43172e6e7f83a2edacbe04946a9ce
7
- data.tar.gz: add17b9c4fbbd700e6cb875e51f7332dab652a9a30c4783a02b1bbe5f4baf4d47975c200e41f78a5313eaa5c5e3cad198f0bf2cb2533f011f984f886f041827f
6
+ metadata.gz: 33b59ed9e717697a58e0b60cc9c2846cb39b3ec40f7506f6f804e9962ca7fc92e995f22660e23aeb943affc468072d8a703d8de3d557ee0bac80c6f9ebb0e709
7
+ data.tar.gz: a9cce0332ff1ae96ade627c8210e2518fe773e2d4698a637c4a2e755964019eb898b3e812bd1927df43bacecb60d085cd734cfd6f70a27b7ee3b8348ba495af6
@@ -2,7 +2,7 @@ import React from 'react'
2
2
  import { Collapsible } from '../..'
3
3
 
4
4
  const CollapsibleDefault = () => (
5
- <Collapsible>
5
+ <Collapsible >
6
6
  <Collapsible.Main>
7
7
  <div>{'Main Section'}</div>
8
8
  </Collapsible.Main>
@@ -0,0 +1,10 @@
1
+ <%= pb_rails("collapsible", props: { name: "custom-icons-example" }) do %>
2
+ <%= pb_rails("collapsible/collapsible_main", props: { padding: "md", name: "custom-icons-main", icon: ["plus", "minus"]}) do %>
3
+ <%= pb_rails("body", props: { text: "Main Section"}) %>
4
+ <% end %>
5
+ <%= pb_rails("collapsible/collapsible_content", props: { padding: "md" }) do %>
6
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis, risus a fringilla luctus, sapien eros sodales ex, quis molestie est nulla non turpis. Vestibulum aliquet at ipsum eget posuere. Morbi sed laoreet erat. Sed commodo posuere lectus, at porta nulla ornare a. Suspendisse quam est, sollicitudin ut enim sit amet, commodo placerat enim. Donec laoreet metus ac mauris pellentesque mattis. Pellentesque luctus vel mauris non aliquam. Mauris hendrerit mattis porttitor. Curabitur vehicula justo non ex consectetur commodo. Quisque posuere aliquet quam. Maecenas malesuada magna mauris, ac tempor metus euismod at.
7
+ <br><br>
8
+ Cras ornare fermentum magna mollis efficitur. Sed vitae nulla vel purus ultrices mollis. Maecenas id nulla id libero faucibus feugiat quis sit amet turpis. In commodo pellentesque risus at fringilla. Integer non interdum leo, non commodo ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut mi augue, dignissim at orci vel, egestas aliquam mi. Proin finibus aliquet tempor. Integer cursus, ex quis gravida rhoncus, nisi elit viverra ipsum, non efficitur est ex ac tortor. Praesent vitae odio massa.
9
+ <% end %>
10
+ <% end %>
@@ -0,0 +1,19 @@
1
+ import React from 'react'
2
+ import { Collapsible } from '../..'
3
+
4
+ const CollapsibleIcons = () => (
5
+ <Collapsible icon={['plus','minus']}>
6
+ <Collapsible.Main>
7
+ <div>{'Main Section'}</div>
8
+ </Collapsible.Main>
9
+ <Collapsible.Content>
10
+ <div>
11
+ {
12
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In vel erat sed purus hendrerit viverra. Duis et vestibulum metus. Sed consequat ut ante non vehicula. Etiam nunc massa, pharetra vel quam id, posuere rhoncus quam. Quisque imperdiet arcu enim, nec aliquet justo auctor eget. Curabitur in metus nec nunc rhoncus faucibus vitae ac elit. Nulla facilisi. Vestibulum quis pretium nulla. Nulla ut accumsan velit. Duis varius urna sed sem tempor, sit amet fermentum nibh auctor. Praesent lorem arcu, egestas non ante quis, placerat pellentesque lectus.Vestibulum lacinia ipsum quis venenatis tristique. Vivamus suscipit, libero eu fringilla egestas, orci urna commodo arcu, vel gravida turpis ipsum molestie nibh. Donec cursus eu ante sagittis ultrices. Phasellus id sagittis risus. Mauris dapibus neque faucibus, tempor ligula vel, cursus ante. Donec faucibus gravida porta. Nullam egestas est quis aliquam feugiat. Sed eget metus diam. Cras eget placerat libero.'
13
+ }
14
+ </div>
15
+ </Collapsible.Content>
16
+ </Collapsible>
17
+ )
18
+
19
+ export default CollapsibleIcons
@@ -0,0 +1,2 @@
1
+ ##### Prop
2
+ This kit uses 'chevron-up' and 'chevron-down' icons as default for the toggle icons. To customize these icons, use the `icon` prop to pass in an array of two icons, the first will render when the collapisble is closed and the second will render when the collapsible is open. In this example, we are using `icon: ['plus','minus']`
@@ -1,4 +1,4 @@
1
1
  ##### Prop
2
- This kit uses `icon` sizes. If you don't give it a size, it will default to medium. You can be replaced with the sizes below:
2
+ This kit uses `icon` sizes. If you don't give it a size, it will default to medium. This can be replaced with the sizes below:
3
3
 
4
4
  * `lg` `xs` `sm` `1x` `2x` `3x` `4x` `5x` `6x` `7x` `8x` `9x` `10x`
@@ -4,8 +4,10 @@ examples:
4
4
  - collapsible_default: Default
5
5
  - collapsible_size: Size
6
6
  - collapsible_color: Color
7
+ # - collapsible_icons: Custom Icons
7
8
 
8
9
  react:
9
10
  - collapsible_default: Default
10
11
  - collapsible_size: Size
11
- - collapsible_color: Color
12
+ - collapsible_color: Color
13
+ # - collapsible_icons: Custom Icons
@@ -1,3 +1,4 @@
1
1
  export { default as CollapsibleDefault } from './_collapsible_default.jsx'
2
2
  export { default as CollapsibleSize } from './_collapsible_size.jsx'
3
3
  export { default as CollapsibleColor } from './_collapsible_color.jsx'
4
+ export { default as CollapsibleIcons } from './_collapsible_icons.jsx'
@@ -1,20 +1,10 @@
1
1
 
2
- <%= pb_rails("highlight", props: {text: "Highlight Kit"})%>
3
- <br>
4
- <br>
5
- <%= pb_rails("title", props: {text: "Kit wrapping",size: 4})%>
6
- <br>
7
2
  <%= pb_rails("body") do%>
8
- This an example<%= pb_rails("highlight") do%>Highlight Example<% end %>around.
3
+ This is the <%= pb_rails("highlight") do%>Highlight Kit<% end %>.
9
4
  <% end %>
10
- <br>
11
- <br>
12
- <%= pb_rails("title", props: {text: "Search",size: 4})%>
13
- <br>
14
- <%= pb_rails("body", props: {text: "hello helpers are great even highlighting this", highlighting: true, highlighted_text: ["hello","great"]})%>
15
5
 
16
- <br>
17
- <br>
18
- <%= pb_rails("caption", props: {size: "xs", text: "To enable highlighting make sure the [highlighting] flag is set to true. "}) %>
19
- <br>
20
- <br>
6
+ <%= pb_rails("body", props: {padding_bottom: "md"}) do%>
7
+ Hello this is a <%= pb_rails("highlight") do%>highlight<% end %> wrapped.
8
+ <% end %>
9
+
10
+ <%= pb_rails("body", props: {text: "This is text highlighted in the Body Kit using the text prop.", highlighting: true, highlighted_text: ["highlighted", "Body Kit"]})%>
@@ -7,7 +7,7 @@ const HighlightDefault = (props) => (
7
7
  <div>
8
8
  <Highlight
9
9
  highlightedText={['highlight kit']}
10
- text="This is the Highlight Kit"
10
+ text="This is the Highlight Kit."
11
11
  {...props}
12
12
  />
13
13
  <br />
@@ -15,7 +15,7 @@ const HighlightDefault = (props) => (
15
15
  {' '}
16
16
  {'Hello this is a'}
17
17
  {' '}
18
- <Highlight text=" highlight wrapped"/>
18
+ <Highlight text=" highlight wrapped."/>
19
19
  </Body>
20
20
  <br />
21
21
  <Body
@@ -3,7 +3,5 @@ examples:
3
3
  rails:
4
4
  - highlight_default: Default
5
5
 
6
-
7
6
  react:
8
7
  - highlight_default: Default
9
-
@@ -0,0 +1,11 @@
1
+ <div>
2
+ <%= pb_rails("icon", props: { icon: "bumper-plates", font_family: "boxboard", prefix: "icon", size: "5x"} ) %>
3
+ <%= pb_rails("icon", props: { icon: "boxboard", font_family: "boxboard", prefix: "icon", size: "5x", padding_left: "md"} ) %>
4
+ <%= pb_rails("icon", props: { icon: "workout-journal", font_family: "boxboard", prefix: "icon", size: "5x", padding_left: "md"} ) %>
5
+ </div>
6
+
7
+ <div>
8
+ <%= pb_rails("icon", props: { icon: "sushi", font_family: "boxicons", prefix: "bx bx", size: "5x", margin_top: "lg"} ) %>
9
+ <%= pb_rails("icon", props: { icon: "bowl-rice", font_family: "boxicons", prefix: "bx bx", size: "5x", padding_left: "md"} ) %>
10
+ <%= pb_rails("icon", props: { icon: "party", font_family: "boxicons", prefix: "bx bx", size: "5x", padding_left: "md"} ) %>
11
+ </div>
@@ -9,6 +9,7 @@ examples:
9
9
  - icon_sizes: Icon Sizes
10
10
  - icon_custom: Icon Custom
11
11
  - icon_fa_kit: Icon with FontAwesome Kit
12
+ - icon_font: Bring Your Own Icon Font
12
13
 
13
14
  react:
14
15
  - icon_default: Icon Default
@@ -0,0 +1,24 @@
1
+ <%= pb_rails("message", props: {
2
+ label: "Keith Craig",
3
+ timestamp: "2 days ago",
4
+ avatar_name: "Keith Craig",
5
+ padding_bottom: "md"
6
+ }) do %>
7
+ <%= pb_rails("message/message_mention", props: { variant: "user" }) do %>
8
+ @all
9
+ <% end %> let's welcome
10
+ <%= pb_rails("message/message_mention", props: { variant: "self" }) do %>
11
+ @Lucille Sanchez
12
+ <% end %> to the team this week!
13
+ <% end %>
14
+
15
+ <%= pb_rails("message", props: {
16
+ label: "Lucille Sanchez",
17
+ timestamp: "2 days ago",
18
+ avatar_name: "Lucille Sanchez",
19
+ avatar_url: "https://randomuser.me/api/portraits/women/50.jpg"
20
+ }) do %>
21
+ <%= pb_rails("message/message_mention", props: {variant: "self"}) do %>
22
+ @Keith Craig
23
+ <% end %> thanks for the warm welcome! I'm so excited!
24
+ <% end %>
@@ -0,0 +1,31 @@
1
+ import React from "react"
2
+ import Message from "../_message"
3
+
4
+ const MessageDefault = (props) => {
5
+ return (
6
+ <>
7
+ <Message
8
+ avatarName='Keith Craig'
9
+ label='Keith Craig'
10
+ paddingBottom="md"
11
+ timestamp='2 days ago'
12
+ {...props}
13
+ >
14
+ <Message.Mention variant='user'>{'@all'}</Message.Mention>{` let's welcome `}
15
+ <Message.Mention variant='self'>{'@Lucille Sanchez'}</Message.Mention>{' to the team this week!'}
16
+ </Message>
17
+
18
+ <Message
19
+ avatarName='Lucille Sanchez'
20
+ avatarUrl='https://randomuser.me/api/portraits/women/50.jpg'
21
+ label='Lucille Sanchez'
22
+ timestamp='2 days ago'
23
+ {...props}
24
+ >
25
+ <Message.Mention variant='self'>{'@Keith Craig'}</Message.Mention>{` thanks for the warm welcome! I'm so excited!`}
26
+ </Message>
27
+ </>
28
+ )
29
+ }
30
+
31
+ export default MessageDefault
@@ -0,0 +1 @@
1
+ The message kit also supports @mentions using a [compound component](https://kentcdodds.com/blog/compound-components-with-react-hooks) structure. See the code example for details on how to pass user mentions through your messages.
@@ -4,10 +4,10 @@ examples:
4
4
  - message_default: Default
5
5
  - message_timestamp: With Timestamp Hover
6
6
  - message_hover: Hover
7
-
7
+ - message_mentions: Mentions
8
8
 
9
9
  react:
10
10
  - message_default: Default
11
11
  - message_timestamp: With Timestamp Hover
12
12
  - message_hover: Hover
13
-
13
+ - message_mentions: Mentions
@@ -1,4 +1,4 @@
1
1
  export { default as MessageDefault } from './_message_default.jsx'
2
2
  export { default as MessageTimestamp } from './_message_timestamp.jsx'
3
3
  export { default as MessageHover } from './_message_hover.jsx'
4
-
4
+ export { default as MessageMentions } from './_message_mentions.jsx'
@@ -0,0 +1,24 @@
1
+ <%= pb_rails("nav", props: { variant: "subtle" }) do %>
2
+ <%= pb_rails("nav/item", props: { text: "Overview", link: "#", collapsible: true, icon_left:"city" }) do %>
3
+ <%= pb_rails("nav", props: { variant: "subtle" }) do %>
4
+ <%= pb_rails("nav/item", props: { text: "City", link: "#" }) %>
5
+ <%= pb_rails("nav/item", props: { text: "People", link: "#" }) %>
6
+ <%= pb_rails("nav/item", props: { text: "Business", link: "#" }) %>
7
+ <% end %>
8
+ <% end %>
9
+ <%= pb_rails("nav/item", props: { text: "Albums", link: "#", active: true, collapsible: true, icon_left: "theater-masks" }) do %>
10
+ <%= pb_rails("nav", props: { variant: "subtle" }) do %>
11
+ <%= pb_rails("nav/item", props: { text: "Entertainment", link: "#" }) %>
12
+ <%= pb_rails("nav/item", props: { text: "Food", link: "#" }) %>
13
+ <%= pb_rails("nav/item", props: { text: "Style", link: "#" }) %>
14
+ <% end %>
15
+ <% end %>
16
+ <%= pb_rails("nav/item", props: { text: "Similar Artists", link: "#", collapsible: true, icon_left: "city" }) do %>
17
+ <%= pb_rails("nav", props: { variant: "subtle" }) do %>
18
+ <%= pb_rails("nav/item", props: { text: "City", link: "#" }) %>
19
+ <%= pb_rails("nav/item", props: { text: "People", link: "#" }) %>
20
+ <%= pb_rails("nav/item", props: { text: "Business", link: "#" }) %>
21
+ <% end %>
22
+ <% end %>
23
+ <% end %>
24
+
@@ -0,0 +1,83 @@
1
+ import React from "react";
2
+
3
+ import Nav from "../_nav";
4
+ import NavItem from "../_item";
5
+
6
+ const CollapsibleNav = (props) => {
7
+ return (
8
+ <Nav variant="subtle">
9
+ <NavItem
10
+ collapsible
11
+ iconLeft="city"
12
+ link="#"
13
+ text="Overview"
14
+ {...props}
15
+ >
16
+ <NavItem
17
+ link="#"
18
+ text="City"
19
+ {...props}
20
+ />
21
+ <NavItem
22
+ link="#"
23
+ text="People"
24
+ {...props}
25
+ />
26
+ <NavItem
27
+ link="#"
28
+ text="Business"
29
+ {...props}
30
+ />
31
+ </NavItem>
32
+ <NavItem
33
+ active
34
+ collapsible
35
+ iconLeft="theater-masks"
36
+ link="#"
37
+ text="Albums"
38
+ {...props}
39
+ >
40
+ <NavItem
41
+ link="#"
42
+ text="Entertainment"
43
+ {...props}
44
+ />
45
+ <NavItem
46
+ link="#"
47
+ text="Food"
48
+ {...props}
49
+ />
50
+ <NavItem
51
+ link="#"
52
+ text="Style"
53
+ {...props}
54
+ />
55
+ </NavItem>
56
+ <NavItem
57
+ collapsible
58
+ iconLeft="city"
59
+ link="#"
60
+ text="Similar Artists"
61
+ {...props}
62
+ >
63
+ <NavItem
64
+ link="#"
65
+ text="City"
66
+ {...props}
67
+ />
68
+ <NavItem
69
+ link="#"
70
+ text="People"
71
+ {...props}
72
+ />
73
+ <NavItem
74
+ link="#"
75
+ text="Business"
76
+ {...props}
77
+ />
78
+ </NavItem>
79
+ </Nav>
80
+ );
81
+ };
82
+
83
+ export default CollapsibleNav;
@@ -0,0 +1,86 @@
1
+ import React from "react";
2
+
3
+ import Nav from "../_nav";
4
+ import NavItem from "../_item";
5
+
6
+ const CollapsibleNavCustomIcons = (props) => {
7
+ return (
8
+ <Nav variant="subtle">
9
+ <NavItem
10
+ collapsible
11
+ iconLeft="city"
12
+ iconRight={["chevron-down", "chevron-up"]}
13
+ link="#"
14
+ text="Overview"
15
+ {...props}
16
+ >
17
+ <NavItem
18
+ link="#"
19
+ text="City"
20
+ {...props}
21
+ />
22
+ <NavItem
23
+ link="#"
24
+ text="People"
25
+ {...props}
26
+ />
27
+ <NavItem
28
+ link="#"
29
+ text="Business"
30
+ {...props}
31
+ />
32
+ </NavItem>
33
+ <NavItem
34
+ active
35
+ collapsible
36
+ iconLeft="theater-masks"
37
+ iconRight={["chevron-down", "chevron-up"]}
38
+ link="#"
39
+ text="Albums"
40
+ {...props}
41
+ >
42
+ <NavItem
43
+ link="#"
44
+ text="Entertainment"
45
+ {...props}
46
+ />
47
+ <NavItem
48
+ link="#"
49
+ text="Food"
50
+ {...props}
51
+ />
52
+ <NavItem
53
+ link="#"
54
+ text="Style"
55
+ {...props}
56
+ />
57
+ </NavItem>
58
+ <NavItem
59
+ collapsible
60
+ iconLeft="city"
61
+ iconRight={["chevron-down", "chevron-up"]}
62
+ link="#"
63
+ text="Similar Artists"
64
+ {...props}
65
+ >
66
+ <NavItem
67
+ link="#"
68
+ text="City"
69
+ {...props}
70
+ />
71
+ <NavItem
72
+ link="#"
73
+ text="People"
74
+ {...props}
75
+ />
76
+ <NavItem
77
+ link="#"
78
+ text="Business"
79
+ {...props}
80
+ />
81
+ </NavItem>
82
+ </Nav>
83
+ );
84
+ };
85
+
86
+ export default CollapsibleNavCustomIcons;
@@ -7,6 +7,7 @@ examples:
7
7
  - borderless_nav: No Borders
8
8
  - subtle_nav: Subtle Variant
9
9
  - subtle_with_icons_nav: Subtle With Icons
10
+ # - collapsible_nav: Subtle With Collapsible
10
11
  - subtle_no_highlight_nav: Subtle No Highlight
11
12
  - bold_vertical_nav: Bold Variant
12
13
  - horizontal_nav: Horizontal Nav
@@ -24,6 +25,8 @@ examples:
24
25
  - borderless_nav: No Borders
25
26
  - subtle_nav: Subtle Variant
26
27
  - subtle_with_icons_nav: Subtle With Icons
28
+ # - collapsible_nav: Subtle With Collapsible
29
+ # - collapsible_nav_custom_icons: Subtle With Collapsible (Custom Toggle Icons)
27
30
  - subtle_no_highlight_nav: Subtle No Highlight
28
31
  - bold_vertical_nav: Bold Variant
29
32
  - horizontal_nav: Horizontal Nav
@@ -13,3 +13,5 @@ export { default as WithImgNav } from './_with_img_nav.jsx'
13
13
  export { default as NewTab } from './_new_tab.jsx'
14
14
  export { default as BoldHorizontalNav } from './_bold_horizontal_nav.jsx'
15
15
  export { default as BoldVerticalNav } from './_bold_vertical_nav.jsx'
16
+ export { default as CollapsibleNav } from './_collapsible_nav.jsx'
17
+ export { default as CollapsibleNavCustomIcons } from './_collapsible_nav_custom_icons.jsx'