@eightshift/ui-components 1.7.2 → 1.9.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 (113) hide show
  1. package/dist/{Button-VbCAu4hd.js → Button-BMFbEXg1.js} +7 -7
  2. package/dist/{Color-BpLubxWI.js → Color-B-cqXgPz.js} +5 -17
  3. package/dist/{ColorSwatch-CinC14s3.js → ColorSwatch-B6s54Jb3.js} +4 -4
  4. package/dist/ComboBox-VR9-vNZv.js +1886 -0
  5. package/dist/Dialog-BlYTPzgB.js +2177 -0
  6. package/dist/{FieldError-BttM1Nxd.js → FieldError-DKicm3R0.js} +2 -2
  7. package/dist/{FocusScope-CtCX0OGo.js → FocusScope-EoLYfbMp.js} +11 -12
  8. package/dist/{Group-XzWUooix.js → Group-D96edUPC.js} +5 -5
  9. package/dist/{Heading-DZelepHV.js → Heading-GytTjUsy.js} +1 -1
  10. package/dist/{Hidden-CcFqOzrp.js → Hidden-D3hHnmPI.js} +2 -2
  11. package/dist/{Input-CV1qVS6t.js → Input-BXSxJ_44.js} +10 -10
  12. package/dist/{Label-BwqMVkuV.js → Label-BtoiUpt8.js} +2 -2
  13. package/dist/{List-Bx2anbX-.js → List-Ct3nzFZG.js} +1 -1
  14. package/dist/{ListBox-DuZPdnkk.js → ListBox-BMpo-Cem.js} +19 -18
  15. package/dist/{NumberFormatter-U_Gx0UDq.js → NumberFormatter-DA8u1Ot7.js} +4 -6
  16. package/dist/OverlayArrow-4epQ99-E.js +567 -0
  17. package/dist/{Select-c7902d94.esm-DtzFQzf-.js → Select-aab027f3.esm-C7BxKjSc.js} +4 -4
  18. package/dist/{SelectionManager-x27KqnAT.js → SelectionManager-D-89MUJW.js} +276 -291
  19. package/dist/{Separator-BM58t3PP.js → Separator-DUhFmbD-.js} +62 -52
  20. package/dist/{Slider-D9Cs6yKr.js → Slider-QNPrj4N9.js} +16 -14
  21. package/dist/{Text-BVIXT8qq.js → Text-DNDWaukZ.js} +1 -1
  22. package/dist/{VisuallyHidden-WhC7vZaL.js → VisuallyHidden-BHNhi-ls.js} +2 -2
  23. package/dist/assets/style.css +1 -1
  24. package/dist/assets/wp-ui-enhancements.css +1 -1
  25. package/dist/components/animated-visibility/animated-visibility.js +67 -7245
  26. package/dist/components/base-control/base-control.js +1 -1
  27. package/dist/components/button/button.js +10 -7
  28. package/dist/components/checkbox/checkbox.js +22 -13
  29. package/dist/components/color-pickers/color-picker.js +1 -1
  30. package/dist/components/color-pickers/color-swatch.js +3 -3
  31. package/dist/components/color-pickers/gradient-editor.js +2 -2
  32. package/dist/components/color-pickers/solid-color-picker.js +21 -21
  33. package/dist/components/component-toggle/component-toggle.js +1 -1
  34. package/dist/components/container-panel/container-panel.js +6 -4
  35. package/dist/components/draggable/draggable-handle.js +2 -2
  36. package/dist/components/draggable/draggable.js +2 -2
  37. package/dist/components/draggable-list/draggable-list-item.js +2 -2
  38. package/dist/components/draggable-list/draggable-list.js +2 -2
  39. package/dist/components/expandable/expandable.js +221 -26
  40. package/dist/components/index.js +8 -4
  41. package/dist/components/input-field/input-field.js +7 -7
  42. package/dist/components/item-collection/item-collection.js +1 -1
  43. package/dist/components/link-input/link-input.js +10 -1872
  44. package/dist/components/list-box/list-box.js +2 -2
  45. package/dist/components/matrix-align/matrix-align.js +2 -2
  46. package/dist/components/menu/menu.js +7 -974
  47. package/dist/components/modal/modal.js +7 -7
  48. package/dist/components/number-picker/number-picker.js +10 -10
  49. package/dist/components/option-select/option-select.js +1 -1
  50. package/dist/components/options-panel/options-panel.js +1 -1
  51. package/dist/components/placeholders/file-placeholder.js +1 -1
  52. package/dist/components/popover/popover.js +2 -2
  53. package/dist/components/radio/radio.js +13 -13
  54. package/dist/components/repeater/repeater-item.js +1 -1
  55. package/dist/components/repeater/repeater.js +2 -2
  56. package/dist/components/responsive/mini-responsive.js +3 -3
  57. package/dist/components/responsive/responsive-legacy.js +2 -2
  58. package/dist/components/responsive/responsive.js +2 -2
  59. package/dist/components/responsive-preview/responsive-preview.js +1 -1
  60. package/dist/components/select/async-multi-select.js +3 -3
  61. package/dist/components/select/async-single-select.js +2 -2
  62. package/dist/components/select/custom-select-default-components.js +1 -1
  63. package/dist/components/select/multi-select-components.js +1 -1
  64. package/dist/components/select/multi-select.js +3 -3
  65. package/dist/components/select/react-select-component-wrappers.js +1 -1
  66. package/dist/components/select/single-select.js +2 -2
  67. package/dist/components/select/v2/async-select.js +307 -0
  68. package/dist/components/select/v2/shared.js +24 -0
  69. package/dist/components/select/v2/single-select.js +993 -0
  70. package/dist/components/slider/column-config-slider.js +3 -3
  71. package/dist/components/slider/slider.js +3 -3
  72. package/dist/components/slider/utils.js +1 -1
  73. package/dist/components/tabs/tabs.js +16 -16
  74. package/dist/components/toggle/switch.js +6 -6
  75. package/dist/components/toggle/toggle.js +1 -1
  76. package/dist/components/toggle-button/toggle-button.js +55 -12
  77. package/dist/components/tooltip/tooltip.js +532 -8
  78. package/dist/{context-Cs-ZD1nu.js → context-KeRYAbEi.js} +2 -2
  79. package/dist/{default-i18n-DRnM8y4w.js → default-i18n-CM1-Xvzf.js} +183 -176
  80. package/dist/{focusSafely-CgFLw4FA.js → focusSafely-CZY36ssv.js} +14 -14
  81. package/dist/icons/icons.js +131 -0
  82. package/dist/icons/jsx-svg.js +16 -3
  83. package/dist/{index-a301f526.esm-BMg114iK.js → index-641ee5b8.esm-DEB-c58F.js} +226 -75
  84. package/dist/index-BYHhzLf-.js +444 -0
  85. package/dist/index.js +7 -3
  86. package/dist/{multi-select-components-DTvEidE3.js → multi-select-components-DM3GsNfb.js} +112 -45
  87. package/dist/{react-jsx-parser.min-B5HVwW_W.js → react-jsx-parser.min-CVit0rZn.js} +5620 -7409
  88. package/dist/{react-select-async.esm-CxA8wpeT.js → react-select-async.esm-Bq3N1-Wi.js} +3 -3
  89. package/dist/{react-select.esm-CeE7o5M9.js → react-select.esm-B38nY7_U.js} +3 -3
  90. package/dist/{textSelection-CvK0YHTZ.js → textSelection-G2G-nukT.js} +1 -1
  91. package/dist/{useButton-Cy9eEev7.js → useButton-CFtcz1T6.js} +4 -4
  92. package/dist/{useEvent-LZebwyrb.js → useEvent-B0yfN_Zu.js} +1 -1
  93. package/dist/{useFocusRing-BMOTWmOx.js → useFocusRing-DMAlRYjX.js} +1 -1
  94. package/dist/{useFocusable-ByyKSVQv.js → useFocusable-BlkOMLma.js} +4 -4
  95. package/dist/{useFormReset-B8m1uz1J.js → useFormReset-BAEM0o25.js} +1 -1
  96. package/dist/{useFormValidationState-BjMhz_VI.js → useFormValidation-BNzOc2t9.js} +92 -88
  97. package/dist/{useLabel-B6uO0wVK.js → useLabel-D6FSp5_M.js} +2 -2
  98. package/dist/{useLabels-5dFkeiXx.js → useLabels-CraZ2Sej.js} +1 -1
  99. package/dist/{useListState-eKxv7HPC.js → useListState-C3dnPq2F.js} +1 -1
  100. package/dist/{useLocalizedStringFormatter-BaKmjFNp.js → useLocalizedStringFormatter-B73fhEA7.js} +1 -1
  101. package/dist/{useNumberField-DMMUTZ-h.js → useNumberField-CQP9-nH5.js} +27 -20
  102. package/dist/{useNumberFormatter-Cyx5Dxkf.js → useNumberFormatter-Cdctl6fg.js} +2 -2
  103. package/dist/{usePress-D8nPoIQm.js → usePress-xTkcGUkt.js} +4 -4
  104. package/dist/{useSingleSelectListState-CABciySJ.js → useSingleSelectListState-BGXQSTy7.js} +2 -2
  105. package/dist/{useToggle-BmltE9Zr.js → useToggle-Dpw3WpSw.js} +4 -4
  106. package/dist/{useToggleState-DZXLEnA_.js → useToggleState-BSKwCUIW.js} +1 -1
  107. package/dist/{utils-BCJajCwh.js → utils-BSLBwuuO.js} +16 -15
  108. package/package.json +30 -31
  109. package/dist/Dialog-BN5EE7UH.js +0 -934
  110. package/dist/index-BTCzc3zb.js +0 -28261
  111. package/dist/isScrollable-Dh9D9IOd.js +0 -9
  112. package/dist/tooltip-eKaARDoV.js +0 -1084
  113. package/dist/useMenuTrigger-4fwEmto8.js +0 -246
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import React__default, { useMemo, useLayoutEffect, useEffect, useRef, useCallback, useState, createContext, memo, useReducer, useContext } from "react";
3
- import { r as reactDomExports } from "./index-BTCzc3zb.js";
3
+ import { r as reactDomExports } from "./index-BYHhzLf-.js";
4
4
  import { c as clsx } from "./lite-DVmmD_-j.js";
