playbook_ui 14.17.0.pre.alpha.PBNTR935draggablelinedesign7118 → 14.17.0.pre.alpha.alphaforaudiences7167
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/_draggable.scss +20 -43
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +105 -102
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +3 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +48 -50
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table.jsx → _draggable_with_table_react.jsx} +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +1 -3
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +6 -9
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +1 -4
- data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +0 -68
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +3 -4
- data/dist/chunks/{_typeahead-HqfDnjRe.js → _typeahead-7W5Ha5Td.js} +1 -1
- data/dist/chunks/{_weekday_stacked-DVQITtQ9.js → _weekday_stacked-DSKatW3m.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 +16 -18
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx +0 -115
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md +0 -5
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default_react.md → _draggable_default.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default.html.erb → _draggable_default_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers_react.md → _draggable_multiple_containers.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers.html.erb → _draggable_multiple_containers_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards_react.md → _draggable_with_cards.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards.html.erb → _draggable_with_cards_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list_react.md → _draggable_with_list.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list.html.erb → _draggable_with_list_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list_react.md → _draggable_with_selectable_list.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list.html.erb → _draggable_with_selectable_list_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table_rails.md → _draggable_with_table.md} +0 -0
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.17.0.pre.alpha.
|
4
|
+
version: 14.17.0.pre.alpha.alphaforaudiences7167
|
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-04-
|
12
|
+
date: 2025-04-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -1184,35 +1184,33 @@ files:
|
|
1184
1184
|
- app/pb_kits/playbook/pb_draggable/_draggable.tsx
|
1185
1185
|
- app/pb_kits/playbook/pb_draggable/context/index.tsx
|
1186
1186
|
- app/pb_kits/playbook/pb_draggable/context/types.ts
|
1187
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_default.html.erb
|
1188
1187
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx
|
1188
|
+
- app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md
|
1189
|
+
- app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.html.erb
|
1189
1190
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.md
|
1190
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_default_react.md
|
1191
1191
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx
|
1192
1192
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md
|
1193
1193
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx
|
1194
1194
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md
|
1195
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx
|
1196
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md
|
1197
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.html.erb
|
1198
1195
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx
|
1196
|
+
- app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.md
|
1197
|
+
- app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.html.erb
|
1199
1198
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md
|
1200
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_react.md
|
1201
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.html.erb
|
1202
1199
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx
|
1200
|
+
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md
|
1201
|
+
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb
|
1203
1202
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md
|
1204
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_react.md
|
1205
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.html.erb
|
1206
1203
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx
|
1204
|
+
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md
|
1205
|
+
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb
|
1207
1206
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md
|
1208
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_react.md
|
1209
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.html.erb
|
1210
1207
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx
|
1208
|
+
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md
|
1209
|
+
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb
|
1211
1210
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md
|
1212
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_react.md
|
1213
1211
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb
|
1214
|
-
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.
|
1215
|
-
- app/pb_kits/playbook/pb_draggable/docs/
|
1212
|
+
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md
|
1213
|
+
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx
|
1216
1214
|
- app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md
|
1217
1215
|
- app/pb_kits/playbook/pb_draggable/docs/example.yml
|
1218
1216
|
- app/pb_kits/playbook/pb_draggable/docs/index.js
|
@@ -3469,8 +3467,8 @@ files:
|
|
3469
3467
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3470
3468
|
- app/pb_kits/playbook/utilities/text.ts
|
3471
3469
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3472
|
-
- dist/chunks/_typeahead-
|
3473
|
-
- dist/chunks/_weekday_stacked-
|
3470
|
+
- dist/chunks/_typeahead-7W5Ha5Td.js
|
3471
|
+
- dist/chunks/_weekday_stacked-DSKatW3m.js
|
3474
3472
|
- dist/chunks/lazysizes-B7xYodB-.js
|
3475
3473
|
- dist/chunks/lib-BGzBzFZX.js
|
3476
3474
|
- dist/chunks/pb_form_validation-BvNy9Bd6.js
|
@@ -1,115 +0,0 @@
|
|
1
|
-
import React, { useState } from "react";
|
2
|
-
import Body from '../../pb_body/_body'
|
3
|
-
import Flex from '../../pb_flex/_flex'
|
4
|
-
import Card from '../../pb_card/_card'
|
5
|
-
import Caption from '../../pb_caption/_caption'
|
6
|
-
import Draggable from '../_draggable'
|
7
|
-
import { DraggableProvider } from '../context'
|
8
|
-
import Image from '../../pb_image/_image'
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
const dataLineVertical = [
|
13
|
-
{
|
14
|
-
id: "211",
|
15
|
-
url: "https://unsplash.it/500/400/?image=633",
|
16
|
-
},
|
17
|
-
{
|
18
|
-
id: "212",
|
19
|
-
url: "https://unsplash.it/500/400/?image=634",
|
20
|
-
},
|
21
|
-
{
|
22
|
-
id: "213",
|
23
|
-
url: "https://unsplash.it/500/400/?image=637",
|
24
|
-
},
|
25
|
-
];
|
26
|
-
|
27
|
-
const dataLineHorizontal = [
|
28
|
-
{
|
29
|
-
id: "221",
|
30
|
-
text: "Task 1",
|
31
|
-
},
|
32
|
-
{
|
33
|
-
id: "222",
|
34
|
-
text: "Task 2",
|
35
|
-
},
|
36
|
-
{
|
37
|
-
id: "223",
|
38
|
-
text: "Task 3",
|
39
|
-
},
|
40
|
-
];
|
41
|
-
|
42
|
-
const DraggableDropZones = (props) => {
|
43
|
-
const [initialLineVerticalState, setInitialLineVerticalState] = useState(dataLineVertical);
|
44
|
-
const [initialLineHorizontalState, setInitialLineHorizontalState] = useState(dataLineHorizontal);
|
45
|
-
|
46
|
-
return (
|
47
|
-
<>
|
48
|
-
<Caption marginBottom="xs"
|
49
|
-
marginTop="xl"
|
50
|
-
text="Vertical"
|
51
|
-
/>
|
52
|
-
<DraggableProvider
|
53
|
-
dropZone={{ type: "line", color: "purple" }}
|
54
|
-
initialItems={dataLineVertical}
|
55
|
-
onReorder={(items) => setInitialLineVerticalState(items)}
|
56
|
-
>
|
57
|
-
<Draggable.Container {...props}>
|
58
|
-
<Flex flexDirection="column"
|
59
|
-
height="367px"
|
60
|
-
>
|
61
|
-
{initialLineVerticalState.map(({ id, url }) => (
|
62
|
-
<Draggable.Item dragId={id}
|
63
|
-
key={id}
|
64
|
-
marginBottom="sm"
|
65
|
-
>
|
66
|
-
<Image alt={id}
|
67
|
-
size="md"
|
68
|
-
url={url}
|
69
|
-
/>
|
70
|
-
</Draggable.Item>
|
71
|
-
))}
|
72
|
-
</Flex>
|
73
|
-
</Draggable.Container>
|
74
|
-
</DraggableProvider>
|
75
|
-
<Caption marginBottom="xs"
|
76
|
-
marginTop="xl"
|
77
|
-
text="Horizontal"
|
78
|
-
/>
|
79
|
-
<Flex>
|
80
|
-
<DraggableProvider
|
81
|
-
dropZone={{ type: "line", direction: "horizontal" }}
|
82
|
-
initialItems={dataLineHorizontal}
|
83
|
-
onReorder={(items) => setInitialLineHorizontalState(items)}
|
84
|
-
>
|
85
|
-
<Draggable.Container
|
86
|
-
htmlOptions={{style:{ width: "285px"}}}
|
87
|
-
{...props}
|
88
|
-
>
|
89
|
-
<Flex alignItems="stretch"
|
90
|
-
flexDirection="row"
|
91
|
-
height="42px"
|
92
|
-
>
|
93
|
-
{initialLineHorizontalState.map(({ id, text }) => (
|
94
|
-
<Card dragId={id}
|
95
|
-
draggableItem
|
96
|
-
key={id}
|
97
|
-
marginRight="xs"
|
98
|
-
padding="xs"
|
99
|
-
{...props}
|
100
|
-
>
|
101
|
-
<Body
|
102
|
-
text={text}
|
103
|
-
{...props}
|
104
|
-
/>
|
105
|
-
</Card>
|
106
|
-
))}
|
107
|
-
</Flex>
|
108
|
-
</Draggable.Container>
|
109
|
-
</DraggableProvider>
|
110
|
-
</Flex>
|
111
|
-
</>
|
112
|
-
);
|
113
|
-
};
|
114
|
-
|
115
|
-
export default DraggableDropZones;
|
@@ -1,5 +0,0 @@
|
|
1
|
-
When using the "line" style, make sure to set the appropriate `direction` attribute within the `dropZone` prop based on the orientation of your draggable view. By default, this is set to "vertical," but it can also be adjusted to "horizontal." Note that the direction attribute only applies to the "line" style and does not affect other drop zone styles. The default `color` for "line" is "primary" and "purple" is the only alternative color option.
|
2
|
-
|
3
|
-
The length of the line is calculated based off of the width (for "vertical") or height (for "horizontal") of the parent container holding the draggable items.
|
4
|
-
|
5
|
-
Additionally, if the parent container of the `DraggableProvider`/`DraggableContainer` (or a subcontainer within) does not have a set height (for "vertical") or width (for "horizontal"), like the [Draggable Drop Zones doc example](https://playbook.powerapp.cloud/kits/draggable/react#draggable-drop-zones) does, elements on the page may jump up (for "vertical") or to the left (for "horizontal") when an item is actively being dragged. To prevent this, give a parent element a fixed height (for "vertical") or width (for "horizontal") as demonstrated in this doc example.
|
/data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default_react.md → _draggable_default.md}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|