@dust-tt/sparkle 0.2.266 → 0.2.267-rc-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1404 -482
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Chip.d.ts.map +1 -1
- package/dist/esm/components/Chip.js +3 -3
- package/dist/esm/components/Chip.js.map +1 -1
- package/dist/esm/components/RadioGroup.d.ts +12 -0
- package/dist/esm/components/RadioGroup.d.ts.map +1 -0
- package/dist/esm/components/RadioGroup.js +31 -0
- package/dist/esm/components/RadioGroup.js.map +1 -0
- package/dist/esm/components/index.d.ts +1 -1
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/stories/RadioGroup.stories.d.ts +7 -0
- package/dist/esm/stories/RadioGroup.stories.d.ts.map +1 -0
- package/dist/esm/stories/RadioGroup.stories.js +30 -0
- package/dist/esm/stories/RadioGroup.stories.js.map +1 -0
- package/dist/sparkle.css +50 -101
- package/package.json +3 -1
- package/src/components/Chip.tsx +4 -3
- package/src/components/RadioGroup.tsx +69 -0
- package/src/components/index.ts +1 -1
- package/src/stories/RadioGroup.stories.tsx +44 -0
- package/dist/esm/components/RadioButton.d.ts +0 -15
- package/dist/esm/components/RadioButton.d.ts.map +0 -1
- package/dist/esm/components/RadioButton.js +0 -26
- package/dist/esm/components/RadioButton.js.map +0 -1
- package/dist/esm/stories/RadioButton.stories.d.ts +0 -9
- package/dist/esm/stories/RadioButton.stories.d.ts.map +0 -1
- package/dist/esm/stories/RadioButton.stories.js +0 -57
- package/dist/esm/stories/RadioButton.stories.js.map +0 -1
- package/src/components/RadioButton.tsx +0 -83
- package/src/stories/RadioButton.stories.tsx +0 -81
package/dist/cjs/index.js
CHANGED
|
@@ -40323,7 +40323,7 @@ var utils = /*#__PURE__*/Object.freeze({
|
|
|
40323
40323
|
getEmojiAndBackgroundFromUrl: getEmojiAndBackgroundFromUrl
|
|
40324
40324
|
});
|
|
40325
40325
|
|
|
40326
|
-
function r$
|
|
40326
|
+
function r$5(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r$5(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx$1(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r$5(e))&&(n&&(n+=" "),n+=t);return n}
|
|
40327
40327
|
|
|
40328
40328
|
const CLASS_PART_SEPARATOR = '-';
|
|
40329
40329
|
const createClassGroupUtils = config => {
|
|
@@ -42862,7 +42862,7 @@ function cn() {
|
|
|
42862
42862
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
42863
42863
|
inputs[_i] = arguments[_i];
|
|
42864
42864
|
}
|
|
42865
|
-
return twMerge(clsx(inputs));
|
|
42865
|
+
return twMerge(clsx$1(inputs));
|
|
42866
42866
|
}
|
|
42867
42867
|
|
|
42868
42868
|
var colors$1 = [
|
|
@@ -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$4(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$3(originalEventHandler, ourEventHandler, { checkFo
|
|
|
43040
43040
|
}
|
|
43041
43041
|
|
|
43042
43042
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
43043
|
-
function setRef$
|
|
43043
|
+
function setRef$6(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$6(...refs) {
|
|
43051
|
+
return (node) => refs.forEach((ref) => setRef$6(ref, node));
|
|
43052
43052
|
}
|
|
43053
|
-
function useComposedRefs$
|
|
43054
|
-
return React__namespace.useCallback(composeRefs$
|
|
43053
|
+
function useComposedRefs$4(...refs) {
|
|
43054
|
+
return React__namespace.useCallback(composeRefs$6(...refs), refs);
|
|
43055
43055
|
}
|
|
43056
43056
|
|
|
43057
43057
|
// packages/react/context/src/createContext.tsx
|
|
43058
|
-
function createContextScope$
|
|
43058
|
+
function createContextScope$b(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$8(scopeName, createContextScopeDeps = []) {
|
|
|
43090
43090
|
};
|
|
43091
43091
|
};
|
|
43092
43092
|
createScope.scopeName = scopeName;
|
|
43093
|
-
return [createContext3, composeContextScopes$
|
|
43093
|
+
return [createContext3, composeContextScopes$b(createScope, ...createContextScopeDeps)];
|
|
43094
43094
|
}
|
|
43095
|
-
function composeContextScopes$
|
|
43095
|
+
function composeContextScopes$b(...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$5(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$5(...refs) {
|
|
74033
|
+
return (node) => refs.forEach((ref) => setRef$5(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$5(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$6 = [
|
|
74114
74114
|
"a",
|
|
74115
74115
|
"button",
|
|
74116
74116
|
"div",
|
|
@@ -74128,7 +74128,7 @@ var NODES$5 = [
|
|
|
74128
74128
|
"svg",
|
|
74129
74129
|
"ul"
|
|
74130
74130
|
];
|
|
74131
|
-
var Primitive$
|
|
74131
|
+
var Primitive$6 = NODES$6.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$5(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$4(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$5(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$4(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$6.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$4(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
74267
|
+
onBlurCapture: composeEventHandlers$4(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
74268
|
+
onPointerDownCapture: composeEventHandlers$4(
|
|
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$4(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$6.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$5(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$5(onFocusOutside);
|
|
74339
74339
|
const isFocusInsideReactTreeRef = React__namespace.useRef(false);
|
|
74340
74340
|
React__namespace.useEffect(() => {
|
|
74341
74341
|
const handleFocus = (event) => {
|
|
@@ -74370,16 +74370,16 @@ 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$5 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
74374
74374
|
};
|
|
74375
74375
|
|
|
74376
74376
|
// packages/react/id/src/id.tsx
|
|
74377
|
-
var useReactId$
|
|
74378
|
-
var count$
|
|
74379
|
-
function useId$
|
|
74380
|
-
const [id, setId] = React__namespace.useState(useReactId$
|
|
74381
|
-
useLayoutEffect2$
|
|
74382
|
-
if (!deterministicId) setId((reactId) => reactId ?? String(count$
|
|
74377
|
+
var useReactId$4 = React__namespace["useId".toString()] || (() => void 0);
|
|
74378
|
+
var count$7 = 0;
|
|
74379
|
+
function useId$4(deterministicId) {
|
|
74380
|
+
const [id, setId] = React__namespace.useState(useReactId$4());
|
|
74381
|
+
useLayoutEffect2$5(() => {
|
|
74382
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count$7++));
|
|
74383
74383
|
}, [deterministicId]);
|
|
74384
74384
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
74385
74385
|
}
|
|
@@ -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$6.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$7 = Arrow$5;
|
|
76355
76355
|
|
|
76356
76356
|
// packages/react/context/src/createContext.tsx
|
|
76357
|
-
function createContextScope$
|
|
76357
|
+
function createContextScope$a(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$7(scopeName, createContextScopeDeps = []) {
|
|
|
76389
76389
|
};
|
|
76390
76390
|
};
|
|
76391
76391
|
createScope.scopeName = scopeName;
|
|
76392
|
-
return [createContext3, composeContextScopes$
|
|
76392
|
+
return [createContext3, composeContextScopes$a(createScope, ...createContextScopeDeps)];
|
|
76393
76393
|
}
|
|
76394
|
-
function composeContextScopes$
|
|
76394
|
+
function composeContextScopes$a(...scopes) {
|
|
76395
76395
|
const baseScope = scopes[0];
|
|
76396
76396
|
if (scopes.length === 1) return baseScope;
|
|
76397
76397
|
const createScope = () => {
|
|
@@ -76413,9 +76413,9 @@ function composeContextScopes$7(...scopes) {
|
|
|
76413
76413
|
}
|
|
76414
76414
|
|
|
76415
76415
|
// packages/react/use-size/src/useSize.tsx
|
|
76416
|
-
function useSize$
|
|
76416
|
+
function useSize$3(element) {
|
|
76417
76417
|
const [size, setSize] = React__namespace.useState(void 0);
|
|
76418
|
-
useLayoutEffect2$
|
|
76418
|
+
useLayoutEffect2$5(() => {
|
|
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$2(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$a(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$4(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$6.div, { ...anchorProps, ref: composedRefs });
|
|
76471
76471
|
}
|
|
76472
76472
|
);
|
|
76473
76473
|
PopperAnchor$2.displayName = ANCHOR_NAME$4;
|
|
@@ -76493,9 +76493,9 @@ 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$4(forwardedRef, (node) => setContent(node));
|
|
76497
76497
|
const [arrow$1, setArrow] = React__namespace.useState(null);
|
|
76498
|
-
const arrowSize = useSize$
|
|
76498
|
+
const arrowSize = useSize$3(arrow$1);
|
|
76499
76499
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
76500
76500
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
76501
76501
|
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
|
@@ -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$5(onPlaced);
|
|
76551
|
+
useLayoutEffect2$5(() => {
|
|
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$5(() => {
|
|
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$6.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$7,
|
|
76658
76658
|
{
|
|
76659
76659
|
...arrowProps,
|
|
76660
76660
|
ref: forwardedRef,
|
|
@@ -76708,28 +76708,28 @@ function getSideAndAlignFromPlacement$2(placement) {
|
|
|
76708
76708
|
const [side, align = "center"] = placement.split("-");
|
|
76709
76709
|
return [side, align];
|
|
76710
76710
|
}
|
|
76711
|
-
var Root2$
|
|
76711
|
+
var Root2$5 = Popper$2;
|
|
76712
76712
|
var Anchor$2 = PopperAnchor$2;
|
|
76713
76713
|
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$4(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$4(...refs) {
|
|
76725
|
+
return (node) => refs.forEach((ref) => setRef$4(ref, node));
|
|
76726
76726
|
}
|
|
76727
|
-
function useComposedRefs$
|
|
76728
|
-
return React__namespace.useCallback(composeRefs$
|
|
76727
|
+
function useComposedRefs$3(...refs) {
|
|
76728
|
+
return React__namespace.useCallback(composeRefs$4(...refs), refs);
|
|
76729
76729
|
}
|
|
76730
76730
|
|
|
76731
76731
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
76732
|
-
var useLayoutEffect2$
|
|
76732
|
+
var useLayoutEffect2$4 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
76733
76733
|
};
|
|
76734
76734
|
|
|
76735
76735
|
function useStateMachine(initialState, machine) {
|
|
@@ -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$3(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
|
};
|
|
@@ -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$4(() => {
|
|
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$4(() => {
|
|
76798
76798
|
if (node) {
|
|
76799
76799
|
let timeoutId;
|
|
76800
76800
|
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
@@ -76858,16 +76858,16 @@ function getElementRef(element) {
|
|
|
76858
76858
|
}
|
|
76859
76859
|
|
|
76860
76860
|
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
76861
|
-
function useControllableState$
|
|
76861
|
+
function useControllableState$4({
|
|
76862
76862
|
prop,
|
|
76863
76863
|
defaultProp,
|
|
76864
76864
|
onChange = () => {
|
|
76865
76865
|
}
|
|
76866
76866
|
}) {
|
|
76867
|
-
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$
|
|
76867
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$4({ defaultProp, onChange });
|
|
76868
76868
|
const isControlled = prop !== void 0;
|
|
76869
76869
|
const value = isControlled ? prop : uncontrolledProp;
|
|
76870
|
-
const handleChange = useCallbackRef$
|
|
76870
|
+
const handleChange = useCallbackRef$5(onChange);
|
|
76871
76871
|
const setValue = React__namespace.useCallback(
|
|
76872
76872
|
(nextValue) => {
|
|
76873
76873
|
if (isControlled) {
|
|
@@ -76882,14 +76882,14 @@ function useControllableState$3({
|
|
|
76882
76882
|
);
|
|
76883
76883
|
return [value, setValue];
|
|
76884
76884
|
}
|
|
76885
|
-
function useUncontrolledState$
|
|
76885
|
+
function useUncontrolledState$4({
|
|
76886
76886
|
defaultProp,
|
|
76887
76887
|
onChange
|
|
76888
76888
|
}) {
|
|
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$5(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$6.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$6 = VisuallyHidden;
|
|
76931
76931
|
|
|
76932
|
-
var [createTooltipContext, createTooltipScope] = createContextScope$
|
|
76932
|
+
var [createTooltipContext, createTooltipScope] = createContextScope$b("Tooltip", [
|
|
76933
76933
|
createPopperScope$2
|
|
76934
76934
|
]);
|
|
76935
76935
|
var usePopperScope$2 = createPopperScope$2();
|
|
@@ -76994,12 +76994,12 @@ var Tooltip$1 = (props) => {
|
|
|
76994
76994
|
const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip);
|
|
76995
76995
|
const popperScope = usePopperScope$2(__scopeTooltip);
|
|
76996
76996
|
const [trigger, setTrigger] = React__namespace.useState(null);
|
|
76997
|
-
const contentId = useId$
|
|
76997
|
+
const contentId = useId$4();
|
|
76998
76998
|
const openTimerRef = React__namespace.useRef(0);
|
|
76999
76999
|
const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;
|
|
77000
77000
|
const delayDuration = delayDurationProp ?? providerContext.delayDuration;
|
|
77001
77001
|
const wasOpenDelayedRef = React__namespace.useRef(false);
|
|
77002
|
-
const [open = false, setOpen] = useControllableState$
|
|
77002
|
+
const [open = false, setOpen] = useControllableState$4({
|
|
77003
77003
|
prop: openProp,
|
|
77004
77004
|
defaultProp: defaultOpen,
|
|
77005
77005
|
onChange: (open2) => {
|
|
@@ -77034,7 +77034,7 @@ var Tooltip$1 = (props) => {
|
|
|
77034
77034
|
React__namespace.useEffect(() => {
|
|
77035
77035
|
return () => window.clearTimeout(openTimerRef.current);
|
|
77036
77036
|
}, []);
|
|
77037
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Root2$
|
|
77037
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Root2$5, { ...popperScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
77038
77038
|
TooltipContextProvider,
|
|
77039
77039
|
{
|
|
77040
77040
|
scope: __scopeTooltip,
|
|
@@ -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$4(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$6.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$4(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$4(props.onPointerLeave, () => {
|
|
77095
77095
|
context.onTriggerLeave();
|
|
77096
77096
|
hasPointerMoveOpenedRef.current = false;
|
|
77097
77097
|
}),
|
|
77098
|
-
onPointerDown: composeEventHandlers$
|
|
77098
|
+
onPointerDown: composeEventHandlers$4(props.onPointerDown, () => {
|
|
77099
77099
|
isPointerDownRef.current = true;
|
|
77100
77100
|
document.addEventListener("pointerup", handlePointerUp, { once: true });
|
|
77101
77101
|
}),
|
|
77102
|
-
onFocus: composeEventHandlers$
|
|
77102
|
+
onFocus: composeEventHandlers$4(props.onFocus, () => {
|
|
77103
77103
|
if (!isPointerDownRef.current) context.onOpen();
|
|
77104
77104
|
}),
|
|
77105
|
-
onBlur: composeEventHandlers$
|
|
77106
|
-
onClick: composeEventHandlers$
|
|
77105
|
+
onBlur: composeEventHandlers$4(props.onBlur, context.onClose),
|
|
77106
|
+
onClick: composeEventHandlers$4(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$4(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$6, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
77244
77244
|
]
|
|
77245
77245
|
}
|
|
77246
77246
|
)
|
|
@@ -77779,7 +77779,7 @@ BarHeader.ButtonBar = function (props) {
|
|
|
77779
77779
|
}
|
|
77780
77780
|
};
|
|
77781
77781
|
|
|
77782
|
-
var i$4=Object.defineProperty;var d$5=(t,e,n)=>e in t?i$4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var r$
|
|
77782
|
+
var i$4=Object.defineProperty;var d$5=(t,e,n)=>e in t?i$4(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var r$4=(t,e,n)=>(d$5(t,typeof e!="symbol"?e+"":e,n),n);let o$6 = class o{constructor(){r$4(this,"current",this.detect());r$4(this,"handoffState","pending");r$4(this,"currentId",0);}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e);}reset(){this.set(this.detect());}nextId(){return ++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window=="undefined"||typeof document=="undefined"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete");}get isHandoffComplete(){return this.handoffState==="complete"}};let s$9=new o$6;
|
|
77783
77783
|
|
|
77784
77784
|
let l$5=(e,f)=>{s$9.isServer?React.useEffect(e,f):React.useLayoutEffect(e,f);};
|
|
77785
77785
|
|
|
@@ -77838,7 +77838,7 @@ function t$4(n){function e(){document.readyState!=="loading"&&(n(),document.remo
|
|
|
77838
77838
|
|
|
77839
77839
|
let t$3=[];t$4(()=>{function e(n){n.target instanceof HTMLElement&&n.target!==document.body&&t$3[0]!==n.target&&(t$3.unshift(n.target),t$3=t$3.filter(r=>r!=null&&r.isConnected),t$3.splice(10));}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0});});
|
|
77840
77840
|
|
|
77841
|
-
function r$
|
|
77841
|
+
function r$3(n){let e=n.parentElement,l=null;for(;e&&!(e instanceof HTMLFieldSetElement);)e instanceof HTMLLegendElement&&(l=e),e=e.parentElement;let t=(e==null?void 0:e.getAttribute("disabled"))==="";return t&&i$1(l)?!1:t}function i$1(n){if(!n)return !1;let e=n.previousElementSibling;for(;e!==null;){if(e instanceof HTMLLegendElement)return !1;e=e.previousElementSibling;}return !0}
|
|
77842
77842
|
|
|
77843
77843
|
function u$2(l){throw new Error("Unexpected object: "+l)}var c$4=(i=>(i[i.First=0]="First",i[i.Previous=1]="Previous",i[i.Next=2]="Next",i[i.Last=3]="Last",i[i.Specific=4]="Specific",i[i.Nothing=5]="Nothing",i))(c$4||{});function f$4(l,n){let t=n.resolveItems();if(t.length<=0)return null;let r=n.resolveActiveIndex(),s=r!=null?r:-1;switch(l.focus){case 0:{for(let e=0;e<t.length;++e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 1:{for(let e=s-1;e>=0;--e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 2:{for(let e=s+1;e<t.length;++e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 3:{for(let e=t.length-1;e>=0;--e)if(!n.resolveDisabled(t[e],e,t))return e;return r}case 4:{for(let e=0;e<t.length;++e)if(n.resolveId(t[e],e,t)===l.id)return e;return r}case 5:return null;default:u$2(l);}}
|
|
77844
77844
|
|
|
@@ -77858,11 +77858,11 @@ let e=React.createContext(!1);function a$6(){return React.useContext(e)}function
|
|
|
77858
77858
|
|
|
77859
77859
|
function F$1(p){let n=a$6(),l=React.useContext(_$1),e=n$2(p),[a,o]=React.useState(()=>{if(!n&&l!==null||s$9.isServer)return null;let t=e==null?void 0:e.getElementById("headlessui-portal-root");if(t)return t;if(e===null)return null;let r=e.createElement("div");return r.setAttribute("id","headlessui-portal-root"),e.body.appendChild(r)});return React.useEffect(()=>{a!==null&&(e!=null&&e.body.contains(a)||e==null||e.body.appendChild(a));},[a,e]),React.useEffect(()=>{n||l!==null&&o(l.current);},[l,o,n]),a}let U$2=React.Fragment;function N$1(p,n){let l=p,e=React.useRef(null),a=y$1(T(u=>{e.current=u;}),n),o=n$2(e),t=F$1(e),[r]=React.useState(()=>{var u;return s$9.isServer?null:(u=o==null?void 0:o.createElement("div"))!=null?u:null}),i=React.useContext(f$2),v=l$4();return l$5(()=>{!t||!r||t.contains(r)||(r.setAttribute("data-headlessui-portal",""),t.appendChild(r));},[t,r]),l$5(()=>{if(r&&i)return i.register(r)},[i,r]),c$3(()=>{var u;!t||!r||(r instanceof Node&&t.contains(r)&&t.removeChild(r),t.childNodes.length<=0&&((u=t.parentElement)==null||u.removeChild(t)));}),v?!t||!r?null:reactDomExports.createPortal(C$1({ourProps:{ref:a},theirProps:l,defaultTag:U$2,name:"Portal"}),r):null}let S$3=React.Fragment,_$1=React.createContext(null);function j(p,n){let{target:l,...e}=p,o={ref:y$1(n)};return React.createElement(_$1.Provider,{value:l},C$1({ourProps:o,theirProps:e,defaultTag:S$3,name:"Popover.Group"}))}let f$2=React.createContext(null);function ee$1(){let p=React.useContext(f$2),n=React.useRef([]),l=o$5(o=>(n.current.push(o),p&&p.register(o),()=>e(o))),e=o$5(o=>{let t=n.current.indexOf(o);t!==-1&&n.current.splice(t,1),p&&p.unregister(o);}),a=React.useMemo(()=>({register:l,unregister:e,portals:n}),[l,e,n]);return [n,React.useMemo(()=>function({children:t}){return React.createElement(f$2.Provider,{value:a},t)},[a])]}let D$1=U$3(N$1),I$3=U$3(j),te$1=Object.assign(D$1,{Group:I$3});
|
|
77860
77860
|
|
|
77861
|
-
function i(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const d$2=typeof Object.is=="function"?Object.is:i,{useState:u$1,useEffect:h$1,useLayoutEffect:f$1,useDebugValue:p$1}=React__namespace;function y(e,t,c){const a=t(),[{inst:n},o]=u$1({inst:{value:a,getSnapshot:t}});return f$1(()=>{n.value=a,n.getSnapshot=t,r$
|
|
77861
|
+
function i(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const d$2=typeof Object.is=="function"?Object.is:i,{useState:u$1,useEffect:h$1,useLayoutEffect:f$1,useDebugValue:p$1}=React__namespace;function y(e,t,c){const a=t(),[{inst:n},o]=u$1({inst:{value:a,getSnapshot:t}});return f$1(()=>{n.value=a,n.getSnapshot=t,r$2(n)&&o({inst:n});},[e,a,t]),h$1(()=>(r$2(n)&&o({inst:n}),e(()=>{r$2(n)&&o({inst:n});})),[e]),p$1(a),a}function r$2(e){const t=e.getSnapshot,c=e.value;try{const a=t();return !d$2(c,a)}catch{return !0}}
|
|
77862
77862
|
|
|
77863
77863
|
function t$2(r,e,n){return e()}
|
|
77864
77864
|
|
|
77865
|
-
const r=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",s$2=!r,c$2=s$2?t$2:y,a$5="useSyncExternalStore"in React__namespace?(n=>n.useSyncExternalStore)(React__namespace):c$2;
|
|
77865
|
+
const r$1=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",s$2=!r$1,c$2=s$2?t$2:y,a$5="useSyncExternalStore"in React__namespace?(n=>n.useSyncExternalStore)(React__namespace):c$2;
|
|
77866
77866
|
|
|
77867
77867
|
function S$2(t){return a$5(t.subscribe,t.getSnapshot,t.getSnapshot)}
|
|
77868
77868
|
|
|
@@ -77886,17 +77886,17 @@ let a$2=React.createContext(()=>{});a$2.displayName="StackContext";var s$1=(e=>(
|
|
|
77886
77886
|
|
|
77887
77887
|
let d=React.createContext(null);function f(){let r=React.useContext(d);if(r===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,f),t}return r}function w$1(){let[r,t]=React.useState([]);return [r.length>0?r.join(" "):void 0,React.useMemo(()=>function(e){let i=o$5(s=>(t(o=>[...o,s]),()=>t(o=>{let p=o.slice(),c=p.indexOf(s);return c!==-1&&p.splice(c,1),p}))),n=React.useMemo(()=>({register:i,slot:e.slot,name:e.name,props:e.props}),[i,e.slot,e.name,e.props]);return React.createElement(d.Provider,{value:n},e.children)},[t])]}let I$2="p";function S$1(r,t){let a=I$6(),{id:e=`headlessui-description-${a}`,...i}=r,n=f(),s=y$1(t);l$5(()=>n.register(e),[e,n.register]);let o={ref:s,...n.props,id:e};return C$1({ourProps:o,theirProps:i,slot:n.slot||{},defaultTag:I$2,name:n.name||"Description"})}let h=U$3(S$1),G=Object.assign(h,{});
|
|
77888
77888
|
|
|
77889
|
-
var Me$1=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(Me$1||{}),we=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(we||{});let He$1={[0](o,e){return o.titleId===e.id?o:{...o,titleId:e.id}}},I$1=React.createContext(null);I$1.displayName="DialogContext";function b$1(o){let e=React.useContext(I$1);if(e===null){let r=new Error(`<${o} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,b$1),r}return e}function Be(o,e,r=()=>[document.body]){p(o,e,i=>{var n;return {containers:[...(n=i.containers)!=null?n:[],r]}});}function Ge(o,e){return u$7(e.type,He$1,o,e)}let Ne$1="div",Ue=O.RenderStrategy|O.Static;function We(o,e){let r=I$6(),{id:i=`headlessui-dialog-${r}`,open:n,onClose:l,initialFocus:s,role:a="dialog",__demoMode:T=!1,...m}=o,[M,f]=React.useState(0),U=React.useRef(!1);a=function(){return a==="dialog"||a==="alertdialog"?a:(U.current||(U.current=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let E$1=u$3();n===void 0&&E$1!==null&&(n=(E$1&d$3.Open)===d$3.Open);let D=React.useRef(null),ee=y$1(D,e),g=n$2(D),W=o.hasOwnProperty("open")||E$1!==null,$=o.hasOwnProperty("onClose");if(!W&&!$)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!W)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!$)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof n!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let p=n?0:1,[h,te]=React.useReducer(Ge,{titleId:null,descriptionId:null,panelRef:React.createRef()}),P=o$5(()=>l(!1)),Y=o$5(t=>te({type:0,id:t})),S=l$4()?T?!1:p===0:!1,x=M>1,j=React.useContext(I$1)!==null,[oe,re]=ee$1(),ne={get current(){var t;return (t=h.panelRef.current)!=null?t:D.current}},{resolveContainers:w,mainTreeNodeRef:L,MainTreeNode:le}=N({portals:oe,defaultContainers:[ne]}),ae=x?"parent":"leaf",J=E$1!==null?(E$1&d$3.Closing)===d$3.Closing:!1,ie=(()=>j||J?!1:S)(),se=React.useCallback(()=>{var t,c;return (c=Array.from((t=g==null?void 0:g.querySelectorAll("body > *"))!=null?t:[]).find(d=>d.id==="headlessui-portal-root"?!1:d.contains(L.current)&&d instanceof HTMLElement))!=null?c:null},[L]);b$3(se,ie);let pe=(()=>x?!0:S)(),de=React.useCallback(()=>{var t,c;return (c=Array.from((t=g==null?void 0:g.querySelectorAll("[data-headlessui-portal]"))!=null?t:[]).find(d=>d.contains(L.current)&&d instanceof HTMLElement))!=null?c:null},[L]);b$3(de,pe);let ue=(()=>!(!S||x))();y$2(w,t=>{t.preventDefault(),P();},ue);let fe=(()=>!(x||p!==0))();E(g==null?void 0:g.defaultView,"keydown",t=>{fe&&(t.defaultPrevented||t.key===o$1.Escape&&(t.preventDefault(),t.stopPropagation(),P()));});let ge=(()=>!(J||p!==0||j))();Be(g,ge,w),React.useEffect(()=>{if(p!==0||!D.current)return;let t=new ResizeObserver(c=>{for(let d of c){let F=d.target.getBoundingClientRect();F.x===0&&F.y===0&&F.width===0&&F.height===0&&P();}});return t.observe(D.current),()=>t.disconnect()},[p,D,P]);let[Te,ce]=w$1(),De=React.useMemo(()=>[{dialogState:p,close:P,setTitleId:Y},h],[p,h,P,Y]),X=React.useMemo(()=>({open:p===0}),[p]),me={ref:ee,id:i,role:a,"aria-modal":p===0?!0:void 0,"aria-labelledby":h.titleId,"aria-describedby":Te};return React.createElement(b$2,{type:"Dialog",enabled:p===0,element:D,onUpdate:o$5((t,c)=>{c==="Dialog"&&u$7(t,{[s$1.Add]:()=>f(d=>d+1),[s$1.Remove]:()=>f(d=>d-1)});})},React.createElement(l$2,{force:!0},React.createElement(te$1,null,React.createElement(I$1.Provider,{value:De},React.createElement(te$1.Group,{target:D},React.createElement(l$2,{force:!1},React.createElement(ce,{slot:X,name:"Dialog.Description"},React.createElement(de$1,{initialFocus:s,containers:w,features:S?u$7(ae,{parent:de$1.features.RestoreFocus,leaf:de$1.features.All&~de$1.features.FocusLock}):de$1.features.None},React.createElement(re,null,C$1({ourProps:me,theirProps:m,slot:X,defaultTag:Ne$1,features:Ue,visible:p===0,name:"Dialog"}))))))))),React.createElement(le,null))}let $e="div";function Ye(o,e){let r=I$6(),{id:i=`headlessui-dialog-overlay-${r}`,...n}=o,[{dialogState:l,close:s}]=b$1("Dialog.Overlay"),a=y$1(e),T=o$5(f=>{if(f.target===f.currentTarget){if(r$
|
|
77889
|
+
var Me$1=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(Me$1||{}),we=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(we||{});let He$1={[0](o,e){return o.titleId===e.id?o:{...o,titleId:e.id}}},I$1=React.createContext(null);I$1.displayName="DialogContext";function b$1(o){let e=React.useContext(I$1);if(e===null){let r=new Error(`<${o} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,b$1),r}return e}function Be(o,e,r=()=>[document.body]){p(o,e,i=>{var n;return {containers:[...(n=i.containers)!=null?n:[],r]}});}function Ge(o,e){return u$7(e.type,He$1,o,e)}let Ne$1="div",Ue=O.RenderStrategy|O.Static;function We(o,e){let r=I$6(),{id:i=`headlessui-dialog-${r}`,open:n,onClose:l,initialFocus:s,role:a="dialog",__demoMode:T=!1,...m}=o,[M,f]=React.useState(0),U=React.useRef(!1);a=function(){return a==="dialog"||a==="alertdialog"?a:(U.current||(U.current=!0,console.warn(`Invalid role [${a}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let E$1=u$3();n===void 0&&E$1!==null&&(n=(E$1&d$3.Open)===d$3.Open);let D=React.useRef(null),ee=y$1(D,e),g=n$2(D),W=o.hasOwnProperty("open")||E$1!==null,$=o.hasOwnProperty("onClose");if(!W&&!$)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!W)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!$)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof n!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n}`);if(typeof l!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${l}`);let p=n?0:1,[h,te]=React.useReducer(Ge,{titleId:null,descriptionId:null,panelRef:React.createRef()}),P=o$5(()=>l(!1)),Y=o$5(t=>te({type:0,id:t})),S=l$4()?T?!1:p===0:!1,x=M>1,j=React.useContext(I$1)!==null,[oe,re]=ee$1(),ne={get current(){var t;return (t=h.panelRef.current)!=null?t:D.current}},{resolveContainers:w,mainTreeNodeRef:L,MainTreeNode:le}=N({portals:oe,defaultContainers:[ne]}),ae=x?"parent":"leaf",J=E$1!==null?(E$1&d$3.Closing)===d$3.Closing:!1,ie=(()=>j||J?!1:S)(),se=React.useCallback(()=>{var t,c;return (c=Array.from((t=g==null?void 0:g.querySelectorAll("body > *"))!=null?t:[]).find(d=>d.id==="headlessui-portal-root"?!1:d.contains(L.current)&&d instanceof HTMLElement))!=null?c:null},[L]);b$3(se,ie);let pe=(()=>x?!0:S)(),de=React.useCallback(()=>{var t,c;return (c=Array.from((t=g==null?void 0:g.querySelectorAll("[data-headlessui-portal]"))!=null?t:[]).find(d=>d.contains(L.current)&&d instanceof HTMLElement))!=null?c:null},[L]);b$3(de,pe);let ue=(()=>!(!S||x))();y$2(w,t=>{t.preventDefault(),P();},ue);let fe=(()=>!(x||p!==0))();E(g==null?void 0:g.defaultView,"keydown",t=>{fe&&(t.defaultPrevented||t.key===o$1.Escape&&(t.preventDefault(),t.stopPropagation(),P()));});let ge=(()=>!(J||p!==0||j))();Be(g,ge,w),React.useEffect(()=>{if(p!==0||!D.current)return;let t=new ResizeObserver(c=>{for(let d of c){let F=d.target.getBoundingClientRect();F.x===0&&F.y===0&&F.width===0&&F.height===0&&P();}});return t.observe(D.current),()=>t.disconnect()},[p,D,P]);let[Te,ce]=w$1(),De=React.useMemo(()=>[{dialogState:p,close:P,setTitleId:Y},h],[p,h,P,Y]),X=React.useMemo(()=>({open:p===0}),[p]),me={ref:ee,id:i,role:a,"aria-modal":p===0?!0:void 0,"aria-labelledby":h.titleId,"aria-describedby":Te};return React.createElement(b$2,{type:"Dialog",enabled:p===0,element:D,onUpdate:o$5((t,c)=>{c==="Dialog"&&u$7(t,{[s$1.Add]:()=>f(d=>d+1),[s$1.Remove]:()=>f(d=>d-1)});})},React.createElement(l$2,{force:!0},React.createElement(te$1,null,React.createElement(I$1.Provider,{value:De},React.createElement(te$1.Group,{target:D},React.createElement(l$2,{force:!1},React.createElement(ce,{slot:X,name:"Dialog.Description"},React.createElement(de$1,{initialFocus:s,containers:w,features:S?u$7(ae,{parent:de$1.features.RestoreFocus,leaf:de$1.features.All&~de$1.features.FocusLock}):de$1.features.None},React.createElement(re,null,C$1({ourProps:me,theirProps:m,slot:X,defaultTag:Ne$1,features:Ue,visible:p===0,name:"Dialog"}))))))))),React.createElement(le,null))}let $e="div";function Ye(o,e){let r=I$6(),{id:i=`headlessui-dialog-overlay-${r}`,...n}=o,[{dialogState:l,close:s}]=b$1("Dialog.Overlay"),a=y$1(e),T=o$5(f=>{if(f.target===f.currentTarget){if(r$3(f.currentTarget))return f.preventDefault();f.preventDefault(),f.stopPropagation(),s();}}),m=React.useMemo(()=>({open:l===0}),[l]);return C$1({ourProps:{ref:a,id:i,"aria-hidden":!0,onClick:T},theirProps:n,slot:m,defaultTag:$e,name:"Dialog.Overlay"})}let je="div";function Je(o,e){let r=I$6(),{id:i=`headlessui-dialog-backdrop-${r}`,...n}=o,[{dialogState:l},s]=b$1("Dialog.Backdrop"),a=y$1(e);React.useEffect(()=>{if(s.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[s.panelRef]);let T=React.useMemo(()=>({open:l===0}),[l]);return React.createElement(l$2,{force:!0},React.createElement(te$1,null,C$1({ourProps:{ref:a,id:i,"aria-hidden":!0},theirProps:n,slot:T,defaultTag:je,name:"Dialog.Backdrop"})))}let Xe="div";function Ke(o,e){let r=I$6(),{id:i=`headlessui-dialog-panel-${r}`,...n}=o,[{dialogState:l},s]=b$1("Dialog.Panel"),a=y$1(e,s.panelRef),T=React.useMemo(()=>({open:l===0}),[l]),m=o$5(f=>{f.stopPropagation();});return C$1({ourProps:{ref:a,id:i,onClick:m},theirProps:n,slot:T,defaultTag:Xe,name:"Dialog.Panel"})}let Ve="h2";function qe$2(o,e){let r=I$6(),{id:i=`headlessui-dialog-title-${r}`,...n}=o,[{dialogState:l,setTitleId:s}]=b$1("Dialog.Title"),a=y$1(e);React.useEffect(()=>(s(i),()=>s(null)),[i,s]);let T=React.useMemo(()=>({open:l===0}),[l]);return C$1({ourProps:{ref:a,id:i},theirProps:n,slot:T,defaultTag:Ve,name:"Dialog.Title"})}let ze=U$3(We),Qe=U$3(Je),Ze=U$3(Ke),et=U$3(Ye),tt=U$3(qe$2),_t=Object.assign(ze,{Backdrop:Qe,Panel:Ze,Overlay:et,Title:tt,Description:G});
|
|
77890
77890
|
|
|
77891
77891
|
var t;let a$1=(t=React.startTransition)!=null?t:function(i){i();};
|
|
77892
77892
|
|
|
77893
|
-
var Q=(o=>(o[o.Open=0]="Open",o[o.Closed=1]="Closed",o))(Q||{}),V=(t=>(t[t.ToggleDisclosure=0]="ToggleDisclosure",t[t.CloseDisclosure=1]="CloseDisclosure",t[t.SetButtonId=2]="SetButtonId",t[t.SetPanelId=3]="SetPanelId",t[t.LinkPanel=4]="LinkPanel",t[t.UnlinkPanel=5]="UnlinkPanel",t))(V||{});let Y={[0]:e=>({...e,disclosureState:u$7(e.disclosureState,{[0]:1,[1]:0})}),[1]:e=>e.disclosureState===1?e:{...e,disclosureState:1},[4](e){return e.linkedPanel===!0?e:{...e,linkedPanel:!0}},[5](e){return e.linkedPanel===!1?e:{...e,linkedPanel:!1}},[2](e,n){return e.buttonId===n.buttonId?e:{...e,buttonId:n.buttonId}},[3](e,n){return e.panelId===n.panelId?e:{...e,panelId:n.panelId}}},M$2=React.createContext(null);M$2.displayName="DisclosureContext";function _(e){let n=React.useContext(M$2);if(n===null){let o=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,_),o}return n}let v$1=React.createContext(null);v$1.displayName="DisclosureAPIContext";function K(e){let n=React.useContext(v$1);if(n===null){let o=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,K),o}return n}let F=React.createContext(null);F.displayName="DisclosurePanelContext";function Z(){return React.useContext(F)}function ee(e,n){return u$7(n.type,Y,e,n)}let te=React.Fragment;function ne(e,n){let{defaultOpen:o=!1,...i}=e,f=React.useRef(null),l=y$1(n,T(u=>{f.current=u;},e.as===void 0||e.as===React.Fragment)),t=React.useRef(null),d=React.useRef(null),s=React.useReducer(ee,{disclosureState:o?0:1,linkedPanel:!1,buttonRef:d,panelRef:t,buttonId:null,panelId:null}),[{disclosureState:c,buttonId:a},D]=s,p=o$5(u=>{D({type:1});let y=o$2(f);if(!y||!a)return;let r=(()=>u?u instanceof HTMLElement?u:u.current instanceof HTMLElement?u.current:y.getElementById(a):y.getElementById(a))();r==null||r.focus();}),P=React.useMemo(()=>({close:p}),[p]),T$1=React.useMemo(()=>({open:c===0,close:p}),[c,p]),C={ref:l};return React.createElement(M$2.Provider,{value:s},React.createElement(v$1.Provider,{value:P},React.createElement(s$4,{value:u$7(c,{[0]:d$3.Open,[1]:d$3.Closed})},C$1({ourProps:C,theirProps:i,slot:T$1,defaultTag:te,name:"Disclosure"}))))}let le$1="button";function oe(e,n){let o=I$6(),{id:i=`headlessui-disclosure-button-${o}`,...f}=e,[l,t]=_("Disclosure.Button"),d=Z(),s=d===null?!1:d===l.panelId,c=React.useRef(null),a=y$1(c,n,s?null:l.buttonRef),D=I$4();React.useEffect(()=>{if(!s)return t({type:2,buttonId:i}),()=>{t({type:2,buttonId:null});}},[i,t,s]);let p=o$5(r=>{var m;if(s){if(l.disclosureState===1)return;switch(r.key){case o$1.Space:case o$1.Enter:r.preventDefault(),r.stopPropagation(),t({type:0}),(m=l.buttonRef.current)==null||m.focus();break}}else switch(r.key){case o$1.Space:case o$1.Enter:r.preventDefault(),r.stopPropagation(),t({type:0});break}}),P=o$5(r=>{switch(r.key){case o$1.Space:r.preventDefault();break}}),T=o$5(r=>{var m;r$
|
|
77893
|
+
var Q=(o=>(o[o.Open=0]="Open",o[o.Closed=1]="Closed",o))(Q||{}),V=(t=>(t[t.ToggleDisclosure=0]="ToggleDisclosure",t[t.CloseDisclosure=1]="CloseDisclosure",t[t.SetButtonId=2]="SetButtonId",t[t.SetPanelId=3]="SetPanelId",t[t.LinkPanel=4]="LinkPanel",t[t.UnlinkPanel=5]="UnlinkPanel",t))(V||{});let Y={[0]:e=>({...e,disclosureState:u$7(e.disclosureState,{[0]:1,[1]:0})}),[1]:e=>e.disclosureState===1?e:{...e,disclosureState:1},[4](e){return e.linkedPanel===!0?e:{...e,linkedPanel:!0}},[5](e){return e.linkedPanel===!1?e:{...e,linkedPanel:!1}},[2](e,n){return e.buttonId===n.buttonId?e:{...e,buttonId:n.buttonId}},[3](e,n){return e.panelId===n.panelId?e:{...e,panelId:n.panelId}}},M$2=React.createContext(null);M$2.displayName="DisclosureContext";function _(e){let n=React.useContext(M$2);if(n===null){let o=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,_),o}return n}let v$1=React.createContext(null);v$1.displayName="DisclosureAPIContext";function K(e){let n=React.useContext(v$1);if(n===null){let o=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,K),o}return n}let F=React.createContext(null);F.displayName="DisclosurePanelContext";function Z(){return React.useContext(F)}function ee(e,n){return u$7(n.type,Y,e,n)}let te=React.Fragment;function ne(e,n){let{defaultOpen:o=!1,...i}=e,f=React.useRef(null),l=y$1(n,T(u=>{f.current=u;},e.as===void 0||e.as===React.Fragment)),t=React.useRef(null),d=React.useRef(null),s=React.useReducer(ee,{disclosureState:o?0:1,linkedPanel:!1,buttonRef:d,panelRef:t,buttonId:null,panelId:null}),[{disclosureState:c,buttonId:a},D]=s,p=o$5(u=>{D({type:1});let y=o$2(f);if(!y||!a)return;let r=(()=>u?u instanceof HTMLElement?u:u.current instanceof HTMLElement?u.current:y.getElementById(a):y.getElementById(a))();r==null||r.focus();}),P=React.useMemo(()=>({close:p}),[p]),T$1=React.useMemo(()=>({open:c===0,close:p}),[c,p]),C={ref:l};return React.createElement(M$2.Provider,{value:s},React.createElement(v$1.Provider,{value:P},React.createElement(s$4,{value:u$7(c,{[0]:d$3.Open,[1]:d$3.Closed})},C$1({ourProps:C,theirProps:i,slot:T$1,defaultTag:te,name:"Disclosure"}))))}let le$1="button";function oe(e,n){let o=I$6(),{id:i=`headlessui-disclosure-button-${o}`,...f}=e,[l,t]=_("Disclosure.Button"),d=Z(),s=d===null?!1:d===l.panelId,c=React.useRef(null),a=y$1(c,n,s?null:l.buttonRef),D=I$4();React.useEffect(()=>{if(!s)return t({type:2,buttonId:i}),()=>{t({type:2,buttonId:null});}},[i,t,s]);let p=o$5(r=>{var m;if(s){if(l.disclosureState===1)return;switch(r.key){case o$1.Space:case o$1.Enter:r.preventDefault(),r.stopPropagation(),t({type:0}),(m=l.buttonRef.current)==null||m.focus();break}}else switch(r.key){case o$1.Space:case o$1.Enter:r.preventDefault(),r.stopPropagation(),t({type:0});break}}),P=o$5(r=>{switch(r.key){case o$1.Space:r.preventDefault();break}}),T=o$5(r=>{var m;r$3(r.currentTarget)||e.disabled||(s?(t({type:0}),(m=l.buttonRef.current)==null||m.focus()):t({type:0}));}),C=React.useMemo(()=>({open:l.disclosureState===0}),[l]),u=T$1(e,c),y=s?{ref:a,type:u,onKeyDown:p,onClick:T}:{ref:a,id:i,type:u,"aria-expanded":l.disclosureState===0,"aria-controls":l.linkedPanel?l.panelId:void 0,onKeyDown:p,onKeyUp:P,onClick:T};return C$1({mergeRefs:D,ourProps:y,theirProps:f,slot:C,defaultTag:le$1,name:"Disclosure.Button"})}let re$1="div",se$1=O.RenderStrategy|O.Static;function ue$1(e,n){let o=I$6(),{id:i=`headlessui-disclosure-panel-${o}`,...f}=e,[l,t]=_("Disclosure.Panel"),{close:d}=K("Disclosure.Panel"),s=I$4(),c=y$1(n,l.panelRef,T=>{a$1(()=>t({type:T?4:5}));});React.useEffect(()=>(t({type:3,panelId:i}),()=>{t({type:3,panelId:null});}),[i,t]);let a=u$3(),D=(()=>a!==null?(a&d$3.Open)===d$3.Open:l.disclosureState===0)(),p=React.useMemo(()=>({open:l.disclosureState===0,close:d}),[l,d]),P={ref:c,id:i};return React.createElement(F.Provider,{value:l.panelId},C$1({mergeRefs:s,ourProps:P,theirProps:f,slot:p,defaultTag:re$1,features:se$1,visible:D,name:"Disclosure.Panel"}))}let ie=U$3(ne),ae$1=U$3(oe),pe=U$3(ue$1),Ae$1=Object.assign(ie,{Button:ae$1,Panel:pe});
|
|
77894
77894
|
|
|
77895
77895
|
let a=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function o(e){var r,i;let n=(r=e.innerText)!=null?r:"",t=e.cloneNode(!0);if(!(t instanceof HTMLElement))return n;let u=!1;for(let f of t.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))f.remove(),u=!0;let l=u?(i=t.innerText)!=null?i:"":n;return a.test(l)&&(l=l.replace(a,"")),l}function g$1(e){let n=e.getAttribute("aria-label");if(typeof n=="string")return n.trim();let t=e.getAttribute("aria-labelledby");if(t){let u=t.split(" ").map(l=>{let r=document.getElementById(l);if(r){let i=r.getAttribute("aria-label");return typeof i=="string"?i.trim():o(r).trim()}return null}).filter(Boolean);if(u.length>0)return u.join(", ")}return o(e).trim()}
|
|
77896
77896
|
|
|
77897
77897
|
function s(c){let t=React.useRef(""),r=React.useRef("");return o$5(()=>{let e=c.current;if(!e)return "";let u=e.innerText;if(t.current===u)return r.current;let n=g$1(e).trim().toLowerCase();return t.current=u,r.current=n,n})}
|
|
77898
77898
|
|
|
77899
|
-
var me=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(me||{}),de=(r=>(r[r.Pointer=0]="Pointer",r[r.Other=1]="Other",r))(de||{}),fe=(a=>(a[a.OpenMenu=0]="OpenMenu",a[a.CloseMenu=1]="CloseMenu",a[a.GoToItem=2]="GoToItem",a[a.Search=3]="Search",a[a.ClearSearch=4]="ClearSearch",a[a.RegisterItem=5]="RegisterItem",a[a.UnregisterItem=6]="UnregisterItem",a))(fe||{});function w(e,u=r=>r){let r=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,s=I$5(u(e.items.slice()),t=>t.dataRef.current.domRef.current),i=r?s.indexOf(r):null;return i===-1&&(i=null),{items:s,activeItemIndex:i}}let Te={[1](e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},[0](e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},[2]:(e,u)=>{var i;let r=w(e),s=f$4(u,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});return {...e,...r,searchQuery:"",activeItemIndex:s,activationTrigger:(i=u.trigger)!=null?i:1}},[3]:(e,u)=>{let s=e.searchQuery!==""?0:1,i=e.searchQuery+u.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+s).concat(e.items.slice(0,e.activeItemIndex+s)):e.items).find(l=>{var m;return ((m=l.dataRef.current.textValue)==null?void 0:m.startsWith(i))&&!l.dataRef.current.disabled}),a=o?e.items.indexOf(o):-1;return a===-1||a===e.activeItemIndex?{...e,searchQuery:i}:{...e,searchQuery:i,activeItemIndex:a,activationTrigger:1}},[4](e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},[5]:(e,u)=>{let r=w(e,s=>[...s,{id:u.id,dataRef:u.dataRef}]);return {...e,...r}},[6]:(e,u)=>{let r=w(e,s=>{let i=s.findIndex(t=>t.id===u.id);return i!==-1&&s.splice(i,1),s});return {...e,...r,activationTrigger:1}}},U$1=React.createContext(null);U$1.displayName="MenuContext";function C(e){let u=React.useContext(U$1);if(u===null){let r=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,C),r}return u}function ye$1(e,u){return u$7(u.type,Te,e,u)}let Ie=React.Fragment;function Me(e,u){let{__demoMode:r=!1,...s}=e,i=React.useReducer(ye$1,{__demoMode:r,menuState:r?0:1,buttonRef:React.createRef(),itemsRef:React.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:t,itemsRef:o,buttonRef:a},l]=i,m=y$1(u);y$2([a,o],(g,R)=>{var p;l({type:1}),h$2(R,T$2.Loose)||(g.preventDefault(),(p=a.current)==null||p.focus());},t===0);let I=o$5(()=>{l({type:1});}),A=React.useMemo(()=>({open:t===0,close:I}),[t,I]),f={ref:m};return React.createElement(U$1.Provider,{value:i},React.createElement(s$4,{value:u$7(t,{[0]:d$3.Open,[1]:d$3.Closed})},C$1({ourProps:f,theirProps:s,slot:A,defaultTag:Ie,name:"Menu"})))}let ge="button";function Re$1(e,u){var R;let r=I$6(),{id:s=`headlessui-menu-button-${r}`,...i}=e,[t,o]=C("Menu.Button"),a=y$1(t.buttonRef,u),l=p$3(),m=o$5(p=>{switch(p.key){case o$1.Space:case o$1.Enter:case o$1.ArrowDown:p.preventDefault(),p.stopPropagation(),o({type:0}),l.nextFrame(()=>o({type:2,focus:c$4.First}));break;case o$1.ArrowUp:p.preventDefault(),p.stopPropagation(),o({type:0}),l.nextFrame(()=>o({type:2,focus:c$4.Last}));break}}),I=o$5(p=>{switch(p.key){case o$1.Space:p.preventDefault();break}}),A=o$5(p=>{if(r$
|
|
77899
|
+
var me=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(me||{}),de=(r=>(r[r.Pointer=0]="Pointer",r[r.Other=1]="Other",r))(de||{}),fe=(a=>(a[a.OpenMenu=0]="OpenMenu",a[a.CloseMenu=1]="CloseMenu",a[a.GoToItem=2]="GoToItem",a[a.Search=3]="Search",a[a.ClearSearch=4]="ClearSearch",a[a.RegisterItem=5]="RegisterItem",a[a.UnregisterItem=6]="UnregisterItem",a))(fe||{});function w(e,u=r=>r){let r=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,s=I$5(u(e.items.slice()),t=>t.dataRef.current.domRef.current),i=r?s.indexOf(r):null;return i===-1&&(i=null),{items:s,activeItemIndex:i}}let Te={[1](e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},[0](e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},[2]:(e,u)=>{var i;let r=w(e),s=f$4(u,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});return {...e,...r,searchQuery:"",activeItemIndex:s,activationTrigger:(i=u.trigger)!=null?i:1}},[3]:(e,u)=>{let s=e.searchQuery!==""?0:1,i=e.searchQuery+u.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+s).concat(e.items.slice(0,e.activeItemIndex+s)):e.items).find(l=>{var m;return ((m=l.dataRef.current.textValue)==null?void 0:m.startsWith(i))&&!l.dataRef.current.disabled}),a=o?e.items.indexOf(o):-1;return a===-1||a===e.activeItemIndex?{...e,searchQuery:i}:{...e,searchQuery:i,activeItemIndex:a,activationTrigger:1}},[4](e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},[5]:(e,u)=>{let r=w(e,s=>[...s,{id:u.id,dataRef:u.dataRef}]);return {...e,...r}},[6]:(e,u)=>{let r=w(e,s=>{let i=s.findIndex(t=>t.id===u.id);return i!==-1&&s.splice(i,1),s});return {...e,...r,activationTrigger:1}}},U$1=React.createContext(null);U$1.displayName="MenuContext";function C(e){let u=React.useContext(U$1);if(u===null){let r=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,C),r}return u}function ye$1(e,u){return u$7(u.type,Te,e,u)}let Ie=React.Fragment;function Me(e,u){let{__demoMode:r=!1,...s}=e,i=React.useReducer(ye$1,{__demoMode:r,menuState:r?0:1,buttonRef:React.createRef(),itemsRef:React.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:t,itemsRef:o,buttonRef:a},l]=i,m=y$1(u);y$2([a,o],(g,R)=>{var p;l({type:1}),h$2(R,T$2.Loose)||(g.preventDefault(),(p=a.current)==null||p.focus());},t===0);let I=o$5(()=>{l({type:1});}),A=React.useMemo(()=>({open:t===0,close:I}),[t,I]),f={ref:m};return React.createElement(U$1.Provider,{value:i},React.createElement(s$4,{value:u$7(t,{[0]:d$3.Open,[1]:d$3.Closed})},C$1({ourProps:f,theirProps:s,slot:A,defaultTag:Ie,name:"Menu"})))}let ge="button";function Re$1(e,u){var R;let r=I$6(),{id:s=`headlessui-menu-button-${r}`,...i}=e,[t,o]=C("Menu.Button"),a=y$1(t.buttonRef,u),l=p$3(),m=o$5(p=>{switch(p.key){case o$1.Space:case o$1.Enter:case o$1.ArrowDown:p.preventDefault(),p.stopPropagation(),o({type:0}),l.nextFrame(()=>o({type:2,focus:c$4.First}));break;case o$1.ArrowUp:p.preventDefault(),p.stopPropagation(),o({type:0}),l.nextFrame(()=>o({type:2,focus:c$4.Last}));break}}),I=o$5(p=>{switch(p.key){case o$1.Space:p.preventDefault();break}}),A=o$5(p=>{if(r$3(p.currentTarget))return p.preventDefault();e.disabled||(t.menuState===0?(o({type:1}),l.nextFrame(()=>{var M;return (M=t.buttonRef.current)==null?void 0:M.focus({preventScroll:!0})})):(p.preventDefault(),o({type:0})));}),f=React.useMemo(()=>({open:t.menuState===0}),[t]),g={ref:a,id:s,type:T$1(e,t.buttonRef),"aria-haspopup":"menu","aria-controls":(R=t.itemsRef.current)==null?void 0:R.id,"aria-expanded":t.menuState===0,onKeyDown:m,onKeyUp:I,onClick:A};return C$1({ourProps:g,theirProps:i,slot:f,defaultTag:ge,name:"Menu.Button"})}let Ae="div",be=O.RenderStrategy|O.Static;function Ee(e,u){var M,b;let r=I$6(),{id:s=`headlessui-menu-items-${r}`,...i}=e,[t,o]=C("Menu.Items"),a=y$1(t.itemsRef,u),l=n$2(t.itemsRef),m=p$3(),I=u$3(),A=(()=>I!==null?(I&d$3.Open)===d$3.Open:t.menuState===0)();React.useEffect(()=>{let n=t.itemsRef.current;n&&t.menuState===0&&n!==(l==null?void 0:l.activeElement)&&n.focus({preventScroll:!0});},[t.menuState,t.itemsRef,l]),F$3({container:t.itemsRef.current,enabled:t.menuState===0,accept(n){return n.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:n.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(n){n.setAttribute("role","none");}});let f=o$5(n=>{var E,x;switch(m.dispose(),n.key){case o$1.Space:if(t.searchQuery!=="")return n.preventDefault(),n.stopPropagation(),o({type:3,value:n.key});case o$1.Enter:if(n.preventDefault(),n.stopPropagation(),o({type:1}),t.activeItemIndex!==null){let{dataRef:S}=t.items[t.activeItemIndex];(x=(E=S.current)==null?void 0:E.domRef.current)==null||x.click();}D$3(t.buttonRef.current);break;case o$1.ArrowDown:return n.preventDefault(),n.stopPropagation(),o({type:2,focus:c$4.Next});case o$1.ArrowUp:return n.preventDefault(),n.stopPropagation(),o({type:2,focus:c$4.Previous});case o$1.Home:case o$1.PageUp:return n.preventDefault(),n.stopPropagation(),o({type:2,focus:c$4.First});case o$1.End:case o$1.PageDown:return n.preventDefault(),n.stopPropagation(),o({type:2,focus:c$4.Last});case o$1.Escape:n.preventDefault(),n.stopPropagation(),o({type:1}),o$4().nextFrame(()=>{var S;return (S=t.buttonRef.current)==null?void 0:S.focus({preventScroll:!0})});break;case o$1.Tab:n.preventDefault(),n.stopPropagation(),o({type:1}),o$4().nextFrame(()=>{_$3(t.buttonRef.current,n.shiftKey?M$3.Previous:M$3.Next);});break;default:n.key.length===1&&(o({type:3,value:n.key}),m.setTimeout(()=>o({type:4}),350));break}}),g=o$5(n=>{switch(n.key){case o$1.Space:n.preventDefault();break}}),R=React.useMemo(()=>({open:t.menuState===0}),[t]),p={"aria-activedescendant":t.activeItemIndex===null||(M=t.items[t.activeItemIndex])==null?void 0:M.id,"aria-labelledby":(b=t.buttonRef.current)==null?void 0:b.id,id:s,onKeyDown:f,onKeyUp:g,role:"menu",tabIndex:0,ref:a};return C$1({ourProps:p,theirProps:i,slot:R,defaultTag:Ae,features:be,visible:A,name:"Menu.Items"})}let Se$1=React.Fragment;function xe$1(e,u){let r=I$6(),{id:s$1=`headlessui-menu-item-${r}`,disabled:i=!1,...t}=e,[o,a]=C("Menu.Item"),l=o.activeItemIndex!==null?o.items[o.activeItemIndex].id===s$1:!1,m=React.useRef(null),I=y$1(u,m);l$5(()=>{if(o.__demoMode||o.menuState!==0||!l||o.activationTrigger===0)return;let T=o$4();return T.requestAnimationFrame(()=>{var P,B;(B=(P=m.current)==null?void 0:P.scrollIntoView)==null||B.call(P,{block:"nearest"});}),T.dispose},[o.__demoMode,m,l,o.menuState,o.activationTrigger,o.activeItemIndex]);let A=s(m),f=React.useRef({disabled:i,domRef:m,get textValue(){return A()}});l$5(()=>{f.current.disabled=i;},[f,i]),l$5(()=>(a({type:5,id:s$1,dataRef:f}),()=>a({type:6,id:s$1})),[f,s$1]);let g=o$5(()=>{a({type:1});}),R=o$5(T=>{if(i)return T.preventDefault();a({type:1}),D$3(o.buttonRef.current);}),p=o$5(()=>{if(i)return a({type:2,focus:c$4.Nothing});a({type:2,focus:c$4.Specific,id:s$1});}),M=u$5(),b=o$5(T=>M.update(T)),n=o$5(T=>{M.wasMoved(T)&&(i||l||a({type:2,focus:c$4.Specific,id:s$1,trigger:0}));}),E=o$5(T=>{M.wasMoved(T)&&(i||l&&a({type:2,focus:c$4.Nothing}));}),x=React.useMemo(()=>({active:l,disabled:i,close:g}),[l,i,g]);return C$1({ourProps:{id:s$1,ref:I,role:"menuitem",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,disabled:void 0,onClick:R,onFocus:p,onPointerEnter:b,onMouseEnter:b,onPointerMove:n,onMouseMove:n,onPointerLeave:E,onMouseLeave:E},theirProps:t,slot:x,defaultTag:Se$1,name:"Menu.Item"})}let Pe$1=U$3(Me),ve=U$3(Re$1),he=U$3(Ee),De$1=U$3(xe$1),qe$1=Object.assign(Pe$1,{Button:ve,Items:he,Item:De$1});
|
|
77900
77900
|
|
|
77901
77901
|
function c(a=0){let[l,r]=React.useState(a),t=f$3(),o=React.useCallback(e=>{t.current&&r(u=>u|e);},[l,t]),m=React.useCallback(e=>Boolean(l&e),[l]),s=React.useCallback(e=>{t.current&&r(u=>u&~e);},[r,t]),g=React.useCallback(e=>{t.current&&r(u=>u^e);},[r]);return {flags:l,addFlag:o,hasFlag:m,removeFlag:s,toggleFlag:g}}
|
|
77902
77902
|
|
|
@@ -77931,7 +77931,7 @@ var iconClasses$4 = {
|
|
|
77931
77931
|
link: "s-text-brand group-hover/item:s-text-action-400 group-active/item:s-text-action-700 dark:group-hover/item:s-text-action-600-dark dark:group-active/item:s-text-action-400-dark",
|
|
77932
77932
|
warning: "s-text-warning-400 group-hover/item:s-text-warning-300 group-active/item:s-text-warning-700 dark:group-hover/item:s-text-warning-600-dark dark:group-active/item:s-text-warning-400-dark",
|
|
77933
77933
|
};
|
|
77934
|
-
function Item$
|
|
77934
|
+
function Item$2(_a) {
|
|
77935
77935
|
var label = _a.label, description = _a.description, visual = _a.visual, icon = _a.icon, _b = _a.style, style = _b === void 0 ? "action" : _b, _c = _a.spacing, spacing = _c === void 0 ? "sm" : _c, _d = _a.action, action = _d === void 0 ? ChevronRightIcon : _d, _e = _a.hasAction, hasAction = _e === void 0 ? true : _e, onClick = _a.onClick, _f = _a.selected, selected = _f === void 0 ? false : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.className, className = _h === void 0 ? "" : _h, link = _a.link;
|
|
77936
77936
|
var components = React.useContext(SparkleContext).components;
|
|
77937
77937
|
var _j = link || {}, href = _j.href, target = _j.target;
|
|
@@ -77969,42 +77969,42 @@ function Item$1(_a) {
|
|
|
77969
77969
|
: classNames("s-text-element-600 group-hover/item:s-text-action-400 group-active/item:s-text-action-700 dark:group-hover/item:s-text-action-600-dark dark:group-active/item:s-text-action-400-dark", hasAction ? "group-hover/item:s-opacity-100" : ""))
|
|
77970
77970
|
: "s-hidden", size: "sm" })));
|
|
77971
77971
|
}
|
|
77972
|
-
Item$
|
|
77973
|
-
return React.createElement(Item$
|
|
77972
|
+
Item$2.Entry = function (props) {
|
|
77973
|
+
return React.createElement(Item$2, __assign({}, props, { spacing: "sm", style: "item", hasAction: "hover" }));
|
|
77974
77974
|
};
|
|
77975
|
-
Item$
|
|
77975
|
+
Item$2.Avatar = function (_a) {
|
|
77976
77976
|
var description = _a.description, _b = _a.hasAction, hasAction = _b === void 0 ? false : _b, otherProps = __rest(_a, ["description", "hasAction"]);
|
|
77977
|
-
return (React.createElement(Item$
|
|
77977
|
+
return (React.createElement(Item$2, __assign({}, otherProps, { style: "action", spacing: description ? "md" : "sm", description: description, hasAction: hasAction })));
|
|
77978
77978
|
};
|
|
77979
|
-
Item$
|
|
77980
|
-
return React.createElement(Item$
|
|
77979
|
+
Item$2.Navigation = function (props) {
|
|
77980
|
+
return React.createElement(Item$2, __assign({}, props, { style: "action", spacing: "md" }));
|
|
77981
77981
|
};
|
|
77982
|
-
Item$
|
|
77982
|
+
Item$2.Link = function (_a) {
|
|
77983
77983
|
var props = __rest(_a, []);
|
|
77984
|
-
return (React.createElement(Item$
|
|
77984
|
+
return (React.createElement(Item$2, __assign({}, props, {
|
|
77985
77985
|
// Pass down additional props as needed
|
|
77986
77986
|
style: "link", hasAction: false, spacing: "lg" })));
|
|
77987
77987
|
};
|
|
77988
|
-
Item$
|
|
77988
|
+
Item$2.Dropdown = function (_a) {
|
|
77989
77989
|
var style = _a.style, props = __rest(_a, ["style"]);
|
|
77990
|
-
return (React.createElement(Item$
|
|
77990
|
+
return (React.createElement(Item$2, __assign({}, props, {
|
|
77991
77991
|
// Pass down additional props as needed
|
|
77992
77992
|
style: style === "default" ? "action" : "warning", hasAction: false })));
|
|
77993
77993
|
};
|
|
77994
|
-
Item$
|
|
77994
|
+
Item$2.SectionHeader = function (_a) {
|
|
77995
77995
|
var label = _a.label, _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.className, className = _c === void 0 ? "" : _c;
|
|
77996
77996
|
return (React.createElement("div", { className: classNames(className, variant === "primary"
|
|
77997
77997
|
? "s-text-element-800 dark:s-text-element-800-dark"
|
|
77998
77998
|
: "s-text-element-600 dark:s-text-element-600-dark", "s-pb-2 s-pt-6 s-text-xs s-font-medium s-uppercase") }, label));
|
|
77999
77999
|
};
|
|
78000
|
-
Item$
|
|
78000
|
+
Item$2.List = function (_a) {
|
|
78001
78001
|
var children = _a.children, className = _a.className;
|
|
78002
78002
|
return (React.createElement("div", { className: classNames(className ? className : "", "s-flex") },
|
|
78003
78003
|
React.createElement("div", { className: "s-flex s-w-full s-flex-col" }, children)));
|
|
78004
78004
|
};
|
|
78005
78005
|
|
|
78006
78006
|
var ButtonRefContext = React.createContext(null);
|
|
78007
|
-
var labelClasses
|
|
78007
|
+
var labelClasses = {
|
|
78008
78008
|
base: "s-text-element-900 s-inline-flex s-transition-colors s-ease-out s-duration-400 s-box-border s-gap-x-2 s-select-none",
|
|
78009
78009
|
hover: "group-hover/dm:s-text-action-500",
|
|
78010
78010
|
active: "active:s-text-action-700",
|
|
@@ -78050,7 +78050,7 @@ function DropdownMenu$1(_a) {
|
|
|
78050
78050
|
DropdownMenu$1.Button = React.forwardRef(function DropdownMenuButton(_a, forwardedRef) {
|
|
78051
78051
|
var label = _a.label, _b = _a.type, type = _b === void 0 ? "menu" : _b, _c = _a.size, size = _c === void 0 ? "sm" : _c, tooltip = _a.tooltip, icon = _a.icon, children = _a.children, _d = _a.tooltipPosition, tooltipPosition = _d === void 0 ? "top" : _d, _e = _a.className, className = _e === void 0 ? "" : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, onClick = _a.onClick;
|
|
78052
78052
|
var contextRef = React.useContext(ButtonRefContext);
|
|
78053
|
-
var finalLabelClasses = classNames(labelClasses
|
|
78053
|
+
var finalLabelClasses = classNames(labelClasses.base, labelSizeClasses[size], labelClasses.dark.base, !disabled ? labelClasses.active : "", !disabled ? labelClasses.dark.active : "", !disabled ? labelClasses.hover : "", !disabled ? labelClasses.dark.hover : "", disabled ? labelClasses.disabled : "");
|
|
78054
78054
|
var finalIconClasses = classNames(iconClasses$3.base, iconClasses$3.dark.base, !disabled ? iconClasses$3.hover : "", !disabled ? iconClasses$3.dark.hover : "", disabled ? iconClasses$3.disabled : "");
|
|
78055
78055
|
var finalChevronClasses = classNames(chevronClasses.base, !disabled ? chevronClasses.hover : "", chevronClasses.dark.base, !disabled ? chevronClasses.dark.hover : "", disabled ? chevronClasses.disabled : "");
|
|
78056
78056
|
var aggregatedRef = function (value) {
|
|
@@ -78099,7 +78099,7 @@ DropdownMenu$1.Item = function (_a) {
|
|
|
78099
78099
|
// need to use as="div" -- otherwise we get a "forwardRef" error in the console
|
|
78100
78100
|
React.createElement(qe$1.Item, { disabled: disabled, as: "div" }, hasChildren ? (React.createElement(DropdownMenu$1, { className: "s-w-full s-gap-x-2 s-py-2" },
|
|
78101
78101
|
React.createElement(DropdownMenu$1.Button, { className: "s-w-full", disabled: disabled, label: label, type: "submenu" }),
|
|
78102
|
-
children)) : (React.createElement(Item$
|
|
78102
|
+
children)) : (React.createElement(Item$2.Dropdown, { className: "s-w-full", description: description, disabled: disabled, link: link, icon: icon, label: label, onClick: onClick, selected: selected, style: variant, visual: visual }))));
|
|
78103
78103
|
};
|
|
78104
78104
|
DropdownMenu$1.SectionHeader = function (_a) {
|
|
78105
78105
|
var label = _a.label;
|
|
@@ -78188,7 +78188,7 @@ DropdownMenu$1.Items = function (_a) {
|
|
|
78188
78188
|
React.createElement(qe$1.Items, { onKeyDown: onKeyDown, className: classNames("s-absolute s-z-10", getOriginClass(origin), "s-rounded-xl s-border s-border-structure-100 s-bg-structure-0 s-shadow-lg focus:s-outline-none dark:s-border-structure-100-dark dark:s-bg-structure-0-dark"), onClick: function (e) { return e.stopPropagation(); }, style: styleInsert(origin, marginLeft) },
|
|
78189
78189
|
topBar,
|
|
78190
78190
|
React.createElement("div", { className: classNames(classNamesForVariant(variant, hasDropdownItem), getOverflowClass(overflow)) },
|
|
78191
|
-
React.createElement(Item$
|
|
78191
|
+
React.createElement(Item$2.List, null, children)),
|
|
78192
78192
|
bottomBar)));
|
|
78193
78193
|
};
|
|
78194
78194
|
function findOriginFromButton(buttonRef) {
|
|
@@ -78873,10 +78873,10 @@ function Checkbox(_a) {
|
|
|
78873
78873
|
}
|
|
78874
78874
|
|
|
78875
78875
|
var sizeClasses$2 = {
|
|
78876
|
-
xs: "s-
|
|
78877
|
-
sm: "s-
|
|
78876
|
+
xs: "s-h-7 s-text-xs s-font-medium s-px-3 s-gap-2",
|
|
78877
|
+
sm: "s-h-9 s-text-sm s-font-semibold s-px-3 s-gap-2.5",
|
|
78878
78878
|
};
|
|
78879
|
-
var baseClasses$2 = "s-inline-flex s-box-border s-border s-items-center";
|
|
78879
|
+
var baseClasses$2 = "s-rounded-lg s-inline-flex s-box-border s-border s-items-center";
|
|
78880
78880
|
function Chip(_a) {
|
|
78881
78881
|
var _b = _a.size, size = _b === void 0 ? "xs" : _b, _c = _a.color, color = _c === void 0 ? "slate" : _c, label = _a.label, children = _a.children, _d = _a.className, className = _d === void 0 ? "" : _d, _e = _a.isBusy, isBusy = _e === void 0 ? false : _e, icon = _a.icon;
|
|
78882
78882
|
var backgroundColor = "s-bg-".concat(color, "-100 s-border-").concat(color, "-200");
|
|
@@ -107069,7 +107069,7 @@ const unique = (columnId, leafRows) => {
|
|
|
107069
107069
|
const uniqueCount = (columnId, leafRows) => {
|
|
107070
107070
|
return new Set(leafRows.map(d => d.getValue(columnId))).size;
|
|
107071
107071
|
};
|
|
107072
|
-
const count$
|
|
107072
|
+
const count$6 = (_columnId, leafRows) => {
|
|
107073
107073
|
return leafRows.length;
|
|
107074
107074
|
};
|
|
107075
107075
|
const aggregationFns = {
|
|
@@ -107081,7 +107081,7 @@ const aggregationFns = {
|
|
|
107081
107081
|
median,
|
|
107082
107082
|
unique,
|
|
107083
107083
|
uniqueCount,
|
|
107084
|
-
count: count$
|
|
107084
|
+
count: count$6
|
|
107085
107085
|
};
|
|
107086
107086
|
|
|
107087
107087
|
//
|
|
@@ -113442,7 +113442,7 @@ function IconToggleButton(_a) {
|
|
|
113442
113442
|
}
|
|
113443
113443
|
|
|
113444
113444
|
// packages/react/primitive/src/Primitive.tsx
|
|
113445
|
-
var NODES$
|
|
113445
|
+
var NODES$5 = [
|
|
113446
113446
|
"a",
|
|
113447
113447
|
"button",
|
|
113448
113448
|
"div",
|
|
@@ -113460,7 +113460,7 @@ var NODES$4 = [
|
|
|
113460
113460
|
"svg",
|
|
113461
113461
|
"ul"
|
|
113462
113462
|
];
|
|
113463
|
-
var Primitive$
|
|
113463
|
+
var Primitive$5 = NODES$5.reduce((primitive, node) => {
|
|
113464
113464
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
113465
113465
|
const { asChild, ...primitiveProps } = props;
|
|
113466
113466
|
const Comp = asChild ? Slot : node;
|
|
@@ -113476,7 +113476,7 @@ var Primitive$4 = NODES$4.reduce((primitive, node) => {
|
|
|
113476
113476
|
var NAME$3 = "Label";
|
|
113477
113477
|
var Label$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
113478
113478
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
113479
|
-
Primitive$
|
|
113479
|
+
Primitive$5.label,
|
|
113480
113480
|
{
|
|
113481
113481
|
...props,
|
|
113482
113482
|
ref: forwardedRef,
|
|
@@ -113490,14 +113490,14 @@ var Label$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
113490
113490
|
);
|
|
113491
113491
|
});
|
|
113492
113492
|
Label$2.displayName = NAME$3;
|
|
113493
|
-
var Root$
|
|
113493
|
+
var Root$5 = Label$2;
|
|
113494
113494
|
|
|
113495
113495
|
var labelVariants = cn("s-text-sm s-text-foreground s-leading-none", "peer-disabled:s-cursor-not-allowed peer-disabled:s-opacity-70");
|
|
113496
113496
|
var Label$1 = React__namespace.forwardRef(function (_a, ref) {
|
|
113497
113497
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
113498
|
-
return (React__namespace.createElement(Root$
|
|
113498
|
+
return (React__namespace.createElement(Root$5, __assign({ ref: ref, className: cn(labelVariants, className) }, props)));
|
|
113499
113499
|
});
|
|
113500
|
-
Label$1.displayName = Root$
|
|
113500
|
+
Label$1.displayName = Root$5.displayName;
|
|
113501
113501
|
|
|
113502
113502
|
var inputStyleClasses = cn("s-text-sm s-bg-background s-rounded-xl s-border s-border-border-dark s-flex s-h-9 s-w-full s-px-3 s-py-1.5 ", "file:s-border-0 file:s-bg-transparent file:s-text-sm file:s-font-medium file:s-text-foreground", "placeholder:s-text-muted-foreground", "focus-visible:s-outline-none focus-visible:s-ring-2 focus-visible:s-ring-offset-2 focus-visible:s-ring-ring focus-visible:s-border-primary-400", "disabled:s-cursor-not-allowed disabled:s-opacity-50 disabled:s-text-muted-foreground");
|
|
113503
113503
|
var Input = React.forwardRef(function (_a, ref) {
|
|
@@ -135051,7 +135051,7 @@ function Markdown(_a) {
|
|
|
135051
135051
|
}
|
|
135052
135052
|
|
|
135053
135053
|
// packages/core/primitive/src/primitive.tsx
|
|
135054
|
-
function composeEventHandlers$
|
|
135054
|
+
function composeEventHandlers$3(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
135055
135055
|
return function handleEvent(event) {
|
|
135056
135056
|
originalEventHandler?.(event);
|
|
135057
135057
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -135061,19 +135061,19 @@ function composeEventHandlers$2(originalEventHandler, ourEventHandler, { checkFo
|
|
|
135061
135061
|
}
|
|
135062
135062
|
|
|
135063
135063
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
135064
|
-
function setRef$
|
|
135064
|
+
function setRef$3(ref, value) {
|
|
135065
135065
|
if (typeof ref === "function") {
|
|
135066
135066
|
ref(value);
|
|
135067
135067
|
} else if (ref !== null && ref !== void 0) {
|
|
135068
135068
|
ref.current = value;
|
|
135069
135069
|
}
|
|
135070
135070
|
}
|
|
135071
|
-
function composeRefs$
|
|
135072
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
135071
|
+
function composeRefs$3(...refs) {
|
|
135072
|
+
return (node) => refs.forEach((ref) => setRef$3(ref, node));
|
|
135073
135073
|
}
|
|
135074
135074
|
|
|
135075
135075
|
// packages/react/context/src/createContext.tsx
|
|
135076
|
-
function createContextScope$
|
|
135076
|
+
function createContextScope$9(scopeName, createContextScopeDeps = []) {
|
|
135077
135077
|
let defaultContexts = [];
|
|
135078
135078
|
function createContext3(rootComponentName, defaultContext) {
|
|
135079
135079
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -135108,9 +135108,9 @@ function createContextScope$6(scopeName, createContextScopeDeps = []) {
|
|
|
135108
135108
|
};
|
|
135109
135109
|
};
|
|
135110
135110
|
createScope.scopeName = scopeName;
|
|
135111
|
-
return [createContext3, composeContextScopes$
|
|
135111
|
+
return [createContext3, composeContextScopes$9(createScope, ...createContextScopeDeps)];
|
|
135112
135112
|
}
|
|
135113
|
-
function composeContextScopes$
|
|
135113
|
+
function composeContextScopes$9(...scopes) {
|
|
135114
135114
|
const baseScope = scopes[0];
|
|
135115
135115
|
if (scopes.length === 1) return baseScope;
|
|
135116
135116
|
const createScope = () => {
|
|
@@ -135132,7 +135132,7 @@ function composeContextScopes$6(...scopes) {
|
|
|
135132
135132
|
}
|
|
135133
135133
|
|
|
135134
135134
|
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
135135
|
-
function useCallbackRef$
|
|
135135
|
+
function useCallbackRef$4(callback) {
|
|
135136
135136
|
const callbackRef = React__namespace.useRef(callback);
|
|
135137
135137
|
React__namespace.useEffect(() => {
|
|
135138
135138
|
callbackRef.current = callback;
|
|
@@ -135141,16 +135141,16 @@ function useCallbackRef$3(callback) {
|
|
|
135141
135141
|
}
|
|
135142
135142
|
|
|
135143
135143
|
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
135144
|
-
function useControllableState$
|
|
135144
|
+
function useControllableState$3({
|
|
135145
135145
|
prop,
|
|
135146
135146
|
defaultProp,
|
|
135147
135147
|
onChange = () => {
|
|
135148
135148
|
}
|
|
135149
135149
|
}) {
|
|
135150
|
-
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$
|
|
135150
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$3({ defaultProp, onChange });
|
|
135151
135151
|
const isControlled = prop !== void 0;
|
|
135152
135152
|
const value = isControlled ? prop : uncontrolledProp;
|
|
135153
|
-
const handleChange = useCallbackRef$
|
|
135153
|
+
const handleChange = useCallbackRef$4(onChange);
|
|
135154
135154
|
const setValue = React__namespace.useCallback(
|
|
135155
135155
|
(nextValue) => {
|
|
135156
135156
|
if (isControlled) {
|
|
@@ -135165,14 +135165,14 @@ function useControllableState$2({
|
|
|
135165
135165
|
);
|
|
135166
135166
|
return [value, setValue];
|
|
135167
135167
|
}
|
|
135168
|
-
function useUncontrolledState$
|
|
135168
|
+
function useUncontrolledState$3({
|
|
135169
135169
|
defaultProp,
|
|
135170
135170
|
onChange
|
|
135171
135171
|
}) {
|
|
135172
135172
|
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
135173
135173
|
const [value] = uncontrolledState;
|
|
135174
135174
|
const prevValueRef = React__namespace.useRef(value);
|
|
135175
|
-
const handleChange = useCallbackRef$
|
|
135175
|
+
const handleChange = useCallbackRef$4(onChange);
|
|
135176
135176
|
React__namespace.useEffect(() => {
|
|
135177
135177
|
if (prevValueRef.current !== value) {
|
|
135178
135178
|
handleChange(value);
|
|
@@ -135183,7 +135183,7 @@ function useUncontrolledState$2({
|
|
|
135183
135183
|
}
|
|
135184
135184
|
|
|
135185
135185
|
// packages/react/primitive/src/Primitive.tsx
|
|
135186
|
-
var NODES$
|
|
135186
|
+
var NODES$4 = [
|
|
135187
135187
|
"a",
|
|
135188
135188
|
"button",
|
|
135189
135189
|
"div",
|
|
@@ -135201,7 +135201,7 @@ var NODES$3 = [
|
|
|
135201
135201
|
"svg",
|
|
135202
135202
|
"ul"
|
|
135203
135203
|
];
|
|
135204
|
-
var Primitive$
|
|
135204
|
+
var Primitive$4 = NODES$4.reduce((primitive, node) => {
|
|
135205
135205
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
135206
135206
|
const { asChild, ...primitiveProps } = props;
|
|
135207
135207
|
const Comp = asChild ? Slot : node;
|
|
@@ -135215,7 +135215,7 @@ var Primitive$3 = NODES$3.reduce((primitive, node) => {
|
|
|
135215
135215
|
}, {});
|
|
135216
135216
|
|
|
135217
135217
|
// packages/core/primitive/src/primitive.tsx
|
|
135218
|
-
function composeEventHandlers$
|
|
135218
|
+
function composeEventHandlers$2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
135219
135219
|
return function handleEvent(event) {
|
|
135220
135220
|
originalEventHandler?.(event);
|
|
135221
135221
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -135225,7 +135225,7 @@ function composeEventHandlers$1(originalEventHandler, ourEventHandler, { checkFo
|
|
|
135225
135225
|
}
|
|
135226
135226
|
|
|
135227
135227
|
// packages/react/context/src/createContext.tsx
|
|
135228
|
-
function createContextScope$
|
|
135228
|
+
function createContextScope$8(scopeName, createContextScopeDeps = []) {
|
|
135229
135229
|
let defaultContexts = [];
|
|
135230
135230
|
function createContext3(rootComponentName, defaultContext) {
|
|
135231
135231
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -135260,9 +135260,9 @@ function createContextScope$5(scopeName, createContextScopeDeps = []) {
|
|
|
135260
135260
|
};
|
|
135261
135261
|
};
|
|
135262
135262
|
createScope.scopeName = scopeName;
|
|
135263
|
-
return [createContext3, composeContextScopes$
|
|
135263
|
+
return [createContext3, composeContextScopes$8(createScope, ...createContextScopeDeps)];
|
|
135264
135264
|
}
|
|
135265
|
-
function composeContextScopes$
|
|
135265
|
+
function composeContextScopes$8(...scopes) {
|
|
135266
135266
|
const baseScope = scopes[0];
|
|
135267
135267
|
if (scopes.length === 1) return baseScope;
|
|
135268
135268
|
const createScope = () => {
|
|
@@ -135284,23 +135284,23 @@ function composeContextScopes$5(...scopes) {
|
|
|
135284
135284
|
}
|
|
135285
135285
|
|
|
135286
135286
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
135287
|
-
function setRef$
|
|
135287
|
+
function setRef$2(ref, value) {
|
|
135288
135288
|
if (typeof ref === "function") {
|
|
135289
135289
|
ref(value);
|
|
135290
135290
|
} else if (ref !== null && ref !== void 0) {
|
|
135291
135291
|
ref.current = value;
|
|
135292
135292
|
}
|
|
135293
135293
|
}
|
|
135294
|
-
function composeRefs$
|
|
135295
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
135294
|
+
function composeRefs$2(...refs) {
|
|
135295
|
+
return (node) => refs.forEach((ref) => setRef$2(ref, node));
|
|
135296
135296
|
}
|
|
135297
|
-
function useComposedRefs$
|
|
135298
|
-
return React__namespace.useCallback(composeRefs$
|
|
135297
|
+
function useComposedRefs$2(...refs) {
|
|
135298
|
+
return React__namespace.useCallback(composeRefs$2(...refs), refs);
|
|
135299
135299
|
}
|
|
135300
135300
|
|
|
135301
|
-
function createCollection(name) {
|
|
135301
|
+
function createCollection$1(name) {
|
|
135302
135302
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
135303
|
-
const [createCollectionContext, createCollectionScope] = createContextScope$
|
|
135303
|
+
const [createCollectionContext, createCollectionScope] = createContextScope$8(PROVIDER_NAME);
|
|
135304
135304
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
135305
135305
|
PROVIDER_NAME,
|
|
135306
135306
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
@@ -135317,7 +135317,7 @@ function createCollection(name) {
|
|
|
135317
135317
|
(props, forwardedRef) => {
|
|
135318
135318
|
const { scope, children } = props;
|
|
135319
135319
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
135320
|
-
const composedRefs = useComposedRefs$
|
|
135320
|
+
const composedRefs = useComposedRefs$2(forwardedRef, context.collectionRef);
|
|
135321
135321
|
return /* @__PURE__ */ jsxRuntime.jsx(Slot, { ref: composedRefs, children });
|
|
135322
135322
|
}
|
|
135323
135323
|
);
|
|
@@ -135328,7 +135328,7 @@ function createCollection(name) {
|
|
|
135328
135328
|
(props, forwardedRef) => {
|
|
135329
135329
|
const { scope, children, ...itemData } = props;
|
|
135330
135330
|
const ref = React.useRef(null);
|
|
135331
|
-
const composedRefs = useComposedRefs$
|
|
135331
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
135332
135332
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
135333
135333
|
React.useEffect(() => {
|
|
135334
135334
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
@@ -135360,7 +135360,7 @@ function createCollection(name) {
|
|
|
135360
135360
|
}
|
|
135361
135361
|
|
|
135362
135362
|
// packages/react/context/src/createContext.tsx
|
|
135363
|
-
function createContextScope$
|
|
135363
|
+
function createContextScope$7(scopeName, createContextScopeDeps = []) {
|
|
135364
135364
|
let defaultContexts = [];
|
|
135365
135365
|
function createContext3(rootComponentName, defaultContext) {
|
|
135366
135366
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -135395,9 +135395,9 @@ function createContextScope$4(scopeName, createContextScopeDeps = []) {
|
|
|
135395
135395
|
};
|
|
135396
135396
|
};
|
|
135397
135397
|
createScope.scopeName = scopeName;
|
|
135398
|
-
return [createContext3, composeContextScopes$
|
|
135398
|
+
return [createContext3, composeContextScopes$7(createScope, ...createContextScopeDeps)];
|
|
135399
135399
|
}
|
|
135400
|
-
function composeContextScopes$
|
|
135400
|
+
function composeContextScopes$7(...scopes) {
|
|
135401
135401
|
const baseScope = scopes[0];
|
|
135402
135402
|
if (scopes.length === 1) return baseScope;
|
|
135403
135403
|
const createScope = () => {
|
|
@@ -135419,14 +135419,14 @@ function composeContextScopes$4(...scopes) {
|
|
|
135419
135419
|
}
|
|
135420
135420
|
|
|
135421
135421
|
// packages/react/direction/src/Direction.tsx
|
|
135422
|
-
var DirectionContext = React__namespace.createContext(void 0);
|
|
135423
|
-
function useDirection(localDir) {
|
|
135424
|
-
const globalDir = React__namespace.useContext(DirectionContext);
|
|
135422
|
+
var DirectionContext$1 = React__namespace.createContext(void 0);
|
|
135423
|
+
function useDirection$1(localDir) {
|
|
135424
|
+
const globalDir = React__namespace.useContext(DirectionContext$1);
|
|
135425
135425
|
return localDir || globalDir || "ltr";
|
|
135426
135426
|
}
|
|
135427
135427
|
|
|
135428
135428
|
// packages/react/primitive/src/Primitive.tsx
|
|
135429
|
-
var NODES$
|
|
135429
|
+
var NODES$3 = [
|
|
135430
135430
|
"a",
|
|
135431
135431
|
"button",
|
|
135432
135432
|
"div",
|
|
@@ -135444,7 +135444,7 @@ var NODES$2 = [
|
|
|
135444
135444
|
"svg",
|
|
135445
135445
|
"ul"
|
|
135446
135446
|
];
|
|
135447
|
-
var Primitive$
|
|
135447
|
+
var Primitive$3 = NODES$3.reduce((primitive, node) => {
|
|
135448
135448
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
135449
135449
|
const { asChild, ...primitiveProps } = props;
|
|
135450
135450
|
const Comp = asChild ? Slot : node;
|
|
@@ -135461,7 +135461,7 @@ function dispatchDiscreteCustomEvent$1(target, event) {
|
|
|
135461
135461
|
}
|
|
135462
135462
|
|
|
135463
135463
|
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
135464
|
-
function useCallbackRef$
|
|
135464
|
+
function useCallbackRef$3(callback) {
|
|
135465
135465
|
const callbackRef = React__namespace.useRef(callback);
|
|
135466
135466
|
React__namespace.useEffect(() => {
|
|
135467
135467
|
callbackRef.current = callback;
|
|
@@ -135471,7 +135471,7 @@ function useCallbackRef$2(callback) {
|
|
|
135471
135471
|
|
|
135472
135472
|
// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx
|
|
135473
135473
|
function useEscapeKeydown$1(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
135474
|
-
const onEscapeKeyDown = useCallbackRef$
|
|
135474
|
+
const onEscapeKeyDown = useCallbackRef$3(onEscapeKeyDownProp);
|
|
135475
135475
|
React__namespace.useEffect(() => {
|
|
135476
135476
|
const handleKeyDown = (event) => {
|
|
135477
135477
|
if (event.key === "Escape") {
|
|
@@ -135508,7 +135508,7 @@ var DismissableLayer$1 = React__namespace.forwardRef(
|
|
|
135508
135508
|
const [node, setNode] = React__namespace.useState(null);
|
|
135509
135509
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
135510
135510
|
const [, force] = React__namespace.useState({});
|
|
135511
|
-
const composedRefs = useComposedRefs$
|
|
135511
|
+
const composedRefs = useComposedRefs$2(forwardedRef, (node2) => setNode(node2));
|
|
135512
135512
|
const layers = Array.from(context.layers);
|
|
135513
135513
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
135514
135514
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
@@ -135571,7 +135571,7 @@ var DismissableLayer$1 = React__namespace.forwardRef(
|
|
|
135571
135571
|
return () => document.removeEventListener(CONTEXT_UPDATE$1, handleUpdate);
|
|
135572
135572
|
}, []);
|
|
135573
135573
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
135574
|
-
Primitive$
|
|
135574
|
+
Primitive$3.div,
|
|
135575
135575
|
{
|
|
135576
135576
|
...layerProps,
|
|
135577
135577
|
ref: composedRefs,
|
|
@@ -135579,9 +135579,9 @@ var DismissableLayer$1 = React__namespace.forwardRef(
|
|
|
135579
135579
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
135580
135580
|
...props.style
|
|
135581
135581
|
},
|
|
135582
|
-
onFocusCapture: composeEventHandlers$
|
|
135583
|
-
onBlurCapture: composeEventHandlers$
|
|
135584
|
-
onPointerDownCapture: composeEventHandlers$
|
|
135582
|
+
onFocusCapture: composeEventHandlers$2(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
135583
|
+
onBlurCapture: composeEventHandlers$2(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
135584
|
+
onPointerDownCapture: composeEventHandlers$2(
|
|
135585
135585
|
props.onPointerDownCapture,
|
|
135586
135586
|
pointerDownOutside.onPointerDownCapture
|
|
135587
135587
|
)
|
|
@@ -135594,7 +135594,7 @@ var BRANCH_NAME$1 = "DismissableLayerBranch";
|
|
|
135594
135594
|
var DismissableLayerBranch$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
135595
135595
|
const context = React__namespace.useContext(DismissableLayerContext$1);
|
|
135596
135596
|
const ref = React__namespace.useRef(null);
|
|
135597
|
-
const composedRefs = useComposedRefs$
|
|
135597
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
135598
135598
|
React__namespace.useEffect(() => {
|
|
135599
135599
|
const node = ref.current;
|
|
135600
135600
|
if (node) {
|
|
@@ -135604,11 +135604,11 @@ var DismissableLayerBranch$1 = React__namespace.forwardRef((props, forwardedRef)
|
|
|
135604
135604
|
};
|
|
135605
135605
|
}
|
|
135606
135606
|
}, [context.branches]);
|
|
135607
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
135607
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { ...props, ref: composedRefs });
|
|
135608
135608
|
});
|
|
135609
135609
|
DismissableLayerBranch$1.displayName = BRANCH_NAME$1;
|
|
135610
135610
|
function usePointerDownOutside$1(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
135611
|
-
const handlePointerDownOutside = useCallbackRef$
|
|
135611
|
+
const handlePointerDownOutside = useCallbackRef$3(onPointerDownOutside);
|
|
135612
135612
|
const isPointerInsideReactTreeRef = React__namespace.useRef(false);
|
|
135613
135613
|
const handleClickRef = React__namespace.useRef(() => {
|
|
135614
135614
|
});
|
|
@@ -135651,7 +135651,7 @@ function usePointerDownOutside$1(onPointerDownOutside, ownerDocument = globalThi
|
|
|
135651
135651
|
};
|
|
135652
135652
|
}
|
|
135653
135653
|
function useFocusOutside$1(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
135654
|
-
const handleFocusOutside = useCallbackRef$
|
|
135654
|
+
const handleFocusOutside = useCallbackRef$3(onFocusOutside);
|
|
135655
135655
|
const isFocusInsideReactTreeRef = React__namespace.useRef(false);
|
|
135656
135656
|
React__namespace.useEffect(() => {
|
|
135657
135657
|
const handleFocus = (event) => {
|
|
@@ -135685,18 +135685,18 @@ function handleAndDispatchCustomEvent$1(name, handler, detail, { discrete }) {
|
|
|
135685
135685
|
}
|
|
135686
135686
|
}
|
|
135687
135687
|
|
|
135688
|
-
var count$
|
|
135688
|
+
var count$5 = 0;
|
|
135689
135689
|
function useFocusGuards$1() {
|
|
135690
135690
|
React__namespace.useEffect(() => {
|
|
135691
135691
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
135692
135692
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard$1());
|
|
135693
135693
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard$1());
|
|
135694
|
-
count$
|
|
135694
|
+
count$5++;
|
|
135695
135695
|
return () => {
|
|
135696
|
-
if (count$
|
|
135696
|
+
if (count$5 === 1) {
|
|
135697
135697
|
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
135698
135698
|
}
|
|
135699
|
-
count$
|
|
135699
|
+
count$5--;
|
|
135700
135700
|
};
|
|
135701
135701
|
}, []);
|
|
135702
135702
|
}
|
|
@@ -135713,7 +135713,7 @@ function createFocusGuard$1() {
|
|
|
135713
135713
|
|
|
135714
135714
|
var AUTOFOCUS_ON_MOUNT$1 = "focusScope.autoFocusOnMount";
|
|
135715
135715
|
var AUTOFOCUS_ON_UNMOUNT$1 = "focusScope.autoFocusOnUnmount";
|
|
135716
|
-
var EVENT_OPTIONS$
|
|
135716
|
+
var EVENT_OPTIONS$3 = { bubbles: false, cancelable: true };
|
|
135717
135717
|
var FOCUS_SCOPE_NAME$1 = "FocusScope";
|
|
135718
135718
|
var FocusScope$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
135719
135719
|
const {
|
|
@@ -135724,10 +135724,10 @@ var FocusScope$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
135724
135724
|
...scopeProps
|
|
135725
135725
|
} = props;
|
|
135726
135726
|
const [container, setContainer] = React__namespace.useState(null);
|
|
135727
|
-
const onMountAutoFocus = useCallbackRef$
|
|
135728
|
-
const onUnmountAutoFocus = useCallbackRef$
|
|
135727
|
+
const onMountAutoFocus = useCallbackRef$3(onMountAutoFocusProp);
|
|
135728
|
+
const onUnmountAutoFocus = useCallbackRef$3(onUnmountAutoFocusProp);
|
|
135729
135729
|
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
135730
|
-
const composedRefs = useComposedRefs$
|
|
135730
|
+
const composedRefs = useComposedRefs$2(forwardedRef, (node) => setContainer(node));
|
|
135731
135731
|
const focusScope = React__namespace.useRef({
|
|
135732
135732
|
paused: false,
|
|
135733
135733
|
pause() {
|
|
@@ -135778,11 +135778,11 @@ var FocusScope$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
135778
135778
|
const previouslyFocusedElement = document.activeElement;
|
|
135779
135779
|
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
135780
135780
|
if (!hasFocusedCandidate) {
|
|
135781
|
-
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT$1, EVENT_OPTIONS$
|
|
135781
|
+
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT$1, EVENT_OPTIONS$3);
|
|
135782
135782
|
container.addEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
135783
135783
|
container.dispatchEvent(mountEvent);
|
|
135784
135784
|
if (!mountEvent.defaultPrevented) {
|
|
135785
|
-
focusFirst$
|
|
135785
|
+
focusFirst$4(removeLinks$1(getTabbableCandidates$1(container)), { select: true });
|
|
135786
135786
|
if (document.activeElement === previouslyFocusedElement) {
|
|
135787
135787
|
focus$1(container);
|
|
135788
135788
|
}
|
|
@@ -135791,7 +135791,7 @@ var FocusScope$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
135791
135791
|
return () => {
|
|
135792
135792
|
container.removeEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
135793
135793
|
setTimeout(() => {
|
|
135794
|
-
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT$1, EVENT_OPTIONS$
|
|
135794
|
+
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT$1, EVENT_OPTIONS$3);
|
|
135795
135795
|
container.addEventListener(AUTOFOCUS_ON_UNMOUNT$1, onUnmountAutoFocus);
|
|
135796
135796
|
container.dispatchEvent(unmountEvent);
|
|
135797
135797
|
if (!unmountEvent.defaultPrevented) {
|
|
@@ -135828,10 +135828,10 @@ var FocusScope$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
135828
135828
|
},
|
|
135829
135829
|
[loop, trapped, focusScope.paused]
|
|
135830
135830
|
);
|
|
135831
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
135831
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
135832
135832
|
});
|
|
135833
135833
|
FocusScope$1.displayName = FOCUS_SCOPE_NAME$1;
|
|
135834
|
-
function focusFirst$
|
|
135834
|
+
function focusFirst$4(candidates, { select = false } = {}) {
|
|
135835
135835
|
const previouslyFocusedElement = document.activeElement;
|
|
135836
135836
|
for (const candidate of candidates) {
|
|
135837
135837
|
focus$1(candidate, { select });
|
|
@@ -135912,16 +135912,16 @@ function removeLinks$1(items) {
|
|
|
135912
135912
|
}
|
|
135913
135913
|
|
|
135914
135914
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
135915
|
-
var useLayoutEffect2$
|
|
135915
|
+
var useLayoutEffect2$3 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
135916
135916
|
};
|
|
135917
135917
|
|
|
135918
135918
|
// packages/react/id/src/id.tsx
|
|
135919
|
-
var useReactId$
|
|
135920
|
-
var count$
|
|
135921
|
-
function useId$
|
|
135922
|
-
const [id, setId] = React__namespace.useState(useReactId$
|
|
135923
|
-
useLayoutEffect2$
|
|
135924
|
-
if (!deterministicId) setId((reactId) => reactId ?? String(count$
|
|
135919
|
+
var useReactId$3 = React__namespace["useId".toString()] || (() => void 0);
|
|
135920
|
+
var count$4 = 0;
|
|
135921
|
+
function useId$3(deterministicId) {
|
|
135922
|
+
const [id, setId] = React__namespace.useState(useReactId$3());
|
|
135923
|
+
useLayoutEffect2$3(() => {
|
|
135924
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count$4++));
|
|
135925
135925
|
}, [deterministicId]);
|
|
135926
135926
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
135927
135927
|
}
|
|
@@ -135931,7 +135931,7 @@ var NAME$2 = "Arrow";
|
|
|
135931
135931
|
var Arrow$3 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
135932
135932
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
135933
135933
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
135934
|
-
Primitive$
|
|
135934
|
+
Primitive$3.svg,
|
|
135935
135935
|
{
|
|
135936
135936
|
...arrowProps,
|
|
135937
135937
|
ref: forwardedRef,
|
|
@@ -135944,10 +135944,10 @@ var Arrow$3 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
135944
135944
|
);
|
|
135945
135945
|
});
|
|
135946
135946
|
Arrow$3.displayName = NAME$2;
|
|
135947
|
-
var Root$
|
|
135947
|
+
var Root$4 = Arrow$3;
|
|
135948
135948
|
|
|
135949
135949
|
// packages/react/context/src/createContext.tsx
|
|
135950
|
-
function createContextScope$
|
|
135950
|
+
function createContextScope$6(scopeName, createContextScopeDeps = []) {
|
|
135951
135951
|
let defaultContexts = [];
|
|
135952
135952
|
function createContext3(rootComponentName, defaultContext) {
|
|
135953
135953
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -135982,9 +135982,9 @@ function createContextScope$3(scopeName, createContextScopeDeps = []) {
|
|
|
135982
135982
|
};
|
|
135983
135983
|
};
|
|
135984
135984
|
createScope.scopeName = scopeName;
|
|
135985
|
-
return [createContext3, composeContextScopes$
|
|
135985
|
+
return [createContext3, composeContextScopes$6(createScope, ...createContextScopeDeps)];
|
|
135986
135986
|
}
|
|
135987
|
-
function composeContextScopes$
|
|
135987
|
+
function composeContextScopes$6(...scopes) {
|
|
135988
135988
|
const baseScope = scopes[0];
|
|
135989
135989
|
if (scopes.length === 1) return baseScope;
|
|
135990
135990
|
const createScope = () => {
|
|
@@ -136006,9 +136006,9 @@ function composeContextScopes$3(...scopes) {
|
|
|
136006
136006
|
}
|
|
136007
136007
|
|
|
136008
136008
|
// packages/react/use-size/src/useSize.tsx
|
|
136009
|
-
function useSize$
|
|
136009
|
+
function useSize$2(element) {
|
|
136010
136010
|
const [size, setSize] = React__namespace.useState(void 0);
|
|
136011
|
-
useLayoutEffect2$
|
|
136011
|
+
useLayoutEffect2$3(() => {
|
|
136012
136012
|
if (element) {
|
|
136013
136013
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
136014
136014
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -136042,7 +136042,7 @@ function useSize$1(element) {
|
|
|
136042
136042
|
}
|
|
136043
136043
|
|
|
136044
136044
|
var POPPER_NAME$1 = "Popper";
|
|
136045
|
-
var [createPopperContext$1, createPopperScope$1] = createContextScope$
|
|
136045
|
+
var [createPopperContext$1, createPopperScope$1] = createContextScope$6(POPPER_NAME$1);
|
|
136046
136046
|
var [PopperProvider$1, usePopperContext$1] = createPopperContext$1(POPPER_NAME$1);
|
|
136047
136047
|
var Popper$1 = (props) => {
|
|
136048
136048
|
const { __scopePopper, children } = props;
|
|
@@ -136056,11 +136056,11 @@ var PopperAnchor$1 = React__namespace.forwardRef(
|
|
|
136056
136056
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
136057
136057
|
const context = usePopperContext$1(ANCHOR_NAME$3, __scopePopper);
|
|
136058
136058
|
const ref = React__namespace.useRef(null);
|
|
136059
|
-
const composedRefs = useComposedRefs$
|
|
136059
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
136060
136060
|
React__namespace.useEffect(() => {
|
|
136061
136061
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
136062
136062
|
});
|
|
136063
|
-
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
136063
|
+
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { ...anchorProps, ref: composedRefs });
|
|
136064
136064
|
}
|
|
136065
136065
|
);
|
|
136066
136066
|
PopperAnchor$1.displayName = ANCHOR_NAME$3;
|
|
@@ -136086,9 +136086,9 @@ var PopperContent$1 = React__namespace.forwardRef(
|
|
|
136086
136086
|
} = props;
|
|
136087
136087
|
const context = usePopperContext$1(CONTENT_NAME$4, __scopePopper);
|
|
136088
136088
|
const [content, setContent] = React__namespace.useState(null);
|
|
136089
|
-
const composedRefs = useComposedRefs$
|
|
136089
|
+
const composedRefs = useComposedRefs$2(forwardedRef, (node) => setContent(node));
|
|
136090
136090
|
const [arrow$1, setArrow] = React__namespace.useState(null);
|
|
136091
|
-
const arrowSize = useSize$
|
|
136091
|
+
const arrowSize = useSize$2(arrow$1);
|
|
136092
136092
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
136093
136093
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
136094
136094
|
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
|
@@ -136140,8 +136140,8 @@ var PopperContent$1 = React__namespace.forwardRef(
|
|
|
136140
136140
|
]
|
|
136141
136141
|
});
|
|
136142
136142
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement$1(placement);
|
|
136143
|
-
const handlePlaced = useCallbackRef$
|
|
136144
|
-
useLayoutEffect2$
|
|
136143
|
+
const handlePlaced = useCallbackRef$3(onPlaced);
|
|
136144
|
+
useLayoutEffect2$3(() => {
|
|
136145
136145
|
if (isPositioned) {
|
|
136146
136146
|
handlePlaced?.();
|
|
136147
136147
|
}
|
|
@@ -136150,7 +136150,7 @@ var PopperContent$1 = React__namespace.forwardRef(
|
|
|
136150
136150
|
const arrowY = middlewareData.arrow?.y;
|
|
136151
136151
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
136152
136152
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
136153
|
-
useLayoutEffect2$
|
|
136153
|
+
useLayoutEffect2$3(() => {
|
|
136154
136154
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
136155
136155
|
}, [content]);
|
|
136156
136156
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -136187,7 +136187,7 @@ var PopperContent$1 = React__namespace.forwardRef(
|
|
|
136187
136187
|
arrowY,
|
|
136188
136188
|
shouldHideArrow: cannotCenterArrow,
|
|
136189
136189
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
136190
|
-
Primitive$
|
|
136190
|
+
Primitive$3.div,
|
|
136191
136191
|
{
|
|
136192
136192
|
"data-side": placedSide,
|
|
136193
136193
|
"data-align": placedAlign,
|
|
@@ -136247,7 +136247,7 @@ var PopperArrow$1 = React__namespace.forwardRef(function PopperArrow2(props, for
|
|
|
136247
136247
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
136248
136248
|
},
|
|
136249
136249
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
136250
|
-
Root$
|
|
136250
|
+
Root$4,
|
|
136251
136251
|
{
|
|
136252
136252
|
...arrowProps,
|
|
136253
136253
|
ref: forwardedRef,
|
|
@@ -136301,7 +136301,7 @@ function getSideAndAlignFromPlacement$1(placement) {
|
|
|
136301
136301
|
const [side, align = "center"] = placement.split("-");
|
|
136302
136302
|
return [side, align];
|
|
136303
136303
|
}
|
|
136304
|
-
var Root2$
|
|
136304
|
+
var Root2$4 = Popper$1;
|
|
136305
136305
|
var Anchor$1 = PopperAnchor$1;
|
|
136306
136306
|
var Content$1 = PopperContent$1;
|
|
136307
136307
|
var Arrow$2 = PopperArrow$1;
|
|
@@ -136310,14 +136310,14 @@ var PORTAL_NAME$4 = "Portal";
|
|
|
136310
136310
|
var Portal$3 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
136311
136311
|
const { container: containerProp, ...portalProps } = props;
|
|
136312
136312
|
const [mounted, setMounted] = React__namespace.useState(false);
|
|
136313
|
-
useLayoutEffect2$
|
|
136313
|
+
useLayoutEffect2$3(() => setMounted(true), []);
|
|
136314
136314
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
136315
|
-
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
136315
|
+
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
136316
136316
|
});
|
|
136317
136317
|
Portal$3.displayName = PORTAL_NAME$4;
|
|
136318
136318
|
|
|
136319
136319
|
// packages/react/context/src/createContext.tsx
|
|
136320
|
-
function createContextScope$
|
|
136320
|
+
function createContextScope$5(scopeName, createContextScopeDeps = []) {
|
|
136321
136321
|
let defaultContexts = [];
|
|
136322
136322
|
function createContext3(rootComponentName, defaultContext) {
|
|
136323
136323
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -136352,9 +136352,9 @@ function createContextScope$2(scopeName, createContextScopeDeps = []) {
|
|
|
136352
136352
|
};
|
|
136353
136353
|
};
|
|
136354
136354
|
createScope.scopeName = scopeName;
|
|
136355
|
-
return [createContext3, composeContextScopes$
|
|
136355
|
+
return [createContext3, composeContextScopes$5(createScope, ...createContextScopeDeps)];
|
|
136356
136356
|
}
|
|
136357
|
-
function composeContextScopes$
|
|
136357
|
+
function composeContextScopes$5(...scopes) {
|
|
136358
136358
|
const baseScope = scopes[0];
|
|
136359
136359
|
if (scopes.length === 1) return baseScope;
|
|
136360
136360
|
const createScope = () => {
|
|
@@ -136376,16 +136376,16 @@ function composeContextScopes$2(...scopes) {
|
|
|
136376
136376
|
}
|
|
136377
136377
|
|
|
136378
136378
|
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
136379
|
-
function useControllableState$
|
|
136379
|
+
function useControllableState$2({
|
|
136380
136380
|
prop,
|
|
136381
136381
|
defaultProp,
|
|
136382
136382
|
onChange = () => {
|
|
136383
136383
|
}
|
|
136384
136384
|
}) {
|
|
136385
|
-
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$
|
|
136385
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$2({ defaultProp, onChange });
|
|
136386
136386
|
const isControlled = prop !== void 0;
|
|
136387
136387
|
const value = isControlled ? prop : uncontrolledProp;
|
|
136388
|
-
const handleChange = useCallbackRef$
|
|
136388
|
+
const handleChange = useCallbackRef$3(onChange);
|
|
136389
136389
|
const setValue = React__namespace.useCallback(
|
|
136390
136390
|
(nextValue) => {
|
|
136391
136391
|
if (isControlled) {
|
|
@@ -136400,14 +136400,14 @@ function useControllableState$1({
|
|
|
136400
136400
|
);
|
|
136401
136401
|
return [value, setValue];
|
|
136402
136402
|
}
|
|
136403
|
-
function useUncontrolledState$
|
|
136403
|
+
function useUncontrolledState$2({
|
|
136404
136404
|
defaultProp,
|
|
136405
136405
|
onChange
|
|
136406
136406
|
}) {
|
|
136407
136407
|
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
136408
136408
|
const [value] = uncontrolledState;
|
|
136409
136409
|
const prevValueRef = React__namespace.useRef(value);
|
|
136410
|
-
const handleChange = useCallbackRef$
|
|
136410
|
+
const handleChange = useCallbackRef$3(onChange);
|
|
136411
136411
|
React__namespace.useEffect(() => {
|
|
136412
136412
|
if (prevValueRef.current !== value) {
|
|
136413
136413
|
handleChange(value);
|
|
@@ -136417,22 +136417,22 @@ function useUncontrolledState$1({
|
|
|
136417
136417
|
return uncontrolledState;
|
|
136418
136418
|
}
|
|
136419
136419
|
|
|
136420
|
-
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
136421
|
-
var EVENT_OPTIONS$
|
|
136422
|
-
var GROUP_NAME$
|
|
136423
|
-
var [Collection$
|
|
136424
|
-
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope$
|
|
136425
|
-
GROUP_NAME$
|
|
136426
|
-
[createCollectionScope$
|
|
136420
|
+
var ENTRY_FOCUS$1 = "rovingFocusGroup.onEntryFocus";
|
|
136421
|
+
var EVENT_OPTIONS$2 = { bubbles: false, cancelable: true };
|
|
136422
|
+
var GROUP_NAME$3 = "RovingFocusGroup";
|
|
136423
|
+
var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection$1(GROUP_NAME$3);
|
|
136424
|
+
var [createRovingFocusGroupContext$1, createRovingFocusGroupScope$1] = createContextScope$5(
|
|
136425
|
+
GROUP_NAME$3,
|
|
136426
|
+
[createCollectionScope$2]
|
|
136427
136427
|
);
|
|
136428
|
-
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME$
|
|
136429
|
-
var RovingFocusGroup = React__namespace.forwardRef(
|
|
136428
|
+
var [RovingFocusProvider$1, useRovingFocusContext$1] = createRovingFocusGroupContext$1(GROUP_NAME$3);
|
|
136429
|
+
var RovingFocusGroup$1 = React__namespace.forwardRef(
|
|
136430
136430
|
(props, forwardedRef) => {
|
|
136431
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Collection$
|
|
136431
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Collection$2.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntime.jsx(Collection$2.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntime.jsx(RovingFocusGroupImpl$1, { ...props, ref: forwardedRef }) }) });
|
|
136432
136432
|
}
|
|
136433
136433
|
);
|
|
136434
|
-
RovingFocusGroup.displayName = GROUP_NAME$
|
|
136435
|
-
var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) => {
|
|
136434
|
+
RovingFocusGroup$1.displayName = GROUP_NAME$3;
|
|
136435
|
+
var RovingFocusGroupImpl$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
136436
136436
|
const {
|
|
136437
136437
|
__scopeRovingFocusGroup,
|
|
136438
136438
|
orientation,
|
|
@@ -136446,27 +136446,27 @@ var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) =>
|
|
|
136446
136446
|
...groupProps
|
|
136447
136447
|
} = props;
|
|
136448
136448
|
const ref = React__namespace.useRef(null);
|
|
136449
|
-
const composedRefs = useComposedRefs$
|
|
136450
|
-
const direction = useDirection(dir);
|
|
136451
|
-
const [currentTabStopId = null, setCurrentTabStopId] = useControllableState$
|
|
136449
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
136450
|
+
const direction = useDirection$1(dir);
|
|
136451
|
+
const [currentTabStopId = null, setCurrentTabStopId] = useControllableState$2({
|
|
136452
136452
|
prop: currentTabStopIdProp,
|
|
136453
136453
|
defaultProp: defaultCurrentTabStopId,
|
|
136454
136454
|
onChange: onCurrentTabStopIdChange
|
|
136455
136455
|
});
|
|
136456
136456
|
const [isTabbingBackOut, setIsTabbingBackOut] = React__namespace.useState(false);
|
|
136457
|
-
const handleEntryFocus = useCallbackRef$
|
|
136458
|
-
const getItems = useCollection$
|
|
136457
|
+
const handleEntryFocus = useCallbackRef$3(onEntryFocus);
|
|
136458
|
+
const getItems = useCollection$2(__scopeRovingFocusGroup);
|
|
136459
136459
|
const isClickFocusRef = React__namespace.useRef(false);
|
|
136460
136460
|
const [focusableItemsCount, setFocusableItemsCount] = React__namespace.useState(0);
|
|
136461
136461
|
React__namespace.useEffect(() => {
|
|
136462
136462
|
const node = ref.current;
|
|
136463
136463
|
if (node) {
|
|
136464
|
-
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
136465
|
-
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
136464
|
+
node.addEventListener(ENTRY_FOCUS$1, handleEntryFocus);
|
|
136465
|
+
return () => node.removeEventListener(ENTRY_FOCUS$1, handleEntryFocus);
|
|
136466
136466
|
}
|
|
136467
136467
|
}, [handleEntryFocus]);
|
|
136468
136468
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
136469
|
-
RovingFocusProvider,
|
|
136469
|
+
RovingFocusProvider$1,
|
|
136470
136470
|
{
|
|
136471
136471
|
scope: __scopeRovingFocusGroup,
|
|
136472
136472
|
orientation,
|
|
@@ -136487,20 +136487,20 @@ var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) =>
|
|
|
136487
136487
|
[]
|
|
136488
136488
|
),
|
|
136489
136489
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
136490
|
-
Primitive$
|
|
136490
|
+
Primitive$3.div,
|
|
136491
136491
|
{
|
|
136492
136492
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
136493
136493
|
"data-orientation": orientation,
|
|
136494
136494
|
...groupProps,
|
|
136495
136495
|
ref: composedRefs,
|
|
136496
136496
|
style: { outline: "none", ...props.style },
|
|
136497
|
-
onMouseDown: composeEventHandlers$
|
|
136497
|
+
onMouseDown: composeEventHandlers$2(props.onMouseDown, () => {
|
|
136498
136498
|
isClickFocusRef.current = true;
|
|
136499
136499
|
}),
|
|
136500
|
-
onFocus: composeEventHandlers$
|
|
136500
|
+
onFocus: composeEventHandlers$2(props.onFocus, (event) => {
|
|
136501
136501
|
const isKeyboardFocus = !isClickFocusRef.current;
|
|
136502
136502
|
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
136503
|
-
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS$
|
|
136503
|
+
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS$1, EVENT_OPTIONS$2);
|
|
136504
136504
|
event.currentTarget.dispatchEvent(entryFocusEvent);
|
|
136505
136505
|
if (!entryFocusEvent.defaultPrevented) {
|
|
136506
136506
|
const items = getItems().filter((item) => item.focusable);
|
|
@@ -136510,19 +136510,19 @@ var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) =>
|
|
|
136510
136510
|
Boolean
|
|
136511
136511
|
);
|
|
136512
136512
|
const candidateNodes = candidateItems.map((item) => item.ref.current);
|
|
136513
|
-
focusFirst$
|
|
136513
|
+
focusFirst$3(candidateNodes, preventScrollOnEntryFocus);
|
|
136514
136514
|
}
|
|
136515
136515
|
}
|
|
136516
136516
|
isClickFocusRef.current = false;
|
|
136517
136517
|
}),
|
|
136518
|
-
onBlur: composeEventHandlers$
|
|
136518
|
+
onBlur: composeEventHandlers$2(props.onBlur, () => setIsTabbingBackOut(false))
|
|
136519
136519
|
}
|
|
136520
136520
|
)
|
|
136521
136521
|
}
|
|
136522
136522
|
);
|
|
136523
136523
|
});
|
|
136524
|
-
var ITEM_NAME$
|
|
136525
|
-
var RovingFocusGroupItem = React__namespace.forwardRef(
|
|
136524
|
+
var ITEM_NAME$4 = "RovingFocusGroupItem";
|
|
136525
|
+
var RovingFocusGroupItem$1 = React__namespace.forwardRef(
|
|
136526
136526
|
(props, forwardedRef) => {
|
|
136527
136527
|
const {
|
|
136528
136528
|
__scopeRovingFocusGroup,
|
|
@@ -136531,11 +136531,11 @@ var RovingFocusGroupItem = React__namespace.forwardRef(
|
|
|
136531
136531
|
tabStopId,
|
|
136532
136532
|
...itemProps
|
|
136533
136533
|
} = props;
|
|
136534
|
-
const autoId = useId$
|
|
136534
|
+
const autoId = useId$3();
|
|
136535
136535
|
const id = tabStopId || autoId;
|
|
136536
|
-
const context = useRovingFocusContext(ITEM_NAME$
|
|
136536
|
+
const context = useRovingFocusContext$1(ITEM_NAME$4, __scopeRovingFocusGroup);
|
|
136537
136537
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
136538
|
-
const getItems = useCollection$
|
|
136538
|
+
const getItems = useCollection$2(__scopeRovingFocusGroup);
|
|
136539
136539
|
const { onFocusableItemAdd, onFocusableItemRemove } = context;
|
|
136540
136540
|
React__namespace.useEffect(() => {
|
|
136541
136541
|
if (focusable) {
|
|
@@ -136544,31 +136544,31 @@ var RovingFocusGroupItem = React__namespace.forwardRef(
|
|
|
136544
136544
|
}
|
|
136545
136545
|
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
136546
136546
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
136547
|
-
Collection$
|
|
136547
|
+
Collection$2.ItemSlot,
|
|
136548
136548
|
{
|
|
136549
136549
|
scope: __scopeRovingFocusGroup,
|
|
136550
136550
|
id,
|
|
136551
136551
|
focusable,
|
|
136552
136552
|
active,
|
|
136553
136553
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
136554
|
-
Primitive$
|
|
136554
|
+
Primitive$3.span,
|
|
136555
136555
|
{
|
|
136556
136556
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
136557
136557
|
"data-orientation": context.orientation,
|
|
136558
136558
|
...itemProps,
|
|
136559
136559
|
ref: forwardedRef,
|
|
136560
|
-
onMouseDown: composeEventHandlers$
|
|
136560
|
+
onMouseDown: composeEventHandlers$2(props.onMouseDown, (event) => {
|
|
136561
136561
|
if (!focusable) event.preventDefault();
|
|
136562
136562
|
else context.onItemFocus(id);
|
|
136563
136563
|
}),
|
|
136564
|
-
onFocus: composeEventHandlers$
|
|
136565
|
-
onKeyDown: composeEventHandlers$
|
|
136564
|
+
onFocus: composeEventHandlers$2(props.onFocus, () => context.onItemFocus(id)),
|
|
136565
|
+
onKeyDown: composeEventHandlers$2(props.onKeyDown, (event) => {
|
|
136566
136566
|
if (event.key === "Tab" && event.shiftKey) {
|
|
136567
136567
|
context.onItemShiftTab();
|
|
136568
136568
|
return;
|
|
136569
136569
|
}
|
|
136570
136570
|
if (event.target !== event.currentTarget) return;
|
|
136571
|
-
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
136571
|
+
const focusIntent = getFocusIntent$1(event, context.orientation, context.dir);
|
|
136572
136572
|
if (focusIntent !== void 0) {
|
|
136573
136573
|
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
|
|
136574
136574
|
event.preventDefault();
|
|
@@ -136578,9 +136578,9 @@ var RovingFocusGroupItem = React__namespace.forwardRef(
|
|
|
136578
136578
|
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
136579
136579
|
if (focusIntent === "prev") candidateNodes.reverse();
|
|
136580
136580
|
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
136581
|
-
candidateNodes = context.loop ? wrapArray$
|
|
136581
|
+
candidateNodes = context.loop ? wrapArray$2(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
136582
136582
|
}
|
|
136583
|
-
setTimeout(() => focusFirst$
|
|
136583
|
+
setTimeout(() => focusFirst$3(candidateNodes));
|
|
136584
136584
|
}
|
|
136585
136585
|
})
|
|
136586
136586
|
}
|
|
@@ -136589,8 +136589,8 @@ var RovingFocusGroupItem = React__namespace.forwardRef(
|
|
|
136589
136589
|
);
|
|
136590
136590
|
}
|
|
136591
136591
|
);
|
|
136592
|
-
RovingFocusGroupItem.displayName = ITEM_NAME$
|
|
136593
|
-
var MAP_KEY_TO_FOCUS_INTENT = {
|
|
136592
|
+
RovingFocusGroupItem$1.displayName = ITEM_NAME$4;
|
|
136593
|
+
var MAP_KEY_TO_FOCUS_INTENT$1 = {
|
|
136594
136594
|
ArrowLeft: "prev",
|
|
136595
136595
|
ArrowUp: "prev",
|
|
136596
136596
|
ArrowRight: "next",
|
|
@@ -136600,17 +136600,17 @@ var MAP_KEY_TO_FOCUS_INTENT = {
|
|
|
136600
136600
|
PageDown: "last",
|
|
136601
136601
|
End: "last"
|
|
136602
136602
|
};
|
|
136603
|
-
function getDirectionAwareKey(key, dir) {
|
|
136603
|
+
function getDirectionAwareKey$1(key, dir) {
|
|
136604
136604
|
if (dir !== "rtl") return key;
|
|
136605
136605
|
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
136606
136606
|
}
|
|
136607
|
-
function getFocusIntent(event, orientation, dir) {
|
|
136608
|
-
const key = getDirectionAwareKey(event.key, dir);
|
|
136607
|
+
function getFocusIntent$1(event, orientation, dir) {
|
|
136608
|
+
const key = getDirectionAwareKey$1(event.key, dir);
|
|
136609
136609
|
if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
|
|
136610
136610
|
if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
|
|
136611
|
-
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
136611
|
+
return MAP_KEY_TO_FOCUS_INTENT$1[key];
|
|
136612
136612
|
}
|
|
136613
|
-
function focusFirst$
|
|
136613
|
+
function focusFirst$3(candidates, preventScroll = false) {
|
|
136614
136614
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
136615
136615
|
for (const candidate of candidates) {
|
|
136616
136616
|
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
@@ -136618,11 +136618,11 @@ function focusFirst$2(candidates, preventScroll = false) {
|
|
|
136618
136618
|
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
136619
136619
|
}
|
|
136620
136620
|
}
|
|
136621
|
-
function wrapArray$
|
|
136621
|
+
function wrapArray$2(array, startIndex) {
|
|
136622
136622
|
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
136623
136623
|
}
|
|
136624
|
-
var Root$
|
|
136625
|
-
var Item = RovingFocusGroupItem;
|
|
136624
|
+
var Root$3 = RovingFocusGroup$1;
|
|
136625
|
+
var Item$1 = RovingFocusGroupItem$1;
|
|
136626
136626
|
|
|
136627
136627
|
var getDefaultParent = function (originalTarget) {
|
|
136628
136628
|
if (typeof document === 'undefined') {
|
|
@@ -136800,7 +136800,7 @@ function assignRef(ref, value) {
|
|
|
136800
136800
|
* @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
|
|
136801
136801
|
* @returns {MutableRefObject}
|
|
136802
136802
|
*/
|
|
136803
|
-
function useCallbackRef$
|
|
136803
|
+
function useCallbackRef$2(initialValue, callback) {
|
|
136804
136804
|
var ref = React.useState(function () { return ({
|
|
136805
136805
|
// value
|
|
136806
136806
|
value: initialValue,
|
|
@@ -136840,7 +136840,7 @@ function useCallbackRef$1(initialValue, callback) {
|
|
|
136840
136840
|
* }
|
|
136841
136841
|
*/
|
|
136842
136842
|
function useMergeRefs(refs, defaultValue) {
|
|
136843
|
-
return useCallbackRef$
|
|
136843
|
+
return useCallbackRef$2(defaultValue || null, function (newValue) { return refs.forEach(function (ref) { return assignRef(ref, newValue); }); });
|
|
136844
136844
|
}
|
|
136845
136845
|
|
|
136846
136846
|
function ItoI(a) {
|
|
@@ -137442,14 +137442,14 @@ var SUB_CLOSE_KEYS = {
|
|
|
137442
137442
|
rtl: ["ArrowRight"]
|
|
137443
137443
|
};
|
|
137444
137444
|
var MENU_NAME = "Menu";
|
|
137445
|
-
var [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);
|
|
137446
|
-
var [createMenuContext, createMenuScope] = createContextScope$
|
|
137447
|
-
createCollectionScope,
|
|
137445
|
+
var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection$1(MENU_NAME);
|
|
137446
|
+
var [createMenuContext, createMenuScope] = createContextScope$7(MENU_NAME, [
|
|
137447
|
+
createCollectionScope$1,
|
|
137448
137448
|
createPopperScope$1,
|
|
137449
|
-
createRovingFocusGroupScope
|
|
137449
|
+
createRovingFocusGroupScope$1
|
|
137450
137450
|
]);
|
|
137451
137451
|
var usePopperScope$1 = createPopperScope$1();
|
|
137452
|
-
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
137452
|
+
var useRovingFocusGroupScope$1 = createRovingFocusGroupScope$1();
|
|
137453
137453
|
var [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);
|
|
137454
137454
|
var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);
|
|
137455
137455
|
var Menu = (props) => {
|
|
@@ -137457,8 +137457,8 @@ var Menu = (props) => {
|
|
|
137457
137457
|
const popperScope = usePopperScope$1(__scopeMenu);
|
|
137458
137458
|
const [content, setContent] = React__namespace.useState(null);
|
|
137459
137459
|
const isUsingKeyboardRef = React__namespace.useRef(false);
|
|
137460
|
-
const handleOpenChange = useCallbackRef$
|
|
137461
|
-
const direction = useDirection(dir);
|
|
137460
|
+
const handleOpenChange = useCallbackRef$3(onOpenChange);
|
|
137461
|
+
const direction = useDirection$1(dir);
|
|
137462
137462
|
React__namespace.useEffect(() => {
|
|
137463
137463
|
const handleKeyDown = () => {
|
|
137464
137464
|
isUsingKeyboardRef.current = true;
|
|
@@ -137473,7 +137473,7 @@ var Menu = (props) => {
|
|
|
137473
137473
|
document.removeEventListener("pointermove", handlePointer, { capture: true });
|
|
137474
137474
|
};
|
|
137475
137475
|
}, []);
|
|
137476
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Root2$
|
|
137476
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Root2$4, { ...popperScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
137477
137477
|
MenuProvider,
|
|
137478
137478
|
{
|
|
137479
137479
|
scope: __scopeMenu,
|
|
@@ -137523,14 +137523,14 @@ var MenuContent = React__namespace.forwardRef(
|
|
|
137523
137523
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
137524
137524
|
const context = useMenuContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
137525
137525
|
const rootContext = useMenuRootContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
137526
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsxRuntime.jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntime.jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });
|
|
137526
|
+
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: rootContext.modal ? /* @__PURE__ */ jsxRuntime.jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntime.jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });
|
|
137527
137527
|
}
|
|
137528
137528
|
);
|
|
137529
137529
|
var MenuRootContentModal = React__namespace.forwardRef(
|
|
137530
137530
|
(props, forwardedRef) => {
|
|
137531
137531
|
const context = useMenuContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
137532
137532
|
const ref = React__namespace.useRef(null);
|
|
137533
|
-
const composedRefs = useComposedRefs$
|
|
137533
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
137534
137534
|
React__namespace.useEffect(() => {
|
|
137535
137535
|
const content = ref.current;
|
|
137536
137536
|
if (content) return hideOthers(content);
|
|
@@ -137543,7 +137543,7 @@ var MenuRootContentModal = React__namespace.forwardRef(
|
|
|
137543
137543
|
trapFocus: context.open,
|
|
137544
137544
|
disableOutsidePointerEvents: context.open,
|
|
137545
137545
|
disableOutsideScroll: true,
|
|
137546
|
-
onFocusOutside: composeEventHandlers$
|
|
137546
|
+
onFocusOutside: composeEventHandlers$2(
|
|
137547
137547
|
props.onFocusOutside,
|
|
137548
137548
|
(event) => event.preventDefault(),
|
|
137549
137549
|
{ checkForDefaultPrevented: false }
|
|
@@ -137588,11 +137588,11 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137588
137588
|
const context = useMenuContext(CONTENT_NAME$3, __scopeMenu);
|
|
137589
137589
|
const rootContext = useMenuRootContext(CONTENT_NAME$3, __scopeMenu);
|
|
137590
137590
|
const popperScope = usePopperScope$1(__scopeMenu);
|
|
137591
|
-
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
|
|
137592
|
-
const getItems = useCollection(__scopeMenu);
|
|
137591
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope$1(__scopeMenu);
|
|
137592
|
+
const getItems = useCollection$1(__scopeMenu);
|
|
137593
137593
|
const [currentItemId, setCurrentItemId] = React__namespace.useState(null);
|
|
137594
137594
|
const contentRef = React__namespace.useRef(null);
|
|
137595
|
-
const composedRefs = useComposedRefs$
|
|
137595
|
+
const composedRefs = useComposedRefs$2(forwardedRef, contentRef, context.onContentChange);
|
|
137596
137596
|
const timerRef = React__namespace.useRef(0);
|
|
137597
137597
|
const searchRef = React__namespace.useRef("");
|
|
137598
137598
|
const pointerGraceTimerRef = React__namespace.useRef(0);
|
|
@@ -137660,7 +137660,7 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137660
137660
|
{
|
|
137661
137661
|
asChild: true,
|
|
137662
137662
|
trapped: trapFocus,
|
|
137663
|
-
onMountAutoFocus: composeEventHandlers$
|
|
137663
|
+
onMountAutoFocus: composeEventHandlers$2(onOpenAutoFocus, (event) => {
|
|
137664
137664
|
event.preventDefault();
|
|
137665
137665
|
contentRef.current?.focus({ preventScroll: true });
|
|
137666
137666
|
}),
|
|
@@ -137676,7 +137676,7 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137676
137676
|
onInteractOutside,
|
|
137677
137677
|
onDismiss,
|
|
137678
137678
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
137679
|
-
Root$
|
|
137679
|
+
Root$3,
|
|
137680
137680
|
{
|
|
137681
137681
|
asChild: true,
|
|
137682
137682
|
...rovingFocusGroupScope,
|
|
@@ -137685,7 +137685,7 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137685
137685
|
loop,
|
|
137686
137686
|
currentTabStopId: currentItemId,
|
|
137687
137687
|
onCurrentTabStopIdChange: setCurrentItemId,
|
|
137688
|
-
onEntryFocus: composeEventHandlers$
|
|
137688
|
+
onEntryFocus: composeEventHandlers$2(onEntryFocus, (event) => {
|
|
137689
137689
|
if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
|
|
137690
137690
|
}),
|
|
137691
137691
|
preventScrollOnEntryFocus: true,
|
|
@@ -137701,7 +137701,7 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137701
137701
|
...contentProps,
|
|
137702
137702
|
ref: composedRefs,
|
|
137703
137703
|
style: { outline: "none", ...contentProps.style },
|
|
137704
|
-
onKeyDown: composeEventHandlers$
|
|
137704
|
+
onKeyDown: composeEventHandlers$2(contentProps.onKeyDown, (event) => {
|
|
137705
137705
|
const target = event.target;
|
|
137706
137706
|
const isKeyDownInside = target.closest("[data-radix-menu-content]") === event.currentTarget;
|
|
137707
137707
|
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
@@ -137717,15 +137717,15 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137717
137717
|
const items = getItems().filter((item) => !item.disabled);
|
|
137718
137718
|
const candidateNodes = items.map((item) => item.ref.current);
|
|
137719
137719
|
if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();
|
|
137720
|
-
focusFirst$
|
|
137720
|
+
focusFirst$2(candidateNodes);
|
|
137721
137721
|
}),
|
|
137722
|
-
onBlur: composeEventHandlers$
|
|
137722
|
+
onBlur: composeEventHandlers$2(props.onBlur, (event) => {
|
|
137723
137723
|
if (!event.currentTarget.contains(event.target)) {
|
|
137724
137724
|
window.clearTimeout(timerRef.current);
|
|
137725
137725
|
searchRef.current = "";
|
|
137726
137726
|
}
|
|
137727
137727
|
}),
|
|
137728
|
-
onPointerMove: composeEventHandlers$
|
|
137728
|
+
onPointerMove: composeEventHandlers$2(
|
|
137729
137729
|
props.onPointerMove,
|
|
137730
137730
|
whenMouse((event) => {
|
|
137731
137731
|
const target = event.target;
|
|
@@ -137750,31 +137750,31 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137750
137750
|
}
|
|
137751
137751
|
);
|
|
137752
137752
|
MenuContent.displayName = CONTENT_NAME$3;
|
|
137753
|
-
var GROUP_NAME$
|
|
137753
|
+
var GROUP_NAME$2 = "MenuGroup";
|
|
137754
137754
|
var MenuGroup = React__namespace.forwardRef(
|
|
137755
137755
|
(props, forwardedRef) => {
|
|
137756
137756
|
const { __scopeMenu, ...groupProps } = props;
|
|
137757
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
137757
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
137758
137758
|
}
|
|
137759
137759
|
);
|
|
137760
|
-
MenuGroup.displayName = GROUP_NAME$
|
|
137760
|
+
MenuGroup.displayName = GROUP_NAME$2;
|
|
137761
137761
|
var LABEL_NAME$1 = "MenuLabel";
|
|
137762
137762
|
var MenuLabel = React__namespace.forwardRef(
|
|
137763
137763
|
(props, forwardedRef) => {
|
|
137764
137764
|
const { __scopeMenu, ...labelProps } = props;
|
|
137765
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
137765
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { ...labelProps, ref: forwardedRef });
|
|
137766
137766
|
}
|
|
137767
137767
|
);
|
|
137768
137768
|
MenuLabel.displayName = LABEL_NAME$1;
|
|
137769
|
-
var ITEM_NAME$
|
|
137769
|
+
var ITEM_NAME$3 = "MenuItem";
|
|
137770
137770
|
var ITEM_SELECT = "menu.itemSelect";
|
|
137771
137771
|
var MenuItem = React__namespace.forwardRef(
|
|
137772
137772
|
(props, forwardedRef) => {
|
|
137773
137773
|
const { disabled = false, onSelect, ...itemProps } = props;
|
|
137774
137774
|
const ref = React__namespace.useRef(null);
|
|
137775
|
-
const rootContext = useMenuRootContext(ITEM_NAME$
|
|
137776
|
-
const contentContext = useMenuContentContext(ITEM_NAME$
|
|
137777
|
-
const composedRefs = useComposedRefs$
|
|
137775
|
+
const rootContext = useMenuRootContext(ITEM_NAME$3, props.__scopeMenu);
|
|
137776
|
+
const contentContext = useMenuContentContext(ITEM_NAME$3, props.__scopeMenu);
|
|
137777
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
137778
137778
|
const isPointerDownRef = React__namespace.useRef(false);
|
|
137779
137779
|
const handleSelect = () => {
|
|
137780
137780
|
const menuItem = ref.current;
|
|
@@ -137795,15 +137795,15 @@ var MenuItem = React__namespace.forwardRef(
|
|
|
137795
137795
|
...itemProps,
|
|
137796
137796
|
ref: composedRefs,
|
|
137797
137797
|
disabled,
|
|
137798
|
-
onClick: composeEventHandlers$
|
|
137798
|
+
onClick: composeEventHandlers$2(props.onClick, handleSelect),
|
|
137799
137799
|
onPointerDown: (event) => {
|
|
137800
137800
|
props.onPointerDown?.(event);
|
|
137801
137801
|
isPointerDownRef.current = true;
|
|
137802
137802
|
},
|
|
137803
|
-
onPointerUp: composeEventHandlers$
|
|
137803
|
+
onPointerUp: composeEventHandlers$2(props.onPointerUp, (event) => {
|
|
137804
137804
|
if (!isPointerDownRef.current) event.currentTarget?.click();
|
|
137805
137805
|
}),
|
|
137806
|
-
onKeyDown: composeEventHandlers$
|
|
137806
|
+
onKeyDown: composeEventHandlers$2(props.onKeyDown, (event) => {
|
|
137807
137807
|
const isTypingAhead = contentContext.searchRef.current !== "";
|
|
137808
137808
|
if (disabled || isTypingAhead && event.key === " ") return;
|
|
137809
137809
|
if (SELECTION_KEYS.includes(event.key)) {
|
|
@@ -137815,14 +137815,14 @@ var MenuItem = React__namespace.forwardRef(
|
|
|
137815
137815
|
);
|
|
137816
137816
|
}
|
|
137817
137817
|
);
|
|
137818
|
-
MenuItem.displayName = ITEM_NAME$
|
|
137818
|
+
MenuItem.displayName = ITEM_NAME$3;
|
|
137819
137819
|
var MenuItemImpl = React__namespace.forwardRef(
|
|
137820
137820
|
(props, forwardedRef) => {
|
|
137821
137821
|
const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;
|
|
137822
|
-
const contentContext = useMenuContentContext(ITEM_NAME$
|
|
137823
|
-
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
|
|
137822
|
+
const contentContext = useMenuContentContext(ITEM_NAME$3, __scopeMenu);
|
|
137823
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope$1(__scopeMenu);
|
|
137824
137824
|
const ref = React__namespace.useRef(null);
|
|
137825
|
-
const composedRefs = useComposedRefs$
|
|
137825
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
137826
137826
|
const [isFocused, setIsFocused] = React__namespace.useState(false);
|
|
137827
137827
|
const [textContent, setTextContent] = React__namespace.useState("");
|
|
137828
137828
|
React__namespace.useEffect(() => {
|
|
@@ -137832,13 +137832,13 @@ var MenuItemImpl = React__namespace.forwardRef(
|
|
|
137832
137832
|
}
|
|
137833
137833
|
}, [itemProps.children]);
|
|
137834
137834
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
137835
|
-
Collection.ItemSlot,
|
|
137835
|
+
Collection$1.ItemSlot,
|
|
137836
137836
|
{
|
|
137837
137837
|
scope: __scopeMenu,
|
|
137838
137838
|
disabled,
|
|
137839
137839
|
textValue: textValue ?? textContent,
|
|
137840
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
137841
|
-
Primitive$
|
|
137840
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Item$1, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
137841
|
+
Primitive$3.div,
|
|
137842
137842
|
{
|
|
137843
137843
|
role: "menuitem",
|
|
137844
137844
|
"data-highlighted": isFocused ? "" : void 0,
|
|
@@ -137846,7 +137846,7 @@ var MenuItemImpl = React__namespace.forwardRef(
|
|
|
137846
137846
|
"data-disabled": disabled ? "" : void 0,
|
|
137847
137847
|
...itemProps,
|
|
137848
137848
|
ref: composedRefs,
|
|
137849
|
-
onPointerMove: composeEventHandlers$
|
|
137849
|
+
onPointerMove: composeEventHandlers$2(
|
|
137850
137850
|
props.onPointerMove,
|
|
137851
137851
|
whenMouse((event) => {
|
|
137852
137852
|
if (disabled) {
|
|
@@ -137860,12 +137860,12 @@ var MenuItemImpl = React__namespace.forwardRef(
|
|
|
137860
137860
|
}
|
|
137861
137861
|
})
|
|
137862
137862
|
),
|
|
137863
|
-
onPointerLeave: composeEventHandlers$
|
|
137863
|
+
onPointerLeave: composeEventHandlers$2(
|
|
137864
137864
|
props.onPointerLeave,
|
|
137865
137865
|
whenMouse((event) => contentContext.onItemLeave(event))
|
|
137866
137866
|
),
|
|
137867
|
-
onFocus: composeEventHandlers$
|
|
137868
|
-
onBlur: composeEventHandlers$
|
|
137867
|
+
onFocus: composeEventHandlers$2(props.onFocus, () => setIsFocused(true)),
|
|
137868
|
+
onBlur: composeEventHandlers$2(props.onBlur, () => setIsFocused(false))
|
|
137869
137869
|
}
|
|
137870
137870
|
) })
|
|
137871
137871
|
}
|
|
@@ -137884,7 +137884,7 @@ var MenuCheckboxItem = React__namespace.forwardRef(
|
|
|
137884
137884
|
...checkboxItemProps,
|
|
137885
137885
|
ref: forwardedRef,
|
|
137886
137886
|
"data-state": getCheckedState(checked),
|
|
137887
|
-
onSelect: composeEventHandlers$
|
|
137887
|
+
onSelect: composeEventHandlers$2(
|
|
137888
137888
|
checkboxItemProps.onSelect,
|
|
137889
137889
|
() => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),
|
|
137890
137890
|
{ checkForDefaultPrevented: false }
|
|
@@ -137894,25 +137894,25 @@ var MenuCheckboxItem = React__namespace.forwardRef(
|
|
|
137894
137894
|
}
|
|
137895
137895
|
);
|
|
137896
137896
|
MenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME$1;
|
|
137897
|
-
var RADIO_GROUP_NAME$
|
|
137898
|
-
var [RadioGroupProvider, useRadioGroupContext] = createMenuContext(
|
|
137899
|
-
RADIO_GROUP_NAME$
|
|
137897
|
+
var RADIO_GROUP_NAME$2 = "MenuRadioGroup";
|
|
137898
|
+
var [RadioGroupProvider$1, useRadioGroupContext$1] = createMenuContext(
|
|
137899
|
+
RADIO_GROUP_NAME$2,
|
|
137900
137900
|
{ value: void 0, onValueChange: () => {
|
|
137901
137901
|
} }
|
|
137902
137902
|
);
|
|
137903
137903
|
var MenuRadioGroup = React__namespace.forwardRef(
|
|
137904
137904
|
(props, forwardedRef) => {
|
|
137905
137905
|
const { value, onValueChange, ...groupProps } = props;
|
|
137906
|
-
const handleValueChange = useCallbackRef$
|
|
137907
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsxRuntime.jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });
|
|
137906
|
+
const handleValueChange = useCallbackRef$3(onValueChange);
|
|
137907
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupProvider$1, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsxRuntime.jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });
|
|
137908
137908
|
}
|
|
137909
137909
|
);
|
|
137910
|
-
MenuRadioGroup.displayName = RADIO_GROUP_NAME$
|
|
137910
|
+
MenuRadioGroup.displayName = RADIO_GROUP_NAME$2;
|
|
137911
137911
|
var RADIO_ITEM_NAME$1 = "MenuRadioItem";
|
|
137912
137912
|
var MenuRadioItem = React__namespace.forwardRef(
|
|
137913
137913
|
(props, forwardedRef) => {
|
|
137914
137914
|
const { value, ...radioItemProps } = props;
|
|
137915
|
-
const context = useRadioGroupContext(RADIO_ITEM_NAME$1, props.__scopeMenu);
|
|
137915
|
+
const context = useRadioGroupContext$1(RADIO_ITEM_NAME$1, props.__scopeMenu);
|
|
137916
137916
|
const checked = value === context.value;
|
|
137917
137917
|
return /* @__PURE__ */ jsxRuntime.jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
137918
137918
|
MenuItem,
|
|
@@ -137922,7 +137922,7 @@ var MenuRadioItem = React__namespace.forwardRef(
|
|
|
137922
137922
|
...radioItemProps,
|
|
137923
137923
|
ref: forwardedRef,
|
|
137924
137924
|
"data-state": getCheckedState(checked),
|
|
137925
|
-
onSelect: composeEventHandlers$
|
|
137925
|
+
onSelect: composeEventHandlers$2(
|
|
137926
137926
|
radioItemProps.onSelect,
|
|
137927
137927
|
() => context.onValueChange?.(value),
|
|
137928
137928
|
{ checkForDefaultPrevented: false }
|
|
@@ -137946,7 +137946,7 @@ var MenuItemIndicator = React__namespace.forwardRef(
|
|
|
137946
137946
|
{
|
|
137947
137947
|
present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
|
|
137948
137948
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
137949
|
-
Primitive$
|
|
137949
|
+
Primitive$3.span,
|
|
137950
137950
|
{
|
|
137951
137951
|
...itemIndicatorProps,
|
|
137952
137952
|
ref: forwardedRef,
|
|
@@ -137963,7 +137963,7 @@ var MenuSeparator = React__namespace.forwardRef(
|
|
|
137963
137963
|
(props, forwardedRef) => {
|
|
137964
137964
|
const { __scopeMenu, ...separatorProps } = props;
|
|
137965
137965
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
137966
|
-
Primitive$
|
|
137966
|
+
Primitive$3.div,
|
|
137967
137967
|
{
|
|
137968
137968
|
role: "separator",
|
|
137969
137969
|
"aria-orientation": "horizontal",
|
|
@@ -137991,12 +137991,12 @@ var MenuSub = (props) => {
|
|
|
137991
137991
|
const popperScope = usePopperScope$1(__scopeMenu);
|
|
137992
137992
|
const [trigger, setTrigger] = React__namespace.useState(null);
|
|
137993
137993
|
const [content, setContent] = React__namespace.useState(null);
|
|
137994
|
-
const handleOpenChange = useCallbackRef$
|
|
137994
|
+
const handleOpenChange = useCallbackRef$3(onOpenChange);
|
|
137995
137995
|
React__namespace.useEffect(() => {
|
|
137996
137996
|
if (parentMenuContext.open === false) handleOpenChange(false);
|
|
137997
137997
|
return () => handleOpenChange(false);
|
|
137998
137998
|
}, [parentMenuContext.open, handleOpenChange]);
|
|
137999
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Root2$
|
|
137999
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Root2$4, { ...popperScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
138000
138000
|
MenuProvider,
|
|
138001
138001
|
{
|
|
138002
138002
|
scope: __scopeMenu,
|
|
@@ -138008,8 +138008,8 @@ var MenuSub = (props) => {
|
|
|
138008
138008
|
MenuSubProvider,
|
|
138009
138009
|
{
|
|
138010
138010
|
scope: __scopeMenu,
|
|
138011
|
-
contentId: useId$
|
|
138012
|
-
triggerId: useId$
|
|
138011
|
+
contentId: useId$3(),
|
|
138012
|
+
triggerId: useId$3(),
|
|
138013
138013
|
trigger,
|
|
138014
138014
|
onTriggerChange: setTrigger,
|
|
138015
138015
|
children
|
|
@@ -138050,14 +138050,14 @@ var MenuSubTrigger = React__namespace.forwardRef(
|
|
|
138050
138050
|
"aria-controls": subContext.contentId,
|
|
138051
138051
|
"data-state": getOpenState(context.open),
|
|
138052
138052
|
...props,
|
|
138053
|
-
ref: composeRefs$
|
|
138053
|
+
ref: composeRefs$2(forwardedRef, subContext.onTriggerChange),
|
|
138054
138054
|
onClick: (event) => {
|
|
138055
138055
|
props.onClick?.(event);
|
|
138056
138056
|
if (props.disabled || event.defaultPrevented) return;
|
|
138057
138057
|
event.currentTarget.focus();
|
|
138058
138058
|
if (!context.open) context.onOpenChange(true);
|
|
138059
138059
|
},
|
|
138060
|
-
onPointerMove: composeEventHandlers$
|
|
138060
|
+
onPointerMove: composeEventHandlers$2(
|
|
138061
138061
|
props.onPointerMove,
|
|
138062
138062
|
whenMouse((event) => {
|
|
138063
138063
|
contentContext.onItemEnter(event);
|
|
@@ -138071,7 +138071,7 @@ var MenuSubTrigger = React__namespace.forwardRef(
|
|
|
138071
138071
|
}
|
|
138072
138072
|
})
|
|
138073
138073
|
),
|
|
138074
|
-
onPointerLeave: composeEventHandlers$
|
|
138074
|
+
onPointerLeave: composeEventHandlers$2(
|
|
138075
138075
|
props.onPointerLeave,
|
|
138076
138076
|
whenMouse((event) => {
|
|
138077
138077
|
clearOpenTimer();
|
|
@@ -138106,7 +138106,7 @@ var MenuSubTrigger = React__namespace.forwardRef(
|
|
|
138106
138106
|
}
|
|
138107
138107
|
})
|
|
138108
138108
|
),
|
|
138109
|
-
onKeyDown: composeEventHandlers$
|
|
138109
|
+
onKeyDown: composeEventHandlers$2(props.onKeyDown, (event) => {
|
|
138110
138110
|
const isTypingAhead = contentContext.searchRef.current !== "";
|
|
138111
138111
|
if (props.disabled || isTypingAhead && event.key === " ") return;
|
|
138112
138112
|
if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {
|
|
@@ -138129,8 +138129,8 @@ var MenuSubContent = React__namespace.forwardRef(
|
|
|
138129
138129
|
const rootContext = useMenuRootContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
138130
138130
|
const subContext = useMenuSubContext(SUB_CONTENT_NAME$1, props.__scopeMenu);
|
|
138131
138131
|
const ref = React__namespace.useRef(null);
|
|
138132
|
-
const composedRefs = useComposedRefs$
|
|
138133
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
138132
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
138133
|
+
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(
|
|
138134
138134
|
MenuContentImpl,
|
|
138135
138135
|
{
|
|
138136
138136
|
id: subContext.contentId,
|
|
@@ -138147,14 +138147,14 @@ var MenuSubContent = React__namespace.forwardRef(
|
|
|
138147
138147
|
event.preventDefault();
|
|
138148
138148
|
},
|
|
138149
138149
|
onCloseAutoFocus: (event) => event.preventDefault(),
|
|
138150
|
-
onFocusOutside: composeEventHandlers$
|
|
138150
|
+
onFocusOutside: composeEventHandlers$2(props.onFocusOutside, (event) => {
|
|
138151
138151
|
if (event.target !== subContext.trigger) context.onOpenChange(false);
|
|
138152
138152
|
}),
|
|
138153
|
-
onEscapeKeyDown: composeEventHandlers$
|
|
138153
|
+
onEscapeKeyDown: composeEventHandlers$2(props.onEscapeKeyDown, (event) => {
|
|
138154
138154
|
rootContext.onClose();
|
|
138155
138155
|
event.preventDefault();
|
|
138156
138156
|
}),
|
|
138157
|
-
onKeyDown: composeEventHandlers$
|
|
138157
|
+
onKeyDown: composeEventHandlers$2(props.onKeyDown, (event) => {
|
|
138158
138158
|
const isKeyDownInside = event.currentTarget.contains(event.target);
|
|
138159
138159
|
const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);
|
|
138160
138160
|
if (isKeyDownInside && isCloseKey) {
|
|
@@ -138177,7 +138177,7 @@ function isIndeterminate(checked) {
|
|
|
138177
138177
|
function getCheckedState(checked) {
|
|
138178
138178
|
return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
138179
138179
|
}
|
|
138180
|
-
function focusFirst$
|
|
138180
|
+
function focusFirst$2(candidates) {
|
|
138181
138181
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
138182
138182
|
for (const candidate of candidates) {
|
|
138183
138183
|
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
@@ -138185,14 +138185,14 @@ function focusFirst$1(candidates) {
|
|
|
138185
138185
|
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
138186
138186
|
}
|
|
138187
138187
|
}
|
|
138188
|
-
function wrapArray(array, startIndex) {
|
|
138188
|
+
function wrapArray$1(array, startIndex) {
|
|
138189
138189
|
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
138190
138190
|
}
|
|
138191
138191
|
function getNextMatch(values, search, currentMatch) {
|
|
138192
138192
|
const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);
|
|
138193
138193
|
const normalizedSearch = isRepeated ? search[0] : search;
|
|
138194
138194
|
const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;
|
|
138195
|
-
let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));
|
|
138195
|
+
let wrappedValues = wrapArray$1(values, Math.max(currentMatchIndex, 0));
|
|
138196
138196
|
const excludeCurrentMatch = normalizedSearch.length === 1;
|
|
138197
138197
|
if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);
|
|
138198
138198
|
const nextMatch = wrappedValues.find(
|
|
@@ -138227,9 +138227,9 @@ var Portal$2 = MenuPortal;
|
|
|
138227
138227
|
var Content2$2 = MenuContent;
|
|
138228
138228
|
var Group = MenuGroup;
|
|
138229
138229
|
var Label = MenuLabel;
|
|
138230
|
-
var Item2$
|
|
138230
|
+
var Item2$2 = MenuItem;
|
|
138231
138231
|
var CheckboxItem = MenuCheckboxItem;
|
|
138232
|
-
var RadioGroup = MenuRadioGroup;
|
|
138232
|
+
var RadioGroup$2 = MenuRadioGroup;
|
|
138233
138233
|
var RadioItem = MenuRadioItem;
|
|
138234
138234
|
var ItemIndicator = MenuItemIndicator;
|
|
138235
138235
|
var Separator$2 = MenuSeparator;
|
|
@@ -138239,22 +138239,22 @@ var SubTrigger = MenuSubTrigger;
|
|
|
138239
138239
|
var SubContent = MenuSubContent;
|
|
138240
138240
|
|
|
138241
138241
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
138242
|
-
var useLayoutEffect2$
|
|
138242
|
+
var useLayoutEffect2$2 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
138243
138243
|
};
|
|
138244
138244
|
|
|
138245
138245
|
// packages/react/id/src/id.tsx
|
|
138246
|
-
var useReactId$
|
|
138247
|
-
var count$
|
|
138248
|
-
function useId$
|
|
138249
|
-
const [id, setId] = React__namespace.useState(useReactId$
|
|
138250
|
-
useLayoutEffect2$
|
|
138251
|
-
if (!deterministicId) setId((reactId) => reactId ?? String(count$
|
|
138246
|
+
var useReactId$2 = React__namespace["useId".toString()] || (() => void 0);
|
|
138247
|
+
var count$3 = 0;
|
|
138248
|
+
function useId$2(deterministicId) {
|
|
138249
|
+
const [id, setId] = React__namespace.useState(useReactId$2());
|
|
138250
|
+
useLayoutEffect2$2(() => {
|
|
138251
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count$3++));
|
|
138252
138252
|
}, [deterministicId]);
|
|
138253
138253
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
138254
138254
|
}
|
|
138255
138255
|
|
|
138256
138256
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
138257
|
-
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope$
|
|
138257
|
+
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope$9(
|
|
138258
138258
|
DROPDOWN_MENU_NAME,
|
|
138259
138259
|
[createMenuScope]
|
|
138260
138260
|
);
|
|
@@ -138272,7 +138272,7 @@ var DropdownMenu = (props) => {
|
|
|
138272
138272
|
} = props;
|
|
138273
138273
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
138274
138274
|
const triggerRef = React__namespace.useRef(null);
|
|
138275
|
-
const [open = false, setOpen] = useControllableState$
|
|
138275
|
+
const [open = false, setOpen] = useControllableState$3({
|
|
138276
138276
|
prop: openProp,
|
|
138277
138277
|
defaultProp: defaultOpen,
|
|
138278
138278
|
onChange: onOpenChange
|
|
@@ -138281,9 +138281,9 @@ var DropdownMenu = (props) => {
|
|
|
138281
138281
|
DropdownMenuProvider,
|
|
138282
138282
|
{
|
|
138283
138283
|
scope: __scopeDropdownMenu,
|
|
138284
|
-
triggerId: useId$
|
|
138284
|
+
triggerId: useId$2(),
|
|
138285
138285
|
triggerRef,
|
|
138286
|
-
contentId: useId$
|
|
138286
|
+
contentId: useId$2(),
|
|
138287
138287
|
open,
|
|
138288
138288
|
onOpenChange: setOpen,
|
|
138289
138289
|
onOpenToggle: React__namespace.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
@@ -138300,7 +138300,7 @@ var DropdownMenuTrigger = React__namespace.forwardRef(
|
|
|
138300
138300
|
const context = useDropdownMenuContext(TRIGGER_NAME$1, __scopeDropdownMenu);
|
|
138301
138301
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
138302
138302
|
return /* @__PURE__ */ jsxRuntime.jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
138303
|
-
Primitive$
|
|
138303
|
+
Primitive$4.button,
|
|
138304
138304
|
{
|
|
138305
138305
|
type: "button",
|
|
138306
138306
|
id: context.triggerId,
|
|
@@ -138311,14 +138311,14 @@ var DropdownMenuTrigger = React__namespace.forwardRef(
|
|
|
138311
138311
|
"data-disabled": disabled ? "" : void 0,
|
|
138312
138312
|
disabled,
|
|
138313
138313
|
...triggerProps,
|
|
138314
|
-
ref: composeRefs$
|
|
138315
|
-
onPointerDown: composeEventHandlers$
|
|
138314
|
+
ref: composeRefs$3(forwardedRef, context.triggerRef),
|
|
138315
|
+
onPointerDown: composeEventHandlers$3(props.onPointerDown, (event) => {
|
|
138316
138316
|
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
138317
138317
|
context.onOpenToggle();
|
|
138318
138318
|
if (!context.open) event.preventDefault();
|
|
138319
138319
|
}
|
|
138320
138320
|
}),
|
|
138321
|
-
onKeyDown: composeEventHandlers$
|
|
138321
|
+
onKeyDown: composeEventHandlers$3(props.onKeyDown, (event) => {
|
|
138322
138322
|
if (disabled) return;
|
|
138323
138323
|
if (["Enter", " "].includes(event.key)) context.onOpenToggle();
|
|
138324
138324
|
if (event.key === "ArrowDown") context.onOpenChange(true);
|
|
@@ -138351,12 +138351,12 @@ var DropdownMenuContent = React__namespace.forwardRef(
|
|
|
138351
138351
|
...menuScope,
|
|
138352
138352
|
...contentProps,
|
|
138353
138353
|
ref: forwardedRef,
|
|
138354
|
-
onCloseAutoFocus: composeEventHandlers$
|
|
138354
|
+
onCloseAutoFocus: composeEventHandlers$3(props.onCloseAutoFocus, (event) => {
|
|
138355
138355
|
if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
|
|
138356
138356
|
hasInteractedOutsideRef.current = false;
|
|
138357
138357
|
event.preventDefault();
|
|
138358
138358
|
}),
|
|
138359
|
-
onInteractOutside: composeEventHandlers$
|
|
138359
|
+
onInteractOutside: composeEventHandlers$3(props.onInteractOutside, (event) => {
|
|
138360
138360
|
const originalEvent = event.detail.originalEvent;
|
|
138361
138361
|
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
138362
138362
|
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
@@ -138378,7 +138378,7 @@ var DropdownMenuContent = React__namespace.forwardRef(
|
|
|
138378
138378
|
}
|
|
138379
138379
|
);
|
|
138380
138380
|
DropdownMenuContent.displayName = CONTENT_NAME$2;
|
|
138381
|
-
var GROUP_NAME = "DropdownMenuGroup";
|
|
138381
|
+
var GROUP_NAME$1 = "DropdownMenuGroup";
|
|
138382
138382
|
var DropdownMenuGroup = React__namespace.forwardRef(
|
|
138383
138383
|
(props, forwardedRef) => {
|
|
138384
138384
|
const { __scopeDropdownMenu, ...groupProps } = props;
|
|
@@ -138386,7 +138386,7 @@ var DropdownMenuGroup = React__namespace.forwardRef(
|
|
|
138386
138386
|
return /* @__PURE__ */ jsxRuntime.jsx(Group, { ...menuScope, ...groupProps, ref: forwardedRef });
|
|
138387
138387
|
}
|
|
138388
138388
|
);
|
|
138389
|
-
DropdownMenuGroup.displayName = GROUP_NAME;
|
|
138389
|
+
DropdownMenuGroup.displayName = GROUP_NAME$1;
|
|
138390
138390
|
var LABEL_NAME = "DropdownMenuLabel";
|
|
138391
138391
|
var DropdownMenuLabel = React__namespace.forwardRef(
|
|
138392
138392
|
(props, forwardedRef) => {
|
|
@@ -138396,15 +138396,15 @@ var DropdownMenuLabel = React__namespace.forwardRef(
|
|
|
138396
138396
|
}
|
|
138397
138397
|
);
|
|
138398
138398
|
DropdownMenuLabel.displayName = LABEL_NAME;
|
|
138399
|
-
var ITEM_NAME = "DropdownMenuItem";
|
|
138399
|
+
var ITEM_NAME$2 = "DropdownMenuItem";
|
|
138400
138400
|
var DropdownMenuItem = React__namespace.forwardRef(
|
|
138401
138401
|
(props, forwardedRef) => {
|
|
138402
138402
|
const { __scopeDropdownMenu, ...itemProps } = props;
|
|
138403
138403
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
138404
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Item2$
|
|
138404
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Item2$2, { ...menuScope, ...itemProps, ref: forwardedRef });
|
|
138405
138405
|
}
|
|
138406
138406
|
);
|
|
138407
|
-
DropdownMenuItem.displayName = ITEM_NAME;
|
|
138407
|
+
DropdownMenuItem.displayName = ITEM_NAME$2;
|
|
138408
138408
|
var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
|
|
138409
138409
|
var DropdownMenuCheckboxItem = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138410
138410
|
const { __scopeDropdownMenu, ...checkboxItemProps } = props;
|
|
@@ -138412,13 +138412,13 @@ var DropdownMenuCheckboxItem = React__namespace.forwardRef((props, forwardedRef)
|
|
|
138412
138412
|
return /* @__PURE__ */ jsxRuntime.jsx(CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
|
|
138413
138413
|
});
|
|
138414
138414
|
DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;
|
|
138415
|
-
var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
|
|
138415
|
+
var RADIO_GROUP_NAME$1 = "DropdownMenuRadioGroup";
|
|
138416
138416
|
var DropdownMenuRadioGroup = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138417
138417
|
const { __scopeDropdownMenu, ...radioGroupProps } = props;
|
|
138418
138418
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
138419
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
|
|
138419
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroup$2, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
|
|
138420
138420
|
});
|
|
138421
|
-
DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;
|
|
138421
|
+
DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME$1;
|
|
138422
138422
|
var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
|
|
138423
138423
|
var DropdownMenuRadioItem = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138424
138424
|
const { __scopeDropdownMenu, ...radioItemProps } = props;
|
|
@@ -138426,13 +138426,13 @@ var DropdownMenuRadioItem = React__namespace.forwardRef((props, forwardedRef) =>
|
|
|
138426
138426
|
return /* @__PURE__ */ jsxRuntime.jsx(RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
|
|
138427
138427
|
});
|
|
138428
138428
|
DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;
|
|
138429
|
-
var INDICATOR_NAME = "DropdownMenuItemIndicator";
|
|
138429
|
+
var INDICATOR_NAME$1 = "DropdownMenuItemIndicator";
|
|
138430
138430
|
var DropdownMenuItemIndicator = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138431
138431
|
const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
|
|
138432
138432
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
138433
138433
|
return /* @__PURE__ */ jsxRuntime.jsx(ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
|
|
138434
138434
|
});
|
|
138435
|
-
DropdownMenuItemIndicator.displayName = INDICATOR_NAME;
|
|
138435
|
+
DropdownMenuItemIndicator.displayName = INDICATOR_NAME$1;
|
|
138436
138436
|
var SEPARATOR_NAME = "DropdownMenuSeparator";
|
|
138437
138437
|
var DropdownMenuSeparator = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138438
138438
|
const { __scopeDropdownMenu, ...separatorProps } = props;
|
|
@@ -138452,7 +138452,7 @@ DropdownMenuArrow.displayName = ARROW_NAME$2;
|
|
|
138452
138452
|
var DropdownMenuSub = (props) => {
|
|
138453
138453
|
const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;
|
|
138454
138454
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
138455
|
-
const [open = false, setOpen] = useControllableState$
|
|
138455
|
+
const [open = false, setOpen] = useControllableState$3({
|
|
138456
138456
|
prop: openProp,
|
|
138457
138457
|
defaultProp: defaultOpen,
|
|
138458
138458
|
onChange: onOpenChange
|
|
@@ -138491,13 +138491,13 @@ var DropdownMenuSubContent = React__namespace.forwardRef((props, forwardedRef) =
|
|
|
138491
138491
|
);
|
|
138492
138492
|
});
|
|
138493
138493
|
DropdownMenuSubContent.displayName = SUB_CONTENT_NAME;
|
|
138494
|
-
var Root2$
|
|
138494
|
+
var Root2$3 = DropdownMenu;
|
|
138495
138495
|
var Trigger$1 = DropdownMenuTrigger;
|
|
138496
138496
|
var Portal2 = DropdownMenuPortal;
|
|
138497
138497
|
var Content2$1 = DropdownMenuContent;
|
|
138498
138498
|
var Group2 = DropdownMenuGroup;
|
|
138499
138499
|
var Label2 = DropdownMenuLabel;
|
|
138500
|
-
var Item2 = DropdownMenuItem;
|
|
138500
|
+
var Item2$1 = DropdownMenuItem;
|
|
138501
138501
|
var CheckboxItem2 = DropdownMenuCheckboxItem;
|
|
138502
138502
|
var RadioGroup2 = DropdownMenuRadioGroup;
|
|
138503
138503
|
var RadioItem2 = DropdownMenuRadioItem;
|
|
@@ -138520,7 +138520,7 @@ var menuStyleClasses = {
|
|
|
138520
138520
|
separator: "-s-mx-1 s-my-1 s-h-px s-bg-separator",
|
|
138521
138521
|
shortcut: "s-ml-auto s-text-xs s-tracking-widest s-text-primary-400",
|
|
138522
138522
|
};
|
|
138523
|
-
var NewDropdownMenu = Root2$
|
|
138523
|
+
var NewDropdownMenu = Root2$3;
|
|
138524
138524
|
var NewDropdownMenuGroup = Group2;
|
|
138525
138525
|
var NewDropdownMenuPortal = Portal2;
|
|
138526
138526
|
var NewDropdownMenuSub = Sub2;
|
|
@@ -138563,10 +138563,10 @@ var NewDropdownMenuContent = React__namespace.forwardRef(function (_a, ref) {
|
|
|
138563
138563
|
NewDropdownMenuContent.displayName = Content2$1.displayName;
|
|
138564
138564
|
var NewDropdownMenuItem = React__namespace.forwardRef(function (_a, ref) {
|
|
138565
138565
|
var children = _a.children, description = _a.description, className = _a.className, inset = _a.inset, icon = _a.icon, label = _a.label, props = __rest(_a, ["children", "description", "className", "inset", "icon", "label"]);
|
|
138566
|
-
return (React__namespace.createElement(Item2, __assign({ ref: ref, className: cn(menuStyleClasses.item, inset ? menuStyleClasses.inset : "", className || "") }, props),
|
|
138566
|
+
return (React__namespace.createElement(Item2$1, __assign({ ref: ref, className: cn(menuStyleClasses.item, inset ? menuStyleClasses.inset : "", className || "") }, props),
|
|
138567
138567
|
React__namespace.createElement(ItemWithLabelIconAndDescription, { label: label, icon: icon, description: description }, children)));
|
|
138568
138568
|
});
|
|
138569
|
-
NewDropdownMenuItem.displayName = Item2.displayName;
|
|
138569
|
+
NewDropdownMenuItem.displayName = Item2$1.displayName;
|
|
138570
138570
|
var NewDropdownMenuCheckboxItem = React__namespace.forwardRef(function (_a, ref) {
|
|
138571
138571
|
var className = _a.className, children = _a.children, checked = _a.checked, props = __rest(_a, ["className", "children", "checked"]);
|
|
138572
138572
|
return (React__namespace.createElement(CheckboxItem2, __assign({ ref: ref, className: cn(menuStyleClasses.item, menuStyleClasses.inset, className || ""), checked: checked }, props),
|
|
@@ -138620,7 +138620,7 @@ function Notification(_a) {
|
|
|
138620
138620
|
}
|
|
138621
138621
|
|
|
138622
138622
|
// packages/react/primitive/src/Primitive.tsx
|
|
138623
|
-
var NODES$
|
|
138623
|
+
var NODES$2 = [
|
|
138624
138624
|
"a",
|
|
138625
138625
|
"button",
|
|
138626
138626
|
"div",
|
|
@@ -138638,7 +138638,7 @@ var NODES$1 = [
|
|
|
138638
138638
|
"svg",
|
|
138639
138639
|
"ul"
|
|
138640
138640
|
];
|
|
138641
|
-
var Primitive$
|
|
138641
|
+
var Primitive$2 = NODES$2.reduce((primitive, node) => {
|
|
138642
138642
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138643
138643
|
const { asChild, ...primitiveProps } = props;
|
|
138644
138644
|
const Comp = asChild ? Slot : node;
|
|
@@ -138661,7 +138661,7 @@ var Separator$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
138661
138661
|
const ariaOrientation = orientation === "vertical" ? orientation : void 0;
|
|
138662
138662
|
const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
|
|
138663
138663
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
138664
|
-
Primitive$
|
|
138664
|
+
Primitive$2.div,
|
|
138665
138665
|
{
|
|
138666
138666
|
"data-orientation": orientation,
|
|
138667
138667
|
...semanticProps,
|
|
@@ -138674,13 +138674,13 @@ Separator$1.displayName = NAME$1;
|
|
|
138674
138674
|
function isValidOrientation(orientation) {
|
|
138675
138675
|
return ORIENTATIONS.includes(orientation);
|
|
138676
138676
|
}
|
|
138677
|
-
var Root$
|
|
138677
|
+
var Root$2 = Separator$1;
|
|
138678
138678
|
|
|
138679
138679
|
var Separator = React__namespace.forwardRef(function (_a, ref) {
|
|
138680
138680
|
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"]);
|
|
138681
|
-
return (React__namespace.createElement(Root$
|
|
138681
|
+
return (React__namespace.createElement(Root$2, __assign({ ref: ref, decorative: decorative, orientation: orientation, className: classNames("s-bg-separator s-shrink-0", orientation === "horizontal" ? "s-h-[1px] s-w-full" : "s-h-full s-w-[1px]", className !== null && className !== void 0 ? className : "") }, props)));
|
|
138682
138682
|
});
|
|
138683
|
-
Separator.displayName = Root$
|
|
138683
|
+
Separator.displayName = Root$2.displayName;
|
|
138684
138684
|
|
|
138685
138685
|
function Page(_a) {
|
|
138686
138686
|
var children = _a.children, _b = _a.variant, variant = _b === void 0 ? "normal" : _b;
|
|
@@ -138793,7 +138793,7 @@ function PaginatedCitationsGrid(_a) {
|
|
|
138793
138793
|
}
|
|
138794
138794
|
|
|
138795
138795
|
// packages/core/primitive/src/primitive.tsx
|
|
138796
|
-
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
138796
|
+
function composeEventHandlers$1(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
138797
138797
|
return function handleEvent(event) {
|
|
138798
138798
|
originalEventHandler?.(event);
|
|
138799
138799
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -138803,22 +138803,22 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
138803
138803
|
}
|
|
138804
138804
|
|
|
138805
138805
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
138806
|
-
function setRef(ref, value) {
|
|
138806
|
+
function setRef$1(ref, value) {
|
|
138807
138807
|
if (typeof ref === "function") {
|
|
138808
138808
|
ref(value);
|
|
138809
138809
|
} else if (ref !== null && ref !== void 0) {
|
|
138810
138810
|
ref.current = value;
|
|
138811
138811
|
}
|
|
138812
138812
|
}
|
|
138813
|
-
function composeRefs(...refs) {
|
|
138814
|
-
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
138813
|
+
function composeRefs$1(...refs) {
|
|
138814
|
+
return (node) => refs.forEach((ref) => setRef$1(ref, node));
|
|
138815
138815
|
}
|
|
138816
|
-
function useComposedRefs(...refs) {
|
|
138817
|
-
return React__namespace.useCallback(composeRefs(...refs), refs);
|
|
138816
|
+
function useComposedRefs$1(...refs) {
|
|
138817
|
+
return React__namespace.useCallback(composeRefs$1(...refs), refs);
|
|
138818
138818
|
}
|
|
138819
138819
|
|
|
138820
138820
|
// packages/react/context/src/createContext.tsx
|
|
138821
|
-
function createContextScope$
|
|
138821
|
+
function createContextScope$4(scopeName, createContextScopeDeps = []) {
|
|
138822
138822
|
let defaultContexts = [];
|
|
138823
138823
|
function createContext3(rootComponentName, defaultContext) {
|
|
138824
138824
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -138853,9 +138853,9 @@ function createContextScope$1(scopeName, createContextScopeDeps = []) {
|
|
|
138853
138853
|
};
|
|
138854
138854
|
};
|
|
138855
138855
|
createScope.scopeName = scopeName;
|
|
138856
|
-
return [createContext3, composeContextScopes$
|
|
138856
|
+
return [createContext3, composeContextScopes$4(createScope, ...createContextScopeDeps)];
|
|
138857
138857
|
}
|
|
138858
|
-
function composeContextScopes$
|
|
138858
|
+
function composeContextScopes$4(...scopes) {
|
|
138859
138859
|
const baseScope = scopes[0];
|
|
138860
138860
|
if (scopes.length === 1) return baseScope;
|
|
138861
138861
|
const createScope = () => {
|
|
@@ -138877,7 +138877,7 @@ function composeContextScopes$1(...scopes) {
|
|
|
138877
138877
|
}
|
|
138878
138878
|
|
|
138879
138879
|
// packages/react/primitive/src/Primitive.tsx
|
|
138880
|
-
var NODES = [
|
|
138880
|
+
var NODES$1 = [
|
|
138881
138881
|
"a",
|
|
138882
138882
|
"button",
|
|
138883
138883
|
"div",
|
|
@@ -138895,7 +138895,7 @@ var NODES = [
|
|
|
138895
138895
|
"svg",
|
|
138896
138896
|
"ul"
|
|
138897
138897
|
];
|
|
138898
|
-
var Primitive = NODES.reduce((primitive, node) => {
|
|
138898
|
+
var Primitive$1 = NODES$1.reduce((primitive, node) => {
|
|
138899
138899
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138900
138900
|
const { asChild, ...primitiveProps } = props;
|
|
138901
138901
|
const Comp = asChild ? Slot : node;
|
|
@@ -138912,7 +138912,7 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
138912
138912
|
}
|
|
138913
138913
|
|
|
138914
138914
|
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
138915
|
-
function useCallbackRef(callback) {
|
|
138915
|
+
function useCallbackRef$1(callback) {
|
|
138916
138916
|
const callbackRef = React__namespace.useRef(callback);
|
|
138917
138917
|
React__namespace.useEffect(() => {
|
|
138918
138918
|
callbackRef.current = callback;
|
|
@@ -138922,7 +138922,7 @@ function useCallbackRef(callback) {
|
|
|
138922
138922
|
|
|
138923
138923
|
// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx
|
|
138924
138924
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
138925
|
-
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
138925
|
+
const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
|
|
138926
138926
|
React__namespace.useEffect(() => {
|
|
138927
138927
|
const handleKeyDown = (event) => {
|
|
138928
138928
|
if (event.key === "Escape") {
|
|
@@ -138959,7 +138959,7 @@ var DismissableLayer = React__namespace.forwardRef(
|
|
|
138959
138959
|
const [node, setNode] = React__namespace.useState(null);
|
|
138960
138960
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
138961
138961
|
const [, force] = React__namespace.useState({});
|
|
138962
|
-
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
138962
|
+
const composedRefs = useComposedRefs$1(forwardedRef, (node2) => setNode(node2));
|
|
138963
138963
|
const layers = Array.from(context.layers);
|
|
138964
138964
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
138965
138965
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
@@ -139022,7 +139022,7 @@ var DismissableLayer = React__namespace.forwardRef(
|
|
|
139022
139022
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
139023
139023
|
}, []);
|
|
139024
139024
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
139025
|
-
Primitive.div,
|
|
139025
|
+
Primitive$1.div,
|
|
139026
139026
|
{
|
|
139027
139027
|
...layerProps,
|
|
139028
139028
|
ref: composedRefs,
|
|
@@ -139030,9 +139030,9 @@ var DismissableLayer = React__namespace.forwardRef(
|
|
|
139030
139030
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
139031
139031
|
...props.style
|
|
139032
139032
|
},
|
|
139033
|
-
onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
139034
|
-
onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
139035
|
-
onPointerDownCapture: composeEventHandlers(
|
|
139033
|
+
onFocusCapture: composeEventHandlers$1(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
139034
|
+
onBlurCapture: composeEventHandlers$1(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
139035
|
+
onPointerDownCapture: composeEventHandlers$1(
|
|
139036
139036
|
props.onPointerDownCapture,
|
|
139037
139037
|
pointerDownOutside.onPointerDownCapture
|
|
139038
139038
|
)
|
|
@@ -139045,7 +139045,7 @@ var BRANCH_NAME = "DismissableLayerBranch";
|
|
|
139045
139045
|
var DismissableLayerBranch = React__namespace.forwardRef((props, forwardedRef) => {
|
|
139046
139046
|
const context = React__namespace.useContext(DismissableLayerContext);
|
|
139047
139047
|
const ref = React__namespace.useRef(null);
|
|
139048
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
139048
|
+
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
139049
139049
|
React__namespace.useEffect(() => {
|
|
139050
139050
|
const node = ref.current;
|
|
139051
139051
|
if (node) {
|
|
@@ -139055,11 +139055,11 @@ var DismissableLayerBranch = React__namespace.forwardRef((props, forwardedRef) =
|
|
|
139055
139055
|
};
|
|
139056
139056
|
}
|
|
139057
139057
|
}, [context.branches]);
|
|
139058
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...props, ref: composedRefs });
|
|
139058
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$1.div, { ...props, ref: composedRefs });
|
|
139059
139059
|
});
|
|
139060
139060
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
139061
139061
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
139062
|
-
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
139062
|
+
const handlePointerDownOutside = useCallbackRef$1(onPointerDownOutside);
|
|
139063
139063
|
const isPointerInsideReactTreeRef = React__namespace.useRef(false);
|
|
139064
139064
|
const handleClickRef = React__namespace.useRef(() => {
|
|
139065
139065
|
});
|
|
@@ -139102,7 +139102,7 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
139102
139102
|
};
|
|
139103
139103
|
}
|
|
139104
139104
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
139105
|
-
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
139105
|
+
const handleFocusOutside = useCallbackRef$1(onFocusOutside);
|
|
139106
139106
|
const isFocusInsideReactTreeRef = React__namespace.useRef(false);
|
|
139107
139107
|
React__namespace.useEffect(() => {
|
|
139108
139108
|
const handleFocus = (event) => {
|
|
@@ -139136,18 +139136,18 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
139136
139136
|
}
|
|
139137
139137
|
}
|
|
139138
139138
|
|
|
139139
|
-
var count$
|
|
139139
|
+
var count$2 = 0;
|
|
139140
139140
|
function useFocusGuards() {
|
|
139141
139141
|
React__namespace.useEffect(() => {
|
|
139142
139142
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
139143
139143
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
139144
139144
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
139145
|
-
count$
|
|
139145
|
+
count$2++;
|
|
139146
139146
|
return () => {
|
|
139147
|
-
if (count$
|
|
139147
|
+
if (count$2 === 1) {
|
|
139148
139148
|
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
139149
139149
|
}
|
|
139150
|
-
count$
|
|
139150
|
+
count$2--;
|
|
139151
139151
|
};
|
|
139152
139152
|
}, []);
|
|
139153
139153
|
}
|
|
@@ -139164,7 +139164,7 @@ function createFocusGuard() {
|
|
|
139164
139164
|
|
|
139165
139165
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
139166
139166
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
139167
|
-
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
139167
|
+
var EVENT_OPTIONS$1 = { bubbles: false, cancelable: true };
|
|
139168
139168
|
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
139169
139169
|
var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
139170
139170
|
const {
|
|
@@ -139175,10 +139175,10 @@ var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139175
139175
|
...scopeProps
|
|
139176
139176
|
} = props;
|
|
139177
139177
|
const [container, setContainer] = React__namespace.useState(null);
|
|
139178
|
-
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
139179
|
-
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
139178
|
+
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
139179
|
+
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
139180
139180
|
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
139181
|
-
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
139181
|
+
const composedRefs = useComposedRefs$1(forwardedRef, (node) => setContainer(node));
|
|
139182
139182
|
const focusScope = React__namespace.useRef({
|
|
139183
139183
|
paused: false,
|
|
139184
139184
|
pause() {
|
|
@@ -139229,11 +139229,11 @@ var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139229
139229
|
const previouslyFocusedElement = document.activeElement;
|
|
139230
139230
|
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
139231
139231
|
if (!hasFocusedCandidate) {
|
|
139232
|
-
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
139232
|
+
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS$1);
|
|
139233
139233
|
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
139234
139234
|
container.dispatchEvent(mountEvent);
|
|
139235
139235
|
if (!mountEvent.defaultPrevented) {
|
|
139236
|
-
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
139236
|
+
focusFirst$1(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
139237
139237
|
if (document.activeElement === previouslyFocusedElement) {
|
|
139238
139238
|
focus(container);
|
|
139239
139239
|
}
|
|
@@ -139242,7 +139242,7 @@ var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139242
139242
|
return () => {
|
|
139243
139243
|
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
139244
139244
|
setTimeout(() => {
|
|
139245
|
-
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
139245
|
+
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS$1);
|
|
139246
139246
|
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
139247
139247
|
container.dispatchEvent(unmountEvent);
|
|
139248
139248
|
if (!unmountEvent.defaultPrevented) {
|
|
@@ -139279,10 +139279,10 @@ var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139279
139279
|
},
|
|
139280
139280
|
[loop, trapped, focusScope.paused]
|
|
139281
139281
|
);
|
|
139282
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
139282
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$1.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
139283
139283
|
});
|
|
139284
139284
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
139285
|
-
function focusFirst(candidates, { select = false } = {}) {
|
|
139285
|
+
function focusFirst$1(candidates, { select = false } = {}) {
|
|
139286
139286
|
const previouslyFocusedElement = document.activeElement;
|
|
139287
139287
|
for (const candidate of candidates) {
|
|
139288
139288
|
focus(candidate, { select });
|
|
@@ -139363,16 +139363,16 @@ function removeLinks(items) {
|
|
|
139363
139363
|
}
|
|
139364
139364
|
|
|
139365
139365
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
139366
|
-
var useLayoutEffect2 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
139366
|
+
var useLayoutEffect2$1 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
139367
139367
|
};
|
|
139368
139368
|
|
|
139369
139369
|
// packages/react/id/src/id.tsx
|
|
139370
|
-
var useReactId = React__namespace["useId".toString()] || (() => void 0);
|
|
139371
|
-
var count = 0;
|
|
139372
|
-
function useId(deterministicId) {
|
|
139373
|
-
const [id, setId] = React__namespace.useState(useReactId());
|
|
139374
|
-
useLayoutEffect2(() => {
|
|
139375
|
-
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
|
139370
|
+
var useReactId$1 = React__namespace["useId".toString()] || (() => void 0);
|
|
139371
|
+
var count$1 = 0;
|
|
139372
|
+
function useId$1(deterministicId) {
|
|
139373
|
+
const [id, setId] = React__namespace.useState(useReactId$1());
|
|
139374
|
+
useLayoutEffect2$1(() => {
|
|
139375
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count$1++));
|
|
139376
139376
|
}, [deterministicId]);
|
|
139377
139377
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
139378
139378
|
}
|
|
@@ -139382,7 +139382,7 @@ var NAME = "Arrow";
|
|
|
139382
139382
|
var Arrow$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
139383
139383
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
139384
139384
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
139385
|
-
Primitive.svg,
|
|
139385
|
+
Primitive$1.svg,
|
|
139386
139386
|
{
|
|
139387
139387
|
...arrowProps,
|
|
139388
139388
|
ref: forwardedRef,
|
|
@@ -139395,10 +139395,10 @@ var Arrow$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139395
139395
|
);
|
|
139396
139396
|
});
|
|
139397
139397
|
Arrow$1.displayName = NAME;
|
|
139398
|
-
var Root = Arrow$1;
|
|
139398
|
+
var Root$1 = Arrow$1;
|
|
139399
139399
|
|
|
139400
139400
|
// packages/react/context/src/createContext.tsx
|
|
139401
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
139401
|
+
function createContextScope$3(scopeName, createContextScopeDeps = []) {
|
|
139402
139402
|
let defaultContexts = [];
|
|
139403
139403
|
function createContext3(rootComponentName, defaultContext) {
|
|
139404
139404
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -139433,9 +139433,9 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
139433
139433
|
};
|
|
139434
139434
|
};
|
|
139435
139435
|
createScope.scopeName = scopeName;
|
|
139436
|
-
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
139436
|
+
return [createContext3, composeContextScopes$3(createScope, ...createContextScopeDeps)];
|
|
139437
139437
|
}
|
|
139438
|
-
function composeContextScopes(...scopes) {
|
|
139438
|
+
function composeContextScopes$3(...scopes) {
|
|
139439
139439
|
const baseScope = scopes[0];
|
|
139440
139440
|
if (scopes.length === 1) return baseScope;
|
|
139441
139441
|
const createScope = () => {
|
|
@@ -139457,9 +139457,9 @@ function composeContextScopes(...scopes) {
|
|
|
139457
139457
|
}
|
|
139458
139458
|
|
|
139459
139459
|
// packages/react/use-size/src/useSize.tsx
|
|
139460
|
-
function useSize(element) {
|
|
139460
|
+
function useSize$1(element) {
|
|
139461
139461
|
const [size, setSize] = React__namespace.useState(void 0);
|
|
139462
|
-
useLayoutEffect2(() => {
|
|
139462
|
+
useLayoutEffect2$1(() => {
|
|
139463
139463
|
if (element) {
|
|
139464
139464
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
139465
139465
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -139493,7 +139493,7 @@ function useSize(element) {
|
|
|
139493
139493
|
}
|
|
139494
139494
|
|
|
139495
139495
|
var POPPER_NAME = "Popper";
|
|
139496
|
-
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
139496
|
+
var [createPopperContext, createPopperScope] = createContextScope$3(POPPER_NAME);
|
|
139497
139497
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
139498
139498
|
var Popper = (props) => {
|
|
139499
139499
|
const { __scopePopper, children } = props;
|
|
@@ -139507,11 +139507,11 @@ var PopperAnchor = React__namespace.forwardRef(
|
|
|
139507
139507
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
139508
139508
|
const context = usePopperContext(ANCHOR_NAME$1, __scopePopper);
|
|
139509
139509
|
const ref = React__namespace.useRef(null);
|
|
139510
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
139510
|
+
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
139511
139511
|
React__namespace.useEffect(() => {
|
|
139512
139512
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
139513
139513
|
});
|
|
139514
|
-
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
139514
|
+
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$1.div, { ...anchorProps, ref: composedRefs });
|
|
139515
139515
|
}
|
|
139516
139516
|
);
|
|
139517
139517
|
PopperAnchor.displayName = ANCHOR_NAME$1;
|
|
@@ -139537,9 +139537,9 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
139537
139537
|
} = props;
|
|
139538
139538
|
const context = usePopperContext(CONTENT_NAME$1, __scopePopper);
|
|
139539
139539
|
const [content, setContent] = React__namespace.useState(null);
|
|
139540
|
-
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
139540
|
+
const composedRefs = useComposedRefs$1(forwardedRef, (node) => setContent(node));
|
|
139541
139541
|
const [arrow$1, setArrow] = React__namespace.useState(null);
|
|
139542
|
-
const arrowSize = useSize(arrow$1);
|
|
139542
|
+
const arrowSize = useSize$1(arrow$1);
|
|
139543
139543
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
139544
139544
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
139545
139545
|
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
|
@@ -139591,8 +139591,8 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
139591
139591
|
]
|
|
139592
139592
|
});
|
|
139593
139593
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
139594
|
-
const handlePlaced = useCallbackRef(onPlaced);
|
|
139595
|
-
useLayoutEffect2(() => {
|
|
139594
|
+
const handlePlaced = useCallbackRef$1(onPlaced);
|
|
139595
|
+
useLayoutEffect2$1(() => {
|
|
139596
139596
|
if (isPositioned) {
|
|
139597
139597
|
handlePlaced?.();
|
|
139598
139598
|
}
|
|
@@ -139601,7 +139601,7 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
139601
139601
|
const arrowY = middlewareData.arrow?.y;
|
|
139602
139602
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
139603
139603
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
139604
|
-
useLayoutEffect2(() => {
|
|
139604
|
+
useLayoutEffect2$1(() => {
|
|
139605
139605
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
139606
139606
|
}, [content]);
|
|
139607
139607
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -139638,7 +139638,7 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
139638
139638
|
arrowY,
|
|
139639
139639
|
shouldHideArrow: cannotCenterArrow,
|
|
139640
139640
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
139641
|
-
Primitive.div,
|
|
139641
|
+
Primitive$1.div,
|
|
139642
139642
|
{
|
|
139643
139643
|
"data-side": placedSide,
|
|
139644
139644
|
"data-align": placedAlign,
|
|
@@ -139698,7 +139698,7 @@ var PopperArrow = React__namespace.forwardRef(function PopperArrow2(props, forwa
|
|
|
139698
139698
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
139699
139699
|
},
|
|
139700
139700
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
139701
|
-
Root,
|
|
139701
|
+
Root$1,
|
|
139702
139702
|
{
|
|
139703
139703
|
...arrowProps,
|
|
139704
139704
|
ref: forwardedRef,
|
|
@@ -139752,7 +139752,7 @@ function getSideAndAlignFromPlacement(placement) {
|
|
|
139752
139752
|
const [side, align = "center"] = placement.split("-");
|
|
139753
139753
|
return [side, align];
|
|
139754
139754
|
}
|
|
139755
|
-
var Root2$
|
|
139755
|
+
var Root2$2 = Popper;
|
|
139756
139756
|
var Anchor = PopperAnchor;
|
|
139757
139757
|
var Content = PopperContent;
|
|
139758
139758
|
var Arrow = PopperArrow;
|
|
@@ -139761,23 +139761,23 @@ var PORTAL_NAME$1 = "Portal";
|
|
|
139761
139761
|
var Portal$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
139762
139762
|
const { container: containerProp, ...portalProps } = props;
|
|
139763
139763
|
const [mounted, setMounted] = React__namespace.useState(false);
|
|
139764
|
-
useLayoutEffect2(() => setMounted(true), []);
|
|
139764
|
+
useLayoutEffect2$1(() => setMounted(true), []);
|
|
139765
139765
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
139766
|
-
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
139766
|
+
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$1.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
139767
139767
|
});
|
|
139768
139768
|
Portal$1.displayName = PORTAL_NAME$1;
|
|
139769
139769
|
|
|
139770
139770
|
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
139771
|
-
function useControllableState({
|
|
139771
|
+
function useControllableState$1({
|
|
139772
139772
|
prop,
|
|
139773
139773
|
defaultProp,
|
|
139774
139774
|
onChange = () => {
|
|
139775
139775
|
}
|
|
139776
139776
|
}) {
|
|
139777
|
-
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
|
|
139777
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$1({ defaultProp, onChange });
|
|
139778
139778
|
const isControlled = prop !== void 0;
|
|
139779
139779
|
const value = isControlled ? prop : uncontrolledProp;
|
|
139780
|
-
const handleChange = useCallbackRef(onChange);
|
|
139780
|
+
const handleChange = useCallbackRef$1(onChange);
|
|
139781
139781
|
const setValue = React__namespace.useCallback(
|
|
139782
139782
|
(nextValue) => {
|
|
139783
139783
|
if (isControlled) {
|
|
@@ -139792,14 +139792,14 @@ function useControllableState({
|
|
|
139792
139792
|
);
|
|
139793
139793
|
return [value, setValue];
|
|
139794
139794
|
}
|
|
139795
|
-
function useUncontrolledState({
|
|
139795
|
+
function useUncontrolledState$1({
|
|
139796
139796
|
defaultProp,
|
|
139797
139797
|
onChange
|
|
139798
139798
|
}) {
|
|
139799
139799
|
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
139800
139800
|
const [value] = uncontrolledState;
|
|
139801
139801
|
const prevValueRef = React__namespace.useRef(value);
|
|
139802
|
-
const handleChange = useCallbackRef(onChange);
|
|
139802
|
+
const handleChange = useCallbackRef$1(onChange);
|
|
139803
139803
|
React__namespace.useEffect(() => {
|
|
139804
139804
|
if (prevValueRef.current !== value) {
|
|
139805
139805
|
handleChange(value);
|
|
@@ -140129,7 +140129,7 @@ ReactRemoveScroll.classNames = RemoveScroll$1.classNames;
|
|
|
140129
140129
|
var RemoveScroll = ReactRemoveScroll;
|
|
140130
140130
|
|
|
140131
140131
|
var POPOVER_NAME = "Popover";
|
|
140132
|
-
var [createPopoverContext, createPopoverScope] = createContextScope$
|
|
140132
|
+
var [createPopoverContext, createPopoverScope] = createContextScope$4(POPOVER_NAME, [
|
|
140133
140133
|
createPopperScope
|
|
140134
140134
|
]);
|
|
140135
140135
|
var usePopperScope = createPopperScope();
|
|
@@ -140146,16 +140146,16 @@ var Popover$1 = (props) => {
|
|
|
140146
140146
|
const popperScope = usePopperScope(__scopePopover);
|
|
140147
140147
|
const triggerRef = React__namespace.useRef(null);
|
|
140148
140148
|
const [hasCustomAnchor, setHasCustomAnchor] = React__namespace.useState(false);
|
|
140149
|
-
const [open = false, setOpen] = useControllableState({
|
|
140149
|
+
const [open = false, setOpen] = useControllableState$1({
|
|
140150
140150
|
prop: openProp,
|
|
140151
140151
|
defaultProp: defaultOpen,
|
|
140152
140152
|
onChange: onOpenChange
|
|
140153
140153
|
});
|
|
140154
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Root2$
|
|
140154
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Root2$2, { ...popperScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
140155
140155
|
PopoverProvider,
|
|
140156
140156
|
{
|
|
140157
140157
|
scope: __scopePopover,
|
|
140158
|
-
contentId: useId(),
|
|
140158
|
+
contentId: useId$1(),
|
|
140159
140159
|
triggerRef,
|
|
140160
140160
|
open,
|
|
140161
140161
|
onOpenChange: setOpen,
|
|
@@ -140190,18 +140190,18 @@ var PopoverTrigger$1 = React__namespace.forwardRef(
|
|
|
140190
140190
|
const { __scopePopover, ...triggerProps } = props;
|
|
140191
140191
|
const context = usePopoverContext(TRIGGER_NAME, __scopePopover);
|
|
140192
140192
|
const popperScope = usePopperScope(__scopePopover);
|
|
140193
|
-
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
140193
|
+
const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
|
|
140194
140194
|
const trigger = /* @__PURE__ */ jsxRuntime.jsx(
|
|
140195
|
-
Primitive.button,
|
|
140195
|
+
Primitive$1.button,
|
|
140196
140196
|
{
|
|
140197
140197
|
type: "button",
|
|
140198
140198
|
"aria-haspopup": "dialog",
|
|
140199
140199
|
"aria-expanded": context.open,
|
|
140200
140200
|
"aria-controls": context.contentId,
|
|
140201
|
-
"data-state": getState(context.open),
|
|
140201
|
+
"data-state": getState$1(context.open),
|
|
140202
140202
|
...triggerProps,
|
|
140203
140203
|
ref: composedTriggerRef,
|
|
140204
|
-
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
140204
|
+
onClick: composeEventHandlers$1(props.onClick, context.onOpenToggle)
|
|
140205
140205
|
}
|
|
140206
140206
|
);
|
|
140207
140207
|
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsxRuntime.jsx(Anchor, { asChild: true, ...popperScope, children: trigger });
|
|
@@ -140232,7 +140232,7 @@ var PopoverContentModal = React__namespace.forwardRef(
|
|
|
140232
140232
|
(props, forwardedRef) => {
|
|
140233
140233
|
const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
|
|
140234
140234
|
const contentRef = React__namespace.useRef(null);
|
|
140235
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
140235
|
+
const composedRefs = useComposedRefs$1(forwardedRef, contentRef);
|
|
140236
140236
|
const isRightClickOutsideRef = React__namespace.useRef(false);
|
|
140237
140237
|
React__namespace.useEffect(() => {
|
|
140238
140238
|
const content = contentRef.current;
|
|
@@ -140245,11 +140245,11 @@ var PopoverContentModal = React__namespace.forwardRef(
|
|
|
140245
140245
|
ref: composedRefs,
|
|
140246
140246
|
trapFocus: context.open,
|
|
140247
140247
|
disableOutsidePointerEvents: true,
|
|
140248
|
-
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
140248
|
+
onCloseAutoFocus: composeEventHandlers$1(props.onCloseAutoFocus, (event) => {
|
|
140249
140249
|
event.preventDefault();
|
|
140250
140250
|
if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();
|
|
140251
140251
|
}),
|
|
140252
|
-
onPointerDownOutside: composeEventHandlers(
|
|
140252
|
+
onPointerDownOutside: composeEventHandlers$1(
|
|
140253
140253
|
props.onPointerDownOutside,
|
|
140254
140254
|
(event) => {
|
|
140255
140255
|
const originalEvent = event.detail.originalEvent;
|
|
@@ -140259,7 +140259,7 @@ var PopoverContentModal = React__namespace.forwardRef(
|
|
|
140259
140259
|
},
|
|
140260
140260
|
{ checkForDefaultPrevented: false }
|
|
140261
140261
|
),
|
|
140262
|
-
onFocusOutside: composeEventHandlers(
|
|
140262
|
+
onFocusOutside: composeEventHandlers$1(
|
|
140263
140263
|
props.onFocusOutside,
|
|
140264
140264
|
(event) => event.preventDefault(),
|
|
140265
140265
|
{ checkForDefaultPrevented: false }
|
|
@@ -140346,7 +140346,7 @@ var PopoverContentImpl = React__namespace.forwardRef(
|
|
|
140346
140346
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
140347
140347
|
Content,
|
|
140348
140348
|
{
|
|
140349
|
-
"data-state": getState(context.open),
|
|
140349
|
+
"data-state": getState$1(context.open),
|
|
140350
140350
|
role: "dialog",
|
|
140351
140351
|
id: context.contentId,
|
|
140352
140352
|
...popperScope,
|
|
@@ -140377,12 +140377,12 @@ var PopoverClose = React__namespace.forwardRef(
|
|
|
140377
140377
|
const { __scopePopover, ...closeProps } = props;
|
|
140378
140378
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
140379
140379
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
140380
|
-
Primitive.button,
|
|
140380
|
+
Primitive$1.button,
|
|
140381
140381
|
{
|
|
140382
140382
|
type: "button",
|
|
140383
140383
|
...closeProps,
|
|
140384
140384
|
ref: forwardedRef,
|
|
140385
|
-
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
|
140385
|
+
onClick: composeEventHandlers$1(props.onClick, () => context.onOpenChange(false))
|
|
140386
140386
|
}
|
|
140387
140387
|
);
|
|
140388
140388
|
}
|
|
@@ -140397,15 +140397,15 @@ var PopoverArrow = React__namespace.forwardRef(
|
|
|
140397
140397
|
}
|
|
140398
140398
|
);
|
|
140399
140399
|
PopoverArrow.displayName = ARROW_NAME;
|
|
140400
|
-
function getState(open) {
|
|
140400
|
+
function getState$1(open) {
|
|
140401
140401
|
return open ? "open" : "closed";
|
|
140402
140402
|
}
|
|
140403
|
-
var Root2 = Popover$1;
|
|
140403
|
+
var Root2$1 = Popover$1;
|
|
140404
140404
|
var Trigger = PopoverTrigger$1;
|
|
140405
140405
|
var Portal = PopoverPortal;
|
|
140406
140406
|
var Content2 = PopoverContent$1;
|
|
140407
140407
|
|
|
140408
|
-
var PopoverRoot = Root2;
|
|
140408
|
+
var PopoverRoot = Root2$1;
|
|
140409
140409
|
var PopoverTrigger = Trigger;
|
|
140410
140410
|
var PopoverContent = React__namespace.forwardRef(function (_a, ref) {
|
|
140411
140411
|
var className = _a.className, _b = _a.align, align = _b === void 0 ? "center" : _b, _c = _a.sideOffset, sideOffset = _c === void 0 ? 4 : _c, _d = _a.fullWidth, fullWidth = _d === void 0 ? false : _d, props = __rest(_a, ["className", "align", "sideOffset", "fullWidth"]);
|
|
@@ -140514,30 +140514,951 @@ PriceTable.Container = function (_a) {
|
|
|
140514
140514
|
return (React.createElement("div", { className: "s-flex s-w-full s-items-stretch s-gap-3" }, children));
|
|
140515
140515
|
};
|
|
140516
140516
|
|
|
140517
|
-
|
|
140518
|
-
|
|
140519
|
-
|
|
140517
|
+
// packages/core/primitive/src/primitive.tsx
|
|
140518
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
140519
|
+
return function handleEvent(event) {
|
|
140520
|
+
originalEventHandler?.(event);
|
|
140521
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
140522
|
+
return ourEventHandler?.(event);
|
|
140523
|
+
}
|
|
140524
|
+
};
|
|
140525
|
+
}
|
|
140526
|
+
|
|
140527
|
+
// packages/react/compose-refs/src/composeRefs.tsx
|
|
140528
|
+
function setRef(ref, value) {
|
|
140529
|
+
if (typeof ref === "function") {
|
|
140530
|
+
ref(value);
|
|
140531
|
+
} else if (ref !== null && ref !== void 0) {
|
|
140532
|
+
ref.current = value;
|
|
140533
|
+
}
|
|
140534
|
+
}
|
|
140535
|
+
function composeRefs(...refs) {
|
|
140536
|
+
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
140537
|
+
}
|
|
140538
|
+
function useComposedRefs(...refs) {
|
|
140539
|
+
return React__namespace.useCallback(composeRefs(...refs), refs);
|
|
140540
|
+
}
|
|
140541
|
+
|
|
140542
|
+
// packages/react/context/src/createContext.tsx
|
|
140543
|
+
function createContextScope$2(scopeName, createContextScopeDeps = []) {
|
|
140544
|
+
let defaultContexts = [];
|
|
140545
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
140546
|
+
const BaseContext = React__namespace.createContext(defaultContext);
|
|
140547
|
+
const index = defaultContexts.length;
|
|
140548
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
140549
|
+
const Provider = (props) => {
|
|
140550
|
+
const { scope, children, ...context } = props;
|
|
140551
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
140552
|
+
const value = React__namespace.useMemo(() => context, Object.values(context));
|
|
140553
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
|
|
140554
|
+
};
|
|
140555
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
140556
|
+
function useContext2(consumerName, scope) {
|
|
140557
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
140558
|
+
const context = React__namespace.useContext(Context);
|
|
140559
|
+
if (context) return context;
|
|
140560
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
140561
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
140562
|
+
}
|
|
140563
|
+
return [Provider, useContext2];
|
|
140564
|
+
}
|
|
140565
|
+
const createScope = () => {
|
|
140566
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
140567
|
+
return React__namespace.createContext(defaultContext);
|
|
140568
|
+
});
|
|
140569
|
+
return function useScope(scope) {
|
|
140570
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
140571
|
+
return React__namespace.useMemo(
|
|
140572
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
140573
|
+
[scope, contexts]
|
|
140574
|
+
);
|
|
140575
|
+
};
|
|
140576
|
+
};
|
|
140577
|
+
createScope.scopeName = scopeName;
|
|
140578
|
+
return [createContext3, composeContextScopes$2(createScope, ...createContextScopeDeps)];
|
|
140579
|
+
}
|
|
140580
|
+
function composeContextScopes$2(...scopes) {
|
|
140581
|
+
const baseScope = scopes[0];
|
|
140582
|
+
if (scopes.length === 1) return baseScope;
|
|
140583
|
+
const createScope = () => {
|
|
140584
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
140585
|
+
useScope: createScope2(),
|
|
140586
|
+
scopeName: createScope2.scopeName
|
|
140587
|
+
}));
|
|
140588
|
+
return function useComposedScopes(overrideScopes) {
|
|
140589
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
140590
|
+
const scopeProps = useScope(overrideScopes);
|
|
140591
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
140592
|
+
return { ...nextScopes2, ...currentScope };
|
|
140593
|
+
}, {});
|
|
140594
|
+
return React__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
140595
|
+
};
|
|
140596
|
+
};
|
|
140597
|
+
createScope.scopeName = baseScope.scopeName;
|
|
140598
|
+
return createScope;
|
|
140599
|
+
}
|
|
140600
|
+
|
|
140601
|
+
// packages/react/primitive/src/Primitive.tsx
|
|
140602
|
+
var NODES = [
|
|
140603
|
+
"a",
|
|
140604
|
+
"button",
|
|
140605
|
+
"div",
|
|
140606
|
+
"form",
|
|
140607
|
+
"h2",
|
|
140608
|
+
"h3",
|
|
140609
|
+
"img",
|
|
140610
|
+
"input",
|
|
140611
|
+
"label",
|
|
140612
|
+
"li",
|
|
140613
|
+
"nav",
|
|
140614
|
+
"ol",
|
|
140615
|
+
"p",
|
|
140616
|
+
"span",
|
|
140617
|
+
"svg",
|
|
140618
|
+
"ul"
|
|
140619
|
+
];
|
|
140620
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
140621
|
+
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
140622
|
+
const { asChild, ...primitiveProps } = props;
|
|
140623
|
+
const Comp = asChild ? Slot : node;
|
|
140624
|
+
if (typeof window !== "undefined") {
|
|
140625
|
+
window[Symbol.for("radix-ui")] = true;
|
|
140626
|
+
}
|
|
140627
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
140628
|
+
});
|
|
140629
|
+
Node.displayName = `Primitive.${node}`;
|
|
140630
|
+
return { ...primitive, [node]: Node };
|
|
140631
|
+
}, {});
|
|
140632
|
+
|
|
140633
|
+
// packages/react/context/src/createContext.tsx
|
|
140634
|
+
function createContextScope$1(scopeName, createContextScopeDeps = []) {
|
|
140635
|
+
let defaultContexts = [];
|
|
140636
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
140637
|
+
const BaseContext = React__namespace.createContext(defaultContext);
|
|
140638
|
+
const index = defaultContexts.length;
|
|
140639
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
140640
|
+
function Provider(props) {
|
|
140641
|
+
const { scope, children, ...context } = props;
|
|
140642
|
+
const Context = scope?.[scopeName][index] || BaseContext;
|
|
140643
|
+
const value = React__namespace.useMemo(() => context, Object.values(context));
|
|
140644
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
|
|
140645
|
+
}
|
|
140646
|
+
function useContext2(consumerName, scope) {
|
|
140647
|
+
const Context = scope?.[scopeName][index] || BaseContext;
|
|
140648
|
+
const context = React__namespace.useContext(Context);
|
|
140649
|
+
if (context) return context;
|
|
140650
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
140651
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
140652
|
+
}
|
|
140653
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
140654
|
+
return [Provider, useContext2];
|
|
140655
|
+
}
|
|
140656
|
+
const createScope = () => {
|
|
140657
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
140658
|
+
return React__namespace.createContext(defaultContext);
|
|
140659
|
+
});
|
|
140660
|
+
return function useScope(scope) {
|
|
140661
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
140662
|
+
return React__namespace.useMemo(
|
|
140663
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
140664
|
+
[scope, contexts]
|
|
140665
|
+
);
|
|
140666
|
+
};
|
|
140667
|
+
};
|
|
140668
|
+
createScope.scopeName = scopeName;
|
|
140669
|
+
return [createContext3, composeContextScopes$1(createScope, ...createContextScopeDeps)];
|
|
140670
|
+
}
|
|
140671
|
+
function composeContextScopes$1(...scopes) {
|
|
140672
|
+
const baseScope = scopes[0];
|
|
140673
|
+
if (scopes.length === 1) return baseScope;
|
|
140674
|
+
const createScope = () => {
|
|
140675
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
140676
|
+
useScope: createScope2(),
|
|
140677
|
+
scopeName: createScope2.scopeName
|
|
140678
|
+
}));
|
|
140679
|
+
return function useComposedScopes(overrideScopes) {
|
|
140680
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
140681
|
+
const scopeProps = useScope(overrideScopes);
|
|
140682
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
140683
|
+
return { ...nextScopes2, ...currentScope };
|
|
140684
|
+
}, {});
|
|
140685
|
+
return React__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
140686
|
+
};
|
|
140687
|
+
};
|
|
140688
|
+
createScope.scopeName = baseScope.scopeName;
|
|
140689
|
+
return createScope;
|
|
140690
|
+
}
|
|
140691
|
+
|
|
140692
|
+
function createCollection(name) {
|
|
140693
|
+
const PROVIDER_NAME = name + "CollectionProvider";
|
|
140694
|
+
const [createCollectionContext, createCollectionScope] = createContextScope$1(PROVIDER_NAME);
|
|
140695
|
+
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
140696
|
+
PROVIDER_NAME,
|
|
140697
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
140698
|
+
);
|
|
140699
|
+
const CollectionProvider = (props) => {
|
|
140700
|
+
const { scope, children } = props;
|
|
140701
|
+
const ref = React.useRef(null);
|
|
140702
|
+
const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;
|
|
140703
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
140704
|
+
};
|
|
140705
|
+
CollectionProvider.displayName = PROVIDER_NAME;
|
|
140706
|
+
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
140707
|
+
const CollectionSlot = React.forwardRef(
|
|
140708
|
+
(props, forwardedRef) => {
|
|
140709
|
+
const { scope, children } = props;
|
|
140710
|
+
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
140711
|
+
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
140712
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Slot, { ref: composedRefs, children });
|
|
140713
|
+
}
|
|
140714
|
+
);
|
|
140715
|
+
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
140716
|
+
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
140717
|
+
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
140718
|
+
const CollectionItemSlot = React.forwardRef(
|
|
140719
|
+
(props, forwardedRef) => {
|
|
140720
|
+
const { scope, children, ...itemData } = props;
|
|
140721
|
+
const ref = React.useRef(null);
|
|
140722
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
140723
|
+
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
140724
|
+
React.useEffect(() => {
|
|
140725
|
+
context.itemMap.set(ref, { ref, ...itemData });
|
|
140726
|
+
return () => void context.itemMap.delete(ref);
|
|
140727
|
+
});
|
|
140728
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
140729
|
+
}
|
|
140730
|
+
);
|
|
140731
|
+
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
140732
|
+
function useCollection(scope) {
|
|
140733
|
+
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
140734
|
+
const getItems = React.useCallback(() => {
|
|
140735
|
+
const collectionNode = context.collectionRef.current;
|
|
140736
|
+
if (!collectionNode) return [];
|
|
140737
|
+
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
140738
|
+
const items = Array.from(context.itemMap.values());
|
|
140739
|
+
const orderedItems = items.sort(
|
|
140740
|
+
(a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
|
|
140741
|
+
);
|
|
140742
|
+
return orderedItems;
|
|
140743
|
+
}, [context.collectionRef, context.itemMap]);
|
|
140744
|
+
return getItems;
|
|
140745
|
+
}
|
|
140746
|
+
return [
|
|
140747
|
+
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
|
|
140748
|
+
useCollection,
|
|
140749
|
+
createCollectionScope
|
|
140750
|
+
];
|
|
140751
|
+
}
|
|
140752
|
+
|
|
140753
|
+
// packages/react/context/src/createContext.tsx
|
|
140754
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
140755
|
+
let defaultContexts = [];
|
|
140756
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
140757
|
+
const BaseContext = React__namespace.createContext(defaultContext);
|
|
140758
|
+
const index = defaultContexts.length;
|
|
140759
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
140760
|
+
function Provider(props) {
|
|
140761
|
+
const { scope, children, ...context } = props;
|
|
140762
|
+
const Context = scope?.[scopeName][index] || BaseContext;
|
|
140763
|
+
const value = React__namespace.useMemo(() => context, Object.values(context));
|
|
140764
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
|
|
140765
|
+
}
|
|
140766
|
+
function useContext2(consumerName, scope) {
|
|
140767
|
+
const Context = scope?.[scopeName][index] || BaseContext;
|
|
140768
|
+
const context = React__namespace.useContext(Context);
|
|
140769
|
+
if (context) return context;
|
|
140770
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
140771
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
140772
|
+
}
|
|
140773
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
140774
|
+
return [Provider, useContext2];
|
|
140775
|
+
}
|
|
140776
|
+
const createScope = () => {
|
|
140777
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
140778
|
+
return React__namespace.createContext(defaultContext);
|
|
140779
|
+
});
|
|
140780
|
+
return function useScope(scope) {
|
|
140781
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
140782
|
+
return React__namespace.useMemo(
|
|
140783
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
140784
|
+
[scope, contexts]
|
|
140785
|
+
);
|
|
140786
|
+
};
|
|
140787
|
+
};
|
|
140788
|
+
createScope.scopeName = scopeName;
|
|
140789
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
140790
|
+
}
|
|
140791
|
+
function composeContextScopes(...scopes) {
|
|
140792
|
+
const baseScope = scopes[0];
|
|
140793
|
+
if (scopes.length === 1) return baseScope;
|
|
140794
|
+
const createScope = () => {
|
|
140795
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
140796
|
+
useScope: createScope2(),
|
|
140797
|
+
scopeName: createScope2.scopeName
|
|
140798
|
+
}));
|
|
140799
|
+
return function useComposedScopes(overrideScopes) {
|
|
140800
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
140801
|
+
const scopeProps = useScope(overrideScopes);
|
|
140802
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
140803
|
+
return { ...nextScopes2, ...currentScope };
|
|
140804
|
+
}, {});
|
|
140805
|
+
return React__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
140806
|
+
};
|
|
140807
|
+
};
|
|
140808
|
+
createScope.scopeName = baseScope.scopeName;
|
|
140809
|
+
return createScope;
|
|
140810
|
+
}
|
|
140811
|
+
|
|
140812
|
+
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
140813
|
+
var useLayoutEffect2 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
140520
140814
|
};
|
|
140521
|
-
|
|
140522
|
-
|
|
140523
|
-
|
|
140524
|
-
|
|
140525
|
-
|
|
140815
|
+
|
|
140816
|
+
// packages/react/id/src/id.tsx
|
|
140817
|
+
var useReactId = React__namespace["useId".toString()] || (() => void 0);
|
|
140818
|
+
var count = 0;
|
|
140819
|
+
function useId(deterministicId) {
|
|
140820
|
+
const [id, setId] = React__namespace.useState(useReactId());
|
|
140821
|
+
useLayoutEffect2(() => {
|
|
140822
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
|
140823
|
+
}, [deterministicId]);
|
|
140824
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
|
140825
|
+
}
|
|
140826
|
+
|
|
140827
|
+
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
140828
|
+
function useCallbackRef(callback) {
|
|
140829
|
+
const callbackRef = React__namespace.useRef(callback);
|
|
140830
|
+
React__namespace.useEffect(() => {
|
|
140831
|
+
callbackRef.current = callback;
|
|
140832
|
+
});
|
|
140833
|
+
return React__namespace.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
140834
|
+
}
|
|
140835
|
+
|
|
140836
|
+
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
140837
|
+
function useControllableState({
|
|
140838
|
+
prop,
|
|
140839
|
+
defaultProp,
|
|
140840
|
+
onChange = () => {
|
|
140841
|
+
}
|
|
140842
|
+
}) {
|
|
140843
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
|
|
140844
|
+
const isControlled = prop !== void 0;
|
|
140845
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
140846
|
+
const handleChange = useCallbackRef(onChange);
|
|
140847
|
+
const setValue = React__namespace.useCallback(
|
|
140848
|
+
(nextValue) => {
|
|
140849
|
+
if (isControlled) {
|
|
140850
|
+
const setter = nextValue;
|
|
140851
|
+
const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
|
|
140852
|
+
if (value2 !== prop) handleChange(value2);
|
|
140853
|
+
} else {
|
|
140854
|
+
setUncontrolledProp(nextValue);
|
|
140855
|
+
}
|
|
140856
|
+
},
|
|
140857
|
+
[isControlled, prop, setUncontrolledProp, handleChange]
|
|
140858
|
+
);
|
|
140859
|
+
return [value, setValue];
|
|
140860
|
+
}
|
|
140861
|
+
function useUncontrolledState({
|
|
140862
|
+
defaultProp,
|
|
140863
|
+
onChange
|
|
140864
|
+
}) {
|
|
140865
|
+
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
140866
|
+
const [value] = uncontrolledState;
|
|
140867
|
+
const prevValueRef = React__namespace.useRef(value);
|
|
140868
|
+
const handleChange = useCallbackRef(onChange);
|
|
140869
|
+
React__namespace.useEffect(() => {
|
|
140870
|
+
if (prevValueRef.current !== value) {
|
|
140871
|
+
handleChange(value);
|
|
140872
|
+
prevValueRef.current = value;
|
|
140873
|
+
}
|
|
140874
|
+
}, [value, prevValueRef, handleChange]);
|
|
140875
|
+
return uncontrolledState;
|
|
140876
|
+
}
|
|
140877
|
+
|
|
140878
|
+
// packages/react/direction/src/Direction.tsx
|
|
140879
|
+
var DirectionContext = React__namespace.createContext(void 0);
|
|
140880
|
+
function useDirection(localDir) {
|
|
140881
|
+
const globalDir = React__namespace.useContext(DirectionContext);
|
|
140882
|
+
return localDir || globalDir || "ltr";
|
|
140883
|
+
}
|
|
140884
|
+
|
|
140885
|
+
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
140886
|
+
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
140887
|
+
var GROUP_NAME = "RovingFocusGroup";
|
|
140888
|
+
var [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);
|
|
140889
|
+
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
|
|
140890
|
+
GROUP_NAME,
|
|
140891
|
+
[createCollectionScope]
|
|
140892
|
+
);
|
|
140893
|
+
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
|
|
140894
|
+
var RovingFocusGroup = React__namespace.forwardRef(
|
|
140895
|
+
(props, forwardedRef) => {
|
|
140896
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntime.jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsxRuntime.jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
140897
|
+
}
|
|
140898
|
+
);
|
|
140899
|
+
RovingFocusGroup.displayName = GROUP_NAME;
|
|
140900
|
+
var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) => {
|
|
140901
|
+
const {
|
|
140902
|
+
__scopeRovingFocusGroup,
|
|
140903
|
+
orientation,
|
|
140904
|
+
loop = false,
|
|
140905
|
+
dir,
|
|
140906
|
+
currentTabStopId: currentTabStopIdProp,
|
|
140907
|
+
defaultCurrentTabStopId,
|
|
140908
|
+
onCurrentTabStopIdChange,
|
|
140909
|
+
onEntryFocus,
|
|
140910
|
+
preventScrollOnEntryFocus = false,
|
|
140911
|
+
...groupProps
|
|
140912
|
+
} = props;
|
|
140913
|
+
const ref = React__namespace.useRef(null);
|
|
140914
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
140915
|
+
const direction = useDirection(dir);
|
|
140916
|
+
const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({
|
|
140917
|
+
prop: currentTabStopIdProp,
|
|
140918
|
+
defaultProp: defaultCurrentTabStopId,
|
|
140919
|
+
onChange: onCurrentTabStopIdChange
|
|
140920
|
+
});
|
|
140921
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = React__namespace.useState(false);
|
|
140922
|
+
const handleEntryFocus = useCallbackRef(onEntryFocus);
|
|
140923
|
+
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
140924
|
+
const isClickFocusRef = React__namespace.useRef(false);
|
|
140925
|
+
const [focusableItemsCount, setFocusableItemsCount] = React__namespace.useState(0);
|
|
140926
|
+
React__namespace.useEffect(() => {
|
|
140927
|
+
const node = ref.current;
|
|
140928
|
+
if (node) {
|
|
140929
|
+
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
140930
|
+
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
140931
|
+
}
|
|
140932
|
+
}, [handleEntryFocus]);
|
|
140933
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
140934
|
+
RovingFocusProvider,
|
|
140935
|
+
{
|
|
140936
|
+
scope: __scopeRovingFocusGroup,
|
|
140937
|
+
orientation,
|
|
140938
|
+
dir: direction,
|
|
140939
|
+
loop,
|
|
140940
|
+
currentTabStopId,
|
|
140941
|
+
onItemFocus: React__namespace.useCallback(
|
|
140942
|
+
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
140943
|
+
[setCurrentTabStopId]
|
|
140944
|
+
),
|
|
140945
|
+
onItemShiftTab: React__namespace.useCallback(() => setIsTabbingBackOut(true), []),
|
|
140946
|
+
onFocusableItemAdd: React__namespace.useCallback(
|
|
140947
|
+
() => setFocusableItemsCount((prevCount) => prevCount + 1),
|
|
140948
|
+
[]
|
|
140949
|
+
),
|
|
140950
|
+
onFocusableItemRemove: React__namespace.useCallback(
|
|
140951
|
+
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
140952
|
+
[]
|
|
140953
|
+
),
|
|
140954
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
140955
|
+
Primitive.div,
|
|
140956
|
+
{
|
|
140957
|
+
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
140958
|
+
"data-orientation": orientation,
|
|
140959
|
+
...groupProps,
|
|
140960
|
+
ref: composedRefs,
|
|
140961
|
+
style: { outline: "none", ...props.style },
|
|
140962
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
|
|
140963
|
+
isClickFocusRef.current = true;
|
|
140964
|
+
}),
|
|
140965
|
+
onFocus: composeEventHandlers(props.onFocus, (event) => {
|
|
140966
|
+
const isKeyboardFocus = !isClickFocusRef.current;
|
|
140967
|
+
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
140968
|
+
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
|
|
140969
|
+
event.currentTarget.dispatchEvent(entryFocusEvent);
|
|
140970
|
+
if (!entryFocusEvent.defaultPrevented) {
|
|
140971
|
+
const items = getItems().filter((item) => item.focusable);
|
|
140972
|
+
const activeItem = items.find((item) => item.active);
|
|
140973
|
+
const currentItem = items.find((item) => item.id === currentTabStopId);
|
|
140974
|
+
const candidateItems = [activeItem, currentItem, ...items].filter(
|
|
140975
|
+
Boolean
|
|
140976
|
+
);
|
|
140977
|
+
const candidateNodes = candidateItems.map((item) => item.ref.current);
|
|
140978
|
+
focusFirst(candidateNodes, preventScrollOnEntryFocus);
|
|
140979
|
+
}
|
|
140980
|
+
}
|
|
140981
|
+
isClickFocusRef.current = false;
|
|
140982
|
+
}),
|
|
140983
|
+
onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
|
|
140984
|
+
}
|
|
140985
|
+
)
|
|
140986
|
+
}
|
|
140987
|
+
);
|
|
140988
|
+
});
|
|
140989
|
+
var ITEM_NAME$1 = "RovingFocusGroupItem";
|
|
140990
|
+
var RovingFocusGroupItem = React__namespace.forwardRef(
|
|
140991
|
+
(props, forwardedRef) => {
|
|
140992
|
+
const {
|
|
140993
|
+
__scopeRovingFocusGroup,
|
|
140994
|
+
focusable = true,
|
|
140995
|
+
active = false,
|
|
140996
|
+
tabStopId,
|
|
140997
|
+
...itemProps
|
|
140998
|
+
} = props;
|
|
140999
|
+
const autoId = useId();
|
|
141000
|
+
const id = tabStopId || autoId;
|
|
141001
|
+
const context = useRovingFocusContext(ITEM_NAME$1, __scopeRovingFocusGroup);
|
|
141002
|
+
const isCurrentTabStop = context.currentTabStopId === id;
|
|
141003
|
+
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
141004
|
+
const { onFocusableItemAdd, onFocusableItemRemove } = context;
|
|
141005
|
+
React__namespace.useEffect(() => {
|
|
141006
|
+
if (focusable) {
|
|
141007
|
+
onFocusableItemAdd();
|
|
141008
|
+
return () => onFocusableItemRemove();
|
|
141009
|
+
}
|
|
141010
|
+
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
141011
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
141012
|
+
Collection.ItemSlot,
|
|
141013
|
+
{
|
|
141014
|
+
scope: __scopeRovingFocusGroup,
|
|
141015
|
+
id,
|
|
141016
|
+
focusable,
|
|
141017
|
+
active,
|
|
141018
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141019
|
+
Primitive.span,
|
|
141020
|
+
{
|
|
141021
|
+
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
141022
|
+
"data-orientation": context.orientation,
|
|
141023
|
+
...itemProps,
|
|
141024
|
+
ref: forwardedRef,
|
|
141025
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
141026
|
+
if (!focusable) event.preventDefault();
|
|
141027
|
+
else context.onItemFocus(id);
|
|
141028
|
+
}),
|
|
141029
|
+
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
|
|
141030
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
141031
|
+
if (event.key === "Tab" && event.shiftKey) {
|
|
141032
|
+
context.onItemShiftTab();
|
|
141033
|
+
return;
|
|
141034
|
+
}
|
|
141035
|
+
if (event.target !== event.currentTarget) return;
|
|
141036
|
+
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
141037
|
+
if (focusIntent !== void 0) {
|
|
141038
|
+
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
|
|
141039
|
+
event.preventDefault();
|
|
141040
|
+
const items = getItems().filter((item) => item.focusable);
|
|
141041
|
+
let candidateNodes = items.map((item) => item.ref.current);
|
|
141042
|
+
if (focusIntent === "last") candidateNodes.reverse();
|
|
141043
|
+
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
141044
|
+
if (focusIntent === "prev") candidateNodes.reverse();
|
|
141045
|
+
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
141046
|
+
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
141047
|
+
}
|
|
141048
|
+
setTimeout(() => focusFirst(candidateNodes));
|
|
141049
|
+
}
|
|
141050
|
+
})
|
|
141051
|
+
}
|
|
141052
|
+
)
|
|
141053
|
+
}
|
|
141054
|
+
);
|
|
141055
|
+
}
|
|
141056
|
+
);
|
|
141057
|
+
RovingFocusGroupItem.displayName = ITEM_NAME$1;
|
|
141058
|
+
var MAP_KEY_TO_FOCUS_INTENT = {
|
|
141059
|
+
ArrowLeft: "prev",
|
|
141060
|
+
ArrowUp: "prev",
|
|
141061
|
+
ArrowRight: "next",
|
|
141062
|
+
ArrowDown: "next",
|
|
141063
|
+
PageUp: "first",
|
|
141064
|
+
Home: "first",
|
|
141065
|
+
PageDown: "last",
|
|
141066
|
+
End: "last"
|
|
140526
141067
|
};
|
|
140527
|
-
function
|
|
140528
|
-
|
|
140529
|
-
|
|
140530
|
-
|
|
140531
|
-
|
|
140532
|
-
|
|
140533
|
-
|
|
140534
|
-
|
|
140535
|
-
|
|
140536
|
-
|
|
140537
|
-
|
|
140538
|
-
|
|
141068
|
+
function getDirectionAwareKey(key, dir) {
|
|
141069
|
+
if (dir !== "rtl") return key;
|
|
141070
|
+
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
141071
|
+
}
|
|
141072
|
+
function getFocusIntent(event, orientation, dir) {
|
|
141073
|
+
const key = getDirectionAwareKey(event.key, dir);
|
|
141074
|
+
if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
|
|
141075
|
+
if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
|
|
141076
|
+
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
141077
|
+
}
|
|
141078
|
+
function focusFirst(candidates, preventScroll = false) {
|
|
141079
|
+
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
141080
|
+
for (const candidate of candidates) {
|
|
141081
|
+
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
141082
|
+
candidate.focus({ preventScroll });
|
|
141083
|
+
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
141084
|
+
}
|
|
141085
|
+
}
|
|
141086
|
+
function wrapArray(array, startIndex) {
|
|
141087
|
+
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
141088
|
+
}
|
|
141089
|
+
var Root = RovingFocusGroup;
|
|
141090
|
+
var Item = RovingFocusGroupItem;
|
|
141091
|
+
|
|
141092
|
+
// packages/react/use-size/src/useSize.tsx
|
|
141093
|
+
function useSize(element) {
|
|
141094
|
+
const [size, setSize] = React__namespace.useState(void 0);
|
|
141095
|
+
useLayoutEffect2(() => {
|
|
141096
|
+
if (element) {
|
|
141097
|
+
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
141098
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
141099
|
+
if (!Array.isArray(entries)) {
|
|
141100
|
+
return;
|
|
141101
|
+
}
|
|
141102
|
+
if (!entries.length) {
|
|
141103
|
+
return;
|
|
141104
|
+
}
|
|
141105
|
+
const entry = entries[0];
|
|
141106
|
+
let width;
|
|
141107
|
+
let height;
|
|
141108
|
+
if ("borderBoxSize" in entry) {
|
|
141109
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
|
141110
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
141111
|
+
width = borderSize["inlineSize"];
|
|
141112
|
+
height = borderSize["blockSize"];
|
|
141113
|
+
} else {
|
|
141114
|
+
width = element.offsetWidth;
|
|
141115
|
+
height = element.offsetHeight;
|
|
141116
|
+
}
|
|
141117
|
+
setSize({ width, height });
|
|
141118
|
+
});
|
|
141119
|
+
resizeObserver.observe(element, { box: "border-box" });
|
|
141120
|
+
return () => resizeObserver.unobserve(element);
|
|
141121
|
+
} else {
|
|
141122
|
+
setSize(void 0);
|
|
141123
|
+
}
|
|
141124
|
+
}, [element]);
|
|
141125
|
+
return size;
|
|
140539
141126
|
}
|
|
140540
141127
|
|
|
141128
|
+
// packages/react/use-previous/src/usePrevious.tsx
|
|
141129
|
+
function usePrevious(value) {
|
|
141130
|
+
const ref = React__namespace.useRef({ value, previous: value });
|
|
141131
|
+
return React__namespace.useMemo(() => {
|
|
141132
|
+
if (ref.current.value !== value) {
|
|
141133
|
+
ref.current.previous = ref.current.value;
|
|
141134
|
+
ref.current.value = value;
|
|
141135
|
+
}
|
|
141136
|
+
return ref.current.previous;
|
|
141137
|
+
}, [value]);
|
|
141138
|
+
}
|
|
141139
|
+
|
|
141140
|
+
var RADIO_NAME = "Radio";
|
|
141141
|
+
var [createRadioContext, createRadioScope] = createContextScope$2(RADIO_NAME);
|
|
141142
|
+
var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);
|
|
141143
|
+
var Radio = React__namespace.forwardRef(
|
|
141144
|
+
(props, forwardedRef) => {
|
|
141145
|
+
const {
|
|
141146
|
+
__scopeRadio,
|
|
141147
|
+
name,
|
|
141148
|
+
checked = false,
|
|
141149
|
+
required,
|
|
141150
|
+
disabled,
|
|
141151
|
+
value = "on",
|
|
141152
|
+
onCheck,
|
|
141153
|
+
form,
|
|
141154
|
+
...radioProps
|
|
141155
|
+
} = props;
|
|
141156
|
+
const [button, setButton] = React__namespace.useState(null);
|
|
141157
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
|
|
141158
|
+
const hasConsumerStoppedPropagationRef = React__namespace.useRef(false);
|
|
141159
|
+
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
141160
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [
|
|
141161
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
141162
|
+
Primitive.button,
|
|
141163
|
+
{
|
|
141164
|
+
type: "button",
|
|
141165
|
+
role: "radio",
|
|
141166
|
+
"aria-checked": checked,
|
|
141167
|
+
"data-state": getState(checked),
|
|
141168
|
+
"data-disabled": disabled ? "" : void 0,
|
|
141169
|
+
disabled,
|
|
141170
|
+
value,
|
|
141171
|
+
...radioProps,
|
|
141172
|
+
ref: composedRefs,
|
|
141173
|
+
onClick: composeEventHandlers(props.onClick, (event) => {
|
|
141174
|
+
if (!checked) onCheck?.();
|
|
141175
|
+
if (isFormControl) {
|
|
141176
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
141177
|
+
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
141178
|
+
}
|
|
141179
|
+
})
|
|
141180
|
+
}
|
|
141181
|
+
),
|
|
141182
|
+
isFormControl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
141183
|
+
BubbleInput,
|
|
141184
|
+
{
|
|
141185
|
+
control: button,
|
|
141186
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
141187
|
+
name,
|
|
141188
|
+
value,
|
|
141189
|
+
checked,
|
|
141190
|
+
required,
|
|
141191
|
+
disabled,
|
|
141192
|
+
form,
|
|
141193
|
+
style: { transform: "translateX(-100%)" }
|
|
141194
|
+
}
|
|
141195
|
+
)
|
|
141196
|
+
] });
|
|
141197
|
+
}
|
|
141198
|
+
);
|
|
141199
|
+
Radio.displayName = RADIO_NAME;
|
|
141200
|
+
var INDICATOR_NAME = "RadioIndicator";
|
|
141201
|
+
var RadioIndicator = React__namespace.forwardRef(
|
|
141202
|
+
(props, forwardedRef) => {
|
|
141203
|
+
const { __scopeRadio, forceMount, ...indicatorProps } = props;
|
|
141204
|
+
const context = useRadioContext(INDICATOR_NAME, __scopeRadio);
|
|
141205
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141206
|
+
Primitive.span,
|
|
141207
|
+
{
|
|
141208
|
+
"data-state": getState(context.checked),
|
|
141209
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
141210
|
+
...indicatorProps,
|
|
141211
|
+
ref: forwardedRef
|
|
141212
|
+
}
|
|
141213
|
+
) });
|
|
141214
|
+
}
|
|
141215
|
+
);
|
|
141216
|
+
RadioIndicator.displayName = INDICATOR_NAME;
|
|
141217
|
+
var BubbleInput = (props) => {
|
|
141218
|
+
const { control, checked, bubbles = true, ...inputProps } = props;
|
|
141219
|
+
const ref = React__namespace.useRef(null);
|
|
141220
|
+
const prevChecked = usePrevious(checked);
|
|
141221
|
+
const controlSize = useSize(control);
|
|
141222
|
+
React__namespace.useEffect(() => {
|
|
141223
|
+
const input = ref.current;
|
|
141224
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
141225
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked");
|
|
141226
|
+
const setChecked = descriptor.set;
|
|
141227
|
+
if (prevChecked !== checked && setChecked) {
|
|
141228
|
+
const event = new Event("click", { bubbles });
|
|
141229
|
+
setChecked.call(input, checked);
|
|
141230
|
+
input.dispatchEvent(event);
|
|
141231
|
+
}
|
|
141232
|
+
}, [prevChecked, checked, bubbles]);
|
|
141233
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
141234
|
+
"input",
|
|
141235
|
+
{
|
|
141236
|
+
type: "radio",
|
|
141237
|
+
"aria-hidden": true,
|
|
141238
|
+
defaultChecked: checked,
|
|
141239
|
+
...inputProps,
|
|
141240
|
+
tabIndex: -1,
|
|
141241
|
+
ref,
|
|
141242
|
+
style: {
|
|
141243
|
+
...props.style,
|
|
141244
|
+
...controlSize,
|
|
141245
|
+
position: "absolute",
|
|
141246
|
+
pointerEvents: "none",
|
|
141247
|
+
opacity: 0,
|
|
141248
|
+
margin: 0
|
|
141249
|
+
}
|
|
141250
|
+
}
|
|
141251
|
+
);
|
|
141252
|
+
};
|
|
141253
|
+
function getState(checked) {
|
|
141254
|
+
return checked ? "checked" : "unchecked";
|
|
141255
|
+
}
|
|
141256
|
+
var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
|
|
141257
|
+
var RADIO_GROUP_NAME = "RadioGroup";
|
|
141258
|
+
var [createRadioGroupContext, createRadioGroupScope] = createContextScope$2(RADIO_GROUP_NAME, [
|
|
141259
|
+
createRovingFocusGroupScope,
|
|
141260
|
+
createRadioScope
|
|
141261
|
+
]);
|
|
141262
|
+
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
141263
|
+
var useRadioScope = createRadioScope();
|
|
141264
|
+
var [RadioGroupProvider, useRadioGroupContext] = createRadioGroupContext(RADIO_GROUP_NAME);
|
|
141265
|
+
var RadioGroup$1 = React__namespace.forwardRef(
|
|
141266
|
+
(props, forwardedRef) => {
|
|
141267
|
+
const {
|
|
141268
|
+
__scopeRadioGroup,
|
|
141269
|
+
name,
|
|
141270
|
+
defaultValue,
|
|
141271
|
+
value: valueProp,
|
|
141272
|
+
required = false,
|
|
141273
|
+
disabled = false,
|
|
141274
|
+
orientation,
|
|
141275
|
+
dir,
|
|
141276
|
+
loop = true,
|
|
141277
|
+
onValueChange,
|
|
141278
|
+
...groupProps
|
|
141279
|
+
} = props;
|
|
141280
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
|
|
141281
|
+
const direction = useDirection(dir);
|
|
141282
|
+
const [value, setValue] = useControllableState({
|
|
141283
|
+
prop: valueProp,
|
|
141284
|
+
defaultProp: defaultValue,
|
|
141285
|
+
onChange: onValueChange
|
|
141286
|
+
});
|
|
141287
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
141288
|
+
RadioGroupProvider,
|
|
141289
|
+
{
|
|
141290
|
+
scope: __scopeRadioGroup,
|
|
141291
|
+
name,
|
|
141292
|
+
required,
|
|
141293
|
+
disabled,
|
|
141294
|
+
value,
|
|
141295
|
+
onValueChange: setValue,
|
|
141296
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141297
|
+
Root,
|
|
141298
|
+
{
|
|
141299
|
+
asChild: true,
|
|
141300
|
+
...rovingFocusGroupScope,
|
|
141301
|
+
orientation,
|
|
141302
|
+
dir: direction,
|
|
141303
|
+
loop,
|
|
141304
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141305
|
+
Primitive.div,
|
|
141306
|
+
{
|
|
141307
|
+
role: "radiogroup",
|
|
141308
|
+
"aria-required": required,
|
|
141309
|
+
"aria-orientation": orientation,
|
|
141310
|
+
"data-disabled": disabled ? "" : void 0,
|
|
141311
|
+
dir: direction,
|
|
141312
|
+
...groupProps,
|
|
141313
|
+
ref: forwardedRef
|
|
141314
|
+
}
|
|
141315
|
+
)
|
|
141316
|
+
}
|
|
141317
|
+
)
|
|
141318
|
+
}
|
|
141319
|
+
);
|
|
141320
|
+
}
|
|
141321
|
+
);
|
|
141322
|
+
RadioGroup$1.displayName = RADIO_GROUP_NAME;
|
|
141323
|
+
var ITEM_NAME = "RadioGroupItem";
|
|
141324
|
+
var RadioGroupItem$1 = React__namespace.forwardRef(
|
|
141325
|
+
(props, forwardedRef) => {
|
|
141326
|
+
const { __scopeRadioGroup, disabled, ...itemProps } = props;
|
|
141327
|
+
const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup);
|
|
141328
|
+
const isDisabled = context.disabled || disabled;
|
|
141329
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
|
|
141330
|
+
const radioScope = useRadioScope(__scopeRadioGroup);
|
|
141331
|
+
const ref = React__namespace.useRef(null);
|
|
141332
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
141333
|
+
const checked = context.value === itemProps.value;
|
|
141334
|
+
const isArrowKeyPressedRef = React__namespace.useRef(false);
|
|
141335
|
+
React__namespace.useEffect(() => {
|
|
141336
|
+
const handleKeyDown = (event) => {
|
|
141337
|
+
if (ARROW_KEYS.includes(event.key)) {
|
|
141338
|
+
isArrowKeyPressedRef.current = true;
|
|
141339
|
+
}
|
|
141340
|
+
};
|
|
141341
|
+
const handleKeyUp = () => isArrowKeyPressedRef.current = false;
|
|
141342
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
141343
|
+
document.addEventListener("keyup", handleKeyUp);
|
|
141344
|
+
return () => {
|
|
141345
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
141346
|
+
document.removeEventListener("keyup", handleKeyUp);
|
|
141347
|
+
};
|
|
141348
|
+
}, []);
|
|
141349
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
141350
|
+
Item,
|
|
141351
|
+
{
|
|
141352
|
+
asChild: true,
|
|
141353
|
+
...rovingFocusGroupScope,
|
|
141354
|
+
focusable: !isDisabled,
|
|
141355
|
+
active: checked,
|
|
141356
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141357
|
+
Radio,
|
|
141358
|
+
{
|
|
141359
|
+
disabled: isDisabled,
|
|
141360
|
+
required: context.required,
|
|
141361
|
+
checked,
|
|
141362
|
+
...radioScope,
|
|
141363
|
+
...itemProps,
|
|
141364
|
+
name: context.name,
|
|
141365
|
+
ref: composedRefs,
|
|
141366
|
+
onCheck: () => context.onValueChange(itemProps.value),
|
|
141367
|
+
onKeyDown: composeEventHandlers((event) => {
|
|
141368
|
+
if (event.key === "Enter") event.preventDefault();
|
|
141369
|
+
}),
|
|
141370
|
+
onFocus: composeEventHandlers(itemProps.onFocus, () => {
|
|
141371
|
+
if (isArrowKeyPressedRef.current) ref.current?.click();
|
|
141372
|
+
})
|
|
141373
|
+
}
|
|
141374
|
+
)
|
|
141375
|
+
}
|
|
141376
|
+
);
|
|
141377
|
+
}
|
|
141378
|
+
);
|
|
141379
|
+
RadioGroupItem$1.displayName = ITEM_NAME;
|
|
141380
|
+
var INDICATOR_NAME2 = "RadioGroupIndicator";
|
|
141381
|
+
var RadioGroupIndicator = React__namespace.forwardRef(
|
|
141382
|
+
(props, forwardedRef) => {
|
|
141383
|
+
const { __scopeRadioGroup, ...indicatorProps } = props;
|
|
141384
|
+
const radioScope = useRadioScope(__scopeRadioGroup);
|
|
141385
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadioIndicator, { ...radioScope, ...indicatorProps, ref: forwardedRef });
|
|
141386
|
+
}
|
|
141387
|
+
);
|
|
141388
|
+
RadioGroupIndicator.displayName = INDICATOR_NAME2;
|
|
141389
|
+
var Root2 = RadioGroup$1;
|
|
141390
|
+
var Item2 = RadioGroupItem$1;
|
|
141391
|
+
var Indicator = RadioGroupIndicator;
|
|
141392
|
+
|
|
141393
|
+
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}
|
|
141394
|
+
|
|
141395
|
+
const falsyToString = (value)=>typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
|
|
141396
|
+
const cx = clsx;
|
|
141397
|
+
const cva = (base, config)=>{
|
|
141398
|
+
return (props)=>{
|
|
141399
|
+
var ref;
|
|
141400
|
+
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
141401
|
+
const { variants , defaultVariants } = config;
|
|
141402
|
+
const getVariantClassNames = Object.keys(variants).map((variant)=>{
|
|
141403
|
+
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
141404
|
+
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
141405
|
+
if (variantProp === null) return null;
|
|
141406
|
+
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
141407
|
+
return variants[variant][variantKey];
|
|
141408
|
+
});
|
|
141409
|
+
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
|
|
141410
|
+
let [key, value] = param;
|
|
141411
|
+
if (value === undefined) {
|
|
141412
|
+
return acc;
|
|
141413
|
+
}
|
|
141414
|
+
acc[key] = value;
|
|
141415
|
+
return acc;
|
|
141416
|
+
}, {});
|
|
141417
|
+
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1)=>{
|
|
141418
|
+
let { class: cvClass , className: cvClassName , ...compoundVariantOptions } = param1;
|
|
141419
|
+
return Object.entries(compoundVariantOptions).every((param)=>{
|
|
141420
|
+
let [key, value] = param;
|
|
141421
|
+
return Array.isArray(value) ? value.includes({
|
|
141422
|
+
...defaultVariants,
|
|
141423
|
+
...propsWithoutUndefined
|
|
141424
|
+
}[key]) : ({
|
|
141425
|
+
...defaultVariants,
|
|
141426
|
+
...propsWithoutUndefined
|
|
141427
|
+
})[key] === value;
|
|
141428
|
+
}) ? [
|
|
141429
|
+
...acc,
|
|
141430
|
+
cvClass,
|
|
141431
|
+
cvClassName
|
|
141432
|
+
] : acc;
|
|
141433
|
+
}, []);
|
|
141434
|
+
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
141435
|
+
};
|
|
141436
|
+
};
|
|
141437
|
+
|
|
141438
|
+
var radioStyles = cva(cn("s-aspect-square s-h-4 s-w-4 s-rounded-full s-border s-border-primary-500 s-text-foreground s-ring-offset-background", "focus-visible:s-outline-none focus-visible:s-ring-2 focus-visible:s-ring-offset-2 focus-visible:s-ring-ring", "disabled:s-cursor-not-allowed disabled:s-opacity-50", "checked:s-ring-0 checked:s-bg-action-500"), {
|
|
141439
|
+
variants: {
|
|
141440
|
+
size: {
|
|
141441
|
+
xs: "s-h-4 s-w-4",
|
|
141442
|
+
sm: "s-h-5 s-w-5",
|
|
141443
|
+
},
|
|
141444
|
+
},
|
|
141445
|
+
defaultVariants: {
|
|
141446
|
+
size: "xs",
|
|
141447
|
+
},
|
|
141448
|
+
});
|
|
141449
|
+
var RadioGroup = React__namespace.forwardRef(function (_a, ref) {
|
|
141450
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
141451
|
+
return (React__namespace.createElement(Root2, __assign({ className: cn("s-grid s-gap-2", className) }, props, { ref: ref })));
|
|
141452
|
+
});
|
|
141453
|
+
RadioGroup.displayName = Root2.displayName;
|
|
141454
|
+
var RadioGroupItem = React__namespace.forwardRef(function (_a, ref) {
|
|
141455
|
+
var className = _a.className, _b = _a.size, size = _b === void 0 ? "xs" : _b, props = __rest(_a, ["className", "size"]);
|
|
141456
|
+
return (React__namespace.createElement(Item2, __assign({ ref: ref, className: cn(radioStyles({ size: size }), className) }, props),
|
|
141457
|
+
React__namespace.createElement(Indicator, { className: "s-flex s-items-center s-justify-center" },
|
|
141458
|
+
React__namespace.createElement(CircleIcon, { className: cn(size === "xs" ? "s-h-2.5 s-w-2.5" : "s-h-3 s-w-3", "s-fill-current s-text-current focus:s-bg-action-50-dark") }))));
|
|
141459
|
+
});
|
|
141460
|
+
RadioGroupItem.displayName = Item2.displayName;
|
|
141461
|
+
|
|
140541
141462
|
var sizeClasses$1 = {
|
|
140542
141463
|
xs: "s-text-xs s-h-[26px] s-pl-3 s-pr-6 s-pt-1.5 s-rounded-lg",
|
|
140543
141464
|
sm: "s-text-sm s-h-[34px] s-pl-4 s-pr-8 s-pt-1.5 s-rounded-xl",
|
|
@@ -141235,7 +142156,7 @@ exports.InformationCircleIcon = InformationCircleIcon;
|
|
|
141235
142156
|
exports.InformationCircleStrokeIcon = SvgInformationCircle$1;
|
|
141236
142157
|
exports.Input = Input;
|
|
141237
142158
|
exports.IntercomLogo = IntercomLogo;
|
|
141238
|
-
exports.Item = Item$
|
|
142159
|
+
exports.Item = Item$2;
|
|
141239
142160
|
exports.KeyIcon = SvgKey$3;
|
|
141240
142161
|
exports.KeyStrokeIcon = SvgKey$1;
|
|
141241
142162
|
exports.Label = Label$1;
|
|
@@ -141339,7 +142260,8 @@ exports.PuzzleIcon = SvgPuzzle$3;
|
|
|
141339
142260
|
exports.PuzzleStrokeIcon = SvgPuzzle$1;
|
|
141340
142261
|
exports.QuestionMarkCircleIcon = SvgQuestionMarkCircle$3;
|
|
141341
142262
|
exports.QuestionMarkCircleStrokeIcon = SvgQuestionMarkCircle$1;
|
|
141342
|
-
exports.
|
|
142263
|
+
exports.RadioGroup = RadioGroup;
|
|
142264
|
+
exports.RadioGroupItem = RadioGroupItem;
|
|
141343
142265
|
exports.ReactionIcon = SvgReaction$3;
|
|
141344
142266
|
exports.ReactionStrokeIcon = SvgReaction$1;
|
|
141345
142267
|
exports.RectangleIcon = SvgRectangle$3;
|