5
5
  function useCombinedRefs() {
6
6
  for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -296,6 +296,8 @@ function LiveRegion(_ref) {
296
296
  } = _ref;
297
297
  const visuallyHidden = {
298
298
  position: "fixed",
299
+ top: 0,
300
+ left: 0,
299
301
  width: 1,
300
302
  height: 1,
301
303
  margin: -1,
@@ -1032,11 +1034,12 @@ var KeyboardCode;
1032
1034
  KeyboardCode2["Up"] = "ArrowUp";
1033
1035
  KeyboardCode2["Esc"] = "Escape";
1034
1036
  KeyboardCode2["Enter"] = "Enter";
1037
+ KeyboardCode2["Tab"] = "Tab";
1035
1038
  })(KeyboardCode || (KeyboardCode = {}));
1036
1039
  const defaultKeyboardCodes = {
1037
1040
  start: [KeyboardCode.Space, KeyboardCode.Enter],
1038
1041
  cancel: [KeyboardCode.Esc],
1039
- end: [KeyboardCode.Space, KeyboardCode.Enter]
1042
+ end: [KeyboardCode.Space, KeyboardCode.Enter, KeyboardCode.Tab]
1040
1043
  };
1041
1044
  const defaultKeyboardCoordinateGetter = (event, _ref) => {
1042
1045
  let {
@@ -1331,6 +1334,9 @@ class AbstractPointerSensor {
1331
1334
  passive: false
1332
1335
  });
1333
1336
  this.listeners.add(events2.end.name, this.handleEnd);
1337
+ if (events2.cancel) {
1338
+ this.listeners.add(events2.cancel.name, this.handleCancel);
1339
+ }
1334
1340
  this.windowListeners.add(EventName.Resize, this.handleCancel);
1335
1341
  this.windowListeners.add(EventName.DragStart, preventDefault);
1336
1342
  this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);
