playbook_ui_docs 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.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +105 -102
  3. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +3 -3
  4. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +48 -50
  5. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +1 -1
  6. data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table.jsx → _draggable_with_table_react.jsx} +1 -1
  7. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +1 -3
  8. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +6 -9
  9. data/app/pb_kits/playbook/pb_draggable/docs/index.js +1 -4
  10. data/dist/playbook-doc.js +1 -1
  11. metadata +14 -16
  12. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx +0 -115
  13. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md +0 -5
  14. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default_react.md → _draggable_default.md} +0 -0
  15. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default.html.erb → _draggable_default_rails.html.erb} +0 -0
  16. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers_react.md → _draggable_multiple_containers.md} +0 -0
  17. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers.html.erb → _draggable_multiple_containers_rails.html.erb} +0 -0
  18. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards_react.md → _draggable_with_cards.md} +0 -0
  19. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards.html.erb → _draggable_with_cards_rails.html.erb} +0 -0
  20. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list_react.md → _draggable_with_list.md} +0 -0
  21. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list.html.erb → _draggable_with_list_rails.html.erb} +0 -0
  22. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list_react.md → _draggable_with_selectable_list.md} +0 -0
  23. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list.html.erb → _draggable_with_selectable_list_rails.html.erb} +0 -0
  24. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table_rails.md → _draggable_with_table.md} +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: 14.17.0.pre.alpha.PBNTR935draggablelinedesign7118
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-04 00:00:00.000000000 Z
12
+ date: 2025-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -706,35 +706,33 @@ files:
706
706
  - app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_default.jsx
707
707
  - app/pb_kits/playbook/pb_distribution_bar/docs/example.yml
708
708
  - app/pb_kits/playbook/pb_distribution_bar/docs/index.js
709
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_default.html.erb
710
709
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx
710
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md
711
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.html.erb
711
712
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_default_rails.md
712
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_default_react.md
713
713
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx
714
714
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md
715
715
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx
716
716
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md
717
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx
718
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md
719
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.html.erb
720
717
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx
718
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.md
719
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.html.erb
721
720
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md
722
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_react.md
723
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.html.erb
724
721
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx
722
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md
723
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb
725
724
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md
726
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_react.md
727
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.html.erb
728
725
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx
726
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md
727
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb
729
728
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md
730
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_react.md
731
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.html.erb
732
729
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx
730
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md
731
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb
733
732
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md
734
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_react.md
735
733
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb
736
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.jsx
737
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_rails.md
734
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md
735
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx
738
736
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md
739
737
  - app/pb_kits/playbook/pb_draggable/docs/example.yml
740
738
  - app/pb_kits/playbook/pb_draggable/docs/index.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.