playbook_ui_docs 14.12.0.pre.rc.11 → 14.13.0.pre.rc.0
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_advanced_table/docs/_advanced_table_loading.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_loading.md → _advanced_table_loading_react.md} +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.jsx +50 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.html.erb +38 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.jsx +60 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.md +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx +78 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.jsx +53 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.jsx +52 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.md +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_no_subrows.json +42 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_with_id.json +299 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +6 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames.html.erb +13 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames_rails.md +3 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb +1 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md +7 -0
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx +38 -0
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +3 -45
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +0 -1
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +9 -16
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +44 -19
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +21 -3
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +16 -21
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +2 -19
- data/app/pb_kits/playbook/pb_drawer/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_drawer/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md +1 -1
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +3 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.jsx +8 -3
- data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx +4 -1
- data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx +4 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.html.erb +47 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_rails.md +2 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +12 -8
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.html.erb +52 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.md +0 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.html.erb +52 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +3 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.html.erb +80 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +46 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask_rails.md +3 -0
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb +19 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.jsx +27 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md +1 -0
- 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/dist/playbook-doc.js +1 -1
- metadata +36 -4
- /data/app/pb_kits/playbook/pb_table/docs/{_table_with_collapsible.md → _table_with_collapsible_react.md} +0 -0
@@ -1,6 +1,24 @@
|
|
1
|
-
|
1
|
+
The Drawer component can be used to create responsive navigation menus and sidebars. It provides flexible options for controlling when and how the drawer appears based on screen size.
|
2
|
+
|
3
|
+
### Within Element
|
4
|
+
The `withinElement` prop allows you to render the drawer within its parent container:
|
5
|
+
- The drawer will be positioned relative to its parent element
|
6
|
+
- Useful for creating nested navigation structures
|
7
|
+
- This must be used in conjunction with the `triggerId` prop
|
8
|
+
|
9
|
+
This provides a clean way to create responsive navigation patterns that adapt to different screen sizes while maintaining a consistent user experience.
|
10
|
+
|
11
|
+
### Trigger Id
|
12
|
+
The `triggerId` prop allows you to connect an element to control the drawer:
|
13
|
+
- The specified element will toggle the drawer open/closed
|
14
|
+
- The element is automatically hidden when the drawer is opened via breakpoint
|
15
|
+
- The element reappears when the drawer is closed via breakpoint
|
16
|
+
|
17
|
+
### Breakpoint
|
18
|
+
Use the `breakpoint` prop to control when the drawer automatically opens or closes based on screen size. For example, setting `breakpoint="md"` will:
|
19
|
+
- Close the drawer on screens smaller than the medium breakpoint (992px)
|
20
|
+
- Automatically open the drawer on screens larger than or equal to the medium breakpoint
|
21
|
+
|
2
22
|
|
3
|
-
Set a menu button with the `menuButtonID` props. When the Drawer is open, the menu button will be hidden. But when your Brakpoint closes the drawer, you can toggle the Drawer open/close with your menu butotn.
|
4
23
|
|
5
|
-
Also use the `withinElement` props to have the Drawer open within a specific element, instead of the default behavior of it taking up the entire screen size.
|
6
24
|
|
@@ -1,24 +1,25 @@
|
|
1
|
-
import React, { useState } from "react"
|
2
|
-
import { Button, Drawer, Flex } from "playbook-ui"
|
1
|
+
import React, { useState } from "react"
|
2
|
+
import { Button, Drawer, Flex } from "playbook-ui"
|
3
3
|
|
4
4
|
const DrawerSizes = () => {
|
5
5
|
// Individual state variables for each drawer size
|
6
|
-
const [openedNoOverlayDrawer, setOpenedNoOverlayDrawer] = useState(false)
|
7
|
-
const [openedOverlayDrawer, setOpenedOverlayDrawer] = useState(false)
|
6
|
+
const [openedNoOverlayDrawer, setOpenedNoOverlayDrawer] = useState(false)
|
7
|
+
const [openedOverlayDrawer, setOpenedOverlayDrawer] = useState(false)
|
8
8
|
|
9
9
|
// Toggle functions for each drawer
|
10
|
-
const toggleNoOverlayDrawer = () =>
|
11
|
-
|
10
|
+
const toggleNoOverlayDrawer = () =>
|
11
|
+
setOpenedNoOverlayDrawer(!openedNoOverlayDrawer)
|
12
|
+
const toggleOverlayDrawer = () => setOpenedOverlayDrawer(!openedOverlayDrawer)
|
12
13
|
|
13
14
|
return (
|
14
15
|
<>
|
15
16
|
<Flex wrap>
|
16
|
-
<Button marginRight=
|
17
|
+
<Button marginRight='md'
|
17
18
|
onClick={toggleNoOverlayDrawer}
|
18
19
|
>
|
19
20
|
No Overlay Drawer
|
20
21
|
</Button>
|
21
|
-
<Button marginRight=
|
22
|
+
<Button marginRight='md'
|
22
23
|
onClick={toggleOverlayDrawer}
|
23
24
|
>
|
24
25
|
Overlay Drawer
|
@@ -27,29 +28,23 @@ const DrawerSizes = () => {
|
|
27
28
|
|
28
29
|
{/* Drawers for each size */}
|
29
30
|
<Drawer
|
30
|
-
behavior="push"
|
31
|
-
fullHeight
|
32
31
|
onClose={toggleNoOverlayDrawer}
|
33
32
|
opened={openedNoOverlayDrawer}
|
34
33
|
overlay={false}
|
35
|
-
|
36
|
-
size="lg"
|
34
|
+
size='lg'
|
37
35
|
>
|
38
36
|
This is a Drawer with no overlay
|
39
37
|
</Drawer>
|
40
38
|
<Drawer
|
41
|
-
behavior="push"
|
42
|
-
fullHeight
|
43
39
|
onClose={toggleOverlayDrawer}
|
44
40
|
opened={openedOverlayDrawer}
|
45
|
-
|
46
|
-
|
47
|
-
size="lg"
|
41
|
+
placement='right'
|
42
|
+
size='lg'
|
48
43
|
>
|
49
|
-
This is a Drawer with an overlay
|
44
|
+
This is a Drawer with an overlay
|
50
45
|
</Drawer>
|
51
46
|
</>
|
52
|
-
)
|
53
|
-
}
|
47
|
+
)
|
48
|
+
}
|
54
49
|
|
55
|
-
export default DrawerSizes
|
50
|
+
export default DrawerSizes
|
@@ -19,7 +19,8 @@ const DrawerSizes = () => {
|
|
19
19
|
return (
|
20
20
|
<>
|
21
21
|
<Flex wrap>
|
22
|
-
<Button
|
22
|
+
<Button
|
23
|
+
marginRight="md"
|
23
24
|
onClick={toggleXsDrawer}
|
24
25
|
>
|
25
26
|
XS Drawer
|
@@ -48,11 +49,8 @@ const DrawerSizes = () => {
|
|
48
49
|
|
49
50
|
{/* Drawers for each size */}
|
50
51
|
<Drawer
|
51
|
-
behavior="push"
|
52
|
-
fullHeight
|
53
52
|
onClose={toggleXsDrawer}
|
54
53
|
opened={openedXsDrawer}
|
55
|
-
overlay
|
56
54
|
placement="right"
|
57
55
|
size="xs"
|
58
56
|
>
|
@@ -60,47 +58,32 @@ const DrawerSizes = () => {
|
|
60
58
|
</Drawer>
|
61
59
|
|
62
60
|
<Drawer
|
63
|
-
behavior="push"
|
64
|
-
fullHeight
|
65
61
|
onClose={toggleSmDrawer}
|
66
62
|
opened={openedSmDrawer}
|
67
|
-
overlay
|
68
|
-
placement="right"
|
69
63
|
size="sm"
|
70
64
|
>
|
71
65
|
This is an SM Drawer
|
72
66
|
</Drawer>
|
73
67
|
|
74
68
|
<Drawer
|
75
|
-
behavior="push"
|
76
|
-
fullHeight
|
77
69
|
onClose={toggleMdDrawer}
|
78
70
|
opened={openedMdDrawer}
|
79
|
-
overlay
|
80
71
|
placement="right"
|
81
|
-
size="md"
|
82
72
|
>
|
83
73
|
This is an MD Drawer
|
84
74
|
</Drawer>
|
85
75
|
|
86
76
|
<Drawer
|
87
|
-
behavior="push"
|
88
|
-
fullHeight
|
89
77
|
onClose={toggleLgDrawer}
|
90
78
|
opened={openedLgDrawer}
|
91
|
-
overlay
|
92
|
-
placement="right"
|
93
79
|
size="lg"
|
94
80
|
>
|
95
81
|
This is an LG Drawer
|
96
82
|
</Drawer>
|
97
83
|
|
98
84
|
<Drawer
|
99
|
-
behavior="push"
|
100
|
-
fullHeight
|
101
85
|
onClose={toggleXlDrawer}
|
102
86
|
opened={openedXlDrawer}
|
103
|
-
overlay
|
104
87
|
placement="right"
|
105
88
|
size="xl"
|
106
89
|
>
|
@@ -4,3 +4,4 @@ export { default as DrawerOverlay } from './_drawer_overlay.jsx'
|
|
4
4
|
export { default as DrawerBorders } from './_drawer_borders.jsx'
|
5
5
|
export { default as DrawerBreakpoints } from './_drawer_breakpoints.jsx'
|
6
6
|
export { default as DrawerMenu } from './_drawer_menu.jsx'
|
7
|
+
export { default as DrawerBehavior } from './_drawer_behavior.jsx'
|
@@ -1 +1 @@
|
|
1
|
-
For the `subtle` variant, it is recommended that you set the `Separators` prop to `false` to remove the separator lines between the options for a
|
1
|
+
For the `subtle` variant, it is recommended that you set the `Separators` prop to `false` to remove the separator lines between the options for a cleaner look.
|
@@ -29,6 +29,7 @@ const RadioChildren = (props) => {
|
|
29
29
|
marginBottom="none"
|
30
30
|
minWidth="xs"
|
31
31
|
options={options}
|
32
|
+
{...props}
|
32
33
|
/>
|
33
34
|
</Radio>
|
34
35
|
<Radio
|
@@ -40,10 +41,11 @@ const RadioChildren = (props) => {
|
|
40
41
|
value="Typeahead"
|
41
42
|
{...props}
|
42
43
|
>
|
43
|
-
<Typeahead
|
44
|
+
<Typeahead
|
44
45
|
marginBottom="none"
|
45
46
|
minWidth="xs"
|
46
47
|
options={options}
|
48
|
+
{...props}
|
47
49
|
/>
|
48
50
|
</Radio>
|
49
51
|
<Radio
|
@@ -54,9 +56,12 @@ const RadioChildren = (props) => {
|
|
54
56
|
value="Typography"
|
55
57
|
{...props}
|
56
58
|
>
|
57
|
-
<Title
|
59
|
+
<Title
|
60
|
+
text="Custom Typography"
|
61
|
+
{...props}
|
62
|
+
/>
|
58
63
|
</Radio>
|
59
64
|
</div>
|
60
65
|
)
|
61
66
|
}
|
62
|
-
export default RadioChildren
|
67
|
+
export default RadioChildren
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { useState } from 'react'
|
2
2
|
import SelectableIcon from '../_selectable_icon'
|
3
3
|
|
4
|
-
const SelectableIconDefault = () => {
|
4
|
+
const SelectableIconDefault = (props) => {
|
5
5
|
const [ checkSelected, toggleSelected ] = useState(true)
|
6
6
|
const [ checkUnselected, toggleUnselected ] = useState(false)
|
7
7
|
const [ checkDisabled, toggleDisabled ] = useState(false)
|
@@ -15,6 +15,7 @@ const SelectableIconDefault = () => {
|
|
15
15
|
inputId={10}
|
16
16
|
onChange={() => toggleSelected(!checkSelected)}
|
17
17
|
text="US Dollar"
|
18
|
+
{...props}
|
18
19
|
/>
|
19
20
|
|
20
21
|
<SelectableIcon
|
@@ -23,6 +24,7 @@ const SelectableIconDefault = () => {
|
|
23
24
|
inputId={11}
|
24
25
|
onChange={() => toggleUnselected(!checkUnselected)}
|
25
26
|
text="Euro"
|
27
|
+
{...props}
|
26
28
|
/>
|
27
29
|
|
28
30
|
<SelectableIcon
|
@@ -32,6 +34,7 @@ const SelectableIconDefault = () => {
|
|
32
34
|
inputId={12}
|
33
35
|
onChange={() => toggleDisabled(!checkDisabled)}
|
34
36
|
text="Yen"
|
37
|
+
{...props}
|
35
38
|
/>
|
36
39
|
</div>
|
37
40
|
)
|
@@ -2,7 +2,7 @@ import React, { useState } from 'react'
|
|
2
2
|
|
3
3
|
import SelectableIcon from '../_selectable_icon'
|
4
4
|
|
5
|
-
const SelectableIconSingleSelect = () => {
|
5
|
+
const SelectableIconSingleSelect = (props) => {
|
6
6
|
const [ selectedFormat, toggleFormat ] = useState(null)
|
7
7
|
|
8
8
|
return (
|
@@ -17,6 +17,7 @@ const SelectableIconSingleSelect = () => {
|
|
17
17
|
onChange={() => toggleFormat('Cassette')}
|
18
18
|
text="Cassette"
|
19
19
|
value="Cassette"
|
20
|
+
{...props}
|
20
21
|
/>
|
21
22
|
|
22
23
|
<SelectableIcon
|
@@ -28,6 +29,7 @@ const SelectableIconSingleSelect = () => {
|
|
28
29
|
onChange={() => toggleFormat('CD')}
|
29
30
|
text="CD"
|
30
31
|
value="CD"
|
32
|
+
{...props}
|
31
33
|
/>
|
32
34
|
|
33
35
|
<SelectableIcon
|
@@ -39,6 +41,7 @@ const SelectableIconSingleSelect = () => {
|
|
39
41
|
onChange={() => toggleFormat('Vinyl')}
|
40
42
|
text="Vinyl"
|
41
43
|
value="Vinyl"
|
44
|
+
{...props}
|
42
45
|
/>
|
43
46
|
</div>
|
44
47
|
)
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<% content = capture do %>
|
2
|
+
<%= pb_rails("card", props: { border_none: true, border_radius: "none", padding: "md" }) do %>
|
3
|
+
<%= pb_rails("body", props: { text: "Nested content inside a Table Row" }) %>
|
4
|
+
<% end %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<%= pb_rails("table", props: { size: "sm" }) do %>
|
8
|
+
<%= pb_rails("table/table_head") do %>
|
9
|
+
<%= pb_rails("table/table_row") do %>
|
10
|
+
<%= pb_rails("table/table_header", props: { text: "Column 1"}) %>
|
11
|
+
<%= pb_rails("table/table_header", props: { text: "Column 2"}) %>
|
12
|
+
<%= pb_rails("table/table_header", props: { text: "Column 3"}) %>
|
13
|
+
<%= pb_rails("table/table_header", props: { text: "Column 4"}) %>
|
14
|
+
<%= pb_rails("table/table_header", props: { text: "Column 5"}) %>
|
15
|
+
<%= pb_rails("table/table_header", props: { text: ""}) %>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
18
|
+
<%= pb_rails("table/table_body") do %>
|
19
|
+
<%= pb_rails("table/table_row", props: { collapsible: true, collapsible_content: content, collapsible_side_highlight: true, id: "1" }) do %>
|
20
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
21
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
22
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
23
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
24
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
25
|
+
<%= pb_rails("table/table_cell", props: { text_align: "right"}) do %>
|
26
|
+
<%= pb_rails("icon", props: { icon: "chevron-down", fixed_width: true, color: "primary" }) %>
|
27
|
+
<% end %>
|
28
|
+
<% end %>
|
29
|
+
<%= pb_rails("table/table_row") do %>
|
30
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
31
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
32
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
33
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
34
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
35
|
+
<%= pb_rails("table/table_cell", props: { text: ""}) %>
|
36
|
+
<% end %>
|
37
|
+
<%= pb_rails("table/table_row") do %>
|
38
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
39
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
40
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
41
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
42
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
43
|
+
<%= pb_rails("table/table_cell", props: { text: ""}) %>
|
44
|
+
<% end %>
|
45
|
+
<% end %>
|
46
|
+
<% end %>
|
47
|
+
|
@@ -0,0 +1,2 @@
|
|
1
|
+
The `collapsible` prop can be used on any Table Row to add a collapsible area. Use the additional `collapsible_content` prop to add any content to the collapsible Row.
|
2
|
+
Please be aware that you will need to pass in an `id` to any table rows you want to be collapsible. Make sure every `id` is unique if you are using multipe collapsibles.
|
@@ -8,27 +8,31 @@ const TableWithCollapsibleWithCustomContent = (props) => {
|
|
8
8
|
<Card
|
9
9
|
borderNone
|
10
10
|
borderRadius="none"
|
11
|
-
color="light"
|
11
|
+
color="light"
|
12
12
|
paddingX="xl"
|
13
13
|
paddingY="md"
|
14
14
|
{...props}
|
15
15
|
>
|
16
|
-
<Body paddingBottom="sm"
|
16
|
+
<Body paddingBottom="sm"
|
17
17
|
text="Expanded Custom Layout"
|
18
18
|
{...props}
|
19
19
|
/>
|
20
20
|
<Flex justify="between">
|
21
21
|
<Image
|
22
|
-
|
22
|
+
size="sm"
|
23
|
+
url="https://unsplash.it/500/400/?image=634"
|
23
24
|
/>
|
24
25
|
<Image
|
25
|
-
|
26
|
+
size="sm"
|
27
|
+
url="https://unsplash.it/500/400/?image=634"
|
26
28
|
/>
|
27
29
|
<Image
|
28
|
-
|
30
|
+
size="sm"
|
31
|
+
url="https://unsplash.it/500/400/?image=634"
|
29
32
|
/>
|
30
33
|
<Image
|
31
|
-
|
34
|
+
size="sm"
|
35
|
+
url="https://unsplash.it/500/400/?image=634"
|
32
36
|
/>
|
33
37
|
</Flex>
|
34
38
|
</Card>
|
@@ -52,7 +56,7 @@ const TableWithCollapsibleWithCustomContent = (props) => {
|
|
52
56
|
|
53
57
|
</Table.Head>
|
54
58
|
<Table.Body>
|
55
|
-
<Table.Row collapsible
|
59
|
+
<Table.Row collapsible
|
56
60
|
collapsibleContent={<Content/>}
|
57
61
|
{...props}
|
58
62
|
>
|
@@ -61,7 +65,7 @@ const TableWithCollapsibleWithCustomContent = (props) => {
|
|
61
65
|
<Table.Cell>{'Value 3'}</Table.Cell>
|
62
66
|
<Table.Cell>{'Value 4'}</Table.Cell>
|
63
67
|
<Table.Cell>{'Value 5'}</Table.Cell>
|
64
|
-
<Table.Cell textAlign="right">{
|
68
|
+
<Table.Cell textAlign="right">{
|
65
69
|
<Icon
|
66
70
|
color="primary"
|
67
71
|
fixedWidth
|
data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.html.erb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
<% content = capture do %>
|
2
|
+
<%= pb_rails("card", props: { border_none: true, border_radius: "none", padding: "md" }) do %>
|
3
|
+
<%= pb_rails("body", props: { text: "Expanded Custom Layout", padding_bottom: "sm" }) %>
|
4
|
+
<%= pb_rails("flex", props: { justify: "between" }) do %>
|
5
|
+
<%= pb_rails("image", props: { size: "sm", url: "https://unsplash.it/500/400/?image=634" }) %>
|
6
|
+
<%= pb_rails("image", props: { size: "sm", url: "https://unsplash.it/500/400/?image=634" }) %>
|
7
|
+
<%= pb_rails("image", props: { size: "sm", url: "https://unsplash.it/500/400/?image=634" }) %>
|
8
|
+
<%= pb_rails("image", props: { size: "sm", url: "https://unsplash.it/500/400/?image=634" }) %>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= pb_rails("table", props: { size: "sm" }) do %>
|
14
|
+
<%= pb_rails("table/table_head") do %>
|
15
|
+
<%= pb_rails("table/table_row") do %>
|
16
|
+
<%= pb_rails("table/table_header", props: { text: "Column 1"}) %>
|
17
|
+
<%= pb_rails("table/table_header", props: { text: "Column 2"}) %>
|
18
|
+
<%= pb_rails("table/table_header", props: { text: "Column 3"}) %>
|
19
|
+
<%= pb_rails("table/table_header", props: { text: "Column 4"}) %>
|
20
|
+
<%= pb_rails("table/table_header", props: { text: "Column 5"}) %>
|
21
|
+
<%= pb_rails("table/table_header", props: { text: ""}) %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<%= pb_rails("table/table_body") do %>
|
25
|
+
<%= pb_rails("table/table_row", props: { collapsible: true, collapsible_content: content, id: "2" }) do %>
|
26
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
27
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
28
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
29
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
30
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
31
|
+
<%= pb_rails("table/table_cell", props: { text_align: "right"}) do %>
|
32
|
+
<%= pb_rails("icon", props: { icon: "chevron-down", fixed_width: true, color: "primary" }) %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
<%= pb_rails("table/table_row") do %>
|
36
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
37
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
38
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
39
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
40
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
41
|
+
<%= pb_rails("table/table_cell", props: { text: ""}) %>
|
42
|
+
<% end %>
|
43
|
+
<%= pb_rails("table/table_row") do %>
|
44
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
45
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
46
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
47
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
48
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
49
|
+
<%= pb_rails("table/table_cell", props: { text: ""}) %>
|
50
|
+
<% end %>
|
51
|
+
<% end %>
|
52
|
+
<% end %>
|
File without changes
|
data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.html.erb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
<% content = capture do %>
|
2
|
+
<%= pb_rails("table", props: { container: false, border_radius: "none", size: "sm"}) do %>
|
3
|
+
<%= pb_rails("background", props: { tag: "tr" }) do %>
|
4
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
5
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
6
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
7
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
8
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= pb_rails("table", props: { size: "sm" }) do %>
|
14
|
+
<%= pb_rails("table/table_head") do %>
|
15
|
+
<%= pb_rails("table/table_row") do %>
|
16
|
+
<%= pb_rails("table/table_header", props: { text: "Column 1"}) %>
|
17
|
+
<%= pb_rails("table/table_header", props: { text: "Column 2"}) %>
|
18
|
+
<%= pb_rails("table/table_header", props: { text: "Column 3"}) %>
|
19
|
+
<%= pb_rails("table/table_header", props: { text: "Column 4"}) %>
|
20
|
+
<%= pb_rails("table/table_header", props: { text: "Column 5"}) %>
|
21
|
+
<%= pb_rails("table/table_header", props: { text: ""}) %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<%= pb_rails("table/table_body") do %>
|
25
|
+
<%= pb_rails("table/table_row", props: { collapsible: true, collapsible_content: content, collapsible_side_highlight: false, id: "3" }) do %>
|
26
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
27
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
28
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
29
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
30
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
31
|
+
<%= pb_rails("table/table_cell", props: { text_align: "right"}) do %>
|
32
|
+
<%= pb_rails("icon", props: { icon: "chevron-down", fixed_width: true, color: "primary" }) %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
<%= pb_rails("table/table_row") do %>
|
36
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
37
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
38
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
39
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
40
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
41
|
+
<%= pb_rails("table/table_cell", props: { text: ""}) %>
|
42
|
+
<% end %>
|
43
|
+
<%= pb_rails("table/table_row") do %>
|
44
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
45
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
46
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
47
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
48
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
49
|
+
<%= pb_rails("table/table_cell", props: { text: ""}) %>
|
50
|
+
<% end %>
|
51
|
+
<% end %>
|
52
|
+
<% end %>
|
data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.html.erb
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
<% content = capture do %>
|
2
|
+
<%= pb_rails("table", props: { container: false, border_radius: "none", size: "sm"}) do %>
|
3
|
+
<%= pb_rails("table/table_head") do %>
|
4
|
+
<%= pb_rails("background", props: { tag: "tr" }) do %>
|
5
|
+
<%= pb_rails("table/table_header") do %>Alt Header<% end %>
|
6
|
+
<%= pb_rails("table/table_header") do %>Alt Header<% end %>
|
7
|
+
<%= pb_rails("table/table_header") do %>Alt Header<% end %>
|
8
|
+
<%= pb_rails("table/table_header") do %>Alt Header<% end %>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
11
|
+
<%= pb_rails("table/table_body") do %>
|
12
|
+
<%= pb_rails("table/table_row") do %>
|
13
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
14
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
15
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
16
|
+
<%= pb_rails("table/table_cell") do %>
|
17
|
+
<%= pb_rails("pill", props: { text: "Pill", variant: "primary" }) %>
|
18
|
+
<% end %>
|
19
|
+
<% end %>
|
20
|
+
<%= pb_rails("table/table_row") do %>
|
21
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
22
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
23
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
24
|
+
<%= pb_rails("table/table_cell") do %>
|
25
|
+
<%= pb_rails("pill", props: { text: "Pill", variant: "primary" }) %>
|
26
|
+
<% end %>
|
27
|
+
<% end %>
|
28
|
+
<%= pb_rails("table/table_row") do %>
|
29
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
30
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
31
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
32
|
+
<%= pb_rails("table/table_cell") do %>
|
33
|
+
<%= pb_rails("pill", props: { text: "Pill", variant: "primary" }) %>
|
34
|
+
<% end %>
|
35
|
+
<% end %>
|
36
|
+
<% end %>
|
37
|
+
<% end %>
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
|
41
|
+
<%= pb_rails("table", props: { size: "sm" }) do %>
|
42
|
+
<%= pb_rails("table/table_head") do %>
|
43
|
+
<%= pb_rails("table/table_row") do %>
|
44
|
+
<%= pb_rails("table/table_header", props: { text: "Column 1"}) %>
|
45
|
+
<%= pb_rails("table/table_header", props: { text: "Column 2"}) %>
|
46
|
+
<%= pb_rails("table/table_header", props: { text: "Column 3"}) %>
|
47
|
+
<%= pb_rails("table/table_header", props: { text: "Column 4"}) %>
|
48
|
+
<%= pb_rails("table/table_header", props: { text: "Column 5"}) %>
|
49
|
+
<%= pb_rails("table/table_header", props: { text: ""}) %>
|
50
|
+
<% end %>
|
51
|
+
<% end %>
|
52
|
+
<%= pb_rails("table/table_body") do %>
|
53
|
+
<%= pb_rails("table/table_row", props: { collapsible: true, collapsible_content: content, collapsible_side_highlight: false, id: "4" }) do %>
|
54
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
55
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
56
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
57
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
58
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
59
|
+
<%= pb_rails("table/table_cell", props: { text_align: "right"}) do %>
|
60
|
+
<%= pb_rails("icon", props: { icon: "chevron-down", fixed_width: true, color: "primary" }) %>
|
61
|
+
<% end %>
|
62
|
+
<% end %>
|
63
|
+
<%= pb_rails("table/table_row") do %>
|
64
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
65
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
66
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
67
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
68
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
69
|
+
<%= pb_rails("table/table_cell", props: { text: ""}) %>
|
70
|
+
<% end %>
|
71
|
+
<%= pb_rails("table/table_row") do %>
|
72
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
73
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
74
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
75
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
76
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
77
|
+
<%= pb_rails("table/table_cell", props: { text: ""}) %>
|
78
|
+
<% end %>
|
79
|
+
<% end %>
|
80
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
The `collapsible_content` can also be used to display nested Tables within each Row.
|
@@ -30,6 +30,10 @@ examples:
|
|
30
30
|
- table_with_subcomponents_rails: Table with Sub Components (Table Elements)
|
31
31
|
- table_with_subcomponents_as_divs: Table with Sub Components (Divs)
|
32
32
|
- table_outer_padding: Outer Padding
|
33
|
+
- table_with_collapsible: Table with Collapsible
|
34
|
+
- table_with_collapsible_with_custom_content_rails: Table with Collapsible with Custom Content
|
35
|
+
- table_with_collapsible_with_nested_rows_rails: Table with Collapsible with Nested Rows
|
36
|
+
- table_with_collapsible_with_nested_table_rails: Table with Collapsible with Nested Table
|
33
37
|
|
34
38
|
react:
|
35
39
|
- table_sm: Small
|