@@ -1346,9 +1352,11 @@ class AbstractPointerSensor {
1346
1352
  }
1347
1353
  if (isDelayConstraint(activationConstraint)) {
1348
1354
  this.timeoutId = setTimeout(this.handleStart, activationConstraint.delay);
1355
+ this.handlePending(activationConstraint);
1349
1356
  return;
1350
1357
  }
1351
1358
  if (isDistanceConstraint(activationConstraint)) {
1359
+ this.handlePending(activationConstraint);
1352
1360
  return;
1353
1361
  }
1354
1362
  }
@@ -1363,6 +1371,13 @@ class AbstractPointerSensor {
1363
1371
  this.timeoutId = null;
1364
1372
  }
1365
1373
  }
1374
+ handlePending(constraint, offset) {
1375
+ const {
1376
+ active,
1377
+ onPending
1378
+ } = this.props;
1379
+ onPending(active, constraint, this.initialCoordinates, offset);
1380
+ }
1366
1381
  handleStart() {
1367
1382
  const {
1368
1383
  initialCoordinates
@@ -1412,6 +1427,7 @@ class AbstractPointerSensor {
1412
1427
  return this.handleCancel();
1413
1428
  }
1414
1429
  }
1430
+ this.handlePending(activationConstraint, delta);
1415
1431
  return;
1416
1432
  }
