playbook_ui 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_date_picker/_date_picker.tsx +3 -1
- 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_draggable/subcomponents/DraggableContainer.tsx +4 -7
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +3 -6
- 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_icon_button/icon_button.html.erb +1 -1
- data/app/pb_kits/playbook/pb_icon_button/icon_button.rb +3 -0
- 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/app/pb_kits/playbook/pb_table/subcomponents/_table_body.tsx +2 -29
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +3 -31
- data/dist/chunks/{_typeahead-TUUtEUg8.js → _typeahead-DQTwAd_2.js} +4 -4
- data/dist/chunks/_weekday_stacked-ei-exO-N.js +45 -0
- data/dist/chunks/{lib-DjpLC8uO.js → lib-WQEeEj3t.js} +1 -1
- data/dist/chunks/{pb_form_validation-S56UaHZl.js → pb_form_validation-Cq64l4zn.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +15 -10
- 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
- data/dist/chunks/_weekday_stacked--GSH9pBR.js +0 -45
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
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: actionpack
|
@@ -73,14 +73,14 @@ dependencies:
|
|
73
73
|
requirements:
|
74
74
|
- - '='
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
76
|
+
version: 3.21.0
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - '='
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
83
|
+
version: 3.21.0
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: webpacker-react
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1187,8 +1187,6 @@ files:
|
|
1187
1187
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md
|
1188
1188
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb
|
1189
1189
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md
|
1190
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx
|
1191
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md
|
1192
1190
|
- app/pb_kits/playbook/pb_draggable/docs/example.yml
|
1193
1191
|
- app/pb_kits/playbook/pb_draggable/docs/index.js
|
1194
1192
|
- app/pb_kits/playbook/pb_draggable/draggable.html.erb
|
@@ -1631,6 +1629,7 @@ files:
|
|
1631
1629
|
- app/pb_kits/playbook/pb_icon/icon.test.js
|
1632
1630
|
- app/pb_kits/playbook/pb_icon_button/_icon_button.scss
|
1633
1631
|
- app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb
|
1632
|
+
- app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.html.erb
|
1634
1633
|
- app/pb_kits/playbook/pb_icon_button/docs/example.yml
|
1635
1634
|
- app/pb_kits/playbook/pb_icon_button/icon_button.html.erb
|
1636
1635
|
- app/pb_kits/playbook/pb_icon_button/icon_button.rb
|
@@ -2745,6 +2744,9 @@ files:
|
|
2745
2744
|
- app/pb_kits/playbook/pb_table/docs/_table_vertical_border.jsx
|
2746
2745
|
- app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb
|
2747
2746
|
- app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx
|
2747
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.html.erb
|
2748
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.jsx
|
2749
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.md
|
2748
2750
|
- app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.html.erb
|
2749
2751
|
- app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx
|
2750
2752
|
- app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_rails.md
|
@@ -2763,6 +2765,9 @@ files:
|
|
2763
2765
|
- app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md
|
2764
2766
|
- app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.html.erb
|
2765
2767
|
- app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md
|
2768
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb
|
2769
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx
|
2770
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.md
|
2766
2771
|
- app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.jsx
|
2767
2772
|
- app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.md
|
2768
2773
|
- app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents_as_divs.html.erb
|
@@ -3334,11 +3339,11 @@ files:
|
|
3334
3339
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3335
3340
|
- app/pb_kits/playbook/utilities/text.ts
|
3336
3341
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3337
|
-
- dist/chunks/_typeahead-
|
3338
|
-
- dist/chunks/_weekday_stacked
|
3342
|
+
- dist/chunks/_typeahead-DQTwAd_2.js
|
3343
|
+
- dist/chunks/_weekday_stacked-ei-exO-N.js
|
3339
3344
|
- dist/chunks/lazysizes-B7xYodB-.js
|
3340
|
-
- dist/chunks/lib-
|
3341
|
-
- dist/chunks/pb_form_validation-
|
3345
|
+
- dist/chunks/lib-WQEeEj3t.js
|
3346
|
+
- dist/chunks/pb_form_validation-Cq64l4zn.js
|
3342
3347
|
- dist/chunks/vendor.js
|
3343
3348
|
- dist/menu.yml
|
3344
3349
|
- dist/playbook-doc.js
|
@@ -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.
|