@dust-tt/sparkle 0.2.269-rc-1 → 0.2.269-rc-2
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 +1869 -588
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Checkbox.d.ts +20 -9
- package/dist/esm/components/Checkbox.d.ts.map +1 -1
- package/dist/esm/components/Checkbox.js +43 -56
- package/dist/esm/components/Checkbox.js.map +1 -1
- package/dist/esm/components/Dialog.js +1 -1
- package/dist/esm/components/Page.d.ts.map +1 -1
- package/dist/esm/components/Page.js +1 -1
- package/dist/esm/components/Page.js.map +1 -1
- package/dist/esm/components/Popover.d.ts.map +1 -1
- package/dist/esm/components/Popover.js +1 -1
- package/dist/esm/components/Popover.js.map +1 -1
- package/dist/esm/components/RadioGroup.d.ts +19 -0
- package/dist/esm/components/RadioGroup.d.ts.map +1 -0
- package/dist/esm/components/RadioGroup.js +40 -0
- package/dist/esm/components/RadioGroup.js.map +1 -0
- package/dist/esm/components/Separator.d.ts.map +1 -1
- package/dist/esm/components/Separator.js +3 -1
- package/dist/esm/components/Separator.js.map +1 -1
- package/dist/esm/components/TextArea.js +1 -1
- package/dist/esm/components/Tooltip.d.ts +1 -0
- package/dist/esm/components/Tooltip.d.ts.map +1 -1
- package/dist/esm/components/Tooltip.js +1 -1
- package/dist/esm/components/Tooltip.js.map +1 -1
- package/dist/esm/components/index.d.ts +3 -2
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +2 -2
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/stories/Checkbox.stories.d.ts +4 -10
- package/dist/esm/stories/Checkbox.stories.d.ts.map +1 -1
- package/dist/esm/stories/Checkbox.stories.js +26 -51
- package/dist/esm/stories/Checkbox.stories.js.map +1 -1
- package/dist/esm/stories/Popover.stories.d.ts.map +1 -1
- package/dist/esm/stories/Popover.stories.js +1 -1
- package/dist/esm/stories/Popover.stories.js.map +1 -1
- package/dist/esm/stories/RadioGroup.stories.d.ts +8 -0
- package/dist/esm/stories/RadioGroup.stories.d.ts.map +1 -0
- package/dist/esm/stories/RadioGroup.stories.js +42 -0
- package/dist/esm/stories/RadioGroup.stories.js.map +1 -0
- package/dist/esm/stories/Separator.stories.d.ts.map +1 -1
- package/dist/esm/stories/Separator.stories.js.map +1 -1
- package/dist/esm/stories/Tree.stories.d.ts.map +1 -1
- package/dist/esm/stories/Tree.stories.js +37 -76
- package/dist/esm/stories/Tree.stories.js.map +1 -1
- package/dist/sparkle.css +71 -169
- package/package.json +4 -1
- package/src/components/Checkbox.tsx +87 -103
- package/src/components/Dialog.tsx +1 -1
- package/src/components/Page.tsx +1 -3
- package/src/components/Popover.tsx +7 -2
- package/src/components/RadioGroup.tsx +125 -0
- package/src/components/Separator.tsx +9 -8
- package/src/components/TextArea.tsx +1 -1
- package/src/components/Tooltip.tsx +5 -2
- package/src/components/index.ts +7 -2
- package/src/stories/Checkbox.stories.tsx +44 -87
- package/src/stories/Popover.stories.tsx +30 -33
- package/src/stories/RadioGroup.stories.tsx +98 -0
- package/src/stories/Separator.stories.tsx +3 -2
- package/src/stories/Tree.stories.tsx +37 -76
- 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$5(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$7(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$7(...refs) {
|
|
43051
|
+
return (node) => refs.forEach((ref) => setRef$7(ref, node));
|
|
43052
43052
|
}
|
|
43053
|
-
function useComposedRefs$
|
|
43054
|
-
return React__namespace.useCallback(composeRefs$
|
|
43053
|
+
function useComposedRefs$5(...refs) {
|
|
43054
|
+
return React__namespace.useCallback(composeRefs$7(...refs), refs);
|
|
43055
43055
|
}
|
|
43056
43056
|
|
|
43057
43057
|
// packages/react/context/src/createContext.tsx
|
|
43058
|
-
function createContextScope$
|
|
43058
|
+
function createContextScope$c(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$c(createScope, ...createContextScopeDeps)];
|
|
43094
43094
|
}
|
|
43095
|
-
function composeContextScopes$
|
|
43095
|
+
function composeContextScopes$c(...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$6(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$6(...refs) {
|
|
74033
|
+
return (node) => refs.forEach((ref) => setRef$6(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$6(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$7 = [
|
|
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$7 = NODES$7.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$6(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$6(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$5(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$7.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$5(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
74267
|
+
onBlurCapture: composeEventHandlers$5(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
74268
|
+
onPointerDownCapture: composeEventHandlers$5(
|
|
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$5(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$7.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$6(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$6(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$6 = 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$6(() => {
|
|
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$7.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$8 = Arrow$5;
|
|
76355
76355
|
|
|
76356
76356
|
// packages/react/context/src/createContext.tsx
|
|
76357
|
-
function createContextScope$
|
|
76357
|
+
function createContextScope$b(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$b(createScope, ...createContextScopeDeps)];
|
|
76393
76393
|
}
|
|
76394
|
-
function composeContextScopes$
|
|
76394
|
+
function composeContextScopes$b(...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$4(element) {
|
|
76417
76417
|
const [size, setSize] = React__namespace.useState(void 0);
|
|
76418
|
-
useLayoutEffect2$
|
|
76418
|
+
useLayoutEffect2$6(() => {
|
|
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$b(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$5(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$7.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$5(forwardedRef, (node) => setContent(node));
|
|
76497
76497
|
const [arrow$1, setArrow] = React__namespace.useState(null);
|
|
76498
|
-
const arrowSize = useSize$
|
|
76498
|
+
const arrowSize = useSize$4(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$6(onPlaced);
|
|
76551
|
+
useLayoutEffect2$6(() => {
|
|
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$6(() => {
|
|
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$7.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$8,
|
|
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$5(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$5(...refs) {
|
|
76725
|
+
return (node) => refs.forEach((ref) => setRef$5(ref, node));
|
|
76726
76726
|
}
|
|
76727
|
-
function useComposedRefs$
|
|
76728
|
-
return React__namespace.useCallback(composeRefs$
|
|
76727
|
+
function useComposedRefs$4(...refs) {
|
|
76728
|
+
return React__namespace.useCallback(composeRefs$5(...refs), refs);
|
|
76729
76729
|
}
|
|
76730
76730
|
|
|
76731
76731
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
76732
|
-
var useLayoutEffect2$
|
|
76732
|
+
var useLayoutEffect2$5 = 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$4(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$5(() => {
|
|
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$5(() => {
|
|
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$5({
|
|
76862
76862
|
prop,
|
|
76863
76863
|
defaultProp,
|
|
76864
76864
|
onChange = () => {
|
|
76865
76865
|
}
|
|
76866
76866
|
}) {
|
|
76867
|
-
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$
|
|
76867
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$5({ defaultProp, onChange });
|
|
76868
76868
|
const isControlled = prop !== void 0;
|
|
76869
76869
|
const value = isControlled ? prop : uncontrolledProp;
|
|
76870
|
-
const handleChange = useCallbackRef$
|
|
76870
|
+
const handleChange = useCallbackRef$6(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$5({
|
|
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$6(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$7.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$7 = VisuallyHidden;
|
|
76931
76931
|
|
|
76932
|
-
var [createTooltipContext, createTooltipScope] = createContextScope$
|
|
76932
|
+
var [createTooltipContext, createTooltipScope] = createContextScope$c("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$5({
|
|
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$5(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$7.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$5(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$5(props.onPointerLeave, () => {
|
|
77095
77095
|
context.onTriggerLeave();
|
|
77096
77096
|
hasPointerMoveOpenedRef.current = false;
|
|
77097
77097
|
}),
|
|
77098
|
-
onPointerDown: composeEventHandlers$
|
|
77098
|
+
onPointerDown: composeEventHandlers$5(props.onPointerDown, () => {
|
|
77099
77099
|
isPointerDownRef.current = true;
|
|
77100
77100
|
document.addEventListener("pointerup", handlePointerUp, { once: true });
|
|
77101
77101
|
}),
|
|
77102
|
-
onFocus: composeEventHandlers$
|
|
77102
|
+
onFocus: composeEventHandlers$5(props.onFocus, () => {
|
|
77103
77103
|
if (!isPointerDownRef.current) context.onOpen();
|
|
77104
77104
|
}),
|
|
77105
|
-
onBlur: composeEventHandlers$
|
|
77106
|
-
onClick: composeEventHandlers$
|
|
77105
|
+
onBlur: composeEventHandlers$5(props.onBlur, context.onClose),
|
|
77106
|
+
onClick: composeEventHandlers$5(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$5(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$7, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
77244
77244
|
]
|
|
77245
77245
|
}
|
|
77246
77246
|
)
|
|
@@ -77385,7 +77385,7 @@ var TooltipRoot = Root3$1;
|
|
|
77385
77385
|
var TooltipTrigger = Trigger$2;
|
|
77386
77386
|
var TooltipContent = React__namespace.forwardRef(function (_a, ref) {
|
|
77387
77387
|
var className = _a.className, _b = _a.sideOffset, sideOffset = _b === void 0 ? 4 : _b, props = __rest(_a, ["className", "sideOffset"]);
|
|
77388
|
-
return (React__namespace.createElement(Content2$3, __assign({ ref: ref, sideOffset: sideOffset, className: classNames("s-
|
|
77388
|
+
return (React__namespace.createElement(Content2$3, __assign({ ref: ref, sideOffset: sideOffset, className: classNames("s-z-50 s-max-w-xs s-overflow-hidden s-rounded-md s-border s-bg-white s-px-3 s-py-1.5 s-text-sm s-shadow-md", "s-animate-in s-fade-in-0 s-zoom-in-95", "data-[state=closed]:s-animate-out data-[state=closed]:s-fade-out-0 data-[state=closed]:s-zoom-out-95 data-[side=bottom]:s-slide-in-from-top-2 data-[side=left]:s-slide-in-from-right-2 data-[side=right]:s-slide-in-from-left-2 data-[side=top]:s-slide-in-from-bottom-2", className || "") }, props)));
|
|
77389
77389
|
});
|
|
77390
77390
|
function Tooltip(_a) {
|
|
77391
77391
|
var trigger = _a.trigger, _b = _a.tooltipTriggerAsChild, tooltipTriggerAsChild = _b === void 0 ? false : _b, label = _a.label, props = __rest(_a, ["trigger", "tooltipTriggerAsChild", "label"]);
|
|
@@ -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) {
|
|
@@ -78814,62 +78814,511 @@ function truncateWithTooltip(text, length) {
|
|
|
78814
78814
|
return text.length > length ? (React.createElement(Tooltip, { trigger: "".concat(text.substring(0, length - 1)).concat(ELLIPSIS_STRING), label: text })) : (text);
|
|
78815
78815
|
}
|
|
78816
78816
|
|
|
78817
|
-
|
|
78818
|
-
|
|
78819
|
-
|
|
78820
|
-
|
|
78821
|
-
|
|
78822
|
-
|
|
78823
|
-
|
|
78824
|
-
|
|
78825
|
-
|
|
78826
|
-
|
|
78827
|
-
|
|
78828
|
-
|
|
78829
|
-
|
|
78830
|
-
|
|
78831
|
-
|
|
78832
|
-
|
|
78833
|
-
|
|
78834
|
-
|
|
78835
|
-
|
|
78836
|
-
|
|
78837
|
-
|
|
78838
|
-
|
|
78839
|
-
|
|
78840
|
-
|
|
78841
|
-
|
|
78842
|
-
|
|
78843
|
-
|
|
78844
|
-
hover: "dark:hover:s-border-action-500-dark dark:hover:s-bg-action-200-dark",
|
|
78845
|
-
disabled: "dark:s-bg-structure-0-dark dark:s-border-structure-300-dark s-cursor-default",
|
|
78846
|
-
},
|
|
78817
|
+
// packages/react/compose-refs/src/composeRefs.tsx
|
|
78818
|
+
function setRef$4(ref, value) {
|
|
78819
|
+
if (typeof ref === "function") {
|
|
78820
|
+
ref(value);
|
|
78821
|
+
} else if (ref !== null && ref !== void 0) {
|
|
78822
|
+
ref.current = value;
|
|
78823
|
+
}
|
|
78824
|
+
}
|
|
78825
|
+
function composeRefs$4(...refs) {
|
|
78826
|
+
return (node) => refs.forEach((ref) => setRef$4(ref, node));
|
|
78827
|
+
}
|
|
78828
|
+
function useComposedRefs$3(...refs) {
|
|
78829
|
+
return React__namespace.useCallback(composeRefs$4(...refs), refs);
|
|
78830
|
+
}
|
|
78831
|
+
|
|
78832
|
+
// packages/react/context/src/createContext.tsx
|
|
78833
|
+
function createContextScope$a(scopeName, createContextScopeDeps = []) {
|
|
78834
|
+
let defaultContexts = [];
|
|
78835
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
78836
|
+
const BaseContext = React__namespace.createContext(defaultContext);
|
|
78837
|
+
const index = defaultContexts.length;
|
|
78838
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
78839
|
+
const Provider = (props) => {
|
|
78840
|
+
const { scope, children, ...context } = props;
|
|
78841
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
78842
|
+
const value = React__namespace.useMemo(() => context, Object.values(context));
|
|
78843
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
|
|
78847
78844
|
};
|
|
78848
|
-
|
|
78849
|
-
|
|
78850
|
-
|
|
78845
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
78846
|
+
function useContext2(consumerName, scope) {
|
|
78847
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
78848
|
+
const context = React__namespace.useContext(Context);
|
|
78849
|
+
if (context) return context;
|
|
78850
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
78851
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
78852
|
+
}
|
|
78853
|
+
return [Provider, useContext2];
|
|
78854
|
+
}
|
|
78855
|
+
const createScope = () => {
|
|
78856
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
78857
|
+
return React__namespace.createContext(defaultContext);
|
|
78858
|
+
});
|
|
78859
|
+
return function useScope(scope) {
|
|
78860
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
78861
|
+
return React__namespace.useMemo(
|
|
78862
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
78863
|
+
[scope, contexts]
|
|
78864
|
+
);
|
|
78851
78865
|
};
|
|
78852
|
-
|
|
78853
|
-
|
|
78854
|
-
|
|
78855
|
-
|
|
78856
|
-
|
|
78857
|
-
|
|
78866
|
+
};
|
|
78867
|
+
createScope.scopeName = scopeName;
|
|
78868
|
+
return [createContext3, composeContextScopes$a(createScope, ...createContextScopeDeps)];
|
|
78869
|
+
}
|
|
78870
|
+
function composeContextScopes$a(...scopes) {
|
|
78871
|
+
const baseScope = scopes[0];
|
|
78872
|
+
if (scopes.length === 1) return baseScope;
|
|
78873
|
+
const createScope = () => {
|
|
78874
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
78875
|
+
useScope: createScope2(),
|
|
78876
|
+
scopeName: createScope2.scopeName
|
|
78877
|
+
}));
|
|
78878
|
+
return function useComposedScopes(overrideScopes) {
|
|
78879
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
78880
|
+
const scopeProps = useScope(overrideScopes);
|
|
78881
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
78882
|
+
return { ...nextScopes2, ...currentScope };
|
|
78883
|
+
}, {});
|
|
78884
|
+
return React__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
78858
78885
|
};
|
|
78859
|
-
|
|
78860
|
-
|
|
78861
|
-
|
|
78886
|
+
};
|
|
78887
|
+
createScope.scopeName = baseScope.scopeName;
|
|
78888
|
+
return createScope;
|
|
78889
|
+
}
|
|
78890
|
+
|
|
78891
|
+
// packages/core/primitive/src/primitive.tsx
|
|
78892
|
+
function composeEventHandlers$4(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
78893
|
+
return function handleEvent(event) {
|
|
78894
|
+
originalEventHandler?.(event);
|
|
78895
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
78896
|
+
return ourEventHandler?.(event);
|
|
78897
|
+
}
|
|
78898
|
+
};
|
|
78899
|
+
}
|
|
78900
|
+
|
|
78901
|
+
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
78902
|
+
function useCallbackRef$5(callback) {
|
|
78903
|
+
const callbackRef = React__namespace.useRef(callback);
|
|
78904
|
+
React__namespace.useEffect(() => {
|
|
78905
|
+
callbackRef.current = callback;
|
|
78906
|
+
});
|
|
78907
|
+
return React__namespace.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
78908
|
+
}
|
|
78909
|
+
|
|
78910
|
+
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
78911
|
+
function useControllableState$4({
|
|
78912
|
+
prop,
|
|
78913
|
+
defaultProp,
|
|
78914
|
+
onChange = () => {
|
|
78915
|
+
}
|
|
78916
|
+
}) {
|
|
78917
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$4({ defaultProp, onChange });
|
|
78918
|
+
const isControlled = prop !== void 0;
|
|
78919
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
78920
|
+
const handleChange = useCallbackRef$5(onChange);
|
|
78921
|
+
const setValue = React__namespace.useCallback(
|
|
78922
|
+
(nextValue) => {
|
|
78923
|
+
if (isControlled) {
|
|
78924
|
+
const setter = nextValue;
|
|
78925
|
+
const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
|
|
78926
|
+
if (value2 !== prop) handleChange(value2);
|
|
78927
|
+
} else {
|
|
78928
|
+
setUncontrolledProp(nextValue);
|
|
78929
|
+
}
|
|
78930
|
+
},
|
|
78931
|
+
[isControlled, prop, setUncontrolledProp, handleChange]
|
|
78932
|
+
);
|
|
78933
|
+
return [value, setValue];
|
|
78934
|
+
}
|
|
78935
|
+
function useUncontrolledState$4({
|
|
78936
|
+
defaultProp,
|
|
78937
|
+
onChange
|
|
78938
|
+
}) {
|
|
78939
|
+
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
78940
|
+
const [value] = uncontrolledState;
|
|
78941
|
+
const prevValueRef = React__namespace.useRef(value);
|
|
78942
|
+
const handleChange = useCallbackRef$5(onChange);
|
|
78943
|
+
React__namespace.useEffect(() => {
|
|
78944
|
+
if (prevValueRef.current !== value) {
|
|
78945
|
+
handleChange(value);
|
|
78946
|
+
prevValueRef.current = value;
|
|
78947
|
+
}
|
|
78948
|
+
}, [value, prevValueRef, handleChange]);
|
|
78949
|
+
return uncontrolledState;
|
|
78950
|
+
}
|
|
78951
|
+
|
|
78952
|
+
// packages/react/use-previous/src/usePrevious.tsx
|
|
78953
|
+
function usePrevious$1(value) {
|
|
78954
|
+
const ref = React__namespace.useRef({ value, previous: value });
|
|
78955
|
+
return React__namespace.useMemo(() => {
|
|
78956
|
+
if (ref.current.value !== value) {
|
|
78957
|
+
ref.current.previous = ref.current.value;
|
|
78958
|
+
ref.current.value = value;
|
|
78959
|
+
}
|
|
78960
|
+
return ref.current.previous;
|
|
78961
|
+
}, [value]);
|
|
78962
|
+
}
|
|
78963
|
+
|
|
78964
|
+
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
78965
|
+
var useLayoutEffect2$4 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
78966
|
+
};
|
|
78967
|
+
|
|
78968
|
+
// packages/react/use-size/src/useSize.tsx
|
|
78969
|
+
function useSize$3(element) {
|
|
78970
|
+
const [size, setSize] = React__namespace.useState(void 0);
|
|
78971
|
+
useLayoutEffect2$4(() => {
|
|
78972
|
+
if (element) {
|
|
78973
|
+
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
78974
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
78975
|
+
if (!Array.isArray(entries)) {
|
|
78976
|
+
return;
|
|
78977
|
+
}
|
|
78978
|
+
if (!entries.length) {
|
|
78979
|
+
return;
|
|
78980
|
+
}
|
|
78981
|
+
const entry = entries[0];
|
|
78982
|
+
let width;
|
|
78983
|
+
let height;
|
|
78984
|
+
if ("borderBoxSize" in entry) {
|
|
78985
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
|
78986
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
78987
|
+
width = borderSize["inlineSize"];
|
|
78988
|
+
height = borderSize["blockSize"];
|
|
78989
|
+
} else {
|
|
78990
|
+
width = element.offsetWidth;
|
|
78991
|
+
height = element.offsetHeight;
|
|
78992
|
+
}
|
|
78993
|
+
setSize({ width, height });
|
|
78994
|
+
});
|
|
78995
|
+
resizeObserver.observe(element, { box: "border-box" });
|
|
78996
|
+
return () => resizeObserver.unobserve(element);
|
|
78997
|
+
} else {
|
|
78998
|
+
setSize(void 0);
|
|
78999
|
+
}
|
|
79000
|
+
}, [element]);
|
|
79001
|
+
return size;
|
|
79002
|
+
}
|
|
79003
|
+
|
|
79004
|
+
// packages/react/primitive/src/Primitive.tsx
|
|
79005
|
+
var NODES$6 = [
|
|
79006
|
+
"a",
|
|
79007
|
+
"button",
|
|
79008
|
+
"div",
|
|
79009
|
+
"form",
|
|
79010
|
+
"h2",
|
|
79011
|
+
"h3",
|
|
79012
|
+
"img",
|
|
79013
|
+
"input",
|
|
79014
|
+
"label",
|
|
79015
|
+
"li",
|
|
79016
|
+
"nav",
|
|
79017
|
+
"ol",
|
|
79018
|
+
"p",
|
|
79019
|
+
"span",
|
|
79020
|
+
"svg",
|
|
79021
|
+
"ul"
|
|
79022
|
+
];
|
|
79023
|
+
var Primitive$6 = NODES$6.reduce((primitive, node) => {
|
|
79024
|
+
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
79025
|
+
const { asChild, ...primitiveProps } = props;
|
|
79026
|
+
const Comp = asChild ? Slot : node;
|
|
79027
|
+
if (typeof window !== "undefined") {
|
|
79028
|
+
window[Symbol.for("radix-ui")] = true;
|
|
79029
|
+
}
|
|
79030
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
79031
|
+
});
|
|
79032
|
+
Node.displayName = `Primitive.${node}`;
|
|
79033
|
+
return { ...primitive, [node]: Node };
|
|
79034
|
+
}, {});
|
|
79035
|
+
|
|
79036
|
+
var CHECKBOX_NAME = "Checkbox";
|
|
79037
|
+
var [createCheckboxContext, createCheckboxScope] = createContextScope$a(CHECKBOX_NAME);
|
|
79038
|
+
var [CheckboxProvider, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
|
|
79039
|
+
var Checkbox$1 = React__namespace.forwardRef(
|
|
79040
|
+
(props, forwardedRef) => {
|
|
79041
|
+
const {
|
|
79042
|
+
__scopeCheckbox,
|
|
79043
|
+
name,
|
|
79044
|
+
checked: checkedProp,
|
|
79045
|
+
defaultChecked,
|
|
79046
|
+
required,
|
|
79047
|
+
disabled,
|
|
79048
|
+
value = "on",
|
|
79049
|
+
onCheckedChange,
|
|
79050
|
+
form,
|
|
79051
|
+
...checkboxProps
|
|
79052
|
+
} = props;
|
|
79053
|
+
const [button, setButton] = React__namespace.useState(null);
|
|
79054
|
+
const composedRefs = useComposedRefs$3(forwardedRef, (node) => setButton(node));
|
|
79055
|
+
const hasConsumerStoppedPropagationRef = React__namespace.useRef(false);
|
|
79056
|
+
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
79057
|
+
const [checked = false, setChecked] = useControllableState$4({
|
|
79058
|
+
prop: checkedProp,
|
|
79059
|
+
defaultProp: defaultChecked,
|
|
79060
|
+
onChange: onCheckedChange
|
|
79061
|
+
});
|
|
79062
|
+
const initialCheckedStateRef = React__namespace.useRef(checked);
|
|
79063
|
+
React__namespace.useEffect(() => {
|
|
79064
|
+
const form2 = button?.form;
|
|
79065
|
+
if (form2) {
|
|
79066
|
+
const reset = () => setChecked(initialCheckedStateRef.current);
|
|
79067
|
+
form2.addEventListener("reset", reset);
|
|
79068
|
+
return () => form2.removeEventListener("reset", reset);
|
|
79069
|
+
}
|
|
79070
|
+
}, [button, setChecked]);
|
|
79071
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(CheckboxProvider, { scope: __scopeCheckbox, state: checked, disabled, children: [
|
|
79072
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
79073
|
+
Primitive$6.button,
|
|
79074
|
+
{
|
|
79075
|
+
type: "button",
|
|
79076
|
+
role: "checkbox",
|
|
79077
|
+
"aria-checked": isIndeterminate$1(checked) ? "mixed" : checked,
|
|
79078
|
+
"aria-required": required,
|
|
79079
|
+
"data-state": getState$2(checked),
|
|
79080
|
+
"data-disabled": disabled ? "" : void 0,
|
|
79081
|
+
disabled,
|
|
79082
|
+
value,
|
|
79083
|
+
...checkboxProps,
|
|
79084
|
+
ref: composedRefs,
|
|
79085
|
+
onKeyDown: composeEventHandlers$4(props.onKeyDown, (event) => {
|
|
79086
|
+
if (event.key === "Enter") event.preventDefault();
|
|
79087
|
+
}),
|
|
79088
|
+
onClick: composeEventHandlers$4(props.onClick, (event) => {
|
|
79089
|
+
setChecked((prevChecked) => isIndeterminate$1(prevChecked) ? true : !prevChecked);
|
|
79090
|
+
if (isFormControl) {
|
|
79091
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
79092
|
+
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
79093
|
+
}
|
|
79094
|
+
})
|
|
79095
|
+
}
|
|
79096
|
+
),
|
|
79097
|
+
isFormControl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
79098
|
+
BubbleInput$1,
|
|
79099
|
+
{
|
|
79100
|
+
control: button,
|
|
79101
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
79102
|
+
name,
|
|
79103
|
+
value,
|
|
79104
|
+
checked,
|
|
79105
|
+
required,
|
|
79106
|
+
disabled,
|
|
79107
|
+
form,
|
|
79108
|
+
style: { transform: "translateX(-100%)" },
|
|
79109
|
+
defaultChecked: isIndeterminate$1(defaultChecked) ? false : defaultChecked
|
|
79110
|
+
}
|
|
79111
|
+
)
|
|
79112
|
+
] });
|
|
79113
|
+
}
|
|
79114
|
+
);
|
|
79115
|
+
Checkbox$1.displayName = CHECKBOX_NAME;
|
|
79116
|
+
var INDICATOR_NAME$2 = "CheckboxIndicator";
|
|
79117
|
+
var CheckboxIndicator = React__namespace.forwardRef(
|
|
79118
|
+
(props, forwardedRef) => {
|
|
79119
|
+
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
|
79120
|
+
const context = useCheckboxContext(INDICATOR_NAME$2, __scopeCheckbox);
|
|
79121
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || isIndeterminate$1(context.state) || context.state === true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
79122
|
+
Primitive$6.span,
|
|
79123
|
+
{
|
|
79124
|
+
"data-state": getState$2(context.state),
|
|
79125
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
79126
|
+
...indicatorProps,
|
|
79127
|
+
ref: forwardedRef,
|
|
79128
|
+
style: { pointerEvents: "none", ...props.style }
|
|
79129
|
+
}
|
|
79130
|
+
) });
|
|
79131
|
+
}
|
|
79132
|
+
);
|
|
79133
|
+
CheckboxIndicator.displayName = INDICATOR_NAME$2;
|
|
79134
|
+
var BubbleInput$1 = (props) => {
|
|
79135
|
+
const { control, checked, bubbles = true, defaultChecked, ...inputProps } = props;
|
|
79136
|
+
const ref = React__namespace.useRef(null);
|
|
79137
|
+
const prevChecked = usePrevious$1(checked);
|
|
79138
|
+
const controlSize = useSize$3(control);
|
|
79139
|
+
React__namespace.useEffect(() => {
|
|
79140
|
+
const input = ref.current;
|
|
79141
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
79142
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked");
|
|
79143
|
+
const setChecked = descriptor.set;
|
|
79144
|
+
if (prevChecked !== checked && setChecked) {
|
|
79145
|
+
const event = new Event("click", { bubbles });
|
|
79146
|
+
input.indeterminate = isIndeterminate$1(checked);
|
|
79147
|
+
setChecked.call(input, isIndeterminate$1(checked) ? false : checked);
|
|
79148
|
+
input.dispatchEvent(event);
|
|
79149
|
+
}
|
|
79150
|
+
}, [prevChecked, checked, bubbles]);
|
|
79151
|
+
const defaultCheckedRef = React__namespace.useRef(isIndeterminate$1(checked) ? false : checked);
|
|
79152
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
79153
|
+
"input",
|
|
79154
|
+
{
|
|
79155
|
+
type: "checkbox",
|
|
79156
|
+
"aria-hidden": true,
|
|
79157
|
+
defaultChecked: defaultChecked ?? defaultCheckedRef.current,
|
|
79158
|
+
...inputProps,
|
|
79159
|
+
tabIndex: -1,
|
|
79160
|
+
ref,
|
|
79161
|
+
style: {
|
|
79162
|
+
...props.style,
|
|
79163
|
+
...controlSize,
|
|
79164
|
+
position: "absolute",
|
|
79165
|
+
pointerEvents: "none",
|
|
79166
|
+
opacity: 0,
|
|
79167
|
+
margin: 0
|
|
79168
|
+
}
|
|
79169
|
+
}
|
|
79170
|
+
);
|
|
79171
|
+
};
|
|
79172
|
+
function isIndeterminate$1(checked) {
|
|
79173
|
+
return checked === "indeterminate";
|
|
79174
|
+
}
|
|
79175
|
+
function getState$2(checked) {
|
|
79176
|
+
return isIndeterminate$1(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
79177
|
+
}
|
|
79178
|
+
var Root$6 = Checkbox$1;
|
|
79179
|
+
var Indicator$1 = CheckboxIndicator;
|
|
79180
|
+
|
|
79181
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
79182
|
+
|
|
79183
|
+
const falsyToString = (value)=>typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
|
|
79184
|
+
const cx = clsx;
|
|
79185
|
+
const cva = (base, config)=>{
|
|
79186
|
+
return (props)=>{
|
|
79187
|
+
var ref;
|
|
79188
|
+
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);
|
|
79189
|
+
const { variants , defaultVariants } = config;
|
|
79190
|
+
const getVariantClassNames = Object.keys(variants).map((variant)=>{
|
|
79191
|
+
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
79192
|
+
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
79193
|
+
if (variantProp === null) return null;
|
|
79194
|
+
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
79195
|
+
return variants[variant][variantKey];
|
|
79196
|
+
});
|
|
79197
|
+
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
|
|
79198
|
+
let [key, value] = param;
|
|
79199
|
+
if (value === undefined) {
|
|
79200
|
+
return acc;
|
|
79201
|
+
}
|
|
79202
|
+
acc[key] = value;
|
|
79203
|
+
return acc;
|
|
79204
|
+
}, {});
|
|
79205
|
+
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1)=>{
|
|
79206
|
+
let { class: cvClass , className: cvClassName , ...compoundVariantOptions } = param1;
|
|
79207
|
+
return Object.entries(compoundVariantOptions).every((param)=>{
|
|
79208
|
+
let [key, value] = param;
|
|
79209
|
+
return Array.isArray(value) ? value.includes({
|
|
79210
|
+
...defaultVariants,
|
|
79211
|
+
...propsWithoutUndefined
|
|
79212
|
+
}[key]) : ({
|
|
79213
|
+
...defaultVariants,
|
|
79214
|
+
...propsWithoutUndefined
|
|
79215
|
+
})[key] === value;
|
|
79216
|
+
}) ? [
|
|
79217
|
+
...acc,
|
|
79218
|
+
cvClass,
|
|
79219
|
+
cvClassName
|
|
79220
|
+
] : acc;
|
|
79221
|
+
}, []);
|
|
79222
|
+
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
78862
79223
|
};
|
|
78863
|
-
|
|
78864
|
-
|
|
78865
|
-
|
|
78866
|
-
|
|
78867
|
-
|
|
78868
|
-
|
|
78869
|
-
|
|
78870
|
-
|
|
78871
|
-
|
|
78872
|
-
|
|
79224
|
+
};
|
|
79225
|
+
|
|
79226
|
+
// packages/react/primitive/src/Primitive.tsx
|
|
79227
|
+
var NODES$5 = [
|
|
79228
|
+
"a",
|
|
79229
|
+
"button",
|
|
79230
|
+
"div",
|
|
79231
|
+
"form",
|
|
79232
|
+
"h2",
|
|
79233
|
+
"h3",
|
|
79234
|
+
"img",
|
|
79235
|
+
"input",
|
|
79236
|
+
"label",
|
|
79237
|
+
"li",
|
|
79238
|
+
"nav",
|
|
79239
|
+
"ol",
|
|
79240
|
+
"p",
|
|
79241
|
+
"span",
|
|
79242
|
+
"svg",
|
|
79243
|
+
"ul"
|
|
79244
|
+
];
|
|
79245
|
+
var Primitive$5 = NODES$5.reduce((primitive, node) => {
|
|
79246
|
+
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
79247
|
+
const { asChild, ...primitiveProps } = props;
|
|
79248
|
+
const Comp = asChild ? Slot : node;
|
|
79249
|
+
if (typeof window !== "undefined") {
|
|
79250
|
+
window[Symbol.for("radix-ui")] = true;
|
|
79251
|
+
}
|
|
79252
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
79253
|
+
});
|
|
79254
|
+
Node.displayName = `Primitive.${node}`;
|
|
79255
|
+
return { ...primitive, [node]: Node };
|
|
79256
|
+
}, {});
|
|
79257
|
+
|
|
79258
|
+
var NAME$3 = "Label";
|
|
79259
|
+
var Label$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
79260
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
79261
|
+
Primitive$5.label,
|
|
79262
|
+
{
|
|
79263
|
+
...props,
|
|
79264
|
+
ref: forwardedRef,
|
|
79265
|
+
onMouseDown: (event) => {
|
|
79266
|
+
const target = event.target;
|
|
79267
|
+
if (target.closest("button, input, select, textarea")) return;
|
|
79268
|
+
props.onMouseDown?.(event);
|
|
79269
|
+
if (!event.defaultPrevented && event.detail > 1) event.preventDefault();
|
|
79270
|
+
}
|
|
79271
|
+
}
|
|
79272
|
+
);
|
|
79273
|
+
});
|
|
79274
|
+
Label$2.displayName = NAME$3;
|
|
79275
|
+
var Root$5 = Label$2;
|
|
79276
|
+
|
|
79277
|
+
var labelVariants = cn("s-text-sm s-text-foreground s-leading-none", "peer-disabled:s-cursor-not-allowed peer-disabled:s-opacity-70");
|
|
79278
|
+
var Label$1 = React__namespace.forwardRef(function (_a, ref) {
|
|
79279
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
79280
|
+
return (React__namespace.createElement(Root$5, __assign({ ref: ref, className: cn(labelVariants, className) }, props)));
|
|
79281
|
+
});
|
|
79282
|
+
Label$1.displayName = Root$5.displayName;
|
|
79283
|
+
|
|
79284
|
+
var checkboxStyles = cva(cn("s-shrink-0 s-peer s-border s-text-foreground", "data-[state=checked]:s-text-white data-[state=checked]:s-text-foreground", "focus-visible:s-ring-ring s-ring-offset-background focus-visible:s-outline-none focus-visible:s-ring-2 focus-visible:s-ring-offset-2", "disabled:s-cursor-not-allowed disabled:s-opacity-50"), {
|
|
79285
|
+
variants: {
|
|
79286
|
+
checked: {
|
|
79287
|
+
true: "data-[state=checked]:s-bg-action-500",
|
|
79288
|
+
partial: "data-[state=checked]:s-bg-muted-foreground",
|
|
79289
|
+
false: "",
|
|
79290
|
+
},
|
|
79291
|
+
size: {
|
|
79292
|
+
xs: "s-h-4 s-w-4 s-rounded",
|
|
79293
|
+
sm: "s-h-5 s-w-5 s-rounded-md",
|
|
79294
|
+
},
|
|
79295
|
+
},
|
|
79296
|
+
defaultVariants: {
|
|
79297
|
+
size: "sm",
|
|
79298
|
+
checked: false,
|
|
79299
|
+
},
|
|
79300
|
+
});
|
|
79301
|
+
var Checkbox = React.forwardRef(function (_a, ref) {
|
|
79302
|
+
var className = _a.className, size = _a.size, checked = _a.checked, props = __rest(_a, ["className", "size", "checked"]);
|
|
79303
|
+
return (React.createElement(Root$6, __assign({ ref: ref, className: cn(checkboxStyles({ checked: checked, size: size }), className), checked: checked === "partial" ? "indeterminate" : checked }, props),
|
|
79304
|
+
React.createElement(Indicator$1, { className: "s-flex s-items-center s-justify-center s-text-current" },
|
|
79305
|
+
React.createElement("span", { className: cn(size === "xs" ? "-s-mt-px" : "") },
|
|
79306
|
+
React.createElement(Icon, { size: "xs", visual: checked === "partial" ? DashIcon : CheckIcon })))));
|
|
79307
|
+
});
|
|
79308
|
+
Checkbox.displayName = Root$6.displayName;
|
|
79309
|
+
function CheckboxWithText(_a) {
|
|
79310
|
+
var text = _a.text, props = __rest(_a, ["text"]);
|
|
79311
|
+
return (React.createElement("div", { className: "s-items-top s-flex s-items-center s-space-x-2" },
|
|
79312
|
+
React.createElement(Checkbox, __assign({}, props)),
|
|
79313
|
+
React.createElement(Label$1, { className: "s-text-sm s-leading-none peer-disabled:s-cursor-not-allowed peer-disabled:s-opacity-70" }, text)));
|
|
79314
|
+
}
|
|
79315
|
+
function CheckBoxWithTextAndDescription(_a) {
|
|
79316
|
+
var text = _a.text, description = _a.description, props = __rest(_a, ["text", "description"]);
|
|
79317
|
+
return (React.createElement("div", { className: "s-items-top s-flex s-space-x-2" },
|
|
79318
|
+
React.createElement(Checkbox, __assign({}, props)),
|
|
79319
|
+
React.createElement("div", { className: "s-grid s-gap-1.5 s-leading-none" },
|
|
79320
|
+
React.createElement(Label$1, { className: "s-text-sm s-leading-none peer-disabled:s-cursor-not-allowed peer-disabled:s-opacity-70" }, text),
|
|
79321
|
+
React.createElement("p", { className: "s-text-xs s-text-muted-foreground" }, description))));
|
|
78873
79322
|
}
|
|
78874
79323
|
|
|
78875
79324
|
var sizeClasses$2 = {
|
|
@@ -107069,7 +107518,7 @@ const unique = (columnId, leafRows) => {
|
|
|
107069
107518
|
const uniqueCount = (columnId, leafRows) => {
|
|
107070
107519
|
return new Set(leafRows.map(d => d.getValue(columnId))).size;
|
|
107071
107520
|
};
|
|
107072
|
-
const count$
|
|
107521
|
+
const count$6 = (_columnId, leafRows) => {
|
|
107073
107522
|
return leafRows.length;
|
|
107074
107523
|
};
|
|
107075
107524
|
const aggregationFns = {
|
|
@@ -107081,7 +107530,7 @@ const aggregationFns = {
|
|
|
107081
107530
|
median,
|
|
107082
107531
|
unique,
|
|
107083
107532
|
uniqueCount,
|
|
107084
|
-
count: count$
|
|
107533
|
+
count: count$6
|
|
107085
107534
|
};
|
|
107086
107535
|
|
|
107087
107536
|
//
|
|
@@ -109851,7 +110300,7 @@ function Dialog(_a) {
|
|
|
109851
110300
|
React.createElement("div", { className: "s-flex s-min-h-full s-items-center s-justify-center" },
|
|
109852
110301
|
React.createElement(qe.Child, { as: React.Fragment, enter: "s-ease-out s-duration-300", enterFrom: "s-opacity-0 s-translate-y-4 s-scale-95", enterTo: "s-opacity-100 s-translate-y-0 s-scale-100", leave: "s-ease-in s-duration-200", leaveFrom: "s-opacity-100 s-translate-y-0 s-scale-100", leaveTo: "s-opacity-0 s-translate-y-4 s-scale-95" },
|
|
109853
110302
|
React.createElement(_t.Panel, { className: classNames("s-relative s-rounded-xl s-border s-border-structure-100 s-bg-structure-0 s-p-4 s-shadow-xl s-transition-all", "s-w-full sm:s-w-[448px]", "s-flex s-flex-col s-gap-6"), ref: referentRef },
|
|
109854
|
-
React.createElement(_t.Title, { className: "s-
|
|
110303
|
+
React.createElement(_t.Title, { className: "s-truncate s-text-lg s-font-medium s-text-element-950" }, title),
|
|
109855
110304
|
React.createElement("div", { className: "s-text-base s-text-element-700" }, children),
|
|
109856
110305
|
React.createElement("div", { className: "s-flex s-w-full s-justify-end" },
|
|
109857
110306
|
React.createElement(Button.List, null,
|
|
@@ -113441,64 +113890,6 @@ function IconToggleButton(_a) {
|
|
|
113441
113890
|
return tooltip ? (React.createElement(Tooltip, { trigger: IconButtonToggleContent, label: tooltip, side: tooltipPosition })) : (IconButtonToggleContent);
|
|
113442
113891
|
}
|
|
113443
113892
|
|
|
113444
|
-
// packages/react/primitive/src/Primitive.tsx
|
|
113445
|
-
var NODES$4 = [
|
|
113446
|
-
"a",
|
|
113447
|
-
"button",
|
|
113448
|
-
"div",
|
|
113449
|
-
"form",
|
|
113450
|
-
"h2",
|
|
113451
|
-
"h3",
|
|
113452
|
-
"img",
|
|
113453
|
-
"input",
|
|
113454
|
-
"label",
|
|
113455
|
-
"li",
|
|
113456
|
-
"nav",
|
|
113457
|
-
"ol",
|
|
113458
|
-
"p",
|
|
113459
|
-
"span",
|
|
113460
|
-
"svg",
|
|
113461
|
-
"ul"
|
|
113462
|
-
];
|
|
113463
|
-
var Primitive$4 = NODES$4.reduce((primitive, node) => {
|
|
113464
|
-
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
113465
|
-
const { asChild, ...primitiveProps } = props;
|
|
113466
|
-
const Comp = asChild ? Slot : node;
|
|
113467
|
-
if (typeof window !== "undefined") {
|
|
113468
|
-
window[Symbol.for("radix-ui")] = true;
|
|
113469
|
-
}
|
|
113470
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
113471
|
-
});
|
|
113472
|
-
Node.displayName = `Primitive.${node}`;
|
|
113473
|
-
return { ...primitive, [node]: Node };
|
|
113474
|
-
}, {});
|
|
113475
|
-
|
|
113476
|
-
var NAME$3 = "Label";
|
|
113477
|
-
var Label$2 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
113478
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
113479
|
-
Primitive$4.label,
|
|
113480
|
-
{
|
|
113481
|
-
...props,
|
|
113482
|
-
ref: forwardedRef,
|
|
113483
|
-
onMouseDown: (event) => {
|
|
113484
|
-
const target = event.target;
|
|
113485
|
-
if (target.closest("button, input, select, textarea")) return;
|
|
113486
|
-
props.onMouseDown?.(event);
|
|
113487
|
-
if (!event.defaultPrevented && event.detail > 1) event.preventDefault();
|
|
113488
|
-
}
|
|
113489
|
-
}
|
|
113490
|
-
);
|
|
113491
|
-
});
|
|
113492
|
-
Label$2.displayName = NAME$3;
|
|
113493
|
-
var Root$4 = Label$2;
|
|
113494
|
-
|
|
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
|
-
var Label$1 = React__namespace.forwardRef(function (_a, ref) {
|
|
113497
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
113498
|
-
return (React__namespace.createElement(Root$4, __assign({ ref: ref, className: cn(labelVariants, className) }, props)));
|
|
113499
|
-
});
|
|
113500
|
-
Label$1.displayName = Root$4.displayName;
|
|
113501
|
-
|
|
113502
113893
|
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
113894
|
var Input = React.forwardRef(function (_a, ref) {
|
|
113504
113895
|
var className = _a.className, error = _a.error, value = _a.value, label = _a.label, _b = _a.showErrorLabel, showErrorLabel = _b === void 0 ? false : _b, props = __rest(_a, ["className", "error", "value", "label", "showErrorLabel"]);
|
|
@@ -135051,7 +135442,7 @@ function Markdown(_a) {
|
|
|
135051
135442
|
}
|
|
135052
135443
|
|
|
135053
135444
|
// packages/core/primitive/src/primitive.tsx
|
|
135054
|
-
function composeEventHandlers$
|
|
135445
|
+
function composeEventHandlers$3(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
135055
135446
|
return function handleEvent(event) {
|
|
135056
135447
|
originalEventHandler?.(event);
|
|
135057
135448
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -135061,19 +135452,19 @@ function composeEventHandlers$2(originalEventHandler, ourEventHandler, { checkFo
|
|
|
135061
135452
|
}
|
|
135062
135453
|
|
|
135063
135454
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
135064
|
-
function setRef$
|
|
135455
|
+
function setRef$3(ref, value) {
|
|
135065
135456
|
if (typeof ref === "function") {
|
|
135066
135457
|
ref(value);
|
|
135067
135458
|
} else if (ref !== null && ref !== void 0) {
|
|
135068
135459
|
ref.current = value;
|
|
135069
135460
|
}
|
|
135070
135461
|
}
|
|
135071
|
-
function composeRefs$
|
|
135072
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
135462
|
+
function composeRefs$3(...refs) {
|
|
135463
|
+
return (node) => refs.forEach((ref) => setRef$3(ref, node));
|
|
135073
135464
|
}
|
|
135074
135465
|
|
|
135075
135466
|
// packages/react/context/src/createContext.tsx
|
|
135076
|
-
function createContextScope$
|
|
135467
|
+
function createContextScope$9(scopeName, createContextScopeDeps = []) {
|
|
135077
135468
|
let defaultContexts = [];
|
|
135078
135469
|
function createContext3(rootComponentName, defaultContext) {
|
|
135079
135470
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -135108,9 +135499,9 @@ function createContextScope$6(scopeName, createContextScopeDeps = []) {
|
|
|
135108
135499
|
};
|
|
135109
135500
|
};
|
|
135110
135501
|
createScope.scopeName = scopeName;
|
|
135111
|
-
return [createContext3, composeContextScopes$
|
|
135502
|
+
return [createContext3, composeContextScopes$9(createScope, ...createContextScopeDeps)];
|
|
135112
135503
|
}
|
|
135113
|
-
function composeContextScopes$
|
|
135504
|
+
function composeContextScopes$9(...scopes) {
|
|
135114
135505
|
const baseScope = scopes[0];
|
|
135115
135506
|
if (scopes.length === 1) return baseScope;
|
|
135116
135507
|
const createScope = () => {
|
|
@@ -135132,7 +135523,7 @@ function composeContextScopes$6(...scopes) {
|
|
|
135132
135523
|
}
|
|
135133
135524
|
|
|
135134
135525
|
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
135135
|
-
function useCallbackRef$
|
|
135526
|
+
function useCallbackRef$4(callback) {
|
|
135136
135527
|
const callbackRef = React__namespace.useRef(callback);
|
|
135137
135528
|
React__namespace.useEffect(() => {
|
|
135138
135529
|
callbackRef.current = callback;
|
|
@@ -135141,16 +135532,16 @@ function useCallbackRef$3(callback) {
|
|
|
135141
135532
|
}
|
|
135142
135533
|
|
|
135143
135534
|
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
135144
|
-
function useControllableState$
|
|
135535
|
+
function useControllableState$3({
|
|
135145
135536
|
prop,
|
|
135146
135537
|
defaultProp,
|
|
135147
135538
|
onChange = () => {
|
|
135148
135539
|
}
|
|
135149
135540
|
}) {
|
|
135150
|
-
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$
|
|
135541
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$3({ defaultProp, onChange });
|
|
135151
135542
|
const isControlled = prop !== void 0;
|
|
135152
135543
|
const value = isControlled ? prop : uncontrolledProp;
|
|
135153
|
-
const handleChange = useCallbackRef$
|
|
135544
|
+
const handleChange = useCallbackRef$4(onChange);
|
|
135154
135545
|
const setValue = React__namespace.useCallback(
|
|
135155
135546
|
(nextValue) => {
|
|
135156
135547
|
if (isControlled) {
|
|
@@ -135165,14 +135556,14 @@ function useControllableState$2({
|
|
|
135165
135556
|
);
|
|
135166
135557
|
return [value, setValue];
|
|
135167
135558
|
}
|
|
135168
|
-
function useUncontrolledState$
|
|
135559
|
+
function useUncontrolledState$3({
|
|
135169
135560
|
defaultProp,
|
|
135170
135561
|
onChange
|
|
135171
135562
|
}) {
|
|
135172
135563
|
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
135173
135564
|
const [value] = uncontrolledState;
|
|
135174
135565
|
const prevValueRef = React__namespace.useRef(value);
|
|
135175
|
-
const handleChange = useCallbackRef$
|
|
135566
|
+
const handleChange = useCallbackRef$4(onChange);
|
|
135176
135567
|
React__namespace.useEffect(() => {
|
|
135177
135568
|
if (prevValueRef.current !== value) {
|
|
135178
135569
|
handleChange(value);
|
|
@@ -135183,7 +135574,7 @@ function useUncontrolledState$2({
|
|
|
135183
135574
|
}
|
|
135184
135575
|
|
|
135185
135576
|
// packages/react/primitive/src/Primitive.tsx
|
|
135186
|
-
var NODES$
|
|
135577
|
+
var NODES$4 = [
|
|
135187
135578
|
"a",
|
|
135188
135579
|
"button",
|
|
135189
135580
|
"div",
|
|
@@ -135201,7 +135592,7 @@ var NODES$3 = [
|
|
|
135201
135592
|
"svg",
|
|
135202
135593
|
"ul"
|
|
135203
135594
|
];
|
|
135204
|
-
var Primitive$
|
|
135595
|
+
var Primitive$4 = NODES$4.reduce((primitive, node) => {
|
|
135205
135596
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
135206
135597
|
const { asChild, ...primitiveProps } = props;
|
|
135207
135598
|
const Comp = asChild ? Slot : node;
|
|
@@ -135215,7 +135606,7 @@ var Primitive$3 = NODES$3.reduce((primitive, node) => {
|
|
|
135215
135606
|
}, {});
|
|
135216
135607
|
|
|
135217
135608
|
// packages/core/primitive/src/primitive.tsx
|
|
135218
|
-
function composeEventHandlers$
|
|
135609
|
+
function composeEventHandlers$2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
135219
135610
|
return function handleEvent(event) {
|
|
135220
135611
|
originalEventHandler?.(event);
|
|
135221
135612
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -135225,7 +135616,7 @@ function composeEventHandlers$1(originalEventHandler, ourEventHandler, { checkFo
|
|
|
135225
135616
|
}
|
|
135226
135617
|
|
|
135227
135618
|
// packages/react/context/src/createContext.tsx
|
|
135228
|
-
function createContextScope$
|
|
135619
|
+
function createContextScope$8(scopeName, createContextScopeDeps = []) {
|
|
135229
135620
|
let defaultContexts = [];
|
|
135230
135621
|
function createContext3(rootComponentName, defaultContext) {
|
|
135231
135622
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -135260,9 +135651,9 @@ function createContextScope$5(scopeName, createContextScopeDeps = []) {
|
|
|
135260
135651
|
};
|
|
135261
135652
|
};
|
|
135262
135653
|
createScope.scopeName = scopeName;
|
|
135263
|
-
return [createContext3, composeContextScopes$
|
|
135654
|
+
return [createContext3, composeContextScopes$8(createScope, ...createContextScopeDeps)];
|
|
135264
135655
|
}
|
|
135265
|
-
function composeContextScopes$
|
|
135656
|
+
function composeContextScopes$8(...scopes) {
|
|
135266
135657
|
const baseScope = scopes[0];
|
|
135267
135658
|
if (scopes.length === 1) return baseScope;
|
|
135268
135659
|
const createScope = () => {
|
|
@@ -135284,23 +135675,23 @@ function composeContextScopes$5(...scopes) {
|
|
|
135284
135675
|
}
|
|
135285
135676
|
|
|
135286
135677
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
135287
|
-
function setRef$
|
|
135678
|
+
function setRef$2(ref, value) {
|
|
135288
135679
|
if (typeof ref === "function") {
|
|
135289
135680
|
ref(value);
|
|
135290
135681
|
} else if (ref !== null && ref !== void 0) {
|
|
135291
135682
|
ref.current = value;
|
|
135292
135683
|
}
|
|
135293
135684
|
}
|
|
135294
|
-
function composeRefs$
|
|
135295
|
-
return (node) => refs.forEach((ref) => setRef$
|
|
135685
|
+
function composeRefs$2(...refs) {
|
|
135686
|
+
return (node) => refs.forEach((ref) => setRef$2(ref, node));
|
|
135296
135687
|
}
|
|
135297
|
-
function useComposedRefs$
|
|
135298
|
-
return React__namespace.useCallback(composeRefs$
|
|
135688
|
+
function useComposedRefs$2(...refs) {
|
|
135689
|
+
return React__namespace.useCallback(composeRefs$2(...refs), refs);
|
|
135299
135690
|
}
|
|
135300
135691
|
|
|
135301
|
-
function createCollection(name) {
|
|
135692
|
+
function createCollection$1(name) {
|
|
135302
135693
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
135303
|
-
const [createCollectionContext, createCollectionScope] = createContextScope$
|
|
135694
|
+
const [createCollectionContext, createCollectionScope] = createContextScope$8(PROVIDER_NAME);
|
|
135304
135695
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
135305
135696
|
PROVIDER_NAME,
|
|
135306
135697
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
@@ -135317,7 +135708,7 @@ function createCollection(name) {
|
|
|
135317
135708
|
(props, forwardedRef) => {
|
|
135318
135709
|
const { scope, children } = props;
|
|
135319
135710
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
135320
|
-
const composedRefs = useComposedRefs$
|
|
135711
|
+
const composedRefs = useComposedRefs$2(forwardedRef, context.collectionRef);
|
|
135321
135712
|
return /* @__PURE__ */ jsxRuntime.jsx(Slot, { ref: composedRefs, children });
|
|
135322
135713
|
}
|
|
135323
135714
|
);
|
|
@@ -135328,7 +135719,7 @@ function createCollection(name) {
|
|
|
135328
135719
|
(props, forwardedRef) => {
|
|
135329
135720
|
const { scope, children, ...itemData } = props;
|
|
135330
135721
|
const ref = React.useRef(null);
|
|
135331
|
-
const composedRefs = useComposedRefs$
|
|
135722
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
135332
135723
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
135333
135724
|
React.useEffect(() => {
|
|
135334
135725
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
@@ -135360,7 +135751,7 @@ function createCollection(name) {
|
|
|
135360
135751
|
}
|
|
135361
135752
|
|
|
135362
135753
|
// packages/react/context/src/createContext.tsx
|
|
135363
|
-
function createContextScope$
|
|
135754
|
+
function createContextScope$7(scopeName, createContextScopeDeps = []) {
|
|
135364
135755
|
let defaultContexts = [];
|
|
135365
135756
|
function createContext3(rootComponentName, defaultContext) {
|
|
135366
135757
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -135395,9 +135786,9 @@ function createContextScope$4(scopeName, createContextScopeDeps = []) {
|
|
|
135395
135786
|
};
|
|
135396
135787
|
};
|
|
135397
135788
|
createScope.scopeName = scopeName;
|
|
135398
|
-
return [createContext3, composeContextScopes$
|
|
135789
|
+
return [createContext3, composeContextScopes$7(createScope, ...createContextScopeDeps)];
|
|
135399
135790
|
}
|
|
135400
|
-
function composeContextScopes$
|
|
135791
|
+
function composeContextScopes$7(...scopes) {
|
|
135401
135792
|
const baseScope = scopes[0];
|
|
135402
135793
|
if (scopes.length === 1) return baseScope;
|
|
135403
135794
|
const createScope = () => {
|
|
@@ -135419,14 +135810,14 @@ function composeContextScopes$4(...scopes) {
|
|
|
135419
135810
|
}
|
|
135420
135811
|
|
|
135421
135812
|
// 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);
|
|
135813
|
+
var DirectionContext$1 = React__namespace.createContext(void 0);
|
|
135814
|
+
function useDirection$1(localDir) {
|
|
135815
|
+
const globalDir = React__namespace.useContext(DirectionContext$1);
|
|
135425
135816
|
return localDir || globalDir || "ltr";
|
|
135426
135817
|
}
|
|
135427
135818
|
|
|
135428
135819
|
// packages/react/primitive/src/Primitive.tsx
|
|
135429
|
-
var NODES$
|
|
135820
|
+
var NODES$3 = [
|
|
135430
135821
|
"a",
|
|
135431
135822
|
"button",
|
|
135432
135823
|
"div",
|
|
@@ -135444,7 +135835,7 @@ var NODES$2 = [
|
|
|
135444
135835
|
"svg",
|
|
135445
135836
|
"ul"
|
|
135446
135837
|
];
|
|
135447
|
-
var Primitive$
|
|
135838
|
+
var Primitive$3 = NODES$3.reduce((primitive, node) => {
|
|
135448
135839
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
135449
135840
|
const { asChild, ...primitiveProps } = props;
|
|
135450
135841
|
const Comp = asChild ? Slot : node;
|
|
@@ -135461,7 +135852,7 @@ function dispatchDiscreteCustomEvent$1(target, event) {
|
|
|
135461
135852
|
}
|
|
135462
135853
|
|
|
135463
135854
|
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
135464
|
-
function useCallbackRef$
|
|
135855
|
+
function useCallbackRef$3(callback) {
|
|
135465
135856
|
const callbackRef = React__namespace.useRef(callback);
|
|
135466
135857
|
React__namespace.useEffect(() => {
|
|
135467
135858
|
callbackRef.current = callback;
|
|
@@ -135471,7 +135862,7 @@ function useCallbackRef$2(callback) {
|
|
|
135471
135862
|
|
|
135472
135863
|
// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx
|
|
135473
135864
|
function useEscapeKeydown$1(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
135474
|
-
const onEscapeKeyDown = useCallbackRef$
|
|
135865
|
+
const onEscapeKeyDown = useCallbackRef$3(onEscapeKeyDownProp);
|
|
135475
135866
|
React__namespace.useEffect(() => {
|
|
135476
135867
|
const handleKeyDown = (event) => {
|
|
135477
135868
|
if (event.key === "Escape") {
|
|
@@ -135508,7 +135899,7 @@ var DismissableLayer$1 = React__namespace.forwardRef(
|
|
|
135508
135899
|
const [node, setNode] = React__namespace.useState(null);
|
|
135509
135900
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
135510
135901
|
const [, force] = React__namespace.useState({});
|
|
135511
|
-
const composedRefs = useComposedRefs$
|
|
135902
|
+
const composedRefs = useComposedRefs$2(forwardedRef, (node2) => setNode(node2));
|
|
135512
135903
|
const layers = Array.from(context.layers);
|
|
135513
135904
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
135514
135905
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
@@ -135571,7 +135962,7 @@ var DismissableLayer$1 = React__namespace.forwardRef(
|
|
|
135571
135962
|
return () => document.removeEventListener(CONTEXT_UPDATE$1, handleUpdate);
|
|
135572
135963
|
}, []);
|
|
135573
135964
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
135574
|
-
Primitive$
|
|
135965
|
+
Primitive$3.div,
|
|
135575
135966
|
{
|
|
135576
135967
|
...layerProps,
|
|
135577
135968
|
ref: composedRefs,
|
|
@@ -135579,9 +135970,9 @@ var DismissableLayer$1 = React__namespace.forwardRef(
|
|
|
135579
135970
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
135580
135971
|
...props.style
|
|
135581
135972
|
},
|
|
135582
|
-
onFocusCapture: composeEventHandlers$
|
|
135583
|
-
onBlurCapture: composeEventHandlers$
|
|
135584
|
-
onPointerDownCapture: composeEventHandlers$
|
|
135973
|
+
onFocusCapture: composeEventHandlers$2(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
135974
|
+
onBlurCapture: composeEventHandlers$2(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
135975
|
+
onPointerDownCapture: composeEventHandlers$2(
|
|
135585
135976
|
props.onPointerDownCapture,
|
|
135586
135977
|
pointerDownOutside.onPointerDownCapture
|
|
135587
135978
|
)
|
|
@@ -135594,7 +135985,7 @@ var BRANCH_NAME$1 = "DismissableLayerBranch";
|
|
|
135594
135985
|
var DismissableLayerBranch$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
135595
135986
|
const context = React__namespace.useContext(DismissableLayerContext$1);
|
|
135596
135987
|
const ref = React__namespace.useRef(null);
|
|
135597
|
-
const composedRefs = useComposedRefs$
|
|
135988
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
135598
135989
|
React__namespace.useEffect(() => {
|
|
135599
135990
|
const node = ref.current;
|
|
135600
135991
|
if (node) {
|
|
@@ -135604,11 +135995,11 @@ var DismissableLayerBranch$1 = React__namespace.forwardRef((props, forwardedRef)
|
|
|
135604
135995
|
};
|
|
135605
135996
|
}
|
|
135606
135997
|
}, [context.branches]);
|
|
135607
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
135998
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { ...props, ref: composedRefs });
|
|
135608
135999
|
});
|
|
135609
136000
|
DismissableLayerBranch$1.displayName = BRANCH_NAME$1;
|
|
135610
136001
|
function usePointerDownOutside$1(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
135611
|
-
const handlePointerDownOutside = useCallbackRef$
|
|
136002
|
+
const handlePointerDownOutside = useCallbackRef$3(onPointerDownOutside);
|
|
135612
136003
|
const isPointerInsideReactTreeRef = React__namespace.useRef(false);
|
|
135613
136004
|
const handleClickRef = React__namespace.useRef(() => {
|
|
135614
136005
|
});
|
|
@@ -135651,7 +136042,7 @@ function usePointerDownOutside$1(onPointerDownOutside, ownerDocument = globalThi
|
|
|
135651
136042
|
};
|
|
135652
136043
|
}
|
|
135653
136044
|
function useFocusOutside$1(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
135654
|
-
const handleFocusOutside = useCallbackRef$
|
|
136045
|
+
const handleFocusOutside = useCallbackRef$3(onFocusOutside);
|
|
135655
136046
|
const isFocusInsideReactTreeRef = React__namespace.useRef(false);
|
|
135656
136047
|
React__namespace.useEffect(() => {
|
|
135657
136048
|
const handleFocus = (event) => {
|
|
@@ -135685,18 +136076,18 @@ function handleAndDispatchCustomEvent$1(name, handler, detail, { discrete }) {
|
|
|
135685
136076
|
}
|
|
135686
136077
|
}
|
|
135687
136078
|
|
|
135688
|
-
var count$
|
|
136079
|
+
var count$5 = 0;
|
|
135689
136080
|
function useFocusGuards$1() {
|
|
135690
136081
|
React__namespace.useEffect(() => {
|
|
135691
136082
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
135692
136083
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard$1());
|
|
135693
136084
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard$1());
|
|
135694
|
-
count$
|
|
136085
|
+
count$5++;
|
|
135695
136086
|
return () => {
|
|
135696
|
-
if (count$
|
|
136087
|
+
if (count$5 === 1) {
|
|
135697
136088
|
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
135698
136089
|
}
|
|
135699
|
-
count$
|
|
136090
|
+
count$5--;
|
|
135700
136091
|
};
|
|
135701
136092
|
}, []);
|
|
135702
136093
|
}
|
|
@@ -135713,7 +136104,7 @@ function createFocusGuard$1() {
|
|
|
135713
136104
|
|
|
135714
136105
|
var AUTOFOCUS_ON_MOUNT$1 = "focusScope.autoFocusOnMount";
|
|
135715
136106
|
var AUTOFOCUS_ON_UNMOUNT$1 = "focusScope.autoFocusOnUnmount";
|
|
135716
|
-
var EVENT_OPTIONS$
|
|
136107
|
+
var EVENT_OPTIONS$3 = { bubbles: false, cancelable: true };
|
|
135717
136108
|
var FOCUS_SCOPE_NAME$1 = "FocusScope";
|
|
135718
136109
|
var FocusScope$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
135719
136110
|
const {
|
|
@@ -135724,10 +136115,10 @@ var FocusScope$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
135724
136115
|
...scopeProps
|
|
135725
136116
|
} = props;
|
|
135726
136117
|
const [container, setContainer] = React__namespace.useState(null);
|
|
135727
|
-
const onMountAutoFocus = useCallbackRef$
|
|
135728
|
-
const onUnmountAutoFocus = useCallbackRef$
|
|
136118
|
+
const onMountAutoFocus = useCallbackRef$3(onMountAutoFocusProp);
|
|
136119
|
+
const onUnmountAutoFocus = useCallbackRef$3(onUnmountAutoFocusProp);
|
|
135729
136120
|
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
135730
|
-
const composedRefs = useComposedRefs$
|
|
136121
|
+
const composedRefs = useComposedRefs$2(forwardedRef, (node) => setContainer(node));
|
|
135731
136122
|
const focusScope = React__namespace.useRef({
|
|
135732
136123
|
paused: false,
|
|
135733
136124
|
pause() {
|
|
@@ -135778,11 +136169,11 @@ var FocusScope$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
135778
136169
|
const previouslyFocusedElement = document.activeElement;
|
|
135779
136170
|
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
135780
136171
|
if (!hasFocusedCandidate) {
|
|
135781
|
-
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT$1, EVENT_OPTIONS$
|
|
136172
|
+
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT$1, EVENT_OPTIONS$3);
|
|
135782
136173
|
container.addEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
135783
136174
|
container.dispatchEvent(mountEvent);
|
|
135784
136175
|
if (!mountEvent.defaultPrevented) {
|
|
135785
|
-
focusFirst$
|
|
136176
|
+
focusFirst$4(removeLinks$1(getTabbableCandidates$1(container)), { select: true });
|
|
135786
136177
|
if (document.activeElement === previouslyFocusedElement) {
|
|
135787
136178
|
focus$1(container);
|
|
135788
136179
|
}
|
|
@@ -135791,7 +136182,7 @@ var FocusScope$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
135791
136182
|
return () => {
|
|
135792
136183
|
container.removeEventListener(AUTOFOCUS_ON_MOUNT$1, onMountAutoFocus);
|
|
135793
136184
|
setTimeout(() => {
|
|
135794
|
-
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT$1, EVENT_OPTIONS$
|
|
136185
|
+
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT$1, EVENT_OPTIONS$3);
|
|
135795
136186
|
container.addEventListener(AUTOFOCUS_ON_UNMOUNT$1, onUnmountAutoFocus);
|
|
135796
136187
|
container.dispatchEvent(unmountEvent);
|
|
135797
136188
|
if (!unmountEvent.defaultPrevented) {
|
|
@@ -135828,10 +136219,10 @@ var FocusScope$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
135828
136219
|
},
|
|
135829
136220
|
[loop, trapped, focusScope.paused]
|
|
135830
136221
|
);
|
|
135831
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
136222
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
135832
136223
|
});
|
|
135833
136224
|
FocusScope$1.displayName = FOCUS_SCOPE_NAME$1;
|
|
135834
|
-
function focusFirst$
|
|
136225
|
+
function focusFirst$4(candidates, { select = false } = {}) {
|
|
135835
136226
|
const previouslyFocusedElement = document.activeElement;
|
|
135836
136227
|
for (const candidate of candidates) {
|
|
135837
136228
|
focus$1(candidate, { select });
|
|
@@ -135912,16 +136303,16 @@ function removeLinks$1(items) {
|
|
|
135912
136303
|
}
|
|
135913
136304
|
|
|
135914
136305
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
135915
|
-
var useLayoutEffect2$
|
|
136306
|
+
var useLayoutEffect2$3 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
135916
136307
|
};
|
|
135917
136308
|
|
|
135918
136309
|
// 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$
|
|
136310
|
+
var useReactId$3 = React__namespace["useId".toString()] || (() => void 0);
|
|
136311
|
+
var count$4 = 0;
|
|
136312
|
+
function useId$3(deterministicId) {
|
|
136313
|
+
const [id, setId] = React__namespace.useState(useReactId$3());
|
|
136314
|
+
useLayoutEffect2$3(() => {
|
|
136315
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count$4++));
|
|
135925
136316
|
}, [deterministicId]);
|
|
135926
136317
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
135927
136318
|
}
|
|
@@ -135931,7 +136322,7 @@ var NAME$2 = "Arrow";
|
|
|
135931
136322
|
var Arrow$3 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
135932
136323
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
135933
136324
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
135934
|
-
Primitive$
|
|
136325
|
+
Primitive$3.svg,
|
|
135935
136326
|
{
|
|
135936
136327
|
...arrowProps,
|
|
135937
136328
|
ref: forwardedRef,
|
|
@@ -135944,10 +136335,10 @@ var Arrow$3 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
135944
136335
|
);
|
|
135945
136336
|
});
|
|
135946
136337
|
Arrow$3.displayName = NAME$2;
|
|
135947
|
-
var Root$
|
|
136338
|
+
var Root$4 = Arrow$3;
|
|
135948
136339
|
|
|
135949
136340
|
// packages/react/context/src/createContext.tsx
|
|
135950
|
-
function createContextScope$
|
|
136341
|
+
function createContextScope$6(scopeName, createContextScopeDeps = []) {
|
|
135951
136342
|
let defaultContexts = [];
|
|
135952
136343
|
function createContext3(rootComponentName, defaultContext) {
|
|
135953
136344
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -135982,9 +136373,9 @@ function createContextScope$3(scopeName, createContextScopeDeps = []) {
|
|
|
135982
136373
|
};
|
|
135983
136374
|
};
|
|
135984
136375
|
createScope.scopeName = scopeName;
|
|
135985
|
-
return [createContext3, composeContextScopes$
|
|
136376
|
+
return [createContext3, composeContextScopes$6(createScope, ...createContextScopeDeps)];
|
|
135986
136377
|
}
|
|
135987
|
-
function composeContextScopes$
|
|
136378
|
+
function composeContextScopes$6(...scopes) {
|
|
135988
136379
|
const baseScope = scopes[0];
|
|
135989
136380
|
if (scopes.length === 1) return baseScope;
|
|
135990
136381
|
const createScope = () => {
|
|
@@ -136006,9 +136397,9 @@ function composeContextScopes$3(...scopes) {
|
|
|
136006
136397
|
}
|
|
136007
136398
|
|
|
136008
136399
|
// packages/react/use-size/src/useSize.tsx
|
|
136009
|
-
function useSize$
|
|
136400
|
+
function useSize$2(element) {
|
|
136010
136401
|
const [size, setSize] = React__namespace.useState(void 0);
|
|
136011
|
-
useLayoutEffect2$
|
|
136402
|
+
useLayoutEffect2$3(() => {
|
|
136012
136403
|
if (element) {
|
|
136013
136404
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
136014
136405
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -136042,7 +136433,7 @@ function useSize$1(element) {
|
|
|
136042
136433
|
}
|
|
136043
136434
|
|
|
136044
136435
|
var POPPER_NAME$1 = "Popper";
|
|
136045
|
-
var [createPopperContext$1, createPopperScope$1] = createContextScope$
|
|
136436
|
+
var [createPopperContext$1, createPopperScope$1] = createContextScope$6(POPPER_NAME$1);
|
|
136046
136437
|
var [PopperProvider$1, usePopperContext$1] = createPopperContext$1(POPPER_NAME$1);
|
|
136047
136438
|
var Popper$1 = (props) => {
|
|
136048
136439
|
const { __scopePopper, children } = props;
|
|
@@ -136056,11 +136447,11 @@ var PopperAnchor$1 = React__namespace.forwardRef(
|
|
|
136056
136447
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
136057
136448
|
const context = usePopperContext$1(ANCHOR_NAME$3, __scopePopper);
|
|
136058
136449
|
const ref = React__namespace.useRef(null);
|
|
136059
|
-
const composedRefs = useComposedRefs$
|
|
136450
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
136060
136451
|
React__namespace.useEffect(() => {
|
|
136061
136452
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
136062
136453
|
});
|
|
136063
|
-
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
136454
|
+
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { ...anchorProps, ref: composedRefs });
|
|
136064
136455
|
}
|
|
136065
136456
|
);
|
|
136066
136457
|
PopperAnchor$1.displayName = ANCHOR_NAME$3;
|
|
@@ -136086,9 +136477,9 @@ var PopperContent$1 = React__namespace.forwardRef(
|
|
|
136086
136477
|
} = props;
|
|
136087
136478
|
const context = usePopperContext$1(CONTENT_NAME$4, __scopePopper);
|
|
136088
136479
|
const [content, setContent] = React__namespace.useState(null);
|
|
136089
|
-
const composedRefs = useComposedRefs$
|
|
136480
|
+
const composedRefs = useComposedRefs$2(forwardedRef, (node) => setContent(node));
|
|
136090
136481
|
const [arrow$1, setArrow] = React__namespace.useState(null);
|
|
136091
|
-
const arrowSize = useSize$
|
|
136482
|
+
const arrowSize = useSize$2(arrow$1);
|
|
136092
136483
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
136093
136484
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
136094
136485
|
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
|
@@ -136140,8 +136531,8 @@ var PopperContent$1 = React__namespace.forwardRef(
|
|
|
136140
136531
|
]
|
|
136141
136532
|
});
|
|
136142
136533
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement$1(placement);
|
|
136143
|
-
const handlePlaced = useCallbackRef$
|
|
136144
|
-
useLayoutEffect2$
|
|
136534
|
+
const handlePlaced = useCallbackRef$3(onPlaced);
|
|
136535
|
+
useLayoutEffect2$3(() => {
|
|
136145
136536
|
if (isPositioned) {
|
|
136146
136537
|
handlePlaced?.();
|
|
136147
136538
|
}
|
|
@@ -136150,7 +136541,7 @@ var PopperContent$1 = React__namespace.forwardRef(
|
|
|
136150
136541
|
const arrowY = middlewareData.arrow?.y;
|
|
136151
136542
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
136152
136543
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
136153
|
-
useLayoutEffect2$
|
|
136544
|
+
useLayoutEffect2$3(() => {
|
|
136154
136545
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
136155
136546
|
}, [content]);
|
|
136156
136547
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -136187,7 +136578,7 @@ var PopperContent$1 = React__namespace.forwardRef(
|
|
|
136187
136578
|
arrowY,
|
|
136188
136579
|
shouldHideArrow: cannotCenterArrow,
|
|
136189
136580
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
136190
|
-
Primitive$
|
|
136581
|
+
Primitive$3.div,
|
|
136191
136582
|
{
|
|
136192
136583
|
"data-side": placedSide,
|
|
136193
136584
|
"data-align": placedAlign,
|
|
@@ -136247,7 +136638,7 @@ var PopperArrow$1 = React__namespace.forwardRef(function PopperArrow2(props, for
|
|
|
136247
136638
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
136248
136639
|
},
|
|
136249
136640
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
136250
|
-
Root$
|
|
136641
|
+
Root$4,
|
|
136251
136642
|
{
|
|
136252
136643
|
...arrowProps,
|
|
136253
136644
|
ref: forwardedRef,
|
|
@@ -136301,7 +136692,7 @@ function getSideAndAlignFromPlacement$1(placement) {
|
|
|
136301
136692
|
const [side, align = "center"] = placement.split("-");
|
|
136302
136693
|
return [side, align];
|
|
136303
136694
|
}
|
|
136304
|
-
var Root2$
|
|
136695
|
+
var Root2$4 = Popper$1;
|
|
136305
136696
|
var Anchor$1 = PopperAnchor$1;
|
|
136306
136697
|
var Content$1 = PopperContent$1;
|
|
136307
136698
|
var Arrow$2 = PopperArrow$1;
|
|
@@ -136310,14 +136701,14 @@ var PORTAL_NAME$4 = "Portal";
|
|
|
136310
136701
|
var Portal$3 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
136311
136702
|
const { container: containerProp, ...portalProps } = props;
|
|
136312
136703
|
const [mounted, setMounted] = React__namespace.useState(false);
|
|
136313
|
-
useLayoutEffect2$
|
|
136704
|
+
useLayoutEffect2$3(() => setMounted(true), []);
|
|
136314
136705
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
136315
|
-
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
136706
|
+
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
136316
136707
|
});
|
|
136317
136708
|
Portal$3.displayName = PORTAL_NAME$4;
|
|
136318
136709
|
|
|
136319
136710
|
// packages/react/context/src/createContext.tsx
|
|
136320
|
-
function createContextScope$
|
|
136711
|
+
function createContextScope$5(scopeName, createContextScopeDeps = []) {
|
|
136321
136712
|
let defaultContexts = [];
|
|
136322
136713
|
function createContext3(rootComponentName, defaultContext) {
|
|
136323
136714
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -136352,9 +136743,9 @@ function createContextScope$2(scopeName, createContextScopeDeps = []) {
|
|
|
136352
136743
|
};
|
|
136353
136744
|
};
|
|
136354
136745
|
createScope.scopeName = scopeName;
|
|
136355
|
-
return [createContext3, composeContextScopes$
|
|
136746
|
+
return [createContext3, composeContextScopes$5(createScope, ...createContextScopeDeps)];
|
|
136356
136747
|
}
|
|
136357
|
-
function composeContextScopes$
|
|
136748
|
+
function composeContextScopes$5(...scopes) {
|
|
136358
136749
|
const baseScope = scopes[0];
|
|
136359
136750
|
if (scopes.length === 1) return baseScope;
|
|
136360
136751
|
const createScope = () => {
|
|
@@ -136376,16 +136767,16 @@ function composeContextScopes$2(...scopes) {
|
|
|
136376
136767
|
}
|
|
136377
136768
|
|
|
136378
136769
|
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
136379
|
-
function useControllableState$
|
|
136770
|
+
function useControllableState$2({
|
|
136380
136771
|
prop,
|
|
136381
136772
|
defaultProp,
|
|
136382
136773
|
onChange = () => {
|
|
136383
136774
|
}
|
|
136384
136775
|
}) {
|
|
136385
|
-
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$
|
|
136776
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$2({ defaultProp, onChange });
|
|
136386
136777
|
const isControlled = prop !== void 0;
|
|
136387
136778
|
const value = isControlled ? prop : uncontrolledProp;
|
|
136388
|
-
const handleChange = useCallbackRef$
|
|
136779
|
+
const handleChange = useCallbackRef$3(onChange);
|
|
136389
136780
|
const setValue = React__namespace.useCallback(
|
|
136390
136781
|
(nextValue) => {
|
|
136391
136782
|
if (isControlled) {
|
|
@@ -136400,14 +136791,14 @@ function useControllableState$1({
|
|
|
136400
136791
|
);
|
|
136401
136792
|
return [value, setValue];
|
|
136402
136793
|
}
|
|
136403
|
-
function useUncontrolledState$
|
|
136794
|
+
function useUncontrolledState$2({
|
|
136404
136795
|
defaultProp,
|
|
136405
136796
|
onChange
|
|
136406
136797
|
}) {
|
|
136407
136798
|
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
136408
136799
|
const [value] = uncontrolledState;
|
|
136409
136800
|
const prevValueRef = React__namespace.useRef(value);
|
|
136410
|
-
const handleChange = useCallbackRef$
|
|
136801
|
+
const handleChange = useCallbackRef$3(onChange);
|
|
136411
136802
|
React__namespace.useEffect(() => {
|
|
136412
136803
|
if (prevValueRef.current !== value) {
|
|
136413
136804
|
handleChange(value);
|
|
@@ -136417,22 +136808,22 @@ function useUncontrolledState$1({
|
|
|
136417
136808
|
return uncontrolledState;
|
|
136418
136809
|
}
|
|
136419
136810
|
|
|
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$
|
|
136811
|
+
var ENTRY_FOCUS$1 = "rovingFocusGroup.onEntryFocus";
|
|
136812
|
+
var EVENT_OPTIONS$2 = { bubbles: false, cancelable: true };
|
|
136813
|
+
var GROUP_NAME$3 = "RovingFocusGroup";
|
|
136814
|
+
var [Collection$2, useCollection$2, createCollectionScope$2] = createCollection$1(GROUP_NAME$3);
|
|
136815
|
+
var [createRovingFocusGroupContext$1, createRovingFocusGroupScope$1] = createContextScope$5(
|
|
136816
|
+
GROUP_NAME$3,
|
|
136817
|
+
[createCollectionScope$2]
|
|
136427
136818
|
);
|
|
136428
|
-
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME$
|
|
136429
|
-
var RovingFocusGroup = React__namespace.forwardRef(
|
|
136819
|
+
var [RovingFocusProvider$1, useRovingFocusContext$1] = createRovingFocusGroupContext$1(GROUP_NAME$3);
|
|
136820
|
+
var RovingFocusGroup$1 = React__namespace.forwardRef(
|
|
136430
136821
|
(props, forwardedRef) => {
|
|
136431
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Collection$
|
|
136822
|
+
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
136823
|
}
|
|
136433
136824
|
);
|
|
136434
|
-
RovingFocusGroup.displayName = GROUP_NAME$
|
|
136435
|
-
var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) => {
|
|
136825
|
+
RovingFocusGroup$1.displayName = GROUP_NAME$3;
|
|
136826
|
+
var RovingFocusGroupImpl$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
136436
136827
|
const {
|
|
136437
136828
|
__scopeRovingFocusGroup,
|
|
136438
136829
|
orientation,
|
|
@@ -136446,27 +136837,27 @@ var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) =>
|
|
|
136446
136837
|
...groupProps
|
|
136447
136838
|
} = props;
|
|
136448
136839
|
const ref = React__namespace.useRef(null);
|
|
136449
|
-
const composedRefs = useComposedRefs$
|
|
136450
|
-
const direction = useDirection(dir);
|
|
136451
|
-
const [currentTabStopId = null, setCurrentTabStopId] = useControllableState$
|
|
136840
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
136841
|
+
const direction = useDirection$1(dir);
|
|
136842
|
+
const [currentTabStopId = null, setCurrentTabStopId] = useControllableState$2({
|
|
136452
136843
|
prop: currentTabStopIdProp,
|
|
136453
136844
|
defaultProp: defaultCurrentTabStopId,
|
|
136454
136845
|
onChange: onCurrentTabStopIdChange
|
|
136455
136846
|
});
|
|
136456
136847
|
const [isTabbingBackOut, setIsTabbingBackOut] = React__namespace.useState(false);
|
|
136457
|
-
const handleEntryFocus = useCallbackRef$
|
|
136458
|
-
const getItems = useCollection$
|
|
136848
|
+
const handleEntryFocus = useCallbackRef$3(onEntryFocus);
|
|
136849
|
+
const getItems = useCollection$2(__scopeRovingFocusGroup);
|
|
136459
136850
|
const isClickFocusRef = React__namespace.useRef(false);
|
|
136460
136851
|
const [focusableItemsCount, setFocusableItemsCount] = React__namespace.useState(0);
|
|
136461
136852
|
React__namespace.useEffect(() => {
|
|
136462
136853
|
const node = ref.current;
|
|
136463
136854
|
if (node) {
|
|
136464
|
-
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
136465
|
-
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
136855
|
+
node.addEventListener(ENTRY_FOCUS$1, handleEntryFocus);
|
|
136856
|
+
return () => node.removeEventListener(ENTRY_FOCUS$1, handleEntryFocus);
|
|
136466
136857
|
}
|
|
136467
136858
|
}, [handleEntryFocus]);
|
|
136468
136859
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
136469
|
-
RovingFocusProvider,
|
|
136860
|
+
RovingFocusProvider$1,
|
|
136470
136861
|
{
|
|
136471
136862
|
scope: __scopeRovingFocusGroup,
|
|
136472
136863
|
orientation,
|
|
@@ -136487,20 +136878,20 @@ var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) =>
|
|
|
136487
136878
|
[]
|
|
136488
136879
|
),
|
|
136489
136880
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
136490
|
-
Primitive$
|
|
136881
|
+
Primitive$3.div,
|
|
136491
136882
|
{
|
|
136492
136883
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
136493
136884
|
"data-orientation": orientation,
|
|
136494
136885
|
...groupProps,
|
|
136495
136886
|
ref: composedRefs,
|
|
136496
136887
|
style: { outline: "none", ...props.style },
|
|
136497
|
-
onMouseDown: composeEventHandlers$
|
|
136888
|
+
onMouseDown: composeEventHandlers$2(props.onMouseDown, () => {
|
|
136498
136889
|
isClickFocusRef.current = true;
|
|
136499
136890
|
}),
|
|
136500
|
-
onFocus: composeEventHandlers$
|
|
136891
|
+
onFocus: composeEventHandlers$2(props.onFocus, (event) => {
|
|
136501
136892
|
const isKeyboardFocus = !isClickFocusRef.current;
|
|
136502
136893
|
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
136503
|
-
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS$
|
|
136894
|
+
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS$1, EVENT_OPTIONS$2);
|
|
136504
136895
|
event.currentTarget.dispatchEvent(entryFocusEvent);
|
|
136505
136896
|
if (!entryFocusEvent.defaultPrevented) {
|
|
136506
136897
|
const items = getItems().filter((item) => item.focusable);
|
|
@@ -136510,19 +136901,19 @@ var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) =>
|
|
|
136510
136901
|
Boolean
|
|
136511
136902
|
);
|
|
136512
136903
|
const candidateNodes = candidateItems.map((item) => item.ref.current);
|
|
136513
|
-
focusFirst$
|
|
136904
|
+
focusFirst$3(candidateNodes, preventScrollOnEntryFocus);
|
|
136514
136905
|
}
|
|
136515
136906
|
}
|
|
136516
136907
|
isClickFocusRef.current = false;
|
|
136517
136908
|
}),
|
|
136518
|
-
onBlur: composeEventHandlers$
|
|
136909
|
+
onBlur: composeEventHandlers$2(props.onBlur, () => setIsTabbingBackOut(false))
|
|
136519
136910
|
}
|
|
136520
136911
|
)
|
|
136521
136912
|
}
|
|
136522
136913
|
);
|
|
136523
136914
|
});
|
|
136524
|
-
var ITEM_NAME$
|
|
136525
|
-
var RovingFocusGroupItem = React__namespace.forwardRef(
|
|
136915
|
+
var ITEM_NAME$4 = "RovingFocusGroupItem";
|
|
136916
|
+
var RovingFocusGroupItem$1 = React__namespace.forwardRef(
|
|
136526
136917
|
(props, forwardedRef) => {
|
|
136527
136918
|
const {
|
|
136528
136919
|
__scopeRovingFocusGroup,
|
|
@@ -136531,11 +136922,11 @@ var RovingFocusGroupItem = React__namespace.forwardRef(
|
|
|
136531
136922
|
tabStopId,
|
|
136532
136923
|
...itemProps
|
|
136533
136924
|
} = props;
|
|
136534
|
-
const autoId = useId$
|
|
136925
|
+
const autoId = useId$3();
|
|
136535
136926
|
const id = tabStopId || autoId;
|
|
136536
|
-
const context = useRovingFocusContext(ITEM_NAME$
|
|
136927
|
+
const context = useRovingFocusContext$1(ITEM_NAME$4, __scopeRovingFocusGroup);
|
|
136537
136928
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
136538
|
-
const getItems = useCollection$
|
|
136929
|
+
const getItems = useCollection$2(__scopeRovingFocusGroup);
|
|
136539
136930
|
const { onFocusableItemAdd, onFocusableItemRemove } = context;
|
|
136540
136931
|
React__namespace.useEffect(() => {
|
|
136541
136932
|
if (focusable) {
|
|
@@ -136544,31 +136935,31 @@ var RovingFocusGroupItem = React__namespace.forwardRef(
|
|
|
136544
136935
|
}
|
|
136545
136936
|
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
136546
136937
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
136547
|
-
Collection$
|
|
136938
|
+
Collection$2.ItemSlot,
|
|
136548
136939
|
{
|
|
136549
136940
|
scope: __scopeRovingFocusGroup,
|
|
136550
136941
|
id,
|
|
136551
136942
|
focusable,
|
|
136552
136943
|
active,
|
|
136553
136944
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
136554
|
-
Primitive$
|
|
136945
|
+
Primitive$3.span,
|
|
136555
136946
|
{
|
|
136556
136947
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
136557
136948
|
"data-orientation": context.orientation,
|
|
136558
136949
|
...itemProps,
|
|
136559
136950
|
ref: forwardedRef,
|
|
136560
|
-
onMouseDown: composeEventHandlers$
|
|
136951
|
+
onMouseDown: composeEventHandlers$2(props.onMouseDown, (event) => {
|
|
136561
136952
|
if (!focusable) event.preventDefault();
|
|
136562
136953
|
else context.onItemFocus(id);
|
|
136563
136954
|
}),
|
|
136564
|
-
onFocus: composeEventHandlers$
|
|
136565
|
-
onKeyDown: composeEventHandlers$
|
|
136955
|
+
onFocus: composeEventHandlers$2(props.onFocus, () => context.onItemFocus(id)),
|
|
136956
|
+
onKeyDown: composeEventHandlers$2(props.onKeyDown, (event) => {
|
|
136566
136957
|
if (event.key === "Tab" && event.shiftKey) {
|
|
136567
136958
|
context.onItemShiftTab();
|
|
136568
136959
|
return;
|
|
136569
136960
|
}
|
|
136570
136961
|
if (event.target !== event.currentTarget) return;
|
|
136571
|
-
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
136962
|
+
const focusIntent = getFocusIntent$1(event, context.orientation, context.dir);
|
|
136572
136963
|
if (focusIntent !== void 0) {
|
|
136573
136964
|
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
|
|
136574
136965
|
event.preventDefault();
|
|
@@ -136578,9 +136969,9 @@ var RovingFocusGroupItem = React__namespace.forwardRef(
|
|
|
136578
136969
|
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
136579
136970
|
if (focusIntent === "prev") candidateNodes.reverse();
|
|
136580
136971
|
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
136581
|
-
candidateNodes = context.loop ? wrapArray$
|
|
136972
|
+
candidateNodes = context.loop ? wrapArray$2(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
136582
136973
|
}
|
|
136583
|
-
setTimeout(() => focusFirst$
|
|
136974
|
+
setTimeout(() => focusFirst$3(candidateNodes));
|
|
136584
136975
|
}
|
|
136585
136976
|
})
|
|
136586
136977
|
}
|
|
@@ -136589,8 +136980,8 @@ var RovingFocusGroupItem = React__namespace.forwardRef(
|
|
|
136589
136980
|
);
|
|
136590
136981
|
}
|
|
136591
136982
|
);
|
|
136592
|
-
RovingFocusGroupItem.displayName = ITEM_NAME$
|
|
136593
|
-
var MAP_KEY_TO_FOCUS_INTENT = {
|
|
136983
|
+
RovingFocusGroupItem$1.displayName = ITEM_NAME$4;
|
|
136984
|
+
var MAP_KEY_TO_FOCUS_INTENT$1 = {
|
|
136594
136985
|
ArrowLeft: "prev",
|
|
136595
136986
|
ArrowUp: "prev",
|
|
136596
136987
|
ArrowRight: "next",
|
|
@@ -136600,17 +136991,17 @@ var MAP_KEY_TO_FOCUS_INTENT = {
|
|
|
136600
136991
|
PageDown: "last",
|
|
136601
136992
|
End: "last"
|
|
136602
136993
|
};
|
|
136603
|
-
function getDirectionAwareKey(key, dir) {
|
|
136994
|
+
function getDirectionAwareKey$1(key, dir) {
|
|
136604
136995
|
if (dir !== "rtl") return key;
|
|
136605
136996
|
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
136606
136997
|
}
|
|
136607
|
-
function getFocusIntent(event, orientation, dir) {
|
|
136608
|
-
const key = getDirectionAwareKey(event.key, dir);
|
|
136998
|
+
function getFocusIntent$1(event, orientation, dir) {
|
|
136999
|
+
const key = getDirectionAwareKey$1(event.key, dir);
|
|
136609
137000
|
if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
|
|
136610
137001
|
if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
|
|
136611
|
-
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
137002
|
+
return MAP_KEY_TO_FOCUS_INTENT$1[key];
|
|
136612
137003
|
}
|
|
136613
|
-
function focusFirst$
|
|
137004
|
+
function focusFirst$3(candidates, preventScroll = false) {
|
|
136614
137005
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
136615
137006
|
for (const candidate of candidates) {
|
|
136616
137007
|
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
@@ -136618,11 +137009,11 @@ function focusFirst$2(candidates, preventScroll = false) {
|
|
|
136618
137009
|
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
136619
137010
|
}
|
|
136620
137011
|
}
|
|
136621
|
-
function wrapArray$
|
|
137012
|
+
function wrapArray$2(array, startIndex) {
|
|
136622
137013
|
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
136623
137014
|
}
|
|
136624
|
-
var Root$
|
|
136625
|
-
var Item = RovingFocusGroupItem;
|
|
137015
|
+
var Root$3 = RovingFocusGroup$1;
|
|
137016
|
+
var Item$1 = RovingFocusGroupItem$1;
|
|
136626
137017
|
|
|
136627
137018
|
var getDefaultParent = function (originalTarget) {
|
|
136628
137019
|
if (typeof document === 'undefined') {
|
|
@@ -136800,7 +137191,7 @@ function assignRef(ref, value) {
|
|
|
136800
137191
|
* @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
|
|
136801
137192
|
* @returns {MutableRefObject}
|
|
136802
137193
|
*/
|
|
136803
|
-
function useCallbackRef$
|
|
137194
|
+
function useCallbackRef$2(initialValue, callback) {
|
|
136804
137195
|
var ref = React.useState(function () { return ({
|
|
136805
137196
|
// value
|
|
136806
137197
|
value: initialValue,
|
|
@@ -136840,7 +137231,7 @@ function useCallbackRef$1(initialValue, callback) {
|
|
|
136840
137231
|
* }
|
|
136841
137232
|
*/
|
|
136842
137233
|
function useMergeRefs(refs, defaultValue) {
|
|
136843
|
-
return useCallbackRef$
|
|
137234
|
+
return useCallbackRef$2(defaultValue || null, function (newValue) { return refs.forEach(function (ref) { return assignRef(ref, newValue); }); });
|
|
136844
137235
|
}
|
|
136845
137236
|
|
|
136846
137237
|
function ItoI(a) {
|
|
@@ -137442,14 +137833,14 @@ var SUB_CLOSE_KEYS = {
|
|
|
137442
137833
|
rtl: ["ArrowRight"]
|
|
137443
137834
|
};
|
|
137444
137835
|
var MENU_NAME = "Menu";
|
|
137445
|
-
var [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);
|
|
137446
|
-
var [createMenuContext, createMenuScope] = createContextScope$
|
|
137447
|
-
createCollectionScope,
|
|
137836
|
+
var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection$1(MENU_NAME);
|
|
137837
|
+
var [createMenuContext, createMenuScope] = createContextScope$7(MENU_NAME, [
|
|
137838
|
+
createCollectionScope$1,
|
|
137448
137839
|
createPopperScope$1,
|
|
137449
|
-
createRovingFocusGroupScope
|
|
137840
|
+
createRovingFocusGroupScope$1
|
|
137450
137841
|
]);
|
|
137451
137842
|
var usePopperScope$1 = createPopperScope$1();
|
|
137452
|
-
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
137843
|
+
var useRovingFocusGroupScope$1 = createRovingFocusGroupScope$1();
|
|
137453
137844
|
var [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);
|
|
137454
137845
|
var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);
|
|
137455
137846
|
var Menu = (props) => {
|
|
@@ -137457,8 +137848,8 @@ var Menu = (props) => {
|
|
|
137457
137848
|
const popperScope = usePopperScope$1(__scopeMenu);
|
|
137458
137849
|
const [content, setContent] = React__namespace.useState(null);
|
|
137459
137850
|
const isUsingKeyboardRef = React__namespace.useRef(false);
|
|
137460
|
-
const handleOpenChange = useCallbackRef$
|
|
137461
|
-
const direction = useDirection(dir);
|
|
137851
|
+
const handleOpenChange = useCallbackRef$3(onOpenChange);
|
|
137852
|
+
const direction = useDirection$1(dir);
|
|
137462
137853
|
React__namespace.useEffect(() => {
|
|
137463
137854
|
const handleKeyDown = () => {
|
|
137464
137855
|
isUsingKeyboardRef.current = true;
|
|
@@ -137473,7 +137864,7 @@ var Menu = (props) => {
|
|
|
137473
137864
|
document.removeEventListener("pointermove", handlePointer, { capture: true });
|
|
137474
137865
|
};
|
|
137475
137866
|
}, []);
|
|
137476
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Root2$
|
|
137867
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Root2$4, { ...popperScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
137477
137868
|
MenuProvider,
|
|
137478
137869
|
{
|
|
137479
137870
|
scope: __scopeMenu,
|
|
@@ -137523,14 +137914,14 @@ var MenuContent = React__namespace.forwardRef(
|
|
|
137523
137914
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
137524
137915
|
const context = useMenuContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
137525
137916
|
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 }) }) }) });
|
|
137917
|
+
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
137918
|
}
|
|
137528
137919
|
);
|
|
137529
137920
|
var MenuRootContentModal = React__namespace.forwardRef(
|
|
137530
137921
|
(props, forwardedRef) => {
|
|
137531
137922
|
const context = useMenuContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
137532
137923
|
const ref = React__namespace.useRef(null);
|
|
137533
|
-
const composedRefs = useComposedRefs$
|
|
137924
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
137534
137925
|
React__namespace.useEffect(() => {
|
|
137535
137926
|
const content = ref.current;
|
|
137536
137927
|
if (content) return hideOthers(content);
|
|
@@ -137543,7 +137934,7 @@ var MenuRootContentModal = React__namespace.forwardRef(
|
|
|
137543
137934
|
trapFocus: context.open,
|
|
137544
137935
|
disableOutsidePointerEvents: context.open,
|
|
137545
137936
|
disableOutsideScroll: true,
|
|
137546
|
-
onFocusOutside: composeEventHandlers$
|
|
137937
|
+
onFocusOutside: composeEventHandlers$2(
|
|
137547
137938
|
props.onFocusOutside,
|
|
137548
137939
|
(event) => event.preventDefault(),
|
|
137549
137940
|
{ checkForDefaultPrevented: false }
|
|
@@ -137588,11 +137979,11 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137588
137979
|
const context = useMenuContext(CONTENT_NAME$3, __scopeMenu);
|
|
137589
137980
|
const rootContext = useMenuRootContext(CONTENT_NAME$3, __scopeMenu);
|
|
137590
137981
|
const popperScope = usePopperScope$1(__scopeMenu);
|
|
137591
|
-
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
|
|
137592
|
-
const getItems = useCollection(__scopeMenu);
|
|
137982
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope$1(__scopeMenu);
|
|
137983
|
+
const getItems = useCollection$1(__scopeMenu);
|
|
137593
137984
|
const [currentItemId, setCurrentItemId] = React__namespace.useState(null);
|
|
137594
137985
|
const contentRef = React__namespace.useRef(null);
|
|
137595
|
-
const composedRefs = useComposedRefs$
|
|
137986
|
+
const composedRefs = useComposedRefs$2(forwardedRef, contentRef, context.onContentChange);
|
|
137596
137987
|
const timerRef = React__namespace.useRef(0);
|
|
137597
137988
|
const searchRef = React__namespace.useRef("");
|
|
137598
137989
|
const pointerGraceTimerRef = React__namespace.useRef(0);
|
|
@@ -137660,7 +138051,7 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137660
138051
|
{
|
|
137661
138052
|
asChild: true,
|
|
137662
138053
|
trapped: trapFocus,
|
|
137663
|
-
onMountAutoFocus: composeEventHandlers$
|
|
138054
|
+
onMountAutoFocus: composeEventHandlers$2(onOpenAutoFocus, (event) => {
|
|
137664
138055
|
event.preventDefault();
|
|
137665
138056
|
contentRef.current?.focus({ preventScroll: true });
|
|
137666
138057
|
}),
|
|
@@ -137676,7 +138067,7 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137676
138067
|
onInteractOutside,
|
|
137677
138068
|
onDismiss,
|
|
137678
138069
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
137679
|
-
Root$
|
|
138070
|
+
Root$3,
|
|
137680
138071
|
{
|
|
137681
138072
|
asChild: true,
|
|
137682
138073
|
...rovingFocusGroupScope,
|
|
@@ -137685,7 +138076,7 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137685
138076
|
loop,
|
|
137686
138077
|
currentTabStopId: currentItemId,
|
|
137687
138078
|
onCurrentTabStopIdChange: setCurrentItemId,
|
|
137688
|
-
onEntryFocus: composeEventHandlers$
|
|
138079
|
+
onEntryFocus: composeEventHandlers$2(onEntryFocus, (event) => {
|
|
137689
138080
|
if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
|
|
137690
138081
|
}),
|
|
137691
138082
|
preventScrollOnEntryFocus: true,
|
|
@@ -137701,7 +138092,7 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137701
138092
|
...contentProps,
|
|
137702
138093
|
ref: composedRefs,
|
|
137703
138094
|
style: { outline: "none", ...contentProps.style },
|
|
137704
|
-
onKeyDown: composeEventHandlers$
|
|
138095
|
+
onKeyDown: composeEventHandlers$2(contentProps.onKeyDown, (event) => {
|
|
137705
138096
|
const target = event.target;
|
|
137706
138097
|
const isKeyDownInside = target.closest("[data-radix-menu-content]") === event.currentTarget;
|
|
137707
138098
|
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
@@ -137717,15 +138108,15 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137717
138108
|
const items = getItems().filter((item) => !item.disabled);
|
|
137718
138109
|
const candidateNodes = items.map((item) => item.ref.current);
|
|
137719
138110
|
if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();
|
|
137720
|
-
focusFirst$
|
|
138111
|
+
focusFirst$2(candidateNodes);
|
|
137721
138112
|
}),
|
|
137722
|
-
onBlur: composeEventHandlers$
|
|
138113
|
+
onBlur: composeEventHandlers$2(props.onBlur, (event) => {
|
|
137723
138114
|
if (!event.currentTarget.contains(event.target)) {
|
|
137724
138115
|
window.clearTimeout(timerRef.current);
|
|
137725
138116
|
searchRef.current = "";
|
|
137726
138117
|
}
|
|
137727
138118
|
}),
|
|
137728
|
-
onPointerMove: composeEventHandlers$
|
|
138119
|
+
onPointerMove: composeEventHandlers$2(
|
|
137729
138120
|
props.onPointerMove,
|
|
137730
138121
|
whenMouse((event) => {
|
|
137731
138122
|
const target = event.target;
|
|
@@ -137750,31 +138141,31 @@ var MenuContentImpl = React__namespace.forwardRef(
|
|
|
137750
138141
|
}
|
|
137751
138142
|
);
|
|
137752
138143
|
MenuContent.displayName = CONTENT_NAME$3;
|
|
137753
|
-
var GROUP_NAME$
|
|
138144
|
+
var GROUP_NAME$2 = "MenuGroup";
|
|
137754
138145
|
var MenuGroup = React__namespace.forwardRef(
|
|
137755
138146
|
(props, forwardedRef) => {
|
|
137756
138147
|
const { __scopeMenu, ...groupProps } = props;
|
|
137757
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
138148
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
137758
138149
|
}
|
|
137759
138150
|
);
|
|
137760
|
-
MenuGroup.displayName = GROUP_NAME$
|
|
138151
|
+
MenuGroup.displayName = GROUP_NAME$2;
|
|
137761
138152
|
var LABEL_NAME$1 = "MenuLabel";
|
|
137762
138153
|
var MenuLabel = React__namespace.forwardRef(
|
|
137763
138154
|
(props, forwardedRef) => {
|
|
137764
138155
|
const { __scopeMenu, ...labelProps } = props;
|
|
137765
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$
|
|
138156
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$3.div, { ...labelProps, ref: forwardedRef });
|
|
137766
138157
|
}
|
|
137767
138158
|
);
|
|
137768
138159
|
MenuLabel.displayName = LABEL_NAME$1;
|
|
137769
|
-
var ITEM_NAME$
|
|
138160
|
+
var ITEM_NAME$3 = "MenuItem";
|
|
137770
138161
|
var ITEM_SELECT = "menu.itemSelect";
|
|
137771
138162
|
var MenuItem = React__namespace.forwardRef(
|
|
137772
138163
|
(props, forwardedRef) => {
|
|
137773
138164
|
const { disabled = false, onSelect, ...itemProps } = props;
|
|
137774
138165
|
const ref = React__namespace.useRef(null);
|
|
137775
|
-
const rootContext = useMenuRootContext(ITEM_NAME$
|
|
137776
|
-
const contentContext = useMenuContentContext(ITEM_NAME$
|
|
137777
|
-
const composedRefs = useComposedRefs$
|
|
138166
|
+
const rootContext = useMenuRootContext(ITEM_NAME$3, props.__scopeMenu);
|
|
138167
|
+
const contentContext = useMenuContentContext(ITEM_NAME$3, props.__scopeMenu);
|
|
138168
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
137778
138169
|
const isPointerDownRef = React__namespace.useRef(false);
|
|
137779
138170
|
const handleSelect = () => {
|
|
137780
138171
|
const menuItem = ref.current;
|
|
@@ -137795,15 +138186,15 @@ var MenuItem = React__namespace.forwardRef(
|
|
|
137795
138186
|
...itemProps,
|
|
137796
138187
|
ref: composedRefs,
|
|
137797
138188
|
disabled,
|
|
137798
|
-
onClick: composeEventHandlers$
|
|
138189
|
+
onClick: composeEventHandlers$2(props.onClick, handleSelect),
|
|
137799
138190
|
onPointerDown: (event) => {
|
|
137800
138191
|
props.onPointerDown?.(event);
|
|
137801
138192
|
isPointerDownRef.current = true;
|
|
137802
138193
|
},
|
|
137803
|
-
onPointerUp: composeEventHandlers$
|
|
138194
|
+
onPointerUp: composeEventHandlers$2(props.onPointerUp, (event) => {
|
|
137804
138195
|
if (!isPointerDownRef.current) event.currentTarget?.click();
|
|
137805
138196
|
}),
|
|
137806
|
-
onKeyDown: composeEventHandlers$
|
|
138197
|
+
onKeyDown: composeEventHandlers$2(props.onKeyDown, (event) => {
|
|
137807
138198
|
const isTypingAhead = contentContext.searchRef.current !== "";
|
|
137808
138199
|
if (disabled || isTypingAhead && event.key === " ") return;
|
|
137809
138200
|
if (SELECTION_KEYS.includes(event.key)) {
|
|
@@ -137815,14 +138206,14 @@ var MenuItem = React__namespace.forwardRef(
|
|
|
137815
138206
|
);
|
|
137816
138207
|
}
|
|
137817
138208
|
);
|
|
137818
|
-
MenuItem.displayName = ITEM_NAME$
|
|
138209
|
+
MenuItem.displayName = ITEM_NAME$3;
|
|
137819
138210
|
var MenuItemImpl = React__namespace.forwardRef(
|
|
137820
138211
|
(props, forwardedRef) => {
|
|
137821
138212
|
const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;
|
|
137822
|
-
const contentContext = useMenuContentContext(ITEM_NAME$
|
|
137823
|
-
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
|
|
138213
|
+
const contentContext = useMenuContentContext(ITEM_NAME$3, __scopeMenu);
|
|
138214
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope$1(__scopeMenu);
|
|
137824
138215
|
const ref = React__namespace.useRef(null);
|
|
137825
|
-
const composedRefs = useComposedRefs$
|
|
138216
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
137826
138217
|
const [isFocused, setIsFocused] = React__namespace.useState(false);
|
|
137827
138218
|
const [textContent, setTextContent] = React__namespace.useState("");
|
|
137828
138219
|
React__namespace.useEffect(() => {
|
|
@@ -137832,13 +138223,13 @@ var MenuItemImpl = React__namespace.forwardRef(
|
|
|
137832
138223
|
}
|
|
137833
138224
|
}, [itemProps.children]);
|
|
137834
138225
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
137835
|
-
Collection.ItemSlot,
|
|
138226
|
+
Collection$1.ItemSlot,
|
|
137836
138227
|
{
|
|
137837
138228
|
scope: __scopeMenu,
|
|
137838
138229
|
disabled,
|
|
137839
138230
|
textValue: textValue ?? textContent,
|
|
137840
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
137841
|
-
Primitive$
|
|
138231
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Item$1, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
138232
|
+
Primitive$3.div,
|
|
137842
138233
|
{
|
|
137843
138234
|
role: "menuitem",
|
|
137844
138235
|
"data-highlighted": isFocused ? "" : void 0,
|
|
@@ -137846,7 +138237,7 @@ var MenuItemImpl = React__namespace.forwardRef(
|
|
|
137846
138237
|
"data-disabled": disabled ? "" : void 0,
|
|
137847
138238
|
...itemProps,
|
|
137848
138239
|
ref: composedRefs,
|
|
137849
|
-
onPointerMove: composeEventHandlers$
|
|
138240
|
+
onPointerMove: composeEventHandlers$2(
|
|
137850
138241
|
props.onPointerMove,
|
|
137851
138242
|
whenMouse((event) => {
|
|
137852
138243
|
if (disabled) {
|
|
@@ -137860,12 +138251,12 @@ var MenuItemImpl = React__namespace.forwardRef(
|
|
|
137860
138251
|
}
|
|
137861
138252
|
})
|
|
137862
138253
|
),
|
|
137863
|
-
onPointerLeave: composeEventHandlers$
|
|
138254
|
+
onPointerLeave: composeEventHandlers$2(
|
|
137864
138255
|
props.onPointerLeave,
|
|
137865
138256
|
whenMouse((event) => contentContext.onItemLeave(event))
|
|
137866
138257
|
),
|
|
137867
|
-
onFocus: composeEventHandlers$
|
|
137868
|
-
onBlur: composeEventHandlers$
|
|
138258
|
+
onFocus: composeEventHandlers$2(props.onFocus, () => setIsFocused(true)),
|
|
138259
|
+
onBlur: composeEventHandlers$2(props.onBlur, () => setIsFocused(false))
|
|
137869
138260
|
}
|
|
137870
138261
|
) })
|
|
137871
138262
|
}
|
|
@@ -137884,7 +138275,7 @@ var MenuCheckboxItem = React__namespace.forwardRef(
|
|
|
137884
138275
|
...checkboxItemProps,
|
|
137885
138276
|
ref: forwardedRef,
|
|
137886
138277
|
"data-state": getCheckedState(checked),
|
|
137887
|
-
onSelect: composeEventHandlers$
|
|
138278
|
+
onSelect: composeEventHandlers$2(
|
|
137888
138279
|
checkboxItemProps.onSelect,
|
|
137889
138280
|
() => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),
|
|
137890
138281
|
{ checkForDefaultPrevented: false }
|
|
@@ -137894,25 +138285,25 @@ var MenuCheckboxItem = React__namespace.forwardRef(
|
|
|
137894
138285
|
}
|
|
137895
138286
|
);
|
|
137896
138287
|
MenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME$1;
|
|
137897
|
-
var RADIO_GROUP_NAME$
|
|
137898
|
-
var [RadioGroupProvider, useRadioGroupContext] = createMenuContext(
|
|
137899
|
-
RADIO_GROUP_NAME$
|
|
138288
|
+
var RADIO_GROUP_NAME$2 = "MenuRadioGroup";
|
|
138289
|
+
var [RadioGroupProvider$1, useRadioGroupContext$1] = createMenuContext(
|
|
138290
|
+
RADIO_GROUP_NAME$2,
|
|
137900
138291
|
{ value: void 0, onValueChange: () => {
|
|
137901
138292
|
} }
|
|
137902
138293
|
);
|
|
137903
138294
|
var MenuRadioGroup = React__namespace.forwardRef(
|
|
137904
138295
|
(props, forwardedRef) => {
|
|
137905
138296
|
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 }) });
|
|
138297
|
+
const handleValueChange = useCallbackRef$3(onValueChange);
|
|
138298
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupProvider$1, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsxRuntime.jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });
|
|
137908
138299
|
}
|
|
137909
138300
|
);
|
|
137910
|
-
MenuRadioGroup.displayName = RADIO_GROUP_NAME$
|
|
138301
|
+
MenuRadioGroup.displayName = RADIO_GROUP_NAME$2;
|
|
137911
138302
|
var RADIO_ITEM_NAME$1 = "MenuRadioItem";
|
|
137912
138303
|
var MenuRadioItem = React__namespace.forwardRef(
|
|
137913
138304
|
(props, forwardedRef) => {
|
|
137914
138305
|
const { value, ...radioItemProps } = props;
|
|
137915
|
-
const context = useRadioGroupContext(RADIO_ITEM_NAME$1, props.__scopeMenu);
|
|
138306
|
+
const context = useRadioGroupContext$1(RADIO_ITEM_NAME$1, props.__scopeMenu);
|
|
137916
138307
|
const checked = value === context.value;
|
|
137917
138308
|
return /* @__PURE__ */ jsxRuntime.jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
137918
138309
|
MenuItem,
|
|
@@ -137922,7 +138313,7 @@ var MenuRadioItem = React__namespace.forwardRef(
|
|
|
137922
138313
|
...radioItemProps,
|
|
137923
138314
|
ref: forwardedRef,
|
|
137924
138315
|
"data-state": getCheckedState(checked),
|
|
137925
|
-
onSelect: composeEventHandlers$
|
|
138316
|
+
onSelect: composeEventHandlers$2(
|
|
137926
138317
|
radioItemProps.onSelect,
|
|
137927
138318
|
() => context.onValueChange?.(value),
|
|
137928
138319
|
{ checkForDefaultPrevented: false }
|
|
@@ -137946,7 +138337,7 @@ var MenuItemIndicator = React__namespace.forwardRef(
|
|
|
137946
138337
|
{
|
|
137947
138338
|
present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
|
|
137948
138339
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
137949
|
-
Primitive$
|
|
138340
|
+
Primitive$3.span,
|
|
137950
138341
|
{
|
|
137951
138342
|
...itemIndicatorProps,
|
|
137952
138343
|
ref: forwardedRef,
|
|
@@ -137963,7 +138354,7 @@ var MenuSeparator = React__namespace.forwardRef(
|
|
|
137963
138354
|
(props, forwardedRef) => {
|
|
137964
138355
|
const { __scopeMenu, ...separatorProps } = props;
|
|
137965
138356
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
137966
|
-
Primitive$
|
|
138357
|
+
Primitive$3.div,
|
|
137967
138358
|
{
|
|
137968
138359
|
role: "separator",
|
|
137969
138360
|
"aria-orientation": "horizontal",
|
|
@@ -137991,12 +138382,12 @@ var MenuSub = (props) => {
|
|
|
137991
138382
|
const popperScope = usePopperScope$1(__scopeMenu);
|
|
137992
138383
|
const [trigger, setTrigger] = React__namespace.useState(null);
|
|
137993
138384
|
const [content, setContent] = React__namespace.useState(null);
|
|
137994
|
-
const handleOpenChange = useCallbackRef$
|
|
138385
|
+
const handleOpenChange = useCallbackRef$3(onOpenChange);
|
|
137995
138386
|
React__namespace.useEffect(() => {
|
|
137996
138387
|
if (parentMenuContext.open === false) handleOpenChange(false);
|
|
137997
138388
|
return () => handleOpenChange(false);
|
|
137998
138389
|
}, [parentMenuContext.open, handleOpenChange]);
|
|
137999
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Root2$
|
|
138390
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Root2$4, { ...popperScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
138000
138391
|
MenuProvider,
|
|
138001
138392
|
{
|
|
138002
138393
|
scope: __scopeMenu,
|
|
@@ -138008,8 +138399,8 @@ var MenuSub = (props) => {
|
|
|
138008
138399
|
MenuSubProvider,
|
|
138009
138400
|
{
|
|
138010
138401
|
scope: __scopeMenu,
|
|
138011
|
-
contentId: useId$
|
|
138012
|
-
triggerId: useId$
|
|
138402
|
+
contentId: useId$3(),
|
|
138403
|
+
triggerId: useId$3(),
|
|
138013
138404
|
trigger,
|
|
138014
138405
|
onTriggerChange: setTrigger,
|
|
138015
138406
|
children
|
|
@@ -138050,14 +138441,14 @@ var MenuSubTrigger = React__namespace.forwardRef(
|
|
|
138050
138441
|
"aria-controls": subContext.contentId,
|
|
138051
138442
|
"data-state": getOpenState(context.open),
|
|
138052
138443
|
...props,
|
|
138053
|
-
ref: composeRefs$
|
|
138444
|
+
ref: composeRefs$2(forwardedRef, subContext.onTriggerChange),
|
|
138054
138445
|
onClick: (event) => {
|
|
138055
138446
|
props.onClick?.(event);
|
|
138056
138447
|
if (props.disabled || event.defaultPrevented) return;
|
|
138057
138448
|
event.currentTarget.focus();
|
|
138058
138449
|
if (!context.open) context.onOpenChange(true);
|
|
138059
138450
|
},
|
|
138060
|
-
onPointerMove: composeEventHandlers$
|
|
138451
|
+
onPointerMove: composeEventHandlers$2(
|
|
138061
138452
|
props.onPointerMove,
|
|
138062
138453
|
whenMouse((event) => {
|
|
138063
138454
|
contentContext.onItemEnter(event);
|
|
@@ -138071,7 +138462,7 @@ var MenuSubTrigger = React__namespace.forwardRef(
|
|
|
138071
138462
|
}
|
|
138072
138463
|
})
|
|
138073
138464
|
),
|
|
138074
|
-
onPointerLeave: composeEventHandlers$
|
|
138465
|
+
onPointerLeave: composeEventHandlers$2(
|
|
138075
138466
|
props.onPointerLeave,
|
|
138076
138467
|
whenMouse((event) => {
|
|
138077
138468
|
clearOpenTimer();
|
|
@@ -138106,7 +138497,7 @@ var MenuSubTrigger = React__namespace.forwardRef(
|
|
|
138106
138497
|
}
|
|
138107
138498
|
})
|
|
138108
138499
|
),
|
|
138109
|
-
onKeyDown: composeEventHandlers$
|
|
138500
|
+
onKeyDown: composeEventHandlers$2(props.onKeyDown, (event) => {
|
|
138110
138501
|
const isTypingAhead = contentContext.searchRef.current !== "";
|
|
138111
138502
|
if (props.disabled || isTypingAhead && event.key === " ") return;
|
|
138112
138503
|
if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {
|
|
@@ -138129,8 +138520,8 @@ var MenuSubContent = React__namespace.forwardRef(
|
|
|
138129
138520
|
const rootContext = useMenuRootContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
138130
138521
|
const subContext = useMenuSubContext(SUB_CONTENT_NAME$1, props.__scopeMenu);
|
|
138131
138522
|
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(
|
|
138523
|
+
const composedRefs = useComposedRefs$2(forwardedRef, ref);
|
|
138524
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Collection$1.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Collection$1.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
138134
138525
|
MenuContentImpl,
|
|
138135
138526
|
{
|
|
138136
138527
|
id: subContext.contentId,
|
|
@@ -138147,14 +138538,14 @@ var MenuSubContent = React__namespace.forwardRef(
|
|
|
138147
138538
|
event.preventDefault();
|
|
138148
138539
|
},
|
|
138149
138540
|
onCloseAutoFocus: (event) => event.preventDefault(),
|
|
138150
|
-
onFocusOutside: composeEventHandlers$
|
|
138541
|
+
onFocusOutside: composeEventHandlers$2(props.onFocusOutside, (event) => {
|
|
138151
138542
|
if (event.target !== subContext.trigger) context.onOpenChange(false);
|
|
138152
138543
|
}),
|
|
138153
|
-
onEscapeKeyDown: composeEventHandlers$
|
|
138544
|
+
onEscapeKeyDown: composeEventHandlers$2(props.onEscapeKeyDown, (event) => {
|
|
138154
138545
|
rootContext.onClose();
|
|
138155
138546
|
event.preventDefault();
|
|
138156
138547
|
}),
|
|
138157
|
-
onKeyDown: composeEventHandlers$
|
|
138548
|
+
onKeyDown: composeEventHandlers$2(props.onKeyDown, (event) => {
|
|
138158
138549
|
const isKeyDownInside = event.currentTarget.contains(event.target);
|
|
138159
138550
|
const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);
|
|
138160
138551
|
if (isKeyDownInside && isCloseKey) {
|
|
@@ -138177,7 +138568,7 @@ function isIndeterminate(checked) {
|
|
|
138177
138568
|
function getCheckedState(checked) {
|
|
138178
138569
|
return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
138179
138570
|
}
|
|
138180
|
-
function focusFirst$
|
|
138571
|
+
function focusFirst$2(candidates) {
|
|
138181
138572
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
138182
138573
|
for (const candidate of candidates) {
|
|
138183
138574
|
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
@@ -138185,14 +138576,14 @@ function focusFirst$1(candidates) {
|
|
|
138185
138576
|
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
138186
138577
|
}
|
|
138187
138578
|
}
|
|
138188
|
-
function wrapArray(array, startIndex) {
|
|
138579
|
+
function wrapArray$1(array, startIndex) {
|
|
138189
138580
|
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
138190
138581
|
}
|
|
138191
138582
|
function getNextMatch(values, search, currentMatch) {
|
|
138192
138583
|
const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);
|
|
138193
138584
|
const normalizedSearch = isRepeated ? search[0] : search;
|
|
138194
138585
|
const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;
|
|
138195
|
-
let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));
|
|
138586
|
+
let wrappedValues = wrapArray$1(values, Math.max(currentMatchIndex, 0));
|
|
138196
138587
|
const excludeCurrentMatch = normalizedSearch.length === 1;
|
|
138197
138588
|
if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);
|
|
138198
138589
|
const nextMatch = wrappedValues.find(
|
|
@@ -138227,9 +138618,9 @@ var Portal$2 = MenuPortal;
|
|
|
138227
138618
|
var Content2$2 = MenuContent;
|
|
138228
138619
|
var Group = MenuGroup;
|
|
138229
138620
|
var Label = MenuLabel;
|
|
138230
|
-
var Item2$
|
|
138621
|
+
var Item2$2 = MenuItem;
|
|
138231
138622
|
var CheckboxItem = MenuCheckboxItem;
|
|
138232
|
-
var RadioGroup = MenuRadioGroup;
|
|
138623
|
+
var RadioGroup$2 = MenuRadioGroup;
|
|
138233
138624
|
var RadioItem = MenuRadioItem;
|
|
138234
138625
|
var ItemIndicator = MenuItemIndicator;
|
|
138235
138626
|
var Separator$2 = MenuSeparator;
|
|
@@ -138239,22 +138630,22 @@ var SubTrigger = MenuSubTrigger;
|
|
|
138239
138630
|
var SubContent = MenuSubContent;
|
|
138240
138631
|
|
|
138241
138632
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
138242
|
-
var useLayoutEffect2$
|
|
138633
|
+
var useLayoutEffect2$2 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
138243
138634
|
};
|
|
138244
138635
|
|
|
138245
138636
|
// 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$
|
|
138637
|
+
var useReactId$2 = React__namespace["useId".toString()] || (() => void 0);
|
|
138638
|
+
var count$3 = 0;
|
|
138639
|
+
function useId$2(deterministicId) {
|
|
138640
|
+
const [id, setId] = React__namespace.useState(useReactId$2());
|
|
138641
|
+
useLayoutEffect2$2(() => {
|
|
138642
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count$3++));
|
|
138252
138643
|
}, [deterministicId]);
|
|
138253
138644
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
138254
138645
|
}
|
|
138255
138646
|
|
|
138256
138647
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
138257
|
-
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope$
|
|
138648
|
+
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope$9(
|
|
138258
138649
|
DROPDOWN_MENU_NAME,
|
|
138259
138650
|
[createMenuScope]
|
|
138260
138651
|
);
|
|
@@ -138272,7 +138663,7 @@ var DropdownMenu = (props) => {
|
|
|
138272
138663
|
} = props;
|
|
138273
138664
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
138274
138665
|
const triggerRef = React__namespace.useRef(null);
|
|
138275
|
-
const [open = false, setOpen] = useControllableState$
|
|
138666
|
+
const [open = false, setOpen] = useControllableState$3({
|
|
138276
138667
|
prop: openProp,
|
|
138277
138668
|
defaultProp: defaultOpen,
|
|
138278
138669
|
onChange: onOpenChange
|
|
@@ -138281,9 +138672,9 @@ var DropdownMenu = (props) => {
|
|
|
138281
138672
|
DropdownMenuProvider,
|
|
138282
138673
|
{
|
|
138283
138674
|
scope: __scopeDropdownMenu,
|
|
138284
|
-
triggerId: useId$
|
|
138675
|
+
triggerId: useId$2(),
|
|
138285
138676
|
triggerRef,
|
|
138286
|
-
contentId: useId$
|
|
138677
|
+
contentId: useId$2(),
|
|
138287
138678
|
open,
|
|
138288
138679
|
onOpenChange: setOpen,
|
|
138289
138680
|
onOpenToggle: React__namespace.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
@@ -138300,7 +138691,7 @@ var DropdownMenuTrigger = React__namespace.forwardRef(
|
|
|
138300
138691
|
const context = useDropdownMenuContext(TRIGGER_NAME$1, __scopeDropdownMenu);
|
|
138301
138692
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
138302
138693
|
return /* @__PURE__ */ jsxRuntime.jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
138303
|
-
Primitive$
|
|
138694
|
+
Primitive$4.button,
|
|
138304
138695
|
{
|
|
138305
138696
|
type: "button",
|
|
138306
138697
|
id: context.triggerId,
|
|
@@ -138311,14 +138702,14 @@ var DropdownMenuTrigger = React__namespace.forwardRef(
|
|
|
138311
138702
|
"data-disabled": disabled ? "" : void 0,
|
|
138312
138703
|
disabled,
|
|
138313
138704
|
...triggerProps,
|
|
138314
|
-
ref: composeRefs$
|
|
138315
|
-
onPointerDown: composeEventHandlers$
|
|
138705
|
+
ref: composeRefs$3(forwardedRef, context.triggerRef),
|
|
138706
|
+
onPointerDown: composeEventHandlers$3(props.onPointerDown, (event) => {
|
|
138316
138707
|
if (!disabled && event.button === 0 && event.ctrlKey === false) {
|
|
138317
138708
|
context.onOpenToggle();
|
|
138318
138709
|
if (!context.open) event.preventDefault();
|
|
138319
138710
|
}
|
|
138320
138711
|
}),
|
|
138321
|
-
onKeyDown: composeEventHandlers$
|
|
138712
|
+
onKeyDown: composeEventHandlers$3(props.onKeyDown, (event) => {
|
|
138322
138713
|
if (disabled) return;
|
|
138323
138714
|
if (["Enter", " "].includes(event.key)) context.onOpenToggle();
|
|
138324
138715
|
if (event.key === "ArrowDown") context.onOpenChange(true);
|
|
@@ -138351,12 +138742,12 @@ var DropdownMenuContent = React__namespace.forwardRef(
|
|
|
138351
138742
|
...menuScope,
|
|
138352
138743
|
...contentProps,
|
|
138353
138744
|
ref: forwardedRef,
|
|
138354
|
-
onCloseAutoFocus: composeEventHandlers$
|
|
138745
|
+
onCloseAutoFocus: composeEventHandlers$3(props.onCloseAutoFocus, (event) => {
|
|
138355
138746
|
if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
|
|
138356
138747
|
hasInteractedOutsideRef.current = false;
|
|
138357
138748
|
event.preventDefault();
|
|
138358
138749
|
}),
|
|
138359
|
-
onInteractOutside: composeEventHandlers$
|
|
138750
|
+
onInteractOutside: composeEventHandlers$3(props.onInteractOutside, (event) => {
|
|
138360
138751
|
const originalEvent = event.detail.originalEvent;
|
|
138361
138752
|
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
138362
138753
|
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
@@ -138378,7 +138769,7 @@ var DropdownMenuContent = React__namespace.forwardRef(
|
|
|
138378
138769
|
}
|
|
138379
138770
|
);
|
|
138380
138771
|
DropdownMenuContent.displayName = CONTENT_NAME$2;
|
|
138381
|
-
var GROUP_NAME = "DropdownMenuGroup";
|
|
138772
|
+
var GROUP_NAME$1 = "DropdownMenuGroup";
|
|
138382
138773
|
var DropdownMenuGroup = React__namespace.forwardRef(
|
|
138383
138774
|
(props, forwardedRef) => {
|
|
138384
138775
|
const { __scopeDropdownMenu, ...groupProps } = props;
|
|
@@ -138386,7 +138777,7 @@ var DropdownMenuGroup = React__namespace.forwardRef(
|
|
|
138386
138777
|
return /* @__PURE__ */ jsxRuntime.jsx(Group, { ...menuScope, ...groupProps, ref: forwardedRef });
|
|
138387
138778
|
}
|
|
138388
138779
|
);
|
|
138389
|
-
DropdownMenuGroup.displayName = GROUP_NAME;
|
|
138780
|
+
DropdownMenuGroup.displayName = GROUP_NAME$1;
|
|
138390
138781
|
var LABEL_NAME = "DropdownMenuLabel";
|
|
138391
138782
|
var DropdownMenuLabel = React__namespace.forwardRef(
|
|
138392
138783
|
(props, forwardedRef) => {
|
|
@@ -138396,15 +138787,15 @@ var DropdownMenuLabel = React__namespace.forwardRef(
|
|
|
138396
138787
|
}
|
|
138397
138788
|
);
|
|
138398
138789
|
DropdownMenuLabel.displayName = LABEL_NAME;
|
|
138399
|
-
var ITEM_NAME = "DropdownMenuItem";
|
|
138790
|
+
var ITEM_NAME$2 = "DropdownMenuItem";
|
|
138400
138791
|
var DropdownMenuItem = React__namespace.forwardRef(
|
|
138401
138792
|
(props, forwardedRef) => {
|
|
138402
138793
|
const { __scopeDropdownMenu, ...itemProps } = props;
|
|
138403
138794
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
138404
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Item2$
|
|
138795
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Item2$2, { ...menuScope, ...itemProps, ref: forwardedRef });
|
|
138405
138796
|
}
|
|
138406
138797
|
);
|
|
138407
|
-
DropdownMenuItem.displayName = ITEM_NAME;
|
|
138798
|
+
DropdownMenuItem.displayName = ITEM_NAME$2;
|
|
138408
138799
|
var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
|
|
138409
138800
|
var DropdownMenuCheckboxItem = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138410
138801
|
const { __scopeDropdownMenu, ...checkboxItemProps } = props;
|
|
@@ -138412,13 +138803,13 @@ var DropdownMenuCheckboxItem = React__namespace.forwardRef((props, forwardedRef)
|
|
|
138412
138803
|
return /* @__PURE__ */ jsxRuntime.jsx(CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
|
|
138413
138804
|
});
|
|
138414
138805
|
DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;
|
|
138415
|
-
var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
|
|
138806
|
+
var RADIO_GROUP_NAME$1 = "DropdownMenuRadioGroup";
|
|
138416
138807
|
var DropdownMenuRadioGroup = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138417
138808
|
const { __scopeDropdownMenu, ...radioGroupProps } = props;
|
|
138418
138809
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
138419
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
|
|
138810
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadioGroup$2, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
|
|
138420
138811
|
});
|
|
138421
|
-
DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;
|
|
138812
|
+
DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME$1;
|
|
138422
138813
|
var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
|
|
138423
138814
|
var DropdownMenuRadioItem = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138424
138815
|
const { __scopeDropdownMenu, ...radioItemProps } = props;
|
|
@@ -138426,13 +138817,13 @@ var DropdownMenuRadioItem = React__namespace.forwardRef((props, forwardedRef) =>
|
|
|
138426
138817
|
return /* @__PURE__ */ jsxRuntime.jsx(RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
|
|
138427
138818
|
});
|
|
138428
138819
|
DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;
|
|
138429
|
-
var INDICATOR_NAME = "DropdownMenuItemIndicator";
|
|
138820
|
+
var INDICATOR_NAME$1 = "DropdownMenuItemIndicator";
|
|
138430
138821
|
var DropdownMenuItemIndicator = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138431
138822
|
const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
|
|
138432
138823
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
138433
138824
|
return /* @__PURE__ */ jsxRuntime.jsx(ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
|
|
138434
138825
|
});
|
|
138435
|
-
DropdownMenuItemIndicator.displayName = INDICATOR_NAME;
|
|
138826
|
+
DropdownMenuItemIndicator.displayName = INDICATOR_NAME$1;
|
|
138436
138827
|
var SEPARATOR_NAME = "DropdownMenuSeparator";
|
|
138437
138828
|
var DropdownMenuSeparator = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138438
138829
|
const { __scopeDropdownMenu, ...separatorProps } = props;
|
|
@@ -138452,7 +138843,7 @@ DropdownMenuArrow.displayName = ARROW_NAME$2;
|
|
|
138452
138843
|
var DropdownMenuSub = (props) => {
|
|
138453
138844
|
const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;
|
|
138454
138845
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
138455
|
-
const [open = false, setOpen] = useControllableState$
|
|
138846
|
+
const [open = false, setOpen] = useControllableState$3({
|
|
138456
138847
|
prop: openProp,
|
|
138457
138848
|
defaultProp: defaultOpen,
|
|
138458
138849
|
onChange: onOpenChange
|
|
@@ -138491,13 +138882,13 @@ var DropdownMenuSubContent = React__namespace.forwardRef((props, forwardedRef) =
|
|
|
138491
138882
|
);
|
|
138492
138883
|
});
|
|
138493
138884
|
DropdownMenuSubContent.displayName = SUB_CONTENT_NAME;
|
|
138494
|
-
var Root2$
|
|
138885
|
+
var Root2$3 = DropdownMenu;
|
|
138495
138886
|
var Trigger$1 = DropdownMenuTrigger;
|
|
138496
138887
|
var Portal2 = DropdownMenuPortal;
|
|
138497
138888
|
var Content2$1 = DropdownMenuContent;
|
|
138498
138889
|
var Group2 = DropdownMenuGroup;
|
|
138499
138890
|
var Label2 = DropdownMenuLabel;
|
|
138500
|
-
var Item2 = DropdownMenuItem;
|
|
138891
|
+
var Item2$1 = DropdownMenuItem;
|
|
138501
138892
|
var CheckboxItem2 = DropdownMenuCheckboxItem;
|
|
138502
138893
|
var RadioGroup2 = DropdownMenuRadioGroup;
|
|
138503
138894
|
var RadioItem2 = DropdownMenuRadioItem;
|
|
@@ -138520,7 +138911,7 @@ var menuStyleClasses = {
|
|
|
138520
138911
|
separator: "-s-mx-1 s-my-1 s-h-px s-bg-separator",
|
|
138521
138912
|
shortcut: "s-ml-auto s-text-xs s-tracking-widest s-text-primary-400",
|
|
138522
138913
|
};
|
|
138523
|
-
var NewDropdownMenu = Root2$
|
|
138914
|
+
var NewDropdownMenu = Root2$3;
|
|
138524
138915
|
var NewDropdownMenuGroup = Group2;
|
|
138525
138916
|
var NewDropdownMenuPortal = Portal2;
|
|
138526
138917
|
var NewDropdownMenuSub = Sub2;
|
|
@@ -138563,10 +138954,10 @@ var NewDropdownMenuContent = React__namespace.forwardRef(function (_a, ref) {
|
|
|
138563
138954
|
NewDropdownMenuContent.displayName = Content2$1.displayName;
|
|
138564
138955
|
var NewDropdownMenuItem = React__namespace.forwardRef(function (_a, ref) {
|
|
138565
138956
|
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),
|
|
138957
|
+
return (React__namespace.createElement(Item2$1, __assign({ ref: ref, className: cn(menuStyleClasses.item, inset ? menuStyleClasses.inset : "", className || "") }, props),
|
|
138567
138958
|
React__namespace.createElement(ItemWithLabelIconAndDescription, { label: label, icon: icon, description: description }, children)));
|
|
138568
138959
|
});
|
|
138569
|
-
NewDropdownMenuItem.displayName = Item2.displayName;
|
|
138960
|
+
NewDropdownMenuItem.displayName = Item2$1.displayName;
|
|
138570
138961
|
var NewDropdownMenuCheckboxItem = React__namespace.forwardRef(function (_a, ref) {
|
|
138571
138962
|
var className = _a.className, children = _a.children, checked = _a.checked, props = __rest(_a, ["className", "children", "checked"]);
|
|
138572
138963
|
return (React__namespace.createElement(CheckboxItem2, __assign({ ref: ref, className: cn(menuStyleClasses.item, menuStyleClasses.inset, className || ""), checked: checked }, props),
|
|
@@ -138620,7 +139011,7 @@ function Notification(_a) {
|
|
|
138620
139011
|
}
|
|
138621
139012
|
|
|
138622
139013
|
// packages/react/primitive/src/Primitive.tsx
|
|
138623
|
-
var NODES$
|
|
139014
|
+
var NODES$2 = [
|
|
138624
139015
|
"a",
|
|
138625
139016
|
"button",
|
|
138626
139017
|
"div",
|
|
@@ -138638,7 +139029,7 @@ var NODES$1 = [
|
|
|
138638
139029
|
"svg",
|
|
138639
139030
|
"ul"
|
|
138640
139031
|
];
|
|
138641
|
-
var Primitive$
|
|
139032
|
+
var Primitive$2 = NODES$2.reduce((primitive, node) => {
|
|
138642
139033
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138643
139034
|
const { asChild, ...primitiveProps } = props;
|
|
138644
139035
|
const Comp = asChild ? Slot : node;
|
|
@@ -138661,7 +139052,7 @@ var Separator$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
138661
139052
|
const ariaOrientation = orientation === "vertical" ? orientation : void 0;
|
|
138662
139053
|
const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
|
|
138663
139054
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
138664
|
-
Primitive$
|
|
139055
|
+
Primitive$2.div,
|
|
138665
139056
|
{
|
|
138666
139057
|
"data-orientation": orientation,
|
|
138667
139058
|
...semanticProps,
|
|
@@ -138674,13 +139065,15 @@ Separator$1.displayName = NAME$1;
|
|
|
138674
139065
|
function isValidOrientation(orientation) {
|
|
138675
139066
|
return ORIENTATIONS.includes(orientation);
|
|
138676
139067
|
}
|
|
138677
|
-
var Root$
|
|
139068
|
+
var Root$2 = Separator$1;
|
|
138678
139069
|
|
|
138679
139070
|
var Separator = React__namespace.forwardRef(function (_a, ref) {
|
|
138680
139071
|
var className = _a.className, _b = _a.orientation, orientation = _b === void 0 ? "horizontal" : _b, _c = _a.decorative, decorative = _c === void 0 ? true : _c, props = __rest(_a, ["className", "orientation", "decorative"]);
|
|
138681
|
-
return (React__namespace.createElement(Root$
|
|
139072
|
+
return (React__namespace.createElement(Root$2, __assign({ ref: ref, decorative: decorative, orientation: orientation, className: classNames("s-shrink-0 s-bg-separator", orientation === "horizontal"
|
|
139073
|
+
? "s-h-[1px] s-w-full"
|
|
139074
|
+
: "s-h-full s-w-[1px]", className !== null && className !== void 0 ? className : "") }, props)));
|
|
138682
139075
|
});
|
|
138683
|
-
Separator.displayName = Root$
|
|
139076
|
+
Separator.displayName = Root$2.displayName;
|
|
138684
139077
|
|
|
138685
139078
|
function Page(_a) {
|
|
138686
139079
|
var children = _a.children, _b = _a.variant, variant = _b === void 0 ? "normal" : _b;
|
|
@@ -138707,7 +139100,7 @@ Page.SectionHeader = function (_a) {
|
|
|
138707
139100
|
React.createElement(Button, __assign({}, action))))));
|
|
138708
139101
|
};
|
|
138709
139102
|
Page.Separator = function () {
|
|
138710
|
-
return
|
|
139103
|
+
return React.createElement(Separator, null);
|
|
138711
139104
|
};
|
|
138712
139105
|
var PsizeClasses = {
|
|
138713
139106
|
xs: "s-text-xs",
|
|
@@ -138793,7 +139186,7 @@ function PaginatedCitationsGrid(_a) {
|
|
|
138793
139186
|
}
|
|
138794
139187
|
|
|
138795
139188
|
// packages/core/primitive/src/primitive.tsx
|
|
138796
|
-
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
139189
|
+
function composeEventHandlers$1(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
138797
139190
|
return function handleEvent(event) {
|
|
138798
139191
|
originalEventHandler?.(event);
|
|
138799
139192
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -138803,22 +139196,22 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
138803
139196
|
}
|
|
138804
139197
|
|
|
138805
139198
|
// packages/react/compose-refs/src/composeRefs.tsx
|
|
138806
|
-
function setRef(ref, value) {
|
|
139199
|
+
function setRef$1(ref, value) {
|
|
138807
139200
|
if (typeof ref === "function") {
|
|
138808
139201
|
ref(value);
|
|
138809
139202
|
} else if (ref !== null && ref !== void 0) {
|
|
138810
139203
|
ref.current = value;
|
|
138811
139204
|
}
|
|
138812
139205
|
}
|
|
138813
|
-
function composeRefs(...refs) {
|
|
138814
|
-
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
139206
|
+
function composeRefs$1(...refs) {
|
|
139207
|
+
return (node) => refs.forEach((ref) => setRef$1(ref, node));
|
|
138815
139208
|
}
|
|
138816
|
-
function useComposedRefs(...refs) {
|
|
138817
|
-
return React__namespace.useCallback(composeRefs(...refs), refs);
|
|
139209
|
+
function useComposedRefs$1(...refs) {
|
|
139210
|
+
return React__namespace.useCallback(composeRefs$1(...refs), refs);
|
|
138818
139211
|
}
|
|
138819
139212
|
|
|
138820
139213
|
// packages/react/context/src/createContext.tsx
|
|
138821
|
-
function createContextScope$
|
|
139214
|
+
function createContextScope$4(scopeName, createContextScopeDeps = []) {
|
|
138822
139215
|
let defaultContexts = [];
|
|
138823
139216
|
function createContext3(rootComponentName, defaultContext) {
|
|
138824
139217
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -138853,9 +139246,9 @@ function createContextScope$1(scopeName, createContextScopeDeps = []) {
|
|
|
138853
139246
|
};
|
|
138854
139247
|
};
|
|
138855
139248
|
createScope.scopeName = scopeName;
|
|
138856
|
-
return [createContext3, composeContextScopes$
|
|
139249
|
+
return [createContext3, composeContextScopes$4(createScope, ...createContextScopeDeps)];
|
|
138857
139250
|
}
|
|
138858
|
-
function composeContextScopes$
|
|
139251
|
+
function composeContextScopes$4(...scopes) {
|
|
138859
139252
|
const baseScope = scopes[0];
|
|
138860
139253
|
if (scopes.length === 1) return baseScope;
|
|
138861
139254
|
const createScope = () => {
|
|
@@ -138877,7 +139270,7 @@ function composeContextScopes$1(...scopes) {
|
|
|
138877
139270
|
}
|
|
138878
139271
|
|
|
138879
139272
|
// packages/react/primitive/src/Primitive.tsx
|
|
138880
|
-
var NODES = [
|
|
139273
|
+
var NODES$1 = [
|
|
138881
139274
|
"a",
|
|
138882
139275
|
"button",
|
|
138883
139276
|
"div",
|
|
@@ -138895,7 +139288,7 @@ var NODES = [
|
|
|
138895
139288
|
"svg",
|
|
138896
139289
|
"ul"
|
|
138897
139290
|
];
|
|
138898
|
-
var Primitive = NODES.reduce((primitive, node) => {
|
|
139291
|
+
var Primitive$1 = NODES$1.reduce((primitive, node) => {
|
|
138899
139292
|
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
138900
139293
|
const { asChild, ...primitiveProps } = props;
|
|
138901
139294
|
const Comp = asChild ? Slot : node;
|
|
@@ -138912,7 +139305,7 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
138912
139305
|
}
|
|
138913
139306
|
|
|
138914
139307
|
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
138915
|
-
function useCallbackRef(callback) {
|
|
139308
|
+
function useCallbackRef$1(callback) {
|
|
138916
139309
|
const callbackRef = React__namespace.useRef(callback);
|
|
138917
139310
|
React__namespace.useEffect(() => {
|
|
138918
139311
|
callbackRef.current = callback;
|
|
@@ -138922,7 +139315,7 @@ function useCallbackRef(callback) {
|
|
|
138922
139315
|
|
|
138923
139316
|
// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx
|
|
138924
139317
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
138925
|
-
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
139318
|
+
const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
|
|
138926
139319
|
React__namespace.useEffect(() => {
|
|
138927
139320
|
const handleKeyDown = (event) => {
|
|
138928
139321
|
if (event.key === "Escape") {
|
|
@@ -138959,7 +139352,7 @@ var DismissableLayer = React__namespace.forwardRef(
|
|
|
138959
139352
|
const [node, setNode] = React__namespace.useState(null);
|
|
138960
139353
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
138961
139354
|
const [, force] = React__namespace.useState({});
|
|
138962
|
-
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
139355
|
+
const composedRefs = useComposedRefs$1(forwardedRef, (node2) => setNode(node2));
|
|
138963
139356
|
const layers = Array.from(context.layers);
|
|
138964
139357
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
138965
139358
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
@@ -139022,7 +139415,7 @@ var DismissableLayer = React__namespace.forwardRef(
|
|
|
139022
139415
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
139023
139416
|
}, []);
|
|
139024
139417
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
139025
|
-
Primitive.div,
|
|
139418
|
+
Primitive$1.div,
|
|
139026
139419
|
{
|
|
139027
139420
|
...layerProps,
|
|
139028
139421
|
ref: composedRefs,
|
|
@@ -139030,9 +139423,9 @@ var DismissableLayer = React__namespace.forwardRef(
|
|
|
139030
139423
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
139031
139424
|
...props.style
|
|
139032
139425
|
},
|
|
139033
|
-
onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
139034
|
-
onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
139035
|
-
onPointerDownCapture: composeEventHandlers(
|
|
139426
|
+
onFocusCapture: composeEventHandlers$1(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
139427
|
+
onBlurCapture: composeEventHandlers$1(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
139428
|
+
onPointerDownCapture: composeEventHandlers$1(
|
|
139036
139429
|
props.onPointerDownCapture,
|
|
139037
139430
|
pointerDownOutside.onPointerDownCapture
|
|
139038
139431
|
)
|
|
@@ -139045,7 +139438,7 @@ var BRANCH_NAME = "DismissableLayerBranch";
|
|
|
139045
139438
|
var DismissableLayerBranch = React__namespace.forwardRef((props, forwardedRef) => {
|
|
139046
139439
|
const context = React__namespace.useContext(DismissableLayerContext);
|
|
139047
139440
|
const ref = React__namespace.useRef(null);
|
|
139048
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
139441
|
+
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
139049
139442
|
React__namespace.useEffect(() => {
|
|
139050
139443
|
const node = ref.current;
|
|
139051
139444
|
if (node) {
|
|
@@ -139055,11 +139448,11 @@ var DismissableLayerBranch = React__namespace.forwardRef((props, forwardedRef) =
|
|
|
139055
139448
|
};
|
|
139056
139449
|
}
|
|
139057
139450
|
}, [context.branches]);
|
|
139058
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...props, ref: composedRefs });
|
|
139451
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$1.div, { ...props, ref: composedRefs });
|
|
139059
139452
|
});
|
|
139060
139453
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
139061
139454
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
139062
|
-
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
139455
|
+
const handlePointerDownOutside = useCallbackRef$1(onPointerDownOutside);
|
|
139063
139456
|
const isPointerInsideReactTreeRef = React__namespace.useRef(false);
|
|
139064
139457
|
const handleClickRef = React__namespace.useRef(() => {
|
|
139065
139458
|
});
|
|
@@ -139102,7 +139495,7 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
139102
139495
|
};
|
|
139103
139496
|
}
|
|
139104
139497
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
139105
|
-
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
139498
|
+
const handleFocusOutside = useCallbackRef$1(onFocusOutside);
|
|
139106
139499
|
const isFocusInsideReactTreeRef = React__namespace.useRef(false);
|
|
139107
139500
|
React__namespace.useEffect(() => {
|
|
139108
139501
|
const handleFocus = (event) => {
|
|
@@ -139136,18 +139529,18 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
139136
139529
|
}
|
|
139137
139530
|
}
|
|
139138
139531
|
|
|
139139
|
-
var count$
|
|
139532
|
+
var count$2 = 0;
|
|
139140
139533
|
function useFocusGuards() {
|
|
139141
139534
|
React__namespace.useEffect(() => {
|
|
139142
139535
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
139143
139536
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
139144
139537
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
139145
|
-
count$
|
|
139538
|
+
count$2++;
|
|
139146
139539
|
return () => {
|
|
139147
|
-
if (count$
|
|
139540
|
+
if (count$2 === 1) {
|
|
139148
139541
|
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
139149
139542
|
}
|
|
139150
|
-
count$
|
|
139543
|
+
count$2--;
|
|
139151
139544
|
};
|
|
139152
139545
|
}, []);
|
|
139153
139546
|
}
|
|
@@ -139164,7 +139557,7 @@ function createFocusGuard() {
|
|
|
139164
139557
|
|
|
139165
139558
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
139166
139559
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
139167
|
-
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
139560
|
+
var EVENT_OPTIONS$1 = { bubbles: false, cancelable: true };
|
|
139168
139561
|
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
139169
139562
|
var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
139170
139563
|
const {
|
|
@@ -139175,10 +139568,10 @@ var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139175
139568
|
...scopeProps
|
|
139176
139569
|
} = props;
|
|
139177
139570
|
const [container, setContainer] = React__namespace.useState(null);
|
|
139178
|
-
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
139179
|
-
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
139571
|
+
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
139572
|
+
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
139180
139573
|
const lastFocusedElementRef = React__namespace.useRef(null);
|
|
139181
|
-
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
139574
|
+
const composedRefs = useComposedRefs$1(forwardedRef, (node) => setContainer(node));
|
|
139182
139575
|
const focusScope = React__namespace.useRef({
|
|
139183
139576
|
paused: false,
|
|
139184
139577
|
pause() {
|
|
@@ -139229,11 +139622,11 @@ var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139229
139622
|
const previouslyFocusedElement = document.activeElement;
|
|
139230
139623
|
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
139231
139624
|
if (!hasFocusedCandidate) {
|
|
139232
|
-
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
139625
|
+
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS$1);
|
|
139233
139626
|
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
139234
139627
|
container.dispatchEvent(mountEvent);
|
|
139235
139628
|
if (!mountEvent.defaultPrevented) {
|
|
139236
|
-
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
139629
|
+
focusFirst$1(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
139237
139630
|
if (document.activeElement === previouslyFocusedElement) {
|
|
139238
139631
|
focus(container);
|
|
139239
139632
|
}
|
|
@@ -139242,7 +139635,7 @@ var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139242
139635
|
return () => {
|
|
139243
139636
|
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
139244
139637
|
setTimeout(() => {
|
|
139245
|
-
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
139638
|
+
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS$1);
|
|
139246
139639
|
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
139247
139640
|
container.dispatchEvent(unmountEvent);
|
|
139248
139641
|
if (!unmountEvent.defaultPrevented) {
|
|
@@ -139279,10 +139672,10 @@ var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139279
139672
|
},
|
|
139280
139673
|
[loop, trapped, focusScope.paused]
|
|
139281
139674
|
);
|
|
139282
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
139675
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive$1.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
139283
139676
|
});
|
|
139284
139677
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
139285
|
-
function focusFirst(candidates, { select = false } = {}) {
|
|
139678
|
+
function focusFirst$1(candidates, { select = false } = {}) {
|
|
139286
139679
|
const previouslyFocusedElement = document.activeElement;
|
|
139287
139680
|
for (const candidate of candidates) {
|
|
139288
139681
|
focus(candidate, { select });
|
|
@@ -139363,16 +139756,16 @@ function removeLinks(items) {
|
|
|
139363
139756
|
}
|
|
139364
139757
|
|
|
139365
139758
|
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
139366
|
-
var useLayoutEffect2 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
139759
|
+
var useLayoutEffect2$1 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
139367
139760
|
};
|
|
139368
139761
|
|
|
139369
139762
|
// 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++));
|
|
139763
|
+
var useReactId$1 = React__namespace["useId".toString()] || (() => void 0);
|
|
139764
|
+
var count$1 = 0;
|
|
139765
|
+
function useId$1(deterministicId) {
|
|
139766
|
+
const [id, setId] = React__namespace.useState(useReactId$1());
|
|
139767
|
+
useLayoutEffect2$1(() => {
|
|
139768
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count$1++));
|
|
139376
139769
|
}, [deterministicId]);
|
|
139377
139770
|
return deterministicId || (id ? `radix-${id}` : "");
|
|
139378
139771
|
}
|
|
@@ -139382,7 +139775,7 @@ var NAME = "Arrow";
|
|
|
139382
139775
|
var Arrow$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
139383
139776
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
139384
139777
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
139385
|
-
Primitive.svg,
|
|
139778
|
+
Primitive$1.svg,
|
|
139386
139779
|
{
|
|
139387
139780
|
...arrowProps,
|
|
139388
139781
|
ref: forwardedRef,
|
|
@@ -139395,10 +139788,10 @@ var Arrow$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
139395
139788
|
);
|
|
139396
139789
|
});
|
|
139397
139790
|
Arrow$1.displayName = NAME;
|
|
139398
|
-
var Root = Arrow$1;
|
|
139791
|
+
var Root$1 = Arrow$1;
|
|
139399
139792
|
|
|
139400
139793
|
// packages/react/context/src/createContext.tsx
|
|
139401
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
139794
|
+
function createContextScope$3(scopeName, createContextScopeDeps = []) {
|
|
139402
139795
|
let defaultContexts = [];
|
|
139403
139796
|
function createContext3(rootComponentName, defaultContext) {
|
|
139404
139797
|
const BaseContext = React__namespace.createContext(defaultContext);
|
|
@@ -139433,9 +139826,9 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
139433
139826
|
};
|
|
139434
139827
|
};
|
|
139435
139828
|
createScope.scopeName = scopeName;
|
|
139436
|
-
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
139829
|
+
return [createContext3, composeContextScopes$3(createScope, ...createContextScopeDeps)];
|
|
139437
139830
|
}
|
|
139438
|
-
function composeContextScopes(...scopes) {
|
|
139831
|
+
function composeContextScopes$3(...scopes) {
|
|
139439
139832
|
const baseScope = scopes[0];
|
|
139440
139833
|
if (scopes.length === 1) return baseScope;
|
|
139441
139834
|
const createScope = () => {
|
|
@@ -139457,9 +139850,9 @@ function composeContextScopes(...scopes) {
|
|
|
139457
139850
|
}
|
|
139458
139851
|
|
|
139459
139852
|
// packages/react/use-size/src/useSize.tsx
|
|
139460
|
-
function useSize(element) {
|
|
139853
|
+
function useSize$1(element) {
|
|
139461
139854
|
const [size, setSize] = React__namespace.useState(void 0);
|
|
139462
|
-
useLayoutEffect2(() => {
|
|
139855
|
+
useLayoutEffect2$1(() => {
|
|
139463
139856
|
if (element) {
|
|
139464
139857
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
139465
139858
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -139493,7 +139886,7 @@ function useSize(element) {
|
|
|
139493
139886
|
}
|
|
139494
139887
|
|
|
139495
139888
|
var POPPER_NAME = "Popper";
|
|
139496
|
-
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
139889
|
+
var [createPopperContext, createPopperScope] = createContextScope$3(POPPER_NAME);
|
|
139497
139890
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
139498
139891
|
var Popper = (props) => {
|
|
139499
139892
|
const { __scopePopper, children } = props;
|
|
@@ -139507,11 +139900,11 @@ var PopperAnchor = React__namespace.forwardRef(
|
|
|
139507
139900
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
139508
139901
|
const context = usePopperContext(ANCHOR_NAME$1, __scopePopper);
|
|
139509
139902
|
const ref = React__namespace.useRef(null);
|
|
139510
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
139903
|
+
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
139511
139904
|
React__namespace.useEffect(() => {
|
|
139512
139905
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
139513
139906
|
});
|
|
139514
|
-
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
139907
|
+
return virtualRef ? null : /* @__PURE__ */ jsxRuntime.jsx(Primitive$1.div, { ...anchorProps, ref: composedRefs });
|
|
139515
139908
|
}
|
|
139516
139909
|
);
|
|
139517
139910
|
PopperAnchor.displayName = ANCHOR_NAME$1;
|
|
@@ -139537,9 +139930,9 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
139537
139930
|
} = props;
|
|
139538
139931
|
const context = usePopperContext(CONTENT_NAME$1, __scopePopper);
|
|
139539
139932
|
const [content, setContent] = React__namespace.useState(null);
|
|
139540
|
-
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
139933
|
+
const composedRefs = useComposedRefs$1(forwardedRef, (node) => setContent(node));
|
|
139541
139934
|
const [arrow$1, setArrow] = React__namespace.useState(null);
|
|
139542
|
-
const arrowSize = useSize(arrow$1);
|
|
139935
|
+
const arrowSize = useSize$1(arrow$1);
|
|
139543
139936
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
139544
139937
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
139545
139938
|
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
|
@@ -139591,8 +139984,8 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
139591
139984
|
]
|
|
139592
139985
|
});
|
|
139593
139986
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
139594
|
-
const handlePlaced = useCallbackRef(onPlaced);
|
|
139595
|
-
useLayoutEffect2(() => {
|
|
139987
|
+
const handlePlaced = useCallbackRef$1(onPlaced);
|
|
139988
|
+
useLayoutEffect2$1(() => {
|
|
139596
139989
|
if (isPositioned) {
|
|
139597
139990
|
handlePlaced?.();
|
|
139598
139991
|
}
|
|
@@ -139601,7 +139994,7 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
139601
139994
|
const arrowY = middlewareData.arrow?.y;
|
|
139602
139995
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
139603
139996
|
const [contentZIndex, setContentZIndex] = React__namespace.useState();
|
|
139604
|
-
useLayoutEffect2(() => {
|
|
139997
|
+
useLayoutEffect2$1(() => {
|
|
139605
139998
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
139606
139999
|
}, [content]);
|
|
139607
140000
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -139638,7 +140031,7 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
139638
140031
|
arrowY,
|
|
139639
140032
|
shouldHideArrow: cannotCenterArrow,
|
|
139640
140033
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
139641
|
-
Primitive.div,
|
|
140034
|
+
Primitive$1.div,
|
|
139642
140035
|
{
|
|
139643
140036
|
"data-side": placedSide,
|
|
139644
140037
|
"data-align": placedAlign,
|
|
@@ -139698,7 +140091,7 @@ var PopperArrow = React__namespace.forwardRef(function PopperArrow2(props, forwa
|
|
|
139698
140091
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
139699
140092
|
},
|
|
139700
140093
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
139701
|
-
Root,
|
|
140094
|
+
Root$1,
|
|
139702
140095
|
{
|
|
139703
140096
|
...arrowProps,
|
|
139704
140097
|
ref: forwardedRef,
|
|
@@ -139752,7 +140145,7 @@ function getSideAndAlignFromPlacement(placement) {
|
|
|
139752
140145
|
const [side, align = "center"] = placement.split("-");
|
|
139753
140146
|
return [side, align];
|
|
139754
140147
|
}
|
|
139755
|
-
var Root2$
|
|
140148
|
+
var Root2$2 = Popper;
|
|
139756
140149
|
var Anchor = PopperAnchor;
|
|
139757
140150
|
var Content = PopperContent;
|
|
139758
140151
|
var Arrow = PopperArrow;
|
|
@@ -139761,23 +140154,23 @@ var PORTAL_NAME$1 = "Portal";
|
|
|
139761
140154
|
var Portal$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
139762
140155
|
const { container: containerProp, ...portalProps } = props;
|
|
139763
140156
|
const [mounted, setMounted] = React__namespace.useState(false);
|
|
139764
|
-
useLayoutEffect2(() => setMounted(true), []);
|
|
140157
|
+
useLayoutEffect2$1(() => setMounted(true), []);
|
|
139765
140158
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
139766
|
-
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
140159
|
+
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive$1.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
139767
140160
|
});
|
|
139768
140161
|
Portal$1.displayName = PORTAL_NAME$1;
|
|
139769
140162
|
|
|
139770
140163
|
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
139771
|
-
function useControllableState({
|
|
140164
|
+
function useControllableState$1({
|
|
139772
140165
|
prop,
|
|
139773
140166
|
defaultProp,
|
|
139774
140167
|
onChange = () => {
|
|
139775
140168
|
}
|
|
139776
140169
|
}) {
|
|
139777
|
-
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
|
|
140170
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$1({ defaultProp, onChange });
|
|
139778
140171
|
const isControlled = prop !== void 0;
|
|
139779
140172
|
const value = isControlled ? prop : uncontrolledProp;
|
|
139780
|
-
const handleChange = useCallbackRef(onChange);
|
|
140173
|
+
const handleChange = useCallbackRef$1(onChange);
|
|
139781
140174
|
const setValue = React__namespace.useCallback(
|
|
139782
140175
|
(nextValue) => {
|
|
139783
140176
|
if (isControlled) {
|
|
@@ -139792,14 +140185,14 @@ function useControllableState({
|
|
|
139792
140185
|
);
|
|
139793
140186
|
return [value, setValue];
|
|
139794
140187
|
}
|
|
139795
|
-
function useUncontrolledState({
|
|
140188
|
+
function useUncontrolledState$1({
|
|
139796
140189
|
defaultProp,
|
|
139797
140190
|
onChange
|
|
139798
140191
|
}) {
|
|
139799
140192
|
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
139800
140193
|
const [value] = uncontrolledState;
|
|
139801
140194
|
const prevValueRef = React__namespace.useRef(value);
|
|
139802
|
-
const handleChange = useCallbackRef(onChange);
|
|
140195
|
+
const handleChange = useCallbackRef$1(onChange);
|
|
139803
140196
|
React__namespace.useEffect(() => {
|
|
139804
140197
|
if (prevValueRef.current !== value) {
|
|
139805
140198
|
handleChange(value);
|
|
@@ -140129,7 +140522,7 @@ ReactRemoveScroll.classNames = RemoveScroll$1.classNames;
|
|
|
140129
140522
|
var RemoveScroll = ReactRemoveScroll;
|
|
140130
140523
|
|
|
140131
140524
|
var POPOVER_NAME = "Popover";
|
|
140132
|
-
var [createPopoverContext, createPopoverScope] = createContextScope$
|
|
140525
|
+
var [createPopoverContext, createPopoverScope] = createContextScope$4(POPOVER_NAME, [
|
|
140133
140526
|
createPopperScope
|
|
140134
140527
|
]);
|
|
140135
140528
|
var usePopperScope = createPopperScope();
|
|
@@ -140146,16 +140539,16 @@ var Popover$1 = (props) => {
|
|
|
140146
140539
|
const popperScope = usePopperScope(__scopePopover);
|
|
140147
140540
|
const triggerRef = React__namespace.useRef(null);
|
|
140148
140541
|
const [hasCustomAnchor, setHasCustomAnchor] = React__namespace.useState(false);
|
|
140149
|
-
const [open = false, setOpen] = useControllableState({
|
|
140542
|
+
const [open = false, setOpen] = useControllableState$1({
|
|
140150
140543
|
prop: openProp,
|
|
140151
140544
|
defaultProp: defaultOpen,
|
|
140152
140545
|
onChange: onOpenChange
|
|
140153
140546
|
});
|
|
140154
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Root2$
|
|
140547
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Root2$2, { ...popperScope, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
140155
140548
|
PopoverProvider,
|
|
140156
140549
|
{
|
|
140157
140550
|
scope: __scopePopover,
|
|
140158
|
-
contentId: useId(),
|
|
140551
|
+
contentId: useId$1(),
|
|
140159
140552
|
triggerRef,
|
|
140160
140553
|
open,
|
|
140161
140554
|
onOpenChange: setOpen,
|
|
@@ -140190,18 +140583,18 @@ var PopoverTrigger$1 = React__namespace.forwardRef(
|
|
|
140190
140583
|
const { __scopePopover, ...triggerProps } = props;
|
|
140191
140584
|
const context = usePopoverContext(TRIGGER_NAME, __scopePopover);
|
|
140192
140585
|
const popperScope = usePopperScope(__scopePopover);
|
|
140193
|
-
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
140586
|
+
const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
|
|
140194
140587
|
const trigger = /* @__PURE__ */ jsxRuntime.jsx(
|
|
140195
|
-
Primitive.button,
|
|
140588
|
+
Primitive$1.button,
|
|
140196
140589
|
{
|
|
140197
140590
|
type: "button",
|
|
140198
140591
|
"aria-haspopup": "dialog",
|
|
140199
140592
|
"aria-expanded": context.open,
|
|
140200
140593
|
"aria-controls": context.contentId,
|
|
140201
|
-
"data-state": getState(context.open),
|
|
140594
|
+
"data-state": getState$1(context.open),
|
|
140202
140595
|
...triggerProps,
|
|
140203
140596
|
ref: composedTriggerRef,
|
|
140204
|
-
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
140597
|
+
onClick: composeEventHandlers$1(props.onClick, context.onOpenToggle)
|
|
140205
140598
|
}
|
|
140206
140599
|
);
|
|
140207
140600
|
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsxRuntime.jsx(Anchor, { asChild: true, ...popperScope, children: trigger });
|
|
@@ -140232,7 +140625,7 @@ var PopoverContentModal = React__namespace.forwardRef(
|
|
|
140232
140625
|
(props, forwardedRef) => {
|
|
140233
140626
|
const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
|
|
140234
140627
|
const contentRef = React__namespace.useRef(null);
|
|
140235
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
140628
|
+
const composedRefs = useComposedRefs$1(forwardedRef, contentRef);
|
|
140236
140629
|
const isRightClickOutsideRef = React__namespace.useRef(false);
|
|
140237
140630
|
React__namespace.useEffect(() => {
|
|
140238
140631
|
const content = contentRef.current;
|
|
@@ -140245,11 +140638,11 @@ var PopoverContentModal = React__namespace.forwardRef(
|
|
|
140245
140638
|
ref: composedRefs,
|
|
140246
140639
|
trapFocus: context.open,
|
|
140247
140640
|
disableOutsidePointerEvents: true,
|
|
140248
|
-
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
140641
|
+
onCloseAutoFocus: composeEventHandlers$1(props.onCloseAutoFocus, (event) => {
|
|
140249
140642
|
event.preventDefault();
|
|
140250
140643
|
if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();
|
|
140251
140644
|
}),
|
|
140252
|
-
onPointerDownOutside: composeEventHandlers(
|
|
140645
|
+
onPointerDownOutside: composeEventHandlers$1(
|
|
140253
140646
|
props.onPointerDownOutside,
|
|
140254
140647
|
(event) => {
|
|
140255
140648
|
const originalEvent = event.detail.originalEvent;
|
|
@@ -140259,7 +140652,7 @@ var PopoverContentModal = React__namespace.forwardRef(
|
|
|
140259
140652
|
},
|
|
140260
140653
|
{ checkForDefaultPrevented: false }
|
|
140261
140654
|
),
|
|
140262
|
-
onFocusOutside: composeEventHandlers(
|
|
140655
|
+
onFocusOutside: composeEventHandlers$1(
|
|
140263
140656
|
props.onFocusOutside,
|
|
140264
140657
|
(event) => event.preventDefault(),
|
|
140265
140658
|
{ checkForDefaultPrevented: false }
|
|
@@ -140346,7 +140739,7 @@ var PopoverContentImpl = React__namespace.forwardRef(
|
|
|
140346
140739
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
140347
140740
|
Content,
|
|
140348
140741
|
{
|
|
140349
|
-
"data-state": getState(context.open),
|
|
140742
|
+
"data-state": getState$1(context.open),
|
|
140350
140743
|
role: "dialog",
|
|
140351
140744
|
id: context.contentId,
|
|
140352
140745
|
...popperScope,
|
|
@@ -140377,12 +140770,12 @@ var PopoverClose = React__namespace.forwardRef(
|
|
|
140377
140770
|
const { __scopePopover, ...closeProps } = props;
|
|
140378
140771
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
140379
140772
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
140380
|
-
Primitive.button,
|
|
140773
|
+
Primitive$1.button,
|
|
140381
140774
|
{
|
|
140382
140775
|
type: "button",
|
|
140383
140776
|
...closeProps,
|
|
140384
140777
|
ref: forwardedRef,
|
|
140385
|
-
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
|
140778
|
+
onClick: composeEventHandlers$1(props.onClick, () => context.onOpenChange(false))
|
|
140386
140779
|
}
|
|
140387
140780
|
);
|
|
140388
140781
|
}
|
|
@@ -140397,20 +140790,20 @@ var PopoverArrow = React__namespace.forwardRef(
|
|
|
140397
140790
|
}
|
|
140398
140791
|
);
|
|
140399
140792
|
PopoverArrow.displayName = ARROW_NAME;
|
|
140400
|
-
function getState(open) {
|
|
140793
|
+
function getState$1(open) {
|
|
140401
140794
|
return open ? "open" : "closed";
|
|
140402
140795
|
}
|
|
140403
|
-
var Root2 = Popover$1;
|
|
140796
|
+
var Root2$1 = Popover$1;
|
|
140404
140797
|
var Trigger = PopoverTrigger$1;
|
|
140405
140798
|
var Portal = PopoverPortal;
|
|
140406
140799
|
var Content2 = PopoverContent$1;
|
|
140407
140800
|
|
|
140408
|
-
var PopoverRoot = Root2;
|
|
140801
|
+
var PopoverRoot = Root2$1;
|
|
140409
140802
|
var PopoverTrigger = Trigger;
|
|
140410
140803
|
var PopoverContent = React__namespace.forwardRef(function (_a, ref) {
|
|
140411
140804
|
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"]);
|
|
140412
140805
|
return (React__namespace.createElement(Portal, null,
|
|
140413
|
-
React__namespace.createElement(Content2, __assign({ ref: ref, align: align, sideOffset: sideOffset, className: cn("data-[state=open]:s-animate-in data-[state=open]:s-fade-in-0 data-[state=open]:s-zoom-in-95", "data-[state=closed]:s-animate-out data-[state=closed]:s-fade-out-0 data-[state=closed]:s-zoom-out-95", "data-[side=bottom]:s-slide-in-from-top-2", "data-[side=left]:s-slide-in-from-right-2", "data-[side=right]:s-slide-in-from-left-2", "data-[side=top]:s-slide-in-from-bottom-2", "s-
|
|
140806
|
+
React__namespace.createElement(Content2, __assign({ ref: ref, align: align, sideOffset: sideOffset, className: cn("data-[state=open]:s-animate-in data-[state=open]:s-fade-in-0 data-[state=open]:s-zoom-in-95", "data-[state=closed]:s-animate-out data-[state=closed]:s-fade-out-0 data-[state=closed]:s-zoom-out-95", "data-[side=bottom]:s-slide-in-from-top-2", "data-[side=left]:s-slide-in-from-right-2", "data-[side=right]:s-slide-in-from-left-2", "data-[side=top]:s-slide-in-from-bottom-2", "s-z-50 s-rounded-lg s-border s-border-border s-bg-background s-text-primary-950 s-shadow-md s-outline-none", fullWidth ? "s-grow" : "s-w-72 s-p-4", className) }, props))));
|
|
140414
140807
|
});
|
|
140415
140808
|
function Popover(_a) {
|
|
140416
140809
|
var trigger = _a.trigger, _b = _a.popoverTriggerAsChild, popoverTriggerAsChild = _b === void 0 ? false : _b, content = _a.content, props = __rest(_a, ["trigger", "popoverTriggerAsChild", "content"]);
|
|
@@ -140514,30 +140907,914 @@ PriceTable.Container = function (_a) {
|
|
|
140514
140907
|
return (React.createElement("div", { className: "s-flex s-w-full s-items-stretch s-gap-3" }, children));
|
|
140515
140908
|
};
|
|
140516
140909
|
|
|
140517
|
-
|
|
140518
|
-
|
|
140519
|
-
|
|
140910
|
+
// packages/core/primitive/src/primitive.tsx
|
|
140911
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
140912
|
+
return function handleEvent(event) {
|
|
140913
|
+
originalEventHandler?.(event);
|
|
140914
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
140915
|
+
return ourEventHandler?.(event);
|
|
140916
|
+
}
|
|
140917
|
+
};
|
|
140918
|
+
}
|
|
140919
|
+
|
|
140920
|
+
// packages/react/compose-refs/src/composeRefs.tsx
|
|
140921
|
+
function setRef(ref, value) {
|
|
140922
|
+
if (typeof ref === "function") {
|
|
140923
|
+
ref(value);
|
|
140924
|
+
} else if (ref !== null && ref !== void 0) {
|
|
140925
|
+
ref.current = value;
|
|
140926
|
+
}
|
|
140927
|
+
}
|
|
140928
|
+
function composeRefs(...refs) {
|
|
140929
|
+
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
140930
|
+
}
|
|
140931
|
+
function useComposedRefs(...refs) {
|
|
140932
|
+
return React__namespace.useCallback(composeRefs(...refs), refs);
|
|
140933
|
+
}
|
|
140934
|
+
|
|
140935
|
+
// packages/react/context/src/createContext.tsx
|
|
140936
|
+
function createContextScope$2(scopeName, createContextScopeDeps = []) {
|
|
140937
|
+
let defaultContexts = [];
|
|
140938
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
140939
|
+
const BaseContext = React__namespace.createContext(defaultContext);
|
|
140940
|
+
const index = defaultContexts.length;
|
|
140941
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
140942
|
+
const Provider = (props) => {
|
|
140943
|
+
const { scope, children, ...context } = props;
|
|
140944
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
140945
|
+
const value = React__namespace.useMemo(() => context, Object.values(context));
|
|
140946
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
|
|
140947
|
+
};
|
|
140948
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
140949
|
+
function useContext2(consumerName, scope) {
|
|
140950
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
140951
|
+
const context = React__namespace.useContext(Context);
|
|
140952
|
+
if (context) return context;
|
|
140953
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
140954
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
140955
|
+
}
|
|
140956
|
+
return [Provider, useContext2];
|
|
140957
|
+
}
|
|
140958
|
+
const createScope = () => {
|
|
140959
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
140960
|
+
return React__namespace.createContext(defaultContext);
|
|
140961
|
+
});
|
|
140962
|
+
return function useScope(scope) {
|
|
140963
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
140964
|
+
return React__namespace.useMemo(
|
|
140965
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
140966
|
+
[scope, contexts]
|
|
140967
|
+
);
|
|
140968
|
+
};
|
|
140969
|
+
};
|
|
140970
|
+
createScope.scopeName = scopeName;
|
|
140971
|
+
return [createContext3, composeContextScopes$2(createScope, ...createContextScopeDeps)];
|
|
140972
|
+
}
|
|
140973
|
+
function composeContextScopes$2(...scopes) {
|
|
140974
|
+
const baseScope = scopes[0];
|
|
140975
|
+
if (scopes.length === 1) return baseScope;
|
|
140976
|
+
const createScope = () => {
|
|
140977
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
140978
|
+
useScope: createScope2(),
|
|
140979
|
+
scopeName: createScope2.scopeName
|
|
140980
|
+
}));
|
|
140981
|
+
return function useComposedScopes(overrideScopes) {
|
|
140982
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
140983
|
+
const scopeProps = useScope(overrideScopes);
|
|
140984
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
140985
|
+
return { ...nextScopes2, ...currentScope };
|
|
140986
|
+
}, {});
|
|
140987
|
+
return React__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
140988
|
+
};
|
|
140989
|
+
};
|
|
140990
|
+
createScope.scopeName = baseScope.scopeName;
|
|
140991
|
+
return createScope;
|
|
140992
|
+
}
|
|
140993
|
+
|
|
140994
|
+
// packages/react/primitive/src/Primitive.tsx
|
|
140995
|
+
var NODES = [
|
|
140996
|
+
"a",
|
|
140997
|
+
"button",
|
|
140998
|
+
"div",
|
|
140999
|
+
"form",
|
|
141000
|
+
"h2",
|
|
141001
|
+
"h3",
|
|
141002
|
+
"img",
|
|
141003
|
+
"input",
|
|
141004
|
+
"label",
|
|
141005
|
+
"li",
|
|
141006
|
+
"nav",
|
|
141007
|
+
"ol",
|
|
141008
|
+
"p",
|
|
141009
|
+
"span",
|
|
141010
|
+
"svg",
|
|
141011
|
+
"ul"
|
|
141012
|
+
];
|
|
141013
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
141014
|
+
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
141015
|
+
const { asChild, ...primitiveProps } = props;
|
|
141016
|
+
const Comp = asChild ? Slot : node;
|
|
141017
|
+
if (typeof window !== "undefined") {
|
|
141018
|
+
window[Symbol.for("radix-ui")] = true;
|
|
141019
|
+
}
|
|
141020
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
141021
|
+
});
|
|
141022
|
+
Node.displayName = `Primitive.${node}`;
|
|
141023
|
+
return { ...primitive, [node]: Node };
|
|
141024
|
+
}, {});
|
|
141025
|
+
|
|
141026
|
+
// packages/react/context/src/createContext.tsx
|
|
141027
|
+
function createContextScope$1(scopeName, createContextScopeDeps = []) {
|
|
141028
|
+
let defaultContexts = [];
|
|
141029
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
141030
|
+
const BaseContext = React__namespace.createContext(defaultContext);
|
|
141031
|
+
const index = defaultContexts.length;
|
|
141032
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
141033
|
+
function Provider(props) {
|
|
141034
|
+
const { scope, children, ...context } = props;
|
|
141035
|
+
const Context = scope?.[scopeName][index] || BaseContext;
|
|
141036
|
+
const value = React__namespace.useMemo(() => context, Object.values(context));
|
|
141037
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
|
|
141038
|
+
}
|
|
141039
|
+
function useContext2(consumerName, scope) {
|
|
141040
|
+
const Context = scope?.[scopeName][index] || BaseContext;
|
|
141041
|
+
const context = React__namespace.useContext(Context);
|
|
141042
|
+
if (context) return context;
|
|
141043
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
141044
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
141045
|
+
}
|
|
141046
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
141047
|
+
return [Provider, useContext2];
|
|
141048
|
+
}
|
|
141049
|
+
const createScope = () => {
|
|
141050
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
141051
|
+
return React__namespace.createContext(defaultContext);
|
|
141052
|
+
});
|
|
141053
|
+
return function useScope(scope) {
|
|
141054
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
141055
|
+
return React__namespace.useMemo(
|
|
141056
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
141057
|
+
[scope, contexts]
|
|
141058
|
+
);
|
|
141059
|
+
};
|
|
141060
|
+
};
|
|
141061
|
+
createScope.scopeName = scopeName;
|
|
141062
|
+
return [createContext3, composeContextScopes$1(createScope, ...createContextScopeDeps)];
|
|
141063
|
+
}
|
|
141064
|
+
function composeContextScopes$1(...scopes) {
|
|
141065
|
+
const baseScope = scopes[0];
|
|
141066
|
+
if (scopes.length === 1) return baseScope;
|
|
141067
|
+
const createScope = () => {
|
|
141068
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
141069
|
+
useScope: createScope2(),
|
|
141070
|
+
scopeName: createScope2.scopeName
|
|
141071
|
+
}));
|
|
141072
|
+
return function useComposedScopes(overrideScopes) {
|
|
141073
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
141074
|
+
const scopeProps = useScope(overrideScopes);
|
|
141075
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
141076
|
+
return { ...nextScopes2, ...currentScope };
|
|
141077
|
+
}, {});
|
|
141078
|
+
return React__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
141079
|
+
};
|
|
141080
|
+
};
|
|
141081
|
+
createScope.scopeName = baseScope.scopeName;
|
|
141082
|
+
return createScope;
|
|
141083
|
+
}
|
|
141084
|
+
|
|
141085
|
+
function createCollection(name) {
|
|
141086
|
+
const PROVIDER_NAME = name + "CollectionProvider";
|
|
141087
|
+
const [createCollectionContext, createCollectionScope] = createContextScope$1(PROVIDER_NAME);
|
|
141088
|
+
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
141089
|
+
PROVIDER_NAME,
|
|
141090
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
141091
|
+
);
|
|
141092
|
+
const CollectionProvider = (props) => {
|
|
141093
|
+
const { scope, children } = props;
|
|
141094
|
+
const ref = React.useRef(null);
|
|
141095
|
+
const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;
|
|
141096
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
141097
|
+
};
|
|
141098
|
+
CollectionProvider.displayName = PROVIDER_NAME;
|
|
141099
|
+
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
141100
|
+
const CollectionSlot = React.forwardRef(
|
|
141101
|
+
(props, forwardedRef) => {
|
|
141102
|
+
const { scope, children } = props;
|
|
141103
|
+
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
141104
|
+
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
141105
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Slot, { ref: composedRefs, children });
|
|
141106
|
+
}
|
|
141107
|
+
);
|
|
141108
|
+
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
141109
|
+
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
141110
|
+
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
141111
|
+
const CollectionItemSlot = React.forwardRef(
|
|
141112
|
+
(props, forwardedRef) => {
|
|
141113
|
+
const { scope, children, ...itemData } = props;
|
|
141114
|
+
const ref = React.useRef(null);
|
|
141115
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
141116
|
+
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
141117
|
+
React.useEffect(() => {
|
|
141118
|
+
context.itemMap.set(ref, { ref, ...itemData });
|
|
141119
|
+
return () => void context.itemMap.delete(ref);
|
|
141120
|
+
});
|
|
141121
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
141122
|
+
}
|
|
141123
|
+
);
|
|
141124
|
+
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
141125
|
+
function useCollection(scope) {
|
|
141126
|
+
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
141127
|
+
const getItems = React.useCallback(() => {
|
|
141128
|
+
const collectionNode = context.collectionRef.current;
|
|
141129
|
+
if (!collectionNode) return [];
|
|
141130
|
+
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
141131
|
+
const items = Array.from(context.itemMap.values());
|
|
141132
|
+
const orderedItems = items.sort(
|
|
141133
|
+
(a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
|
|
141134
|
+
);
|
|
141135
|
+
return orderedItems;
|
|
141136
|
+
}, [context.collectionRef, context.itemMap]);
|
|
141137
|
+
return getItems;
|
|
141138
|
+
}
|
|
141139
|
+
return [
|
|
141140
|
+
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
|
|
141141
|
+
useCollection,
|
|
141142
|
+
createCollectionScope
|
|
141143
|
+
];
|
|
141144
|
+
}
|
|
141145
|
+
|
|
141146
|
+
// packages/react/context/src/createContext.tsx
|
|
141147
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
141148
|
+
let defaultContexts = [];
|
|
141149
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
141150
|
+
const BaseContext = React__namespace.createContext(defaultContext);
|
|
141151
|
+
const index = defaultContexts.length;
|
|
141152
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
141153
|
+
function Provider(props) {
|
|
141154
|
+
const { scope, children, ...context } = props;
|
|
141155
|
+
const Context = scope?.[scopeName][index] || BaseContext;
|
|
141156
|
+
const value = React__namespace.useMemo(() => context, Object.values(context));
|
|
141157
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
|
|
141158
|
+
}
|
|
141159
|
+
function useContext2(consumerName, scope) {
|
|
141160
|
+
const Context = scope?.[scopeName][index] || BaseContext;
|
|
141161
|
+
const context = React__namespace.useContext(Context);
|
|
141162
|
+
if (context) return context;
|
|
141163
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
141164
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
141165
|
+
}
|
|
141166
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
141167
|
+
return [Provider, useContext2];
|
|
141168
|
+
}
|
|
141169
|
+
const createScope = () => {
|
|
141170
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
141171
|
+
return React__namespace.createContext(defaultContext);
|
|
141172
|
+
});
|
|
141173
|
+
return function useScope(scope) {
|
|
141174
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
141175
|
+
return React__namespace.useMemo(
|
|
141176
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
141177
|
+
[scope, contexts]
|
|
141178
|
+
);
|
|
141179
|
+
};
|
|
141180
|
+
};
|
|
141181
|
+
createScope.scopeName = scopeName;
|
|
141182
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
141183
|
+
}
|
|
141184
|
+
function composeContextScopes(...scopes) {
|
|
141185
|
+
const baseScope = scopes[0];
|
|
141186
|
+
if (scopes.length === 1) return baseScope;
|
|
141187
|
+
const createScope = () => {
|
|
141188
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
141189
|
+
useScope: createScope2(),
|
|
141190
|
+
scopeName: createScope2.scopeName
|
|
141191
|
+
}));
|
|
141192
|
+
return function useComposedScopes(overrideScopes) {
|
|
141193
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
141194
|
+
const scopeProps = useScope(overrideScopes);
|
|
141195
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
141196
|
+
return { ...nextScopes2, ...currentScope };
|
|
141197
|
+
}, {});
|
|
141198
|
+
return React__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
141199
|
+
};
|
|
141200
|
+
};
|
|
141201
|
+
createScope.scopeName = baseScope.scopeName;
|
|
141202
|
+
return createScope;
|
|
141203
|
+
}
|
|
141204
|
+
|
|
141205
|
+
// packages/react/use-layout-effect/src/useLayoutEffect.tsx
|
|
141206
|
+
var useLayoutEffect2 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
|
|
140520
141207
|
};
|
|
140521
|
-
|
|
140522
|
-
|
|
140523
|
-
|
|
140524
|
-
|
|
140525
|
-
|
|
141208
|
+
|
|
141209
|
+
// packages/react/id/src/id.tsx
|
|
141210
|
+
var useReactId = React__namespace["useId".toString()] || (() => void 0);
|
|
141211
|
+
var count = 0;
|
|
141212
|
+
function useId(deterministicId) {
|
|
141213
|
+
const [id, setId] = React__namespace.useState(useReactId());
|
|
141214
|
+
useLayoutEffect2(() => {
|
|
141215
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
|
141216
|
+
}, [deterministicId]);
|
|
141217
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
|
141218
|
+
}
|
|
141219
|
+
|
|
141220
|
+
// packages/react/use-callback-ref/src/useCallbackRef.tsx
|
|
141221
|
+
function useCallbackRef(callback) {
|
|
141222
|
+
const callbackRef = React__namespace.useRef(callback);
|
|
141223
|
+
React__namespace.useEffect(() => {
|
|
141224
|
+
callbackRef.current = callback;
|
|
141225
|
+
});
|
|
141226
|
+
return React__namespace.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
141227
|
+
}
|
|
141228
|
+
|
|
141229
|
+
// packages/react/use-controllable-state/src/useControllableState.tsx
|
|
141230
|
+
function useControllableState({
|
|
141231
|
+
prop,
|
|
141232
|
+
defaultProp,
|
|
141233
|
+
onChange = () => {
|
|
141234
|
+
}
|
|
141235
|
+
}) {
|
|
141236
|
+
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
|
|
141237
|
+
const isControlled = prop !== void 0;
|
|
141238
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
141239
|
+
const handleChange = useCallbackRef(onChange);
|
|
141240
|
+
const setValue = React__namespace.useCallback(
|
|
141241
|
+
(nextValue) => {
|
|
141242
|
+
if (isControlled) {
|
|
141243
|
+
const setter = nextValue;
|
|
141244
|
+
const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
|
|
141245
|
+
if (value2 !== prop) handleChange(value2);
|
|
141246
|
+
} else {
|
|
141247
|
+
setUncontrolledProp(nextValue);
|
|
141248
|
+
}
|
|
141249
|
+
},
|
|
141250
|
+
[isControlled, prop, setUncontrolledProp, handleChange]
|
|
141251
|
+
);
|
|
141252
|
+
return [value, setValue];
|
|
141253
|
+
}
|
|
141254
|
+
function useUncontrolledState({
|
|
141255
|
+
defaultProp,
|
|
141256
|
+
onChange
|
|
141257
|
+
}) {
|
|
141258
|
+
const uncontrolledState = React__namespace.useState(defaultProp);
|
|
141259
|
+
const [value] = uncontrolledState;
|
|
141260
|
+
const prevValueRef = React__namespace.useRef(value);
|
|
141261
|
+
const handleChange = useCallbackRef(onChange);
|
|
141262
|
+
React__namespace.useEffect(() => {
|
|
141263
|
+
if (prevValueRef.current !== value) {
|
|
141264
|
+
handleChange(value);
|
|
141265
|
+
prevValueRef.current = value;
|
|
141266
|
+
}
|
|
141267
|
+
}, [value, prevValueRef, handleChange]);
|
|
141268
|
+
return uncontrolledState;
|
|
141269
|
+
}
|
|
141270
|
+
|
|
141271
|
+
// packages/react/direction/src/Direction.tsx
|
|
141272
|
+
var DirectionContext = React__namespace.createContext(void 0);
|
|
141273
|
+
function useDirection(localDir) {
|
|
141274
|
+
const globalDir = React__namespace.useContext(DirectionContext);
|
|
141275
|
+
return localDir || globalDir || "ltr";
|
|
141276
|
+
}
|
|
141277
|
+
|
|
141278
|
+
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
141279
|
+
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
141280
|
+
var GROUP_NAME = "RovingFocusGroup";
|
|
141281
|
+
var [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);
|
|
141282
|
+
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
|
|
141283
|
+
GROUP_NAME,
|
|
141284
|
+
[createCollectionScope]
|
|
141285
|
+
);
|
|
141286
|
+
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
|
|
141287
|
+
var RovingFocusGroup = React__namespace.forwardRef(
|
|
141288
|
+
(props, forwardedRef) => {
|
|
141289
|
+
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 }) }) });
|
|
141290
|
+
}
|
|
141291
|
+
);
|
|
141292
|
+
RovingFocusGroup.displayName = GROUP_NAME;
|
|
141293
|
+
var RovingFocusGroupImpl = React__namespace.forwardRef((props, forwardedRef) => {
|
|
141294
|
+
const {
|
|
141295
|
+
__scopeRovingFocusGroup,
|
|
141296
|
+
orientation,
|
|
141297
|
+
loop = false,
|
|
141298
|
+
dir,
|
|
141299
|
+
currentTabStopId: currentTabStopIdProp,
|
|
141300
|
+
defaultCurrentTabStopId,
|
|
141301
|
+
onCurrentTabStopIdChange,
|
|
141302
|
+
onEntryFocus,
|
|
141303
|
+
preventScrollOnEntryFocus = false,
|
|
141304
|
+
...groupProps
|
|
141305
|
+
} = props;
|
|
141306
|
+
const ref = React__namespace.useRef(null);
|
|
141307
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
141308
|
+
const direction = useDirection(dir);
|
|
141309
|
+
const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({
|
|
141310
|
+
prop: currentTabStopIdProp,
|
|
141311
|
+
defaultProp: defaultCurrentTabStopId,
|
|
141312
|
+
onChange: onCurrentTabStopIdChange
|
|
141313
|
+
});
|
|
141314
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = React__namespace.useState(false);
|
|
141315
|
+
const handleEntryFocus = useCallbackRef(onEntryFocus);
|
|
141316
|
+
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
141317
|
+
const isClickFocusRef = React__namespace.useRef(false);
|
|
141318
|
+
const [focusableItemsCount, setFocusableItemsCount] = React__namespace.useState(0);
|
|
141319
|
+
React__namespace.useEffect(() => {
|
|
141320
|
+
const node = ref.current;
|
|
141321
|
+
if (node) {
|
|
141322
|
+
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
141323
|
+
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
141324
|
+
}
|
|
141325
|
+
}, [handleEntryFocus]);
|
|
141326
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
141327
|
+
RovingFocusProvider,
|
|
141328
|
+
{
|
|
141329
|
+
scope: __scopeRovingFocusGroup,
|
|
141330
|
+
orientation,
|
|
141331
|
+
dir: direction,
|
|
141332
|
+
loop,
|
|
141333
|
+
currentTabStopId,
|
|
141334
|
+
onItemFocus: React__namespace.useCallback(
|
|
141335
|
+
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
141336
|
+
[setCurrentTabStopId]
|
|
141337
|
+
),
|
|
141338
|
+
onItemShiftTab: React__namespace.useCallback(() => setIsTabbingBackOut(true), []),
|
|
141339
|
+
onFocusableItemAdd: React__namespace.useCallback(
|
|
141340
|
+
() => setFocusableItemsCount((prevCount) => prevCount + 1),
|
|
141341
|
+
[]
|
|
141342
|
+
),
|
|
141343
|
+
onFocusableItemRemove: React__namespace.useCallback(
|
|
141344
|
+
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
141345
|
+
[]
|
|
141346
|
+
),
|
|
141347
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141348
|
+
Primitive.div,
|
|
141349
|
+
{
|
|
141350
|
+
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
141351
|
+
"data-orientation": orientation,
|
|
141352
|
+
...groupProps,
|
|
141353
|
+
ref: composedRefs,
|
|
141354
|
+
style: { outline: "none", ...props.style },
|
|
141355
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
|
|
141356
|
+
isClickFocusRef.current = true;
|
|
141357
|
+
}),
|
|
141358
|
+
onFocus: composeEventHandlers(props.onFocus, (event) => {
|
|
141359
|
+
const isKeyboardFocus = !isClickFocusRef.current;
|
|
141360
|
+
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
141361
|
+
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
|
|
141362
|
+
event.currentTarget.dispatchEvent(entryFocusEvent);
|
|
141363
|
+
if (!entryFocusEvent.defaultPrevented) {
|
|
141364
|
+
const items = getItems().filter((item) => item.focusable);
|
|
141365
|
+
const activeItem = items.find((item) => item.active);
|
|
141366
|
+
const currentItem = items.find((item) => item.id === currentTabStopId);
|
|
141367
|
+
const candidateItems = [activeItem, currentItem, ...items].filter(
|
|
141368
|
+
Boolean
|
|
141369
|
+
);
|
|
141370
|
+
const candidateNodes = candidateItems.map((item) => item.ref.current);
|
|
141371
|
+
focusFirst(candidateNodes, preventScrollOnEntryFocus);
|
|
141372
|
+
}
|
|
141373
|
+
}
|
|
141374
|
+
isClickFocusRef.current = false;
|
|
141375
|
+
}),
|
|
141376
|
+
onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
|
|
141377
|
+
}
|
|
141378
|
+
)
|
|
141379
|
+
}
|
|
141380
|
+
);
|
|
141381
|
+
});
|
|
141382
|
+
var ITEM_NAME$1 = "RovingFocusGroupItem";
|
|
141383
|
+
var RovingFocusGroupItem = React__namespace.forwardRef(
|
|
141384
|
+
(props, forwardedRef) => {
|
|
141385
|
+
const {
|
|
141386
|
+
__scopeRovingFocusGroup,
|
|
141387
|
+
focusable = true,
|
|
141388
|
+
active = false,
|
|
141389
|
+
tabStopId,
|
|
141390
|
+
...itemProps
|
|
141391
|
+
} = props;
|
|
141392
|
+
const autoId = useId();
|
|
141393
|
+
const id = tabStopId || autoId;
|
|
141394
|
+
const context = useRovingFocusContext(ITEM_NAME$1, __scopeRovingFocusGroup);
|
|
141395
|
+
const isCurrentTabStop = context.currentTabStopId === id;
|
|
141396
|
+
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
141397
|
+
const { onFocusableItemAdd, onFocusableItemRemove } = context;
|
|
141398
|
+
React__namespace.useEffect(() => {
|
|
141399
|
+
if (focusable) {
|
|
141400
|
+
onFocusableItemAdd();
|
|
141401
|
+
return () => onFocusableItemRemove();
|
|
141402
|
+
}
|
|
141403
|
+
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
141404
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
141405
|
+
Collection.ItemSlot,
|
|
141406
|
+
{
|
|
141407
|
+
scope: __scopeRovingFocusGroup,
|
|
141408
|
+
id,
|
|
141409
|
+
focusable,
|
|
141410
|
+
active,
|
|
141411
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141412
|
+
Primitive.span,
|
|
141413
|
+
{
|
|
141414
|
+
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
141415
|
+
"data-orientation": context.orientation,
|
|
141416
|
+
...itemProps,
|
|
141417
|
+
ref: forwardedRef,
|
|
141418
|
+
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
|
|
141419
|
+
if (!focusable) event.preventDefault();
|
|
141420
|
+
else context.onItemFocus(id);
|
|
141421
|
+
}),
|
|
141422
|
+
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
|
|
141423
|
+
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
|
141424
|
+
if (event.key === "Tab" && event.shiftKey) {
|
|
141425
|
+
context.onItemShiftTab();
|
|
141426
|
+
return;
|
|
141427
|
+
}
|
|
141428
|
+
if (event.target !== event.currentTarget) return;
|
|
141429
|
+
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
141430
|
+
if (focusIntent !== void 0) {
|
|
141431
|
+
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
|
|
141432
|
+
event.preventDefault();
|
|
141433
|
+
const items = getItems().filter((item) => item.focusable);
|
|
141434
|
+
let candidateNodes = items.map((item) => item.ref.current);
|
|
141435
|
+
if (focusIntent === "last") candidateNodes.reverse();
|
|
141436
|
+
else if (focusIntent === "prev" || focusIntent === "next") {
|
|
141437
|
+
if (focusIntent === "prev") candidateNodes.reverse();
|
|
141438
|
+
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
141439
|
+
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
141440
|
+
}
|
|
141441
|
+
setTimeout(() => focusFirst(candidateNodes));
|
|
141442
|
+
}
|
|
141443
|
+
})
|
|
141444
|
+
}
|
|
141445
|
+
)
|
|
141446
|
+
}
|
|
141447
|
+
);
|
|
141448
|
+
}
|
|
141449
|
+
);
|
|
141450
|
+
RovingFocusGroupItem.displayName = ITEM_NAME$1;
|
|
141451
|
+
var MAP_KEY_TO_FOCUS_INTENT = {
|
|
141452
|
+
ArrowLeft: "prev",
|
|
141453
|
+
ArrowUp: "prev",
|
|
141454
|
+
ArrowRight: "next",
|
|
141455
|
+
ArrowDown: "next",
|
|
141456
|
+
PageUp: "first",
|
|
141457
|
+
Home: "first",
|
|
141458
|
+
PageDown: "last",
|
|
141459
|
+
End: "last"
|
|
140526
141460
|
};
|
|
140527
|
-
function
|
|
140528
|
-
|
|
140529
|
-
|
|
140530
|
-
|
|
140531
|
-
|
|
140532
|
-
|
|
140533
|
-
|
|
140534
|
-
|
|
140535
|
-
|
|
140536
|
-
|
|
140537
|
-
|
|
140538
|
-
|
|
141461
|
+
function getDirectionAwareKey(key, dir) {
|
|
141462
|
+
if (dir !== "rtl") return key;
|
|
141463
|
+
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
|
|
141464
|
+
}
|
|
141465
|
+
function getFocusIntent(event, orientation, dir) {
|
|
141466
|
+
const key = getDirectionAwareKey(event.key, dir);
|
|
141467
|
+
if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
|
|
141468
|
+
if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
|
|
141469
|
+
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
141470
|
+
}
|
|
141471
|
+
function focusFirst(candidates, preventScroll = false) {
|
|
141472
|
+
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
141473
|
+
for (const candidate of candidates) {
|
|
141474
|
+
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
141475
|
+
candidate.focus({ preventScroll });
|
|
141476
|
+
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
141477
|
+
}
|
|
141478
|
+
}
|
|
141479
|
+
function wrapArray(array, startIndex) {
|
|
141480
|
+
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
141481
|
+
}
|
|
141482
|
+
var Root = RovingFocusGroup;
|
|
141483
|
+
var Item = RovingFocusGroupItem;
|
|
141484
|
+
|
|
141485
|
+
// packages/react/use-size/src/useSize.tsx
|
|
141486
|
+
function useSize(element) {
|
|
141487
|
+
const [size, setSize] = React__namespace.useState(void 0);
|
|
141488
|
+
useLayoutEffect2(() => {
|
|
141489
|
+
if (element) {
|
|
141490
|
+
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
141491
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
141492
|
+
if (!Array.isArray(entries)) {
|
|
141493
|
+
return;
|
|
141494
|
+
}
|
|
141495
|
+
if (!entries.length) {
|
|
141496
|
+
return;
|
|
141497
|
+
}
|
|
141498
|
+
const entry = entries[0];
|
|
141499
|
+
let width;
|
|
141500
|
+
let height;
|
|
141501
|
+
if ("borderBoxSize" in entry) {
|
|
141502
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
|
141503
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
141504
|
+
width = borderSize["inlineSize"];
|
|
141505
|
+
height = borderSize["blockSize"];
|
|
141506
|
+
} else {
|
|
141507
|
+
width = element.offsetWidth;
|
|
141508
|
+
height = element.offsetHeight;
|
|
141509
|
+
}
|
|
141510
|
+
setSize({ width, height });
|
|
141511
|
+
});
|
|
141512
|
+
resizeObserver.observe(element, { box: "border-box" });
|
|
141513
|
+
return () => resizeObserver.unobserve(element);
|
|
141514
|
+
} else {
|
|
141515
|
+
setSize(void 0);
|
|
141516
|
+
}
|
|
141517
|
+
}, [element]);
|
|
141518
|
+
return size;
|
|
141519
|
+
}
|
|
141520
|
+
|
|
141521
|
+
// packages/react/use-previous/src/usePrevious.tsx
|
|
141522
|
+
function usePrevious(value) {
|
|
141523
|
+
const ref = React__namespace.useRef({ value, previous: value });
|
|
141524
|
+
return React__namespace.useMemo(() => {
|
|
141525
|
+
if (ref.current.value !== value) {
|
|
141526
|
+
ref.current.previous = ref.current.value;
|
|
141527
|
+
ref.current.value = value;
|
|
141528
|
+
}
|
|
141529
|
+
return ref.current.previous;
|
|
141530
|
+
}, [value]);
|
|
140539
141531
|
}
|
|
140540
141532
|
|
|
141533
|
+
var RADIO_NAME = "Radio";
|
|
141534
|
+
var [createRadioContext, createRadioScope] = createContextScope$2(RADIO_NAME);
|
|
141535
|
+
var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);
|
|
141536
|
+
var Radio = React__namespace.forwardRef(
|
|
141537
|
+
(props, forwardedRef) => {
|
|
141538
|
+
const {
|
|
141539
|
+
__scopeRadio,
|
|
141540
|
+
name,
|
|
141541
|
+
checked = false,
|
|
141542
|
+
required,
|
|
141543
|
+
disabled,
|
|
141544
|
+
value = "on",
|
|
141545
|
+
onCheck,
|
|
141546
|
+
form,
|
|
141547
|
+
...radioProps
|
|
141548
|
+
} = props;
|
|
141549
|
+
const [button, setButton] = React__namespace.useState(null);
|
|
141550
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
|
|
141551
|
+
const hasConsumerStoppedPropagationRef = React__namespace.useRef(false);
|
|
141552
|
+
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
141553
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [
|
|
141554
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
141555
|
+
Primitive.button,
|
|
141556
|
+
{
|
|
141557
|
+
type: "button",
|
|
141558
|
+
role: "radio",
|
|
141559
|
+
"aria-checked": checked,
|
|
141560
|
+
"data-state": getState(checked),
|
|
141561
|
+
"data-disabled": disabled ? "" : void 0,
|
|
141562
|
+
disabled,
|
|
141563
|
+
value,
|
|
141564
|
+
...radioProps,
|
|
141565
|
+
ref: composedRefs,
|
|
141566
|
+
onClick: composeEventHandlers(props.onClick, (event) => {
|
|
141567
|
+
if (!checked) onCheck?.();
|
|
141568
|
+
if (isFormControl) {
|
|
141569
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
141570
|
+
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
141571
|
+
}
|
|
141572
|
+
})
|
|
141573
|
+
}
|
|
141574
|
+
),
|
|
141575
|
+
isFormControl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
141576
|
+
BubbleInput,
|
|
141577
|
+
{
|
|
141578
|
+
control: button,
|
|
141579
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
141580
|
+
name,
|
|
141581
|
+
value,
|
|
141582
|
+
checked,
|
|
141583
|
+
required,
|
|
141584
|
+
disabled,
|
|
141585
|
+
form,
|
|
141586
|
+
style: { transform: "translateX(-100%)" }
|
|
141587
|
+
}
|
|
141588
|
+
)
|
|
141589
|
+
] });
|
|
141590
|
+
}
|
|
141591
|
+
);
|
|
141592
|
+
Radio.displayName = RADIO_NAME;
|
|
141593
|
+
var INDICATOR_NAME = "RadioIndicator";
|
|
141594
|
+
var RadioIndicator = React__namespace.forwardRef(
|
|
141595
|
+
(props, forwardedRef) => {
|
|
141596
|
+
const { __scopeRadio, forceMount, ...indicatorProps } = props;
|
|
141597
|
+
const context = useRadioContext(INDICATOR_NAME, __scopeRadio);
|
|
141598
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141599
|
+
Primitive.span,
|
|
141600
|
+
{
|
|
141601
|
+
"data-state": getState(context.checked),
|
|
141602
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
141603
|
+
...indicatorProps,
|
|
141604
|
+
ref: forwardedRef
|
|
141605
|
+
}
|
|
141606
|
+
) });
|
|
141607
|
+
}
|
|
141608
|
+
);
|
|
141609
|
+
RadioIndicator.displayName = INDICATOR_NAME;
|
|
141610
|
+
var BubbleInput = (props) => {
|
|
141611
|
+
const { control, checked, bubbles = true, ...inputProps } = props;
|
|
141612
|
+
const ref = React__namespace.useRef(null);
|
|
141613
|
+
const prevChecked = usePrevious(checked);
|
|
141614
|
+
const controlSize = useSize(control);
|
|
141615
|
+
React__namespace.useEffect(() => {
|
|
141616
|
+
const input = ref.current;
|
|
141617
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
141618
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked");
|
|
141619
|
+
const setChecked = descriptor.set;
|
|
141620
|
+
if (prevChecked !== checked && setChecked) {
|
|
141621
|
+
const event = new Event("click", { bubbles });
|
|
141622
|
+
setChecked.call(input, checked);
|
|
141623
|
+
input.dispatchEvent(event);
|
|
141624
|
+
}
|
|
141625
|
+
}, [prevChecked, checked, bubbles]);
|
|
141626
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
141627
|
+
"input",
|
|
141628
|
+
{
|
|
141629
|
+
type: "radio",
|
|
141630
|
+
"aria-hidden": true,
|
|
141631
|
+
defaultChecked: checked,
|
|
141632
|
+
...inputProps,
|
|
141633
|
+
tabIndex: -1,
|
|
141634
|
+
ref,
|
|
141635
|
+
style: {
|
|
141636
|
+
...props.style,
|
|
141637
|
+
...controlSize,
|
|
141638
|
+
position: "absolute",
|
|
141639
|
+
pointerEvents: "none",
|
|
141640
|
+
opacity: 0,
|
|
141641
|
+
margin: 0
|
|
141642
|
+
}
|
|
141643
|
+
}
|
|
141644
|
+
);
|
|
141645
|
+
};
|
|
141646
|
+
function getState(checked) {
|
|
141647
|
+
return checked ? "checked" : "unchecked";
|
|
141648
|
+
}
|
|
141649
|
+
var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
|
|
141650
|
+
var RADIO_GROUP_NAME = "RadioGroup";
|
|
141651
|
+
var [createRadioGroupContext, createRadioGroupScope] = createContextScope$2(RADIO_GROUP_NAME, [
|
|
141652
|
+
createRovingFocusGroupScope,
|
|
141653
|
+
createRadioScope
|
|
141654
|
+
]);
|
|
141655
|
+
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
141656
|
+
var useRadioScope = createRadioScope();
|
|
141657
|
+
var [RadioGroupProvider, useRadioGroupContext] = createRadioGroupContext(RADIO_GROUP_NAME);
|
|
141658
|
+
var RadioGroup$1 = React__namespace.forwardRef(
|
|
141659
|
+
(props, forwardedRef) => {
|
|
141660
|
+
const {
|
|
141661
|
+
__scopeRadioGroup,
|
|
141662
|
+
name,
|
|
141663
|
+
defaultValue,
|
|
141664
|
+
value: valueProp,
|
|
141665
|
+
required = false,
|
|
141666
|
+
disabled = false,
|
|
141667
|
+
orientation,
|
|
141668
|
+
dir,
|
|
141669
|
+
loop = true,
|
|
141670
|
+
onValueChange,
|
|
141671
|
+
...groupProps
|
|
141672
|
+
} = props;
|
|
141673
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
|
|
141674
|
+
const direction = useDirection(dir);
|
|
141675
|
+
const [value, setValue] = useControllableState({
|
|
141676
|
+
prop: valueProp,
|
|
141677
|
+
defaultProp: defaultValue,
|
|
141678
|
+
onChange: onValueChange
|
|
141679
|
+
});
|
|
141680
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
141681
|
+
RadioGroupProvider,
|
|
141682
|
+
{
|
|
141683
|
+
scope: __scopeRadioGroup,
|
|
141684
|
+
name,
|
|
141685
|
+
required,
|
|
141686
|
+
disabled,
|
|
141687
|
+
value,
|
|
141688
|
+
onValueChange: setValue,
|
|
141689
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141690
|
+
Root,
|
|
141691
|
+
{
|
|
141692
|
+
asChild: true,
|
|
141693
|
+
...rovingFocusGroupScope,
|
|
141694
|
+
orientation,
|
|
141695
|
+
dir: direction,
|
|
141696
|
+
loop,
|
|
141697
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141698
|
+
Primitive.div,
|
|
141699
|
+
{
|
|
141700
|
+
role: "radiogroup",
|
|
141701
|
+
"aria-required": required,
|
|
141702
|
+
"aria-orientation": orientation,
|
|
141703
|
+
"data-disabled": disabled ? "" : void 0,
|
|
141704
|
+
dir: direction,
|
|
141705
|
+
...groupProps,
|
|
141706
|
+
ref: forwardedRef
|
|
141707
|
+
}
|
|
141708
|
+
)
|
|
141709
|
+
}
|
|
141710
|
+
)
|
|
141711
|
+
}
|
|
141712
|
+
);
|
|
141713
|
+
}
|
|
141714
|
+
);
|
|
141715
|
+
RadioGroup$1.displayName = RADIO_GROUP_NAME;
|
|
141716
|
+
var ITEM_NAME = "RadioGroupItem";
|
|
141717
|
+
var RadioGroupItem$1 = React__namespace.forwardRef(
|
|
141718
|
+
(props, forwardedRef) => {
|
|
141719
|
+
const { __scopeRadioGroup, disabled, ...itemProps } = props;
|
|
141720
|
+
const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup);
|
|
141721
|
+
const isDisabled = context.disabled || disabled;
|
|
141722
|
+
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
|
|
141723
|
+
const radioScope = useRadioScope(__scopeRadioGroup);
|
|
141724
|
+
const ref = React__namespace.useRef(null);
|
|
141725
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
141726
|
+
const checked = context.value === itemProps.value;
|
|
141727
|
+
const isArrowKeyPressedRef = React__namespace.useRef(false);
|
|
141728
|
+
React__namespace.useEffect(() => {
|
|
141729
|
+
const handleKeyDown = (event) => {
|
|
141730
|
+
if (ARROW_KEYS.includes(event.key)) {
|
|
141731
|
+
isArrowKeyPressedRef.current = true;
|
|
141732
|
+
}
|
|
141733
|
+
};
|
|
141734
|
+
const handleKeyUp = () => isArrowKeyPressedRef.current = false;
|
|
141735
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
141736
|
+
document.addEventListener("keyup", handleKeyUp);
|
|
141737
|
+
return () => {
|
|
141738
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
141739
|
+
document.removeEventListener("keyup", handleKeyUp);
|
|
141740
|
+
};
|
|
141741
|
+
}, []);
|
|
141742
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
141743
|
+
Item,
|
|
141744
|
+
{
|
|
141745
|
+
asChild: true,
|
|
141746
|
+
...rovingFocusGroupScope,
|
|
141747
|
+
focusable: !isDisabled,
|
|
141748
|
+
active: checked,
|
|
141749
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
141750
|
+
Radio,
|
|
141751
|
+
{
|
|
141752
|
+
disabled: isDisabled,
|
|
141753
|
+
required: context.required,
|
|
141754
|
+
checked,
|
|
141755
|
+
...radioScope,
|
|
141756
|
+
...itemProps,
|
|
141757
|
+
name: context.name,
|
|
141758
|
+
ref: composedRefs,
|
|
141759
|
+
onCheck: () => context.onValueChange(itemProps.value),
|
|
141760
|
+
onKeyDown: composeEventHandlers((event) => {
|
|
141761
|
+
if (event.key === "Enter") event.preventDefault();
|
|
141762
|
+
}),
|
|
141763
|
+
onFocus: composeEventHandlers(itemProps.onFocus, () => {
|
|
141764
|
+
if (isArrowKeyPressedRef.current) ref.current?.click();
|
|
141765
|
+
})
|
|
141766
|
+
}
|
|
141767
|
+
)
|
|
141768
|
+
}
|
|
141769
|
+
);
|
|
141770
|
+
}
|
|
141771
|
+
);
|
|
141772
|
+
RadioGroupItem$1.displayName = ITEM_NAME;
|
|
141773
|
+
var INDICATOR_NAME2 = "RadioGroupIndicator";
|
|
141774
|
+
var RadioGroupIndicator = React__namespace.forwardRef(
|
|
141775
|
+
(props, forwardedRef) => {
|
|
141776
|
+
const { __scopeRadioGroup, ...indicatorProps } = props;
|
|
141777
|
+
const radioScope = useRadioScope(__scopeRadioGroup);
|
|
141778
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadioIndicator, { ...radioScope, ...indicatorProps, ref: forwardedRef });
|
|
141779
|
+
}
|
|
141780
|
+
);
|
|
141781
|
+
RadioGroupIndicator.displayName = INDICATOR_NAME2;
|
|
141782
|
+
var Root2 = RadioGroup$1;
|
|
141783
|
+
var Item2 = RadioGroupItem$1;
|
|
141784
|
+
var Indicator = RadioGroupIndicator;
|
|
141785
|
+
|
|
141786
|
+
var radioStyles = cva(cn("s-aspect-square s-h-4 s-w-4 s-rounded-full s-border 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"), {
|
|
141787
|
+
variants: {
|
|
141788
|
+
size: {
|
|
141789
|
+
xs: "s-h-4 s-w-4",
|
|
141790
|
+
sm: "s-h-5 s-w-5",
|
|
141791
|
+
},
|
|
141792
|
+
},
|
|
141793
|
+
defaultVariants: {
|
|
141794
|
+
size: "xs",
|
|
141795
|
+
},
|
|
141796
|
+
});
|
|
141797
|
+
var RadioGroup = React__namespace.forwardRef(function (_a, ref) {
|
|
141798
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
141799
|
+
return (React__namespace.createElement(Root2, __assign({ className: cn("s-grid", className) }, props, { ref: ref })));
|
|
141800
|
+
});
|
|
141801
|
+
RadioGroup.displayName = Root2.displayName;
|
|
141802
|
+
var RadioGroupItem = React__namespace.forwardRef(function (_a, ref) {
|
|
141803
|
+
var tooltipMessage = _a.tooltipMessage, className = _a.className, size = _a.size, _b = _a.tooltipAsChild, tooltipAsChild = _b === void 0 ? false : _b, props = __rest(_a, ["tooltipMessage", "className", "size", "tooltipAsChild"]);
|
|
141804
|
+
return (React__namespace.createElement("div", { className: "s-group" }, tooltipMessage ? (React__namespace.createElement(Tooltip, { triggerAsChild: tooltipAsChild, trigger: React__namespace.createElement(Item2, __assign({ ref: ref, className: cn(radioStyles({ size: size }), className) }, props),
|
|
141805
|
+
React__namespace.createElement(Indicator, { className: "s-flex s-items-center s-justify-center" },
|
|
141806
|
+
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") }))), label: React__namespace.createElement("span", null, tooltipMessage) })) : (React__namespace.createElement(Item2, __assign({ ref: ref, className: cn(radioStyles({ size: size }), className) }, props),
|
|
141807
|
+
React__namespace.createElement(Indicator, { className: "s-flex s-items-center s-justify-center" },
|
|
141808
|
+
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") }))))));
|
|
141809
|
+
});
|
|
141810
|
+
RadioGroupItem.displayName = Item2.displayName;
|
|
141811
|
+
var RadioGroupChoice = React__namespace.forwardRef(function (_a, ref) {
|
|
141812
|
+
var className = _a.className, size = _a.size, _b = _a.iconPosition, iconPosition = _b === void 0 ? "center" : _b, children = _a.children, props = __rest(_a, ["className", "size", "iconPosition", "children"]);
|
|
141813
|
+
return (React__namespace.createElement("div", { className: cn("s-flex", className, "s-items-".concat(iconPosition)) },
|
|
141814
|
+
React__namespace.createElement(RadioGroupItem, __assign({ ref: ref, className: cn(radioStyles({ size: size })) }, props)),
|
|
141815
|
+
children));
|
|
141816
|
+
});
|
|
141817
|
+
|
|
140541
141818
|
var sizeClasses$1 = {
|
|
140542
141819
|
xs: "s-text-xs s-h-[26px] s-pl-3 s-pr-6 s-pt-1.5 s-rounded-lg",
|
|
140543
141820
|
sm: "s-text-sm s-h-[34px] s-pl-4 s-pr-8 s-pt-1.5 s-rounded-xl",
|
|
@@ -140726,7 +142003,7 @@ function Tab(_a) {
|
|
|
140726
142003
|
var TextArea = React.forwardRef(function (_a, ref) {
|
|
140727
142004
|
var error = _a.error, _b = _a.showErrorLabel, showErrorLabel = _b === void 0 ? false : _b, className = _a.className, _c = _a.minRows, minRows = _c === void 0 ? 10 : _c, props = __rest(_a, ["error", "showErrorLabel", "className", "minRows"]);
|
|
140728
142005
|
return (React.createElement("div", { className: "s-flex s-flex-col s-gap-1 s-p-px" },
|
|
140729
|
-
React.createElement("textarea", __assign({ rows: minRows, ref: ref, className: classNames("overflow-y-auto s-block s-w-full s-min-w-0 s-rounded-xl s-text-sm s-placeholder-element-700 s-transition-all s-
|
|
142006
|
+
React.createElement("textarea", __assign({ rows: minRows, ref: ref, className: classNames("overflow-y-auto s-block s-w-full s-min-w-0 s-rounded-xl s-text-sm s-placeholder-element-700 s-transition-all s-scrollbar-hide s-duration-200", !error
|
|
140730
142007
|
? "s-border-structure-100 focus:s-border-action-300 focus:s-ring-action-300"
|
|
140731
142008
|
: "s-border-red-500 focus:s-border-red-500 focus:s-ring-red-500", "s-border-structure-200 s-bg-structure-50", "s-resize-y", className !== null && className !== void 0 ? className : "") }, props)),
|
|
140732
142009
|
error && showErrorLabel && (React.createElement("div", { className: "s-ml-2 s-text-sm s-text-warning-500" }, error))));
|
|
@@ -141085,11 +142362,13 @@ exports.ChatBubbleLeftRightIcon = SvgChatBubbleLeftRight$3;
|
|
|
141085
142362
|
exports.ChatBubbleLeftRightStrokeIcon = SvgChatBubbleLeftRight$1;
|
|
141086
142363
|
exports.ChatBubbleThoughtIcon = SvgChatBubbleThought$3;
|
|
141087
142364
|
exports.ChatBubbleThoughtStrokeIcon = SvgChatBubbleThought$1;
|
|
142365
|
+
exports.CheckBoxWithTextAndDescription = CheckBoxWithTextAndDescription;
|
|
141088
142366
|
exports.CheckCircleIcon = CheckCircleIcon;
|
|
141089
142367
|
exports.CheckCircleStrokeIcon = SvgCheckCircle$1;
|
|
141090
142368
|
exports.CheckIcon = CheckIcon;
|
|
141091
142369
|
exports.CheckStrokeIcon = SvgCheck$1;
|
|
141092
142370
|
exports.Checkbox = Checkbox;
|
|
142371
|
+
exports.CheckboxWithText = CheckboxWithText;
|
|
141093
142372
|
exports.ChevronDoubleLeftIcon = SvgChevronDoubleLeft$3;
|
|
141094
142373
|
exports.ChevronDoubleLeftStrokeIcon = SvgChevronDoubleLeft$1;
|
|
141095
142374
|
exports.ChevronDoubleRightIcon = SvgChevronDoubleRight$3;
|
|
@@ -141235,7 +142514,7 @@ exports.InformationCircleIcon = InformationCircleIcon;
|
|
|
141235
142514
|
exports.InformationCircleStrokeIcon = SvgInformationCircle$1;
|
|
141236
142515
|
exports.Input = Input;
|
|
141237
142516
|
exports.IntercomLogo = IntercomLogo;
|
|
141238
|
-
exports.Item = Item$
|
|
142517
|
+
exports.Item = Item$2;
|
|
141239
142518
|
exports.KeyIcon = SvgKey$3;
|
|
141240
142519
|
exports.KeyStrokeIcon = SvgKey$1;
|
|
141241
142520
|
exports.Label = Label$1;
|
|
@@ -141339,7 +142618,9 @@ exports.PuzzleIcon = SvgPuzzle$3;
|
|
|
141339
142618
|
exports.PuzzleStrokeIcon = SvgPuzzle$1;
|
|
141340
142619
|
exports.QuestionMarkCircleIcon = SvgQuestionMarkCircle$3;
|
|
141341
142620
|
exports.QuestionMarkCircleStrokeIcon = SvgQuestionMarkCircle$1;
|
|
141342
|
-
exports.
|
|
142621
|
+
exports.RadioGroup = RadioGroup;
|
|
142622
|
+
exports.RadioGroupChoice = RadioGroupChoice;
|
|
142623
|
+
exports.RadioGroupItem = RadioGroupItem;
|
|
141343
142624
|
exports.ReactionIcon = SvgReaction$3;
|
|
141344
142625
|
exports.ReactionStrokeIcon = SvgReaction$1;
|
|
141345
142626
|
exports.RectangleIcon = SvgRectangle$3;
|