@sanity/ui 4.4.0 → 4.4.1
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.
- package/dist/{arrow-B8L6YB-v.js → arrow-A3jQ7LS0.js} +2 -2
- package/dist/{arrow-B8L6YB-v.js.map → arrow-A3jQ7LS0.js.map} +1 -1
- package/dist/autocomplete.js +7 -14
- package/dist/autocomplete.js.map +1 -1
- package/dist/breadcrumbs.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -20
- package/dist/index.js.map +1 -1
- package/dist/menu.js +10 -33
- package/dist/menu.js.map +1 -1
- package/dist/{popover-C72hePrK.js → popover-B0kvwaep.js} +2 -2
- package/dist/{popover-C72hePrK.js.map → popover-B0kvwaep.js.map} +1 -1
- package/dist/popover.js +1 -2
- package/dist/tooltip.js +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { a as responsiveTextAlignStyle, i as responsiveTextFont, n as Text, r as
|
|
|
9
9
|
import { t as responsiveFont } from "./responsiveFont-B08q0jwm.js";
|
|
10
10
|
import { n as Spinner, t as Button } from "./button-dhq4ViVg.js";
|
|
11
11
|
import { t as _elementSizeObserver } from "./elementSizeObserver-pevZfdGa.js";
|
|
12
|
-
import { a as resolvePortalElement, i as PortalContext, n as Portal, o as useBoundaryElement, r as usePortal, s as BoundaryElementContext, t as Arrow } from "./arrow-
|
|
12
|
+
import { a as resolvePortalElement, i as PortalContext, n as Portal, o as useBoundaryElement, r as usePortal, s as BoundaryElementContext, t as Arrow } from "./arrow-A3jQ7LS0.js";
|
|
13
13
|
import { t as useClickOutsideEvent } from "./useClickOutsideEvent-CC1zgOmv.js";
|
|
14
14
|
import { t as responsiveCodeFontStyle } from "./codeFontStyle-B-bhR3hF.js";
|
|
15
15
|
import { a as rgba$1, c as hslToRgb$1, i as multiply$1, l as rgbToHex$1, n as buildTheme, o as parseColor$1, r as screen$1, s as hexToRgb$1, t as createColorTheme$1, u as rgbToHsl$1 } from "./factory-BzXTX8_Q.js";
|
|
@@ -221,15 +221,7 @@ function Dialog(props) {
|
|
|
221
221
|
$[37] === onFocus ? t13 = $[38] : (t13 = (event) => {
|
|
222
222
|
onFocus?.(event);
|
|
223
223
|
let target = event.target, cardElement = cardRef.current;
|
|
224
|
-
|
|
225
|
-
focusLastDescendant(cardElement);
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
if (cardElement && target === postDivRef.current) {
|
|
229
|
-
focusFirstDescendant(cardElement);
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
|
-
isHTMLElement(event.target) && (focusedElementRef.current = event.target);
|
|
224
|
+
cardElement && target === preDivRef.current ? focusLastDescendant(cardElement) : cardElement && target === postDivRef.current ? focusFirstDescendant(cardElement) : isHTMLElement(event.target) && (focusedElementRef.current = event.target);
|
|
233
225
|
}, $[37] = onFocus, $[38] = t13);
|
|
234
226
|
let handleFocus = t13, labelId = `${id}_label`, rootClickTimeoutRef = useRef(void 0), t14;
|
|
235
227
|
$[39] !== boundaryElement || $[40] !== portalElement ? (t14 = () => {
|
|
@@ -639,15 +631,11 @@ function Tree(props) {
|
|
|
639
631
|
event.preventDefault();
|
|
640
632
|
let nextEl = _findNextItemElement(stateRef.current, itemElements, focusedElementRef.current);
|
|
641
633
|
nextEl && (_focusItemElement(nextEl), setFocusedElement(nextEl));
|
|
642
|
-
|
|
643
|
-
}
|
|
644
|
-
if (event.key === "ArrowUp") {
|
|
634
|
+
} else if (event.key === "ArrowUp") {
|
|
645
635
|
event.preventDefault();
|
|
646
636
|
let prevEl = _findPrevItemElement(stateRef.current, itemElements, focusedElementRef.current);
|
|
647
637
|
prevEl && (_focusItemElement(prevEl), setFocusedElement(prevEl));
|
|
648
|
-
|
|
649
|
-
}
|
|
650
|
-
if (event.key === "ArrowLeft") {
|
|
638
|
+
} else if (event.key === "ArrowLeft") {
|
|
651
639
|
event.preventDefault();
|
|
652
640
|
let itemKey = focusedElementRef.current.getAttribute("data-tree-key");
|
|
653
641
|
if (!itemKey) return;
|
|
@@ -669,9 +657,7 @@ function Tree(props) {
|
|
|
669
657
|
let parentKey = itemPath.join("/"), parentState = parentKey && stateRef.current[parentKey];
|
|
670
658
|
parentState && (parentState.element.focus(), setFocusedElement(parentState.element));
|
|
671
659
|
}
|
|
672
|
-
|
|
673
|
-
}
|
|
674
|
-
if (event.key === "ArrowRight") {
|
|
660
|
+
} else if (event.key === "ArrowRight") {
|
|
675
661
|
event.preventDefault();
|
|
676
662
|
let focusedKey = focusedElementRef.current.getAttribute("data-tree-key");
|
|
677
663
|
if (!focusedKey) return;
|
|
@@ -685,7 +671,6 @@ function Tree(props) {
|
|
|
685
671
|
}
|
|
686
672
|
} : s_3;
|
|
687
673
|
});
|
|
688
|
-
return;
|
|
689
674
|
}
|
|
690
675
|
}
|
|
691
676
|
}, $[22] = itemElements, $[23] = t13);
|