playbook_ui_docs 14.13.0.pre.alpha.PBNTR5596029 → 14.13.0.pre.alpha.PLAY1873rails86087
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_draggable/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +1 -2
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.html.erb +27 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.html.erb +47 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.jsx +88 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +96 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx +101 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.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 +3 -1
- data/dist/playbook-doc.js +1 -1
- metadata +9 -4
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx +0 -89
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +0 -5
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: 14.13.0.pre.alpha.
|
4
|
+
version: 14.13.0.pre.alpha.PLAY1873rails86087
|
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: 2025-02-
|
12
|
+
date: 2025-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: playbook_ui
|
@@ -716,8 +716,6 @@ files:
|
|
716
716
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md
|
717
717
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb
|
718
718
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md
|
719
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx
|
720
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md
|
721
719
|
- app/pb_kits/playbook/pb_draggable/docs/example.yml
|
722
720
|
- app/pb_kits/playbook/pb_draggable/docs/index.js
|
723
721
|
- app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx
|
@@ -1034,6 +1032,7 @@ files:
|
|
1034
1032
|
- app/pb_kits/playbook/pb_icon/docs/example.yml
|
1035
1033
|
- app/pb_kits/playbook/pb_icon/docs/index.js
|
1036
1034
|
- app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb
|
1035
|
+
- app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.html.erb
|
1037
1036
|
- app/pb_kits/playbook/pb_icon_button/docs/example.yml
|
1038
1037
|
- app/pb_kits/playbook/pb_icon_circle/docs/_description.md
|
1039
1038
|
- app/pb_kits/playbook/pb_icon_circle/docs/_footer.md
|
@@ -1844,6 +1843,9 @@ files:
|
|
1844
1843
|
- app/pb_kits/playbook/pb_table/docs/_table_vertical_border.jsx
|
1845
1844
|
- app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb
|
1846
1845
|
- app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx
|
1846
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.html.erb
|
1847
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.jsx
|
1848
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.md
|
1847
1849
|
- app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.html.erb
|
1848
1850
|
- app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx
|
1849
1851
|
- app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_rails.md
|
@@ -1862,6 +1864,9 @@ files:
|
|
1862
1864
|
- app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md
|
1863
1865
|
- app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.html.erb
|
1864
1866
|
- app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md
|
1867
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb
|
1868
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx
|
1869
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.md
|
1865
1870
|
- app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.jsx
|
1866
1871
|
- app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.md
|
1867
1872
|
- app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents_as_divs.html.erb
|
@@ -1,89 +0,0 @@
|
|
1
|
-
import React, { useState } from "react";
|
2
|
-
import { Flex, Table, Body, Avatar, DraggableProvider } from "playbook-ui";
|
3
|
-
|
4
|
-
// Initial items to be dragged
|
5
|
-
const data = [
|
6
|
-
{
|
7
|
-
id: "1",
|
8
|
-
task: "Task 1",
|
9
|
-
assignee_name: "Terry Miles",
|
10
|
-
assignee_img: "https://randomuser.me/api/portraits/men/44.jpg",
|
11
|
-
},
|
12
|
-
{
|
13
|
-
id: "2",
|
14
|
-
task: "Task 2",
|
15
|
-
assignee_name: "Sophia Miles",
|
16
|
-
assignee_img: "https://randomuser.me/api/portraits/women/8.jpg",
|
17
|
-
},
|
18
|
-
{
|
19
|
-
id: "3",
|
20
|
-
task: "Task 3",
|
21
|
-
assignee_name: "Alice Jones",
|
22
|
-
assignee_img: "https://randomuser.me/api/portraits/women/10.jpg",
|
23
|
-
},
|
24
|
-
{
|
25
|
-
id: "4",
|
26
|
-
task: "Task 4",
|
27
|
-
assignee_name: "Mike James",
|
28
|
-
assignee_img: "https://randomuser.me/api/portraits/men/8.jpg",
|
29
|
-
},
|
30
|
-
{
|
31
|
-
id: "5",
|
32
|
-
task: "Task 5",
|
33
|
-
assignee_name: "James Guy",
|
34
|
-
assignee_img: "https://randomuser.me/api/portraits/men/18.jpg",
|
35
|
-
}
|
36
|
-
];
|
37
|
-
|
38
|
-
const DraggableWithTableReact = (props) => {
|
39
|
-
const [initialState, setInitialState] = useState(data);
|
40
|
-
|
41
|
-
return (
|
42
|
-
<>
|
43
|
-
<DraggableProvider initialItems={data}
|
44
|
-
onReorder={(items) => setInitialState(items)}
|
45
|
-
>
|
46
|
-
<Table
|
47
|
-
responsive="none"
|
48
|
-
size="sm"
|
49
|
-
{...props}
|
50
|
-
>
|
51
|
-
<Table.Head>
|
52
|
-
<Table.Row>
|
53
|
-
<Table.Header>{"id"}</Table.Header>
|
54
|
-
<Table.Header>{"name"}</Table.Header>
|
55
|
-
<Table.Header>{"task number"}</Table.Header>
|
56
|
-
</Table.Row>
|
57
|
-
</Table.Head>
|
58
|
-
<Table.Body draggableContainer>
|
59
|
-
{initialState.map(({ id, task, assignee_name, assignee_img }) => (
|
60
|
-
<Table.Row
|
61
|
-
dragId={id}
|
62
|
-
draggableItem
|
63
|
-
key={id}
|
64
|
-
>
|
65
|
-
<Table.Cell>{id}</Table.Cell>
|
66
|
-
<Table.Cell>
|
67
|
-
<Flex align="center">
|
68
|
-
<Avatar
|
69
|
-
imageUrl={assignee_img}
|
70
|
-
size="xs"
|
71
|
-
/>
|
72
|
-
<Body
|
73
|
-
paddingLeft="xxs"
|
74
|
-
text={assignee_name}
|
75
|
-
/>
|
76
|
-
</Flex>
|
77
|
-
</Table.Cell>
|
78
|
-
<Table.Cell>{task}</Table.Cell>
|
79
|
-
</Table.Row>
|
80
|
-
))}
|
81
|
-
</Table.Body>
|
82
|
-
</Table>
|
83
|
-
</DraggableProvider>
|
84
|
-
</>
|
85
|
-
|
86
|
-
);
|
87
|
-
};
|
88
|
-
|
89
|
-
export default DraggableWithTableReact;
|
@@ -1,5 +0,0 @@
|
|
1
|
-
The draggable kit can also be used in conjunction with the table kit to create draggable table rows. To do this:
|
2
|
-
|
3
|
-
- Wrap the Table with the `DraggableProvider` and manage state as shown.
|
4
|
-
- use the `draggableContainer` prop on the Table.Body to designate it as the Draggable Container
|
5
|
-
- use the `draggableItem` prop on the Table.Row to designate it as the Draggable Item. Make sure to also pass id to the `dragId` prop here.
|