@dartcom/ui-kit 2.6.0 → 2.7.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.
Files changed (60) hide show
  1. package/dist/cjs/components/drag-list/drag-list.js +30 -0
  2. package/dist/cjs/components/drag-list/drag-list.js.map +1 -0
  3. package/dist/cjs/components/drag-list/draggable/draggable.js +33 -0
  4. package/dist/cjs/components/drag-list/draggable/draggable.js.map +1 -0
  5. package/dist/cjs/components/list/list.js +3 -4
  6. package/dist/cjs/components/list/list.js.map +1 -1
  7. package/dist/cjs/index.js +2 -0
  8. package/dist/cjs/index.js.map +1 -1
  9. package/dist/cjs/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +71 -0
  10. package/dist/cjs/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js.map +1 -0
  11. package/dist/cjs/node_modules/@dnd-kit/core/dist/core.esm.js +3467 -0
  12. package/dist/cjs/node_modules/@dnd-kit/core/dist/core.esm.js.map +1 -0
  13. package/dist/cjs/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +541 -0
  14. package/dist/cjs/node_modules/@dnd-kit/sortable/dist/sortable.esm.js.map +1 -0
  15. package/dist/cjs/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +361 -0
  16. package/dist/cjs/node_modules/@dnd-kit/utilities/dist/utilities.esm.js.map +1 -0
  17. package/dist/esm/components/drag-list/drag-list.js +2 -0
  18. package/dist/esm/components/drag-list/drag-list.js.map +1 -0
  19. package/dist/esm/components/drag-list/draggable/draggable.js +2 -0
  20. package/dist/esm/components/drag-list/draggable/draggable.js.map +1 -0
  21. package/dist/esm/components/list/list.js +1 -1
  22. package/dist/esm/components/list/list.js.map +1 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/esm/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +2 -0
  25. package/dist/esm/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js.map +1 -0
  26. package/dist/esm/node_modules/@dnd-kit/core/dist/core.esm.js +2 -0
  27. package/dist/esm/node_modules/@dnd-kit/core/dist/core.esm.js.map +1 -0
  28. package/dist/esm/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +2 -0
  29. package/dist/esm/node_modules/@dnd-kit/sortable/dist/sortable.esm.js.map +1 -0
  30. package/dist/esm/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +2 -0
  31. package/dist/esm/node_modules/@dnd-kit/utilities/dist/utilities.esm.js.map +1 -0
  32. package/dist/esm/types/components/checkbox/checkbox.stories.d.ts.map +1 -1
  33. package/dist/esm/types/components/drag-list/drag-list.d.ts +4 -0
  34. package/dist/esm/types/components/drag-list/drag-list.d.ts.map +1 -0
  35. package/dist/esm/types/components/drag-list/drag-list.stories.d.ts +8 -0
  36. package/dist/esm/types/components/drag-list/drag-list.stories.d.ts.map +1 -0
  37. package/dist/esm/types/components/drag-list/draggable/draggable.d.ts +5 -0
  38. package/dist/esm/types/components/drag-list/draggable/draggable.d.ts.map +1 -0
  39. package/dist/esm/types/components/drag-list/draggable/index.d.ts +2 -0
  40. package/dist/esm/types/components/drag-list/draggable/index.d.ts.map +1 -0
  41. package/dist/esm/types/components/drag-list/draggable/types.d.ts +10 -0
  42. package/dist/esm/types/components/drag-list/draggable/types.d.ts.map +1 -0
  43. package/dist/esm/types/components/drag-list/droppable/droppable.d.ts +5 -0
  44. package/dist/esm/types/components/drag-list/droppable/droppable.d.ts.map +1 -0
  45. package/dist/esm/types/components/drag-list/droppable/index.d.ts +2 -0
  46. package/dist/esm/types/components/drag-list/droppable/index.d.ts.map +1 -0
  47. package/dist/esm/types/components/drag-list/droppable/types.d.ts +5 -0
  48. package/dist/esm/types/components/drag-list/droppable/types.d.ts.map +1 -0
  49. package/dist/esm/types/components/drag-list/index.d.ts +2 -0
  50. package/dist/esm/types/components/drag-list/index.d.ts.map +1 -0
  51. package/dist/esm/types/components/drag-list/types.d.ts +11 -0
  52. package/dist/esm/types/components/drag-list/types.d.ts.map +1 -0
  53. package/dist/esm/types/components/index.d.ts +1 -0
  54. package/dist/esm/types/components/index.d.ts.map +1 -1
  55. package/dist/esm/types/components/list/list.d.ts +6 -1
  56. package/dist/esm/types/components/list/list.d.ts.map +1 -1
  57. package/dist/esm/types/components/list/list.stories.d.ts.map +1 -1
  58. package/dist/esm/types/types/__test__.d.ts +5 -0
  59. package/dist/esm/types/types/__test__.d.ts.map +1 -0
  60. package/package.json +4 -1
