@dust-tt/sparkle 0.2.269 → 0.2.270
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/cjs/index.js +1252 -354
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/ScrollArea.d.ts +6 -0
- package/dist/esm/components/ScrollArea.d.ts.map +1 -0
- package/dist/esm/components/ScrollArea.js +22 -0
- package/dist/esm/components/ScrollArea.js.map +1 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/stories/Popover.stories.d.ts +1 -0
- package/dist/esm/stories/Popover.stories.d.ts.map +1 -1
- package/dist/esm/stories/Popover.stories.js +11 -1
- package/dist/esm/stories/Popover.stories.js.map +1 -1
- package/dist/esm/stories/ScrollArea.stories.d.ts +13 -0
- package/dist/esm/stories/ScrollArea.stories.d.ts.map +1 -0
- package/dist/esm/stories/ScrollArea.stories.js +44 -0
- package/dist/esm/stories/ScrollArea.stories.js.map +1 -0
- package/dist/sparkle.css +71 -0
- package/package.json +2 -1
- package/src/components/ScrollArea.tsx +46 -0
- package/src/components/index.ts +1 -0
- package/src/stories/Popover.stories.tsx +25 -0
- package/src/stories/ScrollArea.stories.tsx +84 -0
package/dist/cjs/index.js
CHANGED
|
@@ -43030,7 +43030,7 @@ Avatar.Stack = function (_a) {
|
|
|
43030
43030
|
};
|
|
43031
43031
|
|
|
43032
43032
|
// packages/core/primitive/src/primitive.tsx
|
|
43033
|
-
function composeEventHandlers$
|
|
43033
|
+
function composeEventHandlers$6(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
43034
43034
|
return function handleEvent(event) {
|
|
43035
43035
|
originalEventHandler?.(event);
|
|
43036
43036
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -43040,22 +43040,22 @@ function composeEventHandlers$5(originalEventHandler, ourEventHandler, { checkFo
|
|
|
43040
43040
|
}
|
|
43041
43041
|
|
|
43042
43042
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
43043
|
-
function setRef$
|
|
43043
|
+
function setRef$8(ref, value) {
|
|
43044
43044
|
if (typeof ref === "function") {
|
|
43045
43045
|
ref(value);
|
|
43046
43046
|
} else if (ref !== null && ref !== void 0) {
|
|
43047
43047
|
ref.current = value;
|
|
43048
43048
|
}
|
|
43049
43049
|
}
|
|
43050
|
-
function composeRefs$
|
|
43051
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
43050
|
+
function composeRefs$8(...refs) {
|
|
43051
|
+
return (node) => refs.forEach((ref) => setRef$8(ref, node));
|
|
43052
43052
|
}
|
|
43053
|
-
function useComposedRefs$
|
|
43054
|
-
return React__namespace.useCallback(composeRefs$
|
|
43053
|
+
function useComposedRefs$6(...refs) {
|
|
43054
|
+
return React__namespace.useCallback(composeRefs$8(...refs), refs);
|
|
43055
43055
|
}
|
|
43056
43056
|
|
|
43057
43057
|
// packages/react/context/src/createContext.tsx
|
|
43058
|
-
function createContextScope$
|
|
43058
|
+
function createContextScope$d(scopeName, createContextScopeDeps = []) {
|
|
43059
43059
|
let defaultContexts = [];
|
|
43060
43060
|
function createContext3(rootComponentName, defaultContext) {
|
|
43061
43061
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -43090,9 +43090,9 @@ function createContextScope$c(scopeName, createContextScopeDeps = []) {
|
|
|
43090
43090
|
};
|
|
43091
43091
|
};
|
|
43092
43092
|
createScope.scopeName = scopeName;
|
|
43093
|
-
return [createContext3, composeContextScopes$
|
|
43093
|
+
return [createContext3, composeContextScopes$d(createScope, ...createContextScopeDeps)];
|
|
43094
43094
|
}
|
|
43095
|
-
function composeContextScopes$
|
|
43095
|
+
function composeContextScopes$d(...scopes) {
|
|
43096
43096
|
const baseScope = scopes[0];
|
|
43097
43097
|
if (scopes.length === 1) return baseScope;
|
|
43098
43098
|
const createScope = () => {
|
|
@@ -74022,15 +74022,15 @@ var reactDomExports = reactDom.exports;
|
|
|
74022
74022
|
var ReactDOM = /*@__PURE__*/getDefaultExportFromCjs(reactDomExports);
|
|
74023
74023
|
|
|
74024
74024
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
74025
|
-
function setRef$
|
|
74025
|
+
function setRef$7(ref, value) {
|
|
74026
74026
|
if (typeof ref === "function") {
|
|
74027
74027
|
ref(value);
|
|
74028
74028
|
} else if (ref !== null && ref !== void 0) {
|
|
74029
74029
|
ref.current = value;
|
|
74030
74030
|
}
|
|
74031
74031
|
}
|
|
74032
|
-
function composeRefs$
|
|
74033
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
74032
|
+
function composeRefs$7(...refs) {
|
|
74033
|
+
return (node) => refs.forEach((ref) => setRef$7(ref, node));
|
|
74034
74034
|
}
|
|
74035
74035
|
|
|
74036
74036
|
// packages/react/slot/src/Slot.tsx
|
|
@@ -74060,7 +74060,7 @@ var SlotClone = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
74060
74060
|
return React__namespace.cloneElement(children, {
|
|
74061
74061
|
...mergeProps(slotProps, children.props),
|
|
74062
74062
|
// @ts-ignore
|
|
74063
|
-
ref: forwardedRef ? composeRefs$
|
|
74063
|
+
ref: forwardedRef ? composeRefs$7(forwardedRef, childrenRef) : childrenRef
|
|
74064
74064
|
});
|
|
74065
74065
|
}
|
|
74066
74066
|
return React__namespace.Children.count(children) > 1 ? React__namespace.Children.only(null) : null;
|
|
@@ -74110,7 +74110,7 @@ function getElementRef$1(element) {
|
|
|
74110
74110
|
}
|
|
74111
74111
|
|
|
74112
74112
|
// packages/react/primitive/src/Primitive.tsx
|
|
74113
|
-
var NODES$
|
|
74113
|
+
var NODES$8 = [
|
|
74114
74114
|
"a",
|
|
74115
74115
|
"button",
|
|
74116
74116
|
"div",
|
|
@@ -74128,7 +74128,7 @@ var NODES$7 = [
|
|
|
74128
74128
|
"svg",
|
|
74129
74129
|
"ul"
|
|
74130
74130
|
];
|
|
74131
|
-
var Primitive$
|
|
74131
|
+
var Primitive$8 = NODES$8.reduce((primitive, node) => {
|
|
74132
74132
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
74133
74133
|
const { asChild, ...primitiveProps } = props;
|
|
74134
74134
|
const Comp = asChild ? Slot : node;
|
|
@@ -74145,7 +74145,7 @@ function dispatchDiscreteCustomEvent$2(target, event) {
|
|
|
74145
74145
|
}
|
|
74146
74146
|
|
|
74147
74147
|
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
74148
|
-
function useCallbackRef$
|
|
74148
|
+
function useCallbackRef$7(callback) {
|
|
74149
74149
|
const callbackRef = React__namespace.useRef(callback);
|
|
74150
74150
|
React__namespace.useEffect(() => {
|
|
74151
74151
|
callbackRef.current = callback;
|
|
@@ -74155,7 +74155,7 @@ function useCallbackRef$6(callback) {
|
|
|
74155
74155
|
|
|
74156
74156
|
// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx
|
|
74157
74157
|
function useEscapeKeydown$2(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
74158
|
-
const onEscapeKeyDown = useCallbackRef$
|
|
74158
|
+
const onEscapeKeyDown = useCallbackRef$7(onEscapeKeyDownProp);
|
|
74159
74159
|
React__namespace.useEffect(() => {
|
|
74160
74160
|
const handleKeyDown = (event) => {
|
|
74161
74161
|
if (event.key === "Escape") {
|
|
@@ -74192,7 +74192,7 @@ var DismissableLayer$2 = React__namespace.forwardRef(
|
|
|
74192
74192
|
const [node, setNode] = React__namespace.useState(null);
|
|
74193
74193
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
74194
74194
|
const [, force] = React__namespace.useState({});
|
|
74195
|
-
const composedRefs = useComposedRefs$
|
|
74195
|
+
const composedRefs = useComposedRefs$6(forwardedRef, (node2) => setNode(node2));
|
|
74196
74196
|
const layers = Array.from(context.layers);
|
|
74197
74197
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
74198
74198
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
@@ -74255,7 +74255,7 @@ var DismissableLayer$2 = React__namespace.forwardRef(
|
|
|
74255
74255
|
return () => document.removeEventListener(CONTEXT_UPDATE$2, handleUpdate);
|
|
74256
74256
|
}, []);
|
|
74257
74257
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
74258
|
-
Primitive$
|
|
74258
|
+
Primitive$8.div,
|
|
74259
74259
|
{
|
|
74260
74260
|
...layerProps,
|
|
74261
74261
|
ref: composedRefs,
|
|
@@ -74263,9 +74263,9 @@ var DismissableLayer$2 = React__namespace.forwardRef(
|
|
|
74263
74263
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
74264
74264
|
...props.style
|
|
74265
74265
|
},
|
|
74266
|
-
onFocusCapture: composeEventHandlers$
|
|
74267
|
-
onBlurCapture: composeEventHandlers$
|
|
74268
|
-
onPointerDownCapture: composeEventHandlers$
|
|
74266
|
+
onFocusCapture: composeEventHandlers$6(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
74267
|
+
onBlurCapture: composeEventHandlers$6(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
74268
|
+
onPointerDownCapture: composeEventHandlers$6(
|
|
74269
74269
|
props.onPointerDownCapture,
|
|
74270
74270
|
pointerDownOutside.onPointerDownCapture
|
|
74271
74271
|
)
|
|
@@ -74278,7 +74278,7 @@ var BRANCH_NAME$2 = "DismissableLayerBranch";
|
|
|
74278
74278
|
var DismissableLayerBranch$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
74279
74279
|
const context = React__namespace.useContext(DismissableLayerContext$2);
|
|
74280
74280
|
const ref = React__namespace.useRef(null);
|
|
74281
|
-
const composedRefs = useComposedRefs$
|
|
74281
|
+
const composedRefs = useComposedRefs$6(forwardedRef, ref);
|
|
74282
74282
|
React__namespace.useEffect(() => {
|
|
74283
74283
|
const node = ref.current;
|
|
74284
74284
|
if (node) {
|
|
@@ -74288,11 +74288,11 @@ var DismissableLayerBranch$2 = React__namespace.forwardRef((props, forwardedRef)
|
|
|
74288
74288
|
};
|
|
74289
74289
|
}
|
|
74290
74290
|
}, [context.branches]);
|
|
74291
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
74291
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$8.div, { ...props, ref: composedRefs });
|
|
74292
74292
|
});
|
|
74293
74293
|
DismissableLayerBranch$2.displayName = BRANCH_NAME$2;
|
|
74294
74294
|
function usePointerDownOutside$2(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
74295
|
-
const handlePointerDownOutside = useCallbackRef$
|
|
74295
|
+
const handlePointerDownOutside = useCallbackRef$7(onPointerDownOutside);
|
|
74296
74296
|
const isPointerInsideReactTreeRef = React__namespace.useRef(false);
|
|
74297
74297
|
const handleClickRef = React__namespace.useRef(() => {
|
|
74298
74298
|
});
|
|
@@ -74335,7 +74335,7 @@ function usePointerDownOutside$2(onPointerDownOutside, ownerDocument = globalThi
|
|
|
74335
74335
|
};
|
|
74336
74336
|
}
|
|
74337
74337
|
function useFocusOutside$2(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
74338
|
-
const handleFocusOutside = useCallbackRef$
|
|
74338
|
+
const handleFocusOutside = useCallbackRef$7(onFocusOutside);
|
|
74339
74339
|
const isFocusInsideReactTreeRef = React__namespace.useRef(false);
|
|
74340
74340
|
React__namespace.useEffect(() => {
|
|
74341
74341
|
const handleFocus = (event) => {
|
|
@@ -74370,7 +74370,7 @@ function handleAndDispatchCustomEvent$2(name, handler, detail, { discrete }) {
|
|
|
74370
74370
|
}
|
|
74371
74371
|
|
|
74372
74372
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
74373
|
-
var useLayoutEffect2$
|
|
74373
|
+
var useLayoutEffect2$7 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
74374
74374
|
};
|
|
74375
74375
|
|
|
74376
74376
|
// packages/react/id/src/id.tsx
|
|
@@ -74378,7 +74378,7 @@ var useReactId$4 = React__namespace["useId".toString()] || (() => void 0);
|
|
|
74378
74378
|
var count$7 = 0;
|
|
74379
74379
|
function useId$4(deterministicId) {
|
|
74380
74380
|
const [id, setId] = React__namespace.useState(useReactId$4());
|
|
74381
|
-
useLayoutEffect2$
|
|
74381
|
+
useLayoutEffect2$7(() => {
|
|
74382
74382
|
if (!deterministicId) setId((reactId) => reactId ?? String(count$7++));
|
|
74383
74383
|
}, [deterministicId]);
|
|
74384
74384
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
@@ -74403,7 +74403,7 @@ const oppositeAlignmentMap = {
|
|
|
74403
74403
|
start: 'end',
|
|
74404
74404
|
end: 'start'
|
|
74405
74405
|
};
|
|
74406
|
-
function clamp(start, value, end) {
|
|
74406
|
+
function clamp$1(start, value, end) {
|
|
74407
74407
|
return max$1(start, min$1(value, end));
|
|
74408
74408
|
}
|
|
74409
74409
|
function evaluate(value, param) {
|
|
@@ -74776,7 +74776,7 @@ const arrow$2 = options => ({
|
|
|
74776
74776
|
const min$1$1 = minPadding;
|
|
74777
74777
|
const max = clientSize - arrowDimensions[length] - maxPadding;
|
|
74778
74778
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
74779
|
-
const offset = clamp(min$1$1, center, max);
|
|
74779
|
+
const offset = clamp$1(min$1$1, center, max);
|
|
74780
74780
|
|
|
74781
74781
|
// If the reference is small enough that the arrow's padding causes it to
|
|
74782
74782
|
// to point to nothing for an aligned placement, adjust the offset of the
|
|
@@ -75103,14 +75103,14 @@ const shift$1 = function (options) {
|
|
|
75103
75103
|
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
75104
75104
|
const min = mainAxisCoord + overflow[minSide];
|
|
75105
75105
|
const max = mainAxisCoord - overflow[maxSide];
|
|
75106
|
-
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
75106
|
+
mainAxisCoord = clamp$1(min, mainAxisCoord, max);
|
|
75107
75107
|
}
|
|
75108
75108
|
if (checkCrossAxis) {
|
|
75109
75109
|
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
|
75110
75110
|
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
75111
75111
|
const min = crossAxisCoord + overflow[minSide];
|
|
75112
75112
|
const max = crossAxisCoord - overflow[maxSide];
|
|
75113
|
-
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
75113
|
+
crossAxisCoord = clamp$1(min, crossAxisCoord, max);
|
|
75114
75114
|
}
|
|
75115
75115
|
const limitedCoords = limiter.fn({
|
|
75116
75116
|
...state,
|
|
@@ -76338,7 +76338,7 @@ var NAME$5 = "Arrow";
|
|
|
76338
76338
|
var Arrow$5 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
76339
76339
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
76340
76340
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
76341
|
-
Primitive$
|
|
76341
|
+
Primitive$8.svg,
|
|
76342
76342
|
{
|
|
76343
76343
|
...arrowProps,
|
|
76344
76344
|
ref: forwardedRef,
|
|
@@ -76351,10 +76351,10 @@ var Arrow$5 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
76351
76351
|
);
|
|
76352
76352
|
});
|
|
76353
76353
|
Arrow$5.displayName = NAME$5;
|
|
76354
|
-
var Root$
|
|
76354
|
+
var Root$9 = Arrow$5;
|
|
76355
76355
|
|
|
76356
76356
|
// packages/react/context/src/createContext.tsx
|
|
76357
|
-
function createContextScope$
|
|
76357
|
+
function createContextScope$c(scopeName, createContextScopeDeps = []) {
|
|
76358
76358
|
let defaultContexts = [];
|
|
76359
76359
|
function createContext3(rootComponentName, defaultContext) {
|
|
76360
76360
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -76389,9 +76389,9 @@ function createContextScope$b(scopeName, createContextScopeDeps = []) {
|
|
|
76389
76389
|
};
|
|
76390
76390
|
};
|
|
76391
76391
|
createScope.scopeName = scopeName;
|
|
76392
|
-
return [createContext3, composeContextScopes$
|
|
76392
|
+
return [createContext3, composeContextScopes$c(createScope, ...createContextScopeDeps)];
|
|
76393
76393
|
}
|
|
76394
|
-
function composeContextScopes$
|
|
76394
|
+
function composeContextScopes$c(...scopes) {
|
|
76395
76395
|
const baseScope = scopes[0];
|
|
76396
76396
|
if (scopes.length === 1) return baseScope;
|
|
76397
76397
|
const createScope = () => {
|
|
@@ -76415,7 +76415,7 @@ function composeContextScopes$b(...scopes) {
|
|
|
76415
76415
|
// packages/react/use-size/src/useSize.tsx
|
|
76416
76416
|
function useSize$4(element) {
|
|
76417
76417
|
const [size, setSize] = React__namespace.useState(void 0);
|
|
76418
|
-
useLayoutEffect2$
|
|
76418
|
+
useLayoutEffect2$7(() => {
|
|
76419
76419
|
if (element) {
|
|
76420
76420
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
76421
76421
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -76449,7 +76449,7 @@ function useSize$4(element) {
|
|
|
76449
76449
|
}
|
|
76450
76450
|
|
|
76451
76451
|
var POPPER_NAME$2 = "Popper";
|
|
76452
|
-
var [createPopperContext$2, createPopperScope$2] = createContextScope$
|
|
76452
|
+
var [createPopperContext$2, createPopperScope$2] = createContextScope$c(POPPER_NAME$2);
|
|
76453
76453
|
var [PopperProvider$2, usePopperContext$2] = createPopperContext$2(POPPER_NAME$2);
|
|
76454
76454
|
var Popper$2 = (props) => {
|
|
76455
76455
|
const { __scopePopper, children } = props;
|
|
@@ -76463,11 +76463,11 @@ var PopperAnchor$2 = React__namespace.forwardRef(
|
|
|
76463
76463
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
76464
76464
|
const context = usePopperContext$2(ANCHOR_NAME$4, __scopePopper);
|
|
76465
76465
|
const ref = React__namespace.useRef(null);
|
|
76466
|
-
const composedRefs = useComposedRefs$
|
|
76466
|
+
const composedRefs = useComposedRefs$6(forwardedRef, ref);
|
|
76467
76467
|
React__namespace.useEffect(() => {
|
|
76468
76468
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
76469
76469
|
});
|
|
76470
|
-
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
76470
|
+
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$8.div, { ...anchorProps, ref: composedRefs });
|
|
76471
76471
|
}
|
|
76472
76472
|
);
|
|
76473
76473
|
PopperAnchor$2.displayName = ANCHOR_NAME$4;
|
|
@@ -76493,7 +76493,7 @@ var PopperContent$2 = React__namespace.forwardRef(
|
|
|
76493
76493
|
} = props;
|
|
76494
76494
|
const context = usePopperContext$2(CONTENT_NAME$6, __scopePopper);
|
|
76495
76495
|
const [content, setContent] = React__namespace.useState(null);
|
|
76496
|
-
const composedRefs = useComposedRefs$
|
|
76496
|
+
const composedRefs = useComposedRefs$6(forwardedRef, (node) => setContent(node));
|
|
76497
76497
|
const [arrow$1, setArrow] = React__namespace.useState(null);
|
|
76498
76498
|
const arrowSize = useSize$4(arrow$1);
|
|
76499
76499
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
@@ -76547,8 +76547,8 @@ var PopperContent$2 = React__namespace.forwardRef(
|
|
|
76547
76547
|
]
|
|
76548
76548
|
});
|
|
76549
76549
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement$2(placement);
|
|
76550
|
-
const handlePlaced = useCallbackRef$
|
|
76551
|
-
useLayoutEffect2$
|
|
76550
|
+
const handlePlaced = useCallbackRef$7(onPlaced);
|
|
76551
|
+
useLayoutEffect2$7(() => {
|
|
76552
76552
|
if (isPositioned) {
|
|
76553
76553
|
handlePlaced?.();
|
|
76554
76554
|
}
|
|
@@ -76557,7 +76557,7 @@ var PopperContent$2 = React__namespace.forwardRef(
|
|
|
76557
76557
|
const arrowY = middlewareData.arrow?.y;
|
|
76558
76558
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
76559
76559
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
76560
|
-
useLayoutEffect2$
|
|
76560
|
+
useLayoutEffect2$7(() => {
|
|
76561
76561
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
76562
76562
|
}, [content]);
|
|
76563
76563
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -76594,7 +76594,7 @@ var PopperContent$2 = React__namespace.forwardRef(
|
|
|
76594
76594
|
arrowY,
|
|
76595
76595
|
shouldHideArrow: cannotCenterArrow,
|
|
76596
76596
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
76597
|
-
Primitive$
|
|
76597
|
+
Primitive$8.div,
|
|
76598
76598
|
{
|
|
76599
76599
|
"data-side": placedSide,
|
|
76600
76600
|
"data-align": placedAlign,
|
|
@@ -76654,7 +76654,7 @@ var PopperArrow$2 = React__namespace.forwardRef(function PopperArrow2(props, for
|
|
|
76654
76654
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
76655
76655
|
},
|
|
76656
76656
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
76657
|
-
Root$
|
|
76657
|
+
Root$9,
|
|
76658
76658
|
{
|
|
76659
76659
|
...arrowProps,
|
|
76660
76660
|
ref: forwardedRef,
|
|
@@ -76714,25 +76714,25 @@ var Content$2 = PopperContent$2;
|
|
|
76714
76714
|
var Arrow$4 = PopperArrow$2;
|
|
76715
76715
|
|
|
76716
76716
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
76717
|
-
function setRef$
|
|
76717
|
+
function setRef$6(ref, value) {
|
|
76718
76718
|
if (typeof ref === "function") {
|
|
76719
76719
|
ref(value);
|
|
76720
76720
|
} else if (ref !== null && ref !== void 0) {
|
|
76721
76721
|
ref.current = value;
|
|
76722
76722
|
}
|
|
76723
76723
|
}
|
|
76724
|
-
function composeRefs$
|
|
76725
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
76724
|
+
function composeRefs$6(...refs) {
|
|
76725
|
+
return (node) => refs.forEach((ref) => setRef$6(ref, node));
|
|
76726
76726
|
}
|
|
76727
|
-
function useComposedRefs$
|
|
76728
|
-
return React__namespace.useCallback(composeRefs$
|
|
76727
|
+
function useComposedRefs$5(...refs) {
|
|
76728
|
+
return React__namespace.useCallback(composeRefs$6(...refs), refs);
|
|
76729
76729
|
}
|
|
76730
76730
|
|
|
76731
76731
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
76732
|
-
var useLayoutEffect2$
|
|
76732
|
+
var useLayoutEffect2$6 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
76733
76733
|
};
|
|
76734
76734
|
|
|
76735
|
-
function useStateMachine(initialState, machine) {
|
|
76735
|
+
function useStateMachine$1(initialState, machine) {
|
|
76736
76736
|
return React__namespace.useReducer((state, event) => {
|
|
76737
76737
|
const nextState = machine[state][event];
|
|
76738
76738
|
return nextState ?? state;
|
|
@@ -76744,7 +76744,7 @@ var Presence = (props) => {
|
|
|
76744
76744
|
const { present, children } = props;
|
|
76745
76745
|
const presence = usePresence(present);
|
|
76746
76746
|
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React__namespace.Children.only(children);
|
|
76747
|
-
const ref = useComposedRefs$
|
|
76747
|
+
const ref = useComposedRefs$5(presence.ref, getElementRef(child));
|
|
76748
76748
|
const forceMount = typeof children === "function";
|
|
76749
76749
|
return forceMount || presence.isPresent ? React__namespace.cloneElement(child, { ref }) : null;
|
|
76750
76750
|
};
|
|
@@ -76755,7 +76755,7 @@ function usePresence(present) {
|
|
|
76755
76755
|
const prevPresentRef = React__namespace.useRef(present);
|
|
76756
76756
|
const prevAnimationNameRef = React__namespace.useRef("none");
|
|
76757
76757
|
const initialState = present ? "mounted" : "unmounted";
|
|
76758
|
-
const [state, send] = useStateMachine(initialState, {
|
|
76758
|
+
const [state, send] = useStateMachine$1(initialState, {
|
|
76759
76759
|
mounted: {
|
|
76760
76760
|
UNMOUNT: "unmounted",
|
|
76761
76761
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -76772,7 +76772,7 @@ function usePresence(present) {
|
|
|
76772
76772
|
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
76773
76773
|
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
76774
76774
|
}, [state]);
|
|
76775
|
-
useLayoutEffect2$
|
|
76775
|
+
useLayoutEffect2$6(() => {
|
|
76776
76776
|
const styles = stylesRef.current;
|
|
76777
76777
|
const wasPresent = prevPresentRef.current;
|
|
76778
76778
|
const hasPresentChanged = wasPresent !== present;
|
|
@@ -76794,7 +76794,7 @@ function usePresence(present) {
|
|
|
76794
76794
|
prevPresentRef.current = present;
|
|
76795
76795
|
}
|
|
76796
76796
|
}, [present, send]);
|
|
76797
|
-
useLayoutEffect2$
|
|
76797
|
+
useLayoutEffect2$6(() => {
|
|
76798
76798
|
if (node) {
|
|
76799
76799
|
let timeoutId;
|
|
76800
76800
|
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
@@ -76867,7 +76867,7 @@ function useControllableState$5({
|
|
|
76867
76867
|
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$5({ defaultProp, onChange });
|
|
76868
76868
|
const isControlled = prop !== void 0;
|
|
76869
76869
|
const value = isControlled ? prop : uncontrolledProp;
|
|
76870
|
-
const handleChange = useCallbackRef$
|
|
76870
|
+
const handleChange = useCallbackRef$7(onChange);
|
|
76871
76871
|
const setValue = React__namespace.useCallback(
|
|
76872
76872
|
(nextValue) => {
|
|
76873
76873
|
if (isControlled) {
|
|
@@ -76889,7 +76889,7 @@ function useUncontrolledState$5({
|
|
|
76889
76889
|
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
76890
76890
|
const [value] = uncontrolledState;
|
|
76891
76891
|
const prevValueRef = React__namespace.useRef(value);
|
|
76892
|
-
const handleChange = useCallbackRef$
|
|
76892
|
+
const handleChange = useCallbackRef$7(onChange);
|
|
76893
76893
|
React__namespace.useEffect(() => {
|
|
76894
76894
|
if (prevValueRef.current !== value) {
|
|
76895
76895
|
handleChange(value);
|
|
@@ -76904,7 +76904,7 @@ var NAME$4 = "VisuallyHidden";
|
|
|
76904
76904
|
var VisuallyHidden = React__namespace.forwardRef(
|
|
76905
76905
|
(props, forwardedRef) => {
|
|
76906
76906
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
76907
|
-
Primitive$
|
|
76907
|
+
Primitive$8.span,
|
|
76908
76908
|
{
|
|
76909
76909
|
...props,
|
|
76910
76910
|
ref: forwardedRef,
|
|
@@ -76927,9 +76927,9 @@ var VisuallyHidden = React__namespace.forwardRef(
|
|
|
76927
76927
|
}
|
|
76928
76928
|
);
|
|
76929
76929
|
VisuallyHidden.displayName = NAME$4;
|
|
76930
|
-
var Root$
|
|
76930
|
+
var Root$8 = VisuallyHidden;
|
|
76931
76931
|
|
|
76932
|
-
var [createTooltipContext, createTooltipScope] = createContextScope$
|
|
76932
|
+
var [createTooltipContext, createTooltipScope] = createContextScope$d("Tooltip", [
|
|
76933
76933
|
createPopperScope$2
|
|
76934
76934
|
]);
|
|
76935
76935
|
var usePopperScope$2 = createPopperScope$2();
|
|
@@ -77070,7 +77070,7 @@ var TooltipTrigger$1 = React__namespace.forwardRef(
|
|
|
77070
77070
|
const providerContext = useTooltipProviderContext(TRIGGER_NAME$2, __scopeTooltip);
|
|
77071
77071
|
const popperScope = usePopperScope$2(__scopeTooltip);
|
|
77072
77072
|
const ref = React__namespace.useRef(null);
|
|
77073
|
-
const composedRefs = useComposedRefs$
|
|
77073
|
+
const composedRefs = useComposedRefs$6(forwardedRef, ref, context.onTriggerChange);
|
|
77074
77074
|
const isPointerDownRef = React__namespace.useRef(false);
|
|
77075
77075
|
const hasPointerMoveOpenedRef = React__namespace.useRef(false);
|
|
77076
77076
|
const handlePointerUp = React__namespace.useCallback(() => isPointerDownRef.current = false, []);
|
|
@@ -77078,32 +77078,32 @@ var TooltipTrigger$1 = React__namespace.forwardRef(
|
|
|
77078
77078
|
return () => document.removeEventListener("pointerup", handlePointerUp);
|
|
77079
77079
|
}, [handlePointerUp]);
|
|
77080
77080
|
return /* @__PURE__ */ jsxRuntime.jsx(Anchor$2, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
77081
|
-
Primitive$
|
|
77081
|
+
Primitive$8.button,
|
|
77082
77082
|
{
|
|
77083
77083
|
"aria-describedby": context.open ? context.contentId : void 0,
|
|
77084
77084
|
"data-state": context.stateAttribute,
|
|
77085
77085
|
...triggerProps,
|
|
77086
77086
|
ref: composedRefs,
|
|
77087
|
-
onPointerMove: composeEventHandlers$
|
|
77087
|
+
onPointerMove: composeEventHandlers$6(props.onPointerMove, (event) => {
|
|
77088
77088
|
if (event.pointerType === "touch") return;
|
|
77089
77089
|
if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {
|
|
77090
77090
|
context.onTriggerEnter();
|
|
77091
77091
|
hasPointerMoveOpenedRef.current = true;
|
|
77092
77092
|
}
|
|
77093
77093
|
}),
|
|
77094
|
-
onPointerLeave: composeEventHandlers$
|
|
77094
|
+
onPointerLeave: composeEventHandlers$6(props.onPointerLeave, () => {
|
|
77095
77095
|
context.onTriggerLeave();
|
|
77096
77096
|
hasPointerMoveOpenedRef.current = false;
|
|
77097
77097
|
}),
|
|
77098
|
-
onPointerDown: composeEventHandlers$
|
|
77098
|
+
onPointerDown: composeEventHandlers$6(props.onPointerDown, () => {
|
|
77099
77099
|
isPointerDownRef.current = true;
|
|
77100
77100
|
document.addEventListener("pointerup", handlePointerUp, { once: true });
|
|
77101
77101
|
}),
|
|
77102
|
-
onFocus: composeEventHandlers$
|
|
77102
|
+
onFocus: composeEventHandlers$6(props.onFocus, () => {
|
|
77103
77103
|
if (!isPointerDownRef.current) context.onOpen();
|
|
77104
77104
|
}),
|
|
77105
|
-
onBlur: composeEventHandlers$
|
|
77106
|
-
onClick: composeEventHandlers$
|
|
77105
|
+
onBlur: composeEventHandlers$6(props.onBlur, context.onClose),
|
|
77106
|
+
onClick: composeEventHandlers$6(props.onClick, context.onClose)
|
|
77107
77107
|
}
|
|
77108
77108
|
) });
|
|
77109
77109
|
}
|
|
@@ -77126,7 +77126,7 @@ var TooltipContentHoverable = React__namespace.forwardRef((props, forwardedRef)
|
|
|
77126
77126
|
const context = useTooltipContext(CONTENT_NAME$5, props.__scopeTooltip);
|
|
77127
77127
|
const providerContext = useTooltipProviderContext(CONTENT_NAME$5, props.__scopeTooltip);
|
|
77128
77128
|
const ref = React__namespace.useRef(null);
|
|
77129
|
-
const composedRefs = useComposedRefs$
|
|
77129
|
+
const composedRefs = useComposedRefs$6(forwardedRef, ref);
|
|
77130
77130
|
const [pointerGraceArea, setPointerGraceArea] = React__namespace.useState(null);
|
|
77131
77131
|
const { trigger, onClose } = context;
|
|
77132
77132
|
const content = ref.current;
|
|
@@ -77240,7 +77240,7 @@ var TooltipContentImpl = React__namespace.forwardRef(
|
|
|
77240
77240
|
},
|
|
77241
77241
|
children: [
|
|
77242
77242
|
/* @__PURE__ */ jsxRuntime.jsx(Slottable, { children }),
|
|
77243
|
-
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntime.jsx(Root$
|
|
77243
|
+
/* @__PURE__ */ jsxRuntime.jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsxRuntime.jsx(Root$8, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
77244
77244
|
]
|
|
77245
77245
|
}
|
|
77246
77246
|
)
|
|
@@ -78815,22 +78815,22 @@ function truncateWithTooltip(text, length) {
|
|
|
78815
78815
|
}
|
|
78816
78816
|
|
|
78817
78817
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
78818
|
-
function setRef$
|
|
78818
|
+
function setRef$5(ref, value) {
|
|
78819
78819
|
if (typeof ref === "function") {
|
|
78820
78820
|
ref(value);
|
|
78821
78821
|
} else if (ref !== null && ref !== void 0) {
|
|
78822
78822
|
ref.current = value;
|
|
78823
78823
|
}
|
|
78824
78824
|
}
|
|
78825
|
-
function composeRefs$
|
|
78826
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
78825
|
+
function composeRefs$5(...refs) {
|
|
78826
|
+
return (node) => refs.forEach((ref) => setRef$5(ref, node));
|
|
78827
78827
|
}
|
|
78828
|
-
function useComposedRefs$
|
|
78829
|
-
return React__namespace.useCallback(composeRefs$
|
|
78828
|
+
function useComposedRefs$4(...refs) {
|
|
78829
|
+
return React__namespace.useCallback(composeRefs$5(...refs), refs);
|
|
78830
78830
|
}
|
|
78831
78831
|
|
|
78832
78832
|
// packages/react/context/src/createContext.tsx
|
|
78833
|
-
function createContextScope$
|
|
78833
|
+
function createContextScope$b(scopeName, createContextScopeDeps = []) {
|
|
78834
78834
|
let defaultContexts = [];
|
|
78835
78835
|
function createContext3(rootComponentName, defaultContext) {
|
|
78836
78836
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -78865,9 +78865,9 @@ function createContextScope$a(scopeName, createContextScopeDeps = []) {
|
|
|
78865
78865
|
};
|
|
78866
78866
|
};
|
|
78867
78867
|
createScope.scopeName = scopeName;
|
|
78868
|
-
return [createContext3, composeContextScopes$
|
|
78868
|
+
return [createContext3, composeContextScopes$b(createScope, ...createContextScopeDeps)];
|
|
78869
78869
|
}
|
|
78870
|
-
function composeContextScopes$
|
|
78870
|
+
function composeContextScopes$b(...scopes) {
|
|
78871
78871
|
const baseScope = scopes[0];
|
|
78872
78872
|
if (scopes.length === 1) return baseScope;
|
|
78873
78873
|
const createScope = () => {
|
|
@@ -78889,7 +78889,7 @@ function composeContextScopes$a(...scopes) {
|
|
|
78889
78889
|
}
|
|
78890
78890
|
|
|
78891
78891
|
// packages/core/primitive/src/primitive.tsx
|
|
78892
|
-
function composeEventHandlers$
|
|
78892
|
+
function composeEventHandlers$5(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
78893
78893
|
return function handleEvent(event) {
|
|
78894
78894
|
originalEventHandler?.(event);
|
|
78895
78895
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -78899,7 +78899,7 @@ function composeEventHandlers$4(originalEventHandler, ourEventHandler, { checkFo
|
|
|
78899
78899
|
}
|
|
78900
78900
|
|
|
78901
78901
|
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
78902
|
-
function useCallbackRef$
|
|
78902
|
+
function useCallbackRef$6(callback) {
|
|
78903
78903
|
const callbackRef = React__namespace.useRef(callback);
|
|
78904
78904
|
React__namespace.useEffect(() => {
|
|
78905
78905
|
callbackRef.current = callback;
|
|
@@ -78917,7 +78917,7 @@ function useControllableState$4({
|
|
|
78917
78917
|
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$4({ defaultProp, onChange });
|
|
78918
78918
|
const isControlled = prop !== void 0;
|
|
78919
78919
|
const value = isControlled ? prop : uncontrolledProp;
|
|
78920
|
-
const handleChange = useCallbackRef$
|
|
78920
|
+
const handleChange = useCallbackRef$6(onChange);
|
|
78921
78921
|
const setValue = React__namespace.useCallback(
|
|
78922
78922
|
(nextValue) => {
|
|
78923
78923
|
if (isControlled) {
|
|
@@ -78939,7 +78939,7 @@ function useUncontrolledState$4({
|
|
|
78939
78939
|
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
78940
78940
|
const [value] = uncontrolledState;
|
|
78941
78941
|
const prevValueRef = React__namespace.useRef(value);
|
|
78942
|
-
const handleChange = useCallbackRef$
|
|
78942
|
+
const handleChange = useCallbackRef$6(onChange);
|
|
78943
78943
|
React__namespace.useEffect(() => {
|
|
78944
78944
|
if (prevValueRef.current !== value) {
|
|
78945
78945
|
handleChange(value);
|
|
@@ -78962,13 +78962,13 @@ function usePrevious$1(value) {
|
|
|
78962
78962
|
}
|
|
78963
78963
|
|
|
78964
78964
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
78965
|
-
var useLayoutEffect2$
|
|
78965
|
+
var useLayoutEffect2$5 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
78966
78966
|
};
|
|
78967
78967
|
|
|
78968
78968
|
// packages/react/use-size/src/useSize.tsx
|
|
78969
78969
|
function useSize$3(element) {
|
|
78970
78970
|
const [size, setSize] = React__namespace.useState(void 0);
|
|
78971
|
-
useLayoutEffect2$
|
|
78971
|
+
useLayoutEffect2$5(() => {
|
|
78972
78972
|
if (element) {
|
|
78973
78973
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
78974
78974
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -79002,7 +79002,7 @@ function useSize$3(element) {
|
|
|
79002
79002
|
}
|
|
79003
79003
|
|
|
79004
79004
|
// packages/react/primitive/src/Primitive.tsx
|
|
79005
|
-
var NODES$
|
|
79005
|
+
var NODES$7 = [
|
|
79006
79006
|
"a",
|
|
79007
79007
|
"button",
|
|
79008
79008
|
"div",
|
|
@@ -79020,7 +79020,7 @@ var NODES$6 = [
|
|
|
79020
79020
|
"svg",
|
|
79021
79021
|
"ul"
|
|
79022
79022
|
];
|
|
79023
|
-
var Primitive$
|
|
79023
|
+
var Primitive$7 = NODES$7.reduce((primitive, node) => {
|
|
79024
79024
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
79025
79025
|
const { asChild, ...primitiveProps } = props;
|
|
79026
79026
|
const Comp = asChild ? Slot : node;
|
|
@@ -79034,7 +79034,7 @@ var Primitive$6 = NODES$6.reduce((primitive, node) => {
|
|
|
79034
79034
|
}, {});
|
|
79035
79035
|
|
|
79036
79036
|
var CHECKBOX_NAME = "Checkbox";
|
|
79037
|
-
var [createCheckboxContext, createCheckboxScope] = createContextScope$
|
|
79037
|
+
var [createCheckboxContext, createCheckboxScope] = createContextScope$b(CHECKBOX_NAME);
|
|
79038
79038
|
var [CheckboxProvider, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
|
|
79039
79039
|
var Checkbox$1 = React__namespace.forwardRef(
|
|
79040
79040
|
(props, forwardedRef) => {
|
|
@@ -79051,7 +79051,7 @@ var Checkbox$1 = React__namespace.forwardRef(
|
|
|
79051
79051
|
...checkboxProps
|
|
79052
79052
|
} = props;
|
|
79053
79053
|
const [button, setButton] = React__namespace.useState(null);
|
|
79054
|
-
const composedRefs = useComposedRefs$
|
|
79054
|
+
const composedRefs = useComposedRefs$4(forwardedRef, (node) => setButton(node));
|
|
79055
79055
|
const hasConsumerStoppedPropagationRef = React__namespace.useRef(false);
|
|
79056
79056
|
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
79057
79057
|
const [checked = false, setChecked] = useControllableState$4({
|
|
@@ -79070,7 +79070,7 @@ var Checkbox$1 = React__namespace.forwardRef(
|
|
|
79070
79070
|
}, [button, setChecked]);
|
|
79071
79071
|
return /* @__PURE__ */ jsxRuntime.jsxs(CheckboxProvider, { scope: __scopeCheckbox, state: checked, disabled, children: [
|
|
79072
79072
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
79073
|
-
Primitive$
|
|
79073
|
+
Primitive$7.button,
|
|
79074
79074
|
{
|
|
79075
79075
|
type: "button",
|
|
79076
79076
|
role: "checkbox",
|
|
@@ -79082,10 +79082,10 @@ var Checkbox$1 = React__namespace.forwardRef(
|
|
|
79082
79082
|
value,
|
|
79083
79083
|
...checkboxProps,
|
|
79084
79084
|
ref: composedRefs,
|
|
79085
|
-
onKeyDown: composeEventHandlers$
|
|
79085
|
+
onKeyDown: composeEventHandlers$5(props.onKeyDown, (event) => {
|
|
79086
79086
|
if (event.key === "Enter") event.preventDefault();
|
|
79087
79087
|
}),
|
|
79088
|
-
onClick: composeEventHandlers$
|
|
79088
|
+
onClick: composeEventHandlers$5(props.onClick, (event) => {
|
|
79089
79089
|
setChecked((prevChecked) => isIndeterminate$1(prevChecked) ? true : !prevChecked);
|
|
79090
79090
|
if (isFormControl) {
|
|
79091
79091
|
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
@@ -79119,7 +79119,7 @@ var CheckboxIndicator = React__namespace.forwardRef(
|
|
|
79119
79119
|
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
|
79120
79120
|
const context = useCheckboxContext(INDICATOR_NAME$2, __scopeCheckbox);
|
|
79121
79121
|
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || isIndeterminate$1(context.state) || context.state === true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
79122
|
-
Primitive$
|
|
79122
|
+
Primitive$7.span,
|
|
79123
79123
|
{
|
|
79124
79124
|
"data-state": getState$2(context.state),
|
|
79125
79125
|
"data-disabled": context.disabled ? "" : void 0,
|
|
@@ -79175,7 +79175,7 @@ function isIndeterminate$1(checked) {
|
|
|
79175
79175
|
function getState$2(checked) {
|
|
79176
79176
|
return isIndeterminate$1(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
79177
79177
|
}
|
|
79178
|
-
var Root$
|
|
79178
|
+
var Root$7 = Checkbox$1;
|
|
79179
79179
|
var Indicator$1 = CheckboxIndicator;
|
|
79180
79180
|
|
|
79181
79181
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
@@ -79224,7 +79224,7 @@ const cva = (base, config)=>{
|
|
|
79224
79224
|
};
|
|
79225
79225
|
|
|
79226
79226
|
// packages/react/primitive/src/Primitive.tsx
|
|
79227
|
-
var NODES$
|
|
79227
|
+
var NODES$6 = [
|
|
79228
79228
|
"a",
|
|
79229
79229
|
"button",
|
|
79230
79230
|
"div",
|
|
@@ -79242,7 +79242,7 @@ var NODES$5 = [
|
|
|
79242
79242
|
"svg",
|
|
79243
79243
|
"ul"
|
|
79244
79244
|
];
|
|
79245
|
-
var Primitive$
|
|
79245
|
+
var Primitive$6 = NODES$6.reduce((primitive, node) => {
|
|
79246
79246
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
79247
79247
|
const { asChild, ...primitiveProps } = props;
|
|
79248
79248
|
const Comp = asChild ? Slot : node;
|
|
@@ -79258,7 +79258,7 @@ var Primitive$5 = NODES$5.reduce((primitive, node) => {
|
|
|
79258
79258
|
var NAME$3 = "Label";
|
|
79259
79259
|
var Label$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
79260
79260
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
79261
|
-
Primitive$
|
|
79261
|
+
Primitive$6.label,
|
|
79262
79262
|
{
|
|
79263
79263
|
...props,
|
|
79264
79264
|
ref: forwardedRef,
|
|
@@ -79272,14 +79272,14 @@ var Label$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
79272
79272
|
);
|
|
79273
79273
|
});
|
|
79274
79274
|
Label$2.displayName = NAME$3;
|
|
79275
|
-
var Root$
|
|
79275
|
+
var Root$6 = Label$2;
|
|
79276
79276
|
|
|
79277
79277
|
var labelVariants = cn("s-text-sm s-text-foreground s-leading-none", "peer-disabled:s-cursor-not-allowed peer-disabled:s-opacity-70");
|
|
79278
79278
|
var Label$1 = React__namespace.forwardRef(function (_a, ref) {
|
|
79279
79279
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
79280
|
-
return (React__namespace.createElement(Root$
|
|
79280
|
+
return (React__namespace.createElement(Root$6, __assign({ ref: ref, className: cn(labelVariants, className) }, props)));
|
|
79281
79281
|
});
|
|
79282
|
-
Label$1.displayName = Root$
|
|
79282
|
+
Label$1.displayName = Root$6.displayName;
|
|
79283
79283
|
|
|
79284
79284
|
var checkboxStyles = cva(cn("s-shrink-0 s-peer s-border s-text-foreground", "data-[state=checked]:s-text-white data-[state=checked]:s-text-foreground", "focus-visible:s-ring-ring s-ring-offset-background focus-visible:s-outline-none focus-visible:s-ring-2 focus-visible:s-ring-offset-2", "disabled:s-cursor-not-allowed disabled:s-opacity-50"), {
|
|
79285
79285
|
variants: {
|
|
@@ -79300,12 +79300,12 @@ var checkboxStyles = cva(cn("s-shrink-0 s-peer s-border s-text-foreground", "dat
|
|
|
79300
79300
|
});
|
|
79301
79301
|
var Checkbox = React.forwardRef(function (_a, ref) {
|
|
79302
79302
|
var className = _a.className, size = _a.size, checked = _a.checked, props = __rest(_a, ["className", "size", "checked"]);
|
|
79303
|
-
return (React.createElement(Root$
|
|
79303
|
+
return (React.createElement(Root$7, __assign({ ref: ref, className: cn(checkboxStyles({ checked: checked, size: size }), className), checked: checked === "partial" ? "indeterminate" : checked }, props),
|
|
79304
79304
|
React.createElement(Indicator$1, { className: "s-flex s-items-center s-justify-center s-text-current" },
|
|
79305
79305
|
React.createElement("span", { className: cn(size === "xs" ? "-s-mt-px" : "") },
|
|
79306
79306
|
React.createElement(Icon, { size: "xs", visual: checked === "partial" ? DashIcon : CheckIcon })))));
|
|
79307
79307
|
});
|
|
79308
|
-
Checkbox.displayName = Root$
|
|
79308
|
+
Checkbox.displayName = Root$7.displayName;
|
|
79309
79309
|
function CheckboxWithText(_a) {
|
|
79310
79310
|
var text = _a.text, props = __rest(_a, ["text"]);
|
|
79311
79311
|
return (React.createElement("div", { className: "s-items-top s-flex s-items-center s-space-x-2" },
|
|
@@ -135442,7 +135442,7 @@ function Markdown(_a) {
|
|
|
135442
135442
|
}
|
|
135443
135443
|
|
|
135444
135444
|
// packages/core/primitive/src/primitive.tsx
|
|
135445
|
-
function composeEventHandlers$
|
|
135445
|
+
function composeEventHandlers$4(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
135446
135446
|
return function handleEvent(event) {
|
|
135447
135447
|
originalEventHandler?.(event);
|
|
135448
135448
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -135452,19 +135452,19 @@ function composeEventHandlers$3(originalEventHandler, ourEventHandler, { checkFo
|
|
|
135452
135452
|
}
|
|
135453
135453
|
|
|
135454
135454
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
135455
|
-
function setRef$
|
|
135455
|
+
function setRef$4(ref, value) {
|
|
135456
135456
|
if (typeof ref === "function") {
|
|
135457
135457
|
ref(value);
|
|
135458
135458
|
} else if (ref !== null && ref !== void 0) {
|
|
135459
135459
|
ref.current = value;
|
|
135460
135460
|
}
|
|
135461
135461
|
}
|
|
135462
|
-
function composeRefs$
|
|
135463
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
135462
|
+
function composeRefs$4(...refs) {
|
|
135463
|
+
return (node) => refs.forEach((ref) => setRef$4(ref, node));
|
|
135464
135464
|
}
|
|
135465
135465
|
|
|
135466
135466
|
// packages/react/context/src/createContext.tsx
|
|
135467
|
-
function createContextScope$
|
|
135467
|
+
function createContextScope$a(scopeName, createContextScopeDeps = []) {
|
|
135468
135468
|
let defaultContexts = [];
|
|
135469
135469
|
function createContext3(rootComponentName, defaultContext) {
|
|
135470
135470
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -135499,9 +135499,9 @@ function createContextScope$9(scopeName, createContextScopeDeps = []) {
|
|
|
135499
135499
|
};
|
|
135500
135500
|
};
|
|
135501
135501
|
createScope.scopeName = scopeName;
|
|
135502
|
-
return [createContext3, composeContextScopes$
|
|
135502
|
+
return [createContext3, composeContextScopes$a(createScope, ...createContextScopeDeps)];
|
|
135503
135503
|
}
|
|
135504
|
-
function composeContextScopes$
|
|
135504
|
+
function composeContextScopes$a(...scopes) {
|
|
135505
135505
|
const baseScope = scopes[0];
|
|
135506
135506
|
if (scopes.length === 1) return baseScope;
|
|
135507
135507
|
const createScope = () => {
|
|
@@ -135523,7 +135523,7 @@ function composeContextScopes$9(...scopes) {
|
|
|
135523
135523
|
}
|
|
135524
135524
|
|
|
135525
135525
|
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
135526
|
-
function useCallbackRef$
|
|
135526
|
+
function useCallbackRef$5(callback) {
|
|
135527
135527
|
const callbackRef = React__namespace.useRef(callback);
|
|
135528
135528
|
React__namespace.useEffect(() => {
|
|
135529
135529
|
callbackRef.current = callback;
|
|
@@ -135541,7 +135541,7 @@ function useControllableState$3({
|
|
|
135541
135541
|
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$3({ defaultProp, onChange });
|
|
135542
135542
|
const isControlled = prop !== void 0;
|
|
135543
135543
|
const value = isControlled ? prop : uncontrolledProp;
|
|
135544
|
-
const handleChange = useCallbackRef$
|
|
135544
|
+
const handleChange = useCallbackRef$5(onChange);
|
|
135545
135545
|
const setValue = React__namespace.useCallback(
|
|
135546
135546
|
(nextValue) => {
|
|
135547
135547
|
if (isControlled) {
|
|
@@ -135563,7 +135563,7 @@ function useUncontrolledState$3({
|
|
|
135563
135563
|
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
135564
135564
|
const [value] = uncontrolledState;
|
|
135565
135565
|
const prevValueRef = React__namespace.useRef(value);
|
|
135566
|
-
const handleChange = useCallbackRef$
|
|
135566
|
+
const handleChange = useCallbackRef$5(onChange);
|
|
135567
135567
|
React__namespace.useEffect(() => {
|
|
135568
135568
|
if (prevValueRef.current !== value) {
|
|
135569
135569
|
handleChange(value);
|
|
@@ -135574,7 +135574,7 @@ function useUncontrolledState$3({
|
|
|
135574
135574
|
}
|
|
135575
135575
|
|
|
135576
135576
|
// packages/react/primitive/src/Primitive.tsx
|
|
135577
|
-
var NODES$
|
|
135577
|
+
var NODES$5 = [
|
|
135578
135578
|
"a",
|
|
135579
135579
|
"button",
|
|
135580
135580
|
"div",
|
|
@@ -135592,7 +135592,7 @@ var NODES$4 = [
|
|
|
135592
135592
|
"svg",
|
|
135593
135593
|
"ul"
|
|
135594
135594
|
];
|
|
135595
|
-
var Primitive$
|
|
135595
|
+
var Primitive$5 = NODES$5.reduce((primitive, node) => {
|
|
135596
135596
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
135597
135597
|
const { asChild, ...primitiveProps } = props;
|
|
135598
135598
|
const Comp = asChild ? Slot : node;
|
|
@@ -135606,7 +135606,7 @@ var Primitive$4 = NODES$4.reduce((primitive, node) => {
|
|
|
135606
135606
|
}, {});
|
|
135607
135607
|
|
|
135608
135608
|
// packages/core/primitive/src/primitive.tsx
|
|
135609
|
-
function composeEventHandlers$
|
|
135609
|
+
function composeEventHandlers$3(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
135610
135610
|
return function handleEvent(event) {
|
|
135611
135611
|
originalEventHandler?.(event);
|
|
135612
135612
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -135616,7 +135616,7 @@ function composeEventHandlers$2(originalEventHandler, ourEventHandler, { checkFo
|
|
|
135616
135616
|
}
|
|
135617
135617
|
|
|
135618
135618
|
// packages/react/context/src/createContext.tsx
|
|
135619
|
-
function createContextScope$
|
|
135619
|
+
function createContextScope$9(scopeName, createContextScopeDeps = []) {
|
|
135620
135620
|
let defaultContexts = [];
|
|
135621
135621
|
function createContext3(rootComponentName, defaultContext) {
|
|
135622
135622
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -135651,9 +135651,9 @@ function createContextScope$8(scopeName, createContextScopeDeps = []) {
|
|
|
135651
135651
|
};
|
|
135652
135652
|
};
|
|
135653
135653
|
createScope.scopeName = scopeName;
|
|
135654
|
-
return [createContext3, composeContextScopes$
|
|
135654
|
+
return [createContext3, composeContextScopes$9(createScope, ...createContextScopeDeps)];
|
|
135655
135655
|
}
|
|
135656
|
-
function composeContextScopes$
|
|
135656
|
+
function composeContextScopes$9(...scopes) {
|
|
135657
135657
|
const baseScope = scopes[0];
|
|
135658
135658
|
if (scopes.length === 1) return baseScope;
|
|
135659
135659
|
const createScope = () => {
|
|
@@ -135675,23 +135675,23 @@ function composeContextScopes$8(...scopes) {
|
|
|
135675
135675
|
}
|
|
135676
135676
|
|
|
135677
135677
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
135678
|
-
function setRef$
|
|
135678
|
+
function setRef$3(ref, value) {
|
|
135679
135679
|
if (typeof ref === "function") {
|
|
135680
135680
|
ref(value);
|
|
135681
135681
|
} else if (ref !== null && ref !== void 0) {
|
|
135682
135682
|
ref.current = value;
|
|
135683
135683
|
}
|
|
135684
135684
|
}
|
|
135685
|
-
function composeRefs$
|
|
135686
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
135685
|
+
function composeRefs$3(...refs) {
|
|
135686
|
+
return (node) => refs.forEach((ref) => setRef$3(ref, node));
|
|
135687
135687
|
}
|
|
135688
|
-
function useComposedRefs$
|
|
135689
|
-
return React__namespace.useCallback(composeRefs$
|
|
135688
|
+
function useComposedRefs$3(...refs) {
|
|
135689
|
+
return React__namespace.useCallback(composeRefs$3(...refs), refs);
|
|
135690
135690
|
}
|
|
135691
135691
|
|
|
135692
135692
|
function createCollection$1(name) {
|
|
135693
135693
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
135694
|
-
const [createCollectionContext, createCollectionScope] = createContextScope$
|
|
135694
|
+
const [createCollectionContext, createCollectionScope] = createContextScope$9(PROVIDER_NAME);
|
|
135695
135695
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
135696
135696
|
PROVIDER_NAME,
|
|
135697
135697
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
@@ -135708,7 +135708,7 @@ function createCollection$1(name) {
|
|
|
135708
135708
|
(props, forwardedRef) => {
|
|
135709
135709
|
const { scope, children } = props;
|
|
135710
135710
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
135711
|
-
const composedRefs = useComposedRefs$
|
|
135711
|
+
const composedRefs = useComposedRefs$3(forwardedRef, context.collectionRef);
|
|
135712
135712
|
return /* @__PURE__ */ jsxRuntime.jsx(Slot, { ref: composedRefs, children });
|
|
135713
135713
|
}
|
|
135714
135714
|
);
|
|
@@ -135719,7 +135719,7 @@ function createCollection$1(name) {
|
|
|
135719
135719
|
(props, forwardedRef) => {
|
|
135720
135720
|
const { scope, children, ...itemData } = props;
|
|
135721
135721
|
const ref = React.useRef(null);
|
|
135722
|
-
const composedRefs = useComposedRefs$
|
|
135722
|
+
const composedRefs = useComposedRefs$3(forwardedRef, ref);
|
|
135723
135723
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
135724
135724
|
React.useEffect(() => {
|
|
135725
135725
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
@@ -135751,7 +135751,7 @@ function createCollection$1(name) {
|
|
|
135751
135751
|
}
|
|
135752
135752
|
|
|
135753
135753
|
// packages/react/context/src/createContext.tsx
|
|
135754
|
-
function createContextScope$
|
|
135754
|
+
function createContextScope$8(scopeName, createContextScopeDeps = []) {
|
|
135755
135755
|
let defaultContexts = [];
|
|
135756
135756
|
function createContext3(rootComponentName, defaultContext) {
|
|
135757
135757
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -135786,9 +135786,9 @@ function createContextScope$7(scopeName, createContextScopeDeps = []) {
|
|
|
135786
135786
|
};
|
|
135787
135787
|
};
|
|
135788
135788
|
createScope.scopeName = scopeName;
|
|
135789
|
-
return [createContext3, composeContextScopes$
|
|
135789
|
+
return [createContext3, composeContextScopes$8(createScope, ...createContextScopeDeps)];
|
|
135790
135790
|
}
|
|
135791
|
-
function composeContextScopes$
|
|
135791
|
+
function composeContextScopes$8(...scopes) {
|
|
135792
135792
|
const baseScope = scopes[0];
|
|
135793
135793
|
if (scopes.length === 1) return baseScope;
|
|
135794
135794
|
const createScope = () => {
|
|
@@ -135810,14 +135810,14 @@ function composeContextScopes$7(...scopes) {
|
|
|
135810
135810
|
}
|
|
135811
135811
|
|
|
135812
135812
|
// packages/react/direction/src/Direction.tsx
|
|
135813
|
-
var DirectionContext$
|
|
135814
|
-
function useDirection$
|
|
135815
|
-
const globalDir = React__namespace.useContext(DirectionContext$
|
|
135813
|
+
var DirectionContext$2 = React__namespace.createContext(void 0);
|
|
135814
|
+
function useDirection$2(localDir) {
|
|
135815
|
+
const globalDir = React__namespace.useContext(DirectionContext$2);
|
|
135816
135816
|
return localDir || globalDir || "ltr";
|
|
135817
135817
|
}
|
|
135818
135818
|
|
|
135819
135819
|
// packages/react/primitive/src/Primitive.tsx
|
|
135820
|
-
var NODES$
|
|
135820
|
+
var NODES$4 = [
|
|
135821
135821
|
"a",
|
|
135822
135822
|
"button",
|
|
135823
135823
|
"div",
|
|
@@ -135835,7 +135835,7 @@ var NODES$3 = [
|
|
|
135835
135835
|
"svg",
|
|
135836
135836
|
"ul"
|
|
135837
135837
|
];
|
|
135838
|
-
var Primitive$
|
|
135838
|
+
var Primitive$4 = NODES$4.reduce((primitive, node) => {
|
|
135839
135839
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
135840
135840
|
const { asChild, ...primitiveProps } = props;
|
|
135841
135841
|
const Comp = asChild ? Slot : node;
|
|
@@ -135852,7 +135852,7 @@ function dispatchDiscreteCustomEvent$1(target, event) {
|
|
|
135852
135852
|
}
|
|
135853
135853
|
|
|
135854
135854
|
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
135855
|
-
function useCallbackRef$
|
|
135855
|
+
function useCallbackRef$4(callback) {
|
|
135856
135856
|
const callbackRef = React__namespace.useRef(callback);
|
|
135857
135857
|
React__namespace.useEffect(() => {
|
|
135858
135858
|
callbackRef.current = callback;
|
|
@@ -135862,7 +135862,7 @@ function useCallbackRef$3(callback) {
|
|
|
135862
135862
|
|
|
135863
135863
|
// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx
|
|
135864
135864
|
function useEscapeKeydown$1(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
135865
|
-
const onEscapeKeyDown = useCallbackRef$
|
|
135865
|
+
const onEscapeKeyDown = useCallbackRef$4(onEscapeKeyDownProp);
|
|
135866
135866
|
React__namespace.useEffect(() => {
|
|
135867
135867
|
const handleKeyDown = (event) => {
|
|
135868
135868
|
if (event.key === "Escape") {
|
|
@@ -135899,7 +135899,7 @@ var DismissableLayer$1 = React__namespace.forwardRef(
|
|
|
135899
135899
|
const [node, setNode] = React__namespace.useState(null);
|
|
135900
135900
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
135901
135901
|
const [, force] = React__namespace.useState({});
|
|
135902
|
-
const composedRefs = useComposedRefs$
|
|
135902
|
+
const composedRefs = useComposedRefs$3(forwardedRef, (node2) => setNode(node2));
|
|
135903
135903
|
const layers = Array.from(context.layers);
|
|
135904
135904
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
135905
135905
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
@@ -135962,7 +135962,7 @@ var DismissableLayer$1 = React__namespace.forwardRef(
|
|
|
135962
135962
|
return () => document.removeEventListener(CONTEXT_UPDATE$1, handleUpdate);
|
|
135963
135963
|
}, []);
|
|
135964
135964
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
135965
|
-
Primitive$
|
|
135965
|
+
Primitive$4.div,
|
|
135966
135966
|
{
|
|
135967
135967
|
...layerProps,
|
|
135968
135968
|
ref: composedRefs,
|
|
@@ -135970,9 +135970,9 @@ var DismissableLayer$1 = React__namespace.forwardRef(
|
|
|
135970
135970
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
135971
135971
|
...props.style
|
|
135972
135972
|
},
|
|
135973
|
-
onFocusCapture: composeEventHandlers$
|
|
135974
|
-
onBlurCapture: composeEventHandlers$
|
|
135975
|
-
onPointerDownCapture: composeEventHandlers$
|
|
135973
|
+
onFocusCapture: composeEventHandlers$3(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
135974
|
+
onBlurCapture: composeEventHandlers$3(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
135975
|
+
onPointerDownCapture: composeEventHandlers$3(
|
|
135976
135976
|
props.onPointerDownCapture,
|
|
135977
135977
|
pointerDownOutside.onPointerDownCapture
|
|
135978
135978
|
)
|
|
@@ -135985,7 +135985,7 @@ var BRANCH_NAME$1 = "DismissableLayerBranch";
|
|
|
135985
135985
|
var DismissableLayerBranch$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
135986
135986
|
const context = React__namespace.useContext(DismissableLayerContext$1);
|
|
135987
135987
|
const ref = React__namespace.useRef(null);
|
|
135988
|
-
const composedRefs = useComposedRefs$
|
|
135988
|
+
const composedRefs = useComposedRefs$3(forwardedRef, ref);
|
|
135989
135989
|
React__namespace.useEffect(() => {
|
|
135990
135990
|
const node = ref.current;
|
|
135991
135991
|
if (node) {
|
|
@@ -135995,11 +135995,11 @@ var DismissableLayerBranch$1 = React__namespace.forwardRef((props, forwardedRef)
|
|
|
135995
135995
|
};
|
|
135996
135996
|
}
|
|
135997
135997
|
}, [context.branches]);
|
|
135998
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
135998
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$4.div, { ...props, ref: composedRefs });
|
|
135999
135999
|
});
|
|
136000
136000
|
DismissableLayerBranch$1.displayName = BRANCH_NAME$1;
|
|
136001
136001
|
function usePointerDownOutside$1(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
136002
|
-
const handlePointerDownOutside = useCallbackRef$
|
|
136002
|
+
const handlePointerDownOutside = useCallbackRef$4(onPointerDownOutside);
|
|
136003
136003
|
const isPointerInsideReactTreeRef = React__namespace.useRef(false);
|
|
136004
136004
|
const handleClickRef = React__namespace.useRef(() => {
|
|
136005
136005
|
});
|
|
@@ -136042,7 +136042,7 @@ function usePointerDownOutside$1(onPointerDownOutside, ownerDocument = globalThi
|
|
|
136042
136042
|
};
|
|
136043
136043
|
}
|
|
136044
136044
|
function useFocusOutside$1(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
136045
|
-
const handleFocusOutside = useCallbackRef$
|
|
136045
|
+
const handleFocusOutside = useCallbackRef$4(onFocusOutside);
|
|
136046
136046
|
const isFocusInsideReactTreeRef = React__namespace.useRef(false);
|
|
136047
136047
|
React__namespace.useEffect(() => {
|
|
136048
136048
|
const handleFocus = (event) => {
|
|
@@ -136115,10 +136115,10 @@ var FocusScope$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
136115
136115
|
...scopeProps
|
|
136116
136116
|
} = props;
|
|
136117
136117
|
const [container, setContainer] = React__namespace.useState(null);
|
|
136118
|
-
const onMountAutoFocus = useCallbackRef$
|
|
136119
|
-
const onUnmountAutoFocus = useCallbackRef$
|
|
136118
|
+
const onMountAutoFocus = useCallbackRef$4(onMountAutoFocusProp);
|
|
136119
|
+
const onUnmountAutoFocus = useCallbackRef$4(onUnmountAutoFocusProp);
|
|
136120
136120
|
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
136121
|
-
const composedRefs = useComposedRefs$
|
|
136121
|
+
const composedRefs = useComposedRefs$3(forwardedRef, (node) => setContainer(node));
|
|
136122
136122
|
const focusScope = React__namespace.useRef({
|
|
136123
136123
|
paused: false,
|
|
136124
136124
|
pause() {
|
|
@@ -136219,7 +136219,7 @@ var FocusScope$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
136219
136219
|
},
|
|
136220
136220
|
[loop, trapped, focusScope.paused]
|
|
136221
136221
|
);
|
|
136222
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
136222
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$4.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
136223
136223
|
});
|
|
136224
136224
|
FocusScope$1.displayName = FOCUS_SCOPE_NAME$1;
|
|
136225
136225
|
function focusFirst$4(candidates, { select = false } = {}) {
|
|
@@ -136303,7 +136303,7 @@ function removeLinks$1(items) {
|
|
|
136303
136303
|
}
|
|
136304
136304
|
|
|
136305
136305
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
136306
|
-
var useLayoutEffect2$
|
|
136306
|
+
var useLayoutEffect2$4 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
136307
136307
|
};
|
|
136308
136308
|
|
|
136309
136309
|
// packages/react/id/src/id.tsx
|
|
@@ -136311,7 +136311,7 @@ var useReactId$3 = React__namespace["useId".toString()] || (() => void 0);
|
|
|
136311
136311
|
var count$4 = 0;
|
|
136312
136312
|
function useId$3(deterministicId) {
|
|
136313
136313
|
const [id, setId] = React__namespace.useState(useReactId$3());
|
|
136314
|
-
useLayoutEffect2$
|
|
136314
|
+
useLayoutEffect2$4(() => {
|
|
136315
136315
|
if (!deterministicId) setId((reactId) => reactId ?? String(count$4++));
|
|
136316
136316
|
}, [deterministicId]);
|
|
136317
136317
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
@@ -136322,7 +136322,7 @@ var NAME$2 = "Arrow";
|
|
|
136322
136322
|
var Arrow$3 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
136323
136323
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
136324
136324
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
136325
|
-
Primitive$
|
|
136325
|
+
Primitive$4.svg,
|
|
136326
136326
|
{
|
|
136327
136327
|
...arrowProps,
|
|
136328
136328
|
ref: forwardedRef,
|
|
@@ -136335,10 +136335,10 @@ var Arrow$3 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
136335
136335
|
);
|
|
136336
136336
|
});
|
|
136337
136337
|
Arrow$3.displayName = NAME$2;
|
|
136338
|
-
var Root$
|
|
136338
|
+
var Root$5 = Arrow$3;
|
|
136339
136339
|
|
|
136340
136340
|
// packages/react/context/src/createContext.tsx
|
|
136341
|
-
function createContextScope$
|
|
136341
|
+
function createContextScope$7(scopeName, createContextScopeDeps = []) {
|
|
136342
136342
|
let defaultContexts = [];
|
|
136343
136343
|
function createContext3(rootComponentName, defaultContext) {
|
|
136344
136344
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -136373,9 +136373,9 @@ function createContextScope$6(scopeName, createContextScopeDeps = []) {
|
|
|
136373
136373
|
};
|
|
136374
136374
|
};
|
|
136375
136375
|
createScope.scopeName = scopeName;
|
|
136376
|
-
return [createContext3, composeContextScopes$
|
|
136376
|
+
return [createContext3, composeContextScopes$7(createScope, ...createContextScopeDeps)];
|
|
136377
136377
|
}
|
|
136378
|
-
function composeContextScopes$
|
|
136378
|
+
function composeContextScopes$7(...scopes) {
|
|
136379
136379
|
const baseScope = scopes[0];
|
|
136380
136380
|
if (scopes.length === 1) return baseScope;
|
|
136381
136381
|
const createScope = () => {
|
|
@@ -136399,7 +136399,7 @@ function composeContextScopes$6(...scopes) {
|
|
|
136399
136399
|
// packages/react/use-size/src/useSize.tsx
|
|
136400
136400
|
function useSize$2(element) {
|
|
136401
136401
|
const [size, setSize] = React__namespace.useState(void 0);
|
|
136402
|
-
useLayoutEffect2$
|
|
136402
|
+
useLayoutEffect2$4(() => {
|
|
136403
136403
|
if (element) {
|
|
136404
136404
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
136405
136405
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -136433,7 +136433,7 @@ function useSize$2(element) {
|
|
|
136433
136433
|
}
|
|
136434
136434
|
|
|
136435
136435
|
var POPPER_NAME$1 = "Popper";
|
|
136436
|
-
var [createPopperContext$1, createPopperScope$1] = createContextScope$
|
|
136436
|
+
var [createPopperContext$1, createPopperScope$1] = createContextScope$7(POPPER_NAME$1);
|
|
136437
136437
|
var [PopperProvider$1, usePopperContext$1] = createPopperContext$1(POPPER_NAME$1);
|
|
136438
136438
|
var Popper$1 = (props) => {
|
|
136439
136439
|
const { __scopePopper, children } = props;
|
|
@@ -136447,11 +136447,11 @@ var PopperAnchor$1 = React__namespace.forwardRef(
|
|
|
136447
136447
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
136448
136448
|
const context = usePopperContext$1(ANCHOR_NAME$3, __scopePopper);
|
|
136449
136449
|
const ref = React__namespace.useRef(null);
|
|
136450
|
-
const composedRefs = useComposedRefs$
|
|
136450
|
+
const composedRefs = useComposedRefs$3(forwardedRef, ref);
|
|
136451
136451
|
React__namespace.useEffect(() => {
|
|
136452
136452
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
136453
136453
|
});
|
|
136454
|
-
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
136454
|
+
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$4.div, { ...anchorProps, ref: composedRefs });
|
|
136455
136455
|
}
|
|
136456
136456
|
);
|
|
136457
136457
|
PopperAnchor$1.displayName = ANCHOR_NAME$3;
|
|
@@ -136477,7 +136477,7 @@ var PopperContent$1 = React__namespace.forwardRef(
|
|
|
136477
136477
|
} = props;
|
|
136478
136478
|
const context = usePopperContext$1(CONTENT_NAME$4, __scopePopper);
|
|
136479
136479
|
const [content, setContent] = React__namespace.useState(null);
|
|
136480
|
-
const composedRefs = useComposedRefs$
|
|
136480
|
+
const composedRefs = useComposedRefs$3(forwardedRef, (node) => setContent(node));
|
|
136481
136481
|
const [arrow$1, setArrow] = React__namespace.useState(null);
|
|
136482
136482
|
const arrowSize = useSize$2(arrow$1);
|
|
136483
136483
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
@@ -136531,8 +136531,8 @@ var PopperContent$1 = React__namespace.forwardRef(
|
|
|
136531
136531
|
]
|
|
136532
136532
|
});
|
|
136533
136533
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement$1(placement);
|
|
136534
|
-
const handlePlaced = useCallbackRef$
|
|
136535
|
-
useLayoutEffect2$
|
|
136534
|
+
const handlePlaced = useCallbackRef$4(onPlaced);
|
|
136535
|
+
useLayoutEffect2$4(() => {
|
|
136536
136536
|
if (isPositioned) {
|
|
136537
136537
|
handlePlaced?.();
|
|
136538
136538
|
}
|
|
@@ -136541,7 +136541,7 @@ var PopperContent$1 = React__namespace.forwardRef(
|
|
|
136541
136541
|
const arrowY = middlewareData.arrow?.y;
|
|
136542
136542
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
136543
136543
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
136544
|
-
useLayoutEffect2$
|
|
136544
|
+
useLayoutEffect2$4(() => {
|
|
136545
136545
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
136546
136546
|
}, [content]);
|
|
136547
136547
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -136578,7 +136578,7 @@ var PopperContent$1 = React__namespace.forwardRef(
|
|
|
136578
136578
|
arrowY,
|
|
136579
136579
|
shouldHideArrow: cannotCenterArrow,
|
|
136580
136580
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
136581
|
-
Primitive$
|
|
136581
|
+
Primitive$4.div,
|
|
136582
136582
|
{
|
|
136583
136583
|
"data-side": placedSide,
|
|
136584
136584
|
"data-align": placedAlign,
|
|
@@ -136638,7 +136638,7 @@ var PopperArrow$1 = React__namespace.forwardRef(function PopperArrow2(props, for
|
|
|
136638
136638
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
136639
136639
|
},
|
|
136640
136640
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
136641
|
-
Root$
|
|
136641
|
+
Root$5,
|
|
136642
136642
|
{
|
|
136643
136643
|
...arrowProps,
|
|
136644
136644
|
ref: forwardedRef,
|
|
@@ -136701,14 +136701,14 @@ var PORTAL_NAME$4 = "Portal";
|
|
|
136701
136701
|
var Portal$3 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
136702
136702
|
const { container: containerProp, ...portalProps } = props;
|
|
136703
136703
|
const [mounted, setMounted] = React__namespace.useState(false);
|
|
136704
|
-
useLayoutEffect2$
|
|
136704
|
+
useLayoutEffect2$4(() => setMounted(true), []);
|
|
136705
136705
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
136706
|
-
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
136706
|
+
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$4.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
136707
136707
|
});
|
|
136708
136708
|
Portal$3.displayName = PORTAL_NAME$4;
|
|
136709
136709
|
|
|
136710
136710
|
// packages/react/context/src/createContext.tsx
|
|
136711
|
-
function createContextScope$
|
|
136711
|
+
function createContextScope$6(scopeName, createContextScopeDeps = []) {
|
|
136712
136712
|
let defaultContexts = [];
|
|
136713
136713
|
function createContext3(rootComponentName, defaultContext) {
|
|
136714
136714
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -136743,9 +136743,9 @@ function createContextScope$5(scopeName, createContextScopeDeps = []) {
|
|
|
136743
136743
|
};
|
|
136744
136744
|
};
|
|
136745
136745
|
createScope.scopeName = scopeName;
|
|
136746
|
-
return [createContext3, composeContextScopes$
|
|
136746
|
+
return [createContext3, composeContextScopes$6(createScope, ...createContextScopeDeps)];
|
|
136747
136747
|
}
|
|
136748
|
-
function composeContextScopes$
|
|
136748
|
+
function composeContextScopes$6(...scopes) {
|
|
136749
136749
|
const baseScope = scopes[0];
|
|
136750
136750
|
if (scopes.length === 1) return baseScope;
|
|
136751
136751
|
const createScope = () => {
|
|
@@ -136776,7 +136776,7 @@ function useControllableState$2({
|
|
|
136776
136776
|
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$2({ defaultProp, onChange });
|
|
136777
136777
|
const isControlled = prop !== void 0;
|
|
136778
136778
|
const value = isControlled ? prop : uncontrolledProp;
|
|
136779
|
-
const handleChange = useCallbackRef$
|
|
136779
|
+
const handleChange = useCallbackRef$4(onChange);
|
|
136780
136780
|
const setValue = React__namespace.useCallback(
|
|
136781
136781
|
(nextValue) => {
|
|
136782
136782
|
if (isControlled) {
|
|
@@ -136798,7 +136798,7 @@ function useUncontrolledState$2({
|
|
|
136798
136798
|
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
136799
136799
|
const [value] = uncontrolledState;
|
|
136800
136800
|
const prevValueRef = React__namespace.useRef(value);
|
|
136801
|
-
const handleChange = useCallbackRef$
|
|
136801
|
+
const handleChange = useCallbackRef$4(onChange);
|
|
136802
136802
|
React__namespace.useEffect(() => {
|
|
136803
136803
|
if (prevValueRef.current !== value) {
|
|
136804
136804
|
handleChange(value);
|
|
@@ -136812,7 +136812,7 @@ var ENTRY_FOCUS$1 = "rovingFocusGroup.onEntryFocus";
|
|
|
136812
136812
|
var EVENT_OPTIONS$2 = { bubbles: false, cancelable: true };
|
|
136813
136813
|
var GROUP_NAME$3 = "RovingFocusGroup";
|
|
136814
136814
|
var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection$1(GROUP_NAME$3);
|
|
136815
|
-
var [createRovingFocusGroupContext$1, createRovingFocusGroupScope$1] = createContextScope$
|
|
136815
|
+
var [createRovingFocusGroupContext$1, createRovingFocusGroupScope$1] = createContextScope$6(
|
|
136816
136816
|
GROUP_NAME$3,
|
|
136817
136817
|
[createCollectionScope$2]
|
|
136818
136818
|
);
|
|
@@ -136837,15 +136837,15 @@ var RovingFocusGroupImpl$1 = React__namespace.forwardRef((props, forwardedRef) =
|
|
|
136837
136837
|
...groupProps
|
|
136838
136838
|
} = props;
|
|
136839
136839
|
const ref = React__namespace.useRef(null);
|
|
136840
|
-
const composedRefs = useComposedRefs$
|
|
136841
|
-
const direction = useDirection$
|
|
136840
|
+
const composedRefs = useComposedRefs$3(forwardedRef, ref);
|
|
136841
|
+
const direction = useDirection$2(dir);
|
|
136842
136842
|
const [currentTabStopId = null, setCurrentTabStopId] = useControllableState$2({
|
|
136843
136843
|
prop: currentTabStopIdProp,
|
|
136844
136844
|
defaultProp: defaultCurrentTabStopId,
|
|
136845
136845
|
onChange: onCurrentTabStopIdChange
|
|
136846
136846
|
});
|
|
136847
136847
|
const [isTabbingBackOut, setIsTabbingBackOut] = React__namespace.useState(false);
|
|
136848
|
-
const handleEntryFocus = useCallbackRef$
|
|
136848
|
+
const handleEntryFocus = useCallbackRef$4(onEntryFocus);
|
|
136849
136849
|
const getItems = useCollection$2(__scopeRovingFocusGroup);
|
|
136850
136850
|
const isClickFocusRef = React__namespace.useRef(false);
|
|
136851
136851
|
const [focusableItemsCount, setFocusableItemsCount] = React__namespace.useState(0);
|
|
@@ -136878,17 +136878,17 @@ var RovingFocusGroupImpl$1 = React__namespace.forwardRef((props, forwardedRef) =
|
|
|
136878
136878
|
[]
|
|
136879
136879
|
),
|
|
136880
136880
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
136881
|
-
Primitive$
|
|
136881
|
+
Primitive$4.div,
|
|
136882
136882
|
{
|
|
136883
136883
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
136884
136884
|
"data-orientation": orientation,
|
|
136885
136885
|
...groupProps,
|
|
136886
136886
|
ref: composedRefs,
|
|
136887
136887
|
style: { outline: "none", ...props.style },
|
|
136888
|
-
onMouseDown: composeEventHandlers$
|
|
136888
|
+
onMouseDown: composeEventHandlers$3(props.onMouseDown, () => {
|
|
136889
136889
|
isClickFocusRef.current = true;
|
|
136890
136890
|
}),
|
|
136891
|
-
onFocus: composeEventHandlers$
|
|
136891
|
+
onFocus: composeEventHandlers$3(props.onFocus, (event) => {
|
|
136892
136892
|
const isKeyboardFocus = !isClickFocusRef.current;
|
|
136893
136893
|
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
136894
136894
|
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS$1, EVENT_OPTIONS$2);
|
|
@@ -136906,7 +136906,7 @@ var RovingFocusGroupImpl$1 = React__namespace.forwardRef((props, forwardedRef) =
|
|
|
136906
136906
|
}
|
|
136907
136907
|
isClickFocusRef.current = false;
|
|
136908
136908
|
}),
|
|
136909
|
-
onBlur: composeEventHandlers$
|
|
136909
|
+
onBlur: composeEventHandlers$3(props.onBlur, () => setIsTabbingBackOut(false))
|
|
136910
136910
|
}
|
|
136911
136911
|
)
|
|
136912
136912
|
}
|
|
@@ -136942,18 +136942,18 @@ var RovingFocusGroupItem$1 = React__namespace.forwardRef(
|
|
|
136942
136942
|
focusable,
|
|
136943
136943
|
active,
|
|
136944
136944
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
136945
|
-
Primitive$
|
|
136945
|
+
Primitive$4.span,
|
|
136946
136946
|
{
|
|
136947
136947
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
136948
136948
|
"data-orientation": context.orientation,
|
|
136949
136949
|
...itemProps,
|
|
136950
136950
|
ref: forwardedRef,
|
|
136951
|
-
onMouseDown: composeEventHandlers$
|
|
136951
|
+
onMouseDown: composeEventHandlers$3(props.onMouseDown, (event) => {
|
|
136952
136952
|
if (!focusable) event.preventDefault();
|
|
136953
136953
|
else context.onItemFocus(id);
|
|
136954
136954
|
}),
|
|
136955
|
-
onFocus: composeEventHandlers$
|
|
136956
|
-
onKeyDown: composeEventHandlers$
|
|
136955
|
+
onFocus: composeEventHandlers$3(props.onFocus, () => context.onItemFocus(id)),
|
|
136956
|
+
onKeyDown: composeEventHandlers$3(props.onKeyDown, (event) => {
|
|
136957
136957
|
if (event.key === "Tab" && event.shiftKey) {
|
|
136958
136958
|
context.onItemShiftTab();
|
|
136959
136959
|
return;
|
|
@@ -137012,7 +137012,7 @@ function focusFirst$3(candidates, preventScroll = false) {
|
|
|
137012
137012
|
function wrapArray$2(array, startIndex) {
|
|
137013
137013
|
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
137014
137014
|
}
|
|
137015
|
-
var Root$
|
|
137015
|
+
var Root$4 = RovingFocusGroup$1;
|
|
137016
137016
|
var Item$1 = RovingFocusGroupItem$1;
|
|
137017
137017
|
|
|
137018
137018
|
var getDefaultParent = function (originalTarget) {
|
|
@@ -137191,7 +137191,7 @@ function assignRef(ref, value) {
|
|
|
137191
137191
|
* @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
|
|
137192
137192
|
* @returns {MutableRefObject}
|
|
137193
137193
|
*/
|
|
137194
|
-
function useCallbackRef$
|
|
137194
|
+
function useCallbackRef$3(initialValue, callback) {
|
|
137195
137195
|
var ref = React.useState(function () { return ({
|
|
137196
137196
|
// value
|
|
137197
137197
|
value: initialValue,
|
|
@@ -137231,7 +137231,7 @@ function useCallbackRef$2(initialValue, callback) {
|
|
|
137231
137231
|
* }
|
|
137232
137232
|
*/
|
|
137233
137233
|
function useMergeRefs(refs, defaultValue) {
|
|
137234
|
-
return useCallbackRef$
|
|
137234
|
+
return useCallbackRef$3(defaultValue || null, function (newValue) { return refs.forEach(function (ref) { return assignRef(ref, newValue); }); });
|
|
137235
137235
|
}
|
|
137236
137236
|
|
|
137237
137237
|
function ItoI(a) {
|
|
@@ -137834,7 +137834,7 @@ var SUB_CLOSE_KEYS = {
|
|
|
137834
137834
|
};
|
|
137835
137835
|
var MENU_NAME = "Menu";
|
|
137836
137836
|
var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection$1(MENU_NAME);
|
|
137837
|
-
var [createMenuContext, createMenuScope] = createContextScope$
|
|
137837
|
+
var [createMenuContext, createMenuScope] = createContextScope$8(MENU_NAME, [
|
|
137838
137838
|
createCollectionScope$1,
|
|
137839
137839
|
createPopperScope$1,
|
|
137840
137840
|
createRovingFocusGroupScope$1
|
|
@@ -137848,8 +137848,8 @@ var Menu = (props) => {
|
|
|
137848
137848
|
const popperScope = usePopperScope$1(__scopeMenu);
|
|
137849
137849
|
const [content, setContent] = React__namespace.useState(null);
|
|
137850
137850
|
const isUsingKeyboardRef = React__namespace.useRef(false);
|
|
137851
|
-
const handleOpenChange = useCallbackRef$
|
|
137852
|
-
const direction = useDirection$
|
|
137851
|
+
const handleOpenChange = useCallbackRef$4(onOpenChange);
|
|
137852
|
+
const direction = useDirection$2(dir);
|
|
137853
137853
|
React__namespace.useEffect(() => {
|
|
137854
137854
|
const handleKeyDown = () => {
|
|
137855
137855
|
isUsingKeyboardRef.current = true;
|
|
@@ -137921,7 +137921,7 @@ var MenuRootContentModal = React__namespace.forwardRef(
|
|
|
137921
137921
|
(props, forwardedRef) => {
|
|
137922
137922
|
const context = useMenuContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
137923
137923
|
const ref = React__namespace.useRef(null);
|
|
137924
|
-
const composedRefs = useComposedRefs$
|
|
137924
|
+
const composedRefs = useComposedRefs$3(forwardedRef, ref);
|
|
137925
137925
|
React__namespace.useEffect(() => {
|
|
137926
137926
|
const content = ref.current;
|
|
137927
137927
|
if (content) return hideOthers(content);
|
|
@@ -137934,7 +137934,7 @@ var MenuRootContentModal = React__namespace.forwardRef(
|
|
|
137934
137934
|
trapFocus: context.open,
|
|
137935
137935
|
disableOutsidePointerEvents: context.open,
|
|
137936
137936
|
disableOutsideScroll: true,
|
|
137937
|
-
onFocusOutside: composeEventHandlers$
|
|
137937
|
+
onFocusOutside: composeEventHandlers$3(
|
|
137938
137938
|
props.onFocusOutside,
|
|
137939
137939
|
(event) => event.preventDefault(),
|
|
137940
137940
|
{ checkForDefaultPrevented: false }
|
|
@@ -137983,7 +137983,7 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137983
137983
|
const getItems = useCollection$1(__scopeMenu);
|
|
137984
137984
|
const [currentItemId, setCurrentItemId] = React__namespace.useState(null);
|
|
137985
137985
|
const contentRef = React__namespace.useRef(null);
|
|
137986
|
-
const composedRefs = useComposedRefs$
|
|
137986
|
+
const composedRefs = useComposedRefs$3(forwardedRef, contentRef, context.onContentChange);
|
|
137987
137987
|
const timerRef = React__namespace.useRef(0);
|
|
137988
137988
|
const searchRef = React__namespace.useRef("");
|
|
137989
137989
|
const pointerGraceTimerRef = React__namespace.useRef(0);
|
|
@@ -138051,7 +138051,7 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
138051
138051
|
{
|
|
138052
138052
|
asChild: true,
|
|
138053
138053
|
trapped: trapFocus,
|
|
138054
|
-
onMountAutoFocus: composeEventHandlers$
|
|
138054
|
+
onMountAutoFocus: composeEventHandlers$3(onOpenAutoFocus, (event) => {
|
|
138055
138055
|
event.preventDefault();
|
|
138056
138056
|
contentRef.current?.focus({ preventScroll: true });
|
|
138057
138057
|
}),
|
|
@@ -138067,7 +138067,7 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
138067
138067
|
onInteractOutside,
|
|
138068
138068
|
onDismiss,
|
|
138069
138069
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
138070
|
-
Root$
|
|
138070
|
+
Root$4,
|
|
138071
138071
|
{
|
|
138072
138072
|
asChild: true,
|
|
138073
138073
|
...rovingFocusGroupScope,
|
|
@@ -138076,7 +138076,7 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
138076
138076
|
loop,
|
|
138077
138077
|
currentTabStopId: currentItemId,
|
|
138078
138078
|
onCurrentTabStopIdChange: setCurrentItemId,
|
|
138079
|
-
onEntryFocus: composeEventHandlers$
|
|
138079
|
+
onEntryFocus: composeEventHandlers$3(onEntryFocus, (event) => {
|
|
138080
138080
|
if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
|
|
138081
138081
|
}),
|
|
138082
138082
|
preventScrollOnEntryFocus: true,
|
|
@@ -138092,7 +138092,7 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
138092
138092
|
...contentProps,
|
|
138093
138093
|
ref: composedRefs,
|
|
138094
138094
|
style: { outline: "none", ...contentProps.style },
|
|
138095
|
-
onKeyDown: composeEventHandlers$
|
|
138095
|
+
onKeyDown: composeEventHandlers$3(contentProps.onKeyDown, (event) => {
|
|
138096
138096
|
const target = event.target;
|
|
138097
138097
|
const isKeyDownInside = target.closest("[data-radix-menu-content]") === event.currentTarget;
|
|
138098
138098
|
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
@@ -138110,13 +138110,13 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
138110
138110
|
if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();
|
|
138111
138111
|
focusFirst$2(candidateNodes);
|
|
138112
138112
|
}),
|
|
138113
|
-
onBlur: composeEventHandlers$
|
|
138113
|
+
onBlur: composeEventHandlers$3(props.onBlur, (event) => {
|
|
138114
138114
|
if (!event.currentTarget.contains(event.target)) {
|
|
138115
138115
|
window.clearTimeout(timerRef.current);
|
|
138116
138116
|
searchRef.current = "";
|
|
138117
138117
|
}
|
|
138118
138118
|
}),
|
|
138119
|
-
onPointerMove: composeEventHandlers$
|
|
138119
|
+
onPointerMove: composeEventHandlers$3(
|
|
138120
138120
|
props.onPointerMove,
|
|
138121
138121
|
whenMouse((event) => {
|
|
138122
138122
|
const target = event.target;
|
|
@@ -138145,7 +138145,7 @@ var GROUP_NAME$2 = "MenuGroup";
|
|
|
138145
138145
|
var MenuGroup = React__namespace.forwardRef(
|
|
138146
138146
|
(props, forwardedRef) => {
|
|
138147
138147
|
const { __scopeMenu, ...groupProps } = props;
|
|
138148
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
138148
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$4.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
138149
138149
|
}
|
|
138150
138150
|
);
|
|
138151
138151
|
MenuGroup.displayName = GROUP_NAME$2;
|
|
@@ -138153,7 +138153,7 @@ var LABEL_NAME$1 = "MenuLabel";
|
|
|
138153
138153
|
var MenuLabel = React__namespace.forwardRef(
|
|
138154
138154
|
(props, forwardedRef) => {
|
|
138155
138155
|
const { __scopeMenu, ...labelProps } = props;
|
|
138156
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
138156
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$4.div, { ...labelProps, ref: forwardedRef });
|
|
138157
138157
|
}
|
|
138158
138158
|
);
|
|
138159
138159
|
MenuLabel.displayName = LABEL_NAME$1;
|
|
@@ -138165,7 +138165,7 @@ var MenuItem = React__namespace.forwardRef(
|
|
|
138165
138165
|
const ref = React__namespace.useRef(null);
|
|
138166
138166
|
const rootContext = useMenuRootContext(ITEM_NAME$3, props.__scopeMenu);
|
|
138167
138167
|
const contentContext = useMenuContentContext(ITEM_NAME$3, props.__scopeMenu);
|
|
138168
|
-
const composedRefs = useComposedRefs$
|
|
138168
|
+
const composedRefs = useComposedRefs$3(forwardedRef, ref);
|
|
138169
138169
|
const isPointerDownRef = React__namespace.useRef(false);
|
|
138170
138170
|
const handleSelect = () => {
|
|
138171
138171
|
const menuItem = ref.current;
|
|
@@ -138186,15 +138186,15 @@ var MenuItem = React__namespace.forwardRef(
|
|
|
138186
138186
|
...itemProps,
|
|
138187
138187
|
ref: composedRefs,
|
|
138188
138188
|
disabled,
|
|
138189
|
-
onClick: composeEventHandlers$
|
|
138189
|
+
onClick: composeEventHandlers$3(props.onClick, handleSelect),
|
|
138190
138190
|
onPointerDown: (event) => {
|
|
138191
138191
|
props.onPointerDown?.(event);
|
|
138192
138192
|
isPointerDownRef.current = true;
|
|
138193
138193
|
},
|
|
138194
|
-
onPointerUp: composeEventHandlers$
|
|
138194
|
+
onPointerUp: composeEventHandlers$3(props.onPointerUp, (event) => {
|
|
138195
138195
|
if (!isPointerDownRef.current) event.currentTarget?.click();
|
|
138196
138196
|
}),
|
|
138197
|
-
onKeyDown: composeEventHandlers$
|
|
138197
|
+
onKeyDown: composeEventHandlers$3(props.onKeyDown, (event) => {
|
|
138198
138198
|
const isTypingAhead = contentContext.searchRef.current !== "";
|
|
138199
138199
|
if (disabled || isTypingAhead && event.key === " ") return;
|
|
138200
138200
|
if (SELECTION_KEYS.includes(event.key)) {
|
|
@@ -138213,7 +138213,7 @@ var MenuItemImpl = React__namespace.forwardRef(
|
|
|
138213
138213
|
const contentContext = useMenuContentContext(ITEM_NAME$3, __scopeMenu);
|
|
138214
138214
|
const rovingFocusGroupScope = useRovingFocusGroupScope$1(__scopeMenu);
|
|
138215
138215
|
const ref = React__namespace.useRef(null);
|
|
138216
|
-
const composedRefs = useComposedRefs$
|
|
138216
|
+
const composedRefs = useComposedRefs$3(forwardedRef, ref);
|
|
138217
138217
|
const [isFocused, setIsFocused] = React__namespace.useState(false);
|
|
138218
138218
|
const [textContent, setTextContent] = React__namespace.useState("");
|
|
138219
138219
|
React__namespace.useEffect(() => {
|
|
@@ -138229,7 +138229,7 @@ var MenuItemImpl = React__namespace.forwardRef(
|
|
|
138229
138229
|
disabled,
|
|
138230
138230
|
textValue: textValue ?? textContent,
|
|
138231
138231
|
children: /* @__PURE__ */ jsxRuntime.jsx(Item$1, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
138232
|
-
Primitive$
|
|
138232
|
+
Primitive$4.div,
|
|
138233
138233
|
{
|
|
138234
138234
|
role: "menuitem",
|
|
138235
138235
|
"data-highlighted": isFocused ? "" : void 0,
|
|
@@ -138237,7 +138237,7 @@ var MenuItemImpl = React__namespace.forwardRef(
|
|
|
138237
138237
|
"data-disabled": disabled ? "" : void 0,
|
|
138238
138238
|
...itemProps,
|
|
138239
138239
|
ref: composedRefs,
|
|
138240
|
-
onPointerMove: composeEventHandlers$
|
|
138240
|
+
onPointerMove: composeEventHandlers$3(
|
|
138241
138241
|
props.onPointerMove,
|
|
138242
138242
|
whenMouse((event) => {
|
|
138243
138243
|
if (disabled) {
|
|
@@ -138251,12 +138251,12 @@ var MenuItemImpl = React__namespace.forwardRef(
|
|
|
138251
138251
|
}
|
|
138252
138252
|
})
|
|
138253
138253
|
),
|
|
138254
|
-
onPointerLeave: composeEventHandlers$
|
|
138254
|
+
onPointerLeave: composeEventHandlers$3(
|
|
138255
138255
|
props.onPointerLeave,
|
|
138256
138256
|
whenMouse((event) => contentContext.onItemLeave(event))
|
|
138257
138257
|
),
|
|
138258
|
-
onFocus: composeEventHandlers$
|
|
138259
|
-
onBlur: composeEventHandlers$
|
|
138258
|
+
onFocus: composeEventHandlers$3(props.onFocus, () => setIsFocused(true)),
|
|
138259
|
+
onBlur: composeEventHandlers$3(props.onBlur, () => setIsFocused(false))
|
|
138260
138260
|
}
|
|
138261
138261
|
) })
|
|
138262
138262
|
}
|
|
@@ -138275,7 +138275,7 @@ var MenuCheckboxItem = React__namespace.forwardRef(
|
|
|
138275
138275
|
...checkboxItemProps,
|
|
138276
138276
|
ref: forwardedRef,
|
|
138277
138277
|
"data-state": getCheckedState(checked),
|
|
138278
|
-
onSelect: composeEventHandlers$
|
|
138278
|
+
onSelect: composeEventHandlers$3(
|
|
138279
138279
|
checkboxItemProps.onSelect,
|
|
138280
138280
|
() => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),
|
|
138281
138281
|
{ checkForDefaultPrevented: false }
|
|
@@ -138294,7 +138294,7 @@ var [RadioGroupProvider$1, useRadioGroupContext$1] = createMenuContext(
|
|
|
138294
138294
|
var MenuRadioGroup = React__namespace.forwardRef(
|
|
138295
138295
|
(props, forwardedRef) => {
|
|
138296
138296
|
const { value, onValueChange, ...groupProps } = props;
|
|
138297
|
-
const handleValueChange = useCallbackRef$
|
|
138297
|
+
const handleValueChange = useCallbackRef$4(onValueChange);
|
|
138298
138298
|
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupProvider$1, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsxRuntime.jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });
|
|
138299
138299
|
}
|
|
138300
138300
|
);
|
|
@@ -138313,7 +138313,7 @@ var MenuRadioItem = React__namespace.forwardRef(
|
|
|
138313
138313
|
...radioItemProps,
|
|
138314
138314
|
ref: forwardedRef,
|
|
138315
138315
|
"data-state": getCheckedState(checked),
|
|
138316
|
-
onSelect: composeEventHandlers$
|
|
138316
|
+
onSelect: composeEventHandlers$3(
|
|
138317
138317
|
radioItemProps.onSelect,
|
|
138318
138318
|
() => context.onValueChange?.(value),
|
|
138319
138319
|
{ checkForDefaultPrevented: false }
|
|
@@ -138337,7 +138337,7 @@ var MenuItemIndicator = React__namespace.forwardRef(
|
|
|
138337
138337
|
{
|
|
138338
138338
|
present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
|
|
138339
138339
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
138340
|
-
Primitive$
|
|
138340
|
+
Primitive$4.span,
|
|
138341
138341
|
{
|
|
138342
138342
|
...itemIndicatorProps,
|
|
138343
138343
|
ref: forwardedRef,
|
|
@@ -138354,7 +138354,7 @@ var MenuSeparator = React__namespace.forwardRef(
|
|
|
138354
138354
|
(props, forwardedRef) => {
|
|
138355
138355
|
const { __scopeMenu, ...separatorProps } = props;
|
|
138356
138356
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
138357
|
-
Primitive$
|
|
138357
|
+
Primitive$4.div,
|
|
138358
138358
|
{
|
|
138359
138359
|
role: "separator",
|
|
138360
138360
|
"aria-orientation": "horizontal",
|
|
@@ -138382,7 +138382,7 @@ var MenuSub = (props) => {
|
|
|
138382
138382
|
const popperScope = usePopperScope$1(__scopeMenu);
|
|
138383
138383
|
const [trigger, setTrigger] = React__namespace.useState(null);
|
|
138384
138384
|
const [content, setContent] = React__namespace.useState(null);
|
|
138385
|
-
const handleOpenChange = useCallbackRef$
|
|
138385
|
+
const handleOpenChange = useCallbackRef$4(onOpenChange);
|
|
138386
138386
|
React__namespace.useEffect(() => {
|
|
138387
138387
|
if (parentMenuContext.open === false) handleOpenChange(false);
|
|
138388
138388
|
return () => handleOpenChange(false);
|
|
@@ -138441,14 +138441,14 @@ var MenuSubTrigger = React__namespace.forwardRef(
|
|
|
138441
138441
|
"aria-controls": subContext.contentId,
|
|
138442
138442
|
"data-state": getOpenState(context.open),
|
|
138443
138443
|
...props,
|
|
138444
|
-
ref: composeRefs$
|
|
138444
|
+
ref: composeRefs$3(forwardedRef, subContext.onTriggerChange),
|
|
138445
138445
|
onClick: (event) => {
|
|
138446
138446
|
props.onClick?.(event);
|
|
138447
138447
|
if (props.disabled || event.defaultPrevented) return;
|
|
138448
138448
|
event.currentTarget.focus();
|
|
138449
138449
|
if (!context.open) context.onOpenChange(true);
|
|
138450
138450
|
},
|
|
138451
|
-
onPointerMove: composeEventHandlers$
|
|
138451
|
+
onPointerMove: composeEventHandlers$3(
|
|
138452
138452
|
props.onPointerMove,
|
|
138453
138453
|
whenMouse((event) => {
|
|
138454
138454
|
contentContext.onItemEnter(event);
|
|
@@ -138462,7 +138462,7 @@ var MenuSubTrigger = React__namespace.forwardRef(
|
|
|
138462
138462
|
}
|
|
138463
138463
|
})
|
|
138464
138464
|
),
|
|
138465
|
-
onPointerLeave: composeEventHandlers$
|
|
138465
|
+
onPointerLeave: composeEventHandlers$3(
|
|
138466
138466
|
props.onPointerLeave,
|
|
138467
138467
|
whenMouse((event) => {
|
|
138468
138468
|
clearOpenTimer();
|
|
@@ -138497,7 +138497,7 @@ var MenuSubTrigger = React__namespace.forwardRef(
|
|
|
138497
138497
|
}
|
|
138498
138498
|
})
|
|
138499
138499
|
),
|
|
138500
|
-
onKeyDown: composeEventHandlers$
|
|
138500
|
+
onKeyDown: composeEventHandlers$3(props.onKeyDown, (event) => {
|
|
138501
138501
|
const isTypingAhead = contentContext.searchRef.current !== "";
|
|
138502
138502
|
if (props.disabled || isTypingAhead && event.key === " ") return;
|
|
138503
138503
|
if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {
|
|
@@ -138520,7 +138520,7 @@ var MenuSubContent = React__namespace.forwardRef(
|
|
|
138520
138520
|
const rootContext = useMenuRootContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
138521
138521
|
const subContext = useMenuSubContext(SUB_CONTENT_NAME$1, props.__scopeMenu);
|
|
138522
138522
|
const ref = React__namespace.useRef(null);
|
|
138523
|
-
const composedRefs = useComposedRefs$
|
|
138523
|
+
const composedRefs = useComposedRefs$3(forwardedRef, ref);
|
|
138524
138524
|
return /* @__PURE__ */ jsxRuntime.jsx(Collection$1.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Collection$1.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
138525
138525
|
MenuContentImpl,
|
|
138526
138526
|
{
|
|
@@ -138538,14 +138538,14 @@ var MenuSubContent = React__namespace.forwardRef(
|
|
|
138538
138538
|
event.preventDefault();
|
|
138539
138539
|
},
|
|
138540
138540
|
onCloseAutoFocus: (event) => event.preventDefault(),
|
|
138541
|
-
onFocusOutside: composeEventHandlers$
|
|
138541
|
+
onFocusOutside: composeEventHandlers$3(props.onFocusOutside, (event) => {
|
|
138542
138542
|
if (event.target !== subContext.trigger) context.onOpenChange(false);
|
|
138543
138543
|
}),
|
|
138544
|
-
onEscapeKeyDown: composeEventHandlers$
|
|
138544
|
+
onEscapeKeyDown: composeEventHandlers$3(props.onEscapeKeyDown, (event) => {
|
|
138545
138545
|
rootContext.onClose();
|
|
138546
138546
|
event.preventDefault();
|
|
138547
138547
|
}),
|
|
138548
|
-
onKeyDown: composeEventHandlers$
|
|
138548
|
+
onKeyDown: composeEventHandlers$3(props.onKeyDown, (event) => {
|
|
138549
138549
|
const isKeyDownInside = event.currentTarget.contains(event.target);
|
|
138550
138550
|
const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);
|
|
138551
138551
|
if (isKeyDownInside && isCloseKey) {
|
|
@@ -138630,7 +138630,7 @@ var SubTrigger = MenuSubTrigger;
|
|
|
138630
138630
|
var SubContent = MenuSubContent;
|
|
138631
138631
|
|
|
138632
138632
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
138633
|
-
var useLayoutEffect2$
|
|
138633
|
+
var useLayoutEffect2$3 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
138634
138634
|
};
|
|
138635
138635
|
|
|
138636
138636
|
// packages/react/id/src/id.tsx
|
|
@@ -138638,14 +138638,14 @@ var useReactId$2 = React__namespace["useId".toString()] || (() => void 0);
|
|
|
138638
138638
|
var count$3 = 0;
|
|
138639
138639
|
function useId$2(deterministicId) {
|
|
138640
138640
|
const [id, setId] = React__namespace.useState(useReactId$2());
|
|
138641
|
-
useLayoutEffect2$
|
|
138641
|
+
useLayoutEffect2$3(() => {
|
|
138642
138642
|
if (!deterministicId) setId((reactId) => reactId ?? String(count$3++));
|
|
138643
138643
|
}, [deterministicId]);
|
|
138644
138644
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
138645
138645
|
}
|
|
138646
138646
|
|
|
138647
138647
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
138648
|
-
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope$
|
|
138648
|
+
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope$a(
|
|
138649
138649
|
DROPDOWN_MENU_NAME,
|
|
138650
138650
|
[createMenuScope]
|
|
138651
138651
|
);
|
|
@@ -138691,7 +138691,7 @@ var DropdownMenuTrigger = React__namespace.forwardRef(
|
|
|
138691
138691
|
const context = useDropdownMenuContext(TRIGGER_NAME$1, __scopeDropdownMenu);
|
|
138692
138692
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
138693
138693
|
return /* @__PURE__ */ jsxRuntime.jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
138694
|
-
Primitive$
|
|
138694
|
+
Primitive$5.button,
|
|
138695
138695
|
{
|
|
138696
138696
|
type: "button",
|
|
138697
138697
|
id: context.triggerId,
|
|
@@ -138702,14 +138702,14 @@ var DropdownMenuTrigger = React__namespace.forwardRef(
|
|
|
138702
138702
|
"data-disabled": disabled ? "" : void 0,
|
|
138703
138703
|
disabled,
|
|
138704
138704
|
...triggerProps,
|
|
138705
|
-
ref: composeRefs$
|
|
138706
|
-
onPointerDown: composeEventHandlers$
|
|
138705
|
+
ref: composeRefs$4(forwardedRef, context.triggerRef),
|
|
138706
|
+
onPointerDown: composeEventHandlers$4(props.onPointerDown, (event) => {
|
|
138707
138707
|
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
138708
138708
|
context.onOpenToggle();
|
|
138709
138709
|
if (!context.open) event.preventDefault();
|
|
138710
138710
|
}
|
|
138711
138711
|
}),
|
|
138712
|
-
onKeyDown: composeEventHandlers$
|
|
138712
|
+
onKeyDown: composeEventHandlers$4(props.onKeyDown, (event) => {
|
|
138713
138713
|
if (disabled) return;
|
|
138714
138714
|
if (["Enter", " "].includes(event.key)) context.onOpenToggle();
|
|
138715
138715
|
if (event.key === "ArrowDown") context.onOpenChange(true);
|
|
@@ -138742,12 +138742,12 @@ var DropdownMenuContent = React__namespace.forwardRef(
|
|
|
138742
138742
|
...menuScope,
|
|
138743
138743
|
...contentProps,
|
|
138744
138744
|
ref: forwardedRef,
|
|
138745
|
-
onCloseAutoFocus: composeEventHandlers$
|
|
138745
|
+
onCloseAutoFocus: composeEventHandlers$4(props.onCloseAutoFocus, (event) => {
|
|
138746
138746
|
if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
|
|
138747
138747
|
hasInteractedOutsideRef.current = false;
|
|
138748
138748
|
event.preventDefault();
|
|
138749
138749
|
}),
|
|
138750
|
-
onInteractOutside: composeEventHandlers$
|
|
138750
|
+
onInteractOutside: composeEventHandlers$4(props.onInteractOutside, (event) => {
|
|
138751
138751
|
const originalEvent = event.detail.originalEvent;
|
|
138752
138752
|
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
138753
138753
|
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
@@ -139011,7 +139011,7 @@ function Notification(_a) {
|
|
|
139011
139011
|
}
|
|
139012
139012
|
|
|
139013
139013
|
// packages/react/primitive/src/Primitive.tsx
|
|
139014
|
-
var NODES$
|
|
139014
|
+
var NODES$3 = [
|
|
139015
139015
|
"a",
|
|
139016
139016
|
"button",
|
|
139017
139017
|
"div",
|
|
@@ -139029,7 +139029,7 @@ var NODES$2 = [
|
|
|
139029
139029
|
"svg",
|
|
139030
139030
|
"ul"
|
|
139031
139031
|
];
|
|
139032
|
-
var Primitive$
|
|
139032
|
+
var Primitive$3 = NODES$3.reduce((primitive, node) => {
|
|
139033
139033
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
139034
139034
|
const { asChild, ...primitiveProps } = props;
|
|
139035
139035
|
const Comp = asChild ? Slot : node;
|
|
@@ -139052,7 +139052,7 @@ var Separator$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139052
139052
|
const ariaOrientation = orientation === "vertical" ? orientation : void 0;
|
|
139053
139053
|
const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
|
|
139054
139054
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
139055
|
-
Primitive$
|
|
139055
|
+
Primitive$3.div,
|
|
139056
139056
|
{
|
|
139057
139057
|
"data-orientation": orientation,
|
|
139058
139058
|
...semanticProps,
|
|
@@ -139065,15 +139065,15 @@ Separator$1.displayName = NAME$1;
|
|
|
139065
139065
|
function isValidOrientation(orientation) {
|
|
139066
139066
|
return ORIENTATIONS.includes(orientation);
|
|
139067
139067
|
}
|
|
139068
|
-
var Root$
|
|
139068
|
+
var Root$3 = Separator$1;
|
|
139069
139069
|
|
|
139070
139070
|
var Separator = React__namespace.forwardRef(function (_a, ref) {
|
|
139071
139071
|
var className = _a.className, _b = _a.orientation, orientation = _b === void 0 ? "horizontal" : _b, _c = _a.decorative, decorative = _c === void 0 ? true : _c, props = __rest(_a, ["className", "orientation", "decorative"]);
|
|
139072
|
-
return (React__namespace.createElement(Root$
|
|
139072
|
+
return (React__namespace.createElement(Root$3, __assign({ ref: ref, decorative: decorative, orientation: orientation, className: classNames("s-shrink-0 s-bg-separator", orientation === "horizontal"
|
|
139073
139073
|
? "s-h-[1px] s-w-full"
|
|
139074
139074
|
: "s-h-full s-w-[1px]", className !== null && className !== void 0 ? className : "") }, props)));
|
|
139075
139075
|
});
|
|
139076
|
-
Separator.displayName = Root$
|
|
139076
|
+
Separator.displayName = Root$3.displayName;
|
|
139077
139077
|
|
|
139078
139078
|
function Page(_a) {
|
|
139079
139079
|
var children = _a.children, _b = _a.variant, variant = _b === void 0 ? "normal" : _b;
|
|
@@ -139186,7 +139186,7 @@ function PaginatedCitationsGrid(_a) {
|
|
|
139186
139186
|
}
|
|
139187
139187
|
|
|
139188
139188
|
// packages/core/primitive/src/primitive.tsx
|
|
139189
|
-
function composeEventHandlers$
|
|
139189
|
+
function composeEventHandlers$2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
139190
139190
|
return function handleEvent(event) {
|
|
139191
139191
|
originalEventHandler?.(event);
|
|
139192
139192
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -139196,22 +139196,22 @@ function composeEventHandlers$1(originalEventHandler, ourEventHandler, { checkFo
|
|
|
139196
139196
|
}
|
|
139197
139197
|
|
|
139198
139198
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
139199
|
-
function setRef$
|
|
139199
|
+
function setRef$2(ref, value) {
|
|
139200
139200
|
if (typeof ref === "function") {
|
|
139201
139201
|
ref(value);
|
|
139202
139202
|
} else if (ref !== null && ref !== void 0) {
|
|
139203
139203
|
ref.current = value;
|
|
139204
139204
|
}
|
|
139205
139205
|
}
|
|
139206
|
-
function composeRefs$
|
|
139207
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
139206
|
+
function composeRefs$2(...refs) {
|
|
139207
|
+
return (node) => refs.forEach((ref) => setRef$2(ref, node));
|
|
139208
139208
|
}
|
|
139209
|
-
function useComposedRefs$
|
|
139210
|
-
return React__namespace.useCallback(composeRefs$
|
|
139209
|
+
function useComposedRefs$2(...refs) {
|
|
139210
|
+
return React__namespace.useCallback(composeRefs$2(...refs), refs);
|
|
139211
139211
|
}
|
|
139212
139212
|
|
|
139213
139213
|
// packages/react/context/src/createContext.tsx
|
|
139214
|
-
function createContextScope$
|
|
139214
|
+
function createContextScope$5(scopeName, createContextScopeDeps = []) {
|
|
139215
139215
|
let defaultContexts = [];
|
|
139216
139216
|
function createContext3(rootComponentName, defaultContext) {
|
|
139217
139217
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -139246,9 +139246,9 @@ function createContextScope$4(scopeName, createContextScopeDeps = []) {
|
|
|
139246
139246
|
};
|
|
139247
139247
|
};
|
|
139248
139248
|
createScope.scopeName = scopeName;
|
|
139249
|
-
return [createContext3, composeContextScopes$
|
|
139249
|
+
return [createContext3, composeContextScopes$5(createScope, ...createContextScopeDeps)];
|
|
139250
139250
|
}
|
|
139251
|
-
function composeContextScopes$
|
|
139251
|
+
function composeContextScopes$5(...scopes) {
|
|
139252
139252
|
const baseScope = scopes[0];
|
|
139253
139253
|
if (scopes.length === 1) return baseScope;
|
|
139254
139254
|
const createScope = () => {
|
|
@@ -139270,7 +139270,7 @@ function composeContextScopes$4(...scopes) {
|
|
|
139270
139270
|
}
|
|
139271
139271
|
|
|
139272
139272
|
// packages/react/primitive/src/Primitive.tsx
|
|
139273
|
-
var NODES$
|
|
139273
|
+
var NODES$2 = [
|
|
139274
139274
|
"a",
|
|
139275
139275
|
"button",
|
|
139276
139276
|
"div",
|
|
@@ -139288,7 +139288,7 @@ var NODES$1 = [
|
|
|
139288
139288
|
"svg",
|
|
139289
139289
|
"ul"
|
|
139290
139290
|
];
|
|
139291
|
-
var Primitive$
|
|
139291
|
+
var Primitive$2 = NODES$2.reduce((primitive, node) => {
|
|
139292
139292
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
139293
139293
|
const { asChild, ...primitiveProps } = props;
|
|
139294
139294
|
const Comp = asChild ? Slot : node;
|
|
@@ -139305,7 +139305,7 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
139305
139305
|
}
|
|
139306
139306
|
|
|
139307
139307
|
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
139308
|
-
function useCallbackRef$
|
|
139308
|
+
function useCallbackRef$2(callback) {
|
|
139309
139309
|
const callbackRef = React__namespace.useRef(callback);
|
|
139310
139310
|
React__namespace.useEffect(() => {
|
|
139311
139311
|
callbackRef.current = callback;
|
|
@@ -139315,7 +139315,7 @@ function useCallbackRef$1(callback) {
|
|
|
139315
139315
|
|
|
139316
139316
|
// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx
|
|
139317
139317
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
139318
|
-
const onEscapeKeyDown = useCallbackRef$
|
|
139318
|
+
const onEscapeKeyDown = useCallbackRef$2(onEscapeKeyDownProp);
|
|
139319
139319
|
React__namespace.useEffect(() => {
|
|
139320
139320
|
const handleKeyDown = (event) => {
|
|
139321
139321
|
if (event.key === "Escape") {
|
|
@@ -139352,7 +139352,7 @@ var DismissableLayer = React__namespace.forwardRef(
|
|
|
139352
139352
|
const [node, setNode] = React__namespace.useState(null);
|
|
139353
139353
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
139354
139354
|
const [, force] = React__namespace.useState({});
|
|
139355
|
-
const composedRefs = useComposedRefs$
|
|
139355
|
+
const composedRefs = useComposedRefs$2(forwardedRef, (node2) => setNode(node2));
|
|
139356
139356
|
const layers = Array.from(context.layers);
|
|
139357
139357
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
139358
139358
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
@@ -139415,7 +139415,7 @@ var DismissableLayer = React__namespace.forwardRef(
|
|
|
139415
139415
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
139416
139416
|
}, []);
|
|
139417
139417
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
139418
|
-
Primitive$
|
|
139418
|
+
Primitive$2.div,
|
|
139419
139419
|
{
|
|
139420
139420
|
...layerProps,
|
|
139421
139421
|
ref: composedRefs,
|
|
@@ -139423,9 +139423,9 @@ var DismissableLayer = React__namespace.forwardRef(
|
|
|
139423
139423
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
139424
139424
|
...props.style
|
|
139425
139425
|
},
|
|
139426
|
-
onFocusCapture: composeEventHandlers$
|
|
139427
|
-
onBlurCapture: composeEventHandlers$
|
|
139428
|
-
onPointerDownCapture: composeEventHandlers$
|
|
139426
|
+
onFocusCapture: composeEventHandlers$2(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
139427
|
+
onBlurCapture: composeEventHandlers$2(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
139428
|
+
onPointerDownCapture: composeEventHandlers$2(
|
|
139429
139429
|
props.onPointerDownCapture,
|
|
139430
139430
|
pointerDownOutside.onPointerDownCapture
|
|
139431
139431
|
)
|
|
@@ -139438,7 +139438,7 @@ var BRANCH_NAME = "DismissableLayerBranch";
|
|
|
139438
139438
|
var DismissableLayerBranch = React__namespace.forwardRef((props, forwardedRef) => {
|
|
139439
139439
|
const context = React__namespace.useContext(DismissableLayerContext);
|
|
139440
139440
|
const ref = React__namespace.useRef(null);
|
|
139441
|
-
const composedRefs = useComposedRefs$
|
|
139441
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
139442
139442
|
React__namespace.useEffect(() => {
|
|
139443
139443
|
const node = ref.current;
|
|
139444
139444
|
if (node) {
|
|
@@ -139448,11 +139448,11 @@ var DismissableLayerBranch = React__namespace.forwardRef((props, forwardedRef) =
|
|
|
139448
139448
|
};
|
|
139449
139449
|
}
|
|
139450
139450
|
}, [context.branches]);
|
|
139451
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
139451
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$2.div, { ...props, ref: composedRefs });
|
|
139452
139452
|
});
|
|
139453
139453
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
139454
139454
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
139455
|
-
const handlePointerDownOutside = useCallbackRef$
|
|
139455
|
+
const handlePointerDownOutside = useCallbackRef$2(onPointerDownOutside);
|
|
139456
139456
|
const isPointerInsideReactTreeRef = React__namespace.useRef(false);
|
|
139457
139457
|
const handleClickRef = React__namespace.useRef(() => {
|
|
139458
139458
|
});
|
|
@@ -139495,7 +139495,7 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
139495
139495
|
};
|
|
139496
139496
|
}
|
|
139497
139497
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
139498
|
-
const handleFocusOutside = useCallbackRef$
|
|
139498
|
+
const handleFocusOutside = useCallbackRef$2(onFocusOutside);
|
|
139499
139499
|
const isFocusInsideReactTreeRef = React__namespace.useRef(false);
|
|
139500
139500
|
React__namespace.useEffect(() => {
|
|
139501
139501
|
const handleFocus = (event) => {
|
|
@@ -139568,10 +139568,10 @@ var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139568
139568
|
...scopeProps
|
|
139569
139569
|
} = props;
|
|
139570
139570
|
const [container, setContainer] = React__namespace.useState(null);
|
|
139571
|
-
const onMountAutoFocus = useCallbackRef$
|
|
139572
|
-
const onUnmountAutoFocus = useCallbackRef$
|
|
139571
|
+
const onMountAutoFocus = useCallbackRef$2(onMountAutoFocusProp);
|
|
139572
|
+
const onUnmountAutoFocus = useCallbackRef$2(onUnmountAutoFocusProp);
|
|
139573
139573
|
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
139574
|
-
const composedRefs = useComposedRefs$
|
|
139574
|
+
const composedRefs = useComposedRefs$2(forwardedRef, (node) => setContainer(node));
|
|
139575
139575
|
const focusScope = React__namespace.useRef({
|
|
139576
139576
|
paused: false,
|
|
139577
139577
|
pause() {
|
|
@@ -139672,7 +139672,7 @@ var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139672
139672
|
},
|
|
139673
139673
|
[loop, trapped, focusScope.paused]
|
|
139674
139674
|
);
|
|
139675
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
139675
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$2.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
139676
139676
|
});
|
|
139677
139677
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
139678
139678
|
function focusFirst$1(candidates, { select = false } = {}) {
|
|
@@ -139756,7 +139756,7 @@ function removeLinks(items) {
|
|
|
139756
139756
|
}
|
|
139757
139757
|
|
|
139758
139758
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
139759
|
-
var useLayoutEffect2$
|
|
139759
|
+
var useLayoutEffect2$2 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
139760
139760
|
};
|
|
139761
139761
|
|
|
139762
139762
|
// packages/react/id/src/id.tsx
|
|
@@ -139764,7 +139764,7 @@ var useReactId$1 = React__namespace["useId".toString()] || (() => void 0);
|
|
|
139764
139764
|
var count$1 = 0;
|
|
139765
139765
|
function useId$1(deterministicId) {
|
|
139766
139766
|
const [id, setId] = React__namespace.useState(useReactId$1());
|
|
139767
|
-
useLayoutEffect2$
|
|
139767
|
+
useLayoutEffect2$2(() => {
|
|
139768
139768
|
if (!deterministicId) setId((reactId) => reactId ?? String(count$1++));
|
|
139769
139769
|
}, [deterministicId]);
|
|
139770
139770
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
@@ -139775,7 +139775,7 @@ var NAME = "Arrow";
|
|
|
139775
139775
|
var Arrow$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
139776
139776
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
139777
139777
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
139778
|
-
Primitive$
|
|
139778
|
+
Primitive$2.svg,
|
|
139779
139779
|
{
|
|
139780
139780
|
...arrowProps,
|
|
139781
139781
|
ref: forwardedRef,
|
|
@@ -139788,10 +139788,10 @@ var Arrow$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139788
139788
|
);
|
|
139789
139789
|
});
|
|
139790
139790
|
Arrow$1.displayName = NAME;
|
|
139791
|
-
var Root$
|
|
139791
|
+
var Root$2 = Arrow$1;
|
|
139792
139792
|
|
|
139793
139793
|
// packages/react/context/src/createContext.tsx
|
|
139794
|
-
function createContextScope$
|
|
139794
|
+
function createContextScope$4(scopeName, createContextScopeDeps = []) {
|
|
139795
139795
|
let defaultContexts = [];
|
|
139796
139796
|
function createContext3(rootComponentName, defaultContext) {
|
|
139797
139797
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -139826,9 +139826,9 @@ function createContextScope$3(scopeName, createContextScopeDeps = []) {
|
|
|
139826
139826
|
};
|
|
139827
139827
|
};
|
|
139828
139828
|
createScope.scopeName = scopeName;
|
|
139829
|
-
return [createContext3, composeContextScopes$
|
|
139829
|
+
return [createContext3, composeContextScopes$4(createScope, ...createContextScopeDeps)];
|
|
139830
139830
|
}
|
|
139831
|
-
function composeContextScopes$
|
|
139831
|
+
function composeContextScopes$4(...scopes) {
|
|
139832
139832
|
const baseScope = scopes[0];
|
|
139833
139833
|
if (scopes.length === 1) return baseScope;
|
|
139834
139834
|
const createScope = () => {
|
|
@@ -139852,7 +139852,7 @@ function composeContextScopes$3(...scopes) {
|
|
|
139852
139852
|
// packages/react/use-size/src/useSize.tsx
|
|
139853
139853
|
function useSize$1(element) {
|
|
139854
139854
|
const [size, setSize] = React__namespace.useState(void 0);
|
|
139855
|
-
useLayoutEffect2$
|
|
139855
|
+
useLayoutEffect2$2(() => {
|
|
139856
139856
|
if (element) {
|
|
139857
139857
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
139858
139858
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -139886,7 +139886,7 @@ function useSize$1(element) {
|
|
|
139886
139886
|
}
|
|
139887
139887
|
|
|
139888
139888
|
var POPPER_NAME = "Popper";
|
|
139889
|
-
var [createPopperContext, createPopperScope] = createContextScope$
|
|
139889
|
+
var [createPopperContext, createPopperScope] = createContextScope$4(POPPER_NAME);
|
|
139890
139890
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
139891
139891
|
var Popper = (props) => {
|
|
139892
139892
|
const { __scopePopper, children } = props;
|
|
@@ -139900,11 +139900,11 @@ var PopperAnchor = React__namespace.forwardRef(
|
|
|
139900
139900
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
139901
139901
|
const context = usePopperContext(ANCHOR_NAME$1, __scopePopper);
|
|
139902
139902
|
const ref = React__namespace.useRef(null);
|
|
139903
|
-
const composedRefs = useComposedRefs$
|
|
139903
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
139904
139904
|
React__namespace.useEffect(() => {
|
|
139905
139905
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
139906
139906
|
});
|
|
139907
|
-
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
139907
|
+
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$2.div, { ...anchorProps, ref: composedRefs });
|
|
139908
139908
|
}
|
|
139909
139909
|
);
|
|
139910
139910
|
PopperAnchor.displayName = ANCHOR_NAME$1;
|
|
@@ -139930,7 +139930,7 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
139930
139930
|
} = props;
|
|
139931
139931
|
const context = usePopperContext(CONTENT_NAME$1, __scopePopper);
|
|
139932
139932
|
const [content, setContent] = React__namespace.useState(null);
|
|
139933
|
-
const composedRefs = useComposedRefs$
|
|
139933
|
+
const composedRefs = useComposedRefs$2(forwardedRef, (node) => setContent(node));
|
|
139934
139934
|
const [arrow$1, setArrow] = React__namespace.useState(null);
|
|
139935
139935
|
const arrowSize = useSize$1(arrow$1);
|
|
139936
139936
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
@@ -139984,8 +139984,8 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
139984
139984
|
]
|
|
139985
139985
|
});
|
|
139986
139986
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
139987
|
-
const handlePlaced = useCallbackRef$
|
|
139988
|
-
useLayoutEffect2$
|
|
139987
|
+
const handlePlaced = useCallbackRef$2(onPlaced);
|
|
139988
|
+
useLayoutEffect2$2(() => {
|
|
139989
139989
|
if (isPositioned) {
|
|
139990
139990
|
handlePlaced?.();
|
|
139991
139991
|
}
|
|
@@ -139994,7 +139994,7 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
139994
139994
|
const arrowY = middlewareData.arrow?.y;
|
|
139995
139995
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
139996
139996
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
139997
|
-
useLayoutEffect2$
|
|
139997
|
+
useLayoutEffect2$2(() => {
|
|
139998
139998
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
139999
139999
|
}, [content]);
|
|
140000
140000
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -140031,7 +140031,7 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
140031
140031
|
arrowY,
|
|
140032
140032
|
shouldHideArrow: cannotCenterArrow,
|
|
140033
140033
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
140034
|
-
Primitive$
|
|
140034
|
+
Primitive$2.div,
|
|
140035
140035
|
{
|
|
140036
140036
|
"data-side": placedSide,
|
|
140037
140037
|
"data-align": placedAlign,
|
|
@@ -140091,7 +140091,7 @@ var PopperArrow = React__namespace.forwardRef(function PopperArrow2(props, forwa
|
|
|
140091
140091
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
140092
140092
|
},
|
|
140093
140093
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
140094
|
-
Root$
|
|
140094
|
+
Root$2,
|
|
140095
140095
|
{
|
|
140096
140096
|
...arrowProps,
|
|
140097
140097
|
ref: forwardedRef,
|
|
@@ -140154,9 +140154,9 @@ var PORTAL_NAME$1 = "Portal";
|
|
|
140154
140154
|
var Portal$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
140155
140155
|
const { container: containerProp, ...portalProps } = props;
|
|
140156
140156
|
const [mounted, setMounted] = React__namespace.useState(false);
|
|
140157
|
-
useLayoutEffect2$
|
|
140157
|
+
useLayoutEffect2$2(() => setMounted(true), []);
|
|
140158
140158
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
140159
|
-
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
140159
|
+
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$2.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
140160
140160
|
});
|
|
140161
140161
|
Portal$1.displayName = PORTAL_NAME$1;
|
|
140162
140162
|
|
|
@@ -140170,7 +140170,7 @@ function useControllableState$1({
|
|
|
140170
140170
|
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$1({ defaultProp, onChange });
|
|
140171
140171
|
const isControlled = prop !== void 0;
|
|
140172
140172
|
const value = isControlled ? prop : uncontrolledProp;
|
|
140173
|
-
const handleChange = useCallbackRef$
|
|
140173
|
+
const handleChange = useCallbackRef$2(onChange);
|
|
140174
140174
|
const setValue = React__namespace.useCallback(
|
|
140175
140175
|
(nextValue) => {
|
|
140176
140176
|
if (isControlled) {
|
|
@@ -140192,7 +140192,7 @@ function useUncontrolledState$1({
|
|
|
140192
140192
|
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
140193
140193
|
const [value] = uncontrolledState;
|
|
140194
140194
|
const prevValueRef = React__namespace.useRef(value);
|
|
140195
|
-
const handleChange = useCallbackRef$
|
|
140195
|
+
const handleChange = useCallbackRef$2(onChange);
|
|
140196
140196
|
React__namespace.useEffect(() => {
|
|
140197
140197
|
if (prevValueRef.current !== value) {
|
|
140198
140198
|
handleChange(value);
|
|
@@ -140522,7 +140522,7 @@ ReactRemoveScroll.classNames = RemoveScroll$1.classNames;
|
|
|
140522
140522
|
var RemoveScroll = ReactRemoveScroll;
|
|
140523
140523
|
|
|
140524
140524
|
var POPOVER_NAME = "Popover";
|
|
140525
|
-
var [createPopoverContext, createPopoverScope] = createContextScope$
|
|
140525
|
+
var [createPopoverContext, createPopoverScope] = createContextScope$5(POPOVER_NAME, [
|
|
140526
140526
|
createPopperScope
|
|
140527
140527
|
]);
|
|
140528
140528
|
var usePopperScope = createPopperScope();
|
|
@@ -140583,9 +140583,9 @@ var PopoverTrigger$1 = React__namespace.forwardRef(
|
|
|
140583
140583
|
const { __scopePopover, ...triggerProps } = props;
|
|
140584
140584
|
const context = usePopoverContext(TRIGGER_NAME, __scopePopover);
|
|
140585
140585
|
const popperScope = usePopperScope(__scopePopover);
|
|
140586
|
-
const composedTriggerRef = useComposedRefs$
|
|
140586
|
+
const composedTriggerRef = useComposedRefs$2(forwardedRef, context.triggerRef);
|
|
140587
140587
|
const trigger = /* @__PURE__ */ jsxRuntime.jsx(
|
|
140588
|
-
Primitive$
|
|
140588
|
+
Primitive$2.button,
|
|
140589
140589
|
{
|
|
140590
140590
|
type: "button",
|
|
140591
140591
|
"aria-haspopup": "dialog",
|
|
@@ -140594,7 +140594,7 @@ var PopoverTrigger$1 = React__namespace.forwardRef(
|
|
|
140594
140594
|
"data-state": getState$1(context.open),
|
|
140595
140595
|
...triggerProps,
|
|
140596
140596
|
ref: composedTriggerRef,
|
|
140597
|
-
onClick: composeEventHandlers$
|
|
140597
|
+
onClick: composeEventHandlers$2(props.onClick, context.onOpenToggle)
|
|
140598
140598
|
}
|
|
140599
140599
|
);
|
|
140600
140600
|
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsxRuntime.jsx(Anchor, { asChild: true, ...popperScope, children: trigger });
|
|
@@ -140625,7 +140625,7 @@ var PopoverContentModal = React__namespace.forwardRef(
|
|
|
140625
140625
|
(props, forwardedRef) => {
|
|
140626
140626
|
const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
|
|
140627
140627
|
const contentRef = React__namespace.useRef(null);
|
|
140628
|
-
const composedRefs = useComposedRefs$
|
|
140628
|
+
const composedRefs = useComposedRefs$2(forwardedRef, contentRef);
|
|
140629
140629
|
const isRightClickOutsideRef = React__namespace.useRef(false);
|
|
140630
140630
|
React__namespace.useEffect(() => {
|
|
140631
140631
|
const content = contentRef.current;
|
|
@@ -140638,11 +140638,11 @@ var PopoverContentModal = React__namespace.forwardRef(
|
|
|
140638
140638
|
ref: composedRefs,
|
|
140639
140639
|
trapFocus: context.open,
|
|
140640
140640
|
disableOutsidePointerEvents: true,
|
|
140641
|
-
onCloseAutoFocus: composeEventHandlers$
|
|
140641
|
+
onCloseAutoFocus: composeEventHandlers$2(props.onCloseAutoFocus, (event) => {
|
|
140642
140642
|
event.preventDefault();
|
|
140643
140643
|
if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();
|
|
140644
140644
|
}),
|
|
140645
|
-
onPointerDownOutside: composeEventHandlers$
|
|
140645
|
+
onPointerDownOutside: composeEventHandlers$2(
|
|
140646
140646
|
props.onPointerDownOutside,
|
|
140647
140647
|
(event) => {
|
|
140648
140648
|
const originalEvent = event.detail.originalEvent;
|
|
@@ -140652,7 +140652,7 @@ var PopoverContentModal = React__namespace.forwardRef(
|
|
|
140652
140652
|
},
|
|
140653
140653
|
{ checkForDefaultPrevented: false }
|
|
140654
140654
|
),
|
|
140655
|
-
onFocusOutside: composeEventHandlers$
|
|
140655
|
+
onFocusOutside: composeEventHandlers$2(
|
|
140656
140656
|
props.onFocusOutside,
|
|
140657
140657
|
(event) => event.preventDefault(),
|
|
140658
140658
|
{ checkForDefaultPrevented: false }
|
|
@@ -140770,12 +140770,12 @@ var PopoverClose = React__namespace.forwardRef(
|
|
|
140770
140770
|
const { __scopePopover, ...closeProps } = props;
|
|
140771
140771
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
140772
140772
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
140773
|
-
Primitive$
|
|
140773
|
+
Primitive$2.button,
|
|
140774
140774
|
{
|
|
140775
140775
|
type: "button",
|
|
140776
140776
|
...closeProps,
|
|
140777
140777
|
ref: forwardedRef,
|
|
140778
|
-
onClick: composeEventHandlers$
|
|
140778
|
+
onClick: composeEventHandlers$2(props.onClick, () => context.onOpenChange(false))
|
|
140779
140779
|
}
|
|
140780
140780
|
);
|
|
140781
140781
|
}
|
|
@@ -140908,7 +140908,7 @@ PriceTable.Container = function (_a) {
|
|
|
140908
140908
|
};
|
|
140909
140909
|
|
|
140910
140910
|
// packages/core/primitive/src/primitive.tsx
|
|
140911
|
-
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
140911
|
+
function composeEventHandlers$1(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
140912
140912
|
return function handleEvent(event) {
|
|
140913
140913
|
originalEventHandler?.(event);
|
|
140914
140914
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -140918,22 +140918,22 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
140918
140918
|
}
|
|
140919
140919
|
|
|
140920
140920
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
140921
|
-
function setRef(ref, value) {
|
|
140921
|
+
function setRef$1(ref, value) {
|
|
140922
140922
|
if (typeof ref === "function") {
|
|
140923
140923
|
ref(value);
|
|
140924
140924
|
} else if (ref !== null && ref !== void 0) {
|
|
140925
140925
|
ref.current = value;
|
|
140926
140926
|
}
|
|
140927
140927
|
}
|
|
140928
|
-
function composeRefs(...refs) {
|
|
140929
|
-
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
140928
|
+
function composeRefs$1(...refs) {
|
|
140929
|
+
return (node) => refs.forEach((ref) => setRef$1(ref, node));
|
|
140930
140930
|
}
|
|
140931
|
-
function useComposedRefs(...refs) {
|
|
140932
|
-
return React__namespace.useCallback(composeRefs(...refs), refs);
|
|
140931
|
+
function useComposedRefs$1(...refs) {
|
|
140932
|
+
return React__namespace.useCallback(composeRefs$1(...refs), refs);
|
|
140933
140933
|
}
|
|
140934
140934
|
|
|
140935
140935
|
// packages/react/context/src/createContext.tsx
|
|
140936
|
-
function createContextScope$
|
|
140936
|
+
function createContextScope$3(scopeName, createContextScopeDeps = []) {
|
|
140937
140937
|
let defaultContexts = [];
|
|
140938
140938
|
function createContext3(rootComponentName, defaultContext) {
|
|
140939
140939
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -140968,9 +140968,9 @@ function createContextScope$2(scopeName, createContextScopeDeps = []) {
|
|
|
140968
140968
|
};
|
|
140969
140969
|
};
|
|
140970
140970
|
createScope.scopeName = scopeName;
|
|
140971
|
-
return [createContext3, composeContextScopes$
|
|
140971
|
+
return [createContext3, composeContextScopes$3(createScope, ...createContextScopeDeps)];
|
|
140972
140972
|
}
|
|
140973
|
-
function composeContextScopes$
|
|
140973
|
+
function composeContextScopes$3(...scopes) {
|
|
140974
140974
|
const baseScope = scopes[0];
|
|
140975
140975
|
if (scopes.length === 1) return baseScope;
|
|
140976
140976
|
const createScope = () => {
|
|
@@ -140992,7 +140992,7 @@ function composeContextScopes$2(...scopes) {
|
|
|
140992
140992
|
}
|
|
140993
140993
|
|
|
140994
140994
|
// packages/react/primitive/src/Primitive.tsx
|
|
140995
|
-
var NODES = [
|
|
140995
|
+
var NODES$1 = [
|
|
140996
140996
|
"a",
|
|
140997
140997
|
"button",
|
|
140998
140998
|
"div",
|
|
@@ -141010,7 +141010,7 @@ var NODES = [
|
|
|
141010
141010
|
"svg",
|
|
141011
141011
|
"ul"
|
|
141012
141012
|
];
|
|
141013
|
-
var Primitive = NODES.reduce((primitive, node) => {
|
|
141013
|
+
var Primitive$1 = NODES$1.reduce((primitive, node) => {
|
|
141014
141014
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
141015
141015
|
const { asChild, ...primitiveProps } = props;
|
|
141016
141016
|
const Comp = asChild ? Slot : node;
|
|
@@ -141024,7 +141024,7 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
141024
141024
|
}, {});
|
|
141025
141025
|
|
|
141026
141026
|
// packages/react/context/src/createContext.tsx
|
|
141027
|
-
function createContextScope$
|
|
141027
|
+
function createContextScope$2(scopeName, createContextScopeDeps = []) {
|
|
141028
141028
|
let defaultContexts = [];
|
|
141029
141029
|
function createContext3(rootComponentName, defaultContext) {
|
|
141030
141030
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -141059,9 +141059,9 @@ function createContextScope$1(scopeName, createContextScopeDeps = []) {
|
|
|
141059
141059
|
};
|
|
141060
141060
|
};
|
|
141061
141061
|
createScope.scopeName = scopeName;
|
|
141062
|
-
return [createContext3, composeContextScopes$
|
|
141062
|
+
return [createContext3, composeContextScopes$2(createScope, ...createContextScopeDeps)];
|
|
141063
141063
|
}
|
|
141064
|
-
function composeContextScopes$
|
|
141064
|
+
function composeContextScopes$2(...scopes) {
|
|
141065
141065
|
const baseScope = scopes[0];
|
|
141066
141066
|
if (scopes.length === 1) return baseScope;
|
|
141067
141067
|
const createScope = () => {
|
|
@@ -141084,7 +141084,7 @@ function composeContextScopes$1(...scopes) {
|
|
|
141084
141084
|
|
|
141085
141085
|
function createCollection(name) {
|
|
141086
141086
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
141087
|
-
const [createCollectionContext, createCollectionScope] = createContextScope$
|
|
141087
|
+
const [createCollectionContext, createCollectionScope] = createContextScope$2(PROVIDER_NAME);
|
|
141088
141088
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
141089
141089
|
PROVIDER_NAME,
|
|
141090
141090
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
@@ -141101,7 +141101,7 @@ function createCollection(name) {
|
|
|
141101
141101
|
(props, forwardedRef) => {
|
|
141102
141102
|
const { scope, children } = props;
|
|
141103
141103
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
141104
|
-
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
141104
|
+
const composedRefs = useComposedRefs$1(forwardedRef, context.collectionRef);
|
|
141105
141105
|
return /* @__PURE__ */ jsxRuntime.jsx(Slot, { ref: composedRefs, children });
|
|
141106
141106
|
}
|
|
141107
141107
|
);
|
|
@@ -141112,7 +141112,7 @@ function createCollection(name) {
|
|
|
141112
141112
|
(props, forwardedRef) => {
|
|
141113
141113
|
const { scope, children, ...itemData } = props;
|
|
141114
141114
|
const ref = React.useRef(null);
|
|
141115
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
141115
|
+
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
141116
141116
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
141117
141117
|
React.useEffect(() => {
|
|
141118
141118
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
@@ -141144,7 +141144,7 @@ function createCollection(name) {
|
|
|
141144
141144
|
}
|
|
141145
141145
|
|
|
141146
141146
|
// packages/react/context/src/createContext.tsx
|
|
141147
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
141147
|
+
function createContextScope$1(scopeName, createContextScopeDeps = []) {
|
|
141148
141148
|
let defaultContexts = [];
|
|
141149
141149
|
function createContext3(rootComponentName, defaultContext) {
|
|
141150
141150
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -141179,9 +141179,9 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
141179
141179
|
};
|
|
141180
141180
|
};
|
|
141181
141181
|
createScope.scopeName = scopeName;
|
|
141182
|
-
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
141182
|
+
return [createContext3, composeContextScopes$1(createScope, ...createContextScopeDeps)];
|
|
141183
141183
|
}
|
|
141184
|
-
function composeContextScopes(...scopes) {
|
|
141184
|
+
function composeContextScopes$1(...scopes) {
|
|
141185
141185
|
const baseScope = scopes[0];
|
|
141186
141186
|
if (scopes.length === 1) return baseScope;
|
|
141187
141187
|
const createScope = () => {
|
|
@@ -141203,7 +141203,7 @@ function composeContextScopes(...scopes) {
|
|
|
141203
141203
|
}
|
|
141204
141204
|
|
|
141205
141205
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
141206
|
-
var useLayoutEffect2 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
141206
|
+
var useLayoutEffect2$1 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
141207
141207
|
};
|
|
141208
141208
|
|
|
141209
141209
|
// packages/react/id/src/id.tsx
|
|
@@ -141211,14 +141211,14 @@ var useReactId = React__namespace["useId".toString()] || (() => void 0);
|
|
|
141211
141211
|
var count = 0;
|
|
141212
141212
|
function useId(deterministicId) {
|
|
141213
141213
|
const [id, setId] = React__namespace.useState(useReactId());
|
|
141214
|
-
useLayoutEffect2(() => {
|
|
141214
|
+
useLayoutEffect2$1(() => {
|
|
141215
141215
|
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
|
141216
141216
|
}, [deterministicId]);
|
|
141217
141217
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
141218
141218
|
}
|
|
141219
141219
|
|
|
141220
141220
|
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
141221
|
-
function useCallbackRef(callback) {
|
|
141221
|
+
function useCallbackRef$1(callback) {
|
|
141222
141222
|
const callbackRef = React__namespace.useRef(callback);
|
|
141223
141223
|
React__namespace.useEffect(() => {
|
|
141224
141224
|
callbackRef.current = callback;
|
|
@@ -141236,7 +141236,7 @@ function useControllableState({
|
|
|
141236
141236
|
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
|
|
141237
141237
|
const isControlled = prop !== void 0;
|
|
141238
141238
|
const value = isControlled ? prop : uncontrolledProp;
|
|
141239
|
-
const handleChange = useCallbackRef(onChange);
|
|
141239
|
+
const handleChange = useCallbackRef$1(onChange);
|
|
141240
141240
|
const setValue = React__namespace.useCallback(
|
|
141241
141241
|
(nextValue) => {
|
|
141242
141242
|
if (isControlled) {
|
|
@@ -141258,7 +141258,7 @@ function useUncontrolledState({
|
|
|
141258
141258
|
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
141259
141259
|
const [value] = uncontrolledState;
|
|
141260
141260
|
const prevValueRef = React__namespace.useRef(value);
|
|
141261
|
-
const handleChange = useCallbackRef(onChange);
|
|
141261
|
+
const handleChange = useCallbackRef$1(onChange);
|
|
141262
141262
|
React__namespace.useEffect(() => {
|
|
141263
141263
|
if (prevValueRef.current !== value) {
|
|
141264
141264
|
handleChange(value);
|
|
@@ -141269,9 +141269,9 @@ function useUncontrolledState({
|
|
|
141269
141269
|
}
|
|
141270
141270
|
|
|
141271
141271
|
// packages/react/direction/src/Direction.tsx
|
|
141272
|
-
var DirectionContext = React__namespace.createContext(void 0);
|
|
141273
|
-
function useDirection(localDir) {
|
|
141274
|
-
const globalDir = React__namespace.useContext(DirectionContext);
|
|
141272
|
+
var DirectionContext$1 = React__namespace.createContext(void 0);
|
|
141273
|
+
function useDirection$1(localDir) {
|
|
141274
|
+
const globalDir = React__namespace.useContext(DirectionContext$1);
|
|
141275
141275
|
return localDir || globalDir || "ltr";
|
|
141276
141276
|
}
|
|
141277
141277
|
|
|
@@ -141279,7 +141279,7 @@ var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
|
141279
141279
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
141280
141280
|
var GROUP_NAME = "RovingFocusGroup";
|
|
141281
141281
|
var [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);
|
|
141282
|
-
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
|
|
141282
|
+
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope$1(
|
|
141283
141283
|
GROUP_NAME,
|
|
141284
141284
|
[createCollectionScope]
|
|
141285
141285
|
);
|
|
@@ -141304,15 +141304,15 @@ var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) =>
|
|
|
141304
141304
|
...groupProps
|
|
141305
141305
|
} = props;
|
|
141306
141306
|
const ref = React__namespace.useRef(null);
|
|
141307
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
141308
|
-
const direction = useDirection(dir);
|
|
141307
|
+
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
141308
|
+
const direction = useDirection$1(dir);
|
|
141309
141309
|
const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({
|
|
141310
141310
|
prop: currentTabStopIdProp,
|
|
141311
141311
|
defaultProp: defaultCurrentTabStopId,
|
|
141312
141312
|
onChange: onCurrentTabStopIdChange
|
|
141313
141313
|
});
|
|
141314
141314
|
const [isTabbingBackOut, setIsTabbingBackOut] = React__namespace.useState(false);
|
|
141315
|
-
const handleEntryFocus = useCallbackRef(onEntryFocus);
|
|
141315
|
+
const handleEntryFocus = useCallbackRef$1(onEntryFocus);
|
|
141316
141316
|
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
141317
141317
|
const isClickFocusRef = React__namespace.useRef(false);
|
|
141318
141318
|
const [focusableItemsCount, setFocusableItemsCount] = React__namespace.useState(0);
|
|
@@ -141345,17 +141345,17 @@ var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) =>
|
|
|
141345
141345
|
[]
|
|
141346
141346
|
),
|
|
141347
141347
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141348
|
-
Primitive.div,
|
|
141348
|
+
Primitive$1.div,
|
|
141349
141349
|
{
|
|
141350
141350
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
141351
141351
|
"data-orientation": orientation,
|
|
141352
141352
|
...groupProps,
|
|
141353
141353
|
ref: composedRefs,
|
|
141354
141354
|
style: { outline: "none", ...props.style },
|
|
141355
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
|
|
141355
|
+
onMouseDown: composeEventHandlers$1(props.onMouseDown, () => {
|
|
141356
141356
|
isClickFocusRef.current = true;
|
|
141357
141357
|
}),
|
|
141358
|
-
onFocus: composeEventHandlers(props.onFocus, (event) => {
|
|
141358
|
+
onFocus: composeEventHandlers$1(props.onFocus, (event) => {
|
|
141359
141359
|
const isKeyboardFocus = !isClickFocusRef.current;
|
|
141360
141360
|
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
141361
141361
|
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
|
|
@@ -141373,7 +141373,7 @@ var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) =>
|
|
|
141373
141373
|
}
|
|
141374
141374
|
isClickFocusRef.current = false;
|
|
141375
141375
|
}),
|
|
141376
|
-
onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
|
|
141376
|
+
onBlur: composeEventHandlers$1(props.onBlur, () => setIsTabbingBackOut(false))
|
|
141377
141377
|
}
|
|
141378
141378
|
)
|
|
141379
141379
|
}
|
|
@@ -141409,18 +141409,18 @@ var RovingFocusGroupItem = React__namespace.forwardRef(
|
|
|
141409
141409
|
focusable,
|
|
141410
141410
|
active,
|
|
141411
141411
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141412
|
-
Primitive.span,
|
|
141412
|
+
Primitive$1.span,
|
|
141413
141413
|
{
|
|
141414
141414
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
141415
141415
|
"data-orientation": context.orientation,
|
|
141416
141416
|
...itemProps,
|
|
141417
141417
|
ref: forwardedRef,
|
|
141418
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
141418
|
+
onMouseDown: composeEventHandlers$1(props.onMouseDown, (event) => {
|
|
141419
141419
|
if (!focusable) event.preventDefault();
|
|
141420
141420
|
else context.onItemFocus(id);
|
|
141421
141421
|
}),
|
|
141422
|
-
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
|
|
141423
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
141422
|
+
onFocus: composeEventHandlers$1(props.onFocus, () => context.onItemFocus(id)),
|
|
141423
|
+
onKeyDown: composeEventHandlers$1(props.onKeyDown, (event) => {
|
|
141424
141424
|
if (event.key === "Tab" && event.shiftKey) {
|
|
141425
141425
|
context.onItemShiftTab();
|
|
141426
141426
|
return;
|
|
@@ -141479,13 +141479,13 @@ function focusFirst(candidates, preventScroll = false) {
|
|
|
141479
141479
|
function wrapArray(array, startIndex) {
|
|
141480
141480
|
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
141481
141481
|
}
|
|
141482
|
-
var Root = RovingFocusGroup;
|
|
141482
|
+
var Root$1 = RovingFocusGroup;
|
|
141483
141483
|
var Item = RovingFocusGroupItem;
|
|
141484
141484
|
|
|
141485
141485
|
// packages/react/use-size/src/useSize.tsx
|
|
141486
141486
|
function useSize(element) {
|
|
141487
141487
|
const [size, setSize] = React__namespace.useState(void 0);
|
|
141488
|
-
useLayoutEffect2(() => {
|
|
141488
|
+
useLayoutEffect2$1(() => {
|
|
141489
141489
|
if (element) {
|
|
141490
141490
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
141491
141491
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -141531,7 +141531,7 @@ function usePrevious(value) {
|
|
|
141531
141531
|
}
|
|
141532
141532
|
|
|
141533
141533
|
var RADIO_NAME = "Radio";
|
|
141534
|
-
var [createRadioContext, createRadioScope] = createContextScope$
|
|
141534
|
+
var [createRadioContext, createRadioScope] = createContextScope$3(RADIO_NAME);
|
|
141535
141535
|
var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);
|
|
141536
141536
|
var Radio = React__namespace.forwardRef(
|
|
141537
141537
|
(props, forwardedRef) => {
|
|
@@ -141547,12 +141547,12 @@ var Radio = React__namespace.forwardRef(
|
|
|
141547
141547
|
...radioProps
|
|
141548
141548
|
} = props;
|
|
141549
141549
|
const [button, setButton] = React__namespace.useState(null);
|
|
141550
|
-
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
|
|
141550
|
+
const composedRefs = useComposedRefs$1(forwardedRef, (node) => setButton(node));
|
|
141551
141551
|
const hasConsumerStoppedPropagationRef = React__namespace.useRef(false);
|
|
141552
141552
|
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
141553
141553
|
return /* @__PURE__ */ jsxRuntime.jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [
|
|
141554
141554
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
141555
|
-
Primitive.button,
|
|
141555
|
+
Primitive$1.button,
|
|
141556
141556
|
{
|
|
141557
141557
|
type: "button",
|
|
141558
141558
|
role: "radio",
|
|
@@ -141563,7 +141563,7 @@ var Radio = React__namespace.forwardRef(
|
|
|
141563
141563
|
value,
|
|
141564
141564
|
...radioProps,
|
|
141565
141565
|
ref: composedRefs,
|
|
141566
|
-
onClick: composeEventHandlers(props.onClick, (event) => {
|
|
141566
|
+
onClick: composeEventHandlers$1(props.onClick, (event) => {
|
|
141567
141567
|
if (!checked) onCheck?.();
|
|
141568
141568
|
if (isFormControl) {
|
|
141569
141569
|
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
@@ -141596,7 +141596,7 @@ var RadioIndicator = React__namespace.forwardRef(
|
|
|
141596
141596
|
const { __scopeRadio, forceMount, ...indicatorProps } = props;
|
|
141597
141597
|
const context = useRadioContext(INDICATOR_NAME, __scopeRadio);
|
|
141598
141598
|
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141599
|
-
Primitive.span,
|
|
141599
|
+
Primitive$1.span,
|
|
141600
141600
|
{
|
|
141601
141601
|
"data-state": getState(context.checked),
|
|
141602
141602
|
"data-disabled": context.disabled ? "" : void 0,
|
|
@@ -141648,7 +141648,7 @@ function getState(checked) {
|
|
|
141648
141648
|
}
|
|
141649
141649
|
var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
|
|
141650
141650
|
var RADIO_GROUP_NAME = "RadioGroup";
|
|
141651
|
-
var [createRadioGroupContext, createRadioGroupScope] = createContextScope$
|
|
141651
|
+
var [createRadioGroupContext, createRadioGroupScope] = createContextScope$3(RADIO_GROUP_NAME, [
|
|
141652
141652
|
createRovingFocusGroupScope,
|
|
141653
141653
|
createRadioScope
|
|
141654
141654
|
]);
|
|
@@ -141671,7 +141671,7 @@ var RadioGroup$1 = React__namespace.forwardRef(
|
|
|
141671
141671
|
...groupProps
|
|
141672
141672
|
} = props;
|
|
141673
141673
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
|
|
141674
|
-
const direction = useDirection(dir);
|
|
141674
|
+
const direction = useDirection$1(dir);
|
|
141675
141675
|
const [value, setValue] = useControllableState({
|
|
141676
141676
|
prop: valueProp,
|
|
141677
141677
|
defaultProp: defaultValue,
|
|
@@ -141687,7 +141687,7 @@ var RadioGroup$1 = React__namespace.forwardRef(
|
|
|
141687
141687
|
value,
|
|
141688
141688
|
onValueChange: setValue,
|
|
141689
141689
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141690
|
-
Root,
|
|
141690
|
+
Root$1,
|
|
141691
141691
|
{
|
|
141692
141692
|
asChild: true,
|
|
141693
141693
|
...rovingFocusGroupScope,
|
|
@@ -141695,7 +141695,7 @@ var RadioGroup$1 = React__namespace.forwardRef(
|
|
|
141695
141695
|
dir: direction,
|
|
141696
141696
|
loop,
|
|
141697
141697
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141698
|
-
Primitive.div,
|
|
141698
|
+
Primitive$1.div,
|
|
141699
141699
|
{
|
|
141700
141700
|
role: "radiogroup",
|
|
141701
141701
|
"aria-required": required,
|
|
@@ -141722,7 +141722,7 @@ var RadioGroupItem$1 = React__namespace.forwardRef(
|
|
|
141722
141722
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
|
|
141723
141723
|
const radioScope = useRadioScope(__scopeRadioGroup);
|
|
141724
141724
|
const ref = React__namespace.useRef(null);
|
|
141725
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
141725
|
+
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
141726
141726
|
const checked = context.value === itemProps.value;
|
|
141727
141727
|
const isArrowKeyPressedRef = React__namespace.useRef(false);
|
|
141728
141728
|
React__namespace.useEffect(() => {
|
|
@@ -141757,10 +141757,10 @@ var RadioGroupItem$1 = React__namespace.forwardRef(
|
|
|
141757
141757
|
name: context.name,
|
|
141758
141758
|
ref: composedRefs,
|
|
141759
141759
|
onCheck: () => context.onValueChange(itemProps.value),
|
|
141760
|
-
onKeyDown: composeEventHandlers((event) => {
|
|
141760
|
+
onKeyDown: composeEventHandlers$1((event) => {
|
|
141761
141761
|
if (event.key === "Enter") event.preventDefault();
|
|
141762
141762
|
}),
|
|
141763
|
-
onFocus: composeEventHandlers(itemProps.onFocus, () => {
|
|
141763
|
+
onFocus: composeEventHandlers$1(itemProps.onFocus, () => {
|
|
141764
141764
|
if (isArrowKeyPressedRef.current) ref.current?.click();
|
|
141765
141765
|
})
|
|
141766
141766
|
}
|
|
@@ -141815,6 +141815,903 @@ var RadioGroupChoice = React__namespace.forwardRef(function (_a, ref) {
|
|
|
141815
141815
|
children));
|
|
141816
141816
|
});
|
|
141817
141817
|
|
|
141818
|
+
// packages/react/primitive/src/Primitive.tsx
|
|
141819
|
+
var NODES = [
|
|
141820
|
+
"a",
|
|
141821
|
+
"button",
|
|
141822
|
+
"div",
|
|
141823
|
+
"form",
|
|
141824
|
+
"h2",
|
|
141825
|
+
"h3",
|
|
141826
|
+
"img",
|
|
141827
|
+
"input",
|
|
141828
|
+
"label",
|
|
141829
|
+
"li",
|
|
141830
|
+
"nav",
|
|
141831
|
+
"ol",
|
|
141832
|
+
"p",
|
|
141833
|
+
"span",
|
|
141834
|
+
"svg",
|
|
141835
|
+
"ul"
|
|
141836
|
+
];
|
|
141837
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
141838
|
+
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
141839
|
+
const { asChild, ...primitiveProps } = props;
|
|
141840
|
+
const Comp = asChild ? Slot : node;
|
|
141841
|
+
if (typeof window !== "undefined") {
|
|
141842
|
+
window[Symbol.for("radix-ui")] = true;
|
|
141843
|
+
}
|
|
141844
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
141845
|
+
});
|
|
141846
|
+
Node.displayName = `Primitive.${node}`;
|
|
141847
|
+
return { ...primitive, [node]: Node };
|
|
141848
|
+
}, {});
|
|
141849
|
+
|
|
141850
|
+
// packages/react/context/src/createContext.tsx
|
|
141851
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
141852
|
+
let defaultContexts = [];
|
|
141853
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
141854
|
+
const BaseContext = React__namespace.createContext(defaultContext);
|
|
141855
|
+
const index = defaultContexts.length;
|
|
141856
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
141857
|
+
const Provider = (props) => {
|
|
141858
|
+
const { scope, children, ...context } = props;
|
|
141859
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
141860
|
+
const value = React__namespace.useMemo(() => context, Object.values(context));
|
|
141861
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
|
|
141862
|
+
};
|
|
141863
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
141864
|
+
function useContext2(consumerName, scope) {
|
|
141865
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
141866
|
+
const context = React__namespace.useContext(Context);
|
|
141867
|
+
if (context) return context;
|
|
141868
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
141869
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
141870
|
+
}
|
|
141871
|
+
return [Provider, useContext2];
|
|
141872
|
+
}
|
|
141873
|
+
const createScope = () => {
|
|
141874
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
141875
|
+
return React__namespace.createContext(defaultContext);
|
|
141876
|
+
});
|
|
141877
|
+
return function useScope(scope) {
|
|
141878
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
141879
|
+
return React__namespace.useMemo(
|
|
141880
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
141881
|
+
[scope, contexts]
|
|
141882
|
+
);
|
|
141883
|
+
};
|
|
141884
|
+
};
|
|
141885
|
+
createScope.scopeName = scopeName;
|
|
141886
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
141887
|
+
}
|
|
141888
|
+
function composeContextScopes(...scopes) {
|
|
141889
|
+
const baseScope = scopes[0];
|
|
141890
|
+
if (scopes.length === 1) return baseScope;
|
|
141891
|
+
const createScope = () => {
|
|
141892
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
141893
|
+
useScope: createScope2(),
|
|
141894
|
+
scopeName: createScope2.scopeName
|
|
141895
|
+
}));
|
|
141896
|
+
return function useComposedScopes(overrideScopes) {
|
|
141897
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
141898
|
+
const scopeProps = useScope(overrideScopes);
|
|
141899
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
141900
|
+
return { ...nextScopes2, ...currentScope };
|
|
141901
|
+
}, {});
|
|
141902
|
+
return React__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
141903
|
+
};
|
|
141904
|
+
};
|
|
141905
|
+
createScope.scopeName = baseScope.scopeName;
|
|
141906
|
+
return createScope;
|
|
141907
|
+
}
|
|
141908
|
+
|
|
141909
|
+
// packages/react/compose-refs/src/composeRefs.tsx
|
|
141910
|
+
function setRef(ref, value) {
|
|
141911
|
+
if (typeof ref === "function") {
|
|
141912
|
+
ref(value);
|
|
141913
|
+
} else if (ref !== null && ref !== void 0) {
|
|
141914
|
+
ref.current = value;
|
|
141915
|
+
}
|
|
141916
|
+
}
|
|
141917
|
+
function composeRefs(...refs) {
|
|
141918
|
+
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
141919
|
+
}
|
|
141920
|
+
function useComposedRefs(...refs) {
|
|
141921
|
+
return React__namespace.useCallback(composeRefs(...refs), refs);
|
|
141922
|
+
}
|
|
141923
|
+
|
|
141924
|
+
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
141925
|
+
function useCallbackRef(callback) {
|
|
141926
|
+
const callbackRef = React__namespace.useRef(callback);
|
|
141927
|
+
React__namespace.useEffect(() => {
|
|
141928
|
+
callbackRef.current = callback;
|
|
141929
|
+
});
|
|
141930
|
+
return React__namespace.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
141931
|
+
}
|
|
141932
|
+
|
|
141933
|
+
// packages/react/direction/src/Direction.tsx
|
|
141934
|
+
var DirectionContext = React__namespace.createContext(void 0);
|
|
141935
|
+
function useDirection(localDir) {
|
|
141936
|
+
const globalDir = React__namespace.useContext(DirectionContext);
|
|
141937
|
+
return localDir || globalDir || "ltr";
|
|
141938
|
+
}
|
|
141939
|
+
|
|
141940
|
+
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
141941
|
+
var useLayoutEffect2 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
141942
|
+
};
|
|
141943
|
+
|
|
141944
|
+
// packages/core/number/src/number.ts
|
|
141945
|
+
function clamp(value, [min, max]) {
|
|
141946
|
+
return Math.min(max, Math.max(min, value));
|
|
141947
|
+
}
|
|
141948
|
+
|
|
141949
|
+
// packages/core/primitive/src/primitive.tsx
|
|
141950
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
141951
|
+
return function handleEvent(event) {
|
|
141952
|
+
originalEventHandler?.(event);
|
|
141953
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
141954
|
+
return ourEventHandler?.(event);
|
|
141955
|
+
}
|
|
141956
|
+
};
|
|
141957
|
+
}
|
|
141958
|
+
|
|
141959
|
+
function useStateMachine(initialState, machine) {
|
|
141960
|
+
return React__namespace.useReducer((state, event) => {
|
|
141961
|
+
const nextState = machine[state][event];
|
|
141962
|
+
return nextState ?? state;
|
|
141963
|
+
}, initialState);
|
|
141964
|
+
}
|
|
141965
|
+
var SCROLL_AREA_NAME = "ScrollArea";
|
|
141966
|
+
var [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);
|
|
141967
|
+
var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
|
|
141968
|
+
var ScrollArea$1 = React__namespace.forwardRef(
|
|
141969
|
+
(props, forwardedRef) => {
|
|
141970
|
+
const {
|
|
141971
|
+
__scopeScrollArea,
|
|
141972
|
+
type = "hover",
|
|
141973
|
+
dir,
|
|
141974
|
+
scrollHideDelay = 600,
|
|
141975
|
+
...scrollAreaProps
|
|
141976
|
+
} = props;
|
|
141977
|
+
const [scrollArea, setScrollArea] = React__namespace.useState(null);
|
|
141978
|
+
const [viewport, setViewport] = React__namespace.useState(null);
|
|
141979
|
+
const [content, setContent] = React__namespace.useState(null);
|
|
141980
|
+
const [scrollbarX, setScrollbarX] = React__namespace.useState(null);
|
|
141981
|
+
const [scrollbarY, setScrollbarY] = React__namespace.useState(null);
|
|
141982
|
+
const [cornerWidth, setCornerWidth] = React__namespace.useState(0);
|
|
141983
|
+
const [cornerHeight, setCornerHeight] = React__namespace.useState(0);
|
|
141984
|
+
const [scrollbarXEnabled, setScrollbarXEnabled] = React__namespace.useState(false);
|
|
141985
|
+
const [scrollbarYEnabled, setScrollbarYEnabled] = React__namespace.useState(false);
|
|
141986
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));
|
|
141987
|
+
const direction = useDirection(dir);
|
|
141988
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
141989
|
+
ScrollAreaProvider,
|
|
141990
|
+
{
|
|
141991
|
+
scope: __scopeScrollArea,
|
|
141992
|
+
type,
|
|
141993
|
+
dir: direction,
|
|
141994
|
+
scrollHideDelay,
|
|
141995
|
+
scrollArea,
|
|
141996
|
+
viewport,
|
|
141997
|
+
onViewportChange: setViewport,
|
|
141998
|
+
content,
|
|
141999
|
+
onContentChange: setContent,
|
|
142000
|
+
scrollbarX,
|
|
142001
|
+
onScrollbarXChange: setScrollbarX,
|
|
142002
|
+
scrollbarXEnabled,
|
|
142003
|
+
onScrollbarXEnabledChange: setScrollbarXEnabled,
|
|
142004
|
+
scrollbarY,
|
|
142005
|
+
onScrollbarYChange: setScrollbarY,
|
|
142006
|
+
scrollbarYEnabled,
|
|
142007
|
+
onScrollbarYEnabledChange: setScrollbarYEnabled,
|
|
142008
|
+
onCornerWidthChange: setCornerWidth,
|
|
142009
|
+
onCornerHeightChange: setCornerHeight,
|
|
142010
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
142011
|
+
Primitive.div,
|
|
142012
|
+
{
|
|
142013
|
+
dir: direction,
|
|
142014
|
+
...scrollAreaProps,
|
|
142015
|
+
ref: composedRefs,
|
|
142016
|
+
style: {
|
|
142017
|
+
position: "relative",
|
|
142018
|
+
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
142019
|
+
["--radix-scroll-area-corner-width"]: cornerWidth + "px",
|
|
142020
|
+
["--radix-scroll-area-corner-height"]: cornerHeight + "px",
|
|
142021
|
+
...props.style
|
|
142022
|
+
}
|
|
142023
|
+
}
|
|
142024
|
+
)
|
|
142025
|
+
}
|
|
142026
|
+
);
|
|
142027
|
+
}
|
|
142028
|
+
);
|
|
142029
|
+
ScrollArea$1.displayName = SCROLL_AREA_NAME;
|
|
142030
|
+
var VIEWPORT_NAME = "ScrollAreaViewport";
|
|
142031
|
+
var ScrollAreaViewport = React__namespace.forwardRef(
|
|
142032
|
+
(props, forwardedRef) => {
|
|
142033
|
+
const { __scopeScrollArea, children, asChild, nonce, ...viewportProps } = props;
|
|
142034
|
+
const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);
|
|
142035
|
+
const ref = React__namespace.useRef(null);
|
|
142036
|
+
const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
|
|
142037
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
142038
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
142039
|
+
"style",
|
|
142040
|
+
{
|
|
142041
|
+
dangerouslySetInnerHTML: {
|
|
142042
|
+
__html: `
|
|
142043
|
+
[data-radix-scroll-area-viewport] {
|
|
142044
|
+
scrollbar-width: none;
|
|
142045
|
+
-ms-overflow-style: none;
|
|
142046
|
+
-webkit-overflow-scrolling: touch;
|
|
142047
|
+
}
|
|
142048
|
+
[data-radix-scroll-area-viewport]::-webkit-scrollbar {
|
|
142049
|
+
display: none;
|
|
142050
|
+
}
|
|
142051
|
+
:where([data-radix-scroll-area-viewport]) {
|
|
142052
|
+
display: flex;
|
|
142053
|
+
flex-direction: column;
|
|
142054
|
+
align-items: stretch;
|
|
142055
|
+
}
|
|
142056
|
+
:where([data-radix-scroll-area-content]) {
|
|
142057
|
+
flex-grow: 1;
|
|
142058
|
+
}
|
|
142059
|
+
`
|
|
142060
|
+
},
|
|
142061
|
+
nonce
|
|
142062
|
+
}
|
|
142063
|
+
),
|
|
142064
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
142065
|
+
Primitive.div,
|
|
142066
|
+
{
|
|
142067
|
+
"data-radix-scroll-area-viewport": "",
|
|
142068
|
+
...viewportProps,
|
|
142069
|
+
asChild,
|
|
142070
|
+
ref: composedRefs,
|
|
142071
|
+
style: {
|
|
142072
|
+
/**
|
|
142073
|
+
* We don't support `visible` because the intention is to have at least one scrollbar
|
|
142074
|
+
* if this component is used and `visible` will behave like `auto` in that case
|
|
142075
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description
|
|
142076
|
+
*
|
|
142077
|
+
* We don't handle `auto` because the intention is for the native implementation
|
|
142078
|
+
* to be hidden if using this component. We just want to ensure the node is scrollable
|
|
142079
|
+
* so could have used either `scroll` or `auto` here. We picked `scroll` to prevent
|
|
142080
|
+
* the browser from having to work out whether to render native scrollbars or not,
|
|
142081
|
+
* we tell it to with the intention of hiding them in CSS.
|
|
142082
|
+
*/
|
|
142083
|
+
overflowX: context.scrollbarXEnabled ? "scroll" : "hidden",
|
|
142084
|
+
overflowY: context.scrollbarYEnabled ? "scroll" : "hidden",
|
|
142085
|
+
...props.style
|
|
142086
|
+
},
|
|
142087
|
+
children: getSubtree({ asChild, children }, (children2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
142088
|
+
"div",
|
|
142089
|
+
{
|
|
142090
|
+
"data-radix-scroll-area-content": "",
|
|
142091
|
+
ref: context.onContentChange,
|
|
142092
|
+
style: { minWidth: context.scrollbarXEnabled ? "fit-content" : void 0 },
|
|
142093
|
+
children: children2
|
|
142094
|
+
}
|
|
142095
|
+
))
|
|
142096
|
+
}
|
|
142097
|
+
)
|
|
142098
|
+
] });
|
|
142099
|
+
}
|
|
142100
|
+
);
|
|
142101
|
+
ScrollAreaViewport.displayName = VIEWPORT_NAME;
|
|
142102
|
+
var SCROLLBAR_NAME = "ScrollAreaScrollbar";
|
|
142103
|
+
var ScrollAreaScrollbar = React__namespace.forwardRef(
|
|
142104
|
+
(props, forwardedRef) => {
|
|
142105
|
+
const { forceMount, ...scrollbarProps } = props;
|
|
142106
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
142107
|
+
const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;
|
|
142108
|
+
const isHorizontal = props.orientation === "horizontal";
|
|
142109
|
+
React__namespace.useEffect(() => {
|
|
142110
|
+
isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);
|
|
142111
|
+
return () => {
|
|
142112
|
+
isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);
|
|
142113
|
+
};
|
|
142114
|
+
}, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);
|
|
142115
|
+
return context.type === "hover" ? /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "scroll" ? /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "auto" ? /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "always" ? /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null;
|
|
142116
|
+
}
|
|
142117
|
+
);
|
|
142118
|
+
ScrollAreaScrollbar.displayName = SCROLLBAR_NAME;
|
|
142119
|
+
var ScrollAreaScrollbarHover = React__namespace.forwardRef((props, forwardedRef) => {
|
|
142120
|
+
const { forceMount, ...scrollbarProps } = props;
|
|
142121
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
142122
|
+
const [visible, setVisible] = React__namespace.useState(false);
|
|
142123
|
+
React__namespace.useEffect(() => {
|
|
142124
|
+
const scrollArea = context.scrollArea;
|
|
142125
|
+
let hideTimer = 0;
|
|
142126
|
+
if (scrollArea) {
|
|
142127
|
+
const handlePointerEnter = () => {
|
|
142128
|
+
window.clearTimeout(hideTimer);
|
|
142129
|
+
setVisible(true);
|
|
142130
|
+
};
|
|
142131
|
+
const handlePointerLeave = () => {
|
|
142132
|
+
hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);
|
|
142133
|
+
};
|
|
142134
|
+
scrollArea.addEventListener("pointerenter", handlePointerEnter);
|
|
142135
|
+
scrollArea.addEventListener("pointerleave", handlePointerLeave);
|
|
142136
|
+
return () => {
|
|
142137
|
+
window.clearTimeout(hideTimer);
|
|
142138
|
+
scrollArea.removeEventListener("pointerenter", handlePointerEnter);
|
|
142139
|
+
scrollArea.removeEventListener("pointerleave", handlePointerLeave);
|
|
142140
|
+
};
|
|
142141
|
+
}
|
|
142142
|
+
}, [context.scrollArea, context.scrollHideDelay]);
|
|
142143
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
142144
|
+
ScrollAreaScrollbarAuto,
|
|
142145
|
+
{
|
|
142146
|
+
"data-state": visible ? "visible" : "hidden",
|
|
142147
|
+
...scrollbarProps,
|
|
142148
|
+
ref: forwardedRef
|
|
142149
|
+
}
|
|
142150
|
+
) });
|
|
142151
|
+
});
|
|
142152
|
+
var ScrollAreaScrollbarScroll = React__namespace.forwardRef((props, forwardedRef) => {
|
|
142153
|
+
const { forceMount, ...scrollbarProps } = props;
|
|
142154
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
142155
|
+
const isHorizontal = props.orientation === "horizontal";
|
|
142156
|
+
const debounceScrollEnd = useDebounceCallback(() => send("SCROLL_END"), 100);
|
|
142157
|
+
const [state, send] = useStateMachine("hidden", {
|
|
142158
|
+
hidden: {
|
|
142159
|
+
SCROLL: "scrolling"
|
|
142160
|
+
},
|
|
142161
|
+
scrolling: {
|
|
142162
|
+
SCROLL_END: "idle",
|
|
142163
|
+
POINTER_ENTER: "interacting"
|
|
142164
|
+
},
|
|
142165
|
+
interacting: {
|
|
142166
|
+
SCROLL: "interacting",
|
|
142167
|
+
POINTER_LEAVE: "idle"
|
|
142168
|
+
},
|
|
142169
|
+
idle: {
|
|
142170
|
+
HIDE: "hidden",
|
|
142171
|
+
SCROLL: "scrolling",
|
|
142172
|
+
POINTER_ENTER: "interacting"
|
|
142173
|
+
}
|
|
142174
|
+
});
|
|
142175
|
+
React__namespace.useEffect(() => {
|
|
142176
|
+
if (state === "idle") {
|
|
142177
|
+
const hideTimer = window.setTimeout(() => send("HIDE"), context.scrollHideDelay);
|
|
142178
|
+
return () => window.clearTimeout(hideTimer);
|
|
142179
|
+
}
|
|
142180
|
+
}, [state, context.scrollHideDelay, send]);
|
|
142181
|
+
React__namespace.useEffect(() => {
|
|
142182
|
+
const viewport = context.viewport;
|
|
142183
|
+
const scrollDirection = isHorizontal ? "scrollLeft" : "scrollTop";
|
|
142184
|
+
if (viewport) {
|
|
142185
|
+
let prevScrollPos = viewport[scrollDirection];
|
|
142186
|
+
const handleScroll = () => {
|
|
142187
|
+
const scrollPos = viewport[scrollDirection];
|
|
142188
|
+
const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;
|
|
142189
|
+
if (hasScrollInDirectionChanged) {
|
|
142190
|
+
send("SCROLL");
|
|
142191
|
+
debounceScrollEnd();
|
|
142192
|
+
}
|
|
142193
|
+
prevScrollPos = scrollPos;
|
|
142194
|
+
};
|
|
142195
|
+
viewport.addEventListener("scroll", handleScroll);
|
|
142196
|
+
return () => viewport.removeEventListener("scroll", handleScroll);
|
|
142197
|
+
}
|
|
142198
|
+
}, [context.viewport, isHorizontal, send, debounceScrollEnd]);
|
|
142199
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || state !== "hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
142200
|
+
ScrollAreaScrollbarVisible,
|
|
142201
|
+
{
|
|
142202
|
+
"data-state": state === "hidden" ? "hidden" : "visible",
|
|
142203
|
+
...scrollbarProps,
|
|
142204
|
+
ref: forwardedRef,
|
|
142205
|
+
onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send("POINTER_ENTER")),
|
|
142206
|
+
onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send("POINTER_LEAVE"))
|
|
142207
|
+
}
|
|
142208
|
+
) });
|
|
142209
|
+
});
|
|
142210
|
+
var ScrollAreaScrollbarAuto = React__namespace.forwardRef((props, forwardedRef) => {
|
|
142211
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
142212
|
+
const { forceMount, ...scrollbarProps } = props;
|
|
142213
|
+
const [visible, setVisible] = React__namespace.useState(false);
|
|
142214
|
+
const isHorizontal = props.orientation === "horizontal";
|
|
142215
|
+
const handleResize = useDebounceCallback(() => {
|
|
142216
|
+
if (context.viewport) {
|
|
142217
|
+
const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;
|
|
142218
|
+
const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;
|
|
142219
|
+
setVisible(isHorizontal ? isOverflowX : isOverflowY);
|
|
142220
|
+
}
|
|
142221
|
+
}, 10);
|
|
142222
|
+
useResizeObserver(context.viewport, handleResize);
|
|
142223
|
+
useResizeObserver(context.content, handleResize);
|
|
142224
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
142225
|
+
ScrollAreaScrollbarVisible,
|
|
142226
|
+
{
|
|
142227
|
+
"data-state": visible ? "visible" : "hidden",
|
|
142228
|
+
...scrollbarProps,
|
|
142229
|
+
ref: forwardedRef
|
|
142230
|
+
}
|
|
142231
|
+
) });
|
|
142232
|
+
});
|
|
142233
|
+
var ScrollAreaScrollbarVisible = React__namespace.forwardRef((props, forwardedRef) => {
|
|
142234
|
+
const { orientation = "vertical", ...scrollbarProps } = props;
|
|
142235
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
142236
|
+
const thumbRef = React__namespace.useRef(null);
|
|
142237
|
+
const pointerOffsetRef = React__namespace.useRef(0);
|
|
142238
|
+
const [sizes, setSizes] = React__namespace.useState({
|
|
142239
|
+
content: 0,
|
|
142240
|
+
viewport: 0,
|
|
142241
|
+
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
142242
|
+
});
|
|
142243
|
+
const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);
|
|
142244
|
+
const commonProps = {
|
|
142245
|
+
...scrollbarProps,
|
|
142246
|
+
sizes,
|
|
142247
|
+
onSizesChange: setSizes,
|
|
142248
|
+
hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),
|
|
142249
|
+
onThumbChange: (thumb) => thumbRef.current = thumb,
|
|
142250
|
+
onThumbPointerUp: () => pointerOffsetRef.current = 0,
|
|
142251
|
+
onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos
|
|
142252
|
+
};
|
|
142253
|
+
function getScrollPosition(pointerPos, dir) {
|
|
142254
|
+
return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);
|
|
142255
|
+
}
|
|
142256
|
+
if (orientation === "horizontal") {
|
|
142257
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
142258
|
+
ScrollAreaScrollbarX,
|
|
142259
|
+
{
|
|
142260
|
+
...commonProps,
|
|
142261
|
+
ref: forwardedRef,
|
|
142262
|
+
onThumbPositionChange: () => {
|
|
142263
|
+
if (context.viewport && thumbRef.current) {
|
|
142264
|
+
const scrollPos = context.viewport.scrollLeft;
|
|
142265
|
+
const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);
|
|
142266
|
+
thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;
|
|
142267
|
+
}
|
|
142268
|
+
},
|
|
142269
|
+
onWheelScroll: (scrollPos) => {
|
|
142270
|
+
if (context.viewport) context.viewport.scrollLeft = scrollPos;
|
|
142271
|
+
},
|
|
142272
|
+
onDragScroll: (pointerPos) => {
|
|
142273
|
+
if (context.viewport) {
|
|
142274
|
+
context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);
|
|
142275
|
+
}
|
|
142276
|
+
}
|
|
142277
|
+
}
|
|
142278
|
+
);
|
|
142279
|
+
}
|
|
142280
|
+
if (orientation === "vertical") {
|
|
142281
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
142282
|
+
ScrollAreaScrollbarY,
|
|
142283
|
+
{
|
|
142284
|
+
...commonProps,
|
|
142285
|
+
ref: forwardedRef,
|
|
142286
|
+
onThumbPositionChange: () => {
|
|
142287
|
+
if (context.viewport && thumbRef.current) {
|
|
142288
|
+
const scrollPos = context.viewport.scrollTop;
|
|
142289
|
+
const offset = getThumbOffsetFromScroll(scrollPos, sizes);
|
|
142290
|
+
thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;
|
|
142291
|
+
}
|
|
142292
|
+
},
|
|
142293
|
+
onWheelScroll: (scrollPos) => {
|
|
142294
|
+
if (context.viewport) context.viewport.scrollTop = scrollPos;
|
|
142295
|
+
},
|
|
142296
|
+
onDragScroll: (pointerPos) => {
|
|
142297
|
+
if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);
|
|
142298
|
+
}
|
|
142299
|
+
}
|
|
142300
|
+
);
|
|
142301
|
+
}
|
|
142302
|
+
return null;
|
|
142303
|
+
});
|
|
142304
|
+
var ScrollAreaScrollbarX = React__namespace.forwardRef((props, forwardedRef) => {
|
|
142305
|
+
const { sizes, onSizesChange, ...scrollbarProps } = props;
|
|
142306
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
142307
|
+
const [computedStyle, setComputedStyle] = React__namespace.useState();
|
|
142308
|
+
const ref = React__namespace.useRef(null);
|
|
142309
|
+
const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);
|
|
142310
|
+
React__namespace.useEffect(() => {
|
|
142311
|
+
if (ref.current) setComputedStyle(getComputedStyle(ref.current));
|
|
142312
|
+
}, [ref]);
|
|
142313
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
142314
|
+
ScrollAreaScrollbarImpl,
|
|
142315
|
+
{
|
|
142316
|
+
"data-orientation": "horizontal",
|
|
142317
|
+
...scrollbarProps,
|
|
142318
|
+
ref: composeRefs,
|
|
142319
|
+
sizes,
|
|
142320
|
+
style: {
|
|
142321
|
+
bottom: 0,
|
|
142322
|
+
left: context.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
142323
|
+
right: context.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
142324
|
+
["--radix-scroll-area-thumb-width"]: getThumbSize(sizes) + "px",
|
|
142325
|
+
...props.style
|
|
142326
|
+
},
|
|
142327
|
+
onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x),
|
|
142328
|
+
onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x),
|
|
142329
|
+
onWheelScroll: (event, maxScrollPos) => {
|
|
142330
|
+
if (context.viewport) {
|
|
142331
|
+
const scrollPos = context.viewport.scrollLeft + event.deltaX;
|
|
142332
|
+
props.onWheelScroll(scrollPos);
|
|
142333
|
+
if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {
|
|
142334
|
+
event.preventDefault();
|
|
142335
|
+
}
|
|
142336
|
+
}
|
|
142337
|
+
},
|
|
142338
|
+
onResize: () => {
|
|
142339
|
+
if (ref.current && context.viewport && computedStyle) {
|
|
142340
|
+
onSizesChange({
|
|
142341
|
+
content: context.viewport.scrollWidth,
|
|
142342
|
+
viewport: context.viewport.offsetWidth,
|
|
142343
|
+
scrollbar: {
|
|
142344
|
+
size: ref.current.clientWidth,
|
|
142345
|
+
paddingStart: toInt(computedStyle.paddingLeft),
|
|
142346
|
+
paddingEnd: toInt(computedStyle.paddingRight)
|
|
142347
|
+
}
|
|
142348
|
+
});
|
|
142349
|
+
}
|
|
142350
|
+
}
|
|
142351
|
+
}
|
|
142352
|
+
);
|
|
142353
|
+
});
|
|
142354
|
+
var ScrollAreaScrollbarY = React__namespace.forwardRef((props, forwardedRef) => {
|
|
142355
|
+
const { sizes, onSizesChange, ...scrollbarProps } = props;
|
|
142356
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
142357
|
+
const [computedStyle, setComputedStyle] = React__namespace.useState();
|
|
142358
|
+
const ref = React__namespace.useRef(null);
|
|
142359
|
+
const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);
|
|
142360
|
+
React__namespace.useEffect(() => {
|
|
142361
|
+
if (ref.current) setComputedStyle(getComputedStyle(ref.current));
|
|
142362
|
+
}, [ref]);
|
|
142363
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
142364
|
+
ScrollAreaScrollbarImpl,
|
|
142365
|
+
{
|
|
142366
|
+
"data-orientation": "vertical",
|
|
142367
|
+
...scrollbarProps,
|
|
142368
|
+
ref: composeRefs,
|
|
142369
|
+
sizes,
|
|
142370
|
+
style: {
|
|
142371
|
+
top: 0,
|
|
142372
|
+
right: context.dir === "ltr" ? 0 : void 0,
|
|
142373
|
+
left: context.dir === "rtl" ? 0 : void 0,
|
|
142374
|
+
bottom: "var(--radix-scroll-area-corner-height)",
|
|
142375
|
+
["--radix-scroll-area-thumb-height"]: getThumbSize(sizes) + "px",
|
|
142376
|
+
...props.style
|
|
142377
|
+
},
|
|
142378
|
+
onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y),
|
|
142379
|
+
onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y),
|
|
142380
|
+
onWheelScroll: (event, maxScrollPos) => {
|
|
142381
|
+
if (context.viewport) {
|
|
142382
|
+
const scrollPos = context.viewport.scrollTop + event.deltaY;
|
|
142383
|
+
props.onWheelScroll(scrollPos);
|
|
142384
|
+
if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {
|
|
142385
|
+
event.preventDefault();
|
|
142386
|
+
}
|
|
142387
|
+
}
|
|
142388
|
+
},
|
|
142389
|
+
onResize: () => {
|
|
142390
|
+
if (ref.current && context.viewport && computedStyle) {
|
|
142391
|
+
onSizesChange({
|
|
142392
|
+
content: context.viewport.scrollHeight,
|
|
142393
|
+
viewport: context.viewport.offsetHeight,
|
|
142394
|
+
scrollbar: {
|
|
142395
|
+
size: ref.current.clientHeight,
|
|
142396
|
+
paddingStart: toInt(computedStyle.paddingTop),
|
|
142397
|
+
paddingEnd: toInt(computedStyle.paddingBottom)
|
|
142398
|
+
}
|
|
142399
|
+
});
|
|
142400
|
+
}
|
|
142401
|
+
}
|
|
142402
|
+
}
|
|
142403
|
+
);
|
|
142404
|
+
});
|
|
142405
|
+
var [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME);
|
|
142406
|
+
var ScrollAreaScrollbarImpl = React__namespace.forwardRef((props, forwardedRef) => {
|
|
142407
|
+
const {
|
|
142408
|
+
__scopeScrollArea,
|
|
142409
|
+
sizes,
|
|
142410
|
+
hasThumb,
|
|
142411
|
+
onThumbChange,
|
|
142412
|
+
onThumbPointerUp,
|
|
142413
|
+
onThumbPointerDown,
|
|
142414
|
+
onThumbPositionChange,
|
|
142415
|
+
onDragScroll,
|
|
142416
|
+
onWheelScroll,
|
|
142417
|
+
onResize,
|
|
142418
|
+
...scrollbarProps
|
|
142419
|
+
} = props;
|
|
142420
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);
|
|
142421
|
+
const [scrollbar, setScrollbar] = React__namespace.useState(null);
|
|
142422
|
+
const composeRefs = useComposedRefs(forwardedRef, (node) => setScrollbar(node));
|
|
142423
|
+
const rectRef = React__namespace.useRef(null);
|
|
142424
|
+
const prevWebkitUserSelectRef = React__namespace.useRef("");
|
|
142425
|
+
const viewport = context.viewport;
|
|
142426
|
+
const maxScrollPos = sizes.content - sizes.viewport;
|
|
142427
|
+
const handleWheelScroll = useCallbackRef(onWheelScroll);
|
|
142428
|
+
const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);
|
|
142429
|
+
const handleResize = useDebounceCallback(onResize, 10);
|
|
142430
|
+
function handleDragScroll(event) {
|
|
142431
|
+
if (rectRef.current) {
|
|
142432
|
+
const x = event.clientX - rectRef.current.left;
|
|
142433
|
+
const y = event.clientY - rectRef.current.top;
|
|
142434
|
+
onDragScroll({ x, y });
|
|
142435
|
+
}
|
|
142436
|
+
}
|
|
142437
|
+
React__namespace.useEffect(() => {
|
|
142438
|
+
const handleWheel = (event) => {
|
|
142439
|
+
const element = event.target;
|
|
142440
|
+
const isScrollbarWheel = scrollbar?.contains(element);
|
|
142441
|
+
if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);
|
|
142442
|
+
};
|
|
142443
|
+
document.addEventListener("wheel", handleWheel, { passive: false });
|
|
142444
|
+
return () => document.removeEventListener("wheel", handleWheel, { passive: false });
|
|
142445
|
+
}, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);
|
|
142446
|
+
React__namespace.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);
|
|
142447
|
+
useResizeObserver(scrollbar, handleResize);
|
|
142448
|
+
useResizeObserver(context.content, handleResize);
|
|
142449
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
142450
|
+
ScrollbarProvider,
|
|
142451
|
+
{
|
|
142452
|
+
scope: __scopeScrollArea,
|
|
142453
|
+
scrollbar,
|
|
142454
|
+
hasThumb,
|
|
142455
|
+
onThumbChange: useCallbackRef(onThumbChange),
|
|
142456
|
+
onThumbPointerUp: useCallbackRef(onThumbPointerUp),
|
|
142457
|
+
onThumbPositionChange: handleThumbPositionChange,
|
|
142458
|
+
onThumbPointerDown: useCallbackRef(onThumbPointerDown),
|
|
142459
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
142460
|
+
Primitive.div,
|
|
142461
|
+
{
|
|
142462
|
+
...scrollbarProps,
|
|
142463
|
+
ref: composeRefs,
|
|
142464
|
+
style: { position: "absolute", ...scrollbarProps.style },
|
|
142465
|
+
onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
|
|
142466
|
+
const mainPointer = 0;
|
|
142467
|
+
if (event.button === mainPointer) {
|
|
142468
|
+
const element = event.target;
|
|
142469
|
+
element.setPointerCapture(event.pointerId);
|
|
142470
|
+
rectRef.current = scrollbar.getBoundingClientRect();
|
|
142471
|
+
prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;
|
|
142472
|
+
document.body.style.webkitUserSelect = "none";
|
|
142473
|
+
if (context.viewport) context.viewport.style.scrollBehavior = "auto";
|
|
142474
|
+
handleDragScroll(event);
|
|
142475
|
+
}
|
|
142476
|
+
}),
|
|
142477
|
+
onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll),
|
|
142478
|
+
onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
|
|
142479
|
+
const element = event.target;
|
|
142480
|
+
if (element.hasPointerCapture(event.pointerId)) {
|
|
142481
|
+
element.releasePointerCapture(event.pointerId);
|
|
142482
|
+
}
|
|
142483
|
+
document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;
|
|
142484
|
+
if (context.viewport) context.viewport.style.scrollBehavior = "";
|
|
142485
|
+
rectRef.current = null;
|
|
142486
|
+
})
|
|
142487
|
+
}
|
|
142488
|
+
)
|
|
142489
|
+
}
|
|
142490
|
+
);
|
|
142491
|
+
});
|
|
142492
|
+
var THUMB_NAME = "ScrollAreaThumb";
|
|
142493
|
+
var ScrollAreaThumb = React__namespace.forwardRef(
|
|
142494
|
+
(props, forwardedRef) => {
|
|
142495
|
+
const { forceMount, ...thumbProps } = props;
|
|
142496
|
+
const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);
|
|
142497
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });
|
|
142498
|
+
}
|
|
142499
|
+
);
|
|
142500
|
+
var ScrollAreaThumbImpl = React__namespace.forwardRef(
|
|
142501
|
+
(props, forwardedRef) => {
|
|
142502
|
+
const { __scopeScrollArea, style, ...thumbProps } = props;
|
|
142503
|
+
const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);
|
|
142504
|
+
const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);
|
|
142505
|
+
const { onThumbPositionChange } = scrollbarContext;
|
|
142506
|
+
const composedRef = useComposedRefs(
|
|
142507
|
+
forwardedRef,
|
|
142508
|
+
(node) => scrollbarContext.onThumbChange(node)
|
|
142509
|
+
);
|
|
142510
|
+
const removeUnlinkedScrollListenerRef = React__namespace.useRef();
|
|
142511
|
+
const debounceScrollEnd = useDebounceCallback(() => {
|
|
142512
|
+
if (removeUnlinkedScrollListenerRef.current) {
|
|
142513
|
+
removeUnlinkedScrollListenerRef.current();
|
|
142514
|
+
removeUnlinkedScrollListenerRef.current = void 0;
|
|
142515
|
+
}
|
|
142516
|
+
}, 100);
|
|
142517
|
+
React__namespace.useEffect(() => {
|
|
142518
|
+
const viewport = scrollAreaContext.viewport;
|
|
142519
|
+
if (viewport) {
|
|
142520
|
+
const handleScroll = () => {
|
|
142521
|
+
debounceScrollEnd();
|
|
142522
|
+
if (!removeUnlinkedScrollListenerRef.current) {
|
|
142523
|
+
const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);
|
|
142524
|
+
removeUnlinkedScrollListenerRef.current = listener;
|
|
142525
|
+
onThumbPositionChange();
|
|
142526
|
+
}
|
|
142527
|
+
};
|
|
142528
|
+
onThumbPositionChange();
|
|
142529
|
+
viewport.addEventListener("scroll", handleScroll);
|
|
142530
|
+
return () => viewport.removeEventListener("scroll", handleScroll);
|
|
142531
|
+
}
|
|
142532
|
+
}, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);
|
|
142533
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
142534
|
+
Primitive.div,
|
|
142535
|
+
{
|
|
142536
|
+
"data-state": scrollbarContext.hasThumb ? "visible" : "hidden",
|
|
142537
|
+
...thumbProps,
|
|
142538
|
+
ref: composedRef,
|
|
142539
|
+
style: {
|
|
142540
|
+
width: "var(--radix-scroll-area-thumb-width)",
|
|
142541
|
+
height: "var(--radix-scroll-area-thumb-height)",
|
|
142542
|
+
...style
|
|
142543
|
+
},
|
|
142544
|
+
onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => {
|
|
142545
|
+
const thumb = event.target;
|
|
142546
|
+
const thumbRect = thumb.getBoundingClientRect();
|
|
142547
|
+
const x = event.clientX - thumbRect.left;
|
|
142548
|
+
const y = event.clientY - thumbRect.top;
|
|
142549
|
+
scrollbarContext.onThumbPointerDown({ x, y });
|
|
142550
|
+
}),
|
|
142551
|
+
onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)
|
|
142552
|
+
}
|
|
142553
|
+
);
|
|
142554
|
+
}
|
|
142555
|
+
);
|
|
142556
|
+
ScrollAreaThumb.displayName = THUMB_NAME;
|
|
142557
|
+
var CORNER_NAME = "ScrollAreaCorner";
|
|
142558
|
+
var ScrollAreaCorner = React__namespace.forwardRef(
|
|
142559
|
+
(props, forwardedRef) => {
|
|
142560
|
+
const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);
|
|
142561
|
+
const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);
|
|
142562
|
+
const hasCorner = context.type !== "scroll" && hasBothScrollbarsVisible;
|
|
142563
|
+
return hasCorner ? /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null;
|
|
142564
|
+
}
|
|
142565
|
+
);
|
|
142566
|
+
ScrollAreaCorner.displayName = CORNER_NAME;
|
|
142567
|
+
var ScrollAreaCornerImpl = React__namespace.forwardRef((props, forwardedRef) => {
|
|
142568
|
+
const { __scopeScrollArea, ...cornerProps } = props;
|
|
142569
|
+
const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);
|
|
142570
|
+
const [width, setWidth] = React__namespace.useState(0);
|
|
142571
|
+
const [height, setHeight] = React__namespace.useState(0);
|
|
142572
|
+
const hasSize = Boolean(width && height);
|
|
142573
|
+
useResizeObserver(context.scrollbarX, () => {
|
|
142574
|
+
const height2 = context.scrollbarX?.offsetHeight || 0;
|
|
142575
|
+
context.onCornerHeightChange(height2);
|
|
142576
|
+
setHeight(height2);
|
|
142577
|
+
});
|
|
142578
|
+
useResizeObserver(context.scrollbarY, () => {
|
|
142579
|
+
const width2 = context.scrollbarY?.offsetWidth || 0;
|
|
142580
|
+
context.onCornerWidthChange(width2);
|
|
142581
|
+
setWidth(width2);
|
|
142582
|
+
});
|
|
142583
|
+
return hasSize ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
142584
|
+
Primitive.div,
|
|
142585
|
+
{
|
|
142586
|
+
...cornerProps,
|
|
142587
|
+
ref: forwardedRef,
|
|
142588
|
+
style: {
|
|
142589
|
+
width,
|
|
142590
|
+
height,
|
|
142591
|
+
position: "absolute",
|
|
142592
|
+
right: context.dir === "ltr" ? 0 : void 0,
|
|
142593
|
+
left: context.dir === "rtl" ? 0 : void 0,
|
|
142594
|
+
bottom: 0,
|
|
142595
|
+
...props.style
|
|
142596
|
+
}
|
|
142597
|
+
}
|
|
142598
|
+
) : null;
|
|
142599
|
+
});
|
|
142600
|
+
function toInt(value) {
|
|
142601
|
+
return value ? parseInt(value, 10) : 0;
|
|
142602
|
+
}
|
|
142603
|
+
function getThumbRatio(viewportSize, contentSize) {
|
|
142604
|
+
const ratio = viewportSize / contentSize;
|
|
142605
|
+
return isNaN(ratio) ? 0 : ratio;
|
|
142606
|
+
}
|
|
142607
|
+
function getThumbSize(sizes) {
|
|
142608
|
+
const ratio = getThumbRatio(sizes.viewport, sizes.content);
|
|
142609
|
+
const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;
|
|
142610
|
+
const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;
|
|
142611
|
+
return Math.max(thumbSize, 18);
|
|
142612
|
+
}
|
|
142613
|
+
function getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = "ltr") {
|
|
142614
|
+
const thumbSizePx = getThumbSize(sizes);
|
|
142615
|
+
const thumbCenter = thumbSizePx / 2;
|
|
142616
|
+
const offset = pointerOffset || thumbCenter;
|
|
142617
|
+
const thumbOffsetFromEnd = thumbSizePx - offset;
|
|
142618
|
+
const minPointerPos = sizes.scrollbar.paddingStart + offset;
|
|
142619
|
+
const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;
|
|
142620
|
+
const maxScrollPos = sizes.content - sizes.viewport;
|
|
142621
|
+
const scrollRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];
|
|
142622
|
+
const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange);
|
|
142623
|
+
return interpolate(pointerPos);
|
|
142624
|
+
}
|
|
142625
|
+
function getThumbOffsetFromScroll(scrollPos, sizes, dir = "ltr") {
|
|
142626
|
+
const thumbSizePx = getThumbSize(sizes);
|
|
142627
|
+
const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;
|
|
142628
|
+
const scrollbar = sizes.scrollbar.size - scrollbarPadding;
|
|
142629
|
+
const maxScrollPos = sizes.content - sizes.viewport;
|
|
142630
|
+
const maxThumbPos = scrollbar - thumbSizePx;
|
|
142631
|
+
const scrollClampRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];
|
|
142632
|
+
const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange);
|
|
142633
|
+
const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);
|
|
142634
|
+
return interpolate(scrollWithoutMomentum);
|
|
142635
|
+
}
|
|
142636
|
+
function linearScale(input, output) {
|
|
142637
|
+
return (value) => {
|
|
142638
|
+
if (input[0] === input[1] || output[0] === output[1]) return output[0];
|
|
142639
|
+
const ratio = (output[1] - output[0]) / (input[1] - input[0]);
|
|
142640
|
+
return output[0] + ratio * (value - input[0]);
|
|
142641
|
+
};
|
|
142642
|
+
}
|
|
142643
|
+
function isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) {
|
|
142644
|
+
return scrollPos > 0 && scrollPos < maxScrollPos;
|
|
142645
|
+
}
|
|
142646
|
+
var addUnlinkedScrollListener = (node, handler = () => {
|
|
142647
|
+
}) => {
|
|
142648
|
+
let prevPosition = { left: node.scrollLeft, top: node.scrollTop };
|
|
142649
|
+
let rAF = 0;
|
|
142650
|
+
(function loop() {
|
|
142651
|
+
const position = { left: node.scrollLeft, top: node.scrollTop };
|
|
142652
|
+
const isHorizontalScroll = prevPosition.left !== position.left;
|
|
142653
|
+
const isVerticalScroll = prevPosition.top !== position.top;
|
|
142654
|
+
if (isHorizontalScroll || isVerticalScroll) handler();
|
|
142655
|
+
prevPosition = position;
|
|
142656
|
+
rAF = window.requestAnimationFrame(loop);
|
|
142657
|
+
})();
|
|
142658
|
+
return () => window.cancelAnimationFrame(rAF);
|
|
142659
|
+
};
|
|
142660
|
+
function useDebounceCallback(callback, delay) {
|
|
142661
|
+
const handleCallback = useCallbackRef(callback);
|
|
142662
|
+
const debounceTimerRef = React__namespace.useRef(0);
|
|
142663
|
+
React__namespace.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);
|
|
142664
|
+
return React__namespace.useCallback(() => {
|
|
142665
|
+
window.clearTimeout(debounceTimerRef.current);
|
|
142666
|
+
debounceTimerRef.current = window.setTimeout(handleCallback, delay);
|
|
142667
|
+
}, [handleCallback, delay]);
|
|
142668
|
+
}
|
|
142669
|
+
function useResizeObserver(element, onResize) {
|
|
142670
|
+
const handleResize = useCallbackRef(onResize);
|
|
142671
|
+
useLayoutEffect2(() => {
|
|
142672
|
+
let rAF = 0;
|
|
142673
|
+
if (element) {
|
|
142674
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
142675
|
+
cancelAnimationFrame(rAF);
|
|
142676
|
+
rAF = window.requestAnimationFrame(handleResize);
|
|
142677
|
+
});
|
|
142678
|
+
resizeObserver.observe(element);
|
|
142679
|
+
return () => {
|
|
142680
|
+
window.cancelAnimationFrame(rAF);
|
|
142681
|
+
resizeObserver.unobserve(element);
|
|
142682
|
+
};
|
|
142683
|
+
}
|
|
142684
|
+
}, [element, handleResize]);
|
|
142685
|
+
}
|
|
142686
|
+
function getSubtree(options, content) {
|
|
142687
|
+
const { asChild, children } = options;
|
|
142688
|
+
if (!asChild) return typeof content === "function" ? content(children) : content;
|
|
142689
|
+
const firstChild = React__namespace.Children.only(children);
|
|
142690
|
+
return React__namespace.cloneElement(firstChild, {
|
|
142691
|
+
children: typeof content === "function" ? content(firstChild.props.children) : content
|
|
142692
|
+
});
|
|
142693
|
+
}
|
|
142694
|
+
var Root = ScrollArea$1;
|
|
142695
|
+
var Viewport = ScrollAreaViewport;
|
|
142696
|
+
var Corner = ScrollAreaCorner;
|
|
142697
|
+
|
|
142698
|
+
var ScrollArea = React__namespace.forwardRef(function (_a, ref) {
|
|
142699
|
+
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
142700
|
+
return (React__namespace.createElement(Root, __assign({ ref: ref, className: cn("s-relative s-z-20 s-overflow-hidden", className) }, props),
|
|
142701
|
+
React__namespace.createElement(Viewport, { className: "s-h-full s-w-full s-rounded-[inherit]" }, children),
|
|
142702
|
+
React__namespace.createElement(ScrollBar, null),
|
|
142703
|
+
React__namespace.createElement(Corner, null)));
|
|
142704
|
+
});
|
|
142705
|
+
ScrollArea.displayName = Root.displayName;
|
|
142706
|
+
var ScrollBar = React__namespace.forwardRef(function (_a, ref) {
|
|
142707
|
+
var className = _a.className, _b = _a.orientation, orientation = _b === void 0 ? "vertical" : _b, props = __rest(_a, ["className", "orientation"]);
|
|
142708
|
+
return (React__namespace.createElement(ScrollAreaScrollbar, __assign({ ref: ref, orientation: orientation, className: cn("s-flex s-touch-none s-select-none s-transition-colors", orientation === "vertical" &&
|
|
142709
|
+
"s-h-full s-w-2 s-border-l s-border-l-transparent s-p-[1px]", orientation === "horizontal" &&
|
|
142710
|
+
"s-h-2 s-flex-col s-border-t s-border-t-transparent s-p-[1px]", className) }, props),
|
|
142711
|
+
React__namespace.createElement(ScrollAreaThumb, { className: "s-relative s-flex-1 s-rounded-full s-bg-separator" })));
|
|
142712
|
+
});
|
|
142713
|
+
ScrollBar.displayName = ScrollAreaScrollbar.displayName;
|
|
142714
|
+
|
|
141818
142715
|
var sizeClasses$1 = {
|
|
141819
142716
|
xs: "s-text-xs s-h-[26px] s-pl-3 s-pr-6 s-pt-1.5 s-rounded-lg",
|
|
141820
142717
|
sm: "s-text-sm s-h-[34px] s-pl-4 s-pr-8 s-pt-1.5 s-rounded-xl",
|
|
@@ -142633,6 +143530,7 @@ exports.RocketStrokeIcon = SvgRocket$1;
|
|
|
142633
143530
|
exports.SalesforceLogo = SvgSalesforce$1;
|
|
142634
143531
|
exports.ScanIcon = SvgScan$3;
|
|
142635
143532
|
exports.ScanStrokeIcon = SvgScan$1;
|
|
143533
|
+
exports.ScrollArea = ScrollArea;
|
|
142636
143534
|
exports.Searchbar = Searchbar;
|
|
142637
143535
|
exports.Separator = Separator;
|
|
142638
143536
|
exports.ServerIcon = SvgServer$3;
|