@sanity/ui 4.0.0-static.32 → 4.0.0-static.34
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/index.d.ts +0 -14
- package/dist/index.js +229 -198
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/core/components/dialog/Dialog.tsx +13 -5
- package/src/core/components/dialog/DialogProvider.tsx +1 -1
- package/src/core/components/menu/Menu.test.tsx +6 -6
- package/src/core/components/menu/Menu.tsx +2 -2
- package/src/core/components/toast/Toast.test.tsx +6 -6
- package/src/core/components/toast/ToastProvider.tsx +2 -2
- package/src/core/components/tree/Tree.tsx +2 -2
- package/src/core/components/tree/TreeItem.tsx +4 -4
- package/src/core/helpers/props.ts +0 -9
- package/src/core/hooks/useResponsiveProp.ts +4 -17
- package/src/core/index.ts +0 -1
- package/src/core/lib/createGlobalScopedContext.ts +3 -1
- package/src/core/primitives/avatar/Avatar.tsx +2 -2
- package/src/core/primitives/card/CardProvider.tsx +2 -11
- package/src/core/primitives/layer/Layer.test.tsx +6 -6
- package/src/core/primitives/layer/LayerProvider.tsx +3 -3
- package/src/core/primitives/popover/Popover.tsx +2 -2
- package/src/core/primitives/textInput/TextInput.tsx +73 -53
- package/src/core/primitives/tooltip/tooltipDelayGroup/TooltipDelayGroupProvider.tsx +1 -3
- package/src/core/utils/boundaryElement/BoundaryElement.test.tsx +6 -6
- package/src/core/utils/boundaryElement/BoundaryElementProvider.tsx +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { SpinnerIcon, CloseIcon, ChevronDownIcon, ChevronRightIcon, ToggleArrowRightIcon, CheckmarkIcon, RemoveIcon } from "@sanity/icons";
|
|
4
|
-
import {
|
|
4
|
+
import { isValidElement, useDebugValue, useSyncExternalStore, createContext, use, useRef, useImperativeHandle, useEffect, useState, cloneElement, useReducer, Children, Fragment as Fragment$1, startTransition, useId, lazy, Suspense, useLayoutEffect, Component } from "react";
|
|
5
5
|
import { box, text, textOverflow, animatedSpinnerIcon, spinner, button, buttonLoadingBox, _arrow, vars, _arrowSvg, _arrowStrokeMask, _arrowStroke, _arrowShape, card, BREAKPOINTS, popoverCard, popover, _selectable, stack, textInput, textInputPrefix, textInputElement, _inputElement, _inputPresentation, textInputSuffix, breadcrumbs, container as container$1, dialogCard, dialogHeader, dialogContent, dialogScrollerShadowTop, dialogScroller, dialogScrollerShadowBottom, dialogFooter, dialog, dialogContainer, kbd, menu, menuDivider, toast, toastLayer, treeItem, label, avatar, avatarArrow, avatarInitials, avatarImage, avatarImageOutline, avatarCounter, avatarStack, badge, checkbox, checkboxInput, checkboxPresentation, code, heading, radio, radioInput, radioPresentation, select, selectPresentation, skeleton, codeSkeleton, headingSkeleton, labelSkeleton, textSkeleton, srOnly, _switch, _switchElement, _switchPresentation, _switchTrack, _switchThumb, textArea, tooltip, root } from "@sanity/ui/css";
|
|
6
6
|
import { isValidElementType } from "react-is";
|
|
7
7
|
import { detectOverflow, useFloating, autoPlacement, flip, offset, shift, arrow, hide, autoUpdate } from "@floating-ui/react-dom";
|
|
@@ -119,18 +119,13 @@ function isArray(val) {
|
|
|
119
119
|
function isRecord(value) {
|
|
120
120
|
return !!(value && typeof value == "object" && !Array.isArray(value));
|
|
121
121
|
}
|
|
122
|
-
function _getArrayProp(val, defaultVal) {
|
|
123
|
-
return val === void 0 ? defaultVal || EMPTY_ARRAY : Array.isArray(val) ? val : [val];
|
|
124
|
-
}
|
|
125
122
|
function _getResponsiveProp(val, defaultVal) {
|
|
126
123
|
return val === void 0 ? defaultVal || EMPTY_ARRAY : isArray(val) || isRecord(val) ? val : [val];
|
|
127
124
|
}
|
|
128
125
|
function useResponsiveProp(val, defaultVal) {
|
|
129
126
|
const $ = c(3);
|
|
130
127
|
let t0;
|
|
131
|
-
$[0] !== defaultVal || $[1] !== val ? (t0 =
|
|
132
|
-
const [t1, setCache] = useState(t0), [cachedVal, cachedHash] = t1, hash = JSON.stringify(val ?? defaultVal);
|
|
133
|
-
return hash !== cachedHash && setCache([_getResponsiveProp(val, defaultVal), hash]), cachedVal;
|
|
128
|
+
return $[0] !== defaultVal || $[1] !== val ? (t0 = _getResponsiveProp(val, defaultVal), $[0] = defaultVal, $[1] = val, $[2] = t0) : t0 = $[2], t0;
|
|
134
129
|
}
|
|
135
130
|
const DEFAULT_BOX_ELEMENT = "div";
|
|
136
131
|
function Box(props) {
|
|
@@ -485,8 +480,10 @@ function getGlobalScope() {
|
|
|
485
480
|
const globalScope = getGlobalScope();
|
|
486
481
|
function createGlobalScopedContext(key2, defaultValue) {
|
|
487
482
|
const symbol = Symbol.for(key2);
|
|
488
|
-
if (typeof document > "u")
|
|
489
|
-
|
|
483
|
+
if (typeof document > "u") {
|
|
484
|
+
const context = createContext(defaultValue);
|
|
485
|
+
return context.displayName = key2, context;
|
|
486
|
+
}
|
|
490
487
|
const symbolMap = globalScope;
|
|
491
488
|
return symbolMap[symbol] = symbolMap[symbol] || createContext(defaultValue), symbolMap[symbol];
|
|
492
489
|
}
|
|
@@ -518,9 +515,8 @@ function CardProvider(props) {
|
|
|
518
515
|
scheme,
|
|
519
516
|
unstable_CompatProvider
|
|
520
517
|
}, $[0] = scheme, $[1] = tone, $[2] = unstable_CompatProvider, $[3] = t0) : t0 = $[3];
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
return $[4] !== children || $[5] !== t1 ? (t2 = /* @__PURE__ */ jsx(CardContext.Provider, { value: t1, children }), $[4] = children, $[5] = t1, $[6] = t2) : t2 = $[6], t2;
|
|
518
|
+
let t1;
|
|
519
|
+
return $[4] !== children || $[5] !== t0 ? (t1 = /* @__PURE__ */ jsx(CardContext, { value: t0, children }), $[4] = children, $[5] = t0, $[6] = t1) : t1 = $[6], t1;
|
|
524
520
|
}
|
|
525
521
|
function useCard() {
|
|
526
522
|
const card2 = use(CardContext);
|
|
@@ -889,18 +885,21 @@ function useMediaIndex() {
|
|
|
889
885
|
return useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot);
|
|
890
886
|
}
|
|
891
887
|
function LayerProvider(props) {
|
|
892
|
-
const $ = c(
|
|
888
|
+
const $ = c(21), {
|
|
893
889
|
children,
|
|
894
890
|
zOffset: t0
|
|
895
891
|
} = props, zOffsetProp = t0 === void 0 ? 0 : t0, parentContextValue = use(LayerContext);
|
|
896
892
|
let t1;
|
|
897
893
|
$[0] !== parentContextValue ? (t1 = parentContextValue && getLayerContext(parentContextValue), $[0] = parentContextValue, $[1] = t1) : t1 = $[1];
|
|
898
|
-
const parent = t1, parentRegisterChild = parent?.registerChild, level = (parent?.level ?? 0) + 1
|
|
894
|
+
const parent = t1, parentRegisterChild = parent?.registerChild, level = (parent?.level ?? 0) + 1;
|
|
899
895
|
let t2;
|
|
900
|
-
$[2]
|
|
901
|
-
const
|
|
896
|
+
$[2] !== zOffsetProp ? (t2 = _getResponsiveProp(zOffsetProp), $[2] = zOffsetProp, $[3] = t2) : t2 = $[3];
|
|
897
|
+
const zOffset = t2, maxMediaIndex = Object.values(zOffset).length - 1, mediaIndex = Math.min(useMediaIndex(), maxMediaIndex), zIndex = parent ? parent.zIndex + (zOffset[mediaIndex] ?? 0) : zOffset[mediaIndex] ?? 0;
|
|
902
898
|
let t3;
|
|
903
|
-
$[
|
|
899
|
+
$[4] === Symbol.for("react.memo_cache_sentinel") ? (t3 = {}, $[4] = t3) : t3 = $[4];
|
|
900
|
+
const [, setChildLayers] = useState(t3), [size2, setSize] = useState(0), isTopLayer = size2 === 0;
|
|
901
|
+
let t4;
|
|
902
|
+
$[5] !== parentRegisterChild || $[6] !== setChildLayers ? (t4 = (childLevel) => {
|
|
904
903
|
const parentDispose = parentRegisterChild?.(childLevel);
|
|
905
904
|
return childLevel !== void 0 ? setChildLayers((state) => {
|
|
906
905
|
const prevLen = state[childLevel] ?? 0, nextState = {
|
|
@@ -916,22 +915,22 @@ function LayerProvider(props) {
|
|
|
916
915
|
return nextState_0[childLevel] === 1 ? (delete nextState_0[childLevel], setSize(Object.keys(nextState_0).length)) : nextState_0[childLevel] = nextState_0[childLevel] - 1, nextState_0;
|
|
917
916
|
}) : setSize(_temp2$3), parentDispose?.();
|
|
918
917
|
};
|
|
919
|
-
}, $[
|
|
920
|
-
const registerChild =
|
|
921
|
-
let
|
|
922
|
-
$[
|
|
923
|
-
let
|
|
924
|
-
$[
|
|
918
|
+
}, $[5] = parentRegisterChild, $[6] = setChildLayers, $[7] = t4) : t4 = $[7];
|
|
919
|
+
const registerChild = t4;
|
|
920
|
+
let t5, t6;
|
|
921
|
+
$[8] !== level || $[9] !== parentRegisterChild ? (t5 = () => parentRegisterChild?.(level), t6 = [level, parentRegisterChild], $[8] = level, $[9] = parentRegisterChild, $[10] = t5, $[11] = t6) : (t5 = $[10], t6 = $[11]), useEffect(t5, t6);
|
|
922
|
+
let t7;
|
|
923
|
+
$[12] !== isTopLayer || $[13] !== level || $[14] !== registerChild || $[15] !== size2 || $[16] !== zIndex ? (t7 = {
|
|
925
924
|
version: 0,
|
|
926
925
|
isTopLayer,
|
|
927
926
|
level,
|
|
928
927
|
registerChild,
|
|
929
928
|
size: size2,
|
|
930
929
|
zIndex
|
|
931
|
-
}, $[
|
|
932
|
-
const value =
|
|
933
|
-
let
|
|
934
|
-
return $[
|
|
930
|
+
}, $[12] = isTopLayer, $[13] = level, $[14] = registerChild, $[15] = size2, $[16] = zIndex, $[17] = t7) : t7 = $[17];
|
|
931
|
+
const value = t7;
|
|
932
|
+
let t8;
|
|
933
|
+
return $[18] !== children || $[19] !== value ? (t8 = /* @__PURE__ */ jsx(LayerContext, { value, children }), $[18] = children, $[19] = value, $[20] = t8) : t8 = $[20], t8;
|
|
935
934
|
}
|
|
936
935
|
function _temp2$3(v_0) {
|
|
937
936
|
return v_0 - 1;
|
|
@@ -1037,7 +1036,7 @@ function ViewportOverlay() {
|
|
|
1037
1036
|
} }), $[0] = zIndex, $[1] = t0) : t0 = $[1], t0;
|
|
1038
1037
|
}
|
|
1039
1038
|
function Popover(props) {
|
|
1040
|
-
const $ = c(
|
|
1039
|
+
const $ = c(113), boundaryElementContext = useBoundaryElement(), t0 = props;
|
|
1041
1040
|
let _fallbackPlacements, _floatingBoundary, _referenceBoundary, childProp, className, content2, disabled, forwardedRef, matchReferenceWidth, modal, open, padding, portal, referenceElement, rest, scheme, t1, t10, t11, t12, t13, t14, t2, t3, t4, t5, t6, t7, t8, t9, updateRef;
|
|
1042
1041
|
if ($[0] !== t0) {
|
|
1043
1042
|
const {
|
|
@@ -1059,7 +1058,7 @@ function Popover(props) {
|
|
|
1059
1058
|
overflow: t292,
|
|
1060
1059
|
padding: t302,
|
|
1061
1060
|
placement: t312,
|
|
1062
|
-
placementStrategy:
|
|
1061
|
+
placementStrategy: t322,
|
|
1063
1062
|
portal: t33,
|
|
1064
1063
|
preventOverflow: t34,
|
|
1065
1064
|
radius: t35,
|
|
@@ -1074,15 +1073,18 @@ function Popover(props) {
|
|
|
1074
1073
|
updateRef: t44,
|
|
1075
1074
|
...t45
|
|
1076
1075
|
} = t0;
|
|
1077
|
-
t1 = t152, t2 = t162, t3 = t172, t4 = t182, childProp = t192, className = t202, t5 = t212, content2 = t222, disabled = t232, _fallbackPlacements = t242, matchReferenceWidth = t252, _floatingBoundary = t262, modal = t272, open = t282, t6 = t292, padding = t302, t7 = t312, t8 =
|
|
1076
|
+
t1 = t152, t2 = t162, t3 = t172, t4 = t182, childProp = t192, className = t202, t5 = t212, content2 = t222, disabled = t232, _fallbackPlacements = t242, matchReferenceWidth = t252, _floatingBoundary = t262, modal = t272, open = t282, t6 = t292, padding = t302, t7 = t312, t8 = t322, portal = t33, t9 = t34, t10 = t35, forwardedRef = t36, _referenceBoundary = t37, referenceElement = t38, scheme = t39, t11 = t40, t12 = t41, t13 = t42, t14 = t43, updateRef = t44, rest = t45, $[0] = t0, $[1] = _fallbackPlacements, $[2] = _floatingBoundary, $[3] = _referenceBoundary, $[4] = childProp, $[5] = className, $[6] = content2, $[7] = disabled, $[8] = forwardedRef, $[9] = matchReferenceWidth, $[10] = modal, $[11] = open, $[12] = padding, $[13] = portal, $[14] = referenceElement, $[15] = rest, $[16] = scheme, $[17] = t1, $[18] = t10, $[19] = t11, $[20] = t12, $[21] = t13, $[22] = t14, $[23] = t2, $[24] = t3, $[25] = t4, $[26] = t5, $[27] = t6, $[28] = t7, $[29] = t8, $[30] = t9, $[31] = updateRef;
|
|
1078
1077
|
} else
|
|
1079
1078
|
_fallbackPlacements = $[1], _floatingBoundary = $[2], _referenceBoundary = $[3], childProp = $[4], className = $[5], content2 = $[6], disabled = $[7], forwardedRef = $[8], matchReferenceWidth = $[9], modal = $[10], open = $[11], padding = $[12], portal = $[13], referenceElement = $[14], rest = $[15], scheme = $[16], t1 = $[17], t10 = $[18], t11 = $[19], t12 = $[20], t13 = $[21], t14 = $[22], t2 = $[23], t3 = $[24], t4 = $[25], t5 = $[26], t6 = $[27], t7 = $[28], t8 = $[29], t9 = $[30], updateRef = $[31];
|
|
1080
|
-
const margins = t1 === void 0 ? DEFAULT_POPOVER_MARGINS : t1, _animate = t2 === void 0 ? !1 : t2, arrowProp = t3 === void 0 ? !1 : t3, as = t4 === void 0 ? DEFAULT_POPOVER_ELEMENT : t4, constrainSize = t5 === void 0 ? !1 : t5, overflow = t6 === void 0 ? "hidden" : t6, placementProp = t7 === void 0 ? "bottom" : t7, placementStrategy = t8 === void 0 ? "flip" : t8, preventOverflow = t9 === void 0 ? !0 : t9, radius = t10 === void 0 ? 3 : t10, shadow = t11 === void 0 ? 3 : t11, tone = t12 === void 0 ? "inherit" : t12, widthProp = t13 === void 0 ? "auto" : t13, zOffsetProp = t14 === void 0 ? Z_OFFSETS.popover : t14, fallbackPlacements = _fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? "bottom"], floatingBoundary = _floatingBoundary ?? boundaryElementContext.element, referenceBoundary = _referenceBoundary ?? boundaryElementContext.element, card2 = useCard(), animate = usePrefersReducedMotion() ? !1 : _animate
|
|
1079
|
+
const margins = t1 === void 0 ? DEFAULT_POPOVER_MARGINS : t1, _animate = t2 === void 0 ? !1 : t2, arrowProp = t3 === void 0 ? !1 : t3, as = t4 === void 0 ? DEFAULT_POPOVER_ELEMENT : t4, constrainSize = t5 === void 0 ? !1 : t5, overflow = t6 === void 0 ? "hidden" : t6, placementProp = t7 === void 0 ? "bottom" : t7, placementStrategy = t8 === void 0 ? "flip" : t8, preventOverflow = t9 === void 0 ? !0 : t9, radius = t10 === void 0 ? 3 : t10, shadow = t11 === void 0 ? 3 : t11, tone = t12 === void 0 ? "inherit" : t12, widthProp = t13 === void 0 ? "auto" : t13, zOffsetProp = t14 === void 0 ? Z_OFFSETS.popover : t14, fallbackPlacements = _fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? "bottom"], floatingBoundary = _floatingBoundary ?? boundaryElementContext.element, referenceBoundary = _referenceBoundary ?? boundaryElementContext.element, card2 = useCard(), animate = usePrefersReducedMotion() ? !1 : _animate;
|
|
1081
1080
|
let t15;
|
|
1082
|
-
$[32]
|
|
1083
|
-
const
|
|
1081
|
+
$[32] !== zOffsetProp ? (t15 = _getResponsiveProp(zOffsetProp), $[32] = zOffsetProp, $[33] = t15) : t15 = $[33];
|
|
1082
|
+
const zOffset = t15, ref = useRef(null), arrowRef = useRef(null);
|
|
1084
1083
|
let t16;
|
|
1085
|
-
$[
|
|
1084
|
+
$[34] === Symbol.for("react.memo_cache_sentinel") ? (t16 = () => ref.current, $[34] = t16) : t16 = $[34], useImperativeHandle(forwardedRef, t16);
|
|
1085
|
+
const referenceWidthRef = useRef(void 0);
|
|
1086
|
+
let t17;
|
|
1087
|
+
$[35] !== animate || $[36] !== arrowProp || $[37] !== constrainSize || $[38] !== fallbackPlacements || $[39] !== floatingBoundary || $[40] !== margins || $[41] !== matchReferenceWidth || $[42] !== placementProp || $[43] !== placementStrategy || $[44] !== preventOverflow || $[45] !== referenceBoundary ? (t17 = {
|
|
1086
1088
|
animate,
|
|
1087
1089
|
arrowProp,
|
|
1088
1090
|
arrowRef,
|
|
@@ -1097,19 +1099,19 @@ function Popover(props) {
|
|
|
1097
1099
|
referenceBoundary,
|
|
1098
1100
|
referenceWidthRef,
|
|
1099
1101
|
rootBoundary: "viewport"
|
|
1100
|
-
}, $[
|
|
1101
|
-
const middleware = useMiddleware$1(
|
|
1102
|
-
let t17;
|
|
1103
|
-
$[45] !== referenceElement ? (t17 = referenceElement ? {
|
|
1104
|
-
reference: referenceElement
|
|
1105
|
-
} : void 0, $[45] = referenceElement, $[46] = t17) : t17 = $[46];
|
|
1102
|
+
}, $[35] = animate, $[36] = arrowProp, $[37] = constrainSize, $[38] = fallbackPlacements, $[39] = floatingBoundary, $[40] = margins, $[41] = matchReferenceWidth, $[42] = placementProp, $[43] = placementStrategy, $[44] = preventOverflow, $[45] = referenceBoundary, $[46] = t17) : t17 = $[46];
|
|
1103
|
+
const middleware = useMiddleware$1(t17);
|
|
1106
1104
|
let t18;
|
|
1107
|
-
$[47] !==
|
|
1105
|
+
$[47] !== referenceElement ? (t18 = referenceElement ? {
|
|
1106
|
+
reference: referenceElement
|
|
1107
|
+
} : void 0, $[47] = referenceElement, $[48] = t18) : t18 = $[48];
|
|
1108
|
+
let t19;
|
|
1109
|
+
$[49] !== middleware || $[50] !== placementProp || $[51] !== t18 ? (t19 = {
|
|
1108
1110
|
middleware,
|
|
1109
1111
|
placement: placementProp,
|
|
1110
1112
|
whileElementsMounted: autoUpdate,
|
|
1111
|
-
elements:
|
|
1112
|
-
}, $[
|
|
1113
|
+
elements: t18
|
|
1114
|
+
}, $[49] = middleware, $[50] = placementProp, $[51] = t18, $[52] = t19) : t19 = $[52];
|
|
1113
1115
|
const {
|
|
1114
1116
|
x,
|
|
1115
1117
|
y,
|
|
@@ -1118,61 +1120,61 @@ function Popover(props) {
|
|
|
1118
1120
|
refs,
|
|
1119
1121
|
strategy,
|
|
1120
1122
|
update
|
|
1121
|
-
} = useFloating(
|
|
1122
|
-
let t19;
|
|
1123
|
-
$[51] !== refs ? (t19 = (node) => {
|
|
1124
|
-
ref.current = node, refs.setFloating(node);
|
|
1125
|
-
}, $[51] = refs, $[52] = t19) : t19 = $[52];
|
|
1126
|
-
const setFloating = t19;
|
|
1123
|
+
} = useFloating(t19), referenceHidden = middlewareData.hide?.referenceHidden, arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY;
|
|
1127
1124
|
let t20;
|
|
1128
|
-
$[53] !==
|
|
1125
|
+
$[53] !== refs ? (t20 = (node) => {
|
|
1126
|
+
ref.current = node, refs.setFloating(node);
|
|
1127
|
+
}, $[53] = refs, $[54] = t20) : t20 = $[54];
|
|
1128
|
+
const setFloating = t20;
|
|
1129
1129
|
let t21;
|
|
1130
|
-
$[55] !==
|
|
1130
|
+
$[55] !== childProp ? (t21 = childProp ? getElementRef(childProp) : null, $[55] = childProp, $[56] = t21) : t21 = $[56];
|
|
1131
1131
|
let t22;
|
|
1132
|
+
$[57] !== refs.reference.current ? (t22 = () => refs.reference.current, $[57] = refs.reference.current, $[58] = t22) : t22 = $[58], useImperativeHandle(t21, t22);
|
|
1133
|
+
let t23;
|
|
1132
1134
|
bb0: {
|
|
1133
1135
|
if (referenceElement) {
|
|
1134
|
-
|
|
1136
|
+
t23 = childProp;
|
|
1135
1137
|
break bb0;
|
|
1136
1138
|
}
|
|
1137
1139
|
if (!childProp) {
|
|
1138
|
-
|
|
1140
|
+
t23 = null;
|
|
1139
1141
|
break bb0;
|
|
1140
1142
|
}
|
|
1141
|
-
let
|
|
1142
|
-
$[
|
|
1143
|
+
let t242;
|
|
1144
|
+
$[59] !== childProp || $[60] !== refs.setReference ? (t242 = cloneElement(childProp, {
|
|
1143
1145
|
ref: refs.setReference
|
|
1144
|
-
}), $[
|
|
1146
|
+
}), $[59] = childProp, $[60] = refs.setReference, $[61] = t242) : t242 = $[61], t23 = t242;
|
|
1145
1147
|
}
|
|
1146
|
-
const child =
|
|
1147
|
-
let
|
|
1148
|
-
if ($[
|
|
1149
|
-
let
|
|
1150
|
-
return $[
|
|
1148
|
+
const child = t23;
|
|
1149
|
+
let t24, t25;
|
|
1150
|
+
if ($[62] !== update ? (t24 = () => update, t25 = [update], $[62] = update, $[63] = t24, $[64] = t25) : (t24 = $[63], t25 = $[64]), useImperativeHandle(updateRef, t24, t25), disabled) {
|
|
1151
|
+
let t262;
|
|
1152
|
+
return $[65] !== childProp ? (t262 = childProp || /* @__PURE__ */ jsx(Fragment, {}), $[65] = childProp, $[66] = t262) : t262 = $[66], t262;
|
|
1151
1153
|
}
|
|
1152
|
-
let t25;
|
|
1153
|
-
$[65] !== modal ? (t25 = modal && /* @__PURE__ */ jsx(ViewportOverlay, {}), $[65] = modal, $[66] = t25) : t25 = $[66];
|
|
1154
1154
|
let t26;
|
|
1155
|
-
$[67] !==
|
|
1156
|
-
className
|
|
1157
|
-
}), $[67] = className, $[68] = t26) : t26 = $[68];
|
|
1155
|
+
$[67] !== modal ? (t26 = modal && /* @__PURE__ */ jsx(ViewportOverlay, {}), $[67] = modal, $[68] = t26) : t26 = $[68];
|
|
1158
1156
|
let t27;
|
|
1159
|
-
$[69] !==
|
|
1157
|
+
$[69] !== className ? (t27 = popover({
|
|
1158
|
+
className
|
|
1159
|
+
}), $[69] = className, $[70] = t27) : t27 = $[70];
|
|
1160
1160
|
let t28;
|
|
1161
|
-
$[
|
|
1162
|
-
t25,
|
|
1163
|
-
t27
|
|
1164
|
-
] }), $[95] = t25, $[96] = t27, $[97] = t28) : t28 = $[97];
|
|
1165
|
-
const node_0 = t28;
|
|
1161
|
+
$[71] !== animate || $[72] !== arrowProp || $[73] !== arrowX || $[74] !== arrowY || $[75] !== as || $[76] !== content2 || $[77] !== margins || $[78] !== originX || $[79] !== originY || $[80] !== overflow || $[81] !== padding || $[82] !== placement || $[83] !== radius || $[84] !== referenceHidden || $[85] !== rest || $[86] !== scheme || $[87] !== setFloating || $[88] !== shadow || $[89] !== strategy || $[90] !== t27 || $[91] !== tone || $[92] !== widthProp || $[93] !== x || $[94] !== y || $[95] !== zOffset ? (t28 = /* @__PURE__ */ jsx(PopoverLayer, { ...rest, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef, arrowX, arrowY, as, className: t27, hidden: referenceHidden, maxWidth: widthProp, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, tone, strategy, x, y, zOffset, children: content2 }), $[71] = animate, $[72] = arrowProp, $[73] = arrowX, $[74] = arrowY, $[75] = as, $[76] = content2, $[77] = margins, $[78] = originX, $[79] = originY, $[80] = overflow, $[81] = padding, $[82] = placement, $[83] = radius, $[84] = referenceHidden, $[85] = rest, $[86] = scheme, $[87] = setFloating, $[88] = shadow, $[89] = strategy, $[90] = t27, $[91] = tone, $[92] = widthProp, $[93] = x, $[94] = y, $[95] = zOffset, $[96] = t28) : t28 = $[96];
|
|
1166
1162
|
let t29;
|
|
1167
|
-
$[
|
|
1168
|
-
|
|
1163
|
+
$[97] !== t26 || $[98] !== t28 ? (t29 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1164
|
+
t26,
|
|
1165
|
+
t28
|
|
1166
|
+
] }), $[97] = t26, $[98] = t28, $[99] = t29) : t29 = $[99];
|
|
1167
|
+
const node_0 = t29;
|
|
1169
1168
|
let t30;
|
|
1170
|
-
$[
|
|
1169
|
+
$[100] !== card2 || $[101] !== node_0 || $[102] !== open || $[103] !== portal || $[104] !== scheme || $[105] !== tone ? (t30 = open && (portal ? /* @__PURE__ */ jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: /* @__PURE__ */ jsx(CardProvider, { tone: tone === "inherit" ? card2.tone : tone, scheme: scheme ?? "light", children: node_0 }) }) : node_0), $[100] = card2, $[101] = node_0, $[102] = open, $[103] = portal, $[104] = scheme, $[105] = tone, $[106] = t30) : t30 = $[106];
|
|
1170
|
+
const children = t30;
|
|
1171
1171
|
let t31;
|
|
1172
|
-
|
|
1173
|
-
|
|
1172
|
+
$[107] !== animate || $[108] !== children ? (t31 = animate ? /* @__PURE__ */ jsx(AnimatePresence, { children }) : children, $[107] = animate, $[108] = children, $[109] = t31) : t31 = $[109];
|
|
1173
|
+
let t32;
|
|
1174
|
+
return $[110] !== child || $[111] !== t31 ? (t32 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1175
|
+
t31,
|
|
1174
1176
|
child
|
|
1175
|
-
] }), $[
|
|
1177
|
+
] }), $[110] = child, $[111] = t31, $[112] = t32) : t32 = $[112], t32;
|
|
1176
1178
|
}
|
|
1177
1179
|
function useMiddleware$1(t0) {
|
|
1178
1180
|
const $ = c(36), {
|
|
@@ -1302,7 +1304,7 @@ function useCustomValidity(ref, customValidity) {
|
|
|
1302
1304
|
}
|
|
1303
1305
|
const DEFAULT_TEXT_INPUT_ELEMENT = "input";
|
|
1304
1306
|
function TextInput(props) {
|
|
1305
|
-
const $ = c(
|
|
1307
|
+
const $ = c(86), t0 = props;
|
|
1306
1308
|
let IconComponent, IconRightComponent, __unstable_disableFocusRing, className, clearButton, customValidity, flex, forwardedRef, onClear, prefix, readOnly, rest, suffix, t1, t2, t3, t4, t5, t6, t7, t8, width;
|
|
1307
1309
|
if ($[0] !== t0) {
|
|
1308
1310
|
const {
|
|
@@ -1333,23 +1335,20 @@ function TextInput(props) {
|
|
|
1333
1335
|
__unstable_disableFocusRing = t92, t1 = t102, t2 = t112, className = t122, clearButton = t132, t3 = t142, flex = t152, t4 = t162, t5 = t172, IconComponent = t182, IconRightComponent = t192, onClear = t202, t6 = t212, prefix = t222, t7 = t232, readOnly = t242, forwardedRef = t252, suffix = t262, customValidity = t272, t8 = t282, width = t292, rest = t302, $[0] = t0, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = className, $[5] = clearButton, $[6] = customValidity, $[7] = flex, $[8] = forwardedRef, $[9] = onClear, $[10] = prefix, $[11] = readOnly, $[12] = rest, $[13] = suffix, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = t7, $[21] = t8, $[22] = width;
|
|
1334
1336
|
} else
|
|
1335
1337
|
IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], className = $[4], clearButton = $[5], customValidity = $[6], flex = $[7], forwardedRef = $[8], onClear = $[9], prefix = $[10], readOnly = $[11], rest = $[12], suffix = $[13], t1 = $[14], t2 = $[15], t3 = $[16], t4 = $[17], t5 = $[18], t6 = $[19], t7 = $[20], t8 = $[21], width = $[22];
|
|
1336
|
-
const Element2 = t1 === void 0 ? DEFAULT_TEXT_INPUT_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, disabled = t3 === void 0 ? !1 : t3, fontSize = t4 === void 0 ? 2 : t4, gap = t5 === void 0 ? 3 : t5, padding = t6 === void 0 ? 3 : t6, radius = t7 === void 0 ? 2 : t7, type = t8 === void 0 ? "text" : t8, ref = useRef(null)
|
|
1338
|
+
const Element2 = t1 === void 0 ? DEFAULT_TEXT_INPUT_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, disabled = t3 === void 0 ? !1 : t3, fontSize = t4 === void 0 ? 2 : t4, gap = t5 === void 0 ? 3 : t5, padding = t6 === void 0 ? 3 : t6, radius = t7 === void 0 ? 2 : t7, type = t8 === void 0 ? "text" : t8, ref = useRef(null);
|
|
1337
1339
|
let t9;
|
|
1338
|
-
$[23]
|
|
1339
|
-
const
|
|
1340
|
+
$[23] !== padding ? (t9 = _getResponsiveProp(padding), $[23] = padding, $[24] = t9) : t9 = $[24];
|
|
1341
|
+
const responsivePadding = t9, withClearButton = !!clearButton;
|
|
1340
1342
|
let t10;
|
|
1341
|
-
$[
|
|
1342
|
-
|
|
1343
|
-
}, $[24] = onClear, $[25] = t10) : t10 = $[25];
|
|
1344
|
-
const handleClearClick = t10;
|
|
1343
|
+
$[25] === Symbol.for("react.memo_cache_sentinel") ? (t10 = () => ref.current, $[25] = t10) : t10 = $[25], useImperativeHandle(forwardedRef, t10), useCustomValidity(ref, customValidity);
|
|
1344
|
+
const handleClearMouseDown = _temp$a;
|
|
1345
1345
|
let t11;
|
|
1346
|
-
$[26] !==
|
|
1347
|
-
|
|
1346
|
+
$[26] !== onClear ? (t11 = (event_0) => {
|
|
1347
|
+
event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
|
|
1348
|
+
}, $[26] = onClear, $[27] = t11) : t11 = $[27];
|
|
1349
|
+
const handleClearClick = t11;
|
|
1348
1350
|
let t12;
|
|
1349
|
-
$[28] !==
|
|
1350
|
-
const clearButtonPadding = t12, clearButtonProps = isRecord(clearButton) ? clearButton : EMPTY_RECORD;
|
|
1351
|
-
let t13;
|
|
1352
|
-
$[30] !== border || $[31] !== className || $[32] !== flex || $[33] !== fontSize || $[34] !== gap || $[35] !== padding || $[36] !== radius || $[37] !== width ? (t13 = textInput({
|
|
1351
|
+
$[28] !== border || $[29] !== className || $[30] !== flex || $[31] !== fontSize || $[32] !== gap || $[33] !== padding || $[34] !== radius || $[35] !== width ? (t12 = textInput({
|
|
1353
1352
|
className,
|
|
1354
1353
|
border,
|
|
1355
1354
|
flex,
|
|
@@ -1358,52 +1357,77 @@ function TextInput(props) {
|
|
|
1358
1357
|
radius,
|
|
1359
1358
|
gap,
|
|
1360
1359
|
width
|
|
1361
|
-
}), $[
|
|
1362
|
-
const
|
|
1360
|
+
}), $[28] = border, $[29] = className, $[30] = flex, $[31] = fontSize, $[32] = gap, $[33] = padding, $[34] = radius, $[35] = width, $[36] = t12) : t12 = $[36];
|
|
1361
|
+
const t13 = IconComponent ? "" : void 0, t14 = IconRightComponent ? "" : void 0, t15 = customValidity ? "" : void 0, t16 = prefix ? "" : void 0, t17 = !disabled && readOnly ? "" : void 0, t18 = suffix ? "" : void 0;
|
|
1362
|
+
let t19;
|
|
1363
|
+
$[37] !== prefix ? (t19 = prefix && /* @__PURE__ */ jsx("span", { className: textInputPrefix(), children: /* @__PURE__ */ jsx("span", { children: prefix }) }), $[37] = prefix, $[38] = t19) : t19 = $[38];
|
|
1363
1364
|
let t20;
|
|
1364
|
-
$[39]
|
|
1365
|
+
$[39] === Symbol.for("react.memo_cache_sentinel") ? (t20 = textInputElement(), $[39] = t20) : t20 = $[39];
|
|
1365
1366
|
let t21;
|
|
1366
|
-
$[
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1367
|
+
$[40] === Symbol.for("react.memo_cache_sentinel") ? (t21 = _inputElement(), $[40] = t21) : t21 = $[40];
|
|
1368
|
+
const t22 = __unstable_disableFocusRing ? "" : void 0;
|
|
1369
|
+
let t23;
|
|
1370
|
+
$[41] !== Element2 || $[42] !== disabled || $[43] !== readOnly || $[44] !== rest || $[45] !== t22 || $[46] !== type ? (t23 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t21, "data-no-focus-ring": t22, disabled, readOnly, ref, type }), $[41] = Element2, $[42] = disabled, $[43] = readOnly, $[44] = rest, $[45] = t22, $[46] = type, $[47] = t23) : t23 = $[47];
|
|
1370
1371
|
let t24;
|
|
1371
|
-
$[
|
|
1372
|
+
$[48] === Symbol.for("react.memo_cache_sentinel") ? (t24 = _inputPresentation(), $[48] = t24) : t24 = $[48];
|
|
1372
1373
|
let t25;
|
|
1373
|
-
$[50]
|
|
1374
|
-
let t26;
|
|
1375
|
-
$[51] !== IconComponent || $[52] !== fontSize || $[53] !== padding ? (t26 = IconComponent && /* @__PURE__ */ jsx(Box, { as: "span", padding, position: "absolute", insetTop: 0, insetLeft: 0, children: /* @__PURE__ */ jsxs(Text, { as: "span", size: fontSize, children: [
|
|
1374
|
+
$[49] !== IconComponent || $[50] !== fontSize || $[51] !== padding ? (t25 = IconComponent && /* @__PURE__ */ jsx(Box, { as: "span", padding, position: "absolute", insetTop: 0, insetLeft: 0, children: /* @__PURE__ */ jsxs(Text, { as: "span", size: fontSize, children: [
|
|
1376
1375
|
isValidElement(IconComponent) && IconComponent,
|
|
1377
1376
|
isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
|
|
1378
|
-
] }) }), $[
|
|
1379
|
-
let
|
|
1380
|
-
$[
|
|
1377
|
+
] }) }), $[49] = IconComponent, $[50] = fontSize, $[51] = padding, $[52] = t25) : t25 = $[52];
|
|
1378
|
+
let t26;
|
|
1379
|
+
$[53] !== IconRightComponent || $[54] !== fontSize || $[55] !== padding || $[56] !== withClearButton ? (t26 = !withClearButton && IconRightComponent && /* @__PURE__ */ jsx(Box, { as: "span", padding, position: "absolute", insetTop: 0, insetRight: 0, children: /* @__PURE__ */ jsxs(Text, { as: "span", size: fontSize, children: [
|
|
1381
1380
|
isValidElement(IconRightComponent) && IconRightComponent,
|
|
1382
1381
|
isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
|
|
1383
|
-
] }) }), $[
|
|
1382
|
+
] }) }), $[53] = IconRightComponent, $[54] = fontSize, $[55] = padding, $[56] = withClearButton, $[57] = t26) : t26 = $[57];
|
|
1383
|
+
let t27;
|
|
1384
|
+
$[58] !== t25 || $[59] !== t26 ? (t27 = /* @__PURE__ */ jsxs("span", { className: t24, children: [
|
|
1385
|
+
t25,
|
|
1386
|
+
t26
|
|
1387
|
+
] }), $[58] = t25, $[59] = t26, $[60] = t27) : t27 = $[60];
|
|
1384
1388
|
let t28;
|
|
1385
|
-
$[
|
|
1386
|
-
t26,
|
|
1387
|
-
t27
|
|
1388
|
-
] }), $[60] = t26, $[61] = t27, $[62] = t28) : t28 = $[62];
|
|
1389
|
+
$[61] !== clearButton || $[62] !== disabled || $[63] !== fontSize || $[64] !== handleClearClick || $[65] !== radius || $[66] !== readOnly || $[67] !== responsivePadding ? (t28 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(ClearButton, { fontSize, radius, clearButtonProps: isRecord(clearButton) ? clearButton : EMPTY_RECORD, handleClearClick, handleClearMouseDown, padding: responsivePadding }), $[61] = clearButton, $[62] = disabled, $[63] = fontSize, $[64] = handleClearClick, $[65] = radius, $[66] = readOnly, $[67] = responsivePadding, $[68] = t28) : t28 = $[68];
|
|
1389
1390
|
let t29;
|
|
1390
|
-
$[
|
|
1391
|
-
|
|
1392
|
-
|
|
1391
|
+
$[69] !== t23 || $[70] !== t27 || $[71] !== t28 ? (t29 = /* @__PURE__ */ jsxs("span", { className: t20, children: [
|
|
1392
|
+
t23,
|
|
1393
|
+
t27,
|
|
1394
|
+
t28
|
|
1395
|
+
] }), $[69] = t23, $[70] = t27, $[71] = t28, $[72] = t29) : t29 = $[72];
|
|
1393
1396
|
let t30;
|
|
1394
|
-
$[73] !==
|
|
1395
|
-
t24,
|
|
1396
|
-
t28,
|
|
1397
|
-
t29
|
|
1398
|
-
] }), $[73] = t24, $[74] = t28, $[75] = t29, $[76] = t30) : t30 = $[76];
|
|
1397
|
+
$[73] !== suffix ? (t30 = suffix && /* @__PURE__ */ jsx("span", { className: textInputSuffix(), children: /* @__PURE__ */ jsx("span", { children: suffix }) }), $[73] = suffix, $[74] = t30) : t30 = $[74];
|
|
1399
1398
|
let t31;
|
|
1400
|
-
$[77] !==
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1399
|
+
return $[75] !== t12 || $[76] !== t13 || $[77] !== t14 || $[78] !== t15 || $[79] !== t16 || $[80] !== t17 || $[81] !== t18 || $[82] !== t19 || $[83] !== t29 || $[84] !== t30 ? (t31 = /* @__PURE__ */ jsxs("span", { className: t12, "data-icon-left": t13, "data-icon-right": t14, "data-invalid": t15, "data-prefix": t16, "data-read-only": t17, "data-suffix": t18, "data-ui": "TextInput", children: [
|
|
1400
|
+
t19,
|
|
1401
|
+
t29,
|
|
1402
|
+
t30
|
|
1403
|
+
] }), $[75] = t12, $[76] = t13, $[77] = t14, $[78] = t15, $[79] = t16, $[80] = t17, $[81] = t18, $[82] = t19, $[83] = t29, $[84] = t30, $[85] = t31) : t31 = $[85], t31;
|
|
1404
|
+
}
|
|
1405
|
+
function _temp$a(event) {
|
|
1406
|
+
event.preventDefault(), event.stopPropagation();
|
|
1407
|
+
}
|
|
1408
|
+
function ClearButton(t0) {
|
|
1409
|
+
const $ = c(15), {
|
|
1410
|
+
fontSize,
|
|
1411
|
+
radius,
|
|
1412
|
+
clearButtonProps,
|
|
1413
|
+
handleClearClick,
|
|
1414
|
+
handleClearMouseDown,
|
|
1415
|
+
padding
|
|
1416
|
+
} = t0;
|
|
1417
|
+
let t1;
|
|
1418
|
+
$[0] !== padding ? (t1 = Object.fromEntries(Object.entries(padding).map(_temp2$2)), $[0] = padding, $[1] = t1) : t1 = $[1];
|
|
1419
|
+
const clearButtonBoxPadding = t1;
|
|
1420
|
+
let t2;
|
|
1421
|
+
$[2] !== padding ? (t2 = Object.fromEntries(Object.entries(padding).map(_temp3)), $[2] = padding, $[3] = t2) : t2 = $[3];
|
|
1422
|
+
const clearButtonPadding = t2;
|
|
1423
|
+
let t3;
|
|
1424
|
+
$[4] === Symbol.for("react.memo_cache_sentinel") ? (t3 = {
|
|
1425
|
+
zIndex: 2
|
|
1426
|
+
}, $[4] = t3) : t3 = $[4];
|
|
1427
|
+
let t4;
|
|
1428
|
+
$[5] !== clearButtonPadding || $[6] !== clearButtonProps || $[7] !== fontSize || $[8] !== handleClearClick || $[9] !== handleClearMouseDown || $[10] !== radius ? (t4 = /* @__PURE__ */ jsx(Button, { "aria-label": "Clear", "data-qa": "clear-button", display: "block", fontSize, icon: CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }), $[5] = clearButtonPadding, $[6] = clearButtonProps, $[7] = fontSize, $[8] = handleClearClick, $[9] = handleClearMouseDown, $[10] = radius, $[11] = t4) : t4 = $[11];
|
|
1429
|
+
let t5;
|
|
1430
|
+
return $[12] !== clearButtonBoxPadding || $[13] !== t4 ? (t5 = /* @__PURE__ */ jsx(Box, { as: "span", insetTop: 0, insetRight: 0, padding: clearButtonBoxPadding, position: "absolute", style: t3, children: t4 }), $[12] = clearButtonBoxPadding, $[13] = t4, $[14] = t5) : t5 = $[14], t5;
|
|
1407
1431
|
}
|
|
1408
1432
|
function _temp3(t0) {
|
|
1409
1433
|
const [key_0, value_0] = t0;
|
|
@@ -1413,9 +1437,6 @@ function _temp2$2(t0) {
|
|
|
1413
1437
|
const [key2, value] = t0;
|
|
1414
1438
|
return value === 0 ? [key2, 0] : value === 1 ? [key2, 1] : value === 2 ? [key2, 1] : [key2, typeof value == "number" ? value - 2 : 0];
|
|
1415
1439
|
}
|
|
1416
|
-
function _temp$a(event) {
|
|
1417
|
-
event.preventDefault(), event.stopPropagation();
|
|
1418
|
-
}
|
|
1419
1440
|
function AutocompleteOption(props) {
|
|
1420
1441
|
const $ = c(11), {
|
|
1421
1442
|
children,
|
|
@@ -2091,7 +2112,7 @@ function useDialog() {
|
|
|
2091
2112
|
}
|
|
2092
2113
|
const DEFAULT_DIALOG_ELEMENT = "div";
|
|
2093
2114
|
function Dialog(props) {
|
|
2094
|
-
const $ = c(
|
|
2115
|
+
const $ = c(75), context = useDialog(), t0 = props;
|
|
2095
2116
|
let _positionProp, _zOffsetProp, children, className, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, rest, scheme, t1, t2, t3, t4, t5, t6, t7, tone;
|
|
2096
2117
|
$[0] !== t0 ? ({
|
|
2097
2118
|
__unstable_autoFocus: t1,
|
|
@@ -2118,9 +2139,18 @@ function Dialog(props) {
|
|
|
2118
2139
|
tone,
|
|
2119
2140
|
...rest
|
|
2120
2141
|
} = t0, $[0] = t0, $[1] = _positionProp, $[2] = _zOffsetProp, $[3] = children, $[4] = className, $[5] = contentRef, $[6] = footer, $[7] = header, $[8] = id, $[9] = onActivate, $[10] = onClickOutside, $[11] = onClose, $[12] = onFocus, $[13] = portalProp, $[14] = rest, $[15] = scheme, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6, $[22] = t7, $[23] = tone) : (_positionProp = $[1], _zOffsetProp = $[2], children = $[3], className = $[4], contentRef = $[5], footer = $[6], header = $[7], id = $[8], onActivate = $[9], onClickOutside = $[10], onClose = $[11], onFocus = $[12], portalProp = $[13], rest = $[14], scheme = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21], t7 = $[22], tone = $[23]);
|
|
2121
|
-
const autoFocus = t1 === void 0 ? !0 : t1, hideCloseButton = t2 === void 0 ? !1 : t2, _animate = t3 === void 0 ? !1 : t3, cardRadiusProp = t4 === void 0 ? 4 : t4, padding = t5 === void 0 ? 3 : t5, cardShadow = t6 === void 0 ? 4 : t6, width = t7 === void 0 ? 0 : t7, positionProp = _positionProp ?? context.position ?? "fixed", zOffsetProp = _zOffsetProp ?? context.zOffset ?? Z_OFFSETS.dialog, animate = usePrefersReducedMotion() ? !1 : _animate, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element
|
|
2142
|
+
const autoFocus = t1 === void 0 ? !0 : t1, hideCloseButton = t2 === void 0 ? !1 : t2, _animate = t3 === void 0 ? !1 : t3, cardRadiusProp = t4 === void 0 ? 4 : t4, padding = t5 === void 0 ? 3 : t5, cardShadow = t6 === void 0 ? 4 : t6, width = t7 === void 0 ? 0 : t7, positionProp = _positionProp ?? context.position ?? "fixed", zOffsetProp = _zOffsetProp ?? context.zOffset ?? Z_OFFSETS.dialog, animate = usePrefersReducedMotion() ? !1 : _animate, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element;
|
|
2122
2143
|
let t8;
|
|
2123
|
-
$[24] !==
|
|
2144
|
+
$[24] !== cardRadiusProp ? (t8 = _getResponsiveProp(cardRadiusProp), $[24] = cardRadiusProp, $[25] = t8) : t8 = $[25];
|
|
2145
|
+
const cardRadius = t8;
|
|
2146
|
+
let t9;
|
|
2147
|
+
$[26] !== positionProp ? (t9 = _getResponsiveProp(positionProp), $[26] = positionProp, $[27] = t9) : t9 = $[27];
|
|
2148
|
+
const position = t9;
|
|
2149
|
+
let t10;
|
|
2150
|
+
$[28] !== zOffsetProp ? (t10 = _getResponsiveProp(zOffsetProp), $[28] = zOffsetProp, $[29] = t10) : t10 = $[29];
|
|
2151
|
+
const zOffset = t10, preDivRef = useRef(null), postDivRef = useRef(null), cardRef = useRef(null), focusedElementRef = useRef(null);
|
|
2152
|
+
let t11;
|
|
2153
|
+
$[30] !== onFocus ? (t11 = (event) => {
|
|
2124
2154
|
onFocus?.(event);
|
|
2125
2155
|
const target = event.target, cardElement = cardRef.current;
|
|
2126
2156
|
if (cardElement && target === preDivRef.current) {
|
|
@@ -2132,10 +2162,10 @@ function Dialog(props) {
|
|
|
2132
2162
|
return;
|
|
2133
2163
|
}
|
|
2134
2164
|
isHTMLElement(event.target) && (focusedElementRef.current = event.target);
|
|
2135
|
-
}, $[
|
|
2136
|
-
const handleFocus =
|
|
2137
|
-
let
|
|
2138
|
-
$[
|
|
2165
|
+
}, $[30] = onFocus, $[31] = t11) : t11 = $[31];
|
|
2166
|
+
const handleFocus = t11, labelId = `${id}_label`, rootClickTimeoutRef = useRef(void 0);
|
|
2167
|
+
let t12;
|
|
2168
|
+
$[32] !== boundaryElement || $[33] !== portalElement ? (t12 = () => {
|
|
2139
2169
|
rootClickTimeoutRef.current && clearTimeout(rootClickTimeoutRef.current), rootClickTimeoutRef.current = setTimeout(() => {
|
|
2140
2170
|
const activeElement = document.activeElement;
|
|
2141
2171
|
if (activeElement && !isTargetWithinScope(boundaryElement, portalElement, activeElement)) {
|
|
@@ -2148,31 +2178,31 @@ function Dialog(props) {
|
|
|
2148
2178
|
target_0.focus();
|
|
2149
2179
|
}
|
|
2150
2180
|
}, 0);
|
|
2151
|
-
}, $[
|
|
2152
|
-
const handleRootClick =
|
|
2153
|
-
let t10;
|
|
2154
|
-
$[29] !== className ? (t10 = dialog({
|
|
2155
|
-
className
|
|
2156
|
-
}), $[29] = className, $[30] = t10) : t10 = $[30];
|
|
2157
|
-
const t11 = animate ? "" : void 0;
|
|
2158
|
-
let t12;
|
|
2159
|
-
$[31] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsx("div", { ref: preDivRef, tabIndex: 0 }), $[31] = t12) : t12 = $[31];
|
|
2181
|
+
}, $[32] = boundaryElement, $[33] = portalElement, $[34] = t12) : t12 = $[34];
|
|
2182
|
+
const handleRootClick = t12;
|
|
2160
2183
|
let t13;
|
|
2161
|
-
$[
|
|
2162
|
-
|
|
2163
|
-
|
|
2184
|
+
$[35] !== className ? (t13 = dialog({
|
|
2185
|
+
className
|
|
2186
|
+
}), $[35] = className, $[36] = t13) : t13 = $[36];
|
|
2187
|
+
const t14 = animate ? "" : void 0;
|
|
2164
2188
|
let t15;
|
|
2165
|
-
$[
|
|
2189
|
+
$[37] === Symbol.for("react.memo_cache_sentinel") ? (t15 = /* @__PURE__ */ jsx("div", { ref: preDivRef, tabIndex: 0 }), $[37] = t15) : t15 = $[37];
|
|
2166
2190
|
let t16;
|
|
2167
|
-
$[
|
|
2191
|
+
$[38] === Symbol.for("react.memo_cache_sentinel") ? (t16 = dialogContainer(), $[38] = t16) : t16 = $[38];
|
|
2168
2192
|
let t17;
|
|
2169
|
-
$[
|
|
2170
|
-
t12,
|
|
2171
|
-
t15,
|
|
2172
|
-
t16
|
|
2173
|
-
] }), $[53] = handleFocus, $[54] = handleRootClick, $[55] = id, $[56] = labelId, $[57] = onActivate, $[58] = padding, $[59] = position, $[60] = rest, $[61] = t10, $[62] = t11, $[63] = t15, $[64] = zOffset, $[65] = t17) : t17 = $[65];
|
|
2193
|
+
$[39] !== autoFocus || $[40] !== cardRadius || $[41] !== cardShadow || $[42] !== children || $[43] !== contentRef || $[44] !== footer || $[45] !== header || $[46] !== hideCloseButton || $[47] !== id || $[48] !== onClickOutside || $[49] !== onClose || $[50] !== portalProp || $[51] !== scheme || $[52] !== tone || $[53] !== width ? (t17 = /* @__PURE__ */ jsx(DialogCard, { __unstable_autoFocus: autoFocus, __unstable_hideCloseButton: hideCloseButton, contentRef, footer, header, id, onClickOutside, onClose, portal: portalProp, radius: cardRadius, ref: cardRef, scheme, shadow: cardShadow, tone, width, children }), $[39] = autoFocus, $[40] = cardRadius, $[41] = cardShadow, $[42] = children, $[43] = contentRef, $[44] = footer, $[45] = header, $[46] = hideCloseButton, $[47] = id, $[48] = onClickOutside, $[49] = onClose, $[50] = portalProp, $[51] = scheme, $[52] = tone, $[53] = width, $[54] = t17) : t17 = $[54];
|
|
2174
2194
|
let t18;
|
|
2175
|
-
|
|
2195
|
+
$[55] !== t17 || $[56] !== width ? (t18 = /* @__PURE__ */ jsx(Container, { alignItems: "center", className: t16, "data-ui": "DialogCard", flexDirection: "column", display: "flex", justifyContent: "center", width, children: t17 }), $[55] = t17, $[56] = width, $[57] = t18) : t18 = $[57];
|
|
2196
|
+
let t19;
|
|
2197
|
+
$[58] === Symbol.for("react.memo_cache_sentinel") ? (t19 = /* @__PURE__ */ jsx("div", { ref: postDivRef, tabIndex: 0 }), $[58] = t19) : t19 = $[58];
|
|
2198
|
+
let t20;
|
|
2199
|
+
$[59] !== handleFocus || $[60] !== handleRootClick || $[61] !== id || $[62] !== labelId || $[63] !== onActivate || $[64] !== padding || $[65] !== position || $[66] !== rest || $[67] !== t13 || $[68] !== t14 || $[69] !== t18 || $[70] !== zOffset ? (t20 = /* @__PURE__ */ jsxs(Layer, { ...rest, "aria-labelledby": labelId, "aria-modal": !0, className: t13, "data-animate": t14, "data-ui": "Dialog", display: "flex", id, onActivate, onClick: handleRootClick, onFocus: handleFocus, padding, position, role: "dialog", zOffset, children: [
|
|
2200
|
+
t15,
|
|
2201
|
+
t18,
|
|
2202
|
+
t19
|
|
2203
|
+
] }), $[59] = handleFocus, $[60] = handleRootClick, $[61] = id, $[62] = labelId, $[63] = onActivate, $[64] = padding, $[65] = position, $[66] = rest, $[67] = t13, $[68] = t14, $[69] = t18, $[70] = zOffset, $[71] = t20) : t20 = $[71];
|
|
2204
|
+
let t21;
|
|
2205
|
+
return $[72] !== portalProp || $[73] !== t20 ? (t21 = /* @__PURE__ */ jsx(Portal, { __unstable_name: portalProp, children: t20 }), $[72] = portalProp, $[73] = t20, $[74] = t21) : t21 = $[74], t21;
|
|
2176
2206
|
}
|
|
2177
2207
|
function DialogProvider(props) {
|
|
2178
2208
|
const $ = c(6), {
|
|
@@ -2188,7 +2218,7 @@ function DialogProvider(props) {
|
|
|
2188
2218
|
}, $[0] = position, $[1] = zOffset, $[2] = t0) : t0 = $[2];
|
|
2189
2219
|
const contextValue = t0;
|
|
2190
2220
|
let t1;
|
|
2191
|
-
return $[3] !== children || $[4] !== contextValue ? (t1 = /* @__PURE__ */ jsx(DialogContext
|
|
2221
|
+
return $[3] !== children || $[4] !== contextValue ? (t1 = /* @__PURE__ */ jsx(DialogContext, { value: contextValue, children }), $[3] = children, $[4] = contextValue, $[5] = t1) : t1 = $[5], t1;
|
|
2192
2222
|
}
|
|
2193
2223
|
const DEFAULT_KBD_ELEMENT = "kbd";
|
|
2194
2224
|
function KBD(props) {
|
|
@@ -2487,7 +2517,7 @@ function Menu(props) {
|
|
|
2487
2517
|
let t14;
|
|
2488
2518
|
$[45] !== as || $[46] !== handleKeyDown || $[47] !== handleRefChange || $[48] !== padding || $[49] !== rest || $[50] !== t12 || $[51] !== t13 ? (t14 = /* @__PURE__ */ jsx(Box, { "data-ui": "Menu", ...rest, as, className: t12, onKeyDown: handleKeyDown, overflow: "auto", outline: "none", padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: t13 }), $[45] = as, $[46] = handleKeyDown, $[47] = handleRefChange, $[48] = padding, $[49] = rest, $[50] = t12, $[51] = t13, $[52] = t14) : t14 = $[52];
|
|
2489
2519
|
let t15;
|
|
2490
|
-
return $[53] !== t14 || $[54] !== value ? (t15 = /* @__PURE__ */ jsx(MenuContext
|
|
2520
|
+
return $[53] !== t14 || $[54] !== value ? (t15 = /* @__PURE__ */ jsx(MenuContext, { value, children: t14 }), $[53] = t14, $[54] = value, $[55] = t15) : t15 = $[55], t15;
|
|
2491
2521
|
}
|
|
2492
2522
|
function MenuButton(props) {
|
|
2493
2523
|
const $ = c(57), {
|
|
@@ -3133,7 +3163,7 @@ function ToastProvider(props) {
|
|
|
3133
3163
|
let t3;
|
|
3134
3164
|
$[2] !== gap || $[3] !== mounted || $[4] !== padding || $[5] !== paddingX || $[6] !== paddingY || $[7] !== state || $[8] !== zOffset ? (t3 = mounted && /* @__PURE__ */ jsx(LayerProvider, { zOffset, children: /* @__PURE__ */ jsx(ToastLayer, { padding, paddingX, paddingY, gap, children: /* @__PURE__ */ jsx(AnimatePresence, { initial: !1, mode: "popLayout", children: state.map(_temp$4) }) }) }), $[2] = gap, $[3] = mounted, $[4] = padding, $[5] = paddingX, $[6] = paddingY, $[7] = state, $[8] = zOffset, $[9] = t3) : t3 = $[9];
|
|
3135
3165
|
let t4;
|
|
3136
|
-
return $[10] !== children || $[11] !== t3 ? (t4 = /* @__PURE__ */ jsxs(ToastContext
|
|
3166
|
+
return $[10] !== children || $[11] !== t3 ? (t4 = /* @__PURE__ */ jsxs(ToastContext, { value, children: [
|
|
3137
3167
|
children,
|
|
3138
3168
|
t3
|
|
3139
3169
|
] }), $[10] = children, $[11] = t3, $[12] = t4) : t4 = $[12], t4;
|
|
@@ -3361,7 +3391,7 @@ function Tree(props) {
|
|
|
3361
3391
|
let t18;
|
|
3362
3392
|
$[29] !== children || $[30] !== gap || $[31] !== handleFocus || $[32] !== handleKeyDown || $[33] !== rest ? (t18 = /* @__PURE__ */ jsx(Stack, { as: "ul", "data-ui": "Tree", ...rest, gap, onFocus: handleFocus, onKeyDown: handleKeyDown, ref, role: "tree", children }), $[29] = children, $[30] = gap, $[31] = handleFocus, $[32] = handleKeyDown, $[33] = rest, $[34] = t18) : t18 = $[34];
|
|
3363
3393
|
let t19;
|
|
3364
|
-
return $[35] !== contextValue || $[36] !== t18 ? (t19 = /* @__PURE__ */ jsx(TreeContext
|
|
3394
|
+
return $[35] !== contextValue || $[36] !== t18 ? (t19 = /* @__PURE__ */ jsx(TreeContext, { value: contextValue, children: t18 }), $[35] = contextValue, $[36] = t18, $[37] = t19) : t19 = $[37], t19;
|
|
3365
3395
|
}
|
|
3366
3396
|
function useTree() {
|
|
3367
3397
|
const tree = use(TreeContext);
|
|
@@ -3483,7 +3513,7 @@ function TreeItem(props) {
|
|
|
3483
3513
|
let t302;
|
|
3484
3514
|
$[86] !== children || $[87] !== expanded ? (t302 = children && /* @__PURE__ */ jsx(TreeGroup, { hidden: !expanded, children }), $[86] = children, $[87] = expanded, $[88] = t302) : t302 = $[88];
|
|
3485
3515
|
let t312;
|
|
3486
|
-
$[89] !== contextValue || $[90] !== t302 ? (t312 = /* @__PURE__ */ jsx(TreeContext
|
|
3516
|
+
$[89] !== contextValue || $[90] !== t302 ? (t312 = /* @__PURE__ */ jsx(TreeContext, { value: contextValue, children: t302 }), $[89] = contextValue, $[90] = t302, $[91] = t312) : t312 = $[91];
|
|
3487
3517
|
let t322;
|
|
3488
3518
|
return $[92] !== handleClick || $[93] !== id || $[94] !== itemKey || $[95] !== t242 || $[96] !== t252 || $[97] !== t262 || $[98] !== t292 || $[99] !== t312 ? (t322 = /* @__PURE__ */ jsxs(Box, { "data-selected": t242, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem", ...t252, as: "li", className: t262, onClick: handleClick, ref: setRootElement, role: "none", children: [
|
|
3489
3519
|
t292,
|
|
@@ -3505,7 +3535,7 @@ function TreeItem(props) {
|
|
|
3505
3535
|
let t31;
|
|
3506
3536
|
$[111] !== children || $[112] !== expanded ? (t31 = children && /* @__PURE__ */ jsx(TreeGroup, { expanded, children }), $[111] = children, $[112] = expanded, $[113] = t31) : t31 = $[113];
|
|
3507
3537
|
let t32;
|
|
3508
|
-
$[114] !== contextValue || $[115] !== t31 ? (t32 = /* @__PURE__ */ jsx(TreeContext
|
|
3538
|
+
$[114] !== contextValue || $[115] !== t31 ? (t32 = /* @__PURE__ */ jsx(TreeContext, { value: contextValue, children: t31 }), $[114] = contextValue, $[115] = t31, $[116] = t32) : t32 = $[116];
|
|
3509
3539
|
let t33;
|
|
3510
3540
|
return $[117] !== expanded || $[118] !== handleClick || $[119] !== handleKeyDown || $[120] !== id || $[121] !== itemKey || $[122] !== t24 || $[123] !== t25 || $[124] !== t26 || $[125] !== t30 || $[126] !== t32 || $[127] !== tabIndex ? (t33 = /* @__PURE__ */ jsxs(Box, { "data-selected": t24, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey, ...t25, "aria-expanded": expanded, className: t26, onClick: handleClick, onKeyDown: handleKeyDown, ref: setRootElement, role: "treeitem", tabIndex, children: [
|
|
3511
3541
|
t30,
|
|
@@ -3775,7 +3805,7 @@ function Label(props) {
|
|
|
3775
3805
|
}
|
|
3776
3806
|
const DEFAULT_AVATAR_ELEMENT = "span";
|
|
3777
3807
|
function Avatar(props) {
|
|
3778
|
-
const $ = c(
|
|
3808
|
+
const $ = c(52), t0 = props;
|
|
3779
3809
|
let animateArrowFrom, arrowPositionProp, className, hideInnerStroke, initials, onImageLoadError, rest, src, t1, t2, t3, title;
|
|
3780
3810
|
$[0] !== t0 ? ({
|
|
3781
3811
|
__unstable_hideInnerStroke: hideInnerStroke,
|
|
@@ -3791,52 +3821,55 @@ function Avatar(props) {
|
|
|
3791
3821
|
size: t3,
|
|
3792
3822
|
...rest
|
|
3793
3823
|
} = t0, $[0] = t0, $[1] = animateArrowFrom, $[2] = arrowPositionProp, $[3] = className, $[4] = hideInnerStroke, $[5] = initials, $[6] = onImageLoadError, $[7] = rest, $[8] = src, $[9] = t1, $[10] = t2, $[11] = t3, $[12] = title) : (animateArrowFrom = $[1], arrowPositionProp = $[2], className = $[3], hideInnerStroke = $[4], initials = $[5], onImageLoadError = $[6], rest = $[7], src = $[8], t1 = $[9], t2 = $[10], t3 = $[11], title = $[12]);
|
|
3794
|
-
const Element2 = t1 === void 0 ? DEFAULT_AVATAR_ELEMENT : t1, color = t2 === void 0 ? "magenta" : t2, sizeProp = t3 === void 0 ? 1 : t3
|
|
3795
|
-
let t4
|
|
3796
|
-
$[13] !==
|
|
3824
|
+
const Element2 = t1 === void 0 ? DEFAULT_AVATAR_ELEMENT : t1, color = t2 === void 0 ? "magenta" : t2, sizeProp = t3 === void 0 ? 1 : t3;
|
|
3825
|
+
let t4;
|
|
3826
|
+
$[13] !== sizeProp ? (t4 = _getResponsiveProp(sizeProp), $[13] = sizeProp, $[14] = t4) : t4 = $[14];
|
|
3827
|
+
const size2 = t4, [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside"), [imageError, setImageError] = useState(!1);
|
|
3828
|
+
let t5, t6;
|
|
3829
|
+
$[15] !== arrowPosition || $[16] !== arrowPositionProp ? (t5 = () => {
|
|
3797
3830
|
if (arrowPosition === arrowPositionProp)
|
|
3798
3831
|
return;
|
|
3799
3832
|
const raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));
|
|
3800
3833
|
return () => cancelAnimationFrame(raf);
|
|
3801
|
-
},
|
|
3802
|
-
let
|
|
3803
|
-
$[
|
|
3834
|
+
}, t6 = [arrowPosition, arrowPositionProp], $[15] = arrowPosition, $[16] = arrowPositionProp, $[17] = t5, $[18] = t6) : (t5 = $[17], t6 = $[18]), useEffect(t5, t6);
|
|
3835
|
+
let t7, t8;
|
|
3836
|
+
$[19] !== src ? (t7 = () => {
|
|
3804
3837
|
src && setImageError(!1);
|
|
3805
|
-
},
|
|
3806
|
-
let t8;
|
|
3807
|
-
$[20] !== onImageLoadError ? (t8 = () => {
|
|
3808
|
-
setImageError(!0), onImageLoadError && onImageLoadError(new Error("Avatar: the image failed to load"));
|
|
3809
|
-
}, $[20] = onImageLoadError, $[21] = t8) : t8 = $[21];
|
|
3810
|
-
const handleImageError = t8;
|
|
3838
|
+
}, t8 = [src], $[19] = src, $[20] = t7, $[21] = t8) : (t7 = $[20], t8 = $[21]), useEffect(t7, t8);
|
|
3811
3839
|
let t9;
|
|
3812
|
-
$[22] !==
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3840
|
+
$[22] !== onImageLoadError ? (t9 = () => {
|
|
3841
|
+
setImageError(!0), onImageLoadError && onImageLoadError(new Error("Avatar: the image failed to load"));
|
|
3842
|
+
}, $[22] = onImageLoadError, $[23] = t9) : t9 = $[23];
|
|
3843
|
+
const handleImageError = t9;
|
|
3844
|
+
let t10;
|
|
3845
|
+
$[24] !== size2 ? (t10 = Object.values(size2).map(_temp$2), $[24] = size2, $[25] = t10) : t10 = $[25];
|
|
3846
|
+
const initialsSize = t10, t11 = hideInnerStroke ? "" : void 0;
|
|
3847
|
+
let t12;
|
|
3848
|
+
$[26] !== className || $[27] !== color || $[28] !== sizeProp ? (t12 = avatar({
|
|
3816
3849
|
className,
|
|
3817
3850
|
color,
|
|
3818
3851
|
size: sizeProp
|
|
3819
|
-
}), $[
|
|
3820
|
-
const
|
|
3821
|
-
let t13;
|
|
3822
|
-
$[28] === Symbol.for("react.memo_cache_sentinel") ? (t13 = avatarArrow(), $[28] = t13) : t13 = $[28];
|
|
3852
|
+
}), $[26] = className, $[27] = color, $[28] = sizeProp, $[29] = t12) : t12 = $[29];
|
|
3853
|
+
const t13 = imageError ? "" : void 0;
|
|
3823
3854
|
let t14;
|
|
3824
|
-
$[
|
|
3855
|
+
$[30] === Symbol.for("react.memo_cache_sentinel") ? (t14 = avatarArrow(), $[30] = t14) : t14 = $[30];
|
|
3825
3856
|
let t15;
|
|
3826
|
-
$[31]
|
|
3857
|
+
$[31] !== color ? (t15 = /* @__PURE__ */ jsx("span", { className: t14, children: /* @__PURE__ */ jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ 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 }) }) }), $[31] = color, $[32] = t15) : t15 = $[32];
|
|
3827
3858
|
let t16;
|
|
3828
|
-
$[
|
|
3859
|
+
$[33] === Symbol.for("react.memo_cache_sentinel") ? (t16 = avatarInitials(), $[33] = t16) : t16 = $[33];
|
|
3829
3860
|
let t17;
|
|
3830
|
-
$[
|
|
3861
|
+
$[34] !== initials || $[35] !== initialsSize ? (t17 = /* @__PURE__ */ jsx(Box, { alignItems: "center", as: "span", className: t16, display: "flex", justifyContent: "center", position: "absolute", inset: 0, children: /* @__PURE__ */ jsx(Label, { align: "center", as: "span", size: initialsSize, weight: "medium", children: initials }) }), $[34] = initials, $[35] = initialsSize, $[36] = t17) : t17 = $[36];
|
|
3862
|
+
let t18;
|
|
3863
|
+
$[37] !== handleImageError || $[38] !== initials || $[39] !== src ? (t18 = src && /* @__PURE__ */ jsxs(Box, { className: avatarImage(), inset: 0, position: "absolute", children: [
|
|
3831
3864
|
/* @__PURE__ */ jsx("img", { alt: initials, onError: handleImageError, src }),
|
|
3832
3865
|
/* @__PURE__ */ jsx("span", { className: avatarImageOutline() })
|
|
3833
|
-
] }), $[
|
|
3834
|
-
let
|
|
3835
|
-
return $[
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
] }), $[
|
|
3866
|
+
] }), $[37] = handleImageError, $[38] = initials, $[39] = src, $[40] = t18) : t18 = $[40];
|
|
3867
|
+
let t19;
|
|
3868
|
+
return $[41] !== Element2 || $[42] !== arrowPosition || $[43] !== rest || $[44] !== t11 || $[45] !== t12 || $[46] !== t13 || $[47] !== t15 || $[48] !== t17 || $[49] !== t18 || $[50] !== title ? (t19 = /* @__PURE__ */ jsxs(Element2, { "data-hide-inner-stroke": t11, "data-ui": "Avatar", ...rest, "aria-label": title, className: t12, "data-arrow-position": arrowPosition, "data-image-error": t13, title, children: [
|
|
3869
|
+
t15,
|
|
3870
|
+
t17,
|
|
3871
|
+
t18
|
|
3872
|
+
] }), $[41] = Element2, $[42] = arrowPosition, $[43] = rest, $[44] = t11, $[45] = t12, $[46] = t13, $[47] = t15, $[48] = t17, $[49] = t18, $[50] = title, $[51] = t19) : t19 = $[51], t19;
|
|
3840
3873
|
}
|
|
3841
3874
|
function _temp$2(s) {
|
|
3842
3875
|
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
@@ -4742,7 +4775,7 @@ function TooltipDelayGroupProvider(props) {
|
|
|
4742
4775
|
}, $[0] = closeDelay, $[1] = openTooltipId, $[2] = setIsGroupActive, $[3] = setOpenTooltipId, $[4] = t0, $[5] = t1) : t1 = $[5];
|
|
4743
4776
|
const value = t1;
|
|
4744
4777
|
let t2;
|
|
4745
|
-
return $[6] !== children || $[7] !== value ? (t2 = /* @__PURE__ */ jsx(TooltipDelayGroupContext
|
|
4778
|
+
return $[6] !== children || $[7] !== value ? (t2 = /* @__PURE__ */ jsx(TooltipDelayGroupContext, { value, children }), $[6] = children, $[7] = value, $[8] = t2) : t2 = $[8], t2;
|
|
4746
4779
|
}
|
|
4747
4780
|
function BoundaryElementProvider(props) {
|
|
4748
4781
|
const $ = c(5), {
|
|
@@ -4756,7 +4789,7 @@ function BoundaryElementProvider(props) {
|
|
|
4756
4789
|
}, $[0] = element, $[1] = t0) : t0 = $[1];
|
|
4757
4790
|
const value = t0;
|
|
4758
4791
|
let t1;
|
|
4759
|
-
return $[2] !== children || $[3] !== value ? (t1 = /* @__PURE__ */ jsx(BoundaryElementContext
|
|
4792
|
+
return $[2] !== children || $[3] !== value ? (t1 = /* @__PURE__ */ jsx(BoundaryElementContext, { value, children }), $[2] = children, $[3] = value, $[4] = t1) : t1 = $[4], t1;
|
|
4760
4793
|
}
|
|
4761
4794
|
function findMaxBreakpoints(media2, width) {
|
|
4762
4795
|
const ret = [];
|
|
@@ -5039,7 +5072,6 @@ export {
|
|
|
5039
5072
|
VirtualList,
|
|
5040
5073
|
_ResizeObserver,
|
|
5041
5074
|
_elementSizeObserver,
|
|
5042
|
-
_getArrayProp,
|
|
5043
5075
|
_getResponsiveProp,
|
|
5044
5076
|
_hasFocus,
|
|
5045
5077
|
_isEnterToClickElement,
|
|
@@ -5070,7 +5102,6 @@ export {
|
|
|
5070
5102
|
usePortal,
|
|
5071
5103
|
usePrefersDark,
|
|
5072
5104
|
usePrefersReducedMotion,
|
|
5073
|
-
useResponsiveProp,
|
|
5074
5105
|
useToast,
|
|
5075
5106
|
useTooltipDelayGroup,
|
|
5076
5107
|
useTree
|