playbook_ui_docs 16.9.0.pre.alpha.touchdragmulticontainers17271 → 16.9.0.pre.alpha.typeaheaddraggablepills16995
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_advanced_table/docs/_advanced_table_row_styling.jsx +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb +44 -36
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx +19 -10
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +4 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +5 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners_rails.md +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md +1 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_react.md +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_playground.json +19 -260
- data/app/pb_kits/playbook/pb_draggable/docs/_playground.overrides.json +13 -258
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_playground.json +0 -1
- data/app/pb_kits/playbook/pb_file_upload/docs/_playground.json +1 -2
- data/app/pb_kits/playbook/pb_filter/docs/_playground.json +5 -301
- data/app/pb_kits/playbook/pb_filter/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_filter/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_playground.json +14 -210
- data/app/pb_kits/playbook/pb_flex/docs/_playground.json +38 -297
- data/app/pb_kits/playbook/pb_flex/docs/_playground.overrides.json +40 -300
- data/app/pb_kits/playbook/pb_form/docs/_playground.json +13 -1
- data/app/pb_kits/playbook/pb_form_group/docs/_playground.json +23 -1
- data/app/pb_kits/playbook/pb_form_pill/docs/_playground.json +14 -155
- data/app/pb_kits/playbook/pb_hashtag/docs/_playground.json +11 -72
- data/app/pb_kits/playbook/pb_highlight/docs/_playground.json +4 -75
- data/app/pb_kits/playbook/pb_home_address_street/docs/_playground.json +12 -138
- data/app/pb_kits/playbook/pb_icon/docs/_icon_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_icon/docs/_playground.json +40 -79
- data/app/pb_kits/playbook/pb_icon/docs/_playground.overrides.json +27 -96
- data/app/pb_kits/playbook/pb_icon_button/docs/_playground.json +9 -111
- data/app/pb_kits/playbook/pb_icon_circle/docs/_playground.json +7 -92
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_playground.json +17 -32
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_playground.overrides.json +8 -81
- data/app/pb_kits/playbook/pb_icon_value/docs/_playground.json +18 -28
- data/app/pb_kits/playbook/pb_icon_value/docs/_playground.overrides.json +9 -58
- data/app/pb_kits/playbook/pb_image/docs/_playground.json +47 -124
- data/app/pb_kits/playbook/pb_image/docs/_playground.overrides.json +47 -122
- data/app/pb_kits/playbook/pb_label_pill/docs/_playground.json +6 -68
- data/app/pb_kits/playbook/pb_label_value/docs/_playground.json +36 -59
- data/app/pb_kits/playbook/pb_label_value/docs/_playground.overrides.json +30 -101
- data/app/pb_kits/playbook/pb_layout/docs/_playground.json +40 -1
- data/app/pb_kits/playbook/pb_legend/docs/_playground.json +7 -60
- data/app/pb_kits/playbook/pb_list/docs/_playground.json +17 -165
- data/app/pb_kits/playbook/pb_loading_inline/docs/_playground.json +1 -28
- data/app/pb_kits/playbook/pb_loading_inline/docs/_playground.overrides.json +1 -27
- data/app/pb_kits/playbook/pb_loading_inline/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_loading_inline/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_map/docs/_playground.json +7 -164
- data/app/pb_kits/playbook/pb_message/docs/_playground.json +8 -114
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_playground.json +61 -310
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_playground.overrides.json +44 -327
- data/app/pb_kits/playbook/pb_multiple_users/docs/_playground.json +6 -35
- data/app/pb_kits/playbook/pb_multiple_users/docs/_playground.overrides.json +6 -35
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_playground.json +21 -32
- data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_playground.overrides.json +21 -32
- data/app/pb_kits/playbook/pb_nav/docs/_playground.json +18 -546
- data/app/pb_kits/playbook/pb_nav/docs/_playground.overrides.json +14 -561
- data/app/pb_kits/playbook/pb_online_status/docs/_playground.json +23 -18
- data/app/pb_kits/playbook/pb_online_status/docs/_playground.overrides.json +14 -18
- data/app/pb_kits/playbook/pb_overlay/docs/_playground.json +14 -133
- data/app/pb_kits/playbook/pb_pagination/docs/_playground.json +14 -35
- data/app/pb_kits/playbook/pb_pagination/docs/_playground.overrides.json +14 -35
- data/app/pb_kits/playbook/pb_passphrase/docs/_playground.json +14 -129
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_playground.json +4 -378
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_playground.json +4 -215
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_playground.json +4 -149
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_playground.json +4 -392
- data/app/pb_kits/playbook/pb_person/docs/_playground.json +11 -27
- data/app/pb_kits/playbook/pb_person/docs/_playground.overrides.json +9 -34
- data/app/pb_kits/playbook/pb_person_contact/docs/_playground.json +21 -72
- data/app/pb_kits/playbook/pb_person_contact/docs/_playground.overrides.json +21 -71
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_playground.json +21 -179
- data/app/pb_kits/playbook/pb_pill/docs/_playground.json +49 -16
- data/app/pb_kits/playbook/pb_pill/docs/_playground.overrides.json +30 -33
- data/app/pb_kits/playbook/pb_popover/docs/_playground.json +46 -155
- data/app/pb_kits/playbook/pb_popover/docs/_playground.overrides.json +30 -162
- data/app/pb_kits/playbook/pb_progress_step/docs/_playground.json +31 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.json +44 -1
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_playground.json +38 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_playground.json +30 -1
- data/app/pb_kits/playbook/pb_source/docs/_playground.json +27 -1
- data/app/pb_kits/playbook/pb_table/docs/_playground.json +57 -1
- data/app/pb_kits/playbook/pb_time_range_inline/docs/_playground.json +32 -1
- data/app/pb_kits/playbook/pb_timeline/docs/_playground.json +27 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_playground.json +8 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_draggable_pills.html.erb +55 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_draggable_pills.jsx +62 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_draggable_pills.md +5 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_draggable_pills_rails.md +5 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- metadata +6 -31
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_independent_containers.html.erb +0 -35
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_independent_containers_rails.md +0 -8
- data/app/pb_kits/playbook/pb_filter/docs/_filter_interactive.html.erb +0 -116
- data/app/pb_kits/playbook/pb_filter/docs/_filter_interactive.md +0 -12
- data/app/pb_kits/playbook/pb_filter/docs/_filter_interactive_react.jsx +0 -153
- data/app/pb_kits/playbook/pb_filter/docs/_filter_interactive_react.md +0 -10
- data/app/pb_kits/playbook/pb_filter/docs/_playground.overrides.json +0 -312
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_playground.overrides.json +0 -231
- data/app/pb_kits/playbook/pb_form_pill/docs/_playground.overrides.json +0 -147
- data/app/pb_kits/playbook/pb_hashtag/docs/_playground.overrides.json +0 -75
- data/app/pb_kits/playbook/pb_highlight/docs/_playground.overrides.json +0 -75
- data/app/pb_kits/playbook/pb_home_address_street/docs/_playground.overrides.json +0 -162
- data/app/pb_kits/playbook/pb_icon_button/docs/_playground.overrides.json +0 -131
- data/app/pb_kits/playbook/pb_icon_circle/docs/_playground.overrides.json +0 -108
- data/app/pb_kits/playbook/pb_label_pill/docs/_playground.overrides.json +0 -85
- data/app/pb_kits/playbook/pb_legend/docs/_playground.overrides.json +0 -77
- data/app/pb_kits/playbook/pb_list/docs/_playground.overrides.json +0 -191
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_color.html.erb +0 -21
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_color.jsx +0 -55
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_color.md +0 -1
- data/app/pb_kits/playbook/pb_map/docs/_playground.overrides.json +0 -180
- data/app/pb_kits/playbook/pb_message/docs/_playground.overrides.json +0 -144
- data/app/pb_kits/playbook/pb_overlay/docs/_playground.overrides.json +0 -154
- data/app/pb_kits/playbook/pb_passphrase/docs/_playground.overrides.json +0 -148
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_playground.overrides.json +0 -245
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_playground.overrides.json +0 -224
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_playground.overrides.json +0 -162
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_playground.overrides.json +0 -212
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_playground.overrides.json +0 -180
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b90e37b91ab420004202c5b58a1d8057ee420666582a8f3a03a41d2cfddb387
|
|
4
|
+
data.tar.gz: 042a98fd3c80fac72a8ca3666e4d340cc9a8691200ac3c61219084455d82bb29
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 821ca52233f3e8b0667e748178d9c295351413ed459eef979baef2a81a7d0febd87f897ddd167edbed8be98d1e24774802207cf301f410f276fe01565e9eb5d5
|
|
7
|
+
data.tar.gz: c5aaccf1dbc19ed115a39c4c7bcf0a0c6532f8f9df9f9020106ecd97be7292d432671922f60b91171a7fdd72b89d00a7db1dee9809a7a05058fbba39daa53773
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import AdvancedTable from '../_advanced_table'
|
|
3
|
-
import
|
|
3
|
+
import MOCK_DATA from "./advanced_table_mock_data_with_id.json"
|
|
4
4
|
import colors from '../../tokens/exports/_colors.module.scss'
|
|
5
5
|
|
|
6
6
|
|
|
@@ -55,7 +55,7 @@ const rowStyling = [
|
|
|
55
55
|
<AdvancedTable
|
|
56
56
|
columnDefinitions={columnDefinitions}
|
|
57
57
|
rowStyling={rowStyling}
|
|
58
|
-
tableData={
|
|
58
|
+
tableData={MOCK_DATA}
|
|
59
59
|
{...props}
|
|
60
60
|
/>
|
|
61
61
|
</div>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb
CHANGED
|
@@ -1,39 +1,47 @@
|
|
|
1
1
|
<% column_definitions = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
2
|
+
{
|
|
3
|
+
accessor: "year",
|
|
4
|
+
label: "Year",
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
accessor: "newEnrollments",
|
|
8
|
+
label: "New Enrollments",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
accessor: "scheduledMeetings",
|
|
12
|
+
label: "Scheduled Meetings",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
accessor: "attendanceRate",
|
|
16
|
+
label: "Attendance Rate",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessor: "completedClasses",
|
|
20
|
+
label: "Completed Classes",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
accessor: "classCompletionRate",
|
|
24
|
+
label: "Class Completion Rate",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
accessor: "graduatedStudents",
|
|
28
|
+
label: "Graduated Students",
|
|
29
|
+
}
|
|
31
30
|
] %>
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
32
|
+
<% table_data = 15.times.map do |index|
|
|
33
|
+
{
|
|
34
|
+
year: (2020 + index).to_s,
|
|
35
|
+
id: (2020 + index).to_s,
|
|
36
|
+
newEnrollments: (20 + index).to_s,
|
|
37
|
+
scheduledMeetings: (10 + index).to_s,
|
|
38
|
+
attendanceRate: "#{50 + index}%",
|
|
39
|
+
completedClasses: (3 + index).to_s,
|
|
40
|
+
classCompletionRate: "#{30 + index}%",
|
|
41
|
+
graduatedStudents: (19 + index).to_s,
|
|
42
|
+
}
|
|
43
|
+
end %>
|
|
44
|
+
|
|
45
|
+
<div style="max-height: 320px; overflow-y: auto;">
|
|
46
|
+
<%= pb_rails("advanced_table", props: { id: "table_props_sticky_table", table_data: table_data, column_definitions: column_definitions, table_props: { sticky: true }}) %>
|
|
47
|
+
</div>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
const tableData = Array.from({ length: 15 }, (_, index) => ({
|
|
5
|
+
year: String(2020 + index),
|
|
6
|
+
newEnrollments: String(20 + index),
|
|
7
|
+
scheduledMeetings: String(10 + index),
|
|
8
|
+
attendanceRate: `${50 + index}%`,
|
|
9
|
+
completedClasses: String(3 + index),
|
|
10
|
+
classCompletionRate: `${30 + index}%`,
|
|
11
|
+
graduatedStudents: String(19 + index),
|
|
12
|
+
}))
|
|
4
13
|
|
|
5
14
|
const AdvancedTableTablePropsStickyHeader = (props) => {
|
|
6
15
|
const columnDefinitions = [
|
|
7
16
|
{
|
|
8
17
|
accessor: "year",
|
|
9
18
|
label: "Year",
|
|
10
|
-
cellAccessors: ["quarter", "month", "day"],
|
|
11
19
|
},
|
|
12
20
|
{
|
|
13
21
|
accessor: "newEnrollments",
|
|
@@ -36,17 +44,18 @@ const AdvancedTableTablePropsStickyHeader = (props) => {
|
|
|
36
44
|
]
|
|
37
45
|
|
|
38
46
|
const tableProps = {
|
|
39
|
-
sticky: true
|
|
47
|
+
sticky: true
|
|
40
48
|
}
|
|
41
49
|
|
|
42
50
|
return (
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
<div style={{ maxHeight: "320px", overflowY: "auto" }}>
|
|
52
|
+
<AdvancedTable
|
|
53
|
+
columnDefinitions={columnDefinitions}
|
|
54
|
+
tableData={tableData}
|
|
55
|
+
tableProps={tableProps}
|
|
56
|
+
{...props}
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
50
59
|
)
|
|
51
60
|
}
|
|
52
61
|
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md
CHANGED
|
@@ -2,6 +2,10 @@ Create a sticky header that works for responsive Advanced Tables by setting `sti
|
|
|
2
2
|
|
|
3
3
|
**NOTE**: This behavior requires a `max_height` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
|
|
4
4
|
|
|
5
|
+
Scroll inside the table preview to see the header stick.
|
|
6
|
+
|
|
7
|
+
This example builds flat table data inline for the docs preview. For typical `table_data` setup, see [Default (Required Props)](/kits/advanced_table/default/rails#advanced_table_beta).
|
|
8
|
+
|
|
5
9
|
Expand the table above to see this in action.
|
|
6
10
|
|
|
7
11
|
A sticky header on a nonresponsive table is demonstrated in the ["Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table#sticky-header) doc example above.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and
|
|
1
|
+
Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and wrapping the table in a scroll container (or using `maxHeight`).
|
|
2
2
|
|
|
3
|
-
**NOTE**:
|
|
3
|
+
**NOTE**: The header is sticky within the table scroll area. The live example uses flat rows so you can scroll inside the preview without expanding subrows.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This example builds flat table data inline for the docs preview. For typical `tableData` setup, see [Default (Required Props)](/kits/advanced_table/default/react#advanced_table_default).
|
|
6
|
+
|
|
7
|
+
Expand the table above to see responsive behavior in action.
|
|
6
8
|
|
|
7
9
|
A sticky header on a nonresponsive table is demonstrated in the ["Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table/react#sticky-header) doc example above.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
You can add drag event listeners for
|
|
1
|
+
You can add drag event listeners for `drag`, `dragend`, `dragenter`, `dragleave`, `dragover`, `dragstart`, and `drop`.
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
The Draggable kit can also be used to achieve more complex, multiple container functionality as shown here. This complex usage requires the full subcomponent structure
|
|
2
|
-
|
|
3
|
-
For lists that should stay separate, see [Independent Draggable Containers](#draggable_independent_containers).
|
|
1
|
+
The Draggable kit can also be used to achieve more complex, multiple container functionality as shown here. This complex usage requires the full subcomponent structure.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
The Draggable kit can also be used to achieve more complex, multiple container functionality as shown here. This complex usage requires the full subcomponent structure.
|
|
1
|
+
The Draggable kit can also be used to achieve more complex, multiple container functionality as shown here. This complex usage requires the full subcomponent structure.
|
|
@@ -1,295 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"template": "<Draggable{{props}} />",
|
|
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
|
-
},
|
|
3
|
+
"propTargets": {},
|
|
13
4
|
"defaults": {
|
|
14
|
-
"dropZoneColor": "neutral"
|
|
15
|
-
"dropZone": {
|
|
16
|
-
"type": "ghost",
|
|
17
|
-
"color": "neutral",
|
|
18
|
-
"direction": "vertical"
|
|
19
|
-
},
|
|
20
|
-
"providerId": "draggable-playground",
|
|
21
|
-
"enableCrossContainerPreview": false
|
|
5
|
+
"dropZoneColor": "neutral"
|
|
22
6
|
},
|
|
23
7
|
"groups": [
|
|
24
8
|
{
|
|
25
|
-
"name": "
|
|
9
|
+
"name": "Appearance",
|
|
26
10
|
"props": [
|
|
27
11
|
"dropZone",
|
|
28
|
-
"
|
|
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"
|
|
12
|
+
"dropZoneColor"
|
|
44
13
|
]
|
|
45
14
|
}
|
|
46
15
|
],
|
|
47
16
|
"presets": [
|
|
48
17
|
{
|
|
49
|
-
"name": "
|
|
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",
|
|
18
|
+
"name": "Ghost (neutral)",
|
|
84
19
|
"props": {
|
|
85
|
-
"dropZone":
|
|
86
|
-
|
|
87
|
-
"color": "primary",
|
|
88
|
-
"direction": "vertical"
|
|
89
|
-
}
|
|
20
|
+
"dropZone": "ghost",
|
|
21
|
+
"dropZoneColor": "neutral"
|
|
90
22
|
}
|
|
91
23
|
},
|
|
92
24
|
{
|
|
93
|
-
"name": "
|
|
94
|
-
"structureMode": "single_container_horizontal",
|
|
25
|
+
"name": "Outline (primary)",
|
|
95
26
|
"props": {
|
|
96
|
-
"dropZone":
|
|
97
|
-
|
|
98
|
-
"color": "primary",
|
|
99
|
-
"direction": "horizontal"
|
|
100
|
-
}
|
|
27
|
+
"dropZone": "outline",
|
|
28
|
+
"dropZoneColor": "primary"
|
|
101
29
|
}
|
|
102
30
|
},
|
|
103
31
|
{
|
|
104
|
-
"name": "
|
|
105
|
-
"structureMode": "multiple_containers",
|
|
32
|
+
"name": "Shadow (purple)",
|
|
106
33
|
"props": {
|
|
107
|
-
"dropZone":
|
|
108
|
-
|
|
109
|
-
"color": "neutral",
|
|
110
|
-
"direction": "vertical"
|
|
111
|
-
}
|
|
34
|
+
"dropZone": "shadow",
|
|
35
|
+
"dropZoneColor": "purple"
|
|
112
36
|
}
|
|
113
37
|
},
|
|
114
38
|
{
|
|
115
|
-
"name": "
|
|
116
|
-
"structureMode": "multiple_containers",
|
|
39
|
+
"name": "Line (neutral)",
|
|
117
40
|
"props": {
|
|
118
|
-
"
|
|
119
|
-
"
|
|
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
|
-
}
|
|
41
|
+
"dropZone": "line",
|
|
42
|
+
"dropZoneColor": "neutral"
|
|
138
43
|
}
|
|
139
44
|
}
|
|
140
45
|
],
|
|
141
46
|
"conditionals": {},
|
|
142
47
|
"hints": {
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"message": "
|
|
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.",
|
|
48
|
+
"children_note": {
|
|
49
|
+
"when": {},
|
|
50
|
+
"message": "Compose Draggable.Container and Draggable.Item as children to build a sortable list.",
|
|
156
51
|
"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"
|
|
293
52
|
}
|
|
294
53
|
}
|
|
295
54
|
}
|