playbook_ui_docs 16.9.0.pre.alpha.PLAY3011datepickertimepickerportalling17076 → 16.9.0.pre.alpha.PLAY3011datepickertimepickerportalling17110
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/_playground.json +260 -19
- data/app/pb_kits/playbook/pb_draggable/docs/_playground.overrides.json +258 -13
- data/app/pb_kits/playbook/pb_dropdown/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/_playground.json +2 -1
- data/app/pb_kits/playbook/pb_filter/docs/_playground.json +301 -5
- data/app/pb_kits/playbook/pb_filter/docs/_playground.overrides.json +305 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_playground.json +210 -14
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_playground.overrides.json +231 -0
- data/app/pb_kits/playbook/pb_flex/docs/_playground.json +297 -38
- data/app/pb_kits/playbook/pb_flex/docs/_playground.overrides.json +300 -40
- data/app/pb_kits/playbook/pb_form/docs/_playground.json +1 -13
- data/app/pb_kits/playbook/pb_form_group/docs/_playground.json +1 -23
- data/app/pb_kits/playbook/pb_form_pill/docs/_playground.json +155 -14
- data/app/pb_kits/playbook/pb_form_pill/docs/_playground.overrides.json +147 -0
- data/app/pb_kits/playbook/pb_hashtag/docs/_playground.json +72 -11
- data/app/pb_kits/playbook/pb_hashtag/docs/_playground.overrides.json +75 -0
- data/app/pb_kits/playbook/pb_highlight/docs/_playground.json +75 -4
- data/app/pb_kits/playbook/pb_highlight/docs/_playground.overrides.json +75 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_playground.json +138 -12
- data/app/pb_kits/playbook/pb_home_address_street/docs/_playground.overrides.json +162 -0
- data/app/pb_kits/playbook/pb_icon/docs/_playground.json +79 -40
- data/app/pb_kits/playbook/pb_icon/docs/_playground.overrides.json +96 -27
- data/app/pb_kits/playbook/pb_icon_button/docs/_playground.json +111 -9
- data/app/pb_kits/playbook/pb_icon_button/docs/_playground.overrides.json +131 -0
- data/app/pb_kits/playbook/pb_icon_circle/docs/_playground.json +92 -7
- data/app/pb_kits/playbook/pb_icon_circle/docs/_playground.overrides.json +108 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_playground.json +32 -17
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_playground.overrides.json +81 -8
- data/app/pb_kits/playbook/pb_icon_value/docs/_playground.json +28 -18
- data/app/pb_kits/playbook/pb_icon_value/docs/_playground.overrides.json +58 -9
- data/app/pb_kits/playbook/pb_image/docs/_playground.json +124 -47
- data/app/pb_kits/playbook/pb_image/docs/_playground.overrides.json +122 -47
- data/app/pb_kits/playbook/pb_label_pill/docs/_playground.json +68 -6
- data/app/pb_kits/playbook/pb_label_pill/docs/_playground.overrides.json +85 -0
- data/app/pb_kits/playbook/pb_label_value/docs/_playground.json +59 -36
- data/app/pb_kits/playbook/pb_label_value/docs/_playground.overrides.json +101 -30
- data/app/pb_kits/playbook/pb_layout/docs/_playground.json +1 -40
- data/app/pb_kits/playbook/pb_legend/docs/_playground.json +60 -7
- data/app/pb_kits/playbook/pb_legend/docs/_playground.overrides.json +77 -0
- data/app/pb_kits/playbook/pb_list/docs/_playground.json +165 -17
- data/app/pb_kits/playbook/pb_list/docs/_playground.overrides.json +191 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/_playground.json +28 -1
- data/app/pb_kits/playbook/pb_loading_inline/docs/_playground.overrides.json +27 -1
- data/app/pb_kits/playbook/pb_map/docs/_playground.json +164 -7
- data/app/pb_kits/playbook/pb_map/docs/_playground.overrides.json +180 -0
- data/app/pb_kits/playbook/pb_message/docs/_playground.json +114 -8
- data/app/pb_kits/playbook/pb_message/docs/_playground.overrides.json +144 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_playground.json +310 -61
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_playground.overrides.json +327 -44
- data/app/pb_kits/playbook/pb_multiple_users/docs/_playground.json +35 -6
- data/app/pb_kits/playbook/pb_multiple_users/docs/_playground.overrides.json +35 -6
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_playground.json +32 -21
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_playground.overrides.json +32 -21
- data/app/pb_kits/playbook/pb_nav/docs/_playground.json +546 -18
- data/app/pb_kits/playbook/pb_nav/docs/_playground.overrides.json +561 -14
- data/app/pb_kits/playbook/pb_online_status/docs/_playground.json +18 -23
- data/app/pb_kits/playbook/pb_online_status/docs/_playground.overrides.json +18 -14
- data/app/pb_kits/playbook/pb_overlay/docs/_playground.json +133 -14
- data/app/pb_kits/playbook/pb_overlay/docs/_playground.overrides.json +154 -0
- data/app/pb_kits/playbook/pb_pagination/docs/_playground.json +35 -14
- data/app/pb_kits/playbook/pb_pagination/docs/_playground.overrides.json +35 -14
- data/app/pb_kits/playbook/pb_passphrase/docs/_playground.json +129 -14
- data/app/pb_kits/playbook/pb_passphrase/docs/_playground.overrides.json +148 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_playground.json +378 -4
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_playground.overrides.json +245 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_playground.json +215 -4
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_playground.overrides.json +224 -0
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_playground.json +149 -4
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_playground.overrides.json +162 -0
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_playground.json +392 -4
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_playground.overrides.json +212 -0
- data/app/pb_kits/playbook/pb_person/docs/_playground.json +27 -11
- data/app/pb_kits/playbook/pb_person/docs/_playground.overrides.json +34 -9
- data/app/pb_kits/playbook/pb_person_contact/docs/_playground.json +72 -21
- data/app/pb_kits/playbook/pb_person_contact/docs/_playground.overrides.json +71 -21
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_playground.json +179 -21
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_playground.overrides.json +180 -0
- data/app/pb_kits/playbook/pb_pill/docs/_playground.json +16 -49
- data/app/pb_kits/playbook/pb_pill/docs/_playground.overrides.json +33 -30
- data/app/pb_kits/playbook/pb_popover/docs/_playground.json +155 -46
- data/app/pb_kits/playbook/pb_popover/docs/_playground.overrides.json +162 -30
- data/app/pb_kits/playbook/pb_progress_step/docs/_playground.json +1 -31
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.json +1 -44
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_playground.json +1 -38
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_playground.json +1 -30
- data/app/pb_kits/playbook/pb_source/docs/_playground.json +1 -27
- data/app/pb_kits/playbook/pb_table/docs/_playground.json +1 -57
- data/app/pb_kits/playbook/pb_time_range_inline/docs/_playground.json +1 -32
- data/app/pb_kits/playbook/pb_timeline/docs/_playground.json +1 -27
- metadata +22 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bae2235ba4ba1ef54672d33b187c66db205c95c0a365da69f543ae1c66bbb113
|
|
4
|
+
data.tar.gz: 4a86869ba17ac5c4b3df22fbc5326c7479194ec30312968ddf0d9fa9995c333d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 59dc1ee968fd7b637cb83f2f85c51a6f917bed32e55f814056847277d98a5e93e2a347b2457eb0fb97ef86485023986d085ced4006c4cdd8c6f0136932a78d79
|
|
7
|
+
data.tar.gz: 0d787eb6c02ff89414b88a0bf37db1d180810f2a0f7a53fa0cc5d6b9f0b2801ed2dc643622e221bad2323e66b27aa9006144ff8904f4d8804e72a0b235b74009
|
|
@@ -1,54 +1,295 @@
|
|
|
1
1
|
{
|
|
2
2
|
"template": "<Draggable{{props}} />",
|
|
3
|
-
"propTargets": {
|
|
3
|
+
"propTargets": {
|
|
4
|
+
"dropZone": "Provider.props",
|
|
5
|
+
"providerId": "Provider.props",
|
|
6
|
+
"enableCrossContainerPreview": "Provider.props",
|
|
7
|
+
"htmlOptions": "Container.props",
|
|
8
|
+
"tag": "Container.props",
|
|
9
|
+
"onDragStart": "Item.props",
|
|
10
|
+
"onDragEnd": "Item.props",
|
|
11
|
+
"onDrop": "Item.props"
|
|
12
|
+
},
|
|
4
13
|
"defaults": {
|
|
5
|
-
"dropZoneColor": "neutral"
|
|
14
|
+
"dropZoneColor": "neutral",
|
|
15
|
+
"dropZone": {
|
|
16
|
+
"type": "ghost",
|
|
17
|
+
"color": "neutral",
|
|
18
|
+
"direction": "vertical"
|
|
19
|
+
},
|
|
20
|
+
"providerId": "draggable-playground",
|
|
21
|
+
"enableCrossContainerPreview": false
|
|
6
22
|
},
|
|
7
23
|
"groups": [
|
|
8
24
|
{
|
|
9
|
-
"name": "
|
|
25
|
+
"name": "Provider",
|
|
10
26
|
"props": [
|
|
11
27
|
"dropZone",
|
|
12
|
-
"
|
|
28
|
+
"providerId",
|
|
29
|
+
"enableCrossContainerPreview"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "Container",
|
|
34
|
+
"props": [
|
|
35
|
+
"tag"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "Item",
|
|
40
|
+
"props": [
|
|
41
|
+
"onDragStart",
|
|
42
|
+
"onDragEnd",
|
|
43
|
+
"onDrop"
|
|
13
44
|
]
|
|
14
45
|
}
|
|
15
46
|
],
|
|
16
47
|
"presets": [
|
|
17
48
|
{
|
|
18
|
-
"name": "
|
|
49
|
+
"name": "Single List",
|
|
50
|
+
"structureMode": "single_container",
|
|
51
|
+
"props": {
|
|
52
|
+
"dropZone": {
|
|
53
|
+
"type": "ghost",
|
|
54
|
+
"color": "neutral",
|
|
55
|
+
"direction": "vertical"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "Outline Drop Zone",
|
|
61
|
+
"structureMode": "single_container",
|
|
62
|
+
"props": {
|
|
63
|
+
"dropZone": {
|
|
64
|
+
"type": "outline",
|
|
65
|
+
"color": "primary",
|
|
66
|
+
"direction": "vertical"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "Shadow Drop Zone",
|
|
72
|
+
"structureMode": "single_container",
|
|
73
|
+
"props": {
|
|
74
|
+
"dropZone": {
|
|
75
|
+
"type": "shadow",
|
|
76
|
+
"color": "purple",
|
|
77
|
+
"direction": "vertical"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "Line Vertical",
|
|
83
|
+
"structureMode": "single_container",
|
|
19
84
|
"props": {
|
|
20
|
-
"dropZone":
|
|
21
|
-
|
|
85
|
+
"dropZone": {
|
|
86
|
+
"type": "line",
|
|
87
|
+
"color": "primary",
|
|
88
|
+
"direction": "vertical"
|
|
89
|
+
}
|
|
22
90
|
}
|
|
23
91
|
},
|
|
24
92
|
{
|
|
25
|
-
"name": "
|
|
93
|
+
"name": "Line Horizontal",
|
|
94
|
+
"structureMode": "single_container_horizontal",
|
|
26
95
|
"props": {
|
|
27
|
-
"dropZone":
|
|
28
|
-
|
|
96
|
+
"dropZone": {
|
|
97
|
+
"type": "line",
|
|
98
|
+
"color": "primary",
|
|
99
|
+
"direction": "horizontal"
|
|
100
|
+
}
|
|
29
101
|
}
|
|
30
102
|
},
|
|
31
103
|
{
|
|
32
|
-
"name": "
|
|
104
|
+
"name": "Multiple Containers",
|
|
105
|
+
"structureMode": "multiple_containers",
|
|
33
106
|
"props": {
|
|
34
|
-
"dropZone":
|
|
35
|
-
|
|
107
|
+
"dropZone": {
|
|
108
|
+
"type": "ghost",
|
|
109
|
+
"color": "neutral",
|
|
110
|
+
"direction": "vertical"
|
|
111
|
+
}
|
|
36
112
|
}
|
|
37
113
|
},
|
|
38
114
|
{
|
|
39
|
-
"name": "
|
|
115
|
+
"name": "Cross Container Preview",
|
|
116
|
+
"structureMode": "multiple_containers",
|
|
40
117
|
"props": {
|
|
41
|
-
"
|
|
42
|
-
"
|
|
118
|
+
"enableCrossContainerPreview": true,
|
|
119
|
+
"dropZone": {
|
|
120
|
+
"type": "outline",
|
|
121
|
+
"color": "primary",
|
|
122
|
+
"direction": "vertical"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "Event Listeners",
|
|
128
|
+
"structureMode": "single_container",
|
|
129
|
+
"props": {
|
|
130
|
+
"onDragEnd": "() => console.log('drag end')",
|
|
131
|
+
"onDragStart": "() => console.log('drag start')",
|
|
132
|
+
"onDrop": "() => console.log('drop')",
|
|
133
|
+
"dropZone": {
|
|
134
|
+
"type": "ghost",
|
|
135
|
+
"color": "neutral",
|
|
136
|
+
"direction": "vertical"
|
|
137
|
+
}
|
|
43
138
|
}
|
|
44
139
|
}
|
|
45
140
|
],
|
|
46
141
|
"conditionals": {},
|
|
47
142
|
"hints": {
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"message": "
|
|
143
|
+
"single_list": {
|
|
144
|
+
"presetName": "Single List",
|
|
145
|
+
"message": "Single List wraps Draggable.Container and Draggable.Item children in DraggableProvider with initialItems and onReorder.",
|
|
146
|
+
"type": "info"
|
|
147
|
+
},
|
|
148
|
+
"outline_drop_zone": {
|
|
149
|
+
"presetName": "Outline Drop Zone",
|
|
150
|
+
"message": "Outline Drop Zone passes a dropZone object to DraggableProvider so the dragged item uses the outline treatment.",
|
|
151
|
+
"type": "info"
|
|
152
|
+
},
|
|
153
|
+
"shadow_drop_zone": {
|
|
154
|
+
"presetName": "Shadow Drop Zone",
|
|
155
|
+
"message": "Shadow Drop Zone uses the provider dropZone color and type to preview the shadow treatment while dragging.",
|
|
51
156
|
"type": "info"
|
|
157
|
+
},
|
|
158
|
+
"line_vertical": {
|
|
159
|
+
"presetName": "Line Vertical",
|
|
160
|
+
"message": "Line Vertical uses dropZone.direction=\"vertical\" for between-row placement.",
|
|
161
|
+
"type": "info"
|
|
162
|
+
},
|
|
163
|
+
"line_horizontal": {
|
|
164
|
+
"presetName": "Line Horizontal",
|
|
165
|
+
"message": "Line Horizontal uses dropZone.direction=\"horizontal\" for between-column placement.",
|
|
166
|
+
"type": "info"
|
|
167
|
+
},
|
|
168
|
+
"multiple_containers": {
|
|
169
|
+
"presetName": "Multiple Containers",
|
|
170
|
+
"message": "Multiple Containers maps items into Draggable.Container columns by their container value.",
|
|
171
|
+
"type": "info"
|
|
172
|
+
},
|
|
173
|
+
"cross_container_preview": {
|
|
174
|
+
"presetName": "Cross Container Preview",
|
|
175
|
+
"message": "Cross Container Preview enables provider-managed movement previews between containers before drop.",
|
|
176
|
+
"type": "info"
|
|
177
|
+
},
|
|
178
|
+
"event_listeners": {
|
|
179
|
+
"presetName": "Event Listeners",
|
|
180
|
+
"message": "Event Listeners routes item callbacks through Draggable.Item props so drag events can be handled by app code.",
|
|
181
|
+
"type": "info"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"structureModes": {
|
|
185
|
+
"default": "single_container",
|
|
186
|
+
"modes": {
|
|
187
|
+
"single_container": {
|
|
188
|
+
"label": "Single Container",
|
|
189
|
+
"template": "<DraggableProvider\n initialItems={initialItems}\n onReorder={setItems}{{Provider.props}}\n>\n <Draggable{{props}}>\n <Draggable.Container\n container=\"tasks\"{{Container.props}}\n >\n <Flex\n gap=\"xs\"\n orientation=\"column\"\n >\n {items.map(({ id, text }) => (\n <Draggable.Item\n container=\"tasks\"\n dragId={id}\n key={id}{{Item.props}}\n >\n <Card padding=\"xs\">\n <Body text={text} />\n </Card>\n </Draggable.Item>\n ))}\n </Flex>\n </Draggable.Container>\n </Draggable>\n</DraggableProvider>",
|
|
190
|
+
"children": "",
|
|
191
|
+
"props": {
|
|
192
|
+
"dropZone": {
|
|
193
|
+
"type": "ghost",
|
|
194
|
+
"color": "neutral",
|
|
195
|
+
"direction": "vertical"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"wrapper": "const initialItems = [\n { id: 'task-1', container: 'tasks', text: 'Confirm scope' },\n { id: 'task-2', container: 'tasks', text: 'Design states' },\n { id: 'task-3', container: 'tasks', text: 'Ship playground' },\n]\n\nconst DraggablePlaygroundExample = () => {\n const [items, setItems] = useState(initialItems)\n\n return {{component}}\n}\n\n<DraggablePlaygroundExample />"
|
|
199
|
+
},
|
|
200
|
+
"single_container_horizontal": {
|
|
201
|
+
"label": "Single Container Horizontal",
|
|
202
|
+
"template": "<Flex>\n <DraggableProvider\n initialItems={initialItems}\n onReorder={setItems}{{Provider.props}}\n >\n <Draggable.Container{{Container.props}}>\n <Flex\n alignItems=\"stretch\"\n flexDirection=\"row\"\n height=\"110px\"\n >\n {items.map(({ id, url }) => (\n <Draggable.Item\n dragId={id}\n key={id}\n marginRight=\"sm\"{{Item.props}}\n >\n <Image\n alt={id}\n size=\"md\"\n url={url}\n />\n </Draggable.Item>\n ))}\n </Flex>\n </Draggable.Container>\n </DraggableProvider>\n</Flex>",
|
|
203
|
+
"children": "",
|
|
204
|
+
"props": {
|
|
205
|
+
"dropZone": {
|
|
206
|
+
"type": "line",
|
|
207
|
+
"color": "primary",
|
|
208
|
+
"direction": "horizontal"
|
|
209
|
+
},
|
|
210
|
+
"htmlOptions": {
|
|
211
|
+
"style": {
|
|
212
|
+
"width": "420px"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"wrapper": "const initialItems = [\n { id: 'image-1', url: 'https://unsplash.it/500/400/?image=633' },\n { id: 'image-2', url: 'https://unsplash.it/500/400/?image=634' },\n { id: 'image-3', url: 'https://unsplash.it/500/400/?image=637' },\n]\n\nconst DraggablePlaygroundExample = () => {\n const [items, setItems] = useState(initialItems)\n\n return {{component}}\n}\n\n<DraggablePlaygroundExample />"
|
|
217
|
+
},
|
|
218
|
+
"multiple_containers": {
|
|
219
|
+
"label": "Multiple Containers",
|
|
220
|
+
"template": "<DraggableProvider\n initialItems={initialItems}\n onReorder={setItems}{{Provider.props}}\n>\n <Draggable{{props}}>\n <Flex\n align=\"start\"\n gap=\"sm\"\n wrap\n >\n {containers.map((container) => (\n <Draggable.Container\n container={container}\n key={container}\n minWidth=\"220px\"{{Container.props}}\n >\n <Card padding=\"sm\">\n <Title\n marginBottom=\"xs\"\n size={4}\n text={container}\n />\n <Flex\n gap=\"xs\"\n orientation=\"column\"\n >\n {items\n .filter((item) => item.container === container)\n .map(({ id, text }) => (\n <Draggable.Item\n container={container}\n dragId={id}\n key={id}{{Item.props}}\n >\n <Card padding=\"xs\">\n <Body text={text} />\n </Card>\n </Draggable.Item>\n ))}\n </Flex>\n </Card>\n </Draggable.Container>\n ))}\n </Flex>\n </Draggable>\n</DraggableProvider>",
|
|
221
|
+
"children": "",
|
|
222
|
+
"props": {
|
|
223
|
+
"dropZone": {
|
|
224
|
+
"type": "ghost",
|
|
225
|
+
"color": "neutral",
|
|
226
|
+
"direction": "vertical"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"wrapper": "const containers = ['To Do', 'In Progress', 'Done']\nconst initialItems = [\n { id: 'task-1', container: 'To Do', text: 'Confirm scope' },\n { id: 'task-2', container: 'To Do', text: 'Design states' },\n { id: 'task-3', container: 'In Progress', text: 'Ship playground' },\n { id: 'task-4', container: 'Done', text: 'Write docs' },\n]\n\nconst DraggablePlaygroundExample = () => {\n const [items, setItems] = useState(initialItems)\n\n return {{component}}\n}\n\n<DraggablePlaygroundExample />"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"children": {
|
|
234
|
+
"editable": false,
|
|
235
|
+
"default": ""
|
|
236
|
+
},
|
|
237
|
+
"customProps": {
|
|
238
|
+
"dropZone": {
|
|
239
|
+
"type": "object",
|
|
240
|
+
"platforms": [
|
|
241
|
+
"react"
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
"providerId": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"platforms": [
|
|
247
|
+
"react"
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
"enableCrossContainerPreview": {
|
|
251
|
+
"type": "boolean",
|
|
252
|
+
"platforms": [
|
|
253
|
+
"react"
|
|
254
|
+
],
|
|
255
|
+
"default": false
|
|
256
|
+
},
|
|
257
|
+
"tag": {
|
|
258
|
+
"type": "enum",
|
|
259
|
+
"platforms": [
|
|
260
|
+
"react"
|
|
261
|
+
],
|
|
262
|
+
"values": [
|
|
263
|
+
"div",
|
|
264
|
+
"span",
|
|
265
|
+
"p",
|
|
266
|
+
"tr",
|
|
267
|
+
"td",
|
|
268
|
+
"tbody"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
"onDragStart": {
|
|
272
|
+
"type": "function",
|
|
273
|
+
"platforms": [
|
|
274
|
+
"react"
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
"onDragEnd": {
|
|
278
|
+
"type": "function",
|
|
279
|
+
"platforms": [
|
|
280
|
+
"react"
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
"onDrop": {
|
|
284
|
+
"type": "function",
|
|
285
|
+
"platforms": [
|
|
286
|
+
"react"
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"propSyncOnEnable": {
|
|
291
|
+
"enableCrossContainerPreview": {
|
|
292
|
+
"structureMode": "multiple_containers"
|
|
52
293
|
}
|
|
53
294
|
}
|
|
54
295
|
}
|
|
@@ -1,33 +1,278 @@
|
|
|
1
1
|
{
|
|
2
|
+
"structureModes": {
|
|
3
|
+
"default": "single_container",
|
|
4
|
+
"modes": {
|
|
5
|
+
"single_container": {
|
|
6
|
+
"label": "Single Container",
|
|
7
|
+
"template": "<DraggableProvider\n initialItems={initialItems}\n onReorder={setItems}{{Provider.props}}\n>\n <Draggable{{props}}>\n <Draggable.Container\n container=\"tasks\"{{Container.props}}\n >\n <Flex\n gap=\"xs\"\n orientation=\"column\"\n >\n {items.map(({ id, text }) => (\n <Draggable.Item\n container=\"tasks\"\n dragId={id}\n key={id}{{Item.props}}\n >\n <Card padding=\"xs\">\n <Body text={text} />\n </Card>\n </Draggable.Item>\n ))}\n </Flex>\n </Draggable.Container>\n </Draggable>\n</DraggableProvider>",
|
|
8
|
+
"children": "",
|
|
9
|
+
"props": {
|
|
10
|
+
"dropZone": {
|
|
11
|
+
"type": "ghost",
|
|
12
|
+
"color": "neutral",
|
|
13
|
+
"direction": "vertical"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"wrapper": "const initialItems = [\n { id: 'task-1', container: 'tasks', text: 'Confirm scope' },\n { id: 'task-2', container: 'tasks', text: 'Design states' },\n { id: 'task-3', container: 'tasks', text: 'Ship playground' },\n]\n\nconst DraggablePlaygroundExample = () => {\n const [items, setItems] = useState(initialItems)\n\n return {{component}}\n}\n\n<DraggablePlaygroundExample />"
|
|
17
|
+
},
|
|
18
|
+
"single_container_horizontal": {
|
|
19
|
+
"label": "Single Container Horizontal",
|
|
20
|
+
"template": "<Flex>\n <DraggableProvider\n initialItems={initialItems}\n onReorder={setItems}{{Provider.props}}\n >\n <Draggable.Container{{Container.props}}>\n <Flex\n alignItems=\"stretch\"\n flexDirection=\"row\"\n height=\"110px\"\n >\n {items.map(({ id, url }) => (\n <Draggable.Item\n dragId={id}\n key={id}\n marginRight=\"sm\"{{Item.props}}\n >\n <Image\n alt={id}\n size=\"md\"\n url={url}\n />\n </Draggable.Item>\n ))}\n </Flex>\n </Draggable.Container>\n </DraggableProvider>\n</Flex>",
|
|
21
|
+
"children": "",
|
|
22
|
+
"props": {
|
|
23
|
+
"dropZone": {
|
|
24
|
+
"type": "line",
|
|
25
|
+
"color": "primary",
|
|
26
|
+
"direction": "horizontal"
|
|
27
|
+
},
|
|
28
|
+
"htmlOptions": {
|
|
29
|
+
"style": {
|
|
30
|
+
"width": "420px"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"wrapper": "const initialItems = [\n { id: 'image-1', url: 'https://unsplash.it/500/400/?image=633' },\n { id: 'image-2', url: 'https://unsplash.it/500/400/?image=634' },\n { id: 'image-3', url: 'https://unsplash.it/500/400/?image=637' },\n]\n\nconst DraggablePlaygroundExample = () => {\n const [items, setItems] = useState(initialItems)\n\n return {{component}}\n}\n\n<DraggablePlaygroundExample />"
|
|
35
|
+
},
|
|
36
|
+
"multiple_containers": {
|
|
37
|
+
"label": "Multiple Containers",
|
|
38
|
+
"template": "<DraggableProvider\n initialItems={initialItems}\n onReorder={setItems}{{Provider.props}}\n>\n <Draggable{{props}}>\n <Flex\n align=\"start\"\n gap=\"sm\"\n wrap\n >\n {containers.map((container) => (\n <Draggable.Container\n container={container}\n key={container}\n minWidth=\"220px\"{{Container.props}}\n >\n <Card padding=\"sm\">\n <Title\n marginBottom=\"xs\"\n size={4}\n text={container}\n />\n <Flex\n gap=\"xs\"\n orientation=\"column\"\n >\n {items\n .filter((item) => item.container === container)\n .map(({ id, text }) => (\n <Draggable.Item\n container={container}\n dragId={id}\n key={id}{{Item.props}}\n >\n <Card padding=\"xs\">\n <Body text={text} />\n </Card>\n </Draggable.Item>\n ))}\n </Flex>\n </Card>\n </Draggable.Container>\n ))}\n </Flex>\n </Draggable>\n</DraggableProvider>",
|
|
39
|
+
"children": "",
|
|
40
|
+
"props": {
|
|
41
|
+
"dropZone": {
|
|
42
|
+
"type": "ghost",
|
|
43
|
+
"color": "neutral",
|
|
44
|
+
"direction": "vertical"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"wrapper": "const containers = ['To Do', 'In Progress', 'Done']\nconst initialItems = [\n { id: 'task-1', container: 'To Do', text: 'Confirm scope' },\n { id: 'task-2', container: 'To Do', text: 'Design states' },\n { id: 'task-3', container: 'In Progress', text: 'Ship playground' },\n { id: 'task-4', container: 'Done', text: 'Write docs' },\n]\n\nconst DraggablePlaygroundExample = () => {\n const [items, setItems] = useState(initialItems)\n\n return {{component}}\n}\n\n<DraggablePlaygroundExample />"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"children": {
|
|
52
|
+
"editable": false,
|
|
53
|
+
"default": ""
|
|
54
|
+
},
|
|
55
|
+
"customProps": {
|
|
56
|
+
"dropZone": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"platforms": ["react"]
|
|
59
|
+
},
|
|
60
|
+
"providerId": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"platforms": ["react"]
|
|
63
|
+
},
|
|
64
|
+
"enableCrossContainerPreview": {
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"platforms": ["react"],
|
|
67
|
+
"default": false
|
|
68
|
+
},
|
|
69
|
+
"tag": {
|
|
70
|
+
"type": "enum",
|
|
71
|
+
"platforms": ["react"],
|
|
72
|
+
"values": [
|
|
73
|
+
"div",
|
|
74
|
+
"span",
|
|
75
|
+
"p",
|
|
76
|
+
"tr",
|
|
77
|
+
"td",
|
|
78
|
+
"tbody"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"onDragStart": {
|
|
82
|
+
"type": "function",
|
|
83
|
+
"platforms": ["react"]
|
|
84
|
+
},
|
|
85
|
+
"onDragEnd": {
|
|
86
|
+
"type": "function",
|
|
87
|
+
"platforms": ["react"]
|
|
88
|
+
},
|
|
89
|
+
"onDrop": {
|
|
90
|
+
"type": "function",
|
|
91
|
+
"platforms": ["react"]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"propTargets": {
|
|
95
|
+
"dropZone": "Provider.props",
|
|
96
|
+
"providerId": "Provider.props",
|
|
97
|
+
"enableCrossContainerPreview": "Provider.props",
|
|
98
|
+
"htmlOptions": "Container.props",
|
|
99
|
+
"tag": "Container.props",
|
|
100
|
+
"onDragStart": "Item.props",
|
|
101
|
+
"onDragEnd": "Item.props",
|
|
102
|
+
"onDrop": "Item.props"
|
|
103
|
+
},
|
|
104
|
+
"defaults": {
|
|
105
|
+
"dropZone": {
|
|
106
|
+
"type": "ghost",
|
|
107
|
+
"color": "neutral",
|
|
108
|
+
"direction": "vertical"
|
|
109
|
+
},
|
|
110
|
+
"providerId": "draggable-playground",
|
|
111
|
+
"enableCrossContainerPreview": false
|
|
112
|
+
},
|
|
2
113
|
"groups": [
|
|
3
114
|
{
|
|
4
|
-
"name": "
|
|
5
|
-
"props": [
|
|
115
|
+
"name": "Provider",
|
|
116
|
+
"props": [
|
|
117
|
+
"dropZone",
|
|
118
|
+
"providerId",
|
|
119
|
+
"enableCrossContainerPreview"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "Container",
|
|
124
|
+
"props": [
|
|
125
|
+
"tag"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "Item",
|
|
130
|
+
"props": [
|
|
131
|
+
"onDragStart",
|
|
132
|
+
"onDragEnd",
|
|
133
|
+
"onDrop"
|
|
134
|
+
]
|
|
6
135
|
}
|
|
7
136
|
],
|
|
8
137
|
"presets": [
|
|
9
138
|
{
|
|
10
|
-
"name": "
|
|
11
|
-
"
|
|
139
|
+
"name": "Single List",
|
|
140
|
+
"structureMode": "single_container",
|
|
141
|
+
"props": {
|
|
142
|
+
"dropZone": {
|
|
143
|
+
"type": "ghost",
|
|
144
|
+
"color": "neutral",
|
|
145
|
+
"direction": "vertical"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "Outline Drop Zone",
|
|
151
|
+
"structureMode": "single_container",
|
|
152
|
+
"props": {
|
|
153
|
+
"dropZone": {
|
|
154
|
+
"type": "outline",
|
|
155
|
+
"color": "primary",
|
|
156
|
+
"direction": "vertical"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "Shadow Drop Zone",
|
|
162
|
+
"structureMode": "single_container",
|
|
163
|
+
"props": {
|
|
164
|
+
"dropZone": {
|
|
165
|
+
"type": "shadow",
|
|
166
|
+
"color": "purple",
|
|
167
|
+
"direction": "vertical"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "Line Vertical",
|
|
173
|
+
"structureMode": "single_container",
|
|
174
|
+
"props": {
|
|
175
|
+
"dropZone": {
|
|
176
|
+
"type": "line",
|
|
177
|
+
"color": "primary",
|
|
178
|
+
"direction": "vertical"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "Line Horizontal",
|
|
184
|
+
"structureMode": "single_container_horizontal",
|
|
185
|
+
"props": {
|
|
186
|
+
"dropZone": {
|
|
187
|
+
"type": "line",
|
|
188
|
+
"color": "primary",
|
|
189
|
+
"direction": "horizontal"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
12
192
|
},
|
|
13
193
|
{
|
|
14
|
-
"name": "
|
|
15
|
-
"
|
|
194
|
+
"name": "Multiple Containers",
|
|
195
|
+
"structureMode": "multiple_containers",
|
|
196
|
+
"props": {
|
|
197
|
+
"dropZone": {
|
|
198
|
+
"type": "ghost",
|
|
199
|
+
"color": "neutral",
|
|
200
|
+
"direction": "vertical"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
16
203
|
},
|
|
17
204
|
{
|
|
18
|
-
"name": "
|
|
19
|
-
"
|
|
205
|
+
"name": "Cross Container Preview",
|
|
206
|
+
"structureMode": "multiple_containers",
|
|
207
|
+
"props": {
|
|
208
|
+
"enableCrossContainerPreview": true,
|
|
209
|
+
"dropZone": {
|
|
210
|
+
"type": "outline",
|
|
211
|
+
"color": "primary",
|
|
212
|
+
"direction": "vertical"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
20
215
|
},
|
|
21
216
|
{
|
|
22
|
-
"name": "
|
|
23
|
-
"
|
|
217
|
+
"name": "Event Listeners",
|
|
218
|
+
"structureMode": "single_container",
|
|
219
|
+
"props": {
|
|
220
|
+
"onDragEnd": "() => console.log('drag end')",
|
|
221
|
+
"onDragStart": "() => console.log('drag start')",
|
|
222
|
+
"onDrop": "() => console.log('drop')",
|
|
223
|
+
"dropZone": {
|
|
224
|
+
"type": "ghost",
|
|
225
|
+
"color": "neutral",
|
|
226
|
+
"direction": "vertical"
|
|
227
|
+
}
|
|
228
|
+
}
|
|
24
229
|
}
|
|
25
230
|
],
|
|
26
231
|
"conditionals": {},
|
|
232
|
+
"propSyncOnEnable": {
|
|
233
|
+
"enableCrossContainerPreview": {
|
|
234
|
+
"structureMode": "multiple_containers"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
27
237
|
"hints": {
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"message": "
|
|
238
|
+
"single_list": {
|
|
239
|
+
"presetName": "Single List",
|
|
240
|
+
"message": "Single List wraps Draggable.Container and Draggable.Item children in DraggableProvider with initialItems and onReorder.",
|
|
241
|
+
"type": "info"
|
|
242
|
+
},
|
|
243
|
+
"outline_drop_zone": {
|
|
244
|
+
"presetName": "Outline Drop Zone",
|
|
245
|
+
"message": "Outline Drop Zone passes a dropZone object to DraggableProvider so the dragged item uses the outline treatment.",
|
|
246
|
+
"type": "info"
|
|
247
|
+
},
|
|
248
|
+
"shadow_drop_zone": {
|
|
249
|
+
"presetName": "Shadow Drop Zone",
|
|
250
|
+
"message": "Shadow Drop Zone uses the provider dropZone color and type to preview the shadow treatment while dragging.",
|
|
251
|
+
"type": "info"
|
|
252
|
+
},
|
|
253
|
+
"line_vertical": {
|
|
254
|
+
"presetName": "Line Vertical",
|
|
255
|
+
"message": "Line Vertical uses dropZone.direction=\"vertical\" for between-row placement.",
|
|
256
|
+
"type": "info"
|
|
257
|
+
},
|
|
258
|
+
"line_horizontal": {
|
|
259
|
+
"presetName": "Line Horizontal",
|
|
260
|
+
"message": "Line Horizontal uses dropZone.direction=\"horizontal\" for between-column placement.",
|
|
261
|
+
"type": "info"
|
|
262
|
+
},
|
|
263
|
+
"multiple_containers": {
|
|
264
|
+
"presetName": "Multiple Containers",
|
|
265
|
+
"message": "Multiple Containers maps items into Draggable.Container columns by their container value.",
|
|
266
|
+
"type": "info"
|
|
267
|
+
},
|
|
268
|
+
"cross_container_preview": {
|
|
269
|
+
"presetName": "Cross Container Preview",
|
|
270
|
+
"message": "Cross Container Preview enables provider-managed movement previews between containers before drop.",
|
|
271
|
+
"type": "info"
|
|
272
|
+
},
|
|
273
|
+
"event_listeners": {
|
|
274
|
+
"presetName": "Event Listeners",
|
|
275
|
+
"message": "Event Listeners routes item callbacks through Draggable.Item props so drag events can be handled by app code.",
|
|
31
276
|
"type": "info"
|
|
32
277
|
}
|
|
33
278
|
}
|