playbook_ui_docs 12.33.0.pre.alpha.revert2650closedialogonoutsideclick977 → 12.33.1.pre.alpha.PLAY933navkitcollapsible994

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: 2c1bc4a2ae4ff0c285d46e9f5e6b6a0a453f2f502a21d6c70bd3f75f2432f705
4
- data.tar.gz: 9757dc1f368f7c5df3f910e79658520f3adad43e145e74328fd8be4b6a6d147c
3
+ metadata.gz: 108ac5a3e11d235a48cca43234675ca423ecf5253faba7a3c37d520851454ade
4
+ data.tar.gz: e01f753748df0a887cdf7e73555912b3c79a4c8682c61d20f6da03e72882e146
5
5
  SHA512:
6
- metadata.gz: 99e3702f60aee99f46d3d5c042cbc2cd0d84fd00d9a34392be3befa4e132d929ea2aaddf7c8681c954861bc3b6f8c2b2aec7135f84b74e48e9e461ecf0907f9f
7
- data.tar.gz: d04f0110c2b5515d686e6e36424ea70fff8e04f8a515750b0330b8517fb3a4cc7f0afc46b20a3da2debed2970f9379e388cb05a6c9cc8d42704a72108d021b53
6
+ metadata.gz: f01767a82147cc6a9ba23f5acab695bda4535b98a0dd25650e86e300ca99b0032f547c1014c0e4f32a00f0b27af38b4199a99b0dd8486ed906d160f1f979e701
7
+ data.tar.gz: 6ce7373ed2da57683b5cda0a5bd2e9b86e650eae9dba8c9fea1694540ae3ba9cb808f948db7da3f593e23be6ec6ae7421a4a8ff7d54922a8720189a8d8135ad7
@@ -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'
@@ -7,7 +7,7 @@ const DateAlignment = (props) => {
7
7
  <FormattedDate
8
8
  dayOfWeek
9
9
  icon
10
- value={new Date('25 Dec 1995')}
10
+ value="1995-12-25"
11
11
  {...props}
12
12
  />
13
13
 
@@ -17,7 +17,7 @@ const DateAlignment = (props) => {
17
17
  alignment="center"
18
18
  dayOfWeek
19
19
  icon
20
- value={new Date('25 Dec 2020')}
20
+ value="2020-12-25"
21
21
  {...props}
22
22
  />
23
23
 
@@ -14,7 +14,7 @@ const DateDefault = (props) => {
14
14
 
15
15
  <FormattedDate
16
16
  size="sm"
17
- value={new Date('03 Aug 2012')}
17
+ value="2012-08-03"
18
18
  {...props}
19
19
  />
20
20
 
@@ -23,7 +23,7 @@ const DateDefault = (props) => {
23
23
  <FormattedDate
24
24
  showDayOfWeek
25
25
  size="sm"
26
- value={new Date('03 Dec 2017')}
26
+ value="2017-12-03"
27
27
  {...props}
28
28
  />
29
29
 
@@ -38,7 +38,7 @@ const DateDefault = (props) => {
38
38
  <br />
39
39
 
40
40
  <FormattedDate
41
- value={new Date('03 Aug 2012')}
41
+ value="2012-08-03"
42
42
  {...props}
43
43
  />
44
44
 
@@ -46,7 +46,7 @@ const DateDefault = (props) => {
46
46
 
47
47
  <FormattedDate
48
48
  showDayOfWeek
49
- value={new Date('03 Dec 2017')}
49
+ value="2017-12-03"
50
50
  {...props}
51
51
  />
52
52
  </>
@@ -21,7 +21,7 @@ const DateUnstyled = (props) => {
21
21
  <Title size={1}>
22
22
  <FormattedDate
23
23
  unstyled
24
- value={new Date('25 Dec 1995')}
24
+ value="1995-12-25"
25
25
  {...props}
26
26
  />
27
27
  </Title>
@@ -36,7 +36,7 @@ const DateUnstyled = (props) => {
36
36
  showDayOfWeek
37
37
  showIcon
38
38
  unstyled
39
- value={new Date('25 Dec 1995')}
39
+ value="1995-12-25"
40
40
  {...props}
41
41
  />
42
42
  </Caption>
@@ -7,7 +7,7 @@ const DateVariants = (props) => {
7
7
  <FormattedDate
8
8
  showIcon
9
9
  size="sm"
10
- value={new Date('25 Dec 1995')}
10
+ value="1995-12-25"
11
11
  {...props}
12
12
  />
13
13
 
@@ -15,7 +15,7 @@ const DateVariants = (props) => {
15
15
  <br />
16
16
 
17
17
  <FormattedDate
18
- value={new Date('25 Dec 1995')}
18
+ value="1995-12-25"
19
19
  {...props}
20
20
  />
21
21
 
@@ -24,7 +24,7 @@ const DateVariants = (props) => {
24
24
 
25
25
  <FormattedDate
26
26
  showIcon
27
- value={new Date('25 Dec 1995')}
27
+ value="1995-12-25"
28
28
  {...props}
29
29
  />
30
30
 
@@ -33,7 +33,7 @@ const DateVariants = (props) => {
33
33
 
34
34
  <FormattedDate
35
35
  showDayOfWeek
36
- value={new Date('25 Dec 1995')}
36
+ value="1995-12-25"
37
37
  {...props}
38
38
  />
39
39
 
@@ -43,7 +43,7 @@ const DateVariants = (props) => {
43
43
  <FormattedDate
44
44
  showDayOfWeek
45
45
  showIcon
46
- value={new Date('25 Dec 1995')}
46
+ value="1995-12-25"
47
47
  {...props}
48
48
  />
49
49
  </div>
@@ -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'