playbook_ui 15.6.0.pre.alpha.play265012865 → 15.6.0.pre.rc.0
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_table_props.html.erb +163 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +190 -0
- data/app/pb_kits/playbook/pb_background/_background.tsx +6 -6
- data/app/pb_kits/playbook/pb_background/background.test.js +1 -5
- data/app/pb_kits/playbook/pb_background/docs/_background_light.html.erb +1 -1
- data/app/pb_kits/playbook/pb_background/docs/_background_light.jsx +1 -0
- data/app/pb_kits/playbook/pb_background/docs/example.yml +2 -2
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +0 -6
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb +0 -31
- data/app/pb_kits/playbook/pb_draggable/context/index.tsx +6 -156
- data/app/pb_kits/playbook/pb_draggable/context/types.ts +3 -8
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +2 -3
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +1 -77
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +4 -4
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +22 -34
- data/app/pb_kits/playbook/pb_home_address_street/city_emphasis.html.erb +12 -16
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.html.erb +12 -16
- data/app/pb_kits/playbook/pb_home_address_street/street_emphasis.html.erb +12 -16
- data/app/pb_kits/playbook/pb_legend/_legend.tsx +1 -7
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +0 -10
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +15 -66
- data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_multiple_users/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_multiple_users/multiple_users.test.js +0 -25
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +10 -44
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb +4 -34
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +7 -16
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +0 -15
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +0 -3
- data/app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.tsx +2 -13
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -6
- data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx +7 -34
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -6
- data/dist/chunks/_typeahead-kRdz5zPn.js +6 -0
- data/dist/chunks/vendor.js +2 -2
- data/dist/menu.yml +2 -3
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +2 -2
- metadata +3 -13
- data/app/pb_kits/playbook/pb_background/docs/_background_light.md +0 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_dropzone.jsx +0 -180
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_dropzone.md +0 -22
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.jsx +0 -42
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.md +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.html.erb +0 -30
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.jsx +0 -37
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.md +0 -3
- data/app/pb_kits/playbook/utilities/DEPRECATION_WARNINGS.md +0 -82
- data/app/pb_kits/playbook/utilities/deprecated.ts +0 -65
- data/dist/chunks/_typeahead-Mjy3POtc.js +0 -6
|
@@ -39,59 +39,6 @@ const reducer = (state: InitialStateType, action: ActionType) => {
|
|
|
39
39
|
|
|
40
40
|
return { ...state, items: newItems };
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
// Used only when enableCrossContainerPreview is true
|
|
44
|
-
case "REORDER_ITEMS_CROSS_CONTAINER": {
|
|
45
|
-
const { dragId, targetId, newContainer } = action.payload;
|
|
46
|
-
const newItems = [...state.items];
|
|
47
|
-
const draggedItem = newItems.find((item) => item && item.id === dragId);
|
|
48
|
-
|
|
49
|
-
if (!draggedItem) return state;
|
|
50
|
-
|
|
51
|
-
const draggedIndex = newItems.indexOf(draggedItem);
|
|
52
|
-
const targetIndex = newItems.findIndex(
|
|
53
|
-
(item) => item && item.id === targetId
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
if (draggedIndex === -1 || targetIndex === -1) return state;
|
|
57
|
-
|
|
58
|
-
const updatedItem = { ...draggedItem, container: newContainer };
|
|
59
|
-
newItems.splice(draggedIndex, 1);
|
|
60
|
-
newItems.splice(targetIndex, 0, updatedItem);
|
|
61
|
-
|
|
62
|
-
return { ...state, items: newItems };
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Used only when enableCrossContainerPreview is true
|
|
66
|
-
case "MOVE_TO_CONTAINER_END": {
|
|
67
|
-
const { dragId, newContainer } = action.payload;
|
|
68
|
-
const newItems = [...state.items];
|
|
69
|
-
const draggedItem = newItems.find((item) => item && item.id === dragId);
|
|
70
|
-
|
|
71
|
-
if (!draggedItem) return state;
|
|
72
|
-
|
|
73
|
-
const draggedIndex = newItems.indexOf(draggedItem);
|
|
74
|
-
if (draggedIndex === -1) return state;
|
|
75
|
-
|
|
76
|
-
const updatedItem = { ...draggedItem, container: newContainer };
|
|
77
|
-
|
|
78
|
-
// Remove from current position
|
|
79
|
-
newItems.splice(draggedIndex, 1);
|
|
80
|
-
|
|
81
|
-
// Insert at end of target container
|
|
82
|
-
const lastIndexInContainer = newItems
|
|
83
|
-
.map((item) => item && item.container)
|
|
84
|
-
.lastIndexOf(newContainer);
|
|
85
|
-
|
|
86
|
-
if (lastIndexInContainer === -1) {
|
|
87
|
-
newItems.push(updatedItem);
|
|
88
|
-
} else {
|
|
89
|
-
newItems.splice(lastIndexInContainer + 1, 0, updatedItem);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return { ...state, items: newItems };
|
|
93
|
-
}
|
|
94
|
-
|
|
95
42
|
default:
|
|
96
43
|
return state;
|
|
97
44
|
}
|
|
@@ -114,9 +61,7 @@ export const DraggableProvider = ({
|
|
|
114
61
|
onDrop,
|
|
115
62
|
onDragOver,
|
|
116
63
|
dropZone = { type: 'ghost', color: 'neutral', direction: 'vertical' },
|
|
117
|
-
providerId = 'default', // fallback provided for backward compatibility
|
|
118
|
-
// Opt-in flag for cross-container preview
|
|
119
|
-
enableCrossContainerPreview = false,
|
|
64
|
+
providerId = 'default', // fallback provided for backward compatibility, so this does not become a required prop
|
|
120
65
|
}: DraggableProviderType) => {
|
|
121
66
|
const [state, dispatch] = useReducer(reducer, initialState);
|
|
122
67
|
|
|
@@ -158,74 +103,17 @@ export const DraggableProvider = ({
|
|
|
158
103
|
if (state.dragData.originId !== providerId) return; // Ignore drag events from other providers
|
|
159
104
|
|
|
160
105
|
if (state.dragData.id !== id) {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
const draggedItem = state.items.find(
|
|
164
|
-
(item) => item && item.id === state.dragData.id
|
|
165
|
-
);
|
|
166
|
-
const currentContainer =
|
|
167
|
-
draggedItem && draggedItem.container
|
|
168
|
-
? draggedItem.container
|
|
169
|
-
: state.dragData.initialGroup;
|
|
170
|
-
|
|
171
|
-
const isCrossContainer =
|
|
172
|
-
currentContainer !== container &&
|
|
173
|
-
(currentContainer !== undefined || container !== undefined);
|
|
174
|
-
|
|
175
|
-
if (isCrossContainer) {
|
|
176
|
-
dispatch({
|
|
177
|
-
type: "REORDER_ITEMS_CROSS_CONTAINER",
|
|
178
|
-
payload: {
|
|
179
|
-
dragId: state.dragData.id,
|
|
180
|
-
targetId: id,
|
|
181
|
-
newContainer: container,
|
|
182
|
-
},
|
|
183
|
-
});
|
|
184
|
-
} else {
|
|
185
|
-
// Same container: keep original behavior
|
|
186
|
-
dispatch({
|
|
187
|
-
type: "REORDER_ITEMS",
|
|
188
|
-
payload: { dragId: state.dragData.id, targetId: id },
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
} else {
|
|
192
|
-
// Original behavior (no preview across containers)
|
|
193
|
-
dispatch({type: "REORDER_ITEMS", payload: { dragId: state.dragData.id, targetId: id }});
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
dispatch({type: "SET_DRAG_DATA",payload: {id: state.dragData.id, initialGroup: container, originId: providerId}});
|
|
106
|
+
dispatch({ type: 'REORDER_ITEMS', payload: { dragId: state.dragData.id, targetId: id } });
|
|
107
|
+
dispatch({ type: 'SET_DRAG_DATA', payload: { id: state.dragData.id, initialGroup: container, originId: providerId } });
|
|
197
108
|
}
|
|
198
109
|
if (onDragEnter) onDragEnter(id, container);
|
|
199
110
|
};
|
|
200
111
|
|
|
201
112
|
const handleDragEnd = () => {
|
|
202
|
-
const draggedItemId = state.dragData.id;
|
|
203
|
-
const originalContainer = state.dragData.initialGroup;
|
|
204
|
-
|
|
205
113
|
dispatch({ type: 'SET_IS_DRAGGING', payload: "" });
|
|
206
114
|
dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: "" });
|
|
207
115
|
dispatch({ type: 'SET_DRAG_DATA', payload: { id: "", initialGroup: "", originId: "" } });
|
|
208
|
-
if (onDragEnd)
|
|
209
|
-
if (!enableCrossContainerPreview) {
|
|
210
|
-
onDragEnd();
|
|
211
|
-
} else {
|
|
212
|
-
const draggedItem = state.items.find(item => item && item.id === draggedItemId);
|
|
213
|
-
const finalContainer = draggedItem ? draggedItem.container : originalContainer;
|
|
214
|
-
|
|
215
|
-
const itemsInContainer = state.items.filter(item => item && item.container === finalContainer);
|
|
216
|
-
const indexInContainer = itemsInContainer.findIndex(item => item && item.id === draggedItemId);
|
|
217
|
-
const itemAbove = indexInContainer > 0 ? itemsInContainer[indexInContainer - 1] : null;
|
|
218
|
-
const itemBelow = indexInContainer < itemsInContainer.length - 1 ? itemsInContainer[indexInContainer + 1] : null;
|
|
219
|
-
|
|
220
|
-
onDragEnd(
|
|
221
|
-
draggedItemId,
|
|
222
|
-
finalContainer,
|
|
223
|
-
originalContainer,
|
|
224
|
-
itemAbove,
|
|
225
|
-
itemBelow
|
|
226
|
-
);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
116
|
+
if (onDragEnd) onDragEnd();
|
|
229
117
|
};
|
|
230
118
|
|
|
231
119
|
const changeCategory = (itemId: string, container: string) => {
|
|
@@ -235,34 +123,10 @@ export const DraggableProvider = ({
|
|
|
235
123
|
const handleDrop = (container: string) => {
|
|
236
124
|
if (state.dragData.originId !== providerId) return; // Ignore drop events from other providers
|
|
237
125
|
|
|
238
|
-
const draggedItemId = state.dragData.id;
|
|
239
|
-
const originalContainer = state.dragData.initialGroup;
|
|
240
|
-
|
|
241
126
|
dispatch({ type: 'SET_IS_DRAGGING', payload: "" });
|
|
242
127
|
dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: "" });
|
|
243
128
|
changeCategory(state.dragData.id, container);
|
|
244
|
-
if (onDrop)
|
|
245
|
-
if (!enableCrossContainerPreview) {
|
|
246
|
-
onDrop(container);
|
|
247
|
-
} else {
|
|
248
|
-
const draggedItem = state.items.find(item => item && item.id === draggedItemId);
|
|
249
|
-
const updatedItem = draggedItem ? { ...draggedItem, container } : null;
|
|
250
|
-
|
|
251
|
-
const itemsInContainer = state.items.filter(item => item && item.container === container);
|
|
252
|
-
const indexInContainer = itemsInContainer.findIndex(item => item && item.id === draggedItemId);
|
|
253
|
-
const itemAbove = indexInContainer > 0 ? itemsInContainer[indexInContainer - 1] : null;
|
|
254
|
-
const itemBelow = indexInContainer < itemsInContainer.length - 1 ? itemsInContainer[indexInContainer + 1] : null;
|
|
255
|
-
|
|
256
|
-
onDrop(
|
|
257
|
-
draggedItemId,
|
|
258
|
-
container,
|
|
259
|
-
originalContainer,
|
|
260
|
-
updatedItem,
|
|
261
|
-
itemAbove,
|
|
262
|
-
itemBelow
|
|
263
|
-
);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
129
|
+
if (onDrop) onDrop(container);
|
|
266
130
|
};
|
|
267
131
|
|
|
268
132
|
const handleDragOver = (e: Event, container: string) => {
|
|
@@ -270,20 +134,6 @@ export const DraggableProvider = ({
|
|
|
270
134
|
|
|
271
135
|
e.preventDefault();
|
|
272
136
|
dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: container });
|
|
273
|
-
|
|
274
|
-
if (enableCrossContainerPreview && state.dragData.id) {
|
|
275
|
-
// Only when enableCrossContainerPreview is true: when hovering over a different container, move item to end
|
|
276
|
-
const draggedItem = state.items.find(
|
|
277
|
-
(item) => item && item.id === state.dragData.id
|
|
278
|
-
);
|
|
279
|
-
if (draggedItem && draggedItem.container !== container) {
|
|
280
|
-
dispatch({
|
|
281
|
-
type: "MOVE_TO_CONTAINER_END",
|
|
282
|
-
payload: { dragId: state.dragData.id, newContainer: container },
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
137
|
if (onDragOver) onDragOver(e, container);
|
|
288
138
|
};
|
|
289
139
|
|
|
@@ -307,4 +157,4 @@ export const DraggableProvider = ({
|
|
|
307
157
|
return (
|
|
308
158
|
<DragContext.Provider value={contextValue}>{children}</DragContext.Provider>
|
|
309
159
|
);
|
|
310
|
-
};
|
|
160
|
+
};
|
|
@@ -18,12 +18,8 @@ export type ActionType =
|
|
|
18
18
|
} }
|
|
19
19
|
| { type: 'SET_IS_DRAGGING'; payload: string }
|
|
20
20
|
| { type: 'SET_ACTIVE_CONTAINER'; payload: string }
|
|
21
|
-
| { type: 'SET_CROSS_CONTAINER_PREVIEW'; payload: boolean }
|
|
22
21
|
| { type: 'CHANGE_CATEGORY'; payload: { itemId: string; container: string } }
|
|
23
|
-
| { type: 'REORDER_ITEMS'; payload: { dragId: string; targetId: string } }
|
|
24
|
-
| { type: 'REORDER_ITEMS_CROSS_CONTAINER'; payload: { dragId: string; targetId: string; newContainer: string } }
|
|
25
|
-
| { type: 'MOVE_TO_CONTAINER_END'; payload: { dragId: string; newContainer: string } }
|
|
26
|
-
| { type: 'RESET_DRAG_CONTAINER'; payload: { itemId: string; originalContainer: string } };
|
|
22
|
+
| { type: 'REORDER_ITEMS'; payload: { dragId: string; targetId: string } };
|
|
27
23
|
|
|
28
24
|
export interface DropZoneConfig {
|
|
29
25
|
type?: 'ghost' | 'outline' | 'shadow' | 'line';
|
|
@@ -37,10 +33,9 @@ export type ActionType =
|
|
|
37
33
|
onReorder: (items: ItemType[]) => void;
|
|
38
34
|
onDragStart?: (id: string, container: string) => void;
|
|
39
35
|
onDragEnter?: (id: string, container: string) => void;
|
|
40
|
-
onDragEnd?: (
|
|
41
|
-
onDrop?: (
|
|
36
|
+
onDragEnd?: () => void;
|
|
37
|
+
onDrop?: (container: string) => void;
|
|
42
38
|
onDragOver?: (e: Event, container: string) => void;
|
|
43
39
|
dropZone?: DropZoneConfig | string; // Can accept string for backward compatibility
|
|
44
40
|
providerId?: string;
|
|
45
|
-
enableCrossContainerPreview?: boolean;
|
|
46
41
|
}
|
|
@@ -5,12 +5,11 @@ 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
|
|
8
9
|
- draggable_drop_zones: Draggable Drop Zones
|
|
9
10
|
- draggable_drop_zones_colors: Draggable Drop Zones Colors
|
|
10
11
|
- draggable_drop_zones_line: Draggable Drop Zones Line
|
|
11
12
|
- 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
|
|
14
13
|
|
|
15
14
|
rails:
|
|
16
15
|
- draggable_default: Default
|
|
@@ -18,8 +17,8 @@ examples:
|
|
|
18
17
|
- draggable_with_selectable_list: Draggable with SelectableList Kit
|
|
19
18
|
- draggable_with_cards: Draggable with Cards
|
|
20
19
|
- 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,5 +7,4 @@ 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'
|
|
11
|
-
export { default as DraggableMultipleContainersDropzone } from './_draggable_multiple_containers_dropzone.jsx'
|
|
10
|
+
export { default as DraggableEventListeners } from './_draggable_event_listeners.jsx'
|
|
@@ -255,80 +255,4 @@ test("line dropZone with horizontal direction applies 'line_horizontal' class to
|
|
|
255
255
|
const container = kit.querySelector(".pb_draggable_container");
|
|
256
256
|
|
|
257
257
|
expect(container).toHaveClass("line_horizontal");
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
// Cross-container drag tests
|
|
261
|
-
const multiContainerData = [
|
|
262
|
-
{ id: "1", container: "To Do", text: "Task 1" },
|
|
263
|
-
{ id: "2", container: "To Do", text: "Task 2" },
|
|
264
|
-
{ id: "3", container: "In Progress", text: "Task 3" },
|
|
265
|
-
{ id: "4", container: "Done", text: "Task 4" },
|
|
266
|
-
];
|
|
267
|
-
|
|
268
|
-
const containers = ["To Do", "In Progress", "Done"];
|
|
269
|
-
|
|
270
|
-
const DraggableMultipleContainers = () => {
|
|
271
|
-
const [initialState, setInitialState] = useState(multiContainerData);
|
|
272
|
-
|
|
273
|
-
return (
|
|
274
|
-
<div data-testid={testId}>
|
|
275
|
-
<DraggableProvider
|
|
276
|
-
dropZone={{ type: "outline" }}
|
|
277
|
-
initialItems={multiContainerData}
|
|
278
|
-
onReorder={(items) => setInitialState(items)}
|
|
279
|
-
>
|
|
280
|
-
{containers.map((container) => (
|
|
281
|
-
<Draggable.Container
|
|
282
|
-
container={container}
|
|
283
|
-
data={{testid:`container-${container}`}}
|
|
284
|
-
key={container}
|
|
285
|
-
>
|
|
286
|
-
{initialState
|
|
287
|
-
.filter((item) => item.container === container)
|
|
288
|
-
.map(({ id, text }) => (
|
|
289
|
-
<Draggable.Item
|
|
290
|
-
container={container}
|
|
291
|
-
data-testid={`item-${id}`}
|
|
292
|
-
dragId={id}
|
|
293
|
-
key={id}
|
|
294
|
-
>
|
|
295
|
-
{text}
|
|
296
|
-
</Draggable.Item>
|
|
297
|
-
))}
|
|
298
|
-
</Draggable.Container>
|
|
299
|
-
))}
|
|
300
|
-
</DraggableProvider>
|
|
301
|
-
</div>
|
|
302
|
-
);
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
test("renders multiple containers with correct items", () => {
|
|
306
|
-
render(<DraggableMultipleContainers />);
|
|
307
|
-
|
|
308
|
-
const kit = screen.getByTestId(testId);
|
|
309
|
-
expect(kit).toBeInTheDocument();
|
|
310
|
-
|
|
311
|
-
containers.forEach((container) => {
|
|
312
|
-
const containerEl = kit.querySelector(`[data-testid="container-${container}"]`);
|
|
313
|
-
expect(containerEl).toBeInTheDocument();
|
|
314
|
-
});
|
|
315
|
-
|
|
316
|
-
// Check items are in correct containers
|
|
317
|
-
expect(screen.getByText("Task 1")).toBeInTheDocument();
|
|
318
|
-
expect(screen.getByText("Task 2")).toBeInTheDocument();
|
|
319
|
-
expect(screen.getByText("Task 3")).toBeInTheDocument();
|
|
320
|
-
expect(screen.getByText("Task 4")).toBeInTheDocument();
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
test("items have correct container association", () => {
|
|
324
|
-
const { container } = render(<DraggableMultipleContainers />);
|
|
325
|
-
|
|
326
|
-
// items rendered within their respective containers
|
|
327
|
-
const todoContainer = container.querySelector('[data-testid="container-To Do"]');
|
|
328
|
-
const inProgressContainer = container.querySelector('[data-testid="container-In Progress"]');
|
|
329
|
-
const doneContainer = container.querySelector('[data-testid="container-Done"]');
|
|
330
|
-
|
|
331
|
-
expect(todoContainer.querySelectorAll('.pb_draggable_item')).toHaveLength(2);
|
|
332
|
-
expect(inProgressContainer.querySelectorAll('.pb_draggable_item')).toHaveLength(1);
|
|
333
|
-
expect(doneContainer.querySelectorAll('.pb_draggable_item')).toHaveLength(1);
|
|
334
|
-
})
|
|
258
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.pb_file_upload_kit {
|
|
2
|
-
.
|
|
2
|
+
.pb_card_kit_deselected_border_radius_md {
|
|
3
3
|
border: 1px #ccc dashed;
|
|
4
4
|
text-align: center;
|
|
5
5
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
&.error,
|
|
13
13
|
&.pb_file_upload_kit_error {
|
|
14
|
-
.
|
|
14
|
+
.pb_card_kit_deselected_border_radius_md {
|
|
15
15
|
border-color: $error;
|
|
16
16
|
}
|
|
17
17
|
.pb_body_kit_negative {
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.dark .pb_file_upload_kit {
|
|
33
|
-
.
|
|
33
|
+
.pb_card_kit_deselected_border_radius_md {
|
|
34
34
|
border: 1px $text_dk_lighter dashed;
|
|
35
35
|
}
|
|
36
36
|
&.error,
|
|
37
37
|
&.pb_file_upload_kit_error {
|
|
38
|
-
.
|
|
38
|
+
.pb_card_kit_deselected_border_radius_md {
|
|
39
39
|
border-color: $error_dark;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -96,24 +96,20 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
|
|
|
96
96
|
{hasAllEmptyProps && '—'}
|
|
97
97
|
{emphasis == 'street' && !hasAllEmptyProps &&
|
|
98
98
|
<div>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
>
|
|
114
|
-
{titleize(addressCont)}
|
|
115
|
-
</Title>
|
|
116
|
-
)}
|
|
99
|
+
<Title
|
|
100
|
+
className="pb_home_address_street_address"
|
|
101
|
+
dark={dark}
|
|
102
|
+
size={4}
|
|
103
|
+
>
|
|
104
|
+
{joinPresent([formatStreetAdr(address), houseStyle], ' · ')}
|
|
105
|
+
</Title>
|
|
106
|
+
<Title
|
|
107
|
+
className="pb_home_address_street_address"
|
|
108
|
+
dark={dark}
|
|
109
|
+
size={4}
|
|
110
|
+
>
|
|
111
|
+
{titleize(addressCont)}
|
|
112
|
+
</Title>
|
|
117
113
|
<Body color="light">
|
|
118
114
|
{`${city ? `${titleize(city)}, ` : ''}${uppercaseState}${zipcode ? ` ${zipcode}` : ''}`}
|
|
119
115
|
</Body>
|
|
@@ -121,14 +117,10 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
|
|
|
121
117
|
}
|
|
122
118
|
{emphasis == 'city' && !hasAllEmptyProps &&
|
|
123
119
|
<div>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
)}
|
|
129
|
-
{addressCont && (
|
|
130
|
-
<Body color="light">{titleize(addressCont)}</Body>
|
|
131
|
-
)}
|
|
120
|
+
<Body color="light">
|
|
121
|
+
{joinPresent([formatStreetAdr(address), houseStyle], ' · ')}
|
|
122
|
+
</Body>
|
|
123
|
+
<Body color="light">{titleize(addressCont)}</Body>
|
|
132
124
|
<div>
|
|
133
125
|
<Title
|
|
134
126
|
className="pb_home_address_street_address"
|
|
@@ -149,14 +141,10 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
|
|
|
149
141
|
}
|
|
150
142
|
{emphasis == 'none' && !hasAllEmptyProps &&
|
|
151
143
|
<div>
|
|
152
|
-
{
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
)}
|
|
157
|
-
{addressCont && (
|
|
158
|
-
<Body dark={dark}>{formatStreetAdr(addressCont)}</Body>
|
|
159
|
-
)}
|
|
144
|
+
<Body dark={dark}>
|
|
145
|
+
{joinPresent([formatStreetAdr(address), houseStyle], ' · ')}
|
|
146
|
+
</Body>
|
|
147
|
+
<Body dark={dark}>{formatStreetAdr(addressCont)}</Body>
|
|
160
148
|
<div>
|
|
161
149
|
<Body
|
|
162
150
|
color="light"
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
text: object.address_house_style2,
|
|
14
|
-
dark: object.dark
|
|
15
|
-
} %>
|
|
16
|
-
<% end %>
|
|
1
|
+
<%= pb_rails "body", props: {
|
|
2
|
+
classname: "pb_home_address_street_address",
|
|
3
|
+
color: "light",
|
|
4
|
+
text: object.address_house_style,
|
|
5
|
+
dark: object.dark
|
|
6
|
+
} %>
|
|
7
|
+
<%= pb_rails "body", props: {
|
|
8
|
+
classname: "pb_home_address_street_address",
|
|
9
|
+
color: "light",
|
|
10
|
+
text: object.address_house_style2,
|
|
11
|
+
dark: object.dark
|
|
12
|
+
} %>
|
|
17
13
|
<div>
|
|
18
14
|
<%= pb_rails "title", props: {
|
|
19
15
|
tag: "span",
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
text: object.address_house_style2,
|
|
14
|
-
dark: object.dark
|
|
15
|
-
} %>
|
|
16
|
-
<% end %>
|
|
1
|
+
<%= pb_rails "body", props: {
|
|
2
|
+
classname: "pb_home_address_street_address",
|
|
3
|
+
size: 4,
|
|
4
|
+
text: object.address_house_style,
|
|
5
|
+
dark: object.dark
|
|
6
|
+
} %>
|
|
7
|
+
<%= pb_rails "body", props: {
|
|
8
|
+
classname: "pb_home_address_street_address",
|
|
9
|
+
size: 4,
|
|
10
|
+
text: object.address_house_style2,
|
|
11
|
+
dark: object.dark
|
|
12
|
+
} %>
|
|
17
13
|
<%= pb_rails "body", props: {
|
|
18
14
|
color: "light",
|
|
19
15
|
text: object.city_state_zip,
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
text: object.address_house_style2,
|
|
14
|
-
dark: object.dark
|
|
15
|
-
} %>
|
|
16
|
-
<% end %>
|
|
1
|
+
<%= pb_rails "title", props: {
|
|
2
|
+
classname: "pb_home_address_street_address",
|
|
3
|
+
size: 4,
|
|
4
|
+
text: object.address_house_style,
|
|
5
|
+
dark: object.dark
|
|
6
|
+
} %>
|
|
7
|
+
<%= pb_rails "title", props: {
|
|
8
|
+
classname: "pb_home_address_street_address",
|
|
9
|
+
size: 4,
|
|
10
|
+
text: object.address_house_style2,
|
|
11
|
+
dark: object.dark
|
|
12
|
+
} %>
|
|
17
13
|
<%= pb_rails "body", props: {
|
|
18
14
|
color: "light",
|
|
19
15
|
text: object.city_state_zip,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react'
|
|
2
2
|
import classnames from 'classnames'
|
|
3
3
|
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
|
5
5
|
import { globalProps } from '../utilities/globalProps'
|
|
6
|
-
import { deprecatedKitWarning } from '../utilities/deprecated'
|
|
7
6
|
|
|
8
7
|
import Body from '../pb_body/_body'
|
|
9
8
|
import Title from '../pb_title/_title'
|
|
@@ -33,11 +32,6 @@ const Legend = (props: LegendProps) => {
|
|
|
33
32
|
text,
|
|
34
33
|
} = props
|
|
35
34
|
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
console.log('TESTING ------------------------')
|
|
38
|
-
deprecatedKitWarning('Legend')
|
|
39
|
-
}, [])
|
|
40
|
-
|
|
41
35
|
const ariaProps = buildAriaProps(aria)
|
|
42
36
|
const dataProps = buildDataProps(data)
|
|
43
37
|
const htmlProps = buildHtmlProps(htmlOptions)
|
|
@@ -36,16 +36,6 @@ $pb_multiple_users_size_xxs: map-get($avatar-sizes, "xxs");
|
|
|
36
36
|
height: $pb_multiple_users_size_xxs;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
.user_tooltip {
|
|
41
|
-
margin-left: $pb_multiple_users_overlap !important;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.user_count_tooltip {
|
|
45
|
-
margin-left: $pb_multiple_users_overlap !important;
|
|
46
|
-
position: relative;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
39
|
.pb_multiple_users_item {
|
|
50
40
|
margin-left: $pb_multiple_users_overlap;
|
|
51
41
|
margin-right: 0;
|