@@ -0,0 +1,541 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var core_esm = require('../../core/dist/core.esm.js');
7
+ var utilities_esm = require('../../utilities/dist/utilities.esm.js');
8
+
9
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+
11
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
+
13
+ /**
14
+ * Move an array item to a different position. Returns a new array with the item moved to the new position.
15
+ */
16
+ function arrayMove(array, from, to) {
17
+ const newArray = array.slice();
18
+ newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);
19
+ return newArray;
20
+ }
21
+
22
+ function getSortedRects(items, rects) {
23
+ return items.reduce((accumulator, id, index) => {
24
+ const rect = rects.get(id);
25
+
26
+ if (rect) {
27
+ accumulator[index] = rect;
28
+ }
29
+
30
+ return accumulator;
31
+ }, Array(items.length));
32
+ }
33
+
34
+ function isValidIndex(index) {
35
+ return index !== null && index >= 0;
36
+ }
37
+
38
+ function itemsEqual(a, b) {
39
+ if (a === b) {
40
+ return true;
41
+ }
42
+
43
+ if (a.length !== b.length) {
44
+ return false;
45
+ }
46
+
47
+ for (let i = 0; i < a.length; i++) {
48
+ if (a[i] !== b[i]) {
49
+ return false;
50
+ }
51
+ }
52
+
53
+ return true;
54
+ }
55
+
56
+ function normalizeDisabled(disabled) {
57
+ if (typeof disabled === 'boolean') {
58
+ return {
59
+ draggable: disabled,
60
+ droppable: disabled
61
+ };
62
+ }
63
+
64
+ return disabled;
65
+ }
66
+
67
+ const rectSortingStrategy = _ref => {
68
+ let {
69
+ rects,
70
+ activeIndex,
71
+ overIndex,
72
+ index
73
+ } = _ref;
74
+ const newRects = arrayMove(rects, overIndex, activeIndex);
75
+ const oldRect = rects[index];
76
+ const newRect = newRects[index];
77
+
78
+ if (!newRect || !oldRect) {
79
+ return null;
80
+ }
81
+
82
+ return {
83
+ x: newRect.left - oldRect.left,
84
+ y: newRect.top - oldRect.top,
85
+ scaleX: newRect.width / oldRect.width,
86
+ scaleY: newRect.height / oldRect.height
87
+ };
88
+ };
89
+
90
+ // To-do: We should be calculating scale transformation
91
+ const defaultScale$1 = {
92
+ scaleX: 1,
93
+ scaleY: 1
94
+ };
95
+ const verticalListSortingStrategy = _ref => {
96
+ var _rects$activeIndex;
97
+
98
+ let {
99
+ activeIndex,
100
+ activeNodeRect: fallbackActiveRect,
101
+ index,
102
+ rects,
103
+ overIndex
104
+ } = _ref;
105
+ const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;
106
+
107
+ if (!activeNodeRect) {
108
+ return null;
109
+ }
110
+
111
+ if (index === activeIndex) {
112
+ const overIndexRect = rects[overIndex];
113
+
114
+ if (!overIndexRect) {
115
+ return null;
116
+ }
117
+
118
+ return {
119
+ x: 0,
120
+ y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,
121
+ ...defaultScale$1
122
+ };
123
+ }
124
+
125
+ const itemGap = getItemGap$1(rects, index, activeIndex);
126
+
127
+ if (index > activeIndex && index <= overIndex) {
128
+ return {
129
+ x: 0,
130
+ y: -activeNodeRect.height - itemGap,
131
+ ...defaultScale$1
132
+ };
133
+ }
134
+
135
+ if (index < activeIndex && index >= overIndex) {
136
+ return {
137
+ x: 0,
138
+ y: activeNodeRect.height + itemGap,
139
+ ...defaultScale$1
140
+ };
141
+ }
142
+
143
+ return {
144
+ x: 0,
145
+ y: 0,
146
+ ...defaultScale$1
147
+ };
148
+ };
149
+
150
+ function getItemGap$1(clientRects, index, activeIndex) {
151
+ const currentRect = clientRects[index];
152
+ const previousRect = clientRects[index - 1];
153
+ const nextRect = clientRects[index + 1];
154
+
155
+ if (!currentRect) {
156
+ return 0;
157
+ }
158
+
159
+ if (activeIndex < index) {
160
+ return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;
161
+ }
162
+
163
+ return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;
164
+ }
165
+
166
+ const ID_PREFIX = 'Sortable';
167
+ const Context = /*#__PURE__*/React__default["default"].createContext({
168
+ activeIndex: -1,
169
+ containerId: ID_PREFIX,
170
+ disableTransforms: false,
171
+ items: [],
172
+ overIndex: -1,
173
+ useDragOverlay: false,
174
+ sortedRects: [],
175
+ strategy: rectSortingStrategy,
176
+ disabled: {
177
+ draggable: false,
178
+ droppable: false
179
+ }
180
+ });
181
+ function SortableContext(_ref) {
182
+ let {
183
+ children,
184
+ id,
185
+ items: userDefinedItems,
186
+ strategy = rectSortingStrategy,
187
+ disabled: disabledProp = false
188
+ } = _ref;
189
+ const {
190
+ active,
191
+ dragOverlay,
192
+ droppableRects,
193
+ over,
194
+ measureDroppableContainers
195
+ } = core_esm.useDndContext();
196
+ const containerId = utilities_esm.useUniqueId(ID_PREFIX, id);
197
+ const useDragOverlay = Boolean(dragOverlay.rect !== null);
198
+ const items = React.useMemo(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);
199
+ const isDragging = active != null;
200
+ const activeIndex = active ? items.indexOf(active.id) : -1;
201
+ const overIndex = over ? items.indexOf(over.id) : -1;
202
+ const previousItemsRef = React.useRef(items);
203
+ const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);
204
+ const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;
205
+ const disabled = normalizeDisabled(disabledProp);
206
+ utilities_esm.useIsomorphicLayoutEffect(() => {
207
+ if (itemsHaveChanged && isDragging) {
208
+ measureDroppableContainers(items);
209
+ }
210
+ }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);
211
+ React.useEffect(() => {
212
+ previousItemsRef.current = items;
213
+ }, [items]);
214
+ const contextValue = React.useMemo(() => ({
215
+ activeIndex,
216
+ containerId,
217
+ disabled,
218
+ disableTransforms,
219
+ items,
220
+ overIndex,
221
+ useDragOverlay,
222
+ sortedRects: getSortedRects(items, droppableRects),
223
+ strategy
224
+ }), // eslint-disable-next-line react-hooks/exhaustive-deps
225
+ [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);
226
+ return React__default["default"].createElement(Context.Provider, {
227
+ value: contextValue
228
+ }, children);
229
+ }
230
+
231
+ const defaultNewIndexGetter = _ref => {
232
+ let {
233
+ id,
234
+ items,
235
+ activeIndex,
236
+ overIndex
237
+ } = _ref;
238
+ return arrayMove(items, activeIndex, overIndex).indexOf(id);
239
+ };
240
+ const defaultAnimateLayoutChanges = _ref2 => {
241
+ let {
242
+ containerId,
243
+ isSorting,
244
+ wasDragging,
245
+ index,
246
+ items,
247
+ newIndex,
248
+ previousItems,
249
+ previousContainerId,
250
+ transition
251
+ } = _ref2;
252
+
253
+ if (!transition || !wasDragging) {
254
+ return false;
255
+ }
256
+
257
+ if (previousItems !== items && index === newIndex) {
258
+ return false;
259
+ }
260
+
261
+ if (isSorting) {
262
+ return true;
263
+ }
264
+
265
+ return newIndex !== index && containerId === previousContainerId;
266
+ };
267
+ const defaultTransition = {
268
+ duration: 200,
269
+ easing: 'ease'
270
+ };
271
+ const transitionProperty = 'transform';
272
+ const disabledTransition = /*#__PURE__*/utilities_esm.CSS.Transition.toString({
273
+ property: transitionProperty,
274
+ duration: 0,
275
+ easing: 'linear'
276
+ });
277
+ const defaultAttributes = {
278
+ roleDescription: 'sortable'
279
+ };
280
+
281
+ /*
282
+ * When the index of an item changes while sorting,
283
+ * we need to temporarily disable the transforms
284
+ */
285
+
286
+ function useDerivedTransform(_ref) {
287
+ let {
288
+ disabled,
289
+ index,
290
+ node,
291
+ rect
292
+ } = _ref;
293
+ const [derivedTransform, setDerivedtransform] = React.useState(null);
294
+ const previousIndex = React.useRef(index);
295
+ utilities_esm.useIsomorphicLayoutEffect(() => {
296
+ if (!disabled && index !== previousIndex.current && node.current) {
297
+ const initial = rect.current;
298
+
299
+ if (initial) {
300
+ const current = core_esm.getClientRect(node.current, {
301
+ ignoreTransform: true
302
+ });
303
+ const delta = {
304
+ x: initial.left - current.left,
305
+ y: initial.top - current.top,
306
+ scaleX: initial.width / current.width,
307
+ scaleY: initial.height / current.height
308
+ };
309
+
310
+ if (delta.x || delta.y) {
311
+ setDerivedtransform(delta);
312
+ }
313
+ }
314
+ }
315
+
316
+ if (index !== previousIndex.current) {
317
+ previousIndex.current = index;
318
+ }
319
+ }, [disabled, index, node, rect]);
320
+ React.useEffect(() => {
321
+ if (derivedTransform) {
322
+ setDerivedtransform(null);
323
+ }
324
+ }, [derivedTransform]);
325
+ return derivedTransform;
326
+ }
327
+
328
+ function useSortable(_ref) {
329
+ let {
330
+ animateLayoutChanges = defaultAnimateLayoutChanges,
331
+ attributes: userDefinedAttributes,
332
+ disabled: localDisabled,
333
+ data: customData,
334
+ getNewIndex = defaultNewIndexGetter,
335
+ id,
336
+ strategy: localStrategy,
337
+ resizeObserverConfig,
338
+ transition = defaultTransition
339
+ } = _ref;
340
+ const {
341
+ items,
342
+ containerId,
343
+ activeIndex,
344
+ disabled: globalDisabled,
345
+ disableTransforms,
346
+ sortedRects,
347
+ overIndex,
348
+ useDragOverlay,
349
+ strategy: globalStrategy
350
+ } = React.useContext(Context);
351
+ const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);
352
+ const index = items.indexOf(id);
353
+ const data = React.useMemo(() => ({
354
+ sortable: {
355
+ containerId,
356
+ index,
357
+ items
358
+ },
359
+ ...customData
360
+ }), [containerId, customData, index, items]);
361
+ const itemsAfterCurrentSortable = React.useMemo(() => items.slice(items.indexOf(id)), [items, id]);
362
+ const {
363
+ rect,
364
+ node,
365
+ isOver,
366
+ setNodeRef: setDroppableNodeRef
367
+ } = core_esm.useDroppable({
368
+ id,
369
+ data,
370
+ disabled: disabled.droppable,
371
+ resizeObserverConfig: {
372
+ updateMeasurementsFor: itemsAfterCurrentSortable,
373
+ ...resizeObserverConfig
374
+ }
375
+ });
376
+ const {
377
+ active,
378
+ activatorEvent,
379
+ activeNodeRect,
380
+ attributes,
381
+ setNodeRef: setDraggableNodeRef,
382
+ listeners,
383
+ isDragging,
384
+ over,
385
+ setActivatorNodeRef,
386
+ transform
387
+ } = core_esm.useDraggable({
388
+ id,
389
+ data,
390
+ attributes: { ...defaultAttributes,
391
+ ...userDefinedAttributes
392
+ },
393
+ disabled: disabled.draggable
394
+ });
395
+ const setNodeRef = utilities_esm.useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);
396
+ const isSorting = Boolean(active);
397
+ const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);
398
+ const shouldDisplaceDragSource = !useDragOverlay && isDragging;
399
+ const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;
400
+ const strategy = localStrategy != null ? localStrategy : globalStrategy;
401
+ const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({
402
+ rects: sortedRects,
403
+ activeNodeRect,
404
+ activeIndex,
405
+ overIndex,
406
+ index
407
+ }) : null;
408
+ const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({
409
+ id,
410
+ items,
411
+ activeIndex,
412
+ overIndex
413
+ }) : index;
414
+ const activeId = active == null ? void 0 : active.id;
415
+ const previous = React.useRef({
416
+ activeId,
417
+ items,
418
+ newIndex,
419
+ containerId
420
+ });
421
+ const itemsHaveChanged = items !== previous.current.items;
422
+ const shouldAnimateLayoutChanges = animateLayoutChanges({
423
+ active,
424
+ containerId,
425
+ isDragging,
426
+ isSorting,
427
+ id,
428
+ index,
429
+ items,
430
+ newIndex: previous.current.newIndex,
431
+ previousItems: previous.current.items,
432
+ previousContainerId: previous.current.containerId,
433
+ transition,
434
+ wasDragging: previous.current.activeId != null
435
+ });
436
+ const derivedTransform = useDerivedTransform({
437
+ disabled: !shouldAnimateLayoutChanges,
438
+ index,
439
+ node,
440
+ rect
441
+ });
442
+ React.useEffect(() => {
443
+ if (isSorting && previous.current.newIndex !== newIndex) {
444
+ previous.current.newIndex = newIndex;
445
+ }
446
+
447
+ if (containerId !== previous.current.containerId) {
448
+ previous.current.containerId = containerId;
449
+ }
450
+
451
+ if (items !== previous.current.items) {
452
+ previous.current.items = items;
453
+ }
454
+ }, [isSorting, newIndex, containerId, items]);
455
+ React.useEffect(() => {
456
+ if (activeId === previous.current.activeId) {
457
+ return;
458
+ }
459
+
460
+ if (activeId != null && previous.current.activeId == null) {
461
+ previous.current.activeId = activeId;
462
+ return;
463
+ }
464
+
465
+ const timeoutId = setTimeout(() => {
466
+ previous.current.activeId = activeId;
467
+ }, 50);
468
+ return () => clearTimeout(timeoutId);
469
+ }, [activeId]);
470
+ return {
471
+ active,
472
+ activeIndex,
473
+ attributes,
474
+ data,
475
+ rect,
476
+ index,
477
+ newIndex,
478
+ items,
479
+ isOver,
480
+ isSorting,
481
+ isDragging,
482
+ listeners,
483
+ node,
484
+ overIndex,
485
+ over,
486
+ setNodeRef,
487
+ setActivatorNodeRef,
488
+ setDroppableNodeRef,
489
+ setDraggableNodeRef,
490
+ transform: derivedTransform != null ? derivedTransform : finalTransform,
491
+ transition: getTransition()
492
+ };
493
+
494
+ function getTransition() {
495
+ if ( // Temporarily disable transitions for a single frame to set up derived transforms
496
+ derivedTransform || // Or to prevent items jumping to back to their "new" position when items change
497
+ itemsHaveChanged && previous.current.newIndex === index) {
498
+ return disabledTransition;
499
+ }
500
+
501
+ if (shouldDisplaceDragSource && !utilities_esm.isKeyboardEvent(activatorEvent) || !transition) {
502
+ return undefined;
503
+ }
504
+
505
+ if (isSorting || shouldAnimateLayoutChanges) {
506
+ return utilities_esm.CSS.Transition.toString({ ...transition,
507
+ property: transitionProperty
508
+ });
509
+ }
510
+
511
+ return undefined;
512
+ }
513
+ }
514
+
515
+ function normalizeLocalDisabled(localDisabled, globalDisabled) {
516
+ var _localDisabled$dragga, _localDisabled$droppa;
517
+
518
+ if (typeof localDisabled === 'boolean') {
519
+ return {
520
+ draggable: localDisabled,
521
+ // Backwards compatibility
522
+ droppable: false
523
+ };
524
+ }
525
+
526
+ return {
527
+ draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,
528
+ droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable
529
+ };
530
+ }
531
+
532
+ [core_esm.KeyboardCode.Down, core_esm.KeyboardCode.Right, core_esm.KeyboardCode.Up, core_esm.KeyboardCode.Left];
533
+
534
+ exports.SortableContext = SortableContext;
535
+ exports.arrayMove = arrayMove;
536
+ exports.defaultAnimateLayoutChanges = defaultAnimateLayoutChanges;
537
+ exports.defaultNewIndexGetter = defaultNewIndexGetter;
538
+ exports.rectSortingStrategy = rectSortingStrategy;
539
+ exports.useSortable = useSortable;
540
+ exports.verticalListSortingStrategy = verticalListSortingStrategy;
541
+ //# sourceMappingURL=sortable.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sortable.esm.js","sources":["../../../../../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js"],"sourcesContent":["import React, { useMemo, useRef, useEffect, useState, useContext } from 'react';\nimport { useDndContext, getClientRect, useDroppable, useDraggable, closestCorners, getFirstCollision, getScrollableAncestors, KeyboardCode } from '@dnd-kit/core';\nimport { useUniqueId, useIsomorphicLayoutEffect, CSS, useCombinedRefs, isKeyboardEvent, subtract } from '@dnd-kit/utilities';\n\n/**\r\n * Move an array item to a different position. Returns a new array with the item moved to the new position.\r\n */\nfunction arrayMove(array, from, to) {\n const newArray = array.slice();\n newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);\n return newArray;\n}\n\n/**\r\n * Swap an array item to a different position. Returns a new array with the item swapped to the new position.\r\n */\nfunction arraySwap(array, from, to) {\n const newArray = array.slice();\n newArray[from] = array[to];\n newArray[to] = array[from];\n return newArray;\n}\n\nfunction getSortedRects(items, rects) {\n return items.reduce((accumulator, id, index) => {\n const rect = rects.get(id);\n\n if (rect) {\n accumulator[index] = rect;\n }\n\n return accumulator;\n }, Array(items.length));\n}\n\nfunction isValidIndex(index) {\n return index !== null && index >= 0;\n}\n\nfunction itemsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction normalizeDisabled(disabled) {\n if (typeof disabled === 'boolean') {\n return {\n draggable: disabled,\n droppable: disabled\n };\n }\n\n return disabled;\n}\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1\n};\nconst horizontalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n rects,\n activeNodeRect: fallbackActiveRect,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n const itemGap = getItemGap(rects, index, activeIndex);\n\n if (index === activeIndex) {\n const newIndexRect = rects[overIndex];\n\n if (!newIndexRect) {\n return null;\n }\n\n return {\n x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: -activeNodeRect.width - itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: activeNodeRect.width + itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale\n };\n};\n\nfunction getItemGap(rects, index, activeIndex) {\n const currentRect = rects[index];\n const previousRect = rects[index - 1];\n const nextRect = rects[index + 1];\n\n if (!currentRect || !previousRect && !nextRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);\n }\n\n return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);\n}\n\nconst rectSortingStrategy = _ref => {\n let {\n rects,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const newRects = arrayMove(rects, overIndex, activeIndex);\n const oldRect = rects[index];\n const newRect = newRects[index];\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\nconst rectSwappingStrategy = _ref => {\n let {\n activeIndex,\n index,\n rects,\n overIndex\n } = _ref;\n let oldRect;\n let newRect;\n\n if (index === activeIndex) {\n oldRect = rects[index];\n newRect = rects[overIndex];\n }\n\n if (index === overIndex) {\n oldRect = rects[index];\n newRect = rects[activeIndex];\n }\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\n// To-do: We should be calculating scale transformation\nconst defaultScale$1 = {\n scaleX: 1,\n scaleY: 1\n};\nconst verticalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n activeIndex,\n activeNodeRect: fallbackActiveRect,\n index,\n rects,\n overIndex\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n if (index === activeIndex) {\n const overIndexRect = rects[overIndex];\n\n if (!overIndexRect) {\n return null;\n }\n\n return {\n x: 0,\n y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,\n ...defaultScale$1\n };\n }\n\n const itemGap = getItemGap$1(rects, index, activeIndex);\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: 0,\n y: -activeNodeRect.height - itemGap,\n ...defaultScale$1\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: 0,\n y: activeNodeRect.height + itemGap,\n ...defaultScale$1\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale$1\n };\n};\n\nfunction getItemGap$1(clientRects, index, activeIndex) {\n const currentRect = clientRects[index];\n const previousRect = clientRects[index - 1];\n const nextRect = clientRects[index + 1];\n\n if (!currentRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;\n }\n\n return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;\n}\n\nconst ID_PREFIX = 'Sortable';\nconst Context = /*#__PURE__*/React.createContext({\n activeIndex: -1,\n containerId: ID_PREFIX,\n disableTransforms: false,\n items: [],\n overIndex: -1,\n useDragOverlay: false,\n sortedRects: [],\n strategy: rectSortingStrategy,\n disabled: {\n draggable: false,\n droppable: false\n }\n});\nfunction SortableContext(_ref) {\n let {\n children,\n id,\n items: userDefinedItems,\n strategy = rectSortingStrategy,\n disabled: disabledProp = false\n } = _ref;\n const {\n active,\n dragOverlay,\n droppableRects,\n over,\n measureDroppableContainers\n } = useDndContext();\n const containerId = useUniqueId(ID_PREFIX, id);\n const useDragOverlay = Boolean(dragOverlay.rect !== null);\n const items = useMemo(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);\n const isDragging = active != null;\n const activeIndex = active ? items.indexOf(active.id) : -1;\n const overIndex = over ? items.indexOf(over.id) : -1;\n const previousItemsRef = useRef(items);\n const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);\n const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;\n const disabled = normalizeDisabled(disabledProp);\n useIsomorphicLayoutEffect(() => {\n if (itemsHaveChanged && isDragging) {\n measureDroppableContainers(items);\n }\n }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);\n useEffect(() => {\n previousItemsRef.current = items;\n }, [items]);\n const contextValue = useMemo(() => ({\n activeIndex,\n containerId,\n disabled,\n disableTransforms,\n items,\n overIndex,\n useDragOverlay,\n sortedRects: getSortedRects(items, droppableRects),\n strategy\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);\n return React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nconst defaultNewIndexGetter = _ref => {\n let {\n id,\n items,\n activeIndex,\n overIndex\n } = _ref;\n return arrayMove(items, activeIndex, overIndex).indexOf(id);\n};\nconst defaultAnimateLayoutChanges = _ref2 => {\n let {\n containerId,\n isSorting,\n wasDragging,\n index,\n items,\n newIndex,\n previousItems,\n previousContainerId,\n transition\n } = _ref2;\n\n if (!transition || !wasDragging) {\n return false;\n }\n\n if (previousItems !== items && index === newIndex) {\n return false;\n }\n\n if (isSorting) {\n return true;\n }\n\n return newIndex !== index && containerId === previousContainerId;\n};\nconst defaultTransition = {\n duration: 200,\n easing: 'ease'\n};\nconst transitionProperty = 'transform';\nconst disabledTransition = /*#__PURE__*/CSS.Transition.toString({\n property: transitionProperty,\n duration: 0,\n easing: 'linear'\n});\nconst defaultAttributes = {\n roleDescription: 'sortable'\n};\n\n/*\r\n * When the index of an item changes while sorting,\r\n * we need to temporarily disable the transforms\r\n */\n\nfunction useDerivedTransform(_ref) {\n let {\n disabled,\n index,\n node,\n rect\n } = _ref;\n const [derivedTransform, setDerivedtransform] = useState(null);\n const previousIndex = useRef(index);\n useIsomorphicLayoutEffect(() => {\n if (!disabled && index !== previousIndex.current && node.current) {\n const initial = rect.current;\n\n if (initial) {\n const current = getClientRect(node.current, {\n ignoreTransform: true\n });\n const delta = {\n x: initial.left - current.left,\n y: initial.top - current.top,\n scaleX: initial.width / current.width,\n scaleY: initial.height / current.height\n };\n\n if (delta.x || delta.y) {\n setDerivedtransform(delta);\n }\n }\n }\n\n if (index !== previousIndex.current) {\n previousIndex.current = index;\n }\n }, [disabled, index, node, rect]);\n useEffect(() => {\n if (derivedTransform) {\n setDerivedtransform(null);\n }\n }, [derivedTransform]);\n return derivedTransform;\n}\n\nfunction useSortable(_ref) {\n let {\n animateLayoutChanges = defaultAnimateLayoutChanges,\n attributes: userDefinedAttributes,\n disabled: localDisabled,\n data: customData,\n getNewIndex = defaultNewIndexGetter,\n id,\n strategy: localStrategy,\n resizeObserverConfig,\n transition = defaultTransition\n } = _ref;\n const {\n items,\n containerId,\n activeIndex,\n disabled: globalDisabled,\n disableTransforms,\n sortedRects,\n overIndex,\n useDragOverlay,\n strategy: globalStrategy\n } = useContext(Context);\n const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);\n const index = items.indexOf(id);\n const data = useMemo(() => ({\n sortable: {\n containerId,\n index,\n items\n },\n ...customData\n }), [containerId, customData, index, items]);\n const itemsAfterCurrentSortable = useMemo(() => items.slice(items.indexOf(id)), [items, id]);\n const {\n rect,\n node,\n isOver,\n setNodeRef: setDroppableNodeRef\n } = useDroppable({\n id,\n data,\n disabled: disabled.droppable,\n resizeObserverConfig: {\n updateMeasurementsFor: itemsAfterCurrentSortable,\n ...resizeObserverConfig\n }\n });\n const {\n active,\n activatorEvent,\n activeNodeRect,\n attributes,\n setNodeRef: setDraggableNodeRef,\n listeners,\n isDragging,\n over,\n setActivatorNodeRef,\n transform\n } = useDraggable({\n id,\n data,\n attributes: { ...defaultAttributes,\n ...userDefinedAttributes\n },\n disabled: disabled.draggable\n });\n const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);\n const isSorting = Boolean(active);\n const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);\n const shouldDisplaceDragSource = !useDragOverlay && isDragging;\n const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;\n const strategy = localStrategy != null ? localStrategy : globalStrategy;\n const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({\n rects: sortedRects,\n activeNodeRect,\n activeIndex,\n overIndex,\n index\n }) : null;\n const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({\n id,\n items,\n activeIndex,\n overIndex\n }) : index;\n const activeId = active == null ? void 0 : active.id;\n const previous = useRef({\n activeId,\n items,\n newIndex,\n containerId\n });\n const itemsHaveChanged = items !== previous.current.items;\n const shouldAnimateLayoutChanges = animateLayoutChanges({\n active,\n containerId,\n isDragging,\n isSorting,\n id,\n index,\n items,\n newIndex: previous.current.newIndex,\n previousItems: previous.current.items,\n previousContainerId: previous.current.containerId,\n transition,\n wasDragging: previous.current.activeId != null\n });\n const derivedTransform = useDerivedTransform({\n disabled: !shouldAnimateLayoutChanges,\n index,\n node,\n rect\n });\n useEffect(() => {\n if (isSorting && previous.current.newIndex !== newIndex) {\n previous.current.newIndex = newIndex;\n }\n\n if (containerId !== previous.current.containerId) {\n previous.current.containerId = containerId;\n }\n\n if (items !== previous.current.items) {\n previous.current.items = items;\n }\n }, [isSorting, newIndex, containerId, items]);\n useEffect(() => {\n if (activeId === previous.current.activeId) {\n return;\n }\n\n if (activeId != null && previous.current.activeId == null) {\n previous.current.activeId = activeId;\n return;\n }\n\n const timeoutId = setTimeout(() => {\n previous.current.activeId = activeId;\n }, 50);\n return () => clearTimeout(timeoutId);\n }, [activeId]);\n return {\n active,\n activeIndex,\n attributes,\n data,\n rect,\n index,\n newIndex,\n items,\n isOver,\n isSorting,\n isDragging,\n listeners,\n node,\n overIndex,\n over,\n setNodeRef,\n setActivatorNodeRef,\n setDroppableNodeRef,\n setDraggableNodeRef,\n transform: derivedTransform != null ? derivedTransform : finalTransform,\n transition: getTransition()\n };\n\n function getTransition() {\n if ( // Temporarily disable transitions for a single frame to set up derived transforms\n derivedTransform || // Or to prevent items jumping to back to their \"new\" position when items change\n itemsHaveChanged && previous.current.newIndex === index) {\n return disabledTransition;\n }\n\n if (shouldDisplaceDragSource && !isKeyboardEvent(activatorEvent) || !transition) {\n return undefined;\n }\n\n if (isSorting || shouldAnimateLayoutChanges) {\n return CSS.Transition.toString({ ...transition,\n property: transitionProperty\n });\n }\n\n return undefined;\n }\n}\n\nfunction normalizeLocalDisabled(localDisabled, globalDisabled) {\n var _localDisabled$dragga, _localDisabled$droppa;\n\n if (typeof localDisabled === 'boolean') {\n return {\n draggable: localDisabled,\n // Backwards compatibility\n droppable: false\n };\n }\n\n return {\n draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,\n droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable\n };\n}\n\nfunction hasSortableData(entry) {\n if (!entry) {\n return false;\n }\n\n const data = entry.data.current;\n\n if (data && 'sortable' in data && typeof data.sortable === 'object' && 'containerId' in data.sortable && 'items' in data.sortable && 'index' in data.sortable) {\n return true;\n }\n\n return false;\n}\n\nconst directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];\nconst sortableKeyboardCoordinates = (event, _ref) => {\n let {\n context: {\n active,\n collisionRect,\n droppableRects,\n droppableContainers,\n over,\n scrollableAncestors\n }\n } = _ref;\n\n if (directions.includes(event.code)) {\n event.preventDefault();\n\n if (!active || !collisionRect) {\n return;\n }\n\n const filteredContainers = [];\n droppableContainers.getEnabled().forEach(entry => {\n if (!entry || entry != null && entry.disabled) {\n return;\n }\n\n const rect = droppableRects.get(entry.id);\n\n if (!rect) {\n return;\n }\n\n switch (event.code) {\n case KeyboardCode.Down:\n if (collisionRect.top < rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Up:\n if (collisionRect.top > rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Left:\n if (collisionRect.left > rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Right:\n if (collisionRect.left < rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n }\n });\n const collisions = closestCorners({\n active,\n collisionRect: collisionRect,\n droppableRects,\n droppableContainers: filteredContainers,\n pointerCoordinates: null\n });\n let closestId = getFirstCollision(collisions, 'id');\n\n if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {\n closestId = collisions[1].id;\n }\n\n if (closestId != null) {\n const activeDroppable = droppableContainers.get(active.id);\n const newDroppable = droppableContainers.get(closestId);\n const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;\n const newNode = newDroppable == null ? void 0 : newDroppable.node.current;\n\n if (newNode && newRect && activeDroppable && newDroppable) {\n const newScrollAncestors = getScrollableAncestors(newNode);\n const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);\n const hasSameContainer = isSameContainer(activeDroppable, newDroppable);\n const isAfterActive = isAfter(activeDroppable, newDroppable);\n const offset = hasDifferentScrollAncestors || !hasSameContainer ? {\n x: 0,\n y: 0\n } : {\n x: isAfterActive ? collisionRect.width - newRect.width : 0,\n y: isAfterActive ? collisionRect.height - newRect.height : 0\n };\n const rectCoordinates = {\n x: newRect.left,\n y: newRect.top\n };\n const newCoordinates = offset.x && offset.y ? rectCoordinates : subtract(rectCoordinates, offset);\n return newCoordinates;\n }\n }\n }\n\n return undefined;\n};\n\nfunction isSameContainer(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n return a.data.current.sortable.containerId === b.data.current.sortable.containerId;\n}\n\nfunction isAfter(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n if (!isSameContainer(a, b)) {\n return false;\n }\n\n return a.data.current.sortable.index < b.data.current.sortable.index;\n}\n\nexport { SortableContext, arrayMove, arraySwap, defaultAnimateLayoutChanges, defaultNewIndexGetter, hasSortableData, horizontalListSortingStrategy, rectSortingStrategy, rectSwappingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy };\n//# sourceMappingURL=sortable.esm.js.map\n"],"names":["React","useDndContext","useUniqueId","useMemo","useRef","useIsomorphicLayoutEffect","useEffect","CSS","useState","getClientRect","useContext","useDroppable","useDraggable","useCombinedRefs","isKeyboardEvent","KeyboardCode"],"mappings":";;;;;;;;;;;;AAIA;AACA;AACA;AACA,SAAS,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;AACpC,EAAE,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;AACjC,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtF,EAAE,OAAO,QAAQ,CAAC;AAClB,CAAC;AAWD;AACA,SAAS,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE;AACtC,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,EAAE,EAAE,KAAK,KAAK;AAClD,IAAI,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC/B;AACA,IAAI,IAAI,IAAI,EAAE;AACd,MAAM,WAAW,CAAC,KAAK,CAAC,GAAG,IAAI,C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