1417
1433
  if (event.cancelable) {
@@ -1421,16 +1437,24 @@ class AbstractPointerSensor {
1421
1437
  }
1422
1438
  handleEnd() {
1423
1439
  const {
1440
+ onAbort,
1424
1441
  onEnd
1425
1442
  } = this.props;
1426
1443
  this.detach();
1444
+ if (!this.activated) {
1445
+ onAbort(this.props.active);
1446
+ }
1427
1447
  onEnd();
1428
1448
  }
1429
1449
  handleCancel() {
1430
1450
  const {
1451
+ onAbort,
1431
1452
  onCancel
1432
1453
  } = this.props;
1433
1454
  this.detach();
1455
+ if (!this.activated) {
1456
+ onAbort(this.props.active);
1457
+ }
1434
1458
  onCancel();
1435
1459
  }
1436
1460
  handleKeydown(event) {
@@ -1444,6 +1468,9 @@ class AbstractPointerSensor {
1444
1468
  }
1445
1469
  }
1446
1470
  const events = {
1471
+ cancel: {
1472
+ name: "pointercancel"
1473
+ },
1447
1474
  move: {
1448
1475
  name: "pointermove"
1449
1476
  },
@@ -1514,6 +1541,9 @@ MouseSensor.activators = [{
1514
1541
  }
1515
1542
  }];
1516
1543
  const events$2 = {
1544
+ cancel: {
1545
+ name: "touchcancel"
1546
+ },
1517
1547
  move: {
1518
1548
  name: "touchmove"
1519
1549
  },
@@ -1722,11 +1752,11 @@ function useScrollIntent(_ref2) {
1722
1752
  }, [disabled, delta, previousDelta]);
1723
1753
  }
