playbook_ui_docs 13.28.0.pre.alpha.pbntr312tableheaderflexremoval3019 → 13.28.0.pre.alpha.play829selectablecardalignment2978
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_table/docs/_table_alignment_column.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.jsx +32 -33
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/{_table_outer_padding.html.erb → _table_alignment_row.html.erb} +7 -7
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.jsx +33 -33
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.html.erb +63 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.jsx +50 -51
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.html.erb +52 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.jsx +38 -37
- data/app/pb_kits/playbook/pb_table/docs/example.yml +9 -9
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
- data/dist/menu.yml +2 -5
- data/dist/playbook-doc.js +10 -10
- metadata +6 -19
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +0 -53
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +0 -159
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +0 -121
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -9
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.html.erb +0 -33
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.html.erb +0 -54
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.html.erb +0 -53
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.jsx +0 -76
- data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.md +0 -1
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui_docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.28.0.pre.alpha.
|
4
|
+
version: 13.28.0.pre.alpha.play829selectablecardalignment2978
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-05-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: playbook_ui
|
@@ -625,11 +625,6 @@ files:
|
|
625
625
|
- app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_default.jsx
|
626
626
|
- app/pb_kits/playbook/pb_distribution_bar/docs/example.yml
|
627
627
|
- app/pb_kits/playbook/pb_distribution_bar/docs/index.js
|
628
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx
|
629
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx
|
630
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx
|
631
|
-
- app/pb_kits/playbook/pb_draggable/docs/example.yml
|
632
|
-
- app/pb_kits/playbook/pb_draggable/docs/index.js
|
633
628
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb
|
634
629
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
|
635
630
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
|
@@ -1526,22 +1521,17 @@ files:
|
|
1526
1521
|
- app/pb_kits/playbook/pb_table/docs/_table_action_middle.html.erb
|
1527
1522
|
- app/pb_kits/playbook/pb_table/docs/_table_action_middle.jsx
|
1528
1523
|
- app/pb_kits/playbook/pb_table/docs/_table_action_middle.md
|
1524
|
+
- app/pb_kits/playbook/pb_table/docs/_table_alignment_column.html.erb
|
1529
1525
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_column.jsx
|
1530
1526
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_column.md
|
1531
|
-
- app/pb_kits/playbook/pb_table/docs/
|
1532
|
-
- app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.md
|
1527
|
+
- app/pb_kits/playbook/pb_table/docs/_table_alignment_row.html.erb
|
1533
1528
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_row.jsx
|
1534
1529
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_row.md
|
1535
|
-
- app/pb_kits/playbook/pb_table/docs/
|
1536
|
-
- app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.md
|
1530
|
+
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.html.erb
|
1537
1531
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.jsx
|
1538
1532
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.md
|
1539
|
-
- app/pb_kits/playbook/pb_table/docs/
|
1540
|
-
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.md
|
1533
|
+
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.html.erb
|
1541
1534
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.jsx
|
1542
|
-
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.md
|
1543
|
-
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.html.erb
|
1544
|
-
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.md
|
1545
1535
|
- app/pb_kits/playbook/pb_table/docs/_table_container.html.erb
|
1546
1536
|
- app/pb_kits/playbook/pb_table/docs/_table_container.jsx
|
1547
1537
|
- app/pb_kits/playbook/pb_table/docs/_table_data_table.html.erb
|
@@ -1567,9 +1557,6 @@ files:
|
|
1567
1557
|
- app/pb_kits/playbook/pb_table/docs/_table_one_action.html.erb
|
1568
1558
|
- app/pb_kits/playbook/pb_table/docs/_table_one_action.jsx
|
1569
1559
|
- app/pb_kits/playbook/pb_table/docs/_table_one_action.md
|
1570
|
-
- app/pb_kits/playbook/pb_table/docs/_table_outer_padding.html.erb
|
1571
|
-
- app/pb_kits/playbook/pb_table/docs/_table_outer_padding.jsx
|
1572
|
-
- app/pb_kits/playbook/pb_table/docs/_table_outer_padding.md
|
1573
1560
|
- app/pb_kits/playbook/pb_table/docs/_table_responsive_table.html.erb
|
1574
1561
|
- app/pb_kits/playbook/pb_table/docs/_table_responsive_table.jsx
|
1575
1562
|
- app/pb_kits/playbook/pb_table/docs/_table_side_highlight.html.erb
|
@@ -1,53 +0,0 @@
|
|
1
|
-
import React, { useState } from "react";
|
2
|
-
import { SelectableList, Draggable, DraggableProvider } from "../../";
|
3
|
-
|
4
|
-
// Initial items to be dragged
|
5
|
-
const data = [
|
6
|
-
{
|
7
|
-
id: "1",
|
8
|
-
text: "Task 1",
|
9
|
-
},
|
10
|
-
{
|
11
|
-
id: "2",
|
12
|
-
text: "Task 2",
|
13
|
-
},
|
14
|
-
{
|
15
|
-
id: "3",
|
16
|
-
text: "Task 3",
|
17
|
-
},
|
18
|
-
{
|
19
|
-
id: "4",
|
20
|
-
text: "Task 4",
|
21
|
-
},
|
22
|
-
];
|
23
|
-
|
24
|
-
const DraggableDefault = (props) => {
|
25
|
-
const [initialState, setInitialState] = useState(data);
|
26
|
-
|
27
|
-
return (
|
28
|
-
<DraggableProvider initialItems={data}
|
29
|
-
onChange={(items) => setInitialState(items)}
|
30
|
-
>
|
31
|
-
<Draggable
|
32
|
-
{...props}
|
33
|
-
>
|
34
|
-
<Draggable.Container>
|
35
|
-
<SelectableList variant="checkbox">
|
36
|
-
{initialState.map(({ id, text }) => (
|
37
|
-
<Draggable.Item id={id}
|
38
|
-
key={id}
|
39
|
-
>
|
40
|
-
<SelectableList.Item label={text}
|
41
|
-
name={id}
|
42
|
-
value={id}
|
43
|
-
/>
|
44
|
-
</Draggable.Item>
|
45
|
-
))}
|
46
|
-
</SelectableList>
|
47
|
-
</Draggable.Container>
|
48
|
-
</Draggable>
|
49
|
-
</DraggableProvider>
|
50
|
-
);
|
51
|
-
};
|
52
|
-
|
53
|
-
export default DraggableDefault;
|
@@ -1,159 +0,0 @@
|
|
1
|
-
import React, { useState } from "react";
|
2
|
-
import {
|
3
|
-
Flex,
|
4
|
-
Caption,
|
5
|
-
Card,
|
6
|
-
FlexItem,
|
7
|
-
Badge,
|
8
|
-
Avatar,
|
9
|
-
Title,
|
10
|
-
Body,
|
11
|
-
Draggable,
|
12
|
-
DraggableProvider,
|
13
|
-
} from "../../";
|
14
|
-
|
15
|
-
// Initial groups to drag between
|
16
|
-
const containers = ["To Do", "In Progress", "Done"];
|
17
|
-
|
18
|
-
// Initial items to be dragged
|
19
|
-
const data = [
|
20
|
-
{
|
21
|
-
id: "1",
|
22
|
-
container: "To Do",
|
23
|
-
title: "Task 1",
|
24
|
-
description: "Bug fixes",
|
25
|
-
assignee_name: "Terry Miles",
|
26
|
-
assignee_img: "https://randomuser.me/api/portraits/men/44.jpg",
|
27
|
-
},
|
28
|
-
{
|
29
|
-
id: "2",
|
30
|
-
container: "To Do",
|
31
|
-
title: "Task 2",
|
32
|
-
description: "Documentation",
|
33
|
-
assignee_name: "Sophia Miles",
|
34
|
-
assignee_img: "https://randomuser.me/api/portraits/women/8.jpg",
|
35
|
-
},
|
36
|
-
{
|
37
|
-
id: "3",
|
38
|
-
container: "In Progress",
|
39
|
-
title: "Task 3",
|
40
|
-
description: "Add a variant",
|
41
|
-
assignee_name: "Alice Jones",
|
42
|
-
assignee_img: "https://randomuser.me/api/portraits/women/10.jpg",
|
43
|
-
},
|
44
|
-
{
|
45
|
-
id: "4",
|
46
|
-
container: "To Do",
|
47
|
-
title: "Task 4",
|
48
|
-
description: "Add jest tests",
|
49
|
-
assignee_name: "Mike James",
|
50
|
-
assignee_img: "https://randomuser.me/api/portraits/men/8.jpg",
|
51
|
-
},
|
52
|
-
{
|
53
|
-
id: "5",
|
54
|
-
container: "Done",
|
55
|
-
title: "Task 5",
|
56
|
-
description: "Alpha testing",
|
57
|
-
assignee_name: "James Guy",
|
58
|
-
assignee_img: "https://randomuser.me/api/portraits/men/18.jpg",
|
59
|
-
},
|
60
|
-
{
|
61
|
-
id: "6",
|
62
|
-
container: "In Progress",
|
63
|
-
title: "Task 6",
|
64
|
-
description: "Release",
|
65
|
-
assignee_name: "Sally Jones",
|
66
|
-
assignee_img: "https://randomuser.me/api/portraits/women/28.jpg",
|
67
|
-
},
|
68
|
-
];
|
69
|
-
|
70
|
-
const DraggableMultipleContainer = (props) => {
|
71
|
-
const [initialState, setInitialState] = useState(data);
|
72
|
-
|
73
|
-
const badgeProperties = (container) => {
|
74
|
-
switch (container) {
|
75
|
-
case "To Do":
|
76
|
-
return { text: "queue", color: "warning" };
|
77
|
-
case "In Progress":
|
78
|
-
return { text: "progress", color: "primary" };
|
79
|
-
default:
|
80
|
-
return { text: "done", color: "success" };
|
81
|
-
}
|
82
|
-
};
|
83
|
-
|
84
|
-
return (
|
85
|
-
<DraggableProvider initialItems={data}
|
86
|
-
onChange={(items) => setInitialState(items)}
|
87
|
-
>
|
88
|
-
<Draggable
|
89
|
-
display="flex"
|
90
|
-
justifyContent="center"
|
91
|
-
{...props}
|
92
|
-
>
|
93
|
-
{containers?.map((container) => (
|
94
|
-
<Draggable.Container
|
95
|
-
container={container}
|
96
|
-
key={container}
|
97
|
-
padding="sm"
|
98
|
-
>
|
99
|
-
<Caption textAlign="center">{container}</Caption>
|
100
|
-
<Flex
|
101
|
-
alignItems="stretch"
|
102
|
-
orientation="column"
|
103
|
-
>
|
104
|
-
{initialState
|
105
|
-
.filter((item) => item.container === container)
|
106
|
-
.map(
|
107
|
-
({
|
108
|
-
assignee_img,
|
109
|
-
assignee_name,
|
110
|
-
description,
|
111
|
-
id,
|
112
|
-
title,
|
113
|
-
}) => (
|
114
|
-
<Draggable.Item
|
115
|
-
container={container}
|
116
|
-
id={id}
|
117
|
-
key={id}
|
118
|
-
>
|
119
|
-
<Card
|
120
|
-
marginBottom="sm"
|
121
|
-
padding="sm"
|
122
|
-
>
|
123
|
-
<Flex justify="between">
|
124
|
-
<FlexItem>
|
125
|
-
<Flex>
|
126
|
-
<Avatar
|
127
|
-
imageUrl={assignee_img}
|
128
|
-
name={assignee_name}
|
129
|
-
size="xxs"
|
130
|
-
/>
|
131
|
-
<Title paddingLeft="xs"
|
132
|
-
size={4}
|
133
|
-
text={title}
|
134
|
-
/>
|
135
|
-
</Flex>
|
136
|
-
</FlexItem>
|
137
|
-
<Badge
|
138
|
-
marginLeft="sm"
|
139
|
-
rounded
|
140
|
-
text={badgeProperties(container).text}
|
141
|
-
variant={badgeProperties(container).color}
|
142
|
-
/>
|
143
|
-
</Flex>
|
144
|
-
<Body paddingTop="xs"
|
145
|
-
text={description}
|
146
|
-
/>
|
147
|
-
</Card>
|
148
|
-
</Draggable.Item>
|
149
|
-
)
|
150
|
-
)}
|
151
|
-
</Flex>
|
152
|
-
</Draggable.Container>
|
153
|
-
))}
|
154
|
-
</Draggable>
|
155
|
-
</DraggableProvider>
|
156
|
-
);
|
157
|
-
};
|
158
|
-
|
159
|
-
export default DraggableMultipleContainer;
|
@@ -1,121 +0,0 @@
|
|
1
|
-
import React, { useState } from "react";
|
2
|
-
import {
|
3
|
-
Flex,
|
4
|
-
Badge,
|
5
|
-
Title,
|
6
|
-
Icon,
|
7
|
-
Draggable,
|
8
|
-
DraggableProvider,
|
9
|
-
Card,
|
10
|
-
Caption,
|
11
|
-
} from "../../";
|
12
|
-
|
13
|
-
// Initial items to be dragged
|
14
|
-
const data = [
|
15
|
-
{
|
16
|
-
id: "1",
|
17
|
-
text: "Joe Black",
|
18
|
-
},
|
19
|
-
{
|
20
|
-
id: "2",
|
21
|
-
text: "Nancy White",
|
22
|
-
},
|
23
|
-
{
|
24
|
-
id: "3",
|
25
|
-
text: "Bill Green",
|
26
|
-
},
|
27
|
-
];
|
28
|
-
|
29
|
-
const DraggableWithCards = (props) => {
|
30
|
-
const [initialState, setInitialState] = useState(data);
|
31
|
-
|
32
|
-
return (
|
33
|
-
<DraggableProvider
|
34
|
-
initialItems={data}
|
35
|
-
onChange={(items) => setInitialState(items)}
|
36
|
-
>
|
37
|
-
<Draggable {...props}>
|
38
|
-
<Draggable.Container>
|
39
|
-
{initialState.map(({ id, text }) => (
|
40
|
-
<Draggable.Item id={id}
|
41
|
-
key={id}
|
42
|
-
>
|
43
|
-
<Card
|
44
|
-
highlight={{ position: "side", color: "primary" }}
|
45
|
-
marginBottom="xs"
|
46
|
-
>
|
47
|
-
<Flex alignItems="stretch"
|
48
|
-
flexDirection="column"
|
49
|
-
>
|
50
|
-
<Flex gap="xs">
|
51
|
-
<Title size={4}
|
52
|
-
text={text}
|
53
|
-
/>
|
54
|
-
<Badge
|
55
|
-
text="35-12345"
|
56
|
-
variant="primary"
|
57
|
-
/>
|
58
|
-
</Flex>
|
59
|
-
|
60
|
-
<Flex
|
61
|
-
gap="sm"
|
62
|
-
spacing="between"
|
63
|
-
>
|
64
|
-
<Caption
|
65
|
-
size="xs"
|
66
|
-
text="8:00A"
|
67
|
-
/>
|
68
|
-
<Flex gap="xxs">
|
69
|
-
<Caption
|
70
|
-
size="xs"
|
71
|
-
text="Township Name"
|
72
|
-
/>
|
73
|
-
<Caption size="xs"
|
74
|
-
text="•"
|
75
|
-
/>
|
76
|
-
<Caption size="xs"
|
77
|
-
text="90210"
|
78
|
-
/>
|
79
|
-
</Flex>
|
80
|
-
</Flex>
|
81
|
-
|
82
|
-
<Flex gap="xxs"
|
83
|
-
spacing="between"
|
84
|
-
>
|
85
|
-
<Flex gap="xxs">
|
86
|
-
<Caption color="error"
|
87
|
-
size="xs"
|
88
|
-
>
|
89
|
-
<Icon icon="house-circle-exclamation" />
|
90
|
-
</Caption>
|
91
|
-
<Caption color="success"
|
92
|
-
size="xs">
|
93
|
-
<Icon icon="file-circle-check" />
|
94
|
-
</Caption>
|
95
|
-
</Flex>
|
96
|
-
<Flex>
|
97
|
-
<Badge rounded
|
98
|
-
text="Schedule QA"
|
99
|
-
variant="warning"
|
100
|
-
/>
|
101
|
-
<Badge rounded
|
102
|
-
text="Flex"
|
103
|
-
variant="primary"
|
104
|
-
/>
|
105
|
-
<Badge rounded
|
106
|
-
text="R99"
|
107
|
-
variant="primary"
|
108
|
-
/>
|
109
|
-
</Flex>
|
110
|
-
</Flex>
|
111
|
-
</Flex>
|
112
|
-
</Card>
|
113
|
-
</Draggable.Item>
|
114
|
-
))}
|
115
|
-
</Draggable.Container>
|
116
|
-
</Draggable>
|
117
|
-
</DraggableProvider>
|
118
|
-
);
|
119
|
-
};
|
120
|
-
|
121
|
-
export default DraggableWithCards;
|
@@ -1,33 +0,0 @@
|
|
1
|
-
<%= pb_rails("table") do %> <%= pb_rails("table/table_head") do %>
|
2
|
-
<%= pb_rails("table/table_row") do %>
|
3
|
-
<%= pb_rails("table/table_header", props: { text: "Column 1"}) %>
|
4
|
-
<%= pb_rails("table/table_header", props: { text: "Column 2"}) %>
|
5
|
-
<%= pb_rails("table/table_header", props: { text: "Column 3"}) %>
|
6
|
-
<%= pb_rails("table/table_header", props: { text: "Rating", text_align: "center" }) %>
|
7
|
-
<%= pb_rails("table/table_header", props: { text: "Money", text_align: "right" }) %>
|
8
|
-
<% end %>
|
9
|
-
<% end %>
|
10
|
-
<%= pb_rails("table/table_body") do %>
|
11
|
-
<%= pb_rails("table/table_row") do %>
|
12
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
13
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
14
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
15
|
-
<%= pb_rails("table/table_cell", props: { text: "3", text_align: "center" }) %>
|
16
|
-
<%= pb_rails("table/table_cell", props: { text: "$57.32", text_align: "right" }) %>
|
17
|
-
<% end %>
|
18
|
-
<%= pb_rails("table/table_row") do %>
|
19
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
20
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
21
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
22
|
-
<%= pb_rails("table/table_cell", props: { text: "2", text_align: "center" }) %>
|
23
|
-
<%= pb_rails("table/table_cell", props: { text: "$5,657.08", text_align: "right" }) %>
|
24
|
-
<% end %>
|
25
|
-
<%= pb_rails("table/table_row") 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: "4", text_align: "center" }) %>
|
30
|
-
<%= pb_rails("table/table_cell", props: { text: "$358.77", text_align: "right" }) %>
|
31
|
-
<% end %>
|
32
|
-
<% end %>
|
33
|
-
<% end %>
|
@@ -1,2 +0,0 @@
|
|
1
|
-
Pass our `text_align` global prop to any `table/table_cell` subcomponent to change the text alignment of individual cells, or apply this prop persistently to align entire columns.
|
2
|
-
In the table above the "Rating" column contents is centered and the "Money" column contents is right aligned.
|
@@ -1,34 +0,0 @@
|
|
1
|
-
<%= pb_rails("table") do %>
|
2
|
-
<%= pb_rails("table/table_head") do %>
|
3
|
-
<%= pb_rails("table/table_row") do %>
|
4
|
-
<%= pb_rails("table/table_header", props: { text: "Column 1"}) %>
|
5
|
-
<%= pb_rails("table/table_header", props: { text: "Column 2"}) %>
|
6
|
-
<%= pb_rails("table/table_header", props: { text: "Column 3"}) %>
|
7
|
-
<%= pb_rails("table/table_header", props: { text: "Column 4"}) %>
|
8
|
-
<%= pb_rails("table/table_header", props: { text: "Column 5"}) %>
|
9
|
-
<% end %>
|
10
|
-
<% end %>
|
11
|
-
<%= pb_rails("table/table_body") do %>
|
12
|
-
<%= pb_rails("table/table_row") do %>
|
13
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
14
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
15
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
16
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
17
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
18
|
-
<% end %>
|
19
|
-
<%= pb_rails("table/table_row", props: { text_align: "center" }) 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
|
-
<% end %>
|
26
|
-
<%= pb_rails("table/table_row", props: { text_align: "right" }) do %>
|
27
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
28
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
29
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
30
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
31
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
32
|
-
<% end %>
|
33
|
-
<% end %>
|
34
|
-
<% end %>
|
@@ -1,54 +0,0 @@
|
|
1
|
-
<%= pb_rails("table") do %>
|
2
|
-
<%= pb_rails("table/table_head") do %>
|
3
|
-
<%= pb_rails("table/table_row") do %>
|
4
|
-
<%= pb_rails("table/table_header", props: { text: " " }) %>
|
5
|
-
<%= pb_rails("table/table_header", props: { text: "Price" }) %>
|
6
|
-
<% end %>
|
7
|
-
<% end %>
|
8
|
-
<%= pb_rails("table/table_body") do %>
|
9
|
-
<%= pb_rails("table/table_row") do %>
|
10
|
-
<%= pb_rails("table/table_cell", props: { text: "Total", vertical_align: "bottom" }) %>
|
11
|
-
<%= pb_rails("table/table_cell") do %>
|
12
|
-
$12<br/>
|
13
|
-
$46<br/>
|
14
|
-
$25<br/>
|
15
|
-
-------<br/>
|
16
|
-
$83
|
17
|
-
<% end %>
|
18
|
-
<% end %>
|
19
|
-
<% end %>
|
20
|
-
<% end %>
|
21
|
-
<br/>
|
22
|
-
<%= pb_rails("table", props: { size: "sm" }) do %>
|
23
|
-
<%= pb_rails("table/table_head") do %>
|
24
|
-
<%= pb_rails("table/table_row") do %>
|
25
|
-
<%= pb_rails("table/table_header", props: { text: "Espresso Drinks" }) %>
|
26
|
-
<%= pb_rails("table/table_header", props: { text: "Ingredients" }) %>
|
27
|
-
<% end %>
|
28
|
-
<% end %>
|
29
|
-
<%= pb_rails("table/table_body") do %>
|
30
|
-
<%= pb_rails("table/table_row") do %>
|
31
|
-
<%= pb_rails("table/table_cell", props: { text: "Cappuccino", vertical_align: "top" }) %>
|
32
|
-
<%= pb_rails("table/table_cell") do %>
|
33
|
-
Espresso<br/>
|
34
|
-
Steamed Milk<br/>
|
35
|
-
Milk Foam
|
36
|
-
<% end %>
|
37
|
-
<% end %>
|
38
|
-
<%= pb_rails("table/table_row") do %>
|
39
|
-
<%= pb_rails("table/table_cell", props: { text: "Macchiato", vertical_align: "top" }) %>
|
40
|
-
<%= pb_rails("table/table_cell") do %>
|
41
|
-
Espresso<br/>
|
42
|
-
Steamed Milk
|
43
|
-
<% end %>
|
44
|
-
<% end %>
|
45
|
-
<%= pb_rails("table/table_row") do %>
|
46
|
-
<%= pb_rails("table/table_cell", props: { text: "Mocha", vertical_align: "top" }) %>
|
47
|
-
<%= pb_rails("table/table_cell") do %>
|
48
|
-
Espresso<br/>
|
49
|
-
Hot Chocolate<br/>
|
50
|
-
Steamed Milk
|
51
|
-
<% end %>
|
52
|
-
<% end %>
|
53
|
-
<% end %>
|
54
|
-
<% end %>
|
@@ -1,2 +0,0 @@
|
|
1
|
-
Pass our `vertical_align` global prop to any `table/table_cell` subcomponent to change the text alignment of individual cells, or apply this prop persistently to align entire columns.
|
2
|
-
The first table shifts "Total" down, whereas the second table shifts the "Espresso Drinks" column contents up.
|
@@ -1 +0,0 @@
|
|
1
|
-
Pass our `verticalAlign` global prop to any `table.row` subcomponent to change the vertical alignment of all cells within that row.
|
@@ -1,53 +0,0 @@
|
|
1
|
-
<%= pb_rails("table") do %>
|
2
|
-
<%= pb_rails("table/table_head") do %>
|
3
|
-
<%= pb_rails("table/table_row") do %>
|
4
|
-
<%= pb_rails("table/table_header", props: { text: "Column 1" }) %>
|
5
|
-
<%= pb_rails("table/table_header", props: { text: "Column 2" }) %>
|
6
|
-
<%= pb_rails("table/table_header", props: { text: "Column 3" }) %>
|
7
|
-
<%= pb_rails("table/table_header", props: { text: "Column 4" }) %>
|
8
|
-
<%= pb_rails("table/table_header", props: { text: "Column 5" }) %>
|
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 %>
|
14
|
-
Value 1a
|
15
|
-
<br />
|
16
|
-
Value 1a
|
17
|
-
<br />
|
18
|
-
Value 1a
|
19
|
-
<% end %>
|
20
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 2a" }) %>
|
21
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 3a" }) %>
|
22
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 4a" }) %>
|
23
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 5a" }) %>
|
24
|
-
<% end %>
|
25
|
-
<%= pb_rails("table/table_row", props: { vertical_align: "middle" }) do %>
|
26
|
-
<%= pb_rails("table/table_cell") do %>
|
27
|
-
Value 1b
|
28
|
-
<br />
|
29
|
-
Value 1b
|
30
|
-
<br />
|
31
|
-
Value 1b
|
32
|
-
<% end %>
|
33
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 2b" }) %>
|
34
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 3b" }) %>
|
35
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 4b" }) %>
|
36
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 5b" }) %>
|
37
|
-
<% end %>
|
38
|
-
<%= pb_rails("table/table_row", props: { vertical_align: "bottom" }) do %>
|
39
|
-
<%= pb_rails("table/table_cell") do %>
|
40
|
-
Value 1c
|
41
|
-
<br />
|
42
|
-
Value 1c
|
43
|
-
<br />
|
44
|
-
Value 1c
|
45
|
-
<% end %>
|
46
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 2c" }) %>
|
47
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 3c" }) %>
|
48
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 4c" }) %>
|
49
|
-
<%= pb_rails("table/table_cell", props: { text: "Value 5c" }) %>
|
50
|
-
<% end %>
|
51
|
-
<% end %>
|
52
|
-
<% end %>
|
53
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
Pass our `vertical_align` global prop to any `table/table_row` subcomponent to change the vertical alignment of all cells within that row.
|