playbook_ui_docs 15.4.0.pre.rc.4 → 15.5.0.pre.alpha.PLAY2554homeaddressstreetaccessibility12695
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_column_styling.jsx +2 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_infinite_scroll.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_editing.jsx +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.jsx +2 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant.html.erb +9 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant.jsx +24 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_rails.md +1 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_react.md +1 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +2 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +1 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +2 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +2 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_abbreviated.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals_rails.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals_react.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.html.erb +10 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.jsx +10 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol_rails.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol_react.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +7 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +7 -0
- data/app/pb_kits/playbook/pb_currency/docs/_description.md +2 -2
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.html.erb +4 -0
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.jsx +43 -0
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.md +1 -0
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_date_range_inline/docs/example.yml +3 -2
- data/app/pb_kits/playbook/pb_date_range_inline/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_current_year.html.erb +12 -0
- data/app/pb_kits/playbook/pb_date_stacked/docs/{_date_stacked_not_current_year.jsx → _date_stacked_current_year.jsx} +6 -5
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_current_year.md +1 -0
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_stacked/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +2 -2
- data/app/pb_kits/playbook/pb_date_stacked/docs/index.js +1 -1
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year.html.erb +4 -0
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year.jsx +14 -0
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year_rails.md +1 -0
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year_react.md +1 -0
- data/app/pb_kits/playbook/pb_date_time/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_date_time/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.html.erb +4 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.jsx +22 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.md +1 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb +33 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_dropzone.jsx +180 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_dropzone.md +22 -0
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +3 -2
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_alignment.jsx +2 -1
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_default.jsx +2 -1
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_orientation.jsx +2 -1
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_size.jsx +2 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_item_example.jsx +1 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_wrapped.jsx +4 -1
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.html.erb +124 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.jsx +147 -12
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.jsx +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.html.erb +21 -0
- data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.jsx +113 -0
- data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.md +1 -0
- data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.html.erb +30 -0
- data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.jsx +117 -0
- data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.md +1 -0
- data/app/pb_kits/playbook/pb_nav/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_nav/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +3 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.md +1 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_non_clickable.jsx +1 -2
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.html.erb +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.md +11 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.jsx +1 -2
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.jsx +1 -2
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +3 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_block_content.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.md +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_labels.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_legend.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.md +1 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_inner_sizes.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_live_data.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_rounded.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_with_title.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +3 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.md +2 -2
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.md +1 -0
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +3 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.md +1 -0
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.html.erb +1 -1
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +4 -1
- data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +1 -5
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.html.erb +14 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.jsx +29 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.md +3 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.jsx +31 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.md +1 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +4 -1
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +14 -3
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.md +3 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.md +3 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.html.erb +1 -7
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.md +1 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx +3 -1
- data/app/pb_kits/playbook/pb_select/docs/_select_react_hook.jsx +3 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_sizing.jsx +4 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx +2 -1
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +1 -1
- metadata +46 -5
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year.html.erb +0 -5
- data/dist/playbook-doc.js +0 -19
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
|
|
3
|
+
import Flex from '../../pb_flex/_flex'
|
|
4
|
+
import Draggable from '../../pb_draggable/_draggable'
|
|
5
|
+
import { DraggableProvider } from '../../pb_draggable/context'
|
|
6
|
+
import Badge from '../../pb_badge/_badge'
|
|
7
|
+
import Title from '../../pb_title/_title'
|
|
8
|
+
import Caption from '../../pb_caption/_caption'
|
|
9
|
+
import Card from '../../pb_card/_card'
|
|
10
|
+
import FlexItem from '../../pb_flex/_flex_item'
|
|
11
|
+
import Avatar from '../../pb_avatar/_avatar'
|
|
12
|
+
import Body from '../../pb_body/_body'
|
|
13
|
+
|
|
14
|
+
// Initial groups to drag between
|
|
15
|
+
const containers = ["To Do", "In Progress", "Done"];
|
|
16
|
+
|
|
17
|
+
// Initial items to be dragged
|
|
18
|
+
const data = [
|
|
19
|
+
{
|
|
20
|
+
id: "11",
|
|
21
|
+
container: "To Do",
|
|
22
|
+
title: "Task 1",
|
|
23
|
+
description: "Bug fixes",
|
|
24
|
+
assignee_name: "Terry Miles",
|
|
25
|
+
assignee_img: "https://randomuser.me/api/portraits/men/44.jpg",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "12",
|
|
29
|
+
container: "To Do",
|
|
30
|
+
title: "Task 2",
|
|
31
|
+
description: "Documentation",
|
|
32
|
+
assignee_name: "Sophia Miles",
|
|
33
|
+
assignee_img: "https://randomuser.me/api/portraits/women/8.jpg",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "13",
|
|
37
|
+
container: "In Progress",
|
|
38
|
+
title: "Task 3",
|
|
39
|
+
description: "Add a variant",
|
|
40
|
+
assignee_name: "Alice Jones",
|
|
41
|
+
assignee_img: "https://randomuser.me/api/portraits/women/10.jpg",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "14",
|
|
45
|
+
container: "To Do",
|
|
46
|
+
title: "Task 4",
|
|
47
|
+
description: "Add jest tests",
|
|
48
|
+
assignee_name: "Mike James",
|
|
49
|
+
assignee_img: "https://randomuser.me/api/portraits/men/8.jpg",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "15",
|
|
53
|
+
container: "Done",
|
|
54
|
+
title: "Task 5",
|
|
55
|
+
description: "Alpha testing",
|
|
56
|
+
assignee_name: "James Guy",
|
|
57
|
+
assignee_img: "https://randomuser.me/api/portraits/men/18.jpg",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "16",
|
|
61
|
+
container: "In Progress",
|
|
62
|
+
title: "Task 6",
|
|
63
|
+
description: "Release",
|
|
64
|
+
assignee_name: "Sally Jones",
|
|
65
|
+
assignee_img: "https://randomuser.me/api/portraits/women/28.jpg",
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
const DraggableMultipleContainersDropzone = (props) => {
|
|
70
|
+
const [initialState, setInitialState] = useState(data);
|
|
71
|
+
|
|
72
|
+
const badgeProperties = (container) => {
|
|
73
|
+
switch (container) {
|
|
74
|
+
case "To Do":
|
|
75
|
+
return { text: "queue", color: "warning" };
|
|
76
|
+
case "In Progress":
|
|
77
|
+
return { text: "progress", color: "primary" };
|
|
78
|
+
default:
|
|
79
|
+
return { text: "done", color: "success" };
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<DraggableProvider
|
|
85
|
+
dropZone={{type: "outline"}}
|
|
86
|
+
enableCrossContainerPreview
|
|
87
|
+
initialItems={data}
|
|
88
|
+
onDragEnd={(draggedItemId, finalContainer, originalContainer, itemAbove, itemBelow) => {
|
|
89
|
+
console.log(`Dragged Item ID: ${draggedItemId}`);
|
|
90
|
+
console.log(`Final Container: ${finalContainer}`);
|
|
91
|
+
console.log(`Original Container: ${originalContainer}`);
|
|
92
|
+
console.log('Item Above:', itemAbove);
|
|
93
|
+
console.log('Item Below:', itemBelow);
|
|
94
|
+
}}
|
|
95
|
+
onDrop={(draggedItemId, droppedContainer, originalContainer, item, itemAbove, itemBelow) => {
|
|
96
|
+
console.log(`Dragged Item ID: ${draggedItemId}`);
|
|
97
|
+
console.log(`Dropped Container: ${droppedContainer}`);
|
|
98
|
+
console.log(`Original Container: ${originalContainer}`);
|
|
99
|
+
console.log('Dropped Item:', item);
|
|
100
|
+
console.log('Item Above:', itemAbove);
|
|
101
|
+
console.log('Item Below:', itemBelow);
|
|
102
|
+
}}
|
|
103
|
+
onReorder={(items) => setInitialState(items)}
|
|
104
|
+
>
|
|
105
|
+
<Flex
|
|
106
|
+
justifyContent="center"
|
|
107
|
+
{...props}
|
|
108
|
+
>
|
|
109
|
+
{containers?.map((container) => (
|
|
110
|
+
<Draggable.Container
|
|
111
|
+
container={container}
|
|
112
|
+
htmlOptions={{style:{ width: "200px", height: "70vh"}}}
|
|
113
|
+
key={container}
|
|
114
|
+
padding="sm"
|
|
115
|
+
>
|
|
116
|
+
<Caption textAlign="center">{container}</Caption>
|
|
117
|
+
<Flex
|
|
118
|
+
alignItems="stretch"
|
|
119
|
+
gap="sm"
|
|
120
|
+
orientation="column"
|
|
121
|
+
>
|
|
122
|
+
{initialState
|
|
123
|
+
.filter((item) => item.container === container)
|
|
124
|
+
.map(
|
|
125
|
+
({
|
|
126
|
+
assignee_img,
|
|
127
|
+
assignee_name,
|
|
128
|
+
description,
|
|
129
|
+
id,
|
|
130
|
+
title,
|
|
131
|
+
}) => (
|
|
132
|
+
<Draggable.Item
|
|
133
|
+
container={container}
|
|
134
|
+
dragId={id}
|
|
135
|
+
key={id}
|
|
136
|
+
>
|
|
137
|
+
<Card
|
|
138
|
+
padding="sm"
|
|
139
|
+
{...props}
|
|
140
|
+
>
|
|
141
|
+
<Flex justify="between">
|
|
142
|
+
<FlexItem>
|
|
143
|
+
<Flex>
|
|
144
|
+
<Avatar
|
|
145
|
+
imageUrl={assignee_img}
|
|
146
|
+
name={assignee_name}
|
|
147
|
+
size="xxs"
|
|
148
|
+
/>
|
|
149
|
+
<Title paddingLeft="xs"
|
|
150
|
+
size={4}
|
|
151
|
+
text={title}
|
|
152
|
+
{...props}
|
|
153
|
+
/>
|
|
154
|
+
</Flex>
|
|
155
|
+
</FlexItem>
|
|
156
|
+
<Badge
|
|
157
|
+
marginLeft="sm"
|
|
158
|
+
rounded
|
|
159
|
+
text={badgeProperties(container).text}
|
|
160
|
+
variant={badgeProperties(container).color}
|
|
161
|
+
{...props}
|
|
162
|
+
/>
|
|
163
|
+
</Flex>
|
|
164
|
+
<Body paddingTop="xs"
|
|
165
|
+
text={description}
|
|
166
|
+
{...props}
|
|
167
|
+
/>
|
|
168
|
+
</Card>
|
|
169
|
+
</Draggable.Item>
|
|
170
|
+
)
|
|
171
|
+
)}
|
|
172
|
+
</Flex>
|
|
173
|
+
</Draggable.Container>
|
|
174
|
+
))}
|
|
175
|
+
</Flex>
|
|
176
|
+
</DraggableProvider>
|
|
177
|
+
);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export default DraggableMultipleContainersDropzone;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The multiple container functionality also supports customized dropzone styling as shown here.
|
|
2
|
+
|
|
3
|
+
In addition to this, the `enableCrossContainerPreview` prop can be used on the `DraggableProvider` as shown here to enable dropzone preview for cross-container dragging.
|
|
4
|
+
|
|
5
|
+
With `enableCrossContainerPreview`, the `onDrop` and `onDragEnd` event listeners will also provide several arguments to allow developers more context from the drag event.
|
|
6
|
+
|
|
7
|
+
The `onDrop` callback is triggered when an item is successfully dropped into a container. It provides the following arguments:
|
|
8
|
+
|
|
9
|
+
- `draggedItemId` - The ID of the item that was dragged
|
|
10
|
+
- `droppedContainer` - The container where the item was dropped
|
|
11
|
+
- `originalContainer` - The container where the drag started
|
|
12
|
+
- `item` - The complete item object with all properties (including the updated container)
|
|
13
|
+
- `itemAbove` - The item directly above the dropped item in the final position (null if at the top)
|
|
14
|
+
- `itemBelow` - The item directly below the dropped item in the final position (null if at the bottom)
|
|
15
|
+
|
|
16
|
+
The `onDragEnd` callback is triggered when a drag operation ends, whether it was dropped or cancelled. It provides the following arguments:
|
|
17
|
+
|
|
18
|
+
- `draggedItemId` - The ID of the item that was dragged
|
|
19
|
+
- `finalContainer` - The container where the item ended up (could be same as original if drag was cancelled)
|
|
20
|
+
- `originalContainer` - The container where the drag started
|
|
21
|
+
- `itemAbove` - The item directly above the dragged item in the final position (null if at the top)
|
|
22
|
+
- `itemBelow` - The item directly below the dragged item in the final position (null if at the bottom)
|
|
@@ -5,11 +5,12 @@ examples:
|
|
|
5
5
|
- draggable_with_selectable_list: Draggable with SelectableList Kit
|
|
6
6
|
- draggable_with_cards: Draggable with Cards
|
|
7
7
|
- draggable_with_table: Draggable with Table
|
|
8
|
-
- draggable_multiple_containers: Dragging Across Multiple Containers
|
|
9
8
|
- draggable_drop_zones: Draggable Drop Zones
|
|
10
9
|
- draggable_drop_zones_colors: Draggable Drop Zones Colors
|
|
11
10
|
- draggable_drop_zones_line: Draggable Drop Zones Line
|
|
12
11
|
- draggable_event_listeners: Draggable Event Listeners
|
|
12
|
+
- draggable_multiple_containers: Dragging Across Multiple Containers
|
|
13
|
+
- draggable_multiple_containers_dropzone: Dragging Across Multiple Containers with Dropzones
|
|
13
14
|
|
|
14
15
|
rails:
|
|
15
16
|
- draggable_default: Default
|
|
@@ -17,8 +18,8 @@ examples:
|
|
|
17
18
|
- draggable_with_selectable_list: Draggable with SelectableList Kit
|
|
18
19
|
- draggable_with_cards: Draggable with Cards
|
|
19
20
|
- draggable_with_table: Draggable with Table
|
|
20
|
-
- draggable_multiple_containers: Dragging Across Multiple Containers
|
|
21
21
|
- draggable_drop_zones: Draggable Drop Zones
|
|
22
22
|
- draggable_drop_zones_colors: Draggable Drop Zones Colors
|
|
23
23
|
- draggable_drop_zones_line: Draggable Drop Zones Line
|
|
24
24
|
- draggable_event_listeners: Draggable Event Listeners
|
|
25
|
+
- draggable_multiple_containers: Dragging Across Multiple Containers
|
|
@@ -7,4 +7,5 @@ export { default as DraggableWithTable } from './_draggable_with_table.jsx'
|
|
|
7
7
|
export { default as DraggableDropZones } from './_draggable_drop_zones.jsx'
|
|
8
8
|
export { default as DraggableDropZonesColors } from './_draggable_drop_zones_colors.jsx'
|
|
9
9
|
export { default as DraggableDropZonesLine } from './_draggable_drop_zones_line.jsx'
|
|
10
|
-
export { default as DraggableEventListeners } from './_draggable_event_listeners.jsx'
|
|
10
|
+
export { default as DraggableEventListeners } from './_draggable_event_listeners.jsx'
|
|
11
|
+
export { default as DraggableMultipleContainersDropzone } from './_draggable_multiple_containers_dropzone.jsx'
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import
|
|
2
|
+
import Card from '../../pb_card/_card'
|
|
3
|
+
import Caption from '../../pb_caption/_caption'
|
|
4
|
+
import FormPill from '../_form_pill'
|
|
5
|
+
import Typeahead from '../../pb_typeahead/_typeahead'
|
|
3
6
|
|
|
4
7
|
const names = [
|
|
5
8
|
{ label: 'Alexander Nathaniel Montgomery', value: 'Alexander Nathaniel Montgomery' },
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<%= pb_rails("caption", props: { text: "with all" }) %>
|
|
1
2
|
<%= pb_rails("home_address_street", props: {
|
|
2
3
|
address: "70 Prospect Ave",
|
|
3
4
|
address_cont: "Apt M18",
|
|
@@ -9,3 +10,126 @@
|
|
|
9
10
|
zipcode: "19382",
|
|
10
11
|
territory: "PHL",
|
|
11
12
|
}) %>
|
|
13
|
+
|
|
14
|
+
<%= pb_rails("caption", props: { margin_top: "sm", text: "First two lines blank: without address and address cont and housestyle" }) %>
|
|
15
|
+
<%= pb_rails("home_address_street", props: {
|
|
16
|
+
city: "West Chester",
|
|
17
|
+
home_id: 8250263,
|
|
18
|
+
home_url: "https://powerhrg.com/",
|
|
19
|
+
state: "PA",
|
|
20
|
+
zipcode: "19382",
|
|
21
|
+
territory: "PHL",
|
|
22
|
+
}) %>
|
|
23
|
+
|
|
24
|
+
<%= pb_rails("caption", props: { margin_top: "sm", text: "First line half blank Second line full: with housestyle and without address and address cont" }) %>
|
|
25
|
+
<%= pb_rails("home_address_street", props: {
|
|
26
|
+
city: "West Chester",
|
|
27
|
+
home_id: 8250263,
|
|
28
|
+
home_url: "https://powerhrg.com/",
|
|
29
|
+
house_style: "Colonial",
|
|
30
|
+
state: "PA",
|
|
31
|
+
zipcode: "19382",
|
|
32
|
+
territory: "PHL",
|
|
33
|
+
}) %>
|
|
34
|
+
|
|
35
|
+
<%= pb_rails("caption", props: { margin_top: "sm", text: "First line full Second line blank: with address and housestyle and without address cont" }) %>
|
|
36
|
+
<%= pb_rails("home_address_street", props: {
|
|
37
|
+
address: "70 Prospect Ave",
|
|
38
|
+
city: "West Chester",
|
|
39
|
+
home_id: 8250263,
|
|
40
|
+
home_url: "https://powerhrg.com/",
|
|
41
|
+
house_style: "Colonial",
|
|
42
|
+
state: "PA",
|
|
43
|
+
zipcode: "19382",
|
|
44
|
+
territory: "PHL",
|
|
45
|
+
}) %>
|
|
46
|
+
|
|
47
|
+
<%= pb_rails("caption", props: { margin_top: "sm", text: "First line half blank Second line full: without address and with housestyle and address cont" }) %>
|
|
48
|
+
<%= pb_rails("home_address_street", props: {
|
|
49
|
+
address_cont: "Apt M18",
|
|
50
|
+
city: "West Chester",
|
|
51
|
+
home_id: 8250263,
|
|
52
|
+
home_url: "https://powerhrg.com/",
|
|
53
|
+
house_style: "Colonial",
|
|
54
|
+
state: "PA",
|
|
55
|
+
zipcode: "19382",
|
|
56
|
+
territory: "PHL",
|
|
57
|
+
}) %>
|
|
58
|
+
|
|
59
|
+
<%= pb_rails("caption", props: { margin_top: "sm", text: "First line blank Second line full: with address cont and without address and housestyle" }) %>
|
|
60
|
+
<%= pb_rails("home_address_street", props: {
|
|
61
|
+
address_cont: "Apt M18",
|
|
62
|
+
city: "West Chester",
|
|
63
|
+
home_id: 8250263,
|
|
64
|
+
home_url: "https://powerhrg.com/",
|
|
65
|
+
state: "PA",
|
|
66
|
+
zipcode: "19382",
|
|
67
|
+
territory: "PHL",
|
|
68
|
+
}) %>
|
|
69
|
+
|
|
70
|
+
<%= pb_rails("caption", props: { margin_top: "sm", text: "Emphasis, Modified, Target and Formatted doc examples below" }) %>
|
|
71
|
+
<%= pb_rails("home_address_street", props: {
|
|
72
|
+
address: "70 Prospect Ave",
|
|
73
|
+
city: "West Chester",
|
|
74
|
+
emphasis: "none",
|
|
75
|
+
home_id: 8250263,
|
|
76
|
+
home_url: "https://powerhrg.com/",
|
|
77
|
+
house_style: "Colonial",
|
|
78
|
+
margin_bottom: "sm",
|
|
79
|
+
state: "PA",
|
|
80
|
+
zipcode: "19382",
|
|
81
|
+
territory: "PHL",
|
|
82
|
+
}) %>
|
|
83
|
+
|
|
84
|
+
<%= pb_rails("home_address_street", props: {
|
|
85
|
+
city: "West Chester",
|
|
86
|
+
emphasis: "city",
|
|
87
|
+
home_id: 8250263,
|
|
88
|
+
home_url: "https://powerhrg.com/",
|
|
89
|
+
margin_bottom: "sm",
|
|
90
|
+
state: "PA",
|
|
91
|
+
zipcode: "19382",
|
|
92
|
+
territory: "PHL",
|
|
93
|
+
}) %>
|
|
94
|
+
|
|
95
|
+
<%= pb_rails("home_address_street", props: {
|
|
96
|
+
city: "West Chester",
|
|
97
|
+
emphasis: "none",
|
|
98
|
+
home_id: 8250263,
|
|
99
|
+
home_url: "https://powerhrg.com/",
|
|
100
|
+
margin_bottom: "sm",
|
|
101
|
+
state: "PA",
|
|
102
|
+
zipcode: "19382",
|
|
103
|
+
territory: "PHL",
|
|
104
|
+
}) %>
|
|
105
|
+
|
|
106
|
+
<%= pb_rails("home_address_street", props: {
|
|
107
|
+
address: "70 Prospect Ave",
|
|
108
|
+
city: "West Chester",
|
|
109
|
+
margin_bottom: "sm",
|
|
110
|
+
state: "PA",
|
|
111
|
+
zipcode: "19382",
|
|
112
|
+
territory: "PHL",
|
|
113
|
+
}) %>
|
|
114
|
+
|
|
115
|
+
<%= pb_rails("home_address_street", props: {
|
|
116
|
+
city: "West Chester",
|
|
117
|
+
home_id: 8250263,
|
|
118
|
+
home_url: "https://powerhrg.com/",
|
|
119
|
+
margin_bottom: "sm",
|
|
120
|
+
state: "PA",
|
|
121
|
+
target: "_blank",
|
|
122
|
+
zipcode: "19382",
|
|
123
|
+
territory: "PHL",
|
|
124
|
+
}) %>
|
|
125
|
+
|
|
126
|
+
<%= pb_rails("home_address_street", props: {
|
|
127
|
+
address: "70 pRoSpEcT ave",
|
|
128
|
+
city: "West Chester",
|
|
129
|
+
home_id: 8250263,
|
|
130
|
+
home_url: "https://powerhrg.com/",
|
|
131
|
+
preserve_case: true,
|
|
132
|
+
state: "pa",
|
|
133
|
+
zipcode: "19382",
|
|
134
|
+
territory: "PHL",
|
|
135
|
+
}) %>
|
|
@@ -1,21 +1,156 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import HomeAddressStreet from '../_home_address_street'
|
|
4
|
+
import Caption from '../../pb_caption/_caption'
|
|
4
5
|
|
|
5
6
|
const HomeAddressStreetDefault = (props) => {
|
|
6
7
|
return (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
<>
|
|
9
|
+
<Caption text="with all" />
|
|
10
|
+
<HomeAddressStreet
|
|
11
|
+
address="70 Prospect Ave"
|
|
12
|
+
addressCont="Apt M18"
|
|
13
|
+
city="West Chester"
|
|
14
|
+
homeId="8250263"
|
|
15
|
+
homeUrl="https://powerhrg.com/"
|
|
16
|
+
houseStyle="Colonial"
|
|
17
|
+
state="PA"
|
|
18
|
+
territory="PHL"
|
|
19
|
+
zipcode="19382"
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
<Caption marginTop="sm"
|
|
23
|
+
text="First two lines blank: without address and address cont and housestyle"
|
|
24
|
+
/>
|
|
25
|
+
<HomeAddressStreet
|
|
26
|
+
city="West Chester"
|
|
27
|
+
homeId="8250263"
|
|
28
|
+
homeUrl="https://powerhrg.com/"
|
|
29
|
+
state="PA"
|
|
30
|
+
territory="PHL"
|
|
31
|
+
zipcode="19382"
|
|
32
|
+
{...props}
|
|
33
|
+
/>
|
|
34
|
+
<Caption marginTop="sm"
|
|
35
|
+
text="First line half blank Second line full: with housestyle and without address and address cont"
|
|
36
|
+
/>
|
|
37
|
+
<HomeAddressStreet
|
|
38
|
+
city="West Chester"
|
|
39
|
+
homeId="8250263"
|
|
40
|
+
homeUrl="https://powerhrg.com/"
|
|
41
|
+
houseStyle="Colonial"
|
|
42
|
+
state="PA"
|
|
43
|
+
territory="PHL"
|
|
44
|
+
zipcode="19382"
|
|
45
|
+
{...props}
|
|
46
|
+
/>
|
|
47
|
+
<Caption marginTop="sm"
|
|
48
|
+
text="First line full Second line blank: with address and housestyle and without address cont and address cont"
|
|
49
|
+
/>
|
|
50
|
+
<HomeAddressStreet
|
|
51
|
+
address="70 Prospect Ave"
|
|
52
|
+
city="West Chester"
|
|
53
|
+
homeId="8250263"
|
|
54
|
+
homeUrl="https://powerhrg.com/"
|
|
55
|
+
houseStyle="Colonial"
|
|
56
|
+
state="PA"
|
|
57
|
+
territory="PHL"
|
|
58
|
+
zipcode="19382"
|
|
59
|
+
{...props}
|
|
60
|
+
/>
|
|
61
|
+
<Caption marginTop="sm"
|
|
62
|
+
text="First line half blank Second line full: without address and with housestyle and address cont and address cont"
|
|
63
|
+
/>
|
|
64
|
+
<HomeAddressStreet
|
|
65
|
+
city="West Chester"
|
|
66
|
+
homeId="8250263"
|
|
67
|
+
homeUrl="https://powerhrg.com/"
|
|
68
|
+
houseStyle="Colonial"
|
|
69
|
+
state="PA"
|
|
70
|
+
territory="PHL"
|
|
71
|
+
zipcode="19382"
|
|
72
|
+
{...props}
|
|
73
|
+
/>
|
|
74
|
+
<Caption marginTop="sm"
|
|
75
|
+
text="First line blank Second line full: with address cont and without address and housestyle and address cont"
|
|
76
|
+
/>
|
|
77
|
+
<HomeAddressStreet
|
|
78
|
+
addressCont="Apt M18"
|
|
79
|
+
city="West Chester"
|
|
80
|
+
homeId="8250263"
|
|
81
|
+
homeUrl="https://powerhrg.com/"
|
|
82
|
+
state="PA"
|
|
83
|
+
territory="PHL"
|
|
84
|
+
zipcode="19382"
|
|
85
|
+
{...props}
|
|
86
|
+
/>
|
|
87
|
+
<Caption marginTop="sm"
|
|
88
|
+
text="Emphasis, Modified, Target and Formatted doc examples below and address cont"
|
|
89
|
+
/>
|
|
90
|
+
<HomeAddressStreet
|
|
91
|
+
address="70 Prospect Ave"
|
|
92
|
+
city="West Chester"
|
|
93
|
+
emphasis="none"
|
|
94
|
+
homeId="8250263"
|
|
95
|
+
homeUrl="https://powerhrg.com/"
|
|
96
|
+
houseStyle="Colonial"
|
|
97
|
+
marginBottom="sm"
|
|
98
|
+
state="PA"
|
|
99
|
+
territory="PHL"
|
|
100
|
+
zipcode="19382"
|
|
101
|
+
{...props}
|
|
102
|
+
/>
|
|
103
|
+
<HomeAddressStreet
|
|
104
|
+
city="West Chester"
|
|
105
|
+
emphasis="city"
|
|
106
|
+
homeId="8250263"
|
|
107
|
+
homeUrl="https://powerhrg.com/"
|
|
108
|
+
marginBottom="sm"
|
|
109
|
+
state="PA"
|
|
110
|
+
territory="PHL"
|
|
111
|
+
zipcode="19382"
|
|
112
|
+
{...props}
|
|
113
|
+
/>
|
|
114
|
+
<HomeAddressStreet
|
|
115
|
+
city="West Chester"
|
|
116
|
+
emphasis="none"
|
|
117
|
+
homeId="8250263"
|
|
118
|
+
homeUrl="https://powerhrg.com/"
|
|
119
|
+
marginBottom="sm"
|
|
120
|
+
state="PA"
|
|
121
|
+
territory="PHL"
|
|
122
|
+
zipcode="19382"
|
|
123
|
+
{...props}
|
|
124
|
+
/>
|
|
125
|
+
<HomeAddressStreet
|
|
126
|
+
address="70 Prospect Ave"
|
|
127
|
+
city="West Chester"
|
|
128
|
+
marginBottom="sm"
|
|
129
|
+
state="PA"
|
|
130
|
+
territory="PHL"
|
|
131
|
+
zipcode="19382"
|
|
132
|
+
/>
|
|
133
|
+
<HomeAddressStreet
|
|
134
|
+
city="West Chester"
|
|
135
|
+
homeId={8250263}
|
|
136
|
+
homeUrl="https://powerhrg.com/"
|
|
137
|
+
marginBottom="sm"
|
|
138
|
+
state="PA"
|
|
139
|
+
target="_blank"
|
|
140
|
+
territory="PHL"
|
|
141
|
+
zipcode="19382"
|
|
142
|
+
/>
|
|
143
|
+
<HomeAddressStreet
|
|
144
|
+
address="70 pRoSpEcT ave"
|
|
145
|
+
city="West Chester"
|
|
146
|
+
homeId="8250263"
|
|
147
|
+
homeUrl="https://powerhrg.com/"
|
|
148
|
+
preserveCase
|
|
149
|
+
state="pa"
|
|
150
|
+
territory="PHL"
|
|
151
|
+
zipcode="19382"
|
|
152
|
+
/>
|
|
153
|
+
</>
|
|
19
154
|
)
|
|
20
155
|
}
|
|
21
156
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<%= pb_rails("caption", props: { margin_bottom: "sm", text: "Default Variant" }) %>
|
|
2
|
+
<%= pb_rails("nav", props: { orientation: "horizontal" }) do %>
|
|
3
|
+
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
4
|
+
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
5
|
+
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
6
|
+
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
7
|
+
<% end %>
|
|
8
|
+
<%= pb_rails("caption", props: { margin_bottom: "sm", margin_top:"lg", text: "Subtle Variant" }) %>
|
|
9
|
+
<%= pb_rails("nav", props: { orientation: "horizontal", variant: "subtle" }) do %>
|
|
10
|
+
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
11
|
+
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
12
|
+
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
13
|
+
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
14
|
+
<% end %>
|
|
15
|
+
<%= pb_rails("caption", props: { margin_bottom: "sm", margin_top:"lg", text: "Bold Variant" }) %>
|
|
16
|
+
<%= pb_rails("nav", props: { orientation: "horizontal", variant: "bold" }) do %>
|
|
17
|
+
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
18
|
+
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
19
|
+
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
20
|
+
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
21
|
+
<% end %>
|