@sanity/ui 2.9.0-canary.6 → 2.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.
- package/dist/_chunks-cjs/getTheme_v2.js +26 -0
- package/dist/_chunks-cjs/getTheme_v2.js.map +1 -1
- package/dist/_chunks-es/getTheme_v2.mjs +26 -0
- package/dist/_chunks-es/getTheme_v2.mjs.map +1 -1
- package/dist/_legacy/getTheme_v2.esm.js +26 -0
- package/dist/_legacy/getTheme_v2.esm.js.map +1 -1
- package/dist/index.esm.js +652 -1048
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +651 -1047
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +652 -1048
- package/dist/index.mjs.map +1 -1
- package/dist/theme.d.mts +22 -28
- package/dist/theme.d.ts +22 -28
- package/dist/theme.esm.js +124 -260
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +124 -260
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +124 -260
- package/dist/theme.mjs.map +1 -1
- package/package.json +60 -53
- package/src/core/__workshop__/constants.ts +27 -31
- package/src/core/components/autocomplete/autocomplete.tsx +31 -42
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +47 -35
- package/src/core/components/dialog/dialog.tsx +1 -1
- package/src/core/components/menu/__workshop__/tones.tsx +5 -6
- package/src/core/components/menu/useMenuController.ts +21 -18
- package/src/core/components/toast/__workshop__/hook.tsx +1 -1
- package/src/core/components/toast/toast.tsx +2 -2
- package/src/core/components/tree/treeItem.tsx +15 -18
- package/src/core/hooks/useElementRect/__workshop__/example.tsx +2 -2
- package/src/core/hooks/useMatchMedia.ts +22 -12
- package/src/core/primitives/badge/__workshop__/tones.tsx +6 -13
- package/src/core/primitives/button/__workshop__/custom.tsx +4 -3
- package/src/core/primitives/card/__workshop__/allTones.tsx +6 -8
- package/src/core/primitives/card/__workshop__/asButton.tsx +42 -24
- package/src/core/primitives/card/__workshop__/asComponent.tsx +1 -1
- package/src/core/primitives/card/__workshop__/checkered.tsx +17 -7
- package/src/core/primitives/card/__workshop__/interactive.tsx +10 -3
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +5 -3
- package/src/core/primitives/card/__workshop__/props.tsx +7 -5
- package/src/core/primitives/card/__workshop__/selected.tsx +4 -1
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +6 -0
- package/src/core/primitives/code/__workshop__/props.tsx +1 -1
- package/src/core/primitives/container/__workshop__/example.tsx +1 -1
- package/src/core/primitives/flex/__workshop__/example.tsx +3 -3
- package/src/core/primitives/grid/__workshop__/responsive.tsx +12 -12
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +13 -25
- package/src/core/primitives/inline/__workshop__/plain.tsx +3 -3
- package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +6 -6
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +1 -1
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +3 -3
- package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +1 -1
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +1 -1
- package/src/core/primitives/popover/popover.tsx +140 -74
- package/src/core/primitives/popover/popoverCard.tsx +4 -1
- package/src/core/primitives/radio/__workshop__/plain.tsx +2 -2
- package/src/core/primitives/select/__workshop__/readOnly.tsx +1 -1
- package/src/core/primitives/text/__workshop__/example.tsx +6 -6
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +11 -21
- package/src/core/primitives/textArea/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/index.ts +0 -5
- package/src/core/primitives/textInput/__workshop__/plain.tsx +1 -2
- package/src/core/primitives/textInput/__workshop__/readOnly.tsx +6 -2
- package/src/core/primitives/textInput/__workshop__/tones.tsx +38 -0
- package/src/core/primitives/tooltip/tooltip.tsx +17 -47
- package/src/core/styles/card/_cardColorStyle.ts +8 -0
- package/src/core/theme/__workshop__/debug/story.tsx +18 -11
- package/src/core/utils/portal/portalProvider.tsx +5 -5
- package/src/theme/build/_deprecated/color/factory.ts +1 -1
- package/src/theme/build/_deprecated/color/muted/createMuted.ts +2 -2
- package/src/theme/build/buildColorTheme.ts +47 -37
- package/src/theme/build/renderColorTheme.ts +26 -30
- package/src/theme/build/resolveColorTokens.ts +51 -115
- package/src/theme/config/tokens/color/types.ts +4 -18
- package/src/theme/defaults/colorTokens.ts +8 -5
- package/src/theme/getScopedTheme.ts +9 -2
- package/src/theme/system/color/_constants.ts +6 -2
- package/src/theme/system/color/badge.ts +3 -7
- package/src/theme/system/v0/color/_system.ts +8 -4
- package/src/theme/system/v0/color/color.ts +3 -2
- package/src/theme/versioning/themeColor_v0_v2.ts +26 -0
- package/src/theme/versioning/v0_v2.ts +4 -0
- package/src/core/primitives/textInput/__workshop__/multipleTones.tsx +0 -20
package/dist/index.js
CHANGED
|
@@ -150,7 +150,7 @@ function responsiveTextFont(props) {
|
|
|
150
150
|
function useArrayProp(val, defaultVal) {
|
|
151
151
|
const $ = reactCompilerRuntime.c(3);
|
|
152
152
|
let t0;
|
|
153
|
-
$[0] !==
|
|
153
|
+
$[0] !== defaultVal || $[1] !== val ? (t0 = () => [_getArrayProp(val, defaultVal), JSON.stringify(val ?? defaultVal)], $[0] = defaultVal, $[1] = val, $[2] = t0) : t0 = $[2];
|
|
154
154
|
const [t1, setCache] = react.useState(t0), [cachedVal, cachedHash] = t1, hash = JSON.stringify(val ?? defaultVal);
|
|
155
155
|
return hash !== cachedHash && setCache([_getArrayProp(val, defaultVal), hash]), cachedVal;
|
|
156
156
|
}
|
|
@@ -184,7 +184,7 @@ function useClickOutside(listener, t0, boundaryElement) {
|
|
|
184
184
|
}
|
|
185
185
|
}, t3 = [element, elementsArg], $[3] = element, $[4] = elementsArg, $[5] = t2, $[6] = t3) : (t2 = $[5], t3 = $[6]), react.useEffect(t2, t3);
|
|
186
186
|
let t4, t5;
|
|
187
|
-
return $[7] !==
|
|
187
|
+
return $[7] !== boundaryElement || $[8] !== elements || $[9] !== listener ? (t4 = () => {
|
|
188
188
|
if (!listener)
|
|
189
189
|
return;
|
|
190
190
|
const handleWindowMouseDown = (evt) => {
|
|
@@ -199,12 +199,12 @@ function useClickOutside(listener, t0, boundaryElement) {
|
|
|
199
199
|
return window.addEventListener("mousedown", handleWindowMouseDown), () => {
|
|
200
200
|
window.removeEventListener("mousedown", handleWindowMouseDown);
|
|
201
201
|
};
|
|
202
|
-
}, t5 = [boundaryElement, listener, elements], $[7] =
|
|
202
|
+
}, t5 = [boundaryElement, listener, elements], $[7] = boundaryElement, $[8] = elements, $[9] = listener, $[10] = t4, $[11] = t5) : (t4 = $[10], t5 = $[11]), react.useEffect(t4, t5), setElement;
|
|
203
203
|
}
|
|
204
204
|
function useClickOutsideEvent(listener, t0, boundaryElement) {
|
|
205
|
-
const $ = reactCompilerRuntime.c(8), elementsArg = t0 === void 0 ? _temp$
|
|
205
|
+
const $ = reactCompilerRuntime.c(8), elementsArg = t0 === void 0 ? _temp$b : t0;
|
|
206
206
|
let t1;
|
|
207
|
-
$[0] !==
|
|
207
|
+
$[0] !== boundaryElement || $[1] !== elementsArg || $[2] !== listener ? (t1 = (evt) => {
|
|
208
208
|
if (!listener)
|
|
209
209
|
return;
|
|
210
210
|
const target = evt.target;
|
|
@@ -218,7 +218,7 @@ function useClickOutsideEvent(listener, t0, boundaryElement) {
|
|
|
218
218
|
if (el && (target === el || el.contains(target)))
|
|
219
219
|
return;
|
|
220
220
|
listener(evt);
|
|
221
|
-
}, $[0] =
|
|
221
|
+
}, $[0] = boundaryElement, $[1] = elementsArg, $[2] = listener, $[3] = t1) : t1 = $[3];
|
|
222
222
|
const onEvent = useEffectEvent.useEffectEvent(t1), hasListener = !!listener;
|
|
223
223
|
let t2, t3;
|
|
224
224
|
$[4] !== hasListener || $[5] !== onEvent ? (t2 = () => {
|
|
@@ -230,15 +230,15 @@ function useClickOutsideEvent(listener, t0, boundaryElement) {
|
|
|
230
230
|
};
|
|
231
231
|
}, t3 = [hasListener, onEvent], $[4] = hasListener, $[5] = onEvent, $[6] = t2, $[7] = t3) : (t2 = $[6], t3 = $[7]), react.useEffect(t2, t3), react.useDebugValue(listener ? "MouseDown On" : "MouseDown Off");
|
|
232
232
|
}
|
|
233
|
-
function _temp$
|
|
233
|
+
function _temp$b() {
|
|
234
234
|
return EMPTY_ARRAY;
|
|
235
235
|
}
|
|
236
236
|
function useCustomValidity(ref, customValidity) {
|
|
237
237
|
const $ = reactCompilerRuntime.c(6);
|
|
238
238
|
let t0;
|
|
239
|
-
$[0] !==
|
|
239
|
+
$[0] !== customValidity || $[1] !== ref.current ? (t0 = () => {
|
|
240
240
|
ref.current?.setCustomValidity(customValidity || "");
|
|
241
|
-
}, $[0] =
|
|
241
|
+
}, $[0] = customValidity, $[1] = ref.current, $[2] = t0) : t0 = $[2];
|
|
242
242
|
let t1;
|
|
243
243
|
$[3] !== customValidity || $[4] !== ref ? (t1 = [customValidity, ref], $[3] = customValidity, $[4] = ref, $[5] = t1) : t1 = $[5], react.useEffect(t0, t1);
|
|
244
244
|
}
|
|
@@ -587,19 +587,20 @@ function useGlobalKeyDown(onKeyDown) {
|
|
|
587
587
|
return $[0] !== onKeyDown ? (t0 = () => (addEventListener("keydown", onKeyDown), () => removeEventListener("keydown", onKeyDown)), t1 = [onKeyDown], $[0] = onKeyDown, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), react.useEffect(t0, t1);
|
|
588
588
|
}
|
|
589
589
|
function useMatchMedia(mediaQueryString, getServerSnapshot2) {
|
|
590
|
-
const $ = reactCompilerRuntime.c(4);
|
|
591
|
-
let t0, t1;
|
|
592
|
-
$[0] !== mediaQueryString ? (t1 = typeof window > "u" ? null : window.matchMedia(mediaQueryString), $[0] = mediaQueryString, $[1] = t1) : t1 = $[1], t0 = t1;
|
|
593
|
-
const cachedMatchMedia = t0;
|
|
594
|
-
let t2, t3;
|
|
595
|
-
$[2] !== cachedMatchMedia ? (t3 = {
|
|
596
|
-
subscribe: (onStoreChange) => (cachedMatchMedia.addEventListener("change", onStoreChange), () => cachedMatchMedia.removeEventListener("change", onStoreChange)),
|
|
597
|
-
getSnapshot: () => cachedMatchMedia.matches
|
|
598
|
-
}, $[2] = cachedMatchMedia, $[3] = t3) : t3 = $[3], t2 = t3;
|
|
599
590
|
const {
|
|
600
591
|
subscribe: subscribe2,
|
|
601
592
|
getSnapshot
|
|
602
|
-
} =
|
|
593
|
+
} = react.useMemo(() => {
|
|
594
|
+
let MEDIA_QUERY_CACHE;
|
|
595
|
+
const getMatchMedia = () => (MEDIA_QUERY_CACHE || (MEDIA_QUERY_CACHE = window.matchMedia(mediaQueryString)), MEDIA_QUERY_CACHE);
|
|
596
|
+
return {
|
|
597
|
+
subscribe: (onStoreChange) => {
|
|
598
|
+
const matchMedia = getMatchMedia();
|
|
599
|
+
return matchMedia.addEventListener("change", onStoreChange), () => matchMedia.removeEventListener("change", onStoreChange);
|
|
600
|
+
},
|
|
601
|
+
getSnapshot: () => getMatchMedia().matches
|
|
602
|
+
};
|
|
603
|
+
}, [mediaQueryString]);
|
|
603
604
|
return react.useDebugValue(mediaQueryString), react.useSyncExternalStore(subscribe2, getSnapshot, getServerSnapshot2);
|
|
604
605
|
}
|
|
605
606
|
function getGlobalScope() {
|
|
@@ -649,9 +650,9 @@ function ThemeProvider(props) {
|
|
|
649
650
|
return $[8] === Symbol.for("react.memo_cache_sentinel") ? (t22 = /* @__PURE__ */ jsxRuntime.jsx("pre", { children: 'ThemeProvider: no "theme" property provided' }), $[8] = t22) : t22 = $[8], t22;
|
|
650
651
|
}
|
|
651
652
|
let t2;
|
|
652
|
-
$[9] !==
|
|
653
|
+
$[9] !== children || $[10] !== theme$1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(styledComponents.ThemeProvider, { theme: theme$1, children }), $[9] = children, $[10] = theme$1, $[11] = t2) : t2 = $[11];
|
|
653
654
|
let t3;
|
|
654
|
-
return $[12] !==
|
|
655
|
+
return $[12] !== t2 || $[13] !== themeContext ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: themeContext, children: t2 }), $[12] = t2, $[13] = themeContext, $[14] = t3) : t3 = $[14], t3;
|
|
655
656
|
}
|
|
656
657
|
ThemeProvider.displayName = "ThemeProvider";
|
|
657
658
|
function useRootTheme() {
|
|
@@ -667,7 +668,7 @@ function ThemeColorProvider(props) {
|
|
|
667
668
|
tone
|
|
668
669
|
} = props, root = useRootTheme(), t0 = scheme || root.scheme;
|
|
669
670
|
let t1;
|
|
670
|
-
return $[0] !==
|
|
671
|
+
return $[0] !== children || $[1] !== root.theme || $[2] !== t0 || $[3] !== tone ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { scheme: t0, theme: root.theme, tone, children }), $[0] = children, $[1] = root.theme, $[2] = t0, $[3] = tone, $[4] = t1) : t1 = $[4], t1;
|
|
671
672
|
}
|
|
672
673
|
ThemeColorProvider.displayName = "ThemeColorProvider";
|
|
673
674
|
function useTheme() {
|
|
@@ -736,15 +737,15 @@ function useMediaIndex() {
|
|
|
736
737
|
return react.useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot);
|
|
737
738
|
}
|
|
738
739
|
function usePrefersDark(t0) {
|
|
739
|
-
return useMatchMedia("(prefers-color-scheme: dark)", t0 === void 0 ? _temp$
|
|
740
|
+
return useMatchMedia("(prefers-color-scheme: dark)", t0 === void 0 ? _temp$a : t0);
|
|
740
741
|
}
|
|
741
|
-
function _temp$
|
|
742
|
+
function _temp$a() {
|
|
742
743
|
return !1;
|
|
743
744
|
}
|
|
744
745
|
function usePrefersReducedMotion(t0) {
|
|
745
|
-
return useMatchMedia("(prefers-reduced-motion: reduce)", t0 === void 0 ? _temp$
|
|
746
|
+
return useMatchMedia("(prefers-reduced-motion: reduce)", t0 === void 0 ? _temp$9 : t0);
|
|
746
747
|
}
|
|
747
|
-
function _temp$
|
|
748
|
+
function _temp$9() {
|
|
748
749
|
return !1;
|
|
749
750
|
}
|
|
750
751
|
function responsiveBorderStyle() {
|
|
@@ -1460,7 +1461,7 @@ const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAl
|
|
|
1460
1461
|
overflow: clip;
|
|
1461
1462
|
`, Label = react.forwardRef(function(props, ref) {
|
|
1462
1463
|
const $ = reactCompilerRuntime.c(22);
|
|
1463
|
-
let
|
|
1464
|
+
let accent, align, childrenProp, restProps, t0, t1, textOverflow, weight;
|
|
1464
1465
|
$[0] !== props ? ({
|
|
1465
1466
|
accent,
|
|
1466
1467
|
align,
|
|
@@ -1470,7 +1471,7 @@ const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAl
|
|
|
1470
1471
|
textOverflow,
|
|
1471
1472
|
weight,
|
|
1472
1473
|
...restProps
|
|
1473
|
-
} = props, $[0] = props, $[1] =
|
|
1474
|
+
} = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = childrenProp, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = textOverflow, $[8] = weight) : (accent = $[1], align = $[2], childrenProp = $[3], restProps = $[4], t0 = $[5], t1 = $[6], textOverflow = $[7], weight = $[8]);
|
|
1474
1475
|
const muted = t0 === void 0 ? !1 : t0, size2 = t1 === void 0 ? 2 : t1;
|
|
1475
1476
|
let children = childrenProp;
|
|
1476
1477
|
if (textOverflow === "ellipsis") {
|
|
@@ -1482,7 +1483,7 @@ const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAl
|
|
|
1482
1483
|
}
|
|
1483
1484
|
const t2 = useArrayProp(align), t3 = useArrayProp(size2);
|
|
1484
1485
|
let t4;
|
|
1485
|
-
return $[13] !==
|
|
1486
|
+
return $[13] !== accent || $[14] !== children || $[15] !== muted || $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== weight ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Root$C, { "data-ui": "Label", ...restProps, $accent: accent, $align: t2, $muted: muted, $size: t3, $weight: weight, ref, children }), $[13] = accent, $[14] = children, $[15] = muted, $[16] = ref, $[17] = restProps, $[18] = t2, $[19] = t3, $[20] = weight, $[21] = t4) : t4 = $[21], t4;
|
|
1486
1487
|
});
|
|
1487
1488
|
Label.displayName = "ForwardRef(Label)";
|
|
1488
1489
|
const avatarStyle = {
|
|
@@ -1631,8 +1632,8 @@ function avatarStrokeStyle() {
|
|
|
1631
1632
|
const Root$B = styledComponents.styled.div(responsiveAvatarSizeStyle, avatarStyle.root), Arrow$1 = styledComponents.styled.div(avatarStyle.arrow), BgStroke = styledComponents.styled.ellipse(avatarStyle.bgStroke), Stroke = styledComponents.styled.ellipse(avatarStyle.stroke), Initials = styledComponents.styled.div(avatarStyle.initials), InitialsLabel = styledComponents.styled(Label)({
|
|
1632
1633
|
color: "inherit"
|
|
1633
1634
|
}), Image = styledComponents.styled.svg(avatarStyle.image), Avatar = react.forwardRef(function(props, ref) {
|
|
1634
|
-
const $ = reactCompilerRuntime.c(
|
|
1635
|
-
let
|
|
1635
|
+
const $ = reactCompilerRuntime.c(52);
|
|
1636
|
+
let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, restProps, src, t0, t1, t2, title;
|
|
1636
1637
|
$[0] !== props ? ({
|
|
1637
1638
|
__unstable_hideInnerStroke,
|
|
1638
1639
|
as: asProp,
|
|
@@ -1646,7 +1647,7 @@ const Root$B = styledComponents.styled.div(responsiveAvatarSizeStyle, avatarStyl
|
|
|
1646
1647
|
status: t1,
|
|
1647
1648
|
size: t2,
|
|
1648
1649
|
...restProps
|
|
1649
|
-
} = props, $[0] = props, $[1] =
|
|
1650
|
+
} = props, $[0] = props, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = asProp, $[5] = initials, $[6] = onImageLoadError, $[7] = restProps, $[8] = src, $[9] = t0, $[10] = t1, $[11] = t2, $[12] = title) : (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], asProp = $[4], initials = $[5], onImageLoadError = $[6], restProps = $[7], src = $[8], t0 = $[9], t1 = $[10], t2 = $[11], title = $[12]);
|
|
1650
1651
|
const color = t0 === void 0 ? "gray" : t0, status = t1 === void 0 ? "online" : t1, sizeProp = t2 === void 0 ? 1 : t2, {
|
|
1651
1652
|
avatar
|
|
1652
1653
|
} = useTheme_v2(), as = ReactIs__default.default.isValidElementType(asProp) ? asProp : "div", size2 = useArrayProp(sizeProp), _sizeRem = (avatar.sizes[size2[0]] || avatar.sizes[0]).size, _radius = _sizeRem / 2, elementId = react.useId(), [arrowPosition, setArrowPosition] = react.useState(animateArrowFrom || arrowPositionProp || "inside"), [imageFailed, setImageFailed] = react.useState(!1), imageId = `avatar-image-${elementId}`;
|
|
@@ -1667,32 +1668,30 @@ const Root$B = styledComponents.styled.div(responsiveAvatarSizeStyle, avatarStyl
|
|
|
1667
1668
|
}, $[20] = onImageLoadError, $[21] = t7) : t7 = $[21];
|
|
1668
1669
|
const handleImageError = t7;
|
|
1669
1670
|
let t8, t9;
|
|
1670
|
-
|
|
1671
|
-
let t102;
|
|
1672
|
-
$[24] === Symbol.for("react.memo_cache_sentinel") ? (t102 = (s) => s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0, $[24] = t102) : t102 = $[24], t9 = size2.map(t102), $[22] = size2, $[23] = t9;
|
|
1673
|
-
} else
|
|
1674
|
-
t9 = $[23];
|
|
1675
|
-
t8 = t9;
|
|
1671
|
+
$[22] !== size2 ? (t9 = size2.map(_temp$8), $[22] = size2, $[23] = t9) : t9 = $[23], t8 = t9;
|
|
1676
1672
|
const initialsSize = t8, t10 = typeof as == "string" ? as : void 0;
|
|
1677
1673
|
let t11;
|
|
1678
|
-
$[
|
|
1674
|
+
$[24] !== color ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Arrow$1, { children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }), $[24] = color, $[25] = t11) : t11 = $[25];
|
|
1679
1675
|
let t12;
|
|
1680
|
-
$[
|
|
1676
|
+
$[26] !== __unstable_hideInnerStroke || $[27] !== _radius || $[28] !== _sizeRem || $[29] !== handleImageError || $[30] !== imageFailed || $[31] !== imageId || $[32] !== src ? (t12 = !imageFailed && src && /* @__PURE__ */ jsxRuntime.jsxs(Image, { viewBox: `0 0 ${_sizeRem} ${_sizeRem}`, fill: "none", children: [
|
|
1681
1677
|
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("pattern", { id: imageId, patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ jsxRuntime.jsx("image", { href: src, width: "1", height: "1", onError: handleImageError }) }) }),
|
|
1682
1678
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: _radius, cy: _radius, r: _radius, fill: `url(#${imageId})` }),
|
|
1683
1679
|
!__unstable_hideInnerStroke && /* @__PURE__ */ jsxRuntime.jsx(BgStroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" }),
|
|
1684
1680
|
/* @__PURE__ */ jsxRuntime.jsx(Stroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" })
|
|
1685
|
-
] }), $[
|
|
1681
|
+
] }), $[26] = __unstable_hideInnerStroke, $[27] = _radius, $[28] = _sizeRem, $[29] = handleImageError, $[30] = imageFailed, $[31] = imageId, $[32] = src, $[33] = t12) : t12 = $[33];
|
|
1686
1682
|
let t13;
|
|
1687
|
-
$[
|
|
1683
|
+
$[34] !== imageFailed || $[35] !== initials || $[36] !== initialsSize || $[37] !== src ? (t13 = (imageFailed || !src) && initials && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(Initials, { children: /* @__PURE__ */ jsxRuntime.jsx(InitialsLabel, { forwardedAs: "span", size: initialsSize, weight: "medium", children: initials }) }) }), $[34] = imageFailed, $[35] = initials, $[36] = initialsSize, $[37] = src, $[38] = t13) : t13 = $[38];
|
|
1688
1684
|
let t14;
|
|
1689
|
-
return $[40] !== as || $[41] !==
|
|
1685
|
+
return $[39] !== arrowPosition || $[40] !== as || $[41] !== color || $[42] !== ref || $[43] !== restProps || $[44] !== size2 || $[45] !== status || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== title ? (t14 = /* @__PURE__ */ jsxRuntime.jsxs(Root$B, { as, "data-as": t10, "data-ui": "Avatar", ...restProps, $color: color, $size: size2, "aria-label": title, "data-arrow-position": arrowPosition, "data-status": status, ref, title, children: [
|
|
1690
1686
|
t11,
|
|
1691
1687
|
t12,
|
|
1692
1688
|
t13
|
|
1693
|
-
] }), $[40] = as, $[41] =
|
|
1689
|
+
] }), $[39] = arrowPosition, $[40] = as, $[41] = color, $[42] = ref, $[43] = restProps, $[44] = size2, $[45] = status, $[46] = t10, $[47] = t11, $[48] = t12, $[49] = t13, $[50] = title, $[51] = t14) : t14 = $[51], t14;
|
|
1694
1690
|
});
|
|
1695
1691
|
Avatar.displayName = "ForwardRef(Avatar)";
|
|
1692
|
+
function _temp$8(s) {
|
|
1693
|
+
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
1694
|
+
}
|
|
1696
1695
|
function _responsiveAvatarCounterSizeStyle(props) {
|
|
1697
1696
|
const {
|
|
1698
1697
|
avatar,
|
|
@@ -1730,24 +1729,22 @@ function _avatarCounterBaseStyle(props) {
|
|
|
1730
1729
|
`;
|
|
1731
1730
|
}
|
|
1732
1731
|
const Root$A = styledComponents.styled.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle), AvatarCounter = react.forwardRef(function(props, ref) {
|
|
1733
|
-
const $ = reactCompilerRuntime.c(
|
|
1732
|
+
const $ = reactCompilerRuntime.c(9), {
|
|
1734
1733
|
count,
|
|
1735
1734
|
size: t0
|
|
1736
1735
|
} = props, size2 = useArrayProp(t0 === void 0 ? 1 : t0);
|
|
1737
1736
|
let t1, t2;
|
|
1738
|
-
|
|
1739
|
-
let t32;
|
|
1740
|
-
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t32 = (s) => s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0, $[2] = t32) : t32 = $[2], t2 = size2.map(t32), $[0] = size2, $[1] = t2;
|
|
1741
|
-
} else
|
|
1742
|
-
t2 = $[1];
|
|
1743
|
-
t1 = t2;
|
|
1737
|
+
$[0] !== size2 ? (t2 = size2.map(_temp$7), $[0] = size2, $[1] = t2) : t2 = $[1], t1 = t2;
|
|
1744
1738
|
const fontSize2 = t1;
|
|
1745
1739
|
let t3;
|
|
1746
|
-
$[
|
|
1740
|
+
$[2] !== count || $[3] !== fontSize2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Label, { as: "span", size: fontSize2, weight: "medium", children: count }), $[2] = count, $[3] = fontSize2, $[4] = t3) : t3 = $[4];
|
|
1747
1741
|
let t4;
|
|
1748
|
-
return $[
|
|
1742
|
+
return $[5] !== ref || $[6] !== size2 || $[7] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Root$A, { $size: size2, "data-ui": "AvatarCounter", ref, children: t3 }), $[5] = ref, $[6] = size2, $[7] = t3, $[8] = t4) : t4 = $[8], t4;
|
|
1749
1743
|
});
|
|
1750
1744
|
AvatarCounter.displayName = "ForwardRef(AvatarCounter)";
|
|
1745
|
+
function _temp$7(s) {
|
|
1746
|
+
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
1747
|
+
}
|
|
1751
1748
|
const BASE_STYLES = styledComponents.css`
|
|
1752
1749
|
white-space: nowrap;
|
|
1753
1750
|
|
|
@@ -1778,13 +1775,13 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
1778
1775
|
}
|
|
1779
1776
|
const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = react.forwardRef(function(props, ref) {
|
|
1780
1777
|
const $ = reactCompilerRuntime.c(15);
|
|
1781
|
-
let
|
|
1778
|
+
let childrenProp, restProps, t0, t1;
|
|
1782
1779
|
$[0] !== props ? ({
|
|
1783
1780
|
children: childrenProp,
|
|
1784
1781
|
maxLength: t0,
|
|
1785
1782
|
size: t1,
|
|
1786
1783
|
...restProps
|
|
1787
|
-
} = props, $[0] = props, $[1] =
|
|
1784
|
+
} = props, $[0] = props, $[1] = childrenProp, $[2] = restProps, $[3] = t0, $[4] = t1) : (childrenProp = $[1], restProps = $[2], t0 = $[3], t1 = $[4]);
|
|
1788
1785
|
const maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, children = react.Children.toArray(childrenProp).filter(react.isValidElement), maxLength = Math.max(maxLengthProp, 0), size2 = useArrayProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children, T0 = Root$z, t2 = "AvatarStack", t3 = len === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: len, size: size2 }) }), t4 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: extraCount, size: size2 }) });
|
|
1789
1786
|
let t5;
|
|
1790
1787
|
$[5] !== size2 ? (t5 = (child, childIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: react.cloneElement(child, {
|
|
@@ -1792,16 +1789,16 @@ const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avata
|
|
|
1792
1789
|
}) }, String(childIndex)), $[5] = size2, $[6] = t5) : t5 = $[6];
|
|
1793
1790
|
const t6 = visibleChildren.map(t5);
|
|
1794
1791
|
let t7;
|
|
1795
|
-
return $[7] !== T0 || $[8] !==
|
|
1792
|
+
return $[7] !== T0 || $[8] !== ref || $[9] !== restProps || $[10] !== size2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsxs(T0, { "data-ui": t2, ...restProps, ref, $size: size2, children: [
|
|
1796
1793
|
t3,
|
|
1797
1794
|
t4,
|
|
1798
1795
|
t6
|
|
1799
|
-
] }), $[7] = T0, $[8] =
|
|
1796
|
+
] }), $[7] = T0, $[8] = ref, $[9] = restProps, $[10] = size2, $[11] = t3, $[12] = t4, $[13] = t6, $[14] = t7) : t7 = $[14], t7;
|
|
1800
1797
|
});
|
|
1801
1798
|
AvatarStack.displayName = "ForwardRef(AvatarStack)";
|
|
1802
1799
|
const Root$y = styledComponents.styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box = react.forwardRef(function(props, ref) {
|
|
1803
1800
|
const $ = reactCompilerRuntime.c(59);
|
|
1804
|
-
let
|
|
1801
|
+
let column, columnEnd, columnStart, flex, height, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, overflow, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, restProps, row, rowEnd, rowStart, sizing, t0, t1, t2, t3;
|
|
1805
1802
|
$[0] !== props ? ({
|
|
1806
1803
|
as: t0,
|
|
1807
1804
|
column,
|
|
@@ -1830,10 +1827,10 @@ const Root$y = styledComponents.styled.div(boxStyle, flexItemStyle, responsiveBo
|
|
|
1830
1827
|
rowEnd,
|
|
1831
1828
|
sizing,
|
|
1832
1829
|
...restProps
|
|
1833
|
-
} = props, $[0] = props, $[1] =
|
|
1830
|
+
} = props, $[0] = props, $[1] = column, $[2] = columnEnd, $[3] = columnStart, $[4] = flex, $[5] = height, $[6] = marginBottom, $[7] = marginLeft, $[8] = marginRight, $[9] = marginTop, $[10] = marginX, $[11] = marginY, $[12] = overflow, $[13] = paddingBottom, $[14] = paddingLeft, $[15] = paddingRight, $[16] = paddingTop, $[17] = paddingX, $[18] = paddingY, $[19] = restProps, $[20] = row, $[21] = rowEnd, $[22] = rowStart, $[23] = sizing, $[24] = t0, $[25] = t1, $[26] = t2, $[27] = t3) : (column = $[1], columnEnd = $[2], columnStart = $[3], flex = $[4], height = $[5], marginBottom = $[6], marginLeft = $[7], marginRight = $[8], marginTop = $[9], marginX = $[10], marginY = $[11], overflow = $[12], paddingBottom = $[13], paddingLeft = $[14], paddingRight = $[15], paddingTop = $[16], paddingX = $[17], paddingY = $[18], restProps = $[19], row = $[20], rowEnd = $[21], rowStart = $[22], sizing = $[23], t0 = $[24], t1 = $[25], t2 = $[26], t3 = $[27]);
|
|
1834
1831
|
const asProp = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 0 : t3, t4 = typeof asProp == "string" ? asProp : void 0, t5 = useArrayProp(column), t6 = useArrayProp(columnStart), t7 = useArrayProp(columnEnd), t8 = useArrayProp(display), t9 = useArrayProp(flex), t10 = useArrayProp(height), t11 = useArrayProp(margin), t12 = useArrayProp(marginX), t13 = useArrayProp(marginY), t14 = useArrayProp(marginTop), t15 = useArrayProp(marginRight), t16 = useArrayProp(marginBottom), t17 = useArrayProp(marginLeft), t18 = useArrayProp(overflow), t19 = useArrayProp(padding), t20 = useArrayProp(paddingX), t21 = useArrayProp(paddingY), t22 = useArrayProp(paddingTop), t23 = useArrayProp(paddingRight), t24 = useArrayProp(paddingBottom), t25 = useArrayProp(paddingLeft), t26 = useArrayProp(row), t27 = useArrayProp(rowStart), t28 = useArrayProp(rowEnd), t29 = useArrayProp(sizing);
|
|
1835
1832
|
let t30;
|
|
1836
|
-
return $[28] !==
|
|
1833
|
+
return $[28] !== asProp || $[29] !== props.children || $[30] !== ref || $[31] !== restProps || $[32] !== t10 || $[33] !== t11 || $[34] !== t12 || $[35] !== t13 || $[36] !== t14 || $[37] !== t15 || $[38] !== t16 || $[39] !== t17 || $[40] !== t18 || $[41] !== t19 || $[42] !== t20 || $[43] !== t21 || $[44] !== t22 || $[45] !== t23 || $[46] !== t24 || $[47] !== t25 || $[48] !== t26 || $[49] !== t27 || $[50] !== t28 || $[51] !== t29 || $[52] !== t4 || $[53] !== t5 || $[54] !== t6 || $[55] !== t7 || $[56] !== t8 || $[57] !== t9 ? (t30 = /* @__PURE__ */ jsxRuntime.jsx(Root$y, { "data-as": t4, "data-ui": "Box", ...restProps, $column: t5, $columnStart: t6, $columnEnd: t7, $display: t8, $flex: t9, $height: t10, $margin: t11, $marginX: t12, $marginY: t13, $marginTop: t14, $marginRight: t15, $marginBottom: t16, $marginLeft: t17, $overflow: t18, $padding: t19, $paddingX: t20, $paddingY: t21, $paddingTop: t22, $paddingRight: t23, $paddingBottom: t24, $paddingLeft: t25, $row: t26, $rowStart: t27, $rowEnd: t28, $sizing: t29, as: asProp, ref, children: props.children }), $[28] = asProp, $[29] = props.children, $[30] = ref, $[31] = restProps, $[32] = t10, $[33] = t11, $[34] = t12, $[35] = t13, $[36] = t14, $[37] = t15, $[38] = t16, $[39] = t17, $[40] = t18, $[41] = t19, $[42] = t20, $[43] = t21, $[44] = t22, $[45] = t23, $[46] = t24, $[47] = t25, $[48] = t26, $[49] = t27, $[50] = t28, $[51] = t29, $[52] = t4, $[53] = t5, $[54] = t6, $[55] = t7, $[56] = t8, $[57] = t9, $[58] = t30) : t30 = $[58], t30;
|
|
1837
1834
|
});
|
|
1838
1835
|
Box.displayName = "ForwardRef(Box)";
|
|
1839
1836
|
function textBaseStyle(props) {
|
|
@@ -1912,7 +1909,7 @@ const Root$x = styledComponents.styled.div(responsiveTextFont, responsiveTextAli
|
|
|
1912
1909
|
overflow: clip;
|
|
1913
1910
|
`, Text = react.forwardRef(function(props, ref) {
|
|
1914
1911
|
const $ = reactCompilerRuntime.c(22);
|
|
1915
|
-
let
|
|
1912
|
+
let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
|
|
1916
1913
|
$[0] !== props ? ({
|
|
1917
1914
|
accent: t0,
|
|
1918
1915
|
align,
|
|
@@ -1922,7 +1919,7 @@ const Root$x = styledComponents.styled.div(responsiveTextFont, responsiveTextAli
|
|
|
1922
1919
|
textOverflow,
|
|
1923
1920
|
weight,
|
|
1924
1921
|
...restProps
|
|
1925
|
-
} = props, $[0] = props, $[1] =
|
|
1922
|
+
} = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = textOverflow, $[8] = weight) : (align = $[1], childrenProp = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], textOverflow = $[7], weight = $[8]);
|
|
1926
1923
|
const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
|
|
1927
1924
|
let children = childrenProp;
|
|
1928
1925
|
if (textOverflow === "ellipsis") {
|
|
@@ -1933,7 +1930,7 @@ const Root$x = styledComponents.styled.div(responsiveTextFont, responsiveTextAli
|
|
|
1933
1930
|
let t5;
|
|
1934
1931
|
$[11] !== children ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { children }), $[11] = children, $[12] = t5) : t5 = $[12];
|
|
1935
1932
|
let t6;
|
|
1936
|
-
return $[13] !==
|
|
1933
|
+
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$x, { "data-ui": "Text", ...restProps, $accent: accent, $align: t3, $muted: muted, ref, $size: t4, $weight: weight, children: t5 }), $[13] = accent, $[14] = muted, $[15] = ref, $[16] = restProps, $[17] = t3, $[18] = t4, $[19] = t5, $[20] = weight, $[21] = t6) : t6 = $[21], t6;
|
|
1937
1934
|
});
|
|
1938
1935
|
Text.displayName = "ForwardRef(Text)";
|
|
1939
1936
|
function badgeStyle(props) {
|
|
@@ -1953,7 +1950,7 @@ function badgeStyle(props) {
|
|
|
1953
1950
|
}
|
|
1954
1951
|
const Root$w = styledComponents.styled(Box)(responsiveRadiusStyle, badgeStyle), Badge = react.forwardRef(function(props, ref) {
|
|
1955
1952
|
const $ = reactCompilerRuntime.c(17);
|
|
1956
|
-
let t0, t1, t2, t3
|
|
1953
|
+
let children, restProps, t0, t1, t2, t3;
|
|
1957
1954
|
if ($[0] !== props) {
|
|
1958
1955
|
const {
|
|
1959
1956
|
children: t42,
|
|
@@ -1964,19 +1961,19 @@ const Root$w = styledComponents.styled(Box)(responsiveRadiusStyle, badgeStyle),
|
|
|
1964
1961
|
tone: t8,
|
|
1965
1962
|
...t9
|
|
1966
1963
|
} = props;
|
|
1967
|
-
children = t42, t0 = t52, t1 = t62, t2 = t72, t3 = t8, restProps = t9, $[0] = props, $[1] =
|
|
1964
|
+
children = t42, t0 = t52, t1 = t62, t2 = t72, t3 = t8, restProps = t9, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2, $[6] = t3;
|
|
1968
1965
|
} else
|
|
1969
|
-
|
|
1966
|
+
children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5], t3 = $[6];
|
|
1970
1967
|
const fontSize2 = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? "full" : t2, tone = t3 === void 0 ? "default" : t3, t4 = useArrayProp(radius), t5 = useArrayProp(padding);
|
|
1971
1968
|
let t6;
|
|
1972
|
-
$[7] !==
|
|
1969
|
+
$[7] !== children || $[8] !== fontSize2 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children }), $[7] = children, $[8] = fontSize2, $[9] = t6) : t6 = $[9];
|
|
1973
1970
|
let t7;
|
|
1974
|
-
return $[10] !==
|
|
1971
|
+
return $[10] !== ref || $[11] !== restProps || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== tone ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Root$w, { "data-ui": "Badge", ...restProps, $tone: tone, $radius: t4, padding: t5, ref, children: t6 }), $[10] = ref, $[11] = restProps, $[12] = t4, $[13] = t5, $[14] = t6, $[15] = tone, $[16] = t7) : t7 = $[16], t7;
|
|
1975
1972
|
});
|
|
1976
1973
|
Badge.displayName = "ForwardRef(Badge)";
|
|
1977
1974
|
const Root$v = styledComponents.styled(Box)(flexItemStyle, responsiveFlexStyle), Flex = react.forwardRef(function(props, ref) {
|
|
1978
1975
|
const $ = reactCompilerRuntime.c(17);
|
|
1979
|
-
let
|
|
1976
|
+
let align, as, gap, justify, restProps, t0, wrap;
|
|
1980
1977
|
$[0] !== props ? ({
|
|
1981
1978
|
align,
|
|
1982
1979
|
as,
|
|
@@ -1985,10 +1982,10 @@ const Root$v = styledComponents.styled(Box)(flexItemStyle, responsiveFlexStyle),
|
|
|
1985
1982
|
justify,
|
|
1986
1983
|
wrap,
|
|
1987
1984
|
...restProps
|
|
1988
|
-
} = props, $[0] = props, $[1] =
|
|
1985
|
+
} = props, $[0] = props, $[1] = align, $[2] = as, $[3] = gap, $[4] = justify, $[5] = restProps, $[6] = t0, $[7] = wrap) : (align = $[1], as = $[2], gap = $[3], justify = $[4], restProps = $[5], t0 = $[6], wrap = $[7]);
|
|
1989
1986
|
const direction = t0 === void 0 ? "row" : t0, t1 = useArrayProp(align), t2 = useArrayProp(direction), t3 = useArrayProp(gap), t4 = useArrayProp(justify), t5 = useArrayProp(wrap);
|
|
1990
1987
|
let t6;
|
|
1991
|
-
return $[8] !==
|
|
1988
|
+
return $[8] !== as || $[9] !== ref || $[10] !== restProps || $[11] !== t1 || $[12] !== t2 || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$v, { "data-ui": "Flex", ...restProps, $align: t1, $direction: t2, $gap: t3, $justify: t4, $wrap: t5, forwardedAs: as, ref }), $[8] = as, $[9] = ref, $[10] = restProps, $[11] = t1, $[12] = t2, $[13] = t3, $[14] = t4, $[15] = t5, $[16] = t6) : t6 = $[16], t6;
|
|
1992
1989
|
});
|
|
1993
1990
|
Flex.displayName = "ForwardRef(Flex)";
|
|
1994
1991
|
const rotate$1 = styledComponents.keyframes`
|
|
@@ -2047,10 +2044,18 @@ function _cardColorStyle(base, color, checkered = !1) {
|
|
|
2047
2044
|
"--card-badge-default-dot-color": color.badge.default.dot,
|
|
2048
2045
|
"--card-badge-default-fg-color": color.badge.default.fg,
|
|
2049
2046
|
"--card-badge-default-icon-color": color.badge.default.icon,
|
|
2047
|
+
"--card-badge-neutral-bg-color": color.badge.neutral.bg,
|
|
2048
|
+
"--card-badge-neutral-dot-color": color.badge.neutral.dot,
|
|
2049
|
+
"--card-badge-neutral-fg-color": color.badge.neutral.fg,
|
|
2050
|
+
"--card-badge-neutral-icon-color": color.badge.neutral.icon,
|
|
2050
2051
|
"--card-badge-primary-bg-color": color.badge.primary.bg,
|
|
2051
2052
|
"--card-badge-primary-dot-color": color.badge.primary.dot,
|
|
2052
2053
|
"--card-badge-primary-fg-color": color.badge.primary.fg,
|
|
2053
2054
|
"--card-badge-primary-icon-color": color.badge.primary.icon,
|
|
2055
|
+
"--card-badge-suggest-bg-color": color.badge.suggest.bg,
|
|
2056
|
+
"--card-badge-suggest-dot-color": color.badge.suggest.dot,
|
|
2057
|
+
"--card-badge-suggest-fg-color": color.badge.suggest.fg,
|
|
2058
|
+
"--card-badge-suggest-icon-color": color.badge.suggest.icon,
|
|
2054
2059
|
"--card-badge-positive-bg-color": color.badge.positive.bg,
|
|
2055
2060
|
"--card-badge-positive-dot-color": color.badge.positive.dot,
|
|
2056
2061
|
"--card-badge-positive-fg-color": color.badge.positive.fg,
|
|
@@ -2186,7 +2191,7 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2186
2191
|
box-shadow: inherit;
|
|
2187
2192
|
`, Button = react.forwardRef(function(props, ref) {
|
|
2188
2193
|
const $ = reactCompilerRuntime.c(64);
|
|
2189
|
-
let
|
|
2194
|
+
let IconComponent, IconRightComponent, children, disabled, loading, paddingBottomProp, paddingLeftProp, paddingRightProp, paddingTopProp, paddingXProp, paddingYProp, restProps, selected, t0, t1, t2, t3, t4, t5, t6, t7, t8, text, textAlign, width;
|
|
2190
2195
|
$[0] !== props ? ({
|
|
2191
2196
|
children,
|
|
2192
2197
|
disabled,
|
|
@@ -2213,12 +2218,12 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2213
2218
|
muted: t8,
|
|
2214
2219
|
width,
|
|
2215
2220
|
...restProps
|
|
2216
|
-
} = props, $[0] = props, $[1] =
|
|
2221
|
+
} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = loading, $[6] = paddingBottomProp, $[7] = paddingLeftProp, $[8] = paddingRightProp, $[9] = paddingTopProp, $[10] = paddingXProp, $[11] = paddingYProp, $[12] = restProps, $[13] = selected, $[14] = t0, $[15] = t1, $[16] = t2, $[17] = t3, $[18] = t4, $[19] = t5, $[20] = t6, $[21] = t7, $[22] = t8, $[23] = text, $[24] = textAlign, $[25] = width) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], loading = $[5], paddingBottomProp = $[6], paddingLeftProp = $[7], paddingRightProp = $[8], paddingTopProp = $[9], paddingXProp = $[10], paddingYProp = $[11], restProps = $[12], selected = $[13], t0 = $[14], t1 = $[15], t2 = $[16], t3 = $[17], t4 = $[18], t5 = $[19], t6 = $[20], t7 = $[21], t8 = $[22], text = $[23], textAlign = $[24], width = $[25]);
|
|
2217
2222
|
const fontSize2 = t0 === void 0 ? 1 : t0, justifyProp = t1 === void 0 ? "center" : t1, mode = t2 === void 0 ? "default" : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, spaceProp = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, type = t7 === void 0 ? "button" : t7, muted = t8 === void 0 ? !1 : t8, {
|
|
2218
2223
|
button
|
|
2219
2224
|
} = useTheme_v2(), justify = useArrayProp(justifyProp), padding = useArrayProp(paddingProp), paddingX = useArrayProp(paddingXProp), paddingY = useArrayProp(paddingYProp), paddingTop = useArrayProp(paddingTopProp), paddingBottom = useArrayProp(paddingBottomProp), paddingLeft = useArrayProp(paddingLeftProp), paddingRight = useArrayProp(paddingRightProp), radius = useArrayProp(radiusProp), space = useArrayProp(spaceProp);
|
|
2220
2225
|
let t9, t10;
|
|
2221
|
-
$[26] !== padding || $[27] !==
|
|
2226
|
+
$[26] !== padding || $[27] !== paddingBottom || $[28] !== paddingLeft || $[29] !== paddingRight || $[30] !== paddingTop || $[31] !== paddingX || $[32] !== paddingY ? (t10 = {
|
|
2222
2227
|
padding,
|
|
2223
2228
|
paddingX,
|
|
2224
2229
|
paddingY,
|
|
@@ -2226,12 +2231,12 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2226
2231
|
paddingBottom,
|
|
2227
2232
|
paddingLeft,
|
|
2228
2233
|
paddingRight
|
|
2229
|
-
}, $[26] = padding, $[27] =
|
|
2234
|
+
}, $[26] = padding, $[27] = paddingBottom, $[28] = paddingLeft, $[29] = paddingRight, $[30] = paddingTop, $[31] = paddingX, $[32] = paddingY, $[33] = t10) : t10 = $[33], t9 = t10;
|
|
2230
2235
|
const boxProps = t9, t11 = !!(loading || disabled), t12 = selected ? "" : void 0, t13 = !!(loading || disabled);
|
|
2231
2236
|
let t14;
|
|
2232
2237
|
$[34] !== loading ? (t14 = !!loading && /* @__PURE__ */ jsxRuntime.jsx(LoadingBox, { children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) }), $[34] = loading, $[35] = t14) : t14 = $[35];
|
|
2233
2238
|
let t15;
|
|
2234
|
-
$[36] !== IconComponent || $[37] !==
|
|
2239
|
+
$[36] !== IconComponent || $[37] !== IconRightComponent || $[38] !== boxProps || $[39] !== button || $[40] !== fontSize2 || $[41] !== justify || $[42] !== muted || $[43] !== space || $[44] !== text || $[45] !== textAlign ? (t15 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...boxProps, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", justify, gap: space, children: [
|
|
2235
2240
|
IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
|
|
2236
2241
|
react.isValidElement(IconComponent) && IconComponent,
|
|
2237
2242
|
ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
@@ -2241,15 +2246,15 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2241
2246
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
2242
2247
|
ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
2243
2248
|
] })
|
|
2244
|
-
] }) }), $[36] = IconComponent, $[37] =
|
|
2249
|
+
] }) }), $[36] = IconComponent, $[37] = IconRightComponent, $[38] = boxProps, $[39] = button, $[40] = fontSize2, $[41] = justify, $[42] = muted, $[43] = space, $[44] = text, $[45] = textAlign, $[46] = t15) : t15 = $[46];
|
|
2245
2250
|
let t16;
|
|
2246
|
-
$[47] !==
|
|
2251
|
+
$[47] !== boxProps || $[48] !== children ? (t16 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...boxProps, children }), $[47] = boxProps, $[48] = children, $[49] = t16) : t16 = $[49];
|
|
2247
2252
|
let t17;
|
|
2248
|
-
return $[50] !==
|
|
2253
|
+
return $[50] !== mode || $[51] !== radius || $[52] !== ref || $[53] !== restProps || $[54] !== t11 || $[55] !== t12 || $[56] !== t13 || $[57] !== t14 || $[58] !== t15 || $[59] !== t16 || $[60] !== tone || $[61] !== type || $[62] !== width ? (t17 = /* @__PURE__ */ jsxRuntime.jsxs(Root$t, { "data-ui": "Button", ...restProps, $mode: mode, $radius: radius, $tone: tone, "data-disabled": t11, "data-selected": t12, disabled: t13, ref, type, $width: width, children: [
|
|
2249
2254
|
t14,
|
|
2250
2255
|
t15,
|
|
2251
2256
|
t16
|
|
2252
|
-
] }), $[50] =
|
|
2257
|
+
] }), $[50] = mode, $[51] = radius, $[52] = ref, $[53] = restProps, $[54] = t11, $[55] = t12, $[56] = t13, $[57] = t14, $[58] = t15, $[59] = t16, $[60] = tone, $[61] = type, $[62] = width, $[63] = t17) : t17 = $[63], t17;
|
|
2253
2258
|
});
|
|
2254
2259
|
Button.displayName = "ForwardRef(Button)";
|
|
2255
2260
|
function cardStyle(props) {
|
|
@@ -2402,7 +2407,7 @@ function cardColorStyle(props) {
|
|
|
2402
2407
|
}
|
|
2403
2408
|
const Root$s = styledComponents.styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = react.forwardRef(function(props, ref) {
|
|
2404
2409
|
const $ = reactCompilerRuntime.c(42);
|
|
2405
|
-
let
|
|
2410
|
+
let asProp, border2, borderBottom2, borderLeft2, borderRight2, borderTop2, muted, pressed, restProps, scheme, selected, shadow, t0, t1, t2, t3;
|
|
2406
2411
|
$[0] !== props ? ({
|
|
2407
2412
|
__unstable_checkered: t0,
|
|
2408
2413
|
__unstable_focusRing: t1,
|
|
@@ -2420,12 +2425,12 @@ const Root$s = styledComponents.styled(Box)(responsiveBorderStyle, responsiveRad
|
|
|
2420
2425
|
shadow,
|
|
2421
2426
|
tone: t3,
|
|
2422
2427
|
...restProps
|
|
2423
|
-
} = props, $[0] = props, $[1] =
|
|
2428
|
+
} = props, $[0] = props, $[1] = asProp, $[2] = border2, $[3] = borderBottom2, $[4] = borderLeft2, $[5] = borderRight2, $[6] = borderTop2, $[7] = muted, $[8] = pressed, $[9] = restProps, $[10] = scheme, $[11] = selected, $[12] = shadow, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3) : (asProp = $[1], border2 = $[2], borderBottom2 = $[3], borderLeft2 = $[4], borderRight2 = $[5], borderTop2 = $[6], muted = $[7], pressed = $[8], restProps = $[9], scheme = $[10], selected = $[11], shadow = $[12], t0 = $[13], t1 = $[14], t2 = $[15], t3 = $[16]);
|
|
2424
2429
|
const checkered = t0 === void 0 ? !1 : t0, focusRing = t1 === void 0 ? !1 : t1, radius = t2 === void 0 ? 0 : t2, toneProp = t3 === void 0 ? "default" : t3, as = ReactIs.isValidElementType(asProp) ? asProp : "div", rootTheme = useRootTheme(), tone = toneProp === "inherit" ? rootTheme.tone : toneProp, t4 = typeof as == "string" ? as : void 0, t5 = rootTheme.scheme, t6 = useArrayProp(border2), t7 = useArrayProp(borderTop2), t8 = useArrayProp(borderRight2), t9 = useArrayProp(borderBottom2), t10 = useArrayProp(borderLeft2), t11 = useArrayProp(radius), t12 = useArrayProp(shadow), t13 = checkered ? "" : void 0, t14 = pressed ? "" : void 0, t15 = selected ? "" : void 0;
|
|
2425
2430
|
let t16;
|
|
2426
|
-
$[17] !==
|
|
2431
|
+
$[17] !== as || $[18] !== checkered || $[19] !== focusRing || $[20] !== muted || $[21] !== ref || $[22] !== restProps || $[23] !== rootTheme.scheme || $[24] !== selected || $[25] !== t10 || $[26] !== t11 || $[27] !== t12 || $[28] !== t13 || $[29] !== t14 || $[30] !== t15 || $[31] !== t4 || $[32] !== t6 || $[33] !== t7 || $[34] !== t8 || $[35] !== t9 || $[36] !== tone ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Root$s, { "data-as": t4, "data-scheme": t5, "data-ui": "Card", "data-tone": tone, ...restProps, $border: t6, $borderTop: t7, $borderRight: t8, $borderBottom: t9, $borderLeft: t10, $checkered: checkered, $focusRing: focusRing, $muted: muted, $radius: t11, $shadow: t12, $tone: tone, "data-checkered": t13, "data-pressed": t14, "data-selected": t15, forwardedAs: as, ref, selected }), $[17] = as, $[18] = checkered, $[19] = focusRing, $[20] = muted, $[21] = ref, $[22] = restProps, $[23] = rootTheme.scheme, $[24] = selected, $[25] = t10, $[26] = t11, $[27] = t12, $[28] = t13, $[29] = t14, $[30] = t15, $[31] = t4, $[32] = t6, $[33] = t7, $[34] = t8, $[35] = t9, $[36] = tone, $[37] = t16) : t16 = $[37];
|
|
2427
2432
|
let t17;
|
|
2428
|
-
return $[38] !== scheme || $[39] !==
|
|
2433
|
+
return $[38] !== scheme || $[39] !== t16 || $[40] !== tone ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(ThemeColorProvider, { scheme, tone, children: t16 }), $[38] = scheme, $[39] = t16, $[40] = tone, $[41] = t17) : t17 = $[41], t17;
|
|
2429
2434
|
});
|
|
2430
2435
|
Card.displayName = "ForwardRef(Card)";
|
|
2431
2436
|
function checkboxBaseStyles() {
|
|
@@ -2568,7 +2573,7 @@ function inputElementStyles(props) {
|
|
|
2568
2573
|
}
|
|
2569
2574
|
const Root$r = styledComponents.styled.div(checkboxBaseStyles), Input$5 = styledComponents.styled.input(inputElementStyles), Checkbox = react.forwardRef(function(props, forwardedRef) {
|
|
2570
2575
|
const $ = reactCompilerRuntime.c(25);
|
|
2571
|
-
let
|
|
2576
|
+
let checked, className, customValidity, disabled, indeterminate, readOnly, restProps, style;
|
|
2572
2577
|
$[0] !== props ? ({
|
|
2573
2578
|
checked,
|
|
2574
2579
|
className,
|
|
@@ -2578,7 +2583,7 @@ const Root$r = styledComponents.styled.div(checkboxBaseStyles), Input$5 = styled
|
|
|
2578
2583
|
readOnly,
|
|
2579
2584
|
style,
|
|
2580
2585
|
...restProps
|
|
2581
|
-
} = props, $[0] = props, $[1] =
|
|
2586
|
+
} = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = customValidity, $[4] = disabled, $[5] = indeterminate, $[6] = readOnly, $[7] = restProps, $[8] = style) : (checked = $[1], className = $[2], customValidity = $[3], disabled = $[4], indeterminate = $[5], readOnly = $[6], restProps = $[7], style = $[8]);
|
|
2582
2587
|
const ref = react.useRef(null);
|
|
2583
2588
|
let t0;
|
|
2584
2589
|
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[9] = t0) : t0 = $[9], react.useImperativeHandle(forwardedRef, t0);
|
|
@@ -2588,7 +2593,7 @@ const Root$r = styledComponents.styled.div(checkboxBaseStyles), Input$5 = styled
|
|
|
2588
2593
|
}, t2 = [indeterminate], $[10] = indeterminate, $[11] = t1, $[12] = t2) : (t1 = $[11], t2 = $[12]), react.useEffect(t1, t2), useCustomValidity(ref, customValidity);
|
|
2589
2594
|
const t3 = !disabled && readOnly ? "" : void 0, t4 = customValidity ? "" : void 0, t5 = disabled || readOnly;
|
|
2590
2595
|
let t6;
|
|
2591
|
-
$[13] !==
|
|
2596
|
+
$[13] !== checked || $[14] !== readOnly || $[15] !== restProps || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Input$5, { "data-read-only": t3, "data-error": t4, ...restProps, checked, disabled: t5, type: "checkbox", readOnly, ref }), $[13] = checked, $[14] = readOnly, $[15] = restProps, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6) : t6 = $[19];
|
|
2592
2597
|
let t7;
|
|
2593
2598
|
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
2594
2599
|
/* @__PURE__ */ jsxRuntime.jsx(icons.CheckmarkIcon, {}),
|
|
@@ -2751,27 +2756,27 @@ function codeBaseStyle() {
|
|
|
2751
2756
|
}
|
|
2752
2757
|
const Root$q = styledComponents.styled.pre(codeBaseStyle, responsiveCodeFontStyle), Code = react.forwardRef(function(props, ref) {
|
|
2753
2758
|
const $ = reactCompilerRuntime.c(23);
|
|
2754
|
-
let
|
|
2759
|
+
let children, languageProp, restProps, t0, weight;
|
|
2755
2760
|
$[0] !== props ? ({
|
|
2756
2761
|
children,
|
|
2757
2762
|
language: languageProp,
|
|
2758
2763
|
size: t0,
|
|
2759
2764
|
weight,
|
|
2760
2765
|
...restProps
|
|
2761
|
-
} = props, $[0] = props, $[1] =
|
|
2766
|
+
} = props, $[0] = props, $[1] = children, $[2] = languageProp, $[3] = restProps, $[4] = t0, $[5] = weight) : (children = $[1], languageProp = $[2], restProps = $[3], t0 = $[4], weight = $[5]);
|
|
2762
2767
|
const size2 = t0 === void 0 ? 2 : t0, language = typeof languageProp == "string" ? languageProp : void 0;
|
|
2763
2768
|
let t1;
|
|
2764
2769
|
$[6] !== language ? (t1 = language ? Refractor__default.default.hasLanguage(language) : !1, $[6] = language, $[7] = t1) : t1 = $[7];
|
|
2765
2770
|
const registered = t1, t2 = useArrayProp(size2);
|
|
2766
2771
|
let t3;
|
|
2767
|
-
$[8] !==
|
|
2772
|
+
$[8] !== children || $[9] !== language || $[10] !== registered ? (t3 = !(language && registered) && /* @__PURE__ */ jsxRuntime.jsx("code", { children }), $[8] = children, $[9] = language, $[10] = registered, $[11] = t3) : t3 = $[11];
|
|
2768
2773
|
let t4;
|
|
2769
|
-
$[12] !==
|
|
2774
|
+
$[12] !== children || $[13] !== language || $[14] !== registered ? (t4 = language && registered && /* @__PURE__ */ jsxRuntime.jsx(Refractor__default.default, { inline: !0, language, value: String(children) }), $[12] = children, $[13] = language, $[14] = registered, $[15] = t4) : t4 = $[15];
|
|
2770
2775
|
let t5;
|
|
2771
|
-
return $[16] !==
|
|
2776
|
+
return $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== weight ? (t5 = /* @__PURE__ */ jsxRuntime.jsxs(Root$q, { "data-ui": "Code", ...restProps, $size: t2, $weight: weight, ref, children: [
|
|
2772
2777
|
t3,
|
|
2773
2778
|
t4
|
|
2774
|
-
] }), $[16] =
|
|
2779
|
+
] }), $[16] = ref, $[17] = restProps, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = weight, $[22] = t5) : t5 = $[22], t5;
|
|
2775
2780
|
});
|
|
2776
2781
|
Code.displayName = "ForwardRef(Code)";
|
|
2777
2782
|
const BASE_STYLE$1 = {
|
|
@@ -2792,20 +2797,20 @@ function responsiveContainerWidthStyle(props) {
|
|
|
2792
2797
|
}
|
|
2793
2798
|
const Root$p = styledComponents.styled(Box)(containerBaseStyle, responsiveContainerWidthStyle), Container = react.forwardRef(function(props, ref) {
|
|
2794
2799
|
const $ = reactCompilerRuntime.c(9);
|
|
2795
|
-
let
|
|
2800
|
+
let as, restProps, t0;
|
|
2796
2801
|
$[0] !== props ? ({
|
|
2797
2802
|
as,
|
|
2798
2803
|
width: t0,
|
|
2799
2804
|
...restProps
|
|
2800
|
-
} = props, $[0] = props, $[1] =
|
|
2805
|
+
} = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = t0) : (as = $[1], restProps = $[2], t0 = $[3]);
|
|
2801
2806
|
const t1 = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
2802
2807
|
let t2;
|
|
2803
|
-
return $[4] !==
|
|
2808
|
+
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Root$p, { "data-ui": "Container", ...restProps, $width: t1, forwardedAs: as, ref }), $[4] = as, $[5] = ref, $[6] = restProps, $[7] = t1, $[8] = t2) : t2 = $[8], t2;
|
|
2804
2809
|
});
|
|
2805
2810
|
Container.displayName = "ForwardRef(Container)";
|
|
2806
2811
|
const Root$o = styledComponents.styled(Box)(responsiveGridStyle), Grid = react.forwardRef(function(props, ref) {
|
|
2807
2812
|
const $ = reactCompilerRuntime.c(26);
|
|
2808
|
-
let as,
|
|
2813
|
+
let as, autoCols, autoFlow, autoRows, children, columns, gap, gapX, gapY, restProps, rows;
|
|
2809
2814
|
$[0] !== props ? ({
|
|
2810
2815
|
as,
|
|
2811
2816
|
autoRows,
|
|
@@ -2818,10 +2823,10 @@ const Root$o = styledComponents.styled(Box)(responsiveGridStyle), Grid = react.f
|
|
|
2818
2823
|
rows,
|
|
2819
2824
|
children,
|
|
2820
2825
|
...restProps
|
|
2821
|
-
} = props, $[0] = props, $[1] = as, $[2] =
|
|
2826
|
+
} = props, $[0] = props, $[1] = as, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = children, $[6] = columns, $[7] = gap, $[8] = gapX, $[9] = gapY, $[10] = restProps, $[11] = rows) : (as = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], children = $[5], columns = $[6], gap = $[7], gapX = $[8], gapY = $[9], restProps = $[10], rows = $[11]);
|
|
2822
2827
|
const t0 = typeof as == "string" ? as : void 0, t1 = useArrayProp(autoRows), t2 = useArrayProp(autoCols), t3 = useArrayProp(autoFlow), t4 = useArrayProp(columns), t5 = useArrayProp(gap), t6 = useArrayProp(gapX), t7 = useArrayProp(gapY), t8 = useArrayProp(rows);
|
|
2823
2828
|
let t9;
|
|
2824
|
-
return $[12] !==
|
|
2829
|
+
return $[12] !== as || $[13] !== children || $[14] !== ref || $[15] !== restProps || $[16] !== t0 || $[17] !== t1 || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== t5 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(Root$o, { "data-as": t0, "data-ui": "Grid", ...restProps, $autoRows: t1, $autoCols: t2, $autoFlow: t3, $columns: t4, $gap: t5, $gapX: t6, $gapY: t7, $rows: t8, forwardedAs: as, ref, children }), $[12] = as, $[13] = children, $[14] = ref, $[15] = restProps, $[16] = t0, $[17] = t1, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = t5, $[22] = t6, $[23] = t7, $[24] = t8, $[25] = t9) : t9 = $[25], t9;
|
|
2825
2830
|
});
|
|
2826
2831
|
Grid.displayName = "ForwardRef(Grid)";
|
|
2827
2832
|
function headingBaseStyle(props) {
|
|
@@ -2891,7 +2896,7 @@ const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlign
|
|
|
2891
2896
|
overflow: clip;
|
|
2892
2897
|
`, Heading = react.forwardRef(function(props, ref) {
|
|
2893
2898
|
const $ = reactCompilerRuntime.c(22);
|
|
2894
|
-
let
|
|
2899
|
+
let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
|
|
2895
2900
|
$[0] !== props ? ({
|
|
2896
2901
|
accent: t0,
|
|
2897
2902
|
align,
|
|
@@ -2901,7 +2906,7 @@ const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlign
|
|
|
2901
2906
|
textOverflow,
|
|
2902
2907
|
weight,
|
|
2903
2908
|
...restProps
|
|
2904
|
-
} = props, $[0] = props, $[1] =
|
|
2909
|
+
} = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = textOverflow, $[8] = weight) : (align = $[1], childrenProp = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], textOverflow = $[7], weight = $[8]);
|
|
2905
2910
|
const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
|
|
2906
2911
|
let children = childrenProp;
|
|
2907
2912
|
if (textOverflow === "ellipsis") {
|
|
@@ -2912,7 +2917,7 @@ const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlign
|
|
|
2912
2917
|
let t5;
|
|
2913
2918
|
$[11] !== children ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { children }), $[11] = children, $[12] = t5) : t5 = $[12];
|
|
2914
2919
|
let t6;
|
|
2915
|
-
return $[13] !==
|
|
2920
|
+
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$n, { "data-ui": "Heading", ...restProps, $accent: accent, $align: t3, $muted: muted, $size: t4, $weight: weight, ref, children: t5 }), $[13] = accent, $[14] = muted, $[15] = ref, $[16] = restProps, $[17] = t3, $[18] = t4, $[19] = t5, $[20] = weight, $[21] = t6) : t6 = $[21], t6;
|
|
2916
2921
|
});
|
|
2917
2922
|
Heading.displayName = "ForwardRef(Heading)";
|
|
2918
2923
|
function inlineBaseStyle() {
|
|
@@ -2943,26 +2948,24 @@ function inlineSpaceStyle(props) {
|
|
|
2943
2948
|
});
|
|
2944
2949
|
}
|
|
2945
2950
|
const Root$m = styledComponents.styled(Box)(inlineBaseStyle, inlineSpaceStyle), Inline = react.forwardRef(function(props, ref) {
|
|
2946
|
-
const $ = reactCompilerRuntime.c(
|
|
2947
|
-
let
|
|
2951
|
+
const $ = reactCompilerRuntime.c(12);
|
|
2952
|
+
let as, childrenProp, restProps, space;
|
|
2948
2953
|
$[0] !== props ? ({
|
|
2949
2954
|
as,
|
|
2950
2955
|
children: childrenProp,
|
|
2951
2956
|
space,
|
|
2952
2957
|
...restProps
|
|
2953
|
-
} = props, $[0] = props, $[1] =
|
|
2958
|
+
} = props, $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = restProps, $[4] = space) : (as = $[1], childrenProp = $[2], restProps = $[3], space = $[4]);
|
|
2954
2959
|
let t0, t1;
|
|
2955
|
-
|
|
2956
|
-
let t22;
|
|
2957
|
-
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t22 = (child) => child && /* @__PURE__ */ jsxRuntime.jsx("div", { children: child }), $[7] = t22) : t22 = $[7], t1 = react.Children.map(childrenProp, t22), $[5] = childrenProp, $[6] = t1;
|
|
2958
|
-
} else
|
|
2959
|
-
t1 = $[6];
|
|
2960
|
-
t0 = t1;
|
|
2960
|
+
$[5] !== childrenProp ? (t1 = react.Children.map(childrenProp, _temp$6), $[5] = childrenProp, $[6] = t1) : t1 = $[6], t0 = t1;
|
|
2961
2961
|
const children = t0, t2 = useArrayProp(space);
|
|
2962
2962
|
let t3;
|
|
2963
|
-
return $[
|
|
2963
|
+
return $[7] !== as || $[8] !== children || $[9] !== restProps || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Root$m, { "data-ui": "Inline", ...restProps, $space: t2, forwardedAs: as, ref, children }), $[7] = as, $[8] = children, $[9] = restProps, $[10] = t2, $[11] = t3) : t3 = $[11], t3;
|
|
2964
2964
|
});
|
|
2965
2965
|
Inline.displayName = "ForwardRef(Inline)";
|
|
2966
|
+
function _temp$6(child) {
|
|
2967
|
+
return child && /* @__PURE__ */ jsxRuntime.jsx("div", { children: child });
|
|
2968
|
+
}
|
|
2966
2969
|
function kbdStyle() {
|
|
2967
2970
|
return styledComponents.css`
|
|
2968
2971
|
--card-bg-color: var(--card-kbd-bg-color);
|
|
@@ -2982,21 +2985,21 @@ function kbdStyle() {
|
|
|
2982
2985
|
}
|
|
2983
2986
|
const Root$l = styledComponents.styled.kbd(responsiveRadiusStyle, kbdStyle), KBD = react.forwardRef(function(props, ref) {
|
|
2984
2987
|
const $ = reactCompilerRuntime.c(17);
|
|
2985
|
-
let
|
|
2988
|
+
let children, restProps, t0, t1, t2;
|
|
2986
2989
|
$[0] !== props ? ({
|
|
2987
2990
|
children,
|
|
2988
2991
|
fontSize: t0,
|
|
2989
2992
|
padding: t1,
|
|
2990
2993
|
radius: t2,
|
|
2991
2994
|
...restProps
|
|
2992
|
-
} = props, $[0] = props, $[1] =
|
|
2995
|
+
} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2) : (children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5]);
|
|
2993
2996
|
const fontSize2 = t0 === void 0 ? 0 : t0, padding = t1 === void 0 ? 1 : t1, t3 = useArrayProp(t2 === void 0 ? 2 : t2);
|
|
2994
2997
|
let t4;
|
|
2995
|
-
$[6] !==
|
|
2998
|
+
$[6] !== children || $[7] !== fontSize2 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", size: fontSize2, weight: "semibold", children }), $[6] = children, $[7] = fontSize2, $[8] = t4) : t4 = $[8];
|
|
2996
2999
|
let t5;
|
|
2997
3000
|
$[9] !== padding || $[10] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, children: t4 }), $[9] = padding, $[10] = t4, $[11] = t5) : t5 = $[11];
|
|
2998
3001
|
let t6;
|
|
2999
|
-
return $[12] !==
|
|
3002
|
+
return $[12] !== ref || $[13] !== restProps || $[14] !== t3 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$l, { "data-ui": "KBD", ...restProps, $radius: t3, ref, children: t5 }), $[12] = ref, $[13] = restProps, $[14] = t3, $[15] = t5, $[16] = t6) : t6 = $[16], t6;
|
|
3000
3003
|
});
|
|
3001
3004
|
KBD.displayName = "ForwardRef(KBD)";
|
|
3002
3005
|
const origin = {
|
|
@@ -3120,13 +3123,13 @@ const Root$k = styledComponents.styled.div(({
|
|
|
3120
3123
|
fill: var(--card-bg-color);
|
|
3121
3124
|
`, Arrow = react.forwardRef(function(props, ref) {
|
|
3122
3125
|
const $ = reactCompilerRuntime.c(24);
|
|
3123
|
-
let
|
|
3126
|
+
let h, restProps, t0, w;
|
|
3124
3127
|
$[0] !== props ? ({
|
|
3125
3128
|
width: w,
|
|
3126
3129
|
height: h,
|
|
3127
3130
|
radius: t0,
|
|
3128
3131
|
...restProps
|
|
3129
|
-
} = props, $[0] = props, $[1] =
|
|
3132
|
+
} = props, $[0] = props, $[1] = h, $[2] = restProps, $[3] = t0, $[4] = w) : (h = $[1], restProps = $[2], t0 = $[3], w = $[4]);
|
|
3130
3133
|
const radius = t0 === void 0 ? 0 : t0, {
|
|
3131
3134
|
card
|
|
3132
3135
|
} = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2, points = [{
|
|
@@ -3156,13 +3159,13 @@ const Root$k = styledComponents.styled.div(({
|
|
|
3156
3159
|
let t5;
|
|
3157
3160
|
$[11] !== fillPath ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(ShapePath, { d: fillPath }), $[11] = fillPath, $[12] = t5) : t5 = $[12];
|
|
3158
3161
|
let t6;
|
|
3159
|
-
$[13] !==
|
|
3162
|
+
$[13] !== t1 || $[14] !== t2 || $[15] !== t4 || $[16] !== t5 || $[17] !== w ? (t6 = /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: w, height: w, viewBox: t1, children: [
|
|
3160
3163
|
t2,
|
|
3161
3164
|
t4,
|
|
3162
3165
|
t5
|
|
3163
|
-
] }), $[13] =
|
|
3166
|
+
] }), $[13] = t1, $[14] = t2, $[15] = t4, $[16] = t5, $[17] = w, $[18] = t6) : t6 = $[18];
|
|
3164
3167
|
let t7;
|
|
3165
|
-
return $[19] !==
|
|
3168
|
+
return $[19] !== ref || $[20] !== restProps || $[21] !== t6 || $[22] !== w ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Root$k, { ...restProps, $w: w, ref, children: t6 }), $[19] = ref, $[20] = restProps, $[21] = t6, $[22] = w, $[23] = t7) : t7 = $[23], t7;
|
|
3166
3169
|
});
|
|
3167
3170
|
Arrow.displayName = "ForwardRef(Arrow)";
|
|
3168
3171
|
const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/context/boundaryElement", null);
|
|
@@ -3178,7 +3181,7 @@ function BoundaryElementProvider(props) {
|
|
|
3178
3181
|
}, $[0] = element, $[1] = t1) : t1 = $[1], t0 = t1;
|
|
3179
3182
|
const value = t0;
|
|
3180
3183
|
let t2;
|
|
3181
|
-
return $[2] !==
|
|
3184
|
+
return $[2] !== children || $[3] !== value ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(BoundaryElementContext.Provider, { value, children }), $[2] = children, $[3] = value, $[4] = t2) : t2 = $[4], t2;
|
|
3182
3185
|
}
|
|
3183
3186
|
BoundaryElementProvider.displayName = "BoundaryElementProvider";
|
|
3184
3187
|
function isRecord(value) {
|
|
@@ -3216,12 +3219,12 @@ function findMinBreakpoints(media, width) {
|
|
|
3216
3219
|
}
|
|
3217
3220
|
const ElementQuery = react.forwardRef(function(props, forwardedRef) {
|
|
3218
3221
|
const $ = reactCompilerRuntime.c(18), theme2 = useTheme_v2();
|
|
3219
|
-
let _media,
|
|
3222
|
+
let _media, children, restProps;
|
|
3220
3223
|
$[0] !== props ? ({
|
|
3221
3224
|
children,
|
|
3222
3225
|
media: _media,
|
|
3223
3226
|
...restProps
|
|
3224
|
-
} = props, $[0] = props, $[1] = _media, $[2] =
|
|
3227
|
+
} = props, $[0] = props, $[1] = _media, $[2] = children, $[3] = restProps) : (_media = $[1], children = $[2], restProps = $[3]);
|
|
3225
3228
|
const media = _media ?? theme2.media, [element, setElement] = react.useState(null), elementSize = useElementSize(element);
|
|
3226
3229
|
let t0;
|
|
3227
3230
|
t0 = elementSize?.border.width ?? window.innerWidth;
|
|
@@ -3245,7 +3248,7 @@ const ElementQuery = react.forwardRef(function(props, forwardedRef) {
|
|
|
3245
3248
|
let t5, t6;
|
|
3246
3249
|
$[10] !== element ? (t5 = () => element, t6 = [element], $[10] = element, $[11] = t5, $[12] = t6) : (t5 = $[11], t6 = $[12]), react.useImperativeHandle(forwardedRef, t5, t6);
|
|
3247
3250
|
let t7;
|
|
3248
|
-
return $[13] !==
|
|
3251
|
+
return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t7 = /* @__PURE__ */ jsxRuntime.jsx("div", { "data-ui": "ElementQuery", ...restProps, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[13] = children, $[14] = max, $[15] = min, $[16] = restProps, $[17] = t7) : t7 = $[17], t7;
|
|
3249
3252
|
});
|
|
3250
3253
|
ElementQuery.displayName = "ForwardRef(ElementQuery)";
|
|
3251
3254
|
class ErrorBoundary extends react.Component {
|
|
@@ -3391,18 +3394,18 @@ function LayerProvider(props) {
|
|
|
3391
3394
|
[childLevel]: prevLen + 1
|
|
3392
3395
|
};
|
|
3393
3396
|
return setSize(Object.keys(nextState).length), nextState;
|
|
3394
|
-
}) : setSize(
|
|
3397
|
+
}) : setSize(_temp$5), () => {
|
|
3395
3398
|
childLevel !== void 0 ? setChildLayers((state_0) => {
|
|
3396
3399
|
const nextState_0 = {
|
|
3397
3400
|
...state_0
|
|
3398
3401
|
};
|
|
3399
3402
|
return nextState_0[childLevel] === 1 ? (delete nextState_0[childLevel], setSize(Object.keys(nextState_0).length)) : nextState_0[childLevel] = nextState_0[childLevel] - 1, nextState_0;
|
|
3400
|
-
}) : setSize(
|
|
3403
|
+
}) : setSize(_temp2$3), parentDispose?.();
|
|
3401
3404
|
};
|
|
3402
3405
|
}, $[3] = parentRegisterChild, $[4] = setChildLayers, $[5] = t3) : t3 = $[5];
|
|
3403
3406
|
const registerChild = t3;
|
|
3404
3407
|
let t4, t5;
|
|
3405
|
-
$[6] !==
|
|
3408
|
+
$[6] !== level || $[7] !== parentRegisterChild ? (t4 = () => parentRegisterChild?.(level), t5 = [level, parentRegisterChild], $[6] = level, $[7] = parentRegisterChild, $[8] = t4, $[9] = t5) : (t4 = $[8], t5 = $[9]), react.useEffect(t4, t5);
|
|
3406
3409
|
let t6, t7;
|
|
3407
3410
|
$[10] !== isTopLayer || $[11] !== level || $[12] !== registerChild || $[13] !== size2 || $[14] !== zIndex ? (t7 = {
|
|
3408
3411
|
version: 0,
|
|
@@ -3414,21 +3417,27 @@ function LayerProvider(props) {
|
|
|
3414
3417
|
}, $[10] = isTopLayer, $[11] = level, $[12] = registerChild, $[13] = size2, $[14] = zIndex, $[15] = t7) : t7 = $[15], t6 = t7;
|
|
3415
3418
|
const value = t6;
|
|
3416
3419
|
let t8;
|
|
3417
|
-
return $[16] !==
|
|
3420
|
+
return $[16] !== children || $[17] !== value ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(LayerContext.Provider, { value, children }), $[16] = children, $[17] = value, $[18] = t8) : t8 = $[18], t8;
|
|
3421
|
+
}
|
|
3422
|
+
function _temp2$3(v_0) {
|
|
3423
|
+
return v_0 - 1;
|
|
3424
|
+
}
|
|
3425
|
+
function _temp$5(v) {
|
|
3426
|
+
return v + 1;
|
|
3418
3427
|
}
|
|
3419
3428
|
LayerProvider.displayName = "LayerProvider";
|
|
3420
3429
|
const Root$j = styledComponents.styled.div({
|
|
3421
3430
|
position: "relative"
|
|
3422
3431
|
}), LayerChildren = react.forwardRef(function(props, forwardedRef) {
|
|
3423
3432
|
const $ = reactCompilerRuntime.c(22);
|
|
3424
|
-
let
|
|
3433
|
+
let children, onActivate, onFocus, restProps, t0;
|
|
3425
3434
|
$[0] !== props ? ({
|
|
3426
3435
|
children,
|
|
3427
3436
|
onActivate,
|
|
3428
3437
|
onFocus,
|
|
3429
3438
|
style: t0,
|
|
3430
3439
|
...restProps
|
|
3431
|
-
} = props, $[0] = props, $[1] =
|
|
3440
|
+
} = props, $[0] = props, $[1] = children, $[2] = onActivate, $[3] = onFocus, $[4] = restProps, $[5] = t0) : (children = $[1], onActivate = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]);
|
|
3432
3441
|
const style = t0 === void 0 ? EMPTY_RECORD : t0, {
|
|
3433
3442
|
zIndex,
|
|
3434
3443
|
isTopLayer
|
|
@@ -3442,11 +3451,11 @@ const Root$j = styledComponents.styled.div({
|
|
|
3442
3451
|
}), isTopLayerRef.current = isTopLayer;
|
|
3443
3452
|
}, t3 = [isTopLayer, onActivate], $[7] = isTopLayer, $[8] = onActivate, $[9] = t2, $[10] = t3) : (t2 = $[9], t3 = $[10]), react.useEffect(t2, t3);
|
|
3444
3453
|
let t4;
|
|
3445
|
-
$[11] !==
|
|
3454
|
+
$[11] !== isTopLayer || $[12] !== onFocus ? (t4 = (event) => {
|
|
3446
3455
|
onFocus?.(event);
|
|
3447
3456
|
const rootElement = ref.current, target = document.activeElement;
|
|
3448
3457
|
!isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
|
|
3449
|
-
}, $[11] =
|
|
3458
|
+
}, $[11] = isTopLayer, $[12] = onFocus, $[13] = t4) : t4 = $[13];
|
|
3450
3459
|
const handleFocus = t4;
|
|
3451
3460
|
let t5;
|
|
3452
3461
|
$[14] !== style || $[15] !== zIndex ? (t5 = {
|
|
@@ -3454,20 +3463,20 @@ const Root$j = styledComponents.styled.div({
|
|
|
3454
3463
|
zIndex
|
|
3455
3464
|
}, $[14] = style, $[15] = zIndex, $[16] = t5) : t5 = $[16];
|
|
3456
3465
|
let t6;
|
|
3457
|
-
return $[17] !==
|
|
3466
|
+
return $[17] !== children || $[18] !== handleFocus || $[19] !== restProps || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$j, { ...restProps, "data-ui": "Layer", onFocus: handleFocus, ref, style: t5, children }), $[17] = children, $[18] = handleFocus, $[19] = restProps, $[20] = t5, $[21] = t6) : t6 = $[21], t6;
|
|
3458
3467
|
}), Layer = react.forwardRef(function(props, ref) {
|
|
3459
3468
|
const $ = reactCompilerRuntime.c(11);
|
|
3460
|
-
let
|
|
3469
|
+
let children, restProps, t0;
|
|
3461
3470
|
$[0] !== props ? ({
|
|
3462
3471
|
children,
|
|
3463
3472
|
zOffset: t0,
|
|
3464
3473
|
...restProps
|
|
3465
|
-
} = props, $[0] = props, $[1] =
|
|
3474
|
+
} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
3466
3475
|
const zOffset = t0 === void 0 ? 1 : t0;
|
|
3467
3476
|
let t1;
|
|
3468
|
-
$[4] !==
|
|
3477
|
+
$[4] !== children || $[5] !== ref || $[6] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(LayerChildren, { ...restProps, ref, children }), $[4] = children, $[5] = ref, $[6] = restProps, $[7] = t1) : t1 = $[7];
|
|
3469
3478
|
let t2;
|
|
3470
|
-
return $[8] !==
|
|
3479
|
+
return $[8] !== t1 || $[9] !== zOffset ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: t1 }), $[8] = t1, $[9] = zOffset, $[10] = t2) : t2 = $[10], t2;
|
|
3471
3480
|
});
|
|
3472
3481
|
Layer.displayName = "ForwardRef(Layer)";
|
|
3473
3482
|
const key = "@sanity/ui/context/portal", elementKey = Symbol.for(`${key}/element`);
|
|
@@ -3504,32 +3513,32 @@ function PortalProvider(props) {
|
|
|
3504
3513
|
children,
|
|
3505
3514
|
element,
|
|
3506
3515
|
__unstable_elements: elementsProp
|
|
3507
|
-
} = props, elements = useUnique(elementsProp), fallbackElement = react.useSyncExternalStore(emptySubscribe, _temp$
|
|
3516
|
+
} = props, elements = useUnique(elementsProp), fallbackElement = react.useSyncExternalStore(emptySubscribe, _temp$4, _temp2$2);
|
|
3508
3517
|
let t0;
|
|
3509
3518
|
const t1 = boundaryElement || null, t2 = element || fallbackElement;
|
|
3510
3519
|
let t3;
|
|
3511
|
-
$[0] !==
|
|
3520
|
+
$[0] !== elements || $[1] !== t1 || $[2] !== t2 ? (t3 = {
|
|
3512
3521
|
version: 0,
|
|
3513
3522
|
boundaryElement: t1,
|
|
3514
3523
|
element: t2,
|
|
3515
3524
|
elements
|
|
3516
|
-
}, $[0] =
|
|
3525
|
+
}, $[0] = elements, $[1] = t1, $[2] = t2, $[3] = t3) : t3 = $[3], t0 = t3;
|
|
3517
3526
|
const value = t0;
|
|
3518
3527
|
let t4;
|
|
3519
|
-
return $[4] !==
|
|
3528
|
+
return $[4] !== children || $[5] !== value ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(PortalContext.Provider, { value, children }), $[4] = children, $[5] = value, $[6] = t4) : t4 = $[6], t4;
|
|
3520
3529
|
}
|
|
3521
|
-
function _temp2$
|
|
3530
|
+
function _temp2$2() {
|
|
3522
3531
|
return null;
|
|
3523
3532
|
}
|
|
3524
|
-
function _temp$
|
|
3533
|
+
function _temp$4() {
|
|
3525
3534
|
return document.body;
|
|
3526
3535
|
}
|
|
3527
3536
|
PortalProvider.displayName = "PortalProvider";
|
|
3528
3537
|
const emptySubscribe = () => () => {
|
|
3529
3538
|
};
|
|
3530
3539
|
function useUnique(value) {
|
|
3531
|
-
const
|
|
3532
|
-
return _isEqual(
|
|
3540
|
+
const valueRef = react.useRef(value);
|
|
3541
|
+
return _isEqual(valueRef.current, value) || (valueRef.current = value), valueRef.current;
|
|
3533
3542
|
}
|
|
3534
3543
|
function _isEqual(objA, objB) {
|
|
3535
3544
|
if (!objA || !objB)
|
|
@@ -3550,7 +3559,7 @@ const Root$i = styledComponents.styled.div`
|
|
|
3550
3559
|
children
|
|
3551
3560
|
} = props;
|
|
3552
3561
|
let t0;
|
|
3553
|
-
return $[0] !== as || $[1] !==
|
|
3562
|
+
return $[0] !== as || $[1] !== children || $[2] !== ref ? (t0 = /* @__PURE__ */ jsxRuntime.jsx(Root$i, { "aria-hidden": !0, as, "data-ui": "SrOnly", ref, children }), $[0] = as, $[1] = children, $[2] = ref, $[3] = t0) : t0 = $[3], t0;
|
|
3554
3563
|
});
|
|
3555
3564
|
SrOnly.displayName = "ForwardRef(SrOnly)";
|
|
3556
3565
|
const Root$h = styledComponents.styled.div`
|
|
@@ -3561,7 +3570,7 @@ const Root$h = styledComponents.styled.div`
|
|
|
3561
3570
|
right: 0;
|
|
3562
3571
|
`, VirtualList = react.forwardRef(function(props, forwardedRef) {
|
|
3563
3572
|
const $ = reactCompilerRuntime.c(56);
|
|
3564
|
-
let
|
|
3573
|
+
let getItemKey, onChange, renderItem, restProps, t0, t1, t2;
|
|
3565
3574
|
$[0] !== props ? ({
|
|
3566
3575
|
as: t0,
|
|
3567
3576
|
gap: t1,
|
|
@@ -3570,7 +3579,7 @@ const Root$h = styledComponents.styled.div`
|
|
|
3570
3579
|
onChange,
|
|
3571
3580
|
renderItem,
|
|
3572
3581
|
...restProps
|
|
3573
|
-
} = props, $[0] = props, $[1] =
|
|
3582
|
+
} = props, $[0] = props, $[1] = getItemKey, $[2] = onChange, $[3] = renderItem, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = t2) : (getItemKey = $[1], onChange = $[2], renderItem = $[3], restProps = $[4], t0 = $[5], t1 = $[6], t2 = $[7]);
|
|
3574
3583
|
const as = t0 === void 0 ? "div" : t0, gap = t1 === void 0 ? 0 : t1;
|
|
3575
3584
|
let t3;
|
|
3576
3585
|
$[8] !== t2 ? (t3 = t2 === void 0 ? [] : t2, $[8] = t2, $[9] = t3) : t3 = $[9];
|
|
@@ -3624,8 +3633,8 @@ const Root$h = styledComponents.styled.div`
|
|
|
3624
3633
|
};
|
|
3625
3634
|
}, t8 = [], $[14] = t7, $[15] = t8) : (t7 = $[14], t8 = $[15]), react.useEffect(t7, t8);
|
|
3626
3635
|
const len = items.length, height = itemHeight ? len * (itemHeight + space[gap]) - space[gap] : 0, fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0, toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0;
|
|
3627
|
-
let
|
|
3628
|
-
$[16] !==
|
|
3636
|
+
let t10, t9;
|
|
3637
|
+
$[16] !== fromIndex || $[17] !== gap || $[18] !== itemHeight || $[19] !== onChange || $[20] !== scrollHeight || $[21] !== scrollTop || $[22] !== space || $[23] !== toIndex ? (t9 = () => {
|
|
3629
3638
|
onChange && onChange({
|
|
3630
3639
|
fromIndex,
|
|
3631
3640
|
gap: space[gap],
|
|
@@ -3634,7 +3643,7 @@ const Root$h = styledComponents.styled.div`
|
|
|
3634
3643
|
scrollTop,
|
|
3635
3644
|
toIndex
|
|
3636
3645
|
});
|
|
3637
|
-
}, t10 = [fromIndex, gap, itemHeight, onChange, scrollHeight, scrollTop, space, toIndex], $[16] =
|
|
3646
|
+
}, t10 = [fromIndex, gap, itemHeight, onChange, scrollHeight, scrollTop, space, toIndex], $[16] = fromIndex, $[17] = gap, $[18] = itemHeight, $[19] = onChange, $[20] = scrollHeight, $[21] = scrollTop, $[22] = space, $[23] = toIndex, $[24] = t10, $[25] = t9) : (t10 = $[24], t9 = $[25]), react.useEffect(t9, t10);
|
|
3638
3647
|
let t11;
|
|
3639
3648
|
bb0: {
|
|
3640
3649
|
if (!renderItem || items.length === 0) {
|
|
@@ -3650,14 +3659,14 @@ const Root$h = styledComponents.styled.div`
|
|
|
3650
3659
|
break bb0;
|
|
3651
3660
|
}
|
|
3652
3661
|
let t122;
|
|
3653
|
-
if ($[31] !==
|
|
3662
|
+
if ($[31] !== fromIndex || $[32] !== gap || $[33] !== getItemKey || $[34] !== itemHeight || $[35] !== items || $[36] !== renderItem || $[37] !== space || $[38] !== toIndex) {
|
|
3654
3663
|
let t132;
|
|
3655
|
-
$[40] !== fromIndex || $[41] !==
|
|
3664
|
+
$[40] !== fromIndex || $[41] !== gap || $[42] !== getItemKey || $[43] !== itemHeight || $[44] !== renderItem || $[45] !== space ? (t132 = (item, _itemIndex) => {
|
|
3656
3665
|
const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key2 = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
|
|
3657
3666
|
return /* @__PURE__ */ jsxRuntime.jsx(ItemWrapper, { style: {
|
|
3658
3667
|
top: itemIndex * (itemHeight + space[gap])
|
|
3659
3668
|
}, children: node }, key2);
|
|
3660
|
-
}, $[40] = fromIndex, $[41] =
|
|
3669
|
+
}, $[40] = fromIndex, $[41] = gap, $[42] = getItemKey, $[43] = itemHeight, $[44] = renderItem, $[45] = space, $[46] = t132) : t132 = $[46], t122 = items.slice(fromIndex, toIndex).map(t132), $[31] = fromIndex, $[32] = gap, $[33] = getItemKey, $[34] = itemHeight, $[35] = items, $[36] = renderItem, $[37] = space, $[38] = toIndex, $[39] = t122;
|
|
3661
3670
|
} else
|
|
3662
3671
|
t122 = $[39];
|
|
3663
3672
|
t11 = t122;
|
|
@@ -3669,7 +3678,7 @@ const Root$h = styledComponents.styled.div`
|
|
|
3669
3678
|
}, $[47] = height, $[48] = t13) : t13 = $[48], t12 = t13;
|
|
3670
3679
|
const wrapperStyle = t12;
|
|
3671
3680
|
let t14;
|
|
3672
|
-
$[49] !==
|
|
3681
|
+
$[49] !== children || $[50] !== wrapperStyle ? (t14 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: wrapperRef, style: wrapperStyle, children }), $[49] = children, $[50] = wrapperStyle, $[51] = t14) : t14 = $[51];
|
|
3673
3682
|
let t15;
|
|
3674
3683
|
return $[52] !== as || $[53] !== restProps || $[54] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(Root$h, { as, "data-ui": "VirtualList", ...restProps, ref, children: t14 }), $[52] = as, $[53] = restProps, $[54] = t14, $[55] = t15) : t15 = $[55], t15;
|
|
3675
3684
|
});
|
|
@@ -3757,8 +3766,8 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion(Card))`
|
|
|
3757
3766
|
will-change: opacity;
|
|
3758
3767
|
}
|
|
3759
3768
|
`, PopoverCard = react.memo(react.forwardRef(function(props, ref) {
|
|
3760
|
-
const $ = reactCompilerRuntime.c(
|
|
3761
|
-
let
|
|
3769
|
+
const $ = reactCompilerRuntime.c(60);
|
|
3770
|
+
let animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, originX, originY, overflow, padding, placement, radius, restProps, scheme, shadow, strategy, style, tone, width, xProp, yProp;
|
|
3762
3771
|
$[0] !== props ? ({
|
|
3763
3772
|
__unstable_margins: marginsProp,
|
|
3764
3773
|
animate,
|
|
@@ -3778,10 +3787,11 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion(Card))`
|
|
|
3778
3787
|
strategy,
|
|
3779
3788
|
style,
|
|
3780
3789
|
tone,
|
|
3790
|
+
width,
|
|
3781
3791
|
x: xProp,
|
|
3782
3792
|
y: yProp,
|
|
3783
3793
|
...restProps
|
|
3784
|
-
} = props, $[0] = props, $[1] =
|
|
3794
|
+
} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = originX, $[9] = originY, $[10] = overflow, $[11] = padding, $[12] = placement, $[13] = radius, $[14] = restProps, $[15] = scheme, $[16] = shadow, $[17] = strategy, $[18] = style, $[19] = tone, $[20] = width, $[21] = xProp, $[22] = yProp) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], originX = $[8], originY = $[9], overflow = $[10], padding = $[11], placement = $[12], radius = $[13], restProps = $[14], scheme = $[15], shadow = $[16], strategy = $[17], style = $[18], tone = $[19], width = $[20], xProp = $[21], yProp = $[22]);
|
|
3785
3795
|
const {
|
|
3786
3796
|
zIndex
|
|
3787
3797
|
} = useLayer();
|
|
@@ -3791,163 +3801,139 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion(Card))`
|
|
|
3791
3801
|
let t1;
|
|
3792
3802
|
const t2 = animate ? "transform" : void 0;
|
|
3793
3803
|
let t3;
|
|
3794
|
-
$[
|
|
3804
|
+
$[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t2 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t3 = {
|
|
3795
3805
|
left: x,
|
|
3796
3806
|
originX,
|
|
3797
3807
|
originY,
|
|
3798
3808
|
position: strategy,
|
|
3799
3809
|
top: y,
|
|
3810
|
+
width,
|
|
3800
3811
|
zIndex,
|
|
3801
3812
|
willChange: t2,
|
|
3802
3813
|
...style
|
|
3803
|
-
}, $[
|
|
3814
|
+
}, $[23] = originX, $[24] = originY, $[25] = strategy, $[26] = style, $[27] = t2, $[28] = width, $[29] = x, $[30] = y, $[31] = zIndex, $[32] = t3) : t3 = $[32], t1 = t3;
|
|
3804
3815
|
const rootStyle2 = t1;
|
|
3805
3816
|
let t4;
|
|
3806
3817
|
const t5 = arrowX !== null ? arrowX : void 0, t6 = arrowY !== null ? arrowY : void 0;
|
|
3807
3818
|
let t7;
|
|
3808
|
-
$[
|
|
3819
|
+
$[33] !== t5 || $[34] !== t6 ? (t7 = {
|
|
3809
3820
|
left: t5,
|
|
3810
3821
|
top: t6,
|
|
3811
3822
|
right: void 0,
|
|
3812
3823
|
bottom: void 0
|
|
3813
|
-
}, $[
|
|
3824
|
+
}, $[33] = t5, $[34] = t6, $[35] = t7) : t7 = $[35], t4 = t7;
|
|
3814
3825
|
const arrowStyle = t4, t8 = restProps;
|
|
3815
3826
|
let t9;
|
|
3816
|
-
$[
|
|
3827
|
+
$[36] !== animate ? (t9 = animate ? POPOVER_MOTION_PROPS : {}, $[36] = animate, $[37] = t9) : t9 = $[37];
|
|
3817
3828
|
let t10;
|
|
3818
|
-
$[
|
|
3829
|
+
$[38] !== children || $[39] !== padding ? (t10 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", flex: 1, padding, children }), $[38] = children, $[39] = padding, $[40] = t10) : t10 = $[40];
|
|
3819
3830
|
let t11;
|
|
3820
|
-
$[
|
|
3831
|
+
$[41] !== overflow || $[42] !== t10 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, overflow, children: t10 }), $[41] = overflow, $[42] = t10, $[43] = t11) : t11 = $[43];
|
|
3821
3832
|
let t12;
|
|
3822
|
-
$[
|
|
3833
|
+
$[44] !== arrow || $[45] !== arrowRef || $[46] !== arrowStyle ? (t12 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[44] = arrow, $[45] = arrowRef, $[46] = arrowStyle, $[47] = t12) : t12 = $[47];
|
|
3823
3834
|
let t13;
|
|
3824
|
-
return $[
|
|
3835
|
+
return $[48] !== placement || $[49] !== radius || $[50] !== ref || $[51] !== rootStyle2 || $[52] !== scheme || $[53] !== shadow || $[54] !== t11 || $[55] !== t12 || $[56] !== t8 || $[57] !== t9 || $[58] !== tone ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard$1, { "data-ui": "Popover", ...t8, "data-placement": placement, radius, ref, scheme, shadow, sizing: "border", style: rootStyle2, tone, ...t9, children: [
|
|
3825
3836
|
t11,
|
|
3826
3837
|
t12
|
|
3827
|
-
] }), $[
|
|
3838
|
+
] }), $[48] = placement, $[49] = radius, $[50] = ref, $[51] = rootStyle2, $[52] = scheme, $[53] = shadow, $[54] = t11, $[55] = t12, $[56] = t8, $[57] = t9, $[58] = tone, $[59] = t13) : t13 = $[59], t13;
|
|
3828
3839
|
}));
|
|
3829
3840
|
PopoverCard.displayName = "Memo(ForwardRef(PopoverCard))";
|
|
3830
3841
|
const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
3831
|
-
const
|
|
3842
|
+
const {
|
|
3832
3843
|
container,
|
|
3833
3844
|
layer
|
|
3834
|
-
} = useTheme_v2(), boundaryElementContext = useBoundaryElement()
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3845
|
+
} = useTheme_v2(), boundaryElementContext = useBoundaryElement(), {
|
|
3846
|
+
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
3847
|
+
animate: _animate = !1,
|
|
3848
|
+
arrow: arrowProp = !1,
|
|
3849
|
+
boundaryElement = boundaryElementContext.element,
|
|
3850
|
+
children: childProp,
|
|
3851
|
+
constrainSize = !1,
|
|
3852
|
+
content,
|
|
3853
|
+
disabled,
|
|
3854
|
+
fallbackPlacements = props.fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? "bottom"],
|
|
3855
|
+
matchReferenceWidth,
|
|
3856
|
+
floatingBoundary = props.boundaryElement ?? boundaryElementContext.element,
|
|
3857
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3858
|
+
onActivate,
|
|
3859
|
+
open,
|
|
3860
|
+
overflow = "hidden",
|
|
3861
|
+
padding: paddingProp,
|
|
3862
|
+
placement: placementProp = "bottom",
|
|
3863
|
+
portal,
|
|
3864
|
+
preventOverflow = !0,
|
|
3865
|
+
radius: radiusProp = 3,
|
|
3866
|
+
referenceBoundary = props.boundaryElement ?? boundaryElementContext.element,
|
|
3867
|
+
referenceElement,
|
|
3868
|
+
scheme,
|
|
3869
|
+
shadow: shadowProp = 3,
|
|
3870
|
+
tone = "inherit",
|
|
3871
|
+
width: widthProp = "auto",
|
|
3872
|
+
zOffset: zOffsetProp = layer.popover.zOffset,
|
|
3873
|
+
updateRef,
|
|
3874
|
+
...restProps
|
|
3875
|
+
} = props, animate = usePrefersReducedMotion() ? !1 : _animate, boundarySize = useElementSize(boundaryElement)?.border, padding = useArrayProp(paddingProp), radius = useArrayProp(radiusProp), shadow = useArrayProp(shadowProp), widthArrayProp = useArrayProp(widthProp), zOffset = useArrayProp(zOffsetProp), ref = react.useRef(null), arrowRef = react.useRef(null), rootBoundary = "viewport";
|
|
3876
|
+
react.useImperativeHandle(forwardedRef, () => ref.current);
|
|
3877
|
+
const mediaIndex = useMediaIndex(), boundaryWidth = constrainSize || preventOverflow ? boundarySize?.width : void 0, width = calcCurrentWidth({
|
|
3878
|
+
container,
|
|
3879
|
+
mediaIndex,
|
|
3880
|
+
width: widthArrayProp
|
|
3881
|
+
}), widthRef = react.useRef(width);
|
|
3882
|
+
react.useEffect(() => {
|
|
3883
|
+
widthRef.current = width;
|
|
3884
|
+
}, [width]);
|
|
3885
|
+
const maxWidth = calcMaxWidth({
|
|
3886
|
+
boundaryWidth,
|
|
3887
|
+
currentWidth: width
|
|
3888
|
+
}), maxWidthRef = react.useRef(maxWidth);
|
|
3889
|
+
react.useEffect(() => {
|
|
3890
|
+
maxWidthRef.current = maxWidth;
|
|
3891
|
+
}, [maxWidth]);
|
|
3892
|
+
const referenceWidthRef = react.useRef();
|
|
3893
|
+
react.useEffect(() => {
|
|
3876
3894
|
const floatingElement = ref.current;
|
|
3877
|
-
if (!open || !floatingElement
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
fallbackPlacements,
|
|
3893
|
-
padding: DEFAULT_POPOVER_PADDING,
|
|
3894
|
-
rootBoundary: "viewport"
|
|
3895
|
-
}), $[38] = constrainSize, $[39] = preventOverflow, $[40] = floatingBoundary, $[41] = fallbackPlacements, $[42] = t14) : t14 = $[42];
|
|
3896
|
-
let t15;
|
|
3897
|
-
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t15 = reactDom$1.offset({
|
|
3898
|
-
mainAxis: DEFAULT_POPOVER_DISTANCE
|
|
3899
|
-
}), $[43] = t15) : t15 = $[43];
|
|
3900
|
-
let t16;
|
|
3901
|
-
$[44] !== constrainSize || $[45] !== matchReferenceWidth || $[46] !== container || $[47] !== mediaIndex || $[48] !== widthArrayProp || $[49] !== boundaryWidth || $[50] !== floatingBoundary || $[51] !== margins ? (t16 = (constrainSize || matchReferenceWidth) && size({
|
|
3902
|
-
apply(t172) {
|
|
3903
|
-
const {
|
|
3895
|
+
if (!open || !floatingElement) return;
|
|
3896
|
+
const referenceWidth = referenceWidthRef.current;
|
|
3897
|
+
matchReferenceWidth ? referenceWidth !== void 0 && (floatingElement.style.width = `${referenceWidth}px`) : width !== void 0 && (floatingElement.style.width = `${width}px`), typeof maxWidth == "number" && (floatingElement.style.maxWidth = `${maxWidth}px`);
|
|
3898
|
+
}, [width, matchReferenceWidth, maxWidth, open]);
|
|
3899
|
+
const middleware = react.useMemo(() => {
|
|
3900
|
+
const ret = [];
|
|
3901
|
+
return (constrainSize || preventOverflow) && ret.push(reactDom$1.flip({
|
|
3902
|
+
boundary: floatingBoundary || void 0,
|
|
3903
|
+
fallbackPlacements,
|
|
3904
|
+
padding: DEFAULT_POPOVER_PADDING,
|
|
3905
|
+
rootBoundary
|
|
3906
|
+
})), ret.push(reactDom$1.offset({
|
|
3907
|
+
mainAxis: DEFAULT_POPOVER_DISTANCE
|
|
3908
|
+
})), (constrainSize || matchReferenceWidth) && ret.push(size({
|
|
3909
|
+
apply({
|
|
3904
3910
|
availableWidth,
|
|
3905
3911
|
availableHeight,
|
|
3906
3912
|
elements,
|
|
3907
|
-
referenceWidth
|
|
3908
|
-
}
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
width:
|
|
3912
|
-
}
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
matchReferenceWidth
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
$[56] !== arrowProp || $[57] !== arrowElement ? (t18 = arrowProp && reactDom$1.arrow({
|
|
3932
|
-
element: arrowElement,
|
|
3933
|
-
padding: DEFAULT_POPOVER_PADDING
|
|
3934
|
-
}), $[56] = arrowProp, $[57] = arrowElement, $[58] = t18) : t18 = $[58];
|
|
3935
|
-
const t19 = animate && origin, t20 = referenceBoundary || void 0;
|
|
3936
|
-
let t21;
|
|
3937
|
-
$[59] !== t20 ? (t21 = reactDom$1.hide({
|
|
3938
|
-
boundary: t20,
|
|
3939
|
-
padding: DEFAULT_POPOVER_PADDING,
|
|
3940
|
-
strategy: "referenceHidden"
|
|
3941
|
-
}), $[59] = t20, $[60] = t21) : t21 = $[60];
|
|
3942
|
-
let t22;
|
|
3943
|
-
$[61] !== t14 || $[62] !== t16 || $[63] !== t17 || $[64] !== t18 || $[65] !== t19 || $[66] !== t21 ? (t22 = [t14, t15, t16, t17, t18, t19, t21], $[61] = t14, $[62] = t16, $[63] = t17, $[64] = t18, $[65] = t19, $[66] = t21, $[67] = t22) : t22 = $[67];
|
|
3944
|
-
let t23;
|
|
3945
|
-
$[68] !== t22 || $[69] !== placementProp ? (t23 = {
|
|
3946
|
-
middleware: t22,
|
|
3947
|
-
placement: placementProp,
|
|
3948
|
-
whileElementsMounted: reactDom$1.autoUpdate
|
|
3949
|
-
}, $[68] = t22, $[69] = placementProp, $[70] = t23) : t23 = $[70];
|
|
3950
|
-
const {
|
|
3913
|
+
referenceWidth: referenceWidth_0
|
|
3914
|
+
}) {
|
|
3915
|
+
referenceWidthRef.current = referenceWidth_0;
|
|
3916
|
+
const _currentWidth = widthRef.current, _maxWidth = maxWidthRef.current;
|
|
3917
|
+
matchReferenceWidth ? elements.floating.style.width = `${referenceWidth_0}px` : _currentWidth !== void 0 && (elements.floating.style.width = `${_currentWidth}px`), constrainSize && (elements.floating.style.maxWidth = `${Math.min(availableWidth, _maxWidth ?? 1 / 0)}px`, elements.floating.style.maxHeight = `${availableHeight}px`);
|
|
3918
|
+
},
|
|
3919
|
+
boundaryElement: floatingBoundary || void 0,
|
|
3920
|
+
constrainSize,
|
|
3921
|
+
margins,
|
|
3922
|
+
matchReferenceWidth,
|
|
3923
|
+
padding: DEFAULT_POPOVER_PADDING
|
|
3924
|
+
})), preventOverflow && ret.push(reactDom$1.shift({
|
|
3925
|
+
boundary: floatingBoundary || void 0,
|
|
3926
|
+
rootBoundary,
|
|
3927
|
+
padding: DEFAULT_POPOVER_PADDING
|
|
3928
|
+
})), arrowProp && ret.push(reactDom$1.arrow({
|
|
3929
|
+
element: arrowRef,
|
|
3930
|
+
padding: DEFAULT_POPOVER_PADDING
|
|
3931
|
+
})), animate && ret.push(origin), ret.push(reactDom$1.hide({
|
|
3932
|
+
boundary: referenceBoundary || void 0,
|
|
3933
|
+
padding: DEFAULT_POPOVER_PADDING,
|
|
3934
|
+
strategy: "referenceHidden"
|
|
3935
|
+
})), ret;
|
|
3936
|
+
}, [animate, arrowProp, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, preventOverflow, referenceBoundary]), {
|
|
3951
3937
|
x,
|
|
3952
3938
|
y,
|
|
3953
3939
|
middlewareData,
|
|
@@ -3955,61 +3941,35 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
3955
3941
|
refs,
|
|
3956
3942
|
strategy,
|
|
3957
3943
|
update
|
|
3958
|
-
} = reactDom$1.useFloating(
|
|
3959
|
-
|
|
3960
|
-
|
|
3944
|
+
} = reactDom$1.useFloating({
|
|
3945
|
+
middleware,
|
|
3946
|
+
placement: placementProp,
|
|
3947
|
+
whileElementsMounted: reactDom$1.autoUpdate
|
|
3948
|
+
}), referenceHidden = middlewareData.hide?.referenceHidden, arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, setArrow = react.useCallback((arrowEl) => {
|
|
3949
|
+
arrowRef.current = arrowEl;
|
|
3950
|
+
}, []), setFloating = react.useCallback((node) => {
|
|
3961
3951
|
ref.current = node, refs.setFloating(node);
|
|
3962
|
-
},
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
}
|
|
3979
|
-
let t312;
|
|
3980
|
-
$[80] !== setReference || $[81] !== childProp ? (t312 = react.cloneElement(childProp, {
|
|
3981
|
-
ref: setReference
|
|
3982
|
-
}), $[80] = setReference, $[81] = childProp, $[82] = t312) : t312 = $[82], t30 = t312;
|
|
3983
|
-
}
|
|
3984
|
-
const child = t30;
|
|
3985
|
-
let t31, t32;
|
|
3986
|
-
$[83] !== update ? (t31 = () => update, t32 = [update], $[83] = update, $[84] = t31, $[85] = t32) : (t31 = $[84], t32 = $[85]), react.useImperativeHandle(updateRef, t31, t32);
|
|
3987
|
-
let t33, t34;
|
|
3988
|
-
if ($[86] !== child || $[87] !== refs || $[88] !== referenceElement ? (t33 = () => {
|
|
3989
|
-
child || refs.setReference(referenceElement || null);
|
|
3990
|
-
}, t34 = [referenceElement, refs, child], $[86] = child, $[87] = refs, $[88] = referenceElement, $[89] = t33, $[90] = t34) : (t33 = $[89], t34 = $[90]), react.useEffect(t33, t34), disabled) {
|
|
3991
|
-
let t352;
|
|
3992
|
-
return $[91] !== childProp ? (t352 = childProp || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[91] = childProp, $[92] = t352) : t352 = $[92], t352;
|
|
3993
|
-
}
|
|
3994
|
-
let t35;
|
|
3995
|
-
$[93] !== restProps || $[94] !== margins || $[95] !== animate || $[96] !== arrowProp || $[97] !== arrowX || $[98] !== arrowY || $[99] !== referenceHidden || $[100] !== overflow || $[101] !== padding || $[102] !== placement || $[103] !== radius || $[104] !== setFloating || $[105] !== scheme || $[106] !== shadow || $[107] !== originX || $[108] !== originY || $[109] !== strategy || $[110] !== tone || $[111] !== x || $[112] !== y || $[113] !== content ? (t35 = /* @__PURE__ */ jsxRuntime.jsx(PopoverCard, { ...restProps, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrowElement, arrowX, arrowY, hidden: referenceHidden, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, tone, x, y, children: content }), $[93] = restProps, $[94] = margins, $[95] = animate, $[96] = arrowProp, $[97] = arrowX, $[98] = arrowY, $[99] = referenceHidden, $[100] = overflow, $[101] = padding, $[102] = placement, $[103] = radius, $[104] = setFloating, $[105] = scheme, $[106] = shadow, $[107] = originX, $[108] = originY, $[109] = strategy, $[110] = tone, $[111] = x, $[112] = y, $[113] = content, $[114] = t35) : t35 = $[114];
|
|
3996
|
-
let t36;
|
|
3997
|
-
$[115] !== zOffset || $[116] !== t35 ? (t36 = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: t35 }), $[115] = zOffset, $[116] = t35, $[117] = t36) : t36 = $[117];
|
|
3998
|
-
const popover = t36;
|
|
3999
|
-
let t37;
|
|
4000
|
-
$[118] !== open || $[119] !== portal || $[120] !== popover ? (t37 = open && (portal ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: popover }) : popover), $[118] = open, $[119] = portal, $[120] = popover, $[121] = t37) : t37 = $[121];
|
|
4001
|
-
const children = t37;
|
|
4002
|
-
let t38;
|
|
4003
|
-
$[122] !== animate || $[123] !== children ? (t38 = animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children, $[122] = animate, $[123] = children, $[124] = t38) : t38 = $[124];
|
|
4004
|
-
let t39;
|
|
4005
|
-
return $[125] !== t38 || $[126] !== child ? (t39 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4006
|
-
t38,
|
|
3952
|
+
}, [refs]), setReference = react.useCallback((node_0) => {
|
|
3953
|
+
refs.setReference(node_0);
|
|
3954
|
+
const childRef = getElementRef(childProp);
|
|
3955
|
+
typeof childRef == "function" ? childRef(node_0) : childRef && (childRef.current = node_0);
|
|
3956
|
+
}, [childProp, refs]), child = react.useMemo(() => referenceElement ? childProp : childProp ? react.cloneElement(childProp, {
|
|
3957
|
+
ref: setReference
|
|
3958
|
+
}) : null, [childProp, referenceElement, setReference]);
|
|
3959
|
+
if (react.useEffect(() => {
|
|
3960
|
+
updateRef && (typeof updateRef == "function" ? updateRef(update) : updateRef && (updateRef.current = update));
|
|
3961
|
+
}, [update, updateRef]), react.useEffect(() => {
|
|
3962
|
+
referenceElement && refs.setReference(referenceElement);
|
|
3963
|
+
}, [referenceElement, refs]), disabled)
|
|
3964
|
+
return childProp || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
3965
|
+
const popover = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(PopoverCard, { ...restProps, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, hidden: referenceHidden, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, tone, width: matchReferenceWidth ? referenceWidthRef.current : width, x, y, children: content }) }), children = open && (portal ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: popover }) : popover);
|
|
3966
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3967
|
+
animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
|
|
4007
3968
|
child
|
|
4008
|
-
] })
|
|
3969
|
+
] });
|
|
4009
3970
|
}));
|
|
4010
3971
|
Popover.displayName = "Memo(ForwardRef(Popover))";
|
|
4011
|
-
function getElementRef
|
|
4012
|
-
if (!element) return null;
|
|
3972
|
+
function getElementRef(element) {
|
|
4013
3973
|
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
4014
3974
|
return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
|
|
4015
3975
|
}
|
|
@@ -4129,7 +4089,7 @@ function inputElementStyle(props) {
|
|
|
4129
4089
|
}
|
|
4130
4090
|
const Root$g = styledComponents.styled.div(radioBaseStyle), Input$4 = styledComponents.styled.input(inputElementStyle), Radio = react.forwardRef(function(props, forwardedRef) {
|
|
4131
4091
|
const $ = reactCompilerRuntime.c(19);
|
|
4132
|
-
let customValidity, disabled, readOnly, restProps,
|
|
4092
|
+
let className, customValidity, disabled, readOnly, restProps, style;
|
|
4133
4093
|
$[0] !== props ? ({
|
|
4134
4094
|
className,
|
|
4135
4095
|
disabled,
|
|
@@ -4137,13 +4097,13 @@ const Root$g = styledComponents.styled.div(radioBaseStyle), Input$4 = styledComp
|
|
|
4137
4097
|
customValidity,
|
|
4138
4098
|
readOnly,
|
|
4139
4099
|
...restProps
|
|
4140
|
-
} = props, $[0] = props, $[1] =
|
|
4100
|
+
} = props, $[0] = props, $[1] = className, $[2] = customValidity, $[3] = disabled, $[4] = readOnly, $[5] = restProps, $[6] = style) : (className = $[1], customValidity = $[2], disabled = $[3], readOnly = $[4], restProps = $[5], style = $[6]);
|
|
4141
4101
|
const ref = react.useRef(null);
|
|
4142
4102
|
let t0;
|
|
4143
4103
|
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[7] = t0) : t0 = $[7], react.useImperativeHandle(forwardedRef, t0), useCustomValidity(ref, customValidity);
|
|
4144
4104
|
const t1 = !disabled && readOnly ? "" : void 0, t2 = customValidity ? "" : void 0, t3 = disabled || readOnly;
|
|
4145
4105
|
let t4;
|
|
4146
|
-
$[8] !==
|
|
4106
|
+
$[8] !== readOnly || $[9] !== restProps || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Input$4, { "data-read-only": t1, "data-error": t2, ...restProps, disabled: t3, readOnly, ref, type: "radio" }), $[8] = readOnly, $[9] = restProps, $[10] = t1, $[11] = t2, $[12] = t3, $[13] = t4) : t4 = $[13];
|
|
4147
4107
|
let t5;
|
|
4148
4108
|
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", {}), $[14] = t5) : t5 = $[14];
|
|
4149
4109
|
let t6;
|
|
@@ -4297,7 +4257,7 @@ const selectStyle = {
|
|
|
4297
4257
|
iconBox: iconBoxStyle
|
|
4298
4258
|
}, Root$f = styledComponents.styled.div(selectStyle.root), Input$3 = styledComponents.styled.select(selectStyle.input), IconBox = styledComponents.styled(Box)(selectStyle.iconBox), Select = react.forwardRef(function(props, forwardedRef) {
|
|
4299
4259
|
const $ = reactCompilerRuntime.c(29);
|
|
4300
|
-
let
|
|
4260
|
+
let children, customValidity, disabled, readOnly, restProps, t0, t1, t2, t3;
|
|
4301
4261
|
$[0] !== props ? ({
|
|
4302
4262
|
children,
|
|
4303
4263
|
customValidity,
|
|
@@ -4308,13 +4268,13 @@ const selectStyle = {
|
|
|
4308
4268
|
readOnly,
|
|
4309
4269
|
space: t3,
|
|
4310
4270
|
...restProps
|
|
4311
|
-
} = props, $[0] = props, $[1] =
|
|
4271
|
+
} = props, $[0] = props, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = readOnly, $[5] = restProps, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3) : (children = $[1], customValidity = $[2], disabled = $[3], readOnly = $[4], restProps = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9]);
|
|
4312
4272
|
const fontSize2 = t0 === void 0 ? 2 : t0, padding = t1 === void 0 ? 3 : t1, radius = t2 === void 0 ? 2 : t2, space = t3 === void 0 ? 3 : t3, ref = react.useRef(null);
|
|
4313
4273
|
let t4;
|
|
4314
4274
|
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[10] = t4) : t4 = $[10], react.useImperativeHandle(forwardedRef, t4), useCustomValidity(ref, customValidity);
|
|
4315
4275
|
const t5 = !disabled && readOnly ? "" : void 0, t6 = useArrayProp(fontSize2), t7 = useArrayProp(padding), t8 = useArrayProp(radius), t9 = useArrayProp(space), t10 = disabled || readOnly;
|
|
4316
4276
|
let t11;
|
|
4317
|
-
$[11] !==
|
|
4277
|
+
$[11] !== children || $[12] !== restProps || $[13] !== t10 || $[14] !== t5 || $[15] !== t6 || $[16] !== t7 || $[17] !== t8 || $[18] !== t9 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Input$3, { "data-read-only": t5, "data-ui": "Select", ...restProps, $fontSize: t6, $padding: t7, $radius: t8, $space: t9, disabled: t10, ref, children }), $[11] = children, $[12] = restProps, $[13] = t10, $[14] = t5, $[15] = t6, $[16] = t7, $[17] = t8, $[18] = t9, $[19] = t11) : t11 = $[19];
|
|
4318
4278
|
let t12;
|
|
4319
4279
|
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {}), $[20] = t12) : t12 = $[20];
|
|
4320
4280
|
let t13;
|
|
@@ -4352,15 +4312,15 @@ function responsiveStackSpaceStyle(props) {
|
|
|
4352
4312
|
}
|
|
4353
4313
|
const Root$e = styledComponents.styled(Box)(stackBaseStyle, responsiveStackSpaceStyle), Stack = react.forwardRef(function(props, ref) {
|
|
4354
4314
|
const $ = reactCompilerRuntime.c(10);
|
|
4355
|
-
let as,
|
|
4315
|
+
let as, restProps, space;
|
|
4356
4316
|
$[0] !== props ? ({
|
|
4357
4317
|
as,
|
|
4358
4318
|
space,
|
|
4359
4319
|
...restProps
|
|
4360
|
-
} = props, $[0] = props, $[1] = as, $[2] =
|
|
4320
|
+
} = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = space) : (as = $[1], restProps = $[2], space = $[3]);
|
|
4361
4321
|
const t0 = typeof as == "string" ? as : void 0, t1 = useArrayProp(space);
|
|
4362
4322
|
let t2;
|
|
4363
|
-
return $[4] !==
|
|
4323
|
+
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t0 || $[8] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Root$e, { "data-as": t0, "data-ui": "Stack", ...restProps, $space: t1, forwardedAs: as, ref }), $[4] = as, $[5] = ref, $[6] = restProps, $[7] = t0, $[8] = t1, $[9] = t2) : t2 = $[9], t2;
|
|
4364
4324
|
});
|
|
4365
4325
|
Stack.displayName = "ForwardRef(Stack)";
|
|
4366
4326
|
function switchBaseStyles() {
|
|
@@ -4518,7 +4478,7 @@ function switchThumbStyles(props) {
|
|
|
4518
4478
|
}
|
|
4519
4479
|
const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledComponents.styled.input(switchInputStyles), Representation = styledComponents.styled.span(switchRepresentationStyles), Track = styledComponents.styled.span(switchTrackStyles), Thumb = styledComponents.styled.span(switchThumbStyles), Switch = react.forwardRef(function(props, forwardedRef) {
|
|
4520
4480
|
const $ = reactCompilerRuntime.c(26);
|
|
4521
|
-
let
|
|
4481
|
+
let checked, className, disabled, indeterminate, readOnly, restProps, style;
|
|
4522
4482
|
$[0] !== props ? ({
|
|
4523
4483
|
checked,
|
|
4524
4484
|
className,
|
|
@@ -4527,7 +4487,7 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
|
|
|
4527
4487
|
readOnly,
|
|
4528
4488
|
style,
|
|
4529
4489
|
...restProps
|
|
4530
|
-
} = props, $[0] = props, $[1] =
|
|
4490
|
+
} = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = disabled, $[4] = indeterminate, $[5] = readOnly, $[6] = restProps, $[7] = style) : (checked = $[1], className = $[2], disabled = $[3], indeterminate = $[4], readOnly = $[5], restProps = $[6], style = $[7]);
|
|
4531
4491
|
const ref = react.useRef(null);
|
|
4532
4492
|
let t0;
|
|
4533
4493
|
$[8] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[8] = t0) : t0 = $[8], react.useImperativeHandle(forwardedRef, t0);
|
|
@@ -4537,7 +4497,7 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
|
|
|
4537
4497
|
}, t2 = [indeterminate], $[9] = indeterminate, $[10] = t1, $[11] = t2) : (t1 = $[10], t2 = $[11]), react.useEffect(t1, t2);
|
|
4538
4498
|
const t3 = !disabled && readOnly ? "" : void 0, t4 = indeterminate !== !0 && checked, t5 = disabled || readOnly;
|
|
4539
4499
|
let t6;
|
|
4540
|
-
$[12] !==
|
|
4500
|
+
$[12] !== restProps || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Input$2, { "data-read-only": t3, ...restProps, checked: t4, disabled: t5, type: "checkbox", ref }), $[12] = restProps, $[13] = t3, $[14] = t4, $[15] = t5, $[16] = t6) : t6 = $[16];
|
|
4541
4501
|
let t7;
|
|
4542
4502
|
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Track, {}), $[17] = t7) : t7 = $[17];
|
|
4543
4503
|
let t8;
|
|
@@ -4559,7 +4519,7 @@ const Root$c = styledComponents.styled.span(textInputRootStyle), InputRoot$1 = s
|
|
|
4559
4519
|
position: relative;
|
|
4560
4520
|
`, Input$1 = styledComponents.styled.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation$1 = styledComponents.styled.div(responsiveRadiusStyle, textInputRepresentationStyle), TextArea = react.forwardRef(function(props, forwardedRef) {
|
|
4561
4521
|
const $ = reactCompilerRuntime.c(29);
|
|
4562
|
-
let t0, t1, t2, t3, t4,
|
|
4522
|
+
let __unstable_disableFocusRing, customValidity, restProps, t0, t1, t2, t3, t4, weight;
|
|
4563
4523
|
$[0] !== props ? ({
|
|
4564
4524
|
border: t0,
|
|
4565
4525
|
customValidity,
|
|
@@ -4570,16 +4530,16 @@ const Root$c = styledComponents.styled.span(textInputRootStyle), InputRoot$1 = s
|
|
|
4570
4530
|
weight,
|
|
4571
4531
|
__unstable_disableFocusRing,
|
|
4572
4532
|
...restProps
|
|
4573
|
-
} = props, $[0] = props, $[1] =
|
|
4533
|
+
} = props, $[0] = props, $[1] = __unstable_disableFocusRing, $[2] = customValidity, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = weight) : (__unstable_disableFocusRing = $[1], customValidity = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], weight = $[9]);
|
|
4574
4534
|
const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSize2 = t2 === void 0 ? 2 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, ref = react.useRef(null), rootTheme = useRootTheme();
|
|
4575
4535
|
let t5;
|
|
4576
4536
|
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[10] = t5) : t5 = $[10], react.useImperativeHandle(forwardedRef, t5), useCustomValidity(ref, customValidity);
|
|
4577
4537
|
const t6 = rootTheme.scheme, t7 = rootTheme.tone, t8 = useArrayProp(fontSize2), t9 = useArrayProp(padding), t10 = rootTheme.scheme, t11 = useArrayProp(0);
|
|
4578
4538
|
let t12;
|
|
4579
|
-
$[11] !==
|
|
4539
|
+
$[11] !== disabled || $[12] !== restProps || $[13] !== rootTheme.scheme || $[14] !== rootTheme.tone || $[15] !== t11 || $[16] !== t8 || $[17] !== t9 || $[18] !== weight ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(Input$1, { "data-as": "textarea", "data-scheme": t6, "data-tone": t7, ...restProps, $fontSize: t8, $padding: t9, $scheme: t10, $space: t11, $tone: rootTheme.tone, $weight: weight, disabled, ref }), $[11] = disabled, $[12] = restProps, $[13] = rootTheme.scheme, $[14] = rootTheme.tone, $[15] = t11, $[16] = t8, $[17] = t9, $[18] = weight, $[19] = t12) : t12 = $[19];
|
|
4580
4540
|
const t13 = useArrayProp(radius), t14 = border2 ? "" : void 0;
|
|
4581
4541
|
let t15;
|
|
4582
|
-
$[20] !==
|
|
4542
|
+
$[20] !== __unstable_disableFocusRing || $[21] !== rootTheme.scheme || $[22] !== rootTheme.tone || $[23] !== t13 || $[24] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(Presentation$1, { $radius: t13, $unstableDisableFocusRing: __unstable_disableFocusRing, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t14, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone }), $[20] = __unstable_disableFocusRing, $[21] = rootTheme.scheme, $[22] = rootTheme.tone, $[23] = t13, $[24] = t14, $[25] = t15) : t15 = $[25];
|
|
4583
4543
|
let t16;
|
|
4584
4544
|
return $[26] !== t12 || $[27] !== t15 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Root$c, { "data-ui": "TextArea", children: /* @__PURE__ */ jsxRuntime.jsxs(InputRoot$1, { children: [
|
|
4585
4545
|
t12,
|
|
@@ -4634,8 +4594,8 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
4634
4594
|
display: "block"
|
|
4635
4595
|
}
|
|
4636
4596
|
}), TextInput = react.forwardRef(function(props, forwardedRef) {
|
|
4637
|
-
const $ = reactCompilerRuntime.c(
|
|
4638
|
-
let
|
|
4597
|
+
const $ = reactCompilerRuntime.c(84);
|
|
4598
|
+
let IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
|
|
4639
4599
|
$[0] !== props ? ({
|
|
4640
4600
|
__unstable_disableFocusRing,
|
|
4641
4601
|
border: t0,
|
|
@@ -4655,11 +4615,11 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
4655
4615
|
type: t6,
|
|
4656
4616
|
weight,
|
|
4657
4617
|
...restProps
|
|
4658
|
-
} = props, $[0] = props, $[1] =
|
|
4618
|
+
} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = clearButton, $[5] = customValidity, $[6] = onClear, $[7] = prefix, $[8] = readOnly, $[9] = restProps, $[10] = suffix, $[11] = t0, $[12] = t1, $[13] = t2, $[14] = t3, $[15] = t4, $[16] = t5, $[17] = t6, $[18] = weight) : (IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], clearButton = $[4], customValidity = $[5], onClear = $[6], prefix = $[7], readOnly = $[8], restProps = $[9], suffix = $[10], t0 = $[11], t1 = $[12], t2 = $[13], t3 = $[14], t4 = $[15], t5 = $[16], t6 = $[17], weight = $[18]);
|
|
4659
4619
|
const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSizeProp = t2 === void 0 ? 2 : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, spaceProp = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? "text" : t6, ref = react.useRef(null), rootTheme = useRootTheme(), fontSize2 = useArrayProp(fontSizeProp), padding = useArrayProp(paddingProp), radius = useArrayProp(radiusProp), space = useArrayProp(spaceProp), $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix;
|
|
4660
4620
|
let t7;
|
|
4661
4621
|
$[19] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[19] = t7) : t7 = $[19], react.useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
|
|
4662
|
-
const handleClearMouseDown = _temp$
|
|
4622
|
+
const handleClearMouseDown = _temp$3;
|
|
4663
4623
|
let t8;
|
|
4664
4624
|
$[20] !== onClear ? (t8 = (event_0) => {
|
|
4665
4625
|
event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
|
|
@@ -4681,55 +4641,51 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
4681
4641
|
ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
4682
4642
|
] }) }), $[29] = $hasClearButton, $[30] = IconRightComponent, $[31] = fontSize2, $[32] = padding, $[33] = t14) : t14 = $[33];
|
|
4683
4643
|
let t15;
|
|
4684
|
-
$[34] !== $hasPrefix || $[35] !==
|
|
4644
|
+
$[34] !== $hasPrefix || $[35] !== $hasSuffix || $[36] !== __unstable_disableFocusRing || $[37] !== radius || $[38] !== rootTheme.scheme || $[39] !== rootTheme.tone || $[40] !== t12 || $[41] !== t13 || $[42] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsxs(Presentation, { $hasPrefix, $unstableDisableFocusRing: __unstable_disableFocusRing, $hasSuffix, $radius: radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t12, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, children: [
|
|
4685
4645
|
t13,
|
|
4686
4646
|
t14
|
|
4687
|
-
] }), $[34] = $hasPrefix, $[35] =
|
|
4647
|
+
] }), $[34] = $hasPrefix, $[35] = $hasSuffix, $[36] = __unstable_disableFocusRing, $[37] = radius, $[38] = rootTheme.scheme, $[39] = rootTheme.tone, $[40] = t12, $[41] = t13, $[42] = t14, $[43] = t15) : t15 = $[43], t11 = t15;
|
|
4688
4648
|
const presentationNode = t11;
|
|
4689
4649
|
let t16, t17;
|
|
4690
|
-
|
|
4691
|
-
let t182;
|
|
4692
|
-
$[46] === Symbol.for("react.memo_cache_sentinel") ? (t182 = (v) => v === 0 ? 0 : v === 1 || v === 2 ? 1 : v - 2, $[46] = t182) : t182 = $[46], t17 = padding.map(t182), $[44] = padding, $[45] = t17;
|
|
4693
|
-
} else
|
|
4694
|
-
t17 = $[45];
|
|
4695
|
-
t16 = t17;
|
|
4650
|
+
$[44] !== padding ? (t17 = padding.map(_temp2$1), $[44] = padding, $[45] = t17) : t17 = $[45], t16 = t17;
|
|
4696
4651
|
const clearButtonBoxPadding = t16;
|
|
4697
4652
|
let t18, t19;
|
|
4698
|
-
|
|
4699
|
-
let t202;
|
|
4700
|
-
$[49] === Symbol.for("react.memo_cache_sentinel") ? (t202 = (v_0) => v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : v_0 - 1, $[49] = t202) : t202 = $[49], t19 = padding.map(t202), $[47] = padding, $[48] = t19;
|
|
4701
|
-
} else
|
|
4702
|
-
t19 = $[48];
|
|
4703
|
-
t18 = t19;
|
|
4653
|
+
$[46] !== padding ? (t19 = padding.map(_temp3), $[46] = padding, $[47] = t19) : t19 = $[47], t18 = t19;
|
|
4704
4654
|
const clearButtonPadding = t18;
|
|
4705
4655
|
let t20;
|
|
4706
4656
|
t20 = typeof clearButton == "object" ? clearButton : EMPTY_RECORD;
|
|
4707
4657
|
const clearButtonProps = t20;
|
|
4708
4658
|
let t21, t22;
|
|
4709
|
-
$[
|
|
4659
|
+
$[48] !== clearButton || $[49] !== clearButtonBoxPadding || $[50] !== clearButtonPadding || $[51] !== clearButtonProps || $[52] !== customValidity || $[53] !== disabled || $[54] !== fontSize2 || $[55] !== handleClearClick || $[56] !== radius || $[57] !== readOnly ? (t22 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsxRuntime.jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(TextInputClearButton, { "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: icons.CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[48] = clearButton, $[49] = clearButtonBoxPadding, $[50] = clearButtonPadding, $[51] = clearButtonProps, $[52] = customValidity, $[53] = disabled, $[54] = fontSize2, $[55] = handleClearClick, $[56] = radius, $[57] = readOnly, $[58] = t22) : t22 = $[58], t21 = t22;
|
|
4710
4660
|
const clearButtonNode = t21;
|
|
4711
4661
|
let t23, t24;
|
|
4712
|
-
$[
|
|
4662
|
+
$[59] !== radius || $[60] !== suffix ? (t24 = suffix && /* @__PURE__ */ jsxRuntime.jsx(Suffix, { borderTop: !0, borderRight: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: suffix }) }), $[59] = radius, $[60] = suffix, $[61] = t24) : t24 = $[61], t23 = t24;
|
|
4713
4663
|
const suffixNode = t23, t25 = $hasIconRight || $hasClearButton;
|
|
4714
4664
|
let t26;
|
|
4715
|
-
$[
|
|
4665
|
+
$[62] !== $hasIcon || $[63] !== disabled || $[64] !== fontSize2 || $[65] !== padding || $[66] !== readOnly || $[67] !== restProps || $[68] !== rootTheme.scheme || $[69] !== rootTheme.tone || $[70] !== space || $[71] !== t25 || $[72] !== type || $[73] !== weight ? (t26 = /* @__PURE__ */ jsxRuntime.jsx(Input, { "data-as": "input", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: fontSize2, $iconLeft: $hasIcon, $iconRight: t25, $padding: padding, $scheme: rootTheme.scheme, $space: space, $tone: rootTheme.tone, $weight: weight, disabled, readOnly, ref, type }), $[62] = $hasIcon, $[63] = disabled, $[64] = fontSize2, $[65] = padding, $[66] = readOnly, $[67] = restProps, $[68] = rootTheme.scheme, $[69] = rootTheme.tone, $[70] = space, $[71] = t25, $[72] = type, $[73] = weight, $[74] = t26) : t26 = $[74];
|
|
4716
4666
|
let t27;
|
|
4717
|
-
$[
|
|
4667
|
+
$[75] !== clearButtonNode || $[76] !== presentationNode || $[77] !== t26 ? (t27 = /* @__PURE__ */ jsxRuntime.jsxs(InputRoot, { children: [
|
|
4718
4668
|
t26,
|
|
4719
4669
|
presentationNode,
|
|
4720
4670
|
clearButtonNode
|
|
4721
|
-
] }), $[
|
|
4671
|
+
] }), $[75] = clearButtonNode, $[76] = presentationNode, $[77] = t26, $[78] = t27) : t27 = $[78];
|
|
4722
4672
|
let t28;
|
|
4723
|
-
return $[
|
|
4673
|
+
return $[79] !== prefixNode || $[80] !== rootTheme.tone || $[81] !== suffixNode || $[82] !== t27 ? (t28 = /* @__PURE__ */ jsxRuntime.jsxs(Root$b, { "data-ui": "TextInput", tone: rootTheme.tone, children: [
|
|
4724
4674
|
prefixNode,
|
|
4725
4675
|
t27,
|
|
4726
4676
|
suffixNode
|
|
4727
|
-
] }), $[
|
|
4677
|
+
] }), $[79] = prefixNode, $[80] = rootTheme.tone, $[81] = suffixNode, $[82] = t27, $[83] = t28) : t28 = $[83], t28;
|
|
4728
4678
|
});
|
|
4729
4679
|
TextInput.displayName = "ForwardRef(TextInput)";
|
|
4730
|
-
function _temp$
|
|
4680
|
+
function _temp$3(event) {
|
|
4731
4681
|
event.preventDefault(), event.stopPropagation();
|
|
4732
4682
|
}
|
|
4683
|
+
function _temp2$1(v) {
|
|
4684
|
+
return v === 0 ? 0 : v === 1 || v === 2 ? 1 : v - 2;
|
|
4685
|
+
}
|
|
4686
|
+
function _temp3(v_0) {
|
|
4687
|
+
return v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : v_0 - 1;
|
|
4688
|
+
}
|
|
4733
4689
|
function useDelayedState(initialState) {
|
|
4734
4690
|
const $ = reactCompilerRuntime.c(3), [state, setState] = react.useState(initialState), delayedAction = react.useRef();
|
|
4735
4691
|
let t0;
|
|
@@ -4765,7 +4721,7 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
4765
4721
|
}
|
|
4766
4722
|
`, TooltipCard = react.memo(react.forwardRef(function(props, ref) {
|
|
4767
4723
|
const $ = reactCompilerRuntime.c(42);
|
|
4768
|
-
let animate,
|
|
4724
|
+
let animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, restProps, scheme, shadow, style;
|
|
4769
4725
|
$[0] !== props ? ({
|
|
4770
4726
|
animate,
|
|
4771
4727
|
arrow,
|
|
@@ -4782,16 +4738,16 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
4782
4738
|
shadow,
|
|
4783
4739
|
style,
|
|
4784
4740
|
...restProps
|
|
4785
|
-
} = props, $[0] = props, $[1] = animate, $[2] =
|
|
4741
|
+
} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = restProps, $[13] = scheme, $[14] = shadow, $[15] = style) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], restProps = $[12], scheme = $[13], shadow = $[14], style = $[15]);
|
|
4786
4742
|
let t0;
|
|
4787
4743
|
const t1 = animate ? "transform" : void 0;
|
|
4788
4744
|
let t2;
|
|
4789
|
-
$[16] !== originX || $[17] !== originY || $[18] !==
|
|
4745
|
+
$[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t1 ? (t2 = {
|
|
4790
4746
|
originX,
|
|
4791
4747
|
originY,
|
|
4792
4748
|
willChange: t1,
|
|
4793
4749
|
...style
|
|
4794
|
-
}, $[16] = originX, $[17] = originY, $[18] =
|
|
4750
|
+
}, $[16] = originX, $[17] = originY, $[18] = style, $[19] = t1, $[20] = t2) : t2 = $[20], t0 = t2;
|
|
4795
4751
|
const rootStyle2 = t0;
|
|
4796
4752
|
let t3;
|
|
4797
4753
|
const t4 = arrowX !== null ? arrowX : void 0, t5 = arrowY !== null ? arrowY : void 0;
|
|
@@ -4808,10 +4764,10 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
4808
4764
|
let t9;
|
|
4809
4765
|
$[26] !== arrow || $[27] !== arrowRef || $[28] !== arrowStyle ? (t9 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[26] = arrow, $[27] = arrowRef, $[28] = arrowStyle, $[29] = t9) : t9 = $[29];
|
|
4810
4766
|
let t10;
|
|
4811
|
-
return $[30] !==
|
|
4767
|
+
return $[30] !== children || $[31] !== padding || $[32] !== placement || $[33] !== radius || $[34] !== ref || $[35] !== rootStyle2 || $[36] !== scheme || $[37] !== shadow || $[38] !== t7 || $[39] !== t8 || $[40] !== t9 ? (t10 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard, { "data-ui": "Tooltip__card", ...t7, "data-placement": placement, padding, radius, ref, scheme, shadow, style: rootStyle2, ...t8, children: [
|
|
4812
4768
|
children,
|
|
4813
4769
|
t9
|
|
4814
|
-
] }), $[30] =
|
|
4770
|
+
] }), $[30] = children, $[31] = padding, $[32] = placement, $[33] = radius, $[34] = ref, $[35] = rootStyle2, $[36] = scheme, $[37] = shadow, $[38] = t7, $[39] = t8, $[40] = t9, $[41] = t10) : t10 = $[41], t10;
|
|
4815
4771
|
}));
|
|
4816
4772
|
TooltipCard.displayName = "Memo(ForwardRef(TooltipCard))";
|
|
4817
4773
|
const TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
|
|
@@ -4826,96 +4782,71 @@ function TooltipDelayGroupProvider(props) {
|
|
|
4826
4782
|
let t0;
|
|
4827
4783
|
const t1 = isGroupActive ? 1 : openDelay;
|
|
4828
4784
|
let t2;
|
|
4829
|
-
$[0] !==
|
|
4785
|
+
$[0] !== closeDelay || $[1] !== isGroupActive || $[2] !== openTooltipId || $[3] !== setIsGroupActive || $[4] !== setOpenTooltipId || $[5] !== t1 ? (t2 = {
|
|
4830
4786
|
isGroupActive,
|
|
4831
4787
|
setIsGroupActive,
|
|
4832
4788
|
openTooltipId,
|
|
4833
4789
|
setOpenTooltipId,
|
|
4834
4790
|
openDelay: t1,
|
|
4835
4791
|
closeDelay
|
|
4836
|
-
}, $[0] =
|
|
4792
|
+
}, $[0] = closeDelay, $[1] = isGroupActive, $[2] = openTooltipId, $[3] = setIsGroupActive, $[4] = setOpenTooltipId, $[5] = t1, $[6] = t2) : t2 = $[6], t0 = t2;
|
|
4837
4793
|
const value = t0;
|
|
4838
4794
|
let t3;
|
|
4839
|
-
return $[7] !==
|
|
4795
|
+
return $[7] !== children || $[8] !== value ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(TooltipDelayGroupContext.Provider, { value, children }), $[7] = children, $[8] = value, $[9] = t3) : t3 = $[9], t3;
|
|
4840
4796
|
}
|
|
4841
4797
|
TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
|
|
4842
4798
|
const Root$a = styledComponents.styled(Layer)`
|
|
4843
4799
|
pointer-events: none;
|
|
4844
4800
|
`, Tooltip = react.forwardRef(function(props, forwardedRef) {
|
|
4845
|
-
const
|
|
4801
|
+
const boundaryElementContext = useBoundaryElement(), {
|
|
4846
4802
|
layer
|
|
4847
|
-
} = useTheme_v2()
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
arrow: t1,
|
|
4852
|
-
boundaryElement: _boundaryElement,
|
|
4803
|
+
} = useTheme_v2(), {
|
|
4804
|
+
animate: _animate = !1,
|
|
4805
|
+
arrow: arrowProp = !1,
|
|
4806
|
+
boundaryElement = boundaryElementContext?.element,
|
|
4853
4807
|
children: childProp,
|
|
4854
4808
|
content,
|
|
4855
4809
|
disabled,
|
|
4856
|
-
fallbackPlacements:
|
|
4857
|
-
padding
|
|
4858
|
-
placement:
|
|
4810
|
+
fallbackPlacements: fallbackPlacementsProp = props.fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? "bottom"],
|
|
4811
|
+
padding = 2,
|
|
4812
|
+
placement: placementProp = "bottom",
|
|
4859
4813
|
portal: portalProp,
|
|
4860
|
-
radius
|
|
4814
|
+
radius = 2,
|
|
4861
4815
|
scheme,
|
|
4862
|
-
shadow
|
|
4863
|
-
zOffset
|
|
4816
|
+
shadow = 2,
|
|
4817
|
+
zOffset = layer.tooltip.zOffset,
|
|
4864
4818
|
delay,
|
|
4865
4819
|
...restProps
|
|
4866
|
-
} = props,
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
if ($[18] !== boundaryElement || $[19] !== fallbackPlacements || $[20] !== arrowProp || $[21] !== arrowElement || $[22] !== animate) {
|
|
4873
|
-
ret = [];
|
|
4874
|
-
const t82 = boundaryElement || void 0;
|
|
4875
|
-
let t92;
|
|
4876
|
-
$[24] !== t82 || $[25] !== fallbackPlacements ? (t92 = reactDom$1.flip({
|
|
4877
|
-
boundary: t82,
|
|
4820
|
+
} = props, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), ref = react.useRef(null), [referenceElement, setReferenceElement] = react.useState(null), arrowRef = react.useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = react.useState(0);
|
|
4821
|
+
react.useImperativeHandle(forwardedRef, () => ref.current);
|
|
4822
|
+
const portal = usePortal(), portalElement = typeof portalProp == "string" ? portal.elements?.[portalProp] || null : portal.element, middleware = react.useMemo(() => {
|
|
4823
|
+
const ret = [];
|
|
4824
|
+
return ret.push(reactDom$1.flip({
|
|
4825
|
+
boundary: boundaryElement || void 0,
|
|
4878
4826
|
fallbackPlacements,
|
|
4879
4827
|
padding: DEFAULT_TOOLTIP_PADDING,
|
|
4880
|
-
rootBoundary
|
|
4881
|
-
})
|
|
4882
|
-
let t102;
|
|
4883
|
-
$[27] === Symbol.for("react.memo_cache_sentinel") ? (t102 = reactDom$1.offset({
|
|
4828
|
+
rootBoundary
|
|
4829
|
+
})), ret.push(reactDom$1.offset({
|
|
4884
4830
|
mainAxis: DEFAULT_TOOLTIP_DISTANCE
|
|
4885
|
-
})
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
if ($[28] !== t112 ? (t122 = reactDom$1.shift({
|
|
4889
|
-
boundary: t112,
|
|
4890
|
-
rootBoundary: "viewport",
|
|
4831
|
+
})), ret.push(reactDom$1.shift({
|
|
4832
|
+
boundary: boundaryElement || void 0,
|
|
4833
|
+
rootBoundary,
|
|
4891
4834
|
padding: DEFAULT_TOOLTIP_PADDING
|
|
4892
|
-
}),
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
}), $[30] = arrowElement, $[31] = t132) : t132 = $[31], ret.push(t132);
|
|
4898
|
-
}
|
|
4899
|
-
animate && ret.push(origin), $[18] = boundaryElement, $[19] = fallbackPlacements, $[20] = arrowProp, $[21] = arrowElement, $[22] = animate, $[23] = ret;
|
|
4900
|
-
} else
|
|
4901
|
-
ret = $[23];
|
|
4902
|
-
t7 = ret;
|
|
4903
|
-
const middleware = t7;
|
|
4904
|
-
let t8;
|
|
4905
|
-
$[32] !== middleware || $[33] !== placementProp ? (t8 = {
|
|
4906
|
-
middleware,
|
|
4907
|
-
placement: placementProp,
|
|
4908
|
-
whileElementsMounted: reactDom$1.autoUpdate
|
|
4909
|
-
}, $[32] = middleware, $[33] = placementProp, $[34] = t8) : t8 = $[34];
|
|
4910
|
-
const {
|
|
4835
|
+
})), arrowProp && ret.push(reactDom$1.arrow({
|
|
4836
|
+
element: arrowRef,
|
|
4837
|
+
padding: DEFAULT_TOOLTIP_PADDING
|
|
4838
|
+
})), animate && ret.push(origin), ret;
|
|
4839
|
+
}, [animate, arrowProp, boundaryElement, fallbackPlacements]), {
|
|
4911
4840
|
floatingStyles,
|
|
4912
4841
|
placement,
|
|
4913
4842
|
middlewareData,
|
|
4914
4843
|
refs,
|
|
4915
4844
|
update
|
|
4916
|
-
} = reactDom$1.useFloating(
|
|
4917
|
-
|
|
4918
|
-
|
|
4845
|
+
} = reactDom$1.useFloating({
|
|
4846
|
+
middleware,
|
|
4847
|
+
placement: placementProp,
|
|
4848
|
+
whileElementsMounted: reactDom$1.autoUpdate
|
|
4849
|
+
}), arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, tooltipId = react.useId(), [isOpen, setIsOpen] = useDelayedState(!1), delayGroupContext = useTooltipDelayGroup(), showTooltip = isOpen || delayGroupContext?.openTooltipId === tooltipId, isInsideGroup = delayGroupContext !== null, openDelayProp = typeof delay == "number" ? delay : delay?.open || 0, closeDelayProp = typeof delay == "number" ? delay : delay?.close || 0, openDelay = isInsideGroup ? delayGroupContext.openDelay : openDelayProp, closeDelay = isInsideGroup ? delayGroupContext.closeDelay : closeDelayProp, handleIsOpenChange = react.useCallback((open, immediate) => {
|
|
4919
4850
|
if (isInsideGroup)
|
|
4920
4851
|
if (open) {
|
|
4921
4852
|
const groupedOpenDelay = immediate ? 0 : openDelay;
|
|
@@ -4926,133 +4857,67 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
4926
4857
|
}
|
|
4927
4858
|
else
|
|
4928
4859
|
setIsOpen(open, immediate ? 0 : open ? openDelay : closeDelay);
|
|
4929
|
-
},
|
|
4930
|
-
const handleIsOpenChange = t9;
|
|
4931
|
-
let t10;
|
|
4932
|
-
$[42] !== handleIsOpenChange || $[43] !== childProp ? (t10 = (e) => {
|
|
4860
|
+
}, [isInsideGroup, delayGroupContext, openDelay, tooltipId, closeDelay, setIsOpen]), handleBlur = react.useCallback((e) => {
|
|
4933
4861
|
handleIsOpenChange(!1), childProp?.props?.onBlur?.(e);
|
|
4934
|
-
},
|
|
4935
|
-
const handleBlur = t10;
|
|
4936
|
-
let t11;
|
|
4937
|
-
$[45] !== handleIsOpenChange || $[46] !== childProp ? (t11 = (e_0) => {
|
|
4862
|
+
}, [childProp?.props, handleIsOpenChange]), handleClick = react.useCallback((e_0) => {
|
|
4938
4863
|
handleIsOpenChange(!1, !0), childProp?.props.onClick?.(e_0);
|
|
4939
|
-
},
|
|
4940
|
-
const handleClick = t11;
|
|
4941
|
-
let t12;
|
|
4942
|
-
$[48] !== handleIsOpenChange || $[49] !== childProp ? (t12 = (e_1) => {
|
|
4864
|
+
}, [childProp?.props, handleIsOpenChange]), handleContextMenu = react.useCallback((e_1) => {
|
|
4943
4865
|
handleIsOpenChange(!1, !0), childProp?.props.onContextMenu?.(e_1);
|
|
4944
|
-
},
|
|
4945
|
-
const handleContextMenu = t12;
|
|
4946
|
-
let t13;
|
|
4947
|
-
$[51] !== handleIsOpenChange || $[52] !== childProp ? (t13 = (e_2) => {
|
|
4866
|
+
}, [childProp?.props, handleIsOpenChange]), handleFocus = react.useCallback((e_2) => {
|
|
4948
4867
|
handleIsOpenChange(!0), childProp?.props?.onFocus?.(e_2);
|
|
4949
|
-
},
|
|
4950
|
-
const handleFocus = t13;
|
|
4951
|
-
let t14;
|
|
4952
|
-
$[54] !== handleIsOpenChange || $[55] !== childProp ? (t14 = (e_3) => {
|
|
4868
|
+
}, [childProp?.props, handleIsOpenChange]), handleMouseEnter = react.useCallback((e_3) => {
|
|
4953
4869
|
handleIsOpenChange(!0), childProp?.props?.onMouseEnter?.(e_3);
|
|
4954
|
-
},
|
|
4955
|
-
const handleMouseEnter = t14;
|
|
4956
|
-
let t15;
|
|
4957
|
-
$[57] !== handleIsOpenChange || $[58] !== childProp ? (t15 = (e_4) => {
|
|
4870
|
+
}, [childProp?.props, handleIsOpenChange]), handleMouseLeave = react.useCallback((e_4) => {
|
|
4958
4871
|
handleIsOpenChange(!1), childProp?.props?.onMouseLeave?.(e_4);
|
|
4959
|
-
},
|
|
4960
|
-
|
|
4961
|
-
let t16;
|
|
4962
|
-
$[60] !== handleIsOpenChange || $[61] !== referenceElement || $[62] !== showTooltip ? (t16 = {
|
|
4872
|
+
}, [childProp?.props, handleIsOpenChange]);
|
|
4873
|
+
useCloseOnMouseLeave({
|
|
4963
4874
|
handleIsOpenChange,
|
|
4964
4875
|
referenceElement,
|
|
4965
4876
|
showTooltip
|
|
4966
|
-
},
|
|
4967
|
-
let t17, t18;
|
|
4968
|
-
$[64] !== disabled || $[65] !== showTooltip || $[66] !== handleIsOpenChange ? (t17 = () => {
|
|
4877
|
+
}), react.useEffect(() => {
|
|
4969
4878
|
disabled && showTooltip && handleIsOpenChange(!1);
|
|
4970
|
-
},
|
|
4971
|
-
let t19, t20;
|
|
4972
|
-
$[69] !== content || $[70] !== showTooltip || $[71] !== handleIsOpenChange ? (t19 = () => {
|
|
4879
|
+
}, [disabled, handleIsOpenChange, showTooltip]), react.useEffect(() => {
|
|
4973
4880
|
!content && showTooltip && handleIsOpenChange(!1);
|
|
4974
|
-
},
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
let t23, t24;
|
|
4978
|
-
$[78] !== showTooltip || $[79] !== handleIsOpenChange ? (t23 = () => {
|
|
4979
|
-
if (!showTooltip)
|
|
4980
|
-
return;
|
|
4981
|
-
const handleWindowKeyDown = function(event) {
|
|
4881
|
+
}, [content, handleIsOpenChange, showTooltip]), react.useEffect(() => refs.setReference(referenceElement), [referenceElement, refs]), react.useEffect(() => {
|
|
4882
|
+
if (!showTooltip) return;
|
|
4883
|
+
function handleWindowKeyDown(event) {
|
|
4982
4884
|
event.key === "Escape" && handleIsOpenChange(!1, !0);
|
|
4983
|
-
}
|
|
4885
|
+
}
|
|
4984
4886
|
return window.addEventListener("keydown", handleWindowKeyDown), () => {
|
|
4985
4887
|
window.removeEventListener("keydown", handleWindowKeyDown);
|
|
4986
4888
|
};
|
|
4987
|
-
},
|
|
4988
|
-
let t25, t26;
|
|
4989
|
-
$[82] !== boundaryElement || $[83] !== portalElement ? (t25 = () => {
|
|
4889
|
+
}, [handleIsOpenChange, showTooltip]), react.useLayoutEffect(() => {
|
|
4990
4890
|
const availableWidths = [...boundaryElement ? [boundaryElement.offsetWidth] : [], portalElement?.offsetWidth || document.body.offsetWidth];
|
|
4991
4891
|
setTooltipMaxWidth(Math.min(...availableWidths) - DEFAULT_TOOLTIP_PADDING * 2);
|
|
4992
|
-
},
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
}, $[86] = update, $[87] = t27) : t27 = $[87];
|
|
4997
|
-
const setArrow = t27;
|
|
4998
|
-
let t28;
|
|
4999
|
-
$[88] !== refs ? (t28 = (node) => {
|
|
4892
|
+
}, [boundaryElement, portalElement]);
|
|
4893
|
+
const setArrow = react.useCallback((arrowEl) => {
|
|
4894
|
+
arrowRef.current = arrowEl, update();
|
|
4895
|
+
}, [update]), setFloating = react.useCallback((node) => {
|
|
5000
4896
|
ref.current = node, refs.setFloating(node);
|
|
5001
|
-
},
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
let t342;
|
|
5014
|
-
$[95] !== handleBlur || $[96] !== handleFocus || $[97] !== handleMouseEnter || $[98] !== handleMouseLeave || $[99] !== handleClick || $[100] !== handleContextMenu || $[101] !== childProp ? (t342 = react.cloneElement(childProp, {
|
|
5015
|
-
onBlur: handleBlur,
|
|
5016
|
-
onFocus: handleFocus,
|
|
5017
|
-
onMouseEnter: handleMouseEnter,
|
|
5018
|
-
onMouseLeave: handleMouseLeave,
|
|
5019
|
-
onClick: handleClick,
|
|
5020
|
-
onContextMenu: handleContextMenu,
|
|
5021
|
-
ref: setChildElement
|
|
5022
|
-
}), $[95] = handleBlur, $[96] = handleFocus, $[97] = handleMouseEnter, $[98] = handleMouseLeave, $[99] = handleClick, $[100] = handleContextMenu, $[101] = childProp, $[102] = t342) : t342 = $[102], t33 = t342;
|
|
5023
|
-
}
|
|
5024
|
-
const child = t33;
|
|
5025
|
-
let t34, t35;
|
|
5026
|
-
if ($[103] !== child ? (t34 = () => {
|
|
4897
|
+
}, [refs]), childRef = react.useRef(null);
|
|
4898
|
+
react.useImperativeHandle(childProp?.ref, () => childRef.current);
|
|
4899
|
+
const child = react.useMemo(() => childProp ? react.cloneElement(childProp, {
|
|
4900
|
+
onBlur: handleBlur,
|
|
4901
|
+
onFocus: handleFocus,
|
|
4902
|
+
onMouseEnter: handleMouseEnter,
|
|
4903
|
+
onMouseLeave: handleMouseLeave,
|
|
4904
|
+
onClick: handleClick,
|
|
4905
|
+
onContextMenu: handleContextMenu,
|
|
4906
|
+
ref: childRef
|
|
4907
|
+
}) : null, [childProp, handleBlur, handleClick, handleContextMenu, handleFocus, handleMouseEnter, handleMouseLeave]);
|
|
4908
|
+
if (react.useEffect(() => {
|
|
5027
4909
|
if (child)
|
|
5028
4910
|
return setReferenceElement(childRef.current), () => setReferenceElement(null);
|
|
5029
|
-
},
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
}
|
|
5033
|
-
if (disabled)
|
|
5034
|
-
return child;
|
|
5035
|
-
const t36 = tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0;
|
|
5036
|
-
let t37;
|
|
5037
|
-
$[107] !== floatingStyles || $[108] !== t36 ? (t37 = {
|
|
4911
|
+
}, [child]), !child) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
4912
|
+
if (disabled) return child;
|
|
4913
|
+
const tooltip = /* @__PURE__ */ jsxRuntime.jsx(Root$a, { "data-ui": "Tooltip", ...restProps, ref: setFloating, style: {
|
|
5038
4914
|
...floatingStyles,
|
|
5039
|
-
maxWidth:
|
|
5040
|
-
},
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
let t39;
|
|
5044
|
-
$[126] !== restProps || $[127] !== setFloating || $[128] !== t37 || $[129] !== zOffset || $[130] !== t38 ? (t39 = /* @__PURE__ */ jsxRuntime.jsx(Root$a, { "data-ui": "Tooltip", ...restProps, ref: setFloating, style: t37, zOffset, children: t38 }), $[126] = restProps, $[127] = setFloating, $[128] = t37, $[129] = zOffset, $[130] = t38, $[131] = t39) : t39 = $[131];
|
|
5045
|
-
const tooltip = t39;
|
|
5046
|
-
let t40;
|
|
5047
|
-
$[132] !== showTooltip || $[133] !== portalProp || $[134] !== tooltip ? (t40 = showTooltip && (portalProp ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: tooltip }) : tooltip), $[132] = showTooltip, $[133] = portalProp, $[134] = tooltip, $[135] = t40) : t40 = $[135];
|
|
5048
|
-
const children = t40;
|
|
5049
|
-
let t41;
|
|
5050
|
-
$[136] !== animate || $[137] !== children ? (t41 = animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children, $[136] = animate, $[137] = children, $[138] = t41) : t41 = $[138];
|
|
5051
|
-
let t42;
|
|
5052
|
-
return $[139] !== t41 || $[140] !== child ? (t42 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5053
|
-
t41,
|
|
4915
|
+
maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
|
|
4916
|
+
}, zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipCard, { ...restProps, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, children: content }) }), children = showTooltip && (portalProp ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: tooltip }) : tooltip);
|
|
4917
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4918
|
+
animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
|
|
5054
4919
|
child
|
|
5055
|
-
] })
|
|
4920
|
+
] });
|
|
5056
4921
|
});
|
|
5057
4922
|
Tooltip.displayName = "ForwardRef(Tooltip)";
|
|
5058
4923
|
function useCloseOnMouseLeave(t0) {
|
|
@@ -5062,24 +4927,19 @@ function useCloseOnMouseLeave(t0) {
|
|
|
5062
4927
|
showTooltip
|
|
5063
4928
|
} = t0;
|
|
5064
4929
|
let t1;
|
|
5065
|
-
$[0] !==
|
|
4930
|
+
$[0] !== handleIsOpenChange || $[1] !== referenceElement ? (t1 = (target, teardown) => {
|
|
5066
4931
|
referenceElement && (referenceElement === target || target instanceof Node && referenceElement.contains(target) || (handleIsOpenChange(!1), teardown()));
|
|
5067
|
-
}, $[0] =
|
|
4932
|
+
}, $[0] = handleIsOpenChange, $[1] = referenceElement, $[2] = t1) : t1 = $[2];
|
|
5068
4933
|
const onMouseMove = useEffectEvent.useEffectEvent(t1);
|
|
5069
4934
|
let t2, t3;
|
|
5070
|
-
$[3] !==
|
|
4935
|
+
$[3] !== onMouseMove || $[4] !== showTooltip ? (t2 = () => {
|
|
5071
4936
|
if (!showTooltip)
|
|
5072
4937
|
return;
|
|
5073
4938
|
const handleMouseMove = (event) => {
|
|
5074
4939
|
onMouseMove(event.target, () => window.removeEventListener("mousemove", handleMouseMove));
|
|
5075
4940
|
};
|
|
5076
4941
|
return window.addEventListener("mousemove", handleMouseMove), () => window.removeEventListener("mousemove", handleMouseMove);
|
|
5077
|
-
}, t3 = [onMouseMove, showTooltip], $[3] =
|
|
5078
|
-
}
|
|
5079
|
-
function getElementRef(element) {
|
|
5080
|
-
if (!element) return null;
|
|
5081
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
5082
|
-
return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
|
|
4942
|
+
}, t3 = [onMouseMove, showTooltip], $[3] = onMouseMove, $[4] = showTooltip, $[5] = t2, $[6] = t3) : (t2 = $[5], t3 = $[6]), react.useEffect(t2, t3);
|
|
5083
4943
|
}
|
|
5084
4944
|
const Root$9 = styledComponents.styled.div`
|
|
5085
4945
|
line-height: 0;
|
|
@@ -5121,7 +4981,7 @@ function AutocompleteOption(props) {
|
|
|
5121
4981
|
}, $[3] = handleClick, $[4] = t1) : t1 = $[4];
|
|
5122
4982
|
const handleKeyDown = t1;
|
|
5123
4983
|
let t2;
|
|
5124
|
-
return $[5] !==
|
|
4984
|
+
return $[5] !== children || $[6] !== handleClick || $[7] !== handleKeyDown || $[8] !== id || $[9] !== selected ? (t2 = /* @__PURE__ */ jsxRuntime.jsx("li", { "aria-selected": selected, "data-ui": "AutocompleteOption", id, role: "option", onClick: handleClick, onKeyDown: handleKeyDown, children }), $[5] = children, $[6] = handleClick, $[7] = handleKeyDown, $[8] = id, $[9] = selected, $[10] = t2) : t2 = $[10], t2;
|
|
5125
4985
|
}
|
|
5126
4986
|
function autocompleteReducer(state, msg2) {
|
|
5127
4987
|
return msg2.type === "input/change" ? {
|
|
@@ -5163,17 +5023,15 @@ function autocompleteReducer(state, msg2) {
|
|
|
5163
5023
|
} : state;
|
|
5164
5024
|
}
|
|
5165
5025
|
const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "Home", "End", "PageUp", "PageDown", "Meta", "Tab", "CapsLock"], AUTOCOMPLETE_POPOVER_PLACEMENT = "bottom-start", AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS = ["bottom-start", "top-start"], DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, DEFAULT_FILTER_OPTION = (query, option) => option.value.toLowerCase().indexOf(query.toLowerCase()) > -1, InnerAutocomplete = react.forwardRef(function(props, forwardedRef) {
|
|
5166
|
-
const
|
|
5167
|
-
|
|
5168
|
-
$[0] !== props ? ({
|
|
5169
|
-
border: t0,
|
|
5026
|
+
const {
|
|
5027
|
+
border: border2 = !0,
|
|
5170
5028
|
customValidity,
|
|
5171
5029
|
disabled,
|
|
5172
5030
|
filterOption: filterOptionProp,
|
|
5173
|
-
fontSize:
|
|
5031
|
+
fontSize: fontSize2 = 2,
|
|
5174
5032
|
icon,
|
|
5175
5033
|
id,
|
|
5176
|
-
listBox
|
|
5034
|
+
listBox = EMPTY_RECORD,
|
|
5177
5035
|
loading,
|
|
5178
5036
|
onBlur,
|
|
5179
5037
|
onChange,
|
|
@@ -5183,63 +5041,39 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5183
5041
|
openButton,
|
|
5184
5042
|
openOnFocus,
|
|
5185
5043
|
options: optionsProp,
|
|
5186
|
-
padding:
|
|
5187
|
-
popover
|
|
5044
|
+
padding: paddingProp = 3,
|
|
5045
|
+
popover = EMPTY_RECORD,
|
|
5188
5046
|
prefix,
|
|
5189
|
-
radius
|
|
5047
|
+
radius = 2,
|
|
5190
5048
|
readOnly,
|
|
5191
5049
|
relatedElements,
|
|
5192
5050
|
renderOption: renderOptionProp,
|
|
5193
5051
|
renderPopover,
|
|
5194
|
-
renderValue
|
|
5052
|
+
renderValue = DEFAULT_RENDER_VALUE,
|
|
5195
5053
|
suffix,
|
|
5196
5054
|
value: valueProp,
|
|
5197
5055
|
...restProps
|
|
5198
|
-
} = props,
|
|
5199
|
-
|
|
5200
|
-
let t9;
|
|
5201
|
-
$[30] !== t7 || $[31] !== t8 ? (t9 = {
|
|
5202
|
-
activeValue: t7,
|
|
5056
|
+
} = props, [state, dispatch] = react.useReducer(autocompleteReducer, {
|
|
5057
|
+
activeValue: valueProp || null,
|
|
5203
5058
|
focused: !1,
|
|
5204
5059
|
listFocused: !1,
|
|
5205
5060
|
query: null,
|
|
5206
|
-
value:
|
|
5207
|
-
},
|
|
5208
|
-
const [state, dispatch] = react.useReducer(autocompleteReducer, t9), {
|
|
5061
|
+
value: valueProp || null
|
|
5062
|
+
}), {
|
|
5209
5063
|
activeValue,
|
|
5210
5064
|
focused,
|
|
5211
5065
|
listFocused,
|
|
5212
5066
|
query,
|
|
5213
5067
|
value
|
|
5214
|
-
} = state
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
} = t112;
|
|
5220
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Card, { "data-as": "button", padding: paddingProp, radius: 2, tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, textOverflow: "ellipsis", children: value_0 }) });
|
|
5221
|
-
}, $[33] = paddingProp, $[34] = fontSize2, $[35] = t10) : t10 = $[35];
|
|
5222
|
-
const renderOption = typeof renderOptionProp == "function" ? renderOptionProp : t10, filterOption = typeof filterOptionProp == "function" ? filterOptionProp : DEFAULT_FILTER_OPTION, [rootElement, setRootElement] = react.useState(null), [resultsPopoverElement, setResultsPopoverElement] = react.useState(null), [inputElement, setInputElement] = react.useState(null), listBoxElementRef = react.useRef(null), listFocusedRef = react.useRef(!1), valueRef = react.useRef(value), valuePropRef = react.useRef(valueProp), [popoverMouseWithin, setPopoverMouseWithin] = react.useState(!1);
|
|
5223
|
-
let t11, t12;
|
|
5224
|
-
$[36] !== inputElement ? (t11 = () => inputElement, t12 = [inputElement], $[36] = inputElement, $[37] = t11, $[38] = t12) : (t11 = $[37], t12 = $[38]), react.useImperativeHandle(forwardedRef, t11, t12);
|
|
5225
|
-
const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY, padding = useArrayProp(paddingProp);
|
|
5226
|
-
let t13, t14;
|
|
5227
|
-
$[39] !== value || $[40] !== options ? (t14 = value !== null ? options.find((o) => o.value === value) : void 0, $[39] = value, $[40] = options, $[41] = t14) : t14 = $[41], t13 = t14;
|
|
5228
|
-
const currentOption = t13;
|
|
5229
|
-
let t15, t16;
|
|
5230
|
-
if ($[42] !== query || $[43] !== filterOption || $[44] !== options) {
|
|
5231
|
-
let t172;
|
|
5232
|
-
$[46] !== query || $[47] !== filterOption ? (t172 = (option) => query ? filterOption(query, option) : !0, $[46] = query, $[47] = filterOption, $[48] = t172) : t172 = $[48], t16 = options.filter(t172), $[42] = query, $[43] = filterOption, $[44] = options, $[45] = t16;
|
|
5233
|
-
} else
|
|
5234
|
-
t16 = $[45];
|
|
5235
|
-
t15 = t16;
|
|
5236
|
-
const filteredOptions = t15, filteredOptionsLen = filteredOptions.length, activeItemId = activeValue ? `${id}-option-${activeValue}` : void 0, expanded = query !== null && loading || focused && query !== null;
|
|
5237
|
-
let t17;
|
|
5238
|
-
$[49] !== popoverMouseWithin || $[50] !== relatedElements || $[51] !== rootElement || $[52] !== resultsPopoverElement || $[53] !== onQueryChange || $[54] !== onBlur ? (t17 = (event) => {
|
|
5068
|
+
} = state, defaultRenderOption = react.useCallback(({
|
|
5069
|
+
value: value_0
|
|
5070
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(Card, { "data-as": "button", padding: paddingProp, radius: 2, tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, textOverflow: "ellipsis", children: value_0 }) }), [fontSize2, paddingProp]), renderOption = typeof renderOptionProp == "function" ? renderOptionProp : defaultRenderOption, filterOption = typeof filterOptionProp == "function" ? filterOptionProp : DEFAULT_FILTER_OPTION, rootElementRef = react.useRef(null), resultsPopoverElementRef = react.useRef(null), inputElementRef = react.useRef(null), listBoxElementRef = react.useRef(null), listFocusedRef = react.useRef(!1), valueRef = react.useRef(value), valuePropRef = react.useRef(valueProp), popoverMouseWithinRef = react.useRef(!1);
|
|
5071
|
+
react.useImperativeHandle(forwardedRef, () => inputElementRef.current);
|
|
5072
|
+
const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY, padding = useArrayProp(paddingProp), currentOption = react.useMemo(() => value !== null ? options.find((o) => o.value === value) : void 0, [options, value]), filteredOptions = react.useMemo(() => options.filter((option) => query ? filterOption(query, option) : !0), [filterOption, options, query]), filteredOptionsLen = filteredOptions.length, activeItemId = activeValue ? `${id}-option-${activeValue}` : void 0, expanded = query !== null && loading || focused && query !== null, handleRootBlur = react.useCallback((event) => {
|
|
5239
5073
|
setTimeout(() => {
|
|
5240
|
-
if (
|
|
5074
|
+
if (popoverMouseWithinRef.current)
|
|
5241
5075
|
return;
|
|
5242
|
-
const elements = (relatedElements || []).concat(
|
|
5076
|
+
const elements = (relatedElements || []).concat(rootElementRef.current ? [rootElementRef.current] : [], resultsPopoverElementRef.current ? [resultsPopoverElementRef.current] : []);
|
|
5243
5077
|
let focusInside = !1;
|
|
5244
5078
|
if (document.activeElement) {
|
|
5245
5079
|
for (const e of elements)
|
|
@@ -5250,32 +5084,22 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5250
5084
|
}
|
|
5251
5085
|
focusInside === !1 && (dispatch({
|
|
5252
5086
|
type: "root/blur"
|
|
5253
|
-
}),
|
|
5087
|
+
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), onBlur && onBlur(event));
|
|
5254
5088
|
}, 0);
|
|
5255
|
-
},
|
|
5256
|
-
const handleRootBlur = t17;
|
|
5257
|
-
let t18;
|
|
5258
|
-
$[56] === Symbol.for("react.memo_cache_sentinel") ? (t18 = (event_0) => {
|
|
5089
|
+
}, [onBlur, onQueryChange, relatedElements]), handleRootFocus = react.useCallback((event_0) => {
|
|
5259
5090
|
const listBoxElement = listBoxElementRef.current, focusedElement = event_0.target instanceof HTMLElement ? event_0.target : null, listFocused_0 = listBoxElement?.contains(focusedElement) || !1;
|
|
5260
5091
|
listFocused_0 !== listFocusedRef.current && (listFocusedRef.current = listFocused_0, dispatch({
|
|
5261
5092
|
type: "root/setListFocused",
|
|
5262
5093
|
listFocused: listFocused_0
|
|
5263
5094
|
}));
|
|
5264
|
-
},
|
|
5265
|
-
const handleRootFocus = t18;
|
|
5266
|
-
let t19;
|
|
5267
|
-
$[57] !== onSelect || $[58] !== onChange || $[59] !== onQueryChange || $[60] !== inputElement ? (t19 = (v) => {
|
|
5095
|
+
}, []), handleOptionSelect = react.useCallback((v) => {
|
|
5268
5096
|
dispatch({
|
|
5269
5097
|
type: "value/change",
|
|
5270
5098
|
value: v
|
|
5271
|
-
}),
|
|
5272
|
-
},
|
|
5273
|
-
const handleOptionSelect = t19;
|
|
5274
|
-
let t20;
|
|
5275
|
-
$[62] !== filteredOptionsLen || $[63] !== filteredOptions || $[64] !== activeValue || $[65] !== onQueryChange || $[66] !== inputElement ? (t20 = (event_1) => {
|
|
5099
|
+
}), popoverMouseWithinRef.current = !1, onSelect && onSelect(v), valueRef.current = v, onChange && onChange(v), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
5100
|
+
}, [onChange, onSelect, onQueryChange]), handleRootKeyDown = react.useCallback((event_1) => {
|
|
5276
5101
|
if (event_1.key === "ArrowDown") {
|
|
5277
|
-
if (event_1.preventDefault(), !filteredOptionsLen)
|
|
5278
|
-
return;
|
|
5102
|
+
if (event_1.preventDefault(), !filteredOptionsLen) return;
|
|
5279
5103
|
const activeOption = filteredOptions.find((o_0) => o_0.value === activeValue), activeIndex = activeOption ? filteredOptions.indexOf(activeOption) : -1, nextActiveOption = filteredOptions[(activeIndex + 1) % filteredOptionsLen];
|
|
5280
5104
|
nextActiveOption && dispatch({
|
|
5281
5105
|
type: "root/setActiveValue",
|
|
@@ -5285,8 +5109,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5285
5109
|
return;
|
|
5286
5110
|
}
|
|
5287
5111
|
if (event_1.key === "ArrowUp") {
|
|
5288
|
-
if (event_1.preventDefault(), !filteredOptionsLen)
|
|
5289
|
-
return;
|
|
5112
|
+
if (event_1.preventDefault(), !filteredOptionsLen) return;
|
|
5290
5113
|
const activeOption_0 = filteredOptions.find((o_1) => o_1.value === activeValue), activeIndex_0 = activeOption_0 ? filteredOptions.indexOf(activeOption_0) : -1, nextActiveOption_0 = filteredOptions[activeIndex_0 === -1 ? filteredOptionsLen - 1 : (filteredOptionsLen + activeIndex_0 - 1) % filteredOptionsLen];
|
|
5291
5114
|
nextActiveOption_0 && dispatch({
|
|
5292
5115
|
type: "root/setActiveValue",
|
|
@@ -5298,66 +5121,43 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5298
5121
|
if (event_1.key === "Escape") {
|
|
5299
5122
|
dispatch({
|
|
5300
5123
|
type: "root/escape"
|
|
5301
|
-
}),
|
|
5124
|
+
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
5302
5125
|
return;
|
|
5303
5126
|
}
|
|
5304
5127
|
const target = event_1.target, listEl = listBoxElementRef.current;
|
|
5305
5128
|
if ((listEl === target || listEl?.contains(target)) && !AUTOCOMPLETE_LISTBOX_IGNORE_KEYS.includes(event_1.key)) {
|
|
5306
|
-
|
|
5129
|
+
inputElementRef.current?.focus();
|
|
5307
5130
|
return;
|
|
5308
5131
|
}
|
|
5309
|
-
},
|
|
5310
|
-
const handleRootKeyDown = t20;
|
|
5311
|
-
let t21;
|
|
5312
|
-
$[68] !== onQueryChange ? (t21 = (event_2) => {
|
|
5132
|
+
}, [activeValue, filteredOptions, filteredOptionsLen, onQueryChange]), handleInputChange = react.useCallback((event_2) => {
|
|
5313
5133
|
const nextQuery = event_2.currentTarget.value;
|
|
5314
5134
|
dispatch({
|
|
5315
5135
|
type: "input/change",
|
|
5316
5136
|
query: nextQuery
|
|
5317
5137
|
}), onQueryChange && onQueryChange(nextQuery);
|
|
5318
|
-
},
|
|
5319
|
-
const handleInputChange = t21;
|
|
5320
|
-
let t22;
|
|
5321
|
-
$[70] !== value || $[71] !== renderValue || $[72] !== currentOption ? (t22 = () => {
|
|
5138
|
+
}, [onQueryChange]), dispatchOpen = react.useCallback(() => {
|
|
5322
5139
|
dispatch({
|
|
5323
5140
|
type: "root/open",
|
|
5324
5141
|
query: value ? renderValue(value, currentOption) : ""
|
|
5325
5142
|
});
|
|
5326
|
-
},
|
|
5327
|
-
const dispatchOpen = t22;
|
|
5328
|
-
let t23;
|
|
5329
|
-
$[74] !== focused || $[75] !== onFocus || $[76] !== openOnFocus || $[77] !== dispatchOpen ? (t23 = (event_3) => {
|
|
5143
|
+
}, [currentOption, renderValue, value]), handleInputFocus = react.useCallback((event_3) => {
|
|
5330
5144
|
focused || (dispatch({
|
|
5331
5145
|
type: "input/focus"
|
|
5332
5146
|
}), onFocus && onFocus(event_3), openOnFocus && dispatchOpen());
|
|
5333
|
-
},
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
}, $[79] = t24) : t24 = $[79];
|
|
5339
|
-
const handlePopoverMouseEnter = t24;
|
|
5340
|
-
let t25;
|
|
5341
|
-
$[80] === Symbol.for("react.memo_cache_sentinel") ? (t25 = () => {
|
|
5342
|
-
setPopoverMouseWithin(!1);
|
|
5343
|
-
}, $[80] = t25) : t25 = $[80];
|
|
5344
|
-
const handlePopoverMouseLeave = t25;
|
|
5345
|
-
let t26;
|
|
5346
|
-
$[81] !== onChange || $[82] !== onQueryChange || $[83] !== inputElement ? (t26 = () => {
|
|
5147
|
+
}, [focused, onFocus, openOnFocus, dispatchOpen]), handlePopoverMouseEnter = react.useCallback(() => {
|
|
5148
|
+
popoverMouseWithinRef.current = !0;
|
|
5149
|
+
}, []), handlePopoverMouseLeave = react.useCallback(() => {
|
|
5150
|
+
popoverMouseWithinRef.current = !1;
|
|
5151
|
+
}, []), handleClearButtonClick = react.useCallback(() => {
|
|
5347
5152
|
dispatch({
|
|
5348
5153
|
type: "root/clear"
|
|
5349
|
-
}), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null),
|
|
5350
|
-
},
|
|
5351
|
-
const handleClearButtonClick = t26;
|
|
5352
|
-
let t27;
|
|
5353
|
-
$[85] === Symbol.for("react.memo_cache_sentinel") ? (t27 = () => {
|
|
5154
|
+
}), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
5155
|
+
}, [onChange, onQueryChange]), handleClearButtonFocus = react.useCallback(() => {
|
|
5354
5156
|
dispatch({
|
|
5355
5157
|
type: "input/focus"
|
|
5356
5158
|
});
|
|
5357
|
-
},
|
|
5358
|
-
|
|
5359
|
-
let t28, t29;
|
|
5360
|
-
$[86] !== valueProp ? (t28 = () => {
|
|
5159
|
+
}, []);
|
|
5160
|
+
react.useEffect(() => {
|
|
5361
5161
|
if (valueProp !== valuePropRef.current) {
|
|
5362
5162
|
valuePropRef.current = valueProp, valueProp !== void 0 && (dispatch({
|
|
5363
5163
|
type: "value/change",
|
|
@@ -5369,19 +5169,14 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5369
5169
|
type: "value/change",
|
|
5370
5170
|
value: valueProp || null
|
|
5371
5171
|
}));
|
|
5372
|
-
},
|
|
5373
|
-
let t30, t31;
|
|
5374
|
-
$[89] !== focused ? (t30 = () => {
|
|
5172
|
+
}, [valueProp]), react.useEffect(() => {
|
|
5375
5173
|
!focused && valueRef.current && dispatch({
|
|
5376
5174
|
type: "root/setActiveValue",
|
|
5377
5175
|
value: valueRef.current
|
|
5378
5176
|
});
|
|
5379
|
-
},
|
|
5380
|
-
let t32, t33;
|
|
5381
|
-
$[92] !== filteredOptions || $[93] !== activeValue ? (t32 = () => {
|
|
5177
|
+
}, [focused]), react.useEffect(() => {
|
|
5382
5178
|
const listElement = listBoxElementRef.current;
|
|
5383
|
-
if (!listElement)
|
|
5384
|
-
return;
|
|
5179
|
+
if (!listElement) return;
|
|
5385
5180
|
const activeOption_1 = filteredOptions.find((o_2) => o_2.value === activeValue);
|
|
5386
5181
|
if (activeOption_1) {
|
|
5387
5182
|
const activeIndex_1 = filteredOptions.indexOf(activeOption_1), activeItemElement = listElement.childNodes[activeIndex_1];
|
|
@@ -5391,123 +5186,35 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5391
5186
|
focusFirstDescendant(activeItemElement);
|
|
5392
5187
|
}
|
|
5393
5188
|
}
|
|
5394
|
-
},
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
let t352;
|
|
5399
|
-
$[96] === Symbol.for("react.memo_cache_sentinel") ? (t352 = {
|
|
5189
|
+
}, [activeValue, filteredOptions]);
|
|
5190
|
+
const clearButton = react.useMemo(() => {
|
|
5191
|
+
if (!loading && !disabled && value)
|
|
5192
|
+
return {
|
|
5400
5193
|
"aria-label": "Clear",
|
|
5401
5194
|
onFocus: handleClearButtonFocus
|
|
5402
|
-
}
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
}
|
|
5421
|
-
|
|
5422
|
-
t37 = t38;
|
|
5423
|
-
const openButtonPadding = t37;
|
|
5424
|
-
let t39;
|
|
5425
|
-
t39 = typeof openButton == "object" ? openButton : EMPTY_RECORD;
|
|
5426
|
-
const openButtonProps = t39;
|
|
5427
|
-
let t40;
|
|
5428
|
-
$[103] !== dispatchOpen || $[104] !== openButtonProps || $[105] !== inputElement ? (t40 = (event_4) => {
|
|
5429
|
-
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElement?.focus());
|
|
5430
|
-
}, $[103] = dispatchOpen, $[104] = openButtonProps, $[105] = inputElement, $[106] = t40) : t40 = $[106];
|
|
5431
|
-
const handleOpenClick = t40;
|
|
5432
|
-
let t41, t42;
|
|
5433
|
-
$[107] !== disabled || $[108] !== readOnly || $[109] !== openButton || $[110] !== expanded || $[111] !== fontSize2 || $[112] !== openButtonPadding || $[113] !== openButtonProps || $[114] !== handleOpenClick || $[115] !== openButtonBoxPadding ? (t42 = !disabled && !readOnly && openButton ? /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { "aria-label": "Open", disabled: expanded, fontSize: fontSize2, icon: icons.ChevronDownIcon, mode: "bleed", padding: openButtonPadding, ...openButtonProps, onClick: handleOpenClick }) }) : void 0, $[107] = disabled, $[108] = readOnly, $[109] = openButton, $[110] = expanded, $[111] = fontSize2, $[112] = openButtonPadding, $[113] = openButtonProps, $[114] = handleOpenClick, $[115] = openButtonBoxPadding, $[116] = t42) : t42 = $[116], t41 = t42;
|
|
5434
|
-
const openButtonNode = t41;
|
|
5435
|
-
let t43;
|
|
5436
|
-
bb1: {
|
|
5437
|
-
if (query === null) {
|
|
5438
|
-
if (value !== null) {
|
|
5439
|
-
let t442;
|
|
5440
|
-
$[117] !== renderValue || $[118] !== value || $[119] !== currentOption ? (t442 = renderValue(value, currentOption), $[117] = renderValue, $[118] = value, $[119] = currentOption, $[120] = t442) : t442 = $[120], t43 = t442;
|
|
5441
|
-
break bb1;
|
|
5442
|
-
}
|
|
5443
|
-
t43 = "";
|
|
5444
|
-
break bb1;
|
|
5445
|
-
}
|
|
5446
|
-
t43 = query;
|
|
5447
|
-
}
|
|
5448
|
-
const inputValue = t43, t44 = loading && AnimatedSpinnerIcon, t45 = suffix || openButtonNode;
|
|
5449
|
-
let t46;
|
|
5450
|
-
$[121] !== restProps || $[122] !== activeItemId || $[123] !== expanded || $[124] !== listBoxId || $[125] !== border2 || $[126] !== clearButton || $[127] !== customValidity || $[128] !== disabled || $[129] !== fontSize2 || $[130] !== icon || $[131] !== t44 || $[132] !== id || $[133] !== handleInputChange || $[134] !== handleClearButtonClick || $[135] !== handleInputFocus || $[136] !== padding || $[137] !== prefix || $[138] !== radius || $[139] !== readOnly || $[140] !== t45 || $[141] !== inputValue ? (t46 = /* @__PURE__ */ jsxRuntime.jsx(TextInput, { ...restProps, "aria-activedescendant": activeItemId, "aria-autocomplete": "list", "aria-expanded": expanded, "aria-owns": listBoxId, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", border: border2, clearButton, customValidity, disabled, fontSize: fontSize2, icon, iconRight: t44, id, inputMode: "search", onChange: handleInputChange, onClear: handleClearButtonClick, onFocus: handleInputFocus, padding, prefix, radius, readOnly, ref: setInputElement, role: "combobox", spellCheck: !1, suffix: t45, value: inputValue }), $[121] = restProps, $[122] = activeItemId, $[123] = expanded, $[124] = listBoxId, $[125] = border2, $[126] = clearButton, $[127] = customValidity, $[128] = disabled, $[129] = fontSize2, $[130] = icon, $[131] = t44, $[132] = id, $[133] = handleInputChange, $[134] = handleClearButtonClick, $[135] = handleInputFocus, $[136] = padding, $[137] = prefix, $[138] = radius, $[139] = readOnly, $[140] = t45, $[141] = inputValue, $[142] = t46) : t46 = $[142];
|
|
5451
|
-
const input = t46;
|
|
5452
|
-
let t47;
|
|
5453
|
-
$[143] !== listFocused || $[144] !== inputElement ? (t47 = (event_5) => {
|
|
5454
|
-
event_5.key === "Tab" && listFocused && inputElement?.focus();
|
|
5455
|
-
}, $[143] = listFocused, $[144] = inputElement, $[145] = t47) : t47 = $[145];
|
|
5456
|
-
const handleListBoxKeyDown = t47;
|
|
5457
|
-
let t48;
|
|
5458
|
-
bb2: {
|
|
5459
|
-
if (filteredOptions.length === 0) {
|
|
5460
|
-
t48 = null;
|
|
5461
|
-
break bb2;
|
|
5462
|
-
}
|
|
5463
|
-
let t492;
|
|
5464
|
-
if ($[146] !== activeValue || $[147] !== currentOption || $[148] !== id || $[149] !== handleOptionSelect || $[150] !== renderOption || $[151] !== loading || $[152] !== listFocused || $[153] !== filteredOptions) {
|
|
5465
|
-
let t503;
|
|
5466
|
-
$[155] !== activeValue || $[156] !== currentOption || $[157] !== id || $[158] !== handleOptionSelect || $[159] !== renderOption || $[160] !== loading || $[161] !== listFocused ? (t503 = (option_0) => {
|
|
5467
|
-
const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
|
|
5468
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AutocompleteOption, { id: `${id}-option-${option_0.value}`, onSelect: handleOptionSelect, selected: active, value: option_0.value, children: react.cloneElement(renderOption(option_0), {
|
|
5469
|
-
disabled: loading,
|
|
5470
|
-
selected: active,
|
|
5471
|
-
tabIndex: listFocused && active ? 0 : -1
|
|
5472
|
-
}) }, option_0.value);
|
|
5473
|
-
}, $[155] = activeValue, $[156] = currentOption, $[157] = id, $[158] = handleOptionSelect, $[159] = renderOption, $[160] = loading, $[161] = listFocused, $[162] = t503) : t503 = $[162], t492 = filteredOptions.map(t503), $[146] = activeValue, $[147] = currentOption, $[148] = id, $[149] = handleOptionSelect, $[150] = renderOption, $[151] = loading, $[152] = listFocused, $[153] = filteredOptions, $[154] = t492;
|
|
5474
|
-
} else
|
|
5475
|
-
t492 = $[154];
|
|
5476
|
-
let t502;
|
|
5477
|
-
$[163] !== listBoxId || $[164] !== t492 ? (t502 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", id: listBoxId, ref: listBoxElementRef, role: "listbox", space: 1, children: t492 }), $[163] = listBoxId, $[164] = t492, $[165] = t502) : t502 = $[165];
|
|
5478
|
-
let t51;
|
|
5479
|
-
$[166] !== handleListBoxKeyDown || $[167] !== listBox || $[168] !== t502 ? (t51 = /* @__PURE__ */ jsxRuntime.jsx(ListBox, { "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1, ...listBox, tabIndex: -1, children: t502 }), $[166] = handleListBoxKeyDown, $[167] = listBox, $[168] = t502, $[169] = t51) : t51 = $[169], t48 = t51;
|
|
5480
|
-
}
|
|
5481
|
-
const content = t48;
|
|
5482
|
-
let t49;
|
|
5483
|
-
bb3: {
|
|
5484
|
-
if (renderPopover) {
|
|
5485
|
-
const t503 = !expanded;
|
|
5486
|
-
let t51;
|
|
5487
|
-
$[170] !== content || $[171] !== t503 || $[172] !== inputElement || $[173] !== resultsPopoverElement || $[174] !== renderPopover ? (t51 = renderPopover({
|
|
5488
|
-
content,
|
|
5489
|
-
hidden: t503,
|
|
5490
|
-
inputElement,
|
|
5491
|
-
onMouseEnter: handlePopoverMouseEnter,
|
|
5492
|
-
onMouseLeave: handlePopoverMouseLeave
|
|
5493
|
-
}, {
|
|
5494
|
-
current: resultsPopoverElement
|
|
5495
|
-
}), $[170] = content, $[171] = t503, $[172] = inputElement, $[173] = resultsPopoverElement, $[174] = renderPopover, $[175] = t51) : t51 = $[175], t49 = t51;
|
|
5496
|
-
break bb3;
|
|
5497
|
-
}
|
|
5498
|
-
if (filteredOptionsLen === 0) {
|
|
5499
|
-
t49 = null;
|
|
5500
|
-
break bb3;
|
|
5501
|
-
}
|
|
5502
|
-
let t502;
|
|
5503
|
-
$[176] !== content || $[177] !== expanded || $[178] !== radius || $[179] !== inputElement || $[180] !== popover ? (t502 = /* @__PURE__ */ jsxRuntime.jsx(Popover, { arrow: !1, constrainSize: !0, content, fallbackPlacements: AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS, matchReferenceWidth: !0, onMouseEnter: handlePopoverMouseEnter, onMouseLeave: handlePopoverMouseLeave, open: expanded, overflow: "auto", placement: AUTOCOMPLETE_POPOVER_PLACEMENT, portal: !0, radius, ref: setResultsPopoverElement, referenceElement: inputElement, ...popover }), $[176] = content, $[177] = expanded, $[178] = radius, $[179] = inputElement, $[180] = popover, $[181] = t502) : t502 = $[181], t49 = t502;
|
|
5504
|
-
}
|
|
5505
|
-
const results = t49;
|
|
5506
|
-
let t50;
|
|
5507
|
-
return $[182] !== handleRootBlur || $[183] !== handleRootKeyDown || $[184] !== input || $[185] !== results ? (t50 = /* @__PURE__ */ jsxRuntime.jsxs(Root$9, { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: setRootElement, children: [
|
|
5195
|
+
};
|
|
5196
|
+
}, [disabled, handleClearButtonFocus, loading, value]), openButtonBoxPadding = react.useMemo(() => padding.map((v_0) => v_0 === 0 ? 0 : v_0 === 1 || v_0 === 2 ? 1 : v_0 - 2), [padding]), openButtonPadding = react.useMemo(() => padding.map((v_1) => Math.max(v_1 - 1, 0)), [padding]), openButtonProps = react.useMemo(() => typeof openButton == "object" ? openButton : EMPTY_RECORD, [openButton]), handleOpenClick = react.useCallback((event_4) => {
|
|
5197
|
+
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());
|
|
5198
|
+
}, [openButtonProps, dispatchOpen]), openButtonNode = react.useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { "aria-label": "Open", disabled: expanded, fontSize: fontSize2, icon: icons.ChevronDownIcon, mode: "bleed", padding: openButtonPadding, ...openButtonProps, onClick: handleOpenClick }) }) : void 0, [disabled, expanded, fontSize2, handleOpenClick, openButton, openButtonBoxPadding, openButtonPadding, openButtonProps, readOnly]), inputValue = react.useMemo(() => query === null ? value !== null ? renderValue(value, currentOption) : "" : query, [currentOption, query, renderValue, value]), input = /* @__PURE__ */ jsxRuntime.jsx(TextInput, { ...restProps, "aria-activedescendant": activeItemId, "aria-autocomplete": "list", "aria-expanded": expanded, "aria-owns": listBoxId, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", border: border2, clearButton, customValidity, disabled, fontSize: fontSize2, icon, iconRight: loading && AnimatedSpinnerIcon, id, inputMode: "search", onChange: handleInputChange, onClear: handleClearButtonClick, onFocus: handleInputFocus, padding, prefix, radius, readOnly, ref: inputElementRef, role: "combobox", spellCheck: !1, suffix: suffix || openButtonNode, value: inputValue }), handleListBoxKeyDown = react.useCallback((event_5) => {
|
|
5199
|
+
event_5.key === "Tab" && listFocused && inputElementRef.current?.focus();
|
|
5200
|
+
}, [listFocused]), content = react.useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ListBox, { "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1, ...listBox, tabIndex: -1, children: /* @__PURE__ */ jsxRuntime.jsx(Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", id: listBoxId, ref: listBoxElementRef, role: "listbox", space: 1, children: filteredOptions.map((option_0) => {
|
|
5201
|
+
const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
|
|
5202
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AutocompleteOption, { id: `${id}-option-${option_0.value}`, onSelect: handleOptionSelect, selected: active, value: option_0.value, children: react.cloneElement(renderOption(option_0), {
|
|
5203
|
+
disabled: loading,
|
|
5204
|
+
selected: active,
|
|
5205
|
+
tabIndex: listFocused && active ? 0 : -1
|
|
5206
|
+
}) }, option_0.value);
|
|
5207
|
+
}) }) }), [activeValue, currentOption, filteredOptions, handleOptionSelect, handleListBoxKeyDown, id, listBox, listBoxId, listFocused, loading, renderOption]), results = react.useMemo(() => renderPopover ? renderPopover({
|
|
5208
|
+
content,
|
|
5209
|
+
hidden: !expanded,
|
|
5210
|
+
inputElement: inputElementRef.current,
|
|
5211
|
+
onMouseEnter: handlePopoverMouseEnter,
|
|
5212
|
+
onMouseLeave: handlePopoverMouseLeave
|
|
5213
|
+
}, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(Popover, { arrow: !1, constrainSize: !0, content, fallbackPlacements: AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS, matchReferenceWidth: !0, onMouseEnter: handlePopoverMouseEnter, onMouseLeave: handlePopoverMouseLeave, open: expanded, overflow: "auto", placement: AUTOCOMPLETE_POPOVER_PLACEMENT, portal: !0, radius, ref: resultsPopoverElementRef, referenceElement: inputElementRef.current, ...popover }), [content, expanded, filteredOptionsLen, handlePopoverMouseEnter, handlePopoverMouseLeave, popover, radius, renderPopover]);
|
|
5214
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Root$9, { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: rootElementRef, children: [
|
|
5508
5215
|
input,
|
|
5509
5216
|
results
|
|
5510
|
-
] })
|
|
5217
|
+
] });
|
|
5511
5218
|
});
|
|
5512
5219
|
InnerAutocomplete.displayName = "ForwardRef(Autocomplete)";
|
|
5513
5220
|
const Autocomplete = InnerAutocomplete, Root$8 = styledComponents.styled.ol`
|
|
@@ -5522,46 +5229,26 @@ const Autocomplete = InnerAutocomplete, Root$8 = styledComponents.styled.ol`
|
|
|
5522
5229
|
appearance: none;
|
|
5523
5230
|
margin: -4px;
|
|
5524
5231
|
`, Breadcrumbs = react.forwardRef(function(props, ref) {
|
|
5525
|
-
const
|
|
5526
|
-
let t0, children, maxLength, restProps, separator;
|
|
5527
|
-
$[0] !== props ? ({
|
|
5232
|
+
const {
|
|
5528
5233
|
children,
|
|
5529
5234
|
maxLength,
|
|
5530
5235
|
separator,
|
|
5531
|
-
space:
|
|
5236
|
+
space: spaceRaw = 2,
|
|
5532
5237
|
...restProps
|
|
5533
|
-
} = props,
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => setOpen(!1), $[6] = t1) : t1 = $[6];
|
|
5537
|
-
const collapse = t1;
|
|
5538
|
-
let t2;
|
|
5539
|
-
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => setOpen(!0), $[7] = t2) : t2 = $[7];
|
|
5540
|
-
const expand = t2;
|
|
5541
|
-
let t3;
|
|
5542
|
-
$[8] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => [expandElementRef.current, popoverElementRef.current], $[8] = t3) : t3 = $[8], useClickOutsideEvent(collapse, t3);
|
|
5543
|
-
let T0, t4, t5, t6, t7;
|
|
5544
|
-
if ($[9] !== children || $[10] !== maxLength || $[11] !== space || $[12] !== open || $[13] !== restProps || $[14] !== ref || $[15] !== separator) {
|
|
5545
|
-
const rawItems = react.Children.toArray(children).filter(react.isValidElement);
|
|
5546
|
-
let items = rawItems;
|
|
5238
|
+
} = props, space = useArrayProp(spaceRaw), [open, setOpen] = react.useState(!1), expandElementRef = react.useRef(null), popoverElementRef = react.useRef(null), collapse = react.useCallback(() => setOpen(!1), []), expand = react.useCallback(() => setOpen(!0), []);
|
|
5239
|
+
useClickOutsideEvent(collapse, () => [expandElementRef.current, popoverElementRef.current]);
|
|
5240
|
+
const rawItems = react.useMemo(() => react.Children.toArray(children).filter(react.isValidElement), [children]), items = react.useMemo(() => {
|
|
5547
5241
|
const len = rawItems.length;
|
|
5548
|
-
if (maxLength &&
|
|
5549
|
-
const beforeLength = Math.ceil(maxLength / 2), afterLength = Math.floor(maxLength / 2)
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
itemIndex > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": !0, as: "li", paddingX: space, children: separator || /* @__PURE__ */ jsxRuntime.jsx(Text, { muted: !0, children: "/" }) }),
|
|
5559
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { as: "li", children: item })
|
|
5560
|
-
] }, itemIndex), $[28] = space, $[29] = separator, $[30] = t82) : t82 = $[30], t7 = items.map(t82), $[9] = children, $[10] = maxLength, $[11] = space, $[12] = open, $[13] = restProps, $[14] = ref, $[15] = separator, $[16] = T0, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = t7;
|
|
5561
|
-
} else
|
|
5562
|
-
T0 = $[16], t4 = $[17], t5 = $[18], t6 = $[19], t7 = $[20];
|
|
5563
|
-
let t8;
|
|
5564
|
-
return $[31] !== T0 || $[32] !== t4 || $[33] !== t5 || $[34] !== t6 || $[35] !== t7 ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(T0, { "data-ui": t4, ...t5, ref: t6, children: t7 }), $[31] = T0, $[32] = t4, $[33] = t5, $[34] = t6, $[35] = t7, $[36] = t8) : t8 = $[36], t8;
|
|
5242
|
+
if (maxLength && len > maxLength) {
|
|
5243
|
+
const beforeLength = Math.ceil(maxLength / 2), afterLength = Math.floor(maxLength / 2);
|
|
5244
|
+
return [...rawItems.slice(0, beforeLength - 1), /* @__PURE__ */ jsxRuntime.jsx(Popover, { constrainSize: !0, content: /* @__PURE__ */ jsxRuntime.jsx(Stack, { as: "ol", overflow: "auto", padding: space, space, children: rawItems.slice(beforeLength - 1, len - afterLength) }), open, placement: "top", portal: !0, ref: popoverElementRef, children: /* @__PURE__ */ jsxRuntime.jsx(ExpandButton, { fontSize: 1, mode: "bleed", onClick: open ? collapse : expand, padding: 1, ref: expandElementRef, selected: open, text: "\u2026" }) }, "button"), ...rawItems.slice(len - afterLength)];
|
|
5245
|
+
}
|
|
5246
|
+
return rawItems;
|
|
5247
|
+
}, [collapse, expand, maxLength, open, rawItems, space]);
|
|
5248
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Root$8, { "data-ui": "Breadcrumbs", ...restProps, ref, children: items.map((item, itemIndex) => /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
|
|
5249
|
+
itemIndex > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": !0, as: "li", paddingX: space, children: separator || /* @__PURE__ */ jsxRuntime.jsx(Text, { muted: !0, children: "/" }) }),
|
|
5250
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { as: "li", children: item })
|
|
5251
|
+
] }, itemIndex)) });
|
|
5565
5252
|
});
|
|
5566
5253
|
Breadcrumbs.displayName = "ForwardRef(Breadcrumbs)";
|
|
5567
5254
|
function dialogStyle({
|
|
@@ -5692,24 +5379,24 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
5692
5379
|
autoFocus && ref.current && focusFirstDescendant(ref.current);
|
|
5693
5380
|
}, t3 = [autoFocus, ref], $[2] = autoFocus, $[3] = t2, $[4] = t3) : (t2 = $[3], t3 = $[4]), react.useEffect(t2, t3);
|
|
5694
5381
|
let t4;
|
|
5695
|
-
$[5] !==
|
|
5382
|
+
$[5] !== boundaryElement || $[6] !== isTopLayer || $[7] !== onClose || $[8] !== portalElement ? (t4 = (event) => {
|
|
5696
5383
|
if (!isTopLayer || !onClose)
|
|
5697
5384
|
return;
|
|
5698
5385
|
const target = document.activeElement;
|
|
5699
5386
|
target && !isTargetWithinScope(boundaryElement, portalElement, target) || event.key === "Escape" && (event.preventDefault(), event.stopPropagation(), onClose());
|
|
5700
|
-
}, $[5] =
|
|
5387
|
+
}, $[5] = boundaryElement, $[6] = isTopLayer, $[7] = onClose, $[8] = portalElement, $[9] = t4) : t4 = $[9], useGlobalKeyDown(t4);
|
|
5701
5388
|
let t5;
|
|
5702
|
-
$[10] !==
|
|
5389
|
+
$[10] !== boundaryElement || $[11] !== isTopLayer || $[12] !== onClickOutside || $[13] !== portalElement ? (t5 = isTopLayer && onClickOutside && ((event_0) => {
|
|
5703
5390
|
const target_0 = event_0.target;
|
|
5704
5391
|
target_0 && !isTargetWithinScope(boundaryElement, portalElement, target_0) || onClickOutside();
|
|
5705
|
-
}), $[10] =
|
|
5392
|
+
}), $[10] = boundaryElement, $[11] = isTopLayer, $[12] = onClickOutside, $[13] = portalElement, $[14] = t5) : t5 = $[14];
|
|
5706
5393
|
let t6;
|
|
5707
5394
|
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => [ref.current], $[15] = t6) : t6 = $[15], useClickOutsideEvent(t5, t6);
|
|
5708
5395
|
let t7;
|
|
5709
|
-
$[16] !==
|
|
5396
|
+
$[16] !== header || $[17] !== labelId || $[18] !== onClose || $[19] !== showCloseButton || $[20] !== showHeader ? (t7 = showHeader && /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "flex-start", padding: 3, children: [
|
|
5710
5397
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, padding: 2, children: header && /* @__PURE__ */ jsxRuntime.jsx(Text, { id: labelId, size: 1, weight: "semibold", children: header }) }),
|
|
5711
5398
|
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { "aria-label": "Close dialog", disabled: !onClose, icon: icons.CloseIcon, mode: "bleed", onClick: onClose, padding: 2 }) })
|
|
5712
|
-
] }) }), $[16] =
|
|
5399
|
+
] }) }), $[16] = header, $[17] = labelId, $[18] = onClose, $[19] = showCloseButton, $[20] = showHeader, $[21] = t7) : t7 = $[21];
|
|
5713
5400
|
let t8;
|
|
5714
5401
|
$[22] !== children ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { flex: 1, ref: contentRef, tabIndex: -1, children }), $[22] = children, $[23] = t8) : t8 = $[23];
|
|
5715
5402
|
let t9;
|
|
@@ -5723,14 +5410,14 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
5723
5410
|
let t11;
|
|
5724
5411
|
$[30] !== radius || $[31] !== scheme || $[32] !== shadow || $[33] !== t10 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(DialogCardRoot, { radius, ref, scheme, shadow, children: t10 }), $[30] = radius, $[31] = scheme, $[32] = shadow, $[33] = t10, $[34] = t11) : t11 = $[34];
|
|
5725
5412
|
let t12;
|
|
5726
|
-
return $[35] !==
|
|
5413
|
+
return $[35] !== t11 || $[36] !== width ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(DialogContainer, { "data-ui": "DialogCard", width, children: t11 }), $[35] = t11, $[36] = width, $[37] = t12) : t12 = $[37], t12;
|
|
5727
5414
|
});
|
|
5728
5415
|
DialogCard.displayName = "ForwardRef(DialogCard)";
|
|
5729
5416
|
const Dialog = react.forwardRef(function(props, ref) {
|
|
5730
5417
|
const $ = reactCompilerRuntime.c(60), dialog = useDialog(), {
|
|
5731
5418
|
layer
|
|
5732
5419
|
} = useTheme_v2();
|
|
5733
|
-
let
|
|
5420
|
+
let _positionProp, _zOffsetProp, children, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5, t6;
|
|
5734
5421
|
$[0] !== props ? ({
|
|
5735
5422
|
__unstable_autoFocus: t0,
|
|
5736
5423
|
__unstable_hideCloseButton: t1,
|
|
@@ -5753,7 +5440,7 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
5753
5440
|
zOffset: _zOffsetProp,
|
|
5754
5441
|
animate: t6,
|
|
5755
5442
|
...restProps
|
|
5756
|
-
} = props, $[0] = props, $[1] =
|
|
5443
|
+
} = props, $[0] = props, $[1] = _positionProp, $[2] = _zOffsetProp, $[3] = children, $[4] = contentRef, $[5] = footer, $[6] = header, $[7] = id, $[8] = onActivate, $[9] = onClickOutside, $[10] = onClose, $[11] = onFocus, $[12] = portalProp, $[13] = restProps, $[14] = scheme, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6) : (_positionProp = $[1], _zOffsetProp = $[2], children = $[3], contentRef = $[4], footer = $[5], header = $[6], id = $[7], onActivate = $[8], onClickOutside = $[9], onClose = $[10], onFocus = $[11], portalProp = $[12], restProps = $[13], scheme = $[14], t0 = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21]);
|
|
5757
5444
|
const autoFocus = t0 === void 0 ? !0 : t0, hideCloseButton = t1 === void 0 ? !1 : t1, cardRadiusProp = t2 === void 0 ? 4 : t2, cardShadow = t3 === void 0 ? 3 : t3, paddingProp = t4 === void 0 ? 3 : t4, widthProp = t5 === void 0 ? 0 : t5, _animate = t6 === void 0 ? !1 : t6, positionProp = _positionProp ?? (dialog.position || "fixed"), zOffsetProp = _zOffsetProp ?? (dialog.zOffset || layer.dialog.zOffset), animate = usePrefersReducedMotion() ? !1 : _animate, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, cardRadius = useArrayProp(cardRadiusProp), padding = useArrayProp(paddingProp), position = useArrayProp(positionProp), width = useArrayProp(widthProp), zOffset = useArrayProp(zOffsetProp), preDivRef = react.useRef(null), postDivRef = react.useRef(null), cardRef = react.useRef(null), focusedElementRef = react.useRef(null);
|
|
5758
5445
|
let t7;
|
|
5759
5446
|
$[22] !== onFocus ? (t7 = (event) => {
|
|
@@ -5789,15 +5476,15 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
5789
5476
|
let t9;
|
|
5790
5477
|
$[27] === Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: preDivRef, tabIndex: 0 }), $[27] = t9) : t9 = $[27];
|
|
5791
5478
|
let t10;
|
|
5792
|
-
$[28] !== autoFocus || $[29] !==
|
|
5479
|
+
$[28] !== autoFocus || $[29] !== cardRadius || $[30] !== cardShadow || $[31] !== children || $[32] !== contentRef || $[33] !== footer || $[34] !== header || $[35] !== hideCloseButton || $[36] !== id || $[37] !== onClickOutside || $[38] !== onClose || $[39] !== portalProp || $[40] !== scheme || $[41] !== width ? (t10 = /* @__PURE__ */ jsxRuntime.jsx(DialogCard, { __unstable_autoFocus: autoFocus, __unstable_hideCloseButton: hideCloseButton, contentRef, footer, header, id, onClickOutside, onClose, portal: portalProp, radius: cardRadius, ref: cardRef, scheme, shadow: cardShadow, width, children }), $[28] = autoFocus, $[29] = cardRadius, $[30] = cardShadow, $[31] = children, $[32] = contentRef, $[33] = footer, $[34] = header, $[35] = hideCloseButton, $[36] = id, $[37] = onClickOutside, $[38] = onClose, $[39] = portalProp, $[40] = scheme, $[41] = width, $[42] = t10) : t10 = $[42];
|
|
5793
5480
|
let t11;
|
|
5794
5481
|
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t11 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: postDivRef, tabIndex: 0 }), $[43] = t11) : t11 = $[43];
|
|
5795
5482
|
let t12;
|
|
5796
|
-
$[44] !==
|
|
5483
|
+
$[44] !== animate || $[45] !== handleFocus || $[46] !== handleRootClick || $[47] !== id || $[48] !== labelId || $[49] !== onActivate || $[50] !== padding || $[51] !== position || $[52] !== ref || $[53] !== restProps || $[54] !== t10 || $[55] !== zOffset ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs(Root$7, { ...restProps, $animate: animate, $padding: padding, $position: position, "aria-labelledby": labelId, "aria-modal": !0, "data-ui": "Dialog", id, onActivate, onClick: handleRootClick, onFocus: handleFocus, ref, role: "dialog", zOffset, children: [
|
|
5797
5484
|
t9,
|
|
5798
5485
|
t10,
|
|
5799
5486
|
t11
|
|
5800
|
-
] }), $[44] =
|
|
5487
|
+
] }), $[44] = animate, $[45] = handleFocus, $[46] = handleRootClick, $[47] = id, $[48] = labelId, $[49] = onActivate, $[50] = padding, $[51] = position, $[52] = ref, $[53] = restProps, $[54] = t10, $[55] = zOffset, $[56] = t12) : t12 = $[56];
|
|
5801
5488
|
let t13;
|
|
5802
5489
|
return $[57] !== portalProp || $[58] !== t12 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: portalProp, children: t12 }), $[57] = portalProp, $[58] = t12, $[59] = t13) : t13 = $[59], t13;
|
|
5803
5490
|
});
|
|
@@ -5816,7 +5503,7 @@ function DialogProvider(props) {
|
|
|
5816
5503
|
}, $[0] = position, $[1] = zOffset, $[2] = t1) : t1 = $[2], t0 = t1;
|
|
5817
5504
|
const contextValue = t0;
|
|
5818
5505
|
let t2;
|
|
5819
|
-
return $[3] !==
|
|
5506
|
+
return $[3] !== children || $[4] !== contextValue ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(DialogContext.Provider, { value: contextValue, children }), $[3] = children, $[4] = contextValue, $[5] = t2) : t2 = $[5], t2;
|
|
5820
5507
|
}
|
|
5821
5508
|
DialogProvider.displayName = "DialogProvider";
|
|
5822
5509
|
const Root$6 = styledComponents.styled.kbd`
|
|
@@ -5832,7 +5519,7 @@ const Root$6 = styledComponents.styled.kbd`
|
|
|
5832
5519
|
}
|
|
5833
5520
|
`, Hotkeys = react.forwardRef(function(props, ref) {
|
|
5834
5521
|
const $ = reactCompilerRuntime.c(24);
|
|
5835
|
-
let
|
|
5522
|
+
let fontSize2, keys, padding, radius, restProps, t0;
|
|
5836
5523
|
$[0] !== props ? ({
|
|
5837
5524
|
fontSize: fontSize2,
|
|
5838
5525
|
keys,
|
|
@@ -5840,22 +5527,22 @@ const Root$6 = styledComponents.styled.kbd`
|
|
|
5840
5527
|
radius,
|
|
5841
5528
|
space: t0,
|
|
5842
5529
|
...restProps
|
|
5843
|
-
} = props, $[0] = props, $[1] =
|
|
5530
|
+
} = props, $[0] = props, $[1] = fontSize2, $[2] = keys, $[3] = padding, $[4] = radius, $[5] = restProps, $[6] = t0) : (fontSize2 = $[1], keys = $[2], padding = $[3], radius = $[4], restProps = $[5], t0 = $[6]);
|
|
5844
5531
|
const space = useArrayProp(t0 === void 0 ? 0.5 : t0);
|
|
5845
5532
|
if (!keys || keys.length === 0) {
|
|
5846
5533
|
let t12;
|
|
5847
5534
|
return $[7] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[7] = t12) : t12 = $[7], t12;
|
|
5848
5535
|
}
|
|
5849
5536
|
let t1;
|
|
5850
|
-
if ($[8] !== fontSize2 || $[9] !==
|
|
5537
|
+
if ($[8] !== fontSize2 || $[9] !== keys || $[10] !== padding || $[11] !== radius) {
|
|
5851
5538
|
let t22;
|
|
5852
|
-
$[13] !== fontSize2 || $[14] !== padding || $[15] !== radius ? (t22 = (key2, i) => /* @__PURE__ */ jsxRuntime.jsx(Key, { fontSize: fontSize2, padding, radius, children: key2 }, i), $[13] = fontSize2, $[14] = padding, $[15] = radius, $[16] = t22) : t22 = $[16], t1 = keys.map(t22), $[8] = fontSize2, $[9] =
|
|
5539
|
+
$[13] !== fontSize2 || $[14] !== padding || $[15] !== radius ? (t22 = (key2, i) => /* @__PURE__ */ jsxRuntime.jsx(Key, { fontSize: fontSize2, padding, radius, children: key2 }, i), $[13] = fontSize2, $[14] = padding, $[15] = radius, $[16] = t22) : t22 = $[16], t1 = keys.map(t22), $[8] = fontSize2, $[9] = keys, $[10] = padding, $[11] = radius, $[12] = t1;
|
|
5853
5540
|
} else
|
|
5854
5541
|
t1 = $[12];
|
|
5855
5542
|
let t2;
|
|
5856
5543
|
$[17] !== space || $[18] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Inline, { as: "span", space, children: t1 }), $[17] = space, $[18] = t1, $[19] = t2) : t2 = $[19];
|
|
5857
5544
|
let t3;
|
|
5858
|
-
return $[20] !==
|
|
5545
|
+
return $[20] !== ref || $[21] !== restProps || $[22] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Root$6, { "data-ui": "Hotkeys", ...restProps, ref, children: t2 }), $[20] = ref, $[21] = restProps, $[22] = t2, $[23] = t3) : t3 = $[23], t3;
|
|
5859
5546
|
});
|
|
5860
5547
|
Hotkeys.displayName = "ForwardRef(Hotkeys)";
|
|
5861
5548
|
const MenuContext = createGlobalScopedContext("@sanity/ui/context/menu", null);
|
|
@@ -5896,28 +5583,16 @@ function _sortElements(rootElement, elements) {
|
|
|
5896
5583
|
elements.sort(_sort);
|
|
5897
5584
|
}
|
|
5898
5585
|
function useMenuController(props) {
|
|
5899
|
-
const
|
|
5586
|
+
const {
|
|
5900
5587
|
onKeyDown,
|
|
5901
5588
|
originElement,
|
|
5902
5589
|
shouldFocus,
|
|
5903
5590
|
rootElementRef
|
|
5904
|
-
} = props
|
|
5905
|
-
let t0;
|
|
5906
|
-
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = [], $[0] = t0) : t0 = $[0];
|
|
5907
|
-
const elementsRef = react.useRef(t0), [activeIndex, _setActiveIndex] = react.useState(-1), activeIndexRef = react.useRef(activeIndex);
|
|
5908
|
-
let t1;
|
|
5909
|
-
t1 = elementsRef.current[activeIndex] || null;
|
|
5910
|
-
const activeElement = t1, mounted = !!rootElementRef.current;
|
|
5911
|
-
let t2;
|
|
5912
|
-
$[1] === Symbol.for("react.memo_cache_sentinel") ? (t2 = (nextActiveIndex) => {
|
|
5591
|
+
} = props, elementsRef = react.useRef([]), [activeIndex, _setActiveIndex] = react.useState(-1), activeIndexRef = react.useRef(activeIndex), activeElement = react.useMemo(() => elementsRef.current[activeIndex] || null, [activeIndex]), mounted = !!rootElementRef.current, setActiveIndex = react.useCallback((nextActiveIndex) => {
|
|
5913
5592
|
_setActiveIndex(nextActiveIndex), activeIndexRef.current = nextActiveIndex;
|
|
5914
|
-
},
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
$[2] !== rootElementRef.current ? (t3 = (element, selected) => {
|
|
5918
|
-
if (!element)
|
|
5919
|
-
return () => {
|
|
5920
|
-
};
|
|
5593
|
+
}, []), mount = react.useCallback((element, selected) => {
|
|
5594
|
+
if (!element) return () => {
|
|
5595
|
+
};
|
|
5921
5596
|
if (elementsRef.current.indexOf(element) === -1 && (elementsRef.current.push(element), _sortElements(rootElementRef.current, elementsRef.current)), selected) {
|
|
5922
5597
|
const selectedIndex = elementsRef.current.indexOf(element);
|
|
5923
5598
|
setActiveIndex(selectedIndex);
|
|
@@ -5926,10 +5601,7 @@ function useMenuController(props) {
|
|
|
5926
5601
|
const idx = elementsRef.current.indexOf(element);
|
|
5927
5602
|
idx > -1 && elementsRef.current.splice(idx, 1);
|
|
5928
5603
|
};
|
|
5929
|
-
},
|
|
5930
|
-
const mount = t3;
|
|
5931
|
-
let t4;
|
|
5932
|
-
$[4] !== originElement || $[5] !== onKeyDown ? (t4 = (event) => {
|
|
5604
|
+
}, [rootElementRef, setActiveIndex]), handleKeyDown = react.useCallback((event) => {
|
|
5933
5605
|
if (event.key === "Tab") {
|
|
5934
5606
|
originElement && originElement.focus();
|
|
5935
5607
|
return;
|
|
@@ -5937,8 +5609,7 @@ function useMenuController(props) {
|
|
|
5937
5609
|
if (event.key === "Home") {
|
|
5938
5610
|
event.preventDefault(), event.stopPropagation();
|
|
5939
5611
|
const el = _getFocusableElements(elementsRef.current)[0];
|
|
5940
|
-
if (!el)
|
|
5941
|
-
return;
|
|
5612
|
+
if (!el) return;
|
|
5942
5613
|
const currentIndex = elementsRef.current.indexOf(el);
|
|
5943
5614
|
setActiveIndex(currentIndex);
|
|
5944
5615
|
return;
|
|
@@ -5946,8 +5617,7 @@ function useMenuController(props) {
|
|
|
5946
5617
|
if (event.key === "End") {
|
|
5947
5618
|
event.preventDefault(), event.stopPropagation();
|
|
5948
5619
|
const focusableElements_0 = _getFocusableElements(elementsRef.current), el_0 = focusableElements_0[focusableElements_0.length - 1];
|
|
5949
|
-
if (!el_0)
|
|
5950
|
-
return;
|
|
5620
|
+
if (!el_0) return;
|
|
5951
5621
|
const currentIndex_0 = elementsRef.current.indexOf(el_0);
|
|
5952
5622
|
setActiveIndex(currentIndex_0);
|
|
5953
5623
|
return;
|
|
@@ -5955,8 +5625,7 @@ function useMenuController(props) {
|
|
|
5955
5625
|
if (event.key === "ArrowUp") {
|
|
5956
5626
|
event.preventDefault(), event.stopPropagation();
|
|
5957
5627
|
const focusableElements_1 = _getFocusableElements(elementsRef.current), focusableLen = focusableElements_1.length;
|
|
5958
|
-
if (focusableLen === 0)
|
|
5959
|
-
return;
|
|
5628
|
+
if (focusableLen === 0) return;
|
|
5960
5629
|
const focusedElement = elementsRef.current[activeIndexRef.current];
|
|
5961
5630
|
let focusedIndex = focusableElements_1.indexOf(focusedElement);
|
|
5962
5631
|
focusedIndex = (focusedIndex - 1 + focusableLen) % focusableLen;
|
|
@@ -5967,8 +5636,7 @@ function useMenuController(props) {
|
|
|
5967
5636
|
if (event.key === "ArrowDown") {
|
|
5968
5637
|
event.preventDefault(), event.stopPropagation();
|
|
5969
5638
|
const focusableElements_2 = _getFocusableElements(elementsRef.current), focusableLen_0 = focusableElements_2.length;
|
|
5970
|
-
if (focusableLen_0 === 0)
|
|
5971
|
-
return;
|
|
5639
|
+
if (focusableLen_0 === 0) return;
|
|
5972
5640
|
const focusedElement_0 = elementsRef.current[activeIndexRef.current];
|
|
5973
5641
|
let focusedIndex_0 = focusableElements_2.indexOf(focusedElement_0);
|
|
5974
5642
|
focusedIndex_0 = (focusedIndex_0 + 1) % focusableLen_0;
|
|
@@ -5977,23 +5645,14 @@ function useMenuController(props) {
|
|
|
5977
5645
|
return;
|
|
5978
5646
|
}
|
|
5979
5647
|
onKeyDown && onKeyDown(event);
|
|
5980
|
-
},
|
|
5981
|
-
const handleKeyDown = t4;
|
|
5982
|
-
let t5;
|
|
5983
|
-
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t5 = (event_0) => {
|
|
5648
|
+
}, [onKeyDown, originElement, setActiveIndex]), handleItemMouseEnter = react.useCallback((event_0) => {
|
|
5984
5649
|
const element_0 = event_0.currentTarget, currentIndex_3 = elementsRef.current.indexOf(element_0);
|
|
5985
5650
|
setActiveIndex(currentIndex_3);
|
|
5986
|
-
},
|
|
5987
|
-
const handleItemMouseEnter = t5;
|
|
5988
|
-
let t6;
|
|
5989
|
-
$[8] !== rootElementRef.current ? (t6 = () => {
|
|
5651
|
+
}, [setActiveIndex]), handleItemMouseLeave = react.useCallback(() => {
|
|
5990
5652
|
setActiveIndex(-2), rootElementRef.current?.focus();
|
|
5991
|
-
},
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
$[10] !== mounted || $[11] !== activeIndex || $[12] !== shouldFocus ? (t7 = () => {
|
|
5995
|
-
if (!mounted)
|
|
5996
|
-
return;
|
|
5653
|
+
}, [rootElementRef, setActiveIndex]);
|
|
5654
|
+
return react.useEffect(() => {
|
|
5655
|
+
if (!mounted) return;
|
|
5997
5656
|
const rafId = requestAnimationFrame(() => {
|
|
5998
5657
|
if (activeIndex === -1) {
|
|
5999
5658
|
if (shouldFocus === "first") {
|
|
@@ -6015,23 +5674,21 @@ function useMenuController(props) {
|
|
|
6015
5674
|
(elementsRef.current[activeIndex] || null)?.focus();
|
|
6016
5675
|
});
|
|
6017
5676
|
return () => cancelAnimationFrame(rafId);
|
|
6018
|
-
},
|
|
6019
|
-
let t9;
|
|
6020
|
-
return $[15] !== activeElement || $[16] !== activeIndex || $[17] !== handleItemMouseLeave || $[18] !== handleKeyDown || $[19] !== mount ? (t9 = {
|
|
5677
|
+
}, [activeIndex, mounted, setActiveIndex, shouldFocus]), {
|
|
6021
5678
|
activeElement,
|
|
6022
5679
|
activeIndex,
|
|
6023
5680
|
handleItemMouseEnter,
|
|
6024
5681
|
handleItemMouseLeave,
|
|
6025
5682
|
handleKeyDown,
|
|
6026
5683
|
mount
|
|
6027
|
-
}
|
|
5684
|
+
};
|
|
6028
5685
|
}
|
|
6029
5686
|
const Root$5 = styledComponents.styled(Box)`
|
|
6030
5687
|
outline: none;
|
|
6031
5688
|
overflow: auto;
|
|
6032
5689
|
`, Menu = react.forwardRef(function(props, forwardedRef) {
|
|
6033
5690
|
const $ = reactCompilerRuntime.c(50);
|
|
6034
|
-
let
|
|
5691
|
+
let _shouldFocus, children, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, restProps, t0, t1;
|
|
6035
5692
|
if ($[0] !== props) {
|
|
6036
5693
|
const {
|
|
6037
5694
|
children: t22,
|
|
@@ -6049,9 +5706,9 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
6049
5706
|
space: t122,
|
|
6050
5707
|
...t132
|
|
6051
5708
|
} = props;
|
|
6052
|
-
children = t22, onClickOutside = t32, onEscape = t42, onItemClick = t52, onItemSelect = t62, onKeyDown = t72, originElement = t82, t0 = t92, registerElement = t102, _shouldFocus = t112, t1 = t122, restProps = t132, $[0] = props, $[1] =
|
|
5709
|
+
children = t22, onClickOutside = t32, onEscape = t42, onItemClick = t52, onItemSelect = t62, onKeyDown = t72, originElement = t82, t0 = t92, registerElement = t102, _shouldFocus = t112, t1 = t122, restProps = t132, $[0] = props, $[1] = _shouldFocus, $[2] = children, $[3] = onClickOutside, $[4] = onEscape, $[5] = onItemClick, $[6] = onItemSelect, $[7] = onKeyDown, $[8] = originElement, $[9] = registerElement, $[10] = restProps, $[11] = t0, $[12] = t1;
|
|
6053
5710
|
} else
|
|
6054
|
-
|
|
5711
|
+
_shouldFocus = $[1], children = $[2], onClickOutside = $[3], onEscape = $[4], onItemClick = $[5], onItemSelect = $[6], onKeyDown = $[7], originElement = $[8], registerElement = $[9], restProps = $[10], t0 = $[11], t1 = $[12];
|
|
6055
5712
|
const padding = t0 === void 0 ? 1 : t0, space = t1 === void 0 ? 1 : t1, shouldFocus = _shouldFocus ?? (props.focusFirst && "first" || props.focusLast && "last" || null), ref = react.useRef(null);
|
|
6056
5713
|
let t2;
|
|
6057
5714
|
$[13] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[13] = t2) : t2 = $[13], react.useImperativeHandle(forwardedRef, t2);
|
|
@@ -6079,9 +5736,9 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
6079
5736
|
}, $[18] = registerElement, $[19] = t4) : t4 = $[19];
|
|
6080
5737
|
const handleRefChange = t4;
|
|
6081
5738
|
let t5, t6;
|
|
6082
|
-
$[20] !==
|
|
5739
|
+
$[20] !== activeIndex || $[21] !== onItemSelect ? (t5 = () => {
|
|
6083
5740
|
onItemSelect && onItemSelect(activeIndex);
|
|
6084
|
-
}, t6 = [activeIndex, onItemSelect], $[20] =
|
|
5741
|
+
}, t6 = [activeIndex, onItemSelect], $[20] = activeIndex, $[21] = onItemSelect, $[22] = t5, $[23] = t6) : (t5 = $[22], t6 = $[23]), react.useEffect(t5, t6);
|
|
6085
5742
|
let t7;
|
|
6086
5743
|
$[24] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => [ref.current], $[24] = t7) : t7 = $[24], useClickOutsideEvent(isTopLayer && onClickOutside, t7);
|
|
6087
5744
|
let t8;
|
|
@@ -6089,7 +5746,7 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
6089
5746
|
isTopLayer && event.key === "Escape" && (event.stopPropagation(), onEscape && onEscape());
|
|
6090
5747
|
}, $[25] = isTopLayer, $[26] = onEscape, $[27] = t8) : t8 = $[27], useGlobalKeyDown(t8);
|
|
6091
5748
|
let t9, t10;
|
|
6092
|
-
$[28] !== activeElement || $[29] !== activeIndex || $[30] !==
|
|
5749
|
+
$[28] !== activeElement || $[29] !== activeIndex || $[30] !== handleItemMouseEnter || $[31] !== handleItemMouseLeave || $[32] !== mount || $[33] !== onClickOutside || $[34] !== onEscape || $[35] !== onItemClick || $[36] !== registerElement ? (t10 = {
|
|
6093
5750
|
version: 0,
|
|
6094
5751
|
activeElement,
|
|
6095
5752
|
activeIndex,
|
|
@@ -6102,14 +5759,14 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
6102
5759
|
registerElement,
|
|
6103
5760
|
onMouseEnter: handleItemMouseEnter,
|
|
6104
5761
|
onMouseLeave: handleItemMouseLeave
|
|
6105
|
-
}, $[28] = activeElement, $[29] = activeIndex, $[30] =
|
|
5762
|
+
}, $[28] = activeElement, $[29] = activeIndex, $[30] = handleItemMouseEnter, $[31] = handleItemMouseLeave, $[32] = mount, $[33] = onClickOutside, $[34] = onEscape, $[35] = onItemClick, $[36] = registerElement, $[37] = t10) : t10 = $[37], t9 = t10;
|
|
6106
5763
|
const value = t9;
|
|
6107
5764
|
let t11;
|
|
6108
|
-
$[38] !==
|
|
5765
|
+
$[38] !== children || $[39] !== space ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { space, children }), $[38] = children, $[39] = space, $[40] = t11) : t11 = $[40];
|
|
6109
5766
|
let t12;
|
|
6110
|
-
$[41] !==
|
|
5767
|
+
$[41] !== handleKeyDown || $[42] !== handleRefChange || $[43] !== padding || $[44] !== restProps || $[45] !== t11 ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(Root$5, { "data-ui": "Menu", ...restProps, onKeyDown: handleKeyDown, padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: t11 }), $[41] = handleKeyDown, $[42] = handleRefChange, $[43] = padding, $[44] = restProps, $[45] = t11, $[46] = t12) : t12 = $[46];
|
|
6111
5768
|
let t13;
|
|
6112
|
-
return $[47] !==
|
|
5769
|
+
return $[47] !== t12 || $[48] !== value ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value, children: t12 }), $[47] = t12, $[48] = value, $[49] = t13) : t13 = $[49], t13;
|
|
6113
5770
|
});
|
|
6114
5771
|
Menu.displayName = "ForwardRef(Menu)";
|
|
6115
5772
|
const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
@@ -6145,7 +5802,7 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
6145
5802
|
}, t8 = [open], $[9] = open, $[10] = t7, $[11] = t8) : (t7 = $[10], t8 = $[11]), react.useEffect(t7, t8);
|
|
6146
5803
|
let t9;
|
|
6147
5804
|
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t9 = () => {
|
|
6148
|
-
setOpen(
|
|
5805
|
+
setOpen(_temp$2), setShouldFocus(null);
|
|
6149
5806
|
}, $[12] = t9) : t9 = $[12];
|
|
6150
5807
|
const handleButtonClick = t9;
|
|
6151
5808
|
let t10;
|
|
@@ -6177,9 +5834,9 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
6177
5834
|
}, $[16] = buttonElement, $[17] = menuElements, $[18] = t12) : t12 = $[18];
|
|
6178
5835
|
const handleMenuClickOutside = t12;
|
|
6179
5836
|
let t13;
|
|
6180
|
-
$[19] !==
|
|
5837
|
+
$[19] !== buttonElement || $[20] !== disableRestoreFocusOnClose ? (t13 = () => {
|
|
6181
5838
|
setOpen(!1), !disableRestoreFocusOnClose && buttonElement && buttonElement.focus();
|
|
6182
|
-
}, $[19] =
|
|
5839
|
+
}, $[19] = buttonElement, $[20] = disableRestoreFocusOnClose, $[21] = t13) : t13 = $[21];
|
|
6183
5840
|
const handleMenuEscape = t13;
|
|
6184
5841
|
let t14;
|
|
6185
5842
|
$[22] !== menuElements ? (t14 = (event_2) => {
|
|
@@ -6193,15 +5850,15 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
6193
5850
|
}, $[22] = menuElements, $[23] = t14) : t14 = $[23];
|
|
6194
5851
|
const handleBlur = t14;
|
|
6195
5852
|
let t15;
|
|
6196
|
-
$[24] !==
|
|
5853
|
+
$[24] !== buttonElement || $[25] !== disableRestoreFocusOnClose ? (t15 = () => {
|
|
6197
5854
|
setOpen(!1), !disableRestoreFocusOnClose && buttonElement && buttonElement.focus();
|
|
6198
|
-
}, $[24] =
|
|
5855
|
+
}, $[24] = buttonElement, $[25] = disableRestoreFocusOnClose, $[26] = t15) : t15 = $[26];
|
|
6199
5856
|
const handleItemClick = t15;
|
|
6200
5857
|
let t16;
|
|
6201
5858
|
$[27] === Symbol.for("react.memo_cache_sentinel") ? (t16 = (el_1) => (setChildMenuElements((els) => els.concat([el_1])), () => setChildMenuElements((els_0) => els_0.filter((_el) => _el !== el_1))), $[27] = t16) : t16 = $[27];
|
|
6202
5859
|
const registerElement = t16;
|
|
6203
5860
|
let t17;
|
|
6204
|
-
$[28] !==
|
|
5861
|
+
$[28] !== buttonElement || $[29] !== handleBlur || $[30] !== handleItemClick || $[31] !== handleMenuClickOutside || $[32] !== handleMenuEscape || $[33] !== id || $[34] !== menuProp || $[35] !== shouldFocus ? (t17 = menuProp && react.cloneElement(menuProp, {
|
|
6205
5862
|
"aria-labelledby": id,
|
|
6206
5863
|
onBlurCapture: handleBlur,
|
|
6207
5864
|
onClickOutside: handleMenuClickOutside,
|
|
@@ -6210,10 +5867,10 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
6210
5867
|
originElement: buttonElement,
|
|
6211
5868
|
registerElement,
|
|
6212
5869
|
shouldFocus
|
|
6213
|
-
}), $[28] =
|
|
5870
|
+
}), $[28] = buttonElement, $[29] = handleBlur, $[30] = handleItemClick, $[31] = handleMenuClickOutside, $[32] = handleMenuEscape, $[33] = id, $[34] = menuProp, $[35] = shouldFocus, $[36] = t17) : t17 = $[36];
|
|
6214
5871
|
const menu = t17;
|
|
6215
5872
|
let t18, t19;
|
|
6216
|
-
$[37] !== buttonProp || $[38] !==
|
|
5873
|
+
$[37] !== buttonProp || $[38] !== handleMouseDown || $[39] !== id || $[40] !== open ? (t19 = buttonProp && react.cloneElement(buttonProp, {
|
|
6217
5874
|
"data-ui": "MenuButton",
|
|
6218
5875
|
id,
|
|
6219
5876
|
onClick: handleButtonClick,
|
|
@@ -6223,14 +5880,14 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
6223
5880
|
"aria-expanded": open,
|
|
6224
5881
|
ref: setButtonElement,
|
|
6225
5882
|
selected: buttonProp.props.selected ?? open
|
|
6226
|
-
}), $[37] = buttonProp, $[38] =
|
|
5883
|
+
}), $[37] = buttonProp, $[38] = handleMouseDown, $[39] = id, $[40] = open, $[41] = t19) : t19 = $[41], t18 = t19;
|
|
6227
5884
|
const button = t18;
|
|
6228
5885
|
let t20, t21;
|
|
6229
5886
|
$[42] !== buttonElement ? (t20 = () => buttonElement, t21 = [buttonElement], $[42] = buttonElement, $[43] = t20, $[44] = t21) : (t20 = $[43], t21 = $[44]), react.useImperativeHandle(forwardedRef, t20, t21);
|
|
6230
5887
|
let t22, t23;
|
|
6231
5888
|
$[45] !== popover ? (t23 = popover || {}, $[45] = popover, $[46] = t23) : t23 = $[46];
|
|
6232
5889
|
let t24;
|
|
6233
|
-
$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !==
|
|
5890
|
+
$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !== deprecated_popoverRadius || $[50] !== deprecated_popoverScheme || $[51] !== deprecated_portal || $[52] !== deprecated_preventOverflow || $[53] !== t23 ? (t24 = {
|
|
6234
5891
|
boundaryElement: deprecated_boundaryElement,
|
|
6235
5892
|
overflow: "auto",
|
|
6236
5893
|
placement: deprecated_placement,
|
|
@@ -6239,14 +5896,17 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
6239
5896
|
radius: deprecated_popoverRadius,
|
|
6240
5897
|
scheme: deprecated_popoverScheme,
|
|
6241
5898
|
...t23
|
|
6242
|
-
}, $[47] = deprecated_boundaryElement, $[48] = deprecated_placement, $[49] =
|
|
5899
|
+
}, $[47] = deprecated_boundaryElement, $[48] = deprecated_placement, $[49] = deprecated_popoverRadius, $[50] = deprecated_popoverScheme, $[51] = deprecated_portal, $[52] = deprecated_preventOverflow, $[53] = t23, $[54] = t24) : t24 = $[54], t22 = t24;
|
|
6243
5900
|
const popoverProps = t22;
|
|
6244
5901
|
let t25;
|
|
6245
5902
|
$[55] !== button ? (t25 = button || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[55] = button, $[56] = t25) : t25 = $[56];
|
|
6246
5903
|
let t26;
|
|
6247
|
-
return $[57] !==
|
|
5904
|
+
return $[57] !== menu || $[58] !== open || $[59] !== popoverProps || $[60] !== t25 ? (t26 = /* @__PURE__ */ jsxRuntime.jsx(Popover, { "data-ui": "MenuButton__popover", ...popoverProps, content: menu, open, children: t25 }), $[57] = menu, $[58] = open, $[59] = popoverProps, $[60] = t25, $[61] = t26) : t26 = $[61], t26;
|
|
6248
5905
|
});
|
|
6249
5906
|
MenuButton.displayName = "ForwardRef(MenuButton)";
|
|
5907
|
+
function _temp$2(v) {
|
|
5908
|
+
return !v;
|
|
5909
|
+
}
|
|
6250
5910
|
const MenuDivider = styledComponents.styled.hr`
|
|
6251
5911
|
height: 1px;
|
|
6252
5912
|
border: 0;
|
|
@@ -6366,7 +6026,7 @@ function useMenu() {
|
|
|
6366
6026
|
}
|
|
6367
6027
|
function MenuGroup(props) {
|
|
6368
6028
|
const $ = reactCompilerRuntime.c(77);
|
|
6369
|
-
let
|
|
6029
|
+
let IconComponent, children, onClick, popover, restProps, t0, t1, t2, t3, t4, t5, text;
|
|
6370
6030
|
$[0] !== props ? ({
|
|
6371
6031
|
as: t0,
|
|
6372
6032
|
children,
|
|
@@ -6380,7 +6040,7 @@ function MenuGroup(props) {
|
|
|
6380
6040
|
text,
|
|
6381
6041
|
tone: t5,
|
|
6382
6042
|
...restProps
|
|
6383
|
-
} = props, $[0] = props, $[1] =
|
|
6043
|
+
} = props, $[0] = props, $[1] = IconComponent, $[2] = children, $[3] = onClick, $[4] = popover, $[5] = restProps, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = t4, $[11] = t5, $[12] = text) : (IconComponent = $[1], children = $[2], onClick = $[3], popover = $[4], restProps = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9], t4 = $[10], t5 = $[11], text = $[12]);
|
|
6384
6044
|
const as = t0 === void 0 ? "button" : t0, fontSize2 = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, menu = useMenu(), {
|
|
6385
6045
|
scheme
|
|
6386
6046
|
} = useRootTheme(), {
|
|
@@ -6435,7 +6095,7 @@ function MenuGroup(props) {
|
|
|
6435
6095
|
return () => cancelAnimationFrame(rafId);
|
|
6436
6096
|
}, t18 = [shouldFocus], $[32] = shouldFocus, $[33] = t17, $[34] = t18) : (t17 = $[33], t18 = $[34]), react.useEffect(t17, t18);
|
|
6437
6097
|
let t19;
|
|
6438
|
-
$[35] !==
|
|
6098
|
+
$[35] !== children || $[36] !== handleChildItemClick || $[37] !== handleMenuKeyDown || $[38] !== onClickOutside || $[39] !== onEscape || $[40] !== registerElement || $[41] !== shouldFocus ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(Menu, { onClickOutside, onEscape, onItemClick: handleChildItemClick, onKeyDown: handleMenuKeyDown, onMouseEnter: handleMenuMouseEnter, registerElement, shouldFocus, children }), $[35] = children, $[36] = handleChildItemClick, $[37] = handleMenuKeyDown, $[38] = onClickOutside, $[39] = onEscape, $[40] = registerElement, $[41] = shouldFocus, $[42] = t19) : t19 = $[42];
|
|
6439
6099
|
const childMenu = t19;
|
|
6440
6100
|
let t20;
|
|
6441
6101
|
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t20 = (event_2) => {
|
|
@@ -6458,20 +6118,20 @@ function MenuGroup(props) {
|
|
|
6458
6118
|
let t29;
|
|
6459
6119
|
$[51] !== fontSize2 ? (t29 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children: t28 }), $[51] = fontSize2, $[52] = t29) : t29 = $[52];
|
|
6460
6120
|
let t30;
|
|
6461
|
-
$[53] !==
|
|
6121
|
+
$[53] !== padding || $[54] !== space || $[55] !== t26 || $[56] !== t27 || $[57] !== t29 ? (t30 = /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: space, padding, children: [
|
|
6462
6122
|
t26,
|
|
6463
6123
|
t27,
|
|
6464
6124
|
t29
|
|
6465
|
-
] }), $[53] =
|
|
6125
|
+
] }), $[53] = padding, $[54] = space, $[55] = t26, $[56] = t27, $[57] = t29, $[58] = t30) : t30 = $[58];
|
|
6466
6126
|
let t31;
|
|
6467
|
-
$[59] !== as || $[60] !==
|
|
6127
|
+
$[59] !== as || $[60] !== handleClick || $[61] !== handleMouseEnter || $[62] !== restProps || $[63] !== scheme || $[64] !== t21 || $[65] !== t22 || $[66] !== t23 || $[67] !== t24 || $[68] !== t25 || $[69] !== t30 || $[70] !== tone ? (t31 = /* @__PURE__ */ jsxRuntime.jsx(Selectable, { "data-as": as, "data-ui": "MenuGroup", forwardedAs: as, ...restProps, "aria-pressed": t21, "data-pressed": t22, "data-selected": t23, $radius: t24, $tone: tone, $scheme: scheme, onClick: handleClick, onKeyDown: handleKeyDown, onMouseEnter: handleMouseEnter, ref: setRootElement, tabIndex: -1, type: t25, children: t30 }), $[59] = as, $[60] = handleClick, $[61] = handleMouseEnter, $[62] = restProps, $[63] = scheme, $[64] = t21, $[65] = t22, $[66] = t23, $[67] = t24, $[68] = t25, $[69] = t30, $[70] = tone, $[71] = t31) : t31 = $[71];
|
|
6468
6128
|
let t32;
|
|
6469
|
-
return $[72] !==
|
|
6129
|
+
return $[72] !== childMenu || $[73] !== open || $[74] !== popover || $[75] !== t31 ? (t32 = /* @__PURE__ */ jsxRuntime.jsx(Popover, { ...popover, content: childMenu, "data-ui": "MenuGroup__popover", open, children: t31 }), $[72] = childMenu, $[73] = open, $[74] = popover, $[75] = t31, $[76] = t32) : t32 = $[76], t32;
|
|
6470
6130
|
}
|
|
6471
6131
|
MenuGroup.displayName = "MenuGroup";
|
|
6472
6132
|
const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
6473
6133
|
const $ = reactCompilerRuntime.c(74);
|
|
6474
|
-
let
|
|
6134
|
+
let IconComponent, IconRightComponent, children, disabled, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;
|
|
6475
6135
|
$[0] !== props ? ({
|
|
6476
6136
|
as: t0,
|
|
6477
6137
|
children,
|
|
@@ -6495,7 +6155,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6495
6155
|
text,
|
|
6496
6156
|
tone: t5,
|
|
6497
6157
|
...restProps
|
|
6498
|
-
} = props, $[0] = props, $[1] =
|
|
6158
|
+
} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = hotkeys, $[6] = onClick, $[7] = paddingBottom, $[8] = paddingLeft, $[9] = paddingRight, $[10] = paddingTop, $[11] = paddingX, $[12] = paddingY, $[13] = pressed, $[14] = restProps, $[15] = selectedProp, $[16] = t0, $[17] = t1, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = t5, $[22] = text) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], hotkeys = $[5], onClick = $[6], paddingBottom = $[7], paddingLeft = $[8], paddingRight = $[9], paddingTop = $[10], paddingX = $[11], paddingY = $[12], pressed = $[13], restProps = $[14], selectedProp = $[15], t0 = $[16], t1 = $[17], t2 = $[18], t3 = $[19], t4 = $[20], t5 = $[21], text = $[22]);
|
|
6499
6159
|
const as = t0 === void 0 ? "button" : t0, fontSize2 = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, {
|
|
6500
6160
|
scheme
|
|
6501
6161
|
} = useRootTheme(), menu = useMenu(), {
|
|
@@ -6515,7 +6175,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6515
6175
|
}, $[29] = disabled, $[30] = onClick, $[31] = onItemClick, $[32] = t9) : t9 = $[32];
|
|
6516
6176
|
const handleClick = t9;
|
|
6517
6177
|
let t10, t11;
|
|
6518
|
-
$[33] !== padding || $[34] !==
|
|
6178
|
+
$[33] !== padding || $[34] !== paddingBottom || $[35] !== paddingLeft || $[36] !== paddingRight || $[37] !== paddingTop || $[38] !== paddingX || $[39] !== paddingY ? (t11 = {
|
|
6519
6179
|
padding,
|
|
6520
6180
|
paddingX,
|
|
6521
6181
|
paddingY,
|
|
@@ -6523,7 +6183,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6523
6183
|
paddingRight,
|
|
6524
6184
|
paddingBottom,
|
|
6525
6185
|
paddingLeft
|
|
6526
|
-
}, $[33] = padding, $[34] =
|
|
6186
|
+
}, $[33] = padding, $[34] = paddingBottom, $[35] = paddingLeft, $[36] = paddingRight, $[37] = paddingTop, $[38] = paddingX, $[39] = paddingY, $[40] = t11) : t11 = $[40], t10 = t11;
|
|
6527
6187
|
const paddingProps = t10, t12 = useArrayProp(fontSize2);
|
|
6528
6188
|
let t13;
|
|
6529
6189
|
$[41] !== t12 ? (t13 = t12.map(_temp$1), $[41] = t12, $[42] = t13) : t13 = $[42];
|
|
@@ -6534,7 +6194,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6534
6194
|
}, $[43] = t14) : t14 = $[43];
|
|
6535
6195
|
const setRef = t14, t15 = as === "button" && pressed, t16 = as !== "button" && pressed ? "" : void 0, t17 = active ? "" : void 0, t18 = disabled ? "" : void 0, t19 = useArrayProp(radius), t20 = useArrayProp(0), t21 = disabled ? "default" : tone, t22 = as === "button" ? "button" : void 0;
|
|
6536
6196
|
let t23;
|
|
6537
|
-
$[44] !== IconComponent || $[45] !==
|
|
6197
|
+
$[44] !== IconComponent || $[45] !== IconRightComponent || $[46] !== fontSize2 || $[47] !== hotkeys || $[48] !== hotkeysFontSize || $[49] !== paddingProps || $[50] !== space || $[51] !== text ? (t23 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", gap: space, align: "center", ...paddingProps, children: [
|
|
6538
6198
|
IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
|
|
6539
6199
|
react.isValidElement(IconComponent) && IconComponent,
|
|
6540
6200
|
ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
@@ -6548,14 +6208,14 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6548
6208
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
6549
6209
|
ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
6550
6210
|
] })
|
|
6551
|
-
] }), $[44] = IconComponent, $[45] =
|
|
6211
|
+
] }), $[44] = IconComponent, $[45] = IconRightComponent, $[46] = fontSize2, $[47] = hotkeys, $[48] = hotkeysFontSize, $[49] = paddingProps, $[50] = space, $[51] = text, $[52] = t23) : t23 = $[52];
|
|
6552
6212
|
let t24;
|
|
6553
6213
|
$[53] !== children || $[54] !== paddingProps ? (t24 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...paddingProps, children }), $[53] = children, $[54] = paddingProps, $[55] = t24) : t24 = $[55];
|
|
6554
6214
|
let t25;
|
|
6555
|
-
return $[56] !==
|
|
6215
|
+
return $[56] !== as || $[57] !== disabled || $[58] !== handleClick || $[59] !== onItemMouseEnter || $[60] !== onItemMouseLeave || $[61] !== restProps || $[62] !== scheme || $[63] !== t15 || $[64] !== t16 || $[65] !== t17 || $[66] !== t18 || $[67] !== t19 || $[68] !== t20 || $[69] !== t21 || $[70] !== t22 || $[71] !== t23 || $[72] !== t24 ? (t25 = /* @__PURE__ */ jsxRuntime.jsxs(Selectable, { "data-ui": "MenuItem", ...restProps, "aria-pressed": t15, "data-pressed": t16, "data-selected": t17, "data-disabled": t18, forwardedAs: as, $radius: t19, $padding: t20, $tone: t21, $scheme: scheme, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, role: "menuitem", tabIndex: -1, type: t22, children: [
|
|
6556
6216
|
t23,
|
|
6557
6217
|
t24
|
|
6558
|
-
] }), $[56] =
|
|
6218
|
+
] }), $[56] = as, $[57] = disabled, $[58] = handleClick, $[59] = onItemMouseEnter, $[60] = onItemMouseLeave, $[61] = restProps, $[62] = scheme, $[63] = t15, $[64] = t16, $[65] = t17, $[66] = t18, $[67] = t19, $[68] = t20, $[69] = t21, $[70] = t22, $[71] = t23, $[72] = t24, $[73] = t25) : t25 = $[73], t25;
|
|
6559
6219
|
});
|
|
6560
6220
|
MenuItem.displayName = "ForwardRef(MenuItem)";
|
|
6561
6221
|
function _temp$1(s) {
|
|
@@ -6603,13 +6263,13 @@ const keyframe = styledComponents.keyframes`
|
|
|
6603
6263
|
}
|
|
6604
6264
|
`, Root$4 = styledComponents.styled(Box)(responsiveRadiusStyle, skeletonStyle), Skeleton = react.forwardRef(function(props, ref) {
|
|
6605
6265
|
const $ = reactCompilerRuntime.c(14);
|
|
6606
|
-
let
|
|
6266
|
+
let delay, radius, restProps, t0;
|
|
6607
6267
|
$[0] !== props ? ({
|
|
6608
6268
|
animated: t0,
|
|
6609
6269
|
delay,
|
|
6610
6270
|
radius,
|
|
6611
6271
|
...restProps
|
|
6612
|
-
} = props, $[0] = props, $[1] =
|
|
6272
|
+
} = props, $[0] = props, $[1] = delay, $[2] = radius, $[3] = restProps, $[4] = t0) : (delay = $[1], radius = $[2], restProps = $[3], t0 = $[4]);
|
|
6613
6273
|
const animated = t0 === void 0 ? !1 : t0, [visible, setVisible] = react.useState(!delay);
|
|
6614
6274
|
let t1, t2;
|
|
6615
6275
|
$[5] !== delay ? (t1 = () => {
|
|
@@ -6624,7 +6284,7 @@ const keyframe = styledComponents.keyframes`
|
|
|
6624
6284
|
}, t2 = [delay], $[5] = delay, $[6] = t1, $[7] = t2) : (t1 = $[6], t2 = $[7]), react.useEffect(t1, t2);
|
|
6625
6285
|
const t3 = useArrayProp(radius);
|
|
6626
6286
|
let t4;
|
|
6627
|
-
return $[8] !==
|
|
6287
|
+
return $[8] !== animated || $[9] !== ref || $[10] !== restProps || $[11] !== t3 || $[12] !== visible ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Root$4, { ...restProps, $animated: animated, $radius: t3, $visible: visible, ref }), $[8] = animated, $[9] = ref, $[10] = restProps, $[11] = t3, $[12] = visible, $[13] = t4) : t4 = $[13], t4;
|
|
6628
6288
|
});
|
|
6629
6289
|
Skeleton.displayName = "ForwardRef(Skeleton)";
|
|
6630
6290
|
const Root$3 = styledComponents.styled(Skeleton)((props) => {
|
|
@@ -6643,57 +6303,57 @@ const Root$3 = styledComponents.styled(Skeleton)((props) => {
|
|
|
6643
6303
|
});
|
|
6644
6304
|
}), TextSkeleton = react.forwardRef(function(props, ref) {
|
|
6645
6305
|
const $ = reactCompilerRuntime.c(7);
|
|
6646
|
-
let
|
|
6306
|
+
let restProps, t0;
|
|
6647
6307
|
$[0] !== props ? ({
|
|
6648
6308
|
size: t0,
|
|
6649
6309
|
...restProps
|
|
6650
|
-
} = props, $[0] = props, $[1] =
|
|
6310
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6651
6311
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
6652
6312
|
let t1;
|
|
6653
|
-
return $[3] !==
|
|
6313
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, { ...restProps, $size, ref, $style: "text" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
6654
6314
|
});
|
|
6655
6315
|
TextSkeleton.displayName = "ForwardRef(TextSkeleton)";
|
|
6656
6316
|
const LabelSkeleton = react.forwardRef(function(props, ref) {
|
|
6657
6317
|
const $ = reactCompilerRuntime.c(7);
|
|
6658
|
-
let
|
|
6318
|
+
let restProps, t0;
|
|
6659
6319
|
$[0] !== props ? ({
|
|
6660
6320
|
size: t0,
|
|
6661
6321
|
...restProps
|
|
6662
|
-
} = props, $[0] = props, $[1] =
|
|
6322
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6663
6323
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
6664
6324
|
let t1;
|
|
6665
|
-
return $[3] !==
|
|
6325
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, { ...restProps, $size, ref, $style: "label" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
6666
6326
|
});
|
|
6667
6327
|
LabelSkeleton.displayName = "ForwardRef(LabelSkeleton)";
|
|
6668
6328
|
const HeadingSkeleton = react.forwardRef(function(props, ref) {
|
|
6669
6329
|
const $ = reactCompilerRuntime.c(7);
|
|
6670
|
-
let
|
|
6330
|
+
let restProps, t0;
|
|
6671
6331
|
$[0] !== props ? ({
|
|
6672
6332
|
size: t0,
|
|
6673
6333
|
...restProps
|
|
6674
|
-
} = props, $[0] = props, $[1] =
|
|
6334
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6675
6335
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
6676
6336
|
let t1;
|
|
6677
|
-
return $[3] !==
|
|
6337
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, { ...restProps, $size, ref, $style: "heading" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
6678
6338
|
});
|
|
6679
6339
|
HeadingSkeleton.displayName = "ForwardRef(HeadingSkeleton)";
|
|
6680
6340
|
const CodeSkeleton = react.forwardRef(function(props, ref) {
|
|
6681
6341
|
const $ = reactCompilerRuntime.c(7);
|
|
6682
|
-
let
|
|
6342
|
+
let restProps, t0;
|
|
6683
6343
|
$[0] !== props ? ({
|
|
6684
6344
|
size: t0,
|
|
6685
6345
|
...restProps
|
|
6686
|
-
} = props, $[0] = props, $[1] =
|
|
6346
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6687
6347
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
6688
6348
|
let t1;
|
|
6689
|
-
return $[3] !==
|
|
6349
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, { ...restProps, $size, ref, $style: "code" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
6690
6350
|
});
|
|
6691
6351
|
CodeSkeleton.displayName = "ForwardRef(CodeSkeleton)";
|
|
6692
6352
|
const CustomButton = styledComponents.styled(Button)`
|
|
6693
6353
|
max-width: 100%;
|
|
6694
6354
|
`, Tab = react.forwardRef(function(props, forwardedRef) {
|
|
6695
6355
|
const $ = reactCompilerRuntime.c(30);
|
|
6696
|
-
let
|
|
6356
|
+
let focused, icon, id, label, onClick, onFocus, restProps, selected, t0, t1;
|
|
6697
6357
|
$[0] !== props ? ({
|
|
6698
6358
|
icon,
|
|
6699
6359
|
id,
|
|
@@ -6705,7 +6365,7 @@ const CustomButton = styledComponents.styled(Button)`
|
|
|
6705
6365
|
padding: t1,
|
|
6706
6366
|
selected,
|
|
6707
6367
|
...restProps
|
|
6708
|
-
} = props, $[0] = props, $[1] =
|
|
6368
|
+
} = props, $[0] = props, $[1] = focused, $[2] = icon, $[3] = id, $[4] = label, $[5] = onClick, $[6] = onFocus, $[7] = restProps, $[8] = selected, $[9] = t0, $[10] = t1) : (focused = $[1], icon = $[2], id = $[3], label = $[4], onClick = $[5], onFocus = $[6], restProps = $[7], selected = $[8], t0 = $[9], t1 = $[10]);
|
|
6709
6369
|
const fontSize2 = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 2 : t1, ref = react.useRef(null), focusedRef = react.useRef(!1);
|
|
6710
6370
|
let t2;
|
|
6711
6371
|
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], react.useImperativeHandle(forwardedRef, t2);
|
|
@@ -6725,7 +6385,7 @@ const CustomButton = styledComponents.styled(Button)`
|
|
|
6725
6385
|
}, t6 = [focused], $[15] = focused, $[16] = t5, $[17] = t6) : (t5 = $[16], t6 = $[17]), react.useEffect(t5, t6);
|
|
6726
6386
|
const t7 = selected ? "true" : "false", t8 = selected ? 0 : -1;
|
|
6727
6387
|
let t9;
|
|
6728
|
-
return $[18] !==
|
|
6388
|
+
return $[18] !== fontSize2 || $[19] !== handleFocus || $[20] !== icon || $[21] !== id || $[22] !== label || $[23] !== onClick || $[24] !== padding || $[25] !== restProps || $[26] !== selected || $[27] !== t7 || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(CustomButton, { "data-ui": "Tab", ...restProps, "aria-selected": t7, fontSize: fontSize2, icon, id, mode: "bleed", onClick, onBlur: handleBlur, onFocus: handleFocus, padding, ref, role: "tab", selected, tabIndex: t8, text: label, type: "button" }), $[18] = fontSize2, $[19] = handleFocus, $[20] = icon, $[21] = id, $[22] = label, $[23] = onClick, $[24] = padding, $[25] = restProps, $[26] = selected, $[27] = t7, $[28] = t8, $[29] = t9) : t9 = $[29], t9;
|
|
6729
6389
|
});
|
|
6730
6390
|
Tab.displayName = "ForwardRef(Tab)";
|
|
6731
6391
|
const CustomInline = styledComponents.styled(Inline)`
|
|
@@ -6761,19 +6421,19 @@ const CustomInline = styledComponents.styled(Inline)`
|
|
|
6761
6421
|
}, $[8] = numTabs, $[9] = t1) : t1 = $[9];
|
|
6762
6422
|
const handleKeyDown = t1;
|
|
6763
6423
|
let t2;
|
|
6764
|
-
return $[10] !==
|
|
6424
|
+
return $[10] !== handleKeyDown || $[11] !== ref || $[12] !== restProps || $[13] !== tabs ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(CustomInline, { "data-ui": "TabList", ...restProps, onKeyDown: handleKeyDown, ref, role: "tablist", children: tabs }), $[10] = handleKeyDown, $[11] = ref, $[12] = restProps, $[13] = tabs, $[14] = t2) : t2 = $[14], t2;
|
|
6765
6425
|
});
|
|
6766
6426
|
TabList.displayName = "ForwardRef(TabList)";
|
|
6767
6427
|
const TabPanel = react.forwardRef(function(props, ref) {
|
|
6768
6428
|
const $ = reactCompilerRuntime.c(9);
|
|
6769
|
-
let
|
|
6429
|
+
let flex, restProps;
|
|
6770
6430
|
$[0] !== props ? ({
|
|
6771
6431
|
flex,
|
|
6772
6432
|
...restProps
|
|
6773
|
-
} = props, $[0] = props, $[1] =
|
|
6433
|
+
} = props, $[0] = props, $[1] = flex, $[2] = restProps) : (flex = $[1], restProps = $[2]);
|
|
6774
6434
|
const t0 = props.tabIndex === void 0 ? 0 : props.tabIndex;
|
|
6775
6435
|
let t1;
|
|
6776
|
-
return $[3] !==
|
|
6436
|
+
return $[3] !== flex || $[4] !== props.children || $[5] !== ref || $[6] !== restProps || $[7] !== t0 ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "TabPanel", ...restProps, flex, ref, role: "tabpanel", tabIndex: t0, children: props.children }), $[3] = flex, $[4] = props.children, $[5] = ref, $[6] = restProps, $[7] = t0, $[8] = t1) : t1 = $[8], t1;
|
|
6777
6437
|
});
|
|
6778
6438
|
TabPanel.displayName = "ForwardRef(TabPanel)";
|
|
6779
6439
|
const TextBox = styledComponents.styled(Flex)`
|
|
@@ -6824,12 +6484,12 @@ const STATUS_CARD_TONE = {
|
|
|
6824
6484
|
error: "critical",
|
|
6825
6485
|
warning: "caution",
|
|
6826
6486
|
success: "positive",
|
|
6827
|
-
info: "
|
|
6487
|
+
info: "neutral"
|
|
6828
6488
|
}, BUTTON_TONE = {
|
|
6829
6489
|
error: "critical",
|
|
6830
6490
|
warning: "caution",
|
|
6831
6491
|
success: "positive",
|
|
6832
|
-
info: "
|
|
6492
|
+
info: "neutral"
|
|
6833
6493
|
}, ROLES = {
|
|
6834
6494
|
error: "alert",
|
|
6835
6495
|
warning: "alert",
|
|
@@ -6838,7 +6498,7 @@ const STATUS_CARD_TONE = {
|
|
|
6838
6498
|
}, Root$2 = styledComponents.styled(Card)(rootStyles);
|
|
6839
6499
|
function Toast(props) {
|
|
6840
6500
|
const $ = reactCompilerRuntime.c(30);
|
|
6841
|
-
let
|
|
6501
|
+
let closable, description, duration, onClose, restProps, status, t0, title;
|
|
6842
6502
|
$[0] !== props ? ({
|
|
6843
6503
|
closable,
|
|
6844
6504
|
description,
|
|
@@ -6848,7 +6508,7 @@ function Toast(props) {
|
|
|
6848
6508
|
title,
|
|
6849
6509
|
status,
|
|
6850
6510
|
...restProps
|
|
6851
|
-
} = props, $[0] = props, $[1] =
|
|
6511
|
+
} = props, $[0] = props, $[1] = closable, $[2] = description, $[3] = duration, $[4] = onClose, $[5] = restProps, $[6] = status, $[7] = t0, $[8] = title) : (closable = $[1], description = $[2], duration = $[3], onClose = $[4], restProps = $[5], status = $[6], t0 = $[7], title = $[8]);
|
|
6852
6512
|
const radius = t0 === void 0 ? 3 : t0, cardTone = status ? STATUS_CARD_TONE[status] : "default", buttonTone = status ? BUTTON_TONE[status] : "default", role = status ? ROLES[status] : "status";
|
|
6853
6513
|
let t1;
|
|
6854
6514
|
$[9] !== title ? (t1 = title && /* @__PURE__ */ jsxRuntime.jsx(Text, { size: 1, weight: "medium", children: title }), $[9] = title, $[10] = t1) : t1 = $[10];
|
|
@@ -6860,16 +6520,16 @@ function Toast(props) {
|
|
|
6860
6520
|
t2
|
|
6861
6521
|
] }) }), $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15];
|
|
6862
6522
|
let t4;
|
|
6863
|
-
$[16] !==
|
|
6523
|
+
$[16] !== buttonTone || $[17] !== closable || $[18] !== onClose ? (t4 = closable && /* @__PURE__ */ jsxRuntime.jsx(Box, { padding: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { as: "button", icon: icons.CloseIcon, mode: "bleed", padding: 2, tone: buttonTone, onClick: onClose, style: {
|
|
6864
6524
|
verticalAlign: "top"
|
|
6865
|
-
} }) }), $[16] =
|
|
6525
|
+
} }) }), $[16] = buttonTone, $[17] = closable, $[18] = onClose, $[19] = t4) : t4 = $[19];
|
|
6866
6526
|
let t5;
|
|
6867
6527
|
$[20] !== t3 || $[21] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "flex-start", children: [
|
|
6868
6528
|
t3,
|
|
6869
6529
|
t4
|
|
6870
6530
|
] }), $[20] = t3, $[21] = t4, $[22] = t5) : t5 = $[22];
|
|
6871
6531
|
let t6;
|
|
6872
|
-
return $[23] !==
|
|
6532
|
+
return $[23] !== cardTone || $[24] !== duration || $[25] !== radius || $[26] !== restProps || $[27] !== role || $[28] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$2, { "data-ui": "Toast", role, ...restProps, marginTop: 3, radius, shadow: 2, tone: cardTone, $duration: duration, children: t5 }), $[23] = cardTone, $[24] = duration, $[25] = radius, $[26] = restProps, $[27] = role, $[28] = t5, $[29] = t6) : t6 = $[29], t6;
|
|
6873
6533
|
}
|
|
6874
6534
|
Toast.displayName = "Toast";
|
|
6875
6535
|
function useMounted() {
|
|
@@ -6986,7 +6646,7 @@ function ToastProvider(props) {
|
|
|
6986
6646
|
toastsRef.current = {};
|
|
6987
6647
|
}, t13 = [], $[10] = t12, $[11] = t13) : (t12 = $[10], t13 = $[11]), react.useEffect(t12, t13);
|
|
6988
6648
|
let t14;
|
|
6989
|
-
$[12] !== mounted || $[13] !==
|
|
6649
|
+
$[12] !== mounted || $[13] !== padding || $[14] !== paddingX || $[15] !== paddingY || $[16] !== prefersReducedMotion || $[17] !== state || $[18] !== variants || $[19] !== zOffset ? (t14 = mounted && /* @__PURE__ */ jsxRuntime.jsx(Root$1, { "data-ui": "ToastProvider", zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(ToastContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(Box, { padding, paddingX, paddingY, children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: !1, children: state.map((t152) => {
|
|
6990
6650
|
const {
|
|
6991
6651
|
dismiss: dismiss_0,
|
|
6992
6652
|
id: id_0,
|
|
@@ -6999,7 +6659,7 @@ function ToastProvider(props) {
|
|
|
6999
6659
|
damping: 30,
|
|
7000
6660
|
stiffness: 400
|
|
7001
6661
|
}, children: /* @__PURE__ */ jsxRuntime.jsx(Toast, { closable: params_0.closable, description: params_0.description, onClose: dismiss_0, status: params_0.status, title: params_0.title, duration: params_0.duration }) }, id_0);
|
|
7002
|
-
}) }) }) }) }), $[12] = mounted, $[13] =
|
|
6662
|
+
}) }) }) }) }), $[12] = mounted, $[13] = padding, $[14] = paddingX, $[15] = paddingY, $[16] = prefersReducedMotion, $[17] = state, $[18] = variants, $[19] = zOffset, $[20] = t14) : t14 = $[20];
|
|
7003
6663
|
let t15;
|
|
7004
6664
|
return $[21] !== children || $[22] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value, children: [
|
|
7005
6665
|
children,
|
|
@@ -7071,13 +6731,13 @@ function _focusItemElement(el) {
|
|
|
7071
6731
|
}
|
|
7072
6732
|
const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null), Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
7073
6733
|
const $ = reactCompilerRuntime.c(37);
|
|
7074
|
-
let
|
|
6734
|
+
let children, onFocus, restProps, t0;
|
|
7075
6735
|
$[0] !== props ? ({
|
|
7076
6736
|
children,
|
|
7077
6737
|
space: t0,
|
|
7078
6738
|
onFocus,
|
|
7079
6739
|
...restProps
|
|
7080
|
-
} = props, $[0] = props, $[1] =
|
|
6740
|
+
} = props, $[0] = props, $[1] = children, $[2] = onFocus, $[3] = restProps, $[4] = t0) : (children = $[1], onFocus = $[2], restProps = $[3], t0 = $[4]);
|
|
7081
6741
|
const space = t0 === void 0 ? 1 : t0, ref = react.useRef(null), [focusedElement, setFocusedElement] = react.useState(null), focusedElementRef = react.useRef(focusedElement);
|
|
7082
6742
|
let t1, t2;
|
|
7083
6743
|
$[5] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[5] = t2) : t2 = $[5], t1 = t2;
|
|
@@ -7131,7 +6791,7 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
7131
6791
|
let t12;
|
|
7132
6792
|
const t13 = focusedElement || itemElements[0] || null;
|
|
7133
6793
|
let t14;
|
|
7134
|
-
$[17] !==
|
|
6794
|
+
$[17] !== space || $[18] !== state || $[19] !== t13 ? (t14 = {
|
|
7135
6795
|
version: 0,
|
|
7136
6796
|
focusedElement: t13,
|
|
7137
6797
|
level: 0,
|
|
@@ -7141,7 +6801,7 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
7141
6801
|
setFocusedElement,
|
|
7142
6802
|
space,
|
|
7143
6803
|
state
|
|
7144
|
-
}, $[17] =
|
|
6804
|
+
}, $[17] = space, $[18] = state, $[19] = t13, $[20] = t14) : t14 = $[20], t12 = t14;
|
|
7145
6805
|
const contextValue = t12;
|
|
7146
6806
|
let t15;
|
|
7147
6807
|
$[21] !== itemElements ? (t15 = (event) => {
|
|
@@ -7220,7 +6880,7 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
7220
6880
|
let t18;
|
|
7221
6881
|
$[26] !== children ? (t18 = [children], $[26] = children, $[27] = t18) : t18 = $[27], react.useEffect(t17, t18);
|
|
7222
6882
|
let t19;
|
|
7223
|
-
$[28] !==
|
|
6883
|
+
$[28] !== children || $[29] !== handleFocus || $[30] !== handleKeyDown || $[31] !== restProps || $[32] !== space ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { as: "ul", "data-ui": "Tree", ...restProps, onFocus: handleFocus, onKeyDown: handleKeyDown, ref, role: "tree", space, children }), $[28] = children, $[29] = handleFocus, $[30] = handleKeyDown, $[31] = restProps, $[32] = space, $[33] = t19) : t19 = $[33];
|
|
7224
6884
|
let t20;
|
|
7225
6885
|
return $[34] !== contextValue || $[35] !== t19 ? (t20 = /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: t19 }), $[34] = contextValue, $[35] = t19, $[36] = t20) : t20 = $[36], t20;
|
|
7226
6886
|
}));
|
|
@@ -7325,15 +6985,15 @@ function useTree() {
|
|
|
7325
6985
|
}
|
|
7326
6986
|
const TreeGroup = react.memo(function(props) {
|
|
7327
6987
|
const $ = reactCompilerRuntime.c(9);
|
|
7328
|
-
let
|
|
6988
|
+
let children, restProps, t0;
|
|
7329
6989
|
$[0] !== props ? ({
|
|
7330
6990
|
children,
|
|
7331
6991
|
expanded: t0,
|
|
7332
6992
|
...restProps
|
|
7333
|
-
} = props, $[0] = props, $[1] =
|
|
6993
|
+
} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
7334
6994
|
const expanded = t0 === void 0 ? !1 : t0, tree = useTree(), t1 = !expanded;
|
|
7335
6995
|
let t2;
|
|
7336
|
-
return $[4] !==
|
|
6996
|
+
return $[4] !== children || $[5] !== restProps || $[6] !== t1 || $[7] !== tree.space ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { as: "ul", "data-ui": "TreeGroup", ...restProps, hidden: t1, marginTop: tree.space, role: "group", space: tree.space, children }), $[4] = children, $[5] = restProps, $[6] = t1, $[7] = tree.space, $[8] = t2) : t2 = $[8], t2;
|
|
7337
6997
|
}), Root = react.memo(styledComponents.styled.li(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = styledComponents.styled(Box).attrs({
|
|
7338
6998
|
forwardedAs: "a"
|
|
7339
6999
|
})(treeItemBoxStyle), ToggleArrowText = styledComponents.styled(Text)`
|
|
@@ -7341,117 +7001,61 @@ const TreeGroup = react.memo(function(props) {
|
|
|
7341
7001
|
transition: transform 100ms;
|
|
7342
7002
|
}
|
|
7343
7003
|
`, TreeItem = react.memo(function(props) {
|
|
7344
|
-
const
|
|
7345
|
-
let t0, t1, t2, t3, t4, idProp, onClick, IconComponent, children, muted, weight, text, href, linkAs, restProps;
|
|
7346
|
-
$[0] !== props ? ({
|
|
7004
|
+
const {
|
|
7347
7005
|
children,
|
|
7348
|
-
expanded:
|
|
7349
|
-
fontSize:
|
|
7006
|
+
expanded: expandedProp = !1,
|
|
7007
|
+
fontSize: fontSize2 = 1,
|
|
7350
7008
|
href,
|
|
7351
7009
|
icon: IconComponent,
|
|
7352
7010
|
id: idProp,
|
|
7353
7011
|
linkAs,
|
|
7354
7012
|
muted,
|
|
7355
7013
|
onClick,
|
|
7356
|
-
padding
|
|
7357
|
-
selected
|
|
7358
|
-
space
|
|
7014
|
+
padding = 2,
|
|
7015
|
+
selected = !1,
|
|
7016
|
+
space = 2,
|
|
7359
7017
|
text,
|
|
7360
7018
|
weight,
|
|
7361
7019
|
...restProps
|
|
7362
|
-
} = props,
|
|
7363
|
-
const expandedProp = t0 === void 0 ? !1 : t0, fontSize2 = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 2 : t2, selected = t3 === void 0 ? !1 : t3, space = t4 === void 0 ? 2 : t4, [rootElement, setRootElement] = react.useState(null), treeitemRef = react.useRef(null), tree = useTree(), {
|
|
7020
|
+
} = props, rootRef = react.useRef(null), treeitemRef = react.useRef(null), tree = useTree(), {
|
|
7364
7021
|
path,
|
|
7365
7022
|
registerItem,
|
|
7366
7023
|
setExpanded,
|
|
7367
7024
|
setFocusedElement
|
|
7368
|
-
} = tree, _id = react.useId(), id = idProp || _id
|
|
7369
|
-
let t5, t6, t7;
|
|
7370
|
-
if ($[16] !== id || $[17] !== path) {
|
|
7371
|
-
const result = path.concat([id || ""]);
|
|
7372
|
-
t6 = result, t7 = result.join("/"), $[16] = id, $[17] = path, $[18] = t6, $[19] = t7;
|
|
7373
|
-
} else
|
|
7374
|
-
t6 = $[18], t7 = $[19];
|
|
7375
|
-
let t8;
|
|
7376
|
-
$[20] !== t6 || $[21] !== t7 ? (t8 = [t6, t7], $[20] = t6, $[21] = t7, $[22] = t8) : t8 = $[22], t5 = t8;
|
|
7377
|
-
const [itemPath, itemKey] = t5, itemState = tree.state[itemKey], focused = tree.focusedElement === rootElement, expanded = itemState?.expanded === void 0 ? expandedProp : itemState?.expanded || !1, tabIndex = tree.focusedElement && tree.focusedElement === rootElement ? 0 : -1;
|
|
7378
|
-
let t9;
|
|
7379
|
-
const t10 = tree.level + 1;
|
|
7380
|
-
let t11;
|
|
7381
|
-
$[23] !== tree || $[24] !== t10 || $[25] !== itemPath ? (t11 = {
|
|
7025
|
+
} = tree, _id = react.useId(), id = idProp || _id, itemPath = react.useMemo(() => path.concat([id || ""]), [id, path]), itemKey = itemPath.join("/"), itemState = tree.state[itemKey], focused = tree.focusedElement === rootRef.current, expanded = itemState?.expanded === void 0 ? expandedProp : itemState?.expanded || !1, tabIndex = tree.focusedElement && tree.focusedElement === rootRef.current ? 0 : -1, contextValue = react.useMemo(() => ({
|
|
7382
7026
|
...tree,
|
|
7383
|
-
level:
|
|
7027
|
+
level: tree.level + 1,
|
|
7384
7028
|
path: itemPath
|
|
7385
|
-
},
|
|
7386
|
-
const contextValue = t9;
|
|
7387
|
-
let t12;
|
|
7388
|
-
$[27] !== onClick || $[28] !== setExpanded || $[29] !== itemKey || $[30] !== expanded || $[31] !== setFocusedElement || $[32] !== rootElement ? (t12 = (event) => {
|
|
7029
|
+
}), [itemPath, tree]), handleClick = react.useCallback((event) => {
|
|
7389
7030
|
onClick && onClick(event);
|
|
7390
7031
|
const target = event.target;
|
|
7391
|
-
target instanceof HTMLElement && (target.getAttribute("data-ui") === "TreeItem" || target.closest('[data-ui="TreeItem__box"]')) && (event.stopPropagation(), setExpanded(itemKey, !expanded), setFocusedElement(
|
|
7392
|
-
},
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
|
|
7407
|
-
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
t18,
|
|
7419
|
-
t19
|
|
7420
|
-
] }), $[57] = space, $[58] = t17, $[59] = t18, $[60] = t19, $[61] = t20) : t20 = $[61];
|
|
7421
|
-
let t21;
|
|
7422
|
-
$[62] !== muted || $[63] !== fontSize2 || $[64] !== weight || $[65] !== text ? (t21 = /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { muted, size: fontSize2, textOverflow: "ellipsis", weight, children: text }) }), $[62] = muted, $[63] = fontSize2, $[64] = weight, $[65] = text, $[66] = t21) : t21 = $[66];
|
|
7423
|
-
let t22;
|
|
7424
|
-
$[67] !== padding || $[68] !== t20 || $[69] !== t21 ? (t22 = /* @__PURE__ */ jsxRuntime.jsxs(Flex, { padding, children: [
|
|
7425
|
-
t20,
|
|
7426
|
-
t21
|
|
7427
|
-
] }), $[67] = padding, $[68] = t20, $[69] = t21, $[70] = t22) : t22 = $[70];
|
|
7428
|
-
const content = t22;
|
|
7429
|
-
if (href) {
|
|
7430
|
-
const t232 = selected ? "" : void 0;
|
|
7431
|
-
let t242;
|
|
7432
|
-
$[71] !== tree.level || $[72] !== expanded || $[73] !== linkAs || $[74] !== href || $[75] !== tabIndex || $[76] !== content ? (t242 = /* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, "aria-expanded": expanded, as: linkAs, "data-ui": "TreeItem__box", href, ref: treeitemRef, role: "treeitem", tabIndex, children: content }), $[71] = tree.level, $[72] = expanded, $[73] = linkAs, $[74] = href, $[75] = tabIndex, $[76] = content, $[77] = t242) : t242 = $[77];
|
|
7433
|
-
let t252;
|
|
7434
|
-
$[78] !== children || $[79] !== expanded ? (t252 = children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { hidden: !expanded, children }), $[78] = children, $[79] = expanded, $[80] = t252) : t252 = $[80];
|
|
7435
|
-
let t262;
|
|
7436
|
-
$[81] !== contextValue || $[82] !== t252 ? (t262 = /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: t252 }), $[81] = contextValue, $[82] = t252, $[83] = t262) : t262 = $[83];
|
|
7437
|
-
let t272;
|
|
7438
|
-
return $[84] !== t232 || $[85] !== id || $[86] !== itemKey || $[87] !== restProps || $[88] !== handleClick || $[89] !== t242 || $[90] !== t262 ? (t272 = /* @__PURE__ */ jsxRuntime.jsxs(Root, { "data-selected": t232, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem", ...restProps, onClick: handleClick, ref: setRootElement, role: "none", children: [
|
|
7439
|
-
t242,
|
|
7440
|
-
t262
|
|
7441
|
-
] }), $[84] = t232, $[85] = id, $[86] = itemKey, $[87] = restProps, $[88] = handleClick, $[89] = t242, $[90] = t262, $[91] = t272) : t272 = $[91], t272;
|
|
7442
|
-
}
|
|
7443
|
-
const t23 = selected ? "" : void 0;
|
|
7444
|
-
let t24;
|
|
7445
|
-
$[92] !== tree.level || $[93] !== content ? (t24 = /* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, as: "div", "data-ui": "TreeItem__box", children: content }), $[92] = tree.level, $[93] = content, $[94] = t24) : t24 = $[94];
|
|
7446
|
-
let t25;
|
|
7447
|
-
$[95] !== children || $[96] !== expanded ? (t25 = children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { expanded, children }), $[95] = children, $[96] = expanded, $[97] = t25) : t25 = $[97];
|
|
7448
|
-
let t26;
|
|
7449
|
-
$[98] !== contextValue || $[99] !== t25 ? (t26 = /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: t25 }), $[98] = contextValue, $[99] = t25, $[100] = t26) : t26 = $[100];
|
|
7450
|
-
let t27;
|
|
7451
|
-
return $[101] !== t23 || $[102] !== id || $[103] !== itemKey || $[104] !== restProps || $[105] !== expanded || $[106] !== handleClick || $[107] !== handleKeyDown || $[108] !== tabIndex || $[109] !== t24 || $[110] !== t26 ? (t27 = /* @__PURE__ */ jsxRuntime.jsxs(Root, { "data-selected": t23, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey, ...restProps, "aria-expanded": expanded, onClick: handleClick, onKeyDown: handleKeyDown, ref: setRootElement, role: "treeitem", tabIndex, children: [
|
|
7452
|
-
t24,
|
|
7453
|
-
t26
|
|
7454
|
-
] }), $[101] = t23, $[102] = id, $[103] = itemKey, $[104] = restProps, $[105] = expanded, $[106] = handleClick, $[107] = handleKeyDown, $[108] = tabIndex, $[109] = t24, $[110] = t26, $[111] = t27) : t27 = $[111], t27;
|
|
7032
|
+
target instanceof HTMLElement && (target.getAttribute("data-ui") === "TreeItem" || target.closest('[data-ui="TreeItem__box"]')) && (event.stopPropagation(), setExpanded(itemKey, !expanded), setFocusedElement(rootRef.current));
|
|
7033
|
+
}, [expanded, itemKey, onClick, setExpanded, setFocusedElement]), handleKeyDown = react.useCallback((event_0) => {
|
|
7034
|
+
focused && event_0.key === "Enter" && (treeitemRef.current || rootRef.current)?.click();
|
|
7035
|
+
}, [focused]);
|
|
7036
|
+
react.useEffect(() => {
|
|
7037
|
+
if (rootRef.current)
|
|
7038
|
+
return registerItem(rootRef.current, itemPath.join("/"), expanded, selected);
|
|
7039
|
+
}, [expanded, itemPath, registerItem, selected]);
|
|
7040
|
+
const content = /* @__PURE__ */ jsxRuntime.jsxs(Flex, { padding, children: [
|
|
7041
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { marginRight: space, style: {
|
|
7042
|
+
visibility: IconComponent || children ? "visible" : "hidden",
|
|
7043
|
+
pointerEvents: "none"
|
|
7044
|
+
}, children: [
|
|
7045
|
+
IconComponent && /* @__PURE__ */ jsxRuntime.jsx(Text, { muted, size: fontSize2, weight, children: /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {}) }),
|
|
7046
|
+
!IconComponent && /* @__PURE__ */ jsxRuntime.jsx(ToggleArrowText, { muted, size: fontSize2, weight, children: /* @__PURE__ */ jsxRuntime.jsx(icons.ToggleArrowRightIcon, { style: {
|
|
7047
|
+
transform: expanded ? "rotate(90deg)" : void 0
|
|
7048
|
+
} }) })
|
|
7049
|
+
] }),
|
|
7050
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { muted, size: fontSize2, textOverflow: "ellipsis", weight, children: text }) })
|
|
7051
|
+
] });
|
|
7052
|
+
return href ? /* @__PURE__ */ jsxRuntime.jsxs(Root, { "data-selected": selected ? "" : void 0, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem", ...restProps, onClick: handleClick, ref: rootRef, role: "none", children: [
|
|
7053
|
+
/* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, "aria-expanded": expanded, as: linkAs, "data-ui": "TreeItem__box", href, ref: treeitemRef, role: "treeitem", tabIndex, children: content }),
|
|
7054
|
+
/* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { hidden: !expanded, children }) })
|
|
7055
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(Root, { "data-selected": selected ? "" : void 0, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey, ...restProps, "aria-expanded": expanded, onClick: handleClick, onKeyDown: handleKeyDown, ref: rootRef, role: "treeitem", tabIndex, children: [
|
|
7056
|
+
/* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, as: "div", "data-ui": "TreeItem__box", children: content }),
|
|
7057
|
+
/* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { expanded, children }) })
|
|
7058
|
+
] });
|
|
7455
7059
|
});
|
|
7456
7060
|
TreeItem.displayName = "Memo(TreeItem)";
|
|
7457
7061
|
exports.Arrow = Arrow;
|