playbook_ui_docs 12.36.0.pre.alpha.PLAY936momentjs1058 → 12.36.0.pre.alpha.PLAY942collapsiblenav21035
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_badge/docs/example.yml +0 -7
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_icons.jsx +15 -4
- data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +2 -2
- data/app/pb_kits/playbook/pb_date/docs/_date_alignment.jsx +2 -2
- data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +5 -29
- data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +2 -2
- data/app/pb_kits/playbook/pb_date/docs/_date_variants.jsx +5 -5
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.jsx +59 -79
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_custom_icons.jsx +4 -6
- data/app/pb_kits/playbook/pb_nav/docs/example.yml +2 -2
- data/app/pb_kits/playbook/pb_pill/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_radio/docs/example.yml +0 -11
- data/app/pb_kits/playbook/pb_timestamp/docs/example.yml +0 -8
- data/dist/playbook-doc.js +15 -10
- metadata +2 -25
- data/app/pb_kits/playbook/pb_badge/docs/_badge_colors_swift.md +0 -33
- data/app/pb_kits/playbook/pb_badge/docs/_badge_default_swift.md +0 -9
- data/app/pb_kits/playbook/pb_badge/docs/_badge_notification_swift.md +0 -9
- data/app/pb_kits/playbook/pb_badge/docs/_badge_props_swift.md +0 -6
- data/app/pb_kits/playbook/pb_badge/docs/_badge_rounded_swift.md +0 -9
- data/app/pb_kits/playbook/pb_pill/docs/_pill_default_swift.md +0 -5
- data/app/pb_kits/playbook/pb_pill/docs/_pill_props_swift.md +0 -5
- data/app/pb_kits/playbook/pb_pill/docs/_pill_variants_swift.md +0 -10
- data/app/pb_kits/playbook/pb_radio/docs/_radio_alignment_swift.md +0 -16
- data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_swift.md +0 -18
- data/app/pb_kits/playbook/pb_radio/docs/_radio_default_swift.md +0 -15
- data/app/pb_kits/playbook/pb_radio/docs/_radio_error_swift.md +0 -14
- data/app/pb_kits/playbook/pb_radio/docs/_radio_orientation_swift.md +0 -15
- data/app/pb_kits/playbook/pb_radio/docs/_radio_padding_swift.md +0 -31
- data/app/pb_kits/playbook/pb_radio/docs/_radio_props_swift.md +0 -10
- data/app/pb_kits/playbook/pb_radio/docs/_radio_spacing_swift.md +0 -36
- data/app/pb_kits/playbook/pb_radio/docs/_radio_subtitle_swift.md +0 -13
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align_swift.md +0 -45
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default_swift.md +0 -26
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed_swift.md +0 -25
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_props_swift.md +0 -10
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones_swift.md +0 -67
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_swift.md +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b453a77a2422494201dd6202d01f9b3aff94e53065d91b29c1b2a8eb27438701
|
4
|
+
data.tar.gz: 6dd607e3ecf738ad46073dee29bd6a6ba9b1e046d90e88621bae4323cf7b022b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e09acd61f4b5a6d425ecc37153e673ba42c2ab3dd679426be13626d85641b2ecef53836621e8b37f6277e26d5d09cd27bec0089ddaeca716a153561b5ec2acbc
|
7
|
+
data.tar.gz: 4109215a81dd5453ad4215537e3b5fe7ed95a0673b36457711588412304fedca1e3df2783cecf79ce30a5311d9590cca062b612657210545eb2ff30742e0d9cb
|
@@ -10,10 +10,3 @@ examples:
|
|
10
10
|
- badge_rounded: Rounded
|
11
11
|
- badge_colors: Colors
|
12
12
|
- badge_notification: Notification
|
13
|
-
|
14
|
-
swift:
|
15
|
-
- badge_default_swift: Rectangle
|
16
|
-
- badge_rounded_swift: Rounded
|
17
|
-
- badge_colors_swift: Colors
|
18
|
-
- badge_notification_swift: Notification
|
19
|
-
- badge_props_swift: ""
|
@@ -1,8 +1,17 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import { Collapsible } from '../..'
|
2
|
+
import { Collapsible, useCollapsible, Button } from '../..'
|
3
3
|
|
4
|
-
const CollapsibleIcons = () =>
|
5
|
-
|
4
|
+
const CollapsibleIcons = () => {
|
5
|
+
const [isCollapsed, setIsCollapsed] = useCollapsible(true)
|
6
|
+
|
7
|
+
return (
|
8
|
+
<>
|
9
|
+
<Button onClick={()=> setIsCollapsed(!isCollapsed)}>
|
10
|
+
{isCollapsed ? "Expand" : "Collapse"}
|
11
|
+
</Button>
|
12
|
+
<Collapsible collapsed={isCollapsed}
|
13
|
+
icon={['plus','minus']}
|
14
|
+
>
|
6
15
|
<Collapsible.Main>
|
7
16
|
<div>{'Main Section'}</div>
|
8
17
|
</Collapsible.Main>
|
@@ -14,6 +23,8 @@ const CollapsibleIcons = () => (
|
|
14
23
|
</div>
|
15
24
|
</Collapsible.Content>
|
16
25
|
</Collapsible>
|
17
|
-
|
26
|
+
</>
|
27
|
+
)
|
28
|
+
}
|
18
29
|
|
19
30
|
export default CollapsibleIcons
|
@@ -4,10 +4,10 @@ examples:
|
|
4
4
|
- collapsible_default: Default
|
5
5
|
- collapsible_size: Size
|
6
6
|
- collapsible_color: Color
|
7
|
-
|
7
|
+
- collapsible_icons: Custom Icons
|
8
8
|
|
9
9
|
react:
|
10
10
|
- collapsible_default: Default
|
11
11
|
- collapsible_size: Size
|
12
12
|
- collapsible_color: Color
|
13
|
-
|
13
|
+
- collapsible_icons: Custom Icons
|
@@ -7,7 +7,7 @@ const DateAlignment = (props) => {
|
|
7
7
|
<FormattedDate
|
8
8
|
dayOfWeek
|
9
9
|
icon
|
10
|
-
value=
|
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=
|
20
|
+
value="2020-12-25"
|
21
21
|
{...props}
|
22
22
|
/>
|
23
23
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import { Date as FormattedDate
|
2
|
+
import { Date as FormattedDate } from '../../'
|
3
3
|
|
4
4
|
const DateDefault = (props) => {
|
5
5
|
return (
|
@@ -12,20 +12,9 @@ const DateDefault = (props) => {
|
|
12
12
|
|
13
13
|
<br />
|
14
14
|
|
15
|
-
<div style={{display: "flex", columnGap: 4}}>
|
16
|
-
<FormattedDate
|
17
|
-
size="sm"
|
18
|
-
value={"2012-08-03"}
|
19
|
-
{...props}
|
20
|
-
/>
|
21
|
-
<Caption>{"(Hyphenated Date)"}</Caption>
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<br />
|
25
|
-
|
26
15
|
<FormattedDate
|
27
16
|
size="sm"
|
28
|
-
value=
|
17
|
+
value="2012-08-03"
|
29
18
|
{...props}
|
30
19
|
/>
|
31
20
|
|
@@ -34,7 +23,7 @@ const DateDefault = (props) => {
|
|
34
23
|
<FormattedDate
|
35
24
|
showDayOfWeek
|
36
25
|
size="sm"
|
37
|
-
value=
|
26
|
+
value="2017-12-03"
|
38
27
|
{...props}
|
39
28
|
/>
|
40
29
|
|
@@ -48,21 +37,8 @@ const DateDefault = (props) => {
|
|
48
37
|
|
49
38
|
<br />
|
50
39
|
|
51
|
-
<div style={{display: "flex", columnGap: 4}}>
|
52
|
-
<FormattedDate
|
53
|
-
value={"2012-08-03"}
|
54
|
-
{...props}
|
55
|
-
/>
|
56
|
-
<Title
|
57
|
-
size={4}
|
58
|
-
text={"(Hyphenated Date)"}
|
59
|
-
/>
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<br />
|
63
|
-
|
64
40
|
<FormattedDate
|
65
|
-
value=
|
41
|
+
value="2012-08-03"
|
66
42
|
{...props}
|
67
43
|
/>
|
68
44
|
|
@@ -70,7 +46,7 @@ const DateDefault = (props) => {
|
|
70
46
|
|
71
47
|
<FormattedDate
|
72
48
|
showDayOfWeek
|
73
|
-
value=
|
49
|
+
value="2017-12-03"
|
74
50
|
{...props}
|
75
51
|
/>
|
76
52
|
</>
|
@@ -21,7 +21,7 @@ const DateUnstyled = (props) => {
|
|
21
21
|
<Title size={1}>
|
22
22
|
<FormattedDate
|
23
23
|
unstyled
|
24
|
-
value=
|
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=
|
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=
|
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=
|
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=
|
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=
|
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=
|
46
|
+
value="1995-12-25"
|
47
47
|
{...props}
|
48
48
|
/>
|
49
49
|
</div>
|
@@ -1,83 +1,63 @@
|
|
1
|
-
import React from "react"
|
2
|
-
|
3
|
-
import Nav from "../_nav";
|
4
|
-
import NavItem from "../_item";
|
1
|
+
import React from "react"
|
2
|
+
import { Nav, NavItem, useCollapsible } from "../.."
|
5
3
|
|
6
4
|
const CollapsibleNav = (props) => {
|
5
|
+
const navItems = ["Overview", "Albums", "Similar Artists"]
|
6
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
7
|
+
const collapsibles = navItems.map(() => useCollapsible(true))
|
8
|
+
|
9
|
+
const handleMainClick = (index) => {
|
10
|
+
collapsibles.forEach(([, , setCollapsed], idx) => {
|
11
|
+
if (idx === index) {
|
12
|
+
setCollapsed(false)
|
13
|
+
} else {
|
14
|
+
setCollapsed(true)
|
15
|
+
}
|
16
|
+
})
|
17
|
+
}
|
18
|
+
|
19
|
+
|
20
|
+
const handleIconRightClick = (index) => {
|
21
|
+
const [isCollapsed, setCollapsed] = collapsibles[index]
|
22
|
+
setCollapsed(!isCollapsed)
|
23
|
+
}
|
24
|
+
|
7
25
|
return (
|
8
|
-
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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
|
-
};
|
26
|
+
<>
|
27
|
+
<Nav variant='subtle'>
|
28
|
+
{navItems.map((text, index) => {
|
29
|
+
const [collapsed] = collapsibles[index]
|
30
|
+
return (
|
31
|
+
<NavItem
|
32
|
+
collapsible
|
33
|
+
collapsibleClick={() => handleMainClick(index)}
|
34
|
+
iconLeft="chevron-down"
|
35
|
+
iconRightClick={() => handleIconRightClick(index)}
|
36
|
+
id={`collapsible-nav-item-${index + 1}`}
|
37
|
+
key={index}
|
38
|
+
link="#"
|
39
|
+
text={text}
|
40
|
+
toggleCollapsed={collapsed}
|
41
|
+
{...props}
|
42
|
+
>
|
43
|
+
<NavItem link="#"
|
44
|
+
text="City"
|
45
|
+
{...props}
|
46
|
+
/>
|
47
|
+
<NavItem link="#"
|
48
|
+
text="People"
|
49
|
+
{...props}
|
50
|
+
/>
|
51
|
+
<NavItem link="#"
|
52
|
+
text="Business"
|
53
|
+
{...props}
|
54
|
+
/>
|
55
|
+
</NavItem>
|
56
|
+
);
|
57
|
+
})}
|
58
|
+
</Nav>
|
59
|
+
</>
|
60
|
+
)
|
61
|
+
}
|
82
62
|
|
83
|
-
export default CollapsibleNav
|
63
|
+
export default CollapsibleNav
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import React from "react";
|
2
|
-
|
3
|
-
import Nav from "../_nav";
|
4
|
-
import NavItem from "../_item";
|
2
|
+
import { Nav, NavItem } from '../..'
|
5
3
|
|
6
4
|
const CollapsibleNavCustomIcons = (props) => {
|
7
5
|
return (
|
@@ -9,7 +7,7 @@ const CollapsibleNavCustomIcons = (props) => {
|
|
9
7
|
<NavItem
|
10
8
|
collapsible
|
11
9
|
iconLeft="city"
|
12
|
-
iconRight={["
|
10
|
+
iconRight={["plus", "minus"]}
|
13
11
|
link="#"
|
14
12
|
text="Overview"
|
15
13
|
{...props}
|
@@ -34,7 +32,7 @@ const CollapsibleNavCustomIcons = (props) => {
|
|
34
32
|
active
|
35
33
|
collapsible
|
36
34
|
iconLeft="theater-masks"
|
37
|
-
iconRight={["
|
35
|
+
iconRight={["plus", "minus"]}
|
38
36
|
link="#"
|
39
37
|
text="Albums"
|
40
38
|
{...props}
|
@@ -58,7 +56,7 @@ const CollapsibleNavCustomIcons = (props) => {
|
|
58
56
|
<NavItem
|
59
57
|
collapsible
|
60
58
|
iconLeft="city"
|
61
|
-
iconRight={["
|
59
|
+
iconRight={["plus", "minus"]}
|
62
60
|
link="#"
|
63
61
|
text="Similar Artists"
|
64
62
|
{...props}
|
@@ -25,8 +25,8 @@ examples:
|
|
25
25
|
- borderless_nav: No Borders
|
26
26
|
- subtle_nav: Subtle Variant
|
27
27
|
- subtle_with_icons_nav: Subtle With Icons
|
28
|
-
|
29
|
-
|
28
|
+
- collapsible_nav: Subtle With Collapsible
|
29
|
+
- collapsible_nav_custom_icons: Subtle With Collapsible (No custom toggling)
|
30
30
|
- subtle_no_highlight_nav: Subtle No Highlight
|
31
31
|
- bold_vertical_nav: Bold Variant
|
32
32
|
- horizontal_nav: Horizontal Nav
|
@@ -12,14 +12,3 @@ examples:
|
|
12
12
|
- radio_custom: Custom
|
13
13
|
- radio_error: With Error
|
14
14
|
- radio_alignment: Alignment
|
15
|
-
|
16
|
-
swift:
|
17
|
-
- radio_default_swift: Default
|
18
|
-
- radio_custom_swift: Custom
|
19
|
-
- radio_error_swift: With Error
|
20
|
-
- radio_orientation_swift: Orientation
|
21
|
-
- radio_alignment_swift: Alignment
|
22
|
-
- radio_spacing_swift: Spacing
|
23
|
-
- radio_padding_swift: Padding
|
24
|
-
- radio_subtitle_swift: Subtitle
|
25
|
-
- radio_props_swift: ""
|
@@ -13,11 +13,3 @@ examples:
|
|
13
13
|
- timestamp_timezones: Timezones
|
14
14
|
- timestamp_updated: Last Updated by
|
15
15
|
- timestamp_elapsed: Time Ago
|
16
|
-
|
17
|
-
swift:
|
18
|
-
- timestamp_default_swift: Default
|
19
|
-
- timestamp_align_swift: Alignments
|
20
|
-
- timestamp_timezones_swift: Timezones
|
21
|
-
- timestamp_updated_swift: Last Updated by
|
22
|
-
- timestamp_elapsed_swift: Time Ago
|
23
|
-
- timestamp_props_swift: ""
|