playbook_ui_docs 14.16.0.pre.rc.6 → 14.17.0.pre.alpha.PBNTR766tablenestedcollapsiblerowsborderdoubling7256
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +90 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.html.erb +39 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +6 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +4 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +35 -0
- data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +1 -0
- data/app/pb_kits/playbook/pb_background/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +0 -11
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +0 -7
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +181 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +99 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx +110 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table_react.jsx → _draggable_with_table.jsx} +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +3 -1
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +9 -6
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +4 -1
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.html.erb +3 -0
- data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +8 -8
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +67 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +67 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +15 -5
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +20 -5
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.html.erb +10 -4
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.jsx +49 -24
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_click.jsx +13 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +394 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +5 -0
- data/app/pb_kits/playbook/pb_layout/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.html.erb +72 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.jsx +97 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.html.erb +71 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.jsx +91 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +63 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +3 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +1 -7
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +39 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +1 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +40 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +5 -0
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +3 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.jsx +50 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_react.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +36 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.jsx +59 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.html.erb +19 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.jsx +23 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options.html.erb +22 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +40 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options_rails.md +5 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options_react.md +5 -0
- data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
- data/dist/playbook-doc.js +1 -1
- metadata +58 -16
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows.md → _advanced_table_selectable_rows_no_subrows_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows.md → _advanced_table_selectable_rows_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default_rails.html.erb → _draggable_default.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default.md → _draggable_default_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers_rails.html.erb → _draggable_multiple_containers.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers.md → _draggable_multiple_containers_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards_rails.html.erb → _draggable_with_cards.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards.md → _draggable_with_cards_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list_rails.html.erb → _draggable_with_list.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list.md → _draggable_with_list_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list_rails.html.erb → _draggable_with_selectable_list.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list.md → _draggable_with_selectable_list_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table.md → _draggable_with_table_rails.md} +0 -0
@@ -1,32 +1,57 @@
|
|
1
1
|
import React from "react"
|
2
2
|
import Icon from "../_icon"
|
3
|
+
import Flex from "../../pb_flex/_flex"
|
3
4
|
|
4
5
|
const IconDefault = (props) => {
|
5
6
|
return (
|
6
|
-
<div
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
7
|
+
<div>
|
8
|
+
<Flex marginBottom="sm">
|
9
|
+
<Icon
|
10
|
+
color="primary"
|
11
|
+
fixedWidth
|
12
|
+
icon="user"
|
13
|
+
size="2x"
|
14
|
+
{...props}
|
15
|
+
/>
|
16
|
+
<Icon
|
17
|
+
color="data_4"
|
18
|
+
fixedWidth
|
19
|
+
icon="recycle"
|
20
|
+
size="2x"
|
21
|
+
{...props}
|
22
|
+
/>
|
23
|
+
<Icon
|
24
|
+
color="product_5_background"
|
25
|
+
fixedWidth
|
26
|
+
icon="product-roofing"
|
27
|
+
size="2x"
|
28
|
+
{...props}
|
29
|
+
/>
|
30
|
+
</Flex>
|
31
|
+
|
32
|
+
<Flex>
|
33
|
+
<Icon
|
34
|
+
color="light"
|
35
|
+
fixedWidth
|
36
|
+
icon="user"
|
37
|
+
size="2x"
|
38
|
+
{...props}
|
39
|
+
/>
|
40
|
+
<Icon
|
41
|
+
color="lighter"
|
42
|
+
fixedWidth
|
43
|
+
icon="recycle"
|
44
|
+
size="2x"
|
45
|
+
{...props}
|
46
|
+
/>
|
47
|
+
<Icon
|
48
|
+
color="link"
|
49
|
+
fixedWidth
|
50
|
+
icon="product-roofing"
|
51
|
+
size="2x"
|
52
|
+
{...props}
|
53
|
+
/>
|
54
|
+
</Flex>
|
30
55
|
</div>
|
31
56
|
)
|
32
57
|
}
|
@@ -0,0 +1,394 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Layout from '../../pb_layout/_layout'
|
4
|
+
import Caption from '../../pb_caption/_caption'
|
5
|
+
import SectionSeparator from '../../pb_section_separator/_section_separator'
|
6
|
+
|
7
|
+
const teamData = {
|
8
|
+
eagles: {
|
9
|
+
avatar:"https://images.unsplash.com/photo-1628703117067-fb7c9c20946e?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8ZWFnbGVzfGVufDB8fDB8fHww",
|
10
|
+
name:"Eagles",
|
11
|
+
rank:"#1 NFC East",
|
12
|
+
territory:"PHI",
|
13
|
+
},
|
14
|
+
packers: {
|
15
|
+
avatar:"https://images.unsplash.com/photo-1486297678162-eb2a19b0a32d?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
16
|
+
name:"Packers",
|
17
|
+
rank:"#3 NFC North",
|
18
|
+
territory:"GB",
|
19
|
+
},
|
20
|
+
vikings: {
|
21
|
+
avatar:"https://images.unsplash.com/photo-1525540796810-55f9fbc5592f?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTV8fHZpa2luZ3xlbnwwfHwwfHx8MA%3D%3D",
|
22
|
+
name:"Vikings",
|
23
|
+
rank:"#2 NFC North",
|
24
|
+
territory:"MIN",
|
25
|
+
},
|
26
|
+
rams: {
|
27
|
+
avatar:"https://images.unsplash.com/photo-1490739043913-239b6cdf4084?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
28
|
+
name:"Rams",
|
29
|
+
rank:"#1 NFC West",
|
30
|
+
territory:"LAR",
|
31
|
+
},
|
32
|
+
lions: {
|
33
|
+
avatar:"https://images.unsplash.com/photo-1614027164847-1b28cfe1df60?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
34
|
+
name:"Lions",
|
35
|
+
rank:"#1 NFC North",
|
36
|
+
territory:"DET",
|
37
|
+
},
|
38
|
+
commanders: {
|
39
|
+
avatar:"https://images.unsplash.com/photo-1501466044931-62695aada8e9?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
40
|
+
name:"Commanders",
|
41
|
+
rank:"#2 NFC East",
|
42
|
+
territory:"WAS",
|
43
|
+
},
|
44
|
+
buccaneers: {
|
45
|
+
avatar:"https://images.unsplash.com/photo-1584116843008-46d529f04145?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
46
|
+
name:"Buccaneers",
|
47
|
+
rank:"#1 NFC South",
|
48
|
+
territory:"TB",
|
49
|
+
},
|
50
|
+
chiefs: {
|
51
|
+
avatar:"https://plus.unsplash.com/premium_photo-1697729864667-57f5f29e946b?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MXx8a2Fuc2FzJTIwY2l0eXxlbnwwfHwwfHx8MA%3D%3D",
|
52
|
+
name:"Chiefs",
|
53
|
+
rank:"#1 AFC West",
|
54
|
+
territory:"KC",
|
55
|
+
},
|
56
|
+
chargers: {
|
57
|
+
avatar:"https://images.unsplash.com/photo-1529310399831-ed472b81d589?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
58
|
+
name:"Chargers",
|
59
|
+
rank:"#2 AFC West",
|
60
|
+
territory:"LAC",
|
61
|
+
},
|
62
|
+
texans: {
|
63
|
+
avatar:"https://images.unsplash.com/photo-1545345540-ea5d968030af?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
64
|
+
name:"Texans",
|
65
|
+
rank:"#1 AFC South",
|
66
|
+
territory:"HOU",
|
67
|
+
},
|
68
|
+
broncos: {
|
69
|
+
avatar:"https://images.unsplash.com/photo-1553284965-83fd3e82fa5a?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
70
|
+
name:"Broncos",
|
71
|
+
rank:"#3 AFC West",
|
72
|
+
territory:"DEN",
|
73
|
+
},
|
74
|
+
bills: {
|
75
|
+
avatar:"https://images.unsplash.com/photo-1575414914265-ebc9aa2637f4?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
76
|
+
name:"Bills",
|
77
|
+
rank:"#1 AFC East",
|
78
|
+
territory:"BUF",
|
79
|
+
},
|
80
|
+
steelers: {
|
81
|
+
avatar:"https://plus.unsplash.com/premium_photo-1697730155764-cc8ca8f78cbe?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MXx8cGl0dHNidXJnaHxlbnwwfHwwfHx8MA%3D%3D",
|
82
|
+
name:"Steelers",
|
83
|
+
rank:"#2 AFC North",
|
84
|
+
territory:"PIT",
|
85
|
+
},
|
86
|
+
ravens: {
|
87
|
+
avatar:"https://images.unsplash.com/photo-1433888376991-1297486ba3f5?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8cmF2ZW58ZW58MHx8MHx8fDA%3D",
|
88
|
+
name:"Ravens",
|
89
|
+
rank:"#1 AFC North",
|
90
|
+
territory:"BAL",
|
91
|
+
},
|
92
|
+
bye: {
|
93
|
+
avatar:"",
|
94
|
+
name:"BYE",
|
95
|
+
rank:"",
|
96
|
+
territory:"",
|
97
|
+
},
|
98
|
+
}
|
99
|
+
|
100
|
+
const LayoutBracket = () => {
|
101
|
+
return (
|
102
|
+
<div>
|
103
|
+
<Layout
|
104
|
+
layout="bracket"
|
105
|
+
>
|
106
|
+
<Layout.RoundLabel>
|
107
|
+
<Caption>Wild Card</Caption>
|
108
|
+
<SectionSeparator marginY="sm"/>
|
109
|
+
</Layout.RoundLabel>
|
110
|
+
<Layout.Round marginBottom={{ xs: "md", sm: "md" }}>
|
111
|
+
<Layout.Game>
|
112
|
+
<Layout.Participant
|
113
|
+
avatar={teamData.packers.avatar}
|
114
|
+
name={teamData.packers.name}
|
115
|
+
points="10"
|
116
|
+
rank={teamData.packers.rank}
|
117
|
+
territory={teamData.packers.territory}
|
118
|
+
/>
|
119
|
+
<Layout.Participant
|
120
|
+
avatar={teamData.eagles.avatar}
|
121
|
+
name={teamData.eagles.name}
|
122
|
+
points="22"
|
123
|
+
rank={teamData.eagles.rank}
|
124
|
+
self
|
125
|
+
territory={teamData.eagles.territory}
|
126
|
+
winner
|
127
|
+
/>
|
128
|
+
</Layout.Game>
|
129
|
+
<Layout.Game>
|
130
|
+
<Layout.Participant
|
131
|
+
avatar={teamData.vikings.avatar}
|
132
|
+
name={teamData.vikings.name}
|
133
|
+
points="9"
|
134
|
+
rank={teamData.vikings.rank}
|
135
|
+
territory={teamData.vikings.territory}
|
136
|
+
/>
|
137
|
+
<Layout.Participant
|
138
|
+
avatar={teamData.rams.avatar}
|
139
|
+
name={teamData.rams.name}
|
140
|
+
points="27"
|
141
|
+
rank={teamData.rams.rank}
|
142
|
+
territory={teamData.rams.territory}
|
143
|
+
winner
|
144
|
+
/>
|
145
|
+
</Layout.Game>
|
146
|
+
<Layout.Game>
|
147
|
+
<Layout.Participant
|
148
|
+
avatar={teamData.lions.avatar}
|
149
|
+
name={teamData.lions.name}
|
150
|
+
points=""
|
151
|
+
rank={teamData.lions.rank}
|
152
|
+
territory={teamData.lions.territory}
|
153
|
+
winner
|
154
|
+
/>
|
155
|
+
<Layout.Participant
|
156
|
+
avatar={teamData.bye.avatar}
|
157
|
+
name={teamData.bye.name}
|
158
|
+
points=""
|
159
|
+
rank={teamData.bye.rank}
|
160
|
+
territory={teamData.bye.territory}
|
161
|
+
/>
|
162
|
+
</Layout.Game>
|
163
|
+
<Layout.Game>
|
164
|
+
<Layout.Participant
|
165
|
+
avatar={teamData.commanders.avatar}
|
166
|
+
name={teamData.commanders.name}
|
167
|
+
points="23"
|
168
|
+
rank={teamData.commanders.rank}
|
169
|
+
territory={teamData.commanders.territory}
|
170
|
+
winner
|
171
|
+
/>
|
172
|
+
<Layout.Participant
|
173
|
+
avatar={teamData.buccaneers.avatar}
|
174
|
+
name={teamData.buccaneers.name}
|
175
|
+
points="20"
|
176
|
+
rank={teamData.buccaneers.rank}
|
177
|
+
territory={teamData.buccaneers.territory}
|
178
|
+
/>
|
179
|
+
</Layout.Game>
|
180
|
+
<Layout.Game>
|
181
|
+
<Layout.Participant
|
182
|
+
avatar={teamData.chiefs.avatar}
|
183
|
+
name={teamData.chiefs.name}
|
184
|
+
points=""
|
185
|
+
rank={teamData.chiefs.rank}
|
186
|
+
territory={teamData.chiefs.territory}
|
187
|
+
winner
|
188
|
+
/>
|
189
|
+
<Layout.Participant
|
190
|
+
avatar={teamData.bye.avatar}
|
191
|
+
name={teamData.bye.name}
|
192
|
+
points=""
|
193
|
+
rank={teamData.bye.rank}
|
194
|
+
territory={teamData.bye.territory}
|
195
|
+
/>
|
196
|
+
</Layout.Game>
|
197
|
+
<Layout.Game>
|
198
|
+
<Layout.Participant
|
199
|
+
avatar={teamData.chargers.avatar}
|
200
|
+
name={teamData.chargers.name}
|
201
|
+
points="12"
|
202
|
+
rank={teamData.chargers.rank}
|
203
|
+
territory={teamData.chargers.territory}
|
204
|
+
/>
|
205
|
+
<Layout.Participant
|
206
|
+
avatar={teamData.texans.avatar}
|
207
|
+
name={teamData.texans.name}
|
208
|
+
points="32"
|
209
|
+
rank={teamData.texans.rank}
|
210
|
+
territory={teamData.texans.territory}
|
211
|
+
winner
|
212
|
+
/>
|
213
|
+
</Layout.Game>
|
214
|
+
<Layout.Game>
|
215
|
+
<Layout.Participant
|
216
|
+
avatar={teamData.broncos.avatar}
|
217
|
+
name={teamData.broncos.name}
|
218
|
+
points="7"
|
219
|
+
rank={teamData.broncos.rank}
|
220
|
+
territory={teamData.broncos.territory}
|
221
|
+
/>
|
222
|
+
<Layout.Participant
|
223
|
+
avatar={teamData.bills.avatar}
|
224
|
+
name={teamData.bills.name}
|
225
|
+
points="31"
|
226
|
+
rank={teamData.bills.rank}
|
227
|
+
territory={teamData.bills.territory}
|
228
|
+
winner
|
229
|
+
/>
|
230
|
+
</Layout.Game>
|
231
|
+
<Layout.Game>
|
232
|
+
<Layout.Participant
|
233
|
+
avatar={teamData.steelers.avatar}
|
234
|
+
name={teamData.steelers.name}
|
235
|
+
points="14"
|
236
|
+
rank={teamData.steelers.rank}
|
237
|
+
territory={teamData.steelers.territory}
|
238
|
+
/>
|
239
|
+
<Layout.Participant
|
240
|
+
avatar={teamData.ravens.avatar}
|
241
|
+
name={teamData.ravens.name}
|
242
|
+
points="28"
|
243
|
+
rank={teamData.ravens.rank}
|
244
|
+
territory={teamData.ravens.territory}
|
245
|
+
winner
|
246
|
+
/>
|
247
|
+
</Layout.Game>
|
248
|
+
</Layout.Round>
|
249
|
+
<Layout.RoundLabel>
|
250
|
+
<Caption>Divisional</Caption>
|
251
|
+
<SectionSeparator marginY="sm"/>
|
252
|
+
</Layout.RoundLabel>
|
253
|
+
<Layout.Round marginBottom={{ xs: "md", sm: "md" }}>
|
254
|
+
<Layout.Game>
|
255
|
+
<Layout.Participant
|
256
|
+
avatar={teamData.rams.avatar}
|
257
|
+
name={teamData.rams.name}
|
258
|
+
points="22"
|
259
|
+
rank={teamData.rams.rank}
|
260
|
+
territory={teamData.rams.territory}
|
261
|
+
/>
|
262
|
+
<Layout.Participant
|
263
|
+
avatar={teamData.eagles.avatar}
|
264
|
+
name={teamData.eagles.name}
|
265
|
+
points="28"
|
266
|
+
rank={teamData.eagles.rank}
|
267
|
+
self
|
268
|
+
territory={teamData.eagles.territory}
|
269
|
+
winner
|
270
|
+
/>
|
271
|
+
</Layout.Game>
|
272
|
+
<Layout.Game>
|
273
|
+
<Layout.Participant
|
274
|
+
avatar={teamData.commanders.avatar}
|
275
|
+
name={teamData.commanders.name}
|
276
|
+
points="45"
|
277
|
+
rank={teamData.commanders.rank}
|
278
|
+
territory={teamData.commanders.territory}
|
279
|
+
winner
|
280
|
+
/>
|
281
|
+
<Layout.Participant
|
282
|
+
avatar={teamData.lions.avatar}
|
283
|
+
name={teamData.lions.name}
|
284
|
+
points="31"
|
285
|
+
rank={teamData.lions.rank}
|
286
|
+
territory={teamData.lions.territory}
|
287
|
+
/>
|
288
|
+
</Layout.Game>
|
289
|
+
<Layout.Game>
|
290
|
+
<Layout.Participant
|
291
|
+
avatar={teamData.texans.avatar}
|
292
|
+
name={teamData.texans.name}
|
293
|
+
points="14"
|
294
|
+
rank={teamData.texans.rank}
|
295
|
+
territory={teamData.texans.territory}
|
296
|
+
/>
|
297
|
+
<Layout.Participant
|
298
|
+
avatar={teamData.chiefs.avatar}
|
299
|
+
name={teamData.chiefs.name}
|
300
|
+
points="23"
|
301
|
+
rank={teamData.chiefs.rank}
|
302
|
+
territory={teamData.chiefs.territory}
|
303
|
+
winner
|
304
|
+
/>
|
305
|
+
</Layout.Game>
|
306
|
+
<Layout.Game>
|
307
|
+
<Layout.Participant
|
308
|
+
avatar={teamData.ravens.avatar}
|
309
|
+
name={teamData.ravens.name}
|
310
|
+
points="25"
|
311
|
+
rank={teamData.ravens.rank}
|
312
|
+
territory={teamData.ravens.territory}
|
313
|
+
/>
|
314
|
+
<Layout.Participant
|
315
|
+
avatar={teamData.bills.avatar}
|
316
|
+
name={teamData.bills.name}
|
317
|
+
points="27"
|
318
|
+
rank={teamData.bills.rank}
|
319
|
+
territory={teamData.bills.territory}
|
320
|
+
winner
|
321
|
+
/>
|
322
|
+
</Layout.Game>
|
323
|
+
</Layout.Round>
|
324
|
+
<Layout.RoundLabel>
|
325
|
+
<Caption>Conference</Caption>
|
326
|
+
<SectionSeparator marginY="sm"/>
|
327
|
+
</Layout.RoundLabel>
|
328
|
+
<Layout.Round marginBottom={{ xs: "md", sm: "md" }}>
|
329
|
+
<Layout.Game>
|
330
|
+
<Layout.Participant
|
331
|
+
avatar={teamData.commanders.avatar}
|
332
|
+
name={teamData.commanders.name}
|
333
|
+
points="23"
|
334
|
+
rank={teamData.commanders.rank}
|
335
|
+
territory={teamData.commanders.territory}
|
336
|
+
/>
|
337
|
+
<Layout.Participant
|
338
|
+
avatar={teamData.eagles.avatar}
|
339
|
+
name={teamData.eagles.name}
|
340
|
+
points="55"
|
341
|
+
rank={teamData.eagles.rank}
|
342
|
+
self
|
343
|
+
territory={teamData.eagles.territory}
|
344
|
+
winner
|
345
|
+
/>
|
346
|
+
</Layout.Game>
|
347
|
+
<Layout.Game>
|
348
|
+
<Layout.Participant
|
349
|
+
avatar={teamData.bills.avatar}
|
350
|
+
name={teamData.bills.name}
|
351
|
+
points="29"
|
352
|
+
rank={teamData.bills.rank}
|
353
|
+
territory={teamData.bills.territory}
|
354
|
+
/>
|
355
|
+
<Layout.Participant
|
356
|
+
avatar={teamData.chiefs.avatar}
|
357
|
+
name={teamData.chiefs.name}
|
358
|
+
points="32"
|
359
|
+
rank={teamData.chiefs.rank}
|
360
|
+
territory={teamData.chiefs.territory}
|
361
|
+
winner
|
362
|
+
/>
|
363
|
+
</Layout.Game>
|
364
|
+
</Layout.Round>
|
365
|
+
<Layout.RoundLabel>
|
366
|
+
<Caption>Super Bowl</Caption>
|
367
|
+
<SectionSeparator marginY="sm"/>
|
368
|
+
</Layout.RoundLabel>
|
369
|
+
<Layout.Round>
|
370
|
+
<Layout.Game>
|
371
|
+
<Layout.Participant
|
372
|
+
avatar={teamData.chiefs.avatar}
|
373
|
+
name={teamData.chiefs.name}
|
374
|
+
points="22"
|
375
|
+
rank={teamData.chiefs.rank}
|
376
|
+
territory={teamData.chiefs.territory}
|
377
|
+
/>
|
378
|
+
<Layout.Participant
|
379
|
+
avatar={teamData.eagles.avatar}
|
380
|
+
name={teamData.eagles.name}
|
381
|
+
points="40"
|
382
|
+
rank={teamData.eagles.rank}
|
383
|
+
self
|
384
|
+
territory={teamData.eagles.territory}
|
385
|
+
winner
|
386
|
+
/>
|
387
|
+
</Layout.Game>
|
388
|
+
</Layout.Round>
|
389
|
+
</Layout>
|
390
|
+
</div>
|
391
|
+
)
|
392
|
+
}
|
393
|
+
|
394
|
+
export default LayoutBracket
|
@@ -0,0 +1,5 @@
|
|
1
|
+
Use `<Layout.RoundLabel>`, `<Layout.Round>`, `<Layout.Game>`, and/or `<Layout.Participant>` to make a bracket layout. Feel free to use custom components in place of the template components based on your needs.
|
2
|
+
|
3
|
+
On mobile devices, `<Layout.RoundLabel>` will display (on desktop these components are hidden) and the bracket will be in one column.
|
4
|
+
|
5
|
+
Ensure that each `<Layout.Game>` maintains a consistent height for the bracket lines to lay out properly.
|
@@ -7,4 +7,5 @@ export { default as LayoutKanbanResponsive } from './_layout_kanban_responsive.j
|
|
7
7
|
export { default as LayoutCollectionDetail } from './_layout_collection_detail.jsx'
|
8
8
|
export { default as LayoutContent } from './_layout_content.jsx'
|
9
9
|
export { default as LayoutMasonry } from './_layout_masonry.jsx'
|
10
|
+
export { default as LayoutBracket } from './_layout_bracket.jsx'
|
10
11
|
|
@@ -0,0 +1,72 @@
|
|
1
|
+
<% treeData = [{
|
2
|
+
label: "Power Home Remodeling",
|
3
|
+
value: "Power Home Remodeling",
|
4
|
+
id: "100",
|
5
|
+
expanded: true,
|
6
|
+
children: [
|
7
|
+
{
|
8
|
+
label: "People",
|
9
|
+
value: "People",
|
10
|
+
id: "101",
|
11
|
+
expanded: true,
|
12
|
+
children: [
|
13
|
+
{
|
14
|
+
label: "Talent Acquisition",
|
15
|
+
value: "Talent Acquisition",
|
16
|
+
id: "102",
|
17
|
+
},
|
18
|
+
{
|
19
|
+
label: "Business Affairs",
|
20
|
+
value: "Business Affairs",
|
21
|
+
id: "103",
|
22
|
+
children: [
|
23
|
+
{
|
24
|
+
label: "Initiatives",
|
25
|
+
value: "Initiatives",
|
26
|
+
id: "104",
|
27
|
+
},
|
28
|
+
{
|
29
|
+
label: "Learning & Development",
|
30
|
+
value: "Learning & Development",
|
31
|
+
id: "105",
|
32
|
+
},
|
33
|
+
],
|
34
|
+
},
|
35
|
+
{
|
36
|
+
label: "People Experience",
|
37
|
+
value: "People Experience",
|
38
|
+
id: "106",
|
39
|
+
},
|
40
|
+
],
|
41
|
+
},
|
42
|
+
{
|
43
|
+
label: "Contact Center",
|
44
|
+
value: "Contact Center",
|
45
|
+
id: "107",
|
46
|
+
children: [
|
47
|
+
{
|
48
|
+
label: "Appointment Management",
|
49
|
+
value: "Appointment Management",
|
50
|
+
id: "108",
|
51
|
+
},
|
52
|
+
{
|
53
|
+
label: "Customer Service",
|
54
|
+
value: "Customer Service",
|
55
|
+
id: "109",
|
56
|
+
},
|
57
|
+
{
|
58
|
+
label: "Energy",
|
59
|
+
value: "Energy",
|
60
|
+
id: "110",
|
61
|
+
},
|
62
|
+
],
|
63
|
+
},
|
64
|
+
],
|
65
|
+
}] %>
|
66
|
+
|
67
|
+
<%= pb_rails("multi_level_select", props: {
|
68
|
+
error: "Please make a valid selection",
|
69
|
+
id: "multi-level-select-error-rails",
|
70
|
+
name: "my_array",
|
71
|
+
tree_data: treeData
|
72
|
+
}) %>
|
@@ -0,0 +1,97 @@
|
|
1
|
+
import React, { useState, useEffect } from "react";
|
2
|
+
import MultiLevelSelect from "../_multi_level_select";
|
3
|
+
|
4
|
+
const treeData = [
|
5
|
+
{
|
6
|
+
label: "Power Home Remodeling",
|
7
|
+
value: "Power Home Remodeling",
|
8
|
+
id: "powerhome1",
|
9
|
+
expanded: true,
|
10
|
+
children: [
|
11
|
+
{
|
12
|
+
label: "People",
|
13
|
+
value: "People",
|
14
|
+
id: "people1",
|
15
|
+
expanded: true,
|
16
|
+
children: [
|
17
|
+
{
|
18
|
+
label: "Talent Acquisition",
|
19
|
+
value: "Talent Acquisition",
|
20
|
+
id: "talent1",
|
21
|
+
},
|
22
|
+
{
|
23
|
+
label: "Business Affairs",
|
24
|
+
value: "Business Affairs",
|
25
|
+
id: "business1",
|
26
|
+
children: [
|
27
|
+
{
|
28
|
+
label: "Initiatives",
|
29
|
+
value: "Initiatives",
|
30
|
+
id: "initiative1",
|
31
|
+
},
|
32
|
+
{
|
33
|
+
label: "Learning & Development",
|
34
|
+
value: "Learning & Development",
|
35
|
+
id: "development1",
|
36
|
+
},
|
37
|
+
],
|
38
|
+
},
|
39
|
+
{
|
40
|
+
label: "People Experience",
|
41
|
+
value: "People Experience",
|
42
|
+
id: "experience1",
|
43
|
+
},
|
44
|
+
],
|
45
|
+
},
|
46
|
+
{
|
47
|
+
label: "Contact Center",
|
48
|
+
value: "Contact Center",
|
49
|
+
id: "contact1",
|
50
|
+
children: [
|
51
|
+
{
|
52
|
+
label: "Appointment Management",
|
53
|
+
value: "Appointment Management",
|
54
|
+
id: "appointment1",
|
55
|
+
},
|
56
|
+
{
|
57
|
+
label: "Customer Service",
|
58
|
+
value: "Customer Service",
|
59
|
+
id: "customer1",
|
60
|
+
},
|
61
|
+
{
|
62
|
+
label: "Energy",
|
63
|
+
value: "Energy",
|
64
|
+
id: "energy1",
|
65
|
+
},
|
66
|
+
],
|
67
|
+
},
|
68
|
+
],
|
69
|
+
},
|
70
|
+
];
|
71
|
+
|
72
|
+
const MultiLevelSelectError = (props) => {
|
73
|
+
const [selectedItems, setSelectedItems] = useState([]);
|
74
|
+
const [errorState, setErrorState] = useState("Please make a valid selection");
|
75
|
+
|
76
|
+
useEffect(() => {
|
77
|
+
if (selectedItems.length === 0) {
|
78
|
+
setErrorState("Please make a valid selection");
|
79
|
+
} else {
|
80
|
+
setErrorState(null);
|
81
|
+
}
|
82
|
+
}, [selectedItems]);
|
83
|
+
|
84
|
+
return (
|
85
|
+
<div>
|
86
|
+
<MultiLevelSelect
|
87
|
+
error={errorState}
|
88
|
+
id="multiselect-error"
|
89
|
+
onSelect={(selectedNodes) => setSelectedItems(selectedNodes)}
|
90
|
+
treeData={treeData}
|
91
|
+
{...props}
|
92
|
+
/>
|
93
|
+
</div>
|
94
|
+
);
|
95
|
+
};
|
96
|
+
|
97
|
+
export default MultiLevelSelectError;
|