@sanity/ui 2.8.19 → 2.8.21
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.mts +12 -10
- package/dist/index.d.ts +12 -10
- package/dist/index.esm.js +425 -161
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +424 -160
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +425 -161
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
- package/src/core/components/autocomplete/autocomplete.tsx +42 -31
- package/src/core/components/menu/menu.tsx +12 -10
- package/src/core/components/menu/menuButton.tsx +14 -36
- package/src/core/components/toast/toastProvider.tsx +5 -6
- package/src/core/components/toast/toastState.ts +6 -0
- package/src/core/constants.ts +1 -1
- package/src/core/hooks/useArrayProp.ts +14 -9
- package/src/core/primitives/avatar/avatarStack.tsx +2 -5
- package/src/core/utils/elementQuery/elementQuery.tsx +16 -17
- package/src/core/utils/layer/layerProvider.tsx +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { buildTheme, createColorTheme as createColorTheme$1, hexToRgb as hexToRgb$1, hslToRgb as hslToRgb$1, multiply as multiply$1, parseColor as parseColor$1, rgbToHex as rgbToHex$1, rgbToHsl as rgbToHsl$1, rgba as rgba$1, screen as screen$1, getTheme_v2, getScopedTheme } from "@sanity/ui/theme";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { c } from "react-compiler-runtime";
|
|
4
|
-
import {
|
|
4
|
+
import { useState, useRef, useEffect, useDebugValue, useImperativeHandle, useMemo, useSyncExternalStore, createContext, useContext, forwardRef, useId, Children, isValidElement, cloneElement, Component, memo, useCallback, useLayoutEffect, useReducer, Fragment as Fragment$1, startTransition } from "react";
|
|
5
5
|
import ReactIs, { isValidElementType } from "react-is";
|
|
6
6
|
import { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css, styled, keyframes } from "styled-components";
|
|
7
7
|
import { SpinnerIcon, CheckmarkIcon, RemoveIcon, ChevronDownIcon, CloseIcon, ChevronRightIcon, ToggleArrowRightIcon } from "@sanity/icons";
|
|
@@ -154,13 +154,11 @@ function responsiveTextFont(props) {
|
|
|
154
154
|
return responsiveFont("text", props);
|
|
155
155
|
}
|
|
156
156
|
function useArrayProp(val, defaultVal) {
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
[__perf_hash__]
|
|
163
|
-
);
|
|
157
|
+
const $ = c(3);
|
|
158
|
+
let t0;
|
|
159
|
+
$[0] !== val || $[1] !== defaultVal ? (t0 = () => [_getArrayProp(val, defaultVal), JSON.stringify(val ?? defaultVal)], $[0] = val, $[1] = defaultVal, $[2] = t0) : t0 = $[2];
|
|
160
|
+
const [t1, setCache] = useState(t0), [cachedVal, cachedHash] = t1, hash = JSON.stringify(val ?? defaultVal);
|
|
161
|
+
return hash !== cachedHash && setCache([_getArrayProp(val, defaultVal), hash]), cachedVal;
|
|
164
162
|
}
|
|
165
163
|
function _getElements(element, elementsArg) {
|
|
166
164
|
const ret = [element];
|
|
@@ -1786,19 +1784,26 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
1786
1784
|
});
|
|
1787
1785
|
}
|
|
1788
1786
|
const Root$z = styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = forwardRef(function(props, ref) {
|
|
1789
|
-
const
|
|
1787
|
+
const $ = c(15);
|
|
1788
|
+
let t0, t1, childrenProp, restProps;
|
|
1789
|
+
$[0] !== props ? ({
|
|
1790
1790
|
children: childrenProp,
|
|
1791
|
-
maxLength:
|
|
1792
|
-
size:
|
|
1791
|
+
maxLength: t0,
|
|
1792
|
+
size: t1,
|
|
1793
1793
|
...restProps
|
|
1794
|
-
} = props,
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1794
|
+
} = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = childrenProp, $[4] = restProps) : (t0 = $[1], t1 = $[2], childrenProp = $[3], restProps = $[4]);
|
|
1795
|
+
const maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, children = Children.toArray(childrenProp).filter(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__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, { count: len, size: size2 }) }), t4 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, { count: extraCount, size: size2 }) });
|
|
1796
|
+
let t5;
|
|
1797
|
+
$[5] !== size2 ? (t5 = (child, childIndex) => /* @__PURE__ */ jsx("div", { children: cloneElement(child, {
|
|
1798
|
+
size: size2
|
|
1799
|
+
}) }, String(childIndex)), $[5] = size2, $[6] = t5) : t5 = $[6];
|
|
1800
|
+
const t6 = visibleChildren.map(t5);
|
|
1801
|
+
let t7;
|
|
1802
|
+
return $[7] !== T0 || $[8] !== restProps || $[9] !== ref || $[10] !== size2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t6 ? (t7 = /* @__PURE__ */ jsxs(T0, { "data-ui": t2, ...restProps, ref, $size: size2, children: [
|
|
1803
|
+
t3,
|
|
1804
|
+
t4,
|
|
1805
|
+
t6
|
|
1806
|
+
] }), $[7] = T0, $[8] = restProps, $[9] = ref, $[10] = size2, $[11] = t3, $[12] = t4, $[13] = t6, $[14] = t7) : t7 = $[14], t7;
|
|
1802
1807
|
});
|
|
1803
1808
|
AvatarStack.displayName = "ForwardRef(AvatarStack)";
|
|
1804
1809
|
const Root$y = styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box = forwardRef(function(props, ref) {
|
|
@@ -3217,16 +3222,37 @@ function findMinBreakpoints(media, width) {
|
|
|
3217
3222
|
return ret;
|
|
3218
3223
|
}
|
|
3219
3224
|
const ElementQuery = forwardRef(function(props, forwardedRef) {
|
|
3220
|
-
const theme = useTheme_v2()
|
|
3225
|
+
const $ = c(18), theme = useTheme_v2();
|
|
3226
|
+
let _media, restProps, children;
|
|
3227
|
+
$[0] !== props ? ({
|
|
3221
3228
|
children,
|
|
3222
|
-
media
|
|
3229
|
+
media: _media,
|
|
3223
3230
|
...restProps
|
|
3224
|
-
} = props,
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3231
|
+
} = props, $[0] = props, $[1] = _media, $[2] = restProps, $[3] = children) : (_media = $[1], restProps = $[2], children = $[3]);
|
|
3232
|
+
const media = _media ?? theme.media, [element, setElement] = useState(null), elementSize = useElementSize(element);
|
|
3233
|
+
let t0;
|
|
3234
|
+
t0 = elementSize?.border.width ?? window.innerWidth;
|
|
3235
|
+
const width = t0;
|
|
3236
|
+
let t1, t2;
|
|
3237
|
+
if ($[4] !== media || $[5] !== width) {
|
|
3238
|
+
const eq = findMaxBreakpoints(media, width);
|
|
3239
|
+
t2 = eq.length ? eq.join(" ") : void 0, $[4] = media, $[5] = width, $[6] = t2;
|
|
3240
|
+
} else
|
|
3241
|
+
t2 = $[6];
|
|
3242
|
+
t1 = t2;
|
|
3243
|
+
const max = t1;
|
|
3244
|
+
let t3, t4;
|
|
3245
|
+
if ($[7] !== media || $[8] !== width) {
|
|
3246
|
+
const eq_0 = findMinBreakpoints(media, width);
|
|
3247
|
+
t4 = eq_0.length ? eq_0.join(" ") : void 0, $[7] = media, $[8] = width, $[9] = t4;
|
|
3248
|
+
} else
|
|
3249
|
+
t4 = $[9];
|
|
3250
|
+
t3 = t4;
|
|
3251
|
+
const min = t3;
|
|
3252
|
+
let t5, t6;
|
|
3253
|
+
$[10] !== element ? (t5 = () => element, t6 = [element], $[10] = element, $[11] = t5, $[12] = t6) : (t5 = $[11], t6 = $[12]), useImperativeHandle(forwardedRef, t5, t6);
|
|
3254
|
+
let t7;
|
|
3255
|
+
return $[13] !== restProps || $[14] !== max || $[15] !== min || $[16] !== children ? (t7 = /* @__PURE__ */ jsx("div", { "data-ui": "ElementQuery", ...restProps, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[13] = restProps, $[14] = max, $[15] = min, $[16] = children, $[17] = t7) : t7 = $[17], t7;
|
|
3230
3256
|
});
|
|
3231
3257
|
ElementQuery.displayName = "ForwardRef(ElementQuery)";
|
|
3232
3258
|
class ErrorBoundary extends Component {
|
|
@@ -3353,10 +3379,18 @@ function _isScrollable(el) {
|
|
|
3353
3379
|
return style.overflowX.includes("auto") || style.overflowX.includes("scroll") || style.overflowY.includes("auto") || style.overflowY.includes("scroll");
|
|
3354
3380
|
}
|
|
3355
3381
|
function LayerProvider(props) {
|
|
3356
|
-
const {
|
|
3382
|
+
const $ = c(19), {
|
|
3357
3383
|
children,
|
|
3358
|
-
zOffset:
|
|
3359
|
-
} = props,
|
|
3384
|
+
zOffset: t0
|
|
3385
|
+
} = props, zOffsetProp = t0 === void 0 ? 0 : t0, parentContextValue = useContext(LayerContext);
|
|
3386
|
+
let t1;
|
|
3387
|
+
$[0] !== parentContextValue ? (t1 = parentContextValue && getLayerContext(parentContextValue), $[0] = parentContextValue, $[1] = t1) : t1 = $[1];
|
|
3388
|
+
const parent = t1, parentRegisterChild = parent?.registerChild, level = (parent?.level ?? 0) + 1, zOffset = useArrayProp(zOffsetProp), maxMediaIndex = zOffset.length - 1, mediaIndex = Math.min(useMediaIndex(), maxMediaIndex), zIndex = parent ? parent.zIndex + zOffset[mediaIndex] : zOffset[mediaIndex];
|
|
3389
|
+
let t2;
|
|
3390
|
+
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t2 = {}, $[2] = t2) : t2 = $[2];
|
|
3391
|
+
const [, setChildLayers] = useState(t2), [size2, setSize] = useState(0), isTopLayer = size2 === 0;
|
|
3392
|
+
let t3;
|
|
3393
|
+
$[3] !== parentRegisterChild || $[4] !== setChildLayers ? (t3 = (childLevel) => {
|
|
3360
3394
|
const parentDispose = parentRegisterChild?.(childLevel);
|
|
3361
3395
|
return childLevel !== void 0 ? setChildLayers((state) => {
|
|
3362
3396
|
const prevLen = state[childLevel] ?? 0, nextState = {
|
|
@@ -3369,20 +3403,25 @@ function LayerProvider(props) {
|
|
|
3369
3403
|
const nextState_0 = {
|
|
3370
3404
|
...state_0
|
|
3371
3405
|
};
|
|
3372
|
-
return nextState_0[childLevel] === 1 ? (delete nextState_0[childLevel], setSize(Object.keys(nextState_0).length)) : nextState_0[childLevel]
|
|
3406
|
+
return nextState_0[childLevel] === 1 ? (delete nextState_0[childLevel], setSize(Object.keys(nextState_0).length)) : nextState_0[childLevel] = nextState_0[childLevel] - 1, nextState_0;
|
|
3373
3407
|
}) : setSize((v_0) => v_0 - 1), parentDispose?.();
|
|
3374
3408
|
};
|
|
3375
|
-
}, [parentRegisterChild]);
|
|
3376
|
-
|
|
3377
|
-
|
|
3409
|
+
}, $[3] = parentRegisterChild, $[4] = setChildLayers, $[5] = t3) : t3 = $[5];
|
|
3410
|
+
const registerChild = t3;
|
|
3411
|
+
let t4, t5;
|
|
3412
|
+
$[6] !== parentRegisterChild || $[7] !== level ? (t4 = () => parentRegisterChild?.(level), t5 = [level, parentRegisterChild], $[6] = parentRegisterChild, $[7] = level, $[8] = t4, $[9] = t5) : (t4 = $[8], t5 = $[9]), useEffect(t4, t5);
|
|
3413
|
+
let t6, t7;
|
|
3414
|
+
$[10] !== isTopLayer || $[11] !== level || $[12] !== registerChild || $[13] !== size2 || $[14] !== zIndex ? (t7 = {
|
|
3378
3415
|
version: 0,
|
|
3379
3416
|
isTopLayer,
|
|
3380
3417
|
level,
|
|
3381
3418
|
registerChild,
|
|
3382
3419
|
size: size2,
|
|
3383
3420
|
zIndex
|
|
3384
|
-
}
|
|
3385
|
-
|
|
3421
|
+
}, $[10] = isTopLayer, $[11] = level, $[12] = registerChild, $[13] = size2, $[14] = zIndex, $[15] = t7) : t7 = $[15], t6 = t7;
|
|
3422
|
+
const value = t6;
|
|
3423
|
+
let t8;
|
|
3424
|
+
return $[16] !== value || $[17] !== children ? (t8 = /* @__PURE__ */ jsx(LayerContext.Provider, { value, children }), $[16] = value, $[17] = children, $[18] = t8) : t8 = $[18], t8;
|
|
3386
3425
|
}
|
|
3387
3426
|
LayerProvider.displayName = "LayerProvider";
|
|
3388
3427
|
const Root$j = styled.div({
|
|
@@ -4986,15 +5025,17 @@ function autocompleteReducer(state, msg2) {
|
|
|
4986
5025
|
} : state;
|
|
4987
5026
|
}
|
|
4988
5027
|
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 = forwardRef(function(props, forwardedRef) {
|
|
4989
|
-
const
|
|
4990
|
-
|
|
5028
|
+
const $ = c(187);
|
|
5029
|
+
let t0, t1, t2, t3, t4, t5, t6, valueProp, renderOptionProp, filterOptionProp, id, optionsProp, loading, onBlur, onQueryChange, relatedElements, onSelect, onChange, onFocus, openOnFocus, disabled, openButton, readOnly, suffix, restProps, customValidity, icon, prefix, renderPopover;
|
|
5030
|
+
$[0] !== props ? ({
|
|
5031
|
+
border: t0,
|
|
4991
5032
|
customValidity,
|
|
4992
5033
|
disabled,
|
|
4993
5034
|
filterOption: filterOptionProp,
|
|
4994
|
-
fontSize:
|
|
5035
|
+
fontSize: t1,
|
|
4995
5036
|
icon,
|
|
4996
5037
|
id,
|
|
4997
|
-
listBox
|
|
5038
|
+
listBox: t2,
|
|
4998
5039
|
loading,
|
|
4999
5040
|
onBlur,
|
|
5000
5041
|
onChange,
|
|
@@ -5004,39 +5045,63 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5004
5045
|
openButton,
|
|
5005
5046
|
openOnFocus,
|
|
5006
5047
|
options: optionsProp,
|
|
5007
|
-
padding:
|
|
5008
|
-
popover
|
|
5048
|
+
padding: t3,
|
|
5049
|
+
popover: t4,
|
|
5009
5050
|
prefix,
|
|
5010
|
-
radius
|
|
5051
|
+
radius: t5,
|
|
5011
5052
|
readOnly,
|
|
5012
5053
|
relatedElements,
|
|
5013
5054
|
renderOption: renderOptionProp,
|
|
5014
5055
|
renderPopover,
|
|
5015
|
-
renderValue
|
|
5056
|
+
renderValue: t6,
|
|
5016
5057
|
suffix,
|
|
5017
5058
|
value: valueProp,
|
|
5018
5059
|
...restProps
|
|
5019
|
-
} = props, [
|
|
5020
|
-
|
|
5060
|
+
} = props, $[0] = props, $[1] = t0, $[2] = t1, $[3] = t2, $[4] = t3, $[5] = t4, $[6] = t5, $[7] = t6, $[8] = valueProp, $[9] = renderOptionProp, $[10] = filterOptionProp, $[11] = id, $[12] = optionsProp, $[13] = loading, $[14] = onBlur, $[15] = onQueryChange, $[16] = relatedElements, $[17] = onSelect, $[18] = onChange, $[19] = onFocus, $[20] = openOnFocus, $[21] = disabled, $[22] = openButton, $[23] = readOnly, $[24] = suffix, $[25] = restProps, $[26] = customValidity, $[27] = icon, $[28] = prefix, $[29] = renderPopover) : (t0 = $[1], t1 = $[2], t2 = $[3], t3 = $[4], t4 = $[5], t5 = $[6], t6 = $[7], valueProp = $[8], renderOptionProp = $[9], filterOptionProp = $[10], id = $[11], optionsProp = $[12], loading = $[13], onBlur = $[14], onQueryChange = $[15], relatedElements = $[16], onSelect = $[17], onChange = $[18], onFocus = $[19], openOnFocus = $[20], disabled = $[21], openButton = $[22], readOnly = $[23], suffix = $[24], restProps = $[25], customValidity = $[26], icon = $[27], prefix = $[28], renderPopover = $[29]);
|
|
5061
|
+
const border2 = t0 === void 0 ? !0 : t0, fontSize2 = t1 === void 0 ? 2 : t1, listBox = t2 === void 0 ? EMPTY_RECORD : t2, paddingProp = t3 === void 0 ? 3 : t3, popover = t4 === void 0 ? EMPTY_RECORD : t4, radius = t5 === void 0 ? 2 : t5, renderValue = t6 === void 0 ? DEFAULT_RENDER_VALUE : t6, t7 = valueProp || null, t8 = valueProp || null;
|
|
5062
|
+
let t9;
|
|
5063
|
+
$[30] !== t7 || $[31] !== t8 ? (t9 = {
|
|
5064
|
+
activeValue: t7,
|
|
5021
5065
|
focused: !1,
|
|
5022
5066
|
listFocused: !1,
|
|
5023
5067
|
query: null,
|
|
5024
|
-
value:
|
|
5025
|
-
}
|
|
5068
|
+
value: t8
|
|
5069
|
+
}, $[30] = t7, $[31] = t8, $[32] = t9) : t9 = $[32];
|
|
5070
|
+
const [state, dispatch] = useReducer(autocompleteReducer, t9), {
|
|
5026
5071
|
activeValue,
|
|
5027
5072
|
focused,
|
|
5028
5073
|
listFocused,
|
|
5029
5074
|
query,
|
|
5030
5075
|
value
|
|
5031
|
-
} = state
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5076
|
+
} = state;
|
|
5077
|
+
let t10;
|
|
5078
|
+
$[33] !== paddingProp || $[34] !== fontSize2 ? (t10 = (t112) => {
|
|
5079
|
+
const {
|
|
5080
|
+
value: value_0
|
|
5081
|
+
} = t112;
|
|
5082
|
+
return /* @__PURE__ */ jsx(Card, { "data-as": "button", padding: paddingProp, radius: 2, tone: "inherit", children: /* @__PURE__ */ jsx(Text, { size: fontSize2, textOverflow: "ellipsis", children: value_0 }) });
|
|
5083
|
+
}, $[33] = paddingProp, $[34] = fontSize2, $[35] = t10) : t10 = $[35];
|
|
5084
|
+
const renderOption = typeof renderOptionProp == "function" ? renderOptionProp : t10, filterOption = typeof filterOptionProp == "function" ? filterOptionProp : DEFAULT_FILTER_OPTION, [rootElement, setRootElement] = useState(null), [resultsPopoverElement, setResultsPopoverElement] = useState(null), [inputElement, setInputElement] = useState(null), listBoxElementRef = useRef(null), listFocusedRef = useRef(!1), valueRef = useRef(value), valuePropRef = useRef(valueProp), [popoverMouseWithin, setPopoverMouseWithin] = useState(!1);
|
|
5085
|
+
let t11, t12;
|
|
5086
|
+
$[36] !== inputElement ? (t11 = () => inputElement, t12 = [inputElement], $[36] = inputElement, $[37] = t11, $[38] = t12) : (t11 = $[37], t12 = $[38]), useImperativeHandle(forwardedRef, t11, t12);
|
|
5087
|
+
const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY, padding = useArrayProp(paddingProp);
|
|
5088
|
+
let t13, t14;
|
|
5089
|
+
$[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;
|
|
5090
|
+
const currentOption = t13;
|
|
5091
|
+
let t15, t16;
|
|
5092
|
+
if ($[42] !== query || $[43] !== filterOption || $[44] !== options) {
|
|
5093
|
+
let t172;
|
|
5094
|
+
$[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;
|
|
5095
|
+
} else
|
|
5096
|
+
t16 = $[45];
|
|
5097
|
+
t15 = t16;
|
|
5098
|
+
const filteredOptions = t15, filteredOptionsLen = filteredOptions.length, activeItemId = activeValue ? `${id}-option-${activeValue}` : void 0, expanded = query !== null && loading || focused && query !== null;
|
|
5099
|
+
let t17;
|
|
5100
|
+
$[49] !== popoverMouseWithin || $[50] !== relatedElements || $[51] !== rootElement || $[52] !== resultsPopoverElement || $[53] !== onQueryChange || $[54] !== onBlur ? (t17 = (event) => {
|
|
5036
5101
|
setTimeout(() => {
|
|
5037
|
-
if (
|
|
5102
|
+
if (popoverMouseWithin)
|
|
5038
5103
|
return;
|
|
5039
|
-
const elements = (relatedElements || []).concat(
|
|
5104
|
+
const elements = (relatedElements || []).concat(rootElement ? [rootElement] : [], resultsPopoverElement ? [resultsPopoverElement] : []);
|
|
5040
5105
|
let focusInside = !1;
|
|
5041
5106
|
if (document.activeElement) {
|
|
5042
5107
|
for (const e of elements)
|
|
@@ -5047,22 +5112,32 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5047
5112
|
}
|
|
5048
5113
|
focusInside === !1 && (dispatch({
|
|
5049
5114
|
type: "root/blur"
|
|
5050
|
-
}),
|
|
5115
|
+
}), setPopoverMouseWithin(!1), onQueryChange && onQueryChange(null), onBlur && onBlur(event));
|
|
5051
5116
|
}, 0);
|
|
5052
|
-
}, [
|
|
5117
|
+
}, $[49] = popoverMouseWithin, $[50] = relatedElements, $[51] = rootElement, $[52] = resultsPopoverElement, $[53] = onQueryChange, $[54] = onBlur, $[55] = t17) : t17 = $[55];
|
|
5118
|
+
const handleRootBlur = t17;
|
|
5119
|
+
let t18;
|
|
5120
|
+
$[56] === Symbol.for("react.memo_cache_sentinel") ? (t18 = (event_0) => {
|
|
5053
5121
|
const listBoxElement = listBoxElementRef.current, focusedElement = event_0.target instanceof HTMLElement ? event_0.target : null, listFocused_0 = listBoxElement?.contains(focusedElement) || !1;
|
|
5054
5122
|
listFocused_0 !== listFocusedRef.current && (listFocusedRef.current = listFocused_0, dispatch({
|
|
5055
5123
|
type: "root/setListFocused",
|
|
5056
5124
|
listFocused: listFocused_0
|
|
5057
5125
|
}));
|
|
5058
|
-
}, []
|
|
5126
|
+
}, $[56] = t18) : t18 = $[56];
|
|
5127
|
+
const handleRootFocus = t18;
|
|
5128
|
+
let t19;
|
|
5129
|
+
$[57] !== onSelect || $[58] !== onChange || $[59] !== onQueryChange || $[60] !== inputElement ? (t19 = (v) => {
|
|
5059
5130
|
dispatch({
|
|
5060
5131
|
type: "value/change",
|
|
5061
5132
|
value: v
|
|
5062
|
-
}),
|
|
5063
|
-
}, [onChange,
|
|
5133
|
+
}), setPopoverMouseWithin(!1), onSelect && onSelect(v), valueRef.current = v, onChange && onChange(v), onQueryChange && onQueryChange(null), inputElement?.focus();
|
|
5134
|
+
}, $[57] = onSelect, $[58] = onChange, $[59] = onQueryChange, $[60] = inputElement, $[61] = t19) : t19 = $[61];
|
|
5135
|
+
const handleOptionSelect = t19;
|
|
5136
|
+
let t20;
|
|
5137
|
+
$[62] !== filteredOptionsLen || $[63] !== filteredOptions || $[64] !== activeValue || $[65] !== onQueryChange || $[66] !== inputElement ? (t20 = (event_1) => {
|
|
5064
5138
|
if (event_1.key === "ArrowDown") {
|
|
5065
|
-
if (event_1.preventDefault(), !filteredOptionsLen)
|
|
5139
|
+
if (event_1.preventDefault(), !filteredOptionsLen)
|
|
5140
|
+
return;
|
|
5066
5141
|
const activeOption = filteredOptions.find((o_0) => o_0.value === activeValue), activeIndex = activeOption ? filteredOptions.indexOf(activeOption) : -1, nextActiveOption = filteredOptions[(activeIndex + 1) % filteredOptionsLen];
|
|
5067
5142
|
nextActiveOption && dispatch({
|
|
5068
5143
|
type: "root/setActiveValue",
|
|
@@ -5072,7 +5147,8 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5072
5147
|
return;
|
|
5073
5148
|
}
|
|
5074
5149
|
if (event_1.key === "ArrowUp") {
|
|
5075
|
-
if (event_1.preventDefault(), !filteredOptionsLen)
|
|
5150
|
+
if (event_1.preventDefault(), !filteredOptionsLen)
|
|
5151
|
+
return;
|
|
5076
5152
|
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];
|
|
5077
5153
|
nextActiveOption_0 && dispatch({
|
|
5078
5154
|
type: "root/setActiveValue",
|
|
@@ -5084,43 +5160,66 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5084
5160
|
if (event_1.key === "Escape") {
|
|
5085
5161
|
dispatch({
|
|
5086
5162
|
type: "root/escape"
|
|
5087
|
-
}),
|
|
5163
|
+
}), setPopoverMouseWithin(!1), onQueryChange && onQueryChange(null), inputElement?.focus();
|
|
5088
5164
|
return;
|
|
5089
5165
|
}
|
|
5090
5166
|
const target = event_1.target, listEl = listBoxElementRef.current;
|
|
5091
5167
|
if ((listEl === target || listEl?.contains(target)) && !AUTOCOMPLETE_LISTBOX_IGNORE_KEYS.includes(event_1.key)) {
|
|
5092
|
-
|
|
5168
|
+
inputElement?.focus();
|
|
5093
5169
|
return;
|
|
5094
5170
|
}
|
|
5095
|
-
}, [
|
|
5171
|
+
}, $[62] = filteredOptionsLen, $[63] = filteredOptions, $[64] = activeValue, $[65] = onQueryChange, $[66] = inputElement, $[67] = t20) : t20 = $[67];
|
|
5172
|
+
const handleRootKeyDown = t20;
|
|
5173
|
+
let t21;
|
|
5174
|
+
$[68] !== onQueryChange ? (t21 = (event_2) => {
|
|
5096
5175
|
const nextQuery = event_2.currentTarget.value;
|
|
5097
5176
|
dispatch({
|
|
5098
5177
|
type: "input/change",
|
|
5099
5178
|
query: nextQuery
|
|
5100
5179
|
}), onQueryChange && onQueryChange(nextQuery);
|
|
5101
|
-
}, [onQueryChange
|
|
5180
|
+
}, $[68] = onQueryChange, $[69] = t21) : t21 = $[69];
|
|
5181
|
+
const handleInputChange = t21;
|
|
5182
|
+
let t22;
|
|
5183
|
+
$[70] !== value || $[71] !== renderValue || $[72] !== currentOption ? (t22 = () => {
|
|
5102
5184
|
dispatch({
|
|
5103
5185
|
type: "root/open",
|
|
5104
5186
|
query: value ? renderValue(value, currentOption) : ""
|
|
5105
5187
|
});
|
|
5106
|
-
}, [
|
|
5188
|
+
}, $[70] = value, $[71] = renderValue, $[72] = currentOption, $[73] = t22) : t22 = $[73];
|
|
5189
|
+
const dispatchOpen = t22;
|
|
5190
|
+
let t23;
|
|
5191
|
+
$[74] !== focused || $[75] !== onFocus || $[76] !== openOnFocus || $[77] !== dispatchOpen ? (t23 = (event_3) => {
|
|
5107
5192
|
focused || (dispatch({
|
|
5108
5193
|
type: "input/focus"
|
|
5109
5194
|
}), onFocus && onFocus(event_3), openOnFocus && dispatchOpen());
|
|
5110
|
-
}, [focused, onFocus, openOnFocus, dispatchOpen
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5195
|
+
}, $[74] = focused, $[75] = onFocus, $[76] = openOnFocus, $[77] = dispatchOpen, $[78] = t23) : t23 = $[78];
|
|
5196
|
+
const handleInputFocus = t23;
|
|
5197
|
+
let t24;
|
|
5198
|
+
$[79] === Symbol.for("react.memo_cache_sentinel") ? (t24 = () => {
|
|
5199
|
+
setPopoverMouseWithin(!0);
|
|
5200
|
+
}, $[79] = t24) : t24 = $[79];
|
|
5201
|
+
const handlePopoverMouseEnter = t24;
|
|
5202
|
+
let t25;
|
|
5203
|
+
$[80] === Symbol.for("react.memo_cache_sentinel") ? (t25 = () => {
|
|
5204
|
+
setPopoverMouseWithin(!1);
|
|
5205
|
+
}, $[80] = t25) : t25 = $[80];
|
|
5206
|
+
const handlePopoverMouseLeave = t25;
|
|
5207
|
+
let t26;
|
|
5208
|
+
$[81] !== onChange || $[82] !== onQueryChange || $[83] !== inputElement ? (t26 = () => {
|
|
5115
5209
|
dispatch({
|
|
5116
5210
|
type: "root/clear"
|
|
5117
|
-
}), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null),
|
|
5118
|
-
}, [onChange, onQueryChange]
|
|
5211
|
+
}), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null), inputElement?.focus();
|
|
5212
|
+
}, $[81] = onChange, $[82] = onQueryChange, $[83] = inputElement, $[84] = t26) : t26 = $[84];
|
|
5213
|
+
const handleClearButtonClick = t26;
|
|
5214
|
+
let t27;
|
|
5215
|
+
$[85] === Symbol.for("react.memo_cache_sentinel") ? (t27 = () => {
|
|
5119
5216
|
dispatch({
|
|
5120
5217
|
type: "input/focus"
|
|
5121
5218
|
});
|
|
5122
|
-
}, []);
|
|
5123
|
-
|
|
5219
|
+
}, $[85] = t27) : t27 = $[85];
|
|
5220
|
+
const handleClearButtonFocus = t27;
|
|
5221
|
+
let t28, t29;
|
|
5222
|
+
$[86] !== valueProp ? (t28 = () => {
|
|
5124
5223
|
if (valueProp !== valuePropRef.current) {
|
|
5125
5224
|
valuePropRef.current = valueProp, valueProp !== void 0 && (dispatch({
|
|
5126
5225
|
type: "value/change",
|
|
@@ -5132,14 +5231,19 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5132
5231
|
type: "value/change",
|
|
5133
5232
|
value: valueProp || null
|
|
5134
5233
|
}));
|
|
5135
|
-
}, [valueProp]), useEffect(
|
|
5234
|
+
}, t29 = [valueProp], $[86] = valueProp, $[87] = t28, $[88] = t29) : (t28 = $[87], t29 = $[88]), useEffect(t28, t29);
|
|
5235
|
+
let t30, t31;
|
|
5236
|
+
$[89] !== focused ? (t30 = () => {
|
|
5136
5237
|
!focused && valueRef.current && dispatch({
|
|
5137
5238
|
type: "root/setActiveValue",
|
|
5138
5239
|
value: valueRef.current
|
|
5139
5240
|
});
|
|
5140
|
-
}, [focused]), useEffect(
|
|
5241
|
+
}, t31 = [focused], $[89] = focused, $[90] = t30, $[91] = t31) : (t30 = $[90], t31 = $[91]), useEffect(t30, t31);
|
|
5242
|
+
let t32, t33;
|
|
5243
|
+
$[92] !== filteredOptions || $[93] !== activeValue ? (t32 = () => {
|
|
5141
5244
|
const listElement = listBoxElementRef.current;
|
|
5142
|
-
if (!listElement)
|
|
5245
|
+
if (!listElement)
|
|
5246
|
+
return;
|
|
5143
5247
|
const activeOption_1 = filteredOptions.find((o_2) => o_2.value === activeValue);
|
|
5144
5248
|
if (activeOption_1) {
|
|
5145
5249
|
const activeIndex_1 = filteredOptions.indexOf(activeOption_1), activeItemElement = listElement.childNodes[activeIndex_1];
|
|
@@ -5149,35 +5253,123 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5149
5253
|
focusFirstDescendant(activeItemElement);
|
|
5150
5254
|
}
|
|
5151
5255
|
}
|
|
5152
|
-
}, [activeValue, filteredOptions]);
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5256
|
+
}, t33 = [activeValue, filteredOptions], $[92] = filteredOptions, $[93] = activeValue, $[94] = t32, $[95] = t33) : (t32 = $[94], t33 = $[95]), useEffect(t32, t33);
|
|
5257
|
+
let t34;
|
|
5258
|
+
bb0: {
|
|
5259
|
+
if (!loading && !disabled && value) {
|
|
5260
|
+
let t352;
|
|
5261
|
+
$[96] === Symbol.for("react.memo_cache_sentinel") ? (t352 = {
|
|
5156
5262
|
"aria-label": "Clear",
|
|
5157
5263
|
onFocus: handleClearButtonFocus
|
|
5158
|
-
};
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
}
|
|
5177
|
-
|
|
5264
|
+
}, $[96] = t352) : t352 = $[96], t34 = t352;
|
|
5265
|
+
break bb0;
|
|
5266
|
+
}
|
|
5267
|
+
t34 = void 0;
|
|
5268
|
+
}
|
|
5269
|
+
const clearButton = t34;
|
|
5270
|
+
let t35, t36;
|
|
5271
|
+
if ($[97] !== padding) {
|
|
5272
|
+
let t372;
|
|
5273
|
+
$[99] === Symbol.for("react.memo_cache_sentinel") ? (t372 = (v_0) => v_0 === 0 ? 0 : v_0 === 1 || v_0 === 2 ? 1 : v_0 - 2, $[99] = t372) : t372 = $[99], t36 = padding.map(t372), $[97] = padding, $[98] = t36;
|
|
5274
|
+
} else
|
|
5275
|
+
t36 = $[98];
|
|
5276
|
+
t35 = t36;
|
|
5277
|
+
const openButtonBoxPadding = t35;
|
|
5278
|
+
let t37, t38;
|
|
5279
|
+
if ($[100] !== padding) {
|
|
5280
|
+
let t392;
|
|
5281
|
+
$[102] === Symbol.for("react.memo_cache_sentinel") ? (t392 = (v_1) => Math.max(v_1 - 1, 0), $[102] = t392) : t392 = $[102], t38 = padding.map(t392), $[100] = padding, $[101] = t38;
|
|
5282
|
+
} else
|
|
5283
|
+
t38 = $[101];
|
|
5284
|
+
t37 = t38;
|
|
5285
|
+
const openButtonPadding = t37;
|
|
5286
|
+
let t39;
|
|
5287
|
+
t39 = typeof openButton == "object" ? openButton : EMPTY_RECORD;
|
|
5288
|
+
const openButtonProps = t39;
|
|
5289
|
+
let t40;
|
|
5290
|
+
$[103] !== dispatchOpen || $[104] !== openButtonProps || $[105] !== inputElement ? (t40 = (event_4) => {
|
|
5291
|
+
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElement?.focus());
|
|
5292
|
+
}, $[103] = dispatchOpen, $[104] = openButtonProps, $[105] = inputElement, $[106] = t40) : t40 = $[106];
|
|
5293
|
+
const handleOpenClick = t40;
|
|
5294
|
+
let t41, t42;
|
|
5295
|
+
$[107] !== disabled || $[108] !== readOnly || $[109] !== openButton || $[110] !== expanded || $[111] !== fontSize2 || $[112] !== openButtonPadding || $[113] !== openButtonProps || $[114] !== handleOpenClick || $[115] !== openButtonBoxPadding ? (t42 = !disabled && !readOnly && openButton ? /* @__PURE__ */ jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsx(Button, { "aria-label": "Open", disabled: expanded, fontSize: fontSize2, icon: 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;
|
|
5296
|
+
const openButtonNode = t41;
|
|
5297
|
+
let t43;
|
|
5298
|
+
bb1: {
|
|
5299
|
+
if (query === null) {
|
|
5300
|
+
if (value !== null) {
|
|
5301
|
+
let t442;
|
|
5302
|
+
$[117] !== renderValue || $[118] !== value || $[119] !== currentOption ? (t442 = renderValue(value, currentOption), $[117] = renderValue, $[118] = value, $[119] = currentOption, $[120] = t442) : t442 = $[120], t43 = t442;
|
|
5303
|
+
break bb1;
|
|
5304
|
+
}
|
|
5305
|
+
t43 = "";
|
|
5306
|
+
break bb1;
|
|
5307
|
+
}
|
|
5308
|
+
t43 = query;
|
|
5309
|
+
}
|
|
5310
|
+
const inputValue = t43, t44 = loading && AnimatedSpinnerIcon, t45 = suffix || openButtonNode;
|
|
5311
|
+
let t46;
|
|
5312
|
+
$[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__ */ 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];
|
|
5313
|
+
const input = t46;
|
|
5314
|
+
let t47;
|
|
5315
|
+
$[143] !== listFocused || $[144] !== inputElement ? (t47 = (event_5) => {
|
|
5316
|
+
event_5.key === "Tab" && listFocused && inputElement?.focus();
|
|
5317
|
+
}, $[143] = listFocused, $[144] = inputElement, $[145] = t47) : t47 = $[145];
|
|
5318
|
+
const handleListBoxKeyDown = t47;
|
|
5319
|
+
let t48;
|
|
5320
|
+
bb2: {
|
|
5321
|
+
if (filteredOptions.length === 0) {
|
|
5322
|
+
t48 = null;
|
|
5323
|
+
break bb2;
|
|
5324
|
+
}
|
|
5325
|
+
let t492;
|
|
5326
|
+
if ($[146] !== activeValue || $[147] !== currentOption || $[148] !== id || $[149] !== handleOptionSelect || $[150] !== renderOption || $[151] !== loading || $[152] !== listFocused || $[153] !== filteredOptions) {
|
|
5327
|
+
let t503;
|
|
5328
|
+
$[155] !== activeValue || $[156] !== currentOption || $[157] !== id || $[158] !== handleOptionSelect || $[159] !== renderOption || $[160] !== loading || $[161] !== listFocused ? (t503 = (option_0) => {
|
|
5329
|
+
const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
|
|
5330
|
+
return /* @__PURE__ */ jsx(AutocompleteOption, { id: `${id}-option-${option_0.value}`, onSelect: handleOptionSelect, selected: active, value: option_0.value, children: cloneElement(renderOption(option_0), {
|
|
5331
|
+
disabled: loading,
|
|
5332
|
+
selected: active,
|
|
5333
|
+
tabIndex: listFocused && active ? 0 : -1
|
|
5334
|
+
}) }, option_0.value);
|
|
5335
|
+
}, $[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;
|
|
5336
|
+
} else
|
|
5337
|
+
t492 = $[154];
|
|
5338
|
+
let t502;
|
|
5339
|
+
$[163] !== listBoxId || $[164] !== t492 ? (t502 = /* @__PURE__ */ 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];
|
|
5340
|
+
let t51;
|
|
5341
|
+
$[166] !== handleListBoxKeyDown || $[167] !== listBox || $[168] !== t502 ? (t51 = /* @__PURE__ */ 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;
|
|
5342
|
+
}
|
|
5343
|
+
const content = t48;
|
|
5344
|
+
let t49;
|
|
5345
|
+
bb3: {
|
|
5346
|
+
if (renderPopover) {
|
|
5347
|
+
const t503 = !expanded;
|
|
5348
|
+
let t51;
|
|
5349
|
+
$[170] !== content || $[171] !== t503 || $[172] !== inputElement || $[173] !== resultsPopoverElement || $[174] !== renderPopover ? (t51 = renderPopover({
|
|
5350
|
+
content,
|
|
5351
|
+
hidden: t503,
|
|
5352
|
+
inputElement,
|
|
5353
|
+
onMouseEnter: handlePopoverMouseEnter,
|
|
5354
|
+
onMouseLeave: handlePopoverMouseLeave
|
|
5355
|
+
}, {
|
|
5356
|
+
current: resultsPopoverElement
|
|
5357
|
+
}), $[170] = content, $[171] = t503, $[172] = inputElement, $[173] = resultsPopoverElement, $[174] = renderPopover, $[175] = t51) : t51 = $[175], t49 = t51;
|
|
5358
|
+
break bb3;
|
|
5359
|
+
}
|
|
5360
|
+
if (filteredOptionsLen === 0) {
|
|
5361
|
+
t49 = null;
|
|
5362
|
+
break bb3;
|
|
5363
|
+
}
|
|
5364
|
+
let t502;
|
|
5365
|
+
$[176] !== content || $[177] !== expanded || $[178] !== radius || $[179] !== inputElement || $[180] !== popover ? (t502 = /* @__PURE__ */ 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;
|
|
5366
|
+
}
|
|
5367
|
+
const results = t49;
|
|
5368
|
+
let t50;
|
|
5369
|
+
return $[182] !== handleRootBlur || $[183] !== handleRootKeyDown || $[184] !== input || $[185] !== results ? (t50 = /* @__PURE__ */ jsxs(Root$9, { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: setRootElement, children: [
|
|
5178
5370
|
input,
|
|
5179
5371
|
results
|
|
5180
|
-
] });
|
|
5372
|
+
] }), $[182] = handleRootBlur, $[183] = handleRootKeyDown, $[184] = input, $[185] = results, $[186] = t50) : t50 = $[186], t50;
|
|
5181
5373
|
});
|
|
5182
5374
|
InnerAutocomplete.displayName = "ForwardRef(Autocomplete)";
|
|
5183
5375
|
const Autocomplete = InnerAutocomplete, Root$8 = styled.ol`
|
|
@@ -5733,8 +5925,8 @@ const Root$5 = styled(Box)`
|
|
|
5733
5925
|
});
|
|
5734
5926
|
Menu.displayName = "ForwardRef(Menu)";
|
|
5735
5927
|
const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
5736
|
-
const {
|
|
5737
|
-
__unstable_disableRestoreFocusOnClose:
|
|
5928
|
+
const $ = c(62), {
|
|
5929
|
+
__unstable_disableRestoreFocusOnClose: t0,
|
|
5738
5930
|
boundaryElement: deprecated_boundaryElement,
|
|
5739
5931
|
button: buttonProp,
|
|
5740
5932
|
id,
|
|
@@ -5743,23 +5935,38 @@ const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
|
5743
5935
|
onOpen,
|
|
5744
5936
|
placement: deprecated_placement,
|
|
5745
5937
|
popoverScheme: deprecated_popoverScheme,
|
|
5746
|
-
portal:
|
|
5938
|
+
portal: t1,
|
|
5747
5939
|
popover,
|
|
5748
5940
|
popoverRadius: deprecated_popoverRadius,
|
|
5749
5941
|
preventOverflow: deprecated_preventOverflow
|
|
5750
|
-
} = props, [open, setOpen] = useState(!1), [shouldFocus, setShouldFocus] = useState(null), [buttonElement, setButtonElement] = useState(null)
|
|
5751
|
-
|
|
5942
|
+
} = props, disableRestoreFocusOnClose = t0 === void 0 ? !1 : t0, deprecated_portal = t1 === void 0 ? !0 : t1, [open, setOpen] = useState(!1), [shouldFocus, setShouldFocus] = useState(null), [buttonElement, setButtonElement] = useState(null);
|
|
5943
|
+
let t2;
|
|
5944
|
+
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[0] = t2) : t2 = $[0];
|
|
5945
|
+
const [menuElements, setChildMenuElements] = useState(t2), openRef = useRef(open);
|
|
5946
|
+
let t3, t4;
|
|
5947
|
+
$[1] !== onOpen || $[2] !== open ? (t3 = () => {
|
|
5752
5948
|
onOpen && open && !openRef.current && onOpen();
|
|
5753
|
-
}, [onOpen, open]), useEffect(
|
|
5949
|
+
}, t4 = [onOpen, open], $[1] = onOpen, $[2] = open, $[3] = t3, $[4] = t4) : (t3 = $[3], t4 = $[4]), useEffect(t3, t4);
|
|
5950
|
+
let t5, t6;
|
|
5951
|
+
$[5] !== onClose || $[6] !== open ? (t5 = () => {
|
|
5754
5952
|
onClose && !open && openRef.current && onClose();
|
|
5755
|
-
}, [onClose, open]), useEffect(
|
|
5953
|
+
}, t6 = [onClose, open], $[5] = onClose, $[6] = open, $[7] = t5, $[8] = t6) : (t5 = $[7], t6 = $[8]), useEffect(t5, t6);
|
|
5954
|
+
let t7, t8;
|
|
5955
|
+
$[9] !== open ? (t7 = () => {
|
|
5756
5956
|
openRef.current = open;
|
|
5757
|
-
}, [open]);
|
|
5758
|
-
|
|
5957
|
+
}, t8 = [open], $[9] = open, $[10] = t7, $[11] = t8) : (t7 = $[10], t8 = $[11]), useEffect(t7, t8);
|
|
5958
|
+
let t9;
|
|
5959
|
+
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t9 = () => {
|
|
5759
5960
|
setOpen((v) => !v), setShouldFocus(null);
|
|
5760
|
-
}, []
|
|
5961
|
+
}, $[12] = t9) : t9 = $[12];
|
|
5962
|
+
const handleButtonClick = t9;
|
|
5963
|
+
let t10;
|
|
5964
|
+
$[13] !== open ? (t10 = (event) => {
|
|
5761
5965
|
open && event.preventDefault();
|
|
5762
|
-
}, [open
|
|
5966
|
+
}, $[13] = open, $[14] = t10) : t10 = $[14];
|
|
5967
|
+
const handleMouseDown = t10;
|
|
5968
|
+
let t11;
|
|
5969
|
+
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t11 = (event_0) => {
|
|
5763
5970
|
if (event_0.key === "ArrowDown" || event_0.key === "Enter" || event_0.key === " ") {
|
|
5764
5971
|
event_0.preventDefault(), setOpen(!0), setShouldFocus("first");
|
|
5765
5972
|
return;
|
|
@@ -5768,7 +5975,10 @@ const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
|
5768
5975
|
event_0.preventDefault(), setOpen(!0), setShouldFocus("last");
|
|
5769
5976
|
return;
|
|
5770
5977
|
}
|
|
5771
|
-
}, []
|
|
5978
|
+
}, $[15] = t11) : t11 = $[15];
|
|
5979
|
+
const handleButtonKeyDown = t11;
|
|
5980
|
+
let t12;
|
|
5981
|
+
$[16] !== buttonElement || $[17] !== menuElements ? (t12 = (event_1) => {
|
|
5772
5982
|
const target = event_1.target;
|
|
5773
5983
|
if (target instanceof Node && !(buttonElement && (target === buttonElement || buttonElement.contains(target)))) {
|
|
5774
5984
|
for (const el of menuElements)
|
|
@@ -5776,9 +5986,15 @@ const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
|
5776
5986
|
return;
|
|
5777
5987
|
setOpen(!1);
|
|
5778
5988
|
}
|
|
5779
|
-
}, [buttonElement, menuElements
|
|
5989
|
+
}, $[16] = buttonElement, $[17] = menuElements, $[18] = t12) : t12 = $[18];
|
|
5990
|
+
const handleMenuClickOutside = t12;
|
|
5991
|
+
let t13;
|
|
5992
|
+
$[19] !== disableRestoreFocusOnClose || $[20] !== buttonElement ? (t13 = () => {
|
|
5780
5993
|
setOpen(!1), !disableRestoreFocusOnClose && buttonElement && buttonElement.focus();
|
|
5781
|
-
}, [
|
|
5994
|
+
}, $[19] = disableRestoreFocusOnClose, $[20] = buttonElement, $[21] = t13) : t13 = $[21];
|
|
5995
|
+
const handleMenuEscape = t13;
|
|
5996
|
+
let t14;
|
|
5997
|
+
$[22] !== menuElements ? (t14 = (event_2) => {
|
|
5782
5998
|
const target_0 = event_2.relatedTarget;
|
|
5783
5999
|
if (target_0 instanceof Node) {
|
|
5784
6000
|
for (const el_0 of menuElements)
|
|
@@ -5786,9 +6002,18 @@ const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
|
5786
6002
|
return;
|
|
5787
6003
|
setOpen(!1);
|
|
5788
6004
|
}
|
|
5789
|
-
}, [menuElements
|
|
6005
|
+
}, $[22] = menuElements, $[23] = t14) : t14 = $[23];
|
|
6006
|
+
const handleBlur = t14;
|
|
6007
|
+
let t15;
|
|
6008
|
+
$[24] !== disableRestoreFocusOnClose || $[25] !== buttonElement ? (t15 = () => {
|
|
5790
6009
|
setOpen(!1), !disableRestoreFocusOnClose && buttonElement && buttonElement.focus();
|
|
5791
|
-
}, [
|
|
6010
|
+
}, $[24] = disableRestoreFocusOnClose, $[25] = buttonElement, $[26] = t15) : t15 = $[26];
|
|
6011
|
+
const handleItemClick = t15;
|
|
6012
|
+
let t16;
|
|
6013
|
+
$[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];
|
|
6014
|
+
const registerElement = t16;
|
|
6015
|
+
let t17;
|
|
6016
|
+
$[28] !== id || $[29] !== handleBlur || $[30] !== handleMenuClickOutside || $[31] !== handleMenuEscape || $[32] !== handleItemClick || $[33] !== buttonElement || $[34] !== shouldFocus || $[35] !== menuProp ? (t17 = menuProp && cloneElement(menuProp, {
|
|
5792
6017
|
"aria-labelledby": id,
|
|
5793
6018
|
onBlurCapture: handleBlur,
|
|
5794
6019
|
onClickOutside: handleMenuClickOutside,
|
|
@@ -5797,7 +6022,10 @@ const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
|
5797
6022
|
originElement: buttonElement,
|
|
5798
6023
|
registerElement,
|
|
5799
6024
|
shouldFocus
|
|
5800
|
-
}), [
|
|
6025
|
+
}), $[28] = id, $[29] = handleBlur, $[30] = handleMenuClickOutside, $[31] = handleMenuEscape, $[32] = handleItemClick, $[33] = buttonElement, $[34] = shouldFocus, $[35] = menuProp, $[36] = t17) : t17 = $[36];
|
|
6026
|
+
const menu = t17;
|
|
6027
|
+
let t18, t19;
|
|
6028
|
+
$[37] !== buttonProp || $[38] !== open || $[39] !== id || $[40] !== handleMouseDown ? (t19 = buttonProp && cloneElement(buttonProp, {
|
|
5801
6029
|
"data-ui": "MenuButton",
|
|
5802
6030
|
id,
|
|
5803
6031
|
onClick: handleButtonClick,
|
|
@@ -5805,14 +6033,16 @@ const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
|
5805
6033
|
onMouseDown: handleMouseDown,
|
|
5806
6034
|
"aria-haspopup": !0,
|
|
5807
6035
|
"aria-expanded": open,
|
|
5808
|
-
ref,
|
|
6036
|
+
ref: setButtonElement,
|
|
5809
6037
|
selected: buttonProp.props.selected ?? open
|
|
5810
|
-
}), [buttonProp,
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
6038
|
+
}), $[37] = buttonProp, $[38] = open, $[39] = id, $[40] = handleMouseDown, $[41] = t19) : t19 = $[41], t18 = t19;
|
|
6039
|
+
const button = t18;
|
|
6040
|
+
let t20, t21;
|
|
6041
|
+
$[42] !== buttonElement ? (t20 = () => buttonElement, t21 = [buttonElement], $[42] = buttonElement, $[43] = t20, $[44] = t21) : (t20 = $[43], t21 = $[44]), useImperativeHandle(forwardedRef, t20, t21);
|
|
6042
|
+
let t22, t23;
|
|
6043
|
+
$[45] !== popover ? (t23 = popover || {}, $[45] = popover, $[46] = t23) : t23 = $[46];
|
|
6044
|
+
let t24;
|
|
6045
|
+
$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !== deprecated_portal || $[50] !== deprecated_preventOverflow || $[51] !== deprecated_popoverRadius || $[52] !== deprecated_popoverScheme || $[53] !== t23 ? (t24 = {
|
|
5816
6046
|
boundaryElement: deprecated_boundaryElement,
|
|
5817
6047
|
overflow: "auto",
|
|
5818
6048
|
placement: deprecated_placement,
|
|
@@ -5820,9 +6050,13 @@ const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
|
5820
6050
|
preventOverflow: deprecated_preventOverflow,
|
|
5821
6051
|
radius: deprecated_popoverRadius,
|
|
5822
6052
|
scheme: deprecated_popoverScheme,
|
|
5823
|
-
...
|
|
5824
|
-
}
|
|
5825
|
-
|
|
6053
|
+
...t23
|
|
6054
|
+
}, $[47] = deprecated_boundaryElement, $[48] = deprecated_placement, $[49] = deprecated_portal, $[50] = deprecated_preventOverflow, $[51] = deprecated_popoverRadius, $[52] = deprecated_popoverScheme, $[53] = t23, $[54] = t24) : t24 = $[54], t22 = t24;
|
|
6055
|
+
const popoverProps = t22;
|
|
6056
|
+
let t25;
|
|
6057
|
+
$[55] !== button ? (t25 = button || /* @__PURE__ */ jsx(Fragment, {}), $[55] = button, $[56] = t25) : t25 = $[56];
|
|
6058
|
+
let t26;
|
|
6059
|
+
return $[57] !== popoverProps || $[58] !== menu || $[59] !== open || $[60] !== t25 ? (t26 = /* @__PURE__ */ jsx(Popover, { "data-ui": "MenuButton__popover", ...popoverProps, content: menu, open, children: t25 }), $[57] = popoverProps, $[58] = menu, $[59] = open, $[60] = t25, $[61] = t26) : t26 = $[61], t26;
|
|
5826
6060
|
});
|
|
5827
6061
|
MenuButton.displayName = "ForwardRef(MenuButton)";
|
|
5828
6062
|
const MenuDivider = styled.hr`
|
|
@@ -6460,7 +6694,12 @@ function _temp() {
|
|
|
6460
6694
|
return !0;
|
|
6461
6695
|
}
|
|
6462
6696
|
const subscribe = () => () => {
|
|
6463
|
-
}, ToastContext = createGlobalScopedContext("@sanity/ui/context/toast", null)
|
|
6697
|
+
}, ToastContext = createGlobalScopedContext("@sanity/ui/context/toast", null);
|
|
6698
|
+
let toastId = 0;
|
|
6699
|
+
function generateToastId() {
|
|
6700
|
+
return String(toastId++);
|
|
6701
|
+
}
|
|
6702
|
+
const Root$1 = styled(Layer)`
|
|
6464
6703
|
position: fixed;
|
|
6465
6704
|
top: 0;
|
|
6466
6705
|
left: 0;
|
|
@@ -6475,31 +6714,44 @@ const subscribe = () => () => {
|
|
|
6475
6714
|
max-width: 420px;
|
|
6476
6715
|
width: 100%;
|
|
6477
6716
|
`;
|
|
6478
|
-
let toastId = 0;
|
|
6479
6717
|
function ToastProvider(props) {
|
|
6480
|
-
const {
|
|
6718
|
+
const $ = c(24), {
|
|
6481
6719
|
children,
|
|
6482
|
-
padding
|
|
6720
|
+
padding: t0,
|
|
6483
6721
|
paddingX,
|
|
6484
6722
|
paddingY,
|
|
6485
6723
|
zOffset
|
|
6486
|
-
} = props,
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6724
|
+
} = props, padding = t0 === void 0 ? 4 : t0;
|
|
6725
|
+
let t1;
|
|
6726
|
+
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t1 = [], $[0] = t1) : t1 = $[0];
|
|
6727
|
+
const [state, _setState] = useState(t1);
|
|
6728
|
+
let t2;
|
|
6729
|
+
$[1] === Symbol.for("react.memo_cache_sentinel") ? (t2 = {}, $[1] = t2) : t2 = $[1];
|
|
6730
|
+
const toastsRef = useRef(t2), mounted = useMounted(), prefersReducedMotion = usePrefersReducedMotion();
|
|
6731
|
+
let t3, t4, t5;
|
|
6732
|
+
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t4 = {
|
|
6733
|
+
opacity: 0,
|
|
6734
|
+
[POPOVER_MOTION_CONTENT_OPACITY_PROPERTY]: 0,
|
|
6735
|
+
y: 32,
|
|
6736
|
+
scale: 0.25,
|
|
6737
|
+
willChange: "transform"
|
|
6738
|
+
}, t5 = [0, 1, 1], $[2] = t4, $[3] = t5) : (t4 = $[2], t5 = $[3]);
|
|
6739
|
+
let t6, t7;
|
|
6740
|
+
$[4] === Symbol.for("react.memo_cache_sentinel") ? (t6 = {
|
|
6741
|
+
opacity: t5,
|
|
6742
|
+
[POPOVER_MOTION_CONTENT_OPACITY_PROPERTY]: [0, 0, 1],
|
|
6743
|
+
y: 0,
|
|
6744
|
+
scale: 1
|
|
6745
|
+
}, t7 = [1, 1, 0], $[4] = t6, $[5] = t7) : (t6 = $[4], t7 = $[5]);
|
|
6746
|
+
let t8;
|
|
6747
|
+
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t8 = [1, 0, 0], $[6] = t8) : t8 = $[6];
|
|
6748
|
+
let t9;
|
|
6749
|
+
$[7] !== prefersReducedMotion ? (t9 = {
|
|
6750
|
+
initial: t4,
|
|
6751
|
+
animate: t6,
|
|
6500
6752
|
exit: {
|
|
6501
|
-
opacity:
|
|
6502
|
-
[POPOVER_MOTION_CONTENT_OPACITY_PROPERTY]:
|
|
6753
|
+
opacity: t7,
|
|
6754
|
+
[POPOVER_MOTION_CONTENT_OPACITY_PROPERTY]: t8,
|
|
6503
6755
|
scale: 0.5,
|
|
6504
6756
|
transition: prefersReducedMotion ? {
|
|
6505
6757
|
duration: 0
|
|
@@ -6507,10 +6759,13 @@ function ToastProvider(props) {
|
|
|
6507
6759
|
duration: 0.2
|
|
6508
6760
|
}
|
|
6509
6761
|
}
|
|
6510
|
-
}
|
|
6762
|
+
}, $[7] = prefersReducedMotion, $[8] = t9) : t9 = $[8], t3 = t9;
|
|
6763
|
+
const variants = t3;
|
|
6764
|
+
let t10, t11;
|
|
6765
|
+
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t11 = {
|
|
6511
6766
|
version: 0,
|
|
6512
6767
|
push: (params) => {
|
|
6513
|
-
const setState = (state_0) => startTransition(() => _setState(state_0)), id = params.id ||
|
|
6768
|
+
const setState = (state_0) => startTransition(() => _setState(state_0)), id = params.id || generateToastId(), duration = params.duration || 5e3, dismiss = () => {
|
|
6514
6769
|
const timeoutId = toastsRef.current[id]?.timeoutId;
|
|
6515
6770
|
setState((prevState) => {
|
|
6516
6771
|
const idx = prevState.findIndex((t) => t.id === id);
|
|
@@ -6532,27 +6787,36 @@ function ToastProvider(props) {
|
|
|
6532
6787
|
timeoutId: setTimeout(dismiss, duration)
|
|
6533
6788
|
}, id;
|
|
6534
6789
|
}
|
|
6535
|
-
}
|
|
6536
|
-
|
|
6790
|
+
}, $[9] = t11) : t11 = $[9], t10 = t11;
|
|
6791
|
+
const value = t10;
|
|
6792
|
+
let t12, t13;
|
|
6793
|
+
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t12 = () => () => {
|
|
6537
6794
|
for (const {
|
|
6538
6795
|
timeoutId: timeoutId_0
|
|
6539
6796
|
} of Object.values(toastsRef.current))
|
|
6540
6797
|
clearTimeout(timeoutId_0);
|
|
6541
6798
|
toastsRef.current = {};
|
|
6542
|
-
}, []
|
|
6543
|
-
|
|
6544
|
-
|
|
6799
|
+
}, t13 = [], $[10] = t12, $[11] = t13) : (t12 = $[10], t13 = $[11]), useEffect(t12, t13);
|
|
6800
|
+
let t14;
|
|
6801
|
+
$[12] !== mounted || $[13] !== variants || $[14] !== prefersReducedMotion || $[15] !== state || $[16] !== padding || $[17] !== paddingX || $[18] !== paddingY || $[19] !== zOffset ? (t14 = mounted && /* @__PURE__ */ jsx(Root$1, { "data-ui": "ToastProvider", zOffset, children: /* @__PURE__ */ jsx(ToastContainer, { children: /* @__PURE__ */ jsx(Box, { padding, paddingX, paddingY, children: /* @__PURE__ */ jsx(AnimatePresence, { initial: !1, children: state.map((t152) => {
|
|
6802
|
+
const {
|
|
6545
6803
|
dismiss: dismiss_0,
|
|
6546
6804
|
id: id_0,
|
|
6547
6805
|
params: params_0
|
|
6548
|
-
}
|
|
6806
|
+
} = t152;
|
|
6807
|
+
return /* @__PURE__ */ jsx(motion.div, { layout: "position", initial: "initial", animate: "animate", exit: "exit", variants, transition: prefersReducedMotion ? {
|
|
6549
6808
|
duration: 0
|
|
6550
6809
|
} : {
|
|
6551
6810
|
type: "spring",
|
|
6552
6811
|
damping: 30,
|
|
6553
6812
|
stiffness: 400
|
|
6554
|
-
}, children: /* @__PURE__ */ 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)
|
|
6555
|
-
|
|
6813
|
+
}, children: /* @__PURE__ */ 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);
|
|
6814
|
+
}) }) }) }) }), $[12] = mounted, $[13] = variants, $[14] = prefersReducedMotion, $[15] = state, $[16] = padding, $[17] = paddingX, $[18] = paddingY, $[19] = zOffset, $[20] = t14) : t14 = $[20];
|
|
6815
|
+
let t15;
|
|
6816
|
+
return $[21] !== children || $[22] !== t14 ? (t15 = /* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
|
|
6817
|
+
children,
|
|
6818
|
+
t14
|
|
6819
|
+
] }), $[21] = children, $[22] = t14, $[23] = t15) : t15 = $[23], t15;
|
|
6556
6820
|
}
|
|
6557
6821
|
ToastProvider.displayName = "ToastProvider";
|
|
6558
6822
|
function useToast() {
|