playbook_ui_docs 13.28.0.pre.alpha.PBNTR297gradientoverlay3029 → 13.28.0.pre.alpha.PLAY888Cardkithighlightoverflowtooltiperror2937
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_subrow_headers.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/{_bar_graph_custom_rails.html.erb → _bar_graph_custom.html.erb} +3 -3
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +1 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +0 -10
- data/app/pb_kits/playbook/pb_pill/docs/_description.md +1 -1
- 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 -7
- data/dist/playbook-doc.js +10 -10
- metadata +7 -29
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +0 -40
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md +0 -3
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +0 -2
- 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_overlay/docs/_overlay_default.jsx +0 -40
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +0 -7
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.jsx +0 -36
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.md +0 -5
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +0 -2
- 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
- /data/app/pb_kits/playbook/pb_table/docs/{_table_alignment_column_rails.html.erb → _table_alignment_column.html.erb} +0 -0
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.PLAY888Cardkithighlightoverflowtooltiperror2937
|
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-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: playbook_ui
|
@@ -35,8 +35,6 @@ extra_rdoc_files: []
|
|
35
35
|
files:
|
36
36
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.html.erb
|
37
37
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md
|
38
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb
|
39
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md
|
40
38
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx
|
41
39
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.md
|
42
40
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx
|
@@ -139,10 +137,9 @@ files:
|
|
139
137
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.html.erb
|
140
138
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx
|
141
139
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.md
|
140
|
+
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.html.erb
|
142
141
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx
|
143
142
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md
|
144
|
-
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb
|
145
|
-
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md
|
146
143
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb
|
147
144
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx
|
148
145
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.html.erb
|
@@ -626,11 +623,6 @@ files:
|
|
626
623
|
- app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_default.jsx
|
627
624
|
- app/pb_kits/playbook/pb_distribution_bar/docs/example.yml
|
628
625
|
- app/pb_kits/playbook/pb_distribution_bar/docs/index.js
|
629
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx
|
630
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx
|
631
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx
|
632
|
-
- app/pb_kits/playbook/pb_draggable/docs/example.yml
|
633
|
-
- app/pb_kits/playbook/pb_draggable/docs/index.js
|
634
626
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb
|
635
627
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
|
636
628
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
|
@@ -1186,12 +1178,6 @@ files:
|
|
1186
1178
|
- app/pb_kits/playbook/pb_online_status/docs/_online_status_default.jsx
|
1187
1179
|
- app/pb_kits/playbook/pb_online_status/docs/example.yml
|
1188
1180
|
- app/pb_kits/playbook/pb_online_status/docs/index.js
|
1189
|
-
- app/pb_kits/playbook/pb_overlay/docs/_overlay_default.jsx
|
1190
|
-
- app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md
|
1191
|
-
- app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.jsx
|
1192
|
-
- app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.md
|
1193
|
-
- app/pb_kits/playbook/pb_overlay/docs/example.yml
|
1194
|
-
- app/pb_kits/playbook/pb_overlay/docs/index.js
|
1195
1181
|
- app/pb_kits/playbook/pb_pagination/docs/_pagination_default.html.erb
|
1196
1182
|
- app/pb_kits/playbook/pb_pagination/docs/_pagination_default.md
|
1197
1183
|
- app/pb_kits/playbook/pb_pagination/docs/example.yml
|
@@ -1533,22 +1519,17 @@ files:
|
|
1533
1519
|
- app/pb_kits/playbook/pb_table/docs/_table_action_middle.html.erb
|
1534
1520
|
- app/pb_kits/playbook/pb_table/docs/_table_action_middle.jsx
|
1535
1521
|
- app/pb_kits/playbook/pb_table/docs/_table_action_middle.md
|
1522
|
+
- app/pb_kits/playbook/pb_table/docs/_table_alignment_column.html.erb
|
1536
1523
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_column.jsx
|
1537
1524
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_column.md
|
1538
|
-
- app/pb_kits/playbook/pb_table/docs/
|
1539
|
-
- app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.md
|
1525
|
+
- app/pb_kits/playbook/pb_table/docs/_table_alignment_row.html.erb
|
1540
1526
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_row.jsx
|
1541
1527
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_row.md
|
1542
|
-
- app/pb_kits/playbook/pb_table/docs/
|
1543
|
-
- app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.md
|
1528
|
+
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.html.erb
|
1544
1529
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.jsx
|
1545
1530
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.md
|
1546
|
-
- app/pb_kits/playbook/pb_table/docs/
|
1547
|
-
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.md
|
1531
|
+
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.html.erb
|
1548
1532
|
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.jsx
|
1549
|
-
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.md
|
1550
|
-
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.html.erb
|
1551
|
-
- app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.md
|
1552
1533
|
- app/pb_kits/playbook/pb_table/docs/_table_container.html.erb
|
1553
1534
|
- app/pb_kits/playbook/pb_table/docs/_table_container.jsx
|
1554
1535
|
- app/pb_kits/playbook/pb_table/docs/_table_data_table.html.erb
|
@@ -1574,9 +1555,6 @@ files:
|
|
1574
1555
|
- app/pb_kits/playbook/pb_table/docs/_table_one_action.html.erb
|
1575
1556
|
- app/pb_kits/playbook/pb_table/docs/_table_one_action.jsx
|
1576
1557
|
- app/pb_kits/playbook/pb_table/docs/_table_one_action.md
|
1577
|
-
- app/pb_kits/playbook/pb_table/docs/_table_outer_padding.html.erb
|
1578
|
-
- app/pb_kits/playbook/pb_table/docs/_table_outer_padding.jsx
|
1579
|
-
- app/pb_kits/playbook/pb_table/docs/_table_outer_padding.md
|
1580
1558
|
- app/pb_kits/playbook/pb_table/docs/_table_responsive_table.html.erb
|
1581
1559
|
- app/pb_kits/playbook/pb_table/docs/_table_responsive_table.jsx
|
1582
1560
|
- app/pb_kits/playbook/pb_table/docs/_table_side_highlight.html.erb
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
column_definitions = [
|
3
|
-
{
|
4
|
-
accessor: "year",
|
5
|
-
label: "Year",
|
6
|
-
cellAccessors: ["quarter", "month", "day"],
|
7
|
-
},
|
8
|
-
{
|
9
|
-
accessor: "newEnrollments",
|
10
|
-
label: "New Enrollments",
|
11
|
-
},
|
12
|
-
{
|
13
|
-
accessor: "scheduledMeetings",
|
14
|
-
label: "Scheduled Meetings",
|
15
|
-
},
|
16
|
-
{
|
17
|
-
accessor: "attendanceRate",
|
18
|
-
label: "Attendance Rate",
|
19
|
-
},
|
20
|
-
{
|
21
|
-
accessor: "completedClasses",
|
22
|
-
label: "Completed Classes",
|
23
|
-
},
|
24
|
-
{
|
25
|
-
accessor: "classCompletionRate",
|
26
|
-
label: "Class Completion Rate",
|
27
|
-
},
|
28
|
-
{
|
29
|
-
accessor: "graduatedStudents",
|
30
|
-
label: "Graduated Students",
|
31
|
-
}
|
32
|
-
]
|
33
|
-
|
34
|
-
subrow_headers = ["Quarter", "Month", "Day"]
|
35
|
-
%>
|
36
|
-
|
37
|
-
<%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions }) do %>
|
38
|
-
<%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
|
39
|
-
<%= pb_rails("advanced_table/table_body", props: { id: "subrow_headers", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
|
40
|
-
<% end %>
|
@@ -1,3 +0,0 @@
|
|
1
|
-
`subrow_headers` is an optional prop that if present will add header rows at each level of the nested data. The prop takes an array of strings, each string being the text for each header row. The array of strings must be in the order in which they need to be rendered in the UI according to depth.
|
2
|
-
|
3
|
-
`enable_toggle_expansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enable_toggle_expansion` is a string that can be "all", "header" or "none". If set to "all", the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to "header" button will only appear in header and NOT in subRow headers. This is set to "header" by default.
|
@@ -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,40 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import {
|
3
|
-
Overlay,
|
4
|
-
Table,
|
5
|
-
} from '../..'
|
6
|
-
|
7
|
-
const TableExample = () => {
|
8
|
-
return (
|
9
|
-
<Table size="sm">
|
10
|
-
<thead>
|
11
|
-
<tr>
|
12
|
-
<th>{'Column 1'}</th>
|
13
|
-
<th>{'Column 2'}</th>
|
14
|
-
<th>{'Column 3'}</th>
|
15
|
-
<th>{'Column 4'}</th>
|
16
|
-
<th>{'Column 5'}</th>
|
17
|
-
</tr>
|
18
|
-
</thead>
|
19
|
-
<tbody>
|
20
|
-
{Array.from({ length: 7 }, (_, index) => (
|
21
|
-
<tr key={index}>
|
22
|
-
{Array.from({ length: 5 }, (_, columnIndex) => (
|
23
|
-
<td key={columnIndex}>{`Value ${columnIndex + 1}`}</td>
|
24
|
-
))}
|
25
|
-
</tr>
|
26
|
-
))}
|
27
|
-
</tbody>
|
28
|
-
</Table>
|
29
|
-
)
|
30
|
-
}
|
31
|
-
|
32
|
-
const OverlayDefault = () => (
|
33
|
-
<>
|
34
|
-
<Overlay>
|
35
|
-
<TableExample />
|
36
|
-
</Overlay>
|
37
|
-
</>
|
38
|
-
)
|
39
|
-
|
40
|
-
export default OverlayDefault
|
@@ -1,7 +0,0 @@
|
|
1
|
-
Overlays require a `color`, which sets the "start" (opaque) color of a gradient mask. Because this overlay is intended to reveal underlying content, the "end" color is fixed to transparent.
|
2
|
-
|
3
|
-
The optional `layout` prop accepts a `position` and a `size` as a key:value pair object.
|
4
|
-
|
5
|
-
The `position` prop sets the side where the `color` overlay starts. The direction of the overlay is always toward the opposite side of the position. For example, the default position of `bottom` starts the overlay on the bottom edge of your container and extends it toward the opposite side: the top.
|
6
|
-
|
7
|
-
The `size` prop accepts a percentage value as a string and literally translates to how much of the container is covered by the overlay. By default, `size` is set to `100%` so that your overlay covers the entire container with a smooth fade from `color` at its starting edge, fading to transparent and ending at the containers opposite edge.
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import {
|
3
|
-
Overlay,
|
4
|
-
Card,
|
5
|
-
Flex,
|
6
|
-
FlexItem,
|
7
|
-
} from '../..'
|
8
|
-
|
9
|
-
const InlineCardsExample = () => {
|
10
|
-
return (
|
11
|
-
<Flex
|
12
|
-
columnGap="lg"
|
13
|
-
orientation="row"
|
14
|
-
overflowX="auto"
|
15
|
-
>
|
16
|
-
{Array.from({ length: 15 }, (_, index) => (
|
17
|
-
<FlexItem key={index}>
|
18
|
-
<Card>{"Card Content"}</Card>
|
19
|
-
</FlexItem>
|
20
|
-
))}
|
21
|
-
</Flex>
|
22
|
-
)
|
23
|
-
}
|
24
|
-
|
25
|
-
const OverlayMultiDirectional = () => (
|
26
|
-
<>
|
27
|
-
<Overlay
|
28
|
-
color="white"
|
29
|
-
layout={{"left-right": "10%"}}
|
30
|
-
>
|
31
|
-
<InlineCardsExample />
|
32
|
-
</Overlay>
|
33
|
-
</>
|
34
|
-
)
|
35
|
-
|
36
|
-
export default OverlayMultiDirectional
|
@@ -1,5 +0,0 @@
|
|
1
|
-
Optionally, you can pass multi-directional options (`left-right` or `top-bottom`) to the `position` prop, which create multiple overlays.
|
2
|
-
|
3
|
-
Your `color` is still applied as the starting edge to both overlays, and each mask will fade to transparent moving toward its opposite edge, ending at the `size` percentage you set.
|
4
|
-
|
5
|
-
NOTE: Multi-directional overlays share the available container space, so passing a size greater than "50%" to a multi-directional overlay will cause your masks to overlap at the midline of your container. As a best practice, we do not recommend exceeding a size of 25% when using multi-directional overlays.
|
@@ -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 %>
|