1724
1754
  function useCachedNode(draggableNodes, id) {
1725
- const draggableNode = id !== null ? draggableNodes.get(id) : void 0;
1755
+ const draggableNode = id != null ? draggableNodes.get(id) : void 0;
1726
1756
  const node = draggableNode ? draggableNode.node.current : null;
1727
1757
  return useLazyMemo((cachedNode) => {
1728
1758
  var _ref;
1729
- if (id === null) {
1759
+ if (id == null) {
1730
1760
  return null;
1731
1761
  }
1732
1762
  return (_ref = node != null ? node : cachedNode) != null ? _ref : null;
@@ -1926,7 +1956,23 @@ function useRect(element, measure, fallbackRect) {
1926
1956
  if (measure === void 0) {
1927
1957
  measure = defaultMeasure;
1928
1958
  }
1929
- const [rect, measureRect] = useReducer(reducer2, null);
1959
+ const [rect, setRect] = useState(null);
1960
+ function measureRect() {
1961
+ setRect((currentRect) => {
1962
+ if (!element) {
1963
+ return null;
1964
+ }
1965
+ if (element.isConnected === false) {
1966
+ var _ref;
1967
+ return (_ref = currentRect != null ? currentRect : fallbackRect) != null ? _ref : null;
1968
+ }
1969
+ const newRect = measure(element);
1970
+ if (JSON.stringify(currentRect) === JSON.stringify(newRect)) {
1971
+ return currentRect;
1972
+ }
1973
+ return newRect;
1974
+ });
1975
+ }
1930
1976
  const mutationObserver = useMutationObserver({
1931
1977
  callback(records) {
1932
1978
  if (!element) {
@@ -1961,20 +2007,6 @@ function useRect(element, measure, fallbackRect) {
1961
2007
  }
1962
2008
  }, [element]);
1963
2009
  return rect;
1964
- function reducer2(currentRect) {
1965
- if (!element) {
1966
- return null;
1967
- }
1968
- if (element.isConnected === false) {
1969
- var _ref;
1970
- return (_ref = currentRect != null ? currentRect : fallbackRect) != null ? _ref : null;
1971
- }
1972
- const newRect = measure(element);
1973
- if (JSON.stringify(currentRect) === JSON.stringify(newRect)) {
1974
- return currentRect;
1975
- }
1976
- return newRect;
1977
- }
1978
2010
  }
1979
2011
  function useRectDelta(rect) {
1980
2012
  const initialRect = useInitialValue(rect);
@@ -2123,28 +2155,24 @@ function useRects(elements, measure) {
2123
2155
  }
2124
2156
  const [firstElement] = elements;
2125
2157
  const windowRect = useWindowRect(firstElement ? getWindow(firstElement) : null);
2126
- const [rects, measureRects] = useReducer(reducer2, defaultValue$2);
2158
+ const [rects, setRects] = useState(defaultValue$2);
2159
+ function measureRects() {
2160
+ setRects(() => {
2161
+ if (!elements.length) {
2162
+ return defaultValue$2;
2163
+ }
2164
+ return elements.map((element) => isDocumentScrollingElement(element) ? windowRect : new Rect(measure(element), element));
2165
+ });
2166
+ }
2127
2167
  const resizeObserver = useResizeObserver({
2128
2168
  callback: measureRects
2129
2169
  });
2130
- if (elements.length > 0 && rects === defaultValue$2) {
2131
- measureRects();
2132
- }
2133
2170
  useIsomorphicLayoutEffect(() => {
2134
- if (elements.length) {
2135
- elements.forEach((element) => resizeObserver == null ? void 0 : resizeObserver.observe(element));
2136
- } else {
2137
- resizeObserver == null ? void 0 : resizeObserver.disconnect();
2138
- measureRects();
2139
- }
2171
+ resizeObserver == null ? void 0 : resizeObserver.disconnect();
2172
+ measureRects();
2173
+ elements.forEach((element) => resizeObserver == null ? void 0 : resizeObserver.observe(element));
2140
2174
  }, [elements]);
2141
2175
  return rects;
2142
- function reducer2() {
2143
- if (!elements.length) {
2144
- return defaultValue$2;
2145
- }
2146
- return elements.map((element) => isDocumentScrollingElement(element) ? windowRect : new Rect(measure(element), element));
2147
- }
2148
2176
  }
2149
2177
  function getMeasurableNode(node) {
2150
2178
  if (!node) {
@@ -2311,7 +2339,7 @@ function reducer(state, action) {
2311
2339
  }
2312
2340
  };
2313
2341
  case Action.DragMove:
2314
- if (!state.draggable.active) {
2342
+ if (state.draggable.active == null) {
2315
2343
  return state;
2316
2344
  }
2317
2345
  return {
@@ -2573,7 +2601,7 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2573
2601
  containers: droppableContainers
2574
2602
  }
2575
2603
  } = state;
2576
- const node = activeId ? draggableNodes.get(activeId) : null;
2604
+ const node = activeId != null ? draggableNodes.get(activeId) : null;
2577
2605
  const activeRects = useRef({
2578
2606
  initial: null,
2579
2607
  translated: null
@@ -2608,7 +2636,7 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2608
2636
  const autoScrollOptions = getAutoScrollerOptions();
2609
2637
  const initialActiveNodeRect = useInitialRect(activeNode, measuringConfiguration.draggable.measure);
2610
2638
  useLayoutShiftScrollCompensation({
2611
- activeNode: activeId ? draggableNodes.get(activeId) : null,
2639
+ activeNode: activeId != null ? draggableNodes.get(activeId) : null,
2612
2640
  config: autoScrollOptions.layoutShiftCompensation,
2613
2641
  initialRect: initialActiveNodeRect,
2614
2642
  measure: measuringConfiguration.draggable.measure
@@ -2676,6 +2704,7 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2676
2704
  const [over, setOver] = useState(null);
2677
2705
  const appliedTranslate = usesDragOverlay ? modifiedTranslate : add(modifiedTranslate, activeNodeScrollDelta);
2678
2706
  const transform = adjustScale(appliedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect);
2707
+ const activeSensorRef = useRef(null);
2679
2708
  const instantiateSensor = useCallback(
2680
2709
  (event, _ref2) => {
2681
2710
  let {
@@ -2698,6 +2727,43 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2698
2727
  // Sensors need to be instantiated with refs for arguments that change over time
2699
2728
  // otherwise they are frozen in time with the stale arguments
2700
2729
  context: sensorContext,
2730
+ onAbort(id2) {
2731
+ const draggableNode = draggableNodes.get(id2);
2732
+ if (!draggableNode) {
2733
+ return;
2734
+ }
2735
+ const {
2736
+ onDragAbort
2737
+ } = latestProps.current;
2738
+ const event2 = {
2739
+ id: id2
2740
+ };
2741
+ onDragAbort == null ? void 0 : onDragAbort(event2);
2742
+ dispatchMonitorEvent({
2743
+ type: "onDragAbort",
2744
+ event: event2
2745
+ });
2746
+ },
2747
+ onPending(id2, constraint, initialCoordinates, offset) {
2748
+ const draggableNode = draggableNodes.get(id2);
2749
+ if (!draggableNode) {
2750
+ return;
2751
+ }
2752
+ const {
2753
+ onDragPending
2754
+ } = latestProps.current;
2755
+ const event2 = {
2756
+ id: id2,
2757
+ constraint,
2758
+ initialCoordinates,
2759
+ offset
2760
+ };
2761
+ onDragPending == null ? void 0 : onDragPending(event2);
2762
+ dispatchMonitorEvent({
2763
+ type: "onDragPending",
2764
+ event: event2
2765
+ });
2766
+ },
2701
2767
  onStart(initialCoordinates) {
2702
2768
  const id2 = activeRef.current;
2703
2769
  if (id2 == null) {
@@ -2711,6 +2777,7 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2711
2777
  onDragStart
2712
2778
  } = latestProps.current;
2713
2779
  const event2 = {
2780
+ activatorEvent: activatorEvent2,
2714
2781
  active: {
2715
2782
  id: id2,
2716
2783
  data: draggableNode.data,
@@ -2729,6 +2796,8 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2729
2796
  type: "onDragStart",
2730
2797
  event: event2
2731
2798
  });
2799
+ setActiveSensor(activeSensorRef.current);
2800
+ setActivatorEvent(activatorEvent2);
2732
2801
  });
2733
2802
  },
2734
2803
  onMove(coordinates) {
@@ -2740,10 +2809,7 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2740
2809
  onEnd: createHandler(Action.DragEnd),
2741
2810
  onCancel: createHandler(Action.DragCancel)
2742
2811
  });
2743
- reactDomExports.unstable_batchedUpdates(() => {
2744
- setActiveSensor(sensorInstance);
2745
- setActivatorEvent(event.nativeEvent);
2746
- });
2812
+ activeSensorRef.current = sensorInstance;
2747
2813
  function createHandler(type) {
2748
2814
  return async function handler() {
2749
2815
  const {
@@ -2780,6 +2846,7 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
2780
2846
  setOver(null);
2781
2847
  setActiveSensor(null);
2782
2848
  setActivatorEvent(null);
2849
+ activeSensorRef.current = null;
2783
2850
  const eventName = type === Action.DragEnd ? "onDragEnd" : "onDragCancel";
2784
2851
  if (event2) {
2785
2852
  const handler2 = latestProps.current[eventName];
@@ -3005,7 +3072,7 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
3005
3072
  });
3006
3073
  const NullContext = /* @__PURE__ */ createContext(null);
3007
3074
  const defaultRole = "button";
3008
- const ID_PREFIX$1 = "Droppable";
3075
+ const ID_PREFIX$1 = "Draggable";
3009
3076
  function useDraggable(_ref) {
3010
3077
  let {
3011
3078
  id,
@@ -3154,7 +3221,7 @@ function useDroppable(_ref) {
3154
3221
  resizeObserverConnected.current = false;
3155
3222
  resizeObserver.observe(nodeRef.current);
3156
3223
  }, [nodeRef, resizeObserver]);
3157
- useIsomorphicLayoutEffect(
3224
+ useEffect(
3158
3225
  () => {
3159
3226
  dispatch({
3160
3227
  type: Action.RegisterDroppable,
@@ -3536,7 +3603,7 @@ function useSortable(_ref) {
3536
3603
  if (activeId === previous.current.activeId) {
3537
3604
  return;
3538
3605
  }
3539
- if (activeId && !previous.current.activeId) {
3606
+ if (activeId != null && previous.current.activeId == null) {
3540
3607
  previous.current.activeId = activeId;
3541
3608
  return;
3542
3609
  }